Listener listener new Listener public void handle Event Event e switch e type case SWT Dispose Map remove new Integer web View Web Kit objc msgSend notification Center Web Kit S removeObserver name object Delegate 0 web View break case SWT Hide Bug on Safari The web view cannot be obscured by other views above it This problem is specified in the apple documentation for Hi Web View Create The workaround is to hook Hide and Show events on the browser s parents and set its size to 0 in Hide and to restore its size in Show CG Rect bounds new CG Rect OS HI View Set Frame web View Handle bounds break case SWT Show Bug on Safari The web view cannot be obscured by other views above it This problem is specified in the apple documentation for Hi Web View Create The workaround is to hook Hide and Show events on the browser s parents and set its size to 0 in Hide and to restore its size in Show CG Rect bounds new CG Rect OS HI View Get Frame handle bounds OS HI View Set Frame web View Handle bounds break case SWT Resize Bug on Safari Resizing the height of a Shell containing a Browser at a fixed location causes the Browser to redraw at a wrong location The web view is a HI View container that internally hosts a Cocoa NS View that uses a coordinates system with the origin at the bottom left corner of a window instead of the coordinates system used in Carbon that starts at the top left corner The workaround is to reposition the web view every time the Shell of the Browser is resized Feature on Safari The HI View ignores the call to update its position because it believes it has not changed The workaround is to force it to reposition by changing its size and setting it back to the original value If the widget is hidden leave its size to 0 0 as set in the SWT Hide callback if is Visible break CG Rect bounds new CG Rect OS HI View Get Frame handle bounds Note Setting negative width or height causes Safari to always display incorrectly even if further resize events are correct if bounds width 0 bounds width 0 if bounds height 0 bounds height 0 bounds width OS HI View Set Frame web View Handle bounds bounds width OS HI View Set Frame web View Handle bounds break  handleEvent webView WebKit objc_msgSend notificationCenter WebKit S_removeObserver_name_object webView HiWebViewCreate CGRect CGRect HIViewSetFrame webViewHandle HiWebViewCreate CGRect CGRect HIViewGetFrame HIViewSetFrame webViewHandle HIView NSView HIView isVisible CGRect CGRect HIViewGetFrame HIViewSetFrame webViewHandle HIViewSetFrame webViewHandle
Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for browser creation li ul see get Style since 3 0 public Browser Composite parent int style super parent style Note Loading the webkit bundle on Jaguar causes a crash The workaround is to detect any OS prior to 10 30 and fail without crashing int response new int 1 int err OS Gestalt OS gestalt System Version response if err OS no Err response 0 0xffff 0x1030 dispose SWT error SWT ERROR NO HANDLES int out Control new int 1 try Web Kit HI Web View Create out Control catch Unsatisfied Link Error e dispose SWT error SWT ERROR NO HANDLES web View Handle out Control 0 if web View Handle 0 dispose SWT error SWT ERROR NO HANDLES OS HI View Add Subview handle web View Handle OS HI View Set Visible web View Handle true final int web View Web Kit HI Web View Get Web View web View Handle This code is intentionally commented Setting a group name is the right thing to do in order to avoid multiple open window requests For some reason Safari crashes when requested to reopen the same window if that window was previously closed This may be because that window was not correctly closed String group Name My Document NON NLS 1 int length group Name length char buffer new char length group Name get Chars 0 length buffer 0 int group Name String OS CF String Create With Characters 0 buffer length web View set Group Name My Document Web Kit objc msgSend web View Web Kit S setGroupName group Name String OS CF Release group Name String final int notification Center Web Kit objc msgSend Web Kit C NSNotificationCenter Web Kit S defaultCenter Listener listener new Listener public void handle Event Event e switch e type case SWT Dispose Map remove new Integer web View Web Kit objc msgSend notification Center Web Kit S removeObserver name object Delegate 0 web View break case SWT Hide Bug on Safari The web view cannot be obscured by other views above it This problem is specified in the apple documentation for Hi Web View Create The workaround is to hook Hide and Show events on the browser s parents and set its size to 0 in Hide and to restore its size in Show CG Rect bounds new CG Rect OS HI View Set Frame web View Handle bounds break case SWT Show Bug on Safari The web view cannot be obscured by other views above it This problem is specified in the apple documentation for Hi Web View Create The workaround is to hook Hide and Show events on the browser s parents and set its size to 0 in Hide and to restore its size in Show CG Rect bounds new CG Rect OS HI View Get Frame handle bounds OS HI View Set Frame web View Handle bounds break case SWT Resize Bug on Safari Resizing the height of a Shell containing a Browser at a fixed location causes the Browser to redraw at a wrong location The web view is a HI View container that internally hosts a Cocoa NS View that uses a coordinates system with the origin at the bottom left corner of a window instead of the coordinates system used in Carbon that starts at the top left corner The workaround is to reposition the web view every time the Shell of the Browser is resized Feature on Safari The HI View ignores the call to update its position because it believes it has not changed The workaround is to force it to reposition by changing its size and setting it back to the original value If the widget is hidden leave its size to 0 0 as set in the SWT Hide callback if is Visible break CG Rect bounds new CG Rect OS HI View Get Frame handle bounds Note Setting negative width or height causes Safari to always display incorrectly even if further resize events are correct if bounds width 0 bounds width 0 if bounds height 0 bounds height 0 bounds width OS HI View Set Frame web View Handle bounds bounds width OS HI View Set Frame web View Handle bounds break add Listener SWT Dispose listener add Listener SWT Resize listener Shell shell get Shell shell add Listener SWT Resize listener shell add Listener SWT Show listener shell add Listener SWT Hide listener Control c this do c add Listener SWT Show listener c add Listener SWT Hide listener c c get Parent while c shell if callback null callback new Callback this get Class event Proc 6 NON NLS 1 int event Proc callback get Address Delegate Web Resource Load Delegate alloc init event Proc Delegate Web Kit objc msgSend Web Kit C WebKitDelegate Web Kit S alloc Delegate Web Kit objc msgSend Delegate Web Kit S initWithProc event Proc Map put new Integer web View this web View set Frame Load Delegate delegate Web Kit objc msgSend web View Web Kit S setFrameLoadDelegate Delegate web View set Resource Load Delegate delegate Web Kit objc msgSend web View Web Kit S setResourceLoadDelegate Delegate web View setUI Delegate delegate Web Kit objc msgSend web View Web Kit S setUIDelegate Delegate register delegate for all notifications send out from webview Web Kit objc msgSend notification Center Web Kit S addObserver selector name object Delegate Web Kit S handleNotification 0 web View  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS SWTError ERROR_NO_HANDLES getStyle gestaltSystemVersion noErr ERROR_NO_HANDLES outControl WebKit HIWebViewCreate outControl UnsatisfiedLinkError ERROR_NO_HANDLES webViewHandle outControl webViewHandle ERROR_NO_HANDLES HIViewAddSubview webViewHandle HIViewSetVisible webViewHandle webView WebKit HIWebViewGetWebView webViewHandle groupName MyDocument groupName groupName getChars groupNameString CFStringCreateWithCharacters webView setGroupName MyDocument WebKit objc_msgSend webView WebKit S_setGroupName groupNameString CFRelease groupNameString notificationCenter WebKit objc_msgSend WebKit C_NSNotificationCenter WebKit S_defaultCenter handleEvent webView WebKit objc_msgSend notificationCenter WebKit S_removeObserver_name_object webView HiWebViewCreate CGRect CGRect HIViewSetFrame webViewHandle HiWebViewCreate CGRect CGRect HIViewGetFrame HIViewSetFrame webViewHandle HIView NSView HIView isVisible CGRect CGRect HIViewGetFrame HIViewSetFrame webViewHandle HIViewSetFrame webViewHandle addListener addListener getShell addListener addListener addListener addListener addListener getParent getClass eventProc eventProc getAddress WebResourceLoadDelegate eventProc WebKit objc_msgSend WebKit C_WebKitDelegate WebKit S_alloc WebKit objc_msgSend WebKit S_initWithProc eventProc webView webView setFrameLoadDelegate WebKit objc_msgSend webView WebKit S_setFrameLoadDelegate webView setResourceLoadDelegate WebKit objc_msgSend webView WebKit S_setResourceLoadDelegate webView setUIDelegate WebKit objc_msgSend webView WebKit S_setUIDelegate WebKit objc_msgSend notificationCenter WebKit S_addObserver_selector_name_object WebKit S_handleNotification webView
static int event Proc int webview int selector int arg0 int arg1 int arg2 int arg3 Object o Map get new Integer webview if o instanceof Browser return Browser o handle Callback selector arg0 arg1 arg2 arg3 return 0  eventProc handleCallback
Adds the listener to receive events p param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 since 3 0 public void add Close Window Listener Close Window Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Close Window Listener new Close Window Listeners new Close Window Listener close Window Listeners length 1 System arraycopy close Window Listeners 0 new Close Window Listeners 0 close Window Listeners length close Window Listeners new Close Window Listeners close Window Listeners close Window Listeners length 1 listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED addCloseWindowListener CloseWindowListener checkWidget ERROR_NULL_ARGUMENT CloseWindowListener newCloseWindowListeners CloseWindowListener closeWindowListeners closeWindowListeners newCloseWindowListeners closeWindowListeners closeWindowListeners newCloseWindowListeners closeWindowListeners closeWindowListeners
Adds the listener to receive events p param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 since 3 0 public void add Location Listener Location Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Location Listener new Location Listeners new Location Listener location Listeners length 1 System arraycopy location Listeners 0 new Location Listeners 0 location Listeners length location Listeners new Location Listeners location Listeners location Listeners length 1 listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED addLocationListener LocationListener checkWidget ERROR_NULL_ARGUMENT LocationListener newLocationListeners LocationListener locationListeners locationListeners newLocationListeners locationListeners locationListeners newLocationListeners locationListeners locationListeners
Adds the listener to receive events p param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 since 3 0 public void add Open Window Listener Open Window Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Open Window Listener new Open Window Listeners new Open Window Listener open Window Listeners length 1 System arraycopy open Window Listeners 0 new Open Window Listeners 0 open Window Listeners length open Window Listeners new Open Window Listeners open Window Listeners open Window Listeners length 1 listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED addOpenWindowListener OpenWindowListener checkWidget ERROR_NULL_ARGUMENT OpenWindowListener newOpenWindowListeners OpenWindowListener openWindowListeners openWindowListeners newOpenWindowListeners openWindowListeners openWindowListeners newOpenWindowListeners openWindowListeners openWindowListeners
Adds the listener to receive events p param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 since 3 0 public void add Progress Listener Progress Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Progress Listener new Progress Listeners new Progress Listener progress Listeners length 1 System arraycopy progress Listeners 0 new Progress Listeners 0 progress Listeners length progress Listeners new Progress Listeners progress Listeners progress Listeners length 1 listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED addProgressListener ProgressListener checkWidget ERROR_NULL_ARGUMENT ProgressListener newProgressListeners ProgressListener progressListeners progressListeners newProgressListeners progressListeners progressListeners newProgressListeners progressListeners progressListeners
Adds the listener to receive events p param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 since 3 0 public void add Status Text Listener Status Text Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Status Text Listener new Status Text Listeners new Status Text Listener status Text Listeners length 1 System arraycopy status Text Listeners 0 new Status Text Listeners 0 status Text Listeners length status Text Listeners new Status Text Listeners status Text Listeners status Text Listeners length 1 listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED addStatusTextListener StatusTextListener checkWidget ERROR_NULL_ARGUMENT StatusTextListener newStatusTextListeners StatusTextListener statusTextListeners statusTextListeners newStatusTextListeners statusTextListeners statusTextListeners newStatusTextListeners statusTextListeners statusTextListeners
Adds the listener to receive events p param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 since 3 0 public void add Title Listener Title Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Title Listener new Title Listeners new Title Listener title Listeners length 1 System arraycopy title Listeners 0 new Title Listeners 0 title Listeners length title Listeners new Title Listeners title Listeners title Listeners length 1 listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED addTitleListener TitleListener checkWidget ERROR_NULL_ARGUMENT TitleListener newTitleListeners TitleListener titleListeners titleListeners newTitleListeners titleListeners titleListeners newTitleListeners titleListeners titleListeners
Adds the listener to receive events p param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 since 3 0 public void add Visibility Window Listener Visibility Window Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Visibility Window Listener new Visibility Window Listeners new Visibility Window Listener visibility Window Listeners length 1 System arraycopy visibility Window Listeners 0 new Visibility Window Listeners 0 visibility Window Listeners length visibility Window Listeners new Visibility Window Listeners visibility Window Listeners visibility Window Listeners length 1 listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED addVisibilityWindowListener VisibilityWindowListener checkWidget ERROR_NULL_ARGUMENT VisibilityWindowListener newVisibilityWindowListeners VisibilityWindowListener visibilityWindowListeners visibilityWindowListeners newVisibilityWindowListeners visibilityWindowListeners visibilityWindowListeners newVisibilityWindowListeners visibilityWindowListeners visibilityWindowListeners
Navigate to the previous session history item return code true code if the operation was successful and code false code otherwise exception SWT Error 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 since 3 0 public boolean back check Widget int web View Web Kit HI Web View Get Web View web View Handle return Web Kit objc msgSend web View Web Kit S goBack 0  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED checkWidget webView WebKit HIWebViewGetWebView webViewHandle WebKit objc_msgSend webView WebKit S_goBack
protected void check Subclass String name get Class get Name int index name last Index Of if name substring 0 index 1 equals PACKAGE PREFIX SWT error SWT ERROR INVALID SUBCLASS  checkSubclass getClass getName lastIndexOf PACKAGE_PREFIX ERROR_INVALID_SUBCLASS
Navigate to the next session history item return code true code if the operation was successful and code false code otherwise exception SWT Error 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 since 3 0 public boolean forward check Widget int web View Web Kit HI Web View Get Web View web View Handle return Web Kit objc msgSend web View Web Kit S goForward 0  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED checkWidget webView WebKit HIWebViewGetWebView webViewHandle WebKit objc_msgSend webView WebKit S_goForward
Returns the current URL return the current URL or an empty code String code if there is no current URL exception SWT Error 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 set Url since 3 0 public String get Url check Widget return url  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED setUrl getUrl checkWidget
Here we dispatch all Web View upcalls int handle Callback int selector int arg0 int arg1 int arg2 int arg3 int ret 0 for meaning of selector see Web Kit Delegate methods in webkit c switch selector case 1 did Fail Provisional Load With Error arg0 arg1 break case 2 did Finish Load For Frame arg0 break case 3 did Receive Title arg0 arg1 break case 4 did Start Provisional Load For Frame arg0 break case 5 did Finish Loading From Data Source arg0 arg1 break case 6 did Fail Loading With Error arg0 arg1 arg2 break case 7 ret identifier For Initial Request arg0 arg1 break case 8 ret will Send Request arg0 arg1 arg2 arg3 break case 9 handle Notification arg0 break case 10 did Commit Load For Frame arg0 break case 11 ret create Web View With Request arg0 break case 12 web View Show arg0 break case 13 set Frame arg0 break case 14 web View Close break case 15 ret context Menu Items For Element arg0 arg1 break return ret  WebView handleCallback WebKitDelegate didFailProvisionalLoadWithError didFinishLoadForFrame didReceiveTitle didStartProvisionalLoadForFrame didFinishLoadingFromDataSource didFailLoadingWithError identifierForInitialRequest willSendRequest handleNotification didCommitLoadForFrame createWebViewWithRequest webViewShow setFrame webViewClose contextMenuItemsForElement
Returns code true code if the receiver can navigate to the previous session history item and code false code otherwise 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 check Widget int web View Web Kit HI Web View Get Web View web View Handle return Web Kit objc msgSend web View Web Kit S canGoBack 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS isBackEnabled checkWidget webView WebKit HIWebViewGetWebView webViewHandle WebKit objc_msgSend webView WebKit S_canGoBack
Returns code true code if the receiver can navigate to the next session history item and code false code otherwise 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 check Widget int web View Web Kit HI Web View Get Web View web View Handle return Web Kit objc msgSend web View Web Kit S canGoForward 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS isForwardEnabled checkWidget webView WebKit HIWebViewGetWebView webViewHandle WebKit objc_msgSend webView WebKit S_canGoForward
Refresh the current page exception SWT Error 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 since 3 0 public void refresh check Widget int web View Web Kit HI Web View Get Web View web View Handle Web Kit objc msgSend web View Web Kit S reload 0  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED checkWidget webView WebKit HIWebViewGetWebView webViewHandle WebKit objc_msgSend webView WebKit S_reload
Removes the listener param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 since 3 0 public void remove Close Window Listener Close Window Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT if close Window Listeners length 0 return int index 1 for int i 0 i close Window Listeners length i if listener close Window Listeners i index i break if index 1 return if close Window Listeners length 1 close Window Listeners new Close Window Listener 0 return Close Window Listener new Close Window Listeners new Close Window Listener close Window Listeners length 1 System arraycopy close Window Listeners 0 new Close Window Listeners 0 index System arraycopy close Window Listeners index 1 new Close Window Listeners index close Window Listeners length index 1 close Window Listeners new Close Window Listeners  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED removeCloseWindowListener CloseWindowListener checkWidget ERROR_NULL_ARGUMENT closeWindowListeners closeWindowListeners closeWindowListeners closeWindowListeners closeWindowListeners CloseWindowListener CloseWindowListener newCloseWindowListeners CloseWindowListener closeWindowListeners closeWindowListeners newCloseWindowListeners closeWindowListeners newCloseWindowListeners closeWindowListeners closeWindowListeners newCloseWindowListeners
Removes the listener param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 since 3 0 public void remove Location Listener Location Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT if location Listeners length 0 return int index 1 for int i 0 i location Listeners length i if listener location Listeners i index i break if index 1 return if location Listeners length 1 location Listeners new Location Listener 0 return Location Listener new Location Listeners new Location Listener location Listeners length 1 System arraycopy location Listeners 0 new Location Listeners 0 index System arraycopy location Listeners index 1 new Location Listeners index location Listeners length index 1 location Listeners new Location Listeners  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED removeLocationListener LocationListener checkWidget ERROR_NULL_ARGUMENT locationListeners locationListeners locationListeners locationListeners locationListeners LocationListener LocationListener newLocationListeners LocationListener locationListeners locationListeners newLocationListeners locationListeners newLocationListeners locationListeners locationListeners newLocationListeners
Removes the listener param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 since 3 0 public void remove Open Window Listener Open Window Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT if open Window Listeners length 0 return int index 1 for int i 0 i open Window Listeners length i if listener open Window Listeners i index i break if index 1 return if open Window Listeners length 1 open Window Listeners new Open Window Listener 0 return Open Window Listener new Open Window Listeners new Open Window Listener open Window Listeners length 1 System arraycopy open Window Listeners 0 new Open Window Listeners 0 index System arraycopy open Window Listeners index 1 new Open Window Listeners index open Window Listeners length index 1 open Window Listeners new Open Window Listeners  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED removeOpenWindowListener OpenWindowListener checkWidget ERROR_NULL_ARGUMENT openWindowListeners openWindowListeners openWindowListeners openWindowListeners openWindowListeners OpenWindowListener OpenWindowListener newOpenWindowListeners OpenWindowListener openWindowListeners openWindowListeners newOpenWindowListeners openWindowListeners newOpenWindowListeners openWindowListeners openWindowListeners newOpenWindowListeners
Removes the listener param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 since 3 0 public void remove Progress Listener Progress Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT if progress Listeners length 0 return int index 1 for int i 0 i progress Listeners length i if listener progress Listeners i index i break if index 1 return if progress Listeners length 1 progress Listeners new Progress Listener 0 return Progress Listener new Progress Listeners new Progress Listener progress Listeners length 1 System arraycopy progress Listeners 0 new Progress Listeners 0 index System arraycopy progress Listeners index 1 new Progress Listeners index progress Listeners length index 1 progress Listeners new Progress Listeners  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED removeProgressListener ProgressListener checkWidget ERROR_NULL_ARGUMENT progressListeners progressListeners progressListeners progressListeners progressListeners ProgressListener ProgressListener newProgressListeners ProgressListener progressListeners progressListeners newProgressListeners progressListeners newProgressListeners progressListeners progressListeners newProgressListeners
Removes the listener param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 since 3 0 public void remove Status Text Listener Status Text Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT if status Text Listeners length 0 return int index 1 for int i 0 i status Text Listeners length i if listener status Text Listeners i index i break if index 1 return if status Text Listeners length 1 status Text Listeners new Status Text Listener 0 return Status Text Listener new Status Text Listeners new Status Text Listener status Text Listeners length 1 System arraycopy status Text Listeners 0 new Status Text Listeners 0 index System arraycopy status Text Listeners index 1 new Status Text Listeners index status Text Listeners length index 1 status Text Listeners new Status Text Listeners  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED removeStatusTextListener StatusTextListener checkWidget ERROR_NULL_ARGUMENT statusTextListeners statusTextListeners statusTextListeners statusTextListeners statusTextListeners StatusTextListener StatusTextListener newStatusTextListeners StatusTextListener statusTextListeners statusTextListeners newStatusTextListeners statusTextListeners newStatusTextListeners statusTextListeners statusTextListeners newStatusTextListeners
Removes the listener param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 since 3 0 public void remove Title Listener Title Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT if title Listeners length 0 return int index 1 for int i 0 i title Listeners length i if listener title Listeners i index i break if index 1 return if title Listeners length 1 title Listeners new Title Listener 0 return Title Listener new Title Listeners new Title Listener title Listeners length 1 System arraycopy title Listeners 0 new Title Listeners 0 index System arraycopy title Listeners index 1 new Title Listeners index title Listeners length index 1 title Listeners new Title Listeners  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED removeTitleListener TitleListener checkWidget ERROR_NULL_ARGUMENT titleListeners titleListeners titleListeners titleListeners titleListeners TitleListener TitleListener newTitleListeners TitleListener titleListeners titleListeners newTitleListeners titleListeners newTitleListeners titleListeners titleListeners newTitleListeners
Removes the listener param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 since 3 0 public void remove Visibility Window Listener Visibility Window Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT if visibility Window Listeners length 0 return int index 1 for int i 0 i visibility Window Listeners length i if listener visibility Window Listeners i index i break if index 1 return if visibility Window Listeners length 1 visibility Window Listeners new Visibility Window Listener 0 return Visibility Window Listener new Visibility Window Listeners new Visibility Window Listener visibility Window Listeners length 1 System arraycopy visibility Window Listeners 0 new Visibility Window Listeners 0 index System arraycopy visibility Window Listeners index 1 new Visibility Window Listeners index visibility Window Listeners length index 1 visibility Window Listeners new Visibility Window Listeners  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED removeVisibilityWindowListener VisibilityWindowListener checkWidget ERROR_NULL_ARGUMENT visibilityWindowListeners visibilityWindowListeners visibilityWindowListeners visibilityWindowListeners visibilityWindowListeners VisibilityWindowListener VisibilityWindowListener newVisibilityWindowListeners VisibilityWindowListener visibilityWindowListeners visibilityWindowListeners newVisibilityWindowListeners visibilityWindowListeners newVisibilityWindowListeners visibilityWindowListeners visibilityWindowListeners newVisibilityWindowListeners
Renders HTML param html the HTML content to be rendered return true if the operation was successful and false otherwise exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the html is null li ul exception SWT Error 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 set Url since 3 0 public boolean set Text String html check Widget if html null SWT error SWT ERROR NULL ARGUMENT int length html length char buffer new char length html get Chars 0 length buffer 0 int string OS CF String Create With Characters 0 buffer length String baseURL about blank NON NLS 1 length baseURL length buffer new char length baseURL get Chars 0 length buffer 0 int URL String OS CF String Create With Characters 0 buffer length Note URL With String uses autorelease The resulting URL does not need to be released URL NSURL URL With String NS String URL String int URL Web Kit objc msgSend Web Kit C NSURL Web Kit S URLWithString URL String OS CF Release URL String int web View Web Kit HI Web View Get Web View web View Handle main Frame web View main Frame int main Frame Web Kit objc msgSend web View Web Kit S mainFrame main Frame loadHTML String NS String string baseURL NSURL URL Web Kit objc msgSend main Frame Web Kit S loadHTMLStringbaseURL string URL OS CF Release string return true  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED setUrl setText checkWidget ERROR_NULL_ARGUMENT getChars CFStringCreateWithCharacters getChars URLString CFStringCreateWithCharacters URLWithString URLWithString NSString URLString WebKit objc_msgSend WebKit C_NSURL WebKit S_URLWithString URLString CFRelease URLString webView WebKit HIWebViewGetWebView webViewHandle mainFrame webView mainFrame mainFrame WebKit objc_msgSend webView WebKit S_mainFrame mainFrame loadHTMLString NSString WebKit objc_msgSend mainFrame WebKit S_loadHTMLStringbaseURL CFRelease
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 Error 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 get Url since 3 0 public boolean set Url String url check Widget if url null SWT error SWT ERROR NULL ARGUMENT String Buffer buffer new String Buffer for int i 0 i url length i char c url char At i if c buffer append 20 else buffer append c int length buffer length char chars new char length buffer get Chars 0 length chars 0 int s Handle OS CF String Create With Characters 0 chars length Note URL With String uses autorelease The resulting URL does not need to be released inURL NSURL URL With String NS String s Handle int inURL Web Kit objc msgSend Web Kit C NSURL Web Kit S URLWithString s Handle OS CF Release s Handle request NSURL Request request WithURL NSURL inURL int request Web Kit objc msgSend Web Kit C NSURLRequest Web Kit S requestWithURL inURL int web View Web Kit HI Web View Get Web View web View Handle main Frame web View main Frame int main Frame Web Kit objc msgSend web View Web Kit S mainFrame main Frame load Request request Web Kit objc msgSend main Frame Web Kit S loadRequest request return true  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED getUrl setUrl checkWidget ERROR_NULL_ARGUMENT StringBuffer StringBuffer charAt getChars sHandle CFStringCreateWithCharacters URLWithString URLWithString NSString sHandle WebKit objc_msgSend WebKit C_NSURL WebKit S_URLWithString sHandle CFRelease sHandle NSURLRequest requestWithURL WebKit objc_msgSend WebKit C_NSURLRequest WebKit S_requestWithURL webView WebKit HIWebViewGetWebView webViewHandle mainFrame webView mainFrame mainFrame WebKit objc_msgSend webView WebKit S_mainFrame mainFrame loadRequest WebKit objc_msgSend mainFrame WebKit S_loadRequest
Stop any loading and rendering activity exception SWT Error 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 since 3 0 public void stop check Widget int web View Web Kit HI Web View Get Web View web View Handle Web Kit objc msgSend web View Web Kit S stopLoading 0  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED checkWidget webView WebKit HIWebViewGetWebView webViewHandle WebKit objc_msgSend webView WebKit S_stopLoading
void did Fail Provisional Load With Error int error int frame int web View Web Kit HI Web View Get Web View web View Handle if frame Web Kit objc msgSend web View Web Kit S mainFrame Feature on Safari The identifier is used here as a marker for the events related to the top frame and the URL changes related to that top frame as they should appear on the location bar of a browser It is expected to reset the identifier to 0 when the event did Finish Loading From Data Source related to the identifier For Initial Request event is received Howeever Safari fires the did Finish Loading From Data Source event before the entire content of the top frame is loaded It is possible to receive multiple will Send Request events in this interval causing the Browser widget to send unwanted Location changing events For this reason the identifier is reset to 0 when the top frame has either finished loading did Finish Load For Frame event or failed did Fail Provisional Load With Error identifier 0  didFailProvisionalLoadWithError webView WebKit HIWebViewGetWebView webViewHandle WebKit objc_msgSend webView WebKit S_mainFrame didFinishLoadingFromDataSource identifierForInitialRequest didFinishLoadingFromDataSource willSendRequest didFinishLoadForFrame didFailProvisionalLoadWithError
display async Exec new Runnable public void run if display is Disposed is Disposed listener completed progress  asyncExec isDisposed isDisposed
void did Finish Load For Frame int frame int web View Web Kit HI Web View Get Web View web View Handle if frame Web Kit objc msgSend web View Web Kit S mainFrame final Display display get Display final Progress Event progress new Progress Event this progress display get Display progress widget this progress current MAX PROGRESS progress total MAX PROGRESS for int i 0 i progress Listeners length i final Progress Listener listener progress Listeners i Note on Web Kit Running the event loop from a Browser delegate callback breaks the Web Kit stop loading or crash The widget Progress Bar currently touches the event loop every time the method set Selection is called The workaround is to invoke Display asyncexec so that the Browser does not crash when the user updates the selection of the Progress Bar display async Exec new Runnable public void run if display is Disposed is Disposed listener completed progress Feature on Safari The identifier is used here as a marker for the events related to the top frame and the URL changes related to that top frame as they should appear on the location bar of a browser It is expected to reset the identifier to 0 when the event did Finish Loading From Data Source related to the identifier For Initial Request event is received Howeever Safari fires the did Finish Loading From Data Source event before the entire content of the top frame is loaded It is possible to receive multiple will Send Request events in this interval causing the Browser widget to send unwanted Location changing events For this reason the identifier is reset to 0 when the top frame has either finished loading did Finish Load For Frame event or failed did Fail Provisional Load With Error identifier 0  didFinishLoadForFrame webView WebKit HIWebViewGetWebView webViewHandle WebKit objc_msgSend webView WebKit S_mainFrame getDisplay ProgressEvent ProgressEvent getDisplay MAX_PROGRESS MAX_PROGRESS progressListeners ProgressListener progressListeners WebKit WebKit ProgressBar setSelection ProgressBar asyncExec isDisposed isDisposed didFinishLoadingFromDataSource identifierForInitialRequest didFinishLoadingFromDataSource willSendRequest didFinishLoadForFrame didFailProvisionalLoadWithError
void did Receive Title int title int frame int web View Web Kit HI Web View Get Web View web View Handle if frame Web Kit objc msgSend web View Web Kit S mainFrame int length OS CF String Get Length title char buffer new char length CF Range range new CF Range range length length OS CF String Get Characters title range buffer String new Title new String buffer Title Event new Event new Title Event Browser this new Event display get Display new Event widget this new Event title new Title for int i 0 i title Listeners length i title Listeners i changed new Event  didReceiveTitle webView WebKit HIWebViewGetWebView webViewHandle WebKit objc_msgSend webView WebKit S_mainFrame CFStringGetLength CFRange CFRange CFStringGetCharacters newTitle TitleEvent newEvent TitleEvent newEvent getDisplay newEvent newEvent newTitle titleListeners titleListeners newEvent
void did Start Provisional Load For Frame int frame This code is intentionally commented Web Frame Load Delegate did Start Provisional Load For Frame is called before Web Resource Load Delegate will Send Request and Web Frame Load Delegate did Commit Load For Frame The resource count is reset when did Commit Load For Frame is received for the top frame int web View Web Kit HI Web View Get Web View web View Handle if frame Web Kit objc msgSend web View Web Kit S mainFrame reset resource status variables resource Count 0  didStartProvisionalLoadForFrame WebFrameLoadDelegate didStartProvisionalLoadForFrame WebResourceLoadDelegate willSendRequest WebFrameLoadDelegate didCommitLoadForFrame didCommitLoadForFrame webView WebKit HIWebViewGetWebView webViewHandle WebKit objc_msgSend webView WebKit S_mainFrame resourceCount
display async Exec new Runnable public void run if display is Disposed is Disposed listener changed progress  asyncExec isDisposed isDisposed
void did Commit Load For Frame int frame int web View Web Kit HI Web View Get Web View web View Handle id url frame provisional Data Source request URL absolute String int data Source Web Kit objc msgSend frame Web Kit S dataSource int request Web Kit objc msgSend data Source Web Kit S request int url Web Kit objc msgSend request Web Kit S URL int s Web Kit objc msgSend url Web Kit S absoluteString int length OS CF String Get Length s char buffer new char length CF Range range new CF Range range length length OS CF String Get Characters s range buffer String url2 new String buffer final Display display get Display boolean top frame Web Kit objc msgSend web View Web Kit S mainFrame if top reset resource status variables resource Count 0 this url url2 final Progress Event progress new Progress Event this progress display display progress widget this progress current 1 progress total MAX PROGRESS for int i 0 i progress Listeners length i final Progress Listener listener progress Listeners i Note on Web Kit Running the event loop from a Browser delegate callback breaks the Web Kit stop loading or crash The widget Progress Bar currently touches the event loop every time the method set Selection is called The workaround is to invoke Display asyncexec so that the Browser does not crash when the user updates the selection of the Progress Bar display async Exec new Runnable public void run if display is Disposed is Disposed listener changed progress Status Text Event status Text new Status Text Event this status Text display display status Text widget this status Text text url2 for int i 0 i status Text Listeners length i status Text Listeners i changed status Text Location Event location new Location Event Browser this location display display location widget this location location url2 location top top for int i 0 i location Listeners length i location Listeners i changed location  didCommitLoadForFrame webView WebKit HIWebViewGetWebView webViewHandle provisionalDataSource absoluteString dataSource WebKit objc_msgSend WebKit S_dataSource WebKit objc_msgSend dataSource WebKit S_request WebKit objc_msgSend WebKit S_URL WebKit objc_msgSend WebKit S_absoluteString CFStringGetLength CFRange CFRange CFStringGetCharacters getDisplay WebKit objc_msgSend webView WebKit S_mainFrame resourceCount ProgressEvent ProgressEvent MAX_PROGRESS progressListeners ProgressListener progressListeners WebKit WebKit ProgressBar setSelection ProgressBar asyncExec isDisposed isDisposed StatusTextEvent statusText StatusTextEvent statusText statusText statusText statusTextListeners statusTextListeners statusText LocationEvent LocationEvent locationListeners locationListeners
void did Finish Loading From Data Source int identifier int data Source Feature on Safari The identifier is used here as a marker for the events related to the top frame and the URL changes related to that top frame as they should appear on the location bar of a browser It is expected to reset the identifier to 0 when the event did Finish Loading From Data Source related to the identifier For Initial Request event is received Howeever Safari fires the did Finish Loading From Data Source event before the entire content of the top frame is loaded It is possible to receive multiple will Send Request events in this interval causing the Browser widget to send unwanted Location changing events For this reason the identifier is reset to 0 when the top frame has either finished loading did Finish Load For Frame event or failed did Fail Provisional Load With Error this code is intentionally commented if this identifier identifier this identifier 0  didFinishLoadingFromDataSource dataSource didFinishLoadingFromDataSource identifierForInitialRequest didFinishLoadingFromDataSource willSendRequest didFinishLoadForFrame didFailProvisionalLoadWithError
void did Fail Loading With Error int identifier int error int data Source Feature on Safari The identifier is used here as a marker for the events related to the top frame and the URL changes related to that top frame as they should appear on the location bar of a browser It is expected to reset the identifier to 0 when the event did Finish Loading From Data Source related to the identifier For Initial Request event is received Howeever Safari fires the did Finish Loading From Data Source event before the entire content of the top frame is loaded It is possible to receive multiple will Send Request events in this interval causing the Browser widget to send unwanted Location changing events For this reason the identifier is reset to 0 when the top frame has either finished loading did Finish Load For Frame event or failed did Fail Provisional Load With Error this code is intentionally commented if this identifier identifier this identifier 0  didFailLoadingWithError dataSource didFinishLoadingFromDataSource identifierForInitialRequest didFinishLoadingFromDataSource willSendRequest didFinishLoadForFrame didFailProvisionalLoadWithError
display async Exec new Runnable public void run if display is Disposed is Disposed listener changed progress  asyncExec isDisposed isDisposed
int identifier For Initial Request int request int data Source final Display display get Display final Progress Event progress new Progress Event this progress display display progress widget this progress current resource Count progress total Math max resource Count MAX PROGRESS for int i 0 i progress Listeners length i final Progress Listener listener progress Listeners i Note on Web Kit Running the event loop from a Browser delegate callback breaks the Web Kit stop loading or crash The widget Progress Bar currently touches the event loop every time the method set Selection is called The workaround is to invoke Display asyncexec so that the Browser does not crash when the user updates the selection of the Progress Bar display async Exec new Runnable public void run if display is Disposed is Disposed listener changed progress Note number With Int uses autorelease The resulting object does not need to be released identifier NS Number number With Int resource Count int identifier Web Kit objc msgSend Web Kit C NSNumber Web Kit S numberWithInt resource Count if this identifier 0 int web View Web Kit HI Web View Get Web View web View Handle int frame Web Kit objc msgSend data Source Web Kit S webFrame if frame Web Kit objc msgSend web View Web Kit S mainFrame this identifier identifier return identifier  identifierForInitialRequest dataSource getDisplay ProgressEvent ProgressEvent resourceCount resourceCount MAX_PROGRESS progressListeners ProgressListener progressListeners WebKit WebKit ProgressBar setSelection ProgressBar asyncExec isDisposed isDisposed numberWithInt NSNumber numberWithInt resourceCount WebKit objc_msgSend WebKit C_NSNumber WebKit S_numberWithInt resourceCount webView WebKit HIWebViewGetWebView webViewHandle WebKit objc_msgSend dataSource WebKit S_webFrame WebKit objc_msgSend webView WebKit S_mainFrame
int will Send Request int identifier int request int redirect Response int data Source int url Web Kit objc msgSend request Web Kit S URL int s Web Kit objc msgSend url Web Kit S absoluteString int length OS CF String Get Length s char buffer new char length CF Range range new CF Range range length length OS CF String Get Characters s range buffer String url2 new String buffer Location Event new Event new Location Event this new Event display get Display new Event widget this new Event location url2 new Event doit true if location Listeners null for int i 0 i location Listeners length i location Listeners i changing new Event return new Event doit request 0  willSendRequest redirectResponse dataSource WebKit objc_msgSend WebKit S_URL WebKit objc_msgSend WebKit S_absoluteString CFStringGetLength CFRange CFRange CFStringGetCharacters LocationEvent newEvent LocationEvent newEvent getDisplay newEvent newEvent newEvent locationListeners locationListeners locationListeners newEvent newEvent
handle Notification void handle Notification int notification  handleNotification handleNotification
UI Delegate int create Web View With Request int request Window Event new Event new Window Event Browser this new Event display get Display new Event widget this if open Window Listeners null for int i 0 i open Window Listeners length i open Window Listeners i open new Event int web View 0 Browser browser new Event browser if browser null browser is Disposed web View Web Kit HI Web View Get Web View browser web View Handle main Frame web View main Frame int main Frame Web Kit objc msgSend web View Web Kit S mainFrame main Frame load Request request Web Kit objc msgSend main Frame Web Kit S loadRequest request return web View  UIDelegate createWebViewWithRequest WindowEvent newEvent WindowEvent newEvent getDisplay newEvent openWindowListeners openWindowListeners openWindowListeners newEvent webView newEvent isDisposed webView WebKit HIWebViewGetWebView webViewHandle mainFrame webView mainFrame mainFrame WebKit objc_msgSend webView WebKit S_mainFrame mainFrame loadRequest WebKit objc_msgSend mainFrame WebKit S_loadRequest webView
void web View Show int sender Feature on Web Kit The Safari Web Kit expects the application to create a new Window using the Objective C Cocoa API in response to UI Delegate create Web View With Request The application is then expected to use Objective C Cocoa API to make this window visible when receiving the UI Delegate web View Show message For some reason a window created with the Carbon API hosting the new browser instance does not redraw until it has been resized The fix is to increase the size of the Shell and restore it to its initial size Shell parent get Shell Point pt parent get Size parent set Size pt x 1 pt y parent set Size pt x pt y Window Event new Event new Window Event this new Event display get Display new Event widget this if location null new Event location location if size null new Event size size for int i 0 i visibility Window Listeners length i visibility Window Listeners i show new Event location null size null  webViewShow WebKit WebKit UIDelegate createWebViewWithRequest UIDelegate webViewShow getShell getSize setSize setSize WindowEvent newEvent WindowEvent newEvent getDisplay newEvent newEvent newEvent visibilityWindowListeners visibilityWindowListeners newEvent
void set Frame int frame float dest new float 4 OS memcpy dest frame 16 convert to SWT system coordinates Rectangle bounds get Display get Bounds location new Point int dest 0 bounds height int dest 1 int dest 3 size new Point int dest 2 int dest 3  setFrame getDisplay getBounds
void web View Close Shell parent get Shell Window Event new Event new Window Event this new Event display get Display new Event widget this for int i 0 i close Window Listeners length i close Window Listeners i close new Event dispose if parent is Disposed return Feature on Web Kit The Safari Web Kit expects the application to create a new Window using the Objective C Cocoa API in response to UI Delegate create Web View With Request The application is then expected to use Objective C Cocoa API to make this window visible when receiving the UI Delegate web View Show message For some reason a window created with the Carbon API hosting the new browser instance does not redraw until it has been resized The fix is to increase the size of the Shell and restore it to its initial size Point pt parent get Size parent set Size pt x 1 pt y parent set Size pt x pt y  webViewClose getShell WindowEvent newEvent WindowEvent newEvent getDisplay newEvent closeWindowListeners closeWindowListeners newEvent isDisposed WebKit WebKit UIDelegate createWebViewWithRequest UIDelegate webViewShow getSize setSize setSize
int context Menu Items For Element int element int default Menu Items org eclipse swt internal carbon Point pt new org eclipse swt internal carbon Point OS Get Global Mouse pt Event event new Event event x pt h event y pt v notify Listeners SWT Menu Detect event Menu menu get Menu if event doit return 0 if menu null menu is Disposed if event x pt h event y pt v menu set Location event x event y menu set Visible true return 0 return default Menu Items  contextMenuItemsForElement defaultMenuItems GetGlobalMouse notifyListeners MenuDetect getMenu isDisposed setLocation setVisible defaultMenuItems

Web Kit static final native int HI Web View Create int out View  WebKit HIWebViewCreate outView
Web Kit static final native int HI Web View Create int out View static final native int HI Web View Get Web View int in View  WebKit HIWebViewCreate outView HIWebViewGetWebView inView
static final native int HI Web View Create int out View static final native int HI Web View Get Web View int in View static final native void Web Init For Carbon  HIWebViewCreate outView HIWebViewGetWebView inView WebInitForCarbon
OBJ C runtime primitives static final native int objc getClass byte class Name  objc_getClass className
OBJ C runtime primitives static final native int objc getClass byte class Name static final native int objc msgSend int object int selector  objc_getClass className objc_msgSend
static final native int objc getClass byte class Name static final native int objc msgSend int object int selector static final native int objc msgSend int object int selector int arg0  objc_getClass className objc_msgSend objc_msgSend
static final native int objc msgSend int object int selector static final native int objc msgSend int object int selector int arg0 static final native int objc msgSend int object int selector int arg0 int arg1  objc_msgSend objc_msgSend objc_msgSend
static final native int objc msgSend int object int selector int arg0 static final native int objc msgSend int object int selector int arg0 int arg1 static final native int objc msgSend int object int selector int arg0 int arg1 int arg2  objc_msgSend objc_msgSend objc_msgSend
static final native int objc msgSend int object int selector int arg0 int arg1 static final native int objc msgSend int object int selector int arg0 int arg1 int arg2 static final native int objc msgSend int object int selector int arg0 int arg1 int arg2 int arg3  objc_msgSend objc_msgSend objc_msgSend
static final native int objc msgSend int object int selector int arg0 int arg1 int arg2 static final native int objc msgSend int object int selector int arg0 int arg1 int arg2 int arg3 static final native int sel registerName byte selector Name  objc_msgSend objc_msgSend sel_registerName selectorName
static int sel registerName String selector byte buffer0 selector get Bytes int length buffer0 length byte buffer new byte length 1 System arraycopy buffer0 0 buffer 0 length return Web Kit sel registerName buffer  sel_registerName getBytes WebKit sel_registerName
static int objc getClass String class Name byte buffer0 class Name get Bytes int length buffer0 length byte buffer new byte length 1 System arraycopy buffer0 0 buffer 0 length return Web Kit objc getClass buffer  objc_getClass className className getBytes WebKit objc_getClass

public Transfer Data get Supported Types int types get Type Ids Transfer Data data new Transfer Data types length for int i 0 i types length i data i new Transfer Data data i type types i return data  TransferData getSupportedTypes getTypeIds TransferData TransferData TransferData
public boolean is Supported Type Transfer Data transfer Data if transfer Data null return false int types get Type Ids for int i 0 i types length i if transfer Data type types i return true return false  isSupportedType TransferData transferData transferData getTypeIds transferData
This implementation of code java To Native code converts a java code byte code to a platform specific representation For additional information see code Transfer java To Native code see Transfer java To Native param object a java code byte code containing the data to be converted param transfer Data an empty code Transfer Data code object this object will be filled in on return with the platform specific format of the data protected void java To Native Object object Transfer Data transfer Data transfer Data result 1 if object null object instanceof byte is Supported Type transfer Data return byte orig byte object byte buffer new byte orig length System arraycopy orig 0 buffer 0 orig length transfer Data data new byte 1 transfer Data data 0 buffer transfer Data result 0  javaToNative javaToNative javaToNative transferData TransferData javaToNative TransferData transferData transferData isSupportedType transferData transferData transferData transferData
This implementation of code native To Java code converts a platform specific representation of a byte array to a java code byte code For additional information see code Transfer native To Java code see Transfer native To Java param transfer Data the platform specific representation of the data to be been converted return a java code byte code containing the converted data if the conversion was successful otherwise null protected Object native To Java Transfer Data transfer Data if is Supported Type transfer Data transfer Data data null return null if transfer Data data length 0 transfer Data data 0 length 0 return null return transfer Data data 0  nativeToJava nativeToJava nativeToJava transferData nativeToJava TransferData transferData isSupportedType transferData transferData transferData transferData transferData

Constructs a new instance of this class Creating an instance of a Clipboard may cause system resources to be allocated depending on the platform It is therefore mandatory that the Clipboard instance be disposed when no longer required param display the display on which to allocate the clipboard exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see Clipboard dispose see Clipboard check Subclass public Clipboard Display display check Subclass if display null display Display get Current if display null display Display get Default if display get Thread Thread current Thread DND error SWT ERROR THREAD INVALID ACCESS this display display  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass checkSubclass getCurrent getDefault getThread currentThread ERROR_THREAD_INVALID_ACCESS
Checks that this class can be subclassed p The SWT class library is intended to be subclassed only at specific controlled points This method enforces this rule unless it is overridden p p em IMPORTANT em By providing an implementation of this method that allows a subclass of a class which does not normally allow subclassing to be created the implementer agrees to be fully responsible for the fact that any such subclass will likely fail between SWT releases and will be strongly platform specific No support is provided for user written classes which are implemented in this fashion p p The ability to subclass outside of the allowed SWT classes is intended purely to enable those not on the SWT development team to implement patches in order to get around specific limitations in advance of when those limitations can be addressed by the team Subclassing should not be attempted without an intimate and detailed understanding of the hierarchy p exception SWT Exception ul li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul protected void check Subclass String name get Class get Name String valid Name Clipboard class get Name if valid Name equals name DND error SWT ERROR INVALID SUBCLASS  SWTException ERROR_INVALID_SUBCLASS checkSubclass getClass getName validName getName validName ERROR_INVALID_SUBCLASS
Throws an code SWT Exception code if the receiver can not be accessed by the caller This may include both checks on the state of the receiver and more generally on the entire execution context This method em should em be called by widget implementors to enforce the standard SWT invariants p Currently it is an error to invoke any method other than code is Disposed code on a widget that has had its code dispose code method called It is also an error to call widget methods from any thread that is different from the thread that created the widget p p In future releases of SWT there may be more or fewer error checks and exceptions may be thrown for different reasons 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 protected void check Widget Display display this display if display null DND error SWT ERROR WIDGET DISPOSED if display get Thread Thread current Thread DND error SWT ERROR THREAD INVALID ACCESS if display is Disposed DND error SWT ERROR WIDGET DISPOSED  SWTException isDisposed SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget ERROR_WIDGET_DISPOSED getThread currentThread ERROR_THREAD_INVALID_ACCESS isDisposed ERROR_WIDGET_DISPOSED
Disposes of the operating system resources associated with the clipboard The data will still be available on the system clipboard after the dispose method is called p NOTE On some platforms the data will not be available once the application has exited or the display has been disposed p exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul public void dispose if is Disposed return if display get Thread Thread current Thread DND error SWT ERROR THREAD INVALID ACCESS display null  SWTException ERROR_THREAD_INVALID_ACCESS isDisposed getThread currentThread ERROR_THREAD_INVALID_ACCESS
Retrieve the data of the specified type currently available on the system clipboard Refer to the specific subclass of code Tramsfer code to determine the type of object returned p The following snippet shows text and RTF text being retrieved from the clipboard p code pre Clipboard clipboard new Clipboard display Text Transfer text Transfer Text Transfer get Instance String text Data String clipboard get Contents text Transfer if text Data null System out println Text is text Data RTF Transfer rtf Transfer RTF Transfer get Instance String rtf Data String clipboard get Contents rtf Transfer if rtf Data null System out println RTF Text is rtf Data clipboard dispose code pre see Transfer param transfer the transfer agent for the type of data being requested return the data obtained from the clipboard or null if no data of this type is available 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if transfer is null li ul public Object get Contents Transfer transfer check Widget if transfer null DND error SWT ERROR NULL ARGUMENT int scrap new int 1 if OS Get Current Scrap scrap OS no Err return null int type Ids transfer get Type Ids int size new int 1 get data from system clipboard for int i 0 i type Ids length i int type type Ids i size 0 0 if OS Get Scrap Flavor Size scrap 0 type size OS no Err size 0 0 byte buffer new byte size 0 if OS Get Scrap Flavor Data scrap 0 type size buffer OS no Err Transfer Data tdata new Transfer Data tdata type type tdata data new byte 1 tdata data 0 buffer return transfer native To Java tdata return null No data available for this transfer  TextTransfer textTransfer TextTransfer getInstance textData getContents textTransfer textData textData RTFTransfer rtfTransfer RTFTransfer getInstance rtfData getContents rtfTransfer rtfData rtfData SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT getContents checkWidget ERROR_NULL_ARGUMENT GetCurrentScrap noErr typeIds getTypeIds typeIds typeIds GetScrapFlavorSize noErr GetScrapFlavorData noErr TransferData TransferData nativeToJava
Returns code true code if the clipboard has been disposed and code false code otherwise p This method gets the dispose state for the clipboard When a clipboard has been disposed it is an error to invoke any other method using the clipboard p return code true code when the widget is disposed and code false code otherwise since 3 0 public boolean is Disposed return display null  isDisposed
Place data of the specified type on the system clipboard More than one type of data can be placed on the system clipboard at the same time Setting the data clears any previous data of the same type from the system clipboard and also clears data of any other type currently on the system clipboard p NOTE On some platforms the data is immediately copied to the system clipboard but on other platforms it is provided upon request As a result if the application modifes the data object it has set on the clipboard that modification may or may not be available when the data is subsequently requested p p The following snippet shows text and RTF text being set on the clipboard p code pre Clipboard clipboard new Clipboard display String text Data Hello World String rtf Data rtf1 b i Hello World Text Transfer text Transfer Text Transfer get Instance RTF Transfer rtf Transfer RTF Transfer get Instance clipboard set Contents new Object text Data rtf Data new Transfer text Transfer rtf Transfer clipboard dispose code pre param data the data to be set in the clipboard param data Types the transfer agents that will convert the data to its platform specific format each entry in the data array must have a corresponding data Type exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if data is null or datatypes is null or the length of data is not the same as the length of data Types li ul exception SWT Error 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 li ERROR CANNOT SET CLIPBOARD if the clipboard is locked or otherwise unavailable li ul public void set Contents Object data Transfer data Types check Widget if data null data Types null data length data Types length DND error SWT ERROR INVALID ARGUMENT if OS Clear Current Scrap OS no Err DND error DND ERROR CANNOT SET CLIPBOARD int scrap new int 1 if OS Get Current Scrap scrap OS no Err DND error DND ERROR CANNOT SET CLIPBOARD copy data directly over to System clipboard not deferred for int i 0 i data Types length i int type Ids data Types i get Type Ids for int j 0 j type Ids length j Transfer Data transfer Data new Transfer Data transfer Data type type Ids j data Types i java To Native data i transfer Data if transfer Data result OS no Err DND error DND ERROR CANNOT SET CLIPBOARD Drag and Drop can handle multiple items in one transfer but the Clipboard can not byte datum transfer Data data 0 if OS Put Scrap Flavor scrap 0 transfer Data type 0 datum length datum OS no Err DND error DND ERROR CANNOT SET CLIPBOARD  textData rtfData TextTransfer textTransfer TextTransfer getInstance RTFTransfer rtfTransfer RTFTransfer getInstance setContents textData rtfData textTransfer rtfTransfer dataTypes dataType IllegalArgumentException ERROR_INVALID_ARGUMENT dataTypes SWTError ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_CANNOT_SET_CLIPBOARD setContents dataTypes checkWidget dataTypes dataTypes ERROR_INVALID_ARGUMENT ClearCurrentScrap noErr ERROR_CANNOT_SET_CLIPBOARD GetCurrentScrap noErr ERROR_CANNOT_SET_CLIPBOARD dataTypes typeIds dataTypes getTypeIds typeIds TransferData transferData TransferData transferData typeIds dataTypes javaToNative transferData transferData noErr ERROR_CANNOT_SET_CLIPBOARD transferData PutScrapFlavor transferData noErr ERROR_CANNOT_SET_CLIPBOARD
Returns an array of the data types currently available on the system clipboard Use with Transfer is Supported Type return array of Transfer Data 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 Transfer is Supported Type since 3 0 public Transfer Data get Available Types check Widget int types  getAvailableTypes Transfer Data result new Transfer Data types length for int i 0 i types length i result i new Transfer Data result i type types i return result  isSupportedType TransferData SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS isSupportedType TransferData getAvailableTypes checkWidget _getAvailableTypes TransferData TransferData TransferData
Returns a platform specific list of the data types currently available on the system clipboard p Note code get Available Type Names code is a utility for writing a Transfer sub class It should NOT be used within an application because it provides platform specific information p return a platform specific list of the data types currently available on the system clipboard 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 String get Available Type Names check Widget int types  getAvailableTypes String names new String types length for int i 0 i types length i int type types i String Buffer sb new String Buffer sb append char type 0xff000000 24 sb append char type 0x00ff0000 16 sb append char type 0x0000ff00 8 sb append char type 0x000000ff 0 names i sb to String return names  getAvailableTypeNames SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getAvailableTypeNames checkWidget _getAvailableTypes StringBuffer StringBuffer toString
private int  getAvailableTypes int types new int 0 int scrap new int 1 if OS Get Current Scrap scrap OS no Err return types int count new int 1 if OS Get Scrap Flavor Count scrap 0 count OS no Err count 0 0 return types int info new int count 0 2 if OS Get Scrap Flavor Info List scrap 0 count info OS no Err return types types new int count 0 for int i 0 i count 0 i types i info i 2 return types  _getAvailableTypes GetCurrentScrap noErr GetScrapFlavorCount noErr GetScrapFlavorInfoList noErr

control Listener new Listener public void handle Event Event event if event type SWT Dispose if Drag Source this is Disposed Drag Source this dispose if event type SWT Drag Detect if Drag Source this is Disposed Drag Source this drag event  controlListener handleEvent DragSource isDisposed DragSource DragDetect DragSource isDisposed DragSource
this add Listener SWT Dispose new Listener public void handle Event Event e on Dispose  addListener handleEvent onDispose
Creates a new code Drag Source code to handle dragging from the specified code Control code Creating an instance of a Drag Source may cause system resources to be allocated depending on the platform It is therefore mandatory that the Drag Source instance be disposed when no longer required param control the code Control code that the user clicks on to initiate the drag param style the bitwise OR ing of allowed operations this may be a combination of any of DND DROP NONE DND DROP COPY DND DROP MOVE DND DROP LINK exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li exception SWT Error ul li ERROR CANNOT INIT DRAG unable to initiate drag source this will occur if more than one drag source is created for a control or if the operating system will not allow the creation of the drag source li ul see Drag Source dispose see Drag Source check Subclass see DND DROP NONE see DND DROP COPY see DND DROP MOVE see DND DROP LINK public Drag Source Control control int style super control check Style style this control control if control get Data DRAGSOURCEID null DND error DND ERROR CANNOT INIT DRAG control set Data DRAGSOURCEID this control Listener new Listener public void handle Event Event event if event type SWT Dispose if Drag Source this is Disposed Drag Source this dispose if event type SWT Drag Detect if Drag Source this is Disposed Drag Source this drag event control add Listener SWT Dispose control Listener control add Listener SWT Drag Detect control Listener this add Listener SWT Dispose new Listener public void handle Event Event e on Dispose  DragSource DragSource DragSource DROP_NONE DROP_COPY DROP_MOVE DROP_LINK SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS SWTError ERROR_CANNOT_INIT_DRAG DragSource DragSource checkSubclass DROP_NONE DROP_COPY DROP_MOVE DROP_LINK DragSource checkStyle getData ERROR_CANNOT_INIT_DRAG setData controlListener handleEvent DragSource isDisposed DragSource DragDetect DragSource isDisposed DragSource addListener controlListener addListener DragDetect controlListener addListener handleEvent onDispose
static int check Style int style if style SWT NONE return DND DROP MOVE return style  checkStyle DROP_MOVE
Adds the listener to the collection of listeners who will be notified when a drag and drop operation is in progress by sending it one of the messages defined in the code Drag Source Listener code interface p ul li code drag Start code is called when the user has begun the actions required to drag the widget This event gives the application the chance to decide if a drag should be started li code drag Set Data code is called when the data is required from the drag source li code drag Finished code is called when the drop has successfully completed mouse up over a valid target or has been terminated such as hitting the ESC key Perform cleanup such as removing data from the source side on a successful move operation ul p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Drag Source Listener see remove Drag Listener see Drag Source Event public void add Drag Listener Drag Source Listener listener if listener null DND error SWT ERROR NULL ARGUMENT DND Listener typed Listener new DND Listener listener add Listener DND Drag Start typed Listener add Listener DND Drag Set Data typed Listener add Listener DND Drag End typed Listener  DragSourceListener dragStart dragSetData dragFinished IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS DragSourceListener removeDragListener DragSourceEvent addDragListener DragSourceListener ERROR_NULL_ARGUMENT DNDListener typedListener DNDListener addListener DragStart typedListener addListener DragSetData typedListener addListener DragEnd typedListener
protected void check Subclass String name get Class get Name String valid Name Drag Source class get Name if valid Name equals name DND error SWT ERROR INVALID SUBCLASS  checkSubclass getClass getName validName DragSource getName validName ERROR_INVALID_SUBCLASS
private void drag Event drag Event DND Event event new DND Event event widget this event time drag Event time event doit true try notify Listeners DND Drag Start event catch Throwable e return if event doit transfer Agents null transfer Agents length 0 return int the Drag new int 1 if OS New Drag the Drag OS no Err event new DND Event event widget this event time int System current Time Millis event doit false event detail DND DROP NONE try notify Listeners DND Drag End event catch Throwable e return Point pt new Point OS Get Global Mouse pt Event Record the Event new Event Record the Event message OS k Event Mouse Moved the Event modifiers short OS Get Current Event Key Modifiers the Event what short OS os Evt the Event where h short pt h the Event where v short pt v Immediately get data for transfer On other platforms we wait until the data is requested but on the mac particularly in the case of files we need to know how many items are being transferred when registering The only way to know this is to get the data int index 0 for int i 0 i transfer Agents length i int types transfer Agents i get Type Ids for int j 0 j types length j Transfer Data transfer Data new Transfer Data transfer Data type types j event new DND Event event widget this event time int System current Time Millis event data Type transfer Data try notify Listeners DND Drag Set Data event catch Throwable e continue if event data null continue transfer Agents i java To Native event data transfer Data if transfer Data result OS no Err transfer Data data null continue for int k 0 k transfer Data data length k byte data transfer Data data k OS Add Drag Item Flavor the Drag 0 index types j data data length 0 if index 0 OS Dispose Drag the Drag 0 event new DND Event event widget this event time int System current Time Millis event doit false event detail DND DROP NONE try notify Listeners DND Drag End event catch Throwable e return int the Region OS New Rgn OS Set Rect Rgn the Region short pt h 10 short pt v 10 short pt h 10 short pt v 10 int operations op To Os Op get Style set operations twice local and not local OS Set Drag Allowable Actions the Drag 0 operations true until the interaction with Finder is understood only allow data to be transferred internally OS Set Drag Allowable Actions the Drag 0 OS k Drag Action Nothing false int result OS Track Drag the Drag 0 the Event the Region int operation DND DROP NONE if result OS no Err int out Action new int 1 OS Get Drag Drop Action the Drag 0 out Action operation os Op To Op out Action 0 event new DND Event event widget this event time int System current Time Millis event doit result OS no Err event detail operation try notify Listeners DND Drag End event catch Throwable e OS Dispose Rgn the Region OS Dispose Drag the Drag 0  dragEvent DNDEvent DNDEvent dragEvent notifyListeners DragStart transferAgents transferAgents theDrag NewDrag theDrag noErr DNDEvent currentTimeMillis DROP_NONE notifyListeners DragEnd GetGlobalMouse EventRecord theEvent EventRecord theEvent kEventMouseMoved theEvent GetCurrentEventKeyModifiers theEvent osEvt theEvent where_h theEvent where_v transferAgents transferAgents getTypeIds TransferData transferData TransferData transferData DNDEvent currentTimeMillis dataType transferData notifyListeners DragSetData transferAgents javaToNative transferData transferData noErr transferData transferData transferData AddDragItemFlavor theDrag DisposeDrag theDrag DNDEvent currentTimeMillis DROP_NONE notifyListeners DragEnd theRegion NewRgn SetRectRgn theRegion opToOsOp getStyle SetDragAllowableActions theDrag SetDragAllowableActions theDrag kDragActionNothing TrackDrag theDrag theEvent theRegion DROP_NONE noErr outAction GetDragDropAction theDrag outAction osOpToOp outAction DNDEvent currentTimeMillis noErr notifyListeners DragEnd DisposeRgn theRegion DisposeDrag theDrag
Returns the Control which is registered for this Drag Source This is the control that the user clicks in to initiate dragging return the Control which is registered for this Drag Source public Control get Control return control  DragSource DragSource getControl
Returns the list of data types that can be transferred by this Drag Source return the list of data types that can be transferred by this Drag Source public Transfer get Transfer return transfer Agents  DragSource DragSource getTransfer transferAgents
private void on Dispose if control null return if control Listener null control remove Listener SWT Dispose control Listener control remove Listener SWT Drag Detect control Listener control Listener null control set Data DRAGSOURCEID null control null transfer Agents null  onDispose controlListener removeListener controlListener removeListener DragDetect controlListener controlListener setData transferAgents
private int op To Os Op int operation int os Operation 0 if operation DND DROP COPY 0 os Operation OS k Drag Action Copy if operation DND DROP LINK 0 os Operation OS k Drag Action Alias if operation DND DROP MOVE 0 os Operation OS k Drag Action Move if operation DND DROP TARGET MOVE 0 os Operation OS k Drag Action Delete return os Operation  opToOsOp osOperation DROP_COPY osOperation kDragActionCopy DROP_LINK osOperation kDragActionAlias DROP_MOVE osOperation kDragActionMove DROP_TARGET_MOVE osOperation kDragActionDelete osOperation
private int os Op To Op int os Operation int operation 0 if os Operation OS k Drag Action Copy 0 operation DND DROP COPY if os Operation OS k Drag Action Alias 0 operation DND DROP LINK if os Operation OS k Drag Action Delete 0 operation DND DROP TARGET MOVE if os Operation OS k Drag Action Move 0 operation DND DROP MOVE if os Operation OS k Drag Action All operation DND DROP COPY DND DROP MOVE DND DROP LINK return operation  osOpToOp osOperation osOperation kDragActionCopy DROP_COPY osOperation kDragActionAlias DROP_LINK osOperation kDragActionDelete DROP_TARGET_MOVE osOperation kDragActionMove DROP_MOVE osOperation kDragActionAll DROP_COPY DROP_MOVE DROP_LINK
Removes the listener from the collection of listeners who will be notified when a drag and drop operation is in progress param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Drag Source Listener see add Drag Listener public void remove Drag Listener Drag Source Listener listener if listener null DND error SWT ERROR NULL ARGUMENT remove Listener DND Drag Start listener remove Listener DND Drag Set Data listener remove Listener DND Drag End listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS DragSourceListener addDragListener removeDragListener DragSourceListener ERROR_NULL_ARGUMENT removeListener DragStart removeListener DragSetData removeListener DragEnd
Specifies the list of data types that can be transferred by this Drag Source The application must be able to provide data to match each of these types when a successful drop has occurred param transfer Agents a list of Transfer objects which define the types of data that can be dragged from this source public void set Transfer Transfer transfer Agents this transfer Agents transfer Agents  DragSource transferAgents setTransfer transferAgents transferAgents transferAgents

control Listener new Listener public void handle Event Event event if Drop Target this is Disposed Drop Target this dispose  controlListener handleEvent DropTarget isDisposed DropTarget
this add Listener SWT Dispose new Listener public void handle Event Event event on Dispose  addListener handleEvent onDispose
drag Over Heartbeat new Runnable public void run if Drop Target this control is Disposed drag Over Start 0 return long time System current Time Millis int delay DRAGOVER HYSTERESIS if time drag Over Start delay int drag Over Start time else int allowed Operations drag Over Event operations Transfer Data allowed Types drag Over Event data Types pass a copy of data types in to listeners in case application modifies it Transfer Data data Types new Transfer Data allowed Types length System arraycopy allowed Types 0 data Types 0 data Types length DND Event event new DND Event event widget drag Over Event widget event x drag Over Event x event y drag Over Event y event time int time event feedback DND FEEDBACK SELECT event data Types data Types event data Type selected Data Type event operations drag Over Event operations event detail selected Operation try notify Listeners DND Drag Over event catch Throwable e event data Type null event detail DND DROP NONE effect show event feedback event x event y selected Data Type null if event data Type null for int i 0 i allowed Types length i if allowed Types i type event data Type type selected Data Type event data Type break selected Operation DND DROP NONE if selected Data Type null event detail allowed Operations 0 selected Operation event detail Drop Target this control get Display timer Exec delay drag Over Heartbeat  dragOverHeartbeat DropTarget isDisposed dragOverStart currentTimeMillis DRAGOVER_HYSTERESIS dragOverStart dragOverStart allowedOperations dragOverEvent TransferData allowedTypes dragOverEvent dataTypes TransferData dataTypes TransferData allowedTypes allowedTypes dataTypes dataTypes DNDEvent DNDEvent dragOverEvent dragOverEvent dragOverEvent FEEDBACK_SELECT dataTypes dataTypes dataType selectedDataType dragOverEvent selectedOperation notifyListeners DragOver dataType DROP_NONE selectedDataType dataType allowedTypes allowedTypes dataType selectedDataType dataType selectedOperation DROP_NONE selectedDataType allowedOperations selectedOperation DropTarget getDisplay timerExec dragOverHeartbeat
Creates a new code Drop Target code to allow data to be dropped on the specified code Control code Creating an instance of a Drop Target may cause system resources to be allocated depending on the platform It is therefore mandatory that the Drop Target instance be disposed when no longer required param control the code Control code over which the user positions the cursor to drop the data param style the bitwise OR ing of allowed operations this may be a combination of any of DND DROP NONE DND DROP COPY DND DROP MOVE DND DROP LINK exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li exception SWT Error ul li ERROR CANNOT INIT DROP unable to initiate drop target this will occur if more than one drop target is created for a control or if the operating system will not allow the creation of the drop target li ul see Drop Target dispose see Drop Target check Subclass see DND DROP NONE see DND DROP COPY see DND DROP MOVE see DND DROP LINK public Drop Target Control control int style super control check Style style this control control if Drag Tracking Handler null Drag Tracking Handler null DND error DND ERROR CANNOT INIT DROP if control get Data DROPTARGETID null DND error DND ERROR CANNOT INIT DROP control set Data DROPTARGETID this control Listener new Listener public void handle Event Event event if Drop Target this is Disposed Drop Target this dispose control add Listener SWT Dispose control Listener this add Listener SWT Dispose new Listener public void handle Event Event event on Dispose Drag under effect if control instanceof Tree effect new Tree Drag Under Effect Tree control else if control instanceof Table effect new Table Drag Under Effect Table control else effect new No Drag Under Effect control drag Over Heartbeat new Runnable public void run if Drop Target this control is Disposed drag Over Start 0 return long time System current Time Millis int delay DRAGOVER HYSTERESIS if time drag Over Start delay int drag Over Start time else int allowed Operations drag Over Event operations Transfer Data allowed Types drag Over Event data Types pass a copy of data types in to listeners in case application modifies it Transfer Data data Types new Transfer Data allowed Types length System arraycopy allowed Types 0 data Types 0 data Types length DND Event event new DND Event event widget drag Over Event widget event x drag Over Event x event y drag Over Event y event time int time event feedback DND FEEDBACK SELECT event data Types data Types event data Type selected Data Type event operations drag Over Event operations event detail selected Operation try notify Listeners DND Drag Over event catch Throwable e event data Type null event detail DND DROP NONE effect show event feedback event x event y selected Data Type null if event data Type null for int i 0 i allowed Types length i if allowed Types i type event data Type type selected Data Type event data Type break selected Operation DND DROP NONE if selected Data Type null event detail allowed Operations 0 selected Operation event detail Drop Target this control get Display timer Exec delay drag Over Heartbeat  DropTarget DropTarget DropTarget DROP_NONE DROP_COPY DROP_MOVE DROP_LINK SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS SWTError ERROR_CANNOT_INIT_DROP DropTarget DropTarget checkSubclass DROP_NONE DROP_COPY DROP_MOVE DROP_LINK DropTarget checkStyle DragTrackingHandler DragTrackingHandler ERROR_CANNOT_INIT_DROP getData ERROR_CANNOT_INIT_DROP setData controlListener handleEvent DropTarget isDisposed DropTarget addListener controlListener addListener handleEvent onDispose TreeDragUnderEffect TableDragUnderEffect NoDragUnderEffect dragOverHeartbeat DropTarget isDisposed dragOverStart currentTimeMillis DRAGOVER_HYSTERESIS dragOverStart dragOverStart allowedOperations dragOverEvent TransferData allowedTypes dragOverEvent dataTypes TransferData dataTypes TransferData allowedTypes allowedTypes dataTypes dataTypes DNDEvent DNDEvent dragOverEvent dragOverEvent dragOverEvent FEEDBACK_SELECT dataTypes dataTypes dataType selectedDataType dragOverEvent selectedOperation notifyListeners DragOver dataType DROP_NONE selectedDataType dataType allowedTypes allowedTypes dataType selectedDataType dataType selectedOperation DROP_NONE selectedDataType allowedOperations selectedOperation DropTarget getDisplay timerExec dragOverHeartbeat
static int check Style int style if style SWT NONE return DND DROP MOVE return style  checkStyle DROP_MOVE
private static int Drag Receive Handler int the Window int handler Ref Con int the Drag Drop Target target Find Drop Target the Window the Drag if target null return OS no Err return target drag Receive Handler the Window handler Ref Con the Drag  DragReceiveHandler theWindow handlerRefCon theDrag DropTarget FindDropTarget theWindow theDrag noErr dragReceiveHandler theWindow handlerRefCon theDrag
private static int Drag Tracking Handler int message int the Window int handler Ref Con int the Drag if message OS k Drag Tracking Leave Handler message OS k Drag Tracking Enter Handler Current Drop Target null return OS no Err Drop Target target Find Drop Target the Window the Drag if Current Drop Target null if target null Current Drop Target control handle target control handle Current Drop Target drag Tracking Handler OS k Drag Tracking Leave Window the Window handler Ref Con the Drag Current Drop Target target message OS k Drag Tracking Enter Window else Current Drop Target target message OS k Drag Tracking Enter Window if target null return OS no Err return target drag Tracking Handler message the Window handler Ref Con the Drag  DragTrackingHandler theWindow handlerRefCon theDrag kDragTrackingLeaveHandler kDragTrackingEnterHandler CurrentDropTarget noErr DropTarget FindDropTarget theWindow theDrag CurrentDropTarget CurrentDropTarget CurrentDropTarget dragTrackingHandler kDragTrackingLeaveWindow theWindow handlerRefCon theDrag CurrentDropTarget kDragTrackingEnterWindow CurrentDropTarget kDragTrackingEnterWindow noErr dragTrackingHandler theWindow handlerRefCon theDrag
private static Drop Target Find Drop Target int the Window int the Drag Display display Display find Display Thread current Thread if display null display is Disposed return null Point mouse new Point OS Get Drag Mouse the Drag mouse null int the Root new int 1 OS Get Root Control the Window the Root int the Control new int 1 Rect rect new Rect OS Get Window Bounds the Window short OS k Window Content Rgn rect CG Point in Point new CG Point in Point x mouse h rect left in Point y mouse v rect top OS HI View Get Subview Hit the Root 0 in Point true the Control if OS Is Control Enabled the Control 0 return null Widget widget display find Widget the Control 0 if widget null return null return Drop Target widget get Data DROPTARGETID  DropTarget FindDropTarget theWindow theDrag findDisplay currentThread isDisposed GetDragMouse theDrag theRoot GetRootControl theWindow theRoot theControl GetWindowBounds theWindow kWindowContentRgn CGPoint inPoint CGPoint inPoint inPoint HIViewGetSubviewHit theRoot inPoint theControl IsControlEnabled theControl findWidget theControl DropTarget getData
Adds the listener to the collection of listeners who will be notified when a drag and drop operation is in progress by sending it one of the messages defined in the code Drop Target Listener code interface p ul li code drag Enter code is called when the cursor has entered the drop target boundaries li code drag Leave code is called when the cursor has left the drop target boundaries and just before the drop occurs or is cancelled li code drag Operation Changed code is called when the operation being performed has changed usually due to the user changing the selected modifier key s while dragging li code drag Over code is called when the cursor is moving over the drop target li code drop Accept code is called just before the drop is performed The drop target is given the chance to change the nature of the drop or veto the drop by setting the code event detail code field li code drop code is called when the data is being dropped ul p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Drop Target Listener see remove Drop Listener see Drop Target Event public void add Drop Listener Drop Target Listener listener if listener null DND error SWT ERROR NULL ARGUMENT DND Listener typed Listener new DND Listener listener add Listener DND Drag Enter typed Listener add Listener DND Drag Leave typed Listener add Listener DND Drag Over typed Listener add Listener DND Drag Operation Changed typed Listener add Listener DND Drop typed Listener add Listener DND Drop Accept typed Listener  DropTargetListener dragEnter dragLeave dragOperationChanged dragOver dropAccept IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS DropTargetListener removeDropListener DropTargetEvent addDropListener DropTargetListener ERROR_NULL_ARGUMENT DNDListener typedListener DNDListener addListener DragEnter typedListener addListener DragLeave typedListener addListener DragOver typedListener addListener DragOperationChanged typedListener addListener typedListener addListener DropAccept typedListener
protected void check Subclass String name get Class get Name String valid Name Drop Target class get Name if valid Name equals name DND error SWT ERROR INVALID SUBCLASS  checkSubclass getClass getName validName DropTarget getName validName ERROR_INVALID_SUBCLASS
private int drag Receive Handler int the Window int handler Ref Con int the Drag update Drag Over Hover 0 null effect show DND FEEDBACK NONE 0 0 if key Operation 1 return OS drag Not Accepted Err DND Event event new DND Event event widget this event time int System current Time Millis event detail DND DROP NONE try notify Listeners DND Drag Leave event catch Throwable e event new DND Event if set Event Data the Drag event return OS drag Not Accepted Err key Operation 1 int allowed Operations event operations Transfer Data allowed Data Types new Transfer Data event data Types length System arraycopy event data Types 0 allowed Data Types 0 event data Types length event data Type selected Data Type event detail selected Operation try notify Listeners DND Drop Accept event catch Throwable e event detail DND DROP NONE event data Type null selected Data Type null if event data Type null for int i 0 i allowed Data Types length i if allowed Data Types i type event data Type type selected Data Type allowed Data Types i break selected Operation DND DROP NONE if selected Data Type null event detail allowed Operations 0 selected Operation event detail if selected Operation DND DROP NONE this was not a successful drop return OS drag Not Accepted Err ask drag source for dropped data byte data data new byte 0 locate all the items with data of the desired type short num Items new short 1 OS Count Drag Items the Drag num Items for short i 0 i num Items 0 i int the Item Ref new int 1 OS Get Drag Item Reference Number the Drag short i 1 the Item Ref int size new int 1 OS Get Flavor Data Size the Drag the Item Ref 0 selected Data Type type size if size 0 0 byte buffer new byte size 0 OS Get Flavor Data the Drag the Item Ref 0 selected Data Type type buffer size 0 byte new Data new byte data length 1 System arraycopy data 0 new Data 0 data length new Data data length buffer data new Data Get Data in a Java format Object object null for int i 0 i transfer Agents length i Transfer transfer transfer Agents i if transfer is Supported Type selected Data Type selected Data Type data data object transfer native To Java selected Data Type break if object null selected Operation DND DROP NONE event data Type selected Data Type event detail selected Operation event data object try notify Listeners DND Drop event selected Operation DND DROP NONE if allowed Operations event detail event detail selected Operation event detail catch Throwable e selected Operation DND DROP NONE notify source of action taken int action op To Os Op selected Operation OS Set Drag Drop Action the Drag action return selected Operation DND DROP NONE OS drag Not Accepted Err OS no Err  dragReceiveHandler theWindow handlerRefCon theDrag updateDragOverHover FEEDBACK_NONE keyOperation dragNotAcceptedErr DNDEvent DNDEvent currentTimeMillis DROP_NONE notifyListeners DragLeave DNDEvent setEventData theDrag dragNotAcceptedErr keyOperation allowedOperations TransferData allowedDataTypes TransferData dataTypes dataTypes allowedDataTypes dataTypes dataType selectedDataType selectedOperation notifyListeners DropAccept DROP_NONE dataType selectedDataType dataType allowedDataTypes allowedDataTypes dataType selectedDataType allowedDataTypes selectedOperation DROP_NONE selectedDataType allowedOperations selectedOperation selectedOperation DROP_NONE dragNotAcceptedErr numItems CountDragItems theDrag numItems numItems theItemRef GetDragItemReferenceNumber theDrag theItemRef GetFlavorDataSize theDrag theItemRef selectedDataType GetFlavorData theDrag theItemRef selectedDataType newData newData newData newData transferAgents transferAgents isSupportedType selectedDataType selectedDataType nativeToJava selectedDataType selectedOperation DROP_NONE dataType selectedDataType selectedOperation notifyListeners selectedOperation DROP_NONE allowedOperations selectedOperation selectedOperation DROP_NONE opToOsOp selectedOperation SetDragDropAction theDrag selectedOperation DROP_NONE dragNotAcceptedErr noErr
private int drag Tracking Handler int message int the Window int handler Ref Con int the Drag if message OS k Drag Tracking Leave Window update Drag Over Hover 0 null effect show DND FEEDBACK NONE 0 0 OS Set Theme Cursor OS k Theme Arrow Cursor if key Operation 1 return OS drag Not Accepted Err key Operation 1 DND Event event new DND Event event widget this event time int System current Time Millis event detail DND DROP NONE try notify Listeners DND Drag Leave event catch Throwable e return OS no Err int old Key Operation key Operation if message OS k Drag Tracking Enter Window selected Data Type null selected Operation 0 DND Event event new DND Event if set Event Data the Drag event key Operation 1 OS Set Theme Cursor OS k Theme Not Allowed Cursor return OS drag Not Accepted Err int allowed Operations event operations Transfer Data allowed Data Types new Transfer Data event data Types length System arraycopy event data Types 0 allowed Data Types 0 allowed Data Types length switch message case OS k Drag Tracking Enter Window event type DND Drag Enter break case OS k Drag Tracking In Window if key Operation old Key Operation event type DND Drag Over event data Type selected Data Type event detail selected Operation else event type DND Drag Operation Changed event data Type selected Data Type break update Drag Over Hover DRAGOVER HYSTERESIS event try notify Listeners event type event catch Throwable e OS Set Theme Cursor OS k Theme Not Allowed Cursor return OS drag Not Accepted Err if event detail DND DROP DEFAULT event detail allowed Operations DND DROP MOVE 0 DND DROP MOVE DND DROP NONE selected Data Type null if event data Type null for int i 0 i allowed Data Types length i if allowed Data Types i type event data Type type selected Data Type allowed Data Types i break selected Operation DND DROP NONE if selected Data Type null allowed Operations event detail 0 selected Operation event detail OS Set Drag Drop Action the Drag op To Os Op selected Operation effect show event feedback event x event y switch selected Operation case DND DROP COPY OS Set Theme Cursor OS k Theme Copy Arrow Cursor break case DND DROP LINK OS Set Theme Cursor OS k Theme Alias Arrow Cursor break case DND DROP MOVE OS Set Theme Cursor OS k Theme Arrow Cursor break default OS Set Theme Cursor OS k Theme Not Allowed Cursor if message OS k Drag Tracking Enter Window drag Over Heartbeat run return OS no Err  dragTrackingHandler theWindow handlerRefCon theDrag kDragTrackingLeaveWindow updateDragOverHover FEEDBACK_NONE SetThemeCursor kThemeArrowCursor keyOperation dragNotAcceptedErr keyOperation DNDEvent DNDEvent currentTimeMillis DROP_NONE notifyListeners DragLeave noErr oldKeyOperation keyOperation kDragTrackingEnterWindow selectedDataType selectedOperation DNDEvent DNDEvent setEventData theDrag keyOperation SetThemeCursor kThemeNotAllowedCursor dragNotAcceptedErr allowedOperations TransferData allowedDataTypes TransferData dataTypes dataTypes allowedDataTypes allowedDataTypes kDragTrackingEnterWindow DragEnter kDragTrackingInWindow keyOperation oldKeyOperation DragOver dataType selectedDataType selectedOperation DragOperationChanged dataType selectedDataType updateDragOverHover DRAGOVER_HYSTERESIS notifyListeners SetThemeCursor kThemeNotAllowedCursor dragNotAcceptedErr DROP_DEFAULT allowedOperations DROP_MOVE DROP_MOVE DROP_NONE selectedDataType dataType allowedDataTypes allowedDataTypes dataType selectedDataType allowedDataTypes selectedOperation DROP_NONE selectedDataType allowedOperations selectedOperation SetDragDropAction theDrag opToOsOp selectedOperation selectedOperation DROP_COPY SetThemeCursor kThemeCopyArrowCursor DROP_LINK SetThemeCursor kThemeAliasArrowCursor DROP_MOVE SetThemeCursor kThemeArrowCursor SetThemeCursor kThemeNotAllowedCursor kDragTrackingEnterWindow dragOverHeartbeat noErr
Returns the Control which is registered for this Drop Target This is the control over which the user positions the cursor to drop the data return the Control which is registered for this Drop Target public Control get Control return control  DropTarget DropTarget getControl
private int get Operation From Key State int the Drag short modifiers new short 1 OS Get Drag Modifiers the Drag modifiers null null boolean option modifiers 0 OS option Key OS option Key boolean command modifiers 0 OS cmd Key OS cmd Key if option command return DND DROP LINK if option return DND DROP COPY if command return DND DROP MOVE return DND DROP DEFAULT  getOperationFromKeyState theDrag GetDragModifiers theDrag optionKey optionKey cmdKey cmdKey DROP_LINK DROP_COPY DROP_MOVE DROP_DEFAULT
Returns a list of the data types that can be transferred to this Drop Target return a list of the data types that can be transferred to this Drop Target public Transfer get Transfer return transfer Agents  DropTarget DropTarget getTransfer transferAgents
public void notify Listeners int event Type Event event org eclipse swt graphics Point coordinates new org eclipse swt graphics Point event x event y coordinates control to Control coordinates if this control instanceof Tree event item Tree control get Item coordinates if this control instanceof Table event item Table control get Item coordinates super notify Listeners event Type event  notifyListeners eventType toControl getItem getItem notifyListeners eventType
private void on Dispose if control null return if control Listener null control remove Listener SWT Dispose control Listener control Listener null control set Data DROPTARGETID null transfer Agents null control null  onDispose controlListener removeListener controlListener controlListener setData transferAgents
private int op To Os Op int operation int os Operation 0 if operation DND DROP COPY 0 os Operation OS k Drag Action Copy if operation DND DROP LINK 0 os Operation OS k Drag Action Alias if operation DND DROP MOVE 0 os Operation OS k Drag Action Move return os Operation  opToOsOp osOperation DROP_COPY osOperation kDragActionCopy DROP_LINK osOperation kDragActionAlias DROP_MOVE osOperation kDragActionMove osOperation
private int os Op To Op int os Operation int operation 0 if os Operation OS k Drag Action Copy 0 operation DND DROP COPY if os Operation OS k Drag Action Alias 0 operation DND DROP LINK if os Operation OS k Drag Action Move 0 operation DND DROP MOVE if os Operation OS k Drag Action All operation DND DROP COPY DND DROP MOVE DND DROP LINK return operation  osOpToOp osOperation osOperation kDragActionCopy DROP_COPY osOperation kDragActionAlias DROP_LINK osOperation kDragActionMove DROP_MOVE osOperation kDragActionAll DROP_COPY DROP_MOVE DROP_LINK
Removes the listener from the collection of listeners who will be notified when a drag and drop operation is in progress param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Drop Target Listener see add Drop Listener public void remove Drop Listener Drop Target Listener listener if listener null DND error SWT ERROR NULL ARGUMENT remove Listener DND Drag Enter listener remove Listener DND Drag Leave listener remove Listener DND Drag Over listener remove Listener DND Drag Operation Changed listener remove Listener DND Drop listener remove Listener DND Drop Accept listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS DropTargetListener addDropListener removeDropListener DropTargetListener ERROR_NULL_ARGUMENT removeListener DragEnter removeListener DragLeave removeListener DragOver removeListener DragOperationChanged removeListener removeListener DropAccept
private boolean set Event Data int the Drag DND Event event if the Drag 0 return false get allowed operations int style get Style int out Actions new int 1 OS Get Drag Allowable Actions the Drag out Actions int operations os Op To Op out Actions 0 style if operations DND DROP NONE return false get current operation int operation get Operation From Key State the Drag key Operation operation if operation DND DROP DEFAULT if style DND DROP DEFAULT 0 operation operations DND DROP MOVE 0 DND DROP MOVE DND DROP NONE else if operation operations 0 operation DND DROP NONE get allowed transfer types short num Items new short 1 OS Count Drag Items the Drag num Items int flavors new int 10 int index 1 Get a unique list of flavors for short i 0 i num Items 0 i int the Item Ref new int 1 OS Get Drag Item Reference Number the Drag short i 1 the Item Ref short num Flavors new short 1 OS Count Drag Item Flavors the Drag the Item Ref 0 num Flavors int the Type new int 1 for int j 0 j num Flavors length j the Type 0 0 if OS Get Flavor Type the Drag the Item Ref 0 short j 1 the Type OS no Err boolean unique true for int k 0 k flavors length k if flavors k the Type 0 unique false break if unique if index flavors length 1 int temp new int flavors length 10 System arraycopy flavors 0 temp 0 flavors length flavors temp flavors index the Type 0 if index 1 return false Transfer Data data Types new Transfer Data index 1 index 1 for int i 0 i data Types length i if flavors i 0 Transfer Data data new Transfer Data data type flavors i for int j 0 j transfer Agents length j if transfer Agents j is Supported Type data data Types index data break if index 1 return false if index data Types length 1 Transfer Data temp new Transfer Data index 1 System arraycopy data Types 0 temp 0 index 1 data Types temp Point mouse new Point OS Get Drag Mouse the Drag mouse null event widget this event x mouse h event y mouse v event time int System current Time Millis event feedback DND FEEDBACK SELECT event data Types data Types event data Type data Types 0 event operations operations event detail operation return true  setEventData theDrag DNDEvent theDrag getStyle outActions GetDragAllowableActions theDrag outActions osOpToOp outActions DROP_NONE getOperationFromKeyState theDrag keyOperation DROP_DEFAULT DROP_DEFAULT DROP_MOVE DROP_MOVE DROP_NONE DROP_NONE numItems CountDragItems theDrag numItems numItems theItemRef GetDragItemReferenceNumber theDrag theItemRef numFlavors CountDragItemFlavors theDrag theItemRef numFlavors theType numFlavors theType GetFlavorType theDrag theItemRef theType noErr theType theType TransferData dataTypes TransferData dataTypes TransferData TransferData transferAgents transferAgents isSupportedType dataTypes dataTypes TransferData TransferData dataTypes dataTypes GetDragMouse theDrag currentTimeMillis FEEDBACK_SELECT dataTypes dataTypes dataType dataTypes
Specifies the data types that can be transferred to this Drop Target If data is being dragged that does not match one of these types the drop target will be notified of the drag and drop operation but the current Data Type will be null and the operation will be DND NONE param transfer Agents a list of Transfer objects which define the types of data that can be dropped on this target exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if transfer Agents is null li ul public void set Transfer Transfer transfer Agents if transfer Agents null DND error SWT ERROR NULL ARGUMENT this transfer Agents transfer Agents  DropTarget currentDataType transferAgents IllegalArgumentException ERROR_NULL_ARGUMENT transferAgents setTransfer transferAgents transferAgents ERROR_NULL_ARGUMENT transferAgents transferAgents
private void update Drag Over Hover long delay DND Event event if delay 0 drag Over Start 0 drag Over Event null return drag Over Start System current Time Millis delay if drag Over Event null drag Over Event new DND Event drag Over Event x event x drag Over Event y event y drag Over Event data Types event data Types drag Over Event operations event operations drag Over Event data Type event data Type drag Over Event detail event detail  updateDragOverHover DNDEvent dragOverStart dragOverEvent dragOverStart currentTimeMillis dragOverEvent dragOverEvent DNDEvent dragOverEvent dragOverEvent dragOverEvent dataTypes dataTypes dragOverEvent dragOverEvent dataType dataType dragOverEvent

private static final String URILIST SEPARATOR r private File Transfer  URILIST_SEPARATOR FileTransfer
Returns the singleton instance of the File Transfer class return the singleton instance of the File Transfer class public static File Transfer get Instance return  instance  FileTransfer FileTransfer FileTransfer getInstance _instance
This implementation of code java To Native code converts a list of file names represented by a java code String code to a platform specific representation Each code String code in the array contains the absolute path for a single file or directory For additional information see code Transfer java To Native code param object a java code String code containing the file names to be converted param transfer Data an empty code Transfer Data code object this object will be filled in on return with the platform specific format of the data public void java To Native Object object Transfer Data transfer Data transfer Data result 1 if object null object instanceof String is Supported Type transfer Data return String files String object if files length 0 return if transfer Data type URILISTID create a string separated by new lines to represent list of files String Buffer sb new String Buffer for int i 0 length files length i length i sb append URILIST PREFIX sb append files i sb append URILIST SEPARATOR String str sb to String char chars new char str length str get Chars 0 chars length chars 0 byte buffer new byte chars length 2 OS memcpy buffer chars buffer length transfer Data data new byte 1 transfer Data data 0 buffer transfer Data result 0 if transfer Data type HFSID byte data new byte files length for int i 0 i data length i File file new File files i boolean is Directory file is Directory String file Name files i char chars new char file Name length file Name get Chars 0 chars length chars 0 int cfstring OS CF String Create With Characters OS kCF Allocator Default chars chars length if cfstring 0 return try int url OS CFURL Create With File System Path OS kCF Allocator Default cfstring OS kCFURLPOSIX Path Style is Directory if url 0 return try byte fs Ref new byte 80 if OS CFURL GetFS Ref url fs Ref return byte fs Spec new byte 70 if OS FS Get Catalog Info fs Ref 0 null null fs Spec null OS no Err return byte hfsflavor new byte 10 fs Spec length byte finfo new byte 16 OS F Sp GetF Info fs Spec finfo System arraycopy finfo 0 hfsflavor 0 10 System arraycopy fs Spec 0 hfsflavor 10 fs Spec length data i hfsflavor finally OS CF Release url finally OS CF Release cfstring transfer Data data data transfer Data result 0  javaToNative javaToNative transferData TransferData javaToNative TransferData transferData transferData isSupportedType transferData transferData StringBuffer StringBuffer URILIST_PREFIX URILIST_SEPARATOR toString getChars transferData transferData transferData transferData isDirectory isDirectory fileName fileName fileName getChars CFStringCreateWithCharacters kCFAllocatorDefault CFURLCreateWithFileSystemPath kCFAllocatorDefault kCFURLPOSIXPathStyle isDirectory fsRef CFURLGetFSRef fsRef fsSpec FSGetCatalogInfo fsRef fsSpec noErr fsSpec FSpGetFInfo fsSpec fsSpec fsSpec CFRelease CFRelease transferData transferData
This implementation of code native To Java code converts a platform specific representation of a list of file names to a java code String code Each String in the array contains the absolute path for a single file or directory For additional information see code Transfer native To Java code param transfer Data the platform specific representation of the data to be been converted return a java code String code containing a list of file names if the conversion was successful otherwise null public Object native To Java Transfer Data transfer Data if is Supported Type transfer Data transfer Data data null return null if transfer Data data length 0 return null if transfer Data type URILISTID byte data transfer Data data 0 if data length 0 return null char chars new char data length 1 2 OS memcpy chars data data length String str new String chars int start str index Of URILIST PREFIX if start 1 return null start URILIST PREFIX length String file Names new String 0 while start str length int end str index Of URILIST SEPARATOR start if end 1 end str length 1 String file Name str substring start end String new File Names new String file Names length 1 System arraycopy file Names 0 new File Names 0 file Names length new File Names file Names length file Name file Names new File Names start str index Of URILIST PREFIX end if start 1 break start URILIST PREFIX length return file Names if transfer Data type HFSID int count transfer Data data length String file Names new String count for int i 0 i count i byte data transfer Data data i byte fsspec new byte data length 10 System arraycopy data 10 fsspec 0 fsspec length byte fs Ref new byte 80 if OS F Sp MakeFS Ref fsspec fs Ref OS no Err return null int url OS CFURL Create FromFS Ref OS kCF Allocator Default fs Ref if url 0 return null try int path OS CFURL Copy File System Path url OS kCFURLPOSIX Path Style if path 0 return null try int length OS CF String Get Length path if length 0 return null char buffer new char length CF Range range new CF Range range length length OS CF String Get Characters path range buffer file Names i new String buffer finally OS CF Release path finally OS CF Release url return file Names return null  nativeToJava nativeToJava transferData nativeToJava TransferData transferData isSupportedType transferData transferData transferData transferData transferData indexOf URILIST_PREFIX URILIST_PREFIX fileNames indexOf URILIST_SEPARATOR fileName newFileNames fileNames fileNames newFileNames fileNames newFileNames fileNames fileName fileNames newFileNames indexOf URILIST_PREFIX URILIST_PREFIX fileNames transferData transferData fileNames transferData fsRef FSpMakeFSRef fsRef noErr CFURLCreateFromFSRef kCFAllocatorDefault fsRef CFURLCopyFileSystemPath kCFURLPOSIXPathStyle CFStringGetLength CFRange CFRange CFStringGetCharacters fileNames CFRelease CFRelease fileNames
protected int get Type Ids return new int URILISTID HFSID  getTypeIds
protected String get Type Names return new String URILIST HFS  getTypeNames

private static final int RTFID register Type RTF private RTF Transfer  registerType RTFTransfer
Returns the singleton instance of the RTF Transfer class return the singleton instance of the RTF Transfer class public static RTF Transfer get Instance return  instance  RTFTransfer RTFTransfer RTFTransfer getInstance _instance
This implementation of code java To Native code converts RTF formatted text represented by a java code String code to a platform specific representation For additional information see code Transfer java To Native code param object a java code String code containing RTF text param transfer Data an empty code Transfer Data code object this object will be filled in on return with the platform specific format of the data public void java To Native Object object Transfer Data transfer Data transfer Data result 1 if object null object instanceof String is Supported Type transfer Data return String string String object int count string length if count 0 return char chars new char count string get Chars 0 count chars 0 int cfstring OS CF String Create With Characters OS kCF Allocator Default chars count if cfstring 0 return try CF Range range new CF Range range length chars length int encoding OS CF String Get System Encoding int size new int 1 int num Chars OS CF String Get Bytes cfstring range encoding byte true null 0 size if num Chars 0 size 0 0 return byte buffer new byte size 0 num Chars OS CF String Get Bytes cfstring range encoding byte true buffer size 0 size if num Chars 0 return transfer Data data new byte 1 transfer Data data 0 buffer transfer Data result 0 finally OS CF Release cfstring  javaToNative javaToNative transferData TransferData javaToNative TransferData transferData transferData isSupportedType transferData getChars CFStringCreateWithCharacters kCFAllocatorDefault CFRange CFRange CFStringGetSystemEncoding numChars CFStringGetBytes numChars numChars CFStringGetBytes numChars transferData transferData transferData CFRelease
This implementation of code native To Java code converts a platform specific representation of RTF text to a java code String code For additional information see code Transfer native To Java code param transfer Data the platform specific representation of the data to be been converted return a java code String code containing RTF text if the conversion was successful otherwise null public Object native To Java Transfer Data transfer Data if is Supported Type transfer Data transfer Data data null return null if transfer Data data length 0 transfer Data data 0 length 0 return null byte buffer transfer Data data 0 int encoding OS CF String Get System Encoding int cfstring OS CF String Create With Bytes OS kCF Allocator Default buffer buffer length encoding true if cfstring 0 return null try int length OS CF String Get Length cfstring if length 0 return null char chars new char length CF Range range new CF Range range length length OS CF String Get Characters cfstring range chars return new String chars finally OS CF Release cfstring  nativeToJava nativeToJava transferData nativeToJava TransferData transferData isSupportedType transferData transferData transferData transferData transferData CFStringGetSystemEncoding CFStringCreateWithBytes kCFAllocatorDefault CFStringGetLength CFRange CFRange CFStringGetCharacters CFRelease
protected int get Type Ids return new int RTFID  getTypeIds
protected String get Type Names return new String RTF  getTypeNames

private int current Effect DND FEEDBACK NONE Table Drag Under Effect Table table this table table  currentEffect FEEDBACK_NONE TableDragUnderEffect
void show int effect int x int y Table Item item null if effect DND FEEDBACK NONE item find Item x y if item null effect DND FEEDBACK NONE if current Effect effect current Effect DND FEEDBACK NONE selection table get Selection table set Selection new Table Item 0 boolean restore Selection current Effect effect effect DND FEEDBACK NONE set Drag Under Effect effect item if restore Selection table set Selection selection selection new Table Item 0  TableItem FEEDBACK_NONE findItem FEEDBACK_NONE currentEffect currentEffect FEEDBACK_NONE getSelection setSelection TableItem restoreSelection currentEffect FEEDBACK_NONE setDragUnderEffect restoreSelection setSelection TableItem
private Table Item find Item int x int y if table null return null Point coordinates new Point x y coordinates table to Control coordinates return table get Item coordinates  TableItem findItem toControl getItem
private void set Drag Under Effect int effect Table Item item if current Item item if item null table set Selection new Table Item 0 else table set Selection new Table Item item current Item item current Effect effect  setDragUnderEffect TableItem currentItem setSelection TableItem setSelection TableItem currentItem currentEffect

private static final int UTEXTID OS k Scrap Flavor Type Unicode private Text Transfer  kScrapFlavorTypeUnicode TextTransfer
Returns the singleton instance of the Text Transfer class return the singleton instance of the Text Transfer class public static Text Transfer get Instance return  instance  TextTransfer TextTransfer TextTransfer getInstance _instance
This implementation of code java To Native code converts plain text represented by a java code String code to a platform specific representation For additional information see code Transfer java To Native code param object a java code String code containing text param transfer Data an empty code Transfer Data code object this object will be filled in on return with the platform specific format of the data public void java To Native Object object Transfer Data transfer Data transfer Data result 1 if object null object instanceof String is Supported Type transfer Data return String string String object if string length 0 return char chars new char string length string get Chars 0 chars length chars 0 switch transfer Data type case TEXTID int cfstring OS CF String Create With Characters OS kCF Allocator Default chars chars length if cfstring 0 return byte buffer null try CF Range range new CF Range range length chars length int encoding OS CF String Get System Encoding int size new int 1 int num Chars OS CF String Get Bytes cfstring range encoding byte true null 0 size if num Chars 0 return buffer new byte size 0 num Chars OS CF String Get Bytes cfstring range encoding byte true buffer size 0 size if num Chars 0 return finally OS CF Release cfstring transfer Data data new byte 1 transfer Data data 0 buffer transfer Data result OS no Err break case UTEXTID byte buffer new byte chars length 2 OS memcpy buffer chars buffer length transfer Data data new byte 1 transfer Data data 0 buffer transfer Data result OS no Err break  javaToNative javaToNative transferData TransferData javaToNative TransferData transferData transferData isSupportedType transferData getChars transferData CFStringCreateWithCharacters kCFAllocatorDefault CFRange CFRange CFStringGetSystemEncoding numChars CFStringGetBytes numChars numChars CFStringGetBytes numChars CFRelease transferData transferData transferData noErr transferData transferData transferData noErr
This implementation of code native To Java code converts a platform specific representation of plain text to a java code String code For additional information see code Transfer native To Java code param transfer Data the platform specific representation of the data to be been converted return a java code String code containing text if the conversion was successful otherwise null public Object native To Java Transfer Data transfer Data if is Supported Type transfer Data transfer Data data null return null if transfer Data data length 0 transfer Data data 0 length 0 return null byte buffer transfer Data data 0 switch transfer Data type case TEXTID int encoding OS CF String Get System Encoding int cfstring OS CF String Create With Bytes OS kCF Allocator Default buffer buffer length encoding true if cfstring 0 return null try int length OS CF String Get Length cfstring if length 0 return null char chars new char length CF Range range new CF Range range length length OS CF String Get Characters cfstring range chars return new String chars finally OS CF Release cfstring case UTEXTID char chars new char buffer length 1 2 OS memcpy chars buffer buffer length return new String chars return null  nativeToJava nativeToJava transferData nativeToJava TransferData transferData isSupportedType transferData transferData transferData transferData transferData transferData CFStringGetSystemEncoding CFStringCreateWithBytes kCFAllocatorDefault CFStringGetLength CFRange CFRange CFStringGetCharacters CFRelease
protected int get Type Ids return new int UTEXTID TEXTID  getTypeIds
protected String get Type Names return new String UTEXT TEXT  getTypeNames

Returns a list of the platform specific data types that can be converted using this transfer agent p Only the data type fields of the code Transfer Data code objects are filled in p return a list of the data types that can be converted using this transfer agent  TransferData
Returns true if the code Transfer Data code data type can be converted using this transfer agent param transfer Data a platform specific description of a data type only the data type fields of the code Transfer Data code object need to be filled in return true if the transfer Data data type can be converted using this transfer agent  TransferData transferData TransferData transferData
Returns the platform specfic ids of the data types that can be converted using this transfer agent return the platform specfic ids of the data types that can be converted using this transfer agent 
Returns the platform specfic names of the data types that can be converted using this transfer agent return the platform specfic names of the data types that can be converted using this transfer agent 
Converts a java representation of data to a platform specific representation of the data p On a successful conversion the transfer Data result field will be set as follows ul li Windows COM S OK li Motif 1 li GTK 1 li Photon 1 ul p p If this transfer agent is unable to perform the conversion the transfer Data result field will be set to a failure value as follows ul li Windows COM DV E TYMED or COM E FAIL li Motif 0 li GTK 0 li Photon 0 ul p param object a java representation of the data to be converted the type of Object that is passed in is dependant on the code Transfer code subclass param transfer Data an empty Transfer Data object this object will be filled in on return with the platform specific representation of the data  transferData S_OK transferData DV_E_TYMED E_FAIL transferData TransferData
Converts a platform specific representation of data to a java representation param transfer Data the platform specific representation of the data to be converted return a java representation of the converted data if the conversion was successful otherwise null The type of Object that is returned is dependant on the code Transfer code subclass  transferData
Registers a name for a data type and returns the associated unique identifier p You may register the same type more than once the same unique identifier will be returned if the type has been previously registered p p Note On windows do b not b call this method with pre defined Clipboard Format types such as CF TEXT or CF BITMAP because the pre defined identifier will not be returned p param format Name the name of a data type return the unique identifier associated with this data type public static int register Type String format Name int length format Name length TODO hashcode may not be unique need another way if length 4 return format Name hash Code int type 0 if length 0 type format Name char At 0 0xff 24 if length 1 type format Name char At 1 0xff 16 if length 2 type format Name char At 2 0xff 8 if length 3 type format Name char At 3 0xff return type  CF_TEXT CF_BITMAP formatName registerType formatName formatName formatName hashCode formatName charAt formatName charAt formatName charAt formatName charAt

private Tree Item selection new Tree Item 0 Tree Drag Under Effect Tree tree this tree tree  TreeItem TreeItem TreeDragUnderEffect
void show int effect int x int y Tree Item item null if effect DND FEEDBACK NONE item find Item x y if item null effect DND FEEDBACK NONE if current Effect effect current Effect DND FEEDBACK NONE selection tree get Selection tree set Selection new Tree Item 0 boolean restore Selection current Effect effect effect DND FEEDBACK NONE set Drag Under Effect effect item if restore Selection tree set Selection selection selection new Tree Item 0  TreeItem FEEDBACK_NONE findItem FEEDBACK_NONE currentEffect currentEffect FEEDBACK_NONE getSelection setSelection TreeItem restoreSelection currentEffect FEEDBACK_NONE setDragUnderEffect restoreSelection setSelection TreeItem
private Tree Item find Item int x int y Point coordinates new Point x y coordinates tree to Control coordinates return tree get Item coordinates  TreeItem findItem toControl getItem
private void set Drag Under Effect int effect Tree Item item switch effect case DND FEEDBACK SELECT if current Effect DND FEEDBACK INSERT AFTER current Effect DND FEEDBACK INSERT BEFORE set Insert Mark null false current Effect DND FEEDBACK NONE current Item null if current Effect effect current Item item set Drop Selection item current Effect DND FEEDBACK SELECT current Item item break case DND FEEDBACK INSERT AFTER case DND FEEDBACK INSERT BEFORE if current Effect DND FEEDBACK SELECT set Drop Selection null current Effect DND FEEDBACK NONE current Item null if current Effect effect current Item item set Insert Mark item effect DND FEEDBACK INSERT AFTER current Effect effect current Item item break default if current Effect DND FEEDBACK INSERT AFTER current Effect DND FEEDBACK INSERT BEFORE set Insert Mark null false if current Effect DND FEEDBACK SELECT set Drop Selection null current Effect DND FEEDBACK NONE current Item null break  setDragUnderEffect TreeItem FEEDBACK_SELECT currentEffect FEEDBACK_INSERT_AFTER currentEffect FEEDBACK_INSERT_BEFORE setInsertMark currentEffect FEEDBACK_NONE currentItem currentEffect currentItem setDropSelection currentEffect FEEDBACK_SELECT currentItem FEEDBACK_INSERT_AFTER FEEDBACK_INSERT_BEFORE currentEffect FEEDBACK_SELECT setDropSelection currentEffect FEEDBACK_NONE currentItem currentEffect currentItem setInsertMark FEEDBACK_INSERT_AFTER currentEffect currentItem currentEffect FEEDBACK_INSERT_AFTER currentEffect FEEDBACK_INSERT_BEFORE setInsertMark currentEffect FEEDBACK_SELECT setDropSelection currentEffect FEEDBACK_NONE currentItem
private void set Drop Selection Tree Item item if item null tree set Selection new Tree Item 0 else tree set Selection new Tree Item item  setDropSelection TreeItem setSelection TreeItem setSelection TreeItem
private void set Insert Mark Tree Item item boolean after not currently implemented  setInsertMark TreeItem

Device device Color 
Constructs a new instance of this class given a device and the desired red green and blue values expressed as ints in the range 0 to 255 where 0 is black and 255 is full brightness On limited color devices the color instance created by this call may not have the same RGB values as the ones specified by the arguments The RGB values on the returned instance will be the color values of the operating system color p You must dispose the color when it is no longer required p param device the device on which to allocate the color param red the amount of red in the color param green the amount of green in the color param blue the amount of blue in the color exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li li ERROR INVALID ARGUMENT if the red green or blue argument is not between 0 and 255 li ul see dispose public Color Device device int red int green int blue init device red green blue  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT
Constructs a new instance of this class given a device and an code RGB code describing the desired red green and blue values On limited color devices the color instance created by this call may not have the same RGB values as the ones specified by the argument The RGB values on the returned instance will be the color values of the operating system color p You must dispose the color when it is no longer required p param device the device on which to allocate the color param rgb the RGB values of the desired color exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li li ERROR NULL ARGUMENT if the rgb argument is null li li ERROR INVALID ARGUMENT if the red green or blue components of the argument are not between 0 and 255 li ul see dispose public Color Device device RGB rgb if rgb null SWT error SWT ERROR NULL ARGUMENT init device rgb red rgb green rgb blue  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_NULL_ARGUMENT
Disposes of the operating system resources associated with the color Applications must dispose of all colors which they allocate public void dispose if handle null return if device is Disposed return device null handle null  isDisposed
Compares the argument to the receiver and returns true if they represent the em same em object using a class specific comparison param object the object to compare with this object return code true code if the object is the same as this object and code false code otherwise see hash Code public boolean equals Object object if object this return true if object instanceof Color return false Color color Color object float rgb Color color handle if handle rgb Color return true return device color device handle 0 rgb Color 0 handle 1 rgb Color 1 handle 2 rgb Color 2  hashCode rgbColor rgbColor rgbColor rgbColor rgbColor
Returns the amount of blue in the color from 0 to 255 return the blue component of the color exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Blue if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED return int handle 2 255  SWTException ERROR_GRAPHIC_DISPOSED getBlue isDisposed ERROR_GRAPHIC_DISPOSED
Returns the amount of green in the color from 0 to 255 return the green component of the color exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Green if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED return int handle 1 255  SWTException ERROR_GRAPHIC_DISPOSED getGreen isDisposed ERROR_GRAPHIC_DISPOSED
Returns the amount of red in the color from 0 to 255 return the red component of the color exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Red if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED return int handle 0 255  SWTException ERROR_GRAPHIC_DISPOSED getRed isDisposed ERROR_GRAPHIC_DISPOSED
Returns an integer hash code for the receiver Any two objects which return code true code when passed to code equals code must return the same value for this method return the receiver s hash see equals public int hash Code if is Disposed return 0 return int handle 0 255 int handle 1 255 int handle 2 255  hashCode isDisposed
Returns an code RGB code representing the receiver return the RGB for the color exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public RGB getRGB if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED return new RGB get Red get Green get Blue  SWTException ERROR_GRAPHIC_DISPOSED isDisposed ERROR_GRAPHIC_DISPOSED getRed getGreen getBlue
Invokes platform specific functionality to allocate a new color p b IMPORTANT b This method is em not em part of the public API for code Color code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param device the device on which to allocate the color param handle the handle for the color private public static Color carbon new Device device float rgb Color if device null device Device get Device Color color new Color color handle rgb Color color device device return color  carbon_new rgbColor getDevice rgbColor
void init Device device int red int green int blue if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT this device device if red 255 red 0 green 255 green 0 blue 255 blue 0 SWT error SWT ERROR INVALID ARGUMENT float rgb Color new float 4 rgb Color 0 red 255f rgb Color 1 green 255f rgb Color 2 blue 255f rgb Color 3 1 handle rgb Color  getDevice ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT rgbColor rgbColor rgbColor rgbColor rgbColor rgbColor
Returns code true code if the color has been disposed and code false code otherwise p This method gets the dispose state for the color When a color has been disposed it is an error to invoke any other method using the color return code true code when the color is disposed and code false code otherwise public boolean is Disposed return handle null  isDisposed
Returns a string containing a concise human readable description of the receiver return a string representation of the receiver public String to String if is Disposed return Color DISPOSED return Color get Red get Green get Blue  toString isDisposed getRed getGreen getBlue

Prevents uninitialized instances from being created outside the package Cursor 
Constructs a new cursor given a device and a style constant describing the desired cursor appearance p You must dispose the cursor when it is no longer required p param device the device on which to allocate the cursor param style the style of cursor to allocate exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li li ERROR INVALID ARGUMENT when an unknown style is specified li ul exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for cursor creation li ul see SWT CURSOR ARROW see SWT CURSOR WAIT see SWT CURSOR CROSS see SWT CURSOR APPSTARTING see SWT CURSOR HELP see SWT CURSOR SIZEALL see SWT CURSOR SIZENESW see SWT CURSOR SIZENS see SWT CURSOR SIZENWSE see SWT CURSOR SIZEWE see SWT CURSOR SIZEN see SWT CURSOR SIZES see SWT CURSOR SIZEE see SWT CURSOR SIZEW see SWT CURSOR SIZENE see SWT CURSOR SIZESE see SWT CURSOR SIZESW see SWT CURSOR SIZENW see SWT CURSOR UPARROW see SWT CURSOR IBEAM see SWT CURSOR NO see SWT CURSOR HAND public Cursor Device device int style if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT this device device switch style case SWT CURSOR HAND handle OS k Theme Pointing Hand Cursor break case SWT CURSOR ARROW handle OS k Theme Arrow Cursor break case SWT CURSOR WAIT handle OS k Theme Spinning Cursor break case SWT CURSOR CROSS handle OS k Theme Cross Cursor break case SWT CURSOR APPSTARTING handle OS k Theme Arrow Cursor break case SWT CURSOR HELP handle OS k Theme Cross Cursor break case SWT CURSOR SIZEALL handle OS k Theme Cross Cursor break case SWT CURSOR SIZENESW handle OS k Theme Cross Cursor break case SWT CURSOR SIZENS org eclipse swt internal carbon Cursor cursor new org eclipse swt internal carbon Cursor cursor data SIZENS SOURCE cursor mask SIZENS MASK cursor hotSpot h 7 cursor hotSpot v 7 handle OS New Ptr org eclipse swt internal carbon Cursor sizeof if handle 0 SWT error SWT ERROR NO HANDLES OS memcpy handle cursor org eclipse swt internal carbon Cursor sizeof break case SWT CURSOR SIZENWSE handle OS k Theme Cross Cursor break case SWT CURSOR SIZEWE handle OS k Theme Resize Left Right Cursor break case SWT CURSOR SIZEN handle OS k Theme Cross Cursor break case SWT CURSOR SIZES handle OS k Theme Cross Cursor break case SWT CURSOR SIZEE handle OS k Theme Resize Right Cursor break case SWT CURSOR SIZEW handle OS k Theme Resize Left Cursor break case SWT CURSOR SIZENE handle OS k Theme Cross Cursor break case SWT CURSOR SIZESE handle OS k Theme Cross Cursor break case SWT CURSOR SIZESW handle OS k Theme Cross Cursor break case SWT CURSOR SIZENW handle OS k Theme Cross Cursor break case SWT CURSOR UPARROW handle OS k Theme Cross Cursor break case SWT CURSOR IBEAM handle OS k ThemeI Beam Cursor break case SWT CURSOR NO handle OS k Theme Not Allowed Cursor break default SWT error SWT ERROR INVALID ARGUMENT  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTError ERROR_NO_HANDLES CURSOR_ARROW CURSOR_WAIT CURSOR_CROSS CURSOR_APPSTARTING CURSOR_HELP CURSOR_SIZEALL CURSOR_SIZENESW CURSOR_SIZENS CURSOR_SIZENWSE CURSOR_SIZEWE CURSOR_SIZEN CURSOR_SIZES CURSOR_SIZEE CURSOR_SIZEW CURSOR_SIZENE CURSOR_SIZESE CURSOR_SIZESW CURSOR_SIZENW CURSOR_UPARROW CURSOR_IBEAM CURSOR_NO CURSOR_HAND getDevice ERROR_NULL_ARGUMENT CURSOR_HAND kThemePointingHandCursor CURSOR_ARROW kThemeArrowCursor CURSOR_WAIT kThemeSpinningCursor CURSOR_CROSS kThemeCrossCursor CURSOR_APPSTARTING kThemeArrowCursor CURSOR_HELP kThemeCrossCursor CURSOR_SIZEALL kThemeCrossCursor CURSOR_SIZENESW kThemeCrossCursor CURSOR_SIZENS SIZENS_SOURCE SIZENS_MASK hotSpot_h hotSpot_v NewPtr ERROR_NO_HANDLES CURSOR_SIZENWSE kThemeCrossCursor CURSOR_SIZEWE kThemeResizeLeftRightCursor CURSOR_SIZEN kThemeCrossCursor CURSOR_SIZES kThemeCrossCursor CURSOR_SIZEE kThemeResizeRightCursor CURSOR_SIZEW kThemeResizeLeftCursor CURSOR_SIZENE kThemeCrossCursor CURSOR_SIZESE kThemeCrossCursor CURSOR_SIZESW kThemeCrossCursor CURSOR_SIZENW kThemeCrossCursor CURSOR_UPARROW kThemeCrossCursor CURSOR_IBEAM kThemeIBeamCursor CURSOR_NO kThemeNotAllowedCursor ERROR_INVALID_ARGUMENT
Constructs a new cursor given a device image and mask data describing the desired cursor appearance and the x and y coordinates of the em hotspot em that is the point within the area covered by the cursor which is considered to be where the on screen pointer is pointing p The mask data is allowed to be null but in this case the source must be an Image Data representing an icon that specifies both color data and mask data p You must dispose the cursor when it is no longer required p param device the device on which to allocate the cursor param source the color data for the cursor param mask the mask data for the cursor or null param hotspotX the x coordinate of the cursor s hotspot param hotspotY the y coordinate of the cursor s hotspot exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li li ERROR NULL ARGUMENT if the source is null li li ERROR NULL ARGUMENT if the mask is null and the source does not have a mask li li ERROR INVALID ARGUMENT if the source and the mask are not the same size or either is not of depth one or if the hotspot is outside the bounds of the image li ul exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for cursor creation li ul public Cursor Device device Image Data source Image Data mask int hotspotX int hotspotY if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT this device device if source null SWT error SWT ERROR NULL ARGUMENT if mask null if source get Transparency Type SWT TRANSPARENCY MASK SWT error SWT ERROR NULL ARGUMENT mask source get Transparency Mask Check the bounds Mask must be the same size as source if mask width source width mask height source height SWT error SWT ERROR INVALID ARGUMENT Check color depths if mask depth 1 SWT error SWT ERROR INVALID ARGUMENT if source depth 1 SWT error SWT ERROR INVALID ARGUMENT Check the hotspots if hotspotX source width hotspotX 0 hotspotY source height hotspotY 0 SWT error SWT ERROR INVALID ARGUMENT Find the first non transparent pixel if cursor bigger than 16x16 int width source width int height source height int minX 0 minY 0 if width 16 height 16 minX width minY height int maxX 0 maxY 0 for int y 0 y height y for int x 0 x width x if source get Pixel x y 1 mask get Pixel x y 0 minX Math min minX x minY Math min minY y maxX Math max maxX x maxY Math max maxY y width maxX minX 1 height maxY minY 1 Stretch cursor if still bigger than 16x16 if width 16 height 16 int new Width Math min width 16 int new Height Math min height 16 Image Data new Source new Image Data new Width new Height source depth source palette 1 null 0 null null 1 1 source type source x source y source disposal Method source delay Time Image Data new Mask new Image Data new Width new Height mask depth mask palette 1 null 0 null null 1 1 mask type mask x mask y mask disposal Method mask delay Time Image Data blit Image Data BLIT SRC source data source depth source bytes Per Line source get Byte Order minX minY width height null null null Image Data ALPHA OPAQUE null 0 minX minY new Source data new Source depth new Source bytes Per Line new Source get Byte Order 0 0 new Width new Height null null null false false Image Data blit Image Data BLIT SRC mask data mask depth mask bytes Per Line mask get Byte Order minX minY width height null null null Image Data ALPHA OPAQUE null 0 minX minY new Mask data new Mask depth new Mask bytes Per Line new Mask get Byte Order 0 0 new Width new Height null null null false false width new Width height new Height minX minY 0 source new Source mask new Mask Create the cursor org eclipse swt internal carbon Cursor cursor new org eclipse swt internal carbon Cursor short src Data cursor data short mask Data cursor mask for int y 0 y height y short d 0 m 0 for int x 0 x width x int bit 1 width 1 x if source get Pixel minX x minY y 0 m bit if mask get Pixel minX x minY y 0 d bit else if mask get Pixel minX x minY y 0 d bit src Data y d mask Data y m cursor hotSpot h short Math max 0 Math min 15 hotspotY minX cursor hotSpot v short Math max 0 Math min 15 hotspotY minY handle OS New Ptr org eclipse swt internal carbon Cursor sizeof if handle 0 SWT error SWT ERROR NO HANDLES OS memcpy handle cursor org eclipse swt internal carbon Cursor sizeof  ImageData IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTError ERROR_NO_HANDLES ImageData ImageData getDevice ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT getTransparencyType TRANSPARENCY_MASK ERROR_NULL_ARGUMENT getTransparencyMask ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT getPixel getPixel newWidth newHeight ImageData newSource ImageData newWidth newHeight disposalMethod delayTime ImageData newMask ImageData newWidth newHeight disposalMethod delayTime ImageData ImageData BLIT_SRC bytesPerLine getByteOrder ImageData ALPHA_OPAQUE newSource newSource newSource bytesPerLine newSource getByteOrder newWidth newHeight ImageData ImageData BLIT_SRC bytesPerLine getByteOrder ImageData ALPHA_OPAQUE newMask newMask newMask bytesPerLine newMask getByteOrder newWidth newHeight newWidth newHeight newSource newMask srcData maskData getPixel getPixel getPixel srcData maskData hotSpot_h hotSpot_v NewPtr ERROR_NO_HANDLES
Constructs a new cursor given a device image data describing the desired cursor appearance and the x and y coordinates of the em hotspot em that is the point within the area covered by the cursor which is considered to be where the on screen pointer is pointing p You must dispose the cursor when it is no longer required p param device the device on which to allocate the cursor param source the image data for the cursor param hotspotX the x coordinate of the cursor s hotspot param hotspotY the y coordinate of the cursor s hotspot exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li li ERROR NULL ARGUMENT if the image is null li li ERROR INVALID ARGUMENT if the hotspot is outside the bounds of the image li ul exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for cursor creation li ul since 3 0 public Cursor Device device Image Data source int hotspotX int hotspotY if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT this device device if source null SWT error SWT ERROR NULL ARGUMENT if hotspotX source width hotspotX 0 hotspotY source height hotspotY 0 SWT error SWT ERROR INVALID ARGUMENT Image Data mask source get Transparency Mask Ensure depth is equal to 1 if source depth 1 Create a destination image with no data Image Data new Source new Image Data source width source height 1 Image Data bw Palette 1 null 0 null null 1 1 source type source x source y source disposal Method source delay Time Convert the source to a black and white image of depth 1 Palette Data palette source palette if palette is Direct Image Data blit Image Data BLIT SRC source data source depth source bytes Per Line source get Byte Order 0 0 source width source height 0 0 0 Image Data ALPHA OPAQUE null 0 0 0 new Source data new Source depth new Source bytes Per Line new Source get Byte Order 0 0 new Source width new Source height 0 0 0 false false else Image Data blit Image Data BLIT SRC source data source depth source bytes Per Line source get Byte Order 0 0 source width source height null null null Image Data ALPHA OPAQUE null 0 0 0 new Source data new Source depth new Source bytes Per Line new Source get Byte Order 0 0 new Source width new Source height null null null false false source new Source Find the first non transparent pixel if cursor bigger than 16x16 int width source width int height source height int minX 0 minY 0 if width 16 height 16 minX width minY height int maxX 0 maxY 0 for int y 0 y height y for int x 0 x width x if source get Pixel x y 1 mask get Pixel x y 0 minX Math min minX x minY Math min minY y maxX Math max maxX x maxY Math max maxY y width maxX minX 1 height maxY minY 1 Stretch cursor if still bigger than 16x16 if width 16 height 16 int new Width Math min width 16 int new Height Math min height 16 Image Data new Source new Image Data new Width new Height source depth source palette 1 null 0 null null 1 1 source type source x source y source disposal Method source delay Time Image Data new Mask new Image Data new Width new Height mask depth mask palette 1 null 0 null null 1 1 mask type mask x mask y mask disposal Method mask delay Time Image Data blit Image Data BLIT SRC source data source depth source bytes Per Line source get Byte Order minX minY width height null null null Image Data ALPHA OPAQUE null 0 minX minY new Source data new Source depth new Source bytes Per Line new Source get Byte Order 0 0 new Width new Height null null null false false Image Data blit Image Data BLIT SRC mask data mask depth mask bytes Per Line mask get Byte Order minX minY width height null null null Image Data ALPHA OPAQUE null 0 minX minY new Mask data new Mask depth new Mask bytes Per Line new Mask get Byte Order 0 0 new Width new Height null null null false false width new Width height new Height minX minY 0 source new Source mask new Mask Create the cursor org eclipse swt internal carbon Cursor cursor new org eclipse swt internal carbon Cursor short src Data cursor data short mask Data cursor mask for int y 0 y height y short d 0 m 0 for int x 0 x width x int bit 1 width 1 x if source get Pixel x minX y minY 0 if mask get Pixel x minX y minY 0 d bit m bit else if mask get Pixel x minX y minY 0 m bit src Data y d mask Data y m cursor hotSpot h short Math max 0 Math min 15 hotspotY minX cursor hotSpot v short Math max 0 Math min 15 hotspotY minY handle OS New Ptr org eclipse swt internal carbon Cursor sizeof if handle 0 SWT error SWT ERROR NO HANDLES OS memcpy handle cursor org eclipse swt internal carbon Cursor sizeof  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTError ERROR_NO_HANDLES ImageData getDevice ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT ImageData getTransparencyMask ImageData newSource ImageData ImageData bwPalette disposalMethod delayTime PaletteData isDirect ImageData ImageData BLIT_SRC bytesPerLine getByteOrder ImageData ALPHA_OPAQUE newSource newSource newSource bytesPerLine newSource getByteOrder newSource newSource ImageData ImageData BLIT_SRC bytesPerLine getByteOrder ImageData ALPHA_OPAQUE newSource newSource newSource bytesPerLine newSource getByteOrder newSource newSource newSource getPixel getPixel newWidth newHeight ImageData newSource ImageData newWidth newHeight disposalMethod delayTime ImageData newMask ImageData newWidth newHeight disposalMethod delayTime ImageData ImageData BLIT_SRC bytesPerLine getByteOrder ImageData ALPHA_OPAQUE newSource newSource newSource bytesPerLine newSource getByteOrder newWidth newHeight ImageData ImageData BLIT_SRC bytesPerLine getByteOrder ImageData ALPHA_OPAQUE newMask newMask newMask bytesPerLine newMask getByteOrder newWidth newHeight newWidth newHeight newSource newMask srcData maskData getPixel getPixel getPixel srcData maskData hotSpot_h hotSpot_v NewPtr ERROR_NO_HANDLES
Disposes of the operating system resources associated with the cursor Applications must dispose of all cursors which they allocate public void dispose if handle 1 return if device is Disposed return switch handle case OS k Theme Pointing Hand Cursor case OS k Theme Arrow Cursor case OS k Theme Spinning Cursor case OS k Theme Cross Cursor case OS k Theme Watch Cursor case OS k ThemeI Beam Cursor case OS k Theme Not Allowed Cursor case OS k Theme Resize Left Right Cursor case OS k Theme Resize Left Cursor case OS k Theme Resize Right Cursor break default OS Dispose Ptr handle handle 1 device null  isDisposed kThemePointingHandCursor kThemeArrowCursor kThemeSpinningCursor kThemeCrossCursor kThemeWatchCursor kThemeIBeamCursor kThemeNotAllowedCursor kThemeResizeLeftRightCursor kThemeResizeLeftCursor kThemeResizeRightCursor DisposePtr
Compares the argument to the receiver and returns true if they represent the em same em object using a class specific comparison param object the object to compare with this object return code true code if the object is the same as this object and code false code otherwise see hash Code public boolean equals Object object if object this return true if object instanceof Cursor return false Cursor cursor Cursor object return device cursor device handle cursor handle  hashCode
Returns an integer hash code for the receiver Any two objects which return code true code when passed to code equals code must return the same value for this method return the receiver s hash see equals public int hash Code return handle  hashCode
Returns code true code if the cursor has been disposed and code false code otherwise p This method gets the dispose state for the cursor When a cursor has been disposed it is an error to invoke any other method using the cursor return code true code when the cursor is disposed and code false code otherwise public boolean is Disposed return handle 1  isDisposed
Returns a string containing a concise human readable description of the receiver return a string representation of the receiver public String to String if is Disposed return Cursor DISPOSED return Cursor handle  toString isDisposed
Invokes platform specific functionality to allocate a new cursor p b IMPORTANT b This method is em not em part of the public API for code Cursor code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param device the device on which to allocate the color param handle the handle for the cursor private public static Cursor carbon new Device device int handle if device null device Device get Device Cursor cursor new Cursor cursor handle handle cursor device device return cursor  carbon_new getDevice

static Device get Device if Device Finder null Device Finder run Device device Current Device Current Device null return device  getDevice DeviceFinder DeviceFinder CurrentDevice CurrentDevice
Constructs a new instance of this class p You must dispose the device when it is no longer required p param data the Device Data which describes the receiver see create see init see Device Data public Device Device Data data if data null debug data debug tracking data tracking create data init if tracking errors new Error 128 objects new Object 128  DeviceData DeviceData DeviceData
Throws an code SWT Exception code if the receiver can not be accessed by the caller This may include both checks on the state of the receiver and more generally on the entire execution context This method em should em be called by device implementors to enforce the standard SWT invariants p Currently it is an error to invoke any method other than code is Disposed code and code dispose code on a device that has had its code dispose code method called p p In future releases of SWT there may be more or fewer error checks and exceptions may be thrown for different reasons p exception SWT Exception ul li ERROR WIDGET DISPOSED if the receiver has been disposed li ul protected void check Device if disposed SWT error SWT ERROR DEVICE DISPOSED  SWTException isDisposed SWTException ERROR_WIDGET_DISPOSED checkDevice ERROR_DEVICE_DISPOSED
Creates the device in the operating system If the device does not have a handle this method may do nothing depending on the device p This method is called before code init code p p Subclasses are supposed to reimplement this method and not call the code super code implementation p param data the Device Data which describes the receiver see init protected void create Device Data data  DeviceData DeviceData
Disposes of the operating system resources associated with the receiver After this method has been invoked the receiver will answer code true code when sent the message code is Disposed code see release see destroy see check Device public void dispose if is Disposed return check Device release destroy disposed true if tracking objects null errors null  isDisposed checkDevice isDisposed checkDevice
void dispose Object Object object for int i 0 i objects length i if objects i object objects i null errors i null return  dispose_Object
Destroys the device in the operating system and releases the device s handle If the device does not have a handle this method may do nothing depending on the device p This method is called after code release code p p Subclasses are supposed to reimplement this method and not call the code super code implementation p see dispose see release protected void destroy 
Returns a rectangle describing the receiver s size and location return the bounding rectangle exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public Rectangle get Bounds check Device int gdevice OS Get Main Device int ptr new int 1 OS memcpy ptr gdevice 4 G Device device new G Device OS memcpy device ptr 0 G Device sizeof return new Rectangle device left device top device right device left device bottom device top  SWTException ERROR_DEVICE_DISPOSED getBounds checkDevice GetMainDevice GDevice GDevice GDevice
Returns a code Device Data code based on the receiver Modifications made to this code Device Data code will not affect the receiver return a code Device Data code containing the device s data and attributes exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see Device Data public Device Data get Device Data check Device Device Data data new Device Data data debug debug data tracking tracking int count 0 length 0 if tracking length objects length for int i 0 i length i if objects i null count int index 0 data objects new Object count data errors new Error count for int i 0 i length i if objects i null data objects index objects i data errors index errors i index return data  DeviceData DeviceData DeviceData SWTException ERROR_DEVICE_DISPOSED DeviceData DeviceData getDeviceData checkDevice DeviceData DeviceData
Returns a rectangle which describes the area of the receiver which is capable of displaying data return the client area exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see get Bounds public Rectangle get Client Area check Device int gdevice OS Get Main Device Rect rect new Rect OS Get Available Window Positioning Bounds gdevice rect return new Rectangle rect left rect top rect right rect left rect bottom rect top  SWTException ERROR_DEVICE_DISPOSED getBounds getClientArea checkDevice GetMainDevice GetAvailableWindowPositioningBounds
Returns the bit depth of the screen which is the number of bits it takes to represent the number of unique colors that the screen is currently capable of displaying This number will typically be one of 1 8 15 16 24 or 32 return the depth of the screen exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public int get Depth check Device int gdevice OS Get Main Device int ptr new int 1 OS memcpy ptr gdevice 4 G Device device new G Device OS memcpy device ptr 0 G Device sizeof return OS Get Pix Depth device gdP Map  SWTException ERROR_DEVICE_DISPOSED getDepth checkDevice GetMainDevice GDevice GDevice GDevice GetPixDepth gdPMap
Returns a point whose x coordinate is the horizontal dots per inch of the display and whose y coordinate is the vertical dots per inch of the display return the horizontal and vertical DPI exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public Point getDPI check Device int gdevice OS Get Main Device int ptr new int 1 OS memcpy ptr gdevice 4 G Device device new G Device OS memcpy device ptr 0 G Device sizeof OS memcpy ptr device gdP Map 4 Pix Map pixmap new Pix Map OS memcpy pixmap ptr 0 Pix Map sizeof return new Point OS Fix2 Long pixmap h Res OS Fix2 Long pixmap v Res  SWTException ERROR_DEVICE_DISPOSED checkDevice GetMainDevice GDevice GDevice GDevice gdPMap PixMap PixMap PixMap Fix2Long hRes Fix2Long vRes
Returns code Font Data code objects which describe the fonts that match the given arguments If the code face Name code is null all fonts will be returned param face Name the name of the font to look for or null param scalable if true only scalable fonts are returned otherwise only non scalable fonts are returned return the matching font data exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public Font Data get Font List String face Name boolean scalable check Device if scalable return new Font Data 0 short style new short 1 short family new short 1 int font Count new int 1 int actual Length new int 1 OS ATSU Get FontI Ds null 0 font Count int fontI Ds new int font Count 0 OS ATSU Get FontI Ds fontI Ds fontI Ds length font Count Font Data fds new Font Data font Count 0 for int i 0 i fds length i int fontID fontI Ds i OS ATSU Find Font Name fontID OS k Font Family Name OS k Font No Platform Code OS k Font No Script Code OS k Font No Language Code 0 null actual Length null byte buffer new byte actual Length 0 OS ATSU Find Font Name fontID OS k Font Family Name OS k Font No Platform Code OS k Font No Script Code OS k Font No Language Code buffer length buffer actual Length null String name new String buffer if face Name null Compatibility equals Ignore Case face Name name OS FM Get Font Family Instance From Font fontID family style int s SWT NORMAL if style 0 OS italic 0 s SWT ITALIC if style 0 OS bold 0 s SWT BOLD Font Data data new Font Data name 0 s fds i data return fds  FontData faceName faceName SWTException ERROR_DEVICE_DISPOSED FontData getFontList faceName checkDevice FontData fontCount actualLength ATSUGetFontIDs fontCount fontIDs fontCount ATSUGetFontIDs fontIDs fontIDs fontCount FontData FontData fontCount fontIDs ATSUFindFontName kFontFamilyName kFontNoPlatformCode kFontNoScriptCode kFontNoLanguageCode actualLength actualLength ATSUFindFontName kFontFamilyName kFontNoPlatformCode kFontNoScriptCode kFontNoLanguageCode actualLength faceName equalsIgnoreCase faceName FMGetFontFamilyInstanceFromFont FontData FontData
Returns the matching standard color for the given constant which should be one of the color constants specified in class code SWT code Any value other than one of the SWT color constants which is passed in will result in the color black This color should not be free d because it was allocated by the system not the application param id the color constant return the matching color exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see SWT public Color get System Color int id check Device switch id case SWT COLOR BLACK return COLOR BLACK case SWT COLOR DARK RED return COLOR DARK RED case SWT COLOR DARK GREEN return COLOR DARK GREEN case SWT COLOR DARK YELLOW return COLOR DARK YELLOW case SWT COLOR DARK BLUE return COLOR DARK BLUE case SWT COLOR DARK MAGENTA return COLOR DARK MAGENTA case SWT COLOR DARK CYAN return COLOR DARK CYAN case SWT COLOR GRAY return COLOR GRAY case SWT COLOR DARK GRAY return COLOR DARK GRAY case SWT COLOR RED return COLOR RED case SWT COLOR GREEN return COLOR GREEN case SWT COLOR YELLOW return COLOR YELLOW case SWT COLOR BLUE return COLOR BLUE case SWT COLOR MAGENTA return COLOR MAGENTA case SWT COLOR CYAN return COLOR CYAN case SWT COLOR WHITE return COLOR WHITE return COLOR BLACK  SWTException ERROR_DEVICE_DISPOSED getSystemColor checkDevice COLOR_BLACK COLOR_BLACK COLOR_DARK_RED COLOR_DARK_RED COLOR_DARK_GREEN COLOR_DARK_GREEN COLOR_DARK_YELLOW COLOR_DARK_YELLOW COLOR_DARK_BLUE COLOR_DARK_BLUE COLOR_DARK_MAGENTA COLOR_DARK_MAGENTA COLOR_DARK_CYAN COLOR_DARK_CYAN COLOR_GRAY COLOR_GRAY COLOR_DARK_GRAY COLOR_DARK_GRAY COLOR_RED COLOR_RED COLOR_GREEN COLOR_GREEN COLOR_YELLOW COLOR_YELLOW COLOR_BLUE COLOR_BLUE COLOR_MAGENTA COLOR_MAGENTA COLOR_CYAN COLOR_CYAN COLOR_WHITE COLOR_WHITE COLOR_BLACK
Returns a reasonable font for applications to use On some platforms this will match the default font or system font if such can be found This font should not be free d because it was allocated by the system not the application p Typically applications which want the default look should simply not set the font on the widgets they create Widgets are always created with the correct default font for the class of user interface component they represent p return a font exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public Font get System Font check Device return system Font  SWTException ERROR_DEVICE_DISPOSED getSystemFont checkDevice systemFont
Returns code true code if the underlying window system prints out warning messages on the console and code set Warnings code had previously been called with code true code return code true code if warnings are being handled and code false code otherwise exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public boolean get Warnings check Device return warnings  setWarnings SWTException ERROR_DEVICE_DISPOSED getWarnings checkDevice
Initializes any internal resources needed by the device p This method is called after code create code p p If subclasses reimplement this method they must call the code super code implementation p see create protected void init colorspace OS CG Color Space Create DeviceRGB if colorspace 0 SWT error SWT ERROR NO HANDLES Create the standard colors COLOR BLACK new Color this 0 0 0 COLOR DARK RED new Color this 0x80 0 0 COLOR DARK GREEN new Color this 0 0x80 0 COLOR DARK YELLOW new Color this 0x80 0x80 0 COLOR DARK BLUE new Color this 0 0 0x80 COLOR DARK MAGENTA new Color this 0x80 0 0x80 COLOR DARK CYAN new Color this 0 0x80 0x80 COLOR GRAY new Color this 0xC0 0xC0 0xC0 COLOR DARK GRAY new Color this 0x80 0x80 0x80 COLOR RED new Color this 0xFF 0 0 COLOR GREEN new Color this 0 0xFF 0 COLOR YELLOW new Color this 0xFF 0xFF 0 COLOR BLUE new Color this 0 0 0xFF COLOR MAGENTA new Color this 0xFF 0 0xFF COLOR CYAN new Color this 0 0xFF 0xFF COLOR WHITE new Color this 0xFF 0xFF 0xFF Initialize the system font slot TEMPORARY CODE boolean small Fonts System get Property org eclipse swt internal carbon small Fonts null byte family new byte 256 short size new short 1 byte style new byte 1 int theme Font small Fonts OS k Theme Small System Font OS k Theme System Font OS Get Theme Font short theme Font short OS sm System Script family size style short id OS FM Get Font Family From Name family int font new int 1 OS FM Get Font From Font Family Instance id style 0 font null system Font Font carbon new this font 0 id style 0 size 0  CGColorSpaceCreateDeviceRGB ERROR_NO_HANDLES COLOR_BLACK COLOR_DARK_RED COLOR_DARK_GREEN COLOR_DARK_YELLOW COLOR_DARK_BLUE COLOR_DARK_MAGENTA COLOR_DARK_CYAN COLOR_GRAY COLOR_DARK_GRAY COLOR_RED COLOR_GREEN COLOR_YELLOW COLOR_BLUE COLOR_MAGENTA COLOR_CYAN COLOR_WHITE smallFonts getProperty smallFonts themeFont smallFonts kThemeSmallSystemFont kThemeSystemFont GetThemeFont themeFont smSystemScript FMGetFontFamilyFromName FMGetFontFromFontFamilyInstance systemFont carbon_new
Invokes platform specific functionality to allocate a new GC handle p b IMPORTANT b This method is em not em part of the public API for code Device code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param data the platform specific GC data return the platform specific GC handle 
Invokes platform specific functionality to dispose a GC handle p b IMPORTANT b This method is em not em part of the public API for code Device code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param hDC the platform specific GC handle param data the platform specific GC data 
Returns code true code if the device has been disposed and code false code otherwise p This method gets the dispose state for the device When a device has been disposed it is an error to invoke any other method using the device return code true code when the device is disposed and code false code otherwise public boolean is Disposed return disposed  isDisposed
void new Object Object object for int i 0 i objects length i if objects i null objects i object errors i new Error return Object new Objects new Object objects length 128 System arraycopy objects 0 new Objects 0 objects length new Objects objects length object objects new Objects Error new Errors new Error errors length 128 System arraycopy errors 0 new Errors 0 errors length new Errors errors length new Error errors new Errors  new_Object newObjects newObjects newObjects newObjects newErrors newErrors newErrors newErrors
Releases any internal resources back to the operating system and clears all fields except the device handle p When a device is destroyed resources that were acquired on behalf of the programmer need to be returned to the operating system For example if the device allocated a font to be used as the system font this font would be freed in code release code Also to assist the garbage collector and minimize the amount of memory that is not reclaimed when the programmer keeps a reference to a disposed device all fields except the handle are zero d The handle is needed by code destroy code p This method is called before code destroy code p p If subclasses reimplement this method they must call the code super code implementation p see dispose see destroy protected void release OS CG Color Space Release colorspace colorspace 0 COLOR BLACK COLOR DARK RED COLOR DARK GREEN COLOR DARK YELLOW COLOR DARK BLUE COLOR DARK MAGENTA COLOR DARK CYAN COLOR GRAY COLOR DARK GRAY COLOR RED COLOR GREEN COLOR YELLOW COLOR BLUE COLOR MAGENTA COLOR CYAN COLOR WHITE null  CGColorSpaceRelease COLOR_BLACK COLOR_DARK_RED COLOR_DARK_GREEN COLOR_DARK_YELLOW COLOR_DARK_BLUE COLOR_DARK_MAGENTA COLOR_DARK_CYAN COLOR_GRAY COLOR_DARK_GRAY COLOR_RED COLOR_GREEN COLOR_YELLOW COLOR_BLUE COLOR_MAGENTA COLOR_CYAN COLOR_WHITE
If the underlying window system supports printing warning messages to the console setting warnings to code true code prevents these messages from being printed If the argument is code false code message printing is not blocked param warnings code true code if warnings should be handled and code false code otherwise exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public void set Warnings boolean warnings check Device this warnings warnings  SWTException ERROR_DEVICE_DISPOSED setWarnings checkDevice

int atsui Style Font  atsuiStyle
Constructs a new font given a device and font data which describes the desired font s appearance p You must dispose the font when it is no longer required p param device the device to create the font on param fd the Font Data that describes the desired font must not be null exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li li ERROR NULL ARGUMENT if the fd argument is null li ul exception SWT Error ul li ERROR NO HANDLES if a font could not be created from the given font data li ul public Font Device device Font Data fd if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT if fd null SWT error SWT ERROR NULL ARGUMENT init device fd get Name fd get Height fd get Style  FontData IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT SWTError ERROR_NO_HANDLES FontData getDevice ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT getName getHeight getStyle
Constructs a new font given a device and an array of font data which describes the desired font s appearance p You must dispose the font when it is no longer required p param device the device to create the font on param fds the array of Font Data that describes the desired font must not be null exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li li ERROR NULL ARGUMENT if the fds argument is null li li ERROR INVALID ARGUMENT if the length of fds is zero li li ERROR NULL ARGUMENT if any fd in the array is null li ul exception SWT Error ul li ERROR NO HANDLES if a font could not be created from the given font data li ul since 2 1 public Font Device device Font Data fds if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT if fds null SWT error SWT ERROR NULL ARGUMENT if fds length 0 SWT error SWT ERROR INVALID ARGUMENT Font Data fd fds 0 if fd null SWT error SWT ERROR NULL ARGUMENT init device fd get Name fd get Height fd get Style  FontData IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_NULL_ARGUMENT SWTError ERROR_NO_HANDLES FontData getDevice ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT FontData ERROR_NULL_ARGUMENT getName getHeight getStyle
Constructs a new font given a device a font name the height of the desired font in points and a font style p You must dispose the font when it is no longer required p param device the device to create the font on param name the name of the font must not be null param height the font height in points param style a bit or combination of NORMAL BOLD ITALIC exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li li ERROR NULL ARGUMENT if the name argument is null li li ERROR INVALID ARGUMENT if the height is negative li ul exception SWT Error ul li ERROR NO HANDLES if a font could not be created from the given arguments li ul public Font Device device String name int height int style if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT init device name height style  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTError ERROR_NO_HANDLES getDevice ERROR_NULL_ARGUMENT
int create Style int buffer new int 1 OS ATSU Create Style buffer if buffer 0 0 SWT error SWT ERROR NO HANDLES int atsu Style buffer 0 short real Style new short 1 OS FM Get Font From Font Family Instance id style buffer real Style boolean synthesize style real Style 0 int ptr OS New Ptr 8 synthesize 8 0 OS memcpy ptr new int handle 4 OS memcpy ptr 4 new int OS X2 Fix size 4 int tags sizes values if synthesize OS memcpy ptr 8 new byte style OS bold 0 byte 1 0 1 OS memcpy ptr 9 new byte style OS italic 0 byte 1 0 1 tags new int OS kATSU Font Tag OS kATSU Size Tag OS kATSUQD Boldface Tag OS kATSUQD Italic Tag sizes new int 4 4 1 1 values new int ptr ptr 4 ptr 8 ptr 9 else tags new int OS kATSU Font Tag OS kATSU Size Tag sizes new int 4 4 values new int ptr ptr 4 OS ATSU Set Attributes atsu Style tags length tags sizes values OS Dispose Ptr ptr short types short OS k Ligatures Type short OS k Ligatures Type short OS k Ligatures Type short OS k Ligatures Type short OS k Ligatures Type short OS k Ligatures Type short OS k Ligatures Type short OS k Ligatures Type short selectors short OS k Required Ligatures Off Selector short OS k Common Ligatures Off Selector short OS k Rare Ligatures Off Selector short OS k Logos Off Selector short OS k Rebus Pictures Off Selector short OS k Diphthong Ligatures Off Selector short OS k Squared Ligatures Off Selector short OS k Abbrev Squared Ligatures Off Selector short OS k Symbol Ligatures Off Selector OS ATSU Set Font Features atsu Style types length types selectors return atsu Style  createStyle ATSUCreateStyle ERROR_NO_HANDLES atsuStyle realStyle FMGetFontFromFontFamilyInstance realStyle realStyle NewPtr X2Fix kATSUFontTag kATSUSizeTag kATSUQDBoldfaceTag kATSUQDItalicTag kATSUFontTag kATSUSizeTag ATSUSetAttributes atsuStyle DisposePtr kLigaturesType kLigaturesType kLigaturesType kLigaturesType kLigaturesType kLigaturesType kLigaturesType kLigaturesType kRequiredLigaturesOffSelector kCommonLigaturesOffSelector kRareLigaturesOffSelector kLogosOffSelector kRebusPicturesOffSelector kDiphthongLigaturesOffSelector kSquaredLigaturesOffSelector kAbbrevSquaredLigaturesOffSelector kSymbolLigaturesOffSelector ATSUSetFontFeatures atsuStyle atsuStyle
Disposes of the operating system resources associated with the font Applications must dispose of all fonts which they allocate public void dispose if handle 0 return handle 0 id 1 if atsui Style 0 OS ATSU Dispose Style atsui Style atsui Style 0 device null  atsuiStyle ATSUDisposeStyle atsuiStyle atsuiStyle
Compares the argument to the receiver and returns true if they represent the em same em object using a class specific comparison param object the object to compare with this object return code true code if the object is the same as this object and code false code otherwise see hash Code public boolean equals Object object if object this return true if object instanceof Font return false Font font Font object return handle font handle size font size  hashCode
Returns an array of code Font Data code s representing the receiver On Windows only one Font Data will be returned per font On X however a code Font code object em may em be composed of multiple X fonts To support this case we return an array of font data objects return an array of font data objects describing the receiver exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Font Data get Font Data if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED int actual Length new int 1 OS ATSU Find Font Name handle OS k Font Family Name OS k Font No Platform Code OS k Font No Script Code OS k Font No Language Code 0 null actual Length null byte buffer new byte actual Length 0 OS ATSU Find Font Name handle OS k Font Family Name OS k Font No Platform Code OS k Font No Script Code OS k Font No Language Code buffer length buffer actual Length null String name new String buffer int style SWT NORMAL if this style OS italic 0 style SWT ITALIC if this style OS bold 0 style SWT BOLD Font Data data new Font Data name size style return new Font Data data  FontData FontData SWTException ERROR_GRAPHIC_DISPOSED FontData getFontData isDisposed ERROR_GRAPHIC_DISPOSED actualLength ATSUFindFontName kFontFamilyName kFontNoPlatformCode kFontNoScriptCode kFontNoLanguageCode actualLength actualLength ATSUFindFontName kFontFamilyName kFontNoPlatformCode kFontNoScriptCode kFontNoLanguageCode actualLength FontData FontData FontData
Invokes platform specific functionality to allocate a new font p b IMPORTANT b This method is em not em part of the public API for code Font code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param device the device on which to allocate the color param handle the handle for the font param size the size for the font private public static Font carbon new Device device int handle short id short style short size if device null device Device get Device Font font new Font font handle handle font id id font style style font size size font device device return font  carbon_new getDevice
Returns an integer hash code for the receiver Any two objects which return code true code when passed to code equals code must return the same value for this method return the receiver s hash see equals public int hash Code return handle  hashCode
void init Device device String name int height int style if name null SWT error SWT ERROR NULL ARGUMENT if height 0 SWT error SWT ERROR INVALID ARGUMENT byte buffer new byte 256 int length name length if length 255 length 255 buffer 0 byte length for int i 0 i length i buffer i 1 byte name char At i this id OS FM Get Font Family From Name buffer if this id OS k Invalid Font Family this id OS Get App Font if style SWT ITALIC 0 this style OS italic if style SWT BOLD 0 this style OS bold this size short height int font new int 1 if OS FM Get Font From Font Family Instance id this style font null 0 SWT error SWT ERROR NO HANDLES if font 0 0 SWT error SWT ERROR NO HANDLES this handle font 0 this atsui Style create Style  ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT charAt FMGetFontFamilyFromName kInvalidFontFamily GetAppFont FMGetFontFromFontFamilyInstance ERROR_NO_HANDLES ERROR_NO_HANDLES atsuiStyle createStyle
Returns code true code if the font has been disposed and code false code otherwise p This method gets the dispose state for the font When a font has been disposed it is an error to invoke any other method using the font return code true code when the font is disposed and code false code otherwise public boolean is Disposed return handle 0  isDisposed
Returns a string containing a concise human readable description of the receiver return a string representation of the receiver public String to String if is Disposed return Font DISPOSED return Font handle  toString isDisposed

Constructs a new un initialized font data public Font Data this 12 SWT NORMAL  FontData
Constructs a new Font Data given a string representation in the form generated by the code Font Data to String code method p Note that the representation varies between platforms and a Font Data can only be created from a string that was generated on the same platform p param string the string representation of a code Font Data code must not be null exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li li ERROR INVALID ARGUMENT if the argument does not represent a valid description li ul see to String public Font Data String string if string null SWT error SWT ERROR NULL ARGUMENT int start 0 int end string index Of if end 1 SWT error SWT ERROR INVALID ARGUMENT String version1 string substring start end try if Integer parse Int version1 1 SWT error SWT ERROR INVALID ARGUMENT catch Number Format Exception e SWT error SWT ERROR INVALID ARGUMENT start end 1 end string index Of start if end 1 SWT error SWT ERROR INVALID ARGUMENT String name string substring start end start end 1 end string index Of start if end 1 SWT error SWT ERROR INVALID ARGUMENT int height 0 try height Integer parse Int string substring start end catch Number Format Exception e SWT error SWT ERROR INVALID ARGUMENT start end 1 end string index Of start if end 1 SWT error SWT ERROR INVALID ARGUMENT int style 0 try style Integer parse Int string substring start end catch Number Format Exception e SWT error SWT ERROR INVALID ARGUMENT start end 1 end string index Of start set Name name set Height height set Style style if end 1 return String platform string substring start end start end 1 end string index Of start if end 1 return String version2 string substring start end if platform equals CARBON version2 equals 1 return  FontData FontData toString FontData FontData IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT toString FontData ERROR_NULL_ARGUMENT indexOf ERROR_INVALID_ARGUMENT parseInt ERROR_INVALID_ARGUMENT NumberFormatException ERROR_INVALID_ARGUMENT indexOf ERROR_INVALID_ARGUMENT indexOf ERROR_INVALID_ARGUMENT parseInt NumberFormatException ERROR_INVALID_ARGUMENT indexOf ERROR_INVALID_ARGUMENT parseInt NumberFormatException ERROR_INVALID_ARGUMENT indexOf setName setHeight setStyle indexOf
Constructs a new font data given a font name the height of the desired font in points and a font style param name the name of the font must not be null param height the font height in points param style a bit or combination of NORMAL BOLD ITALIC exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when the font name is null li li ERROR INVALID ARGUMENT if the height is negative li ul public Font Data String name int height int style set Name name set Height height set Style style  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT FontData setName setHeight setStyle
Compares the argument to the receiver and returns true if they represent the em same em object using a class specific comparison param object the object to compare with this object return code true code if the object is the same as this object and code false code otherwise see hash Code public boolean equals Object object if object this return true if object instanceof Font Data return false Font Data data Font Data object return name equals data name height data height style data style  hashCode FontData FontData FontData
Returns the height of the receiver in points return the height of this Font Data see set Height public int get Height return height  FontData setHeight getHeight
Returns the locale of the receiver p The locale determines which platform character set this font is going to use Widgets and graphics operations that use this font will convert UNICODE strings to the platform character set of the specified locale p p On platforms where there are multiple character sets for a given language country locale the variant portion of the locale will determine the character set p return the code String code representing a Locale object since 3 0 public String get Locale String Buffer buffer new String Buffer char sep   if lang null buffer append lang buffer append sep if country null buffer append country buffer append sep if variant null buffer append variant String result buffer to String int length result length if length 0 if result char At length 1 sep result result substring 0 length 1 return result  getLocale StringBuffer StringBuffer _ toString charAt
Returns the name of the receiver On platforms that support font foundries the return value will be the foundry followed by a dash followed by the face name return the name of this code Font Data code see set Name public String get Name return name  FontData setName getName
Returns the style of the receiver which is a bitwise OR of one or more of the code SWT code constants NORMAL BOLD and ITALIC return the style of this code Font Data code see set Style public int get Style return style  FontData setStyle getStyle
Returns an integer hash code for the receiver Any two objects which return code true code when passed to code equals code must return the same value for this method return the receiver s hash see equals public int hash Code return name hash Code height style  hashCode hashCode
Sets the height of the receiver The parameter is specified in terms of points where a point is one seventy second of an inch param height the height of the code Font Data code exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the height is negative li ul see get Height public void set Height int height if height 0 SWT error SWT ERROR INVALID ARGUMENT this height height  FontData IllegalArgumentException ERROR_INVALID_ARGUMENT getHeight setHeight ERROR_INVALID_ARGUMENT
Sets the locale of the receiver p The locale determines which platform character set this font is going to use Widgets and graphics operations that use this font will convert UNICODE strings to the platform character set of the specified locale p p On platforms where there are multiple character sets for a given language country locale the variant portion of the locale will determine the character set p param locale the code String code representing a Locale object see java util Locale to String public void set Locale String locale lang country variant null if locale null char sep   int length locale length int first Sep second Sep first Sep locale index Of sep if first Sep 1 first Sep second Sep length else second Sep locale index Of sep first Sep 1 if second Sep 1 second Sep length if first Sep 0 lang locale substring 0 first Sep if second Sep first Sep 1 country locale substring first Sep 1 second Sep if length second Sep 1 variant locale substring second Sep 1  toString setLocale _ firstSep secondSep firstSep indexOf firstSep firstSep secondSep secondSep indexOf firstSep secondSep secondSep firstSep firstSep secondSep firstSep firstSep secondSep secondSep secondSep
Sets the name of the receiver p Some platforms support font foundries On these platforms the name of the font specified in set Name may have one of the following forms ol li a face name for example courier li li a foundry followed by a dash followed by a face name for example adobe courier li ol In either case the name returned from get Name will include the foundry p p On platforms that do not support font foundries only the face name for example courier is used in code set Name code and code get Name code p param name the name of the font data must not be null exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when the font name is null li ul see get Name public void set Name String name if name null SWT error SWT ERROR NULL ARGUMENT this name name  setName getName setName getName IllegalArgumentException ERROR_NULL_ARGUMENT getName setName ERROR_NULL_ARGUMENT
Sets the style of the receiver to the argument which must be a bitwise OR of one or more of the code SWT code constants NORMAL BOLD and ITALIC param style the new style for this code Font Data code see get Style public void set Style int style this style style  FontData getStyle setStyle
Returns a string representation of the receiver which is suitable for constructing an equivalent instance using the code Font Data String code constructor return a string representation of the Font Data see Font Data public String to String String Buffer buffer new String Buffer buffer append 1 buffer append get Name buffer append buffer append get Height buffer append buffer append get Style buffer append buffer append CARBON 1 return buffer to String  FontData FontData FontData toString StringBuffer StringBuffer getName getHeight getStyle toString

int ascent descent average Char Width leading height Font Metrics  averageCharWidth FontMetrics
public static Font Metrics carbon new int ascent int descent int average Char Width int leading int height Font Metrics font Metrics new Font Metrics font Metrics ascent ascent font Metrics descent descent font Metrics average Char Width average Char Width font Metrics leading leading font Metrics height height return font Metrics  FontMetrics carbon_new averageCharWidth FontMetrics fontMetrics FontMetrics fontMetrics fontMetrics fontMetrics averageCharWidth averageCharWidth fontMetrics fontMetrics fontMetrics
Compares the argument to the receiver and returns true if they represent the em same em object using a class specific comparison param object the object to compare with this object return code true code if the object is the same as this object and code false code otherwise see hash Code public boolean equals Object object if object this return true if object instanceof Font Metrics return false Font Metrics metrics Font Metrics object return ascent metrics ascent descent metrics descent average Char Width metrics average Char Width leading metrics leading height metrics height  hashCode FontMetrics FontMetrics FontMetrics averageCharWidth averageCharWidth
Returns the ascent of the font described by the receiver A font s em ascent em is the distance from the baseline to the top of actual characters not including any of the leading area measured in pixels return the ascent of the font public int get Ascent return ascent  getAscent
Returns the average character width measured in pixels of the font described by the receiver return the average character width of the font public int get Average Char Width return average Char Width  getAverageCharWidth averageCharWidth
Returns the descent of the font described by the receiver A font s em descent em is the distance from the baseline to the bottom of actual characters not including any of the leading area measured in pixels return the descent of the font public int get Descent return descent  getDescent
Returns the height of the font described by the receiver measured in pixels A font s em height em is the sum of its ascent descent and leading area return the height of the font see get Ascent see get Descent see get Leading public int get Height return height  getAscent getDescent getLeading getHeight
Returns the leading area of the font described by the receiver A font s em leading area em is the space above its ascent which may include accents or other marks return the leading space of the font public int get Leading return leading  getLeading
Returns an integer hash code for the receiver Any two objects which return code true code when passed to code equals code must return the same value for this method return the receiver s hash see equals public int hash Code return ascent descent average Char Width leading height  hashCode averageCharWidth

static final int TAB COUNT 32 GC  TAB_COUNT
Constructs a new instance of this class which has been configured to draw on the specified drawable Sets the foreground and background color in the GC to match those in the drawable p You must dispose the graphics context when it is no longer required p param drawable the drawable to draw on exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the drawable is null li li ERROR NULL ARGUMENT if there is no current device li li ERROR INVALID ARGUMENT if the drawable is an image that is not a bitmap or an icon if the drawable is an image or printer that is already selected into another graphics context li ul exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for gc creation li ul public GC Drawable drawable this drawable 0  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTError ERROR_NO_HANDLES
Constructs a new instance of this class which has been configured to draw on the specified drawable Sets the foreground and background color in the GC to match those in the drawable p You must dispose the graphics context when it is no longer required p param drawable the drawable to draw on param style the style of GC to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the drawable is null li li ERROR NULL ARGUMENT if there is no current device li li ERROR INVALID ARGUMENT if the drawable is an image that is not a bitmap or an icon if the drawable is an image or printer that is already selected into another graphics context li ul exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for gc creation li ul since 2 1 2 public GC Drawable drawable int style if drawable null SWT error SWT ERROR NULL ARGUMENT GC Data data new GC Data data style check Style style int gdkGC drawable internal new GC data Device device data device if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT data device device init drawable data gdkGC  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTError ERROR_NO_HANDLES ERROR_NULL_ARGUMENT GCData GCData checkStyle internal_new_GC getDevice ERROR_NULL_ARGUMENT
static int check Style int style if style SWT LEFT TO RIGHT 0 style SWT RIGHT TO LEFT return style SWT LEFT TO RIGHT SWT RIGHT TO LEFT  checkStyle LEFT_TO_RIGHT RIGHT_TO_LEFT LEFT_TO_RIGHT RIGHT_TO_LEFT
Invokes platform specific functionality to allocate a new graphics context p b IMPORTANT b This method is em not em part of the public API for code GC code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param drawable the Drawable for the receiver param data the data for the receiver return a new code GC code private public static GC carbon new Drawable drawable GC Data data GC gc new GC int context drawable internal new GC data gc init drawable data context return gc  carbon_new GCData internal_new_GC
Copies a rectangular area of the receiver at the specified position into the image which must be of type code SWT BITMAP code param image the image to copy into param x the x coordinate in the receiver of the area to be copied param y the y coordinate in the receiver of the area to be copied exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the image is null li li ERROR INVALID ARGUMENT if the image is not a bitmap or has been disposed li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void copy Area Image image int x int y if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if image null SWT error SWT ERROR NULL ARGUMENT if image type SWT BITMAP image is Disposed SWT error SWT ERROR INVALID ARGUMENT if data control 0 int offscreen new int 1 OS HI View Create Offscreen Image data control 0 null offscreen copy Area image x y offscreen 0 if offscreen 0 0 OS CG Image Release offscreen 0 else if data image null copy Area image x y data image handle else if data window 0 int image Handle image handle CG Rect rect new CG Rect rect x x rect y y rect width OS CG Image Get Width image Handle rect height OS CG Image Get Height image Handle int displays new int 16 int count new int 1 if OS CG Get Displays With Rect rect displays length displays count 0 return for int i 0 i count 0 i int display displays i int address OS CG Display Base Address display if address 0 int width OS CG Display Pixels Wide display int height OS CG Display Pixels High display int bpr OS CG Display Bytes Per Row display int bpp OS CG Display Bits Per Pixel display int bps OS CG Display Bits Per Sample display int provider OS CG Data Provider Create With Data 0 address bpr height 0 int src Image OS CG Image Create width height bps bpp bpr data device colorspace OS kCG Image Alpha None Skip First provider null false 0 OS CG Data Provider Release provider copy Area image x y src Image if src Image 0 OS CG Image Release src Image  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED copyArea ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT HIViewCreateOffscreenImage copyArea CGImageRelease copyArea imageHandle CGRect CGRect CGImageGetWidth imageHandle CGImageGetHeight imageHandle CGGetDisplaysWithRect CGDisplayBaseAddress CGDisplayPixelsWide CGDisplayPixelsHigh CGDisplayBytesPerRow CGDisplayBitsPerPixel CGDisplayBitsPerSample CGDataProviderCreateWithData srcImage CGImageCreate kCGImageAlphaNoneSkipFirst CGDataProviderRelease copyArea srcImage srcImage CGImageRelease srcImage
void copy Area Image image int x int y int src Image if src Image 0 return int image Handle image handle int bpc OS CG Image Get Bits Per Component image Handle int width OS CG Image Get Width image Handle int height OS CG Image Get Height image Handle int bpr OS CG Image Get Bytes Per Row image Handle int alpha Info OS CG Image Get Alpha Info image Handle int context OS CG Bitmap Context Create image data width height bpc bpr data device colorspace alpha Info if context 0 CG Rect rect new CG Rect rect x x rect y y rect width OS CG Image Get Width src Image rect height OS CG Image Get Height src Image OS CG Context TranslateCTM context 0 rect height height OS CG Context Draw Image context rect src Image OS CG Context Release context  copyArea srcImage srcImage imageHandle CGImageGetBitsPerComponent imageHandle CGImageGetWidth imageHandle CGImageGetHeight imageHandle CGImageGetBytesPerRow imageHandle alphaInfo CGImageGetAlphaInfo imageHandle CGBitmapContextCreate alphaInfo CGRect CGRect CGImageGetWidth srcImage CGImageGetHeight srcImage CGContextTranslateCTM CGContextDrawImage srcImage CGContextRelease
Copies a rectangular area of the receiver at the source position onto the receiver at the destination position param srcX the x coordinate in the receiver of the area to be copied param srcY the y coordinate in the receiver of the area to be copied param width the width of the area to copy param height the height of the area to copy param destX the x coordinate in the receiver of the area to copy to param destY the y coordinate in the receiver of the area to copy to exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void copy Area int srcX int srcY int width int height int destX int destY if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if data update Clip setCG Clipping if width 0 height 0 return int deltaX destX srcX deltaY destY srcY if deltaX 0 deltaY 0 return if data image null OS CG Context SaveG State handle OS CG Context ScaleCTM handle 1 1 OS CG Context TranslateCTM handle 0 height 2 destY CG Rect rect new CG Rect rect x destX rect y destY rect width width rect height height NOT DONE transparency OS CG Context Draw Image handle rect data image handle OS CG Context RestoreG State handle return if data control 0 int port data port int window OS Get Control Owner data control if port 0 port OS Get Window Port window Calculate src and dest rectangles regions Rect rect new Rect OS Get Control Bounds data control rect Rect src Rect new Rect int left rect left srcX int top rect top srcY OS Set Rect src Rect short left short top short left width short top height int src Rgn OS New Rgn OS Rect Rgn src Rgn src Rect OS Sect Rect rect src Rect src Rect Rect dest Rect new Rect OS Set Rect dest Rect src Rect left src Rect top src Rect right src Rect bottom OS Offset Rect dest Rect short deltaX short deltaY int dest Rgn OS New Rgn OS Rect Rgn dest Rgn dest Rect Copy bits with appropriated clipping region if OS Empty Rect src Rect if data visible Rgn 0 OS Rect In Rgn src Rect data visible Rgn int clip Rgn data visible Rgn if data clip Rgn 0 clip Rgn OS New Rgn OS Sect Rgn data clip Rgn data visible Rgn clip Rgn Feature in the Macintosh Scroll Rect only copies bits that are inside the specified rectangle This means that it is not possible to copy non overlaping bits without copying the bits in between the source and destination rectangles The fix is to check if the source and destination rectangles are disjoint and use Copy Bits instead if OS Empty Rgn clip Rgn boolean disjoint destX width srcX srcX width destX destY height srcY srcY height destY if disjoint deltaX 0 deltaY 0 int current Port new int 1 OS Get Port current Port OS Set Port port int old Clip OS New Rgn OS Get Clip old Clip OS Set Clip clip Rgn OS Union Rect src Rect dest Rect rect OS Scroll Rect rect short deltaX short deltaY 0 OS Set Clip old Clip OS Dispose Rgn old Clip OS Set Port current Port 0 else int port Bit Map OS Get Port Bit Map For Copy Bits port OS Copy Bits port Bit Map port Bit Map src Rect dest Rect short OS src Copy clip Rgn OS QD Flush Port Buffer port dest Rgn if clip Rgn data visible Rgn OS Dispose Rgn clip Rgn Invalidate src and obscured areas int inval Rgn OS New Rgn OS Diff Rgn src Rgn data visible Rgn inval Rgn OS Offset Rgn inval Rgn short deltaX short deltaY OS Diff Rgn src Rgn dest Rgn src Rgn OS Union Rgn src Rgn inval Rgn inval Rgn OS Sect Rgn data visible Rgn inval Rgn inval Rgn OS Inval Window Rgn window inval Rgn OS Dispose Rgn inval Rgn Dispose src and dest regions OS Dispose Rgn dest Rgn OS Dispose Rgn src Rgn  SWTException ERROR_GRAPHIC_DISPOSED copyArea ERROR_GRAPHIC_DISPOSED updateClip setCGClipping CGContextSaveGState CGContextScaleCTM CGContextTranslateCTM CGRect CGRect CGContextDrawImage CGContextRestoreGState GetControlOwner GetWindowPort GetControlBounds srcRect SetRect srcRect srcRgn NewRgn RectRgn srcRgn srcRect SectRect srcRect srcRect destRect SetRect destRect srcRect srcRect srcRect srcRect OffsetRect destRect destRgn NewRgn RectRgn destRgn destRect EmptyRect srcRect visibleRgn RectInRgn srcRect visibleRgn clipRgn visibleRgn clipRgn clipRgn NewRgn SectRgn clipRgn visibleRgn clipRgn ScrollRect CopyBits EmptyRgn clipRgn currentPort GetPort currentPort SetPort oldClip NewRgn GetClip oldClip SetClip clipRgn UnionRect srcRect destRect ScrollRect SetClip oldClip DisposeRgn oldClip SetPort currentPort portBitMap GetPortBitMapForCopyBits CopyBits portBitMap portBitMap srcRect destRect srcCopy clipRgn QDFlushPortBuffer destRgn clipRgn visibleRgn DisposeRgn clipRgn invalRgn NewRgn DiffRgn srcRgn visibleRgn invalRgn OffsetRgn invalRgn DiffRgn srcRgn destRgn srcRgn UnionRgn srcRgn invalRgn invalRgn SectRgn visibleRgn invalRgn invalRgn InvalWindowRgn invalRgn DisposeRgn invalRgn DisposeRgn destRgn DisposeRgn srcRgn
void create Layout int buffer new int 1 OS ATSU Create Text Layout buffer if buffer 0 0 SWT error SWT ERROR NO HANDLES data layout buffer 0 int ptr1 OS New Ptr 4 buffer 0 handle OS memcpy ptr1 buffer 4 int ptr2 OS New Ptr 4 buffer 0 OS kATS Line Use Device Metrics OS memcpy ptr2 buffer 4 int tags new int OS kATSUCG Context Tag OS kATSU Line Layout Options Tag int sizes new int 4 4 int values new int ptr1 ptr2 OS ATSU Set Layout Controls data layout tags length tags sizes values OS Dispose Ptr ptr1 OS Dispose Ptr ptr2  createLayout ATSUCreateTextLayout ERROR_NO_HANDLES NewPtr NewPtr kATSLineUseDeviceMetrics kATSUCGContextTag kATSULineLayoutOptionsTag ATSUSetLayoutControls DisposePtr DisposePtr
void create Tabs ATSU Tab tabs new ATSU Tab int tab Width get Char Width 8 int ptr OS New Ptr ATSU Tab sizeof TAB COUNT for int i 0 offset ptr i TAB COUNT i offset ATSU Tab sizeof tabs tab Position OS Long2 Fix tab Width OS memcpy offset tabs ATSU Tab sizeof data tabs ptr  createTabs ATSUTab ATSUTab tabWidth getCharWidth NewPtr ATSUTab TAB_COUNT TAB_COUNT ATSUTab tabPosition Long2Fix tabWidth ATSUTab
Disposes of the operating system resources associated with the graphics context Applications must dispose of all G Cs which they allocate public void dispose if handle 0 return if data device is Disposed return Free resources int clip Rgn data clip Rgn if clip Rgn 0 OS Dispose Rgn clip Rgn Image image data image if image null image memGC null if image transparent Pixel 1 image create Mask int layout data layout if layout 0 OS ATSU Dispose Text Layout layout int atsui Style data atsui Style if atsui Style 0 OS ATSU Dispose Style atsui Style int string Ptr data string Ptr if string Ptr 0 OS Dispose Ptr string Ptr int tabs data tabs if tabs 0 OS Dispose Ptr tabs Dispose the GC drawable internal dispose GC handle data data clip Rgn data atsui Style data string Ptr data layout data tabs 0 drawable null data image null data string null data null handle 0  GCs isDisposed clipRgn clipRgn clipRgn DisposeRgn clipRgn transparentPixel createMask ATSUDisposeTextLayout atsuiStyle atsuiStyle atsuiStyle ATSUDisposeStyle atsuiStyle stringPtr stringPtr stringPtr DisposePtr stringPtr DisposePtr internal_dispose_GC clipRgn atsuiStyle stringPtr
Draws the outline of a circular or elliptical arc within the specified rectangular area p The resulting arc begins at code start Angle code and extends for code arc Angle code degrees using the current color Angles are interpreted such that 0 degrees is at the 3 o clock position A positive value indicates a counter clockwise rotation while a negative value indicates a clockwise rotation p p The center of the arc is the center of the rectangle whose origin is code x code code y code and whose size is specified by the code width code and code height code arguments p p The resulting arc covers an area code width 1 code pixels wide by code height 1 code pixels tall p param x the x coordinate of the upper left corner of the arc to be drawn param y the y coordinate of the upper left corner of the arc to be drawn param width the width of the arc to be drawn param height the height of the arc to be drawn param start Angle the beginning angle param arc Angle the angular extent of the arc relative to the start angle exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw Arc int x int y int width int height int start Angle int arc Angle if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if data update Clip setCG Clipping if width 0 x x width width width if height 0 y y height height height if width 0 height 0 arc Angle 0 return OS CG Context Begin Path handle OS CG Context SaveG State handle float offset data line Width 2 1 0 5f 0f OS CG Context TranslateCTM handle x offset width 2f y offset height 2f OS CG Context ScaleCTM handle width 2f height 2f OS CG Context Add Arc handle 0 0 1 start Angle float Compatibility PI 180 start Angle arc Angle float Compatibility PI 180 true OS CG Context RestoreG State handle OS CG Context Stroke Path handle flush  startAngle arcAngle startAngle arcAngle SWTException ERROR_GRAPHIC_DISPOSED drawArc startAngle arcAngle ERROR_GRAPHIC_DISPOSED updateClip setCGClipping arcAngle CGContextBeginPath CGContextSaveGState lineWidth CGContextTranslateCTM CGContextScaleCTM CGContextAddArc startAngle startAngle arcAngle CGContextRestoreGState CGContextStrokePath
Draws a rectangle based on the specified arguments which has the appearance of the platform s em focus rectangle em if the platform supports such a notion and otherwise draws a simple rectangle in the receiver s foreground color param x the x coordinate of the rectangle param y the y coordinate of the rectangle param width the width of the rectangle param height the height of the rectangle exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see draw Rectangle public void draw Focus int x int y int width int height if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if data update Clip setCG Clipping NOT DONE draw Rectangle x y width 1 height 1 flush  SWTException ERROR_GRAPHIC_DISPOSED drawRectangle drawFocus ERROR_GRAPHIC_DISPOSED updateClip setCGClipping drawRectangle
Draws the given image in the receiver at the specified coordinates param image the image to draw param x the x coordinate of where to draw param y the y coordinate of where to draw exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the image is null li li ERROR INVALID ARGUMENT if the image has been disposed li li ERROR INVALID ARGUMENT if the given coordinates are outside the bounds of the image li exception SWT Error ul li ERROR NO HANDLES if no handles are available to perform the operation li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw Image Image image int x int y if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if image null SWT error SWT ERROR NULL ARGUMENT if image is Disposed SWT error SWT ERROR INVALID ARGUMENT draw Image image 0 0 1 1 x y 1 1 true  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT SWTError ERROR_NO_HANDLES SWTException ERROR_GRAPHIC_DISPOSED drawImage ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT drawImage
Copies a rectangular area from the source image into a potentially different sized rectangular area in the receiver If the source and destination areas are of differing sizes then the source area will be stretched or shrunk to fit the destination area as it is copied The copy fails if any part of the source rectangle lies outside the bounds of the source image or if any of the width or height arguments are negative param image the source image param srcX the x coordinate in the source image to copy from param srcY the y coordinate in the source image to copy from param src Width the width in pixels to copy from the source param src Height the height in pixels to copy from the source param destX the x coordinate in the destination to copy to param destY the y coordinate in the destination to copy to param dest Width the width in pixels of the destination rectangle param dest Height the height in pixels of the destination rectangle exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the image is null li li ERROR INVALID ARGUMENT if the image has been disposed li li ERROR INVALID ARGUMENT if any of the width or height arguments are negative li ERROR INVALID ARGUMENT if the source rectangle is not contained within the bounds of the source image li ul exception SWT Error ul li ERROR NO HANDLES if no handles are available to perform the operation li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw Image Image image int srcX int srcY int src Width int src Height int destX int destY int dest Width int dest Height if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if src Width 0 src Height 0 dest Width 0 dest Height 0 return if srcX 0 srcY 0 src Width 0 src Height 0 dest Width 0 dest Height 0 SWT error SWT ERROR INVALID ARGUMENT if image null SWT error SWT ERROR NULL ARGUMENT if image is Disposed SWT error SWT ERROR INVALID ARGUMENT draw Image image srcX srcY src Width src Height destX destY dest Width dest Height false  srcWidth srcHeight destWidth destHeight IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT SWTError ERROR_NO_HANDLES SWTException ERROR_GRAPHIC_DISPOSED drawImage srcWidth srcHeight destWidth destHeight ERROR_GRAPHIC_DISPOSED srcWidth srcHeight destWidth destHeight srcWidth srcHeight destWidth destHeight ERROR_INVALID_ARGUMENT ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT drawImage srcWidth srcHeight destWidth destHeight
void draw Image Image src Image int srcX int srcY int src Width int src Height int destX int destY int dest Width int dest Height boolean simple if data update Clip setCG Clipping int image Handle src Image handle int img Width OS CG Image Get Width image Handle int img Height OS CG Image Get Height image Handle if simple src Width dest Width img Width src Height dest Height img Height else simple srcX 0 srcY 0 src Width dest Width dest Width img Width src Height dest Height dest Height img Height if srcX src Width img Width srcY src Height img Height SWT error SWT ERROR INVALID ARGUMENT OS CG Context SaveG State handle OS CG Context ScaleCTM handle 1 1 OS CG Context TranslateCTM handle 0 dest Height 2 destY CG Rect rect new CG Rect rect x destX rect y destY rect width dest Width rect height dest Height if simple OS CG Context Draw Image handle rect image Handle else int bpc OS CG Image Get Bits Per Component image Handle int bpp OS CG Image Get Bits Per Pixel image Handle int bpr OS CG Image Get Bytes Per Row image Handle int colorspace OS CG Image Get Color Space image Handle int alpha Info OS CG Image Get Alpha Info image Handle int data src Image data srcY bpr srcX 4 int provider OS CG Data Provider Create With Data 0 data src Height bpr 0 if provider 0 int sub Image OS CG Image Create src Width src Height bpc bpp bpr colorspace alpha Info provider null false 0 OS CG Data Provider Release provider if sub Image 0 OS CG Context Draw Image handle rect sub Image OS CG Image Release sub Image OS CG Context RestoreG State handle flush  drawImage srcImage srcWidth srcHeight destWidth destHeight updateClip setCGClipping imageHandle srcImage imgWidth CGImageGetWidth imageHandle imgHeight CGImageGetHeight imageHandle srcWidth destWidth imgWidth srcHeight destHeight imgHeight srcWidth destWidth destWidth imgWidth srcHeight destHeight destHeight imgHeight srcWidth imgWidth srcHeight imgHeight ERROR_INVALID_ARGUMENT CGContextSaveGState CGContextScaleCTM CGContextTranslateCTM destHeight CGRect CGRect destWidth destHeight CGContextDrawImage imageHandle CGImageGetBitsPerComponent imageHandle CGImageGetBitsPerPixel imageHandle CGImageGetBytesPerRow imageHandle CGImageGetColorSpace imageHandle alphaInfo CGImageGetAlphaInfo imageHandle srcImage CGDataProviderCreateWithData srcHeight subImage CGImageCreate srcWidth srcHeight alphaInfo CGDataProviderRelease subImage CGContextDrawImage subImage CGImageRelease subImage CGContextRestoreGState
Draws a line using the foreground color between the points code x1 code code y1 code and code x2 code code y2 code param x1 the first point s x coordinate param y1 the first point s y coordinate param x2 the second point s x coordinate param y2 the second point s y coordinate exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw Line int x1 int y1 int x2 int y2 if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if data update Clip setCG Clipping OS CG Context Begin Path handle float offset data line Width 2 1 0 5f 0f OS CG Context Move To Point handle x1 offset y1 offset OS CG Context Add Line To Point handle x2 offset y2 offset OS CG Context Stroke Path handle flush  SWTException ERROR_GRAPHIC_DISPOSED drawLine ERROR_GRAPHIC_DISPOSED updateClip setCGClipping CGContextBeginPath lineWidth CGContextMoveToPoint CGContextAddLineToPoint CGContextStrokePath
Draws the outline of an oval using the foreground color within the specified rectangular area p The result is a circle or ellipse that fits within the rectangle specified by the code x code code y code code width code and code height code arguments p p The oval covers an area that is code width 1 code pixels wide and code height 1 code pixels tall p param x the x coordinate of the upper left corner of the oval to be drawn param y the y coordinate of the upper left corner of the oval to be drawn param width the width of the oval to be drawn param height the height of the oval to be drawn exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw Oval int x int y int width int height if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if data update Clip setCG Clipping if width 0 x x width width width if height 0 y y height height height OS CG Context Begin Path handle OS CG Context SaveG State handle float offset data line Width 2 1 0 5f 0f OS CG Context TranslateCTM handle x offset width 2f y offset height 2f OS CG Context ScaleCTM handle width 2f height 2f OS CG Context Move To Point handle 1 0 OS CG Context Add Arc handle 0 0 1 0 float 2 Compatibility PI true OS CG Context RestoreG State handle OS CG Context Stroke Path handle flush  SWTException ERROR_GRAPHIC_DISPOSED drawOval ERROR_GRAPHIC_DISPOSED updateClip setCGClipping CGContextBeginPath CGContextSaveGState lineWidth CGContextTranslateCTM CGContextScaleCTM CGContextMoveToPoint CGContextAddArc CGContextRestoreGState CGContextStrokePath
Draws a pixel using the foreground color at the specified point code x code code y code p Note that the receiver s line attributes do not affect this operation p param x the point s x coordinate param y the point s y coordinate exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul since 3 0 public void draw Point int x int y if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if data update Clip setCG Clipping CG Rect rect new CG Rect rect x x rect y y rect width 1 rect height 1 OS CG Context Set Fill Color handle data foreground OS CG Context Fill Rect handle rect OS CG Context Set Fill Color handle data background flush  SWTException ERROR_GRAPHIC_DISPOSED drawPoint ERROR_GRAPHIC_DISPOSED updateClip setCGClipping CGRect CGRect CGContextSetFillColor CGContextFillRect CGContextSetFillColor
Draws the closed polygon which is defined by the specified array of integer coordinates using the receiver s foreground color The array contains alternating x and y values which are considered to represent points which are the vertices of the polygon Lines are drawn between each consecutive pair and between the first pair and last pair in the array param point Array an array of alternating x and y values which are the vertices of the polygon exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if point Array is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw Polygon int point Array if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if point Array null SWT error SWT ERROR NULL ARGUMENT if data update Clip setCG Clipping float points new float point Array length for int i 0 i points length i points i point Array i OS CG Context Begin Path handle OS CG Context Add Lines handle points points length 2 OS CG Context Close Path handle OS CG Context Stroke Path handle flush  pointArray IllegalArgumentException ERROR_NULL_ARGUMENT pointArray SWTException ERROR_GRAPHIC_DISPOSED drawPolygon pointArray ERROR_GRAPHIC_DISPOSED pointArray ERROR_NULL_ARGUMENT updateClip setCGClipping pointArray pointArray CGContextBeginPath CGContextAddLines CGContextClosePath CGContextStrokePath
Draws the polyline which is defined by the specified array of integer coordinates using the receiver s foreground color The array contains alternating x and y values which are considered to represent points which are the corners of the polyline Lines are drawn between each consecutive pair but not between the first pair and last pair in the array param point Array an array of alternating x and y values which are the corners of the polyline exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the point array is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw Polyline int point Array if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if point Array null SWT error SWT ERROR NULL ARGUMENT if data update Clip setCG Clipping float points new float point Array length for int i 0 i points length i points i point Array i 0 5f OS CG Context Begin Path handle OS CG Context Add Lines handle points points length 2 OS CG Context Stroke Path handle flush  pointArray IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED drawPolyline pointArray ERROR_GRAPHIC_DISPOSED pointArray ERROR_NULL_ARGUMENT updateClip setCGClipping pointArray pointArray CGContextBeginPath CGContextAddLines CGContextStrokePath
Draws the outline of the rectangle specified by the arguments using the receiver s foreground color The left and right edges of the rectangle are at code x code and code x width code The top and bottom edges are at code y code and code y height code param x the x coordinate of the rectangle to be drawn param y the y coordinate of the rectangle to be drawn param width the width of the rectangle to be drawn param height the height of the rectangle to be drawn exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw Rectangle int x int y int width int height if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if data update Clip setCG Clipping if width 0 x x width width width if height 0 y y height height height CG Rect rect new CG Rect float offset data line Width 2 1 0 5f 0f rect x x offset rect y y offset rect width width rect height height OS CG Context Stroke Rect handle rect flush  SWTException ERROR_GRAPHIC_DISPOSED drawRectangle ERROR_GRAPHIC_DISPOSED updateClip setCGClipping CGRect CGRect lineWidth CGContextStrokeRect
Draws the outline of the specified rectangle using the receiver s foreground color The left and right edges of the rectangle are at code rect x code and code rect x rect width code The top and bottom edges are at code rect y code and code rect y rect height code param rect the rectangle to draw exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the rectangle is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw Rectangle Rectangle rect if rect null SWT error SWT ERROR NULL ARGUMENT draw Rectangle rect x rect y rect width rect height  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED drawRectangle ERROR_NULL_ARGUMENT drawRectangle
Draws the outline of the round cornered rectangle specified by the arguments using the receiver s foreground color The left and right edges of the rectangle are at code x code and code x width code The top and bottom edges are at code y code and code y height code The em roundness em of the corners is specified by the code arc Width code and code arc Height code arguments param x the x coordinate of the rectangle to be drawn param y the y coordinate of the rectangle to be drawn param width the width of the rectangle to be drawn param height the height of the rectangle to be drawn param arc Width the horizontal diameter of the arc at the four corners param arc Height the vertical diameter of the arc at the four corners exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw Round Rectangle int x int y int width int height int arc Width int arc Height if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if data update Clip setCG Clipping if arc Width 0 arc Height 0 draw Rectangle x y width height return int nx x int ny y int nw width int nh height int naw arc Width int nah arc Height if nw 0 nw 0 nw nx nx nw if nh 0 nh 0 nh ny ny nh if naw 0 naw 0 naw if nah 0 nah 0 nah if naw nw naw nw if nah nh nah nh float naw2 naw 2f float nah2 nah 2f float fw nw naw2 float fh nh nah2 OS CG Context Begin Path handle OS CG Context SaveG State handle float offset data line Width 2 1 0 5f 0f OS CG Context TranslateCTM handle nx offset ny offset OS CG Context ScaleCTM handle naw2 nah2 OS CG Context Move To Point handle fw 1 0 OS CG Context Add Arc To Point handle 0 0 0 1 1 OS CG Context Add Arc To Point handle 0 fh 1 fh 1 OS CG Context Add Arc To Point handle fw fh fw fh 1 1 OS CG Context Add Arc To Point handle fw 0 fw 1 0 1 OS CG Context Close Path handle OS CG Context RestoreG State handle OS CG Context Stroke Path handle flush  arcWidth arcHeight arcWidth arcHeight SWTException ERROR_GRAPHIC_DISPOSED drawRoundRectangle arcWidth arcHeight ERROR_GRAPHIC_DISPOSED updateClip setCGClipping arcWidth arcHeight drawRectangle arcWidth arcHeight CGContextBeginPath CGContextSaveGState lineWidth CGContextTranslateCTM CGContextScaleCTM CGContextMoveToPoint CGContextAddArcToPoint CGContextAddArcToPoint CGContextAddArcToPoint CGContextAddArcToPoint CGContextClosePath CGContextRestoreGState CGContextStrokePath
Draws the given string using the receiver s current font and foreground color No tab expansion or carriage return processing will be performed The background of the rectangular area where the string is being drawn will be filled with the receiver s background color param string the string to be drawn param x the x coordinate of the top left corner of the rectangular area where the string is to be drawn param y the y coordinate of the top left corner of the rectangular area where the string is to be drawn exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw String String string int x int y draw String string x y false  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED drawString drawString
Draws the given string using the receiver s current font and foreground color No tab expansion or carriage return processing will be performed If code is Transparent code is code true code then the background of the rectangular area where the string is being drawn will not be modified otherwise it will be filled with the receiver s background color param string the string to be drawn param x the x coordinate of the top left corner of the rectangular area where the string is to be drawn param y the y coordinate of the top left corner of the rectangular area where the string is to be drawn param is Transparent if code true code the background will be transparent otherwise it will be opaque exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw String String string int x int y boolean is Transparent draw Text string x y is Transparent SWT DRAW TRANSPARENT 0  isTransparent isTransparent IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED drawString isTransparent drawText isTransparent DRAW_TRANSPARENT
Draws the given string using the receiver s current font and foreground color Tab expansion and carriage return processing are performed The background of the rectangular area where the text is being drawn will be filled with the receiver s background color param string the string to be drawn param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw Text String string int x int y draw Text string x y SWT DRAW DELIMITER SWT DRAW TAB  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED drawText drawText DRAW_DELIMITER DRAW_TAB
Draws the given string using the receiver s current font and foreground color Tab expansion and carriage return processing are performed If code is Transparent code is code true code then the background of the rectangular area where the text is being drawn will not be modified otherwise it will be filled with the receiver s background color param string the string to be drawn param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn param is Transparent if code true code the background will be transparent otherwise it will be opaque exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw Text String string int x int y boolean is Transparent int flags SWT DRAW DELIMITER SWT DRAW TAB if is Transparent flags SWT DRAW TRANSPARENT draw Text string x y flags  isTransparent isTransparent IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED drawText isTransparent DRAW_DELIMITER DRAW_TAB isTransparent DRAW_TRANSPARENT drawText
Draws the given string using the receiver s current font and foreground color Tab expansion line delimiter and mnemonic processing are performed according to the specified flags If code flags code includes code DRAW TRANSPARENT code then the background of the rectangular area where the text is being drawn will not be modified otherwise it will be filled with the receiver s background color p The parameter code flags code may be a combination of dl dt b DRAW DELIMITER b dt dd draw multiple lines dd dt b DRAW TAB b dt dd expand tabs dd dt b DRAW MNEMONIC b dt dd underline the mnemonic character dd dt b DRAW TRANSPARENT b dt dd transparent background dd dl p param string the string to be drawn param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn param flags the flags specifing how to process the text exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw Text String string int x int y int flags if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if string null SWT error SWT ERROR NULL ARGUMENT if data update Clip setCG Clipping int length string length if length 0 return length set String string flags OS CG Context SaveG State handle OS CG Context ScaleCTM handle 1 1 if flags SWT DRAW DELIMITER 0 int layout data layout int break Count new int 1 OS ATSU Get Soft Line Breaks layout 0 length 0 null break Count int breaks new int break Count 0 1 OS ATSU Get Soft Line Breaks layout 0 length break Count 0 breaks break Count breaks break Count 0 length for int i 0 start 0 i breaks length i int line Break breaks i draw Text x y start line Break start flags y data font Ascent data font Descent start line Break else draw Text x y 0 length flags OS CG Context RestoreG State handle flush  DRAW_TRANSPARENT DRAW_DELIMITER DRAW_TAB DRAW_MNEMONIC DRAW_TRANSPARENT IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED drawText ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT updateClip setCGClipping setString CGContextSaveGState CGContextScaleCTM DRAW_DELIMITER breakCount ATSUGetSoftLineBreaks breakCount breakCount ATSUGetSoftLineBreaks breakCount breakCount breakCount lineBreak drawText lineBreak fontAscent fontDescent lineBreak drawText CGContextRestoreGState
void draw Text int x int y int start int length int flags int layout data layout if flags SWT DRAW TRANSPARENT 0 ATS Trapezoid trapezoid new ATS Trapezoid OS ATSU Get Glyph Bounds layout 0 0 start length short OS kATS Use Device Origins 1 trapezoid null int width OS Fix2 Long trapezoid upperRight x OS Fix2 Long trapezoid upperLeft x int height OS Fix2 Long trapezoid lowerRight y OS Fix2 Long trapezoid upperRight y CG Rect rect new CG Rect rect x x rect y y height rect width width rect height height OS CG Context Set Fill Color handle data background OS CG Context Fill Rect handle rect OS CG Context Set Fill Color handle data foreground OS ATSU Draw Text layout start length OS Long2 Fix x OS Long2 Fix y data font Ascent  drawText DRAW_TRANSPARENT ATSTrapezoid ATSTrapezoid ATSUGetGlyphBounds kATSUseDeviceOrigins Fix2Long upperRight_x Fix2Long upperLeft_x Fix2Long lowerRight_y Fix2Long upperRight_y CGRect CGRect CGContextSetFillColor CGContextFillRect CGContextSetFillColor ATSUDrawText Long2Fix Long2Fix fontAscent
Compares the argument to the receiver and returns true if they represent the em same em object using a class specific comparison param object the object to compare with this object return code true code if the object is the same as this object and code false code otherwise see hash Code public boolean equals Object object if object this return true if object instanceof GC return false return handle GC object handle  hashCode
Fills the interior of a circular or elliptical arc within the specified rectangular area with the receiver s background color p The resulting arc begins at code start Angle code and extends for code arc Angle code degrees using the current color Angles are interpreted such that 0 degrees is at the 3 o clock position A positive value indicates a counter clockwise rotation while a negative value indicates a clockwise rotation p p The center of the arc is the center of the rectangle whose origin is code x code code y code and whose size is specified by the code width code and code height code arguments p p The resulting arc covers an area code width 1 code pixels wide by code height 1 code pixels tall p param x the x coordinate of the upper left corner of the arc to be filled param y the y coordinate of the upper left corner of the arc to be filled param width the width of the arc to be filled param height the height of the arc to be filled param start Angle the beginning angle param arc Angle the angular extent of the arc relative to the start angle exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see draw Arc public void fill Arc int x int y int width int height int start Angle int arc Angle if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if data update Clip setCG Clipping if width 0 x x width width width if height 0 y y height height height if width 0 height 0 arc Angle 0 return OS CG Context Begin Path handle OS CG Context SaveG State handle OS CG Context TranslateCTM handle x width 2f y height 2f OS CG Context ScaleCTM handle width 2f height 2f OS CG Context Move To Point handle 0 0 OS CG Context Add Arc handle 0 0 1 start Angle float Compatibility PI 180 start Angle arc Angle float Compatibility PI 180 true OS CG Context Close Path handle OS CG Context RestoreG State handle OS CG Context Fill Path handle flush  startAngle arcAngle startAngle arcAngle SWTException ERROR_GRAPHIC_DISPOSED drawArc fillArc startAngle arcAngle ERROR_GRAPHIC_DISPOSED updateClip setCGClipping arcAngle CGContextBeginPath CGContextSaveGState CGContextTranslateCTM CGContextScaleCTM CGContextMoveToPoint CGContextAddArc startAngle startAngle arcAngle CGContextClosePath CGContextRestoreGState CGContextFillPath
Fills the interior of the specified rectangle with a gradient sweeping from left to right or top to bottom progressing from the receiver s foreground color to its background color param x the x coordinate of the rectangle to be filled param y the y coordinate of the rectangle to be filled param width the width of the rectangle to be filled may be negative inverts direction of gradient if horizontal param height the height of the rectangle to be filled may be negative inverts direction of gradient if vertical param vertical if true sweeps from top to bottom else sweeps from left to right exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see draw Rectangle public void fill Gradient Rectangle int x int y int width int height boolean vertical if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if width 0 height 0 return Rewrite this to use Gdk Pixbuf RGB backgroundRGB foregroundRGB backgroundRGB get Background getRGB foregroundRGB get Foreground getRGB RGB fromRGB toRGB fromRGB foregroundRGB toRGB backgroundRGB boolean swap Colors false if width 0 x width width width if vertical swap Colors true if height 0 y height height height if vertical swap Colors true if swap Colors fromRGB backgroundRGB toRGB foregroundRGB if fromRGB equals toRGB fill Rectangle x y width height return Image Data fill Gradient Rectangle this data device x y width height vertical fromRGB toRGB 8 8 8  SWTException ERROR_GRAPHIC_DISPOSED drawRectangle fillGradientRectangle ERROR_GRAPHIC_DISPOSED GdkPixbuf getBackground getForeground swapColors swapColors swapColors swapColors fillRectangle ImageData fillGradientRectangle
Fills the interior of an oval within the specified rectangular area with the receiver s background color param x the x coordinate of the upper left corner of the oval to be filled param y the y coordinate of the upper left corner of the oval to be filled param width the width of the oval to be filled param height the height of the oval to be filled exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see draw Oval public void fill Oval int x int y int width int height if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if data update Clip setCG Clipping if width 0 x x width width width if height 0 y y height height height OS CG Context Begin Path handle OS CG Context SaveG State handle OS CG Context TranslateCTM handle x width 2f y height 2f OS CG Context ScaleCTM handle width 2f height 2f OS CG Context Move To Point handle 1 0 OS CG Context Add Arc handle 0 0 1 0 float Compatibility PI 2 false OS CG Context Close Path handle OS CG Context RestoreG State handle OS CG Context Fill Path handle flush  SWTException ERROR_GRAPHIC_DISPOSED drawOval fillOval ERROR_GRAPHIC_DISPOSED updateClip setCGClipping CGContextBeginPath CGContextSaveGState CGContextTranslateCTM CGContextScaleCTM CGContextMoveToPoint CGContextAddArc CGContextClosePath CGContextRestoreGState CGContextFillPath
Fills the interior of the closed polygon which is defined by the specified array of integer coordinates using the receiver s background color The array contains alternating x and y values which are considered to represent points which are the vertices of the polygon Lines are drawn between each consecutive pair and between the first pair and last pair in the array param point Array an array of alternating x and y values which are the vertices of the polygon exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if point Array is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see draw Polygon public void fill Polygon int point Array if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if point Array null SWT error SWT ERROR NULL ARGUMENT if data update Clip setCG Clipping float points new float point Array length for int i 0 i points length i points i point Array i OS CG Context Begin Path handle OS CG Context Add Lines handle points points length 2 OS CG Context Close Path handle OS CG ContextEO Fill Path handle flush  pointArray IllegalArgumentException ERROR_NULL_ARGUMENT pointArray SWTException ERROR_GRAPHIC_DISPOSED drawPolygon fillPolygon pointArray ERROR_GRAPHIC_DISPOSED pointArray ERROR_NULL_ARGUMENT updateClip setCGClipping pointArray pointArray CGContextBeginPath CGContextAddLines CGContextClosePath CGContextEOFillPath
Fills the interior of the rectangle specified by the arguments using the receiver s background color param x the x coordinate of the rectangle to be filled param y the y coordinate of the rectangle to be filled param width the width of the rectangle to be filled param height the height of the rectangle to be filled exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see draw Rectangle public void fill Rectangle int x int y int width int height if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if data update Clip setCG Clipping if width 0 x x width width width if height 0 y y height height height CG Rect rect new CG Rect rect x x rect y y rect width width rect height height OS CG Context Fill Rect handle rect flush  SWTException ERROR_GRAPHIC_DISPOSED drawRectangle fillRectangle ERROR_GRAPHIC_DISPOSED updateClip setCGClipping CGRect CGRect CGContextFillRect
Fills the interior of the specified rectangle using the receiver s background color param rect the rectangle to be filled exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the rectangle is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see draw Rectangle public void fill Rectangle Rectangle rect if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if rect null SWT error SWT ERROR NULL ARGUMENT fill Rectangle rect x rect y rect width rect height  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED drawRectangle fillRectangle ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT fillRectangle
Fills the interior of the round cornered rectangle specified by the arguments using the receiver s background color param x the x coordinate of the rectangle to be filled param y the y coordinate of the rectangle to be filled param width the width of the rectangle to be filled param height the height of the rectangle to be filled param arc Width the horizontal diameter of the arc at the four corners param arc Height the vertical diameter of the arc at the four corners exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see draw Round Rectangle public void fill Round Rectangle int x int y int width int height int arc Width int arc Height if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if data update Clip setCG Clipping if arc Width 0 arc Height 0 fill Rectangle x y width height return int nx x int ny y int nw width int nh height int naw arc Width int nah arc Height if nw 0 nw 0 nw nx nx nw if nh 0 nh 0 nh ny ny nh if naw 0 naw 0 naw if nah 0 nah 0 nah if naw nw naw nw if nah nh nah nh float naw2 naw 2f float nah2 nah 2f float fw nw naw2 float fh nh nah2 OS CG Context Begin Path handle OS CG Context SaveG State handle OS CG Context TranslateCTM handle nx ny OS CG Context ScaleCTM handle naw2 nah2 OS CG Context Move To Point handle fw 1 0 OS CG Context Add Arc To Point handle 0 0 0 1 1 OS CG Context Add Arc To Point handle 0 fh 1 fh 1 OS CG Context Add Arc To Point handle fw fh fw fh 1 1 OS CG Context Add Arc To Point handle fw 0 fw 1 0 1 OS CG Context Close Path handle OS CG Context RestoreG State handle OS CG Context Fill Path handle flush  arcWidth arcHeight SWTException ERROR_GRAPHIC_DISPOSED drawRoundRectangle fillRoundRectangle arcWidth arcHeight ERROR_GRAPHIC_DISPOSED updateClip setCGClipping arcWidth arcHeight fillRectangle arcWidth arcHeight CGContextBeginPath CGContextSaveGState CGContextTranslateCTM CGContextScaleCTM CGContextMoveToPoint CGContextAddArcToPoint CGContextAddArcToPoint CGContextAddArcToPoint CGContextAddArcToPoint CGContextClosePath CGContextRestoreGState CGContextFillPath
void flush if data control 0 data paint Event 0 if data thread Thread current Thread OS CG Context Flush handle else OS CG Context Synchronize handle  paintEvent currentThread CGContextFlush CGContextSynchronize
Returns the em advance width em of the specified character in the font which is currently selected into the receiver p The advance width is defined as the horizontal distance the cursor should move after printing the character in the selected font p param ch the character to measure return the distance in the x direction to move past the character before painting the next exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Advance Width char ch if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED NOT DONE return string Extent new String new char ch x  SWTException ERROR_GRAPHIC_DISPOSED getAdvanceWidth ERROR_GRAPHIC_DISPOSED stringExtent
Returns the background color return the receiver s background color exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Color get Background if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED return Color carbon new data device data background  SWTException ERROR_GRAPHIC_DISPOSED getBackground ERROR_GRAPHIC_DISPOSED carbon_new
Returns the width of the specified character in the font selected into the receiver p The width is defined as the space taken up by the actual character not including the leading and tailing whitespace or overhang p param ch the character to measure return the width of the character exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Char Width char ch if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED NOT DONE return string Extent new String new char ch x  SWTException ERROR_GRAPHIC_DISPOSED getCharWidth ERROR_GRAPHIC_DISPOSED stringExtent
Returns the bounding rectangle of the receiver s clipping region If no clipping region is set the return value will be a rectangle which covers the entire bounds of the object the receiver is drawing on return the bounding rectangle of the clipping region exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Rectangle get Clipping if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if data clip Rgn 0 int width 0 height 0 if data control 0 Rect bounds new Rect OS Get Control Bounds data control bounds width bounds right bounds left height bounds bottom bounds top if data image null int image data image handle width OS CG Image Get Width image height OS CG Image Get Height image return new Rectangle 0 0 width height Rect bounds new Rect OS Get Region Bounds data clip Rgn bounds int width bounds right bounds left int height bounds bottom bounds top return new Rectangle bounds left bounds top width height  SWTException ERROR_GRAPHIC_DISPOSED getClipping ERROR_GRAPHIC_DISPOSED clipRgn GetControlBounds CGImageGetWidth CGImageGetHeight GetRegionBounds clipRgn
Sets the region managed by the argument to the current clipping region of the receiver param region the region to fill with the clipping region exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the region is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void get Clipping Region region if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if region null SWT error SWT ERROR NULL ARGUMENT if data clip Rgn 0 int width 0 height 0 if data control 0 Rect bounds new Rect OS Get Control Bounds data control bounds width bounds right bounds left height bounds bottom bounds top if data image null int image data image handle width OS CG Image Get Width image height OS CG Image Get Height image OS Set Rect Rgn region handle short 0 short 0 short width short height return OS Copy Rgn data clip Rgn region handle  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED getClipping ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT clipRgn GetControlBounds CGImageGetWidth CGImageGetHeight SetRectRgn CopyRgn clipRgn
Returns the font currently being used by the receiver to draw and measure text return the receiver s font exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Font get Font if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED return data font  SWTException ERROR_GRAPHIC_DISPOSED getFont ERROR_GRAPHIC_DISPOSED
Returns a Font Metrics which contains information about the font currently being used by the receiver to draw and measure text return font metrics for the receiver s font exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Font Metrics get Font Metrics if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED Font font data font Font Info info new Font Info OS Fetch Font Info font id font size font style info int ascent info ascent int descent info descent int leading info leading This code is intentionaly comment Not right for fixed width fonts fm average Char Width info wid Max 3 String s abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 int average Char Width string Extent s x s length return Font Metrics carbon new ascent descent average Char Width leading ascent leading descent  FontMetrics SWTException ERROR_GRAPHIC_DISPOSED FontMetrics getFontMetrics ERROR_GRAPHIC_DISPOSED FontInfo FontInfo FetchFontInfo averageCharWidth widMax averageCharWidth stringExtent FontMetrics carbon_new averageCharWidth
Returns the receiver s foreground color return the color used for drawing foreground things exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Color get Foreground if handle 0 SWT error SWT ERROR WIDGET DISPOSED return Color carbon new data device data foreground  SWTException ERROR_GRAPHIC_DISPOSED getForeground ERROR_WIDGET_DISPOSED carbon_new
Returns the receiver s line style which will be one of the constants code SWT LINE SOLID code code SWT LINE DASH code code SWT LINE DOT code code SWT LINE DASHDOT code or code SWT LINE DASHDOTDOT code return the style used for drawing lines exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Line Style if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED return data line Style  LINE_SOLID LINE_DASH LINE_DOT LINE_DASHDOT LINE_DASHDOTDOT SWTException ERROR_GRAPHIC_DISPOSED getLineStyle ERROR_GRAPHIC_DISPOSED lineStyle
Returns the width that will be used when drawing lines for all of the figure drawing operations that is code draw Line code code draw Rectangle code code draw Polyline code and so forth return the receiver s line width exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Line Width if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED return data line Width  drawLine drawRectangle drawPolyline SWTException ERROR_GRAPHIC_DISPOSED getLineWidth ERROR_GRAPHIC_DISPOSED lineWidth
Returns the receiver s style information p Note that the value which is returned by this method em may not match em the value which was provided to the constructor when the receiver was created This can occur when the underlying operating system does not support a particular combination of requested styles p return the style bits exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul since 2 1 2 public int get Style if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED return data style  SWTException ERROR_GRAPHIC_DISPOSED getStyle ERROR_GRAPHIC_DISPOSED
Returns code true code if this GC is drawing in the mode where the resulting color in the destination is the em exclusive or em of the color values in the source and the destination and code false code if it is drawing in the mode where the destination color is being replaced with the source color value return code true code true if the receiver is in XOR mode and false otherwise exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public boolean getXOR Mode if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED return data xor Mode  SWTException ERROR_GRAPHIC_DISPOSED getXORMode ERROR_GRAPHIC_DISPOSED xorMode
Returns an integer hash code for the receiver Any two objects which return code true code when passed to code equals code must return the same value for this method return the receiver s hash exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see equals public int hash Code return handle  SWTException ERROR_GRAPHIC_DISPOSED hashCode
void init Drawable drawable GC Data data int context int colorspace data device colorspace OS CG Context Set Stroke Color Space context colorspace OS CG Context Set Fill Color Space context colorspace float foreground data foreground if foreground null OS CG Context Set Stroke Color context foreground float background data background if background null OS CG Context Set Fill Color context background OS CG Context Set Line Cap context OS kCG Line Cap Round Image image data image if image null image memGC this this drawable drawable this data data handle context if data font null setGC Font  GCData CGContextSetStrokeColorSpace CGContextSetFillColorSpace CGContextSetStrokeColor CGContextSetFillColor CGContextSetLineCap kCGLineCapRound setGCFont
Returns code true code if the receiver has a clipping region set into it and code false code otherwise If this method returns false the receiver will draw on all available space in the destination If it returns true it will draw only in the area that is covered by the region that can be accessed with code get Clipping region code return code true code if the GC has a clipping region and code false code otherwise exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public boolean is Clipped if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED return data clip Rgn 0  getClipping SWTException ERROR_GRAPHIC_DISPOSED isClipped ERROR_GRAPHIC_DISPOSED clipRgn
Returns code true code if the GC has been disposed and code false code otherwise p This method gets the dispose state for the GC When a GC has been disposed it is an error to invoke any other method using the GC return code true code when the GC is disposed and code false code otherwise public boolean is Disposed return handle 0  isDisposed
Sets the background color The background color is used for fill operations and as the background color when text is drawn param color the new background color for the receiver exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the color is null li li ERROR INVALID ARGUMENT if the color has been disposed li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Background Color color if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if color null SWT error SWT ERROR NULL ARGUMENT if color is Disposed SWT error SWT ERROR INVALID ARGUMENT data background color handle OS CG Context Set Fill Color handle color handle  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED setBackground ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT CGContextSetFillColor
Sets the area of the receiver which can be changed by drawing operations to the rectangular area specified by the arguments param x the x coordinate of the clipping rectangle param y the y coordinate of the clipping rectangle param width the width of the clipping rectangle param height the height of the clipping rectangle exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Clipping int x int y int width int height if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if data clip Rgn 0 data clip Rgn OS New Rgn OS Set Rect Rgn data clip Rgn short x short y short x width short y height data update Clip true  SWTException ERROR_GRAPHIC_DISPOSED setClipping ERROR_GRAPHIC_DISPOSED clipRgn clipRgn NewRgn SetRectRgn clipRgn updateClip
Sets the area of the receiver which can be changed by drawing operations to the rectangular area specified by the argument param rect the clipping rectangle exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Clipping Rectangle r if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if r null if data clip Rgn 0 OS Dispose Rgn data clip Rgn data clip Rgn 0 else return else if data clip Rgn 0 data clip Rgn OS New Rgn OS Set Rect Rgn data clip Rgn short r x short r y short r x r width short r y r height data update Clip true  SWTException ERROR_GRAPHIC_DISPOSED setClipping ERROR_GRAPHIC_DISPOSED clipRgn DisposeRgn clipRgn clipRgn clipRgn clipRgn NewRgn SetRectRgn clipRgn updateClip
Sets the area of the receiver which can be changed by drawing operations to the region specified by the argument param region the clipping region exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Clipping Region region if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if region null if data clip Rgn 0 OS Dispose Rgn data clip Rgn data clip Rgn 0 else return else if data clip Rgn 0 data clip Rgn OS New Rgn OS Copy Rgn region handle data clip Rgn data update Clip true  SWTException ERROR_GRAPHIC_DISPOSED setClipping ERROR_GRAPHIC_DISPOSED clipRgn DisposeRgn clipRgn clipRgn clipRgn clipRgn NewRgn CopyRgn clipRgn updateClip
void setCG Clipping data update Clip false if data control 0 OS CG Context ScaleCTM handle 1 1 if data clip Rgn 0 OS ClipCG Context To Region handle new Rect data clip Rgn else int rgn OS New Rgn OS Set Rect Rgn rgn short 32768 short 32768 short 32767 short 32767 OS ClipCG Context To Region handle new Rect rgn OS Dispose Rgn rgn OS CG Context ScaleCTM handle 1 1 return int port data port if port 0 int window OS Get Control Owner data control port OS Get Window Port window Rect port Rect data port Rect Rect rect data control Rect OS CG Context TranslateCTM handle rect left port Rect bottom port Rect top rect top OS CG Context ScaleCTM handle 1 1 OS Get Port Bounds port port Rect OS Get Control Bounds data control rect if data clip Rgn 0 int rgn OS New Rgn OS Copy Rgn data clip Rgn rgn OS Offset Rgn rgn rect left rect top OS Sect Rgn data visible Rgn rgn rgn OS ClipCG Context To Region handle port Rect rgn OS Dispose Rgn rgn else OS ClipCG Context To Region handle port Rect data visible Rgn OS CG Context ScaleCTM handle 1 1 OS CG Context TranslateCTM handle rect left port Rect bottom port Rect top rect top  setCGClipping updateClip CGContextScaleCTM clipRgn ClipCGContextToRegion clipRgn NewRgn SetRectRgn ClipCGContextToRegion DisposeRgn CGContextScaleCTM GetControlOwner GetWindowPort portRect portRect controlRect CGContextTranslateCTM portRect portRect CGContextScaleCTM GetPortBounds portRect GetControlBounds clipRgn NewRgn CopyRgn clipRgn OffsetRgn SectRgn visibleRgn ClipCGContextToRegion portRect DisposeRgn ClipCGContextToRegion portRect visibleRgn CGContextScaleCTM CGContextTranslateCTM portRect portRect
Sets the font which will be used by the receiver to draw and measure text to the argument If the argument is null then a default font appropriate for the platform will be used instead param font the new font for the receiver or null to indicate a default font exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the font has been disposed li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Font Font font if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if font null font data device system Font if font is Disposed SWT error SWT ERROR INVALID ARGUMENT data font font setGC Font  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED setFont ERROR_GRAPHIC_DISPOSED systemFont isDisposed ERROR_INVALID_ARGUMENT setGCFont
void setGC Font int tabs data tabs if tabs 0 OS Dispose Ptr tabs data tabs 0 Font font data font Font Info info new Font Info OS Fetch Font Info font id font size font style info data font Ascent info ascent data font Descent info descent if font atsui Style 0 if data atsui Style 0 OS ATSU Dispose Style data atsui Style data atsui Style font create Style data string null data string Width data string Height 1  setGCFont DisposePtr FontInfo FontInfo FetchFontInfo fontAscent fontDescent atsuiStyle atsuiStyle ATSUDisposeStyle atsuiStyle atsuiStyle createStyle stringWidth stringHeight
Sets the foreground color The foreground color is used for drawing operations including when text is drawn param color the new foreground color for the receiver exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the color is null li li ERROR INVALID ARGUMENT if the color has been disposed li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Foreground Color color if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if color null SWT error SWT ERROR NULL ARGUMENT if color is Disposed SWT error SWT ERROR INVALID ARGUMENT data foreground color handle OS CG Context Set Stroke Color handle color handle  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED setForeground ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT CGContextSetStrokeColor
Sets the receiver s line style to the argument which must be one of the constants code SWT LINE SOLID code code SWT LINE DASH code code SWT LINE DOT code code SWT LINE DASHDOT code or code SWT LINE DASHDOTDOT code param line Style the style to be used for drawing lines exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Line Style int line Style if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED switch line Style case SWT LINE SOLID OS CG Context Set Line Dash handle 0 null 0 break case SWT LINE DASH OS CG Context Set Line Dash handle 0 new float 18 6 2 break case SWT LINE DOT OS CG Context Set Line Dash handle 0 new float 3 3 2 break case SWT LINE DASHDOT OS CG Context Set Line Dash handle 0 new float 9 6 3 6 4 break case SWT LINE DASHDOTDOT OS CG Context Set Line Dash handle 0 new float 9 3 3 3 3 3 6 break default SWT error SWT ERROR INVALID ARGUMENT data line Style line Style  LINE_SOLID LINE_DASH LINE_DOT LINE_DASHDOT LINE_DASHDOTDOT lineStyle SWTException ERROR_GRAPHIC_DISPOSED setLineStyle lineStyle ERROR_GRAPHIC_DISPOSED lineStyle LINE_SOLID CGContextSetLineDash LINE_DASH CGContextSetLineDash LINE_DOT CGContextSetLineDash LINE_DASHDOT CGContextSetLineDash LINE_DASHDOTDOT CGContextSetLineDash ERROR_INVALID_ARGUMENT lineStyle lineStyle
Sets the width that will be used when drawing lines for all of the figure drawing operations that is code draw Line code code draw Rectangle code code draw Polyline code and so forth param line Width the width of a line exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Line Width int width if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED data line Width width OS CG Context Set Line Width handle width  drawLine drawRectangle drawPolyline lineWidth SWTException ERROR_GRAPHIC_DISPOSED setLineWidth ERROR_GRAPHIC_DISPOSED lineWidth CGContextSetLineWidth
int set String String string int flags if data layout 0 create Layout if string data string flags SWT DRAW TRANSPARENT data draw Flags SWT DRAW TRANSPARENT return data string Length int layout data layout int length string length char chars new char length string get Chars 0 length chars 0 int break Count 0 int breaks null if flags SWT DRAW MNEMONIC SWT DRAW DELIMITER 0 int i 0 j 0 while i chars length char c chars j chars i switch c case if flags SWT DRAW MNEMONIC 0 if i chars length continue if chars i i continue j break case r case n if flags SWT DRAW DELIMITER 0 if c r i chars length chars i n i j if breaks null breaks new int 4 else if break Count breaks length int new Breaks new int breaks length 4 System arraycopy breaks 0 new Breaks 0 breaks length breaks new Breaks breaks break Count j break length j if flags SWT DRAW TAB 0 if data tabs 0 create Tabs OS ATSU Set Tab Array layout data tabs TAB COUNT else OS ATSU Set Tab Array layout 0 0 int ptr OS New Ptr length 2 OS memcpy ptr chars length 2 OS ATSU Set Text Pointer Location layout ptr 0 length length if flags SWT DRAW DELIMITER 0 breaks null for int i 0 i break Count i OS ATSU Set Soft Line Break layout breaks i Font font data font int atsui Style font atsui Style 0 font atsui Style data atsui Style OS ATSU Set Run Style layout atsui Style 0 length OS ATSU Set Transient Font Matching layout true if data string Ptr 0 OS Dispose Ptr data string Ptr data string Ptr ptr data string string data string Length length data string Width data string Height 1 data draw Flags flags return length  setString createLayout DRAW_TRANSPARENT drawFlags DRAW_TRANSPARENT stringLength getChars breakCount DRAW_MNEMONIC DRAW_DELIMITER DRAW_MNEMONIC DRAW_DELIMITER breakCount newBreaks newBreaks newBreaks breakCount DRAW_TAB createTabs ATSUSetTabArray TAB_COUNT ATSUSetTabArray NewPtr ATSUSetTextPointerLocation DRAW_DELIMITER breakCount ATSUSetSoftLineBreak atsuiStyle atsuiStyle atsuiStyle atsuiStyle ATSUSetRunStyle atsuiStyle ATSUSetTransientFontMatching stringPtr DisposePtr stringPtr stringPtr stringLength stringWidth stringHeight drawFlags
If the argument is code true code puts the receiver in a drawing mode where the resulting color in the destination is the em exclusive or em of the color values in the source and the destination and if the argument is code false code puts the receiver in a drawing mode where the destination color is replaced with the source color value param xor if code true code then em xor em mode is used otherwise em source copy em mode is used exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void setXOR Mode boolean xor if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED NOT DONE data xor Mode xor  SWTException ERROR_GRAPHIC_DISPOSED setXORMode ERROR_GRAPHIC_DISPOSED xorMode
Returns the extent of the given string No tab expansion or carriage return processing will be performed p The em extent em of a string is the width and height of the rectangular area it would cover if drawn in a particular font in this case the current font in the receiver p param string the string to measure return a point containing the extent of the string exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Point string Extent String string return text Extent string 0  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED stringExtent textExtent
Returns the extent of the given string Tab expansion and carriage return processing are performed p The em extent em of a string is the width and height of the rectangular area it would cover if drawn in a particular font in this case the current font in the receiver p param string the string to measure return a point containing the extent of the string exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Point text Extent String string return text Extent string SWT DRAW DELIMITER SWT DRAW TAB  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED textExtent textExtent DRAW_DELIMITER DRAW_TAB
Returns the extent of the given string Tab expansion line delimiter and mnemonic processing are performed according to the specified flags which can be a combination of dl dt b DRAW DELIMITER b dt dd draw multiple lines dd dt b DRAW TAB b dt dd expand tabs dd dt b DRAW MNEMONIC b dt dd underline the mnemonic character dd dt b DRAW TRANSPARENT b dt dd transparent background dd dl p The em extent em of a string is the width and height of the rectangular area it would cover if drawn in a particular font in this case the current font in the receiver p param string the string to measure param flags the flags specifing how to process the text return a point containing the extent of the string exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Point text Extent String string int flags if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if string null SWT error SWT ERROR NULL ARGUMENT int length set String string flags if data string Width 1 return new Point data string Width data string Height int width 0 height if length 0 height data font Ascent data font Descent else ATS Trapezoid trapezoid new ATS Trapezoid if flags SWT DRAW DELIMITER 0 height 0 int layout data layout int break Count new int 1 OS ATSU Get Soft Line Breaks layout 0 length 0 null break Count int breaks new int break Count 0 1 OS ATSU Get Soft Line Breaks layout 0 length break Count 0 breaks break Count breaks break Count 0 length for int i 0 start 0 i breaks length i int line Break breaks i OS ATSU Get Glyph Bounds layout 0 0 start line Break start short OS kATS Use Device Origins 1 trapezoid null width Math max width OS Fix2 Long trapezoid upperRight x OS Fix2 Long trapezoid upperLeft x height OS Fix2 Long trapezoid lowerRight y OS Fix2 Long trapezoid upperRight y start line Break else OS ATSU Get Glyph Bounds data layout 0 0 0 length short OS kATS Use Device Origins 1 trapezoid null width OS Fix2 Long trapezoid upperRight x OS Fix2 Long trapezoid upperLeft x height OS Fix2 Long trapezoid lowerRight y OS Fix2 Long trapezoid upperRight y return new Point data string Width width data string Height height  DRAW_DELIMITER DRAW_TAB DRAW_MNEMONIC DRAW_TRANSPARENT IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED textExtent ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT setString stringWidth stringWidth stringHeight fontAscent fontDescent ATSTrapezoid ATSTrapezoid DRAW_DELIMITER breakCount ATSUGetSoftLineBreaks breakCount breakCount ATSUGetSoftLineBreaks breakCount breakCount breakCount lineBreak ATSUGetGlyphBounds lineBreak kATSUseDeviceOrigins Fix2Long upperRight_x Fix2Long upperLeft_x Fix2Long lowerRight_y Fix2Long upperRight_y lineBreak ATSUGetGlyphBounds kATSUseDeviceOrigins Fix2Long upperRight_x Fix2Long upperLeft_x Fix2Long lowerRight_y Fix2Long upperRight_y stringWidth stringHeight
Returns a string containing a concise human readable description of the receiver return a string representation of the receiver public String to String if is Disposed return GC DISPOSED return GC handle  toString isDisposed

static final int DEFAULT SCANLINE PAD 4 Image  DEFAULT_SCANLINE_PAD
Constructs an empty instance of this class with the specified width and height The result may be drawn upon by creating a GC and using any of its drawing operations as shown in the following example pre Image i new Image device width height GC gc new GC i gc draw Rectangle 0 0 50 50 gc dispose pre p Note Some platforms may have a limitation on the size of image that can be created size depends on width height and depth For example Windows 95 98 and ME do not allow images larger than 16M p param device the device on which to create the image param width the width of the new image param height the height of the new image exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li li ERROR INVALID ARGUMENT if either the width or height is negative or zero li ul exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for image creation li ul public Image Device display int width int height if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT init device width height  drawRectangle IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTError ERROR_NO_HANDLES getDevice ERROR_NULL_ARGUMENT
Constructs a new instance of this class based on the provided image with an appearance that varies depending on the value of the flag The possible flag values are dl dt b IMAGE COPY b dt dd the result is an identical copy of src Image dd dt b IMAGE DISABLE b dt dd the result is a copy of src Image which has a em disabled em look dd dt b IMAGE GRAY b dt dd the result is a copy of src Image which has a em gray scale em look dd dl param device the device on which to create the image param src Image the image to use as the source param flag the style either code IMAGE COPY code code IMAGE DISABLE code or code IMAGE GRAY code exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li li ERROR NULL ARGUMENT if src Image is null li li ERROR INVALID ARGUMENT if the flag is not one of code IMAGE COPY code code IMAGE DISABLE code or code IMAGE GRAY code li li ERROR INVALID ARGUMENT if the image has been disposed li ul exception SWT Exception ul li ERROR INVALID IMAGE if the image is not a bitmap or an icon or is otherwise in an invalid state li li ERROR UNSUPPORTED DEPTH if the depth of the Image is not supported li ul exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for image creation li ul public Image Device device Image src Image int flag if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT if src Image null SWT error SWT ERROR NULL ARGUMENT if src Image is Disposed SWT error SWT ERROR INVALID ARGUMENT switch flag case SWT IMAGE COPY case SWT IMAGE DISABLE case SWT IMAGE GRAY break default SWT error SWT ERROR INVALID ARGUMENT this device device this type src Image type Get source image size int width OS CG Image Get Width src Image handle int height OS CG Image Get Height src Image handle int bpr OS CG Image Get Bytes Per Row src Image handle int bpc OS CG Image Get Bits Per Component src Image handle int bpp OS CG Image Get Bits Per Pixel src Image handle int colorspace OS CG Image Get Color Space src Image handle int alpha Info OS kCG Image Alpha None Skip First Copy transparent pixel and alpha data when necessary alpha Info OS CG Image Get Alpha Info src Image handle transparent Pixel src Image transparent Pixel alpha src Image alpha if src Image alpha Data null alpha Data new byte src Image alpha Data length System arraycopy src Image alpha Data 0 alpha Data 0 alpha Data length Create the image int data Size height bpr data OS New Ptr data Size if data 0 SWT error SWT ERROR NO HANDLES int provider OS CG Data Provider Create With Data 0 data data Size 0 if provider 0 OS Dispose Ptr data SWT error SWT ERROR NO HANDLES handle OS CG Image Create width height bpc bpp bpr colorspace alpha Info provider null false 0 OS CG Data Provider Release provider if handle 0 OS Dispose Ptr data SWT error SWT ERROR NO HANDLES OS memcpy data src Image data data Size if flag SWT IMAGE COPY return Apply transformation switch flag case SWT IMAGE DISABLE Color zero Color device get System Color SWT COLOR WIDGET NORMAL SHADOW RGB zeroRGB zero Color getRGB byte zero Red byte zeroRGB red byte zero Green byte zeroRGB green byte zero Blue byte zeroRGB blue Color one Color device get System Color SWT COLOR WIDGET BACKGROUND RGB oneRGB one Color getRGB byte one Red byte oneRGB red byte one Green byte oneRGB green byte one Blue byte oneRGB blue byte line new byte bpr for int y 0 y height y OS memcpy line data y bpr bpr int offset 0 for int x 0 x width x int red line offset 1 0xFF int green line offset 2 0xFF int blue line offset 3 0xFF int intensity red red green green blue blue if intensity 98304 line offset 1 zero Red line offset 2 zero Green line offset 3 zero Blue else line offset 1 one Red line offset 2 one Green line offset 3 one Blue offset 4 OS memcpy data y bpr line bpr break case SWT IMAGE GRAY byte line new byte bpr for int y 0 y height y OS memcpy line data y bpr bpr int offset 0 for int x 0 x width x int red line offset 1 0xFF int green line offset 2 0xFF int blue line offset 3 0xFF byte intensity byte red red green green green green green blue 3 line offset 1 line offset 2 line offset 3 intensity offset 4 OS memcpy data y bpr line bpr break  IMAGE_COPY srcImage IMAGE_DISABLE srcImage IMAGE_GRAY srcImage srcImage IMAGE_COPY IMAGE_DISABLE IMAGE_GRAY IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT srcImage ERROR_INVALID_ARGUMENT IMAGE_COPY IMAGE_DISABLE IMAGE_GRAY ERROR_INVALID_ARGUMENT SWTException ERROR_INVALID_IMAGE ERROR_UNSUPPORTED_DEPTH SWTError ERROR_NO_HANDLES srcImage getDevice ERROR_NULL_ARGUMENT srcImage ERROR_NULL_ARGUMENT srcImage isDisposed ERROR_INVALID_ARGUMENT IMAGE_COPY IMAGE_DISABLE IMAGE_GRAY ERROR_INVALID_ARGUMENT srcImage CGImageGetWidth srcImage CGImageGetHeight srcImage CGImageGetBytesPerRow srcImage CGImageGetBitsPerComponent srcImage CGImageGetBitsPerPixel srcImage CGImageGetColorSpace srcImage alphaInfo kCGImageAlphaNoneSkipFirst alphaInfo CGImageGetAlphaInfo srcImage transparentPixel srcImage transparentPixel srcImage srcImage alphaData alphaData srcImage alphaData srcImage alphaData alphaData alphaData dataSize NewPtr dataSize ERROR_NO_HANDLES CGDataProviderCreateWithData dataSize DisposePtr ERROR_NO_HANDLES CGImageCreate alphaInfo CGDataProviderRelease DisposePtr ERROR_NO_HANDLES srcImage dataSize IMAGE_COPY IMAGE_DISABLE zeroColor getSystemColor COLOR_WIDGET_NORMAL_SHADOW zeroColor zeroRed zeroGreen zeroBlue oneColor getSystemColor COLOR_WIDGET_BACKGROUND oneColor oneRed oneGreen oneBlue zeroRed zeroGreen zeroBlue oneRed oneGreen oneBlue IMAGE_GRAY
Constructs an empty instance of this class with the width and height of the specified rectangle The result may be drawn upon by creating a GC and using any of its drawing operations as shown in the following example pre Image i new Image device bounds Rectangle GC gc new GC i gc draw Rectangle 0 0 50 50 gc dispose pre p Note Some platforms may have a limitation on the size of image that can be created size depends on width height and depth For example Windows 95 98 and ME do not allow images larger than 16M p param device the device on which to create the image param bounds a rectangle specifying the image s width and height must not be null exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li li ERROR NULL ARGUMENT if the bounds rectangle is null li li ERROR INVALID ARGUMENT if either the rectangle s width or height is negative li ul exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for image creation li ul public Image Device display Rectangle bounds if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT if bounds null SWT error SWT ERROR NULL ARGUMENT init device bounds width bounds height  boundsRectangle drawRectangle IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTError ERROR_NO_HANDLES getDevice ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT
Constructs an instance of this class from the given code Image Data code param device the device on which to create the image param data the image data to create the image from must not be null exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li li ERROR NULL ARGUMENT if the image data is null li ul exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for image creation li ul exception SWT Exception ul li ERROR UNSUPPORTED DEPTH if the depth of the Image Data is not supported li ul public Image Device device Image Data data if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT init device data  ImageData IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT SWTError ERROR_NO_HANDLES SWTException ERROR_UNSUPPORTED_DEPTH ImageData ImageData getDevice ERROR_NULL_ARGUMENT
Constructs an instance of this class whose type is code SWT ICON code from the two given code Image Data code objects The two images must be the same size and the mask image must have a color depth of 1 Pixel transparency in either image will be ignored If either image is an icon to begin with an exception is thrown p The mask image should contain white wherever the icon is to be visible and black wherever the icon is to be transparent In addition the source image should contain black wherever the icon is to be transparent p param device the device on which to create the icon param source the color data for the icon param mask the mask data for the icon exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li li ERROR NULL ARGUMENT if either the source or mask is null li li ERROR INVALID ARGUMENT if source and mask are different sizes or if the mask is not monochrome or if either the source or mask is already an icon li ul exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for image creation li ul public Image Device display Image Data source Image Data mask if device null device Device get Device if source null SWT error SWT ERROR NULL ARGUMENT if mask null SWT error SWT ERROR NULL ARGUMENT if source width mask width source height mask height SWT error SWT ERROR INVALID ARGUMENT if mask depth 1 SWT error SWT ERROR INVALID ARGUMENT Image Data image new Image Data source width source height source depth source palette source scanline Pad source data image mask Pad mask scanline Pad image mask Data mask data init device image  ImageData IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTError ERROR_NO_HANDLES ImageData ImageData getDevice ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT ImageData ImageData scanlinePad maskPad scanlinePad maskData
Constructs an instance of this class by loading its representation from the specified input stream Throws an error if an error occurs while loading the image or if the result is an image of an unsupported type p This constructor is provided for convenience when loading a single image only If the stream contains multiple images only the first one will be loaded To load multiple images use code Image Loader load code p p This constructor may be used to load a resource as follows p pre new Image device clazz get Resource As Stream file gif pre param device the device on which to create the image param stream the input stream to load the image from exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li li ERROR NULL ARGUMENT if the stream is null li ul exception SWT Exception ul li ERROR INVALID IMAGE if the image file contains invalid data li li ERROR IO if an IO error occurs while reading data li li ERROR UNSUPPORTED DEPTH if the Input Stream describes an image with an unsupported depth li ul exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for image creation li ul public Image Device device Input Stream stream if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT init device new Image Data stream  ImageLoader getResourceAsStream IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT SWTException ERROR_INVALID_IMAGE ERROR_IO ERROR_UNSUPPORTED_DEPTH InputStream SWTError ERROR_NO_HANDLES InputStream getDevice ERROR_NULL_ARGUMENT ImageData
Constructs an instance of this class by loading its representation from the file with the specified name Throws an error if an error occurs while loading the image or if the result is an image of an unsupported type p This constructor is provided for convenience when loading a single image only If the specified file contains multiple images only the first one will be used param device the device on which to create the image param filename the name of the file to load the image from exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li li ERROR NULL ARGUMENT if the file name is null li ul exception SWT Exception ul li ERROR INVALID IMAGE if the image file contains invalid data li li ERROR IO if an IO error occurs while reading data li li ERROR UNSUPPORTED DEPTH if the image file has an unsupported depth li ul exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for image creation li ul public Image Device display String filename if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT init device new Image Data filename  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT SWTException ERROR_INVALID_IMAGE ERROR_IO ERROR_UNSUPPORTED_DEPTH SWTError ERROR_NO_HANDLES getDevice ERROR_NULL_ARGUMENT ImageData
void create Mask if transparent Pixel 1 return int height OS CG Image Get Height handle int bpr OS CG Image Get Bytes Per Row handle int data Size height bpr byte src Data new byte data Size OS memcpy src Data data data Size for int i 0 i data Size i 4 int pixel src Data i 1 0xFF 16 src Data i 2 0xFF 8 src Data i 3 0xFF src Data i byte pixel transparent Pixel 0 0xFF OS memcpy data src Data data Size  createMask transparentPixel CGImageGetHeight CGImageGetBytesPerRow dataSize srcData dataSize srcData dataSize dataSize srcData srcData srcData srcData transparentPixel srcData dataSize
Disposes of the operating system resources associated with the image Applications must dispose of all images which they allocate public void dispose if handle 0 return if device is Disposed return if memGC null memGC dispose OS CG Image Release handle OS Dispose Ptr data device null data handle 0 memGC null  isDisposed CGImageRelease DisposePtr
Compares the argument to the receiver and returns true if they represent the em same em object using a class specific comparison param object the object to compare with this object return code true code if the object is the same as this object and code false code otherwise see hash Code public boolean equals Object object if object this return true if object instanceof Image return false Image image Image object return device image device handle image handle transparent Pixel image transparent Pixel  hashCode transparentPixel transparentPixel
Returns the color to which to map the transparent pixel or null if the receiver has no transparent pixel p There are certain uses of Images that do not support transparency for example setting an image into a button or label In these cases it may be desired to simulate transparency by using the background color of the widget to paint the transparent pixels of the image Use this method to check which color will be used in these cases in place of transparency This value may be set with set Background p return the background color of the image or null if there is no transparency in the image exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Color get Background if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED if transparent Pixel 1 return null NOT DONE return null  setBackground SWTException ERROR_GRAPHIC_DISPOSED getBackground isDisposed ERROR_GRAPHIC_DISPOSED transparentPixel
Returns the bounds of the receiver The rectangle will always have x and y values of 0 and the width and height of the image return a rectangle specifying the image s bounds exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li li ERROR INVALID IMAGE if the image is not a bitmap or an icon li ul public Rectangle get Bounds if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED return new Rectangle 0 0 OS CG Image Get Width handle OS CG Image Get Height handle  SWTException ERROR_GRAPHIC_DISPOSED ERROR_INVALID_IMAGE getBounds isDisposed ERROR_GRAPHIC_DISPOSED CGImageGetWidth CGImageGetHeight
Returns an code Image Data code based on the receiver Modifications made to this code Image Data code will not affect the Image return an code Image Data code containing the image s data and attributes exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li li ERROR INVALID IMAGE if the image is not a bitmap or an icon li ul see Image Data public Image Data get Image Data if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED int width OS CG Image Get Width handle int height OS CG Image Get Height handle int bpr OS CG Image Get Bytes Per Row handle int bpp OS CG Image Get Bits Per Pixel handle int data Size height bpr byte src Data new byte data Size OS memcpy src Data data data Size Palette Data palette new Palette Data 0xFF0000 0xFF00 0xFF Image Data data new Image Data width height bpp palette data data src Data data bytes Per Line bpr data transparent Pixel transparent Pixel if transparent Pixel 1 type SWT ICON Get the icon mask data int mask Pad 2 int mask Bpl width 7 8 mask Pad 1 mask Pad mask Pad byte mask Data new byte height mask Bpl int offset 0 mask Offset 0 for int y 0 y height y for int x 0 x width x if src Data offset 0 mask Data mask Offset x 3 1 7 x 0x7 else mask Data mask Offset x 3 1 7 x 0x7 offset 4 mask Offset mask Bpl data mask Data mask Data data mask Pad mask Pad for int i 0 i src Data length i 4 src Data i 0 data alpha alpha if alpha 1 alpha Data null data alpha Data new byte alpha Data length System arraycopy alpha Data 0 data alpha Data 0 alpha Data length return data  ImageData ImageData ImageData SWTException ERROR_GRAPHIC_DISPOSED ERROR_INVALID_IMAGE ImageData ImageData getImageData isDisposed ERROR_GRAPHIC_DISPOSED CGImageGetWidth CGImageGetHeight CGImageGetBytesPerRow CGImageGetBitsPerPixel dataSize srcData dataSize srcData dataSize PaletteData PaletteData ImageData ImageData srcData bytesPerLine transparentPixel transparentPixel transparentPixel maskPad maskBpl maskPad maskPad maskPad maskData maskBpl maskOffset srcData maskData maskOffset maskData maskOffset maskOffset maskBpl maskData maskData maskPad maskPad srcData srcData alphaData alphaData alphaData alphaData alphaData alphaData
Invokes platform specific functionality to allocate a new image p b IMPORTANT b This method is em not em part of the public API for code Image code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param device the device on which to allocate the color param type the type of the image code SWT BITMAP code or code SWT ICON code param handle the OS handle for the image param data the OS data for the image private public static Image carbon new Device device int type int handle int data if device null device Device get Device Image image new Image image type type image handle handle image data data image device device return image  carbon_new getDevice
Returns an integer hash code for the receiver Any two objects which return code true code when passed to code equals code must return the same value for this method return the receiver s hash see equals public int hash Code return handle  hashCode
void init Device device int width int height if width 0 height 0 SWT error SWT ERROR INVALID ARGUMENT this device device this type SWT BITMAP Create the image int bpr width 4 int data Size height bpr data OS New Ptr data Size if data 0 SWT error SWT ERROR NO HANDLES int provider OS CG Data Provider Create With Data 0 data data Size 0 if provider 0 OS Dispose Ptr data SWT error SWT ERROR NO HANDLES int colorspace device colorspace handle OS CG Image Create width height 8 32 bpr colorspace OS kCG Image Alpha None Skip First provider null false 0 OS CG Data Provider Release provider if handle 0 OS Dispose Ptr data SWT error SWT ERROR NO HANDLES Fill the image with white int bpc OS CG Image Get Bits Per Component handle int context OS CG Bitmap Context Create this data width height bpc bpr colorspace OS kCG Image Alpha None Skip First if context 0 SWT error SWT ERROR NO HANDLES CG Rect rect new CG Rect rect width width rect height height OS CG Context SetRGB Fill Color context 1 1 1 1 OS CG Context Fill Rect context rect OS CG Context Release context  ERROR_INVALID_ARGUMENT dataSize NewPtr dataSize ERROR_NO_HANDLES CGDataProviderCreateWithData dataSize DisposePtr ERROR_NO_HANDLES CGImageCreate kCGImageAlphaNoneSkipFirst CGDataProviderRelease DisposePtr ERROR_NO_HANDLES CGImageGetBitsPerComponent CGBitmapContextCreate kCGImageAlphaNoneSkipFirst ERROR_NO_HANDLES CGRect CGRect CGContextSetRGBFillColor CGContextFillRect CGContextRelease
void init Device device Image Data image if image null SWT error SWT ERROR NULL ARGUMENT this device device int width image width int height image height Palette Data palette image palette if image depth 1 image depth 2 image depth 4 image depth 8 palette is Direct image depth 8 image depth 16 image depth 24 image depth 32 palette is Direct SWT error SWT ERROR UNSUPPORTED DEPTH Create the image int data Size width height 4 data OS New Ptr data Size if data 0 SWT error SWT ERROR NO HANDLES int provider OS CG Data Provider Create With Data 0 data data Size 0 if provider 0 OS Dispose Ptr data SWT error SWT ERROR NO HANDLES int colorspace device colorspace int transparency image get Transparency Type int alpha Info transparency SWT TRANSPARENCY NONE OS kCG Image Alpha None Skip First OS kCG Image Alpha First handle OS CG Image Create width height 8 32 width 4 colorspace alpha Info provider null false 0 OS CG Data Provider Release provider if handle 0 OS Dispose Ptr data SWT error SWT ERROR NO HANDLES Initialize data int bpr width 4 byte buffer new byte data Size if palette is Direct Image Data blit Image Data BLIT SRC image data image depth image bytes Per Line image get Byte Order 0 0 width height palette red Mask palette green Mask palette blue Mask Image Data ALPHA OPAQUE null 0 0 0 buffer 32 bpr Image Data MSB FIRST 0 0 width height 0xFF0000 0xFF00 0xFF false false else RGB rgbs palette getRG Bs int length rgbs length byte src Reds new byte length byte src Greens new byte length byte src Blues new byte length for int i 0 i rgbs length i RGB rgb rgbs i if rgb null continue src Reds i byte rgb red src Greens i byte rgb green src Blues i byte rgb blue Image Data blit Image Data BLIT SRC image data image depth image bytes Per Line image get Byte Order 0 0 width height src Reds src Greens src Blues Image Data ALPHA OPAQUE null 0 0 0 buffer 32 bpr Image Data MSB FIRST 0 0 width height 0xFF0000 0xFF00 0xFF false false Initialize transparency if transparency SWT TRANSPARENCY MASK image transparent Pixel 1 this type image transparent Pixel 1 SWT BITMAP SWT ICON if image transparent Pixel 1 int trans Red 0 trans Green 0 trans Blue 0 if palette is Direct RGB rgb palette getRGB image transparent Pixel trans Red rgb red trans Green rgb green trans Blue rgb blue else RGB rgbs palette getRG Bs if image transparent Pixel rgbs length RGB rgb rgbs image transparent Pixel trans Red rgb red trans Green rgb green trans Blue rgb blue transparent Pixel trans Red 16 trans Green 8 trans Blue Image Data mask Image image get Transparency Mask byte mask Data mask Image data int mask Bpl mask Image bytes Per Line int offset 0 mask Offset 0 for int y 0 y height y for int x 0 x width x buffer offset mask Data mask Offset x 3 1 7 x 0x7 0 byte 0xff 0 offset 4 mask Offset mask Bpl else this type SWT BITMAP if image alpha 1 this alpha image alpha byte a byte this alpha for int data Index 0 data Index buffer length data Index 4 buffer data Index a else if image alpha Data null this alpha Data new byte image alpha Data length System arraycopy image alpha Data 0 this alpha Data 0 alpha Data length int offset 0 alpha Offset 0 for int y 0 y height y for int x 0 x width x buffer offset alpha Data alpha Offset offset 4 alpha Offset 1 OS memcpy data buffer data Size  ImageData ERROR_NULL_ARGUMENT PaletteData isDirect isDirect ERROR_UNSUPPORTED_DEPTH dataSize NewPtr dataSize ERROR_NO_HANDLES CGDataProviderCreateWithData dataSize DisposePtr ERROR_NO_HANDLES getTransparencyType alphaInfo TRANSPARENCY_NONE kCGImageAlphaNoneSkipFirst kCGImageAlphaFirst CGImageCreate alphaInfo CGDataProviderRelease DisposePtr ERROR_NO_HANDLES dataSize isDirect ImageData ImageData BLIT_SRC bytesPerLine getByteOrder redMask greenMask blueMask ImageData ALPHA_OPAQUE ImageData MSB_FIRST getRGBs srcReds srcGreens srcBlues srcReds srcGreens srcBlues ImageData ImageData BLIT_SRC bytesPerLine getByteOrder srcReds srcGreens srcBlues ImageData ALPHA_OPAQUE ImageData MSB_FIRST TRANSPARENCY_MASK transparentPixel transparentPixel transparentPixel transRed transGreen transBlue isDirect transparentPixel transRed transGreen transBlue getRGBs transparentPixel transparentPixel transRed transGreen transBlue transparentPixel transRed transGreen transBlue ImageData maskImage getTransparencyMask maskData maskImage maskBpl maskImage bytesPerLine maskOffset maskData maskOffset maskOffset maskBpl dataIndex dataIndex dataIndex dataIndex alphaData alphaData alphaData alphaData alphaData alphaData alphaOffset alphaData alphaOffset alphaOffset dataSize
Invokes platform specific functionality to allocate a new GC handle p b IMPORTANT b This method is em not em part of the public API for code Image code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param data the platform specific GC data return the platform specific GC handle public int internal new GC GC Data data if handle 0 SWT error SWT ERROR GRAPHIC DISPOSED if type SWT BITMAP memGC null SWT error SWT ERROR INVALID ARGUMENT int width OS CG Image Get Width handle int height OS CG Image Get Height handle int bpc OS CG Image Get Bits Per Component handle int bpr OS CG Image Get Bytes Per Row handle int colorspace OS CG Image Get Color Space handle int context OS CG Bitmap Context Create this data width height bpc bpr colorspace OS kCG Image Alpha None Skip First if context 0 SWT error SWT ERROR NO HANDLES OS CG Context ScaleCTM context 1 1 OS CG Context TranslateCTM context 0 height if data null int mask SWT LEFT TO RIGHT SWT RIGHT TO LEFT if data style mask 0 data style SWT LEFT TO RIGHT data device device data background device COLOR WHITE handle data foreground device COLOR BLACK handle data font device system Font data image this return context  internal_new_GC GCData ERROR_GRAPHIC_DISPOSED ERROR_INVALID_ARGUMENT CGImageGetWidth CGImageGetHeight CGImageGetBitsPerComponent CGImageGetBytesPerRow CGImageGetColorSpace CGBitmapContextCreate kCGImageAlphaNoneSkipFirst ERROR_NO_HANDLES CGContextScaleCTM CGContextTranslateCTM LEFT_TO_RIGHT RIGHT_TO_LEFT LEFT_TO_RIGHT COLOR_WHITE COLOR_BLACK systemFont
Invokes platform specific functionality to dispose a GC handle p b IMPORTANT b This method is em not em part of the public API for code Image code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param hDC the platform specific GC handle param data the platform specific GC data public void internal dispose GC int context GC Data data OS CG Context Release context  internal_dispose_GC GCData CGContextRelease
Returns code true code if the image has been disposed and code false code otherwise p This method gets the dispose state for the image When an image has been disposed it is an error to invoke any other method using the image return code true code when the image is disposed and code false code otherwise public boolean is Disposed return handle 0  isDisposed
Sets the color to which to map the transparent pixel p There are certain uses of code Images code that do not support transparency for example setting an image into a button or label In these cases it may be desired to simulate transparency by using the background color of the widget to paint the transparent pixels of the image This method specifies the color that will be used in these cases For example pre Button b new Button image set Background b get Background b set Image image pre p p The image may be modified by this operation in effect the transparent regions may be filled with the supplied color Hence this operation is not reversible and it is not legal to call this function twice or with a null argument p p This method has no effect if the receiver does not have a transparent pixel value p param color the color to use when a transparent pixel is specified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the color is null li li ERROR INVALID ARGUMENT if the color has been disposed li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Background Color color if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED if color null SWT error SWT ERROR NULL ARGUMENT if color is Disposed SWT error SWT ERROR INVALID ARGUMENT if transparent Pixel 1 return NOT DONE  setBackground getBackground setImage IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED setBackground isDisposed ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT transparentPixel
Returns a string containing a concise human readable description of the receiver return a string representation of the receiver public String to String if is Disposed return Image DISPOSED return Image handle  toString isDisposed

Constructs a new empty region exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for region creation li ul public Region this null  SWTError ERROR_NO_HANDLES
Constructs a new empty region p You must dispose the region when it is no longer required p param device the device on which to allocate the region exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for region creation li ul exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li ul see dispose since 3 0 public Region Device device if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT this device device handle OS New Rgn if handle 0 SWT error SWT ERROR NO HANDLES  SWTError ERROR_NO_HANDLES IllegalArgumentException ERROR_NULL_ARGUMENT getDevice ERROR_NULL_ARGUMENT NewRgn ERROR_NO_HANDLES
Region Device device int handle this device device this handle handle 
Adds the given polygon to the collection of rectangles the receiver maintains to describe its area param point Array points that describe the polygon to merge with the receiver exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul since 3 0 public void add int point Array if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED if point Array null SWT error SWT ERROR NULL ARGUMENT if point Array length 2 return int poly Rgn OS New Rgn OS Open Rgn OS Move To short point Array 0 short point Array 1 for int i 1 i point Array length 2 i OS Line To short point Array 2 i short point Array 2 i 1 OS Line To short point Array 0 short point Array 1 OS Close Rgn poly Rgn OS Union Rgn handle poly Rgn handle OS Dispose Rgn poly Rgn  pointArray IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED pointArray isDisposed ERROR_GRAPHIC_DISPOSED pointArray ERROR_NULL_ARGUMENT pointArray polyRgn NewRgn OpenRgn MoveTo pointArray pointArray pointArray LineTo pointArray pointArray LineTo pointArray pointArray CloseRgn polyRgn UnionRgn polyRgn DisposeRgn polyRgn
Adds the given rectangle to the collection of rectangles the receiver maintains to describe its area param rect the rectangle to merge with the receiver exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li li ERROR INVALID ARGUMENT if the rectangle s width or height is negative li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void add Rectangle rect if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED if rect null SWT error SWT ERROR NULL ARGUMENT if rect width 0 rect height 0 SWT error SWT ERROR INVALID ARGUMENT int rect Rgn OS New Rgn Rect r new Rect OS Set Rect r short rect x short rect y short rect x rect width short rect y rect height OS Rect Rgn rect Rgn r OS Union Rgn handle rect Rgn handle OS Dispose Rgn rect Rgn  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED isDisposed ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT rectRgn NewRgn SetRect RectRgn rectRgn UnionRgn rectRgn DisposeRgn rectRgn
Adds all of the rectangles which make up the area covered by the argument to the collection of rectangles the receiver maintains to describe its area param region the region to merge exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li li ERROR INVALID ARGUMENT if the argument has been disposed li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void add Region region if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED if region null SWT error SWT ERROR NULL ARGUMENT if region is Disposed SWT error SWT ERROR INVALID ARGUMENT OS Union Rgn handle region handle handle  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED isDisposed ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT UnionRgn
Returns code true code if the point specified by the arguments is inside the area specified by the receiver and code false code otherwise param x the x coordinate of the point to test for containment param y the y coordinate of the point to test for containment return code true code if the region contains the point and code false code otherwise exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public boolean contains int x int y if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED org eclipse swt internal carbon Point point new org eclipse swt internal carbon Point OS Set Pt point short x short y return OS Pt In Rgn point handle  SWTException ERROR_GRAPHIC_DISPOSED isDisposed ERROR_GRAPHIC_DISPOSED SetPt PtInRgn
Returns code true code if the given point is inside the area specified by the receiver and code false code otherwise param pt the point to test for containment return code true code if the region contains the point and code false code otherwise exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public boolean contains Point pt if pt null SWT error SWT ERROR NULL ARGUMENT return contains pt x pt y  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT
Disposes of the operating system resources associated with the region Applications must dispose of all regions which they allocate public void dispose if handle 0 return OS Dispose Rgn handle handle 0 device null  DisposeRgn
Compares the argument to the receiver and returns true if they represent the em same em object using a class specific comparison param object the object to compare with this object return code true code if the object is the same as this object and code false code otherwise see hash Code public boolean equals Object object if this object return true if object instanceof Region return false Region region Region object return handle region handle  hashCode
Returns a rectangle which represents the rectangular union of the collection of rectangles the receiver maintains to describe its area return a bounding rectangle for the region exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see Rectangle union public Rectangle get Bounds if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED Rect bounds new Rect OS Get Region Bounds handle bounds int width bounds right bounds left int height bounds bottom bounds top return new Rectangle bounds left bounds top width height  SWTException ERROR_GRAPHIC_DISPOSED getBounds isDisposed ERROR_GRAPHIC_DISPOSED GetRegionBounds
public static Region carbon new Device device int handle return new Region device handle  carbon_new
Returns an integer hash code for the receiver Any two objects which return code true code when passed to code equals code must return the same value for this method return the receiver s hash see equals public int hash Code return handle  hashCode
Intersects the given rectangle to the collection of rectangles the receiver maintains to describe its area param rect the rectangle to intersect with the receiver exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li li ERROR INVALID ARGUMENT if the rectangle s width or height is negative li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul since 3 0 public void intersect Rectangle rect if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED if rect null SWT error SWT ERROR NULL ARGUMENT if rect width 0 rect height 0 SWT error SWT ERROR INVALID ARGUMENT int rect Rgn OS New Rgn Rect r new Rect OS Set Rect r short rect x short rect y short rect x rect width short rect y rect height OS Rect Rgn rect Rgn r OS Sect Rgn handle rect Rgn handle OS Dispose Rgn rect Rgn  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED isDisposed ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT rectRgn NewRgn SetRect RectRgn rectRgn SectRgn rectRgn DisposeRgn rectRgn
Intersects all of the rectangles which make up the area covered by the argument to the collection of rectangles the receiver maintains to describe its area param region the region to intersect exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li li ERROR INVALID ARGUMENT if the argument has been disposed li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul since 3 0 public void intersect Region region if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED if region null SWT error SWT ERROR NULL ARGUMENT if region is Disposed SWT error SWT ERROR INVALID ARGUMENT OS Sect Rgn handle region handle handle  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED isDisposed ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT SectRgn
Returns code true code if the rectangle described by the arguments intersects with any of the rectangles the receiver mainains to describe its area and code false code otherwise param x the x coordinate of the origin of the rectangle param y the y coordinate of the origin of the rectangle param width the width of the rectangle param height the height of the rectangle return code true code if the rectangle intersects with the receiver and code false code otherwise exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see Rectangle intersects public boolean intersects int x int y int width int height if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED Rect rect new Rect OS Set Rect rect short x short y short x width short y height return OS Rect In Rgn rect handle  SWTException ERROR_GRAPHIC_DISPOSED isDisposed ERROR_GRAPHIC_DISPOSED SetRect RectInRgn
Returns code true code if the given rectangle intersects with any of the rectangles the receiver mainains to describe its area and code false code otherwise param rect the rectangle to test for intersection return code true code if the rectangle intersects with the receiver and code false code otherwise exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see Rectangle intersects public boolean intersects Rectangle rect if rect null SWT error SWT ERROR NULL ARGUMENT return intersects rect x rect y rect width rect height  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT
Returns code true code if the region has been disposed and code false code otherwise p This method gets the dispose state for the region When a region has been disposed it is an error to invoke any other method using the region return code true code when the region is disposed and code false code otherwise public boolean is Disposed return handle 0  isDisposed
Returns code true code if the receiver does not cover any area in the x y coordinate plane and code false code if the receiver does cover some area in the plane return code true code if the receiver is empty and code false code otherwise exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public boolean is Empty if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED return OS Empty Rgn handle  SWTException ERROR_GRAPHIC_DISPOSED isEmpty isDisposed ERROR_GRAPHIC_DISPOSED EmptyRgn
Subtracts the given polygon from the collection of rectangles the receiver maintains to describe its area param point Array points that describe the polygon to merge with the receiver exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul since 3 0 public void subtract int point Array if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED if point Array null SWT error SWT ERROR NULL ARGUMENT if point Array length 2 return int poly Rgn OS New Rgn OS Open Rgn OS Move To short point Array 0 short point Array 1 for int i 1 i point Array length 2 i OS Line To short point Array 2 i short point Array 2 i 1 OS Line To short point Array 0 short point Array 1 OS Close Rgn poly Rgn OS Diff Rgn handle poly Rgn handle OS Dispose Rgn poly Rgn  pointArray IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED pointArray isDisposed ERROR_GRAPHIC_DISPOSED pointArray ERROR_NULL_ARGUMENT pointArray polyRgn NewRgn OpenRgn MoveTo pointArray pointArray pointArray LineTo pointArray pointArray LineTo pointArray pointArray CloseRgn polyRgn DiffRgn polyRgn DisposeRgn polyRgn
Subtracts the given rectangle from the collection of rectangles the receiver maintains to describe its area param rect the rectangle to subtract from the receiver exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li li ERROR INVALID ARGUMENT if the rectangle s width or height is negative li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul since 3 0 public void subtract Rectangle rect if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED if rect null SWT error SWT ERROR NULL ARGUMENT if rect width 0 rect height 0 SWT error SWT ERROR INVALID ARGUMENT int rect Rgn OS New Rgn Rect r new Rect OS Set Rect r short rect x short rect y short rect x rect width short rect y rect height OS Rect Rgn rect Rgn r OS Diff Rgn handle rect Rgn handle OS Dispose Rgn rect Rgn  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED isDisposed ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT rectRgn NewRgn SetRect RectRgn rectRgn DiffRgn rectRgn DisposeRgn rectRgn
Subtracts all of the rectangles which make up the area covered by the argument from the collection of rectangles the receiver maintains to describe its area param region the region to subtract exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li li ERROR INVALID ARGUMENT if the argument has been disposed li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul since 3 0 public void subtract Region region if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED if region null SWT error SWT ERROR NULL ARGUMENT if region is Disposed SWT error SWT ERROR INVALID ARGUMENT OS Diff Rgn handle region handle handle  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED isDisposed ERROR_GRAPHIC_DISPOSED ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT DiffRgn
Returns a string containing a concise human readable description of the receiver return a string representation of the receiver public String to String if is Disposed return Region DISPOSED return Region handle  toString isDisposed

void create Style Font default Font if atsu Style 0 return int buffer new int 1 OS ATSU Create Style buffer atsu Style buffer 0 if atsu Style 0 SWT error SWT ERROR NO HANDLES int length 0 ptr Length 0 index 0 Font font null Color foreground null if style null font style font foreground style foreground if font null font default Font boolean synthesize false if font null length 2 ptr Length 8 short real Style new short 1 OS FM Get Font From Font Family Instance font id font style buffer real Style synthesize font style real Style 0 if synthesize length 2 ptr Length 8 if foreground null length 1 ptr Length RGB Color sizeof int tags new int length int sizes new int length int values new int length int ptr OS New Ptr ptr Length ptr1 ptr if font null buffer 0 font handle tags index OS kATSU Font Tag sizes index 4 values index ptr1 OS memcpy values index buffer sizes index ptr1 sizes index index buffer 0 OS X2 Fix font size tags index OS kATSU Size Tag sizes index 4 values index ptr1 OS memcpy values index buffer sizes index ptr1 sizes index index if synthesize byte buffer1 new byte 1 buffer1 0 font style OS italic 0 byte 1 0 tags index OS kATSUQD Italic Tag sizes index 1 values index ptr1 OS memcpy values index buffer1 sizes index ptr1 sizes index index buffer1 0 font style OS bold 0 byte 1 0 tags index OS kATSUQD Boldface Tag sizes index 1 values index ptr1 OS memcpy values index buffer1 sizes index ptr1 sizes index index if foreground null RGB Color rgb new RGB Color float color foreground handle rgb red short color 0 0xffff rgb green short color 1 0xffff rgb blue short color 2 0xffff tags index OS kATSU Color Tag sizes index RGB Color sizeof values index ptr1 OS memcpy values index rgb sizes index ptr1 sizes index index OS ATSU Set Attributes atsu Style tags length tags sizes values OS Dispose Ptr ptr  createStyle defaultFont atsuStyle ATSUCreateStyle atsuStyle atsuStyle ERROR_NO_HANDLES ptrLength defaultFont ptrLength realStyle FMGetFontFromFontFamilyInstance realStyle realStyle ptrLength ptrLength RGBColor NewPtr ptrLength kATSUFontTag X2Fix kATSUSizeTag kATSUQDItalicTag kATSUQDBoldfaceTag RGBColor RGBColor kATSUColorTag RGBColor ATSUSetAttributes atsuStyle DisposePtr
void free Style if atsu Style 0 return OS ATSU Dispose Style atsu Style atsu Style 0  freeStyle atsuStyle ATSUDisposeStyle atsuStyle atsuStyle
Constructs a new instance of this class on the given device p You must dispose the text layout when it is no longer required p param device the device on which to allocate the text layout exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if device is null and there is no current device li ul see dispose public Text Layout Device device if device null device Device get Device if device null SWT error SWT ERROR NULL ARGUMENT this device device int buffer new int 1 OS ATSU Create Text Layout buffer if buffer 0 0 SWT error SWT ERROR NO HANDLES layout buffer 0 OS ATSU Set Highlighting Method layout 1 new ATSU Unhighlight Data ascent descent 1 text styles new Style Item 2 styles 0 new Style Item styles 1 new Style Item  IllegalArgumentException ERROR_NULL_ARGUMENT TextLayout getDevice ERROR_NULL_ARGUMENT ATSUCreateTextLayout ERROR_NO_HANDLES ATSUSetHighlightingMethod ATSUUnhighlightData StyleItem StyleItem StyleItem
void check Layout if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED  checkLayout isDisposed ERROR_GRAPHIC_DISPOSED
void compute Runs if breaks null return int length text length if length 0 for int i 0 i styles length 1 i Style Item run styles i run create Style font int run Length styles i 1 start run start OS ATSU Set Run Style layout run atsu Style run start run Length int buffer new int 1 if ascent 1 OS ATSU Get Layout Control layout OS kATSU Line Ascent Tag 4 buffer null int ptr OS New Ptr 4 buffer 0 OS Long2 Fix Math max ascent OS Fix2 Long buffer 0 OS memcpy ptr buffer 4 int tags new int OS kATSU Line Ascent Tag int sizes new int 4 int values new int ptr OS ATSU Set Line Controls layout 0 tags length tags sizes values OS Dispose Ptr ptr if descent 1 OS ATSU Get Layout Control layout OS kATSU Line Descent Tag 4 buffer null int ptr OS New Ptr 4 buffer 0 OS Long2 Fix Math max descent OS Fix2 Long buffer 0 OS memcpy ptr buffer 4 int tags new int OS kATSU Line Descent Tag int sizes new int 4 int values new int ptr OS ATSU Set Line Controls layout 0 tags length tags sizes values OS Dispose Ptr ptr OS ATSU Get Layout Control layout OS kATSU Line Width Tag 4 buffer null int wrap Width OS Fix2 Long buffer 0 int width wrap Width 0 0x7fff wrap Width OS ATSU Batch Break Lines layout 0 OS kATSU To Text End OS Long2 Fix width buffer int count Math max 0 buffer 0 breaks new int count 1 OS ATSU Get Soft Line Breaks layout 0 OS kATSU To Text End count breaks buffer breaks count length else breaks new int 1 int line Count breaks length lineX new int line Count line Width new int line Count line Height new int line Count line Ascent new int line Count if length 0 ATS Trapezoid trapezoid new ATS Trapezoid for int i 0 start 0 i line Count i int line Break breaks i int line Length skip Hard Break line Break start OS ATSU Get Glyph Bounds layout 0 0 start line Length 0 1 line Length short OS kATS Use Device Origins 1 trapezoid null lineX i OS Fix2 Long trapezoid lowerLeft x line Ascent i OS Fix2 Long trapezoid upperRight y if line Length 0 line Width i OS Fix2 Long trapezoid upperRight x OS Fix2 Long trapezoid upperLeft x line Height i OS Fix2 Long trapezoid lowerRight y line Ascent i start line Break  computeRuns StyleItem createStyle runLength ATSUSetRunStyle atsuStyle runLength ATSUGetLayoutControl kATSULineAscentTag NewPtr Long2Fix Fix2Long kATSULineAscentTag ATSUSetLineControls DisposePtr ATSUGetLayoutControl kATSULineDescentTag NewPtr Long2Fix Fix2Long kATSULineDescentTag ATSUSetLineControls DisposePtr ATSUGetLayoutControl kATSULineWidthTag wrapWidth Fix2Long wrapWidth wrapWidth ATSUBatchBreakLines kATSUToTextEnd Long2Fix ATSUGetSoftLineBreaks kATSUToTextEnd lineCount lineCount lineWidth lineCount lineHeight lineCount lineAscent lineCount ATSTrapezoid ATSTrapezoid lineCount lineBreak lineLength skipHardBreak lineBreak ATSUGetGlyphBounds lineLength lineLength kATSUseDeviceOrigins Fix2Long lowerLeft_x lineAscent Fix2Long upperRight_y lineLength lineWidth Fix2Long upperRight_x Fix2Long upperLeft_x lineHeight Fix2Long lowerRight_y lineAscent lineBreak
Disposes of the operating system resources associated with the text layout Applications must dispose of all allocated text layouts public void dispose if layout 0 return free Runs font null text null styles null if layout 0 OS ATSU Dispose Text Layout layout layout 0 if text Ptr 0 OS Dispose Ptr text Ptr text Ptr 0 if tabs Ptr 0 OS Dispose Ptr tabs Ptr tabs Ptr 0 device null  freeRuns ATSUDisposeTextLayout textPtr DisposePtr textPtr textPtr tabsPtr DisposePtr tabsPtr tabsPtr
Draws the receiver s text using the specified GC at the specified point param gc the GC to draw param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw GC gc int x int y draw gc x y 1 1 null null  SWTException ERROR_GRAPHIC_DISPOSED
Draws the receiver s text using the specified GC at the specified point param gc the GC to draw param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn param selection Start the offset where the selections starts or 1 indicating no selection param selection End the offset where the selections ends or 1 indicating no selection param selection Foreground selection foreground or NULL to use the system default color param selection Background selection background or NULL to use the system default color exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void draw GC gc int x int y int selection Start int selection End Color selection Foreground Color selection Background check Layout compute Runs if gc null SWT error SWT ERROR NULL ARGUMENT if gc is Disposed SWT error SWT ERROR INVALID ARGUMENT if selection Foreground null selection Foreground is Disposed SWT error SWT ERROR INVALID ARGUMENT if selection Background null selection Background is Disposed SWT error SWT ERROR INVALID ARGUMENT int length text length if length 0 return int buffer new int 1 int ptr OS New Ptr 4 buffer 0 gc handle OS memcpy ptr buffer 4 int tags new int OS kATSUCG Context Tag int sizes new int 4 int values new int ptr OS ATSU Set Layout Controls layout tags length tags sizes values OS Dispose Ptr ptr boolean has Selection selection Start selection End selection Start 1 selection End 1 OS CG Context SaveG State gc handle Feature in ATSU There is no API to set a background attribute of an ATSU style Draw the background of styles ourselfs Rectangle rect null Region clipping null region null for int j 0 j styles length j Style Item run styles j if run style null run style background null continue OS CG Context Set Fill Color gc handle run style background handle if clipping null region new Region clipping new Region gc get Clipping clipping rect clipping get Bounds int start run start int end j 1 styles length styles j 1 start 1 length for int i 0 line Start 0 lineY 0 i breaks length i int line Break breaks i int line End line Break 1 if start line End end line Start int high Start Math max line Start start int high End Math min line End end int high Len skip Hard Break high End high Start 1 if high Len 0 OS ATSU Get Text Highlight layout lineX i lineY high Start high Len region handle OS Offset Rgn region handle short 0 short lineY line Ascent i OS Offset Rgn region handle short x short y region intersect clipping gc set Clipping region gc fill Rectangle rect if line End end break lineY line Height i line Start line Break if clipping null gc set Clipping clipping OS CG Context RestoreG State gc handle OS CG Context SaveG State gc handle clipping dispose region dispose OS CG Context ScaleCTM gc handle 1 1 OS CG Context Set Fill Color gc handle gc data foreground int drawX OS Long2 Fix x int drawY y for int i 0 start 0 i breaks length i int line Break breaks i int line Length skip Hard Break line Break start if line Length 0 int fixY Draw OS Long2 Fix drawY line Ascent i OS ATSU Draw Text layout start line Length drawX fixY Draw int end start line Length 1 if has Selection selection Start end start selection End int sel Start Math max selection Start start int sel End Math min selection End end OS ATSU Highlight Text layout drawX fixY Draw sel Start sel End sel Start 1 drawY line Height i start line Break OS CG Context RestoreG State gc handle  selectionStart selectionEnd selectionForeground selectionBackground SWTException ERROR_GRAPHIC_DISPOSED selectionStart selectionEnd selectionForeground selectionBackground checkLayout computeRuns ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT selectionForeground selectionForeground isDisposed ERROR_INVALID_ARGUMENT selectionBackground selectionBackground isDisposed ERROR_INVALID_ARGUMENT NewPtr kATSUCGContextTag ATSUSetLayoutControls DisposePtr hasSelection selectionStart selectionEnd selectionStart selectionEnd CGContextSaveGState StyleItem CGContextSetFillColor getClipping getBounds lineStart lineBreak lineEnd lineBreak lineEnd lineStart highStart lineStart highEnd lineEnd highLen skipHardBreak highEnd highStart highLen ATSUGetTextHighlight highStart highLen OffsetRgn lineAscent OffsetRgn setClipping fillRectangle lineEnd lineHeight lineStart lineBreak setClipping CGContextRestoreGState CGContextSaveGState CGContextScaleCTM CGContextSetFillColor Long2Fix lineBreak lineLength skipHardBreak lineBreak lineLength fixYDraw Long2Fix lineAscent ATSUDrawText lineLength fixYDraw lineLength hasSelection selectionStart selectionEnd selStart selectionStart selEnd selectionEnd ATSUHighlightText fixYDraw selStart selEnd selStart lineHeight lineBreak CGContextRestoreGState
void free Runs if breaks null return for int i 0 i styles length i Style Item run styles i run free Style breaks lineX line Width line Height line Ascent null  freeRuns StyleItem freeStyle lineWidth lineHeight lineAscent
Returns the receiver s horizontal text alignment which will be one of code SWT LEFT code code SWT CENTER code or code SWT RIGHT code return the alignment used to positioned text horizontally exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Alignment check Layout int buffer new int 1 OS ATSU Get Layout Control layout OS kATSU Line Flush Factor Tag 4 buffer null switch buffer 0 case OS kATSU Center Alignment return SWT CENTER case OS kATSU End Alignment return SWT RIGHT return SWT LEFT  SWTException ERROR_GRAPHIC_DISPOSED getAlignment checkLayout ATSUGetLayoutControl kATSULineFlushFactorTag kATSUCenterAlignment kATSUEndAlignment
Returns the ascent of the receiver return the ascent exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see get Descent see set Descent int see set Ascent int see get Line Metrics int public int get Ascent check Layout return ascent  SWTException ERROR_GRAPHIC_DISPOSED getDescent setDescent setAscent getLineMetrics getAscent checkLayout
Returns the bounds of the receiver return the bounds of the receiver exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Rectangle get Bounds check Layout compute Runs int width 0 height 0 for int i 0 i breaks length i width Math max width line Width i height line Height i int buffer new int 1 OS ATSU Get Layout Control layout OS kATSU Line Width Tag 4 buffer null int wrap Width OS Fix2 Long buffer 0 if wrap Width 0 width Math max width wrap Width return new Rectangle 0 0 width height  SWTException ERROR_GRAPHIC_DISPOSED getBounds checkLayout computeRuns lineWidth lineHeight ATSUGetLayoutControl kATSULineWidthTag wrapWidth Fix2Long wrapWidth wrapWidth
Returns the bounds for the specified range of characters The bounds is the smallest rectangle that encompasses all characters in the range The start and end offsets are inclusive and will be clamped if out of range param start the start offset param end the end offset return the bounds of the character range exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Rectangle get Bounds int start int end check Layout compute Runs int length text length if length 0 return new Rectangle 0 0 0 0 if start end return new Rectangle 0 0 0 0 start Math min Math max 0 start length 1 end Math min Math max 0 end length 1 int rgn OS New Rgn Rect rect new Rect Rect rect1 new Rect for int i 0 line Start 0 lineY 0 i breaks length i int line Break breaks i int line End line Break 1 if start line End end line Start int high Start Math max line Start start int high End Math min line End end int high Len skip Hard Break high End high Start 1 if high Len 0 OS ATSU Get Text Highlight layout lineX i lineY high Start high Len rgn OS Get Region Bounds rgn rect1 OS Offset Rect rect1 short 0 short lineY line Ascent i OS Union Rect rect rect1 rect if line End end break lineY line Height i line Start line Break OS Dispose Rgn rgn return new Rectangle rect left rect top rect right rect left rect bottom rect top  SWTException ERROR_GRAPHIC_DISPOSED getBounds checkLayout computeRuns NewRgn lineStart lineBreak lineEnd lineBreak lineEnd lineStart highStart lineStart highEnd lineEnd highLen skipHardBreak highEnd highStart highLen ATSUGetTextHighlight highStart highLen GetRegionBounds OffsetRect lineAscent UnionRect lineEnd lineHeight lineStart lineBreak DisposeRgn
Returns the descent of the receiver return the descent exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see get Ascent see set Ascent int see set Descent int see get Line Metrics int public int get Descent check Layout return descent  SWTException ERROR_GRAPHIC_DISPOSED getAscent setAscent setDescent getLineMetrics getDescent checkLayout
Returns the default font currently being used by the receiver to draw and measure text return the receiver s font exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Font get Font check Layout return font  SWTException ERROR_GRAPHIC_DISPOSED getFont checkLayout
Returns the embedding level for the specified character offset The embedding level is usually used to determine the directionality of a character in bidirectional text param offset the charecter offset return the embedding level exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the character offset is out of range li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li public int get Level int offset check Layout compute Runs int length text length if 0 offset offset length SWT error SWT ERROR INVALID RANGE int level 0 TODO return level  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED getLevel checkLayout computeRuns ERROR_INVALID_RANGE
Returns the line offsets Each value in the array is the offset for the first character in a line except for the last value which contains the length of the text return the line offsets exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Line Offsets check Layout compute Runs int offsets new int breaks length 1 System arraycopy breaks 0 offsets 1 breaks length return offsets  SWTException ERROR_GRAPHIC_DISPOSED getLineOffsets checkLayout computeRuns
Returns the index of the line that contains the specified character offset param offset the character offset return the line index exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the character offset is out of range li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Line Index int offset check Layout compute Runs int length text length if 0 offset offset length SWT error SWT ERROR INVALID ARGUMENT for int i 0 i breaks length 1 i int line Break breaks i if line Break offset return i return breaks length 1  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED getLineIndex checkLayout computeRuns ERROR_INVALID_ARGUMENT lineBreak lineBreak
Returns the bounds of the line for the specified line index param line Index the line index return the line bounds exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the line index is out of range li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Rectangle get Line Bounds int line Index check Layout compute Runs int line Count breaks length if 0 line Index line Index line Count SWT error SWT ERROR INVALID RANGE int lineY 0 for int i 0 i line Index i lineY line Height i return new Rectangle lineX line Index lineY line Width line Index line Height line Index  lineIndex IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED getLineBounds lineIndex checkLayout computeRuns lineCount lineIndex lineIndex lineCount ERROR_INVALID_RANGE lineIndex lineHeight lineIndex lineWidth lineIndex lineHeight lineIndex
Returns the receiver s line count This includes lines caused by wrapping return the line count exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Line Count check Layout compute Runs return breaks length  SWTException ERROR_GRAPHIC_DISPOSED getLineCount checkLayout computeRuns
Returns the font metrics for the specified line index param line Index the line index return the font metrics exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the line index is out of range li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Font Metrics get Line Metrics int line Index check Layout compute Runs int line Count breaks length if 0 line Index line Index line Count SWT error SWT ERROR INVALID RANGE int length text length if length 0 Font font this font null this font device get System Font Font Info info new Font Info OS Fetch Font Info font id font size font style info int ascent info ascent int descent info descent int leading info leading return Font Metrics carbon new ascent descent 0 leading ascent leading descent int start line Index 0 0 breaks line Index 1 int line Length breaks line Index start int ascent new int 1 descent new int 1 OS ATSU Get Unjustified Bounds layout start line Length null null ascent descent int height OS Fix2 Long ascent 0 OS Fix2 Long descent 0 return Font Metrics carbon new OS Fix2 Long ascent 0 OS Fix2 Long descent 0 0 0 height  lineIndex IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED FontMetrics getLineMetrics lineIndex checkLayout computeRuns lineCount lineIndex lineIndex lineCount ERROR_INVALID_RANGE getSystemFont FontInfo FontInfo FetchFontInfo FontMetrics carbon_new lineIndex lineIndex lineLength lineIndex ATSUGetUnjustifiedBounds lineLength Fix2Long Fix2Long FontMetrics carbon_new Fix2Long Fix2Long
Returns the location for the specified character offset The code trailing code argument indicates whether the offset corresponds to the leading or trailing edge of the cluster param offset the character offset param trailing the trailing flag return the location of the character offset exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see get Offset Point int see get Offset int int int public Point get Location int offset boolean trailing check Layout compute Runs int length text length if 0 offset offset length SWT error SWT ERROR INVALID RANGE if length 0 return new Point 0 0 int lineY 0 for int i 0 i breaks length 1 i int line Break breaks i if line Break offset break lineY line Height i if offset length text char At offset n trailing offset ATSU Caret caret new ATSU Caret OS ATSU Offset To Position layout offset trailing caret null null return new Point Math min OS Fix2 Long caret fX OS Fix2 Long caret f DeltaX lineY  SWTException ERROR_GRAPHIC_DISPOSED getOffset getOffset getLocation checkLayout computeRuns ERROR_INVALID_RANGE lineBreak lineBreak lineHeight charAt ATSUCaret ATSUCaret ATSUOffsetToPosition Fix2Long Fix2Long fDeltaX
Returns the next offset for the specified offset and movement type The movement is one of code SWT MOVEMENT CHAR code code SWT MOVEMENT CLUSTER code or code SWT MOVEMENT WORD code param offset the start offset param movement the movement type return the next offset exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the offset is out of range li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see get Previous Offset int int public int get Next Offset int offset int movement return  getOffset offset movement true  MOVEMENT_CHAR MOVEMENT_CLUSTER MOVEMENT_WORD IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED getPreviousOffset getNextOffset _getOffset
int  getOffset int offset int movement boolean forward check Layout compute Runs int length text length if 0 offset offset length SWT error SWT ERROR INVALID RANGE if length 0 return 0 int new Offset new int 1 int type OS kATSU By Character switch movement case SWT MOVEMENT CLUSTER type OS kATSU By Character Cluster break case SWT MOVEMENT WORD type OS kATSU By Word break if forward OS ATSU Next Cursor Position layout offset type new Offset if movement SWT MOVEMENT WORD while new Offset 0 length Compatibility is Whitespace text char At new Offset 0 new Offset 0 else OS ATSU Previous Cursor Position layout offset type new Offset if movement SWT MOVEMENT WORD while new Offset 0 0 Compatibility is Whitespace text char At new Offset 0 1 new Offset 0 return new Offset 0  _getOffset checkLayout computeRuns ERROR_INVALID_RANGE newOffset kATSUByCharacter MOVEMENT_CLUSTER kATSUByCharacterCluster MOVEMENT_WORD kATSUByWord ATSUNextCursorPosition newOffset MOVEMENT_WORD newOffset isWhitespace charAt newOffset newOffset ATSUPreviousCursorPosition newOffset MOVEMENT_WORD newOffset isWhitespace charAt newOffset newOffset newOffset
Returns the character offset for the specified point For a typical character the trailing argument will be filled in to indicate whether the point is closer to the leading edge 0 or the trailing edge 1 When the point is over a cluster composed of multiple characters the trailing argument will be filled with the position of the character in the cluster that is closest to the point param point the point param trailing the trailing buffer return the character offset exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the trailing length is less than code 1 code li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see get Location int boolean public int get Offset Point point int trailing check Layout compute Runs if point null SWT error SWT ERROR NULL ARGUMENT return get Offset point x point y trailing  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED getLocation getOffset checkLayout computeRuns ERROR_NULL_ARGUMENT getOffset
Returns the character offset for the specified point For a typical character the trailing argument will be filled in to indicate whether the point is closer to the leading edge 0 or the trailing edge 1 When the point is over a cluster composed of multiple characters the trailing argument will be filled with the position of the character in the cluster that is closest to the point param x the x coordinate of the point param y the y coordinate of the point param trailing the trailing buffer return the character offset exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the trailing length is less than code 1 code li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see get Location int boolean public int get Offset int x int y int trailing check Layout compute Runs if trailing null trailing length 1 SWT error SWT ERROR INVALID ARGUMENT int length text length if length 0 return 0 int lineY 0 start 0 for int i 0 i breaks length 1 i int line Break breaks i int height line Height i if lineY height y break lineY height start line Break int offset new int start boolean leading new boolean 1 OS ATSU Position To Offset layout OS Long2 Fix x OS Long2 Fix y lineY offset leading null if trailing null trailing 0 leading 0 0 1 if leading 0 offset 0 return offset 0  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED getLocation getOffset checkLayout computeRuns ERROR_INVALID_ARGUMENT lineBreak lineHeight lineBreak ATSUPositionToOffset Long2Fix Long2Fix
Returns the orientation of the receiver return the orientation style exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Orientation check Layout int line Dir new int 1 OS ATSU Get Layout Control layout OS kATSU Line Direction Tag 1 line Dir null return line Dir 0 OS kATSU Right To Left Base Direction SWT RIGHT TO LEFT SWT LEFT TO RIGHT  SWTException ERROR_GRAPHIC_DISPOSED getOrientation checkLayout lineDir ATSUGetLayoutControl kATSULineDirectionTag lineDir lineDir kATSURightToLeftBaseDirection RIGHT_TO_LEFT LEFT_TO_RIGHT
Returns the previous offset for the specified offset and movement type The movement is one of code SWT MOVEMENT CHAR code code SWT MOVEMENT CLUSTER code or code SWT MOVEMENT WORD code param offset the start offset param movement the movement type return the previous offset exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the offset is out of range li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see get Next Offset int int public int get Previous Offset int index int movement return  getOffset index movement false  MOVEMENT_CHAR MOVEMENT_CLUSTER MOVEMENT_WORD IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED getNextOffset getPreviousOffset _getOffset
Returns the text segments offsets of the receiver return the text segments offsets exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Segments check Layout return segments  SWTException ERROR_GRAPHIC_DISPOSED getSegments checkLayout
Returns the line spacing of the receiver return the line spacing exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Spacing check Layout return spacing  SWTException ERROR_GRAPHIC_DISPOSED getSpacing checkLayout
Gets the style of the receiver at the specified character offset param offset the text offset return the style or code null code if not set exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the character offset is out of range li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public Text Style get Style int offset check Layout int length text length if 0 offset offset length SWT error SWT ERROR INVALID RANGE for int i 1 i styles length i Style Item item styles i if item start offset return styles i 1 style return null  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED TextStyle getStyle checkLayout ERROR_INVALID_RANGE StyleItem
Returns the tab list of the receiver return the tab list exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Tabs check Layout return tabs  SWTException ERROR_GRAPHIC_DISPOSED getTabs checkLayout
Gets the receiver s text which will be an empty string if it has never been set return the receiver s text exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public String get Text check Layout return text  SWTException ERROR_GRAPHIC_DISPOSED getText checkLayout
Returns the width of the receiver return the width exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public int get Width check Layout int buffer new int 1 OS ATSU Get Layout Control layout OS kATSU Line Width Tag 4 buffer null int wrap Width OS Fix2 Long buffer 0 return wrap Width 0 1 wrap Width  SWTException ERROR_GRAPHIC_DISPOSED getWidth checkLayout ATSUGetLayoutControl kATSULineWidthTag wrapWidth Fix2Long wrapWidth wrapWidth
Returns code true code if the text layout has been disposed and code false code otherwise p This method gets the dispose state for the text layout When a text layout has been disposed it is an error to invoke any other method using the text layout return code true code when the text layout is disposed and code false code otherwise public boolean is Disposed return layout 0  isDisposed
Sets the text alignment for the receiver The alignment controls how a line of text is positioned horizontally The argument should be one of code SWT LEFT code code SWT RIGHT code or code SWT CENTER code p The default alignment is code SWT LEFT code Note that the receiver s width must be set in order to use code SWT RIGHT code or code SWT CENTER code alignment p param alignment the new alignment exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see set Width int public void set Alignment int alignment check Layout int mask SWT LEFT SWT CENTER SWT RIGHT alignment mask if alignment 0 return if alignment get Alignment return free Runs if alignment SWT LEFT 0 alignment SWT LEFT if alignment SWT RIGHT 0 alignment SWT RIGHT int align OS kATSU Start Alignment switch alignment case SWT CENTER align OS kATSU Center Alignment break case SWT RIGHT align OS kATSU End Alignment break set Layout Control OS kATSU Line Flush Factor Tag align 4  SWTException ERROR_GRAPHIC_DISPOSED setWidth setAlignment checkLayout getAlignment freeRuns kATSUStartAlignment kATSUCenterAlignment kATSUEndAlignment setLayoutControl kATSULineFlushFactorTag
Sets the ascent of the receiver The ascent is distance in pixels from the baseline to the top of the line and it is applied to all lines The default value is code 1 code which means that the ascent is calculated from the line fonts param ascent the new ascent exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the ascent is less than code 1 code li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see set Descent int see get Line Metrics public void set Ascent int ascent check Layout if ascent 1 SWT error SWT ERROR INVALID ARGUMENT if this ascent ascent return free Runs this ascent ascent  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED setDescent getLineMetrics setAscent checkLayout ERROR_INVALID_ARGUMENT freeRuns
Sets the descent of the receiver The descent is distance in pixels from the baseline to the bottom of the line and it is applied to all lines The default value is code 1 code which means that the descent is calculated from the line fonts param descent the new descent exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the descent is less than code 1 code li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see set Ascent int see get Line Metrics public void set Descent int descent check Layout if descent 1 SWT error SWT ERROR INVALID ARGUMENT if this descent descent return free Runs this descent descent  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED setAscent getLineMetrics setDescent checkLayout ERROR_INVALID_ARGUMENT freeRuns
void set Layout Control int tag int value int size int buffer new int 1 int ptr1 OS New Ptr 4 buffer 0 value OS memcpy ptr1 buffer 4 int tags new int tag int sizes new int size int values new int ptr1 OS ATSU Set Layout Controls layout tags length tags sizes values OS Dispose Ptr ptr1  setLayoutControl NewPtr ATSUSetLayoutControls DisposePtr
Sets the default font which will be used by the receiver to draw and measure text If the argument is null then a default font appropriate for the platform will be used instead Note that a text style can override the default font param font the new font for the receiver or null to indicate a default font exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the font has been disposed li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Font Font font check Layout if font null font is Disposed SWT error SWT ERROR INVALID ARGUMENT if this font font return if font null font equals this font return free Runs this font font  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED setFont checkLayout isDisposed ERROR_INVALID_ARGUMENT freeRuns
Sets the orientation of the receiver which must be one of code SWT LEFT TO RIGHT code or code SWT RIGHT TO LEFT code p param orientation new orientation style exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Orientation int orientation check Layout int mask SWT RIGHT TO LEFT SWT LEFT TO RIGHT orientation mask if orientation 0 return if orientation SWT LEFT TO RIGHT 0 orientation SWT LEFT TO RIGHT if orientation get Orientation return free Runs int line Dir OS kATSU Left To Right Base Direction if orientation SWT RIGHT TO LEFT line Dir OS kATSU Right To Left Base Direction set Layout Control OS kATSU Line Direction Tag line Dir 1  LEFT_TO_RIGHT RIGHT_TO_LEFT SWTException ERROR_GRAPHIC_DISPOSED setOrientation checkLayout RIGHT_TO_LEFT LEFT_TO_RIGHT LEFT_TO_RIGHT LEFT_TO_RIGHT getOrientation freeRuns lineDir kATSULeftToRightBaseDirection RIGHT_TO_LEFT lineDir kATSURightToLeftBaseDirection setLayoutControl kATSULineDirectionTag lineDir
Sets the offsets of the receiver s text segments Text segments are used to override the default behaviour of the bidirectional algorithm Bidirectional reordering can happen within a text segment but not between two adjacent segments Each text segment is determined by two consecutive offsets in the code segments code arrays The first element of the array should always be zero and the last one should always be equals to length of the text p param segments the text segments offset exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Segments int segments check Layout if this segments null segments null return if this segments null segments null if this segments length segments length int i for i 0 i segments length i if this segments i segments i break if i segments length return free Runs this segments segments  SWTException ERROR_GRAPHIC_DISPOSED setSegments checkLayout freeRuns
Sets the line spacing of the receiver The line spacing is the space left between lines param spacing the new line spacing exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the spacing is negative li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Spacing int spacing check Layout if spacing 0 SWT error SWT ERROR INVALID ARGUMENT if this spacing spacing return this spacing spacing  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED setSpacing checkLayout ERROR_INVALID_ARGUMENT
Sets the style of the receiver for the specified range Styles previously set for that range will be overwritten The start and end offsets are inclusive and will be clamped if out of range param style the style param start the start offset param end the end offset exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Style Text Style style int start int end check Layout int length text length if length 0 return if start end return start Math min Math max 0 start length 1 end Math min Math max 0 end length 1 int low 1 int high styles length while high low 1 int index high low 2 if start styles index start high index else low index if 0 high high styles length Style Item item styles high if item start start styles high 1 start 1 end if style null if item style null return else if style equals item style return free Runs int count 0 i Style Item new Styles new Style Item styles length 2 for i 0 i styles length i Style Item item styles i if item start start break new Styles count item Style Item new Item new Style Item new Item start start new Item style style new Styles count new Item if styles i start end new Item new Style Item new Item start end 1 new Item style styles i 1 style new Styles count new Item else for i styles length i Style Item item styles i if item start end break if end styles i start 1 i styles i start end 1 for i styles length i Style Item item styles i if item start end new Styles count item if new Styles length count styles new Style Item count System arraycopy new Styles 0 styles 0 count else styles new Styles  SWTException ERROR_GRAPHIC_DISPOSED setStyle TextStyle checkLayout StyleItem freeRuns StyleItem newStyles StyleItem StyleItem newStyles StyleItem newItem StyleItem newItem newItem newStyles newItem newItem StyleItem newItem newItem newStyles newItem StyleItem StyleItem newStyles newStyles StyleItem newStyles newStyles
Sets the receiver s tab list Each value in the tab list specifies the space in pixels from the origin of the text layout to the respective tab stop The last tab stop width is repeated continuously param tabs the new tab list exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Tabs int tabs check Layout if this tabs null tabs null return if this tabs null tabs null if this tabs length tabs length int i for i 0 i tabs length i if this tabs i tabs i break if i tabs length return free Runs this tabs tabs if tabs Ptr 0 OS Dispose Ptr tabs Ptr tabs Ptr 0 if tabs null OS ATSU Set Tab Array layout 0 0 else ATSU Tab tab new ATSU Tab tab tab Position OS Long2 Fix 0 int length Math max TAB COUNT tabs length int ptr tabs Ptr OS New Ptr ATSU Tab sizeof length i offset for i 0 offset ptr i tabs length i offset ATSU Tab sizeof tab tab Type short OS kATSU Left Tab tab tab Position OS Long2 Fix tabs i OS memcpy offset tab ATSU Tab sizeof int width i 2 0 tabs i 1 tabs i 2 tabs i 1 if width 0 for i length i offset ATSU Tab sizeof tab tab Type short OS kATSU Left Tab tab tab Position OS Long2 Fix width OS memcpy offset tab ATSU Tab sizeof OS ATSU Set Tab Array layout ptr i  SWTException ERROR_GRAPHIC_DISPOSED setTabs checkLayout freeRuns tabsPtr DisposePtr tabsPtr tabsPtr ATSUSetTabArray ATSUTab ATSUTab tabPosition Long2Fix TAB_COUNT tabsPtr NewPtr ATSUTab ATSUTab tabType kATSULeftTab tabPosition Long2Fix ATSUTab ATSUTab tabType kATSULeftTab tabPosition Long2Fix ATSUTab ATSUSetTabArray
Sets the receiver s text param text the new text exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the text is null li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul public void set Text String text check Layout if text null SWT error SWT ERROR NULL ARGUMENT if text equals this text return free Runs this text text int length text length if length 0 char chars new char length text get Chars 0 length chars 0 text Ptr OS New Ptr length 2 OS memcpy text Ptr chars length 2 OS ATSU Set Text Pointer Location layout text Ptr 0 length length OS ATSU Set Transient Font Matching layout true styles new Style Item 2 styles 0 new Style Item styles 1 new Style Item styles styles length 1 start text length  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED setText checkLayout ERROR_NULL_ARGUMENT freeRuns getChars textPtr NewPtr textPtr ATSUSetTextPointerLocation textPtr ATSUSetTransientFontMatching StyleItem StyleItem StyleItem
Sets the line width of the receiver which determines how text should be wrapped and aligned The default value is code 1 code which means wrapping is disabled param width the new width exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the width is code 0 code or less than code 1 code li ul exception SWT Exception ul li ERROR GRAPHIC DISPOSED if the receiver has been disposed li ul see set Alignment int public void set Width int width check Layout if width 1 width 0 SWT error SWT ERROR INVALID ARGUMENT if width get Width return free Runs set Layout Control OS kATSU Line Width Tag OS Long2 Fix width 4  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_GRAPHIC_DISPOSED setAlignment setWidth checkLayout ERROR_INVALID_ARGUMENT getWidth freeRuns setLayoutControl kATSULineWidthTag Long2Fix
int skip Hard Break int line Break if true return line Break while line Break 0 char c text char At line Break 1 switch c case r case n break default return line Break line Break return line Break  skipHardBreak lineBreak lineBreak lineBreak charAt lineBreak lineBreak lineBreak lineBreak

public static final short w No Hit 0 Natives public static final native int kHI View Window ContentID  wNoHit kHIViewWindowContentID
Natives public static final native int kHI View Window ContentID public static final native int kPM Document FormatPDF  kHIViewWindowContentID kPMDocumentFormatPDF
public static final native int kHI View Window ContentID public static final native int kPM Document FormatPDF public static final native int kPM Graphics Context Core Graphics  kHIViewWindowContentID kPMDocumentFormatPDF kPMGraphicsContextCoreGraphics
public static final native int kPM Document FormatPDF public static final native int kPM Graphics Context Core Graphics public static final native int Active Non Floating Window  kPMDocumentFormatPDF kPMGraphicsContextCoreGraphics ActiveNonFloatingWindow
public static final native int kPM Graphics Context Core Graphics public static final native int Active Non Floating Window public static final native int AE Count Items AE Desc theAE Desc List int the Count  kPMGraphicsContextCoreGraphics ActiveNonFloatingWindow AECountItems AEDesc theAEDescList theCount
public static final native int Active Non Floating Window public static final native int AE Count Items AE Desc theAE Desc List int the Count public static final native int AE Get Nth Ptr AE Desc theAE Desc List int index int desired Type int theAE Keyword int type Code int data Ptr int maximum Size int actual Size  ActiveNonFloatingWindow AECountItems AEDesc theAEDescList theCount AEGetNthPtr AEDesc theAEDescList desiredType theAEKeyword typeCode dataPtr maximumSize actualSize
public static final native int AE Count Items AE Desc theAE Desc List int the Count public static final native int AE Get Nth Ptr AE Desc theAE Desc List int index int desired Type int theAE Keyword int type Code int data Ptr int maximum Size int actual Size public static final native int AE Process Apple Event Event Record the Event Record  AECountItems AEDesc theAEDescList theCount AEGetNthPtr AEDesc theAEDescList desiredType theAEKeyword typeCode dataPtr maximumSize actualSize AEProcessAppleEvent EventRecord theEventRecord
public static final native int AE Get Nth Ptr AE Desc theAE Desc List int index int desired Type int theAE Keyword int type Code int data Ptr int maximum Size int actual Size public static final native int AE Process Apple Event Event Record the Event Record public static final native int ATS Font Get Post Script Name int i Font int i Options int o Name  AEGetNthPtr AEDesc theAEDescList desiredType theAEKeyword typeCode dataPtr maximumSize actualSize AEProcessAppleEvent EventRecord theEventRecord ATSFontGetPostScriptName iFont iOptions oName
public static final native int AE Process Apple Event Event Record the Event Record public static final native int ATS Font Get Post Script Name int i Font int i Options int o Name public static final native int ATSU Batch Break Lines int i Text Layout int i Range Start int i Range Length int i Line Width int o Break Count  AEProcessAppleEvent EventRecord theEventRecord ATSFontGetPostScriptName iFont iOptions oName ATSUBatchBreakLines iTextLayout iRangeStart iRangeLength iLineWidth oBreakCount
public static final native int ATS Font Get Post Script Name int i Font int i Options int o Name public static final native int ATSU Batch Break Lines int i Text Layout int i Range Start int i Range Length int i Line Width int o Break Count public static final native int ATSU Create Style int o Style  ATSFontGetPostScriptName iFont iOptions oName ATSUBatchBreakLines iTextLayout iRangeStart iRangeLength iLineWidth oBreakCount ATSUCreateStyle oStyle
public static final native int ATSU Batch Break Lines int i Text Layout int i Range Start int i Range Length int i Line Width int o Break Count public static final native int ATSU Create Style int o Style public static final native int ATSU Create Text Layout int o Text Layout  ATSUBatchBreakLines iTextLayout iRangeStart iRangeLength iLineWidth oBreakCount ATSUCreateStyle oStyle ATSUCreateTextLayout oTextLayout
public static final native int ATSU Create Style int o Style public static final native int ATSU Create Text Layout int o Text Layout public static final native int ATSU Create Text Layout With Text Ptr int i Text int i Text Offset int i Text Length int i Text Total Length int i Number Of Runs int i Run Lengths int i Styles int o Text Layout  ATSUCreateStyle oStyle ATSUCreateTextLayout oTextLayout ATSUCreateTextLayoutWithTextPtr iText iTextOffset iTextLength iTextTotalLength iNumberOfRuns iRunLengths iStyles oTextLayout
public static final native int ATSU Create Text Layout int o Text Layout public static final native int ATSU Create Text Layout With Text Ptr int i Text int i Text Offset int i Text Length int i Text Total Length int i Number Of Runs int i Run Lengths int i Styles int o Text Layout public static final native int ATSU Dispose Style int i Style  ATSUCreateTextLayout oTextLayout ATSUCreateTextLayoutWithTextPtr iText iTextOffset iTextLength iTextTotalLength iNumberOfRuns iRunLengths iStyles oTextLayout ATSUDisposeStyle iStyle
public static final native int ATSU Create Text Layout With Text Ptr int i Text int i Text Offset int i Text Length int i Text Total Length int i Number Of Runs int i Run Lengths int i Styles int o Text Layout public static final native int ATSU Dispose Style int i Style public static final native int ATSU Dispose Text Layout int i Text Layout  ATSUCreateTextLayoutWithTextPtr iText iTextOffset iTextLength iTextTotalLength iNumberOfRuns iRunLengths iStyles oTextLayout ATSUDisposeStyle iStyle ATSUDisposeTextLayout iTextLayout
public static final native int ATSU Dispose Style int i Style public static final native int ATSU Dispose Text Layout int i Text Layout public static final native int ATSU Draw Text int i Text Layout int i Line Offset int i Line Length int i LocationX int i LocationY  ATSUDisposeStyle iStyle ATSUDisposeTextLayout iTextLayout ATSUDrawText iTextLayout iLineOffset iLineLength iLocationX iLocationY
public static final native int ATSU Dispose Text Layout int i Text Layout public static final native int ATSU Draw Text int i Text Layout int i Line Offset int i Line Length int i LocationX int i LocationY public static final native int ATSU Find Font Name int i FontID int i Font Name Code int i Font Name Platform int i Font Name Script int i Font Name Language int i Maximum Name Length byte o Name int o Actual Name Length int o Font Name Index  ATSUDisposeTextLayout iTextLayout ATSUDrawText iTextLayout iLineOffset iLineLength iLocationX iLocationY ATSUFindFontName iFontID iFontNameCode iFontNamePlatform iFontNameScript iFontNameLanguage iMaximumNameLength oName oActualNameLength oFontNameIndex
public static final native int ATSU Draw Text int i Text Layout int i Line Offset int i Line Length int i LocationX int i LocationY public static final native int ATSU Find Font Name int i FontID int i Font Name Code int i Font Name Platform int i Font Name Script int i Font Name Language int i Maximum Name Length byte o Name int o Actual Name Length int o Font Name Index public static final native int ATSU Get FontI Ds int o FontI Ds int i Array Size int o Font Count  ATSUDrawText iTextLayout iLineOffset iLineLength iLocationX iLocationY ATSUFindFontName iFontID iFontNameCode iFontNamePlatform iFontNameScript iFontNameLanguage iMaximumNameLength oName oActualNameLength oFontNameIndex ATSUGetFontIDs oFontIDs iArraySize oFontCount
public static final native int ATSU Find Font Name int i FontID int i Font Name Code int i Font Name Platform int i Font Name Script int i Font Name Language int i Maximum Name Length byte o Name int o Actual Name Length int o Font Name Index public static final native int ATSU Get FontI Ds int o FontI Ds int i Array Size int o Font Count public static final native int ATSU Get Glyph Bounds int i Text Layout int i Text Base PointX int i Text Base PointY int i Bounds Char Start int i Bounds Char Length short i Type Of Bounds int i Max Number Of Bounds int o Glyph Bounds int o Actual Number Of Bounds  ATSUFindFontName iFontID iFontNameCode iFontNamePlatform iFontNameScript iFontNameLanguage iMaximumNameLength oName oActualNameLength oFontNameIndex ATSUGetFontIDs oFontIDs iArraySize oFontCount ATSUGetGlyphBounds iTextLayout iTextBasePointX iTextBasePointY iBoundsCharStart iBoundsCharLength iTypeOfBounds iMaxNumberOfBounds oGlyphBounds oActualNumberOfBounds
public static final native int ATSU Get FontI Ds int o FontI Ds int i Array Size int o Font Count public static final native int ATSU Get Glyph Bounds int i Text Layout int i Text Base PointX int i Text Base PointY int i Bounds Char Start int i Bounds Char Length short i Type Of Bounds int i Max Number Of Bounds int o Glyph Bounds int o Actual Number Of Bounds public static final native int ATSU Get Glyph Bounds int i Text Layout int i Text Base PointX int i Text Base PointY int i Bounds Char Start int i Bounds Char Length short i Type Of Bounds int i Max Number Of Bounds ATS Trapezoid o Glyph Bounds int o Actual Number Of Bounds  ATSUGetFontIDs oFontIDs iArraySize oFontCount ATSUGetGlyphBounds iTextLayout iTextBasePointX iTextBasePointY iBoundsCharStart iBoundsCharLength iTypeOfBounds iMaxNumberOfBounds oGlyphBounds oActualNumberOfBounds ATSUGetGlyphBounds iTextLayout iTextBasePointX iTextBasePointY iBoundsCharStart iBoundsCharLength iTypeOfBounds iMaxNumberOfBounds ATSTrapezoid oGlyphBounds oActualNumberOfBounds
public static final native int ATSU Get Glyph Bounds int i Text Layout int i Text Base PointX int i Text Base PointY int i Bounds Char Start int i Bounds Char Length short i Type Of Bounds int i Max Number Of Bounds int o Glyph Bounds int o Actual Number Of Bounds public static final native int ATSU Get Glyph Bounds int i Text Layout int i Text Base PointX int i Text Base PointY int i Bounds Char Start int i Bounds Char Length short i Type Of Bounds int i Max Number Of Bounds ATS Trapezoid o Glyph Bounds int o Actual Number Of Bounds public static final native int ATSU Get Layout Control int i Text Layout int i Tag int i Expected Value Size int o Value int o Actual Value Size  ATSUGetGlyphBounds iTextLayout iTextBasePointX iTextBasePointY iBoundsCharStart iBoundsCharLength iTypeOfBounds iMaxNumberOfBounds oGlyphBounds oActualNumberOfBounds ATSUGetGlyphBounds iTextLayout iTextBasePointX iTextBasePointY iBoundsCharStart iBoundsCharLength iTypeOfBounds iMaxNumberOfBounds ATSTrapezoid oGlyphBounds oActualNumberOfBounds ATSUGetLayoutControl iTextLayout iTag iExpectedValueSize oValue oActualValueSize
public static final native int ATSU Get Glyph Bounds int i Text Layout int i Text Base PointX int i Text Base PointY int i Bounds Char Start int i Bounds Char Length short i Type Of Bounds int i Max Number Of Bounds ATS Trapezoid o Glyph Bounds int o Actual Number Of Bounds public static final native int ATSU Get Layout Control int i Text Layout int i Tag int i Expected Value Size int o Value int o Actual Value Size public static final native int ATSU Get Line Control int i Text Layout int i Line Start int i Tag int i Expected Value Size int o Value int o Actual Value Size  ATSUGetGlyphBounds iTextLayout iTextBasePointX iTextBasePointY iBoundsCharStart iBoundsCharLength iTypeOfBounds iMaxNumberOfBounds ATSTrapezoid oGlyphBounds oActualNumberOfBounds ATSUGetLayoutControl iTextLayout iTag iExpectedValueSize oValue oActualValueSize ATSUGetLineControl iTextLayout iLineStart iTag iExpectedValueSize oValue oActualValueSize
public static final native int ATSU Get Layout Control int i Text Layout int i Tag int i Expected Value Size int o Value int o Actual Value Size public static final native int ATSU Get Line Control int i Text Layout int i Line Start int i Tag int i Expected Value Size int o Value int o Actual Value Size public static final native int ATSU Get Soft Line Breaks int i Text Layout int i Range Start int i Range Length int i Maximum Breaks int o Breaks int o Break Count  ATSUGetLayoutControl iTextLayout iTag iExpectedValueSize oValue oActualValueSize ATSUGetLineControl iTextLayout iLineStart iTag iExpectedValueSize oValue oActualValueSize ATSUGetSoftLineBreaks iTextLayout iRangeStart iRangeLength iMaximumBreaks oBreaks oBreakCount
public static final native int ATSU Get Line Control int i Text Layout int i Line Start int i Tag int i Expected Value Size int o Value int o Actual Value Size public static final native int ATSU Get Soft Line Breaks int i Text Layout int i Range Start int i Range Length int i Maximum Breaks int o Breaks int o Break Count public static final native int ATSU Get Text Highlight int i Text Layout int i Text Base PointX int i Text Base PointY int i Highlight Start int i Highlight Length int o Highlight Region  ATSUGetLineControl iTextLayout iLineStart iTag iExpectedValueSize oValue oActualValueSize ATSUGetSoftLineBreaks iTextLayout iRangeStart iRangeLength iMaximumBreaks oBreaks oBreakCount ATSUGetTextHighlight iTextLayout iTextBasePointX iTextBasePointY iHighlightStart iHighlightLength oHighlightRegion
public static final native int ATSU Get Soft Line Breaks int i Text Layout int i Range Start int i Range Length int i Maximum Breaks int o Breaks int o Break Count public static final native int ATSU Get Text Highlight int i Text Layout int i Text Base PointX int i Text Base PointY int i Highlight Start int i Highlight Length int o Highlight Region public static final native int ATSU Get Unjustified Bounds int i Text Layout int i Line Start int i Line Length int o Text Before int o Text After int o Ascent int o Descent  ATSUGetSoftLineBreaks iTextLayout iRangeStart iRangeLength iMaximumBreaks oBreaks oBreakCount ATSUGetTextHighlight iTextLayout iTextBasePointX iTextBasePointY iHighlightStart iHighlightLength oHighlightRegion ATSUGetUnjustifiedBounds iTextLayout iLineStart iLineLength oTextBefore oTextAfter oAscent oDescent
public static final native int ATSU Get Text Highlight int i Text Layout int i Text Base PointX int i Text Base PointY int i Highlight Start int i Highlight Length int o Highlight Region public static final native int ATSU Get Unjustified Bounds int i Text Layout int i Line Start int i Line Length int o Text Before int o Text After int o Ascent int o Descent public static final native int ATSU Highlight Text int i Text Layout int i Text Base PointX int i Text Base PointY int i Highlight Start int i Highlight Length  ATSUGetTextHighlight iTextLayout iTextBasePointX iTextBasePointY iHighlightStart iHighlightLength oHighlightRegion ATSUGetUnjustifiedBounds iTextLayout iLineStart iLineLength oTextBefore oTextAfter oAscent oDescent ATSUHighlightText iTextLayout iTextBasePointX iTextBasePointY iHighlightStart iHighlightLength
public static final native int ATSU Get Unjustified Bounds int i Text Layout int i Line Start int i Line Length int o Text Before int o Text After int o Ascent int o Descent public static final native int ATSU Highlight Text int i Text Layout int i Text Base PointX int i Text Base PointY int i Highlight Start int i Highlight Length public static final native int ATSU Next Cursor Position int i Text Layout int i Old Offset int i Movement Type int o New Offset  ATSUGetUnjustifiedBounds iTextLayout iLineStart iLineLength oTextBefore oTextAfter oAscent oDescent ATSUHighlightText iTextLayout iTextBasePointX iTextBasePointY iHighlightStart iHighlightLength ATSUNextCursorPosition iTextLayout iOldOffset iMovementType oNewOffset
public static final native int ATSU Highlight Text int i Text Layout int i Text Base PointX int i Text Base PointY int i Highlight Start int i Highlight Length public static final native int ATSU Next Cursor Position int i Text Layout int i Old Offset int i Movement Type int o New Offset public static final native int ATSU Offset To Position int i Text Layout int i Offset boolean i Is Leading ATSU Caret o Main Caret ATSU Caret o Second Caret boolean o Caret Is Split  ATSUHighlightText iTextLayout iTextBasePointX iTextBasePointY iHighlightStart iHighlightLength ATSUNextCursorPosition iTextLayout iOldOffset iMovementType oNewOffset ATSUOffsetToPosition iTextLayout iOffset iIsLeading ATSUCaret oMainCaret ATSUCaret oSecondCaret oCaretIsSplit
public static final native int ATSU Next Cursor Position int i Text Layout int i Old Offset int i Movement Type int o New Offset public static final native int ATSU Offset To Position int i Text Layout int i Offset boolean i Is Leading ATSU Caret o Main Caret ATSU Caret o Second Caret boolean o Caret Is Split public static final native int ATSU Position To Offset int i Text Layout int i LocationX int i LocationY int io Primary Offset boolean o Is Leading int o Secondary Offset  ATSUNextCursorPosition iTextLayout iOldOffset iMovementType oNewOffset ATSUOffsetToPosition iTextLayout iOffset iIsLeading ATSUCaret oMainCaret ATSUCaret oSecondCaret oCaretIsSplit ATSUPositionToOffset iTextLayout iLocationX iLocationY ioPrimaryOffset oIsLeading oSecondaryOffset
public static final native int ATSU Offset To Position int i Text Layout int i Offset boolean i Is Leading ATSU Caret o Main Caret ATSU Caret o Second Caret boolean o Caret Is Split public static final native int ATSU Position To Offset int i Text Layout int i LocationX int i LocationY int io Primary Offset boolean o Is Leading int o Secondary Offset public static final native int ATSU Previous Cursor Position int i Text Layout int i Old Offset int i Movement Type int o New Offset  ATSUOffsetToPosition iTextLayout iOffset iIsLeading ATSUCaret oMainCaret ATSUCaret oSecondCaret oCaretIsSplit ATSUPositionToOffset iTextLayout iLocationX iLocationY ioPrimaryOffset oIsLeading oSecondaryOffset ATSUPreviousCursorPosition iTextLayout iOldOffset iMovementType oNewOffset
public static final native int ATSU Position To Offset int i Text Layout int i LocationX int i LocationY int io Primary Offset boolean o Is Leading int o Secondary Offset public static final native int ATSU Previous Cursor Position int i Text Layout int i Old Offset int i Movement Type int o New Offset public static final native int ATSU Set Attributes int i Style int i Attribute Count int i Tag int i Value Size int i Value  ATSUPositionToOffset iTextLayout iLocationX iLocationY ioPrimaryOffset oIsLeading oSecondaryOffset ATSUPreviousCursorPosition iTextLayout iOldOffset iMovementType oNewOffset ATSUSetAttributes iStyle iAttributeCount iTag iValueSize iValue
public static final native int ATSU Previous Cursor Position int i Text Layout int i Old Offset int i Movement Type int o New Offset public static final native int ATSU Set Attributes int i Style int i Attribute Count int i Tag int i Value Size int i Value public static final native int ATSU Set Font Features int i Style int i Feature Count short i Type short i Selector  ATSUPreviousCursorPosition iTextLayout iOldOffset iMovementType oNewOffset ATSUSetAttributes iStyle iAttributeCount iTag iValueSize iValue ATSUSetFontFeatures iStyle iFeatureCount iType iSelector
public static final native int ATSU Set Attributes int i Style int i Attribute Count int i Tag int i Value Size int i Value public static final native int ATSU Set Font Features int i Style int i Feature Count short i Type short i Selector public static final native int ATSU Set Highlighting Method int i Text Layout int i Method ATSU Unhighlight Data i Unhighlight Data  ATSUSetAttributes iStyle iAttributeCount iTag iValueSize iValue ATSUSetFontFeatures iStyle iFeatureCount iType iSelector ATSUSetHighlightingMethod iTextLayout iMethod ATSUUnhighlightData iUnhighlightData
public static final native int ATSU Set Font Features int i Style int i Feature Count short i Type short i Selector public static final native int ATSU Set Highlighting Method int i Text Layout int i Method ATSU Unhighlight Data i Unhighlight Data public static final native int ATSU Set Layout Controls int i Text Layout int i Attribute Count int i Tag int i Value Size int i Value  ATSUSetFontFeatures iStyle iFeatureCount iType iSelector ATSUSetHighlightingMethod iTextLayout iMethod ATSUUnhighlightData iUnhighlightData ATSUSetLayoutControls iTextLayout iAttributeCount iTag iValueSize iValue
public static final native int ATSU Set Highlighting Method int i Text Layout int i Method ATSU Unhighlight Data i Unhighlight Data public static final native int ATSU Set Layout Controls int i Text Layout int i Attribute Count int i Tag int i Value Size int i Value public static final native int ATSU Set Line Controls int i Text Layout int i Line Start int i Attribute Count int i Tag int i Value Size int i Value  ATSUSetHighlightingMethod iTextLayout iMethod ATSUUnhighlightData iUnhighlightData ATSUSetLayoutControls iTextLayout iAttributeCount iTag iValueSize iValue ATSUSetLineControls iTextLayout iLineStart iAttributeCount iTag iValueSize iValue
public static final native int ATSU Set Layout Controls int i Text Layout int i Attribute Count int i Tag int i Value Size int i Value public static final native int ATSU Set Line Controls int i Text Layout int i Line Start int i Attribute Count int i Tag int i Value Size int i Value public static final native int ATSU Set Run Style int i Text Layout int i Style int i Run Start int i Run Length  ATSUSetLayoutControls iTextLayout iAttributeCount iTag iValueSize iValue ATSUSetLineControls iTextLayout iLineStart iAttributeCount iTag iValueSize iValue ATSUSetRunStyle iTextLayout iStyle iRunStart iRunLength
public static final native int ATSU Set Line Controls int i Text Layout int i Line Start int i Attribute Count int i Tag int i Value Size int i Value public static final native int ATSU Set Run Style int i Text Layout int i Style int i Run Start int i Run Length public static final native int ATSU Set Soft Line Break int i Text Layout int i Line Break  ATSUSetLineControls iTextLayout iLineStart iAttributeCount iTag iValueSize iValue ATSUSetRunStyle iTextLayout iStyle iRunStart iRunLength ATSUSetSoftLineBreak iTextLayout iLineBreak
public static final native int ATSU Set Run Style int i Text Layout int i Style int i Run Start int i Run Length public static final native int ATSU Set Soft Line Break int i Text Layout int i Line Break public static final native int ATSU Set Tab Array int i Text Layout int i Tabs int i Tab Count  ATSUSetRunStyle iTextLayout iStyle iRunStart iRunLength ATSUSetSoftLineBreak iTextLayout iLineBreak ATSUSetTabArray iTextLayout iTabs iTabCount
public static final native int ATSU Set Soft Line Break int i Text Layout int i Line Break public static final native int ATSU Set Tab Array int i Text Layout int i Tabs int i Tab Count public static final native int ATSU Set Text Pointer Location int i Text Layout int i Text int i Text Offset int i Text Length int i Text Total Length  ATSUSetSoftLineBreak iTextLayout iLineBreak ATSUSetTabArray iTextLayout iTabs iTabCount ATSUSetTextPointerLocation iTextLayout iText iTextOffset iTextLength iTextTotalLength
public static final native int ATSU Set Tab Array int i Text Layout int i Tabs int i Tab Count public static final native int ATSU Set Text Pointer Location int i Text Layout int i Text int i Text Offset int i Text Length int i Text Total Length public static final native int ATSU Set Transient Font Matching int i Text Layout boolean i Transient Font Matching  ATSUSetTabArray iTextLayout iTabs iTabCount ATSUSetTextPointerLocation iTextLayout iText iTextOffset iTextLength iTextTotalLength ATSUSetTransientFontMatching iTextLayout iTransientFontMatching
public static final native int ATSU Set Text Pointer Location int i Text Layout int i Text int i Text Offset int i Text Length int i Text Total Length public static final native int ATSU Set Transient Font Matching int i Text Layout boolean i Transient Font Matching public static final native int ATSU Text Inserted int i Text Layout int i Insertion Location int i Insertion Length  ATSUSetTextPointerLocation iTextLayout iText iTextOffset iTextLength iTextTotalLength ATSUSetTransientFontMatching iTextLayout iTransientFontMatching ATSUTextInserted iTextLayout iInsertionLocation iInsertionLength
public static final native int ATSU Set Transient Font Matching int i Text Layout boolean i Transient Font Matching public static final native int ATSU Text Inserted int i Text Layout int i Insertion Location int i Insertion Length public static final native int ATSU Text Deleted int i Text Layout int i Insertion Location int i Insertion Length  ATSUSetTransientFontMatching iTextLayout iTransientFontMatching ATSUTextInserted iTextLayout iInsertionLocation iInsertionLength ATSUTextDeleted iTextLayout iInsertionLocation iInsertionLength
public static final native int ATSU Text Inserted int i Text Layout int i Insertion Location int i Insertion Length public static final native int ATSU Text Deleted int i Text Layout int i Insertion Location int i Insertion Length public static final native int Add Data Browser Items int c Handle int containerID int num Items int itemI Ds int pre Sort Property  ATSUTextInserted iTextLayout iInsertionLocation iInsertionLength ATSUTextDeleted iTextLayout iInsertionLocation iInsertionLength AddDataBrowserItems cHandle numItems itemIDs preSortProperty
public static final native int ATSU Text Deleted int i Text Layout int i Insertion Location int i Insertion Length public static final native int Add Data Browser Items int c Handle int containerID int num Items int itemI Ds int pre Sort Property public static final native int Add Data Browser List View Column int browser Data Browser List View Column Desc column Desc int position  ATSUTextDeleted iTextLayout iInsertionLocation iInsertionLength AddDataBrowserItems cHandle numItems itemIDs preSortProperty AddDataBrowserListViewColumn DataBrowserListViewColumnDesc columnDesc
public static final native int Add Data Browser Items int c Handle int containerID int num Items int itemI Ds int pre Sort Property public static final native int Add Data Browser List View Column int browser Data Browser List View Column Desc column Desc int position public static final native int Add Drag Item Flavor int the Drag int the Item Ref int the Type byte data Ptr int data Size int the Flags  AddDataBrowserItems cHandle numItems itemIDs preSortProperty AddDataBrowserListViewColumn DataBrowserListViewColumnDesc columnDesc AddDragItemFlavor theDrag theItemRef theType dataPtr dataSize theFlags
public static final native int Add Data Browser List View Column int browser Data Browser List View Column Desc column Desc int position public static final native int Add Drag Item Flavor int the Drag int the Item Ref int the Type byte data Ptr int data Size int the Flags public static final native int Append Menu Item Text WithCF String int m Handle int s Handle int attributes int commandID short out Item Index  AddDataBrowserListViewColumn DataBrowserListViewColumnDesc columnDesc AddDragItemFlavor theDrag theItemRef theType dataPtr dataSize theFlags AppendMenuItemTextWithCFString mHandle sHandle outItemIndex
public static final native int Add Drag Item Flavor int the Drag int the Item Ref int the Type byte data Ptr int data Size int the Flags public static final native int Append Menu Item Text WithCF String int m Handle int s Handle int attributes int commandID short out Item Index public static final native int Auto Size Data Browser List View Columns int c Handle  AddDragItemFlavor theDrag theItemRef theType dataPtr dataSize theFlags AppendMenuItemTextWithCFString mHandle sHandle outItemIndex AutoSizeDataBrowserListViewColumns cHandle
public static final native int Append Menu Item Text WithCF String int m Handle int s Handle int attributes int commandID short out Item Index public static final native int Auto Size Data Browser List View Columns int c Handle public static final native void Begin Update int w Handle  AppendMenuItemTextWithCFString mHandle sHandle outItemIndex AutoSizeDataBrowserListViewColumns cHandle BeginUpdate wHandle
public static final native int Auto Size Data Browser List View Columns int c Handle public static final native void Begin Update int w Handle public static final native void Bring To Front int w Handle  AutoSizeDataBrowserListViewColumns cHandle BeginUpdate wHandle BringToFront wHandle
public static final native void Begin Update int w Handle public static final native void Bring To Front int w Handle public static final native void CF Release int s Handle  BeginUpdate wHandle BringToFront wHandle CFRelease sHandle
public static final native void Bring To Front int w Handle public static final native void CF Release int s Handle public static final native void CF Array Append Value int the Array int value  BringToFront wHandle CFRelease sHandle CFArrayAppendValue theArray
public static final native void CF Release int s Handle public static final native void CF Array Append Value int the Array int value public static final native int CF Array Create Mutable int allocator int capacity int call Backs  CFRelease sHandle CFArrayAppendValue theArray CFArrayCreateMutable callBacks
public static final native void CF Array Append Value int the Array int value public static final native int CF Array Create Mutable int allocator int capacity int call Backs public static final native int CF Array Get Count int the Array  CFArrayAppendValue theArray CFArrayCreateMutable callBacks CFArrayGetCount theArray
public static final native int CF Array Create Mutable int allocator int capacity int call Backs public static final native int CF Array Get Count int the Array public static final native int CF Array Get Value At Index int the Array int idx  CFArrayCreateMutable callBacks CFArrayGetCount theArray CFArrayGetValueAtIndex theArray
public static final native int CF Array Get Count int the Array public static final native int CF Array Get Value At Index int the Array int idx public static final native int CF String Create With Bytes int alloc byte bytes int num Bytes int encoding boolean is External Representation  CFArrayGetCount theArray CFArrayGetValueAtIndex theArray CFStringCreateWithBytes numBytes isExternalRepresentation
public static final native int CF Array Get Value At Index int the Array int idx public static final native int CF String Create With Bytes int alloc byte bytes int num Bytes int encoding boolean is External Representation public static final native int CF String Create With Characters int alloc char chars int num Chars  CFArrayGetValueAtIndex theArray CFStringCreateWithBytes numBytes isExternalRepresentation CFStringCreateWithCharacters numChars
public static final native int CF String Create With Bytes int alloc byte bytes int num Bytes int encoding boolean is External Representation public static final native int CF String Create With Characters int alloc char chars int num Chars public static final native int CF String Get Bytes int the String CF Range range int encoding byte loss Byte boolean is External Representation byte buffer int max Buf Len int used Buf Len  CFStringCreateWithBytes numBytes isExternalRepresentation CFStringCreateWithCharacters numChars CFStringGetBytes theString CFRange lossByte isExternalRepresentation maxBufLen usedBufLen
public static final native int CF String Create With Characters int alloc char chars int num Chars public static final native int CF String Get Bytes int the String CF Range range int encoding byte loss Byte boolean is External Representation byte buffer int max Buf Len int used Buf Len public static final native void CF String Get Characters int the String CF Range range char buffer  CFStringCreateWithCharacters numChars CFStringGetBytes theString CFRange lossByte isExternalRepresentation maxBufLen usedBufLen CFStringGetCharacters theString CFRange
public static final native int CF String Get Bytes int the String CF Range range int encoding byte loss Byte boolean is External Representation byte buffer int max Buf Len int used Buf Len public static final native void CF String Get Characters int the String CF Range range char buffer public static final native int CF String Get Length int the String  CFStringGetBytes theString CFRange lossByte isExternalRepresentation maxBufLen usedBufLen CFStringGetCharacters theString CFRange CFStringGetLength theString
public static final native void CF String Get Characters int the String CF Range range char buffer public static final native int CF String Get Length int the String public static final native int CF String Get System Encoding  CFStringGetCharacters theString CFRange CFStringGetLength theString CFStringGetSystemEncoding
public static final native int CF String Get Length int the String public static final native int CF String Get System Encoding public static final native int CFURL Copy File System Path int anURL int path Style  CFStringGetLength theString CFStringGetSystemEncoding CFURLCopyFileSystemPath pathStyle
public static final native int CF String Get System Encoding public static final native int CFURL Copy File System Path int anURL int path Style public static final native int CFURL Copy Last Path Component int url  CFStringGetSystemEncoding CFURLCopyFileSystemPath pathStyle CFURLCopyLastPathComponent
public static final native int CFURL Copy File System Path int anURL int path Style public static final native int CFURL Copy Last Path Component int url public static final native int CFURL Create Copy Appending Path Component int allocator int url int path Component boolean is Directory  CFURLCopyFileSystemPath pathStyle CFURLCopyLastPathComponent CFURLCreateCopyAppendingPathComponent pathComponent isDirectory
public static final native int CFURL Copy Last Path Component int url public static final native int CFURL Create Copy Appending Path Component int allocator int url int path Component boolean is Directory public static final native int CFURL Create Copy Deleting Last Path Component int allocator int url  CFURLCopyLastPathComponent CFURLCreateCopyAppendingPathComponent pathComponent isDirectory CFURLCreateCopyDeletingLastPathComponent
public static final native int CFURL Create Copy Appending Path Component int allocator int url int path Component boolean is Directory public static final native int CFURL Create Copy Deleting Last Path Component int allocator int url public static final native int CFURL Create FromFS Ref int allocator byte fs Ref  CFURLCreateCopyAppendingPathComponent pathComponent isDirectory CFURLCreateCopyDeletingLastPathComponent CFURLCreateFromFSRef fsRef
public static final native int CFURL Create Copy Deleting Last Path Component int allocator int url public static final native int CFURL Create FromFS Ref int allocator byte fs Ref public static final native int CFURL Create With File System Path int allocator int file Path int path Style boolean is Directory  CFURLCreateCopyDeletingLastPathComponent CFURLCreateFromFSRef fsRef CFURLCreateWithFileSystemPath filePath pathStyle isDirectory
public static final native int CFURL Create FromFS Ref int allocator byte fs Ref public static final native int CFURL Create With File System Path int allocator int file Path int path Style boolean is Directory public static final native boolean CFURL GetFS Ref int url byte fs Ref  CFURLCreateFromFSRef fsRef CFURLCreateWithFileSystemPath filePath pathStyle isDirectory CFURLGetFSRef fsRef
public static final native int CFURL Create With File System Path int allocator int file Path int path Style boolean is Directory public static final native boolean CFURL GetFS Ref int url byte fs Ref public static final native void CG Context ScaleCTM int in Context float sx float sy  CFURLCreateWithFileSystemPath filePath pathStyle isDirectory CFURLGetFSRef fsRef CGContextScaleCTM inContext
public static final native boolean CFURL GetFS Ref int url byte fs Ref public static final native void CG Context ScaleCTM int in Context float sx float sy public static final native void CG Context TranslateCTM int in Context float tx float ty  CFURLGetFSRef fsRef CGContextScaleCTM inContext CGContextTranslateCTM inContext
public static final native void CG Context ScaleCTM int in Context float sx float sy public static final native void CG Context TranslateCTM int in Context float tx float ty public static final native int CG Bitmap Context Create int data int width int height int bits Per Component int bytes Per Row int colorspace int alpha Info  CGContextScaleCTM inContext CGContextTranslateCTM inContext CGBitmapContextCreate bitsPerComponent bytesPerRow alphaInfo
public static final native void CG Context TranslateCTM int in Context float tx float ty public static final native int CG Bitmap Context Create int data int width int height int bits Per Component int bytes Per Row int colorspace int alpha Info public static final native int CG Color Space Create DeviceRGB  CGContextTranslateCTM inContext CGBitmapContextCreate bitsPerComponent bytesPerRow alphaInfo CGColorSpaceCreateDeviceRGB
public static final native int CG Bitmap Context Create int data int width int height int bits Per Component int bytes Per Row int colorspace int alpha Info public static final native int CG Color Space Create DeviceRGB public static final native void CG Color Space Release int cs  CGBitmapContextCreate bitsPerComponent bytesPerRow alphaInfo CGColorSpaceCreateDeviceRGB CGColorSpaceRelease
public static final native int CG Color Space Create DeviceRGB public static final native void CG Color Space Release int cs public static final native void CG Context Add Arc int ctx float x float y float radius float start Angle float end Angle boolean clockwise  CGColorSpaceCreateDeviceRGB CGColorSpaceRelease CGContextAddArc startAngle endAngle
public static final native void CG Color Space Release int cs public static final native void CG Context Add Arc int ctx float x float y float radius float start Angle float end Angle boolean clockwise public static final native void CG Context Add Arc To Point int ctx float x1 float y1 float x2 float y2 float radius  CGColorSpaceRelease CGContextAddArc startAngle endAngle CGContextAddArcToPoint
public static final native void CG Context Add Arc int ctx float x float y float radius float start Angle float end Angle boolean clockwise public static final native void CG Context Add Arc To Point int ctx float x1 float y1 float x2 float y2 float radius public static final native void CG Context Add Line To Point int ctx float x float y  CGContextAddArc startAngle endAngle CGContextAddArcToPoint CGContextAddLineToPoint
public static final native void CG Context Add Arc To Point int ctx float x1 float y1 float x2 float y2 float radius public static final native void CG Context Add Line To Point int ctx float x float y public static final native void CG Context Add Lines int ctx float points int count  CGContextAddArcToPoint CGContextAddLineToPoint CGContextAddLines
public static final native void CG Context Add Line To Point int ctx float x float y public static final native void CG Context Add Lines int ctx float points int count public static final native void CG Context Begin Path int ctx  CGContextAddLineToPoint CGContextAddLines CGContextBeginPath
public static final native void CG Context Add Lines int ctx float points int count public static final native void CG Context Begin Path int ctx public static final native void CG Context Clip int ctx  CGContextAddLines CGContextBeginPath CGContextClip
public static final native void CG Context Begin Path int ctx public static final native void CG Context Clip int ctx public static final native void CG Context Clear Rect int ctx CG Rect rect  CGContextBeginPath CGContextClip CGContextClearRect CGRect
public static final native void CG Context Clip int ctx public static final native void CG Context Clear Rect int ctx CG Rect rect public static final native void CG Context Close Path int ctx  CGContextClip CGContextClearRect CGRect CGContextClosePath
public static final native void CG Context Clear Rect int ctx CG Rect rect public static final native void CG Context Close Path int ctx public static final native void CG Context Draw Image int ctx CG Rect rect int image  CGContextClearRect CGRect CGContextClosePath CGContextDrawImage CGRect
public static final native void CG Context Close Path int ctx public static final native void CG Context Draw Image int ctx CG Rect rect int image public static final native void CG Context Fill Path int ctx  CGContextClosePath CGContextDrawImage CGRect CGContextFillPath
public static final native void CG Context Draw Image int ctx CG Rect rect int image public static final native void CG Context Fill Path int ctx public static final native void CG ContextEO Fill Path int ctx  CGContextDrawImage CGRect CGContextFillPath CGContextEOFillPath
public static final native void CG Context Fill Path int ctx public static final native void CG ContextEO Fill Path int ctx public static final native void CG Context Stroke Rect int ctx CG Rect rect  CGContextFillPath CGContextEOFillPath CGContextStrokeRect CGRect
public static final native void CG ContextEO Fill Path int ctx public static final native void CG Context Stroke Rect int ctx CG Rect rect public static final native void CG Context Fill Rect int ctx CG Rect rect  CGContextEOFillPath CGContextStrokeRect CGRect CGContextFillRect CGRect
public static final native void CG Context Stroke Rect int ctx CG Rect rect public static final native void CG Context Fill Rect int ctx CG Rect rect public static final native void CG Context Flush int ctx  CGContextStrokeRect CGRect CGContextFillRect CGRect CGContextFlush
public static final native void CG Context Fill Rect int ctx CG Rect rect public static final native void CG Context Flush int ctx public static final native void CG Context Get Text Position int ctx CG Point point  CGContextFillRect CGRect CGContextFlush CGContextGetTextPosition CGPoint
public static final native void CG Context Flush int ctx public static final native void CG Context Get Text Position int ctx CG Point point public static final native void CG Context Move To Point int ctx float x float y  CGContextFlush CGContextGetTextPosition CGPoint CGContextMoveToPoint
public static final native void CG Context Get Text Position int ctx CG Point point public static final native void CG Context Move To Point int ctx float x float y public static final native void CG Context Release int ctx  CGContextGetTextPosition CGPoint CGContextMoveToPoint CGContextRelease
public static final native void CG Context Move To Point int ctx float x float y public static final native void CG Context Release int ctx public static final native void CG Context RestoreG State int ctx  CGContextMoveToPoint CGContextRelease CGContextRestoreGState
public static final native void CG Context Release int ctx public static final native void CG Context RestoreG State int ctx public static final native void CG Context SaveG State int ctx  CGContextRelease CGContextRestoreGState CGContextSaveGState
public static final native void CG Context RestoreG State int ctx public static final native void CG Context SaveG State int ctx public static final native void CG Context Select Font int ctx byte name float size int text Encoding  CGContextRestoreGState CGContextSaveGState CGContextSelectFont textEncoding
public static final native void CG Context SaveG State int ctx public static final native void CG Context Select Font int ctx byte name float size int text Encoding public static final native void CG Context Set Fill Color Space int ctx int colorspace  CGContextSaveGState CGContextSelectFont textEncoding CGContextSetFillColorSpace
public static final native void CG Context Select Font int ctx byte name float size int text Encoding public static final native void CG Context Set Fill Color Space int ctx int colorspace public static final native void CG Context Set Fill Color int ctx float value  CGContextSelectFont textEncoding CGContextSetFillColorSpace CGContextSetFillColor
public static final native void CG Context Set Fill Color Space int ctx int colorspace public static final native void CG Context Set Fill Color int ctx float value public static final native void CG Context Set Font int ctx int font  CGContextSetFillColorSpace CGContextSetFillColor CGContextSetFont
public static final native void CG Context Set Fill Color int ctx float value public static final native void CG Context Set Font int ctx int font public static final native void CG Context Set Font Size int ctx float size  CGContextSetFillColor CGContextSetFont CGContextSetFontSize
public static final native void CG Context Set Font int ctx int font public static final native void CG Context Set Font Size int ctx float size public static final native void CG Context Set Line Cap int context int cap  CGContextSetFont CGContextSetFontSize CGContextSetLineCap
public static final native void CG Context Set Font Size int ctx float size public static final native void CG Context Set Line Cap int context int cap public static final native void CG Context Set Line Dash int ctx float phase float lengths int count  CGContextSetFontSize CGContextSetLineCap CGContextSetLineDash
public static final native void CG Context Set Line Cap int context int cap public static final native void CG Context Set Line Dash int ctx float phase float lengths int count public static final native void CG Context Set Line Width int ctx float width  CGContextSetLineCap CGContextSetLineDash CGContextSetLineWidth
public static final native void CG Context Set Line Dash int ctx float phase float lengths int count public static final native void CG Context Set Line Width int ctx float width public static final native void CG Context Set Should Antialias int ctx boolean should Antialias  CGContextSetLineDash CGContextSetLineWidth CGContextSetShouldAntialias shouldAntialias
public static final native void CG Context Set Line Width int ctx float width public static final native void CG Context Set Should Antialias int ctx boolean should Antialias public static final native void CG Context Set Should Smooth Fonts int ctx boolean should Smooth  CGContextSetLineWidth CGContextSetShouldAntialias shouldAntialias CGContextSetShouldSmoothFonts shouldSmooth
public static final native void CG Context Set Should Antialias int ctx boolean should Antialias public static final native void CG Context Set Should Smooth Fonts int ctx boolean should Smooth public static final native void CG Context Set Stroke Color Space int ctx int colorspace  CGContextSetShouldAntialias shouldAntialias CGContextSetShouldSmoothFonts shouldSmooth CGContextSetStrokeColorSpace
public static final native void CG Context Set Should Smooth Fonts int ctx boolean should Smooth public static final native void CG Context Set Stroke Color Space int ctx int colorspace public static final native void CG Context Set Stroke Color int ctx float value  CGContextSetShouldSmoothFonts shouldSmooth CGContextSetStrokeColorSpace CGContextSetStrokeColor
public static final native void CG Context Set Stroke Color Space int ctx int colorspace public static final native void CG Context Set Stroke Color int ctx float value public static final native void CG Context SetRGB Fill Color int ctx float r float g float b float alpha  CGContextSetStrokeColorSpace CGContextSetStrokeColor CGContextSetRGBFillColor
public static final native void CG Context Set Stroke Color int ctx float value public static final native void CG Context SetRGB Fill Color int ctx float r float g float b float alpha public static final native void CG Context SetRGB Stroke Color int ctx float r float g float b float alpha  CGContextSetStrokeColor CGContextSetRGBFillColor CGContextSetRGBStrokeColor
public static final native void CG Context SetRGB Fill Color int ctx float r float g float b float alpha public static final native void CG Context SetRGB Stroke Color int ctx float r float g float b float alpha public static final native void CG Context Set Text Drawing Mode int ctx int mode  CGContextSetRGBFillColor CGContextSetRGBStrokeColor CGContextSetTextDrawingMode
public static final native void CG Context SetRGB Stroke Color int ctx float r float g float b float alpha public static final native void CG Context Set Text Drawing Mode int ctx int mode public static final native void CG Context Set Text Position int ctx float x float y  CGContextSetRGBStrokeColor CGContextSetTextDrawingMode CGContextSetTextPosition
public static final native void CG Context Set Text Drawing Mode int ctx int mode public static final native void CG Context Set Text Position int ctx float x float y public static final native void CG Context Show Text int ctx byte cstring int length  CGContextSetTextDrawingMode CGContextSetTextPosition CGContextShowText
public static final native void CG Context Set Text Position int ctx float x float y public static final native void CG Context Show Text int ctx byte cstring int length public static final native void CG Context Show Text At Point int ctx float x float y byte cstring int length  CGContextSetTextPosition CGContextShowText CGContextShowTextAtPoint
public static final native void CG Context Show Text int ctx byte cstring int length public static final native void CG Context Show Text At Point int ctx float x float y byte cstring int length public static final native void CG Context Set Text Matrix int ctx float transform  CGContextShowText CGContextShowTextAtPoint CGContextSetTextMatrix
public static final native void CG Context Show Text At Point int ctx float x float y byte cstring int length public static final native void CG Context Set Text Matrix int ctx float transform public static final native void CG Context Stroke Path int ctx  CGContextShowTextAtPoint CGContextSetTextMatrix CGContextStrokePath
public static final native void CG Context Set Text Matrix int ctx float transform public static final native void CG Context Stroke Path int ctx public static final native void CG Context Synchronize int ctx  CGContextSetTextMatrix CGContextStrokePath CGContextSynchronize
public static final native void CG Context Stroke Path int ctx public static final native void CG Context Synchronize int ctx public static final native int CG Data Provider Create With Data int info int data int size int release Data  CGContextStrokePath CGContextSynchronize CGDataProviderCreateWithData releaseData
public static final native void CG Context Synchronize int ctx public static final native int CG Data Provider Create With Data int info int data int size int release Data public static final native void CG Data Provider Release int provider  CGContextSynchronize CGDataProviderCreateWithData releaseData CGDataProviderRelease
public static final native int CG Data Provider Create With Data int info int data int size int release Data public static final native void CG Data Provider Release int provider public static final native int CG Display Base Address int display  CGDataProviderCreateWithData releaseData CGDataProviderRelease CGDisplayBaseAddress
public static final native void CG Data Provider Release int provider public static final native int CG Display Base Address int display public static final native int CG Display Bits Per Pixel int display  CGDataProviderRelease CGDisplayBaseAddress CGDisplayBitsPerPixel
public static final native int CG Display Base Address int display public static final native int CG Display Bits Per Pixel int display public static final native int CG Display Bits Per Sample int display  CGDisplayBaseAddress CGDisplayBitsPerPixel CGDisplayBitsPerSample
public static final native int CG Display Bits Per Pixel int display public static final native int CG Display Bits Per Sample int display public static final native int CG Display Bytes Per Row int display  CGDisplayBitsPerPixel CGDisplayBitsPerSample CGDisplayBytesPerRow
public static final native int CG Display Bits Per Sample int display public static final native int CG Display Bytes Per Row int display public static final native int CG Display Pixels High int display  CGDisplayBitsPerSample CGDisplayBytesPerRow CGDisplayPixelsHigh
public static final native int CG Display Bytes Per Row int display public static final native int CG Display Pixels High int display public static final native int CG Display Pixels Wide int display  CGDisplayBytesPerRow CGDisplayPixelsHigh CGDisplayPixelsWide
public static final native int CG Display Pixels High int display public static final native int CG Display Pixels Wide int display public static final native int CG Font Create With Platform Font int platform Font Reference  CGDisplayPixelsHigh CGDisplayPixelsWide CGFontCreateWithPlatformFont platformFontReference
public static final native int CG Display Pixels Wide int display public static final native int CG Font Create With Platform Font int platform Font Reference public static final native void CG Font Release int font  CGDisplayPixelsWide CGFontCreateWithPlatformFont platformFontReference CGFontRelease
public static final native int CG Font Create With Platform Font int platform Font Reference public static final native void CG Font Release int font public static final native int CG Get Displays With Rect CG Rect rect int max Displays int dspys int dspy Cnt  CGFontCreateWithPlatformFont platformFontReference CGFontRelease CGGetDisplaysWithRect CGRect maxDisplays dspyCnt
public static final native void CG Font Release int font public static final native int CG Get Displays With Rect CG Rect rect int max Displays int dspys int dspy Cnt public static final native int CG Image Create int width int height int bits Per Component int bits Per Pixel int bytes Per Row int colorspace int alpha Info int provider float decode boolean should Interpolate int intent  CGFontRelease CGGetDisplaysWithRect CGRect maxDisplays dspyCnt CGImageCreate bitsPerComponent bitsPerPixel bytesPerRow alphaInfo shouldInterpolate
public static final native int CG Get Displays With Rect CG Rect rect int max Displays int dspys int dspy Cnt public static final native int CG Image Create int width int height int bits Per Component int bits Per Pixel int bytes Per Row int colorspace int alpha Info int provider float decode boolean should Interpolate int intent public static final native int CG Image Get Alpha Info int image  CGGetDisplaysWithRect CGRect maxDisplays dspyCnt CGImageCreate bitsPerComponent bitsPerPixel bytesPerRow alphaInfo shouldInterpolate CGImageGetAlphaInfo
public static final native int CG Image Create int width int height int bits Per Component int bits Per Pixel int bytes Per Row int colorspace int alpha Info int provider float decode boolean should Interpolate int intent public static final native int CG Image Get Alpha Info int image public static final native int CG Image Get Bits Per Component int image  CGImageCreate bitsPerComponent bitsPerPixel bytesPerRow alphaInfo shouldInterpolate CGImageGetAlphaInfo CGImageGetBitsPerComponent
public static final native int CG Image Get Alpha Info int image public static final native int CG Image Get Bits Per Component int image public static final native int CG Image Get Bits Per Pixel int image  CGImageGetAlphaInfo CGImageGetBitsPerComponent CGImageGetBitsPerPixel
public static final native int CG Image Get Bits Per Component int image public static final native int CG Image Get Bits Per Pixel int image public static final native int CG Image Get Bytes Per Row int image  CGImageGetBitsPerComponent CGImageGetBitsPerPixel CGImageGetBytesPerRow
public static final native int CG Image Get Bits Per Pixel int image public static final native int CG Image Get Bytes Per Row int image public static final native int CG Image Get Color Space int image  CGImageGetBitsPerPixel CGImageGetBytesPerRow CGImageGetColorSpace
public static final native int CG Image Get Bytes Per Row int image public static final native int CG Image Get Color Space int image public static final native int CG Image Get Height int image  CGImageGetBytesPerRow CGImageGetColorSpace CGImageGetHeight
public static final native int CG Image Get Color Space int image public static final native int CG Image Get Height int image public static final native int CG Image Get Width int image  CGImageGetColorSpace CGImageGetHeight CGImageGetWidth
public static final native int CG Image Get Height int image public static final native int CG Image Get Width int image public static final native void CG Image Release int image  CGImageGetHeight CGImageGetWidth CGImageRelease
public static final native int CG Image Get Width int image public static final native void CG Image Release int image public static final native int CG Post Mouse Event CG Point mouse Cursor Position boolean update Mouse Cursor Position int button Count boolean mouse Button Down boolean mouse Button Down2 boolean mouse Button Down3  CGImageGetWidth CGImageRelease CGPostMouseEvent CGPoint mouseCursorPosition updateMouseCursorPosition buttonCount mouseButtonDown mouseButtonDown2 mouseButtonDown3
public static final native void CG Image Release int image public static final native int CG Post Mouse Event CG Point mouse Cursor Position boolean update Mouse Cursor Position int button Count boolean mouse Button Down boolean mouse Button Down2 boolean mouse Button Down3 public static final native int CG Post Keyboard Event int key Char int virtual Key boolean key Down  CGImageRelease CGPostMouseEvent CGPoint mouseCursorPosition updateMouseCursorPosition buttonCount mouseButtonDown mouseButtonDown2 mouseButtonDown3 CGPostKeyboardEvent keyChar virtualKey keyDown
public static final native int CG Post Mouse Event CG Point mouse Cursor Position boolean update Mouse Cursor Position int button Count boolean mouse Button Down boolean mouse Button Down2 boolean mouse Button Down3 public static final native int CG Post Keyboard Event int key Char int virtual Key boolean key Down public static final native int CG Warp Mouse Cursor Position CG Point new Cursor Position  CGPostMouseEvent CGPoint mouseCursorPosition updateMouseCursorPosition buttonCount mouseButtonDown mouseButtonDown2 mouseButtonDown3 CGPostKeyboardEvent keyChar virtualKey keyDown CGWarpMouseCursorPosition CGPoint newCursorPosition
public static final native int CG Post Keyboard Event int key Char int virtual Key boolean key Down public static final native int CG Warp Mouse Cursor Position CG Point new Cursor Position public static final native int Call Next Event Handler int next Handler int event Ref Handle  CGPostKeyboardEvent keyChar virtualKey keyDown CGWarpMouseCursorPosition CGPoint newCursorPosition CallNextEventHandler nextHandler eventRefHandle
public static final native int CG Warp Mouse Cursor Position CG Point new Cursor Position public static final native int Call Next Event Handler int next Handler int event Ref Handle public static final native short Char Width short c  CGWarpMouseCursorPosition CGPoint newCursorPosition CallNextEventHandler nextHandler eventRefHandle CharWidth
public static final native int Call Next Event Handler int next Handler int event Ref Handle public static final native short Char Width short c public static final native int Clear Current Scrap  CallNextEventHandler nextHandler eventRefHandle CharWidth ClearCurrentScrap
public static final native short Char Width short c public static final native int Clear Current Scrap public static final native int Clear Keyboard Focus int in Window  CharWidth ClearCurrentScrap ClearKeyboardFocus inWindow
public static final native int Clear Current Scrap public static final native int Clear Keyboard Focus int in Window public static final native void Clear Menu Bar  ClearCurrentScrap ClearKeyboardFocus inWindow ClearMenuBar
public static final native int Clear Keyboard Focus int in Window public static final native void Clear Menu Bar public static final native int ClipCG Context To Region int in Context Rect port Rect int rgn Handle  ClearKeyboardFocus inWindow ClearMenuBar ClipCGContextToRegion inContext portRect rgnHandle
public static final native void Clear Menu Bar public static final native int ClipCG Context To Region int in Context Rect port Rect int rgn Handle public static final native int Close Data Browser Container int c Handle int container  ClearMenuBar ClipCGContextToRegion inContext portRect rgnHandle CloseDataBrowserContainer cHandle
public static final native int ClipCG Context To Region int in Context Rect port Rect int rgn Handle public static final native int Close Data Browser Container int c Handle int container public static final native void Close Poly  ClipCGContextToRegion inContext portRect rgnHandle CloseDataBrowserContainer cHandle ClosePoly
public static final native int Close Data Browser Container int c Handle int container public static final native void Close Poly public static final native void Close Rgn int dst Rgn  CloseDataBrowserContainer cHandle ClosePoly CloseRgn dstRgn
public static final native void Close Poly public static final native void Close Rgn int dst Rgn public static final native int Collapse Window int w Handle boolean collapse  ClosePoly CloseRgn dstRgn CollapseWindow wHandle
public static final native void Close Rgn int dst Rgn public static final native int Collapse Window int w Handle boolean collapse public static final native boolean Convert Event Ref To Event Record int in Event Event Record out Event  CloseRgn dstRgn CollapseWindow wHandle ConvertEventRefToEventRecord inEvent EventRecord outEvent
public static final native int Collapse Window int w Handle boolean collapse public static final native boolean Convert Event Ref To Event Record int in Event Event Record out Event public static final native int Convert FromP String To Unicode int i Text To Unicode Info byte i Pascal Str int i Output Buf Len int o Unicode Len char o Unicode Str  CollapseWindow wHandle ConvertEventRefToEventRecord inEvent EventRecord outEvent ConvertFromPStringToUnicode iTextToUnicodeInfo iPascalStr iOutputBufLen oUnicodeLen oUnicodeStr
public static final native boolean Convert Event Ref To Event Record int in Event Event Record out Event public static final native int Convert FromP String To Unicode int i Text To Unicode Info byte i Pascal Str int i Output Buf Len int o Unicode Len char o Unicode Str public static final native int Convert From Unicode ToP String int i Unicode To Text Info int i Unicode Len char i Unicode Str byte o Pascal Str  ConvertEventRefToEventRecord inEvent EventRecord outEvent ConvertFromPStringToUnicode iTextToUnicodeInfo iPascalStr iOutputBufLen oUnicodeLen oUnicodeStr ConvertFromUnicodeToPString iUnicodeToTextInfo iUnicodeLen iUnicodeStr oPascalStr
public static final native int Convert FromP String To Unicode int i Text To Unicode Info byte i Pascal Str int i Output Buf Len int o Unicode Len char o Unicode Str public static final native int Convert From Unicode ToP String int i Unicode To Text Info int i Unicode Len char i Unicode Str byte o Pascal Str public static final native void Copy Bits int src Pix Map Handle int dst Pix Map Handle Rect src Rect Rect dst Rect short mode int mask Rgn  ConvertFromPStringToUnicode iTextToUnicodeInfo iPascalStr iOutputBufLen oUnicodeLen oUnicodeStr ConvertFromUnicodeToPString iUnicodeToTextInfo iUnicodeLen iUnicodeStr oPascalStr CopyBits srcPixMapHandle dstPixMapHandle srcRect dstRect maskRgn
public static final native int Convert From Unicode ToP String int i Unicode To Text Info int i Unicode Len char i Unicode Str byte o Pascal Str public static final native void Copy Bits int src Pix Map Handle int dst Pix Map Handle Rect src Rect Rect dst Rect short mode int mask Rgn public static final native int Copy Control Title AsCF String int c Handle int s Handle  ConvertFromUnicodeToPString iUnicodeToTextInfo iUnicodeLen iUnicodeStr oPascalStr CopyBits srcPixMapHandle dstPixMapHandle srcRect dstRect maskRgn CopyControlTitleAsCFString cHandle sHandle
public static final native void Copy Bits int src Pix Map Handle int dst Pix Map Handle Rect src Rect Rect dst Rect short mode int mask Rgn public static final native int Copy Control Title AsCF String int c Handle int s Handle public static final native void Copy Deep Mask int src Pix Map Handle int mask Pix Map Handle int dst Pix Map Handle Rect src Rect Rect mask Rect Rect dst Rect short mode int mask Rgn  CopyBits srcPixMapHandle dstPixMapHandle srcRect dstRect maskRgn CopyControlTitleAsCFString cHandle sHandle CopyDeepMask srcPixMapHandle maskPixMapHandle dstPixMapHandle srcRect maskRect dstRect maskRgn
public static final native int Copy Control Title AsCF String int c Handle int s Handle public static final native void Copy Deep Mask int src Pix Map Handle int mask Pix Map Handle int dst Pix Map Handle Rect src Rect Rect mask Rect Rect dst Rect short mode int mask Rgn public static final native int Copy Menu Item Text AsCF String int m Handle short index int s Handle  CopyControlTitleAsCFString cHandle sHandle CopyDeepMask srcPixMapHandle maskPixMapHandle dstPixMapHandle srcRect maskRect dstRect maskRgn CopyMenuItemTextAsCFString mHandle sHandle
public static final native void Copy Deep Mask int src Pix Map Handle int mask Pix Map Handle int dst Pix Map Handle Rect src Rect Rect mask Rect Rect dst Rect short mode int mask Rgn public static final native int Copy Menu Item Text AsCF String int m Handle short index int s Handle public static final native void Copy Rgn int src Rgn Handle int dst Rgn Handle  CopyDeepMask srcPixMapHandle maskPixMapHandle dstPixMapHandle srcRect maskRect dstRect maskRgn CopyMenuItemTextAsCFString mHandle sHandle CopyRgn srcRgnHandle dstRgnHandle
public static final native int Copy Menu Item Text AsCF String int m Handle short index int s Handle public static final native void Copy Rgn int src Rgn Handle int dst Rgn Handle public static final native int Count Drag Items int the Drag short num Items  CopyMenuItemTextAsCFString mHandle sHandle CopyRgn srcRgnHandle dstRgnHandle CountDragItems theDrag numItems
public static final native void Copy Rgn int src Rgn Handle int dst Rgn Handle public static final native int Count Drag Items int the Drag short num Items public static final native int Count Drag Item Flavors int the Drag int the Item Ref short num Flavors  CopyRgn srcRgnHandle dstRgnHandle CountDragItems theDrag numItems CountDragItemFlavors theDrag theItemRef numFlavors
public static final native int Count Drag Items int the Drag short num Items public static final native int Count Drag Item Flavors int the Drag int the Item Ref short num Flavors public static final native short Count Menu Items int m Handle  CountDragItems theDrag numItems CountDragItemFlavors theDrag theItemRef numFlavors CountMenuItems mHandle
public static final native int Count Drag Item Flavors int the Drag int the Item Ref short num Flavors public static final native short Count Menu Items int m Handle public static final native int Count Sub Controls int c Handle short count  CountDragItemFlavors theDrag theItemRef numFlavors CountMenuItems mHandle CountSubControls cHandle
public static final native short Count Menu Items int m Handle public static final native int Count Sub Controls int c Handle short count public static final native int Create Bevel Button Control int window Rect bounds Rect int title short thickness short behavior int info short menuID short menu Behavior short menu Placement int out Control  CountMenuItems mHandle CountSubControls cHandle CreateBevelButtonControl boundsRect menuBehavior menuPlacement outControl
public static final native int Count Sub Controls int c Handle short count public static final native int Create Bevel Button Control int window Rect bounds Rect int title short thickness short behavior int info short menuID short menu Behavior short menu Placement int out Control public static final native int Create Check Box Control int window Rect bounds Rect int title int initial Value boolean auto Toggle int out Control  CountSubControls cHandle CreateBevelButtonControl boundsRect menuBehavior menuPlacement outControl CreateCheckBoxControl boundsRect initialValue autoToggle outControl
public static final native int Create Bevel Button Control int window Rect bounds Rect int title short thickness short behavior int info short menuID short menu Behavior short menu Placement int out Control public static final native int Create Check Box Control int window Rect bounds Rect int title int initial Value boolean auto Toggle int out Control public static final native int CreateCG Context For Port int in Port int out Context  CreateBevelButtonControl boundsRect menuBehavior menuPlacement outControl CreateCheckBoxControl boundsRect initialValue autoToggle outControl CreateCGContextForPort inPort outContext
public static final native int Create Check Box Control int window Rect bounds Rect int title int initial Value boolean auto Toggle int out Control public static final native int CreateCG Context For Port int in Port int out Context public static final native int Create Data Browser Control int window Rect bounds Rect int style int out Control  CreateCheckBoxControl boundsRect initialValue autoToggle outControl CreateCGContextForPort inPort outContext CreateDataBrowserControl boundsRect outControl
public static final native int CreateCG Context For Port int in Port int out Context public static final native int Create Data Browser Control int window Rect bounds Rect int style int out Control public static final native int Create Event int allocator int in ClassID int kind double when int flags int out Event Ref  CreateCGContextForPort inPort outContext CreateDataBrowserControl boundsRect outControl CreateEvent inClassID outEventRef
public static final native int Create Data Browser Control int window Rect bounds Rect int style int out Control public static final native int Create Event int allocator int in ClassID int kind double when int flags int out Event Ref public static final native int Create Group Box Control int window Rect bounds Rect int title boolean primary int out Control  CreateDataBrowserControl boundsRect outControl CreateEvent inClassID outEventRef CreateGroupBoxControl boundsRect outControl
public static final native int Create Event int allocator int in ClassID int kind double when int flags int out Event Ref public static final native int Create Group Box Control int window Rect bounds Rect int title boolean primary int out Control public static final native int Create Icon Control int window Rect bounds Rect Control Button Content Info icon boolean dont Track int out Control  CreateEvent inClassID outEventRef CreateGroupBoxControl boundsRect outControl CreateIconControl boundsRect ControlButtonContentInfo dontTrack outControl
public static final native int Create Group Box Control int window Rect bounds Rect int title boolean primary int out Control public static final native int Create Icon Control int window Rect bounds Rect Control Button Content Info icon boolean dont Track int out Control public static final native int Create New Menu short menuID int menu Attributes int out Menu Ref  CreateGroupBoxControl boundsRect outControl CreateIconControl boundsRect ControlButtonContentInfo dontTrack outControl CreateNewMenu menuAttributes outMenuRef
public static final native int Create Icon Control int window Rect bounds Rect Control Button Content Info icon boolean dont Track int out Control public static final native int Create New Menu short menuID int menu Attributes int out Menu Ref public static final native int Create New Window int window Class int attributes Rect bounds int w Handle  CreateIconControl boundsRect ControlButtonContentInfo dontTrack outControl CreateNewMenu menuAttributes outMenuRef CreateNewWindow windowClass wHandle
public static final native int Create New Menu short menuID int menu Attributes int out Menu Ref public static final native int Create New Window int window Class int attributes Rect bounds int w Handle public static final native int Create Popup Arrow Control int window Rect bounds Rect short orientation short size int out Control  CreateNewMenu menuAttributes outMenuRef CreateNewWindow windowClass wHandle CreatePopupArrowControl boundsRect outControl
public static final native int Create New Window int window Class int attributes Rect bounds int w Handle public static final native int Create Popup Arrow Control int window Rect bounds Rect short orientation short size int out Control public static final native int Create Popup Button Control int window Rect bounds Rect int title short menuID boolean variable Width short title Width short title Justification int title Style int out Control  CreateNewWindow windowClass wHandle CreatePopupArrowControl boundsRect outControl CreatePopupButtonControl boundsRect variableWidth titleWidth titleJustification titleStyle outControl
public static final native int Create Popup Arrow Control int window Rect bounds Rect short orientation short size int out Control public static final native int Create Popup Button Control int window Rect bounds Rect int title short menuID boolean variable Width short title Width short title Justification int title Style int out Control public static final native int Create Progress Bar Control int window Rect bounds Rect int value int minimim int maximum boolean indeterminate int out Control  CreatePopupArrowControl boundsRect outControl CreatePopupButtonControl boundsRect variableWidth titleWidth titleJustification titleStyle outControl CreateProgressBarControl boundsRect outControl
public static final native int Create Popup Button Control int window Rect bounds Rect int title short menuID boolean variable Width short title Width short title Justification int title Style int out Control public static final native int Create Progress Bar Control int window Rect bounds Rect int value int minimim int maximum boolean indeterminate int out Control public static final native int Create Push Button Control int window Rect bounds Rect int title int out Control  CreatePopupButtonControl boundsRect variableWidth titleWidth titleJustification titleStyle outControl CreateProgressBarControl boundsRect outControl CreatePushButtonControl boundsRect outControl
public static final native int Create Progress Bar Control int window Rect bounds Rect int value int minimim int maximum boolean indeterminate int out Control public static final native int Create Push Button Control int window Rect bounds Rect int title int out Control public static final native int Create Push Button With Icon Control int window Rect bounds Rect int title Control Button Content Info icon short icon Alignment int out Control  CreateProgressBarControl boundsRect outControl CreatePushButtonControl boundsRect outControl CreatePushButtonWithIconControl boundsRect ControlButtonContentInfo iconAlignment outControl
public static final native int Create Push Button Control int window Rect bounds Rect int title int out Control public static final native int Create Push Button With Icon Control int window Rect bounds Rect int title Control Button Content Info icon short icon Alignment int out Control public static final native int Create Radio Button Control int window Rect bounds Rect int title int initial Value boolean auto Toggle int out Control  CreatePushButtonControl boundsRect outControl CreatePushButtonWithIconControl boundsRect ControlButtonContentInfo iconAlignment outControl CreateRadioButtonControl boundsRect initialValue autoToggle outControl
public static final native int Create Push Button With Icon Control int window Rect bounds Rect int title Control Button Content Info icon short icon Alignment int out Control public static final native int Create Radio Button Control int window Rect bounds Rect int title int initial Value boolean auto Toggle int out Control public static final native int Create Root Control int window Handle int c Handle  CreatePushButtonWithIconControl boundsRect ControlButtonContentInfo iconAlignment outControl CreateRadioButtonControl boundsRect initialValue autoToggle outControl CreateRootControl windowHandle cHandle
public static final native int Create Radio Button Control int window Rect bounds Rect int title int initial Value boolean auto Toggle int out Control public static final native int Create Root Control int window Handle int c Handle public static final native int Create Slider Control int window Rect bounds Rect int value int minimum int maximum int orientation short num Tick Marks boolean live Tracking int live Tracking Proc int out Control  CreateRadioButtonControl boundsRect initialValue autoToggle outControl CreateRootControl windowHandle cHandle CreateSliderControl boundsRect numTickMarks liveTracking liveTrackingProc outControl
public static final native int Create Root Control int window Handle int c Handle public static final native int Create Slider Control int window Rect bounds Rect int value int minimum int maximum int orientation short num Tick Marks boolean live Tracking int live Tracking Proc int out Control public static final native int Create Scroll Bar Control int window Rect bounds Rect int value int minimum int maximum int view Size boolean live Tracking int live Tracking Proc int out Control  CreateRootControl windowHandle cHandle CreateSliderControl boundsRect numTickMarks liveTracking liveTrackingProc outControl CreateScrollBarControl boundsRect viewSize liveTracking liveTrackingProc outControl
public static final native int Create Slider Control int window Rect bounds Rect int value int minimum int maximum int orientation short num Tick Marks boolean live Tracking int live Tracking Proc int out Control public static final native int Create Scroll Bar Control int window Rect bounds Rect int value int minimum int maximum int view Size boolean live Tracking int live Tracking Proc int out Control public static final native int Create Separator Control int window Rect bounds Rect int out Control  CreateSliderControl boundsRect numTickMarks liveTracking liveTrackingProc outControl CreateScrollBarControl boundsRect viewSize liveTracking liveTrackingProc outControl CreateSeparatorControl boundsRect outControl
public static final native int Create Scroll Bar Control int window Rect bounds Rect int value int minimum int maximum int view Size boolean live Tracking int live Tracking Proc int out Control public static final native int Create Separator Control int window Rect bounds Rect int out Control public static final native int Create Standard Alert short alert Type int errorS Handle int explanationS Handle Alert StdCF String Alert Param Rec alert Param Handle int dialog Handle  CreateScrollBarControl boundsRect viewSize liveTracking liveTrackingProc outControl CreateSeparatorControl boundsRect outControl CreateStandardAlert alertType errorSHandle explanationSHandle AlertStdCFStringAlertParamRec alertParamHandle dialogHandle
public static final native int Create Separator Control int window Rect bounds Rect int out Control public static final native int Create Standard Alert short alert Type int errorS Handle int explanationS Handle Alert StdCF String Alert Param Rec alert Param Handle int dialog Handle public static final native int Create Static Text Control int window Rect bounds Rect int text Control Font Style Rec style int out Control  CreateSeparatorControl boundsRect outControl CreateStandardAlert alertType errorSHandle explanationSHandle AlertStdCFStringAlertParamRec alertParamHandle dialogHandle CreateStaticTextControl boundsRect ControlFontStyleRec outControl
public static final native int Create Standard Alert short alert Type int errorS Handle int explanationS Handle Alert StdCF String Alert Param Rec alert Param Handle int dialog Handle public static final native int Create Static Text Control int window Rect bounds Rect int text Control Font Style Rec style int out Control public static final native int Create Tabs Control int window Rect bounds Rect short size short direction short num Tabs int tab Array int out Control  CreateStandardAlert alertType errorSHandle explanationSHandle AlertStdCFStringAlertParamRec alertParamHandle dialogHandle CreateStaticTextControl boundsRect ControlFontStyleRec outControl CreateTabsControl boundsRect numTabs tabArray outControl
public static final native int Create Static Text Control int window Rect bounds Rect int text Control Font Style Rec style int out Control public static final native int Create Tabs Control int window Rect bounds Rect short size short direction short num Tabs int tab Array int out Control public static final native int Create Text To Unicode Info By Encoding int i Encoding int o Text To Unicode Info  CreateStaticTextControl boundsRect ControlFontStyleRec outControl CreateTabsControl boundsRect numTabs tabArray outControl CreateTextToUnicodeInfoByEncoding iEncoding oTextToUnicodeInfo
public static final native int Create Tabs Control int window Rect bounds Rect short size short direction short num Tabs int tab Array int out Control public static final native int Create Text To Unicode Info By Encoding int i Encoding int o Text To Unicode Info public static final native int Create Unicode To Text Info By Encoding int i Encoding int o Unicode To Text Info  CreateTabsControl boundsRect numTabs tabArray outControl CreateTextToUnicodeInfoByEncoding iEncoding oTextToUnicodeInfo CreateUnicodeToTextInfoByEncoding iEncoding oUnicodeToTextInfo
public static final native int Create Text To Unicode Info By Encoding int i Encoding int o Text To Unicode Info public static final native int Create Unicode To Text Info By Encoding int i Encoding int o Unicode To Text Info public static final native int Create Edit Unicode Text Control int window Rect bounds Rect int text boolean is Password Control Font Style Rec style int out Control  CreateTextToUnicodeInfoByEncoding iEncoding oTextToUnicodeInfo CreateUnicodeToTextInfoByEncoding iEncoding oUnicodeToTextInfo CreateEditUnicodeTextControl boundsRect isPassword ControlFontStyleRec outControl
public static final native int Create Unicode To Text Info By Encoding int i Encoding int o Unicode To Text Info public static final native int Create Edit Unicode Text Control int window Rect bounds Rect int text boolean is Password Control Font Style Rec style int out Control public static final native int Create User Pane Control int window Rect bounds Rect int features int out Control  CreateUnicodeToTextInfoByEncoding iEncoding oUnicodeToTextInfo CreateEditUnicodeTextControl boundsRect isPassword ControlFontStyleRec outControl CreateUserPaneControl boundsRect outControl
public static final native int Create Edit Unicode Text Control int window Rect bounds Rect int text boolean is Password Control Font Style Rec style int out Control public static final native int Create User Pane Control int window Rect bounds Rect int features int out Control public static final native int Create Window Group int in Attributes int out Group  CreateEditUnicodeTextControl boundsRect isPassword ControlFontStyleRec outControl CreateUserPaneControl boundsRect outControl CreateWindowGroup inAttributes outGroup
public static final native int Create User Pane Control int window Rect bounds Rect int features int out Control public static final native int Create Window Group int in Attributes int out Group public static final native void Delete Menu short menuID  CreateUserPaneControl boundsRect outControl CreateWindowGroup inAttributes outGroup DeleteMenu
public static final native int Create Window Group int in Attributes int out Group public static final native void Delete Menu short menuID public static final native void Delete Menu Item int m Handle short index  CreateWindowGroup inAttributes outGroup DeleteMenu DeleteMenuItem mHandle
public static final native void Delete Menu short menuID public static final native void Delete Menu Item int m Handle short index public static final native int Delete Menu Items int m Handle short first Item int num Items  DeleteMenu DeleteMenuItem mHandle DeleteMenuItems mHandle firstItem numItems
public static final native void Delete Menu Item int m Handle short index public static final native int Delete Menu Items int m Handle short first Item int num Items public static final native void Diff Rgn int src RgnA int src RgnB int dst Rgn  DeleteMenuItem mHandle DeleteMenuItems mHandle firstItem numItems DiffRgn srcRgnA srcRgnB dstRgn
public static final native int Delete Menu Items int m Handle short first Item int num Items public static final native void Diff Rgn int src RgnA int src RgnB int dst Rgn public static final native int Disable Control int c Handle  DeleteMenuItems mHandle firstItem numItems DiffRgn srcRgnA srcRgnB dstRgn DisableControl cHandle
public static final native void Diff Rgn int src RgnA int src RgnB int dst Rgn public static final native int Disable Control int c Handle public static final native void Disable Menu Command int m Handle int command Id  DiffRgn srcRgnA srcRgnB dstRgn DisableControl cHandle DisableMenuCommand mHandle commandId
public static final native int Disable Control int c Handle public static final native void Disable Menu Command int m Handle int command Id public static final native void Disable Menu Item int m Handle short index  DisableControl cHandle DisableMenuCommand mHandle commandId DisableMenuItem mHandle
public static final native void Disable Menu Command int m Handle int command Id public static final native void Disable Menu Item int m Handle short index public static final native void Dispose Control int c Handle  DisableMenuCommand mHandle commandId DisableMenuItem mHandle DisposeControl cHandle
public static final native void Disable Menu Item int m Handle short index public static final native void Dispose Control int c Handle public static final native int Dispose Drag int the Drag  DisableMenuItem mHandle DisposeControl cHandle DisposeDrag theDrag
public static final native void Dispose Control int c Handle public static final native int Dispose Drag int the Drag public static final native void DisposeG World int offscreenG World  DisposeControl cHandle DisposeDrag theDrag DisposeGWorld offscreenGWorld
public static final native int Dispose Drag int the Drag public static final native void DisposeG World int offscreenG World public static final native void Dispose Handle int handle  DisposeDrag theDrag DisposeGWorld offscreenGWorld DisposeHandle
public static final native void DisposeG World int offscreenG World public static final native void Dispose Handle int handle public static final native void Dispose Menu int m Handle  DisposeGWorld offscreenGWorld DisposeHandle DisposeMenu mHandle
public static final native void Dispose Handle int handle public static final native void Dispose Menu int m Handle public static final native void Dispose Ptr int ptr  DisposeHandle DisposeMenu mHandle DisposePtr
public static final native void Dispose Menu int m Handle public static final native void Dispose Ptr int ptr public static final native void Dispose Rgn int rgn Handle  DisposeMenu mHandle DisposePtr DisposeRgn rgnHandle
public static final native void Dispose Ptr int ptr public static final native void Dispose Rgn int rgn Handle public static final native int Dispose Text To Unicode Info int io Text To Unicode Info  DisposePtr DisposeRgn rgnHandle DisposeTextToUnicodeInfo ioTextToUnicodeInfo
public static final native void Dispose Rgn int rgn Handle public static final native int Dispose Text To Unicode Info int io Text To Unicode Info public static final native int Dispose Unicode To Text Info int io Unicode To Text Info  DisposeRgn rgnHandle DisposeTextToUnicodeInfo ioTextToUnicodeInfo DisposeUnicodeToTextInfo ioUnicodeToTextInfo
public static final native int Dispose Text To Unicode Info int io Text To Unicode Info public static final native int Dispose Unicode To Text Info int io Unicode To Text Info public static final native void Dispose Window int w Handle  DisposeTextToUnicodeInfo ioTextToUnicodeInfo DisposeUnicodeToTextInfo ioUnicodeToTextInfo DisposeWindow wHandle
public static final native int Dispose Unicode To Text Info int io Unicode To Text Info public static final native void Dispose Window int w Handle public static final native int DM Get Next Screen Device int the Device boolean active Only  DisposeUnicodeToTextInfo ioUnicodeToTextInfo DisposeWindow wHandle DMGetNextScreenDevice theDevice activeOnly
public static final native void Dispose Window int w Handle public static final native int DM Get Next Screen Device int the Device boolean active Only public static final native int DM Get First Screen Device boolean active Only  DisposeWindow wHandle DMGetNextScreenDevice theDevice activeOnly DMGetFirstScreenDevice activeOnly
public static final native int DM Get Next Screen Device int the Device boolean active Only public static final native int DM Get First Screen Device boolean active Only public static final native void Draw Control In Current Port int in Control  DMGetNextScreenDevice theDevice activeOnly DMGetFirstScreenDevice activeOnly DrawControlInCurrentPort inControl
public static final native int DM Get First Screen Device boolean active Only public static final native void Draw Control In Current Port int in Control public static final native void Draw Menu Bar  DMGetFirstScreenDevice activeOnly DrawControlInCurrentPort inControl DrawMenuBar
public static final native void Draw Control In Current Port int in Control public static final native void Draw Menu Bar public static final native void Draw Text byte text Buf short first Byte short byte Count  DrawControlInCurrentPort inControl DrawMenuBar DrawText textBuf firstByte byteCount
public static final native void Draw Menu Bar public static final native void Draw Text byte text Buf short first Byte short byte Count public static final native int Draw Theme Button Rect in Bounds short in Kind Theme Button Draw Info in New Info Theme Button Draw Info in Prev Info int in Erase Proc int in Label Proc int in User Data  DrawMenuBar DrawText textBuf firstByte byteCount DrawThemeButton inBounds inKind ThemeButtonDrawInfo inNewInfo ThemeButtonDrawInfo inPrevInfo inEraseProc inLabelProc inUserData
public static final native void Draw Text byte text Buf short first Byte short byte Count public static final native int Draw Theme Button Rect in Bounds short in Kind Theme Button Draw Info in New Info Theme Button Draw Info in Prev Info int in Erase Proc int in Label Proc int in User Data public static final native int Draw Theme Edit Text Frame Rect bounds int state  DrawText textBuf firstByte byteCount DrawThemeButton inBounds inKind ThemeButtonDrawInfo inNewInfo ThemeButtonDrawInfo inPrevInfo inEraseProc inLabelProc inUserData DrawThemeEditTextFrame
public static final native int Draw Theme Button Rect in Bounds short in Kind Theme Button Draw Info in New Info Theme Button Draw Info in Prev Info int in Erase Proc int in Label Proc int in User Data public static final native int Draw Theme Edit Text Frame Rect bounds int state public static final native int Draw Theme Focus Rect Rect bounds boolean has Focus  DrawThemeButton inBounds inKind ThemeButtonDrawInfo inNewInfo ThemeButtonDrawInfo inPrevInfo inEraseProc inLabelProc inUserData DrawThemeEditTextFrame DrawThemeFocusRect hasFocus
public static final native int Draw Theme Edit Text Frame Rect bounds int state public static final native int Draw Theme Focus Rect Rect bounds boolean has Focus public static final native int Draw Theme Popup Arrow Rect bounds short orientation short size int state int erase Proc int erase Data  DrawThemeEditTextFrame DrawThemeFocusRect hasFocus DrawThemePopupArrow eraseProc eraseData
public static final native int Draw Theme Focus Rect Rect bounds boolean has Focus public static final native int Draw Theme Popup Arrow Rect bounds short orientation short size int state int erase Proc int erase Data public static final native int Draw Theme Separator Rect bounds int state  DrawThemeFocusRect hasFocus DrawThemePopupArrow eraseProc eraseData DrawThemeSeparator
public static final native int Draw Theme Popup Arrow Rect bounds short orientation short size int state int erase Proc int erase Data public static final native int Draw Theme Separator Rect bounds int state public static final native int Draw Theme Text Box int s Handle short fontID int state boolean wrap To Width Rect bounds short just int context  DrawThemePopupArrow eraseProc eraseData DrawThemeSeparator DrawThemeTextBox sHandle wrapToWidth
public static final native int Draw Theme Separator Rect bounds int state public static final native int Draw Theme Text Box int s Handle short fontID int state boolean wrap To Width Rect bounds short just int context public static final native int Embed Control int in Control int in Container  DrawThemeSeparator DrawThemeTextBox sHandle wrapToWidth EmbedControl inControl inContainer
public static final native int Draw Theme Text Box int s Handle short fontID int state boolean wrap To Width Rect bounds short just int context public static final native int Embed Control int in Control int in Container public static final native boolean Empty Rect Rect r  DrawThemeTextBox sHandle wrapToWidth EmbedControl inControl inContainer EmptyRect
public static final native int Embed Control int in Control int in Container public static final native boolean Empty Rect Rect r public static final native boolean Empty Rgn int rgn Handle  EmbedControl inControl inContainer EmptyRect EmptyRgn rgnHandle
public static final native boolean Empty Rect Rect r public static final native boolean Empty Rgn int rgn Handle public static final native int Enable Control int c Handle  EmptyRect EmptyRgn rgnHandle EnableControl cHandle
public static final native boolean Empty Rgn int rgn Handle public static final native int Enable Control int c Handle public static final native void Enable Menu Command int m Handle int command Id  EmptyRgn rgnHandle EnableControl cHandle EnableMenuCommand mHandle commandId
public static final native int Enable Control int c Handle public static final native void Enable Menu Command int m Handle int command Id public static final native void Enable Menu Item int m Handle short index  EnableControl cHandle EnableMenuCommand mHandle commandId EnableMenuItem mHandle
public static final native void Enable Menu Command int m Handle int command Id public static final native void Enable Menu Item int m Handle short index public static final native void End Update int w Handle  EnableMenuCommand mHandle commandId EnableMenuItem mHandle EndUpdate wHandle
public static final native void Enable Menu Item int m Handle short index public static final native void End Update int w Handle public static final native boolean Equal Rect Rect rect1 Rect rect2  EnableMenuItem mHandle EndUpdate wHandle EqualRect
public static final native void End Update int w Handle public static final native boolean Equal Rect Rect rect1 Rect rect2 public static final native void Erase Rect Rect bounds  EndUpdate wHandle EqualRect EraseRect
public static final native boolean Equal Rect Rect rect1 Rect rect2 public static final native void Erase Rect Rect bounds public static final native void Erase Rgn int rgn Handle  EqualRect EraseRect EraseRgn rgnHandle
public static final native void Erase Rect Rect bounds public static final native void Erase Rgn int rgn Handle public static final native int Fetch Font Info short fontID short font Size short font Style Font Info info  EraseRect EraseRgn rgnHandle FetchFontInfo fontSize fontStyle FontInfo
public static final native void Erase Rgn int rgn Handle public static final native int Fetch Font Info short fontID short font Size short font Style Font Info info public static final native int Fix2 Long int x  EraseRgn rgnHandle FetchFontInfo fontSize fontStyle FontInfo Fix2Long
public static final native int Fetch Font Info short fontID short font Size short font Style Font Info info public static final native int Fix2 Long int x public static final native int FM Create Font Family Instance Iterator short i Font Family int io Iterator  FetchFontInfo fontSize fontStyle FontInfo Fix2Long FMCreateFontFamilyInstanceIterator iFontFamily ioIterator
public static final native int Fix2 Long int x public static final native int FM Create Font Family Instance Iterator short i Font Family int io Iterator public static final native int FM Create Font Family Iterator int i Filter int i Ref Con int i Options int io Iterator  Fix2Long FMCreateFontFamilyInstanceIterator iFontFamily ioIterator FMCreateFontFamilyIterator iFilter iRefCon iOptions ioIterator
public static final native int FM Create Font Family Instance Iterator short i Font Family int io Iterator public static final native int FM Create Font Family Iterator int i Filter int i Ref Con int i Options int io Iterator public static final native int FM Dispose Font Family Iterator int io Iterator  FMCreateFontFamilyInstanceIterator iFontFamily ioIterator FMCreateFontFamilyIterator iFilter iRefCon iOptions ioIterator FMDisposeFontFamilyIterator ioIterator
public static final native int FM Create Font Family Iterator int i Filter int i Ref Con int i Options int io Iterator public static final native int FM Dispose Font Family Iterator int io Iterator public static final native int FM Dispose Font Family Instance Iterator int io Iterator  FMCreateFontFamilyIterator iFilter iRefCon iOptions ioIterator FMDisposeFontFamilyIterator ioIterator FMDisposeFontFamilyInstanceIterator ioIterator
public static final native int FM Dispose Font Family Iterator int io Iterator public static final native int FM Dispose Font Family Instance Iterator int io Iterator public static final native int FM GetATS Font Ref From Font int i Font  FMDisposeFontFamilyIterator ioIterator FMDisposeFontFamilyInstanceIterator ioIterator FMGetATSFontRefFromFont iFont
public static final native int FM Dispose Font Family Instance Iterator int io Iterator public static final native int FM GetATS Font Ref From Font int i Font public static final native int FM Get Font Family Name short id byte name  FMDisposeFontFamilyInstanceIterator ioIterator FMGetATSFontRefFromFont iFont FMGetFontFamilyName
public static final native int FM GetATS Font Ref From Font int i Font public static final native int FM Get Font Family Name short id byte name public static final native short FM Get Font Family From Name byte name  FMGetATSFontRefFromFont iFont FMGetFontFamilyName FMGetFontFamilyFromName
public static final native int FM Get Font Family Name short id byte name public static final native short FM Get Font Family From Name byte name public static final native int FM Get Font Family Instance From Font int i Font short o Font Family short o Style  FMGetFontFamilyName FMGetFontFamilyFromName FMGetFontFamilyInstanceFromFont iFont oFontFamily oStyle
public static final native short FM Get Font Family From Name byte name public static final native int FM Get Font Family Instance From Font int i Font short o Font Family short o Style public static final native int FM Get Font From Font Family Instance short i Font Family short i Style int o Font short o Intrinsic Style  FMGetFontFamilyFromName FMGetFontFamilyInstanceFromFont iFont oFontFamily oStyle FMGetFontFromFontFamilyInstance iFontFamily iStyle oFont oIntrinsicStyle
public static final native int FM Get Font Family Instance From Font int i Font short o Font Family short o Style public static final native int FM Get Font From Font Family Instance short i Font Family short i Style int o Font short o Intrinsic Style public static final native int FM Get Next Font Family int io Iterator short o Font Family  FMGetFontFamilyInstanceFromFont iFont oFontFamily oStyle FMGetFontFromFontFamilyInstance iFontFamily iStyle oFont oIntrinsicStyle FMGetNextFontFamily ioIterator oFontFamily
public static final native int FM Get Font From Font Family Instance short i Font Family short i Style int o Font short o Intrinsic Style public static final native int FM Get Next Font Family int io Iterator short o Font Family public static final native int FM Get Next Font Family Instance int io Iterator int o Font short o Style short o Size  FMGetFontFromFontFamilyInstance iFontFamily iStyle oFont oIntrinsicStyle FMGetNextFontFamily ioIterator oFontFamily FMGetNextFontFamilyInstance ioIterator oFont oStyle oSize
public static final native int FM Get Next Font Family int io Iterator short o Font Family public static final native int FM Get Next Font Family Instance int io Iterator int o Font short o Style short o Size public static final native boolean FP Is Font Panel Visible  FMGetNextFontFamily ioIterator oFontFamily FMGetNextFontFamilyInstance ioIterator oFont oStyle oSize FPIsFontPanelVisible
public static final native int FM Get Next Font Family Instance int io Iterator int o Font short o Style short o Size public static final native boolean FP Is Font Panel Visible public static final native int FP Show Hide Font Panel  FMGetNextFontFamilyInstance ioIterator oFont oStyle oSize FPIsFontPanelVisible FPShowHideFontPanel
public static final native boolean FP Is Font Panel Visible public static final native int FP Show Hide Font Panel public static final native int F Sp GetF Info byte spec byte fndr Info  FPIsFontPanelVisible FPShowHideFontPanel FSpGetFInfo fndrInfo
public static final native int FP Show Hide Font Panel public static final native int F Sp GetF Info byte spec byte fndr Info public static final native int F Sp MakeFS Ref byte source byte new Ref  FPShowHideFontPanel FSpGetFInfo fndrInfo FSpMakeFSRef newRef
public static final native int F Sp GetF Info byte spec byte fndr Info public static final native int F Sp MakeFS Ref byte source byte new Ref public static final native int FS Get Catalog Info byte ref int which Info byte catalog Info byte out Name byte fs Spec byte parent Ref  FSpGetFInfo fndrInfo FSpMakeFSRef newRef FSGetCatalogInfo whichInfo catalogInfo outName fsSpec parentRef
public static final native int F Sp MakeFS Ref byte source byte new Ref public static final native int FS Get Catalog Info byte ref int which Info byte catalog Info byte out Name byte fs Spec byte parent Ref public static final native short Find Window Point where int w Handle  FSpMakeFSRef newRef FSGetCatalogInfo whichInfo catalogInfo outName fsSpec parentRef FindWindow wHandle
public static final native int FS Get Catalog Info byte ref int which Info byte catalog Info byte out Name byte fs Spec byte parent Ref public static final native short Find Window Point where int w Handle public static final native void Frame Oval Rect bounds  FSGetCatalogInfo whichInfo catalogInfo outName fsSpec parentRef FindWindow wHandle FrameOval
public static final native short Find Window Point where int w Handle public static final native void Frame Oval Rect bounds public static final native void Frame Poly int poly Handle  FindWindow wHandle FrameOval FramePoly polyHandle
public static final native void Frame Oval Rect bounds public static final native void Frame Poly int poly Handle public static final native void Frame Rect Rect bounds  FrameOval FramePoly polyHandle FrameRect
public static final native void Frame Poly int poly Handle public static final native void Frame Rect Rect bounds public static final native void Frame Round Rect Rect bounds short oval Width short oval Height  FramePoly polyHandle FrameRect FrameRoundRect ovalWidth ovalHeight
public static final native void Frame Rect Rect bounds public static final native void Frame Round Rect Rect bounds short oval Width short oval Height public static final native int Front Window  FrameRect FrameRoundRect ovalWidth ovalHeight FrontWindow
public static final native void Frame Round Rect Rect bounds short oval Width short oval Height public static final native int Front Window public static final native int Gestalt int selector int response  FrameRoundRect ovalWidth ovalHeight FrontWindow
public static final native int Front Window public static final native int Gestalt int selector int response public static final native short Get App Font  FrontWindow GetAppFont
public static final native int Gestalt int selector int response public static final native short Get App Font public static final native int Get Application Event Target  GetAppFont GetApplicationEventTarget
public static final native short Get App Font public static final native int Get Application Event Target public static final native int Get Available Window Attributes int window Class  GetAppFont GetApplicationEventTarget GetAvailableWindowAttributes windowClass
public static final native int Get Application Event Target public static final native int Get Available Window Attributes int window Class public static final native int Get Available Window Positioning Bounds int in Device Rect out Available Rect  GetApplicationEventTarget GetAvailableWindowAttributes windowClass GetAvailableWindowPositioningBounds inDevice outAvailableRect
public static final native int Get Available Window Attributes int window Class public static final native int Get Available Window Positioning Bounds int in Device Rect out Available Rect public static final native int Get Best Control Rect int in Control Rect out Rect short out Base Line Offset  GetAvailableWindowAttributes windowClass GetAvailableWindowPositioningBounds inDevice outAvailableRect GetBestControlRect inControl outRect outBaseLineOffset
public static final native int Get Available Window Positioning Bounds int in Device Rect out Available Rect public static final native int Get Best Control Rect int in Control Rect out Rect short out Base Line Offset public static final native int Get Caret Time  GetAvailableWindowPositioningBounds inDevice outAvailableRect GetBestControlRect inControl outRect outBaseLineOffset GetCaretTime
public static final native int Get Best Control Rect int in Control Rect out Rect short out Base Line Offset public static final native int Get Caret Time public static final native void Get Clip int rgn Handle  GetBestControlRect inControl outRect outBaseLineOffset GetCaretTime GetClip rgnHandle
public static final native int Get Caret Time public static final native void Get Clip int rgn Handle public static final native int Get Control32 Bit Maximum int c Handle  GetCaretTime GetClip rgnHandle GetControl32BitMaximum cHandle
public static final native void Get Clip int rgn Handle public static final native int Get Control32 Bit Maximum int c Handle public static final native int Get Control32 Bit Minimum int c Handle  GetClip rgnHandle GetControl32BitMaximum cHandle GetControl32BitMinimum cHandle
public static final native int Get Control32 Bit Maximum int c Handle public static final native int Get Control32 Bit Minimum int c Handle public static final native int Get Control32 Bit Value int c Handle  GetControl32BitMaximum cHandle GetControl32BitMinimum cHandle GetControl32BitValue cHandle
public static final native int Get Control32 Bit Minimum int c Handle public static final native int Get Control32 Bit Value int c Handle public static final native void Get Control Bounds int c Handle Rect bounds  GetControl32BitMinimum cHandle GetControl32BitValue cHandle GetControlBounds cHandle
public static final native int Get Control32 Bit Value int c Handle public static final native void Get Control Bounds int c Handle Rect bounds public static final native int Get Control Data int in Control short in Part int in Tag Name int in Buffer Size Control Font Style Rec in Buffer int out Actual Size  GetControl32BitValue cHandle GetControlBounds cHandle GetControlData inControl inPart inTagName inBufferSize ControlFontStyleRec inBuffer outActualSize
public static final native void Get Control Bounds int c Handle Rect bounds public static final native int Get Control Data int in Control short in Part int in Tag Name int in Buffer Size Control Font Style Rec in Buffer int out Actual Size public static final native int Get Control Data int in Control short in Part int in Tag Name int in Buffer Size Rect in Buffer int out Actual Size  GetControlBounds cHandle GetControlData inControl inPart inTagName inBufferSize ControlFontStyleRec inBuffer outActualSize GetControlData inControl inPart inTagName inBufferSize inBuffer outActualSize
public static final native int Get Control Data int in Control short in Part int in Tag Name int in Buffer Size Control Font Style Rec in Buffer int out Actual Size public static final native int Get Control Data int in Control short in Part int in Tag Name int in Buffer Size Rect in Buffer int out Actual Size public static final native int Get Control Data int in Control short in Part int in Tag Name int in Buffer Size int in Buffer int out Actual Size  GetControlData inControl inPart inTagName inBufferSize ControlFontStyleRec inBuffer outActualSize GetControlData inControl inPart inTagName inBufferSize inBuffer outActualSize GetControlData inControl inPart inTagName inBufferSize inBuffer outActualSize
public static final native int Get Control Data int in Control short in Part int in Tag Name int in Buffer Size Rect in Buffer int out Actual Size public static final native int Get Control Data int in Control short in Part int in Tag Name int in Buffer Size int in Buffer int out Actual Size public static final native int Get Control Data int in Control short in Part int in Tag Name int in Buffer Size short in Buffer int out Actual Size  GetControlData inControl inPart inTagName inBufferSize inBuffer outActualSize GetControlData inControl inPart inTagName inBufferSize inBuffer outActualSize GetControlData inControl inPart inTagName inBufferSize inBuffer outActualSize
public static final native int Get Control Data int in Control short in Part int in Tag Name int in Buffer Size int in Buffer int out Actual Size public static final native int Get Control Data int in Control short in Part int in Tag Name int in Buffer Size short in Buffer int out Actual Size public static final native int Get Control Data int in Control short in Part int in Tag Name int in Buffer Size byte in Buffer int out Actual Size  GetControlData inControl inPart inTagName inBufferSize inBuffer outActualSize GetControlData inControl inPart inTagName inBufferSize inBuffer outActualSize GetControlData inControl inPart inTagName inBufferSize inBuffer outActualSize
public static final native int Get Control Data int in Control short in Part int in Tag Name int in Buffer Size short in Buffer int out Actual Size public static final native int Get Control Data int in Control short in Part int in Tag Name int in Buffer Size byte in Buffer int out Actual Size public static final native int Get Control Event Target int c Handle  GetControlData inControl inPart inTagName inBufferSize inBuffer outActualSize GetControlData inControl inPart inTagName inBufferSize inBuffer outActualSize GetControlEventTarget cHandle
public static final native int Get Control Data int in Control short in Part int in Tag Name int in Buffer Size byte in Buffer int out Actual Size public static final native int Get Control Event Target int c Handle public static final native int Get Control Features int in Control int out Features  GetControlData inControl inPart inTagName inBufferSize inBuffer outActualSize GetControlEventTarget cHandle GetControlFeatures inControl outFeatures
public static final native int Get Control Event Target int c Handle public static final native int Get Control Features int in Control int out Features public static final native int Get Control Owner int c Handle  GetControlEventTarget cHandle GetControlFeatures inControl outFeatures GetControlOwner cHandle
public static final native int Get Control Features int in Control int out Features public static final native int Get Control Owner int c Handle public static final native int Get Control Property int control int property Creator int property Tag int buffer Size int actual Size int property Buffer  GetControlFeatures inControl outFeatures GetControlOwner cHandle GetControlProperty propertyCreator propertyTag bufferSize actualSize propertyBuffer
public static final native int Get Control Owner int c Handle public static final native int Get Control Property int control int property Creator int property Tag int buffer Size int actual Size int property Buffer public static final native int Get Control Reference int c Handle  GetControlOwner cHandle GetControlProperty propertyCreator propertyTag bufferSize actualSize propertyBuffer GetControlReference cHandle
public static final native int Get Control Property int control int property Creator int property Tag int buffer Size int actual Size int property Buffer public static final native int Get Control Reference int c Handle public static final native int Get Control Region int c Handle short in Part int rgn Handle  GetControlProperty propertyCreator propertyTag bufferSize actualSize propertyBuffer GetControlReference cHandle GetControlRegion cHandle inPart rgnHandle
public static final native int Get Control Reference int c Handle public static final native int Get Control Region int c Handle short in Part int rgn Handle public static final native short Get Control Value int c Handle  GetControlReference cHandle GetControlRegion cHandle inPart rgnHandle GetControlValue cHandle
public static final native int Get Control Region int c Handle short in Part int rgn Handle public static final native short Get Control Value int c Handle public static final native int Get Control View Size int c Handle  GetControlRegion cHandle inPart rgnHandle GetControlValue cHandle GetControlViewSize cHandle
public static final native short Get Control Value int c Handle public static final native int Get Control View Size int c Handle public static final native int Get Current Event Button State  GetControlValue cHandle GetControlViewSize cHandle GetCurrentEventButtonState
public static final native int Get Control View Size int c Handle public static final native int Get Current Event Button State public static final native int Get Current Event Loop  GetControlViewSize cHandle GetCurrentEventButtonState GetCurrentEventLoop
public static final native int Get Current Event Button State public static final native int Get Current Event Loop public static final native int Get Current Event Key Modifiers  GetCurrentEventButtonState GetCurrentEventLoop GetCurrentEventKeyModifiers
public static final native int Get Current Event Loop public static final native int Get Current Event Key Modifiers public static final native int Get Current Event Queue  GetCurrentEventLoop GetCurrentEventKeyModifiers GetCurrentEventQueue
public static final native int Get Current Event Key Modifiers public static final native int Get Current Event Queue public static final native int Get Current Process int psn  GetCurrentEventKeyModifiers GetCurrentEventQueue GetCurrentProcess
public static final native int Get Current Event Queue public static final native int Get Current Process int psn public static final native int Get Current Scrap int scrap  GetCurrentEventQueue GetCurrentProcess GetCurrentScrap
public static final native int Get Current Process int psn public static final native int Get Current Scrap int scrap public static final native int Get Data Browser Callbacks int browser Data Browser Callbacks callbacks  GetCurrentProcess GetCurrentScrap GetDataBrowserCallbacks DataBrowserCallbacks
public static final native int Get Current Scrap int scrap public static final native int Get Data Browser Callbacks int browser Data Browser Callbacks callbacks public static final native int Get Data Browser Item Count int c Handle int container boolean recurse int state int num Items  GetCurrentScrap GetDataBrowserCallbacks DataBrowserCallbacks GetDataBrowserItemCount cHandle numItems
public static final native int Get Data Browser Callbacks int browser Data Browser Callbacks callbacks public static final native int Get Data Browser Item Count int c Handle int container boolean recurse int state int num Items public static final native int Get Data Browser Item Data Button Value int item Data short the Data  GetDataBrowserCallbacks DataBrowserCallbacks GetDataBrowserItemCount cHandle numItems GetDataBrowserItemDataButtonValue itemData theData
public static final native int Get Data Browser Item Count int c Handle int container boolean recurse int state int num Items public static final native int Get Data Browser Item Data Button Value int item Data short the Data public static final native int Get Data Browser Item Part Bounds int c Handle int item int property int part Rect bounds  GetDataBrowserItemCount cHandle numItems GetDataBrowserItemDataButtonValue itemData theData GetDataBrowserItemPartBounds cHandle
public static final native int Get Data Browser Item Data Button Value int item Data short the Data public static final native int Get Data Browser Item Part Bounds int c Handle int item int property int part Rect bounds public static final native int Get Data Browser Items int browser int container boolean recurse int state int items  GetDataBrowserItemDataButtonValue itemData theData GetDataBrowserItemPartBounds cHandle GetDataBrowserItems
public static final native int Get Data Browser Item Part Bounds int c Handle int item int property int part Rect bounds public static final native int Get Data Browser Items int browser int container boolean recurse int state int items public static final native int Get Data Browser Item State int browser int item int state  GetDataBrowserItemPartBounds cHandle GetDataBrowserItems GetDataBrowserItemState
public static final native int Get Data Browser Items int browser int container boolean recurse int state int items public static final native int Get Data Browser Item State int browser int item int state public static final native int Get Data Browser List View Header Btn Height int browser short height  GetDataBrowserItems GetDataBrowserItemState GetDataBrowserListViewHeaderBtnHeight
public static final native int Get Data Browser Item State int browser int item int state public static final native int Get Data Browser List View Header Btn Height int browser short height public static final native int Get Data Browser List View Header Desc int browser int column Data Browser List View Header Desc desc  GetDataBrowserItemState GetDataBrowserListViewHeaderBtnHeight GetDataBrowserListViewHeaderDesc DataBrowserListViewHeaderDesc
public static final native int Get Data Browser List View Header Btn Height int browser short height public static final native int Get Data Browser List View Header Desc int browser int column Data Browser List View Header Desc desc public static final native int Get Data Browser Table View ItemID int browser int row int item  GetDataBrowserListViewHeaderBtnHeight GetDataBrowserListViewHeaderDesc DataBrowserListViewHeaderDesc GetDataBrowserTableViewItemID
public static final native int Get Data Browser List View Header Desc int browser int column Data Browser List View Header Desc desc public static final native int Get Data Browser Table View ItemID int browser int row int item public static final native int Get Data Browser Table View Item Row int browser int item int row  GetDataBrowserListViewHeaderDesc DataBrowserListViewHeaderDesc GetDataBrowserTableViewItemID GetDataBrowserTableViewItemRow
public static final native int Get Data Browser Table View ItemID int browser int row int item public static final native int Get Data Browser Table View Item Row int browser int item int row public static final native int Get Data Browser Table View Column Position int browser int column int position  GetDataBrowserTableViewItemID GetDataBrowserTableViewItemRow GetDataBrowserTableViewColumnPosition
public static final native int Get Data Browser Table View Item Row int browser int item int row public static final native int Get Data Browser Table View Column Position int browser int column int position public static final native int Get Data Browser Table View Named Column Width int browser int column short width  GetDataBrowserTableViewItemRow GetDataBrowserTableViewColumnPosition GetDataBrowserTableViewNamedColumnWidth
public static final native int Get Data Browser Table View Column Position int browser int column int position public static final native int Get Data Browser Table View Named Column Width int browser int column short width public static final native int Get Data Browser Table View Row Height int browser short height  GetDataBrowserTableViewColumnPosition GetDataBrowserTableViewNamedColumnWidth GetDataBrowserTableViewRowHeight
public static final native int Get Data Browser Table View Named Column Width int browser int column short width public static final native int Get Data Browser Table View Row Height int browser short height public static final native int Get Data Browser Scroll Bar Inset int browser Rect inset Rect  GetDataBrowserTableViewNamedColumnWidth GetDataBrowserTableViewRowHeight GetDataBrowserScrollBarInset insetRect
public static final native int Get Data Browser Table View Row Height int browser short height public static final native int Get Data Browser Scroll Bar Inset int browser Rect inset Rect public static final native int Get Data Browser Scroll Position int c Handle int top int left  GetDataBrowserTableViewRowHeight GetDataBrowserScrollBarInset insetRect GetDataBrowserScrollPosition cHandle
public static final native int Get Data Browser Scroll Bar Inset int browser Rect inset Rect public static final native int Get Data Browser Scroll Position int c Handle int top int left public static final native int Get Data Browser Selection Anchor int browser int first int last  GetDataBrowserScrollBarInset insetRect GetDataBrowserScrollPosition cHandle GetDataBrowserSelectionAnchor
public static final native int Get Data Browser Scroll Position int c Handle int top int left public static final native int Get Data Browser Selection Anchor int browser int first int last public static final native int Get Data Browser Selection Flags int browser int selection Flags  GetDataBrowserScrollPosition cHandle GetDataBrowserSelectionAnchor GetDataBrowserSelectionFlags selectionFlags
public static final native int Get Data Browser Selection Anchor int browser int first int last public static final native int Get Data Browser Selection Flags int browser int selection Flags public static final native int Get Data Browser Sort Property int browser int property  GetDataBrowserSelectionAnchor GetDataBrowserSelectionFlags selectionFlags GetDataBrowserSortProperty
public static final native int Get Data Browser Selection Flags int browser int selection Flags public static final native int Get Data Browser Sort Property int browser int property public static final native int Get Dbl Time  GetDataBrowserSelectionFlags selectionFlags GetDataBrowserSortProperty GetDblTime
public static final native int Get Data Browser Sort Property int browser int property public static final native int Get Dbl Time public static final native short Get Def Font Size  GetDataBrowserSortProperty GetDblTime GetDefFontSize
public static final native int Get Dbl Time public static final native short Get Def Font Size public static final native int Get Device List  GetDblTime GetDefFontSize GetDeviceList
public static final native short Get Def Font Size public static final native int Get Device List public static final native int Get Drag Allowable Actions int the Drag int out Actions  GetDefFontSize GetDeviceList GetDragAllowableActions theDrag outActions
public static final native int Get Device List public static final native int Get Drag Allowable Actions int the Drag int out Actions public static final native int Get Drag Drop Action int the Drag int out Action  GetDeviceList GetDragAllowableActions theDrag outActions GetDragDropAction theDrag outAction
public static final native int Get Drag Allowable Actions int the Drag int out Actions public static final native int Get Drag Drop Action int the Drag int out Action public static final native int Get Drag Item Reference Number int the Drag short index int the Item Ref  GetDragAllowableActions theDrag outActions GetDragDropAction theDrag outAction GetDragItemReferenceNumber theDrag theItemRef
public static final native int Get Drag Drop Action int the Drag int out Action public static final native int Get Drag Item Reference Number int the Drag short index int the Item Ref public static final native int Get Drag Modifiers int the Drag short modifiers short mouse Down Modifiers short mouse Up Modifiers  GetDragDropAction theDrag outAction GetDragItemReferenceNumber theDrag theItemRef GetDragModifiers theDrag mouseDownModifiers mouseUpModifiers
public static final native int Get Drag Item Reference Number int the Drag short index int the Item Ref public static final native int Get Drag Modifiers int the Drag short modifiers short mouse Down Modifiers short mouse Up Modifiers public static final native int Get Drag Mouse int the Drag Point mouse Point global Pinned Mouse  GetDragItemReferenceNumber theDrag theItemRef GetDragModifiers theDrag mouseDownModifiers mouseUpModifiers GetDragMouse theDrag globalPinnedMouse
public static final native int Get Drag Modifiers int the Drag short modifiers short mouse Down Modifiers short mouse Up Modifiers public static final native int Get Drag Mouse int the Drag Point mouse Point global Pinned Mouse public static final native int Get Event Class int e Handle  GetDragModifiers theDrag mouseDownModifiers mouseUpModifiers GetDragMouse theDrag globalPinnedMouse GetEventClass eHandle
public static final native int Get Drag Mouse int the Drag Point mouse Point global Pinned Mouse public static final native int Get Event Class int e Handle public static final native int Get Event Dispatcher Target  GetDragMouse theDrag globalPinnedMouse GetEventClass eHandle GetEventDispatcherTarget
public static final native int Get Event Class int e Handle public static final native int Get Event Dispatcher Target public static final native int Get Event Kind int e Handle  GetEventClass eHandle GetEventDispatcherTarget GetEventKind eHandle
public static final native int Get Event Dispatcher Target public static final native int Get Event Kind int e Handle public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size int out Data  GetEventDispatcherTarget GetEventKind eHandle GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData
public static final native int Get Event Kind int e Handle public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size int out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size char out Data  GetEventKind eHandle GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData
public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size int out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size char out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size short out Data  GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData
public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size char out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size short out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size byte out Data  GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData
public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size short out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size byte out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size HI Command out Data  GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize HICommand outData
public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size byte out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size HI Command out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size Point out Data  GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize HICommand outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData
public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size HI Command out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size Point out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size CG Point out Data  GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize HICommand outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize CGPoint outData
public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size Point out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size CG Point out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size RGB Color out Data  GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize CGPoint outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize RGBColor outData
public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size CG Point out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size RGB Color out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size Rect out Data  GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize CGPoint outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize RGBColor outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData
public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size RGB Color out Data public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size Rect out Data public static final native double Get Event Time int e Handle  GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize RGBColor outData GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData GetEventTime eHandle
public static final native int Get Event Parameter int in Event int in Name int in Desired Type int out Actual Type int in Buffer Size int out Actual Size Rect out Data public static final native double Get Event Time int e Handle public static final native int Get Flavor Data int the Drag int the Item Ref int the Type byte data Ptr int data Size int data Offset  GetEventParameter inEvent inName inDesiredType outActualType inBufferSize outActualSize outData GetEventTime eHandle GetFlavorData theDrag theItemRef theType dataPtr dataSize dataOffset
public static final native double Get Event Time int e Handle public static final native int Get Flavor Data int the Drag int the Item Ref int the Type byte data Ptr int data Size int data Offset public static final native int Get Flavor Data Size int the Drag int the Item Ref int the Type int data Size  GetEventTime eHandle GetFlavorData theDrag theItemRef theType dataPtr dataSize dataOffset GetFlavorDataSize theDrag theItemRef theType dataSize
public static final native int Get Flavor Data int the Drag int the Item Ref int the Type byte data Ptr int data Size int data Offset public static final native int Get Flavor Data Size int the Drag int the Item Ref int the Type int data Size public static final native int Get Flavor Type int the Drag int the Item Ref short index int the Type  GetFlavorData theDrag theItemRef theType dataPtr dataSize dataOffset GetFlavorDataSize theDrag theItemRef theType dataSize GetFlavorType theDrag theItemRef theType
public static final native int Get Flavor Data Size int the Drag int the Item Ref int the Type int data Size public static final native int Get Flavor Type int the Drag int the Item Ref short index int the Type public static final native void Get Font Info Font Info info  GetFlavorDataSize theDrag theItemRef theType dataSize GetFlavorType theDrag theItemRef theType GetFontInfo FontInfo
public static final native int Get Flavor Type int the Drag int the Item Ref short index int the Type public static final native void Get Font Info Font Info info public static final native int GetG Device  GetFlavorType theDrag theItemRef theType GetFontInfo FontInfo GetGDevice
public static final native void Get Font Info Font Info info public static final native int GetG Device public static final native void GetG World int port Handle int gd Handle  GetFontInfo FontInfo GetGDevice GetGWorld portHandle gdHandle
public static final native int GetG Device public static final native void GetG World int port Handle int gd Handle public static final native void Get Global Mouse Point where  GetGDevice GetGWorld portHandle gdHandle GetGlobalMouse
public static final native void GetG World int port Handle int gd Handle public static final native void Get Global Mouse Point where public static final native int Get Handle Size int handle  GetGWorld portHandle gdHandle GetGlobalMouse GetHandleSize
public static final native void Get Global Mouse Point where public static final native int Get Handle Size int handle public static final native int Get Icon Family Data int icon Family int icon Type int h  GetGlobalMouse GetHandleSize GetIconFamilyData iconFamily iconType
public static final native int Get Handle Size int handle public static final native int Get Icon Family Data int icon Family int icon Type int h public static final native int Get Icon Ref short v Ref Num int creator int icon Type int the Icon Ref  GetHandleSize GetIconFamilyData iconFamily iconType GetIconRef vRefNum iconType theIconRef
public static final native int Get Icon Family Data int icon Family int icon Type int h public static final native int Get Icon Ref short v Ref Num int creator int icon Type int the Icon Ref public static final native int Get Ind Menu Item With CommandID int m Handle int command Id int index int out Menu short out Index  GetIconFamilyData iconFamily iconType GetIconRef vRefNum iconType theIconRef GetIndMenuItemWithCommandID mHandle commandId outMenu outIndex
public static final native int Get Icon Ref short v Ref Num int creator int icon Type int the Icon Ref public static final native int Get Ind Menu Item With CommandID int m Handle int command Id int index int out Menu short out Index public static final native int Get Indexed Sub Control int c Handle short index int out Handle  GetIconRef vRefNum iconType theIconRef GetIndMenuItemWithCommandID mHandle commandId outMenu outIndex GetIndexedSubControl cHandle outHandle
public static final native int Get Ind Menu Item With CommandID int m Handle int command Id int index int out Menu short out Index public static final native int Get Indexed Sub Control int c Handle short index int out Handle public static final native void Get Item Mark int the Menu short item short mark Char  GetIndMenuItemWithCommandID mHandle commandId outMenu outIndex GetIndexedSubControl cHandle outHandle GetItemMark theMenu markChar
public static final native int Get Indexed Sub Control int c Handle short index int out Handle public static final native void Get Item Mark int the Menu short item short mark Char public static final native int Get Keyboard Focus int w Handle int c Handle  GetIndexedSubControl cHandle outHandle GetItemMark theMenu markChar GetKeyboardFocus wHandle cHandle
public static final native void Get Item Mark int the Menu short item short mark Char public static final native int Get Keyboard Focus int w Handle int c Handle public static final native double Get Last User Event Time  GetItemMark theMenu markChar GetKeyboardFocus wHandle cHandle GetLastUserEventTime
public static final native int Get Keyboard Focus int w Handle int c Handle public static final native double Get Last User Event Time public static final native int Get Main Device  GetKeyboardFocus wHandle cHandle GetLastUserEventTime GetMainDevice
public static final native double Get Last User Event Time public static final native int Get Main Device public static final native int Get Main Event Queue  GetLastUserEventTime GetMainDevice GetMainEventQueue
public static final native int Get Main Device public static final native int Get Main Event Queue public static final native int GetM Bar Height  GetMainDevice GetMainEventQueue GetMBarHeight
public static final native int Get Main Event Queue public static final native int GetM Bar Height public static final native int Get Menu Command Mark int the Menu int command Id char out Mark  GetMainEventQueue GetMBarHeight GetMenuCommandMark theMenu commandId outMark
public static final native int GetM Bar Height public static final native int Get Menu Command Mark int the Menu int command Id char out Mark public static final native int Get Menu Event Target int c Handle  GetMBarHeight GetMenuCommandMark theMenu commandId outMark GetMenuEventTarget cHandle
public static final native int Get Menu Command Mark int the Menu int command Id char out Mark public static final native int Get Menu Event Target int c Handle public static final native int Get Menu Font int in Menu short out FontID short out Font Size  GetMenuCommandMark theMenu commandId outMark GetMenuEventTarget cHandle GetMenuFont inMenu outFontID outFontSize
public static final native int Get Menu Event Target int c Handle public static final native int Get Menu Font int in Menu short out FontID short out Font Size public static final native short Get Menu Height int in Menu  GetMenuEventTarget cHandle GetMenuFont inMenu outFontID outFontSize GetMenuHeight inMenu
public static final native int Get Menu Font int in Menu short out FontID short out Font Size public static final native short Get Menu Height int in Menu public static final native short Get MenuID int menu  GetMenuFont inMenu outFontID outFontSize GetMenuHeight inMenu GetMenuID
public static final native short Get Menu Height int in Menu public static final native short Get MenuID int menu public static final native int Get Menu Item CommandID int in Menu short in Item int out CommandID  GetMenuHeight inMenu GetMenuID GetMenuItemCommandID inMenu inItem outCommandID
public static final native short Get MenuID int menu public static final native int Get Menu Item CommandID int in Menu short in Item int out CommandID public static final native int Get Menu Item Hierarchical Menu int in Menu short in Item int out Hier Menu  GetMenuID GetMenuItemCommandID inMenu inItem outCommandID GetMenuItemHierarchicalMenu inMenu inItem outHierMenu
public static final native int Get Menu Item CommandID int in Menu short in Item int out CommandID public static final native int Get Menu Item Hierarchical Menu int in Menu short in Item int out Hier Menu public static final native int Get Menu Item Ref Con int in Menu short int Item int out Ref Con  GetMenuItemCommandID inMenu inItem outCommandID GetMenuItemHierarchicalMenu inMenu inItem outHierMenu GetMenuItemRefCon inMenu intItem outRefCon
public static final native int Get Menu Item Hierarchical Menu int in Menu short in Item int out Hier Menu public static final native int Get Menu Item Ref Con int in Menu short int Item int out Ref Con public static final native int Get Menu Tracking Data int menu Menu Tracking Data out Data  GetMenuItemHierarchicalMenu inMenu inItem outHierMenu GetMenuItemRefCon inMenu intItem outRefCon GetMenuTrackingData MenuTrackingData outData
public static final native int Get Menu Item Ref Con int in Menu short int Item int out Ref Con public static final native int Get Menu Tracking Data int menu Menu Tracking Data out Data public static final native short Get Menu Width int in Menu  GetMenuItemRefCon inMenu intItem outRefCon GetMenuTrackingData MenuTrackingData outData GetMenuWidth inMenu
public static final native int Get Menu Tracking Data int menu Menu Tracking Data out Data public static final native short Get Menu Width int in Menu public static final native void Get Mouse Point where  GetMenuTrackingData MenuTrackingData outData GetMenuWidth inMenu GetMouse
public static final native short Get Menu Width int in Menu public static final native void Get Mouse Point where public static final native int Get Next Device int cur Device  GetMenuWidth inMenu GetMouse GetNextDevice curDevice
public static final native void Get Mouse Point where public static final native int Get Next Device int cur Device public static final native void Get Pix Bounds int p Handle Rect bounds  GetMouse GetNextDevice curDevice GetPixBounds pHandle
public static final native int Get Next Device int cur Device public static final native void Get Pix Bounds int p Handle Rect bounds public static final native short Get Pix Depth int p Handle  GetNextDevice curDevice GetPixBounds pHandle GetPixDepth pHandle
public static final native void Get Pix Bounds int p Handle Rect bounds public static final native short Get Pix Depth int p Handle public static final native void Get Port int port  GetPixBounds pHandle GetPixDepth pHandle GetPort
public static final native short Get Pix Depth int p Handle public static final native void Get Port int port public static final native int Get Port Bit Map For Copy Bits int port Handle  GetPixDepth pHandle GetPort GetPortBitMapForCopyBits portHandle
public static final native void Get Port int port public static final native int Get Port Bit Map For Copy Bits int port Handle public static final native void Get Port Bounds int p Handle Rect rect  GetPort GetPortBitMapForCopyBits portHandle GetPortBounds pHandle
public static final native int Get Port Bit Map For Copy Bits int port Handle public static final native void Get Port Bounds int p Handle Rect rect public static final native void Get Port Clip Region int port int clip Rgn  GetPortBitMapForCopyBits portHandle GetPortBounds pHandle GetPortClipRegion clipRgn
public static final native void Get Port Bounds int p Handle Rect rect public static final native void Get Port Clip Region int port int clip Rgn public static final native int Get Port Visible Region int port Handle int rgn Handle  GetPortBounds pHandle GetPortClipRegion clipRgn GetPortVisibleRegion portHandle rgnHandle
public static final native void Get Port Clip Region int port int clip Rgn public static final native int Get Port Visible Region int port Handle int rgn Handle public static final native int Get Ptr Size int ptr  GetPortClipRegion clipRgn GetPortVisibleRegion portHandle rgnHandle GetPtrSize
public static final native int Get Port Visible Region int port Handle int rgn Handle public static final native int Get Ptr Size int ptr public static final native void Get Region Bounds int rgn Handle Rect bounds  GetPortVisibleRegion portHandle rgnHandle GetPtrSize GetRegionBounds rgnHandle
public static final native int Get Ptr Size int ptr public static final native void Get Region Bounds int rgn Handle Rect bounds public static final native int Get Root Control int window Handle int c Handle  GetPtrSize GetRegionBounds rgnHandle GetRootControl windowHandle cHandle
public static final native void Get Region Bounds int rgn Handle Rect bounds public static final native int Get Root Control int window Handle int c Handle public static final native int Get Scrap Flavor Count int scrap int info Count  GetRegionBounds rgnHandle GetRootControl windowHandle cHandle GetScrapFlavorCount infoCount
public static final native int Get Root Control int window Handle int c Handle public static final native int Get Scrap Flavor Count int scrap int info Count public static final native int Get Scrap Flavor Data int scrap int flavor Type int byte Count byte destination  GetRootControl windowHandle cHandle GetScrapFlavorCount infoCount GetScrapFlavorData flavorType byteCount
public static final native int Get Scrap Flavor Count int scrap int info Count public static final native int Get Scrap Flavor Data int scrap int flavor Type int byte Count byte destination public static final native int Get Scrap Flavor Info List int scrap int info Count int info  GetScrapFlavorCount infoCount GetScrapFlavorData flavorType byteCount GetScrapFlavorInfoList infoCount
public static final native int Get Scrap Flavor Data int scrap int flavor Type int byte Count byte destination public static final native int Get Scrap Flavor Info List int scrap int info Count int info public static final native int Get Scrap Flavor Size int scrap int flavor Type int byte Count  GetScrapFlavorData flavorType byteCount GetScrapFlavorInfoList infoCount GetScrapFlavorSize flavorType byteCount
public static final native int Get Scrap Flavor Info List int scrap int info Count int info public static final native int Get Scrap Flavor Size int scrap int flavor Type int byte Count public static final native int Get Script Manager Variable short selector  GetScrapFlavorInfoList infoCount GetScrapFlavorSize flavorType byteCount GetScriptManagerVariable
public static final native int Get Scrap Flavor Size int scrap int flavor Type int byte Count public static final native int Get Script Manager Variable short selector public static final native int Get Super Control int c Handle int parent Handle  GetScrapFlavorSize flavorType byteCount GetScriptManagerVariable GetSuperControl cHandle parentHandle
public static final native int Get Script Manager Variable short selector public static final native int Get Super Control int c Handle int parent Handle public static final native int Get Tab Content Rect int the Control Rect rect  GetScriptManagerVariable GetSuperControl cHandle parentHandle GetTabContentRect theControl
public static final native int Get Super Control int c Handle int parent Handle public static final native int Get Tab Content Rect int the Control Rect rect public static final native int Get Theme Brush As Color short in Brush short in Depth boolean in Color Dev RGB Color out Color  GetSuperControl cHandle parentHandle GetTabContentRect theControl GetThemeBrushAsColor inBrush inDepth inColorDev RGBColor outColor
public static final native int Get Tab Content Rect int the Control Rect rect public static final native int Get Theme Brush As Color short in Brush short in Depth boolean in Color Dev RGB Color out Color public static final native int Get Theme Button Content Bounds Rect in Bounds int in Kind Theme Button Draw Info in Draw Info Rect out Bounds  GetTabContentRect theControl GetThemeBrushAsColor inBrush inDepth inColorDev RGBColor outColor GetThemeButtonContentBounds inBounds inKind ThemeButtonDrawInfo inDrawInfo outBounds
public static final native int Get Theme Brush As Color short in Brush short in Depth boolean in Color Dev RGB Color out Color public static final native int Get Theme Button Content Bounds Rect in Bounds int in Kind Theme Button Draw Info in Draw Info Rect out Bounds public static final native int Get Theme Drawing State int state  GetThemeBrushAsColor inBrush inDepth inColorDev RGBColor outColor GetThemeButtonContentBounds inBounds inKind ThemeButtonDrawInfo inDrawInfo outBounds GetThemeDrawingState
public static final native int Get Theme Button Content Bounds Rect in Bounds int in Kind Theme Button Draw Info in Draw Info Rect out Bounds public static final native int Get Theme Drawing State int state public static final native int Get Theme Font short theme Font Id short script Code byte font Name short font Size byte style  GetThemeButtonContentBounds inBounds inKind ThemeButtonDrawInfo inDrawInfo outBounds GetThemeDrawingState GetThemeFont themeFontId scriptCode fontName fontSize
public static final native int Get Theme Drawing State int state public static final native int Get Theme Font short theme Font Id short script Code byte font Name short font Size byte style public static final native int Get Theme Menu Item Extra short in Item Type short out Height short out Width  GetThemeDrawingState GetThemeFont themeFontId scriptCode fontName fontSize GetThemeMenuItemExtra inItemType outHeight outWidth
public static final native int Get Theme Font short theme Font Id short script Code byte font Name short font Size byte style public static final native int Get Theme Menu Item Extra short in Item Type short out Height short out Width public static final native int Get Theme Metric int in Metric int out Metric  GetThemeFont themeFontId scriptCode fontName fontSize GetThemeMenuItemExtra inItemType outHeight outWidth GetThemeMetric inMetric outMetric
public static final native int Get Theme Menu Item Extra short in Item Type short out Height short out Width public static final native int Get Theme Metric int in Metric int out Metric public static final native int Get Theme Text Color short in Color short in Depth boolean in Color Dev RGB Color out Color  GetThemeMenuItemExtra inItemType outHeight outWidth GetThemeMetric inMetric outMetric GetThemeTextColor inColor inDepth inColorDev RGBColor outColor
public static final native int Get Theme Metric int in Metric int out Metric public static final native int Get Theme Text Color short in Color short in Depth boolean in Color Dev RGB Color out Color public static final native int Get Theme Text Dimensions int s Handle short fontID int state boolean wrap To Width Point io Bounds short base Line  GetThemeMetric inMetric outMetric GetThemeTextColor inColor inDepth inColorDev RGBColor outColor GetThemeTextDimensions sHandle wrapToWidth ioBounds baseLine
public static final native int Get Theme Text Color short in Color short in Depth boolean in Color Dev RGB Color out Color public static final native int Get Theme Text Dimensions int s Handle short fontID int state boolean wrap To Width Point io Bounds short base Line public static final native int Get User Focus Event Target  GetThemeTextColor inColor inDepth inColorDev RGBColor outColor GetThemeTextDimensions sHandle wrapToWidth ioBounds baseLine GetUserFocusEventTarget
public static final native int Get Theme Text Dimensions int s Handle short fontID int state boolean wrap To Width Point io Bounds short base Line public static final native int Get User Focus Event Target public static final native int Get User Focus Window  GetThemeTextDimensions sHandle wrapToWidth ioBounds baseLine GetUserFocusEventTarget GetUserFocusWindow
public static final native int Get User Focus Event Target public static final native int Get User Focus Window public static final native int GetW Ref Con int w Handle  GetUserFocusEventTarget GetUserFocusWindow GetWRefCon wHandle
public static final native int Get User Focus Window public static final native int GetW Ref Con int w Handle public static final native int Get Window Activation Scope int in Window int out Scope  GetUserFocusWindow GetWRefCon wHandle GetWindowActivationScope inWindow outScope
public static final native int GetW Ref Con int w Handle public static final native int Get Window Activation Scope int in Window int out Scope public static final native void Get Window Bounds int w Handle short window Region Rect bounds  GetWRefCon wHandle GetWindowActivationScope inWindow outScope GetWindowBounds wHandle windowRegion
public static final native int Get Window Activation Scope int in Window int out Scope public static final native void Get Window Bounds int w Handle short window Region Rect bounds public static final native int Get Window Default Button int w Handle int c Handle  GetWindowActivationScope inWindow outScope GetWindowBounds wHandle windowRegion GetWindowDefaultButton wHandle cHandle
public static final native void Get Window Bounds int w Handle short window Region Rect bounds public static final native int Get Window Default Button int w Handle int c Handle public static final native int Get Window Event Target int w Handle  GetWindowBounds wHandle windowRegion GetWindowDefaultButton wHandle cHandle GetWindowEventTarget wHandle
public static final native int Get Window Default Button int w Handle int c Handle public static final native int Get Window Event Target int w Handle public static final native int Get Window From Port int p Handle  GetWindowDefaultButton wHandle cHandle GetWindowEventTarget wHandle GetWindowFromPort pHandle
public static final native int Get Window Event Target int w Handle public static final native int Get Window From Port int p Handle public static final native int Get Window Group Of Class int window Class  GetWindowEventTarget wHandle GetWindowFromPort pHandle GetWindowGroupOfClass windowClass
public static final native int Get Window From Port int p Handle public static final native int Get Window Group Of Class int window Class public static final native int Get Window Modality int in Window int out Modal Kind int out Unavailable Window  GetWindowFromPort pHandle GetWindowGroupOfClass windowClass GetWindowModality inWindow outModalKind outUnavailableWindow
public static final native int Get Window Group Of Class int window Class public static final native int Get Window Modality int in Window int out Modal Kind int out Unavailable Window public static final native int Get Window Port int w Handle  GetWindowGroupOfClass windowClass GetWindowModality inWindow outModalKind outUnavailableWindow GetWindowPort wHandle
public static final native int Get Window Modality int in Window int out Modal Kind int out Unavailable Window public static final native int Get Window Port int w Handle public static final native int Get Window Region int window short in Region Code int io Win Rgn  GetWindowModality inWindow outModalKind outUnavailableWindow GetWindowPort wHandle GetWindowRegion inRegionCode ioWinRgn
public static final native int Get Window Port int w Handle public static final native int Get Window Region int window short in Region Code int io Win Rgn public static final native void Get Window Structure Widths int int Window Rect out Rect  GetWindowPort wHandle GetWindowRegion inRegionCode ioWinRgn GetWindowStructureWidths intWindow outRect
public static final native int Get Window Region int window short in Region Code int io Win Rgn public static final native void Get Window Structure Widths int int Window Rect out Rect public static final native int Handle Control Set Cursor int control Point local Point int modifiers boolean cursor Was Set  GetWindowRegion inRegionCode ioWinRgn GetWindowStructureWidths intWindow outRect HandleControlSetCursor localPoint cursorWasSet
public static final native void Get Window Structure Widths int int Window Rect out Rect public static final native int Handle Control Set Cursor int control Point local Point int modifiers boolean cursor Was Set public static final native int HI Combo Box Append Text Item int in Combo Box int in Text int out Index  GetWindowStructureWidths intWindow outRect HandleControlSetCursor localPoint cursorWasSet HIComboBoxAppendTextItem inComboBox inText outIndex
public static final native int Handle Control Set Cursor int control Point local Point int modifiers boolean cursor Was Set public static final native int HI Combo Box Append Text Item int in Combo Box int in Text int out Index public static final native int HI Combo Box Copy Text Item At Index int in Combo Box int in Index int out String  HandleControlSetCursor localPoint cursorWasSet HIComboBoxAppendTextItem inComboBox inText outIndex HIComboBoxCopyTextItemAtIndex inComboBox inIndex outString
public static final native int HI Combo Box Append Text Item int in Combo Box int in Text int out Index public static final native int HI Combo Box Copy Text Item At Index int in Combo Box int in Index int out String public static final native int HI Combo Box Create CG Rect bounds Rect int text Control Font Style Rec style int list int in Attributes int out Combo Box  HIComboBoxAppendTextItem inComboBox inText outIndex HIComboBoxCopyTextItemAtIndex inComboBox inIndex outString HIComboBoxCreate CGRect boundsRect ControlFontStyleRec inAttributes outComboBox
public static final native int HI Combo Box Copy Text Item At Index int in Combo Box int in Index int out String public static final native int HI Combo Box Create CG Rect bounds Rect int text Control Font Style Rec style int list int in Attributes int out Combo Box public static final native int HI Combo Box Get Item Count int in Combo Box  HIComboBoxCopyTextItemAtIndex inComboBox inIndex outString HIComboBoxCreate CGRect boundsRect ControlFontStyleRec inAttributes outComboBox HIComboBoxGetItemCount inComboBox
public static final native int HI Combo Box Create CG Rect bounds Rect int text Control Font Style Rec style int list int in Attributes int out Combo Box public static final native int HI Combo Box Get Item Count int in Combo Box public static final native int HI Combo Box Insert Text Item At Index int in Combo Box int in Index int in Text  HIComboBoxCreate CGRect boundsRect ControlFontStyleRec inAttributes outComboBox HIComboBoxGetItemCount inComboBox HIComboBoxInsertTextItemAtIndex inComboBox inIndex inText
public static final native int HI Combo Box Get Item Count int in Combo Box public static final native int HI Combo Box Insert Text Item At Index int in Combo Box int in Index int in Text public static final native int HI Combo Box Remove Item At Index int in Combo Box int in Index  HIComboBoxGetItemCount inComboBox HIComboBoxInsertTextItemAtIndex inComboBox inIndex inText HIComboBoxRemoveItemAtIndex inComboBox inIndex
public static final native int HI Combo Box Insert Text Item At Index int in Combo Box int in Index int in Text public static final native int HI Combo Box Remove Item At Index int in Combo Box int in Index public static final native int HI Object Copy ClassID int in Object  HIComboBoxInsertTextItemAtIndex inComboBox inIndex inText HIComboBoxRemoveItemAtIndex inComboBox inIndex HIObjectCopyClassID inObject
public static final native int HI Combo Box Remove Item At Index int in Combo Box int in Index public static final native int HI Object Copy ClassID int in Object public static final native int HI Object Create int in ClassID int in Construct Data int out Object  HIComboBoxRemoveItemAtIndex inComboBox inIndex HIObjectCopyClassID inObject HIObjectCreate inClassID inConstructData outObject
public static final native int HI Object Copy ClassID int in Object public static final native int HI Object Create int in ClassID int in Construct Data int out Object public static final native int HI Object Register Subclass int in ClassID int in Base ClassID int in Options int in Construct Proc int in Num Events int in Event List int in Construct Data int out Class Ref  HIObjectCopyClassID inObject HIObjectCreate inClassID inConstructData outObject HIObjectRegisterSubclass inClassID inBaseClassID inOptions inConstructProc inNumEvents inEventList inConstructData outClassRef
public static final native int HI Object Create int in ClassID int in Construct Data int out Object public static final native int HI Object Register Subclass int in ClassID int in Base ClassID int in Options int in Construct Proc int in Num Events int in Event List int in Construct Data int out Class Ref public static final native int HI View Add Subview int parent int child  HIObjectCreate inClassID inConstructData outObject HIObjectRegisterSubclass inClassID inBaseClassID inOptions inConstructProc inNumEvents inEventList inConstructData outClassRef HIViewAddSubview
public static final native int HI Object Register Subclass int in ClassID int in Base ClassID int in Options int in Construct Proc int in Num Events int in Event List int in Construct Data int out Class Ref public static final native int HI View Add Subview int parent int child public static final native int HI View Click int in View int in Event  HIObjectRegisterSubclass inClassID inBaseClassID inOptions inConstructProc inNumEvents inEventList inConstructData outClassRef HIViewAddSubview HIViewClick inView inEvent
public static final native int HI View Add Subview int parent int child public static final native int HI View Click int in View int in Event public static final native int HI View Convert Point CG Point io Point int in Source View int in Dest View  HIViewAddSubview HIViewClick inView inEvent HIViewConvertPoint CGPoint ioPoint inSourceView inDestView
public static final native int HI View Click int in View int in Event public static final native int HI View Convert Point CG Point io Point int in Source View int in Dest View public static final native int HI View Create Offscreen Image int in View int in Options CG Rect out Frame int out Image  HIViewClick inView inEvent HIViewConvertPoint CGPoint ioPoint inSourceView inDestView HIViewCreateOffscreenImage inView inOptions CGRect outFrame outImage
public static final native int HI View Convert Point CG Point io Point int in Source View int in Dest View public static final native int HI View Create Offscreen Image int in View int in Options CG Rect out Frame int out Image public static final native int HI View Find ByID int in Start View int inID int out Control  HIViewConvertPoint CGPoint ioPoint inSourceView inDestView HIViewCreateOffscreenImage inView inOptions CGRect outFrame outImage HIViewFindByID inStartView outControl
public static final native int HI View Create Offscreen Image int in View int in Options CG Rect out Frame int out Image public static final native int HI View Find ByID int in Start View int inID int out Control public static final native int HI View Get First Subview int in View  HIViewCreateOffscreenImage inView inOptions CGRect outFrame outImage HIViewFindByID inStartView outControl HIViewGetFirstSubview inView
public static final native int HI View Find ByID int in Start View int inID int out Control public static final native int HI View Get First Subview int in View public static final native int HI View Get Last Subview int in View  HIViewFindByID inStartView outControl HIViewGetFirstSubview inView HIViewGetLastSubview inView
public static final native int HI View Get First Subview int in View public static final native int HI View Get Last Subview int in View public static final native int HI View Get Next View int in View  HIViewGetFirstSubview inView HIViewGetLastSubview inView HIViewGetNextView inView
public static final native int HI View Get Last Subview int in View public static final native int HI View Get Next View int in View public static final native int HI View Get Frame int in View CG Rect out Rect  HIViewGetLastSubview inView HIViewGetNextView inView HIViewGetFrame inView CGRect outRect
public static final native int HI View Get Next View int in View public static final native int HI View Get Frame int in View CG Rect out Rect public static final native int HI View Get Root int w Handle  HIViewGetNextView inView HIViewGetFrame inView CGRect outRect HIViewGetRoot wHandle
public static final native int HI View Get Frame int in View CG Rect out Rect public static final native int HI View Get Root int w Handle public static final native int HI View Get Size Constraints int in View CG Rect out Min Size CG Rect out Max Size  HIViewGetFrame inView CGRect outRect HIViewGetRoot wHandle HIViewGetSizeConstraints inView CGRect outMinSize CGRect outMaxSize
public static final native int HI View Get Root int w Handle public static final native int HI View Get Size Constraints int in View CG Rect out Min Size CG Rect out Max Size public static final native int HI View Get Subview Hit int in View CG Point in Point boolean in Deep int out View  HIViewGetRoot wHandle HIViewGetSizeConstraints inView CGRect outMinSize CGRect outMaxSize HIViewGetSubviewHit inView CGPoint inPoint inDeep outView
public static final native int HI View Get Size Constraints int in View CG Rect out Min Size CG Rect out Max Size public static final native int HI View Get Subview Hit int in View CG Point in Point boolean in Deep int out View public static final native int HI View Get View For Mouse Event int in View int in Event int out View  HIViewGetSizeConstraints inView CGRect outMinSize CGRect outMaxSize HIViewGetSubviewHit inView CGPoint inPoint inDeep outView HIViewGetViewForMouseEvent inView inEvent outView
public static final native int HI View Get Subview Hit int in View CG Point in Point boolean in Deep int out View public static final native int HI View Get View For Mouse Event int in View int in Event int out View public static final native boolean HI View Is Visible int in View  HIViewGetSubviewHit inView CGPoint inPoint inDeep outView HIViewGetViewForMouseEvent inView inEvent outView HIViewIsVisible inView
public static final native int HI View Get View For Mouse Event int in View int in Event int out View public static final native boolean HI View Is Visible int in View public static final native int HI View Remove From Superview int in View  HIViewGetViewForMouseEvent inView inEvent outView HIViewIsVisible inView HIViewRemoveFromSuperview inView
public static final native boolean HI View Is Visible int in View public static final native int HI View Remove From Superview int in View public static final native int HI View Set Bounds Origin int in View float inX float inY  HIViewIsVisible inView HIViewRemoveFromSuperview inView HIViewSetBoundsOrigin inView
public static final native int HI View Remove From Superview int in View public static final native int HI View Set Bounds Origin int in View float inX float inY public static final native int HI View Set Drawing Enabled int in View boolean is Enabled  HIViewRemoveFromSuperview inView HIViewSetBoundsOrigin inView HIViewSetDrawingEnabled inView isEnabled
public static final native int HI View Set Bounds Origin int in View float inX float inY public static final native int HI View Set Drawing Enabled int in View boolean is Enabled public static final native int HI View Set Frame int in View CG Rect in Rect  HIViewSetBoundsOrigin inView HIViewSetDrawingEnabled inView isEnabled HIViewSetFrame inView CGRect inRect
public static final native int HI View Set Drawing Enabled int in View boolean is Enabled public static final native int HI View Set Frame int in View CG Rect in Rect public static final native int HI View Set Needs Display int in View boolean in Needs Display  HIViewSetDrawingEnabled inView isEnabled HIViewSetFrame inView CGRect inRect HIViewSetNeedsDisplay inView inNeedsDisplay
public static final native int HI View Set Frame int in View CG Rect in Rect public static final native int HI View Set Needs Display int in View boolean in Needs Display public static final native int HI View Set Needs Display In Region int in View int in Rgn boolean in Needs Display  HIViewSetFrame inView CGRect inRect HIViewSetNeedsDisplay inView inNeedsDisplay HIViewSetNeedsDisplayInRegion inView inRgn inNeedsDisplay
public static final native int HI View Set Needs Display int in View boolean in Needs Display public static final native int HI View Set Needs Display In Region int in View int in Rgn boolean in Needs Display public static final native int HI View Set Visible int in View boolean in Visible  HIViewSetNeedsDisplay inView inNeedsDisplay HIViewSetNeedsDisplayInRegion inView inRgn inNeedsDisplay HIViewSetVisible inView inVisible
public static final native int HI View Set Needs Display In Region int in View int in Rgn boolean in Needs Display public static final native int HI View Set Visible int in View boolean in Visible public static final native int HI View SetZ Order int in View int in Op int in Other  HIViewSetNeedsDisplayInRegion inView inRgn inNeedsDisplay HIViewSetVisible inView inVisible HIViewSetZOrder inView inOp inOther
public static final native int HI View Set Visible int in View boolean in Visible public static final native int HI View SetZ Order int in View int in Op int in Other public static final native int HI View Simulate Click int in View short in Part To Click int modifiers short out Part Clicked  HIViewSetVisible inView inVisible HIViewSetZOrder inView inOp inOther HIViewSimulateClick inView inPartToClick outPartClicked
public static final native int HI View SetZ Order int in View int in Op int in Other public static final native int HI View Simulate Click int in View short in Part To Click int modifiers short out Part Clicked public static final native short Handle Control Click int c Handle Point where int modifiers int actionUPP  HIViewSetZOrder inView inOp inOther HIViewSimulateClick inView inPartToClick outPartClicked HandleControlClick cHandle
public static final native int HI View Simulate Click int in View short in Part To Click int modifiers short out Part Clicked public static final native short Handle Control Click int c Handle Point where int modifiers int actionUPP public static final native short Hi Word int double Word  HIViewSimulateClick inView inPartToClick outPartClicked HandleControlClick cHandle HiWord doubleWord
public static final native short Handle Control Click int c Handle Point where int modifiers int actionUPP public static final native short Hi Word int double Word public static final native void Hide Window int w Handle  HandleControlClick cHandle HiWord doubleWord HideWindow wHandle
public static final native short Hi Word int double Word public static final native void Hide Window int w Handle public static final native void Hilite Menu short menuID  HiWord doubleWord HideWindow wHandle HiliteMenu
public static final native void Hide Window int w Handle public static final native void Hilite Menu short menuID public static final native void H Lock int h  HideWindow wHandle HiliteMenu HLock
public static final native void Hilite Menu short menuID public static final native void H Lock int h public static final native int HM Get Tag Delay int out Delay  HiliteMenu HLock HMGetTagDelay outDelay
public static final native void H Lock int h public static final native int HM Get Tag Delay int out Delay public static final native int HM Hide Tag  HLock HMGetTagDelay outDelay HMHideTag
public static final native int HM Get Tag Delay int out Delay public static final native int HM Hide Tag public static final native int HM Set Tag Delay int in Delay  HMGetTagDelay outDelay HMHideTag HMSetTagDelay inDelay
public static final native int HM Hide Tag public static final native int HM Set Tag Delay int in Delay public static final native void HM Install Control Content Callback int in Control int in ContentUPP  HMHideTag HMSetTagDelay inDelay HMInstallControlContentCallback inControl inContentUPP
public static final native int HM Set Tag Delay int in Delay public static final native void HM Install Control Content Callback int in Control int in ContentUPP public static final native void H Unlock int h  HMSetTagDelay inDelay HMInstallControlContentCallback inControl inContentUPP HUnlock
public static final native void HM Install Control Content Callback int in Control int in ContentUPP public static final native void H Unlock int h public static final native int Icon Ref To Icon Family int the Icon Ref int which Icons int icon Family  HMInstallControlContentCallback inControl inContentUPP HUnlock IconRefToIconFamily theIconRef whichIcons iconFamily
public static final native void H Unlock int h public static final native int Icon Ref To Icon Family int the Icon Ref int which Icons int icon Family public static final native int Init Contextual Menus  HUnlock IconRefToIconFamily theIconRef whichIcons iconFamily InitContextualMenus
public static final native int Icon Ref To Icon Family int the Icon Ref int which Icons int icon Family public static final native int Init Contextual Menus public static final native void Init Cursor  IconRefToIconFamily theIconRef whichIcons iconFamily InitContextualMenus InitCursor
public static final native int Init Contextual Menus public static final native void Init Cursor public static final native int Init Data Browser Callbacks Data Browser Callbacks callbacks  InitContextualMenus InitCursor InitDataBrowserCallbacks DataBrowserCallbacks
public static final native void Init Cursor public static final native int Init Data Browser Callbacks Data Browser Callbacks callbacks public static final native int Init Data Browser Custom Callbacks Data Browser Custom Callbacks callbacks  InitCursor InitDataBrowserCallbacks DataBrowserCallbacks InitDataBrowserCustomCallbacks DataBrowserCustomCallbacks
public static final native int Init Data Browser Callbacks Data Browser Callbacks callbacks public static final native int Init Data Browser Custom Callbacks Data Browser Custom Callbacks callbacks public static final native void Insert Menu int m Handle short beforeID  InitDataBrowserCallbacks DataBrowserCallbacks InitDataBrowserCustomCallbacks DataBrowserCustomCallbacks InsertMenu mHandle
public static final native int Init Data Browser Custom Callbacks Data Browser Custom Callbacks callbacks public static final native void Insert Menu int m Handle short beforeID public static final native int Insert Menu Item Text WithCF String int m Handle int s Handle short index int attributes int commandID  InitDataBrowserCustomCallbacks DataBrowserCustomCallbacks InsertMenu mHandle InsertMenuItemTextWithCFString mHandle sHandle
public static final native void Insert Menu int m Handle short beforeID public static final native int Insert Menu Item Text WithCF String int m Handle int s Handle short index int attributes int commandID public static final native int Install Event Handler int in Target int in Handler int in Num Types int in List int in User Data int out Ref  InsertMenu mHandle InsertMenuItemTextWithCFString mHandle sHandle InstallEventHandler inTarget inHandler inNumTypes inList inUserData outRef
public static final native int Insert Menu Item Text WithCF String int m Handle int s Handle short index int attributes int commandID public static final native int Install Event Handler int in Target int in Handler int in Num Types int in List int in User Data int out Ref public static final native int Install Event Loop Timer int in Event Loop double in Fire Delay double in Interval int in Timer Proc int in Timer Data int out Timer  InsertMenuItemTextWithCFString mHandle sHandle InstallEventHandler inTarget inHandler inNumTypes inList inUserData outRef InstallEventLoopTimer inEventLoop inFireDelay inInterval inTimerProc inTimerData outTimer
public static final native int Install Event Handler int in Target int in Handler int in Num Types int in List int in User Data int out Ref public static final native int Install Event Loop Timer int in Event Loop double in Fire Delay double in Interval int in Timer Proc int in Timer Data int out Timer public static final native int Install Receive Handler int receive Handler int the Window int handler Ref Con  InstallEventHandler inTarget inHandler inNumTypes inList inUserData outRef InstallEventLoopTimer inEventLoop inFireDelay inInterval inTimerProc inTimerData outTimer InstallReceiveHandler receiveHandler theWindow handlerRefCon
public static final native int Install Event Loop Timer int in Event Loop double in Fire Delay double in Interval int in Timer Proc int in Timer Data int out Timer public static final native int Install Receive Handler int receive Handler int the Window int handler Ref Con public static final native int Install Tracking Handler int tracking Handler int the Window int handler Ref Con  InstallEventLoopTimer inEventLoop inFireDelay inInterval inTimerProc inTimerData outTimer InstallReceiveHandler receiveHandler theWindow handlerRefCon InstallTrackingHandler trackingHandler theWindow handlerRefCon
public static final native int Install Receive Handler int receive Handler int the Window int handler Ref Con public static final native int Install Tracking Handler int tracking Handler int the Window int handler Ref Con public static final native void Inval Window Rect int w Handle Rect bounds  InstallReceiveHandler receiveHandler theWindow handlerRefCon InstallTrackingHandler trackingHandler theWindow handlerRefCon InvalWindowRect wHandle
public static final native int Install Tracking Handler int tracking Handler int the Window int handler Ref Con public static final native void Inval Window Rect int w Handle Rect bounds public static final native void Inval Window Rgn int w Handle int rgn Handle  InstallTrackingHandler trackingHandler theWindow handlerRefCon InvalWindowRect wHandle InvalWindowRgn wHandle rgnHandle
public static final native void Inval Window Rect int w Handle Rect bounds public static final native void Inval Window Rgn int w Handle int rgn Handle public static final native void Invert Rect Rect r  InvalWindowRect wHandle InvalWindowRgn wHandle rgnHandle InvertRect
public static final native void Inval Window Rgn int w Handle int rgn Handle public static final native void Invert Rect Rect r public static final native void Invert Rgn int rgn Handle  InvalWindowRgn wHandle rgnHandle InvertRect InvertRgn rgnHandle
public static final native void Invert Rect Rect r public static final native void Invert Rgn int rgn Handle public static final native boolean Is Control Active int in Control  InvertRect InvertRgn rgnHandle IsControlActive inControl
public static final native void Invert Rgn int rgn Handle public static final native boolean Is Control Active int in Control public static final native boolean Is Control Enabled int c Handle  InvertRgn rgnHandle IsControlActive inControl IsControlEnabled cHandle
public static final native boolean Is Control Active int in Control public static final native boolean Is Control Enabled int c Handle public static final native boolean Is Control Visible int c Handle  IsControlActive inControl IsControlEnabled cHandle IsControlVisible cHandle
public static final native boolean Is Control Enabled int c Handle public static final native boolean Is Control Visible int c Handle public static final native boolean Is Data Browser Item Selected int c Handle int itemID  IsControlEnabled cHandle IsControlVisible cHandle IsDataBrowserItemSelected cHandle
public static final native boolean Is Control Visible int c Handle public static final native boolean Is Data Browser Item Selected int c Handle int itemID public static final native boolean Is Menu Command Enabled int m Handle int command Id  IsControlVisible cHandle IsDataBrowserItemSelected cHandle IsMenuCommandEnabled mHandle commandId
public static final native boolean Is Data Browser Item Selected int c Handle int itemID public static final native boolean Is Menu Command Enabled int m Handle int command Id public static final native boolean Is Menu Item Enabled int m Handle short index  IsDataBrowserItemSelected cHandle IsMenuCommandEnabled mHandle commandId IsMenuItemEnabled mHandle
public static final native boolean Is Menu Command Enabled int m Handle int command Id public static final native boolean Is Menu Item Enabled int m Handle short index public static final native boolean Is Valid Control Handle int c Handle  IsMenuCommandEnabled mHandle commandId IsMenuItemEnabled mHandle IsValidControlHandle cHandle
public static final native boolean Is Menu Item Enabled int m Handle short index public static final native boolean Is Valid Control Handle int c Handle public static final native boolean Is Valid Menu int m Handle  IsMenuItemEnabled mHandle IsValidControlHandle cHandle IsValidMenu mHandle
public static final native boolean Is Valid Control Handle int c Handle public static final native boolean Is Valid Menu int m Handle public static final native boolean Is Valid Window Ptr int graf Port  IsValidControlHandle cHandle IsValidMenu mHandle IsValidWindowPtr grafPort
public static final native boolean Is Valid Menu int m Handle public static final native boolean Is Valid Window Ptr int graf Port public static final native boolean Is Window Active int window  IsValidMenu mHandle IsValidWindowPtr grafPort IsWindowActive
public static final native boolean Is Valid Window Ptr int graf Port public static final native boolean Is Window Active int window public static final native boolean Is Window Collapsed int window  IsValidWindowPtr grafPort IsWindowActive IsWindowCollapsed
public static final native boolean Is Window Active int window public static final native boolean Is Window Collapsed int window public static final native boolean Is Window Visible int window  IsWindowActive IsWindowCollapsed IsWindowVisible
public static final native boolean Is Window Collapsed int window public static final native boolean Is Window Visible int window public static final native int Key Translate int trans Data short keycode int state  IsWindowCollapsed IsWindowVisible KeyTranslate transData
public static final native boolean Is Window Visible int window public static final native int Key Translate int trans Data short keycode int state public static final native void Kill Poly int poly Handle  IsWindowVisible KeyTranslate transData KillPoly polyHandle
public static final native int Key Translate int trans Data short keycode int state public static final native void Kill Poly int poly Handle public static final native void Line To short h short v  KeyTranslate transData KillPoly polyHandle LineTo
public static final native void Kill Poly int poly Handle public static final native void Line To short h short v public static final native int Long2 Fix int x  KillPoly polyHandle LineTo Long2Fix
public static final native void Line To short h short v public static final native int Long2 Fix int x public static final native short Lo Word int double Word  LineTo Long2Fix LoWord doubleWord
public static final native int Long2 Fix int x public static final native short Lo Word int double Word public static final native int Lock Port Bits int port Handle  Long2Fix LoWord doubleWord LockPortBits portHandle
public static final native short Lo Word int double Word public static final native int Lock Port Bits int port Handle public static final native int Menu Select Point m Handle  LoWord doubleWord LockPortBits portHandle MenuSelect mHandle
public static final native int Lock Port Bits int port Handle public static final native int Menu Select Point m Handle public static final native void Move Control int the Control short h short v  LockPortBits portHandle MenuSelect mHandle MoveControl theControl
public static final native int Menu Select Point m Handle public static final native void Move Control int the Control short h short v public static final native void Move To short h short v  MenuSelect mHandle MoveControl theControl MoveTo
public static final native void Move Control int the Control short h short v public static final native void Move To short h short v public static final native void Move Window int w Handle short h short v boolean to Front  MoveControl theControl MoveTo MoveWindow wHandle toFront
public static final native void Move To short h short v public static final native void Move Window int w Handle short h short v boolean to Front public static final native int Nav Create Choose Folder Dialog Nav Dialog Creation Options in Options int in Event Proc int in Filter Proc int in Client Data int out Dialog  MoveTo MoveWindow wHandle toFront NavCreateChooseFolderDialog NavDialogCreationOptions inOptions inEventProc inFilterProc inClientData outDialog
public static final native void Move Window int w Handle short h short v boolean to Front public static final native int Nav Create Choose Folder Dialog Nav Dialog Creation Options in Options int in Event Proc int in Filter Proc int in Client Data int out Dialog public static final native int Nav Create Get File Dialog Nav Dialog Creation Options in Options int in Type List int in Event Proc int in Preview Proc int in Filter Proc int in Client Data int out Dialog  MoveWindow wHandle toFront NavCreateChooseFolderDialog NavDialogCreationOptions inOptions inEventProc inFilterProc inClientData outDialog NavCreateGetFileDialog NavDialogCreationOptions inOptions inTypeList inEventProc inPreviewProc inFilterProc inClientData outDialog
public static final native int Nav Create Choose Folder Dialog Nav Dialog Creation Options in Options int in Event Proc int in Filter Proc int in Client Data int out Dialog public static final native int Nav Create Get File Dialog Nav Dialog Creation Options in Options int in Type List int in Event Proc int in Preview Proc int in Filter Proc int in Client Data int out Dialog public static final native int Nav Create Put File Dialog Nav Dialog Creation Options in Options int in File Type int in File Creator int in Event Proc int in Client Data int out Dialog  NavCreateChooseFolderDialog NavDialogCreationOptions inOptions inEventProc inFilterProc inClientData outDialog NavCreateGetFileDialog NavDialogCreationOptions inOptions inTypeList inEventProc inPreviewProc inFilterProc inClientData outDialog NavCreatePutFileDialog NavDialogCreationOptions inOptions inFileType inFileCreator inEventProc inClientData outDialog
public static final native int Nav Create Get File Dialog Nav Dialog Creation Options in Options int in Type List int in Event Proc int in Preview Proc int in Filter Proc int in Client Data int out Dialog public static final native int Nav Create Put File Dialog Nav Dialog Creation Options in Options int in File Type int in File Creator int in Event Proc int in Client Data int out Dialog public static final native void Nav Dialog Dispose int dialog Handle  NavCreateGetFileDialog NavDialogCreationOptions inOptions inTypeList inEventProc inPreviewProc inFilterProc inClientData outDialog NavCreatePutFileDialog NavDialogCreationOptions inOptions inFileType inFileCreator inEventProc inClientData outDialog NavDialogDispose dialogHandle
public static final native int Nav Create Put File Dialog Nav Dialog Creation Options in Options int in File Type int in File Creator int in Event Proc int in Client Data int out Dialog public static final native void Nav Dialog Dispose int dialog Handle public static final native int Nav Dialog Get Save File Name int dialog Handle  NavCreatePutFileDialog NavDialogCreationOptions inOptions inFileType inFileCreator inEventProc inClientData outDialog NavDialogDispose dialogHandle NavDialogGetSaveFileName dialogHandle
public static final native void Nav Dialog Dispose int dialog Handle public static final native int Nav Dialog Get Save File Name int dialog Handle public static final native int Nav Dialog Get User Action int dialog Handle  NavDialogDispose dialogHandle NavDialogGetSaveFileName dialogHandle NavDialogGetUserAction dialogHandle
public static final native int Nav Dialog Get Save File Name int dialog Handle public static final native int Nav Dialog Get User Action int dialog Handle public static final native int Nav Dialog Run int dialog Handle  NavDialogGetSaveFileName dialogHandle NavDialogGetUserAction dialogHandle NavDialogRun dialogHandle
public static final native int Nav Dialog Get User Action int dialog Handle public static final native int Nav Dialog Run int dialog Handle public static final native int Nav Dialog Set Save File Name int dialog Handle int file Name Handle  NavDialogGetUserAction dialogHandle NavDialogRun dialogHandle NavDialogSetSaveFileName dialogHandle fileNameHandle
public static final native int Nav Dialog Run int dialog Handle public static final native int Nav Dialog Set Save File Name int dialog Handle int file Name Handle public static final native int Nav Get Default Dialog Creation Options Nav Dialog Creation Options out Options  NavDialogRun dialogHandle NavDialogSetSaveFileName dialogHandle fileNameHandle NavGetDefaultDialogCreationOptions NavDialogCreationOptions outOptions
public static final native int Nav Dialog Set Save File Name int dialog Handle int file Name Handle public static final native int Nav Get Default Dialog Creation Options Nav Dialog Creation Options out Options public static final native int Nav Dialog Get Reply int in Dialog Nav Reply Record out Reply  NavDialogSetSaveFileName dialogHandle fileNameHandle NavGetDefaultDialogCreationOptions NavDialogCreationOptions outOptions NavDialogGetReply inDialog NavReplyRecord outReply
public static final native int Nav Get Default Dialog Creation Options Nav Dialog Creation Options out Options public static final native int Nav Dialog Get Reply int in Dialog Nav Reply Record out Reply public static final native int New Control int owning Window Rect bounds Rect byte control Title boolean initially Visible short initial Value short minimum Value short maximum Value short procID int control Reference  NavGetDefaultDialogCreationOptions NavDialogCreationOptions outOptions NavDialogGetReply inDialog NavReplyRecord outReply NewControl owningWindow boundsRect controlTitle initiallyVisible initialValue minimumValue maximumValue controlReference
public static final native int Nav Dialog Get Reply int in Dialog Nav Reply Record out Reply public static final native int New Control int owning Window Rect bounds Rect byte control Title boolean initially Visible short initial Value short minimum Value short maximum Value short procID int control Reference public static final native int New Drag int the Drag  NavDialogGetReply inDialog NavReplyRecord outReply NewControl owningWindow boundsRect controlTitle initiallyVisible initialValue minimumValue maximumValue controlReference NewDrag theDrag
public static final native int New Control int owning Window Rect bounds Rect byte control Title boolean initially Visible short initial Value short minimum Value short maximum Value short procID int control Reference public static final native int New Drag int the Drag public static final native int NewG World From Ptr int offscreenG World int Pixel Format Rect bounds Rect int c Table int aG Device int flags int new Buffer int row Bytes  NewControl owningWindow boundsRect controlTitle initiallyVisible initialValue minimumValue maximumValue controlReference NewDrag theDrag NewGWorldFromPtr offscreenGWorld PixelFormat boundsRect cTable aGDevice newBuffer rowBytes
public static final native int New Drag int the Drag public static final native int NewG World From Ptr int offscreenG World int Pixel Format Rect bounds Rect int c Table int aG Device int flags int new Buffer int row Bytes public static final native int New Handle int size  NewDrag theDrag NewGWorldFromPtr offscreenGWorld PixelFormat boundsRect cTable aGDevice newBuffer rowBytes NewHandle
public static final native int NewG World From Ptr int offscreenG World int Pixel Format Rect bounds Rect int c Table int aG Device int flags int new Buffer int row Bytes public static final native int New Handle int size public static final native int New Handle Clear int size  NewGWorldFromPtr offscreenGWorld PixelFormat boundsRect cTable aGDevice newBuffer rowBytes NewHandle NewHandleClear
public static final native int New Handle int size public static final native int New Handle Clear int size public static final native int New Ptr int size  NewHandle NewHandleClear NewPtr
public static final native int New Handle Clear int size public static final native int New Ptr int size public static final native int New Ptr Clear int size  NewHandleClear NewPtr NewPtrClear
public static final native int New Ptr int size public static final native int New Ptr Clear int size public static final native int New Rgn  NewPtr NewPtrClear NewRgn
public static final native int New Ptr Clear int size public static final native int New Rgn public static final native void Offset Rect Rect rect short dh short dv  NewPtrClear NewRgn OffsetRect
public static final native int New Rgn public static final native void Offset Rect Rect rect short dh short dv public static final native void Offset Rgn int rgn Handle short dh short dv  NewRgn OffsetRect OffsetRgn rgnHandle
public static final native void Offset Rect Rect rect short dh short dv public static final native void Offset Rgn int rgn Handle short dh short dv public static final native int Open Data Browser Container int c Handle int container  OffsetRect OffsetRgn rgnHandle OpenDataBrowserContainer cHandle
public static final native void Offset Rgn int rgn Handle short dh short dv public static final native int Open Data Browser Container int c Handle int container public static final native int Open Poly  OffsetRgn rgnHandle OpenDataBrowserContainer cHandle OpenPoly
public static final native int Open Data Browser Container int c Handle int container public static final native int Open Poly public static final native void Open Rgn  OpenDataBrowserContainer cHandle OpenPoly OpenRgn
public static final native int Open Poly public static final native void Open Rgn public static final native void Paint Oval Rect bounds  OpenPoly OpenRgn PaintOval
public static final native void Open Rgn public static final native void Paint Oval Rect bounds public static final native void Paint Poly int poly Handle  OpenRgn PaintOval PaintPoly polyHandle
public static final native void Paint Oval Rect bounds public static final native void Paint Poly int poly Handle public static final native void Paint Rect Rect bounds  PaintOval PaintPoly polyHandle PaintRect
public static final native void Paint Poly int poly Handle public static final native void Paint Rect Rect bounds public static final native void Paint Round Rect Rect bounds short oval Width short oval Height  PaintPoly polyHandle PaintRect PaintRoundRect ovalWidth ovalHeight
public static final native void Paint Rect Rect bounds public static final native void Paint Round Rect Rect bounds short oval Width short oval Height public static final native void Pen Size short h short v  PaintRect PaintRoundRect ovalWidth ovalHeight PenSize
public static final native void Paint Round Rect Rect bounds short oval Width short oval Height public static final native void Pen Size short h short v public static final native int Pick Color Color Picker Info the Color Info  PaintRoundRect ovalWidth ovalHeight PenSize PickColor ColorPickerInfo theColorInfo
public static final native void Pen Size short h short v public static final native int Pick Color Color Picker Info the Color Info public static final native int Pop Up Menu Select int m Handle short top short left short pop Up Item  PenSize PickColor ColorPickerInfo theColorInfo PopUpMenuSelect mHandle popUpItem
public static final native int Pick Color Color Picker Info the Color Info public static final native int Pop Up Menu Select int m Handle short top short left short pop Up Item public static final native int Post Event short event Num int event Msg  PickColor ColorPickerInfo theColorInfo PopUpMenuSelect mHandle popUpItem PostEvent eventNum eventMsg
public static final native int Pop Up Menu Select int m Handle short top short left short pop Up Item public static final native int Post Event short event Num int event Msg public static final native int Post Event To Queue int in Queue int in Event short in Priority  PopUpMenuSelect mHandle popUpItem PostEvent eventNum eventMsg PostEventToQueue inQueue inEvent inPriority
public static final native int Post Event short event Num int event Msg public static final native int Post Event To Queue int in Queue int in Event short in Priority public static final native int PM Create Page Format int page Format  PostEvent eventNum eventMsg PostEventToQueue inQueue inEvent inPriority PMCreatePageFormat pageFormat
public static final native int Post Event To Queue int in Queue int in Event short in Priority public static final native int PM Create Page Format int page Format public static final native int PM Create Print Settings int print Settings  PostEventToQueue inQueue inEvent inPriority PMCreatePageFormat pageFormat PMCreatePrintSettings printSettings
public static final native int PM Create Page Format int page Format public static final native int PM Create Print Settings int print Settings public static final native int PM Create Session int print Session  PMCreatePageFormat pageFormat PMCreatePrintSettings printSettings PMCreateSession printSession
public static final native int PM Create Print Settings int print Settings public static final native int PM Create Session int print Session public static final native int PM Flatten Page Format int page Format int flat Format  PMCreatePrintSettings printSettings PMCreateSession printSession PMFlattenPageFormat pageFormat flatFormat
public static final native int PM Create Session int print Session public static final native int PM Flatten Page Format int page Format int flat Format public static final native int PM Flatten Print Settings int print Settings int flat Settings  PMCreateSession printSession PMFlattenPageFormat pageFormat flatFormat PMFlattenPrintSettings printSettings flatSettings
public static final native int PM Flatten Page Format int page Format int flat Format public static final native int PM Flatten Print Settings int print Settings int flat Settings public static final native int PM Get Adjusted Page Rect int page Format PM Rect page Rect  PMFlattenPageFormat pageFormat flatFormat PMFlattenPrintSettings printSettings flatSettings PMGetAdjustedPageRect pageFormat PMRect pageRect
public static final native int PM Flatten Print Settings int print Settings int flat Settings public static final native int PM Get Adjusted Page Rect int page Format PM Rect page Rect public static final native int PM Get Adjusted Paper Rect int page Format PM Rect paper Rect  PMFlattenPrintSettings printSettings flatSettings PMGetAdjustedPageRect pageFormat PMRect pageRect PMGetAdjustedPaperRect pageFormat PMRect paperRect
public static final native int PM Get Adjusted Page Rect int page Format PM Rect page Rect public static final native int PM Get Adjusted Paper Rect int page Format PM Rect paper Rect public static final native int PM Get Collate int print Settings boolean collate  PMGetAdjustedPageRect pageFormat PMRect pageRect PMGetAdjustedPaperRect pageFormat PMRect paperRect PMGetCollate printSettings
public static final native int PM Get Adjusted Paper Rect int page Format PM Rect paper Rect public static final native int PM Get Collate int print Settings boolean collate public static final native int PM Get Copies int print Settings int copies  PMGetAdjustedPaperRect pageFormat PMRect paperRect PMGetCollate printSettings PMGetCopies printSettings
public static final native int PM Get Collate int print Settings boolean collate public static final native int PM Get Copies int print Settings int copies public static final native int PM Get First Page int print Settings int first  PMGetCollate printSettings PMGetCopies printSettings PMGetFirstPage printSettings
public static final native int PM Get Copies int print Settings int copies public static final native int PM Get First Page int print Settings int first public static final native int PM Get Job NameCF String int print Settings int name  PMGetCopies printSettings PMGetFirstPage printSettings PMGetJobNameCFString printSettings
public static final native int PM Get First Page int print Settings int first public static final native int PM Get Job NameCF String int print Settings int name public static final native int PM Get Last Page int print Settings int last  PMGetFirstPage printSettings PMGetJobNameCFString printSettings PMGetLastPage printSettings
public static final native int PM Get Job NameCF String int print Settings int name public static final native int PM Get Last Page int print Settings int last public static final native int PM Get Page Range int print Settings int min Page int max Page  PMGetJobNameCFString printSettings PMGetLastPage printSettings PMGetPageRange printSettings minPage maxPage
public static final native int PM Get Last Page int print Settings int last public static final native int PM Get Page Range int print Settings int min Page int max Page public static final native int PM Release int print Manager Object  PMGetLastPage printSettings PMGetPageRange printSettings minPage maxPage PMRelease printManagerObject
public static final native int PM Get Page Range int print Settings int min Page int max Page public static final native int PM Release int print Manager Object public static final native int PM Get Resolution int page Format PM Resolution resolution  PMGetPageRange printSettings minPage maxPage PMRelease printManagerObject PMGetResolution pageFormat PMResolution
public static final native int PM Release int print Manager Object public static final native int PM Get Resolution int page Format PM Resolution resolution public static final native int PM Session Begin Document No Dialog int print Session int print Settings int page Format  PMRelease printManagerObject PMGetResolution pageFormat PMResolution PMSessionBeginDocumentNoDialog printSession printSettings pageFormat
public static final native int PM Get Resolution int page Format PM Resolution resolution public static final native int PM Session Begin Document No Dialog int print Session int print Settings int page Format public static final native int PM Session Begin Page No Dialog int print Session int page Format PM Rect page Frame  PMGetResolution pageFormat PMResolution PMSessionBeginDocumentNoDialog printSession printSettings pageFormat PMSessionBeginPageNoDialog printSession pageFormat PMRect pageFrame
public static final native int PM Session Begin Document No Dialog int print Session int print Settings int page Format public static final native int PM Session Begin Page No Dialog int print Session int page Format PM Rect page Frame public static final native int PM Session Copy Destination Location int print Session int print Settings int dest LocationP  PMSessionBeginDocumentNoDialog printSession printSettings pageFormat PMSessionBeginPageNoDialog printSession pageFormat PMRect pageFrame PMSessionCopyDestinationLocation printSession printSettings destLocationP
public static final native int PM Session Begin Page No Dialog int print Session int page Format PM Rect page Frame public static final native int PM Session Copy Destination Location int print Session int print Settings int dest LocationP public static final native int PM Session Create Printer List int print Session int printer List int current Index int current Printer  PMSessionBeginPageNoDialog printSession pageFormat PMRect pageFrame PMSessionCopyDestinationLocation printSession printSettings destLocationP PMSessionCreatePrinterList printSession printerList currentIndex currentPrinter
public static final native int PM Session Copy Destination Location int print Session int print Settings int dest LocationP public static final native int PM Session Create Printer List int print Session int printer List int current Index int current Printer public static final native int PM Session Default Page Format int print Session int page Format  PMSessionCopyDestinationLocation printSession printSettings destLocationP PMSessionCreatePrinterList printSession printerList currentIndex currentPrinter PMSessionDefaultPageFormat printSession pageFormat
public static final native int PM Session Create Printer List int print Session int printer List int current Index int current Printer public static final native int PM Session Default Page Format int print Session int page Format public static final native int PM Session Default Print Settings int print Session int print Settings  PMSessionCreatePrinterList printSession printerList currentIndex currentPrinter PMSessionDefaultPageFormat printSession pageFormat PMSessionDefaultPrintSettings printSession printSettings
public static final native int PM Session Default Page Format int print Session int page Format public static final native int PM Session Default Print Settings int print Session int print Settings public static final native int PM Session End Document No Dialog int print Session  PMSessionDefaultPageFormat printSession pageFormat PMSessionDefaultPrintSettings printSession printSettings PMSessionEndDocumentNoDialog printSession
public static final native int PM Session Default Print Settings int print Session int print Settings public static final native int PM Session End Document No Dialog int print Session public static final native int PM Session End Page No Dialog int print Session  PMSessionDefaultPrintSettings printSession printSettings PMSessionEndDocumentNoDialog printSession PMSessionEndPageNoDialog printSession
public static final native int PM Session End Document No Dialog int print Session public static final native int PM Session End Page No Dialog int print Session public static final native int PM Session Error int print Session  PMSessionEndDocumentNoDialog printSession PMSessionEndPageNoDialog printSession PMSessionError printSession
public static final native int PM Session End Page No Dialog int print Session public static final native int PM Session Error int print Session public static final native int PM Session Get Destination Type int print Session int print Settings short dest TypeP  PMSessionEndPageNoDialog printSession PMSessionError printSession PMSessionGetDestinationType printSession printSettings destTypeP
public static final native int PM Session Error int print Session public static final native int PM Session Get Destination Type int print Session int print Settings short dest TypeP public static final native int PM Session Get Graphics Context int print Session int graphics Type int graphics Context  PMSessionError printSession PMSessionGetDestinationType printSession printSettings destTypeP PMSessionGetGraphicsContext printSession graphicsType graphicsContext
public static final native int PM Session Get Destination Type int print Session int print Settings short dest TypeP public static final native int PM Session Get Graphics Context int print Session int graphics Type int graphics Context public static final native int PM Session Page Setup Dialog int print Session int page Format boolean result  PMSessionGetDestinationType printSession printSettings destTypeP PMSessionGetGraphicsContext printSession graphicsType graphicsContext PMSessionPageSetupDialog printSession pageFormat
public static final native int PM Session Get Graphics Context int print Session int graphics Type int graphics Context public static final native int PM Session Page Setup Dialog int print Session int page Format boolean result public static final native int PM Session Print Dialog int print Session int settings int page Format boolean accepted  PMSessionGetGraphicsContext printSession graphicsType graphicsContext PMSessionPageSetupDialog printSession pageFormat PMSessionPrintDialog printSession pageFormat
public static final native int PM Session Page Setup Dialog int print Session int page Format boolean result public static final native int PM Session Print Dialog int print Session int settings int page Format boolean accepted public static final native int PM Session Set Current Printer int session int printer Name  PMSessionPageSetupDialog printSession pageFormat PMSessionPrintDialog printSession pageFormat PMSessionSetCurrentPrinter printerName
public static final native int PM Session Print Dialog int print Session int settings int page Format boolean accepted public static final native int PM Session Set Current Printer int session int printer Name public static final native int PM Session Set Destination int print Session int print Settings short dest Type int dest Format int dest Location  PMSessionPrintDialog printSession pageFormat PMSessionSetCurrentPrinter printerName PMSessionSetDestination printSession printSettings destType destFormat destLocation
public static final native int PM Session Set Current Printer int session int printer Name public static final native int PM Session Set Destination int print Session int print Settings short dest Type int dest Format int dest Location public static final native int PM Session Set Error int print Session int print Error  PMSessionSetCurrentPrinter printerName PMSessionSetDestination printSession printSettings destType destFormat destLocation PMSessionSetError printSession printError
public static final native int PM Session Set Destination int print Session int print Settings short dest Type int dest Format int dest Location public static final native int PM Session Set Error int print Session int print Error public static final native int PM Session Set Document Format Generation int print Session int doc Format int graphics Contexts int options  PMSessionSetDestination printSession printSettings destType destFormat destLocation PMSessionSetError printSession printError PMSessionSetDocumentFormatGeneration printSession docFormat graphicsContexts
public static final native int PM Session Set Error int print Session int print Error public static final native int PM Session Set Document Format Generation int print Session int doc Format int graphics Contexts int options public static final native int PM Session Use Sheets int print Session int document Window int sheet Done Proc  PMSessionSetError printSession printError PMSessionSetDocumentFormatGeneration printSession docFormat graphicsContexts PMSessionUseSheets printSession documentWindow sheetDoneProc
public static final native int PM Session Set Document Format Generation int print Session int doc Format int graphics Contexts int options public static final native int PM Session Use Sheets int print Session int document Window int sheet Done Proc public static final native int PM Session Validate Page Format int print Session int page Format boolean result  PMSessionSetDocumentFormatGeneration printSession docFormat graphicsContexts PMSessionUseSheets printSession documentWindow sheetDoneProc PMSessionValidatePageFormat printSession pageFormat
public static final native int PM Session Use Sheets int print Session int document Window int sheet Done Proc public static final native int PM Session Validate Page Format int print Session int page Format boolean result public static final native int PM Session Validate Print Settings int print Session int print Settings boolean result  PMSessionUseSheets printSession documentWindow sheetDoneProc PMSessionValidatePageFormat printSession pageFormat PMSessionValidatePrintSettings printSession printSettings
public static final native int PM Session Validate Page Format int print Session int page Format boolean result public static final native int PM Session Validate Print Settings int print Session int print Settings boolean result public static final native int PM Set Collate int print Settings boolean collate  PMSessionValidatePageFormat printSession pageFormat PMSessionValidatePrintSettings printSession printSettings PMSetCollate printSettings
public static final native int PM Session Validate Print Settings int print Session int print Settings boolean result public static final native int PM Set Collate int print Settings boolean collate public static final native int PM Set First Page int print Settings int first boolean lock  PMSessionValidatePrintSettings printSession printSettings PMSetCollate printSettings PMSetFirstPage printSettings
public static final native int PM Set Collate int print Settings boolean collate public static final native int PM Set First Page int print Settings int first boolean lock public static final native int PM Set Job NameCF String int print Settings int name  PMSetCollate printSettings PMSetFirstPage printSettings PMSetJobNameCFString printSettings
public static final native int PM Set First Page int print Settings int first boolean lock public static final native int PM Set Job NameCF String int print Settings int name public static final native int PM Set Last Page int print Settings int last boolean lock  PMSetFirstPage printSettings PMSetJobNameCFString printSettings PMSetLastPage printSettings
public static final native int PM Set Job NameCF String int print Settings int name public static final native int PM Set Last Page int print Settings int last boolean lock public static final native int PM Set Page Range int print Settings int min Page int max Page  PMSetJobNameCFString printSettings PMSetLastPage printSettings PMSetPageRange printSettings minPage maxPage
public static final native int PM Set Last Page int print Settings int last boolean lock public static final native int PM Set Page Range int print Settings int min Page int max Page public static final native int PM Unflatten Page Format int flat Format int page Format  PMSetLastPage printSettings PMSetPageRange printSettings minPage maxPage PMUnflattenPageFormat flatFormat pageFormat
public static final native int PM Set Page Range int print Settings int min Page int max Page public static final native int PM Unflatten Page Format int flat Format int page Format public static final native int PM Unflatten Print Settings int flat Settings int print Settings  PMSetPageRange printSettings minPage maxPage PMUnflattenPageFormat flatFormat pageFormat PMUnflattenPrintSettings flatSettings printSettings
public static final native int PM Unflatten Page Format int flat Format int page Format public static final native int PM Unflatten Print Settings int flat Settings int print Settings public static final native boolean Pt In Rect Point pt Rect r  PMUnflattenPageFormat flatFormat pageFormat PMUnflattenPrintSettings flatSettings printSettings PtInRect
public static final native int PM Unflatten Print Settings int flat Settings int print Settings public static final native boolean Pt In Rect Point pt Rect r public static final native boolean Pt In Rgn Point pt int rgn Handle  PMUnflattenPrintSettings flatSettings printSettings PtInRect PtInRgn rgnHandle
public static final native boolean Pt In Rect Point pt Rect r public static final native boolean Pt In Rgn Point pt int rgn Handle public static final native int Put Scrap Flavor int scrap int flavor Type int flavor Flags int flavor Size byte flavor Data  PtInRect PtInRgn rgnHandle PutScrapFlavor flavorType flavorFlags flavorSize flavorData
public static final native boolean Pt In Rgn Point pt int rgn Handle public static final native int Put Scrap Flavor int scrap int flavor Type int flavor Flags int flavor Size byte flavor Data public static final native int QD BeginCG Context int in Port int out Context  PtInRgn rgnHandle PutScrapFlavor flavorType flavorFlags flavorSize flavorData QDBeginCGContext inPort outContext
public static final native int Put Scrap Flavor int scrap int flavor Type int flavor Flags int flavor Size byte flavor Data public static final native int QD BeginCG Context int in Port int out Context public static final native int QD EndCG Context int in Port int inout Context  PutScrapFlavor flavorType flavorFlags flavorSize flavorData QDBeginCGContext inPort outContext QDEndCGContext inPort inoutContext
public static final native int QD BeginCG Context int in Port int out Context public static final native int QD EndCG Context int in Port int inout Context public static final native void QD Flush Port Buffer int port int rgn Handle  QDBeginCGContext inPort outContext QDEndCGContext inPort inoutContext QDFlushPortBuffer rgnHandle
public static final native int QD EndCG Context int in Port int inout Context public static final native void QD Flush Port Buffer int port int rgn Handle public static final native void QD Global To Local Point int port Point point  QDEndCGContext inPort inoutContext QDFlushPortBuffer rgnHandle QDGlobalToLocalPoint
public static final native void QD Flush Port Buffer int port int rgn Handle public static final native void QD Global To Local Point int port Point point public static final native void QD Local To Global Point int port Point point  QDFlushPortBuffer rgnHandle QDGlobalToLocalPoint QDLocalToGlobalPoint
public static final native void QD Global To Local Point int port Point point public static final native void QD Local To Global Point int port Point point public static final native int QD Set Dirty Region int port int rgn  QDGlobalToLocalPoint QDLocalToGlobalPoint QDSetDirtyRegion
public static final native void QD Local To Global Point int port Point point public static final native int QD Set Dirty Region int port int rgn public static final native void QD Set Pattern Origin Point point  QDLocalToGlobalPoint QDSetDirtyRegion QDSetPatternOrigin
public static final native int QD Set Dirty Region int port int rgn public static final native void QD Set Pattern Origin Point point public static final native int QD Swap Text Flags int flags  QDSetDirtyRegion QDSetPatternOrigin QDSwapTextFlags
public static final native void QD Set Pattern Origin Point point public static final native int QD Swap Text Flags int flags public static final native void RGB Back Color RGB Color color  QDSetPatternOrigin QDSwapTextFlags RGBBackColor RGBColor
public static final native int QD Swap Text Flags int flags public static final native void RGB Back Color RGB Color color public static final native void RGB Fore Color RGB Color color  QDSwapTextFlags RGBBackColor RGBColor RGBForeColor RGBColor
public static final native void RGB Back Color RGB Color color public static final native void RGB Fore Color RGB Color color public static final native int Receive Next Event int in Num Types int in List double in Timeout boolean in Pull Event int out Event  RGBBackColor RGBColor RGBForeColor RGBColor ReceiveNextEvent inNumTypes inList inTimeout inPullEvent outEvent
public static final native void RGB Fore Color RGB Color color public static final native int Receive Next Event int in Num Types int in List double in Timeout boolean in Pull Event int out Event public static final native boolean Rect In Rgn Rect rect int rgn Handle  RGBForeColor RGBColor ReceiveNextEvent inNumTypes inList inTimeout inPullEvent outEvent RectInRgn rgnHandle
public static final native int Receive Next Event int in Num Types int in List double in Timeout boolean in Pull Event int out Event public static final native boolean Rect In Rgn Rect rect int rgn Handle public static final native void Rect Rgn int rgn Handle Rect left  ReceiveNextEvent inNumTypes inList inTimeout inPullEvent outEvent RectInRgn rgnHandle RectRgn rgnHandle
public static final native boolean Rect In Rgn Rect rect int rgn Handle public static final native void Rect Rgn int rgn Handle Rect left public static final native int Register Appearance Client  RectInRgn rgnHandle RectRgn rgnHandle RegisterAppearanceClient
public static final native void Rect Rgn int rgn Handle Rect left public static final native int Register Appearance Client public static final native void Release Event int the Event  RectRgn rgnHandle RegisterAppearanceClient ReleaseEvent theEvent
public static final native int Register Appearance Client public static final native void Release Event int the Event public static final native void Release Icon Ref int the Icon Ref  RegisterAppearanceClient ReleaseEvent theEvent ReleaseIconRef theIconRef
public static final native void Release Event int the Event public static final native void Release Icon Ref int the Icon Ref public static final native int Release Menu int m Handle  ReleaseEvent theEvent ReleaseIconRef theIconRef ReleaseMenu mHandle
public static final native void Release Icon Ref int the Icon Ref public static final native int Release Menu int m Handle public static final native int Release Window Group int in Group  ReleaseIconRef theIconRef ReleaseMenu mHandle ReleaseWindowGroup inGroup
public static final native int Release Menu int m Handle public static final native int Release Window Group int in Group public static final native int Release Window int in Window  ReleaseMenu mHandle ReleaseWindowGroup inGroup ReleaseWindow inWindow
public static final native int Release Window Group int in Group public static final native int Release Window int in Window public static final native int Remove Control Property int control int property Creator int property Tag  ReleaseWindowGroup inGroup ReleaseWindow inWindow RemoveControlProperty propertyCreator propertyTag
public static final native int Release Window int in Window public static final native int Remove Control Property int control int property Creator int property Tag public static final native int Remove Data Browser Items int c Handle int containerID int num Items int itemI Ds int pre Sort Property  ReleaseWindow inWindow RemoveControlProperty propertyCreator propertyTag RemoveDataBrowserItems cHandle numItems itemIDs preSortProperty
public static final native int Remove Control Property int control int property Creator int property Tag public static final native int Remove Data Browser Items int c Handle int containerID int num Items int itemI Ds int pre Sort Property public static final native int Remove Data Browser Table View Column int browser int column  RemoveControlProperty propertyCreator propertyTag RemoveDataBrowserItems cHandle numItems itemIDs preSortProperty RemoveDataBrowserTableViewColumn
public static final native int Remove Data Browser Items int c Handle int containerID int num Items int itemI Ds int pre Sort Property public static final native int Remove Data Browser Table View Column int browser int column public static final native int Remove Event Handler int in Handler Ref  RemoveDataBrowserItems cHandle numItems itemIDs preSortProperty RemoveDataBrowserTableViewColumn RemoveEventHandler inHandlerRef
public static final native int Remove Data Browser Table View Column int browser int column public static final native int Remove Event Handler int in Handler Ref public static final native int Remove Event Loop Timer int in Timer  RemoveDataBrowserTableViewColumn RemoveEventHandler inHandlerRef RemoveEventLoopTimer inTimer
public static final native int Remove Event Handler int in Handler Ref public static final native int Remove Event Loop Timer int in Timer public static final native int Remove Receive Handler int receive Handler int the Window  RemoveEventHandler inHandlerRef RemoveEventLoopTimer inTimer RemoveReceiveHandler receiveHandler theWindow
public static final native int Remove Event Loop Timer int in Timer public static final native int Remove Receive Handler int receive Handler int the Window public static final native int Remove Tracking Handler int tracking Handler int the Window  RemoveEventLoopTimer inTimer RemoveReceiveHandler receiveHandler theWindow RemoveTrackingHandler trackingHandler theWindow
public static final native int Remove Receive Handler int receive Handler int the Window public static final native int Remove Tracking Handler int tracking Handler int the Window public static final native int Reposition Window int window int parent Window int method  RemoveReceiveHandler receiveHandler theWindow RemoveTrackingHandler trackingHandler theWindow RepositionWindow parentWindow
public static final native int Remove Tracking Handler int tracking Handler int the Window public static final native int Reposition Window int window int parent Window int method public static final native int Reshape Custom Window int window  RemoveTrackingHandler trackingHandler theWindow RepositionWindow parentWindow ReshapeCustomWindow
public static final native int Reposition Window int window int parent Window int method public static final native int Reshape Custom Window int window public static final native int Retain Event int in Event  RepositionWindow parentWindow ReshapeCustomWindow RetainEvent inEvent
public static final native int Reshape Custom Window int window public static final native int Retain Event int in Event public static final native int Retain Menu int m Handle  ReshapeCustomWindow RetainEvent inEvent RetainMenu mHandle
public static final native int Retain Event int in Event public static final native int Retain Menu int m Handle public static final native int Retain Window int in Window  RetainEvent inEvent RetainMenu mHandle RetainWindow inWindow
public static final native int Retain Menu int m Handle public static final native int Retain Window int in Window public static final native int Reveal Data Browser Item int browser int item int property byte options  RetainMenu mHandle RetainWindow inWindow RevealDataBrowserItem
public static final native int Retain Window int in Window public static final native int Reveal Data Browser Item int browser int item int property byte options public static final native int Run Standard Alert int dialog Handle int modal FilterUPP short item Hit  RetainWindow inWindow RevealDataBrowserItem RunStandardAlert dialogHandle modalFilterUPP itemHit
public static final native int Reveal Data Browser Item int browser int item int property byte options public static final native int Run Standard Alert int dialog Handle int modal FilterUPP short item Hit public static final native void Scroll Rect Rect rect short dh short dv int update Rgn  RevealDataBrowserItem RunStandardAlert dialogHandle modalFilterUPP itemHit ScrollRect updateRgn
public static final native int Run Standard Alert int dialog Handle int modal FilterUPP short item Hit public static final native void Scroll Rect Rect rect short dh short dv int update Rgn public static final native boolean Sect Rect Rect src1 Rect src2 Rect dst Rect  RunStandardAlert dialogHandle modalFilterUPP itemHit ScrollRect updateRgn SectRect dstRect
public static final native void Scroll Rect Rect rect short dh short dv int update Rgn public static final native boolean Sect Rect Rect src1 Rect src2 Rect dst Rect public static final native void Sect Rgn int src RgnA int src RgnB int dst Rgn  ScrollRect updateRgn SectRect dstRect SectRgn srcRgnA srcRgnB dstRgn
public static final native boolean Sect Rect Rect src1 Rect src2 Rect dst Rect public static final native void Sect Rgn int src RgnA int src RgnB int dst Rgn public static final native void Select Window int w Handle  SectRect dstRect SectRgn srcRgnA srcRgnB dstRgn SelectWindow wHandle
public static final native void Sect Rgn int src RgnA int src RgnB int dst Rgn public static final native void Select Window int w Handle public static final native void Send Behind int window int behind Window  SectRgn srcRgnA srcRgnB dstRgn SelectWindow wHandle SendBehind behindWindow
public static final native void Select Window int w Handle public static final native void Send Behind int window int behind Window public static final native int Send Event To Event Target int the Event int the Target  SelectWindow wHandle SendBehind behindWindow SendEventToEventTarget theEvent theTarget
public static final native void Send Behind int window int behind Window public static final native int Send Event To Event Target int the Event int the Target public static final native int Set Bevel Button Content Info int in Button Control Button Content Info in Content  SendBehind behindWindow SendEventToEventTarget theEvent theTarget SetBevelButtonContentInfo inButton ControlButtonContentInfo inContent
public static final native int Send Event To Event Target int the Event int the Target public static final native int Set Bevel Button Content Info int in Button Control Button Content Info in Content public static final native void Set Clip int rgn Handle  SendEventToEventTarget theEvent theTarget SetBevelButtonContentInfo inButton ControlButtonContentInfo inContent SetClip rgnHandle
public static final native int Set Bevel Button Content Info int in Button Control Button Content Info in Content public static final native void Set Clip int rgn Handle public static final native void Set Control32 Bit Maximum int c Handle int maximum  SetBevelButtonContentInfo inButton ControlButtonContentInfo inContent SetClip rgnHandle SetControl32BitMaximum cHandle
public static final native void Set Clip int rgn Handle public static final native void Set Control32 Bit Maximum int c Handle int maximum public static final native void Set Control32 Bit Minimum int c Handle int minimum  SetClip rgnHandle SetControl32BitMaximum cHandle SetControl32BitMinimum cHandle
public static final native void Set Control32 Bit Maximum int c Handle int maximum public static final native void Set Control32 Bit Minimum int c Handle int minimum public static final native void Set Control32 Bit Value int c Handle int value  SetControl32BitMaximum cHandle SetControl32BitMinimum cHandle SetControl32BitValue cHandle
public static final native void Set Control32 Bit Minimum int c Handle int minimum public static final native void Set Control32 Bit Value int c Handle int value public static final native void Set Control Action int c Handle int action Proc  SetControl32BitMinimum cHandle SetControl32BitValue cHandle SetControlAction cHandle actionProc
public static final native void Set Control32 Bit Value int c Handle int value public static final native void Set Control Action int c Handle int action Proc public static final native void Set Control Bounds int c Handle Rect bounds  SetControl32BitValue cHandle SetControlAction cHandle actionProc SetControlBounds cHandle
public static final native void Set Control Action int c Handle int action Proc public static final native void Set Control Bounds int c Handle Rect bounds public static final native int Set Control Color Proc int in Control int in Proc  SetControlAction cHandle actionProc SetControlBounds cHandle SetControlColorProc inControl inProc
public static final native void Set Control Bounds int c Handle Rect bounds public static final native int Set Control Color Proc int in Control int in Proc public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size Control Button Content Info in Data  SetControlBounds cHandle SetControlColorProc inControl inProc SetControlData inControl inPart inTagName inSize ControlButtonContentInfo inData
public static final native int Set Control Color Proc int in Control int in Proc public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size Control Button Content Info in Data public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size Control Tab Info RecV1 in Data  SetControlColorProc inControl inProc SetControlData inControl inPart inTagName inSize ControlButtonContentInfo inData SetControlData inControl inPart inTagName inSize ControlTabInfoRecV1 inData
public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size Control Button Content Info in Data public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size Control Tab Info RecV1 in Data public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size Rect in Data  SetControlData inControl inPart inTagName inSize ControlButtonContentInfo inData SetControlData inControl inPart inTagName inSize ControlTabInfoRecV1 inData SetControlData inControl inPart inTagName inSize inData
public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size Control Tab Info RecV1 in Data public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size Rect in Data public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size short in Data  SetControlData inControl inPart inTagName inSize ControlTabInfoRecV1 inData SetControlData inControl inPart inTagName inSize inData SetControlData inControl inPart inTagName inSize inData
public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size Rect in Data public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size short in Data public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size int in Data  SetControlData inControl inPart inTagName inSize inData SetControlData inControl inPart inTagName inSize inData SetControlData inControl inPart inTagName inSize inData
public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size short in Data public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size int in Data public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size int in Data  SetControlData inControl inPart inTagName inSize inData SetControlData inControl inPart inTagName inSize inData SetControlData inControl inPart inTagName inSize inData
public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size int in Data public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size int in Data public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size byte in Data  SetControlData inControl inPart inTagName inSize inData SetControlData inControl inPart inTagName inSize inData SetControlData inControl inPart inTagName inSize inData
public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size int in Data public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size byte in Data public static final native int Set Control Font Style int in Control Control Font Style Rec in Style  SetControlData inControl inPart inTagName inSize inData SetControlData inControl inPart inTagName inSize inData SetControlFontStyle inControl ControlFontStyleRec inStyle
public static final native int Set Control Data int in Control int in Part int in Tag Name int in Size byte in Data public static final native int Set Control Font Style int in Control Control Font Style Rec in Style public static final native void Set Control Popup Menu Handle int c Handle int popup Menu Handle  SetControlData inControl inPart inTagName inSize inData SetControlFontStyle inControl ControlFontStyleRec inStyle SetControlPopupMenuHandle cHandle popupMenuHandle
public static final native int Set Control Font Style int in Control Control Font Style Rec in Style public static final native void Set Control Popup Menu Handle int c Handle int popup Menu Handle public static final native int Set Control Property int control int property Creator int property Tag int property Size int property Data  SetControlFontStyle inControl ControlFontStyleRec inStyle SetControlPopupMenuHandle cHandle popupMenuHandle SetControlProperty propertyCreator propertyTag propertySize propertyData
public static final native void Set Control Popup Menu Handle int c Handle int popup Menu Handle public static final native int Set Control Property int control int property Creator int property Tag int property Size int property Data public static final native void Set Control Reference int c Handle int data  SetControlPopupMenuHandle cHandle popupMenuHandle SetControlProperty propertyCreator propertyTag propertySize propertyData SetControlReference cHandle
public static final native int Set Control Property int control int property Creator int property Tag int property Size int property Data public static final native void Set Control Reference int c Handle int data public static final native int Set Control Title WithCF String int c Handle int s Handle  SetControlProperty propertyCreator propertyTag propertySize propertyData SetControlReference cHandle SetControlTitleWithCFString cHandle sHandle
public static final native void Set Control Reference int c Handle int data public static final native int Set Control Title WithCF String int c Handle int s Handle public static final native void Set Control View Size int c Handle int view Size  SetControlReference cHandle SetControlTitleWithCFString cHandle sHandle SetControlViewSize cHandle viewSize
public static final native int Set Control Title WithCF String int c Handle int s Handle public static final native void Set Control View Size int c Handle int view Size public static final native int Set Control Visibility int in Control boolean in Is Visible boolean in Do Draw  SetControlTitleWithCFString cHandle sHandle SetControlViewSize cHandle viewSize SetControlVisibility inControl inIsVisible inDoDraw
public static final native void Set Control View Size int c Handle int view Size public static final native int Set Control Visibility int in Control boolean in Is Visible boolean in Do Draw public static final native void Set Cursor int cursor  SetControlViewSize cHandle viewSize SetControlVisibility inControl inIsVisible inDoDraw SetCursor
public static final native int Set Control Visibility int in Control boolean in Is Visible boolean in Do Draw public static final native void Set Cursor int cursor public static final native int Set Data Browser Callbacks int browser Data Browser Callbacks callbacks  SetControlVisibility inControl inIsVisible inDoDraw SetCursor SetDataBrowserCallbacks DataBrowserCallbacks
public static final native void Set Cursor int cursor public static final native int Set Data Browser Callbacks int browser Data Browser Callbacks callbacks public static final native int Set Data Browser Custom Callbacks int browser Data Browser Custom Callbacks callbacks  SetCursor SetDataBrowserCallbacks DataBrowserCallbacks SetDataBrowserCustomCallbacks DataBrowserCustomCallbacks
public static final native int Set Data Browser Callbacks int browser Data Browser Callbacks callbacks public static final native int Set Data Browser Custom Callbacks int browser Data Browser Custom Callbacks callbacks public static final native int Set Data Browser Has Scroll Bars int c Handle boolean h Scroll boolean v Scroll  SetDataBrowserCallbacks DataBrowserCallbacks SetDataBrowserCustomCallbacks DataBrowserCustomCallbacks SetDataBrowserHasScrollBars cHandle hScroll vScroll
public static final native int Set Data Browser Custom Callbacks int browser Data Browser Custom Callbacks callbacks public static final native int Set Data Browser Has Scroll Bars int c Handle boolean h Scroll boolean v Scroll public static final native int Set Data Browser Item Data Boolean Value int item Ref boolean data  SetDataBrowserCustomCallbacks DataBrowserCustomCallbacks SetDataBrowserHasScrollBars cHandle hScroll vScroll SetDataBrowserItemDataBooleanValue itemRef
public static final native int Set Data Browser Has Scroll Bars int c Handle boolean h Scroll boolean v Scroll public static final native int Set Data Browser Item Data Boolean Value int item Ref boolean data public static final native int Set Data Browser Item Data Button Value int item Ref short theme Button Value  SetDataBrowserHasScrollBars cHandle hScroll vScroll SetDataBrowserItemDataBooleanValue itemRef SetDataBrowserItemDataButtonValue itemRef themeButtonValue
public static final native int Set Data Browser Item Data Boolean Value int item Ref boolean data public static final native int Set Data Browser Item Data Button Value int item Ref short theme Button Value public static final native int Set Data Browser Item Data Icon int item Ref int icon Ref  SetDataBrowserItemDataBooleanValue itemRef SetDataBrowserItemDataButtonValue itemRef themeButtonValue SetDataBrowserItemDataIcon itemRef iconRef
public static final native int Set Data Browser Item Data Button Value int item Ref short theme Button Value public static final native int Set Data Browser Item Data Icon int item Ref int icon Ref public static final native int Set Data Browser Item Data ItemID int item Ref int itemID  SetDataBrowserItemDataButtonValue itemRef themeButtonValue SetDataBrowserItemDataIcon itemRef iconRef SetDataBrowserItemDataItemID itemRef
public static final native int Set Data Browser Item Data Icon int item Ref int icon Ref public static final native int Set Data Browser Item Data ItemID int item Ref int itemID public static final native int Set Data Browser Item Data Text int item Ref int s Handle  SetDataBrowserItemDataIcon itemRef iconRef SetDataBrowserItemDataItemID itemRef SetDataBrowserItemDataText itemRef sHandle
public static final native int Set Data Browser Item Data ItemID int item Ref int itemID public static final native int Set Data Browser Item Data Text int item Ref int s Handle public static final native int Set Data Browser List View Disclosure Column int c Handle int colID boolean b  SetDataBrowserItemDataItemID itemRef SetDataBrowserItemDataText itemRef sHandle SetDataBrowserListViewDisclosureColumn cHandle
public static final native int Set Data Browser Item Data Text int item Ref int s Handle public static final native int Set Data Browser List View Disclosure Column int c Handle int colID boolean b public static final native int Set Data Browser List View Header Btn Height int c Handle short height  SetDataBrowserItemDataText itemRef sHandle SetDataBrowserListViewDisclosureColumn cHandle SetDataBrowserListViewHeaderBtnHeight cHandle
public static final native int Set Data Browser List View Disclosure Column int c Handle int colID boolean b public static final native int Set Data Browser List View Header Btn Height int c Handle short height public static final native int Set Data Browser List View Header Desc int browser int column Data Browser List View Header Desc desc  SetDataBrowserListViewDisclosureColumn cHandle SetDataBrowserListViewHeaderBtnHeight cHandle SetDataBrowserListViewHeaderDesc DataBrowserListViewHeaderDesc
public static final native int Set Data Browser List View Header Btn Height int c Handle short height public static final native int Set Data Browser List View Header Desc int browser int column Data Browser List View Header Desc desc public static final native int Set Data Browser Scroll Position int c Handle int top int left  SetDataBrowserListViewHeaderBtnHeight cHandle SetDataBrowserListViewHeaderDesc DataBrowserListViewHeaderDesc SetDataBrowserScrollPosition cHandle
public static final native int Set Data Browser List View Header Desc int browser int column Data Browser List View Header Desc desc public static final native int Set Data Browser Scroll Position int c Handle int top int left public static final native int Set Data Browser Selected Items int c Handle int num Items int items int operation  SetDataBrowserListViewHeaderDesc DataBrowserListViewHeaderDesc SetDataBrowserScrollPosition cHandle SetDataBrowserSelectedItems cHandle numItems
public static final native int Set Data Browser Scroll Position int c Handle int top int left public static final native int Set Data Browser Selected Items int c Handle int num Items int items int operation public static final native int Set Data Browser Selection Flags int c Handle int selection Flags  SetDataBrowserScrollPosition cHandle SetDataBrowserSelectedItems cHandle numItems SetDataBrowserSelectionFlags cHandle selectionFlags
public static final native int Set Data Browser Selected Items int c Handle int num Items int items int operation public static final native int Set Data Browser Selection Flags int c Handle int selection Flags public static final native int Set Data Browser Sort Order int browser short order  SetDataBrowserSelectedItems cHandle numItems SetDataBrowserSelectionFlags cHandle selectionFlags SetDataBrowserSortOrder
public static final native int Set Data Browser Selection Flags int c Handle int selection Flags public static final native int Set Data Browser Sort Order int browser short order public static final native int Set Data Browser Table View Column Position int browser int column int position  SetDataBrowserSelectionFlags cHandle selectionFlags SetDataBrowserSortOrder SetDataBrowserTableViewColumnPosition
public static final native int Set Data Browser Sort Order int browser short order public static final native int Set Data Browser Table View Column Position int browser int column int position public static final native int Set Data Browser Table View Hilite Style int browser int hilite Style  SetDataBrowserSortOrder SetDataBrowserTableViewColumnPosition SetDataBrowserTableViewHiliteStyle hiliteStyle
public static final native int Set Data Browser Table View Column Position int browser int column int position public static final native int Set Data Browser Table View Hilite Style int browser int hilite Style public static final native int Set Data Browser Table View Item Row int browser int item int row  SetDataBrowserTableViewColumnPosition SetDataBrowserTableViewHiliteStyle hiliteStyle SetDataBrowserTableViewItemRow
public static final native int Set Data Browser Table View Hilite Style int browser int hilite Style public static final native int Set Data Browser Table View Item Row int browser int item int row public static final native int Set Data Browser Table View Named Column Width int browser int column short width  SetDataBrowserTableViewHiliteStyle hiliteStyle SetDataBrowserTableViewItemRow SetDataBrowserTableViewNamedColumnWidth
public static final native int Set Data Browser Table View Item Row int browser int item int row public static final native int Set Data Browser Table View Named Column Width int browser int column short width public static final native int Set Data Browser Target int c Handle int rootID  SetDataBrowserTableViewItemRow SetDataBrowserTableViewNamedColumnWidth SetDataBrowserTarget cHandle
public static final native int Set Data Browser Table View Named Column Width int browser int column short width public static final native int Set Data Browser Target int c Handle int rootID public static final native int Set Drag Allowable Actions int the Drag int in Actions boolean is Local  SetDataBrowserTableViewNamedColumnWidth SetDataBrowserTarget cHandle SetDragAllowableActions theDrag inActions isLocal
public static final native int Set Data Browser Target int c Handle int rootID public static final native int Set Drag Allowable Actions int the Drag int in Actions boolean is Local public static final native int Set Drag Drop Action int the Drag int in Action  SetDataBrowserTarget cHandle SetDragAllowableActions theDrag inActions isLocal SetDragDropAction theDrag inAction
public static final native int Set Drag Allowable Actions int the Drag int in Actions boolean is Local public static final native int Set Drag Drop Action int the Drag int in Action public static final native int Set Drag Input Proc int the Drag int input Proc int drag Input Ref Con  SetDragAllowableActions theDrag inActions isLocal SetDragDropAction theDrag inAction SetDragInputProc theDrag inputProc dragInputRefCon
public static final native int Set Drag Drop Action int the Drag int in Action public static final native int Set Drag Input Proc int the Drag int input Proc int drag Input Ref Con public static final native int Set Event Loop Timer Next Fire Time int in Timer double in Next Fire  SetDragDropAction theDrag inAction SetDragInputProc theDrag inputProc dragInputRefCon SetEventLoopTimerNextFireTime inTimer inNextFire
public static final native int Set Drag Input Proc int the Drag int input Proc int drag Input Ref Con public static final native int Set Event Loop Timer Next Fire Time int in Timer double in Next Fire public static final native int Set Event Parameter int in Event int in Name int in Type int in Size char in Data Ptr  SetDragInputProc theDrag inputProc dragInputRefCon SetEventLoopTimerNextFireTime inTimer inNextFire SetEventParameter inEvent inName inType inSize inDataPtr
public static final native int Set Event Loop Timer Next Fire Time int in Timer double in Next Fire public static final native int Set Event Parameter int in Event int in Name int in Type int in Size char in Data Ptr public static final native int Set Event Parameter int in Event int in Name int in Type int in Size short in Data Ptr  SetEventLoopTimerNextFireTime inTimer inNextFire SetEventParameter inEvent inName inType inSize inDataPtr SetEventParameter inEvent inName inType inSize inDataPtr
public static final native int Set Event Parameter int in Event int in Name int in Type int in Size char in Data Ptr public static final native int Set Event Parameter int in Event int in Name int in Type int in Size short in Data Ptr public static final native int Set Font Info For Selection int i Style Type int i Num Styles int i Styles int iFP Event Target  SetEventParameter inEvent inName inType inSize inDataPtr SetEventParameter inEvent inName inType inSize inDataPtr SetFontInfoForSelection iStyleType iNumStyles iStyles iFPEventTarget
public static final native int Set Event Parameter int in Event int in Name int in Type int in Size short in Data Ptr public static final native int Set Font Info For Selection int i Style Type int i Num Styles int i Styles int iFP Event Target public static final native int Set Front Process int psn  SetEventParameter inEvent inName inType inSize inDataPtr SetFontInfoForSelection iStyleType iNumStyles iStyles iFPEventTarget SetFrontProcess
public static final native int Set Font Info For Selection int i Style Type int i Num Styles int i Styles int iFP Event Target public static final native int Set Front Process int psn public static final native int Set Front Process With Options int psn int in Options  SetFontInfoForSelection iStyleType iNumStyles iStyles iFPEventTarget SetFrontProcess SetFrontProcessWithOptions inOptions
public static final native int Set Front Process int psn public static final native int Set Front Process With Options int psn int in Options public static final native void SetG World int port Handle int gd Handle  SetFrontProcess SetFrontProcessWithOptions inOptions SetGWorld portHandle gdHandle
public static final native int Set Front Process With Options int psn int in Options public static final native void SetG World int port Handle int gd Handle public static final native void Set Item Mark int the Menu short item short mark Char  SetFrontProcessWithOptions inOptions SetGWorld portHandle gdHandle SetItemMark theMenu markChar
public static final native void SetG World int port Handle int gd Handle public static final native void Set Item Mark int the Menu short item short mark Char public static final native int Set Keyboard Focus int w Handle int c Handle short in Part  SetGWorld portHandle gdHandle SetItemMark theMenu markChar SetKeyboardFocus wHandle cHandle inPart
public static final native void Set Item Mark int the Menu short item short mark Char public static final native int Set Keyboard Focus int w Handle int c Handle short in Part public static final native int Set Menu Command Mark int m Handle int command Id char mark  SetItemMark theMenu markChar SetKeyboardFocus wHandle cHandle inPart SetMenuCommandMark mHandle commandId
public static final native int Set Keyboard Focus int w Handle int c Handle short in Part public static final native int Set Menu Command Mark int m Handle int command Id char mark public static final native int Set Menu Font int m Handle short fontID short size  SetKeyboardFocus wHandle cHandle inPart SetMenuCommandMark mHandle commandId SetMenuFont mHandle
public static final native int Set Menu Command Mark int m Handle int command Id char mark public static final native int Set Menu Font int m Handle short fontID short size public static final native int Set Menu Item Command Key int m Handle short index boolean virtual Key char key  SetMenuCommandMark mHandle commandId SetMenuFont mHandle SetMenuItemCommandKey mHandle virtualKey
public static final native int Set Menu Font int m Handle short fontID short size public static final native int Set Menu Item Command Key int m Handle short index boolean virtual Key char key public static final native int Set Menu Item Hierarchical Menu int m Handle short index int hier Menu Handle  SetMenuFont mHandle SetMenuItemCommandKey mHandle virtualKey SetMenuItemHierarchicalMenu mHandle hierMenuHandle
public static final native int Set Menu Item Command Key int m Handle short index boolean virtual Key char key public static final native int Set Menu Item Hierarchical Menu int m Handle short index int hier Menu Handle public static final native int Set Menu Item Icon Handle int m Handle short item byte icon Type int icon Handle  SetMenuItemCommandKey mHandle virtualKey SetMenuItemHierarchicalMenu mHandle hierMenuHandle SetMenuItemIconHandle mHandle iconType iconHandle
public static final native int Set Menu Item Hierarchical Menu int m Handle short index int hier Menu Handle public static final native int Set Menu Item Icon Handle int m Handle short item byte icon Type int icon Handle public static final native int Set Menu Item Key Glyph int m Handle short index short glyph  SetMenuItemHierarchicalMenu mHandle hierMenuHandle SetMenuItemIconHandle mHandle iconType iconHandle SetMenuItemKeyGlyph mHandle
public static final native int Set Menu Item Icon Handle int m Handle short item byte icon Type int icon Handle public static final native int Set Menu Item Key Glyph int m Handle short index short glyph public static final native int Set Menu Item Modifiers int m Handle short index byte modifiers  SetMenuItemIconHandle mHandle iconType iconHandle SetMenuItemKeyGlyph mHandle SetMenuItemModifiers mHandle
public static final native int Set Menu Item Key Glyph int m Handle short index short glyph public static final native int Set Menu Item Modifiers int m Handle short index byte modifiers public static final native int Set Menu Item Ref Con int m Handle short index int ref Con  SetMenuItemKeyGlyph mHandle SetMenuItemModifiers mHandle SetMenuItemRefCon mHandle refCon
public static final native int Set Menu Item Modifiers int m Handle short index byte modifiers public static final native int Set Menu Item Ref Con int m Handle short index int ref Con public static final native int Set Menu Item Text WithCF String int m Handle short index int s Handle  SetMenuItemModifiers mHandle SetMenuItemRefCon mHandle refCon SetMenuItemTextWithCFString mHandle sHandle
public static final native int Set Menu Item Ref Con int m Handle short index int ref Con public static final native int Set Menu Item Text WithCF String int m Handle short index int s Handle public static final native int Set Menu Title WithCF String int m Handle int s Handle  SetMenuItemRefCon mHandle refCon SetMenuItemTextWithCFString mHandle sHandle SetMenuTitleWithCFString mHandle sHandle
public static final native int Set Menu Item Text WithCF String int m Handle short index int s Handle public static final native int Set Menu Title WithCF String int m Handle int s Handle public static final native void Set Origin short h short v  SetMenuItemTextWithCFString mHandle sHandle SetMenuTitleWithCFString mHandle sHandle SetOrigin
public static final native int Set Menu Title WithCF String int m Handle int s Handle public static final native void Set Origin short h short v public static final native void Set Port int p Handle  SetMenuTitleWithCFString mHandle sHandle SetOrigin SetPort pHandle
public static final native void Set Origin short h short v public static final native void Set Port int p Handle public static final native void Set Port Bounds int port Rect rect  SetOrigin SetPort pHandle SetPortBounds
public static final native void Set Port int p Handle public static final native void Set Port Bounds int port Rect rect public static final native void Set Port Window Port int w Handle  SetPort pHandle SetPortBounds SetPortWindowPort wHandle
public static final native void Set Port Bounds int port Rect rect public static final native void Set Port Window Port int w Handle public static final native void Set Pt Point p short h short v  SetPortBounds SetPortWindowPort wHandle SetPt
public static final native void Set Port Window Port int w Handle public static final native void Set Pt Point p short h short v public static final native void Set Rect Rect r short left short top short right short bottom  SetPortWindowPort wHandle SetPt SetRect
public static final native void Set Pt Point p short h short v public static final native void Set Rect Rect r short left short top short right short bottom public static final native void Set Rect Rgn int rgn Handle short left short top short right short bottom  SetPt SetRect SetRectRgn rgnHandle
public static final native void Set Rect Rect r short left short top short right short bottom public static final native void Set Rect Rgn int rgn Handle short left short top short right short bottom public static final native int Set Root Menu int m Handle  SetRect SetRectRgn rgnHandle SetRootMenu mHandle
public static final native void Set Rect Rgn int rgn Handle short left short top short right short bottom public static final native int Set Root Menu int m Handle public static final native int Set Theme Background short in Brush short depth boolean is Color Device  SetRectRgn rgnHandle SetRootMenu mHandle SetThemeBackground inBrush isColorDevice
public static final native int Set Root Menu int m Handle public static final native int Set Theme Background short in Brush short depth boolean is Color Device public static final native int Set Theme Cursor int theme Cursor  SetRootMenu mHandle SetThemeBackground inBrush isColorDevice SetThemeCursor themeCursor
public static final native int Set Theme Background short in Brush short depth boolean is Color Device public static final native int Set Theme Cursor int theme Cursor public static final native int Set Theme Drawing State int state boolean dispose Now  SetThemeBackground inBrush isColorDevice SetThemeCursor themeCursor SetThemeDrawingState disposeNow
public static final native int Set Theme Cursor int theme Cursor public static final native int Set Theme Drawing State int state boolean dispose Now public static final native int Set Theme Text Color short in Brush short depth boolean is Color Device  SetThemeCursor themeCursor SetThemeDrawingState disposeNow SetThemeTextColor inBrush isColorDevice
public static final native int Set Theme Drawing State int state boolean dispose Now public static final native int Set Theme Text Color short in Brush short depth boolean is Color Device public static final native int Set Theme Window Background int w Handle short brush boolean update  SetThemeDrawingState disposeNow SetThemeTextColor inBrush isColorDevice SetThemeWindowBackground wHandle
public static final native int Set Theme Text Color short in Brush short depth boolean is Color Device public static final native int Set Theme Window Background int w Handle short brush boolean update public static final native int Set Up Control Background int c Handle short depth boolean is Color Device  SetThemeTextColor inBrush isColorDevice SetThemeWindowBackground wHandle SetUpControlBackground cHandle isColorDevice
public static final native int Set Theme Window Background int w Handle short brush boolean update public static final native int Set Up Control Background int c Handle short depth boolean is Color Device public static final native void SetW Ref Con int w Handle int data  SetThemeWindowBackground wHandle SetUpControlBackground cHandle isColorDevice SetWRefCon wHandle
public static final native int Set Up Control Background int c Handle short depth boolean is Color Device public static final native void SetW Ref Con int w Handle int data public static final native int Set Window Activation Scope int w Handle int scope  SetUpControlBackground cHandle isColorDevice SetWRefCon wHandle SetWindowActivationScope wHandle
public static final native void SetW Ref Con int w Handle int data public static final native int Set Window Activation Scope int w Handle int scope public static final native void Set Window Bounds int window int region Code Rect global Bounds  SetWRefCon wHandle SetWindowActivationScope wHandle SetWindowBounds regionCode globalBounds
public static final native int Set Window Activation Scope int w Handle int scope public static final native void Set Window Bounds int window int region Code Rect global Bounds public static final native int Set Window Default Button int w Handle int c Handle  SetWindowActivationScope wHandle SetWindowBounds regionCode globalBounds SetWindowDefaultButton wHandle cHandle
public static final native void Set Window Bounds int window int region Code Rect global Bounds public static final native int Set Window Default Button int w Handle int c Handle public static final native int Set Window Group int in Window int in New Group  SetWindowBounds regionCode globalBounds SetWindowDefaultButton wHandle cHandle SetWindowGroup inWindow inNewGroup
public static final native int Set Window Default Button int w Handle int c Handle public static final native int Set Window Group int in Window int in New Group public static final native int Set Window Group Owner int in Group int in Window  SetWindowDefaultButton wHandle cHandle SetWindowGroup inWindow inNewGroup SetWindowGroupOwner inGroup inWindow
public static final native int Set Window Group int in Window int in New Group public static final native int Set Window Group Owner int in Group int in Window public static final native int Set Window Group Parent int in Group int in New Group  SetWindowGroup inWindow inNewGroup SetWindowGroupOwner inGroup inWindow SetWindowGroupParent inGroup inNewGroup
public static final native int Set Window Group Owner int in Group int in Window public static final native int Set Window Group Parent int in Group int in New Group public static final native int Set Window Modality int in Window int in Modal Kind int in Unavailable Window  SetWindowGroupOwner inGroup inWindow SetWindowGroupParent inGroup inNewGroup SetWindowModality inWindow inModalKind inUnavailableWindow
public static final native int Set Window Group Parent int in Group int in New Group public static final native int Set Window Modality int in Window int in Modal Kind int in Unavailable Window public static final native int Set Window Title WithCF String int w Handle int s Handle  SetWindowGroupParent inGroup inNewGroup SetWindowModality inWindow inModalKind inUnavailableWindow SetWindowTitleWithCFString wHandle sHandle
public static final native int Set Window Modality int in Window int in Modal Kind int in Unavailable Window public static final native int Set Window Title WithCF String int w Handle int s Handle public static final native void Show Window int w Handle  SetWindowModality inWindow inModalKind inUnavailableWindow SetWindowTitleWithCFString wHandle sHandle ShowWindow wHandle
public static final native int Set Window Title WithCF String int w Handle int s Handle public static final native void Show Window int w Handle public static final native void Size Control int c Handle short w short h  SetWindowTitleWithCFString wHandle sHandle ShowWindow wHandle SizeControl cHandle
public static final native void Show Window int w Handle public static final native void Size Control int c Handle short w short h public static final native void Size Window int w Handle short w short h boolean update  ShowWindow wHandle SizeControl cHandle SizeWindow wHandle
public static final native void Size Control int c Handle short w short h public static final native void Size Window int w Handle short w short h boolean update public static final native boolean Still Down  SizeControl cHandle SizeWindow wHandle StillDown
public static final native void Size Window int w Handle short w short h boolean update public static final native boolean Still Down public static final native int SyncCG Context Origin With Port int in Context int port  SizeWindow wHandle StillDown SyncCGContextOriginWithPort inContext
public static final native boolean Still Down public static final native int SyncCG Context Origin With Port int in Context int port public static final native void Sys Beep short duration  StillDown SyncCGContextOriginWithPort inContext SysBeep
public static final native int SyncCG Context Origin With Port int in Context int port public static final native void Sys Beep short duration public static final native int TXN Activate int tx Handle int frameID boolean scroll Bar State  SyncCGContextOriginWithPort inContext SysBeep TXNActivate txHandle scrollBarState
public static final native void Sys Beep short duration public static final native int TXN Activate int tx Handle int frameID boolean scroll Bar State public static final native void TXN Adjust Cursor int iTXN Object int io Cursor Rgn  SysBeep TXNActivate txHandle scrollBarState TXNAdjustCursor iTXNObject ioCursorRgn
public static final native int TXN Activate int tx Handle int frameID boolean scroll Bar State public static final native void TXN Adjust Cursor int iTXN Object int io Cursor Rgn public static final native void TXN Click int iTXN Object Event Record i Event  TXNActivate txHandle scrollBarState TXNAdjustCursor iTXNObject ioCursorRgn TXNClick iTXNObject EventRecord iEvent
public static final native void TXN Adjust Cursor int iTXN Object int io Cursor Rgn public static final native void TXN Click int iTXN Object Event Record i Event public static final native int TXN Copy int tx Handle  TXNAdjustCursor iTXNObject ioCursorRgn TXNClick iTXNObject EventRecord iEvent TXNCopy txHandle
public static final native void TXN Click int iTXN Object Event Record i Event public static final native int TXN Copy int tx Handle public static final native int TXN Cut int tx Handle  TXNClick iTXNObject EventRecord iEvent TXNCopy txHandle TXNCut txHandle
public static final native int TXN Copy int tx Handle public static final native int TXN Cut int tx Handle public static final native int TXN Data Size int tx Handle  TXNCopy txHandle TXNCut txHandle TXNDataSize txHandle
public static final native int TXN Cut int tx Handle public static final native int TXN Data Size int tx Handle public static final native void TXN Delete Object int tx Handle  TXNCut txHandle TXNDataSize txHandle TXNDeleteObject txHandle
public static final native int TXN Data Size int tx Handle public static final native void TXN Delete Object int tx Handle public static final native void TXN Draw int tx Handle int g Device  TXNDataSize txHandle TXNDeleteObject txHandle TXNDraw txHandle gDevice
public static final native void TXN Delete Object int tx Handle public static final native void TXN Draw int tx Handle int g Device public static final native int TXN Echo Mode int tx Handle char echo Character int encoding boolean on  TXNDeleteObject txHandle TXNDraw txHandle gDevice TXNEchoMode txHandle echoCharacter
public static final native void TXN Draw int tx Handle int g Device public static final native int TXN Echo Mode int tx Handle char echo Character int encoding boolean on public static final native void TXN Focus int tx Handle boolean becoming Focused  TXNDraw txHandle gDevice TXNEchoMode txHandle echoCharacter TXNFocus txHandle becomingFocused
public static final native int TXN Echo Mode int tx Handle char echo Character int encoding boolean on public static final native void TXN Focus int tx Handle boolean becoming Focused public static final native int TXN Get Data int tx Handle int start Offset int end Offset int data Handle  TXNEchoMode txHandle echoCharacter TXNFocus txHandle becomingFocused TXNGetData txHandle startOffset endOffset dataHandle
public static final native void TXN Focus int tx Handle boolean becoming Focused public static final native int TXN Get Data int tx Handle int start Offset int end Offset int data Handle public static final native int TXN Get Line Count int tx Handle int line Total  TXNFocus txHandle becomingFocused TXNGetData txHandle startOffset endOffset dataHandle TXNGetLineCount txHandle lineTotal
public static final native int TXN Get Data int tx Handle int start Offset int end Offset int data Handle public static final native int TXN Get Line Count int tx Handle int line Total public static final native int TXN Get Line Metrics int iTXN Object int i Line Number int o Line Width int o Line Height  TXNGetData txHandle startOffset endOffset dataHandle TXNGetLineCount txHandle lineTotal TXNGetLineMetrics iTXNObject iLineNumber oLineWidth oLineHeight
public static final native int TXN Get Line Count int tx Handle int line Total public static final native int TXN Get Line Metrics int iTXN Object int i Line Number int o Line Width int o Line Height public static final native int TXN GetTXN Object Controls int iTXN Object int i Control Count int i Control Tags int o Control Data  TXNGetLineCount txHandle lineTotal TXNGetLineMetrics iTXNObject iLineNumber oLineWidth oLineHeight TXNGetTXNObjectControls iTXNObject iControlCount iControlTags oControlData
public static final native int TXN Get Line Metrics int iTXN Object int i Line Number int o Line Width int o Line Height public static final native int TXN GetTXN Object Controls int iTXN Object int i Control Count int i Control Tags int o Control Data public static final native int TXN Get Rect Bounds int iTXN Object Rect o View Rect TXN Long Rect o Destination Rect TXN Long Rect o Text Rect  TXNGetLineMetrics iTXNObject iLineNumber oLineWidth oLineHeight TXNGetTXNObjectControls iTXNObject iControlCount iControlTags oControlData TXNGetRectBounds iTXNObject oViewRect TXNLongRect oDestinationRect TXNLongRect oTextRect
public static final native int TXN GetTXN Object Controls int iTXN Object int i Control Count int i Control Tags int o Control Data public static final native int TXN Get Rect Bounds int iTXN Object Rect o View Rect TXN Long Rect o Destination Rect TXN Long Rect o Text Rect public static final native void TXN Get Selection int tx Handle int start Offset int end Offset  TXNGetTXNObjectControls iTXNObject iControlCount iControlTags oControlData TXNGetRectBounds iTXNObject oViewRect TXNLongRect oDestinationRect TXNLongRect oTextRect TXNGetSelection txHandle startOffset endOffset
public static final native int TXN Get Rect Bounds int iTXN Object Rect o View Rect TXN Long Rect o Destination Rect TXN Long Rect o Text Rect public static final native void TXN Get Selection int tx Handle int start Offset int end Offset public static final native void TXN Get View Rect int iTXN Object Rect o View Rect  TXNGetRectBounds iTXNObject oViewRect TXNLongRect oDestinationRect TXNLongRect oTextRect TXNGetSelection txHandle startOffset endOffset TXNGetViewRect iTXNObject oViewRect
public static final native void TXN Get Selection int tx Handle int start Offset int end Offset public static final native void TXN Get View Rect int iTXN Object Rect o View Rect public static final native int TXN Init Textension int i Default Fonts int i Count Default Fonts int i Usage Flags  TXNGetSelection txHandle startOffset endOffset TXNGetViewRect iTXNObject oViewRect TXNInitTextension iDefaultFonts iCountDefaultFonts iUsageFlags
public static final native void TXN Get View Rect int iTXN Object Rect o View Rect public static final native int TXN Init Textension int i Default Fonts int i Count Default Fonts int i Usage Flags public static final native int TXN New Object int i File Spec int i Windw Rect i Frame int i Frame Options int i Frame Type int i File Type int i Permanent Encoding int oTXN Object int oTXN FrameID int i Ref Cpm  TXNGetViewRect iTXNObject oViewRect TXNInitTextension iDefaultFonts iCountDefaultFonts iUsageFlags TXNNewObject iFileSpec iWindw iFrame iFrameOptions iFrameType iFileType iPermanentEncoding oTXNObject oTXNFrameID iRefCpm
public static final native int TXN Init Textension int i Default Fonts int i Count Default Fonts int i Usage Flags public static final native int TXN New Object int i File Spec int i Windw Rect i Frame int i Frame Options int i Frame Type int i File Type int i Permanent Encoding int oTXN Object int oTXN FrameID int i Ref Cpm public static final native int TXN Offset To Point int tx Handle int offset Point point  TXNInitTextension iDefaultFonts iCountDefaultFonts iUsageFlags TXNNewObject iFileSpec iWindw iFrame iFrameOptions iFrameType iFileType iPermanentEncoding oTXNObject oTXNFrameID iRefCpm TXNOffsetToPoint txHandle
public static final native int TXN New Object int i File Spec int i Windw Rect i Frame int i Frame Options int i Frame Type int i File Type int i Permanent Encoding int oTXN Object int oTXN FrameID int i Ref Cpm public static final native int TXN Offset To Point int tx Handle int offset Point point public static final native int TXN Paste int tx Handle  TXNNewObject iFileSpec iWindw iFrame iFrameOptions iFrameType iFileType iPermanentEncoding oTXNObject oTXNFrameID iRefCpm TXNOffsetToPoint txHandle TXNPaste txHandle
public static final native int TXN Offset To Point int tx Handle int offset Point point public static final native int TXN Paste int tx Handle public static final native int TXN Point To Offset int iTXN Object Point i Point int o Offset  TXNOffsetToPoint txHandle TXNPaste txHandle TXNPointToOffset iTXNObject iPoint oOffset
public static final native int TXN Paste int tx Handle public static final native int TXN Point To Offset int iTXN Object Point i Point int o Offset public static final native void TXN Select All int tx Handle  TXNPaste txHandle TXNPointToOffset iTXNObject iPoint oOffset TXNSelectAll txHandle
public static final native int TXN Point To Offset int iTXN Object Point i Point int o Offset public static final native void TXN Select All int tx Handle public static final native void TXN Set Rect Bounds int iTXN Object Rect i View Rect TXN Long Rect i Destination Rect boolean i Update  TXNPointToOffset iTXNObject iPoint oOffset TXNSelectAll txHandle TXNSetRectBounds iTXNObject iViewRect TXNLongRect iDestinationRect iUpdate
public static final native void TXN Select All int tx Handle public static final native void TXN Set Rect Bounds int iTXN Object Rect i View Rect TXN Long Rect i Destination Rect boolean i Update public static final native int TXN Set Background int iTXN Object TXN Background i Background Info  TXNSelectAll txHandle TXNSetRectBounds iTXNObject iViewRect TXNLongRect iDestinationRect iUpdate TXNSetBackground iTXNObject TXNBackground iBackgroundInfo
public static final native void TXN Set Rect Bounds int iTXN Object Rect i View Rect TXN Long Rect i Destination Rect boolean i Update public static final native int TXN Set Background int iTXN Object TXN Background i Background Info public static final native int TXN Set Data int iTXN Object int i Data Type char i Data Ptr int i Data Size int i Start Offset int i End Offset  TXNSetRectBounds iTXNObject iViewRect TXNLongRect iDestinationRect iUpdate TXNSetBackground iTXNObject TXNBackground iBackgroundInfo TXNSetData iTXNObject iDataType iDataPtr iDataSize iStartOffset iEndOffset
public static final native int TXN Set Background int iTXN Object TXN Background i Background Info public static final native int TXN Set Data int iTXN Object int i Data Type char i Data Ptr int i Data Size int i Start Offset int i End Offset public static final native void TXN Set Frame Bounds int tx Handle int top int left int bottom int right int frameID  TXNSetBackground iTXNObject TXNBackground iBackgroundInfo TXNSetData iTXNObject iDataType iDataPtr iDataSize iStartOffset iEndOffset TXNSetFrameBounds txHandle
public static final native int TXN Set Data int iTXN Object int i Data Type char i Data Ptr int i Data Size int i Start Offset int i End Offset public static final native void TXN Set Frame Bounds int tx Handle int top int left int bottom int right int frameID public static final native int TXN Set Selection int tx Handle int start Offset int end Offset  TXNSetData iTXNObject iDataType iDataPtr iDataSize iStartOffset iEndOffset TXNSetFrameBounds txHandle TXNSetSelection txHandle startOffset endOffset
public static final native void TXN Set Frame Bounds int tx Handle int top int left int bottom int right int frameID public static final native int TXN Set Selection int tx Handle int start Offset int end Offset public static final native int TXN Set Type Attributes int iTXN Object int i Attr Count int i Attributes int i Start Offset int i End Offset  TXNSetFrameBounds txHandle TXNSetSelection txHandle startOffset endOffset TXNSetTypeAttributes iTXNObject iAttrCount iAttributes iStartOffset iEndOffset
public static final native int TXN Set Selection int tx Handle int start Offset int end Offset public static final native int TXN Set Type Attributes int iTXN Object int i Attr Count int i Attributes int i Start Offset int i End Offset public static final native int TXN SetTXN Object Controls int iTXN Object boolean i Clear All int i Control Count int i Control Tags int i Control Data  TXNSetSelection txHandle startOffset endOffset TXNSetTypeAttributes iTXNObject iAttrCount iAttributes iStartOffset iEndOffset TXNSetTXNObjectControls iTXNObject iClearAll iControlCount iControlTags iControlData
public static final native int TXN Set Type Attributes int iTXN Object int i Attr Count int i Attributes int i Start Offset int i End Offset public static final native int TXN SetTXN Object Controls int iTXN Object boolean i Clear All int i Control Count int i Control Tags int i Control Data public static final native void TXN Show Selection int tx Handle boolean show End  TXNSetTypeAttributes iTXNObject iAttrCount iAttributes iStartOffset iEndOffset TXNSetTXNObjectControls iTXNObject iClearAll iControlCount iControlTags iControlData TXNShowSelection txHandle showEnd
public static final native int TXN SetTXN Object Controls int iTXN Object boolean i Clear All int i Control Count int i Control Tags int i Control Data public static final native void TXN Show Selection int tx Handle boolean show End public static final native short Test Control int control Point point  TXNSetTXNObjectControls iTXNObject iClearAll iControlCount iControlTags iControlData TXNShowSelection txHandle showEnd TestControl
public static final native void TXN Show Selection int tx Handle boolean show End public static final native short Test Control int control Point point public static final native void Text Face short face  TXNShowSelection txHandle showEnd TestControl TextFace
public static final native short Test Control int control Point point public static final native void Text Face short face public static final native void Text Font short fontID  TestControl TextFace TextFont
public static final native void Text Face short face public static final native void Text Font short fontID public static final native void Text Mode short mode  TextFace TextFont TextMode
public static final native void Text Font short fontID public static final native void Text Mode short mode public static final native void Text Size short size  TextFont TextMode TextSize
public static final native void Text Mode short mode public static final native void Text Size short size public static final native short Text Width byte text Buf short first Byte short byte Count  TextMode TextSize TextWidth textBuf firstByte byteCount
public static final native void Text Size short size public static final native short Text Width byte text Buf short first Byte short byte Count public static final native int Track Drag int the Drag Event Record the Event int the Region  TextSize TextWidth textBuf firstByte byteCount TrackDrag theDrag EventRecord theEvent theRegion
public static final native short Text Width byte text Buf short first Byte short byte Count public static final native int Track Drag int the Drag Event Record the Event int the Region public static final native int Track Mouse Location With Options int in Port int in Options double in Time Point out Pt int out Modifiers short out Result  TextWidth textBuf firstByte byteCount TrackDrag theDrag EventRecord theEvent theRegion TrackMouseLocationWithOptions inPort inOptions inTime outPt outModifiers outResult
public static final native int Track Drag int the Drag Event Record the Event int the Region public static final native int Track Mouse Location With Options int in Port int in Options double in Time Point out Pt int out Modifiers short out Result public static final native void Union Rect Rect srcA Rect srcB Rect dst  TrackDrag theDrag EventRecord theEvent theRegion TrackMouseLocationWithOptions inPort inOptions inTime outPt outModifiers outResult UnionRect
public static final native int Track Mouse Location With Options int in Port int in Options double in Time Point out Pt int out Modifiers short out Result public static final native void Union Rect Rect srcA Rect srcB Rect dst public static final native void Union Rgn int src RgnA int src RgnB int dst Rgn  TrackMouseLocationWithOptions inPort inOptions inTime outPt outModifiers outResult UnionRect UnionRgn srcRgnA srcRgnB dstRgn
public static final native void Union Rect Rect srcA Rect srcB Rect dst public static final native void Union Rgn int src RgnA int src RgnB int dst Rgn public static final native int Unlock Port Bits int port Handle  UnionRect UnionRgn srcRgnA srcRgnB dstRgn UnlockPortBits portHandle
public static final native void Union Rgn int src RgnA int src RgnB int dst Rgn public static final native int Unlock Port Bits int port Handle public static final native void Update Controls int w Handle int rgn Handle  UnionRgn srcRgnA srcRgnB dstRgn UnlockPortBits portHandle UpdateControls wHandle rgnHandle
public static final native int Unlock Port Bits int port Handle public static final native void Update Controls int w Handle int rgn Handle public static final native int Update Data Browser Items int c Handle int container int num Items int items int pre Sort Property int propertyID  UnlockPortBits portHandle UpdateControls wHandle rgnHandle UpdateDataBrowserItems cHandle numItems preSortProperty
public static final native void Update Controls int w Handle int rgn Handle public static final native int Update Data Browser Items int c Handle int container int num Items int items int pre Sort Property int propertyID public static final native int Upgrade Script Info To Text Encoding short i Text ScriptID short i Text LanguageID short i RegionID byte i Text Fontname int o Encoding  UpdateControls wHandle rgnHandle UpdateDataBrowserItems cHandle numItems preSortProperty UpgradeScriptInfoToTextEncoding iTextScriptID iTextLanguageID iRegionID iTextFontname oEncoding
public static final native int Update Data Browser Items int c Handle int container int num Items int items int pre Sort Property int propertyID public static final native int Upgrade Script Info To Text Encoding short i Text ScriptID short i Text LanguageID short i RegionID byte i Text Fontname int o Encoding public static final native boolean Wait Mouse Moved Point initial Global Mouse  UpdateDataBrowserItems cHandle numItems preSortProperty UpgradeScriptInfoToTextEncoding iTextScriptID iTextLanguageID iRegionID iTextFontname oEncoding WaitMouseMoved initialGlobalMouse
public static final native int Upgrade Script Info To Text Encoding short i Text ScriptID short i Text LanguageID short i RegionID byte i Text Fontname int o Encoding public static final native boolean Wait Mouse Moved Point initial Global Mouse public static final native int X2 Fix double x  UpgradeScriptInfoToTextEncoding iTextScriptID iTextLanguageID iRegionID iTextFontname oEncoding WaitMouseMoved initialGlobalMouse X2Fix
public static final native boolean Wait Mouse Moved Point initial Global Mouse public static final native int X2 Fix double x public static final native int Zoom Window Ideal int in Window short in Part Code Point io Ideal Size  WaitMouseMoved initialGlobalMouse X2Fix ZoomWindowIdeal inWindow inPartCode ioIdealSize
public static final native int X2 Fix double x public static final native int Zoom Window Ideal int in Window short in Part Code Point io Ideal Size public static final native void memcpy ATS Trapezoid dest int src int n  X2Fix ZoomWindowIdeal inWindow inPartCode ioIdealSize ATSTrapezoid
public static final native int Zoom Window Ideal int in Window short in Part Code Point io Ideal Size public static final native void memcpy ATS Trapezoid dest int src int n public static final native void memcpy byte dest int src int n  ZoomWindowIdeal inWindow inPartCode ioIdealSize ATSTrapezoid
public static final native void memcpy ATS Trapezoid dest int src int n public static final native void memcpy byte dest int src int n public static final native void memcpy char dest int src int n  ATSTrapezoid
public static final native void memcpy byte dest int src int n public static final native void memcpy char dest int src int n public static final native void memcpy int dest int src int n 
public static final native void memcpy char dest int src int n public static final native void memcpy int dest int src int n public static final native void memcpy int dest int src int n 
public static final native void memcpy int dest int src int n public static final native void memcpy int dest int src int n public static final native void memcpy int dest Pix Map src int n  PixMap
public static final native void memcpy int dest int src int n public static final native void memcpy int dest Pix Map src int n public static final native void memcpy int dest Cursor src int n  PixMap
public static final native void memcpy int dest Pix Map src int n public static final native void memcpy int dest Cursor src int n public static final native void memcpy G Device dest int src int n  PixMap GDevice
public static final native void memcpy int dest Cursor src int n public static final native void memcpy G Device dest int src int n public static final native void memcpy Pix Map dest int src int n  GDevice PixMap
public static final native void memcpy G Device dest int src int n public static final native void memcpy Pix Map dest int src int n public static final native void memcpy Font SelectionQD Style dest int src int n  GDevice PixMap FontSelectionQDStyle
public static final native void memcpy Pix Map dest int src int n public static final native void memcpy Font SelectionQD Style dest int src int n public static final native void memcpy HM Help Content Rec dest int src int n  PixMap FontSelectionQDStyle HMHelpContentRec
public static final native void memcpy Font SelectionQD Style dest int src int n public static final native void memcpy HM Help Content Rec dest int src int n public static final native void memcpy int dest HM Help Content Rec src int n  FontSelectionQDStyle HMHelpContentRec HMHelpContentRec
public static final native void memcpy HM Help Content Rec dest int src int n public static final native void memcpy int dest HM Help Content Rec src int n public static final native void memcpy int dest Bit Map src int n  HMHelpContentRec HMHelpContentRec BitMap
public static final native void memcpy int dest HM Help Content Rec src int n public static final native void memcpy int dest Bit Map src int n public static final native void memcpy int dest char src int n  HMHelpContentRec BitMap
public static final native void memcpy int dest Bit Map src int n public static final native void memcpy int dest char src int n public static final native void memcpy int dest int src int n  BitMap
public static final native void memcpy int dest char src int n public static final native void memcpy int dest int src int n public static final native void memcpy int dest byte src int n 
public static final native void memcpy int dest int src int n public static final native void memcpy int dest byte src int n public static final native void memcpy int dest Font SelectionQD Style src int n  FontSelectionQDStyle
public static final native void memcpy int dest byte src int n public static final native void memcpy int dest Font SelectionQD Style src int n public static final native void memcpy int dest RGB Color src int n  FontSelectionQDStyle RGBColor
public static final native void memcpy int dest Font SelectionQD Style src int n public static final native void memcpy int dest RGB Color src int n public static final native void memcpy Rect dest int src int n  FontSelectionQDStyle RGBColor
public static final native void memcpy int dest RGB Color src int n public static final native void memcpy Rect dest int src int n public static final native void memcpy int dest Rect src int n  RGBColor
public static final native void memcpy Rect dest int src int n public static final native void memcpy int dest Rect src int n public static final native void memcpy char dest byte src int size 
public static final native void memcpy int dest Rect src int n public static final native void memcpy char dest byte src int size public static final native void memcpy byte dest char src int size 
public static final native void memcpy char dest byte src int size public static final native void memcpy byte dest char src int size public static final native void memcpy int dest Event Record src int size  EventRecord
public static final native void memcpy byte dest char src int size public static final native void memcpy int dest Event Record src int size public static final native void memcpy int dest ATSU Tab src int size  EventRecord ATSUTab
public static final native void memcpy int dest Event Record src int size public static final native void memcpy int dest ATSU Tab src int size public static final native void memcpy float dest int src int size  EventRecord ATSUTab
public static final native void memcpy int dest ATSU Tab src int size public static final native void memcpy float dest int src int size public static final native void memset int dest int value int size  ATSUTab

Returns the default code page for the platform where the application is currently running return the default code page public static String default Code Page return Code Page  defaultCodePage CodePage
static byte get Ascii Bytes String str int length str length byte buffer new byte length 1 for int i 0 i length i buffer i byte str char At i return buffer  getAsciiBytes charAt
Converts an array of bytes representing the platform s encoding in the given code page of some character data into an array of matching unicode characters param code Page the code page to use for conversion param buffer the array of bytes to be converted return the unicode conversion public static char mbcs To Wcs String code Page byte buffer Check for the simple cases if buffer null return EMPTY CHAR ARRAY int length buffer length if length 0 return EMPTY CHAR ARRAY String s new String buffer int n s length char chars new char n s get Chars 0 n chars 0 return chars  codePage mbcsToWcs codePage EMPTY_CHAR_ARRAY EMPTY_CHAR_ARRAY getChars
Free any cached resources public static void release 
Converts an array of chars containing unicode data to an array of bytes representing the platform s encoding of those characters in the given code page param code Page the code page to use for conversion param buffer the array of chars to be converted return the platform encoding public static byte wcs To Mbcs String code Page char buffer return wcs To Mbcs code Page buffer false  codePage wcsToMbcs codePage wcsToMbcs codePage
Converts an array of chars containing unicode data to an array of bytes representing the platform s encoding of those characters in the given code page If the termination flag is true the resulting byte data will be null zero terminated param code Page the code page to use for conversion param buffer the array of chars to be converted param terminate code true code if the result should be null terminated and false otherwise return the platform encoding public static byte wcs To Mbcs String code Page char buffer boolean terminate Check for the simple cases if buffer null return terminate NULL BYTE ARRAY EMPTY BYTE ARRAY int length buffer length if length 0 return terminate NULL BYTE ARRAY EMPTY BYTE ARRAY String s new String buffer byte b s get Bytes if terminate return b byte b2 new byte b length 1 System arraycopy b 0 b2 0 b length return b2  codePage wcsToMbcs codePage NULL_BYTE_ARRAY EMPTY_BYTE_ARRAY NULL_BYTE_ARRAY EMPTY_BYTE_ARRAY getBytes
Converts a String containing unicode data to an array of bytes representing the platform s encoding of those characters in the given code page param code Page the code page to use for conversion param string the string to be converted return the platform encoding public static byte wcs To Mbcs String code Page String string return wcs To Mbcs code Page string false  codePage wcsToMbcs codePage wcsToMbcs codePage
Converts a String containing unicode data to an array of bytes representing the platform s encoding of those characters in the given code page If the termination flag is true the resulting byte data will be null zero terminated param code Page the code page to use for conversion param string the string to be converted param terminate code true code if the result should be null terminated and false otherwise return the platform encoding public static byte wcs To Mbcs String code Page String string boolean terminate if terminate if string null return NULL BYTE ARRAY int count string length char buffer new char count 1 string get Chars 0 count buffer 0 return wcs To Mbcs code Page buffer false else if string null return EMPTY BYTE ARRAY int count string length char buffer new char count string get Chars 0 count buffer 0 return wcs To Mbcs code Page buffer false  codePage wcsToMbcs codePage NULL_BYTE_ARRAY getChars wcsToMbcs codePage EMPTY_BYTE_ARRAY getChars wcsToMbcs codePage

Constructs a new instance of this class given only its parent param parent a composite control which will be the parent of the new instance cannot be null exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Print Dialog Shell parent this parent SWT PRIMARY MODAL  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle PrintDialog PRIMARY_MODAL
Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Print Dialog Shell parent int style super parent style check Subclass  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle PrintDialog checkSubclass
Makes the receiver visible and brings it to the front of the display return a printer data object describing the desired print job parameters 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 Printer Data open int buffer new int 1 if OS PM Create Session buffer OS no Err int print Session buffer 0 if OS PM Create Print Settings buffer OS no Err int print Settings buffer 0 OS PM Session Default Print Settings print Session print Settings if OS PM Create Page Format buffer OS no Err int page Format buffer 0 OS PM Session Default Page Format print Session page Format OS PM Session Set Destination print Session print Settings short print To File OS kPM Destination File OS kPM Destination Printer 0 0 if scope Printer Data PAGE RANGE OS PM Set First Page print Settings start Page false OS PM Set Last Page print Settings end Page false OS PM Set Page Range print Settings start Page end Page else OS PM Set Page Range print Settings 1 OS kPM Print All Pages boolean accepted new boolean 1 OS PM Session Page Setup Dialog print Session page Format accepted if accepted 0 OS PM Session Print Dialog print Session print Settings page Format accepted if accepted 0 short dest Type new short 1 OS PM Session Get Destination Type print Session print Settings dest Type String name Printer get Current Printer Name print Session String driver Printer DRIVER switch dest Type 0 case OS kPM Destination Fax driver Printer FAX DRIVER break case OS kPM Destination File driver Printer FILE DRIVER break case OS kPM Destination Preview driver Printer PREVIEW DRIVER break case OS kPM Destination Printer driver Printer PRINTER DRIVER break Printer Data data new Printer Data driver name if dest Type 0 OS kPM Destination File data print To File true OS PM Session Copy Destination Location print Session print Settings buffer int file Name OS CFURL Copy File System Path buffer 0 OS kCFURLPOSIX Path Style OS CF Release buffer 0 data file Name Printer get String file Name OS CF Release file Name OS PM Get Copies print Settings buffer data copy Count buffer 0 OS PM Get First Page print Settings buffer data start Page buffer 0 OS PM Get Last Page print Settings buffer data end Page buffer 0 OS PM Get Page Range print Settings null buffer if data start Page 1 data end Page OS kPM Print All Pages data scope Printer Data ALL PAGES else data scope Printer Data PAGE RANGE boolean collate new boolean 1 OS PM Get Collate print Settings collate data collate collate 0 Serialize settings int flat Settings new int 1 OS PM Flatten Print Settings print Settings flat Settings int flat Format new int 1 OS PM Flatten Page Format page Format flat Format int settings Length OS Get Handle Size flat Settings 0 int format Length OS Get Handle Size flat Format 0 byte other Data data other Data new byte settings Length format Length 8 int offset 0 offset Printer pack Data flat Settings 0 other Data offset offset Printer pack Data flat Format 0 other Data offset OS Dispose Handle flat Settings 0 OS Dispose Handle flat Format 0 scope data scope start Page data start Page end Page data end Page print To File data print To File return data OS PM Release page Format OS PM Release print Settings OS PM Release print Session return null  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS PrinterData PMCreateSession noErr printSession PMCreatePrintSettings noErr printSettings PMSessionDefaultPrintSettings printSession printSettings PMCreatePageFormat noErr pageFormat PMSessionDefaultPageFormat printSession pageFormat PMSessionSetDestination printSession printSettings printToFile kPMDestinationFile kPMDestinationPrinter PrinterData PAGE_RANGE PMSetFirstPage printSettings startPage PMSetLastPage printSettings endPage PMSetPageRange printSettings startPage endPage PMSetPageRange printSettings kPMPrintAllPages PMSessionPageSetupDialog printSession pageFormat PMSessionPrintDialog printSession printSettings pageFormat destType PMSessionGetDestinationType printSession printSettings destType getCurrentPrinterName printSession destType kPMDestinationFax FAX_DRIVER kPMDestinationFile FILE_DRIVER kPMDestinationPreview PREVIEW_DRIVER kPMDestinationPrinter PRINTER_DRIVER PrinterData PrinterData destType kPMDestinationFile printToFile PMSessionCopyDestinationLocation printSession printSettings fileName CFURLCopyFileSystemPath kCFURLPOSIXPathStyle CFRelease fileName getString fileName CFRelease fileName PMGetCopies printSettings copyCount PMGetFirstPage printSettings startPage PMGetLastPage printSettings endPage PMGetPageRange printSettings startPage endPage kPMPrintAllPages PrinterData ALL_PAGES PrinterData PAGE_RANGE PMGetCollate printSettings flatSettings PMFlattenPrintSettings printSettings flatSettings flatFormat PMFlattenPageFormat pageFormat flatFormat settingsLength GetHandleSize flatSettings formatLength GetHandleSize flatFormat otherData otherData settingsLength formatLength packData flatSettings otherData packData flatFormat otherData DisposeHandle flatSettings DisposeHandle flatFormat startPage startPage endPage endPage printToFile printToFile PMRelease pageFormat PMRelease printSettings PMRelease printSession
Returns the print job scope that the user selected before pressing OK in the dialog This will be one of the following values dl dt code ALL PAGES code dt dd Print all pages in the current document dd dt code PAGE RANGE code dt dd Print the range of pages specified by start Page and end Page dd dt code SELECTION code dt dd Print the current selection dd dl return the scope setting that the user selected public int get Scope return scope  ALL_PAGES PAGE_RANGE startPage endPage getScope
Sets the scope of the print job The user will see this setting when the dialog is opened This can have one of the following values dl dt code ALL PAGES code dt dd Print all pages in the current document dd dt code PAGE RANGE code dt dd Print the range of pages specified by start Page and end Page dd dt code SELECTION code dt dd Print the current selection dd dl param scope the scope setting when the dialog is opened public void set Scope int scope this scope scope  ALL_PAGES PAGE_RANGE startPage endPage setScope
Returns the start page setting that the user selected before pressing OK in the dialog p Note that this value is one based and only valid if the scope is code PAGE RANGE code p return the start page setting that the user selected public int get Start Page return start Page  PAGE_RANGE getStartPage startPage
Sets the start page that the user will see when the dialog is opened p Note that this value is one based and only valid if the scope is code PAGE RANGE code p param start Page the start Page setting when the dialog is opened public void set Start Page int start Page this start Page start Page  PAGE_RANGE startPage startPage setStartPage startPage startPage startPage
Returns the end page setting that the user selected before pressing OK in the dialog p Note that this value is one based and only valid if the scope is code PAGE RANGE code p return the end page setting that the user selected public int get End Page return end Page  PAGE_RANGE getEndPage endPage
Sets the end page that the user will see when the dialog is opened p Note that this value is one based and only valid if the scope is code PAGE RANGE code p param end Page the end page setting when the dialog is opened public void set End Page int end Page this end Page end Page  PAGE_RANGE endPage setEndPage endPage endPage endPage
Returns the Print to file setting that the user selected before pressing OK in the dialog return the Print to file setting that the user selected public boolean get Print To File return print To File  getPrintToFile printToFile
Sets the Print to file setting that the user will see when the dialog is opened param print To File the Print to file setting when the dialog is opened public void set Print To File boolean print To File this print To File print To File  printToFile setPrintToFile printToFile printToFile printToFile
protected void check Subclass  checkSubclass

Returns an array of code Printer Data code objects representing all available printers return the list of available printers public static Printer Data get Printer List Printer Data result null int print Session new int 1 OS PM Create Session print Session if print Session 0 0 int printer List new int 1 current Index new int 1 current Printer new int 1 OS PM Session Create Printer List print Session 0 printer List current Index current Printer if printer List 0 0 int count OS CF Array Get Count printer List 0 result new Printer Data count for int i 0 i count i String name get String OS CF Array Get Value At Index printer List 0 i result i new Printer Data DRIVER name OS CF Release printer List 0 OS PM Release print Session 0 return result null new Printer Data 0 result  PrinterData PrinterData getPrinterList PrinterData printSession PMCreateSession printSession printSession printerList currentIndex currentPrinter PMSessionCreatePrinterList printSession printerList currentIndex currentPrinter printerList CFArrayGetCount printerList PrinterData getString CFArrayGetValueAtIndex printerList PrinterData CFRelease printerList PMRelease printSession PrinterData
Returns a code Printer Data code object representing the default printer or code null code if there is no printer available on the System return the default printer data or null since 2 1 public static Printer Data get Default Printer Data Printer Data result null int print Session new int 1 OS PM Create Session print Session if print Session 0 0 String name get Current Printer Name print Session 0 if name null result new Printer Data DRIVER name OS PM Release print Session 0 return result  PrinterData PrinterData getDefaultPrinterData PrinterData printSession PMCreateSession printSession printSession getCurrentPrinterName printSession PrinterData PMRelease printSession
static String get Current Printer Name int print Session String result null int printer List new int 1 current Index new int 1 current Printer new int 1 OS PM Session Create Printer List print Session printer List current Index current Printer if printer List 0 0 int count OS CF Array Get Count printer List 0 if current Index 0 0 current Index 0 count result get String OS CF Array Get Value At Index printer List 0 current Index 0 OS CF Release printer List 0 return result  getCurrentPrinterName printSession printerList currentIndex currentPrinter PMSessionCreatePrinterList printSession printerList currentIndex currentPrinter printerList CFArrayGetCount printerList currentIndex currentIndex getString CFArrayGetValueAtIndex printerList currentIndex CFRelease printerList
static String get String int ptr int length OS CF String Get Length ptr char buffer new char length CF Range range new CF Range range length length OS CF String Get Characters ptr range buffer return new String buffer  getString CFStringGetLength CFRange CFRange CFStringGetCharacters
static int pack Data int handle byte buffer int offset int length OS Get Handle Size handle buffer offset byte length 0xFF 0 buffer offset byte length 0xFF00 8 buffer offset byte length 0xFF0000 16 buffer offset byte length 0xFF000000 24 int ptr new int 1 OS H Lock handle OS memcpy ptr handle 4 byte buffer1 new byte length OS memcpy buffer1 ptr 0 length OS H Unlock handle System arraycopy buffer1 0 buffer offset length return offset length  packData GetHandleSize HLock HUnlock
static int unpack Data int handle byte buffer int offset int length buffer offset 0xFF 0 buffer offset 0xFF 8 buffer offset 0xFF 16 buffer offset 0xFF 24 handle 0 OS New Handle length if handle 0 0 SWT error SWT ERROR NO HANDLES int ptr new int 1 OS H Lock handle 0 OS memcpy ptr handle 0 4 byte buffer1 new byte length System arraycopy buffer offset buffer1 0 length OS memcpy ptr 0 buffer1 length OS H Unlock handle 0 return offset length  unpackData NewHandle ERROR_NO_HANDLES HLock HUnlock
Constructs a new printer representing the default printer p You must dispose the printer when it is no longer required p exception SWT Error ul li ERROR NO HANDLES if there are no valid printers ul see Device dispose public Printer this null  SWTError ERROR_NO_HANDLES
Constructs a new printer given a code Printer Data code object representing the desired printer p You must dispose the printer when it is no longer required p param data the printer data for the specified printer exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the specified printer data does not represent a valid printer ul exception SWT Error ul li ERROR NO HANDLES if there are no valid printers ul see Device dispose public Printer Printer Data data super check Null data  PrinterData IllegalArgumentException ERROR_INVALID_ARGUMENT SWTError ERROR_NO_HANDLES PrinterData checkNull
Given a desired em client area em for the receiver as described by the arguments returns the bounding rectangle which would be required to produce that client area p In other words it returns a rectangle such that if the receiver s bounds were set to that rectangle the area of the receiver which is capable of displaying data that is not covered by the trimmings would be the rectangle described by the arguments relative to the receiver s parent p Note that there is no set Bounds for a printer This method is usually used by passing in the client area the printable area of the printer It can also be useful to pass in 0 0 0 0 param x the desired x coordinate of the client area param y the desired y coordinate of the client area param width the desired width of the client area param height the desired height of the client area return the required bounds to produce the given client area exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see get Bounds see get Client Area public Rectangle compute Trim int x int y int width int height check Device PM Rect page Rect new PM Rect PM Rect paper Rect new PM Rect OS PM Get Adjusted Page Rect page Format page Rect OS PM Get Adjusted Paper Rect page Format paper Rect return new Rectangle x int paper Rect left y int paper Rect top width int paper Rect right page Rect right height int paper Rect bottom page Rect bottom  setBounds SWTException ERROR_DEVICE_DISPOSED getBounds getClientArea computeTrim checkDevice PMRect pageRect PMRect PMRect paperRect PMRect PMGetAdjustedPageRect pageFormat pageRect PMGetAdjustedPaperRect pageFormat paperRect paperRect paperRect paperRect pageRect paperRect pageRect
Creates the printer handle This method is called internally by the instance creation mechanism of the code Device code class protected void create Device Data device Data data Printer Data device Data int buffer new int 1 if OS PM Create Session buffer OS no Err SWT error SWT ERROR NO HANDLES print Session buffer 0 if print Session 0 SWT error SWT ERROR NO HANDLES if data other Data null Deserialize settings int offset 0 byte other Data data other Data offset unpack Data buffer other Data offset int flat Settings buffer 0 offset unpack Data buffer other Data offset int flat Format buffer 0 if OS PM Unflatten Print Settings flat Settings buffer OS no Err SWT error SWT ERROR NO HANDLES print Settings buffer 0 if print Settings 0 SWT error SWT ERROR NO HANDLES if OS PM Unflatten Page Format flat Format buffer OS no Err SWT error SWT ERROR NO HANDLES page Format buffer 0 if page Format 0 SWT error SWT ERROR NO HANDLES OS Dispose Handle flat Settings OS Dispose Handle flat Format else Create default settings if OS PM Create Print Settings buffer OS no Err SWT error SWT ERROR NO HANDLES print Settings buffer 0 if print Settings 0 SWT error SWT ERROR NO HANDLES OS PM Session Default Print Settings print Session print Settings if OS PM Create Page Format buffer OS no Err SWT error SWT ERROR NO HANDLES page Format buffer 0 if page Format 0 SWT error SWT ERROR NO HANDLES OS PM Session Default Page Format print Session page Format if PREVIEW DRIVER equals data driver OS PM Session Set Destination print Session print Settings short OS kPM Destination Preview 0 0 String name data name char buffer1 new char name length name get Chars 0 buffer1 length buffer1 0 int ptr OS CF String Create With Characters OS kCF Allocator Default buffer1 buffer1 length if ptr 0 OS PM Session Set Current Printer print Session ptr OS CF Release ptr OS PM Session Validate Print Settings print Session print Settings null OS PM Session Validate Page Format print Session page Format null int graphics Contexts Array OS CF Array Create Mutable OS kCF Allocator Default 1 0 if graphics Contexts Array 0 OS CF Array Append Value graphics Contexts Array OS kPM Graphics Context Core Graphics OS PM Session Set Document Format Generation print Session OS kPM Document FormatPDF graphics Contexts Array 0 OS CF Release graphics Contexts Array  DeviceData deviceData PrinterData deviceData PMCreateSession noErr ERROR_NO_HANDLES printSession printSession ERROR_NO_HANDLES otherData otherData otherData unpackData otherData flatSettings unpackData otherData flatFormat PMUnflattenPrintSettings flatSettings noErr ERROR_NO_HANDLES printSettings printSettings ERROR_NO_HANDLES PMUnflattenPageFormat flatFormat noErr ERROR_NO_HANDLES pageFormat pageFormat ERROR_NO_HANDLES DisposeHandle flatSettings DisposeHandle flatFormat PMCreatePrintSettings noErr ERROR_NO_HANDLES printSettings printSettings ERROR_NO_HANDLES PMSessionDefaultPrintSettings printSession printSettings PMCreatePageFormat noErr ERROR_NO_HANDLES pageFormat pageFormat ERROR_NO_HANDLES PMSessionDefaultPageFormat printSession pageFormat PREVIEW_DRIVER PMSessionSetDestination printSession printSettings kPMDestinationPreview getChars CFStringCreateWithCharacters kCFAllocatorDefault PMSessionSetCurrentPrinter printSession CFRelease PMSessionValidatePrintSettings printSession printSettings PMSessionValidatePageFormat printSession pageFormat graphicsContextsArray CFArrayCreateMutable kCFAllocatorDefault graphicsContextsArray CFArrayAppendValue graphicsContextsArray kPMGraphicsContextCoreGraphics PMSessionSetDocumentFormatGeneration printSession kPMDocumentFormatPDF graphicsContextsArray CFRelease graphicsContextsArray
Destroys the printer handle This method is called internally by the dispose mechanism of the code Device code class protected void destroy if page Format 0 OS PM Release page Format page Format 0 if print Settings 0 OS PM Release print Settings print Settings 0 if print Session 0 OS PM Release print Session print Session 0  pageFormat PMRelease pageFormat pageFormat printSettings PMRelease printSettings printSettings printSession PMRelease printSession printSession
Invokes platform specific functionality to allocate a new GC handle p b IMPORTANT b This method is em not em part of the public API for code Printer code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param data the platform specific GC data return the platform specific GC handle public int internal new GC GC Data data if is Disposed SWT error SWT ERROR GRAPHIC DISPOSED setup New Page if data null if isGC Created SWT error SWT ERROR INVALID ARGUMENT data device this data background get System Color SWT COLOR WHITE handle data foreground get System Color SWT COLOR BLACK handle data font get System Font isGC Created true return context  internal_new_GC GCData isDisposed ERROR_GRAPHIC_DISPOSED setupNewPage isGCCreated ERROR_INVALID_ARGUMENT getSystemColor COLOR_WHITE getSystemColor COLOR_BLACK getSystemFont isGCCreated
protected void init super init colorspace OS CG Color Space Create DeviceRGB if colorspace 0 SWT error SWT ERROR NO HANDLES  CGColorSpaceCreateDeviceRGB ERROR_NO_HANDLES
Invokes platform specific functionality to dispose a GC handle p b IMPORTANT b This method is em not em part of the public API for code Printer code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param hDC the platform specific GC handle param data the platform specific GC data public void internal dispose GC int context GC Data data if data null isGC Created false  internal_dispose_GC GCData isGCCreated
Releases any internal state prior to destroying this printer This method is called internally by the dispose mechanism of the code Device code class protected void release if colorspace 0 OS CG Color Space Release colorspace colorspace 0 super release  CGColorSpaceRelease
Starts a print job and returns true if the job started successfully and false otherwise p This must be the first method called to initiate a print job followed by any number of start Page end Page calls followed by end Job Calling start Page end Page or end Job before start Job will result in undefined behavior p param job Name the name of the print job to start return true if the job started successfully and false otherwise exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see start Page see end Page see end Job public boolean start Job String job Name check Device if job Name null job Name length 0 char buffer new char job Name length job Name get Chars 0 buffer length buffer 0 int ptr OS CF String Create With Characters OS kCF Allocator Default buffer buffer length if ptr 0 OS PM Set Job NameCF String print Settings ptr OS CF Release ptr return OS PM Session Begin Document No Dialog print Session print Settings page Format OS no Err  startPage endPage endJob startPage endPage endJob startJob jobName SWTException ERROR_DEVICE_DISPOSED startPage endPage endJob startJob jobName checkDevice jobName jobName jobName jobName getChars CFStringCreateWithCharacters kCFAllocatorDefault PMSetJobNameCFString printSettings CFRelease PMSessionBeginDocumentNoDialog printSession printSettings pageFormat noErr
Ends the current print job exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see start Job see start Page see end Page public void end Job check Device if in Page OS PM Session End Page No Dialog print Session in Page false OS PM Session End Document No Dialog print Session  SWTException ERROR_DEVICE_DISPOSED startJob startPage endPage endJob checkDevice inPage PMSessionEndPageNoDialog printSession inPage PMSessionEndDocumentNoDialog printSession
Cancels a print job in progress exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public void cancel Job check Device OS PM Session Set Error print Session OS kPM Cancel  SWTException ERROR_DEVICE_DISPOSED cancelJob checkDevice PMSessionSetError printSession kPMCancel
static Device Data check Null Printer Data data if data null data new Printer Data if data driver null data name null Printer Data default Printer get Default Printer Data if default Printer null SWT error SWT ERROR NO HANDLES data driver default Printer driver data name default Printer name return data  DeviceData checkNull PrinterData PrinterData PrinterData defaultPrinter getDefaultPrinterData defaultPrinter ERROR_NO_HANDLES defaultPrinter defaultPrinter
Starts a page and returns true if the page started successfully and false otherwise p After calling start Job this method may be called any number of times along with a matching end Page p return true if the page started successfully and false otherwise exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see end Page see start Job see end Job public boolean start Page check Device if OS PM Session Error print Session OS no Err return false setup New Page return context 0  startJob endPage SWTException ERROR_DEVICE_DISPOSED endPage startJob endJob startPage checkDevice PMSessionError printSession noErr setupNewPage
Ends the current page exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see start Page see start Job see end Job public void end Page check Device if in Page OS PM Session End Page No Dialog print Session in Page false  SWTException ERROR_DEVICE_DISPOSED startPage startJob endJob endPage checkDevice inPage PMSessionEndPageNoDialog printSession inPage
Returns a point whose x coordinate is the horizontal dots per inch of the printer and whose y coordinate is the vertical dots per inch of the printer return the horizontal and vertical DPI exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public Point getDPI check Device PM Resolution resolution new PM Resolution OS PM Get Resolution page Format resolution return new Point int resolution h Res int resolution v Res  SWTException ERROR_DEVICE_DISPOSED checkDevice PMResolution PMResolution PMGetResolution pageFormat hRes vRes
Returns a rectangle describing the receiver s size and location For a printer this is the size of a page in pixels return the bounding rectangle exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see get Client Area see compute Trim public Rectangle get Bounds check Device PM Rect paper Rect new PM Rect OS PM Get Adjusted Paper Rect page Format paper Rect return new Rectangle 0 0 int paper Rect right paper Rect left int paper Rect bottom paper Rect top  SWTException ERROR_DEVICE_DISPOSED getClientArea computeTrim getBounds checkDevice PMRect paperRect PMRect PMGetAdjustedPaperRect pageFormat paperRect paperRect paperRect paperRect paperRect
Returns a rectangle which describes the area of the receiver which is capable of displaying data For a printer this is the size of the printable area of a page in pixels return the client area exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see get Bounds see compute Trim public Rectangle get Client Area check Device PM Rect page Rect new PM Rect OS PM Get Adjusted Page Rect page Format page Rect return new Rectangle 0 0 int page Rect right page Rect left int page Rect bottom page Rect top  SWTException ERROR_DEVICE_DISPOSED getBounds computeTrim getClientArea checkDevice PMRect pageRect PMRect PMGetAdjustedPageRect pageFormat pageRect pageRect pageRect pageRect pageRect
Returns a code Printer Data code object representing the target printer for this print job return a Printer Data object describing the receiver public Printer Data get Printer Data check Device return data  PrinterData PrinterData PrinterData getPrinterData checkDevice
On the Mac the core graphics context for printing is only valid between PM Session Begin Page and PM Session End Page so printing code has to retrieve and initializes a graphic context for every page like this pre PM Session Begin Document PM Session Begin Page PM Session Get Graphics Context use context PM Session End Page PM Session End Document pre In SWT it is OK to create a GC once between start Job end Job and use it for all pages in between pre start Job GC gc new GC printer start Page use gc end Page gc dispose end Job pre The solution to resolve this difference is to rely on the fact that Mac OS X returns the same but reinitialized graphics context for every page So we only have to account for the fact that SWT assumes that the graphics context keeps it settings across a page break when it actually does not So we have to copy some settings that exist in the CGC before a PM Session End Page to the CGC after a PM Session Begin Page p In addition to this we have to cope with the situation that in SWT we can create a GC before a call to PM Session Begin Page For this we decouple the call to PM Session Begin Page from SWT s method start Page as follows if a new GC is created before a call to start Page internal new GC does the PM Session Begin Page and the next following start Page does nothing p void setup New Page if in Page in Page true OS PM Session Begin Page No Dialog print Session page Format null int buffer new int 1 OS PM Session Get Graphics Context print Session 0 buffer if context 0 context buffer 0 else if context buffer 0 SWT error SWT ERROR UNSPECIFIED PM Rect paper Rect new PM Rect OS PM Get Adjusted Paper Rect page Format paper Rect OS CG Context ScaleCTM context 1 1 OS CG Context TranslateCTM context 0 float paper Rect bottom paper Rect top OS CG Context Set Stroke Color Space context colorspace OS CG Context Set Fill Color Space context colorspace  PMSessionBeginPage PMSessionEndPage PMSessionBeginDocument PMSessionBeginPage PMSessionGetGraphicsContext PMSessionEndPage PMSessionEndDocument startJob endJob startJob startPage endPage endJob PMSessionEndPage PMSessionBeginPage PMSessionBeginPage PMSessionBeginPage startPage startPage internal_new_GC PMSessionBeginPage startPage setupNewPage inPage inPage PMSessionBeginPageNoDialog printSession pageFormat PMSessionGetGraphicsContext printSession ERROR_UNSPECIFIED PMRect paperRect PMRect PMGetAdjustedPaperRect pageFormat paperRect CGContextScaleCTM CGContextTranslateCTM paperRect paperRect CGContextSetStrokeColorSpace CGContextSetFillColorSpace

Prevents uninitialized instances from being created outside the package Program 
Finds the program that is associated with an extension The extension may or may not begin with a Note that a code Display code must already exist to guarantee that this method returns an appropriate result param extension the program extension return the program or code null code exception SWT Error ul li ERROR NULL ARGUMENT when extension is null li ul public static Program find Program String extension if extension null SWT error SWT ERROR NULL ARGUMENT if extension length 0 return null if extension char At 0 extension extension Use the character encoding for the default locale AW TCHAR key new TCHAR 0 extension true int phk Result new int 1 if OS Reg Open Key Ex OS HKEY CLASSES ROOT key 0 OS KEY READ phk Result 0 return null int lpcb Data new int 256 TCHAR lp Data new TCHAR 0 lpcb Data 0 int result OS Reg Query Value Ex phk Result 0 null 0 null lp Data lpcb Data OS Reg Close Key phk Result 0 if result 0 return null return get Program lp Data to String 0 lp Data strlen return get Program extension  SWTError ERROR_NULL_ARGUMENT findProgram ERROR_NULL_ARGUMENT charAt phkResult RegOpenKeyEx HKEY_CLASSES_ROOT KEY_READ phkResult lpcbData lpData lpcbData RegQueryValueEx phkResult lpData lpcbData RegCloseKey phkResult getProgram lpData toString lpData getProgram
Answer all program extensions in the operating system Note that a code Display code must already exist to guarantee that this method returns an appropriate result return an array of extensions public static String get Extensions String extensions new String 1024 Use the character encoding for the default locale AW TCHAR lp Name new TCHAR 0 1024 int lpc Name new int lp Name length FILETIME ft new FILETIME int count 0 AW int dw Index 0 while OS Reg Enum Key Ex OS HKEY CLASSES ROOT dw Index lp Name lpc Name null null null ft OS ERROR NO MORE ITEMS String extension lp Name to String 0 lpc Name 0 lpc Name 0 lp Name length if extension length 0 extension char At 0 if count extensions length String new Extensions new String extensions length 1024 System arraycopy extensions 0 new Extensions 0 extensions length extensions new Extensions extensions count extension dw Index extensions count xml extensions count java extensions count properties extensions count jar extensions count zip extensions count xml if count extensions length String new Extension new String count System arraycopy extensions 0 new Extension 0 count extensions new Extension return extensions  getExtensions lpName lpcName lpName dwIndex RegEnumKeyEx HKEY_CLASSES_ROOT dwIndex lpName lpcName ERROR_NO_MORE_ITEMS lpName toString lpcName lpcName lpName charAt newExtensions newExtensions newExtensions dwIndex newExtension newExtension newExtension
static Program get Program String key Name AW String name get Key Value key String name key if name null name length 0 return null Command AW String COMMAND shell open command String command get Key Value key COMMAND String command usr bin open if command null command length 0 return null Icon AW String DEFAULT ICON Default Icon String icon Name get Key Value key DEFAULT ICON String icon Name icon if icon Name null icon Name length 0 return null Program program new Program program name name program command command program icon Name icon Name return program  getProgram getKeyValue getKeyValue DEFAULT_ICON DefaultIcon iconName getKeyValue DEFAULT_ICON iconName iconName iconName iconName iconName
Answers all available programs in the operating system Note that a code Display code must already exist to guarantee that this method returns an appropriate result return an array of programs public static Program get Programs Program programs new Program 1024 Use the character encoding for the default locale TCHAR lp Name new TCHAR 0 1024 int lpc Name new int lp Name length FILETIME ft new FILETIME int count 0 int dw Index 0 while OS Reg Enum Key Ex OS HKEY CLASSES ROOT dw Index lp Name lpc Name null null null ft OS ERROR NO MORE ITEMS String path lp Name to String 0 lpc Name 0 lpc Name 0 lp Name length Program program get Program path if program null if count programs length Program new Programs new Program programs length 1024 System arraycopy programs 0 new Programs 0 programs length programs new Programs programs count program dw Index programs count get Program html if count programs length Program new Programs new Program count System arraycopy programs 0 new Programs 0 count programs new Programs return programs  getPrograms lpName lpcName lpName dwIndex RegEnumKeyEx HKEY_CLASSES_ROOT dwIndex lpName lpcName ERROR_NO_MORE_ITEMS lpName toString lpcName lpcName lpName getProgram newPrograms newPrograms newPrograms dwIndex getProgram newPrograms newPrograms newPrograms
Launches the executable associated with the file in the operating system If the file is an executable then the executable is launched Note that a code Display code must already exist to guarantee that this method returns an appropriate result param file Name the file or program name return code true code if the file is launched otherwise code false code exception SWT Error ul li ERROR NULL ARGUMENT when file Name is null li ul public static boolean launch String file Name if file Name null SWT error SWT ERROR NULL ARGUMENT String args new String usr bin open file Name try Compatibility exec args return true catch IO Exception ex return false  fileName SWTError ERROR_NULL_ARGUMENT fileName fileName fileName ERROR_NULL_ARGUMENT fileName IOException
Executes the program with the file as the single argument in the operating system It is the responsibility of the programmer to ensure that the file contains valid data for this program param file Name the file or program name return code true code if the file is launched otherwise code false code exception SWT Error ul li ERROR NULL ARGUMENT when file Name is null li ul public boolean execute String file Name if file Name null SWT error SWT ERROR NULL ARGUMENT boolean quote true String prefix command suffix int index command index Of 1 if index 1 int count 0 int i index 2 length command length while i length if command char At i count i quote count 2 0 prefix command substring 0 index suffix command substring index 2 length if quote file Name file Name try Compatibility exec prefix file Name suffix catch IO Exception e return false return true  fileName SWTError ERROR_NULL_ARGUMENT fileName fileName fileName ERROR_NULL_ARGUMENT indexOf charAt fileName fileName fileName IOException
Returns the receiver s image data This is the icon that is associated with the reciever in the operating system return the image data for the program may be null public Image Data get Image Data AW int n Icon Index 0 String file Name icon Name int index icon Name index Of if index 1 file Name icon Name substring 0 index String icon Index icon Name substring index 1 icon Name length trim try n Icon Index Integer parse Int icon Index catch Number Format Exception e Use the character encoding for the default locale TCHAR lpsz File new TCHAR 0 file Name true int phicon Small new int 1 phicon Large null OS Extract Icon Ex lpsz File n Icon Index phicon Large phicon Small 1 if phicon Small 0 0 return null Image image Image win32 new null SWT ICON phicon Small 0 if f Image Data null f Image Data new Image Data 16 16 4 new Palette Data new RGB new RGB 0xff 0xff 0xff new RGB 0x5f 0x5f 0x5f new RGB 0x80 0x80 0x80 new RGB 0xC0 0xC0 0xC0 new RGB 0xDF 0xDF 0xBF new RGB 0xFF 0xDF 0x9F new RGB 0x00 0x00 0x00 f Image Data transparent Pixel 6 use black for transparency String p CCCCCCCCGGG CFAAAAACBGG CAAAAAACFBG CAAAAAACBBB CAAAAAAAAEB CAAAAAAAAEB CAAAAAAAAEB CAAAAAAAAEB CAAAAAAAAEB CAAAAAAAAEB CAAAAAAAAEB CAAAAAAAAEB CDDDDDDDDDB CBBBBBBBBBB for int y 0 y p length y for int x 0 x 11 x f Image Data set Pixel x 3 y 1 p y char At x A return f Image Data  ImageData getImageData nIconIndex fileName iconName iconName indexOf fileName iconName iconIndex iconName iconName nIconIndex parseInt iconIndex NumberFormatException lpszFile fileName phiconSmall phiconLarge ExtractIconEx lpszFile nIconIndex phiconLarge phiconSmall phiconSmall win32_new phiconSmall fImageData fImageData ImageData PaletteData fImageData transparentPixel fImageData setPixel charAt fImageData
Returns the receiver s name This is as short and descriptive a name as possible for the program If the program has no descriptive name this string may be the executable name path or empty return an the name of the program public String get Name return name  getName
Returns true if the receiver and the argument represent the same program return true if the programs are the same public boolean equals Object other if this other return true if other instanceof Program final Program program Program other return name equals program name command equals program command icon Name equals program icon Name return false  iconName iconName
Returns a hash code suitable for this object return a hash code public int hash Code return name hash Code command hash Code icon Name hash Code  hashCode hashCode hashCode iconName hashCode
public String to String return Program name  toString

Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT ARROW see SWT CHECK see SWT PUSH see SWT RADIO see SWT TOGGLE see SWT FLAT see SWT LEFT see SWT RIGHT see SWT CENTER see Widget check Subclass see Widget get Style public Button Composite parent int style super parent check Style style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle checkStyle
Adds the listener to the collection of listeners who will be notified when the control is selected by sending it one of the messages defined in the code Selection Listener code interface p code widget Selected code is called when the control is selected code widget Default Selected code is not called p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
static int check Style int style style check Bits style SWT PUSH SWT ARROW SWT CHECK SWT RADIO SWT TOGGLE 0 if style SWT PUSH SWT TOGGLE 0 return check Bits style SWT CENTER SWT LEFT SWT RIGHT 0 0 0 if style SWT CHECK SWT RADIO 0 return check Bits style SWT LEFT SWT RIGHT SWT CENTER 0 0 0 if style SWT ARROW 0 style SWT NO FOCUS return check Bits style SWT UP SWT DOWN SWT LEFT SWT RIGHT 0 0 return style  checkStyle checkBits checkBits checkBits NO_FOCUS checkBits
void click post Event SWT Selection  postEvent
public Point compute Size int w Hint int h Hint boolean changed check Widget NEEDS WORK empty string if style SWT ARROW 0 int out Metric new int 1 OS Get Theme Metric OS k Theme Metric Disclosure Triangle Height out Metric int width out Metric 0 height out Metric 0 if w Hint SWT DEFAULT width w Hint if h Hint SWT DEFAULT height h Hint return new Point width height int width 0 height 0 if is Image image null Rectangle bounds image get Bounds width bounds width height bounds height else int ptr new int 1 OS Copy Control Title AsCF String handle ptr if ptr 0 0 org eclipse swt internal carbon Point io Bounds new org eclipse swt internal carbon Point if font null OS Get Theme Text Dimensions ptr 0 short default Theme Font OS k Theme State Active false io Bounds null else int current Port new int 1 OS Get Port current Port OS Set Port Window Port OS Get Control Owner handle OS Text Font font id OS Text Face font style OS Text Size font size OS Get Theme Text Dimensions ptr 0 short OS k Theme Current Port Font OS k Theme State Active false io Bounds null OS Set Port current Port 0 width io Bounds h height io Bounds v OS CF Release ptr 0 else width DEFAULT WIDTH height DEFAULT HEIGHT if style SWT CHECK SWT RADIO 0 int out Metric new int 1 int metric style SWT CHECK 0 OS k Theme Metric Check Box Width OS k Theme Metric Radio Button Width OS Get Theme Metric metric out Metric width out Metric 0 3 3 for gap between button and text image height Math max out Metric 0 height else if style SWT FLAT 0 style SWT TOGGLE 0 width 10 height 10 else width 28 int out Metric new int 1 OS Get Theme Metric OS k Theme Metric Push Button Height out Metric height Math max height out Metric 0 Rect inset get Inset width inset left inset right height inset top inset bottom Feature in Mac OS X Setting the width of a bevel button widget to less than 20 will fail This means you can not make a button very small By forcing the width to be greater than or equal to 20 the height of the button can be made very small even 0 width Math max 20 width int border style SWT PUSH 0 2 0 if w Hint SWT DEFAULT width w Hint border 2 if h Hint SWT DEFAULT height h Hint border 2 return new Point width height  computeSize wHint hHint checkWidget outMetric GetThemeMetric kThemeMetricDisclosureTriangleHeight outMetric outMetric outMetric wHint wHint hHint hHint isImage getBounds CopyControlTitleAsCFString ioBounds GetThemeTextDimensions defaultThemeFont kThemeStateActive ioBounds currentPort GetPort currentPort SetPortWindowPort GetControlOwner TextFont TextFace TextSize GetThemeTextDimensions kThemeCurrentPortFont kThemeStateActive ioBounds SetPort currentPort ioBounds ioBounds CFRelease DEFAULT_WIDTH DEFAULT_HEIGHT outMetric kThemeMetricCheckBoxWidth kThemeMetricRadioButtonWidth GetThemeMetric outMetric outMetric outMetric outMetric GetThemeMetric kThemeMetricPushButtonHeight outMetric outMetric getInset wHint wHint hHint hHint
void create Handle int out Control new int 1 int window OS Get Control Owner parent handle if style SWT ARROW 0 int orientation OS k Theme Disclosure Right if style SWT UP 0 orientation OS k Theme Disclosure Right NEEDS WORK if style SWT DOWN 0 orientation OS k Theme Disclosure Down if style SWT LEFT 0 orientation OS k Theme Disclosure Left OS Create Bevel Button Control window null 0 short 0 short OS k Control Behavior Pushbutton 0 short 0 short 0 short 0 out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0 OS Set Control Data handle OS k Control Entire Control OS k Control Bevel Button Kind Tag 2 new short short OS k Theme Disclosure Button OS Set Control32 Bit Maximum handle 2 OS Set Control32 Bit Value handle orientation if style SWT CHECK 0 OS Create Check Box Control window null 0 0 initially off true out Control OS Create Bevel Button Control window null 0 short 0 short OS k Control Behavior Toggles 0 short 0 short 0 short 0 out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0 OS Set Control Data handle OS k Control Entire Control OS k Control Bevel Button Kind Tag 2 new short short OS k Theme Check Box if style SWT RADIO 0 OS Create Radio Button Control window null 0 0 initially off true out Control OS Create Bevel Button Control window null 0 short 0 short OS k Control Behavior Toggles 0 short 0 short 0 short 0 out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0 OS Set Control Data handle OS k Control Entire Control OS k Control Bevel Button Kind Tag 2 new short short OS k Theme Radio Button if style SWT TOGGLE 0 OS Create Bevel Button Control window null 0 short OS k Control Bevel Button Normal Bevel short OS k Control Behavior Toggles 0 short 0 short 0 short 0 out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0 if style SWT FLAT 0 OS Set Control Data handle OS k Control Entire Control OS k Control Bevel Button Kind Tag 2 new short short OS k Theme Rounded Bevel Button if style SWT PUSH 0 if style SWT FLAT 0 OS Create Bevel Button Control window null 0 short 2 short OS k Control Behavior Pushbutton 0 short 0 short 0 short 0 out Control else OS Create Push Button Control window null 0 out Control OS Create Bevel Button Control window null 0 short 2 short OS k Control Behavior Pushbutton 0 short 0 short 0 short 0 out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0 if style SWT FLAT 0 OS Set Control Data handle OS k Control Entire Control OS k Control Bevel Button Kind Tag 2 new short short OS k Theme Push Button Control Font Style Rec font Rec new Control Font Style Rec font Rec flags short OS k Control Use Theme FontID Mask font Rec font short default Theme Font OS Set Control Font Style handle font Rec if style SWT LEFT SWT RIGHT SWT CENTER 0 int text Alignment 0 int graphic Alignment 0 if style SWT LEFT 0 text Alignment OS k Control Bevel Button Align Text Flush Left graphic Alignment OS k Control Bevel Button Align Left if style SWT CENTER 0 text Alignment OS k Control Bevel Button Align Text Center graphic Alignment OS k Control Bevel Button Align Center if style SWT RIGHT 0 text Alignment OS k Control Bevel Button Align Text Flush Right graphic Alignment OS k Control Bevel Button Align Right OS Set Control Data handle OS k Control Entire Control OS k Control Bevel Button Text Align Tag 2 new short short text Alignment OS Set Control Data handle OS k Control Entire Control OS k Control Bevel Button Graphic Align Tag 2 new short short graphic Alignment  createHandle outControl GetControlOwner kThemeDisclosureRight kThemeDisclosureRight kThemeDisclosureDown kThemeDisclosureLeft CreateBevelButtonControl kControlBehaviorPushbutton outControl outControl ERROR_NO_HANDLES outControl SetControlData kControlEntireControl kControlBevelButtonKindTag kThemeDisclosureButton SetControl32BitMaximum SetControl32BitValue CreateCheckBoxControl outControl CreateBevelButtonControl kControlBehaviorToggles outControl outControl ERROR_NO_HANDLES outControl SetControlData kControlEntireControl kControlBevelButtonKindTag kThemeCheckBox CreateRadioButtonControl outControl CreateBevelButtonControl kControlBehaviorToggles outControl outControl ERROR_NO_HANDLES outControl SetControlData kControlEntireControl kControlBevelButtonKindTag kThemeRadioButton CreateBevelButtonControl kControlBevelButtonNormalBevel kControlBehaviorToggles outControl outControl ERROR_NO_HANDLES outControl SetControlData kControlEntireControl kControlBevelButtonKindTag kThemeRoundedBevelButton CreateBevelButtonControl kControlBehaviorPushbutton outControl CreatePushButtonControl outControl CreateBevelButtonControl kControlBehaviorPushbutton outControl outControl ERROR_NO_HANDLES outControl SetControlData kControlEntireControl kControlBevelButtonKindTag kThemePushButton ControlFontStyleRec fontRec ControlFontStyleRec fontRec kControlUseThemeFontIDMask fontRec defaultThemeFont SetControlFontStyle fontRec textAlignment graphicAlignment textAlignment kControlBevelButtonAlignTextFlushLeft graphicAlignment kControlBevelButtonAlignLeft textAlignment kControlBevelButtonAlignTextCenter graphicAlignment kControlBevelButtonAlignCenter textAlignment kControlBevelButtonAlignTextFlushRight graphicAlignment kControlBevelButtonAlignRight SetControlData kControlEntireControl kControlBevelButtonTextAlignTag textAlignment SetControlData kControlEntireControl kControlBevelButtonGraphicAlignTag graphicAlignment
int default Theme Font if display small Fonts return OS k Theme Small System Font return OS k Theme Push Button Font  defaultThemeFont smallFonts kThemeSmallSystemFont kThemePushButtonFont
void draw Widget int control int damage Rgn int visible Rgn int the Event if is Image image null style SWT PUSH 0 style SWT FLAT 0 Rect bounds new Rect content new Rect OS Get Control Bounds handle bounds Theme Button Draw Info draw Info new Theme Button Draw Info draw Info state OS Is Control Active handle OS k Theme State Active OS k Theme State Inactive draw Info adornment OS k Theme Adornment Default OS Get Theme Button Content Bounds bounds OS k Theme Push Button draw Info content int width image null 0 OS CG Image Get Width image handle int height image null 0 OS CG Image Get Height image handle int x bounds right bounds left width 2 int y content bottom content top height 2 GC Data data new GC Data data paint Event the Event data visible Rgn visible Rgn GC gc GC carbon new this data gc draw Image image x y gc dispose super draw Widget control damage Rgn visible Rgn the Event  drawWidget damageRgn visibleRgn theEvent isImage GetControlBounds ThemeButtonDrawInfo drawInfo ThemeButtonDrawInfo drawInfo IsControlActive kThemeStateActive kThemeStateInactive drawInfo kThemeAdornmentDefault GetThemeButtonContentBounds kThemePushButton drawInfo CGImageGetWidth CGImageGetHeight GCData GCData paintEvent theEvent visibleRgn visibleRgn carbon_new drawImage drawWidget damageRgn visibleRgn theEvent
Returns a value which describes the position of the text or image in the receiver The value will be one of code LEFT code code RIGHT code or code CENTER code unless the receiver is an code ARROW code button in which case the alignment will indicate the direction of the arrow one of code LEFT code code RIGHT code code UP code or code DOWN code return the alignment 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 int get Alignment check Widget if style SWT ARROW 0 if style SWT UP 0 return SWT UP if style SWT DOWN 0 return SWT DOWN if style SWT LEFT 0 return SWT LEFT if style SWT RIGHT 0 return SWT RIGHT return SWT UP if style SWT LEFT 0 return SWT LEFT if style SWT CENTER 0 return SWT CENTER if style SWT RIGHT 0 return SWT RIGHT return SWT LEFT  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getAlignment checkWidget
Returns the receiver s image if it has one or null if it does not return the receiver s image 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 Image get Image check Widget return image  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getImage checkWidget
return image String get Name Text return get Text  getNameText getText
Returns code true code if the receiver is selected and false otherwise p When the receiver is of type code CHECK code or code RADIO code it is selected when it is checked When it is of type code TOGGLE code it is selected when it is pushed in If the receiver is of any other type this method returns false return the selection 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 public boolean get Selection check Widget if style SWT CHECK SWT RADIO SWT TOGGLE 0 return false return OS Get Control32 Bit Value handle 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelection checkWidget GetControl32BitValue
Returns the receiver s text which will be an empty string if it has never been set or if the receiver is an code ARROW code button return the receiver s text 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 String get Text check Widget return text  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getText checkWidget
Rect get Inset if style SWT PUSH 0 return super get Inset return display button Inset  getInset getInset buttonInset
int k Event Control Hit int next Handler int the Event int user Data int result super k Event Control Hit next Handler the Event user Data if result OS no Err return result if style SWT RADIO 0 if parent get Style SWT NO RADIO GROUP 0 select Radio post Event SWT Selection return OS event Not Handled Err  kEventControlHit nextHandler theEvent userData kEventControlHit nextHandler theEvent userData noErr getStyle NO_RADIO_GROUP selectRadio postEvent eventNotHandledErr
int k Event Control Set Focus Part int next Handler int the Event int user Data int result super k Event Control Set Focus Part next Handler the Event user Data if result OS no Err return result if style SWT PUSH 0 short part new short 1 OS Get Event Parameter the Event OS k Event Param Control Part OS type Control Part Code null 2 null part menu Shell set Default Button part 0 0 this null false return result  kEventControlSetFocusPart nextHandler theEvent userData kEventControlSetFocusPart nextHandler theEvent userData noErr GetEventParameter theEvent kEventParamControlPart typeControlPartCode menuShell setDefaultButton
void release Widget super release Widget if c Icon 0 destroyC Icon c Icon c Icon 0  releaseWidget releaseWidget cIcon destroyCIcon cIcon cIcon
Removes the listener from the collection of listeners who will be notified when the control is selected param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Selection listener event Table unhook SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable DefaultSelection
void select Radio This code is intentionally commented When two groups of radio buttons with the same parent are separated by another control the correct behavior should be that the two groups act independently This is consistent with radio tool and menu items The commented code implements this behavior int index 0 Control children parent  getChildren while index children length children index this index int i index 1 while i 0 children i set Radio Selection false i int j index 1 while j children length children j set Radio Selection false j set Selection true Control children parent  getChildren for int i 0 i children length i Control child children i if this child child set Radio Selection false set Selection true  selectRadio _getChildren setRadioSelection setRadioSelection setSelection _getChildren setRadioSelection setSelection
Controls how text images and arrows will be displayed in the receiver The argument should be one of code LEFT code code RIGHT code or code CENTER code unless the receiver is an code ARROW code button in which case the argument indicates the direction of the arrow one of code LEFT code code RIGHT code code UP code or code DOWN code param alignment the new alignment 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 set Alignment int alignment if style SWT ARROW 0 if style SWT UP SWT DOWN SWT LEFT SWT RIGHT 0 return style SWT UP SWT DOWN SWT LEFT SWT RIGHT style alignment SWT UP SWT DOWN SWT LEFT SWT RIGHT int orientation OS k Theme Disclosure Right if style SWT UP 0 orientation OS k Theme Disclosure Right NEEDS WORK if style SWT DOWN 0 orientation OS k Theme Disclosure Down if style SWT LEFT 0 orientation OS k Theme Disclosure Left OS Set Control32 Bit Value handle orientation return if alignment SWT LEFT SWT RIGHT SWT CENTER 0 return style SWT LEFT SWT RIGHT SWT CENTER style alignment SWT LEFT SWT RIGHT SWT CENTER int text Alignment 0 int graphic Alignment 0 if style SWT LEFT 0 text Alignment OS k Control Bevel Button Align Text Flush Left graphic Alignment OS k Control Bevel Button Align Left if style SWT CENTER 0 text Alignment OS k Control Bevel Button Align Text Center graphic Alignment OS k Control Bevel Button Align Center if style SWT RIGHT 0 text Alignment OS k Control Bevel Button Align Text Flush Right graphic Alignment OS k Control Bevel Button Align Right OS Set Control Data handle OS k Control Entire Control OS k Control Bevel Button Text Align Tag 2 new short short text Alignment OS Set Control Data handle OS k Control Entire Control OS k Control Bevel Button Graphic Align Tag 2 new short short graphic Alignment redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setAlignment kThemeDisclosureRight kThemeDisclosureRight kThemeDisclosureDown kThemeDisclosureLeft SetControl32BitValue textAlignment graphicAlignment textAlignment kControlBevelButtonAlignTextFlushLeft graphicAlignment kControlBevelButtonAlignLeft textAlignment kControlBevelButtonAlignTextCenter graphicAlignment kControlBevelButtonAlignCenter textAlignment kControlBevelButtonAlignTextFlushRight graphicAlignment kControlBevelButtonAlignRight SetControlData kControlEntireControl kControlBevelButtonTextAlignTag textAlignment SetControlData kControlEntireControl kControlBevelButtonGraphicAlignTag graphicAlignment
public void set Bounds int x int y int width int height check Widget Bug in MacOS X When setting the height of a bevel button to a value less than 20 the button is drawn incorrectly The fix is to force the height to be greater than or equal to 20 if style SWT ARROW 0 height Math max 20 height super set Bounds x y width height  setBounds checkWidget setBounds
void set Default boolean value if style SWT PUSH 0 return int window OS Get Control Owner handle OS Set Window Default Button window value handle 0  setDefault GetControlOwner SetWindowDefaultButton
Sets the receiver s image to the argument which may be null indicating that no image should be displayed param image the image to display on the receiver may be null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the image has been disposed li ul 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 set Image Image image check Widget if style SWT ARROW 0 return if image null image is Disposed error SWT ERROR INVALID ARGUMENT if c Icon 0 destroyC Icon c Icon c Icon 0 this image image is Image true if image null set Text text return if text length 0 int ptr OS CF String Create With Characters OS kCF Allocator Default null 0 if ptr 0 error SWT ERROR CANNOT SET TEXT OS Set Control Title WithCF String handle ptr OS CF Release ptr c Icon createC Icon image Control Button Content Info in Content new Control Button Content Info in Content content Type short OS k Control ContentC Icon Handle in Content icon Ref c Icon OS Set Bevel Button Content Info handle in Content redraw  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setImage checkWidget isDisposed ERROR_INVALID_ARGUMENT cIcon destroyCIcon cIcon cIcon isImage setText CFStringCreateWithCharacters kCFAllocatorDefault ERROR_CANNOT_SET_TEXT SetControlTitleWithCFString CFRelease cIcon createCIcon ControlButtonContentInfo inContent ControlButtonContentInfo inContent contentType kControlContentCIconHandle inContent iconRef cIcon SetBevelButtonContentInfo inContent
boolean set Radio Selection boolean value if style SWT RADIO 0 return false if get Selection value set Selection value post Event SWT Selection return true  setRadioSelection getSelection setSelection postEvent
Sets the selection state of the receiver if it is of type code CHECK code code RADIO code or code TOGGLE code p When the receiver is of type code CHECK code or code RADIO code it is selected when it is checked When it is of type code TOGGLE code it is selected when it is pushed in param selected the new selection 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 public void set Selection boolean selected check Widget if style SWT CHECK SWT RADIO SWT TOGGLE 0 return OS Set Control32 Bit Value handle selected 1 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget SetControl32BitValue
Sets the receiver s text p This method sets the button label The label may include the mnemonic character but must not contain line delimiters p p Mnemonics are indicated by an amp that causes the next character to be the mnemonic When the user presses a key sequence that matches the mnemonic a selection event occurs On most platforms the mnemonic appears underlined but may be emphasised in a platform specific manner The mnemonic indicator character amp can be escaped by doubling it in the string causing a single amp to be displayed p param string the new text exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the text is null li ul 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 set Text String string check Widget if string null error SWT ERROR NULL ARGUMENT if style SWT ARROW 0 return text string if is Image Control Button Content Info in Content new Control Button Content Info in Content content Type short OS k Control Content Text Only OS Set Bevel Button Content Info handle in Content is Image false char buffer new char text length text get Chars 0 buffer length buffer 0 int length fix Mnemonic buffer int ptr OS CF String Create With Characters OS kCF Allocator Default buffer length if ptr 0 error SWT ERROR CANNOT SET TEXT OS Set Control Title WithCF String handle ptr OS CF Release ptr redraw  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setText checkWidget ERROR_NULL_ARGUMENT isImage ControlButtonContentInfo inContent ControlButtonContentInfo inContent contentType kControlContentTextOnly SetBevelButtonContentInfo inContent isImage getChars fixMnemonic CFStringCreateWithCharacters kCFAllocatorDefault ERROR_CANNOT_SET_TEXT SetControlTitleWithCFString CFRelease
int traversal Code int key int the Event int code super traversal Code key the Event if style SWT RADIO 0 code SWT TRAVERSE ARROW NEXT SWT TRAVERSE ARROW PREVIOUS return code  traversalCode theEvent traversalCode theEvent TRAVERSE_ARROW_NEXT TRAVERSE_ARROW_PREVIOUS

Caret caret Canvas Do nothing 
Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Canvas Composite parent int style super parent style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle
Returns the caret p The caret for the control is automatically hidden and shown when the control is painted or resized when focus is gained or lost and when an the control is scrolled To avoid drawing on top of the caret the programmer must hide and show the caret when drawing in the window any other time p return the caret 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 Caret get Caret check Widget return caret  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getCaret checkWidget
int k Event Control Draw int next Handler int the Event int user Data int the Control new int 1 OS Get Event Parameter the Event OS k Event Param Direct Object OS type Control Ref null 4 null the Control boolean is Focus the Control 0 handle caret null caret is Focus Caret if is Focus caret kill Focus int result super k Event Control Draw next Handler the Event user Data if is Focus caret set Focus return result  kEventControlDraw nextHandler theEvent userData theControl GetEventParameter theEvent kEventParamDirectObject typeControlRef theControl isFocus theControl isFocusCaret isFocus killFocus kEventControlDraw nextHandler theEvent userData isFocus setFocus
int k Event Control Set Focus Part int next Handler int the Event int user Data int result super k Event Control Set Focus Part next Handler the Event user Data if caret null is Disposed short part new short 1 OS Get Event Parameter the Event OS k Event Param Control Part OS type Control Part Code null 2 null part if part 0 0 caret set Focus else caret kill Focus return result  kEventControlSetFocusPart nextHandler theEvent userData kEventControlSetFocusPart nextHandler theEvent userData isDisposed GetEventParameter theEvent kEventParamControlPart typeControlPartCode setFocus killFocus
void redraw Widget int control boolean children boolean is Focus caret null caret is Focus Caret if is Focus caret kill Focus super redraw Widget control children if is Focus caret set Focus  redrawWidget isFocus isFocusCaret isFocus killFocus redrawWidget isFocus setFocus
void redraw Widget int control int x int y int width int height boolean all boolean is Focus caret null caret is Focus Caret if is Focus caret kill Focus super redraw Widget control x y width height all if is Focus caret set Focus  redrawWidget isFocus isFocusCaret isFocus killFocus redrawWidget isFocus setFocus
void release Widget if caret null caret release Resources caret null super release Widget  releaseWidget releaseResources releaseWidget
Scrolls a rectangular area of the receiver by first copying the source area to the destination and then causing the area of the source which is not covered by the destination to be repainted Children that intersect the rectangle are optionally moved during the operation In addition outstanding paint events are flushed before the source area is copied to ensure that the contents of the canvas are drawn correctly param destX the x coordinate of the destination param destY the y coordinate of the destination param x the x coordinate of the source param y the y coordinate of the source param width the width of the area param height the height of the area param all code true code if children should be scrolled and code false code otherwise 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 scroll int destX int destY int x int y int width int height boolean all check Widget if width 0 height 0 return int deltaX destX x deltaY destY y if deltaX 0 deltaY 0 return if is Drawing handle return boolean is Focus caret null caret is Focus Caret if is Focus caret kill Focus Rectangle client Rect get Client Area Rectangle source Rect new Rectangle x y width height if source Rect intersects client Rect update all GC gc new GC this gc copy Area x y width height destX destY gc dispose if all Control children  getChildren for int i 0 i children length i Control child children i Rectangle rect child get Bounds if Math min x width rect x rect width Math max x rect x Math min y height rect y rect height Math max y rect y child set Location rect x deltaX rect y deltaY if is Focus caret set Focus  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget isDrawing isFocus isFocusCaret isFocus killFocus clientRect getClientArea sourceRect sourceRect clientRect copyArea _getChildren getBounds setLocation isFocus setFocus
Sets the receiver s caret p The caret for the control is automatically hidden and shown when the control is painted or resized when focus is gained or lost and when an the control is scrolled To avoid drawing on top of the caret the programmer must hide and show the caret when drawing in the window any other time p param caret the new caret for the receiver may be null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the caret has been disposed li ul 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 set Caret Caret caret check Widget Caret new Caret caret Caret old Caret this caret this caret new Caret if has Focus if old Caret null old Caret kill Focus if new Caret null if new Caret is Disposed error SWT ERROR INVALID ARGUMENT new Caret set Focus  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setCaret checkWidget newCaret oldCaret newCaret hasFocus oldCaret oldCaret killFocus newCaret newCaret isDisposed ERROR_INVALID_ARGUMENT newCaret setFocus
public void set Font Font font check Widget if caret null caret set Font font super set Font font  setFont checkWidget setFont setFont

Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Caret Canvas parent int style super parent style this parent parent create Widget  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle createWidget
boolean blink Caret if is Visible return true if is Showing return show Caret if blink Rate 0 return true return hide Caret  blinkCaret isVisible isShowing showCaret blinkRate hideCaret
void create Widget super create Widget blink Rate display get Caret Blink Time is Visible true if parent get Caret null parent set Caret this  createWidget createWidget blinkRate getCaretBlinkTime isVisible getCaret setCaret
boolean draw Caret if parent null return false if parent is Disposed return false int parent Handle parent handle if parent is Drawing parent Handle return false int n Width width n Height height if n Width 0 n Width 1 int window OS Get Control Owner parent Handle int port OS Get Window Port window int current Port new int 1 OS Get Port current Port OS Set Port port int old Clip OS New Rgn int visible Rgn parent get Visible Region parent Handle true OS Get Clip old Clip OS Set Clip visible Rgn Rect rect new Rect OS Get Control Bounds parent Handle rect int left rect left x int top rect top y if image null OS Set Rect rect short left short top short left n Width short top n Height RGB Color color new RGB Color color red short 0xFFFF color green short 0xFFFF color blue short 0xFFFF OS RGB Back Color color OS Invert Rect rect else int image Handle image handle n Width OS CG Image Get Width image Handle n Height OS CG Image Get Height image Handle int bpl OS CG Image Get Bytes Per Row image Handle Rect bounds new Rect bounds right short n Width bounds bottom short n Height Rect port Rect new Rect OS Get Window Bounds window short OS k Window Content Rgn port Rect left port Rect left top port Rect top OS Set Rect rect short left short top short left n Width short top n Height int g World new int 1 OS NewG World From Ptr g World OS k32ARGB Pixel Format bounds 0 0 0 image data bpl int cur Port new int 1 int curG World new int 1 OS GetG World cur Port curG World OS SetG World g World 0 curG World 0 int port Bit Map OS Get Port Bit Map For Copy Bits port int gworld Bit Map OS Get Port Bit Map For Copy Bits g World 0 OS Offset Rgn visible Rgn port Rect left port Rect top OS Copy Bits gworld Bit Map port Bit Map bounds rect short OS not Src Xor visible Rgn OS Offset Rgn visible Rgn short port Rect left short port Rect top OS SetG World cur Port 0 curG World 0 OS DisposeG World g World 0 OS Set Clip old Clip OS Dispose Rgn visible Rgn OS Dispose Rgn old Clip OS Set Port current Port 0 return true  drawCaret isDisposed parentHandle isDrawing parentHandle nWidth nHeight nWidth nWidth GetControlOwner parentHandle GetWindowPort currentPort GetPort currentPort SetPort oldClip NewRgn visibleRgn getVisibleRegion parentHandle GetClip oldClip SetClip visibleRgn GetControlBounds parentHandle SetRect nWidth nHeight RGBColor RGBColor RGBBackColor InvertRect imageHandle nWidth CGImageGetWidth imageHandle nHeight CGImageGetHeight imageHandle CGImageGetBytesPerRow imageHandle nWidth nHeight portRect GetWindowBounds kWindowContentRgn portRect portRect portRect SetRect nWidth nHeight gWorld NewGWorldFromPtr gWorld k32ARGBPixelFormat curPort curGWorld GetGWorld curPort curGWorld SetGWorld gWorld curGWorld portBitMap GetPortBitMapForCopyBits gworldBitMap GetPortBitMapForCopyBits gWorld OffsetRgn visibleRgn portRect portRect CopyBits gworldBitMap portBitMap notSrcXor visibleRgn OffsetRgn visibleRgn portRect portRect SetGWorld curPort curGWorld DisposeGWorld gWorld SetClip oldClip DisposeRgn visibleRgn DisposeRgn oldClip SetPort currentPort
Returns a rectangle describing the receiver s size and location relative to its parent or its display if its parent is null return the receiver s bounding rectangle 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 Rectangle get Bounds check Widget if image null Rectangle rect image get Bounds return new Rectangle x y rect width rect height return new Rectangle x y width height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBounds checkWidget getBounds
Returns the font that the receiver will use to paint textual information return the receiver s font 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 Font get Font check Widget if font null return font return parent get Font  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getFont checkWidget getFont
Returns the image that the receiver will use to paint the caret return the receiver s image 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 Image get Image check Widget return image  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getImage checkWidget
Returns a point describing the receiver s location relative to its parent or its display if its parent is null return the receiver s location 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 Point get Location check Widget return new Point x y  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getLocation checkWidget
Returns the receiver s parent which must be a code Canvas code return the receiver s parent 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 Canvas get Parent check Widget return parent  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getParent checkWidget
Returns a point describing the receiver s size return the receiver s size 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 Point get Size check Widget if image null Rectangle rect image get Bounds return new Point rect width rect height return new Point width height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSize checkWidget getBounds
Returns code true code if the receiver is visible and code false code otherwise p If one of the receiver s ancestors is not visible or some other condition makes the receiver not visible this method may still indicate that it is considered visible even though it may not actually be showing p return the receiver s visibility 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 public boolean get Visible check Widget return is Visible  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getVisible checkWidget isVisible
boolean hide Caret if is Showing return true is Showing false return draw Caret  hideCaret isShowing isShowing drawCaret
Returns code true code if the receiver is visible and all of the receiver s ancestors are visible and code false code otherwise return the receiver s visibility 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 get Visible public boolean is Visible check Widget return is Visible parent is Visible parent has Focus  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getVisible isVisible checkWidget isVisible isVisible hasFocus
boolean is Focus Caret return this display current Caret  isFocusCaret currentCaret
void kill Focus if display current Caret this return display set Current Caret null if is Visible hide Caret  killFocus currentCaret setCurrentCaret isVisible hideCaret
void release Child super release Child if this parent get Caret parent set Caret null  releaseChild releaseChild getCaret setCaret
void release Widget super release Widget if display current Caret this hide Caret display set Current Caret null parent null image null  releaseWidget releaseWidget currentCaret hideCaret setCurrentCaret
Sets the receiver s size and location to the rectangular area specified by the arguments The code x code and code y code arguments are relative to the receiver s parent or its display if its parent is null param x the new x coordinate for the receiver param y the new y coordinate for the receiver param width the new width for the receiver param height the new height for the receiver 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 set Bounds int x int y int width int height check Widget if this x x this y y this width width this height height return boolean is Focus is Focus Caret if is Focus hide Caret this x x this y y this width width this height height parent update Caret if is Focus show Caret  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setBounds checkWidget isFocus isFocusCaret isFocus hideCaret updateCaret isFocus showCaret
Sets the receiver s size and location to the rectangular area specified by the argument The code x code and code y code fields of the rectangle are relative to the receiver s parent or its display if its parent is null param rect the new bounds for the receiver 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 set Bounds Rectangle rect check Widget if rect null error SWT ERROR NULL ARGUMENT set Bounds rect x rect y rect width rect height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setBounds checkWidget ERROR_NULL_ARGUMENT setBounds
void set Focus if display current Caret this return display set Current Caret this if is Visible show Caret  setFocus currentCaret setCurrentCaret isVisible showCaret
Sets the font that the receiver will use to paint textual information to the font specified by the argument or to the default font for that kind of control if the argument is null param font the new font or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the font has been disposed li ul 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 set Font Font font check Widget if font null font is Disposed error SWT ERROR INVALID ARGUMENT this font font  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setFont checkWidget isDisposed ERROR_INVALID_ARGUMENT
Sets the image that the receiver will use to paint the caret to the image specified by the argument or to the default which is a filled rectangle if the argument is null param image the new image or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the image has been disposed li ul 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 set Image Image image check Widget if image null image is Disposed error SWT ERROR INVALID ARGUMENT boolean is Focus is Focus Caret if is Focus hide Caret this image image if is Focus show Caret  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setImage checkWidget isDisposed ERROR_INVALID_ARGUMENT isFocus isFocusCaret isFocus hideCaret isFocus showCaret
Sets the receiver s location to the point specified by the arguments which are relative to the receiver s parent or its display if its parent is null param x the new x coordinate for the receiver param y the new y coordinate for the receiver 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 set Location int x int y check Widget set Bounds x y width height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setLocation checkWidget setBounds
Sets the receiver s location to the point specified by the argument which is relative to the receiver s parent or its display if its parent is null param location the new location for the receiver 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 set Location Point location check Widget if location null error SWT ERROR NULL ARGUMENT set Location location x location y  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setLocation checkWidget ERROR_NULL_ARGUMENT setLocation
Sets the receiver s size to the point specified by the arguments param width the new width for the receiver param height the new height for the receiver 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 set Size int width int height check Widget set Bounds x y width height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSize checkWidget setBounds
Sets the receiver s size to the point specified by the argument param size the new extent for the receiver exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the point is null li ul 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 set Size Point size check Widget if size null error SWT ERROR NULL ARGUMENT set Size size x size y  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSize checkWidget ERROR_NULL_ARGUMENT setSize
Marks the receiver as visible if the argument is code true code and marks it invisible otherwise p If one of the receiver s ancestors is not visible or some other condition makes the receiver not visible marking it visible may not actually cause it to be displayed p param visible the new visibility 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 public void set Visible boolean visible check Widget if visible is Visible return is Visible visible if is Focus Caret return if is Visible show Caret else hide Caret  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setVisible checkWidget isVisible isVisible isFocusCaret isVisible showCaret hideCaret
boolean show Caret if is Showing return true is Showing true return draw Caret  showCaret isShowing isShowing drawCaret

Constructs a new instance of this class given only its parent param parent a composite control which will be the parent of the new instance exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Color Dialog Shell parent this parent SWT APPLICATION MODAL  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle ColorDialog APPLICATION_MODAL
Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Color Dialog Shell parent int style super parent style check Subclass  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle ColorDialog checkSubclass
Returns the currently selected color in the receiver return the RGB value for the selected color may be null see Palette Data getRG Bs public RGB getRGB return rgb  PaletteData getRGBs
Makes the receiver visible and brings it to the front of the display return the selected color or null if the dialog was cancelled no color was selected or an error occurred 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 RGB open Color Picker Info info new Color Picker Info if rgb null info red short rgb red 257 info green short rgb green 257 info blue short rgb blue 257 else info red short 255 257 info green short 255 257 info blue short 255 257 info flags OS k Color Picker Dialog Is Moveable OS k Color Picker Dialog Is Modal NEEDS WORK shouldn t be at mouse location info place Where short OS k At Specified Origin org eclipse swt internal carbon Point mp new org eclipse swt internal carbon Point OS Get Global Mouse mp info v mp v info h mp h if title null NEEDS WORK no title displayed info prompt new byte 256 int length title length if length 255 length 255 info prompt 0 byte length for int i 0 i length i info prompt i 1 byte title char At i rgb null if OS Pick Color info OS no Err info new Color Chosen int red info red 8 0xFF int green info green 8 0xFF int blue info blue 8 0xFF rgb new RGB red green blue return rgb  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ColorPickerInfo ColorPickerInfo kColorPickerDialogIsMoveable kColorPickerDialogIsModal placeWhere kAtSpecifiedOrigin GetGlobalMouse charAt PickColor noErr newColorChosen
Sets the receiver s selected color to be the argument param rgb the new RGB value for the selected color may be null to let the platform select a default when open is called see Palette Data getRG Bs public void setRGB RGB rgb this rgb rgb  PaletteData getRGBs

Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT DROP DOWN see SWT READ ONLY see SWT SIMPLE see Widget check Subclass see Widget get Style public Combo Composite parent int style super parent check Style style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS DROP_DOWN READ_ONLY checkSubclass getStyle checkStyle
Adds the argument to the end of the receiver s list param string the new item exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul 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 exception SWT Error ul li ERROR ITEM NOT ADDED if the operation fails because of an operating system failure li ul see add String int public void add String string check Widget if string null error SWT ERROR NULL ARGUMENT char buffer new char string length string get Chars 0 buffer length buffer 0 int ptr OS CF String Create With Characters OS kCF Allocator Default buffer buffer length if ptr 0 error SWT ERROR ITEM NOT ADDED int result if style SWT READ ONLY 0 result OS Append Menu Item Text WithCF String menu Handle ptr 0 0 null else result OS HI Combo Box Append Text Item handle ptr null OS CF Release ptr if result OS no Err error SWT ERROR ITEM NOT ADDED  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_ADDED checkWidget ERROR_NULL_ARGUMENT getChars CFStringCreateWithCharacters kCFAllocatorDefault ERROR_ITEM_NOT_ADDED READ_ONLY AppendMenuItemTextWithCFString menuHandle HIComboBoxAppendTextItem CFRelease noErr ERROR_ITEM_NOT_ADDED
Adds the argument to the receiver s list at the given zero relative index p Note To add an item at the end of the list use the result of calling code get Item Count code as the index or use code add String code p param string the new item param index the index for the item exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list inclusive li ul 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 exception SWT Error ul li ERROR ITEM NOT ADDED if the operation fails because of an operating system failure li ul see add String public void add String string int index check Widget if string null error SWT ERROR NULL ARGUMENT int count get Item Count if 0 index index count error SWT ERROR INVALID RANGE char buffer new char string length string get Chars 0 buffer length buffer 0 int ptr OS CF String Create With Characters OS kCF Allocator Default buffer buffer length if ptr 0 error SWT ERROR ITEM NOT ADDED int result if style SWT READ ONLY 0 result OS Insert Menu Item Text WithCF String menu Handle ptr short index 0 0 else result OS HI Combo Box Insert Text Item At Index handle index ptr OS CF Release ptr if result OS no Err error SWT ERROR ITEM NOT ADDED  getItemCount IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_ADDED checkWidget ERROR_NULL_ARGUMENT getItemCount ERROR_INVALID_RANGE getChars CFStringCreateWithCharacters kCFAllocatorDefault ERROR_ITEM_NOT_ADDED READ_ONLY InsertMenuItemTextWithCFString menuHandle HIComboBoxInsertTextItemAtIndex CFRelease noErr ERROR_ITEM_NOT_ADDED
Adds the listener to the collection of listeners who will be notified when the receiver s text is modified by sending it one of the messages defined in the code Modify Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Modify Listener see remove Modify Listener public void add Modify Listener Modify Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Modify typed Listener  ModifyListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ModifyListener removeModifyListener addModifyListener ModifyListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener
Adds the listener to the collection of listeners who will be notified when the receiver s selection changes by sending it one of the messages defined in the code Selection Listener code interface p code widget Selected code is called when the combo s list selection changes code widget Default Selected code is typically called when ENTER is pressed the combo s text area p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
static int check Style int style Feature in Windows It is not possible to create a combo box that has a border using Windows style bits All combo boxes draw their own border and do not use the standard Windows border styles Therefore no matter what style bits are specified clear the BORDER bits so that the SWT style will match the Windows widget The Windows behavior is currently implemented on all platforms style SWT BORDER Even though it is legal to create this widget with scroll bars they serve no useful purpose because they do not automatically scroll the widget s client area The fix is to clear the SWT style style SWT H SCROLL SWT V SCROLL style check Bits style SWT DROP DOWN SWT SIMPLE 0 0 0 0 if style SWT SIMPLE 0 return style SWT READ ONLY return style  checkStyle H_SCROLL V_SCROLL checkBits DROP_DOWN READ_ONLY
protected void check Subclass if is Valid Subclass error SWT ERROR INVALID SUBCLASS  checkSubclass isValidSubclass ERROR_INVALID_SUBCLASS
Sets the selection in the receiver s text field to an empty selection starting just before the first character If the text field is editable this has the effect of placing the i beam at the start of the text p Note To clear the selected items in the receiver s list use code deselect All code 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 see deselect All public void clear Selection check Widget if style SWT READ ONLY 0 OS Set Control32 Bit Value handle 0 else char buffer new char 0 int ptr OS CF String Create With Characters OS kCF Allocator Default buffer buffer length if ptr 0 return OS Set Control Data handle OS kHI Combo Box Edit Text Part OS k Control Edit TextCF String Tag 4 new int ptr OS CF Release ptr  deselectAll SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS deselectAll clearSelection checkWidget READ_ONLY SetControl32BitValue CFStringCreateWithCharacters kCFAllocatorDefault SetControlData kHIComboBoxEditTextPart kControlEditTextCFStringTag CFRelease
public Point compute Size int w Hint int h Hint boolean changed check Widget int width 0 height 0 int current Port new int 1 short theme Font short default Theme Font if font null theme Font OS k Theme Current Port Font OS Get Port current Port OS Set Port Window Port OS Get Control Owner handle OS Text Font font id OS Text Face font style OS Text Size font size Font Info info new Font Info OS Get Font Info info height info ascent info descent int ptr new int 1 if style SWT READ ONLY 0 int index OS Get Control Value handle 1 OS Copy Menu Item Text AsCF String menu Handle short index 1 ptr else OS Get Control Data handle short OS kHI Combo Box Edit Text Part OS k Control Edit TextCF String Tag 4 ptr null org eclipse swt internal carbon Point io Bounds new org eclipse swt internal carbon Point if ptr 0 0 OS Get Theme Text Dimensions ptr 0 theme Font OS k Theme State Active false io Bounds null width Math max width io Bounds h height Math max height io Bounds v OS CF Release ptr 0 int count if style SWT READ ONLY 0 count OS Count Menu Items menu Handle else count OS HI Combo Box Get Item Count handle for int i 0 i count i int result if style SWT READ ONLY 0 result OS Copy Menu Item Text AsCF String menu Handle short i 1 ptr else result OS HI Combo Box Copy Text Item At Index handle i ptr if result OS no Err OS Get Theme Text Dimensions ptr 0 theme Font OS k Theme State Active false io Bounds null width Math max width io Bounds h OS CF Release ptr 0 if font null OS Set Port current Port 0 int metric new int 1 if style SWT READ ONLY 0 OS Get Theme Metric OS k Theme Metric Disclosure Button Width metric width metric 0 NOT DONE width 13 else OS Get Theme Metric OS k Theme Metric Combo Box Large Disclosure Width metric width metric 0 OS Get Theme Metric OS k Theme Metric Edit Text Whitespace metric width metric 0 2 height metric 0 2 Rect inset get Inset width inset left inset right height inset top inset bottom if w Hint SWT DEFAULT width w Hint if h Hint SWT DEFAULT height h Hint return new Point width height  computeSize wHint hHint checkWidget currentPort themeFont defaultThemeFont themeFont kThemeCurrentPortFont GetPort currentPort SetPortWindowPort GetControlOwner TextFont TextFace TextSize FontInfo FontInfo GetFontInfo READ_ONLY GetControlValue CopyMenuItemTextAsCFString menuHandle GetControlData kHIComboBoxEditTextPart kControlEditTextCFStringTag ioBounds GetThemeTextDimensions themeFont kThemeStateActive ioBounds ioBounds ioBounds CFRelease READ_ONLY CountMenuItems menuHandle HIComboBoxGetItemCount READ_ONLY CopyMenuItemTextAsCFString menuHandle HIComboBoxCopyTextItemAtIndex noErr GetThemeTextDimensions themeFont kThemeStateActive ioBounds ioBounds CFRelease SetPort currentPort READ_ONLY GetThemeMetric kThemeMetricDisclosureButtonWidth GetThemeMetric kThemeMetricComboBoxLargeDisclosureWidth GetThemeMetric kThemeMetricEditTextWhitespace getInset wHint wHint hHint hHint
Copies the selected text p The current selection is copied to the clipboard 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 since 2 1 public void copy check Widget int str new int 1 short start end if style SWT READ ONLY 0 NEEDS WORK getting whole text not just selection int index OS Get Control Value handle if OS Copy Menu Item Text AsCF String menu Handle short index str OS no Err return start 0 end short OS CF String Get Length str 0 if start end OS CF Release str 0 return else short s new short 2 OS Get Control Data handle short OS kHI Combo Box Edit Text Part OS k Control Edit Text Selection Tag 4 s null if s 0 s 1 return start s 0 end s 1 if OS Get Control Data handle short OS kHI Combo Box Edit Text Part OS k Control Edit TextCF String Tag 4 str null OS no Err return CF Range range new CF Range range location start range length end start int encoding OS CF String Get System Encoding int size new int 1 OS CF String Get Bytes str 0 range encoding byte true null 0 size byte buffer new byte size 0 OS CF String Get Bytes str 0 range encoding byte true buffer size 0 size OS CF Release str 0 OS Clear Current Scrap int scrap new int 1 OS Get Current Scrap scrap OS Put Scrap Flavor scrap 0 OS k Scrap Flavor Type Text 0 buffer length buffer  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget READ_ONLY GetControlValue CopyMenuItemTextAsCFString menuHandle noErr CFStringGetLength CFRelease GetControlData kHIComboBoxEditTextPart kControlEditTextSelectionTag GetControlData kHIComboBoxEditTextPart kControlEditTextCFStringTag noErr CFRange CFRange CFStringGetSystemEncoding CFStringGetBytes CFStringGetBytes CFRelease ClearCurrentScrap GetCurrentScrap PutScrapFlavor kScrapFlavorTypeText
void create Handle NEEDS WORK SIMPLE if style SWT READ ONLY 0 int out Control new int 1 int window OS Get Control Owner parent handle From Control Definitions h Passing in a menu ID of 12345 causes the popup not to try and get the menu from a resource Instead you can build the menu and later stuff the Menu Ref field in the popup data information OS Create Popup Button Control window null 0 short 12345 false short 0 short 0 0 out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0 int menu Ref new int 1 OS Create New Menu short 0 0 menu Ref if menu Ref 0 0 error SWT ERROR NO HANDLES menu Handle menu Ref 0 OS Set Control Popup Menu Handle handle menu Handle OS Set Control32 Bit Maximum handle 0x7FFF else int out Control new int 1 CG Rect rect new CG Rect int in Attributes OS kHI Combo Box Auto Size List Attribute The following code is intentionally commented Auto completion does not allow the user to change case of the text in a combo box in Attributes OS kHI Combo Box Auto Completion Attribute OS HI Combo Box Create rect 0 null 0 in Attributes out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0 OS Set Control Data handle short OS kHI Combo Box Edit Text Part OS kTXN Draw Caret When Inactive Tag 4 new byte 0 OS HI View Set Visible handle true OS Set Control Visibility handle true false  createHandle READ_ONLY outControl GetControlOwner ControlDefinitions MenuRef CreatePopupButtonControl outControl outControl ERROR_NO_HANDLES outControl menuRef CreateNewMenu menuRef menuRef ERROR_NO_HANDLES menuHandle menuRef SetControlPopupMenuHandle menuHandle SetControl32BitMaximum outControl CGRect CGRect inAttributes kHIComboBoxAutoSizeListAttribute inAttributes kHIComboBoxAutoCompletionAttribute HIComboBoxCreate inAttributes outControl outControl ERROR_NO_HANDLES outControl SetControlData kHIComboBoxEditTextPart kTXNDrawCaretWhenInactiveTag HIViewSetVisible SetControlVisibility
Cuts the selected text p The current selection is first copied to the clipboard and then deleted from 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 since 2 1 public void cut NEEDS WORK Modify Verify check Widget int str new int 1 short start end if style SWT READ ONLY 0 NEEDS WORK getting whole text not just selection int index OS Get Control Value handle if OS Copy Menu Item Text AsCF String menu Handle short index str OS no Err return start 0 end short OS CF String Get Length str 0 if start end OS CF Release str 0 return else short s new short 2 OS Get Control Data handle short OS kHI Combo Box Edit Text Part OS k Control Edit Text Selection Tag 4 s null if s 0 s 1 return start s 0 end s 1 if OS Get Control Data handle short OS kHI Combo Box Edit Text Part OS k Control Edit TextCF String Tag 4 str null OS no Err return CF Range range new CF Range range location start range length end start int encoding OS CF String Get System Encoding int size new int 1 OS CF String Get Bytes str 0 range encoding byte true null 0 size byte buffer new byte size 0 OS CF String Get Bytes str 0 range encoding byte true buffer size 0 size OS Clear Current Scrap int scrap new int 1 OS Get Current Scrap scrap OS Put Scrap Flavor scrap 0 OS k Scrap Flavor Type Text 0 buffer length buffer delete selection if style SWT READ ONLY 0 NEEDS WORK else byte new Buffer range location 0 range length start size new int 1 OS CF String Get Bytes str 0 range encoding byte true null 0 size byte pre Buffer new byte size 0 OS CF String Get Bytes str 0 range encoding byte true pre Buffer size 0 size range location end range length OS CF String Get Length str 0 end size new int 1 OS CF String Get Bytes str 0 range encoding byte true null 0 size byte post Buffer new byte size 0 OS CF String Get Bytes str 0 range encoding byte true post Buffer size 0 size new Buffer new byte pre Buffer length post Buffer length System arraycopy pre Buffer 0 new Buffer 0 pre Buffer length System arraycopy post Buffer 0 new Buffer pre Buffer length post Buffer length int ptr OS CF String Create With Bytes OS kCF Allocator Default new Buffer new Buffer length encoding true OS Set Control Data handle OS kHI Combo Box Edit Text Part OS k Control Edit TextCF String Tag 4 new int ptr OS CF Release ptr send Event SWT Modify OS CF Release str 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget READ_ONLY GetControlValue CopyMenuItemTextAsCFString menuHandle noErr CFStringGetLength CFRelease GetControlData kHIComboBoxEditTextPart kControlEditTextSelectionTag GetControlData kHIComboBoxEditTextPart kControlEditTextCFStringTag noErr CFRange CFRange CFStringGetSystemEncoding CFStringGetBytes CFStringGetBytes ClearCurrentScrap GetCurrentScrap PutScrapFlavor kScrapFlavorTypeText READ_ONLY newBuffer CFStringGetBytes preBuffer CFStringGetBytes preBuffer CFStringGetLength CFStringGetBytes postBuffer CFStringGetBytes postBuffer newBuffer preBuffer postBuffer preBuffer newBuffer preBuffer postBuffer newBuffer preBuffer postBuffer CFStringCreateWithBytes kCFAllocatorDefault newBuffer newBuffer SetControlData kHIComboBoxEditTextPart kControlEditTextCFStringTag CFRelease sendEvent CFRelease
Deselects the item at the given zero relative index in the receiver s list If the item at the index was already deselected it remains deselected Indices that are out of range are ignored param index the index of the item to deselect 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 deselect int index check Widget if index 1 return NEEDS WORK  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget
Deselects all selected items in the receiver s list p Note To clear the selection in the receiver s text field use code clear Selection code 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 see clear Selection public void deselect All check Widget NEEDS WORK  clearSelection SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS clearSelection deselectAll checkWidget
Returns the item at the given zero relative index in the receiver s list Throws an exception if the index is out of range param index the index of the item to return return the item at the given index exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li ul 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 exception SWT Error ul li ERROR CANNOT GET ITEM if the operation fails because of an operating system failure li ul public String get Item int index check Widget int count get Item Count if 0 index index count error SWT ERROR INVALID RANGE int ptr new int 1 int result if style SWT READ ONLY 0 result OS Copy Menu Item Text AsCF String menu Handle short index 1 ptr else result OS HI Combo Box Copy Text Item At Index handle index ptr if result OS no Err error SWT ERROR CANNOT GET ITEM int length OS CF String Get Length ptr 0 char buffer new char length CF Range range new CF Range range length length OS CF String Get Characters ptr 0 range buffer OS CF Release ptr 0 return new String buffer  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_ITEM getItem checkWidget getItemCount ERROR_INVALID_RANGE READ_ONLY CopyMenuItemTextAsCFString menuHandle HIComboBoxCopyTextItemAtIndex noErr ERROR_CANNOT_GET_ITEM CFStringGetLength CFRange CFRange CFStringGetCharacters CFRelease
Returns the number of items contained in the receiver s list return the number of items 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 exception SWT Error ul li ERROR CANNOT GET COUNT if the operation fails because of an operating system failure li ul public int get Item Count check Widget if style SWT READ ONLY 0 return OS Count Menu Items menu Handle else return OS HI Combo Box Get Item Count handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_COUNT getItemCount checkWidget READ_ONLY CountMenuItems menuHandle HIComboBoxGetItemCount
Returns the height of the area which would be used to display em one em of the items in the receiver s list return the height of one item 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 exception SWT Error ul li ERROR CANNOT GET ITEM HEIGHT if the operation fails because of an operating system failure li ul public int get Item Height check Widget return 26 NEEDS WORK  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_ITEM_HEIGHT getItemHeight checkWidget
Returns an array of code String code s which are the items in the receiver s list p Note This is not the actual structure used by the receiver to maintain its list of items so modifying the array will not affect the receiver p return the items in the receiver s list 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 exception SWT Error ul li ERROR CANNOT GET ITEM if the operation fails because of an operating system failure li ul public String get Items check Widget int count get Item Count String result new String count for int i 0 i count i result i get Item i return result  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_ITEM getItems checkWidget getItemCount getItem
Returns the orientation of the receiver return the orientation style 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 since 2 1 2 public int get Orientation check Widget return style SWT LEFT TO RIGHT SWT RIGHT TO LEFT  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getOrientation checkWidget LEFT_TO_RIGHT RIGHT_TO_LEFT
Returns a code Point code whose x coordinate is the start of the selection in the receiver s text field and whose y coordinate is the end of the selection The returned values are zero relative An empty selection as indicated by the the x and y coordinates having the same value return a point representing the selection start and end 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 Point get Selection check Widget Point selection if style SWT READ ONLY 0 NEEDS WORK selection new Point 0 0 else short s new short 2 OS Get Control Data handle short OS kHI Combo Box Edit Text Part OS k Control Edit Text Selection Tag 4 s null selection new Point s 0 s 1 return selection  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelection checkWidget READ_ONLY GetControlData kHIComboBoxEditTextPart kControlEditTextSelectionTag
Returns the zero relative index of the item which is currently selected in the receiver s list or 1 if no item is selected return the index of the selected item 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 int get Selection Index check Widget int index if style SWT READ ONLY 0 index OS Get Control Value handle 1 else NEEDS WORK index index Of get Text return index  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelectionIndex checkWidget READ_ONLY GetControlValue indexOf getText
Returns a string containing a copy of the contents of the receiver s text field return the receiver s text 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 String get Text check Widget int ptr new int 1 int result if style SWT READ ONLY 0 int index OS Get Control Value handle 1 result OS Copy Menu Item Text AsCF String menu Handle short index 1 ptr else int actual Size new int 1 result OS Get Control Data handle short OS kHI Combo Box Edit Text Part OS k Control Edit TextCF String Tag 4 ptr actual Size if result OS no Err return int length OS CF String Get Length ptr 0 char buffer new char length CF Range range new CF Range range length length OS CF String Get Characters ptr 0 range buffer OS CF Release ptr 0 return new String buffer  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getText checkWidget READ_ONLY GetControlValue CopyMenuItemTextAsCFString menuHandle actualSize GetControlData kHIComboBoxEditTextPart kControlEditTextCFStringTag actualSize noErr CFStringGetLength CFRange CFRange CFStringGetCharacters CFRelease
Returns the height of the receivers s text field return the text height 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 exception SWT Error ul li ERROR CANNOT GET ITEM HEIGHT if the operation fails because of an operating system failure li ul public int get Text Height check Widget return 26 NEEDS WORK  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_ITEM_HEIGHT getTextHeight checkWidget
Returns the maximum number of characters that the receiver s text field is capable of holding If this has not been changed by code set Text Limit code it will be the constant code Combo LIMIT code return the text limit 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 int get Text Limit check Widget return LIMIT NEEDS WORK  setTextLimit SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getTextLimit checkWidget
Gets the number of items that are visible in the drop down portion of the receiver s list return the number of items that are visible 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 since 3 0 public int get Visible Item Count check Widget if style SWT READ ONLY 0 TODO return get Item Count else int buffer new int 1 OS Get Control Data handle short OS k Control Entire Control OS kHI Combo Box Num Visible Items Tag 4 buffer null return buffer 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getVisibleItemCount checkWidget READ_ONLY getItemCount GetControlData kControlEntireControl kHIComboBoxNumVisibleItemsTag
void hook Events super hook Events if style SWT READ ONLY 0 int command Proc display command Proc int mask new int OS k Event Class Command OS k Event Process Command int menu Target OS Get Menu Event Target menu Handle OS Install Event Handler menu Target command Proc mask length 2 mask handle null  hookEvents hookEvents READ_ONLY commandProc commandProc kEventClassCommand kEventProcessCommand menuTarget GetMenuEventTarget menuHandle InstallEventHandler menuTarget commandProc
Searches the receiver s list starting at the first item index 0 until an item is found that is equal to the argument and returns the index of that item If no item is found returns 1 param string the search item return the index of the item exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul 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 int index Of String string return index Of string 0  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS indexOf indexOf
Searches the receiver s list starting at the given zero relative index until an item is found that is equal to the argument and returns the index of that item If no item is found or the starting index is out of range returns 1 param string the search item param start the zero relative index at which to begin the search return the index of the item exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul 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 int index Of String string int start check Widget if string null error SWT ERROR NULL ARGUMENT int count get Item Count if 0 start start count return 1 for int i start i count i if string equals get Item i return i return 1  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS indexOf checkWidget ERROR_NULL_ARGUMENT getItemCount getItem
Rect get Inset return display combo Inset  getInset comboInset
int k Event Control Activate int next Handler int the Event int user Data int result super k Event Control Activate next Handler the Event user Data if result OS no Err return result Feature in the Macintosh When a combo box gets k Event Control Activate it starts the caret blinking Because there is no clipping on the Macintosh the caret may blink through a widget that is obscurred The fix is to avoid running the default handler return OS no Err  kEventControlActivate nextHandler theEvent userData kEventControlActivate nextHandler theEvent userData noErr kEventControlActivate noErr
int k Event Process Command int next Handler int the Event int user Data int result super k Event Process Command next Handler the Event user Data if result OS no Err return result It is possible but unlikely that application code could have disposed the widget in the modify event If this happens end the processing of the Windows message by returning zero as the result of the window proc Note this should be a send event but selection is updated right way post Event SWT Modify if is Disposed return OS event Not Handled Err post Event SWT Selection return OS event Not Handled Err  kEventProcessCommand nextHandler theEvent userData kEventProcessCommand nextHandler theEvent userData noErr postEvent isDisposed eventNotHandledErr postEvent eventNotHandledErr
int k Event Raw Key int next Handler int the Event int user Data Feature in the Macintosh The combo box widget consumes the k Event Raw Key Down event when the Return key is pressed causing the k Event Text Input Unicode For Key Event to be not sent The fix is to handle the Return key in k Event Raw Key Down instead int key Code new int 1 OS Get Event Parameter the Event OS k Event Param Key Code OS typeU Int32 null key Code length 4 null key Code if key Code 0 36 Return if translate Traversal key Code 0 the Event return OS no Err if send Key Event SWT Key Down the Event return OS no Err post Event SWT Default Selection return OS event Not Handled Err  kEventRawKey nextHandler theEvent userData kEventRawKeyDown kEventTextInputUnicodeForKeyEvent kEventRawKeyDown keyCode GetEventParameter theEvent kEventParamKeyCode typeUInt32 keyCode keyCode keyCode translateTraversal keyCode theEvent noErr sendKeyEvent KeyDown theEvent noErr postEvent DefaultSelection eventNotHandledErr
Pastes text from clipboard p The selected text is deleted from the widget and new text inserted from the clipboard 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 since 2 1 public void paste check Widget NEEDS WORK Modify Verify int scrap new int 1 OS Get Current Scrap scrap int size new int 1 if OS Get Scrap Flavor Size scrap 0 OS k Scrap Flavor Type Text size OS no Err size 0 0 return byte buffer new byte size 0 if OS Get Scrap Flavor Data scrap 0 OS k Scrap Flavor Type Text size buffer OS no Err return if style SWT READ ONLY 0 String string new String buffer int index index Of string if index 1 select index else byte new Buffer int encoding OS CF String Get System Encoding int ptr Old new int 1 if OS Get Control Data handle short OS kHI Combo Box Edit Text Part OS k Control Edit TextCF String Tag 4 ptr Old null OS no Err short s new short 2 OS Get Control Data handle short OS kHI Combo Box Edit Text Part OS k Control Edit Text Selection Tag 4 s null CF Range range new CF Range range location 0 range length s 0 size new int 1 OS CF String Get Bytes ptr Old 0 range encoding byte true null 0 size byte pre Buffer new byte size 0 OS CF String Get Bytes ptr Old 0 range encoding byte true pre Buffer size 0 size range location s 1 range length OS CF String Get Length ptr Old 0 s 1 size new int 1 OS CF String Get Bytes ptr Old 0 range encoding byte true null 0 size byte post Buffer new byte size 0 OS CF String Get Bytes ptr Old 0 range encoding byte true post Buffer size 0 size new Buffer new byte pre Buffer length buffer length post Buffer length System arraycopy pre Buffer 0 new Buffer 0 pre Buffer length System arraycopy buffer 0 new Buffer pre Buffer length buffer length System arraycopy post Buffer 0 new Buffer pre Buffer length buffer length post Buffer length OS CF Release ptr Old 0 else new Buffer buffer int ptr OS CF String Create With Bytes OS kCF Allocator Default new Buffer new Buffer length encoding true OS Set Control Data handle OS kHI Combo Box Edit Text Part OS k Control Edit TextCF String Tag 4 new int ptr OS CF Release ptr send Event SWT Modify  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget GetCurrentScrap GetScrapFlavorSize kScrapFlavorTypeText noErr GetScrapFlavorData kScrapFlavorTypeText noErr READ_ONLY indexOf newBuffer CFStringGetSystemEncoding ptrOld GetControlData kHIComboBoxEditTextPart kControlEditTextCFStringTag ptrOld noErr GetControlData kHIComboBoxEditTextPart kControlEditTextSelectionTag CFRange CFRange CFStringGetBytes ptrOld preBuffer CFStringGetBytes ptrOld preBuffer CFStringGetLength ptrOld CFStringGetBytes ptrOld postBuffer CFStringGetBytes ptrOld postBuffer newBuffer preBuffer postBuffer preBuffer newBuffer preBuffer newBuffer preBuffer postBuffer newBuffer preBuffer postBuffer CFRelease ptrOld newBuffer CFStringCreateWithBytes kCFAllocatorDefault newBuffer newBuffer SetControlData kHIComboBoxEditTextPart kControlEditTextCFStringTag CFRelease sendEvent
void release Widget super release Widget if menu Handle 0 OS Delete Menu OS Get MenuID menu Handle OS Dispose Menu menu Handle menu Handle 0  releaseWidget releaseWidget menuHandle DeleteMenu GetMenuID menuHandle DisposeMenu menuHandle menuHandle
Removes the item from the receiver s list at the given zero relative index param index the index for the item exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li ul 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 exception SWT Error ul li ERROR ITEM NOT REMOVED if the operation fails because of an operating system failure li ul public void remove int index check Widget if index 1 error SWT ERROR INVALID RANGE int count get Item Count if 0 index index count error SWT ERROR INVALID RANGE if style SWT READ ONLY 0 OS Delete Menu Items menu Handle short index 1 1 if index OS Get Control Value handle 1 OS Set Control32 Bit Value handle 0 else OS HI Combo Box Remove Item At Index handle index  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_REMOVED checkWidget ERROR_INVALID_RANGE getItemCount ERROR_INVALID_RANGE READ_ONLY DeleteMenuItems menuHandle GetControlValue SetControl32BitValue HIComboBoxRemoveItemAtIndex
Removes the items from the receiver s list which are between the given zero relative start and end indices inclusive param start the start of the range param end the end of the range exception Illegal Argument Exception ul li ERROR INVALID RANGE if either the start or end are not between 0 and the number of elements in the list minus 1 inclusive li ul 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 exception SWT Error ul li ERROR ITEM NOT REMOVED if the operation fails because of an operating system failure li ul public void remove int start int end check Widget if start end return int count get Item Count if 0 start start end end count error SWT ERROR INVALID RANGE int new End Math min end count 1 if style SWT READ ONLY 0 OS Delete Menu Items menu Handle short start 1 new End start 1 int index OS Get Control Value handle 1 if start index index end OS Set Control32 Bit Value handle 0 else NEEDS WORK for int i new End i start i OS HI Combo Box Remove Item At Index handle i  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_REMOVED checkWidget getItemCount ERROR_INVALID_RANGE newEnd READ_ONLY DeleteMenuItems menuHandle newEnd GetControlValue SetControl32BitValue newEnd HIComboBoxRemoveItemAtIndex
Searches the receiver s list starting at the first item until an item is found that is equal to the argument and removes that item from the list param string the item to remove exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li li ERROR INVALID ARGUMENT if the string is not found in the list li ul 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 exception SWT Error ul li ERROR ITEM NOT REMOVED if the operation fails because of an operating system failure li ul public void remove String string check Widget if string null error SWT ERROR NULL ARGUMENT NEEDS WORK int count get Item Count for int i 0 i count i String s get Item i if string equals s remove i return error SWT ERROR INVALID ARGUMENT  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_REMOVED checkWidget ERROR_NULL_ARGUMENT getItemCount getItem ERROR_INVALID_ARGUMENT
Removes all of the items from the receiver s list 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 remove All check Widget int count get Item Count if style SWT READ ONLY 0 OS Delete Menu Items menu Handle short 1 count OS Set Control32 Bit Value handle 0 else NEEDS WORK if count 0 for int i count 1 i 0 i OS HI Combo Box Remove Item At Index handle i  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS removeAll checkWidget getItemCount READ_ONLY DeleteMenuItems menuHandle SetControl32BitValue HIComboBoxRemoveItemAtIndex
Removes the listener from the collection of listeners who will be notified when the receiver s text is modified param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Modify Listener see add Modify Listener public void remove Modify Listener Modify Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Modify listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ModifyListener addModifyListener removeModifyListener ModifyListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable
Removes the listener from the collection of listeners who will be notified when the receiver s selection changes param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Selection listener event Table unhook SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable DefaultSelection
Selects the item at the given zero relative index in the receiver s list If the item at the index was already selected it remains selected Indices that are out of range are ignored param index the index of the item to select 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 select int index check Widget NEEDS WORK Modify Verify int count get Item Count if 0 index index count if style SWT READ ONLY 0 OS Set Control32 Bit Value handle index 1 else int ptr new int 1 if OS HI Combo Box Copy Text Item At Index handle index ptr OS no Err return OS Set Control Data handle short OS kHI Combo Box Edit Text Part OS k Control Edit TextCF String Tag 4 ptr OS CF Release ptr 0 send Event SWT Modify  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget getItemCount READ_ONLY SetControl32BitValue HIComboBoxCopyTextItemAtIndex noErr SetControlData kHIComboBoxEditTextPart kControlEditTextCFStringTag CFRelease sendEvent
boolean send Key Event int type Event event if super send Key Event type event return false if type SWT Key Down return true if event character 0 return true if style SWT READ ONLY 0 return true Post the modify event so that the character will be inserted into the widget when the modify event is delivered Normally modify events are sent but it is safe to post the event here because this method is called from the event loop post Event SWT Modify return true  sendKeyEvent sendKeyEvent KeyDown READ_ONLY postEvent
Sets the text of the item in the receiver s list at the given zero relative index to the string argument This is equivalent to code remove code ing the old item at the index and then code add code ing the new item at that index param index the index for the item param string the new text for the item exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li li ERROR NULL ARGUMENT if the string is null li ul 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 exception SWT Error ul li ERROR ITEM NOT REMOVED if the remove operation fails because of an operating system failure li li ERROR ITEM NOT ADDED if the add operation fails because of an operating system failure li ul public void set Item int index String string check Widget if string null error SWT ERROR NULL ARGUMENT int count get Item Count if 0 index index count error SWT ERROR INVALID RANGE char buffer new char string length string get Chars 0 buffer length buffer 0 int ptr OS CF String Create With Characters OS kCF Allocator Default buffer buffer length if ptr 0 error SWT ERROR ITEM NOT ADDED int result if style SWT READ ONLY 0 result OS Set Menu Item Text WithCF String menu Handle short index 1 ptr else result OS HI Combo Box Insert Text Item At Index handle index ptr OS HI Combo Box Remove Item At Index handle index 1 OS CF Release ptr if result OS no Err error SWT ERROR ITEM NOT ADDED  IllegalArgumentException ERROR_INVALID_RANGE ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_REMOVED ERROR_ITEM_NOT_ADDED setItem checkWidget ERROR_NULL_ARGUMENT getItemCount ERROR_INVALID_RANGE getChars CFStringCreateWithCharacters kCFAllocatorDefault ERROR_ITEM_NOT_ADDED READ_ONLY SetMenuItemTextWithCFString menuHandle HIComboBoxInsertTextItemAtIndex HIComboBoxRemoveItemAtIndex CFRelease noErr ERROR_ITEM_NOT_ADDED
Sets the receiver s list to be the given array of items param items the array of items exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the items array is null li ul 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 exception SWT Error ul li ERROR ITEM NOT ADDED if the operation fails because of an operating system failure li ul public void set Items String items check Widget if items null error SWT ERROR NULL ARGUMENT remove All if items length 0 return for int i 0 i items length i String string items i if string null continue char buffer new char string length string get Chars 0 buffer length buffer 0 int ptr OS CF String Create With Characters OS kCF Allocator Default buffer buffer length if ptr 0 error SWT ERROR ITEM NOT ADDED int result if style SWT READ ONLY 0 result OS Append Menu Item Text WithCF String menu Handle ptr 0 0 null else int out Index new int 1 result OS HI Combo Box Append Text Item handle ptr out Index OS CF Release ptr if result OS no Err error SWT ERROR ITEM NOT ADDED  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_ADDED setItems checkWidget ERROR_NULL_ARGUMENT removeAll getChars CFStringCreateWithCharacters kCFAllocatorDefault ERROR_ITEM_NOT_ADDED READ_ONLY AppendMenuItemTextWithCFString menuHandle outIndex HIComboBoxAppendTextItem outIndex CFRelease noErr ERROR_ITEM_NOT_ADDED
Sets the orientation of the receiver which must be one of the constants code SWT LEFT TO RIGHT code or code SWT RIGHT TO LEFT code p param orientation new orientation style 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 since 2 1 2 public void set Orientation int orientation check Widget  LEFT_TO_RIGHT RIGHT_TO_LEFT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setOrientation checkWidget
Sets the selection in the receiver s text field to the range specified by the argument whose x coordinate is the start of the selection and whose y coordinate is the end of the selection param selection a point representing the new selection start and end exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the point is null li ul 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 set Selection Point selection check Widget if selection null error SWT ERROR NULL ARGUMENT if style SWT READ ONLY 0 NEEDS WORK else short s new short short selection x short selection y OS Set Control Data handle OS kHI Combo Box Edit Text Part OS k Control Edit Text Selection Tag 4 s  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget ERROR_NULL_ARGUMENT READ_ONLY SetControlData kHIComboBoxEditTextPart kControlEditTextSelectionTag
Sets the contents of the receiver s text field to the given string p Note The text field in a code Combo code is typically only capable of displaying a single line of text Thus setting the text to a string containing line breaks or other special characters will probably cause it to display incorrectly p param string the new text exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul 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 set Text String string check Widget NEEDS WORK Modify Verify if string null error SWT ERROR NULL ARGUMENT if style SWT READ ONLY 0 int index index Of string if index 1 select index else char buffer new char string length string get Chars 0 buffer length buffer 0 int ptr OS CF String Create With Characters OS kCF Allocator Default buffer buffer length if ptr 0 return OS Set Control Data handle OS kHI Combo Box Edit Text Part OS k Control Edit TextCF String Tag 4 new int ptr OS CF Release ptr send Event SWT Modify  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setText checkWidget ERROR_NULL_ARGUMENT READ_ONLY indexOf getChars CFStringCreateWithCharacters kCFAllocatorDefault SetControlData kHIComboBoxEditTextPart kControlEditTextCFStringTag CFRelease sendEvent
Sets the maximum number of characters that the receiver s text field is capable of holding to be the argument param limit new text limit exception Illegal Argument Exception ul li ERROR CANNOT BE ZERO if the limit is zero li ul 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 set Text Limit int limit check Widget if limit 0 error SWT ERROR CANNOT BE ZERO NEEDS WORK  IllegalArgumentException ERROR_CANNOT_BE_ZERO SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setTextLimit checkWidget ERROR_CANNOT_BE_ZERO
Sets the number of items that are visible in the drop down portion of the receiver s list param count the new number of items to be visible 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 since 3 0 public void set Visible Item Count int count check Widget if count 0 return if style SWT READ ONLY 0 TODO else OS Set Control Data handle OS k Control Entire Control OS kHI Combo Box Num Visible Items Tag 4 new int count  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setVisibleItemCount checkWidget READ_ONLY SetControlData kControlEntireControl kHIComboBoxNumVisibleItemsTag

int scrolled Visible Rgn siblings Visible Rgn Composite Do nothing  scrolledVisibleRgn siblingsVisibleRgn
Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT NO BACKGROUND see SWT NO FOCUS see SWT NO MERGE PAINTS see SWT NO REDRAW RESIZE see SWT NO RADIO GROUP see Widget get Style public Composite Composite parent int style super parent style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS NO_BACKGROUND NO_FOCUS NO_MERGE_PAINTS NO_REDRAW_RESIZE NO_RADIO_GROUP getStyle
Control  getChildren short count new short 1 OS Count Sub Controls handle count if count 0 0 return new Control 0 Control children new Control count 0 int out Control new int 1 int i 0 j 0 while i count 0 int status OS Get Indexed Sub Control handle short i 1 out Control if status OS no Err Widget widget display get Widget out Control 0 if widget null widget this if widget instanceof Control children j Control widget i if j count 0 return children Control new Children new Control j System arraycopy children 0 new Children 0 j return new Children  _getChildren CountSubControls outControl GetIndexedSubControl outControl noErr getWidget outControl newChildren newChildren newChildren
Control  getTabList if tab List null return null int count 0 for int i 0 i tab List length i if tab List i is Disposed count if count tab List length return tab List Control new List new Control count int index 0 for int i 0 i tab List length i if tab List i is Disposed new List index tab List i tab List new List return tab List  _getTabList tabList tabList tabList isDisposed tabList tabList newList tabList tabList isDisposed newList tabList tabList newList tabList
public Point compute Size int w Hint int h Hint boolean changed check Widget Point size if layout null if w Hint SWT DEFAULT h Hint SWT DEFAULT size layout compute Size this w Hint h Hint changed else size new Point w Hint h Hint else size minimum Size if size x 0 size x DEFAULT WIDTH if size y 0 size y DEFAULT HEIGHT if w Hint SWT DEFAULT size x w Hint if h Hint SWT DEFAULT size y h Hint Rectangle trim compute Trim 0 0 size x size y return new Point trim width trim height  computeSize wHint hHint checkWidget wHint hHint computeSize wHint hHint wHint hHint minimumSize DEFAULT_WIDTH DEFAULT_HEIGHT wHint wHint hHint hHint computeTrim
protected void check Subclass Do nothing Subclassing is allowed  checkSubclass
Control compute Tab List Control result super compute Tab List if result length 0 return result Control list tab List null  getTabList  getChildren for int i 0 i list length i Control child list i Control child List child compute Tab List if child List length 0 Control new Result new Control result length child List length System arraycopy result 0 new Result 0 result length System arraycopy child List 0 new Result result length child List length result new Result return result  computeTabList computeTabList tabList _getTabList _getChildren childList computeTabList childList newResult childList newResult childList newResult childList newResult
void create Handle state CANVAS GRAB if style SWT BORDER SWT H SCROLL SWT V SCROLL 0 create Scrolled Handle parent handle else create Handle parent handle  createHandle H_SCROLL V_SCROLL createScrolledHandle createHandle
void create Handle int parent Handle int features OS k Control Supports Embedding OS k Control Supports Focus OS k Control Gets Focus On Click int out Control new int 1 int window OS Get Control Owner parent Handle OS Create User Pane Control window null features out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0  createHandle parentHandle kControlSupportsEmbedding kControlSupportsFocus kControlGetsFocusOnClick outControl GetControlOwner parentHandle CreateUserPaneControl outControl outControl ERROR_NO_HANDLES outControl
void create Scrolled Handle int parent Handle int features OS k Control Supports Embedding int out Control new int 1 int window OS Get Control Owner parent Handle OS Create User Pane Control window null features out Control if out Control 0 0 error SWT ERROR NO HANDLES scrolled Handle out Control 0 out Control 0 0 features OS k Control Supports Focus OS k Control Gets Focus On Click OS Create User Pane Control window null features out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0  createScrolledHandle parentHandle kControlSupportsEmbedding outControl GetControlOwner parentHandle CreateUserPaneControl outControl outControl ERROR_NO_HANDLES scrolledHandle outControl outControl kControlSupportsFocus kControlGetsFocusOnClick CreateUserPaneControl outControl outControl ERROR_NO_HANDLES outControl
void draw Background int control if control scrolled Handle if style SWT NO FOCUS 0 hooks Keys draw Focus control has Focus draw Focus Ring has Border get Parent Background inset else draw Background control get Parent Background else if state CANVAS 0 if style SWT NO BACKGROUND 0 draw Background control background  drawBackground scrolledHandle NO_FOCUS hooksKeys drawFocus hasFocus drawFocusRing hasBorder getParentBackground drawBackground getParentBackground NO_BACKGROUND drawBackground
void enable Widget boolean enabled NOT DONE take into account current scroll bar state if state CANVAS 0 if horizontal Bar null horizontal Bar enable Widget enabled if vertical Bar null vertical Bar enable Widget enabled return super enable Widget enabled  enableWidget horizontalBar horizontalBar enableWidget verticalBar verticalBar enableWidget enableWidget
Returns an array containing the receiver s children p Note This is not the actual structure used by the receiver to maintain its list of children so modifying the array will not affect the receiver p return an array of children 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 Control get Children check Widget return  getChildren  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getChildren checkWidget _getChildren
int get Children Count NOTE The current implementation will count non registered children short count new short 1 OS Count Sub Controls handle count return count 0  getChildrenCount CountSubControls
Returns layout which is associated with the receiver or null if one has not been set return the receiver s layout or null 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 Layout get Layout check Widget return layout  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getLayout checkWidget
Gets the last specified tabbing order for the control return tab List the ordered list of controls representing the tab order 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 set Tab List public Control get Tab List check Widget Control tab List  getTabList if tab List null int count 0 Control list  getChildren for int i 0 i list length i if list i is Tab Group count tab List new Control count int index 0 for int i 0 i list length i if list i is Tab Group tab List index list i return tab List  tabList SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setTabList getTabList checkWidget tabList _getTabList tabList _getChildren isTabGroup tabList isTabGroup tabList tabList
int get Visible Region int control boolean clip Children if clip Children control handle if siblings Visible Rgn 0 siblings Visible Rgn OS New Rgn calculate Visible Region control siblings Visible Rgn clip Children int result OS New Rgn OS Copy Rgn siblings Visible Rgn result return result if control scrolled Handle if clip Children return super get Visible Region control clip Children if scrolled Visible Rgn 0 scrolled Visible Rgn OS New Rgn calculate Visible Region control scrolled Visible Rgn clip Children int result OS New Rgn OS Copy Rgn scrolled Visible Rgn result return result return super get Visible Region control clip Children  getVisibleRegion clipChildren clipChildren siblingsVisibleRgn siblingsVisibleRgn NewRgn calculateVisibleRegion siblingsVisibleRgn clipChildren NewRgn CopyRgn siblingsVisibleRgn scrolledHandle clipChildren getVisibleRegion clipChildren scrolledVisibleRgn scrolledVisibleRgn NewRgn calculateVisibleRegion scrolledVisibleRgn clipChildren NewRgn CopyRgn scrolledVisibleRgn getVisibleRegion clipChildren
int k Event Control Click int next Handler int the Event int user Data int result super k Event Control Click next Handler the Event user Data if result OS no Err return result if state CANVAS 0 if is Enabled return result if style SWT NO FOCUS 0 hooks Keys int the Control new int 1 int window OS Get Control Owner handle OS Get Keyboard Focus window the Control if handle the Control 0 short count new short 1 OS Count Sub Controls handle count if count 0 0 if OS Set Keyboard Focus window handle short OS k Control Focus Next Part OS no Err return OS no Err return result  kEventControlClick nextHandler theEvent userData kEventControlClick nextHandler theEvent userData noErr isEnabled NO_FOCUS hooksKeys theControl GetControlOwner GetKeyboardFocus theControl theControl CountSubControls SetKeyboardFocus kControlFocusNextPart noErr noErr
int k Event Control Set Focus Part int next Handler int the Event int user Data int result super k Event Control Set Focus Part next Handler the Event user Data if result OS no Err return result if state CANVAS 0 if scrolled Handle 0 if style SWT NO FOCUS 0 hooks Keys short part new short 1 OS Get Event Parameter the Event OS k Event Param Control Part OS type Control Part Code null 2 null part draw Focus Clipped scrolled Handle part 0 0 draw Focus Ring has Border get Parent Background inset return OS no Err return result  kEventControlSetFocusPart nextHandler theEvent userData kEventControlSetFocusPart nextHandler theEvent userData noErr scrolledHandle NO_FOCUS hooksKeys GetEventParameter theEvent kEventParamControlPart typeControlPartCode drawFocusClipped scrolledHandle drawFocusRing hasBorder getParentBackground noErr
int k Event Raw Key int next Handler int the Event int user Data Feature in the Macintosh For some reason the default handler does not issue k Event Text Input Unicode For Key Event when the user types Command Space The fix is to look for this case and send the key from k Event Raw Key Down instead NOTE This code relies on Command Space being consumed and will deliver two events if this ever changes if state CANVAS 0 int key Code new int 1 OS Get Event Parameter the Event OS k Event Param Key Code OS typeU Int32 null key Code length 4 null key Code if key Code 0 49 Space int modifiers new int 1 OS Get Event Parameter the Event OS k Event Param Key Modifiers OS typeU Int32 null 4 null modifiers if modifiers 0 OS cmd Key if send Key Event SWT Key Down the Event return OS no Err return OS event Not Handled Err  kEventRawKey nextHandler theEvent userData kEventTextInputUnicodeForKeyEvent kEventRawKeyDown keyCode GetEventParameter theEvent kEventParamKeyCode typeUInt32 keyCode keyCode keyCode GetEventParameter theEvent kEventParamKeyModifiers typeUInt32 cmdKey sendKeyEvent KeyDown theEvent noErr eventNotHandledErr
int k Event Text Input Unicode For Key Event int next Handler int the Event int user Data int result super k Event Text Input Unicode For Key Event next Handler the Event user Data if state CANVAS 0 int keyboard Event new int 1 OS Get Event Parameter the Event OS k Event Param Text Input Send Keyboard Event OS type Event Ref null keyboard Event length 4 null keyboard Event int key Code new int 1 OS Get Event Parameter keyboard Event 0 OS k Event Param Key Code OS typeU Int32 null key Code length 4 null key Code switch key Code 0 case 36 Return Feature in the Macintosh The default behaviour when the return key is pressed is to select the default button This is not the expected behaviour for Composite and its subclasses The fix is to avoid calling the default handler return OS no Err return result  kEventTextInputUnicodeForKeyEvent nextHandler theEvent userData kEventTextInputUnicodeForKeyEvent nextHandler theEvent userData keyboardEvent GetEventParameter theEvent kEventParamTextInputSendKeyboardEvent typeEventRef keyboardEvent keyboardEvent keyCode GetEventParameter keyboardEvent kEventParamKeyCode typeUInt32 keyCode keyCode keyCode noErr
boolean hooks Keys return hooks SWT Key Down hooks SWT Key Up  hooksKeys KeyDown KeyUp
void invalidate Children Visible Region int control Control children  getChildren for int i 0 i children length i Control child children i child reset Visible Region control child invalidate Children Visible Region control  invalidateChildrenVisibleRegion _getChildren resetVisibleRegion invalidateChildrenVisibleRegion
boolean is Tab Group if state CANVAS 0 return true return super is Tab Group  isTabGroup isTabGroup
If the receiver has a layout asks the layout to em lay out em that is set the size and location of the receiver s children If the receiver does not have a layout do nothing p This is equivalent to calling code layout true code 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 layout check Widget layout true  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget
If the receiver has a layout asks the layout to em lay out em that is set the size and location of the receiver s children If the the argument is code true code the layout must not rely on any cached information it is keeping about the children If it is code false code the layout may potentially simplify the work it is doing by assuming that the state of the none of the receiver s children has changed since the last layout If the receiver does not have a layout do nothing param changed code true code if the layout must flush its caches and code false code otherwise 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 layout boolean changed check Widget if layout null return int count get Children Count if count 0 return layout layout this changed  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget getChildrenCount
Point minimum Size Control children  getChildren int width 0 height 0 for int i 0 i children length i Rectangle rect children i get Bounds width Math max width rect x rect width height Math max height rect y rect height return new Point width height  minimumSize _getChildren getBounds
void release Children Control children  getChildren for int i 0 i children length i Control child children i if child is Disposed child release Resources  releaseChildren _getChildren isDisposed releaseResources
void release Widget release Children super release Widget if scrolled Visible Rgn 0 OS Dispose Rgn scrolled Visible Rgn if siblings Visible Rgn 0 OS Dispose Rgn siblings Visible Rgn siblings Visible Rgn scrolled Visible Rgn 0 layout null tab List null  releaseWidget releaseChildren releaseWidget scrolledVisibleRgn DisposeRgn scrolledVisibleRgn siblingsVisibleRgn DisposeRgn siblingsVisibleRgn siblingsVisibleRgn scrolledVisibleRgn tabList
void reset Visible Region int control if scrolled Visible Rgn 0 OS Dispose Rgn scrolled Visible Rgn scrolled Visible Rgn 0 if siblings Visible Rgn 0 OS Dispose Rgn siblings Visible Rgn siblings Visible Rgn 0 super reset Visible Region control  resetVisibleRegion scrolledVisibleRgn DisposeRgn scrolledVisibleRgn scrolledVisibleRgn siblingsVisibleRgn DisposeRgn siblingsVisibleRgn siblingsVisibleRgn resetVisibleRegion
int set Bounds int control int x int y int width int height boolean move boolean resize boolean events int result super set Bounds control x y width height move resize events if layout null result RESIZED 0 layout layout this false return result  setBounds setBounds
public boolean set Focus check Widget Control children  getChildren for int i 0 i children length i if children i set Focus return true return super set Focus  setFocus checkWidget _getChildren setFocus setFocus
Sets the layout which is associated with the receiver to be the argument which may be null param layout the receiver s new layout or null 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 set Layout Layout layout check Widget this layout layout  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setLayout checkWidget
boolean set Tab Group Focus if is Tab Item return set Tab Item Focus boolean take Focus style SWT NO FOCUS 0 if state CANVAS 0 take Focus hooks Keys if take Focus set Tab Item Focus return true Control children  getChildren for int i 0 i children length i Control child children i if child is Tab Item child set Tab Item Focus return true return false  setTabGroupFocus isTabItem setTabItemFocus takeFocus NO_FOCUS takeFocus hooksKeys takeFocus setTabItemFocus _getChildren isTabItem setTabItemFocus
Sets the tabbing order for the specified controls to match the order that they occur in the argument list param tab List the ordered list of controls representing the tab order or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if a widget in the tab List is null or has been disposed li li ERROR INVALID PARENT if widget in the tab List is not in the same widget tree li ul 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 set Tab List Control tab List check Widget if tab List null for int i 0 i tab List length i Control control tab List i if control null error SWT ERROR INVALID ARGUMENT if control is Disposed error SWT ERROR INVALID ARGUMENT if control parent this error SWT ERROR INVALID PARENT Control new List new Control tab List length System arraycopy tab List 0 new List 0 tab List length tab List new List this tab List tab List  tabList IllegalArgumentException ERROR_INVALID_ARGUMENT tabList ERROR_INVALID_PARENT tabList SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setTabList tabList checkWidget tabList tabList tabList ERROR_INVALID_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT ERROR_INVALID_PARENT newList tabList tabList newList tabList tabList newList tabList tabList
void setZ Order super setZ Order if scrolled Handle 0 OS HI View Add Subview scrolled Handle handle  setZOrder setZOrder scrolledHandle HIViewAddSubview scrolledHandle
int traversal Code int key int the Event if state CANVAS 0 if style SWT NO FOCUS 0 return 0 if hooks Keys return 0 return super traversal Code key the Event  traversalCode theEvent NO_FOCUS hooksKeys traversalCode theEvent

Accessible accessible Control Do nothing 
Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT BORDER see Widget check Subclass see Widget get Style public Control Composite parent int style super parent style this parent parent create Widget  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle createWidget
Adds the listener to the collection of listeners who will be notified when the control is moved or resized by sending it one of the messages defined in the code Control Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Control Listener see remove Control Listener public void add Control Listener Control Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Resize typed Listener add Listener SWT Move typed Listener  ControlListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ControlListener removeControlListener addControlListener ControlListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener typedListener
Adds the listener to the collection of listeners who will be notified when the control gains or loses focus by sending it one of the messages defined in the code Focus Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Focus Listener see remove Focus Listener public void add Focus Listener Focus Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Focus In typed Listener add Listener SWT Focus Out typed Listener  FocusListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS FocusListener removeFocusListener addFocusListener FocusListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener FocusIn typedListener addListener FocusOut typedListener
Adds the listener to the collection of listeners who will be notified when help events are generated for the control by sending it one of the messages defined in the code Help Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Help Listener see remove Help Listener public void add Help Listener Help Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Help typed Listener  HelpListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS HelpListener removeHelpListener addHelpListener HelpListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener
Adds the listener to the collection of listeners who will be notified when keys are pressed and released on the system keyboard by sending it one of the messages defined in the code Key Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Key Listener see remove Key Listener public void add Key Listener Key Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Key Up typed Listener add Listener SWT Key Down typed Listener  KeyListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS KeyListener removeKeyListener addKeyListener KeyListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener KeyUp typedListener addListener KeyDown typedListener
Adds the listener to the collection of listeners who will be notified when mouse buttons are pressed and released by sending it one of the messages defined in the code Mouse Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Mouse Listener see remove Mouse Listener public void add Mouse Listener Mouse Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Mouse Down typed Listener add Listener SWT Mouse Up typed Listener add Listener SWT Mouse Double Click typed Listener  MouseListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS MouseListener removeMouseListener addMouseListener MouseListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener MouseDown typedListener addListener MouseUp typedListener addListener MouseDoubleClick typedListener
Adds the listener to the collection of listeners who will be notified when the mouse passes or hovers over controls by sending it one of the messages defined in the code Mouse Track Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Mouse Track Listener see remove Mouse Track Listener public void add Mouse Track Listener Mouse Track Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Mouse Enter typed Listener add Listener SWT Mouse Exit typed Listener add Listener SWT Mouse Hover typed Listener  MouseTrackListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS MouseTrackListener removeMouseTrackListener addMouseTrackListener MouseTrackListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener MouseEnter typedListener addListener MouseExit typedListener addListener MouseHover typedListener
Adds the listener to the collection of listeners who will be notified when the mouse moves by sending it one of the messages defined in the code Mouse Move Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Mouse Move Listener see remove Mouse Move Listener public void add Mouse Move Listener Mouse Move Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Mouse Move typed Listener  MouseMoveListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS MouseMoveListener removeMouseMoveListener addMouseMoveListener MouseMoveListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener MouseMove typedListener
Adds the listener to the collection of listeners who will be notified when the receiver needs to be painted by sending it one of the messages defined in the code Paint Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Paint Listener see remove Paint Listener public void add Paint Listener Paint Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Paint typed Listener  PaintListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS PaintListener removePaintListener addPaintListener PaintListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener
Adds the listener to the collection of listeners who will be notified when traversal events occur by sending it one of the messages defined in the code Traverse Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Traverse Listener see remove Traverse Listener public void add Traverse Listener Traverse Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Traverse typed Listener  TraverseListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TraverseListener removeTraverseListener addTraverseListener TraverseListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener
int color Proc int in Control int in Message int in Draw Depth int in Draw In Color switch in Message case OS k Control Msg Apply Text Color if foreground null OS RGB Fore Color toRGB Color foreground else OS Set Theme Text Color short OS k Theme Text Color Dialog Active short in Draw Depth in Draw In Color 0 return OS no Err case OS k Control Msg Set Up Background float background this background null this background get Parent Background if background null OS RGB Back Color toRGB Color background else OS Set Theme Background short OS k Theme Brush Dialog Background Active short in Draw Depth in Draw In Color 0 return OS no Err return OS event Not Handled Err  colorProc inControl inMessage inDrawDepth inDrawInColor inMessage kControlMsgApplyTextColor RGBForeColor toRGBColor SetThemeTextColor kThemeTextColorDialogActive inDrawDepth inDrawInColor noErr kControlMsgSetUpBackground getParentBackground RGBBackColor toRGBColor SetThemeBackground kThemeBrushDialogBackgroundActive inDrawDepth inDrawInColor noErr eventNotHandledErr
Returns the preferred size of the receiver p The em preferred size em of a control is the size that it would best be displayed at The width hint and height hint arguments allow the caller to ask a control questions such as Given a particular width how high does the control need to be to show all of the contents To indicate that the caller does not wish to constrain a particular dimension the constant code SWT DEFAULT code is passed for the hint p param w Hint the width hint can be code SWT DEFAULT code param h Hint the height hint can be code SWT DEFAULT code return the preferred size of the control 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 Layout see get Border Width see get Bounds see get Size see pack see compute Trim get Client Area for controls that implement them public Point compute Size int w Hint int h Hint return compute Size w Hint h Hint true  wHint hHint SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBorderWidth getBounds getSize computeTrim getClientArea computeSize wHint hHint computeSize wHint hHint
Returns the preferred size of the receiver p The em preferred size em of a control is the size that it would best be displayed at The width hint and height hint arguments allow the caller to ask a control questions such as Given a particular width how high does the control need to be to show all of the contents To indicate that the caller does not wish to constrain a particular dimension the constant code SWT DEFAULT code is passed for the hint p p If the changed flag is code true code it indicates that the receiver s em contents em have changed therefore any caches that a layout manager containing the control may have been keeping need to be flushed When the control is resized the changed flag will be code false code so layout manager caches can be retained p param w Hint the width hint can be code SWT DEFAULT code param h Hint the height hint can be code SWT DEFAULT code param changed code true code if the control s contents have changed and code false code otherwise return the preferred size of the control 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 Layout see get Border Width see get Bounds see get Size see pack see compute Trim get Client Area for controls that implement them public Point compute Size int w Hint int h Hint boolean changed check Widget int width DEFAULT WIDTH int height DEFAULT HEIGHT if w Hint SWT DEFAULT width w Hint if h Hint SWT DEFAULT height h Hint int border get Border Width width border 2 height border 2 return new Point width height  wHint hHint SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBorderWidth getBounds getSize computeTrim getClientArea computeSize wHint hHint checkWidget DEFAULT_WIDTH DEFAULT_HEIGHT wHint wHint hHint hHint getBorderWidth
Control compute Tab Group if is Tab Group return this return parent compute Tab Group  computeTabGroup isTabGroup computeTabGroup
Control compute Tab List if is Tab Group if get Visible get Enabled return new Control this return new Control 0  computeTabList isTabGroup getVisible getEnabled
Control compute Tab Root Control tab List parent  getTabList if tab List null int index 0 while index tab List length if tab List index this break index if index tab List length if is Tab Group return this return parent compute Tab Root  computeTabRoot tabList _getTabList tabList tabList tabList tabList isTabGroup computeTabRoot
void create Widget check Orientation parent super create Widget set Default Font setZ Order  createWidget checkOrientation createWidget setDefaultFont setZOrder
Color default Background return display get System Color SWT COLOR WIDGET BACKGROUND  defaultBackground getSystemColor COLOR_WIDGET_BACKGROUND
Font default Font byte family new byte 256 short size new short 1 byte style new byte 1 OS Get Theme Font short default Theme Font short OS sm System Script family size style short id OS FM Get Font Family From Name family int font new int 1 OS FM Get Font From Font Family Instance id style 0 font null return Font carbon new display font 0 id style 0 size 0  defaultFont GetThemeFont defaultThemeFont smSystemScript FMGetFontFamilyFromName FMGetFontFromFontFamilyInstance carbon_new
Color default Foreground return display get System Color SWT COLOR WIDGET FOREGROUND  defaultForeground getSystemColor COLOR_WIDGET_FOREGROUND
int default Theme Font if display small Fonts return OS k Theme Small System Font return OS k Theme System Font  defaultThemeFont smallFonts kThemeSmallSystemFont kThemeSystemFont
void deregister super deregister display remove Widget handle  removeWidget
void destroy Widget int the Control top Handle release Handle if the Control 0 OS Dispose Control the Control  destroyWidget theControl topHandle releaseHandle theControl DisposeControl theControl
boolean draw Focus Ring return display no Focus Ring get Shell parent null  drawFocusRing noFocusRing getShell
boolean draw Gripper int x int y int width int height return false  drawGripper
void draw Widget int control int damage Rgn int visible Rgn int the Event if control handle return if hooks SWT Paint filters SWT Paint return Retrieve the damage rect Rect rect new Rect OS Get Region Bounds visible Rgn rect Rect bounds new Rect OS Get Control Bounds handle bounds OS Offset Rect rect short bounds left short bounds top Send paint event int port new int 1 OS Get Port port GC Data data new GC Data data port port 0 data paint Event the Event data visible Rgn visible Rgn GC gc GC carbon new this data Event event new Event event gc gc event x rect left event y rect top event width rect right rect left event height rect bottom rect top send Event SWT Paint event event gc null gc dispose  drawWidget damageRgn visibleRgn theEvent GetRegionBounds visibleRgn GetControlBounds OffsetRect GetPort GCData GCData paintEvent theEvent visibleRgn visibleRgn carbon_new sendEvent
void enable Widget boolean enabled int top Handle top Handle if enabled OS Enable Control top Handle else OS Disable Control top Handle  enableWidget topHandle topHandle EnableControl topHandle DisableControl topHandle
Cursor find Cursor if cursor null return cursor return parent find Cursor  findCursor findCursor
void fix Focus Control focus Control Shell shell get Shell Control control this while control control parent null if control set Focus return if control shell break shell set Saved Focus focus Control int window OS Get Control Owner handle OS Clear Keyboard Focus window  fixFocus focusControl getShell setFocus setSavedFocus focusControl GetControlOwner ClearKeyboardFocus
Forces the receiver to have the em keyboard focus em causing all keyboard events to be delivered to it return code true code if the control got focus and code false code if it was unable to 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 set Focus public boolean force Focus check Widget Decorations shell menu Shell shell set Saved Focus this if is Enabled is Visible is Active return false if is Focus Control return true shell set Saved Focus null shell bring To Top false if is Disposed return false int window OS Get Control Owner handle OS Set Keyboard Focus window handle short OS k Control Focus Next Part if is Disposed return false shell set Saved Focus this return has Focus  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setFocus forceFocus checkWidget menuShell setSavedFocus isEnabled isVisible isActive isFocusControl setSavedFocus bringToTop isDisposed GetControlOwner SetKeyboardFocus kControlFocusNextPart isDisposed setSavedFocus hasFocus
Returns the accessible object for the receiver If this is the first time this object is requested then the object is created and returned return the accessible object 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 Accessible add Accessible Listener see Accessible add Accessible Control Listener since 2 0 public Accessible get Accessible check Widget if accessible null accessible Accessible internal new Accessible this return accessible  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS addAccessibleListener addAccessibleControlListener getAccessible checkWidget internal_new_Accessible
Returns the receiver s background color return the background color 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 Color get Background check Widget NOT DONE get default colors if background null return default Background return Color carbon new display background  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBackground checkWidget defaultBackground carbon_new
Returns the receiver s border width return the border width 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 int get Border Width check Widget return 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBorderWidth checkWidget
Returns a rectangle describing the receiver s size and location relative to its parent or its display if its parent is null unless the receiver is a shell In this case the location is relative to the display return the receiver s bounding rectangle 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 Rectangle get Bounds check Widget Rect rect get Control Bounds top Handle return new Rectangle rect left rect top rect right rect left rect bottom rect top  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBounds checkWidget getControlBounds topHandle
int get Draw Count int control if is Trim Handle control draw Count 0 return draw Count return parent get Draw Count control  getDrawCount isTrimHandle drawCount drawCount getDrawCount
Returns code true code if the receiver is enabled and code false code otherwise A disabled control is typically not selectable from the user interface and draws with an inactive or grayed look return the receiver s 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 is Enabled public boolean get Enabled check Widget return state DISABLED 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS isEnabled getEnabled checkWidget
Returns the font that the receiver will use to paint textual information return the receiver s font 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 Font get Font check Widget return font null font default Font  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getFont checkWidget defaultFont
Returns the foreground color that the receiver will use to draw return the receiver s foreground color 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 Color get Foreground check Widget NOT DONE get default colors if foreground null return default Foreground return Color carbon new display foreground  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getForeground checkWidget defaultForeground carbon_new
Returns layout data which is associated with the receiver return the receiver s layout data 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 Object get Layout Data check Widget return layout Data  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getLayoutData checkWidget layoutData
Returns a point describing the receiver s location relative to its parent or its display if its parent is null unless the receiver is a shell In this case the point is relative to the display return the receiver s location 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 Point get Location check Widget Rect rect get Control Bounds top Handle return new Point rect left rect top  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getLocation checkWidget getControlBounds topHandle
Returns the receiver s pop up menu if it has one or null if it does not All controls may optionally have a pop up menu that is displayed when the user requests one for the control The sequence of key strokes button presses and or button releases that are used to request a pop up menu is platform specific return the receiver s menu 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 Menu get Menu check Widget return menu  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMenu checkWidget
Returns the receiver s monitor return the receiver s monitor since 3 0 public Monitor get Monitor check Widget Monitor monitors display get Monitors if monitors length 1 return monitors 0 int index 1 value 1 Rectangle bounds get Bounds if this get Shell bounds display map this parent null bounds for int i 0 i monitors length i Rectangle rect bounds intersection monitors i get Bounds int area rect width rect height if area 0 area value index i value area if index 0 return monitors index int centerX bounds x bounds width 2 centerY bounds y bounds height 2 for int i 0 i monitors length i Rectangle rect monitors i get Bounds int x centerX rect x rect x centerX centerX rect x rect width centerX rect x rect width 0 int y centerY rect y rect y centerY centerY rect y rect height centerY rect y rect height 0 int distance x x y y if index 1 distance value index i value distance return monitors index  getMonitor checkWidget getMonitors getBounds getShell getBounds getBounds
Returns the receiver s parent which must be a code Composite code or null when the receiver is a shell that was created with null or a display for a parent return the receiver s parent 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 Composite get Parent check Widget return parent  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getParent checkWidget
float get Parent Background return parent background  getParentBackground
Control get Path int count 0 Shell shell get Shell Control control this while control shell count control control parent control this Control result new Control count while control shell result count control control control parent return result  getPath getShell
Returns the receiver s shell For all controls other than shells this simply returns the control s nearest ancestor shell Shells return themselves even if they are children of other shells return the receiver s shell 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 get Parent public Shell get Shell check Widget return parent get Shell  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getParent getShell checkWidget getShell
Returns a point describing the receiver s size The x coordinate of the result is the width of the receiver The y coordinate of the result is the height of the receiver return the receiver s size 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 Point get Size check Widget Rect rect get Control Size top Handle return new Point rect right rect left rect bottom rect top  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSize checkWidget getControlSize topHandle
Returns the receiver s tool tip text or null if it has not been set return the receiver s tool tip text 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 String get Tool Tip Text check Widget return tool Tip Text  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getToolTipText checkWidget toolTipText
Returns code true code if the receiver is visible and code false code otherwise p If one of the receiver s ancestors is not visible or some other condition makes the receiver not visible this method may still indicate that it is considered visible even though it may not actually be showing p return the receiver s visibility 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 public boolean get Visible check Widget return state HIDDEN 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getVisible checkWidget
int get Visible Region int control boolean clip Children if clip Children return super get Visible Region control clip Children if visible Rgn 0 visible Rgn OS New Rgn calculate Visible Region control visible Rgn clip Children int result OS New Rgn OS Copy Rgn visible Rgn result return result  getVisibleRegion clipChildren clipChildren getVisibleRegion clipChildren visibleRgn visibleRgn NewRgn calculateVisibleRegion visibleRgn clipChildren NewRgn CopyRgn visibleRgn
boolean has Focus return this display get Focus Control  hasFocus getFocusControl
int help Proc int in Control int in Global Mouse int in Request int out Content Provided int io Help Content switch in Request case OS kHM Supply Content int content Provided new int OS kHM Content Not Provided Dont Propagate if tool Tip Text null tool Tip Text length 0 char buffer new char tool Tip Text length tool Tip Text get Chars 0 buffer length buffer 0 int length fix Mnemonic buffer if display help String 0 OS CF Release display help String display help String OS CF String Create With Characters OS kCF Allocator Default buffer length HM Help Content Rec help Content new HM Help Content Rec OS memcpy help Content io Help Content HM Help Content Rec sizeof help Content version OS k Mac Help Version Feature in the Macintosh Despite the fact that the Mac provides 23 different types of alignment for the help text it does not allow the text to be positioned at the current mouse position The fix is to center the text in a rectangle that surrounds the original position of the mouse As the mouse is moved this rectangle is grown to include the new location of the mouse The help text is then centered by the Mac in the new rectangle that was carefully constructed such that the help text will stay in the same position int cursor Height 16 help Content tag Side short OS kHM Absolute Center Aligned int x short in Global Mouse 0xFFFF int y short in Global Mouse 16 if display help Control this display last HelpX x cursor Height 2 display last HelpY y cursor Height cursor Height 2 int jitter 4 int deltaX Math abs display last HelpX x jitter int deltaY Math abs display last HelpY y jitter x display last HelpX deltaX y display last HelpY deltaY int width deltaX 2 int height deltaY 2 display help Control this help Content absHotRect left short x help Content absHotRect top short y help Content absHotRect right short x width help Content absHotRect bottom short y height help Content content0 contentType OS kHMCF String Content help Content content0 tagCFString display help String help Content content1 contentType OS kHMCF String Content help Content content1 tagCFString display help String OS memcpy io Help Content help Content HM Help Content Rec sizeof content Provided 0 OS kHM Content Provided OS memcpy out Content Provided content Provided 4 break case OS kHM Dispose Content if display help String 0 OS CF Release display help String display help String 0 break return OS no Err  helpProc inControl inGlobalMouse inRequest outContentProvided ioHelpContent inRequest kHMSupplyContent contentProvided kHMContentNotProvidedDontPropagate toolTipText toolTipText toolTipText toolTipText getChars fixMnemonic helpString CFRelease helpString helpString CFStringCreateWithCharacters kCFAllocatorDefault HMHelpContentRec helpContent HMHelpContentRec helpContent ioHelpContent HMHelpContentRec helpContent kMacHelpVersion cursorHeight helpContent tagSide kHMAbsoluteCenterAligned inGlobalMouse inGlobalMouse helpControl lastHelpX cursorHeight lastHelpY cursorHeight cursorHeight lastHelpX lastHelpY lastHelpX lastHelpY helpControl helpContent absHotRect_left helpContent absHotRect_top helpContent absHotRect_right helpContent absHotRect_bottom helpContent content0_contentType kHMCFStringContent helpContent content0_tagCFString helpString helpContent content1_contentType kHMCFStringContent helpContent content1_tagCFString helpString ioHelpContent helpContent HMHelpContentRec contentProvided kHMContentProvided outContentProvided contentProvided kHMDisposeContent helpString CFRelease helpString helpString noErr
void hook Events super hook Events int control Proc display control Proc int mask new int OS k Event Class Control OS k Event Control Activate OS k Event Class Control OS k Event Control Apply Background OS k Event Class Control OS k Event Control Bounds Changed OS k Event Class Control OS k Event Control Click OS k Event Class Control OS k Event Control Contextual Menu Click OS k Event Class Control OS k Event Control Deactivate OS k Event Class Control OS k Event Control Draw OS k Event Class Control OS k Event Control Hit OS k Event Class Control OS k Event Control Set Cursor OS k Event Class Control OS k Event Control Set Focus Part OS k Event Class Control OS k Event Control Track int control Target OS Get Control Event Target handle OS Install Event Handler control Target control Proc mask length 2 mask handle null int help Proc display help Proc OS HM Install Control Content Callback handle help Proc int color Proc display color Proc OS Set Control Color Proc handle color Proc  hookEvents hookEvents controlProc controlProc kEventClassControl kEventControlActivate kEventClassControl kEventControlApplyBackground kEventClassControl kEventControlBoundsChanged kEventClassControl kEventControlClick kEventClassControl kEventControlContextualMenuClick kEventClassControl kEventControlDeactivate kEventClassControl kEventControlDraw kEventClassControl kEventControlHit kEventClassControl kEventControlSetCursor kEventClassControl kEventControlSetFocusPart kEventClassControl kEventControlTrack controlTarget GetControlEventTarget InstallEventHandler controlTarget controlProc helpProc helpProc HMInstallControlContentCallback helpProc colorProc colorProc SetControlColorProc colorProc
Invokes platform specific functionality to allocate a new GC handle p b IMPORTANT b This method is em not em part of the public API for code Control code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param data the platform specific GC data return the platform specific GC handle public int internal new GC GC Data data check Widget int port data null data port 0 if port 0 int window OS Get Control Owner handle port OS Get Window Port window int buffer new int 1 OS CreateCG Context For Port port buffer int context buffer 0 if context 0 SWT error SWT ERROR NO HANDLES int visible Rgn 0 if data null data paint Event 0 visible Rgn data visible Rgn else if get Draw Count handle 0 visible Rgn OS New Rgn else visible Rgn get Visible Region handle true Rect rect new Rect Rect port Rect new Rect OS Get Control Bounds handle rect OS Get Port Bounds port port Rect OS ClipCG Context To Region context port Rect visible Rgn int port Height port Rect bottom port Rect top OS CG Context ScaleCTM context 1 1 OS CG Context TranslateCTM context rect left port Height rect top if data null int mask SWT LEFT TO RIGHT SWT RIGHT TO LEFT if data style mask 0 data style style mask SWT MIRRORED data device display data thread display thread data background background null background default Background handle data foreground foreground null foreground default Foreground handle data font font null font default Font data visible Rgn visible Rgn data control handle data port Rect port Rect data control Rect rect if data paint Event 0 if gcs null gcs new GC Data 4 int index 0 while index gcs length gcs index null index if index gcs length GC Data newG Cs new GC Data gcs length 4 System arraycopy gcs 0 newG Cs 0 gcs length gcs newG Cs gcs index data return context  internal_new_GC GCData checkWidget GetControlOwner GetWindowPort CreateCGContextForPort ERROR_NO_HANDLES visibleRgn paintEvent visibleRgn visibleRgn getDrawCount visibleRgn NewRgn visibleRgn getVisibleRegion portRect GetControlBounds GetPortBounds portRect ClipCGContextToRegion portRect visibleRgn portHeight portRect portRect CGContextScaleCTM CGContextTranslateCTM portHeight LEFT_TO_RIGHT RIGHT_TO_LEFT defaultBackground defaultForeground defaultFont visibleRgn visibleRgn portRect portRect controlRect paintEvent GCData GCData newGCs GCData newGCs newGCs
Invokes platform specific functionality to dispose a GC handle p b IMPORTANT b This method is em not em part of the public API for code Control code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param hDC the platform specific GC handle param data the platform specific GC data public void internal dispose GC int context GC Data data check Widget if data null if data paint Event 0 if data visible Rgn 0 OS Dispose Rgn data visible Rgn data visible Rgn 0 int index 0 while index gcs length gcs index data index if index gcs length gcs index null index 0 while index gcs length gcs index null index if index gcs length gcs null This code is intentionaly commented Use CG Context Synchronize instead of CG Context Flush to improve performance OS CG Context Flush context OS CG Context Synchronize context OS CG Context Release context  internal_dispose_GC GCData checkWidget paintEvent visibleRgn DisposeRgn visibleRgn visibleRgn CGContextSynchronize CGContextFlush CGContextFlush CGContextSynchronize CGContextRelease
void invalidate Children Visible Region int control  invalidateChildrenVisibleRegion
void invalidate Visible Region int control int index 0 Control siblings parent  getChildren while index siblings length siblings index this index for int i index i siblings length i Control sibling siblings i sibling reset Visible Region control sibling invalidate Children Visible Region control parent reset Visible Region control  invalidateVisibleRegion _getChildren resetVisibleRegion invalidateChildrenVisibleRegion resetVisibleRegion
void inval Window Rgn int window int rgn parent inval Window Rgn window rgn  invalWindowRgn invalWindowRgn
Returns code true code if the receiver is enabled and all of the receiver s ancestors are enabled and code false code otherwise A disabled control is typically not selectable from the user interface and draws with an inactive or grayed look return the receiver s 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 get Enabled public boolean is Enabled check Widget return get Enabled parent is Enabled  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getEnabled isEnabled checkWidget getEnabled isEnabled
boolean is Enabled Cursor return is Enabled  isEnabledCursor isEnabled
boolean is Enabled Modal NOT DONE fails for multiple APP MODAL shells Shell shells display get Shells for int i 0 i shells length i Shell modal shells i if modal this modal is Visible if modal style SWT PRIMARY MODAL 0 Shell shell get Shell if modal parent shell return false int bits SWT APPLICATION MODAL SWT SYSTEM MODAL if modal style bits 0 Control control this while control null if control modal break control control parent if control modal return false return true  isEnabledModal getShells isVisible PRIMARY_MODAL getShell APPLICATION_MODAL SYSTEM_MODAL
boolean is Focus Ancestor Control control while control null control this control control parent return control this  isFocusAncestor
Returns code true code if the receiver has the user interface focus and code false code otherwise return the receiver s focus 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 public boolean is Focus Control check Widget return has Focus  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS isFocusControl checkWidget hasFocus
Returns code true code if the underlying operating system supports this reparenting otherwise code false code return code true code if the widget can be reparented otherwise code false code 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 boolean is Reparentable check Widget return false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS isReparentable checkWidget
boolean is Showing This is not complete Need to check if the widget is obscurred by a parent or sibling if is Visible return false Control control this while control null Point size control get Size if size x 0 size y 0 return false control control parent return true  isShowing isVisible getSize
boolean is Tab Group Control tab List parent  getTabList if tab List null for int i 0 i tab List length i if tab List i this return true int code traversal Code 0 0 if code SWT TRAVERSE ARROW PREVIOUS SWT TRAVERSE ARROW NEXT 0 return false return code SWT TRAVERSE TAB PREVIOUS SWT TRAVERSE TAB NEXT 0  isTabGroup tabList _getTabList tabList tabList tabList traversalCode TRAVERSE_ARROW_PREVIOUS TRAVERSE_ARROW_NEXT TRAVERSE_TAB_PREVIOUS TRAVERSE_TAB_NEXT
boolean is Tab Item Control tab List parent  getTabList if tab List null for int i 0 i tab List length i if tab List i this return false int code traversal Code 0 0 return code SWT TRAVERSE ARROW PREVIOUS SWT TRAVERSE ARROW NEXT 0  isTabItem tabList _getTabList tabList tabList tabList traversalCode TRAVERSE_ARROW_PREVIOUS TRAVERSE_ARROW_NEXT
Returns code true code if the receiver is visible and all of the receiver s ancestors are visible and code false code otherwise return the receiver s visibility 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 get Visible public boolean is Visible check Widget return OS Is Control Visible top Handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getVisible isVisible checkWidget IsControlVisible topHandle
Decorations menu Shell return parent menu Shell  menuShell menuShell
int k Event Control Contextual Menu Click int next Handler int the Event int user Data int sizeof org eclipse swt internal carbon Point sizeof org eclipse swt internal carbon Point pt new org eclipse swt internal carbon Point OS Get Event Parameter the Event OS k Event Param Mouse Location OS typeQD Point null sizeof null pt Rect rect new Rect int window OS Get Control Owner handle OS Get Window Bounds window short OS k Window Content Rgn rect int x pt h rect left int y pt v rect top Event event new Event event x x event y y send Event SWT Menu Detect event if event doit if menu null menu is Disposed if event x x event y y menu set Location event x event y menu set Visible true return OS event Not Handled Err  kEventControlContextualMenuClick nextHandler theEvent userData GetEventParameter theEvent kEventParamMouseLocation typeQDPoint GetControlOwner GetWindowBounds kWindowContentRgn sendEvent MenuDetect isDisposed setLocation setVisible eventNotHandledErr
int k Event Control Set Cursor int next Handler int the Event int user Data if is Enabled Cursor return OS no Err Cursor cursor null if is Enabled Modal if cursor find Cursor null display set Cursor cursor handle return cursor null OS no Err OS event Not Handled Err  kEventControlSetCursor nextHandler theEvent userData isEnabledCursor noErr isEnabledModal findCursor setCursor noErr eventNotHandledErr
int k Event Control Set Focus Part int next Handler int the Event int user Data if display ignore Focus short part new short 1 OS Get Event Parameter the Event OS k Event Param Control Part OS type Control Part Code null 2 null part send Focus Event part 0 0 false widget could be disposed at this point if is Disposed return OS no Err return OS event Not Handled Err  kEventControlSetFocusPart nextHandler theEvent userData ignoreFocus GetEventParameter theEvent kEventParamControlPart typeControlPartCode sendFocusEvent isDisposed noErr eventNotHandledErr
int k Event Control Track int next Handler int the Event int user Data if is Enabled Modal send Mouse Event SWT Mouse Move the Event return OS event Not Handled Err  kEventControlTrack nextHandler theEvent userData isEnabledModal sendMouseEvent MouseMove theEvent eventNotHandledErr
int k Event Mouse Down int next Handler int the Event int user Data Shell shell get Shell short button new short 1 OS Get Event Parameter the Event OS k Event Param Mouse Button OS type Mouse Button null 2 null button int click Count new int 1 OS Get Event Parameter the Event OS k Event Param Click Count OS typeU Int32 null 4 null click Count send Mouse Event SWT Mouse Down button 0 the Event if click Count 0 2 send Mouse Event SWT Mouse Double Click button 0 the Event if state GRAB 0 display grab Control this It is possible that the shell may be disposed at this point If this happens don t send the activate and deactivate events if shell is Disposed shell set Active Control this if hooks SWT Drag Detect org eclipse swt internal carbon Point pt new org eclipse swt internal carbon Point int sizeof org eclipse swt internal carbon Point sizeof OS Get Event Parameter the Event OS k Event Param Mouse Location OS typeQD Point null sizeof null pt display drag Mouse Start pt display dragging false return OS event Not Handled Err  kEventMouseDown nextHandler theEvent userData getShell GetEventParameter theEvent kEventParamMouseButton typeMouseButton clickCount GetEventParameter theEvent kEventParamClickCount typeUInt32 clickCount sendMouseEvent MouseDown theEvent clickCount sendMouseEvent MouseDoubleClick theEvent grabControl isDisposed setActiveControl DragDetect GetEventParameter theEvent kEventParamMouseLocation typeQDPoint dragMouseStart eventNotHandledErr
int k Event Mouse Dragged int next Handler int the Event int user Data if state CANVAS 0 if is Enabled Modal send Mouse Event SWT Mouse Move short 0 the Event display drag Detect this return OS event Not Handled Err  kEventMouseDragged nextHandler theEvent userData isEnabledModal sendMouseEvent MouseMove theEvent dragDetect eventNotHandledErr
int k Event Mouse Moved int next Handler int the Event int user Data if is Enabled Modal send Mouse Event SWT Mouse Move short 0 the Event return OS event Not Handled Err  kEventMouseMoved nextHandler theEvent userData isEnabledModal sendMouseEvent MouseMove theEvent eventNotHandledErr
int k Event Mouse Up int next Handler int the Event int user Data short button new short 1 OS Get Event Parameter the Event OS k Event Param Mouse Button OS type Mouse Button null 2 null button send Mouse Event SWT Mouse Up button 0 the Event return OS event Not Handled Err  kEventMouseUp nextHandler theEvent userData GetEventParameter theEvent kEventParamMouseButton typeMouseButton sendMouseEvent MouseUp theEvent eventNotHandledErr
int k Event Raw Key int next Handler int the Event int user Data return OS event Not Handled Err  kEventRawKey nextHandler theEvent userData eventNotHandledErr
int k Event Raw Key Down int next Handler int the Event int user Data return k Event Raw Key next Handler the Event user Data  kEventRawKeyDown nextHandler theEvent userData kEventRawKey nextHandler theEvent userData
int k Event Raw Key Modifiers Changed int next Handler int the Event int user Data Display display this display int modifiers new int 1 OS Get Event Parameter the Event OS k Event Param Key Modifiers OS typeU Int32 null modifiers length 4 null modifiers int last Modifiers display last Modifiers int chord OS Get Current Event Button State int type SWT Key Up if modifiers 0 OS alpha Lock 0 last Modifiers OS alpha Lock 0 type SWT Key Down if modifiers 0 OS shift Key 0 last Modifiers OS shift Key 0 type SWT Key Down if modifiers 0 OS control Key 0 last Modifiers OS control Key 0 type SWT Key Down if modifiers 0 OS cmd Key 0 last Modifiers OS cmd Key 0 type SWT Key Down if modifiers 0 OS option Key 0 last Modifiers OS option Key 0 type SWT Key Down if type SWT Key Up modifiers 0 OS alpha Lock 0 last Modifiers OS alpha Lock 0 Event event new Event event key Code SWT CAPS LOCK set Input State event SWT Key Down chord modifiers 0 send Key Event SWT Key Down event Event event new Event set Input State event type chord modifiers 0 if event key Code 0 event character 0 return OS event Not Handled Err boolean result send Key Event type event if type SWT Key Down modifiers 0 OS alpha Lock 0 last Modifiers OS alpha Lock 0 event new Event event key Code SWT CAPS LOCK set Input State event SWT Key Up chord modifiers 0 send Key Event SWT Key Up event display last Modifiers modifiers 0 return result OS event Not Handled Err OS no Err  kEventRawKeyModifiersChanged nextHandler theEvent userData GetEventParameter theEvent kEventParamKeyModifiers typeUInt32 lastModifiers lastModifiers GetCurrentEventButtonState KeyUp alphaLock lastModifiers alphaLock KeyDown shiftKey lastModifiers shiftKey KeyDown controlKey lastModifiers controlKey KeyDown cmdKey lastModifiers cmdKey KeyDown optionKey lastModifiers optionKey KeyDown KeyUp alphaLock lastModifiers alphaLock keyCode CAPS_LOCK setInputState KeyDown sendKeyEvent KeyDown setInputState keyCode eventNotHandledErr sendKeyEvent KeyDown alphaLock lastModifiers alphaLock keyCode CAPS_LOCK setInputState KeyUp sendKeyEvent KeyUp lastModifiers eventNotHandledErr noErr
int k Event Raw Key Repeat int next Handler int the Event int user Data return k Event Raw Key next Handler the Event user Data  kEventRawKeyRepeat nextHandler theEvent userData kEventRawKey nextHandler theEvent userData
int k Event Raw Key Up int next Handler int the Event int user Data if send Key Event SWT Key Up the Event return OS no Err return OS event Not Handled Err  kEventRawKeyUp nextHandler theEvent userData sendKeyEvent KeyUp theEvent noErr eventNotHandledErr
int k Event Text Input Unicode For Key Event int next Handler int the Event int user Data int keyboard Event new int 1 OS Get Event Parameter the Event OS k Event Param Text Input Send Keyboard Event OS type Event Ref null keyboard Event length 4 null keyboard Event int key Code new int 1 OS Get Event Parameter keyboard Event 0 OS k Event Param Key Code OS typeU Int32 null key Code length 4 null key Code if translate Traversal key Code 0 keyboard Event 0 return OS no Err if key Code 0 114 Help Control control this while control null if control hooks SWT Help control post Event SWT Help break control control parent if send Key Event SWT Key Down keyboard Event 0 return OS no Err return OS event Not Handled Err  kEventTextInputUnicodeForKeyEvent nextHandler theEvent userData keyboardEvent GetEventParameter theEvent kEventParamTextInputSendKeyboardEvent typeEventRef keyboardEvent keyboardEvent keyCode GetEventParameter keyboardEvent kEventParamKeyCode typeUInt32 keyCode keyCode translateTraversal keyCode keyboardEvent noErr keyCode postEvent sendKeyEvent KeyDown keyboardEvent noErr eventNotHandledErr
Moves the receiver above the specified control in the drawing order If the argument is null then the receiver is moved to the top of the drawing order The control at the top of the drawing order will not be covered by other controls even if they occupy intersecting areas param control the sibling control or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the control has been disposed li ul 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 move Below public void move Above Control control check Widget if control null if control is Disposed error SWT ERROR INVALID ARGUMENT if parent control parent return setZ Order control true  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS moveBelow moveAbove checkWidget isDisposed ERROR_INVALID_ARGUMENT setZOrder
Moves the receiver below the specified control in the drawing order If the argument is null then the receiver is moved to the bottom of the drawing order The control at the bottom of the drawing order will be covered by all other controls which occupy intersecting areas param control the sibling control or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the control has been disposed li ul 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 move Above public void move Below Control control check Widget if control null if control is Disposed error SWT ERROR INVALID ARGUMENT if parent control parent return setZ Order control false  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS moveAbove moveBelow checkWidget isDisposed ERROR_INVALID_ARGUMENT setZOrder
Causes the receiver to be resized to its preferred size For a composite this involves computing the preferred size from its layout if there is one 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 compute Size public void pack check Widget pack true  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS computeSize checkWidget
Causes the receiver to be resized to its preferred size For a composite this involves computing the preferred size from its layout if there is one p If the changed flag is code true code it indicates that the receiver s em contents em have changed therefore any caches that a layout manager containing the control may have been keeping need to be flushed When the control is resized the changed flag will be code false code so layout manager caches can be retained p param changed whether or not the receiver s contents have changed 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 compute Size public void pack boolean changed check Widget set Size compute Size SWT DEFAULT SWT DEFAULT changed  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS computeSize checkWidget setSize computeSize
Causes the entire bounds of the receiver to be marked as needing to be redrawn The next time a paint request is processed the control will be completely painted including the background 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 update see Paint Listener see SWT Paint see SWT NO BACKGROUND see SWT NO REDRAW RESIZE see SWT NO MERGE PAINTS public void redraw check Widget redraw Widget handle false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS PaintListener NO_BACKGROUND NO_REDRAW_RESIZE NO_MERGE_PAINTS checkWidget redrawWidget
Causes the rectangular area of the receiver specified by the arguments to be marked as needing to be redrawn The next time a paint request is processed that area of the receiver will be painted including the background If the code all code flag is code true code any children of the receiver which intersect with the specified area will also paint their intersecting areas If the code all code flag is code false code the children will not be painted param x the x coordinate of the area to draw param y the y coordinate of the area to draw param width the width of the area to draw param height the height of the area to draw param all code true code if children should redraw and code false code otherwise 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 update see Paint Listener see SWT Paint see SWT NO BACKGROUND see SWT NO REDRAW RESIZE see SWT NO MERGE PAINTS public void redraw int x int y int width int height boolean all check Widget redraw Widget handle x y width height all  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS PaintListener NO_BACKGROUND NO_REDRAW_RESIZE NO_MERGE_PAINTS checkWidget redrawWidget
void register super register display add Widget handle this  addWidget
void release Child super release Child set Visible top Handle false  releaseChild releaseChild setVisible topHandle
void release Handle super release Handle handle 0  releaseHandle releaseHandle
void release Widget super release Widget if menu null menu is Disposed menu dispose if visible Rgn 0 OS Dispose Rgn visible Rgn visible Rgn 0 menu null parent null layout Data null  releaseWidget releaseWidget isDisposed visibleRgn DisposeRgn visibleRgn visibleRgn layoutData
Removes the listener from the collection of listeners who will be notified when the control is moved or resized param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Control Listener see add Control Listener public void remove Control Listener Control Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Move listener event Table unhook SWT Resize listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ControlListener addControlListener removeControlListener ControlListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable
Removes the listener from the collection of listeners who will be notified when the control gains or loses focus param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Focus Listener see add Focus Listener public void remove Focus Listener Focus Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Focus In listener event Table unhook SWT Focus Out listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS FocusListener addFocusListener removeFocusListener FocusListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable FocusIn eventTable FocusOut
Removes the listener from the collection of listeners who will be notified when the help events are generated for the control param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Help Listener see add Help Listener public void remove Help Listener Help Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Help listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS HelpListener addHelpListener removeHelpListener HelpListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable
Removes the listener from the collection of listeners who will be notified when keys are pressed and released on the system keyboard param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Key Listener see add Key Listener public void remove Key Listener Key Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Key Up listener event Table unhook SWT Key Down listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS KeyListener addKeyListener removeKeyListener KeyListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable KeyUp eventTable KeyDown
Removes the listener from the collection of listeners who will be notified when mouse buttons are pressed and released param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Mouse Listener see add Mouse Listener public void remove Mouse Listener Mouse Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Mouse Down listener event Table unhook SWT Mouse Up listener event Table unhook SWT Mouse Double Click listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS MouseListener addMouseListener removeMouseListener MouseListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable MouseDown eventTable MouseUp eventTable MouseDoubleClick
Removes the listener from the collection of listeners who will be notified when the mouse moves param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Mouse Move Listener see add Mouse Move Listener public void remove Mouse Move Listener Mouse Move Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Mouse Move listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS MouseMoveListener addMouseMoveListener removeMouseMoveListener MouseMoveListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable MouseMove
Removes the listener from the collection of listeners who will be notified when the mouse passes or hovers over controls param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Mouse Track Listener see add Mouse Track Listener public void remove Mouse Track Listener Mouse Track Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Mouse Enter listener event Table unhook SWT Mouse Exit listener event Table unhook SWT Mouse Hover listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS MouseTrackListener addMouseTrackListener removeMouseTrackListener MouseTrackListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable MouseEnter eventTable MouseExit eventTable MouseHover
Removes the listener from the collection of listeners who will be notified when the receiver needs to be painted param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Paint Listener see add Paint Listener public void remove Paint Listener Paint Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Paint listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS PaintListener addPaintListener removePaintListener PaintListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable
Removes the listener from the collection of listeners who will be notified when traversal events occur param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Traverse Listener see add Traverse Listener public void remove Traverse Listener Traverse Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Traverse listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TraverseListener addTraverseListener removeTraverseListener TraverseListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable
void reset Visible Region int control if visible Rgn 0 OS Dispose Rgn visible Rgn visible Rgn 0 if gcs null int visible Rgn get Visible Region handle true for int i 0 i gcs length i GC Data data gcs i if data null data update Clip true OS Copy Rgn visible Rgn data visible Rgn OS Dispose Rgn visible Rgn  resetVisibleRegion visibleRgn DisposeRgn visibleRgn visibleRgn visibleRgn getVisibleRegion GCData updateClip CopyRgn visibleRgn visibleRgn DisposeRgn visibleRgn
void send Focus Event boolean focus In boolean post Shell shell get Shell if post post Event focus In SWT Focus In SWT Focus Out else send Event focus In SWT Focus In SWT Focus Out It is possible that the shell may be disposed at this point If this happens don t send the activate and deactivate events if shell is Disposed if focus In shell set Active Control this else Display display shell display Control control display get Focus Control if control null shell control get Shell shell set Active Control null  sendFocusEvent focusIn getShell postEvent focusIn FocusIn FocusOut sendEvent focusIn FocusIn FocusOut isDisposed focusIn setActiveControl getFocusControl getShell setActiveControl
boolean send Key Event int type int the Event int length new int 1 int status OS Get Event Parameter the Event OS k Event Param Key Unicodes OS type Unicode Text null 4 length char null if status OS no Err length 0 2 int count 0 int chord new int 1 OS Get Event Parameter the Event OS k Event Param Mouse Chord OS typeU Int32 null 4 null chord int modifiers new int 1 OS Get Event Parameter the Event OS k Event Param Key Modifiers OS typeU Int32 null 4 null modifiers char chars new char length 0 2 OS Get Event Parameter the Event OS k Event Param Key Unicodes OS type Unicode Text null chars length 2 null chars for int i 0 i chars length i Event event new Event event character chars i set Input State event type chord 0 modifiers 0 if send Key Event type event chars count chars i if count 0 return false if count chars length 1 OS Set Event Parameter the Event OS k Event Param Key Unicodes OS type Unicode Text count 2 chars return true else Event event new Event if set Key State event type the Event return true return send Key Event type event  sendKeyEvent theEvent GetEventParameter theEvent kEventParamKeyUnicodes typeUnicodeText noErr GetEventParameter theEvent kEventParamMouseChord typeUInt32 GetEventParameter theEvent kEventParamKeyModifiers typeUInt32 GetEventParameter theEvent kEventParamKeyUnicodes typeUnicodeText setInputState sendKeyEvent SetEventParameter theEvent kEventParamKeyUnicodes typeUnicodeText setKeyState theEvent sendKeyEvent
boolean send Key Event int type Event event send Event type event widget could be disposed at this point It is possible but unlikely that application code could have disposed the widget in the key events If this happens end the processing of the key by returning false if is Disposed return false return event doit  sendKeyEvent sendEvent isDisposed
boolean send Mouse Event int type short button int the Event int sizeof org eclipse swt internal carbon Point sizeof org eclipse swt internal carbon Point pt new org eclipse swt internal carbon Point OS Get Event Parameter the Event OS k Event Param Mouse Location OS typeQD Point null sizeof null pt Rect rect new Rect int window OS Get Control Owner handle OS Get Window Bounds window short OS k Window Content Rgn rect int x pt h rect left int y pt v rect top OS Get Control Bounds handle rect x rect left y rect top int chord new int 1 OS Get Event Parameter the Event OS k Event Param Mouse Chord OS typeU Int32 null 4 null chord int modifiers new int 1 OS Get Event Parameter the Event OS k Event Param Key Modifiers OS typeU Int32 null 4 null modifiers return send Mouse Event type button chord 0 short x short y modifiers 0 false  sendMouseEvent theEvent GetEventParameter theEvent kEventParamMouseLocation typeQDPoint GetControlOwner GetWindowBounds kWindowContentRgn GetControlBounds GetEventParameter theEvent kEventParamMouseChord typeUInt32 GetEventParameter theEvent kEventParamKeyModifiers typeUInt32 sendMouseEvent
boolean send Mouse Event int type short button int chord short x short y int modifiers boolean send Event event new Event switch button case 1 event button 1 break case 2 event button 3 break case 3 event button 2 break event x x event y y set Input State event type chord modifiers send Event type event send return true  sendMouseEvent setInputState sendEvent
Sets the receiver s background color to the color specified by the argument or to the default system color for the control if the argument is null param color the new color or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 set Background Color color check Widget if color null if color is Disposed SWT error SWT ERROR INVALID ARGUMENT background color null color handle null set Background background redraw Widget handle false  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setBackground checkWidget isDisposed ERROR_INVALID_ARGUMENT setBackground redrawWidget
void set Background float color Control Font Style Rec font Style new Control Font Style Rec OS Get Control Data handle short OS k Control Entire Control OS k Control Font Style Tag Control Font Style Rec sizeof font Style null if color null font Style backColor red short color 0 0xffff font Style backColor green short color 1 0xffff font Style backColor blue short color 2 0xffff font Style flags OS k Control Use Back Color Mask else font Style flags OS k Control Use Back Color Mask OS Set Control Font Style handle font Style  setBackground ControlFontStyleRec fontStyle ControlFontStyleRec GetControlData kControlEntireControl kControlFontStyleTag ControlFontStyleRec fontStyle fontStyle backColor_red fontStyle backColor_green fontStyle backColor_blue fontStyle kControlUseBackColorMask fontStyle kControlUseBackColorMask SetControlFontStyle fontStyle
Sets the receiver s size and location to the rectangular area specified by the arguments The code x code and code y code arguments are relative to the receiver s parent or its display if its parent is null unless the receiver is a shell In this case the code x code and code y code arguments are relative to the display p Note Attempting to set the width or height of the receiver to a negative number will cause that value to be set to zero instead p param x the new x coordinate for the receiver param y the new y coordinate for the receiver param width the new width for the receiver param height the new height for the receiver 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 set Bounds int x int y int width int height check Widget set Bounds top Handle x y width height true true true  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setBounds checkWidget setBounds topHandle
Sets the receiver s size and location to the rectangular area specified by the argument The code x code and code y code fields of the rectangle are relative to the receiver s parent or its display if its parent is null p Note Attempting to set the width or height of the receiver to a negative number will cause that value to be set to zero instead p param rect the new bounds for the receiver 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 set Bounds Rectangle rect if rect null error SWT ERROR NULL ARGUMENT set Bounds rect x rect y rect width rect height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setBounds ERROR_NULL_ARGUMENT setBounds
If the argument is code true code causes the receiver to have all mouse events delivered to it until the method is called with code false code as the argument param capture code true code to capture the mouse and code false code to release it 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 set Capture boolean capture check Widget  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setCapture checkWidget
Sets the receiver s cursor to the cursor specified by the argument or to the default cursor for that kind of control if the argument is null p When the mouse pointer passes over a control its appearance is changed to match the control s cursor p param cursor the new cursor or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 set Cursor Cursor cursor check Widget if cursor null cursor is Disposed error SWT ERROR INVALID ARGUMENT this cursor cursor if is Enabled return org eclipse swt internal carbon Point where new org eclipse swt internal carbon Point OS Get Global Mouse where int the Window new int 1 if display grab Control this the Window 0 OS Get Control Owner handle else if OS Find Window where the Window OS in Content return if the Window 0 0 return Rect rect new Rect OS Get Window Bounds the Window 0 short OS k Window Content Rgn rect int the Control new int 1 if display grab Control this the Control 0 handle else CG Point in Point new CG Point in Point x where h rect left in Point y where v rect top int the Root new int 1 OS Get Root Control the Window 0 the Root OS HI View Get Subview Hit the Root 0 in Point true the Control int cursor Control the Control 0 while the Control 0 0 the Control 0 handle OS Get Super Control the Control 0 the Control if the Control 0 0 return the Control 0 cursor Control do Widget widget display get Widget the Control 0 if widget null if widget instanceof Control Control control Control widget if control is Enabled break OS Get Super Control the Control 0 the Control while the Control 0 0 if the Control 0 0 the Control 0 the Root 0 Widget widget display get Widget the Control 0 if widget null widget instanceof Control Control control Control widget the Control 0 control handle where h rect left where v rect top int modifiers OS Get Current Event Key Modifiers boolean cursor Was Set new boolean 1 OS Handle Control Set Cursor the Control 0 where short modifiers cursor Was Set if cursor Was Set 0 OS Set Theme Cursor OS k Theme Arrow Cursor  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setCursor checkWidget isDisposed ERROR_INVALID_ARGUMENT isEnabled GetGlobalMouse theWindow grabControl theWindow GetControlOwner FindWindow theWindow inContent theWindow GetWindowBounds theWindow kWindowContentRgn theControl grabControl theControl CGPoint inPoint CGPoint inPoint inPoint theRoot GetRootControl theWindow theRoot HIViewGetSubviewHit theRoot inPoint theControl cursorControl theControl theControl theControl GetSuperControl theControl theControl theControl theControl cursorControl getWidget theControl isEnabled GetSuperControl theControl theControl theControl theControl theControl theRoot getWidget theControl theControl GetCurrentEventKeyModifiers cursorWasSet HandleControlSetCursor theControl cursorWasSet cursorWasSet SetThemeCursor kThemeArrowCursor
void set Default Font if display small Fonts set Font Style default Font  setDefaultFont smallFonts setFontStyle defaultFont
Enables the receiver if the argument is code true code and disables it otherwise A disabled control is typically not selectable from the user interface and draws with an inactive or grayed look param enabled the new 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 public void set Enabled boolean enabled check Widget if state DISABLED 0 enabled return Control control null boolean fix Focus false if enabled control display get Focus Control fix Focus is Focus Ancestor control if enabled state DISABLED else state DISABLED enable Widget enabled if fix Focus fix Focus control  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setEnabled checkWidget fixFocus getFocusControl fixFocus isFocusAncestor enableWidget fixFocus fixFocus
Causes the receiver to have the em keyboard focus em such that all keyboard events will be delivered to it Focus reassignment will respect applicable platform constraints return code true code if the control got focus and code false code if it was unable to 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 force Focus public boolean set Focus check Widget if style SWT NO FOCUS 0 return false return force Focus  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS forceFocus setFocus checkWidget NO_FOCUS forceFocus
Sets the font that the receiver will use to paint textual information to the font specified by the argument or to the default font for that kind of control if the argument is null param font the new font or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 set Font Font font check Widget if font null if font is Disposed SWT error SWT ERROR INVALID ARGUMENT this font font set Font Style font redraw Widget handle false  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setFont checkWidget isDisposed ERROR_INVALID_ARGUMENT setFontStyle redrawWidget
void set Font Style Font font Control Font Style Rec font Style new Control Font Style Rec OS Get Control Data handle short OS k Control Entire Control OS k Control Font Style Tag Control Font Style Rec sizeof font Style null if font null font Style flags OS k Control Use Font Mask OS k Control Use Size Mask OS k Control Use Face Mask font Style font font id font Style style font style font Style size font size else font Style flags OS k Control Use Theme FontID Mask font Style font short default Theme Font OS Set Control Font Style handle font Style  setFontStyle ControlFontStyleRec fontStyle ControlFontStyleRec GetControlData kControlEntireControl kControlFontStyleTag ControlFontStyleRec fontStyle fontStyle kControlUseFontMask kControlUseSizeMask kControlUseFaceMask fontStyle fontStyle fontStyle fontStyle kControlUseThemeFontIDMask fontStyle defaultThemeFont SetControlFontStyle fontStyle
Sets the receiver s foreground color to the color specified by the argument or to the default system color for the control if the argument is null param color the new color or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 set Foreground Color color check Widget if color null if color is Disposed SWT error SWT ERROR INVALID ARGUMENT foreground color null color handle null set Foreground foreground redraw Widget handle false  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setForeground checkWidget isDisposed ERROR_INVALID_ARGUMENT setForeground redrawWidget
void set Foreground float color Control Font Style Rec font Style new Control Font Style Rec OS Get Control Data handle short OS k Control Entire Control OS k Control Font Style Tag Control Font Style Rec sizeof font Style null if color null font Style foreColor red short color 0 0xffff font Style foreColor green short color 1 0xffff font Style foreColor blue short color 2 0xffff font Style flags OS k Control Use Fore Color Mask else font Style flags OS k Control Use Fore Color Mask OS Set Control Font Style handle font Style  setForeground ControlFontStyleRec fontStyle ControlFontStyleRec GetControlData kControlEntireControl kControlFontStyleTag ControlFontStyleRec fontStyle fontStyle foreColor_red fontStyle foreColor_green fontStyle foreColor_blue fontStyle kControlUseForeColorMask fontStyle kControlUseForeColorMask SetControlFontStyle fontStyle
Sets the layout data associated with the receiver to the argument param layout Data the new layout data for the receiver 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 set Layout Data Object layout Data check Widget this layout Data layout Data  layoutData SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setLayoutData layoutData checkWidget layoutData layoutData
Sets the receiver s location to the point specified by the arguments which are relative to the receiver s parent or its display if its parent is null unless the receiver is a shell In this case the point is relative to the display param x the new x coordinate for the receiver param y the new y coordinate for the receiver 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 set Location int x int y check Widget set Bounds top Handle x y 0 0 true false true  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setLocation checkWidget setBounds topHandle
Sets the receiver s location to the point specified by the arguments which are relative to the receiver s parent or its display if its parent is null unless the receiver is a shell In this case the point is relative to the display param location the new location for the receiver 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 set Location Point location if location null error SWT ERROR NULL ARGUMENT set Location location x location y  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setLocation ERROR_NULL_ARGUMENT setLocation
Sets the receiver s pop up menu to the argument All controls may optionally have a pop up menu that is displayed when the user requests one for the control The sequence of key strokes button presses and or button releases that are used to request a pop up menu is platform specific param menu the new pop up menu exception Illegal Argument Exception ul li ERROR MENU NOT POP UP the menu is not a pop up menu li li ERROR INVALID PARENT if the menu is not in the same widget tree li li ERROR INVALID ARGUMENT if the menu has been disposed li ul 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 set Menu Menu menu check Widget if menu null if menu is Disposed SWT error SWT ERROR INVALID ARGUMENT if menu style SWT POP UP 0 error SWT ERROR MENU NOT POP UP if menu parent menu Shell error SWT ERROR INVALID PARENT this menu menu  IllegalArgumentException ERROR_MENU_NOT_POP_UP ERROR_INVALID_PARENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMenu checkWidget isDisposed ERROR_INVALID_ARGUMENT POP_UP ERROR_MENU_NOT_POP_UP menuShell ERROR_INVALID_PARENT
Changes the parent of the widget to be the one provided if the underlying operating system supports this feature Answers code true code if the parent is successfully changed param parent the new parent for the control return code true code if the parent is changed and code false code otherwise exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul exception SWT Error 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 boolean set Parent Composite parent check Widget if parent is Disposed SWT error SWT ERROR INVALID ARGUMENT return false  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED setParent checkWidget isDisposed ERROR_INVALID_ARGUMENT
If the argument is code false code causes subsequent drawing operations in the receiver to be ignored No drawing of any kind can occur in the receiver until the flag is set to true Graphics operations that occurred while the flag was code false code are lost When the flag is set to code true code the entire widget is marked as needing to be redrawn p Note This operation is a hint and may not be supported on some platforms or for some widgets p param redraw the new redraw 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 redraw see update public void set Redraw boolean redraw check Widget if redraw if draw Count 0 invalidate Visible Region handle redraw Widget handle true else if draw Count 0 invalidate Visible Region handle draw Count  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setRedraw checkWidget drawCount invalidateVisibleRegion redrawWidget drawCount invalidateVisibleRegion drawCount
boolean set Radio Selection boolean value return false  setRadioSelection
Sets the receiver s size to the point specified by the arguments p Note Attempting to set the width or height of the receiver to a negative number will cause that value to be set to zero instead p param width the new width for the receiver param height the new height for the receiver 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 set Size int width int height check Widget set Bounds top Handle 0 0 width height false true true  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSize checkWidget setBounds topHandle
Sets the receiver s size to the point specified by the argument p Note Attempting to set the width or height of the receiver to a negative number will cause them to be set to zero instead p param size the new size for the receiver exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the point is null li ul 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 set Size Point size if size null error SWT ERROR NULL ARGUMENT set Size size x size y  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSize ERROR_NULL_ARGUMENT setSize
boolean set Tab Group Focus return set Tab Item Focus  setTabGroupFocus setTabItemFocus
boolean set Tab Item Focus if is Showing return false return force Focus  setTabItemFocus isShowing forceFocus
Sets the receiver s tool tip text to the argument which may be null indicating that no tool tip text should be shown param string the new tool tip text or null 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 set Tool Tip Text String string check Widget tool Tip Text string  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setToolTipText checkWidget toolTipText
Marks the receiver as visible if the argument is code true code and marks it invisible otherwise p If one of the receiver s ancestors is not visible or some other condition makes the receiver not visible marking it visible may not actually cause it to be displayed p param visible the new visibility 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 public void set Visible boolean visible check Widget if visible if state HIDDEN 0 return state HIDDEN else if state HIDDEN 0 return state HIDDEN if visible It is possible but unlikely that application code could have disposed the widget in the show event If this happens just return send Event SWT Show if is Disposed return Feature in the Macintosh If the receiver has focus hiding the receiver causes no control to have focus Also the focus needs to be cleared from any TXN Object so that it stops blinking the caret The fix is to assign focus to the first ancestor control that takes focus If no control will take focus clear the focus control Control control null boolean fix Focus false if visible control display get Focus Control fix Focus is Focus Ancestor control set Visible top Handle visible if visible It is possible but unlikely that application code could have disposed the widget in the show event If this happens just return send Event SWT Hide if is Disposed return if fix Focus fix Focus control  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setVisible checkWidget sendEvent isDisposed TXNObject fixFocus getFocusControl fixFocus isFocusAncestor setVisible topHandle sendEvent isDisposed fixFocus fixFocus
void setZ Order int top Handle top Handle int parent Handle parent handle OS HI View Add Subview parent Handle top Handle OS Embed Control top Handle parent Handle Place the child at 0 0 in the parent Rect parent Rect new Rect OS Get Control Bounds parent Handle parent Rect Rect inset get Inset Rect new Bounds new Rect new Bounds left short parent Rect left inset left new Bounds top short parent Rect top inset top new Bounds right short new Bounds left inset right inset left new Bounds bottom short new Bounds top inset bottom inset top if new Bounds bottom new Bounds top new Bounds bottom new Bounds top if new Bounds right new Bounds left new Bounds right new Bounds left OS Set Control Bounds top Handle new Bounds  setZOrder topHandle topHandle parentHandle HIViewAddSubview parentHandle topHandle EmbedControl topHandle parentHandle parentRect GetControlBounds parentHandle parentRect getInset newBounds newBounds parentRect newBounds parentRect newBounds newBounds newBounds newBounds newBounds newBounds newBounds newBounds newBounds newBounds newBounds newBounds SetControlBounds topHandle newBounds
void setZ Order Control control boolean above int other Control control null 0 control top Handle setZ Order top Handle other Control above  setZOrder otherControl topHandle setZOrder topHandle otherControl
void sort int items Shell Sort from K R pg 108 int length items length for int gap length 2 gap 0 gap 2 for int i gap i length i for int j i gap j 0 j gap if items j items j gap int swap items j items j items j gap items j gap swap 
Returns a point which is the result of converting the argument which is specified in display relative coordinates to coordinates relative to the receiver p param x the x coordinate to be translated param y the y coordinate to be translated return the translated coordinates 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 since 2 1 public Point to Control int x int y check Widget Rect rect new Rect int window OS Get Control Owner handle OS Get Window Bounds window short OS k Window Content Rgn rect x rect left y rect top OS Get Control Bounds handle rect return new Point x rect left y rect top  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS toControl checkWidget GetControlOwner GetWindowBounds kWindowContentRgn GetControlBounds
Returns a point which is the result of converting the argument which is specified in display relative coordinates to coordinates relative to the receiver p param point the point to be translated must not be null return the translated coordinates exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the point is null li ul 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 Point to Control Point point check Widget if point null error SWT ERROR NULL ARGUMENT return to Control point x point y  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS toControl checkWidget ERROR_NULL_ARGUMENT toControl
Returns a point which is the result of converting the argument which is specified in coordinates relative to the receiver to display relative coordinates p param x the x coordinate to be translated param y the y coordinate to be translated return the translated coordinates 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 since 2 1 public Point to Display int x int y check Widget Rect rect new Rect OS Get Control Bounds handle rect x rect left y rect top int window OS Get Control Owner handle OS Get Window Bounds window short OS k Window Content Rgn rect return new Point x rect left y rect top  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS toDisplay checkWidget GetControlBounds GetControlOwner GetWindowBounds kWindowContentRgn
Returns a point which is the result of converting the argument which is specified in coordinates relative to the receiver to display relative coordinates p param point the point to be translated must not be null return the translated coordinates exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the point is null li ul 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 Point to Display Point point check Widget if point null error SWT ERROR NULL ARGUMENT return to Display point x point y  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS toDisplay checkWidget ERROR_NULL_ARGUMENT toDisplay
int top Handle return handle  topHandle
boolean translate Traversal int key int the Event int detail SWT TRAVERSE NONE int code traversal Code key the Event boolean all false switch key case 53 Esc all true detail SWT TRAVERSE ESCAPE break case 36 Return all true detail SWT TRAVERSE RETURN break case 48 Tab int modifiers new int 1 OS Get Event Parameter the Event OS k Event Param Key Modifiers OS typeU Int32 null 4 null modifiers boolean next modifiers 0 OS shift Key 0 detail next SWT TRAVERSE TAB NEXT SWT TRAVERSE TAB PREVIOUS break case 126 Up arrow case 123 Left arrow case 125 Down arrow case 124 Right arrow boolean next key 125 Down arrow key 124 Right arrow detail next SWT TRAVERSE ARROW NEXT SWT TRAVERSE ARROW PREVIOUS break case 116 Page up case 121 Page down all true int modifiers new int 1 OS Get Event Parameter the Event OS k Event Param Key Modifiers OS typeU Int32 null 4 null modifiers if modifiers 0 OS control Key 0 return false detail key 121 Page down SWT TRAVERSE PAGE NEXT SWT TRAVERSE PAGE PREVIOUS break default return false Event event new Event event doit code detail 0 event detail detail if set Key State event SWT Traverse the Event return false Shell shell get Shell Control control this do if control traverse event return true if event doit control hooks SWT Traverse return false if control shell return false control control parent while all control null return false  translateTraversal theEvent TRAVERSE_NONE traversalCode theEvent TRAVERSE_ESCAPE TRAVERSE_RETURN GetEventParameter theEvent kEventParamKeyModifiers typeUInt32 shiftKey TRAVERSE_TAB_NEXT TRAVERSE_TAB_PREVIOUS TRAVERSE_ARROW_NEXT TRAVERSE_ARROW_PREVIOUS GetEventParameter theEvent kEventParamKeyModifiers typeUInt32 controlKey TRAVERSE_PAGE_NEXT TRAVERSE_PAGE_PREVIOUS setKeyState theEvent getShell
int traversal Code int key int the Event int code SWT TRAVERSE RETURN SWT TRAVERSE TAB NEXT SWT TRAVERSE TAB PREVIOUS Shell shell get Shell if shell parent null code SWT TRAVERSE ESCAPE return code  traversalCode theEvent TRAVERSE_RETURN TRAVERSE_TAB_NEXT TRAVERSE_TAB_PREVIOUS getShell TRAVERSE_ESCAPE
boolean traverse Mnemonic char key return false  traverseMnemonic
Based on the argument perform one of the expected platform traversal action The argument should be one of the constants code SWT TRAVERSE ESCAPE code code SWT TRAVERSE RETURN code code SWT TRAVERSE TAB NEXT code code SWT TRAVERSE TAB PREVIOUS code code SWT TRAVERSE ARROW NEXT code and code SWT TRAVERSE ARROW PREVIOUS code param traversal the type of traversal return true if the traversal succeeded 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 boolean traverse int traversal check Widget Event event new Event event doit true event detail traversal return traverse event  TRAVERSE_ESCAPE TRAVERSE_RETURN TRAVERSE_TAB_NEXT TRAVERSE_TAB_PREVIOUS TRAVERSE_ARROW_NEXT TRAVERSE_ARROW_PREVIOUS SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget
boolean traverse Event event send Event SWT Traverse event if is Disposed return true if event doit return false switch event detail case SWT TRAVERSE NONE return true case SWT TRAVERSE ESCAPE return traverse Escape case SWT TRAVERSE RETURN return traverse Return case SWT TRAVERSE TAB NEXT return traverse Group true case SWT TRAVERSE TAB PREVIOUS return traverse Group false case SWT TRAVERSE ARROW NEXT return traverse Item true case SWT TRAVERSE ARROW PREVIOUS return traverse Item false case SWT TRAVERSE MNEMONIC return traverse Mnemonic event case SWT TRAVERSE PAGE NEXT return traverse Page true case SWT TRAVERSE PAGE PREVIOUS return traverse Page false return false  sendEvent isDisposed TRAVERSE_NONE TRAVERSE_ESCAPE traverseEscape TRAVERSE_RETURN traverseReturn TRAVERSE_TAB_NEXT traverseGroup TRAVERSE_TAB_PREVIOUS traverseGroup TRAVERSE_ARROW_NEXT traverseItem TRAVERSE_ARROW_PREVIOUS traverseItem TRAVERSE_MNEMONIC traverseMnemonic TRAVERSE_PAGE_NEXT traversePage TRAVERSE_PAGE_PREVIOUS traversePage
boolean traverse Escape return false  traverseEscape
boolean traverse Group boolean next Control root compute Tab Root Control group compute Tab Group Control list root compute Tab List int length list length int index 0 while index length if list index group break index It is possible but unlikely that application code could have disposed the widget in focus in or out events Ensure that a disposed widget is not accessed if index length return false int start index offset next 1 1 while index index offset length length start Control control list index if control is Disposed control set Tab Group Focus return true if group is Disposed return false return group set Tab Group Focus  traverseGroup computeTabRoot computeTabGroup computeTabList isDisposed setTabGroupFocus isDisposed setTabGroupFocus
boolean traverse Item boolean next Control children parent  getChildren int length children length int index 0 while index length if children index this break index It is possible but unlikely that application code could have disposed the widget in focus in or out events Ensure that a disposed widget is not accessed if index length return false int start index offset next 1 1 while index index offset length length start Control child children index if child is Disposed child is Tab Item if child set Tab Item Focus return true return false  traverseItem _getChildren isDisposed isTabItem setTabItemFocus
boolean traverse Return return false  traverseReturn
boolean traverse Page boolean next return false  traversePage
boolean traverse Mnemonic Event event return false  traverseMnemonic
Forces all outstanding paint requests for the widget to be processed before this method returns 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 redraw see Paint Listener see SWT Paint public void update check Widget update false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS PaintListener checkWidget
void update boolean all check Widget if is Drawing handle return int window OS Get Control Owner handle int port OS Get Window Port window int port Rgn OS New Rgn OS Get Port Visible Region port port Rgn if OS Empty Rgn port Rgn int update Rgn OS New Rgn OS Get Window Region window short OS k Window Update Rgn update Rgn if OS Empty Rgn update Rgn Rect rect new Rect OS Get Window Bounds window short OS k Window Content Rgn rect OS Offset Rgn update Rgn short rect left short rect top OS Sect Rgn port Rgn update Rgn update Rgn if OS Empty Rgn update Rgn int visible Rgn get Visible Region handle all if OS Empty Rgn visible Rgn OS Sect Rgn update Rgn visible Rgn visible Rgn if OS Empty Rgn visible Rgn int current Port new int 1 OS Get Port current Port OS Set Port port OS Begin Update window OS Diff Rgn update Rgn visible Rgn update Rgn inval Window Rgn window update Rgn OS Update Controls window visible Rgn OS End Update window OS Set Port current Port 0 OS Dispose Rgn visible Rgn OS Dispose Rgn update Rgn OS Dispose Rgn port Rgn  checkWidget isDrawing GetControlOwner GetWindowPort portRgn NewRgn GetPortVisibleRegion portRgn EmptyRgn portRgn updateRgn NewRgn GetWindowRegion kWindowUpdateRgn updateRgn EmptyRgn updateRgn GetWindowBounds kWindowContentRgn OffsetRgn updateRgn SectRgn portRgn updateRgn updateRgn EmptyRgn updateRgn visibleRgn getVisibleRegion EmptyRgn visibleRgn SectRgn updateRgn visibleRgn visibleRgn EmptyRgn visibleRgn currentPort GetPort currentPort SetPort BeginUpdate DiffRgn updateRgn visibleRgn updateRgn invalWindowRgn updateRgn UpdateControls visibleRgn EndUpdate SetPort currentPort DisposeRgn visibleRgn DisposeRgn updateRgn DisposeRgn portRgn

Button default Button save Default Decorations Do nothing  defaultButton saveDefault
Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT BORDER see SWT CLOSE see SWT MIN see SWT MAX see SWT RESIZE see SWT TITLE see SWT NO TRIM see SWT SHELL TRIM see SWT DIALOG TRIM see SWT ON TOP see SWT TOOL see Widget check Subclass see Widget get Style public Decorations Composite parent int style super parent check Style style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS NO_TRIM SHELL_TRIM DIALOG_TRIM ON_TOP checkSubclass getStyle checkStyle
static int check Style int style if style SWT MENU SWT MIN SWT MAX SWT CLOSE 0 style SWT TITLE return style  checkStyle
void bring To Top boolean force move Above null  bringToTop moveAbove
protected void check Subclass if is Valid Subclass error SWT ERROR INVALID SUBCLASS  checkSubclass isValidSubclass ERROR_INVALID_SUBCLASS
Control compute Tab Group return this  computeTabGroup
Control compute Tab Root return this  computeTabRoot
Returns the receiver s default button if one had previously been set otherwise returns null return the default button or null 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 set Default Button public Button get Default Button check Widget return default Button  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setDefaultButton getDefaultButton checkWidget defaultButton
Returns the receiver s image if it had previously been set using code set Image code The image is typically displayed by the window manager when the instance is marked as iconified and may also be displayed somewhere in the trim when the instance is in normal or maximized states p Note This method will return null if called before code set Image code is called It does not provide access to a window manager provided default image even if one exists p return the image 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 Image get Image check Widget return image  setImage setImage SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getImage checkWidget
Returns the receiver s images if they had previously been set using code set Images code Images are typically displayed by the window manager when the instance is marked as iconified and may also be displayed somewhere in the trim when the instance is in normal or maximized states Depending where the icon is displayed the platform chooses the icon with the best size It is expected that the array will contain the same icon rendered at different resolutions p Note This method will return an empty array if called before code set Images code is called It does not provide access to a window manager provided default image even if one exists p return the images 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 since 3 0 public Image get Images check Widget return images  setImages setImages SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getImages checkWidget
Returns code true code if the receiver is currently maximized and false otherwise p return the maximized 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 set Maximized public boolean get Maximized check Widget return maximized  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMaximized getMaximized checkWidget
Returns the receiver s menu bar if one had previously been set otherwise returns null return the menu bar or null 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 Menu get Menu Bar check Widget return menu Bar  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMenuBar checkWidget menuBar
Returns code true code if the receiver is currently minimized and false otherwise p return the minimized 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 set Minimized public boolean get Minimized check Widget return minimized  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMinimized getMinimized checkWidget
String get Name Text return get Text  getNameText getText
Returns the receiver s text which is the string that the window manager will typically display as the receiver s em title em If the text has not previously been set returns an empty string return the text 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 String get Text check Widget return text  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getText checkWidget
boolean is Tab Group return true  isTabGroup
boolean is Tab Item return false  isTabItem
Decorations menu Shell return this  menuShell
void release Widget if menu Bar null menu Bar dispose menu Bar null Menu menus display get Menus this if menus null do int index 0 while index menus length Menu menu menus index if menu null menu is Disposed while menu get Parent Menu null menu menu get Parent Menu menu dispose break index if index menus length break while true menus null super release Widget image null images null saved Focus null default Button save Default null  releaseWidget menuBar menuBar menuBar getMenus isDisposed getParentMenu getParentMenu releaseWidget savedFocus defaultButton saveDefault
boolean restore Focus if saved Focus null saved Focus is Disposed saved Focus null if saved Focus null return false return saved Focus force Focus  restoreFocus savedFocus savedFocus isDisposed savedFocus savedFocus savedFocus forceFocus
void save Focus int window OS Get Control Owner handle Control control display get Focus Control window if control null control this this control menu Shell set Saved Focus control  saveFocus GetControlOwner getFocusControl menuShell setSavedFocus
If the argument is not null sets the receiver s default button to the argument and if the argument is null sets the receiver s default button to the first button which was set as the receiver s default button called the em saved default button em If no default button had previously been set or the saved default button was disposed the receiver s default button will be set to null param button the new default button exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the button has been disposed li ul 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 set Default Button Button button check Widget set Default Button button true  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setDefaultButton checkWidget setDefaultButton
void set Default Button Button button boolean save if button null if default Button save Default if save save Default null return else if button is Disposed error SWT ERROR INVALID ARGUMENT if button style SWT PUSH 0 return if button default Button return if default Button null if default Button is Disposed default Button set Default false if default Button button null default Button save Default if default Button null if default Button is Disposed default Button set Default true if save save Default default Button if save Default null save Default is Disposed save Default null  setDefaultButton defaultButton saveDefault saveDefault isDisposed ERROR_INVALID_ARGUMENT defaultButton defaultButton defaultButton isDisposed defaultButton setDefault defaultButton defaultButton saveDefault defaultButton defaultButton isDisposed defaultButton setDefault saveDefault defaultButton saveDefault saveDefault isDisposed saveDefault
Sets the receiver s image to the argument which may be null The image is typically displayed by the window manager when the instance is marked as iconified and may also be displayed somewhere in the trim when the instance is in normal or maximized states param image the new image or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the image has been disposed li ul 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 set Image Image image check Widget if image null image is Disposed error SWT ERROR INVALID ARGUMENT this image image  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setImage checkWidget isDisposed ERROR_INVALID_ARGUMENT
Sets the receiver s images to the argument which may be an empty array Images are typically displayed by the window manager when the instance is marked as iconified and may also be displayed somewhere in the trim when the instance is in normal or maximized states Depending where the icon is displayed the platform chooses the icon with the best size It is expected that the array will contain the same icon rendered at different resolutions param images the new image array exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the array of images is null li li ERROR INVALID ARGUMENT if one of the images has been disposed li ul 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 since 3 0 public void set Images Image images check Widget if images null error SWT ERROR INVALID ARGUMENT for int i 0 i images length i if images i null images i is Disposed error SWT ERROR INVALID ARGUMENT this images images  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setImages checkWidget ERROR_INVALID_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT
Sets the maximized state of the receiver If the argument is code true code causes the receiver to switch to the maximized state and if the argument is code false code and the receiver was previously maximized causes the receiver to switch back to either the minimized or normal states p Note The result of intermixing calls to code set Maximized true code and code set Minimized true code will vary by platform Typically the behavior will match the platform user s expectations but not always This should be avoided if possible p param maximized the new maximized 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 set Minimized public void set Maximized boolean maximized check Widget this maximized maximized  setMaximized setMinimized SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMinimized setMaximized checkWidget
Sets the receiver s menu bar to the argument which may be null param menu the new menu bar exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the menu has been disposed li li ERROR INVALID PARENT if the menu is not in the same widget tree li ul 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 set Menu Bar Menu menu check Widget if menu Bar menu return if menu null if menu is Disposed error SWT ERROR INVALID ARGUMENT if menu style SWT BAR 0 error SWT ERROR MENU NOT BAR if menu parent this error SWT ERROR INVALID PARENT menu Bar menu  IllegalArgumentException ERROR_INVALID_ARGUMENT ERROR_INVALID_PARENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMenuBar checkWidget menuBar isDisposed ERROR_INVALID_ARGUMENT ERROR_MENU_NOT_BAR ERROR_INVALID_PARENT menuBar
Sets the minimized stated of the receiver If the argument is code true code causes the receiver to switch to the minimized state and if the argument is code false code and the receiver was previously minimized causes the receiver to switch back to either the maximized or normal states p Note The result of intermixing calls to code set Maximized true code and code set Minimized true code will vary by platform Typically the behavior will match the platform user s expectations but not always This should be avoided if possible p param minimized the new maximized 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 set Maximized public void set Minimized boolean minimized check Widget this minimized minimized  setMaximized setMinimized SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMaximized setMinimized checkWidget
void set Saved Focus Control control saved Focus control  setSavedFocus savedFocus
Sets the receiver s text which is the string that the window manager will typically display as the receiver s em title em to the argument which may not be null param string the new text exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the text is null li ul 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 set Text String string check Widget if string null error SWT ERROR NULL ARGUMENT text string  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setText checkWidget ERROR_NULL_ARGUMENT
boolean traverse Item boolean next return false  traverseItem
boolean traverse Return if default Button null default Button is Disposed return false if default Button is Visible default Button is Enabled return false default Button click return true  traverseReturn defaultButton defaultButton isDisposed defaultButton isVisible defaultButton isEnabled defaultButton

Constructs a new instance of this class given only its parent param parent a shell which will be the parent of the new instance exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul public Directory Dialog Shell parent this parent SWT APPLICATION MODAL  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS DirectoryDialog APPLICATION_MODAL
Constructs a new instance of this class 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 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 shell which will be the parent of the new instance param style the style of dialog to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul public Directory Dialog Shell parent int style super parent style check Subclass  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS DirectoryDialog checkSubclass
Returns the path which the dialog will use to filter the directories it shows return the filter path public String get Filter Path return filter Path  getFilterPath filterPath
Returns the dialog s message which is a description of the purpose for which it was opened This message will be visible on the dialog while it is open return the message public String get Message return message  getMessage
Makes the dialog visible and brings it to the front of the display return a string describing the absolute path of the selected directory or null if the dialog was cancelled or an error occurred exception SWT Exception ul li ERROR WIDGET DISPOSED if the dialog has been disposed li li ERROR THREAD INVALID ACCESS if not called from the thread that created the dialog li ul public String open String directory Path null int title Ptr 0 int message Ptr 0 if title null char buffer new char title length title get Chars 0 buffer length buffer 0 title Ptr OS CF String Create With Characters OS kCF Allocator Default buffer buffer length char buffer new char message length message get Chars 0 buffer length buffer 0 message Ptr OS CF String Create With Characters OS kCF Allocator Default buffer buffer length Nav Dialog Creation Options options new Nav Dialog Creation Options options parent Window OS Get Control Owner parent handle NEEDS WORK no title displayed options window Title options client Name title Ptr options option Flags OS k Nav Support Packages OS k Nav Allow Open Packages OS k Nav Allow Invisible Files options message message Ptr options location h 1 options location v 1 int out Dialog new int 1 NEEDS WORK use in Filter Proc to handle filtering if OS Nav Create Choose Folder Dialog options 0 0 0 out Dialog OS no Err OS Nav Dialog Run out Dialog 0 if OS Nav Dialog Get User Action out Dialog 0 OS k Nav User Action Choose Nav Reply Record record new Nav Reply Record OS Nav Dialog Get Reply out Dialog 0 record AE Desc selection new AE Desc selection descriptor Type record selection descriptorType selection data Handle record selection dataHandle int count new int 1 OS AE Count Items selection count if count 0 0 int theAE Keyword new int 1 int type Code new int 1 int maximum Size 80 size of FS Ref int data Ptr OS New Ptr maximum Size int actual Size new int 1 int status OS AE Get Nth Ptr selection 1 OS typeFS Ref theAE Keyword type Code data Ptr maximum Size actual Size if status OS no Err type Code 0 OS typeFS Ref byte fs Ref new byte actual Size 0 OS memcpy fs Ref data Ptr actual Size 0 int dir Url OS CFURL Create FromFS Ref OS kCF Allocator Default fs Ref int dir String OS CFURL Copy File System Path dir Url OS kCFURLPOSIX Path Style OS CF Release dir Url int length OS CF String Get Length dir String buffer new char length CF Range range new CF Range range length length OS CF String Get Characters dir String range buffer OS CF Release dir String filter Path directory Path new String buffer OS Dispose Ptr data Ptr if title Ptr 0 OS CF Release title Ptr if message Ptr 0 OS CF Release message Ptr if out Dialog 0 0 OS Nav Dialog Dispose out Dialog 0 return directory Path  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS directoryPath titlePtr messagePtr getChars titlePtr CFStringCreateWithCharacters kCFAllocatorDefault getChars messagePtr CFStringCreateWithCharacters kCFAllocatorDefault NavDialogCreationOptions NavDialogCreationOptions parentWindow GetControlOwner windowTitle clientName titlePtr optionFlags kNavSupportPackages kNavAllowOpenPackages kNavAllowInvisibleFiles messagePtr location_h location_v outDialog inFilterProc NavCreateChooseFolderDialog outDialog noErr NavDialogRun outDialog NavDialogGetUserAction outDialog kNavUserActionChoose NavReplyRecord NavReplyRecord NavDialogGetReply outDialog AEDesc AEDesc descriptorType selection_descriptorType dataHandle selection_dataHandle AECountItems theAEKeyword typeCode maximumSize FSRef dataPtr NewPtr maximumSize actualSize AEGetNthPtr typeFSRef theAEKeyword typeCode dataPtr maximumSize actualSize noErr typeCode typeFSRef fsRef actualSize fsRef dataPtr actualSize dirUrl CFURLCreateFromFSRef kCFAllocatorDefault fsRef dirString CFURLCopyFileSystemPath dirUrl kCFURLPOSIXPathStyle CFRelease dirUrl CFStringGetLength dirString CFRange CFRange CFStringGetCharacters dirString CFRelease dirString filterPath directoryPath DisposePtr dataPtr titlePtr CFRelease titlePtr messagePtr CFRelease messagePtr outDialog NavDialogDispose outDialog directoryPath
Sets the dialog s message which is a description of the purpose for which it was opened This message will be visible on the dialog while it is open param string the message exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul public void set Message String string if string null error SWT ERROR NULL ARGUMENT message string  IllegalArgumentException ERROR_NULL_ARGUMENT setMessage ERROR_NULL_ARGUMENT
Sets the path which the dialog will use to filter the directories it shows to the argument which may be null param string the filter path public void set Filter Path String string filter Path string  setFilterPath filterPath

Device Finder new Runnable public void run Device device get Current if device null device get Default set Device device  DeviceFinder getCurrent getDefault setDevice
TEMPORARY CODE static void set Device Device device Current Device device  setDevice CurrentDevice
static int translate Key int key for int i 0 i Key Table length i if Key Table i 0 key return Key Table i 1 return 0  translateKey KeyTable KeyTable KeyTable
static int untranslate Key int key for int i 0 i Key Table length i if Key Table i 1 key return Key Table i 0 return 0  untranslateKey KeyTable KeyTable KeyTable
int action Proc int the Control int part Code Widget widget get Widget the Control if widget null return widget action Proc the Control part Code return OS no Err  actionProc theControl partCode getWidget theControl actionProc theControl partCode noErr
int apple Event Proc int next Handler int the Event int user Data int ae EventID new int 1 if OS Get Event Parameter the Event OS k Event ParamAE EventID OS type Type null 4 null ae EventID OS no Err if ae EventID 0 OS kAE Quit Application Event event new Event send Event SWT Close event if event doit When the application is closing no SWT program can continue to run In order to avoid running code after the display has been disposed exit from Java dispose System exit 0 return OS user Canceled Err return OS event Not Handled Err  appleEventProc nextHandler theEvent userData aeEventID GetEventParameter theEvent kEventParamAEEventID typeType aeEventID noErr aeEventID kAEQuitApplication sendEvent userCanceledErr eventNotHandledErr
Adds the listener to the collection of listeners who will be notifed when an event of the given type occurs anywhere in this display When the event does occur the listener is notified by sending it the code handle Event code message param event Type the type of event to listen for param listener the listener which should be notified when the event occurs exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see Listener see remove Filter see remove Listener since 3 0 public void add Filter int event Type Listener listener check Device if listener null error SWT ERROR NULL ARGUMENT if filter Table null filter Table new Event Table filter Table hook event Type listener  handleEvent eventType IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED removeFilter removeListener addFilter eventType checkDevice ERROR_NULL_ARGUMENT filterTable filterTable EventTable filterTable eventType
Adds the listener to the collection of listeners who will be notifed when an event of the given type occurs When the event does occur in the display the listener is notified by sending it the code handle Event code message param event Type the type of event to listen for param listener the listener which should be notified when the event occurs exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see Listener see remove Listener since 2 0 public void add Listener int event Type Listener listener check Device if listener null error SWT ERROR NULL ARGUMENT if event Table null event Table new Event Table event Table hook event Type listener  handleEvent eventType IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED removeListener addListener eventType checkDevice ERROR_NULL_ARGUMENT eventTable eventTable EventTable eventTable eventType
void add Menu Menu menu if menus null menus new Menu 12 for int i 0 i menus length i if menus i null menu id short ID START i menus i menu return Menu new Menus new Menu menus length 12 menu id short ID START menus length new Menus menus length menu System arraycopy menus 0 new Menus 0 menus length menus new Menus  addMenu ID_START newMenus ID_START newMenus newMenus newMenus
void add Popup Menu menu if popups null popups new Menu 4 int length popups length for int i 0 i length i if popups i menu return int index 0 while index length if popups index null break index if index length Menu new Popups new Menu length 4 System arraycopy popups 0 new Popups 0 length popups new Popups popups index menu  addPopup newPopups newPopups newPopups
void add Widget int handle Widget widget if handle 0 return if free Slot 1 int length free Slot index Table length GROW SIZE int new Index Table new int length Widget new Widget Table new Widget length System arraycopy index Table 0 new Index Table 0 free Slot System arraycopy widget Table 0 new Widget Table 0 free Slot for int i free Slot i length 1 i new Index Table i i 1 new Index Table length 1 1 index Table new Index Table widget Table new Widget Table property 0 free Slot 1 OS Set Control Property handle SWT0 SWT0 4 property int old Slot free Slot free Slot index Table old Slot index Table old Slot 2 widget Table old Slot widget  addWidget freeSlot freeSlot indexTable GROW_SIZE newIndexTable newWidgetTable indexTable newIndexTable freeSlot widgetTable newWidgetTable freeSlot freeSlot newIndexTable newIndexTable indexTable newIndexTable widgetTable newWidgetTable freeSlot SetControlProperty oldSlot freeSlot freeSlot indexTable oldSlot indexTable oldSlot widgetTable oldSlot
Causes the code run code method of the runnable to be invoked by the user interface thread at the next reasonable opportunity The caller of this method continues to run in parallel and is not notified when the runnable has completed param runnable code to run on the user interface thread exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see sync Exec public void async Exec Runnable runnable if is Disposed error SWT ERROR DEVICE DISPOSED synchronizer async Exec runnable  SWTException ERROR_DEVICE_DISPOSED syncExec asyncExec isDisposed ERROR_DEVICE_DISPOSED asyncExec
Causes the system hardware to emit a short sound if it supports this capability exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public void beep check Device OS Sys Beep short 100  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED checkDevice SysBeep
int caret Proc int id int client Data if current Caret null current Caret is Disposed return 0 if current Caret blink Caret int blink Rate current Caret blink Rate OS Set Event Loop Timer Next Fire Time id blink Rate 1000 0 else current Caret null return 0  caretProc clientData currentCaret currentCaret isDisposed currentCaret blinkCaret blinkRate currentCaret blinkRate SetEventLoopTimerNextFireTime blinkRate currentCaret
protected void check Device if thread null error SWT ERROR WIDGET DISPOSED if thread Thread current Thread error SWT ERROR THREAD INVALID ACCESS if is Disposed error SWT ERROR DEVICE DISPOSED  checkDevice ERROR_WIDGET_DISPOSED currentThread ERROR_THREAD_INVALID_ACCESS isDisposed ERROR_DEVICE_DISPOSED
Checks that this class can be subclassed p IMPORTANT See the comment in code Widget check Subclass code p exception SWT Exception ul li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see Widget check Subclass protected void check Subclass if Display is Valid Class get Class error SWT ERROR INVALID SUBCLASS  checkSubclass SWTException ERROR_INVALID_SUBCLASS checkSubclass checkSubclass isValidClass getClass ERROR_INVALID_SUBCLASS
int create Image int type int ref new int 1 int result OS Get Icon Ref OS k On System Disk OS k System Icons Creator type ref if result OS no Err return null int family new int 1 result OS Icon Ref To Icon Family ref 0 OS k Selector AlL Available Data family OS Release Icon Ref ref 0 if result OS no Err return null int data Handle OS New Handle 0 result OS Get Icon Family Data family 0 OS k Large32 Bit Data data Handle if result OS no Err OS Dispose Handle data Handle OS Dispose Handle family 0 return null int mask Handle OS New Handle 0 result OS Get Icon Family Data family 0 OS k Large8 Bit Mask mask Handle if result OS no Err OS Dispose Handle mask Handle OS Dispose Handle data Handle OS Dispose Handle family 0 return null int width 32 height 32 int bpr width 4 int data Size OS Get Handle Size data Handle int data OS New Ptr Clear data Size if data 0 OS Dispose Handle mask Handle OS Dispose Handle data Handle OS Dispose Handle family 0 return null OS H Lock data Handle OS H Lock mask Handle int icon Ptr new int 1 int mask Ptr new int 1 OS memcpy icon Ptr data Handle 4 OS memcpy mask Ptr mask Handle 4 OS memcpy data icon Ptr 0 data Size int pixel Count data Size 4 for int i 0 i pixel Count i OS memcpy data i 4 mask Ptr 0 i 1 OS H Unlock mask Handle OS H Unlock data Handle OS Dispose Handle mask Handle OS Dispose Handle data Handle OS Dispose Handle family 0 int provider OS CG Data Provider Create With Data 0 data data Size 0 if provider 0 OS Dispose Ptr data return null int colorspace OS CG Color Space Create DeviceRGB if colorspace 0 OS CG Data Provider Release provider OS Dispose Ptr data return null int cg Image OS CG Image Create width height 8 32 bpr colorspace OS kCG Image Alpha First provider null false 0 OS CG Color Space Release colorspace OS CG Data Provider Release provider return new int cg Image data  createImage GetIconRef kOnSystemDisk kSystemIconsCreator noErr IconRefToIconFamily kSelectorAlLAvailableData ReleaseIconRef noErr dataHandle NewHandle GetIconFamilyData kLarge32BitData dataHandle noErr DisposeHandle dataHandle DisposeHandle maskHandle NewHandle GetIconFamilyData kLarge8BitMask maskHandle noErr DisposeHandle maskHandle DisposeHandle dataHandle DisposeHandle dataSize GetHandleSize dataHandle NewPtrClear dataSize DisposeHandle maskHandle DisposeHandle dataHandle DisposeHandle HLock dataHandle HLock maskHandle iconPtr maskPtr iconPtr dataHandle maskPtr maskHandle iconPtr dataSize pixelCount dataSize pixelCount maskPtr HUnlock maskHandle HUnlock dataHandle DisposeHandle maskHandle DisposeHandle dataHandle DisposeHandle CGDataProviderCreateWithData dataSize DisposePtr CGColorSpaceCreateDeviceRGB CGDataProviderRelease DisposePtr cgImage CGImageCreate kCGImageAlphaFirst CGColorSpaceRelease CGDataProviderRelease cgImage
int create Overlay Window int gdevice OS Get Main Device int ptr new int 1 OS memcpy ptr gdevice 4 G Device device new G Device OS memcpy device ptr 0 G Device sizeof Rect rect new Rect OS Set Rect rect device left device top device right device bottom int out Window new int 1 OS Create New Window OS k Overlay Window Class 0 rect out Window if out Window 0 0 SWT error SWT ERROR NO HANDLES return out Window 0  createOverlayWindow GetMainDevice GDevice GDevice GDevice SetRect outWindow CreateNewWindow kOverlayWindowClass outWindow outWindow ERROR_NO_HANDLES outWindow
Constructs a new instance of this class p Note The resulting display is marked as the em current em display If this is the first display which has been constructed since the application started it is also marked as the em default em display p exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see get Current see get Default see Widget check Subclass see Shell public Display this null  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS getCurrent getDefault checkSubclass
public Display Device Data data super data  DeviceData
static synchronized void check Display Thread thread for int i 0 i Displays length i if Displays i null Displays i thread thread SWT error SWT ERROR THREAD INVALID ACCESS  checkDisplay ERROR_THREAD_INVALID_ACCESS
int color Proc int in Control int in Message int in Draw Depth int in Draw In Color Widget widget get Widget in Control if widget null return widget color Proc in Control in Message in Draw Depth in Draw In Color return OS event Not Handled Err  colorProc inControl inMessage inDrawDepth inDrawInColor getWidget inControl colorProc inControl inMessage inDrawDepth inDrawInColor eventNotHandledErr
int command Proc int next Handler int the Event int user Data int event Kind OS Get Event Kind the Event HI Command command new HI Command OS Get Event Parameter the Event OS k Event Param Direct Object OS typeHI Command null HI Command sizeof null command switch event Kind case OS k Event Process Command if command commandID OS kAE Quit Application close return OS no Err if command attributes OS kHI Command From Menu 0 if user Data 0 Widget widget get Widget user Data if widget null return widget command Proc next Handler the Event user Data else int menu Ref command menu menuRef short menuID OS Get MenuID menu Ref Menu menu find Menu menuID if menu null Feature in the Macintosh When a menu item is selected by the user the Macintosh sends k Event Menu Opening remembers the index of the item the user selected sends k Event Menu Closed and then sends k Event Process Command If application code modifies the menu inside of k Event Menu Closed by adding or removing items the index of the item that the user selected is invalid The fix is to detect that a menu has been modified during k Event Menu Closed and use the last target item remembered k Event Menu Target Item Menu Item item null if menu closed menu modified item menu last Target else item menu get Item command menu menuItemIndex 1 if item null return item k Event Process Command next Handler the Event user Data OS Hilite Menu short 0 return OS event Not Handled Err  commandProc nextHandler theEvent userData eventKind GetEventKind theEvent HICommand HICommand GetEventParameter theEvent kEventParamDirectObject typeHICommand HICommand eventKind kEventProcessCommand kAEQuitApplication noErr kHICommandFromMenu userData getWidget userData commandProc nextHandler theEvent userData menuRef menu_menuRef GetMenuID menuRef findMenu kEventMenuOpening kEventMenuClosed kEventProcessCommand kEventMenuClosed kEventMenuClosed kEventMenuTargetItem MenuItem lastTarget getItem menu_menuItemIndex kEventProcessCommand nextHandler theEvent userData HiliteMenu eventNotHandledErr
Rect compute Inset int control int temp Rgn OS New Rgn Rect rect new Rect OS Get Control Region control short OS k Control Structure Meta Part temp Rgn OS Get Control Bounds control rect Rect rgn Rect new Rect OS Get Region Bounds temp Rgn rgn Rect OS Dispose Rgn temp Rgn rect left rgn Rect left rect top rgn Rect top rect right short rgn Rect right rect right rect bottom short rgn Rect bottom rect bottom return rect  computeInset tempRgn NewRgn GetControlRegion kControlStructureMetaPart tempRgn GetControlBounds rgnRect GetRegionBounds tempRgn rgnRect DisposeRgn tempRgn rgnRect rgnRect rgnRect rgnRect
int control Proc int next Handler int the Event int user Data Widget widget get Widget user Data if widget null return widget control Proc next Handler the Event user Data return OS event Not Handled Err  controlProc nextHandler theEvent userData getWidget userData controlProc nextHandler theEvent userData eventNotHandledErr
static String convert To Lf String text char Cr r char Lf n int length text length if length 0 return text Check for an LF or CR LF Assume the rest of the string is formated that way This will not work if the string contains mixed delimiters int i text index Of Lf 0 if i 1 i 0 return text if text char At i 1 Cr return text The string is formatted with CR LF Create a new string with the LF line delimiter i 0 String Buffer result new String Buffer while i length int j text index Of Cr i if j 1 j length String s text substring i j result append s i j 2 result append Lf return result to String  convertToLf indexOf charAt StringBuffer StringBuffer indexOf toString
void clear Menu Flags if menus null return for int i 0 i menus length i Menu menu menus i if menu null menu modified menu closed false menu last Target null  clearMenuFlags lastTarget
Requests that the connection between SWT and the underlying operating system be closed exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see Device dispose since 2 0 public void close check Device Event event new Event send Event SWT Close event if event doit dispose  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED checkDevice sendEvent
Creates the device in the operating system If the device does not have a handle this method may do nothing depending on the device p This method is called before code init code p param data the Device Data which describes the receiver see init protected void create Device Data data check Subclass check Display thread Thread current Thread create Display data register this if Default null Default this  DeviceData DeviceData checkSubclass checkDisplay currentThread createDisplay
void create Display Device Data data queue OS Get Current Event Queue OS TXN Init Textension 0 0 0  createDisplay DeviceData GetCurrentEventQueue TXNInitTextension
synchronized static void deregister Display display for int i 0 i Displays length i if display Displays i Displays i null 
Destroys the device in the operating system and releases the device s handle If the device does not have a handle this method may do nothing depending on the device p This method is called after code release code p see dispose see release protected void destroy if this Default Default null deregister this destroy Display  destroyDisplay
void destroy Display  destroyDisplay
Causes the code run code method of the runnable to be invoked by the user interface thread just before the receiver is disposed param runnable code to run at dispose time exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public void dispose Exec Runnable runnable check Device if dispose List null dispose List new Runnable 4 for int i 0 i dispose List length i if dispose List i null dispose List i runnable return Runnable new Dispose List new Runnable dispose List length 4 System arraycopy dispose List 0 new Dispose List 0 dispose List length new Dispose List dispose List length runnable dispose List new Dispose List  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED disposeExec checkDevice disposeList disposeList disposeList disposeList disposeList newDisposeList disposeList disposeList newDisposeList disposeList newDisposeList disposeList disposeList newDisposeList
void drag Detect Control control if dragging control hooks SWT Drag Detect drag Mouse Start null if OS Wait Mouse Moved drag Mouse Start dragging true Rect rect new Rect int window OS Get Control Owner control handle OS Get Window Bounds window short OS k Window Content Rgn rect int x drag Mouse Start h rect left int y drag Mouse Start v rect top OS Get Control Bounds control handle rect x rect left y rect top Event event new Event event x x event y y control post Event SWT Drag Detect event control send Event SWT Drag Detect event drag Mouse Start null  dragDetect DragDetect dragMouseStart WaitMouseMoved dragMouseStart GetControlOwner GetWindowBounds kWindowContentRgn dragMouseStart dragMouseStart GetControlBounds postEvent DragDetect sendEvent DragDetect dragMouseStart
int draw Item Proc int browser int item int property int item State int the Rect int gd Depth int color Device Widget widget get Widget browser if widget null return widget draw Item Proc browser item property item State the Rect gd Depth color Device return OS no Err  drawItemProc itemState theRect gdDepth colorDevice getWidget drawItemProc itemState theRect gdDepth colorDevice noErr
void error int code SWT error code 
boolean filter Event Event event if filter Table null filter Table send Event event return false  filterEvent filterTable filterTable sendEvent
boolean filters int event Type if filter Table null return false return filter Table hooks event Type  eventType filterTable filterTable eventType
Menu find Menu int id if menus null return null int index id ID START if 0 index index menus length return menus index return null  findMenu ID_START
Given the operating system handle for a widget returns the instance of the code Widget code subclass which represents it in the currently running application if such exists or null if no matching widget can be found param handle the handle for the widget return the SWT widget that the handle represents exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public Widget find Widget int handle check Device return get Widget handle  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED findWidget checkDevice getWidget
Returns the display which the given thread is the user interface thread for or null if the given thread is not a user interface thread for any display param thread the user interface thread return the display for the given thread public static synchronized Display find Display Thread thread for int i 0 i Displays length i Display display Displays i if display null display thread thread return display return null  findDisplay
Returns the currently active code Shell code or null if no shell belonging to the currently running application is active return the active shell or null exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public Shell get Active Shell check Device for int i 0 i widget Table length i Widget widget widget Table i if widget null widget instanceof Shell Shell shell Shell widget if OS Is Window Active shell shell Handle return shell return null  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED getActiveShell checkDevice widgetTable widgetTable IsWindowActive shellHandle
Returns a rectangle describing the receiver s size and location return the bounding rectangle exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public Rectangle get Bounds check Device int gdevice OS Get Device List if gdevice 0 OS Get Next Device gdevice 0 return super get Bounds Monitor monitors get Monitors Rectangle rect monitors 0 get Bounds for int i 1 i monitors length i rect rect union monitors i get Bounds return rect  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED getBounds checkDevice GetDeviceList GetNextDevice getBounds getMonitors getBounds getBounds
Returns the display which the currently running thread is the user interface thread for or null if the currently running thread is not a user interface thread for any display return the current display public static synchronized Display get Current return find Display Thread current Thread  getCurrent findDisplay currentThread
int get Caret Blink Time return OS Get Caret Time 1000 60  getCaretBlinkTime GetCaretTime
Returns a rectangle which describes the area of the receiver which is capable of displaying data return the client area exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see get Bounds public Rectangle get Client Area check Device int gdevice OS Get Device List if gdevice 0 OS Get Next Device gdevice 0 return super get Client Area Monitor monitors get Monitors Rectangle rect monitors 0 get Bounds for int i 1 i monitors length i rect rect union monitors i get Bounds return rect  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED getBounds getClientArea checkDevice GetDeviceList GetNextDevice getClientArea getMonitors getBounds getBounds
Returns the control which the on screen pointer is currently over top of or null if it is not currently over one of the controls built by the currently running application return the control under the cursor exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public Control get Cursor Control org eclipse swt internal carbon Point where new org eclipse swt internal carbon Point OS Get Global Mouse where int the Window new int 1 if OS Find Window where the Window OS in Content return null if the Window 0 0 return null Rect rect new Rect OS Get Window Bounds the Window 0 short OS k Window Content Rgn rect CG Point in Point new CG Point in Point x where h rect left in Point y where v rect top int the Root new int 1 OS Get Root Control the Window 0 the Root int the Control new int 1 OS HI View Get Subview Hit the Root 0 in Point true the Control while the Control 0 0 OS Is Control Enabled the Control 0 OS Get Super Control the Control 0 the Control if the Control 0 0 do Widget widget get Widget the Control 0 if widget null if widget instanceof Control Control control Control widget if control is Enabled return control is Enabled Modal control null OS Get Super Control the Control 0 the Control while the Control 0 0 Widget widget get Widget the Root 0 if widget null widget instanceof Control return Control widget return null  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED getCursorControl GetGlobalMouse theWindow FindWindow theWindow inContent theWindow GetWindowBounds theWindow kWindowContentRgn CGPoint inPoint CGPoint inPoint inPoint theRoot GetRootControl theWindow theRoot theControl HIViewGetSubviewHit theRoot inPoint theControl theControl IsControlEnabled theControl GetSuperControl theControl theControl theControl getWidget theControl isEnabled isEnabledModal GetSuperControl theControl theControl theControl getWidget theRoot
Returns the location of the on screen pointer relative to the top left corner of the screen return the cursor location exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public Point get Cursor Location check Device org eclipse swt internal carbon Point pt new org eclipse swt internal carbon Point OS Get Global Mouse pt return new Point pt h pt v  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED getCursorLocation checkDevice GetGlobalMouse
Returns an array containing the recommended cursor sizes return the array of cursor sizes exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul since 3 0 public Point get Cursor Sizes check Device return new Point new Point 16 16  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED getCursorSizes checkDevice
Returns the default display One is created making the thread that invokes this method its user interface thread if it did not already exist return the default display public static synchronized Display get Default if Default null Default new Display return Default  getDefault
Returns the application defined property of the receiver with the specified name or null if it has not been set p Applications may have associated arbitrary objects with the receiver in this fashion If the objects stored in the properties need to be notified when the display is disposed of it is the application s responsibility provide a code dispose Exec code handler which does so p param key the name of the property return the value of the property or null if it has not been set exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the key is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see set Data see dispose Exec public Object get Data String key check Device if key null error SWT ERROR NULL ARGUMENT if keys null return null for int i 0 i keys length i if keys i equals key return values i return null  disposeExec IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED setData disposeExec getData checkDevice ERROR_NULL_ARGUMENT
Returns the application defined display specific data associated with the receiver or null if it has not been set The em display specific data em is a single unnamed field that is stored with every display p Applications may put arbitrary objects in this field If the object stored in the display specific data needs to be notified when the display is disposed of it is the application s responsibility provide a code dispose Exec code handler which does so p return the display specific data exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see set Data see dispose Exec public Object get Data check Device return data  disposeExec SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED setData disposeExec getData checkDevice
Returns the button dismissal alignment one of code LEFT code or code RIGHT code The button dismissal alignment is the ordering that should be used when positioning the default dismissal button for a dialog For example in a dialog that contains an OK and CANCEL button on platforms where the button dismissal alignment is code LEFT code the button ordering should be OK CANCEL When button dismissal alignment is code RIGHT code the button ordering should be CANCEL OK return the button dismissal order exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul since 2 1 public int get Dismissal Alignment check Device return SWT RIGHT  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED getDismissalAlignment checkDevice
Returns the longest duration in milliseconds between two mouse button clicks that will be considered a em double click em by the underlying operating system return the double click time exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public int get Double Click Time check Device return OS Get Dbl Time 1000 60  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED getDoubleClickTime checkDevice GetDblTime
Returns the control which currently has keyboard focus or null if keyboard events are not currently going to any of the controls built by the currently running application return the control under the cursor exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public Control get Focus Control check Device int the Window OS Get User Focus Window if the Window 0 return null return get Focus Control the Window  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED getFocusControl checkDevice theWindow GetUserFocusWindow theWindow getFocusControl theWindow
Control get Focus Control int window int the Control new int 1 OS Get Keyboard Focus window the Control if the Control 0 0 return null do Widget widget get Widget the Control 0 if widget null widget instanceof Control Control control Control widget return control is Enabled control null OS Get Super Control the Control 0 the Control while the Control 0 0 return null  getFocusControl theControl GetKeyboardFocus theControl theControl getWidget theControl isEnabled GetSuperControl theControl theControl theControl
Returns true when the high contrast mode is enabled Otherwise false is returned p Note This operation is a hint and is not supported on platforms that do not have this concept p return the high contrast mode exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul since 3 0 public boolean get High Contrast check Device return false  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED getHighContrast checkDevice
Returns the maximum allowed depth of icons on this display On some platforms this may be different than the actual depth of the display return the maximum icon depth exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public int get Icon Depth return get Depth  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED getIconDepth getDepth
Returns an array containing the recommended icon sizes return the array of icon sizes exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see Decorations set Images Image since 3 0 public Point get Icon Sizes check Device return new Point new Point 16 16 new Point 32 32 new Point 64 64 new Point 128 128  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED setImages getIconSizes checkDevice
int get Last Event Time This code is intentionally commented Event time is in seconds and we need an accurate time in milliseconds return int OS Get Last User Event Time 1000 0 return int System current Time Millis  getLastEventTime GetLastUserEventTime currentTimeMillis
Menu get Menus Decorations shell if menus null return new Menu 0 int count 0 for int i 0 i menus length i Menu menu menus i if menu null menu parent shell count int index 0 Menu result new Menu count for int i 0 i menus length i Menu menu menus i if menu null menu parent shell result index menu return result  getMenus
Menu get Menu Bar return menu Bar  getMenuBar menuBar
int get Message Count return synchronizer get Message Count  getMessageCount getMessageCount
Returns an array of monitors attached to the device return the array of monitors since 3 0 public Monitor get Monitors check Device int count 0 Monitor monitors new Monitor 1 Rect rect new Rect G Device device new G Device int gdevice OS Get Device List while gdevice 0 if count monitors length Monitor new Monitors new Monitor monitors length 4 System arraycopy monitors 0 new Monitors 0 monitors length monitors new Monitors Monitor monitor new Monitor monitor handle gdevice int ptr new int 1 OS memcpy ptr gdevice 4 OS memcpy device ptr 0 G Device sizeof monitor x device left monitor y device top monitor width device right device left monitor height device bottom device top OS Get Available Window Positioning Bounds gdevice rect monitor clientX rect left monitor clientY rect top monitor client Width rect right rect left monitor client Height rect bottom rect top monitors count monitor gdevice OS Get Next Device gdevice if count monitors length Monitor new Monitors new Monitor count System arraycopy monitors 0 new Monitors 0 count monitors new Monitors return monitors  getMonitors checkDevice GDevice GDevice GetDeviceList newMonitors newMonitors newMonitors GDevice GetAvailableWindowPositioningBounds clientWidth clientHeight GetNextDevice newMonitors newMonitors newMonitors
Returns the primary monitor for that device return the primary monitor since 3 0 public Monitor get Primary Monitor check Device int gdevice OS Get Main Device Monitor monitor new Monitor monitor handle gdevice int ptr new int 1 OS memcpy ptr gdevice 4 G Device device new G Device OS memcpy device ptr 0 G Device sizeof monitor x device left monitor y device top monitor width device right device left monitor height device bottom device top Rect rect new Rect OS Get Available Window Positioning Bounds gdevice rect monitor clientX rect left monitor clientY rect top monitor client Width rect right rect left monitor client Height rect bottom rect top return monitor  getPrimaryMonitor checkDevice GetMainDevice GDevice GDevice GDevice GetAvailableWindowPositioningBounds clientWidth clientHeight
Returns an array containing all shells which have not been disposed and have the receiver as their display return the receiver s shells exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public Shell get Shells check Device int length 0 for int i 0 i widget Table length i Widget widget widget Table i if widget null widget instanceof Shell length int index 0 Shell result new Shell length for int i 0 i widget Table length i Widget widget widget Table i if widget null widget instanceof Shell int j 0 while j index if result j widget break j if j index result index Shell widget if index length return result Shell new Result new Shell index System arraycopy result 0 new Result 0 index return new Result  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED getShells checkDevice widgetTable widgetTable widgetTable widgetTable newResult newResult newResult
Returns the thread that has invoked code sync Exec code or null if no such runnable is currently being invoked by the user interface thread p Note If a runnable invoked by async Exec is currently running this method will return null p return the receiver s sync interface thread exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public Thread get Sync Thread if is Disposed error SWT ERROR DEVICE DISPOSED return synchronizer sync Thread  syncExec asyncExec SWTException ERROR_DEVICE_DISPOSED getSyncThread isDisposed ERROR_DEVICE_DISPOSED syncThread
Returns the matching standard color for the given constant which should be one of the color constants specified in class code SWT code Any value other than one of the SWT color constants which is passed in will result in the color black This color should not be free d because it was allocated by the system not the application param id the color constant return the matching color exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see SWT public Color get System Color int id check Device NOT DONE RGB Color rgb new RGB Color switch id case SWT COLOR INFO FOREGROUND return super get System Color SWT COLOR BLACK case SWT COLOR INFO BACKGROUND return Color carbon new this new float 0xFF 255f 0xFF 255f 0xE1 255f 1 case SWT COLOR TITLE FOREGROUND OS Get Theme Text Color short OS k Theme Text Color Document Window Title Active short get Depth true rgb break case SWT COLOR TITLE BACKGROUND OS Get Theme Brush As Color short 5 undocumented darker highlight color short get Depth true rgb break case SWT COLOR TITLE BACKGROUND GRADIENT OS Get Theme Brush As Color short OS k Theme Brush Primary Highlight Color short get Depth true rgb break case SWT COLOR TITLE INACTIVE FOREGROUND OS Get Theme Text Color short OS k Theme Text Color Document Window Title Inactive short get Depth true rgb break case SWT COLOR TITLE INACTIVE BACKGROUND OS Get Theme Brush As Color short OS k Theme Brush Secondary Highlight Color short get Depth true rgb break case SWT COLOR TITLE INACTIVE BACKGROUND GRADIENT OS Get Theme Brush As Color short OS k Theme Brush Secondary Highlight Color short get Depth true rgb break case SWT COLOR WIDGET DARK SHADOW return Color carbon new this new float 0x33 255f 0x33 255f 0x33 255f 1 case SWT COLOR WIDGET NORMAL SHADOW return Color carbon new this new float 0x66 255f 0x66 255f 0x66 255f 1 case SWT COLOR WIDGET LIGHT SHADOW return Color carbon new this new float 0x99 255f 0x99 255f 0x99 255f 1 case SWT COLOR WIDGET HIGHLIGHT SHADOW return Color carbon new this new float 0xCC 255f 0xCC 255f 0xCC 255f 1 case SWT COLOR WIDGET BACKGROUND OS Get Theme Brush As Color short OS k Theme Brush Button Face Active short get Depth true rgb break case SWT COLOR WIDGET FOREGROUND OS Get Theme Text Color short OS k Theme Text Color Push Button Active short get Depth true rgb break case SWT COLOR WIDGET BORDER return super get System Color SWT COLOR BLACK case SWT COLOR LIST FOREGROUND OS Get Theme Text Color short OS k Theme Text Color List View short get Depth true rgb break case SWT COLOR LIST BACKGROUND OS Get Theme Brush As Color short OS k Theme Brush List View Background short get Depth true rgb break case SWT COLOR LIST SELECTION TEXT OS Get Theme Text Color short OS k Theme Text Color List View short get Depth true rgb break case SWT COLOR LIST SELECTION OS Get Theme Brush As Color short OS k Theme Brush Primary Highlight Color short get Depth true rgb break default return super get System Color id float red rgb red 8 0xFF 255f float green rgb green 8 0xFF 255f float blue rgb blue 8 0xFF 255f return Color carbon new this new float red green blue 1  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED getSystemColor checkDevice RGBColor RGBColor COLOR_INFO_FOREGROUND getSystemColor COLOR_BLACK COLOR_INFO_BACKGROUND carbon_new COLOR_TITLE_FOREGROUND GetThemeTextColor kThemeTextColorDocumentWindowTitleActive getDepth COLOR_TITLE_BACKGROUND GetThemeBrushAsColor getDepth COLOR_TITLE_BACKGROUND_GRADIENT GetThemeBrushAsColor kThemeBrushPrimaryHighlightColor getDepth COLOR_TITLE_INACTIVE_FOREGROUND GetThemeTextColor kThemeTextColorDocumentWindowTitleInactive getDepth COLOR_TITLE_INACTIVE_BACKGROUND GetThemeBrushAsColor kThemeBrushSecondaryHighlightColor getDepth COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT GetThemeBrushAsColor kThemeBrushSecondaryHighlightColor getDepth COLOR_WIDGET_DARK_SHADOW carbon_new COLOR_WIDGET_NORMAL_SHADOW carbon_new COLOR_WIDGET_LIGHT_SHADOW carbon_new COLOR_WIDGET_HIGHLIGHT_SHADOW carbon_new COLOR_WIDGET_BACKGROUND GetThemeBrushAsColor kThemeBrushButtonFaceActive getDepth COLOR_WIDGET_FOREGROUND GetThemeTextColor kThemeTextColorPushButtonActive getDepth COLOR_WIDGET_BORDER getSystemColor COLOR_BLACK COLOR_LIST_FOREGROUND GetThemeTextColor kThemeTextColorListView getDepth COLOR_LIST_BACKGROUND GetThemeBrushAsColor kThemeBrushListViewBackground getDepth COLOR_LIST_SELECTION_TEXT GetThemeTextColor kThemeTextColorListView getDepth COLOR_LIST_SELECTION GetThemeBrushAsColor kThemeBrushPrimaryHighlightColor getDepth getSystemColor carbon_new
Returns the matching standard platform cursor for the given constant which should be one of the cursor constants specified in class code SWT code This cursor should not be free d because it was allocated by the system not the application A value of code null code will be returned if the supplied constant is not an swt cursor constant param id the swt cursor constant return the corresponding cursor or code null code exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see SWT CURSOR ARROW see SWT CURSOR WAIT see SWT CURSOR CROSS see SWT CURSOR APPSTARTING see SWT CURSOR HELP see SWT CURSOR SIZEALL see SWT CURSOR SIZENESW see SWT CURSOR SIZENS see SWT CURSOR SIZENWSE see SWT CURSOR SIZEWE see SWT CURSOR SIZEN see SWT CURSOR SIZES see SWT CURSOR SIZEE see SWT CURSOR SIZEW see SWT CURSOR SIZENE see SWT CURSOR SIZESE see SWT CURSOR SIZESW see SWT CURSOR SIZENW see SWT CURSOR UPARROW see SWT CURSOR IBEAM see SWT CURSOR NO see SWT CURSOR HAND since 3 0 public Cursor get System Cursor int id check Device if 0 id id cursors length return null if cursors id null cursors id new Cursor this id return cursors id  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED CURSOR_ARROW CURSOR_WAIT CURSOR_CROSS CURSOR_APPSTARTING CURSOR_HELP CURSOR_SIZEALL CURSOR_SIZENESW CURSOR_SIZENS CURSOR_SIZENWSE CURSOR_SIZEWE CURSOR_SIZEN CURSOR_SIZES CURSOR_SIZEE CURSOR_SIZEW CURSOR_SIZENE CURSOR_SIZESE CURSOR_SIZESW CURSOR_SIZENW CURSOR_UPARROW CURSOR_IBEAM CURSOR_NO CURSOR_HAND getSystemCursor checkDevice
Returns the matching standard platform image for the given constant which should be one of the icon constants specified in class code SWT code This image should not be free d because it was allocated by the system not the application A value of code null code will be returned either if the supplied constant is not an swt icon constant or if the platform does not define an image that corresponds to the constant param id the swt icon constant return the corresponding image or code null code exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see SWT ICON ERROR see SWT ICON INFORMATION see SWT ICON QUESTION see SWT ICON WARNING see SWT ICON WORKING since 3 0 public Image get System Image int id int cg Image 0 int image Data 0 switch id case SWT ICON ERROR if error Image 0 int image create Image OS k Alert Stop Icon if image null error Image image 0 error Image Data image 1 cg Image error Image image Data error Image Data break case SWT ICON INFORMATION case SWT ICON QUESTION case SWT ICON WORKING if info Image 0 int image create Image OS k Alert Note Icon if image null info Image image 0 info Image Data image 1 cg Image info Image image Data info Image Data break case SWT ICON WARNING if warning Image 0 int image create Image OS k Alert Caution Icon if image null warning Image image 0 warning Image Data image 1 cg Image warning Image image Data warning Image Data break if cg Image 0 return null return Image carbon new this SWT ICON cg Image image Data  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED ICON_ERROR ICON_INFORMATION ICON_QUESTION ICON_WARNING ICON_WORKING getSystemImage cgImage imageData ICON_ERROR errorImage createImage kAlertStopIcon errorImage errorImageData cgImage errorImage imageData errorImageData ICON_INFORMATION ICON_QUESTION ICON_WORKING infoImage createImage kAlertNoteIcon infoImage infoImageData cgImage infoImage imageData infoImageData ICON_WARNING warningImage createImage kAlertCautionIcon warningImage warningImageData cgImage warningImage imageData warningImageData cgImage carbon_new cgImage imageData
Returns the single instance of the system tray return the receiver s user interface thread exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul since 3 0 public Tray get System Tray check Device if tray null return tray return tray new Tray this SWT NONE  SWTException ERROR_DEVICE_DISPOSED getSystemTray checkDevice
Returns the user interface thread for the receiver return the receiver s user interface thread exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public Thread get Thread if is Disposed error SWT ERROR DEVICE DISPOSED return thread  SWTException ERROR_DEVICE_DISPOSED getThread isDisposed ERROR_DEVICE_DISPOSED
Widget get Widget int handle if handle 0 return null property 0 0 OS Get Control Property handle SWT0 SWT0 4 null property int index property 0 1 if 0 index index widget Table length return widget Table index return null  getWidget GetControlProperty widgetTable widgetTable
int help Proc int in Control int in Global Mouse int in Request int out Content Provided int io Help Content Widget widget get Widget in Control if widget null return widget help Proc in Control in Global Mouse in Request out Content Provided io Help Content return OS event Not Handled Err  helpProc inControl inGlobalMouse inRequest outContentProvided ioHelpContent getWidget inControl helpProc inControl inGlobalMouse inRequest outContentProvided ioHelpContent eventNotHandledErr
int hit Test Proc int browser int item int property int the Rect int mouse Rect Widget widget get Widget browser if widget null return widget hit Test Proc browser item property the Rect mouse Rect return OS no Err  hitTestProc theRect mouseRect getWidget hitTestProc theRect mouseRect noErr
Initializes any internal resources needed by the device p This method is called after code create code p see create protected void init super init initialize Callbacks initialize Insets initialize Widget Table initialize Fonts  initializeCallbacks initializeInsets initializeWidgetTable initializeFonts
void initialize Callbacks Create Callbacks action Callback new Callback this action Proc 2 action Proc action Callback get Address if action Proc 0 error SWT ERROR NO MORE CALLBACKS apple Event Callback new Callback this apple Event Proc 3 apple Event Proc apple Event Callback get Address if apple Event Proc 0 error SWT ERROR NO MORE CALLBACKS caret Callback new Callback this caret Proc 2 caret Proc caret Callback get Address if caret Proc 0 error SWT ERROR NO MORE CALLBACKS command Callback new Callback this command Proc 3 command Proc command Callback get Address if command Proc 0 error SWT ERROR NO MORE CALLBACKS control Callback new Callback this control Proc 3 control Proc control Callback get Address if control Proc 0 error SWT ERROR NO MORE CALLBACKS draw Item Callback new Callback this draw Item Proc 7 draw Item Proc draw Item Callback get Address if draw Item Proc 0 error SWT ERROR NO MORE CALLBACKS item Compare Callback new Callback this item Compare Proc 4 item Compare Proc item Compare Callback get Address if item Compare Proc 0 error SWT ERROR NO MORE CALLBACKS item Data Callback new Callback this item Data Proc 5 item Data Proc item Data Callback get Address if item Data Proc 0 error SWT ERROR NO MORE CALLBACKS item Notification Callback new Callback this item Notification Proc 3 item Notification Proc item Notification Callback get Address if item Notification Proc 0 error SWT ERROR NO MORE CALLBACKS help Callback new Callback this help Proc 5 help Proc help Callback get Address if help Proc 0 error SWT ERROR NO MORE CALLBACKS hit Test Callback new Callback this hit Test Proc 5 hit Test Proc hit Test Callback get Address if hit Test Proc 0 error SWT ERROR NO MORE CALLBACKS keyboard Callback new Callback this keyboard Proc 3 keyboard Proc keyboard Callback get Address if keyboard Proc 0 error SWT ERROR NO MORE CALLBACKS menu Callback new Callback this menu Proc 3 menu Proc menu Callback get Address if menu Proc 0 error SWT ERROR NO MORE CALLBACKS mouse Hover Callback new Callback this mouse Hover Proc 2 mouse Hover Proc mouse Hover Callback get Address if mouse Hover Proc 0 error SWT ERROR NO MORE CALLBACKS mouse Callback new Callback this mouse Proc 3 mouse Proc mouse Callback get Address if mouse Proc 0 error SWT ERROR NO MORE CALLBACKS timer Callback new Callback this timer Proc 2 timer Proc timer Callback get Address if timer Proc 0 error SWT ERROR NO MORE CALLBACKS tracking Callback new Callback this tracking Proc 6 tracking Proc tracking Callback get Address if tracking Proc 0 error SWT ERROR NO MORE CALLBACKS window Callback new Callback this window Proc 3 window Proc window Callback get Address if window Proc 0 error SWT ERROR NO MORE CALLBACKS color Callback new Callback this color Proc 4 color Proc color Callback get Address if color Proc 0 error SWT ERROR NO MORE CALLBACKS text Input Callback new Callback this text Input Proc 3 text Input Proc text Input Callback get Address if text Input Proc 0 error SWT ERROR NO MORE CALLBACKS Install Event Handlers int mask1 new int OS k Event Class Command OS k Event Process Command int app Target OS Get Application Event Target OS Install Event Handler app Target command Proc mask1 length 2 mask1 0 null int mask2 new int OS k Event Class Mouse OS k Event Mouse Down OS k Event Class Mouse OS k Event Mouse Dragged OS k Event Class Mouse OS k Event Mouse Entered OS k Event Class Mouse OS k Event Mouse Exited OS k Event Class Mouse OS k Event Mouse Moved OS k Event Class Mouse OS k Event Mouse Up OS k Event Class Mouse OS k Event Mouse Wheel Moved OS Install Event Handler app Target mouse Proc mask2 length 2 mask2 0 null int mask3 new int OS k Event Class Apple Event OS k Event Apple Event OS Install Event Handler app Target apple Event Proc mask3 length 2 mask3 0 null int mask4 new int OS k Event Class Keyboard OS k Event Raw Key Down OS k Event Class Keyboard OS k Event Raw Key Modifiers Changed OS k Event Class Keyboard OS k Event Raw Key Repeat OS k Event Class Keyboard OS k Event Raw Key Up int focus Target OS Get User Focus Event Target OS Install Event Handler focus Target keyboard Proc mask4 length 2 mask4 0 null int mask5 new int OS k Event Class Text Input OS k Event Text Input Unicode For Key Event OS Install Event Handler focus Target text Input Proc mask5 length 2 mask5 0 null  initializeCallbacks actionCallback actionProc actionProc actionCallback getAddress actionProc ERROR_NO_MORE_CALLBACKS appleEventCallback appleEventProc appleEventProc appleEventCallback getAddress appleEventProc ERROR_NO_MORE_CALLBACKS caretCallback caretProc caretProc caretCallback getAddress caretProc ERROR_NO_MORE_CALLBACKS commandCallback commandProc commandProc commandCallback getAddress commandProc ERROR_NO_MORE_CALLBACKS controlCallback controlProc controlProc controlCallback getAddress controlProc ERROR_NO_MORE_CALLBACKS drawItemCallback drawItemProc drawItemProc drawItemCallback getAddress drawItemProc ERROR_NO_MORE_CALLBACKS itemCompareCallback itemCompareProc itemCompareProc itemCompareCallback getAddress itemCompareProc ERROR_NO_MORE_CALLBACKS itemDataCallback itemDataProc itemDataProc itemDataCallback getAddress itemDataProc ERROR_NO_MORE_CALLBACKS itemNotificationCallback itemNotificationProc itemNotificationProc itemNotificationCallback getAddress itemNotificationProc ERROR_NO_MORE_CALLBACKS helpCallback helpProc helpProc helpCallback getAddress helpProc ERROR_NO_MORE_CALLBACKS hitTestCallback hitTestProc hitTestProc hitTestCallback getAddress hitTestProc ERROR_NO_MORE_CALLBACKS keyboardCallback keyboardProc keyboardProc keyboardCallback getAddress keyboardProc ERROR_NO_MORE_CALLBACKS menuCallback menuProc menuProc menuCallback getAddress menuProc ERROR_NO_MORE_CALLBACKS mouseHoverCallback mouseHoverProc mouseHoverProc mouseHoverCallback getAddress mouseHoverProc ERROR_NO_MORE_CALLBACKS mouseCallback mouseProc mouseProc mouseCallback getAddress mouseProc ERROR_NO_MORE_CALLBACKS timerCallback timerProc timerProc timerCallback getAddress timerProc ERROR_NO_MORE_CALLBACKS trackingCallback trackingProc trackingProc trackingCallback getAddress trackingProc ERROR_NO_MORE_CALLBACKS windowCallback windowProc windowProc windowCallback getAddress windowProc ERROR_NO_MORE_CALLBACKS colorCallback colorProc colorProc colorCallback getAddress colorProc ERROR_NO_MORE_CALLBACKS textInputCallback textInputProc textInputProc textInputCallback getAddress textInputProc ERROR_NO_MORE_CALLBACKS kEventClassCommand kEventProcessCommand appTarget GetApplicationEventTarget InstallEventHandler appTarget commandProc kEventClassMouse kEventMouseDown kEventClassMouse kEventMouseDragged kEventClassMouse kEventMouseEntered kEventClassMouse kEventMouseExited kEventClassMouse kEventMouseMoved kEventClassMouse kEventMouseUp kEventClassMouse kEventMouseWheelMoved InstallEventHandler appTarget mouseProc kEventClassAppleEvent kEventAppleEvent InstallEventHandler appTarget appleEventProc kEventClassKeyboard kEventRawKeyDown kEventClassKeyboard kEventRawKeyModifiersChanged kEventClassKeyboard kEventRawKeyRepeat kEventClassKeyboard kEventRawKeyUp focusTarget GetUserFocusEventTarget InstallEventHandler focusTarget keyboardProc kEventClassTextInput kEventTextInputUnicodeForKeyEvent InstallEventHandler focusTarget textInputProc
void initialize Fonts TEMPORARY CODE small Fonts System get Property org eclipse swt internal carbon small Fonts null no Focus Ring System get Property org eclipse swt internal carbon no Focus Ring null  initializeFonts smallFonts getProperty smallFonts noFocusRing getProperty noFocusRing
void initialize Insets int out Control new int 1 Rect rect new Rect rect right rect bottom short 200 OS Create Push Button Control 0 rect 0 out Control button Inset compute Inset out Control 0 OS Dispose Control out Control 0 OS Create Tabs Control 0 rect short OS k Control Tab Size Large short OS k Control Tab Direction North short 0 0 out Control tab Folder North Inset compute Inset out Control 0 OS Dispose Control out Control 0 OS Create Tabs Control 0 rect short OS k Control Tab Size Large short OS k Control Tab Direction South short 0 0 out Control tab Folder South Inset compute Inset out Control 0 OS Dispose Control out Control 0 CG Rect cg Rect new CG Rect cg Rect width cg Rect height 200 int in Attributes OS kHI Combo Box Auto Completion Attribute OS kHI Combo Box Auto Size List Attribute OS HI Combo Box Create cg Rect 0 null 0 in Attributes out Control combo Inset compute Inset out Control 0 FIXME combo Inset bottom combo Inset top OS Dispose Control out Control 0  initializeInsets outControl CreatePushButtonControl outControl buttonInset computeInset outControl DisposeControl outControl CreateTabsControl kControlTabSizeLarge kControlTabDirectionNorth outControl tabFolderNorthInset computeInset outControl DisposeControl outControl CreateTabsControl kControlTabSizeLarge kControlTabDirectionSouth outControl tabFolderSouthInset computeInset outControl DisposeControl outControl CGRect cgRect CGRect cgRect cgRect inAttributes kHIComboBoxAutoCompletionAttribute kHIComboBoxAutoSizeListAttribute HIComboBoxCreate cgRect inAttributes outControl comboInset computeInset outControl comboInset comboInset DisposeControl outControl
void initialize Widget Table property new int 1 index Table new int GROW SIZE widget Table new Widget GROW SIZE for int i 0 i GROW SIZE 1 i index Table i i 1 index Table GROW SIZE 1 1  initializeWidgetTable indexTable GROW_SIZE widgetTable GROW_SIZE GROW_SIZE indexTable indexTable GROW_SIZE
Invokes platform specific functionality to allocate a new GC handle p b IMPORTANT b This method is em not em part of the public API for code Display code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param data the platform specific GC data return the platform specific GC handle exception SWT Error ul li ERROR NO HANDLES if a handle could not be obtained for image creation li ul exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public int internal new GC GC Data data if is Disposed SWT error SWT ERROR DEVICE DISPOSED TODO multiple monitors int window create Overlay Window OS Show Window window int port OS Get Window Port window int buffer new int 1 OS CreateCG Context For Port port buffer int context buffer 0 if context 0 SWT error SWT ERROR NO HANDLES Rect port Rect new Rect OS Get Port Bounds port port Rect OS CG Context ScaleCTM context 1 1 OS CG Context TranslateCTM context 0 port Rect top port Rect bottom if data null int mask SWT LEFT TO RIGHT SWT RIGHT TO LEFT if data style mask 0 data style SWT LEFT TO RIGHT data device this data window window data background get System Color SWT COLOR WHITE handle data foreground get System Color SWT COLOR BLACK handle data font get System Font return context  SWTError ERROR_NO_HANDLES SWTException ERROR_DEVICE_DISPOSED internal_new_GC GCData isDisposed ERROR_DEVICE_DISPOSED createOverlayWindow ShowWindow GetWindowPort CreateCGContextForPort ERROR_NO_HANDLES portRect GetPortBounds portRect CGContextScaleCTM CGContextTranslateCTM portRect portRect LEFT_TO_RIGHT RIGHT_TO_LEFT LEFT_TO_RIGHT getSystemColor COLOR_WHITE getSystemColor COLOR_BLACK getSystemFont
Invokes platform specific functionality to dispose a GC handle p b IMPORTANT b This method is em not em part of the public API for code Display code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param hDC the platform specific GC handle param data the platform specific GC data public void internal dispose GC int context GC Data data if is Disposed SWT error SWT ERROR DEVICE DISPOSED if data null int window data window OS Dispose Window window data window 0 This code is intentionaly commented Use CG Context Synchronize instead of CG Context Flush to improve performance OS CG Context Flush context OS CG Context Synchronize context OS CG Context Release context  internal_dispose_GC GCData isDisposed ERROR_DEVICE_DISPOSED DisposeWindow CGContextSynchronize CGContextFlush CGContextFlush CGContextSynchronize CGContextRelease
static boolean is Valid Class Class clazz String name clazz get Name int index name last Index Of return name substring 0 index 1 equals PACKAGE PREFIX  isValidClass getName lastIndexOf PACKAGE_PREFIX
boolean is Valid Thread return thread Thread current Thread  isValidThread currentThread
int item Compare Proc int browser int item One int item Two int sort Property Widget widget get Widget browser if widget null return widget item Compare Proc browser item One item Two sort Property return OS no Err  itemCompareProc itemOne itemTwo sortProperty getWidget itemCompareProc itemOne itemTwo sortProperty noErr
int item Data Proc int browser int item int property int item Data int set Value Widget widget get Widget browser if widget null return widget item Data Proc browser item property item Data set Value return OS no Err  itemDataProc itemData setValue getWidget itemDataProc itemData setValue noErr
int item Notification Proc int browser int item int message Widget widget get Widget browser if widget null return widget item Notification Proc browser item message return OS no Err  itemNotificationProc getWidget itemNotificationProc noErr
int keyboard Proc int next Handler int the Event int user Data Widget widget get Widget user Data if widget null int the Window OS Get User Focus Window if the Window 0 return OS event Not Handled Err int the Control new int 1 OS Get Keyboard Focus the Window the Control widget get Widget the Control 0 if widget null return widget keyboard Proc next Handler the Event user Data return OS event Not Handled Err  keyboardProc nextHandler theEvent userData getWidget userData theWindow GetUserFocusWindow theWindow eventNotHandledErr theControl GetKeyboardFocus theWindow theControl getWidget theControl keyboardProc nextHandler theEvent userData eventNotHandledErr
Generate a low level system event code post code is used to generate low level keyboard and mouse events The intent is to enable automated UI testing by simulating the input from the user Most SWT applications should never need to call this method p b Event Types b p Key Down Key Up p The following fields in the code Event code apply ul li in type Key Down or Key Up li p Either one of li in character a character that corresponds to a keyboard key li li in key Code the key code of the key that was typed as defined by the key code constants in class code SWT code li ul p Mouse Down Mouse Up p p The following fields in the code Event code apply ul li in type Mouse Down or Mouse Up li in button the button that is pressed or released ul p Mouse Move p p The following fields in the code Event code apply ul li in type Mouse Move li in x the x coordinate to move the mouse pointer to in screen coordinates li in y the y coordinate to move the mouse pointer to in screen coordinates ul dl param event the event to be generated return true if the event was generated or false otherwise exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the event is null li ul exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul since 3 0 public boolean post Event event if is Disposed error SWT ERROR DEVICE DISPOSED if event null error SWT ERROR NULL ARGUMENT int type event type switch type case SWT Key Down case SWT Key Up int v Key Display untranslate Key event key Code if v Key 0 return OS CG Post Keyboard Event 0 v Key type SWT Key Down 0 else v Key 1 int kchr Ptr OS Get Script Manager Variable short OS smKCHR Cache int key 1 int state new int 1 int encoding new int 1 short key Script short OS Get Script Manager Variable short OS sm Key Script short region Code short OS Get Script Manager Variable short OS sm Region Code if OS Upgrade Script Info To Text Encoding key Script short OS k Text Language Dont Care region Code null encoding OS param Err if OS Upgrade Script Info To Text Encoding key Script short OS k Text Language Dont Care short OS k Text Region Dont Care null encoding OS param Err encoding 0 OS k Text Encoding Mac Roman int encoding Info new int 1 OS Create Unicode To Text Info By Encoding encoding 0 encoding Info if encoding Info 0 0 char input event character byte buffer new byte 2 OS Convert From Unicode ToP String encoding Info 0 2 input buffer OS Dispose Unicode To Text Info encoding Info key buffer 1 0x7f if key 1 return false for int i 0 i 0x7F i int result1 OS Key Translate kchr Ptr short i 512 state int result2 OS Key Translate kchr Ptr short i state if result1 0x7f key result2 0x7f key v Key i break if v Key 1 return false return OS CG Post Keyboard Event key v Key type SWT Key Down 0 case SWT Mouse Down case SWT Mouse Move case SWT Mouse Up CG Point mouse Cursor Position new CG Point int chord OS Get Current Event Button State if type SWT Mouse Move mouse Cursor Position x event x mouse Cursor Position y event y return OS CG Post Mouse Event mouse Cursor Position true 3 chord 0x1 0 chord 0x2 0 chord 0x4 0 0 else int button event button if button 1 button 3 return false boolean button1 false button2 false button3 false switch button case 1 button1 type SWT Mouse Down button2 chord 0x4 0 button3 chord 0x2 0 break case 2 button1 chord 0x1 0 button2 type SWT Mouse Down button3 chord 0x2 0 break case 3 button1 chord 0x1 0 button2 chord 0x4 0 button3 type SWT Mouse Down break org eclipse swt internal carbon Point pt new org eclipse swt internal carbon Point OS Get Global Mouse pt mouse Cursor Position x pt h mouse Cursor Position y pt v return OS CG Post Mouse Event mouse Cursor Position true 3 button1 button3 button2 0 return false  KeyDown KeyUp KeyDown KeyUp keyCode MouseDown MouseUp MouseDown MouseUp MouseMove MouseMove IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_DEVICE_DISPOSED isDisposed ERROR_DEVICE_DISPOSED ERROR_NULL_ARGUMENT KeyDown KeyUp vKey untranslateKey keyCode vKey CGPostKeyboardEvent vKey KeyDown vKey kchrPtr GetScriptManagerVariable smKCHRCache keyScript GetScriptManagerVariable smKeyScript regionCode GetScriptManagerVariable smRegionCode UpgradeScriptInfoToTextEncoding keyScript kTextLanguageDontCare regionCode paramErr UpgradeScriptInfoToTextEncoding keyScript kTextLanguageDontCare kTextRegionDontCare paramErr kTextEncodingMacRoman encodingInfo CreateUnicodeToTextInfoByEncoding encodingInfo encodingInfo ConvertFromUnicodeToPString encodingInfo DisposeUnicodeToTextInfo encodingInfo KeyTranslate kchrPtr KeyTranslate kchrPtr vKey vKey CGPostKeyboardEvent vKey KeyDown MouseDown MouseMove MouseUp CGPoint mouseCursorPosition CGPoint GetCurrentEventButtonState MouseMove mouseCursorPosition mouseCursorPosition CGPostMouseEvent mouseCursorPosition MouseDown MouseDown MouseDown GetGlobalMouse mouseCursorPosition mouseCursorPosition CGPostMouseEvent mouseCursorPosition
void post Event Event event Place the event at the end of the event queue This code is always called in the Display s thread so it must be re enterant but does not need to be synchronized if event Queue null event Queue new Event 4 int index 0 int length event Queue length while index length if event Queue index null break index if index length Event new Queue new Event length 4 System arraycopy event Queue 0 new Queue 0 length event Queue new Queue event Queue index event  postEvent eventQueue eventQueue eventQueue eventQueue newQueue eventQueue newQueue eventQueue newQueue eventQueue
Maps a point from one coordinate system to another When the control is null coordinates are mapped to the display p NOTE On right to left platforms where the coordinate systems are mirrored special care needs to be taken when mapping coordinates from one control to another to ensure the result is correctly mirrored Mapping a point that is the origin of a rectangle and then adding the width and height is not equivalent to mapping the rectangle When one control is mirrored and the other is not adding the width and height to a point that was mapped causes the rectangle to extend in the wrong direction Mapping the entire rectangle instead of just one point causes both the origin and the corner of the rectangle to be mapped p param from the source code Control code or code null code param to the destination code Control code or code null code param point to be mapped return point with mapped coordinates exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the rectangle is null li li ERROR INVALID ARGUMENT if the Control from or the Control to have been disposed li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul since 2 1 2 public Point map Control from Control to Point point check Device if point null error SWT ERROR NULL ARGUMENT return map from to point x point y  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED checkDevice ERROR_NULL_ARGUMENT
Maps a point from one coordinate system to another When the control is null coordinates are mapped to the display p NOTE On right to left platforms where the coordinate systems are mirrored special care needs to be taken when mapping coordinates from one control to another to ensure the result is correctly mirrored Mapping a point that is the origin of a rectangle and then adding the width and height is not equivalent to mapping the rectangle When one control is mirrored and the other is not adding the width and height to a point that was mapped causes the rectangle to extend in the wrong direction Mapping the entire rectangle instead of just one point causes both the origin and the corner of the rectangle to be mapped p param from the source code Control code or code null code param to the destination code Control code or code null code param x coordinates to be mapped param y coordinates to be mapped return point with mapped coordinates exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the Control from or the Control to have been disposed li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul since 2 1 2 public Point map Control from Control to int x int y check Device if from null from is Disposed error SWT ERROR INVALID ARGUMENT if to null to is Disposed error SWT ERROR INVALID ARGUMENT Point point new Point x y if from null Rect rect new Rect OS Get Control Bounds from handle rect point x rect left point y rect top int window OS Get Control Owner from handle OS Get Window Bounds window short OS k Window Content Rgn rect point x rect left point y rect top if to null Rect rect new Rect OS Get Control Bounds to handle rect point x rect left point y rect top int window OS Get Control Owner to handle OS Get Window Bounds window short OS k Window Content Rgn rect point x rect left point y rect top return point  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED checkDevice isDisposed ERROR_INVALID_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT GetControlBounds GetControlOwner GetWindowBounds kWindowContentRgn GetControlBounds GetControlOwner GetWindowBounds kWindowContentRgn
Maps a point from one coordinate system to another When the control is null coordinates are mapped to the display p NOTE On right to left platforms where the coordinate systems are mirrored special care needs to be taken when mapping coordinates from one control to another to ensure the result is correctly mirrored Mapping a point that is the origin of a rectangle and then adding the width and height is not equivalent to mapping the rectangle When one control is mirrored and the other is not adding the width and height to a point that was mapped causes the rectangle to extend in the wrong direction Mapping the entire rectangle instead of just one point causes both the origin and the corner of the rectangle to be mapped p param from the source code Control code or code null code param to the destination code Control code or code null code param rectangle to be mapped return rectangle with mapped coordinates exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the rectangle is null li li ERROR INVALID ARGUMENT if the Control from or the Control to have been disposed li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul since 2 1 2 public Rectangle map Control from Control to Rectangle rectangle check Device if rectangle null error SWT ERROR NULL ARGUMENT return map from to rectangle x rectangle y rectangle width rectangle height  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED checkDevice ERROR_NULL_ARGUMENT
Maps a point from one coordinate system to another When the control is null coordinates are mapped to the display p NOTE On right to left platforms where the coordinate systems are mirrored special care needs to be taken when mapping coordinates from one control to another to ensure the result is correctly mirrored Mapping a point that is the origin of a rectangle and then adding the width and height is not equivalent to mapping the rectangle When one control is mirrored and the other is not adding the width and height to a point that was mapped causes the rectangle to extend in the wrong direction Mapping the entire rectangle instead of just one point causes both the origin and the corner of the rectangle to be mapped p param from the source code Control code or code null code param to the destination code Control code or code null code param x coordinates to be mapped param y coordinates to be mapped param width coordinates to be mapped param height coordinates to be mapped return rectangle with mapped coordinates exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the Control from or the Control to have been disposed li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul since 2 1 2 public Rectangle map Control from Control to int x int y int width int height check Device if from null from is Disposed error SWT ERROR INVALID ARGUMENT if to null to is Disposed error SWT ERROR INVALID ARGUMENT Rectangle rectangle new Rectangle x y width height if from null Rect rect new Rect OS Get Control Bounds from handle rect rectangle x rect left rectangle y rect top int window OS Get Control Owner from handle OS Get Window Bounds window short OS k Window Content Rgn rect rectangle x rect left rectangle y rect top if to null Rect rect new Rect OS Get Control Bounds to handle rect rectangle x rect left rectangle y rect top int window OS Get Control Owner to handle OS Get Window Bounds window short OS k Window Content Rgn rect rectangle x rect left rectangle y rect top return rectangle  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED checkDevice isDisposed ERROR_INVALID_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT GetControlBounds GetControlOwner GetWindowBounds kWindowContentRgn GetControlBounds GetControlOwner GetWindowBounds kWindowContentRgn
int menu Proc int next Handler int the Event int user Data if user Data 0 Widget widget get Widget user Data if widget null return widget menu Proc next Handler the Event user Data else int the Menu new int 1 OS Get Event Parameter the Event OS k Event Param Direct Object OS type Menu Ref null 4 null the Menu short menuID OS Get MenuID the Menu 0 Menu menu find Menu menuID if menu null return menu menu Proc next Handler the Event user Data return OS event Not Handled Err  menuProc nextHandler theEvent userData userData getWidget userData menuProc nextHandler theEvent userData theMenu GetEventParameter theEvent kEventParamDirectObject typeMenuRef theMenu GetMenuID theMenu findMenu menuProc nextHandler theEvent userData eventNotHandledErr
int mouse Proc int next Handler int the Event int user Data int event Kind OS Get Event Kind the Event if mouse Up Control null event Kind OS k Event Mouse Up if mouse Up Control is Disposed mouse Up Control mouse Proc next Handler the Event user Data mouse Up Control null return OS no Err mouse Up Control null int sizeof org eclipse swt internal carbon Point sizeof org eclipse swt internal carbon Point where new org eclipse swt internal carbon Point OS Get Event Parameter the Event OS k Event Param Mouse Location OS typeQD Point null sizeof null where int the Window new int 1 int part OS Find Window where the Window switch part case OS in Menu Bar if event Kind OS k Event Mouse Down clear Menu Flags if menu Bar null menu Bar is Enabled OS Menu Select where clear Menu Flags return OS no Err break case OS in Content Rect window Rect new Rect OS Get Window Bounds the Window 0 short OS k Window Content Rgn window Rect CG Point in Point new CG Point in Point x where h window Rect left in Point y where v window Rect top int the Root new int 1 OS Get Root Control the Window 0 the Root int the Control new int 1 OS HI View Get Subview Hit the Root 0 in Point true the Control while the Control 0 0 OS Is Control Enabled the Control 0 OS Get Super Control the Control 0 the Control Widget widget null boolean consume false if the Control 0 0 the Control 0 the Root 0 do widget get Widget the Control 0 if widget null if widget is Enabled break consume true OS Get Super Control the Control 0 the Control while the Control 0 0 if the Control 0 0 widget get Widget the Root 0 if widget null int result user Data 0 widget mouse Proc next Handler the Event user Data OS event Not Handled Err return consume OS no Err result break switch event Kind case OS k Event Mouse Dragged case OS k Event Mouse Moved OS Init Cursor return OS event Not Handled Err  mouseProc nextHandler theEvent userData eventKind GetEventKind theEvent mouseUpControl eventKind kEventMouseUp mouseUpControl isDisposed mouseUpControl mouseProc nextHandler theEvent userData mouseUpControl noErr mouseUpControl GetEventParameter theEvent kEventParamMouseLocation typeQDPoint theWindow FindWindow theWindow inMenuBar eventKind kEventMouseDown clearMenuFlags menuBar menuBar isEnabled MenuSelect clearMenuFlags noErr inContent windowRect GetWindowBounds theWindow kWindowContentRgn windowRect CGPoint inPoint CGPoint inPoint windowRect inPoint windowRect theRoot GetRootControl theWindow theRoot theControl HIViewGetSubviewHit theRoot inPoint theControl theControl IsControlEnabled theControl GetSuperControl theControl theControl theControl theControl theRoot getWidget theControl isEnabled GetSuperControl theControl theControl theControl theControl getWidget theRoot userData mouseProc nextHandler theEvent userData eventNotHandledErr noErr eventKind kEventMouseDragged kEventMouseMoved InitCursor eventNotHandledErr
int mouse Hover Proc int id int handle if current Control null return 0 if current Control is Disposed OPTIMIZE use OS calls int chord OS Get Current Event Button State int modifiers OS Get Current Event Key Modifiers Point pt current Control to Control get Cursor Location current Control send Mouse Event SWT Mouse Hover short 0 chord short pt x short pt y modifiers true return 0  mouseHoverProc currentControl currentControl isDisposed GetCurrentEventButtonState GetCurrentEventKeyModifiers currentControl toControl getCursorLocation currentControl sendMouseEvent MouseHover
Reads an event from the operating system s event queue dispatches it appropriately and returns code true code if there is potentially more work to do or code false code if the caller can sleep until another event is placed on the event queue p In addition to checking the system event queue this method also checks if any inter thread messages created by code sync Exec code or code async Exec code are waiting to be processed and if so handles them before returning p return code false code if the caller can sleep upon return from this method exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see sleep see wake public boolean read And Dispatch check Device boolean events run Timers events run Enter Exit events run Popups events run Grabs int out Event new int 1 int status OS Receive Next Event 0 null OS k Event Duration No Wait true out Event if status OS no Err events true int event Class OS Get Event Class out Event 0 int event Kind OS Get Event Kind out Event 0 OS Send Event To Event Target out Event 0 OS Get Event Dispatcher Target OS Release Event out Event 0 Feature in the Macintosh When an indeterminate progress bar is running it floods the event queue with messages in order to show the animation This means that async messages will never run because there are always messages from the operating system The fix is to run async messages when ever there is a wake message NOTE This is not the correct behavior Operating system message are supposed to have priority over async messages if event Class WAKE CLASS event Kind WAKE KIND run Async Messages if events run Deferred Events return true return run Async Messages  syncExec asyncExec SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED readAndDispatch checkDevice runTimers runEnterExit runPopups runGrabs outEvent ReceiveNextEvent kEventDurationNoWait outEvent noErr eventClass GetEventClass outEvent eventKind GetEventKind outEvent SendEventToEventTarget outEvent GetEventDispatcherTarget ReleaseEvent outEvent eventClass WAKE_CLASS eventKind WAKE_KIND runAsyncMessages runDeferredEvents runAsyncMessages
static synchronized void register Display display for int i 0 i Displays length i if Displays i null Displays i display return Display new Displays new Display Displays length 4 System arraycopy Displays 0 new Displays 0 Displays length new Displays Displays length display Displays new Displays  newDisplays newDisplays newDisplays newDisplays
Releases any internal resources back to the operating system and clears all fields except the device handle p Disposes all shells which are currently open on the display After this method has been invoked all related related shells will answer code true code when sent the message code is Disposed code p p When a device is destroyed resources that were acquired on behalf of the programmer need to be returned to the operating system For example if the device allocated a font to be used as the system font this font would be freed in code release code Also to assist the garbage collector and minimize the amount of memory that is not reclaimed when the programmer keeps a reference to a disposed device all fields except the handle are zero d The handle is needed by code destroy code p This method is called before code destroy code see dispose see destroy protected void release send Event SWT Dispose new Event Shell shells get Shells for int i 0 i shells length i Shell shell shells i if shell is Disposed shell dispose if tray null tray dispose tray null while read And Dispatch if dispose List null for int i 0 i dispose List length i if dispose List i null dispose List i run dispose List null synchronizer release Synchronizer synchronizer null release Display super release  isDisposed sendEvent getShells isDisposed readAndDispatch disposeList disposeList disposeList disposeList disposeList releaseSynchronizer releaseDisplay
void release Display action Callback dispose apple Event Callback dispose caret Callback dispose command Callback dispose control Callback dispose draw Item Callback dispose item Compare Callback dispose item Data Callback dispose item Notification Callback dispose help Callback dispose hit Test Callback dispose keyboard Callback dispose menu Callback dispose mouse Hover Callback dispose mouse Callback dispose tracking Callback dispose window Callback dispose color Callback dispose text Input Callback dispose action Callback apple Event Callback caret Callback command Callback null control Callback draw Item Callback item Data Callback item Notification Callback null help Callback hit Test Callback keyboard Callback menu Callback item Compare Callback null mouse Hover Callback mouse Callback tracking Callback window Callback color Callback null text Input Callback null action Proc apple Event Proc caret Proc command Proc 0 control Proc draw Item Proc item Data Proc item Notification Proc item Compare Proc 0 help Proc hit Test Proc keyboard Proc menu Proc 0 mouse Hover Proc mouse Proc tracking Proc window Proc color Proc 0 text Input Proc 0 timer Callback dispose timer Callback null timer Proc 0 grab Control help Control current Control null if help String 0 OS CF Release help String help String 0 Release the System Images if error Image 0 OS CG Image Release error Image if info Image 0 OS CG Image Release info Image if warning Image 0 OS CG Image Release warning Image if error Image Data 0 OS Dispose Ptr error Image Data if info Image Data 0 OS Dispose Ptr info Image Data if warning Image Data 0 OS Dispose Ptr warning Image Data error Image info Image warning Image 0 error Image Data info Image Data warning Image Data 0 Release the System Cursors for int i 0 i cursors length i if cursors i null cursors i dispose cursors null NOT DONE call terminate TXN if this is the last display NOTE display create and dispose needs to be synchronized on all platforms TXN Terminate Textension  releaseDisplay actionCallback appleEventCallback caretCallback commandCallback controlCallback drawItemCallback itemCompareCallback itemDataCallback itemNotificationCallback helpCallback hitTestCallback keyboardCallback menuCallback mouseHoverCallback mouseCallback trackingCallback windowCallback colorCallback textInputCallback actionCallback appleEventCallback caretCallback commandCallback controlCallback drawItemCallback itemDataCallback itemNotificationCallback helpCallback hitTestCallback keyboardCallback menuCallback itemCompareCallback mouseHoverCallback mouseCallback trackingCallback windowCallback colorCallback textInputCallback actionProc appleEventProc caretProc commandProc controlProc drawItemProc itemDataProc itemNotificationProc itemCompareProc helpProc hitTestProc keyboardProc menuProc mouseHoverProc mouseProc trackingProc windowProc colorProc textInputProc timerCallback timerCallback timerProc grabControl helpControl currentControl helpString CFRelease helpString helpString errorImage CGImageRelease errorImage infoImage CGImageRelease infoImage warningImage CGImageRelease warningImage errorImageData DisposePtr errorImageData infoImageData DisposePtr infoImageData warningImageData DisposePtr warningImageData errorImage infoImage warningImage errorImageData infoImageData warningImageData TXNTerminateTextension
Removes the listener from the collection of listeners who will be notifed when an event of the given type occurs anywhere in this display param event Type the type of event to listen for param listener the listener which should no longer be notified when the event occurs exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li ul see Listener see add Filter see add Listener since 3 0 public void remove Filter int event Type Listener listener check Device if listener null error SWT ERROR NULL ARGUMENT if filter Table null return filter Table unhook event Type listener if filter Table size 0 filter Table null  eventType IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS addFilter addListener removeFilter eventType checkDevice ERROR_NULL_ARGUMENT filterTable filterTable eventType filterTable filterTable
Removes the listener from the collection of listeners who will be notifed when an event of the given type occurs param event Type the type of event to listen for param listener the listener which should no longer be notified when the event occurs exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see Listener see add Listener since 2 0 public void remove Listener int event Type Listener listener check Device if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook event Type listener  eventType IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED addListener removeListener eventType checkDevice ERROR_NULL_ARGUMENT eventTable eventTable eventType
void remove Menu Menu menu if menus null return menus menu id ID START null  removeMenu ID_START
void remove Popup Menu menu if popups null return for int i 0 i popups length i if popups i menu popups i null return  removePopup
Widget remove Widget int handle if handle 0 return null Widget widget null property 0 0 OS Get Control Property handle SWT0 SWT0 4 null property int index property 0 1 if 0 index index widget Table length widget widget Table index widget Table index null index Table index free Slot free Slot index OS Remove Control Property handle SWT0 SWT0 return widget  removeWidget GetControlProperty widgetTable widgetTable widgetTable indexTable freeSlot freeSlot RemoveControlProperty
boolean run Async Messages return synchronizer run Async Messages  runAsyncMessages runAsyncMessages
boolean run Enter Exit OPTIMIZE no garbage widget hit tested again in mouse move boolean event Sent false Control control null int the Control new int 1 org eclipse swt internal carbon Point where new org eclipse swt internal carbon Point OS Get Global Mouse where int the Window new int 1 if OS Find Window where the Window OS in Content if the Window 0 0 Rect rect new Rect OS Get Window Bounds the Window 0 short OS k Window Content Rgn rect CG Point in Point new CG Point in Point x where h rect left in Point y where v rect top int the Root new int 1 OS Get Root Control the Window 0 the Root OS HI View Get Subview Hit the Root 0 in Point true the Control while the Control 0 0 OS Is Control Enabled the Control 0 OS Get Super Control the Control 0 the Control if the Control 0 0 do Widget widget get Widget the Control 0 if widget null if widget is Trim Handle the Control 0 break if widget instanceof Control Control cursor Control Control widget if cursor Control is Enabled if cursor Control is Enabled Modal control cursor Control break OS Get Super Control the Control 0 the Control while the Control 0 0 if control null the Control 0 the Root 0 Widget widget get Widget the Control 0 if widget null widget instanceof Control control Control widget the Control 0 control handle if control current Control if current Control null current Control is Disposed event Sent true int chord OS Get Current Event Button State int modifiers OS Get Current Event Key Modifiers Point pt current Control to Control where h where v current Control send Mouse Event SWT Mouse Exit short 0 chord short pt x short pt y modifiers true if mouse HoverID 0 OS Remove Event Loop Timer mouse HoverID mouse HoverID 0 widget could be disposed at this point if control null control is Disposed control null if current Control control null event Sent true int chord OS Get Current Event Button State int modifiers OS Get Current Event Key Modifiers Point pt current Control to Control where h where v current Control send Mouse Event SWT Mouse Enter short 0 chord short pt x short pt y modifiers true if mouse HoverID 0 OS Remove Event Loop Timer mouse HoverID int id new int 1 out Delay new int 1 OS HM Get Tag Delay out Delay int event Loop OS Get Current Event Loop OS Install Event Loop Timer event Loop out Delay 0 1000 0 0 0 mouse Hover Proc 0 id mouse HoverID id 0 else if control null mouse HoverID 0 int out Delay new int 1 OS HM Get Tag Delay out Delay OS Set Event Loop Timer Next Fire Time mouse HoverID out Delay 0 1000 0 if OS Still Down the Window 0 0 the Control 0 0 Rect rect new Rect OS Get Window Bounds the Window 0 short OS k Window Content Rgn rect where h rect left where v rect top int modifiers OS Get Current Event Key Modifiers boolean cursor Was Set new boolean 1 OS Handle Control Set Cursor the Control 0 where short modifiers cursor Was Set if cursor Was Set 0 OS Set Theme Cursor OS k Theme Arrow Cursor return event Sent  runEnterExit eventSent theControl GetGlobalMouse theWindow FindWindow theWindow inContent theWindow GetWindowBounds theWindow kWindowContentRgn CGPoint inPoint CGPoint inPoint inPoint theRoot GetRootControl theWindow theRoot HIViewGetSubviewHit theRoot inPoint theControl theControl IsControlEnabled theControl GetSuperControl theControl theControl theControl getWidget theControl isTrimHandle theControl cursorControl cursorControl isEnabled cursorControl isEnabledModal cursorControl GetSuperControl theControl theControl theControl theControl theRoot getWidget theControl theControl currentControl currentControl currentControl isDisposed eventSent GetCurrentEventButtonState GetCurrentEventKeyModifiers currentControl toControl currentControl sendMouseEvent MouseExit mouseHoverID RemoveEventLoopTimer mouseHoverID mouseHoverID isDisposed currentControl eventSent GetCurrentEventButtonState GetCurrentEventKeyModifiers currentControl toControl currentControl sendMouseEvent MouseEnter mouseHoverID RemoveEventLoopTimer mouseHoverID outDelay HMGetTagDelay outDelay eventLoop GetCurrentEventLoop InstallEventLoopTimer eventLoop outDelay mouseHoverProc mouseHoverID mouseHoverID outDelay HMGetTagDelay outDelay SetEventLoopTimerNextFireTime mouseHoverID outDelay StillDown theWindow theControl GetWindowBounds theWindow kWindowContentRgn GetCurrentEventKeyModifiers cursorWasSet HandleControlSetCursor theControl cursorWasSet cursorWasSet SetThemeCursor kThemeArrowCursor eventSent
boolean run Deferred Events Run deferred events This code is always called in the Display s thread so it must be re enterant need not be synchronized while event Queue null Take an event off the queue Event event event Queue 0 if event null break int length event Queue length System arraycopy event Queue 1 event Queue 0 length event Queue length null Run the event Widget widget event widget if widget null widget is Disposed Widget item event item if item null item is Disposed widget notify Listeners event type event At this point the event queue could be null due to a recursive invokation when running the event Clear the queue event Queue null return true  runDeferredEvents eventQueue eventQueue eventQueue eventQueue eventQueue eventQueue isDisposed isDisposed notifyListeners eventQueue
boolean run Event Loop Timers allow Timers false boolean result OS Receive Next Event 0 null OS k Event Duration No Wait false null OS no Err allow Timers true return result  runEventLoopTimers allowTimers ReceiveNextEvent kEventDurationNoWait noErr allowTimers
boolean run Grabs if grab Control null grabbing return false Rect rect new Rect int out Modifiers new int 1 short out Result new short 1 org eclipse swt internal carbon Point out Pt new org eclipse swt internal carbon Point grabbing true mouse Up Control null try while grab Control null grab Control is Disposed out Result 0 OS k Mouse Tracking Mouse Up TEMPORARY CODE grab Control get Shell update true last Modifiers OS Get Current Event Key Modifiers int old State OS Get Current Event Button State int handle grab Control handle int window OS Get Control Owner handle int port OS Get Window Port window OS Track Mouse Location With Options port OS k Track Mouse Location Option Dont Consume Mouse Up 50 1000 0 out Pt out Modifiers out Result int type 0 button 0 switch int out Result 0 case OS k Mouse Tracking Timed Out run Async Messages break case OS k Mouse Tracking Mouse Down type SWT Mouse Down int new State OS Get Current Event Button State if old State 0x1 0 new State 0x1 0 button 1 if old State 0x2 0 new State 0x2 0 button 2 if old State 0x4 0 new State 0x4 0 button 3 break case OS k Mouse Tracking Mouse Up type SWT Mouse Up int new State OS Get Current Event Button State if old State 0x1 0 new State 0x1 0 button 1 if old State 0x2 0 new State 0x2 0 button 2 if old State 0x4 0 new State 0x4 0 button 3 break case OS k Mouse Tracking Mouse Exited type SWT Mouse Exit break case OS k Mouse Tracking Mouse Entered type SWT Mouse Enter break case OS k Mouse Tracking Mouse Dragged type SWT Mouse Move drag Detect grab Control break case OS k Mouse Tracking Mouse Key Modifiers Changed break case OS k Mouse Tracking User Cancelled break case OS k Mouse Tracking Mouse Moved type SWT Mouse Move break boolean events type 0 events run Enter Exit if type 0 OS Get Control Bounds handle rect int x out Pt h rect left int y out Pt v rect top int chord OS Get Current Event Button State if grab Control null grab Control is Disposed if type SWT Mouse Up mouse Up Control grab Control else grab Control send Mouse Event type short button chord short x short y out Modifiers 0 true if events run Deferred Events finally grabbing false grab Control null return true  runGrabs grabControl outModifiers outResult outPt mouseUpControl grabControl grabControl isDisposed outResult kMouseTrackingMouseUp grabControl getShell lastModifiers GetCurrentEventKeyModifiers oldState GetCurrentEventButtonState grabControl GetControlOwner GetWindowPort TrackMouseLocationWithOptions kTrackMouseLocationOptionDontConsumeMouseUp outPt outModifiers outResult outResult kMouseTrackingTimedOut runAsyncMessages kMouseTrackingMouseDown MouseDown newState GetCurrentEventButtonState oldState newState oldState newState oldState newState kMouseTrackingMouseUp MouseUp newState GetCurrentEventButtonState oldState newState oldState newState oldState newState kMouseTrackingMouseExited MouseExit kMouseTrackingMouseEntered MouseEnter kMouseTrackingMouseDragged MouseMove dragDetect grabControl kMouseTrackingMouseKeyModifiersChanged kMouseTrackingUserCancelled kMouseTrackingMouseMoved MouseMove runEnterExit GetControlBounds outPt outPt GetCurrentEventButtonState grabControl grabControl isDisposed MouseUp mouseUpControl grabControl grabControl sendMouseEvent outModifiers runDeferredEvents grabControl
boolean run Popups if popups null return false grab Control null boolean result false while popups null Menu menu popups 0 if menu null break int length popups length System arraycopy popups 1 popups 0 length popups length null clear Menu Flags run Deferred Events menu  setVisible true clear Menu Flags result true popups null return result  runPopups grabControl clearMenuFlags runDeferredEvents _setVisible clearMenuFlags
boolean run Timers if timer List null return false boolean result false for int i 0 i timer List length i if timer Ids i 1 Runnable runnable timer List i timer List i null timer Ids i 0 if runnable null result true runnable run return result  runTimers timerList timerList timerIds timerList timerList timerIds
void send Event int event Type Event event if event Table null filter Table null return if event null event new Event event display this event type event Type if event time 0 event time get Last Event Time if filter Event event if event Table null event Table send Event event  sendEvent eventType eventTable filterTable eventType getLastEventTime filterEvent eventTable eventTable sendEvent
On platforms which support it sets the application name to be the argument On Motif for example this can be used to set the name used for resource lookup param name the new app name public static void set App Name String name  setAppName
void set Current Caret Caret caret if caretID 0 OS Remove Event Loop Timer caretID caretID 0 current Caret caret if current Caret null int blink Rate current Caret blink Rate int timer Id new int 1 double time blink Rate 1000 0 int event Loop OS Get Current Event Loop OS Install Event Loop Timer event Loop time time caret Proc 0 timer Id caretID timer Id 0  setCurrentCaret RemoveEventLoopTimer currentCaret currentCaret blinkRate currentCaret blinkRate timerId blinkRate eventLoop GetCurrentEventLoop InstallEventLoopTimer eventLoop caretProc timerId timerId
void set Cursor int cursor switch cursor case OS k Theme Pointing Hand Cursor case OS k Theme Arrow Cursor case OS k Theme Spinning Cursor case OS k Theme Cross Cursor case OS k Theme Watch Cursor case OS k ThemeI Beam Cursor case OS k Theme Not Allowed Cursor case OS k Theme Resize Left Right Cursor case OS k Theme Resize Left Cursor case OS k Theme Resize Right Cursor OS Set Theme Cursor cursor break default OS Set Cursor cursor  setCursor kThemePointingHandCursor kThemeArrowCursor kThemeSpinningCursor kThemeCrossCursor kThemeWatchCursor kThemeIBeamCursor kThemeNotAllowedCursor kThemeResizeLeftRightCursor kThemeResizeLeftCursor kThemeResizeRightCursor SetThemeCursor SetCursor
Sets the location of the on screen pointer relative to the top left corner of the screen b Note It is typically considered bad practice for a program to move the on screen pointer location b param x the new x coordinate for the cursor param y the new y coordinate for the cursor exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul since 2 1 public void set Cursor Location int x int y check Device CG Point pt new CG Point pt x x pt y y OS CG Warp Mouse Cursor Position pt  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED setCursorLocation checkDevice CGPoint CGPoint CGWarpMouseCursorPosition
Sets the location of the on screen pointer relative to the top left corner of the screen b Note It is typically considered bad practice for a program to move the on screen pointer location b param point new position exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR NULL ARGUMENT if the point is null li ERROR DEVICE DISPOSED if the receiver has been disposed li ul since 2 0 public void set Cursor Location Point point check Device if point null error SWT ERROR NULL ARGUMENT set Cursor Location point x point y  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_NULL_ARGUMENT ERROR_DEVICE_DISPOSED setCursorLocation checkDevice ERROR_NULL_ARGUMENT setCursorLocation
Sets the application defined property of the receiver with the specified name to the given argument p Applications may have associated arbitrary objects with the receiver in this fashion If the objects stored in the properties need to be notified when the display is disposed of it is the application s responsibility provide a code dispose Exec code handler which does so p param key the name of the property param value the new value for the property exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the key is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see set Data see dispose Exec public void set Data String key Object value check Device if key null error SWT ERROR NULL ARGUMENT Remove the key value pair if value null if keys null return int index 0 while index keys length keys index equals key index if index keys length return if keys length 1 keys null values null else String new Keys new String keys length 1 Object new Values new Object values length 1 System arraycopy keys 0 new Keys 0 index System arraycopy keys index 1 new Keys index new Keys length index System arraycopy values 0 new Values 0 index System arraycopy values index 1 new Values index new Values length index keys new Keys values new Values return Add the key value pair if keys null keys new String key values new Object value return for int i 0 i keys length i if keys i equals key values i value return String new Keys new String keys length 1 Object new Values new Object values length 1 System arraycopy keys 0 new Keys 0 keys length System arraycopy values 0 new Values 0 values length new Keys keys length key new Values values length value keys new Keys values new Values  disposeExec IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED setData disposeExec setData checkDevice ERROR_NULL_ARGUMENT newKeys newValues newKeys newKeys newKeys newValues newValues newValues newKeys newValues newKeys newValues newKeys newValues newKeys newValues newKeys newValues
Sets the application defined display specific data associated with the receiver to the argument The em display specific data em is a single unnamed field that is stored with every display p Applications may put arbitrary objects in this field If the object stored in the display specific data needs to be notified when the display is disposed of it is the application s responsibility provide a code dispose Exec code handler which does so p param data the new display specific data exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see get Data see dispose Exec public void set Data Object data check Device this data data  disposeExec SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED getData disposeExec setData checkDevice
Sets the synchronizer used by the display to be the argument which can not be null param synchronizer the new synchronizer for the display must not be null exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the synchronizer is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul public void set Synchronizer Synchronizer synchronizer check Device if synchronizer null error SWT ERROR NULL ARGUMENT if this synchronizer null this synchronizer run Async Messages this synchronizer synchronizer  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED setSynchronizer checkDevice ERROR_NULL_ARGUMENT runAsyncMessages
void set Menu Bar Menu menu Feature in the Macintosh Set Root Menu does not accept NULL to indicate that their should be no menu bar The fix is to create a temporary empty menu set that to be the menu bar clear the menu bar and then delete the temporary menu if menu menu Bar return int the Menu 0 if menu null int out Menu Ref new int 1 OS Create New Menu short ID TEMPORARY 0 out Menu Ref the Menu out Menu Ref 0 else the Menu menu handle OS Set Root Menu the Menu if menu null OS Clear Menu Bar OS Delete Menu OS Get MenuID the Menu OS Dispose Menu the Menu menu Bar menu  setMenuBar SetRootMenu menuBar theMenu outMenuRef CreateNewMenu ID_TEMPORARY outMenuRef theMenu outMenuRef theMenu SetRootMenu theMenu ClearMenuBar DeleteMenu GetMenuID theMenu DisposeMenu theMenu menuBar
Causes the user interface thread to em sleep em that is to be put in a state where it does not consume CPU cycles until an event is received or it is otherwise awakened return code true code if an event requiring dispatching was placed on the queue exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see wake public boolean sleep check Device if get Message Count 0 return true allow Timers false boolean result OS Receive Next Event 0 null OS k Event Duration Forever false null OS no Err allow Timers true return result  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED checkDevice getMessageCount allowTimers ReceiveNextEvent kEventDurationForever noErr allowTimers
Causes the code run code method of the runnable to be invoked by the user interface thread at the next reasonable opportunity The thread which calls this method is suspended until the runnable completes param runnable code to run on the user interface thread exception SWT Exception ul li ERROR FAILED EXEC if an exception occured when executing the runnable li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see async Exec public void sync Exec Runnable runnable if is Disposed error SWT ERROR DEVICE DISPOSED synchronizer sync Exec runnable  SWTException ERROR_FAILED_EXEC ERROR_DEVICE_DISPOSED asyncExec syncExec isDisposed ERROR_DEVICE_DISPOSED syncExec
int text Input Proc int next Handler int the Event int user Data Widget widget get Widget user Data if widget null int the Window OS Get User Focus Window if the Window 0 return OS event Not Handled Err int the Control new int 1 OS Get Keyboard Focus the Window the Control widget get Widget the Control 0 if widget null return widget text Input Proc next Handler the Event user Data return OS event Not Handled Err  textInputProc nextHandler theEvent userData getWidget userData theWindow GetUserFocusWindow theWindow eventNotHandledErr theControl GetKeyboardFocus theWindow theControl getWidget theControl textInputProc nextHandler theEvent userData eventNotHandledErr
Causes the code run code method of the runnable to be invoked by the user interface thread after the specified number of milliseconds have elapsed If milliseconds is less than zero the runnable is not executed param milliseconds the delay before running the runnable param runnable code to run on the user interface thread exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the runnable is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see async Exec public void timer Exec int milliseconds Runnable runnable check Device if runnable null error SWT ERROR NULL ARGUMENT if timer List null timer List new Runnable 4 if timer Ids null timer Ids new int 4 int index 0 while index timer List length if timer List index runnable break index if index timer List length int timer Id timer Ids index if milliseconds 0 OS Remove Event Loop Timer timer Id timer List index null timer Ids index 0 else OS Set Event Loop Timer Next Fire Time timer Id milliseconds 1000 0 return if milliseconds 0 return index 0 while index timer List length if timer List index null break index if index timer List length Runnable new Timer List new Runnable timer List length 4 System arraycopy timer List 0 new Timer List 0 timer List length timer List new Timer List int new Timer Ids new int timer Ids length 4 System arraycopy timer Ids 0 new Timer Ids 0 timer Ids length timer Ids new Timer Ids int timer Id new int 1 int event Loop OS Get Current Event Loop OS Install Event Loop Timer event Loop milliseconds 1000 0 0 0 timer Proc index timer Id if timer Id 0 0 timer Ids index timer Id 0 timer List index runnable  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED asyncExec timerExec checkDevice ERROR_NULL_ARGUMENT timerList timerList timerIds timerIds timerList timerList timerList timerId timerIds RemoveEventLoopTimer timerId timerList timerIds SetEventLoopTimerNextFireTime timerId timerList timerList timerList newTimerList timerList timerList newTimerList timerList timerList newTimerList newTimerIds timerIds timerIds newTimerIds timerIds timerIds newTimerIds timerId eventLoop GetCurrentEventLoop InstallEventLoopTimer eventLoop timerProc timerId timerId timerIds timerId timerList
int timer Proc int id int index if timer List null return 0 if 0 index index timer List length if allow Timers Runnable runnable timer List index timer List index null timer Ids index 0 if runnable null runnable run else timer Ids index 1 wake Thread return 0  timerProc timerList timerList allowTimers timerList timerList timerIds timerIds wakeThread
int tracking Proc int browser int itemID int property int the Rect int start Pt int modifiers Widget widget get Widget browser if widget null return widget tracking Proc browser itemID property the Rect start Pt modifiers return OS no Err  trackingProc theRect startPt getWidget trackingProc theRect startPt noErr
Forces all outstanding paint requests for the display to be processed before this method returns exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see Control update public void update check Device Shell shells get Shells for int i 0 i shells length i Shell shell shells i if shell is Disposed shell update true This code is intentionally commented int out Event new int 1 int mask new int OS k Event Class Window OS k Event Window Update while OS Receive Next Event mask length 2 mask OS k Event Duration No Wait true out Event OS no Err Bug in the Macintosh For some reason when a hierarchy of windows is disposed from k Event Window Close despite the fact that Dispose Window has been called the window is not disposed and there are outstandings k Event Window Update events in the event queue Dispatching these events will cause a segment fault The fix is to dispatch events to visible windows only int the Window new int 1 OS Get Event Parameter out Event 0 OS k Event Param Direct Object OS type Window Ref null 4 null the Window if OS Is Window Visible the Window 0 OS Send Event To Event Target out Event 0 OS Get Event Dispatcher Target OS Release Event out Event 0  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_DEVICE_DISPOSED checkDevice getShells isDisposed outEvent kEventClassWindow kEventWindowUpdate ReceiveNextEvent kEventDurationNoWait outEvent noErr kEventWindowClose DisposeWindow kEventWindowUpdate theWindow GetEventParameter outEvent kEventParamDirectObject typeWindowRef theWindow IsWindowVisible theWindow SendEventToEventTarget outEvent GetEventDispatcherTarget ReleaseEvent outEvent
void update Quit Menu boolean enabled true Shell shells get Shells int mask SWT PRIMARY MODAL SWT APPLICATION MODAL SWT SYSTEM MODAL for int i 0 i shells length i Shell shell shells i if shell style mask 0 shell is Visible enabled false break if enabled OS Enable Menu Command 0 OS kHI Command Quit else OS Disable Menu Command 0 OS kHI Command Quit  updateQuitMenu getShells PRIMARY_MODAL APPLICATION_MODAL SYSTEM_MODAL isVisible EnableMenuCommand kHICommandQuit DisableMenuCommand kHICommandQuit
If the receiver s user interface thread was code sleep code ing causes it to be awakened and start running again Note that this method may be called from any thread exception SWT Exception ul li ERROR DEVICE DISPOSED if the receiver has been disposed li ul see sleep public void wake if is Disposed error SWT ERROR DEVICE DISPOSED if thread Thread current Thread return wake Thread  SWTException ERROR_DEVICE_DISPOSED isDisposed ERROR_DEVICE_DISPOSED currentThread wakeThread
void wake Thread int wake Event new int 1 OS Create Event 0 WAKE CLASS WAKE KIND 0 0 OS k Event Attribute User Event wake Event OS Post Event To Queue queue wake Event 0 short OS k Event Priority Standard if wake Event 0 0 OS Release Event wake Event 0  wakeThread wakeEvent CreateEvent WAKE_CLASS WAKE_KIND kEventAttributeUserEvent wakeEvent PostEventToQueue wakeEvent kEventPriorityStandard wakeEvent ReleaseEvent wakeEvent
int window Proc int next Handler int the Event int user Data Widget widget get Widget user Data if widget null int the Window new int 1 OS Get Event Parameter the Event OS k Event Param Direct Object OS type Window Ref null 4 null the Window int the Root new int 1 OS Get Root Control the Window 0 the Root widget get Widget the Root 0 if widget null return widget window Proc next Handler the Event user Data return OS event Not Handled Err  windowProc nextHandler theEvent userData getWidget userData theWindow GetEventParameter theEvent kEventParamDirectObject typeWindowRef theWindow theRoot GetRootControl theWindow theRoot getWidget theRoot windowProc nextHandler theEvent userData eventNotHandledErr

Constructs a new instance of this class given only its parent param parent a shell which will be the parent of the new instance exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul public File Dialog Shell parent this parent SWT APPLICATION MODAL  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS FileDialog APPLICATION_MODAL
Constructs a new instance of this class 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 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 shell which will be the parent of the new instance param style the style of dialog to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul public File Dialog Shell parent int style super parent style check Subclass  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS FileDialog checkSubclass
Returns the path of the first file that was selected in the dialog relative to the filter path return the relative path of the file public String get File Name return file Name  getFileName fileName
Returns the paths of all files that were selected in the dialog relative to the filter path return the relative paths of the files public String get File Names return file Names  getFileNames fileNames
Returns the file extensions which the dialog will use to filter the files it shows return the file extensions filter public String get Filter Extensions return filter Extensions  getFilterExtensions filterExtensions
Returns the file names which the dialog will use to filter the files it shows return the file name filter public String get Filter Names return filter Names  getFilterNames filterNames
Returns the directory path that the dialog will use File names in this path will appear in the dialog filtered according to the filter extensions return the directory path string see set Filter Extensions public String get Filter Path return filter Path  setFilterExtensions getFilterPath filterPath
Makes the dialog visible and brings it to the front of the display return a string describing the absolute path of the first selected file or null if the dialog was cancelled or an error occurred exception SWT Exception ul li ERROR WIDGET DISPOSED if the dialog has been disposed li li ERROR THREAD INVALID ACCESS if not called from the thread that created the dialog li ul public String open String full Path null file Names new String 0 int title Ptr 0 if title null char buffer new char title length title get Chars 0 buffer length buffer 0 title Ptr OS CF String Create With Characters OS kCF Allocator Default buffer buffer length int file Name Ptr 0 if file Name null char buffer new char file Name length file Name get Chars 0 buffer length buffer 0 file Name Ptr OS CF String Create With Characters OS kCF Allocator Default buffer buffer length Nav Dialog Creation Options options new Nav Dialog Creation Options options window Title options client Name title Ptr options parent Window OS Get Control Owner parent handle options option Flags OS k Nav Support Packages OS k Nav Allow Invisible Files options location h 1 options location v 1 options save File Name file Name Ptr int out Dialog new int 1 if style SWT SAVE 0 NEEDS WORK filter extensions start in filter path allow user to select existing files OS Nav Create Put File Dialog options 0 0 0 0 out Dialog else if style SWT MULTI 0 options option Flags OS k Nav Allow Multiple Files NEEDS WORK filter extensions start in filter path select file name if it exists OS Nav Create Get File Dialog options 0 0 0 0 0 out Dialog if out Dialog 0 0 OS Nav Dialog Run out Dialog 0 int action OS Nav Dialog Get User Action out Dialog 0 switch action case OS k Nav User Action Open case OS k Nav User Action Choose case OS k Nav User Action Save As Nav Reply Record record new Nav Reply Record OS Nav Dialog Get Reply out Dialog 0 record AE Desc selection new AE Desc selection descriptor Type record selection descriptorType selection data Handle record selection dataHandle int count new int 1 OS AE Count Items selection count if count 0 0 file Names new String count 0 int maximum Size 80 size of FS Ref int data Ptr OS New Ptr maximum Size int ae Keyword new int 1 int type Code new int 1 int actual Size new int 1 int path String 0 int full String 0 int file String 0 if style SWT SAVE 0 if OS AE Get Nth Ptr selection 1 OS typeFS Ref ae Keyword type Code data Ptr maximum Size actual Size OS no Err byte fs Ref new byte actual Size 0 OS memcpy fs Ref data Ptr actual Size 0 int path Url OS CFURL Create FromFS Ref OS kCF Allocator Default fs Ref int full Url OS CFURL Create Copy Appending Path Component OS kCF Allocator Default path Url record save File Name false path String OS CFURL Copy File System Path path Url OS kCFURLPOSIX Path Style full String OS CFURL Copy File System Path full Url OS kCFURLPOSIX Path Style file String record save File Name OS CF Release path Url OS CF Release full Url else for int i 0 i count 0 i if OS AE Get Nth Ptr selection i 1 OS typeFS Ref ae Keyword type Code data Ptr maximum Size actual Size OS no Err byte fs Ref new byte actual Size 0 OS memcpy fs Ref data Ptr actual Size 0 int url OS CFURL Create FromFS Ref OS kCF Allocator Default fs Ref if i 0 int path Url OS CFURL Create Copy Deleting Last Path Component OS kCF Allocator Default url path String OS CFURL Copy File System Path path Url OS kCFURLPOSIX Path Style full String OS CFURL Copy File System Path url OS kCFURLPOSIX Path Style file String OS CFURL Copy Last Path Component url OS CF Release path Url else int last String OS CFURL Copy Last Path Component url int length OS CF String Get Length last String char buffer new char length CF Range range new CF Range range length length OS CF String Get Characters last String range buffer file Names i new String buffer OS CF Release last String OS CF Release url OS Dispose Ptr data Ptr if path String 0 int length OS CF String Get Length path String char buffer new char length CF Range range new CF Range range length length OS CF String Get Characters path String range buffer OS CF Release path String filter Path new String buffer if full String 0 int length OS CF String Get Length full String char buffer new char length CF Range range new CF Range range length length OS CF String Get Characters full String range buffer OS CF Release full String full Path new String buffer if file String 0 int length OS CF String Get Length file String char buffer new char length CF Range range new CF Range range length length OS CF String Get Characters file String range buffer OS CF Release file String file Name file Names 0 new String buffer if title Ptr 0 OS CF Release title Ptr if file Name Ptr 0 OS CF Release file Name Ptr if out Dialog 0 0 OS Nav Dialog Dispose out Dialog 0 return full Path  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS fullPath fileNames titlePtr getChars titlePtr CFStringCreateWithCharacters kCFAllocatorDefault fileNamePtr fileName fileName fileName getChars fileNamePtr CFStringCreateWithCharacters kCFAllocatorDefault NavDialogCreationOptions NavDialogCreationOptions windowTitle clientName titlePtr parentWindow GetControlOwner optionFlags kNavSupportPackages kNavAllowInvisibleFiles location_h location_v saveFileName fileNamePtr outDialog NavCreatePutFileDialog outDialog optionFlags kNavAllowMultipleFiles NavCreateGetFileDialog outDialog outDialog NavDialogRun outDialog NavDialogGetUserAction outDialog kNavUserActionOpen kNavUserActionChoose kNavUserActionSaveAs NavReplyRecord NavReplyRecord NavDialogGetReply outDialog AEDesc AEDesc descriptorType selection_descriptorType dataHandle selection_dataHandle AECountItems fileNames maximumSize FSRef dataPtr NewPtr maximumSize aeKeyword typeCode actualSize pathString fullString fileString AEGetNthPtr typeFSRef aeKeyword typeCode dataPtr maximumSize actualSize noErr fsRef actualSize fsRef dataPtr actualSize pathUrl CFURLCreateFromFSRef kCFAllocatorDefault fsRef fullUrl CFURLCreateCopyAppendingPathComponent kCFAllocatorDefault pathUrl saveFileName pathString CFURLCopyFileSystemPath pathUrl kCFURLPOSIXPathStyle fullString CFURLCopyFileSystemPath fullUrl kCFURLPOSIXPathStyle fileString saveFileName CFRelease pathUrl CFRelease fullUrl AEGetNthPtr typeFSRef aeKeyword typeCode dataPtr maximumSize actualSize noErr fsRef actualSize fsRef dataPtr actualSize CFURLCreateFromFSRef kCFAllocatorDefault fsRef pathUrl CFURLCreateCopyDeletingLastPathComponent kCFAllocatorDefault pathString CFURLCopyFileSystemPath pathUrl kCFURLPOSIXPathStyle fullString CFURLCopyFileSystemPath kCFURLPOSIXPathStyle fileString CFURLCopyLastPathComponent CFRelease pathUrl lastString CFURLCopyLastPathComponent CFStringGetLength lastString CFRange CFRange CFStringGetCharacters lastString fileNames CFRelease lastString CFRelease DisposePtr dataPtr pathString CFStringGetLength pathString CFRange CFRange CFStringGetCharacters pathString CFRelease pathString filterPath fullString CFStringGetLength fullString CFRange CFRange CFStringGetCharacters fullString CFRelease fullString fullPath fileString CFStringGetLength fileString CFRange CFRange CFStringGetCharacters fileString CFRelease fileString fileName fileNames titlePtr CFRelease titlePtr fileNamePtr CFRelease fileNamePtr outDialog NavDialogDispose outDialog fullPath
Set the initial filename which the dialog will select by default when opened to the argument which may be null The name will be prefixed with the filter path when one is supplied param string the file name public void set File Name String string file Name string  setFileName fileName
Set the file extensions which the dialog will use to filter the files it shows to the argument which may be null param extensions the file extension filter public void set Filter Extensions String extensions filter Extensions extensions  setFilterExtensions filterExtensions
Sets the file names which the dialog will use to filter the files it shows to the argument which may be null param names the file name filter public void set Filter Names String names filter Names names  setFilterNames filterNames
Sets the directory path that the dialog will use to the argument which may be null File names in this path will appear in the dialog filtered according to the filter extensions param string the directory path see set Filter Extensions public void set Filter Path String string filter Path string  setFilterExtensions setFilterPath filterPath

Constructs a new instance of this class given only its parent param parent a shell which will be the parent of the new instance exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul public Font Dialog Shell parent this parent SWT APPLICATION MODAL  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS FontDialog APPLICATION_MODAL
Constructs a new instance of this class 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 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 shell which will be the parent of the new instance param style the style of dialog to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul public Font Dialog Shell parent int style super parent style check Subclass  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS FontDialog checkSubclass
Returns a Font Data object describing the font that was selected in the dialog or null if none is available return the Font Data for the selected font or null deprecated use get Font List public Font Data get Font Data return font Data  FontData FontData getFontList FontData getFontData fontData
Returns a Font Data set describing the font that was selected in the dialog or null if none is available return the Font Data for the selected font or null since 2 1 1 public Font Data get Font List if font Data null return null Font Data result new Font Data 1 result 0 font Data return result  FontData FontData FontData getFontList fontData FontData FontData fontData
Returns the currently selected color in the receiver return the RGB value for the selected color may be null see Palette Data getRG Bs since 2 1 public RGB getRGB return rgb  PaletteData getRGBs
int font Proc int next Handler int the Event int user Data int kind OS Get Event Kind the Event switch kind case OS k Event Font Panel Closed open false break case OS k Event Font Selection if font Data null font Data new Font Data int fontID new int 1 if OS Get Event Parameter the Event OS k Event ParamATSU FontID OS typeU Int32 null 4 null fontID OS no Err int actual Length new int 1 OS ATSU Find Font Name fontID 0 OS k Font Family Name OS k Font No Platform Code OS k Font No Script Code OS k Font No Language Code 0 null actual Length null byte buffer new byte actual Length 0 OS ATSU Find Font Name fontID 0 OS k Font Family Name OS k Font No Platform Code OS k Font No Script Code OS k Font No Language Code buffer length buffer actual Length null String name new String buffer font Data set Name name short font Style new short 1 if OS Get Event Parameter the Event OS k Event ParamFM Font Style OS typeS Int16 null 2 null font Style OS no Err int style SWT NORMAL if font Style 0 OS bold 0 style SWT BOLD if font Style 0 OS italic 0 style SWT ITALIC font Data set Style style short font Size new short 1 if OS Get Event Parameter the Event OS k Event ParamFM Font Size OS typeS Int16 null 2 null font Size OS no Err font Data set Height font Size 0 NEEDS WORK color not supported in native dialog for Carbon RGB Color color new RGB Color int actual Size new int 1 if OS Get Event Parameter the Event OS k Event Param Font Color OS typeRGB Color null RGB Color sizeof actual Size color OS no Err int red color red 8 0xFF int green color green 8 0xFF int blue color blue 8 0xFF rgb new RGB red green blue break return OS no Err  fontProc nextHandler theEvent userData GetEventKind theEvent kEventFontPanelClosed kEventFontSelection fontData fontData FontData GetEventParameter theEvent kEventParamATSUFontID typeUInt32 noErr actualLength ATSUFindFontName kFontFamilyName kFontNoPlatformCode kFontNoScriptCode kFontNoLanguageCode actualLength actualLength ATSUFindFontName kFontFamilyName kFontNoPlatformCode kFontNoScriptCode kFontNoLanguageCode actualLength fontData setName fontStyle GetEventParameter theEvent kEventParamFMFontStyle typeSInt16 fontStyle noErr fontStyle fontStyle fontData setStyle fontSize GetEventParameter theEvent kEventParamFMFontSize typeSInt16 fontSize noErr fontData setHeight fontSize RGBColor RGBColor actualSize GetEventParameter theEvent kEventParamFontColor typeRGBColor RGBColor actualSize noErr noErr
Makes the dialog visible and brings it to the front of the display return a Font Data object describing the font that was selected or null if the dialog was cancelled or an error occurred exception SWT Exception ul li ERROR WIDGET DISPOSED if the dialog has been disposed li li ERROR THREAD INVALID ACCESS if not called from the thread that created the dialog li ul public Font Data open Font SelectionQD Style qd Style new Font SelectionQD Style qd Style version OS k Font SelectionQD Style Version Zero NEEDS WORK color not supported in native dialog for Carbon if rgb null qd Style has Color true qd Style color red short rgb red 257 qd Style color green short rgb green 257 qd Style color blue short rgb blue 257 if font Data null String family Name font Data name byte buffer new byte 256 int length family Name length if length 255 length 255 buffer 0 byte length for int i 0 i length i buffer i 1 byte family Name char At i int id OS FM Get Font Family From Name buffer if id OS k Invalid Font Family id OS Get App Font qd Style instance fontFamily short id int style font Data style int font Style OS normal if style SWT BOLD 0 font Style OS bold if style SWT ITALIC 0 font Style OS italic qd Style instance fontStyle short font Style qd Style size short font Data height int ptr OS New Ptr Font SelectionQD Style sizeof OS memcpy ptr qd Style Font SelectionQD Style sizeof OS Set Font Info For Selection OS k Font SelectionQD Type 1 ptr 0 OS Dispose Ptr ptr int mask new int OS k Event Class Font OS k Event Font Selection OS k Event Class Font OS k Event Font Panel Closed Callback font Panel Callback new Callback this font Proc 3 int app Target OS Get Application Event Target int out Ref new int 1 OS Install Event Handler app Target font Panel Callback get Address mask length 2 mask 0 out Ref font Data null rgb null open true OS FP Show Hide Font Panel Display display parent display while parent is Disposed open if display read And Dispatch display sleep OS Remove Event Handler out Ref 0 font Panel Callback dispose return font Data  FontData SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS FontData FontSelectionQDStyle qdStyle FontSelectionQDStyle qdStyle kFontSelectionQDStyleVersionZero qdStyle hasColor qdStyle color_red qdStyle color_green qdStyle color_blue fontData familyName fontData familyName familyName charAt FMGetFontFamilyFromName kInvalidFontFamily GetAppFont qdStyle instance_fontFamily fontData fontStyle fontStyle fontStyle qdStyle instance_fontStyle fontStyle qdStyle fontData NewPtr FontSelectionQDStyle qdStyle FontSelectionQDStyle SetFontInfoForSelection kFontSelectionQDType DisposePtr kEventClassFont kEventFontSelection kEventClassFont kEventFontPanelClosed fontPanelCallback fontProc appTarget GetApplicationEventTarget outRef InstallEventHandler appTarget fontPanelCallback getAddress outRef fontData FPShowHideFontPanel isDisposed readAndDispatch RemoveEventHandler outRef fontPanelCallback fontData
Sets a Font Data object describing the font to be selected by default in the dialog or null to let the platform choose one param font Data the Font Data to use initially or null deprecated use set Font List Font Data public void set Font Data Font Data font Data this font Data font Data  FontData fontData FontData setFontList FontData setFontData FontData fontData fontData fontData
Sets a set of Font Data objects describing the font to be selected by default in the dialog or null to let the platform choose one param font Data the set of Font Data objects to use initially or null since 2 1 1 public void set Font List Font Data font Data if font Data null font Data length 0 this font Data font Data 0 else this font Data null  FontData fontData FontData setFontList FontData fontData fontData fontData fontData fontData fontData
Sets the receiver s selected color to be the argument param rgb the new RGB value for the selected color may be null to let the platform to select a default when open is called see Palette Data getRG Bs since 2 1 public void setRGB RGB rgb this rgb rgb  PaletteData getRGBs

Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT SHADOW ETCHED IN see SWT SHADOW ETCHED OUT see SWT SHADOW IN see SWT SHADOW OUT see SWT SHADOW NONE see Widget check Subclass see Widget get Style public Group Composite parent int style super parent check Style style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS SHADOW_ETCHED_IN SHADOW_ETCHED_OUT SHADOW_IN SHADOW_OUT SHADOW_NONE checkSubclass getStyle checkStyle
static int check Style int style style SWT NO FOCUS Even though it is legal to create this widget with scroll bars they serve no useful purpose because they do not automatically scroll the widget s client area The fix is to clear the SWT style return style SWT H SCROLL SWT V SCROLL  checkStyle NO_FOCUS H_SCROLL V_SCROLL
protected void check Subclass if is Valid Subclass error SWT ERROR INVALID SUBCLASS  checkSubclass isValidSubclass ERROR_INVALID_SUBCLASS
public Rectangle compute Trim int x int y int width int height check Widget Rect bounds old Bounds new Rect OS Get Control Bounds handle old Bounds boolean fix Bounds old Bounds right old Bounds left 100 old Bounds bottom old Bounds top 100 if fix Bounds bounds new Rect bounds right bounds bottom 100 OS Set Control Bounds handle bounds else bounds old Bounds int rgn Handle OS New Rgn OS Get Control Region handle short OS k Control Content Meta Part rgn Handle Rect client new Rect OS Get Region Bounds rgn Handle client OS Dispose Rgn rgn Handle if fix Bounds OS Set Control Bounds handle old Bounds x client left bounds left y client top bounds top width Math max 8 bounds right bounds left client right client left height Math max text length 0 8 22 bounds bottom bounds top client bottom client top return new Rectangle x y width height  computeTrim checkWidget oldBounds GetControlBounds oldBounds fixBounds oldBounds oldBounds oldBounds oldBounds fixBounds SetControlBounds oldBounds rgnHandle NewRgn GetControlRegion kControlContentMetaPart rgnHandle GetRegionBounds rgnHandle DisposeRgn rgnHandle fixBounds SetControlBounds oldBounds
void create Handle int out Control new int 1 int window OS Get Control Owner parent handle OS Create Group Box Control window null 0 true out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0  createHandle outControl GetControlOwner CreateGroupBoxControl outControl outControl ERROR_NO_HANDLES outControl
void draw Background int control draw Background control background  drawBackground drawBackground
public Rectangle get Client Area check Widget Rect bounds new Rect OS Get Control Bounds handle bounds int rgn Handle OS New Rgn OS Get Control Region handle short OS k Control Content Meta Part rgn Handle Rect client new Rect OS Get Region Bounds rgn Handle client OS Dispose Rgn rgn Handle int x Math max 0 client left bounds left int y text length 0 x Math max 0 client top bounds top int width Math max 0 client right client left int height Math max 0 text length 0 bounds bottom bounds top 2 y client bottom client top return new Rectangle x y width height  getClientArea checkWidget GetControlBounds rgnHandle NewRgn GetControlRegion kControlContentMetaPart rgnHandle GetRegionBounds rgnHandle DisposeRgn rgnHandle
Returns the receiver s text which is the string that the is used as the em title em If the text has not previously been set returns an empty string return the text 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 String get Text check Widget return text  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getText checkWidget
Sets the receiver s text which is the string that will be displayed as the receiver s em title em to the argument which may not be null The string may include the mnemonic character p Mnemonics are indicated by an amp that causes the next character to be the mnemonic When the user presses a key sequence that matches the mnemonic focus is assgned to the first child of the group On most platforms the mnemonic appears underlined but may be emphasised in a platform specific manner The mnemonic indicator character amp can be escaped by doubling it in the string causing a single amp to be displayed p param string the new text exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the text is null li ul 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 set Text String string check Widget if string null error SWT ERROR NULL ARGUMENT text string char buffer new char text length text get Chars 0 buffer length buffer 0 int length fix Mnemonic buffer int ptr OS CF String Create With Characters OS kCF Allocator Default buffer length if ptr 0 error SWT ERROR CANNOT SET TEXT OS Set Control Title WithCF String handle ptr OS CF Release ptr  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setText checkWidget ERROR_NULL_ARGUMENT getChars fixMnemonic CFStringCreateWithCharacters kCFAllocatorDefault ERROR_CANNOT_SET_TEXT SetControlTitleWithCFString CFRelease

Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT SEPARATOR see SWT HORIZONTAL see SWT VERTICAL see SWT SHADOW IN see SWT SHADOW OUT see SWT SHADOW NONE see SWT CENTER see SWT LEFT see SWT RIGHT see SWT WRAP see Widget check Subclass see Widget get Style public Label Composite parent int style super parent check Style style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS SHADOW_IN SHADOW_OUT SHADOW_NONE checkSubclass getStyle checkStyle
static int check Style int style style SWT NO FOCUS if style SWT SEPARATOR 0 style check Bits style SWT VERTICAL SWT HORIZONTAL 0 0 0 0 return check Bits style SWT SHADOW OUT SWT SHADOW IN SWT SHADOW NONE 0 0 0 return check Bits style SWT LEFT SWT CENTER SWT RIGHT 0 0 0  checkStyle NO_FOCUS checkBits checkBits SHADOW_OUT SHADOW_IN SHADOW_NONE checkBits
public Point compute Size int w Hint int h Hint boolean changed check Widget int width 0 height 0 if style SWT SEPARATOR 0 if style SWT HORIZONTAL 0 width DEFAULT WIDTH height 3 else width 3 height DEFAULT HEIGHT else if is Image image null Rectangle r image get Bounds width r width height r height else int length text length if length 0 int ptr new int 1 OS Get Control Data handle short 0 OS k Control Static TextCF String Tag 4 ptr null if ptr 0 0 org eclipse swt internal carbon Point io Bounds new org eclipse swt internal carbon Point if style SWT WRAP 0 w Hint SWT DEFAULT io Bounds h short w Hint if font null OS Get Theme Text Dimensions ptr 0 short default Theme Font OS k Theme State Active io Bounds h 0 io Bounds null else int current Port new int 1 OS Get Port current Port OS Set Port Window Port OS Get Control Owner handle OS Text Font font id OS Text Face font style OS Text Size font size OS Get Theme Text Dimensions ptr 0 short OS k Theme Current Port Font OS k Theme State Active io Bounds h 0 io Bounds null OS Set Port current Port 0 width io Bounds h height io Bounds v OS CF Release ptr 0 else Font font get Font Font Info info new Font Info OS Fetch Font Info font id font size font style info int font Height info ascent info descent height font Height if w Hint SWT DEFAULT width w Hint if h Hint SWT DEFAULT height h Hint return new Point width height  computeSize wHint hHint checkWidget DEFAULT_WIDTH DEFAULT_HEIGHT isImage getBounds GetControlData kControlStaticTextCFStringTag ioBounds wHint ioBounds wHint GetThemeTextDimensions defaultThemeFont kThemeStateActive ioBounds ioBounds currentPort GetPort currentPort SetPortWindowPort GetControlOwner TextFont TextFace TextSize GetThemeTextDimensions kThemeCurrentPortFont kThemeStateActive ioBounds ioBounds SetPort currentPort ioBounds ioBounds CFRelease getFont FontInfo FontInfo FetchFontInfo fontHeight fontHeight wHint wHint hHint hHint
void create Handle state GRAB int out Control new int 1 int window OS Get Control Owner parent handle if style SWT SEPARATOR 0 OS Create Separator Control window null out Control else int just OS te Flush Left if style SWT CENTER 0 just OS te Center if style SWT RIGHT 0 just OS te Flush Right Control Font Style Rec font Style new Control Font Style Rec font Style flags OS k Control Use Just Mask font Style just short just OS Create Static Text Control window null 0 font Style out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0  createHandle outControl GetControlOwner CreateSeparatorControl outControl teFlushLeft teCenter teFlushRight ControlFontStyleRec fontStyle ControlFontStyleRec fontStyle kControlUseJustMask fontStyle CreateStaticTextControl fontStyle outControl outControl ERROR_NO_HANDLES outControl
int default Theme Font if display small Fonts return OS k Theme Small System Font return OS k Theme Push Button Font  defaultThemeFont smallFonts kThemeSmallSystemFont kThemePushButtonFont
void draw Background int control if style SWT SEPARATOR 0 draw Background control background  drawBackground drawBackground
void draw Widget int control int damage Rgn int visible Rgn int the Event if is Image image null GC Data data new GC Data data paint Event the Event data visible Rgn visible Rgn GC gc GC carbon new this data int x 0 Point size get Size Rectangle bounds image get Bounds if style SWT CENTER 0 x size x bounds width 2 if style SWT RIGHT 0 x size x bounds width gc draw Image image x 0 gc dispose super draw Widget control damage Rgn visible Rgn the Event  drawWidget damageRgn visibleRgn theEvent isImage GCData GCData paintEvent theEvent visibleRgn visibleRgn carbon_new getSize getBounds drawImage drawWidget damageRgn visibleRgn theEvent
Returns a value which describes the position of the text or image in the receiver The value will be one of code LEFT code code RIGHT code or code CENTER code unless the receiver is a code SEPARATOR code label in which case code NONE code is returned return the alignment 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 int get Alignment check Widget if style SWT SEPARATOR 0 return SWT LEFT if style SWT CENTER 0 return SWT CENTER if style SWT RIGHT 0 return SWT RIGHT return SWT LEFT  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getAlignment checkWidget
public int get Border Width check Widget return style SWT BORDER 0 1 0  getBorderWidth checkWidget
Returns the receiver s image if it has one or null if it does not return the receiver s image 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 Image get Image check Widget return image  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getImage checkWidget
String get Name Text return get Text  getNameText getText
Returns the receiver s text which will be an empty string if it has never been set or if the receiver is a code SEPARATOR code label return the receiver s text 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 String get Text check Widget if style SWT SEPARATOR 0 return return text  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getText checkWidget
Controls how text and images will be displayed in the receiver The argument should be one of code LEFT code code RIGHT code or code CENTER code If the receiver is a code SEPARATOR code label the argument is ignored and the alignment is not changed param alignment the new alignment 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 set Alignment int alignment check Widget if style SWT SEPARATOR 0 return if alignment SWT LEFT SWT RIGHT SWT CENTER 0 return style SWT LEFT SWT RIGHT SWT CENTER style alignment SWT LEFT SWT RIGHT SWT CENTER int just OS te Flush Left if alignment SWT CENTER 0 just OS te Center if alignment SWT RIGHT 0 just OS te Flush Right Control Font Style Rec font Style new Control Font Style Rec OS Get Control Data handle short OS k Control Entire Control OS k Control Font Style Tag Control Font Style Rec sizeof font Style null font Style flags OS k Control Use Just Mask font Style just short just OS Set Control Font Style handle font Style redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setAlignment checkWidget teFlushLeft teCenter teFlushRight ControlFontStyleRec fontStyle ControlFontStyleRec GetControlData kControlEntireControl kControlFontStyleTag ControlFontStyleRec fontStyle fontStyle kControlUseJustMask fontStyle SetControlFontStyle fontStyle
Sets the receiver s image to the argument which may be null indicating that no image should be displayed param image the image to display on the receiver may be null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the image has been disposed li ul 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 set Image Image image check Widget if style SWT SEPARATOR 0 return if image null image is Disposed error SWT ERROR INVALID ARGUMENT this image image is Image true if image null set Text text return if text length 0 int ptr OS CF String Create With Characters OS kCF Allocator Default null 0 if ptr 0 error SWT ERROR CANNOT SET TEXT OS Set Control Data handle 0 OS k Control Static TextCF String Tag 4 new int ptr OS CF Release ptr redraw  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setImage checkWidget isDisposed ERROR_INVALID_ARGUMENT isImage setText CFStringCreateWithCharacters kCFAllocatorDefault ERROR_CANNOT_SET_TEXT SetControlData kControlStaticTextCFStringTag CFRelease
Sets the receiver s text p This method sets the widget label The label may include the mnemonic character and line delimiters p p Mnemonics are indicated by an amp that causes the next character to be the mnemonic When the user presses a key sequence that matches the mnemonic focus is assigned to the control that follows the label On most platforms the mnemonic appears underlined but may be emphasised in a platform specific manner The mnemonic indicator character amp can be escaped by doubling it in the string causing a single amp to be displayed p param string the new text exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the text is null li ul 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 set Text String string check Widget if string null error SWT ERROR NULL ARGUMENT if style SWT SEPARATOR 0 return is Image false text string char buffer new char text length text get Chars 0 buffer length buffer 0 int length fix Mnemonic buffer int ptr OS CF String Create With Characters OS kCF Allocator Default buffer length if ptr 0 error SWT ERROR CANNOT SET TEXT OS Set Control Data handle 0 OS k Control Static TextCF String Tag 4 new int ptr OS CF Release ptr redraw  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setText checkWidget ERROR_NULL_ARGUMENT isImage getChars fixMnemonic CFStringCreateWithCharacters kCFAllocatorDefault ERROR_CANNOT_SET_TEXT SetControlData kControlStaticTextCFStringTag CFRelease

Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT SINGLE see SWT MULTI see Widget check Subclass see Widget get Style public List Composite parent int style super parent check Style style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle checkStyle
Adds the argument to the end of the receiver s list param string the new item exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul 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 exception SWT Error ul li ERROR ITEM NOT ADDED if the operation fails because of an operating system failure li ul see add String int public void add String string check Widget if string null error SWT ERROR NULL ARGUMENT int id new int item Count 1 if OS Add Data Browser Items handle OS k Data Browser No Item 1 id OS k Data Browser Item No Property OS no Err error SWT ERROR ITEM NOT ADDED if item Count items length String new Items new String item Count 4 System arraycopy items 0 new Items 0 items length items new Items items item Count string  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_ADDED checkWidget ERROR_NULL_ARGUMENT itemCount AddDataBrowserItems kDataBrowserNoItem kDataBrowserItemNoProperty noErr ERROR_ITEM_NOT_ADDED itemCount newItems itemCount newItems newItems itemCount
Adds the argument to the receiver s list at the given zero relative index p Note To add an item at the end of the list use the result of calling code get Item Count code as the index or use code add String code p param string the new item param index the index for the item exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list inclusive li ul 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 exception SWT Error ul li ERROR ITEM NOT ADDED if the operation fails because of an operating system failure li ul see add String public void add String string int index check Widget if string null error SWT ERROR NULL ARGUMENT if 0 index index item Count error SWT ERROR INVALID RANGE int id new int item Count 1 if OS Add Data Browser Items handle OS k Data Browser No Item 1 id OS k Data Browser Item No Property OS no Err error SWT ERROR ITEM NOT ADDED if item Count items length String new Items new String item Count 4 System arraycopy items 0 new Items 0 items length items new Items System arraycopy items index items index 1 item Count index items index string OS Update Data Browser Items handle 0 0 null OS k Data Browser Item No Property OS k Data Browser No Item  getItemCount IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_ADDED checkWidget ERROR_NULL_ARGUMENT itemCount ERROR_INVALID_RANGE itemCount AddDataBrowserItems kDataBrowserNoItem kDataBrowserItemNoProperty noErr ERROR_ITEM_NOT_ADDED itemCount newItems itemCount newItems newItems itemCount UpdateDataBrowserItems kDataBrowserItemNoProperty kDataBrowserNoItem
Adds the listener to the collection of listeners who will be notified when the receiver s selection changes by sending it one of the messages defined in the code Selection Listener code interface p code widget Selected code is called when the selection changes code widget Default Selected code is typically called when an item is double clicked p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
static int check Style int style return check Bits style SWT SINGLE SWT MULTI 0 0 0 0  checkStyle checkBits
public Point compute Size int w Hint int h Hint boolean changed check Widget int width 0 if w Hint SWT DEFAULT GC gc new GC this for int i 0 i item Count i Point extent gc string Extent items i width Math max width extent x gc dispose width EXTRA WIDTH else width w Hint if width 0 width DEFAULT WIDTH int height 0 if h Hint SWT DEFAULT height item Count get Item Height else height h Hint if height 0 height DEFAULT HEIGHT Rectangle rect compute Trim 0 0 width height return new Point rect width rect height  computeSize wHint hHint checkWidget wHint itemCount stringExtent EXTRA_WIDTH wHint DEFAULT_WIDTH hHint itemCount getItemHeight hHint DEFAULT_HEIGHT computeTrim
public Rectangle compute Trim int x int y int width int height check Widget int border 0 int out Metric new int 1 OS Get Theme Metric OS k Theme Metric Focus Rect Outset out Metric border out Metric 0 OS Get Theme Metric OS k Theme Metric Edit Text Frame Outset out Metric border out Metric 0 Rect rect new Rect OS Get Data Browser Scroll Bar Inset handle rect x rect left border y rect top border width rect left rect right border border height rect top rect bottom border border return new Rectangle x y width height  computeTrim checkWidget outMetric GetThemeMetric kThemeMetricFocusRectOutset outMetric outMetric GetThemeMetric kThemeMetricEditTextFrameOutset outMetric outMetric GetDataBrowserScrollBarInset
void create Handle int out Control new int 1 int window OS Get Control Owner parent handle OS Create Data Browser Control window null OS k Data Browser List View out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0 if draw Focus Ring OS Set Control Data handle OS k Control Entire Control OS k Control Data Browser Includes Frame And Focus Tag 1 new byte 0 int selection Flags style SWT SINGLE 0 OS k Data Browser Select Only One OS k Data Browser Never Empty Selection Set OS k Data Browser Cmd Toggles Selection OS Set Data Browser Selection Flags handle selection Flags OS Set Data Browser List View Header Btn Height handle short 0 OS Set Data Browser Has Scroll Bars handle style SWT H SCROLL 0 style SWT V SCROLL 0 Data Browser List View Column Desc column new Data Browser List View Column Desc column headerBtnDesc version OS k Data Browser List View Latest Header Desc column propertyDesc propertyID COLUMN ID column propertyDesc propertyType OS k Data Browser Text Type column propertyDesc propertyFlags OS k Data Browser List View Selection Column OS k Data Browser Default Property Flags NOT DONE column headerBtnDesc maximumWidth 0x7FFF column headerBtnDesc initialOrder short OS k Data Browser Order Increasing OS Add Data Browser List View Column handle column 0 Feature in the Macintosh Scroll bars are not created until the data browser needs to draw them The fix is to force the scroll bars to be created by temporarily giving the widget a size drawing it on a offscreen buffer to avoid flashes and then restoring it to size zero int size 50 Rect rect new Rect rect right rect bottom short size OS Set Control Bounds handle rect int bpl size 4 int g World new int 1 int data OS New Ptr bpl size OS NewG World From Ptr g World OS k32ARGB Pixel Format rect 0 0 0 data bpl int cur Port new int 1 int curG World new int 1 OS GetG World cur Port curG World OS SetG World g World 0 curG World 0 OS Draw Control In Current Port handle OS SetG World cur Port 0 curG World 0 OS DisposeG World g World 0 OS Dispose Ptr data rect right rect bottom short 0 OS Set Control Bounds handle rect  createHandle outControl GetControlOwner CreateDataBrowserControl kDataBrowserListView outControl outControl ERROR_NO_HANDLES outControl drawFocusRing SetControlData kControlEntireControl kControlDataBrowserIncludesFrameAndFocusTag selectionFlags kDataBrowserSelectOnlyOne kDataBrowserNeverEmptySelectionSet kDataBrowserCmdTogglesSelection SetDataBrowserSelectionFlags selectionFlags SetDataBrowserListViewHeaderBtnHeight SetDataBrowserHasScrollBars H_SCROLL V_SCROLL DataBrowserListViewColumnDesc DataBrowserListViewColumnDesc headerBtnDesc_version kDataBrowserListViewLatestHeaderDesc propertyDesc_propertyID COLUMN_ID propertyDesc_propertyType kDataBrowserTextType propertyDesc_propertyFlags kDataBrowserListViewSelectionColumn kDataBrowserDefaultPropertyFlags headerBtnDesc_maximumWidth headerBtnDesc_initialOrder kDataBrowserOrderIncreasing AddDataBrowserListViewColumn SetControlBounds gWorld NewPtr NewGWorldFromPtr gWorld k32ARGBPixelFormat curPort curGWorld GetGWorld curPort curGWorld SetGWorld gWorld curGWorld DrawControlInCurrentPort SetGWorld curPort curGWorld DisposeGWorld gWorld DisposePtr SetControlBounds
void create Widget super create Widget items new String 4  createWidget createWidget
Scroll Bar create Scroll Bar int style return create Standard Bar style  ScrollBar createScrollBar createStandardBar
Color default Background return display get System Color SWT COLOR LIST BACKGROUND  defaultBackground getSystemColor COLOR_LIST_BACKGROUND
Color default Foreground return display get System Color SWT COLOR LIST FOREGROUND  defaultForeground getSystemColor COLOR_LIST_FOREGROUND
int default Theme Font if display small Fonts return OS k Theme Small System Font return OS k Theme Views Font  defaultThemeFont smallFonts kThemeSmallSystemFont kThemeViewsFont
Deselects the item at the given zero relative index in the receiver If the item at the index was already deselected it remains deselected Indices that are out of range are ignored param index the index of the item to deselect 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 deselect int index check Widget if 0 index index item Count int ids new int index 1 deselect ids ids length  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget itemCount
Deselects the items at the given zero relative indices in the receiver If the item at the given zero relative index in the receiver is selected it is deselected If the item at the index was not selected it remains deselected The range of the indices is inclusive Indices that are out of range are ignored param start the start index of the items to deselect param end the end index of the items to deselect 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 deselect int start int end check Widget if start end return if end 0 start item Count return start Math max 0 start end Math min item Count 1 end int length end start 1 if length 0 return int ids new int length for int i 0 i length i ids i end i 1 deselect ids length  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget itemCount itemCount
Deselects the items at the given zero relative indices in the receiver If the item at the given zero relative index in the receiver is selected it is deselected If the item at the index was not selected it remains deselected Indices that are out of range and duplicate indices are ignored param indices the array of indices for the items to deselect exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the set of indices is null li ul 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 deselect int indices check Widget if indices null error SWT ERROR NULL ARGUMENT NOT DONE range check int length indices length int ids new int length for int i 0 i length i ids i indices length i 1 1 deselect ids length  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget ERROR_NULL_ARGUMENT
void deselect int ids int count ignore Select true int selection Flags null if style SWT SINGLE 0 selection Flags new int 1 OS Get Data Browser Selection Flags handle selection Flags OS Set Data Browser Selection Flags handle selection Flags 0 OS k Data Browser Never Empty Selection Set OS Set Data Browser Selected Items handle count ids OS k Data Browser Items Remove if style SWT SINGLE 0 OS Set Data Browser Selection Flags handle selection Flags 0 ignore Select false  ignoreSelect selectionFlags selectionFlags GetDataBrowserSelectionFlags selectionFlags SetDataBrowserSelectionFlags selectionFlags kDataBrowserNeverEmptySelectionSet SetDataBrowserSelectedItems kDataBrowserItemsRemove SetDataBrowserSelectionFlags selectionFlags ignoreSelect
Deselects all selected items in the receiver 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 deselect All check Widget deselect null 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS deselectAll checkWidget
public Rectangle get Client Area check Widget int border 0 int out Metric new int 1 OS Get Theme Metric OS k Theme Metric Focus Rect Outset out Metric border out Metric 0 OS Get Theme Metric OS k Theme Metric Edit Text Frame Outset out Metric border out Metric 0 Rect rect new Rect inset new Rect OS Get Control Bounds handle rect OS Get Data Browser Scroll Bar Inset handle inset int width Math max 0 rect right rect left inset right border border int height Math max 0 rect bottom rect top inset bottom border border return new Rectangle inset left inset top width height  getClientArea checkWidget outMetric GetThemeMetric kThemeMetricFocusRectOutset outMetric outMetric GetThemeMetric kThemeMetricEditTextFrameOutset outMetric outMetric GetControlBounds GetDataBrowserScrollBarInset
Returns the zero relative index of the item which currently has the focus in the receiver or 1 if no item has focus return the index of the selected item 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 int get Focus Index check Widget int first new int 1 last new int 1 if OS Get Data Browser Selection Anchor handle first last OS no Err return 1 return first 0 1  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getFocusIndex checkWidget GetDataBrowserSelectionAnchor noErr
Returns the item at the given zero relative index in the receiver Throws an exception if the index is out of range param index the index of the item to return return the item at the given index exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li ul 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 exception SWT Error ul li ERROR CANNOT GET ITEM if the operation fails because of an operating system failure li ul public String get Item int index check Widget if 0 index index item Count error SWT ERROR INVALID RANGE return items index  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_ITEM getItem checkWidget itemCount ERROR_INVALID_RANGE
Returns the number of items contained in the receiver return the number of items 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 exception SWT Error ul li ERROR CANNOT GET COUNT if the operation fails because of an operating system failure li ul public int get Item Count check Widget return item Count  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_COUNT getItemCount checkWidget itemCount
Returns the height of the area which would be used to display em one em of the items in the tree return the height of one item 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 exception SWT Error ul li ERROR CANNOT GET ITEM HEIGHT if the operation fails because of an operating system failure li ul public int get Item Height check Widget short height new short 1 if OS Get Data Browser Table View Row Height handle height OS no Err error SWT ERROR CANNOT GET ITEM HEIGHT return height 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_ITEM_HEIGHT getItemHeight checkWidget GetDataBrowserTableViewRowHeight noErr ERROR_CANNOT_GET_ITEM_HEIGHT
Returns an array of code String code s which are the items in the receiver p Note This is not the actual structure used by the receiver to maintain its list of items so modifying the array will not affect the receiver p return the items in the receiver s list 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 exception SWT Error ul li ERROR CANNOT GET ITEM if the operation fails because of an operating system failure while getting an item li li ERROR CANNOT GET COUNT if the operation fails because of an operating system failure while getting the item count li ul public String get Items check Widget String result new String item Count System arraycopy items 0 result 0 item Count return result  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_ITEM ERROR_CANNOT_GET_COUNT getItems checkWidget itemCount itemCount
Returns an array of code String code s that are currently selected in the receiver An empty array indicates that no items are selected p Note This is not the actual structure used by the receiver to maintain its selection so modifying the array will not affect the receiver p return an array representing the selection 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 exception SWT Error ul li ERROR CANNOT GET SELECTION if the operation fails because of an operating system failure while getting the selection li li ERROR CANNOT GET ITEM if the operation fails because of an operating system failure while getting an item li ul public String get Selection check Widget int ptr OS New Handle 0 if OS Get Data Browser Items handle OS k Data Browser No Item true OS k Data Browser Item Is Selected ptr OS no Err error SWT ERROR CANNOT GET SELECTION int count OS Get Handle Size ptr 4 String result new String count OS H Lock ptr int start new int 1 OS memcpy start ptr 4 int id new int 1 for int i 0 i count i OS memcpy id start 0 i 4 4 result i items id 0 1 OS H Unlock ptr OS Dispose Handle ptr return result  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_SELECTION ERROR_CANNOT_GET_ITEM getSelection checkWidget NewHandle GetDataBrowserItems kDataBrowserNoItem kDataBrowserItemIsSelected noErr ERROR_CANNOT_GET_SELECTION GetHandleSize HLock HUnlock DisposeHandle
Returns the number of selected items contained in the receiver return the number of selected items 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 exception SWT Error ul li ERROR CANNOT GET COUNT if the operation fails because of an operating system failure li ul public int get Selection Count check Widget int count new int 1 if OS Get Data Browser Item Count handle OS k Data Browser No Item true OS k Data Browser Item Is Selected count OS no Err error SWT ERROR CANNOT GET COUNT return count 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_COUNT getSelectionCount checkWidget GetDataBrowserItemCount kDataBrowserNoItem kDataBrowserItemIsSelected noErr ERROR_CANNOT_GET_COUNT
Returns the zero relative index of the item which is currently selected in the receiver or 1 if no item is selected return the index of the selected item 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 exception SWT Error ul li ERROR CANNOT GET SELECTION if the operation fails because of an operating system failure li ul public int get Selection Index check Widget int first new int 1 last new int 1 if OS Get Data Browser Selection Anchor handle first last OS no Err return 1 return first 0 1  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_SELECTION getSelectionIndex checkWidget GetDataBrowserSelectionAnchor noErr
Returns the zero relative indices of the items which are currently selected in the receiver The array is empty if no items are selected p Note This is not the actual structure used by the receiver to maintain its selection so modifying the array will not affect the receiver p return the array of indices of the selected items 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 exception SWT Error ul li ERROR CANNOT GET SELECTION if the operation fails because of an operating system failure li ul public int get Selection Indices check Widget int ptr OS New Handle 0 if OS Get Data Browser Items handle OS k Data Browser No Item true OS k Data Browser Item Is Selected ptr OS no Err error SWT ERROR CANNOT GET SELECTION int count OS Get Handle Size ptr 4 int result new int count OS H Lock ptr int start new int 1 OS memcpy start ptr 4 int id new int 1 for int i 0 i count i OS memcpy id start 0 i 4 4 result i id 0 1 OS H Unlock ptr OS Dispose Handle ptr return result  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_SELECTION getSelectionIndices checkWidget NewHandle GetDataBrowserItems kDataBrowserNoItem kDataBrowserItemIsSelected noErr ERROR_CANNOT_GET_SELECTION GetHandleSize HLock HUnlock DisposeHandle
Returns the zero relative index of the item which is currently at the top of the receiver This index can change when items are scrolled or new items are added or removed return the index of the top item 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 int get Top Index check Widget int top new int 1 left new int 1 OS Get Data Browser Scroll Position handle top left return top 0 get Item Height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getTopIndex checkWidget GetDataBrowserScrollPosition getItemHeight
void hook Events super hook Events Data Browser Callbacks callbacks new Data Browser Callbacks callbacks version OS k Data Browser Latest Callbacks OS Init Data Browser Callbacks callbacks callbacks v1 itemDataCallback display item Data Proc callbacks v1 itemNotificationCallback display item Notification Proc OS Set Data Browser Callbacks handle callbacks  hookEvents hookEvents DataBrowserCallbacks DataBrowserCallbacks kDataBrowserLatestCallbacks InitDataBrowserCallbacks v1_itemDataCallback itemDataProc v1_itemNotificationCallback itemNotificationProc SetDataBrowserCallbacks
int item Data Proc int browser int id int property int item Data int set Value int index id 1 switch property case COLUMN ID String text items index char buffer new char text length text get Chars 0 buffer length buffer 0 int ptr OS CF String Create With Characters OS kCF Allocator Default buffer buffer length if ptr 0 error SWT ERROR CANNOT SET TEXT OS Set Data Browser Item Data Text item Data ptr OS CF Release ptr break return OS no Err  itemDataProc itemData setValue COLUMN_ID getChars CFStringCreateWithCharacters kCFAllocatorDefault ERROR_CANNOT_SET_TEXT SetDataBrowserItemDataText itemData CFRelease noErr
int k Event Mouse Down int next Handler int the Event int user Data int result super k Event Mouse Down next Handler the Event user Data if result OS no Err return result Shell shell get Shell shell bring To Top true Feature in the Macintosh For some reason when the user clicks on the data browser focus is assigned then lost and then reassigned causing k Even Control Set Focus Part events The fix is to ignore k Even Control Set Focus Part when the user clicks and send the focus events from k Event Mouse Down Control old Focus display get Focus Control display ignore Focus true result OS Call Next Event Handler next Handler the Event display ignore Focus false if old Focus this if old Focus null old Focus is Disposed old Focus send Focus Event false false if is Disposed is Enabled send Focus Event true false return result  kEventMouseDown nextHandler theEvent userData kEventMouseDown nextHandler theEvent userData noErr getShell bringToTop kEvenControlSetFocusPart kEvenControlSetFocusPart kEventMouseDown oldFocus getFocusControl ignoreFocus CallNextEventHandler nextHandler theEvent ignoreFocus oldFocus oldFocus oldFocus isDisposed oldFocus sendFocusEvent isDisposed isEnabled sendFocusEvent
int k Event Text Input Unicode For Key Event int next Handler int the Event int user Data int result super k Event Text Input Unicode For Key Event next Handler the Event user Data if result OS no Err return result int keyboard Event new int 1 OS Get Event Parameter the Event OS k Event Param Text Input Send Keyboard Event OS type Event Ref null keyboard Event length 4 null keyboard Event int key Code new int 1 OS Get Event Parameter keyboard Event 0 OS k Event Param Key Code OS typeU Int32 null key Code length 4 null key Code switch key Code 0 case 36 Return post Event SWT Default Selection break Feature in the Macintosh For some reason when the user hits an up or down arrow to traverse the items in a Data Browser the item scrolls to the left such that the white space that is normally visible to the right of the every item is scrolled out of view The fix is to do the arrow traversal in Java and not call the default handler case 125 Down int index get Selection Index set Selection Math min item Count 1 index 1 true return OS no Err case 126 Up int index get Selection Index set Selection Math max 0 index 1 true return OS no Err return result  kEventTextInputUnicodeForKeyEvent nextHandler theEvent userData kEventTextInputUnicodeForKeyEvent nextHandler theEvent userData noErr keyboardEvent GetEventParameter theEvent kEventParamTextInputSendKeyboardEvent typeEventRef keyboardEvent keyboardEvent keyCode GetEventParameter keyboardEvent kEventParamKeyCode typeUInt32 keyCode keyCode keyCode postEvent DefaultSelection getSelectionIndex setSelection itemCount noErr getSelectionIndex setSelection noErr
int item Notification Proc int browser int id int message switch message case OS k Data Browser Item Selected case OS k Data Browser Item Deselected if ignore Select break int first new int 1 last new int 1 OS Get Data Browser Selection Anchor handle first last boolean selected false if style SWT MULTI 0 int modifiers OS Get Current Event Key Modifiers if modifiers OS shift Key 0 if message OS k Data Browser Item Selected selected first 0 id last 0 id else selected id anchor First id anchor Last else if modifiers OS cmd Key 0 selected true else selected first 0 last 0 else selected message OS k Data Browser Item Selected if selected anchor First first 0 anchor Last last 0 post Event SWT Selection break case OS k Data Browser Item Double Clicked post Event SWT Default Selection break return OS no Err  itemNotificationProc kDataBrowserItemSelected kDataBrowserItemDeselected ignoreSelect GetDataBrowserSelectionAnchor GetCurrentEventKeyModifiers shiftKey kDataBrowserItemSelected anchorFirst anchorLast cmdKey kDataBrowserItemSelected anchorFirst anchorLast postEvent kDataBrowserItemDoubleClicked postEvent DefaultSelection noErr
Gets the index of an item p The list is searched starting at 0 until an item is found that is equal to the search item If no item is found 1 is returned Indexing is zero based param string the search item return the index of the item exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul 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 int index Of String item check Widget if item null error SWT ERROR NULL ARGUMENT for int i 0 i item Count i if items i equals item return i return 1  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS indexOf checkWidget ERROR_NULL_ARGUMENT itemCount
Searches the receiver s list starting at the given zero relative index until an item is found that is equal to the argument and returns the index of that item If no item is found or the starting index is out of range returns 1 param string the search item param start the zero relative index at which to start the search return the index of the item exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul 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 exception SWT Error ul li ERROR CANNOT GET COUNT if the operation fails because of an operating system failure while getting the item count li li ERROR CANNOT GET ITEM if the operation fails because of an operating system failure while getting an item li ul public int index Of String string int start check Widget if string null error SWT ERROR NULL ARGUMENT for int i start i item Count i if items i equals string return i return 1  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_COUNT ERROR_CANNOT_GET_ITEM indexOf checkWidget ERROR_NULL_ARGUMENT itemCount
Returns code true code if the item is selected and code false code otherwise Indices out of range are ignored param index the index of the item return the visibility state of the item at the index 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 boolean is Selected int index check Widget if 0 index index item Count return false return OS Is Data Browser Item Selected handle index 1  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS isSelected checkWidget itemCount IsDataBrowserItemSelected
Removes the item from the receiver at the given zero relative index param index the index for the item exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li ul 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 exception SWT Error ul li ERROR ITEM NOT REMOVED if the operation fails because of an operating system failure li ul public void remove int index check Widget if 0 index index item Count error SWT ERROR INVALID RANGE int id new int item Count if OS Remove Data Browser Items handle OS k Data Browser No Item id length id 0 OS no Err error SWT ERROR ITEM NOT REMOVED System arraycopy items index 1 items index item Count index items item Count null OS Update Data Browser Items handle 0 0 null OS k Data Browser Item No Property OS k Data Browser No Item  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_REMOVED checkWidget itemCount ERROR_INVALID_RANGE itemCount RemoveDataBrowserItems kDataBrowserNoItem noErr ERROR_ITEM_NOT_REMOVED itemCount itemCount UpdateDataBrowserItems kDataBrowserItemNoProperty kDataBrowserNoItem
Removes the items from the receiver which are between the given zero relative start and end indices inclusive param start the start of the range param end the end of the range exception Illegal Argument Exception ul li ERROR INVALID RANGE if either the start or end are not between 0 and the number of elements in the list minus 1 inclusive li ul 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 exception SWT Error ul li ERROR ITEM NOT REMOVED if the operation fails because of an operating system failure li ul public void remove int start int end check Widget if start end return if 0 start start end end item Count error SWT ERROR INVALID RANGE int length end start 1 for int i 0 i length i remove start  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_REMOVED checkWidget itemCount ERROR_INVALID_RANGE
Searches the receiver s list starting at the first item until an item is found that is equal to the argument and removes that item from the list param string the item to remove exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li li ERROR INVALID ARGUMENT if the string is not found in the list li ul 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 exception SWT Error ul li ERROR ITEM NOT REMOVED if the operation fails because of an operating system failure li ul public void remove String string check Widget if string null error SWT ERROR NULL ARGUMENT int index index Of string 0 if index 1 error SWT ERROR INVALID ARGUMENT remove index  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_REMOVED checkWidget ERROR_NULL_ARGUMENT indexOf ERROR_INVALID_ARGUMENT
Removes the items from the receiver at the given zero relative indices param indices the array of indices of the items exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li li ERROR NULL ARGUMENT if the indices array is null li ul 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 exception SWT Error ul li ERROR ITEM NOT REMOVED if the operation fails because of an operating system failure li ul public void remove int indices check Widget if indices null error SWT ERROR NULL ARGUMENT if indices length 0 return int new Indices new int indices length System arraycopy indices 0 new Indices 0 indices length sort new Indices int start new Indices new Indices length 1 end new Indices 0 int count get Item Count if 0 start start end end count error SWT ERROR INVALID RANGE int last 1 for int i 0 i new Indices length i int index new Indices i if index last remove index last index  IllegalArgumentException ERROR_INVALID_RANGE ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_REMOVED checkWidget ERROR_NULL_ARGUMENT newIndices newIndices newIndices newIndices newIndices newIndices getItemCount ERROR_INVALID_RANGE newIndices newIndices
Removes all of the items from the receiver 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 remove All check Widget OS Remove Data Browser Items handle OS k Data Browser No Item 0 null 0 OS Set Data Browser Scroll Position handle 0 0 items new String 4 item Count anchor First anchor Last 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS removeAll checkWidget RemoveDataBrowserItems kDataBrowserNoItem SetDataBrowserScrollPosition itemCount anchorFirst anchorLast
Removes the listener from the collection of listeners who will be notified when the receiver s selection changes param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Selection listener event Table unhook SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable DefaultSelection
Selects the item at the given zero relative index in the receiver s list If the item at the index was already selected it remains selected Indices that are out of range are ignored param index the index of the item to select 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 select int index check Widget if 0 index index item Count int ids new int index 1 select ids ids length false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget itemCount
Selects the items in the range specified by the given zero relative indices in the receiver The range of indices is inclusive The current selection is not cleared before the new items are selected p If an item in the given range is not selected it is selected If an item in the given range was already selected it remains selected Indices that are out of range are ignored and no items will be selected if start is greater than end If the receiver is single select and there is more than one item in the given range then all indices are ignored param start the start of the range param end the end of the range 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 List set Selection int int public void select int start int end check Widget if end 0 start end style SWT SINGLE 0 start end return if item Count 0 start item Count return start Math max 0 start end Math min end item Count 1 int length end start 1 int ids new int length for int i 0 i length i ids i end i 1 select ids length false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget itemCount itemCount itemCount
Selects the items at the given zero relative indices in the receiver The current selection is not cleared before the new items are selected p If the item at a given index is not selected it is selected If the item at a given index was already selected it remains selected Indices that are out of range and duplicate indices are ignored If the receiver is single select and multiple indices are specified then all indices are ignored param indices the array of indices for the items to select exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the array of indices is null li ul 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 List set Selection int public void select int indices check Widget if indices null error SWT ERROR NULL ARGUMENT int length indices length if length 0 style SWT SINGLE 0 length 1 return int ids new int length int count 0 for int i 0 i length i int index indices length i 1 if index 0 index item Count ids count index 1 if count 0 select ids count false  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget ERROR_NULL_ARGUMENT itemCount
void select int ids int count boolean clear ignore Select true Bug in the Macintosh When the Data Broswer selection flags includes both k Data Browser Never Empty Selection Set and k Data Browser Select Only One two items are selected when Set Data Browser Selected Items is called with k Data Browser Items Assign to assign a new seletion despite the fact that k Data Browser Select Only One was specified The fix is to save and restore k Data Browser Never Empty Selection Set around each call to Set Data Browser Selected Items int selection Flags null if style SWT SINGLE 0 selection Flags new int 1 OS Get Data Browser Selection Flags handle selection Flags OS Set Data Browser Selection Flags handle selection Flags 0 OS k Data Browser Never Empty Selection Set int operation OS k Data Browser Items Assign if style SWT MULTI 0 clear operation OS k Data Browser Items Add OS Set Data Browser Selected Items handle count ids operation if style SWT SINGLE 0 OS Set Data Browser Selection Flags handle selection Flags 0 ignore Select false  ignoreSelect DataBroswer kDataBrowserNeverEmptySelectionSet kDataBrowserSelectOnlyOne SetDataBrowserSelectedItems kDataBrowserItemsAssign kDataBrowserSelectOnlyOne kDataBrowserNeverEmptySelectionSet SetDataBrowserSelectedItems selectionFlags selectionFlags GetDataBrowserSelectionFlags selectionFlags SetDataBrowserSelectionFlags selectionFlags kDataBrowserNeverEmptySelectionSet kDataBrowserItemsAssign kDataBrowserItemsAdd SetDataBrowserSelectedItems SetDataBrowserSelectionFlags selectionFlags ignoreSelect
void select String items check Widget if items null error SWT ERROR NULL ARGUMENT NOT DONE range check int length items length int ids new int length for int i 0 i length i ids i index Of items length i 1 1 select ids length false  checkWidget ERROR_NULL_ARGUMENT indexOf
Selects all of the items in the receiver p If the receiver is single select do nothing 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 select All check Widget if style SWT SINGLE 0 return select null 0 false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS selectAll checkWidget
int set Bounds int control int x int y int width int height boolean move boolean resize boolean events Ensure that the top item is visible when the tree is resized from a zero size to a size that can show the selection TODO optimize int index 1 if resize control handle Rectangle rect get Client Area if rect height get Item Height index get Top Index int result super set Bounds control x y width height move resize events if index 1 show Index index return result  setBounds getClientArea getItemHeight getTopIndex setBounds showIndex
Sets the text of the item in the receiver s list at the given zero relative index to the string argument This is equivalent to code remove code ing the old item at the index and then code add code ing the new item at that index param index the index for the item param string the new text for the item exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li li ERROR NULL ARGUMENT if the string is null li ul 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 exception SWT Error ul li ERROR ITEM NOT REMOVED if the remove operation fails because of an operating system failure li li ERROR ITEM NOT ADDED if the add operation fails because of an operating system failure li ul public void set Item int index String string check Widget if string null error SWT ERROR NULL ARGUMENT if 0 index index item Count error SWT ERROR INVALID RANGE int id new int index 1 items index string OS Update Data Browser Items handle OS k Data Browser No Item id length id OS k Data Browser Item No Property OS k Data Browser No Item  IllegalArgumentException ERROR_INVALID_RANGE ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_REMOVED ERROR_ITEM_NOT_ADDED setItem checkWidget ERROR_NULL_ARGUMENT itemCount ERROR_INVALID_RANGE UpdateDataBrowserItems kDataBrowserNoItem kDataBrowserItemNoProperty kDataBrowserNoItem
Sets the receiver s items to be the given array of items param items the array of items exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the items array is null li ul 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 exception SWT Error ul li ERROR ITEM NOT ADDED if the operation fails because of an operating system failure li ul public void set Items String items check Widget if items null error SWT ERROR NULL ARGUMENT OS Remove Data Browser Items handle OS k Data Browser No Item 0 null 0 if OS Add Data Browser Items handle OS k Data Browser No Item items length null OS k Data Browser Item No Property OS no Err error SWT ERROR ITEM NOT ADDED this items new String items length System arraycopy items 0 this items 0 items length item Count items length  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_ADDED setItems checkWidget ERROR_NULL_ARGUMENT RemoveDataBrowserItems kDataBrowserNoItem AddDataBrowserItems kDataBrowserNoItem kDataBrowserItemNoProperty noErr ERROR_ITEM_NOT_ADDED itemCount
Selects the item at the given zero relative index in the receiver If the item at the index was already selected it remains selected The current selected is first cleared then the new items are selected Indices that are out of range are ignored param index the index of the item to select 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 List deselect All see List select int public void set Selection int index check Widget if style SWT MULTI 0 deselect All set Selection index false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS deselectAll setSelection checkWidget deselectAll setSelection
void set Selection int index boolean notify check Widget if 0 index index item Count int ids new int index 1 select ids ids length true show Index index if notify post Event SWT Selection  setSelection checkWidget itemCount showIndex postEvent
Selects the items in the range specified by the given zero relative indices in the receiver The range of indices is inclusive The current selection is cleared before the new items are selected p Indices that are out of range are ignored and no items will be selected if start is greater than end If the receiver is single select and there is more than one item in the given range then all indices are ignored param start the start index of the items to select param end the end index of the items to select 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 List deselect All see List select int int public void set Selection int start int end check Widget deselect All if end 0 start end style SWT SINGLE 0 start end return if item Count 0 start item Count return start Math max 0 start end Math min end item Count 1 int length end start 1 int ids new int length for int i 0 i length i ids i end i 1 select ids length true if ids length 0 show Index ids 0 1  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS deselectAll setSelection checkWidget deselectAll itemCount itemCount itemCount showIndex
Selects the items at the given zero relative indices in the receiver The current selection is cleared before the new items are selected p Indices that are out of range and duplicate indices are ignored If the receiver is single select and multiple indices are specified then all indices are ignored param indices the indices of the items to select exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the array of indices is null li ul 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 List deselect All see List select int public void set Selection int indices check Widget if indices null error SWT ERROR NULL ARGUMENT deselect All int length indices length if length 0 style SWT SINGLE 0 length 1 return int ids new int length int count 0 for int i 0 i length i int index indices length i 1 if index 0 index item Count ids count index 1 if count 0 select ids count true show Index ids 0 1  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS deselectAll setSelection checkWidget ERROR_NULL_ARGUMENT deselectAll itemCount showIndex
Sets the receiver s selection to be the given array of items The current selection is cleared before the new items are selected p Items that are not in the receiver are ignored If the receiver is single select and multiple items are specified then all items are ignored param items the array of items exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the array of items is null li ul 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 List deselect All see List select int see List set Selection int public void set Selection String items check Widget if items null error SWT ERROR NULL ARGUMENT deselect All int length items length if length 0 style SWT SINGLE 0 length 1 return int count 0 int ids new int length for int i 0 i length i String string items length i 1 if style SWT SINGLE 0 int index index Of string 0 if index 1 count 1 ids new int index 1 else int index 0 while index index Of string index 1 if count ids length int new Ids new int ids length 4 System arraycopy ids 0 new Ids 0 ids length ids new Ids ids count index 1 index if count 0 select ids count true show Index ids 0 1  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS deselectAll setSelection setSelection checkWidget ERROR_NULL_ARGUMENT deselectAll indexOf indexOf newIds newIds newIds showIndex
Sets the zero relative index of the item which is currently at the top of the receiver This index can change when items are scrolled or new items are added and removed param index the index of the top item 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 set Top Index int index check Widget if 0 index index item Count return int top new int 1 left new int 1 OS Get Data Browser Scroll Position handle top left top 0 index get Item Height OS Set Data Browser Scroll Position handle top 0 left 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setTopIndex checkWidget itemCount GetDataBrowserScrollPosition getItemHeight SetDataBrowserScrollPosition
void show Index int index if 0 index index item Count short width new short 1 OS Get Data Browser Table View Named Column Width handle COLUMN ID width Rect rect new Rect inset new Rect OS Get Control Bounds handle rect OS Get Data Browser Scroll Bar Inset handle inset OS Set Data Browser Table View Named Column Width handle COLUMN ID short rect right rect left inset left inset right OS Reveal Data Browser Item handle index 1 COLUMN ID byte OS k Data Browser Reveal Without Selecting OS k Data Browser Reveal And Center In View OS Set Data Browser Table View Named Column Width handle COLUMN ID width 0  showIndex itemCount GetDataBrowserTableViewNamedColumnWidth COLUMN_ID GetControlBounds GetDataBrowserScrollBarInset SetDataBrowserTableViewNamedColumnWidth COLUMN_ID RevealDataBrowserItem COLUMN_ID kDataBrowserRevealWithoutSelecting kDataBrowserRevealAndCenterInView SetDataBrowserTableViewNamedColumnWidth COLUMN_ID
Shows the selection If the selection is already showing in the receiver this method simply returns Otherwise the items are scrolled until the selection is visible 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 show Selection check Widget int index get Selection Index if index 0 show Index index  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS showSelection checkWidget getSelectionIndex showIndex

Constructs a new instance of this class given its parent and sets the style for the instance so that the instance will be a popup menu on the given parent s shell param parent a control which will be the parent of the new instance cannot be null exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT POP UP see Widget check Subclass see Widget get Style public Menu Control parent this check Null parent menu Shell SWT POP UP  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS POP_UP checkSubclass getStyle checkNull menuShell POP_UP
Constructs a new instance of this class given its parent which must be a code Decorations code and a style value describing its behavior and appearance p The style value is either one of the style constants defined in 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 decorations control which will be the parent of the new instance cannot be null param style the style of menu to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT BAR see SWT DROP DOWN see SWT POP UP see Widget check Subclass see Widget get Style public Menu Decorations parent int style super parent check Style style this parent parent create Widget  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS DROP_DOWN POP_UP checkSubclass getStyle checkStyle createWidget
Constructs a new instance of this class given its parent which must be a code Menu code and sets the style for the instance so that the instance will be a drop down menu on the given parent s parent param parent Menu a menu which will be the parent of the new instance cannot be null exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT DROP DOWN see Widget check Subclass see Widget get Style public Menu Menu parent Menu this check Null parent Menu parent SWT DROP DOWN  parentMenu IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS DROP_DOWN checkSubclass getStyle parentMenu checkNull parentMenu DROP_DOWN
Constructs a new instance of this class given its parent which must be a code Menu Item code and sets the style for the instance so that the instance will be a drop down menu on the given parent s parent menu param parent Item a menu item which will be the parent of the new instance cannot be null exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT DROP DOWN see Widget check Subclass see Widget get Style public Menu Menu Item parent Item this check Null parent Item parent  MenuItem parentItem IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS DROP_DOWN checkSubclass getStyle MenuItem parentItem checkNull parentItem
static Control check Null Control control if control null SWT error SWT ERROR NULL ARGUMENT return control  checkNull ERROR_NULL_ARGUMENT
static Menu check Null Menu menu if menu null SWT error SWT ERROR NULL ARGUMENT return menu  checkNull ERROR_NULL_ARGUMENT
static Menu Item check Null Menu Item item if item null SWT error SWT ERROR NULL ARGUMENT return item  MenuItem checkNull MenuItem ERROR_NULL_ARGUMENT
static int check Style int style return check Bits style SWT POP UP SWT BAR SWT DROP DOWN 0 0 0  checkStyle checkBits POP_UP DROP_DOWN
void  setVisible boolean visible if style SWT BAR SWT DROP DOWN 0 return if visible return int left x top y if has Location org eclipse swt internal carbon Point where new org eclipse swt internal carbon Point OS Get Global Mouse where left where h top where v OS Pop Up Menu Select handle short top short left short 1  _setVisible DROP_DOWN hasLocation GetGlobalMouse PopUpMenuSelect
Adds the listener to the collection of listeners who will be notified when help events are generated for the control by sending it one of the messages defined in the code Help Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Help Listener see remove Help Listener public void add Help Listener Help Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Help typed Listener  HelpListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS HelpListener removeHelpListener addHelpListener HelpListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener
Adds the listener to the collection of listeners who will be notified when menus are hidden or shown by sending it one of the messages defined in the code Menu Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Menu Listener see remove Menu Listener public void add Menu Listener Menu Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Hide typed Listener add Listener SWT Show typed Listener  MenuListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS MenuListener removeMenuListener addMenuListener MenuListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener typedListener
void create Handle display add Menu this int out Menu Ref new int 1 OS Create New Menu id 0 out Menu Ref if out Menu Ref 0 0 display remove Menu this error SWT ERROR NO HANDLES handle out Menu Ref 0  createHandle addMenu outMenuRef CreateNewMenu outMenuRef outMenuRef removeMenu ERROR_NO_HANDLES outMenuRef
void create Item Menu Item item int index check Widget int count OS Count Menu Items handle if 0 index index count error SWT ERROR INVALID RANGE int attributes OS k Menu Item Attr Auto Repeat OS k Menu Item Attr Custom Draw if item style SWT SEPARATOR 0 attributes OS k Menu Item Attr Separator int result OS Insert Menu Item Text WithCF String handle 0 short index attributes 0 if result OS no Err error SWT ERROR ITEM NOT ADDED if count items length Menu Item new Items new Menu Item items length 4 System arraycopy items 0 new Items 0 items length items new Items System arraycopy items index items index 1 count index items index item modified true if style SWT BAR 0 Display display get Display short menuID display next Menu Id int out Menu Ref new int 1 if OS Create New Menu menuID 0 out Menu Ref OS no Err error SWT ERROR NO HANDLES OS Set Menu Item Hierarchical Menu handle short index 1 out Menu Ref 0  createItem MenuItem checkWidget CountMenuItems ERROR_INVALID_RANGE kMenuItemAttrAutoRepeat kMenuItemAttrCustomDraw kMenuItemAttrSeparator InsertMenuItemTextWithCFString noErr ERROR_ITEM_NOT_ADDED MenuItem newItems MenuItem newItems newItems getDisplay nextMenuId outMenuRef CreateNewMenu outMenuRef noErr ERROR_NO_HANDLES SetMenuItemHierarchicalMenu outMenuRef
void create Widget check Orientation parent super create Widget items new Menu Item 4  createWidget checkOrientation createWidget MenuItem
void destroy Item Menu Item item int count OS Count Menu Items handle int index 0 while index count if items index item break index if index count return System arraycopy items index 1 items index count index items count null if count 0 items new Menu Item 4 modified true if style SWT BAR 0 int out Menu Ref new int 1 OS Get Menu Item Hierarchical Menu handle out Index 0 out Menu Ref if out Menu Ref 0 0 OS Delete Menu OS Get MenuID out Menu Ref 0 OS Dispose Menu out Menu Ref 0 OS Delete Menu Item handle short index 1  destroyItem MenuItem CountMenuItems MenuItem outMenuRef GetMenuItemHierarchicalMenu outIndex outMenuRef outMenuRef DeleteMenu GetMenuID outMenuRef DisposeMenu outMenuRef DeleteMenuItem
void destroy Widget int the Menu handle release Handle if the Menu 0 OS Delete Menu OS Get MenuID the Menu OS Dispose Menu the Menu  destroyWidget theMenu releaseHandle theMenu DeleteMenu GetMenuID theMenu DisposeMenu theMenu
Returns the default menu item or null if none has been previously set return the default menu item ul 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 Menu Item get Default Item check Widget return default Item  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS MenuItem getDefaultItem checkWidget defaultItem
Returns code true code if the receiver is enabled and code false code otherwise A disabled control is typically not selectable from the user interface and draws with an inactive or grayed look return the receiver s 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 is Enabled public boolean get Enabled check Widget return state DISABLED 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS isEnabled getEnabled checkWidget
Returns the item at the given zero relative index in the receiver Throws an exception if the index is out of range param index the index of the item to return return the item at the given index exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li ul 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 Menu Item get Item int index check Widget int count OS Count Menu Items handle if 0 index index count error SWT ERROR INVALID RANGE return items index  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS MenuItem getItem checkWidget CountMenuItems ERROR_INVALID_RANGE
Returns the number of items contained in the receiver return the number of items 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 int get Item Count check Widget return OS Count Menu Items handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getItemCount checkWidget CountMenuItems
Returns an array of code Menu Item code s which are the items in the receiver p Note This is not the actual structure used by the receiver to maintain its list of items so modifying the array will not affect the receiver p return the items in the receiver 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 Menu Item get Items check Widget int count OS Count Menu Items handle Menu Item result new Menu Item count System arraycopy items 0 result 0 count return result  MenuItem SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS MenuItem getItems checkWidget CountMenuItems MenuItem MenuItem
String get Name Text String result Menu Item items get Items int length items length if length 0 for int i 0 i length 1 i result result items i get Name Text result result items length 1 get Name Text return result  getNameText MenuItem getItems getNameText getNameText
Returns the receiver s parent which must be a code Decorations code return the receiver s parent 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 Decorations get Parent check Widget return parent  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getParent checkWidget
Returns the receiver s parent item which must be a code Menu Item code or null when the receiver is a root return the receiver s parent item 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 Menu Item get Parent Item check Widget return cascade  MenuItem SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS MenuItem getParentItem checkWidget
Returns the receiver s parent item which must be a code Menu code or null when the receiver is a root return the receiver s parent item 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 Menu get Parent Menu check Widget if cascade null return cascade parent return null  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getParentMenu checkWidget
Returns the receiver s shell For all controls other than shells this simply returns the control s nearest ancestor shell Shells return themselves even if they are children of other shells return the receiver s shell 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 get Parent public Shell get Shell check Widget return parent get Shell  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getParent getShell checkWidget getShell
public Point get Size if style SWT BAR 0 int height OS GetM Bar Height int gdevice OS Get Main Device int ptr new int 1 OS memcpy ptr gdevice 4 G Device device new G Device OS memcpy device ptr 0 G Device sizeof return new Point device right device left height int width OS Get Menu Width handle int height OS Get Menu Height handle return new Point width height  getSize GetMBarHeight GetMainDevice GDevice GDevice GDevice GetMenuWidth GetMenuHeight
Returns code true code if the receiver is visible and code false code otherwise p If one of the receiver s ancestors is not visible or some other condition makes the receiver not visible this method may still indicate that it is considered visible even though it may not actually be showing p return the receiver s visibility 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 public boolean get Visible check Widget if style SWT BAR 0 return this parent menu Shell menu Bar if style SWT POP UP 0 Menu popups display popups if popups null return false for int i 0 i popups length i if popups i this return true Menu Tracking Data out Data new Menu Tracking Data return OS Get Menu Tracking Data handle out Data OS no Err  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getVisible checkWidget menuShell menuBar POP_UP MenuTrackingData outData MenuTrackingData GetMenuTrackingData outData noErr
void hook Events super hook Events int menu Proc display menu Proc int mask new int OS k Event Class Menu OS k Event Menu Closed OS k Event Class Menu OS k Event Menu Opening OS k Event Class Menu OS k Event Menu Target Item OS k Event Class Menu OS k Event Menu Measure Item Width OS k Event Class Menu OS k Event Menu Draw Item Content int menu Target OS Get Menu Event Target handle OS Install Event Handler menu Target menu Proc mask length 2 mask 0 null  hookEvents hookEvents menuProc menuProc kEventClassMenu kEventMenuClosed kEventClassMenu kEventMenuOpening kEventClassMenu kEventMenuTargetItem kEventClassMenu kEventMenuMeasureItemWidth kEventClassMenu kEventMenuDrawItemContent menuTarget GetMenuEventTarget InstallEventHandler menuTarget menuProc
int k Event Menu Closed int next Handler int the Event int user Data int result super k Event Menu Closed next Handler the Event user Data if result OS no Err return result closed true send Event SWT Hide return OS event Not Handled Err  kEventMenuClosed nextHandler theEvent userData kEventMenuClosed nextHandler theEvent userData noErr sendEvent eventNotHandledErr
int k Event Menu Draw Item Content int next Handler int the Event int user Data short index new short 1 OS Get Event Parameter the Event OS k Event Param Menu Item Index OS type Menu Item Index null 2 null index Menu Item item items index 0 1 if item accelerator 0 int accel Index item text index Of t if accel Index 1 String accel Text item text substring accel Index 1 int length accel Text length if length 0 int result OS Call Next Event Handler next Handler the Event Rect rect new Rect OS Get Event Parameter the Event OS k Event Param Menu Item Bounds OS typeQD Rectangle null Rect sizeof null rect int context new int 1 OS Get Event Parameter the Event OS k Event ParamCG Context Ref OS typeCG Context Ref null 4 null context Draw the key int modifier Index modifier Index accel Text char buffer new char length modifier Index 1 accel Text get Chars modifier Index 1 length buffer 0 int font OS k Theme Menu Item Font if buffer length 1 font OS k Theme Menu Item Cmd Key Font byte family new byte 256 short size new short 1 byte style new byte 1 OS Get Theme Font short font short OS sm System Script family size style Font Info info new Font Info OS Fetch Font Info family 0 size 0 style 0 info int metric new int 1 OS Get Theme Metric OS k Theme Metric Menu Icon Trailing Edge Margin metric int str OS CF String Create With Characters OS kCF Allocator Default buffer buffer length org eclipse swt internal carbon Point size1 new org eclipse swt internal carbon Point OS Get Theme Text Dimensions str short font 0 false size1 null rect left short rect right Math max info wid Max size1 h metric 0 OS Draw Theme Text Box str short font OS k Theme State Active false rect short OS te Flush Left context 0 OS CF Release str Draw the modifiers if modifier Index 1 buffer new char modifier Index 1 accel Text get Chars 0 buffer length buffer 0 str OS CF String Create With Characters OS kCF Allocator Default buffer buffer length OS Get Theme Text Dimensions str short OS k Theme Menu Item Cmd Key Font 0 false size1 null rect right rect left rect left short rect right size1 h OS Draw Theme Text Box str short OS k Theme Menu Item Cmd Key Font OS k Theme State Active false rect short OS te Flush Left context 0 OS CF Release str return result return OS event Not Handled Err  kEventMenuDrawItemContent nextHandler theEvent userData GetEventParameter theEvent kEventParamMenuItemIndex typeMenuItemIndex MenuItem accelIndex indexOf accelIndex accelText accelIndex accelText CallNextEventHandler nextHandler theEvent GetEventParameter theEvent kEventParamMenuItemBounds typeQDRectangle GetEventParameter theEvent kEventParamCGContextRef typeCGContextRef modifierIndex modifierIndex accelText modifierIndex accelText getChars modifierIndex kThemeMenuItemFont kThemeMenuItemCmdKeyFont GetThemeFont smSystemScript FontInfo FontInfo FetchFontInfo GetThemeMetric kThemeMetricMenuIconTrailingEdgeMargin CFStringCreateWithCharacters kCFAllocatorDefault GetThemeTextDimensions widMax DrawThemeTextBox kThemeStateActive teFlushLeft CFRelease modifierIndex modifierIndex accelText getChars CFStringCreateWithCharacters kCFAllocatorDefault GetThemeTextDimensions kThemeMenuItemCmdKeyFont DrawThemeTextBox kThemeMenuItemCmdKeyFont kThemeStateActive teFlushLeft CFRelease eventNotHandledErr
int k Event Menu Measure Item Width int next Handler int the Event int user Data short index new short 1 OS Get Event Parameter the Event OS k Event Param Menu Item Index OS type Menu Item Index null 2 null index Menu Item item items index 0 1 if item accelerator 0 int accel Index item text index Of t if accel Index 1 String accel Text item text substring accel Index 1 if accel Text length 0 int result OS Call Next Event Handler next Handler the Event char buffer new char accel Text length accel Text get Chars 0 buffer length buffer 0 int str OS CF String Create With Characters OS kCF Allocator Default buffer buffer length org eclipse swt internal carbon Point size new org eclipse swt internal carbon Point OS Get Theme Text Dimensions str short OS k Theme Menu Item Cmd Key Font 0 false size null OS CF Release str short width new short 1 OS Get Event Parameter the Event OS k Event Param Menu Item Width OS typeS Int16 null 2 null width int metric new int 1 OS Get Theme Metric OS k Theme Metric Menu Text Trailing Edge Margin metric width 0 metric 0 size h OS Set Event Parameter the Event OS k Event Param Menu Item Width OS typeS Int16 2 width return result return OS event Not Handled Err  kEventMenuMeasureItemWidth nextHandler theEvent userData GetEventParameter theEvent kEventParamMenuItemIndex typeMenuItemIndex MenuItem accelIndex indexOf accelIndex accelText accelIndex accelText CallNextEventHandler nextHandler theEvent accelText accelText getChars CFStringCreateWithCharacters kCFAllocatorDefault GetThemeTextDimensions kThemeMenuItemCmdKeyFont CFRelease GetEventParameter theEvent kEventParamMenuItemWidth typeSInt16 GetThemeMetric kThemeMetricMenuTextTrailingEdgeMargin SetEventParameter theEvent kEventParamMenuItemWidth typeSInt16 eventNotHandledErr
int k Event Menu Opening int next Handler int the Event int user Data int result super k Event Menu Opening next Handler the Event user Data if result OS no Err return result closed false send Event SWT Show modified false return OS event Not Handled Err  kEventMenuOpening nextHandler theEvent userData kEventMenuOpening nextHandler theEvent userData noErr sendEvent eventNotHandledErr
int k Event Menu Target Item int next Handler int the Event int user Data int result super k Event Menu Target Item next Handler the Event user Data if result OS no Err return result last Target null short index new short 1 if OS Get Event Parameter the Event OS k Event Param Menu Item Index OS type Menu Item Index null 2 null index OS no Err if index 0 0 last Target items index 0 1 if last Target null last Target send Event SWT Arm return OS event Not Handled Err  kEventMenuTargetItem nextHandler theEvent userData kEventMenuTargetItem nextHandler theEvent userData noErr lastTarget GetEventParameter theEvent kEventParamMenuItemIndex typeMenuItemIndex noErr lastTarget lastTarget lastTarget sendEvent eventNotHandledErr
Searches the receiver s list starting at the first item index 0 until an item is found that is equal to the argument and returns the index of that item If no item is found returns 1 param item the search item return the index of the item exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul 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 int index Of Menu Item item check Widget if item null error SWT ERROR NULL ARGUMENT int count OS Count Menu Items handle for int i 0 i count i if items i item return i return 1  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS indexOf MenuItem checkWidget ERROR_NULL_ARGUMENT CountMenuItems
Returns code true code if the receiver is enabled and all of the receiver s ancestors are enabled and code false code otherwise A disabled control is typically not selectable from the user interface and draws with an inactive or grayed look return the receiver s 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 get Enabled public boolean is Enabled check Widget Menu parent Menu get Parent Menu if parent Menu null return get Enabled return get Enabled parent Menu is Enabled  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getEnabled isEnabled checkWidget parentMenu getParentMenu parentMenu getEnabled getEnabled parentMenu isEnabled
Returns code true code if the receiver is visible and all of the receiver s ancestors are visible and code false code otherwise return the receiver s visibility 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 get Visible public boolean is Visible check Widget return get Visible  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getVisible isVisible checkWidget getVisible
int modifier Index String accel Text int start accel Text length 1 int index start while index 0 char c accel Text char At index switch c case if index start return index break case u2303 case u2325 case u21E7 case u2318 return index index return 1  modifierIndex accelText accelText accelText charAt
void release Child super release Child if cascade null cascade set Menu null if style SWT BAR 0 this parent menu Bar parent set Menu Bar null  releaseChild releaseChild setMenu menuBar setMenuBar
void release Handle super release Handle handle 0  releaseHandle releaseHandle
void release Widget int count OS Count Menu Items handle for int i 0 i count i Menu Item item items i if item is Disposed item release Resources items null super release Widget display remove Menu this parent null cascade default Item last Target null  releaseWidget CountMenuItems MenuItem isDisposed releaseResources releaseWidget removeMenu defaultItem lastTarget
Removes the listener from the collection of listeners who will be notified when the help events are generated for the control param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Help Listener see add Help Listener public void remove Help Listener Help Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Help listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS HelpListener addHelpListener removeHelpListener HelpListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable
Removes the listener from the collection of listeners who will be notified when the menu events are generated for the control param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Menu Listener see add Menu Listener public void remove Menu Listener Menu Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Hide listener event Table unhook SWT Show listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS MenuListener addMenuListener removeMenuListener MenuListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable
Sets the default menu item to the argument or removes the default emphasis when the argument is code null code param item the default menu item or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the menu item has been disposed li ul 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 set Default Item Menu Item item check Widget if item null item is Disposed error SWT ERROR INVALID ARGUMENT default Item item  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setDefaultItem MenuItem checkWidget isDisposed ERROR_INVALID_ARGUMENT defaultItem
Enables the receiver if the argument is code true code and disables it otherwise A disabled control is typically not selectable from the user interface and draws with an inactive or grayed look param enabled the new 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 public void set Enabled boolean enabled check Widget if enabled state DISABLED OS Enable Menu Item handle short 0 else state DISABLED OS Disable Menu Item handle short 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setEnabled checkWidget EnableMenuItem DisableMenuItem
Sets the receiver s location to the point specified by the arguments which are relative to the display p Note This is different from most widgets where the location of the widget is relative to the parent p param x the new x coordinate for the receiver param y the new y coordinate for the receiver 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 set Location int x int y check Widget this x x this y y has Location true  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setLocation checkWidget hasLocation
Sets the receiver s location to the point specified by the arguments which are relative to the display p Note This is different from most widgets where the location of the widget is relative to the parent p param location the new location for the receiver exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the point is null li ul 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 since 2 1 public void set Location Point location check Widget if location null error SWT ERROR NULL ARGUMENT set Location location x location y  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setLocation checkWidget ERROR_NULL_ARGUMENT setLocation
Marks the receiver as visible if the argument is code true code and marks it invisible otherwise p If one of the receiver s ancestors is not visible or some other condition makes the receiver not visible marking it visible may not actually cause it to be displayed p param visible the new visibility 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 public void set Visible boolean visible check Widget if style SWT BAR SWT DROP DOWN 0 return if visible display add Popup this else display remove Popup this  setVisible false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setVisible checkWidget DROP_DOWN addPopup removePopup _setVisible

Constructs a new instance of this class given its parent which must be a code Menu code and a style value describing its behavior and appearance The item is added to the end of the items maintained by its parent p The style value is either one of the style constants defined in 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 menu control which will be the parent of the new instance cannot be null param style the style of control to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT CHECK see SWT CASCADE see SWT PUSH see SWT RADIO see SWT SEPARATOR see Widget check Subclass see Widget get Style public Menu Item Menu parent int style super parent check Style style this parent parent parent create Item this parent get Item Count  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle MenuItem checkStyle createItem getItemCount
Constructs a new instance of this class given its parent which must be a code Menu code a style value describing its behavior and appearance and the index at which to place it in the items maintained by its parent p The style value is either one of the style constants defined in 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 menu control which will be the parent of the new instance cannot be null param style the style of control to construct param index the index to store the receiver in its parent exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT CHECK see SWT CASCADE see SWT PUSH see SWT RADIO see SWT SEPARATOR see Widget check Subclass see Widget get Style public Menu Item Menu parent int style int index super parent check Style style this parent parent parent create Item this index  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle MenuItem checkStyle createItem
public void  setEnabled boolean enabled int index parent index Of this if index 1 return int out Menu Ref new int 1 short menu Index short index 1 OS Get Menu Item Hierarchical Menu parent handle menu Index out Menu Ref if enabled if out Menu Ref 0 0 OS Enable Menu Item out Menu Ref 0 short 0 OS Enable Menu Item parent handle menu Index else if out Menu Ref 0 0 OS Disable Menu Item out Menu Ref 0 short 0 OS Disable Menu Item parent handle menu Index  _setEnabled indexOf outMenuRef menuIndex GetMenuItemHierarchicalMenu menuIndex outMenuRef outMenuRef EnableMenuItem outMenuRef EnableMenuItem menuIndex outMenuRef DisableMenuItem outMenuRef DisableMenuItem menuIndex
Adds the listener to the collection of listeners who will be notified when the arm events are generated for the control by sending it one of the messages defined in the code Arm Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Arm Listener see remove Arm Listener public void add Arm Listener Arm Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Arm typed Listener  ArmListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ArmListener removeArmListener addArmListener ArmListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener
Adds the listener to the collection of listeners who will be notified when the help events are generated for the control by sending it one of the messages defined in the code Help Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Help Listener see remove Help Listener public void add Help Listener Help Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Help typed Listener  HelpListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS HelpListener removeHelpListener addHelpListener HelpListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener
Adds the listener to the collection of listeners who will be notified when the control is selected by sending it one of the messages defined in the code Selection Listener code interface p When code widget Selected code is called the state Mask field of the event object is valid code widget Default Selected code is not called p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected stateMask widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
protected void check Subclass if is Valid Subclass error SWT ERROR INVALID SUBCLASS  checkSubclass isValidSubclass ERROR_INVALID_SUBCLASS
static int check Style int style return check Bits style SWT PUSH SWT CHECK SWT RADIO SWT SEPARATOR SWT CASCADE 0  checkStyle checkBits
Return the widget accelerator An accelerator is the bit wise OR of zero or more modifier masks and a key Examples code SWT CONTROL SWT SHIFT T SWT ALT SWT F2 code return the accelerator ul 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 int get Accelerator check Widget return accelerator  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getAccelerator checkWidget
Returns code true code if the receiver is enabled and code false code otherwise A disabled control is typically not selectable from the user interface and draws with an inactive or grayed look return the receiver s 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 is Enabled public boolean get Enabled check Widget return state DISABLED 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS isEnabled getEnabled checkWidget
Returns the receiver s cascade menu if it has one or null if it does not Only code CASCADE code menu items can have a pull down menu The sequence of key strokes button presses and or button releases that are used to request a pull down menu is platform specific return the receiver s menu 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 Menu get Menu check Widget return menu  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMenu checkWidget
String get Name Text if style SWT SEPARATOR 0 return return super get Name Text  getNameText getNameText
Returns the receiver s parent which must be a code Menu code return the receiver s parent 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 Menu get Parent check Widget return parent  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getParent checkWidget
Returns code true code if the receiver is selected and false otherwise p When the receiver is of type code CHECK code or code RADIO code it is selected when it is checked return the selection 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 public boolean get Selection check Widget if style SWT CHECK SWT RADIO 0 return false int index parent index Of this if index 1 return false short out Mark new short 1 OS Get Item Mark parent handle short index 1 out Mark return out Mark 0 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelection checkWidget indexOf outMark GetItemMark outMark outMark
int k Event Process Command int next Handler int the Event int user Data TEMPORARY CODE if is Enabled return OS no Err if style SWT CHECK 0 set Selection get Selection else if style SWT RADIO 0 if parent get Style SWT NO RADIO GROUP 0 set Selection get Selection else select Radio int modifiers new int 1 OS Get Event Parameter the Event OS k Event Param Key Modifiers OS typeU Int32 null 4 null modifiers Event event new Event set Input State event short 0 OS Get Current Event Button State modifiers 0 post Event SWT Selection event return OS no Err  kEventProcessCommand nextHandler theEvent userData isEnabled noErr setSelection getSelection getStyle NO_RADIO_GROUP setSelection getSelection selectRadio GetEventParameter theEvent kEventParamKeyModifiers typeUInt32 setInputState GetCurrentEventButtonState postEvent noErr
Returns code true code if the receiver is enabled and all of the receiver s ancestors are enabled and code false code otherwise A disabled control is typically not selectable from the user interface and draws with an inactive or grayed look return the receiver s 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 get Enabled public boolean is Enabled return get Enabled parent is Enabled  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getEnabled isEnabled getEnabled isEnabled
int key Glyph int key switch key case SWT BS return OS k Menu Delete Left Glyph case SWT CR return OS k Menu Return Glyph case SWT DEL return OS k Menu Delete Right Glyph case SWT ESC return OS k Menu Escape Glyph case SWT LF return OS k Menu Return Glyph case SWT TAB return OS k Menu Tab Right Glyph case return OS k Menu Blank Glyph case return OS k Menu Space Glyph case SWT ALT return OS k Menu Option Glyph case SWT SHIFT return OS k Menu Shift Glyph case SWT CONTROL return OS k Menu ControlISO Glyph case SWT COMMAND return OS k Menu Command Glyph case SWT ARROW UP return OS k Menu Up Arrow Glyph case SWT ARROW DOWN return OS k Menu Down Arrow Glyph case SWT ARROW LEFT return OS k Menu Left Arrow Glyph case SWT ARROW RIGHT return OS k Menu Right Arrow Glyph case SWT PAGE UP return OS k Menu Page Up Glyph case SWT PAGE DOWN return OS k Menu Page Down Glyph case SWT F1 return OS k MenuF1 Glyph case SWT F2 return OS k MenuF2 Glyph case SWT F3 return OS k MenuF3 Glyph case SWT F4 return OS k MenuF4 Glyph case SWT F5 return OS k MenuF5 Glyph case SWT F6 return OS k MenuF6 Glyph case SWT F7 return OS k MenuF7 Glyph case SWT F8 return OS k MenuF8 Glyph case SWT F9 return OS k MenuF9 Glyph case SWT F10 return OS k MenuF10 Glyph case SWT F11 return OS k MenuF11 Glyph case SWT F12 return OS k MenuF12 Glyph return OS k Menu Null Glyph  keyGlyph kMenuDeleteLeftGlyph kMenuReturnGlyph kMenuDeleteRightGlyph kMenuEscapeGlyph kMenuReturnGlyph kMenuTabRightGlyph kMenuBlankGlyph kMenuSpaceGlyph kMenuOptionGlyph kMenuShiftGlyph kMenuControlISOGlyph kMenuCommandGlyph ARROW_UP kMenuUpArrowGlyph ARROW_DOWN kMenuDownArrowGlyph ARROW_LEFT kMenuLeftArrowGlyph ARROW_RIGHT kMenuRightArrowGlyph PAGE_UP kMenuPageUpGlyph PAGE_DOWN kMenuPageDownGlyph kMenuF1Glyph kMenuF2Glyph kMenuF3Glyph kMenuF4Glyph kMenuF5Glyph kMenuF6Glyph kMenuF7Glyph kMenuF8Glyph kMenuF9Glyph kMenuF10Glyph kMenuF11Glyph kMenuF12Glyph kMenuNullGlyph
void release Child super release Child if menu null menu dispose menu null parent destroy Item this  releaseChild releaseChild destroyItem
void release Widget if menu null menu release Widget menu destroy Widget else if parent style SWT BAR 0 short out Index new short 1 if OS Get Ind Menu Item With CommandID parent handle id 1 null out Index OS no Err int out Menu Ref new int 1 OS Get Menu Item Hierarchical Menu parent handle out Index 0 out Menu Ref if out Menu Ref 0 0 OS Delete Menu OS Get MenuID out Menu Ref 0 OS Dispose Menu out Menu Ref 0 menu null super release Widget accelerator 0 if this parent default Item parent default Item null parent null  releaseWidget releaseWidget destroyWidget outIndex GetIndMenuItemWithCommandID outIndex noErr outMenuRef GetMenuItemHierarchicalMenu outIndex outMenuRef outMenuRef DeleteMenu GetMenuID outMenuRef DisposeMenu outMenuRef releaseWidget defaultItem defaultItem
Removes the listener from the collection of listeners who will be notified when the arm events are generated for the control param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Arm Listener see add Arm Listener public void remove Arm Listener Arm Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Arm listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ArmListener addArmListener removeArmListener ArmListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable
Removes the listener from the collection of listeners who will be notified when the help events are generated for the control param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Help Listener see add Help Listener public void remove Help Listener Help Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Help listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS HelpListener addHelpListener removeHelpListener HelpListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable
Removes the listener from the collection of listeners who will be notified when the control is selected param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Selection listener event Table unhook SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable DefaultSelection
void select Radio int index 0 Menu Item items parent get Items while index items length items index this index int i index 1 while i 0 items i set Radio Selection false i int j index 1 while j items length items j set Radio Selection false j set Selection true  selectRadio MenuItem getItems setRadioSelection setRadioSelection setSelection
Sets the widget accelerator An accelerator is the bit wise OR of zero or more modifier masks and a key Examples code SWT MOD1 SWT MOD2 T SWT MOD3 SWT F2 code code SWT CONTROL SWT SHIFT T SWT ALT SWT F2 code param accelerator an integer that is the bit wise OR of masks and a key ul 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 set Accelerator int accelerator check Widget int index parent index Of this if index 1 return boolean update this accelerator 0 accelerator 0 this accelerator 0 accelerator 0 this accelerator accelerator boolean in Set Virtual Key false int in Modifiers OS k Menu No Modifiers in Glyph OS k Menu Null Glyph in Key 0 if accelerator 0 in Key accelerator SWT KEY MASK in Glyph key Glyph in Key int virtual Key Display untranslate Key in Key if in Key virtual Key 49 if virtual Key 0 in Set Virtual Key true in Key virtual Key else in Key Character to Upper Case char in Key in Modifiers byte OS k Menu No Command Modifier if accelerator SWT SHIFT 0 in Modifiers OS k Menu Shift Modifier if accelerator SWT CONTROL 0 in Modifiers OS k Menu Control Modifier if accelerator SWT COMMAND 0 in Modifiers OS k Menu No Command Modifier if accelerator SWT ALT 0 in Modifiers OS k Menu Option Modifier short menu Index short index 1 OS Set Menu Item Modifiers parent handle menu Index byte in Modifiers OS Set Menu Item Command Key parent handle menu Index in Set Virtual Key char in Key OS Set Menu Item Key Glyph parent handle menu Index short in Glyph if update update Text menu Index  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setAccelerator checkWidget indexOf inSetVirtualKey inModifiers kMenuNoModifiers inGlyph kMenuNullGlyph inKey inKey KEY_MASK inGlyph keyGlyph inKey virtualKey untranslateKey inKey inKey virtualKey virtualKey inSetVirtualKey inKey virtualKey inKey toUpperCase inKey inModifiers kMenuNoCommandModifier inModifiers kMenuShiftModifier inModifiers kMenuControlModifier inModifiers kMenuNoCommandModifier inModifiers kMenuOptionModifier menuIndex SetMenuItemModifiers menuIndex inModifiers SetMenuItemCommandKey menuIndex inSetVirtualKey inKey SetMenuItemKeyGlyph menuIndex inGlyph updateText menuIndex
Enables the receiver if the argument is code true code and disables it otherwise A disabled control is typically not selectable from the user interface and draws with an inactive or grayed look param enabled the new 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 public void set Enabled boolean enabled check Widget if enabled state DISABLED else state DISABLED  setEnabled enabled  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setEnabled checkWidget _setEnabled
Sets the image the receiver will display to the argument p Note This feature is not available on all window systems for example Window NT in which case calling this method will silently do nothing param image the image to display 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 set Image Image image check Widget if style SWT SEPARATOR 0 return int index parent index Of this if index 1 return super set Image image int image Handle image null image handle 0 byte type image null byte OS k MenuCG Image Ref Type byte OS k Menu No Icon OS Set Menu Item Icon Handle parent handle short index 1 type image Handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setImage checkWidget indexOf setImage imageHandle kMenuCGImageRefType kMenuNoIcon SetMenuItemIconHandle imageHandle
Sets the receiver s pull down menu to the argument Only code CASCADE code menu items can have a pull down menu The sequence of key strokes button presses and or button releases that are used to request a pull down menu is platform specific param menu the new pull down menu exception Illegal Argument Exception ul li ERROR MENU NOT DROP DOWN if the menu is not a drop down menu li li ERROR MENUITEM NOT CASCADE if the menu item is not a code CASCADE code li li ERROR INVALID ARGUMENT if the menu has been disposed li li ERROR INVALID PARENT if the menu is not in the same widget tree li ul 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 set Menu Menu menu check Widget Check to make sure the new menu is valid if style SWT CASCADE 0 error SWT ERROR MENUITEM NOT CASCADE if menu null if menu is Disposed error SWT ERROR INVALID ARGUMENT if menu style SWT DROP DOWN 0 error SWT ERROR MENU NOT DROP DOWN if menu parent parent parent error SWT ERROR INVALID PARENT Assign the new menu Menu old Menu this menu if old Menu menu return if old Menu null old Menu cascade null this menu menu Update the menu in the OS int index parent index Of this if index 1 return short menu Index short index 1 int out Menu Ref new int 1 if menu null if parent style SWT BAR 0 Display display get Display short menuID display next Menu Id if OS Create New Menu menuID 0 out Menu Ref OS no Err error SWT ERROR NO HANDLES else menu cascade this if parent style SWT BAR 0 if old Menu null OS Get Menu Item Hierarchical Menu parent handle out Index 0 out Menu Ref if out Menu Ref 0 0 OS Delete Menu OS Get MenuID out Menu Ref 0 OS Dispose Menu out Menu Ref 0 out Menu Ref 0 menu handle int out String new int 1 if OS Copy Menu Item Text AsCF String parent handle menu Index out String OS no Err error SWT ERROR CANNOT SET MENU OS Set Menu Title WithCF String out Menu Ref 0 out String 0 OS CF Release out String 0 if OS Set Menu Item Hierarchical Menu parent handle menu Index out Menu Ref 0 OS no Err error SWT ERROR CANNOT SET MENU  IllegalArgumentException ERROR_MENU_NOT_DROP_DOWN ERROR_MENUITEM_NOT_CASCADE ERROR_INVALID_ARGUMENT ERROR_INVALID_PARENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMenu checkWidget ERROR_MENUITEM_NOT_CASCADE isDisposed ERROR_INVALID_ARGUMENT DROP_DOWN ERROR_MENU_NOT_DROP_DOWN ERROR_INVALID_PARENT oldMenu oldMenu oldMenu oldMenu indexOf menuIndex outMenuRef getDisplay nextMenuId CreateNewMenu outMenuRef noErr ERROR_NO_HANDLES oldMenu GetMenuItemHierarchicalMenu outIndex outMenuRef outMenuRef DeleteMenu GetMenuID outMenuRef DisposeMenu outMenuRef outMenuRef outString CopyMenuItemTextAsCFString menuIndex outString noErr ERROR_CANNOT_SET_MENU SetMenuTitleWithCFString outMenuRef outString CFRelease outString SetMenuItemHierarchicalMenu menuIndex outMenuRef noErr ERROR_CANNOT_SET_MENU
boolean set Radio Selection boolean value if style SWT RADIO 0 return false if get Selection value set Selection value post Event SWT Selection return true  setRadioSelection getSelection setSelection postEvent
Sets the selection state of the receiver p When the receiver is of type code CHECK code or code RADIO code it is selected when it is checked param selected the new selection 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 public void set Selection boolean selected check Widget if style SWT CHECK SWT RADIO 0 return int index parent index Of this if index 1 return int in Mark selected style SWT RADIO 0 OS diamond Mark OS check Mark 0 OS Set Item Mark parent handle short index 1 short in Mark  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget indexOf inMark diamondMark checkMark SetItemMark inMark
Sets the receiver s text The string may include the mnemonic character and accelerator text p Mnemonics are indicated by an amp that causes the next character to be the mnemonic When the user presses a key sequence that matches the mnemonic a selection event occurs On most platforms the mnemonic appears underlined but may be emphasised in a platform specific manner The mnemonic indicator character amp can be escaped by doubling it in the string causing a single amp to be displayed p p Accelerator text is indicated by the t character On platforms that support accelerator text the text that follows the t character is displayed to the user typically indicating the key stroke that will cause the item to become selected On most platforms the accelerator text appears right aligned in the menu Setting the accelerator text does not install the accelerator key sequence The accelerator key sequence is installed using set Accelerator p param string the new text exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the text is null li ul 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 set Accelerator public void set Text String string check Widget if string null error SWT ERROR NULL ARGUMENT if style SWT SEPARATOR 0 return int index parent index Of this if index 1 return super set Text string update Text short index 1  setAccelerator IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setAccelerator setText checkWidget ERROR_NULL_ARGUMENT indexOf setText updateText
void update Text short menu Index if style SWT SEPARATOR 0 return char buffer new char text length text get Chars 0 buffer length buffer 0 int i 0 j 0 while i buffer length if buffer i t break if buffer j buffer i if i buffer length continue if buffer i i continue j int str OS CF String Create With Characters OS kCF Allocator Default buffer j if str 0 error SWT ERROR CANNOT SET TEXT OS Set Menu Item Text WithCF String parent handle menu Index str int out Hier Menu new int 1 OS Get Menu Item Hierarchical Menu parent handle menu Index out Hier Menu if out Hier Menu 0 0 OS Set Menu Title WithCF String out Hier Menu 0 str OS CF Release str  updateText menuIndex getChars CFStringCreateWithCharacters kCFAllocatorDefault ERROR_CANNOT_SET_TEXT SetMenuItemTextWithCFString menuIndex outHierMenu GetMenuItemHierarchicalMenu menuIndex outHierMenu outHierMenu SetMenuTitleWithCFString outHierMenu CFRelease

Constructs a new instance of this class given only its parent param parent a shell which will be the parent of the new instance exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul public Message Box Shell parent this parent SWT OK SWT ICON INFORMATION SWT APPLICATION MODAL  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS MessageBox ICON_INFORMATION APPLICATION_MODAL
Constructs a new instance of this class 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 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 param parent a shell which will be the parent of the new instance param style the style of dialog to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul public Message Box Shell parent int style super parent check Style style check Subclass  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS MessageBox checkStyle checkSubclass
static int check Style int style if style SWT PRIMARY MODAL SWT APPLICATION MODAL SWT SYSTEM MODAL 0 style SWT APPLICATION MODAL int mask SWT YES SWT NO SWT OK SWT CANCEL SWT ABORT SWT RETRY SWT IGNORE int bits style mask if bits SWT OK bits SWT CANCEL bits SWT OK SWT CANCEL return style if bits SWT YES bits SWT NO bits SWT YES SWT NO bits SWT YES SWT NO SWT CANCEL return style if bits SWT RETRY SWT CANCEL bits SWT ABORT SWT RETRY SWT IGNORE return style style style mask SWT OK return style  checkStyle PRIMARY_MODAL APPLICATION_MODAL SYSTEM_MODAL APPLICATION_MODAL
int createCF String String id String string SWT get Message id char buffer new char string length string get Chars 0 buffer length buffer 0 return OS CF String Create With Characters OS kCF Allocator Default buffer buffer length  createCFString getMessage getChars CFStringCreateWithCharacters kCFAllocatorDefault
Returns the dialog s message which is a description of the purpose for which it was opened This message will be visible on the dialog while it is open return the message public String get Message return message  getMessage
Makes the dialog visible and brings it to the front of the display return the ID of the button that was selected to dismiss the message box e g SWT OK SWT CANCEL etc exception SWT Exception ul li ERROR WIDGET DISPOSED if the dialog has been disposed li li ERROR THREAD INVALID ACCESS if not called from the thread that created the dialog li ul public int open int alert Type OS k Alert Plain Alert if style SWT ICON ERROR 0 alert Type OS k Alert Stop Alert if style SWT ICON INFORMATION 0 alert Type OS k Alert Note Alert if style SWT ICON QUESTION 0 alert Type OS k Alert Note Alert if style SWT ICON WARNING 0 alert Type OS k Alert Caution Alert if style SWT ICON WORKING 0 alert Type OS k Alert Note Alert int error 0 int explanation 0 String error String title title message message null String explanation String title null message message null if error String null char buffer new char error String length error String get Chars 0 buffer length buffer 0 error OS CF String Create With Characters OS kCF Allocator Default buffer buffer length if explanation String null char buffer new char explanation String length explanation String get Chars 0 buffer length buffer 0 explanation OS CF String Create With Characters OS kCF Allocator Default buffer buffer length Alert StdCF String Alert Param Rec param new Alert StdCF String Alert Param Rec param version OS k StdCF String Alert Version One param position short OS k Window Alert Position Parent Window Screen int default Str 0 cancel Str 0 other Str 0 int mask SWT YES SWT NO SWT OK SWT CANCEL SWT ABORT SWT RETRY SWT IGNORE int bits style mask switch bits case SWT OK param default Button short OS k Alert Std AlertOK Button param default Text OS k Alert DefaultOK Text break case SWT CANCEL param default Button short OS k Alert Std AlertOK Button param default Text default Str createCF String SWT Cancel break case SWT OK SWT CANCEL param default Button short OS k Alert Std AlertOK Button param default Text OS k Alert DefaultOK Text param cancel Button short OS k Alert Std Alert Cancel Button param cancel Text OS k Alert Default Cancel Text break case SWT YES param default Button short OS k Alert Std AlertOK Button param default Text default Str createCF String SWT Yes break case SWT NO param cancel Button short OS k Alert Std AlertOK Button param cancel Text default Str createCF String SWT No break case SWT YES SWT NO param default Button short OS k Alert Std AlertOK Button param default Text default Str createCF String SWT Yes param cancel Button short OS k Alert Std Alert Cancel Button param cancel Text cancel Str createCF String SWT No break case SWT YES SWT NO SWT CANCEL param default Button short OS k Alert Std AlertOK Button param default Text default Str createCF String SWT Yes param other Text cancel Str createCF String SWT No param cancel Button short OS k Alert Std Alert Cancel Button param cancel Text OS k Alert Default Cancel Text break case SWT RETRY SWT CANCEL param default Button short OS k Alert Std AlertOK Button param default Text default Str createCF String SWT Retry param cancel Button short OS k Alert Std Alert Cancel Button param cancel Text OS k Alert Default Cancel Text break case SWT ABORT SWT RETRY SWT IGNORE param default Button short OS k Alert Std AlertOK Button param default Text default Str createCF String SWT Abort param other Text cancel Str createCF String SWT Retry param cancel Button short OS k Alert Std Alert Cancel Button param cancel Text other Str createCF String SWT Ignore break int dialog Ref new int 1 OS Create Standard Alert short alert Type error explanation param dialog Ref if error 0 OS CF Release error if explanation 0 OS CF Release explanation if default Str 0 OS CF Release default Str if cancel Str 0 OS CF Release cancel Str if other Str 0 OS CF Release other Str if dialog Ref 0 0 short out Item Hit new short 1 OS Run Standard Alert dialog Ref 0 0 out Item Hit if out Item Hit 0 0 switch bits case SWT OK return SWT OK case SWT CANCEL return SWT CANCEL case SWT OK SWT CANCEL if out Item Hit 0 OS k Alert Std AlertOK Button return SWT OK return SWT CANCEL case SWT YES return SWT YES case SWT NO return SWT NO case SWT YES SWT NO if out Item Hit 0 OS k Alert Std AlertOK Button return SWT YES return SWT NO case SWT YES SWT NO SWT CANCEL if out Item Hit 0 OS k Alert Std AlertOK Button return SWT YES if out Item Hit 0 OS k Alert Std Alert Other Button return SWT NO return SWT CANCEL case SWT RETRY SWT CANCEL if out Item Hit 0 OS k Alert Std AlertOK Button return SWT RETRY return SWT CANCEL case SWT ABORT SWT RETRY SWT IGNORE if out Item Hit 0 OS k Alert Std AlertOK Button return SWT ABORT if out Item Hit 0 OS k Alert Std Alert Other Button return SWT RETRY return SWT IGNORE return SWT CANCEL  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS alertType kAlertPlainAlert ICON_ERROR alertType kAlertStopAlert ICON_INFORMATION alertType kAlertNoteAlert ICON_QUESTION alertType kAlertNoteAlert ICON_WARNING alertType kAlertCautionAlert ICON_WORKING alertType kAlertNoteAlert errorString explanationString errorString errorString errorString getChars CFStringCreateWithCharacters kCFAllocatorDefault explanationString explanationString explanationString getChars CFStringCreateWithCharacters kCFAllocatorDefault AlertStdCFStringAlertParamRec AlertStdCFStringAlertParamRec kStdCFStringAlertVersionOne kWindowAlertPositionParentWindowScreen defaultStr cancelStr otherStr defaultButton kAlertStdAlertOKButton defaultText kAlertDefaultOKText defaultButton kAlertStdAlertOKButton defaultText defaultStr createCFString SWT_Cancel defaultButton kAlertStdAlertOKButton defaultText kAlertDefaultOKText cancelButton kAlertStdAlertCancelButton cancelText kAlertDefaultCancelText defaultButton kAlertStdAlertOKButton defaultText defaultStr createCFString SWT_Yes cancelButton kAlertStdAlertOKButton cancelText defaultStr createCFString SWT_No defaultButton kAlertStdAlertOKButton defaultText defaultStr createCFString SWT_Yes cancelButton kAlertStdAlertCancelButton cancelText cancelStr createCFString SWT_No defaultButton kAlertStdAlertOKButton defaultText defaultStr createCFString SWT_Yes otherText cancelStr createCFString SWT_No cancelButton kAlertStdAlertCancelButton cancelText kAlertDefaultCancelText defaultButton kAlertStdAlertOKButton defaultText defaultStr createCFString SWT_Retry cancelButton kAlertStdAlertCancelButton cancelText kAlertDefaultCancelText defaultButton kAlertStdAlertOKButton defaultText defaultStr createCFString SWT_Abort otherText cancelStr createCFString SWT_Retry cancelButton kAlertStdAlertCancelButton cancelText otherStr createCFString SWT_Ignore dialogRef CreateStandardAlert alertType dialogRef CFRelease CFRelease defaultStr CFRelease defaultStr cancelStr CFRelease cancelStr otherStr CFRelease otherStr dialogRef outItemHit RunStandardAlert dialogRef outItemHit outItemHit outItemHit kAlertStdAlertOKButton outItemHit kAlertStdAlertOKButton outItemHit kAlertStdAlertOKButton outItemHit kAlertStdAlertOtherButton outItemHit kAlertStdAlertOKButton outItemHit kAlertStdAlertOKButton outItemHit kAlertStdAlertOtherButton
Sets the dialog s message which is a description of the purpose for which it was opened This message will be visible on the dialog while it is open param string the message exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul public void set Message String string if string null error SWT ERROR NULL ARGUMENT message string  IllegalArgumentException ERROR_NULL_ARGUMENT setMessage ERROR_NULL_ARGUMENT

Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT SMOOTH see SWT HORIZONTAL see SWT VERTICAL see Widget check Subclass see Widget get Style public Progress Bar Composite parent int style super parent check Style style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle ProgressBar checkStyle
static int check Style int style style SWT NO FOCUS return check Bits style SWT HORIZONTAL SWT VERTICAL 0 0 0 0  checkStyle NO_FOCUS checkBits
public Point compute Size int w Hint int h Hint boolean changed check Widget int out Metric new int 1 OS Get Theme Metric OS k Theme Metric Normal Progress Bar Thickness out Metric int width 0 height 0 if style SWT HORIZONTAL 0 height out Metric 0 width height 10 else width out Metric 0 height width 10 if w Hint SWT DEFAULT width w Hint if h Hint SWT DEFAULT height h Hint return new Point width height  computeSize wHint hHint checkWidget outMetric GetThemeMetric kThemeMetricNormalProgressBarThickness outMetric outMetric outMetric wHint wHint hHint hHint
void create Handle int out Control new int 1 int window OS Get Control Owner parent handle OS Create Progress Bar Control window null 0 0 100 style SWT INDETERMINATE 0 out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0  createHandle outControl GetControlOwner CreateProgressBarControl outControl outControl ERROR_NO_HANDLES outControl
void draw Background int control draw Background control background  drawBackground drawBackground
Returns the maximum value which the receiver will allow return the maximum 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 int get Maximum check Widget return OS Get Control32 Bit Maximum handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMaximum checkWidget GetControl32BitMaximum
Returns the minimum value which the receiver will allow return the minimum 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 int get Minimum check Widget return OS Get Control32 Bit Minimum handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMinimum checkWidget GetControl32BitMinimum
Returns the single em selection em that is the receiver s position return the selection 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 int get Selection check Widget return OS Get Control32 Bit Value handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelection checkWidget GetControl32BitValue
Sets the maximum value that the receiver will allow This new value will be ignored if it is not greater than the receiver s current minimum value If the new maximum is applied then the receiver s selection value will be adjusted if necessary to fall within its new range param value the new maximum which must be greater than the current minimum 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 set Maximum int value check Widget if value 0 return int minimum OS Get Control32 Bit Minimum handle if value minimum OS Set Control32 Bit Maximum handle value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMaximum checkWidget GetControl32BitMinimum SetControl32BitMaximum
Sets the minimum value that the receiver will allow This new value will be ignored if it is negative or is not less than the receiver s current maximum value If the new minimum is applied then the receiver s selection value will be adjusted if necessary to fall within its new range param value the new minimum which must be nonnegative and less than the current maximum 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 set Minimum int value check Widget if value 0 return int maximum OS Get Control32 Bit Maximum handle if value maximum OS Set Control32 Bit Minimum handle value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMinimum checkWidget GetControl32BitMaximum SetControl32BitMinimum
Sets the single em selection em that is the receiver s position to the argument which must be greater than or equal to zero param value the new selection must be zero or greater 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 set Selection int value check Widget OS Set Control32 Bit Value handle value Feature in the Macintosh Progress bars are always updated using an event loop timer even when they are not indeterminate This means that nothing is drawn until the event loop The fix is to allow operating system timers to run without dispatching any other events display run Event Loop Timers  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget SetControl32BitValue runEventLoopTimers

Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT HORIZONTAL see SWT VERTICAL see Widget check Subclass see Widget get Style public Sash Composite parent int style super parent check Style style int cursor Style style SWT VERTICAL 0 SWT CURSOR SIZEWE SWT CURSOR SIZENS size Cursor new Cursor display cursor Style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle checkStyle cursorStyle CURSOR_SIZEWE CURSOR_SIZENS sizeCursor cursorStyle
Adds the listener to the collection of listeners who will be notified when the control is selected by sending it one of the messages defined in the code Selection Listener code interface p When code widget Selected code is called the x y width and height fields of the event object are valid If the reciever is being dragged the event object detail field contains the value code SWT DRAG code code widget Default Selected code is not called p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
static int check Style int style return check Bits style SWT HORIZONTAL SWT VERTICAL 0 0 0 0  checkStyle checkBits
public Point compute Size int w Hint int h Hint boolean changed check Widget int width 0 height 0 if style SWT HORIZONTAL 0 width DEFAULT WIDTH height 5 else width 5 height DEFAULT HEIGHT if w Hint SWT DEFAULT width w Hint if h Hint SWT DEFAULT height h Hint return new Point width height  computeSize wHint hHint checkWidget DEFAULT_WIDTH DEFAULT_HEIGHT wHint wHint hHint hHint
void create Handle int features OS k Control Supports Focus int out Control new int 1 int window OS Get Control Owner parent handle OS Create User Pane Control window null features out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0  createHandle kControlSupportsFocus outControl GetControlOwner CreateUserPaneControl outControl outControl ERROR_NO_HANDLES outControl
void draw Background int control draw Background control background  drawBackground drawBackground
int k Event Control Click int next Handler int the Event int user Data int result super k Event Control Click next Handler the Event user Data if result OS no Err return result if is Enabled return OS no Err return result  kEventControlClick nextHandler theEvent userData kEventControlClick nextHandler theEvent userData noErr isEnabled noErr
int k Event Control Set Cursor int next Handler int the Event int user Data int result super k Event Control Set Cursor next Handler the Event user Data if result OS no Err return result display set Cursor size Cursor handle return OS no Err  kEventControlSetCursor nextHandler theEvent userData kEventControlSetCursor nextHandler theEvent userData noErr setCursor sizeCursor noErr
int k Event Mouse Down int next Handler int the Event int user Data int result super k Event Mouse Down next Handler the Event user Data if result OS no Err return result Rect rect new Rect OS Get Control Bounds handle rect int startX rect left int startY rect top int width rect right rect left int height rect bottom rect top OS Get Control Bounds parent handle rect Event event new Event event x startX rect left event y startY rect top event width width event height height send Event SWT Selection event if is Disposed return result if event doit return result int sizeof org eclipse swt internal carbon Point sizeof org eclipse swt internal carbon Point pt new org eclipse swt internal carbon Point OS Get Event Parameter the Event OS k Event Param Mouse Location OS typeQD Point null sizeof null pt int window OS Get Control Owner handle OS Get Window Bounds window short OS k Window Content Rgn rect int offsetX pt h rect left int offsetY pt v rect top OS Get Control Bounds handle rect offsetX rect left offsetY rect top int port OS Get Window Port window int out Modifiers new int 1 short out Result new short 1 org eclipse swt internal carbon Point out Pt new org eclipse swt internal carbon Point while out Result 0 OS k Mouse Tracking Mouse Up OS Track Mouse Location With Options port 0 OS k Event Duration Forever out Pt out Modifiers out Result switch out Result 0 case OS k Mouse Tracking Mouse Down case OS k Mouse Tracking Mouse Up case OS k Mouse Tracking Mouse Dragged OS Get Control Bounds parent handle rect int x out Pt h rect left int y out Pt v rect top int newX startX newY startY if style SWT VERTICAL 0 int client Width rect right rect left newX Math min Math max 0 x offsetX client Width width else int client Height rect bottom rect top newY Math min Math max 0 y offsetY client Height height event new Event event x newX event y newY event width width event height height event detail 0 out Result 0 OS k Mouse Tracking Mouse Dragged SWT DRAG 0 send Event SWT Selection event if is Disposed return result if event doit set Bounds event x event y width height Shell shell parent get Shell shell update true break default out Result 0 OS k Mouse Tracking Mouse Up break return result  kEventMouseDown nextHandler theEvent userData kEventMouseDown nextHandler theEvent userData noErr GetControlBounds GetControlBounds sendEvent isDisposed GetEventParameter theEvent kEventParamMouseLocation typeQDPoint GetControlOwner GetWindowBounds kWindowContentRgn GetControlBounds GetWindowPort outModifiers outResult outPt outResult kMouseTrackingMouseUp TrackMouseLocationWithOptions kEventDurationForever outPt outModifiers outResult outResult kMouseTrackingMouseDown kMouseTrackingMouseUp kMouseTrackingMouseDragged GetControlBounds outPt outPt clientWidth clientWidth clientHeight clientHeight outResult kMouseTrackingMouseDragged sendEvent isDisposed setBounds getShell outResult kMouseTrackingMouseUp
int k Event Control Set Focus Part int next Handler int the Event int user Data int result super k Event Control Set Focus Part next Handler the Event user Data if result OS no Err return result Point location get Location lastX location x lastY location y return OS no Err  kEventControlSetFocusPart nextHandler theEvent userData kEventControlSetFocusPart nextHandler theEvent userData noErr getLocation noErr
int k Event Text Input Unicode For Key Event int next Handler int the Event int user Data int result super k Event Text Input Unicode For Key Event next Handler the Event user Data if result OS no Err return result int keyboard Event new int 1 OS Get Event Parameter the Event OS k Event Param Text Input Send Keyboard Event OS type Event Ref null keyboard Event length 4 null keyboard Event int key Code new int 1 OS Get Event Parameter keyboard Event 0 OS k Event Param Key Code OS typeU Int32 null key Code length 4 null key Code switch key Code 0 case 126 Up arrow case 123 Left arrow case 125 Down arrow case 124 Right arrow int x Change 0 y Change 0 int step Size PAGE INCREMENT int modifiers new int 1 OS Get Event Parameter the Event OS k Event Param Key Modifiers OS typeU Int32 null 4 null modifiers if modifiers 0 OS control Key 0 step Size INCREMENT if style SWT VERTICAL 0 if key Code 0 126 key Code 0 125 break x Change key Code 0 123 step Size step Size else if key Code 0 123 key Code 0 124 break y Change key Code 0 126 step Size step Size Rectangle bounds get Bounds int width bounds width height bounds height Rectangle parent Bounds parent get Bounds int parent Width parent Bounds width int parent Height parent Bounds height int newX lastX newY lastY if style SWT VERTICAL 0 newX Math min Math max 0 lastX x Change startX parent Width width else newY Math min Math max 0 lastY y Change startY parent Height height if newX lastX newY lastY return result The event must be sent because its doit flag is used Event event new Event event x newX event y newY event width width event height height send Event SWT Selection event It is possible but unlikely that client code could have disposed the widget in the selection event If this happens end the processing of this message by returning if is Disposed break if event doit lastX event x lastY event y Adjust the pointer position int cursorX newX int cursorY newY if style SWT VERTICAL 0 cursorY height 2 else cursorX width 2 display set Cursor Location parent to Display cursorX cursorY break return result  kEventTextInputUnicodeForKeyEvent nextHandler theEvent userData kEventTextInputUnicodeForKeyEvent nextHandler theEvent userData noErr keyboardEvent GetEventParameter theEvent kEventParamTextInputSendKeyboardEvent typeEventRef keyboardEvent keyboardEvent keyCode GetEventParameter keyboardEvent kEventParamKeyCode typeUInt32 keyCode keyCode keyCode xChange yChange stepSize PAGE_INCREMENT GetEventParameter theEvent kEventParamKeyModifiers typeUInt32 controlKey stepSize keyCode keyCode xChange keyCode stepSize stepSize keyCode keyCode yChange keyCode stepSize stepSize getBounds parentBounds getBounds parentWidth parentBounds parentHeight parentBounds xChange parentWidth yChange parentHeight sendEvent isDisposed setCursorLocation toDisplay
void release Widget super release Widget if size Cursor null size Cursor dispose size Cursor null  releaseWidget releaseWidget sizeCursor sizeCursor sizeCursor
Removes the listener from the collection of listeners who will be notified when the control is selected param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Selection listener event Table unhook SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable DefaultSelection
int traversal Code int key int the Event return 0  traversalCode theEvent

Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT HORIZONTAL see SWT VERTICAL see Widget check Subclass see Widget get Style public Scale Composite parent int style super parent check Style style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle checkStyle
int action Proc int the Control int part Code send Event SWT Selection Shell shell get Shell shell update true return 0  actionProc theControl partCode sendEvent getShell
Adds the listener to the collection of listeners who will be notified when the receiver s value changes by sending it one of the messages defined in the code Selection Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
static int check Style int style return check Bits style SWT HORIZONTAL SWT VERTICAL 0 0 0 0  checkStyle checkBits
public Point compute Size int w Hint int h Hint boolean changed check Widget int width 0 height 0 if style SWT HORIZONTAL 0 int out Metric new int 1 OS Get Theme Metric OS k Theme MetricH Slider Height out Metric height out Metric 0 width height 10 else int out Metric new int 1 OS Get Theme Metric OS k Theme MetricV Slider Width out Metric width out Metric 0 height width 10 if w Hint SWT DEFAULT width w Hint if h Hint SWT DEFAULT height h Hint return new Point width height  computeSize wHint hHint checkWidget outMetric GetThemeMetric kThemeMetricHSliderHeight outMetric outMetric outMetric GetThemeMetric kThemeMetricVSliderWidth outMetric outMetric wHint wHint hHint hHint
void create Handle int action Proc display action Proc int out Control new int 1 int window OS Get Control Owner parent handle OS Create Slider Control window null 0 0 100 OS k Control Slider Does Not Point short 0 true action Proc out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0  createHandle actionProc actionProc outControl GetControlOwner CreateSliderControl kControlSliderDoesNotPoint actionProc outControl outControl ERROR_NO_HANDLES outControl
Returns the amount that the receiver s value will be modified by when the up down or right left arrows are pressed return the increment 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 int get Increment check Widget return increment  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getIncrement checkWidget
Returns the maximum value which the receiver will allow return the maximum 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 int get Maximum check Widget return OS Get Control32 Bit Maximum handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMaximum checkWidget GetControl32BitMaximum
Returns the minimum value which the receiver will allow return the minimum 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 int get Minimum check Widget return OS Get Control32 Bit Minimum handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMinimum checkWidget GetControl32BitMinimum
Returns the amount that the receiver s value will be modified by when the page increment decrement areas are selected return the page increment 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 int get Page Increment check Widget return page Increment  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getPageIncrement checkWidget pageIncrement
Returns the single em selection em that is the receiver s position return the selection 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 int get Selection check Widget return OS Get Control32 Bit Value handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelection checkWidget GetControl32BitValue
Removes the listener from the collection of listeners who will be notified when the receiver s value changes param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Selection listener event Table unhook SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable DefaultSelection
Sets the amount that the receiver s value will be modified by when the up down or right left arrows are pressed to the argument which must be at least one param increment the new increment must be greater than zero 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 set Increment int value check Widget if value 1 return increment value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setIncrement checkWidget
Sets the maximum value that the receiver will allow This new value will be ignored if it is not greater than the receiver s current minimum value If the new maximum is applied then the receiver s selection value will be adjusted if necessary to fall within its new range param value the new maximum which must be greater than the current minimum 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 set Maximum int value check Widget if value 0 return int minimum OS Get Control32 Bit Minimum handle if value minimum OS Set Control32 Bit Maximum handle value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMaximum checkWidget GetControl32BitMinimum SetControl32BitMaximum
Sets the minimum value that the receiver will allow This new value will be ignored if it is negative or is not less than the receiver s current maximum value If the new minimum is applied then the receiver s selection value will be adjusted if necessary to fall within its new range param value the new minimum which must be nonnegative and less than the current maximum 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 set Minimum int value check Widget if value 0 return int maximum OS Get Control32 Bit Maximum handle if value maximum OS Set Control32 Bit Minimum handle value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMinimum checkWidget GetControl32BitMaximum SetControl32BitMinimum
Sets the amount that the receiver s value will be modified by when the page increment decrement areas are selected to the argument which must be at least one param page Increment the page increment must be greater than zero 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 set Page Increment int value check Widget if value 1 return page Increment value  pageIncrement SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setPageIncrement checkWidget pageIncrement
Sets the single em selection em that is the receiver s value to the argument which must be greater than or equal to zero param value the new selection must be zero or greater 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 set Selection int value check Widget OS Set Control32 Bit Value handle value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget SetControl32BitValue

Scroll Bar horizontal Bar vertical Bar Scrollable Do nothing  ScrollBar horizontalBar verticalBar
Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT H SCROLL see SWT V SCROLL see Widget check Subclass see Widget get Style public Scrollable Composite parent int style super parent style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS H_SCROLL V_SCROLL checkSubclass getStyle
Given a desired em client area em for the receiver as described by the arguments returns the bounding rectangle which would be required to produce that client area p In other words it returns a rectangle such that if the receiver s bounds were set to that rectangle the area of the receiver which is capable of displaying data that is not covered by the trimmings would be the rectangle described by the arguments relative to the receiver s parent p param x the desired x coordinate of the client area param y the desired y coordinate of the client area param width the desired width of the client area param height the desired height of the client area return the required bounds to produce the given client area 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 get Client Area public Rectangle compute Trim int x int y int width int height check Widget int out Metric new int 1 OS Get Theme Metric OS k Theme Metric Scroll Bar Width out Metric if horizontal Bar null height out Metric 0 if vertical Bar null width out Metric 0 Rect inset inset x inset left y inset top width inset left inset right height inset top inset bottom return new Rectangle x y width height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getClientArea computeTrim checkWidget outMetric GetThemeMetric kThemeMetricScrollBarWidth outMetric horizontalBar outMetric verticalBar outMetric
Scroll Bar create Scroll Bar int style return new Scroll Bar this style  ScrollBar createScrollBar ScrollBar
Scroll Bar create Standard Bar int style short count new short 1 OS Count Sub Controls handle count if count 0 0 return null int out Control new int 1 int index style SWT H SCROLL 0 1 2 int status OS Get Indexed Sub Control handle short index out Control if status OS no Err return null Scroll Bar bar new Scroll Bar bar parent this bar style style bar display display bar handle out Control 0 bar register bar hook Events return bar  ScrollBar createStandardBar CountSubControls outControl H_SCROLL GetIndexedSubControl outControl noErr ScrollBar ScrollBar outControl hookEvents
void create Widget super create Widget if style SWT H SCROLL 0 horizontal Bar create Scroll Bar SWT H SCROLL if style SWT V SCROLL 0 vertical Bar create Scroll Bar SWT V SCROLL  createWidget createWidget H_SCROLL horizontalBar createScrollBar H_SCROLL V_SCROLL verticalBar createScrollBar V_SCROLL
void deregister super deregister if scrolled Handle 0 display remove Widget scrolled Handle  scrolledHandle removeWidget scrolledHandle
Returns a rectangle which describes the area of the receiver which is capable of displaying data that is not covered by the trimmings return the client area 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 compute Trim public Rectangle get Client Area check Widget Rect rect new Rect OS Get Control Bounds handle rect return new Rectangle 0 0 rect right rect left rect bottom rect top  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS computeTrim getClientArea checkWidget GetControlBounds
Returns the receiver s horizontal scroll bar if it has one and null if it does not return the horizontal scroll bar or null 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 Scroll Bar get Horizontal Bar check Widget return horizontal Bar  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ScrollBar getHorizontalBar checkWidget horizontalBar
Returns the receiver s vertical scroll bar if it has one and null if it does not return the vertical scroll bar or null 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 Scroll Bar get Vertical Bar check Widget return vertical Bar  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ScrollBar getVerticalBar checkWidget verticalBar
boolean has Border return style SWT BORDER 0  hasBorder
void hook Events super hook Events if state CANVAS 0 scrolled Handle 0 int control Proc display control Proc int mask new int OS k Event Class Control OS k Event Control Draw int control Target OS Get Control Event Target scrolled Handle OS Install Event Handler control Target control Proc mask length 2 mask scrolled Handle null  hookEvents hookEvents scrolledHandle controlProc controlProc kEventClassControl kEventControlDraw controlTarget GetControlEventTarget scrolledHandle InstallEventHandler controlTarget controlProc scrolledHandle
boolean hooks Keys return hooks SWT Key Down hooks SWT Key Up hooks SWT Traverse  hooksKeys KeyDown KeyUp
Rect inset if state CANVAS 0 Rect rect new Rect int out Metric new int 1 if draw Focus Ring style SWT NO FOCUS 0 hooks Keys OS Get Theme Metric OS k Theme Metric Focus Rect Outset out Metric rect left out Metric 0 rect top out Metric 0 rect right out Metric 0 rect bottom out Metric 0 if has Border OS Get Theme Metric OS k Theme Metric Edit Text Frame Outset out Metric rect left out Metric 0 rect top out Metric 0 rect right out Metric 0 rect bottom out Metric 0 return rect return EMPTY RECT  outMetric drawFocusRing NO_FOCUS hooksKeys GetThemeMetric kThemeMetricFocusRectOutset outMetric outMetric outMetric outMetric outMetric hasBorder GetThemeMetric kThemeMetricEditTextFrameOutset outMetric outMetric outMetric outMetric outMetric EMPTY_RECT
boolean is Trim Handle int trim Handle if horizontal Bar null horizontal Bar handle trim Handle return true if vertical Bar null vertical Bar handle trim Handle return true return trim Handle scrolled Handle  isTrimHandle trimHandle horizontalBar horizontalBar trimHandle verticalBar verticalBar trimHandle trimHandle scrolledHandle
int k Event Mouse Wheel Moved int next Handler int the Event int user Data int result super k Event Mouse Wheel Moved next Handler the Event user Data if result OS no Err return result if state CANVAS 0 short wheel Axis new short 1 OS Get Event Parameter the Event OS k Event Param Mouse Wheel Axis OS type Mouse Wheel Axis null 2 null wheel Axis Scroll Bar bar wheel Axis 0 OS k Event Mouse Wheel AxisX horizontal Bar vertical Bar if bar null bar get Visible int wheel Delta new int 1 OS Get Event Parameter the Event OS k Event Param Mouse Wheel Delta OS typeS Int32 null 4 null wheel Delta bar set Selection Math max 0 bar get Selection bar get Increment wheel Delta 0 Event event new Event event detail wheel Delta 0 0 SWT PAGE UP SWT PAGE DOWN bar send Event SWT Selection event Display display get Display display update update Feature in the Macintosh For some reason when event Not Handled Err is returned from k Event Mouse Wheel Moved the event is sent twiced to the same control with the same mouse wheel data The fix is to return no Err to stop further event processing return OS no Err int v Position vertical Bar null 0 vertical Bar get Selection int h Position horizontal Bar null 0 horizontal Bar get Selection result OS Call Next Event Handler next Handler the Event if vertical Bar null int position vertical Bar get Selection if position v Position Event event new Event event detail position v Position SWT PAGE UP SWT PAGE DOWN vertical Bar send Event SWT Selection event if horizontal Bar null int position horizontal Bar get Selection if position h Position Event event new Event event detail position v Position SWT PAGE UP SWT PAGE DOWN horizontal Bar send Event SWT Selection event return result  kEventMouseWheelMoved nextHandler theEvent userData kEventMouseWheelMoved nextHandler theEvent userData noErr wheelAxis GetEventParameter theEvent kEventParamMouseWheelAxis typeMouseWheelAxis wheelAxis ScrollBar wheelAxis kEventMouseWheelAxisX horizontalBar verticalBar getVisible wheelDelta GetEventParameter theEvent kEventParamMouseWheelDelta typeSInt32 wheelDelta setSelection getSelection getIncrement wheelDelta wheelDelta PAGE_UP PAGE_DOWN sendEvent getDisplay eventNotHandledErr kEventMouseWheelMoved noErr noErr vPosition verticalBar verticalBar getSelection hPosition horizontalBar horizontalBar getSelection CallNextEventHandler nextHandler theEvent verticalBar verticalBar getSelection vPosition vPosition PAGE_UP PAGE_DOWN verticalBar sendEvent horizontalBar horizontalBar getSelection hPosition vPosition PAGE_UP PAGE_DOWN horizontalBar sendEvent
void layout Control boolean events if scrolled Handle 0 return int v Width 0 h Height 0 int out Metric new int 1 OS Get Theme Metric OS k Theme Metric Scroll Bar Width out Metric boolean is VisibleH Bar horizontal Bar null horizontal Bar get Visible boolean is VisibleV Bar vertical Bar null vertical Bar get Visible if is VisibleH Bar h Height out Metric 0 if is VisibleV Bar v Width out Metric 0 Rect rect new Rect OS Get Control Bounds scrolled Handle rect Rect inset inset int width Math max 0 rect right rect left v Width inset left inset right int height Math max 0 rect bottom rect top h Height inset top inset bottom set Bounds handle inset left inset top width height true true false if is VisibleH Bar set Bounds horizontal Bar handle inset left inset top height width h Height true true false if is VisibleV Bar set Bounds vertical Bar handle inset left width inset top v Width height true true false if events send Event SWT Resize  layoutControl scrolledHandle vWidth hHeight outMetric GetThemeMetric kThemeMetricScrollBarWidth outMetric isVisibleHBar horizontalBar horizontalBar getVisible isVisibleVBar verticalBar verticalBar getVisible isVisibleHBar hHeight outMetric isVisibleVBar vWidth outMetric GetControlBounds scrolledHandle vWidth hHeight setBounds isVisibleHBar setBounds horizontalBar hHeight isVisibleVBar setBounds verticalBar vWidth sendEvent
void register super register if scrolled Handle 0 display add Widget scrolled Handle this  scrolledHandle addWidget scrolledHandle
void release Handle super release Handle scrolled Handle 0  releaseHandle releaseHandle scrolledHandle
void release Widget if horizontal Bar null horizontal Bar release Resources if vertical Bar null vertical Bar release Resources horizontal Bar vertical Bar null super release Widget  releaseWidget horizontalBar horizontalBar releaseResources verticalBar verticalBar releaseResources horizontalBar verticalBar releaseWidget
void reset Visible Region int control if vertical Bar null vertical Bar reset Visible Region control if horizontal Bar null horizontal Bar reset Visible Region control super reset Visible Region control  resetVisibleRegion verticalBar verticalBar resetVisibleRegion horizontalBar horizontalBar resetVisibleRegion resetVisibleRegion
int set Bounds int control int x int y int width int height boolean move boolean resize boolean events int result super set Bounds control x y width height move resize false if result MOVED 0 if events send Event SWT Move if result RESIZED 0 if control scrolled Handle layout Control false if events send Event SWT Resize return result  setBounds setBounds sendEvent scrolledHandle layoutControl sendEvent
void set Scrollbar Visible Scroll Bar bar boolean visible if scrolled Handle 0 return if visible if bar state HIDDEN 0 return bar state HIDDEN else if bar state HIDDEN 0 return bar state HIDDEN set Visible bar handle visible layout Control true bar send Event visible SWT Show SWT Hide  setScrollbarVisible ScrollBar scrolledHandle setVisible layoutControl sendEvent
int top Handle if scrolled Handle 0 return scrolled Handle return handle  topHandle scrolledHandle scrolledHandle

int page Increment 10 Scroll Bar Do nothing  pageIncrement ScrollBar
Scroll Bar Scrollable parent int style super parent check Style style this parent parent create Widget  ScrollBar checkStyle createWidget
Adds the listener to the collection of listeners who will be notified when the receiver s value changes by sending it one of the messages defined in the code Selection Listener code interface p When code widget Selected code is called the event object detail field contains one of the following values code 0 code for the end of a drag code SWT DRAG code code SWT HOME code code SWT END code code SWT ARROW DOWN code code SWT ARROW UP code code SWT PAGE DOWN code code SWT PAGE UP code code widget Default Selected code is not called p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected ARROW_DOWN ARROW_UP PAGE_DOWN PAGE_UP widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
static int check Style int style return check Bits style SWT HORIZONTAL SWT VERTICAL 0 0 0 0  checkStyle checkBits
int action Proc int the Control int part Code Event event new Event int value OS Get Control32 Bit Value handle switch part Code case OS k Control Up Button Part value increment event detail SWT ARROW UP break case OS k Control Page Up Part value page Increment event detail SWT PAGE UP break case OS k Control Page Down Part value page Increment event detail SWT PAGE DOWN break case OS k Control Down Button Part value increment event detail SWT ARROW DOWN break case OS k Control Indicator Part dragging true event detail SWT DRAG break default return 0 OS Set Control32 Bit Value handle value send Event SWT Selection event parent update true return 0  actionProc theControl partCode GetControl32BitValue partCode kControlUpButtonPart ARROW_UP kControlPageUpPart pageIncrement PAGE_UP kControlPageDownPart pageIncrement PAGE_DOWN kControlDownButtonPart ARROW_DOWN kControlIndicatorPart SetControl32BitValue sendEvent
void destroy Widget int the Control handle release Handle if the Control 0 OS Dispose Control the Control  destroyWidget theControl releaseHandle theControl DisposeControl theControl
void enable Widget boolean enabled if enabled OS Enable Control handle else OS Disable Control handle  enableWidget EnableControl DisableControl
void create Handle int action Proc display action Proc int out Control new int 1 int window OS Get Control Owner parent scrolled Handle OS Create Scroll Bar Control window null 0 0 90 10 true action Proc out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0  createHandle actionProc actionProc outControl GetControlOwner scrolledHandle CreateScrollBarControl actionProc outControl outControl ERROR_NO_HANDLES outControl
void create Widget super create Widget setZ Order  createWidget createWidget setZOrder
void deregister super deregister display remove Widget handle  removeWidget
int get Draw Count int control return parent get Draw Count control  getDrawCount getDrawCount
Returns code true code if the receiver is enabled and code false code otherwise A disabled control is typically not selectable from the user interface and draws with an inactive or grayed look return the receiver s 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 is Enabled public boolean get Enabled check Widget return state DISABLED 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS isEnabled getEnabled checkWidget
Returns the amount that the receiver s value will be modified by when the up down or right left arrows are pressed return the increment 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 int get Increment check Widget return increment  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getIncrement checkWidget
Returns the maximum value which the receiver will allow return the maximum 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 int get Maximum check Widget int maximum OS Get Control32 Bit Maximum handle 0x7FFFFFFF int view Size OS Get Control View Size handle return maximum view Size  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMaximum checkWidget GetControl32BitMaximum viewSize GetControlViewSize viewSize
Returns the minimum value which the receiver will allow return the minimum 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 int get Minimum check Widget return OS Get Control32 Bit Minimum handle 0x7FFFFFFF  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMinimum checkWidget GetControl32BitMinimum
Returns the amount that the receiver s value will be modified by when the page increment decrement areas are selected return the page increment 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 int get Page Increment check Widget return page Increment  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getPageIncrement checkWidget pageIncrement
Returns the receiver s parent which must be scrollable return the receiver s parent 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 Scrollable get Parent check Widget return parent  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getParent checkWidget
Returns the single em selection em that is the receiver s value return the selection 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 int get Selection check Widget return OS Get Control32 Bit Value handle 0x7FFFFFFF  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelection checkWidget GetControl32BitValue
Returns a point describing the receiver s size The x coordinate of the result is the width of the receiver The y coordinate of the result is the height of the receiver return the receiver s size 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 Point get Size check Widget Rect rect get Control Size handle return new Point rect right rect left rect bottom rect top  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSize checkWidget getControlSize
Answers the size of the receiver s thumb relative to the difference between its maximum and minimum values return the thumb value 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 Scroll Bar public int get Thumb check Widget return OS Get Control View Size handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ScrollBar getThumb checkWidget GetControlViewSize
Returns code true code if the receiver is visible and code false code otherwise p If one of the receiver s ancestors is not visible or some other condition makes the receiver not visible this method may still indicate that it is considered visible even though it may not actually be showing p return the receiver s visibility 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 public boolean get Visible check Widget return state HIDDEN 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getVisible checkWidget
int get Visible Region int control boolean clip Children if visible Rgn 0 visible Rgn OS New Rgn calculate Visible Region control visible Rgn clip Children int result OS New Rgn OS Copy Rgn visible Rgn result return result  getVisibleRegion clipChildren visibleRgn visibleRgn NewRgn calculateVisibleRegion visibleRgn clipChildren NewRgn CopyRgn visibleRgn
void hook Events super hook Events int control Proc display control Proc int mask new int OS k Event Class Control OS k Event Control Draw int control Target OS Get Control Event Target handle OS Install Event Handler control Target control Proc mask length 2 mask handle null  hookEvents hookEvents controlProc controlProc kEventClassControl kEventControlDraw controlTarget GetControlEventTarget InstallEventHandler controlTarget controlProc
void invalidate Visible Region int control reset Visible Region control parent reset Visible Region control  invalidateVisibleRegion resetVisibleRegion resetVisibleRegion
void inval Window Rgn int window int rgn parent inval Window Rgn window rgn  invalWindowRgn invalWindowRgn
boolean is Drawing int control Feature in the Macintosh The scroll bars in a Data Browser are always invisible according to Is Control Visible despite the fact that they are drawn The fix is to check our visibility flag instead of calling Is Control Visible Note During resize Is Control Visible returns true allowing the clipping to be properly calculated return is Visible get Draw Count control 0  isDrawing DataBrowser IsControlVisible IsControlVisible IsControlVisible isVisible getDrawCount
Returns code true code if the receiver is enabled and all of the receiver s ancestors are enabled and code false code otherwise A disabled control is typically not selectable from the user interface and draws with an inactive or grayed look return the receiver s 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 get Enabled public boolean is Enabled check Widget return get Enabled parent is Enabled  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getEnabled isEnabled checkWidget getEnabled isEnabled
boolean is Trim Handle int trim Handle return handle trim Handle  isTrimHandle trimHandle trimHandle
Returns code true code if the receiver is visible and all of the receiver s ancestors are visible and code false code otherwise return the receiver s visibility 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 get Visible public boolean is Visible check Widget return get Visible parent is Visible  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getVisible isVisible checkWidget getVisible isVisible
int k Event Mouse Down int next Handler int the Event int user Data int status super k Event Mouse Down next Handler the Event user Data if status OS no Err return status dragging false status OS Call Next Event Handler next Handler the Event if dragging Event event new Event send Event SWT Selection event dragging false return status  kEventMouseDown nextHandler theEvent userData kEventMouseDown nextHandler theEvent userData noErr CallNextEventHandler nextHandler theEvent sendEvent
void redraw redraw Widget handle false  redrawWidget
Removes the listener from the collection of listeners who will be notified when the receiver s value changes param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Selection listener event Table unhook SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable DefaultSelection
void register super register display add Widget handle this  addWidget
void release Child super release Child if parent horizontal Bar this parent horizontal Bar null if parent vertical Bar this parent vertical Bar null parent layout Control true  releaseChild releaseChild horizontalBar horizontalBar verticalBar verticalBar layoutControl
void release Handle super release Handle handle 0  releaseHandle releaseHandle
void release Widget super release Widget if visible Rgn 0 OS Dispose Rgn visible Rgn visible Rgn 0 parent null  releaseWidget releaseWidget visibleRgn DisposeRgn visibleRgn visibleRgn
void reset Visible Region int control if visible Rgn 0 OS Dispose Rgn visible Rgn visible Rgn 0  resetVisibleRegion visibleRgn DisposeRgn visibleRgn visibleRgn
Sets the amount that the receiver s value will be modified by when the up down or right left arrows are pressed to the argument which must be at least one param value the new increment must be greater than zero 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 set Increment int value check Widget if value 1 return increment value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setIncrement checkWidget
Enables the receiver if the argument is code true code and disables it otherwise A disabled control is typically not selectable from the user interface and draws with an inactive or grayed look param enabled the new 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 public void set Enabled boolean enabled check Widget if enabled if state DISABLED 0 return state DISABLED OS Enable Control handle else if state DISABLED 0 return state DISABLED OS Disable Control handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setEnabled checkWidget EnableControl DisableControl
Sets the maximum If this value is negative or less than or equal to the minimum the value is ignored If necessary first the thumb and then the selection are adjusted to fit within the new range param value the new maximum 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 set Maximum int value check Widget if value 0 return int minimum OS Get Control32 Bit Minimum handle if value minimum return int view Size OS Get Control View Size handle if value minimum view Size view Size value minimum OS Set Control View Size handle view Size OS Set Control32 Bit Maximum handle value view Size  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMaximum checkWidget GetControl32BitMinimum viewSize GetControlViewSize viewSize viewSize SetControlViewSize viewSize SetControl32BitMaximum viewSize
Sets the minimum value If this value is negative or greater than or equal to the maximum the value is ignored If necessary first the thumb and then the selection are adjusted to fit within the new range param value the new minimum 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 set Minimum int value check Widget if value 0 return int view Size OS Get Control View Size handle int maximum OS Get Control32 Bit Maximum handle view Size if value maximum return if maximum value view Size view Size maximum value OS Set Control32 Bit Maximum handle maximum view Size OS Set Control View Size handle view Size OS Set Control32 Bit Minimum handle value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMinimum checkWidget viewSize GetControlViewSize GetControl32BitMaximum viewSize viewSize viewSize SetControl32BitMaximum viewSize SetControlViewSize viewSize SetControl32BitMinimum
Sets the amount that the receiver s value will be modified by when the page increment decrement areas are selected to the argument which must be at least one param value the page increment must be greater than zero 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 set Page Increment int value check Widget if value 1 return page Increment value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setPageIncrement checkWidget pageIncrement
Sets the single em selection em that is the receiver s value to the argument which must be greater than or equal to zero param selection the new selection must be zero or greater 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 set Selection int value check Widget OS Set Control32 Bit Value handle value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget SetControl32BitValue
Sets the size of the receiver s thumb relative to the difference between its maximum and minimum values This new value will be ignored if it is less than one and will be clamped if it exceeds the receiver s current range param value the new thumb value which must be at least one and not larger than the size of the current range 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 set Thumb int value check Widget if value 1 return int minimum OS Get Control32 Bit Minimum handle int view Size OS Get Control View Size handle int maximum OS Get Control32 Bit Maximum handle view Size value Math min value maximum minimum OS Set Control32 Bit Maximum handle maximum value OS Set Control View Size handle value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setThumb checkWidget GetControl32BitMinimum viewSize GetControlViewSize GetControl32BitMaximum viewSize SetControl32BitMaximum SetControlViewSize
Sets the receiver s selection minimum value maximum value thumb increment and page increment all at once p Note This is equivalent to setting the values individually using the appropriate methods but may be implemented in a more efficient fashion on some platforms p param selection the new selection value param minimum the new minimum value param maximum the new maximum value param thumb the new thumb value param increment the new increment value param page Increment the new page Increment value 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 set Values int selection int minimum int maximum int thumb int increment int page Increment check Widget if minimum 0 return if maximum 0 return if thumb 1 return if increment 1 return if page Increment 1 return thumb Math min thumb maximum minimum OS Set Control32 Bit Minimum handle minimum OS Set Control32 Bit Maximum handle maximum thumb OS Set Control View Size handle thumb OS Set Control32 Bit Value handle selection this increment increment this page Increment page Increment  pageIncrement pageIncrement SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setValues pageIncrement checkWidget pageIncrement SetControl32BitMinimum SetControl32BitMaximum SetControlViewSize SetControl32BitValue pageIncrement pageIncrement
Marks the receiver as visible if the argument is code true code and marks it invisible otherwise p If one of the receiver s ancestors is not visible or some other condition makes the receiver not visible marking it visible may not actually cause it to be displayed p param visible the new visibility 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 public void set Visible boolean visible check Widget parent set Scrollbar Visible this visible  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setVisible checkWidget setScrollbarVisible
void setZ Order OS HI View Add Subview parent scrolled Handle handle  setZOrder HIViewAddSubview scrolledHandle

Constructs a new instance of this class This is equivalent to calling code Shell Display null code exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul public Shell this Display null  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS
Constructs a new instance of this class given only the style value describing its behavior and appearance This is equivalent to calling code Shell Display null style code p The style value is either one of the style constants defined in 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 style the style of control to construct exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT BORDER see SWT CLOSE see SWT MIN see SWT MAX see SWT RESIZE see SWT TITLE see SWT NO TRIM see SWT SHELL TRIM see SWT DIALOG TRIM see SWT MODELESS see SWT PRIMARY MODAL see SWT APPLICATION MODAL see SWT SYSTEM MODAL public Shell int style this Display null style  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS NO_TRIM SHELL_TRIM DIALOG_TRIM PRIMARY_MODAL APPLICATION_MODAL SYSTEM_MODAL
Constructs a new instance of this class given only the display to create it on It is created with style code SWT SHELL TRIM code p Note Currently null can be passed in for the display argument This has the effect of creating the shell on the currently active display if there is one If there is no current display the shell is created on a default display b Passing in null as the display argument is not considered to be good coding style and may not be supported in a future release of SWT b p param display the display to create the shell on exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul public Shell Display display this display SWT SHELL TRIM  SHELL_TRIM SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS SHELL_TRIM
Constructs a new instance of this class given the display to create it on and a style value describing its behavior and appearance p The style value is either one of the style constants defined in 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 p Note Currently null can be passed in for the display argument This has the effect of creating the shell on the currently active display if there is one If there is no current display the shell is created on a default display b Passing in null as the display argument is not considered to be good coding style and may not be supported in a future release of SWT b p param display the display to create the shell on param style the style of control to construct exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT BORDER see SWT CLOSE see SWT MIN see SWT MAX see SWT RESIZE see SWT TITLE see SWT NO TRIM see SWT SHELL TRIM see SWT DIALOG TRIM see SWT MODELESS see SWT PRIMARY MODAL see SWT APPLICATION MODAL see SWT SYSTEM MODAL public Shell Display display int style this display null style 0  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS NO_TRIM SHELL_TRIM DIALOG_TRIM PRIMARY_MODAL APPLICATION_MODAL SYSTEM_MODAL
Shell Display display Shell parent int style int handle super check Subclass if display null display Display get Current if display null display Display get Default if display is Valid Thread error SWT ERROR THREAD INVALID ACCESS this style check Style style this parent parent this display display this handle handle create Widget  checkSubclass getCurrent getDefault isValidThread ERROR_THREAD_INVALID_ACCESS checkStyle createWidget
Constructs a new instance of this class given only its parent It is created with style code SWT DIALOG TRIM code p Note Currently null can be passed in for the parent This has the effect of creating the shell on the currently active display if there is one If there is no current display the shell is created on a default display b Passing in null as the parent is not considered to be good coding style and may not be supported in a future release of SWT b p param parent a shell which will be the parent of the new instance exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul public Shell Shell parent this parent SWT DIALOG TRIM  DIALOG_TRIM IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS DIALOG_TRIM
Constructs a new instance of this class 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 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 p Note Currently null can be passed in for the parent This has the effect of creating the shell on the currently active display if there is one If there is no current display the shell is created on a default display b Passing in null as the parent is not considered to be good coding style and may not be supported in a future release of SWT b p param parent a shell which will be the parent of the new instance param style the style of control to construct exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT BORDER see SWT CLOSE see SWT MIN see SWT MAX see SWT RESIZE see SWT TITLE see SWT NO TRIM see SWT SHELL TRIM see SWT DIALOG TRIM see SWT MODELESS see SWT PRIMARY MODAL see SWT APPLICATION MODAL see SWT SYSTEM MODAL public Shell Shell parent int style this parent null parent display null parent style 0  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS NO_TRIM SHELL_TRIM DIALOG_TRIM PRIMARY_MODAL APPLICATION_MODAL SYSTEM_MODAL
static int check Style int style style Decorations check Style style int mask SWT SYSTEM MODAL SWT APPLICATION MODAL SWT PRIMARY MODAL int bits style mask if style SWT SYSTEM MODAL 0 return bits SWT SYSTEM MODAL if style SWT APPLICATION MODAL 0 return bits SWT APPLICATION MODAL if style SWT PRIMARY MODAL 0 return bits SWT PRIMARY MODAL return bits  checkStyle checkStyle SYSTEM_MODAL APPLICATION_MODAL PRIMARY_MODAL SYSTEM_MODAL SYSTEM_MODAL APPLICATION_MODAL APPLICATION_MODAL PRIMARY_MODAL PRIMARY_MODAL
Adds the listener to the collection of listeners who will be notified when operations are performed on the receiver by sending the listener one of the messages defined in the code Shell Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Shell Listener see remove Shell Listener public void add Shell Listener Shell Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Activate typed Listener add Listener SWT Close typed Listener add Listener SWT Deactivate typed Listener add Listener SWT Iconify typed Listener add Listener SWT Deiconify typed Listener  ShellListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ShellListener removeShellListener addShellListener ShellListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener typedListener addListener typedListener addListener typedListener addListener typedListener
void bring To Top boolean force if force force Active else set Active  bringToTop forceActive setActive
Requests that the window manager close the receiver in the same way it would be closed when the user clicks on the close box or performs some other platform specific key or mouse combination that indicates the window should be removed 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 SWT Close see dispose public void close check Widget close Widget  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget closeWidget
void close Widget if is Enabled return Event event new Event send Event SWT Close event if event doit is Disposed dispose  closeWidget isEnabled sendEvent isDisposed
public Rectangle compute Trim int x int y int width int height check Widget Rectangle trim super compute Trim x y width height Rect rect new Rect OS Get Window Structure Widths shell Handle rect trim x rect left trim y rect top trim width rect left rect right trim height rect top rect bottom return trim  computeTrim checkWidget computeTrim GetWindowStructureWidths shellHandle
void create Handle state CANVAS GRAB HIDDEN int attributes OS k Window Standard Handler Attribute OS k Window Compositing Attribute if style SWT NO TRIM 0 if style SWT CLOSE 0 attributes OS k Window Close Box Attribute if style SWT MIN 0 attributes OS k Window Collapse Box Attribute if style SWT MAX 0 attributes OS k Window Full Zoom Attribute if style SWT RESIZE 0 attributes OS k Window Resizable Attribute Bug in the Macintosh For some reason a window has no title bar and the k Window Resizable Attribute no rubber banding feedback is given while the window is resizing The fix is to create the window with k Window Live Resize Attribute in this case This is inconsistent with other windows but the user will get feedback when resizing if style SWT TITLE 0 attributes OS k Window Live Resize Attribute int window Class OS k Document Window Class if style SWT CLOSE SWT TITLE 0 window Class OS k Sheet Window Class int window Class parent null OS k Document Window Class OS k Sheet Window Class if style SWT APPLICATION MODAL 0 window Class OS k Movable Modal Window Class if style SWT SYSTEM MODAL 0 window Class OS k Modal Window Class Monitor monitor get Monitor Rectangle rect monitor get Client Area int width rect width 5 8 int height rect height 5 8 Rect bounds new Rect OS Set Rect bounds short 0 short 0 short width short height int out Window new int 1 attributes OS Get Available Window Attributes window Class OS Create New Window window Class attributes bounds out Window if out Window 0 0 error SWT ERROR NO HANDLES shell Handle out Window 0 OS Reposition Window shell Handle 0 OS k Window Cascade On Main Screen OS Set Theme Window Background shell Handle short OS k Theme Brush Dialog Background Active false int the Root new int 1 OS Create Root Control shell Handle the Root OS Get Root Control shell Handle the Root if the Root 0 0 error SWT ERROR NO HANDLES if style SWT H SCROLL SWT V SCROLL 0 create Scrolled Handle the Root 0 else create Handle the Root 0 OS Set Control Visibility top Handle false false int out Group new int 1 OS Create Window Group OS k Window Group Attr Hide On Collapse out Group if out Group 0 0 error SWT ERROR NO HANDLES window Group out Group 0 if parent null Shell shell parent get Shell int parent Group shell window Group OS Set Window Group shell Handle parent Group OS Set Window Group Parent window Group parent Group else int parent Group OS Get Window Group Of Class window Class OS Set Window Group Parent window Group parent Group OS Set Window Group Owner window Group shell Handle  createHandle kWindowStandardHandlerAttribute kWindowCompositingAttribute NO_TRIM kWindowCloseBoxAttribute kWindowCollapseBoxAttribute kWindowFullZoomAttribute kWindowResizableAttribute kWindowResizableAttribute kWindowLiveResizeAttribute kWindowLiveResizeAttribute windowClass kDocumentWindowClass windowClass kSheetWindowClass windowClass kDocumentWindowClass kSheetWindowClass APPLICATION_MODAL windowClass kMovableModalWindowClass SYSTEM_MODAL windowClass kModalWindowClass getMonitor getClientArea SetRect outWindow GetAvailableWindowAttributes windowClass CreateNewWindow windowClass outWindow outWindow ERROR_NO_HANDLES shellHandle outWindow RepositionWindow shellHandle kWindowCascadeOnMainScreen SetThemeWindowBackground shellHandle kThemeBrushDialogBackgroundActive theRoot CreateRootControl shellHandle theRoot GetRootControl shellHandle theRoot theRoot ERROR_NO_HANDLES H_SCROLL V_SCROLL createScrolledHandle theRoot createHandle theRoot SetControlVisibility topHandle outGroup CreateWindowGroup kWindowGroupAttrHideOnCollapse outGroup outGroup ERROR_NO_HANDLES windowGroup outGroup getShell parentGroup windowGroup SetWindowGroup shellHandle parentGroup SetWindowGroupParent windowGroup parentGroup parentGroup GetWindowGroupOfClass windowClass SetWindowGroupParent windowGroup parentGroup SetWindowGroupOwner windowGroup shellHandle
void create Widget super create Widget layout Control false  createWidget createWidget layoutControl
void deregister super deregister int the Root new int 1 OS Get Root Control shell Handle the Root display remove Widget the Root 0  theRoot GetRootControl shellHandle theRoot removeWidget theRoot
void destroy Widget int the Window shell Handle OS Hide Window shell Handle release Handle if the Window 0 OS Dispose Window the Window  destroyWidget theWindow shellHandle HideWindow shellHandle releaseHandle theWindow DisposeWindow theWindow
void draw Widget int control int damage Rgn int visible Rgn int the Event super draw Widget control damage Rgn visible Rgn the Event Bug in the Macintosh In k Event Window Get Region Carbon assumes the origin of the Region is 0 0 and ignores the actual origin This causes the window to be shifted for a non zero origin Also the size of the window is the size of the region which may be less then the size specified in set Size or set Bounds The fix is to include 0 0 and the bottom right corner of the size in the region and to make these points transparent if region null region is Disposed return boolean origin region contains 0 0 boolean limit region contains rgn Rect right 1 rgn Rect bottom 1 if origin limit return int context new int 1 int port OS Get Window Port shell Handle Rect port Rect new Rect OS Get Port Bounds port port Rect OS QD BeginCG Context port context OS CG Context ScaleCTM context 0 1 1 OS CG Context TranslateCTM context 0 0 port Rect top port Rect bottom CG Rect cg Rect new CG Rect cg Rect width 1 cg Rect height 1 if origin OS CG Context Clear Rect context 0 cg Rect if limit cg Rect x rgn Rect right 1 cg Rect y rgn Rect bottom 1 OS CG Context Clear Rect context 0 cg Rect OS CG Context Synchronize context 0 OS QD EndCG Context port context  drawWidget damageRgn visibleRgn theEvent drawWidget damageRgn visibleRgn theEvent kEventWindowGetRegion setSize setBounds isDisposed rgnRect rgnRect GetWindowPort shellHandle portRect GetPortBounds portRect QDBeginCGContext CGContextScaleCTM CGContextTranslateCTM portRect portRect CGRect cgRect CGRect cgRect cgRect CGContextClearRect cgRect cgRect rgnRect cgRect rgnRect CGContextClearRect cgRect CGContextSynchronize QDEndCGContext
Cursor find Cursor return cursor  findCursor
Moves the receiver to the top of the drawing order for the display on which it was created so that all other shells on that display which are not the receiver s children will be drawn behind it and forces the window manager to make the shell active 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 since 2 0 see Control move Above see Control set Focus see Control set Visible see Display get Active Shell see Decorations set Default Button see Shell open see Shell set Active public void force Active check Widget if activate return OS Select Window shell Handle OS Set Front Process With Options new int 0 OS k Current Process OS k Set Front Process Front Window Only  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS moveAbove setFocus setVisible getActiveShell setDefaultButton setActive forceActive checkWidget SelectWindow shellHandle SetFrontProcessWithOptions kCurrentProcess kSetFrontProcessFrontWindowOnly
public Rectangle get Client Area check Widget Rect rect new Rect OS Get Window Bounds shell Handle short OS k Window Content Rgn rect return new Rectangle 0 0 rect right rect left rect bottom rect top  getClientArea checkWidget GetWindowBounds shellHandle kWindowContentRgn
public Rectangle get Bounds check Widget Rect rect new Rect OS Get Window Bounds shell Handle short OS k Window Structure Rgn rect return new Rectangle rect left rect top rect right rect left rect bottom rect top  getBounds checkWidget GetWindowBounds shellHandle kWindowStructureRgn
int get Draw Count int control if is Trim Handle control return draw Count return 0  getDrawCount isTrimHandle drawCount
Returns the receiver s input method editor mode This will be the result of bitwise OR ing together one or more of the following constants defined in class code SWT code code NONE code code ROMAN code code DBCS code code PHONETIC code code NATIVE code code ALPHA code return the IME mode 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 SWT public int get Ime Input Mode check Widget return SWT NONE  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getImeInputMode checkWidget
public Point get Location check Widget Rect rect new Rect OS Get Window Bounds shell Handle short OS k Window Structure Rgn rect return new Point rect left rect top  getLocation checkWidget GetWindowBounds shellHandle kWindowStructureRgn
public boolean get Maximized check Widget NOT DONE return super get Maximized  getMaximized checkWidget getMaximized
public boolean get Minimized check Widget if get Visible return super get Minimized return OS Is Window Collapsed shell Handle  getMinimized checkWidget getVisible getMinimized IsWindowCollapsed shellHandle
float get Parent Background return null  getParentBackground
Returns the region that defines the shape of the shell or null if the shell has the default shape return the region that defines the shape of the shell or null 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 since 3 0 public Region get Region check Widget return region  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getRegion checkWidget
public Shell get Shell check Widget return this  getShell checkWidget
Returns an array containing all shells which are descendents of the receiver p return the dialog shells 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 Shell get Shells check Widget int count 0 Shell shells display get Shells for int i 0 i shells length i Control shell shells i do shell shell parent while shell null shell this if shell this count int index 0 Shell result new Shell count for int i 0 i shells length i Control shell shells i do shell shell parent while shell null shell this if shell this result index shells i return result  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getShells checkWidget getShells
public Point get Size check Widget Rect rect new Rect OS Get Window Bounds shell Handle short OS k Window Structure Rgn rect return new Point rect right rect left rect bottom rect top  getSize checkWidget GetWindowBounds shellHandle kWindowStructureRgn
public boolean get Visible check Widget return OS Is Window Visible shell Handle  getVisible checkWidget IsWindowVisible shellHandle
boolean has Border return false  hasBorder
void hook Events super hook Events int mouse Proc display mouse Proc int window Proc display window Proc int mask1 new int OS k Event Class Window OS k Event Window Activated OS k Event Class Window OS k Event Window Bounds Changed OS k Event Class Window OS k Event Window Close OS k Event Class Window OS k Event Window Collapsed OS k Event Class Window OS k Event Window Deactivated OS k Event Class Window OS k Event Window Draw Content OS k Event Class Window OS k Event Window Expanded OS k Event Class Window OS k Event Window Get Region OS k Event Class Window OS k Event Window Hidden OS k Event Class Window OS k Event Window Hit Test OS k Event Class Window OS k Event Window Shown OS k Event Class Window OS k Event Window Update int window Target OS Get Window Event Target shell Handle OS Install Event Handler window Target window Proc mask1 length 2 mask1 shell Handle null int mask2 new int OS k Event Class Mouse OS k Event Mouse Down OS k Event Class Mouse OS k Event Mouse Dragged OS k Event Class Mouse OS k Event Mouse Entered OS k Event Class Mouse OS k Event Mouse Exited OS k Event Class Mouse OS k Event Mouse Moved OS k Event Class Mouse OS k Event Mouse Up OS k Event Class Mouse OS k Event Mouse Wheel Moved OS Install Event Handler window Target mouse Proc mask2 length 2 mask2 shell Handle null  hookEvents hookEvents mouseProc mouseProc windowProc windowProc kEventClassWindow kEventWindowActivated kEventClassWindow kEventWindowBoundsChanged kEventClassWindow kEventWindowClose kEventClassWindow kEventWindowCollapsed kEventClassWindow kEventWindowDeactivated kEventClassWindow kEventWindowDrawContent kEventClassWindow kEventWindowExpanded kEventClassWindow kEventWindowGetRegion kEventClassWindow kEventWindowHidden kEventClassWindow kEventWindowHitTest kEventClassWindow kEventWindowShown kEventClassWindow kEventWindowUpdate windowTarget GetWindowEventTarget shellHandle InstallEventHandler windowTarget windowProc shellHandle kEventClassMouse kEventMouseDown kEventClassMouse kEventMouseDragged kEventClassMouse kEventMouseEntered kEventClassMouse kEventMouseExited kEventClassMouse kEventMouseMoved kEventClassMouse kEventMouseUp kEventClassMouse kEventMouseWheelMoved InstallEventHandler windowTarget mouseProc shellHandle
void invalidate Visible Region int control reset Visible Region control invalidate Children Visible Region control  invalidateVisibleRegion resetVisibleRegion invalidateChildrenVisibleRegion
void inval Window Rgn int window int rgn Bug in the Macintosh Invalid Window Rgn will not invalidate the window when it is called from the default k Event Window Update handler The fix is to detect that case acumulate the region to invalidate and call Inval Window Rgn after the default handler is done if update if inval Rgn 0 inval Rgn OS New Rgn OS Union Rgn rgn inval Rgn inval Rgn else OS Inval Window Rgn window rgn  invalWindowRgn InvalidWindowRgn kEventWindowUpdate InvalWindowRgn invalRgn invalRgn NewRgn UnionRgn invalRgn invalRgn InvalWindowRgn
public boolean is Enabled check Widget return get Enabled  isEnabled checkWidget getEnabled
boolean is Enabled Cursor return true  isEnabledCursor
public boolean is Visible check Widget return get Visible  isVisible checkWidget getVisible
int k Event Window Activated int next Handler int the Event int user Data int result super k Event Window Activated next Handler the Event user Data if result OS no Err return result Bug in the Macintosh Despite the that a window has scope k Window Activation Scope None it gets k Event Window Activated events but does not get k Event Window Deactivated events The fix is to ignore k Event Window Activated events int out Scope new int 1 OS Get Window Activation Scope shell Handle out Scope if out Scope 0 OS k Window Activation Scope None return result display set Menu Bar menu Bar activate true send Event SWT Activate if is Disposed return result restore Focus activate false return result  kEventWindowActivated nextHandler theEvent userData kEventWindowActivated nextHandler theEvent userData noErr kWindowActivationScopeNone kEventWindowActivated kEventWindowDeactivated kEventWindowActivated outScope GetWindowActivationScope shellHandle outScope outScope kWindowActivationScopeNone setMenuBar menuBar sendEvent isDisposed restoreFocus
int k Event Window Bounds Changed int next Handler int the Event int user Data int result super k Event Window Bounds Changed next Handler the Event user Data if result OS no Err return result int attributes new int 1 OS Get Event Parameter the Event OS k Event Param Attributes OS typeU Int32 null attributes length 4 null attributes if attributes 0 OS k Window Bounds Change Origin Changed 0 send Event SWT Move if attributes 0 OS k Window Bounds Change Size Changed 0 resized true layout Control false send Event SWT Resize if layout null layout layout this false if region null region is Disposed OS Get Event Parameter the Event OS k Event Param Current Bounds OS typeQD Rectangle null Rect sizeof null rgn Rect OS Set Rect rgn Rect short 0 short 0 short rgn Rect right rgn Rect left short rgn Rect bottom rgn Rect top OS Reshape Custom Window shell Handle return result  kEventWindowBoundsChanged nextHandler theEvent userData kEventWindowBoundsChanged nextHandler theEvent userData noErr GetEventParameter theEvent kEventParamAttributes typeUInt32 kWindowBoundsChangeOriginChanged sendEvent kWindowBoundsChangeSizeChanged layoutControl sendEvent isDisposed GetEventParameter theEvent kEventParamCurrentBounds typeQDRectangle rgnRect SetRect rgnRect rgnRect rgnRect rgnRect rgnRect ReshapeCustomWindow shellHandle
int k Event Window Close int next Handler int the Event int user Data int result super k Event Window Close next Handler the Event user Data if result OS no Err return result close Widget return OS no Err  kEventWindowClose nextHandler theEvent userData kEventWindowClose nextHandler theEvent userData noErr closeWidget noErr
int k Event Window Collapsed int next Handler int the Event int user Data int result super k Event Window Collapsed next Handler the Event user Data if result OS no Err return result minimized true send Event SWT Iconify return result  kEventWindowCollapsed nextHandler theEvent userData kEventWindowCollapsed nextHandler theEvent userData noErr sendEvent
int k Event Window Deactivated int next Handler int the Event int user Data int result super k Event Window Deactivated next Handler the Event user Data if result OS no Err return result TEMPORARY CODE should be send but causes a GP post Event SWT Deactivate if is Disposed return result save Focus if saved Focus null Bug in the Macintosh When Clear Keyboard Focus is called the control that has focus gets two k Event Control Set Focus events indicating that focus was lost The fix is to ignore both of these and send the focus lost event explicitly display ignore Focus true OS Clear Keyboard Focus shell Handle display ignore Focus false TEMPORARY CODE should be send but causes a GP if saved Focus is Disposed saved Focus send Focus Event false true display set Menu Bar null return result  kEventWindowDeactivated nextHandler theEvent userData kEventWindowDeactivated nextHandler theEvent userData noErr postEvent isDisposed saveFocus savedFocus ClearKeyboardFocus kEventControlSetFocus ignoreFocus ClearKeyboardFocus shellHandle ignoreFocus savedFocus isDisposed savedFocus sendFocusEvent setMenuBar
int k Event Window Draw Content int next Handler int the Event int user Data drawing true int result OS Call Next Event Handler next Handler the Event drawing false if reshape reshape false OS Reshape Custom Window shell Handle return result  kEventWindowDrawContent nextHandler theEvent userData CallNextEventHandler nextHandler theEvent ReshapeCustomWindow shellHandle
int k Event Window Expanded int next Handler int the Event int user Data int result super k Event Window Expanded next Handler the Event user Data if result OS no Err return result minimized false send Event SWT Deiconify return result  kEventWindowExpanded nextHandler theEvent userData kEventWindowExpanded nextHandler theEvent userData noErr sendEvent
int k Event Window Get Region int next Handler int the Event int user Data int result super k Event Window Get Region next Handler the Event user Data if result OS no Err return result if region null region is Disposed return OS event Not Handled Err short region Code new short 1 OS Get Event Parameter the Event OS k Event Param Window Region Code OS type Window Region Code null 2 null region Code int temp new int 1 OS Get Event Parameter the Event OS k Event Param Rgn Handle OS typeQD Rgn Handle null 4 null temp int h Region temp 0 switch region Code 0 case OS k Window Content Rgn case OS k Window Structure Rgn OS Rect Rgn h Region rgn Rect OS Sect Rgn h Region region handle h Region Bug in the Macintosh In k Event Window Get Region Carbon assumes the origin of the Region is 0 0 and ignores the actual origin This causes the window to be shifted for a non zero origin Also the size of the window is the size of the region which may be less then the size specified in set Size or set Bounds The fix is to include 0 0 and the bottom right corner of the size in the region and to make these points transparent if region contains 0 0 Rect r new Rect OS Set Rect r short 0 short 0 short 1 short 1 int rect Rgn OS New Rgn OS Rect Rgn rect Rgn r OS Union Rgn rect Rgn h Region h Region OS Dispose Rgn rect Rgn if region contains rgn Rect right 1 rgn Rect bottom 1 Rect r new Rect OS Set Rect r short rgn Rect right 1 short rgn Rect bottom 1 rgn Rect right rgn Rect bottom int rect Rgn OS New Rgn OS Rect Rgn rect Rgn r OS Union Rgn rect Rgn h Region h Region OS Dispose Rgn rect Rgn return OS no Err default OS Diff Rgn h Region h Region h Region return OS no Err  kEventWindowGetRegion nextHandler theEvent userData kEventWindowGetRegion nextHandler theEvent userData noErr isDisposed eventNotHandledErr regionCode GetEventParameter theEvent kEventParamWindowRegionCode typeWindowRegionCode regionCode GetEventParameter theEvent kEventParamRgnHandle typeQDRgnHandle hRegion regionCode kWindowContentRgn kWindowStructureRgn RectRgn hRegion rgnRect SectRgn hRegion hRegion kEventWindowGetRegion setSize setBounds SetRect rectRgn NewRgn RectRgn rectRgn UnionRgn rectRgn hRegion hRegion DisposeRgn rectRgn rgnRect rgnRect SetRect rgnRect rgnRect rgnRect rgnRect rectRgn NewRgn RectRgn rectRgn UnionRgn rectRgn hRegion hRegion DisposeRgn rectRgn noErr DiffRgn hRegion hRegion hRegion noErr
int k Event Window Hidden int next Handler int the Event int user Data int result super k Event Window Hidden next Handler the Event user Data if result OS no Err return result Shell shells get Shells for int i 0 i shells length i Shell shell shells i if shell is Disposed shell set Window Visible false return OS event Not Handled Err  kEventWindowHidden nextHandler theEvent userData kEventWindowHidden nextHandler theEvent userData noErr getShells isDisposed setWindowVisible eventNotHandledErr
int k Event Window Hit Test int next Handler int the Event int user Data int result super k Event Window Hit Test next Handler the Event user Data if result OS no Err return result if region null region is Disposed return OS event Not Handled Err org eclipse swt internal carbon Point pt new org eclipse swt internal carbon Point int sizeof org eclipse swt internal carbon Point sizeof OS Get Event Parameter the Event OS k Event Param Mouse Location OS typeQD Point null sizeof null pt Rect rect new Rect OS Get Window Bounds shell Handle short OS k Window Content Rgn rect OS Set Pt pt short pt h rect left short pt v rect top int rgn OS New Rgn OS Rect Rgn rgn rgn Rect OS Sect Rgn rgn region handle rgn short in Data OS Pt In Rgn pt rgn OS w In Content OS w No Hit OS Dispose Rgn rgn OS Set Event Parameter the Event OS k Event Param Window Def Part OS type Window Def Part Code 2 new short in Data return OS no Err  kEventWindowHitTest nextHandler theEvent userData kEventWindowHitTest nextHandler theEvent userData noErr isDisposed eventNotHandledErr GetEventParameter theEvent kEventParamMouseLocation typeQDPoint GetWindowBounds shellHandle kWindowContentRgn SetPt NewRgn RectRgn rgnRect SectRgn inData PtInRgn wInContent wNoHit DisposeRgn SetEventParameter theEvent kEventParamWindowDefPart typeWindowDefPartCode inData noErr
int k Event Window Shown int next Handler int the Event int user Data int result super k Event Window Shown next Handler the Event user Data if result OS no Err return result Shell shells get Shells for int i 0 i shells length i Shell shell shells i if shell is Disposed shell get Visible shell set Window Visible true return OS event Not Handled Err  kEventWindowShown nextHandler theEvent userData kEventWindowShown nextHandler theEvent userData noErr getShells isDisposed getVisible setWindowVisible eventNotHandledErr
int k Event Window Update int next Handler int the Event int user Data update true int result OS Call Next Event Handler next Handler the Event update false if inval Rgn 0 OS Inval Window Rgn shell Handle inval Rgn OS Dispose Rgn inval Rgn inval Rgn 0 return result  kEventWindowUpdate nextHandler theEvent userData CallNextEventHandler nextHandler theEvent invalRgn InvalWindowRgn shellHandle invalRgn DisposeRgn invalRgn invalRgn
void layout Control boolean events Rect rect new Rect OS Get Window Bounds shell Handle short OS k Window Content Rgn rect int control scrolled Handle 0 scrolled Handle handle set Bounds control 0 0 rect right rect left rect bottom rect top false true false super layout Control events  layoutControl GetWindowBounds shellHandle kWindowContentRgn scrolledHandle scrolledHandle setBounds layoutControl
Moves the receiver to the top of the drawing order for the display on which it was created so that all other shells on that display which are not the receiver s children will be drawn behind it marks it visible sets the focus and asks the window manager to make the shell active 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 Control move Above see Control set Focus see Control set Visible see Display get Active Shell see Decorations set Default Button see Shell set Active see Shell force Active public void open check Widget OS Select Window shell Handle set Visible true if restore Focus traverse Group true  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS moveAbove setFocus setVisible getActiveShell setDefaultButton setActive forceActive checkWidget SelectWindow shellHandle setVisible restoreFocus traverseGroup
void register super register int the Root new int 1 OS Get Root Control shell Handle the Root display add Widget the Root 0 this  theRoot GetRootControl shellHandle theRoot addWidget theRoot
void release Handle super release Handle shell Handle 0  releaseHandle releaseHandle shellHandle
void release Shells Shell shells get Shells for int i 0 i shells length i Shell shell shells i if shell is Disposed shell dispose  releaseShells getShells isDisposed
void release Widget release Shells super release Widget if window Group 0 OS Release Window Group window Group display update Quit Menu if inval Rgn 0 OS Dispose Rgn inval Rgn inval Rgn window Group 0 last Active null region null  releaseWidget releaseShells releaseWidget windowGroup ReleaseWindowGroup windowGroup updateQuitMenu invalRgn DisposeRgn invalRgn invalRgn windowGroup lastActive
Removes the listener from the collection of listeners who will be notified when operations are performed on the receiver param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Shell Listener see add Shell Listener public void remove Shell Listener Shell Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Activate listener event Table unhook SWT Close listener event Table unhook SWT Deactivate listener event Table unhook SWT Iconify listener event Table unhook SWT Deiconify listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ShellListener addShellListener removeShellListener ShellListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable eventTable eventTable eventTable
Moves the receiver to the top of the drawing order for the display on which it was created so that all other shells on that display which are not the receiver s children will be drawn behind it and asks the window manager to make the shell active 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 since 2 0 see Control move Above see Control set Focus see Control set Visible see Display get Active Shell see Decorations set Default Button see Shell open see Shell set Active public void set Active check Widget if activate return OS Select Window shell Handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS moveAbove setFocus setVisible getActiveShell setDefaultButton setActive setActive checkWidget SelectWindow shellHandle
void set Active Control Control control if control null control is Disposed control null if last Active null last Active is Disposed last Active null if last Active control return Compute the list of controls to be activated and deactivated by finding the first common parent control Control activate control null new Control 0 control get Path Control deactivate last Active null new Control 0 last Active get Path last Active control int index 0 length Math min activate length deactivate length while index length if activate index deactivate index break index It is possible but unlikely that application code could have destroyed some of the widgets If this happens keep processing those widgets that are not disposed for int i deactivate length 1 i index i if deactivate i is Disposed deactivate i send Event SWT Deactivate for int i activate length 1 i index i if activate i is Disposed activate i send Event SWT Activate  setActiveControl isDisposed lastActive lastActive isDisposed lastActive lastActive getPath lastActive lastActive getPath lastActive isDisposed sendEvent isDisposed sendEvent
public void set Bounds int x int y int width int height check Widget width Math max 0 width height Math max 0 height Rect rect new Rect OS Set Rect rect short x short y short x width short y height OS Set Window Bounds shell Handle short OS k Window Structure Rgn rect  setBounds checkWidget SetRect SetWindowBounds shellHandle kWindowStructureRgn
public void set Enabled boolean enabled check Widget if state DISABLED 0 enabled return super set Enabled enabled if enabled OS Is Window Active shell Handle if restore Focus traverse Group false  setEnabled checkWidget setEnabled IsWindowActive shellHandle restoreFocus traverseGroup
public void set Menu Bar Menu menu check Widget super set Menu Bar menu if display get Active Shell this display set Menu Bar menu Bar  setMenuBar checkWidget setMenuBar getActiveShell setMenuBar menuBar
Sets the input method editor mode to the argument which should be the result of bitwise OR ing together one or more of the following constants defined in class code SWT code code NONE code code ROMAN code code DBCS code code PHONETIC code code NATIVE code code ALPHA code param mode the new IME mode 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 SWT public void set Ime Input Mode int mode check Widget  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setImeInputMode checkWidget
public void set Location int x int y check Widget Rect rect new Rect OS Get Window Bounds shell Handle short OS k Window Structure Rgn rect int width rect right rect left int height rect bottom rect top OS Set Rect rect short x short y short x width short y height OS Set Window Bounds shell Handle short OS k Window Structure Rgn rect  setLocation checkWidget GetWindowBounds shellHandle kWindowStructureRgn SetRect SetWindowBounds shellHandle kWindowStructureRgn
public void set Maximized boolean maximized check Widget super set Maximized maximized org eclipse swt internal carbon Point pt new org eclipse swt internal carbon Point short in Part Code short maximized OS in Zoom Out OS in Zoom In FIXME returns 50 err Param OS Zoom Window Ideal shell Handle in Part Code pt  setMaximized checkWidget setMaximized inPartCode inZoomOut inZoomIn errParam ZoomWindowIdeal shellHandle inPartCode
public void set Minimized boolean minimized check Widget if this minimized minimized return super set Minimized minimized if minimized OS Is Window Collapsed shell Handle if activate OS Select Window shell Handle OS Collapse Window shell Handle minimized  setMinimized checkWidget setMinimized IsWindowCollapsed shellHandle SelectWindow shellHandle CollapseWindow shellHandle
Sets the shape of the shell to the region specified by the argument When the argument is null the default shape of the shell is restored The shell must be created with the style SWT NO TRIM in order to specify a region param region the region that defines the shape of the shell or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the region has been disposed li ul 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 since 3 0 public void set Region Region region check Widget if style SWT NO TRIM 0 return if region null region is Disposed error SWT ERROR INVALID ARGUMENT if region null rgn Rect null else if rgn Rect null rgn Rect new Rect OS Get Window Bounds shell Handle short OS k Window Structure Rgn rgn Rect OS Set Rect rgn Rect short 0 short 0 short rgn Rect right rgn Rect left short rgn Rect bottom rgn Rect top this region region Bug in the Macintosh Calling Reshape Custom Window from a k Event Window Draw Content handler originating from Show Window will deadlock The fix is to detected this case and only call Reshape Custom Window after the default handler is done if drawing reshape true else OS Reshape Custom Window shell Handle  NO_TRIM IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setRegion checkWidget NO_TRIM isDisposed ERROR_INVALID_ARGUMENT rgnRect rgnRect rgnRect GetWindowBounds shellHandle kWindowStructureRgn rgnRect SetRect rgnRect rgnRect rgnRect rgnRect rgnRect ReshapeCustomWindow kEventWindowDrawContent ShowWindow ReshapeCustomWindow ReshapeCustomWindow shellHandle
public void set Size int width int height check Widget width Math max 0 width height Math max 0 height Rect rect new Rect OS Get Window Bounds shell Handle short OS k Window Structure Rgn rect OS Set Rect rect rect left rect top short rect left width short rect top height OS Set Window Bounds shell Handle short OS k Window Structure Rgn rect  setSize checkWidget GetWindowBounds shellHandle kWindowStructureRgn SetRect SetWindowBounds shellHandle kWindowStructureRgn
public void set Text String string check Widget if string null error SWT ERROR NULL ARGUMENT super set Text string char buffer new char string length string get Chars 0 buffer length buffer 0 int ptr OS CF String Create With Characters OS kCF Allocator Default buffer buffer length if ptr 0 error SWT ERROR CANNOT SET TEXT OS Set Window Title WithCF String shell Handle ptr OS CF Release ptr  setText checkWidget ERROR_NULL_ARGUMENT setText getChars CFStringCreateWithCharacters kCFAllocatorDefault ERROR_CANNOT_SET_TEXT SetWindowTitleWithCFString shellHandle CFRelease
public void set Visible boolean visible check Widget if visible if state HIDDEN 0 return state HIDDEN else if state HIDDEN 0 return state HIDDEN set Window Visible visible  setVisible checkWidget setWindowVisible
void set Window Visible boolean visible if OS Is Window Visible shell Handle visible return if visible if resized send Event SWT Resize if layout null layout layout this false send Event SWT Show if is Disposed return int in Modal Kind OS k Window Modality None if style SWT PRIMARY MODAL 0 in Modal Kind OS k Window Modality Window Modal if style SWT APPLICATION MODAL 0 in Modal Kind OS k Window Modality App Modal if style SWT SYSTEM MODAL 0 in Modal Kind OS k Window Modality System Modal if in Modal Kind OS k Window Modality None int in Unavailable Window 0 if parent null in Unavailable Window OS Get Control Owner parent handle OS Set Window Modality shell Handle in Modal Kind in Unavailable Window int top Handle top Handle OS Set Control Visibility top Handle true false invalidate Visible Region top Handle int scope new int 1 if style SWT ON TOP 0 OS Get Window Activation Scope shell Handle scope OS Set Window Activation Scope shell Handle OS k Window Activation Scope None int shell Handle this shell Handle OS Retain Window shell Handle OS Show Window shell Handle OS Release Window shell Handle if is Disposed if minimized OS Is Window Collapsed shell Handle OS Collapse Window shell Handle minimized if style SWT ON TOP 0 OS Set Window Activation Scope shell Handle scope 0 else OS Hide Window shell Handle int top Handle top Handle OS Set Control Visibility top Handle false false invalidate Visible Region top Handle send Event SWT Hide display update Quit Menu  setWindowVisible IsWindowVisible shellHandle sendEvent sendEvent isDisposed inModalKind kWindowModalityNone PRIMARY_MODAL inModalKind kWindowModalityWindowModal APPLICATION_MODAL inModalKind kWindowModalityAppModal SYSTEM_MODAL inModalKind kWindowModalitySystemModal inModalKind kWindowModalityNone inUnavailableWindow inUnavailableWindow GetControlOwner SetWindowModality shellHandle inModalKind inUnavailableWindow topHandle topHandle SetControlVisibility topHandle invalidateVisibleRegion topHandle ON_TOP GetWindowActivationScope shellHandle SetWindowActivationScope shellHandle kWindowActivationScopeNone shellHandle shellHandle RetainWindow shellHandle ShowWindow shellHandle ReleaseWindow shellHandle isDisposed IsWindowCollapsed shellHandle CollapseWindow shellHandle ON_TOP SetWindowActivationScope shellHandle HideWindow shellHandle topHandle topHandle SetControlVisibility topHandle invalidateVisibleRegion topHandle sendEvent updateQuitMenu
void setZ Order if scrolled Handle 0 OS HI View Add Subview scrolled Handle handle  setZOrder scrolledHandle HIViewAddSubview scrolledHandle
void setZ Order Control control boolean above if above NOT DONE move one window above another OS Bring To Front shell Handle else int window control null 0 OS Get Control Owner control handle OS Send Behind shell Handle window  setZOrder BringToFront shellHandle GetControlOwner SendBehind shellHandle
boolean traverse Escape if parent null return false if is Visible is Enabled return false close return true  traverseEscape isVisible isEnabled

Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT HORIZONTAL see SWT VERTICAL see Widget check Subclass see Widget get Style public Slider Composite parent int style super parent check Style style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle checkStyle
Adds the listener to the collection of listeners who will be notified when the receiver s value changes by sending it one of the messages defined in the code Selection Listener code interface p When code widget Selected code is called the event object detail field contains one of the following values code 0 code for the end of a drag code SWT DRAG code code SWT HOME code code SWT END code code SWT ARROW DOWN code code SWT ARROW UP code code SWT PAGE DOWN code code SWT PAGE UP code code widget Default Selected code is not called p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected ARROW_DOWN ARROW_UP PAGE_DOWN PAGE_UP widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
static int check Style int style return check Bits style SWT HORIZONTAL SWT VERTICAL 0 0 0 0  checkStyle checkBits
int action Proc int the Control int part Code Event event new Event int value OS Get Control32 Bit Value handle switch part Code case OS k Control Up Button Part value increment event detail SWT ARROW UP break case OS k Control Page Up Part value page Increment event detail SWT PAGE UP break case OS k Control Page Down Part value page Increment event detail SWT PAGE DOWN break case OS k Control Down Button Part value increment event detail SWT ARROW DOWN break case OS k Control Indicator Part dragging true event detail SWT DRAG break default return 0 OS Set Control32 Bit Value handle value send Event SWT Selection event Shell shell get Shell shell update true return 0  actionProc theControl partCode GetControl32BitValue partCode kControlUpButtonPart ARROW_UP kControlPageUpPart pageIncrement PAGE_UP kControlPageDownPart pageIncrement PAGE_DOWN kControlDownButtonPart ARROW_DOWN kControlIndicatorPart SetControl32BitValue sendEvent getShell
public Point compute Size int w Hint int h Hint boolean changed check Widget int out Metric new int 1 OS Get Theme Metric OS k Theme Metric Scroll Bar Width out Metric int width 0 height 0 if style SWT HORIZONTAL 0 height out Metric 0 width height 10 else width out Metric 0 height width 10 if w Hint SWT DEFAULT width w Hint if h Hint SWT DEFAULT height h Hint return new Point width height  computeSize wHint hHint checkWidget outMetric GetThemeMetric kThemeMetricScrollBarWidth outMetric outMetric outMetric wHint wHint hHint hHint
void create Handle int action Proc display action Proc int out Control new int 1 int window OS Get Control Owner parent handle OS Create Scroll Bar Control window null 0 0 90 10 true action Proc out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0  createHandle actionProc actionProc outControl GetControlOwner CreateScrollBarControl actionProc outControl outControl ERROR_NO_HANDLES outControl
void draw Background int control draw Background control background  drawBackground drawBackground
Returns the amount that the receiver s value will be modified by when the up down or right left arrows are pressed return the increment 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 int get Increment check Widget return increment  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getIncrement checkWidget
Returns the maximum value which the receiver will allow return the maximum 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 int get Maximum check Widget int maximum OS Get Control32 Bit Maximum handle int view Size OS Get Control View Size handle return maximum view Size  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMaximum checkWidget GetControl32BitMaximum viewSize GetControlViewSize viewSize
Returns the minimum value which the receiver will allow return the minimum 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 int get Minimum check Widget return OS Get Control32 Bit Minimum handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMinimum checkWidget GetControl32BitMinimum
Returns the amount that the receiver s value will be modified by when the page increment decrement areas are selected return the page increment 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 int get Page Increment check Widget return page Increment  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getPageIncrement checkWidget pageIncrement
Returns the single em selection em that is the receiver s value return the selection 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 int get Selection check Widget return OS Get Control32 Bit Value handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelection checkWidget GetControl32BitValue
Returns the size of the receiver s thumb relative to the difference between its maximum and minimum values return the thumb value 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 int get Thumb check Widget return OS Get Control View Size handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getThumb checkWidget GetControlViewSize
int k Event Mouse Down int next Handler int the Event int user Data int status super k Event Mouse Down next Handler the Event user Data if status OS no Err return status dragging false status OS Call Next Event Handler next Handler the Event if dragging Event event new Event send Event SWT Selection event dragging false return status  kEventMouseDown nextHandler theEvent userData kEventMouseDown nextHandler theEvent userData noErr CallNextEventHandler nextHandler theEvent sendEvent
Removes the listener from the collection of listeners who will be notified when the receiver s value changes param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Selection listener event Table unhook SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable DefaultSelection
Sets the amount that the receiver s value will be modified by when the up down or right left arrows are pressed to the argument which must be at least one param value the new increment must be greater than zero 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 set Increment int value check Widget if value 1 return increment value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setIncrement checkWidget
Sets the maximum If this value is negative or less than or equal to the minimum the value is ignored If necessary first the thumb and then the selection are adjusted to fit within the new range param value the new maximum which must be greater than the current minimum 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 set Maximum int value check Widget if value 0 return int minimum OS Get Control32 Bit Minimum handle if value minimum return int view Size OS Get Control View Size handle if value minimum view Size view Size value minimum OS Set Control View Size handle view Size OS Set Control32 Bit Maximum handle value view Size  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMaximum checkWidget GetControl32BitMinimum viewSize GetControlViewSize viewSize viewSize SetControlViewSize viewSize SetControl32BitMaximum viewSize
Sets the minimum value If this value is negative or greater than or equal to the maximum the value is ignored If necessary first the thumb and then the selection are adjusted to fit within the new range param value the new minimum 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 set Minimum int value check Widget if value 0 return int view Size OS Get Control View Size handle int maximum OS Get Control32 Bit Maximum handle view Size if value maximum return if maximum value view Size view Size maximum value OS Set Control32 Bit Maximum handle maximum view Size OS Set Control View Size handle view Size OS Set Control32 Bit Minimum handle value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMinimum checkWidget viewSize GetControlViewSize GetControl32BitMaximum viewSize viewSize viewSize SetControl32BitMaximum viewSize SetControlViewSize viewSize SetControl32BitMinimum
Sets the amount that the receiver s value will be modified by when the page increment decrement areas are selected to the argument which must be at least one param value the page increment must be greater than zero 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 set Page Increment int value check Widget if value 1 return page Increment value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setPageIncrement checkWidget pageIncrement
Sets the single em selection em that is the receiver s value to the argument which must be greater than or equal to zero param value the new selection must be zero or greater 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 set Selection int value check Widget OS Set Control32 Bit Value handle value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget SetControl32BitValue
Sets the size of the receiver s thumb relative to the difference between its maximum and minimum values This new value will be ignored if it is less than one and will be clamped if it exceeds the receiver s current range param value the new thumb value which must be at least one and not larger than the size of the current range 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 set Thumb int value check Widget if value 1 return int minimum OS Get Control32 Bit Minimum handle int view Size OS Get Control View Size handle int maximum OS Get Control32 Bit Maximum handle view Size value Math min value maximum minimum OS Set Control32 Bit Maximum handle maximum value OS Set Control View Size handle value  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setThumb checkWidget GetControl32BitMinimum viewSize GetControlViewSize GetControl32BitMaximum viewSize SetControl32BitMaximum SetControlViewSize
Sets the receiver s selection minimum value maximum value thumb increment and page increment all at once p Note This is equivalent to setting the values individually using the appropriate methods but may be implemented in a more efficient fashion on some platforms p param selection the new selection value param minimum the new minimum value param maximum the new maximum value param thumb the new thumb value param increment the new increment value param page Increment the new page Increment value 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 set Values int selection int minimum int maximum int thumb int increment int page Increment check Widget if minimum 0 return if maximum 0 return if thumb 1 return if increment 1 return if page Increment 1 return thumb Math min thumb maximum minimum OS Set Control32 Bit Minimum handle minimum OS Set Control32 Bit Maximum handle maximum thumb OS Set Control View Size handle thumb OS Set Control32 Bit Value handle selection this increment increment this page Increment page Increment  pageIncrement pageIncrement SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setValues pageIncrement checkWidget pageIncrement SetControl32BitMinimum SetControl32BitMaximum SetControlViewSize SetControl32BitValue pageIncrement pageIncrement

Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Tab Folder Composite parent int style super parent check Style style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle TabFolder checkStyle
Adds the listener to the collection of listeners who will be notified when the receiver s selection changes by sending it one of the messages defined in the code Selection Listener code interface p When code widget Selected code is called the item field of the event object is valid code widget Default Selected code is not called p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
static int check Style int style style check Bits style SWT TOP SWT BOTTOM 0 0 0 0 Even though it is legal to create this widget with scroll bars they serve no useful purpose because they do not automatically scroll the widget s client area The fix is to clear the SWT style return style SWT H SCROLL SWT V SCROLL  checkStyle checkBits H_SCROLL V_SCROLL
protected void check Subclass if is Valid Subclass error SWT ERROR INVALID SUBCLASS  checkSubclass isValidSubclass ERROR_INVALID_SUBCLASS
public Point compute Size int w Hint int h Hint boolean changed check Widget int width 0 height 0 if w Hint SWT DEFAULT GC gc new GC this for int i 0 i items length i if items i null width items i calculate Width gc gc dispose Point size if layout null size layout compute Size this w Hint h Hint changed else size minimum Size w Hint h Hint changed if size x 0 size x DEFAULT WIDTH if size y 0 size y DEFAULT HEIGHT if w Hint SWT DEFAULT size x w Hint if h Hint SWT DEFAULT size y h Hint width Math max width size x height Math max height size y Rectangle trim compute Trim 0 0 width height width trim width height trim height return new Point width height  computeSize wHint hHint checkWidget wHint calculateWidth computeSize wHint hHint minimumSize wHint hHint DEFAULT_WIDTH DEFAULT_HEIGHT wHint wHint hHint hHint computeTrim
public Rectangle compute Trim int x int y int width int height check Widget Rect bounds old Bounds new Rect OS Get Control Bounds handle old Bounds boolean fix Bounds old Bounds right old Bounds left 100 old Bounds bottom old Bounds top 100 if fix Bounds bounds new Rect bounds right bounds bottom 100 OS Set Control Bounds handle bounds else bounds old Bounds Rect client new Rect OS Get Tab Content Rect handle client if fix Bounds OS Set Control Bounds handle old Bounds x client left bounds left y client top bounds top width bounds right bounds left client right client left height bounds bottom bounds top client bottom client top Rect inset get Inset x inset left y inset top width inset left inset right height inset top inset bottom return new Rectangle x y width height  computeTrim checkWidget oldBounds GetControlBounds oldBounds fixBounds oldBounds oldBounds oldBounds oldBounds fixBounds SetControlBounds oldBounds GetTabContentRect fixBounds SetControlBounds oldBounds getInset
void create Handle int out Control new int 1 int window OS Get Control Owner parent handle short direction style SWT BOTTOM 0 short OS k Control Tab Direction South short OS k Control Tab Direction North OS Create Tabs Control window new Rect short OS k Control Tab Size Large direction short 0 0 out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0  createHandle outControl GetControlOwner kControlTabDirectionSouth kControlTabDirectionNorth CreateTabsControl kControlTabSizeLarge outControl outControl ERROR_NO_HANDLES outControl
void create Item Tab Item item int index int count OS Get Control32 Bit Maximum handle if 0 index index count error SWT ERROR INVALID RANGE OS Set Control32 Bit Maximum handle count 1 if count items length Tab Item new Items new Tab Item items length 4 System arraycopy items 0 new Items 0 items length items new Items System arraycopy items index items index 1 count index items index item Send a selection event when the item that is added becomes the new selection This only happens when the first item is added if count 0 OS Set Control32 Bit Value handle 1 last Selected 0 Event event new Event event item items 0 send Event SWT Selection event the widget could be destroyed at this point  createItem TabItem GetControl32BitMaximum ERROR_INVALID_RANGE SetControl32BitMaximum TabItem newItems TabItem newItems newItems SetControl32BitValue lastSelected sendEvent
void create Widget super create Widget items new Tab Item 4  createWidget createWidget TabItem
void destroy Item Tab Item item int count OS Get Control32 Bit Maximum handle int index 0 while index count if items index item break index if index count return int selection Index OS Get Control32 Bit Value handle 1 count OS Set Control32 Bit Maximum handle count System arraycopy items index 1 items index count index items count null if count 0 items new Tab Item 4 if count 0 index selection Index set Selection Math max 0 selection Index 1 true  destroyItem TabItem GetControl32BitMaximum selectionIndex GetControl32BitValue SetControl32BitMaximum TabItem selectionIndex setSelection selectionIndex
public Rectangle get Client Area check Widget Rect bounds new Rect OS Get Control Bounds handle bounds Rect client new Rect OS Get Control Data handle short OS k Control Entire Control OS k Control Tab Content Rect Tag Rect sizeof client null int x Math max 0 client left bounds left int y Math max 0 client top bounds top int width Math max 0 client right client left int height Math max 0 client bottom client top return new Rectangle x y width height  getClientArea checkWidget GetControlBounds GetControlData kControlEntireControl kControlTabContentRectTag
Returns the item at the given zero relative index in the receiver Throws an exception if the index is out of range param index the index of the item to return return the item at the given index exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li ul 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 Tab Item get Item int index check Widget int count OS Get Control32 Bit Maximum handle if 0 index index count error SWT ERROR INVALID RANGE return items index  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TabItem getItem checkWidget GetControl32BitMaximum ERROR_INVALID_RANGE
Returns the number of items contained in the receiver return the number of items 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 int get Item Count check Widget return OS Get Control32 Bit Maximum handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getItemCount checkWidget GetControl32BitMaximum
Returns an array of code Tab Item code s which are the items in the receiver p Note This is not the actual structure used by the receiver to maintain its list of items so modifying the array will not affect the receiver p return the items in the receiver 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 Tab Item get Items check Widget int count OS Get Control32 Bit Maximum handle Tab Item result new Tab Item count System arraycopy items 0 result 0 count return result  TabItem SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TabItem getItems checkWidget GetControl32BitMaximum TabItem TabItem
Returns an array of code Tab Item code s that are currently selected in the receiver An empty array indicates that no items are selected p Note This is not the actual structure used by the receiver to maintain its selection so modifying the array will not affect the receiver p return an array representing the selection 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 Tab Item get Selection check Widget int index OS Get Control32 Bit Value handle 1 if index 1 return new Tab Item 0 return new Tab Item items index  TabItem SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TabItem getSelection checkWidget GetControl32BitValue TabItem TabItem
Returns the zero relative index of the item which is currently selected in the receiver or 1 if no item is selected return the index of the selected item 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 int get Selection Index check Widget return OS Get Control32 Bit Value handle 1  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelectionIndex checkWidget GetControl32BitValue
Searches the receiver s list starting at the first item index 0 until an item is found that is equal to the argument and returns the index of that item If no item is found returns 1 param item the search item return the index of the item exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul 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 int index Of Tab Item item check Widget if item null error SWT ERROR NULL ARGUMENT int count OS Get Control32 Bit Maximum handle for int i 0 i count i if items i item return i return 1  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS indexOf TabItem checkWidget ERROR_NULL_ARGUMENT GetControl32BitMaximum
Point minimum Size int w Hint int h Hint boolean flush Cache Control children  getChildren int width 0 height 0 for int i 0 i children length i Control child children i int index 0 int count OS Get Control32 Bit Maximum handle while index count if items index control child break index if index count Rectangle rect child get Bounds width Math max width rect x rect width height Math max height rect y rect height else Point size child compute Size w Hint h Hint flush Cache width Math max width size x height Math max height size y return new Point width height  minimumSize wHint hHint flushCache _getChildren GetControl32BitMaximum getBounds computeSize wHint hHint flushCache
Rect get Inset return style SWT BOTTOM 0 display tab Folder South Inset display tab Folder North Inset  getInset tabFolderSouthInset tabFolderNorthInset
int k Event Control Apply Background int next Handler int the Event int user Data Feature in the Macintosh For some reason the tab folder applies the theme background when drawing even though a theme has not been set for the window The fix is to avoid running the default handler return OS no Err  kEventControlApplyBackground nextHandler theEvent userData noErr
int k Event Control Hit int next Handler int the Event int user Data int result super k Event Control Hit next Handler the Event user Data if result OS no Err return result int index OS Get Control32 Bit Value handle 1 if index last Selected return result last Selected index int count OS Get Control32 Bit Maximum handle for int i 0 i count i if i index Control control items i control if control null control is Disposed control set Visible false Tab Item item null if index 1 item items index if item null Control control item control if control null control is Disposed control set Bounds get Client Area control set Visible true Event event new Event event item item post Event SWT Selection event return OS no Err  kEventControlHit nextHandler theEvent userData kEventControlHit nextHandler theEvent userData noErr GetControl32BitValue lastSelected lastSelected GetControl32BitMaximum isDisposed setVisible TabItem isDisposed setBounds getClientArea setVisible postEvent noErr
void release Widget int count OS Get Control32 Bit Maximum handle for int i 0 i count i Tab Item item items i if item is Disposed item release Resources items null super release Widget  releaseWidget GetControl32BitMaximum TabItem isDisposed releaseResources releaseWidget
Removes the listener from the collection of listeners who will be notified when the receiver s selection changes param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Selection listener event Table unhook SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable DefaultSelection
int set Bounds int c int x int y int width int height boolean move boolean resize boolean events int result super set Bounds c x y width height move resize events if result RESIZED 0 int index OS Get Control32 Bit Value handle 1 if index 1 Tab Item item items index Control control item control if control null control is Disposed control set Bounds get Client Area return result  setBounds setBounds GetControl32BitValue TabItem isDisposed setBounds getClientArea
Sets the receiver s selection to be the given array of items The current selected is first cleared then the new items are selected param items the array of items 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 set Selection Tab Item items check Widget if items null error SWT ERROR NULL ARGUMENT if items length 0 set Selection 1 false else for int i items length 1 i 0 i int index index Of items i if index 1 set Selection index false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection TabItem checkWidget ERROR_NULL_ARGUMENT setSelection indexOf setSelection
Selects the item at the given zero relative index in the receiver If the item at the index was already selected it remains selected The current selection is first cleared then the new items are selected Indices that are out of range are ignored param index the index of the item to select 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 set Selection int index check Widget int count OS Get Control32 Bit Maximum handle if 0 index index count return set Selection index false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget GetControl32BitMaximum setSelection
void set Selection int index boolean notify if index OS Get Control32 Bit Maximum handle return int current Index OS Get Control32 Bit Value handle 1 if current Index 1 Tab Item item items current Index if item null Control control item control if control null control is Disposed control set Visible false OS Set Control32 Bit Value handle index 1 index OS Get Control32 Bit Value handle 1 last Selected index if index 1 Tab Item item items index if item null Control control item control if control null control is Disposed control set Bounds get Client Area control set Visible true if notify Event event new Event event item item send Event SWT Selection event  setSelection GetControl32BitMaximum currentIndex GetControl32BitValue currentIndex TabItem currentIndex isDisposed setVisible SetControl32BitValue GetControl32BitValue lastSelected TabItem isDisposed setBounds getClientArea setVisible sendEvent
boolean traverse Page boolean next int count get Item Count if count 0 return false int index get Selection Index if index 1 index 0 else int offset next 1 1 index index offset count count set Selection index true return index get Selection Index  traversePage getItemCount getSelectionIndex setSelection getSelectionIndex

Constructs a new instance of this class given its parent which must be a code Tab Folder code and a style value describing its behavior and appearance The item is added to the end of the items maintained by its parent p The style value is either one of the style constants defined in 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Tab Item Tab Folder parent int style super parent style this parent parent parent create Item this parent get Item Count  TabFolder IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle TabItem TabFolder createItem getItemCount
Constructs a new instance of this class given its parent which must be a code Tab Folder code a style value describing its behavior and appearance and the index at which to place it in the items maintained by its parent p The style value is either one of the style constants defined in 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 param index the index to store the receiver in its parent exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li li ERROR INVALID RANGE if the index is either negative or greater than the parent s current tab count li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Tab Item Tab Folder parent int style int index super parent style this parent parent parent create Item this index  TabFolder IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_RANGE SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle TabItem TabFolder createItem
int calculate Width GC gc int width 0 Image image get Image String text get Text if image null width image get Bounds width 2 if text null text length 0 width gc string Extent text x return width EXTRA WIDTH  calculateWidth getImage getText getBounds stringExtent EXTRA_WIDTH
protected void check Subclass if is Valid Subclass error SWT ERROR INVALID SUBCLASS  checkSubclass isValidSubclass ERROR_INVALID_SUBCLASS
Returns the control that is used to fill the client area of the tab folder when the user selects the tab item If no control has been set return code null code p return the control 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 Control get Control check Widget return control  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getControl checkWidget
Returns the receiver s parent which must be a code Tab Folder code return the receiver s parent 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 Tab Folder get Parent check Widget return parent  TabFolder SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TabFolder getParent checkWidget
Returns the receiver s tool tip text or null if it has not been set return the receiver s tool tip text 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 String get Tool Tip Text check Widget return tool Tip Text  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getToolTipText checkWidget toolTipText
void release Child super release Child int index parent index Of this if index parent get Selection Index if control null control set Visible false parent destroy Item this  releaseChild releaseChild indexOf getSelectionIndex setVisible destroyItem
void release Widget TEMPORARY CODE if control null control set Visible false super release Widget if c Icon 0 destroyC Icon c Icon c Icon 0 control null parent null  releaseWidget setVisible releaseWidget cIcon destroyCIcon cIcon cIcon
Sets the control that is used to fill the client area of the tab folder when the user selects the tab item p param control the new control or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the control has been disposed li li ERROR INVALID PARENT if the control is not in the same widget tree li ul 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 set Control Control control check Widget if control null if control is Disposed error SWT ERROR INVALID ARGUMENT if control parent parent error SWT ERROR INVALID PARENT if this control null this control is Disposed this control null Control old Control this control new Control control this control control int index parent index Of this if index parent get Selection Index if new Control null new Control set Visible false return if new Control null new Control set Bounds parent get Client Area new Control set Visible true if old Control null old Control set Visible false  IllegalArgumentException ERROR_INVALID_ARGUMENT ERROR_INVALID_PARENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setControl checkWidget isDisposed ERROR_INVALID_ARGUMENT ERROR_INVALID_PARENT isDisposed oldControl newControl indexOf getSelectionIndex newControl newControl setVisible newControl newControl setBounds getClientArea newControl setVisible oldControl oldControl setVisible
public void set Image Image image check Widget int index parent index Of this if index 1 return super set Image image if c Icon 0 destroyC Icon c Icon c Icon 0 Control Button Content Info in Content new Control Button Content Info if image null in Content content Type short OS k Control Content Text Only else c Icon createC Icon image in Content content Type short OS k Control ContentC Icon Handle in Content icon Ref c Icon OS Set Control Data parent handle index 1 OS k Control Tab Image Content Tag Control Button Content Info sizeof in Content parent redraw  setImage checkWidget indexOf setImage cIcon destroyCIcon cIcon cIcon ControlButtonContentInfo inContent ControlButtonContentInfo inContent contentType kControlContentTextOnly cIcon createCIcon inContent contentType kControlContentCIconHandle inContent iconRef cIcon SetControlData kControlTabImageContentTag ControlButtonContentInfo inContent
Sets the receiver s text The string may include the mnemonic character p p Mnemonics are indicated by an amp that causes the next character to be the mnemonic When the user presses a key sequence that matches the mnemonic a selection event occurs On most platforms the mnemonic appears underlined but may be emphasised in a platform specific manner The mnemonic indicator character amp can be escaped by doubling it in the string causing a single amp to be displayed p param string the new text exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the text is null li ul 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 set Text String string check Widget if string null error SWT ERROR NULL ARGUMENT int index parent index Of this if index 1 return super set Text string char buffer new char text length text get Chars 0 buffer length buffer 0 int length fix Mnemonic buffer int ptr OS CF String Create With Characters OS kCF Allocator Default buffer length if ptr 0 error SWT ERROR CANNOT SET TEXT Control Tab Info RecV1 tab new Control Tab Info RecV1 tab version short OS k Control Tab Info Version One tab icon SuiteID 0 tab name ptr OS Set Control Data parent handle index 1 OS k Control Tab Info Tag Control Tab Info RecV1 sizeof tab OS CF Release ptr  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setText checkWidget ERROR_NULL_ARGUMENT indexOf setText getChars fixMnemonic CFStringCreateWithCharacters kCFAllocatorDefault ERROR_CANNOT_SET_TEXT ControlTabInfoRecV1 ControlTabInfoRecV1 kControlTabInfoVersionOne iconSuiteID SetControlData kControlTabInfoTag ControlTabInfoRecV1 CFRelease
Sets the receiver s tool tip text to the argument which may be null indicating that no tool tip text should be shown param string the new tool tip text or null 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 set Tool Tip Text String string check Widget tool Tip Text string  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setToolTipText checkWidget toolTipText

Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT SINGLE see SWT MULTI see SWT CHECK see SWT FULL SELECTION see SWT HIDE SELECTION see Widget check Subclass see Widget get Style public Table Composite parent int style super parent check Style style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS FULL_SELECTION HIDE_SELECTION checkSubclass getStyle checkStyle
Adds the listener to the collection of listeners who will be notified when the receiver s selection changes by sending it one of the messages defined in the code Selection Listener code interface p When code widget Selected code is called the item field of the event object is valid If the reciever has code SWT CHECK code style set and the check selection changes the event object detail field contains the value code SWT CHECK code code widget Default Selected code is typically called when an item is double clicked The item field of the event object is valid for default selection but the detail field is not used p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
Table Item  getItem int index if items index null return items index return items index new Table Item this SWT NULL 1 false  TableItem _getItem TableItem
static int check Style int style Feature in Windows It is not possible to create a table that does not have scroll bars Therefore no matter what style bits are specified set the H SCROLL and V SCROLL bits so that the SWT style will match the widget that Windows creates style SWT H SCROLL SWT V SCROLL return check Bits style SWT SINGLE SWT MULTI 0 0 0 0  checkStyle H_SCROLL V_SCROLL H_SCROLL V_SCROLL checkBits
int call Paint Event Handler int control int damage Rgn int visible Rgn int the Event int next Handler GC currentGC paintGC if currentGC null GC Data data new GC Data data paint Event the Event data visible Rgn visible Rgn paintGC GC carbon new this data int result super call Paint Event Handler control damage Rgn visible Rgn the Event next Handler if currentGC null paintGC dispose paintGC null return result  callPaintEventHandler damageRgn visibleRgn theEvent nextHandler GCData GCData paintEvent theEvent visibleRgn visibleRgn carbon_new callPaintEventHandler damageRgn visibleRgn theEvent nextHandler
void check Items boolean set Scroll Width int count new int 1 if OS Get Data Browser Item Count handle OS k Data Browser No Item true OS k Data Browser Item Any State count OS no Err error SWT ERROR CANNOT GET COUNT if item Count count 0 Feature in the Mac When Add Data Browser Items is used to add items item notification callbacks are issued with the message k Data Browser Item Added When many items are added this is slow The fix is to temporarily remove the item notification callback Data Browser Callbacks callbacks new Data Browser Callbacks OS Get Data Browser Callbacks handle callbacks callbacks v1 itemNotificationCallback 0 OS Set Data Browser Callbacks handle callbacks int delta item Count count 0 if delta 1024 int ids new int delta for int i 0 i ids length i ids i count 0 i 1 if OS Add Data Browser Items handle OS k Data Browser No Item ids length ids OS k Data Browser Item No Property OS no Err error SWT ERROR ITEM NOT ADDED OS Update Data Browser Items handle 0 0 null OS k Data Browser Item No Property OS k Data Browser No Item else if OS Add Data Browser Items handle 0 item Count null OS k Data Browser Item No Property OS no Err error SWT ERROR ITEM NOT ADDED callbacks v1 itemNotificationCallback display item Notification Proc OS Set Data Browser Callbacks handle callbacks if set Scroll Width set Scroll Width items true  checkItems setScrollWidth GetDataBrowserItemCount kDataBrowserNoItem kDataBrowserItemAnyState noErr ERROR_CANNOT_GET_COUNT itemCount AddDataBrowserItems kDataBrowserItemAdded DataBrowserCallbacks DataBrowserCallbacks GetDataBrowserCallbacks v1_itemNotificationCallback SetDataBrowserCallbacks itemCount AddDataBrowserItems kDataBrowserNoItem kDataBrowserItemNoProperty noErr ERROR_ITEM_NOT_ADDED UpdateDataBrowserItems kDataBrowserItemNoProperty kDataBrowserNoItem AddDataBrowserItems itemCount kDataBrowserItemNoProperty noErr ERROR_ITEM_NOT_ADDED v1_itemNotificationCallback itemNotificationProc SetDataBrowserCallbacks setScrollWidth setScrollWidth
protected void check Subclass if is Valid Subclass error SWT ERROR INVALID SUBCLASS  checkSubclass isValidSubclass ERROR_INVALID_SUBCLASS
Clears the item at the given zero relative index in the receiver The text icon and other attribues of the item are set to the default value If the table was created with the SWT VIRTUAL style these attributes are requested again as needed param index the index of the item to clear exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li ul 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 SWT VIRTUAL see SWT Set Data since 3 0 public void clear int index check Widget if 0 index index item Count error SWT ERROR INVALID RANGE Table Item item items index if item null item clear item cached false if ignore Redraw draw Count 0 int id new int index 1 OS Update Data Browser Items handle 0 id length id OS k Data Browser Item No Property OS k Data Browser No Item set Scroll Width item  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SetData checkWidget itemCount ERROR_INVALID_RANGE TableItem ignoreRedraw drawCount UpdateDataBrowserItems kDataBrowserItemNoProperty kDataBrowserNoItem setScrollWidth
Removes the items from the receiver which are between the given zero relative start and end indices inclusive The text icon and other attribues of the items are set to their default values If the table was created with the SWT VIRTUAL style these attributes are requested again as needed param start the start index of the item to clear param end the end index of the item to clear exception Illegal Argument Exception ul li ERROR INVALID RANGE if either the start or end are not between 0 and the number of elements in the list minus 1 inclusive li ul 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 SWT VIRTUAL see SWT Set Data since 3 0 public void clear int start int end check Widget if start end return if 0 start start end end item Count error SWT ERROR INVALID RANGE if start 0 end item Count 1 clear All else for int i start i end i clear i  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SetData checkWidget itemCount ERROR_INVALID_RANGE itemCount clearAll
Clears the items at the given zero relative indices in the receiver The text icon and other attribues of the items are set to their default values If the table was created with the SWT VIRTUAL style these attributes are requested again as needed param indices the array of indices of the items exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li li ERROR NULL ARGUMENT if the indices array is null li ul 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 SWT VIRTUAL see SWT Set Data since 3 0 public void clear int indices check Widget if indices null error SWT ERROR NULL ARGUMENT if indices length 0 return for int i 0 i indices length i if 0 indices i indices i item Count error SWT ERROR INVALID RANGE for int i 0 i indices length i clear indices i  IllegalArgumentException ERROR_INVALID_RANGE ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SetData checkWidget ERROR_NULL_ARGUMENT itemCount ERROR_INVALID_RANGE
Clears all the items in the receiver The text icon and other attribues of the items are set to their default values If the table was created with the SWT VIRTUAL style these attributes are requested again as needed 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 SWT VIRTUAL see SWT Set Data since 3 0 public void clear All check Widget for int i 0 i item Count i Table Item item items i if item null item clear item cached false if ignore Redraw draw Count 0 OS Update Data Browser Items handle 0 0 null OS k Data Browser Item No Property OS k Data Browser No Item set Scroll Width items true  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SetData clearAll checkWidget itemCount TableItem ignoreRedraw drawCount UpdateDataBrowserItems kDataBrowserItemNoProperty kDataBrowserNoItem setScrollWidth
public Point compute Size int w Hint int h Hint boolean changed check Widget int width 0 if w Hint SWT DEFAULT GC gc new GC this int column Count Math max this column Count 1 for int j 0 j column Count j int column Width 0 for int i 0 i item Count i Table Item item items i if item null column Width Math max column Width item calculate Width j gc width column Width EXTRA WIDTH gc dispose if style SWT CHECK 0 width CHECK COLUMN WIDTH else width w Hint if width 0 width DEFAULT WIDTH int height 0 if h Hint SWT DEFAULT height item Count get Item Height get Header Height else height h Hint if height 0 height DEFAULT HEIGHT Rectangle rect compute Trim 0 0 width height return new Point rect width rect height  computeSize wHint hHint checkWidget wHint columnCount columnCount columnCount columnWidth itemCount TableItem columnWidth columnWidth calculateWidth columnWidth EXTRA_WIDTH CHECK_COLUMN_WIDTH wHint DEFAULT_WIDTH hHint itemCount getItemHeight getHeaderHeight hHint DEFAULT_HEIGHT computeTrim
public Rectangle compute Trim int x int y int width int height check Widget int border 0 int out Metric new int 1 OS Get Theme Metric OS k Theme Metric Focus Rect Outset out Metric border out Metric 0 OS Get Theme Metric OS k Theme Metric Edit Text Frame Outset out Metric border out Metric 0 Rect rect new Rect OS Get Data Browser Scroll Bar Inset handle rect x rect left border y rect top border width rect left rect right border border height rect top rect bottom border border return new Rectangle x y width height  computeTrim checkWidget outMetric GetThemeMetric kThemeMetricFocusRectOutset outMetric outMetric GetThemeMetric kThemeMetricEditTextFrameOutset outMetric outMetric GetDataBrowserScrollBarInset
void create Handle column id 1025 int out Control new int 1 int window OS Get Control Owner parent handle OS Create Data Browser Control window null OS k Data Browser List View out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0 if draw Focus Ring OS Set Control Data handle OS k Control Entire Control OS k Control Data Browser Includes Frame And Focus Tag 1 new byte 0 int selection Flags style SWT SINGLE 0 OS k Data Browser Select Only One OS k Data Browser Never Empty Selection Set OS k Data Browser Cmd Toggles Selection OS Set Data Browser Selection Flags handle selection Flags short height new short 1 OS Get Data Browser List View Header Btn Height handle height header Height height 0 OS Set Data Browser List View Header Btn Height handle short 0 OS Set Data Browser Has Scroll Bars handle style SWT H SCROLL 0 style SWT V SCROLL 0 if style SWT FULL SELECTION 0 OS Set Data Browser Table View Hilite Style handle OS k Data Browser Table View Fill Hilite int position 0 if style SWT CHECK 0 Data Browser List View Column Desc check Column new Data Browser List View Column Desc check Column headerBtnDesc version OS k Data Browser List View Latest Header Desc check Column propertyDesc propertyID CHECK COLUMN ID check Column propertyDesc propertyType OS k Data Browser Checkbox Type check Column propertyDesc propertyFlags OS k Data Browser Property Is Mutable TODO CHECK column size check Column headerBtnDesc minimumWidth CHECK COLUMN WIDTH check Column headerBtnDesc maximumWidth CHECK COLUMN WIDTH check Column headerBtnDesc initialOrder short OS k Data Browser Order Increasing OS Add Data Browser List View Column handle check Column position Data Browser List View Column Desc column new Data Browser List View Column Desc column headerBtnDesc version OS k Data Browser List View Latest Header Desc column propertyDesc propertyID column id column propertyDesc propertyType OS k Data Browser Custom Type column propertyDesc propertyFlags OS k Data Browser List View Selection Column OS k Data Browser Default Property Flags column headerBtnDesc maximumWidth 0x7fff column headerBtnDesc initialOrder short OS k Data Browser Order Increasing OS Add Data Browser List View Column handle column position OS Set Data Browser Table View Named Column Width handle column id short 0 Feature in the Macintosh Scroll bars are not created until the data browser needs to draw them The fix is to force the scroll bars to be created by temporarily giving the widget a size drawing it on a offscreen buffer to avoid flashes and then restoring it to size zero int size 50 Rect rect new Rect rect right rect bottom short size OS Set Control Bounds handle rect int bpl size 4 int g World new int 1 int data OS New Ptr bpl size OS NewG World From Ptr g World OS k32ARGB Pixel Format rect 0 0 0 data bpl int cur Port new int 1 int curG World new int 1 OS GetG World cur Port curG World OS SetG World g World 0 curG World 0 OS Draw Control In Current Port handle OS SetG World cur Port 0 curG World 0 OS DisposeG World g World 0 OS Dispose Ptr data rect right rect bottom short 0 OS Set Control Bounds handle rect  createHandle column_id outControl GetControlOwner CreateDataBrowserControl kDataBrowserListView outControl outControl ERROR_NO_HANDLES outControl drawFocusRing SetControlData kControlEntireControl kControlDataBrowserIncludesFrameAndFocusTag selectionFlags kDataBrowserSelectOnlyOne kDataBrowserNeverEmptySelectionSet kDataBrowserCmdTogglesSelection SetDataBrowserSelectionFlags selectionFlags GetDataBrowserListViewHeaderBtnHeight headerHeight SetDataBrowserListViewHeaderBtnHeight SetDataBrowserHasScrollBars H_SCROLL V_SCROLL FULL_SELECTION SetDataBrowserTableViewHiliteStyle kDataBrowserTableViewFillHilite DataBrowserListViewColumnDesc checkColumn DataBrowserListViewColumnDesc checkColumn headerBtnDesc_version kDataBrowserListViewLatestHeaderDesc checkColumn propertyDesc_propertyID CHECK_COLUMN_ID checkColumn propertyDesc_propertyType kDataBrowserCheckboxType checkColumn propertyDesc_propertyFlags kDataBrowserPropertyIsMutable checkColumn headerBtnDesc_minimumWidth CHECK_COLUMN_WIDTH checkColumn headerBtnDesc_maximumWidth CHECK_COLUMN_WIDTH checkColumn headerBtnDesc_initialOrder kDataBrowserOrderIncreasing AddDataBrowserListViewColumn checkColumn DataBrowserListViewColumnDesc DataBrowserListViewColumnDesc headerBtnDesc_version kDataBrowserListViewLatestHeaderDesc propertyDesc_propertyID column_id propertyDesc_propertyType kDataBrowserCustomType propertyDesc_propertyFlags kDataBrowserListViewSelectionColumn kDataBrowserDefaultPropertyFlags headerBtnDesc_maximumWidth headerBtnDesc_initialOrder kDataBrowserOrderIncreasing AddDataBrowserListViewColumn SetDataBrowserTableViewNamedColumnWidth column_id SetControlBounds gWorld NewPtr NewGWorldFromPtr gWorld k32ARGBPixelFormat curPort curGWorld GetGWorld curPort curGWorld SetGWorld gWorld curGWorld DrawControlInCurrentPort SetGWorld curPort curGWorld DisposeGWorld gWorld DisposePtr SetControlBounds
void create Item Table Column column int index if 0 index index column Count error SWT ERROR INVALID RANGE column id column id id Count int position index style SWT CHECK 0 1 0 if column Count 0 Data Browser List View Column Desc desc new Data Browser List View Column Desc desc headerBtnDesc version OS k Data Browser List View Latest Header Desc desc propertyDesc propertyID column id desc propertyDesc propertyType OS k Data Browser Custom Type desc propertyDesc propertyFlags OS k Data Browser Default Property Flags desc headerBtnDesc maximumWidth 0x7fff desc headerBtnDesc initialOrder OS k Data Browser Order Increasing desc headerBtnDesc btnFontStyle just OS te Flush Left if style SWT CENTER 0 desc headerBtnDesc btnFontStyle just OS te Center if style SWT RIGHT 0 desc headerBtnDesc btnFontStyle just OS te Flush Right desc headerBtnDesc btnFontStyle flags OS k Control Use Just Mask OS Add Data Browser List View Column handle desc position OS Set Data Browser Table View Named Column Width handle column id short 0 if column Count columns length Table Column new Columns new Table Column column Count 4 System arraycopy columns 0 new Columns 0 columns length columns new Columns System arraycopy columns index columns index 1 column Count index columns index column if column Count 1 for int i 0 i item Count i Table Item item items i if item null String strings item strings if strings null String temp new String column Count System arraycopy strings 0 temp 0 index System arraycopy strings index temp index 1 column Count index 1 temp index item strings temp if index 0 item text Image images item images if images null Image temp new Image column Count System arraycopy images 0 temp 0 index System arraycopy images index temp index 1 column Count index 1 item images temp if index 0 item image null Color cell Background item cell Background if cell Background null Color temp new Color column Count System arraycopy cell Background 0 temp 0 index System arraycopy cell Background index temp index 1 column Count index 1 item cell Background temp Color cell Foreground item cell Foreground if cell Foreground null Color temp new Color column Count System arraycopy cell Foreground 0 temp 0 index System arraycopy cell Foreground index temp index 1 column Count index 1 item cell Foreground temp Font cell Font item cell Font if cell Font null Font temp new Font column Count System arraycopy cell Font 0 temp 0 index System arraycopy cell Font index temp index 1 column Count index 1 item cell Font temp  createItem TableColumn columnCount ERROR_INVALID_RANGE column_id idCount columnCount DataBrowserListViewColumnDesc DataBrowserListViewColumnDesc headerBtnDesc_version kDataBrowserListViewLatestHeaderDesc propertyDesc_propertyID propertyDesc_propertyType kDataBrowserCustomType propertyDesc_propertyFlags kDataBrowserDefaultPropertyFlags headerBtnDesc_maximumWidth headerBtnDesc_initialOrder kDataBrowserOrderIncreasing headerBtnDesc_btnFontStyle_just teFlushLeft headerBtnDesc_btnFontStyle_just teCenter headerBtnDesc_btnFontStyle_just teFlushRight headerBtnDesc_btnFontStyle_flags kControlUseJustMask AddDataBrowserListViewColumn SetDataBrowserTableViewNamedColumnWidth columnCount TableColumn newColumns TableColumn columnCount newColumns newColumns columnCount columnCount itemCount TableItem columnCount columnCount columnCount columnCount cellBackground cellBackground cellBackground columnCount cellBackground cellBackground columnCount cellBackground cellForeground cellForeground cellForeground columnCount cellForeground cellForeground columnCount cellForeground cellFont cellFont cellFont columnCount cellFont cellFont columnCount cellFont
void create Item Table Item item int index if 0 index index item Count error SWT ERROR INVALID RANGE boolean add draw Count 0 index item Count if add int id new int item Count 1 if OS Add Data Browser Items handle OS k Data Browser No Item 1 id OS k Data Browser Item No Property OS no Err error SWT ERROR ITEM NOT ADDED if item Count items length Grow the array faster when redraw is off int length draw Count 0 items length 4 Math max 4 items length 3 2 Table Item new Items new Table Item length System arraycopy items 0 new Items 0 items length items new Items System arraycopy items index items index 1 item Count index items index item if add OS Update Data Browser Items handle 0 0 null OS k Data Browser Item No Property OS k Data Browser No Item  createItem TableItem itemCount ERROR_INVALID_RANGE drawCount itemCount itemCount AddDataBrowserItems kDataBrowserNoItem kDataBrowserItemNoProperty noErr ERROR_ITEM_NOT_ADDED itemCount drawCount TableItem newItems TableItem newItems newItems itemCount UpdateDataBrowserItems kDataBrowserItemNoProperty kDataBrowserNoItem
Scroll Bar create Scroll Bar int style return create Standard Bar style  ScrollBar createScrollBar createStandardBar
void create Widget super create Widget items new Table Item 4 columns new Table Column 4 show Index 1  createWidget createWidget TableItem TableColumn showIndex
Color default Background return display get System Color SWT COLOR LIST BACKGROUND  defaultBackground getSystemColor COLOR_LIST_BACKGROUND
Color default Foreground return display get System Color SWT COLOR LIST FOREGROUND  defaultForeground getSystemColor COLOR_LIST_FOREGROUND
int default Theme Font if display small Fonts return OS k Theme Small System Font return OS k Theme Views Font  defaultThemeFont smallFonts kThemeSmallSystemFont kThemeViewsFont
Deselects the item at the given zero relative index in the receiver If the item at the index was already deselected it remains deselected Indices that are out of range are ignored param index the index of the item to deselect 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 deselect int index check Widget if 0 index index item Count int ids new int index 1 deselect ids ids length  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget itemCount
Deselects the items at the given zero relative indices in the receiver If the item at the given zero relative index in the receiver is selected it is deselected If the item at the index was not selected it remains deselected The range of the indices is inclusive Indices that are out of range are ignored param start the start index of the items to deselect param end the end index of the items to deselect 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 deselect int start int end check Widget TODO check range if start 0 end item Count 1 deselect All else int length end start 1 if length 0 return int ids new int length for int i 0 i length i ids i end i 1 deselect ids length  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget itemCount deselectAll
Deselects the items at the given zero relative indices in the receiver If the item at the given zero relative index in the receiver is selected it is deselected If the item at the index was not selected it remains deselected Indices that are out of range and duplicate indices are ignored param indices the array of indices for the items to deselect exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the set of indices is null li ul 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 deselect int indices check Widget if indices null error SWT ERROR NULL ARGUMENT TODO check range int length indices length int ids new int length for int i 0 i length i ids i indices length i 1 1 deselect ids length  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget ERROR_NULL_ARGUMENT
void deselect int ids int count ignore Select true int selection Flags null if style SWT SINGLE 0 selection Flags new int 1 OS Get Data Browser Selection Flags handle selection Flags OS Set Data Browser Selection Flags handle selection Flags 0 OS k Data Browser Never Empty Selection Set OS Set Data Browser Selected Items handle count ids OS k Data Browser Items Remove if style SWT SINGLE 0 OS Set Data Browser Selection Flags handle selection Flags 0 ignore Select false  ignoreSelect selectionFlags selectionFlags GetDataBrowserSelectionFlags selectionFlags SetDataBrowserSelectionFlags selectionFlags kDataBrowserNeverEmptySelectionSet SetDataBrowserSelectedItems kDataBrowserItemsRemove SetDataBrowserSelectionFlags selectionFlags ignoreSelect
Deselects all selected items in the receiver 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 deselect All check Widget deselect null 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS deselectAll checkWidget
void destroy Item Table Column column int index 0 while index column Count if columns index column break index if column Count 1 for int i 0 i item Count i Table Item item items i if item null String strings item strings if strings null if column Count 1 item strings null else if index 0 item text strings 1 String temp new String column Count 1 System arraycopy strings 0 temp 0 index System arraycopy strings index 1 temp index column Count 1 index item strings temp Image images item images if images null if column Count 1 item images null else if index 0 item image images 1 Image temp new Image column Count 1 System arraycopy images 0 temp 0 index System arraycopy images index 1 temp index column Count 1 index item images temp Color cell Background item cell Background if cell Background null if column Count 1 item cell Background null else Color temp new Color column Count 1 System arraycopy cell Background 0 temp 0 index System arraycopy cell Background index 1 temp index column Count 1 index item cell Background temp Color cell Foreground item cell Foreground if cell Foreground null if column Count 1 item cell Foreground null else Color temp new Color column Count 1 System arraycopy cell Foreground 0 temp 0 index System arraycopy cell Foreground index 1 temp index column Count 1 index item cell Foreground temp Font cell Font item cell Font if cell Font null if column Count 1 item cell Font null else Font temp new Font column Count 1 System arraycopy cell Font 0 temp 0 index System arraycopy cell Font index 1 temp index column Count 1 index item cell Font temp if column Count 1 column id column id id Count 0 Data Browser List View Header Desc desc new Data Browser List View Header Desc desc version OS k Data Browser List View Latest Header Desc short width new short 1 OS Get Data Browser Table View Named Column Width handle column id width desc minimum Width desc maximum Width width 0 int str OS CF String Create With Characters OS kCF Allocator Default null 0 desc title String str OS Set Data Browser List View Header Desc handle column id desc OS CF Release str else if OS Remove Data Browser Table View Column handle column id OS no Err error SWT ERROR ITEM NOT REMOVED System arraycopy columns index 1 columns index column Count index columns column Count null  destroyItem TableColumn columnCount columnCount itemCount TableItem columnCount columnCount columnCount columnCount columnCount columnCount cellBackground cellBackground cellBackground columnCount cellBackground columnCount cellBackground cellBackground columnCount cellBackground cellForeground cellForeground cellForeground columnCount cellForeground columnCount cellForeground cellForeground columnCount cellForeground cellFont cellFont cellFont columnCount cellFont columnCount cellFont cellFont columnCount cellFont columnCount column_id idCount DataBrowserListViewHeaderDesc DataBrowserListViewHeaderDesc kDataBrowserListViewLatestHeaderDesc GetDataBrowserTableViewNamedColumnWidth column_id minimumWidth maximumWidth CFStringCreateWithCharacters kCFAllocatorDefault titleString SetDataBrowserListViewHeaderDesc column_id CFRelease RemoveDataBrowserTableViewColumn noErr ERROR_ITEM_NOT_REMOVED columnCount columnCount
void destroy Item Table Item item check Items true int index 0 while index item Count if items index item break index int id new int item Count if OS Remove Data Browser Items handle OS k Data Browser No Item id length id 0 OS no Err error SWT ERROR ITEM NOT REMOVED System arraycopy items index 1 items index item Count index items item Count null OS Update Data Browser Items handle 0 0 null OS k Data Browser Item No Property OS k Data Browser No Item  destroyItem TableItem checkItems itemCount itemCount RemoveDataBrowserItems kDataBrowserNoItem noErr ERROR_ITEM_NOT_REMOVED itemCount itemCount UpdateDataBrowserItems kDataBrowserItemNoProperty kDataBrowserNoItem
int draw Item Proc int browser int id int property int item State int the Rect int gd Depth int color Device int index id 1 if 0 index index item Count return OS no Err int column Index 0 if column Count 0 for column Index 0 column Index column Count column Index if columns column Index id property break if column Index column Count return OS no Err last Index Of index Table Item item  getItem index if item cached if style SWT VIRTUAL 0 Event event new Event event item item ignore Redraw true send Event SWT Set Data event widget could be disposed at this point if is Disposed return OS no Err ignore Redraw false if set Scroll Width item Rect rect new Rect if OS Get Data Browser Item Part Bounds handle id property OS k Data Browser Property Enclosing Part rect OS no Err redraw Widget handle rect left rect top rect right rect bottom false return OS no Err item cached true Rect rect new Rect OS memcpy rect the Rect Rect sizeof int x rect left int y rect top int width rect right rect left int height rect bottom rect top boolean selected item State OS k Data Browser Item Is Selected 0 Rect control Rect new Rect OS Get Control Bounds handle control Rect x control Rect left y control Rect top GC gc paintGC if gc null GC Data data new GC Data int port new int 1 OS Get Port port data port port 0 gc GC carbon new this data int clip OS New Rgn OS Get Clip clip OS Offset Rgn clip short control Rect left short control Rect top gc set Clipping Region carbon new display clip Rect item Rect new Rect OS Get Data Browser Item Part Bounds handle id property OS k Data Browser Property Enclosing Part item Rect OS Offset Rect item Rect short control Rect left short control Rect top if selected style SWT FULL SELECTION 0 gc set Background display get System Color SWT COLOR LIST SELECTION gc fill Rectangle item Rect left item Rect top item Rect right item Rect left item Rect bottom item Rect top else gc set Background item get Background column Index gc fill Rectangle item Rect left item Rect top item Rect right item Rect left item Rect bottom item Rect top int rect Rgn OS New Rgn OS Rect Rgn rect Rgn rect OS Offset Rgn rect Rgn short control Rect left short control Rect top OS Sect Rgn rect Rgn clip clip OS Dispose Rgn rect Rgn gc set Clipping Region carbon new display clip OS Dispose Rgn clip Image image item get Image column Index String text item get Text column Index gc set Font item get Font column Index Point extent gc string Extent text int item Width extent x Rectangle image Bounds null if image null image Bounds image get Bounds item Width image Bounds width 2 if column Count 0 Table Column column columns column Index if column style SWT CENTER 0 x width item Width 2 if column style SWT RIGHT 0 x width item Width if image null gc draw Image image 0 0 image Bounds width image Bounds height x y height image Bounds height 2 image Bounds width image Bounds height x image Bounds width 2 if selected gc set Foreground display get System Color SWT COLOR LIST SELECTION TEXT if column Index 0 style SWT FULL SELECTION 0 gc set Background display get System Color SWT COLOR LIST SELECTION gc fill Rectangle x 1 y extent x 2 height else Color foreground item get Foreground column Index gc set Foreground foreground gc draw String text x y height extent y 2 if gc paintGC gc dispose return OS no Err  drawItemProc itemState theRect gdDepth colorDevice itemCount noErr columnIndex columnCount columnIndex columnIndex columnCount columnIndex columnIndex columnIndex columnCount noErr lastIndexOf TableItem _getItem ignoreRedraw sendEvent SetData isDisposed noErr ignoreRedraw setScrollWidth GetDataBrowserItemPartBounds kDataBrowserPropertyEnclosingPart noErr redrawWidget noErr theRect itemState kDataBrowserItemIsSelected controlRect GetControlBounds controlRect controlRect controlRect GCData GCData GetPort carbon_new NewRgn GetClip OffsetRgn controlRect controlRect setClipping carbon_new itemRect GetDataBrowserItemPartBounds kDataBrowserPropertyEnclosingPart itemRect OffsetRect itemRect controlRect controlRect FULL_SELECTION setBackground getSystemColor COLOR_LIST_SELECTION fillRectangle itemRect itemRect itemRect itemRect itemRect itemRect setBackground getBackground columnIndex fillRectangle itemRect itemRect itemRect itemRect itemRect itemRect rectRgn NewRgn RectRgn rectRgn OffsetRgn rectRgn controlRect controlRect SectRgn rectRgn DisposeRgn rectRgn setClipping carbon_new DisposeRgn getImage columnIndex getText columnIndex setFont getFont columnIndex stringExtent itemWidth imageBounds imageBounds getBounds itemWidth imageBounds columnCount TableColumn columnIndex itemWidth itemWidth drawImage imageBounds imageBounds imageBounds imageBounds imageBounds imageBounds setForeground getSystemColor COLOR_LIST_SELECTION_TEXT columnIndex FULL_SELECTION setBackground getSystemColor COLOR_LIST_SELECTION fillRectangle getForeground columnIndex setForeground drawString noErr
public Rectangle get Client Area check Widget int border 0 int out Metric new int 1 OS Get Theme Metric OS k Theme Metric Focus Rect Outset out Metric border out Metric 0 OS Get Theme Metric OS k Theme Metric Edit Text Frame Outset out Metric border out Metric 0 Rect rect new Rect inset new Rect OS Get Control Bounds handle rect OS Get Data Browser Scroll Bar Inset handle inset int width Math max 0 rect right rect left inset right border border int height Math max 0 rect bottom rect top inset bottom border border return new Rectangle inset left inset top width height  getClientArea checkWidget outMetric GetThemeMetric kThemeMetricFocusRectOutset outMetric outMetric GetThemeMetric kThemeMetricEditTextFrameOutset outMetric outMetric GetControlBounds GetDataBrowserScrollBarInset
Returns the column at the given zero relative index in the receiver Throws an exception if the index is out of range If no code Table Column code s were created by the programmer this method will throw code ERROR INVALID RANGE code despite the fact that a single column of data may be visible in the table This occurs when the programmer uses the table like a list adding items but never creating a column param index the index of the column to return return the column at the given index exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li ul 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 Table Column get Column int index check Widget if 0 index index column Count error SWT ERROR INVALID RANGE return columns index  TableColumn ERROR_INVALID_RANGE IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TableColumn getColumn checkWidget columnCount ERROR_INVALID_RANGE
Returns the number of columns contained in the receiver If no code Table Column code s were created by the programmer this value is zero despite the fact that visually one column of items is may be visible This occurs when the programmer uses the table like a list adding items but never creating a column return the number of columns 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 exception SWT Error ul li ERROR CANNOT GET COUNT if the operation fails because of an operating system failure li ul public int get Column Count check Widget return column Count  TableColumn SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_COUNT getColumnCount checkWidget columnCount
Returns an array of code Table Column code s which are the columns in the receiver If no code Table Column code s were created by the programmer the array is empty despite the fact that visually one column of items may be visible This occurs when the programmer uses the table like a list adding items but never creating a column p Note This is not the actual structure used by the receiver to maintain its list of items so modifying the array will not affect the receiver p return the items in the receiver 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 Table Column get Columns check Widget Table Column result new Table Column column Count System arraycopy columns 0 result 0 column Count return result  TableColumn TableColumn SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TableColumn getColumns checkWidget TableColumn TableColumn columnCount columnCount
Returns the width in pixels of a grid line return the width of a grid line in pixels 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 int get Grid Line Width check Widget return 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getGridLineWidth checkWidget
Returns the height of the receiver s header return the height of the header or zero if the header is not visible 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 since 2 0 public int get Header Height check Widget short height new short 1 OS Get Data Browser List View Header Btn Height handle height return height 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getHeaderHeight checkWidget GetDataBrowserListViewHeaderBtnHeight
Returns code true code if the receiver s header is visible and code false code otherwise p If one of the receiver s ancestors is not visible or some other condition makes the receiver not visible this method may still indicate that it is considered visible even though it may not actually be showing p return the receiver s header s visibility 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 public boolean get Header Visible check Widget short height new short 1 OS Get Data Browser List View Header Btn Height handle height return height 0 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getHeaderVisible checkWidget GetDataBrowserListViewHeaderBtnHeight
Returns the item at the given zero relative index in the receiver Throws an exception if the index is out of range param index the index of the item to return return the item at the given index exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li ul 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 Table Item get Item int index check Widget if 0 index index item Count error SWT ERROR INVALID RANGE return  getItem index  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TableItem getItem checkWidget itemCount ERROR_INVALID_RANGE _getItem
Returns the item at the given point in the receiver or null if no such item exists The point is in the coordinate system of the receiver param point the point used to locate the item return the item at the given point exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the point is null li ul 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 Table Item get Item Point point check Widget check Items true if point null error SWT ERROR NULL ARGUMENT Rect rect new Rect OS Get Control Bounds handle rect org eclipse swt internal carbon Point pt new org eclipse swt internal carbon Point OS Set Pt pt short point x rect left short point y rect top TODO optimize int column Id column Count 0 column id columns 0 id for int i 0 i item Count i if OS Get Data Browser Item Part Bounds handle i 1 column Id OS k Data Browser Property Enclosing Part rect OS no Err if style SWT FULL SELECTION 0 if rect top pt v pt v rect bottom return  getItem i else if OS Pt In Rect pt rect return  getItem i return null  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TableItem getItem checkWidget checkItems ERROR_NULL_ARGUMENT GetControlBounds SetPt columnId columnCount column_id itemCount GetDataBrowserItemPartBounds columnId kDataBrowserPropertyEnclosingPart noErr FULL_SELECTION _getItem PtInRect _getItem
Returns the number of items contained in the receiver return the number of items 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 int get Item Count check Widget return item Count  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getItemCount checkWidget itemCount
Returns the height of the area which would be used to display em one em of the items in the receiver s return the height of one item 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 int get Item Height check Widget short height new short 1 if OS Get Data Browser Table View Row Height handle height OS no Err error SWT ERROR CANNOT GET ITEM HEIGHT return height 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getItemHeight checkWidget GetDataBrowserTableViewRowHeight noErr ERROR_CANNOT_GET_ITEM_HEIGHT
Returns an array of code Table Item code s which are the items in the receiver p Note This is not the actual structure used by the receiver to maintain its list of items so modifying the array will not affect the receiver p return the items in the receiver 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 Table Item get Items check Widget Table Item result new Table Item item Count if style SWT VIRTUAL 0 for int i 0 i item Count i result i  getItem i else System arraycopy items 0 result 0 item Count return result  TableItem SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TableItem getItems checkWidget TableItem TableItem itemCount itemCount _getItem itemCount
Returns code true code if the receiver s lines are visible and code false code otherwise p If one of the receiver s ancestors is not visible or some other condition makes the receiver not visible this method may still indicate that it is considered visible even though it may not actually be showing p return the visibility state of the lines 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 boolean get Lines Visible check Widget return false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getLinesVisible checkWidget
Returns an array of code Table Item code s that are currently selected in the receiver An empty array indicates that no items are selected p Note This is not the actual structure used by the receiver to maintain its selection so modifying the array will not affect the receiver p return an array representing the selection 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 Table Item get Selection check Widget int ptr OS New Handle 0 if OS Get Data Browser Items handle OS k Data Browser No Item true OS k Data Browser Item Is Selected ptr OS no Err error SWT ERROR CANNOT GET SELECTION int count OS Get Handle Size ptr 4 Table Item result new Table Item count OS H Lock ptr int start new int 1 OS memcpy start ptr 4 int id new int 1 for int i 0 i count i OS memcpy id start 0 i 4 4 result i  getItem id 0 1 OS H Unlock ptr OS Dispose Handle ptr return result  TableItem SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TableItem getSelection checkWidget NewHandle GetDataBrowserItems kDataBrowserNoItem kDataBrowserItemIsSelected noErr ERROR_CANNOT_GET_SELECTION GetHandleSize TableItem TableItem HLock _getItem HUnlock DisposeHandle
Returns the number of selected items contained in the receiver return the number of selected items 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 int get Selection Count check Widget int count new int 1 if OS Get Data Browser Item Count handle OS k Data Browser No Item true OS k Data Browser Item Is Selected count OS no Err error SWT ERROR CANNOT GET COUNT return count 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelectionCount checkWidget GetDataBrowserItemCount kDataBrowserNoItem kDataBrowserItemIsSelected noErr ERROR_CANNOT_GET_COUNT
Returns the zero relative index of the item which is currently selected in the receiver or 1 if no item is selected return the index of the selected item 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 int get Selection Index check Widget int first new int 1 last new int 1 if OS Get Data Browser Selection Anchor handle first last OS no Err return 1 return first 0 1  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelectionIndex checkWidget GetDataBrowserSelectionAnchor noErr
Returns the zero relative indices of the items which are currently selected in the receiver The array is empty if no items are selected p Note This is not the actual structure used by the receiver to maintain its selection so modifying the array will not affect the receiver p return the array of indices of the selected items 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 int get Selection Indices check Widget int ptr OS New Handle 0 if OS Get Data Browser Items handle OS k Data Browser No Item true OS k Data Browser Item Is Selected ptr OS no Err error SWT ERROR CANNOT GET SELECTION int count OS Get Handle Size ptr 4 int result new int count OS H Lock ptr int start new int 1 OS memcpy start ptr 4 int id new int 1 for int i 0 i count i OS memcpy id start 0 i 4 4 result i id 0 1 OS H Unlock ptr OS Dispose Handle ptr return result  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelectionIndices checkWidget NewHandle GetDataBrowserItems kDataBrowserNoItem kDataBrowserItemIsSelected noErr ERROR_CANNOT_GET_SELECTION GetHandleSize HLock HUnlock DisposeHandle
Returns the zero relative index of the item which is currently at the top of the receiver This index can change when items are scrolled or new items are added or removed return the index of the top item 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 int get Top Index check Widget int top new int 1 left new int 1 OS Get Data Browser Scroll Position handle top left return top 0 get Item Height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getTopIndex checkWidget GetDataBrowserScrollPosition getItemHeight
int hit Test Proc int browser int id int property int the Rect int mouse Rect last Hittest id return 1  hitTestProc theRect mouseRect lastHittest
void hook Events super hook Events Data Browser Callbacks callbacks new Data Browser Callbacks callbacks version OS k Data Browser Latest Callbacks OS Init Data Browser Callbacks callbacks callbacks v1 itemDataCallback display item Data Proc callbacks v1 itemNotificationCallback display item Notification Proc OS Set Data Browser Callbacks handle callbacks Data Browser Custom Callbacks custom new Data Browser Custom Callbacks custom version OS k Data Browser Latest Custom Callbacks OS Init Data Browser Custom Callbacks custom custom v1 drawItemCallback display draw Item Proc custom v1 hitTestCallback display hit Test Proc custom v1 trackingCallback display tracking Proc OS Set Data Browser Custom Callbacks handle custom  hookEvents hookEvents DataBrowserCallbacks DataBrowserCallbacks kDataBrowserLatestCallbacks InitDataBrowserCallbacks v1_itemDataCallback itemDataProc v1_itemNotificationCallback itemNotificationProc SetDataBrowserCallbacks DataBrowserCustomCallbacks DataBrowserCustomCallbacks kDataBrowserLatestCustomCallbacks InitDataBrowserCustomCallbacks v1_drawItemCallback drawItemProc v1_hitTestCallback hitTestProc v1_trackingCallback trackingProc SetDataBrowserCustomCallbacks
Searches the receiver s list starting at the first column index 0 until a column is found that is equal to the argument and returns the index of that column If no column is found returns 1 param column the search column return the index of the column exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul 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 int index Of Table Column column check Widget if column null error SWT ERROR NULL ARGUMENT for int i 0 i column Count i if columns i column return i return 1  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS indexOf TableColumn checkWidget ERROR_NULL_ARGUMENT columnCount
Searches the receiver s list starting at the first item index 0 until an item is found that is equal to the argument and returns the index of that item If no item is found returns 1 param item the search item return the index of the item exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul 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 int index Of Table Item item check Widget if item null error SWT ERROR NULL ARGUMENT if 1 last Index Of last Index Of item Count 1 if items last Index Of item return last Index Of if items last Index Of 1 item return last Index Of if items last Index Of 1 item return last Index Of if last Index Of item Count 2 for int i 0 i item Count i if items i item return last Index Of i else for int i item Count 1 i 0 i if items i item return last Index Of i return 1  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS indexOf TableItem checkWidget ERROR_NULL_ARGUMENT lastIndexOf lastIndexOf itemCount lastIndexOf lastIndexOf lastIndexOf lastIndexOf lastIndexOf lastIndexOf lastIndexOf itemCount itemCount lastIndexOf itemCount lastIndexOf
Returns code true code if the item is selected and code false code otherwise Indices out of range are ignored param index the index of the item return the visibility state of the item at the index 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 boolean is Selected int index check Widget return OS Is Data Browser Item Selected handle index 1  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS isSelected checkWidget IsDataBrowserItemSelected
int item Data Proc int browser int id int property int item Data int set Value int row id 1 if 0 row row items length return OS no Err switch property case CHECK COLUMN ID Table Item item  getItem row if set Value 0 item checked item checked if item checked item grayed OS Set Data Browser Item Data Button Value item Data short OS k Theme Button Mixed else int the Data item checked OS k Theme Button On OS k Theme Button Off OS Set Data Browser Item Data Button Value item Data short the Data Event event new Event event item item event detail SWT CHECK post Event SWT Selection event else int the Data OS k Theme Button Off if item checked the Data item grayed OS k Theme Button Mixed OS k Theme Button On OS Set Data Browser Item Data Button Value item Data short the Data break return OS no Err  itemDataProc itemData setValue noErr CHECK_COLUMN_ID TableItem _getItem setValue SetDataBrowserItemDataButtonValue itemData kThemeButtonMixed theData kThemeButtonOn kThemeButtonOff SetDataBrowserItemDataButtonValue itemData theData postEvent theData kThemeButtonOff theData kThemeButtonMixed kThemeButtonOn SetDataBrowserItemDataButtonValue itemData theData noErr
int item Notification Proc int browser int id int message if message OS k Data Browser User State Changed short width new short 1 for int i 0 i column Count i Table Column column columns i OS Get Data Browser Table View Named Column Width handle column id width if width 0 column last Width column resized width 0 return OS no Err return OS no Err int index id 1 if 0 index index items length return OS no Err switch message case OS k Data Browser Item Selected case OS k Data Browser Item Deselected Table Item item  getItem index was Selected true if ignore Select break int first new int 1 last new int 1 OS Get Data Browser Selection Anchor handle first last boolean selected false if style SWT MULTI 0 int modifiers OS Get Current Event Key Modifiers if modifiers OS shift Key 0 if message OS k Data Browser Item Selected selected first 0 id last 0 id else selected id anchor First id anchor Last else if modifiers OS cmd Key 0 selected true else selected first 0 last 0 else selected message OS k Data Browser Item Selected if selected anchor First first 0 anchor Last last 0 Event event new Event event item item post Event SWT Selection event break case OS k Data Browser Item Double Clicked Table Item item  getItem index was Selected true Event event new Event event item item post Event SWT Default Selection event break return OS no Err  itemNotificationProc kDataBrowserUserStateChanged columnCount TableColumn GetDataBrowserTableViewNamedColumnWidth lastWidth noErr noErr noErr kDataBrowserItemSelected kDataBrowserItemDeselected TableItem _getItem wasSelected ignoreSelect GetDataBrowserSelectionAnchor GetCurrentEventKeyModifiers shiftKey kDataBrowserItemSelected anchorFirst anchorLast cmdKey kDataBrowserItemSelected anchorFirst anchorLast postEvent kDataBrowserItemDoubleClicked TableItem _getItem wasSelected postEvent DefaultSelection noErr
int k Event Mouse Down int next Handler int the Event int user Data int result super k Event Mouse Down next Handler the Event user Data if result OS no Err return result Shell shell get Shell shell bring To Top true Feature in the Macintosh For some reason when the user clicks on the data browser focus is assigned then lost and then reassigned causing k Even Control Set Focus Part events The fix is to ignore k Even Control Set Focus Part when the user clicks and send the focus events from k Event Mouse Down Control old Focus display get Focus Control display ignore Focus true was Selected false result OS Call Next Event Handler next Handler the Event display ignore Focus false if old Focus this if old Focus null old Focus is Disposed old Focus send Focus Event false false if is Disposed is Enabled send Focus Event true false if was Selected if OS Is Data Browser Item Selected handle last Hittest int index last Hittest 1 if 0 index index item Count Event event new Event event item  getItem index post Event SWT Selection event return result  kEventMouseDown nextHandler theEvent userData kEventMouseDown nextHandler theEvent userData noErr getShell bringToTop kEvenControlSetFocusPart kEvenControlSetFocusPart kEventMouseDown oldFocus getFocusControl ignoreFocus wasSelected CallNextEventHandler nextHandler theEvent ignoreFocus oldFocus oldFocus oldFocus isDisposed oldFocus sendFocusEvent isDisposed isEnabled sendFocusEvent wasSelected IsDataBrowserItemSelected lastHittest lastHittest itemCount _getItem postEvent
int k Event Text Input Unicode For Key Event int next Handler int the Event int user Data int result super k Event Text Input Unicode For Key Event next Handler the Event user Data if result OS no Err return result int keyboard Event new int 1 OS Get Event Parameter the Event OS k Event Param Text Input Send Keyboard Event OS type Event Ref null keyboard Event length 4 null keyboard Event int key Code new int 1 OS Get Event Parameter keyboard Event 0 OS k Event Param Key Code OS typeU Int32 null key Code length 4 null key Code switch key Code 0 case 36 Return post Event SWT Default Selection break Feature in the Macintosh For some reason when the user hits an up or down arrow to traverse the items in a Data Browser the item scrolls to the left such that the white space that is normally visible to the right of the every item is scrolled out of view The fix is to do the arrow traversal in Java and not call the default handler case 125 Down int index get Selection Index set Selection Math min item Count 1 index 1 true return OS no Err case 126 Up int index get Selection Index set Selection Math max 0 index 1 true return OS no Err return result  kEventTextInputUnicodeForKeyEvent nextHandler theEvent userData kEventTextInputUnicodeForKeyEvent nextHandler theEvent userData noErr keyboardEvent GetEventParameter theEvent kEventParamTextInputSendKeyboardEvent typeEventRef keyboardEvent keyboardEvent keyCode GetEventParameter keyboardEvent kEventParamKeyCode typeUInt32 keyCode keyCode keyCode postEvent DefaultSelection getSelectionIndex setSelection itemCount noErr getSelectionIndex setSelection noErr
void release Widget for int i 0 i column Count i Table Column column columns i if column is Disposed column release Resources columns null for int i 0 i item Count i Table Item item items i if item null item is Disposed item release Resources items null super release Widget  releaseWidget columnCount TableColumn isDisposed releaseResources itemCount TableItem isDisposed releaseResources releaseWidget
Removes the item from the receiver at the given zero relative index param index the index for the item exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li ul 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 exception SWT Error ul li ERROR ITEM NOT REMOVED if the operation fails because of an operating system failure li ul public void remove int index check Widget check Items true if 0 index index item Count error SWT ERROR INVALID RANGE int id new int item Count if OS Remove Data Browser Items handle OS k Data Browser No Item id length id 0 OS no Err error SWT ERROR ITEM NOT REMOVED Table Item item items index System arraycopy items index 1 items index item Count index items item Count null if item null item release Resources OS Update Data Browser Items handle 0 0 null OS k Data Browser Item No Property OS k Data Browser No Item  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_REMOVED checkWidget checkItems itemCount ERROR_INVALID_RANGE itemCount RemoveDataBrowserItems kDataBrowserNoItem noErr ERROR_ITEM_NOT_REMOVED TableItem itemCount itemCount releaseResources UpdateDataBrowserItems kDataBrowserItemNoProperty kDataBrowserNoItem
Removes the items from the receiver which are between the given zero relative start and end indices inclusive param start the start of the range param end the end of the range exception Illegal Argument Exception ul li ERROR INVALID RANGE if either the start or end are not between 0 and the number of elements in the list minus 1 inclusive li ul 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 exception SWT Error ul li ERROR ITEM NOT REMOVED if the operation fails because of an operating system failure li ul public void remove int start int end check Widget if start end return if 0 start start end end item Count error SWT ERROR INVALID RANGE if start 0 end item Count 1 remove All else int length end start 1 for int i 0 i length i remove start  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_REMOVED checkWidget itemCount ERROR_INVALID_RANGE itemCount removeAll
Removes the items from the receiver s list at the given zero relative indices param indices the array of indices of the items exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li li ERROR NULL ARGUMENT if the indices array is null li ul 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 exception SWT Error ul li ERROR ITEM NOT REMOVED if the operation fails because of an operating system failure li ul public void remove int indices check Widget if indices null error SWT ERROR NULL ARGUMENT if indices length 0 return int new Indices new int indices length System arraycopy indices 0 new Indices 0 indices length sort new Indices int start new Indices new Indices length 1 end new Indices 0 if 0 start start end end item Count error SWT ERROR INVALID RANGE int last 1 for int i 0 i new Indices length i int index new Indices i if index last remove index last index  IllegalArgumentException ERROR_INVALID_RANGE ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_ITEM_NOT_REMOVED checkWidget ERROR_NULL_ARGUMENT newIndices newIndices newIndices newIndices newIndices newIndices itemCount ERROR_INVALID_RANGE newIndices newIndices
Removes all of the items from the receiver 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 remove All check Widget Feature in the Mac When Remove Data Browser Items is used to remove items item notification callbacks are issued with the message k Data Browser Item Removed When many items are removed this is slow The fix is to temporarily remove the item notification callback Data Browser Callbacks callbacks new Data Browser Callbacks OS Get Data Browser Callbacks handle callbacks callbacks v1 itemNotificationCallback 0 OS Set Data Browser Callbacks handle callbacks OS Remove Data Browser Items handle OS k Data Browser No Item 0 null 0 callbacks v1 itemNotificationCallback display item Notification Proc OS Set Data Browser Callbacks handle callbacks OS Set Data Browser Scroll Position handle 0 0 for int i 0 i item Count i Table Item item items i if item null item is Disposed item release Resources items new Table Item 4 item Count anchor First anchor Last 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS removeAll checkWidget RemoveDataBrowserItems kDataBrowserItemRemoved DataBrowserCallbacks DataBrowserCallbacks GetDataBrowserCallbacks v1_itemNotificationCallback SetDataBrowserCallbacks RemoveDataBrowserItems kDataBrowserNoItem v1_itemNotificationCallback itemNotificationProc SetDataBrowserCallbacks SetDataBrowserScrollPosition itemCount TableItem isDisposed releaseResources TableItem itemCount anchorFirst anchorLast
Removes the listener from the collection of listeners who will be notified when the receiver s selection changes param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Selection listener event Table unhook SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener SelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable DefaultSelection
void reset Visible Region int control super reset Visible Region control if show Index 1 show Index show Index  resetVisibleRegion resetVisibleRegion showIndex showIndex showIndex
Selects the item at the given zero relative index in the receiver If the item at the index was already selected it remains selected Indices that are out of range are ignored param index the index of the item to select 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 select int index check Widget check Items false if 0 index index item Count int ids new int index 1 select ids ids length false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget checkItems itemCount
Selects the items in the range specified by the given zero relative indices in the receiver The range of indices is inclusive The current selection is not cleared before the new items are selected p If an item in the given range is not selected it is selected If an item in the given range was already selected it remains selected Indices that are out of range are ignored and no items will be selected if start is greater than end If the receiver is single select and there is more than one item in the given range then all indices are ignored param start the start of the range param end the end of the range 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 Table set Selection int int public void select int start int end check Widget check Items false if end 0 start end style SWT SINGLE 0 start end return if item Count 0 start item Count return if start 0 end item Count 1 select All else start Math max 0 start end Math min end item Count 1 int length end start 1 int ids new int length for int i 0 i length i ids i end i 1 select ids length false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget checkItems itemCount itemCount itemCount selectAll itemCount
Selects the items at the given zero relative indices in the receiver The current selection is not cleared before the new items are selected p If the item at a given index is not selected it is selected If the item at a given index was already selected it remains selected Indices that are out of range and duplicate indices are ignored If the receiver is single select and multiple indices are specified then all indices are ignored param indices the array of indices for the items to select exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the array of indices is null li ul 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 Table set Selection int public void select int indices check Widget check Items false if indices null error SWT ERROR NULL ARGUMENT int length indices length if length 0 style SWT SINGLE 0 length 1 return int ids new int length int count 0 for int i 0 i length i int index indices length i 1 if index 0 index item Count ids count index 1 if count 0 select ids count false  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget checkItems ERROR_NULL_ARGUMENT itemCount
void select int ids int count boolean clear ignore Select true Bug in the Macintosh When the Data Broswer selection flags includes both k Data Browser Never Empty Selection Set and k Data Browser Select Only One two items are selected when Set Data Browser Selected Items is called with k Data Browser Items Assign to assign a new seletion despite the fact that k Data Browser Select Only One was specified The fix is to save and restore k Data Browser Never Empty Selection Set around each call to Set Data Browser Selected Items int selection Flags null if style SWT SINGLE 0 selection Flags new int 1 OS Get Data Browser Selection Flags handle selection Flags OS Set Data Browser Selection Flags handle selection Flags 0 OS k Data Browser Never Empty Selection Set int operation OS k Data Browser Items Assign if style SWT MULTI 0 clear operation OS k Data Browser Items Add OS Set Data Browser Selected Items handle count ids operation if style SWT SINGLE 0 OS Set Data Browser Selection Flags handle selection Flags 0 ignore Select false  ignoreSelect DataBroswer kDataBrowserNeverEmptySelectionSet kDataBrowserSelectOnlyOne SetDataBrowserSelectedItems kDataBrowserItemsAssign kDataBrowserSelectOnlyOne kDataBrowserNeverEmptySelectionSet SetDataBrowserSelectedItems selectionFlags selectionFlags GetDataBrowserSelectionFlags selectionFlags SetDataBrowserSelectionFlags selectionFlags kDataBrowserNeverEmptySelectionSet kDataBrowserItemsAssign kDataBrowserItemsAdd SetDataBrowserSelectedItems SetDataBrowserSelectionFlags selectionFlags ignoreSelect
Selects all of the items in the receiver p If the receiver is single select do nothing 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 select All check Widget check Items false if style SWT SINGLE 0 return select null 0 false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS selectAll checkWidget checkItems
int set Bounds int control int x int y int width int height boolean move boolean resize boolean events Ensure that the top item is visible when the tree is resized from a zero size to a size that can show the selection int result super set Bounds control x y width height move resize events if show Index 1 show Index show Index return result  setBounds setBounds showIndex showIndex showIndex
void set Font Style Font font super set Font Style font if items null return for int i 0 i items length i Table Item item items i if item null item width 1 set Scroll Width items true  setFontStyle setFontStyle TableItem setScrollWidth
Marks the receiver s header as visible if the argument is code true code and marks it invisible otherwise p If one of the receiver s ancestors is not visible or some other condition makes the receiver not visible marking it visible may not actually cause it to be displayed p param show the new visibility 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 public void set Header Visible boolean show check Widget int height show header Height 0 OS Set Data Browser List View Header Btn Height handle short height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setHeaderVisible checkWidget headerHeight SetDataBrowserListViewHeaderBtnHeight
Sets the number of items contained in the receiver param count the number of items 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 since 3 0 public void set Item Count int count check Widget check Items true count Math max 0 count if count item Count return set Redraw false int top new int 1 left new int 1 OS Get Data Browser Scroll Position handle top left Data Browser Callbacks callbacks new Data Browser Callbacks OS Get Data Browser Callbacks handle callbacks callbacks v1 itemNotificationCallback 0 OS Set Data Browser Callbacks handle callbacks if count item Count int index count while index item Count int id new int index 1 if OS Remove Data Browser Items handle OS k Data Browser No Item id length id 0 OS no Err break Table Item item items index if item null item release Resources index if index item Count error SWT ERROR ITEM NOT REMOVED int length Math max 4 count 3 4 4 Table Item new Items new Table Item length System arraycopy items 0 new Items 0 Math min count item Count items new Items if style SWT VIRTUAL 0 for int i count i item Count i items i new Table Item this SWT NONE i false item Count count OS Add Data Browser Items handle 0 item Count null OS k Data Browser Item No Property callbacks v1 itemNotificationCallback display item Notification Proc OS Set Data Browser Callbacks handle callbacks set Redraw true  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setItemCount checkWidget checkItems itemCount setRedraw GetDataBrowserScrollPosition DataBrowserCallbacks DataBrowserCallbacks GetDataBrowserCallbacks v1_itemNotificationCallback SetDataBrowserCallbacks itemCount itemCount RemoveDataBrowserItems kDataBrowserNoItem noErr TableItem releaseResources itemCount ERROR_ITEM_NOT_REMOVED TableItem newItems TableItem newItems itemCount newItems itemCount TableItem itemCount AddDataBrowserItems itemCount kDataBrowserItemNoProperty v1_itemNotificationCallback itemNotificationProc SetDataBrowserCallbacks setRedraw
Marks the receiver s lines as visible if the argument is code true code and marks it invisible otherwise p If one of the receiver s ancestors is not visible or some other condition makes the receiver not visible marking it visible may not actually cause it to be displayed p param show the new visibility 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 public void set Lines Visible boolean show check Widget  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setLinesVisible checkWidget
public void set Redraw boolean redraw check Widget super set Redraw redraw if redraw draw Count 0 Resize the item array to match the item count if items length 4 items length item Count 3 int length Math max 4 item Count 3 4 4 Table Item new Items new Table Item length System arraycopy items 0 new Items 0 item Count items new Items check Items true  setRedraw checkWidget setRedraw drawCount itemCount itemCount TableItem newItems TableItem newItems itemCount newItems checkItems
boolean set Scroll Width Table Item items boolean set if ignore Redraw draw Count 0 return false if column Count 0 return false GC gc new GC this int new Width 0 for int i 0 i items length i Table Item item items i if item null new Width Math max new Width item calculate Width 0 gc gc dispose new Width EXTRA WIDTH if set short width new short 1 OS Get Data Browser Table View Named Column Width handle column id width if width 0 new Width return false OS Set Data Browser Table View Named Column Width handle column id short new Width return true  setScrollWidth TableItem ignoreRedraw drawCount columnCount newWidth TableItem newWidth newWidth calculateWidth newWidth EXTRA_WIDTH GetDataBrowserTableViewNamedColumnWidth column_id newWidth SetDataBrowserTableViewNamedColumnWidth column_id newWidth
boolean set Scroll Width Table Item item if ignore Redraw draw Count 0 return false if column Count 0 return false GC gc new GC this int new Width item calculate Width 0 gc gc dispose new Width EXTRA WIDTH short width new short 1 OS Get Data Browser Table View Named Column Width handle column id width if width 0 new Width OS Set Data Browser Table View Named Column Width handle column id short new Width return true return false  setScrollWidth TableItem ignoreRedraw drawCount columnCount newWidth calculateWidth newWidth EXTRA_WIDTH GetDataBrowserTableViewNamedColumnWidth column_id newWidth SetDataBrowserTableViewNamedColumnWidth column_id newWidth
Selects the item at the given zero relative index in the receiver The current selected is first cleared then the new item is selected param index the index of the item to select 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 Table deselect All see Table select int public void set Selection int index check Widget check Items false set Selection index false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS deselectAll setSelection checkWidget checkItems setSelection
void set Selection int index boolean notify check Widget if 0 index index item Count int ids new int index 1 select ids ids length true show Index index if notify Event event new Event event item  getItem index post Event SWT Selection event  setSelection checkWidget itemCount showIndex _getItem postEvent
Selects the items in the range specified by the given zero relative indices in the receiver The range of indices is inclusive The current selection is cleared before the new items are selected p Indices that are out of range are ignored and no items will be selected if start is greater than end If the receiver is single select and there is more than one item in the given range then all indices are ignored param start the start index of the items to select param end the end index of the items to select 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 Table deselect All see Table select int int public void set Selection int start int end check Widget check Items false deselect All if end 0 start end style SWT SINGLE 0 start end return if item Count 0 start item Count return start Math max 0 start end Math min end item Count 1 int length end start 1 int ids new int length for int i 0 i length i ids i end i 1 select ids length true show Index ids 0 1  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS deselectAll setSelection checkWidget checkItems deselectAll itemCount itemCount itemCount showIndex
Selects the items at the given zero relative indices in the receiver The current selection is cleared before the new items are selected p Indices that are out of range and duplicate indices are ignored If the receiver is single select and multiple indices are specified then all indices are ignored param indices the indices of the items to select exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the array of indices is null li ul 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 Table deselect All see Table select int public void set Selection int indices check Widget check Items false if indices null error SWT ERROR NULL ARGUMENT deselect All int length indices length if length 0 style SWT SINGLE 0 length 1 return int ids new int length int count 0 for int i 0 i length i int index indices length i 1 if index 0 index item Count ids count index 1 if count 0 select ids count true show Index ids 0 1  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS deselectAll setSelection checkWidget checkItems ERROR_NULL_ARGUMENT deselectAll itemCount showIndex
Sets the receiver s selection to be the given array of items The current selection is cleared before the new items are selected p Items that are not in the receiver are ignored If the receiver is single select and multiple items are specified then all items are ignored param items the array of items exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the array of items is null li li ERROR INVALID ARGUMENT if one of the items has been disposed li ul 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 Table deselect All see Table select int see Table set Selection int public void set Selection Table Item items check Widget check Items false if items null error SWT ERROR NULL ARGUMENT deselect All int length items length if length 0 style SWT SINGLE 0 length 1 return int ids new int length int count 0 for int i 0 i length i int index index Of items length i 1 if index 1 ids count index 1 if count 0 select ids count true show Index ids 0 1  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS deselectAll setSelection setSelection TableItem checkWidget checkItems ERROR_NULL_ARGUMENT deselectAll indexOf showIndex
Sets the zero relative index of the item which is currently at the top of the receiver This index can change when items are scrolled or new items are added and removed param index the index of the top item 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 set Top Index int index check Widget check Items false int top new int 1 left new int 1 OS Get Data Browser Scroll Position handle top left top 0 index get Item Height OS Set Data Browser Scroll Position handle top 0 left 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setTopIndex checkWidget checkItems GetDataBrowserScrollPosition getItemHeight SetDataBrowserScrollPosition
Shows the column If the column is already showing in the receiver this method simply returns Otherwise the columns are scrolled until the column is visible param column the column to be shown exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the item is null li li ERROR INVALID ARGUMENT if the item has been disposed li ul 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 since 3 0 public void show Column Table Column column check Widget if column null error SWT ERROR NULL ARGUMENT if column is Disposed error SWT ERROR INVALID ARGUMENT if column parent this return int index index Of column if column Count 1 0 index index column Count return Get width and horizontal position of column short w new short 1 OS Get Data Browser Table View Named Column Width handle column id w int width w 0 int x 0 for int i 0 i index i w new short 1 OS Get Data Browser Table View Named Column Width handle columns i id w x w 0 Get current scroll position int top new int 1 left new int 1 OS Get Data Browser Scroll Position handle top left Scroll column into view if x left 0 OS Set Data Browser Scroll Position handle top 0 x else Rectangle rect get Client Area int max Width rect width width Math min width max Width if x width left 0 max Width left 0 x width max Width OS Set Data Browser Scroll Position handle top 0 left 0  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS showColumn TableColumn checkWidget ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT indexOf columnCount columnCount GetDataBrowserTableViewNamedColumnWidth GetDataBrowserTableViewNamedColumnWidth GetDataBrowserScrollPosition SetDataBrowserScrollPosition getClientArea maxWidth maxWidth maxWidth maxWidth SetDataBrowserScrollPosition
void show Index int index if 0 index index item Count Bug in the Macintosh When there is not room to show a single item in the data browser Reveal Data Browser Item scrolls the item such that it is above the top of the data browser The fix is to remember the index and scroll when the data browser is resized Bug in the Macintosh When items are added to the data browser after is has been hidden Reveal Data Browser Item when called before the controls behind the data browser are repainted causes a redraw This redraw happens right away causing pixel corruption The fix is to remember the index and scroll when the data browser is shown Rectangle rect get Client Area if rect height get Item Height OS Is Control Visible handle show Index index return show Index 1 Table Item item  getItem index Rectangle item Rect item get Bounds 0 if item Rect is Empty if rect contains item Rect x item Rect y rect contains item Rect x item Rect y item Rect height return int top new int 1 left new int 1 OS Get Data Browser Scroll Position handle top left OS Reveal Data Browser Item handle index 1 OS k Data Browser No Item byte OS k Data Browser Reveal Without Selecting Bug in the Macintosh For some reason when the Data Browser is scrolled by Reveal Data Browser Item the scrollbars are not redrawn The fix is to force a redraw int new Top new int 1 new Left new int 1 OS Get Data Browser Scroll Position handle new Top new Left if horizontal Bar null new Left 0 left 0 horizontal Bar redraw if vertical Bar null new Top 0 top 0 vertical Bar redraw  showIndex itemCount RevealDataBrowserItem RevealDataBrowserItem getClientArea getItemHeight IsControlVisible showIndex showIndex TableItem _getItem itemRect getBounds itemRect isEmpty itemRect itemRect itemRect itemRect itemRect GetDataBrowserScrollPosition RevealDataBrowserItem kDataBrowserNoItem kDataBrowserRevealWithoutSelecting DataBrowser RevealDataBrowserItem newTop newLeft GetDataBrowserScrollPosition newTop newLeft horizontalBar newLeft horizontalBar verticalBar newTop verticalBar
Shows the item If the item is already showing in the receiver this method simply returns Otherwise the items are scrolled until the item is visible param item the item to be shown exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the item is null li li ERROR INVALID ARGUMENT if the item has been disposed li ul 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 Table show Selection public void show Item Table Item item check Widget check Items false if item null error SWT ERROR NULL ARGUMENT if item is Disposed error SWT ERROR INVALID ARGUMENT int index index Of item if index 1 show Index index  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS showSelection showItem TableItem checkWidget checkItems ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT indexOf showIndex
Shows the selection If the selection is already showing in the receiver this method simply returns Otherwise the items are scrolled until the selection is visible 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 Table show Item Table Item public void show Selection check Widget check Items false int index get Selection Index if index 0 show Index index  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS showItem TableItem showSelection checkWidget checkItems getSelectionIndex showIndex
int tracking Proc int browser int id int property int the Rect int start Pt int modifiers return 1  trackingProc theRect startPt

Constructs a new instance of this class given its parent which must be a code Table code and a style value describing its behavior and appearance The item is added to the end of the items maintained by its parent p The style value is either one of the style constants defined in 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT LEFT see SWT RIGHT see SWT CENTER see Widget check Subclass see Widget get Style public Table Column Table parent int style super parent check Style style resizable true this parent parent parent create Item this parent get Column Count  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle TableColumn checkStyle createItem getColumnCount
Constructs a new instance of this class given its parent which must be a code Table code a style value describing its behavior and appearance and the index at which to place it in the items maintained by its parent p The style value is either one of the style constants defined in 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 param index the index to store the receiver in its parent exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT LEFT see SWT RIGHT see SWT CENTER see Widget check Subclass see Widget get Style public Table Column Table parent int style int index super parent check Style style resizable true this parent parent parent create Item this index  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle TableColumn checkStyle createItem
Adds the listener to the collection of listeners who will be notified when the control is moved or resized by sending it one of the messages defined in the code Control Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Control Listener see remove Control Listener public void add Control Listener Control Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Resize typed Listener add Listener SWT Move typed Listener  ControlListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ControlListener removeControlListener addControlListener ControlListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener typedListener
Adds the listener to the collection of listeners who will be notified when the control is selected by sending it one of the messages defined in the code Selection Listener code interface p code widget Selected code is called when the column header is selected code widget Default Selected code is not called p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
static int check Style int style return check Bits style SWT LEFT SWT CENTER SWT RIGHT 0 0 0  checkStyle checkBits
protected void check Subclass if is Valid Subclass error SWT ERROR INVALID SUBCLASS  checkSubclass isValidSubclass ERROR_INVALID_SUBCLASS
Returns a value which describes the position of the text or image in the receiver The value will be one of code LEFT code code RIGHT code or code CENTER code return the alignment 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 int get Alignment check Widget if style SWT LEFT 0 return SWT LEFT if style SWT CENTER 0 return SWT CENTER if style SWT RIGHT 0 return SWT RIGHT return SWT LEFT  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getAlignment checkWidget
String get Name Text return get Text  getNameText getText
Returns the receiver s parent which must be a code Table code return the receiver s parent 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 Table get Parent check Widget return parent  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getParent checkWidget
Gets the resizable attribute A column that is not resizable cannot be dragged by the user but may be resized by the programmer return the resizable attribute 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 boolean get Resizable check Widget return resizable  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getResizable checkWidget
Gets the width of the receiver return the width 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 int get Width check Widget short width new short 1 OS Get Data Browser Table View Named Column Width parent handle id width return Math max 0 width 0 Table EXTRA WIDTH  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getWidth checkWidget GetDataBrowserTableViewNamedColumnWidth EXTRA_WIDTH
Causes the receiver to be resized to its preferred size For a composite this involves computing the preferred size from its layout if there is one 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 pack check Widget GC gc new GC parent int width gc string Extent text x if parent style SWT VIRTUAL 0 int index parent index Of this for int i 0 i parent item Count i Table Item item parent items i if item null width Math max width item calculate Width index gc gc dispose set Width width  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget stringExtent indexOf itemCount TableItem calculateWidth setWidth
void release Child super release Child parent destroy Item this  releaseChild releaseChild destroyItem
void release Widget super release Widget parent null  releaseWidget releaseWidget
Removes the listener from the collection of listeners who will be notified when the control is moved or resized param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Control Listener see add Control Listener public void remove Control Listener Control Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Move listener event Table unhook SWT Resize listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ControlListener addControlListener removeControlListener ControlListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable
Removes the listener from the collection of listeners who will be notified when the control is selected param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Selection listener event Table unhook SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable DefaultSelection
void resized int new Width last Width new Width send Event SWT Resize int index parent index Of this for int j index 1 j parent column Count j Table Column column parent columns j column send Event SWT Move  newWidth lastWidth newWidth sendEvent indexOf columnCount TableColumn sendEvent
Controls how text and images will be displayed in the receiver The argument should be one of code LEFT code code RIGHT code or code CENTER code param alignment the new alignment 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 set Alignment int alignment check Widget if alignment SWT LEFT SWT RIGHT SWT CENTER 0 return int index parent index Of this if index 1 index 0 return style SWT LEFT SWT RIGHT SWT CENTER style alignment SWT LEFT SWT RIGHT SWT CENTER update Header  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setAlignment checkWidget indexOf updateHeader
public void set Image Image image check Widget if image null image is Disposed error SWT ERROR INVALID ARGUMENT int index parent index Of this if index 1 return super set Image image  setImage checkWidget isDisposed ERROR_INVALID_ARGUMENT indexOf setImage
Sets the resizable attribute A column that is not resizable cannot be dragged by the user but may be resized by the programmer param resizable the resize attribute 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 set Resizable boolean resizable check Widget this resizable resizable update Header  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setResizable checkWidget updateHeader
public void set Text String string check Widget if string null error SWT ERROR NULL ARGUMENT super set Text string update Header  setText checkWidget ERROR_NULL_ARGUMENT setText updateHeader
Sets the width of the receiver param width the new width 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 set Width int width check Widget width Table EXTRA WIDTH OS Set Data Browser Table View Named Column Width parent handle id short width update Header if width last Width resized width  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setWidth checkWidget EXTRA_WIDTH SetDataBrowserTableViewNamedColumnWidth updateHeader lastWidth
void update Header char buffer new char text length text get Chars 0 buffer length buffer 0 int length fix Mnemonic buffer int str OS CF String Create With Characters OS kCF Allocator Default buffer length if str 0 error SWT ERROR CANNOT SET TEXT Data Browser List View Header Desc desc new Data Browser List View Header Desc desc version OS k Data Browser List View Latest Header Desc desc btnFontStyle just OS te Flush Left if style SWT CENTER 0 desc btnFontStyle just OS te Center if style SWT RIGHT 0 desc btnFontStyle just OS te Flush Right desc btnFontStyle flags OS k Control Use Just Mask if resizable desc minimum Width 0 desc maximum Width 0x7fff else short width new short 1 OS Get Data Browser Table View Named Column Width parent handle id width desc minimum Width desc maximum Width width 0 desc title String str OS Set Data Browser List View Header Desc parent handle id desc OS CF Release str  updateHeader getChars fixMnemonic CFStringCreateWithCharacters kCFAllocatorDefault ERROR_CANNOT_SET_TEXT DataBrowserListViewHeaderDesc DataBrowserListViewHeaderDesc kDataBrowserListViewLatestHeaderDesc btnFontStyle_just teFlushLeft btnFontStyle_just teCenter btnFontStyle_just teFlushRight btnFontStyle_flags kControlUseJustMask minimumWidth maximumWidth GetDataBrowserTableViewNamedColumnWidth minimumWidth maximumWidth titleString SetDataBrowserListViewHeaderDesc CFRelease

Constructs a new instance of this class given its parent which must be a code Table code and a style value describing its behavior and appearance The item is added to the end of the items maintained by its parent p The style value is either one of the style constants defined in 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Table Item Table parent int style this parent style check Null parent get Item Count true  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle TableItem checkNull getItemCount
Constructs a new instance of this class given its parent which must be a code Table code a style value describing its behavior and appearance and the index at which to place it in the items maintained by its parent p The style value is either one of the style constants defined in 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 param index the index to store the receiver in its parent exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Table Item Table parent int style int index this parent style index true  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle TableItem
Table Item Table parent int style int index boolean create super parent style this parent parent if create parent create Item this index  TableItem createItem
static Table check Null Table control if control null SWT error SWT ERROR NULL ARGUMENT return control  checkNull ERROR_NULL_ARGUMENT
int calculate Width int index GC gc if index 0 this width 1 return this width int width 0 Image image get Image index String text get Text index if image null width image get Bounds width 2 if text null text length 0 width gc string Extent text x if index 0 this width width return width  calculateWidth getImage getText getBounds stringExtent
protected void check Subclass if is Valid Subclass error SWT ERROR INVALID SUBCLASS  checkSubclass isValidSubclass ERROR_INVALID_SUBCLASS
void clear text image null strings null images null checked grayed cached false foreground background null cell Foreground cell Background null font null cell Font null width 1  cellForeground cellBackground cellFont
Returns the receiver s background color return the background color 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 since 2 0 public Color get Background check Widget return background null background parent get Background  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBackground checkWidget getBackground
Returns the background color at the given column index in the receiver param index the column index return the background color 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 since 3 0 public Color get Background int index check Widget int count Math max 1 parent column Count if 0 index index count 1 return get Background if cell Background null cell Background index null return get Background return cell Background index  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBackground checkWidget columnCount getBackground cellBackground cellBackground getBackground cellBackground
Returns a rectangle describing the receiver s size and location relative to its parent at a column in the table param index the index that specifies the column return the receiver s bounding column rectangle 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 Rectangle get Bounds int index check Widget parent check Items true if index 0 0 index index parent column Count return new Rectangle 0 0 0 0 Rect rect new Rect int item Index parent index Of this int id item Index 1 int column Id parent column Count 0 parent column id parent columns index id if OS Get Data Browser Item Part Bounds parent handle id column Id OS k Data Browser Property Enclosing Part rect OS no Err return new Rectangle 0 0 0 0 Rect rect2 new Rect if OS Get Data Browser Item Part Bounds parent handle id column Id OS k Data Browser Property Content Part rect2 OS no Err return new Rectangle 0 0 0 0 int x rect2 left y rect2 top int width rect right rect2 left int height rect2 bottom rect2 top OS Get Control Bounds parent handle rect x rect left y rect top return new Rectangle x y width 1 height 1  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBounds checkWidget checkItems columnCount itemIndex indexOf itemIndex columnId columnCount column_id GetDataBrowserItemPartBounds columnId kDataBrowserPropertyEnclosingPart noErr GetDataBrowserItemPartBounds columnId kDataBrowserPropertyContentPart noErr GetControlBounds
Returns code true code if the receiver is checked and false otherwise When the parent does not have the code CHECK code style return false return the checked state of the checkbox 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 boolean get Checked check Widget if parent style SWT CHECK 0 return false return checked  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getChecked checkWidget
Returns the font that the receiver will use to paint textual information for this item return the receiver s font 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 since 3 0 public Font get Font check Widget return font null font parent get Font  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getFont checkWidget getFont
Returns the font that the receiver will use to paint textual information for the specified cell in this item param index the column index return the receiver s font 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 since 3 0 public Font get Font int index check Widget int count Math max 1 parent column Count if 0 index index count 1 return get Font if cell Font null cell Font index null return get Font return cell Font index  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getFont checkWidget columnCount getFont cellFont cellFont getFont cellFont
Returns the foreground color that the receiver will use to draw return the receiver s foreground color 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 since 2 0 public Color get Foreground check Widget return foreground null foreground parent get Foreground  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getForeground checkWidget getForeground
Returns the foreground color at the given column index in the receiver param index the column index return the foreground color 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 since 3 0 public Color get Foreground int index check Widget int count Math max 1 parent column Count if 0 index index count 1 return get Foreground if cell Foreground null cell Foreground index null return get Foreground return cell Foreground index  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getForeground checkWidget columnCount getForeground cellForeground cellForeground getForeground cellForeground
Returns code true code if the receiver is grayed and false otherwise When the parent does not have the code CHECK code style return false return the grayed state of the checkbox 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 boolean get Grayed check Widget if parent style SWT CHECK 0 return false return grayed  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getGrayed checkWidget
Returns the image stored at the given column index in the receiver or null if the image has not been set or if the column does not exist param index the column index return the image stored at the given column index in the receiver 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 Image get Image int index check Widget if index 0 return super get Image if images null if 0 index index images length return images index return null  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getImage checkWidget getImage
Returns a rectangle describing the size and location relative to its parent of an image at a column in the table param index the index that specifies the column return the receiver s bounding image rectangle 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 Rectangle get Image Bounds int index check Widget parent check Items true if index 0 0 index index parent column Count return new Rectangle 0 0 0 0 Rect rect new Rect int item Index parent index Of this int id item Index 1 int column Id parent column Count 0 parent column id parent columns index id if OS Get Data Browser Item Part Bounds parent handle id column Id OS k Data Browser Property Content Part rect OS no Err return new Rectangle 0 0 0 0 int x rect left y rect top int width 0 if index 0 image null Rectangle bounds image get Bounds width bounds width if index 0 images null images index null Rectangle bounds images index get Bounds width bounds width int height rect bottom rect top 1 OS Get Control Bounds parent handle rect x rect left y rect top return new Rectangle x y width height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getImageBounds checkWidget checkItems columnCount itemIndex indexOf itemIndex columnId columnCount column_id GetDataBrowserItemPartBounds columnId kDataBrowserPropertyContentPart noErr getBounds getBounds GetControlBounds
Gets the image indent return the indent 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 int get Image Indent check Widget return 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getImageIndent checkWidget
Returns the receiver s parent which must be a code Table code return the receiver s parent 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 Table get Parent check Widget return parent  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getParent checkWidget
Returns the text stored at the given column index in the receiver or empty string if the text has not been set param index the column index return the text stored at the given column index in the receiver 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 exception SWT Error ul li ERROR CANNOT GET TEXT if the column at index does not exist li ul public String get Text int index check Widget if index 0 return super get Text if strings null if 0 index index strings length String string strings index return string null string return  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_TEXT getText checkWidget getText
void redraw cached true if parent ignore Redraw parent draw Count 0 return int item Index parent index Of this int id new int item Index 1 OS Update Data Browser Items parent handle 0 id length id OS k Data Browser Item No Property OS k Data Browser No Item  ignoreRedraw drawCount itemIndex indexOf itemIndex UpdateDataBrowserItems kDataBrowserItemNoProperty kDataBrowserNoItem
void release Child super release Child parent destroy Item this  releaseChild releaseChild destroyItem
void release Widget super release Widget parent null strings null images null background foreground null font null cell Background cell Foreground null cell Font null  releaseWidget releaseWidget cellBackground cellForeground cellFont
Sets the receiver s background color to the color specified by the argument or to the default system color for the item if the argument is null param color the new color or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 2 0 public void set Background Color color check Widget if color null color is Disposed SWT error SWT ERROR INVALID ARGUMENT if background color return if background null background equals color return background color redraw  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setBackground checkWidget isDisposed ERROR_INVALID_ARGUMENT
Sets the background color at the given column index in the receiver to the color specified by the argument or to the default system color for the item if the argument is null param index the column index param color the new color or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 3 0 public void set Background int index Color color check Widget if color null color is Disposed SWT error SWT ERROR INVALID ARGUMENT int count Math max 1 parent column Count if 0 index index count 1 return if cell Background null cell Background new Color count if cell Background index color return if cell Background index null cell Background index equals color return cell Background index color redraw  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setBackground checkWidget isDisposed ERROR_INVALID_ARGUMENT columnCount cellBackground cellBackground cellBackground cellBackground cellBackground cellBackground
Sets the checked state of the checkbox for this item This state change only applies if the Table was created with the SWT CHECK style param checked the new checked state of the checkbox 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 set Checked boolean checked check Widget if parent style SWT CHECK 0 return if this checked checked return this checked checked redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setChecked checkWidget
Sets the font that the receiver will use to paint textual information for this item to the font specified by the argument or to the default font for that kind of control if the argument is null param font the new font or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 3 0 public void set Font Font font check Widget if font null font is Disposed SWT error SWT ERROR INVALID ARGUMENT if this font font return if this font null this font equals font return this font font redraw  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setFont checkWidget isDisposed ERROR_INVALID_ARGUMENT
Sets the font that the receiver will use to paint textual information for the specified cell in this item to the font specified by the argument or to the default font for that kind of control if the argument is null param index the column index param font the new font or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 3 0 public void set Font int index Font font check Widget if font null font is Disposed SWT error SWT ERROR INVALID ARGUMENT int count Math max 1 parent column Count if 0 index index count 1 return if cell Font null cell Font new Font count if cell Font index font return if cell Font index null cell Font index equals font return cell Font index font redraw  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setFont checkWidget isDisposed ERROR_INVALID_ARGUMENT columnCount cellFont cellFont cellFont cellFont cellFont cellFont
Sets the receiver s foreground color to the color specified by the argument or to the default system color for the item if the argument is null param color the new color or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 2 0 public void set Foreground Color color check Widget if color null color is Disposed SWT error SWT ERROR INVALID ARGUMENT if foreground color return if foreground null foreground equals color return foreground color redraw  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setForeground checkWidget isDisposed ERROR_INVALID_ARGUMENT
Sets the foreground color at the given column index in the receiver to the color specified by the argument or to the default system color for the item if the argument is null param index the column index param color the new color or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 3 0 public void set Foreground int index Color color check Widget if color null color is Disposed SWT error SWT ERROR INVALID ARGUMENT int count Math max 1 parent column Count if 0 index index count 1 return if cell Foreground null cell Foreground new Color count if cell Foreground index color return if cell Foreground index null cell Foreground index equals color return cell Foreground index color redraw  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setForeground checkWidget isDisposed ERROR_INVALID_ARGUMENT columnCount cellForeground cellForeground cellForeground cellForeground cellForeground cellForeground
Sets the grayed state of the checkbox for this item This state change only applies if the Table was created with the SWT CHECK style param grayed the new grayed state of the checkbox 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 set Grayed boolean grayed check Widget if parent style SWT CHECK 0 return if this grayed grayed return this grayed grayed redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setGrayed checkWidget
Sets the image for multiple columns in the Table param images the array of new images exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the array of images is null li li ERROR INVALID ARGUMENT if one of the images has been disposed li ul 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 set Image Image images check Widget if images null error SWT ERROR NULL ARGUMENT for int i 0 i images length i set Image i images i  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setImage checkWidget ERROR_NULL_ARGUMENT setImage
Sets the receiver s image at a column param index the column index param image the new image exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the image has been disposed li ul 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 set Image int index Image image check Widget if image null image is Disposed error SWT ERROR INVALID ARGUMENT int item Index parent index Of this if item Index 1 return if index 0 if image null image type SWT ICON if image equals this image return width 1 super set Image image int count Math max 1 parent column Count if 0 index index count if images null images new Image count if image null image type SWT ICON if image equals images index return images index image if index 0 parent set Scroll Width this redraw  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setImage checkWidget isDisposed ERROR_INVALID_ARGUMENT itemIndex indexOf itemIndex setImage columnCount setScrollWidth
public void set Image Image image check Widget set Image 0 image  setImage checkWidget setImage
Sets the indent of the first column s image expressed in terms of the image s width param indent the new indent ul 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 set Image Indent int indent check Widget if indent 0 return Image indent is not supported on the Macintosh redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setImageIndent checkWidget
Sets the text for multiple columns in the table param strings the array of new strings exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the text is null li ul 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 set Text String strings check Widget if strings null error SWT ERROR NULL ARGUMENT for int i 0 i strings length i String string strings i if string null set Text i string  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setText checkWidget ERROR_NULL_ARGUMENT setText
Sets the receiver s text at a column param index the column index param string the new text exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the text is null li ul 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 set Text int index String string check Widget if string null error SWT ERROR NULL ARGUMENT if index 0 if string equals text return width 1 super set Text string int count Math max 1 parent column Count if 0 index index count if strings null strings new String count if string equals strings index return strings index string if index 0 parent set Scroll Width this redraw  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setText checkWidget ERROR_NULL_ARGUMENT setText columnCount setScrollWidth
public void set Text String string check Widget set Text 0 string  setText checkWidget setText

Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT SINGLE see SWT MULTI see SWT READ ONLY see SWT WRAP see Widget check Subclass see Widget get Style public Text Composite parent int style super parent check Style style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS READ_ONLY checkSubclass getStyle checkStyle
Adds the listener to the collection of listeners who will be notified when the receiver s text is modified by sending it one of the messages defined in the code Modify Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Modify Listener see remove Modify Listener public void add Modify Listener Modify Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Modify typed Listener  ModifyListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ModifyListener removeModifyListener addModifyListener ModifyListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener
Adds the listener to the collection of listeners who will be notified when the control is selected by sending it one of the messages defined in the code Selection Listener code interface p code widget Selected code is not called for texts code widget Default Selected code is typically called when ENTER is pressed in a single line text p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
Adds the listener to the collection of listeners who will be notified when the receiver s text is verified by sending it one of the messages defined in the code Verify Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Verify Listener see remove Verify Listener public void add Verify Listener Verify Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Verify typed Listener  VerifyListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS VerifyListener removeVerifyListener addVerifyListener VerifyListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener
Appends a string p The new text is appended to the text at the end of the widget p param string the string to be appended exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul 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 append String string check Widget if string null error SWT ERROR NULL ARGUMENT if hooks SWT Verify filters SWT Verify int char Count get Char Count string verify Text string char Count char Count null if string null return setTXN Text OS kTXN End Offset OS kTXN End Offset string OS TXN Set Selection txn Object OS kTXN End Offset OS kTXN End Offset OS TXN Show Selection txn Object false if string length 0 send Event SWT Modify  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget ERROR_NULL_ARGUMENT charCount getCharCount verifyText charCount charCount setTXNText kTXNEndOffset kTXNEndOffset TXNSetSelection txnObject kTXNEndOffset kTXNEndOffset TXNShowSelection txnObject sendEvent
static int check Style int style style check Bits style SWT LEFT SWT CENTER SWT RIGHT 0 0 0 if style SWT SINGLE 0 style SWT H SCROLL SWT V SCROLL SWT WRAP if style SWT WRAP 0 style SWT MULTI if style SWT MULTI 0 style SWT PASSWORD if style SWT SINGLE SWT MULTI 0 return style if style SWT H SCROLL SWT V SCROLL 0 return style SWT MULTI return style SWT SINGLE  checkStyle checkBits H_SCROLL V_SCROLL H_SCROLL V_SCROLL
Clears the selection 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 clear Selection check Widget int o Start Offset new int 1 o End Offset new int 1 OS TXN Get Selection txn Object o Start Offset o End Offset OS TXN Set Selection txn Object o Start Offset 0 o Start Offset 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS clearSelection checkWidget oStartOffset oEndOffset TXNGetSelection txnObject oStartOffset oEndOffset TXNSetSelection txnObject oStartOffset oStartOffset
public Point compute Size int w Hint int h Hint boolean changed check Widget TXN Long Rect o Text Rect new TXN Long Rect OS TXN Get Rect Bounds txn Object null null o Text Rect int width o Text Rect right o Text Rect left int height o Text Rect bottom o Text Rect top if width 0 width DEFAULT WIDTH if height 0 height DEFAULT HEIGHT if w Hint SWT DEFAULT width w Hint if h Hint SWT DEFAULT height h Hint Rectangle trim compute Trim 0 0 width height width trim width height trim height return new Point width height  computeSize wHint hHint checkWidget TXNLongRect oTextRect TXNLongRect TXNGetRectBounds txnObject oTextRect oTextRect oTextRect oTextRect oTextRect DEFAULT_WIDTH DEFAULT_HEIGHT wHint wHint hHint hHint computeTrim
public Rectangle compute Trim int x int y int width int height check Widget int ptr OS New Ptr Rect sizeof OS TXN GetTXN Object Controls txn Object 1 new int OS kTXN Margins Tag new int ptr Rect rect new Rect OS memcpy rect ptr Rect sizeof OS Dispose Ptr ptr width rect left rect right height rect top rect bottom int size new int 1 OS Get Theme Metric OS k Theme Metric Scroll Bar Width size if horizontal Bar null height size 0 if vertical Bar null width size 0 Rect inset inset x inset left y inset top width inset left inset right height inset top inset bottom return new Rectangle x y width height  computeTrim checkWidget NewPtr TXNGetTXNObjectControls txnObject kTXNMarginsTag DisposePtr GetThemeMetric kThemeMetricScrollBarWidth horizontalBar verticalBar
Copies the selected text p The current selection is copied to the clipboard 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 check Widget OS TXN Copy txn Object  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget TXNCopy txnObject
void create Handle int features OS k Control Supports Embedding OS k Control Supports Focus OS k Control Gets Focus On Click int out Control new int 1 int window OS Get Control Owner parent handle OS Create User Pane Control window null features out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0 Feature in the Macintosh The TXN Object is not a control but creates scroll bar controls to scroll the text These are created in the root and are not children of the user pane that is used to represent the TNX Object The fix is to embed the scroll bars in the user pane int the Root new int 1 OS Get Root Control window the Root short old Count new short 1 OS Count Sub Controls the Root 0 old Count Create the TXN Object int i Frame Options OS kTXN Dont Draw Caret When Inactive Mask OS kTXN Monostyled Text Mask if style SWT H SCROLL 0 i Frame Options OS kTXN WantH Scroll Bar Mask if style SWT V SCROLL 0 i Frame Options OS kTXN WantV Scroll Bar Mask if style SWT SINGLE 0 i Frame Options OS kTXN Single Line Only Mask if style SWT WRAP 0 i Frame Options OS kTXN Always Wrap At View Edge Mask int oTXN Object new int 1 oTXN FrameID new int 1 OS TXN New Object 0 window null i Frame Options OS kTXN Text Edit Style Frame Type OS kTXN Unicode Text File OS kTXN System Default Encoding oTXN Object oTXN FrameID 0 if oTXN Object 0 0 error SWT ERROR NO HANDLES txn Object oTXN Object 0 txn FrameID oTXN FrameID 0 Embed the scroll bars in the user pane short new Count new short 1 OS Count Sub Controls the Root 0 new Count int scroll Bar new int 1 for int i new Count 0 i old Count 0 i OS Get Indexed Sub Control the Root 0 short i scroll Bar OS HI View Remove From Superview scroll Bar 0 OS HI View Add Subview handle scroll Bar 0 Configure the TXN Object int ptr OS New Ptr Rect sizeof Rect rect new Rect if has Border OS Set Rect rect short 1 short 1 short 1 short 1 OS memcpy ptr rect Rect sizeof int tags new int OS kTXN Disable Drag And Drop Tag OS kTXNIO Privileges Tag OS kTXN Margins Tag int datas new int 1 style SWT READ ONLY 0 1 0 ptr OS TXN SetTXN Object Controls txn Object false tags length tags datas OS TXN Set Frame Bounds txn Object 0 0 0 0 txn FrameID OS Dispose Ptr ptr Bug in the Macintosh The caret height is too small until some text is set in the TXN Object The fix is to temporary change the text char buffer new char OS TXN Set Data txn Object OS kTXN Unicode Text Data buffer 2 OS kTXN Start Offset OS kTXN End Offset OS TXN Set Data txn Object OS kTXN Unicode Text Data buffer 0 OS kTXN Start Offset OS kTXN End Offset  createHandle kControlSupportsEmbedding kControlSupportsFocus kControlGetsFocusOnClick outControl GetControlOwner CreateUserPaneControl outControl outControl ERROR_NO_HANDLES outControl TXNObject TNXObject theRoot GetRootControl theRoot oldCount CountSubControls theRoot oldCount TXNObject iFrameOptions kTXNDontDrawCaretWhenInactiveMask kTXNMonostyledTextMask H_SCROLL iFrameOptions kTXNWantHScrollBarMask V_SCROLL iFrameOptions kTXNWantVScrollBarMask iFrameOptions kTXNSingleLineOnlyMask iFrameOptions kTXNAlwaysWrapAtViewEdgeMask oTXNObject oTXNFrameID TXNNewObject iFrameOptions kTXNTextEditStyleFrameType kTXNUnicodeTextFile kTXNSystemDefaultEncoding oTXNObject oTXNFrameID oTXNObject ERROR_NO_HANDLES txnObject oTXNObject txnFrameID oTXNFrameID newCount CountSubControls theRoot newCount scrollBar newCount oldCount GetIndexedSubControl theRoot scrollBar HIViewRemoveFromSuperview scrollBar HIViewAddSubview scrollBar TXNObject NewPtr hasBorder SetRect kTXNDisableDragAndDropTag kTXNIOPrivilegesTag kTXNMarginsTag READ_ONLY TXNSetTXNObjectControls txnObject TXNSetFrameBounds txnObject txnFrameID DisposePtr TXNObject TXNSetData txnObject kTXNUnicodeTextData kTXNStartOffset kTXNEndOffset TXNSetData txnObject kTXNUnicodeTextData kTXNStartOffset kTXNEndOffset
Scroll Bar create Scroll Bar int style return create Standard Bar style  ScrollBar createScrollBar createStandardBar
void create Widget super create Widget if style SWT PASSWORD 0 set Echo Char PASSWORD  createWidget createWidget setEchoChar
Cuts the selected text p The current selection is first copied to the clipboard and then deleted from 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 cut check Widget if style SWT READ ONLY 0 return boolean cut true Point old Selection get Selection if hooks SWT Verify filters SWT Verify if old Selection x old Selection y String new Text verify Text old Selection x old Selection y null if new Text null return if new Text length 0 setTXN Text OS kTXN Use Current Selection OS kTXN Use Current Selection new Text OS TXN Show Selection txn Object false cut false if cut OS TXN Cut txn Object Feature in the Macintosh When an empty string is set in the TXN Object the font attributes are cleared The fix is to reset them if OS TXN Data Size txn Object 2 0 set Font Style font Point new Selection get Selection if cut old Selection equals new Selection send Event SWT Modify  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget READ_ONLY oldSelection getSelection oldSelection oldSelection newText verifyText oldSelection oldSelection newText newText setTXNText kTXNUseCurrentSelection kTXNUseCurrentSelection newText TXNShowSelection txnObject TXNCut txnObject TXNObject TXNDataSize txnObject setFontStyle newSelection getSelection oldSelection newSelection sendEvent
Color default Background return display get System Color SWT COLOR LIST BACKGROUND  defaultBackground getSystemColor COLOR_LIST_BACKGROUND
Color default Foreground return display get System Color SWT COLOR LIST FOREGROUND  defaultForeground getSystemColor COLOR_LIST_FOREGROUND
void draw Background int control draw Focus control has Focus draw Focus Ring has Border get Parent Background inset  drawBackground drawFocus hasFocus drawFocusRing hasBorder getParentBackground
void draw Widget int control int damage Rgn int visible Rgn int the Event OS TXN Draw txn Object 0 super draw Widget control damage Rgn visible Rgn the Event  drawWidget damageRgn visibleRgn theEvent TXNDraw txnObject drawWidget damageRgn visibleRgn theEvent
Gets the line number of the caret p The line number of the caret is returned p return the line number 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 int get Caret Line Number check Widget if style SWT SINGLE 0 return 0 return get Top Pixel get Caret Location y get Line Height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getCaretLineNumber checkWidget getTopPixel getCaretLocation getLineHeight
Gets the location the caret p The location of the caret is returned p return a point the location of the caret 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 Point get Caret Location check Widget org eclipse swt internal carbon Point o Point new org eclipse swt internal carbon Point int o Start Offset new int 1 o End Offset new int 1 OS TXN Get Selection txn Object o Start Offset o End Offset OS TXN Offset To Point txn Object o Start Offset 0 o Point Rect o View Rect new Rect OS TXN Get View Rect txn Object o View Rect return new Point o Point h o View Rect left o Point v o View Rect top  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getCaretLocation checkWidget oPoint oStartOffset oEndOffset TXNGetSelection txnObject oStartOffset oEndOffset TXNOffsetToPoint txnObject oStartOffset oPoint oViewRect TXNGetViewRect txnObject oViewRect oPoint oViewRect oPoint oViewRect
Gets the position of the caret p The character position of the caret is returned p return the position of the caret 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 int get Caret Position check Widget int o Start Offset new int 1 o End Offset new int 1 OS TXN Get Selection txn Object o Start Offset o End Offset return o Start Offset 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getCaretPosition checkWidget oStartOffset oEndOffset TXNGetSelection txnObject oStartOffset oEndOffset oStartOffset
Gets the number of characters return number of characters in the widget 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 int get Char Count check Widget return OS TXN Data Size txn Object 2  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getCharCount checkWidget TXNDataSize txnObject
String get Clipboard Text int scrap new int 1 OS Get Current Scrap scrap int size new int 1 if OS Get Scrap Flavor Size scrap 0 OS k Scrap Flavor Type Text size OS no Err size 0 0 return byte buffer new byte size 0 if OS Get Scrap Flavor Data scrap 0 OS k Scrap Flavor Type Text size buffer OS no Err return int encoding OS CF String Get System Encoding int cfstring OS CF String Create With Bytes OS kCF Allocator Default buffer buffer length encoding true if cfstring 0 return String string int length OS CF String Get Length cfstring if length 0 char chars new char length CF Range range new CF Range range length length OS CF String Get Characters cfstring range chars string new String chars OS CF Release cfstring return string  getClipboardText GetCurrentScrap GetScrapFlavorSize kScrapFlavorTypeText noErr GetScrapFlavorData kScrapFlavorTypeText noErr CFStringGetSystemEncoding CFStringCreateWithBytes kCFAllocatorDefault CFStringGetLength CFRange CFRange CFStringGetCharacters CFRelease
Gets the double click enabled flag p The double click flag enables or disables the default action of the text widget when the user double clicks p return whether or not double click is enabled 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 boolean get Double Click Enabled check Widget NOT DONE return true  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getDoubleClickEnabled checkWidget
Gets the echo character p The echo character is the character that is displayed when the user enters text or the text is changed by the programmer p return the echo character 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 char get Echo Char check Widget return echo Character  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getEchoChar checkWidget echoCharacter
Gets the editable state return whether or not the reciever is editable 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 boolean get Editable check Widget return style SWT READ ONLY 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getEditable checkWidget READ_ONLY
Gets the number of lines return the number of lines in the widget 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 int get Line Count check Widget int o Line Total new int 1 OS TXN Get Line Count txn Object o Line Total return o Line Total 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getLineCount checkWidget oLineTotal TXNGetLineCount txnObject oLineTotal oLineTotal
Gets the line delimiter return a string that is the line delimiter 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 String get Line Delimiter check Widget return DELIMITER  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getLineDelimiter checkWidget
Gets the height of a line return the height of a row of text 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 int get Line Height check Widget int o Line Width new int 1 o Line Height new int 1 OS TXN Get Line Metrics txn Object 0 o Line Width o Line Height return OS Fix2 Long o Line Height 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getLineHeight checkWidget oLineWidth oLineHeight TXNGetLineMetrics txnObject oLineWidth oLineHeight Fix2Long oLineHeight
Returns the orientation of the receiver return the orientation style 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 since 2 1 2 public int get Orientation check Widget return style SWT LEFT TO RIGHT SWT RIGHT TO LEFT  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getOrientation checkWidget LEFT_TO_RIGHT RIGHT_TO_LEFT
Gets the position of the selected text p Indexing is zero based The range of a selection is from 0 N where N is the number of characters in the widget p return the start and end of the selection 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 Point get Selection check Widget int o Start Offset new int 1 o End Offset new int 1 OS TXN Get Selection txn Object o Start Offset o End Offset return new Point o Start Offset 0 o End Offset 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelection checkWidget oStartOffset oEndOffset TXNGetSelection txnObject oStartOffset oEndOffset oStartOffset oEndOffset
Gets the number of selected characters return the number of selected characters 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 int get Selection Count check Widget int o Start Offset new int 1 o End Offset new int 1 OS TXN Get Selection txn Object o Start Offset o End Offset return o End Offset 0 o Start Offset 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelectionCount checkWidget oStartOffset oEndOffset TXNGetSelection txnObject oStartOffset oEndOffset oEndOffset oStartOffset
Gets the selected text return the selected text 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 String get Selection Text check Widget return getTXN Text OS kTXN Use Current Selection OS kTXN Use Current Selection  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelectionText checkWidget getTXNText kTXNUseCurrentSelection kTXNUseCurrentSelection
Gets the number of tabs p Tab stop spacing is specified in terms of the space character The width of a single tab stop is the pixel width of the spaces p return the number of tab characters 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 int get Tabs check Widget NOT DONE return 8  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getTabs checkWidget
Gets the widget text p The text for a text widget is the characters in the widget p return the widget text 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 String get Text check Widget return getTXN Text OS kTXN Start Offset OS kTXN End Offset  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getText checkWidget getTXNText kTXNStartOffset kTXNEndOffset
Gets a range of text Returns an empty string if the start of the range is greater than the end p Indexing is zero based The range of a selection is from 0 N 1 where N is the number of characters in the widget p param start the start of the range param end the end of the range return the range of text 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 String get Text int start int end check Widget if start end 0 end return int length OS TXN Data Size txn Object 2 start Math max 0 start end Math min end length 1 return getTXN Text start end 1  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getText checkWidget TXNDataSize txnObject getTXNText
Returns the maximum number of characters that the receiver is capable of holding p If this has not been changed by code set Text Limit code it will be the constant code Text LIMIT code p return the text limit 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 int get Text Limit check Widget return text Limit  setTextLimit SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getTextLimit checkWidget textLimit
Returns the zero relative index of the line which is currently at the top of the receiver p This index can change when lines are scrolled or new lines are added or removed p return the index of the top line 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 int get Top Index check Widget if style SWT SINGLE 0 return 0 return get Top Pixel get Line Height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getTopIndex checkWidget getTopPixel getLineHeight
Gets the top pixel p The top pixel is the pixel position of the line that is currently at the top of the widget On some platforms a text widget can be scrolled by pixels instead of lines so that a partial line is displayed at the top of the widget p p The top pixel changes when the widget is scrolled The top pixel does not include the widget trimming p return the pixel position of the top line 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 int get Top Pixel check Widget if style SWT SINGLE 0 return 0 Rect o View Rect new Rect TXN Long Rect o Destination Rect new TXN Long Rect TXN Long Rect o Text Rect new TXN Long Rect OS TXN Get Rect Bounds txn Object o View Rect o Destination Rect o Text Rect return o Destination Rect top o Text Rect top  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getTopPixel checkWidget oViewRect TXNLongRect oDestinationRect TXNLongRect TXNLongRect oTextRect TXNLongRect TXNGetRectBounds txnObject oViewRect oDestinationRect oTextRect oDestinationRect oTextRect
String getTXN Text int i Start Offset int i End Offset int o Data Handle new int 1 OS TXN Get Data txn Object i Start Offset i End Offset o Data Handle if o Data Handle 0 0 return int length OS Get Handle Size o Data Handle 0 if length 0 return int ptr new int 1 OS H Lock o Data Handle 0 OS memcpy ptr o Data Handle 0 4 char buffer new char length 2 OS memcpy buffer ptr 0 length OS H Unlock o Data Handle 0 OS Dispose Handle o Data Handle 0 return new String buffer  getTXNText iStartOffset iEndOffset oDataHandle TXNGetData txnObject iStartOffset iEndOffset oDataHandle oDataHandle GetHandleSize oDataHandle HLock oDataHandle oDataHandle HUnlock oDataHandle DisposeHandle oDataHandle
Rect inset Rect rect new Rect int out Metric new int 1 if draw Focus Ring OS Get Theme Metric OS k Theme Metric Focus Rect Outset out Metric rect left out Metric 0 rect top out Metric 0 rect right out Metric 0 rect bottom out Metric 0 if has Border OS Get Theme Metric OS k Theme Metric Edit Text Frame Outset out Metric rect left out Metric 0 rect top out Metric 0 rect right out Metric 0 rect bottom out Metric 0 return rect  outMetric drawFocusRing GetThemeMetric kThemeMetricFocusRectOutset outMetric outMetric outMetric outMetric outMetric hasBorder GetThemeMetric kThemeMetricEditTextFrameOutset outMetric outMetric outMetric outMetric outMetric
Inserts a string p The old selection is replaced with the new text p param string the string 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 insert String string check Widget if string null error SWT ERROR NULL ARGUMENT if hooks SWT Verify filters SWT Verify Point selection get Selection string verify Text string selection x selection y null if string null return setTXN Text OS kTXN Use Current Selection OS kTXN Use Current Selection string OS TXN Show Selection txn Object false if string length 0 send Event SWT Modify  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget ERROR_NULL_ARGUMENT getSelection verifyText setTXNText kTXNUseCurrentSelection kTXNUseCurrentSelection TXNShowSelection txnObject sendEvent
int k Event Control Activate int next Handler int the Event int user Data int result super k Event Control Activate next Handler the Event user Data if result OS no Err return result OS TXN Focus txn Object has Focus OS TXN Activate txn Object txn FrameID OS k Scroll Bars Sync Always Active return result  kEventControlActivate nextHandler theEvent userData kEventControlActivate nextHandler theEvent userData noErr TXNFocus txnObject hasFocus TXNActivate txnObject txnFrameID kScrollBarsSyncAlwaysActive
int k Event Control Bounds Changed int next Handler int the Event int user Data int result super k Event Control Bounds Changed next Handler the Event user Data if result OS no Err return result int attributes new int 1 OS Get Event Parameter the Event OS k Event Param Attributes OS typeU Int32 null attributes length 4 null attributes if attributes 0 OS k Control Bounds Change Position Changed OS k Control Bounds Change Size Changed 0 setTXN Bounds return result  kEventControlBoundsChanged nextHandler theEvent userData kEventControlBoundsChanged nextHandler theEvent userData noErr GetEventParameter theEvent kEventParamAttributes typeUInt32 kControlBoundsChangePositionChanged kControlBoundsChangeSizeChanged setTXNBounds
int k Event Control Click int next Handler int the Event int user Data int result super k Event Control Click next Handler the Event user Data if result OS no Err return result if is Enabled return OS no Err int window OS Get Control Owner handle OS Set Keyboard Focus window handle short OS k Control Focus Next Part Event Record i Event new Event Record OS Convert Event Ref To Event Record the Event i Event OS TXN Click txn Object i Event return OS no Err  kEventControlClick nextHandler theEvent userData kEventControlClick nextHandler theEvent userData noErr isEnabled noErr GetControlOwner SetKeyboardFocus kControlFocusNextPart EventRecord iEvent EventRecord ConvertEventRefToEventRecord theEvent iEvent TXNClick txnObject iEvent noErr
int k Event Control Deactivate int next Handler int the Event int user Data int result super k Event Control Deactivate next Handler the Event user Data if result OS no Err return result OS TXN Focus txn Object has Focus OS TXN Activate txn Object txn FrameID OS k Scroll Bars Sync With Focus return result  kEventControlDeactivate nextHandler theEvent userData kEventControlDeactivate nextHandler theEvent userData noErr TXNFocus txnObject hasFocus TXNActivate txnObject txnFrameID kScrollBarsSyncWithFocus
int k Event Control Set Cursor int next Handler int the Event int user Data int result super k Event Control Set Cursor next Handler the Event user Data if result OS no Err return result OS TXN Adjust Cursor txn Object 0 return OS no Err  kEventControlSetCursor nextHandler theEvent userData kEventControlSetCursor nextHandler theEvent userData noErr TXNAdjustCursor txnObject noErr
int k Event Control Set Focus Part int next Handler int the Event int user Data int result super k Event Control Set Focus Part next Handler the Event user Data if result OS no Err return result short part new short 1 OS Get Event Parameter the Event OS k Event Param Control Part OS type Control Part Code null 2 null part draw Focus Clipped handle part 0 0 draw Focus Ring has Border get Parent Background inset OS TXN Draw txn Object 0 OS TXN Focus txn Object part 0 0 return OS no Err  kEventControlSetFocusPart nextHandler theEvent userData kEventControlSetFocusPart nextHandler theEvent userData noErr GetEventParameter theEvent kEventParamControlPart typeControlPartCode drawFocusClipped drawFocusRing hasBorder getParentBackground TXNDraw txnObject TXNFocus txnObject noErr
int k Event Text Input Unicode For Key Event int next Handler int the Event int user Data int result super k Event Text Input Unicode For Key Event next Handler the Event user Data if result OS no Err return result int keyboard Event new int 1 OS Get Event Parameter the Event OS k Event Param Text Input Send Keyboard Event OS type Event Ref null keyboard Event length 4 null keyboard Event int modifiers new int 1 OS Get Event Parameter keyboard Event 0 OS k Event Param Key Modifiers OS typeU Int32 null 4 null modifiers if modifiers 0 OS cmd Key int key Code new int 1 OS Get Event Parameter keyboard Event 0 OS k Event Param Key Code OS typeU Int32 null key Code length 4 null key Code switch key Code 0 case 7 X cut return OS no Err case 8 C copy return OS no Err case 9 V paste return OS no Err if style SWT SINGLE 0 int key Code new int 1 OS Get Event Parameter keyboard Event 0 OS k Event Param Key Code OS typeU Int32 null key Code length 4 null key Code switch key Code 0 Feature in the Macintosh Tab and Return characters are inserted into a single line TXN Object While this may be correct platform behavior it is unexpected The fix is to avoid calling the default handler case 36 Return post Event SWT Default Selection return OS no Err case 48 Tab return OS no Err return result  kEventTextInputUnicodeForKeyEvent nextHandler theEvent userData kEventTextInputUnicodeForKeyEvent nextHandler theEvent userData noErr keyboardEvent GetEventParameter theEvent kEventParamTextInputSendKeyboardEvent typeEventRef keyboardEvent keyboardEvent GetEventParameter keyboardEvent kEventParamKeyModifiers typeUInt32 cmdKey keyCode GetEventParameter keyboardEvent kEventParamKeyCode typeUInt32 keyCode keyCode keyCode noErr noErr noErr keyCode GetEventParameter keyboardEvent kEventParamKeyCode typeUInt32 keyCode keyCode keyCode postEvent DefaultSelection noErr noErr
Pastes text from clipboard p The selected text is deleted from the widget and new text inserted from the clipboard 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 check Widget if style SWT READ ONLY 0 return boolean paste true if hooks SWT Verify filters SWT Verify String old Text get Clipboard Text if old Text null Point selection get Selection String new Text verify Text old Text selection x selection y null if new Text null return if new Text old Text setTXN Text OS kTXN Use Current Selection OS kTXN Use Current Selection new Text OS TXN Show Selection txn Object false paste false if paste OS TXN Paste txn Object send Event SWT Modify  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget READ_ONLY oldText getClipboardText oldText getSelection newText verifyText oldText newText newText oldText setTXNText kTXNUseCurrentSelection kTXNUseCurrentSelection newText TXNShowSelection txnObject TXNPaste txnObject sendEvent
void release Widget super release Widget OS TXN Delete Object txn Object txn Object txn FrameID 0  releaseWidget releaseWidget TXNDeleteObject txnObject txnObject txnFrameID
Removes the listener from the collection of listeners who will be notified when the receiver s text is modified param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Modify Listener see add Modify Listener public void remove Modify Listener Modify Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Modify listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ModifyListener addModifyListener removeModifyListener ModifyListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable
Removes the listener from the collection of listeners who will be notified when the control is selected param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Selection listener event Table unhook SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable DefaultSelection
Removes the listener from the collection of listeners who will be notified when the control is verified param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Verify Listener see add Verify Listener public void remove Verify Listener Verify Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Verify listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS VerifyListener addVerifyListener removeVerifyListener VerifyListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable
void reset Visible Region int control super reset Visible Region control Bug in the Macintosh For some reason the TXN object draws when kTXN Visibility Tag is not set causing pixel corruption The fix is to make the TXN frame small so that nothing is drawn Rect rect new Rect OS Get Control Bounds handle rect Rect inset inset rect left inset left rect top inset top rect right inset right if OS Is Control Visible handle rect bottom inset bottom else rect bottom rect top OS TXN Set Frame Bounds txn Object rect top rect left rect bottom rect right txn FrameID  resetVisibleRegion resetVisibleRegion kTXNVisibilityTag GetControlBounds IsControlVisible TXNSetFrameBounds txnObject txnFrameID
Selects all the text in the receiver 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 select All check Widget OS TXN Select All txn Object  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS selectAll checkWidget TXNSelectAll txnObject
boolean send Key Event int type Event event if super send Key Event type event return false if type SWT Key Down return true if style SWT READ ONLY 0 return true if event character 0 return true String old Text int char Count get Char Count Point selection get Selection int start selection x end selection y switch event character case SWT BS if start end if start 0 return true start Math max 0 start 1 break case SWT DEL if start end if start char Count return true end Math min end 1 char Count break case SWT CR if style SWT SINGLE 0 return true old Text DELIMITER break default if event character t event character 0x20 return true old Text new String new char event character String new Text verify Text old Text start end event if new Text null return false if char Count end start new Text length text Limit return false if new Text old Text setTXN Text start end new Text Post the modify event so that the character will be inserted into the widget when the modify event is delivered Normally modify events are sent but it is safe to post the event here because this method is called from the event loop post Event SWT Modify return new Text old Text  sendKeyEvent sendKeyEvent KeyDown READ_ONLY oldText charCount getCharCount getSelection charCount charCount oldText oldText newText verifyText oldText newText charCount newText textLimit newText oldText setTXNText newText postEvent newText oldText
void set Background float color TXN Background txn Color new TXN Background txn Color bg Type OS kTXN Background TypeRGB int red short color null 0xff color 0 255 int green short color null 0xff color 1 255 int blue short color null 0xff color 2 255 txn Color bg red short red 8 red txn Color bg green short green 8 green txn Color bg blue short blue 8 blue OS TXN Set Background txn Object txn Color  setBackground TXNBackground txnColor TXNBackground txnColor bgType kTXNBackgroundTypeRGB txnColor bg_red txnColor bg_green txnColor bg_blue TXNSetBackground txnObject txnColor
int set Bounds int control int x int y int width int height boolean move boolean resize boolean events int result super set Bounds control x y width height move resize events if result RESIZED MOVED 0 setTXN Bounds return result  setBounds setBounds setTXNBounds
Sets the double click enabled flag p The double click flag enables or disables the default action of the text widget when the user double clicks p param double Click the new double click flag 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 set Double Click Enabled boolean double Click check Widget NOT DONE  doubleClick SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setDoubleClickEnabled doubleClick checkWidget
Sets the echo character p The echo character is the character that is displayed when the user enters text or the text is changed by the programmer Setting the echo character to 0 clears the echo character and redraws the original text If for any reason the echo character is invalid the default echo character for the platform is used p param echo the new echo character 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 set Echo Char char echo check Widget if style SWT MULTI 0 return echo Character echo OS TXN Echo Mode txn Object echo 0 echo 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setEchoChar checkWidget echoCharacter TXNEchoMode txnObject
Sets the editable state param editable the new editable 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 public void set Editable boolean editable check Widget if editable style SWT READ ONLY else style SWT READ ONLY OS TXN SetTXN Object Controls txn Object false 1 new int OS kTXNIO Privileges Tag new int style SWT READ ONLY 0 1 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setEditable checkWidget READ_ONLY READ_ONLY TXNSetTXNObjectControls txnObject kTXNIOPrivilegesTag READ_ONLY
void set Foreground float color int ptr2 OS New Ptr OS kTXNQD Font Color Attribute Size RGB Color rgb if color null rgb new RGB Color else rgb toRGB Color color OS memcpy ptr2 rgb RGB Color sizeof int attribs new int OS kTXNQD Font Color Attribute OS kTXNQD Font Color Attribute Size ptr2 int ptr1 OS New Ptr attribs length 4 OS memcpy ptr1 attribs attribs length 4 OS TXN Set Type Attributes txn Object attribs length 3 ptr1 0 0 OS Dispose Ptr ptr1 OS Dispose Ptr ptr2  setForeground NewPtr kTXNQDFontColorAttributeSize RGBColor RGBColor toRGBColor RGBColor kTXNQDFontColorAttribute kTXNQDFontColorAttributeSize NewPtr TXNSetTypeAttributes txnObject DisposePtr DisposePtr
void set Font Style Font font int attribs new int OS kTXNQD Font Size Attribute OS kTXNQD Font Size Attribute Size font null OS kTXN Default Font Size OS X2 Fix font size OS kTXNQD Font Style Attribute OS kTXNQD Font Style Attribute Size font null OS kTXN Default Font Style font style OS kTXNQD Font FamilyID Attribute OS kTXNQD Font FamilyID Attribute Size font null OS kTXN Default Font Name font id int ptr OS New Ptr attribs length 4 OS memcpy ptr attribs attribs length 4 boolean read Only style SWT READ ONLY 0 int tag new int OS kTXNIO Privileges Tag if read Only OS TXN SetTXN Object Controls txn Object false 1 tag new int 0 OS TXN Set Type Attributes txn Object attribs length 3 ptr 0 0 if read Only OS TXN SetTXN Object Controls txn Object false 1 tag new int 1 OS Dispose Ptr ptr  setFontStyle kTXNQDFontSizeAttribute kTXNQDFontSizeAttributeSize kTXNDefaultFontSize X2Fix kTXNQDFontStyleAttribute kTXNQDFontStyleAttributeSize kTXNDefaultFontStyle kTXNQDFontFamilyIDAttribute kTXNQDFontFamilyIDAttributeSize kTXNDefaultFontName NewPtr readOnly READ_ONLY kTXNIOPrivilegesTag readOnly TXNSetTXNObjectControls txnObject TXNSetTypeAttributes txnObject readOnly TXNSetTXNObjectControls txnObject DisposePtr
Sets the orientation of the receiver which must be one of the constants code SWT LEFT TO RIGHT code or code SWT RIGHT TO LEFT code p param orientation new orientation style 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 since 2 1 2 public void set Orientation int orientation check Widget  LEFT_TO_RIGHT RIGHT_TO_LEFT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setOrientation checkWidget
Sets the selection p Indexing is zero based The range of a selection is from 0 N where N is the number of characters in the widget p p Text selections are specified in terms of caret positions In a text widget that contains N characters there are N 1 caret positions ranging from 0 N This differs from other functions that address character position such as get Text that use the regular array indexing rules p param start new caret position 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 set Selection int start check Widget set Selection start start  getText SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget setSelection
Sets the selection p Indexing is zero based The range of a selection is from 0 N where N is the number of characters in the widget p p Text selections are specified in terms of caret positions In a text widget that contains N characters there are N 1 caret positions ranging from 0 N This differs from other functions that address character position such as get Text that use the usual array indexing rules p param start the start of the range param end the end of the range 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 set Selection int start int end check Widget int length OS TXN Data Size txn Object 2 int n Start Math min Math max Math min start end 0 length int n End Math min Math max Math max start end 0 length OS TXN Set Selection txn Object n Start n End OS TXN Show Selection txn Object false  getText SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget TXNDataSize txnObject nStart nEnd TXNSetSelection txnObject nStart nEnd TXNShowSelection txnObject
Sets the selection p Indexing is zero based The range of a selection is from 0 N where N is the number of characters in the widget p p Text selections are specified in terms of caret positions In a text widget that contains N characters there are N 1 caret positions ranging from 0 N This differs from other functions that address character position such as get Text that use the usual array indexing rules p param selection the point exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the point is null li ul 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 set Selection Point selection check Widget if selection null error SWT ERROR NULL ARGUMENT set Selection selection x selection y  getText IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget ERROR_NULL_ARGUMENT setSelection
Sets the number of tabs p Tab stop spacing is specified in terms of the space character The width of a single tab stop is the pixel width of the spaces p param tabs the number of tabs ul 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 set Tabs int tabs check Widget NOT DONE  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setTabs checkWidget
Sets the contents of the receiver to the given string If the receiver has style SINGLE and the argument contains multiple lines of text the result of this operation is undefined and may vary from platform to platform param string the new text exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the string is null li ul 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 set Text String string check Widget if string null error SWT ERROR NULL ARGUMENT if hooks SWT Verify filters SWT Verify string verify Text string 0 get Char Count null if string null return setTXN Text OS kTXN Start Offset OS kTXN End Offset string OS TXN Set Selection txn Object OS kTXN Start Offset OS kTXN Start Offset OS TXN Show Selection txn Object false send Event SWT Modify  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setText checkWidget ERROR_NULL_ARGUMENT verifyText getCharCount setTXNText kTXNStartOffset kTXNEndOffset TXNSetSelection txnObject kTXNStartOffset kTXNStartOffset TXNShowSelection txnObject sendEvent
void setTXN Bounds Rect view Rect new Rect OS TXN Get View Rect txn Object view Rect Rect rect new Rect OS Get Control Bounds handle rect Rect inset inset rect left inset left rect top inset top rect right inset right rect bottom inset bottom OS TXN Set Frame Bounds txn Object rect top rect left rect bottom rect right txn FrameID Bug in the Macintosh When the caret is moved the text widget scrolls to show the new location This means that the text widget may be scrolled to the left in order to show the caret when the widget is not large enough to show both the caret location and all the text Unfortunately when the widget is resized such that all the text and the caret could be visible the Macintosh does not scroll the widget back The fix is to save the current selection set the selection to the start of the text and then restore the selection This will cause the widget text widget to recompute the left scroll position int width view Rect left view Rect right int height view Rect bottom view Rect top if width inset left inset right height inset top inset bottom int o Start Offset new int 1 o End Offset new int 1 OS TXN Get Selection txn Object o Start Offset o End Offset OS TXN Set Selection txn Object OS kTXN Start Offset OS kTXN Start Offset OS TXN Show Selection txn Object false OS TXN Set Selection txn Object o Start Offset 0 o End Offset 0 OS TXN Show Selection txn Object false  setTXNBounds viewRect TXNGetViewRect txnObject viewRect GetControlBounds TXNSetFrameBounds txnObject txnFrameID viewRect viewRect viewRect viewRect oStartOffset oEndOffset TXNGetSelection txnObject oStartOffset oEndOffset TXNSetSelection txnObject kTXNStartOffset kTXNStartOffset TXNShowSelection txnObject TXNSetSelection txnObject oStartOffset oEndOffset TXNShowSelection txnObject
void setTXN Text int i Start Offset int i End Offset String string char buffer new char string length string get Chars 0 buffer length buffer 0 boolean read Only style SWT READ ONLY 0 int tag new int OS kTXNIO Privileges Tag if read Only OS TXN SetTXN Object Controls txn Object false 1 tag new int 0 OS TXN Set Data txn Object OS kTXN Unicode Text Data buffer buffer length 2 i Start Offset i End Offset if read Only OS TXN SetTXN Object Controls txn Object false 1 tag new int 1 Feature in the Macintosh When an empty string is set in the TXN Object the font attributes are cleared The fix is to reset them if OS TXN Data Size txn Object 2 0 set Font Style font  setTXNText iStartOffset iEndOffset getChars readOnly READ_ONLY kTXNIOPrivilegesTag readOnly TXNSetTXNObjectControls txnObject TXNSetData txnObject kTXNUnicodeTextData iStartOffset iEndOffset readOnly TXNSetTXNObjectControls txnObject TXNObject TXNDataSize txnObject setFontStyle
Sets the maximum number of characters that the receiver is capable of holding to be the argument p Instead of trying to set the text limit to zero consider creating a read only text widget p p To reset this value to the default use code set Text Limit Text LIMIT code p param limit new text limit exception Illegal Argument Exception ul li ERROR CANNOT BE ZERO if the limit is zero li ul 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 set Text Limit int limit check Widget if limit 0 error SWT ERROR CANNOT BE ZERO text Limit limit  setTextLimit IllegalArgumentException ERROR_CANNOT_BE_ZERO SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setTextLimit checkWidget ERROR_CANNOT_BE_ZERO textLimit
Sets the zero relative index of the line which is currently at the top of the receiver This index can change when lines are scrolled or new lines are added and removed param index the index of the top item 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 set Top Index int index check Widget if style SWT SINGLE 0 return NOT DONE Rect o View Rect new Rect TXN Long Rect o Destination Rect new TXN Long Rect TXN Long Rect o Text Rect new TXN Long Rect OS TXN Get Rect Bounds txn Object o View Rect o Destination Rect o Text Rect int top Pixel o Destination Rect top o Text Rect top int o Offset new int 1 org eclipse swt internal carbon Point i Point new org eclipse swt internal carbon Point OS Set Pt i Point short 0 short top Pixel index get Line Height OS TXN Point To Offset txn Object i Point o Offset System out println o Offset 0 int o Start Offset new int 1 o End Offset new int 1 OS TXN Get Selection txn Object o Start Offset o End Offset OS TXN Set Selection txn Object o Offset 0 o Offset 0 OS TXN Show Selection txn Object false OS TXN Set Selection txn Object o Start Offset 0 o End Offset 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setTopIndex checkWidget oViewRect TXNLongRect oDestinationRect TXNLongRect TXNLongRect oTextRect TXNLongRect TXNGetRectBounds txnObject oViewRect oDestinationRect oTextRect topPixel oDestinationRect oTextRect oOffset iPoint SetPt iPoint topPixel getLineHeight TXNPointToOffset txnObject iPoint oOffset oOffset oStartOffset oEndOffset TXNGetSelection txnObject oStartOffset oEndOffset TXNSetSelection txnObject oOffset oOffset TXNShowSelection txnObject TXNSetSelection txnObject oStartOffset oEndOffset
Shows the selection p If the selection is already showing in the receiver this method simply returns Otherwise lines are scrolled until the selection is visible 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 show Selection check Widget OS TXN Show Selection txn Object false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS showSelection checkWidget TXNShowSelection txnObject
int traversal Code int key int the Event int bits super traversal Code key the Event if style SWT READ ONLY 0 return bits if style SWT MULTI 0 bits SWT TRAVERSE RETURN if key 48 Tab the Event 0 int modifiers new int 1 OS Get Event Parameter the Event OS k Event Param Key Modifiers OS typeU Int32 null 4 null modifiers boolean next modifiers 0 OS shift Key 0 if next modifiers 0 OS control Key 0 bits SWT TRAVERSE TAB NEXT SWT TRAVERSE TAB PREVIOUS return bits  traversalCode theEvent traversalCode theEvent READ_ONLY TRAVERSE_RETURN theEvent GetEventParameter theEvent kEventParamKeyModifiers typeUInt32 shiftKey controlKey TRAVERSE_TAB_NEXT TRAVERSE_TAB_PREVIOUS
String verify Text String string int start int end Event key Event Event event new Event event text string event start start event end end if key Event null event character key Event character event key Code key Event key Code event state Mask key Event state Mask It is possible but unlikely that application code could have disposed the widget in the verify event If this happens answer null to cancel the operation send Event SWT Verify event if event doit is Disposed return null return event text  verifyText keyEvent keyEvent keyEvent keyCode keyEvent keyCode stateMask keyEvent stateMask sendEvent isDisposed

Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT FLAT see SWT WRAP see SWT RIGHT see SWT HORIZONTAL see SWT SHADOW OUT see SWT VERTICAL see Widget check Subclass see Widget get Style public Tool Bar Composite parent int style super parent check Style style Ensure that either of HORIZONTAL or VERTICAL is set NOTE HORIZONTAL and VERTICAL have the same values as H SCROLL and V SCROLL so it is necessary to first clear these bits to avoid scroll bars and then reset the bits using the original style supplied by the programmer if style SWT VERTICAL 0 this style SWT VERTICAL else this style SWT HORIZONTAL  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS SHADOW_OUT checkSubclass getStyle ToolBar checkStyle H_SCROLL V_SCROLL
static int check Style int style Even though it is legal to create this widget with scroll bars they serve no useful purpose because they do not automatically scroll the widget s client area The fix is to clear the SWT style return style SWT H SCROLL SWT V SCROLL  checkStyle H_SCROLL V_SCROLL
protected void check Subclass if is Valid Subclass error SWT ERROR INVALID SUBCLASS  checkSubclass isValidSubclass ERROR_INVALID_SUBCLASS
public Point compute Size int w Hint int h Hint boolean changed check Widget int width w Hint height h Hint if w Hint SWT DEFAULT width 0x7FFFFFFF if h Hint SWT DEFAULT height 0x7FFFFFFF int result layout width height false Point extent new Point result 1 result 2 if w Hint SWT DEFAULT extent x w Hint if h Hint SWT DEFAULT extent y h Hint return extent  computeSize wHint hHint checkWidget wHint hHint wHint hHint wHint wHint hHint hHint
void create Handle state GRAB super create Handle parent handle  createHandle createHandle
void create Item Tool Item item int index if 0 index index item Count error SWT ERROR INVALID RANGE if item Count items length Tool Item new Items new Tool Item item Count 4 System arraycopy items 0 new Items 0 items length items new Items item create Widget System arraycopy items index items index 1 item Count index items index item if parent font null item set Font Style parent font  createItem ToolItem itemCount ERROR_INVALID_RANGE itemCount ToolItem newItems ToolItem itemCount newItems newItems createWidget itemCount setFontStyle
void create Widget super create Widget items new Tool Item 4 item Count 0  createWidget createWidget ToolItem itemCount
int default Theme Font if display small Fonts return OS k Theme Small System Font return OS k Theme Toolbar Font  defaultThemeFont smallFonts kThemeSmallSystemFont kThemeToolbarFont
void destroy Item Tool Item item int index 0 while index item Count if items index item break index if index item Count return System arraycopy items index 1 items index item Count index items item Count null  destroyItem ToolItem itemCount itemCount itemCount itemCount
void draw Background int control draw Background control background  drawBackground drawBackground
void enable Widget boolean enabled Do nothing A tool bar does not disable items when it is disabled  enableWidget
Returns the item at the given zero relative index in the receiver Throws an exception if the index is out of range param index the index of the item to return return the item at the given index exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li ul 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 Tool Item get Item int index check Widget if 0 index index item Count return items index error SWT ERROR INVALID RANGE return null  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ToolItem getItem checkWidget itemCount ERROR_INVALID_RANGE
Returns the item at the given point in the receiver or null if no such item exists The point is in the coordinate system of the receiver param point the point used to locate the item return the item at the given point exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the point is null li ul 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 Tool Item get Item Point pt check Widget if pt null error SWT ERROR NULL ARGUMENT for int i 0 i item Count i Rectangle rect items i get Bounds if rect contains pt return items i return null  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ToolItem getItem checkWidget ERROR_NULL_ARGUMENT itemCount getBounds
Returns the number of items contained in the receiver return the number of items 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 int get Item Count check Widget return item Count  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getItemCount checkWidget itemCount
Returns an array of code Tool Item code s which are the items in the receiver p Note This is not the actual structure used by the receiver to maintain its list of items so modifying the array will not affect the receiver p return the items in the receiver 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 Tool Item get Items check Widget Tool Item result new Tool Item item Count System arraycopy items 0 result 0 item Count return result  ToolItem SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ToolItem getItems checkWidget ToolItem ToolItem itemCount itemCount
Returns the number of rows in the receiver When the receiver has the code WRAP code style the number of rows can be greater than one Otherwise the number of rows is always one return the number of items 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 int get Row Count check Widget Rectangle rect get Client Area return layout rect width rect height false 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getRowCount checkWidget getClientArea
Searches the receiver s list starting at the first item index 0 until an item is found that is equal to the argument and returns the index of that item If no item is found returns 1 param item the search item return the index of the item exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the tool item is null li li ERROR INVALID ARGUMENT if the tool item has been disposed li ul 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 int index Of Tool Item item check Widget if item null error SWT ERROR NULL ARGUMENT if item is Disposed error SWT ERROR INVALID ARGUMENT for int i 0 i item Count i if items i item return i return 1  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS indexOf ToolItem checkWidget ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT itemCount
void invalidate Children Visible Region int control super invalidate Children Visible Region control for int i 0 i item Count i Tool Item item items i item reset Visible Region control  invalidateChildrenVisibleRegion invalidateChildrenVisibleRegion itemCount ToolItem resetVisibleRegion
int layout Horizontal int width int height boolean resize int x Spacing 0 y Spacing 2 int margin Width 0 margin Height 0 int x margin Width y margin Height int max Height 0 maxX 0 rows 1 boolean wrap style SWT WRAP 0 int item Height 0 for int i 0 i item Count i Rectangle rect items i get Bounds item Height Math max item Height rect height for int i 0 i item Count i Tool Item item items i Rectangle rect item get Bounds if wrap i 0 x rect width width rows x margin Width y y Spacing max Height max Height 0 max Height Math max max Height rect height if resize item set Bounds x y rect width item Height x x Spacing rect width maxX Math max maxX x return new int rows maxX y max Height  layoutHorizontal xSpacing ySpacing marginWidth marginHeight marginWidth marginHeight maxHeight itemHeight itemCount getBounds itemHeight itemHeight itemCount ToolItem getBounds marginWidth ySpacing maxHeight maxHeight maxHeight maxHeight setBounds itemHeight xSpacing maxHeight
int layout Vertical int width int height boolean resize int x Spacing 2 y Spacing 0 int margin Width 0 margin Height 0 int x margin Width y margin Height int max Width 0 maxY 0 cols 1 boolean wrap style SWT WRAP 0 int item Width 0 for int i 0 i item Count i Rectangle rect items i get Bounds item Width Math max item Width rect width for int i 0 i item Count i Tool Item item items i Rectangle rect item get Bounds if wrap i 0 y rect height height cols x x Spacing max Width y margin Height max Width 0 max Width Math max max Width rect width if resize item set Bounds x y item Width rect height y y Spacing rect height maxY Math max maxY y return new int cols x max Width maxY  layoutVertical xSpacing ySpacing marginWidth marginHeight marginWidth marginHeight maxWidth itemWidth itemCount getBounds itemWidth itemWidth itemCount ToolItem getBounds xSpacing maxWidth marginHeight maxWidth maxWidth maxWidth setBounds itemWidth ySpacing maxWidth
int layout int n Width int n Height boolean resize if style SWT VERTICAL 0 return layout Vertical n Width n Height resize else return layout Horizontal n Width n Height resize  nWidth nHeight layoutVertical nWidth nHeight layoutHorizontal nWidth nHeight
void relayout if draw Count 0 return Rectangle rect get Client Area layout rect width rect height true  drawCount getClientArea
void relayout int width int height if draw Count 0 return layout width height true  drawCount
void release Widget for int i 0 i item Count i Tool Item item items i if item is Disposed item release Resources item Count 0 items null super release Widget  releaseWidget itemCount ToolItem isDisposed releaseResources itemCount releaseWidget
int set Bounds int control int x int y int width int height boolean move boolean resize boolean events int result super set Bounds control x y width height move resize events if result RESIZED 0 Rectangle rect get Client Area relayout rect width rect height return result  setBounds setBounds getClientArea
void set Font Style Font font super set Font Style font if items null return for int i 0 i item Count i Tool Item item items i item set Font Style font Point size item compute Size item set Size size x size y false relayout  setFontStyle setFontStyle itemCount ToolItem setFontStyle computeSize setSize
public void set Redraw boolean redraw check Widget super set Redraw redraw if redraw draw Count 0 relayout  setRedraw checkWidget setRedraw drawCount

Constructs a new instance of this class given its parent which must be a code Tool Bar code and a style value describing its behavior and appearance The item is added to the end of the items maintained by its parent p The style value is either one of the style constants defined in 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT PUSH see SWT CHECK see SWT RADIO see SWT SEPARATOR see SWT DROP DOWN see Widget check Subclass see Widget get Style public Tool Item Tool Bar parent int style super parent check Style style this parent parent parent create Item this parent get Item Count parent relayout  ToolBar IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS DROP_DOWN checkSubclass getStyle ToolItem ToolBar checkStyle createItem getItemCount
Constructs a new instance of this class given its parent which must be a code Tool Bar code a style value describing its behavior and appearance and the index at which to place it in the items maintained by its parent p The style value is either one of the style constants defined in 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 param index the index to store the receiver in its parent exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT PUSH see SWT CHECK see SWT RADIO see SWT SEPARATOR see SWT DROP DOWN see Widget check Subclass see Widget get Style public Tool Item Tool Bar parent int style int index super parent check Style style this parent parent parent create Item this index parent relayout  ToolBar IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS DROP_DOWN checkSubclass getStyle ToolItem ToolBar checkStyle createItem
Adds the listener to the collection of listeners who will be notified when the control is selected by sending it one of the messages defined in the code Selection Listener code interface p When code widget Selected code is called when the mouse is over the arrow portion of a drop down tool the event object detail field contains the value code SWT ARROW code code widget Default Selected code is not called p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
static int check Style int style return check Bits style SWT PUSH SWT CHECK SWT RADIO SWT SEPARATOR SWT DROP DOWN 0  checkStyle checkBits DROP_DOWN
protected void check Subclass if is Valid Subclass error SWT ERROR INVALID SUBCLASS  checkSubclass isValidSubclass ERROR_INVALID_SUBCLASS
Point compute Size check Widget int width 0 height 0 if style SWT SEPARATOR 0 if parent style SWT HORIZONTAL 0 width get Width height DEFAULT HEIGHT else width DEFAULT WIDTH height get Width else int space 0 int string Width 0 string Height 0 if text length 0 GC gc new GC parent Point size gc string Extent text string Width size x string Height size y gc dispose int image Width 0 image Height 0 if image null if text length 0 space 2 Rectangle rect image get Bounds image Width rect width image Height rect height if parent style SWT RIGHT 0 width string Width image Width height Math max string Height image Height else width Math max string Width image Width height string Height image Height if style SWT DROP DOWN 0 width ARROW WIDTH int inset 3 width space inset 2 height space inset 2 return new Point width height  computeSize checkWidget getWidth DEFAULT_HEIGHT DEFAULT_WIDTH getWidth stringWidth stringHeight stringExtent stringWidth stringHeight imageWidth imageHeight getBounds imageWidth imageHeight stringWidth imageWidth stringHeight imageHeight stringWidth imageWidth stringHeight imageHeight DROP_DOWN ARROW_WIDTH
void create Handle int out Control new int 1 int window OS Get Control Owner parent handle int features OS k Control Supports Embedding 1 4 OS Create User Pane Control window null features out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0 int width DEFAULT WIDTH height DEFAULT HEIGHT if style SWT SEPARATOR 0 Control Button Content Info in Content new Control Button Content Info OS Create Icon Control window null in Content false out Control if out Control 0 0 error SWT ERROR NO HANDLES icon Handle out Control 0 OS Create Icon Control window null in Content false out Control if out Control 0 0 error SWT ERROR NO HANDLES label Handle out Control 0 else if parent style SWT HORIZONTAL 0 width DEFAULT SEPARATOR WIDTH else height DEFAULT SEPARATOR WIDTH set Bounds 0 0 width height parent relayout  createHandle outControl GetControlOwner kControlSupportsEmbedding CreateUserPaneControl outControl outControl ERROR_NO_HANDLES outControl DEFAULT_WIDTH DEFAULT_HEIGHT ControlButtonContentInfo inContent ControlButtonContentInfo CreateIconControl inContent outControl outControl ERROR_NO_HANDLES iconHandle outControl CreateIconControl inContent outControl outControl ERROR_NO_HANDLES labelHandle outControl DEFAULT_SEPARATOR_WIDTH DEFAULT_SEPARATOR_WIDTH setBounds
void create Widget super create Widget setZ Order tool Tip Text  createWidget createWidget setZOrder toolTipText
void deregister super deregister display remove Widget handle if icon Handle 0 display remove Widget icon Handle if label Handle 0 display remove Widget label Handle  removeWidget iconHandle removeWidget iconHandle labelHandle removeWidget labelHandle
void destroy Widget int the Control handle release Handle if the Control 0 OS Dispose Control the Control  destroyWidget theControl releaseHandle theControl DisposeControl theControl
public void dispose if is Disposed return Tool Bar parent this parent super dispose parent relayout  isDisposed ToolBar
void draw Background int control draw Background control null  drawBackground drawBackground
void draw Widget int control int damage Rgn int visible Rgn int the Event if control handle style SWT DROP DOWN SWT SEPARATOR 0 int state OS Is Control Enabled control OS Is Control Active control OS k Theme State Active OS k Theme State Inactive Rect rect new Rect OS Get Control Bounds handle rect if style SWT SEPARATOR 0 rect top 2 rect bottom 2 OS Draw Theme Separator rect state if style SWT DROP DOWN 0 int height rect bottom rect top rect top short rect bottom height 2 1 rect left short rect right ARROW WIDTH OS Draw Theme Popup Arrow rect short OS k Theme Arrow Down short OS k Theme Arrow5pt state 0 0  drawWidget damageRgn visibleRgn theEvent DROP_DOWN IsControlEnabled IsControlActive kThemeStateActive kThemeStateInactive GetControlBounds DrawThemeSeparator DROP_DOWN ARROW_WIDTH DrawThemePopupArrow kThemeArrowDown kThemeArrow5pt
Returns a rectangle describing the receiver s size and location relative to its parent return the receiver s bounding rectangle 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 Rectangle get Bounds check Widget Rect rect get Control Bounds handle return new Rectangle rect left rect top rect right rect left rect bottom rect top  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBounds checkWidget getControlBounds
Returns the control that is used to fill the bounds of the item when the items is a code SEPARATOR code return the control 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 Control get Control check Widget return control  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getControl checkWidget
Returns the receiver s disabled image if it has one or null if it does not p The disabled image is displayed when the receiver is disabled p return the receiver s disabled image 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 Image get Disabled Image check Widget return disabled Image  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getDisabledImage checkWidget disabledImage
Returns code true code if the receiver is enabled and code false code otherwise A disabled control is typically not selectable from the user interface and draws with an inactive or grayed look return the receiver s 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 is Enabled public boolean get Enabled check Widget return state DISABLED 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS isEnabled getEnabled checkWidget
int get Draw Count int control return parent get Draw Count control  getDrawCount getDrawCount
Returns the receiver s hot image if it has one or null if it does not p The hot image is displayed when the mouse enters the receiver p return the receiver s hot image 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 Image get Hot Image check Widget return hot Image  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getHotImage checkWidget hotImage
Returns the receiver s parent which must be a code Tool Bar code return the receiver s parent 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 Tool Bar get Parent check Widget return parent  ToolBar SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ToolBar getParent checkWidget
Returns code true code if the receiver is selected and false otherwise p When the receiver is of type code CHECK code or code RADIO code it is selected when it is checked which some platforms draw as a pushed in button If the receiver is of any other type this method returns false p return the selection 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 public boolean get Selection check Widget if style SWT CHECK SWT RADIO 0 return false short transform new short 1 OS Get Control Data icon Handle short OS k Control Entire Control OS k Control Icon Transform Tag 2 transform null return transform 0 OS k Transform Selected 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelection checkWidget GetControlData iconHandle kControlEntireControl kControlIconTransformTag kTransformSelected
Returns the receiver s tool tip text or null if it has not been set return the receiver s tool tip text 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 String get Tool Tip Text check Widget return tool Tip Text  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getToolTipText checkWidget toolTipText
Gets the width of the receiver return the width 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 int get Width check Widget Rect rect new Rect OS Get Control Bounds handle rect return rect right rect left  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getWidth checkWidget GetControlBounds
int get Visible Region int control boolean clip Children if visible Rgn 0 visible Rgn OS New Rgn calculate Visible Region control visible Rgn false int result OS New Rgn OS Copy Rgn visible Rgn result return result  getVisibleRegion clipChildren visibleRgn visibleRgn NewRgn calculateVisibleRegion visibleRgn NewRgn CopyRgn visibleRgn
int help Proc int in Control int in Global Mouse int in Request int out Content Provided int io Help Content switch in Request case OS kHM Supply Content int content Provided new int OS kHM Content Not Provided if tool Tip Text null tool Tip Text length 0 char buffer new char tool Tip Text length tool Tip Text get Chars 0 buffer length buffer 0 int length fix Mnemonic buffer if display help String 0 OS CF Release display help String display help String OS CF String Create With Characters OS kCF Allocator Default buffer length HM Help Content Rec help Content new HM Help Content Rec OS memcpy help Content io Help Content HM Help Content Rec sizeof help Content version OS k Mac Help Version help Content tag Side short OS kHM Default Side display help Control null help Content absHotRect left short 0 help Content absHotRect top short 0 help Content absHotRect right short 0 help Content absHotRect bottom short 0 help Content content0 contentType OS kHMCF String Content help Content content0 tagCFString display help String help Content content1 contentType OS kHMCF String Content help Content content1 tagCFString display help String OS memcpy io Help Content help Content HM Help Content Rec sizeof content Provided 0 OS kHM Content Provided OS memcpy out Content Provided content Provided 4 break case OS kHM Dispose Content if display help String 0 OS CF Release display help String display help String 0 break return OS no Err  helpProc inControl inGlobalMouse inRequest outContentProvided ioHelpContent inRequest kHMSupplyContent contentProvided kHMContentNotProvided toolTipText toolTipText toolTipText toolTipText getChars fixMnemonic helpString CFRelease helpString helpString CFStringCreateWithCharacters kCFAllocatorDefault HMHelpContentRec helpContent HMHelpContentRec helpContent ioHelpContent HMHelpContentRec helpContent kMacHelpVersion helpContent tagSide kHMDefaultSide helpControl helpContent absHotRect_left helpContent absHotRect_top helpContent absHotRect_right helpContent absHotRect_bottom helpContent content0_contentType kHMCFStringContent helpContent content0_tagCFString helpString helpContent content1_contentType kHMCFStringContent helpContent content1_tagCFString helpString ioHelpContent helpContent HMHelpContentRec contentProvided kHMContentProvided outContentProvided contentProvided kHMDisposeContent helpString CFRelease helpString helpString noErr
void hook Events super hook Events int control Proc display control Proc int mask1 new int OS k Event Class Control OS k Event Control Draw OS k Event Class Control OS k Event Control Hit OS k Event Class Control OS k Event Control Contextual Menu Click OS k Event Class Control OS k Event Control Track int control Target OS Get Control Event Target handle OS Install Event Handler control Target control Proc mask1 length 2 mask1 handle null int mask2 new int OS k Event Class Control OS k Event Control Draw OS k Event Class Control OS k Event Control Contextual Menu Click OS k Event Class Control OS k Event Control Track if icon Handle 0 control Target OS Get Control Event Target icon Handle OS Install Event Handler control Target control Proc mask2 length 2 mask2 icon Handle null if label Handle 0 control Target OS Get Control Event Target label Handle OS Install Event Handler control Target control Proc mask2 length 2 mask2 label Handle null int help Proc display help Proc OS HM Install Control Content Callback handle help Proc  hookEvents hookEvents controlProc controlProc kEventClassControl kEventControlDraw kEventClassControl kEventControlHit kEventClassControl kEventControlContextualMenuClick kEventClassControl kEventControlTrack controlTarget GetControlEventTarget InstallEventHandler controlTarget controlProc kEventClassControl kEventControlDraw kEventClassControl kEventControlContextualMenuClick kEventClassControl kEventControlTrack iconHandle controlTarget GetControlEventTarget iconHandle InstallEventHandler controlTarget controlProc iconHandle labelHandle controlTarget GetControlEventTarget labelHandle InstallEventHandler controlTarget controlProc labelHandle helpProc helpProc HMInstallControlContentCallback helpProc
void invalidate Visible Region int control reset Visible Region control parent reset Visible Region control  invalidateVisibleRegion resetVisibleRegion resetVisibleRegion
void inval Window Rgn int window int rgn parent inval Window Rgn window rgn  invalWindowRgn invalWindowRgn
Returns code true code if the receiver is enabled and all of the receiver s ancestors are enabled and code false code otherwise A disabled control is typically not selectable from the user interface and draws with an inactive or grayed look return the receiver s 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 get Enabled public boolean is Enabled check Widget return get Enabled parent is Enabled  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getEnabled isEnabled checkWidget getEnabled isEnabled
int k Event Control Contextual Menu Click int next Handler int the Event int user Data return parent k Event Control Contextual Menu Click next Handler the Event user Data  kEventControlContextualMenuClick nextHandler theEvent userData kEventControlContextualMenuClick nextHandler theEvent userData
int k Event Control Hit int next Handler int the Event int user Data int result super k Event Control Hit next Handler the Event user Data if result OS no Err return result if style SWT RADIO 0 if parent get Style SWT NO RADIO GROUP 0 select Radio if style SWT CHECK 0 set Selection get Selection post Event SWT Selection return OS event Not Handled Err  kEventControlHit nextHandler theEvent userData kEventControlHit nextHandler theEvent userData noErr getStyle NO_RADIO_GROUP selectRadio setSelection getSelection postEvent eventNotHandledErr
int k Event Control Track int next Handler int the Event int user Data tracking true return OS event Not Handled Err  kEventControlTrack nextHandler theEvent userData eventNotHandledErr
int k Event Mouse Down int next Handler int the Event int user Data int result parent k Event Mouse Down next Handler the Event user Data if result OS no Err return result if style SWT DROP DOWN 0 int sizeof org eclipse swt internal carbon Point sizeof org eclipse swt internal carbon Point pt new org eclipse swt internal carbon Point OS Get Event Parameter the Event OS k Event Param Mouse Location OS typeQD Point null sizeof null pt Rect rect new Rect int window OS Get Control Owner handle OS Get Window Bounds window short OS k Window Content Rgn rect int x pt h rect left int y pt v rect top OS Get Control Bounds handle rect x rect left y rect top int width rect right rect left if width x 12 x rect left y rect bottom OS Get Control Bounds parent handle rect x rect left y rect top Event event new Event event detail SWT ARROW event x x event y y post Event SWT Selection event Feature in the Macintosh Some controls call Track Control or Handle Control Click to track the mouse Unfortunately mouse move events and the mouse up events are consumed The fix is to call the default handler and send a fake mouse up when tracking is finished NOTE No mouse move events are sent while tracking There is no fix for this at this time display grab Control null display run Deferred Events tracking false result OS Call Next Event Handler next Handler the Event if tracking org eclipse swt internal carbon Point out Pt new org eclipse swt internal carbon Point OS Get Global Mouse out Pt Rect rect new Rect int window OS Get Control Owner handle OS Get Window Bounds window short OS k Window Content Rgn rect int x out Pt h rect left int y out Pt v rect top OS Get Control Bounds parent handle rect x rect left y rect top short button new short 1 OS Get Event Parameter the Event OS k Event Param Mouse Button OS type Mouse Button null 2 null button int chord OS Get Current Event Button State int modifiers OS Get Current Event Key Modifiers parent send Mouse Event SWT Mouse Up button 0 chord short x short y modifiers false tracking false return result  kEventMouseDown nextHandler theEvent userData kEventMouseDown nextHandler theEvent userData noErr DROP_DOWN GetEventParameter theEvent kEventParamMouseLocation typeQDPoint GetControlOwner GetWindowBounds kWindowContentRgn GetControlBounds GetControlBounds postEvent TrackControl HandleControlClick grabControl runDeferredEvents CallNextEventHandler nextHandler theEvent outPt GetGlobalMouse outPt GetControlOwner GetWindowBounds kWindowContentRgn outPt outPt GetControlBounds GetEventParameter theEvent kEventParamMouseButton typeMouseButton GetCurrentEventButtonState GetCurrentEventKeyModifiers sendMouseEvent MouseUp
int k Event Mouse Dragged int next Handler int the Event int user Data return parent k Event Mouse Dragged next Handler the Event user Data  kEventMouseDragged nextHandler theEvent userData kEventMouseDragged nextHandler theEvent userData
int k Event Mouse Moved int next Handler int the Event int user Data return parent k Event Mouse Moved next Handler the Event user Data  kEventMouseMoved nextHandler theEvent userData kEventMouseMoved nextHandler theEvent userData
int k Event Mouse Up int next Handler int the Event int user Data return parent k Event Mouse Up next Handler the Event user Data  kEventMouseUp nextHandler theEvent userData kEventMouseUp nextHandler theEvent userData
void register super register display add Widget handle this if icon Handle 0 display add Widget icon Handle this if label Handle 0 display add Widget label Handle this  addWidget iconHandle addWidget iconHandle labelHandle addWidget labelHandle
void release Child super release Child set Visible handle false parent destroy Item this  releaseChild releaseChild setVisible destroyItem
void release Handle super release Handle handle icon Handle label Handle 0  releaseHandle releaseHandle iconHandle labelHandle
void release Widget super release Widget if c Icon 0 destroyC Icon c Icon if labelC Icon 0 destroyC Icon labelC Icon c Icon labelC Icon 0 if visible Rgn 0 OS Dispose Rgn visible Rgn visible Rgn 0 parent null control null tool Tip Text null image disabled Image hot Image null  releaseWidget releaseWidget cIcon destroyCIcon cIcon labelCIcon destroyCIcon labelCIcon cIcon labelCIcon visibleRgn DisposeRgn visibleRgn visibleRgn toolTipText disabledImage hotImage
Removes the listener from the collection of listeners who will be notified when the control is selected param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Selection listener event Table unhook SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable DefaultSelection
void reset Visible Region int control if visible Rgn 0 OS Dispose Rgn visible Rgn visible Rgn 0  resetVisibleRegion visibleRgn DisposeRgn visibleRgn visibleRgn
void select Radio int index 0 Tool Item items parent get Items while index items length items index this index int i index 1 while i 0 items i set Radio Selection false i int j index 1 while j items length items j set Radio Selection false j set Selection true  selectRadio ToolItem getItems setRadioSelection setRadioSelection setSelection
void set Bounds int x int y int width int height if control null control set Bounds x y width height set Bounds handle x y width height true true false if style SWT SEPARATOR 0 return int space 0 int inset 3 int string Width 0 string Height 0 if text length 0 GC gc new GC parent Point size gc string Extent text string Width size x string Height size y gc dispose int image Width 0 image Height 0 if image null if text length 0 space 2 Rectangle rect image get Bounds image Width rect width image Height rect height int arrow Width 0 if style SWT DROP DOWN 0 arrow Width ARROW WIDTH if parent style SWT RIGHT 0 int imageX inset int imageY inset height inset 2 image Height 2 set Bounds icon Handle imageX imageY image Width image Height true true false int labelX imageX image Width space int labelY inset height inset 2 string Height 2 set Bounds label Handle labelX labelY string Width string Height true true false else int imageX inset width inset 2 arrow Width image Width 2 int imageY inset set Bounds icon Handle imageX imageY image Width image Height true true false int labelX inset width inset 2 arrow Width string Width 2 int labelY imageY image Height space set Bounds label Handle labelX labelY string Width string Height true true false  setBounds setBounds setBounds stringWidth stringHeight stringExtent stringWidth stringHeight imageWidth imageHeight getBounds imageWidth imageHeight arrowWidth DROP_DOWN arrowWidth ARROW_WIDTH imageHeight setBounds iconHandle imageWidth imageHeight imageWidth stringHeight setBounds labelHandle stringWidth stringHeight arrowWidth imageWidth setBounds iconHandle imageWidth imageHeight arrowWidth stringWidth imageHeight setBounds labelHandle stringWidth stringHeight
Sets the control that is used to fill the bounds of the item when the items is a code SEPARATOR code param control the new control exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the control has been disposed li li ERROR INVALID PARENT if the control is not in the same widget tree li ul 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 set Control Control control check Widget if control null if control is Disposed error SWT ERROR INVALID ARGUMENT if control parent parent error SWT ERROR INVALID PARENT if style SWT SEPARATOR 0 return this control control if control null control is Disposed control set Bounds get Bounds  IllegalArgumentException ERROR_INVALID_ARGUMENT ERROR_INVALID_PARENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setControl checkWidget isDisposed ERROR_INVALID_ARGUMENT ERROR_INVALID_PARENT isDisposed setBounds getBounds
Enables the receiver if the argument is code true code and disables it otherwise p A disabled control is typically not selectable from the user interface and draws with an inactive or grayed look p param enabled the new 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 public void set Enabled boolean enabled check Widget if enabled if state DISABLED 0 return state DISABLED OS Enable Control handle else if state DISABLED 0 return state DISABLED OS Disable Control handle  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setEnabled checkWidget EnableControl DisableControl
void set Font Style Font font This code is intentionaly commented Control Font Style Rec font Style new Control Font Style Rec if font null font Style flags OS k Control Use Font Mask OS k Control Use Size Mask OS k Control Use Face Mask font Style font font id font Style style font style font Style size font size else font Style flags OS k Control Use Theme FontID Mask font Style font short parent default Theme Font OS Set Control Font Style label Handle font Style update Text  setFontStyle ControlFontStyleRec fontStyle ControlFontStyleRec fontStyle kControlUseFontMask kControlUseSizeMask kControlUseFaceMask fontStyle fontStyle fontStyle fontStyle kControlUseThemeFontIDMask fontStyle defaultThemeFont SetControlFontStyle labelHandle fontStyle updateText
Sets the receiver s disabled image to the argument which may be null indicating that no disabled image should be displayed p The disbled image is displayed when the receiver is disabled p param image the disabled image to display on the receiver may be null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the image has been disposed li ul 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 set Disabled Image Image image check Widget if image null image is Disposed error SWT ERROR INVALID ARGUMENT if style SWT SEPARATOR 0 return disabled Image image update Image  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setDisabledImage checkWidget isDisposed ERROR_INVALID_ARGUMENT disabledImage updateImage
Sets the receiver s hot image to the argument which may be null indicating that no hot image should be displayed p The hot image is displayed when the mouse enters the receiver p param image the hot image to display on the receiver may be null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the image has been disposed li ul 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 set Hot Image Image image check Widget if image null image is Disposed error SWT ERROR INVALID ARGUMENT if style SWT SEPARATOR 0 return hot Image image update Image  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setHotImage checkWidget isDisposed ERROR_INVALID_ARGUMENT hotImage updateImage
public void set Image Image image check Widget if image null image is Disposed error SWT ERROR INVALID ARGUMENT if style SWT SEPARATOR 0 return super set Image image update Image  setImage checkWidget isDisposed ERROR_INVALID_ARGUMENT setImage updateImage
boolean set Radio Selection boolean value if style SWT RADIO 0 return false if get Selection value set Selection value post Event SWT Selection return true  setRadioSelection getSelection setSelection postEvent
Sets the selection state of the receiver p When the receiver is of type code CHECK code or code RADIO code it is selected when it is checked which some platforms draw as a pushed in button p param selected the new selection 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 public void set Selection boolean selected check Widget if style SWT CHECK SWT RADIO 0 return int transform selected OS k Transform Selected 0 OS Set Control Data icon Handle OS k Control Entire Control OS k Control Icon Transform Tag 2 new short short transform if image null OS Set Control Data label Handle OS k Control Entire Control OS k Control Icon Transform Tag 2 new short short transform redraw Widget handle true  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget kTransformSelected SetControlData iconHandle kControlEntireControl kControlIconTransformTag SetControlData labelHandle kControlEntireControl kControlIconTransformTag redrawWidget
void set Size int width int height boolean layout Rect rect new Rect OS Get Control Bounds handle rect if rect right rect left width rect bottom rect top height set Bounds handle 0 0 width height false true false if layout parent relayout  setSize GetControlBounds setBounds
Sets the receiver s text The string may include the mnemonic character p p Mnemonics are indicated by an amp that causes the next character to be the mnemonic When the user presses a key sequence that matches the mnemonic a selection event occurs On most platforms the mnemonic appears underlined but may be emphasised in a platform specific manner The mnemonic indicator character amp can be escaped by doubling it in the string causing a single amp to be displayed p param string the new text exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the text is null li ul 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 set Text String string check Widget if string null error SWT ERROR NULL ARGUMENT if style SWT SEPARATOR 0 return super set Text string update Text  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setText checkWidget ERROR_NULL_ARGUMENT setText updateText
Sets the receiver s tool tip text to the argument which may be null indicating that no tool tip text should be shown param string the new tool tip text or null 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 set Tool Tip Text String string check Widget tool Tip Text string  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setToolTipText checkWidget toolTipText
Sets the width of the receiver param width the new width 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 set Width int width check Widget if style SWT SEPARATOR 0 return if width 0 return Rect rect new Rect OS Get Control Bounds handle rect set Size width rect bottom rect top true if control null control is Disposed control set Bounds get Bounds  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setWidth checkWidget GetControlBounds setSize isDisposed setBounds getBounds
void setZ Order OS HI View Add Subview parent handle handle if icon Handle 0 OS HI View Add Subview handle icon Handle if label Handle 0 OS HI View Add Subview handle label Handle  setZOrder HIViewAddSubview iconHandle HIViewAddSubview iconHandle labelHandle HIViewAddSubview labelHandle
void update Image if style SWT SEPARATOR 0 return if c Icon 0 destroyC Icon c Icon c Icon 0 Image image null if hot Image null image hot Image else if this image null image this image else image disabled Image Control Button Content Info in Content new Control Button Content Info if image null c Icon createC Icon image in Content content Type short OS k Control ContentC Icon Handle in Content icon Ref c Icon OS Set Bevel Button Content Info icon Handle in Content redraw Widget icon Handle false Point size compute Size set Size size x size y true  updateImage cIcon destroyCIcon cIcon cIcon hotImage hotImage disabledImage ControlButtonContentInfo inContent ControlButtonContentInfo cIcon createCIcon inContent contentType kControlContentCIconHandle inContent iconRef cIcon SetBevelButtonContentInfo iconHandle inContent redrawWidget iconHandle computeSize setSize
void update Text if style SWT SEPARATOR 0 return if labelC Icon 0 destroyC Icon labelC Icon labelC Icon 0 Control Button Content Info in Content new Control Button Content Info if text length 0 Font font parent get Font GC gc new GC parent int flags SWT DRAW DELIMITER SWT DRAW TAB SWT DRAW MNEMONIC SWT DRAW TRANSPARENT Point size gc text Extent text flags gc dispose Image image new Image display size x size y gc new GC image Color foreground parent get Foreground gc set Foreground foreground gc set Font font gc draw Text text 0 0 flags gc dispose Image Data data image get Image Data data transparent Pixel 0xFFFFFF image dispose image new Image display data data get Transparency Mask labelC Icon createC Icon image image dispose in Content content Type short OS k Control ContentC Icon Handle in Content icon Ref labelC Icon OS Set Bevel Button Content Info label Handle in Content redraw Widget label Handle false Point size compute Size set Size size x size y true  updateText labelCIcon destroyCIcon labelCIcon labelCIcon ControlButtonContentInfo inContent ControlButtonContentInfo getFont DRAW_DELIMITER DRAW_TAB DRAW_MNEMONIC DRAW_TRANSPARENT textExtent getForeground setForeground setFont drawText ImageData getImageData transparentPixel getTransparencyMask labelCIcon createCIcon inContent contentType kControlContentCIconHandle inContent iconRef labelCIcon SetBevelButtonContentInfo labelHandle inContent redrawWidget labelHandle computeSize setSize

Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT LEFT see SWT RIGHT see SWT UP see SWT DOWN see SWT RESIZE see Widget check Subclass see Widget get Style public Tracker Composite parent int style super parent check Style style this parent parent  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle checkStyle
Constructs a new instance of this class given the display to create it on and a style value describing its behavior and appearance p The style value is either one of the style constants defined in 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 p Note Currently null can be passed in for the display argument This has the effect of creating the tracker on the currently active display if there is one If there is no current display the tracker is created on a default display b Passing in null as the display argument is not considered to be good coding style and may not be supported in a future release of SWT b p param display the display to create the tracker on param style the style of control to construct exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT LEFT see SWT RIGHT see SWT UP see SWT DOWN public Tracker Display display int style if display null display Display get Current if display null display Display get Default if display is Valid Thread error SWT ERROR THREAD INVALID ACCESS this style check Style style this display display  SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS getCurrent getDefault isValidThread ERROR_THREAD_INVALID_ACCESS checkStyle
Adds the listener to the collection of listeners who will be notified when the control is moved or resized by sending it one of the messages defined in the code Control Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Control Listener see remove Control Listener public void add Control Listener Control Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Resize typed Listener add Listener SWT Move typed Listener  ControlListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ControlListener removeControlListener addControlListener ControlListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener typedListener
Point adjust Move Cursor int newX bounds x bounds width 2 int newY bounds y Convert to screen coordinates iff needed if parent null Rect rect new Rect OS Get Control Bounds parent handle rect newX rect left newY rect top int window OS Get Control Owner parent handle OS Get Window Bounds window short OS k Window Content Rgn rect newX rect left newY rect top CG Point pt new CG Point pt x newX pt y newY OS CG Warp Mouse Cursor Position pt return new Point int pt x int pt y  adjustMoveCursor GetControlBounds GetControlOwner GetWindowBounds kWindowContentRgn CGPoint CGPoint CGWarpMouseCursorPosition
Point adjust Resize Cursor int newX newY if cursor Orientation SWT LEFT 0 newX bounds x else if cursor Orientation SWT RIGHT 0 newX bounds x bounds width else newX bounds x bounds width 2 if cursor Orientation SWT UP 0 newY bounds y else if cursor Orientation SWT DOWN 0 newY bounds y bounds height else newY bounds y bounds height 2 Convert to screen coordinates iff needed if parent null Rect rect new Rect OS Get Control Bounds parent handle rect newX rect left newY rect top int window OS Get Control Owner parent handle OS Get Window Bounds window short OS k Window Content Rgn rect newX rect left newY rect top CG Point pt new CG Point pt x newX pt y newY OS CG Warp Mouse Cursor Position pt If the client has not provided a custom cursor then determine the appropriate resize cursor if client Cursor null Cursor new Cursor null switch cursor Orientation case SWT UP new Cursor new Cursor display SWT CURSOR SIZENS break case SWT DOWN new Cursor new Cursor display SWT CURSOR SIZENS break case SWT LEFT new Cursor new Cursor display SWT CURSOR SIZEWE break case SWT RIGHT new Cursor new Cursor display SWT CURSOR SIZEWE break case SWT LEFT SWT UP new Cursor new Cursor display SWT CURSOR SIZENWSE break case SWT RIGHT SWT DOWN new Cursor new Cursor display SWT CURSOR SIZENWSE break case SWT LEFT SWT DOWN new Cursor new Cursor display SWT CURSOR SIZENESW break case SWT RIGHT SWT UP new Cursor new Cursor display SWT CURSOR SIZENESW break default new Cursor new Cursor display SWT CURSOR SIZEALL break display set Cursor new Cursor handle if resize Cursor null resize Cursor dispose resize Cursor new Cursor return new Point int pt x int pt y  adjustResizeCursor cursorOrientation cursorOrientation cursorOrientation cursorOrientation GetControlBounds GetControlOwner GetWindowBounds kWindowContentRgn CGPoint CGPoint CGWarpMouseCursorPosition clientCursor newCursor cursorOrientation newCursor CURSOR_SIZENS newCursor CURSOR_SIZENS newCursor CURSOR_SIZEWE newCursor CURSOR_SIZEWE newCursor CURSOR_SIZENWSE newCursor CURSOR_SIZENWSE newCursor CURSOR_SIZENESW newCursor CURSOR_SIZENESW newCursor CURSOR_SIZEALL setCursor newCursor resizeCursor resizeCursor resizeCursor newCursor
static int check Style int style if style SWT LEFT SWT RIGHT SWT UP SWT DOWN 0 style SWT LEFT SWT RIGHT SWT UP SWT DOWN return style  checkStyle
Stops displaying the tracker rectangles Note that this is not considered to be a cancelation by the user 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 close check Widget tracking false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget
Rectangle compute Bounds int x Min rectangles 0 x int y Min rectangles 0 y int x Max rectangles 0 x rectangles 0 width int y Max rectangles 0 y rectangles 0 height for int i 1 i rectangles length i if rectangles i x x Min x Min rectangles i x if rectangles i y y Min y Min rectangles i y int rect Right rectangles i x rectangles i width if rect Right x Max x Max rect Right int rect Bottom rectangles i y rectangles i height if rect Bottom y Max y Max rect Bottom return new Rectangle x Min y Min x Max x Min y Max y Min  computeBounds xMin yMin xMax yMax xMin xMin yMin yMin rectRight rectRight xMax xMax rectRight rectBottom rectBottom yMax yMax rectBottom xMin yMin xMax xMin yMax yMin
Rectangle compute Proportions Rectangle rects Rectangle result new Rectangle rects length bounds compute Bounds for int i 0 i rects length i int x 0 y 0 width 0 height 0 if bounds width 0 x rects i x bounds x 100 bounds width width rects i width 100 bounds width else width 100 if bounds height 0 y rects i y bounds y 100 bounds height height rects i height 100 bounds height else height 100 result i new Rectangle x y width height return result  computeProportions computeBounds
void draw Rectangles int window Rectangle rects boolean erase if parent null if parent is Disposed return Shell shell parent get Shell shell update true else display update int context new int 1 int port OS Get Window Port window Rect port Rect new Rect OS Get Port Bounds port port Rect OS QD BeginCG Context port context OS CG Context ScaleCTM context 0 1 1 OS CG Context TranslateCTM context 0 0 port Rect top port Rect bottom CG Rect cg Rect new CG Rect Point parent Origin if parent null parent Origin display map parent null 0 0 else parent Origin new Point 0 0 for int i 0 i rects length i Rectangle rect rects i cg Rect x rect x parent Origin x cg Rect y rect y parent Origin y cg Rect width rect width cg Rect height rect height if erase cg Rect width cg Rect height OS CG Context Clear Rect context 0 cg Rect else cg Rect x 0 5f cg Rect y 0 5f OS CG Context Stroke Rect context 0 cg Rect OS CG Context Synchronize context 0 OS QD EndCG Context port context  drawRectangles isDisposed getShell GetWindowPort portRect GetPortBounds portRect QDBeginCGContext CGContextScaleCTM CGContextTranslateCTM portRect portRect CGRect cgRect CGRect parentOrigin parentOrigin parentOrigin cgRect parentOrigin cgRect parentOrigin cgRect cgRect cgRect cgRect CGContextClearRect cgRect cgRect cgRect CGContextStrokeRect cgRect CGContextSynchronize QDEndCGContext
Returns the bounds that are being drawn expressed relative to the parent widget If the parent is a code Display code then these are screen coordinates return the bounds of the Rectangles being drawn 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 Rectangle get Rectangles check Widget int length 0 if rectangles null length rectangles length Rectangle result new Rectangle length for int i 0 i length i Rectangle current rectangles i result i new Rectangle current x current y current width current height return result  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getRectangles checkWidget
Returns code true code if the rectangles are drawn with a stippled line code false code otherwise return the stippled effect of the rectangles 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 boolean get Stippled check Widget return stippled  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getStippled checkWidget
void move Rectangles int x Change int y Change if x Change 0 style SWT LEFT 0 x Change 0 if x Change 0 style SWT RIGHT 0 x Change 0 if y Change 0 style SWT UP 0 y Change 0 if y Change 0 style SWT DOWN 0 y Change 0 if x Change 0 y Change 0 return bounds x x Change bounds y y Change for int i 0 i rectangles length i rectangles i x x Change rectangles i y y Change  moveRectangles xChange yChange xChange xChange xChange xChange yChange yChange yChange yChange xChange yChange xChange yChange xChange yChange
Displays the Tracker rectangles for manipulation by the user Returns when the user has either finished manipulating the rectangles or has cancelled the Tracker return code true code if the user did not cancel the Tracker code false code otherwise 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 boolean open check Widget if rectangles null return false boolean cancelled false tracking true int window display create Overlay Window OS Show Window window draw Rectangles window rectangles false If exactly one of UP DOWN is specified as a style then set the cursor orientation accordingly the same is done for LEFT RIGHT styles below int v Style style SWT UP SWT DOWN if v Style SWT UP v Style SWT DOWN cursor Orientation v Style int h Style style SWT LEFT SWT RIGHT if h Style SWT LEFT h Style SWT RIGHT cursor Orientation h Style Point cursor Pos if OS Still Down org eclipse swt internal carbon Point pt new org eclipse swt internal carbon Point OS Get Global Mouse pt cursor Pos new Point pt h pt v else if style SWT RESIZE 0 cursor Pos adjust Resize Cursor else cursor Pos adjust Move Cursor int oldX cursor Pos x oldY cursor Pos y Tracker behaves like a Dialog with its own OS event loop Event event new Event int out Event new int 1 while tracking cancelled int status OS Receive Next Event 0 null OS k Event Duration No Wait true out Event if status OS no Err continue int event Class OS Get Event Class out Event 0 int event Kind OS Get Event Kind out Event 0 int newX oldX newY oldY switch event Class case OS k Event Class Mouse switch event Kind case OS k Event Mouse Up case OS k Event Mouse Moved case OS k Event Mouse Dragged int sizeof org eclipse swt internal carbon Point sizeof org eclipse swt internal carbon Point where new org eclipse swt internal carbon Point OS Get Event Parameter out Event 0 OS k Event Param Mouse Location OS typeQD Point null sizeof null where newX where h newY where v if newX oldX newY oldY Rectangle old Rectangles rectangles Rectangle rects To Erase new Rectangle rectangles length for int i 0 i rectangles length i Rectangle current rectangles i rects To Erase i new Rectangle current x current y current width current height event x newX event y newY if style SWT RESIZE 0 resize Rectangles newX oldX newY oldY in Event true send Event SWT Resize event in Event false It is possible but unlikely that application code could have disposed the widget in the move event If this happens return false to indicate that the tracking has failed if is Disposed cancelled true break boolean draw false It is possible that application code could have changed the rectangles in the resize event If this happens then only redraw the tracker if the rectangle values have changed if rectangles old Rectangles int length rectangles length if length rects To Erase length draw true else for int i 0 i length i if rectangles i equals rects To Erase i draw true break else draw true if draw draw Rectangles window rects To Erase true draw Rectangles window rectangles false cursor Pos adjust Resize Cursor newX cursor Pos x newY cursor Pos y else move Rectangles newX oldX newY oldY in Event true send Event SWT Move event in Event false It is possible but unlikely that application code could have disposed the widget in the move event If this happens return false to indicate that the tracking has failed if is Disposed cancelled true break boolean draw false It is possible that application code could have changed the rectangles in the move event If this happens then only redraw the tracker if the rectangle values have changed if rectangles old Rectangles int length rectangles length if length rects To Erase length draw true else for int i 0 i length i if rectangles i equals rects To Erase i draw true break else draw true if draw draw Rectangles window rects To Erase true draw Rectangles window rectangles false oldX newX oldY newY tracking event Kind OS k Event Mouse Up break break case OS k Event Class Keyboard switch event Kind case OS k Event Raw Key Down case OS k Event Raw Key Modifiers Changed case OS k Event Raw Key Repeat int key Code new int 1 OS Get Event Parameter out Event 0 OS k Event Param Key Code OS typeU Int32 null key Code length 4 null key Code int modifiers new int 1 OS Get Event Parameter out Event 0 OS k Event Param Key Modifiers OS typeU Int32 null 4 null modifiers int step Size modifiers 0 OS control Key 0 STEPSIZE SMALL STEPSIZE LARGE int x Change 0 y Change 0 switch key Code 0 case 53 Esc cancelled true tracking false break case 36 Return tracking false break case 123 Left arrow x Change step Size break case 124 Right arrow x Change step Size break case 126 Up arrow y Change step Size break case 125 Down arrow y Change step Size break if x Change 0 y Change 0 Rectangle old Rectangles rectangles Rectangle rects To Erase new Rectangle rectangles length for int i 0 i rectangles length i Rectangle current rectangles i rects To Erase i new Rectangle current x current y current width current height newX oldX x Change newY oldY y Change event x newX event y newY if style SWT RESIZE 0 resize Rectangles x Change y Change in Event true send Event SWT Resize event in Event false It is possible but unlikely that application code could have disposed the widget in the move event If this happens return false to indicate that the tracking has failed if is Disposed cancelled true break boolean draw false It is possible that application code could have changed the rectangles in the resize event If this happens then only redraw the tracker if the rectangle values have changed if rectangles old Rectangles int length rectangles length if length rects To Erase length draw true else for int i 0 i length i if rectangles i equals rects To Erase i draw true break else draw true if draw draw Rectangles window rects To Erase true draw Rectangles window rectangles false cursor Pos adjust Resize Cursor else move Rectangles x Change y Change in Event true send Event SWT Move event in Event false It is possible but unlikely that application code could have disposed the widget in the move event If this happens return false to indicate that the tracking has failed if is Disposed cancelled true break boolean draw false It is possible that application code could have changed the rectangles in the move event If this happens then only redraw the tracker if the rectangle values have changed if rectangles old Rectangles int length rectangles length if length rects To Erase length draw true else for int i 0 i length i if rectangles i equals rects To Erase i draw true break else draw true if draw draw Rectangles window rects To Erase true draw Rectangles window rectangles false cursor Pos adjust Move Cursor oldX cursor Pos x oldY cursor SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget createOverlayWindow ShowWindow drawRectangles vStyle vStyle vStyle cursorOrientation vStyle hStyle hStyle hStyle cursorOrientation hStyle cursorPos StillDown GetGlobalMouse cursorPos cursorPos adjustResizeCursor cursorPos adjustMoveCursor cursorPos cursorPos outEvent ReceiveNextEvent kEventDurationNoWait outEvent noErr eventClass GetEventClass outEvent eventKind GetEventKind outEvent eventClass kEventClassMouse eventKind kEventMouseUp kEventMouseMoved kEventMouseDragged GetEventParameter outEvent kEventParamMouseLocation typeQDPoint oldRectangles rectsToErase rectsToErase resizeRectangles inEvent sendEvent inEvent isDisposed oldRectangles rectsToErase rectsToErase drawRectangles rectsToErase drawRectangles cursorPos adjustResizeCursor cursorPos cursorPos moveRectangles inEvent sendEvent inEvent isDisposed oldRectangles rectsToErase rectsToErase drawRectangles rectsToErase drawRectangles eventKind kEventMouseUp kEventClassKeyboard eventKind kEventRawKeyDown kEventRawKeyModifiersChanged kEventRawKeyRepeat keyCode GetEventParameter outEvent kEventParamKeyCode typeUInt32 keyCode keyCode GetEventParameter outEvent kEventParamKeyModifiers typeUInt32 stepSize controlKey STEPSIZE_SMALL STEPSIZE_LARGE xChange yChange keyCode xChange stepSize xChange stepSize yChange stepSize yChange stepSize xChange yChange oldRectangles rectsToErase rectsToErase xChange yChange resizeRectangles xChange yChange inEvent sendEvent inEvent isDisposed oldRectangles rectsToErase rectsToErase drawRectangles rectsToErase drawRectangles cursorPos adjustResizeCursor moveRectangles xChange yChange inEvent sendEvent inEvent isDisposed oldRectangles rectsToErase rectsToErase drawRectangles rectsToErase drawRectangles cursorPos adjustMoveCursor cursorPos
Removes the listener from the collection of listeners who will be notified when the control is moved or resized param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Control Listener see add Control Listener public void remove Control Listener Control Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Resize listener event Table unhook SWT Move listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ControlListener addControlListener removeControlListener ControlListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable
void resize Rectangles int x Change int y Change If the cursor orientation has not been set in the orientation of this change then try to set it here if x Change 0 style SWT LEFT 0 cursor Orientation SWT RIGHT 0 cursor Orientation SWT LEFT else if x Change 0 style SWT RIGHT 0 cursor Orientation SWT LEFT 0 cursor Orientation SWT RIGHT else if y Change 0 style SWT UP 0 cursor Orientation SWT DOWN 0 cursor Orientation SWT UP else if y Change 0 style SWT DOWN 0 cursor Orientation SWT UP 0 cursor Orientation SWT DOWN If the bounds will flip about the x or y axis then apply the adjustment up to the axis ie where bounds width height becomes 0 change the cursor s orientation accordingly and flip each Rectangle s origin only necessary for 1 Rectangles if cursor Orientation SWT LEFT 0 if x Change bounds width if style SWT RIGHT 0 return cursor Orientation SWT RIGHT cursor Orientation SWT LEFT bounds x bounds width x Change bounds width bounds width 0 if proportions length 1 for int i 0 i proportions length i Rectangle proportion proportions i proportion x 100 proportion x proportion width else if cursor Orientation SWT RIGHT 0 if bounds width x Change if style SWT LEFT 0 return cursor Orientation SWT LEFT cursor Orientation SWT RIGHT x Change bounds width bounds width 0 if proportions length 1 for int i 0 i proportions length i Rectangle proportion proportions i proportion x 100 proportion x proportion width if cursor Orientation SWT UP 0 if y Change bounds height if style SWT DOWN 0 return cursor Orientation SWT DOWN cursor Orientation SWT UP bounds y bounds height y Change bounds height bounds height 0 if proportions length 1 for int i 0 i proportions length i Rectangle proportion proportions i proportion y 100 proportion y proportion height else if cursor Orientation SWT DOWN 0 if bounds height y Change if style SWT UP 0 return cursor Orientation SWT UP cursor Orientation SWT DOWN y Change bounds height bounds height 0 if proportions length 1 for int i 0 i proportions length i Rectangle proportion proportions i proportion y 100 proportion y proportion height apply the bounds adjustment if cursor Orientation SWT LEFT 0 bounds x x Change bounds width x Change else if cursor Orientation SWT RIGHT 0 bounds width x Change if cursor Orientation SWT UP 0 bounds y y Change bounds height y Change else if cursor Orientation SWT DOWN 0 bounds height y Change Rectangle new Rects new Rectangle rectangles length for int i 0 i rectangles length i Rectangle proportion proportions i new Rects i new Rectangle proportion x bounds width 100 bounds x proportion y bounds height 100 bounds y proportion width bounds width 100 proportion height bounds height 100 rectangles new Rects  resizeRectangles xChange yChange xChange cursorOrientation cursorOrientation xChange cursorOrientation cursorOrientation yChange cursorOrientation cursorOrientation yChange cursorOrientation cursorOrientation cursorOrientation xChange cursorOrientation cursorOrientation xChange cursorOrientation xChange cursorOrientation cursorOrientation xChange cursorOrientation yChange cursorOrientation cursorOrientation yChange cursorOrientation yChange cursorOrientation cursorOrientation yChange cursorOrientation xChange xChange cursorOrientation xChange cursorOrientation yChange yChange cursorOrientation yChange newRects newRects newRects
Sets the code Cursor code of the Tracker If this cursor is code null code then the cursor reverts to the default param new Cursor the new code Cursor code to display 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 set Cursor Cursor new Cursor check Widget client Cursor new Cursor if new Cursor null if in Event display set Cursor new Cursor handle  newCursor SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setCursor newCursor checkWidget clientCursor newCursor newCursor inEvent setCursor newCursor
Specifies the rectangles that should be drawn expressed relative to the parent widget If the parent is a Display then these are screen coordinates param rectangles the bounds of the rectangles to be drawn exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the set of rectangles is null or contains a null rectangle li ul 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 set Rectangles Rectangle rectangles check Widget if rectangles null error SWT ERROR NULL ARGUMENT int length rectangles length this rectangles new Rectangle length for int i 0 i length i Rectangle current rectangles i if current null error SWT ERROR NULL ARGUMENT this rectangles i new Rectangle current x current y current width current height proportions compute Proportions rectangles  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setRectangles checkWidget ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT computeProportions
Changes the appearance of the line used to draw the rectangles param stippled code true code if rectangle should appear stippled 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 set Stippled boolean stippled check Widget this stippled stippled  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setStippled checkWidget

Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT SINGLE see SWT MULTI see SWT CHECK see Widget check Subclass see Widget get Style public Tree Composite parent int style super parent check Style style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle checkStyle
Adds the listener to the collection of listeners who will be notified when the receiver s selection changes by sending it one of the messages defined in the code Selection Listener code interface p When code widget Selected code is called the item field of the event object is valid If the reciever has code SWT CHECK code style set and the check selection changes the event object detail field contains the value code SWT CHECK code code widget Default Selected code is typically called when an item is double clicked The item field of the event object is valid for default selection but the detail field is not used p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
Adds the listener to the collection of listeners who will be notified when an item in the receiver is expanded or collapsed by sending it one of the messages defined in the code Tree Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Tree Listener see remove Tree Listener public void add Tree Listener Tree Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Expand typed Listener add Listener SWT Collapse typed Listener  TreeListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TreeListener removeTreeListener addTreeListener TreeListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener typedListener
int calculate Width Tree Item items GC gc int width 0 for int i 0 i items length i Tree Item item items i width Math max width item calculate Width gc if item  getExpanded width Math max width calculate Width item get Items gc return width  calculateWidth TreeItem TreeItem calculateWidth _getExpanded calculateWidth getItems
int call Paint Event Handler int control int damage Rgn int visible Rgn int the Event int next Handler GC currentGC paintGC if currentGC null GC Data data new GC Data data paint Event the Event data visible Rgn visible Rgn paintGC GC carbon new this data int result super call Paint Event Handler control damage Rgn visible Rgn the Event next Handler if currentGC null paintGC dispose paintGC null return result  callPaintEventHandler damageRgn visibleRgn theEvent nextHandler GCData GCData paintEvent theEvent visibleRgn visibleRgn carbon_new callPaintEventHandler damageRgn visibleRgn theEvent nextHandler
static int check Style int style Feature in Windows It is not possible to create a tree that scrolls and does not have scroll bars The TVS NOSCROLL style will remove the scroll bars but the tree will never scroll Therefore no matter what style bits are specified set the H SCROLL and V SCROLL bits so that the SWT style will match the widget that Windows creates style SWT H SCROLL SWT V SCROLL return check Bits style SWT SINGLE SWT MULTI 0 0 0 0  checkStyle TVS_NOSCROLL H_SCROLL V_SCROLL H_SCROLL V_SCROLL checkBits
public Point compute Size int w Hint int h Hint boolean changed check Widget int width 0 if w Hint SWT DEFAULT Tree Item items get Items GC gc new GC this for int i 0 i items length i Tree Item item items i width Math max width item calculate Width gc gc dispose width EXTRA WIDTH if style SWT CHECK 0 width CHECK COLUMN WIDTH else width w Hint if width 0 width DEFAULT WIDTH int height 0 if h Hint SWT DEFAULT height get Item Count get Item Height else height h Hint if height 0 height DEFAULT HEIGHT Rectangle rect compute Trim 0 0 width height return new Point rect width rect height  computeSize wHint hHint checkWidget wHint TreeItem getItems TreeItem calculateWidth EXTRA_WIDTH CHECK_COLUMN_WIDTH wHint DEFAULT_WIDTH hHint getItemCount getItemHeight hHint DEFAULT_HEIGHT computeTrim
public Rectangle compute Trim int x int y int width int height check Widget int border 0 int out Metric new int 1 OS Get Theme Metric OS k Theme Metric Focus Rect Outset out Metric border out Metric 0 OS Get Theme Metric OS k Theme Metric Edit Text Frame Outset out Metric border out Metric 0 Rect rect new Rect OS Get Data Browser Scroll Bar Inset handle rect x rect left border y rect top border width rect left rect right border border height rect top rect bottom border border return new Rectangle x y width height  computeTrim checkWidget outMetric GetThemeMetric kThemeMetricFocusRectOutset outMetric outMetric GetThemeMetric kThemeMetricEditTextFrameOutset outMetric outMetric GetDataBrowserScrollBarInset
void create Handle int out Control new int 1 int window OS Get Control Owner parent handle OS Create Data Browser Control window null OS k Data Browser List View out Control if out Control 0 0 error SWT ERROR NO HANDLES handle out Control 0 if draw Focus Ring OS Set Control Data handle OS k Control Entire Control OS k Control Data Browser Includes Frame And Focus Tag 1 new byte 0 int selection Flags style SWT SINGLE 0 OS k Data Browser Select Only One OS k Data Browser Never Empty Selection Set OS k Data Browser Cmd Toggles Selection OS Set Data Browser Selection Flags handle selection Flags OS Set Data Browser List View Header Btn Height handle short 0 OS Set Data Browser Has Scroll Bars handle style SWT H SCROLL 0 style SWT V SCROLL 0 int position 0 if style SWT CHECK 0 Data Browser List View Column Desc check Column new Data Browser List View Column Desc check Column headerBtnDesc version OS k Data Browser List View Latest Header Desc check Column propertyDesc propertyID CHECK COLUMN ID check Column propertyDesc propertyType OS k Data Browser Checkbox Type check Column propertyDesc propertyFlags OS k Data Browser Property Is Mutable TODO check column size check Column headerBtnDesc minimumWidth CHECK COLUMN WIDTH check Column headerBtnDesc maximumWidth CHECK COLUMN WIDTH check Column headerBtnDesc initialOrder short OS k Data Browser Order Increasing OS Add Data Browser List View Column handle check Column position Data Browser List View Column Desc column new Data Browser List View Column Desc column headerBtnDesc version OS k Data Browser List View Latest Header Desc column propertyDesc propertyID COLUMN ID column propertyDesc propertyType OS k Data Browser Custom Type column propertyDesc propertyFlags OS k Data Browser List View Selection Column OS k Data Browser Default Property Flags column headerBtnDesc initialOrder short OS k Data Browser Order Increasing OS Add Data Browser List View Column handle column position OS Set Data Browser List View Disclosure Column handle COLUMN ID true OS Set Data Browser Table View Named Column Width handle COLUMN ID short 0 Feature in the Macintosh Scroll bars are not created until the data browser needs to draw them The fix is to force the scroll bars to be created by temporarily giving the widget a size drawing it on a offscreen buffer to avoid flashes and then restoring it to size zero int size 50 Rect rect new Rect rect right rect bottom short size OS Set Control Bounds handle rect int bpl size 4 int g World new int 1 int data OS New Ptr bpl size OS NewG World From Ptr g World OS k32ARGB Pixel Format rect 0 0 0 data bpl int cur Port new int 1 int curG World new int 1 OS GetG World cur Port curG World OS SetG World g World 0 curG World 0 OS Draw Control In Current Port handle OS SetG World cur Port 0 curG World 0 OS DisposeG World g World 0 OS Dispose Ptr data rect right rect bottom short 0 OS Set Control Bounds handle rect  createHandle outControl GetControlOwner CreateDataBrowserControl kDataBrowserListView outControl outControl ERROR_NO_HANDLES outControl drawFocusRing SetControlData kControlEntireControl kControlDataBrowserIncludesFrameAndFocusTag selectionFlags kDataBrowserSelectOnlyOne kDataBrowserNeverEmptySelectionSet kDataBrowserCmdTogglesSelection SetDataBrowserSelectionFlags selectionFlags SetDataBrowserListViewHeaderBtnHeight SetDataBrowserHasScrollBars H_SCROLL V_SCROLL DataBrowserListViewColumnDesc checkColumn DataBrowserListViewColumnDesc checkColumn headerBtnDesc_version kDataBrowserListViewLatestHeaderDesc checkColumn propertyDesc_propertyID CHECK_COLUMN_ID checkColumn propertyDesc_propertyType kDataBrowserCheckboxType checkColumn propertyDesc_propertyFlags kDataBrowserPropertyIsMutable checkColumn headerBtnDesc_minimumWidth CHECK_COLUMN_WIDTH checkColumn headerBtnDesc_maximumWidth CHECK_COLUMN_WIDTH checkColumn headerBtnDesc_initialOrder kDataBrowserOrderIncreasing AddDataBrowserListViewColumn checkColumn DataBrowserListViewColumnDesc DataBrowserListViewColumnDesc headerBtnDesc_version kDataBrowserListViewLatestHeaderDesc propertyDesc_propertyID COLUMN_ID propertyDesc_propertyType kDataBrowserCustomType propertyDesc_propertyFlags kDataBrowserListViewSelectionColumn kDataBrowserDefaultPropertyFlags headerBtnDesc_initialOrder kDataBrowserOrderIncreasing AddDataBrowserListViewColumn SetDataBrowserListViewDisclosureColumn COLUMN_ID SetDataBrowserTableViewNamedColumnWidth COLUMN_ID SetControlBounds gWorld NewPtr NewGWorldFromPtr gWorld k32ARGBPixelFormat curPort curGWorld GetGWorld curPort curGWorld SetGWorld gWorld curGWorld DrawControlInCurrentPort SetGWorld curPort curGWorld DisposeGWorld gWorld DisposePtr SetControlBounds
void create Item Tree Item item Tree Item parent Item int index int count 0 int id items length for int i 0 i items length i if items i null if id items length id i else if items i parent Item parent Item count if index 1 index count if 0 index index count error SWT ERROR INVALID RANGE item index index if index count for int i 0 i items length i if items i null items i parent Item parent Item if items i index item index items i index if id items length Tree Item new Items new Tree Item items length 4 System arraycopy items 0 new Items 0 items length items new Items items id item item id id 1 int parentID OS k Data Browser No Item boolean expanded true if parent Item null parentID parent Item id expanded parent Item  getExpanded if expanded if OS Add Data Browser Items handle parentID 1 new int item id OS k Data Browser Item No Property OS no Err items id null error SWT ERROR ITEM NOT ADDED else if count 0 parent Item null parent Item redraw COLUMN ID  createItem TreeItem TreeItem parentItem parentItem parentItem ERROR_INVALID_RANGE parentItem parentItem TreeItem newItems TreeItem newItems newItems kDataBrowserNoItem parentItem parentItem parentItem _getExpanded AddDataBrowserItems kDataBrowserItemNoProperty noErr ERROR_ITEM_NOT_ADDED parentItem parentItem COLUMN_ID
Scroll Bar create Scroll Bar int style return create Standard Bar style  ScrollBar createScrollBar createStandardBar
void create Widget super create Widget items new Tree Item 4  createWidget createWidget TreeItem
Color default Background return display get System Color SWT COLOR LIST BACKGROUND  defaultBackground getSystemColor COLOR_LIST_BACKGROUND
Color default Foreground return display get System Color SWT COLOR LIST FOREGROUND  defaultForeground getSystemColor COLOR_LIST_FOREGROUND
int default Theme Font if display small Fonts return OS k Theme Small System Font return OS k Theme Views Font  defaultThemeFont smallFonts kThemeSmallSystemFont kThemeViewsFont
Deselects all selected items in the receiver 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 deselect All check Widget ignore Select true int selection Flags null if style SWT SINGLE 0 selection Flags new int 1 OS Get Data Browser Selection Flags handle selection Flags OS Set Data Browser Selection Flags handle selection Flags 0 OS k Data Browser Never Empty Selection Set OS Set Data Browser Selected Items handle 0 null OS k Data Browser Items Remove if style SWT SINGLE 0 OS Set Data Browser Selection Flags handle selection Flags 0 ignore Select false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS deselectAll checkWidget ignoreSelect selectionFlags selectionFlags GetDataBrowserSelectionFlags selectionFlags SetDataBrowserSelectionFlags selectionFlags kDataBrowserNeverEmptySelectionSet SetDataBrowserSelectedItems kDataBrowserItemsRemove SetDataBrowserSelectionFlags selectionFlags ignoreSelect
void destroy Item Tree Item item int parentID item parent Item null OS k Data Browser No Item item parent Item id if OS Remove Data Browser Items handle parentID 1 new int item id 0 OS no Err error SWT ERROR ITEM NOT REMOVED release Items item get Items release Item item Tree Item parent Item item parent Item for int i 0 i items length i if items i null items i parent Item parent Item if items i index item index items i index set Scroll Width  destroyItem TreeItem parentItem kDataBrowserNoItem parentItem RemoveDataBrowserItems noErr ERROR_ITEM_NOT_REMOVED releaseItems getItems releaseItem TreeItem parentItem parentItem parentItem parentItem setScrollWidth
int draw Item Proc int browser int id int property int item State int the Rect int gd Depth int color Device int index id 1 if 0 index index items length return OS no Err Tree Item item items index Rect rect new Rect OS memcpy rect the Rect Rect sizeof int x rect left int y rect top int width rect right rect left int height rect bottom rect top Rect control Rect new Rect OS Get Control Bounds handle control Rect x control Rect left y control Rect top GC gc paintGC if gc null GC Data data new GC Data int port new int 1 OS Get Port port data port port 0 gc GC carbon new this data int clip OS New Rgn OS Get Clip clip OS Offset Rgn clip short control Rect left short control Rect top gc set Clipping Region carbon new display clip OS Dispose Rgn clip Color background item get Background gc set Background background gc fill Rectangle x y width height Image image item image if image null Rectangle bounds image get Bounds gc draw Image image 0 0 bounds width bounds height x y height bounds height 2 bounds width bounds height x bounds width 2 Font font item get Font gc set Font font Point extent gc string Extent item text if item State OS k Data Browser Item Is Selected 0 gc set Foreground display get System Color SWT COLOR LIST SELECTION TEXT gc set Background display get System Color SWT COLOR LIST SELECTION gc fill Rectangle x 1 y extent x 2 height else Color foreground item get Foreground gc set Foreground foreground gc draw String item text x y height extent y 2 if gc paintGC gc dispose return OS no Err  drawItemProc itemState theRect gdDepth colorDevice noErr TreeItem theRect controlRect GetControlBounds controlRect controlRect controlRect GCData GCData GetPort carbon_new NewRgn GetClip OffsetRgn controlRect controlRect setClipping carbon_new DisposeRgn getBackground setBackground fillRectangle getBounds drawImage getFont setFont stringExtent itemState kDataBrowserItemIsSelected setForeground getSystemColor COLOR_LIST_SELECTION_TEXT setBackground getSystemColor COLOR_LIST_SELECTION fillRectangle getForeground setForeground drawString noErr
public Rectangle get Client Area check Widget int border 0 int out Metric new int 1 OS Get Theme Metric OS k Theme Metric Focus Rect Outset out Metric border out Metric 0 OS Get Theme Metric OS k Theme Metric Edit Text Frame Outset out Metric border out Metric 0 Rect rect new Rect inset new Rect OS Get Control Bounds handle rect OS Get Data Browser Scroll Bar Inset handle inset int width Math max 0 rect right rect left inset right border border int height Math max 0 rect bottom rect top inset bottom border border return new Rectangle inset left inset top width height  getClientArea checkWidget outMetric GetThemeMetric kThemeMetricFocusRectOutset outMetric outMetric GetThemeMetric kThemeMetricEditTextFrameOutset outMetric outMetric GetControlBounds GetDataBrowserScrollBarInset
Returns the item at the given point in the receiver or null if no such item exists The point is in the coordinate system of the receiver param point the point used to locate the item return the item at the given point exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the point is null li ul 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 Tree Item get Item Point point check Widget if point null error SWT ERROR NULL ARGUMENT Rect rect new Rect OS Get Control Bounds handle rect org eclipse swt internal carbon Point pt new org eclipse swt internal carbon Point OS Set Pt pt short point x rect left short point y rect top TODO optimize for int i 0 i items length i Tree Item item items i if item null if OS Get Data Browser Item Part Bounds handle item id COLUMN ID OS k Data Browser Property Enclosing Part rect OS no Err if OS Pt In Rect pt rect return item return null  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TreeItem getItem checkWidget ERROR_NULL_ARGUMENT GetControlBounds SetPt TreeItem GetDataBrowserItemPartBounds COLUMN_ID kDataBrowserPropertyEnclosingPart noErr PtInRect
Returns the number of items contained in the receiver that are direct item children of the receiver The number that is returned is the number of roots in the tree return the number of items 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 int get Item Count check Widget return get Item Count null  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getItemCount checkWidget getItemCount
int get Item Count Tree Item item check Widget int count 0 for int i 0 i items length i if items i null items i parent Item item count return count  getItemCount TreeItem checkWidget parentItem
Returns the height of the area which would be used to display em one em of the items in the tree return the height of one item 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 int get Item Height check Widget short height new short 1 if OS Get Data Browser Table View Row Height handle height OS no Err error SWT ERROR CANNOT GET ITEM HEIGHT return height 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getItemHeight checkWidget GetDataBrowserTableViewRowHeight noErr ERROR_CANNOT_GET_ITEM_HEIGHT
Returns the items contained in the receiver that are direct item children of the receiver These are the roots of the tree p Note This is not the actual structure used by the receiver to maintain its list of items so modifying the array will not affect the receiver p return the items 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 Tree Item get Items check Widget return get Items null  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TreeItem getItems checkWidget getItems
Tree Item get Items Tree Item item if items null return new Tree Item 0 int count 0 for int i 0 i items length i if items i null items i parent Item item count Tree Item result new Tree Item count for int i 0 i items length i if items i null items i parent Item item result items i index items i return result  TreeItem getItems TreeItem TreeItem parentItem TreeItem TreeItem parentItem
Returns the receiver s parent item which must be a code Tree Item code or null when the receiver is a root return the receiver s parent item 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 Tree Item get Parent Item check Widget return null  TreeItem SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TreeItem getParentItem checkWidget
Returns an array of code Tree Item code s that are currently selected in the receiver An empty array indicates that no items are selected p Note This is not the actual structure used by the receiver to maintain its selection so modifying the array will not affect the receiver p return an array representing the selection 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 Tree Item get Selection check Widget int ptr OS New Handle 0 if OS Get Data Browser Items handle OS k Data Browser No Item true OS k Data Browser Item Is Selected ptr OS no Err error SWT ERROR CANNOT GET SELECTION int count OS Get Handle Size ptr 4 Tree Item result new Tree Item count OS H Lock ptr int start new int 1 OS memcpy start ptr 4 int id new int 1 for int i 0 i count i OS memcpy id start 0 i 4 4 result i items id 0 1 OS H Unlock ptr OS Dispose Handle ptr return result  TreeItem SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TreeItem getSelection checkWidget NewHandle GetDataBrowserItems kDataBrowserNoItem kDataBrowserItemIsSelected noErr ERROR_CANNOT_GET_SELECTION GetHandleSize TreeItem TreeItem HLock HUnlock DisposeHandle
Returns the number of selected items contained in the receiver return the number of selected items 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 int get Selection Count check Widget int count new int 1 if OS Get Data Browser Item Count handle OS k Data Browser No Item true OS k Data Browser Item Is Selected count OS no Err error SWT ERROR CANNOT GET COUNT return count 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelectionCount checkWidget GetDataBrowserItemCount kDataBrowserNoItem kDataBrowserItemIsSelected noErr ERROR_CANNOT_GET_COUNT
Returns the item which is currently at the top of the receiver This item can change when items are expanded collapsed scrolled or new items are added or removed return the item at the top of the receiver 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 since 2 1 public Tree Item get Top Item check Widget TODO optimize Rect rect new Rect OS Get Control Bounds handle rect int offset 0 int out Metric new int 1 OS Get Theme Metric OS k Theme Metric Focus Rect Outset out Metric offset out Metric 0 OS Get Theme Metric OS k Theme Metric Edit Text Frame Outset out Metric offset out Metric 0 int y rect top offset for int i 0 i items length i Tree Item item items i if item null if OS Get Data Browser Item Part Bounds handle item id COLUMN ID OS k Data Browser Property Enclosing Part rect OS no Err if rect top y y rect bottom return item return null  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TreeItem getTopItem checkWidget GetControlBounds outMetric GetThemeMetric kThemeMetricFocusRectOutset outMetric outMetric GetThemeMetric kThemeMetricEditTextFrameOutset outMetric outMetric TreeItem GetDataBrowserItemPartBounds COLUMN_ID kDataBrowserPropertyEnclosingPart noErr
int hit Test Proc int browser int id int property int the Rect int mouse Rect last Hittest id return 1  hitTestProc theRect mouseRect lastHittest
void hook Events super hook Events Data Browser Callbacks callbacks new Data Browser Callbacks callbacks version OS k Data Browser Latest Callbacks OS Init Data Browser Callbacks callbacks callbacks v1 itemCompareCallback display item Compare Proc callbacks v1 itemDataCallback display item Data Proc callbacks v1 itemNotificationCallback display item Notification Proc OS Set Data Browser Callbacks handle callbacks Data Browser Custom Callbacks custom new Data Browser Custom Callbacks custom version OS k Data Browser Latest Custom Callbacks OS Init Data Browser Custom Callbacks custom custom v1 drawItemCallback display draw Item Proc custom v1 hitTestCallback display hit Test Proc custom v1 trackingCallback display tracking Proc OS Set Data Browser Custom Callbacks handle custom  hookEvents hookEvents DataBrowserCallbacks DataBrowserCallbacks kDataBrowserLatestCallbacks InitDataBrowserCallbacks v1_itemCompareCallback itemCompareProc v1_itemDataCallback itemDataProc v1_itemNotificationCallback itemNotificationProc SetDataBrowserCallbacks DataBrowserCustomCallbacks DataBrowserCustomCallbacks kDataBrowserLatestCustomCallbacks InitDataBrowserCustomCallbacks v1_drawItemCallback drawItemProc v1_hitTestCallback hitTestProc v1_trackingCallback trackingProc SetDataBrowserCustomCallbacks
int item Compare Proc int browser int item One int item Two int sort Property int index1 item One 1 if 0 index1 index1 items length return OS no Err int index2 item Two 1 if 0 index2 index2 items length return OS no Err return items index1 index items index2 index 1 0  itemCompareProc itemOne itemTwo sortProperty itemOne noErr itemTwo noErr
int item Data Proc int browser int id int property int item Data int set Value int index id 1 if 0 index index items length return OS no Err Tree Item item items index switch property case CHECK COLUMN ID if set Value 0 item checked item checked if item checked item grayed OS Set Data Browser Item Data Button Value item Data short OS k Theme Button Mixed else int the Data item checked OS k Theme Button On OS k Theme Button Off OS Set Data Browser Item Data Button Value item Data short the Data Event event new Event event item item event detail SWT CHECK post Event SWT Selection event else int the Data OS k Theme Button Off if item checked the Data item grayed OS k Theme Button Mixed OS k Theme Button On OS Set Data Browser Item Data Button Value item Data short the Data break case OS k Data Browser Item Is Container Property for int i 0 i items length i if items i null items i parent Item item OS Set Data Browser Item Data Boolean Value item Data true break return OS no Err  itemDataProc itemData setValue noErr TreeItem CHECK_COLUMN_ID setValue SetDataBrowserItemDataButtonValue itemData kThemeButtonMixed theData kThemeButtonOn kThemeButtonOff SetDataBrowserItemDataButtonValue itemData theData postEvent theData kThemeButtonOff theData kThemeButtonMixed kThemeButtonOn SetDataBrowserItemDataButtonValue itemData theData kDataBrowserItemIsContainerProperty parentItem SetDataBrowserItemDataBooleanValue itemData noErr
int item Notification Proc int browser int id int message int index id 1 if 0 index index items length return OS no Err Tree Item item items index switch message case OS k Data Browser Item Selected case OS k Data Browser Item Deselected was Selected true if ignore Select break int first new int 1 last new int 1 OS Get Data Browser Selection Anchor handle first last boolean selected false if style SWT MULTI 0 int modifiers OS Get Current Event Key Modifiers if modifiers OS shift Key 0 if message OS k Data Browser Item Selected selected first 0 id last 0 id else selected id anchor First id anchor Last else if modifiers OS cmd Key 0 selected true else selected first 0 last 0 else selected message OS k Data Browser Item Selected if selected anchor First first 0 anchor Last last 0 Event event new Event event item item post Event SWT Selection event break case OS k Data Browser Item Double Clicked was Selected true Event event new Event event item item post Event SWT Default Selection event break case OS k Data Browser Container Closing Bug in the Macintosh For some reason if the selected sub items of an item get a k Data Browser Item Deselected notificaton when the item is collapsed a call to Get Data Browser Selection Anchor will cause a segment fault The fix is to deselect these items ignoring k Data Browser Item Deselected and then issue a selection event int ptr OS New Handle 0 if OS Get Data Browser Items handle item id true OS k Data Browser Item Is Selected ptr OS no Err int count OS Get Handle Size ptr 4 if count 0 int ids new int count OS H Lock ptr int start new int 1 OS memcpy start ptr 4 OS memcpy ids start 0 count 4 OS H Unlock ptr ignore Select true int selection Flags null if style SWT SINGLE 0 selection Flags new int 1 OS Get Data Browser Selection Flags handle selection Flags OS Set Data Browser Selection Flags handle selection Flags 0 OS k Data Browser Never Empty Selection Set OS Set Data Browser Selected Items handle ids length ids OS k Data Browser Items Remove if style SWT SINGLE 0 OS Set Data Browser Selection Flags handle selection Flags 0 ignore Select false Event event new Event event item item send Event SWT Selection event OS Dispose Handle ptr break case OS k Data Browser Container Closed was Expanded true if ignore Expand Event event new Event event item item send Event SWT Collapse event set Scroll Width break case OS k Data Browser Container Opened was Expanded true if ignore Expand Event event new Event event item item try item state EXPANDING send Event SWT Expand event finally item state EXPANDING int count 0 for int i 0 i items length i if items i null items i parent Item item count Tree Item new Items new Tree Item count int ids new int count for int i 0 i items length i if items i null items i parent Item item ids items i index items i id new Items items i index items i OS Add Data Browser Items handle id ids length ids OS k Data Browser Item No Property set Scroll Width new Items false break return OS no Err  itemNotificationProc noErr TreeItem kDataBrowserItemSelected kDataBrowserItemDeselected wasSelected ignoreSelect GetDataBrowserSelectionAnchor GetCurrentEventKeyModifiers shiftKey kDataBrowserItemSelected anchorFirst anchorLast cmdKey kDataBrowserItemSelected anchorFirst anchorLast postEvent kDataBrowserItemDoubleClicked wasSelected postEvent DefaultSelection kDataBrowserContainerClosing kDataBrowserItemDeselected GetDataBrowserSelectionAnchor kDataBrowserItemDeselected NewHandle GetDataBrowserItems kDataBrowserItemIsSelected noErr GetHandleSize HLock HUnlock ignoreSelect selectionFlags selectionFlags GetDataBrowserSelectionFlags selectionFlags SetDataBrowserSelectionFlags selectionFlags kDataBrowserNeverEmptySelectionSet SetDataBrowserSelectedItems kDataBrowserItemsRemove SetDataBrowserSelectionFlags selectionFlags ignoreSelect sendEvent DisposeHandle kDataBrowserContainerClosed wasExpanded ignoreExpand sendEvent setScrollWidth kDataBrowserContainerOpened wasExpanded ignoreExpand sendEvent parentItem TreeItem newItems TreeItem parentItem newItems AddDataBrowserItems kDataBrowserItemNoProperty setScrollWidth newItems noErr
int k Event Text Input Unicode For Key Event int next Handler int the Event int user Data int result super k Event Text Input Unicode For Key Event next Handler the Event user Data if result OS no Err return result int keyboard Event new int 1 OS Get Event Parameter the Event OS k Event Param Text Input Send Keyboard Event OS type Event Ref null keyboard Event length 4 null keyboard Event int key Code new int 1 OS Get Event Parameter keyboard Event 0 OS k Event Param Key Code OS typeU Int32 null key Code length 4 null key Code switch key Code 0 case 36 Return post Event SWT Default Selection break return result  kEventTextInputUnicodeForKeyEvent nextHandler theEvent userData kEventTextInputUnicodeForKeyEvent nextHandler theEvent userData noErr keyboardEvent GetEventParameter theEvent kEventParamTextInputSendKeyboardEvent typeEventRef keyboardEvent keyboardEvent keyCode GetEventParameter keyboardEvent kEventParamKeyCode typeUInt32 keyCode keyCode keyCode postEvent DefaultSelection
int k Event Mouse Down int next Handler int the Event int user Data int result super k Event Mouse Down next Handler the Event user Data if result OS no Err return result Shell shell get Shell shell bring To Top true Feature in the Macintosh For some reason when the user clicks on the data browser focus is assigned then lost and then reassigned causing k Even Control Set Focus Part events The fix is to ignore k Even Control Set Focus Part when the user clicks and send the focus events from k Event Mouse Down Control old Focus display get Focus Control display ignore Focus true was Selected was Expanded false result OS Call Next Event Handler next Handler the Event display ignore Focus false if old Focus this if old Focus null old Focus is Disposed old Focus send Focus Event false false if is Disposed is Enabled send Focus Event true false if was Selected was Expanded if OS Is Data Browser Item Selected handle last Hittest int index last Hittest 1 if 0 index index items length Event event new Event event item items index post Event SWT Selection event Feature in the Macintosh Some controls call Track Control or Handle Control Click to track the mouse Unfortunately mouse move events and the mouse up events are consumed The fix is to call the default handler and send a fake mouse up when tracking is finished NOTE No mouse move events are sent while tracking There is no fix for this at this time if was Expanded org eclipse swt internal carbon Point out Pt new org eclipse swt internal carbon Point OS Get Global Mouse out Pt Rect rect new Rect int window OS Get Control Owner handle OS Get Window Bounds window short OS k Window Content Rgn rect int x out Pt h rect left int y out Pt v rect top OS Get Control Bounds handle rect x rect left y rect top short button new short 1 OS Get Event Parameter the Event OS k Event Param Mouse Button OS type Mouse Button null 2 null button int chord OS Get Current Event Button State int modifiers OS Get Current Event Key Modifiers send Mouse Event SWT Mouse Up button 0 chord short x short y modifiers false was Selected was Expanded false return result  kEventMouseDown nextHandler theEvent userData kEventMouseDown nextHandler theEvent userData noErr getShell bringToTop kEvenControlSetFocusPart kEvenControlSetFocusPart kEventMouseDown oldFocus getFocusControl ignoreFocus wasSelected wasExpanded CallNextEventHandler nextHandler theEvent ignoreFocus oldFocus oldFocus oldFocus isDisposed oldFocus sendFocusEvent isDisposed isEnabled sendFocusEvent wasSelected wasExpanded IsDataBrowserItemSelected lastHittest lastHittest postEvent TrackControl HandleControlClick wasExpanded outPt GetGlobalMouse outPt GetControlOwner GetWindowBounds kWindowContentRgn outPt outPt GetControlBounds GetEventParameter theEvent kEventParamMouseButton typeMouseButton GetCurrentEventButtonState GetCurrentEventKeyModifiers sendMouseEvent MouseUp wasSelected wasExpanded
boolean release Item Tree Item item if item is Disposed return false items item id 1 null return true  releaseItem TreeItem isDisposed
void release Items Tree Item nodes for int i 0 i nodes length i Tree Item item nodes i Tree Item sons item get Items if sons length 0 release Items sons if release Item item item release Resources  releaseItems TreeItem TreeItem TreeItem getItems releaseItems releaseItem releaseResources
void release Widget for int i 0 i items length i Tree Item item items i if item null item is Disposed item release Resources items null super release Widget  releaseWidget TreeItem isDisposed releaseResources releaseWidget
Removes all of the items from the receiver 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 remove All check Widget if OS Remove Data Browser Items handle OS k Data Browser No Item 0 null 0 OS no Err error SWT ERROR ITEM NOT REMOVED OS Set Data Browser Scroll Position handle 0 0 for int i 0 i items length i Tree Item item items i if item null item is Disposed item release Resources items new Tree Item 4 anchor First anchor Last 0 set Scroll Width  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS removeAll checkWidget RemoveDataBrowserItems kDataBrowserNoItem noErr ERROR_ITEM_NOT_REMOVED SetDataBrowserScrollPosition TreeItem isDisposed releaseResources TreeItem anchorFirst anchorLast setScrollWidth
Removes the listener from the collection of listeners who will be notified when the receiver s selection changes param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT event Table unhook SWT Selection listener event Table unhook SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable DefaultSelection
Removes the listener from the collection of listeners who will be notified when items in the receiver are expanded or collapsed param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Tree Listener see add Tree Listener public void remove Tree Listener Tree Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Expand listener event Table unhook SWT Collapse listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TreeListener addTreeListener removeTreeListener TreeListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable
void reset Visible Region int control super reset Visible Region control if show Item null show Item is Disposed show Item show Item true  resetVisibleRegion resetVisibleRegion showItem showItem isDisposed showItem showItem
Display a mark indicating the point at which an item will be inserted The drop insert item has a visual hint to show where a dragged item will be inserted when dropped on the tree param item the insert item Null will clear the insertion mark param before true places the insert mark above item false places the insert mark below item exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the item has been disposed li ul 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 set Insert Mark Tree Item item boolean before check Widget if item null if item is Disposed error SWT ERROR INVALID ARGUMENT  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setInsertMark TreeItem checkWidget isDisposed ERROR_INVALID_ARGUMENT
Selects all of the items in the receiver p If the receiver is single select do nothing 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 select All check Widget if style SWT SINGLE 0 return ignore Select true OS Set Data Browser Selected Items handle 0 null OS k Data Browser Items Assign ignore Select false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS selectAll checkWidget ignoreSelect SetDataBrowserSelectedItems kDataBrowserItemsAssign ignoreSelect
int set Bounds int control int x int y int width int height boolean move boolean resize boolean events Ensure that the selection is visible when the tree is resized from a zero size to a size that can show the selection int result super set Bounds control x y width height move resize events if show Item null show Item is Disposed show Item show Item true return result  setBounds setBounds showItem showItem isDisposed showItem showItem
void set Font Style Font font super set Font Style font if items null return for int i 0 i items length i Tree Item item items i if item null item width 1 set Scroll Width  setFontStyle setFontStyle TreeItem setScrollWidth
public void set Redraw boolean redraw check Widget super set Redraw redraw if redraw draw Count 0 set Scroll Width  setRedraw checkWidget setRedraw drawCount setScrollWidth
void set Scroll Width set Scroll Width get Items true  setScrollWidth setScrollWidth getItems
void set Scroll Width Tree Item item if draw Count 0 return Tree Item parent Item item parent Item if parent Item null parent Item  getExpanded return GC gc new GC this int new Width item calculate Width gc gc dispose short width new short 1 OS Get Data Browser Table View Named Column Width handle COLUMN ID width if width 0 new Width OS Set Data Browser Table View Named Column Width handle COLUMN ID short new Width  setScrollWidth TreeItem drawCount TreeItem parentItem parentItem parentItem parentItem _getExpanded newWidth calculateWidth GetDataBrowserTableViewNamedColumnWidth COLUMN_ID newWidth SetDataBrowserTableViewNamedColumnWidth COLUMN_ID newWidth
void set Scroll Width Tree Item items boolean set if draw Count 0 return GC gc new GC this int new Width calculate Width items gc gc dispose if set short width new short 1 OS Get Data Browser Table View Named Column Width handle COLUMN ID width if width 0 new Width return OS Set Data Browser Table View Named Column Width handle COLUMN ID short new Width  setScrollWidth TreeItem drawCount newWidth calculateWidth GetDataBrowserTableViewNamedColumnWidth COLUMN_ID newWidth SetDataBrowserTableViewNamedColumnWidth COLUMN_ID newWidth
Sets the receiver s selection to be the given array of items The current selection is cleared before the new items are selected p Items that are not in the receiver are ignored If the receiver is single select and multiple items are specified then all items are ignored param items the array of items exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the array of items is null li li ERROR INVALID ARGUMENT if one of the items has been disposed li ul 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 Tree deselect All public void set Selection Tree Item items check Widget if items null error SWT ERROR NULL ARGUMENT deselect All int length items length if length 0 style SWT SINGLE 0 length 1 return int ids new int length for int i 0 i length i if items i null error SWT ERROR INVALID ARGUMENT if items i is Disposed error SWT ERROR INVALID ARGUMENT ids i items i id show Item items i false ignore Select true Bug in the Macintosh When the Data Broswer selection flags includes both k Data Browser Never Empty Selection Set and k Data Browser Select Only One two items are selected when Set Data Browser Selected Items is called with k Data Browser Items Assign to assign a new seletion despite the fact that k Data Browser Select Only One was specified The fix is to save and restore k Data Browser Never Empty Selection Set around each call to Set Data Browser Selected Items int selection Flags null if style SWT SINGLE 0 selection Flags new int 1 OS Get Data Browser Selection Flags handle selection Flags OS Set Data Browser Selection Flags handle selection Flags 0 OS k Data Browser Never Empty Selection Set OS Set Data Browser Selected Items handle ids length ids OS k Data Browser Items Assign if style SWT SINGLE 0 OS Set Data Browser Selection Flags handle selection Flags 0 ignore Select false if length 0 show Item items 0 true  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS deselectAll setSelection TreeItem checkWidget ERROR_NULL_ARGUMENT deselectAll ERROR_INVALID_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT showItem ignoreSelect DataBroswer kDataBrowserNeverEmptySelectionSet kDataBrowserSelectOnlyOne SetDataBrowserSelectedItems kDataBrowserItemsAssign kDataBrowserSelectOnlyOne kDataBrowserNeverEmptySelectionSet SetDataBrowserSelectedItems selectionFlags selectionFlags GetDataBrowserSelectionFlags selectionFlags SetDataBrowserSelectionFlags selectionFlags kDataBrowserNeverEmptySelectionSet SetDataBrowserSelectedItems kDataBrowserItemsAssign SetDataBrowserSelectionFlags selectionFlags ignoreSelect showItem
Sets the item which is currently at the top of the receiver This item can change when items are expanded collapsed scrolled or new items are added or removed param item the item to be shown exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the item is null li li ERROR INVALID ARGUMENT if the item has been disposed li ul 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 Tree get Top Item since 2 1 public void set Top Item Tree Item item check Widget if item null error SWT ERROR NULL ARGUMENT if item is Disposed error SWT ERROR INVALID ARGUMENT show Item item false OS Reveal Data Browser Item handle item id COLUMN ID byte OS k Data Browser Reveal Without Selecting Rect rect new Rect OS Get Control Bounds handle rect int x rect left y rect top if OS Get Data Browser Item Part Bounds handle item id COLUMN ID OS k Data Browser Property Enclosing Part rect OS no Err OS Set Data Browser Scroll Position handle rect top y 3 0  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getTopItem setTopItem TreeItem checkWidget ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT showItem RevealDataBrowserItem COLUMN_ID kDataBrowserRevealWithoutSelecting GetControlBounds GetDataBrowserItemPartBounds COLUMN_ID kDataBrowserPropertyEnclosingPart noErr SetDataBrowserScrollPosition
Shows the item If the item is already showing in the receiver this method simply returns Otherwise the items are scrolled and expanded until the item is visible param item the item to be shown exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the item is null li li ERROR INVALID ARGUMENT if the item has been disposed li ul 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 Tree show Selection public void show Item Tree Item item check Widget if item null error SWT ERROR NULL ARGUMENT if item is Disposed error SWT ERROR INVALID ARGUMENT show Item item true  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS showSelection showItem TreeItem checkWidget ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT showItem
void show Item Tree Item item boolean scroll int count 0 Tree Item parent Item item parent Item while parent Item null parent Item  getExpanded count parent Item parent Item parent Item int index 0 parent Item item parent Item Tree Item path new Tree Item count while parent Item null parent Item  getExpanded path index parent Item parent Item parent Item parent Item for int i path length 1 i 0 i path i set Expanded true if scroll Bug in the Macintosh When there is not room to show a single item in the data browser Reveal Data Browser Item scrolls the item such that it is above the top of the data browser The fix is to remember the index and scroll when the data browser is resized Bug in the Macintosh When items are added to the data browser after is has been hidden Reveal Data Browser Item when called before the controls behind the data browser are repainted causes a redraw This redraw happens right away causing pixel corruption The fix is to remember the index and scroll when the data browser is shown Rectangle rect get Client Area if rect height get Item Height OS Is Control Visible handle show Item item return show Item null Rectangle item Rect item get Bounds if item Rect is Empty if rect contains item Rect x item Rect y rect contains item Rect x item Rect y item Rect height return int top new int 1 left new int 1 OS Get Data Browser Scroll Position handle top left OS Reveal Data Browser Item handle item id COLUMN ID byte OS k Data Browser Reveal Without Selecting Bug in the Macintosh For some reason when the Data Browser is scrolled by Reveal Data Browser Item the scrollbars are not redrawn The fix is to force a redraw int new Top new int 1 new Left new int 1 OS Get Data Browser Scroll Position handle new Top new Left if horizontal Bar null new Left 0 left 0 horizontal Bar redraw if vertical Bar null new Top 0 top 0 vertical Bar redraw  showItem TreeItem TreeItem parentItem parentItem parentItem parentItem _getExpanded parentItem parentItem parentItem parentItem parentItem TreeItem TreeItem parentItem parentItem _getExpanded parentItem parentItem parentItem parentItem setExpanded RevealDataBrowserItem RevealDataBrowserItem getClientArea getItemHeight IsControlVisible showItem showItem itemRect getBounds itemRect isEmpty itemRect itemRect itemRect itemRect itemRect GetDataBrowserScrollPosition RevealDataBrowserItem COLUMN_ID kDataBrowserRevealWithoutSelecting DataBrowser RevealDataBrowserItem newTop newLeft GetDataBrowserScrollPosition newTop newLeft horizontalBar newLeft horizontalBar verticalBar newTop verticalBar
Shows the selection If the selection is already showing in the receiver this method simply returns Otherwise the items are scrolled until the selection is visible 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 Tree show Item Tree Item public void show Selection check Widget TODO optimize Tree Item selection get Selection if selection length 0 show Item selection 0 true  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS showItem TreeItem showSelection checkWidget TreeItem getSelection showItem
int tracking Proc int browser int id int property int the Rect int start Pt int modifiers return 1  trackingProc theRect startPt

Constructs a new instance of this class given its parent which must be a code Tree code or a code Tree Item code and a style value describing its behavior and appearance The item is added to the end of the items maintained by its parent p The style value is either one of the style constants defined in 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Tree Item Tree parent int style super parent style this parent parent parent create Item this null 1  TreeItem IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle TreeItem createItem
Constructs a new instance of this class given its parent which must be a code Tree code or a code Tree Item code a style value describing its behavior and appearance and the index at which to place it in the items maintained by its parent p The style value is either one of the style constants defined in 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 param index the index to store the receiver in its parent exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Tree Item Tree parent int style int index super parent style if index 0 error SWT ERROR INVALID RANGE this parent parent parent create Item this null index  TreeItem IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle TreeItem ERROR_INVALID_RANGE createItem
Constructs a new instance of this class given its parent which must be a code Tree code or a code Tree Item code and a style value describing its behavior and appearance The item is added to the end of the items maintained by its parent p The style value is either one of the style constants defined in 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 Item a composite control which will be the parent of the new instance cannot be null param style the style of control to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Tree Item Tree Item parent Item int style super check Null parent Item parent style parent parent Item parent this parent Item parent Item parent create Item this parent Item 1  TreeItem parentItem IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle TreeItem TreeItem parentItem checkNull parentItem parentItem parentItem parentItem createItem parentItem
Constructs a new instance of this class given its parent which must be a code Tree code or a code Tree Item code a style value describing its behavior and appearance and the index at which to place it in the items maintained by its parent p The style value is either one of the style constants defined in 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 Item a composite control which will be the parent of the new instance cannot be null param style the style of control to construct param index the index to store the receiver in its parent exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Tree Item Tree Item parent Item int style int index super check Null parent Item parent style if index 0 error SWT ERROR INVALID RANGE parent parent Item parent this parent Item parent Item parent create Item this parent Item index  TreeItem parentItem IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle TreeItem TreeItem parentItem checkNull parentItem ERROR_INVALID_RANGE parentItem parentItem parentItem createItem parentItem
boolean  getExpanded check Widget int state new int 1 OS Get Data Browser Item State parent handle id state return state 0 OS k Data Browser Container Is Open 0  _getExpanded checkWidget GetDataBrowserItemState kDataBrowserContainerIsOpen
static Tree Item check Null Tree Item item if item null SWT error SWT ERROR NULL ARGUMENT return item  TreeItem checkNull TreeItem ERROR_NULL_ARGUMENT
int calculate Width GC gc if width 1 return width width 0 Image image get Image String text get Text if image null width image get Bounds width 2 if text null text length 0 width gc string Extent text x return width  calculateWidth getImage getText getBounds stringExtent
protected void check Subclass if is Valid Subclass error SWT ERROR INVALID SUBCLASS  checkSubclass isValidSubclass ERROR_INVALID_SUBCLASS
Returns the receiver s background color return the background color 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 since 2 0 public Color get Background check Widget return background null background parent get Background  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBackground checkWidget getBackground
Returns a rectangle describing the receiver s size and location relative to its parent return the receiver s bounding rectangle 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 Rectangle get Bounds check Widget Rect rect new Rect if OS Get Data Browser Item Part Bounds parent handle id Tree COLUMN ID OS k Data Browser Property Content Part rect OS no Err return new Rectangle 0 0 0 0 int x rect left y rect top int width 0 if image null Rectangle bounds image get Bounds x bounds width 2 GC gc new GC parent Point extent gc string Extent text gc dispose width extent x int height rect bottom rect top OS Get Control Bounds parent handle rect x rect left y rect top return new Rectangle x y width height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBounds checkWidget GetDataBrowserItemPartBounds COLUMN_ID kDataBrowserPropertyContentPart noErr getBounds stringExtent GetControlBounds
Returns code true code if the receiver is checked and false otherwise When the parent does not have the code CHECK style return false p return the checked 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 public boolean get Checked check Widget if parent style SWT CHECK 0 return false return checked  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getChecked checkWidget
Returns code true code if the receiver is expanded and false otherwise p return the expanded 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 public boolean get Expanded check Widget return state EXPANDING 0 false  getExpanded  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getExpanded checkWidget _getExpanded
Returns the font that the receiver will use to paint textual information for this item return the receiver s font 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 since 3 0 public Font get Font check Widget return font null font parent get Font  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getFont checkWidget getFont
Returns the foreground color that the receiver will use to draw return the receiver s foreground color 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 since 2 0 public Color get Foreground check Widget return foreground null foreground parent get Foreground  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getForeground checkWidget getForeground
Returns code true code if the receiver is grayed and false otherwise When the parent does not have the code CHECK style return false p return the grayed 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 public boolean get Grayed check Widget if parent style SWT CHECK 0 return false return grayed  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getGrayed checkWidget
Returns the number of items contained in the receiver that are direct item children of the receiver return the number of items 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 int get Item Count check Widget return parent get Item Count this  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getItemCount checkWidget getItemCount
Returns an array of code Tree Item code s which are the direct item children of the receiver p Note This is not the actual structure used by the receiver to maintain its list of items so modifying the array will not affect the receiver p return the receiver s items 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 Tree Item get Items check Widget return parent get Items this  TreeItem SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TreeItem getItems checkWidget getItems
Returns the receiver s parent which must be a code Tree code return the receiver s parent 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 Tree get Parent check Widget return parent  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getParent checkWidget
Returns the receiver s parent item which must be a code Tree Item code or null when the receiver is a root return the receiver s parent item 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 Tree Item get Parent Item check Widget return parent Item  TreeItem SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TreeItem getParentItem checkWidget parentItem
void redraw int propertyID if parent draw Count 0 return int parentID parent Item null OS k Data Browser No Item parent Item id OS Update Data Browser Items parent handle parentID 1 new int id OS k Data Browser Item No Property propertyID  drawCount parentItem kDataBrowserNoItem parentItem UpdateDataBrowserItems kDataBrowserItemNoProperty
void release Child super release Child parent destroy Item this  releaseChild releaseChild destroyItem
void release Widget super release Widget background foreground null font null parent Item null parent null id 0 index 1  releaseWidget releaseWidget parentItem
Sets the receiver s background color to the color specified by the argument or to the default system color for the item if the argument is null param color the new color or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 2 0 public void set Background Color color check Widget if color null color is Disposed SWT error SWT ERROR INVALID ARGUMENT if background color return if background null background equals color return background color redraw Tree COLUMN ID  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setBackground checkWidget isDisposed ERROR_INVALID_ARGUMENT COLUMN_ID
Sets the checked state of the receiver p param checked the new checked 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 public void set Checked boolean checked check Widget if parent style SWT CHECK 0 return if this checked checked return this checked checked redraw Tree CHECK COLUMN ID  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setChecked checkWidget CHECK_COLUMN_ID
Sets the expanded state of the receiver p param expanded the new expanded 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 public void set Expanded boolean expanded check Widget parent ignore Expand true if expanded OS Open Data Browser Container parent handle id else OS Close Data Browser Container parent handle id parent ignore Expand false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setExpanded checkWidget ignoreExpand OpenDataBrowserContainer CloseDataBrowserContainer ignoreExpand
Sets the font that the receiver will use to paint textual information for this item to the font specified by the argument or to the default font for that kind of control if the argument is null param font the new font or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 3 0 public void set Font Font font check Widget if font null font is Disposed SWT error SWT ERROR INVALID ARGUMENT if this font font return if this font null this font equals font return this font font redraw Tree COLUMN ID  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setFont checkWidget isDisposed ERROR_INVALID_ARGUMENT COLUMN_ID
Sets the receiver s foreground color to the color specified by the argument or to the default system color for the item if the argument is null param color the new color or null since 2 0 exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 2 0 public void set Foreground Color color check Widget if color null color is Disposed SWT error SWT ERROR INVALID ARGUMENT if foreground color return if foreground null foreground equals color return foreground color redraw Tree COLUMN ID  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setForeground checkWidget isDisposed ERROR_INVALID_ARGUMENT COLUMN_ID
Sets the grayed state of the receiver p param grayed the new grayed 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 public void set Grayed boolean grayed check Widget if parent style SWT CHECK 0 return if this grayed grayed return this grayed grayed redraw Tree CHECK COLUMN ID  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setGrayed checkWidget CHECK_COLUMN_ID
public void set Image Image image check Widget super set Image image width 1 parent set Scroll Width this redraw Tree COLUMN ID  setImage checkWidget setImage setScrollWidth COLUMN_ID
public void set Text String string check Widget if string null error SWT ERROR NULL ARGUMENT if string equals text return super set Text string width 1 parent set Scroll Width this redraw Tree COLUMN ID  setText checkWidget ERROR_NULL_ARGUMENT setText setScrollWidth COLUMN_ID

static final Rect EMPTY RECT new Rect Widget Do nothing  EMPTY_RECT
Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see check Subclass see get Style public Widget Widget parent int style check Subclass check Parent parent this style style display parent display  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle checkSubclass checkParent
int action Proc int the Control int part Code return OS no Err  actionProc theControl partCode noErr
Adds the listener to the collection of listeners who will be notifed when an event of the given type occurs When the event does occur in the widget the listener is notified by sending it the code handle Event code message param event Type the type of event to listen for param listener the listener which should be notified when the event occurs exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Listener see remove Listener public void add Listener int event Type Listener handler check Widget if handler null error SWT ERROR NULL ARGUMENT if event Table null event Table new Event Table event Table hook event Type handler  handleEvent eventType IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS removeListener addListener eventType checkWidget ERROR_NULL_ARGUMENT eventTable eventTable EventTable eventTable eventType
int call Paint Event Handler int control int damage Rgn int visible Rgn int the Event int next Handler return OS Call Next Event Handler next Handler the Event  callPaintEventHandler damageRgn visibleRgn theEvent nextHandler CallNextEventHandler nextHandler theEvent
Adds the listener to the collection of listeners who will be notifed when the widget is disposed When the widget is disposed the listener is notified by sending it the code widget Disposed code message param listener the listener which should be notified when the receiver is disposed exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Dispose Listener see remove Dispose Listener public void add Dispose Listener Dispose Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Dispose typed Listener  widgetDisposed IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS DisposeListener removeDisposeListener addDisposeListener DisposeListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener
static int check Bits int style int int0 int int1 int int2 int int3 int int4 int int5 int mask int0 int1 int2 int3 int4 int5 if style mask 0 style int0 if style int0 0 style style mask int0 if style int1 0 style style mask int1 if style int2 0 style style mask int2 if style int3 0 style style mask int3 if style int4 0 style style mask int4 if style int5 0 style style mask int5 return style  checkBits
void calculate Visible Region int control int visible Rgn boolean clip Children int temp Rgn OS New Rgn if OS Is Control Visible control int child Rgn OS New Rgn int window OS Get Control Owner control short count new short 1 int out Control new int 1 OS Get Root Control window out Control int root out Control 0 OS Get Control Region root short OS k Control Structure Meta Part visible Rgn int temp Control control last Control 0 while temp Control root OS Get Control Region temp Control short OS k Control Structure Meta Part temp Rgn OS Sect Rgn temp Rgn visible Rgn visible Rgn if OS Empty Rgn visible Rgn break if clip Children temp Control control OS Count Sub Controls temp Control count for int i 0 i count 0 i OS Get Indexed Sub Control temp Control short i 1 out Control int child out Control 0 if child last Control break if OS Is Control Visible child continue OS Get Control Region child short OS k Control Structure Meta Part temp Rgn OS Union Rgn temp Rgn child Rgn child Rgn last Control temp Control OS Get Super Control temp Control out Control temp Control out Control 0 OS Diff Rgn visible Rgn child Rgn visible Rgn OS Dispose Rgn child Rgn else OS Copy Rgn temp Rgn visible Rgn OS Dispose Rgn temp Rgn  calculateVisibleRegion visibleRgn clipChildren tempRgn NewRgn IsControlVisible childRgn NewRgn GetControlOwner outControl GetRootControl outControl outControl GetControlRegion kControlStructureMetaPart visibleRgn tempControl lastControl tempControl GetControlRegion tempControl kControlStructureMetaPart tempRgn SectRgn tempRgn visibleRgn visibleRgn EmptyRgn visibleRgn clipChildren tempControl CountSubControls tempControl GetIndexedSubControl tempControl outControl outControl lastControl IsControlVisible GetControlRegion kControlStructureMetaPart tempRgn UnionRgn tempRgn childRgn childRgn lastControl tempControl GetSuperControl tempControl outControl tempControl outControl DiffRgn visibleRgn childRgn visibleRgn DisposeRgn childRgn CopyRgn tempRgn visibleRgn DisposeRgn tempRgn
void check Orientation Widget parent style SWT MIRRORED if style SWT LEFT TO RIGHT SWT RIGHT TO LEFT 0 if parent null if parent style SWT LEFT TO RIGHT 0 style SWT LEFT TO RIGHT if parent style SWT RIGHT TO LEFT 0 style SWT RIGHT TO LEFT style check Bits style SWT LEFT TO RIGHT SWT RIGHT TO LEFT 0 0 0 0  checkOrientation LEFT_TO_RIGHT RIGHT_TO_LEFT LEFT_TO_RIGHT LEFT_TO_RIGHT RIGHT_TO_LEFT RIGHT_TO_LEFT checkBits LEFT_TO_RIGHT RIGHT_TO_LEFT
void check Parent Widget parent if parent null error SWT ERROR NULL ARGUMENT parent check Widget  checkParent ERROR_NULL_ARGUMENT checkWidget
Checks that this class can be subclassed p The SWT class library is intended to be subclassed only at specific controlled points most notably code Composite code and code Canvas code when implementing new widgets This method enforces this rule unless it is overridden p p em IMPORTANT em By providing an implementation of this method that allows a subclass of a class which does not normally allow subclassing to be created the implementer agrees to be fully responsible for the fact that any such subclass will likely fail between SWT releases and will be strongly platform specific No support is provided for user written classes which are implemented in this fashion p p The ability to subclass outside of the allowed SWT classes is intended purely to enable those not on the SWT development team to implement patches in order to get around specific limitations in advance of when those limitations can be addressed by the team Subclassing should not be attempted without an intimate and detailed understanding of the hierarchy p exception SWT Exception ul li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul protected void check Subclass if is Valid Subclass error SWT ERROR INVALID SUBCLASS  SWTException ERROR_INVALID_SUBCLASS checkSubclass isValidSubclass ERROR_INVALID_SUBCLASS
Throws an code SWT Exception code if the receiver can not be accessed by the caller This may include both checks on the state of the receiver and more generally on the entire execution context This method em should em be called by widget implementors to enforce the standard SWT invariants p Currently it is an error to invoke any method other than code is Disposed code on a widget that has had its code dispose code method called It is also an error to call widget methods from any thread that is different from the thread that created the widget p p In future releases of SWT there may be more or fewer error checks and exceptions may be thrown for different reasons 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 protected void check Widget Display display this display if display null error SWT ERROR WIDGET DISPOSED if display thread Thread current Thread error SWT ERROR THREAD INVALID ACCESS if state DISPOSED 0 error SWT ERROR WIDGET DISPOSED  SWTException isDisposed SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget ERROR_WIDGET_DISPOSED currentThread ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED
int color Proc int in Control int in Message int in Draw Depth int in Draw In Color return OS event Not Handled Err  colorProc inControl inMessage inDrawDepth inDrawInColor eventNotHandledErr
int control Proc int next Handler int the Event int user Data int event Kind OS Get Event Kind the Event switch event Kind case OS k Event Control Activate return k Event Control Activate next Handler the Event user Data case OS k Event Control Apply Background return k Event Control Apply Background next Handler the Event user Data case OS k Event Control Bounds Changed return k Event Control Bounds Changed next Handler the Event user Data case OS k Event Control Click return k Event Control Click next Handler the Event user Data case OS k Event Control Contextual Menu Click return k Event Control Contextual Menu Click next Handler the Event user Data case OS k Event Control Deactivate return k Event Control Deactivate next Handler the Event user Data case OS k Event Control Draw return k Event Control Draw next Handler the Event user Data case OS k Event Control Hit return k Event Control Hit next Handler the Event user Data case OS k Event Control Set Cursor return k Event Control Set Cursor next Handler the Event user Data case OS k Event Control Set Focus Part return k Event Control Set Focus Part next Handler the Event user Data case OS k Event Control Track return k Event Control Track next Handler the Event user Data return OS event Not Handled Err  controlProc nextHandler theEvent userData eventKind GetEventKind theEvent eventKind kEventControlActivate kEventControlActivate nextHandler theEvent userData kEventControlApplyBackground kEventControlApplyBackground nextHandler theEvent userData kEventControlBoundsChanged kEventControlBoundsChanged nextHandler theEvent userData kEventControlClick kEventControlClick nextHandler theEvent userData kEventControlContextualMenuClick kEventControlContextualMenuClick nextHandler theEvent userData kEventControlDeactivate kEventControlDeactivate nextHandler theEvent userData kEventControlDraw kEventControlDraw nextHandler theEvent userData kEventControlHit kEventControlHit nextHandler theEvent userData kEventControlSetCursor kEventControlSetCursor nextHandler theEvent userData kEventControlSetFocusPart kEventControlSetFocusPart nextHandler theEvent userData kEventControlTrack kEventControlTrack nextHandler theEvent userData eventNotHandledErr
int createC Icon Image image int image Handle image handle int width OS CG Image Get Width image Handle int height OS CG Image Get Height image Handle int bpr OS CG Image Get Bytes Per Row image Handle int bpp OS CG Image Get Bits Per Pixel image Handle int bpc OS CG Image Get Bits Per Component image Handle int alpha Info OS CG Image Get Alpha Info image Handle int mask Bpl width 7 8 3 4 4 int mask Size height mask Bpl int pixmap Size height bpr Create the icon int icon Size Pix Map sizeof Bit Map sizeof 2 4 mask Size int icon Handle OS New Handle icon Size if icon Handle 0 SWT error SWT ERROR NO HANDLES OS H Lock icon Handle int icon Ptr new int 1 OS memcpy icon Ptr icon Handle 4 Initialize the pixmap Pix Map iconP Map new Pix Map iconP Map row Bytes short bpr 0x8000 iconP Map right short width iconP Map bottom short height iconP Map cmp Count 3 iconP Map cmp Size short bpc iconP Map pm Table OS New Handle 0 iconP Map h Res 72 16 iconP Map v Res 72 16 iconP Map pixel Type short OS RGB Direct iconP Map pixel Size short bpp iconP Map pixel Format short bpp OS memcpy icon Ptr 0 iconP Map Pix Map sizeof Initialize the mask Bit Map icon Mask new Bit Map icon Mask row Bytes short mask Bpl icon Mask right short width icon Mask bottom short height OS memcpy icon Ptr 0 Pix Map sizeof icon Mask Bit Map sizeof Initialize the icon data int icon Data OS New Handle pixmap Size OS H Lock icon Data int icon Data Ptr new int 1 OS memcpy icon Data Ptr icon Data 4 OS memcpy icon Data Ptr 0 image data pixmap Size OS H Unlock icon Data OS memcpy icon Ptr 0 Pix Map sizeof 2 Bit Map sizeof new int icon Data 4 Initialize the mask data if alpha Info OS kCG Image Alpha First OS memset icon Ptr 0 Pix Map sizeof 2 Bit Map sizeof 4 1 mask Size else byte src Data new byte pixmap Size OS memcpy src Data image data pixmap Size byte mask Data new byte mask Size int offset 0 mask Offset 0 for int y 0 y height y for int x 0 x width x if src Data offset 0xFF 128 mask Data mask Offset x 3 1 7 x 0x7 else mask Data mask Offset x 3 1 7 x 0x7 offset 4 mask Offset mask Bpl OS memcpy icon Ptr 0 Pix Map sizeof 2 Bit Map sizeof 4 mask Data mask Data length OS H Unlock icon Handle return icon Handle  createCIcon imageHandle CGImageGetWidth imageHandle CGImageGetHeight imageHandle CGImageGetBytesPerRow imageHandle CGImageGetBitsPerPixel imageHandle CGImageGetBitsPerComponent imageHandle alphaInfo CGImageGetAlphaInfo imageHandle maskBpl maskSize maskBpl pixmapSize iconSize PixMap BitMap maskSize iconHandle NewHandle iconSize iconHandle ERROR_NO_HANDLES HLock iconHandle iconPtr iconPtr iconHandle PixMap iconPMap PixMap iconPMap rowBytes iconPMap iconPMap iconPMap cmpCount iconPMap cmpSize iconPMap pmTable NewHandle iconPMap hRes iconPMap vRes iconPMap pixelType RGBDirect iconPMap pixelSize iconPMap pixelFormat iconPtr iconPMap PixMap BitMap iconMask BitMap iconMask rowBytes maskBpl iconMask iconMask iconPtr PixMap iconMask BitMap iconData NewHandle pixmapSize HLock iconData iconDataPtr iconDataPtr iconData iconDataPtr pixmapSize HUnlock iconData iconPtr PixMap BitMap iconData alphaInfo kCGImageAlphaFirst iconPtr PixMap BitMap maskSize srcData pixmapSize srcData pixmapSize maskData maskSize maskOffset srcData maskData maskOffset maskData maskOffset maskOffset maskBpl iconPtr PixMap BitMap maskData maskData HUnlock iconHandle iconHandle
void create Handle  createHandle
void create Widget create Handle register hook Events  createWidget createHandle hookEvents
int command Proc int next Handler int the Event int user Data int event Kind OS Get Event Kind the Event switch event Kind case OS k Event Process Command return k Event Process Command next Handler the Event user Data return OS event Not Handled Err  commandProc nextHandler theEvent userData eventKind GetEventKind theEvent eventKind kEventProcessCommand kEventProcessCommand nextHandler theEvent userData eventNotHandledErr
void deregister 
void destroy Widget release Handle  destroyWidget releaseHandle
void destroyC Icon int icon Handle OS H Lock icon Handle Dispose the Color Table int icon Ptr new int 1 OS memcpy icon Ptr icon Handle 4 Pix Map iconP Map new Pix Map OS memcpy iconP Map icon Ptr 0 Pix Map sizeof if iconP Map pm Table 0 OS Dispose Handle iconP Map pm Table Dispose the icon data int icon Data new int 1 OS memcpy icon Data icon Ptr 0 Pix Map sizeof 2 Bit Map sizeof 4 if icon Data 0 0 OS Dispose Handle icon Data 0 OS H Unlock icon Handle Dispose the icon OS Dispose Handle icon Handle  destroyCIcon iconHandle HLock iconHandle ColorTable iconPtr iconPtr iconHandle PixMap iconPMap PixMap iconPMap iconPtr PixMap iconPMap pmTable DisposeHandle iconPMap pmTable iconData iconData iconPtr PixMap BitMap iconData DisposeHandle iconData HUnlock iconHandle DisposeHandle iconHandle
int draw Item Proc int browser int item int property int item State int the Rect int gd Depth int color Device return OS no Err  drawItemProc itemState theRect gdDepth colorDevice noErr
Disposes of the operating system resources associated with the receiver and all its descendents After this method has been invoked the receiver and all descendents will answer code true code when sent the message code is Disposed code Any internal connections between the widgets in the tree will have been removed to facilitate garbage collection p NOTE This method is not called recursively on the descendents of the receiver This means that widget implementers can not detect when a widget is being disposed of by re implementing this method but should instead listen for the code Dispose code event p exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li ul see add Dispose Listener see remove Dispose Listener see check Widget public void dispose Note It is valid to attempt to dispose a widget more than once If this happens fail silently if is Disposed return if is Valid Thread error SWT ERROR THREAD INVALID ACCESS release Child release Widget destroy Widget  isDisposed SWTException ERROR_THREAD_INVALID_ACCESS addDisposeListener removeDisposeListener checkWidget isDisposed isValidThread ERROR_THREAD_INVALID_ACCESS releaseChild releaseWidget destroyWidget
void draw Background int control Do nothing  drawBackground
void draw Background int control float background Rect rect new Rect OS Get Control Bounds control rect if background null OS RGB Fore Color toRGB Color background OS Paint Rect rect else OS Set Theme Background short OS k Theme Brush Dialog Background Active short 0 true OS Erase Rect rect  drawBackground GetControlBounds RGBForeColor toRGBColor PaintRect SetThemeBackground kThemeBrushDialogBackgroundActive EraseRect
void draw Focus int control boolean has Focus boolean has Border float background Rect inset draw Background control background Rect rect new Rect OS Get Control Bounds control rect rect left inset left rect top inset top rect right inset right rect bottom inset bottom int state OS Is Control Active control OS k Theme State Active OS k Theme State Inactive if has Focus if has Border OS Draw Theme Edit Text Frame rect state OS Draw Theme Focus Rect rect true else This code is intentionaly commented NOTE the focus ring is erased by draw Background above OS Draw Theme Focus Rect rect false if has Border OS Draw Theme Edit Text Frame rect state  drawFocus hasFocus hasBorder drawBackground GetControlBounds IsControlActive kThemeStateActive kThemeStateInactive hasFocus hasBorder DrawThemeEditTextFrame DrawThemeFocusRect drawBackground DrawThemeFocusRect hasBorder DrawThemeEditTextFrame
void draw Focus Clipped int control boolean has Focus boolean has Border float background Rect inset int visible Rgn get Visible Region control true if OS Empty Rgn visible Rgn int current Port new int 1 OS Get Port current Port int window OS Get Control Owner control int port OS Get Window Port window OS Set Port port int old Clip OS New Rgn OS Get Clip old Clip OS Set Clip visible Rgn draw Focus control has Focus has Border background inset OS Set Clip old Clip OS Set Port current Port 0 OS Dispose Rgn visible Rgn  drawFocusClipped hasFocus hasBorder visibleRgn getVisibleRegion EmptyRgn visibleRgn currentPort GetPort currentPort GetControlOwner GetWindowPort SetPort oldClip NewRgn GetClip oldClip SetClip visibleRgn drawFocus hasFocus hasBorder SetClip oldClip SetPort currentPort DisposeRgn visibleRgn
void draw Widget int control int damage Rgn int visible Rgn int the Event  drawWidget damageRgn visibleRgn theEvent
void error int code SWT error code 
boolean filters int event Type return display filters event Type  eventType eventType
int fix Mnemonic char buffer int i 0 j 0 while i buffer length if buffer j buffer i if i buffer length continue if buffer i i continue j return j  fixMnemonic
Rect get Control Bounds int control Rect rect new Rect OS Get Control Bounds control rect int window OS Get Control Owner control int the Root new int 1 OS Get Root Control window the Root int parent Handle new int 1 OS Get Super Control control parent Handle if parent Handle 0 the Root 0 Rect parent Rect new Rect OS Get Control Bounds parent Handle 0 parent Rect OS Offset Rect rect short parent Rect left short parent Rect top Rect inset get Inset rect left inset left rect top inset top rect right inset right rect bottom inset bottom return rect  getControlBounds GetControlBounds GetControlOwner theRoot GetRootControl theRoot parentHandle GetSuperControl parentHandle parentHandle theRoot parentRect GetControlBounds parentHandle parentRect OffsetRect parentRect parentRect getInset
Rect get Control Size int control Rect rect new Rect OS Get Control Bounds control rect Rect inset get Inset rect left inset left rect top inset top rect right inset right rect bottom inset bottom return rect  getControlSize GetControlBounds getInset
Returns the application defined widget data associated with the receiver or null if it has not been set The em widget data em is a single unnamed field that is stored with every widget p Applications may put arbitrary objects in this field If the object stored in the widget data needs to be notified when the widget is disposed of it is the application s responsibility to hook the Dispose event on the widget and do so p return the widget data exception SWT Exception ul li ERROR WIDGET DISPOSED when the receiver has been disposed li li ERROR THREAD INVALID ACCESS when called from the wrong thread li ul see set Data public Object get Data check Widget return state KEYED DATA 0 Object data 0 data  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setData getData checkWidget KEYED_DATA
Returns the application defined property of the receiver with the specified name or null if it has not been set p Applications may have associated arbitrary objects with the receiver in this fashion If the objects stored in the properties need to be notified when the widget is disposed of it is the application s responsibility to hook the Dispose event on the widget and do so p param key the name of the property return the value of the property or null if it has not been set exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the key is null li ul 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 set Data public Object get Data String key check Widget if key null error SWT ERROR NULL ARGUMENT if state KEYED DATA 0 Object table Object data for int i 1 i table length i 2 if key equals table i return table i 1 return null  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setData getData checkWidget ERROR_NULL_ARGUMENT KEYED_DATA
Returns the code Display code that is associated with the receiver p A widget s display is either provided when it is created for example top level code Shell code s or is the same as its parent s display p return the receiver s display 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 Display get Display Display display this display if display null error SWT ERROR WIDGET DISPOSED return display  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getDisplay ERROR_WIDGET_DISPOSED
int get Draw Count int control return 0  getDrawCount
Rect get Inset return EMPTY RECT  getInset EMPTY_RECT
String get Name String string get Class get Name int index string last Index Of if index 1 return string return string substring index 1 string length  getName getClass getName lastIndexOf
String get Name Text return  getNameText
Returns the receiver s style information p Note that the value which is returned by this method em may not match em the value which was provided to the constructor when the receiver was created This can occur when the underlying operating system does not support a particular combination of requested styles For example if the platform widget used to implement a particular SWT widget always has scroll bars the result of calling this method would always have the code SWT H SCROLL code and code SWT V SCROLL code bits set p return the style bits 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 int get Style check Widget return style  H_SCROLL V_SCROLL SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getStyle checkWidget
int get Visible Region int control boolean clip Children int visible Rgn OS New Rgn calculate Visible Region control visible Rgn clip Children return visible Rgn  getVisibleRegion clipChildren visibleRgn NewRgn calculateVisibleRegion visibleRgn clipChildren visibleRgn
int help Proc int in Control int in Global Mouse int in Request int out Content Provided int io Help Content return OS event Not Handled Err  helpProc inControl inGlobalMouse inRequest outContentProvided ioHelpContent eventNotHandledErr
int hit Test Proc int browser int item int property int the Rect int mouse Rect Return true to indicate that the item can be selected return 1  hitTestProc theRect mouseRect
void hook Events  hookEvents
boolean hooks int event Type if event Table null return false return event Table hooks event Type  eventType eventTable eventTable eventType
void invalidate Visible Region int control  invalidateVisibleRegion
void inval Window Rgn int window int rgn OS Inval Window Rgn window rgn  invalWindowRgn InvalWindowRgn
Returns code true code if the widget has been disposed and code false code otherwise p This method gets the dispose state for the widget When a widget has been disposed it is an error to invoke any other method using the widget p return code true code when the widget is disposed and code false code otherwise public boolean is Disposed return state DISPOSED 0  isDisposed
boolean is Drawing int control return OS Is Control Visible control get Draw Count control 0  isDrawing IsControlVisible getDrawCount
boolean is Enabled return true  isEnabled
Returns code true code if there are any listeners for the specified event type associated with the receiver and code false code otherwise param event Type the type of event return true if the event is hooked 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 protected boolean is Listening int event Type check Widget return hooks event Type  eventType SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS isListening eventType checkWidget eventType
boolean is Trim Handle int trim Handle return false  isTrimHandle trimHandle
boolean is Valid Subclass return Display is Valid Class get Class  isValidSubclass isValidClass getClass
boolean is Valid Thread return get Display is Valid Thread  isValidThread getDisplay isValidThread
int item Compare Proc int browser int item One int item Two int sort Property return OS no Err  itemCompareProc itemOne itemTwo sortProperty noErr
int item Data Proc int browser int item int property int item Data int set Value return OS no Err  itemDataProc itemData setValue noErr
int item Notification Proc int browser int item int message return OS no Err  itemNotificationProc noErr
int k Event Process Command int next Handler int the Event int user Data return OS event Not Handled Err  kEventProcessCommand nextHandler theEvent userData eventNotHandledErr
int k Event Control Apply Background int next Handler int the Event int user Data return OS event Not Handled Err  kEventControlApplyBackground nextHandler theEvent userData eventNotHandledErr
int k Event Control Activate int next Handler int the Event int user Data return OS event Not Handled Err  kEventControlActivate nextHandler theEvent userData eventNotHandledErr
int k Event Control Bounds Changed int next Handler int the Event int user Data return OS event Not Handled Err  kEventControlBoundsChanged nextHandler theEvent userData eventNotHandledErr
int k Event Control Click int next Handler int the Event int user Data return OS event Not Handled Err  kEventControlClick nextHandler theEvent userData eventNotHandledErr
int k Event Control Contextual Menu Click int next Handler int the Event int user Data return OS event Not Handled Err  kEventControlContextualMenuClick nextHandler theEvent userData eventNotHandledErr
int k Event Control Deactivate int next Handler int the Event int user Data return OS event Not Handled Err  kEventControlDeactivate nextHandler theEvent userData eventNotHandledErr
int k Event Control Draw int next Handler int the Event int user Data int the Control new int 1 OS Get Event Parameter the Event OS k Event Param Direct Object OS type Control Ref null 4 null the Control if get Draw Count the Control 0 0 return OS no Err int region new int 1 OS Get Event Parameter the Event OS k Event Param Rgn Handle OS typeQD Rgn Handle null 4 null region int visible Rgn get Visible Region the Control 0 true OS Sect Rgn region 0 visible Rgn visible Rgn if OS Empty Rgn visible Rgn int port new int 1 OS Get Port port OS Lock Port Bits port 0 OS QD Set Dirty Region port visible Rgn int old Clip OS New Rgn OS Get Clip old Clip OS Set Clip visible Rgn draw Background the Control 0 call Paint Event Handler the Control 0 region 0 visible Rgn the Event next Handler draw Widget the Control 0 region 0 visible Rgn the Event OS Set Clip old Clip OS Dispose Rgn old Clip OS Unlock Port Bits port 0 OS Dispose Rgn visible Rgn return OS no Err  kEventControlDraw nextHandler theEvent userData theControl GetEventParameter theEvent kEventParamDirectObject typeControlRef theControl getDrawCount theControl noErr GetEventParameter theEvent kEventParamRgnHandle typeQDRgnHandle visibleRgn getVisibleRegion theControl SectRgn visibleRgn visibleRgn EmptyRgn visibleRgn GetPort LockPortBits QDSetDirtyRegion visibleRgn oldClip NewRgn GetClip oldClip SetClip visibleRgn drawBackground theControl callPaintEventHandler theControl visibleRgn theEvent nextHandler drawWidget theControl visibleRgn theEvent SetClip oldClip DisposeRgn oldClip UnlockPortBits DisposeRgn visibleRgn noErr
int k Event Control Hit int next Handler int the Event int user Data return OS event Not Handled Err  kEventControlHit nextHandler theEvent userData eventNotHandledErr
int k Event Control Set Cursor int next Handler int the Event int user Data return OS event Not Handled Err  kEventControlSetCursor nextHandler theEvent userData eventNotHandledErr
int k Event Control Set Focus Part int next Handler int the Event int user Data return OS event Not Handled Err  kEventControlSetFocusPart nextHandler theEvent userData eventNotHandledErr
int k Event Control Track int next Handler int the Event int user Data return OS event Not Handled Err  kEventControlTrack nextHandler theEvent userData eventNotHandledErr
int k Event Menu Closed int next Handler int the Event int user Data return OS event Not Handled Err  kEventMenuClosed nextHandler theEvent userData eventNotHandledErr
int k Event Menu Draw Item Content int next Handler int the Event int user Data return OS event Not Handled Err  kEventMenuDrawItemContent nextHandler theEvent userData eventNotHandledErr
int k Event Menu Measure Item Width int next Handler int the Event int user Data return OS event Not Handled Err  kEventMenuMeasureItemWidth nextHandler theEvent userData eventNotHandledErr
int k Event Menu Opening int next Handler int the Event int user Data return OS event Not Handled Err  kEventMenuOpening nextHandler theEvent userData eventNotHandledErr
int k Event Menu Target Item int next Handler int the Event int user Data return OS event Not Handled Err  kEventMenuTargetItem nextHandler theEvent userData eventNotHandledErr
int k Event Mouse Down int next Handler int the Event int user Data return OS event Not Handled Err  kEventMouseDown nextHandler theEvent userData eventNotHandledErr
int k Event Mouse Dragged int next Handler int the Event int user Data return OS event Not Handled Err  kEventMouseDragged nextHandler theEvent userData eventNotHandledErr
int k Event Mouse Moved int next Handler int the Event int user Data return OS event Not Handled Err  kEventMouseMoved nextHandler theEvent userData eventNotHandledErr
int k Event Mouse Up int next Handler int the Event int user Data return OS event Not Handled Err  kEventMouseUp nextHandler theEvent userData eventNotHandledErr
int k Event Mouse Wheel Moved int next Handler int the Event int user Data return OS event Not Handled Err  kEventMouseWheelMoved nextHandler theEvent userData eventNotHandledErr
int k Event Raw Key Up int next Handler int the Event int user Data return OS event Not Handled Err  kEventRawKeyUp nextHandler theEvent userData eventNotHandledErr
int k Event Raw Key Repeat int next Handler int the Event int user Data return OS event Not Handled Err  kEventRawKeyRepeat nextHandler theEvent userData eventNotHandledErr
int k Event Raw Key Modifiers Changed int next Handler int the Event int user Data return OS event Not Handled Err  kEventRawKeyModifiersChanged nextHandler theEvent userData eventNotHandledErr
int k Event Raw Key Down int next Handler int the Event int user Data return OS event Not Handled Err  kEventRawKeyDown nextHandler theEvent userData eventNotHandledErr
int k Event Text Input Unicode For Key Event int next Handler int the Event int user Data return OS event Not Handled Err  kEventTextInputUnicodeForKeyEvent nextHandler theEvent userData eventNotHandledErr
int k Event Window Activated int next Handler int the Event int user Data return OS event Not Handled Err  kEventWindowActivated nextHandler theEvent userData eventNotHandledErr
int k Event Window Bounds Changed int next Handler int the Event int user Data return OS event Not Handled Err  kEventWindowBoundsChanged nextHandler theEvent userData eventNotHandledErr
int k Event Window Close int next Handler int the Event int user Data return OS event Not Handled Err  kEventWindowClose nextHandler theEvent userData eventNotHandledErr
int k Event Window Collapsed int next Handler int the Event int user Data return OS event Not Handled Err  kEventWindowCollapsed nextHandler theEvent userData eventNotHandledErr
int k Event Window Deactivated int next Handler int the Event int user Data return OS event Not Handled Err  kEventWindowDeactivated nextHandler theEvent userData eventNotHandledErr
int k Event Window Draw Content int next Handler int the Event int user Data return OS event Not Handled Err  kEventWindowDrawContent nextHandler theEvent userData eventNotHandledErr
int k Event Window Expanded int next Handler int the Event int user Data return OS event Not Handled Err  kEventWindowExpanded nextHandler theEvent userData eventNotHandledErr
int k Event Window Get Region int next Handler int the Event int user Data return OS event Not Handled Err  kEventWindowGetRegion nextHandler theEvent userData eventNotHandledErr
int k Event Window Hidden int next Handler int the Event int user Data return OS event Not Handled Err  kEventWindowHidden nextHandler theEvent userData eventNotHandledErr
int k Event Window Hit Test int next Handler int the Event int user Data return OS event Not Handled Err  kEventWindowHitTest nextHandler theEvent userData eventNotHandledErr
int k Event Window Shown int next Handler int the Event int user Data return OS event Not Handled Err  kEventWindowShown nextHandler theEvent userData eventNotHandledErr
int k Event Window Update int next Handler int the Event int user Data return OS event Not Handled Err  kEventWindowUpdate nextHandler theEvent userData eventNotHandledErr
int keyboard Proc int next Handler int the Event int user Data int event Kind OS Get Event Kind the Event switch event Kind case OS k Event Raw Key Down return k Event Raw Key Down next Handler the Event user Data case OS k Event Raw Key Modifiers Changed return k Event Raw Key Modifiers Changed next Handler the Event user Data case OS k Event Raw Key Repeat return k Event Raw Key Repeat next Handler the Event user Data case OS k Event Raw Key Up return k Event Raw Key Up next Handler the Event user Data return OS event Not Handled Err  keyboardProc nextHandler theEvent userData eventKind GetEventKind theEvent eventKind kEventRawKeyDown kEventRawKeyDown nextHandler theEvent userData kEventRawKeyModifiersChanged kEventRawKeyModifiersChanged nextHandler theEvent userData kEventRawKeyRepeat kEventRawKeyRepeat nextHandler theEvent userData kEventRawKeyUp kEventRawKeyUp nextHandler theEvent userData eventNotHandledErr
int menu Proc int next Handler int the Event int user Data int event Kind OS Get Event Kind the Event switch event Kind case OS k Event Menu Closed return k Event Menu Closed next Handler the Event user Data case OS k Event Menu Draw Item Content return k Event Menu Draw Item Content next Handler the Event user Data case OS k Event Menu Measure Item Width return k Event Menu Measure Item Width next Handler the Event user Data case OS k Event Menu Opening return k Event Menu Opening next Handler the Event user Data case OS k Event Menu Target Item return k Event Menu Target Item next Handler the Event user Data return OS event Not Handled Err  menuProc nextHandler theEvent userData eventKind GetEventKind theEvent eventKind kEventMenuClosed kEventMenuClosed nextHandler theEvent userData kEventMenuDrawItemContent kEventMenuDrawItemContent nextHandler theEvent userData kEventMenuMeasureItemWidth kEventMenuMeasureItemWidth nextHandler theEvent userData kEventMenuOpening kEventMenuOpening nextHandler theEvent userData kEventMenuTargetItem kEventMenuTargetItem nextHandler theEvent userData eventNotHandledErr
int mouse Proc int next Handler int the Event int user Data int event Kind OS Get Event Kind the Event switch event Kind case OS k Event Mouse Down return k Event Mouse Down next Handler the Event user Data case OS k Event Mouse Up return k Event Mouse Up next Handler the Event user Data case OS k Event Mouse Dragged return k Event Mouse Dragged next Handler the Event user Data case OS k Event Mouse Entered return k Event Mouse Entered next Handler the Event user Data case OS k Event Mouse Exited return k Event Mouse Exited next Handler the Event user Data case OS k Event Mouse Moved return k Event Mouse Moved next Handler the Event user Data case OS k Event Mouse Wheel Moved return k Event Mouse Wheel Moved next Handler the Event user Data return OS event Not Handled Err  mouseProc nextHandler theEvent userData eventKind GetEventKind theEvent eventKind kEventMouseDown kEventMouseDown nextHandler theEvent userData kEventMouseUp kEventMouseUp nextHandler theEvent userData kEventMouseDragged kEventMouseDragged nextHandler theEvent userData kEventMouseEntered kEventMouseEntered nextHandler theEvent userData kEventMouseExited kEventMouseExited nextHandler theEvent userData kEventMouseMoved kEventMouseMoved nextHandler theEvent userData kEventMouseWheelMoved kEventMouseWheelMoved nextHandler theEvent userData eventNotHandledErr
Notifies all of the receiver s listeners for events of the given type that one such event has occurred by invoking their code handle Event code method param event Type the type of event which has occurred param event the event data 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 notify Listeners int event Type Event event check Widget if event null event new Event send Event event Type event  handleEvent eventType SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS notifyListeners eventType checkWidget sendEvent eventType
void post Event int event Type send Event event Type null false  postEvent eventType sendEvent eventType
void post Event int event Type Event event send Event event Type event false  postEvent eventType sendEvent eventType
void redraw Widget int control boolean children if is Drawing control return int window OS Get Control Owner control int visible Rgn get Visible Region control children inval Window Rgn window visible Rgn OS Dispose Rgn visible Rgn  redrawWidget isDrawing GetControlOwner visibleRgn getVisibleRegion invalWindowRgn visibleRgn DisposeRgn visibleRgn
void redraw Widget int control int x int y int width int height boolean children if is Drawing control return Rect rect new Rect OS Get Control Bounds control rect x rect left y rect top OS Set Rect rect short x short y short x width short y height int rect Rgn OS New Rgn OS Rect Rgn rect Rgn rect int visible Rgn get Visible Region control children OS Sect Rgn rect Rgn visible Rgn visible Rgn int window OS Get Control Owner control inval Window Rgn window visible Rgn OS Dispose Rgn rect Rgn OS Dispose Rgn visible Rgn  redrawWidget isDrawing GetControlBounds SetRect rectRgn NewRgn RectRgn rectRgn visibleRgn getVisibleRegion SectRgn rectRgn visibleRgn visibleRgn GetControlOwner invalWindowRgn visibleRgn DisposeRgn rectRgn DisposeRgn visibleRgn
void register 
void release Child Do nothing  releaseChild
void release Handle state DISPOSED display null  releaseHandle
void release Resources release Widget release Handle  releaseResources releaseWidget releaseHandle
void release Widget send Event SWT Dispose deregister event Table null data null  releaseWidget sendEvent eventTable
Removes the listener from the collection of listeners who will be notifed when an event of the given type occurs param event Type the type of event to listen for param listener the listener which should no longer be notified when the event occurs exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Listener see add Listener public void remove Listener int event Type Listener handler check Widget if handler null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook event Type handler  eventType IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS addListener removeListener eventType checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventType
Removes the listener from the collection of listeners who will be notifed when an event of the given type occurs p b IMPORTANT b This method is em not em part of the SWT public API It is marked public only so that it can be shared within the packages provided by SWT It should never be referenced from application code p param event Type the type of event to listen for param listener the listener which should no longer be notified when the event occurs exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Listener see add Listener protected void remove Listener int event Type SWT Event Listener handler check Widget if handler null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook event Type handler  eventType IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS addListener removeListener eventType SWTEventListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventType
Removes the listener from the collection of listeners who will be notifed when the widget is disposed param listener the listener which should no longer be notified when the receiver is disposed exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Dispose Listener see add Dispose Listener public void remove Dispose Listener Dispose Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Dispose listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS DisposeListener addDisposeListener removeDisposeListener DisposeListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable
void send Event Event event Display display event display if display filter Event event if event Table null event Table send Event event  sendEvent filterEvent eventTable eventTable sendEvent
void send Event int event Type send Event event Type null true  sendEvent eventType sendEvent eventType
void send Event int event Type Event event send Event event Type event true  sendEvent eventType sendEvent eventType
void send Event int event Type Event event boolean send if event Table null display filters event Type return if event null event new Event event type event Type event display display event widget this if event time 0 event time display get Last Event Time if send send Event event else display post Event event  sendEvent eventType eventTable eventType eventType getLastEventTime sendEvent postEvent
int set Bounds int control int x int y int width int height boolean move boolean resize boolean events Compute the old bounds Rect old Bounds new Rect OS Get Control Bounds control old Bounds int the Root new int 1 int window OS Get Control Owner control OS Get Root Control window the Root int parent Handle new int 1 OS Get Super Control control parent Handle Rect parent Rect new Rect if parent Handle 0 the Root 0 OS Get Control Bounds parent Handle 0 parent Rect OS Offset Rect old Bounds short parent Rect left short parent Rect top Rect inset get Inset old Bounds left inset left old Bounds top inset top old Bounds right inset right old Bounds bottom inset bottom Compute the new bounds if move x old Bounds left y old Bounds top if resize width old Bounds right old Bounds left height old Bounds bottom old Bounds top Rect new Bounds new Rect new Bounds left short parent Rect left x inset left new Bounds top short parent Rect top y inset top new Bounds right short new Bounds left width inset right inset left new Bounds bottom short new Bounds top height inset bottom inset top if new Bounds bottom new Bounds top new Bounds bottom new Bounds top if new Bounds right new Bounds left new Bounds right new Bounds left Get bounds again since the one above is in SWT coordinates OS Get Control Bounds control old Bounds Check if anything changed boolean same Origin new Bounds left old Bounds left new Bounds top old Bounds top boolean same Extent new Bounds right new Bounds left old Bounds right old Bounds left new Bounds bottom new Bounds top old Bounds bottom old Bounds top if same Origin same Extent return 0 Apply changes and invalidate appropriate rectangles int temp Rgn 0 boolean visible OS Is Control Visible control if visible temp Rgn OS New Rgn OS Get Control Region control short OS k Control Structure Meta Part temp Rgn inval Window Rgn window temp Rgn OS Set Control Bounds control new Bounds invalidate Visible Region control if visible OS Get Control Region control short OS k Control Structure Meta Part temp Rgn inval Window Rgn window temp Rgn OS Dispose Rgn temp Rgn Send events int result 0 if move same Origin if events send Event SWT Move result MOVED if resize same Extent if events send Event SWT Resize result RESIZED return result  setBounds oldBounds GetControlBounds oldBounds theRoot GetControlOwner GetRootControl theRoot parentHandle GetSuperControl parentHandle parentRect parentHandle theRoot GetControlBounds parentHandle parentRect OffsetRect oldBounds parentRect parentRect getInset oldBounds oldBounds oldBounds oldBounds oldBounds oldBounds oldBounds oldBounds oldBounds oldBounds newBounds newBounds parentRect newBounds parentRect newBounds newBounds newBounds newBounds newBounds newBounds newBounds newBounds newBounds newBounds newBounds newBounds GetControlBounds oldBounds sameOrigin newBounds oldBounds newBounds oldBounds sameExtent newBounds newBounds oldBounds oldBounds newBounds newBounds oldBounds oldBounds sameOrigin sameExtent tempRgn IsControlVisible tempRgn NewRgn GetControlRegion kControlStructureMetaPart tempRgn invalWindowRgn tempRgn SetControlBounds newBounds invalidateVisibleRegion GetControlRegion kControlStructureMetaPart tempRgn invalWindowRgn tempRgn DisposeRgn tempRgn sameOrigin sendEvent sameExtent sendEvent
Sets the application defined widget data associated with the receiver to be the argument The em widget data em is a single unnamed field that is stored with every widget p Applications may put arbitrary objects in this field If the object stored in the widget data needs to be notified when the widget is disposed of it is the application s responsibility to hook the Dispose event on the widget and do so p param data the widget data exception SWT Exception ul li ERROR WIDGET DISPOSED when the receiver has been disposed li li ERROR THREAD INVALID ACCESS when called from the wrong thread li ul public void set Data Object data check Widget if state KEYED DATA 0 Object this data 0 data else this data data  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setData checkWidget KEYED_DATA
Sets the application defined property of the receiver with the specified name to the given value p Applications may associate arbitrary objects with the receiver in this fashion If the objects stored in the properties need to be notified when the widget is disposed of it is the application s responsibility to hook the Dispose event on the widget and do so p param key the name of the property param value the new value for the property exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the key is null li ul 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 get Data public void set Data String key Object value check Widget if key null error SWT ERROR NULL ARGUMENT int index 1 Object table null if state KEYED DATA 0 table Object data while index table length if key equals table index break index 2 if value null if state KEYED DATA 0 if index table length Object new Table new Object table length 2 System arraycopy table 0 new Table 0 table length data table new Table else table new Object 3 table 0 data data table state KEYED DATA table index key table index 1 value else if state KEYED DATA 0 if index table length int length table length 2 if length 1 data table 0 state KEYED DATA else Object new Table new Object length System arraycopy table 0 new Table 0 index System arraycopy table index 2 new Table index length index data new Table  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getData setData checkWidget ERROR_NULL_ARGUMENT KEYED_DATA KEYED_DATA newTable newTable newTable KEYED_DATA KEYED_DATA KEYED_DATA newTable newTable newTable newTable
boolean set Input State Event event int type int chord int modifiers if chord 0x01 0 event state Mask SWT BUTTON1 if chord 0x02 0 event state Mask SWT BUTTON3 if chord 0x04 0 event state Mask SWT BUTTON2 if modifiers OS option Key 0 event state Mask SWT ALT if modifiers OS shift Key 0 event state Mask SWT SHIFT if modifiers OS control Key 0 event state Mask SWT CONTROL if modifiers OS cmd Key 0 event state Mask SWT COMMAND switch type case SWT Mouse Down case SWT Mouse Double Click if event button 1 event state Mask SWT BUTTON1 if event button 2 event state Mask SWT BUTTON2 if event button 3 event state Mask SWT BUTTON3 break case SWT Mouse Up if event button 1 event state Mask SWT BUTTON1 if event button 2 event state Mask SWT BUTTON2 if event button 3 event state Mask SWT BUTTON3 break case SWT Key Down case SWT Traverse if event key Code 0 event character 0 return true int last Modifiers display last Modifiers if modifiers OS alpha Lock 0 last Modifiers OS alpha Lock 0 event key Code SWT CAPS LOCK return true if modifiers OS shift Key 0 last Modifiers OS shift Key 0 event state Mask SWT SHIFT event key Code SWT SHIFT return true if modifiers OS control Key 0 last Modifiers OS control Key 0 event state Mask SWT CONTROL event key Code SWT CONTROL return true if modifiers OS cmd Key 0 last Modifiers OS cmd Key 0 event state Mask SWT COMMAND event key Code SWT COMMAND return true if modifiers OS option Key 0 last Modifiers OS option Key 0 event state Mask SWT ALT event key Code SWT ALT return true break case SWT Key Up if event key Code 0 event character 0 return true int last Modifiers display last Modifiers if modifiers OS alpha Lock 0 last Modifiers OS alpha Lock 0 event key Code SWT CAPS LOCK return true if modifiers OS shift Key 0 last Modifiers OS shift Key 0 event state Mask SWT SHIFT event key Code SWT SHIFT return true if modifiers OS control Key 0 last Modifiers OS control Key 0 event state Mask SWT CONTROL event key Code SWT CONTROL return true if modifiers OS cmd Key 0 last Modifiers OS cmd Key 0 event state Mask SWT COMMAND event key Code SWT COMMAND return true if modifiers OS option Key 0 last Modifiers OS option Key 0 event state Mask SWT ALT event key Code SWT ALT return true break return true  setInputState stateMask stateMask stateMask optionKey stateMask shiftKey stateMask controlKey stateMask cmdKey stateMask MouseDown MouseDoubleClick stateMask stateMask stateMask MouseUp stateMask stateMask stateMask KeyDown keyCode lastModifiers lastModifiers alphaLock lastModifiers alphaLock keyCode CAPS_LOCK shiftKey lastModifiers shiftKey stateMask keyCode controlKey lastModifiers controlKey stateMask keyCode cmdKey lastModifiers cmdKey stateMask keyCode optionKey lastModifiers optionKey stateMask keyCode KeyUp keyCode lastModifiers lastModifiers alphaLock lastModifiers alphaLock keyCode CAPS_LOCK shiftKey lastModifiers shiftKey stateMask keyCode controlKey lastModifiers controlKey stateMask keyCode cmdKey lastModifiers cmdKey stateMask keyCode optionKey lastModifiers optionKey stateMask keyCode
boolean set Key State Event event int type int the Event boolean is Null false int key Code new int 1 OS Get Event Parameter the Event OS k Event Param Key Code OS typeU Int32 null key Code length 4 null key Code event key Code Display translate Key key Code 0 switch event key Code case SWT LF Feature in the Macintosh When the numeric key pad Enter key is pressed it generates n This is the correct platform behavior but is not portable The fix is to convert the n into r event key Code SWT KEYPAD CR event character r break case SWT BS event character b break case SWT CR event character r break case SWT DEL event character 0x7F break case SWT ESC event character 0x1B break case SWT TAB event character t break default if event key Code 0 SWT KEYPAD MULTIPLY event key Code event key Code SWT KEYPAD CR int length new int 1 int status OS Get Event Parameter the Event OS k Event Param Key Unicodes OS type Unicode Text null 4 length char null if status OS no Err length 0 0 char chars new char 1 OS Get Event Parameter the Event OS k Event Param Key Unicodes OS type Unicode Text null 2 null chars event character chars 0 Bug in the Mactonish For some reason Ctrl Shift 2 and Ctrl Shift 6 fail to give 0x0 or ASCII NUL and 0x1e Other control character key sequences such as A or even Ctrl Shift   or 0x1f are correctly translated to control characters Since it is not possible to know which key combination gives on an international keyboard there is no way to test for either character and convert it to a control character Shift 2 gives only on an English keyboard to work around the problem There is no fix at this time if event key Code 0 int kchr Ptr OS Get Script Manager Variable short OS smKCHR Cache if display kchr Ptr kchr Ptr display kchr Ptr kchr Ptr display kchr State 0 0 int result OS Key Translate display kchr Ptr short key Code 0 display kchr State if result 0x7f event key Code result 0x7f else int encoding new int 1 short key Script short OS Get Script Manager Variable short OS sm Key Script short region Code short OS Get Script Manager Variable short OS sm Region Code if OS Upgrade Script Info To Text Encoding key Script short OS k Text Language Dont Care region Code null encoding OS param Err if OS Upgrade Script Info To Text Encoding key Script short OS k Text Language Dont Care short OS k Text Region Dont Care null encoding OS param Err encoding 0 OS k Text Encoding Mac Roman int encoding Info new int 1 OS Create Text To Unicode Info By Encoding encoding 0 encoding Info if encoding Info 0 0 char chars new char 1 int nchars new int 1 byte buffer new byte 2 buffer 0 1 buffer 1 byte result 0xFF OS Convert FromP String To Unicode encoding Info 0 buffer chars length 2 nchars chars OS Dispose Text To Unicode Info encoding Info event key Code chars 0 break if event key Code 0 event character 0 if is Null return false int chord new int 1 OS Get Event Parameter the Event OS k Event Param Mouse Chord OS typeU Int32 null 4 null chord int modifiers new int 1 OS Get Event Parameter the Event OS k Event Param Key Modifiers OS typeU Int32 null 4 null modifiers return set Input State event type chord 0 modifiers 0  setKeyState theEvent isNull keyCode GetEventParameter theEvent kEventParamKeyCode typeUInt32 keyCode keyCode keyCode translateKey keyCode keyCode keyCode KEYPAD_CR keyCode KEYPAD_MULTIPLY keyCode keyCode KEYPAD_CR GetEventParameter theEvent kEventParamKeyUnicodes typeUnicodeText noErr GetEventParameter theEvent kEventParamKeyUnicodes typeUnicodeText _ keyCode kchrPtr GetScriptManagerVariable smKCHRCache kchrPtr kchrPtr kchrPtr kchrPtr kchrState KeyTranslate kchrPtr keyCode kchrState keyCode keyScript GetScriptManagerVariable smKeyScript regionCode GetScriptManagerVariable smRegionCode UpgradeScriptInfoToTextEncoding keyScript kTextLanguageDontCare regionCode paramErr UpgradeScriptInfoToTextEncoding keyScript kTextLanguageDontCare kTextRegionDontCare paramErr kTextEncodingMacRoman encodingInfo CreateTextToUnicodeInfoByEncoding encodingInfo encodingInfo ConvertFromPStringToUnicode encodingInfo DisposeTextToUnicodeInfo encodingInfo keyCode keyCode isNull GetEventParameter theEvent kEventParamMouseChord typeUInt32 GetEventParameter theEvent kEventParamKeyModifiers typeUInt32 setInputState
void set Visible int control boolean visible int visible Rgn 0 boolean drawing get Draw Count control 0 if drawing visible visible Rgn get Visible Region control false OS Set Control Visibility control visible false invalidate Visible Region control if drawing visible visible Rgn get Visible Region control false if drawing int window OS Get Control Owner control inval Window Rgn window visible Rgn OS Dispose Rgn visible Rgn  setVisible visibleRgn getDrawCount visibleRgn getVisibleRegion SetControlVisibility invalidateVisibleRegion visibleRgn getVisibleRegion GetControlOwner invalWindowRgn visibleRgn DisposeRgn visibleRgn
void setZ Order int control int othe Control boolean above int in Op above OS kHI ViewZ Order Below OS kHI ViewZ Order Above int old Rgn 0 boolean drawing is Drawing control if drawing old Rgn get Visible Region control false OS HI View SetZ Order control in Op othe Control invalidate Visible Region control if drawing int new Rgn get Visible Region control false if above OS Diff Rgn new Rgn old Rgn new Rgn else OS Diff Rgn old Rgn new Rgn new Rgn int window OS Get Control Owner control inval Window Rgn window new Rgn OS Dispose Rgn old Rgn OS Dispose Rgn new Rgn  setZOrder otheControl inOp kHIViewZOrderBelow kHIViewZOrderAbove oldRgn isDrawing oldRgn getVisibleRegion HIViewSetZOrder inOp otheControl invalidateVisibleRegion newRgn getVisibleRegion DiffRgn newRgn oldRgn newRgn DiffRgn oldRgn newRgn newRgn GetControlOwner invalWindowRgn newRgn DisposeRgn oldRgn DisposeRgn newRgn
int text Input Proc int next Handler int the Event int user Data int event Kind OS Get Event Kind the Event switch event Kind case OS k Event Text Input Unicode For Key Event return k Event Text Input Unicode For Key Event next Handler the Event user Data return OS event Not Handled Err  textInputProc nextHandler theEvent userData eventKind GetEventKind theEvent eventKind kEventTextInputUnicodeForKeyEvent kEventTextInputUnicodeForKeyEvent nextHandler theEvent userData eventNotHandledErr
RGB Color toRGB Color float color RGB Color rgb new RGB Color rgb red short color 0 0xffff rgb green short color 1 0xffff rgb blue short color 2 0xffff return rgb  RGBColor toRGBColor RGBColor RGBColor
Returns a string containing a concise human readable description of the receiver return a string representation of the receiver public String to String String string Disposed if is Disposed string Wrong Thread if is Valid Thread string get Name Text return get Name string  toString isDisposed isValidThread getNameText getName
int tracking Proc int browser int itemID int property int the Rect int start Pt int modifiers Return one to indicate that the data browser should process the click return 1  trackingProc theRect startPt
int window Proc int next Handler int the Event int user Data int event Kind OS Get Event Kind the Event switch event Kind case OS k Event Window Activated return k Event Window Activated next Handler the Event user Data case OS k Event Window Bounds Changed return k Event Window Bounds Changed next Handler the Event user Data case OS k Event Window Close return k Event Window Close next Handler the Event user Data case OS k Event Window Collapsed return k Event Window Collapsed next Handler the Event user Data case OS k Event Window Deactivated return k Event Window Deactivated next Handler the Event user Data case OS k Event Window Draw Content return k Event Window Draw Content next Handler the Event user Data case OS k Event Window Expanded return k Event Window Expanded next Handler the Event user Data case OS k Event Window Get Region return k Event Window Get Region next Handler the Event user Data case OS k Event Window Hidden return k Event Window Hidden next Handler the Event user Data case OS k Event Window Hit Test return k Event Window Hit Test next Handler the Event user Data case OS k Event Window Shown return k Event Window Shown next Handler the Event user Data case OS k Event Window Update return k Event Window Update next Handler the Event user Data return OS event Not Handled Err  windowProc nextHandler theEvent userData eventKind GetEventKind theEvent eventKind kEventWindowActivated kEventWindowActivated nextHandler theEvent userData kEventWindowBoundsChanged kEventWindowBoundsChanged nextHandler theEvent userData kEventWindowClose kEventWindowClose nextHandler theEvent userData kEventWindowCollapsed kEventWindowCollapsed nextHandler theEvent userData kEventWindowDeactivated kEventWindowDeactivated nextHandler theEvent userData kEventWindowDrawContent kEventWindowDrawContent nextHandler theEvent userData kEventWindowExpanded kEventWindowExpanded nextHandler theEvent userData kEventWindowGetRegion kEventWindowGetRegion nextHandler theEvent userData kEventWindowHidden kEventWindowHidden nextHandler theEvent userData kEventWindowHitTest kEventWindowHitTest nextHandler theEvent userData kEventWindowShown kEventWindowShown nextHandler theEvent userData kEventWindowUpdate kEventWindowUpdate nextHandler theEvent userData eventNotHandledErr

Answers the length of the side adjacent to the given angle of a right triangle In other words it returns the integer conversion of length cos angle p IMPORTANT the j2me version has an additional restriction on the argument length must be between 32767 and 32767 inclusive p param angle the angle in degrees param length the length of the triangle s hypotenuse return the integer conversion of length cos angle public static int cos int angle int length return sin 90 angle length 
Answers the length of the side opposite to the given angle of a right triangle In other words it returns the integer conversion of length sin angle p IMPORTANT the j2me version has an additional restriction on the argument length must be between 32767 and 32767 inclusive p param angle the angle in degrees param length the length of the triangle s hypotenuse return the integer conversion of length sin angle public static int sin int angle int length if length 32767 length 32767 SWT error SWT ERROR INVALID RANGE if angle 0 angle 360 angle angle 360 if angle 0 angle 360 int sine Value if angle 0 angle 90 sine Value sine Table angle else if angle 90 angle 180 sine Value sine Table 180 angle else if angle 180 angle 270 sine Value 0 sine Table angle 180 else angle 270 angle 360 sine Value 0 sine Table 360 angle return sine Value length 16  ERROR_INVALID_RANGE sineValue sineValue sineTable sineValue sineTable sineValue sineTable sineValue sineTable sineValue
Answers the most negative i e closest to negative infinity integer value which is greater than the number obtained by dividing the first argument p by the second argument q param p numerator param q denominator must be different from zero return the ceiling of the rational number p q public static int ceil int p int q int res p q if p q 0 res 0 res 0 p 0 q 0 p 0 q 0 return res else return res 1 
Answers the most positive i e closest to positive infinity integer value which is less than the number obtained by dividing the first argument p by the second argument q param p numerator param q denominator must be different from zero return the floor of the rational number p q public static int floor int p int q int res p q if p q 0 res 0 res 0 p 0 q 0 p 0 q 0 return res else return res 1 
Answers the result of rounding to the closest integer the number obtained by dividing the first argument p by the second argument q p IMPORTANT the j2me version has an additional restriction on the arguments p must be within the range 0 32767 inclusive q must be within the range 1 32767 inclusive p param p numerator param q denominator must be different from zero return the closest integer to the rational number p q public static int round int p int q if p 0 p 32767 q 1 q 32767 SWT error SWT ERROR INVALID RANGE return 2 p q 2 q  ERROR_INVALID_RANGE
Returns 2 raised to the power of the argument param n an int value between 0 and 30 inclusive return 2 raised to the power of the argument exception Illegal Argument Exception ul li ERROR INVALID RANGE if the argument is not between 0 and 30 inclusive li ul public static int pow2 int n if n 1 n 30 return 2 n 1 else if n 0 SWT error SWT ERROR INVALID RANGE return 1  IllegalArgumentException ERROR_INVALID_RANGE ERROR_INVALID_RANGE
Open a file if such things are supported param filename the name of the file to open return a stream on the file if it could be opened public static Input Stream new File Input Stream String filename throws IO Exception throw new IO Exception  InputStream newFileInputStream IOException IOException
Open a file if such things are supported param filename the name of the file to open return a stream on the file if it could be opened public static Output Stream new File Output Stream String filename throws IO Exception throw new IO Exception  OutputStream newFileOutputStream IOException IOException
Answers whether the character is a letter param c the character return true when the character is a letter public static boolean is Letter char c return Character is Upper Case c Character is Lower Case c  isLetter isUpperCase isLowerCase
Answers whether the character is a letter or a digit param c the character return true when the character is a letter or a digit public static boolean is Letter Or Digit char c return is Letter c Character is Digit c  isLetterOrDigit isLetter isDigit
Answers whether the character is a Unicode space character param c the character return true when the character is a Unicode space character public static boolean is Space Char char c return c  isSpaceChar
Answers whether the character is whitespace character param c the character return true when the character is a whitespace character public static boolean is Whitespace char c Optimized case for ASCII if c 0x1c c 0x20 c 0x9 c 0xd return true return false  isWhitespace
Execute a program in a separate platform process if the underlying platform support this p The new process inherits the environment of the caller p param program the name of the program to execute exception IO Exception if the program cannot be executed exception Security Exception if the current Security Manager disallows program execution public static void exec String prog throws java io IO Exception throw new IO Exception  IOException SecurityException SecurityManager IOException IOException
Execute prog Array 0 in a separate platform process if the underlying platform support this p The new process inherits the environment of the caller p param prog Array array containing the program to execute and its arguments exception IO Exception if the program cannot be executed exception Security Exception if the current Security Manager disallows program execution public static void exec String prog Array throws java io IO Exception throw new IO Exception  progArray progArray IOException SecurityException SecurityManager progArray IOException IOException
Returns the NLS ed message for the given argument This is only being called from SWT param key the key to look up return the message for the given key see SWT get Message public static String get Message String key if key null SWT error SWT ERROR NULL ARGUMENT if key equals SWT Yes return Yes if key equals SWT No return No if key equals SWT OK return OK if key equals SWT Cancel return Cancel if key equals SWT Abort return Abort if key equals SWT Retry return Retry if key equals SWT Ignore return Ignore if key equals SWT Sample return Sample if key equals SWT A Sample Text return A Sample Text if key equals SWT Selection return Selection if key equals SWT Current Selection return Current Selection if key equals SWT Character set return Character set if key equals SWT Font return Font if key equals SWT Extended style return Extended style if key equals SWT Size return Size if key equals SWT Style return Style if key equals SWT Save return Save if key equals SWT Character set return Character set if key equals SWT ColorDialog Title return Colors if key equals SWT FontDialog Title return Fonts if key equals SWT Charset Western return western if key equals SWT Charset EastEuropean return east european if key equals SWT Charset SouthEuropean return south european if key equals SWT Charset NorthEuropean return north european if key equals SWT Charset Cyrillic return cyrillic if key equals SWT Charset Arabic return arabic if key equals SWT Charset Greek return greek if key equals SWT Charset Hebrew return hebrew if key equals SWT Charset Turkish return turkish if key equals SWT Charset Nordic return nordic if key equals SWT Charset Thai return thai if key equals SWT Charset BalticRim return baltic rim if key equals SWT Charset Celtic return celtic if key equals SWT Charset Euro return euro if key equals SWT Charset Romanian return romanian if key equals SWT Charset SimplifiedChinese return simplified chinese if key equals SWT Charset TraditionalChinese return traditional chinese if key equals SWT Charset Japanese return japanese if key equals SWT Charset Korean return korean if key equals SWT Charset Unicode return unicode if key equals SWT Charset ASCII return ASCII if key equals SWT InputMethods return Input Methods if key equals SWT Password return Password if key equals SWT Username return User Name if key equals SWT Prompt return Prompt return key  getMessage getMessage ERROR_NULL_ARGUMENT SWT_Yes SWT_No SWT_OK SWT_Cancel SWT_Abort SWT_Retry SWT_Ignore SWT_Sample SWT_A_Sample_Text SWT_Selection SWT_Current_Selection SWT_Character_set SWT_Font SWT_Extended_style SWT_Size SWT_Style SWT_Save SWT_Character_set SWT_ColorDialog_Title SWT_FontDialog_Title SWT_Charset_Western SWT_Charset_EastEuropean SWT_Charset_SouthEuropean SWT_Charset_NorthEuropean SWT_Charset_Cyrillic SWT_Charset_Arabic SWT_Charset_Greek SWT_Charset_Hebrew SWT_Charset_Turkish SWT_Charset_Nordic SWT_Charset_Thai SWT_Charset_BalticRim SWT_Charset_Celtic SWT_Charset_Euro SWT_Charset_Romanian SWT_Charset_SimplifiedChinese SWT_Charset_TraditionalChinese SWT_Charset_Japanese SWT_Charset_Korean SWT_Charset_Unicode SWT_Charset_ASCII SWT_InputMethods SWT_Password SWT_Username SWT_Prompt
Interrupt the current thread p Note that this is not available on CLDC p public static void interrupt 
Compares two instances of class String ignoring the case of the characters and answers if they are equal param s1 string param s2 string return true if the two instances of class String are equal public static boolean equals Ignore Case String s1 String s2 if s1 s2 return true if s2 null s1 length s2 length return false char c Array1 s1 to Char Array char c Array2 s2 to Char Array int length s1 length char c1 c2 for int index 0 index length index c1 c Array1 index c2 c Array2 index if c1 c2 Character to Upper Case c1 Character to Upper Case c2 Character to Lower Case c1 Character to Lower Case c2 return false return true  equalsIgnoreCase cArray1 toCharArray cArray2 toCharArray cArray1 cArray2 toUpperCase toUpperCase toLowerCase toLowerCase

Returns the SWT version as an integer in the standard format em Mmmm em where em M em is the major version number and em mmm em is the minor version number return the version of the currently running SWT public static int get Version return MAJOR VERSION 1000 MINOR VERSION  getVersion MAJOR_VERSION MINOR_VERSION
Returns the SWT platform name return the platform name of the currently running SWT public static String get Platform return Platform PLATFORM  getPlatform
Returns the SWT revision number as an integer Revision changes occur as a result of non API breaking bug fixes return the revision number of the currently running SWT public static int get Revision return REVISION  getRevision
Loads the shared library that matches the version of the Java code which is currently running SWT shared libraries follow an encoding scheme where the major minor and revision numbers are embedded in the library name and this along with code name code is used to load the library If this fails code name code is used in another attempt to load the library this time ignoring the SWT version encoding scheme param name the name of the library to load public static void load Library String name  loadLibrary

Constructs a new instance of this class param source the object which fired the event public SWT Event Object Object source if source null this source source else throw new Illegal Argument Exception  SWTEventObject IllegalArgumentException
Answers the event source return the object which fired the event public Object get Source return source  getSource
Answers the string representation of this SWT Event Object return the string representation of this SWT Event Object public String to String return get Class get Name source String value Of source  SWTEventObject SWTEventObject toString getClass getName valueOf

Sent when an accessibility client requests the name of the control or the name of a child of the control The default behavior is to do nothing p Return the name of the control or specified child in the code result code field of the event object Returning an empty string tells the client that the control or child does not have a name and returning null tells the client to use the platform name p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li result OUT the requested name string or null li ul public void get Name Accessible Event e  getName AccessibleEvent
Sent when an accessibility client requests the help string of the control or the help string of a child of the control The default behavior is to do nothing p The information in this property should be similar to the help provided by tool Tip Text It describes what the control or child does or how to use it as opposed to get Description which describes appearance p p Return the help string of the control or specified child in the code result code field of the event object Returning an empty string tells the client that the control or child does not have a help string and returning null tells the client to use the platform help string p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li result OUT the requested help string or null li ul public void get Help Accessible Event e  toolTipText getDescription getHelp AccessibleEvent
Sent when an accessibility client requests the keyboard shortcut of the control or the keyboard shortcut of a child of the control The default behavior is to do nothing p A keyboard shortcut can either be a mnemonic or an accelerator As a general rule if the control or child can receive keyboard focus then you should expose its mnemonic and if it cannot receive keyboard focus then you should expose its accelerator p p Return the keyboard shortcut string of the control or specified child in the code result code field of the event object Returning an empty string tells the client that the control or child does not have a keyboard shortcut string and returning null tells the client to use the platform keyboard shortcut string p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li result OUT the requested keyboard shortcut string example ALT N or null li ul public void get Keyboard Shortcut Accessible Event e  getKeyboardShortcut AccessibleEvent
Sent when an accessibility client requests a description of the control or a description of a child of the control The default behavior is to do nothing p This is a textual description of the control or child s visual appearance which is typically only necessary if it cannot be determined from other properties such as role p p Return the description of the control or specified child in the code result code field of the event object Returning an empty string tells the client that the control or child does not have a description and returning null tells the client to use the platform description p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li result OUT the requested description string or null li ul public void get Description Accessible Event e  getDescription AccessibleEvent

Sent when an accessibility client requests the identifier of the control child at the specified display coordinates The default behavior is to do nothing p Return the identifier of the child at display point x y in the code childID code field of the event object Return CHILDID SELF if point x y is in the control itself and not in any child Return CHILDID NONE if point x y is not contained in either the control or any of its children p param e an event object containing the following fields ul li x y IN the specified point in display coordinates li li childID Typical OUT the ID of the child at point or CHILDID SELF or CHILDID NONE li li accessible Optional OUT the accessible object for the control or child may be returned instead of the childID li ul public void get Child At Point Accessible Control Event e  CHILDID_SELF CHILDID_NONE CHILDID_SELF CHILDID_NONE getChildAtPoint AccessibleControlEvent
Sent when an accessibility client requests the location of the control or the location of a child of the control The default behavior is to do nothing p Return a rectangle describing the location of the specified control or child in the code x y width and height code fields of the event object p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li x y width height OUT the control or child location in display coordinates li ul public void get Location Accessible Control Event e  getLocation AccessibleControlEvent
Sent when an accessibility client requests the accessible object for a child of the control The default behavior is to do nothing p Return an code Accessible code for the specified control or child in the code accessible code field of the event object Return null if the specified child does not have its own code Accessible code p param e an event object containing the following fields ul li childID IN an identifier specifying a child of the control li li accessible OUT an Accessible for the specified childID or null if one does not exist li ul public void get Child Accessible Control Event e  getChild AccessibleControlEvent
Sent when an accessibility client requests the number of children in the control The default behavior is to do nothing p Return the number of child items in the code detail code field of the event object p param e an event object containing the following fields ul li detail OUT the number of child items in this control li ul public void get Child Count Accessible Control Event e  getChildCount AccessibleControlEvent
Sent when an accessibility client requests the default action of the control or the default action of a child of the control The default behavior is to do nothing p This string is typically a verb describing what the user does to it For example a Push Button s default action is Press a Check Button s is Check or Un Check and List items have the default action Double Click p p Return a string describing the default action of the specified control or child in the code result code field of the event object Returning null tells the client to use the platform default action string p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li result OUT the requested default action string or null li ul public void get Default Action Accessible Control Event e  UnCheck getDefaultAction AccessibleControlEvent
Sent when an accessibility client requests the identity of the child or control that has keyboard focus The default behavior is to do nothing p Return the identifier of the child that has focus in the code childID code field of the event object Return CHILDID SELF if the control itself has keyboard focus Return CHILDID NONE if neither the control nor any of its children has focus p param e an event object containing the following fields ul li childID Typical OUT the ID of the child with focus or CHILDID SELF or CHILDID NONE li li accessible Optional OUT the accessible object for a child may be returned instead of its childID li ul public void get Focus Accessible Control Event e  CHILDID_SELF CHILDID_NONE CHILDID_SELF CHILDID_NONE getFocus AccessibleControlEvent
Sent when an accessibility client requests the role of the control or the role of a child of the control The default behavior is to do nothing p Return a role constant constant defined in ACC beginning with ROLE  that describes the role of the specified control or child in the code detail code field of the event object p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li detail OUT a role constant describing the role of the control or child li ul public void get Role Accessible Control Event e  ROLE_ getRole AccessibleControlEvent
Sent when an accessibility client requests the identity of the child or control that is currently selected The default behavior is to do nothing p Return the identifier of the selected child in the code childID code field of the event object Return CHILDID SELF if the control itself is selected Return CHILDID MULTIPLE if multiple children are selected and return an array of childI Ds in the code children code field Return CHILDID NONE if neither the control nor any of its children are selected p param e an event object containing the following fields ul li childID Typical OUT the ID of the selected child or CHILDID SELF or CHILDID MULTIPLE or CHILDID NONE li li accessible Optional OUT the accessible object for the control or child may be returned instead of the childID li ul public void get Selection Accessible Control Event e  CHILDID_SELF CHILDID_MULTIPLE childIDs CHILDID_NONE CHILDID_SELF CHILDID_MULTIPLE CHILDID_NONE getSelection AccessibleControlEvent
Sent when an accessibility client requests the state of the control or the state of a child of the control The default behavior is to do nothing p Return a state constant constant defined in ACC beginning with STATE  that describes the current state of the specified control or child in the code detail code field of the event object p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li detail OUT a state constant describing the current state of the control or child li ul public void get State Accessible Control Event e  STATE_ getState AccessibleControlEvent
Sent when an accessibility client requests the value of the control or the value of a child of the control The default behavior is to do nothing p Many controls do not return a value Examples of controls that do are Combo returns the text string Text returns its contents Progress Bar returns a string representing a percentage and Tree items return a string representing their level in the tree p p Return a string describing the value of the specified control or child in the code result code field of the event object Returning null tells the client to use the platform value string p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li result OUT the requested value string or null li ul public void get Value Accessible Control Event e  ProgressBar getValue AccessibleControlEvent
Sent when an accessibility client requests the children of the control The default behavior is to do nothing p Return the children as an array of childI Ds in the code children code field of the event object p param e an event object containing the following fields ul li children Typical OUT an array of childI Ds li li accessible Optional OUT an array of accessible objects for the children may be returned instead of the childI Ds li ul public void get Children Accessible Control Event e  childIDs childIDs childIDs getChildren AccessibleControlEvent

Constructs a new instance of this class param source the object that fired the event public Accessible Control Event Object source super source  AccessibleControlEvent
Returns a string containing a concise human readable description of the receiver return a string representation of the event public String to String return Accessible Control Event childID childID NON NLS 1 accessible accessible NON NLS 1 x x NON NLS 1 y y NON NLS 1 width width NON NLS 1 height height NON NLS 1 detail detail NON NLS 1 result result NON NLS 1 NON NLS 1  toString AccessibleControlEvent

Sent when an accessibility client requests the identifier of the control child at the specified display coordinates p Return the identifier of the child at display point x y in the code childID code field of the event object Return CHILDID SELF if point x y is in the control itself and not in any child Return CHILDID NONE if point x y is not contained in either the control or any of its children p param e an event object containing the following fields ul li x y IN the specified point in display coordinates li li childID Typical OUT the ID of the child at point or CHILDID SELF or CHILDID NONE li li accessible Optional OUT the accessible object for the control or child may be returned instead of the childID li ul  CHILDID_SELF CHILDID_NONE CHILDID_SELF CHILDID_NONE
Sent when an accessibility client requests the location of the control or the location of a child of the control p Return a rectangle describing the location of the specified control or child in the code x y width and height code fields of the event object p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li x y width height OUT the control or child location in display coordinates li ul 
Sent when an accessibility client requests the accessible object for a child of the control p Return an code Accessible code for the specified control or child in the code accessible code field of the event object Return null if the specified child does not have its own code Accessible code p param e an event object containing the following fields ul li childID IN an identifier specifying a child of the control li li accessible OUT an Accessible for the specified childID or null if one does not exist li ul 
Sent when an accessibility client requests the number of children in the control p Return the number of child items in the code detail code field of the event object p param e an event object containing the following fields ul li detail OUT the number of child items in this control li ul 
Sent when an accessibility client requests the default action of the control or the default action of a child of the control p This string is typically a verb describing what the user does to it For example a Push Button s default action is Press a Check Button s is Check or Un Check and List items have the default action Double Click p p Return a string describing the default action of the specified control or child in the code result code field of the event object Returning null tells the client to use the platform default action string p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li result OUT the requested default action string or null li ul  UnCheck
Sent when an accessibility client requests the identity of the child or control that has keyboard focus p Return the identifier of the child that has focus in the code childID code field of the event object Return CHILDID SELF if the control itself has keyboard focus Return CHILDID NONE if neither the control nor any of its children has focus p param e an event object containing the following fields ul li childID Typical OUT the ID of the child with focus or CHILDID SELF or CHILDID NONE li li accessible Optional OUT the accessible object for a child may be returned instead of its childID li ul  CHILDID_SELF CHILDID_NONE CHILDID_SELF CHILDID_NONE
Sent when an accessibility client requests the role of the control or the role of a child of the control p Return a role constant constant defined in ACC beginning with ROLE  that describes the role of the specified control or child in the code detail code field of the event object p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li detail OUT a role constant describing the role of the control or child li ul  ROLE_
Sent when an accessibility client requests the identity of the child or control that is currently selected p Return the identifier of the selected child in the code childID code field of the event object Return CHILDID SELF if the control itself is selected Return CHILDID MULTIPLE if multiple children are selected and return an array of childI Ds in the code children code field Return CHILDID NONE if neither the control nor any of its children are selected p param e an event object containing the following fields ul li childID Typical OUT the ID of the selected child or CHILDID SELF or CHILDID MULTIPLE or CHILDID NONE li li accessible Optional OUT the accessible object for the control or child may be returned instead of the childID li ul  CHILDID_SELF CHILDID_MULTIPLE childIDs CHILDID_NONE CHILDID_SELF CHILDID_MULTIPLE CHILDID_NONE
Sent when an accessibility client requests the state of the control or the state of a child of the control p Return a state constant constant defined in ACC beginning with STATE  that describes the current state of the specified control or child in the code detail code field of the event object p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li detail OUT a state constant describing the current state of the control or child li ul  STATE_
Sent when an accessibility client requests the value of the control or the value of a child of the control p Many controls do not return a value Examples of controls that do are Combo returns the text string Text returns its contents Progress Bar returns a string representing a percentage and Tree items return a string representing their level in the tree p p Return a string describing the value of the specified control or child in the code result code field of the event object Returning null tells the client to use the platform value string p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li result OUT the requested value string or null li ul  ProgressBar
Sent when an accessibility client requests the children of the control p Return the children as an array of childI Ds in the code children code field of the event object p param e an event object containing the following fields ul li children Typical OUT an array of childI Ds li li children Optional OUT an array of accessible objects for the children may be returned instead of the childI Ds li ul  childIDs childIDs childIDs

Constructs a new instance of this class param source the object that fired the event public Accessible Event Object source super source  AccessibleEvent
Returns a string containing a concise human readable description of the receiver return a string representation of the event public String to String return Accessible Event childID childID result result NON NLS 1 NON NLS 2 NON NLS 3  toString AccessibleEvent

Sent when an accessibility client requests the name of the control or the name of a child of the control p Return the name of the control or specified child in the code result code field of the event object Returning an empty string tells the client that the control or child does not have a name and returning null tells the client to use the platform name p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li result OUT the requested name string or null li ul 
Sent when an accessibility client requests the help string of the control or the help string of a child of the control p The information in this property should be similar to the help provided by tool Tip Text It describes what the control or child does or how to use it as opposed to get Description which describes appearance p p Return the help string of the control or specified child in the code result code field of the event object Returning an empty string tells the client that the control or child does not have a help string and returning null tells the client to use the platform help string p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li result OUT the requested help string or null li ul  toolTipText getDescription
Sent when an accessibility client requests the keyboard shortcut of the control or the keyboard shortcut of a child of the control p A keyboard shortcut can either be a mnemonic or an accelerator As a general rule if the control or child can receive keyboard focus then you should expose its mnemonic and if it cannot receive keyboard focus then you should expose its accelerator p p Return the keyboard shortcut string of the control or specified child in the code result code field of the event object Returning an empty string tells the client that the control or child does not have a keyboard shortcut string and returning null tells the client to use the platform keyboard shortcut string p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li result OUT the requested keyboard shortcut string example ALT N or null li ul 
Sent when an accessibility client requests a description of the control or a description of a child of the control p This is a textual description of the control or child s visual appearance which is typically only necessary if it cannot be determined from other properties such as role p p Return the description of the control or specified child in the code result code field of the event object Returning an empty string tells the client that the control or child does not have a description and returning null tells the client to use the platform description p param e an event object containing the following fields ul li childID IN an identifier specifying the control or one of its children li li result OUT the requested description string or null li ul 

Sent when an accessibility client requests the current character offset of the text caret The default behavior is to do nothing p Return the caret offset in the code offset code field of the event object p param e an event object containing the following fields ul li childID IN an identifier specifying a child of the control li li offset OUT the current offset of the text caret li ul public void get Caret Offset Accessible Text Event e  getCaretOffset AccessibleTextEvent
Sent when an accessibility client requests the range of the current text selection The default behavior is to do nothing p Return the selection start offset and non negative length in the code offset code and code length code fields of the event object p param e an event object containing the following fields ul li childID IN an identifier specifying a child of the control li li offset OUT the offset of the current text selection li li length OUT the length of the current text selection li ul public void get Selection Range Accessible Text Event e  getSelectionRange AccessibleTextEvent

Constructs a new instance of this class param source the object that fired the event public Accessible Text Event Object source super source  AccessibleTextEvent
Returns a string containing a concise human readable description of the receiver return a string representation of the event public String to String return Accessible Text Event childID childID NON NLS 1 offset offset NON NLS 1 length length NON NLS 1 NON NLS 1  toString AccessibleTextEvent

Sent when an accessibility client requests the current character offset of the text caret p Return the caret offset in the code offset code field of the event object p param e an event object containing the following fields ul li childID IN an identifier specifying a child of the control li li offset OUT the current offset of the text caret li ul 
Sent when an accessibility client requests the range of the current text selection p Return the selection start offset and non negative length in the code offset code and code length code fields of the event object p param e an event object containing the following fields ul li childID IN an identifier specifying a child of the control li li offset OUT the offset of the current text selection li li length OUT the length of the current text selection li ul 

This method is called when the window hosting a link Browser should be closed Application would typically close the link org eclipse swt widgets Shell that hosts the code Browser code The code Browser code is disposed after this notification p The following fields in the code Window Event code apply ul li in widget the code Browser code that is going to be disposed ul p param event the code Window Event code that specifies the code Browser code that is going to be disposed see org eclipse swt widgets Shell close since 3 0  WindowEvent WindowEvent

public abstract class Location Adapter implements Location Listener public void changing Location Event event  LocationAdapter LocationListener LocationEvent
public void changed Location Event event  LocationEvent

public boolean doit Location Event Widget w super w  LocationEvent

This method is called when the current location is about to be changed p p The following fields in the code Location Event code apply ul li in location the location to be loaded li in widget the code Browser code whose location is changing li in out doit can be set to code false code to prevent the location from being loaded ul param event the code Location Event code that specifies the location to be loaded by a code Browser code since 3 0  LocationEvent LocationEvent
This method is called when the current location is changed p p The following fields in the code Location Event code apply ul li in location the current location li in top code true code if the location opens in the top frame or code false code otherwise li in widget the code Browser code whose location has changed ul param event the code Location Event code that specifies the new location of a code Browser code since 3 0  LocationEvent LocationEvent

This method is called when a new window needs to be created p p The following fields in the code Window Event code apply ul li out browser the new code Browser code that will host the content of the new window If it is left code null code the navigation is cancelled and no new window is opened p li in widget the code Browser code that is requesting to open a new window ul param event the code Window Event code that needs to be passed a new code Browser code to handle the new window request since 3 0  WindowEvent WindowEvent

public abstract class Progress Adapter implements Progress Listener public void changed Progress Event event  ProgressAdapter ProgressListener ProgressEvent
public void completed Progress Event event  ProgressEvent

public int total Progress Event Widget w super w  ProgressEvent

This method is called when a progress is made during the loading of the current location p p The following fields in the code Progress Event code apply ul li in current the progress for the location currently being loaded li in total the maximum progress for the location currently being loaded li in widget the code Browser code whose current URL is being loaded ul param event the code Progress Event code related to the loading of the current location of a code Browser code since 3 0  ProgressEvent ProgressEvent
This method is called when the current location has been completely loaded p p The following fields in the code Progress Event code apply ul li in widget the code Browser code whose current URL has been loaded ul param event the code Progress Event code related to the code Browser code that has loaded its current URL since 3 0  ProgressEvent ProgressEvent

public String text Status Text Event Widget w super w  StatusTextEvent

This method is called when the status text is changed The status text is typically showed in the status bar of a browser application p p The following fields in the code Status Text Event code apply ul li in text the modified status text li in widget the code Browser code whose status text is changed ul param event the code Status Text Event code that contains the updated status description of a code Browser code since 3 0  StatusTextEvent StatusTextEvent

public String title Title Event Widget w super w  TitleEvent

This method is called when the title of the current document is available or has changed p p The following fields in the code Title Event code apply ul li in title the title of the current document li in widget the code Browser code whose current document s title is known or modified ul param event the code Title Event code that contains the title of the document currently displayed in a code Browser code since 3 0  TitleEvent TitleEvent

public abstract class Visibility Window Adapter implements Visibility Window Listener public void hide Window Event event  VisibilityWindowAdapter VisibilityWindowListener WindowEvent
public void show Window Event event  WindowEvent

This method is called when the window hosting a code Browser code is requested to be hidden Application would typically hide the link org eclipse swt widgets Shell that hosts the code Browser code p p The following fields in the code Window Event code apply ul li in widget the code Browser code that needs to be hidden ul param event the code Window Event code that specifies the code Browser code that needs to be hidden see org eclipse swt widgets Shell set Visible boolean since 3 0  WindowEvent WindowEvent setVisible
This method is called when the window hosting a code Browser code is requested to be displayed Application would typically set the location and the size of the link org eclipse swt widgets Shell that hosts the code Browser code if a particular location and size are specified The application would then open that code Shell code p p The following fields in the code Window Event code apply ul li in widget the code Browser code to display li in location the requested location for the code Shell code hosting the browser It is code null code if no location is set li in size the requested size for the code Browser code The client area of the code Shell code hosting the code Browser code should be large enough to accomodate that size It is code null code if no size is set ul param event the code Window Event code that specifies the code Browser code that needs to be displayed see org eclipse swt widgets Control set Location org eclipse swt graphics Point see org eclipse swt widgets Control set Size org eclipse swt graphics Point see org eclipse swt widgets Shell open since 3 0  WindowEvent WindowEvent setLocation setSize

public Point size Window Event Widget w super w  WindowEvent

add Control Listener new Control Adapter public void control Resized Control Event e redraw  addControlListener ControlAdapter controlResized ControlEvent
add Paint Listener new Paint Listener public void paint Control Paint Event e paint e  addPaintListener PaintListener paintControl PaintEvent
add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e stop  addDisposeListener DisposeListener widgetDisposed DisposeEvent
Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT VERTICAL see SWT HORIZONTAL see SWT BORDER see get Style public Animated Progress Composite parent int style super parent check Style style if style SWT VERTICAL 0 orientation SWT VERTICAL show Border style SWT BORDER 0 add Control Listener new Control Adapter public void control Resized Control Event e redraw add Paint Listener new Paint Listener public void paint Control Paint Event e paint e add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e stop  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle AnimatedProgress checkStyle showBorder addControlListener ControlAdapter controlResized ControlEvent addPaintListener PaintListener paintControl PaintEvent addDisposeListener DisposeListener widgetDisposed DisposeEvent
private static int check Style int style int mask SWT NONE return style mask  checkStyle
Stop the animation if it is not already stopped and reset the presentation to a blank appearance 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 synchronized void clear check Widget if active stop show Stripes false redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget showStripes
public Point compute Size int w Hint int h Hint boolean changed check Widget Point size null if orientation SWT HORIZONTAL size new Point DEFAULT WIDTH DEFAULT HEIGHT else size new Point DEFAULT HEIGHT DEFAULT WIDTH if w Hint SWT DEFAULT size x w Hint if h Hint SWT DEFAULT size y h Hint return size  computeSize wHint hHint checkWidget DEFAULT_WIDTH DEFAULT_HEIGHT DEFAULT_HEIGHT DEFAULT_WIDTH wHint wHint hHint hHint
private void draw Bevel Rect GC gc int x int y int w int h Color topleft Color bottomright gc set Foreground topleft gc draw Line x y x w 1 y gc draw Line x y x y h 1 gc set Foreground bottomright gc draw Line x w y x w y h gc draw Line x y h x w y h  drawBevelRect setForeground drawLine drawLine setForeground drawLine drawLine
void paint Paint Event event GC gc event gc Display disp get Display Rectangle rect get Client Area gc fill Rectangle rect if show Border draw Bevel Rect gc rect x rect y rect width 1 rect height 1 disp get System Color SWT COLOR WIDGET NORMAL SHADOW disp get System Color SWT COLOR WIDGET HIGHLIGHT SHADOW paint Stripes gc  PaintEvent getDisplay getClientArea fillRectangle showBorder drawBevelRect getSystemColor COLOR_WIDGET_NORMAL_SHADOW getSystemColor COLOR_WIDGET_HIGHLIGHT_SHADOW paintStripes
void paint Stripes GC gc if show Stripes return Rectangle rect get Client Area Subtracted border painted by paint rect new Rectangle rect x 2 rect y 2 rect width 4 rect height 4 gc set Line Width 2 gc set Clipping rect Color color get Display get System Color SWT COLOR LIST SELECTION gc set Background color gc fill Rectangle rect gc set Foreground this get Background int step 12 int foreground Value value 0 step 2 value 2 if orientation SWT HORIZONTAL int y rect y 1 int w rect width int h rect height 2 for int i 0 i w i step int x i foreground Value gc draw Line x y x h else int x rect x 1 int w rect width 2 int h rect height for int i 0 i h i step int y i foreground Value gc draw Line x y w y if active value value 2 step  paintStripes showStripes getClientArea setLineWidth setClipping getDisplay getSystemColor COLOR_LIST_SELECTION setBackground fillRectangle setForeground getBackground foregroundValue foregroundValue drawLine foregroundValue drawLine
timer 0 new Runnable public void run if active return GC gc new GC Animated Progress this paint Stripes gc gc dispose display timer Exec SLEEP timer 0  AnimatedProgress paintStripes timerExec
Start the animation 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 synchronized void start check Widget if active return active true show Stripes true final Display display get Display final Runnable timer new Runnable 1 timer 0 new Runnable public void run if active return GC gc new GC Animated Progress this paint Stripes gc gc dispose display timer Exec SLEEP timer 0 display timer Exec SLEEP timer 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget showStripes getDisplay AnimatedProgress paintStripes timerExec timerExec
Stop the animation Freeze the presentation at its current appearance public synchronized void stop check Widget active false  checkWidget

Bidi Segment Event Styled Text Event e super e line Offset e detail line Text e text  BidiSegmentEvent StyledTextEvent lineOffset lineText

This method is called when a line needs to be reordered for measuring or rendering in a bidi locale p param event line Offset line start offset input param event line Text line text input param event segments text segments that should be reordered separately output see Bidi Segment Event  lineOffset lineText BidiSegmentEvent

Runs the given code Runnable code while providing busy feedback using this busy indicator param display the display on which the busy feedback should be displayed If the display is null the Display for the current thread will be used If there is no Display for the current thread the runnable code will be executed and no busy feedback will be displayed param runnable the runnable for which busy feedback is to be shown Must not be null exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the runnable is null li ul see show While public static void show While Display display Runnable runnable if runnable null SWT error SWT ERROR NULL ARGUMENT if display null display Display get Current if display null runnable run return Integer busy Id new Integer next Busy Id next Busy Id Cursor cursor display get System Cursor SWT CURSOR WAIT Shell shells display get Shells for int i 0 i shells length i Integer id Integer shells i get Data BUSYID NAME if id null shells i set Cursor cursor shells i set Data BUSYID NAME busy Id try runnable run finally shells display get Shells for int i 0 i shells length i Integer id Integer shells i get Data BUSYID NAME if id busy Id shells i set Cursor null shells i set Data BUSYID NAME null  IllegalArgumentException ERROR_NULL_ARGUMENT showWhile showWhile ERROR_NULL_ARGUMENT getCurrent busyId nextBusyId nextBusyId getSystemCursor CURSOR_WAIT getShells getData BUSYID_NAME setCursor setData BUSYID_NAME busyId getShells getData BUSYID_NAME busyId setCursor setData BUSYID_NAME

Listener listener new Listener public void handle Event Event e switch e type case SWT Dispose on Dispose break case SWT Mouse Down on Mouse Down e x e y break case SWT Mouse Exit on Mouse Exit break case SWT Mouse Move on Mouse Move e x e y break case SWT Mouse Up on Mouse Up break case SWT Paint on Paint e gc break case SWT Resize on Resize break  handleEvent onDispose MouseDown onMouseDown MouseExit onMouseExit MouseMove onMouseMove MouseUp onMouseUp onPaint onResize
Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul public C Banner Composite parent int style super parent check Style style resize Cursor new Cursor get Display SWT CURSOR SIZEWE Listener listener new Listener public void handle Event Event e switch e type case SWT Dispose on Dispose break case SWT Mouse Down on Mouse Down e x e y break case SWT Mouse Exit on Mouse Exit break case SWT Mouse Move on Mouse Move e x e y break case SWT Mouse Up on Mouse Up break case SWT Paint on Paint e gc break case SWT Resize on Resize break int events new int SWT Dispose SWT Mouse Down SWT Mouse Exit SWT Mouse Move SWT Mouse Up SWT Paint SWT Resize for int i 0 i events length i add Listener events i listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS CBanner checkStyle resizeCursor getDisplay CURSOR_SIZEWE handleEvent onDispose MouseDown onMouseDown MouseExit onMouseExit MouseMove onMouseMove MouseUp onMouseUp onPaint onResize MouseDown MouseExit MouseMove MouseUp addListener
static int bezier int x0 int y0 int x1 int y1 int x2 int y2 int x3 int y3 int count The parametric equations for a Bezier curve for x t and y t where 0 t 1 are x t x0 3 x1 x0 t 3 x0 x2 2x1 t 3 x3 x0 3x1 3x2 t 3 y t y0 3 y1 y0 t 3 y0 y2 2y1 t 2 y3 y0 3y1 3y2 t 3 double a0 x0 double a1 3 x1 x0 double a2 3 x0 x2 2 x1 double a3 x3 x0 3 x1 3 x2 double b0 y0 double b1 3 y1 y0 double b2 3 y0 y2 2 y1 double b3 y3 y0 3 y1 3 y2 int polygon new int 2 count 2 for int i 0 i count i double t double i double count polygon 2 i int a0 a1 t a2 t t a3 t t t polygon 2 i 1 int b0 b1 t b2 t t b3 t t t return polygon 
return polygon static int check Style int style return SWT NONE  checkStyle
public Point compute Size int w Hint int h Hint boolean changed check Widget boolean show Curve left null right null int height h Hint int width w Hint Point bottom Size new Point 0 0 if bottom null Point trim bottom compute Size width SWT DEFAULT trim x trim x width bottom Size bottom compute Size width SWT DEFAULT SWT DEFAULT width trim x SWT DEFAULT if height SWT DEFAULT bottom Size y Math min bottom Size y height height bottom Size y BORDER TOP BORDER STRIPE BORDER BOTTOM if show Curve height SWT DEFAULT height BORDER TOP BORDER BOTTOM 2 BORDER STRIPE Point right Size new Point 0 0 if right null Point trim right compute Size right Width height trim x trim x right Width right Size right compute Size right Width SWT DEFAULT SWT DEFAULT right Width trim x right Width SWT DEFAULT SWT DEFAULT height if width SWT DEFAULT right Size x Math min right Size x width width right Size x curve width 2 curve indent width Math max width MIN LEFT Point left Size new Point 0 0 if left null Point trim left compute Size width SWT DEFAULT trim x trim x width left Size left compute Size width SWT DEFAULT SWT DEFAULT width trim x SWT DEFAULT int w 0 h 0 h bottom Size y if bottom null left null right null h BORDER TOP BORDER BOTTOM BORDER STRIPE w left Size x right Size x if show Curve w curve width 2 curve indent h BORDER TOP BORDER BOTTOM 2 BORDER STRIPE h left null left Size y right Size y if w Hint SWT DEFAULT w w Hint if h Hint SWT DEFAULT h h Hint return new Point w h  computeSize wHint hHint checkWidget showCurve hHint wHint bottomSize computeSize bottomSize computeSize bottomSize bottomSize bottomSize BORDER_TOP BORDER_STRIPE BORDER_BOTTOM showCurve BORDER_TOP BORDER_BOTTOM BORDER_STRIPE rightSize computeSize rightWidth rightWidth rightSize computeSize rightWidth rightWidth rightWidth rightSize rightSize rightSize curve_width curve_indent MIN_LEFT leftSize computeSize leftSize computeSize bottomSize BORDER_TOP BORDER_BOTTOM BORDER_STRIPE leftSize rightSize showCurve curve_width curve_indent BORDER_TOP BORDER_BOTTOM BORDER_STRIPE leftSize rightSize wHint wHint hHint hHint
return new Point w h public Rectangle compute Trim int x int y int width int height check Widget return new Rectangle x y width height  computeTrim checkWidget
Returns the Control that appears on the bottom side of the banner return the control that appears on the bottom side of the banner or null 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 since 3 0 public Control get Bottom check Widget return bottom  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBottom checkWidget
return bottom public Rectangle get Client Area return new Rectangle 0 0 0 0  getClientArea
Returns the Control that appears on the left side of the banner return the control that appears on the left side of the banner or null 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 since 3 0 public Control get Left check Widget return left  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getLeft checkWidget
Returns the Control that appears on the right side of the banner return the control that appears on the right side of the banner or null 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 since 3 0 public Control get Right check Widget return right  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getRight checkWidget
Returns the width of the control that appears on the right of the banner return the width of the control that appears on the right of the banner since 3 0 public int get Right Width check Widget if right null return 0 if right Width SWT DEFAULT return right compute Size SWT DEFAULT get Size y x return right Width  getRightWidth checkWidget rightWidth computeSize getSize rightWidth
Returns code true code if the C Banner is rendered with a simple traditional shape return code true code if the Cbanner is rendered with a simple shape since 3 0 public boolean get Simple check Widget return simple  CBanner getSimple checkWidget
public void layout boolean changed check Widget Point size get Size boolean show Curve left null right null int width size x int height size y Point bottom Size new Point 0 0 if bottom null Point trim bottom compute Size width SWT DEFAULT trim x trim x width bottom Size bottom compute Size width trim x SWT DEFAULT bottom Size y Math min bottom Size y height height bottom Size y BORDER TOP BORDER BOTTOM BORDER STRIPE if show Curve height BORDER TOP BORDER BOTTOM 2 BORDER STRIPE height Math max 0 height Point right Size new Point 0 0 if right null Point trim right compute Size right Width height trim x trim x right Width right Size right compute Size right Width SWT DEFAULT SWT DEFAULT right Width trim x right Width SWT DEFAULT SWT DEFAULT height right Size x Math min right Size x width width right Size x curve width 2 curve indent width Math max width MIN LEFT Point left Size new Point 0 0 if left null Point trim left compute Size width SWT DEFAULT trim x trim x width left Size left compute Size width trim x SWT DEFAULT int x 0 int y 0 int old Start curve Start Rectangle left Rect null Rectangle right Rect null Rectangle bottom Rect null if bottom null bottom Rect new Rectangle x y size y bottom Size y bottom Size x bottom Size y if show Curve y BORDER TOP BORDER STRIPE if left null left Rect new Rectangle x y left Size x left Size y curve Start x left Size x curve indent x left Size x curve width 2 curve indent if right null right Rect new Rectangle x y right Size x right Size y if curve Start old Start redraw curve Start CURVE TAIL 0 old Start curve width curve Start CURVE TAIL 5 size y false if curve Start old Start redraw old Start CURVE TAIL 0 curve Start curve width old Start CURVE TAIL 5 size y false curve Rect new Rectangle curve Start 0 curve width size y update if bottom Rect null bottom set Bounds bottom Rect if right Rect null right set Bounds right Rect if left Rect null left set Bounds left Rect  checkWidget getSize showCurve bottomSize computeSize bottomSize computeSize bottomSize bottomSize bottomSize BORDER_TOP BORDER_BOTTOM BORDER_STRIPE showCurve BORDER_TOP BORDER_BOTTOM BORDER_STRIPE rightSize computeSize rightWidth rightWidth rightSize computeSize rightWidth rightWidth rightWidth rightSize rightSize rightSize curve_width curve_indent MIN_LEFT leftSize computeSize leftSize computeSize oldStart curveStart leftRect rightRect bottomRect bottomRect bottomSize bottomSize bottomSize showCurve BORDER_TOP BORDER_STRIPE leftRect leftSize leftSize curveStart leftSize curve_indent leftSize curve_width curve_indent rightRect rightSize rightSize curveStart oldStart curveStart CURVE_TAIL oldStart curve_width curveStart CURVE_TAIL curveStart oldStart oldStart CURVE_TAIL curveStart curve_width oldStart CURVE_TAIL curveRect curveStart curve_width bottomRect setBounds bottomRect rightRect setBounds rightRect leftRect setBounds leftRect
void on Dispose if resize Cursor null resize Cursor dispose resize Cursor null left null right null  onDispose resizeCursor resizeCursor resizeCursor
void on Mouse Down int x int y if curve Rect contains x y dragging true right Drag Displacement curve Start x curve width curve indent  onMouseDown curveRect rightDragDisplacement curveStart curve_width curve_indent
void on Mouse Exit if dragging set Cursor null  onMouseExit setCursor
void on Mouse Move int x int y if dragging Point size get Size if 0 x x size x return right Width size x x right Drag Displacement right Width Math max MIN RIGHT right Width layout return if curve Rect contains x y set Cursor resize Cursor else set Cursor null  onMouseMove getSize rightWidth rightDragDisplacement rightWidth MIN_RIGHT rightWidth curveRect setCursor resizeCursor setCursor
void on Mouse Up dragging false  onMouseUp
void on Paint GC gc Useful for debugging paint problems Point size get Size gc set Background get Display get System Color SWT COLOR GREEN gc fill Rectangle 10 10 size x 20 size y 20 Point size get Size Color border1 get Display get System Color BORDER1 if bottom null left null right null gc set Foreground border1 int y bottom get Bounds y BORDER BOTTOM BORDER STRIPE gc draw Line 0 y size x y if left null right null return int line1 new int curve length 6 int index 0 int x curve Start int y 0 line1 index x 1 line1 index size y BORDER STRIPE for int i 0 i curve length 2 i line1 index x curve 2 i line1 index y curve 2 i 1 line1 index x curve width line1 index 0 line1 index size x line1 index 0 Color background get Background if get Display get Depth 15 Anti aliasing int line2 new int line1 length index 0 for int i 0 i line1 length 2 i line2 index line1 index 1 line2 index line1 index int line3 new int line1 length index 0 for int i 0 i line1 length 2 i line3 index line1 index 1 line3 index line1 index RGB from border1 getRGB RGB to background getRGB int red from red 3 to red from red 4 int green from green 3 to green from green 4 int blue from blue 3 to blue from blue 4 Color color new Color get Display red green blue gc set Foreground color gc draw Polyline line2 gc draw Polyline line3 color dispose draw tail fading to background int x1 Math max 0 curve Start CURVE TAIL gc set Foreground background gc set Background border1 gc fill Gradient Rectangle x1 size y BORDER STRIPE curve Start x1 1 1 false else draw solid tail int x1 Math max 0 curve Start CURVE TAIL gc set Foreground border1 gc draw Line x1 size y BORDER STRIPE curve Start 1 size y BORDER STRIPE draw border gc set Foreground border1 gc draw Polyline line1  onPaint getSize setBackground getDisplay getSystemColor COLOR_GREEN fillRectangle getSize getDisplay getSystemColor setForeground getBounds BORDER_BOTTOM BORDER_STRIPE drawLine curveStart BORDER_STRIPE curve_width getBackground getDisplay getDepth getDisplay setForeground drawPolyline drawPolyline curveStart CURVE_TAIL setForeground setBackground fillGradientRectangle BORDER_STRIPE curveStart curveStart CURVE_TAIL setForeground drawLine BORDER_STRIPE curveStart BORDER_STRIPE setForeground drawPolyline
void on Resize update Curve get Size y layout  onResize updateCurve getSize
Set the control that appears on the bottom side of the banner The bottom control is optional Setting the bottom control to null will remove it from the banner however the creator of the control must dispose of the control param control the control to be displayed on the bottom or null 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 li ERROR INVALID ARGUMENT if the bottom control was not created as a child of the receiver li ul since 3 0 public void set Bottom Control control check Widget if control null control get Parent this SWT error SWT ERROR INVALID ARGUMENT if bottom null bottom is Disposed Point size bottom get Size bottom set Location OFFSCREEN size x OFFSCREEN size y bottom control layout  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT setBottom checkWidget getParent ERROR_INVALID_ARGUMENT isDisposed getSize setLocation
Sets the layout which is associated with the receiver to be the argument which may be null p Note C Banner does not use a layout class to size and position its children p param layout the receiver s new layout or null 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 set Layout Layout layout check Widget return  CBanner SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setLayout checkWidget
Set the control that appears on the left side of the banner The left control is optional Setting the left control to null will remove it from the banner however the creator of the control must dispose of the control param control the control to be displayed on the left or null 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 li ERROR INVALID ARGUMENT if the left control was not created as a child of the receiver li ul since 3 0 public void set Left Control control check Widget if control null control get Parent this SWT error SWT ERROR INVALID ARGUMENT if left null left is Disposed Point size left get Size left set Location OFFSCREEN size x OFFSCREEN size y left control layout  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT setLeft checkWidget getParent ERROR_INVALID_ARGUMENT isDisposed getSize setLocation
Set the control that appears on the right side of the banner The right control is optional Setting the right control to null will remove it from the banner however the creator of the control must dispose of the control param control the control to be displayed on the right or null 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 li ERROR INVALID ARGUMENT if the right control was not created as a child of the receiver li ul since 3 0 public void set Right Control control check Widget if control null control get Parent this SWT error SWT ERROR INVALID ARGUMENT if right null right is Disposed Point size right get Size right set Location OFFSCREEN size x OFFSCREEN size y right control layout  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT setRight checkWidget getParent ERROR_INVALID_ARGUMENT isDisposed getSize setLocation
Set the width of the control control that appears on the right side of the banner param width the width of the control on the right 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 since 3 0 public void set Right Width int width check Widget if width SWT DEFAULT SWT error SWT ERROR INVALID ARGUMENT right Width width layout true  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setRightWidth checkWidget ERROR_INVALID_ARGUMENT rightWidth
Sets the shape that the C Banner will use to render itself param simple code true code if the C Banner should render itself in a simple traditional style 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 since 3 0 public void set Simple boolean simple check Widget if this simple simple this simple simple if simple curve width 5 curve indent 2 else curve width 50 curve indent 5 update Curve get Size y layout redraw  CBanner CBanner SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSimple checkWidget curve_width curve_indent curve_width curve_indent updateCurve getSize
void update Curve int height int h height BORDER STRIPE if simple curve new int 0 h 1 h 2 h 1 3 h 2 3 2 4 1 5 0 else curve bezier 0 h 1 BEZIER LEFT h 1 curve width BEZIER RIGHT 0 curve width 0 curve width  updateCurve BORDER_STRIPE BEZIER_LEFT curve_width BEZIER_RIGHT curve_width curve_width

listener new Listener public void handle Event Event event if popup event widget popup Event event return if text event widget text Event event return if list event widget list Event event return if arrow event widget arrow Event event return if C Combo this event widget combo Event event return  handleEvent popupEvent textEvent listEvent arrowEvent CCombo comboEvent
Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT BORDER see SWT READ ONLY see SWT FLAT see Widget get Style public C Combo Composite parent int style super parent style check Style style int text Style SWT SINGLE if style SWT READ ONLY 0 text Style SWT READ ONLY if style SWT FLAT 0 text Style SWT FLAT text new Text this text Style int arrow Style SWT ARROW SWT DOWN if style SWT FLAT 0 arrow Style SWT FLAT arrow new Button this arrow Style listener new Listener public void handle Event Event event if popup event widget popup Event event return if text event widget text Event event return if list event widget list Event event return if arrow event widget arrow Event event return if C Combo this event widget combo Event event return int combo Events SWT Dispose SWT Move SWT Resize for int i 0 i combo Events length i this add Listener combo Events i listener int text Events SWT Key Down SWT Key Up SWT Modify SWT Mouse Down SWT Mouse Up SWT Traverse SWT Focus In SWT Focus Out for int i 0 i text Events length i text add Listener text Events i listener int arrow Events SWT Selection SWT Focus In SWT Focus Out for int i 0 i arrow Events length i arrow add Listener arrow Events i listener create Popup null 1 init Accessible  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS READ_ONLY getStyle CCombo checkStyle textStyle READ_ONLY textStyle READ_ONLY textStyle textStyle arrowStyle arrowStyle arrowStyle handleEvent popupEvent textEvent listEvent arrowEvent CCombo comboEvent comboEvents comboEvents addListener comboEvents textEvents KeyDown KeyUp MouseDown MouseUp FocusIn FocusOut textEvents addListener textEvents arrowEvents FocusIn FocusOut arrowEvents addListener arrowEvents createPopup initAccessible
init Accessible static int check Style int style int mask SWT BORDER SWT READ ONLY SWT FLAT SWT LEFT TO RIGHT SWT RIGHT TO LEFT return style mask  initAccessible checkStyle READ_ONLY LEFT_TO_RIGHT RIGHT_TO_LEFT
Adds an item p The item is placed at the end of the list Indexing is zero based param string the new item exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR NULL ARGUMENT when the string is null exception SWT Error ERROR ITEM NOT ADDED when the item cannot be added public void add String string check Widget if string null SWT error SWT ERROR NULL ARGUMENT list add string  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_NULL_ARGUMENT SWTError ERROR_ITEM_NOT_ADDED checkWidget ERROR_NULL_ARGUMENT
Adds an item at an index p The item is placed at an index in the list Indexing is zero based This operation will fail when the index is out of range param string the new item param index the index for the item exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR NULL ARGUMENT when the string is null exception SWT Error ERROR ITEM NOT ADDED when the item cannot be added public void add String string int index check Widget if string null SWT error SWT ERROR NULL ARGUMENT list add string index  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_NULL_ARGUMENT SWTError ERROR_ITEM_NOT_ADDED checkWidget ERROR_NULL_ARGUMENT
Adds the listener to receive events p param listener the listener exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR NULL ARGUMENT when listener is null public void add Modify Listener Modify Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Modify typed Listener  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_NULL_ARGUMENT addModifyListener ModifyListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener
Adds the listener to receive events p param listener the listener exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR NULL ARGUMENT when listener is null public void add Selection Listener Selection Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_NULL_ARGUMENT addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
event display async Exec new Runnable public void run if C Combo this is Disposed return Control focus Control get Display get Focus Control if focus Control arrow focus Control list focus Control text return has Focus false Event e new Event notify Listeners SWT Focus Out e  asyncExec CCombo isDisposed focusControl getDisplay getFocusControl focusControl focusControl focusControl hasFocus notifyListeners FocusOut
void arrow Event Event event switch event type case SWT Focus In if has Focus return has Focus true if get Editable text select All Event e new Event e time event time notify Listeners SWT Focus In e break case SWT Focus Out event display async Exec new Runnable public void run if C Combo this is Disposed return Control focus Control get Display get Focus Control if focus Control arrow focus Control list focus Control text return has Focus false Event e new Event notify Listeners SWT Focus Out e break case SWT Selection drop Down is Dropped break  arrowEvent FocusIn hasFocus hasFocus getEditable selectAll notifyListeners FocusIn FocusOut asyncExec CCombo isDisposed focusControl getDisplay getFocusControl focusControl focusControl focusControl hasFocus notifyListeners FocusOut dropDown isDropped
Clears the current selection p exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed public void clear Selection check Widget text clear Selection list deselect All  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED clearSelection checkWidget clearSelection deselectAll
void combo Event Event event switch event type case SWT Dispose if popup null popup is Disposed list remove Listener SWT Dispose listener popup dispose popup null text null list null arrow null break case SWT Move drop Down false break case SWT Resize internal Layout break  comboEvent isDisposed removeListener dropDown internalLayout
public Point compute Size int w Hint int h Hint boolean changed check Widget int width 0 height 0 Point text Size text compute Size w Hint SWT DEFAULT changed Point arrow Size arrow compute Size SWT DEFAULT SWT DEFAULT changed Point list Size list compute Size w Hint SWT DEFAULT changed int border Width get Border Width height Math max h Hint Math max text Size y arrow Size y 2 border Width width Math max w Hint Math max text Size x arrow Size x 2 border Width list Size x 2 return new Point width height  computeSize wHint hHint checkWidget textSize computeSize wHint arrowSize computeSize listSize computeSize wHint borderWidth getBorderWidth hHint textSize arrowSize borderWidth wHint textSize arrowSize borderWidth listSize
void create Popup String items int selection Index create shell and list popup new Shell get Shell SWT NO TRIM SWT ON TOP int style get Style int list Style SWT SINGLE SWT V SCROLL if style SWT FLAT 0 list Style SWT FLAT if style SWT RIGHT TO LEFT 0 list Style SWT RIGHT TO LEFT if style SWT LEFT TO RIGHT 0 list Style SWT LEFT TO RIGHT list new List popup list Style if font null list set Font font if foreground null list set Foreground foreground if background null list set Background background int popup Events SWT Close SWT Paint SWT Deactivate for int i 0 i popup Events length i popup add Listener popup Events i listener int list Events SWT Mouse Up SWT Selection SWT Traverse SWT Key Down SWT Key Up SWT Focus In SWT Focus Out SWT Dispose for int i 0 i list Events length i list add Listener list Events i listener if items null list set Items items if selection Index 1 list set Selection selection Index  createPopup selectionIndex getShell NO_TRIM ON_TOP getStyle listStyle V_SCROLL listStyle RIGHT_TO_LEFT listStyle RIGHT_TO_LEFT LEFT_TO_RIGHT listStyle LEFT_TO_RIGHT listStyle setFont setForeground setBackground popupEvents popupEvents addListener popupEvents listEvents MouseUp KeyDown KeyUp FocusIn FocusOut listEvents addListener listEvents setItems selectionIndex setSelection selectionIndex
Deselects an item p If the item at an index is selected it is deselected If the item at an index is not selected it remains deselected Indices that are out of range are ignored Indexing is zero based param index the index of the item exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed public void deselect int index check Widget list deselect index  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED checkWidget
Deselects all items p If an item is selected it is deselected If an item is not selected it remains unselected exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed public void deselect All check Widget list deselect All  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED deselectAll checkWidget deselectAll
void drop Down boolean drop if drop is Dropped return if drop popup set Visible false text set Focus return if get Shell popup get Parent String items list get Items int selection Index list get Selection Index list remove Listener SWT Dispose listener popup dispose popup null list null create Popup items selection Index Point size get Size int item Count list get Item Count item Count item Count 0 visible Item Count Math min visible Item Count item Count int item Height list get Item Height item Count Point list Size list compute Size SWT DEFAULT item Height list set Bounds 1 1 Math max size x 2 list Size x list Size y int index list get Selection Index if index 1 list set Top Index index Display display get Display Rectangle list Rect list get Bounds Rectangle parent Rect display map get Parent null get Bounds Point combo Size get Size Rectangle display Rect get Monitor get Client Area int width Math max combo Size x list Rect width 2 int height list Rect height 2 int x parent Rect x int y parent Rect y combo Size y if y height display Rect y display Rect height y parent Rect y height popup set Bounds x y width height popup set Visible true list set Focus  dropDown isDropped setVisible setFocus getShell getParent getItems selectionIndex getSelectionIndex removeListener createPopup selectionIndex getSize itemCount getItemCount itemCount itemCount visibleItemCount visibleItemCount itemCount itemHeight getItemHeight itemCount listSize computeSize itemHeight setBounds listSize listSize getSelectionIndex setTopIndex getDisplay listRect getBounds parentRect getParent getBounds comboSize getSize displayRect getMonitor getClientArea comboSize listRect listRect parentRect parentRect comboSize displayRect displayRect parentRect setBounds setVisible setFocus
list set Focus public Control get Children check Widget return new Control 0  setFocus getChildren checkWidget
Gets the editable state return true if the contents can be edited 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 since 3 0 public boolean get Editable check Widget return text get Editable  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getEditable checkWidget getEditable
Gets an item at an index p Indexing is zero based This operation will fail when the index is out of range or an item could not be queried from the OS param index the index of the item return the item exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR CANNOT GET ITEM when the operation fails public String get Item int index check Widget return list get Item index  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_CANNOT_GET_ITEM getItem checkWidget getItem
Gets the number of items p This operation will fail if the number of items could not be queried from the OS return the number of items in the widget exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR CANNOT GET COUNT when the operation fails public int get Item Count check Widget return list get Item Count  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_CANNOT_GET_COUNT getItemCount checkWidget getItemCount
Gets the height of one item p This operation will fail if the height of one item could not be queried from the OS return the height of one item in the widget exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR CANNOT GET ITEM HEIGHT when the operation fails public int get Item Height check Widget return list get Item Height  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_CANNOT_GET_ITEM_HEIGHT getItemHeight checkWidget getItemHeight
Gets the items p This operation will fail if the items cannot be queried from the OS return the items in the widget exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR CANNOT GET ITEM when the operation fails public String get Items check Widget return list get Items  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_CANNOT_GET_ITEM getItems checkWidget getItems
Gets the selection p return a point representing the selection start and end exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed public Point get Selection check Widget return text get Selection  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED getSelection checkWidget getSelection
Gets the index of the selected item p Indexing is zero based If no item is selected 1 is returned return the index of the selected item exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed public int get Selection Index check Widget return list get Selection Index  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED getSelectionIndex checkWidget getSelectionIndex
public int get Style int style super get Style style SWT READ ONLY if text get Editable style SWT READ ONLY return style  getStyle getStyle READ_ONLY getEditable READ_ONLY
Gets the widget text p If the widget has no text an empty string is returned return the widget text exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed public String get Text check Widget return text get Text  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED getText checkWidget getText
Gets the height of the combo s text field p The operation will fail if the height cannot be queried from the OS return the height of the combo s text field exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR ERROR CANNOT GET ITEM HEIGHT when the operation fails public int get Text Height check Widget return text get Line Height  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_ERROR_CANNOT_GET_ITEM_HEIGHT getTextHeight checkWidget getLineHeight
Gets the text limit p return the text limit exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed public int get Text Limit check Widget return text get Text Limit  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED getTextLimit checkWidget getTextLimit
Gets the number of items that are visible in the drop down portion of the receiver s list return the number of items that are visible 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 since 3 0 public int get Visible Item Count check Widget return visible Item Count  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getVisibleItemCount checkWidget visibleItemCount
Gets the index of an item p The list is searched starting at 0 until an item is found that is equal to the search item If no item is found 1 is returned Indexing is zero based param string the search item return the index of the item exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR NULL ARGUMENT when string is null public int index Of String string check Widget if string null SWT error SWT ERROR NULL ARGUMENT return list index Of string  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_NULL_ARGUMENT indexOf checkWidget ERROR_NULL_ARGUMENT indexOf
Gets the index of an item p The widget is searched starting at start including the end position until an item is found that is equal to the search itenm If no item is found 1 is returned Indexing is zero based param string the search item param start the starting position return the index of the item exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR NULL ARGUMENT when string is null public int index Of String string int start check Widget if string null SWT error SWT ERROR NULL ARGUMENT return list index Of string start  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_NULL_ARGUMENT indexOf checkWidget ERROR_NULL_ARGUMENT indexOf
void init Accessible get Accessible add Accessible Listener new Accessible Adapter public void get Help Accessible Event e e result get Tool Tip Text  initAccessible getAccessible addAccessibleListener AccessibleAdapter getHelp AccessibleEvent getToolTipText
get Accessible add Accessible Text Listener new Accessible Text Adapter public void get Caret Offset Accessible Text Event e e offset text get Caret Position  getAccessible addAccessibleTextListener AccessibleTextAdapter getCaretOffset AccessibleTextEvent getCaretPosition
get Accessible add Accessible Control Listener new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point test Point to Control new Point e x e y if get Bounds contains test Point e childID ACC CHILDID SELF  getAccessible addAccessibleControlListener AccessibleControlAdapter getChildAtPoint AccessibleControlEvent testPoint toControl getBounds testPoint CHILDID_SELF
public void get Location Accessible Control Event e Rectangle location get Bounds Point pt to Display new Point location x location y e x pt x e y pt y e width location width e height location height  getLocation AccessibleControlEvent getBounds toDisplay
public void get Child Count Accessible Control Event e e detail 0  getChildCount AccessibleControlEvent
public void get Role Accessible Control Event e e detail ACC ROLE COMBOBOX  getRole AccessibleControlEvent ROLE_COMBOBOX
public void get State Accessible Control Event e e detail ACC STATE NORMAL  getState AccessibleControlEvent STATE_NORMAL
public void get Value Accessible Control Event e e result get Text  getValue AccessibleControlEvent getText
void init Accessible get Accessible add Accessible Listener new Accessible Adapter public void get Help Accessible Event e e result get Tool Tip Text get Accessible add Accessible Text Listener new Accessible Text Adapter public void get Caret Offset Accessible Text Event e e offset text get Caret Position get Accessible add Accessible Control Listener new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point test Point to Control new Point e x e y if get Bounds contains test Point e childID ACC CHILDID SELF public void get Location Accessible Control Event e Rectangle location get Bounds Point pt to Display new Point location x location y e x pt x e y pt y e width location width e height location height public void get Child Count Accessible Control Event e e detail 0 public void get Role Accessible Control Event e e detail ACC ROLE COMBOBOX public void get State Accessible Control Event e e detail ACC STATE NORMAL public void get Value Accessible Control Event e e result get Text  initAccessible getAccessible addAccessibleListener AccessibleAdapter getHelp AccessibleEvent getToolTipText getAccessible addAccessibleTextListener AccessibleTextAdapter getCaretOffset AccessibleTextEvent getCaretPosition getAccessible addAccessibleControlListener AccessibleControlAdapter getChildAtPoint AccessibleControlEvent testPoint toControl getBounds testPoint CHILDID_SELF getLocation AccessibleControlEvent getBounds toDisplay getChildCount AccessibleControlEvent getRole AccessibleControlEvent ROLE_COMBOBOX getState AccessibleControlEvent STATE_NORMAL getValue AccessibleControlEvent getText
boolean is Dropped return popup get Visible  isDropped getVisible
public boolean is Focus Control check Widget if text is Focus Control arrow is Focus Control list is Focus Control popup is Focus Control return true return super is Focus Control  isFocusControl checkWidget isFocusControl isFocusControl isFocusControl isFocusControl isFocusControl
void internal Layout if is Dropped drop Down false Rectangle rect get Client Area int width rect width int height rect height Point arrow Size arrow compute Size SWT DEFAULT height text set Bounds 0 0 width arrow Size x height arrow set Bounds width arrow Size x 0 arrow Size x arrow Size y  internalLayout isDropped dropDown getClientArea arrowSize computeSize setBounds arrowSize setBounds arrowSize arrowSize arrowSize
event display async Exec new Runnable public void run if C Combo this is Disposed return Control focus Control get Display get Focus Control if focus Control arrow focus Control list focus Control text return has Focus false Event e new Event notify Listeners SWT Focus Out e  asyncExec CCombo isDisposed focusControl getDisplay getFocusControl focusControl focusControl focusControl hasFocus notifyListeners FocusOut
void list Event Event event switch event type case SWT Dispose if get Shell popup get Parent String items list get Items int selection Index list get Selection Index popup null list null create Popup items selection Index break case SWT Focus In if has Focus return has Focus true if get Editable text select All Event e new Event e time event time notify Listeners SWT Focus In e break case SWT Focus Out event display async Exec new Runnable public void run if C Combo this is Disposed return Control focus Control get Display get Focus Control if focus Control arrow focus Control list focus Control text return has Focus false Event e new Event notify Listeners SWT Focus Out e break case SWT Mouse Up if event button 1 return drop Down false break case SWT Selection int index list get Selection Index if index 1 return text set Text list get Item index text select All list set Selection index Event e new Event e time event time e state Mask event state Mask e doit event doit notify Listeners SWT Selection e event doit e doit break case SWT Traverse switch event detail case SWT TRAVERSE RETURN case SWT TRAVERSE ESCAPE case SWT TRAVERSE ARROW PREVIOUS case SWT TRAVERSE ARROW NEXT event doit false break Event e new Event e time event time e detail event detail e doit event doit e character event character e key Code event key Code notify Listeners SWT Traverse e event doit e doit event detail e detail break case SWT Key Up Event e new Event e time event time e character event character e key Code event key Code e state Mask event state Mask notify Listeners SWT Key Up e break case SWT Key Down if event character SWT ESC Escape key cancels popup list drop Down false if event state Mask SWT ALT 0 event key Code SWT ARROW UP event key Code SWT ARROW DOWN drop Down false if event character SWT CR Enter causes default selection drop Down false Event e new Event e time event time e state Mask event state Mask notify Listeners SWT Default Selection e At this point the widget may have been disposed If so do not continue if is Disposed break Event e new Event e time event time e character event character e key Code event key Code e state Mask event state Mask notify Listeners SWT Key Down e break  listEvent getShell getParent getItems selectionIndex getSelectionIndex createPopup selectionIndex FocusIn hasFocus hasFocus getEditable selectAll notifyListeners FocusIn FocusOut asyncExec CCombo isDisposed focusControl getDisplay getFocusControl focusControl focusControl focusControl hasFocus notifyListeners FocusOut MouseUp dropDown getSelectionIndex setText getItem selectAll setSelection stateMask stateMask notifyListeners TRAVERSE_RETURN TRAVERSE_ESCAPE TRAVERSE_ARROW_PREVIOUS TRAVERSE_ARROW_NEXT keyCode keyCode notifyListeners KeyUp keyCode keyCode stateMask stateMask notifyListeners KeyUp KeyDown dropDown stateMask keyCode ARROW_UP keyCode ARROW_DOWN dropDown dropDown stateMask stateMask notifyListeners DefaultSelection isDisposed keyCode keyCode stateMask stateMask notifyListeners KeyDown
void popup Event Event event switch event type case SWT Paint draw black rectangle around list Rectangle list Rect list get Bounds Color black get Display get System Color SWT COLOR BLACK event gc set Foreground black event gc draw Rectangle 0 0 list Rect width 1 list Rect height 1 break case SWT Close event doit false drop Down false break case SWT Deactivate drop Down false break  popupEvent listRect getBounds getDisplay getSystemColor COLOR_BLACK setForeground drawRectangle listRect listRect dropDown dropDown
public void redraw super redraw text redraw arrow redraw if popup is Visible list redraw  isVisible
if popup is Visible list redraw public void redraw int x int y int width int height boolean all super redraw x y width height true  isVisible
Removes an item at an index p Indexing is zero based This operation will fail when the index is out of range or an item could not be removed from the OS param index the index of the item exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR ITEM NOT REMOVED when the operation fails public void remove int index check Widget list remove index  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_ITEM_NOT_REMOVED checkWidget
Removes a range of items p Indexing is zero based The range of items is from the start index up to and including the end index This operation will fail when the index is out of range or an item could not be removed from the OS param start the start of the range param end the end of the range exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR ITEM NOT REMOVED when the operation fails public void remove int start int end check Widget list remove start end  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_ITEM_NOT_REMOVED checkWidget
Removes an item p This operation will fail when the item could not be removed from the OS param string the search item exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR NULL ARGUMENT when string is null exception SWT Error ERROR ITEM NOT REMOVED when the operation fails public void remove String string check Widget if string null SWT error SWT ERROR NULL ARGUMENT list remove string  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_NULL_ARGUMENT SWTError ERROR_ITEM_NOT_REMOVED checkWidget ERROR_NULL_ARGUMENT
Removes all items p exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed public void remove All check Widget text set Text NON NLS 1 list remove All  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED removeAll checkWidget setText removeAll
Removes the listener p param listener the listener exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR NULL ARGUMENT when listener is null public void remove Modify Listener Modify Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT remove Listener SWT Modify listener  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_NULL_ARGUMENT removeModifyListener ModifyListener checkWidget ERROR_NULL_ARGUMENT removeListener
Removes the listener p param listener the listener exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR NULL ARGUMENT when listener is null public void remove Selection Listener Selection Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT remove Listener SWT Selection listener remove Listener SWT Default Selection listener  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_NULL_ARGUMENT removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT removeListener removeListener DefaultSelection
Selects an item p If the item at an index is not selected it is selected Indices that are out of range are ignored Indexing is zero based param index the index of the item exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed public void select int index check Widget if index 1 list deselect All text set Text NON NLS 1 return if 0 index index list get Item Count if index get Selection Index text set Text list get Item index text select All list select index list show Selection  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED checkWidget deselectAll setText getItemCount getSelectionIndex setText getItem selectAll showSelection
public void set Background Color color super set Background color background color if text null text set Background color if list null list set Background color if arrow null arrow set Background color  setBackground setBackground setBackground setBackground setBackground
Sets the editable state param editable the new editable 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 since 3 0 public void set Editable boolean editable check Widget text set Editable editable  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setEditable checkWidget setEditable
public void set Enabled boolean enabled super set Enabled enabled if popup null popup set Visible false if text null text set Enabled enabled if arrow null arrow set Enabled enabled  setEnabled setEnabled setVisible setEnabled setEnabled
if arrow null arrow set Enabled enabled public boolean set Focus check Widget return text set Focus  setEnabled setFocus checkWidget setFocus
public void set Font Font font super set Font font this font font text set Font font list set Font font internal Layout  setFont setFont setFont setFont internalLayout
public void set Foreground Color color super set Foreground color foreground color if text null text set Foreground color if list null list set Foreground color if arrow null arrow set Foreground color  setForeground setForeground setForeground setForeground setForeground
Sets the text of an item indexing is zero based This operation will fail when the index is out of range or an item could not be changed in the OS param index the index for the item param string the item exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR NULL ARGUMENT when items is null exception SWT Error ERROR ITEM NOT MODIFIED when the operation fails public void set Item int index String string check Widget if string null SWT error SWT ERROR NULL ARGUMENT list set Item index string  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_NULL_ARGUMENT SWTError ERROR_ITEM_NOT_MODIFIED setItem checkWidget ERROR_NULL_ARGUMENT setItem
Sets all items param items the array of items exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR NULL ARGUMENT when items is null exception SWT Error ERROR ITEM NOT ADDED when the operation fails public void set Items String items check Widget if items null SWT error SWT ERROR NULL ARGUMENT if text get Editable text set Text NON NLS 1 list set Items items  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_NULL_ARGUMENT SWTError ERROR_ITEM_NOT_ADDED setItems checkWidget ERROR_NULL_ARGUMENT getEditable setText setItems
Sets the new selection param selection point representing the start and the end of the new selection exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR NULL ARGUMENT when selection is null public void set Selection Point selection check Widget if selection null SWT error SWT ERROR NULL ARGUMENT text set Selection selection x selection y  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_NULL_ARGUMENT setSelection checkWidget ERROR_NULL_ARGUMENT setSelection
Sets the widget text param string the widget text exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR NULL ARGUMENT when string is null public void set Text String string check Widget if string null SWT error SWT ERROR NULL ARGUMENT int index list index Of string if index 1 list deselect All text set Text string return text set Text string text select All list set Selection index list show Selection  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_NULL_ARGUMENT setText checkWidget ERROR_NULL_ARGUMENT indexOf deselectAll setText setText selectAll setSelection showSelection
Sets the text limit param limit new text limit exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed exception SWT Error ERROR CANNOT BE ZERO when limit is 0 public void set Text Limit int limit check Widget text set Text Limit limit  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED SWTError ERROR_CANNOT_BE_ZERO setTextLimit checkWidget setTextLimit
public void set Tool Tip Text String string check Widget super set Tool Tip Text string arrow set Tool Tip Text string text set Tool Tip Text string  setToolTipText checkWidget setToolTipText setToolTipText setToolTipText
public void set Visible boolean visible super set Visible visible if visible popup set Visible false  setVisible setVisible setVisible
Sets the number of items that are visible in the drop down portion of the receiver s list param count the new number of items to be visible 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 since 3 0 public void set Visible Item Count int count check Widget if count 0 return visible Item Count count  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setVisibleItemCount checkWidget visibleItemCount
event display async Exec new Runnable public void run if C Combo this is Disposed return Control focus Control get Display get Focus Control if focus Control arrow focus Control list focus Control text return has Focus false Event e new Event notify Listeners SWT Focus Out e  asyncExec CCombo isDisposed focusControl getDisplay getFocusControl focusControl focusControl focusControl hasFocus notifyListeners FocusOut
void text Event Event event switch event type case SWT Focus In if has Focus return has Focus true if get Editable text select All Event e new Event e time event time notify Listeners SWT Focus In e break case SWT Focus Out event display async Exec new Runnable public void run if C Combo this is Disposed return Control focus Control get Display get Focus Control if focus Control arrow focus Control list focus Control text return has Focus false Event e new Event notify Listeners SWT Focus Out e break case SWT Key Down if event character SWT CR drop Down false Event e new Event e time event time e state Mask event state Mask notify Listeners SWT Default Selection e At this point the widget may have been disposed If so do not continue if is Disposed break if event key Code SWT ARROW UP event key Code SWT ARROW DOWN if event state Mask SWT ALT 0 boolean dropped is Dropped text select All if dropped set Focus drop Down dropped break int old Index get Selection Index if event key Code SWT ARROW UP select Math max old Index 1 0 else select Math min old Index 1 get Item Count 1 if old Index get Selection Index Event e new Event e time event time e state Mask event state Mask notify Listeners SWT Selection e At this point the widget may have been disposed If so do not continue if is Disposed break Further work Need to add support for incremental search in pop up list as characters typed in text widget Event e new Event e time event time e character event character e key Code event key Code e state Mask event state Mask notify Listeners SWT Key Down e break case SWT Key Up Event e new Event e time event time e character event character e key Code event key Code e state Mask event state Mask notify Listeners SWT Key Up e break case SWT Modify list deselect All Event e new Event e time event time notify Listeners SWT Modify e break case SWT Mouse Down if event button 1 return if text get Editable return boolean dropped is Dropped text select All if dropped set Focus drop Down dropped break case SWT Mouse Up if event button 1 return if text get Editable return text select All break case SWT Traverse switch event detail case SWT TRAVERSE RETURN case SWT TRAVERSE ARROW PREVIOUS case SWT TRAVERSE ARROW NEXT The enter causes default selection and the arrow keys are used to manipulate the list contents so do not use them for traversal event doit false break Event e new Event e time event time e detail event detail e doit event doit e character event character e key Code event key Code notify Listeners SWT Traverse e event doit e doit event detail e detail break  textEvent FocusIn hasFocus hasFocus getEditable selectAll notifyListeners FocusIn FocusOut asyncExec CCombo isDisposed focusControl getDisplay getFocusControl focusControl focusControl focusControl hasFocus notifyListeners FocusOut KeyDown dropDown stateMask stateMask notifyListeners DefaultSelection isDisposed keyCode ARROW_UP keyCode ARROW_DOWN stateMask isDropped selectAll setFocus dropDown oldIndex getSelectionIndex keyCode ARROW_UP oldIndex oldIndex getItemCount oldIndex getSelectionIndex stateMask stateMask notifyListeners isDisposed keyCode keyCode stateMask stateMask notifyListeners KeyDown KeyUp keyCode keyCode stateMask stateMask notifyListeners KeyUp deselectAll notifyListeners MouseDown getEditable isDropped selectAll setFocus dropDown MouseUp getEditable selectAll TRAVERSE_RETURN TRAVERSE_ARROW_PREVIOUS TRAVERSE_ARROW_NEXT keyCode keyCode notifyListeners

add Paint Listener new Paint Listener public void paint Control Paint Event event on Paint event  addPaintListener PaintListener paintControl PaintEvent onPaint
add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event on Dispose event  addDisposeListener DisposeListener widgetDisposed DisposeEvent onDispose
Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT LEFT see SWT RIGHT see SWT CENTER see SWT SHADOW IN see SWT SHADOW OUT see SWT SHADOW NONE see get Style public C Label Composite parent int style super parent check Style style if style SWT CENTER 0 align SWT CENTER if style SWT RIGHT 0 align SWT RIGHT if style SWT LEFT 0 align SWT LEFT add Paint Listener new Paint Listener public void paint Control Paint Event event on Paint event add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event on Dispose event init Accessible  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS SHADOW_IN SHADOW_OUT SHADOW_NONE getStyle CLabel checkStyle addPaintListener PaintListener paintControl PaintEvent onPaint addDisposeListener DisposeListener widgetDisposed DisposeEvent onDispose initAccessible
Check the style bits to ensure that no invalid styles are applied private static int check Style int style if style SWT BORDER 0 style SWT SHADOW IN int mask SWT SHADOW IN SWT SHADOW OUT SWT SHADOW NONE SWT LEFT TO RIGHT SWT RIGHT TO LEFT style style mask style SWT NO FOCUS if style SWT CENTER SWT RIGHT 0 style SWT LEFT TEMPORARY CODE The default background on carbon and some GTK themes is not a solid color but a texture To show the correct default background we must allow the operating system to draw it and therefore we can not use the NO BACKGROUND style The NO BACKGROUND style is not required on platforms that use double buffering which is true in both of these cases String platform SWT get Platform if carbon equals platform gtk equals platform return style NON NLS 1 NON NLS 2 return style SWT NO BACKGROUND  checkStyle SHADOW_IN SHADOW_IN SHADOW_OUT SHADOW_NONE LEFT_TO_RIGHT RIGHT_TO_LEFT NO_FOCUS NO_BACKGROUND NO_BACKGROUND getPlatform NO_BACKGROUND
public Point compute Size int w Hint int h Hint boolean changed check Widget Point e get Total Size image text if w Hint SWT DEFAULT e x 2 h Indent else e x w Hint if h Hint SWT DEFAULT e y 2 v Indent else e y h Hint return e  computeSize wHint hHint checkWidget getTotalSize wHint hIndent wHint hHint vIndent hHint
Draw a rectangle in the given colors private void draw Bevel Rect GC gc int x int y int w int h Color topleft Color bottomright gc set Foreground bottomright gc draw Line x w y x w y h gc draw Line x y h x w y h gc set Foreground topleft gc draw Line x y x w 1 y gc draw Line x y x y h 1  drawBevelRect setForeground drawLine drawLine setForeground drawLine drawLine
Returns the alignment The alignment style LEFT CENTER or RIGHT is returned return SWT LEFT SWT RIGHT or SWT CENTER public int get Alignment check Widget return align  getAlignment checkWidget
Return the C Label s image or code null code return the image of the label or null public Image get Image check Widget return image  CLabel getImage checkWidget
Compute the minimum size private Point get Total Size Image image String text Point size new Point 0 0 if image null Rectangle r image get Bounds size x r width size y r height GC gc new GC this if text null text length 0 Point e gc text Extent text size x e x size y Math max size y e y if image null size x GAP else size y Math max size y gc get Font Metrics get Height gc dispose return size  getTotalSize getBounds textExtent getFontMetrics getHeight
return size public void set Tool Tip Text String string super set Tool Tip Text string app Tool Tip Text super get Tool Tip Text  setToolTipText setToolTipText appToolTipText getToolTipText
Return the Label s text return the text of the label or null public String get Text check Widget return text  getText checkWidget
return text public String get Tool Tip Text check Widget return app Tool Tip Text  getToolTipText checkWidget appToolTipText
Paint the Label s border private void paint Border GC gc Rectangle r Display disp get Display Color c1 null Color c2 null int style get Style if style SWT SHADOW IN 0 c1 disp get System Color SWT COLOR WIDGET NORMAL SHADOW c2 disp get System Color SWT COLOR WIDGET HIGHLIGHT SHADOW if style SWT SHADOW OUT 0 c1 disp get System Color SWT COLOR WIDGET LIGHT SHADOW c2 disp get System Color SWT COLOR WIDGET NORMAL SHADOW if c1 null c2 null gc set Line Width 1 draw Bevel Rect gc r x r y r width 1 r height 1 c1 c2  paintBorder getDisplay getStyle SHADOW_IN getSystemColor COLOR_WIDGET_NORMAL_SHADOW getSystemColor COLOR_WIDGET_HIGHLIGHT_SHADOW SHADOW_OUT getSystemColor COLOR_WIDGET_LIGHT_SHADOW getSystemColor COLOR_WIDGET_NORMAL_SHADOW setLineWidth drawBevelRect
Accessible accessible get Accessible accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e e result get Text  getAccessible addAccessibleListener AccessibleAdapter getName AccessibleEvent getText
public void get Help Accessible Event e e result get Tool Tip Text  getHelp AccessibleEvent getToolTipText
accessible add Accessible Control Listener new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point pt to Control new Point e x e y e childID get Bounds contains pt ACC CHILDID SELF ACC CHILDID NONE  addAccessibleControlListener AccessibleControlAdapter getChildAtPoint AccessibleControlEvent toControl getBounds CHILDID_SELF CHILDID_NONE
public void get Location Accessible Control Event e Rectangle location get Bounds Point pt to Display new Point location x location y e x pt x e y pt y e width location width e height location height  getLocation AccessibleControlEvent getBounds toDisplay
public void get Child Count Accessible Control Event e e detail 0  getChildCount AccessibleControlEvent
public void get Role Accessible Control Event e e detail ACC ROLE LABEL  getRole AccessibleControlEvent ROLE_LABEL
public void get State Accessible Control Event e e detail ACC STATE READONLY  getState AccessibleControlEvent STATE_READONLY
public void get Value Accessible Control Event e e result get Text  getValue AccessibleControlEvent getText
private void init Accessible Accessible accessible get Accessible accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e e result get Text public void get Help Accessible Event e e result get Tool Tip Text accessible add Accessible Control Listener new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point pt to Control new Point e x e y e childID get Bounds contains pt ACC CHILDID SELF ACC CHILDID NONE public void get Location Accessible Control Event e Rectangle location get Bounds Point pt to Display new Point location x location y e x pt x e y pt y e width location width e height location height public void get Child Count Accessible Control Event e e detail 0 public void get Role Accessible Control Event e e detail ACC ROLE LABEL public void get State Accessible Control Event e e detail ACC STATE READONLY public void get Value Accessible Control Event e e result get Text  initAccessible getAccessible addAccessibleListener AccessibleAdapter getName AccessibleEvent getText getHelp AccessibleEvent getToolTipText addAccessibleControlListener AccessibleControlAdapter getChildAtPoint AccessibleControlEvent toControl getBounds CHILDID_SELF CHILDID_NONE getLocation AccessibleControlEvent getBounds toDisplay getChildCount AccessibleControlEvent getRole AccessibleControlEvent ROLE_LABEL getState AccessibleControlEvent STATE_READONLY getValue AccessibleControlEvent getText
void on Dispose Dispose Event event gradient Colors null gradient Percents null background Image null text null image null app Tool Tip Text null  onDispose DisposeEvent gradientColors gradientPercents backgroundImage appToolTipText
void on Paint Paint Event event Rectangle rect get Client Area if rect width 0 rect height 0 return boolean shorten Text false String t text Image img image int available Width rect width 2 h Indent Point extent get Total Size img t if extent x available Width img null extent get Total Size img t if extent x available Width shorten Text true GC gc event gc shorten the text if shorten Text t shorten Text gc text available Width extent get Total Size img t if app Tool Tip Text null super set Tool Tip Text text else super set Tool Tip Text app Tool Tip Text determine horizontal position int x rect x h Indent if align SWT CENTER x rect width extent x 2 if align SWT RIGHT x rect width extent x h Indent draw a background image behind the text try if background Image null draw a background image behind the text Rectangle image Rect background Image get Bounds tile image to fill space gc set Background get Background gc fill Rectangle rect int x Pos 0 while x Pos rect width int y Pos 0 while y Pos rect height gc draw Image background Image x Pos y Pos y Pos image Rect height x Pos image Rect width else if gradient Colors null draw a gradient behind the text final Color old Background gc get Background if gradient Colors length 1 if gradient Colors 0 null gc set Background gradient Colors 0 gc fill Rectangle 0 0 rect width rect height else final Color old Foreground gc get Foreground Color last Color gradient Colors 0 if last Color null last Color old Background int pos 0 for int i 0 i gradient Percents length i gc set Foreground last Color last Color gradient Colors i 1 if last Color null last Color old Background gc set Background last Color if gradient Vertical final int gradient Height gradient Percents i rect height 100 pos gc fill Gradient Rectangle 0 pos rect width gradient Height true pos gradient Height else final int gradient Width gradient Percents i rect width 100 pos gc fill Gradient Rectangle pos 0 gradient Width rect height false pos gradient Width if gradient Vertical pos rect height gc set Background get Background gc fill Rectangle 0 pos rect width rect height pos if gradient Vertical pos rect width gc set Background get Background gc fill Rectangle pos 0 rect width pos rect height gc set Foreground old Foreground gc set Background old Background else if get Style SWT NO BACKGROUND 0 gc set Background get Background gc fill Rectangle rect catch SWT Exception e if get Style SWT NO BACKGROUND 0 gc set Background get Background gc fill Rectangle rect draw border int style get Style if style SWT SHADOW IN 0 style SWT SHADOW OUT 0 paint Border gc rect draw the image if img null Rectangle image Rect img get Bounds gc draw Image img 0 0 image Rect width image Rect height x rect height image Rect height 2 image Rect width image Rect height x image Rect width GAP draw the text if t null int text Height gc get Font Metrics get Height gc set Foreground get Foreground gc draw Text t x rect y rect height text Height 2 true  onPaint PaintEvent getClientArea shortenText availableWidth hIndent getTotalSize availableWidth getTotalSize availableWidth shortenText shortenText shortenText availableWidth getTotalSize appToolTipText setToolTipText setToolTipText appToolTipText hIndent hIndent backgroundImage imageRect backgroundImage getBounds setBackground getBackground fillRectangle xPos xPos yPos yPos drawImage backgroundImage xPos yPos yPos imageRect xPos imageRect gradientColors oldBackground getBackground gradientColors gradientColors setBackground gradientColors fillRectangle oldForeground getForeground lastColor gradientColors lastColor lastColor oldBackground gradientPercents setForeground lastColor lastColor gradientColors lastColor lastColor oldBackground setBackground lastColor gradientVertical gradientHeight gradientPercents fillGradientRectangle gradientHeight gradientHeight gradientWidth gradientPercents fillGradientRectangle gradientWidth gradientWidth gradientVertical setBackground getBackground fillRectangle gradientVertical setBackground getBackground fillRectangle setForeground oldForeground setBackground oldBackground getStyle NO_BACKGROUND setBackground getBackground fillRectangle SWTException getStyle NO_BACKGROUND setBackground getBackground fillRectangle getStyle SHADOW_IN SHADOW_OUT paintBorder imageRect getBounds drawImage imageRect imageRect imageRect imageRect imageRect imageRect textHeight getFontMetrics getHeight setForeground getForeground drawText textHeight
Set the alignment of the C Label Use the values LEFT CENTER and RIGHT to align image and text within the available space param align the alignment style of LEFT RIGHT or CENTER 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 li ERROR INVALID ARGUMENT if the value of align is not one of SWT LEFT SWT RIGHT or SWT CENTER li ul public void set Alignment int align check Widget if align SWT LEFT align SWT RIGHT align SWT CENTER SWT error SWT ERROR INVALID ARGUMENT if this align align this align align redraw  CLabel SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT setAlignment checkWidget ERROR_INVALID_ARGUMENT
public void set Background Color color super set Background color Are these settings the same as before if color null background Image null gradient Colors null gradient Percents null Color background get Background if color equals background return background Image null gradient Colors null gradient Percents null redraw  setBackground setBackground backgroundImage gradientColors gradientPercents getBackground backgroundImage gradientColors gradientPercents
Specify a gradient of colours to be drawn in the background of the C Label p For example to draw a gradient that varies from dark blue to blue and then to white and stays white for the right half of the label use the following call to set Background p pre clabel set Background new Color display get System Color SWT COLOR DARK BLUE display get System Color SWT COLOR BLUE display get System Color SWT COLOR WHITE display get System Color SWT COLOR WHITE new int 25 50 100 pre param colors an array of Color that specifies the colors to appear in the gradient in order of appearance from left to right The value code null code clears the background gradient the value code null code can be used inside the array of Color to specify the background color param percents an array of integers between 0 and 100 specifying the percent of the width of the widget at which the color should change the size of the percents array must be one less than the size of the colors array 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 li ERROR INVALID ARGUMENT if the values of colors and percents are not consistant li ul public void set Background Color colors int percents set Background colors percents false  CLabel setBackground setBackground getSystemColor COLOR_DARK_BLUE getSystemColor COLOR_BLUE getSystemColor COLOR_WHITE getSystemColor COLOR_WHITE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT setBackground setBackground
Specify a gradient of colours to be drawn in the background of the C Label p For example to draw a gradient that varies from dark blue to white in the vertical direction use the following call to set Background p pre clabel set Background new Color display get System Color SWT COLOR DARK BLUE display get System Color SWT COLOR WHITE new int 100 true pre param colors an array of Color that specifies the colors to appear in the gradient in order of appearance from left top to right bottom The value code null code clears the background gradient the value code null code can be used inside the array of Color to specify the background color param percents an array of integers between 0 and 100 specifying the percent of the width height of the widget at which the color should change the size of the percents array must be one less than the size of the colors array param vertical indicate the direction of the gradient True is vertical and false is horizontal 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 li ERROR INVALID ARGUMENT if the values of colors and percents are not consistant li ul since 3 0 public void set Background Color colors int percents boolean vertical check Widget if colors null if percents null percents length colors length 1 SWT error SWT ERROR INVALID ARGUMENT if get Display get Depth 15 Don t use gradients on low color displays colors new Color colors colors length 1 percents new int for int i 0 i percents length i if percents i 0 percents i 100 SWT error SWT ERROR INVALID ARGUMENT if i 0 percents i percents i 1 SWT error SWT ERROR INVALID ARGUMENT Are these settings the same as before final Color background get Background if background Image null if gradient Colors null colors null gradient Colors length colors length boolean same false for int i 0 i gradient Colors length i same gradient Colors i colors i gradient Colors i null colors i background gradient Colors i background colors i null if same break if same for int i 0 i gradient Percents length i same gradient Percents i percents i if same break if same this gradient Vertical vertical return else background Image null Store the new settings if colors null gradient Colors null gradient Percents null gradient Vertical false else gradient Colors new Color colors length for int i 0 i colors length i gradient Colors i colors i null colors i background gradient Percents new int percents length for int i 0 i percents length i gradient Percents i percents i gradient Vertical vertical Refresh with the new settings redraw  CLabel setBackground setBackground getSystemColor COLOR_DARK_BLUE getSystemColor COLOR_WHITE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT setBackground checkWidget ERROR_INVALID_ARGUMENT getDisplay getDepth ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT getBackground backgroundImage gradientColors gradientColors gradientColors gradientColors gradientColors gradientColors gradientPercents gradientPercents gradientVertical backgroundImage gradientColors gradientPercents gradientVertical gradientColors gradientColors gradientPercents gradientPercents gradientVertical
Set the image to be drawn in the background of the label param image the image to be drawn in the background 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 set Background Image image check Widget if image background Image return if image null gradient Colors null gradient Percents null background Image image redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setBackground checkWidget backgroundImage gradientColors gradientPercents backgroundImage
public void set Font Font font super set Font font redraw  setFont setFont
Set the label s Image The value code null code clears it param image the image to be displayed in the label or null 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 set Image Image image check Widget if image this image this image image redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setImage checkWidget
Set the label s text The value code null code clears it param text the text to be displayed in the label or null 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 set Text String text check Widget if text null text NON NLS 1 if text equals this text this text text redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setText checkWidget
Shorten the given text code t code so that its length doesn t exceed the given width The default implementation replaces characters in the center of the original string with an ellipsis Override if you need a different strategy protected String shorten Text GC gc String t int width if t null return null int w gc text Extent ELLIPSIS x int l t length int pivot l 2 int s pivot int e pivot 1 while s 0 e l String s1 t substring 0 s String s2 t substring e l int l1 gc text Extent s1 x int l2 gc text Extent s2 x if l1 w l2 width t s1 ELLIPSIS s2 break s e return t  shortenText textExtent textExtent textExtent

table Listener new Listener public void handle Event Event e resize  tableListener handleEvent
scrollbar Listener new Listener public void handle Event Event e scroll e  scrollbarListener handleEvent
private Listener scrollbar Listener Creates a Control Editor for the specified Composite param parent the Composite above which this editor will be displayed public Control Editor Composite parent this parent parent table Listener new Listener public void handle Event Event e resize parent add Listener SWT Resize table Listener scrollbar Listener new Listener public void handle Event Event e scroll e Scroll Bar h Bar parent get Horizontal Bar if h Bar null h Bar add Listener SWT Selection scrollbar Listener Scroll Bar v Bar parent get Vertical Bar if v Bar null v Bar add Listener SWT Selection scrollbar Listener  scrollbarListener ControlEditor ControlEditor tableListener handleEvent addListener tableListener scrollbarListener handleEvent ScrollBar hBar getHorizontalBar hBar hBar addListener scrollbarListener ScrollBar vBar getVerticalBar vBar vBar addListener scrollbarListener
Rectangle compute Bounds Rectangle client Area parent get Client Area Rectangle editor Rect new Rectangle client Area x client Area y minimum Width minimum Height if grab Horizontal editor Rect width Math max client Area width minimum Width if grab Vertical editor Rect height Math max client Area height minimum Height switch horizontal Alignment case SWT RIGHT editor Rect x client Area width editor Rect width break case SWT LEFT do nothing client Area x is the right answer break default default is CENTER editor Rect x client Area width editor Rect width 2 switch vertical Alignment case SWT BOTTOM editor Rect y client Area height editor Rect height break case SWT TOP do nothing client Area y is the right answer break default default is CENTER editor Rect y client Area height editor Rect height 2 return editor Rect  computeBounds clientArea getClientArea editorRect clientArea clientArea minimumWidth minimumHeight grabHorizontal editorRect clientArea minimumWidth grabVertical editorRect clientArea minimumHeight horizontalAlignment editorRect clientArea editorRect clientArea editorRect clientArea editorRect verticalAlignment editorRect clientArea editorRect clientArea editorRect clientArea editorRect editorRect
Removes all associations between the Editor and the underlying composite The composite and the editor Control are b not b disposed public void dispose if parent is Disposed parent remove Listener SWT Resize table Listener Scroll Bar h Bar parent get Horizontal Bar if h Bar null h Bar remove Listener SWT Selection scrollbar Listener Scroll Bar v Bar parent get Vertical Bar if v Bar null v Bar remove Listener SWT Selection scrollbar Listener parent null editor null had Focus false table Listener null scrollbar Listener null  isDisposed removeListener tableListener ScrollBar hBar getHorizontalBar hBar hBar removeListener scrollbarListener ScrollBar vBar getVerticalBar vBar vBar removeListener scrollbarListener hadFocus tableListener scrollbarListener
Returns the Control that is displayed above the composite being edited return the Control that is displayed above the composite being edited public Control get Editor return editor  getEditor
Lays out the control within the underlying composite This method should be called after changing one or more fields to force the Editor to resize since 2 1 public void layout resize 
void resize if editor null editor is Disposed return if editor get Visible had Focus editor is Focus Control this doesn t work because resizing the column takes the focus away before we get here editor set Bounds compute Bounds if had Focus if editor null editor is Disposed return editor set Focus  isDisposed getVisible hadFocus isFocusControl setBounds computeBounds hadFocus isDisposed setFocus
void scroll Event e if editor null editor is Disposed return editor set Bounds compute Bounds  isDisposed setBounds computeBounds
Specify the Control that is to be displayed p Note The Control provided as the editor b must b be created with its parent being the Composite specified in the Control Editor constructor param editor the Control that is displayed above the composite being edited public void set Editor Control editor if editor null this is the case where the caller is setting the editor to be blank set all the values accordingly this editor null return this editor editor resize if editor null editor is Disposed return editor set Visible true  ControlEditor setEditor isDisposed setVisible

Listener listener new Listener public void handle Event Event event switch event type case SWT Dispose on Dispose break case SWT Drag Detect on Drag Detect event break case SWT Focus In on Focus event break case SWT Focus Out on Focus event break case SWT Key Down on Key Down event break case SWT Mouse Double Click on Mouse Double Click event break case SWT Mouse Down on Mouse event break case SWT Mouse Exit on Mouse event break case SWT Mouse Hover on Mouse Hover event break case SWT Mouse Move on Mouse event break case SWT Mouse Up on Mouse event break case SWT Paint on Paint event break case SWT Resize on Resize break case SWT Traverse on Traverse event break  handleEvent onDispose DragDetect onDragDetect FocusIn onFocus FocusOut onFocus KeyDown onKeyDown MouseDoubleClick onMouseDoubleClick MouseDown onMouse MouseExit onMouse MouseHover onMouseHover MouseMove onMouse MouseUp onMouse onPaint onResize onTraverse
tool Tip Listener new Listener public void handle Event Event event switch event type case SWT Mouse Hover case SWT Mouse Move if update Tool Tip event x event y break FALL THROUGH case SWT Mouse Exit case SWT Mouse Down hide Tool Tip break  toolTipListener handleEvent MouseHover MouseMove updateToolTip MouseExit MouseDown hideToolTip
Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT TOP see SWT BOTTOM see SWT FLAT see SWT BORDER see SWT SINGLE see SWT MULTI see get Style public C Tab Folder Composite parent int style super parent check Style parent style int style2 super get Style old Font get Font on Bottom style2 SWT BOTTOM 0 show Close style2 SWT CLOSE 0 show Min style2 SWT MIN 0 conflicts with SWT TOP show Max style2 SWT MAX 0 conflicts with SWT BOTTOM single style2 SWT SINGLE 0 border Left border Right style SWT BORDER 0 1 0 border Top on Bottom border Left 0 border Bottom on Bottom 0 border Left highlight header style SWT FLAT 0 1 3 highlight margin style SWT FLAT 0 0 2 set up default colors Display display get Display selection Foreground display get System Color SELECTION FOREGROUND selection Background display get System Color SELECTION BACKGROUND border Color display get System Color BORDER1 COLOR init Accessible Add all listeners Listener listener new Listener public void handle Event Event event switch event type case SWT Dispose on Dispose break case SWT Drag Detect on Drag Detect event break case SWT Focus In on Focus event break case SWT Focus Out on Focus event break case SWT Key Down on Key Down event break case SWT Mouse Double Click on Mouse Double Click event break case SWT Mouse Down on Mouse event break case SWT Mouse Exit on Mouse event break case SWT Mouse Hover on Mouse Hover event break case SWT Mouse Move on Mouse event break case SWT Mouse Up on Mouse event break case SWT Paint on Paint event break case SWT Resize on Resize break case SWT Traverse on Traverse event break int folder Events new int SWT Dispose SWT Drag Detect SWT Focus In SWT Focus Out SWT Key Down SWT Mouse Double Click SWT Mouse Down SWT Mouse Exit SWT Mouse Hover SWT Mouse Move SWT Mouse Up SWT Paint SWT Resize SWT Traverse for int i 0 i folder Events length i add Listener folder Events i listener tool Tip Listener new Listener public void handle Event Event event switch event type case SWT Mouse Hover case SWT Mouse Move if update Tool Tip event x event y break FALL THROUGH case SWT Mouse Exit case SWT Mouse Down hide Tool Tip break  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle CTabFolder checkStyle getStyle oldFont getFont onBottom showClose showMin showMax borderLeft borderRight borderTop onBottom borderLeft borderBottom onBottom borderLeft highlight_header highlight_margin getDisplay selectionForeground getSystemColor SELECTION_FOREGROUND selectionBackground getSystemColor SELECTION_BACKGROUND borderColor getSystemColor BORDER1_COLOR initAccessible handleEvent onDispose DragDetect onDragDetect FocusIn onFocus FocusOut onFocus KeyDown onKeyDown MouseDoubleClick onMouseDoubleClick MouseDown onMouse MouseExit onMouse MouseHover onMouseHover MouseMove onMouse MouseUp onMouse onPaint onResize onTraverse folderEvents DragDetect FocusIn FocusOut KeyDown MouseDoubleClick MouseDown MouseExit MouseHover MouseMove MouseUp folderEvents addListener folderEvents toolTipListener handleEvent MouseHover MouseMove updateToolTip MouseExit MouseDown hideToolTip
static int check Style Composite parent int style int mask SWT CLOSE SWT TOP SWT BOTTOM SWT FLAT SWT LEFT TO RIGHT SWT RIGHT TO LEFT SWT SINGLE SWT MULTI style style mask TOP and BOTTOM are mutually exlusive TOP is the default if style SWT TOP 0 style style SWT TOP SWT BOTTOM SWT TOP SINGLE and MULTI are mutually exlusive MULTI is the default if style SWT MULTI 0 style style SWT SINGLE SWT MULTI SWT MULTI reduce the flash by not redrawing the entire area on a Resize event style SWT NO REDRAW RESIZE TEMPORARY CODE The default background on carbon and some GTK themes is not a solid color but a texture To show the correct default background we must allow the operating system to draw it and therefore we can not use the NO BACKGROUND style The NO BACKGROUND style is not required on platforms that use double buffering which is true in both of these cases String platform SWT get Platform if carbon equals platform gtk equals platform return style NON NLS 1 NON NLS 2 TEMPORARY CODE In Right To Left orientation on Windows all GC calls that use a brush are drawing offset by one pixel This results in some parts of the C Tab Folder not drawing correctly To alleviate some of the appearance problems allow the OS to draw the background This does not draw correctly but the result is less obviously wrong if style SWT RIGHT TO LEFT 0 return style if parent get Style SWT MIRRORED 0 style SWT LEFT TO RIGHT 0 return style return style SWT NO BACKGROUND  checkStyle LEFT_TO_RIGHT RIGHT_TO_LEFT NO_REDRAW_RESIZE NO_BACKGROUND NO_BACKGROUND getPlatform CTabFolder RIGHT_TO_LEFT getStyle LEFT_TO_RIGHT NO_BACKGROUND
static void fill Region GC gc Region region NOTE region passed in to this function will be modified Region clipping new Region gc get Clipping clipping region intersect clipping gc set Clipping region gc fill Rectangle region get Bounds gc set Clipping clipping clipping dispose  fillRegion getClipping setClipping fillRectangle getBounds setClipping
Adds the listener to the collection of listeners who will be notified when a tab item is closed minimized maximized restored or to show the list of items that are not currently visible param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 C Tab Folder2 Listener see removeC Tab Folder2 Listener C Tab Folder2 Listener since 3 0 public void addC Tab Folder2 Listener C Tab Folder2 Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT add to array C Tab Folder2 Listener new Listeners new C Tab Folder2 Listener folder Listeners length 1 System arraycopy folder Listeners 0 new Listeners 0 folder Listeners length folder Listeners new Listeners folder Listeners folder Listeners length 1 listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED CTabFolder2Listener removeCTabFolder2Listener CTabFolder2Listener addCTabFolder2Listener CTabFolder2Listener checkWidget ERROR_NULL_ARGUMENT CTabFolder2Listener newListeners CTabFolder2Listener folderListeners folderListeners newListeners folderListeners folderListeners newListeners folderListeners folderListeners
Adds the listener to the collection of listeners who will be notified when a tab item is closed param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 C Tab Folder Listener see removeC Tab Folder Listener C Tab Folder Listener deprecated use addC Tab Folder2 Listener C Tab Folder2 Listener public void addC Tab Folder Listener C Tab Folder Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT add to array C Tab Folder Listener new Tab Listeners new C Tab Folder Listener tab Listeners length 1 System arraycopy tab Listeners 0 new Tab Listeners 0 tab Listeners length tab Listeners new Tab Listeners tab Listeners tab Listeners length 1 listener display close button to be backwards compatible if show Close show Close true update Items redraw  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED CTabFolderListener removeCTabFolderListener CTabFolderListener addCTabFolder2Listener CTabFolder2Listener addCTabFolderListener CTabFolderListener checkWidget ERROR_NULL_ARGUMENT CTabFolderListener newTabListeners CTabFolderListener tabListeners tabListeners newTabListeners tabListeners tabListeners newTabListeners tabListeners tabListeners showClose showClose updateItems
Adds the listener to receive events p param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 add Selection Listener Selection Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
void antialias int shape RGB lineRGB RGB innerRGB RGB outerRGB GC gc Don t perform anti aliasing on Mac because the platform already does it The simple style also does not require anti aliasing if simple carbon equals SWT get Platform return NON NLS 1 Don t perform anti aliasing on low resolution displays if get Display get Depth 15 return if outerRGB null int index 0 boolean left true int oldY on Bottom 0 get Size y int outer new int shape length for int i 0 i shape length 2 i if left index 3 shape length left on Bottom oldY shape index 3 oldY shape index 3 oldY shape index 1 outer index shape index left 1 1 outer index shape index RGB from lineRGB RGB to outerRGB int red from red 2 to red from red 3 int green from green 2 to green from green 3 int blue from blue 2 to blue from blue 3 Color color new Color get Display red green blue gc set Foreground color gc draw Polyline outer color dispose if innerRGB null int inner new int shape length int index 0 boolean left true int oldY on Bottom 0 get Size y for int i 0 i shape length 2 i if left index 3 shape length left on Bottom oldY shape index 3 oldY shape index 3 oldY shape index 1 inner index shape index left 1 1 inner index shape index RGB from lineRGB RGB to innerRGB int red from red 2 to red from red 3 int green from green 2 to green from green 3 int blue from blue 2 to blue from blue 3 Color color new Color get Display red green blue gc set Foreground color gc draw Polyline inner color dispose  getPlatform getDisplay getDepth onBottom getSize onBottom getDisplay setForeground drawPolyline onBottom getSize onBottom getDisplay setForeground drawPolyline
public Point compute Size int w Hint int h Hint boolean changed check Widget preferred width of tab area to show all tabs int tabW 0 GC gc new GC this for int i 0 i items length i if single tabW Math max tabW items i preferred Width gc true false else tabW items i preferred Width gc i selected Index false gc dispose tabW 3 if show Max tabW BUTTON SIZE if show Min tabW BUTTON SIZE if single tabW 3 BUTTON SIZE 2 chevron if top Right null tabW top Right compute Size SWT DEFAULT tab Height x if single simple tabW curve Width 2 curve Indent int controlW 0 int controlH 0 preferred size of controls in tab items for int i 0 i items length i Control control items i get Control if control null control is Disposed Point size control compute Size w Hint h Hint controlW Math max controlW size x controlH Math max controlH size y int min Width Math max tabW controlW int min Height minimized 0 controlH if min Width 0 min Width DEFAULT WIDTH if min Height 0 min Height DEFAULT HEIGHT if w Hint SWT DEFAULT min Width w Hint if h Hint SWT DEFAULT min Height h Hint Rectangle trim compute Trim 0 0 min Width min Height return new Point trim width trim height  computeSize wHint hHint checkWidget preferredWidth preferredWidth selectedIndex showMax BUTTON_SIZE showMin BUTTON_SIZE BUTTON_SIZE topRight topRight computeSize tabHeight curveWidth curveIndent getControl isDisposed computeSize wHint hHint minWidth minHeight minWidth minWidth DEFAULT_WIDTH minHeight minHeight DEFAULT_HEIGHT wHint minWidth wHint hHint minHeight hHint computeTrim minWidth minHeight
public Rectangle compute Trim int x int y int width int height check Widget int trimX x margin Width highlight margin border Left int trim Width width border Left border Right 2 margin Width 2 highlight margin if minimized int trimY on Bottom y border Top y highlight header tab Height border Top int trim Height border Top border Bottom tab Height highlight header return new Rectangle trimX trimY trim Width trim Height else int trimY on Bottom y margin Height highlight margin border Top y margin Height highlight header tab Height border Top int trim Height height border Top border Bottom 2 margin Height tab Height highlight header highlight margin return new Rectangle trimX trimY trim Width trim Height  computeTrim checkWidget marginWidth highlight_margin borderLeft trimWidth borderLeft borderRight marginWidth highlight_margin onBottom borderTop highlight_header tabHeight borderTop trimHeight borderTop borderBottom tabHeight highlight_header trimWidth trimHeight onBottom marginHeight highlight_margin borderTop marginHeight highlight_header tabHeight borderTop trimHeight borderTop borderBottom marginHeight tabHeight highlight_header highlight_margin trimWidth trimHeight
void create Item C Tab Item item int index if 0 index index get Item Count SWT error SWT ERROR INVALID RANGE grow by one and rearrange the array C Tab Item new Items new C Tab Item items length 1 System arraycopy items 0 new Items 0 index new Items index item System arraycopy items index new Items index 1 items length index items new Items item parent this if selected Index index selected Index if items length 1 first Index 0 if update Tab Height false update Items redraw else update Items redraw tabs if new item visible if item is Showing redraw  createItem CTabItem getItemCount ERROR_INVALID_RANGE CTabItem newItems CTabItem newItems newItems newItems newItems selectedIndex selectedIndex firstIndex updateTabHeight updateItems updateItems isShowing
void destroy Item C Tab Item item if in Dispose return int index index Of item if index 1 return insertion Index 2 if items length 1 items new C Tab Item 0 selected Index 1 first Index 0 Control control item get Control if control null control is Disposed control set Visible false if fixed Tab Height SWT DEFAULT tab Height 0 if on Bottom y Client border Top highlight margin margin Height else y Client border Top tab Height highlight header margin Height hide Tool Tip redraw return shrink by one and rearrange the array C Tab Item new Items new C Tab Item items length 1 System arraycopy items 0 new Items 0 index System arraycopy items index 1 new Items index items length index 1 items new Items if first Index items length first Index move the selection if this item is selected if selected Index index Control control item get Control selected Index 1 set Selection Math max 0 index 1 true if control null control is Disposed control set Visible false else if selected Index index selected Index update Items redraw  destroyItem CTabItem inDispose indexOf insertionIndex CTabItem selectedIndex firstIndex getControl isDisposed setVisible fixedTabHeight tabHeight onBottom yClient borderTop highlight_margin marginHeight yClient borderTop tabHeight highlight_header marginHeight hideToolTip CTabItem newItems CTabItem newItems newItems newItems firstIndex firstIndex selectedIndex getControl selectedIndex setSelection isDisposed setVisible selectedIndex selectedIndex updateItems
void draw Background GC gc int shape boolean selected Color default Background selected selection Background get Background Image image selected selection Bg Image bg Image Color colors selected selection Gradient Colors gradient Colors int percents selected selection Gradient Percents gradient Percents boolean vertical selected selection Gradient Vertical gradient Vertical Point size get Size int width size x int height tab Height highlight header int x 0 if border Left 0 x 1 width 2 int y on Bottom size y border Bottom height border Top draw Background gc shape x y width height default Background image colors percents vertical  drawBackground defaultBackground selectionBackground getBackground selectionBgImage bgImage selectionGradientColors gradientColors selectionGradientPercents gradientPercents selectionGradientVertical gradientVertical getSize tabHeight highlight_header borderLeft onBottom borderBottom borderTop drawBackground defaultBackground
void draw Background GC gc int shape int x int y int width int height Color default Background Image image Color colors int percents boolean vertical Region clipping new Region gc get Clipping clipping Region region new Region region add shape region intersect clipping gc set Clipping region if image null draw the background image in shape gc set Background default Background gc fill Rectangle x y width height Rectangle image Rect image get Bounds gc draw Image image image Rect x image Rect y image Rect width image Rect height x y width height else if colors null draw gradient if colors length 1 Color background colors 0 null colors 0 default Background gc set Background background gc fill Rectangle x y width height else if vertical if on Bottom int pos 0 if percents percents length 1 100 pos percents percents length 1 height 100 gc set Background default Background gc fill Rectangle x y width pos Color last Color colors colors length 1 if last Color null last Color default Background for int i percents length 1 i 0 i gc set Foreground last Color last Color colors i if last Color null last Color default Background gc set Background last Color int gradient Height percents i height 100 gc fill Gradient Rectangle x y pos width gradient Height true pos gradient Height else Color last Color colors 0 if last Color null last Color default Background int pos 0 for int i 0 i percents length i gc set Foreground last Color last Color colors i 1 if last Color null last Color default Background gc set Background last Color int gradient Height percents i height 100 gc fill Gradient Rectangle x y pos width gradient Height true pos gradient Height if pos height gc set Background default Background gc fill Rectangle x pos width height pos 1 else horizontal gradient y 0 height get Size y Color last Color colors 0 if last Color null last Color default Background int pos 0 for int i 0 i percents length i gc set Foreground last Color last Color colors i 1 if last Color null last Color default Background gc set Background last Color int gradient Width percents i width 100 pos gc fill Gradient Rectangle x pos y gradient Width height false pos gradient Width if pos width gc set Background default Background gc fill Rectangle x pos y width pos height else draw a solid background using default background in shape if get Style SWT NO BACKGROUND 0 default Background equals get Background gc set Background default Background gc fill Rectangle x y width height gc set Clipping clipping clipping dispose region dispose  drawBackground defaultBackground getClipping setClipping setBackground defaultBackground fillRectangle imageRect getBounds drawImage imageRect imageRect imageRect imageRect defaultBackground setBackground fillRectangle onBottom setBackground defaultBackground fillRectangle lastColor lastColor lastColor defaultBackground setForeground lastColor lastColor lastColor lastColor defaultBackground setBackground lastColor gradientHeight fillGradientRectangle gradientHeight gradientHeight lastColor lastColor lastColor defaultBackground setForeground lastColor lastColor lastColor lastColor defaultBackground setBackground lastColor gradientHeight fillGradientRectangle gradientHeight gradientHeight setBackground defaultBackground fillRectangle getSize lastColor lastColor lastColor defaultBackground setForeground lastColor lastColor lastColor lastColor defaultBackground setBackground lastColor gradientWidth fillGradientRectangle gradientWidth gradientWidth setBackground defaultBackground fillRectangle getStyle NO_BACKGROUND defaultBackground getBackground setBackground defaultBackground fillRectangle setClipping
void draw Body Event event GC gc event gc Point size get Size fill in body if minimized int width size x border Left border Right 2 highlight margin int height size y border Top border Bottom tab Height highlight header highlight margin Draw highlight margin if highlight margin 0 int shape null if on Bottom int x1 border Left int y1 border Top int x2 size x border Right int y2 size y border Bottom tab Height highlight header shape new int x1 y1 x2 y1 x2 y2 x2 highlight margin y2 x2 highlight margin y1 highlight margin x1 highlight margin y1 highlight margin x1 highlight margin y2 x1 y2 else int x1 border Left int y1 border Top tab Height highlight header int x2 size x border Right int y2 size y border Bottom shape new int x1 y1 x1 highlight margin y1 x1 highlight margin y2 highlight margin x2 highlight margin y2 highlight margin x2 highlight margin y1 x2 y1 x2 y2 x1 y2 If horizontal gradient show gradient across the whole area if selected Index 1 selection Gradient Colors null selection Gradient Colors length 1 selection Gradient Vertical draw Background gc shape true else if selected Index 1 gradient Colors null gradient Colors length 1 gradient Vertical draw Background gc shape false else gc set Background selected Index 1 get Background selection Background gc fill Polygon shape Draw client area if get Style SWT NO BACKGROUND 0 gc set Background get Background gc fill Rectangle x Client margin Width y Client margin Height width height else if get Style SWT NO BACKGROUND 0 int height border Top tab Height highlight header border Bottom if size y height gc set Background get Parent get Background gc fill Rectangle 0 height size x size y height draw 1 pixel border around outside if border Left 0 gc set Foreground border Color int x1 border Left 1 int x2 size x border Right int y1 on Bottom border Top 1 border Top tab Height int y2 on Bottom size y tab Height border Bottom 1 size y border Bottom gc draw Line x1 y1 x1 y2 left gc draw Line x2 y1 x2 y2 right if on Bottom gc draw Line x1 y1 x2 y1 top else gc draw Line x1 y2 x2 y2 bottom  drawBody getSize borderLeft borderRight highlight_margin borderTop borderBottom tabHeight highlight_header highlight_margin highlight_margin onBottom borderLeft borderTop borderRight borderBottom tabHeight highlight_header highlight_margin highlight_margin highlight_margin highlight_margin highlight_margin highlight_margin borderLeft borderTop tabHeight highlight_header borderRight borderBottom highlight_margin highlight_margin highlight_margin highlight_margin highlight_margin highlight_margin selectedIndex selectionGradientColors selectionGradientColors selectionGradientVertical drawBackground selectedIndex gradientColors gradientColors gradientVertical drawBackground setBackground selectedIndex getBackground selectionBackground fillPolygon getStyle NO_BACKGROUND setBackground getBackground fillRectangle xClient marginWidth yClient marginHeight getStyle NO_BACKGROUND borderTop tabHeight highlight_header borderBottom setBackground getParent getBackground fillRectangle borderLeft setForeground borderColor borderLeft borderRight onBottom borderTop borderTop tabHeight onBottom tabHeight borderBottom borderBottom drawLine drawLine onBottom drawLine drawLine
void draw Chevron GC gc if chevron Rect width 0 chevron Rect height 0 return draw chevron 10x7 Display display get Display Font Data fd get Font get Font Data 0 fd set Height 7 Font f new Font display fd int f Height f get Font Data 0 get Height display getDPI y 72 int indent Math max 2 chevron Rect height f Height 4 2 int x chevron Rect x 2 int y chevron Rect y indent int count if single count selected Index 1 items length items length 1 else int last Index get Last Index count Math max 0 items length last Index first Index 1 switch chevron Image State case NORMAL Color chevron Border single get Selection Foreground get Foreground gc set Foreground chevron Border gc set Font f gc draw Line x y x 2 y 2 gc draw Line x 2 y 2 x y 4 gc draw Line x 1 y x 3 y 2 gc draw Line x 3 y 2 x 1 y 4 gc draw Line x 4 y x 6 y 2 gc draw Line x 6 y 2 x 5 y 4 gc draw Line x 5 y x 7 y 2 gc draw Line x 7 y 2 x 4 y 4 gc draw String String value Of count x 7 y 3 true break case HOT gc set Foreground display get System Color BUTTON BORDER gc set Background display get System Color BUTTON FILL gc set Font f gc fill Round Rectangle chevron Rect x chevron Rect y chevron Rect width chevron Rect height 6 6 gc draw Round Rectangle chevron Rect x chevron Rect y chevron Rect width 1 chevron Rect height 1 6 6 gc draw Line x y x 2 y 2 gc draw Line x 2 y 2 x y 4 gc draw Line x 1 y x 3 y 2 gc draw Line x 3 y 2 x 1 y 4 gc draw Line x 4 y x 6 y 2 gc draw Line x 6 y 2 x 5 y 4 gc draw Line x 5 y x 7 y 2 gc draw Line x 7 y 2 x 4 y 4 gc draw String String value Of count x 7 y 3 true break case SELECTED gc set Foreground display get System Color BUTTON BORDER gc set Background display get System Color BUTTON FILL gc set Font f gc fill Round Rectangle chevron Rect x chevron Rect y chevron Rect width chevron Rect height 6 6 gc draw Round Rectangle chevron Rect x chevron Rect y chevron Rect width 1 chevron Rect height 1 6 6 gc draw Line x 1 y 1 x 3 y 3 gc draw Line x 3 y 3 x 1 y 5 gc draw Line x 2 y 1 x 4 y 3 gc draw Line x 4 y 3 x 2 y 5 gc draw Line x 5 y 1 x 7 y 3 gc draw Line x 7 y 3 x 6 y 5 gc draw Line x 6 y 1 x 8 y 3 gc draw Line x 8 y 3 x 5 y 5 gc draw String String value Of count x 8 y 4 true break f dispose  drawChevron chevronRect chevronRect getDisplay FontData getFont getFontData setHeight fHeight getFontData getHeight chevronRect fHeight chevronRect chevronRect selectedIndex lastIndex getLastIndex lastIndex firstIndex chevronImageState chevronBorder getSelectionForeground getForeground setForeground chevronBorder setFont drawLine drawLine drawLine drawLine drawLine drawLine drawLine drawLine drawString valueOf setForeground getSystemColor BUTTON_BORDER setBackground getSystemColor BUTTON_FILL setFont fillRoundRectangle chevronRect chevronRect chevronRect chevronRect drawRoundRectangle chevronRect chevronRect chevronRect chevronRect drawLine drawLine drawLine drawLine drawLine drawLine drawLine drawLine drawString valueOf setForeground getSystemColor BUTTON_BORDER setBackground getSystemColor BUTTON_FILL setFont fillRoundRectangle chevronRect chevronRect chevronRect chevronRect drawRoundRectangle chevronRect chevronRect chevronRect chevronRect drawLine drawLine drawLine drawLine drawLine drawLine drawLine drawLine drawString valueOf
void draw Maximize GC gc if max Rect width 0 max Rect height 0 return Display display get Display 5x4 or 7x9 int x max Rect x C Tab Folder BUTTON SIZE 10 2 int y max Rect y 3 gc set Foreground display get System Color BUTTON BORDER gc set Background display get System Color BUTTON FILL switch max Image State case NORMAL if maximized gc fill Rectangle x y 9 9 gc draw Rectangle x y 9 9 gc draw Line x 1 y 2 x 8 y 2 else gc fill Rectangle x y 3 5 4 gc fill Rectangle x 2 y 5 4 gc draw Rectangle x y 3 5 4 gc draw Rectangle x 2 y 5 4 gc draw Line x 3 y 1 x 6 y 1 gc draw Line x 1 y 4 x 4 y 4 break case HOT gc fill Round Rectangle max Rect x max Rect y max Rect width max Rect height 6 6 gc draw Round Rectangle max Rect x max Rect y max Rect width 1 max Rect height 1 6 6 if maximized gc fill Rectangle x y 9 9 gc draw Rectangle x y 9 9 gc draw Line x 1 y 2 x 8 y 2 else gc fill Rectangle x y 3 5 4 gc fill Rectangle x 2 y 5 4 gc draw Rectangle x y 3 5 4 gc draw Rectangle x 2 y 5 4 gc draw Line x 3 y 1 x 6 y 1 gc draw Line x 1 y 4 x 4 y 4 break case SELECTED gc fill Round Rectangle max Rect x max Rect y max Rect width max Rect height 6 6 gc draw Round Rectangle max Rect x max Rect y max Rect width 1 max Rect height 1 6 6 if maximized gc fill Rectangle x 1 y 1 9 9 gc draw Rectangle x 1 y 1 9 9 gc draw Line x 2 y 3 x 9 y 3 else gc fill Rectangle x 1 y 4 5 4 gc fill Rectangle x 3 y 1 5 4 gc draw Rectangle x 1 y 4 5 4 gc draw Rectangle x 3 y 1 5 4 gc draw Line x 4 y 2 x 7 y 2 gc draw Line x 2 y 5 x 5 y 5 break  drawMaximize maxRect maxRect getDisplay maxRect CTabFolder BUTTON_SIZE maxRect setForeground getSystemColor BUTTON_BORDER setBackground getSystemColor BUTTON_FILL maxImageState fillRectangle drawRectangle drawLine fillRectangle fillRectangle drawRectangle drawRectangle drawLine drawLine fillRoundRectangle maxRect maxRect maxRect maxRect drawRoundRectangle maxRect maxRect maxRect maxRect fillRectangle drawRectangle drawLine fillRectangle fillRectangle drawRectangle drawRectangle drawLine drawLine fillRoundRectangle maxRect maxRect maxRect maxRect drawRoundRectangle maxRect maxRect maxRect maxRect fillRectangle drawRectangle drawLine fillRectangle fillRectangle drawRectangle drawRectangle drawLine drawLine
void draw Minimize GC gc if min Rect width 0 min Rect height 0 return Display display get Display 5x4 or 9x3 int x min Rect x BUTTON SIZE 10 2 int y min Rect y 3 gc set Foreground display get System Color BUTTON BORDER gc set Background display get System Color BUTTON FILL switch min Image State case NORMAL if minimized gc fill Rectangle x y 9 3 gc draw Rectangle x y 9 3 else gc fill Rectangle x y 3 5 4 gc fill Rectangle x 2 y 5 4 gc draw Rectangle x y 3 5 4 gc draw Rectangle x 2 y 5 4 gc draw Line x 3 y 1 x 6 y 1 gc draw Line x 1 y 4 x 4 y 4 break case HOT gc fill Round Rectangle min Rect x min Rect y min Rect width min Rect height 6 6 gc draw Round Rectangle min Rect x min Rect y min Rect width 1 min Rect height 1 6 6 if minimized gc fill Rectangle x y 9 3 gc draw Rectangle x y 9 3 else gc fill Rectangle x y 3 5 4 gc fill Rectangle x 2 y 5 4 gc draw Rectangle x y 3 5 4 gc draw Rectangle x 2 y 5 4 gc draw Line x 3 y 1 x 6 y 1 gc draw Line x 1 y 4 x 4 y 4 break case SELECTED gc fill Round Rectangle min Rect x min Rect y min Rect width min Rect height 6 6 gc draw Round Rectangle min Rect x min Rect y min Rect width 1 min Rect height 1 6 6 if minimized gc fill Rectangle x 1 y 1 9 3 gc draw Rectangle x 1 y 1 9 3 else gc fill Rectangle x 1 y 4 5 4 gc fill Rectangle x 3 y 1 5 4 gc draw Rectangle x 1 y 4 5 4 gc draw Rectangle x 3 y 1 5 4 gc draw Line x 4 y 2 x 7 y 2 gc draw Line x 2 y 5 x 5 y 5 break  drawMinimize minRect minRect getDisplay minRect BUTTON_SIZE minRect setForeground getSystemColor BUTTON_BORDER setBackground getSystemColor BUTTON_FILL minImageState fillRectangle drawRectangle fillRectangle fillRectangle drawRectangle drawRectangle drawLine drawLine fillRoundRectangle minRect minRect minRect minRect drawRoundRectangle minRect minRect minRect minRect fillRectangle drawRectangle fillRectangle fillRectangle drawRectangle drawRectangle drawLine drawLine fillRoundRectangle minRect minRect minRect minRect drawRoundRectangle minRect minRect minRect minRect fillRectangle drawRectangle fillRectangle fillRectangle drawRectangle drawRectangle drawLine drawLine
void draw Tab Area Event event GC gc event gc Point size get Size int shape null if tab Height 0 int x1 border Left 1 int x2 size x border Right int y1 on Bottom size y border Bottom highlight header 1 border Top highlight header int y2 on Bottom size y border Bottom border Top if border Left 0 on Bottom y2 1 shape new int x1 y1 x1 y2 x2 y2 x2 y1 If horizontal gradient show gradient across the whole area if selected Index 1 selection Gradient Colors null selection Gradient Colors length 1 selection Gradient Vertical draw Background gc shape true else if selected Index 1 gradient Colors null gradient Colors length 1 gradient Vertical draw Background gc shape false else gc set Background selected Index 1 get Background selection Background gc fill Polygon shape draw 1 pixel border if border Left 0 gc set Foreground border Color gc draw Polyline shape return int x Math max 0 border Left 1 int y on Bottom size y border Bottom tab Height border Top int width size x border Left border Right 1 int height tab Height 1 Draw Tab Header if on Bottom int left simple SIMPLE BOTTOM LEFT CORNER BOTTOM LEFT CORNER int right simple SIMPLE BOTTOM RIGHT CORNER BOTTOM RIGHT CORNER shape new int left length right length 4 int index 0 shape index x shape index y highlight header for int i 0 i left length 2 i shape index x left 2 i shape index y height left 2 i 1 if border Left 0 shape index 1 1 for int i 0 i right length 2 i shape index x width right 2 i shape index y height right 2 i 1 if border Left 0 shape index 1 1 shape index x width shape index y highlight header else int left simple SIMPLE TOP LEFT CORNER TOP LEFT CORNER int right simple SIMPLE TOP RIGHT CORNER TOP RIGHT CORNER shape new int left length right length 4 int index 0 shape index x shape index y height highlight header 1 for int i 0 i left length 2 i shape index x left 2 i shape index y left 2 i 1 for int i 0 i right length 2 i shape index x width right 2 i shape index y right 2 i 1 shape index x width shape index y height highlight header 1 Fill in background boolean bk Selected single selected Index 1 draw Background gc shape bk Selected Fill in parent background for non rectangular shape Region r new Region r add new Rectangle x y width 1 height 1 r subtract shape gc set Background get Parent get Background fill Region gc r r dispose Draw border line if border Left 0 RGB outside get Parent get Background getRGB antialias shape border Color getRGB null outside gc gc set Foreground border Color gc draw Polyline shape Draw the unselected tabs if single for int i 0 i items length i if i selected Index event get Bounds intersects items i get Bounds items i on Paint gc false Draw selected tab if selected Index 1 C Tab Item item items selected Index item on Paint gc true else if no selected tab draw line across bottom of all tabs int x1 border Left int y1 on Bottom size y border Bottom tab Height 1 border Top tab Height int x2 size x border Right gc set Foreground border Color gc draw Line x1 y1 x2 y1 Draw Buttons if items length 0 draw Chevron gc draw Minimize gc draw Maximize gc Draw insertion mark if insertion Index 2 gc set Foreground get Display get System Color SWT COLOR LIST SELECTION if insertion Index 1 Rectangle bounds items 0 get Bounds gc draw Line bounds x bounds y bounds x bounds y bounds height 1 gc draw Line bounds x 2 bounds y bounds x 2 bounds y gc draw Line bounds x 1 bounds y 1 bounds x 1 bounds y 1 gc draw Line bounds x 1 bounds y bounds height 2 bounds x 1 bounds y bounds height 2 gc draw Line bounds x 2 bounds y bounds height 1 bounds x 2 bounds y bounds height 1 else Rectangle bounds items insertion Index get Bounds gc draw Line bounds x bounds width bounds y bounds x bounds width bounds y bounds height 1 gc draw Line bounds x bounds width 2 bounds y bounds x bounds width 2 bounds y gc draw Line bounds x bounds width 1 bounds y 1 bounds x bounds width 1 bounds y 1 gc draw Line bounds x bounds width 1 bounds y bounds height 2 bounds x bounds width 1 bounds y bounds height 2 gc draw Line bounds x bounds width 2 bounds y bounds height 1 bounds x bounds width 2 bounds y bounds height 1  drawTabArea getSize tabHeight borderLeft borderRight onBottom borderBottom highlight_header borderTop highlight_header onBottom borderBottom borderTop borderLeft onBottom selectedIndex selectionGradientColors selectionGradientColors selectionGradientVertical drawBackground selectedIndex gradientColors gradientColors gradientVertical drawBackground setBackground selectedIndex getBackground selectionBackground fillPolygon borderLeft setForeground borderColor drawPolyline borderLeft onBottom borderBottom tabHeight borderTop borderLeft borderRight tabHeight onBottom SIMPLE_BOTTOM_LEFT_CORNER BOTTOM_LEFT_CORNER SIMPLE_BOTTOM_RIGHT_CORNER BOTTOM_RIGHT_CORNER highlight_header borderLeft borderLeft highlight_header SIMPLE_TOP_LEFT_CORNER TOP_LEFT_CORNER SIMPLE_TOP_RIGHT_CORNER TOP_RIGHT_CORNER highlight_header highlight_header bkSelected selectedIndex drawBackground bkSelected setBackground getParent getBackground fillRegion borderLeft getParent getBackground borderColor setForeground borderColor drawPolyline selectedIndex getBounds getBounds onPaint selectedIndex CTabItem selectedIndex onPaint borderLeft onBottom borderBottom tabHeight borderTop tabHeight borderRight setForeground borderColor drawLine drawChevron drawMinimize drawMaximize insertionIndex setForeground getDisplay getSystemColor COLOR_LIST_SELECTION insertionIndex getBounds drawLine drawLine drawLine drawLine drawLine insertionIndex getBounds drawLine drawLine drawLine drawLine drawLine
Returns code true code if the receiver s border is visible return the receiver s border visibility 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 since 3 0 public boolean get Border Visible check Widget return border Left 1  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBorderVisible checkWidget borderLeft
public Rectangle get Client Area check Widget if minimized return new Rectangle x Client y Client 0 0 Point size get Size int width size x border Left border Right 2 margin Width 2 highlight margin int height size y border Top border Bottom 2 margin Height highlight margin highlight header height tab Height return new Rectangle x Client y Client width height  getClientArea checkWidget xClient yClient getSize borderLeft borderRight marginWidth highlight_margin borderTop borderBottom marginHeight highlight_margin highlight_header tabHeight xClient yClient
Return the tab that is located at the specified index param index the index of the tab item return the item at the specified index exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is out of range li ul exception SWT Error 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 C Tab Item get Item int index check Widget if index 0 index items length SWT error SWT ERROR INVALID RANGE return items index  IllegalArgumentException ERROR_INVALID_RANGE SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED CTabItem getItem checkWidget ERROR_INVALID_RANGE
Gets the item at a point in the widget param pt the point in coordinates relative to the C Tab Folder return the item at a point or null exception SWT Error 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 C Tab Item get Item Point pt check Widget if items length 0 return null Point size get Size if size x border Left border Right return null for int index first Index index items length index C Tab Item item items index Rectangle rect item get Bounds if rect contains pt return item return null  CTabFolder SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED CTabItem getItem checkWidget getSize borderLeft borderRight firstIndex CTabItem getBounds
Return the number of tabs in the folder return the number of tabs in the folder exception SWT Error 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 int get Item Count check Widget return items length  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED getItemCount checkWidget
Return the tab items return the tab items exception SWT Error 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 C Tab Item get Items check Widget C Tab Item tab Items new C Tab Item items length System arraycopy items 0 tab Items 0 items length return tab Items  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED CTabItem getItems checkWidget CTabItem tabItems CTabItem tabItems tabItems
int get Last Index if single return selected Index if items length 0 return 1 for int i first Index i items length i C Tab Item item items i if item is Showing continue return i first Index first Index i 1 return items length 1  getLastIndex selectedIndex firstIndex CTabItem isShowing firstIndex firstIndex
char get Mnemonic String string int index 0 int length string length do while index length string char At index index if index length return 0 if string char At index return string char At index index while index length return 0  getMnemonic charAt charAt charAt
Returns code true code if the receiver is minimized return the receiver s minimized 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 since 3 0 public boolean get Minimized check Widget return minimized  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMinimized checkWidget
Returns code true code if the minimize button is visible return the visibility of the minimized button 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 since 3 0 public boolean get Minimize Visible check Widget return show Min  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMinimizeVisible checkWidget showMin
Returns the number of characters that will appear in a fully compressed tab return number of characters that will appear in a fully compressed tab since 3 0 public int get Minimum Characters check Widget return min Chars  getMinimumCharacters checkWidget minChars
Returns code true code if the receiver is maximized p return the receiver s maximized 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 since 3 0 public boolean get Maximized check Widget return maximized  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMaximized checkWidget
Returns code true code if the maximize button is visible return the visibility of the maximized button 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 since 3 0 public boolean get Maximize Visible check Widget return show Max  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMaximizeVisible checkWidget showMax
int get Right Item Edge int x get Size x border Right 3 if show Min x BUTTON SIZE if show Max x BUTTON SIZE if show Chevron x 3 BUTTON SIZE 2 if top Right null top Right Alignment SWT FILL x top Right Rect width 3 return x  getRightItemEdge getSize borderRight showMin BUTTON_SIZE showMax BUTTON_SIZE showChevron BUTTON_SIZE topRight topRightAlignment topRightRect
Return the selected tab item or an empty array if there is no selection return the selected tab item exception SWT Error 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 C Tab Item get Selection check Widget if selected Index 1 return null return items selected Index  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED CTabItem getSelection checkWidget selectedIndex selectedIndex
Returns the receiver s selection background color return the selection background color of the receiver 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 since 3 0 public Color get Selection Background check Widget return selection Background  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelectionBackground checkWidget selectionBackground
Returns the receiver s selection foreground color return the selection foreground color of the receiver 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 since 3 0 public Color get Selection Foreground check Widget return selection Foreground  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelectionForeground checkWidget selectionForeground
Return the index of the selected tab item or 1 if there is no selection return the index of the selected tab item or 1 exception SWT Error 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 int get Selection Index check Widget return selected Index  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED getSelectionIndex checkWidget selectedIndex
Returns code true code if the C Tab Folder is rendered with a simple traditional shape return code true code if the C Tab Folder is rendered with a simple shape since 3 0 public boolean get Simple check Widget return simple  CTabFolder CTabFolder getSimple checkWidget
Returns code true code if the C Tab Folder only displys the selected tab and code false code if the C Tab Folder displays multiple tabs return code true code if the C Tab Folder only displys the selected tab and code false code if the C Tab Folder displays multiple tabs since 3 0 public boolean get Single check Widget return single  CTabFolder CTabFolder CTabFolder CTabFolder getSingle checkWidget
public int get Style int style super get Style style SWT TOP SWT BOTTOM style on Bottom SWT BOTTOM SWT TOP style SWT SINGLE SWT MULTI style single SWT SINGLE SWT MULTI if border Left 0 style SWT BORDER return style  getStyle getStyle onBottom borderLeft
Returns the height of the tab return the height of the tab exception SWT Error 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 int get Tab Height check Widget if fixed Tab Height SWT DEFAULT return fixed Tab Height return tab Height 1 1 for line drawn across top of tab  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED getTabHeight checkWidget fixedTabHeight fixedTabHeight tabHeight
Returns the position of the tab Possible values are SWT TOP or SWT BOTTOM return the position of the tab exception SWT Error 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 int get Tab Position check Widget return on Bottom SWT BOTTOM SWT TOP  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED getTabPosition checkWidget onBottom
Returns the control in the top right corner of the tab folder Typically this is a close button or a composite with a menu and close button return the control in the top right corner of the tab folder or null exception SWT Error 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 since 2 1 public Control get Top Right check Widget return top Right  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED getTopRight checkWidget topRight
Returns code true code if the close button appears when the user hovers over an unselected tabs return code true code if the close button appears on unselected tabs since 3 0 public boolean get Unselected Close Visible check Widget return show Unselected Close  getUnselectedCloseVisible checkWidget showUnselectedClose
Returns code true code if an image appears in unselected tabs return code true code if an image appears in unselected tabs since 3 0 public boolean get Unselected Image Visible check Widget return show Unselected Image  getUnselectedImageVisible checkWidget showUnselectedImage
Return the index of the specified tab or 1 if the tab is not in the receiver param item the tab item for which the index is required return the index of the specified tab item or 1 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 int index Of C Tab Item item check Widget if item null SWT error SWT ERROR NULL ARGUMENT for int i 0 i items length i if items i item return i return 1  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED indexOf CTabItem checkWidget ERROR_NULL_ARGUMENT
accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e String name null int childID e childID if childID 0 childID items length name items childID get Text int index name index Of if index 0 name name substring 0 index name substring index 1 e result name  addAccessibleListener AccessibleAdapter getName AccessibleEvent getText indexOf
public void get Help Accessible Event e String help null int childID e childID if childID ACC CHILDID SELF help get Tool Tip Text else if childID 0 childID items length help items childID get Tool Tip Text e result help  getHelp AccessibleEvent CHILDID_SELF getToolTipText getToolTipText
public void get Keyboard Shortcut Accessible Event e String shortcut null int childID e childID if childID 0 childID items length String text items childID get Text if text null char mnemonic get Mnemonic text if mnemonic 0 shortcut Alt mnemonic NON NLS 1 e result shortcut  getKeyboardShortcut AccessibleEvent getText getMnemonic
accessible add Accessible Control Listener new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point test Point to Control new Point e x e y int childID ACC CHILDID NONE for int i 0 i items length i if items i get Bounds contains test Point childID i break if childID ACC CHILDID NONE Rectangle location get Bounds location height location height get Client Area height if location contains test Point childID ACC CHILDID SELF e childID childID  addAccessibleControlListener AccessibleControlAdapter getChildAtPoint AccessibleControlEvent testPoint toControl CHILDID_NONE getBounds testPoint CHILDID_NONE getBounds getClientArea testPoint CHILDID_SELF
public void get Location Accessible Control Event e Rectangle location null int childID e childID if childID ACC CHILDID SELF location get Bounds if childID 0 childID items length location items childID get Bounds if location null Point pt to Display new Point location x location y e x pt x e y pt y e width location width e height location height  getLocation AccessibleControlEvent CHILDID_SELF getBounds getBounds toDisplay
public void get Child Count Accessible Control Event e e detail items length  getChildCount AccessibleControlEvent
public void get Default Action Accessible Control Event e String action null int childID e childID if childID 0 childID items length action Switch NON NLS 1 e result action  getDefaultAction AccessibleControlEvent
public void get Focus Accessible Control Event e int childID ACC CHILDID NONE if is Focus Control if selected Index 1 childID ACC CHILDID SELF else childID selected Index e childID childID  getFocus AccessibleControlEvent CHILDID_NONE isFocusControl selectedIndex CHILDID_SELF selectedIndex
public void get Role Accessible Control Event e int role 0 int childID e childID if childID ACC CHILDID SELF role ACC ROLE TABFOLDER else if childID 0 childID items length role ACC ROLE TABITEM e detail role  getRole AccessibleControlEvent CHILDID_SELF ROLE_TABFOLDER ROLE_TABITEM
public void get Selection Accessible Control Event e e childID selected Index 1 ACC CHILDID NONE selected Index  getSelection AccessibleControlEvent selectedIndex CHILDID_NONE selectedIndex
public void get State Accessible Control Event e int state 0 int childID e childID if childID ACC CHILDID SELF state ACC STATE NORMAL else if childID 0 childID items length state ACC STATE SELECTABLE if is Focus Control state ACC STATE FOCUSABLE if selected Index childID state ACC STATE SELECTED if is Focus Control state ACC STATE FOCUSED e detail state  getState AccessibleControlEvent CHILDID_SELF STATE_NORMAL STATE_SELECTABLE isFocusControl STATE_FOCUSABLE selectedIndex STATE_SELECTED isFocusControl STATE_FOCUSED
public void get Children Accessible Control Event e Object children new Object items length for int i 0 i items length i children i new Integer i e children children  getChildren AccessibleControlEvent
add Listener SWT Selection new Listener public void handle Event Event event if is Focus Control if selected Index 1 accessible set Focus ACC CHILDID SELF else accessible set Focus selected Index  addListener handleEvent isFocusControl selectedIndex setFocus CHILDID_SELF setFocus selectedIndex
add Listener SWT Focus In new Listener public void handle Event Event event if selected Index 1 accessible set Focus ACC CHILDID SELF else accessible set Focus selected Index  addListener FocusIn handleEvent selectedIndex setFocus CHILDID_SELF setFocus selectedIndex
void init Accessible final Accessible accessible get Accessible accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e String name null int childID e childID if childID 0 childID items length name items childID get Text int index name index Of if index 0 name name substring 0 index name substring index 1 e result name public void get Help Accessible Event e String help null int childID e childID if childID ACC CHILDID SELF help get Tool Tip Text else if childID 0 childID items length help items childID get Tool Tip Text e result help public void get Keyboard Shortcut Accessible Event e String shortcut null int childID e childID if childID 0 childID items length String text items childID get Text if text null char mnemonic get Mnemonic text if mnemonic 0 shortcut Alt mnemonic NON NLS 1 e result shortcut accessible add Accessible Control Listener new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point test Point to Control new Point e x e y int childID ACC CHILDID NONE for int i 0 i items length i if items i get Bounds contains test Point childID i break if childID ACC CHILDID NONE Rectangle location get Bounds location height location height get Client Area height if location contains test Point childID ACC CHILDID SELF e childID childID public void get Location Accessible Control Event e Rectangle location null int childID e childID if childID ACC CHILDID SELF location get Bounds if childID 0 childID items length location items childID get Bounds if location null Point pt to Display new Point location x location y e x pt x e y pt y e width location width e height location height public void get Child Count Accessible Control Event e e detail items length public void get Default Action Accessible Control Event e String action null int childID e childID if childID 0 childID items length action Switch NON NLS 1 e result action public void get Focus Accessible Control Event e int childID ACC CHILDID NONE if is Focus Control if selected Index 1 childID ACC CHILDID SELF else childID selected Index e childID childID public void get Role Accessible Control Event e int role 0 int childID e childID if childID ACC CHILDID SELF role ACC ROLE TABFOLDER else if childID 0 childID items length role ACC ROLE TABITEM e detail role public void get Selection Accessible Control Event e e childID selected Index 1 ACC CHILDID NONE selected Index public void get State Accessible Control Event e int state 0 int childID e childID if childID ACC CHILDID SELF state ACC STATE NORMAL else if childID 0 childID items length state ACC STATE SELECTABLE if is Focus Control state ACC STATE FOCUSABLE if selected Index childID state ACC STATE SELECTED if is Focus Control state ACC STATE FOCUSED e detail state public void get Children Accessible Control Event e Object children new Object items length for int i 0 i items length i children i new Integer i e children children add Listener SWT Selection new Listener public void handle Event Event event if is Focus Control if selected Index 1 accessible set Focus ACC CHILDID SELF else accessible set Focus selected Index add Listener SWT Focus In new Listener public void handle Event Event event if selected Index 1 accessible set Focus ACC CHILDID SELF else accessible set Focus selected Index  initAccessible getAccessible addAccessibleListener AccessibleAdapter getName AccessibleEvent getText indexOf getHelp AccessibleEvent CHILDID_SELF getToolTipText getToolTipText getKeyboardShortcut AccessibleEvent getText getMnemonic addAccessibleControlListener AccessibleControlAdapter getChildAtPoint AccessibleControlEvent testPoint toControl CHILDID_NONE getBounds testPoint CHILDID_NONE getBounds getClientArea testPoint CHILDID_SELF getLocation AccessibleControlEvent CHILDID_SELF getBounds getBounds toDisplay getChildCount AccessibleControlEvent getDefaultAction AccessibleControlEvent getFocus AccessibleControlEvent CHILDID_NONE isFocusControl selectedIndex CHILDID_SELF selectedIndex getRole AccessibleControlEvent CHILDID_SELF ROLE_TABFOLDER ROLE_TABITEM getSelection AccessibleControlEvent selectedIndex CHILDID_NONE selectedIndex getState AccessibleControlEvent CHILDID_SELF STATE_NORMAL STATE_SELECTABLE isFocusControl STATE_FOCUSABLE selectedIndex STATE_SELECTED isFocusControl STATE_FOCUSED getChildren AccessibleControlEvent addListener handleEvent isFocusControl selectedIndex setFocus CHILDID_SELF setFocus selectedIndex addListener FocusIn handleEvent selectedIndex setFocus CHILDID_SELF setFocus selectedIndex
void on Key Down Event event switch event key Code case SWT ARROW LEFT case SWT ARROW RIGHT int count items length if count 0 return if selected Index 1 return int lead Key get Style SWT RIGHT TO LEFT 0 SWT ARROW RIGHT SWT ARROW LEFT int offset event key Code lead Key 1 1 int index selected Index offset if index 0 index count return set Selection index true force Focus  onKeyDown keyCode ARROW_LEFT ARROW_RIGHT selectedIndex leadKey getStyle RIGHT_TO_LEFT ARROW_RIGHT ARROW_LEFT keyCode leadKey selectedIndex setSelection forceFocus
void on Dispose Usually when an item is disposed destroy Item will change the size of the items array reset the bounds of all the tabs and manage the widget associated with the tab Since the whole folder is being disposed this is not necessary For speed the in Dispose flag is used to skip over this part of the item dispose in Dispose true int length items length for int i 0 i length i if items i null items i dispose selection Gradient Colors null selection Gradient Percents null selection Bg Image null selection Background null selection Foreground null  onDispose destroyItem inDispose inDispose selectionGradientColors selectionGradientPercents selectionBgImage selectionBackground selectionForeground
void on Drag Detect Event event boolean consume false if chevron Rect contains event x event y min Rect contains event x event y max Rect contains event x event y consume true else for int i 0 i items length i if items i close Rect contains event x event y consume true break if consume event type SWT None  onDragDetect chevronRect minRect maxRect closeRect
void on Focus Event event check Widget if selected Index 0 redraw else set Selection 0 true  onFocus checkWidget selectedIndex setSelection
boolean on Mnemonic Event event char key event character for int i 0 i items length i if items i null char mnemonic get Mnemonic items i get Text if mnemonic 0 if Character to Upper Case key Character to Upper Case mnemonic set Selection i true return true return false  onMnemonic getMnemonic getText toUpperCase toUpperCase setSelection
void on Mouse Double Click Event event if event button 1 event state Mask SWT BUTTON2 0 event state Mask SWT BUTTON3 0 return Event e new Event e item get Item new Point event x event y if e item null notify Listeners SWT Default Selection e  onMouseDoubleClick stateMask stateMask getItem notifyListeners DefaultSelection
void on Mouse Hover Event event show Tool Tip event x event y  onMouseHover showToolTip
void on Mouse Event event int x event x y event y switch event type case SWT Mouse Exit if min Image State NORMAL min Image State NORMAL redraw min Rect x min Rect y min Rect width min Rect height false if max Image State NORMAL max Image State NORMAL redraw max Rect x max Rect y max Rect width max Rect height false if chevron Image State NORMAL chevron Image State NORMAL redraw chevron Rect x chevron Rect y chevron Rect width chevron Rect height false for int i 0 i items length i C Tab Item item items i if i selected Index item close Image State NONE item close Image State NONE redraw item close Rect x item close Rect y item close Rect width item close Rect height false if i selected Index item close Image State NORMAL item close Image State NORMAL redraw item close Rect x item close Rect y item close Rect width item close Rect height false break case SWT Mouse Down if min Rect contains x y if event button 1 return min Image State SELECTED redraw min Rect x min Rect y min Rect width min Rect height false update return if max Rect contains x y if event button 1 return max Image State SELECTED redraw max Rect x max Rect y max Rect width max Rect height false update return if chevron Rect contains x y if event button 1 return if chevron Image State HOT chevron Image State HOT else chevron Image State SELECTED redraw chevron Rect x chevron Rect y chevron Rect width chevron Rect height false update return C Tab Item item null if single if selected Index 1 Rectangle bounds items selected Index get Bounds if bounds contains x y item items selected Index else for int i 0 i items length i Rectangle bounds items i get Bounds if bounds contains x y item items i if item null if item close Rect contains x y if event button 1 return item close Image State SELECTED redraw item close Rect x item close Rect y item close Rect width item close Rect height false update return int index index Of item if item is Showing set Selection index true return break case SWT Mouse Move boolean close false minimize false maximize false chevron false if min Rect contains x y minimize true if min Image State SELECTED min Image State HOT min Image State HOT redraw min Rect x min Rect y min Rect width min Rect height false if max Rect contains x y maximize true if max Image State SELECTED max Image State HOT max Image State HOT redraw max Rect x max Rect y max Rect width max Rect height false if chevron Rect contains x y chevron true if chevron Image State SELECTED chevron Image State HOT chevron Image State HOT redraw chevron Rect x chevron Rect y chevron Rect width chevron Rect height false if min Image State NORMAL minimize min Image State NORMAL redraw min Rect x min Rect y min Rect width min Rect height false if max Image State NORMAL maximize max Image State NORMAL redraw max Rect x max Rect y max Rect width max Rect height false if chevron Image State NORMAL chevron chevron Image State NORMAL redraw chevron Rect x chevron Rect y chevron Rect width chevron Rect height false for int i 0 i items length i C Tab Item item items i close false if item get Bounds contains x y close true if item close Rect contains x y if item close Image State SELECTED item close Image State HOT item close Image State HOT redraw item close Rect x item close Rect y item close Rect width item close Rect height false else if item close Image State NORMAL item close Image State NORMAL redraw item close Rect x item close Rect y item close Rect width item close Rect height false if i selected Index item close Image State NONE close item close Image State NONE redraw item close Rect x item close Rect y item close Rect width item close Rect height false if i selected Index item close Image State NORMAL close item close Image State NORMAL redraw item close Rect x item close Rect y item close Rect width item close Rect height false break case SWT Mouse Up if event button 1 return if chevron Rect contains x y boolean selected chevron Image State SELECTED if selected return C Tab Folder Event e new C Tab Folder Event this e widget this e time event time e x chevron Rect x e y chevron Rect y e width chevron Rect width e height chevron Rect height e doit true for int i 0 i folder Listeners length i folder Listeners i show List e if e doit is Disposed show List chevron Rect Display display get Display Point cursor Location display get Cursor Location cursor Location display map null this cursor Location chevron Image State chevron Rect contains cursor Location HOT NORMAL redraw chevron Rect x chevron Rect y chevron Rect width chevron Rect height false return if min Rect contains x y boolean selected min Image State SELECTED min Image State HOT redraw min Rect x min Rect y min Rect width min Rect height false if selected return C Tab Folder Event e new C Tab Folder Event this e widget this e time event time for int i 0 i folder Listeners length i if minimized folder Listeners i restore e else folder Listeners i minimize e return if max Rect contains x y boolean selected max Image State SELECTED max Image State HOT redraw max Rect x max Rect y max Rect width max Rect height false if selected return C Tab Folder Event e new C Tab Folder Event this e widget this e time event time for int i 0 i folder Listeners length i if maximized folder Listeners i restore e else folder Listeners i maximize e return C Tab Item item null if single if selected Index 1 Rectangle bounds items selected Index get Bounds if bounds contains x y item items selected Index else for int i 0 i items length i Rectangle bounds items i get Bounds if bounds contains x y item items i if item null if item close Rect contains x y boolean selected item close Image State SELECTED item close Image State HOT redraw item close Rect x item close Rect y item close Rect width item close Rect height false if selected return C Tab Folder Event e new C Tab Folder Event this e widget this e time event time e item item e doit true for int j 0 j folder Listeners length j C Tab Folder2 Listener listener folder Listeners j listener close e for int j 0 j tab Listeners length j C Tab Folder Listener listener tab Listeners j listener item Closed e if e doit item dispose return  onMouse MouseExit minImageState minImageState minRect minRect minRect minRect maxImageState maxImageState maxRect maxRect maxRect maxRect chevronImageState chevronImageState chevronRect chevronRect chevronRect chevronRect CTabItem selectedIndex closeImageState closeImageState closeRect closeRect closeRect closeRect selectedIndex closeImageState closeImageState closeRect closeRect closeRect closeRect MouseDown minRect minImageState minRect minRect minRect minRect maxRect maxImageState maxRect maxRect maxRect maxRect chevronRect chevronImageState chevronImageState chevronImageState chevronRect chevronRect chevronRect chevronRect CTabItem selectedIndex selectedIndex getBounds selectedIndex getBounds closeRect closeImageState closeRect closeRect closeRect closeRect indexOf isShowing setSelection MouseMove minRect minImageState minImageState minImageState minRect minRect minRect minRect maxRect maxImageState maxImageState maxImageState maxRect maxRect maxRect maxRect chevronRect chevronImageState chevronImageState chevronImageState chevronRect chevronRect chevronRect chevronRect minImageState minImageState minRect minRect minRect minRect maxImageState maxImageState maxRect maxRect maxRect maxRect chevronImageState chevronImageState chevronRect chevronRect chevronRect chevronRect CTabItem getBounds closeRect closeImageState closeImageState closeImageState closeRect closeRect closeRect closeRect closeImageState closeImageState closeRect closeRect closeRect closeRect selectedIndex closeImageState closeImageState closeRect closeRect closeRect closeRect selectedIndex closeImageState closeImageState closeRect closeRect closeRect closeRect MouseUp chevronRect chevronImageState CTabFolderEvent CTabFolderEvent chevronRect chevronRect chevronRect chevronRect folderListeners folderListeners showList isDisposed showList chevronRect getDisplay cursorLocation getCursorLocation cursorLocation cursorLocation chevronImageState chevronRect cursorLocation chevronRect chevronRect chevronRect chevronRect minRect minImageState minImageState minRect minRect minRect minRect CTabFolderEvent CTabFolderEvent folderListeners folderListeners folderListeners maxRect maxImageState maxImageState maxRect maxRect maxRect maxRect CTabFolderEvent CTabFolderEvent folderListeners folderListeners folderListeners CTabItem selectedIndex selectedIndex getBounds selectedIndex getBounds closeRect closeImageState closeImageState closeRect closeRect closeRect closeRect CTabFolderEvent CTabFolderEvent folderListeners CTabFolder2Listener folderListeners tabListeners CTabFolderListener tabListeners itemClosed
boolean on Page Traversal Event event int count items length if count 0 return false int index selected Index if index 1 index 0 else int offset event detail SWT TRAVERSE PAGE NEXT 1 1 index selected Index offset count count set Selection index true return true  onPageTraversal selectedIndex TRAVERSE_PAGE_NEXT selectedIndex setSelection
void on Paint Event event Font font get Font if old Font null old Font equals font handle case where default font changes old Font font if update Tab Height false update Items redraw return GC gc event gc Font gc Font gc get Font Color gc Background gc get Background Color gc Foreground gc get Foreground Useful for debugging paint problems Point size get Size gc set Background get Display get System Color SWT COLOR GREEN gc fill Rectangle 10 10 size x 20 size y 20 draw Body event gc set Font gc Font gc set Foreground gc Foreground gc set Background gc Background draw Tab Area event gc set Font gc Font gc set Foreground gc Foreground gc set Background gc Background  onPaint getFont oldFont oldFont oldFont updateTabHeight updateItems gcFont getFont gcBackground getBackground gcForeground getForeground getSize setBackground getDisplay getSystemColor COLOR_GREEN fillRectangle drawBody setFont gcFont setForeground gcForeground setBackground gcBackground drawTabArea setFont gcFont setForeground gcForeground setBackground gcBackground
void on Resize if update Items redraw Tabs show Selection Point size get Size if old Size null redraw else if on Bottom size y old Size y redraw else int x1 Math min size x old Size x if size x old Size x x1 border Right highlight margin if simple x1 5 rounded top right corner int y1 Math min size y old Size y if size y old Size y y1 border Bottom highlight margin int x2 Math max size x old Size x int y2 Math max size y old Size y redraw 0 y1 x2 y2 y1 false redraw x1 0 x2 x1 y2 false old Size size resize content if selected Index 1 Control control items selected Index get Control if control null control is Disposed control set Bounds get Client Area  onResize updateItems redrawTabs showSelection getSize oldSize onBottom oldSize oldSize oldSize borderRight highlight_margin oldSize oldSize borderBottom highlight_margin oldSize oldSize oldSize selectedIndex selectedIndex getControl isDisposed setBounds getClientArea
void on Traverse Event event switch event detail case SWT TRAVERSE ESCAPE case SWT TRAVERSE RETURN case SWT TRAVERSE TAB NEXT case SWT TRAVERSE TAB PREVIOUS event doit true break case SWT TRAVERSE MNEMONIC event doit on Mnemonic event if event doit event detail SWT TRAVERSE NONE break case SWT TRAVERSE PAGE NEXT case SWT TRAVERSE PAGE PREVIOUS event doit on Page Traversal event event detail SWT TRAVERSE NONE break  onTraverse TRAVERSE_ESCAPE TRAVERSE_RETURN TRAVERSE_TAB_NEXT TRAVERSE_TAB_PREVIOUS TRAVERSE_MNEMONIC onMnemonic TRAVERSE_NONE TRAVERSE_PAGE_NEXT TRAVERSE_PAGE_PREVIOUS onPageTraversal TRAVERSE_NONE
void redraw Tabs Point size get Size if on Bottom redraw 0 size y border Bottom tab Height highlight header 1 size x border Bottom tab Height highlight header 1 false else redraw 0 0 size x border Top tab Height highlight header 1 false  redrawTabs getSize onBottom borderBottom tabHeight highlight_header borderBottom tabHeight highlight_header borderTop tabHeight highlight_header
Removes the listener param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 addC Tab Folder2 Listener C Tab Folder2 Listener since 3 0 public void removeC Tab Folder2 Listener C Tab Folder2 Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT if folder Listeners length 0 return int index 1 for int i 0 i folder Listeners length i if listener folder Listeners i index i break if index 1 return if folder Listeners length 1 folder Listeners new C Tab Folder2 Listener 0 return C Tab Folder2 Listener new Tab Listeners new C Tab Folder2 Listener folder Listeners length 1 System arraycopy folder Listeners 0 new Tab Listeners 0 index System arraycopy folder Listeners index 1 new Tab Listeners index folder Listeners length index 1 folder Listeners new Tab Listeners  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED addCTabFolder2Listener CTabFolder2Listener removeCTabFolder2Listener CTabFolder2Listener checkWidget ERROR_NULL_ARGUMENT folderListeners folderListeners folderListeners folderListeners folderListeners CTabFolder2Listener CTabFolder2Listener newTabListeners CTabFolder2Listener folderListeners folderListeners newTabListeners folderListeners newTabListeners folderListeners folderListeners newTabListeners
Removes the listener param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 deprecated see removeC Tab Folder Close Listener C Tab Folder Listener public void removeC Tab Folder Listener C Tab Folder Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT if tab Listeners length 0 return int index 1 for int i 0 i tab Listeners length i if listener tab Listeners i index i break if index 1 return if tab Listeners length 1 tab Listeners new C Tab Folder Listener 0 return C Tab Folder Listener new Tab Listeners new C Tab Folder Listener tab Listeners length 1 System arraycopy tab Listeners 0 new Tab Listeners 0 index System arraycopy tab Listeners index 1 new Tab Listeners index tab Listeners length index 1 tab Listeners new Tab Listeners  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED removeCTabFolderCloseListener CTabFolderListener removeCTabFolderListener CTabFolderListener checkWidget ERROR_NULL_ARGUMENT tabListeners tabListeners tabListeners tabListeners tabListeners CTabFolderListener CTabFolderListener newTabListeners CTabFolderListener tabListeners tabListeners newTabListeners tabListeners newTabListeners tabListeners tabListeners newTabListeners
Removes the listener param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 remove Selection Listener Selection Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT remove Listener SWT Selection listener remove Listener SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT removeListener removeListener DefaultSelection
remove Listener SWT Default Selection listener public void set Background Color color super set Background color redraw  removeListener DefaultSelection setBackground setBackground
Specify a gradient of colours to be drawn in the background of the unselected tabs For example to draw a gradient that varies from dark blue to blue and then to white use the following call to set Background pre cfolder set Background new Color display get System Color SWT COLOR DARK BLUE display get System Color SWT COLOR BLUE display get System Color SWT COLOR WHITE display get System Color SWT COLOR WHITE new int 25 50 100 pre param colors an array of Color that specifies the colors to appear in the gradient in order of appearance left to right The value code null code clears the background gradient The value code null code can be used inside the array of Color to specify the background color param percents an array of integers between 0 and 100 specifying the percent of the width of the widget at which the color should change The size of the percents array must be one less than the size of the colors array exception SWT Error 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 since 3 0 void set Background Color colors int percents set Background colors percents false  setBackground setBackground getSystemColor COLOR_DARK_BLUE getSystemColor COLOR_BLUE getSystemColor COLOR_WHITE getSystemColor COLOR_WHITE SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED setBackground setBackground
Specify a gradient of colours to be drawn in the background of the unselected tab For example to draw a vertical gradient that varies from dark blue to blue and then to white use the following call to set Background pre cfolder set Background new Color display get System Color SWT COLOR DARK BLUE display get System Color SWT COLOR BLUE display get System Color SWT COLOR WHITE display get System Color SWT COLOR WHITE new int 25 50 100 true pre param colors an array of Color that specifies the colors to appear in the gradient in order of appearance left to right The value code null code clears the background gradient The value code null code can be used inside the array of Color to specify the background color param percents an array of integers between 0 and 100 specifying the percent of the width of the widget at which the color should change The size of the percents array must be one less than the size of the colors array param vertical indicate the direction of the gradient True is vertical and false is horizontal exception SWT Error 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 since 3 0 void set Background Color colors int percents boolean vertical check Widget if colors null if percents null percents length colors length 1 SWT error SWT ERROR INVALID ARGUMENT for int i 0 i percents length i if percents i 0 percents i 100 SWT error SWT ERROR INVALID ARGUMENT if i 0 percents i percents i 1 SWT error SWT ERROR INVALID ARGUMENT if get Display get Depth 15 Don t use gradients on low color displays colors new Color colors colors length 1 percents new int Are these settings the same as before if bg Image null if gradient Colors null colors null gradient Colors length colors length boolean same false for int i 0 i gradient Colors length i if gradient Colors i null same colors i null else same gradient Colors i equals colors i if same break if same for int i 0 i gradient Percents length i same gradient Percents i percents i if same break if same this gradient Vertical vertical return else bg Image null Store the new settings if colors null gradient Colors null gradient Percents null gradient Vertical false set Background Color null else gradient Colors new Color colors length for int i 0 i colors length i gradient Colors i colors i gradient Percents new int percents length for int i 0 i percents length i gradient Percents i percents i gradient Vertical vertical set Background gradient Colors gradient Colors length 1 Refresh with the new settings redraw  setBackground setBackground getSystemColor COLOR_DARK_BLUE getSystemColor COLOR_BLUE getSystemColor COLOR_WHITE getSystemColor COLOR_WHITE SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED setBackground checkWidget ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT getDisplay getDepth bgImage gradientColors gradientColors gradientColors gradientColors gradientColors gradientPercents gradientPercents gradientVertical bgImage gradientColors gradientPercents gradientVertical setBackground gradientColors gradientColors gradientPercents gradientPercents gradientVertical setBackground gradientColors gradientColors
Set the image to be drawn in the background of the unselected tab Image is stretched or compressed to cover entire unselected tab area param image the image to be drawn in the background 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 since 3 0 void set Background Image image check Widget if image bg Image return if image null gradient Colors null gradient Percents null bg Image image redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setBackground checkWidget bgImage gradientColors gradientPercents bgImage
Toggle the visibility of the border param show true if the border should be displayed 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 set Border Visible boolean show check Widget if border Left 1 show return border Left border Right show 1 0 border Top on Bottom border Left 0 border Bottom on Bottom 0 border Left Rectangle rect Before get Client Area update Items Rectangle rect After get Client Area if rect Before equals rect After notify Listeners SWT Resize new Event redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setBorderVisible checkWidget borderLeft borderLeft borderRight borderTop onBottom borderLeft borderBottom onBottom borderLeft rectBefore getClientArea updateItems rectAfter getClientArea rectBefore rectAfter notifyListeners
void set Button Bounds Point size get Size int oldX oldY old Width old Height max button oldX max Rect x oldY max Rect y old Width max Rect width old Height max Rect height max Rect x max Rect y max Rect width max Rect height 0 if show Max max Rect x size x border Right BUTTON SIZE 3 if border Right 0 max Rect x 1 max Rect y on Bottom size y border Bottom tab Height tab Height BUTTON SIZE 2 border Top tab Height BUTTON SIZE 2 max Rect width BUTTON SIZE max Rect height BUTTON SIZE if oldX max Rect x old Width max Rect width oldY max Rect y old Height max Rect height int left Math min oldX max Rect x int right Math max oldX old Width max Rect x max Rect width int top on Bottom size y border Bottom tab Height border Top 1 redraw left top right left tab Height false min button oldX min Rect x oldY min Rect y old Width min Rect width old Height min Rect height min Rect x min Rect y min Rect width min Rect height 0 if show Min min Rect x size x border Right max Rect width BUTTON SIZE 3 if border Right 0 min Rect x 1 min Rect y on Bottom size y border Bottom tab Height tab Height BUTTON SIZE 2 border Top tab Height BUTTON SIZE 2 min Rect width BUTTON SIZE min Rect height BUTTON SIZE if oldX min Rect x old Width min Rect width oldY min Rect y old Height min Rect height int left Math min oldX min Rect x int right Math max oldX old Width min Rect x min Rect width int top on Bottom size y border Bottom tab Height border Top 1 redraw left top right left tab Height false top right control oldX top Right Rect x oldY top Right Rect y old Width top Right Rect width old Height top Right Rect height top Right Rect x top Right Rect y top Right Rect width top Right Rect height 0 if top Right null switch top Right Alignment case SWT FILL int right Edge size x border Right 3 max Rect width min Rect width if single if items length 0 selected Index 1 top Right Rect x border Left 3 top Right Rect width right Edge top Right Rect x else fill size is 0 if item compressed C Tab Item item items selected Index if item x item width 7 3 BUTTON SIZE 2 right Edge break top Right Rect x item x item width 7 3 BUTTON SIZE 2 top Right Rect width right Edge top Right Rect x else fill size is 0 if chevron showing if show Chevron break if items length 0 top Right Rect x border Left 3 else C Tab Item item items items length 1 top Right Rect x item x item width if simple items length 1 selected Index top Right Rect x curve Width curve Indent top Right Rect width Math max 0 right Edge top Right Rect x top Right Rect y on Bottom size y border Bottom tab Height border Top 1 top Right Rect height tab Height 1 break case SWT RIGHT Point top Right Size top Right compute Size SWT DEFAULT tab Height int right Edge size x border Right 3 max Rect width min Rect width top Right Rect x right Edge top Right Size x top Right Rect width top Right Size x top Right Rect y on Bottom size y border Bottom tab Height border Top 1 top Right Rect height tab Height 1 top Right set Bounds top Right Rect if oldX top Right Rect x old Width top Right Rect width oldY top Right Rect y old Height top Right Rect height chevron button oldX chevron Rect x oldY chevron Rect y old Width chevron Rect width old Height chevron Rect height chevron Rect x chevron Rect y chevron Rect height chevron Rect width 0 if single if selected Index 1 items length 1 chevron Rect width 3 BUTTON SIZE 2 chevron Rect height BUTTON SIZE chevron Rect y on Bottom size y border Bottom tab Height tab Height chevron Rect height 2 border Top tab Height chevron Rect height 2 if selected Index 1 chevron Rect x size x border Right 3 min Rect width max Rect width top Right Rect width chevron Rect width else C Tab Item item items selected Index int w size x border Right 3 min Rect width max Rect width chevron Rect width if top Right Rect width 0 w top Right Rect width 3 chevron Rect x Math min item x item width 3 w if border Right 0 chevron Rect x 1 else if show Chevron chevron Rect width 3 BUTTON SIZE 2 chevron Rect height BUTTON SIZE int last Index get Last Index C Tab Item last Item items last Index int w last Item x last Item width 3 if simple last Index selected Index w curve Width 2 curve Indent chevron Rect x Math min w get Right Item Edge chevron Rect y on Bottom size y border Bottom tab Height tab Height chevron Rect height 2 border Top tab Height chevron Rect height 2 if oldX chevron Rect x old Width chevron Rect width oldY chevron Rect y old Height chevron Rect height int left Math min oldX chevron Rect x int right Math max oldX old Width chevron Rect x chevron Rect width int top on Bottom size y border Bottom tab Height border Top 1 redraw left top right left tab Height false  setButtonBounds getSize oldWidth oldHeight maxRect maxRect oldWidth maxRect oldHeight maxRect maxRect maxRect maxRect maxRect showMax maxRect borderRight BUTTON_SIZE borderRight maxRect maxRect onBottom borderBottom tabHeight tabHeight BUTTON_SIZE borderTop tabHeight BUTTON_SIZE maxRect BUTTON_SIZE maxRect BUTTON_SIZE maxRect oldWidth maxRect maxRect oldHeight maxRect maxRect oldWidth maxRect maxRect onBottom borderBottom tabHeight borderTop tabHeight minRect minRect oldWidth minRect oldHeight minRect minRect minRect minRect minRect showMin minRect borderRight maxRect BUTTON_SIZE borderRight minRect minRect onBottom borderBottom tabHeight tabHeight BUTTON_SIZE borderTop tabHeight BUTTON_SIZE minRect BUTTON_SIZE minRect BUTTON_SIZE minRect oldWidth minRect minRect oldHeight minRect minRect oldWidth minRect minRect onBottom borderBottom tabHeight borderTop tabHeight topRightRect topRightRect oldWidth topRightRect oldHeight topRightRect topRightRect topRightRect topRightRect topRightRect topRight topRightAlignment rightEdge borderRight maxRect minRect selectedIndex topRightRect borderLeft topRightRect rightEdge topRightRect CTabItem selectedIndex BUTTON_SIZE rightEdge topRightRect BUTTON_SIZE topRightRect rightEdge topRightRect showChevron topRightRect borderLeft CTabItem topRightRect selectedIndex topRightRect curveWidth curveIndent topRightRect rightEdge topRightRect topRightRect onBottom borderBottom tabHeight borderTop topRightRect tabHeight topRightSize topRight computeSize tabHeight rightEdge borderRight maxRect minRect topRightRect rightEdge topRightSize topRightRect topRightSize topRightRect onBottom borderBottom tabHeight borderTop topRightRect tabHeight topRight setBounds topRightRect topRightRect oldWidth topRightRect topRightRect oldHeight topRightRect chevronRect chevronRect oldWidth chevronRect oldHeight chevronRect chevronRect chevronRect chevronRect chevronRect selectedIndex chevronRect BUTTON_SIZE chevronRect BUTTON_SIZE chevronRect onBottom borderBottom tabHeight tabHeight chevronRect borderTop tabHeight chevronRect selectedIndex chevronRect borderRight minRect maxRect topRightRect chevronRect CTabItem selectedIndex borderRight minRect maxRect chevronRect topRightRect topRightRect chevronRect borderRight chevronRect showChevron chevronRect BUTTON_SIZE chevronRect BUTTON_SIZE lastIndex getLastIndex CTabItem lastItem lastIndex lastItem lastItem lastIndex selectedIndex curveWidth curveIndent chevronRect getRightItemEdge chevronRect onBottom borderBottom tabHeight tabHeight chevronRect borderTop tabHeight chevronRect chevronRect oldWidth chevronRect chevronRect oldHeight chevronRect chevronRect oldWidth chevronRect chevronRect onBottom borderBottom tabHeight borderTop tabHeight
void set First Item int index if index 0 index items length 1 return if index first Index return first Index index set Item Location set Button Bounds redraw Tabs  setFirstItem firstIndex firstIndex setItemLocation setButtonBounds redrawTabs
public void set Font Font font check Widget if font null font equals get Font return super set Font font old Font get Font if update Tab Height false update Items redraw  setFont checkWidget getFont setFont oldFont getFont updateTabHeight updateItems
public void set Foreground Color color super set Foreground color redraw  setForeground setForeground
Display an insert marker before or after the specified tab item A value of null will clear the mark param item the item with which the mark is associated or null param after true if the mark should be displayed after the specified item 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 set Insert Mark C Tab Item item boolean after check Widget int index 1 if item null index index Of item set Insert Mark index after  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setInsertMark CTabItem checkWidget indexOf setInsertMark
Display an insert marker before or after the specified tab item A value of 1 will clear the mark param index the index of the item with which the mark is associated or null param after true if the mark should be displayed after the specified item exception Illegal Argument Exception ul ul 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 set Insert Mark int index boolean after check Widget if index 1 index get Item Count SWT error SWT ERROR INVALID ARGUMENT if index 1 index 2 else index after index index if insertion Index index return int old Index insertion Index insertion Index index if index 1 redraw Tab Area index if old Index 1 redraw Tab Area old Index  IllegalArgumentException SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setInsertMark checkWidget getItemCount ERROR_INVALID_ARGUMENT insertionIndex oldIndex insertionIndex insertionIndex redrawTabArea oldIndex redrawTabArea oldIndex
boolean set Item Location boolean changed false if items length 0 return false Point size get Size int y on Bottom Math max border Bottom size y border Bottom tab Height border Top if single int defaultX size x 10 off screen for int i 0 i items length i if i selected Index C Tab Item item items selected Index int oldX item x oldY item y item x border Left item y y if show Close item show Close item close Rect x border Left C Tab Item LEFT MARGIN item close Rect y on Bottom size y border Bottom tab Height tab Height BUTTON SIZE 2 border Top tab Height BUTTON SIZE 2 if item x oldX item y oldY changed true else items i x defaultX else int x 1 for int i first Index 1 i 0 i if the first visible tab is not the first tab C Tab Item item items i x item width layout tab items from right to left thus making them invisible item x x item y y item close Rect x item x item width BUTTON SIZE C Tab Item RIGHT MARGIN item close Rect y on Bottom size y border Bottom tab Height tab Height BUTTON SIZE 2 border Top tab Height BUTTON SIZE 2 x 0 int right Item Edge get Right Item Edge for int i first Index i items length i continue laying out remaining visible items left to right C Tab Item item items i if item x x item y y changed true item x x item y y if i selected Index int edge Math min item x item width right Item Edge item close Rect x edge C Tab Item RIGHT MARGIN BUTTON SIZE else item close Rect x item x item width C Tab Item RIGHT MARGIN BUTTON SIZE item close Rect y on Bottom size y border Bottom tab Height tab Height BUTTON SIZE 2 border Top tab Height BUTTON SIZE 2 x x item width if simple i selected Index x curve Width 2 curve Indent return changed  setItemLocation getSize onBottom borderBottom borderBottom tabHeight borderTop selectedIndex CTabItem selectedIndex borderLeft showClose showClose closeRect borderLeft CTabItem LEFT_MARGIN closeRect onBottom borderBottom tabHeight tabHeight BUTTON_SIZE borderTop tabHeight BUTTON_SIZE firstIndex CTabItem closeRect BUTTON_SIZE CTabItem RIGHT_MARGIN closeRect onBottom borderBottom tabHeight tabHeight BUTTON_SIZE borderTop tabHeight BUTTON_SIZE rightItemEdge getRightItemEdge firstIndex CTabItem selectedIndex rightItemEdge closeRect CTabItem RIGHT_MARGIN BUTTON_SIZE closeRect CTabItem RIGHT_MARGIN BUTTON_SIZE closeRect onBottom borderBottom tabHeight tabHeight BUTTON_SIZE borderTop tabHeight BUTTON_SIZE selectedIndex curveWidth curveIndent
boolean set Item Size boolean changed false if is Disposed return changed show Chevron false Point size get Size if size x 0 size y 0 return changed x Client border Left margin Width highlight margin if on Bottom y Client border Top highlight margin margin Height else y Client border Top tab Height highlight header margin Height if single show Chevron true if selected Index 1 C Tab Item tab items selected Index GC gc new GC this int width tab preferred Width gc true false gc dispose width Math min width get Right Item Edge border Left if tab height tab Height tab width width changed true tab shortened Text null tab shortened Text Width 0 tab height tab Height tab width width tab close Rect width tab close Rect height 0 if show Close tab show Close tab close Rect width BUTTON SIZE tab close Rect height BUTTON SIZE return changed int widths new int items length widths new int items length GC gc new GC this for int i 0 i items length i widths i items i preferred Width gc i selected Index false if items length 0 int total Width 0 int tab Area Width size x border Left border Right 3 if show Min tab Area Width BUTTON SIZE if show Max tab Area Width BUTTON SIZE if top Right Alignment SWT RIGHT top Right null tab Area Width top Right compute Size SWT DEFAULT SWT DEFAULT x 3 if simple tab Area Width curve Width 2 curve Indent tab Area Width Math max 0 tab Area Width int count items length for int i 0 i count i total Width widths i if total Width tab Area Width no compression required first Index 0 else try to compress items total Width 0 int large 0 int min Widths new int items length for int i 0 i count i min Widths i items i preferred Width gc i selected Index true total Width Math min widths i min Widths i if widths i min Widths i large if total Width tab Area Width maximum compression required and a chevron show Chevron items length 1 if show Chevron tab Area Width 3 BUTTON SIZE 2 for int i 0 i count i int min Width Math min tab Area Width min Widths i widths i Math min widths i min Width else first Index 0 determine compression for each item int extra tab Area Width total Width large while true total Width 0 large 0 for int i 0 i count i total Width Math min widths i min Widths i extra if widths i min Widths i extra large if total Width tab Area Width extra break if large 0 tab Area Width total Width large break extra for int i 0 i items length i widths i Math min widths i min Widths i extra for int i 0 i items length i C Tab Item tab items i int width widths i if tab height tab Height tab width width changed true tab shortened Text null tab shortened Text Width 0 tab height tab Height tab width width tab close Rect width tab close Rect height 0 if show Close tab show Close if i selected Index show Unselected Close tab close Rect width BUTTON SIZE tab close Rect height BUTTON SIZE gc dispose return changed  setItemSize isDisposed showChevron getSize xClient borderLeft marginWidth highlight_margin onBottom yClient borderTop highlight_margin marginHeight yClient borderTop tabHeight highlight_header marginHeight showChevron selectedIndex CTabItem selectedIndex preferredWidth getRightItemEdge borderLeft tabHeight shortenedText shortenedTextWidth tabHeight closeRect closeRect showClose showClose closeRect BUTTON_SIZE closeRect BUTTON_SIZE preferredWidth selectedIndex totalWidth tabAreaWidth borderLeft borderRight showMin tabAreaWidth BUTTON_SIZE showMax tabAreaWidth BUTTON_SIZE topRightAlignment topRight tabAreaWidth topRight computeSize tabAreaWidth curveWidth curveIndent tabAreaWidth tabAreaWidth totalWidth totalWidth tabAreaWidth firstIndex totalWidth minWidths minWidths preferredWidth selectedIndex totalWidth minWidths minWidths totalWidth tabAreaWidth showChevron showChevron tabAreaWidth BUTTON_SIZE minWidth tabAreaWidth minWidths minWidth firstIndex tabAreaWidth totalWidth totalWidth totalWidth minWidths minWidths totalWidth tabAreaWidth tabAreaWidth totalWidth minWidths CTabItem tabHeight shortenedText shortenedTextWidth tabHeight closeRect closeRect showClose showClose selectedIndex showUnselectedClose closeRect BUTTON_SIZE closeRect BUTTON_SIZE
void set Last Index int index if show Chevron single index 0 index items length 1 return Point size get Size if size x 0 return int max Width get Right Item Edge border Left if single simple max Width curve Width 2 curve Indent int tab Width items index width while index 0 tab Width items index 1 width if tab Width max Width break index if first Index index return first Index index set Item Location set Button Bounds redraw Tabs  setLastIndex showChevron getSize maxWidth getRightItemEdge borderLeft maxWidth curveWidth curveIndent tabWidth tabWidth tabWidth maxWidth firstIndex firstIndex setItemLocation setButtonBounds redrawTabs
Marks the receiver s maximize button as visible if the argument is code true code and marks it invisible otherwise param visible the new visibility 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 since 3 0 public void set Maximize Visible boolean visible check Widget if show Max visible return display maximize button show Max visible update Items redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMaximizeVisible checkWidget showMax showMax updateItems
Sets the maximized state of the receiver param maximize the new maximized 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 since 3 0 public void set Maximized boolean maximize check Widget if this maximized maximize return if maximize this minimized set Minimized false this maximized maximize redraw max Rect x max Rect y max Rect width max Rect height false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMaximized checkWidget setMinimized maxRect maxRect maxRect maxRect
Marks the receiver s minimize button as visible if the argument is code true code and marks it invisible otherwise param visible the new visibility 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 since 3 0 public void set Minimize Visible boolean visible check Widget if show Min visible return display maximize button show Min visible update Items redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMinimizeVisible checkWidget showMin showMin updateItems
Sets the minimized state of the receiver param minimize the new minimized 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 since 3 0 public void set Minimized boolean minimize check Widget if this minimized minimize return if minimize this maximized set Maximized false this minimized minimize redraw min Rect x min Rect y min Rect width min Rect height false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMinimized checkWidget setMaximized minRect minRect minRect minRect
Sets the minimum number of characters that will be displayed in a fully compressed tab param count the minimum number of characters that will be displayed in a fully compressed tab 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 li ERROR INVALID RANGE if the count is less than zero li ul since 3 0 public void set Minimum Characters int count check Widget if count 0 SWT error SWT ERROR INVALID RANGE if min Chars count return min Chars count if update Items redraw Tabs  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_RANGE setMinimumCharacters checkWidget ERROR_INVALID_RANGE minChars minChars updateItems redrawTabs
Set the selection to the tab at the specified item param item the tab item to be selected exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Error 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 set Selection C Tab Item item check Widget if item null SWT error SWT ERROR NULL ARGUMENT int index index Of item set Selection index  IllegalArgumentException ERROR_NULL_ARGUMENT SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED setSelection CTabItem checkWidget ERROR_NULL_ARGUMENT indexOf setSelection
Set the selection to the tab at the specified index param index the index of the tab item to be selected 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 set Selection int index check Widget if index 0 index items length return if selected Index index show Item items index return int old Index selected Index selected Index index if old Index 1 items old Index close Image State NONE items selected Index close Image State NORMAL Control control items index control if control null control is Disposed control set Bounds get Client Area control set Visible true if old Index 1 control items old Index control if control null control is Disposed control set Visible false update Items redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget selectedIndex showItem oldIndex selectedIndex selectedIndex oldIndex oldIndex closeImageState selectedIndex closeImageState isDisposed setBounds getClientArea setVisible oldIndex oldIndex isDisposed setVisible updateItems
void set Selection int index boolean notify int old Selected Index selected Index set Selection index if notify selected Index old Selected Index selected Index 1 Event event new Event event item get Item selected Index notify Listeners SWT Selection event  setSelection oldSelectedIndex selectedIndex setSelection selectedIndex oldSelectedIndex selectedIndex getItem selectedIndex notifyListeners
Sets the receiver s selection background color to the color specified by the argument or to the default system color for the control if the argument is null param color the new color or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 3 0 public void set Selection Background Color color check Widget if selection Background color return if color null color get Display get System Color SELECTION BACKGROUND selection Background color if selected Index 1 redraw  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelectionBackground checkWidget selectionBackground getDisplay getSystemColor SELECTION_BACKGROUND selectionBackground selectedIndex
Specify a gradient of colours to be draw in the background of the selected tab For example to draw a gradient that varies from dark blue to blue and then to white use the following call to set Background pre cfolder set Background new Color display get System Color SWT COLOR DARK BLUE display get System Color SWT COLOR BLUE display get System Color SWT COLOR WHITE display get System Color SWT COLOR WHITE new int 25 50 100 pre param colors an array of Color that specifies the colors to appear in the gradient in order of appearance left to right The value code null code clears the background gradient The value code null code can be used inside the array of Color to specify the background color param percents an array of integers between 0 and 100 specifying the percent of the width of the widget at which the color should change The size of the percents array must be one less than the size of the colors array exception SWT Error 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 set Selection Background Color colors int percents set Selection Background colors percents false  setBackground setBackground getSystemColor COLOR_DARK_BLUE getSystemColor COLOR_BLUE getSystemColor COLOR_WHITE getSystemColor COLOR_WHITE SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED setSelectionBackground setSelectionBackground
Specify a gradient of colours to be draw in the background of the selected tab For example to draw a vertical gradient that varies from dark blue to blue and then to white use the following call to set Background pre cfolder set Background new Color display get System Color SWT COLOR DARK BLUE display get System Color SWT COLOR BLUE display get System Color SWT COLOR WHITE display get System Color SWT COLOR WHITE new int 25 50 100 true pre param colors an array of Color that specifies the colors to appear in the gradient in order of appearance left to right The value code null code clears the background gradient The value code null code can be used inside the array of Color to specify the background color param percents an array of integers between 0 and 100 specifying the percent of the width of the widget at which the color should change The size of the percents array must be one less than the size of the colors array param vertical indicate the direction of the gradient True is vertical and false is horizontal exception SWT Error 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 since 3 0 public void set Selection Background Color colors int percents boolean vertical check Widget if colors null if percents null percents length colors length 1 SWT error SWT ERROR INVALID ARGUMENT for int i 0 i percents length i if percents i 0 percents i 100 SWT error SWT ERROR INVALID ARGUMENT if i 0 percents i percents i 1 SWT error SWT ERROR INVALID ARGUMENT if get Display get Depth 15 Don t use gradients on low color displays colors new Color colors colors length 1 percents new int Are these settings the same as before if selection Bg Image null if selection Gradient Colors null colors null selection Gradient Colors length colors length boolean same false for int i 0 i selection Gradient Colors length i if selection Gradient Colors i null same colors i null else same selection Gradient Colors i equals colors i if same break if same for int i 0 i selection Gradient Percents length i same selection Gradient Percents i percents i if same break if same this selection Gradient Vertical vertical return else selection Bg Image null Store the new settings if colors null selection Gradient Colors null selection Gradient Percents null selection Gradient Vertical false set Selection Background Color null else selection Gradient Colors new Color colors length for int i 0 i colors length i selection Gradient Colors i colors i selection Gradient Percents new int percents length for int i 0 i percents length i selection Gradient Percents i percents i selection Gradient Vertical vertical set Selection Background selection Gradient Colors selection Gradient Colors length 1 Refresh with the new settings if selected Index 1 redraw  setBackground setBackground getSystemColor COLOR_DARK_BLUE getSystemColor COLOR_BLUE getSystemColor COLOR_WHITE getSystemColor COLOR_WHITE SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED setSelectionBackground checkWidget ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT getDisplay getDepth selectionBgImage selectionGradientColors selectionGradientColors selectionGradientColors selectionGradientColors selectionGradientColors selectionGradientPercents selectionGradientPercents selectionGradientVertical selectionBgImage selectionGradientColors selectionGradientPercents selectionGradientVertical setSelectionBackground selectionGradientColors selectionGradientColors selectionGradientPercents selectionGradientPercents selectionGradientVertical setSelectionBackground selectionGradientColors selectionGradientColors selectedIndex
Set the image to be drawn in the background of the selected tab Image is stretched or compressed to cover entire selection tab area param image the image to be drawn in the background 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 set Selection Background Image image check Widget if image selection Bg Image return if image null selection Gradient Colors null selection Gradient Percents null selection Bg Image image if selected Index 1 redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelectionBackground checkWidget selectionBgImage selectionGradientColors selectionGradientPercents selectionBgImage selectedIndex
Set the foreground color of the selected tab param color the color of the text displayed in the selected tab 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 set Selection Foreground Color color check Widget if selection Foreground color return if color null color get Display get System Color SELECTION FOREGROUND selection Foreground color if selected Index 1 redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelectionForeground checkWidget selectionForeground getDisplay getSystemColor SELECTION_FOREGROUND selectionForeground selectedIndex
Sets the shape that the C Tab Folder will use to render itself param simple code true code if the C Tab Folder should render itself in a simple traditional style 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 since 3 0 public void set Simple boolean simple check Widget if this simple simple this simple simple Rectangle rect Before get Client Area update Items Rectangle rect After get Client Area if rect Before equals rect After notify Listeners SWT Resize new Event redraw  CTabFolder CTabFolder SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSimple checkWidget rectBefore getClientArea updateItems rectAfter getClientArea rectBefore rectAfter notifyListeners
Sets the number of tabs that the C Tab Folder should display param single code true code if only the selected tab should be displayed otherwise multiple tabs will be shown 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 since 3 0 public void set Single boolean single check Widget if this single single this single single if single for int i 0 i items length i if i selected Index items i close Image State NORMAL items i close Image State NONE Rectangle rect Before get Client Area update Items Rectangle rect After get Client Area if rect Before equals rect After notify Listeners SWT Resize new Event redraw  CTabFolder SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSingle checkWidget selectedIndex closeImageState closeImageState rectBefore getClientArea updateItems rectAfter getClientArea rectBefore rectAfter notifyListeners
Specify a fixed height for the tab items If no height is specified the default height is the height of the text or the image whichever is greater Specifying a height of 1 will revert to the default height param height the pixel value of the height or 1 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 li ERROR INVALID ARGUMENT if called with a height of less than 0 li ul public void set Tab Height int height check Widget if height 1 SWT error SWT ERROR INVALID ARGUMENT fixed Tab Height height update Tab Height false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT setTabHeight checkWidget ERROR_INVALID_ARGUMENT fixedTabHeight updateTabHeight
Specify whether the tabs should appear along the top of the folder or along the bottom of the folder param position code SWT TOP code for tabs along the top or code SWT BOTTOM code for tabs along the bottom 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 li ERROR INVALID ARGUMENT if the position value is not either SWT TOP or SWT BOTTOM li ul since 3 0 public void set Tab Position int position check Widget if position SWT TOP position SWT BOTTOM SWT error SWT ERROR INVALID ARGUMENT if on Bottom position SWT BOTTOM on Bottom position SWT BOTTOM border Top on Bottom border Left 0 border Bottom on Bottom 0 border Right update Tab Height true Rectangle rect Before get Client Area update Items Rectangle rect After get Client Area if rect Before equals rect After notify Listeners SWT Resize new Event redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT setTabPosition checkWidget ERROR_INVALID_ARGUMENT onBottom onBottom borderTop onBottom borderLeft borderBottom onBottom borderRight updateTabHeight rectBefore getClientArea updateItems rectAfter getClientArea rectBefore rectAfter notifyListeners
Set the control that appears in the top right corner of the tab folder Typically this is a close button or a composite with a Menu and close button The top Right control is optional Setting the top right control to null will remove it from the tab folder param control the control to be displayed in the top right corner or null 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 li ERROR INVALID ARGUMENT if the control is not a child of this C Tab Folder li ul since 2 1 public void set Top Right Control control set Top Right control SWT RIGHT  topRight SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT CTabFolder setTopRight setTopRight
Set the control that appears in the top right corner of the tab folder Typically this is a close button or a composite with a Menu and close button The top Right control is optional Setting the top right control to null will remove it from the tab folder p The alignment parameter sets the layout of the control in the tab area code SWT RIGHT code will cause the control to be positioned on the far right of the folder and it will have its default size code SWT FILL code will size the control to fill all the available space to the right of the last tab If there is no available space the control will not be visible p param control the control to be displayed in the top right corner or null param alignment code SWT RIGHT code or code SWT FILL code 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 li ERROR INVALID ARGUMENT if the control is not a child of this C Tab Folder li ul since 3 0 public void set Top Right Control control int alignment check Widget if alignment SWT RIGHT alignment SWT FILL SWT error SWT ERROR INVALID ARGUMENT if control null control get Parent this SWT error SWT ERROR INVALID ARGUMENT top Right control top Right Alignment alignment if update Items redraw  topRight SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT CTabFolder setTopRight checkWidget ERROR_INVALID_ARGUMENT getParent ERROR_INVALID_ARGUMENT topRight topRightAlignment updateItems
Specify whether the close button appears when the user hovers over an unselected tabs param visible code true code makes the close button appear 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 since 3 0 public void set Unselected Close Visible boolean visible check Widget if show Unselected Close visible return display close button when mouse hovers show Unselected Close visible update Items redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setUnselectedCloseVisible checkWidget showUnselectedClose showUnselectedClose updateItems
Specify whether the image appears on unselected tabs param visible code true code makes the image appear 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 since 3 0 public void set Unselected Image Visible boolean visible check Widget if show Unselected Image visible return display image on unselected items show Unselected Image visible update Items redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setUnselectedImageVisible checkWidget showUnselectedImage showUnselectedImage updateItems
Shows the item If the item is already showing in the receiver this method simply returns Otherwise the items are scrolled until the item is visible param item the item to be shown exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the item is null li li ERROR INVALID ARGUMENT if the item has been disposed li ul 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 C Tab Folder show Selection since 2 0 public void show Item C Tab Item item check Widget if item null SWT error SWT ERROR NULL ARGUMENT if item is Disposed SWT error SWT ERROR INVALID ARGUMENT if item is Showing return Point size get Size int index index Of item if size x border Left border Right index first Index set First Item index else set Last Index index  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS CTabFolder showSelection showItem CTabItem checkWidget ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT isShowing getSize indexOf borderLeft borderRight firstIndex setFirstItem setLastIndex
item add Selection Listener new Selection Adapter public void widget Selected Selection Event e Menu Item menu Item Menu Item e widget int index index Of C Tab Item menu Item get Data id C Tab Folder this set Selection index true  addSelectionListener SelectionAdapter widgetSelected SelectionEvent MenuItem menuItem MenuItem indexOf CTabItem menuItem getData CTabFolder setSelection
void show List Rectangle rect if items length 0 return if all items are showing no list is required int last Index get Last Index if single first Index 0 last Index items length 1 return if single items length 1 selected Index 1 return Menu menu new Menu this final String id CTabFolder showList Index NON NLS 1 for int i 0 i items length i if single if i selected Index continue else if i first Index i last Index continue C Tab Item tab items i Menu Item item new Menu Item menu SWT NONE item set Text tab get Text item set Image tab get Image item set Data id tab item add Selection Listener new Selection Adapter public void widget Selected Selection Event e Menu Item menu Item Menu Item e widget int index index Of C Tab Item menu Item get Data id C Tab Folder this set Selection index true int x rect x int y rect y rect height Point location get Display map this null x y menu set Location location x location y menu set Visible true Display display get Display while menu is Disposed menu is Visible if display read And Dispatch display sleep menu dispose  showList lastIndex getLastIndex firstIndex lastIndex selectedIndex CTabFolder_showList_Index selectedIndex firstIndex lastIndex CTabItem MenuItem MenuItem setText getText setImage getImage setData addSelectionListener SelectionAdapter widgetSelected SelectionEvent MenuItem menuItem MenuItem indexOf CTabItem menuItem getData CTabFolder setSelection getDisplay setLocation setVisible getDisplay isDisposed isVisible readAndDispatch
Shows the selection If the selection is already showing in the receiver this method simply returns Otherwise the items are scrolled until the selection is visible 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 C Tab Folder show Item C Tab Item since 2 0 public void show Selection check Widget if selected Index 1 show Item get Selection  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS CTabFolder showItem CTabItem showSelection checkWidget selectedIndex showItem getSelection
void hide Tool Tip if tool Tip Shell null return for int i 0 i tool Tip Events length i remove Listener tool Tip Events i tool Tip Listener tool Tip Shell dispose tool Tip Shell null tool Tip Label null  hideToolTip toolTipShell toolTipEvents removeListener toolTipEvents toolTipListener toolTipShell toolTipShell toolTipLabel
void show Tool Tip int x int y if tool Tip Shell null tool Tip Shell new Shell get Shell SWT ON TOP tool Tip Label new Label tool Tip Shell SWT CENTER Display display tool Tip Shell get Display tool Tip Label set Foreground display get System Color SWT COLOR INFO FOREGROUND tool Tip Label set Background display get System Color SWT COLOR INFO BACKGROUND for int i 0 i tool Tip Events length i add Listener tool Tip Events i tool Tip Listener if update Tool Tip x y tool Tip Shell set Visible true else hide Tool Tip  showToolTip toolTipShell toolTipShell getShell ON_TOP toolTipLabel toolTipShell toolTipShell getDisplay toolTipLabel setForeground getSystemColor COLOR_INFO_FOREGROUND toolTipLabel setBackground getSystemColor COLOR_INFO_BACKGROUND toolTipEvents addListener toolTipEvents toolTipListener updateToolTip toolTipShell setVisible hideToolTip
boolean update Items boolean changed false boolean old Show Chevron show Chevron if set Item Size changed true if set Item Location changed true if items length 0 C Tab Item item items items length 1 if item x item width get Right Item Edge int first first Index set Last Index items length 1 if first first Index changed true set Button Bounds if selected Index 1 int top first Index show Item items selected Index if top first Index changed true if show Chevron old Show Chevron changed true if changed tool Tip Shell null Point pt get Display get Cursor Location pt to Control pt if update Tool Tip pt x pt y hide Tool Tip return changed  updateItems oldShowChevron showChevron setItemSize setItemLocation CTabItem getRightItemEdge firstIndex setLastIndex firstIndex setButtonBounds selectedIndex firstIndex showItem selectedIndex firstIndex showChevron oldShowChevron toolTipShell getDisplay getCursorLocation toControl updateToolTip hideToolTip
boolean update Tab Height boolean force int old Height tab Height if fixed Tab Height SWT DEFAULT tab Height fixed Tab Height 0 0 fixed Tab Height 1 1 for line drawn across top of tab else int temp Height 0 GC gc new GC this for int i 0 i items length i temp Height Math max temp Height items i preferred Height gc gc dispose tab Height temp Height if force tab Height old Height return false old Size null if on Bottom int d tab Height 12 curve new int 0 13 d 0 12 d 2 12 d 3 11 d 5 11 d 6 10 d 7 10 d 9 8 d 10 8 d 11 7 d 11 d 7 12 d 6 13 d 6 15 d 4 16 d 4 17 d 3 19 d 3 20 d 2 22 d 2 23 d 1 curve Width 26 d curve Indent curve Width 3 else int d tab Height 12 curve new int 0 0 0 1 2 1 3 2 5 2 6 3 7 3 9 5 10 5 11 6 11 d 6 d 12 d 7 d 13 d 7 d 15 d 9 d 16 d 9 d 17 d 10 d 19 d 10 d 20 d 11 d 22 d 11 d 23 d 12 d curve Width 26 d curve Indent curve Width 3 notify Listeners SWT Resize new Event return true  updateTabHeight oldHeight tabHeight fixedTabHeight tabHeight fixedTabHeight fixedTabHeight tempHeight tempHeight tempHeight preferredHeight tabHeight tempHeight tabHeight oldHeight oldSize onBottom tabHeight curveWidth curveIndent curveWidth tabHeight curveWidth curveIndent curveWidth notifyListeners
String  getToolTip int x int y if show Min min Rect contains x y return minimized SWT get Message SWT Restore SWT get Message SWT Minimize NON NLS 1 NON NLS 2 if show Max max Rect contains x y return maximized SWT get Message SWT Restore SWT get Message SWT Maximize NON NLS 1 NON NLS 2 if show Chevron chevron Rect contains x y return SWT get Message SWT ShowList NON NLS 1 C Tab Item item get Item new Point x y if item null return null if item is Showing return null if show Close item show Close item close Rect contains x y return SWT get Message SWT Close NON NLS 1 return item get Tool Tip Text  _getToolTip showMin minRect getMessage SWT_Restore getMessage SWT_Minimize showMax maxRect getMessage SWT_Restore getMessage SWT_Maximize showChevron chevronRect getMessage SWT_ShowList CTabItem getItem isShowing showClose showClose closeRect getMessage SWT_Close getToolTipText
boolean update Tool Tip int x int y String tooltip  getToolTip x y if tooltip null return false if tooltip equals tool Tip Label get Text return true tool Tip Label set Text tooltip Point label Size tool Tip Label compute Size SWT DEFAULT SWT DEFAULT label Size x 2 label Size y 2 tool Tip Label set Size label Size tool Tip Shell pack On some platforms there is a minimum size for a shell which may be greater than the label size To avoid having the background of the tip shell showing around the label force the label to fill the entire client area Rectangle area tool Tip Shell get Client Area tool Tip Label set Size area width area height Position the tooltip and ensure that it is not located off the screen Point cursor Location get Display get Cursor Location Assuming cursor is 21x21 because this is the size of the arrow cursor on Windows int cursor Height 21 Point size tool Tip Shell get Size Rectangle rect get Monitor get Bounds Point pt new Point cursor Location x cursor Location y cursor Height 2 pt x Math max pt x rect x if pt x size x rect x rect width pt x rect x rect width size x if pt y size y rect y rect height pt y cursor Location y 2 size y tool Tip Shell set Location pt return true  updateToolTip _getToolTip toolTipLabel getText toolTipLabel setText labelSize toolTipLabel computeSize labelSize labelSize toolTipLabel setSize labelSize toolTipShell toolTipShell getClientArea toolTipLabel setSize cursorLocation getDisplay getCursorLocation cursorHeight toolTipShell getSize getMonitor getBounds cursorLocation cursorLocation cursorHeight cursorLocation toolTipShell setLocation

Sent when the user clicks on the close button of an item in the C Tab Folder The item being closed is specified in the event item field Setting the event doit field to false will stop the C Tab Item from closing When the C Tab Item is closed it is disposed The contents of the C Tab Item see C Tab Item set Control will be made not visible when the C Tab Item is closed p The default behaviour is to close the C Tab Item p param event an event indicating the item being closed  CTabFolder CTabItem CTabItem CTabItem CTabItem setControl CTabItem CTabItem
Sent when the user clicks on the minimize button of a C Tab Folder p The default behaviour is to do nothing p param event an event containing information about the minimize  CTabFolder
Sent when the user clicks on the maximize button of a C Tab Folder p The default behaviour is to do nothing p param event an event containing information about the maximize  CTabFolder
Sent when the user clicks on the restore button of a C Tab Folder p The default behaviour is to do nothing p param event an event containing information about the restore  CTabFolder
Sent when the user clicks on the chevron button of a C Tab Folder p The default behaviour is to show a list of items that are not currently visible and to change the selection based on the item selected from the list p param event an event containing information about the show list  CTabFolder

Sent when the user clicks on the close button of an item in the C Tab Folder The item being closed is specified in the event item field Setting the event doit field to false will stop the C Tab Item from closing When the C Tab Item is closed it is disposed The contents of the C Tab Item see C Tab Item set Control will be made not visible when the C Tab Item is closed param event an event indicating the item being closed  CTabFolder CTabItem CTabItem CTabItem CTabItem setControl CTabItem
Sent when the user clicks on the minimize button of a C Tab Folder The state of the C Tab Folder does not change automatically it is up to the application to change the state of the C Tab Folder in response to this event using C Tab Folder set Minimized true param event an event containing information about the minimize see C Tab Folder get Minimized see C Tab Folder set Minimized boolean see C Tab Folder set Minimize Visible boolean  CTabFolder CTabFolder CTabFolder CTabFolder setMinimized CTabFolder getMinimized CTabFolder setMinimized CTabFolder setMinimizeVisible
Sent when the user clicks on the maximize button of a C Tab Folder The state of the C Tab Folder does not change automatically it is up to the application to change the state of the C Tab Folder in response to this event using C Tab Folder set Maximized true param event an event containing information about the maximize see C Tab Folder get Maximized see C Tab Folder set Maximized boolean see C Tab Folder set Maximize Visible boolean  CTabFolder CTabFolder CTabFolder CTabFolder setMaximized CTabFolder getMaximized CTabFolder setMaximized CTabFolder setMaximizeVisible
Sent when the user clicks on the restore button of a C Tab Folder This event is sent either to restore the C Tab Folder from the minimized state or from the maximized state To determine which restore is requested use C Tab Folder get Minimized or C Tab Folder get Maximized to determine the current state The state of the C Tab Folder does not change automatically it is up to the application to change the state of the C Tab Folder in response to this event using C Tab Folder set Maximized false or C Tab Folder set Minimized false param event an event containing information about the restore see C Tab Folder get Minimized see C Tab Folder get Maximized see C Tab Folder set Minimized boolean see C Tab Folder set Minimize Visible boolean see C Tab Folder set Maximized boolean see C Tab Folder set Maximize Visible boolean  CTabFolder CTabFolder CTabFolder getMinimized CTabFolder getMaximized CTabFolder CTabFolder CTabFolder setMaximized CTabFolder setMinimized CTabFolder getMinimized CTabFolder getMaximized CTabFolder setMinimized CTabFolder setMinimizeVisible CTabFolder setMaximized CTabFolder setMaximizeVisible
Sent when the user clicks on the chevron button of the C Tab Folder A chevron appears in the C Tab Folder when there are more tabs than can be displayed at the current widget size To select a tab that is not currently visible the user clicks on the chevron and selects a tab item from a list By default the C Tab Folder provides a list of all the items that are not currently visible however the application can provide its own list by setting the event doit field to code false code and displaying a selection list param event an event containing information about the show list see C Tab Folder set Selection C Tab Item  CTabFolder CTabFolder CTabFolder CTabFolder setSelection CTabItem

public class C Tab Folder Adapter implements C Tab Folder Listener public void item Closed C Tab Folder Event event  CTabFolderAdapter CTabFolderListener itemClosed CTabFolderEvent

Constructs a new instance of this class param w the widget that fired the event C Tab Folder Event Widget w super w  CTabFolderEvent
Returns a string containing a concise human readable description of the receiver return a string representation of the event public String to String String string super to String return string substring 0 string length 1 remove trailing item item doit doit x x y y width width height height  toString toString

Sent when the user clicks on the close button of an item in the C Tab Folder The item being closed is specified in the event item field Setting the event doit field to false will stop the C Tab Item from closing When the C Tab Item is closed it is disposed The contents of the C Tab Item see C Tab Item set Control will be made not visible when the C Tab Item is closed param event an event indicating the item being closed  CTabFolder CTabItem CTabItem CTabItem CTabItem setControl CTabItem

Constructs a new instance of this class given its parent which must be a code C Tab Folder code and a style value describing its behavior and appearance The item is added to the end of the items maintained by its parent p The style value is either one of the style constants defined in 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 C Tab Folder which will be the parent of the new instance cannot be null param style the style of control to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT see Widget get Style public C Tab Item C Tab Folder parent int style this parent style parent get Item Count  CTabFolder CTabFolder IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle CTabItem CTabFolder getItemCount
Constructs a new instance of this class given its parent which must be a code C Tab Folder code a style value describing its behavior and appearance and the index at which to place it in the items maintained by its parent p The style value is either one of the style constants defined in 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 C Tab Folder which will be the parent of the new instance cannot be null param style the style of control to construct param index the index to store the receiver in its parent exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT see Widget get Style public C Tab Item C Tab Folder parent int style int index super parent check Style style show Close style SWT CLOSE 0 parent create Item this index  CTabFolder CTabFolder IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle CTabItem CTabFolder checkStyle showClose createItem
parent create Item this index static int check Style int style return SWT NONE  createItem checkStyle
static String shorten Text GC gc String text int width if gc text Extent text FLAGS x width return text int ellipse Width gc text Extent ELLIPSIS FLAGS x int length text length int end length 1 while end 0 text text substring 0 end int l gc text Extent text FLAGS x if l ellipse Width width return text ELLIPSIS end return text substring 0 1  shortenText textExtent ellipseWidth textExtent textExtent ellipseWidth
public void dispose if is Disposed return if is Valid Thread error SWT ERROR THREAD INVALID ACCESS parent destroy Item this super dispose parent null control null tool Tip Text null shortened Text null font null  isDisposed isValidThread ERROR_THREAD_INVALID_ACCESS destroyItem toolTipText shortenedText
void draw Close GC gc if close Rect width 0 close Rect height 0 return Display display get Display draw X 9x9 int indent Math max 1 C Tab Folder BUTTON SIZE 9 2 int x close Rect x indent int y close Rect y indent y parent on Bottom 1 1 Color close Border display get System Color C Tab Folder BUTTON BORDER switch close Image State case C Tab Folder NORMAL int shape new int x y x 2 y x 4 y 2 x 5 y 2 x 7 y x 9 y x 9 y 2 x 7 y 4 x 7 y 5 x 9 y 7 x 9 y 9 x 7 y 9 x 5 y 7 x 4 y 7 x 2 y 9 x y 9 x y 7 x 2 y 5 x 2 y 4 x y 2 gc set Background display get System Color C Tab Folder BUTTON FILL gc fill Polygon shape gc set Foreground close Border gc draw Polygon shape break case C Tab Folder HOT int shape new int x y x 2 y x 4 y 2 x 5 y 2 x 7 y x 9 y x 9 y 2 x 7 y 4 x 7 y 5 x 9 y 7 x 9 y 9 x 7 y 9 x 5 y 7 x 4 y 7 x 2 y 9 x y 9 x y 7 x 2 y 5 x 2 y 4 x y 2 Color fill new Color display C Tab Folder CLOSE FILL gc set Background fill gc fill Polygon shape fill dispose gc set Foreground close Border gc draw Polygon shape break case C Tab Folder SELECTED int shape new int x 1 y 1 x 3 y 1 x 5 y 3 x 6 y 3 x 8 y 1 x 10 y 1 x 10 y 3 x 8 y 5 x 8 y 6 x 10 y 8 x 10 y 10 x 8 y 10 x 6 y 8 x 5 y 8 x 3 y 10 x 1 y 10 x 1 y 8 x 3 y 6 x 3 y 5 x 1 y 3 Color fill new Color display C Tab Folder CLOSE FILL gc set Background fill gc fill Polygon shape fill dispose gc set Foreground close Border gc draw Polygon shape break case C Tab Folder NONE int shape new int x y x 10 y x 10 y 10 x y 10 if parent gradient Colors null parent gradient Vertical parent draw Background gc shape false else Color default Background parent get Background Image image parent bg Image Color colors parent gradient Colors int percents parent gradient Percents boolean vertical parent gradient Vertical parent draw Background gc shape x y 10 10 default Background image colors percents vertical break  drawClose closeRect closeRect getDisplay CTabFolder BUTTON_SIZE closeRect closeRect onBottom closeBorder getSystemColor CTabFolder BUTTON_BORDER closeImageState CTabFolder setBackground getSystemColor CTabFolder BUTTON_FILL fillPolygon setForeground closeBorder drawPolygon CTabFolder CTabFolder CLOSE_FILL setBackground fillPolygon setForeground closeBorder drawPolygon CTabFolder CTabFolder CLOSE_FILL setBackground fillPolygon setForeground closeBorder drawPolygon CTabFolder gradientColors gradientVertical drawBackground defaultBackground getBackground bgImage gradientColors gradientPercents gradientVertical drawBackground defaultBackground
void draw Selected GC gc Point size parent get Size int right Edge Math min x width parent get Right Item Edge Draw selection border across all tabs int xx parent border Left int yy parent on Bottom size y parent border Bottom parent tab Height parent highlight header parent border Top parent tab Height 1 int ww size x parent border Left parent border Right int hh parent highlight header 1 int shape new int xx yy xx ww yy xx ww yy hh xx yy hh if parent selection Gradient Colors null parent selection Gradient Vertical parent draw Background gc shape true else gc set Background parent selection Background gc fill Rectangle xx yy ww hh if parent single if is Showing return else if selected tab scrolled out of view or partially out of view just draw bottom line if is Showing int x1 Math max 0 parent border Left 1 int y1 parent on Bottom y 1 y height int x2 size x parent border Right gc set Foreground C Tab Folder border Color gc draw Line x1 y1 x2 y1 return draw selected tab background and outline shape null if this parent on Bottom int left parent simple C Tab Folder SIMPLE BOTTOM LEFT CORNER C Tab Folder BOTTOM LEFT CORNER int right parent simple C Tab Folder SIMPLE BOTTOM RIGHT CORNER parent curve if parent border Left 0 parent index Of this parent first Index left new int x y height shape new int left length right length 8 int index 0 shape index x first point repeated here because below we reuse shape to draw outline shape index y 1 shape index x shape index y 1 for int i 0 i left length 2 i shape index x left 2 i shape index y height left 2 i 1 1 for int i 0 i right length 2 i shape index parent simple right Edge 1 right 2 i right Edge parent curve Indent right 2 i shape index parent simple y height right 2 i 1 1 y right 2 i 1 2 shape index parent simple right Edge 1 right Edge parent curve Width parent curve Indent shape index y 1 shape index parent simple right Edge 1 right Edge parent curve Width parent curve Indent shape index y 1 else int left parent simple C Tab Folder SIMPLE TOP LEFT CORNER C Tab Folder TOP LEFT CORNER int right parent simple C Tab Folder SIMPLE TOP RIGHT CORNER parent curve if parent border Left 0 parent index Of this parent first Index left new int x y shape new int left length right length 8 int index 0 shape index x first point repeated here because below we reuse shape to draw outline shape index y height 1 shape index x shape index y height 1 for int i 0 i left length 2 i shape index x left 2 i shape index y left 2 i 1 for int i 0 i right length 2 i shape index parent simple right Edge 1 right 2 i right Edge parent curve Indent right 2 i shape index y right 2 i 1 shape index parent simple right Edge 1 right Edge parent curve Width parent curve Indent shape index y height 1 shape index parent simple right Edge 1 right Edge parent curve Width parent curve Indent shape index y height 1 Rectangle clipping gc get Clipping Rectangle bounds get Bounds bounds height 1 if parent on Bottom bounds y 1 boolean tab In Paint clipping intersects bounds if tab In Paint fill in tab background if parent selection Gradient Colors null parent selection Gradient Vertical parent draw Background gc shape true else Color default Background parent selection Background Image image parent selection Bg Image Color colors parent selection Gradient Colors int percents parent selection Gradient Percents boolean vertical parent selection Gradient Vertical xx x yy parent on Bottom y 1 y 1 ww width hh height if parent single parent simple ww parent curve Width parent curve Indent parent draw Background gc shape xx yy ww hh default Background image colors percents vertical draw outline shape 0 Math max 0 parent border Left 1 if parent border Left 0 parent index Of this parent first Index shape 1 parent on Bottom y height 1 y shape 5 shape 3 shape 1 shape shape length 2 size x parent border Right 1 for int i 0 i shape length 2 i if shape 2 i 1 y height 1 shape 2 i 1 1 RGB inside parent selection Background getRGB if parent selection Bg Image null parent selection Gradient Colors null parent selection Gradient Colors length 1 inside null RGB outside parent get Background getRGB if parent bg Image null parent gradient Colors null parent gradient Colors length 1 outside null parent antialias shape C Tab Folder border Color getRGB inside outside gc gc set Foreground C Tab Folder border Color gc draw Polyline shape if tab In Paint return draw Image int x Draw x LEFT MARGIN if parent single parent show Close show Close x Draw C Tab Folder BUTTON SIZE Image image get Image if image null Rectangle image Bounds image get Bounds only draw image if it won t overlap with close button int max Image Width right Edge x Draw RIGHT MARGIN if parent single close Rect width 0 max Image Width close Rect width INTERNAL SPACING if image Bounds width max Image Width int imageX x Draw int image Height image Bounds height int imageY y height image Height 2 imageY parent on Bottom 1 1 int image Width image Bounds width image Height image Bounds height gc draw Image image image Bounds x image Bounds y image Bounds width image Bounds height imageX imageY image Width image Height x Draw image Width INTERNAL SPACING draw Text int text Width right Edge x Draw RIGHT MARGIN if parent single close Rect width 0 text Width close Rect width INTERNAL SPACING if text Width 0 Font gc Font gc get Font gc set Font font null parent get Font font if shortened Text null shortened Text Width text Width shortened Text shorten Text gc get Text text Width shortened Text Width text Width Point extent gc text Extent shortened Text FLAGS int textY y height extent y 2 textY parent on Bottom 1 1 gc set Foreground parent selection Foreground gc draw Text shortened Text x Draw textY FLAGS gc set Font gc Font draw a Focus rectangle if parent is Focus Control Display display get Display if parent simple parent single gc set Background display get System Color SWT COLOR BLACK gc set Foreground display get System Color SWT COLOR WHITE gc draw Focus x Draw 1 textY 1 extent x 2 extent y 2 else gc set Foreground display get System Color C Tab Folder BUTTON BORDER gc draw Line x Draw textY extent y 1 x Draw extent x 1 textY extent y 1 if parent show Close show Close draw Close gc  drawSelected getSize rightEdge getRightItemEdge borderLeft onBottom borderBottom tabHeight highlight_header borderTop tabHeight borderLeft borderRight highlight_header selectionGradientColors selectionGradientVertical drawBackground setBackground selectionBackground fillRectangle isShowing isShowing borderLeft onBottom borderRight setForeground CTabFolder borderColor drawLine onBottom CTabFolder SIMPLE_BOTTOM_LEFT_CORNER CTabFolder BOTTOM_LEFT_CORNER CTabFolder SIMPLE_BOTTOM_RIGHT_CORNER borderLeft indexOf firstIndex rightEdge rightEdge curveIndent rightEdge rightEdge curveWidth curveIndent rightEdge rightEdge curveWidth curveIndent CTabFolder SIMPLE_TOP_LEFT_CORNER CTabFolder TOP_LEFT_CORNER CTabFolder SIMPLE_TOP_RIGHT_CORNER borderLeft indexOf firstIndex rightEdge rightEdge curveIndent rightEdge rightEdge curveWidth curveIndent rightEdge rightEdge curveWidth curveIndent getClipping getBounds onBottom tabInPaint tabInPaint selectionGradientColors selectionGradientVertical drawBackground defaultBackground selectionBackground selectionBgImage selectionGradientColors selectionGradientPercents selectionGradientVertical onBottom curveWidth curveIndent drawBackground defaultBackground borderLeft borderLeft indexOf firstIndex onBottom borderRight selectionBackground selectionBgImage selectionGradientColors selectionGradientColors getBackground bgImage gradientColors gradientColors CTabFolder borderColor setForeground CTabFolder borderColor drawPolyline tabInPaint xDraw LEFT_MARGIN showClose showClose xDraw CTabFolder BUTTON_SIZE getImage imageBounds getBounds maxImageWidth rightEdge xDraw RIGHT_MARGIN closeRect maxImageWidth closeRect INTERNAL_SPACING imageBounds maxImageWidth xDraw imageHeight imageBounds imageHeight onBottom imageWidth imageBounds imageHeight imageBounds drawImage imageBounds imageBounds imageBounds imageBounds imageWidth imageHeight xDraw imageWidth INTERNAL_SPACING textWidth rightEdge xDraw RIGHT_MARGIN closeRect textWidth closeRect INTERNAL_SPACING textWidth gcFont getFont setFont getFont shortenedText shortenedTextWidth textWidth shortenedText shortenText getText textWidth shortenedTextWidth textWidth textExtent shortenedText onBottom setForeground selectionForeground drawText shortenedText xDraw setFont gcFont isFocusControl getDisplay setBackground getSystemColor COLOR_BLACK setForeground getSystemColor COLOR_WHITE drawFocus xDraw setForeground getSystemColor CTabFolder BUTTON_BORDER drawLine xDraw xDraw showClose showClose drawClose
void draw Unselected GC gc Do not draw partial items if is Showing return Rectangle clipping gc get Clipping Rectangle bounds get Bounds if clipping intersects bounds return draw border if parent index Of this parent selected Index 1 gc set Foreground C Tab Folder border Color gc draw Line x width 1 y x width 1 y height draw Image int x Draw x LEFT MARGIN Image image get Image if image null parent show Unselected Image Rectangle image Bounds image get Bounds only draw image if it won t overlap with close button int max Image Width x width x Draw RIGHT MARGIN if parent show Unselected Close parent show Close show Close max Image Width close Rect width INTERNAL SPACING if image Bounds width max Image Width int imageX x Draw int image Height image Bounds height int imageY y height image Height 2 imageY parent on Bottom 1 1 int image Width image Bounds width image Height image Bounds height gc draw Image image image Bounds x image Bounds y image Bounds width image Bounds height imageX imageY image Width image Height x Draw image Width INTERNAL SPACING draw Text int text Width x width x Draw RIGHT MARGIN if parent show Unselected Close parent show Close show Close text Width close Rect width INTERNAL SPACING if text Width 0 Font gc Font gc get Font gc set Font font null parent get Font font if shortened Text null shortened Text Width text Width shortened Text shorten Text gc get Text text Width shortened Text Width text Width Point extent gc text Extent shortened Text FLAGS int textY y height extent y 2 textY parent on Bottom 1 1 gc set Foreground parent get Foreground gc draw Text shortened Text x Draw textY FLAGS gc set Font gc Font draw close if parent show Unselected Close parent show Close show Close draw Close gc  drawUnselected isShowing getClipping getBounds indexOf selectedIndex setForeground CTabFolder borderColor drawLine xDraw LEFT_MARGIN getImage showUnselectedImage imageBounds getBounds maxImageWidth xDraw RIGHT_MARGIN showUnselectedClose showClose showClose maxImageWidth closeRect INTERNAL_SPACING imageBounds maxImageWidth xDraw imageHeight imageBounds imageHeight onBottom imageWidth imageBounds imageHeight imageBounds drawImage imageBounds imageBounds imageBounds imageBounds imageWidth imageHeight xDraw imageWidth INTERNAL_SPACING textWidth xDraw RIGHT_MARGIN showUnselectedClose showClose showClose textWidth closeRect INTERNAL_SPACING textWidth gcFont getFont setFont getFont shortenedText shortenedTextWidth textWidth shortenedText shortenText getText textWidth shortenedTextWidth textWidth textExtent shortenedText onBottom setForeground getForeground drawText shortenedText xDraw setFont gcFont showUnselectedClose showClose showClose drawClose
Returns a rectangle describing the receiver s size and location relative to its parent return the receiver s bounding column rectangle 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 Rectangle get Bounds check Widget int w width if parent simple parent single parent index Of this parent selected Index w parent curve Width parent curve Indent return new Rectangle x y w height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBounds checkWidget indexOf selectedIndex curveWidth curveIndent
Gets the control that is displayed in the content are of the tab item return the control 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 Control get Control check Widget return control  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getControl checkWidget
Get the image displayed in the tab if the tab is disabled return the disabled image or null 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 deprecated the disabled image is not used public Image get Disabled Image check Widget return disabled Image  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getDisabledImage checkWidget disabledImage
Returns the font that the receiver will use to paint textual information return the receiver s font 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 since 3 0 public Font get Font check Widget if font null return font return parent get Font  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getFont checkWidget getFont
Returns the receiver s parent which must be a code C Tab Folder code return the receiver s parent 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 C Tab Folder get Parent check Widget return parent  CTabFolder SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS CTabFolder getParent checkWidget
Returns the receiver s tool tip text or null if it has not been set return the receiver s tool tip text 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 String get Tool Tip Text check Widget if tool Tip Text null shortened Text null String text get Text if shortened Text equals text return text return tool Tip Text  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getToolTipText checkWidget toolTipText shortenedText getText shortenedText toolTipText
Returns code true code if the item will be rendered in the visible area of the C Tab Folder Returns false otherwise return code true code if the item will be rendered in the visible area of the C Tab Folder Returns false otherwise 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 since 3 0 public boolean is Showing check Widget int index parent index Of this int right Edge parent get Right Item Edge if parent single if index parent selected Index return x right Edge return false if index parent first Index return false if parent first Index index return x right Edge int extra parent simple index parent selected Index 0 parent curve Width 2 parent curve Indent return x width extra right Edge  CTabFolder CTabFolder SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS isShowing checkWidget indexOf rightEdge getRightItemEdge selectedIndex rightEdge firstIndex firstIndex rightEdge selectedIndex curveWidth curveIndent rightEdge
void on Paint GC gc boolean is Selected if width 0 height 0 return if is Selected draw Selected gc else draw Unselected gc  onPaint isSelected isSelected drawSelected drawUnselected
int preferred Height GC gc Image image get Image int h image null 0 image get Bounds height String text get Text if font null h Math max h gc text Extent text FLAGS y else Font gc Font gc get Font gc set Font font h Math max h gc text Extent text FLAGS y gc set Font gc Font return h TOP MARGIN BOTTOM MARGIN  preferredHeight getImage getBounds getText textExtent gcFont getFont setFont textExtent setFont gcFont TOP_MARGIN BOTTOM_MARGIN
int preferred Width GC gc boolean is Selected boolean minimum NOTE preferred width does not include the dead space caused by the curve if is Disposed return 0 int w 0 Image image get Image if image null is Selected parent show Unselected Image w image get Bounds width String text null if minimum int min Chars parent min Chars text min Chars 0 null get Text if text null text length min Chars int end min Chars ELLIPSIS length 1 min Chars min Chars ELLIPSIS length text text substring 0 end if min Chars ELLIPSIS length 1 text ELLIPSIS else text get Text if text null if w 0 w INTERNAL SPACING if font null w gc text Extent text FLAGS x else Font gc Font gc get Font gc set Font font w gc text Extent text FLAGS x gc set Font gc Font if parent show Close show Close if is Selected parent show Unselected Close if w 0 w INTERNAL SPACING w C Tab Folder BUTTON SIZE return w LEFT MARGIN RIGHT MARGIN  preferredWidth isSelected isDisposed getImage isSelected showUnselectedImage getBounds minChars minChars minChars getText minChars minChars minChars minChars minChars getText INTERNAL_SPACING textExtent gcFont getFont setFont textExtent setFont gcFont showClose showClose isSelected showUnselectedClose INTERNAL_SPACING CTabFolder BUTTON_SIZE LEFT_MARGIN RIGHT_MARGIN
Sets the control that is used to fill the client area of the tab folder when the user selects the tab item param control the new control or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the control has been disposed li li ERROR INVALID PARENT if the control is not in the same widget tree li ul 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 set Control Control control check Widget if control null if control is Disposed SWT error SWT ERROR INVALID ARGUMENT if control get Parent parent SWT error SWT ERROR INVALID PARENT if this control null this control is Disposed this control set Visible false this control control if this control null int index parent index Of this if index parent get Selection Index this control set Bounds parent get Client Area this control set Visible true else this control set Visible false  IllegalArgumentException ERROR_INVALID_ARGUMENT ERROR_INVALID_PARENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setControl checkWidget isDisposed ERROR_INVALID_ARGUMENT getParent ERROR_INVALID_PARENT isDisposed setVisible indexOf getSelectionIndex setBounds getClientArea setVisible setVisible
Sets the image that is displayed if the tab item is disabled Null will clear the image param image the image to be displayed when the item is disabled or null 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 deprecated This image is not used public void set Disabled Image Image image check Widget if image null image is Disposed SWT error SWT ERROR INVALID ARGUMENT this disabled Image image  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setDisabledImage checkWidget isDisposed ERROR_INVALID_ARGUMENT disabledImage
Sets the font that the receiver will use to paint textual information for this item to the font specified by the argument or to the default font for that kind of control if the argument is null param font the new font or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 3 0 public void set Font Font font check Widget if font null font is Disposed SWT error SWT ERROR INVALID ARGUMENT if font null this font null return if font null font equals this font return this font font if parent update Tab Height false parent update Items parent redraw  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setFont checkWidget isDisposed ERROR_INVALID_ARGUMENT updateTabHeight updateItems
public void set Image Image image check Widget if image null image is Disposed SWT error SWT ERROR INVALID ARGUMENT Image old Image get Image if image null old Image null return if image null image equals old Image return super set Image image if parent update Tab Height false parent update Items parent redraw  setImage checkWidget isDisposed ERROR_INVALID_ARGUMENT oldImage getImage oldImage oldImage setImage updateTabHeight updateItems
public void set Text String string check Widget if string null SWT error SWT ERROR NULL ARGUMENT if string equals get Text return super set Text string shortened Text null shortened Text Width 0 parent update Items parent redraw  setText checkWidget ERROR_NULL_ARGUMENT getText setText shortenedText shortenedTextWidth updateItems
Sets the receiver s tool tip text to the argument which may be null indicating that no tool tip text should be shown param string the new tool tip text or null 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 set Tool Tip Text String string check Widget tool Tip Text string  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setToolTipText checkWidget toolTipText

Creates a new Default Content and initializes it A code Styled Text Content will always have at least one empty line Default Content super set Text  DefaultContent StyledTextContent DefaultContent setText
Adds a line to the end of the line indexes array Increases the size of the array if necessary code line Count code is updated to reflect the new entry p param start the start of the line param length the length of the line void add Line Index int start int length int size lines length if line Count size expand the lines by powers of 2 int new Lines new int size Compatibility pow2 expand Exp 2 System arraycopy lines 0 new Lines 0 size lines new Lines expand Exp int range new int start length lines line Count range line Count  lineCount addLineIndex lineCount newLines expandExp newLines newLines expandExp lineCount lineCount
Adds a line index to the end of code lines Array code Increases the size of the array if necessary and returns a new array p param start the start of the line param length the length of the line param lines Array the array to which to add the line index param count the position at which to add the line return a new array of line indexes int add Line Index int start int length int lines Array int count int size lines Array length int new Lines lines Array if count size new Lines new int size Compatibility pow2 replace Expand Exp 2 replace Expand Exp System arraycopy lines Array 0 new Lines 0 size int range new int start length new Lines count range return new Lines  linesArray linesArray addLineIndex linesArray linesArray newLines linesArray newLines replaceExpandExp replaceExpandExp linesArray newLines newLines newLines
Adds a code Text Change Listener code listening for code Text Changing Event code and code Text Changed Event code A code Text Changing Event code is sent before changes to the text occur A code Text Changed Event code is sent after changes to the text occured p param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void add Text Change Listener Text Change Listener listener if listener null error SWT ERROR NULL ARGUMENT Styled Text Listener typed Listener new Styled Text Listener listener text Listeners add Element typed Listener  TextChangeListener TextChangingEvent TextChangedEvent TextChangingEvent TextChangedEvent IllegalArgumentException ERROR_NULL_ARGUMENT addTextChangeListener TextChangeListener ERROR_NULL_ARGUMENT StyledTextListener typedListener StyledTextListener textListeners addElement typedListener
Adjusts the gap to accomodate a text change that is occurring p param position the position at which a change is occurring param size Hint the size of the change param line the line where the gap will go void adjust Gap int position int size Hint int line if position gap Start text is being inserted at the gap position int size gap End gap Start size Hint if low Watermark size size high Watermark return else if position size Hint gap Start size Hint 0 text is being deleted at the gap position int size gap End gap Start size Hint if low Watermark size size high Watermark return move And Resize Gap position size Hint line  sizeHint adjustGap sizeHint gapStart gapEnd gapStart sizeHint lowWatermark highWatermark sizeHint gapStart sizeHint gapEnd gapStart sizeHint lowWatermark highWatermark moveAndResizeGap sizeHint
Calculates the indexes of each line in the text store Assumes no gap exists Optimized to do less checking void index Lines int start 0 line Count 0 int text Length text Store length int i for i start i text Length i char ch text Store i if ch SWT CR see if the next character is a LF if i 1 text Length ch text Store i 1 if ch SWT LF i add Line Index start i start 1 start i 1 else if ch SWT LF add Line Index start i start 1 start i 1 add Line Index start i start  indexLines lineCount textLength textStore textLength textStore textLength textStore addLineIndex addLineIndex addLineIndex
Returns whether or not the given character is a line delimiter Both CR and LF are valid line delimiters p param ch the character to test return true if ch is a delimiter false otherwise boolean is Delimiter char ch if ch SWT CR return true if ch SWT LF return true return false  isDelimiter
Determine whether or not the replace operation is valid Default Content will not allow the r n line delimiter to be split or partially deleted p param start start offset of text to replace param replace Length start offset of text to replace param new Text start offset of text to replace protected boolean is Valid Replace int start int replace Length String new Text if replace Length 0 inserting text see if the r n line delimiter is being split if start 0 return true if start get Char Count return true char before get Text Range start 1 1 char At 0 if before r char after get Text Range start 1 char At 0 if after n return false else deleting text see if part of a r n line delimiter is being deleted char start Char get Text Range start 1 char At 0 if start Char n see if char before delete position is r if start 0 char before get Text Range start 1 1 char At 0 if before r return false char end Char get Text Range start replace Length 1 1 char At 0 if end Char r see if char after delete position is n if start replace Length get Char Count char after get Text Range start replace Length 1 char At 0 if after n return false return true  DefaultContent replaceLength newText isValidReplace replaceLength newText replaceLength getCharCount getTextRange charAt getTextRange charAt startChar getTextRange charAt startChar getTextRange charAt endChar getTextRange replaceLength charAt endChar replaceLength getCharCount getTextRange replaceLength charAt
Calculates the indexes of each line of text in the given range p param offset the logical start offset of the text lineate param length the length of the text to lineate includes gap param num Lines the number of lines to initially allocate for the line index array passed in for efficiency the exact number of lines may be known return a line indexes array where each line is identified by a start offset and a length int index Lines int offset int length int num Lines int indexed Lines new int num Lines 2 int start 0 int line Cnt 0 int i replace Expand Exp 1 for i start i length i int location i offset if location gap Start location gap End ignore the gap else char ch text Store location if ch SWT CR see if the next character is a LF if location 1 text Store length ch text Store location 1 if ch SWT LF i indexed Lines add Line Index start i start 1 indexed Lines line Cnt line Cnt start i 1 else if ch SWT LF indexed Lines add Line Index start i start 1 indexed Lines line Cnt line Cnt start i 1 int new Lines new int line Cnt 1 2 System arraycopy indexed Lines 0 new Lines 0 line Cnt int range new int start i start new Lines line Cnt range return new Lines  numLines indexLines numLines indexedLines numLines lineCnt replaceExpandExp gapStart gapEnd textStore textStore textStore indexedLines addLineIndex indexedLines lineCnt lineCnt indexedLines addLineIndex indexedLines lineCnt lineCnt newLines lineCnt indexedLines newLines lineCnt newLines lineCnt newLines
Inserts text p param position the position at which to insert the text param length the text to insert void insert int position String text if text length 0 return int start Line get Line At Offset position int change text length boolean end Insert position get Char Count adjust Gap position change start Line during an insert the gap will be adjusted to start at position and it will be associated with startline the inserted text will be placed in the gap int start Line Offset get Offset At Line start Line at this point start Line Length will include the start line and all of the newly inserted text int start Line Length get Physical Line start Line length if change 0 shrink gap gap Start change for int i 0 i text length i text Store position i text char At i figure out the number of new lines that have been inserted int new Lines index Lines start Line Offset start Line Length 10 only insert an empty line if it is the last line in the text int num New Lines new Lines length 1 if new Lines num New Lines 1 0 last inserted line is a new line if end Insert insert happening at end of the text leave num New Lines as is since the last new line will not be concatenated with another line num New Lines 1 else num New Lines 1 make room for the new lines expand Lines By num New Lines shift down the lines after the replace line for int i line Count 1 i start Line i lines i num New Lines lines i insert the new lines for int i 0 i num New Lines i new Lines i 0 start Line Offset lines start Line i new Lines i update the last inserted line if num New Lines new Lines length new Lines num New Lines 0 start Line Offset lines start Line num New Lines new Lines num New Lines line Count num New Lines gap Line get Line At Physical Offset gap Start  startLine getLineAtOffset endInsert getCharCount adjustGap startLine startLineOffset getOffsetAtLine startLine startLineLength startLineLength getPhysicalLine startLine gapStart textStore charAt newLines indexLines startLineOffset startLineLength numNewLines newLines newLines numNewLines endInsert numNewLines numNewLines numNewLines expandLinesBy numNewLines lineCount startLine numNewLines numNewLines newLines startLineOffset startLine newLines numNewLines newLines newLines numNewLines startLineOffset startLine numNewLines newLines numNewLines lineCount numNewLines gapLine getLineAtPhysicalOffset gapStart
Moves the gap and adjusts its size in anticipation of a text change The gap is resized to actual size the specified size and moved to the given position p param position the position at which a change is occurring param size Hint the size of the change param line the line where the gap should be put void move And Resize Gap int position int size int new Gap Line char content null int old Size gap End gap Start int new Size if size 0 new Size high Watermark size else new Size low Watermark size remove the old gap from the lines information if gap Exists adjust the line length lines gap Line 1 lines gap Line 1 old Size adjust the offsets of the lines after the gap Line for int i gap Line 1 i line Count i lines i 0 lines i 0 old Size if new Size 0 if old Size 0 removing the gap content new char text Store length old Size System arraycopy text Store 0 content 0 gap Start System arraycopy text Store gap End content gap Start content length gap Start text Store content gap Start gap End position return content new char text Store length new Size old Size int new Gap Start position int new Gap End new Gap Start new Size if old Size 0 System arraycopy text Store 0 content 0 new Gap Start System arraycopy text Store new Gap Start content new Gap End content length new Gap End else if new Gap Start gap Start int delta gap Start new Gap Start System arraycopy text Store 0 content 0 new Gap Start System arraycopy text Store new Gap Start content new Gap End delta System arraycopy text Store gap End content new Gap End delta text Store length gap End else int delta new Gap Start gap Start System arraycopy text Store 0 content 0 gap Start System arraycopy text Store gap End content gap Start delta System arraycopy text Store gap End delta content new Gap End content length new Gap End text Store content gap Start new Gap Start gap End new Gap End add the new gap to the lines information if gap Exists gap Line new Gap Line adjust the line length int gap Length gap End gap Start lines gap Line 1 lines gap Line 1 gap Length adjust the offsets of the lines after the gap Line for int i gap Line 1 i line Count i lines i 0 lines i 0 gap Length  sizeHint moveAndResizeGap newGapLine oldSize gapEnd gapStart newSize newSize highWatermark newSize lowWatermark gapExists gapLine gapLine oldSize gapLine gapLine lineCount oldSize newSize oldSize textStore oldSize textStore gapStart textStore gapEnd gapStart gapStart textStore gapStart gapEnd textStore newSize oldSize newGapStart newGapEnd newGapStart newSize oldSize textStore newGapStart textStore newGapStart newGapEnd newGapEnd newGapStart gapStart gapStart newGapStart textStore newGapStart textStore newGapStart newGapEnd textStore gapEnd newGapEnd textStore gapEnd newGapStart gapStart textStore gapStart textStore gapEnd gapStart textStore gapEnd newGapEnd newGapEnd textStore gapStart newGapStart gapEnd newGapEnd gapExists gapLine newGapLine gapLength gapEnd gapStart gapLine gapLine gapLength gapLine gapLine lineCount gapLength
Returns the number of lines that are in the specified text p param start Offset the start of the text to lineate param length the length of the text to lineate return number of lines int line Count int start Offset int length if length 0 return 0 int line Cnt 0 int count 0 int i start Offset if i gap Start i gap End gap Start while count length if i gap Start i gap End ignore the gap else char ch text Store i if ch SWT CR see if the next character is a LF if i 1 text Store length ch text Store i 1 if ch SWT LF i count line Cnt else if ch SWT LF line Cnt count i return line Cnt  startOffset lineCount startOffset lineCnt startOffset gapStart gapEnd gapStart gapStart gapEnd textStore textStore textStore lineCnt lineCnt lineCnt
Returns the number of lines that are in the specified text p param text the text to lineate return number of lines in the text int line Count String text int line Count 0 int length text length for int i 0 i length i char ch text char At i if ch SWT CR if i 1 length text char At i 1 SWT LF i line Count else if ch SWT LF line Count return line Count  lineCount lineCount charAt charAt lineCount lineCount lineCount
return the logical length of the text store public int get Char Count int length gap End gap Start return text Store length length  getCharCount gapEnd gapStart textStore
Returns the line at code index code without delimiters p param index the index of the line to return return the logical line text i e without the gap exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT when index is out of range li ul public String get Line int index if index line Count index 0 error SWT ERROR INVALID ARGUMENT int start lines index 0 int length lines index 1 int end start length 1 if gap Exists end gap Start start gap End line is before or after the gap while length 1 0 is Delimiter text Store start length 1 length return new String text Store start length else gap is in the specified range strip out the gap String Buffer buf new String Buffer int gap Length gap End gap Start buf append text Store start gap Start start buf append text Store gap End length gap Length gap Start start length buf length while length 1 0 is Delimiter buf char At length 1 length return buf to String substring 0 length  IllegalArgumentException ERROR_INVALID_ARGUMENT getLine lineCount ERROR_INVALID_ARGUMENT gapExists gapStart gapEnd isDelimiter textStore textStore StringBuffer StringBuffer gapLength gapEnd gapStart textStore gapStart textStore gapEnd gapLength gapStart isDelimiter charAt toString
Returns the line delimiter that should be used by the Styled Text widget when inserting new lines This delimiter may be different than the delimiter that is used by the code Styled Text Content code interface p return the platform line delimiter as specified in the line separator system property public String get Line Delimiter return Line Delimiter  StyledText StyledTextContent getLineDelimiter LineDelimiter
Returns the line at the given index with delimiters p param index the index of the line to return return the logical line text i e without the gap with delimiters String get Full Line int index int start lines index 0 int length lines index 1 int end start length 1 if gap Exists end gap Start start gap End line is before or after the gap return new String text Store start length else gap is in the specified range strip out the gap String Buffer buf new String Buffer int gap Length gap End gap Start buf append text Store start gap Start start buf append text Store gap End length gap Length gap Start start return buf to String  getFullLine gapExists gapStart gapEnd textStore StringBuffer StringBuffer gapLength gapEnd gapStart textStore gapStart textStore gapEnd gapLength gapStart toString
Returns the physical line at the given index i e with delimiters and the gap p param index the line index return the physical line String get Physical Line int index int start lines index 0 int length lines index 1 return get Physical Text start length  getPhysicalLine getPhysicalText
return the number of lines in the text store public int get Line Count return line Count  getLineCount lineCount
Returns the line at the given offset p param char Position logical character offset i e does not include gap return the line index exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT when char Position is out of range li ul public int get Line At Offset int char Position int position if char Position get Char Count char Position 0 error SWT ERROR INVALID ARGUMENT if char Position gap Start position is before the gap position char Position else position includes the gap position char Position gap End gap Start if last line and the line is not empty you can ask for a position that doesn t exist the one to the right of the last character for inserting if line Count 0 int last Line line Count 1 if position lines last Line 0 lines last Line 1 return last Line int high line Count int low 1 int index line Count while high low 1 index high low 2 int line Start lines index 0 int line End line Start lines index 1 1 if position line Start high index else if position line End high index break else low index return high  charPosition IllegalArgumentException ERROR_INVALID_ARGUMENT charPosition getLineAtOffset charPosition charPosition getCharCount charPosition ERROR_INVALID_ARGUMENT charPosition gapStart charPosition charPosition gapEnd gapStart lineCount lastLine lineCount lastLine lastLine lastLine lineCount lineCount lineStart lineEnd lineStart lineStart lineEnd
Returns the line index at the given physical offset p param position physical character offset i e includes gap return the line index int get Line At Physical Offset int position int high line Count int low 1 int index line Count while high low 1 index high low 2 int line Start lines index 0 int line End line Start lines index 1 1 if position line Start high index else if position line End high index break else low index return high  getLineAtPhysicalOffset lineCount lineCount lineStart lineEnd lineStart lineStart lineEnd
Returns the logical offset of the given line p param line Index index of line return the logical starting offset of the line When there are not any lines get Offset At Line 0 is a valid call that should answer 0 exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT when line Index is out of range li ul public int get Offset At Line int line Index if line Index 0 return 0 if line Index line Count line Index 0 error SWT ERROR INVALID ARGUMENT int start lines line Index 0 if start gap End return start gap End gap Start else return start  lineIndex getOffsetAtLine IllegalArgumentException ERROR_INVALID_ARGUMENT lineIndex getOffsetAtLine lineIndex lineIndex lineIndex lineCount lineIndex ERROR_INVALID_ARGUMENT lineIndex gapEnd gapEnd gapStart
Increases the line indexes array to accomodate more lines p param num Lines the number to increase the array by void expand Lines By int num Lines int size lines length if size line Count num Lines return int new Lines new int size Math max 10 num Lines 2 System arraycopy lines 0 new Lines 0 size lines new Lines  numLines expandLinesBy numLines lineCount numLines newLines numLines newLines newLines
Reports an SWT error p param code the error code void error int code SWT error code 
Returns whether or not a gap exists in the text store p return true if gap exists false otherwise boolean gap Exists return gap Start gap End  gapExists gapStart gapEnd
Returns a string representing the continous content of the text store p param start the physical start offset of the text to return param length the physical length of the text to return return the text String get Physical Text int start int length return new String text Store start length  getPhysicalText textStore
Returns a string representing the logical content of the text store i e gap stripped out p param start the logical start offset of the text to return param length the logical length of the text to return return the text public String get Text Range int start int length if text Store null return if length 0 return int end start length if gap Exists end gap Start return new String text Store start length if gap Start start int gap Length gap End gap Start return new String text Store start gap Length length String Buffer buf new String Buffer buf append text Store start gap Start start buf append text Store gap End end gap Start return buf to String  getTextRange textStore gapExists gapStart textStore gapStart gapLength gapEnd gapStart textStore gapLength StringBuffer StringBuffer textStore gapStart textStore gapEnd gapStart toString
Removes the specified code Text Change Listener code p param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void remove Text Change Listener Text Change Listener listener if listener null error SWT ERROR NULL ARGUMENT for int i 0 i text Listeners size i Typed Listener typed Listener Typed Listener text Listeners element At i if typed Listener get Event Listener listener text Listeners remove Element At i break  TextChangeListener IllegalArgumentException ERROR_NULL_ARGUMENT removeTextChangeListener TextChangeListener ERROR_NULL_ARGUMENT textListeners TypedListener typedListener TypedListener textListeners elementAt typedListener getEventListener textListeners removeElementAt
Replaces the text with code new Text code starting at position code start code for a length of code replace Length code Notifies the appropriate listeners p When sending the Text Changing Event code new Line Count code is the number of lines that are going to be inserted and code replace Line Count code is the number of lines that are going to be deleted based on the change that occurs visually For example ul li replace Text new Text replace Line Count new Line Count li n 0 1 li n n a 2 0 ul p param start start offset of text to replace param replace Length start offset of text to replace param new Text start offset of text to replace exception SWT Exception ul li ERROR INVALID ARGUMENT when the text change results in a multi byte line delimiter being split or partially deleted Splitting a line delimiter by inserting text between the CR and LF characters of the r n delimiter or deleting part of this line delimiter is not supported li ul public void replace Text Range int start int replace Length String new Text check for invalid replace operations if is Valid Replace start replace Length new Text SWT error SWT ERROR INVALID ARGUMENT inform listeners Styled Text Event event new Styled Text Event this event type Styled Text Text Changing event start start event replace Line Count line Count start replace Length event text new Text event new Line Count line Count new Text event replace Char Count replace Length event new Char Count new Text length send Text Event event first delete the text to be replaced delete start replace Length event replace Line Count 1 then insert the new text insert start new Text inform listeners event new Styled Text Event this event type Styled Text Text Changed send Text Event event print Lines  newText replaceLength TextChangingEvent newLineCount replaceLineCount replaceText newText replaceLineCount newLineCount replaceLength newText SWTException ERROR_INVALID_ARGUMENT replaceTextRange replaceLength newText isValidReplace replaceLength newText ERROR_INVALID_ARGUMENT StyledTextEvent StyledTextEvent StyledText TextChanging replaceLineCount lineCount replaceLength newText newLineCount lineCount newText replaceCharCount replaceLength newCharCount newText sendTextEvent replaceLength replaceLineCount newText StyledTextEvent StyledText TextChanged sendTextEvent printLines
Sends the text listeners the Text Changed event void send Text Event Styled Text Event event for int i 0 i text Listeners size i Styled Text Listener text Listeners element At i handle Event event  TextChanged sendTextEvent StyledTextEvent textListeners StyledTextListener textListeners elementAt handleEvent
Sets the content to text and removes the gap since there are no sensible predictions about where the next change will occur p param text the text public void set Text String text text Store text to Char Array gap Start 1 gap End 1 expand Exp 1 index Lines Styled Text Event event new Styled Text Event this event type Styled Text Text Set event text send Text Event event  setText textStore toCharArray gapStart gapEnd expandExp indexLines StyledTextEvent StyledTextEvent StyledText TextSet sendTextEvent
Deletes text p param position the position at which the text to delete starts param length the length of the text to delete param num Lines the number of lines that are being deleted void delete int position int length int num Lines if length 0 return int start Line get Line At Offset position int start Line Offset get Offset At Line start Line int end Line get Line At Offset position length String end Text boolean splitting Delimiter false if position length get Char Count end Text get Text Range position length 1 2 if end Text char At 0 SWT CR end Text char At 1 SWT LF splitting Delimiter true adjust Gap position length length start Line int old Lines index Lines position length gap End gap Start num Lines enlarge the gap the gap can be enlarged either to the right or left if position length gap Start gap Start length else gap End length figure out the length of the new concatenated line do so by finding the first line delmiter after position int j position boolean eol false while j text Store length eol if j gap Start j gap End char ch text Store j if is Delimiter ch if j 1 text Store length if ch SWT CR text Store j 1 SWT LF j eol true j update the line where the deletion started lines start Line 1 position start Line Offset j position figure out the number of lines that have been deleted int num Old Lines old Lines length 1 if splitting Delimiter num Old Lines 1 shift up the lines after the last deleted line no need to update the offset or length of the lines for int i end Line 1 i line Count i lines i num Old Lines lines i line Count num Old Lines gap Line get Line At Physical Offset gap Start  numLines numLines startLine getLineAtOffset startLineOffset getOffsetAtLine startLine endLine getLineAtOffset endText splittingDelimiter getCharCount endText getTextRange endText charAt endText charAt splittingDelimiter adjustGap startLine oldLines indexLines gapEnd gapStart numLines gapStart gapStart gapEnd textStore gapStart gapEnd textStore isDelimiter textStore textStore startLine startLineOffset numOldLines oldLines splittingDelimiter numOldLines endLine lineCount numOldLines lineCount numOldLines gapLine getLineAtPhysicalOffset gapStart

Creates a new default line styler p param content the text to which the styles apply public Default Line Styler Styled Text Content content this content content line Count content get Line Count line Backgrounds new Color line Count  DefaultLineStyler StyledTextContent lineCount getLineCount lineBackgrounds lineCount
Inserts a style at the given location p param style the new style param index the index at which to insert the style the new style will reside at this index void insert Style Style Range style int index insert Styles new Style Range style index  insertStyle StyleRange insertStyles StyleRange
Insert the styles at the given location p param insert Styles the new styles param index the index at which to insert the styles the first new style will reside at this index void insert Styles Style Range insert Styles int index int size styles length int insert Count insert Styles length int space Needed style Count insert Count size if space Needed 0 Style Range new Styles new Style Range size space Needed System arraycopy styles 0 new Styles 0 size styles new Styles shift the styles down to make room for the new styles System arraycopy styles index styles index insert Count style Count index add the new styles System arraycopy insert Styles 0 styles index insert Count style Count style Count insert Count  insertStyles insertStyles StyleRange insertStyles insertCount insertStyles spaceNeeded styleCount insertCount spaceNeeded StyleRange newStyles StyleRange spaceNeeded newStyles newStyles insertCount styleCount insertStyles insertCount styleCount styleCount insertCount
Inserts a style merging it with adjacent styles if possible p param style the new style param index the index at which to insert the style the new style will reside at this index return true if the style was inserted false if the style was merged with an adjacent style boolean insert Merge Style Style Range style int index if merge Style Before style index return false if merge Style After style index return false insert Style style index return true  insertMergeStyle StyleRange mergeStyleBefore mergeStyleAfter insertStyle
Merges the style with the style before it if possible p param style the new style param index the index at which to attempt the merge return true if the style was merged false otherwise boolean merge Style Before Style Range style int index see if the style is similar to the style before it and merge the styles if possible if index 0 Style Range previous styles index 1 if style similar To previous the start of style needs to be in the range of the previous style and the end of style needs to be the start of the next style int previous End previous start previous length if style start previous End style start previous start int style End style start style length if index style Count style End styles index start previous length style start style length previous start return true return false  mergeStyleBefore StyleRange StyleRange similarTo previousEnd previousEnd styleEnd styleCount styleEnd
Merges the style with the style after it if possible p param style the new style param index the index at which to attempt the merge return true if the style was merged false otherwise boolean merge Style After Style Range style int index see if the style is similar to the style that will be after it and merge the styles if possible if index style Count Style Range next styles index if style similar To next the end of style needs to be in the range of the next style and the start of style needs to be the end of the previous style int style End style start style length int next End next start next length if style End next End style End next start if index 0 style start styles index 1 start styles index 1 length next length next start next length style start next start style start return true return false  mergeStyleAfter StyleRange styleCount StyleRange similarTo styleEnd nextEnd styleEnd nextEnd styleEnd
Removes style information that is defined for the range of text in code clear Style code p param clear Style the style information to use for clearing void clear Style Style Range clear Style Point pt get Overlapping Styles clear Style start clear Style length int clear Style End clear Style start clear Style length 1 no overlapped styles exist if pt null pt y 0 return the new Style overlaps one or more of the existing styles pt x is the index of the first overlapped style pt y is the number of overlapped styles int count 0 int delete Style 1 int delete Count 0 for int i pt x count pt y i Style Range overlap styles i int overlap End overlap start overlap length 1 if overlap start clear Style start if overlap End clear Style End the end of overlap needs to be cleared overlap length clear Style start overlap start else middle of overlap needs to be cleared this will cause overlap to be broken into two Style Range end Style Style Range overlap clone end Style start clear Style End 1 end Style length overlap End clear Style End overlap length clear Style start overlap start insert Style end Style i 1 break else if overlap End clear Style End entire overlap needs to be cleared if delete Style 1 delete Style i delete Count else beginning of overlap needs to be cleared overlap start clear Style End 1 overlap length overlap End overlap start 1 break count delete Styles delete Style delete Count  clearStyle clearStyle clearStyle StyleRange clearStyle getOverlappingStyles clearStyle clearStyle clearStyleEnd clearStyle clearStyle newStyle deleteStyle deleteCount StyleRange overlapEnd clearStyle overlapEnd clearStyleEnd clearStyle StyleRange endStyle StyleRange endStyle clearStyleEnd endStyle overlapEnd clearStyleEnd clearStyle insertStyle endStyle overlapEnd clearStyleEnd deleteStyle deleteStyle deleteCount clearStyleEnd overlapEnd deleteStyles deleteStyle deleteCount
Increases the code linebackgrounds code array to accomodate new line background information p param num Lines the number to increase the array by void expand Lines By int num Lines int size line Backgrounds length if size line Count num Lines return Color new Lines new Color size Math max Compatibility pow2 line Expand Exp num Lines System arraycopy line Backgrounds 0 new Lines 0 size line Backgrounds new Lines line Expand Exp  numLines expandLinesBy numLines lineBackgrounds lineCount numLines newLines lineExpandExp numLines lineBackgrounds newLines lineBackgrounds newLines lineExpandExp
Deletes the style at code index code p param index the index of the style to be deleted void delete Style int index delete Styles index 1  deleteStyle deleteStyles
Delete count styles starting at code index code p param index the index of the style to be deleted param count the number of styles to be deleted void delete Styles int index int count if count 0 index 0 return shift the styles up System arraycopy styles index count styles index style Count index count for int i 0 i count i styles style Count i 1 null style Count style Count count  deleteStyles styleCount styleCount styleCount styleCount
Returns the styles that are defined p return the copied array of styles Style Range get Style Ranges Style Range new Styles new Style Range style Count System arraycopy styles 0 new Styles 0 style Count return new Styles  StyleRange getStyleRanges StyleRange newStyles StyleRange styleCount newStyles styleCount newStyles
Handles the get line background color callback p param event line Offset line number input param event line Text line text input param event background line background color output public void line Get Background Line Background Event event int line Index content get Line At Offset event line Offset event line Background line Backgrounds line Index  lineOffset lineText lineGetBackground LineBackgroundEvent lineIndex getLineAtOffset lineOffset lineBackground lineBackgrounds lineIndex
Handles the get line style information callback p param event line Offset line number input param event line Text line text input param event styles array of Style Ranges need to be in order output public void line Get Style Line Style Event event int line Start event line Offset int line End line Start event line Text length int high search For Style line Start line End Style Range style null Vector line Styles new Vector index will represent a style that starts after the line end processing ends before the line continue processing starts before the line ends in the line add range starts in the line ends in the line add range starts in the line ends after the line add range starts before the line ends after the line add range for int index high index style Count index style styles index if style start line End style starts after the line end looping break int style End style start style length 1 if style End line Start line Styles add Element style event styles new Style Range line Styles size line Styles copy Into event styles  lineOffset lineText StyleRanges lineGetStyle LineStyleEvent lineStart lineOffset lineEnd lineStart lineText searchForStyle lineStart lineEnd StyleRange lineStyles styleCount lineEnd styleEnd styleEnd lineStart lineStyles addElement StyleRange lineStyles lineStyles copyInto
Searches for the first style in the code start code code end code range p return the index of the first style that overlaps the input range int search For Style int start int end int high style Count int low 1 int index high find the index of the first style for the given range use a binary search while high low 1 index high low 2 Style Range style styles index int style End style start style length 1 if start style start end style End start style start style End start style End end high index else low index return high  searchForStyle styleCount StyleRange styleEnd styleEnd styleEnd styleEnd
Updates the line background colors to reflect a new color Called by Styled Text p param start Line index of the first line to color param line Count number of lines to color starting at start Line param background the background color for the lines void set Line Background int start Line int count Color background for int i start Line i start Line count i line Backgrounds i background  StyledText startLine lineCount startLine setLineBackground startLine startLine startLine lineBackgrounds
Update the styles to reflect the new style code new Style code will replace any old style for the range When this method is called the Default Line Styler may merge the new style with an existing style if possible Called by Styled Text when a style is added Called by Styled Text p param new Style the new style information void set Style Range Style Range new Style if new Style null styles new Style Range 0 style Expand Exp 1 style Count 0 return if new Style length 0 return if new Style is Unstyled clear Style new Style return Point pt get Overlapping Styles new Style start new Style length int new Style End new Style start new Style length 1 no styles exist if pt null insert Style new Style 0 return new Style does not overlap any other styles if pt y 0 insert Merge Style new Style pt x return the new Style overlaps one or more of the existing styles boolean added false indicates whether or not the new style has been added int count 0 pt x is the index of the first overlapped style pt y is the number of overlapped styles for int i pt x count pt y i Style Range overlap styles i int overlap End overlap start overlap length 1 if overlap start new Style start if overlap End new Style End the end of overlap needs to be replaced by new Style if new Style similar To overlap update overlap to accomodate the new style overlap length new Style start new Style length overlap start else overlap length new Style start overlap start see if new Style can be merged with the style after overlap if so processing is done if merge Style After new Style i 1 break otherwise insert the new Style new Style may still overlap other styles after it so continue processing insert Style new Style i 1 i added true else middle of overlap needs to be replaced by new Style this will cause overlap to be broken into two if new Style similar To overlap break Style Range end Style Style Range overlap clone end Style start new Style End 1 end Style length overlap End new Style End overlap length new Style start overlap start insert Style new Style i 1 i insert Style end Style i 1 when new Style overlaps the middle of a style this implies that processing is done no more overlapped styles break else if overlap End new Style End overlap will be replaced by the new Style make sure new Style hasn t already been added if it has just delete overlap if added styles i new Style added true else delete Style i i else beginning of overlap needs to be replaced by new Style overlap start new Style End 1 overlap length overlap End overlap start 1 if added insert Merge Style new Style i when new Style overlaps only the beginning of a style this implies that processing is done no more overlapped styles break count  newStyle DefaultLineStyler StyledText StyledText newStyle setStyleRange StyleRange newStyle newStyle StyleRange styleExpandExp styleCount newStyle newStyle isUnstyled clearStyle newStyle getOverlappingStyles newStyle newStyle newStyleEnd newStyle newStyle insertStyle newStyle newStyle insertMergeStyle newStyle newStyle StyleRange overlapEnd newStyle overlapEnd newStyleEnd newStyle newStyle similarTo newStyle newStyle newStyle newStyle mergeStyleAfter newStyle newStyle newStyle insertStyle newStyle newStyle newStyle similarTo StyleRange endStyle StyleRange endStyle newStyleEnd endStyle overlapEnd newStyleEnd newStyle insertStyle newStyle insertStyle endStyle newStyle overlapEnd newStyleEnd newStyle newStyle newStyle deleteStyle newStyle newStyleEnd overlapEnd insertMergeStyle newStyle newStyle
Replace the styles for the given range p param styles the new styles must be in order and non overlapping void replace Style Ranges int start int length Style Range ranges clear Style new Style Range start length null null find insert point int high style Count int low 1 int index high while high low 1 index high low 2 Style Range style styles index if start style start high index else low index insert Styles ranges high  replaceStyleRanges StyleRange clearStyle StyleRange styleCount StyleRange insertStyles
Sets the array of styles and discards old styles Called by Styled Text p param styles the new styles must be in order and non overlapping void set Style Ranges Style Range styles this styles new Style Range styles length System arraycopy styles 0 this styles 0 styles length style Count styles length style Expand Exp 1  StyledText setStyleRanges StyleRange StyleRange styleCount styleExpandExp
Updates the style ranges and line backgrounds to reflect a pending text change Called by Styled Text when a Text Changing Event is received p param event the event with the text change information public void text Changing Text Changing Event event int start Line content get Line At Offset event start int start Line Offset content get Offset At Line start Line text Changing event start event replace Char Count text Changing event start event new Char Count if event replace Char Count content get Char Count all text is going to be replaced clear line backgrounds lines Changing 0 line Count lines Changing 0 content get Line Count event replace Line Count event new Line Count return if event start start Line Offset start Line start Line 1 lines Changing start Line event replace Line Count lines Changing start Line event new Line Count  StyledText TextChangingEvent textChanging TextChangingEvent startLine getLineAtOffset startLineOffset getOffsetAtLine startLine textChanging replaceCharCount textChanging newCharCount replaceCharCount getCharCount linesChanging lineCount linesChanging getLineCount replaceLineCount newLineCount startLineOffset startLine startLine linesChanging startLine replaceLineCount linesChanging startLine newLineCount
void lines Changing int start int delta if delta 0 return boolean inserting delta 0 if inserting shift the lines down to make room for new lines expand Lines By delta for int i line Count 1 i start i line Backgrounds i delta line Backgrounds i for int i start i start delta i line Backgrounds i null else shift up the lines for int i start delta i line Count i line Backgrounds i delta line Backgrounds i line Count delta  linesChanging expandLinesBy lineCount lineBackgrounds lineBackgrounds lineBackgrounds lineCount lineBackgrounds lineBackgrounds lineCount
void text Changing int start int delta if delta 0 return Style Range style find the index of the first style for the given offset use a binary search to find the index int end int delete Start 1 int delete Count 0 boolean inserting delta 0 if inserting end start delta 1 else end start delta 1 int high search For Style start end int index update the styles that are in the affected range for index high index style Count index style styles index if inserting if style start start break in the insert case only one style range will be directly affected it will need to be split into two and then the new Style inserted Style Range before Style Style Range style clone before Style length start style start style start start style length style length before Style length if before Style length 0 insert Style before Style index index break else int style End style start style length 1 if style start end break in the delete case any style that overlaps the change range will be affected if style start start if style End end style starts before change range ends in change range style length start style start else style starts before change range ends after change range style length style length delta index break else if style End end style starts in change range ends in change range if delete Start 1 delete Start index delete Count else style starts in change range ends after change range style start start style length style End end index break delete Styles delete Start delete Count change the offsets of the styles after the affected styles for int i index delete Count i style Count i style styles i style start style start delta  textChanging StyleRange deleteStart deleteCount searchForStyle styleCount newStyle StyleRange beforeStyle StyleRange beforeStyle beforeStyle beforeStyle insertStyle beforeStyle styleEnd styleEnd styleEnd deleteStart deleteStart deleteCount styleEnd deleteStyles deleteStart deleteCount deleteCount styleCount
Returns the indexes of the styles that overlap the given range Styles that partially or fully overlap the range will be returned p return Point where x is the index of the starting overlap style y is the number of styles that overlap the range Point get Overlapping Styles int start int length Style Range style if style Count 0 return null find the index of the first style for the given offset use a binary search to find the index int end start length 1 int high search For Style start end int count 0 for int index high index style Count index style styles index int style End style start style length 1 if style start end break if style End start count return new Point high count  getOverlappingStyles StyleRange styleCount searchForStyle styleCount styleEnd styleEnd
Returns the background color of a line Called by Styled Text It is safe to return the existing Color object since the colors are set and managed by the client p param index the line index return the background color of the line at the given index Color get Line Background int index return line Backgrounds index  StyledText getLineBackground lineBackgrounds
Returns the style for the character at code offset code Called by Styled Text Returns a new style Does not return the existing style p param offset the character position in the text return a cloned Style Range with start offset and length 1 if a style is specified or null if no style is specified Style Range get Style Range At Offset int offset if style Count 0 return null Point pt get Overlapping Styles offset 1 if pt null pt y 0 return null Style Range new Style Style Range styles pt x clone new Style start offset new Style length 1 return new Style  StyledText StyleRange StyleRange getStyleRangeAtOffset styleCount getOverlappingStyles StyleRange newStyle StyleRange newStyle newStyle newStyle
Returns the styles for the given range Returns the existing styles so be careful not to modify the return value Styles are not cloned in order to make this method as efficient as possible p param offset the start position of the text range param length the length of the text range return a Style Range array or null if no styles are specified for the text range Style Range get Style Ranges For int offset int length if style Count 0 return null Point pt get Overlapping Styles offset length if pt null pt y 0 return null Style Range ranges new Style Range pt y for int i 0 i pt y i Style Range new Style styles pt x i ranges i new Style return ranges  StyleRange StyleRange getStyleRangesFor styleCount getOverlappingStyles StyleRange StyleRange StyleRange newStyle newStyle
return ranges void release styles null 

Creates an instance of class Display Renderer class p param device Device to render on param regular Font Font to use for regular non bold text param is Bidi true bidi platform false no bidi platform param left Margin margin to the left of the text param parent class Styled Text class widget to render param tab Length length in characters of a tab character Display Renderer Device device Font regular Font Styled Text parent int tab Length super device regular Font this parent parent calculate Line Height set Tab Length tab Length  DisplayRenderer regularFont isBidi leftMargin StyledText tabLength DisplayRenderer regularFont StyledText tabLength regularFont calculateLineHeight setTabLength tabLength
void dispose super dispose if layouts null for int i 0 i layouts length i Text Layout layout layouts i if layout null super dispose Text Layout layout top Index 1 layouts null  TextLayout disposeTextLayout topIndex
Dispose the specified GC p param gc GC to dispose protected void disposeGC GC gc gc dispose 
Draws the line delimiter selection if the selection extends beyond the given line p param line the line to draw param line Offset offset of the first character in the line Relative to the start of the document param styles line styles param paintY y location to draw at param gc GC to draw on protected void draw Line Break Selection String line int line Offset int paintX int paintY GC gc Point selection parent internal Get Selection int line Length line length int selection Start Math max 0 selection x line Offset int selection End selection y line Offset int line End Space Width get Line End Space Width int line Height get Line Height if selection End selection Start selection End 0 selection Start line Length selection End line Length return gc set Background parent get Selection Background gc set Foreground parent get Selection Foreground if parent get Style SWT FULL SELECTION 0 Rectangle rect get Client Area gc fill Rectangle paintX paintY rect width paintX line Height else boolean is Wrapped Line false if parent internal Get Word Wrap Styled Text Content content get Content int line End line Offset line Length int line Index content get Line At Offset line End is the start offset of the next line the same as the end offset of this line if line Index content get Line Count 1 content get Offset At Line line Index 1 line End is Wrapped Line true if is Wrapped Line false render the line break selection gc fill Rectangle paintX paintY line End Space Width line Height  lineOffset drawLineBreakSelection lineOffset internalGetSelection lineLength selectionStart lineOffset selectionEnd lineOffset lineEndSpaceWidth getLineEndSpaceWidth lineHeight getLineHeight selectionEnd selectionStart selectionEnd selectionStart lineLength selectionEnd lineLength setBackground getSelectionBackground setForeground getSelectionForeground getStyle FULL_SELECTION getClientArea fillRectangle lineHeight isWrappedLine internalGetWordWrap StyledTextContent getContent lineEnd lineOffset lineLength lineIndex getLineAtOffset lineEnd lineIndex getLineCount getOffsetAtLine lineIndex lineEnd isWrappedLine isWrappedLine fillRectangle lineEndSpaceWidth lineHeight
Returns the text segments that should be treated as if they had a different direction than the surrounding text p param line Offset offset of the first character in the line 0 based from the beginning of the document param line text of the line to specify bidi segments for return text segments that should be treated as if they had a different direction than the surrounding text Only the start index of a segment is specified relative to the start of the line Always starts with 0 and ends with the line length exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the segment indices returned by the listener do not start with 0 are not in ascending order exceed the line length or have duplicates li ul protected int get Bidi Segments int line Offset String line Text if parent is Bidi return null return parent get Bidi Segments line Offset line Text  lineOffset IllegalArgumentException ERROR_INVALID_ARGUMENT getBidiSegments lineOffset lineText isBidi getBidiSegments lineOffset lineText
Returns the visible client area that can be used for rendering p return the visible client area that can be used for rendering protected Rectangle get Client Area return parent get Client Area  getClientArea getClientArea
Returns the class Styled Text Content class to use for line offset calculations p return the class Styled Text Content class to use for line offset calculations protected Styled Text Content get Content return parent internal Get Content  StyledTextContent StyledTextContent StyledTextContent getContent internalGetContent
Returns a new GC to use for rendering and measuring When the GC is no longer used it needs to be disposed by calling disposeGC p return the GC to use for rendering and measuring see disposeGC protected GC getGC return new GC parent 
Returns the horizontal scroll position p return the horizontal scroll position protected int get Horizontal Pixel return parent internal Get Horizontal Pixel  getHorizontalPixel internalGetHorizontalPixel
return parent internal Get Horizontal Pixel protected int get Left Margin return parent left Margin  internalGetHorizontalPixel getLeftMargin leftMargin
see Styled Text Renderer get Line Background Data protected Styled Text Event get Line Background Data int line Offset String line return parent get Line Background Data line Offset line  StyledTextRenderer getLineBackgroundData StyledTextEvent getLineBackgroundData lineOffset getLineBackgroundData lineOffset
see Styled Text Renderer get Line Style Data protected Styled Text Event get Line Style Data int line Offset String line Styled Text Event logical Line Event parent get Line Style Data line Offset line if logical Line Event null logical Line Event get Line Style Data logical Line Event line Offset line return logical Line Event  StyledTextRenderer getLineStyleData StyledTextEvent getLineStyleData lineOffset StyledTextEvent logicalLineEvent getLineStyleData lineOffset logicalLineEvent logicalLineEvent getLineStyleData logicalLineEvent lineOffset logicalLineEvent
return logical Line Event protected int get Orientation return parent get Orientation  logicalLineEvent getOrientation getOrientation
return parent get Orientation protected int get Right Margin return parent right Margin  getOrientation getRightMargin rightMargin
return parent right Margin protected Color get Selection Background return parent get Selection Background  rightMargin getSelectionBackground getSelectionBackground
return parent get Selection Background protected Color get Selection Foreground return parent get Selection Foreground  getSelectionBackground getSelectionForeground getSelectionForeground
see Styled Text Renderer get Selection protected Point get Selection return parent internal Get Selection  StyledTextRenderer getSelection getSelection internalGetSelection
see Styled Text Renderer get Word Wrap protected boolean get Word Wrap return parent get Word Wrap  StyledTextRenderer getWordWrap getWordWrap getWordWrap
see Styled Text Renderer is Full Line Selection protected boolean is Full Line Selection return parent get Style SWT FULL SELECTION 0  StyledTextRenderer isFullLineSelection isFullLineSelection getStyle FULL_SELECTION
Text Layout create Text Layout int line Offset if parent internal Get Word Wrap int line Index get Content get Line At Offset line Offset update Top Index if layouts null int layout Index line Index top Index if 0 layout Index layout Index layouts length Text Layout layout layouts layout Index if layout null return layout return layouts layout Index super create Text Layout line Index return super create Text Layout line Offset  TextLayout createTextLayout lineOffset internalGetWordWrap lineIndex getContent getLineAtOffset lineOffset updateTopIndex layoutIndex lineIndex topIndex layoutIndex layoutIndex TextLayout layoutIndex layoutIndex createTextLayout lineIndex createTextLayout lineOffset
void dispose Text Layout Text Layout layout if layouts null for int i 0 i layouts length i if layouts i layout return super dispose Text Layout layout  disposeTextLayout TextLayout disposeTextLayout
void update Top Index int vertical Increment parent get Vertical Increment int top Index vertical Increment 0 0 parent vertical Scroll Offset vertical Increment int new Length Math max 1 parent get Partial Bottom Index top Index 1 if layouts null top Index this top Index new Length layouts length Text Layout new Layouts new Text Layout new Length if layouts null for int i 0 i layouts length i Text Layout layout layouts i if layout null int layout Index i this top Index top Index if 0 layout Index layout Index new Layouts length new Layouts layout Index layout else super dispose Text Layout layout this top Index top Index layouts new Layouts  updateTopIndex verticalIncrement getVerticalIncrement topIndex verticalIncrement verticalScrollOffset verticalIncrement newLength getPartialBottomIndex topIndex topIndex topIndex newLength TextLayout newLayouts TextLayout newLength TextLayout layoutIndex topIndex topIndex layoutIndex layoutIndex newLayouts newLayouts layoutIndex disposeTextLayout topIndex topIndex newLayouts

public Extended Modify Event Styled Text Event e super e start e start length e end e start replaced Text e text  ExtendedModifyEvent StyledTextEvent replacedText

public interface Extended Modify Listener extends SWT Event Listener This method is called after a text change occurs p param event start the start offset of the new text input param event length the length of the new text input param event replaced Text the replaced text input  ExtendedModifyListener SWTEventListener replacedText

public Line Background Event Styled Text Event e super e line Offset e detail line Text e text  LineBackgroundEvent StyledTextEvent lineOffset lineText

This method is called when a line is about to be drawn in order to get its background color p param event line Offset line start offset input param event line Text line text input param event line Background line background color output  lineOffset lineText lineBackground

public Line Style Event Styled Text Event e super e line Offset e detail line Text e text styles e styles  LineStyleEvent StyledTextEvent lineOffset lineText

public interface Line Style Listener extends SWT Event Listener This method is called when a line is about to be drawn in order to get the line s style information p param event line Offset line start offset input param event line Text line text input param event styles array of Style Ranges need to be in order output  LineStyleListener SWTEventListener lineOffset lineText StyleRanges

int minimum Width Creates a Popup List above the specified shell param parent a Shell control which will be the parent of the new instance cannot be null public Popup List Shell parent this parent 0  minimumWidth PopupList PopupList
close dialog if user selects outside of the shell shell add Listener SWT Deactivate new Listener public void handle Event Event e shell set Visible false  addListener handleEvent setVisible
resize shell when list resizes shell add Control Listener new Control Listener public void control Moved Control Event e  addControlListener ControlListener controlMoved ControlEvent
shell add Control Listener new Control Listener public void control Moved Control Event e public void control Resized Control Event e Rectangle shell Size shell get Client Area list set Size shell Size width shell Size height  addControlListener ControlListener controlMoved ControlEvent controlResized ControlEvent shellSize getClientArea setSize shellSize shellSize
return list selection on Mouse Up or Carriage Return list add Mouse Listener new Mouse Listener public void mouse Double Click Mouse Event e  addMouseListener MouseListener mouseDoubleClick MouseEvent
list add Mouse Listener new Mouse Listener public void mouse Double Click Mouse Event e public void mouse Down Mouse Event e  addMouseListener MouseListener mouseDoubleClick MouseEvent mouseDown MouseEvent
public void mouse Double Click Mouse Event e public void mouse Down Mouse Event e public void mouse Up Mouse Event e shell set Visible false  mouseDoubleClick MouseEvent mouseDown MouseEvent mouseUp MouseEvent setVisible
list add Key Listener new Key Listener public void key Released Key Event e  addKeyListener KeyListener keyReleased KeyEvent
public void key Released Key Event e public void key Pressed Key Event e if e character r shell set Visible false  keyReleased KeyEvent keyPressed KeyEvent setVisible
Creates a Popup List above the specified shell param parent a widget which will be the parent of the new instance cannot be null param style the style of widget to construct since 3 0 public Popup List Shell parent int style shell new Shell parent check Style style list new List shell SWT SINGLE SWT V SCROLL close dialog if user selects outside of the shell shell add Listener SWT Deactivate new Listener public void handle Event Event e shell set Visible false resize shell when list resizes shell add Control Listener new Control Listener public void control Moved Control Event e public void control Resized Control Event e Rectangle shell Size shell get Client Area list set Size shell Size width shell Size height return list selection on Mouse Up or Carriage Return list add Mouse Listener new Mouse Listener public void mouse Double Click Mouse Event e public void mouse Down Mouse Event e public void mouse Up Mouse Event e shell set Visible false list add Key Listener new Key Listener public void key Released Key Event e public void key Pressed Key Event e if e character r shell set Visible false  PopupList PopupList checkStyle V_SCROLL addListener handleEvent setVisible addControlListener ControlListener controlMoved ControlEvent controlResized ControlEvent shellSize getClientArea setSize shellSize shellSize addMouseListener MouseListener mouseDoubleClick MouseEvent mouseDown MouseEvent mouseUp MouseEvent setVisible addKeyListener KeyListener keyReleased KeyEvent keyPressed KeyEvent setVisible
private static int check Style int style int mask SWT LEFT TO RIGHT SWT RIGHT TO LEFT return style mask  checkStyle LEFT_TO_RIGHT RIGHT_TO_LEFT
Gets the widget font p return the widget font exception SWT Error 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 Font get Font return list get Font  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED getFont getFont
Gets the items p This operation will fail if the items cannot be queried from the OS return the items in the widget exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li li ERROR WIDGET DISPOSED when the widget has been disposed li li ERROR CANNOT GET ITEM when the operation fails li ul public String get Items return list get Items  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED ERROR_CANNOT_GET_ITEM getItems getItems
Gets the minimum width of the list return the minimum width of the list public int get Minimum Width return minimum Width  getMinimumWidth minimumWidth
Launches the Popup List waits for an item to be selected and then closes Popup List param rect the initial size and location of the Popup List the dialog will be positioned so that it does not run off the screen and the largest number of items are visible return the text of the selected item or null if no item is selected public String open Rectangle rect Point list Size list compute Size rect width SWT DEFAULT Rectangle screen Size shell get Display get Bounds Position the dialog so that it does not run off the screen and the largest number of items are visible int space Below screen Size height rect y rect height 30 int space Above rect y 30 int y 0 if space Above space Below list Size y space Below place popup list above table cell if list Size y space Above list Size y space Above else list Size y 2 y rect y list Size y else place popup list below table cell if list Size y space Below list Size y space Below else list Size y 2 y rect y rect height Make dialog as wide as the cell list Size x rect width dialog width should not be les than minimumwidth if list Size x minimum Width list Size x minimum Width Align right side of dialog with right side of cell int x rect x rect width list Size x shell set Bounds x y list Size x list Size y shell open list set Focus Display display shell get Display while shell is Disposed shell is Visible if display read And Dispatch display sleep String result null if shell is Disposed String strings list get Selection shell dispose if strings length 0 result strings 0 return result  PopupList PopupList listSize computeSize screenSize getDisplay getBounds spaceBelow screenSize spaceAbove spaceAbove spaceBelow listSize spaceBelow listSize spaceAbove listSize spaceAbove listSize listSize listSize spaceBelow listSize spaceBelow listSize listSize listSize minimumWidth listSize minimumWidth listSize setBounds listSize listSize setFocus getDisplay isDisposed isVisible readAndDispatch isDisposed getSelection
Selects an item with text that starts with specified String p If the item is not currently selected it is selected If the item at an index is selected it remains selected If the string is not matched it is ignored param string the text of the item exception SWT Error 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 select String string String items list get Items find the first entry in the list that starts with the specified string if string null for int i 0 i items length i if items i starts With string int index list index Of items i list select index break  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED getItems startsWith indexOf
Sets the widget font p When new font is null the font reverts to the default system font for the widget param font the new font or null exception SWT Error 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 set Font Font font list set Font font  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED setFont setFont
Sets all items p The previous selection is cleared The previous items are deleted The new items are added The top index is set to 0 param strings the array of items This operation will fail when an item is null or could not be added in the OS exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li li ERROR WIDGET DISPOSED when the widget has been disposed li li ERROR NULL ARGUMENT when items is null li li ERROR ITEM NOT ADDED when the operation fails li ul public void set Items String strings list set Items strings  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED ERROR_NULL_ARGUMENT ERROR_ITEM_NOT_ADDED setItems setItems
Sets the minimum width of the list param width the minimum width of the list public void set Minimum Width int width if width 0 SWT error SWT ERROR INVALID ARGUMENT minimum Width width  setMinimumWidth ERROR_INVALID_ARGUMENT minimumWidth

Creates an instance of class Print Renderer class p param device Device to render on param regular Font Font to use for regular non bold text param gc printer GC to use for rendering There can be only one GC for each printer device at any given time param logical Content Styled Text Content to print param line Backgrounds line background colors to use during rendering param line Styles line styles colors to use during rendering param bidi Segments bidi segments to use during rendering on bidi platforms param left Margin margin to the left of the text param tab Length length in characters of a tab character param client Area the printer client area Print Renderer Device device Font regular Font GC gc Styled Text Content logical Content Hashtable line Backgrounds Hashtable line Styles Hashtable bidi Segments int tab Length Rectangle client Area super device regular Font this logical Content logical Content this line Backgrounds line Backgrounds this line Styles line Styles this bidi Segments bidi Segments this client Area client Area this gc gc calculate Line Height set Tab Length tab Length content new Wrapped Content this logical Content wrap Lines requires tab width to be known content wrap Lines  PrintRenderer regularFont logicalContent StyledTextContent lineBackgrounds lineStyles bidiSegments leftMargin tabLength clientArea PrintRenderer regularFont StyledTextContent logicalContent lineBackgrounds lineStyles bidiSegments tabLength clientArea regularFont logicalContent logicalContent lineBackgrounds lineBackgrounds lineStyles lineStyles bidiSegments bidiSegments clientArea clientArea calculateLineHeight setTabLength tabLength WrappedContent logicalContent wrapLines wrapLines
Disposes the resource created by the receiver protected void dispose content null super dispose 
Do nothing Print Renderer does not create G Cs see Styled Text Renderer disposeGC protected void disposeGC GC gc  PrintRenderer GCs StyledTextRenderer
Do not print the selection see Styled Text Renderer draw Line Selection Background protected void draw Line Break Selection String line int line Offset int paintX int paintY GC gc  StyledTextRenderer drawLineSelectionBackground drawLineBreakSelection lineOffset
Returns from cache the text segments that should be treated as if they had a different direction than the surrounding text p Use cached data p param line Offset offset of the first character in the line 0 based from the beginning of the document param line text of the line to specify bidi segments for return text segments that should be treated as if they had a different direction than the surrounding text Only the start index of a segment is specified relative to the start of the line Always starts with 0 and ends with the line length exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the segment indices returned by the listener do not start with 0 are not in ascending order exceed the line length or have duplicates li ul protected int get Bidi Segments int line Offset String line Text int line Length line Text length int logical Line Offset get Logical Line Offset line Offset int segments int bidi Segments get new Integer logical Line Offset if segments null segments new int 0 line Length else cached bidi segments are for logical lines make sure that returned segments match requested line since line wrapping may require either entire or part of logical line bidi segments int logical Line Index logical Content get Line At Offset line Offset int logical Line Length logical Content get Line logical Line Index length if line Offset logical Line Offset line Length logical Line Length int line Offset Delta line Offset logical Line Offset int new Segment Count 0 int new Segments new int segments length for int i 0 i segments length i new Segments i Math max 0 segments i line Offset Delta if new Segments i line Length new Segments i line Length new Segment Count break if i 0 new Segments i 0 new Segment Count segments new int new Segment Count for int i 0 new Index 0 i new Segments length new Index new Segment Count i if i 0 new Segments i 0 segments new Index new Segments i return segments  lineOffset IllegalArgumentException ERROR_INVALID_ARGUMENT getBidiSegments lineOffset lineText lineLength lineText logicalLineOffset getLogicalLineOffset lineOffset bidiSegments logicalLineOffset lineLength logicalLineIndex logicalContent getLineAtOffset lineOffset logicalLineLength logicalContent getLine logicalLineIndex lineOffset logicalLineOffset lineLength logicalLineLength lineOffsetDelta lineOffset logicalLineOffset newSegmentCount newSegments newSegments lineOffsetDelta newSegments lineLength newSegments lineLength newSegmentCount newSegments newSegmentCount newSegmentCount newIndex newSegments newIndex newSegmentCount newSegments newIndex newSegments
Returns the printer client area p return the visible client area that can be used for rendering see Styled Text Renderer get Client Area protected Rectangle get Client Area return client Area  StyledTextRenderer getClientArea getClientArea clientArea
Returns the class Styled Text Content class to use for line offset calculations This is the wrapped content calculated in the constructor from the logical printing content p return the class Styled Text Content class to use for line offset calculations protected Styled Text Content get Content return content  StyledTextContent StyledTextContent StyledTextContent getContent
Returns the printer GC to use for rendering and measuring There can be only one GC for each printer device at any given time p return the printer GC to use for rendering and measuring protected GC getGC return gc 
Returns 0 Scrolling does not affect printing Text is wrapped for printing p return 0 see Styled Text Renderer get Horizontal Pixel protected int get Horizontal Pixel return 0  StyledTextRenderer getHorizontalPixel getHorizontalPixel
Returns the start offset of the line at the given offset p param visual Line Offset an offset that may be anywhere within a line return the start offset of the line at the given offset relative to the start of the document private int get Logical Line Offset int visual Line Offset int logical Line Index logical Content get Line At Offset visual Line Offset return logical Content get Offset At Line logical Line Index  visualLineOffset getLogicalLineOffset visualLineOffset logicalLineIndex logicalContent getLineAtOffset visualLineOffset logicalContent getOffsetAtLine logicalLineIndex
return logical Content get Offset At Line logical Line Index protected int get Orientation return SWT LEFT TO RIGHT  logicalContent getOffsetAtLine logicalLineIndex getOrientation LEFT_TO_RIGHT
return SWT LEFT TO RIGHT protected Color get Selection Background return null  LEFT_TO_RIGHT getSelectionBackground
return null protected Color get Selection Foreground return null  getSelectionForeground
Return cached line background data see Styled Text Renderer get Line Background Data protected Styled Text Event get Line Background Data int line Offset String line int logical Line Offset get Logical Line Offset line Offset return Styled Text Event line Backgrounds get new Integer logical Line Offset  StyledTextRenderer getLineBackgroundData StyledTextEvent getLineBackgroundData lineOffset logicalLineOffset getLogicalLineOffset lineOffset StyledTextEvent lineBackgrounds logicalLineOffset
Return cached line style background data see Styled Text Renderer get Line Style Data protected Styled Text Event get Line Style Data int line Offset String line int logical Line Offset get Logical Line Offset line Offset Styled Text Event logical Line Event Styled Text Event line Styles get new Integer logical Line Offset if logical Line Event null Styled Text Event clone new Styled Text Event Styled Text Content logical Line Event data clone detail logical Line Event detail clone styles logical Line Event styles clone text logical Line Event text logical Line Event get Line Style Data clone line Offset line return logical Line Event  StyledTextRenderer getLineStyleData StyledTextEvent getLineStyleData lineOffset logicalLineOffset getLogicalLineOffset lineOffset StyledTextEvent logicalLineEvent StyledTextEvent lineStyles logicalLineOffset logicalLineEvent StyledTextEvent StyledTextEvent StyledTextContent logicalLineEvent logicalLineEvent logicalLineEvent logicalLineEvent logicalLineEvent getLineStyleData lineOffset logicalLineEvent
Selection is not printed p return Point 0 0 see Styled Text Renderer get Selection protected Point get Selection return new Point 0 0  StyledTextRenderer getSelection getSelection
Printed content is always wrapped p return true see Styled Text Renderer get Word Wrap protected boolean get Word Wrap return true  StyledTextRenderer getWordWrap getWordWrap
Selection is not printed Returns false p return false see Styled Text Renderer is Full Line Selection protected boolean is Full Line Selection return false  StyledTextRenderer isFullLineSelection isFullLineSelection

this add Listener SWT Resize new Listener public void handle Event Event e layout true  addListener handleEvent
sash Listener new Listener public void handle Event Event e on Drag Sash e  sashListener handleEvent onDragSash
Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT HORIZONTAL see SWT VERTICAL see get Style public Sash Form Composite parent int style super parent check Style style if style SWT VERTICAL 0 orientation SWT VERTICAL this add Listener SWT Resize new Listener public void handle Event Event e layout true sash Listener new Listener public void handle Event Event e on Drag Sash e  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle SashForm checkStyle addListener handleEvent sashListener handleEvent onDragSash
private static int check Style int style int mask SWT BORDER SWT LEFT TO RIGHT SWT RIGHT TO LEFT return style mask  checkStyle LEFT_TO_RIGHT RIGHT_TO_LEFT
public Point compute Size int w Hint int h Hint boolean changed check Widget Control c Array get Controls true if c Array length 0 return new Point w Hint h Hint int sashwidth sashes length 0 SASH WIDTH sashes 0 get Border Width 2 SASH WIDTH int width 0 int height 0 boolean vertical orientation SWT VERTICAL if vertical height c Array length 1 sashwidth else width c Array length 1 sashwidth for int i 0 i c Array length i if vertical Point size c Array i compute Size w Hint SWT DEFAULT height size y width Math max width size x else Point size c Array i compute Size SWT DEFAULT h Hint width size x height Math max height size y if w Hint SWT DEFAULT width w Hint if h Hint SWT DEFAULT height h Hint return new Point width height  computeSize wHint hHint checkWidget cArray getControls cArray wHint hHint SASH_WIDTH getBorderWidth SASH_WIDTH cArray cArray cArray cArray computeSize wHint cArray computeSize hHint wHint wHint hHint hHint
Returns SWT HORIZONTAL if the controls in the Sash Form are laid out side by side or SWT VERTICAL if the controls in the Sash Form are laid out top to bottom return SWT HORIZONTAL or SWT VERTICAL public int get Orientation check Widget return orientation  SashForm SashForm getOrientation checkWidget
Answer the control that currently is maximized in the Sash Form This value may be null return the control that currently is maximized or null public Control get Maximized Control check Widget return this max Control  SashForm getMaximizedControl checkWidget maxControl
Answer the relative weight of each child in the Sash Form The weight represents the percent of the total width if Sash Form has Horizontal orientation or total height if Sash Form has Vertical orientation each control occupies The weights are returned in order of the creation of the widgets weight 0 corresponds to the weight of the first child created return the relative weight of each child 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 int get Weights check Widget Control c Array get Controls false int ratios new int c Array length for int i 0 i c Array length i Long ratio Long c Array i get Data LAYOUT RATIO if ratio null ratios i int ratio long Value 1000 16 else ratios i 200 return ratios  SashForm SashForm SashForm SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getWeights checkWidget cArray getControls cArray cArray cArray getData LAYOUT_RATIO longValue
Control get Controls boolean only Visible Control children get Children Control result new Control 0 for int i 0 i children length i if children i instanceof Sash continue if only Visible children i get Visible continue Control new Result new Control result length 1 System arraycopy result 0 new Result 0 result length new Result result length children i result new Result return result  getControls onlyVisible getChildren onlyVisible getVisible newResult newResult newResult newResult
public void layout boolean changed check Widget Rectangle area get Client Area if area width 0 area height 0 return Control new Controls get Controls true if controls length 0 new Controls length 0 return controls new Controls if max Control null max Control is Disposed for int i 0 i controls length i if controls i max Control controls i set Bounds 200 200 0 0 else controls i set Bounds area return keep just the right number of sashes if sashes length controls length 1 Sash new Sashes new Sash controls length 1 System arraycopy sashes 0 new Sashes 0 sashes length int sash Style orientation SWT HORIZONTAL SWT VERTICAL SWT HORIZONTAL if get Style SWT BORDER 0 sash Style SWT BORDER for int i sashes length i new Sashes length i new Sashes i new Sash this sash Style new Sashes i set Background background new Sashes i set Foreground foreground new Sashes i add Listener SWT Selection sash Listener sashes new Sashes if sashes length controls length 1 if controls length 0 for int i 0 i sashes length i sashes i dispose sashes new Sash 0 else Sash new Sashes new Sash controls length 1 System arraycopy sashes 0 new Sashes 0 new Sashes length for int i controls length 1 i sashes length i sashes i dispose sashes new Sashes if controls length 0 return int sashwidth sashes length 0 SASH WIDTH sashes 0 get Border Width 2 SASH WIDTH get the ratios long ratios new long controls length long total 0 for int i 0 i controls length i Long ratio Long controls i get Data LAYOUT RATIO if ratio null ratios i ratio long Value else ratios i 200 16 999 1000 total ratios i if orientation SWT HORIZONTAL total long sashes length sashwidth 16 area width 1 area width else total long sashes length sashwidth 16 area height 1 area height if orientation SWT HORIZONTAL int width int ratios 0 area width total int x area x controls 0 set Bounds x area y width area height x width for int i 1 i controls length 1 i sashes i 1 set Bounds x area y sashwidth area height x sashwidth width int ratios i area width total controls i set Bounds x area y width area height x width if controls length 1 sashes sashes length 1 set Bounds x area y sashwidth area height x sashwidth width area width x controls controls length 1 set Bounds x area y width area height else int height int ratios 0 area height total int y area y controls 0 set Bounds area x y area width height y height for int i 1 i controls length 1 i sashes i 1 set Bounds area x y area width sashwidth y sashwidth height int ratios i area height total controls i set Bounds area x y area width height y height if controls length 1 sashes sashes length 1 set Bounds area x y area width sashwidth y sashwidth height area height y controls controls length 1 set Bounds area x y area width height  checkWidget getClientArea newControls getControls newControls newControls maxControl maxControl isDisposed maxControl setBounds setBounds newSashes newSashes sashStyle getStyle sashStyle newSashes newSashes sashStyle newSashes setBackground newSashes setForeground newSashes addListener sashListener newSashes newSashes newSashes newSashes newSashes SASH_WIDTH getBorderWidth SASH_WIDTH getData LAYOUT_RATIO longValue setBounds setBounds setBounds setBounds setBounds setBounds setBounds setBounds setBounds setBounds
void on Drag Sash Event event if event detail SWT DRAG constrain feedback Rectangle area get Client Area if orientation SWT HORIZONTAL event x Math min Math max DRAG MINIMUM event x area width DRAG MINIMUM else event y Math min Math max DRAG MINIMUM event y area height DRAG MINIMUM return Sash sash Sash event widget int sash Index 1 for int i 0 i sashes length i if sashes i sash sash Index i break if sash Index 1 return Control c1 controls sash Index Control c2 controls sash Index 1 Rectangle b1 c1 get Bounds Rectangle b2 c2 get Bounds Rectangle sash Bounds sash get Bounds Rectangle area get Client Area if orientation SWT HORIZONTAL int shift event x sash Bounds x b1 width shift b2 x shift b2 width shift if b1 width DRAG MINIMUM b2 width DRAG MINIMUM return c1 set Data LAYOUT RATIO new Long long b1 width 16 area width 1 area width c2 set Data LAYOUT RATIO new Long long b2 width 16 area width 1 area width else int shift event y sash Bounds y b1 height shift b2 y shift b2 height shift if b1 height DRAG MINIMUM b2 height DRAG MINIMUM return c1 set Data LAYOUT RATIO new Long long b1 height 16 area height 1 area height c2 set Data LAYOUT RATIO new Long long b2 height 16 area height 1 area height c1 set Bounds b1 sash set Bounds event x event y event width event height c2 set Bounds b2  onDragSash getClientArea DRAG_MINIMUM DRAG_MINIMUM DRAG_MINIMUM DRAG_MINIMUM sashIndex sashIndex sashIndex sashIndex sashIndex getBounds getBounds sashBounds getBounds getClientArea sashBounds DRAG_MINIMUM DRAG_MINIMUM setData LAYOUT_RATIO setData LAYOUT_RATIO sashBounds DRAG_MINIMUM DRAG_MINIMUM setData LAYOUT_RATIO setData LAYOUT_RATIO setBounds setBounds setBounds
If orientation is SWT HORIZONTAL lay the controls in the Sash Form out side by side If orientation is SWT VERTICAL lay the controls in the Sash Form out top to bottom param orientation SWT HORIZONTAL or SWT VERTICAL 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 li ERROR INVALID ARGUMENT if the value of orientation is not SWT HORIZONTAL or SWT VERTICAL ul public void set Orientation int orientation check Widget if this orientation orientation return if orientation SWT HORIZONTAL orientation SWT VERTICAL SWT error SWT ERROR INVALID ARGUMENT this orientation orientation int sash Style orientation SWT HORIZONTAL SWT VERTICAL SWT HORIZONTAL if get Style SWT BORDER 0 sash Style SWT BORDER for int i 0 i sashes length i sashes i dispose sashes i new Sash this sash Style sashes i set Background background sashes i set Foreground foreground sashes i add Listener SWT Selection sash Listener layout  SashForm SashForm SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT setOrientation checkWidget ERROR_INVALID_ARGUMENT sashStyle getStyle sashStyle sashStyle setBackground setForeground addListener sashListener
public void set Background Color color super set Background color background color for int i 0 i sashes length i sashes i set Background background  setBackground setBackground setBackground
public void set Foreground Color color super set Foreground color foreground color for int i 0 i sashes length i sashes i set Foreground foreground  setForeground setForeground setForeground
public void set Layout Layout layout check Widget  setLayout checkWidget
Specify the control that should take up the entire client area of the Sash Form If one control has been maximized and this method is called with a different control the previous control will be minimized and the new control will be maximized if the value of control is null the Sash Form will minimize all controls and return to the default layout where all controls are laid out separated by sashes param control the control to be maximized or null 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 set Maximized Control Control control check Widget if control null if max Control null this max Control null layout for int i 0 i sashes length i sashes i set Visible true return for int i 0 i sashes length i sashes i set Visible false max Control control layout  SashForm SashForm SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMaximizedControl checkWidget maxControl maxControl setVisible setVisible maxControl
Specify the relative weight of each child in the Sash Form This will determine what percent of the total width if Sash Form has Horizontal orientation or total height if Sash Form has Vertical orientation each control will occupy The weights must be positive values and there must be an entry for each non sash child of the Sash Form param weights the relative weight of each child 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 li ERROR INVALID ARGUMENT if the weights value is null or of incorrect length must match the number of children li ul public void set Weights int weights check Widget Control c Array get Controls false if weights null weights length c Array length SWT error SWT ERROR INVALID ARGUMENT int total 0 for int i 0 i weights length i if weights i 0 SWT error SWT ERROR INVALID ARGUMENT total weights i if total 0 SWT error SWT ERROR INVALID ARGUMENT for int i 0 i c Array length i c Array i set Data LAYOUT RATIO new Long long weights i 16 total 1 total layout  SashForm SashForm SashForm SashForm SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT setWeights checkWidget cArray getControls cArray ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT cArray cArray setData LAYOUT_RATIO

if h Bar null h Bar add Listener SWT Selection new Listener public void handle Event Event e h Scroll  hBar hBar addListener handleEvent hScroll
if v Bar null v Bar add Listener SWT Selection new Listener public void handle Event Event e v Scroll  vBar vBar addListener handleEvent vScroll
add Listener SWT Resize new Listener public void handle Event Event e resize  addListener handleEvent
content Listener new Listener public void handle Event Event e if e type SWT Resize return resize  contentListener handleEvent
Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT H SCROLL see SWT V SCROLL see get Style public Scrolled Composite Composite parent int style super parent check Style style Scroll Bar h Bar get Horizontal Bar if h Bar null h Bar add Listener SWT Selection new Listener public void handle Event Event e h Scroll Scroll Bar v Bar get Vertical Bar if v Bar null v Bar add Listener SWT Selection new Listener public void handle Event Event e v Scroll add Listener SWT Resize new Listener public void handle Event Event e resize content Listener new Listener public void handle Event Event e if e type SWT Resize return resize  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS H_SCROLL V_SCROLL getStyle ScrolledComposite checkStyle ScrollBar hBar getHorizontalBar hBar hBar addListener handleEvent hScroll ScrollBar vBar getVerticalBar vBar vBar addListener handleEvent vScroll addListener handleEvent contentListener handleEvent
private static int check Style int style int mask SWT H SCROLL SWT V SCROLL SWT BORDER SWT LEFT TO RIGHT SWT RIGHT TO LEFT return style mask  checkStyle H_SCROLL V_SCROLL LEFT_TO_RIGHT RIGHT_TO_LEFT
public Point compute Size int w Hint int h Hint boolean changed check Widget When a composite does layout without using a layout manager it must take into account the preferred size of it s children when computing it s preferred size in the same way that a layout manager would In particular when a scrolled composite hides the scroll bars and places a child to fill the client area then repeated calls to compute the preferred size of the scrolled composite should not keep adding in the space used by the scroll bars if content null return super compute Size w Hint h Hint changed Point size content compute Size w Hint h Hint changed Rectangle trim compute Trim 0 0 size x size y return new Point trim width trim height  computeSize wHint hHint checkWidget computeSize wHint hHint computeSize wHint hHint computeTrim
Returns the Always Show Scrollbars flag True if the scrollbars are always shown even if they are not required False if the scrollbars are only visible when some part of the composite needs to be scrolled to be seen The H SCROLL and V SCROLL style bits are also required to enable scrollbars in the horizontal and vertical directions return the Always Show Scrollbars flag value public boolean get Always Show Scroll Bars check Widget return always Show Scroll  H_SCROLL V_SCROLL getAlwaysShowScrollBars checkWidget alwaysShowScroll
Get the content that is being scrolled return the control displayed in the content area public Control get Content check Widget return content  getContent checkWidget
void h Scroll if content null return Point location content get Location Scroll Bar h Bar get Horizontal Bar int h Selection h Bar get Selection content set Location h Selection location y  hScroll getLocation ScrollBar hBar getHorizontalBar hSelection hBar getSelection setLocation hSelection
public void layout boolean changed check Widget if content null return Rectangle content Rect content get Bounds Scroll Bar h Bar get Horizontal Bar Scroll Bar v Bar get Vertical Bar if always Show Scroll boolean h Visible needH Scroll content Rect false boolean v Visible needV Scroll content Rect h Visible if h Visible v Visible h Visible needH Scroll content Rect v Visible if h Bar null h Bar set Visible h Visible if v Bar null v Bar set Visible v Visible Rectangle host Rect get Client Area if expand Horizontal content Rect width Math max min Width host Rect width if expand Vertical content Rect height Math max min Height host Rect height if h Bar null h Bar set Maximum content Rect width h Bar set Thumb Math min content Rect width host Rect width int h Page content Rect width host Rect width int h Selection h Bar get Selection if h Selection h Page if h Page 0 h Selection 0 h Bar set Selection 0 content Rect x h Selection if v Bar null v Bar set Maximum content Rect height v Bar set Thumb Math min content Rect height host Rect height int v Page content Rect height host Rect height int v Selection v Bar get Selection if v Selection v Page if v Page 0 v Selection 0 v Bar set Selection 0 content Rect y v Selection content set Bounds content Rect  checkWidget contentRect getBounds ScrollBar hBar getHorizontalBar ScrollBar vBar getVerticalBar alwaysShowScroll hVisible needHScroll contentRect vVisible needVScroll contentRect hVisible hVisible vVisible hVisible needHScroll contentRect vVisible hBar hBar setVisible hVisible vBar vBar setVisible vVisible hostRect getClientArea expandHorizontal contentRect minWidth hostRect expandVertical contentRect minHeight hostRect hBar hBar setMaximum contentRect hBar setThumb contentRect hostRect hPage contentRect hostRect hSelection hBar getSelection hSelection hPage hPage hSelection hBar setSelection contentRect hSelection vBar vBar setMaximum contentRect vBar setThumb contentRect hostRect vPage contentRect hostRect vSelection vBar getSelection vSelection vPage vPage vSelection vBar setSelection contentRect vSelection setBounds contentRect
private boolean needH Scroll Rectangle content Rect boolean v Visible Scroll Bar h Bar get Horizontal Bar if h Bar null return false Rectangle host Rect get Bounds int border get Border Width host Rect width 2 border Scroll Bar v Bar get Vertical Bar if v Visible v Bar null host Rect width v Bar get Size x if expand Horizontal content Rect width host Rect width return true if expand Horizontal min Width host Rect width return true return false  needHScroll contentRect vVisible ScrollBar hBar getHorizontalBar hBar hostRect getBounds getBorderWidth hostRect ScrollBar vBar getVerticalBar vVisible vBar hostRect vBar getSize expandHorizontal contentRect hostRect expandHorizontal minWidth hostRect
private boolean needV Scroll Rectangle content Rect boolean h Visible Scroll Bar v Bar get Vertical Bar if v Bar null return false Rectangle host Rect get Bounds int border get Border Width host Rect height 2 border Scroll Bar h Bar get Horizontal Bar if h Visible h Bar null host Rect height h Bar get Size y if expand Horizontal content Rect height host Rect height return true if expand Horizontal min Height host Rect height return true return false  needVScroll contentRect hVisible ScrollBar vBar getVerticalBar vBar hostRect getBounds getBorderWidth hostRect ScrollBar hBar getHorizontalBar hVisible hBar hostRect hBar getSize expandHorizontal contentRect hostRect expandHorizontal minHeight hostRect
void resize if in Resize return in Resize true layout in Resize false  inResize inResize inResize
Return the point in the content that currenly appears in the top left corner of the scrolled composite return the point in the content that currenly appears in the top left corner of the scrolled composite If no content has been set this returns 0 0 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 since 2 0 public Point get Origin check Widget if content null return new Point 0 0 Point location content get Location return new Point location x location y  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getOrigin checkWidget getLocation
Scrolls the content so that the specified point in the content is in the top left corner If no content has been set nothing will occur Negative values will be ignored Values greater than the maximum scroll distance will result in scrolling to the end of the scrollbar param origin the point on the content to appear in the top left corner 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 li ERROR INVALID ARGUMENT value of origin is outside of content ul since 2 0 public void set Origin Point origin set Origin origin x origin y  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT setOrigin setOrigin
Scrolls the content so that the specified point in the content is in the top left corner If no content has been set nothing will occur Negative values will be ignored Values greater than the maximum scroll distance will result in scrolling to the end of the scrollbar param x the x coordinate of the content to appear in the top left corner param y the y coordinate of the content to appear in the top left corner 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 since 2 0 public void set Origin int x int y check Widget if content null return Scroll Bar h Bar get Horizontal Bar if h Bar null h Bar set Selection x x h Bar get Selection else x 0 Scroll Bar v Bar get Vertical Bar if v Bar null v Bar set Selection y y v Bar get Selection else y 0 content set Location x y  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setOrigin checkWidget ScrollBar hBar getHorizontalBar hBar hBar setSelection hBar getSelection ScrollBar vBar getVerticalBar vBar vBar setSelection vBar getSelection setLocation
Set the Always Show Scrollbars flag True if the scrollbars are always shown even if they are not required False if the scrollbars are only visible when some part of the composite needs to be scrolled to be seen The H SCROLL and V SCROLL style bits are also required to enable scrollbars in the horizontal and vertical directions param show true to show the scrollbars even when not required false to show scrollbars only when required 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 set Always Show Scroll Bars boolean show check Widget if show always Show Scroll return always Show Scroll show Scroll Bar h Bar get Horizontal Bar if h Bar null always Show Scroll h Bar set Visible true Scroll Bar v Bar get Vertical Bar if v Bar null always Show Scroll v Bar set Visible true layout  H_SCROLL V_SCROLL SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setAlwaysShowScrollBars checkWidget alwaysShowScroll alwaysShowScroll ScrollBar hBar getHorizontalBar hBar alwaysShowScroll hBar setVisible ScrollBar vBar getVerticalBar vBar alwaysShowScroll vBar setVisible
Set the content that will be scrolled param content the control to be displayed in the content area 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 set Content Control content check Widget if this content null this content is Disposed this content remove Listener SWT Resize content Listener this content set Bounds new Rectangle 200 200 0 0 this content content Scroll Bar v Bar get Vertical Bar Scroll Bar h Bar get Horizontal Bar if this content null if v Bar null v Bar set Maximum 0 v Bar set Thumb 0 v Bar set Selection 0 if h Bar null h Bar set Maximum 0 h Bar set Thumb 0 h Bar set Selection 0 content set Location 0 0 layout this content add Listener SWT Resize content Listener else if h Bar null h Bar set Visible always Show Scroll if v Bar null v Bar set Visible always Show Scroll  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setContent checkWidget isDisposed removeListener contentListener setBounds ScrollBar vBar getVerticalBar ScrollBar hBar getHorizontalBar vBar vBar setMaximum vBar setThumb vBar setSelection hBar hBar setMaximum hBar setThumb hBar setSelection setLocation addListener contentListener hBar hBar setVisible alwaysShowScroll vBar vBar setVisible alwaysShowScroll
Configure the Scrolled Composite to resize the content object to be as wide as the Scrolled Composite when the width of the Scrolled Composite is greater than the minimum width specified in set Min Width If the Scrolled Composite is less than the minimum width the content will not resized and instead the horizontal scroll bar will be used to view the entire width If expand is false this behaviour is turned off By default this behaviour is turned off param expand true to expand the content control to fill available horizontal space 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 set Expand Horizontal boolean expand check Widget if expand expand Horizontal return expand Horizontal expand layout  ScrolledComposite ScrolledComposite ScrolledComposite setMinWidth ScrolledComposite SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setExpandHorizontal checkWidget expandHorizontal expandHorizontal
Configure the Scrolled Composite to resize the content object to be as tall as the Scrolled Composite when the height of the Scrolled Composite is greater than the minimum height specified in set Min Height If the Scrolled Composite is less than the minimum height the content will not resized and instead the vertical scroll bar will be used to view the entire height If expand is false this behaviour is turned off By default this behaviour is turned off param expand true to expand the content control to fill available vertical space 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 set Expand Vertical boolean expand check Widget if expand expand Vertical return expand Vertical expand layout  ScrolledComposite ScrolledComposite ScrolledComposite setMinHeight ScrolledComposite SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setExpandVertical checkWidget expandVertical expandVertical
public void set Layout Layout layout do not allow a layout to be set on this class because layout is being handled by the resize listener check Widget return  setLayout checkWidget
Specify the minimum height at which the Scrolled Composite will begin scrolling the content with the vertical scroll bar This value is only relevant if set Expand Vertical true has been set param height the minimum height or 0 for default height 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 set Min Height int height set Min Size min Width height  ScrolledComposite setExpandVertical SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMinHeight setMinSize minWidth
Specify the minimum width and height at which the Scrolled Composite will begin scrolling the content with the horizontal scroll bar This value is only relevant if set Expand Horizontal true and set Expand Vertical true have been set param size the minimum size or null for the default size 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 set Min Size Point size if size null set Min Size 0 0 else set Min Size size x size y  ScrolledComposite setExpandHorizontal setExpandVertical SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMinSize setMinSize setMinSize
Specify the minimum width and height at which the Scrolled Composite will begin scrolling the content with the horizontal scroll bar This value is only relevant if set Expand Horizontal true and set Expand Vertical true have been set param width the minimum width or 0 for default width param height the minimum height or 0 for default height 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 set Min Size int width int height check Widget if width min Width height min Height return min Width Math max 0 width min Height Math max 0 height layout  ScrolledComposite setExpandHorizontal setExpandVertical SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMinSize checkWidget minWidth minHeight minWidth minHeight
Specify the minimum width at which the Scrolled Composite will begin scrolling the content with the horizontal scroll bar This value is only relevant if set Expand Horizontal true has been set param width the minimum width or 0 for default width 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 set Min Width int width set Min Size width min Height  ScrolledComposite setExpandHorizontal SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMinWidth setMinSize minHeight
void v Scroll if content null return Point location content get Location Scroll Bar v Bar get Vertical Bar int v Selection v Bar get Selection content set Location location x v Selection  vScroll getLocation ScrollBar vBar getVerticalBar vSelection vBar getSelection setLocation vSelection

protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache Control children composite get Children int max Width 0 int max Height 0 for int i 0 i children length i Point size children i compute Size w Hint h Hint flush Cache max Width Math max size x max Width max Height Math max size y max Height int width w Hint height h Hint if w Hint SWT DEFAULT width max Width if h Hint SWT DEFAULT height max Height return new Point width 2 margin Width height 2 margin Height  computeSize wHint hHint flushCache getChildren maxWidth maxHeight computeSize wHint hHint flushCache maxWidth maxWidth maxHeight maxHeight wHint hHint wHint maxWidth hHint maxHeight marginWidth marginHeight
protected void layout Composite composite boolean flush Cache Control children composite get Children Rectangle rect composite get Client Area rect x margin Width rect y margin Height rect width 2 margin Width rect height 2 margin Height for int i 0 i children length i children i set Bounds rect children i set Visible children i top Control  flushCache getChildren getClientArea marginWidth marginHeight marginWidth marginHeight setBounds setVisible topControl

Creates an instance of class Printing class Copies the widget content and rendering data that needs to be requested from listeners p param parent Styled Text widget to print param printer printer device to print on param print Options print options Printing Styled Text parent Printer printer Styled Text Print Options print Options Printer Data data printer get Printer Data this parent parent this printer printer this print Options print Options single Line parent is Single Line start Page 1 end Page Integer MAX VALUE if data scope Printer Data PAGE RANGE start Page data start Page end Page data end Page if end Page start Page int temp end Page end Page start Page start Page temp else if data scope Printer Data SELECTION selection parent get Selection Range display Font Data parent get Font get Font Data 0 copy Content parent get Content cache Line Data printer Content  StyledText printOptions StyledText StyledTextPrintOptions printOptions PrinterData getPrinterData printOptions printOptions singleLine isSingleLine startPage endPage MAX_VALUE PrinterData PAGE_RANGE startPage startPage endPage endPage endPage startPage endPage endPage startPage startPage PrinterData getSelectionRange displayFontData getFont getFontData copyContent getContent cacheLineData printerContent
Caches the bidi segments of the given line p param line Offset offset of the line to cache bidi segments for Relative to the start of the document param line line to cache bidi segments for void cache Bidi Segments int line Offset String line int segments parent get Bidi Segments line Offset line if segments null bidi Segments put new Integer line Offset segments  lineOffset cacheBidiSegments lineOffset getBidiSegments lineOffset bidiSegments lineOffset
Caches the line background color of the given line p param line Offset offset of the line to cache the background color for Relative to the start of the document param line line to cache the background color for void cache Line Background int line Offset String line Styled Text Event event parent get Line Background Data line Offset line if event null line Backgrounds put new Integer line Offset event  lineOffset cacheLineBackground lineOffset StyledTextEvent getLineBackgroundData lineOffset lineBackgrounds lineOffset
Caches all line data that needs to be requested from a listener p param printer Content class Styled Text Content class to request line data for void cache Line Data Styled Text Content printer Content for int i 0 i printer Content get Line Count i int line Offset printer Content get Offset At Line i String line printer Content get Line i if print Options print Line Background cache Line Background line Offset line if print Options print Text Background print Options print Text Foreground print Options print Text Font Style cache Line Style line Offset line if parent is Bidi cache Bidi Segments line Offset line  printerContent StyledTextContent cacheLineData StyledTextContent printerContent printerContent getLineCount lineOffset printerContent getOffsetAtLine printerContent getLine printOptions printLineBackground cacheLineBackground lineOffset printOptions printTextBackground printOptions printTextForeground printOptions printTextFontStyle cacheLineStyle lineOffset isBidi cacheBidiSegments lineOffset
Caches all line styles of the given line p param line Offset offset of the line to cache the styles for Relative to the start of the document param line line to cache the styles for void cache Line Style int line Offset String line Styled Text Event event parent get Line Style Data line Offset line if event null Style Range styles event styles for int i 0 i styles length i Style Range style Copy null if print Options print Text Background false styles i background null style Copy Style Range styles i clone style Copy background null if print Options print Text Foreground false styles i foreground null if style Copy null style Copy Style Range styles i clone style Copy foreground null if print Options print Text Font Style false styles i font Style SWT NORMAL if style Copy null style Copy Style Range styles i clone style Copy font Style SWT NORMAL if style Copy null styles i style Copy line Styles put new Integer line Offset event  lineOffset cacheLineStyle lineOffset StyledTextEvent getLineStyleData lineOffset StyleRange StyleRange styleCopy printOptions printTextBackground styleCopy StyleRange styleCopy printOptions printTextForeground styleCopy styleCopy StyleRange styleCopy printOptions printTextFontStyle fontStyle styleCopy styleCopy StyleRange styleCopy fontStyle styleCopy styleCopy lineStyles lineOffset
Copies the text of the specified class Styled Text Content class p param original the class Styled Text Content class to copy void copy Content Styled Text Content original int insert Offset 0 printer Content new Default Content for int i 0 i original get Line Count i int insert End Offset if i original get Line Count 1 insert End Offset original get Offset At Line i 1 else insert End Offset original get Char Count printer Content replace Text Range insert Offset 0 original get Text Range insert Offset insert End Offset insert Offset insert Offset insert End Offset  StyledTextContent StyledTextContent copyContent StyledTextContent insertOffset printerContent DefaultContent getLineCount insertEndOffset getLineCount insertEndOffset getOffsetAtLine insertEndOffset getCharCount printerContent replaceTextRange insertOffset getTextRange insertOffset insertEndOffset insertOffset insertOffset insertEndOffset
Replaces all display colors in the cached line backgrounds and line styles with printer colors void create Printer Colors Enumeration values line Backgrounds elements printer Colors new Hashtable while values has More Elements Styled Text Event event Styled Text Event values next Element event line Background get Printer Color event line Background values line Styles elements while values has More Elements Styled Text Event event Styled Text Event values next Element for int i 0 i event styles length i Style Range style event styles i Color printer Background get Printer Color style background Color printer Foreground get Printer Color style foreground if printer Background style background printer Foreground style foreground style Style Range style clone style background printer Background style foreground printer Foreground event styles i style  createPrinterColors lineBackgrounds printerColors hasMoreElements StyledTextEvent StyledTextEvent nextElement lineBackground getPrinterColor lineBackground lineStyles hasMoreElements StyledTextEvent StyledTextEvent nextElement StyleRange printerBackground getPrinterColor printerForeground getPrinterColor printerBackground printerForeground StyleRange printerBackground printerForeground
Disposes of the resources and the class Print Renderer class void dispose if printer Colors null Enumeration colors printer Colors elements while colors has More Elements Color color Color colors next Element color dispose printer Colors null if gc null gc dispose gc null if printer Font null printer Font dispose printer Font null if renderer null renderer dispose renderer null  PrintRenderer printerColors printerColors hasMoreElements nextElement printerColors printerFont printerFont printerFont
Finish printing the indicated page param page page that was printed void end Page int page print Decoration page false printer end Page  endPage printDecoration endPage
Creates a class Print Renderer class and calculate the line range to print void initialize Renderer Rectangle trim printer compute Trim 0 0 0 0 Point dpi printer getDPI printer Font new Font printer display Font Data get Name display Font Data get Height SWT NORMAL client Area printer get Client Area page Width client Area width one inch margin around text client Area x dpi x trim x client Area y dpi y trim y client Area width client Area x trim width client Area height client Area y trim height gc new GC printer gc set Font printer Font renderer new Print Renderer printer printer Font gc printer Content line Backgrounds line Styles bidi Segments parent tab Length client Area if print Options header null int line Height renderer get Line Height client Area y line Height 2 client Area height line Height 2 if print Options footer null client Area height renderer get Line Height 2 page Size client Area height renderer get Line Height Styled Text Content content renderer get Content start Line 0 if single Line end Line 0 else end Line content get Line Count 1 Printer Data data printer get Printer Data if data scope Printer Data PAGE RANGE start Line start Page 1 page Size else if data scope Printer Data SELECTION start Line content get Line At Offset selection x if selection y 0 end Line content get Line At Offset selection x selection y 1 else end Line start Line 1  PrintRenderer initializeRenderer computeTrim printerFont displayFontData getName displayFontData getHeight clientArea getClientArea pageWidth clientArea clientArea clientArea clientArea clientArea clientArea clientArea setFont printerFont PrintRenderer printerFont printerContent lineBackgrounds lineStyles bidiSegments tabLength clientArea printOptions lineHeight getLineHeight clientArea lineHeight clientArea lineHeight printOptions clientArea getLineHeight pageSize clientArea getLineHeight StyledTextContent getContent startLine singleLine endLine endLine getLineCount PrinterData getPrinterData PrinterData PAGE_RANGE startLine startPage pageSize PrinterData startLine getLineAtOffset endLine getLineAtOffset endLine startLine
Returns the printer color for the given display color p param color display color return color create on the printer with the same RGB values as the display color Color get Printer Color Color color Color printer Color null if color null printer Color Color printer Colors get color if printer Color null printer Color new Color printer color getRGB printer Colors put color printer Color return printer Color  getPrinterColor printerColor printerColor printerColors printerColor printerColor printerColors printerColor printerColor
Prints the lines in the specified page range void print Styled Text Content content renderer get Content Color background gc get Background Color foreground gc get Foreground int line Height renderer get Line Height int paintY client Area y int page start Page for int i start Line i end Line page end Page i paintY line Height String line content get Line i if paintY client Area y start Page page renderer draw Line line i paintY gc background foreground true if paintY line Height 2 client Area y client Area height close full page end Page page paintY client Area y line Height page if paintY client Area y close partial page end Page page  StyledTextContent getContent getBackground getForeground lineHeight getLineHeight clientArea startPage startLine endLine endPage lineHeight getLine clientArea startPage drawLine lineHeight clientArea clientArea endPage clientArea lineHeight clientArea endPage
Print header or footer decorations param page page number to print if specified in the Styled Text Print Options header or footer param header true print the header false print the footer void print Decoration int page boolean header int last Segment Index 0 final int Segment Count 3 String text if header text print Options header else text print Options footer if text null return for int i 0 i Segment Count i int segment Index text index Of Styled Text Print Options SEPARATOR last Segment Index String segment if segment Index 1 segment text substring last Segment Index print Decoration Segment segment i page header break else segment text substring last Segment Index segment Index print Decoration Segment segment i page header last Segment Index segment Index Styled Text Print Options SEPARATOR length  StyledTextPrintOptions printDecoration lastSegmentIndex SegmentCount printOptions printOptions SegmentCount segmentIndex indexOf StyledTextPrintOptions lastSegmentIndex segmentIndex lastSegmentIndex printDecorationSegment lastSegmentIndex segmentIndex printDecorationSegment lastSegmentIndex segmentIndex StyledTextPrintOptions
Print one segment of a header or footer decoration Headers and footers have three different segments One each for left aligned centered and right aligned text param segment decoration segment to print param alignment alignment of the segment 0 left 1 center 2 right param page page number to print if specified in the decoration segment param header true print the header false print the footer void print Decoration Segment String segment int alignment int page boolean header int page Index segment index Of Styled Text Print Options PAGE TAG if page Index 1 final int Page Tag Length Styled Text Print Options PAGE TAG length String Buffer buffer new String Buffer segment substring 0 page Index buffer append page buffer append segment substring page Index Page Tag Length segment buffer to String if segment length 0 int segment Width int drawX 0 int drawY 0 Text Layout layout new Text Layout printer layout set Text segment layout set Font printer Font segment Width layout get Line Bounds 0 width if header drawY client Area y renderer get Line Height 2 else drawY client Area y client Area height renderer get Line Height if alignment LEFT drawX client Area x else if alignment CENTER drawX page Width segment Width 2 else if alignment RIGHT drawX client Area x client Area width segment Width layout draw gc drawX drawY layout dispose  printDecorationSegment pageIndex indexOf StyledTextPrintOptions PAGE_TAG pageIndex PageTagLength StyledTextPrintOptions PAGE_TAG StringBuffer StringBuffer pageIndex pageIndex PageTagLength toString segmentWidth TextLayout TextLayout setText setFont printerFont segmentWidth getLineBounds clientArea getLineHeight clientArea clientArea getLineHeight clientArea pageWidth segmentWidth clientArea clientArea segmentWidth
Starts a print job and prints the pages specified in the constructor public void run String job Name print Options job Name if job Name null job Name Printing if printer start Job job Name create Printer Colors initialize Renderer print dispose printer end Job  jobName printOptions jobName jobName jobName startJob jobName createPrinterColors initializeRenderer endJob
Start printing a new page param page page number to be started void start Page int page printer start Page print Decoration page true  startPage startPage printDecoration
Creates a RTF writer that writes content starting at offset start in the document code start code and code length code can be set to specify partial lines p param start start offset of content to write 0 based from beginning of document param length length of content to write public RTF Writer int start int length super start length color Table add Element get Foreground color Table add Element get Background set Unicode  RTFWriter colorTable addElement getForeground colorTable addElement getBackground setUnicode
Closes the RTF writer Once closed no more content can be written b NOTE b code to String code does not return a valid RTF string until code close code has been called public void close if is Closed false write Header write n 0 super close  toString isClosed writeHeader
Returns the index of the specified color in the RTF color table p param color the color param default Index return value if color is null return the index of the specified color in the RTF color table or default Index if color is null int get Color Index Color color int default Index int index if color null index default Index else index color Table index Of color if index 1 index color Table size color Table add Element color return index  defaultIndex defaultIndex getColorIndex defaultIndex defaultIndex colorTable indexOf colorTable colorTable addElement
Determines if Unicode RTF should be written Don t write Unicode RTF on Windows 95 98 ME or NT void set Unicode final String Win95 windows 95 final String Win98 windows 98 final String WinME windows me final String WinNT windows nt String os Name System get Property os name to Lower Case String os Version System get Property os version int major Version 0 if os Name starts With WinNT os Version null int major Index os Version index Of if major Index 1 os Version os Version substring 0 major Index try major Version Integer parse Int os Version catch Number Format Exception exception ignore exception version number remains unknown will write without Unicode if os Name null os Name starts With Win95 false os Name starts With Win98 false os Name starts With WinME false os Name starts With WinNT false major Version 4 Write Unicode true else Write Unicode false  setUnicode osName getProperty toLowerCase osVersion getProperty majorVersion osName startsWith osVersion majorIndex osVersion indexOf majorIndex osVersion osVersion majorIndex majorVersion parseInt osVersion NumberFormatException osName osName startsWith osName startsWith osName startsWith osName startsWith majorVersion WriteUnicode WriteUnicode
Appends the specified segment of string to the RTF data Copy from code start code up to but excluding code end code p param string string to copy a segment from Must not contain line breaks Line breaks should be written using write Line Delimiter param start start offset of segment 0 based param end end offset of segment void write String string int start int end for int index start index end index char ch string char At index if ch 0xFF Write Unicode write the sub string from the last escaped character to the current one Fixes bug 21698 if index start write string substring start index write u write Integer to String short ch write control word delimiter start index 1 else if ch ch ch write the sub string from the last escaped character to the current one Fixes bug 21698 if index start write string substring start index write write ch start index 1 write from the last escaped character to the end Fixes bug 21698 if start end write string substring start end  writeLineDelimiter charAt WriteUnicode toString
Writes the RTF header including font table and color table void write Header String Buffer header new String Buffer Font Data font Data get Font get Font Data 0 header append rtf1 ansi specify code page necessary for copy to work in bidi systems that don t support Unicode RTF String cpg System get Property file encoding to Lower Case if cpg starts With cp cpg starts With ms cpg cpg substring 2 cpg length header append ansicpg header append cpg header append uc0 deff0 fonttbl f0 fnil header append font Data get Name header append n colortbl for int i 0 i color Table size i Color color Color color Table element At i header append red header append color get Red header append green header append color get Green header append blue header append color get Blue header append some RTF readers ignore the deff0 font tag Explicitly set the font for the whole document to work around this header append n f0 fs font size is specified in half points header append font Data get Height 2 header append write header to String 0  writeHeader StringBuffer StringBuffer FontData fontData getFont getFontData getProperty toLowerCase startsWith startsWith fontData getName colorTable colorTable elementAt getRed getGreen getBlue fontData getHeight toString
Appends the specified line text to the RTF data Lines will be formatted using the styles queried from the Line Style Listener if set or those set directly in the widget p param line line text to write as RTF Must not contain line breaks Line breaks should be written using write Line Delimiter param line Offset offset of the line 0 based from the start of the widget document Any text occurring before the start offset or after the end offset specified during object creation is ignored exception SWT Exception ul li ERROR IO when the writer is closed li ul public void write Line String line int line Offset Style Range styles new Style Range 0 Color line Background null Styled Text Event event if is Closed SWT error SWT ERROR IO event renderer get Line Style Data line Offset line if event null styles event styles event renderer get Line Background Data line Offset line if event null line Background event line Background if line Background null line Background get Background write Styled Line line line Offset styles line Background  LineStyleListener writeLineDelimiter lineOffset SWTException ERROR_IO writeLine lineOffset StyleRange StyleRange lineBackground StyledTextEvent isClosed ERROR_IO getLineStyleData lineOffset getLineBackgroundData lineOffset lineBackground lineBackground lineBackground lineBackground getBackground writeStyledLine lineOffset lineBackground
Appends the specified line delmimiter to the RTF data p param line Delimiter line delimiter to write as RTF exception SWT Exception ul li ERROR IO when the writer is closed li ul public void write Line Delimiter String line Delimiter if is Closed SWT error SWT ERROR IO write line Delimiter 0 line Delimiter length write par  lineDelimiter SWTException ERROR_IO writeLineDelimiter lineDelimiter isClosed ERROR_IO lineDelimiter lineDelimiter
Appends the specified line text to the RTF data Use the colors and font styles specified in styles and line Background Formatting is written to reflect the text rendering by the text widget Style background colors take precedence over the line background color Background colors are written using the highlight tag vs the cb tag p param line line text to write as RTF Must not contain line breaks Line breaks should be written using write Line Delimiter param line Offset offset of the line 0 based from the start of the widget document Any text occurring before the start offset or after the end offset specified during object creation is ignored param styles styles to use for formatting Must not be null param linebackground line background color to use for formatting May be null void write Styled Line String line int line Offset Style Range styles Color line Background int line Length line length int line Index int copy End int start Offset get Start int end Offset start Offset super get Char Count int line End Offset Math min line Length end Offset line Offset int write Offset start Offset line Offset if write Offset line length return whole line is outside write range else if write Offset 0 line Index write Offset line starts before RTF write start else line Index 0 if line Background null write highlight write get Color Index line Background DEFAULT BACKGROUND write for int i 0 i styles length i Style Range style styles i int start style start line Offset int end start style length int color Index skip over partial first line if end write Offset continue style starts beyond line end or RTF write end if start line End Offset break write any unstyled text if line Index start copy to start of style style starting betond end of write range or end of line is guarded against above write line line Index start line Index start write styled text color Index get Color Index style background DEFAULT BACKGROUND write cf write get Color Index style foreground DEFAULT FOREGROUND if color Index DEFAULT BACKGROUND write highlight write color Index if style font Style SWT BOLD write b write copy to end of style or end of write range or end of line copy End Math min end line End Offset guard against invalid styles and let style processing continue copy End Math max copy End line Index write line line Index copy End if style font Style SWT BOLD write b0 write line Index copy End write unstyled text at the end of the line if line Index line End Offset write line line Index line End Offset if line Background null write  lineBackground writeLineDelimiter lineOffset writeStyledLine lineOffset StyleRange lineBackground lineLength lineIndex copyEnd startOffset getStart endOffset startOffset getCharCount lineEndOffset lineLength endOffset lineOffset writeOffset startOffset lineOffset writeOffset writeOffset lineIndex writeOffset lineIndex lineBackground getColorIndex lineBackground DEFAULT_BACKGROUND StyleRange lineOffset colorIndex writeOffset lineEndOffset lineIndex lineIndex lineIndex colorIndex getColorIndex DEFAULT_BACKGROUND getColorIndex DEFAULT_FOREGROUND colorIndex DEFAULT_BACKGROUND colorIndex fontStyle copyEnd lineEndOffset copyEnd copyEnd lineIndex lineIndex copyEnd fontStyle lineIndex copyEnd lineIndex lineEndOffset lineIndex lineEndOffset lineBackground
Creates a writer that writes content starting at offset start in the document code start code and code length code can be set to specify partial lines p param start start offset of content to write 0 based from beginning of document param length length of content to write public Text Writer int start int length buffer new String Buffer length start Offset start end Offset start length  TextWriter StringBuffer startOffset endOffset
Closes the writer Once closed no more content can be written b NOTE b code to String code is not guaranteed to return a valid string unless the writer is closed public void close if is Closed false is Closed true  toString isClosed isClosed
Returns the number of characters to write public int get Char Count return end Offset start Offset  getCharCount endOffset startOffset
Returns the offset where writing starts 0 based from the start of the widget text Used to write partial lines public int get Start return start Offset  getStart startOffset
Returns whether the writer is closed public boolean is Closed return is Closed  isClosed isClosed
Returns the string code close code must be called before code to String code is guaranteed to return a valid string p return the string public String to String return buffer to String  toString toString toString
Appends the given string to the data void write String string buffer append string 
Inserts the given string to the data at the specified offset Do nothing if offset is 0 or get Char Count p param string text to insert param offset offset in the existing data to insert string at void write String string int offset if offset 0 offset buffer length return buffer insert offset string  getCharCount
Appends the given int to the data void write int i buffer append i 
Appends the given character to the data void write char i buffer append i 
Appends the specified line text to the data p param line line text to write Must not contain line breaks Line breaks should be written using write Line Delimiter param line Offset offset of the line 0 based from the start of the widget document Any text occurring before the start offset or after the end offset specified during object creation is ignored exception SWT Exception ul li ERROR IO when the writer is closed li ul public void write Line String line int line Offset int line Length line length int line Index int copy End int write Offset start Offset line Offset if is Closed SWT error SWT ERROR IO if write Offset line Length return whole line is outside write range else if write Offset 0 line Index write Offset line starts before write start else line Index 0 copy End Math min line Length end Offset line Offset if line Index copy End write line substring line Index copy End  writeLineDelimiter lineOffset SWTException ERROR_IO writeLine lineOffset lineLength lineIndex copyEnd writeOffset startOffset lineOffset isClosed ERROR_IO writeOffset lineLength writeOffset lineIndex writeOffset lineIndex copyEnd lineLength endOffset lineOffset lineIndex copyEnd lineIndex copyEnd
Appends the specified line delmimiter to the data p param line Delimiter line delimiter to write exception SWT Exception ul li ERROR IO when the writer is closed li ul public void write Line Delimiter String line Delimiter if is Closed SWT error SWT ERROR IO write line Delimiter  lineDelimiter SWTException ERROR_IO writeLineDelimiter lineDelimiter isClosed ERROR_IO lineDelimiter
interface Line Cache Calculates the lines in the specified range p param start Line first line to calculate param line Count number of lines to calculate  LineCache startLine lineCount
public void calculate int start Line int line Count Returns a width that will be used by the code Styled Text code widget to size a horizontal scroll bar p return the line width  startLine lineCount StyledText
public int get Width Resets the lines in the specified range This method is called in code Styled Text redraw code and allows implementors to call redraw themselves during reset p param start Line the first line to reset param line Count the number of lines to reset param calculate Max Width true implementors should retain a valid width even if it is affected by the reset operation false the width may be set to 0  getWidth StyledText startLine lineCount calculateMaxWidth
public void redraw Reset int start Line int line Count boolean calculate Max Width Resets the lines in the specified range p param start Line the first line to reset param line Count the number of lines to reset param calculate Max Width true implementors should retain a valid width even if it is affected by the reset operation false the width may be set to 0  redrawReset startLine lineCount calculateMaxWidth startLine lineCount calculateMaxWidth
public void reset int start Line int line Count boolean calculate Max Width Called when a text change occurred p param start Offset the start offset of the text change param new Line Count the number of inserted lines param replace Line Count the number of deleted lines param new Char Count the number of new characters param replace Char Count the number of deleted characters  startLine lineCount calculateMaxWidth startOffset newLineCount replaceLineCount newCharCount replaceCharCount
Creates a new code Content Width Cache code and allocates space for the given number of lines p param parent the Styled Text widget used to create a GC for line measuring param line Count initial number of lines to allocate space for public Content Width Cache Styled Text parent Styled Text Content content this parent parent this content content this line Count content get Line Count line Width new int line Count reset 0 line Count false  ContentWidthCache StyledText lineCount ContentWidthCache StyledText StyledTextContent lineCount getLineCount lineWidth lineCount lineCount
Calculates the width of each line in the given range if it has not been calculated yet If any line in the given range is wider than the currently widest line the maximum line width is updated p param start Line first line to calculate the line width of param line Count number of lines to calculate the line width for public void calculate int start Line int line Count int caret Width 0 int end Line start Line line Count if start Line 0 end Line line Width length return caret Width get Caret Width for int i start Line i end Line i if line Width i 1 String line content get Line i int line Offset content get Offset At Line i line Width i content Width line line Offset caret Width if line Width i max Width max Width line Width i max Width Line Index i  startLine lineCount startLine lineCount caretWidth endLine startLine lineCount startLine endLine lineWidth caretWidth getCaretWidth startLine endLine lineWidth getLine lineOffset getOffsetAtLine lineWidth contentWidth lineOffset caretWidth lineWidth maxWidth maxWidth lineWidth maxWidthLineIndex
Calculates the width of the visible lines in the specified range p param start Line the first changed line param new Line Count the number of inserted lines void calculate Visible int start Line int new Line Count int top Index parent get Top Index int bottom Line Math min get Partial Bottom Index start Line new Line Count start Line Math max start Line top Index calculate start Line bottom Line start Line 1  startLine newLineCount calculateVisible startLine newLineCount topIndex getTopIndex bottomLine getPartialBottomIndex startLine newLineCount startLine startLine topIndex startLine bottomLine startLine
Measures the width of the given line p param line the line to measure param line Offset start offset of the line to measure relative to the start of the document param gc the GC to use for measuring the line param current Font the font currently set in gc Cached for better performance Null when running in a bidi locale return the width of the given line int content Width String line int line Offset Text Layout layout renderer get Text Layout line line Offset Rectangle rect layout get Line Bounds 0 renderer dispose Text Layout layout return rect x rect width left Margin right Margin  lineOffset currentFont contentWidth lineOffset TextLayout getTextLayout lineOffset getLineBounds disposeTextLayout leftMargin rightMargin
Grows the code line Width code array to accomodate new line width information p param num Lines the number of elements to increase the array by void expand Lines int num Lines int size line Width length if size line Count num Lines return int new Lines new int Math max size 2 size num Lines System arraycopy line Width 0 new Lines 0 size line Width new Lines reset size line Width length size false  lineWidth numLines expandLines numLines lineWidth lineCount numLines newLines numLines lineWidth newLines lineWidth newLines lineWidth
Returns the width of the longest measured line p return the width of the longest measured line public int get Width return max Width  getWidth maxWidth
Updates the line width array to reflect inserted or deleted lines p param start the starting line of the change that took place param delta the number of lines in the change 0 indicates lines inserted 0 indicates lines deleted void lines Changed int start Line int delta boolean inserting delta 0 if delta 0 return if inserting shift the lines down to make room for new lines expand Lines delta for int i line Count 1 i start Line i line Width i delta line Width i reset the new lines for int i start Line 1 i start Line delta i line Width length i line Width i 1 have new lines been inserted above the longest line if max Width Line Index start Line max Width Line Index delta else shift up the lines for int i start Line delta i line Count i line Width i delta line Width i has the longest line been removed if max Width Line Index start Line max Width Line Index start Line delta max Width 0 max Width Line Index 1 else if max Width Line Index start Line delta max Width Line Index delta line Count delta  linesChanged startLine expandLines lineCount startLine lineWidth lineWidth startLine startLine lineWidth lineWidth maxWidthLineIndex startLine maxWidthLineIndex startLine lineCount lineWidth lineWidth maxWidthLineIndex startLine maxWidthLineIndex startLine maxWidth maxWidthLineIndex maxWidthLineIndex startLine maxWidthLineIndex lineCount
Resets the line width of the lines in the specified range p param start Line the first line to reset param line Count the number of lines to reset param calculate Max Width true if the widest line is being reset the maximum width of all remaining cached lines is calculated false the maximum width is set to 0 if the widest line is being reset public void redraw Reset int start Line int line Count boolean calculate Max Width reset start Line line Count calculate Max Width  startLine lineCount calculateMaxWidth redrawReset startLine lineCount calculateMaxWidth startLine lineCount calculateMaxWidth
Resets the line width of the lines in the specified range p param start Line the first line to reset param line Count the number of lines to reset param calculate Max Width true if the widest line is being reset the maximum width of all remaining cached lines is calculated false the maximum width is set to 0 if the widest line is being reset public void reset int start Line int line Count boolean calculate Max Width int end Line start Line line Count if start Line 0 end Line line Width length return for int i start Line i end Line i line Width i 1 if the longest line is one of the reset lines the maximum line width is no longer valid if max Width Line Index start Line max Width Line Index end Line max Width 0 max Width Line Index 1 if calculate Max Width for int i 0 i line Count i if line Width i max Width max Width line Width i max Width Line Index i  startLine lineCount calculateMaxWidth startLine lineCount calculateMaxWidth endLine startLine lineCount startLine endLine lineWidth startLine endLine lineWidth maxWidthLineIndex startLine maxWidthLineIndex endLine maxWidth maxWidthLineIndex calculateMaxWidth lineCount lineWidth maxWidth maxWidth lineWidth maxWidthLineIndex
Updates the line width array to reflect a text change Lines affected by the text change will be reset p param start Offset the start offset of the text change param new Line Count the number of inserted lines param replace Line Count the number of deleted lines param new Char Count the number of new characters param replace Char Count the number of deleted characters public void text Changed int start Offset int new Line Count int replace Line Count int new Char Count int replace Char Count int start Line parent get Line At Offset start Offset boolean removed Max Line max Width Line Index start Line max Width Line Index start Line replace Line Count entire text deleted if start Line 0 replace Line Count line Count line Count new Line Count line Width new int line Count reset 0 line Count false max Width 0 else lines Changed start Line replace Line Count lines Changed start Line new Line Count line Width start Line 1 only calculate the visible lines otherwise measurements of changed lines outside the visible area may subsequently change again without the lines ever being visible calculate Visible start Line new Line Count max Width Line Index will be 1 i e unknown line width if the widget has not been visible yet and the changed lines have therefore not been calculated above if removed Max Line max Width Line Index 1 line Width max Width Line Index max Width longest line has been removed or changed and is now shorter need to recalculate maximum content width for all lines max Width 0 for int i 0 i line Count i if line Width i max Width max Width line Width i max Width Line Index i  startOffset newLineCount replaceLineCount newCharCount replaceCharCount textChanged startOffset newLineCount replaceLineCount newCharCount replaceCharCount startLine getLineAtOffset startOffset removedMaxLine maxWidthLineIndex startLine maxWidthLineIndex startLine replaceLineCount startLine replaceLineCount lineCount lineCount newLineCount lineWidth lineCount lineCount maxWidth linesChanged startLine replaceLineCount linesChanged startLine newLineCount lineWidth startLine calculateVisible startLine newLineCount maxWidthLineIndex removedMaxLine maxWidthLineIndex lineWidth maxWidthLineIndex maxWidth maxWidth lineCount lineWidth maxWidth maxWidth lineWidth maxWidthLineIndex
Creates a new code Word Wrap Cache code and calculates an initial line wrapping p param parent the Styled Text widget to wrap content in param content the content provider that does the actual line wrapping public Word Wrap Cache Styled Text parent Wrapped Content content this parent parent visual Content content visual Content wrap Lines  WordWrapCache StyledText WordWrapCache StyledText WrappedContent visualContent visualContent wrapLines
Do nothing Lines are wrapped immediately after reset p param start Line first line to calculate param line Count number of lines to calculate public void calculate int start Line int line Count  startLine lineCount startLine lineCount
Returns the client area width Lines are wrapped so there is no horizontal scroll bar p return the line width public int get Width return parent get Client Area width  getWidth getClientArea
Wraps the lines in the specified range This method is called in code Styled Text redraw code A redraw is therefore not necessary p param start Line the first line to reset param line Count the number of lines to reset param calculate Max Width true implementors should retain a valid width even if it is affected by the reset operation false the width may be set to 0 public void redraw Reset int start Line int line Count boolean calculate Max Width if line Count visual Content get Line Count do a full rewrap if all lines are reset visual Content wrap Lines else visual Content reset start Line line Count  StyledText startLine lineCount calculateMaxWidth redrawReset startLine lineCount calculateMaxWidth lineCount visualContent getLineCount visualContent wrapLines visualContent startLine lineCount
Rewraps the lines in the specified range and redraws the widget if the line wrapping has changed p param start Line the first line to reset param line Count the number of lines to reset param calculate Max Width true implementors should retain a valid width even if it is affected by the reset operation false the width may be set to 0 public void reset int start Line int line Count boolean calculate Max Width int item Count get Partial Bottom Index top Index 1 int old Line Offsets new int item Count for int i 0 i item Count i old Line Offsets i visual Content get Offset At Line i top Index redraw Reset start Line line Count calculate Max Width check for cases which will require a full redraw if get Partial Bottom Index top Index 1 item Count number of visible lines has changed parent internal Redraw else for int i 0 i item Count i if visual Content get Offset At Line i top Index old Line Offsets i wrapping of one of the visible lines has changed parent internal Redraw break  startLine lineCount calculateMaxWidth startLine lineCount calculateMaxWidth itemCount getPartialBottomIndex topIndex oldLineOffsets itemCount itemCount oldLineOffsets visualContent getOffsetAtLine topIndex redrawReset startLine lineCount calculateMaxWidth getPartialBottomIndex topIndex itemCount internalRedraw itemCount visualContent getOffsetAtLine topIndex oldLineOffsets internalRedraw
Passes the text change notification to the line wrap content p param start Offset the start offset of the text change param new Line Count the number of inserted lines param replace Line Count the number of deleted lines param new Char Count the number of new characters param replace Char Count the number of deleted characters public void text Changed int start Offset int new Line Count int replace Line Count int new Char Count int replace Char Count int start Line visual Content get Line At Offset start Offset visual Content text Changed start Offset new Line Count replace Line Count new Char Count replace Char Count if we are wrapping then it is possible for a deletion on the last line of text to shorten the total text length by a line If this occurs then the start Index must be adjusted such that a redraw will be performed if a visible region is affected fixes bug 42947 if word Wrap int line Count content get Line Count if start Line line Count start Line line Count 1 if start Line get Partial Bottom Index only redraw if the text change affects text inside or above the visible lines if it is below the visible lines it will not affect the word wrapping fixes bug 14047 parent internal Redraw  startOffset newLineCount replaceLineCount newCharCount replaceCharCount textChanged startOffset newLineCount replaceLineCount newCharCount replaceCharCount startLine visualContent getLineAtOffset startOffset visualContent textChanged startOffset newLineCount replaceLineCount newCharCount replaceCharCount startIndex wordWrap lineCount getLineCount startLine lineCount startLine lineCount startLine getPartialBottomIndex internalRedraw
Runnable runnable new Runnable public void run int direction Bidi Util get Keyboard Language Bidi Util KEYBOARD BIDI SWT RIGHT SWT LEFT if direction caret Direction return if get Caret default Caret return int line Index get Caret Line String line content get Line line Index int line Offset content get Offset At Line line Index int offset In Line caret Offset line Offset int new CaretX getX At Offset line line Index offset In Line set Caret Location new CaretX get Caret Line direction  BidiUtil getKeyboardLanguage BidiUtil KEYBOARD_BIDI caretDirection getCaret defaultCaret lineIndex getCaretLine getLine lineIndex lineOffset getOffsetAtLine lineIndex offsetInLine caretOffset lineOffset newCaretX getXAtOffset lineIndex offsetInLine setCaretLocation newCaretX getCaretLine
Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT FULL SELECTION see SWT MULTI see SWT READ ONLY see SWT SINGLE see SWT WRAP see get Style public Styled Text Composite parent int style super parent check Style style SWT NO REDRAW RESIZE SWT NO BACKGROUND set the bg fg in the OS to ensure that these are the same as Styled Text necessary for ensuring that the bg fg the IME box uses is the same as what Styled Text uses super set Foreground get Foreground super set Background get Background Display display get Display is Mirrored super get Style SWT MIRRORED 0 is Bidi Bidi Util is Bidi Platform is Mirrored if style SWT READ ONLY 0 set Editable false left Margin right Margin is Bidi BIDI CARET WIDTH 1 0 if style SWT SINGLE 0 style SWT BORDER 0 left Margin top Margin right Margin bottom Margin 2 clipboard new Clipboard display install Default Content initialize Renderer if style SWT WRAP 0 set Word Wrap true else line Cache new Content Width Cache this content default Caret new Caret this SWT NULL if is Bidi create Caret Bitmaps Runnable runnable new Runnable public void run int direction Bidi Util get Keyboard Language Bidi Util KEYBOARD BIDI SWT RIGHT SWT LEFT if direction caret Direction return if get Caret default Caret return int line Index get Caret Line String line content get Line line Index int line Offset content get Offset At Line line Index int offset In Line caret Offset line Offset int new CaretX getX At Offset line line Index offset In Line set Caret Location new CaretX get Caret Line direction Bidi Util add Language Listener handle runnable set Caret default Caret calculate Scroll Bars create Key Bindings ibeam Cursor new Cursor display SWT CURSOR IBEAM set Cursor ibeam Cursor install Listeners install Default Line Styler initialize Accessible  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS FULL_SELECTION READ_ONLY getStyle StyledText checkStyle NO_REDRAW_RESIZE NO_BACKGROUND StyledText StyledText setForeground getForeground setBackground getBackground getDisplay isMirrored getStyle isBidi BidiUtil isBidiPlatform isMirrored READ_ONLY setEditable leftMargin rightMargin isBidi BIDI_CARET_WIDTH leftMargin topMargin rightMargin bottomMargin installDefaultContent initializeRenderer setWordWrap lineCache ContentWidthCache defaultCaret isBidi createCaretBitmaps BidiUtil getKeyboardLanguage BidiUtil KEYBOARD_BIDI caretDirection getCaret defaultCaret lineIndex getCaretLine getLine lineIndex lineOffset getOffsetAtLine lineIndex offsetInLine caretOffset lineOffset newCaretX getXAtOffset lineIndex offsetInLine setCaretLocation newCaretX getCaretLine BidiUtil addLanguageListener setCaret defaultCaret calculateScrollBars createKeyBindings ibeamCursor CURSOR_IBEAM setCursor ibeamCursor installListeners installDefaultLineStyler initializeAccessible
Adds an extended modify listener An Extended Modify event is sent by the widget when the widget text has changed p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void add Extended Modify Listener Extended Modify Listener extended Modify Listener check Widget if extended Modify Listener null SWT error SWT ERROR NULL ARGUMENT Styled Text Listener typed Listener new Styled Text Listener extended Modify Listener add Listener Extended Modify typed Listener  ExtendedModify SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT addExtendedModifyListener ExtendedModifyListener extendedModifyListener checkWidget extendedModifyListener ERROR_NULL_ARGUMENT StyledTextListener typedListener StyledTextListener extendedModifyListener addListener ExtendedModify typedListener
Maps a key to an action One action can be associated with N keys However each key can only have one action key action is N 1 relation p param key a key code defined in SWT java or a character Optionally O Rd with a state mask Preferred state masks are one or more of SWT MOD1 SWT MOD2 SWT MOD3 since these masks account for modifier platform differences However there may be cases where using the specific state masks i e SWT CTRL SWT SHIFT SWT ALT SWT COMMAND makes sense param action one of the predefined actions defined in ST java Use SWT NULL to remove a key binding 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 set Key Binding int key int action check Widget int key Value key SWT KEY MASK int modifier Value key SWT MODIFIER MASK char key Char char key Value if Compatibility is Letter key Char make the keybinding case insensitive by adding it in its upper and lower case form char ch Character to Upper Case key Char int new Key ch modifier Value if action SWT NULL key Action Map remove new Integer new Key else key Action Map put new Integer new Key new Integer action ch Character to Lower Case key Char new Key ch modifier Value if action SWT NULL key Action Map remove new Integer new Key else key Action Map put new Integer new Key new Integer action else if action SWT NULL key Action Map remove new Integer key else key Action Map put new Integer key new Integer action  ORd SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setKeyBinding checkWidget keyValue KEY_MASK modifierValue MODIFIER_MASK keyChar keyValue isLetter keyChar toUpperCase keyChar newKey modifierValue keyActionMap newKey keyActionMap newKey toLowerCase keyChar newKey modifierValue keyActionMap newKey keyActionMap newKey keyActionMap keyActionMap
Adds a bidirectional segment listener A Bidi Segment Event is sent whenever a line of text is measured or rendered The user can specify text ranges in the line that should be treated as if they had a different direction than the surrounding text This may be used when adjacent segments of right to left text should not be reordered relative to each other E g Multiple Java string literals in a right to left language should generally remain in logical order to each other that is the way they are stored p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul see Bidi Segment Event since 2 0 public void add Bidi Segment Listener Bidi Segment Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Styled Text Listener typed Listener new Styled Text Listener listener add Listener Line Get Segments typed Listener  BidiSegmentEvent SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT BidiSegmentEvent addBidiSegmentListener BidiSegmentListener checkWidget ERROR_NULL_ARGUMENT StyledTextListener typedListener StyledTextListener addListener LineGetSegments typedListener
Adds a line background listener A Line Get Background event is sent by the widget to determine the background color for a line p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void add Line Background Listener Line Background Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT if user Line Background false remove Line Background Listener default Line Styler default Line Styler set Line Background 0 logical Content get Line Count null user Line Background true Styled Text Listener typed Listener new Styled Text Listener listener add Listener Line Get Background typed Listener  LineGetBackground SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT addLineBackgroundListener LineBackgroundListener checkWidget ERROR_NULL_ARGUMENT userLineBackground removeLineBackgroundListener defaultLineStyler defaultLineStyler setLineBackground logicalContent getLineCount userLineBackground StyledTextListener typedListener StyledTextListener addListener LineGetBackground typedListener
Adds a line style listener A Line Get Style event is sent by the widget to determine the styles for a line p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void add Line Style Listener Line Style Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT if user Line Style false remove Line Style Listener default Line Styler default Line Styler set Style Range null user Line Style true Styled Text Listener typed Listener new Styled Text Listener listener add Listener Line Get Style typed Listener  LineGetStyle SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT addLineStyleListener LineStyleListener checkWidget ERROR_NULL_ARGUMENT userLineStyle removeLineStyleListener defaultLineStyler defaultLineStyler setStyleRange userLineStyle StyledTextListener typedListener StyledTextListener addListener LineGetStyle typedListener
Adds a modify listener A Modify event is sent by the widget when the widget text has changed p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void add Modify Listener Modify Listener modify Listener check Widget if modify Listener null SWT error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener modify Listener add Listener SWT Modify typed Listener  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT addModifyListener ModifyListener modifyListener checkWidget modifyListener ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener modifyListener addListener typedListener
Adds a selection listener A Selection event is sent by the widget when the selection has changed p When code widget Selected code is called the event x amd y fields contain the start and end caret indices of the selection code widget Default Selected code is not called for Styled Texts p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void add Selection Listener Selection Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener  widgetSelected widgetDefaultSelected StyledTexts SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener
Adds a verify key listener A Verify Key event is sent by the widget when a key is pressed The widget ignores the key press if the listener sets the doit field of the event to false p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void add Verify Key Listener Verify Key Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Styled Text Listener typed Listener new Styled Text Listener listener add Listener Verify Key typed Listener  VerifyKey SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT addVerifyKeyListener VerifyKeyListener checkWidget ERROR_NULL_ARGUMENT StyledTextListener typedListener StyledTextListener addListener VerifyKey typedListener
Adds a verify listener A Verify event is sent by the widget when the widget text is about to change The listener can set the event text and the doit field to change the text that is set in the widget or to force the widget to ignore the text change p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void add Verify Listener Verify Listener verify Listener check Widget if verify Listener null SWT error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener verify Listener add Listener SWT Verify typed Listener  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT addVerifyListener VerifyListener verifyListener checkWidget verifyListener ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener verifyListener addListener typedListener
Appends a string to the text at the end of the widget p param string the string to be appended see replace Text Range int int String 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void append String string check Widget if string null SWT error SWT ERROR NULL ARGUMENT int last Char Math max get Char Count 0 replace Text Range last Char 0 string  replaceTextRange SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT checkWidget ERROR_NULL_ARGUMENT lastChar getCharCount replaceTextRange lastChar
Calculates the width of the widest visible line void calculate Content Width line Cache get Line Cache content line Cache calculate top Index get Partial Bottom Index top Index 1  calculateContentWidth lineCache getLineCache lineCache topIndex getPartialBottomIndex topIndex
Calculates the scroll bars void calculate Scroll Bars Scroll Bar horizontal Bar get Horizontal Bar Scroll Bar vertical Bar get Vertical Bar set Scroll Bars if vertical Bar null vertical Bar set Increment get Vertical Increment if horizontal Bar null horizontal Bar set Increment get Horizontal Increment  calculateScrollBars ScrollBar horizontalBar getHorizontalBar ScrollBar verticalBar getVerticalBar setScrollBars verticalBar verticalBar setIncrement getVerticalIncrement horizontalBar horizontalBar setIncrement getHorizontalIncrement
Calculates the top index based on the current vertical scroll offset The top index is the index of the topmost fully visible line or the topmost partially visible line if no line is fully visible The top index starts at 0 void calculate Top Index int old Top Index top Index int vertical Increment get Vertical Increment int client Area Height get Client Area height if vertical Increment 0 return top Index Compatibility ceil vertical Scroll Offset vertical Increment Set top index to partially visible top line if no line is fully visible but at least some of the widget client area is visible Fixes bug 15088 if top Index 0 if client Area Height 0 int bottom Pixel vertical Scroll Offset client Area Height int full Line Top Pixel top Index vertical Increment int full Line Visible Height bottom Pixel full Line Top Pixel set top index to partially visible line if no line fully fits in client area or if space is available but not used the latter should never happen because we use claim Bottom Free Space if full Line Visible Height vertical Increment top Index else if top Index content get Line Count top Index content get Line Count 1 if top Index old Top Index top Offset content get Offset At Line top Index line Cache calculate top Index get Partial Bottom Index top Index 1 set Horizontal Scroll Bar  calculateTopIndex oldTopIndex topIndex verticalIncrement getVerticalIncrement clientAreaHeight getClientArea verticalIncrement topIndex verticalScrollOffset verticalIncrement topIndex clientAreaHeight bottomPixel verticalScrollOffset clientAreaHeight fullLineTopPixel topIndex verticalIncrement fullLineVisibleHeight bottomPixel fullLineTopPixel claimBottomFreeSpace fullLineVisibleHeight verticalIncrement topIndex topIndex getLineCount topIndex getLineCount topIndex oldTopIndex topOffset getOffsetAtLine topIndex lineCache topIndex getPartialBottomIndex topIndex setHorizontalScrollBar
Hides the scroll bars if widget is created in single line mode static int check Style int style if style SWT SINGLE 0 style SWT H SCROLL SWT V SCROLL SWT WRAP else style SWT MULTI return style  checkStyle H_SCROLL V_SCROLL
Scrolls down the text to use new space made available by a resize or by deleted lines void claim Bottom Free Space int new Vertical Offset Math max 0 content get Line Count line Height get Client Area height if new Vertical Offset vertical Scroll Offset Scroll up so that empty lines below last text line are used Fixes 1GEYJM0 set Vertical Scroll Offset new Vertical Offset true  claimBottomFreeSpace newVerticalOffset getLineCount lineHeight getClientArea newVerticalOffset verticalScrollOffset setVerticalScrollOffset newVerticalOffset
Scrolls text to the right to use new space made available by a resize void claim Right Free Space int new Horizontal Offset Math max 0 line Cache get Width get Client Area width left Margin right Margin if new Horizontal Offset horizontal Scroll Offset item is no longer drawn past the right border of the client area align the right end of the item with the right border of the client area window is scrolled right scroll Horizontal Bar new Horizontal Offset horizontal Scroll Offset  claimRightFreeSpace newHorizontalOffset lineCache getWidth getClientArea leftMargin rightMargin newHorizontalOffset horizontalScrollOffset scrollHorizontalBar newHorizontalOffset horizontalScrollOffset
Clears the widget margin param gc GC to render on param background background color to use for clearing the margin param client Area widget client area dimensions void clear Margin GC gc Color background Rectangle client Area int y clear the margin background gc set Background background if top Margin 0 gc fill Rectangle 0 y client Area width top Margin if bottom Margin 0 gc fill Rectangle 0 client Area height bottom Margin y client Area width bottom Margin if left Margin 0 gc fill Rectangle 0 y left Margin client Area height if right Margin 0 gc fill Rectangle client Area width right Margin y right Margin client Area height  clientArea clearMargin clientArea setBackground topMargin fillRectangle clientArea topMargin bottomMargin fillRectangle clientArea bottomMargin clientArea bottomMargin leftMargin fillRectangle leftMargin clientArea rightMargin fillRectangle clientArea rightMargin rightMargin clientArea
Removes the widget selection p param send Event a Selection event is sent when set to true and when the selection is actually reset void clear Selection boolean send Event int selection Start selection x int selection End selection y int length content get Char Count reset Selection redraw old selection if any if selection End selection Start 0 called internally to remove selection after text is removed therefore make sure redraw range is valid int redraw Start Math min selection Start length int redraw End Math min selection End length if redraw End redraw Start 0 internal Redraw Range redraw Start redraw End redraw Start true if send Event true send Selection Event  sendEvent clearSelection sendEvent selectionStart selectionEnd getCharCount resetSelection selectionEnd selectionStart redrawStart selectionStart redrawEnd selectionEnd redrawEnd redrawStart internalRedrawRange redrawStart redrawEnd redrawStart sendEvent sendSelectionEvent
Computes the preferred size 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 Point compute Size int w Hint int h Hint boolean changed check Widget int count width height boolean single Line get Style SWT SINGLE 0 if single Line count 1 else count content get Line Count if w Hint SWT DEFAULT width w Hint else width DEFAULT WIDTH if w Hint SWT DEFAULT Line Cache compute Line Cache line Cache if word Wrap set non wrapping content width calculator Ensures ideal line width that does not required wrapping Fixes bug 31195 compute Line Cache new Content Width Cache this logical Content if single Line false count logical Content get Line Count Only calculate what can actually be displayed Do this because measuring each text line is a time consuming process int visible Count Math min count get Display get Bounds height line Height compute Line Cache calculate 0 visible Count width compute Line Cache get Width left Margin right Margin else if word Wrap single Line false calculate to wrap to width hint Fixes bug 20377 don t wrap live content Fixes bug 38344 Wrapped Content wrapped Content new Wrapped Content renderer logical Content wrapped Content wrap Lines width count wrapped Content get Line Count if h Hint SWT DEFAULT height h Hint else height count line Height top Margin bottom Margin Use default values if no text is defined if width 0 width DEFAULT WIDTH if height 0 if single Line height line Height else height DEFAULT HEIGHT Rectangle rect compute Trim 0 0 width height return new Point rect width rect height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS computeSize wHint hHint checkWidget singleLine getStyle singleLine getLineCount wHint wHint DEFAULT_WIDTH wHint LineCache computeLineCache lineCache wordWrap computeLineCache ContentWidthCache logicalContent singleLine logicalContent getLineCount visibleCount getDisplay getBounds lineHeight computeLineCache visibleCount computeLineCache getWidth leftMargin rightMargin wordWrap singleLine WrappedContent wrappedContent WrappedContent logicalContent wrappedContent wrapLines wrappedContent getLineCount hHint hHint lineHeight topMargin bottomMargin DEFAULT_WIDTH singleLine lineHeight DEFAULT_HEIGHT computeTrim
Copies 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 copy check Widget int length selection y selection x if length 0 try set Clipboard Content selection x length 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 Rethrow all other errors Fixes bug 17578 if error code DND ERROR CANNOT SET CLIPBOARD throw error  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget setClipboardContent SWTError ERROR_CANNOT_SET_CLIPBOARD
Returns a string that uses only the line delimiter specified by the Styled Text Content implementation Returns only the first line if the widget has the SWT SINGLE style p param text the text that may have line delimiters that don t match the model line delimiter Possible line delimiters are CR r LF n CR LF r n return the converted text that only uses the line delimiter specified by the model Returns only the first line if the widget has the SWT SINGLE style String get Model Delimited Text String text String Buffer converted Text String delimiter get Line Delimiter int length text length int cr Index 0 int lf Index 0 int i 0 if length 0 return text converted Text new String Buffer length while i length if cr Index 1 cr Index text index Of SWT CR i if lf Index 1 lf Index text index Of SWT LF i if lf Index 1 cr Index 1 no more line breaks break else CR occurs before LF or no LF present if cr Index lf Index cr Index 1 lf Index 1 converted Text append text substring i cr Index if lf Index cr Index 1 CR LF combination i lf Index 1 else i cr Index 1 else LF occurs before CR converted Text append text substring i lf Index i lf Index 1 if is Single Line break converted Text append delimiter copy remaining text if any and if not in single line mode or no text copied thus far because there only is one line if i length is Single Line false converted Text length 0 converted Text append text substring i return converted Text to String  StyledTextContent getModelDelimitedText StringBuffer convertedText getLineDelimiter crIndex lfIndex convertedText StringBuffer crIndex crIndex indexOf lfIndex lfIndex indexOf lfIndex crIndex crIndex lfIndex crIndex lfIndex convertedText crIndex lfIndex crIndex lfIndex crIndex convertedText lfIndex lfIndex isSingleLine convertedText isSingleLine convertedText convertedText convertedText toString
Creates default key bindings void create Key Bindings Navigation set Key Binding SWT ARROW UP ST LINE UP set Key Binding SWT ARROW DOWN ST LINE DOWN set Key Binding SWT HOME ST LINE START set Key Binding SWT END ST LINE END set Key Binding SWT PAGE UP ST PAGE UP set Key Binding SWT PAGE DOWN ST PAGE DOWN set Key Binding SWT HOME SWT MOD1 ST TEXT START set Key Binding SWT END SWT MOD1 ST TEXT END set Key Binding SWT PAGE UP SWT MOD1 ST WINDOW START set Key Binding SWT PAGE DOWN SWT MOD1 ST WINDOW END if is Mirrored set Key Binding SWT ARROW LEFT ST COLUMN NEXT set Key Binding SWT ARROW RIGHT ST COLUMN PREVIOUS set Key Binding SWT ARROW LEFT SWT MOD1 ST WORD NEXT set Key Binding SWT ARROW RIGHT SWT MOD1 ST WORD PREVIOUS else set Key Binding SWT ARROW LEFT ST COLUMN PREVIOUS set Key Binding SWT ARROW RIGHT ST COLUMN NEXT set Key Binding SWT ARROW LEFT SWT MOD1 ST WORD PREVIOUS set Key Binding SWT ARROW RIGHT SWT MOD1 ST WORD NEXT Selection set Key Binding SWT ARROW UP SWT MOD2 ST SELECT LINE UP set Key Binding SWT ARROW DOWN SWT MOD2 ST SELECT LINE DOWN set Key Binding SWT HOME SWT MOD2 ST SELECT LINE START set Key Binding SWT END SWT MOD2 ST SELECT LINE END set Key Binding SWT PAGE UP SWT MOD2 ST SELECT PAGE UP set Key Binding SWT PAGE DOWN SWT MOD2 ST SELECT PAGE DOWN set Key Binding SWT HOME SWT MOD1 SWT MOD2 ST SELECT TEXT START set Key Binding SWT END SWT MOD1 SWT MOD2 ST SELECT TEXT END set Key Binding SWT PAGE UP SWT MOD1 SWT MOD2 ST SELECT WINDOW START set Key Binding SWT PAGE DOWN SWT MOD1 SWT MOD2 ST SELECT WINDOW END if is Mirrored set Key Binding SWT ARROW LEFT SWT MOD2 ST SELECT COLUMN NEXT set Key Binding SWT ARROW RIGHT SWT MOD2 ST SELECT COLUMN PREVIOUS set Key Binding SWT ARROW LEFT SWT MOD1 SWT MOD2 ST SELECT WORD NEXT set Key Binding SWT ARROW RIGHT SWT MOD1 SWT MOD2 ST SELECT WORD PREVIOUS else set Key Binding SWT ARROW LEFT SWT MOD2 ST SELECT COLUMN PREVIOUS set Key Binding SWT ARROW RIGHT SWT MOD2 ST SELECT COLUMN NEXT set Key Binding SWT ARROW LEFT SWT MOD1 SWT MOD2 ST SELECT WORD PREVIOUS set Key Binding SWT ARROW RIGHT SWT MOD1 SWT MOD2 ST SELECT WORD NEXT Modification Cut Copy Paste set Key Binding X SWT MOD1 ST CUT set Key Binding C SWT MOD1 ST COPY set Key Binding V SWT MOD1 ST PASTE Cut Copy Paste Wordstar style set Key Binding SWT DEL SWT MOD2 ST CUT set Key Binding SWT INSERT SWT MOD1 ST COPY set Key Binding SWT INSERT SWT MOD2 ST PASTE set Key Binding SWT BS SWT MOD2 ST DELETE PREVIOUS set Key Binding SWT BS ST DELETE PREVIOUS set Key Binding SWT DEL ST DELETE NEXT set Key Binding SWT BS SWT MOD1 ST DELETE WORD PREVIOUS set Key Binding SWT DEL SWT MOD1 ST DELETE WORD NEXT Miscellaneous set Key Binding SWT INSERT ST TOGGLE OVERWRITE  createKeyBindings setKeyBinding ARROW_UP LINE_UP setKeyBinding ARROW_DOWN LINE_DOWN setKeyBinding LINE_START setKeyBinding LINE_END setKeyBinding PAGE_UP PAGE_UP setKeyBinding PAGE_DOWN PAGE_DOWN setKeyBinding TEXT_START setKeyBinding TEXT_END setKeyBinding PAGE_UP WINDOW_START setKeyBinding PAGE_DOWN WINDOW_END isMirrored setKeyBinding ARROW_LEFT COLUMN_NEXT setKeyBinding ARROW_RIGHT COLUMN_PREVIOUS setKeyBinding ARROW_LEFT WORD_NEXT setKeyBinding ARROW_RIGHT WORD_PREVIOUS setKeyBinding ARROW_LEFT COLUMN_PREVIOUS setKeyBinding ARROW_RIGHT COLUMN_NEXT setKeyBinding ARROW_LEFT WORD_PREVIOUS setKeyBinding ARROW_RIGHT WORD_NEXT setKeyBinding ARROW_UP SELECT_LINE_UP setKeyBinding ARROW_DOWN SELECT_LINE_DOWN setKeyBinding SELECT_LINE_START setKeyBinding SELECT_LINE_END setKeyBinding PAGE_UP SELECT_PAGE_UP setKeyBinding PAGE_DOWN SELECT_PAGE_DOWN setKeyBinding SELECT_TEXT_START setKeyBinding SELECT_TEXT_END setKeyBinding PAGE_UP SELECT_WINDOW_START setKeyBinding PAGE_DOWN SELECT_WINDOW_END isMirrored setKeyBinding ARROW_LEFT SELECT_COLUMN_NEXT setKeyBinding ARROW_RIGHT SELECT_COLUMN_PREVIOUS setKeyBinding ARROW_LEFT SELECT_WORD_NEXT setKeyBinding ARROW_RIGHT SELECT_WORD_PREVIOUS setKeyBinding ARROW_LEFT SELECT_COLUMN_PREVIOUS setKeyBinding ARROW_RIGHT SELECT_COLUMN_NEXT setKeyBinding ARROW_LEFT SELECT_WORD_PREVIOUS setKeyBinding ARROW_RIGHT SELECT_WORD_NEXT setKeyBinding setKeyBinding setKeyBinding setKeyBinding setKeyBinding setKeyBinding setKeyBinding DELETE_PREVIOUS setKeyBinding DELETE_PREVIOUS setKeyBinding DELETE_NEXT setKeyBinding DELETE_WORD_PREVIOUS setKeyBinding DELETE_WORD_NEXT setKeyBinding TOGGLE_OVERWRITE
Create the bitmaps to use for the caret in bidi mode This method only needs to be called upon widget creation and when the font changes the caret bitmap height needs to match font height void create Caret Bitmaps int caret Width BIDI CARET WIDTH Display display get Display if left Caret Bitmap null if default Caret null left Caret Bitmap equals default Caret get Image default Caret set Image null left Caret Bitmap dispose left Caret Bitmap new Image display caret Width line Height GC gc new GC left Caret Bitmap gc set Background display get System Color SWT COLOR BLACK gc fill Rectangle 0 0 caret Width line Height gc set Foreground display get System Color SWT COLOR WHITE gc draw Line 0 0 0 line Height gc draw Line 0 0 caret Width 1 0 gc draw Line 0 1 1 1 gc dispose if right Caret Bitmap null if default Caret null right Caret Bitmap equals default Caret get Image default Caret set Image null right Caret Bitmap dispose right Caret Bitmap new Image display caret Width line Height gc new GC right Caret Bitmap gc set Background display get System Color SWT COLOR BLACK gc fill Rectangle 0 0 caret Width line Height gc set Foreground display get System Color SWT COLOR WHITE gc draw Line caret Width 1 0 caret Width 1 line Height gc draw Line 0 0 caret Width 1 0 gc draw Line caret Width 1 1 1 1 gc dispose  createCaretBitmaps caretWidth BIDI_CARET_WIDTH getDisplay leftCaretBitmap defaultCaret leftCaretBitmap defaultCaret getImage defaultCaret setImage leftCaretBitmap leftCaretBitmap caretWidth lineHeight leftCaretBitmap setBackground getSystemColor COLOR_BLACK fillRectangle caretWidth lineHeight setForeground getSystemColor COLOR_WHITE drawLine lineHeight drawLine caretWidth drawLine rightCaretBitmap defaultCaret rightCaretBitmap defaultCaret getImage defaultCaret setImage rightCaretBitmap rightCaretBitmap caretWidth lineHeight rightCaretBitmap setBackground getSystemColor COLOR_BLACK fillRectangle caretWidth lineHeight setForeground getSystemColor COLOR_WHITE drawLine caretWidth caretWidth lineHeight drawLine caretWidth drawLine caretWidth
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 check Widget int length selection y selection x if length 0 try set Clipboard Content selection x length 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 Rethrow all other errors Fixes bug 17578 if error code DND ERROR CANNOT SET CLIPBOARD throw error Abort cut operation if copy to clipboard fails Fixes bug 21030 return do Delete  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget setClipboardContent SWTError ERROR_CANNOT_SET_CLIPBOARD doDelete
A mouse move event has occurred See if we should start autoscrolling If the move position is outside of the client area initiate autoscrolling Otherwise we ve moved back into the widget so end autoscrolling void do Auto Scroll Event event Rectangle area get Client Area if event y area height do Auto Scroll SWT DOWN else if event y 0 do Auto Scroll SWT UP else if event x left Margin word Wrap false do Auto Scroll ST COLUMN PREVIOUS else if event x area width left Margin right Margin word Wrap false do Auto Scroll ST COLUMN NEXT else end Auto Scroll  doAutoScroll getClientArea doAutoScroll doAutoScroll leftMargin wordWrap doAutoScroll COLUMN_PREVIOUS leftMargin rightMargin wordWrap doAutoScroll COLUMN_NEXT endAutoScroll
timer new Runnable public void run if auto Scroll Direction SWT UP do Selection Line Up display timer Exec TIMER INTERVAL this  autoScrollDirection doSelectionLineUp timerExec TIMER_INTERVAL
timer new Runnable public void run if auto Scroll Direction SWT DOWN do Selection Line Down display timer Exec TIMER INTERVAL this  autoScrollDirection doSelectionLineDown timerExec TIMER_INTERVAL
timer new Runnable public void run if auto Scroll Direction ST COLUMN NEXT do Visual Next set Mouse Word Selection Anchor do Mouse Selection display timer Exec TIMER INTERVAL this  autoScrollDirection COLUMN_NEXT doVisualNext setMouseWordSelectionAnchor doMouseSelection timerExec TIMER_INTERVAL
timer new Runnable public void run if auto Scroll Direction ST COLUMN PREVIOUS do Visual Previous set Mouse Word Selection Anchor do Mouse Selection display timer Exec TIMER INTERVAL this  autoScrollDirection COLUMN_PREVIOUS doVisualPrevious setMouseWordSelectionAnchor doMouseSelection timerExec TIMER_INTERVAL
Initiates autoscrolling p param direction SWT UP SWT DOWN SWT COLUMN NEXT SWT COLUMN PREVIOUS void do Auto Scroll int direction Runnable timer null final int TIMER INTERVAL 5 If we re already autoscrolling in the given direction do nothing if auto Scroll Direction direction return final Display display get Display Set a timer that will simulate the user pressing and holding down a cursor key i e arrow Up arrow Down if direction SWT UP timer new Runnable public void run if auto Scroll Direction SWT UP do Selection Line Up display timer Exec TIMER INTERVAL this else if direction SWT DOWN timer new Runnable public void run if auto Scroll Direction SWT DOWN do Selection Line Down display timer Exec TIMER INTERVAL this else if direction ST COLUMN NEXT timer new Runnable public void run if auto Scroll Direction ST COLUMN NEXT do Visual Next set Mouse Word Selection Anchor do Mouse Selection display timer Exec TIMER INTERVAL this else if direction ST COLUMN PREVIOUS timer new Runnable public void run if auto Scroll Direction ST COLUMN PREVIOUS do Visual Previous set Mouse Word Selection Anchor do Mouse Selection display timer Exec TIMER INTERVAL this if timer null auto Scroll Direction direction display timer Exec TIMER INTERVAL timer  COLUMN_NEXT COLUMN_PREVIOUS doAutoScroll TIMER_INTERVAL autoScrollDirection getDisplay arrowUp arrowDown autoScrollDirection doSelectionLineUp timerExec TIMER_INTERVAL autoScrollDirection doSelectionLineDown timerExec TIMER_INTERVAL COLUMN_NEXT autoScrollDirection COLUMN_NEXT doVisualNext setMouseWordSelectionAnchor doMouseSelection timerExec TIMER_INTERVAL COLUMN_PREVIOUS autoScrollDirection COLUMN_PREVIOUS doVisualPrevious setMouseWordSelectionAnchor doMouseSelection timerExec TIMER_INTERVAL autoScrollDirection timerExec TIMER_INTERVAL
Deletes the previous character Delete the selected text if any Move the caret in front of the deleted text void do Backspace Event event new Event event text if selection x selection y event start selection x event end selection y send Key Event event else if caret Offset 0 int line content get Line At Offset caret Offset int line Offset content get Offset At Line line if caret Offset line Offset line Offset content get Offset At Line line 1 event start line Offset content get Line line 1 length event end caret Offset else String line Text content get Line line Text Layout layout renderer get Text Layout line Text line Offset int start layout get Previous Offset caret Offset line Offset SWT MOVEMENT CHAR renderer dispose Text Layout layout event start start line Offset event end caret Offset send Key Event event  doBackspace sendKeyEvent caretOffset getLineAtOffset caretOffset lineOffset getOffsetAtLine caretOffset lineOffset lineOffset getOffsetAtLine lineOffset getLine caretOffset lineText getLine TextLayout getTextLayout lineText lineOffset getPreviousOffset caretOffset lineOffset MOVEMENT_CHAR disposeTextLayout lineOffset caretOffset sendKeyEvent
Replaces the selection with the character or insert the character at the current caret position if no selection exists If a carriage return was typed replace it with the line break character used by the widget on this platform p param key the character typed by the user void do Content char key Event event if text Limit 0 content get Char Count selection y selection x text Limit return event new Event event start selection x event end selection y replace a CR line break with the widget line break CR does not make sense on Windows since most all applications don t recognize CR as a line break if key SWT CR key SWT LF if is Single Line false event text get Line Delimiter no selection and overwrite mode is on and the typed key is not a tab character tabs are always inserted without overwriting else if selection x selection y overwrite true key TAB int line Index content get Line At Offset event end int line Offset content get Offset At Line line Index String line content get Line line Index replace character at caret offset if the caret is not at the end of the line if event end line Offset line length event end event text new String new char key else event text new String new char key if event text null send Key Event event  doContent textLimit getCharCount textLimit isSingleLine getLineDelimiter lineIndex getLineAtOffset lineOffset getOffsetAtLine lineIndex getLine lineIndex lineOffset sendKeyEvent
Moves the caret after the last character of the widget content void do Content End place caret at end of first line if receiver is in single line mode fixes 4820 if is Single Line do Line End else int length content get Char Count if caret Offset length caret Offset length show Caret  doContentEnd isSingleLine doLineEnd getCharCount caretOffset caretOffset showCaret
Moves the caret in front of the first character of the widget content void do Content Start if caret Offset 0 caret Offset 0 show Caret  doContentStart caretOffset caretOffset showCaret
Moves the caret to the start of the selection if a selection exists Otherwise if no selection exists move the cursor according to the cursor selection rules p see do Selection Cursor Previous void do Cursor Previous advancing false if selection y selection x 0 int caret Line caret Offset selection x caret Line get Caret Line show Caret caret Line else do Selection Cursor Previous  doSelectionCursorPrevious doCursorPrevious caretLine caretOffset caretLine getCaretLine showCaret caretLine doSelectionCursorPrevious
Moves the caret to the end of the selection if a selection exists Otherwise if no selection exists move the cursor according to the cursor selection rules p see do Selection Cursor Next void do Cursor Next advancing true if selection y selection x 0 int caret Line caret Offset selection y caret Line get Caret Line show Caret caret Line else do Selection Cursor Next  doSelectionCursorNext doCursorNext caretLine caretOffset caretLine getCaretLine showCaret caretLine doSelectionCursorNext
Deletes the next character Delete the selected text if any void do Delete Event event new Event event text if selection x selection y event start selection x event end selection y send Key Event event else if caret Offset content get Char Count int line content get Line At Offset caret Offset int line Offset content get Offset At Line line int line Length content get Line line length if caret Offset line Offset line Length event start caret Offset event end content get Offset At Line line 1 else event start caret Offset event end get Cluster Next caret Offset line send Key Event event  doDelete sendKeyEvent caretOffset getCharCount getLineAtOffset caretOffset lineOffset getOffsetAtLine lineLength getLine caretOffset lineOffset lineLength caretOffset getOffsetAtLine caretOffset getClusterNext caretOffset sendKeyEvent
Deletes the next word void do Delete Word Next if selection x selection y if a selection exists treat the as if only the delete key was pressed do Delete else Event event new Event event text event start caret Offset event end get Word End caret Offset send Key Event event  doDeleteWordNext doDelete caretOffset getWordEnd caretOffset sendKeyEvent
Deletes the previous word void do Delete Word Previous if selection x selection y if a selection exists treat as if only the backspace key was pressed do Backspace else Event event new Event event text event start get Word Start caret Offset event end caret Offset send Key Event event  doDeleteWordPrevious doBackspace getWordStart caretOffset caretOffset sendKeyEvent
Moves the caret one line down and to the same character offset relative to the beginning of the line Move the caret to the end of the new line if the new line is shorter than the character offset return index of the new line relative to the first line in the document int do Line Down if is Single Line return 0 allow line down action only if receiver is not in single line mode fixes 4820 int caret Line get Caret Line if caret Line content get Line Count 1 caret Line caret Offset get Offset At Mouse Location columnX caret Line return caret Line  doLineDown isSingleLine caretLine getCaretLine caretLine getLineCount caretLine caretOffset getOffsetAtMouseLocation caretLine caretLine
Moves the caret to the end of the line void do Line End int caret Line get Caret Line int line Offset content get Offset At Line caret Line int line Length content get Line caret Line length int line End Offset line Offset line Length if caret Offset line End Offset caret Offset line End Offset show Caret  doLineEnd caretLine getCaretLine lineOffset getOffsetAtLine caretLine lineLength getLine caretLine lineEndOffset lineOffset lineLength caretOffset lineEndOffset caretOffset lineEndOffset showCaret
Moves the caret to the beginning of the line void do Line Start int caret Line get Caret Line int line Offset content get Offset At Line caret Line if caret Offset line Offset caret Offset line Offset show Caret caret Line  doLineStart caretLine getCaretLine lineOffset getOffsetAtLine caretLine caretOffset lineOffset caretOffset lineOffset showCaret caretLine
Moves the caret one line up and to the same character offset relative to the beginning of the line Move the caret to the end of the new line if the new line is shorter than the character offset return index of the new line relative to the first line in the document int do Line Up int caret Line get Caret Line if caret Line 0 caret Line caret Offset get Offset At Mouse Location columnX caret Line return caret Line  doLineUp caretLine getCaretLine caretLine caretLine caretOffset getOffsetAtMouseLocation caretLine caretLine
Moves the caret to the specified location p param x x location of the new caret position param y y location of the new caret position param select the location change is a selection operation include the line delimiter in the selection void do Mouse Location Change int x int y boolean select int line y vertical Scroll Offset line Height int line Count content get Line Count int new Caret Offset int new Caret Line boolean old Advancing advancing update Caret Direction true if line line Count 1 line line Count 1 allow caret to be placed below first line only if receiver is not in single line mode fixes 4820 if line 0 is Single Line line 0 return new Caret Offset get Offset At Mouse Location x line if mouse Double Click double click word select the previous next word fixes bug 15610 new Caret Offset do Mouse Word Select x new Caret Offset line new Caret Line content get Line At Offset new Caret Offset Is the mouse within the left client area border or on a different line If not the autoscroll selection could be incorrectly reset Fixes 1GKM3XS if y 0 y get Client Area height x 0 x get Client Area width new Caret Line content get Line At Offset caret Offset if new Caret Offset caret Offset advancing old Advancing caret Offset new Caret Offset if select do Mouse Selection show Caret if select false caret Offset new Caret Offset clear Selection true  doMouseLocationChange verticalScrollOffset lineHeight lineCount getLineCount newCaretOffset newCaretLine oldAdvancing updateCaretDirection lineCount lineCount isSingleLine newCaretOffset getOffsetAtMouseLocation mouseDoubleClick newCaretOffset doMouseWordSelect newCaretOffset newCaretLine getLineAtOffset newCaretOffset getClientArea getClientArea newCaretLine getLineAtOffset caretOffset newCaretOffset caretOffset oldAdvancing caretOffset newCaretOffset doMouseSelection showCaret caretOffset newCaretOffset clearSelection
Updates the selection based on the caret position void do Mouse Selection if caret Offset selection x caret Offset selection x caret Offset selection y selection Anchor selection x do Selection ST COLUMN PREVIOUS else do Selection ST COLUMN NEXT  doMouseSelection caretOffset caretOffset caretOffset selectionAnchor doSelection COLUMN_PREVIOUS doSelection COLUMN_NEXT
Returns the offset of the word at the specified offset If the current selection extends from high index to low index i e right to left or caret is at left border of selecton on non bidi platforms the start offset of the word preceeding the selection is returned If the current selection extends from low index to high index the end offset of the word following the selection is returned param x mouse x location param new Caret Offset caret offset of the mouse cursor location param line line index of the mouse cursor location int do Mouse Word Select int x int new Caret Offset int line int word Offset flip selection anchor based on word selection direction from base double click Always do this here and don t rely on do Auto Scroll because auto scroll only does not cover all possible mouse selections e g mouse x 0 mouse y caret line y if new Caret Offset selection Anchor selection Anchor selection x selection Anchor double Click Selection y else if new Caret Offset selection Anchor selection Anchor selection y selection Anchor double Click Selection x if x 0 x get Client Area width find the previous next word if caret Offset selection x word Offset get Word Start new Caret Offset else word Offset get Word End No Spaces new Caret Offset mouse word select only on same line mouse cursor is on if content get Line At Offset word Offset line new Caret Offset word Offset return new Caret Offset  newCaretOffset doMouseWordSelect newCaretOffset wordOffset doAutoScroll newCaretOffset selectionAnchor selectionAnchor selectionAnchor doubleClickSelection newCaretOffset selectionAnchor selectionAnchor selectionAnchor doubleClickSelection getClientArea caretOffset wordOffset getWordStart newCaretOffset wordOffset getWordEndNoSpaces newCaretOffset getLineAtOffset wordOffset newCaretOffset wordOffset newCaretOffset
Scrolls one page down so that the last line truncated or whole of the current page becomes the fully visible top line The caret is scrolled the same number of lines so that its location relative to the top line remains the same The exception is the end of the text where a full page scroll is not possible In this case the caret is moved after the last character p param select whether or not to select the page void do Page Down boolean select int line Count content get Line Count int old ColumnX columnX int oldH Scroll Offset horizontal Scroll Offset int caret Line do nothing if in single line mode fixes 5673 if is Single Line return caret Line get Caret Line if caret Line line Count 1 int vertical Maximum line Count get Vertical Increment int page Size get Client Area height int scroll Lines Math min line Count caret Line 1 get Line Count Whole int scroll Offset ensure that scroll Lines never gets negative and at leat one line is scrolled fixes bug 5602 scroll Lines Math max 1 scroll Lines caret Line scroll Lines caret Offset get Offset At Mouse Location columnX caret Line if select do Selection ST COLUMN NEXT scroll one page down or to the bottom scroll Offset vertical Scroll Offset scroll Lines get Vertical Increment if scroll Offset page Size vertical Maximum scroll Offset vertical Maximum page Size if scroll Offset vertical Scroll Offset set Vertical Scroll Offset scroll Offset true explicitly go to the calculated caret line may be different from content get Line At Offset caret Offset when in word wrap mode show Caret caret Line restore the original horizontal caret position int h Scroll Change oldH Scroll Offset horizontal Scroll Offset columnX old ColumnX h Scroll Change  doPageDown lineCount getLineCount oldColumnX oldHScrollOffset horizontalScrollOffset caretLine isSingleLine caretLine getCaretLine caretLine lineCount verticalMaximum lineCount getVerticalIncrement pageSize getClientArea scrollLines lineCount caretLine getLineCountWhole scrollOffset scrollLines scrollLines scrollLines caretLine scrollLines caretOffset getOffsetAtMouseLocation caretLine doSelection COLUMN_NEXT scrollOffset verticalScrollOffset scrollLines getVerticalIncrement scrollOffset pageSize verticalMaximum scrollOffset verticalMaximum pageSize scrollOffset verticalScrollOffset setVerticalScrollOffset scrollOffset getLineAtOffset caretOffset showCaret caretLine hScrollChange oldHScrollOffset horizontalScrollOffset oldColumnX hScrollChange
Moves the cursor to the end of the last fully visible line void do Page End go to end of line if in single line mode fixes 5673 if is Single Line do Line End else int line get Bottom Index int bottom Caret Offset content get Offset At Line line content get Line line length if caret Offset bottom Caret Offset caret Offset bottom Caret Offset show Caret  doPageEnd isSingleLine doLineEnd getBottomIndex bottomCaretOffset getOffsetAtLine getLine caretOffset bottomCaretOffset caretOffset bottomCaretOffset showCaret
Moves the cursor to the beginning of the first fully visible line void do Page Start int top Caret Offset content get Offset At Line top Index if caret Offset top Caret Offset caret Offset top Caret Offset explicitly go to the calculated caret line may be different from content get Line At Offset caret Offset when in word wrap mode show Caret top Index  doPageStart topCaretOffset getOffsetAtLine topIndex caretOffset topCaretOffset caretOffset topCaretOffset getLineAtOffset caretOffset showCaret topIndex
Scrolls one page up so that the first line truncated or whole of the current page becomes the fully visible last line The caret is scrolled the same number of lines so that its location relative to the top line remains the same The exception is the beginning of the text where a full page scroll is not possible In this case the caret is moved in front of the first character void do Page Up int old ColumnX columnX int oldH Scroll Offset horizontal Scroll Offset int caret Line get Caret Line if caret Line 0 int scroll Lines Math max 1 Math min caret Line get Line Count Whole int scroll Offset caret Line scroll Lines caret Offset get Offset At Mouse Location columnX caret Line scroll one page up or to the top scroll Offset Math max 0 vertical Scroll Offset scroll Lines get Vertical Increment if scroll Offset vertical Scroll Offset set Vertical Scroll Offset scroll Offset true explicitly go to the calculated caret line may be different from content get Line At Offset caret Offset when in word wrap mode show Caret caret Line restore the original horizontal caret position int h Scroll Change oldH Scroll Offset horizontal Scroll Offset columnX old ColumnX h Scroll Change  doPageUp oldColumnX oldHScrollOffset horizontalScrollOffset caretLine getCaretLine caretLine scrollLines caretLine getLineCountWhole scrollOffset caretLine scrollLines caretOffset getOffsetAtMouseLocation caretLine scrollOffset verticalScrollOffset scrollLines getVerticalIncrement scrollOffset verticalScrollOffset setVerticalScrollOffset scrollOffset getLineAtOffset caretOffset showCaret caretLine hScrollChange oldHScrollOffset horizontalScrollOffset oldColumnX hScrollChange
Updates the selection to extend to the current caret position void do Selection int direction int redraw Start 1 int redraw End 1 if selection Anchor 1 selection Anchor selection x if direction ST COLUMN PREVIOUS if caret Offset selection x grow selection redraw End selection x redraw Start selection x caret Offset check if selection has reversed direction if selection y selection Anchor redraw End selection y selection y selection Anchor else test whether selection actually changed Fixes 1G71EO1 if selection Anchor selection x caret Offset selection y caret moved towards selection anchor left side of selection shrink selection redraw End selection y redraw Start selection y caret Offset else if caret Offset selection y grow selection redraw Start selection y redraw End selection y caret Offset check if selection has reversed direction if selection x selection Anchor redraw Start selection x selection x selection Anchor else test whether selection actually changed Fixes 1G71EO1 if selection Anchor selection y caret Offset selection x caret moved towards selection anchor right side of selection shrink selection redraw Start selection x redraw End selection x caret Offset if redraw Start 1 redraw End 1 internal Redraw Range redraw Start redraw End redraw Start true send Selection Event  doSelection redrawStart redrawEnd selectionAnchor selectionAnchor COLUMN_PREVIOUS caretOffset redrawEnd redrawStart caretOffset selectionAnchor redrawEnd selectionAnchor selectionAnchor caretOffset redrawEnd redrawStart caretOffset caretOffset redrawStart redrawEnd caretOffset selectionAnchor redrawStart selectionAnchor selectionAnchor caretOffset redrawStart redrawEnd caretOffset redrawStart redrawEnd internalRedrawRange redrawStart redrawEnd redrawStart sendSelectionEvent
Moves the caret to the next character or to the beginning of the next line if the cursor is at the end of a line void do Selection Cursor Next int caret Line get Caret Line int line Offset content get Offset At Line caret Line int offset In Line caret Offset line Offset advancing true if offset In Line content get Line caret Line length caret Offset get Cluster Next caret Offset caret Line show Caret else if caret Line content get Line Count 1 is Single Line false only go to next line if not in single line mode fixes 5673 caret Line caret Offset content get Offset At Line caret Line explicitly go to the calculated caret line may be different from content get Line At Offset caret Offset when in word wrap mode show Caret caret Line  doSelectionCursorNext caretLine getCaretLine lineOffset getOffsetAtLine caretLine offsetInLine caretOffset lineOffset offsetInLine getLine caretLine caretOffset getClusterNext caretOffset caretLine showCaret caretLine getLineCount isSingleLine caretLine caretOffset getOffsetAtLine caretLine getLineAtOffset caretOffset showCaret caretLine
Moves the caret to the previous character or to the end of the previous line if the cursor is at the beginning of a line void do Selection Cursor Previous int caret Line get Caret Line int line Offset content get Offset At Line caret Line int offset In Line caret Offset line Offset advancing false if offset In Line 0 caret Offset get Cluster Previous caret Offset caret Line show Caret caret Line else if caret Line 0 caret Line line Offset content get Offset At Line caret Line caret Offset line Offset content get Line caret Line length show Caret  doSelectionCursorPrevious caretLine getCaretLine lineOffset getOffsetAtLine caretLine offsetInLine caretOffset lineOffset offsetInLine caretOffset getClusterPrevious caretOffset caretLine showCaret caretLine caretLine caretLine lineOffset getOffsetAtLine caretLine caretOffset lineOffset getLine caretLine showCaret
Moves the caret one line down and to the same character offset relative to the beginning of the line Moves the caret to the end of the new line if the new line is shorter than the character offset Moves the caret to the end of the text if the caret already is on the last line Adjusts the selection according to the caret change This can either add to or subtract from the old selection depending on the previous selection direction void do Selection Line Down int old ColumnX int caret Line int line Start Offset if is Single Line return caret Line get Caret Line line Start Offset content get Offset At Line caret Line reset columnX on selection old ColumnX columnX getX At Offset content get Line caret Line caret Line caret Offset line Start Offset if caret Line content get Line Count 1 caret Offset content get Char Count else caret Line do Line Down set Mouse Word Selection Anchor select first and then scroll to reduce flash when key repeat scrolls lots of lines do Selection ST COLUMN NEXT explicitly go to the calculated caret line may be different from content get Line At Offset caret Offset when in word wrap mode show Caret caret Line save the original horizontal caret position columnX old ColumnX  doSelectionLineDown oldColumnX caretLine lineStartOffset isSingleLine caretLine getCaretLine lineStartOffset getOffsetAtLine caretLine oldColumnX getXAtOffset getLine caretLine caretLine caretOffset lineStartOffset caretLine getLineCount caretOffset getCharCount caretLine doLineDown setMouseWordSelectionAnchor doSelection COLUMN_NEXT getLineAtOffset caretOffset showCaret caretLine oldColumnX
Moves the caret one line up and to the same character offset relative to the beginning of the line Moves the caret to the end of the new line if the new line is shorter than the character offset Moves the caret to the beginning of the document if it is already on the first line Adjusts the selection according to the caret change This can either add to or subtract from the old selection depending on the previous selection direction void do Selection Line Up int old ColumnX int caret Line get Caret Line int line Start Offset content get Offset At Line caret Line reset columnX on selection old ColumnX columnX getX At Offset content get Line caret Line caret Line caret Offset line Start Offset if caret Line 0 caret Offset 0 else caret Line do Line Up set Mouse Word Selection Anchor explicitly go to the calculated caret line may be different from content get Line At Offset caret Offset when in word wrap mode show Caret caret Line do Selection ST COLUMN PREVIOUS save the original horizontal caret position columnX old ColumnX  doSelectionLineUp oldColumnX caretLine getCaretLine lineStartOffset getOffsetAtLine caretLine oldColumnX getXAtOffset getLine caretLine caretLine caretOffset lineStartOffset caretLine caretOffset caretLine doLineUp setMouseWordSelectionAnchor getLineAtOffset caretOffset showCaret caretLine doSelection COLUMN_PREVIOUS oldColumnX
Scrolls one page down so that the last line truncated or whole of the current page becomes the fully visible top line The caret is scrolled the same number of lines so that its location relative to the top line remains the same The exception is the end of the text where a full page scroll is not possible In this case the caret is moved after the last character p Adjusts the selection according to the caret change This can either add to or subtract from the old selection depending on the previous selection direction p void do Selection Page Down int old ColumnX int caret Line get Caret Line int line Start Offset content get Offset At Line caret Line reset columnX on selection old ColumnX columnX getX At Offset content get Line caret Line caret Line caret Offset line Start Offset do Page Down true columnX old ColumnX  doSelectionPageDown oldColumnX caretLine getCaretLine lineStartOffset getOffsetAtLine caretLine oldColumnX getXAtOffset getLine caretLine caretLine caretOffset lineStartOffset doPageDown oldColumnX
Scrolls one page up so that the first line truncated or whole of the current page becomes the fully visible last line The caret is scrolled the same number of lines so that its location relative to the top line remains the same The exception is the beginning of the text where a full page scroll is not possible In this case the caret is moved in front of the first character p Adjusts the selection according to the caret change This can either add to or subtract from the old selection depending on the previous selection direction p void do Selection Page Up int old ColumnX int caret Line get Caret Line int line Start Offset content get Offset At Line caret Line reset columnX on selection old ColumnX columnX getX At Offset content get Line caret Line caret Line caret Offset line Start Offset do Page Up columnX old ColumnX  doSelectionPageUp oldColumnX caretLine getCaretLine lineStartOffset getOffsetAtLine caretLine oldColumnX getXAtOffset getLine caretLine caretLine caretOffset lineStartOffset doPageUp oldColumnX
Moves the caret to the end of the next word void do Selection Word Next int new Caret Offset get Word End caret Offset Force symmetrical movement for word next and previous Fixes 14536 advancing false don t change caret position if in single line mode and the cursor would be on a different line fixes 5673 if is Single Line false content get Line At Offset caret Offset content get Line At Offset new Caret Offset caret Offset new Caret Offset show Caret  doSelectionWordNext newCaretOffset getWordEnd caretOffset isSingleLine getLineAtOffset caretOffset getLineAtOffset newCaretOffset caretOffset newCaretOffset showCaret
Moves the caret to the start of the previous word void do Selection Word Previous int caret Line advancing false caret Offset get Word Start caret Offset caret Line content get Line At Offset caret Offset word previous always comes from bottom line when wrapping lines stay on bottom line when on line boundary if word Wrap caret Line content get Line Count 1 caret Offset content get Offset At Line caret Line 1 caret Line show Caret caret Line  doSelectionWordPrevious caretLine caretOffset getWordStart caretOffset caretLine getLineAtOffset caretOffset wordWrap caretLine getLineCount caretOffset getOffsetAtLine caretLine caretLine showCaret caretLine
Moves the caret one character to the left Do not go to the previous line When in a bidi locale and at a R2L character the caret is moved to the beginning of the R2L segment visually right and then one character to the left visually left because it s now in a L2R segment void do Visual Previous caret Offset get Cluster Previous caret Offset get Caret Line show Caret  doVisualPrevious caretOffset getClusterPrevious caretOffset getCaretLine showCaret
Moves the caret one character to the right Do not go to the next line When in a bidi locale and at a R2L character the caret is moved to the end of the R2L segment visually left and then one character to the right visually right because it s now in a L2R segment void do Visual Next caret Offset get Cluster Next caret Offset get Caret Line show Caret  doVisualNext caretOffset getClusterNext caretOffset getCaretLine showCaret
Moves the caret to the end of the next word If a selection exists move the caret to the end of the selection and remove the selection void do Word Next if selection y selection x 0 int caret Line caret Offset selection y caret Line get Caret Line show Caret caret Line else do Selection Word Next  doWordNext caretLine caretOffset caretLine getCaretLine showCaret caretLine doSelectionWordNext
Moves the caret to the start of the previous word If a selection exists move the caret to the start of the selection and remove the selection void do Word Previous if selection y selection x 0 int caret Line caret Offset selection x caret Line get Caret Line show Caret caret Line else do Selection Word Previous  doWordPrevious caretLine caretOffset caretLine getCaretLine showCaret caretLine doSelectionWordPrevious
Draws the specified rectangle Draw directly without invalidating the affected area when clear Background is false p param x the x position param y the y position param width the width param height the height param clear Background true clear the background by invalidating the requested redraw area false draw the foreground directly without invalidating the redraw area void draw int x int y int width int height boolean clear Background if clear Background redraw x left Margin y top Margin width height true else int start Line y vertical Scroll Offset line Height int endY y height int paintY From Top Line start Line top Index line Height int top Line Offset top Index line Height vertical Scroll Offset int paintY paintY From Top Line top Line Offset top Margin adjust y position for pixel based scrolling int line Count content get Line Count Color background get Background Color foreground get Foreground GC gc getGC if is Single Line line Count 1 for int i start Line paintY endY i line Count i paintY line Height String line content get Line i renderer draw Line line i paintY gc background foreground clear Background gc dispose  clearBackground clearBackground clearBackground clearBackground leftMargin topMargin startLine verticalScrollOffset lineHeight paintYFromTopLine startLine topIndex lineHeight topLineOffset topIndex lineHeight verticalScrollOffset paintYFromTopLine topLineOffset topMargin lineCount getLineCount getBackground getForeground isSingleLine lineCount startLine lineCount lineHeight getLine drawLine clearBackground
Ends the autoscroll process void end Auto Scroll auto Scroll Direction SWT NULL  endAutoScroll autoScrollDirection
see org eclipse swt widgets Control get Background public Color get Background check Widget if background null return get Display get System Color SWT COLOR LIST BACKGROUND return background  getBackground getBackground checkWidget getDisplay getSystemColor COLOR_LIST_BACKGROUND
Returns the baseline in pixels return baseline the baseline 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 since 3 0 public int get Baseline check Widget return renderer get Baseline  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBaseline checkWidget getBaseline
Gets the BIDI coloring mode When true the BIDI text display algorithm is applied to segments of text that are the same color return the current coloring mode 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 p deprecated use Bidi Segment Listener instead p public boolean get Bidi Coloring check Widget return bidi Coloring  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS BidiSegmentListener getBidiColoring checkWidget bidiColoring
Returns the index of the last fully visible line p return index of the last fully visible line int get Bottom Index int line Count 1 if line Height 0 calculate the number of lines that are fully visible int partial Top Line Height top Index line Height vertical Scroll Offset line Count get Client Area height partial Top Line Height line Height return Math min content get Line Count 1 top Index Math max 0 line Count 1  getBottomIndex lineCount lineHeight partialTopLineHeight topIndex lineHeight verticalScrollOffset lineCount getClientArea partialTopLineHeight lineHeight getLineCount topIndex lineCount
Returns the caret position relative to the start of the text p return the caret position relative to the start of the text 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 int get Caret Offset check Widget return caret Offset  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getCaretOffset checkWidget caretOffset
Returns the caret offset at the given x location in the line The caret offset is the offset of the character where the caret will be placed when a mouse click occurs The caret offset will be the offset of the character after the clicked one if the mouse click occurs at the second half of a character Doesn t properly handle ligatures and other context dependent characters unless the current locale is a bidi locale Ligatures are handled properly as long as they don t occur at lineX Offset p param line text of the line to calculate the offset in param line Offset offset of the first character in the line 0 based from the beginning of the document param lineX Offset x location in the line return caret offset at the x location relative to the start of the line int get Offset AtX String line int line Offset int lineX Offset int x lineX Offset left Margin horizontal Scroll Offset Text Layout layout renderer get Text Layout line line Offset int trailing new int 1 int offset In Line layout get Offset x 0 trailing advancing false if trailing 0 0 int line Length line length if offset In Line trailing 0 line Length offset In Line line Length advancing true else int level int offset offset In Line while offset 0 Character is Digit line char At offset offset if offset 0 Character is Digit line char At offset level is Mirrored 1 0 else level layout get Level offset 0x1 offset In Line trailing 0 int trailing Level layout get Level offset In Line 0x1 advancing level trailing Level 0 renderer dispose Text Layout layout return offset In Line  lineXOffset lineOffset lineXOffset getOffsetAtX lineOffset lineXOffset lineXOffset leftMargin horizontalScrollOffset TextLayout getTextLayout lineOffset offsetInLine getOffset lineLength offsetInLine lineLength offsetInLine lineLength offsetInLine isDigit charAt isDigit charAt isMirrored getLevel offsetInLine trailingLevel getLevel offsetInLine trailingLevel disposeTextLayout offsetInLine
Returns the caret width p return the caret width 0 if caret is null int get Caret Width Caret caret get Caret if caret null return 0 return caret get Size x  getCaretWidth getCaret getSize
int get Cluster Next int offset int line Index String line content get Line line Index int line Offset content get Offset At Line line Index Text Layout layout renderer get Text Layout line line Offset offset line Offset offset layout get Next Offset offset SWT MOVEMENT CLUSTER offset line Offset renderer dispose Text Layout layout return offset  getClusterNext lineIndex getLine lineIndex lineOffset getOffsetAtLine lineIndex TextLayout getTextLayout lineOffset lineOffset getNextOffset MOVEMENT_CLUSTER lineOffset disposeTextLayout
int get Cluster Previous int offset int line Index String line content get Line line Index int line Offset content get Offset At Line line Index Text Layout layout renderer get Text Layout line line Offset offset line Offset offset layout get Previous Offset offset SWT MOVEMENT CLUSTER offset line Offset renderer dispose Text Layout layout return offset  getClusterPrevious lineIndex getLine lineIndex lineOffset getOffsetAtLine lineIndex TextLayout getTextLayout lineOffset lineOffset getPreviousOffset MOVEMENT_CLUSTER lineOffset disposeTextLayout
Returns the content implementation that is used for text storage or null if no user defined content implementation has been set p return content implementation that is used for text storage or null if no user defined content implementation has been set 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 Styled Text Content get Content check Widget return logical Content  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS StyledTextContent getContent checkWidget logicalContent
Returns whether the widget implements double click mouse behavior p return true if double clicking a word selects the word false if double clicks have the same effect as regular mouse clicks 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 boolean get Double Click Enabled check Widget return double Click Enabled  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getDoubleClickEnabled checkWidget doubleClickEnabled
Returns whether the widget content can be edited p return true if content can be edited false otherwise 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 boolean get Editable check Widget return editable  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getEditable checkWidget
see org eclipse swt widgets Control get Foreground public Color get Foreground check Widget if foreground null return get Display get System Color SWT COLOR LIST FOREGROUND return foreground  getForeground getForeground checkWidget getDisplay getSystemColor COLOR_LIST_FOREGROUND
Return a GC to use for rendering and update the cached font style to represent the current style p return GC GC getGC return new GC this 
Returns the horizontal scroll increment p return horizontal scroll increment int get Horizontal Increment GC gc getGC int increment gc get Font Metrics get Average Char Width gc dispose return increment  getHorizontalIncrement getFontMetrics getAverageCharWidth
Returns the horizontal scroll offset relative to the start of the line p return horizontal scroll offset relative to the start of the line measured in character increments starting at 0 if 0 the content is scrolled 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 int get Horizontal Index check Widget return horizontal Scroll Offset get Horizontal Increment  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getHorizontalIndex checkWidget horizontalScrollOffset getHorizontalIncrement
Returns the horizontal scroll offset relative to the start of the line p return the horizontal scroll offset relative to the start of the line measured in pixel starting at 0 if 0 the content is scrolled 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 int get Horizontal Pixel check Widget return horizontal Scroll Offset  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getHorizontalPixel checkWidget horizontalScrollOffset
Returns the action assigned to the key Returns SWT NULL if there is no action associated with the key p param key a key code defined in SWT java or a character Optionally O Rd with a state mask Preferred state masks are one or more of SWT MOD1 SWT MOD2 SWT MOD3 since these masks account for modifier platform differences However there may be cases where using the specific state masks i e SWT CTRL SWT SHIFT SWT ALT SWT COMMAND makes sense return one of the predefined actions defined in ST java or SWT NULL if there is no action associated with the key 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 int get Key Binding int key check Widget Integer action Integer key Action Map get new Integer key int int Action if action null int Action SWT NULL else int Action action int Value return int Action  ORd SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getKeyBinding checkWidget keyActionMap intAction intAction intAction intValue intAction
Gets the number of characters p return number of characters in the widget 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 int get Char Count check Widget return content get Char Count  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getCharCount checkWidget getCharCount
Returns the background color of the line at the given index Returns null if a Line Background Listener has been set or if no background color has been specified for the line Should not be called if a Line Background Listener has been set since the listener maintains the line background colors p return the background color of the line at the given index 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 exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT when the index is invalid li ul public Color get Line Background int index check Widget Color line Background null if index 0 index logical Content get Line Count SWT error SWT ERROR INVALID ARGUMENT if user Line Background false line Background default Line Styler get Line Background index return line Background  LineBackgroundListener LineBackgroundListener SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_ARGUMENT getLineBackground checkWidget lineBackground logicalContent getLineCount ERROR_INVALID_ARGUMENT userLineBackground lineBackground defaultLineStyler getLineBackground lineBackground
Returns the line background data for the given line or null if there is none p param line Offset offset of the line start relative to the start of the content param line line to get line background data for return line background data for the given line Styled Text Event get Line Background Data int line Offset String line return send Line Event Line Get Background line Offset line  lineOffset StyledTextEvent getLineBackgroundData lineOffset sendLineEvent LineGetBackground lineOffset
Gets the number of text lines p return the number of lines in the widget 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 int get Line Count check Widget return get Line At Offset get Char Count 1  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getLineCount checkWidget getLineAtOffset getCharCount
Returns the number of lines that can be completely displayed in the widget client area p return number of lines that can be completely displayed in the widget client area int get Line Count Whole int line Count if line Height 0 line Count get Client Area height line Height else line Count 1 return line Count  getLineCountWhole lineCount lineHeight lineCount getClientArea lineHeight lineCount lineCount
Returns the line at the specified offset in the text where 0 lt offset lt get Char Count so that get Line At Offset get Char Count returns the line of the insert location param offset offset relative to the start of the content 0 offset get Char Count return line at the specified offset in the text 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 exception Illegal Argument Exception ul li ERROR INVALID RANGE when the offset is outside the valid range 0 or get Char Count li ul public int get Line At Offset int offset check Widget if offset 0 offset get Char Count SWT error SWT ERROR INVALID RANGE return logical Content get Line At Offset offset  getCharCount getLineAtOffset getCharCount getCharCount SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_RANGE getCharCount getLineAtOffset checkWidget getCharCount ERROR_INVALID_RANGE logicalContent getLineAtOffset
Returns the line delimiter used for entering new lines by key down or paste operation p return line delimiter used for entering new lines by key down or paste operation 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 String get Line Delimiter check Widget return content get Line Delimiter  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getLineDelimiter checkWidget getLineDelimiter
Returns a Styled Text Event that can be used to request data such as styles and background color for a line The specified line may be a visual wrapped line if in word wrap mode The returned object will always be for a logical unwrapped line p param line Offset offset of the line This may be the offset of a visual line if the widget is in word wrap mode param line line text This may be the text of a visualline if the widget is in word wrap mode return Styled Text Event that can be used to request line data for the given line Styled Text Event send Line Event int event Type int line Offset String line Styled Text Event event null if is Listening event Type event new Styled Text Event logical Content if word Wrap if word wrap is on the line offset and text may be visual wrapped int line Index logical Content get Line At Offset line Offset event detail logical Content get Offset At Line line Index event text logical Content get Line line Index else event detail line Offset event text line notify Listeners event Type event return event  StyledTextEvent lineOffset StyledTextEvent StyledTextEvent sendLineEvent eventType lineOffset StyledTextEvent isListening eventType StyledTextEvent logicalContent wordWrap lineIndex logicalContent getLineAtOffset lineOffset logicalContent getOffsetAtLine lineIndex logicalContent getLine lineIndex lineOffset notifyListeners eventType
Returns the line height p return line height in pixel 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 int get Line Height check Widget return line Height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getLineHeight checkWidget lineHeight
Returns a Line Cache implementation Depending on whether or not word wrap is on this may be a line wrapping or line width calculating implementaiton p param content Styled Text Content to create the Line Cache on return a Line Cache implementation Line Cache get Line Cache Styled Text Content content Line Cache line Cache if word Wrap line Cache new Word Wrap Cache this Wrapped Content content else line Cache new Content Width Cache this content return line Cache  LineCache StyledTextContent LineCache LineCache LineCache getLineCache StyledTextContent LineCache lineCache wordWrap lineCache WordWrapCache WrappedContent lineCache ContentWidthCache lineCache
Returns the line style data for the given line or null if there is none If there is a Line Style Listener but it does not set any styles the Styled Text Event styles field will be initialized to an empty array p param line Offset offset of the line start relative to the start of the content param line line to get line styles for return line style data for the given line Styles may start before line start and end after line end Styled Text Event get Line Style Data int line Offset String line return send Line Event Line Get Style line Offset line  LineStyleListener StyledTextEvent lineOffset StyledTextEvent getLineStyleData lineOffset sendLineEvent LineGetStyle lineOffset
Returns the x y location of the upper left corner of the character bounding box at the specified offset in the text The point is relative to the upper left corner of the widget client area p param offset offset relative to the start of the content 0 offset get Char Count return x y location of the upper left corner of the character bounding box at the specified offset in the text 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 exception Illegal Argument Exception ul li ERROR INVALID RANGE when the offset is outside the valid range 0 or get Char Count li ul public Point get Location At Offset int offset check Widget if offset 0 offset get Char Count SWT error SWT ERROR INVALID RANGE int line content get Line At Offset offset int line Offset content get Offset At Line line String line Content content get Line line int x getX At Offset line Content line offset line Offset int y line line Height vertical Scroll Offset return new Point x y  getCharCount SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_RANGE getCharCount getLocationAtOffset checkWidget getCharCount ERROR_INVALID_RANGE getLineAtOffset lineOffset getOffsetAtLine lineContent getLine getXAtOffset lineContent lineOffset lineHeight verticalScrollOffset
Returns the character offset of the first character of the given line p param line Index index of the line 0 based relative to the first line in the content 0 line Index get Line Count except line Index may always be 0 return offset offset of the first character of the line relative to the beginning of the document The first character of the document is at offset 0 When there are not any lines get Offset At Line 0 is a valid call that answers 0 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 exception Illegal Argument Exception ul li ERROR INVALID RANGE when the offset is outside the valid range 0 or get Char Count li ul since 2 0 public int get Offset At Line int line Index check Widget if line Index 0 line Index 0 line Index logical Content get Line Count SWT error SWT ERROR INVALID RANGE return logical Content get Offset At Line line Index  lineIndex lineIndex getLineCount lineIndex getOffsetAtLine SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_RANGE getCharCount getOffsetAtLine lineIndex checkWidget lineIndex lineIndex lineIndex logicalContent getLineCount ERROR_INVALID_RANGE logicalContent getOffsetAtLine lineIndex
Returns the offset of the character at the given location relative to the first character in the document The return value reflects the character offset that the caret will be placed at if a mouse click occurred at the specified location If the x coordinate of the location is beyond the center of a character the returned offset will be behind the character p param point the origin of character bounding box relative to the origin of the widget client area return offset of the character at the given location relative to the first character in the document 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when point is null li li ERROR INVALID ARGUMENT when there is no character at the specified location li ul public int get Offset At Location Point point check Widget Text Layout layout int line int line Offset int offset In Line String line Text if point null SWT error SWT ERROR NULL ARGUMENT is y above first line or is x before first column if point y vertical Scroll Offset 0 point x horizontal Scroll Offset 0 SWT error SWT ERROR INVALID ARGUMENT line get Top Pixel point y line Height does the referenced line exist if line content get Line Count SWT error SWT ERROR INVALID ARGUMENT line Text content get Line line line Offset content get Offset At Line line int x point x left Margin horizontal Scroll Offset layout renderer get Text Layout line Text line Offset Rectangle rect layout get Line Bounds 0 if x rect x rect width renderer dispose Text Layout layout SWT error SWT ERROR INVALID ARGUMENT int trailing new int 1 offset In Line layout get Offset x 0 trailing if offset In Line line Text length 1 offset In Line Math min line Text length offset In Line trailing 0 renderer dispose Text Layout layout return line Offset offset In Line  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT getOffsetAtLocation checkWidget TextLayout lineOffset offsetInLine lineText ERROR_NULL_ARGUMENT verticalScrollOffset horizontalScrollOffset ERROR_INVALID_ARGUMENT getTopPixel lineHeight getLineCount ERROR_INVALID_ARGUMENT lineText getLine lineOffset getOffsetAtLine leftMargin horizontalScrollOffset getTextLayout lineText lineOffset getLineBounds disposeTextLayout ERROR_INVALID_ARGUMENT offsetInLine getOffset offsetInLine lineText offsetInLine lineText offsetInLine disposeTextLayout lineOffset offsetInLine
Returns the offset at the specified x location in the specified line p param x x location of the mouse location param line line the mouse location is in return the offset at the specified x location in the specified line relative to the beginning of the document int get Offset At Mouse Location int x int line String line Text content get Line line int line Offset content get Offset At Line line return get Offset AtX line Text line Offset x line Offset  getOffsetAtMouseLocation lineText getLine lineOffset getOffsetAtLine getOffsetAtX lineText lineOffset lineOffset
Return the orientation of the receiver return the orientation style 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 since 2 1 2 public int get Orientation check Widget return is Mirrored SWT RIGHT TO LEFT SWT LEFT TO RIGHT  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getOrientation checkWidget isMirrored RIGHT_TO_LEFT LEFT_TO_RIGHT
Returns the index of the last partially visible line return index of the last partially visible line int get Partial Bottom Index int partial Line Count Compatibility ceil get Client Area height line Height return Math min content get Line Count top Index partial Line Count 1  getPartialBottomIndex partialLineCount getClientArea lineHeight getLineCount topIndex partialLineCount
Returns the content in the specified range using the platform line delimiter to separate lines p param writer the Text Writer to write line text into return the content in the specified range using the platform line delimiter to separate lines as written by the specified Text Writer String get Platform Delimited Text Text Writer writer int end writer get Start writer get Char Count int start Line logical Content get Line At Offset writer get Start int end Line logical Content get Line At Offset end String end Line Text logical Content get Line end Line int end Line Offset logical Content get Offset At Line end Line for int i start Line i end Line i writer write Line logical Content get Line i logical Content get Offset At Line i if i end Line writer write Line Delimiter Platform Line Delimiter if end end Line Offset end Line Text length writer write Line Delimiter Platform Line Delimiter writer close return writer to String  TextWriter TextWriter getPlatformDelimitedText TextWriter getStart getCharCount startLine logicalContent getLineAtOffset getStart endLine logicalContent getLineAtOffset endLineText logicalContent getLine endLine endLineOffset logicalContent getOffsetAtLine endLine startLine endLine writeLine logicalContent getLine logicalContent getOffsetAtLine endLine writeLineDelimiter PlatformLineDelimiter endLineOffset endLineText writeLineDelimiter PlatformLineDelimiter toString
Returns the selection p Text selections are specified in terms of caret positions In a text widget that contains N characters there are N 1 caret positions ranging from 0 N p return start and end of the selection x is the offset of the first selected character y is the offset after the last selected character The selection values returned are visual i e x will always always be y To determine if a selection is right to left RtoL vs left to right LtoR compare the caret Offset to the start and end of the selection e g caret Offset start of selection implies that the selection is RtoL see get Selection Range 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 Point get Selection check Widget return new Point selection x selection y  caretOffset caretOffset getSelectionRange SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelection checkWidget
Returns the selection p return start and length of the selection x is the offset of the first selected character relative to the first character of the widget content y is the length of the selection The selection values returned are visual i e length will always always be positive To determine if a selection is right to left RtoL vs left to right LtoR compare the caret Offset to the start and end of the selection e g caret Offset start of selection implies that the selection is RtoL 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 Point get Selection Range check Widget return new Point selection x selection y selection x  caretOffset caretOffset SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelectionRange checkWidget
Returns the receiver s selection background color return the selection background color 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 since 2 1 public Color get Selection Background check Widget if selection Background null return get Display get System Color SWT COLOR LIST SELECTION return selection Background  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelectionBackground checkWidget selectionBackground getDisplay getSystemColor COLOR_LIST_SELECTION selectionBackground
Gets the number of selected characters p return the number of selected characters 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 int get Selection Count check Widget return get Selection Range y  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelectionCount checkWidget getSelectionRange
Returns the receiver s selection foreground color return the selection foreground color 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 since 2 1 public Color get Selection Foreground check Widget if selection Foreground null return get Display get System Color SWT COLOR LIST SELECTION TEXT return selection Foreground  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelectionForeground checkWidget selectionForeground getDisplay getSystemColor COLOR_LIST_SELECTION_TEXT selectionForeground
Returns the selected text p return selected text or an empty String if there is no selection 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 String get Selection Text check Widget return content get Text Range selection x selection y selection x  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSelectionText checkWidget getTextRange
public int get Style int style super get Style style SWT LEFT TO RIGHT SWT RIGHT TO LEFT SWT MIRRORED if is Mirrored style SWT RIGHT TO LEFT SWT MIRRORED else style SWT LEFT TO RIGHT return style  getStyle getStyle LEFT_TO_RIGHT RIGHT_TO_LEFT isMirrored RIGHT_TO_LEFT LEFT_TO_RIGHT
Returns the text segments that should be treated as if they had a different direction than the surrounding text p param line Offset offset of the first character in the line 0 based from the beginning of the document param line text of the line to specify bidi segments for return text segments that should be treated as if they had a different direction than the surrounding text Only the start index of a segment is specified relative to the start of the line Always starts with 0 and ends with the line length exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the segment indices returned by the listener do not start with 0 are not in ascending order exceed the line length or have duplicates li ul int get Bidi Segments int line Offset String line if is Listening Line Get Segments false return get Bidi Segments Compatibility line line Offset Styled Text Event event send Line Event Line Get Segments line Offset line int line Length line length int segments if event null event segments null event segments length 0 segments new int 0 line Length else int segment Count event segments length test segment index consistency if event segments 0 0 SWT error SWT ERROR INVALID ARGUMENT for int i 1 i segment Count i if event segments i event segments i 1 event segments i line Length SWT error SWT ERROR INVALID ARGUMENT ensure that last segment index is line end offset if event segments segment Count 1 line Length segments new int segment Count 1 System arraycopy event segments 0 segments 0 segment Count segments segment Count line Length else segments event segments return segments  lineOffset IllegalArgumentException ERROR_INVALID_ARGUMENT getBidiSegments lineOffset isListening LineGetSegments getBidiSegmentsCompatibility lineOffset StyledTextEvent sendLineEvent LineGetSegments lineOffset lineLength lineLength segmentCount ERROR_INVALID_ARGUMENT segmentCount lineLength ERROR_INVALID_ARGUMENT segmentCount lineLength segmentCount segmentCount segmentCount lineLength
see get Bidi Segments Supports deprecated set Bidi Coloring API Remove when API is removed int get Bidi Segments Compatibility String line int line Offset Styled Text Event event Style Range styles new Style Range 0 int line Length line length if bidi Coloring false return new int 0 line Length event renderer get Line Style Data line Offset line if event null styles event styles if styles length 0 return new int 0 line Length int k 0 count 1 while k styles length styles k start 0 styles k length line Length k int offsets new int styles length k 2 2 for int i k i styles length i Style Range style styles i int style Line Start Math max style start line Offset 0 int style Line End Math max style start style length line Offset style Line Start style Line End Math min style Line End line length if i 0 count 1 style Line Start offsets count 2 style Line Start offsets count 1 style Line End offsets count 2 style Line End offsets count 1 style similar To styles i 1 offsets count 2 Math min offsets count 2 style Line Start offsets count 1 Math max offsets count 1 style Line End else if style Line Start offsets count 1 offsets count style Line Start count offsets count style Line End count add offset for last non colored segment in line if any if line Length offsets count 1 offsets count line Length count if count offsets length return offsets int result new int count System arraycopy offsets 0 result 0 count return result  getBidiSegments setBidiColoring getBidiSegmentsCompatibility lineOffset StyledTextEvent StyleRange StyleRange lineLength bidiColoring lineLength getLineStyleData lineOffset lineLength lineLength StyleRange styleLineStart lineOffset styleLineEnd lineOffset styleLineStart styleLineEnd styleLineEnd styleLineStart styleLineStart styleLineEnd styleLineEnd similarTo styleLineStart styleLineEnd styleLineStart styleLineStart styleLineEnd lineLength lineLength
Returns the style range at the given offset Returns null if a Line Style Listener has been set or if a style is not set for the offset Should not be called if a Line Style Listener has been set since the listener maintains the styles p param offset the offset to return the style for 0 offset get Char Count must be true return a Style Range with start offset and length 1 indicating the style at the given offset null if a Line Style Listener has been set or if a style is not set for the given offset 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 exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT when the offset is invalid li ul public Style Range get Style Range At Offset int offset check Widget if offset 0 offset get Char Count SWT error SWT ERROR INVALID ARGUMENT if user Line Style false return default Line Styler get Style Range At Offset offset return null  LineStyleListener LineStyleListener getCharCount StyleRange LineStyleListener SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_ARGUMENT StyleRange getStyleRangeAtOffset checkWidget getCharCount ERROR_INVALID_ARGUMENT userLineStyle defaultLineStyler getStyleRangeAtOffset
Returns the styles Returns an empty array if a Line Style Listener has been set Should not be called if a Line Style Listener has been set since the listener maintains the styles p return the styles or an empty array if a Line Style Listener has been set 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 Style Range get Style Ranges check Widget Style Range styles if user Line Style false styles default Line Styler get Style Ranges else styles new Style Range 0 return styles  LineStyleListener LineStyleListener LineStyleListener SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS StyleRange getStyleRanges checkWidget StyleRange userLineStyle defaultLineStyler getStyleRanges StyleRange
Returns the styles for the given text range Returns an empty array if a Line Style Listener has been set Should not be called if a Line Style Listener has been set since the listener maintains the styles p return the styles or an empty array if a Line Style Listener has been set The returned styles will reflect the given range The first returned code Style Range code will have a starting offset start and the last returned code Style Range code will have an ending offset start length 1 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 exception Illegal Argument Exception ul li ERROR INVALID RANGE when start and or end are outside the widget content li ul since 3 0 public Style Range get Style Ranges int start int length check Widget int content Length get Char Count int end start length if start end start 0 end content Length SWT error SWT ERROR INVALID RANGE Style Range styles if user Line Style false styles default Line Styler get Style Ranges For start length if styles null return new Style Range 0 adjust the first and last style to reflect the specified range clone these styles since the returned styles are the styles cached by the widget if styles length 1 Style Range style styles 0 if style start start Style Range new Style Style Range styles 0 clone new Style length new Style length start new Style start new Style start start styles 0 new Style if style start style length start length Style Range new Style Style Range styles 0 clone new Style length start length new Style start styles 0 new Style else if styles length 1 Style Range style styles 0 if style start start Style Range new Style Style Range styles 0 clone new Style length new Style length start new Style start new Style start start styles 0 new Style style styles styles length 1 if style start style length start length Style Range new Style Style Range styles styles length 1 clone new Style length start length new Style start styles styles length 1 new Style else styles new Style Range 0 return styles  LineStyleListener LineStyleListener LineStyleListener StyleRange StyleRange SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_RANGE StyleRange getStyleRanges checkWidget contentLength getCharCount contentLength ERROR_INVALID_RANGE StyleRange userLineStyle defaultLineStyler getStyleRangesFor StyleRange StyleRange StyleRange newStyle StyleRange newStyle newStyle newStyle newStyle newStyle StyleRange newStyle StyleRange newStyle newStyle newStyle StyleRange StyleRange newStyle StyleRange newStyle newStyle newStyle newStyle newStyle StyleRange newStyle StyleRange newStyle newStyle newStyle StyleRange
Returns the tab width measured in characters return tab width measured in characters 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 int get Tabs check Widget return tab Length  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getTabs checkWidget tabLength
Returns a copy of the widget content p return copy of the widget content 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 String get Text check Widget return content get Text Range 0 get Char Count  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getText checkWidget getTextRange getCharCount
Returns the widget content between the two offsets p param start offset of the first character in the returned String param end offset of the last character in the returned String return widget content starting at start and ending at end see get Text Range int int 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 exception Illegal Argument Exception ul li ERROR INVALID RANGE when start and or end are outside the widget content li ul public String get Text int start int end check Widget int content Length get Char Count if start 0 start content Length end 0 end content Length start end SWT error SWT ERROR INVALID RANGE return content get Text Range start end start 1  getTextRange SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_RANGE getText checkWidget contentLength getCharCount contentLength contentLength ERROR_INVALID_RANGE getTextRange
Returns the widget content starting at start for length characters p param start offset of the first character in the returned String param length number of characters to return return widget content starting at start and extending length characters 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 exception Illegal Argument Exception ul li ERROR INVALID RANGE when start and or length are outside the widget content li ul public String get Text Range int start int length check Widget int content Length get Char Count int end start length if start end start 0 end content Length SWT error SWT ERROR INVALID RANGE return content get Text Range start length  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_RANGE getTextRange checkWidget contentLength getCharCount contentLength ERROR_INVALID_RANGE getTextRange
Gets the text limit The text limit specifies the amount of text that the user can type into 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 int get Text Limit check Widget return text Limit  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getTextLimit checkWidget textLimit
Gets the top index The top index is the index of the fully visible line that is currently at the top of the widget or the topmost partially visible line if no line is fully visible The top index changes when the widget is scrolled Indexing is zero based p return the index of the top line 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 int get Top Index check Widget int logical Top Index top Index if word Wrap int visual Line Offset content get Offset At Line top Index logical Top Index logical Content get Line At Offset visual Line Offset return logical Top Index  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getTopIndex checkWidget logicalTopIndex topIndex wordWrap visualLineOffset getOffsetAtLine topIndex logicalTopIndex logicalContent getLineAtOffset visualLineOffset logicalTopIndex
Gets the top pixel The top pixel is the pixel position of the line that is currently at the top of the widget The text widget can be scrolled by pixels by dragging the scroll thumb so that a partial line may be displayed at the top the widget The top pixel changes when the widget is scrolled The top pixel does not include the widget trimming p return pixel position of the top line 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 int get Top Pixel check Widget return vertical Scroll Offset  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getTopPixel checkWidget verticalScrollOffset
Returns the vertical scroll increment p return vertical scroll increment int get Vertical Increment return line Height  getVerticalIncrement lineHeight
int get Caret Direction if is Bidi return SWT DEFAULT if update Caret Direction caret Direction SWT NULL return caret Direction update Caret Direction false int caret Line get Caret Line int line Offset content get Offset At Line caret Line String line content get Line caret Line int offset caret Offset line Offset int line Length line length if line Length 0 return is Mirrored SWT RIGHT SWT LEFT if advancing offset 0 offset if offset line Length offset 0 offset while offset 0 Character is Digit line char At offset offset if offset 0 Character is Digit line char At offset return is Mirrored SWT RIGHT SWT LEFT Text Layout layout renderer get Text Layout line line Offset int level layout get Level offset renderer dispose Text Layout layout return level 1 0 SWT RIGHT SWT LEFT  getCaretDirection isBidi updateCaretDirection caretDirection caretDirection updateCaretDirection caretLine getCaretLine lineOffset getOffsetAtLine caretLine getLine caretLine caretOffset lineOffset lineLength lineLength isMirrored lineLength isDigit charAt isDigit charAt isMirrored TextLayout getTextLayout lineOffset getLevel disposeTextLayout
Returns the index of the line the caret is on When in word wrap mode and at the end of one wrapped line beginning of the continuing wrapped line the caret offset is not sufficient to determine the caret line return the index of the line the caret is on int get Caret Line int caret Line content get Line At Offset caret Offset int left ColumnX left Margin if word Wrap columnX left ColumnX caret Line content get Line Count 1 caret Offset content get Offset At Line caret Line 1 caret Line return caret Line  getCaretLine caretLine getLineAtOffset caretOffset leftColumnX leftMargin wordWrap leftColumnX caretLine getLineCount caretOffset getOffsetAtLine caretLine caretLine caretLine
Returns the offset of the character after the word at the specified offset p There are two classes of words formed by a sequence of characters ul li from 0 9 and A z ASCII 48 57 and 65 122 li every other character except line breaks ul p p Space characters ASCII 20 are special as they are treated as part of the word leading up to the space character Line breaks are treated as one word p int get Word End int offset int line logical Content get Line At Offset offset int line Offset logical Content get Offset At Line line String line Text logical Content get Line line int line Length line Text length if offset get Char Count return offset if offset line Offset line Length line offset logical Content get Offset At Line line else Text Layout layout renderer get Text Layout line Text line Offset offset line Offset offset layout get Next Offset offset SWT MOVEMENT WORD offset line Offset renderer dispose Text Layout layout return offset  getWordEnd logicalContent getLineAtOffset lineOffset logicalContent getOffsetAtLine lineText logicalContent getLine lineLength lineText getCharCount lineOffset lineLength logicalContent getOffsetAtLine TextLayout getTextLayout lineText lineOffset lineOffset getNextOffset MOVEMENT_WORD lineOffset disposeTextLayout
Returns the offset of the character after the word at the specified offset p There are two classes of words formed by a sequence of characters ul li from 0 9 and A z ASCII 48 57 and 65 122 li every other character except line breaks ul p p Spaces are ignored and do not represent a word Line breaks are treated as one word p int get Word End No Spaces int offset int line logical Content get Line At Offset offset int line Offset logical Content get Offset At Line line String line Text logical Content get Line line int line Length line Text length if offset get Char Count return offset if offset line Offset line Length line offset logical Content get Offset At Line line else offset line Offset char ch line Text char At offset boolean letter Or Digit Compatibility is Letter Or Digit ch while offset line Length 1 Compatibility is Letter Or Digit ch letter Or Digit Compatibility is Space Char ch false offset ch line Text char At offset if offset line Length 1 Compatibility is Letter Or Digit ch letter Or Digit Compatibility is Space Char ch false offset offset line Offset return offset  getWordEndNoSpaces logicalContent getLineAtOffset lineOffset logicalContent getOffsetAtLine lineText logicalContent getLine lineLength lineText getCharCount lineOffset lineLength logicalContent getOffsetAtLine lineOffset lineText charAt letterOrDigit isLetterOrDigit lineLength isLetterOrDigit letterOrDigit isSpaceChar lineText charAt lineLength isLetterOrDigit letterOrDigit isSpaceChar lineOffset
Returns the start offset of the word at the specified offset There are two classes of words formed by a sequence of characters p ul li from 0 9 and A z ASCII 48 57 and 65 122 li every other character except line breaks ul p p Space characters ASCII 20 are special as they are treated as part of the word leading up to the space character Line breaks are treated as one word p int get Word Start int offset int line logical Content get Line At Offset offset int line Offset logical Content get Offset At Line line String line Text logical Content get Line line if offset 0 return offset if offset line Offset line line Text logical Content get Line line offset logical Content get Offset At Line line line Text length else Text Layout layout renderer get Text Layout line Text line Offset offset line Offset offset layout get Previous Offset offset SWT MOVEMENT WORD offset line Offset renderer dispose Text Layout layout return offset  getWordStart logicalContent getLineAtOffset lineOffset logicalContent getOffsetAtLine lineText logicalContent getLine lineOffset lineText logicalContent getLine logicalContent getOffsetAtLine lineText TextLayout getTextLayout lineText lineOffset lineOffset getPreviousOffset MOVEMENT_WORD lineOffset disposeTextLayout
Returns whether the widget wraps lines p return true if widget wraps lines false otherwise since 2 0 public boolean get Word Wrap check Widget return word Wrap  getWordWrap checkWidget wordWrap
Returns the x location of the character at the give offset in the line b NOTE b Does not return correct values for true italic fonts vs slanted fonts p return x location of the character at the given offset in the line int getX At Offset String line int line Index int offset In Line int x 0 int line Length line length if line Index content get Line Count 1 int end Line Offset content get Offset At Line line Index 1 1 if line Length offset In Line offset In Line end Line Offset offset In Line line Length if line Length 0 offset In Line line Length int line Offset content get Offset At Line line Index Text Layout layout renderer get Text Layout line line Offset if advancing offset In Line 0 x layout get Location offset In Line false x else x layout get Location offset In Line 1 true x renderer dispose Text Layout layout return x left Margin horizontal Scroll Offset  getXAtOffset lineIndex offsetInLine lineLength lineIndex getLineCount endLineOffset getOffsetAtLine lineIndex lineLength offsetInLine offsetInLine endLineOffset offsetInLine lineLength lineLength offsetInLine lineLength lineOffset getOffsetAtLine lineIndex TextLayout getTextLayout lineOffset offsetInLine getLocation offsetInLine getLocation offsetInLine disposeTextLayout leftMargin horizontalScrollOffset
Inserts a string The old selection is replaced with the new text p param string the string see replace Text Range int int String 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when string is null li ul public void insert String string check Widget if string null SWT error SWT ERROR NULL ARGUMENT Point sel get Selection Range replace Text Range sel x sel y string  replaceTextRange SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT checkWidget ERROR_NULL_ARGUMENT getSelectionRange replaceTextRange
void install Default Content text Change Listener new Text Change Listener public void text Changing Text Changing Event event handle Text Changing event  installDefaultContent textChangeListener TextChangeListener textChanging TextChangingEvent handleTextChanging
handle Text Changing event public void text Changed Text Changed Event event handle Text Changed event  handleTextChanging textChanged TextChangedEvent handleTextChanged
handle Text Changed event public void text Set Text Changed Event event handle Text Set event  handleTextChanged textSet TextChangedEvent handleTextSet
Creates content change listeners and set the default content model void install Default Content text Change Listener new Text Change Listener public void text Changing Text Changing Event event handle Text Changing event public void text Changed Text Changed Event event handle Text Changed event public void text Set Text Changed Event event handle Text Set event logical Content content new Default Content content add Text Change Listener text Change Listener  installDefaultContent textChangeListener TextChangeListener textChanging TextChangingEvent handleTextChanging textChanged TextChangedEvent handleTextChanged textSet TextChangedEvent handleTextSet logicalContent DefaultContent addTextChangeListener textChangeListener
Creates a default line style listener Used to store line background colors and styles Removed when the user sets a Line Style Listener p see add Line Style Listener void install Default Line Styler default Line Styler new Default Line Styler logical Content Styled Text Listener typed Listener new Styled Text Listener default Line Styler if user Line Style false add Listener Line Get Style typed Listener if user Line Background false add Listener Line Get Background typed Listener  LineStyleListener addLineStyleListener installDefaultLineStyler defaultLineStyler DefaultLineStyler logicalContent StyledTextListener typedListener StyledTextListener defaultLineStyler userLineStyle addListener LineGetStyle typedListener userLineBackground addListener LineGetBackground typedListener
listener new Listener public void handle Event Event event switch event type case SWT Dispose handle Dispose event break case SWT Key Down handle Key Down event break case SWT Mouse Down handle Mouse Down event break case SWT Mouse Up handle Mouse Up event break case SWT Mouse Double Click handle Mouse Double Click event break case SWT Mouse Move handle Mouse Move event break case SWT Paint handle Paint event break case SWT Resize handle Resize event break case SWT Traverse handle Traverse event break  handleEvent handleDispose KeyDown handleKeyDown MouseDown handleMouseDown MouseUp handleMouseUp MouseDoubleClick handleMouseDoubleClick MouseMove handleMouseMove handlePaint handleResize handleTraverse
if vertical Bar null vertical Bar add Listener SWT Selection new Listener public void handle Event Event event handle Vertical Scroll event  verticalBar verticalBar addListener handleEvent handleVerticalScroll
if horizontal Bar null horizontal Bar add Listener SWT Selection new Listener public void handle Event Event event handle Horizontal Scroll event  horizontalBar horizontalBar addListener handleEvent handleHorizontalScroll
Adds event listeners void install Listeners Scroll Bar vertical Bar get Vertical Bar Scroll Bar horizontal Bar get Horizontal Bar listener new Listener public void handle Event Event event switch event type case SWT Dispose handle Dispose event break case SWT Key Down handle Key Down event break case SWT Mouse Down handle Mouse Down event break case SWT Mouse Up handle Mouse Up event break case SWT Mouse Double Click handle Mouse Double Click event break case SWT Mouse Move handle Mouse Move event break case SWT Paint handle Paint event break case SWT Resize handle Resize event break case SWT Traverse handle Traverse event break add Listener SWT Dispose listener add Listener SWT Key Down listener add Listener SWT Mouse Down listener add Listener SWT Mouse Up listener add Listener SWT Mouse Double Click listener add Listener SWT Mouse Move listener add Listener SWT Paint listener add Listener SWT Resize listener add Listener SWT Traverse listener if vertical Bar null vertical Bar add Listener SWT Selection new Listener public void handle Event Event event handle Vertical Scroll event if horizontal Bar null horizontal Bar add Listener SWT Selection new Listener public void handle Event Event event handle Horizontal Scroll event  installListeners ScrollBar verticalBar getVerticalBar ScrollBar horizontalBar getHorizontalBar handleEvent handleDispose KeyDown handleKeyDown MouseDown handleMouseDown MouseUp handleMouseUp MouseDoubleClick handleMouseDoubleClick MouseMove handleMouseMove handlePaint handleResize handleTraverse addListener addListener KeyDown addListener MouseDown addListener MouseUp addListener MouseDoubleClick addListener MouseMove addListener addListener addListener verticalBar verticalBar addListener handleEvent handleVerticalScroll horizontalBar horizontalBar addListener handleEvent handleHorizontalScroll
Styled Text Content internal Get Content return content  StyledTextContent internalGetContent
return content int internal Get Horizontal Pixel return horizontal Scroll Offset  internalGetHorizontalPixel horizontalScrollOffset
return horizontal Scroll Offset Line Cache internal Get Line Cache return line Cache  horizontalScrollOffset LineCache internalGetLineCache lineCache
return line Cache Point internal Get Selection return selection  lineCache internalGetSelection
return selection boolean internal Get Word Wrap return word Wrap  internalGetWordWrap wordWrap
Used by Word Wrap Cache to bypass Styled Text redraw which does an unwanted cache reset void internal Redraw super redraw  WordWrapCache StyledText internalRedraw
Redraws the specified text range p param start offset of the first character to redraw param length number of characters to redraw param clear Background true if the background should be cleared as part of the redraw operation If true the entire redraw range will be cleared before anything is redrawn If the redraw range includes the last character of a line i e the entire line is redrawn the line is cleared all the way to the right border of the widget The redraw operation will be faster and smoother if clear Background is set to false Whether or not the flag can be set to false depends on the type of change that has taken place If font styles or background colors for the redraw range have changed clear Background should be set to true If only foreground colors have changed for the redraw range clear Background can be set to false void internal Redraw Range int start int length boolean clear Background int end start length int first Line content get Line At Offset start int last Line content get Line At Offset end int offset In First Line int partial Bottom Index get Partial Bottom Index int partial Top Index vertical Scroll Offset line Height do nothing if redraw range is completely invisible if first Line partial Bottom Index last Line partial Top Index return only redraw visible lines if partial Top Index first Line first Line partial Top Index offset In First Line 0 else offset In First Line start content get Offset At Line first Line if partial Bottom Index 1 last Line last Line partial Bottom Index 1 1 to redraw whole bottom line including line break end content get Offset At Line last Line redraw Lines first Line offset In First Line last Line end clear Background redraw entire center lines if redraw range includes more than two lines if last Line first Line 1 Rectangle client Area get Client Area int redraw StopY last Line line Height vertical Scroll Offset int redrawY first Line 1 line Height vertical Scroll Offset draw 0 redrawY client Area width redraw StopY redrawY clear Background  clearBackground clearBackground clearBackground clearBackground internalRedrawRange clearBackground firstLine getLineAtOffset lastLine getLineAtOffset offsetInFirstLine partialBottomIndex getPartialBottomIndex partialTopIndex verticalScrollOffset lineHeight firstLine partialBottomIndex lastLine partialTopIndex partialTopIndex firstLine firstLine partialTopIndex offsetInFirstLine offsetInFirstLine getOffsetAtLine firstLine partialBottomIndex lastLine lastLine partialBottomIndex getOffsetAtLine lastLine redrawLines firstLine offsetInFirstLine lastLine clearBackground lastLine firstLine clientArea getClientArea redrawStopY lastLine lineHeight verticalScrollOffset firstLine lineHeight verticalScrollOffset clientArea redrawStopY clearBackground
Returns the widget text with style information encoded using RTF format specification version 1 5 return the widget text with style information encoded using RTF format 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 String get Rtf check Widget RTF Writer rtf Writer new RTF Writer 0 get Char Count return get Platform Delimited Text rtf Writer  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getRtf checkWidget RTFWriter rtfWriter RTFWriter getCharCount getPlatformDelimitedText rtfWriter
Frees resources void handle Dispose Event event remove Listener SWT Dispose listener notify Listeners SWT Dispose event event type SWT None clipboard dispose ibeam Cursor dispose if renderer null renderer dispose renderer null if content null content remove Text Change Listener text Change Listener content null if default Caret null default Caret dispose default Caret null if left Caret Bitmap null left Caret Bitmap dispose left Caret Bitmap null if right Caret Bitmap null right Caret Bitmap dispose right Caret Bitmap null if default Line Styler null default Line Styler release default Line Styler null if is Bidi Bidi Util remove Language Listener handle selection Background null selection Foreground null logical Content null text Change Listener null line Cache null ibeam Cursor null selection null double Click Selection null key Action Map null background null foreground null clipboard null  handleDispose removeListener notifyListeners ibeamCursor removeTextChangeListener textChangeListener defaultCaret defaultCaret defaultCaret leftCaretBitmap leftCaretBitmap leftCaretBitmap rightCaretBitmap rightCaretBitmap rightCaretBitmap defaultLineStyler defaultLineStyler defaultLineStyler isBidi BidiUtil removeLanguageListener selectionBackground selectionForeground logicalContent textChangeListener lineCache ibeamCursor doubleClickSelection keyActionMap
Scrolls the widget horizontally void handle Horizontal Scroll Event event int scroll Pixel get Horizontal Bar get Selection horizontal Scroll Offset scroll Horizontal scroll Pixel  handleHorizontalScroll scrollPixel getHorizontalBar getSelection horizontalScrollOffset scrollHorizontal scrollPixel
If an action has been registered for the key stroke execute the action Otherwise if a character has been entered treat it as new content p param event keyboard event void handle Key Event event int action advancing true if event key Code 0 special key pressed e g F1 action get Key Binding event key Code event state Mask else character key pressed action get Key Binding event character event state Mask if action SWT NULL see if we have a control character if event state Mask SWT CTRL 0 event character 0 event character 31 get the character from the CTRL char sequence the control key subtracts 64 from the value of the key that it modifies int c event character 64 action get Key Binding c event state Mask if action SWT NULL boolean ignore false if IS CARBON Ignore acclerator key combinations we do not want to insert a character in the text in this instance Do not ignore COMMAND ALT combinations since that key sequence produces characters on the mac ignore event state Mask SWT COMMAND 0 event state Mask SWT COMMAND SWT SHIFT 0 else Ignore acclerator key combinations we do not want to insert a character in the text in this instance Don t ignore CTRL ALT combinations since that is the Alt Gr key on some keyboards See bug 20953 ignore event state Mask SWT ALT 0 event state Mask SWT CTRL 0 event state Mask SWT ALT SWT SHIFT 0 event state Mask SWT CTRL SWT SHIFT 0 ignore anything below SPACE except for line delimiter keys and tab ignore DEL if ignore event character 31 event character SWT DEL event character SWT CR event character SWT LF event character TAB do Content event character else invoke Action action  handleKey keyCode getKeyBinding keyCode stateMask getKeyBinding stateMask stateMask getKeyBinding stateMask IS_CARBON stateMask stateMask stateMask stateMask stateMask stateMask doContent invokeAction
If a Verify Key listener exists verify that the key that was entered should be processed p param event keyboard event void handle Key Down Event event Event verify Event new Event verify Event character event character verify Event key Code event key Code verify Event state Mask event state Mask verify Event doit true notify Listeners Verify Key verify Event if verify Event doit true handle Key event  VerifyKey handleKeyDown verifyEvent verifyEvent verifyEvent keyCode keyCode verifyEvent stateMask stateMask verifyEvent notifyListeners VerifyKey verifyEvent verifyEvent handleKey
Updates the caret location and selection if mouse button 1 has been pressed void handle Mouse Double Click Event event if event button 1 double Click Enabled false return event y top Margin mouse Double Click true caret Offset get Word Start caret Offset reset Selection caret Offset get Word End No Spaces caret Offset show Caret do Mouse Selection double Click Selection new Point selection x selection y  handleMouseDoubleClick doubleClickEnabled topMargin mouseDoubleClick caretOffset getWordStart caretOffset resetSelection caretOffset getWordEndNoSpaces caretOffset showCaret doMouseSelection doubleClickSelection
Updates the caret location and selection if mouse button 1 has been pressed void handle Mouse Down Event event mouse Double Click false if event button 1 IS CARBON event state Mask SWT MOD4 0 return boolean select event state Mask SWT MOD2 0 event y top Margin do Mouse Location Change event x event y select  handleMouseDown mouseDoubleClick IS_CARBON stateMask stateMask topMargin doMouseLocationChange
Updates the caret location and selection if mouse button 1 is pressed during the mouse move void handle Mouse Move Event event if event state Mask SWT BUTTON1 0 return event y top Margin do Mouse Location Change event x event y true do Auto Scroll event  handleMouseMove stateMask topMargin doMouseLocationChange doAutoScroll
Autoscrolling ends when the mouse button is released void handle Mouse Up Event event mouse Double Click false event y top Margin end Auto Scroll  handleMouseUp mouseDoubleClick topMargin endAutoScroll
Renders the invalidated area specified in the paint event p param event paint event void handle Paint Event event int start Line Math max 0 event y top Margin vertical Scroll Offset line Height int paintY From Top Line start Line top Index line Height int top Line Offset top Index line Height vertical Scroll Offset int startY paintY From Top Line top Line Offset top Margin adjust y position for pixel based scrolling and top margin int render Height event y event height startY Check if there is work to do if event height 0 return perform Paint event gc start Line startY render Height  handlePaint startLine topMargin verticalScrollOffset lineHeight paintYFromTopLine startLine topIndex lineHeight topLineOffset topIndex lineHeight verticalScrollOffset paintYFromTopLine topLineOffset topMargin renderHeight performPaint startLine renderHeight
Recalculates the scroll bars Rewraps all lines when in word wrap mode p param event resize event void handle Resize Event event int old Height client Area Height int old Width client Area Width Rectangle client Area get Client Area client Area Height client Area height client Area Width client Area width Redraw the old or new right bottom margin if needed if old Width client Area Width if right Margin 0 int x old Width client Area Width old Width client Area Width right Margin redraw x 0 right Margin old Height false if old Height client Area Height if bottom Margin 0 int y old Height client Area Height old Height client Area Height bottom Margin redraw 0 y old Width bottom Margin false if word Wrap if old Width client Area Width word Wrap Resize old Width else if client Area Height old Height int line Count content get Line Count int old Bottom Index top Index old Height line Height int new Item Count Compatibility ceil client Area Height old Height line Height old Bottom Index Math min old Bottom Index line Count new Item Count Math min new Item Count line Count old Bottom Index line Cache calculate old Bottom Index new Item Count set Scroll Bars claim Bottom Free Space claim Right Free Space if old Height client Area Height calculate Top Index  handleResize oldHeight clientAreaHeight oldWidth clientAreaWidth clientArea getClientArea clientAreaHeight clientArea clientAreaWidth clientArea oldWidth clientAreaWidth rightMargin oldWidth clientAreaWidth oldWidth clientAreaWidth rightMargin rightMargin oldHeight oldHeight clientAreaHeight bottomMargin oldHeight clientAreaHeight oldHeight clientAreaHeight bottomMargin oldWidth bottomMargin wordWrap oldWidth clientAreaWidth wordWrapResize oldWidth clientAreaHeight oldHeight lineCount getLineCount oldBottomIndex topIndex oldHeight lineHeight newItemCount clientAreaHeight oldHeight lineHeight oldBottomIndex oldBottomIndex lineCount newItemCount newItemCount lineCount oldBottomIndex lineCache oldBottomIndex newItemCount setScrollBars claimBottomFreeSpace claimRightFreeSpace oldHeight clientAreaHeight calculateTopIndex
Updates the caret position and selection and the scroll bars to reflect the content change p void handle Text Changed Text Changed Event event line Cache text Changed last Text Change Start last Text Change New Line Count last Text Change Replace Line Count last Text Change New Char Count last Text Change Replace Char Count set Scroll Bars update selection caret location after styles have been changed otherwise any text measuring could be incorrect also this needs to be done after all scrolling Otherwise selection redraw would be flushed during scroll which is wrong in some cases new text would be drawn in scroll source area even though the intent is to scroll it fixes 1GB93QT update Selection last Text Change Start last Text Change Replace Char Count last Text Change New Char Count if last Text Change Replace Line Count 0 Only check for unused space when lines are deleted Fixes 1GFL4LY Scroll up so that empty lines below last text line are used Fixes 1GEYJM0 claim Bottom Free Space if last Text Change Replace Char Count 0 fixes bug 8273 claim Right Free Space do direct drawing if the text change is confined to a single line optimization and fixes bug 13999 see also handle Text Changing if last Text Change New Line Count 0 last Text Change Replace Line Count 0 int start Line content get Line At Offset last Text Change Start int startY start Line line Height vertical Scroll Offset top Margin if DOUBLE BUFFERED GC gc getGC Caret caret get Caret boolean caret Visible false if caret null caret Visible caret get Visible caret set Visible false perform Paint gc start Line startY line Height if caret null caret set Visible caret Visible gc dispose else redraw 0 startY get Client Area width line Height false update  handleTextChanged TextChangedEvent lineCache textChanged lastTextChangeStart lastTextChangeNewLineCount lastTextChangeReplaceLineCount lastTextChangeNewCharCount lastTextChangeReplaceCharCount setScrollBars updateSelection lastTextChangeStart lastTextChangeReplaceCharCount lastTextChangeNewCharCount lastTextChangeReplaceLineCount claimBottomFreeSpace lastTextChangeReplaceCharCount claimRightFreeSpace handleTextChanging lastTextChangeNewLineCount lastTextChangeReplaceLineCount startLine getLineAtOffset lastTextChangeStart startLine lineHeight verticalScrollOffset topMargin DOUBLE_BUFFERED getCaret caretVisible caretVisible getVisible setVisible performPaint startLine lineHeight setVisible caretVisible getClientArea lineHeight
Updates the screen to reflect a pending content change p param event start the start offset of the change param event new Text text that is going to be inserted or empty String if no text will be inserted param event replace Char Count length of text that is going to be replaced param event new Char Count length of text that is going to be inserted param event replace Line Count number of lines that are going to be replaced param event new Line Count number of new lines that are going to be inserted void handle Text Changing Text Changing Event event int first Line int text ChangeY boolean is Multi Line Change event replace Line Count 0 event new Line Count 0 if event replace Char Count 0 event start event replace Char Count event replace Char Count 1 last Text Change Start event start last Text Change New Line Count event new Line Count last Text Change New Char Count event new Char Count last Text Change Replace Line Count event replace Line Count last Text Change Replace Char Count event replace Char Count first Line content get Line At Offset event start text ChangeY first Line line Height vertical Scroll Offset top Margin if is Multi Line Change redraw Multi Line Change text ChangeY event new Line Count event replace Line Count notify default line styler about text change if default Line Styler null default Line Styler text Changing event Update the caret offset if it is greater than the length of the content This is necessary since style range API may be called between the handle Text Changing and handle Text Changed events and this API sets the caret Offset int new End Of Text content get Char Count event replace Char Count event new Char Count if caret Offset new End Of Text caret Offset new End Of Text  newText replaceCharCount newCharCount replaceLineCount newLineCount handleTextChanging TextChangingEvent firstLine textChangeY isMultiLineChange replaceLineCount newLineCount replaceCharCount replaceCharCount replaceCharCount lastTextChangeStart lastTextChangeNewLineCount newLineCount lastTextChangeNewCharCount newCharCount lastTextChangeReplaceLineCount replaceLineCount lastTextChangeReplaceCharCount replaceCharCount firstLine getLineAtOffset textChangeY firstLine lineHeight verticalScrollOffset topMargin isMultiLineChange redrawMultiLineChange textChangeY newLineCount replaceLineCount defaultLineStyler defaultLineStyler textChanging handleTextChanging handleTextChanged caretOffset newEndOfText getCharCount replaceCharCount newCharCount caretOffset newEndOfText caretOffset newEndOfText
Called when the widget content is set programatically overwriting the old content Resets the caret position selection and scroll offsets Recalculates the content width and scroll bars Redraws the widget p param event text change event void handle Text Set Text Changed Event event reset  handleTextSet TextChangedEvent
Called when a traversal key is pressed Allow tab next traversal to occur when the widget is in single line mode or in multi line and non editable mode When in editable multi line mode we want to prevent the tab traversal and receive the tab key event instead p param event the event void handle Traverse Event event switch event detail case SWT TRAVERSE ESCAPE case SWT TRAVERSE PAGE NEXT case SWT TRAVERSE PAGE PREVIOUS event doit true break case SWT TRAVERSE RETURN case SWT TRAVERSE TAB NEXT case SWT TRAVERSE TAB PREVIOUS if get Style SWT SINGLE 0 event doit true else if editable event state Mask SWT MODIFIER MASK 0 event doit true break  handleTraverse TRAVERSE_ESCAPE TRAVERSE_PAGE_NEXT TRAVERSE_PAGE_PREVIOUS TRAVERSE_RETURN TRAVERSE_TAB_NEXT TRAVERSE_TAB_PREVIOUS getStyle stateMask MODIFIER_MASK
Scrolls the widget vertically void handle Vertical Scroll Event event set Vertical Scroll Offset get Vertical Bar get Selection false  handleVerticalScroll setVerticalScrollOffset getVerticalBar getSelection
final Accessible accessible get Accessible accessible add Accessible Listener new Accessible Adapter public void get Help Accessible Event e e result get Tool Tip Text  getAccessible addAccessibleListener AccessibleAdapter getHelp AccessibleEvent getToolTipText
accessible add Accessible Text Listener new Accessible Text Adapter public void get Caret Offset Accessible Text Event e e offset Styled Text this get Caret Offset  addAccessibleTextListener AccessibleTextAdapter getCaretOffset AccessibleTextEvent StyledText getCaretOffset
public void get Selection Range Accessible Text Event e Point selection Styled Text this get Selection Range e offset selection x e length selection y  getSelectionRange AccessibleTextEvent StyledText getSelectionRange
accessible add Accessible Control Listener new Accessible Control Adapter public void get Role Accessible Control Event e e detail ACC ROLE TEXT  addAccessibleControlListener AccessibleControlAdapter getRole AccessibleControlEvent ROLE_TEXT
public void get State Accessible Control Event e int state 0 if is Enabled state ACC STATE FOCUSABLE if is Focus Control state ACC STATE FOCUSED if is Visible false state ACC STATE INVISIBLE if get Editable false state ACC STATE READONLY e detail state  getState AccessibleControlEvent isEnabled STATE_FOCUSABLE isFocusControl STATE_FOCUSED isVisible STATE_INVISIBLE getEditable STATE_READONLY
e detail state public void get Value Accessible Control Event e e result Styled Text this get Text  getValue AccessibleControlEvent StyledText getText
add Listener SWT Focus In new Listener public void handle Event Event event accessible set Focus ACC CHILDID SELF  addListener FocusIn handleEvent setFocus CHILDID_SELF
Add accessibility support for the widget void initialize Accessible final Accessible accessible get Accessible accessible add Accessible Listener new Accessible Adapter public void get Help Accessible Event e e result get Tool Tip Text accessible add Accessible Text Listener new Accessible Text Adapter public void get Caret Offset Accessible Text Event e e offset Styled Text this get Caret Offset public void get Selection Range Accessible Text Event e Point selection Styled Text this get Selection Range e offset selection x e length selection y accessible add Accessible Control Listener new Accessible Control Adapter public void get Role Accessible Control Event e e detail ACC ROLE TEXT public void get State Accessible Control Event e int state 0 if is Enabled state ACC STATE FOCUSABLE if is Focus Control state ACC STATE FOCUSED if is Visible false state ACC STATE INVISIBLE if get Editable false state ACC STATE READONLY e detail state public void get Value Accessible Control Event e e result Styled Text this get Text add Listener SWT Focus In new Listener public void handle Event Event event accessible set Focus ACC CHILDID SELF  initializeAccessible getAccessible addAccessibleListener AccessibleAdapter getHelp AccessibleEvent getToolTipText addAccessibleTextListener AccessibleTextAdapter getCaretOffset AccessibleTextEvent StyledText getCaretOffset getSelectionRange AccessibleTextEvent StyledText getSelectionRange addAccessibleControlListener AccessibleControlAdapter getRole AccessibleControlEvent ROLE_TEXT getState AccessibleControlEvent isEnabled STATE_FOCUSABLE isFocusControl STATE_FOCUSED isVisible STATE_INVISIBLE getEditable STATE_READONLY getValue AccessibleControlEvent StyledText getText addListener FocusIn handleEvent setFocus CHILDID_SELF
Initializes the fonts used to render font styles Presently only regular and bold fonts are supported void initialize Renderer if renderer null renderer dispose renderer new Display Renderer get Display get Font this tab Length line Height renderer get Line Height if word Wrap content new Wrapped Content renderer logical Content  initializeRenderer DisplayRenderer getDisplay getFont tabLength lineHeight getLineHeight wordWrap WrappedContent logicalContent
Executes the action p param action one of the actions defined in ST java public void invoke Action int action int old ColumnX oldH Scroll Offset h Scroll Change int caret Line check Widget update Caret Direction true switch action Navigation case ST LINE UP caret Line do Line Up old ColumnX columnX oldH Scroll Offset horizontal Scroll Offset explicitly go to the calculated caret line may be different from content get Line At Offset caret Offset when in word wrap mode show Caret caret Line restore the original horizontal caret position h Scroll Change oldH Scroll Offset horizontal Scroll Offset columnX old ColumnX h Scroll Change clear Selection true break case ST LINE DOWN caret Line do Line Down old ColumnX columnX oldH Scroll Offset horizontal Scroll Offset explicitly go to the calculated caret line may be different from content get Line At Offset caret Offset when in word wrap mode show Caret caret Line restore the original horizontal caret position h Scroll Change oldH Scroll Offset horizontal Scroll Offset columnX old ColumnX h Scroll Change clear Selection true break case ST LINE START do Line Start clear Selection true break case ST LINE END do Line End clear Selection true break case ST COLUMN PREVIOUS do Cursor Previous clear Selection true break case ST COLUMN NEXT do Cursor Next clear Selection true break case ST PAGE UP do Page Up clear Selection true break case ST PAGE DOWN do Page Down false clear Selection true break case ST WORD PREVIOUS do Word Previous clear Selection true break case ST WORD NEXT do Word Next clear Selection true break case ST TEXT START do Content Start clear Selection true break case ST TEXT END do Content End clear Selection true break case ST WINDOW START do Page Start clear Selection true break case ST WINDOW END do Page End clear Selection true break Selection case ST SELECT LINE UP do Selection Line Up break case ST SELECT LINE DOWN do Selection Line Down break case ST SELECT LINE START do Line Start do Selection ST COLUMN PREVIOUS break case ST SELECT LINE END do Line End do Selection ST COLUMN NEXT break case ST SELECT COLUMN PREVIOUS do Selection Cursor Previous do Selection ST COLUMN PREVIOUS break case ST SELECT COLUMN NEXT do Selection Cursor Next do Selection ST COLUMN NEXT break case ST SELECT PAGE UP do Selection Page Up do Selection ST COLUMN PREVIOUS break case ST SELECT PAGE DOWN do Selection Page Down break case ST SELECT WORD PREVIOUS do Selection Word Previous do Selection ST COLUMN PREVIOUS break case ST SELECT WORD NEXT do Selection Word Next do Selection ST COLUMN NEXT break case ST SELECT TEXT START do Content Start do Selection ST COLUMN PREVIOUS break case ST SELECT TEXT END do Content End do Selection ST COLUMN NEXT break case ST SELECT WINDOW START do Page Start do Selection ST COLUMN PREVIOUS break case ST SELECT WINDOW END do Page End do Selection ST COLUMN NEXT break Modification case ST CUT cut break case ST COPY copy break case ST PASTE paste break case ST DELETE PREVIOUS do Backspace break case ST DELETE NEXT do Delete break case ST DELETE WORD PREVIOUS do Delete Word Previous break case ST DELETE WORD NEXT do Delete Word Next break Miscellaneous case ST TOGGLE OVERWRITE overwrite overwrite toggle insert overwrite mode break  invokeAction oldColumnX oldHScrollOffset hScrollChange caretLine checkWidget updateCaretDirection LINE_UP caretLine doLineUp oldColumnX oldHScrollOffset horizontalScrollOffset getLineAtOffset caretOffset showCaret caretLine hScrollChange oldHScrollOffset horizontalScrollOffset oldColumnX hScrollChange clearSelection LINE_DOWN caretLine doLineDown oldColumnX oldHScrollOffset horizontalScrollOffset getLineAtOffset caretOffset showCaret caretLine hScrollChange oldHScrollOffset horizontalScrollOffset oldColumnX hScrollChange clearSelection LINE_START doLineStart clearSelection LINE_END doLineEnd clearSelection COLUMN_PREVIOUS doCursorPrevious clearSelection COLUMN_NEXT doCursorNext clearSelection PAGE_UP doPageUp clearSelection PAGE_DOWN doPageDown clearSelection WORD_PREVIOUS doWordPrevious clearSelection WORD_NEXT doWordNext clearSelection TEXT_START doContentStart clearSelection TEXT_END doContentEnd clearSelection WINDOW_START doPageStart clearSelection WINDOW_END doPageEnd clearSelection SELECT_LINE_UP doSelectionLineUp SELECT_LINE_DOWN doSelectionLineDown SELECT_LINE_START doLineStart doSelection COLUMN_PREVIOUS SELECT_LINE_END doLineEnd doSelection COLUMN_NEXT SELECT_COLUMN_PREVIOUS doSelectionCursorPrevious doSelection COLUMN_PREVIOUS SELECT_COLUMN_NEXT doSelectionCursorNext doSelection COLUMN_NEXT SELECT_PAGE_UP doSelectionPageUp doSelection COLUMN_PREVIOUS SELECT_PAGE_DOWN doSelectionPageDown SELECT_WORD_PREVIOUS doSelectionWordPrevious doSelection COLUMN_PREVIOUS SELECT_WORD_NEXT doSelectionWordNext doSelection COLUMN_NEXT SELECT_TEXT_START doContentStart doSelection COLUMN_PREVIOUS SELECT_TEXT_END doContentEnd doSelection COLUMN_NEXT SELECT_WINDOW_START doPageStart doSelection COLUMN_PREVIOUS SELECT_WINDOW_END doPageEnd doSelection COLUMN_NEXT DELETE_PREVIOUS doBackspace DELETE_NEXT doDelete DELETE_WORD_PREVIOUS doDeleteWordPrevious DELETE_WORD_NEXT doDeleteWordNext TOGGLE_OVERWRITE
Temporary until SWT provides this boolean is Bidi return is Bidi  isBidi isBidi
Returns whether the given offset is inside a multi byte line delimiter Example Line1 r n is Line Delimiter 5 false but is Line Delimiter 6 true return true if the given offset is inside a multi byte line delimiter false if the given offset is before or after a line delimiter boolean is Line Delimiter int offset int line content get Line At Offset offset int line Offset content get Offset At Line line int offset In Line offset line Offset offset In Line will be greater than line length if the line delimiter is longer than one character and the offset is set in between parts of the line delimiter return offset In Line content get Line line length  isLineDelimiter isLineDelimiter isLineDelimiter getLineAtOffset lineOffset getOffsetAtLine offsetInLine lineOffset offsetInLine offsetInLine getLine
Returns whether the widget is mirrored right oriented right to left writing order return is Mirrored true the widget is right oriented false the widget is left oriented boolean is Mirrored return is Mirrored  isMirrored isMirrored isMirrored
Returns whether or not the given lines are visible p return true if any of the lines is visible false if none of the lines is visible boolean is Area Visible int first Line int last Line int partial Bottom Index get Partial Bottom Index int partial Top Index vertical Scroll Offset line Height boolean not Visible first Line partial Bottom Index last Line partial Top Index return not Visible  isAreaVisible firstLine lastLine partialBottomIndex getPartialBottomIndex partialTopIndex verticalScrollOffset lineHeight notVisible firstLine partialBottomIndex lastLine partialTopIndex notVisible
Returns whether the widget can have only one line p return true if widget can have only one line false if widget can have multiple lines boolean is Single Line return get Style SWT SINGLE 0  isSingleLine getStyle
Sends the specified verify event replace insert text as defined by the event and send a modify event p param event the text change event ul li event start the replace start offset li li event end the replace end offset li li event text the new text li ul param update Caret whether or not he caret should be set behind the new text void modify Content Event event boolean update Caret event doit true notify Listeners SWT Verify event if event doit Styled Text Event styled Text Event null int replaced Length event end event start if is Listening Extended Modify styled Text Event new Styled Text Event logical Content styled Text Event start event start styled Text Event end event start event text length styled Text Event text content get Text Range event start replaced Length if update Caret Fix advancing flag for delete backspace key on direction boundary if event text length 0 int line Index content get Line At Offset event start int line Offset content get Offset At Line line Index String line Text content get Line line Index Text Layout layout renderer get Text Layout line Text line Offset int level Start layout get Level event start line Offset int line Index End content get Line At Offset event end if line Index line Index End renderer dispose Text Layout layout line Offset content get Offset At Line line Index End line Text content get Line line Index End layout renderer get Text Layout line Text line Offset int level End layout get Level event end line Offset renderer dispose Text Layout layout advancing level Start level End content replace Text Range event start replaced Length event text set the caret position prior to sending the modify event fixes 1GBB8NJ if update Caret always update the caret location fixes 1G8FODP internal Set Selection event start event text length 0 true show Caret send Modify Event event if is Listening Extended Modify notify Listeners Extended Modify styled Text Event  updateCaret modifyContent updateCaret notifyListeners StyledTextEvent styledTextEvent replacedLength isListening ExtendedModify styledTextEvent StyledTextEvent logicalContent styledTextEvent styledTextEvent styledTextEvent getTextRange replacedLength updateCaret lineIndex getLineAtOffset lineOffset getOffsetAtLine lineIndex lineText getLine lineIndex TextLayout getTextLayout lineText lineOffset levelStart getLevel lineOffset lineIndexEnd getLineAtOffset lineIndex lineIndexEnd disposeTextLayout lineOffset getOffsetAtLine lineIndexEnd lineText getLine lineIndexEnd getTextLayout lineText lineOffset levelEnd getLevel lineOffset disposeTextLayout levelStart levelEnd replaceTextRange replacedLength updateCaret internalSetSelection showCaret sendModifyEvent isListening ExtendedModify notifyListeners ExtendedModify styledTextEvent
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 check Widget Text Transfer transfer Text Transfer get Instance String text text String clipboard get Contents transfer if text null text length 0 Event event new Event event start selection x event end selection y event text get Model Delimited Text text send Key Event event  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget TextTransfer TextTransfer getInstance getContents getModelDelimitedText sendKeyEvent
Render the specified area Broken out as its own method to support direct drawing p param gc GC to render on param start Line first line to render param startY y pixel location to start rendering at param render Height render Height widget area that needs to be filled with lines void perform Paint GC gc int start Line int startY int render Height Rectangle client Area get Client Area Color background get Background Check if there is work to do We never want to try and create an Image with 0 width or 0 height if client Area width 0 return if render Height 0 render Height will be negative when only top margin needs redrawing Color foreground get Foreground int line Count content get Line Count int gc Style is Mirrored SWT RIGHT TO LEFT SWT LEFT TO RIGHT if is Single Line line Count 1 int paintY paint Height Image line Buffer GC lineGC boolean double Buffer DOUBLE BUFFERED last Paint Top Index top Index last Paint Top Index top Index if double Buffer paintY 0 paint Height render Height line Buffer new Image get Display client Area width render Height lineGC new GC line Buffer gc Style lineGC set Font get Font lineGC set Foreground foreground lineGC set Background background else paintY startY paint Height startY render Height line Buffer null lineGC gc for int i start Line paintY paint Height i line Count i paintY line Height String line content get Line i renderer draw Line line i paintY lineGC background foreground true if paintY paint Height lineGC set Background background lineGC fill Rectangle 0 paintY client Area width paint Height paintY if double Buffer clear Margin lineGC background client Area startY gc draw Image line Buffer 0 startY lineGC dispose line Buffer dispose clear Margin gc background client Area 0  startLine renderHeight renderHeight performPaint startLine renderHeight clientArea getClientArea getBackground clientArea renderHeight renderHeight getForeground lineCount getLineCount gcStyle isMirrored RIGHT_TO_LEFT LEFT_TO_RIGHT isSingleLine lineCount paintHeight lineBuffer doubleBuffer DOUBLE_BUFFERED lastPaintTopIndex topIndex lastPaintTopIndex topIndex doubleBuffer paintHeight renderHeight lineBuffer getDisplay clientArea renderHeight lineBuffer gcStyle setFont getFont setForeground setBackground paintHeight renderHeight lineBuffer startLine paintHeight lineCount lineHeight getLine drawLine paintHeight setBackground fillRectangle clientArea paintHeight doubleBuffer clearMargin clientArea drawImage lineBuffer lineBuffer clearMargin clientArea
Prints the widget s text to the default printer 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 print check Widget Printer printer new Printer Styled Text Print Options options new Styled Text Print Options options print Text Foreground true options print Text Background true options print Text Font Style true options print Line Background true new Printing this printer options run printer dispose  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS checkWidget StyledTextPrintOptions StyledTextPrintOptions printTextForeground printTextBackground printTextFontStyle printLineBackground
Returns a runnable that will print the widget s text to the specified printer p The runnable may be run in a non UI thread p param printer the printer to print to 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when printer is null li ul public Runnable print Printer printer Styled Text Print Options options new Styled Text Print Options check Widget options print Text Foreground true options print Text Background true options print Text Font Style true options print Line Background true if printer null SWT error SWT ERROR NULL ARGUMENT return print printer options  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT StyledTextPrintOptions StyledTextPrintOptions checkWidget printTextForeground printTextBackground printTextFontStyle printLineBackground ERROR_NULL_ARGUMENT
Returns a runnable that will print the widget s text to the specified printer p The runnable may be run in a non UI thread p param printer the printer to print to param options print options to use during printing 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when printer or options is null li ul since 2 1 public Runnable print Printer printer Styled Text Print Options options check Widget if printer null options null SWT error SWT ERROR NULL ARGUMENT return new Printing this printer options  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT StyledTextPrintOptions checkWidget ERROR_NULL_ARGUMENT
Causes the entire bounds of the receiver to be marked as needing to be redrawn The next time a paint request is processed the control will be completely painted p Recalculates the content width for all lines in the bounds When a code Line Style Listener code is used a redraw call is the only notification to the widget that styles have changed and that the content width may have changed 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 see Control update public void redraw int item Count super redraw item Count get Partial Bottom Index top Index 1 line Cache redraw Reset top Index item Count true line Cache calculate top Index item Count set Horizontal Scroll Bar  LineStyleListener SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS itemCount itemCount getPartialBottomIndex topIndex lineCache redrawReset topIndex itemCount lineCache topIndex itemCount setHorizontalScrollBar
Causes the rectangular area of the receiver specified by the arguments to be marked as needing to be redrawn The next time a paint request is processed that area of the receiver will be painted If the code all code flag is code true code any children of the receiver which intersect with the specified area will also paint their intersecting areas If the code all code flag is code false code the children will not be painted p Marks the content width of all lines in the specified rectangle as unknown Recalculates the content width of all visible lines When a code Line Style Listener code is used a redraw call is the only notification to the widget that styles have changed and that the content width may have changed p param x the x coordinate of the area to draw param y the y coordinate of the area to draw param width the width of the area to draw param height the height of the area to draw param all code true code if children should redraw and code false code otherwise 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 Control update public void redraw int x int y int width int height boolean all super redraw x y width height all if height 0 int line Count content get Line Count int start Line get Top Pixel y line Height int end Line start Line Compatibility ceil height line Height int item Count reset all lines in the redraw rectangle start Line Math min start Line line Count item Count Math min end Line line Count start Line line Cache reset start Line item Count true only calculate the visible lines item Count get Partial Bottom Index top Index 1 line Cache calculate top Index item Count set Horizontal Scroll Bar  LineStyleListener SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS lineCount getLineCount startLine getTopPixel lineHeight endLine startLine lineHeight itemCount startLine startLine lineCount itemCount endLine lineCount startLine lineCache startLine itemCount itemCount getPartialBottomIndex topIndex lineCache topIndex itemCount setHorizontalScrollBar
Redraw the given line p param line index of the line to redraw param offset offset in line to start redrawing void redraw Line int line int offset int redrawX 0 if offset 0 String line Text content get Line line redrawX getX At Offset line Text line offset int redrawY line line Height vertical Scroll Offset super redraw redrawX left Margin redrawY top Margin get Client Area width left Margin right Margin line Height true  redrawLine lineText getLine getXAtOffset lineText lineHeight verticalScrollOffset leftMargin topMargin getClientArea leftMargin rightMargin lineHeight
Redraws a text range in the specified lines p param first Line first line to redraw at the specified offset param offset In First Line offset in first Line to start redrawing param last Line last line to redraw param end Offset offset in the last where redrawing should stop param clear Background true clear the background by invalidating the requested redraw range If the redraw range includes the last character of a line i e the entire line is redrawn the line is cleared all the way to the right border of the widget false draw the foreground directly without invalidating the redraw range void redraw Lines int first Line int offset In First Line int last Line int end Offset boolean clear Background String line content get Line first Line int line Count last Line first Line 1 int redrawY redraw Width int line Offset content get Offset At Line first Line boolean full Line Redraw Rectangle client Area get Client Area full Line Redraw get Style SWT FULL SELECTION 0 last Line first Line if redraw range includes last character on the first line clear background to right widget border fixes bug 19595 if clear Background end Offset line Offset line length full Line Redraw true Text Layout layout renderer get Text Layout line line Offset Rectangle rect layout get Bounds offset In First Line Math min end Offset line length 1 renderer dispose Text Layout layout rect x horizontal Scroll Offset rect intersect client Area redrawY first Line line Height vertical Scroll Offset redraw Width full Line Redraw client Area width left Margin right Margin rect width draw rect x redrawY redraw Width line Height clear Background redraw last line if more than one line needs redrawing if line Count 1 line Offset content get Offset At Line last Line int offset In Last Line end Offset line Offset no redraw necessary if redraw offset is 0 if offset In Last Line 0 line content get Line last Line if redraw range includes last character on the last line clear background to right widget border fixes bug 19595 if clear Background offset In Last Line line length full Line Redraw true line content get Line last Line layout renderer get Text Layout line line Offset rect layout get Bounds 0 offset In Last Line 1 renderer dispose Text Layout layout rect x horizontal Scroll Offset rect intersect client Area redrawY last Line line Height vertical Scroll Offset redraw Width full Line Redraw client Area width left Margin right Margin rect width draw rect x redrawY redraw Width line Height clear Background  firstLine offsetInFirstLine firstLine lastLine endOffset clearBackground redrawLines firstLine offsetInFirstLine lastLine endOffset clearBackground getLine firstLine lineCount lastLine firstLine redrawWidth lineOffset getOffsetAtLine firstLine fullLineRedraw clientArea getClientArea fullLineRedraw getStyle FULL_SELECTION lastLine firstLine clearBackground endOffset lineOffset fullLineRedraw TextLayout getTextLayout lineOffset getBounds offsetInFirstLine endOffset disposeTextLayout horizontalScrollOffset clientArea firstLine lineHeight verticalScrollOffset redrawWidth fullLineRedraw clientArea leftMargin rightMargin redrawWidth lineHeight clearBackground lineCount lineOffset getOffsetAtLine lastLine offsetInLastLine endOffset lineOffset offsetInLastLine getLine lastLine clearBackground offsetInLastLine fullLineRedraw getLine lastLine getTextLayout lineOffset getBounds offsetInLastLine disposeTextLayout horizontalScrollOffset clientArea lastLine lineHeight verticalScrollOffset redrawWidth fullLineRedraw clientArea leftMargin rightMargin redrawWidth lineHeight clearBackground
Fixes the widget to display a text change Bit blitting and redrawing is done as necessary p param y y location of the text change param new Line Count number of new lines param replaced Line Count number of replaced lines void redraw Multi Line Change int y int new Line Count int replaced Line Count Rectangle client Area get Client Area int line Count new Line Count replaced Line Count int sourceY int destinationY if line Count 0 sourceY Math max 0 y line Height destinationY sourceY line Count line Height else destinationY Math max 0 y line Height sourceY destinationY line Count line Height scroll 0 destinationY destination x y 0 sourceY source x y client Area width client Area height true Always redrawing causes the bottom line to flash when a line is deleted This is because SWT merges the paint area of the scroll with the paint area of the redraw call below To prevent this we could call update after the scroll However adding update can cause even more flash if the client does other redraw update calls ie for syntax highlighting We could also redraw only when a line has been added or when contents has been added to a line This would require getting line index info from the content and is not worth the trouble the flash is only on the bottom line and minor Specifying the NO MERGE PAINTS style bit prevents the merged redraw but could cause flash slowness elsewhere if y line Height 0 y client Area height redraw first changed line in case a line was split joined super redraw 0 y client Area width line Height true if new Line Count 0 int redraw StartY y line Height int redraw Height new Line Count line Height if redraw StartY redraw Height 0 redraw StartY client Area height display new text super redraw 0 redraw StartY client Area width redraw Height true  newLineCount replacedLineCount redrawMultiLineChange newLineCount replacedLineCount clientArea getClientArea lineCount newLineCount replacedLineCount lineCount lineHeight lineCount lineHeight lineHeight lineCount lineHeight clientArea clientArea NO_MERGE_PAINTS lineHeight clientArea clientArea lineHeight newLineCount redrawStartY lineHeight redrawHeight newLineCount lineHeight redrawStartY redrawHeight redrawStartY clientArea redrawStartY clientArea redrawHeight
Redraws the specified text range p param start offset of the first character to redraw param length number of characters to redraw param clear Background true if the background should be cleared as part of the redraw operation If true the entire redraw range will be cleared before anything is redrawn If the redraw range includes the last character of a line i e the entire line is redrawn the line is cleared all the way to the right border of the widget The redraw operation will be faster and smoother if clear Background is set to false Whether or not the flag can be set to false depends on the type of change that has taken place If font styles or background colors for the redraw range have changed clear Background should be set to true If only foreground colors have changed for the redraw range clear Background can be set to false 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 exception Illegal Argument Exception ul li ERROR INVALID RANGE when start and or end are outside the widget content li ul public void redraw Range int start int length boolean clear Background check Widget int end start length int content Length content get Char Count int first Line int last Line if start end start 0 end content Length SWT error SWT ERROR INVALID RANGE first Line content get Line At Offset start last Line content get Line At Offset end reset all affected lines but let the redraw recalculate only those that are visible line Cache reset first Line last Line first Line 1 true internal Redraw Range start length clear Background  clearBackground clearBackground clearBackground clearBackground SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_RANGE redrawRange clearBackground checkWidget contentLength getCharCount firstLine lastLine contentLength ERROR_INVALID_RANGE firstLine getLineAtOffset lastLine getLineAtOffset lineCache firstLine lastLine firstLine internalRedrawRange clearBackground
Removes the specified bidirectional segment listener p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul since 2 0 public void remove Bidi Segment Listener Bidi Segment Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT remove Listener Line Get Segments listener  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT removeBidiSegmentListener BidiSegmentListener checkWidget ERROR_NULL_ARGUMENT removeListener LineGetSegments
Removes the specified extended modify listener p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void remove Extended Modify Listener Extended Modify Listener extended Modify Listener check Widget if extended Modify Listener null SWT error SWT ERROR NULL ARGUMENT remove Listener Extended Modify extended Modify Listener  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT removeExtendedModifyListener ExtendedModifyListener extendedModifyListener checkWidget extendedModifyListener ERROR_NULL_ARGUMENT removeListener ExtendedModify extendedModifyListener
Removes the specified line background listener p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void remove Line Background Listener Line Background Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT remove Listener Line Get Background listener use default line styler if last user line styler was removed if is Listening Line Get Background false user Line Background Styled Text Listener typed Listener new Styled Text Listener default Line Styler add Listener Line Get Background typed Listener user Line Background false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT removeLineBackgroundListener LineBackgroundListener checkWidget ERROR_NULL_ARGUMENT removeListener LineGetBackground isListening LineGetBackground userLineBackground StyledTextListener typedListener StyledTextListener defaultLineStyler addListener LineGetBackground typedListener userLineBackground
Removes the specified line style listener p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void remove Line Style Listener Line Style Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT remove Listener Line Get Style listener use default line styler if last user line styler was removed Fixes 1G7B1X2 if is Listening Line Get Style false user Line Style Styled Text Listener typed Listener new Styled Text Listener default Line Styler add Listener Line Get Style typed Listener user Line Style false  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT removeLineStyleListener LineStyleListener checkWidget ERROR_NULL_ARGUMENT removeListener LineGetStyle isListening LineGetStyle userLineStyle StyledTextListener typedListener StyledTextListener defaultLineStyler addListener LineGetStyle typedListener userLineStyle
Removes the specified modify listener p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void remove Modify Listener Modify Listener modify Listener check Widget if modify Listener null SWT error SWT ERROR NULL ARGUMENT remove Listener SWT Modify modify Listener  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT removeModifyListener ModifyListener modifyListener checkWidget modifyListener ERROR_NULL_ARGUMENT removeListener modifyListener
Removes the specified selection listener p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void remove Selection Listener Selection Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT remove Listener SWT Selection listener  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT removeListener
Removes the specified verify listener p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void remove Verify Listener Verify Listener verify Listener check Widget if verify Listener null SWT error SWT ERROR NULL ARGUMENT remove Listener SWT Verify verify Listener  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT removeVerifyListener VerifyListener verifyListener checkWidget verifyListener ERROR_NULL_ARGUMENT removeListener verifyListener
Removes the specified key verify listener p param listener the listener 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void remove Verify Key Listener Verify Key Listener listener if listener null SWT error SWT ERROR NULL ARGUMENT remove Listener Verify Key listener  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT removeVerifyKeyListener VerifyKeyListener ERROR_NULL_ARGUMENT removeListener VerifyKey
Replaces the styles in the given range with new styles This method effectively deletes the styles in the given range and then adds the the new styles p Should not be called if a Line Style Listener has been set since the listener maintains the styles p param start offset of first character where styles will be deleted param length length of the range to delete styles in param ranges Style Range objects containing the new style information The ranges should not overlap and should be within the specified start and length The style rendering is undefined if the ranges do overlap or are ill defined Must not be null 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 exception Illegal Argument Exception ul li ERROR INVALID RANGE when either start or end is outside the valid range 0 offset get Char Count li li ERROR NULL ARGUMENT when string is null li ul since 2 0 public void replace Style Ranges int start int length Style Range ranges check Widget if user Line Style return if ranges null SWT error SWT ERROR NULL ARGUMENT if ranges length 0 set Style Range new Style Range start length null null return int end start length if start end start 0 end get Char Count SWT error SWT ERROR INVALID RANGE int first Line content get Line At Offset start int last Line content get Line At Offset end default Line Styler replace Style Ranges start length ranges line Cache reset first Line last Line first Line 1 true if the area is not visible there is no need to redraw if is Area Visible first Line last Line int redrawY first Line line Height vertical Scroll Offset int redraw StopY last Line 1 line Height vertical Scroll Offset draw 0 redrawY get Client Area width redraw StopY redrawY true make sure that the caret is positioned correctly caret location may change if font style changes fixes 1G8FODP set Caret Location  LineStyleListener StyleRange SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_RANGE getCharCount ERROR_NULL_ARGUMENT replaceStyleRanges StyleRange checkWidget userLineStyle ERROR_NULL_ARGUMENT setStyleRange StyleRange getCharCount ERROR_INVALID_RANGE firstLine getLineAtOffset lastLine getLineAtOffset defaultLineStyler replaceStyleRanges lineCache firstLine lastLine firstLine isAreaVisible firstLine lastLine firstLine lineHeight verticalScrollOffset redrawStopY lastLine lineHeight verticalScrollOffset getClientArea redrawStopY setCaretLocation
Replaces the given text range with new text If the widget has the SWT SINGLE style and text contains more than one line only the first line is rendered but the text is stored unchanged A subsequent call to get Text will return the same text that was set Note that only a single line of text should be set when the SWT SINGLE style is used p b NOTE b During the replace operation the current selection is changed as follows ul li selection before replaced text selection unchanged li selection after replaced text adjust the selection so that same text remains selected li selection intersects replaced text selection is cleared and caret is placed after inserted text ul p param start offset of first character to replace param length number of characters to replace Use 0 to insert text param text new text May be empty to delete text 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 exception Illegal Argument Exception ul li ERROR INVALID RANGE when either start or end is outside the valid range 0 offset get Char Count li li ERROR INVALID ARGUMENT when either start or end is inside a multi byte line delimiter Splitting a line delimiter for example by inserting text in between the CR and LF and deleting part of a line delimiter is not supported li li ERROR NULL ARGUMENT when string is null li ul public void replace Text Range int start int length String text check Widget int content Length get Char Count int end start length Event event new Event if start end start 0 end content Length SWT error SWT ERROR INVALID RANGE if text null SWT error SWT ERROR NULL ARGUMENT event start start event end end event text text modify Content event false  getText SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_RANGE getCharCount ERROR_INVALID_ARGUMENT ERROR_NULL_ARGUMENT replaceTextRange checkWidget contentLength getCharCount contentLength ERROR_INVALID_RANGE ERROR_NULL_ARGUMENT modifyContent
Resets the caret position selection and scroll offsets Recalculate the content width and scroll bars Redraw the widget void reset Scroll Bar vertical Bar get Vertical Bar Scroll Bar horizontal Bar get Horizontal Bar caret Offset 0 top Index 0 top Offset 0 vertical Scroll Offset 0 horizontal Scroll Offset 0 reset Selection discard any styles that may have been set by creating a new default line styler if default Line Styler null remove Line Background Listener default Line Styler remove Line Style Listener default Line Styler install Default Line Styler calculate Content Width if vertical Bar null vertical Bar set Selection 0 if horizontal Bar null horizontal Bar set Selection 0 set Scroll Bars set Caret Location super redraw  ScrollBar verticalBar getVerticalBar ScrollBar horizontalBar getHorizontalBar caretOffset topIndex topOffset verticalScrollOffset horizontalScrollOffset resetSelection defaultLineStyler removeLineBackgroundListener defaultLineStyler removeLineStyleListener defaultLineStyler installDefaultLineStyler calculateContentWidth verticalBar verticalBar setSelection horizontalBar horizontalBar setSelection setScrollBars setCaretLocation
Resets the selection void reset Selection selection x selection y caret Offset selection Anchor 1  resetSelection caretOffset selectionAnchor
Scrolls the widget horizontally p param pixels number of pixels to scroll 0 scroll left 0 scroll right void scroll Horizontal int pixels Rectangle client Area if pixels 0 return client Area get Client Area if pixels 0 int sourceX left Margin pixels int scroll Width client Area width sourceX right Margin int scroll Height client Area height top Margin bottom Margin scroll left Margin top Margin destination x y sourceX top Margin source x y scroll Width scroll Height true if sourceX scroll Width redraw from end of scrolled area to beginning of scroll invalidated area super redraw left Margin scroll Width top Margin pixels scroll Width scroll Height true else int destinationX left Margin pixels int scroll Width client Area width destinationX right Margin int scroll Height client Area height top Margin bottom Margin scroll destinationX top Margin destination x y left Margin top Margin source x y scroll Width scroll Height true if destinationX scroll Width redraw from end of scroll invalidated area to scroll destination super redraw left Margin scroll Width top Margin pixels scroll Width scroll Height true horizontal Scroll Offset pixels int old ColumnX columnX pixels set Caret Location restore the original horizontal caret index columnX old ColumnX  scrollHorizontal clientArea clientArea getClientArea leftMargin scrollWidth clientArea rightMargin scrollHeight clientArea topMargin bottomMargin leftMargin topMargin topMargin scrollWidth scrollHeight scrollWidth leftMargin scrollWidth topMargin scrollWidth scrollHeight leftMargin scrollWidth clientArea rightMargin scrollHeight clientArea topMargin bottomMargin topMargin leftMargin topMargin scrollWidth scrollHeight scrollWidth leftMargin scrollWidth topMargin scrollWidth scrollHeight horizontalScrollOffset oldColumnX setCaretLocation oldColumnX
Scrolls the widget horizontally and adjust the horizontal scroll bar to reflect the new horizontal offset p param pixels number of pixels to scroll 0 scroll left 0 scroll right return true the widget was scrolled false the widget was not scrolled the given offset is not valid boolean scroll Horizontal Bar int pixels if pixels 0 return false Scroll Bar horizontal Bar get Horizontal Bar if horizontal Bar null horizontal Bar set Selection horizontal Scroll Offset pixels scroll Horizontal pixels return true  scrollHorizontalBar ScrollBar horizontalBar getHorizontalBar horizontalBar horizontalBar setSelection horizontalScrollOffset scrollHorizontal
Selects all the text 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 select All check Widget set Selection new Point 0 Math max get Char Count 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS selectAll checkWidget setSelection getCharCount
Replaces inserts text as defined by the event p param event the text change event ul li event start the replace start offset li li event end the replace end offset li li event text the new text li ul void send Key Event Event event if editable false return modify Content event true  sendKeyEvent modifyContent
void send Modify Event Event event Accessible accessible get Accessible if event text length 0 accessible text Changed ACC TEXT DELETE event start event end event start else if event start event end accessible text Changed ACC TEXT INSERT event start event text length else accessible text Changed ACC TEXT DELETE event start event end event start accessible text Changed ACC TEXT INSERT event start event text length notify Listeners SWT Modify event  sendModifyEvent getAccessible textChanged TEXT_DELETE textChanged TEXT_INSERT textChanged TEXT_DELETE textChanged TEXT_INSERT notifyListeners
Sends the specified selection event void send Selection Event get Accessible text Selection Changed Event event new Event event x selection x event y selection y notify Listeners SWT Selection event  sendSelectionEvent getAccessible textSelectionChanged notifyListeners
Sets whether the widget wraps lines This overrides the creation style bit SWT WRAP p param wrap true widget wraps lines false widget does not wrap lines since 2 0 public void set Word Wrap boolean wrap check Widget if get Style SWT SINGLE 0 return if wrap word Wrap Scroll Bar horizontal Bar get Horizontal Bar word Wrap wrap if word Wrap logical Content content content new Wrapped Content renderer logical Content else content logical Content calculate Content Width horizontal Scroll Offset 0 if horizontal Bar null horizontal Bar set Visible word Wrap set Scroll Bars set Caret Location super redraw  setWordWrap checkWidget getStyle wordWrap ScrollBar horizontalBar getHorizontalBar wordWrap wordWrap logicalContent WrappedContent logicalContent logicalContent calculateContentWidth horizontalScrollOffset horizontalBar horizontalBar setVisible wordWrap setScrollBars setCaretLocation
Sets the receiver s caret Set the caret s height and location p param caret the new caret for the receiver 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 set Caret Caret caret check Widget super set Caret caret caret Direction SWT NULL if caret null set Caret Location  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setCaret checkWidget setCaret caretDirection setCaretLocation
see org eclipse swt widgets Control set Background public void set Background Color color check Widget background color super set Background get Background redraw  setBackground setBackground checkWidget setBackground getBackground
Sets the BIDI coloring mode When true the BIDI text display algorithm is applied to segments of text that are the same color param mode the new coloring mode 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 p deprecated use Bidi Segment Listener instead p public void set Bidi Coloring boolean mode check Widget bidi Coloring mode  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS BidiSegmentListener setBidiColoring checkWidget bidiColoring
void set Caret Location int new CaretX int line int direction Caret caret get Caret if caret null boolean update Image caret default Caret int image Direction direction if is Mirrored if image Direction SWT LEFT image Direction SWT RIGHT else if image Direction SWT RIGHT image Direction SWT LEFT if update Image image Direction SWT RIGHT new CaretX caret get Size x 1 int new CaretY line line Height vertical Scroll Offset top Margin caret set Location new CaretX new CaretY get Accessible text Caret Moved get Caret Offset if direction caret Direction caret Direction direction if update Image if image Direction SWT DEFAULT default Caret set Image null else if image Direction SWT LEFT default Caret set Image left Caret Bitmap else if image Direction SWT RIGHT default Caret set Image right Caret Bitmap caret set Size caret get Size x line Height if caret Direction SWT LEFT Bidi Util set Keyboard Language Bidi Util KEYBOARD NON BIDI else if caret Direction SWT RIGHT Bidi Util set Keyboard Language Bidi Util KEYBOARD BIDI columnX new CaretX  setCaretLocation newCaretX getCaret updateImage defaultCaret imageDirection isMirrored imageDirection imageDirection imageDirection imageDirection updateImage imageDirection newCaretX getSize newCaretY lineHeight verticalScrollOffset topMargin setLocation newCaretX newCaretY getAccessible textCaretMoved getCaretOffset caretDirection caretDirection updateImage imageDirection defaultCaret setImage imageDirection defaultCaret setImage leftCaretBitmap imageDirection defaultCaret setImage rightCaretBitmap setSize getSize lineHeight caretDirection BidiUtil setKeyboardLanguage BidiUtil KEYBOARD_NON_BIDI caretDirection BidiUtil setKeyboardLanguage BidiUtil KEYBOARD_BIDI newCaretX
Moves the Caret to the current caret offset void set Caret Location int line Index get Caret Line String line content get Line line Index int line Offset content get Offset At Line line Index int offset In Line caret Offset line Offset int new CaretX getX At Offset line line Index offset In Line set Caret Location new CaretX line Index get Caret Direction  setCaretLocation lineIndex getCaretLine getLine lineIndex lineOffset getOffsetAtLine lineIndex offsetInLine caretOffset lineOffset newCaretX getXAtOffset lineIndex offsetInLine setCaretLocation newCaretX lineIndex getCaretDirection
Sets the caret offset param offset caret offset relative to the first character in the text 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 exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT when either the start or the end of the selection range is inside a multi byte line delimiter and thus neither clearly in front of or after the line delimiter ul public void set Caret Offset int offset check Widget int length get Char Count if length 0 offset caret Offset if offset 0 caret Offset 0 else if offset length caret Offset length else if is Line Delimiter offset offset is inside a multi byte line delimiter This is an illegal operation and an exception is thrown Fixes 1GDKK3R SWT error SWT ERROR INVALID ARGUMENT caret Offset offset clear the selection if the caret is moved don t notify listeners about the selection change clear Selection false always update the caret location fixes 1G8FODP set Caret Location  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_ARGUMENT setCaretOffset checkWidget getCharCount caretOffset caretOffset caretOffset isLineDelimiter ERROR_INVALID_ARGUMENT caretOffset clearSelection setCaretLocation
Copies the specified text range to the clipboard The text will be placed in the clipboard in plain text format and RTF format p param start start index of the text param length length of text to place in clipboard exception SWT Error see Clipboard set Contents see org eclipse swt dnd Clipboard set Contents void set Clipboard Content int start int length throws SWT Error RTF Transfer rtf Transfer RTF Transfer get Instance Text Transfer plain Text Transfer Text Transfer get Instance RTF Writer rtf Writer new RTF Writer start length Text Writer plain Text Writer new Text Writer start length String rtf Text get Platform Delimited Text rtf Writer String plain Text get Platform Delimited Text plain Text Writer clipboard set Contents new String rtf Text plain Text new Transfer rtf Transfer plain Text Transfer  SWTError setContents setContents setClipboardContent SWTError RTFTransfer rtfTransfer RTFTransfer getInstance TextTransfer plainTextTransfer TextTransfer getInstance RTFWriter rtfWriter RTFWriter TextWriter plainTextWriter TextWriter rtfText getPlatformDelimitedText rtfWriter plainText getPlatformDelimitedText plainTextWriter setContents rtfText plainText rtfTransfer plainTextTransfer
Sets the content implementation to use for text storage p param content Styled Text Content implementation to use for text storage 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul public void set Content Styled Text Content new Content check Widget if new Content null SWT error SWT ERROR NULL ARGUMENT if content null content remove Text Change Listener text Change Listener logical Content new Content if word Wrap content new Wrapped Content renderer logical Content else content logical Content content add Text Change Listener text Change Listener reset  StyledTextContent SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT setContent StyledTextContent newContent checkWidget newContent ERROR_NULL_ARGUMENT removeTextChangeListener textChangeListener logicalContent newContent wordWrap WrappedContent logicalContent logicalContent addTextChangeListener textChangeListener
Sets the receiver s cursor to the cursor specified by the argument Overridden to handle the null case since the Styled Text widget uses an ibeam as its default cursor see org eclipse swt widgets Control set Cursor public void set Cursor Cursor cursor if cursor null super set Cursor ibeam Cursor else super set Cursor cursor  StyledText setCursor setCursor setCursor ibeamCursor setCursor
Sets whether the widget implements double click mouse behavior p param enable if true double clicking a word selects the word if false double clicks have the same effect as regular mouse clicks 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 set Double Click Enabled boolean enable check Widget double Click Enabled enable  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setDoubleClickEnabled checkWidget doubleClickEnabled
Sets whether the widget content can be edited p param editable if true content can be edited if false content can not be edited 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 set Editable boolean editable check Widget this editable editable  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setEditable checkWidget
Sets a new font to render text with p b NOTE b Italic fonts are not supported unless they have no overhang and the same baseline as regular fonts p param font new font 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 set Font Font font check Widget int old Line Height line Height super set Font font initialize Renderer keep the same top line visible fixes 5815 if line Height old Line Height set Vertical Scroll Offset vertical Scroll Offset line Height old Line Height true claim Bottom Free Space calculate Content Width calculate Scroll Bars if is Bidi create Caret Bitmaps caret Direction SWT NULL always set the caret location Fixes 6685 set Caret Location super redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setFont checkWidget oldLineHeight lineHeight setFont initializeRenderer lineHeight oldLineHeight setVerticalScrollOffset verticalScrollOffset lineHeight oldLineHeight claimBottomFreeSpace calculateContentWidth calculateScrollBars isBidi createCaretBitmaps caretDirection setCaretLocation
see org eclipse swt widgets Control set Foreground public void set Foreground Color color check Widget foreground color super set Foreground get Foreground redraw  setForeground setForeground checkWidget setForeground getForeground
Sets the horizontal scroll offset relative to the start of the line Do nothing if there is no text set p b NOTE b The horizontal index is reset to 0 when new text is set in the widget p param offset horizontal scroll offset relative to the start of the line measured in character increments starting at 0 if equal to 0 the content is not scrolled if 0 the content is scrolled 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 set Horizontal Index int offset check Widget int client Area Width get Client Area width if get Char Count 0 return if offset 0 offset 0 offset get Horizontal Increment allow any value if client area width is unknown or 0 offset will be checked in resize handler don t use is Visible since width is known even if widget is temporarily invisible if client Area Width 0 int width line Cache get Width prevent scrolling if the content fits in the client area align end of longest line with right border of client area if offset is out of range if offset width client Area Width offset Math max 0 width client Area Width scroll Horizontal Bar offset horizontal Scroll Offset  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setHorizontalIndex checkWidget clientAreaWidth getClientArea getCharCount getHorizontalIncrement isVisible clientAreaWidth lineCache getWidth clientAreaWidth clientAreaWidth scrollHorizontalBar horizontalScrollOffset
Sets the horizontal pixel offset relative to the start of the line Do nothing if there is no text set p b NOTE b The horizontal pixel offset is reset to 0 when new text is set in the widget p param pixel horizontal pixel offset relative to the start of the line 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 since 2 0 public void set Horizontal Pixel int pixel check Widget int client Area Width get Client Area width if get Char Count 0 return if pixel 0 pixel 0 allow any value if client area width is unknown or 0 offset will be checked in resize handler don t use is Visible since width is known even if widget is temporarily invisible if client Area Width 0 int width line Cache get Width prevent scrolling if the content fits in the client area align end of longest line with right border of client area if offset is out of range if pixel width client Area Width pixel Math max 0 width client Area Width scroll Horizontal Bar pixel horizontal Scroll Offset  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setHorizontalPixel checkWidget clientAreaWidth getClientArea getCharCount isVisible clientAreaWidth lineCache getWidth clientAreaWidth clientAreaWidth scrollHorizontalBar horizontalScrollOffset
Adjusts the maximum and the page size of the horizontal scroll bar to reflect content width changes void set Horizontal Scroll Bar Scroll Bar horizontal Bar get Horizontal Bar if horizontal Bar null horizontal Bar get Visible final int INACTIVE 1 Rectangle client Area get Client Area only set the real values if the scroll bar can be used ie because the thumb size is less than the scroll maximum avoids flashing on Motif fixes 1G7RE1J and 1G5SE92 if client Area width line Cache get Width horizontal Bar set Values horizontal Bar get Selection horizontal Bar get Minimum line Cache get Width maximum client Area width left Margin right Margin thumb size horizontal Bar get Increment client Area width left Margin right Margin page size else if horizontal Bar get Thumb INACTIVE horizontal Bar get Maximum INACTIVE horizontal Bar set Values horizontal Bar get Selection horizontal Bar get Minimum INACTIVE INACTIVE horizontal Bar get Increment INACTIVE  setHorizontalScrollBar ScrollBar horizontalBar getHorizontalBar horizontalBar horizontalBar getVisible clientArea getClientArea clientArea lineCache getWidth horizontalBar setValues horizontalBar getSelection horizontalBar getMinimum lineCache getWidth clientArea leftMargin rightMargin horizontalBar getIncrement clientArea leftMargin rightMargin horizontalBar getThumb horizontalBar getMaximum horizontalBar setValues horizontalBar getSelection horizontalBar getMinimum horizontalBar getIncrement
Sets the background color of the specified lines The background color is drawn for the width of the widget All line background colors are discarded when set Text is called The text background color if defined in a Style Range overlays the line background color Should not be called if a Line Background Listener has been set since the listener maintains the line backgrounds p Line background colors are maintained relative to the line text not the line index that is specified in this method call During text changes when entire lines are inserted or removed the line background colors that are associated with the lines after the change will move with their respective text An entire line is defined as extending from the first character on a line to the last and including the line delimiter p p When two lines are joined by deleting a line delimiter the top line background takes precedence and the color of the bottom line is deleted For all other text changes line background colors will remain unchanged p param start Line first line the color is applied to 0 based param line Count number of lines the color applies to param background line background color 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 exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT when the specified line range is invalid li ul public void set Line Background int start Line int line Count Color background check Widget int partial Bottom Index get Partial Bottom Index this API can not be used if the client is providing the line background if user Line Background return if start Line 0 start Line line Count logical Content get Line Count SWT error SWT ERROR INVALID ARGUMENT default Line Styler set Line Background start Line line Count background do nothing if redraw range is completely invisible if start Line partial Bottom Index start Line line Count 1 top Index return only redraw visible lines if start Line top Index line Count top Index start Line start Line top Index if start Line line Count 1 partial Bottom Index line Count partial Bottom Index start Line 1 start Line top Index super redraw left Margin start Line line Height top Margin get Client Area width left Margin right Margin line Count line Height true  setText StyleRange LineBackgroundListener startLine lineCount SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_ARGUMENT setLineBackground startLine lineCount checkWidget partialBottomIndex getPartialBottomIndex userLineBackground startLine startLine lineCount logicalContent getLineCount ERROR_INVALID_ARGUMENT defaultLineStyler setLineBackground startLine lineCount startLine partialBottomIndex startLine lineCount topIndex startLine topIndex lineCount topIndex startLine startLine topIndex startLine lineCount partialBottomIndex lineCount partialBottomIndex startLine startLine topIndex leftMargin startLine lineHeight topMargin getClientArea leftMargin rightMargin lineCount lineHeight
Flips selection anchor based on word selection direction void set Mouse Word Selection Anchor if mouse Double Click false return if caret Offset double Click Selection x selection Anchor double Click Selection y else if caret Offset double Click Selection y selection Anchor double Click Selection x  setMouseWordSelectionAnchor mouseDoubleClick caretOffset doubleClickSelection selectionAnchor doubleClickSelection caretOffset doubleClickSelection selectionAnchor doubleClickSelection
Sets the orientation of the receiver which must be one of the constants code SWT LEFT TO RIGHT code or code SWT LEFT TO RIGHT code p param orientation new orientation style 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 since 2 1 2 public void set Orientation int orientation if orientation SWT RIGHT TO LEFT SWT LEFT TO RIGHT 0 return if orientation SWT RIGHT TO LEFT 0 orientation SWT LEFT TO RIGHT 0 return if orientation SWT RIGHT TO LEFT 0 is Mirrored return if orientation SWT LEFT TO RIGHT 0 is Mirrored false return if Bidi Util set Orientation handle orientation false return is Mirrored orientation SWT RIGHT TO LEFT 0 is Bidi Bidi Util is Bidi Platform is Mirrored initialize Renderer caret Direction SWT NULL set Caret Location key Action Map clear create Key Bindings super redraw  LEFT_TO_RIGHT LEFT_TO_RIGHT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setOrientation RIGHT_TO_LEFT LEFT_TO_RIGHT RIGHT_TO_LEFT LEFT_TO_RIGHT RIGHT_TO_LEFT isMirrored LEFT_TO_RIGHT isMirrored BidiUtil setOrientation isMirrored RIGHT_TO_LEFT isBidi BidiUtil isBidiPlatform isMirrored initializeRenderer caretDirection setCaretLocation keyActionMap createKeyBindings
Adjusts the maximum and the page size of the scroll bars to reflect content width length changes void set Scroll Bars Scroll Bar vertical Bar get Vertical Bar if vertical Bar null Rectangle client Area get Client Area final int INACTIVE 1 int maximum content get Line Count get Vertical Increment only set the real values if the scroll bar can be used ie because the thumb size is less than the scroll maximum avoids flashing on Motif fixes 1G7RE1J and 1G5SE92 if client Area height maximum vertical Bar set Values vertical Bar get Selection vertical Bar get Minimum maximum client Area height thumb size vertical Bar get Increment client Area height page size else if vertical Bar get Thumb INACTIVE vertical Bar get Maximum INACTIVE vertical Bar set Values vertical Bar get Selection vertical Bar get Minimum INACTIVE INACTIVE vertical Bar get Increment INACTIVE set Horizontal Scroll Bar  setScrollBars ScrollBar verticalBar getVerticalBar verticalBar clientArea getClientArea getLineCount getVerticalIncrement clientArea verticalBar setValues verticalBar getSelection verticalBar getMinimum clientArea verticalBar getIncrement clientArea verticalBar getThumb verticalBar getMaximum verticalBar setValues verticalBar getSelection verticalBar getMinimum verticalBar getIncrement setHorizontalScrollBar
Sets the selection to the given position and scrolls it into view Equivalent to set Selection start start p param start new caret position see set Selection int int 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 exception Illegal Argument Exception ul li ERROR INVALID RANGE when start is outside the widget content li ERROR INVALID ARGUMENT when either the start or the end of the selection range is inside a multi byte line delimiter and thus neither clearly in front of or after the line delimiter ul public void set Selection int start check Widget test done in set Selection Range set Selection start start  setSelection setSelection SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_RANGE ERROR_INVALID_ARGUMENT setSelection checkWidget setSelectionRange setSelection
Sets the selection and scrolls it into view p Indexing is zero based Text selections are specified in terms of caret positions In a text widget that contains N characters there are N 1 caret positions ranging from 0 N p param point x selection start offset y selection end offset The caret will be placed at the selection start when x y see set Selection int int 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when point is null li li ERROR INVALID RANGE when start or end is outside the widget content li ERROR INVALID ARGUMENT when either the start or the end of the selection range is inside a multi byte line delimiter and thus neither clearly in front of or after the line delimiter ul public void set Selection Point point check Widget if point null SWT error SWT ERROR NULL ARGUMENT set Selection point x point y  setSelection SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_RANGE ERROR_INVALID_ARGUMENT setSelection checkWidget ERROR_NULL_ARGUMENT setSelection
Sets the receiver s selection background color to the color specified by the argument or to the default system color for the control if the argument is null param color the new color or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 2 1 public void set Selection Background Color color check Widget if color null if color is Disposed SWT error SWT ERROR INVALID ARGUMENT selection Background color redraw  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelectionBackground checkWidget isDisposed ERROR_INVALID_ARGUMENT selectionBackground
Sets the receiver s selection foreground color to the color specified by the argument or to the default system color for the control if the argument is null param color the new color or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 2 1 public void set Selection Foreground Color color check Widget if color null if color is Disposed SWT error SWT ERROR INVALID ARGUMENT selection Foreground color redraw  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelectionForeground checkWidget isDisposed ERROR_INVALID_ARGUMENT selectionForeground
Sets the selection and scrolls it into view p Indexing is zero based Text selections are specified in terms of caret positions In a text widget that contains N characters there are N 1 caret positions ranging from 0 N p param start selection start offset The caret will be placed at the selection start when start end param end selection end offset see set Selection Range int int 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 exception Illegal Argument Exception ul li ERROR INVALID RANGE when start or end is outside the widget content li ERROR INVALID ARGUMENT when either the start or the end of the selection range is inside a multi byte line delimiter and thus neither clearly in front of or after the line delimiter ul public void set Selection int start int end check Widget test done in set Selection Range set Selection Range start end start show Selection  setSelectionRange SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_RANGE ERROR_INVALID_ARGUMENT setSelection checkWidget setSelectionRange setSelectionRange showSelection
Sets the selection The new selection may not be visible Call show Selection to scroll the selection into view p param start offset of the first selected character start 0 must be true param length number of characters to select 0 start length get Char Count must be true A negative length places the caret at the visual start of the selection 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 exception Illegal Argument Exception ul li ERROR INVALID RANGE when the range specified by start and length is outside the widget content li ERROR INVALID ARGUMENT when either the start or the end of the selection range is inside a multi byte line delimiter and thus neither clearly in front of or after the line delimiter ul public void set Selection Range int start int length check Widget int content Length get Char Count int end start length if start 0 end 0 start content Length end content Length SWT error SWT ERROR INVALID RANGE if is Line Delimiter start is Line Delimiter end the start offset or end offset of the selection range is inside a multi byte line delimiter This is an illegal operation and an exception is thrown Fixes 1GDKK3R SWT error SWT ERROR INVALID ARGUMENT internal Set Selection start length false always update the caret location fixes 1G8FODP set Caret Location  showSelection getCharCount SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_RANGE ERROR_INVALID_ARGUMENT setSelectionRange checkWidget contentLength getCharCount contentLength contentLength ERROR_INVALID_RANGE isLineDelimiter isLineDelimiter ERROR_INVALID_ARGUMENT internalSetSelection setCaretLocation
Sets the selection The new selection may not be visible Call show Selection to scroll the selection into view p param start offset of the first selected character start 0 must be true param length number of characters to select 0 start length get Char Count must be true A negative length places the caret at the selection start param send Event a Selection event is sent when set to true and when the selection is reset void internal Set Selection int start int length boolean send Event int end start length if start end int temp end end start start temp is the selection range different or is the selection direction different if selection x start selection y end length 0 selection Anchor selection x length 0 selection Anchor selection y clear Selection send Event if length 0 selection Anchor selection y end caret Offset selection x start else selection Anchor selection x start caret Offset selection y end internal Redraw Range selection x selection y selection x true  showSelection getCharCount sendEvent internalSetSelection sendEvent selectionAnchor selectionAnchor clearSelection sendEvent selectionAnchor caretOffset selectionAnchor caretOffset internalRedrawRange
Adds the specified style The new style overwrites existing styles for the specified range Existing style ranges are adjusted if they partially overlap with the new style To clear an individual style call set Style Range with a Style Range that has null attributes p Should not be called if a Line Style Listener has been set since the listener maintains the styles p param range Style Range object containing the style information Overwrites the old style in the given range May be null to delete all styles 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 exception Illegal Argument Exception ul li ERROR INVALID RANGE when the style range is outside the valid range get Char Count li ul public void set Style Range Style Range range check Widget this API can not be used if the client is providing the line styles if user Line Style return check the range make sure it falls within the range of the text if range null range start range length content get Char Count SWT error SWT ERROR INVALID RANGE default Line Styler set Style Range range if range null int first Line content get Line At Offset range start int last Line content get Line At Offset range start range length line Cache reset first Line last Line first Line 1 true if the style is not visible there is no need to redraw if is Area Visible first Line last Line int redrawY first Line line Height vertical Scroll Offset int redraw StopY last Line 1 line Height vertical Scroll Offset draw 0 redrawY get Client Area width redraw StopY redrawY true else clearing all styles line Cache reset 0 content get Line Count false redraw make sure that the caret is positioned correctly caret location may change if font style changes fixes 1G8FODP set Caret Location  setStyleRange StyleRange LineStyleListener StyleRange SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_INVALID_RANGE getCharCount setStyleRange StyleRange checkWidget userLineStyle getCharCount ERROR_INVALID_RANGE defaultLineStyler setStyleRange firstLine getLineAtOffset lastLine getLineAtOffset lineCache firstLine lastLine firstLine isAreaVisible firstLine lastLine firstLine lineHeight verticalScrollOffset redrawStopY lastLine lineHeight verticalScrollOffset getClientArea redrawStopY lineCache getLineCount setCaretLocation
Sets styles to be used for rendering the widget content All styles in the widget will be replaced with the given set of styles p Should not be called if a Line Style Listener has been set since the listener maintains the styles p param ranges Style Range objects containing the style information The ranges should not overlap The style rendering is undefined if the ranges do overlap Must not be null 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li li ERROR INVALID RANGE when the last of the style ranges is outside the valid range get Char Count li ul public void set Style Ranges Style Range ranges check Widget this API can not be used if the client is providing the line styles if user Line Style return if ranges null SWT error SWT ERROR NULL ARGUMENT check the last range make sure it falls within the range of the current text if ranges length 0 Style Range last ranges ranges length 1 int last End last start last length int first Line content get Line At Offset ranges 0 start int last Line if last End content get Char Count SWT error SWT ERROR INVALID RANGE last Line content get Line At Offset last End reset all lines affected by the style change line Cache reset first Line last Line first Line 1 true else reset all lines line Cache reset 0 content get Line Count false default Line Styler set Style Ranges ranges redraw should only redraw affected area to avoid flashing make sure that the caret is positioned correctly caret location may change if font style changes fixes 1G8FODP set Caret Location  LineStyleListener StyleRange SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_RANGE getCharCount setStyleRanges StyleRange checkWidget userLineStyle ERROR_NULL_ARGUMENT StyleRange lastEnd firstLine getLineAtOffset lastLine lastEnd getCharCount ERROR_INVALID_RANGE lastLine getLineAtOffset lastEnd lineCache firstLine lastLine firstLine lineCache getLineCount defaultLineStyler setStyleRanges setCaretLocation
Sets the tab width p param tabs tab width measured in characters 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 set Tabs int tabs check Widget tab Length tabs renderer set Tab Length tab Length if caret Offset 0 caret Offset 0 show Caret clear Selection false reset all line widths when the tab width changes line Cache reset 0 content get Line Count false redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setTabs checkWidget tabLength setTabLength tabLength caretOffset caretOffset showCaret clearSelection lineCache getLineCount
Sets the widget content If the widget has the SWT SINGLE style and text contains more than one line only the first line is rendered but the text is stored unchanged A subsequent call to get Text will return the same text that was set p b Note b Only a single line of text should be set when the SWT SINGLE style is used p param text new widget content Replaces existing content Line styles that were set using Styled Text API are discarded The current selection is also discarded 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when string is null li ul public void set Text String text check Widget Event event new Event if text null SWT error SWT ERROR NULL ARGUMENT event start 0 event end get Char Count event text text event doit true notify Listeners SWT Verify event if event doit Styled Text Event styled Text Event null if is Listening Extended Modify styled Text Event new Styled Text Event logical Content styled Text Event start event start styled Text Event end event start event text length styled Text Event text content get Text Range event start event end event start content set Text event text send Modify Event event if styled Text Event null notify Listeners Extended Modify styled Text Event  getText StyledText SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT setText checkWidget ERROR_NULL_ARGUMENT getCharCount notifyListeners StyledTextEvent styledTextEvent isListening ExtendedModify styledTextEvent StyledTextEvent logicalContent styledTextEvent styledTextEvent styledTextEvent getTextRange setText sendModifyEvent styledTextEvent notifyListeners ExtendedModify styledTextEvent
Sets the text limit p The text limit specifies the amount of text that the user can type into the widget p param limit the new text limit 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 exception Illegal Argument Exception ul li ERROR CANNOT BE ZERO when limit is 0 li ul public void set Text Limit int limit check Widget if limit 0 SWT error SWT ERROR CANNOT BE ZERO text Limit limit  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_CANNOT_BE_ZERO setTextLimit checkWidget ERROR_CANNOT_BE_ZERO textLimit
Sets the top index Do nothing if there is no text set p The top index is the index of the line that is currently at the top of the widget The top index changes when the widget is scrolled Indexing starts from zero Note The top index is reset to 0 when new text is set in the widget p param index new top index Must be between 0 and get Line Count fully visible lines per page If no lines are fully visible the maximum value is get Line Count 1 An out of range index will be adjusted accordingly 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 set Top Index int top Index check Widget int line Count logical Content get Line Count int page Size Math max 1 Math min line Count get Line Count Whole if get Char Count 0 return if top Index 0 top Index 0 else if top Index line Count page Size top Index line Count page Size if word Wrap int logical Line Offset logical Content get Offset At Line top Index top Index content get Line At Offset logical Line Offset set Vertical Scroll Offset top Index get Vertical Increment true  getLineCount getLineCount SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setTopIndex topIndex checkWidget lineCount logicalContent getLineCount pageSize lineCount getLineCountWhole getCharCount topIndex topIndex topIndex lineCount pageSize topIndex lineCount pageSize wordWrap logicalLineOffset logicalContent getOffsetAtLine topIndex topIndex getLineAtOffset logicalLineOffset setVerticalScrollOffset topIndex getVerticalIncrement
Sets the top pixel offset Do nothing if there is no text set p The top pixel offset is the vertical pixel offset of the widget The widget is scrolled so that the given pixel position is at the top The top index is adjusted to the corresponding top line Note The top pixel is reset to 0 when new text is set in the widget p param pixel new top pixel offset Must be between 0 and get Line Count visible lines per page get Line Height An out of range offset will be adjusted accordingly 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 since 2 0 public void set Top Pixel int pixel check Widget int line Count content get Line Count int height get Client Area height int max Top Pixel Math max 0 line Count get Vertical Increment height if get Char Count 0 return if pixel 0 pixel 0 else if pixel max Top Pixel pixel max Top Pixel set Vertical Scroll Offset pixel true  getLineCount getLineHeight SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setTopPixel checkWidget lineCount getLineCount getClientArea maxTopPixel lineCount getVerticalIncrement getCharCount maxTopPixel maxTopPixel setVerticalScrollOffset
Scrolls the widget vertically p param pixel Offset the new vertical scroll offset param adjust Scroll Bar true the scroll thumb will be moved to reflect the new scroll offset false the scroll thumb will not be moved return true the widget was scrolled false the widget was not scrolled the given offset is not valid boolean set Vertical Scroll Offset int pixel Offset boolean adjust Scroll Bar Rectangle client Area Scroll Bar vertical Bar get Vertical Bar if pixel Offset vertical Scroll Offset return false if vertical Bar null adjust Scroll Bar vertical Bar set Selection pixel Offset client Area get Client Area scroll 0 0 destination x y 0 pixel Offset vertical Scroll Offset source x y client Area width client Area height true vertical Scroll Offset pixel Offset calculate Top Index int old ColumnX columnX set Caret Location restore the original horizontal caret index columnX old ColumnX return true  pixelOffset adjustScrollBar setVerticalScrollOffset pixelOffset adjustScrollBar clientArea ScrollBar verticalBar getVerticalBar pixelOffset verticalScrollOffset verticalBar adjustScrollBar verticalBar setSelection pixelOffset clientArea getClientArea pixelOffset verticalScrollOffset clientArea clientArea verticalScrollOffset pixelOffset calculateTopIndex oldColumnX setCaretLocation oldColumnX
Scrolls the specified location into view p param x the x coordinate that should be made visible param line the line that should be made visible Relative to the first line in the document return true the widget was scrolled to make the specified location visible false the specified location is already visible the widget was not scrolled boolean show Location int x int line int client Area Width get Client Area width left Margin int vertical Increment get Vertical Increment int horizontal Increment client Area Width 4 boolean scrolled false if x left Margin always make 1 4 of a page visible x Math max horizontal Scroll Offset 1 x horizontal Increment scrolled scroll Horizontal Bar x else if x client Area Width always make 1 4 of a page visible x Math min line Cache get Width horizontal Scroll Offset x horizontal Increment scrolled scroll Horizontal Bar x client Area Width if line top Index scrolled set Vertical Scroll Offset line vertical Increment true else if line get Bottom Index scrolled set Vertical Scroll Offset line 1 vertical Increment get Client Area height true return scrolled  showLocation clientAreaWidth getClientArea leftMargin verticalIncrement getVerticalIncrement horizontalIncrement clientAreaWidth leftMargin horizontalScrollOffset horizontalIncrement scrollHorizontalBar clientAreaWidth lineCache getWidth horizontalScrollOffset horizontalIncrement scrollHorizontalBar clientAreaWidth topIndex setVerticalScrollOffset verticalIncrement getBottomIndex setVerticalScrollOffset verticalIncrement getClientArea
Sets the caret location and scrolls the caret offset into view void show Caret int caret Line content get Line At Offset caret Offset show Caret caret Line  showCaret caretLine getLineAtOffset caretOffset showCaret caretLine
Sets the caret location and scrolls the caret offset into view void show Caret int caret Line int line Offset content get Offset At Line caret Line String line content get Line caret Line int offset In Line caret Offset line Offset int new CaretX getX At Offset line caret Line offset In Line boolean scrolled show Location new CaretX caret Line boolean set Wrap Caret Location false Caret caret get Caret if word Wrap caret null int caretY caret get Location y if caretY vertical Scroll Offset get Vertical Increment 1 caret Line set Wrap Caret Location true if scrolled false set Wrap Caret Location set the caret location if a scroll operation did not set it as a sideeffect of scrolling or when in word wrap mode and the caret line was explicitly specified i e because get Wrap Caret Line does not return the desired line causing scrolling to not set it correctly set Caret Location new CaretX caret Line get Caret Direction  showCaret caretLine lineOffset getOffsetAtLine caretLine getLine caretLine offsetInLine caretOffset lineOffset newCaretX getXAtOffset caretLine offsetInLine showLocation newCaretX caretLine setWrapCaretLocation getCaret wordWrap getLocation verticalScrollOffset getVerticalIncrement caretLine setWrapCaretLocation setWrapCaretLocation getWrapCaretLine setCaretLocation newCaretX caretLine getCaretDirection
Scrolls the specified offset into view p param offset offset that should be scolled into view void show Offset int offset int line content get Line At Offset offset int line Offset content get Offset At Line line int offset In Line offset line Offset String line Text content get Line line int x At Offset getX At Offset line Text line offset In Line show Location x At Offset line  showOffset getLineAtOffset lineOffset getOffsetAtLine offsetInLine lineOffset lineText getLine xAtOffset getXAtOffset lineText offsetInLine showLocation xAtOffset
Scrolls the selection into view The end of the selection will be scrolled into view Note that if a right to left selection exists the end of the selection is the visual beginning of the selection i e where the caret is located 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 show Selection check Widget boolean selection Fits int start Offset start Line startX end Offset end Line endX offset In Line is selection from right to left boolean right To Left caret Offset selection x if right To Left start Offset selection y end Offset selection x else start Offset selection x end Offset selection y calculate the logical start and end values for the selection start Line content get Line At Offset start Offset offset In Line start Offset content get Offset At Line start Line startX getX At Offset content get Line start Line start Line offset In Line end Line content get Line At Offset end Offset offset In Line end Offset content get Offset At Line end Line endX getX At Offset content get Line end Line end Line offset In Line can the selection be fully displayed within the widget s visible width int w get Client Area width if right To Left selection Fits startX endX w else selection Fits endX startX w if selection Fits show as much of the selection as possible by first showing the start of the selection show Location startX start Line endX value could change if showing startX caused a scroll to occur endX getX At Offset content get Line end Line end Line offset In Line show Location endX end Line else just show the end of the selection since the selection start will not be visible show Location endX end Line  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS showSelection checkWidget selectionFits startOffset startLine endOffset endLine offsetInLine rightToLeft caretOffset rightToLeft startOffset endOffset startOffset endOffset startLine getLineAtOffset startOffset offsetInLine startOffset getOffsetAtLine startLine getXAtOffset getLine startLine startLine offsetInLine endLine getLineAtOffset endOffset offsetInLine endOffset getOffsetAtLine endLine getXAtOffset getLine endLine endLine offsetInLine getClientArea rightToLeft selectionFits selectionFits selectionFits showLocation startLine getXAtOffset getLine endLine endLine offsetInLine showLocation endLine showLocation endLine
Updates the selection and caret position depending on the text change If the selection intersects with the replaced text the selection is reset and the caret moved to the end of the new text If the selection is behind the replaced text it is moved so that the same text remains selected If the selection is before the replaced text it is left unchanged p param start Offset offset of the text change param replaced Length length of text being replaced param new Length length of new text void update Selection int start Offset int replaced Length int new Length if selection y start Offset selection ends before text change return if selection x start Offset clear selection fragment before text change internal Redraw Range selection x start Offset selection x true if selection y start Offset replaced Length selection x start Offset replaced Length clear selection fragment after text change do this only when the selection is actually affected by the change Selection is only affected if it intersects the change 1GDY217 int net New Length new Length replaced Length int redraw Start start Offset new Length internal Redraw Range redraw Start selection y net New Length redraw Start true if selection y start Offset selection x start Offset replaced Length selection intersects replaced text set caret behind text change internal Set Selection start Offset new Length 0 true always update the caret location fixes 1G8FODP set Caret Location else move selection to keep same text selected internal Set Selection selection x new Length replaced Length selection y selection x true always update the caret location fixes 1G8FODP set Caret Location  startOffset replacedLength newLength updateSelection startOffset replacedLength newLength startOffset startOffset internalRedrawRange startOffset startOffset replacedLength startOffset replacedLength netNewLength newLength replacedLength redrawStart startOffset newLength internalRedrawRange redrawStart netNewLength redrawStart startOffset startOffset replacedLength internalSetSelection startOffset newLength setCaretLocation internalSetSelection newLength replacedLength setCaretLocation
Rewraps all lines p param old Client Area Width client area width before resize occurred void word Wrap Resize int old Client Area Width Wrapped Content wrapped Content Wrapped Content content int new Top Index all lines are wrapped and no rewrap required if widget has already been visible client area is now wider and visual wrapped line count equals logical line count if old Client Area Width 0 client Area Width old Client Area Width wrapped Content get Line Count logical Content get Line Count return wrapped Content wrap Lines adjust the top index so that top line remains the same new Top Index content get Line At Offset top Offset top Offset is the beginning of the top line therefore it needs to be adjusted because in a wrapped line this is also the end of the preceeding line if new Top Index content get Line Count 1 top Offset content get Offset At Line new Top Index 1 new Top Index if new Top Index top Index Scroll Bar vertical Bar get Vertical Bar adjust index and pixel offset manually instead of calling set Vertical Scroll Offset because the widget does not actually need to be scrolled causes flash otherwise vertical Scroll Offset new Top Index top Index get Vertical Increment vertical Scroll Offset may become negative if first line was partially visible and second line was top line prevent this from happening to fix 8503 if vertical Scroll Offset 0 vertical Scroll Offset 0 top Index new Top Index top Offset content get Offset At Line top Index if vertical Bar null vertical Bar set Selection vertical Scroll Offset caret may be on a different line after a rewrap call set Caret Location after fixing vertical scroll offset set Caret Location word wrap may have changed on one of the visible lines super redraw  oldClientAreaWidth wordWrapResize oldClientAreaWidth WrappedContent wrappedContent WrappedContent newTopIndex oldClientAreaWidth clientAreaWidth oldClientAreaWidth wrappedContent getLineCount logicalContent getLineCount wrappedContent wrapLines newTopIndex getLineAtOffset topOffset topOffset newTopIndex getLineCount topOffset getOffsetAtLine newTopIndex newTopIndex newTopIndex topIndex ScrollBar verticalBar getVerticalBar setVerticalScrollOffset verticalScrollOffset newTopIndex topIndex getVerticalIncrement verticalScrollOffset verticalScrollOffset verticalScrollOffset topIndex newTopIndex topOffset getOffsetAtLine topIndex verticalBar verticalBar setSelection verticalScrollOffset setCaretLocation setCaretLocation

Called by Styled Text to add itself as an Observer to content changes See Text Change Listener for a description of the listener methods that are called when text changes occur p param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul  StyledText TextChangeListener IllegalArgumentException ERROR_NULL_ARGUMENT
Return the number of characters in the content p return the number of characters in the content 
Return the line at the given line index without delimiters p param line Index index of the line to return Does not include delimiters of preceeding lines Index 0 is the first line of the content return the line text without delimiters  lineIndex
Return the line index at the given character offset p param offset offset of the line to return The first character of the document is at offset 0 An offset of get Length is valid and should answer the number of lines return the line index The first line is at index 0 If the character at offset is a delimiter character answer the line index of the line that is delimited For example if text r n r n and delimiter r n then ul li get Line At Offset 0 0 li get Line At Offset 1 0 li get Line At Offset 2 1 li get Line At Offset 3 1 li get Line At Offset 4 2 ul  getLength getLineAtOffset getLineAtOffset getLineAtOffset getLineAtOffset getLineAtOffset
Return the number of lines Should answer 1 when no text is specified The Styled Text widget relies on this behavior for drawing the cursor p return the number of lines For example ul li text value get Line Count li null 1 li 1 li a n 2 li n n 3 ul  StyledText getLineCount
Return the line delimiter that should be used by the Styled Text widget when inserting new lines New lines entered using key strokes and paste operations use this line delimiter Implementors may use System get Property line separator to return the platform line delimiter p return the line delimiter that should be used by the Styled Text widget when inserting new lines  StyledText getProperty StyledText
Return the character offset of the first character of the given line p b NOTE b When there is no text i e no lines get Offset At Line 0 is a valid call that should return 0 p param line Index index of the line The first line is at index 0 return offset offset of the first character of the line The first character of the document is at offset 0 The return value should include line delimiters For example if text r ntest r n and delimiter r n then ul li get Offset At Line 0 0 li get Offset At Line 1 2 li get Offset At Line 2 8 ul  getOffsetAtLine lineIndex getOffsetAtLine getOffsetAtLine getOffsetAtLine
Returns a string representing the content at the given range p param start the start offset of the text to return Offset 0 is the first character of the document param length the length of the text to return return the text at the given range 
Remove the specified text changed listener p param listener the listener exception Illegal Argument Exception ul li ERROR NULL ARGUMENT when listener is null li ul  IllegalArgumentException ERROR_NULL_ARGUMENT
Replace the text with new Text starting at position start for a length of replace Length p Implementors have to notify the Text Change Listeners that were added using code add Text Change Listener code before and after the content is changed A code Text Changing Event code has to be sent to the text Changing method before the content is changed and a code Text Changed Event code has to be sent to the text Changed method after the content has changed The text change that occurs after the code Text Changing Event code has been sent has to be consistent with the data provided in the code Text Changing Event code This data will be cached by the widget and will be used when the code Text Changed Event code is received p The code Text Changing Event code should be set as follows ul li event start start of the replaced text li event new Text text that is going to be inserted or empty String if no text will be inserted li event replace Char Count length of text that is going to be replaced li event new Char Count length of text that is going to be inserted li event replace Line Count number of lines that are going to be replaced li event new Line Count number of new lines that are going to be inserted ul b NOTE b new Line Count is the number of inserted lines and replace Line Count is the number of deleted lines based on the change that occurs visually For example ul li replace Text new Text replace Line Count new Line Count li n 0 1 li n n a 2 0 li a n n 0 2 li n 1 0 ul p param start start offset of text to replace none of the offsets include delimiters of preceeding lines offset 0 is the first character of the document param replace Length start offset of text to replace param new Text start offset of text to replace see Text Change Listener  newText replaceLength TextChangeListeners addTextChangeListener TextChangingEvent textChanging TextChangedEvent textChanged TextChangingEvent TextChangingEvent TextChangedEvent TextChangingEvent newText replaceCharCount newCharCount replaceLineCount newLineCount newLineCount replaceLineCount replaceText newText replaceLineCount newLineCount replaceLength newText TextChangeListener
Set text to text Implementors have to send a code Text Changed Event code to the text Set method of the Text Change Listeners that were added using code add Text Change Listener code p param text the new text see Text Change Listener  TextChangedEvent textSet TextChangeListeners addTextChangeListener TextChangeListener

int new Line Count Styled Text Event Styled Text Content content super data content  newLineCount StyledTextEvent StyledTextContent

class Styled Text Listener extends Typed Listener Styled Text Listener SWT Event Listener listener super listener  StyledTextListener TypedListener StyledTextListener SWTEventListener
Process Styled Text events by invoking the event s handler public void handle Event Event e Text Changed Event text Changed Event switch e type case Styled Text Extended Modify Extended Modify Event extended Modify Event new Extended Modify Event Styled Text Event e Extended Modify Listener event Listener modify Text extended Modify Event break case Styled Text Line Get Background Line Background Event line Bg Event new Line Background Event Styled Text Event e Line Background Listener event Listener line Get Background line Bg Event Styled Text Event e line Background line Bg Event line Background break case Styled Text Line Get Segments Bidi Segment Event segment Event new Bidi Segment Event Styled Text Event e Bidi Segment Listener event Listener line Get Segments segment Event Styled Text Event e segments segment Event segments break case Styled Text Line Get Style Line Style Event line Style Event new Line Style Event Styled Text Event e Line Style Listener event Listener line Get Style line Style Event Styled Text Event e styles line Style Event styles break case Styled Text Verify Key Verify Event verify Event new Verify Event e Verify Key Listener event Listener verify Key verify Event e doit verify Event doit break case Styled Text Text Changed text Changed Event new Text Changed Event Styled Text Content e data Text Change Listener event Listener text Changed text Changed Event break case Styled Text Text Changing Text Changing Event text Changing Event new Text Changing Event Styled Text Content e data Styled Text Event e Text Change Listener event Listener text Changing text Changing Event break case Styled Text Text Set text Changed Event new Text Changed Event Styled Text Content e data Text Change Listener event Listener text Set text Changed Event break  StyledText handleEvent TextChangedEvent textChangedEvent StyledText ExtendedModify ExtendedModifyEvent extendedModifyEvent ExtendedModifyEvent StyledTextEvent ExtendedModifyListener eventListener modifyText extendedModifyEvent StyledText LineGetBackground LineBackgroundEvent lineBgEvent LineBackgroundEvent StyledTextEvent LineBackgroundListener eventListener lineGetBackground lineBgEvent StyledTextEvent lineBackground lineBgEvent lineBackground StyledText LineGetSegments BidiSegmentEvent segmentEvent BidiSegmentEvent StyledTextEvent BidiSegmentListener eventListener lineGetSegments segmentEvent StyledTextEvent segmentEvent StyledText LineGetStyle LineStyleEvent lineStyleEvent LineStyleEvent StyledTextEvent LineStyleListener eventListener lineGetStyle lineStyleEvent StyledTextEvent lineStyleEvent StyledText VerifyKey VerifyEvent verifyEvent VerifyEvent VerifyKeyListener eventListener verifyKey verifyEvent verifyEvent StyledText TextChanged textChangedEvent TextChangedEvent StyledTextContent TextChangeListener eventListener textChanged textChangedEvent StyledText TextChanging TextChangingEvent textChangingEvent TextChangingEvent StyledTextContent StyledTextEvent TextChangeListener eventListener textChanging textChangingEvent StyledText TextSet textChangedEvent TextChangedEvent StyledTextContent TextChangeListener eventListener textSet textChangedEvent

Creates an instance of class Styled Text Renderer class p param device Device to render on param regular Font Font to use for regular non bold text param left Margin margin to the left of the text Styled Text Renderer Device device Font regular Font this device device this regular Font regular Font  StyledTextRenderer regularFont leftMargin StyledTextRenderer regularFont regularFont regularFont
Calculates the line height and space width void calculate Line Height GC gc getGC line End Space Width gc string Extent x don t assume that bold and normal fonts have the same height fixes bug 41773 Font original Font gc get Font Font Metrics metrics gc get Font Metrics ascent Math max ascent metrics get Ascent metrics get Leading descent Math max descent metrics get Descent gc set Font get Font SWT BOLD metrics gc get Font Metrics ascent Math max ascent metrics get Ascent metrics get Leading descent Math max descent metrics get Descent gc set Font get Font SWT ITALIC metrics gc get Font Metrics ascent Math max ascent metrics get Ascent metrics get Leading descent Math max descent metrics get Descent gc set Font get Font SWT BOLD SWT ITALIC metrics gc get Font Metrics ascent Math max ascent metrics get Ascent metrics get Leading descent Math max descent metrics get Descent gc set Font original Font disposeGC gc clear the font cache if bold Font null bold Font dispose if italic Font null italic Font dispose if bold Italic Font null bold Italic Font dispose bold Font italic Font bold Italic Font null  calculateLineHeight lineEndSpaceWidth stringExtent originalFont getFont FontMetrics getFontMetrics getAscent getLeading getDescent setFont getFont getFontMetrics getAscent getLeading getDescent setFont getFont getFontMetrics getAscent getLeading getDescent setFont getFont getFontMetrics getAscent getLeading getDescent setFont originalFont boldFont boldFont italicFont italicFont boldItalicFont boldItalicFont boldFont italicFont boldItalicFont
Disposes the resource created by the receiver void dispose if bold Font null bold Font dispose if italic Font null italic Font dispose if bold Italic Font null bold Italic Font dispose bold Font italic Font bold Italic Font null  boldFont boldFont italicFont italicFont boldItalicFont boldItalicFont boldFont italicFont boldItalicFont
Dispose the specified GC Allows subclasses to reuse G Cs p param gc GC to dispose  GCs
protected abstract void disposeGC GC gc Draws a line of text at the specified location p param line the line to draw param line Index index of the line to draw param paintY y location to draw at param gc GC to draw on param widget Background the widget background color Used as the default rendering color param widget Foreground the widget foreground color Used as the default rendering color param clear Background true if the line background should be drawn explicitly void draw Line String line int line Index int paintY GC gc Color widget Background Color widget Foreground boolean clear Background int line Offset get Content get Offset At Line line Index int line Length line length Point selection get Selection int selection Start selection x int selection End selection y int left Margin get Left Margin Color line Background null Text Layout layout get Text Layout line line Offset Rectangle client get Client Area Styled Text Event event get Line Background Data line Offset line if event null line Background event line Background if line Background null line Background widget Background if clear Background is Full Line Selection false selection Start line Offset selection End line Offset line Length draw background if full selection is off or if line is not completely selected gc set Background line Background gc set Foreground line Background gc fill Rectangle client x left Margin paintY client width ascent descent int paintX client x left Margin get Horizontal Pixel if selection Start selection End Rectangle rect layout get Line Bounds 0 draw Line Break Selection line line Offset paintX rect x rect width paintY gc gc set Foreground widget Foreground gc set Background line Background if selection Start selection End selection End line Offset selection Start line Offset line Length 1 layout draw gc paintX paintY else int start Math max 0 selection Start line Offset int end Math min line Length selection End line Offset layout draw gc paintX paintY start end 1 get Selection Foreground get Selection Background dispose Text Layout layout  lineIndex widgetBackground widgetForeground clearBackground drawLine lineIndex widgetBackground widgetForeground clearBackground lineOffset getContent getOffsetAtLine lineIndex lineLength getSelection selectionStart selectionEnd leftMargin getLeftMargin lineBackground TextLayout getTextLayout lineOffset getClientArea StyledTextEvent getLineBackgroundData lineOffset lineBackground lineBackground lineBackground lineBackground widgetBackground clearBackground isFullLineSelection selectionStart lineOffset selectionEnd lineOffset lineLength setBackground lineBackground setForeground lineBackground fillRectangle leftMargin leftMargin getHorizontalPixel selectionStart selectionEnd getLineBounds drawLineBreakSelection lineOffset setForeground widgetForeground setBackground lineBackground selectionStart selectionEnd selectionEnd lineOffset selectionStart lineOffset lineLength selectionStart lineOffset lineLength selectionEnd lineOffset getSelectionForeground getSelectionBackground disposeTextLayout
Draws the background of the line selection Implemented by subclasses for optional selection rendering p param line the line to draw param line Offset offset of the first character in the line Relative to the start of the document param styles line styles param paintY y location to draw at param gc GC to draw on param bidi the bidi object to use for measuring and rendering text in bidi locales null when not in bidi mode  lineOffset
Returns the visible client area that can be used for rendering p return the visible client area that can be used for rendering 
protected abstract Rectangle get Client Area Returns the class Styled Text Content class to use for line offset calculations p return the class Styled Text Content class to use for line offset calculations  getClientArea StyledTextContent StyledTextContent
protected abstract Styled Text Content get Content Returns the Device that is being rendered on p return the Device that is being rendered on Device get Device return device  StyledTextContent getContent getDevice
return device int get Baseline return ascent  getBaseline
Returns the text segments that should be treated as if they had a different direction than the surrounding text p param line Offset offset of the first character in the line 0 based from the beginning of the document param line text of the line to specify bidi segments for return text segments that should be treated as if they had a different direction than the surrounding text Only the start index of a segment is specified relative to the start of the line Always starts with 0 and ends with the line length exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the segment indices returned by the listener do not start with 0 are not in ascending order exceed the line length or have duplicates li ul  lineOffset IllegalArgumentException ERROR_INVALID_ARGUMENT
protected abstract int get Bidi Segments int line Offset String line Text Returns the Font according with the given style Font get Font int style switch style case SWT BOLD if bold Font null return bold Font return bold Font new Font device get Font Data style case SWT ITALIC if italic Font null return italic Font return italic Font new Font device get Font Data style case SWT BOLD SWT ITALIC if bold Italic Font null return bold Italic Font return bold Italic Font new Font device get Font Data style default return regular Font  getBidiSegments lineOffset lineText getFont boldFont boldFont boldFont getFontData italicFont italicFont italicFont getFontData boldItalicFont boldItalicFont boldItalicFont getFontData regularFont
Font Data get Font Data int style Font Data font Datas regular Font get Font Data for int i 0 i font Datas length i font Datas i set Style style return font Datas  FontData getFontData FontData fontDatas regularFont getFontData fontDatas fontDatas setStyle fontDatas
Returns the GC to use for rendering and measuring Allows subclasses to reuse G Cs p return the GC to use for rendering and measuring  GCs
protected abstract GC getGC Returns the horizontal scroll position p return the horizontal scroll position 
protected abstract int get Horizontal Pixel protected int get Left Margin return 0  getHorizontalPixel getLeftMargin
Returns the width in pixels of the space used to represent line delimiters return the width in pixels of the space used to represent line delimiters int get Line End Space Width return line End Space Width  getLineEndSpaceWidth lineEndSpaceWidth
Returns the line background data for the given line or null if there is none p param line Offset offset of the line start relative to the start of the content param line line to get line background data for return line background data for the given line may return null  lineOffset
protected abstract Styled Text Event get Line Background Data int line Offset String line Returns the height in pixels of a line p return the height in pixels of a line int get Line Height return ascent descent  StyledTextEvent getLineBackgroundData lineOffset getLineHeight
Returns the line style data for the specified line The line Offset and line may specify a segment of a logical line stored in the class Styled Text Content class of the widget The returned styles are guaranteed to be at least partially on the segment p param event the styles for the logical line param line Offset offset of the line start relative to the start of the content param line line to get line styles for return line style data for the given line segment Styles may start before line start and end after line end but are guaranteed to be at least partially on the line Styled Text Event get Line Style Data Styled Text Event event int line Offset String line int line Length line length if event styles null get Word Wrap event styles get Visual Line Style Data event styles line Offset line Length if event styles null event styles new Style Range 0 return event  lineOffset StyledTextContent lineOffset StyledTextEvent getLineStyleData StyledTextEvent lineOffset lineLength getWordWrap getVisualLineStyleData lineOffset lineLength StyleRange
Returns the line style data for the given line or null if there is none If there is a Line Style Listener but it does not set any styles the Styled Text Event styles field will be initialized to an empty array p param line Offset offset of the line start relative to the start of the content param line line to get line styles for return line style data for the given line Styles may start before line start and end after line end  LineStyleListener StyledTextEvent lineOffset
protected abstract Styled Text Event get Line Style Data int line Offset String line protected abstract int get Orientation  StyledTextEvent getLineStyleData lineOffset getOrientation
protected abstract int get Orientation protected int get Right Margin return 0  getOrientation getRightMargin
return 0 protected abstract Color get Selection Foreground  getSelectionForeground
protected abstract Color get Selection Foreground protected abstract Color get Selection Background  getSelectionForeground getSelectionBackground
protected abstract Color get Selection Background Returns the widget selection Implemented by subclasses for optional selection rendering p return the widget selection  getSelectionBackground
protected abstract Point get Selection Returns styles for the specified visual wrapped line p param logical Styles the styles for a logical unwrapped line param line Offset offset of the visual line param line Length length of the visual line return styles in the logical Styles array that are at least partially on the specified visual line Style Range get Visual Line Style Data Style Range logical Styles int line Offset int line Length int line End line Offset line Length int old Style Count logical Styles length int new Style Count 0 for int i 0 i old Style Count i Style Range style logical Styles i if style start line End style start style length line Offset new Style Count if new Style Count old Style Count Style Range new Styles new Style Range new Style Count for int i 0 j 0 i old Style Count i Style Range style logical Styles i if style start line End style start style length line Offset new Styles j logical Styles i logical Styles new Styles return logical Styles  getSelection logicalStyles lineOffset lineLength logicalStyles StyleRange getVisualLineStyleData StyleRange logicalStyles lineOffset lineLength lineEnd lineOffset lineLength oldStyleCount logicalStyles newStyleCount oldStyleCount StyleRange logicalStyles lineEnd lineOffset newStyleCount newStyleCount oldStyleCount StyleRange newStyles StyleRange newStyleCount oldStyleCount StyleRange logicalStyles lineEnd lineOffset newStyles logicalStyles logicalStyles newStyles logicalStyles
Returns the word wrap state p return true word wrap is on false no word wrap lines may extend beyond the right side of the client area 
protected abstract boolean get Word Wrap Returns whether the widget was created with the SWT FULL SELECTION style Implemented by subclasses for optional selection rendering p return true the widget is running in full line selection mode false otherwise  getWordWrap FULL_SELECTION
protected abstract boolean is Full Line Selection Calculates the width in pixel of a tab character p param tab Length number of space characters represented by a tab character void set Tab Length int tab Length GC gc getGC String Buffer tab Buffer new String Buffer tab Length for int i 0 i tab Length i tab Buffer append tab Width gc string Extent tab Buffer to String x disposeGC gc  isFullLineSelection tabLength setTabLength tabLength StringBuffer tabBuffer StringBuffer tabLength tabLength tabBuffer tabWidth stringExtent tabBuffer toString
Returns Text Layout given a line index and an array of styles Text Layout get Text Layout String line int line Offset Text Layout layout create Text Layout line Offset layout set Font regular Font layout set Ascent ascent layout set Descent descent layout set Text line layout set Orientation get Orientation layout set Segments get Bidi Segments line Offset line layout set Tabs new int tab Width int length line length Styled Text Event event get Line Style Data line Offset line Style Range styles event null event styles null int last Offset 0 if styles null for int style Index 0 style Index styles length style Index Style Range style styles style Index if style is Unstyled continue int start end if line Offset style start start 0 end Math min length style length line Offset style start else start style start line Offset end Math min length start style length if start length break if last Offset start layout set Style null last Offset start 1 Text Style text Style new Text Style get Font style font Style style foreground style background layout set Style text Style start end 1 last Offset end if last Offset length layout set Style null last Offset length return layout  TextLayout TextLayout getTextLayout lineOffset TextLayout createTextLayout lineOffset setFont regularFont setAscent setDescent setText setOrientation getOrientation setSegments getBidiSegments lineOffset setTabs tabWidth StyledTextEvent getLineStyleData lineOffset StyleRange lastOffset styleIndex styleIndex styleIndex StyleRange styleIndex isUnstyled lineOffset lineOffset lineOffset lastOffset setStyle lastOffset TextStyle textStyle TextStyle getFont fontStyle setStyle textStyle lastOffset lastOffset setStyle lastOffset
return layout Text Layout create Text Layout int line Offset return new Text Layout device  TextLayout createTextLayout lineOffset TextLayout
return new Text Layout device void dispose Text Layout Text Layout layout layout dispose  TextLayout disposeTextLayout TextLayout

public int font Style SWT NORMAL may be SWT NORMAL or SWT BOLD public Style Range  fontStyle StyleRange
Create a new style range p param start start offset of the style param length length of the style param foreground foreground color of the style null if none param background background color of the style null if none public Style Range int start int length Color foreground Color background this start start this length length this foreground foreground this background background  StyleRange
Create a new style range p param start start offset of the style param length length of the style param foreground foreground color of the style null if none param background background color of the style null if none param font Style font style of the style may be SWT NORMAL or SWT BOLD public Style Range int start int length Color foreground Color background int font Style this start start this length length this foreground foreground this background background this font Style font Style  fontStyle StyleRange fontStyle fontStyle fontStyle
Compare the specified object to this Style Range and answer if the two are equal The object must be an instance of Style Range and have the same field values p param object the object to compare with this object return true if the objects are equal false otherwise public boolean equals Object object Style Range style if object this return true if object instanceof Style Range style Style Range object else return false if this start style start return false if this length style length return false if this foreground null if this foreground equals style foreground return false else if style foreground null return false if this background null if this background equals style background return false else if style background null return false if this font Style style font Style return false return true  StyleRange StyleRange StyleRange StyleRange StyleRange fontStyle fontStyle
Returns an integer hash code for the receiver Objects which are equal answer the same value for this method p return the receiver s hash public int hash Code int code start length if foreground null code foreground hash Code if background null code background hash Code return code font Style  hashCode hashCode hashCode fontStyle
Returns whether or not the receiver is unstyled i e does not have any style attributes specified p return true if the receiver is unstyled false otherwise public boolean is Unstyled if this foreground null return false if this background null return false if this font Style SWT NORMAL return false return true  isUnstyled fontStyle
Compares the specified object to this Style Range and answer if the two are similar The object must be an instance of Style Range and have the same field values for except for start and length p param object the object to compare with this object return true if the objects are similar false otherwise public boolean similar To Style Range style if this foreground null if this foreground equals style foreground return false else if style foreground null return false if this background null if this background equals style background return false else if style background null return false if this font Style style font Style return false return true  StyleRange StyleRange similarTo StyleRange fontStyle fontStyle
Answers a new Style Range with the same values as this Style Range p return a shallow copy of this Style Range public Object clone Style Range style new Style Range start length foreground background font Style return style  StyleRange StyleRange StyleRange StyleRange StyleRange fontStyle
Answers a string description of the receiver p return a printable representation for the receiver public String to String String Buffer buf new String Buffer buf append start length fg foreground bg background f Style if font Style SWT NORMAL buf append normal else if font Style SWT BOLD buf append bold return buf to String  toString StringBuffer StringBuffer fStyle fontStyle fontStyle toString

Listener listener new Listener public void handle Event Event event switch event type case SWT Dispose dispose event break case SWT Focus In case SWT Focus Out redraw break case SWT Key Down key Down event break case SWT Paint paint event break case SWT Traverse traverse event break  handleEvent FocusIn FocusOut KeyDown keyDown
table Listener new Listener public void handle Event Event event switch event type case SWT Mouse Down table Mouse Down event break case SWT Focus In table Focus In event break  tableListener handleEvent MouseDown tableMouseDown FocusIn tableFocusIn
dispose Item Listener new Listener public void handle Event Event event row null column null resize  disposeItemListener handleEvent
dispose Column Listener new Listener public void handle Event Event event row null column null resize  disposeColumnListener handleEvent
resize Listener new Listener public void handle Event Event event resize  resizeListener handleEvent
Constructs a new instance of this class given its parent table and a style value describing its behavior and appearance p The style value is either one of the style constants defined in 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 Table control which will be the parent of the new instance cannot be null param style the style of control to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT BORDER see Widget check Subclass see Widget get Style public Table Cursor Table parent int style super parent style table parent set Background null set Foreground null Listener listener new Listener public void handle Event Event event switch event type case SWT Dispose dispose event break case SWT Focus In case SWT Focus Out redraw break case SWT Key Down key Down event break case SWT Paint paint event break case SWT Traverse traverse event break int events new int SWT Dispose SWT Focus In SWT Focus Out SWT Key Down SWT Paint SWT Traverse for int i 0 i events length i add Listener events i listener table Listener new Listener public void handle Event Event event switch event type case SWT Mouse Down table Mouse Down event break case SWT Focus In table Focus In event break table add Listener SWT Focus In table Listener table add Listener SWT Mouse Down table Listener dispose Item Listener new Listener public void handle Event Event event row null column null resize dispose Column Listener new Listener public void handle Event Event event row null column null resize resize Listener new Listener public void handle Event Event event resize Scroll Bar h Bar table get Horizontal Bar if h Bar null h Bar add Listener SWT Selection resize Listener Scroll Bar v Bar table get Vertical Bar if v Bar null v Bar add Listener SWT Selection resize Listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle TableCursor setBackground setForeground handleEvent FocusIn FocusOut KeyDown keyDown FocusIn FocusOut KeyDown addListener tableListener handleEvent MouseDown tableMouseDown FocusIn tableFocusIn addListener FocusIn tableListener addListener MouseDown tableListener disposeItemListener handleEvent disposeColumnListener handleEvent resizeListener handleEvent ScrollBar hBar getHorizontalBar hBar hBar addListener resizeListener ScrollBar vBar getVerticalBar vBar vBar addListener resizeListener
Adds the listener to the collection of listeners who will be notified when the receiver s selection changes by sending it one of the messages defined in the code Selection Listener code interface p When code widget Selected code is called the item field of the event object is valid If the reciever has code SWT CHECK code style set and the check selection changes the event object detail field contains the value code SWT CHECK code code widget Default Selected code is typically called when an item is double clicked p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see Selection Event see remove Selection Listener Selection Listener public void add Selection Listener Selection Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener SelectionEvent removeSelectionListener SelectionListener addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
void dispose Event event table remove Listener SWT Focus In table Listener table remove Listener SWT Mouse Down table Listener if column null column remove Listener SWT Dispose dispose Column Listener column remove Listener SWT Move resize Listener column remove Listener SWT Resize resize Listener column null if row null row remove Listener SWT Dispose dispose Item Listener row null Scroll Bar h Bar table get Horizontal Bar if h Bar null h Bar remove Listener SWT Selection resize Listener Scroll Bar v Bar table get Vertical Bar if v Bar null v Bar remove Listener SWT Selection resize Listener  removeListener FocusIn tableListener removeListener MouseDown tableListener removeListener disposeColumnListener removeListener resizeListener removeListener resizeListener removeListener disposeItemListener ScrollBar hBar getHorizontalBar hBar hBar removeListener resizeListener ScrollBar vBar getVerticalBar vBar vBar removeListener resizeListener
void key Down Event event if row null return switch event character case SWT CR notify Listeners SWT Default Selection new Event return int row Index table index Of row int column Index column null 0 table index Of column switch event key Code case SWT ARROW UP set Row Column Math max 0 row Index 1 column Index true break case SWT ARROW DOWN set Row Column Math min row Index 1 table get Item Count 1 column Index true break case SWT ARROW LEFT case SWT ARROW RIGHT int column Count table get Column Count if column Count 0 break int lead Key get Style SWT RIGHT TO LEFT 0 SWT ARROW RIGHT SWT ARROW LEFT if event key Code lead Key set Row Column row Index Math max 0 column Index 1 true else set Row Column row Index Math min column Count 1 column Index 1 true break case SWT HOME set Row Column 0 column Index true break case SWT END int i table get Item Count 1 set Row Column i column Index true break case SWT PAGE UP int index table get Top Index if index row Index Rectangle rect table get Client Area Table Item item table get Item index Rectangle item Rect item get Bounds 0 rect height item Rect y int height table get Item Height int page Math max 1 rect height height index Math max 0 index page 1 set Row Column index column Index true break case SWT PAGE DOWN int index table get Top Index Rectangle rect table get Client Area Table Item item table get Item index Rectangle item Rect item get Bounds 0 rect height item Rect y int height table get Item Height int page Math max 1 rect height height int end table get Item Count 1 index Math min end index page 1 if index row Index index Math min end index page 1 set Row Column index column Index true break  keyDown notifyListeners DefaultSelection rowIndex indexOf columnIndex indexOf keyCode ARROW_UP setRowColumn rowIndex columnIndex ARROW_DOWN setRowColumn rowIndex getItemCount columnIndex ARROW_LEFT ARROW_RIGHT columnCount getColumnCount columnCount leadKey getStyle RIGHT_TO_LEFT ARROW_RIGHT ARROW_LEFT keyCode leadKey setRowColumn rowIndex columnIndex setRowColumn rowIndex columnCount columnIndex setRowColumn columnIndex getItemCount setRowColumn columnIndex PAGE_UP getTopIndex rowIndex getClientArea TableItem getItem itemRect getBounds itemRect getItemHeight setRowColumn columnIndex PAGE_DOWN getTopIndex getClientArea TableItem getItem itemRect getBounds itemRect getItemHeight getItemCount rowIndex setRowColumn columnIndex
void paint Event event if row null return int column Index column null 0 table index Of column GC gc event gc Display display get Display gc set Background get Background gc set Foreground get Foreground gc fill Rectangle event x event y event width event height int x 0 Point size get Size Image image row get Image column Index if image null Rectangle image Size image get Bounds int imageY size y image Size height 2 gc draw Image image x imageY x image Size width String text row get Text column Index if text NON NLS 1 Rectangle bounds row get Bounds column Index Point extent gc string Extent text Temporary code need a better way to determine table trim String platform SWT get Platform if win32 equals platform NON NLS 1 if table get Column Count 0 column Index 0 x 2 else int alignmnent column get Alignment switch alignmnent case SWT LEFT x 6 break case SWT RIGHT x bounds width extent x 6 break case SWT CENTER x bounds width x extent x 2 break else if table get Column Count 0 x 5 else int alignmnent column get Alignment switch alignmnent case SWT LEFT x 5 break case SWT RIGHT x bounds width extent x 2 break case SWT CENTER x bounds width x extent x 2 2 break int textY size y extent y 2 gc draw String text x textY if is Focus Control gc set Background display get System Color SWT COLOR BLACK gc set Foreground display get System Color SWT COLOR WHITE gc draw Focus 0 0 size x size y  columnIndex indexOf getDisplay setBackground getBackground setForeground getForeground fillRectangle getSize getImage columnIndex imageSize getBounds imageSize drawImage imageSize getText columnIndex getBounds columnIndex stringExtent getPlatform getColumnCount columnIndex getAlignment getColumnCount getAlignment drawString isFocusControl setBackground getSystemColor COLOR_BLACK setForeground getSystemColor COLOR_WHITE drawFocus
void table Focus In Event event if is Disposed return if is Visible set Focus  tableFocusIn isDisposed isVisible setFocus
void table Mouse Down Event event if is Disposed is Visible return Point pt new Point event x event y Rectangle client Rect table get Client Area int column Count table get Column Count int max Column Index column Count 0 0 column Count 1 int start table get Top Index int end table get Item Count for int i start i end i Table Item item table get Item i for int j 0 j max Column Index j Rectangle rect item get Bounds j if rect y client Rect y client Rect height return if rect contains pt set Row Column i j true set Focus return  tableMouseDown isDisposed isVisible clientRect getClientArea columnCount getColumnCount maxColumnIndex columnCount columnCount getTopIndex getItemCount TableItem getItem maxColumnIndex getBounds clientRect clientRect setRowColumn setFocus
void traverse Event event switch event detail case SWT TRAVERSE ARROW NEXT case SWT TRAVERSE ARROW PREVIOUS case SWT TRAVERSE RETURN event doit false return event doit true  TRAVERSE_ARROW_NEXT TRAVERSE_ARROW_PREVIOUS TRAVERSE_RETURN
void set Row Column int row int column boolean notify Table Item item row 1 null table get Item row Table Column col column 1 table get Column Count 0 null table get Column column set Row Column item col notify  setRowColumn TableItem getItem TableColumn getColumnCount getColumn setRowColumn
void set Row Column Table Item row Table Column column boolean notify if this row row this column column return if this row null this row row this row remove Listener SWT Dispose dispose Item Listener this row null if this column null this column column this column remove Listener SWT Dispose dispose Column Listener this column remove Listener SWT Move resize Listener this column remove Listener SWT Resize resize Listener this column null if row null if this row row this row row row add Listener SWT Dispose dispose Item Listener table show Item row if this column column column null this column column column add Listener SWT Dispose dispose Column Listener column add Listener SWT Move resize Listener column add Listener SWT Resize resize Listener table show Column column int column Index column null 0 table index Of column set Bounds row get Bounds column Index redraw if notify notify Listeners SWT Selection new Event  setRowColumn TableItem TableColumn removeListener disposeItemListener removeListener disposeColumnListener removeListener resizeListener removeListener resizeListener addListener disposeItemListener showItem addListener disposeColumnListener addListener resizeListener addListener resizeListener showColumn columnIndex indexOf setBounds getBounds columnIndex notifyListeners
public void set Visible boolean visible check Widget if visible resize super set Visible visible  setVisible checkWidget setVisible
Removes the listener from the collection of listeners who will be notified when the receiver s selection changes param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener Selection Listener since 3 0 public void remove Selection Listener Selection Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT remove Listener SWT Selection listener remove Listener SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener SelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT removeListener removeListener DefaultSelection
void resize if row null set Bounds 200 200 0 0 else int column Index column null 0 table index Of column set Bounds row get Bounds column Index  setBounds columnIndex indexOf setBounds getBounds columnIndex
Returns the column over which the Table Cursor is positioned return the column for the current position 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 int get Column check Widget return column null 0 table index Of column  TableCursor SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getColumn checkWidget indexOf
Returns the row over which the Table Cursor is positioned return the item for the current position 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 Table Item get Row check Widget return row  TableCursor SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TableItem getRow checkWidget
public void set Background Color color if color null color get Display get System Color BACKGROUND super set Background color redraw  setBackground getDisplay getSystemColor setBackground
public void set Foreground Color color if color null color get Display get System Color FOREGROUND super set Foreground color redraw  setForeground getDisplay getSystemColor setForeground
Positions the Table Cursor over the cell at the given row and column in the parent table param row the index of the row for the cell to select param column the index of column for the cell to select 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 set Selection int row int column check Widget int column Count table get Column Count int max Column Index column Count 0 0 column Count 1 if row 0 row table get Item Count column 0 column max Column Index SWT error SWT ERROR INVALID ARGUMENT set Row Column row column false  TableCursor SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget columnCount getColumnCount maxColumnIndex columnCount columnCount getItemCount maxColumnIndex ERROR_INVALID_ARGUMENT setRowColumn
Positions the Table Cursor over the cell at the given row and column in the parent table param row the Table Item of the row for the cell to select param column the index of column for the cell to select 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 set Selection Table Item row int column check Widget int column Count table get Column Count int max Column Index column Count 0 0 column Count 1 if row null row is Disposed column 0 column max Column Index SWT error SWT ERROR INVALID ARGUMENT set Row Column table index Of row column false  TableCursor TableItem SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection TableItem checkWidget columnCount getColumnCount maxColumnIndex columnCount columnCount isDisposed maxColumnIndex ERROR_INVALID_ARGUMENT setRowColumn indexOf

column Listener new Control Listener public void control Moved Control Event e resize  columnListener ControlListener controlMoved ControlEvent
resize public void control Resized Control Event e resize  controlResized ControlEvent
Control Listener column Listener Creates a Table Editor for the specified Table param table the Table Control above which this editor will be displayed public Table Editor Table table super table this table table column Listener new Control Listener public void control Moved Control Event e resize public void control Resized Control Event e resize To be consistent with older versions of SWT grab Vertical defaults to true grab Vertical true  ControlListener columnListener TableEditor TableEditor columnListener ControlListener controlMoved ControlEvent controlResized ControlEvent grabVertical grabVertical
Rectangle compute Bounds if item null column 1 item is Disposed return new Rectangle 0 0 0 0 Rectangle cell item get Bounds column Rectangle rect item get Image Bounds column cell x rect x rect width cell width rect width Rectangle area table get Client Area if cell x area x area width if cell x cell width area x area width cell width area x area width cell x Rectangle editor Rect new Rectangle cell x cell y minimum Width minimum Height if grab Horizontal editor Rect width Math max cell width minimum Width if grab Vertical editor Rect height Math max cell height minimum Height if horizontal Alignment SWT RIGHT editor Rect x cell width editor Rect width else if horizontal Alignment SWT LEFT do nothing cell x is the right answer else default is CENTER editor Rect x cell width editor Rect width 2 if vertical Alignment SWT BOTTOM editor Rect y cell height editor Rect height else if vertical Alignment SWT TOP do nothing cell y is the right answer else default is CENTER editor Rect y cell height editor Rect height 2 return editor Rect  computeBounds isDisposed getBounds getImageBounds getClientArea editorRect minimumWidth minimumHeight grabHorizontal editorRect minimumWidth grabVertical editorRect minimumHeight horizontalAlignment editorRect editorRect horizontalAlignment editorRect editorRect verticalAlignment editorRect editorRect verticalAlignment editorRect editorRect editorRect
Removes all associations between the Table Editor and the cell in the table The Table and the editor Control are b not b disposed public void dispose if this column 1 this column table get Column Count Table Column table Column table get Column this column table Column remove Control Listener column Listener column Listener null table null item null column 1 super dispose  TableEditor getColumnCount TableColumn tableColumn getColumn tableColumn removeControlListener columnListener columnListener
Returns the zero based index of the column of the cell being tracked by this editor return the zero based index of the column of the cell being tracked by this editor public int get Column return column  getColumn
Returns the Table Item for the row of the cell being tracked by this editor return the Table Item for the row of the cell being tracked by this editor public Table Item get Item return item  TableItem TableItem TableItem getItem
public void set Column int column int column Count table get Column Count Separately handle the case where the table has no Table Columns In this situation there is a single default column if column Count 0 this column column 0 0 1 resize return if this column 1 this column column Count Table Column table Column table get Column this column table Column remove Control Listener column Listener this column 1 if column 0 column table get Column Count return this column column Table Column table Column table get Column this column table Column add Control Listener column Listener resize  setColumn columnCount getColumnCount TableColumns columnCount columnCount TableColumn tableColumn getColumn tableColumn removeControlListener columnListener getColumnCount TableColumn tableColumn getColumn tableColumn addControlListener columnListener
resize public void set Item Table Item item this item item resize  setItem TableItem
Specify the Control that is to be displayed and the cell in the table that it is to be positioned above p Note The Control provided as the editor b must b be created with its parent being the Table control specified in the Table Editor constructor param editor the Control that is displayed above the cell being edited param item the Table Item for the row of the cell being tracked by this editor param column the zero based index of the column of the cell being tracked by this editor public void set Editor Control editor Table Item item int column set Item item set Column column set Editor editor  TableEditor TableItem setEditor TableItem setItem setColumn setEditor
void resize if table is Disposed return if item null item is Disposed return int column Count table get Column Count if column Count 0 column 0 return if column Count 0 column 0 column column Count return super resize  isDisposed isDisposed columnCount getColumnCount columnCount columnCount columnCount

Listener table Listener new Listener public void handle Event Event e switch e type case SWT Mouse Down on Mouse Down e break case SWT Selection on Selection e break case SWT Default Selection on Selection e break case SWT Key Down on Key Down e break  tableListener handleEvent MouseDown onMouseDown onSelection DefaultSelection onSelection KeyDown onKeyDown
Listener listener new Listener public void handle Event Event e switch e type case SWT Dispose on Dispose e break case SWT Resize on Resize e break case SWT Focus In on Focus In e break  handleEvent onDispose onResize FocusIn onFocusIn
Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT SINGLE see SWT MULTI see SWT CHECK see SWT FULL SELECTION see get Style public Table Tree Composite parent int style super parent check Style style table new Table this style Listener table Listener new Listener public void handle Event Event e switch e type case SWT Mouse Down on Mouse Down e break case SWT Selection on Selection e break case SWT Default Selection on Selection e break case SWT Key Down on Key Down e break int table Events new int SWT Mouse Down SWT Selection SWT Default Selection SWT Key Down for int i 0 i table Events length i table add Listener table Events i table Listener Listener listener new Listener public void handle Event Event e switch e type case SWT Dispose on Dispose e break case SWT Resize on Resize e break case SWT Focus In on Focus In e break int events new int SWT Dispose SWT Resize SWT Focus In for int i 0 i events length i add Listener events i listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS FULL_SELECTION getStyle TableTree checkStyle tableListener handleEvent MouseDown onMouseDown onSelection DefaultSelection onSelection KeyDown onKeyDown tableEvents MouseDown DefaultSelection KeyDown tableEvents addListener tableEvents tableListener handleEvent onDispose onResize FocusIn onFocusIn FocusIn addListener
int add Item Table Tree Item item int index if index 0 index items length SWT error SWT ERROR INVALID ARGUMENT Table Tree Item new Items new Table Tree Item items length 1 System arraycopy items 0 new Items 0 index new Items index item System arraycopy items index new Items index 1 items length index items new Items Return the index in the table where this table should be inserted if index items length 1 return table get Item Count else return table index Of items index 1 table Item  addItem TableTreeItem ERROR_INVALID_ARGUMENT TableTreeItem newItems TableTreeItem newItems newItems newItems newItems getItemCount indexOf tableItem
Adds the listener to the collection of listeners who will be notified when the receiver s selection changes by sending it one of the messages defined in the code Selection Listener code interface p When code widget Selected code is called the item field of the event object is valid If the reciever has code SWT CHECK code style set and the check selection changes the event object detail field contains the value code SWT CHECK code code widget Default Selected code is typically called when an item is double clicked The item field of the event object is valid for default selection but the detail field is not used p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event public void add Selection Listener Selection Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
Adds the listener to the collection of listeners who will be notified when an item in the receiver is expanded or collapsed by sending it one of the messages defined in the code Tree Listener code interface param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Tree Listener see remove Tree Listener public void add Tree Listener Tree Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Expand typed Listener add Listener SWT Collapse typed Listener  TreeListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TreeListener removeTreeListener addTreeListener TreeListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener typedListener
private static int check Style int style int mask SWT LEFT TO RIGHT SWT RIGHT TO LEFT style style mask return style  checkStyle LEFT_TO_RIGHT RIGHT_TO_LEFT
return style public Point compute Size int w Hint int h Hint boolean changed check Widget return table compute Size w Hint h Hint changed  computeSize wHint hHint checkWidget computeSize wHint hHint
return table compute Size w Hint h Hint changed public Rectangle compute Trim int x int y int width int height check Widget return table compute Trim x y width height  computeSize wHint hHint computeTrim checkWidget computeTrim
Deselects all items p If an item is selected it is deselected If an item is not selected it remains unselected exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li ERROR WIDGET DISPOSED when the widget has been disposed ul public void deselect All check Widget table deselect All  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED deselectAll checkWidget deselectAll
Expand upward from the specified leaf item void expand Item Table Tree Item item if item null return expand Item item parent Item if item get Visible item set Visible true if item expanded item items length 0 item set Expanded true Event event new Event event item item notify Listeners SWT Expand event  expandItem TableTreeItem expandItem parentItem getVisible setVisible setExpanded notifyListeners
public Color get Background This method must be overriden otherwise in a Table Tree in which the first item has no sub items a grey Widget background colour square will appear in the first column of the first item It is not possible in the constructor to set the background of the Table Tree to be the same as the background of the Table because this interferes with the Table Tree adapting to changes in the System color settings return table get Background  getBackground TableTree TableTree TableTree getBackground
return table get Background public Rectangle get Client Area return table get Client Area  getBackground getClientArea getClientArea
return table get Client Area public Color get Foreground return table get Foreground  getClientArea getForeground getForeground
return table get Foreground public Font get Font return table get Font  getForeground getFont getFont
Gets the number of items p return the number of items in the widget public int get Item Count check Widget return items length  getItemCount checkWidget
Gets the height of one item p This operation will fail if the height of one item could not be queried from the OS return the height of one item in the widget exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li ERROR WIDGET DISPOSED when the widget has been disposed li ERROR CANNOT GET ITEM HEIGHT when the operation fails ul public int get Item Height check Widget return table get Item Height  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED ERROR_CANNOT_GET_ITEM_HEIGHT getItemHeight checkWidget getItemHeight
Gets the items p return the items in the widget public Table Tree Item get Items check Widget Table Tree Item new Items new Table Tree Item items length System arraycopy items 0 new Items 0 items length return new Items  TableTreeItem getItems checkWidget TableTreeItem newItems TableTreeItem newItems newItems
Gets the selected items p This operation will fail if the selected items cannot be queried from the OS return the selected items in the widget exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li li ERROR WIDGET DISPOSED when the widget has been disposed li li ERROR CANNOT GET SELECTION when the operation fails li ul public Table Tree Item get Selection check Widget Table Item selection table get Selection Table Tree Item result new Table Tree Item selection length for int i 0 i selection length i result i Table Tree Item selection i get Data ITEMID return result  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED ERROR_CANNOT_GET_SELECTION TableTreeItem getSelection checkWidget TableItem getSelection TableTreeItem TableTreeItem TableTreeItem getData
Gets the number of selected items p This operation will fail if the number of selected items cannot be queried from the OS return the number of selected items in the widget exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li li ERROR WIDGET DISPOSED when the widget has been disposed li li ERROR CANNOT GET COUNT when the operation fails li ul public int get Selection Count check Widget return table get Selection Count  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED ERROR_CANNOT_GET_COUNT getSelectionCount checkWidget getSelectionCount
public int get Style check Widget return table get Style  getStyle checkWidget getStyle
Returns the underlying Table control return the underlying Table control public Table get Table check Widget return table  getTable checkWidget
void create Images int item Height size Image get Bounds height Calculate border around image At least 9 pixels are needed to draw the image Leave at least a 6 pixel border int indent Math min 6 item Height 9 2 indent Math max 0 indent int size Math max 10 item Height 2 indent size size 1 2 2 size must be an even number int midpoint indent size 2 Color foreground get Foreground Color plus Minus get Display get System Color SWT COLOR WIDGET NORMAL SHADOW Color background get Background Plus image Palette Data palette new Palette Data new RGB foreground getRGB background getRGB plus Minus getRGB Image Data image Data new Image Data item Height item Height 4 palette image Data transparent Pixel 1 plus Image new Image get Display image Data GC gc new GC plus Image gc set Background background gc fill Rectangle 0 0 item Height item Height gc set Foreground plus Minus gc draw Rectangle indent indent size size gc set Foreground foreground gc draw Line midpoint indent 2 midpoint indent size 2 gc draw Line indent 2 midpoint indent size 2 midpoint gc dispose Minus image palette new Palette Data new RGB foreground getRGB background getRGB plus Minus getRGB image Data new Image Data item Height item Height 4 palette image Data transparent Pixel 1 minus Image new Image get Display image Data gc new GC minus Image gc set Background background gc fill Rectangle 0 0 item Height item Height gc set Foreground plus Minus gc draw Rectangle indent indent size size gc set Foreground foreground gc draw Line indent 2 midpoint indent size 2 midpoint gc dispose  createImages itemHeight sizeImage getBounds itemHeight itemHeight getForeground plusMinus getDisplay getSystemColor COLOR_WIDGET_NORMAL_SHADOW getBackground PaletteData PaletteData plusMinus ImageData imageData ImageData itemHeight itemHeight imageData transparentPixel plusImage getDisplay imageData plusImage setBackground fillRectangle itemHeight itemHeight setForeground plusMinus drawRectangle setForeground drawLine drawLine PaletteData plusMinus imageData ImageData itemHeight itemHeight imageData transparentPixel minusImage getDisplay imageData minusImage setBackground fillRectangle itemHeight itemHeight setForeground plusMinus drawRectangle setForeground drawLine
Image get Plus Image if plus Image null create Images return plus Image  getPlusImage plusImage createImages plusImage
Image get Minus Image if minus Image null create Images return minus Image  getMinusImage minusImage createImages minusImage
Gets the index of an item p The widget is searched starting at 0 until an item is found that is equal to the search item If no item is found 1 is returned Indexing is zero based This index is relative to the parent only param item the search item return the index of the item or 1 public int index Of Table Tree Item item check Widget for int i 0 i items length i if item items i return i return 1  indexOf TableTreeItem checkWidget
void on Dispose Event e Usually when an item is disposed destroy Item will change the size of the items array and dispose of the underlying table items Since the whole table tree is being disposed this is not necessary For speed the in Dispose flag is used to skip over this part of the item dispose in Dispose true for int i 0 i items length i items i dispose in Dispose false if plus Image null plus Image dispose if minus Image null minus Image dispose if size Image null size Image dispose plus Image minus Image size Image null  onDispose destroyItem inDispose inDispose inDispose plusImage plusImage minusImage minusImage sizeImage sizeImage plusImage minusImage sizeImage
void on Resize Event e Point size get Size table set Bounds 0 0 size x size y  onResize getSize setBounds
void on Selection Event e Event event new Event Table Item table Item Table Item e item Table Tree Item item get Item table Item event item item if e type SWT Selection e detail SWT CHECK item null event detail SWT CHECK item checked table Item get Checked notify Listeners e type event  onSelection TableItem tableItem TableItem TableTreeItem getItem tableItem tableItem getChecked notifyListeners
Returns the item at the given point in the receiver or null if no such item exists The point is in the coordinate system of the receiver param point the point used to locate the item return the item at the given point exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the point is null li ul 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 Table Tree Item get Item Point point check Widget Table Item item table get Item point if item null return null return get Item item  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TableTreeItem getItem checkWidget TableItem getItem getItem
Table Tree Item get Item Table Item table Item if table Item null return null for int i 0 i items length i Table Tree Item item items i get Item table Item if item null return item return null  TableTreeItem getItem TableItem tableItem tableItem TableTreeItem getItem tableItem
return null void on Focus In Event e table set Focus  onFocusIn setFocus
void on Key Down Event e Table Tree Item selection get Selection if selection length 0 return Table Tree Item item selection 0 int type 0 if e key Code SWT ARROW RIGHT e key Code SWT ARROW LEFT int trail Key get Style SWT MIRRORED 0 SWT ARROW LEFT SWT ARROW RIGHT if e key Code trail Key if item get Item Count 0 return if item get Expanded Table Tree Item new Selection item get Items 0 table set Selection new Table Item new Selection table Item show Item new Selection type SWT Selection else item set Expanded true type SWT Expand else if item get Expanded item set Expanded false type SWT Collapse else Table Tree Item parent item get Parent Item if parent null int index parent index Of item if index 0 return table set Selection new Table Item parent table Item type SWT Selection if e character item expand All true if e character if item get Expanded item set Expanded false type SWT Collapse if e character if item get Item Count 0 item get Expanded item set Expanded true type SWT Expand if type 0 return Event event new Event event item item notify Listeners type event  onKeyDown TableTreeItem getSelection TableTreeItem keyCode ARROW_RIGHT keyCode ARROW_LEFT trailKey getStyle ARROW_LEFT ARROW_RIGHT keyCode trailKey getItemCount getExpanded TableTreeItem newSelection getItems setSelection TableItem newSelection tableItem showItem newSelection setExpanded getExpanded setExpanded TableTreeItem getParentItem indexOf setSelection TableItem tableItem expandAll getExpanded setExpanded getItemCount getExpanded setExpanded notifyListeners
void on Mouse Down Event event If user clicked on the or expand or collapse the tree Table Item items table get Items for int i 0 i items length i Rectangle rect items i get Image Bounds 0 if rect contains event x event y Table Tree Item item Table Tree Item items i get Data ITEMID event new Event event item item item set Expanded item get Expanded if item get Expanded notify Listeners SWT Expand event else notify Listeners SWT Collapse event return  onMouseDown TableItem getItems getImageBounds TableTreeItem TableTreeItem getData setExpanded getExpanded getExpanded notifyListeners notifyListeners
Removes all items p This operation will fail when an item could not be removed in the OS exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li ERROR WIDGET DISPOSED when the widget has been disposed li ERROR ITEM NOT REMOVED when the operation fails ul public void remove All check Widget set Redraw false for int i items length 1 i 0 i items i dispose items EMPTY ITEMS set Redraw true  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED ERROR_ITEM_NOT_REMOVED removeAll checkWidget setRedraw EMPTY_ITEMS setRedraw
void remove Item Table Tree Item item int index 0 while index items length items index item index if index items length return Table Tree Item new Items new Table Tree Item items length 1 System arraycopy items 0 new Items 0 index System arraycopy items index 1 new Items index items length index 1 items new Items  removeItem TableTreeItem TableTreeItem newItems TableTreeItem newItems newItems newItems
Removes the listener from the collection of listeners who will be notified when the receiver s selection changes param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT remove Listener SWT Selection listener remove Listener SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT removeListener removeListener DefaultSelection
Removes the listener from the collection of listeners who will be notified when items in the receiver are expanded or collapsed param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Tree Listener see add Tree Listener public void remove Tree Listener Tree Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT remove Listener SWT Expand listener remove Listener SWT Collapse listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TreeListener addTreeListener removeTreeListener TreeListener checkWidget ERROR_NULL_ARGUMENT removeListener removeListener
Selects all of the items in the receiver p If the receiver is single select do nothing exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li ERROR WIDGET DISPOSED when the widget has been disposed ul public void select All check Widget table select All  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED selectAll checkWidget selectAll
public void set Background Color color super set Background color table set Background color if size Image null GC gc new GC size Image gc set Background get Background Rectangle size size Image get Bounds gc fill Rectangle size gc dispose  setBackground setBackground setBackground sizeImage sizeImage setBackground getBackground sizeImage getBounds fillRectangle
public void set Enabled boolean enabled super set Enabled enabled table set Enabled enabled  setEnabled setEnabled setEnabled
table set Enabled enabled public void set Font Font font super set Font font table set Font font  setEnabled setFont setFont setFont
table set Font font public void set Foreground Color color super set Foreground color table set Foreground color  setFont setForeground setForeground setForeground
table set Foreground color public void set Menu Menu menu super set Menu menu table set Menu menu  setForeground setMenu setMenu setMenu
Sets the receiver s selection to be the given array of items The current selection is cleared before the new items are selected p Items that are not in the receiver are ignored If the receiver is single select and multiple items are specified then all items are ignored param items the array of items exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the array of items is null li li ERROR INVALID ARGUMENT if one of the item has been disposed li ul 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 Table Tree deselect All public void set Selection Table Tree Item items check Widget if items null SWT error SWT ERROR NULL ARGUMENT int length items length if length 0 table get Style SWT SINGLE 0 length 1 deselect All return Table Item table Items new Table Item length for int i 0 i length i if items i null SWT error SWT ERROR NULL ARGUMENT if items i get Visible expand Item items i table Items i items i table Item table set Selection table Items  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TableTree deselectAll setSelection TableTreeItem checkWidget ERROR_NULL_ARGUMENT getStyle deselectAll TableItem tableItems TableItem ERROR_NULL_ARGUMENT getVisible expandItem tableItems tableItem setSelection tableItems
table set Selection table Items public void set Tool Tip Text String string super set Tool Tip Text string table set Tool Tip Text string  setSelection tableItems setToolTipText setToolTipText setToolTipText
Shows the item If the item is already showing in the receiver this method simply returns Otherwise the items are scrolled and expanded until the item is visible param item the item to be shown exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the item is null li li ERROR INVALID ARGUMENT if the item has been disposed li ul 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 Table Tree show Selection public void show Item Table Tree Item item check Widget if item null SWT error SWT ERROR NULL ARGUMENT if item get Visible expand Item item Table Item table Item item table Item table show Item table Item  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TableTree showSelection showItem TableTreeItem checkWidget ERROR_NULL_ARGUMENT getVisible expandItem TableItem tableItem tableItem showItem tableItem
Shows the selection p If there is no selection or the selection is already visible this method does nothing If the selection is scrolled out of view the top index of the widget is changed such that selection becomes visible exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li ERROR WIDGET DISPOSED when the widget has been disposed ul public void show Selection check Widget table show Selection  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED showSelection checkWidget showSelection

final Runnable runnable new Runnable public void run if editor null editor is Disposed return if Table Tree Editor this table Tree is Disposed return resize editor set Visible true  isDisposed TableTreeEditor tableTree isDisposed setVisible
public void tree Collapsed Tree Event e if editor null editor is Disposed return Display display Table Tree Editor this table Tree get Display editor set Visible false display async Exec runnable  treeCollapsed TreeEvent isDisposed TableTreeEditor tableTree getDisplay setVisible asyncExec
public void tree Expanded Tree Event e if editor null editor is Disposed return Display display Table Tree Editor this table Tree get Display editor set Visible false display async Exec runnable  treeExpanded TreeEvent isDisposed TableTreeEditor tableTree getDisplay setVisible asyncExec
column Listener new Control Listener public void control Moved Control Event e resize  columnListener ControlListener controlMoved ControlEvent
resize public void control Resized Control Event e resize  controlResized ControlEvent
Tree Listener tree Listener Creates a Table Tree Editor for the specified Table Tree param table Tree the Table Tree Control above which this editor will be displayed public Table Tree Editor Table Tree table Tree super table Tree get Table this table Tree table Tree tree Listener new Tree Listener final Runnable runnable new Runnable public void run if editor null editor is Disposed return if Table Tree Editor this table Tree is Disposed return resize editor set Visible true public void tree Collapsed Tree Event e if editor null editor is Disposed return Display display Table Tree Editor this table Tree get Display editor set Visible false display async Exec runnable public void tree Expanded Tree Event e if editor null editor is Disposed return Display display Table Tree Editor this table Tree get Display editor set Visible false display async Exec runnable table Tree add Tree Listener tree Listener column Listener new Control Listener public void control Moved Control Event e resize public void control Resized Control Event e resize To be consistent with older versions of SWT grab Vertical defaults to true grab Vertical true  TreeListener treeListener TableTreeEditor TableTree tableTree TableTree TableTreeEditor TableTree tableTree tableTree getTable tableTree tableTree treeListener TreeListener isDisposed TableTreeEditor tableTree isDisposed setVisible treeCollapsed TreeEvent isDisposed TableTreeEditor tableTree getDisplay setVisible asyncExec treeExpanded TreeEvent isDisposed TableTreeEditor tableTree getDisplay setVisible asyncExec tableTree addTreeListener treeListener columnListener ControlListener controlMoved ControlEvent controlResized ControlEvent grabVertical grabVertical
Rectangle compute Bounds if item null column 1 item is Disposed item table Item null return new Rectangle 0 0 0 0 Rectangle cell item get Bounds column Rectangle area table Tree get Client Area if cell x area x area width if cell x cell width area x area width cell width area x area width cell x Rectangle editor Rect new Rectangle cell x cell y minimum Width minimum Height if grab Horizontal editor Rect width Math max cell width minimum Width if grab Vertical editor Rect height Math max cell height minimum Height if horizontal Alignment SWT RIGHT editor Rect x cell width editor Rect width else if horizontal Alignment SWT LEFT do nothing cell x is the right answer else default is CENTER editor Rect x cell width editor Rect width 2 if vertical Alignment SWT BOTTOM editor Rect y cell height editor Rect height else if vertical Alignment SWT TOP do nothing cell y is the right answer else default is CENTER editor Rect y cell height editor Rect height 2 return editor Rect  computeBounds isDisposed tableItem getBounds tableTree getClientArea editorRect minimumWidth minimumHeight grabHorizontal editorRect minimumWidth grabVertical editorRect minimumHeight horizontalAlignment editorRect editorRect horizontalAlignment editorRect editorRect verticalAlignment editorRect editorRect verticalAlignment editorRect editorRect editorRect
Removes all associations between the Table Tree Editor and the cell in the table tree The Table Tree and the editor Control are b not b disposed public void dispose if tree Listener null table Tree remove Tree Listener tree Listener tree Listener null Table table table Tree get Table if this column 1 this column table get Column Count Table Column table Column table get Column this column table Column remove Control Listener column Listener table Tree null item null column 1 super dispose  TableTreeEditor TableTree treeListener tableTree removeTreeListener treeListener treeListener tableTree getTable getColumnCount TableColumn tableColumn getColumn tableColumn removeControlListener columnListener tableTree
Returns the zero based index of the column of the cell being tracked by this editor return the zero based index of the column of the cell being tracked by this editor public int get Column return column  getColumn
Returns the Table Tree Item for the row of the cell being tracked by this editor return the Table Tree Item for the row of the cell being tracked by this editor public Table Tree Item get Item return item  TableTreeItem TableTreeItem TableTreeItem getItem
public void set Column int column Table table table Tree get Table int column Count table get Column Count Separately handle the case where the table has no Table Columns In this situation there is a single default column if column Count 0 this column column 0 0 1 resize return if this column 1 this column column Count Table Column table Column table get Column this column table Column remove Control Listener column Listener this column 1 if column 0 column table get Column Count return this column column Table Column table Column table get Column this column table Column add Control Listener column Listener resize  setColumn tableTree getTable columnCount getColumnCount TableColumns columnCount columnCount TableColumn tableColumn getColumn tableColumn removeControlListener columnListener getColumnCount TableColumn tableColumn getColumn tableColumn addControlListener columnListener
resize public void set Item Table Tree Item item this item item resize  setItem TableTreeItem
Specify the Control that is to be displayed and the cell in the table that it is to be positioned above p Note The Control provided as the editor b must b be created with its parent being the Table control specified in the Table Editor constructor param editor the Control that is displayed above the cell being edited param item the Table Item for the row of the cell being tracked by this editor param column the zero based index of the column of the cell being tracked by this editor public void set Editor Control editor Table Tree Item item int column set Item item set Column column set Editor editor  TableEditor TableItem setEditor TableTreeItem setItem setColumn setEditor
void resize if table Tree is Disposed return if item null item is Disposed return Table table table Tree get Table int column Count table get Column Count if column Count 0 column 0 return if column Count 0 column 0 column column Count return super resize  tableTree isDisposed isDisposed tableTree getTable columnCount getColumnCount columnCount columnCount columnCount

Constructs a new instance of this class given its parent which must be a code Table Tree code and a style value describing its behavior and appearance The item is added to the end of the items maintained by its parent p The style value is either one of the style constants defined in 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT see Widget get Style public Table Tree Item Table Tree parent int style this parent style parent get Item Count  TableTree IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle TableTreeItem TableTree getItemCount
Constructs a new instance of this class given its parent which must be a code Table Tree code a style value describing its behavior and appearance and the index at which to place it in the items maintained by its parent p The style value is either one of the style constants defined in 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 param index the index to store the receiver in its parent exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT see Widget get Style public Table Tree Item Table Tree parent int style int index this parent null style index  TableTree IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle TableTreeItem TableTree
Constructs a new instance of this class given its parent which must be a code Table Tree Item code and a style value describing its behavior and appearance The item is added to the end of the items maintained by its parent p The style value is either one of the style constants defined in 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT see Widget get Style public Table Tree Item Table Tree Item parent int style this parent style parent get Item Count  TableTreeItem IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle TableTreeItem TableTreeItem getItemCount
Constructs a new instance of this class given its parent which must be a code Table Tree Item code a style value describing its behavior and appearance and the index at which to place it in the items maintained by its parent p The style value is either one of the style constants defined in 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 param index the index to store the receiver in its parent exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT see Widget get Style public Table Tree Item Table Tree Item parent int style int index this parent get Parent parent style index  TableTreeItem IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle TableTreeItem TableTreeItem getParent
Table Tree Item Table Tree parent Table Tree Item parent Item int style int index super parent style this parent parent this parent Item parent Item if parent Item null Root items are visible immediately int table Index parent add Item this index table Item new Table Item parent get Table style table Index table Item set Data Table Tree ITEMID this add Check Feature in the Table The table uses the first image that is inserted into the table to size the table rows If the user is allowed to insert the first image this will cause the images to be scaled The fix is to insert a dummy image to force the size if parent size Image null int item Height parent get Item Height parent size Image new Image null item Height item Height GC gc new GC parent size Image gc set Background parent get Background gc fill Rectangle 0 0 item Height item Height gc dispose table Item set Image 0 parent size Image else parent Item add Item this index  TableTreeItem TableTree TableTreeItem parentItem parentItem parentItem parentItem tableIndex addItem tableItem TableItem getTable tableIndex tableItem setData TableTree addCheck sizeImage itemHeight getItemHeight sizeImage itemHeight itemHeight sizeImage setBackground getBackground fillRectangle itemHeight itemHeight tableItem setImage sizeImage parentItem addItem
void add Check Table table parent get Table if table get Style SWT CHECK 0 return table Item set Checked checked table Item set Grayed grayed  addCheck getTable getStyle tableItem setChecked tableItem setGrayed
void add Item Table Tree Item item int index if item null SWT error SWT ERROR NULL ARGUMENT if index 0 index items length SWT error SWT ERROR INVALID ARGUMENT Now that item has a sub node it must indicate that it can be expanded if items length 0 index 0 if table Item null Image image expanded parent get Minus Image parent get Plus Image table Item set Image 0 image Put the item in the items list Table Tree Item new Items new Table Tree Item items length 1 System arraycopy items 0 new Items 0 index new Items index item System arraycopy items index new Items index 1 items length index items new Items if expanded item set Visible true  addItem TableTreeItem ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT tableItem getMinusImage getPlusImage tableItem setImage TableTreeItem newItems TableTreeItem newItems newItems newItems newItems setVisible
Returns the receiver s background color return the background color 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 since 2 0 public Color get Background check Widget return background null parent get Background background  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBackground checkWidget getBackground
Returns a rectangle describing the receiver s size and location relative to its parent return the receiver s bounding rectangle 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 Rectangle get Bounds int index check Widget if table Item null return table Item get Bounds index else return new Rectangle 0 0 0 0  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBounds checkWidget tableItem tableItem getBounds
Returns code true code if the receiver is checked and false otherwise When the parent does not have the code CHECK style return false return the checked state of the checkbox 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 boolean get Checked check Widget if table Item null return checked return table Item get Checked  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getChecked checkWidget tableItem tableItem getChecked
Returns code true code if the receiver is grayed and false otherwise When the parent does not have the code CHECK code style return false return the grayed state of the checkbox 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 since 2 1 public boolean get Grayed check Widget if table Item null return grayed return table Item get Grayed  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getGrayed checkWidget tableItem tableItem getGrayed
Returns code true code if the receiver is expanded and false otherwise p return the expanded state public boolean get Expanded check Widget return expanded  getExpanded checkWidget
Returns the font that the receiver will use to paint textual information for this item return the receiver s font 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 since 3 0 public Font get Font check Widget return font null parent get Font font  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getFont checkWidget getFont
Returns the foreground color that the receiver will use to draw return the receiver s foreground color 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 since 2 0 public Color get Foreground check Widget return foreground null parent get Foreground foreground  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getForeground checkWidget getForeground
Gets the first image p The image in column 0 is reserved for the and images of the tree therefore get Image 0 will return null return the image at index 0 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 Image get Image check Widget return get Image 0  getImage SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getImage checkWidget getImage
Gets the image at the specified index p Indexing is zero based The image can be null The image in column 0 is reserved for the and images of the tree therefore get Image 0 will return null Return null if the index is out of range param index the index of the image return the image at the specified index or null public Image get Image int index check Widget if 0 index index images length return images index return null  getImage getImage checkWidget
int get Indent if parent Item null return 0 return parent Item get Indent 1  getIndent parentItem parentItem getIndent
Returns the number of items contained in the receiver that are direct item children of the receiver return the number of items public int get Item Count check Widget return items length  getItemCount checkWidget
Returns an array of code Table Tree Item code s which are the direct item children of the receiver p Note This is not the actual structure used by the receiver to maintain its list of items so modifying the array will not affect the receiver p return the receiver s items public Table Tree Item get Items check Widget Table Tree Item new Items new Table Tree Item items length System arraycopy items 0 new Items 0 items length return new Items  TableTreeItem TableTreeItem getItems checkWidget TableTreeItem newItems TableTreeItem newItems newItems
Table Tree Item get Item Table Item table Item if table Item null return null if this table Item table Item return this for int i 0 i items length i Table Tree Item item items i get Item table Item if item null return item return null  TableTreeItem getItem TableItem tableItem tableItem tableItem tableItem TableTreeItem getItem tableItem
Returns the receiver s parent which must be a code Table Tree code return the receiver s parent public Table Tree get Parent check Widget return parent  TableTree TableTree getParent checkWidget
Returns the receiver s parent item which must be a code Table Tree Item code or null when the receiver is a root return the receiver s parent item public Table Tree Item get Parent Item check Widget return parent Item  TableTreeItem TableTreeItem getParentItem checkWidget parentItem
return parent Item public String get Text check Widget return get Text 0  parentItem getText checkWidget getText
Gets the item text at the specified index p Indexing is zero based This operation will fail when the index is out of range or an item could not be queried from the OS param index the index of the item return the item text at the specified index which can be null public String get Text int index check Widget if 0 index index texts length return texts index return null  getText checkWidget
boolean get Visible return table Item null  getVisible tableItem
Gets the index of the specified item p The widget is searched starting at 0 until an item is found that is equal to the search item If no item is found 1 is returned Indexing is zero based This index is relative to the parent only param item the search item return the index of the item or 1 if the item is not found public int index Of Table Tree Item item check Widget for int i 0 i items length i if items i item return i return 1  indexOf TableTreeItem checkWidget
void expand All boolean notify if items length 0 return if expanded set Expanded true if notify Event event new Event event item this parent notify Listeners SWT Expand event for int i 0 i items length i items i expand All notify  expandAll setExpanded notifyListeners expandAll
int expanded Index Of Table Tree Item item int index 0 for int i 0 i items length i if items i item return index if items i expanded index items i visible Children Count index return 1  expandedIndexOf TableTreeItem visibleChildrenCount
int visible Children Count int count 0 for int i 0 i items length i if items i get Visible count 1 items i visible Children Count return count  visibleChildrenCount getVisible visibleChildrenCount
public void dispose if is Disposed return for int i items length 1 i 0 i items i dispose super dispose if parent in Dispose if parent Item null parent Item remove Item this else parent remove Item this if table Item null table Item dispose items null parent Item null parent null images null texts null table Item null foreground null background null font null  isDisposed inDispose parentItem parentItem removeItem removeItem tableItem tableItem parentItem tableItem
void remove Item Table Tree Item item int index 0 while index items length items index item index if index items length return Table Tree Item new Items new Table Tree Item items length 1 System arraycopy items 0 new Items 0 index System arraycopy items index 1 new Items index items length index 1 items new Items if items length 0 if table Item null table Item set Image 0 null  removeItem TableTreeItem TableTreeItem newItems TableTreeItem newItems newItems newItems tableItem tableItem setImage
Sets the receiver s background color to the color specified by the argument or to the default system color for the item if the argument is null param color the new color or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 2 0 public void set Background Color color check Widget if color null color is Disposed SWT error SWT ERROR INVALID ARGUMENT if table Item null table Item set Background color background color  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setBackground checkWidget isDisposed ERROR_INVALID_ARGUMENT tableItem tableItem setBackground
Sets the checked state of the checkbox for this item This state change only applies if the Table was created with the SWT CHECK style param checked the new checked state of the checkbox 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 set Checked boolean checked check Widget Table table parent get Table if table get Style SWT CHECK 0 return if table Item null table Item set Checked checked this checked checked  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setChecked checkWidget getTable getStyle tableItem tableItem setChecked
Sets the grayed state of the checkbox for this item This state change only applies if the Table was created with the SWT CHECK style param grayed the new grayed state of the checkbox 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 since 2 1 public void set Grayed boolean grayed check Widget Table table parent get Table if table get Style SWT CHECK 0 return if table Item null table Item set Grayed grayed this grayed grayed  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setGrayed checkWidget getTable getStyle tableItem tableItem setGrayed
Sets the expanded state p param expanded the new expanded state exception SWT Error 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 set Expanded boolean expanded check Widget if items length 0 return this expanded expanded if table Item null return parent set Redraw false for int i 0 i items length i items i set Visible expanded Image image expanded parent get Minus Image parent get Plus Image table Item set Image 0 image parent set Redraw true  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED setExpanded checkWidget tableItem setRedraw setVisible getMinusImage getPlusImage tableItem setImage setRedraw
Sets the font that the receiver will use to paint textual information for this item to the font specified by the argument or to the default font for that kind of control if the argument is null param font the new font or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 3 0 public void set Font Font font check Widget if font null font is Disposed SWT error SWT ERROR INVALID ARGUMENT if table Item null table Item set Font font this font font  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setFont checkWidget isDisposed ERROR_INVALID_ARGUMENT tableItem tableItem setFont
Sets the receiver s foreground color to the color specified by the argument or to the default system color for the item if the argument is null param color the new color or null since 2 0 exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the argument has been disposed li ul 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 since 2 0 public void set Foreground Color color check Widget if color null color is Disposed SWT error SWT ERROR INVALID ARGUMENT if table Item null table Item set Foreground color foreground color  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setForeground checkWidget isDisposed ERROR_INVALID_ARGUMENT tableItem tableItem setForeground
Sets the image at an index p The image can be null The image in column 0 is reserved for the and images of the tree therefore do nothing if index is 0 param image the new image or null exception SWT Error 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 set Image int index Image image check Widget int column Count Math max parent get Table get Column Count 1 if index 0 index column Count return if images length column Count Image new Images new Image column Count System arraycopy images 0 new Images 0 images length images new Images images index image if table Item null table Item set Image index image  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED setImage checkWidget columnCount getTable getColumnCount columnCount columnCount newImages columnCount newImages newImages tableItem tableItem setImage
Sets the first image p The image can be null The image in column 0 is reserved for the and images of the tree therefore do nothing param image the new image or null exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li li ERROR WIDGET DISPOSED when the widget has been disposed li li ERROR NULL ARGUMENT when string is null li ul public void set Image Image image set Image 0 image  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED ERROR_NULL_ARGUMENT setImage setImage
Sets the widget text p The widget text for an item is the label of the item or the label of the text specified by a column number param index the column number param text the new text exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li li ERROR WIDGET DISPOSED when the widget has been disposed li li ERROR NULL ARGUMENT when string is null li ul public void set Text int index String text check Widget if text null SWT error SWT ERROR NULL ARGUMENT int column Count Math max parent get Table get Column Count 1 if index 0 index column Count return if texts length column Count String new Texts new String column Count System arraycopy texts 0 new Texts 0 texts length texts new Texts texts index text if table Item null table Item set Text index text  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED ERROR_NULL_ARGUMENT setText checkWidget ERROR_NULL_ARGUMENT columnCount getTable getColumnCount columnCount columnCount newTexts columnCount newTexts newTexts tableItem tableItem setText
if table Item null table Item set Text index text public void set Text String string set Text 0 string  tableItem tableItem setText setText setText
void set Visible boolean show if parent Item null return this is a root and can not be toggled between visible and hidden if get Visible show return if show if parent Item get Visible return parent Item must already be visible create underlying table item and set data in table item to stored data Table table parent get Table int parent Index table index Of parent Item table Item int index parent Item expanded Index Of this parent Index 1 if index 0 return table Item new Table Item table get Style index table Item set Data Table Tree ITEMID this table Item set Image Indent get Indent if background null table Item set Background background if foreground null table Item set Foreground foreground if font null table Item set Font font add Check restore fields to item ignore any images in the first column int column Count Math max table get Column Count 1 for int i 0 i column Count i if i texts length texts i null set Text i texts i if i images length images i null set Image i images i display the children and the appropriate symbol as required if items length 0 if expanded table Item set Image 0 parent get Minus Image for int i 0 length items length i length i items i set Visible true else table Item set Image 0 parent get Plus Image else for int i 0 length items length i length i items i set Visible false remove row from table table Item dispose table Item null  setVisible parentItem getVisible parentItem getVisible parentItem getTable parentIndex indexOf parentItem tableItem parentItem expandedIndexOf parentIndex tableItem TableItem getStyle tableItem setData TableTree tableItem setImageIndent getIndent tableItem setBackground tableItem setForeground tableItem setFont addCheck columnCount getColumnCount columnCount setText setImage tableItem setImage getMinusImage setVisible tableItem setImage getPlusImage setVisible tableItem tableItem

public class Text Changed Event extends Typed Event Create the Text Changed Event to be used by the Styled Text Content implementor p param source the object that will be sending the Text Changed Event cannot be null public Text Changed Event Styled Text Content source super source  TextChangedEvent TypedEvent TextChangedEvent StyledTextContent TextChangedEvent TextChangedEvent StyledTextContent

This method is called when the content is about to be changed Callers also need to call the text Changed method after the content change has been applied The widget only updates the screen properly when it receives both events param event the text changing event All event fields need to be set by the sender see Text Changing Event  textChanged TextChangingEvent
public void text Changing Text Changing Event event This method is called when the content has changed Callers need to have called the text Changing method prior to applying the content change and calling this method The widget only updates the screen properly when it receives both events param event the text changed event  textChanging TextChangingEvent textChanging
public void text Changed Text Changed Event event This method is called instead of the text Changing text Changed combination when the entire old content has been replaced e g by a call to Styled Text Content set Text param event the text changed event  textChanged TextChangedEvent textChanging textChanged StyledTextContent setText

Create the Text Changed Event to be used by the Styled Text Content implementor p param source the object that will be sending the new Text Changing Event cannot be null public Text Changing Event Styled Text Content source super source  TextChangedEvent StyledTextContent TextChangingEvent TextChangingEvent StyledTextContent
Text Changing Event Styled Text Content source Styled Text Event e super source start e start replace Char Count e replace Char Count new Char Count e new Char Count replace Line Count e replace Line Count new Line Count e new Line Count new Text e text  TextChangingEvent StyledTextContent StyledTextEvent replaceCharCount replaceCharCount newCharCount newCharCount replaceLineCount replaceLineCount newLineCount newLineCount newText

final Runnable runnable new Runnable public void run if editor null editor is Disposed return if Tree Editor this tree is Disposed return resize editor set Visible true  isDisposed TreeEditor isDisposed setVisible
public void tree Collapsed Tree Event e if editor null editor is Disposed return Display display Tree Editor this tree get Display editor set Visible false display async Exec runnable  treeCollapsed TreeEvent isDisposed TreeEditor getDisplay setVisible asyncExec
public void tree Expanded Tree Event e if editor null editor is Disposed return Display display Tree Editor this tree get Display editor set Visible false display async Exec runnable  treeExpanded TreeEvent isDisposed TreeEditor getDisplay setVisible asyncExec
Tree Listener tree Listener Creates a Tree Editor for the specified Tree param tree the Tree Control above which this editor will be displayed public Tree Editor Tree tree super tree this tree tree tree Listener new Tree Listener final Runnable runnable new Runnable public void run if editor null editor is Disposed return if Tree Editor this tree is Disposed return resize editor set Visible true public void tree Collapsed Tree Event e if editor null editor is Disposed return Display display Tree Editor this tree get Display editor set Visible false display async Exec runnable public void tree Expanded Tree Event e if editor null editor is Disposed return Display display Tree Editor this tree get Display editor set Visible false display async Exec runnable tree add Tree Listener tree Listener To be consistent with older versions of SWT grab Vertical defaults to true grab Vertical true  TreeListener treeListener TreeEditor TreeEditor treeListener TreeListener isDisposed TreeEditor isDisposed setVisible treeCollapsed TreeEvent isDisposed TreeEditor getDisplay setVisible asyncExec treeExpanded TreeEvent isDisposed TreeEditor getDisplay setVisible asyncExec addTreeListener treeListener grabVertical grabVertical
Rectangle compute Bounds if item null item is Disposed return new Rectangle 0 0 0 0 Rectangle cell item get Bounds Rectangle area tree get Client Area if cell x area x area width if cell x cell width area x area width cell width area x area width cell x Rectangle editor Rect new Rectangle cell x cell y minimum Width minimum Height if grab Horizontal Bounds of tree item only include the text area stretch out to include entire client area cell width area x area width cell x editor Rect width Math max cell width minimum Width if grab Vertical editor Rect height Math max cell height minimum Height if horizontal Alignment SWT RIGHT editor Rect x cell width editor Rect width else if horizontal Alignment SWT LEFT do nothing cell x is the right answer else default is CENTER editor Rect x cell width editor Rect width 2 don t let the editor overlap with the of the tree editor Rect x Math max cell x editor Rect x if vertical Alignment SWT BOTTOM editor Rect y cell height editor Rect height else if vertical Alignment SWT TOP do nothing cell y is the right answer else default is CENTER editor Rect y cell height editor Rect height 2 return editor Rect  computeBounds isDisposed getBounds getClientArea editorRect minimumWidth minimumHeight grabHorizontal editorRect minimumWidth grabVertical editorRect minimumHeight horizontalAlignment editorRect editorRect horizontalAlignment editorRect editorRect editorRect editorRect verticalAlignment editorRect editorRect verticalAlignment editorRect editorRect editorRect
Removes all associations between the Tree Editor and the row in the tree The tree and the editor Control are b not b disposed public void dispose if tree Listener null tree remove Tree Listener tree Listener tree Listener null tree null item null super dispose  TreeEditor treeListener removeTreeListener treeListener treeListener
Returns the Tree Item for the row of the cell being tracked by this editor return the Tree Item for the row of the cell being tracked by this editor public Tree Item get Item return item  TreeItem TreeItem TreeItem getItem
return item public void set Item Tree Item item this item item resize  setItem TreeItem
Specify the Control that is to be displayed and the cell in the tree that it is to be positioned above p Note The Control provided as the editor b must b be created with its parent being the Tree control specified in the Tree Editor constructor param editor the Control that is displayed above the cell being edited param item the Tree Item for the row of the cell being tracked by this editor public void set Editor Control editor Tree Item item set Item item set Editor editor  TreeEditor TreeItem setEditor TreeItem setItem setEditor
void resize if tree is Disposed return if item null item is Disposed return super resize  isDisposed isDisposed

public interface Verify Key Listener extends SWT Event Listener param event character the character that was typed input param event key Code the key code that was typed input param event state Mask the state of the keyboard input param event doit processed or not output  VerifyKeyListener SWTEventListener keyCode stateMask

Listener listener new Listener public void handle Event Event e switch e type case SWT Dispose on Dispose break case SWT Paint on Paint e gc break case SWT Resize on Resize break  handleEvent onDispose onPaint onResize
static final int SELECTION BACKGROUND SWT COLOR LIST BACKGROUND Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT BORDER see SWT FLAT see get Style public View Form Composite parent int style super parent check Style style set Border Visible style SWT BORDER 0 Listener listener new Listener public void handle Event Event e switch e type case SWT Dispose on Dispose break case SWT Paint on Paint e gc break case SWT Resize on Resize break int events new int SWT Dispose SWT Paint SWT Resize for int i 0 i events length i add Listener events i listener  SELECTION_BACKGROUND COLOR_LIST_BACKGROUND IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle ViewForm checkStyle setBorderVisible handleEvent onDispose onPaint onResize addListener
static int check Style int style int mask SWT FLAT SWT LEFT TO RIGHT SWT RIGHT TO LEFT return style mask SWT NO REDRAW RESIZE  checkStyle LEFT_TO_RIGHT RIGHT_TO_LEFT NO_REDRAW_RESIZE
public Point compute Size int w Hint int h Hint boolean changed check Widget size of title bar area Point left Size new Point 0 0 if top Left null left Size top Left compute Size SWT DEFAULT SWT DEFAULT Point center Size new Point 0 0 if top Center null center Size top Center compute Size SWT DEFAULT SWT DEFAULT Point right Size new Point 0 0 if top Right null right Size top Right compute Size SWT DEFAULT SWT DEFAULT Point size new Point 0 0 calculate width of title bar if separate Top Center w Hint SWT DEFAULT left Size x center Size x right Size x w Hint size x left Size x right Size x if left Size x 0 right Size x 0 size x horizontal Spacing size x Math max center Size x size x size y Math max left Size y right Size y if top Center null size y center Size y if top Left null top Right null size y vertical Spacing else size x left Size x center Size x right Size x int count 1 if left Size x 0 count if center Size x 0 count if right Size x 0 count if count 0 size x count horizontal Spacing size y Math max left Size y Math max center Size y right Size y if content null if top Left null top Right null top Center null size y 1 allow space for a vertical separator Point content Size new Point 0 0 content Size content compute Size SWT DEFAULT SWT DEFAULT size x Math max size x content Size x size y content Size y if size y content Size y size y vertical Spacing size x 2 margin Width size y 2 margin Height if w Hint SWT DEFAULT size x w Hint if h Hint SWT DEFAULT size y h Hint Rectangle trim compute Trim 0 0 size x size y return new Point trim width trim height  computeSize wHint hHint checkWidget leftSize topLeft leftSize topLeft computeSize centerSize topCenter centerSize topCenter computeSize rightSize topRight rightSize topRight computeSize separateTopCenter wHint leftSize centerSize rightSize wHint leftSize rightSize leftSize rightSize horizontalSpacing centerSize leftSize rightSize topCenter centerSize topLeft topRight verticalSpacing leftSize centerSize rightSize leftSize centerSize rightSize horizontalSpacing leftSize centerSize rightSize topLeft topRight topCenter contentSize contentSize computeSize contentSize contentSize contentSize verticalSpacing marginWidth marginHeight wHint wHint hHint hHint computeTrim
public Rectangle compute Trim int x int y int width int height check Widget int trimX x border Left highlight int trimY y border Top highlight int trim Width width border Left border Right 2 highlight int trim Height height border Top border Bottom 2 highlight return new Rectangle trimX trimY trim Width trim Height  computeTrim checkWidget borderLeft borderTop trimWidth borderLeft borderRight trimHeight borderTop borderBottom trimWidth trimHeight
public Rectangle get Client Area check Widget Rectangle client Area super get Client Area client Area x border Left client Area y border Top client Area width border Left border Right client Area height border Top border Bottom return client Area  getClientArea checkWidget clientArea getClientArea clientArea borderLeft clientArea borderTop clientArea borderLeft borderRight clientArea borderTop borderBottom clientArea
Returns the content area return the control in the content area of the pane or null public Control get Content check Widget return content  getContent checkWidget
Returns Control that appears in the top center of the pane Typically this is a toolbar return the control in the top center of the pane or null public Control get Top Center check Widget return top Center  getTopCenter checkWidget topCenter
Returns the Control that appears in the top left corner of the pane Typically this is a label such as C Label return the control in the top left corner of the pane or null public Control get Top Left check Widget return top Left  CLabel getTopLeft checkWidget topLeft
Returns the control in the top right corner of the pane Typically this is a Close button or a composite with a Menu and Close button return the control in the top right corner of the pane or null public Control get Top Right check Widget return top Right  getTopRight checkWidget topRight
public void layout boolean changed check Widget Rectangle rect get Client Area Point left Size new Point 0 0 if top Left null top Left is Disposed left Size top Left compute Size SWT DEFAULT SWT DEFAULT Point center Size new Point 0 0 if top Center null top Center is Disposed center Size top Center compute Size SWT DEFAULT SWT DEFAULT Point right Size new Point 0 0 if top Right null top Right is Disposed right Size top Right compute Size SWT DEFAULT SWT DEFAULT int min Top Width left Size x center Size x right Size x 2 margin Width 2 highlight int count 1 if left Size x 0 count if center Size x 0 count if right Size x 0 count if count 0 min Top Width count horizontal Spacing int x rect x rect width margin Width highlight int y rect y margin Height highlight boolean top false if separate Top Center min Top Width rect width int top Height Math max right Size y left Size y if top Right null top Right is Disposed top true x right Size x top Right set Bounds x y right Size x top Height x horizontal Spacing if top Left null top Left is Disposed top true left Size top Left compute Size x rect x margin Width highlight SWT DEFAULT top Left set Bounds rect x margin Width highlight y left Size x top Height if top y top Height vertical Spacing if top Center null top Center is Disposed top true int w rect width 2 margin Width 2 highlight int trim top Center compute Size w SWT DEFAULT x w center Size top Center compute Size w trim SWT DEFAULT top Center set Bounds rect x rect width margin Width highlight center Size x y center Size x center Size y y center Size y vertical Spacing else int top Height Math max right Size y Math max center Size y left Size y if top Right null top Right is Disposed top true x right Size x top Right set Bounds x y right Size x top Height x horizontal Spacing if top Center null top Center is Disposed top true x center Size x top Center set Bounds x y center Size x top Height x horizontal Spacing if top Left null top Left is Disposed top true left Size top Left compute Size x rect x margin Width highlight top Height top Left set Bounds rect x margin Width highlight y left Size x top Height if top y top Height vertical Spacing int old Seperator separator separator 1 if content null content is Disposed if top Left null top Right null top Center null separator y y content set Bounds rect x margin Width highlight y rect width 2 margin Width 2 highlight rect y rect height y margin Height highlight if old Seperator 1 separator 1 int t Math min separator old Seperator int b Math max separator old Seperator redraw border Left t get Size x border Left border Right b t false  checkWidget getClientArea leftSize topLeft topLeft isDisposed leftSize topLeft computeSize centerSize topCenter topCenter isDisposed centerSize topCenter computeSize rightSize topRight topRight isDisposed rightSize topRight computeSize minTopWidth leftSize centerSize rightSize marginWidth leftSize centerSize rightSize minTopWidth horizontalSpacing marginWidth marginHeight separateTopCenter minTopWidth topHeight rightSize leftSize topRight topRight isDisposed rightSize topRight setBounds rightSize topHeight horizontalSpacing topLeft topLeft isDisposed leftSize topLeft computeSize marginWidth topLeft setBounds marginWidth leftSize topHeight topHeight verticalSpacing topCenter topCenter isDisposed marginWidth topCenter computeSize centerSize topCenter computeSize topCenter setBounds marginWidth centerSize centerSize centerSize centerSize verticalSpacing topHeight rightSize centerSize leftSize topRight topRight isDisposed rightSize topRight setBounds rightSize topHeight horizontalSpacing topCenter topCenter isDisposed centerSize topCenter setBounds centerSize topHeight horizontalSpacing topLeft topLeft isDisposed leftSize topLeft computeSize marginWidth topHeight topLeft setBounds marginWidth leftSize topHeight topHeight verticalSpacing oldSeperator isDisposed topLeft topRight topCenter setBounds marginWidth marginWidth marginHeight oldSeperator oldSeperator oldSeperator borderLeft getSize borderLeft borderRight
void on Dispose top Left null top Center null top Right null content null old Area null selection Background null  onDispose topLeft topCenter topRight oldArea selectionBackground
void on Paint GC gc Color gc Foreground gc get Foreground Point size get Size Color border get Display get System Color BORDER1 COLOR if show Border gc set Foreground border gc draw Rectangle 0 0 size x 1 size y 1 if highlight 0 int x1 1 int y1 1 int x2 size x 1 int y2 size y 1 int shape new int x1 y1 x2 y1 x2 y2 x1 y2 x1 y1 highlight x1 highlight y1 highlight x1 highlight y2 highlight x2 highlight y2 highlight x2 highlight y1 highlight x1 y1 highlight Color highlight Color get Display get System Color SWT COLOR LIST SELECTION gc set Background highlight Color gc fill Polygon shape if separator 1 gc set Foreground border gc draw Line border Left highlight separator size x border Left border Right highlight separator gc set Foreground gc Foreground  onPaint gcForeground getForeground getSize getDisplay getSystemColor BORDER1_COLOR showBorder setForeground drawRectangle highlightColor getDisplay getSystemColor COLOR_LIST_SELECTION setBackground highlightColor fillPolygon setForeground drawLine borderLeft borderLeft borderRight setForeground gcForeground
void on Resize layout Rectangle area super get Client Area if old Area null old Area width 0 old Area height 0 redraw else int width 0 if old Area width area width width area width old Area width border Right highlight else if old Area width area width width border Right highlight redraw area x area width width area y width area height false int height 0 if old Area height area height height area height old Area height border Bottom highlight if old Area height area height height border Bottom highlight redraw area x area y area height height area width height false old Area area  onResize getClientArea oldArea oldArea oldArea oldArea oldArea borderRight oldArea borderRight oldArea oldArea borderBottom oldArea borderBottom oldArea
Sets the content Setting the content to null will remove it from the pane however the creator of the content must dispose of the content param content the control to be displayed in the content area or null 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 li ERROR INVALID ARGUMENT if the control is not a child of this View Form li ul public void set Content Control content check Widget if content null content get Parent this SWT error SWT ERROR INVALID ARGUMENT if this content null this content is Disposed this content set Bounds OFFSCREEN OFFSCREEN 0 0 this content content layout  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT ViewForm setContent checkWidget getParent ERROR_INVALID_ARGUMENT isDisposed setBounds
public void set Font Font f super set Font f if top Left null top Left is Disposed top Left set Font f if top Center null top Center is Disposed top Center set Font f if top Right null top Right is Disposed top Right set Font f layout  setFont setFont topLeft topLeft isDisposed topLeft setFont topCenter topCenter isDisposed topCenter setFont topRight topRight isDisposed topRight setFont
Sets the layout which is associated with the receiver to be the argument which may be null p Note View Form does not use a layout class to size and position its children p param layout the receiver s new layout or null 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 set Layout Layout layout check Widget return  ViewForm SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setLayout checkWidget
void set Selection Background Color color check Widget if selection Background color return if color null color get Display get System Color SELECTION BACKGROUND selection Background color redraw  setSelectionBackground checkWidget selectionBackground getDisplay getSystemColor SELECTION_BACKGROUND selectionBackground
Set the control that appears in the top center of the pane Typically this is a toolbar The top Center is optional Setting the top Center to null will remove it from the pane however the creator of the top Center must dispose of the top Center param top Center the control to be displayed in the top center or null 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 li ERROR INVALID ARGUMENT if the control is not a child of this View Form li ul public void set Top Center Control top Center check Widget if top Center null top Center get Parent this SWT error SWT ERROR INVALID ARGUMENT if this top Center null this top Center is Disposed Point size this top Center get Size this top Center set Location OFFSCREEN size x OFFSCREEN size y this top Center top Center layout  topCenter topCenter topCenter topCenter topCenter SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT ViewForm setTopCenter topCenter checkWidget topCenter topCenter getParent ERROR_INVALID_ARGUMENT topCenter topCenter isDisposed topCenter getSize topCenter setLocation topCenter topCenter
Set the control that appears in the top left corner of the pane Typically this is a label such as C Label The top Left is optional Setting the top left control to null will remove it from the pane however the creator of the control must dispose of the control param c the control to be displayed in the top left corner or null 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 li ERROR INVALID ARGUMENT if the control is not a child of this View Form li ul public void set Top Left Control c check Widget if c null c get Parent this SWT error SWT ERROR INVALID ARGUMENT if this top Left null this top Left is Disposed Point size this top Left get Size this top Left set Location OFFSCREEN size x OFFSCREEN size y this top Left c layout  CLabel topLeft SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT ViewForm setTopLeft checkWidget getParent ERROR_INVALID_ARGUMENT topLeft topLeft isDisposed topLeft getSize topLeft setLocation topLeft
Set the control that appears in the top right corner of the pane Typically this is a Close button or a composite with a Menu and Close button The top Right is optional Setting the top right control to null will remove it from the pane however the creator of the control must dispose of the control param c the control to be displayed in the top right corner or null 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 li ERROR INVALID ARGUMENT if the control is not a child of this View Form li ul public void set Top Right Control c check Widget if c null c get Parent this SWT error SWT ERROR INVALID ARGUMENT if this top Right null this top Right is Disposed Point size this top Right get Size this top Right set Location OFFSCREEN size x OFFSCREEN size y this top Right c layout  topRight SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT ViewForm setTopRight checkWidget getParent ERROR_INVALID_ARGUMENT topRight topRight isDisposed topRight getSize topRight setLocation topRight
Specify whether the border should be displayed or not param show true if the border should be displayed 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 set Border Visible boolean show check Widget if show Border show return show Border show if show Border border Left border Top border Right border Bottom 1 if get Style SWT FLAT 0 highlight 2 else border Bottom border Top border Left border Right 0 highlight 0 layout redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setBorderVisible checkWidget showBorder showBorder showBorder borderLeft borderTop borderRight borderBottom getStyle borderBottom borderTop borderLeft borderRight
If true the top Center will always appear on a separate line by itself otherwise the top Center will appear in the top row if there is room and will be moved to the second row if required param show true if the top Center will always appear on a separate line by itself 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 set Top Center Separate boolean show check Widget separate Top Center show layout  topCenter topCenter topCenter SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setTopCenterSeparate checkWidget separateTopCenter

Create a new instance param renderer class Styled Text Renderer class that renders the lines wrapped by the new instance param logical Content Styled Text Content that provides the line data Wrapped Content Styled Text Renderer renderer Styled Text Content logical Content this renderer renderer this logical Content logical Content  StyledTextRenderer logicalContent StyledTextContent WrappedContent StyledTextRenderer StyledTextContent logicalContent logicalContent logicalContent
see Styled Text Content add Text Change Listener Text Change Listener public void add Text Change Listener Text Change Listener listener logical Content add Text Change Listener listener  StyledTextContent addTextChangeListener TextChangeListener addTextChangeListener TextChangeListener logicalContent addTextChangeListener
Grow the lines array to at least the specified size p param num Lines number of elements that the array should have at a minimum private void ensure Size int num Lines int size visual Lines length if size num Lines return int new Lines new int Math max size 2 num Lines 2 System arraycopy visual Lines 0 new Lines 0 size visual Lines new Lines reset Visual Lines size visual Lines length size  numLines ensureSize numLines visualLines numLines newLines numLines visualLines newLines visualLines newLines resetVisualLines visualLines
see Styled Text Content get Char Count public int get Char Count return logical Content get Char Count  StyledTextContent getCharCount getCharCount logicalContent getCharCount
return the visual wrapped line at the specified index see Styled Text Content get Line int public String get Line int line Index String line redirect call to logical content if there are no wrapped lines if visual Line Count 0 line logical Content get Line line Index else if line Index visual Line Count line Index 0 SWT error SWT ERROR INVALID ARGUMENT line logical Content get Text Range visual Lines line Index LINE OFFSET visual Lines line Index LINE LENGTH return line  StyledTextContent getLine getLine lineIndex visualLineCount logicalContent getLine lineIndex lineIndex visualLineCount lineIndex ERROR_INVALID_ARGUMENT logicalContent getTextRange visualLines lineIndex LINE_OFFSET visualLines lineIndex LINE_LENGTH
Returns the visual wrapped line at given offset p The offset is ambiguous if it identifies the end of a visual line and there is another visual line below In this case the end of the visual line has the same offset as the beginning of the next visual line since the visual line break is not represented by any character in the logical line In this ambiguous case the offset is assumed to represent the end of a visual line and the index of the first visual line is returned p param offset offset of the desired line return the index of the visual wrapped line at the specified offset see Styled Text Content get Line At Offset int public int get Line At Offset int offset int last Line visual Line Count 1 int last Char redirect call to logical content if there are no wrapped lines if visual Line Count 0 return logical Content get Line At Offset offset can t use get Char Count to get the number of characters since this method is called in text Changed when the logical Content used by get Char Count has already changed at that point the visual lines have not been updated yet and we thus need to use the old character count which is only available in the visual content last Char visual Lines last Line LINE OFFSET visual Lines last Line LINE LENGTH if offset 0 offset 0 offset last Char SWT error SWT ERROR INVALID ARGUMENT if last line and the line is not empty you can ask for a position that doesn t exist the one to the right of the last character for inserting if offset last Char return last Line int high visual Line Count int low 1 int index visual Line Count while high low 1 index high low 2 int line Start visual Lines index LINE OFFSET if offset line Start int line End line Start visual Lines index LINE LENGTH low index if offset line End break else high index if low 0 offset visual Lines low 1 LINE OFFSET visual Lines low 1 LINE LENGTH end of a visual line beginning of next visual line is ambiguous they have the same offset always return the first visual line low return low  StyledTextContent getLineAtOffset getLineAtOffset lastLine visualLineCount lastChar visualLineCount logicalContent getLineAtOffset getCharCount textChanged logicalContent getCharCount lastChar visualLines lastLine LINE_OFFSET visualLines lastLine LINE_LENGTH lastChar ERROR_INVALID_ARGUMENT lastChar lastLine visualLineCount visualLineCount lineStart visualLines LINE_OFFSET lineStart lineEnd lineStart visualLines LINE_LENGTH lineEnd visualLines LINE_OFFSET visualLines LINE_LENGTH
return the number of visual wrapped lines see Styled Text Content get Line Count public int get Line Count int line Count visual Line Count redirect call to logical content if there are no wrapped lines if visual Line Count 0 line Count logical Content get Line Count return line Count  StyledTextContent getLineCount getLineCount lineCount visualLineCount visualLineCount lineCount logicalContent getLineCount lineCount
see Styled Text Content get Line Delimiter public String get Line Delimiter return logical Content get Line Delimiter  StyledTextContent getLineDelimiter getLineDelimiter logicalContent getLineDelimiter
return the start offset of the visual wrapped line at the given index see Styled Text Content get Offset At Line int public int get Offset At Line int line Index int offset redirect call to logical content if there are no wrapped lines if visual Line Count 0 offset logical Content get Offset At Line line Index else if line Index visual Line Count line Index 0 SWT error SWT ERROR INVALID ARGUMENT offset visual Lines line Index LINE OFFSET return offset  StyledTextContent getOffsetAtLine getOffsetAtLine lineIndex visualLineCount logicalContent getOffsetAtLine lineIndex lineIndex visualLineCount lineIndex ERROR_INVALID_ARGUMENT visualLines lineIndex LINE_OFFSET
see Styled Text Content get Text Range int int public String get Text Range int start int length return logical Content get Text Range start length  StyledTextContent getTextRange getTextRange logicalContent getTextRange
Returns the number of visual wrapped lines return the number of visual wrapped lines int get Visual Line Count return visual Line Count  getVisualLineCount visualLineCount
see Styled Text Content remove Text Change Listener Text Change Listener public void remove Text Change Listener Text Change Listener listener logical Content remove Text Change Listener listener  StyledTextContent removeTextChangeListener TextChangeListener removeTextChangeListener TextChangeListener logicalContent removeTextChangeListener
Reset the visual wrapped lines in the specified range If the range specifies partial logical lines e g start Line is the second of two visual lines it is extended to reset all visual lines of a logical line Following the reset the logical lines in the reset visual range are rewrapped p param start Line index of the first visual line param line Count number of visual lines void reset int start Line int line Count if line Count 0 visual Line Count 0 return reset start Line line Count true  startLine startLine lineCount startLine lineCount lineCount visualLineCount startLine lineCount
Reset the visual wrapped lines in the specified range If the range specifies partial logical lines e g start Line is the second of two visual lines it is extended to reset all visual lines of a logical line p param start Line index of the first visual line param line Count number of visual lines param wrap true rewrap the logical lines in the reset visual range false don t rewrap lines Visual lines will be left in an inconsistent state since there will be a range of unwrapped and unknown lines return the first visual line that was reset private int reset int start Line int line Count boolean wrap if line Count 0 return start Line make sure that all visual lines of the first logical line are being reset visual First Line is the first visual line of the first logical line that has at least one visual line reset int visual First Line Offset get Offset At Line start Line int logical First Line logical Content get Line At Offset visual First Line Offset int logical First Line Offset logical Content get Offset At Line logical First Line int visual First Line get Line At Offset logical First Line Offset line Count start Line visual First Line start Line visual First Line make sure that all visual lines of the last logical line are being reset int last Line start Line line Count 1 int last Line End visual Lines last Line LINE OFFSET visual Lines last Line LINE LENGTH int logical End Line 0 while last Line visual Line Count 1 last Line End visual Lines last Line 1 LINE OFFSET last Line last Line End visual Lines last Line LINE OFFSET visual Lines last Line LINE LENGTH if wrap if last Line visual Line Count 1 logical End Line logical Content get Line Count else logical End Line logical Content get Line At Offset visual Lines last Line 1 LINE OFFSET line Count last Line start Line 1 reset Visual Lines start Line line Count visual Line Count line Count if wrap always recalculate line wrap immediately after a reset because the content always needs to be in a usable state i e there must not be any reset but unwrapped lines wrap Line Range logical First Line logical End Line start Line return start Line  startLine startLine lineCount startLine lineCount lineCount startLine visualFirstLine visualFirstLineOffset getOffsetAtLine startLine logicalFirstLine logicalContent getLineAtOffset visualFirstLineOffset logicalFirstLineOffset logicalContent getOffsetAtLine logicalFirstLine visualFirstLine getLineAtOffset logicalFirstLineOffset lineCount startLine visualFirstLine startLine visualFirstLine lastLine startLine lineCount lastLineEnd visualLines lastLine LINE_OFFSET visualLines lastLine LINE_LENGTH logicalEndLine lastLine visualLineCount lastLineEnd visualLines lastLine LINE_OFFSET lastLine lastLineEnd visualLines lastLine LINE_OFFSET visualLines lastLine LINE_LENGTH lastLine visualLineCount logicalEndLine logicalContent getLineCount logicalEndLine logicalContent getLineAtOffset visualLines lastLine LINE_OFFSET lineCount lastLine startLine resetVisualLines startLine lineCount visualLineCount lineCount wrapLineRange logicalFirstLine logicalEndLine startLine startLine
Reset the visual wrapped lines in the specified range p param start Line index of the first visual line param line Count number of visual lines private void reset Visual Lines int start Line int line Count int end Line start Line line Count for int i start Line i end Line i visual Lines i new int 1 1  startLine lineCount resetVisualLines startLine lineCount endLine startLine lineCount startLine endLine visualLines
see Styled Text Content replace Text Range int int String public void replace Text Range int start int replace Length String text logical Content replace Text Range start replace Length text  StyledTextContent replaceTextRange replaceTextRange replaceLength logicalContent replaceTextRange replaceLength
see Styled Text Content set Text String public void set Text String text logical Content set Text text  StyledTextContent setText setText logicalContent setText
Set the line wrap data for the specified visual wrapped line p param visual Line Index index of the visual line param visual Line Offset start offset of the visual line relative to the start of the document param visual Line Length length of the visual line private void set Visual Line int visual Line Index int visual Line Offset int visual Line Length ensure Size visual Line Count 1 is the space for the visual line already taken can happen if there are more visual lines for a given logical line than before if visual Lines visual Line Index LINE OFFSET 1 System arraycopy visual Lines visual Line Index visual Lines visual Line Index 1 visual Line Count visual Line Index visual Lines visual Line Index new int 2 visual Lines visual Line Index LINE OFFSET visual Line Offset visual Lines visual Line Index LINE LENGTH visual Line Length visual Line Count  visualLineIndex visualLineOffset visualLineLength setVisualLine visualLineIndex visualLineOffset visualLineLength ensureSize visualLineCount visualLines visualLineIndex LINE_OFFSET visualLines visualLineIndex visualLines visualLineIndex visualLineCount visualLineIndex visualLines visualLineIndex visualLines visualLineIndex LINE_OFFSET visualLineOffset visualLines visualLineIndex LINE_LENGTH visualLineLength visualLineCount
Recalculates the line wrap for the lines affected by the text change p param start Offset the start offset of the text change param new Line Count the number of inserted lines param replace Line Count the number of deleted lines param new Char Count the number of new characters param replace Char Count the number of deleted characters void text Changed int start Offset int new Line Count int replace Line Count int new Char Count int replace Char Count do nothing if there are no wrapped lines if visual Line Count 0 return int logical Start Line logical Content get Line At Offset start Offset int visual Start Line get Line At Offset start Offset int visual Replace Last Line visual Line Count 1 int text Change Delta new Char Count replace Char Count if replace Line Count 0 visual Replace Last Line get Line At Offset start Offset replace Char Count at the start of a visual line end of the previous visual line if visual Replace Last Line 0 visual Lines visual Replace Last Line LINE OFFSET visual Lines visual Replace Last Line 1 LINE OFFSET visual Lines visual Replace Last Line 1 LINE LENGTH visual Replace Last Line visual Line Count 1 visual Replace Last Line visual Start Line reset visual Start Line visual Replace Last Line visual Start Line 1 false else visual Start Line reset visual Start Line 1 false visual Replace Last Line wrap Line Range logical Start Line logical Start Line 1 new Line Count visual Start Line for int i visual Replace Last Line i visual Line Count i visual Lines i LINE OFFSET text Change Delta  startOffset newLineCount replaceLineCount newCharCount replaceCharCount textChanged startOffset newLineCount replaceLineCount newCharCount replaceCharCount visualLineCount logicalStartLine logicalContent getLineAtOffset startOffset visualStartLine getLineAtOffset startOffset visualReplaceLastLine visualLineCount textChangeDelta newCharCount replaceCharCount replaceLineCount visualReplaceLastLine getLineAtOffset startOffset replaceCharCount visualReplaceLastLine visualLines visualReplaceLastLine LINE_OFFSET visualLines visualReplaceLastLine LINE_OFFSET visualLines visualReplaceLastLine LINE_LENGTH visualReplaceLastLine visualLineCount visualReplaceLastLine visualStartLine visualStartLine visualReplaceLastLine visualStartLine visualStartLine visualStartLine visualReplaceLastLine wrapLineRange logicalStartLine logicalStartLine newLineCount visualStartLine visualReplaceLastLine visualLineCount visualLines LINE_OFFSET textChangeDelta
Wrap the logical lines in the given range at the current client area width of the Styled Text widget p param start Line first logical line to wrap param end Line line after last logical line param visual Line Index visual wrapped line index that start Line corresponds to return index of the line following the last wrapped line private int wrap Line Range int start Line int end Line int visual Line Index int empty Line Count 0 int width renderer get Client Area width renderer get Left Margin renderer get Right Margin visual Line Index wrap Line Range start Line end Line visual Line Index width is there space left for more visual lines can happen if there are fewer visual lines for a given logical line than before for int i visual Line Index i visual Lines length i empty Line Count if visual Lines i LINE OFFSET 1 break if empty Line Count 0 int copy Line Count visual Line Count visual Line Index System arraycopy visual Lines visual Line Index empty Line Count visual Lines visual Line Index copy Line Count reset Visual Lines visual Line Index copy Line Count empty Line Count return visual Line Index  StyledText startLine endLine visualLineIndex startLine wrapLineRange startLine endLine visualLineIndex emptyLineCount getClientArea getLeftMargin getRightMargin visualLineIndex wrapLineRange startLine endLine visualLineIndex visualLineIndex visualLines emptyLineCount visualLines LINE_OFFSET emptyLineCount copyLineCount visualLineCount visualLineIndex visualLines visualLineIndex emptyLineCount visualLines visualLineIndex copyLineCount resetVisualLines visualLineIndex copyLineCount emptyLineCount visualLineIndex
Wrap the lines in the given range Skip lines that have already been wrapped p param start Line first logical line to wrap param end Line line after last logical line param visual Line Index visual wrapped line index that start Line corresponds to param width line width to wrap at return index of last wrapped line private int wrap Line Range int start Line int end Line int visual Line Index int width if there are no wrapped lines and the width is 0 the widget has not been made visible sized yet don t wrap until the widget size is known if visual Line Count 0 width 0 return visual Line Index for int i start Line i end Line i String line logical Content get Line i int line Offset logical Content get Offset At Line i int line Length line length if line Length 0 set Visual Line visual Line Index line Offset 0 visual Line Index continue Text Layout layout renderer get Text Layout line line Offset layout set Width Math max 1 width int offsets layout get Line Offsets for int j 0 j offsets length 1 j set Visual Line visual Line Index line Offset offsets j offsets j 1 offsets j renderer dispose Text Layout layout return visual Line Index  startLine endLine visualLineIndex startLine wrapLineRange startLine endLine visualLineIndex visualLineCount visualLineIndex startLine endLine logicalContent getLine lineOffset logicalContent getOffsetAtLine lineLength lineLength setVisualLine visualLineIndex lineOffset visualLineIndex TextLayout getTextLayout lineOffset setWidth getLineOffsets setVisualLine visualLineIndex lineOffset disposeTextLayout visualLineIndex
Wrap all logical lines at the current client area width of the Styled Text widget void wrap Lines int width renderer get Client Area width renderer get Left Margin renderer get Right Margin wrap Lines width  StyledText wrapLines getClientArea getLeftMargin getRightMargin wrapLines
Wrap all logical lines at the given width p param width width to wrap lines at void wrap Lines int width int line Count logical Content get Line Count visual Line Count 0 visual Lines new int line Count 2 reset Visual Lines 0 visual Lines length wrap Line Range 0 line Count 0 width  wrapLines lineCount logicalContent getLineCount visualLineCount visualLines lineCount resetVisualLines visualLines wrapLineRange lineCount

Throws an appropriate exception based on the passed in error code param code the DND error code public static void error int code error code 0 
Throws an appropriate exception based on the passed in error code The code hresult code argument should be either 0 or the platform specific error code p In DND errors are reported by throwing one of three exceptions dl dd java lang Illegal Argument Exception dd dt thrown whenever one of the API methods is invoked with an illegal argument dt dd org eclipse swt SWT Exception extends java lang Runtime Exception dd dt thrown whenever a recoverable error happens internally in SWT dt dd org eclipse swt SWT Error extends java lang Error dd dt thrown whenever a b non recoverable b error happens internally in SWT dt dl This method provides the logic which maps between error codes and one of the above exceptions p param code the DND error code param hresult the platform specific error code see SWT Error see SWT Exception see Illegal Argument Exception public static void error int code int hresult switch code OS Failure Limit fatal may occur only on some platforms case DND ERROR CANNOT INIT DRAG String msg DND INIT DRAG MESSAGE if hresult 0 msg result hresult NON NLS 1 throw new SWT Error code msg case DND ERROR CANNOT INIT DROP String msg DND INIT DROP MESSAGE if hresult 0 msg result hresult NON NLS 1 throw new SWT Error code msg case DND ERROR CANNOT SET CLIPBOARD String msg DND CANNOT SET CLIPBOARD MESSAGE if hresult 0 msg result hresult NON NLS 1 throw new SWT Error code msg Unknown Undefined Error SWT error code  IllegalArgumentException SWTException RuntimeException SWTError SWTError SWTException IllegalArgumentException ERROR_CANNOT_INIT_DRAG INIT_DRAG_MESSAGE SWTError ERROR_CANNOT_INIT_DROP INIT_DROP_MESSAGE SWTError ERROR_CANNOT_SET_CLIPBOARD CANNOT_SET_CLIPBOARD_MESSAGE SWTError

class DND Listener extends Typed Listener DND Listener constructor comment param listener org eclipse swt internal SWT Event Listener DND Listener SWT Event Listener listener super listener  DNDListener TypedListener DNDListener SWTEventListener DNDListener SWTEventListener
public void handle Event Event e switch e type case DND Drag Start Drag Source Event event new Drag Source Event DND Event e Drag Source Listener event Listener drag Start event event update Event DND Event e break case DND Drag End Drag Source Event event new Drag Source Event DND Event e Drag Source Listener event Listener drag Finished event event update Event DND Event e break case DND Drag Set Data Drag Source Event event new Drag Source Event DND Event e Drag Source Listener event Listener drag Set Data event event update Event DND Event e break case DND Drag Enter Drop Target Event event new Drop Target Event DND Event e Drop Target Listener event Listener drag Enter event event update Event DND Event e break case DND Drag Leave Drop Target Event event new Drop Target Event DND Event e Drop Target Listener event Listener drag Leave event event update Event DND Event e break case DND Drag Over Drop Target Event event new Drop Target Event DND Event e Drop Target Listener event Listener drag Over event event update Event DND Event e break case DND Drop Drop Target Event event new Drop Target Event DND Event e Drop Target Listener event Listener drop event event update Event DND Event e break case DND Drop Accept Drop Target Event event new Drop Target Event DND Event e Drop Target Listener event Listener drop Accept event event update Event DND Event e break case DND Drag Operation Changed Drop Target Event event new Drop Target Event DND Event e Drop Target Listener event Listener drag Operation Changed event event update Event DND Event e break  handleEvent DragStart DragSourceEvent DragSourceEvent DNDEvent DragSourceListener eventListener dragStart updateEvent DNDEvent DragEnd DragSourceEvent DragSourceEvent DNDEvent DragSourceListener eventListener dragFinished updateEvent DNDEvent DragSetData DragSourceEvent DragSourceEvent DNDEvent DragSourceListener eventListener dragSetData updateEvent DNDEvent DragEnter DropTargetEvent DropTargetEvent DNDEvent DropTargetListener eventListener dragEnter updateEvent DNDEvent DragLeave DropTargetEvent DropTargetEvent DNDEvent DropTargetListener eventListener dragLeave updateEvent DNDEvent DragOver DropTargetEvent DropTargetEvent DNDEvent DropTargetListener eventListener dragOver updateEvent DNDEvent DropTargetEvent DropTargetEvent DNDEvent DropTargetListener eventListener updateEvent DNDEvent DropAccept DropTargetEvent DropTargetEvent DNDEvent DropTargetListener eventListener dropAccept updateEvent DNDEvent DragOperationChanged DropTargetEvent DropTargetEvent DNDEvent DropTargetListener eventListener dragOperationChanged updateEvent DNDEvent

public class Drag Source Adapter implements Drag Source Listener This implementation of code drag Start code permits the drag operation to start For additional information see code Drag Source Listener drag Start code  DragSourceAdapter DragSourceListener dragStart DragSourceListener dragStart
public void drag Start Drag Source Event event This implementation of code drag Finished code does nothing For additional information see code Drag Source Listener drag Finished code  dragStart DragSourceEvent dragFinished DragSourceListener dragFinished
public void drag Finished Drag Source Event event This implementation of code drag Set Data code does nothing For additional information see code Drag Source Listener drag Set Data code  dragFinished DragSourceEvent dragSetData DragSourceListener dragSetData

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Drag Source Event DND Event e super e this data e data this detail e detail this doit e doit this data Type e data Type  DragSourceEvent DNDEvent dataType dataType
void update Event DND Event e e widget this widget e time this time e data this data e detail this detail e doit this doit e data Type this data Type  updateEvent DNDEvent dataType dataType

The user has begun the actions required to drag the widget This event gives the application the chance to decide if a drag should be started p The following fields in the Drag Source Event apply ul li in widget li in time li in out doit ul p param event the information associated with the drag start event see Drag Source Event  DragSourceEvent DragSourceEvent
The data is required from the drag source p The following fields in the Drag Source Event apply ul li in widget li in time li in data Type the type of data requested li out data the application inserts the actual data here must match the data Type ul p param event the information associated with the drag set data event see Drag Source Event  DragSourceEvent dataType dataType DragSourceEvent
The drop has successfully completed mouse up over a valid target or has been terminated such as hitting the ESC key Perform cleanup such as removing data from the source side on a successful move operation p The following fields in the Drag Source Event apply ul li in widget li in time li in doit li in detail ul p param event the information associated with the drag finished event see Drag Source Event  DragSourceEvent DragSourceEvent

abstract class Drag Under Effect abstract void show int effect int x int y  DragUnderEffect

This implementation of code drag Enter code permits the default operation defined in code event detail code to be performed on the current data type defined in code event current Data Type code For additional information see code Drop Target Listener drag Enter code  dragEnter currentDataType DropTargetListener dragEnter
public void drag Enter Drop Target Event event This implementation of code drag Leave code does nothing For additional information see code Drop Target Listener drag Operation Changed code  dragEnter DropTargetEvent dragLeave DropTargetListener dragOperationChanged
public void drag Leave Drop Target Event event This implementation of code drag Operation Changed code permits the default operation defined in code event detail code to be performed on the current data type defined in code event current Data Type code For additional information see code Drop Target Listener drag Operation Changed code  dragLeave DropTargetEvent dragOperationChanged currentDataType DropTargetListener dragOperationChanged
public void drag Operation Changed Drop Target Event event This implementation of code drag Over code permits the default operation defined in code event detail code to be performed on the current data type defined in code event current Data Type code For additional information see code Drop Target Listener drag Over code  dragOperationChanged DropTargetEvent dragOver currentDataType DropTargetListener dragOver
public void drag Over Drop Target Event event This implementation of code drop code does nothing For additional information see code Drop Target Listener drop code  dragOver DropTargetEvent DropTargetListener
public void drop Drop Target Event event This implementation of code drop Accept code permits the default operation defined in code event detail code to be performed on the current data type defined in code event current Data Type code For additional information see code Drop Target Listener drop Accept code  DropTargetEvent dropAccept currentDataType DropTargetListener dropAccept

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Drop Target Event DND Event e super e this data e data this x e x this y e y this detail e detail this current Data Type e data Type this data Types e data Types this operations e operations this feedback e feedback this item e item  DropTargetEvent DNDEvent currentDataType dataType dataTypes dataTypes
void update Event DND Event e e widget this widget e time this time e data this data e x this x e y this y e detail this detail e data Type this current Data Type e data Types this data Types e operations this operations e feedback this feedback e item this item  updateEvent DNDEvent dataType currentDataType dataTypes dataTypes

The cursor has entered the drop target boundaries p The following fields in the Drop Target Event apply ul li in widget li in time li in x li in y li in data Types li in out current Data Type li in operations li in out detail li in out feedback ul p p The code operation code value is determined by the modifier keys pressed by the user If no keys are pressed the code event detail code field is set to DND DROP DEFAULT If the application does not set the code event detail code to something other than code DND DROP DEFAULT code the operation will be set to the platform defined standard default p p The code current Data Type code is determined by the first transfer agent specified in set Transfer that matches a data type provided by the drag source p p It is possible to get a Drag Enter event when the drag source does not provide any matching data In this case the default operation is DND DROP NONE and the current Data Type is null p p The application can change the operation that will be performed by modifying the code detail code field but the choice must be one of the values in the code operations code field or DND DROP NONE p p The application can also change the type of data being requested by modifying the code current Data Types code field but the value must be one of the values in the code data Types code list p param event the information associated with the drag enter event see Drop Target Event  DropTargetEvent dataTypes currentDataType DROP_DEFAULT DROP_DEFAULT currentDataType setTransfer DragEnter DROP_NONE currentDataType DROP_NONE currentDataTypes dataTypes DropTargetEvent
The cursor has left the drop target boundaries OR the drop has been cancelled OR the data is about to be dropped p The following fields in the Drop Target Event apply ul li in widget li in time li in x li in y li in data Types li in current Data Type li in operations li in detail ul p param event the information associated with the drag leave event see Drop Target Event  DropTargetEvent dataTypes currentDataType DropTargetEvent
The operation being performed has changed usually due to the user changing the selected modifier key s while dragging p The following fields in the Drop Target Event apply ul li in widget li in time li in x li in y li in data Types li in out current Data Type li in operations li in out detail li in out feedback ul p p The code operation code value is determined by the modifier keys pressed by the user If no keys are pressed the code event detail code field is set to DND DROP DEFAULT If the application does not set the code event detail code to something other than code DND DROP DEFAULT code the operation will be set to the platform defined standard default p p The code current Data Type code value is determined by the value assigned to code current Data Type code in previous drag Enter and drag Over calls p p The application can change the operation that will be performed by modifying the code detail code field but the choice must be one of the values in the code operations code field p p The application can also change the type of data being requested by modifying the code current Data Types code field but the value must be one of the values in the code data Types code list p param event the information associated with the drag operation changed event see Drop Target Event  DropTargetEvent dataTypes currentDataType DROP_DEFAULT DROP_DEFAULT currentDataType currentDataType dragEnter dragOver currentDataTypes dataTypes DropTargetEvent
The cursor is moving over the drop target p The following fields in the Drop Target Event apply ul li in widget li in time li in x li in y li in data Types li in out current Data Type li in operations li in out detail li in out feedback ul p p The code operation code value is determined by the value assigned to code current Data Type code in previous drag Enter and drag Over calls p p The code current Data Type code value is determined by the value assigned to code current Data Type code in previous drag Enter and drag Over calls p p The application can change the operation that will be performed by modifying the code detail code field but the choice must be one of the values in the code operations code field p p The application can also change the type of data being requested by modifying the code current Data Types code field but the value must be one of the values in the code data Types code list p p NOTE At this point the code data code field is null On some platforms it is possible to obtain the data being transferred before the transfer occurs but in most platforms this is not possible On those platforms where the data is available the application can access the data as follows p pre code public void drag Over Drop Target Event event Text Transfer text Transfer Text Transfer get Instance String data String text Transfer native To Java event current Data Type if data null System out println Data to be dropped is Text data code pre param event the information associated with the drag over event see Drop Target Event  DropTargetEvent dataTypes currentDataType currentDataType dragEnter dragOver currentDataType currentDataType dragEnter dragOver currentDataTypes dataTypes dragOver DropTargetEvent TextTransfer textTransfer TextTransfer getInstance textTransfer nativeToJava currentDataType DropTargetEvent
The data is being dropped The data field contains java format of the data being dropped To determine the type of the data object refer to the documentation for the Transfer subclass specified in event current Data Type p The following fields in Drop Target Event apply ul li in widget li in time li in x li in y li in out detail li in current Data Type li in data ul p p The application can refuse to perform the drop operation by setting the detail field to DND DROP NONE p param event the information associated with the drop event see Drop Target Event  currentDataType DropTargetEvent currentDataType DROP_NONE DropTargetEvent
The drop is about to be performed The drop target is given a last chance to change the nature of the drop p The following fields in the Drop Target Event apply ul li in widget li in time li in x li in y li in data Types li in out current Data Type li in operations li in out detail ul p p The application can veto the drop by setting the code event detail code field to code DND DROP NONE code p p The application can change the operation that will be performed by modifying the code detail code field but the choice must be one of the values in the code operations code field p p The application can also change the type of data being requested by modifying the code current Data Types code field but the value must be one of the values in the code data Types code list p param event the information associated with the drop accept event see Drop Target Event  DropTargetEvent dataTypes currentDataType DROP_NONE currentDataTypes dataTypes DropTargetEvent

class No Drag Under Effect extends Drag Under Effect No Drag Under Effect Control control  NoDragUnderEffect DragUnderEffect NoDragUnderEffect
No Drag Under Effect Control control void show int effect int x int y  NoDragUnderEffect

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Arm Event Event e super e  ArmEvent

Sent when a widget is armed or about to be selected param e an event containing information about the arm 

Sent when the location x y of a control changes relative to its parent or relative to the display for code Shell code s The default behavior is to do nothing param e an event containing information about the move public void control Moved Control Event e  controlMoved ControlEvent
Sent when the size width height of a control changes The default behavior is to do nothing param e an event containing information about the resize public void control Resized Control Event e  controlResized ControlEvent

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Control Event Event e super e  ControlEvent

Sent when the location x y of a control changes relative to its parent or relative to the display for code Shell code s param e an event containing information about the move 
Sent when the size width height of a control changes param e an event containing information about the resize 

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Dispose Event Event e super e  DisposeEvent

Sent when the widget is disposed param e an event containing information about the dispose 

Sent when a control gets focus The default behavior is to do nothing param e an event containing information about the focus change public void focus Gained Focus Event e  focusGained FocusEvent
Sent when a control loses focus The default behavior is to do nothing param e an event containing information about the focus change public void focus Lost Focus Event e  focusLost FocusEvent

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Focus Event Event e super e  FocusEvent

Sent when a control gets focus param e an event containing information about the focus change 
Sent when a control loses focus param e an event containing information about the focus change 

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Help Event Event e super e  HelpEvent

Sent when help is requested for a control typically when the user presses F1 param e an event containing information about the help 

Sent when a key is pressed on the system keyboard The default behavior is to do nothing param e an event containing information about the key press public void key Pressed Key Event e  keyPressed KeyEvent
Sent when a key is released on the system keyboard The default behavior is to do nothing param e an event containing information about the key release public void key Released Key Event e  keyReleased KeyEvent

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Key Event Event e super e this character e character this key Code e key Code this state Mask e state Mask this doit e doit  KeyEvent keyCode keyCode stateMask stateMask
Returns a string containing a concise human readable description of the receiver return a string representation of the event public String to String String string super to String return string substring 0 string length 1 remove trailing character character 0 0 character key Code key Code state Mask state Mask doit doit  toString toString keyCode keyCode stateMask stateMask

Sent when a key is pressed on the system keyboard param e an event containing information about the key press 
Sent when a key is released on the system keyboard param e an event containing information about the key release 

Sent when a menu is hidden The default behavior is to do nothing param e an event containing information about the menu operation public void menu Hidden Menu Event e  menuHidden MenuEvent
Sent when a menu is shown The default behavior is to do nothing param e an event containing information about the menu operation public void menu Shown Menu Event e  menuShown MenuEvent

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Menu Event Event e super e  MenuEvent

Sent when a menu is hidden param e an event containing information about the menu operation 
Sent when a menu is shown param e an event containing information about the menu operation 

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Modify Event Event e super e  ModifyEvent

Sent when the text is modified param e an event containing information about the modify 

Sent when a mouse button is pressed twice within the operating system specified double click period The default behavior is to do nothing param e an event containing information about the mouse double click see org eclipse swt widgets Display get Double Click Time public void mouse Double Click Mouse Event e  getDoubleClickTime mouseDoubleClick MouseEvent
Sent when a mouse button is pressed The default behavior is to do nothing param e an event containing information about the mouse button press public void mouse Down Mouse Event e  mouseDown MouseEvent
Sent when a mouse button is released The default behavior is to do nothing param e an event containing information about the mouse button release public void mouse Up Mouse Event e  mouseUp MouseEvent

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Mouse Event Event e super e this x e x this y e y this button e button this state Mask e state Mask  MouseEvent stateMask stateMask
Returns a string containing a concise human readable description of the receiver return a string representation of the event public String to String String string super to String return string substring 0 string length 1 remove trailing button button state Mask state Mask x x y y  toString toString stateMask stateMask

Sent when a mouse button is pressed twice within the operating system specified double click period param e an event containing information about the mouse double click see org eclipse swt widgets Display get Double Click Time  getDoubleClickTime
Sent when a mouse button is pressed param e an event containing information about the mouse button press 
Sent when a mouse button is released param e an event containing information about the mouse button release 

Sent when the mouse moves param e an event containing information about the mouse move 

Sent when the mouse pointer passes into the area of the screen covered by a control The default behavior is to do nothing param e an event containing information about the mouse enter public void mouse Enter Mouse Event e  mouseEnter MouseEvent
Sent when the mouse pointer passes out of the area of the screen covered by a control The default behavior is to do nothing param e an event containing information about the mouse exit public void mouse Exit Mouse Event e  mouseExit MouseEvent
Sent when the mouse pointer hovers that is stops moving for an operating system specified period of time over a control The default behavior is to do nothing param e an event containing information about the hover public void mouse Hover Mouse Event e  mouseHover MouseEvent

Sent when the mouse pointer passes into the area of the screen covered by a control param e an event containing information about the mouse enter 
Sent when the mouse pointer passes out of the area of the screen covered by a control param e an event containing information about the mouse exit 
Sent when the mouse pointer hovers that is stops moving for an operating system specified period of time over a control param e an event containing information about the hover 

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Paint Event Event e super e this gc e gc this x e x this y e y this width e width this height e height this count e count  PaintEvent
Returns a string containing a concise human readable description of the receiver return a string representation of the event public String to String String string super to String return string substring 0 string length 1 remove trailing gc gc x x y y width width height height count count  toString toString

Sent when a paint event occurs for the control param e an event containing information about the paint 

Sent when selection occurs in the control The default behavior is to do nothing param e an event containing information about the selection public void widget Selected Selection Event e  widgetSelected SelectionEvent
Sent when default selection occurs in the control The default behavior is to do nothing param e an event containing information about the default selection public void widget Default Selected Selection Event e  widgetDefaultSelected SelectionEvent

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Selection Event Event e super e this item e item this x e x this y e y this width e width this height e height this detail e detail this state Mask e state Mask this doit e doit  SelectionEvent stateMask stateMask
Returns a string containing a concise human readable description of the receiver return a string representation of the event public String to String String string super to String return string substring 0 string length 1 remove trailing item item detail detail x x y y width width height height state Mask state Mask doit doit  toString toString stateMask stateMask

Sent when selection occurs in the control p For example on some platforms selection occurs in a List when the user selects an item or items p param e an event containing information about the selection 
Sent when default selection occurs in the control p For example on some platforms default selection occurs in a List when the user double clicks an item or types return in a Text p param e an event containing information about the default selection 

Sent when a shell becomes the active window The default behavior is to do nothing param e an event containing information about the activation public void shell Activated Shell Event e  shellActivated ShellEvent
Sent when a shell is closed The default behavior is to do nothing param e an event containing information about the close public void shell Closed Shell Event e  shellClosed ShellEvent
Sent when a shell stops being the active window The default behavior is to do nothing param e an event containing information about the deactivation public void shell Deactivated Shell Event e  shellDeactivated ShellEvent
Sent when a shell is un minimized The default behavior is to do nothing param e an event containing information about the un minimization public void shell Deiconified Shell Event e  shellDeiconified ShellEvent
Sent when a shell is minimized The default behavior is to do nothing param e an event containing information about the minimization public void shell Iconified Shell Event e  shellIconified ShellEvent

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Shell Event Event e super e this doit e doit  ShellEvent
Returns a string containing a concise human readable description of the receiver return a string representation of the event public String to String String string super to String return string substring 0 string length 1 remove trailing doit doit  toString toString

Sent when a shell becomes the active window param e an event containing information about the activation 
Sent when a shell is closed param e an event containing information about the close 
Sent when a shell stops being the active window param e an event containing information about the deactivation 
Sent when a shell is un minimized param e an event containing information about the un minimization 
Sent when a shell is minimized param e an event containing information about the minimization 

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Traverse Event Event e super e this detail e detail  TraverseEvent
Returns a string containing a concise human readable description of the receiver return a string representation of the event public String to String String string super to String return string substring 0 string length 1 remove trailing detail detail  toString toString

Sent when a traverse event occurs in a control p A traverse event occurs when the user presses a traversal key Traversal keys are typically tab and arrow keys along with certain other keys on some platforms Traversal key constants beginning with code TRAVERSE  code are defined in the code SWT code class p param e an event containing information about the traverse  TRAVERSE_

Sent when a tree branch is collapsed The default behavior is to do nothing param e an event containing information about the tree operation public void tree Collapsed Tree Event e  treeCollapsed TreeEvent
Sent when a tree branch is expanded The default behavior is to do nothing param e an event containing information about the tree operation public void tree Expanded Tree Event e  treeExpanded TreeEvent

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Tree Event Event e super e  TreeEvent

Sent when a tree branch is collapsed param e an event containing information about the tree operation 
Sent when a tree branch is expanded param e an event containing information about the tree operation 

Constructs a new instance of this class param object the object that fired the event public Typed Event Object object super object  TypedEvent
Constructs a new instance of this class based on the information in the argument param e the low level event to initialize the receiver with public Typed Event Event e super e widget this display e display this widget e widget this time e time this data e data  TypedEvent
Returns the name of the event This is the name of the class without the package name return the name of the event String get Name String string get Class get Name int index string last Index Of if index 1 return string return string substring index 1 string length  getName getClass getName lastIndexOf
Returns a string containing a concise human readable description of the receiver return a string representation of the event public String to String return get Name widget time time data data  toString getName

Constructs a new instance of this class based on the information in the given untyped event param e the untyped event containing the information public Verify Event Event e super e this character e character this key Code e key Code this state Mask e state Mask this start e start this end e end this text e text  VerifyEvent keyCode keyCode stateMask stateMask
Returns a string containing a concise human readable description of the receiver return a string representation of the event public String to String String string super to String return string substring 0 string length 1 remove trailing start start end end text text  toString toString

Sent when the text is about to be modified p A verify event occurs after the user has done something to modify the text typically typed a key but before the text is modified The doit field in the verify event indicates whether or not to modify the text p param e an event containing information about the verify 

Invokes platform specific functionality to allocate a new GC handle p b IMPORTANT b This method is em not em part of the public API for code Drawable code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param data the platform specific GC data return the platform specific GC handle 
Invokes platform specific functionality to dispose a GC handle p b IMPORTANT b This method is em not em part of the public API for code Drawable code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param handle the platform specific GC handle param data the platform specific GC data 

Constructs a new empty Image Data with the given width height depth and palette The data will be initialized to an all zero array of the appropriate size param width the width of the image param height the height of the image param depth the depth of the image param palette the palette of the image must not be null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the width or height is negative or if the depth is not one of 1 2 4 8 16 24 or 32 li li ERROR NULL ARGUMENT if the palette is null li ul public Image Data int width int height int depth Palette Data palette this width height depth palette 4 null 0 null null 1 1 SWT IMAGE UNDEFINED 0 0 0 0  ImageData IllegalArgumentException ERROR_INVALID_ARGUMENT ERROR_NULL_ARGUMENT ImageData PaletteData IMAGE_UNDEFINED
Constructs a new empty Image Data with the given width height depth palette scanline Pad and data param width the width of the image param height the height of the image param depth the depth of the image param palette the palette of the image param scanline Pad the padding of each line in bytes param data the data of the image exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the width or height is negative or if the depth is not one of 1 2 4 8 16 24 or 32 li li ERROR NULL ARGUMENT if the palette or data is null li li ERROR CANNOT BE ZERO if the scanline Pad is zero li ul public Image Data int width int height int depth Palette Data palette int scanline Pad byte data this width height depth palette scanline Pad check Data data 0 null null 1 1 SWT IMAGE UNDEFINED 0 0 0 0  ImageData scanlinePad scanlinePad IllegalArgumentException ERROR_INVALID_ARGUMENT ERROR_NULL_ARGUMENT ERROR_CANNOT_BE_ZERO scanlinePad ImageData PaletteData scanlinePad scanlinePad checkData IMAGE_UNDEFINED
Constructs an code Image Data code loaded from the specified input stream Throws an error if an error occurs while loading the image or if the image has an unsupported type p This constructor is provided for convenience when loading a single image only If the stream contains multiple images only the first one will be loaded To load multiple images use code Image Loader load code p param stream the input stream to load the image from must not be null exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the stream is null li ul exception SWT Exception ul li ERROR INVALID IMAGE if the image file contains invalid data li li ERROR IO if an IO error occurs while reading data li ul see Image Loader load Input Stream public Image Data Input Stream stream Image Data data new Image Loader load stream if data length 1 SWT error SWT ERROR INVALID IMAGE Image Data i data 0 set All Fields i width i height i depth i scanline Pad i bytes Per Line i data i palette i transparent Pixel i mask Data i mask Pad i alpha Data i alpha i type i x i y i disposal Method i delay Time  ImageData ImageLoader IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_INVALID_IMAGE ERROR_IO ImageLoader InputStream ImageData InputStream ImageData ImageLoader ERROR_INVALID_IMAGE ImageData setAllFields scanlinePad bytesPerLine transparentPixel maskData maskPad alphaData disposalMethod delayTime
Constructs an code Image Data code loaded from a file with the specified name Throws an error if an error occurs loading the image or if the image has an unsupported type p This constructor is provided for convenience when loading a single image only If the file contains multiple images only the first one will be loaded To load multiple images use code Image Loader load code p param filename the name of the file to load the image from must not be null exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the file name is null li ul exception SWT Exception ul li ERROR INVALID IMAGE if the image file contains invalid data li li ERROR IO if an IO error occurs while reading data li ul public Image Data String filename Image Data data new Image Loader load filename if data length 1 SWT error SWT ERROR INVALID IMAGE Image Data i data 0 set All Fields i width i height i depth i scanline Pad i bytes Per Line i data i palette i transparent Pixel i mask Data i mask Pad i alpha Data i alpha i type i x i y i disposal Method i delay Time  ImageData ImageLoader IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_INVALID_IMAGE ERROR_IO ImageData ImageData ImageLoader ERROR_INVALID_IMAGE ImageData setAllFields scanlinePad bytesPerLine transparentPixel maskData maskPad alphaData disposalMethod delayTime
Prevents uninitialized instances from being created outside the package Image Data  ImageData
Constructs an image data by giving values for all non computable fields p This method is for internal use and is not described further p Image Data int width int height int depth Palette Data palette int scanline Pad byte data int mask Pad byte mask Data byte alpha Data int alpha int transparent Pixel int type int x int y int disposal Method int delay Time if palette null SWT error SWT ERROR NULL ARGUMENT if depth 1 depth 2 depth 4 depth 8 depth 16 depth 24 depth 32 SWT error SWT ERROR INVALID ARGUMENT if width 0 height 0 SWT error SWT ERROR INVALID ARGUMENT if scanline Pad 0 SWT error SWT ERROR CANNOT BE ZERO int bytes Per Line width depth 7 8 scanline Pad 1 scanline Pad scanline Pad set All Fields width height depth scanline Pad bytes Per Line data null data new byte bytes Per Line height palette transparent Pixel mask Data mask Pad alpha Data alpha type x y disposal Method delay Time  ImageData PaletteData scanlinePad maskPad maskData alphaData transparentPixel disposalMethod delayTime ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT scanlinePad ERROR_CANNOT_BE_ZERO bytesPerLine scanlinePad scanlinePad scanlinePad setAllFields scanlinePad bytesPerLine bytesPerLine transparentPixel maskData maskPad alphaData disposalMethod delayTime
Initializes all fields in the receiver This method must be called by all public constructors to ensure that all fields are initialized for a new Image Data object If a new field is added to the class then it must be added to this method p This method is for internal use and is not described further p void set All Fields int width int height int depth int scanline Pad int bytes Per Line byte data Palette Data palette int transparent Pixel byte mask Data int mask Pad byte alpha Data int alpha int type int x int y int disposal Method int delay Time this width width this height height this depth depth this scanline Pad scanline Pad this bytes Per Line bytes Per Line this data data this palette palette this transparent Pixel transparent Pixel this mask Data mask Data this mask Pad mask Pad this alpha Data alpha Data this alpha alpha this type type this x x this y y this disposal Method disposal Method this delay Time delay Time  ImageData setAllFields scanlinePad bytesPerLine PaletteData transparentPixel maskData maskPad alphaData disposalMethod delayTime scanlinePad scanlinePad bytesPerLine bytesPerLine transparentPixel transparentPixel maskData maskData maskPad maskPad alphaData alphaData disposalMethod disposalMethod delayTime delayTime
Invokes internal SWT functionality to create a new instance of this class p b IMPORTANT b This method is em not em part of the public API for code Image Data code It is marked public only so that it can be shared within the packages provided by SWT It is subject to change without notice and should never be called from application code p p This method is for internal use and is not described further p public static Image Data internal new int width int height int depth Palette Data palette int scanline Pad byte data int mask Pad byte mask Data byte alpha Data int alpha int transparent Pixel int type int x int y int disposal Method int delay Time return new Image Data width height depth palette scanline Pad data mask Pad mask Data alpha Data alpha transparent Pixel type x y disposal Method delay Time  ImageData ImageData internal_new PaletteData scanlinePad maskPad maskData alphaData transparentPixel disposalMethod delayTime ImageData scanlinePad maskPad maskData alphaData transparentPixel disposalMethod delayTime
Image Data color Mask Image int pixel Image Data mask new Image Data width height 1 bw Palette 2 null 0 null null 1 1 SWT IMAGE UNDEFINED 0 0 0 0 int row new int width for int y 0 y height y get Pixels 0 y width row 0 for int i 0 i width i if pixel 1 row i pixel row i 0 else row i 1 mask set Pixels 0 y width row 0 return mask  ImageData colorMaskImage ImageData ImageData bwPalette IMAGE_UNDEFINED getPixels setPixels
static byte check Data byte data if data null SWT error SWT ERROR NULL ARGUMENT return data  checkData ERROR_NULL_ARGUMENT
Returns a new instance of the same class as the receiver whose slots have been filled in with em copies em of the values in the slots of the receiver That is the returned object is a em deep copy em of the receiver return a copy of the receiver public Object clone byte clone Data new byte data length System arraycopy data 0 clone Data 0 data length byte clone Mask Data null if mask Data null clone Mask Data new byte mask Data length System arraycopy mask Data 0 clone Mask Data 0 mask Data length byte clone Alpha Data null if alpha Data null clone Alpha Data new byte alpha Data length System arraycopy alpha Data 0 clone Alpha Data 0 alpha Data length return new Image Data width height depth palette scanline Pad clone Data mask Pad clone Mask Data clone Alpha Data alpha transparent Pixel type x y disposal Method delay Time  cloneData cloneData cloneMaskData maskData cloneMaskData maskData maskData cloneMaskData maskData cloneAlphaData alphaData cloneAlphaData alphaData alphaData cloneAlphaData alphaData ImageData scanlinePad cloneData maskPad cloneMaskData cloneAlphaData transparentPixel disposalMethod delayTime
Returns the alpha value at offset code x code in scanline code y code in the receiver s alpha data param x the x coodinate of the pixel to get the alpha value of param y the y coordinate of the pixel to get the alpha value of return the alpha value at the given coordinates exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if either argument is out of range li ul public int get Alpha int x int y if x width y height x 0 y 0 SWT error SWT ERROR INVALID ARGUMENT if alpha Data null return 255 return alpha Data y width x 0xFF  IllegalArgumentException ERROR_INVALID_ARGUMENT getAlpha ERROR_INVALID_ARGUMENT alphaData alphaData
Returns code get Width code alpha values starting at offset code x code in scanline code y code in the receiver s alpha data starting at code start Index code param x the x position of the pixel to begin getting alpha values param y the y position of the pixel to begin getting alpha values param get Width the width of the data to get param alphas the buffer in which to put the alpha values param start Index the offset into the image to begin getting alpha values exception Index Out Of Bounds Exception if get Width is too large exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if pixels is null li li ERROR INVALID ARGUMENT if x or y is out of bounds li li ERROR INVALID ARGUMENT if get Width is negative li ul public void get Alphas int x int y int get Width byte alphas int start Index if alphas null SWT error SWT ERROR NULL ARGUMENT if get Width 0 x width y height x 0 y 0 SWT error SWT ERROR INVALID ARGUMENT if get Width 0 return if alpha Data null int end Index start Index get Width for int i start Index i end Index i alphas i byte 255 return may throw an Index Out Of Bounds Exception System arraycopy alpha Data y width x alphas start Index get Width  getWidth startIndex getWidth startIndex IndexOutOfBoundsException getWidth IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT getWidth getAlphas getWidth startIndex ERROR_NULL_ARGUMENT getWidth ERROR_INVALID_ARGUMENT getWidth alphaData endIndex startIndex getWidth startIndex endIndex IndexOutOfBoundsException alphaData startIndex getWidth
Returns the pixel value at offset code x code in scanline code y code in the receiver s data param x the x position of the pixel to get param y the y position of the pixel to get return the pixel at the given coordinates exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if either argument is out of bounds li ul exception SWT Exception ul li ERROR UNSUPPORTED DEPTH if the depth is not one of 1 2 4 8 16 24 or 32 li ul public int get Pixel int x int y if x width y height x 0 y 0 SWT error SWT ERROR INVALID ARGUMENT int index int the Byte int mask if depth 1 index y bytes Per Line x 3 the Byte data index 0xFF mask 1 7 x 0x7 if the Byte mask 0 return 0 else return 1 if depth 2 index y bytes Per Line x 2 the Byte data index 0xFF int offset 3 x 4 mask 3 offset 2 return the Byte mask offset 2 if depth 4 index y bytes Per Line x 1 the Byte data index 0xFF if x 0x1 0 return the Byte 4 else return the Byte 0x0F if depth 8 index y bytes Per Line x return data index 0xFF if depth 16 index y bytes Per Line x 2 return data index 1 0xFF 8 data index 0xFF if depth 24 index y bytes Per Line x 3 return data index 0xFF 16 data index 1 0xFF 8 data index 2 0xFF if depth 32 index y bytes Per Line x 4 return data index 0xFF 24 data index 1 0xFF 16 data index 2 0xFF 8 data index 3 0xFF SWT error SWT ERROR UNSUPPORTED DEPTH return 0  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_UNSUPPORTED_DEPTH getPixel ERROR_INVALID_ARGUMENT theByte bytesPerLine theByte theByte bytesPerLine theByte theByte bytesPerLine theByte theByte theByte bytesPerLine bytesPerLine bytesPerLine bytesPerLine ERROR_UNSUPPORTED_DEPTH
Returns code get Width code pixel values starting at offset code x code in scanline code y code in the receiver s data starting at code start Index code param x the x position of the first pixel to get param y the y position of the first pixel to get param get Width the width of the data to get param pixels the buffer in which to put the pixels param start Index the offset into the byte array to begin storing pixels exception Index Out Of Bounds Exception if get Width is too large exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if pixels is null li li ERROR INVALID ARGUMENT if x or y is out of bounds li li ERROR INVALID ARGUMENT if get Width is negative li ul exception SWT Exception ul li ERROR UNSUPPORTED DEPTH if the depth is not one of 1 2 4 or 8 For higher depths use the int version of this method li ul public void get Pixels int x int y int get Width byte pixels int start Index if pixels null SWT error SWT ERROR NULL ARGUMENT if get Width 0 x width y height x 0 y 0 SWT error SWT ERROR INVALID ARGUMENT if get Width 0 return int index int the Byte int mask 0 int n get Width int i start Index int srcX x srcY y if depth 1 index y bytes Per Line x 3 the Byte data index 0xFF while n 0 mask 1 7 srcX 0x7 if the Byte mask 0 pixels i 0 else pixels i 1 i n srcX if srcX width srcY index srcY bytes Per Line if n 0 the Byte data index 0xFF srcX 0 else if mask 1 index if n 0 the Byte data index 0xFF return if depth 2 index y bytes Per Line x 2 the Byte data index 0xFF int offset while n 0 offset 3 srcX 4 mask 3 offset 2 pixels i byte the Byte mask offset 2 i n srcX if srcX width srcY index srcY bytes Per Line if n 0 the Byte data index 0xFF srcX 0 else if offset 0 index the Byte data index 0xFF return if depth 4 index y bytes Per Line x 1 if x 0x1 1 the Byte data index 0xFF pixels i byte the Byte 0x0F i n srcX if srcX width srcY index srcY bytes Per Line srcX 0 else index while n 1 the Byte data index 0xFF pixels i byte the Byte 4 i n srcX if srcX width srcY index srcY bytes Per Line srcX 0 else pixels i byte the Byte 0x0F i n srcX if srcX width srcY index srcY bytes Per Line srcX 0 else index if n 0 the Byte data index 0xFF pixels i byte the Byte 4 return if depth 8 index y bytes Per Line x for int j 0 j get Width j pixels i data index i srcX if srcX width srcY index srcY bytes Per Line srcX 0 else index return SWT error SWT ERROR UNSUPPORTED DEPTH  getWidth startIndex getWidth startIndex IndexOutOfBoundsException getWidth IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT getWidth SWTException ERROR_UNSUPPORTED_DEPTH getPixels getWidth startIndex ERROR_NULL_ARGUMENT getWidth ERROR_INVALID_ARGUMENT getWidth theByte getWidth startIndex bytesPerLine theByte theByte bytesPerLine theByte theByte bytesPerLine theByte theByte bytesPerLine theByte theByte bytesPerLine theByte theByte bytesPerLine theByte theByte bytesPerLine theByte bytesPerLine theByte theByte bytesPerLine getWidth bytesPerLine ERROR_UNSUPPORTED_DEPTH
Returns code get Width code pixel values starting at offset code x code in scanline code y code in the receiver s data starting at code start Index code param x the x position of the first pixel to get param y the y position of the first pixel to get param get Width the width of the data to get param pixels the buffer in which to put the pixels param start Index the offset into the buffer to begin storing pixels exception Index Out Of Bounds Exception if get Width is too large exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if pixels is null li li ERROR INVALID ARGUMENT if x or y is out of bounds li li ERROR INVALID ARGUMENT if get Width is negative li ul exception SWT Exception ul li ERROR UNSUPPORTED DEPTH if the depth is not one of 1 2 4 8 16 24 or 32 li ul public void get Pixels int x int y int get Width int pixels int start Index if pixels null SWT error SWT ERROR NULL ARGUMENT if get Width 0 x width y height x 0 y 0 SWT error SWT ERROR INVALID ARGUMENT if get Width 0 return int index int the Byte int mask int n get Width int i start Index int srcX x srcY y if depth 1 index y bytes Per Line x 3 the Byte data index 0xFF while n 0 mask 1 7 srcX 0x7 if the Byte mask 0 pixels i 0 else pixels i 1 i n srcX if srcX width srcY index srcY bytes Per Line if n 0 the Byte data index 0xFF srcX 0 else if mask 1 index if n 0 the Byte data index 0xFF return if depth 2 index y bytes Per Line x 2 the Byte data index 0xFF int offset while n 0 offset 3 srcX 4 mask 3 offset 2 pixels i byte the Byte mask offset 2 i n srcX if srcX width srcY index srcY bytes Per Line if n 0 the Byte data index 0xFF srcX 0 else if offset 0 index the Byte data index 0xFF return if depth 4 index y bytes Per Line x 1 if x 0x1 1 the Byte data index 0xFF pixels i the Byte 0x0F i n srcX if srcX width srcY index srcY bytes Per Line srcX 0 else index while n 1 the Byte data index 0xFF pixels i the Byte 4 i n srcX if srcX width srcY index srcY bytes Per Line srcX 0 else pixels i the Byte 0x0F i n srcX if srcX width srcY index srcY bytes Per Line srcX 0 else index if n 0 the Byte data index 0xFF pixels i the Byte 4 return if depth 8 index y bytes Per Line x for int j 0 j get Width j pixels i data index 0xFF i srcX if srcX width srcY index srcY bytes Per Line srcX 0 else index return if depth 16 index y bytes Per Line x 2 for int j 0 j get Width j pixels i data index 1 0xFF 8 data index 0xFF i srcX if srcX width srcY index srcY bytes Per Line srcX 0 else index 2 return if depth 24 index y bytes Per Line x 3 for int j 0 j get Width j pixels i data index 0xFF 16 data index 1 0xFF 8 data index 2 0xFF i srcX if srcX width srcY index srcY bytes Per Line srcX 0 else index 3 return if depth 32 index y bytes Per Line x 4 i start Index for int j 0 j get Width j pixels i data index 0xFF 24 data index 1 0xFF 16 data index 2 0xFF 8 data index 3 0xFF i srcX if srcX width srcY index srcY bytes Per Line srcX 0 else index 4 return SWT error SWT ERROR UNSUPPORTED DEPTH  getWidth startIndex getWidth startIndex IndexOutOfBoundsException getWidth IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT getWidth SWTException ERROR_UNSUPPORTED_DEPTH getPixels getWidth startIndex ERROR_NULL_ARGUMENT getWidth ERROR_INVALID_ARGUMENT getWidth theByte getWidth startIndex bytesPerLine theByte theByte bytesPerLine theByte theByte bytesPerLine theByte theByte bytesPerLine theByte theByte bytesPerLine theByte theByte bytesPerLine theByte theByte bytesPerLine theByte bytesPerLine theByte theByte bytesPerLine getWidth bytesPerLine bytesPerLine getWidth bytesPerLine bytesPerLine getWidth bytesPerLine bytesPerLine startIndex getWidth bytesPerLine ERROR_UNSUPPORTED_DEPTH
Returns an array of code RGB code s which comprise the indexed color table of the receiver or null if the receiver has a direct color model return the RGB values for the image or null if direct color see Palette Data getRG Bs public RGB getRG Bs return palette getRG Bs  PaletteData getRGBs getRGBs getRGBs
Returns an code Image Data code which specifies the transparency mask information for the receiver or null if the receiver has no transparency and is not an icon return the transparency mask or null if none exists public Image Data get Transparency Mask if get Transparency Type SWT TRANSPARENCY MASK return new Image Data width height 1 bw Palette mask Pad mask Data else return color Mask Image transparent Pixel  ImageData ImageData getTransparencyMask getTransparencyType TRANSPARENCY_MASK ImageData bwPalette maskPad maskData colorMaskImage transparentPixel
Returns the image transparency type return the receiver s transparency type public int get Transparency Type if mask Data null return SWT TRANSPARENCY MASK if transparent Pixel 1 return SWT TRANSPARENCY PIXEL if alpha Data null return SWT TRANSPARENCY ALPHA return SWT TRANSPARENCY NONE  getTransparencyType maskData TRANSPARENCY_MASK transparentPixel TRANSPARENCY_PIXEL alphaData TRANSPARENCY_ALPHA TRANSPARENCY_NONE
Returns the byte order of the receiver return MSB FIRST or LSB FIRST int get Byte Order return depth 16 MSB FIRST LSB FIRST  MSB_FIRST LSB_FIRST getByteOrder MSB_FIRST LSB_FIRST
Returns a copy of the receiver which has been stretched or shrunk to the specified size If either the width or height is negative the resulting image will be inverted in the associated axis param width the width of the new Image Data param height the height of the new Image Data return a scaled copy of the image public Image Data scaled To int width int height Create a destination image with no data final boolean flipX width 0 if flipX width width final boolean flipY height 0 if flipY height height Image Data dest new Image Data width height depth palette scanline Pad null 0 null null 1 transparent Pixel type x y disposal Method delay Time Scale the image contents if palette is Direct blit BLIT SRC this data this depth this bytes Per Line this get Byte Order 0 0 this width this height 0 0 0 ALPHA OPAQUE null 0 0 0 dest data dest depth dest bytes Per Line dest get Byte Order 0 0 dest width dest height 0 0 0 flipX flipY else blit BLIT SRC this data this depth this bytes Per Line this get Byte Order 0 0 this width this height null null null ALPHA OPAQUE null 0 0 0 dest data dest depth dest bytes Per Line dest get Byte Order 0 0 dest width dest height null null null flipX flipY Scale the image mask or alpha if mask Data null dest mask Pad this mask Pad int dest Bpl dest width 7 8 dest Bpl dest Bpl dest mask Pad 1 dest mask Pad dest mask Pad dest mask Data new byte dest Bpl dest height int src Bpl this width 7 8 src Bpl src Bpl this mask Pad 1 this mask Pad this mask Pad blit BLIT SRC this mask Data 1 src Bpl MSB FIRST 0 0 this width this height null null null ALPHA OPAQUE null 0 0 0 dest mask Data 1 dest Bpl MSB FIRST 0 0 dest width dest height null null null flipX flipY else if alpha 1 dest alpha this alpha else if alpha Data null dest alpha Data new byte dest width dest height blit BLIT SRC this alpha Data 8 this width MSB FIRST 0 0 this width this height null null null ALPHA OPAQUE null 0 0 0 dest alpha Data 8 dest width MSB FIRST 0 0 dest width dest height null null null flipX flipY return dest  ImageData ImageData ImageData scaledTo ImageData ImageData scanlinePad transparentPixel disposalMethod delayTime isDirect BLIT_SRC bytesPerLine getByteOrder ALPHA_OPAQUE bytesPerLine getByteOrder BLIT_SRC bytesPerLine getByteOrder ALPHA_OPAQUE bytesPerLine getByteOrder maskData maskPad maskPad destBpl destBpl destBpl maskPad maskPad maskPad maskData destBpl srcBpl srcBpl srcBpl maskPad maskPad maskPad BLIT_SRC maskData srcBpl MSB_FIRST ALPHA_OPAQUE maskData destBpl MSB_FIRST alphaData alphaData BLIT_SRC alphaData MSB_FIRST ALPHA_OPAQUE alphaData MSB_FIRST
Sets the alpha value at offset code x code in scanline code y code in the receiver s alpha data param x the x coordinate of the alpha value to set param y the y coordinate of the alpha value to set param alpha the value to set the alpha to exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if x or y is out of bounds li ul public void set Alpha int x int y int alpha if x width y height x 0 y 0 alpha 0 alpha 255 SWT error SWT ERROR INVALID ARGUMENT if alpha Data null alpha Data new byte width height alpha Data y width x byte alpha  IllegalArgumentException ERROR_INVALID_ARGUMENT setAlpha ERROR_INVALID_ARGUMENT alphaData alphaData alphaData
Sets the alpha values starting at offset code x code in scanline code y code in the receiver s alpha data to the values from the array code alphas code starting at code start Index code param x the x coordinate of the pixel to being setting the alpha values param y the y coordinate of the pixel to being setting the alpha values param put Width the width of the alpha values to set param alphas the alpha values to set param start Index the index at which to begin setting exception Index Out Of Bounds Exception if put Width is too large exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if pixels is null li li ERROR INVALID ARGUMENT if x or y is out of bounds li li ERROR INVALID ARGUMENT if put Width is negative li ul public void set Alphas int x int y int put Width byte alphas int start Index if alphas null SWT error SWT ERROR NULL ARGUMENT if put Width 0 x width y height x 0 y 0 SWT error SWT ERROR INVALID ARGUMENT if put Width 0 return if alpha Data null alpha Data new byte width height may throw an Index Out Of Bounds Exception System arraycopy alphas start Index alpha Data y width x put Width  startIndex putWidth startIndex IndexOutOfBoundsException putWidth IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT putWidth setAlphas putWidth startIndex ERROR_NULL_ARGUMENT putWidth ERROR_INVALID_ARGUMENT putWidth alphaData alphaData IndexOutOfBoundsException startIndex alphaData putWidth
Sets the pixel value at offset code x code in scanline code y code in the receiver s data param x the x coordinate of the pixel to set param y the y coordinate of the pixel to set param pixel Value the value to set the pixel to exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if x or y is out of bounds li ul exception SWT Exception ul li ERROR UNSUPPORTED DEPTH if the depth is not one of 1 2 4 8 16 24 or 32 li ul public void set Pixel int x int y int pixel Value if x width y height x 0 y 0 SWT error SWT ERROR INVALID ARGUMENT int index byte the Byte int mask if depth 1 index y bytes Per Line x 3 the Byte data index mask 1 7 x 0x7 if pixel Value 0x1 1 data index byte the Byte mask else data index byte the Byte mask 1 return if depth 2 index y bytes Per Line x 2 the Byte data index int offset 3 x 4 mask 0xFF 3 offset 2 data index byte data index mask pixel Value offset 2 return if depth 4 index y bytes Per Line x 1 if x 0x1 0 data index byte data index 0x0F pixel Value 0x0F 4 else data index byte data index 0xF0 pixel Value 0x0F return if depth 8 index y bytes Per Line x data index byte pixel Value 0xFF return if depth 16 index y bytes Per Line x 2 data index 1 byte pixel Value 8 0xFF data index byte pixel Value 0xFF return if depth 24 index y bytes Per Line x 3 data index byte pixel Value 16 0xFF data index 1 byte pixel Value 8 0xFF data index 2 byte pixel Value 0xFF return if depth 32 index y bytes Per Line x 4 data index byte pixel Value 24 0xFF data index 1 byte pixel Value 16 0xFF data index 2 byte pixel Value 8 0xFF data index 3 byte pixel Value 0xFF return SWT error SWT ERROR UNSUPPORTED DEPTH  pixelValue IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_UNSUPPORTED_DEPTH setPixel pixelValue ERROR_INVALID_ARGUMENT theByte bytesPerLine theByte pixelValue theByte theByte bytesPerLine theByte pixelValue bytesPerLine pixelValue pixelValue bytesPerLine pixelValue bytesPerLine pixelValue pixelValue bytesPerLine pixelValue pixelValue pixelValue bytesPerLine pixelValue pixelValue pixelValue pixelValue ERROR_UNSUPPORTED_DEPTH
Sets the pixel values starting at offset code x code in scanline code y code in the receiver s data to the values from the array code pixels code starting at code start Index code param x the x position of the pixel to set param y the y position of the pixel to set param put Width the width of the pixels to set param pixels the pixels to set param start Index the index at which to begin setting exception Index Out Of Bounds Exception if put Width is too large exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if pixels is null li li ERROR INVALID ARGUMENT if x or y is out of bounds li li ERROR INVALID ARGUMENT if put Width is negative li ul exception SWT Exception ul li ERROR UNSUPPORTED DEPTH if the depth is not one of 1 2 4 8 For higher depths use the int version of this method li ul public void set Pixels int x int y int put Width byte pixels int start Index if pixels null SWT error SWT ERROR NULL ARGUMENT if put Width 0 x width y height x 0 y 0 SWT error SWT ERROR INVALID ARGUMENT if put Width 0 return int index int the Byte int mask int n put Width int i start Index int srcX x srcY y if depth 1 index y bytes Per Line x 3 while n 0 mask 1 7 srcX 0x7 if pixels i 0x1 1 data index byte data index 0xFF mask else data index byte data index 0xFF mask 1 i n srcX if srcX width srcY index srcY bytes Per Line srcX 0 else if mask 1 index return if depth 2 byte masks byte 0xFC byte 0xF3 byte 0xCF byte 0x3F index y bytes Per Line x 2 int offset 3 x 4 while n 0 the Byte pixels i 0x3 data index byte data index masks offset the Byte offset 2 i n srcX if srcX width srcY index srcY bytes Per Line offset 0 srcX 0 else if offset 0 index offset 3 else offset return if depth 4 index y bytes Per Line x 1 boolean high x 0x1 0 while n 0 the Byte pixels i 0x0F if high data index byte data index 0x0F the Byte 4 else data index byte data index 0xF0 the Byte i n srcX if srcX width srcY index srcY bytes Per Line high true srcX 0 else if high index high high return if depth 8 index y bytes Per Line x for int j 0 j put Width j data index byte pixels i 0xFF i srcX if srcX width srcY index srcY bytes Per Line srcX 0 else index return SWT error SWT ERROR UNSUPPORTED DEPTH  startIndex putWidth startIndex IndexOutOfBoundsException putWidth IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT putWidth SWTException ERROR_UNSUPPORTED_DEPTH setPixels putWidth startIndex ERROR_NULL_ARGUMENT putWidth ERROR_INVALID_ARGUMENT putWidth theByte putWidth startIndex bytesPerLine bytesPerLine bytesPerLine theByte theByte bytesPerLine bytesPerLine theByte theByte theByte bytesPerLine bytesPerLine putWidth bytesPerLine ERROR_UNSUPPORTED_DEPTH
Sets the pixel values starting at offset code x code in scanline code y code in the receiver s data to the values from the array code pixels code starting at code start Index code param x the x position of the pixel to set param y the y position of the pixel to set param put Width the width of the pixels to set param pixels the pixels to set param start Index the index at which to begin setting exception Index Out Of Bounds Exception if put Width is too large exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if pixels is null li li ERROR INVALID ARGUMENT if x or y is out of bounds li li ERROR INVALID ARGUMENT if put Width is negative li ul exception SWT Exception ul li ERROR UNSUPPORTED DEPTH if the depth is not one of 1 2 4 8 16 24 or 32 li ul public void set Pixels int x int y int put Width int pixels int start Index if pixels null SWT error SWT ERROR NULL ARGUMENT if put Width 0 x width y height x 0 y 0 SWT error SWT ERROR INVALID ARGUMENT if put Width 0 return int index int the Byte int mask int n put Width int i start Index int pixel int srcX x srcY y if depth 1 index y bytes Per Line x 3 while n 0 mask 1 7 srcX 0x7 if pixels i 0x1 1 data index byte data index 0xFF mask else data index byte data index 0xFF mask 1 i n srcX if srcX width srcY index srcY bytes Per Line srcX 0 else if mask 1 index return if depth 2 byte masks byte 0xFC byte 0xF3 byte 0xCF byte 0x3F index y bytes Per Line x 2 int offset 3 x 4 while n 0 the Byte pixels i 0x3 data index byte data index masks offset the Byte offset 2 i n srcX if srcX width srcY index srcY bytes Per Line offset 3 srcX 0 else if offset 0 index offset 3 else offset return if depth 4 index y bytes Per Line x 1 boolean high x 0x1 0 while n 0 the Byte pixels i 0x0F if high data index byte data index 0x0F the Byte 4 else data index byte data index 0xF0 the Byte i n srcX if srcX width srcY index srcY bytes Per Line high true srcX 0 else if high index high high return if depth 8 index y bytes Per Line x for int j 0 j put Width j data index byte pixels i 0xFF i srcX if srcX width srcY index srcY bytes Per Line srcX 0 else index return if depth 16 index y bytes Per Line x 2 for int j 0 j put Width j pixel pixels i data index byte pixel 0xFF data index 1 byte pixel 8 0xFF i srcX if srcX width srcY index srcY bytes Per Line srcX 0 else index 2 return if depth 24 index y bytes Per Line x 3 for int j 0 j put Width j pixel pixels i data index byte pixel 16 0xFF data index 1 byte pixel 8 0xFF data index 2 byte pixel 0xFF i srcX if srcX width srcY index srcY bytes Per Line srcX 0 else index 3 return if depth 32 index y bytes Per Line x 4 for int j 0 j put Width j pixel pixels i data index byte pixel 24 0xFF data index 1 byte pixel 16 0xFF data index 2 byte pixel 8 0xFF data index 3 byte pixel 0xFF i srcX if srcX width srcY index srcY bytes Per Line srcX 0 else index 4 return SWT error SWT ERROR UNSUPPORTED DEPTH  startIndex putWidth startIndex IndexOutOfBoundsException putWidth IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT putWidth SWTException ERROR_UNSUPPORTED_DEPTH setPixels putWidth startIndex ERROR_NULL_ARGUMENT putWidth ERROR_INVALID_ARGUMENT putWidth theByte putWidth startIndex bytesPerLine bytesPerLine bytesPerLine theByte theByte bytesPerLine bytesPerLine theByte theByte theByte bytesPerLine bytesPerLine putWidth bytesPerLine bytesPerLine putWidth bytesPerLine bytesPerLine putWidth bytesPerLine bytesPerLine putWidth bytesPerLine ERROR_UNSUPPORTED_DEPTH
Returns a palette with 2 colors black white static Palette Data bw Palette return new Palette Data new RGB new RGB 0 0 0 new RGB 255 255 255  PaletteData bwPalette PaletteData
Gets the offset of the most significant bit for the given mask static int getMSB Offset int mask for int i 31 i 0 i if mask i 0x1 0 return i 1 return 0  getMSBOffset
Finds the closest match static int closest Match int depth byte red byte green byte blue int red Mask int green Mask int blue Mask byte reds byte greens byte blues if depth 8 int rshift 32 getMSB Offset red Mask int gshift 32 getMSB Offset green Mask int bshift 32 getMSB Offset blue Mask return red 24 rshift red Mask green 24 gshift green Mask blue 24 bshift blue Mask int r g b int min Distance 0x7fffffff int nearest Pixel 0 int n reds length for int j 0 j n j r reds j 0xFF red 0xFF g greens j 0xFF green 0xFF b blues j 0xFF blue 0xFF int distance r r g g b b if distance min Distance nearest Pixel j if distance 0 break min Distance distance return nearest Pixel  closestMatch redMask greenMask blueMask getMSBOffset redMask getMSBOffset greenMask getMSBOffset blueMask redMask greenMask blueMask minDistance nearestPixel minDistance nearestPixel minDistance nearestPixel
static final byte convert Pad byte data int width int height int depth int pad int new Pad if pad new Pad return data int stride width depth 7 8 int bpl stride pad 1 pad pad int new Bpl stride new Pad 1 new Pad new Pad byte new Data new byte height new Bpl int src Index 0 dest Index 0 for int y 0 y height y System arraycopy data src Index new Data dest Index stride src Index bpl dest Index new Bpl return new Data  convertPad newPad newPad newBpl newPad newPad newPad newData newBpl srcIndex destIndex srcIndex newData destIndex srcIndex destIndex newBpl newData
Blits a direct palette image into a direct palette image p Note When the source and destination depth order and masks are pairwise equal and the blitter operation is BLIT SRC the masks are ignored Hence when not changing the image data format 0 may be specified for the masks p param op the blitter operation a combination of BLIT xxx flags see BLIT xxx constants param src Data the source byte array containing image data param src Depth the source depth one of 8 16 24 32 param src Stride the source number of bytes per line param src Order the source byte ordering one of MSB FIRST or LSB FIRST ignored if src Depth is not 16 or 32 param srcX the top left x coord of the source blit region param srcY the top left y coord of the source blit region param src Width the width of the source blit region param src Height the height of the source blit region param src Red Mask the source red channel mask param src Green Mask the source green channel mask param src Blue Mask the source blue channel mask param alpha Mode the alpha blending or mask mode may be an integer 0 255 for global alpha ignored if BLIT ALPHA not specified in the blitter operations see ALPHA MODE xxx constants param alpha Data the alpha blending or mask data varies depending on the value of alpha Mode and sometimes ignored param alpha Stride the alpha data number of bytes per line param alphaX the top left x coord of the alpha blit region param alphaY the top left y coord of the alpha blit region param dest Data the destination byte array containing image data param dest Depth the destination depth one of 8 16 24 32 param dest Stride the destination number of bytes per line param dest Order the destination byte ordering one of MSB FIRST or LSB FIRST ignored if dest Depth is not 16 or 32 param destX the top left x coord of the destination blit region param destY the top left y coord of the destination blit region param dest Width the width of the destination blit region param dest Height the height of the destination blit region param dest Red Mask the destination red channel mask param dest Green Mask the destination green channel mask param dest Blue Mask the destination blue channel mask param flipX if true the resulting image is flipped along the vertical axis param flipY if true the resulting image is flipped along the horizontal axis static void blit int op byte src Data int src Depth int src Stride int src Order int srcX int srcY int src Width int src Height int src Red Mask int src Green Mask int src Blue Mask int alpha Mode byte alpha Data int alpha Stride int alphaX int alphaY byte dest Data int dest Depth int dest Stride int dest Order int destX int destY int dest Width int dest Height int dest Red Mask int dest Green Mask int dest Blue Mask boolean flipX boolean flipY if dest Width 0 dest Height 0 alpha Mode ALPHA TRANSPARENT return these should be supplied as params later final int src Alpha Mask 0 dest Alpha Mask 0 Prepare scaling data final int dwm1 dest Width 1 final int sfxi dwm1 0 int long src Width 16 1 dwm1 0 final int dhm1 dest Height 1 final int sfyi dhm1 0 int long src Height 16 1 dhm1 0 Prepare source related data final int sbpp stype switch src Depth case 8 sbpp 1 stype TYPE GENERIC 8 break case 16 sbpp 2 stype src Order MSB FIRST TYPE GENERIC 16 MSB TYPE GENERIC 16 LSB break case 24 sbpp 3 stype TYPE GENERIC 24 break case 32 sbpp 4 stype src Order MSB FIRST TYPE GENERIC 32 MSB TYPE GENERIC 32 LSB break default throw new Illegal Argument Exception Invalid source type return int spr srcY src Stride srcX sbpp Prepare destination related data final int dbpp dtype switch dest Depth case 8 dbpp 1 dtype TYPE GENERIC 8 break case 16 dbpp 2 dtype dest Order MSB FIRST TYPE GENERIC 16 MSB TYPE GENERIC 16 LSB break case 24 dbpp 3 dtype TYPE GENERIC 24 break case 32 dbpp 4 dtype dest Order MSB FIRST TYPE GENERIC 32 MSB TYPE GENERIC 32 LSB break default throw new Illegal Argument Exception Invalid destination type return int dpr flipY destY dhm1 destY dest Stride flipX destX dwm1 destX dbpp final int dprxi flipX dbpp dbpp final int dpryi flipY dest Stride dest Stride Prepare special processing data int apr if op BLIT ALPHA 0 switch alpha Mode case ALPHA MASK UNPACKED case ALPHA CHANNEL SEPARATE if alpha Data null alpha Mode 0x10000 apr alphaY alpha Stride alphaX break case ALPHA MASK PACKED if alpha Data null alpha Mode 0x10000 alpha Stride 3 apr alphaY alpha Stride alphaX break case ALPHA MASK INDEX throw new Illegal Argument Exception Invalid alpha type return case ALPHA MASK RGB if alpha Data null alpha Mode 0x10000 apr 0 break default alpha Mode alpha Mode 16 255 prescale case ALPHA CHANNEL SOURCE apr 0 break else alpha Mode 0x10000 apr 0 Blit int dp dpr int sp spr if alpha Mode 0x10000 stype dtype src Red Mask dest Red Mask src Green Mask dest Green Mask src Blue Mask dest Blue Mask src Alpha Mask dest Alpha Mask Fast blit straight copy switch sbpp case 1 for int dy dest Height sfy sfyi dy 0 dy sp spr sfy 16 src Stride sfy sfy 0xffff sfyi dp dpr dpryi for int dx dest Width sfx sfxi dx 0 dx dp dprxi sfx sfx 0xffff sfxi dest Data dp src Data sp sp sfx 16 break case 2 for int dy dest Height sfy sfyi dy 0 dy sp spr sfy 16 src Stride sfy sfy 0xffff sfyi dp dpr dpryi for int dx dest Width sfx sfxi dx 0 dx dp dprxi sfx sfx 0xffff sfxi dest Data dp src Data sp dest Data dp 1 src Data sp 1 sp sfx 16 2 break case 3 for int dy dest Height sfy sfyi dy 0 dy sp spr sfy 16 src Stride sfy sfy 0xffff sfyi dp dpr dpryi for int dx dest Width sfx sfxi dx 0 dx dp dprxi sfx sfx 0xffff sfxi dest Data dp src Data sp dest Data dp 1 src Data sp 1 dest Data dp 2 src Data sp 2 sp sfx 16 3 break case 4 for int dy dest Height sfy sfyi dy 0 dy sp spr sfy 16 src Stride sfy sfy 0xffff sfyi dp dpr dpryi for int dx dest Width sfx sfxi dx 0 dx dp dprxi sfx sfx 0xffff sfxi dest Data dp src Data sp dest Data dp 1 src Data sp 1 dest Data dp 2 src Data sp 2 dest Data dp 3 src Data sp 3 sp sfx 16 4 break return Comprehensive blit apply transformations final int src Red Shift get Channel Shift src Red Mask final byte src Reds ANY TO EIGHT get Channel Width src Red Mask src Red Shift final int src Green Shift get Channel Shift src Green Mask final byte src Greens ANY TO EIGHT get Channel Width src Green Mask src Green Shift final int src Blue Shift get Channel Shift src Blue Mask final byte src Blues ANY TO EIGHT get Channel Width src Blue Mask src Blue Shift final int src Alpha Shift get Channel Shift src Alpha Mask final byte src Alphas ANY TO EIGHT get Channel Width src Alpha Mask src Alpha Shift final int dest Red Shift get Channel Shift dest Red Mask final int dest Red Width get Channel Width dest Red Mask dest Red Shift final byte dest Reds ANY TO EIGHT dest Red Width final int dest Red Pre Shift 8 dest Red Width final int dest Green Shift get Channel Shift dest Green Mask final int dest Green Width get Channel Width dest Green Mask dest Green Shift final byte dest Greens ANY TO EIGHT dest Green Width final int dest Green Pre Shift 8 dest Green Width final int dest Blue Shift get Channel Shift dest Blue Mask final int dest Blue Width get Channel Width dest Blue Mask dest Blue Shift final byte dest Blues ANY TO EIGHT dest Blue Width final int dest Blue Pre Shift 8 dest Blue Width final int dest Alpha Shift get Channel Shift dest Alpha Mask final int dest Alpha Width get Channel Width dest Alpha Mask dest Alpha Shift final byte dest Alphas ANY TO EIGHT dest Alpha Width final int dest Alpha Pre Shift 8 dest Alpha Width int ap apr alpha alpha Mode int r 0 g 0 b 0 a 0 int rq 0 gq 0 bq 0 aq 0 for int dy dest Height sfy sfyi dy 0 dy sp spr sfy 16 src Stride ap apr sfy 16 alpha Stride sfy sfy 0xffff sfyi dp dpr dpryi for int dx dest Width sfx sfxi dx 0 dx dp dprxi sfx sfx 0xffff sfxi READ NEXT PIXEL switch stype case TYPE GENERIC 8 final int data src Data sp 0xff sp sfx 16 r src Reds data src Red Mask src Red Shift 0xff g src Greens data src Green Mask src Green Shift 0xff b src Blues data src Blue Mask src Blue Shift 0xff a src Alphas data src Alpha Mask src Alpha Shift 0xff break case TYPE GENERIC 16 MSB final int data src Data sp 0xff 8 src Data sp 1 0xff  BLIT_SRC BLIT_xxx BLIT_xxx srcData srcDepth srcStride srcOrder MSB_FIRST LSB_FIRST srcDepth srcWidth srcHeight srcRedMask srcGreenMask srcBlueMask alphaMode BLIT_ALPHA ALPHA_MODE_xxx alphaData alphaMode alphaStride destData destDepth destStride destOrder MSB_FIRST LSB_FIRST destDepth destWidth destHeight destRedMask destGreenMask destBlueMask srcData srcDepth srcStride srcOrder srcWidth srcHeight srcRedMask srcGreenMask srcBlueMask alphaMode alphaData alphaStride destData destDepth destStride destOrder destWidth destHeight destRedMask destGreenMask destBlueMask destWidth destHeight alphaMode ALPHA_TRANSPARENT srcAlphaMask destAlphaMask destWidth srcWidth destHeight srcHeight srcDepth TYPE_GENERIC_8 srcOrder MSB_FIRST TYPE_GENERIC_16_MSB TYPE_GENERIC_16_LSB TYPE_GENERIC_24 srcOrder MSB_FIRST TYPE_GENERIC_32_MSB TYPE_GENERIC_32_LSB IllegalArgumentException srcStride destDepth TYPE_GENERIC_8 destOrder MSB_FIRST TYPE_GENERIC_16_MSB TYPE_GENERIC_16_LSB TYPE_GENERIC_24 destOrder MSB_FIRST TYPE_GENERIC_32_MSB TYPE_GENERIC_32_LSB IllegalArgumentException destStride destStride destStride BLIT_ALPHA alphaMode ALPHA_MASK_UNPACKED ALPHA_CHANNEL_SEPARATE alphaData alphaMode alphaStride ALPHA_MASK_PACKED alphaData alphaMode alphaStride alphaStride ALPHA_MASK_INDEX IllegalArgumentException ALPHA_MASK_RGB alphaData alphaMode alphaMode alphaMode ALPHA_CHANNEL_SOURCE alphaMode alphaMode srcRedMask destRedMask srcGreenMask destGreenMask srcBlueMask destBlueMask srcAlphaMask destAlphaMask destHeight srcStride destWidth destData srcData destHeight srcStride destWidth destData srcData destData srcData destHeight srcStride destWidth destData srcData destData srcData destData srcData destHeight srcStride destWidth destData srcData destData srcData destData srcData destData srcData srcRedShift getChannelShift srcRedMask srcReds ANY_TO_EIGHT getChannelWidth srcRedMask srcRedShift srcGreenShift getChannelShift srcGreenMask srcGreens ANY_TO_EIGHT getChannelWidth srcGreenMask srcGreenShift srcBlueShift getChannelShift srcBlueMask srcBlues ANY_TO_EIGHT getChannelWidth srcBlueMask srcBlueShift srcAlphaShift getChannelShift srcAlphaMask srcAlphas ANY_TO_EIGHT getChannelWidth srcAlphaMask srcAlphaShift destRedShift getChannelShift destRedMask destRedWidth getChannelWidth destRedMask destRedShift destReds ANY_TO_EIGHT destRedWidth destRedPreShift destRedWidth destGreenShift getChannelShift destGreenMask destGreenWidth getChannelWidth destGreenMask destGreenShift destGreens ANY_TO_EIGHT destGreenWidth destGreenPreShift destGreenWidth destBlueShift getChannelShift destBlueMask destBlueWidth getChannelWidth destBlueMask destBlueShift destBlues ANY_TO_EIGHT destBlueWidth destBluePreShift destBlueWidth destAlphaShift getChannelShift destAlphaMask destAlphaWidth getChannelWidth destAlphaMask destAlphaShift destAlphas ANY_TO_EIGHT destAlphaWidth destAlphaPreShift destAlphaWidth alphaMode destHeight srcStride alphaStride destWidth TYPE_GENERIC_8 srcData srcReds srcRedMask srcRedShift srcGreens srcGreenMask srcGreenShift srcBlues srcBlueMask srcBlueShift srcAlphas srcAlphaMask srcAlphaShift TYPE_GENERIC_16_MSB srcData srcData
Blits an index palette image into an index palette image p Note The source and destination red green and blue arrays may be null if no alpha blending or dither is to be performed p param op the blitter operation a combination of BLIT xxx flags see BLIT xxx constants param src Data the source byte array containing image data param src Depth the source depth one of 1 2 4 8 param src Stride the source number of bytes per line param src Order the source byte ordering one of MSB FIRST or LSB FIRST ignored if src Depth is not 1 param srcX the top left x coord of the source blit region param srcY the top left y coord of the source blit region param src Width the width of the source blit region param src Height the height of the source blit region param src Reds the source palette red component intensities param src Greens the source palette green component intensities param src Blues the source palette blue component intensities param alpha Mode the alpha blending or mask mode may be an integer 0 255 for global alpha ignored if BLIT ALPHA not specified in the blitter operations see ALPHA MODE xxx constants param alpha Data the alpha blending or mask data varies depending on the value of alpha Mode and sometimes ignored param alpha Stride the alpha data number of bytes per line param alphaX the top left x coord of the alpha blit region param alphaY the top left y coord of the alpha blit region param dest Data the destination byte array containing image data param dest Depth the destination depth one of 1 2 4 8 param dest Stride the destination number of bytes per line param dest Order the destination byte ordering one of MSB FIRST or LSB FIRST ignored if dest Depth is not 1 param destX the top left x coord of the destination blit region param destY the top left y coord of the destination blit region param dest Width the width of the destination blit region param dest Height the height of the destination blit region param dest Reds the destination palette red component intensities param dest Greens the destination palette green component intensities param dest Blues the destination palette blue component intensities param flipX if true the resulting image is flipped along the vertical axis param flipY if true the resulting image is flipped along the horizontal axis static void blit int op byte src Data int src Depth int src Stride int src Order int srcX int srcY int src Width int src Height byte src Reds byte src Greens byte src Blues int alpha Mode byte alpha Data int alpha Stride int alphaX int alphaY byte dest Data int dest Depth int dest Stride int dest Order int destX int destY int dest Width int dest Height byte dest Reds byte dest Greens byte dest Blues boolean flipX boolean flipY if dest Width 0 dest Height 0 alpha Mode ALPHA TRANSPARENT return Prepare scaling data final int dwm1 dest Width 1 final int sfxi dwm1 0 int long src Width 16 1 dwm1 0 final int dhm1 dest Height 1 final int sfyi dhm1 0 int long src Height 16 1 dhm1 0 Prepare source related data final int stype switch src Depth case 8 stype TYPE INDEX 8 break case 4 src Stride 1 stype TYPE INDEX 4 break case 2 src Stride 2 stype TYPE INDEX 2 break case 1 src Stride 3 stype src Order MSB FIRST TYPE INDEX 1 MSB TYPE INDEX 1 LSB break default throw new Illegal Argument Exception Invalid source type return int spr srcY src Stride srcX Prepare destination related data final int dtype switch dest Depth case 8 dtype TYPE INDEX 8 break case 4 dest Stride 1 dtype TYPE INDEX 4 break case 2 dest Stride 2 dtype TYPE INDEX 2 break case 1 dest Stride 3 dtype dest Order MSB FIRST TYPE INDEX 1 MSB TYPE INDEX 1 LSB break default throw new Illegal Argument Exception Invalid source type return int dpr flipY destY dhm1 destY dest Stride flipX destX dwm1 destX final int dprxi flipX 1 1 final int dpryi flipY dest Stride dest Stride Prepare special processing data int apr if op BLIT ALPHA 0 switch alpha Mode case ALPHA MASK UNPACKED case ALPHA CHANNEL SEPARATE if alpha Data null alpha Mode 0x10000 apr alphaY alpha Stride alphaX break case ALPHA MASK PACKED if alpha Data null alpha Mode 0x10000 alpha Stride 3 apr alphaY alpha Stride alphaX break case ALPHA MASK INDEX case ALPHA MASK RGB if alpha Data null alpha Mode 0x10000 apr 0 break default alpha Mode alpha Mode 16 255 prescale case ALPHA CHANNEL SOURCE apr 0 break else alpha Mode 0x10000 apr 0 final boolean dither Enabled op BLIT DITHER 0 Blit int dp dpr int sp spr int ap apr int dest Palette Size 1 dest Depth if dest Reds null dest Reds length dest Palette Size dest Palette Size dest Reds length byte palette Mapping null boolean is Exact Palette Mapping true switch alpha Mode case 0x10000 If the palettes and formats are equivalent use a one to one mapping if stype dtype src Reds dest Reds src Greens dest Greens src Blues dest Blues palette Mapping ONE TO ONE MAPPING break If palettes have not been supplied supply a suitable mapping else if src Reds null dest Reds null if src Depth dest Depth palette Mapping ONE TO ONE MAPPING else palette Mapping new byte 1 src Depth int mask 0xff dest Depth 8 for int i 0 i palette Mapping length i palette Mapping i byte i mask break case ALPHA MASK UNPACKED case ALPHA MASK PACKED case ALPHA MASK INDEX case ALPHA MASK RGB Generate a palette mapping int src Palette Size 1 src Depth palette Mapping new byte src Palette Size if src Reds null src Reds length src Palette Size src Palette Size src Reds length for int i 0 r g b index i src Palette Size i r src Reds i 0xff g src Greens i 0xff b src Blues i 0xff index 0 int min Distance 0x7fffffff for int j 0 dr dg db distance j dest Palette Size j dr dest Reds j 0xff r dg dest Greens j 0xff g db dest Blues j 0xff b distance dr dr dg dg db db if distance min Distance index j if distance 0 break min Distance distance palette Mapping i byte index if min Distance 0 is Exact Palette Mapping false break if palette Mapping null is Exact Palette Mapping dither Enabled if stype dtype alpha Mode 0x10000 Fast blit copy w mapping switch stype case TYPE INDEX 8 for int dy dest Height sfy sfyi dy 0 dy sp spr sfy 16 src Stride sfy sfy 0xffff sfyi dp dpr dpryi for int dx dest Width sfx sfxi dx 0 dx dp dprxi sfx sfx 0xffff sfxi dest Data dp palette Mapping src Data sp 0xff sp sfx 16 break case TYPE INDEX 4 for int dy dest Height sfy sfyi dy 0 dy sp spr sfy 16 src Stride sfy sfy 0xffff sfyi dp dpr dpryi for int dx dest Width sfx sfxi dx 0 dx dp dprxi sfx sfx 0xffff sfxi final int v if sp 1 0 v palette Mapping src Data sp 1 0x0f else v src Data sp 1 4 0x0f sp sfx 16 if dp 1 0 dest Data dp 1 byte dest Data dp 1 0xf0 v else dest Data dp 1 byte dest Data dp 1 0x0f v 4 break case TYPE INDEX 2 for int dy dest Height sfy sfyi dy 0 dy sp spr sfy 16 src Stride sfy sfy 0xffff sfyi dp dpr dpryi for int dx dest Width sfx sfxi dx 0 dx dp dprxi sfx sfx 0xffff sfxi final int index palette Mapping src Data sp 2 6 sp 3 2 0x03 sp sfx 16 final int shift 6 dp 3 2 dest Data dp 2 byte dest Data dp 2 0x03 shift index shift break case TYPE INDEX 1 MSB for int dy dest Height sfy sfyi dy 0 dy sp spr sfy 16 src Stride sfy sfy 0xffff sfyi dp dpr dpryi for int dx dest Width sfx sfxi dx 0 dx dp dprxi sfx sfx 0xffff sfxi final int index palette Mapping src Data sp 3 7 sp 7 0x01 sp sfx 16 final int shift 7 dp 7 dest Data dp 3 byte dest Data dp 3 0x01 shift index shift break case TYPE INDEX 1 LSB for int dy dest Height sfy sfyi dy 0 dy sp spr sfy 16 src Stride sfy sfy 0xffff sfyi dp dpr dpryi for int dx dest Width sfx sfxi dx 0 dx dp dprxi sfx sfx 0xffff sfxi final int index palette Mapping src Data sp 3 sp 7 0x01 sp sfx 16 final int shift dp 7 dest Data dp 3 byte dest Data dp 3  BLIT_xxx BLIT_xxx srcData srcDepth srcStride srcOrder MSB_FIRST LSB_FIRST srcDepth srcWidth srcHeight srcReds srcGreens srcBlues alphaMode BLIT_ALPHA ALPHA_MODE_xxx alphaData alphaMode alphaStride destData destDepth destStride destOrder MSB_FIRST LSB_FIRST destDepth destWidth destHeight destReds destGreens destBlues srcData srcDepth srcStride srcOrder srcWidth srcHeight srcReds srcGreens srcBlues alphaMode alphaData alphaStride destData destDepth destStride destOrder destWidth destHeight destReds destGreens destBlues destWidth destHeight alphaMode ALPHA_TRANSPARENT destWidth srcWidth destHeight srcHeight srcDepth TYPE_INDEX_8 srcStride TYPE_INDEX_4 srcStride TYPE_INDEX_2 srcStride srcOrder MSB_FIRST TYPE_INDEX_1_MSB TYPE_INDEX_1_LSB IllegalArgumentException srcStride destDepth TYPE_INDEX_8 destStride TYPE_INDEX_4 destStride TYPE_INDEX_2 destStride destOrder MSB_FIRST TYPE_INDEX_1_MSB TYPE_INDEX_1_LSB IllegalArgumentException destStride destStride destStride BLIT_ALPHA alphaMode ALPHA_MASK_UNPACKED ALPHA_CHANNEL_SEPARATE alphaData alphaMode alphaStride ALPHA_MASK_PACKED alphaData alphaMode alphaStride alphaStride ALPHA_MASK_INDEX ALPHA_MASK_RGB alphaData alphaMode alphaMode alphaMode ALPHA_CHANNEL_SOURCE alphaMode ditherEnabled BLIT_DITHER destPaletteSize destDepth destReds destReds destPaletteSize destPaletteSize destReds paletteMapping isExactPaletteMapping alphaMode srcReds destReds srcGreens destGreens srcBlues destBlues paletteMapping ONE_TO_ONE_MAPPING srcReds destReds srcDepth destDepth paletteMapping ONE_TO_ONE_MAPPING paletteMapping srcDepth destDepth paletteMapping paletteMapping ALPHA_MASK_UNPACKED ALPHA_MASK_PACKED ALPHA_MASK_INDEX ALPHA_MASK_RGB srcPaletteSize srcDepth paletteMapping srcPaletteSize srcReds srcReds srcPaletteSize srcPaletteSize srcReds srcPaletteSize srcReds srcGreens srcBlues minDistance destPaletteSize destReds destGreens destBlues minDistance minDistance paletteMapping minDistance isExactPaletteMapping paletteMapping isExactPaletteMapping ditherEnabled alphaMode TYPE_INDEX_8 destHeight srcStride destWidth destData paletteMapping srcData TYPE_INDEX_4 destHeight srcStride destWidth paletteMapping srcData srcData destData destData destData destData TYPE_INDEX_2 destHeight srcStride destWidth paletteMapping srcData destData destData TYPE_INDEX_1_MSB destHeight srcStride destWidth paletteMapping srcData destData destData TYPE_INDEX_1_LSB destHeight srcStride destWidth paletteMapping srcData destData destData
Blits an index palette image into a direct palette image p Note The source and destination masks and palettes must always be fully specified p param op the blitter operation a combination of BLIT xxx flags see BLIT xxx constants param src Data the source byte array containing image data param src Depth the source depth one of 1 2 4 8 param src Stride the source number of bytes per line param src Order the source byte ordering one of MSB FIRST or LSB FIRST ignored if src Depth is not 1 param srcX the top left x coord of the source blit region param srcY the top left y coord of the source blit region param src Width the width of the source blit region param src Height the height of the source blit region param src Reds the source palette red component intensities param src Greens the source palette green component intensities param src Blues the source palette blue component intensities param alpha Mode the alpha blending or mask mode may be an integer 0 255 for global alpha ignored if BLIT ALPHA not specified in the blitter operations see ALPHA MODE xxx constants param alpha Data the alpha blending or mask data varies depending on the value of alpha Mode and sometimes ignored param alpha Stride the alpha data number of bytes per line param alphaX the top left x coord of the alpha blit region param alphaY the top left y coord of the alpha blit region param dest Data the destination byte array containing image data param dest Depth the destination depth one of 8 16 24 32 param dest Stride the destination number of bytes per line param dest Order the destination byte ordering one of MSB FIRST or LSB FIRST ignored if dest Depth is not 16 or 32 param destX the top left x coord of the destination blit region param destY the top left y coord of the destination blit region param dest Width the width of the destination blit region param dest Height the height of the destination blit region param dest Red Mask the destination red channel mask param dest Green Mask the destination green channel mask param dest Blue Mask the destination blue channel mask param flipX if true the resulting image is flipped along the vertical axis param flipY if true the resulting image is flipped along the horizontal axis static void blit int op byte src Data int src Depth int src Stride int src Order int srcX int srcY int src Width int src Height byte src Reds byte src Greens byte src Blues int alpha Mode byte alpha Data int alpha Stride int alphaX int alphaY byte dest Data int dest Depth int dest Stride int dest Order int destX int destY int dest Width int dest Height int dest Red Mask int dest Green Mask int dest Blue Mask boolean flipX boolean flipY if dest Width 0 dest Height 0 alpha Mode ALPHA TRANSPARENT return these should be supplied as params later final int dest Alpha Mask 0 Prepare scaling data final int dwm1 dest Width 1 final int sfxi dwm1 0 int long src Width 16 1 dwm1 0 final int dhm1 dest Height 1 final int sfyi dhm1 0 int long src Height 16 1 dhm1 0 Prepare source related data final int stype switch src Depth case 8 stype TYPE INDEX 8 break case 4 src Stride 1 stype TYPE INDEX 4 break case 2 src Stride 2 stype TYPE INDEX 2 break case 1 src Stride 3 stype src Order MSB FIRST TYPE INDEX 1 MSB TYPE INDEX 1 LSB break default throw new Illegal Argument Exception Invalid source type return int spr srcY src Stride srcX Prepare destination related data final int dbpp dtype switch dest Depth case 8 dbpp 1 dtype TYPE GENERIC 8 break case 16 dbpp 2 dtype dest Order MSB FIRST TYPE GENERIC 16 MSB TYPE GENERIC 16 LSB break case 24 dbpp 3 dtype TYPE GENERIC 24 break case 32 dbpp 4 dtype dest Order MSB FIRST TYPE GENERIC 32 MSB TYPE GENERIC 32 LSB break default throw new Illegal Argument Exception Invalid destination type return int dpr flipY destY dhm1 destY dest Stride flipX destX dwm1 destX dbpp final int dprxi flipX dbpp dbpp final int dpryi flipY dest Stride dest Stride Prepare special processing data int apr if op BLIT ALPHA 0 switch alpha Mode case ALPHA MASK UNPACKED case ALPHA CHANNEL SEPARATE if alpha Data null alpha Mode 0x10000 apr alphaY alpha Stride alphaX break case ALPHA MASK PACKED if alpha Data null alpha Mode 0x10000 alpha Stride 3 apr alphaY alpha Stride alphaX break case ALPHA MASK INDEX case ALPHA MASK RGB if alpha Data null alpha Mode 0x10000 apr 0 break default alpha Mode alpha Mode 16 255 prescale case ALPHA CHANNEL SOURCE apr 0 break else alpha Mode 0x10000 apr 0 Comprehensive blit apply transformations final int dest Red Shift get Channel Shift dest Red Mask final int dest Red Width get Channel Width dest Red Mask dest Red Shift final byte dest Reds ANY TO EIGHT dest Red Width final int dest Red Pre Shift 8 dest Red Width final int dest Green Shift get Channel Shift dest Green Mask final int dest Green Width get Channel Width dest Green Mask dest Green Shift final byte dest Greens ANY TO EIGHT dest Green Width final int dest Green Pre Shift 8 dest Green Width final int dest Blue Shift get Channel Shift dest Blue Mask final int dest Blue Width get Channel Width dest Blue Mask dest Blue Shift final byte dest Blues ANY TO EIGHT dest Blue Width final int dest Blue Pre Shift 8 dest Blue Width final int dest Alpha Shift get Channel Shift dest Alpha Mask final int dest Alpha Width get Channel Width dest Alpha Mask dest Alpha Shift final byte dest Alphas ANY TO EIGHT dest Alpha Width final int dest Alpha Pre Shift 8 dest Alpha Width int dp dpr int sp spr int ap apr alpha alpha Mode int r 0 g 0 b 0 a 0 index 0 int rq 0 gq 0 bq 0 aq 0 for int dy dest Height sfy sfyi dy 0 dy sp spr sfy 16 src Stride ap apr sfy 16 alpha Stride sfy sfy 0xffff sfyi dp dpr dpryi for int dx dest Width sfx sfxi dx 0 dx dp dprxi sfx sfx 0xffff sfxi READ NEXT PIXEL switch stype case TYPE INDEX 8 index src Data sp 0xff sp sfx 16 break case TYPE INDEX 4 if sp 1 0 index src Data sp 1 0x0f else index src Data sp 1 4 0x0f sp sfx 16 break case TYPE INDEX 2 index src Data sp 2 6 sp 3 2 0x03 sp sfx 16 break case TYPE INDEX 1 MSB index src Data sp 3 7 sp 7 0x01 sp sfx 16 break case TYPE INDEX 1 LSB index src Data sp 3 sp 7 0x01 sp sfx 16 break DO SPECIAL PROCESSING IF REQUIRED r src Reds index 0xff g src Greens index 0xff b src Blues index 0xff switch alpha Mode case ALPHA CHANNEL SEPARATE alpha alpha Data ap 0xff 16 255 ap sfx 16 break case ALPHA MASK UNPACKED alpha alpha Data ap 0 0x10000 0 ap sfx 16 break case ALPHA MASK PACKED alpha alpha Data ap 3 ap 7 9 0x10000 ap sfx 16 break case ALPHA MASK INDEX could speed up using binary search if we sorted the indices int i 0 while i alpha Data length if index alpha Data i 0xff break if i alpha Data length continue break case ALPHA MASK RGB int i 0 while i alpha Data length if r alpha Data i 0xff g alpha Data i 1 0xff b alpha Data i 2 0xff break i 3 if i alpha Data length continue break if alpha 0x10000 if alpha 0x0000 continue switch dtype case TYPE GENERIC 8 final int data dest Data dp 0xff rq dest Reds data dest Red Mask dest Red Shift 0xff gq dest Greens data dest Green Mask dest Green Shift 0xff bq dest Blues data dest Blue Mask dest Blue Shift 0xff aq dest Alphas data dest Alpha Mask dest Alpha Shift 0xff break case TYPE GENERIC 16 MSB final int data dest Data dp 0xff 8 dest Data dp 1 0xff rq dest Reds data dest Red Mask dest Red Shift 0xff gq dest Greens data dest Green Mask dest Green Shift 0xff bq dest Blues data dest Blue Mask dest Blue Shift 0xff aq dest Alphas data dest Alpha Mask dest Alpha Shift 0xff break case TYPE GENERIC 16 LSB final int data dest Data dp 1 0xff 8 dest Data dp 0xff rq dest Reds data dest Red Mask dest Red Shift 0xff gq dest Greens data dest Green Mask dest Green Shift 0xff bq dest Blues data dest Blue Mask dest Blue Shift 0xff aq dest Alphas data dest Alpha Mask dest Alpha Shift 0xff break case TYPE GENERIC 24 final int data dest Data dp 0xff 8 dest Data dp 1 0xff 8 dest Data dp 2 0xff rq dest Reds data dest Red Mask dest Red Shift 0xff  BLIT_xxx BLIT_xxx srcData srcDepth srcStride srcOrder MSB_FIRST LSB_FIRST srcDepth srcWidth srcHeight srcReds srcGreens srcBlues alphaMode BLIT_ALPHA ALPHA_MODE_xxx alphaData alphaMode alphaStride destData destDepth destStride destOrder MSB_FIRST LSB_FIRST destDepth destWidth destHeight destRedMask destGreenMask destBlueMask srcData srcDepth srcStride srcOrder srcWidth srcHeight srcReds srcGreens srcBlues alphaMode alphaData alphaStride destData destDepth destStride destOrder destWidth destHeight destRedMask destGreenMask destBlueMask destWidth destHeight alphaMode ALPHA_TRANSPARENT destAlphaMask destWidth srcWidth destHeight srcHeight srcDepth TYPE_INDEX_8 srcStride TYPE_INDEX_4 srcStride TYPE_INDEX_2 srcStride srcOrder MSB_FIRST TYPE_INDEX_1_MSB TYPE_INDEX_1_LSB IllegalArgumentException srcStride destDepth TYPE_GENERIC_8 destOrder MSB_FIRST TYPE_GENERIC_16_MSB TYPE_GENERIC_16_LSB TYPE_GENERIC_24 destOrder MSB_FIRST TYPE_GENERIC_32_MSB TYPE_GENERIC_32_LSB IllegalArgumentException destStride destStride destStride BLIT_ALPHA alphaMode ALPHA_MASK_UNPACKED ALPHA_CHANNEL_SEPARATE alphaData alphaMode alphaStride ALPHA_MASK_PACKED alphaData alphaMode alphaStride alphaStride ALPHA_MASK_INDEX ALPHA_MASK_RGB alphaData alphaMode alphaMode alphaMode ALPHA_CHANNEL_SOURCE alphaMode destRedShift getChannelShift destRedMask destRedWidth getChannelWidth destRedMask destRedShift destReds ANY_TO_EIGHT destRedWidth destRedPreShift destRedWidth destGreenShift getChannelShift destGreenMask destGreenWidth getChannelWidth destGreenMask destGreenShift destGreens ANY_TO_EIGHT destGreenWidth destGreenPreShift destGreenWidth destBlueShift getChannelShift destBlueMask destBlueWidth getChannelWidth destBlueMask destBlueShift destBlues ANY_TO_EIGHT destBlueWidth destBluePreShift destBlueWidth destAlphaShift getChannelShift destAlphaMask destAlphaWidth getChannelWidth destAlphaMask destAlphaShift destAlphas ANY_TO_EIGHT destAlphaWidth destAlphaPreShift destAlphaWidth alphaMode destHeight srcStride alphaStride destWidth TYPE_INDEX_8 srcData TYPE_INDEX_4 srcData srcData TYPE_INDEX_2 srcData TYPE_INDEX_1_MSB srcData TYPE_INDEX_1_LSB srcData srcReds srcGreens srcBlues alphaMode ALPHA_CHANNEL_SEPARATE alphaData ALPHA_MASK_UNPACKED alphaData ALPHA_MASK_PACKED alphaData ALPHA_MASK_INDEX alphaData alphaData alphaData ALPHA_MASK_RGB alphaData alphaData alphaData alphaData alphaData TYPE_GENERIC_8 destData destReds destRedMask destRedShift destGreens destGreenMask destGreenShift destBlues destBlueMask destBlueShift destAlphas destAlphaMask destAlphaShift TYPE_GENERIC_16_MSB destData destData destReds destRedMask destRedShift destGreens destGreenMask destGreenShift destBlues destBlueMask destBlueShift destAlphas destAlphaMask destAlphaShift TYPE_GENERIC_16_LSB destData destData destReds destRedMask destRedShift destGreens destGreenMask destGreenShift destBlues destBlueMask destBlueShift destAlphas destAlphaMask destAlphaShift TYPE_GENERIC_24 destData destData destData destReds destRedMask destRedShift
Blits a direct palette image into an index palette image p Note The source and destination masks and palettes must always be fully specified p param op the blitter operation a combination of BLIT xxx flags see BLIT xxx constants param src Data the source byte array containing image data param src Depth the source depth one of 8 16 24 32 param src Stride the source number of bytes per line param src Order the source byte ordering one of MSB FIRST or LSB FIRST ignored if src Depth is not 16 or 32 param srcX the top left x coord of the source blit region param srcY the top left y coord of the source blit region param src Width the width of the source blit region param src Height the height of the source blit region param src Red Mask the source red channel mask param src Green Mask the source green channel mask param src Blue Mask the source blue channel mask param alpha Mode the alpha blending or mask mode may be an integer 0 255 for global alpha ignored if BLIT ALPHA not specified in the blitter operations see ALPHA MODE xxx constants param alpha Data the alpha blending or mask data varies depending on the value of alpha Mode and sometimes ignored param alpha Stride the alpha data number of bytes per line param alphaX the top left x coord of the alpha blit region param alphaY the top left y coord of the alpha blit region param dest Data the destination byte array containing image data param dest Depth the destination depth one of 1 2 4 8 param dest Stride the destination number of bytes per line param dest Order the destination byte ordering one of MSB FIRST or LSB FIRST ignored if dest Depth is not 1 param destX the top left x coord of the destination blit region param destY the top left y coord of the destination blit region param dest Width the width of the destination blit region param dest Height the height of the destination blit region param dest Reds the destination palette red component intensities param dest Greens the destination palette green component intensities param dest Blues the destination palette blue component intensities param flipX if true the resulting image is flipped along the vertical axis param flipY if true the resulting image is flipped along the horizontal axis static void blit int op byte src Data int src Depth int src Stride int src Order int srcX int srcY int src Width int src Height int src Red Mask int src Green Mask int src Blue Mask int alpha Mode byte alpha Data int alpha Stride int alphaX int alphaY byte dest Data int dest Depth int dest Stride int dest Order int destX int destY int dest Width int dest Height byte dest Reds byte dest Greens byte dest Blues boolean flipX boolean flipY if dest Width 0 dest Height 0 alpha Mode ALPHA TRANSPARENT return these should be supplied as params later final int src Alpha Mask 0 Prepare scaling data final int dwm1 dest Width 1 final int sfxi dwm1 0 int long src Width 16 1 dwm1 0 final int dhm1 dest Height 1 final int sfyi dhm1 0 int long src Height 16 1 dhm1 0 Prepare source related data final int sbpp stype switch src Depth case 8 sbpp 1 stype TYPE GENERIC 8 break case 16 sbpp 2 stype src Order MSB FIRST TYPE GENERIC 16 MSB TYPE GENERIC 16 LSB break case 24 sbpp 3 stype TYPE GENERIC 24 break case 32 sbpp 4 stype src Order MSB FIRST TYPE GENERIC 32 MSB TYPE GENERIC 32 LSB break default throw new Illegal Argument Exception Invalid source type return int spr srcY src Stride srcX sbpp Prepare destination related data final int dtype switch dest Depth case 8 dtype TYPE INDEX 8 break case 4 dest Stride 1 dtype TYPE INDEX 4 break case 2 dest Stride 2 dtype TYPE INDEX 2 break case 1 dest Stride 3 dtype dest Order MSB FIRST TYPE INDEX 1 MSB TYPE INDEX 1 LSB break default throw new Illegal Argument Exception Invalid source type return int dpr flipY destY dhm1 destY dest Stride flipX destX dwm1 destX final int dprxi flipX 1 1 final int dpryi flipY dest Stride dest Stride Prepare special processing data int apr if op BLIT ALPHA 0 switch alpha Mode case ALPHA MASK UNPACKED case ALPHA CHANNEL SEPARATE if alpha Data null alpha Mode 0x10000 apr alphaY alpha Stride alphaX break case ALPHA MASK PACKED if alpha Data null alpha Mode 0x10000 alpha Stride 3 apr alphaY alpha Stride alphaX break case ALPHA MASK INDEX throw new Illegal Argument Exception Invalid alpha type return case ALPHA MASK RGB if alpha Data null alpha Mode 0x10000 apr 0 break default alpha Mode alpha Mode 16 255 prescale case ALPHA CHANNEL SOURCE apr 0 break else alpha Mode 0x10000 apr 0 final boolean dither Enabled op BLIT DITHER 0 Comprehensive blit apply transformations final int src Red Shift get Channel Shift src Red Mask final byte src Reds ANY TO EIGHT get Channel Width src Red Mask src Red Shift final int src Green Shift get Channel Shift src Green Mask final byte src Greens ANY TO EIGHT get Channel Width src Green Mask src Green Shift final int src Blue Shift get Channel Shift src Blue Mask final byte src Blues ANY TO EIGHT get Channel Width src Blue Mask src Blue Shift final int src Alpha Shift get Channel Shift src Alpha Mask final byte src Alphas ANY TO EIGHT get Channel Width src Alpha Mask src Alpha Shift int dp dpr int sp spr int ap apr alpha alpha Mode int r 0 g 0 b 0 a 0 int indexq 0 int lastindex 0 lastr 1 lastg 1 lastb 1 final int rerr gerr berr int dest Palette Size 1 dest Depth if dest Reds null dest Reds length dest Palette Size dest Palette Size dest Reds length if dither Enabled rerr new int dest Width 2 gerr new int dest Width 2 berr new int dest Width 2 else rerr null gerr null berr null for int dy dest Height sfy sfyi dy 0 dy sp spr sfy 16 src Stride ap apr sfy 16 alpha Stride sfy sfy 0xffff sfyi dp dpr dpryi int lrerr 0 lgerr 0 lberr 0 for int dx dest Width sfx sfxi dx 0 dx dp dprxi sfx sfx 0xffff sfxi READ NEXT PIXEL switch stype case TYPE GENERIC 8 final int data src Data sp 0xff sp sfx 16 r src Reds data src Red Mask src Red Shift 0xff g src Greens data src Green Mask src Green Shift 0xff b src Blues data src Blue Mask src Blue Shift 0xff a src Alphas data src Alpha Mask src Alpha Shift 0xff break case TYPE GENERIC 16 MSB final int data src Data sp 0xff 8 src Data sp 1 0xff sp sfx 16 2 r src Reds data src Red Mask src Red Shift 0xff g src Greens data src Green Mask src Green Shift 0xff b src Blues data src Blue Mask src Blue Shift 0xff a src Alphas data src Alpha Mask src Alpha Shift 0xff break case TYPE GENERIC 16 LSB final int data src Data sp 1 0xff 8 src Data sp 0xff sp sfx 16 2 r src Reds data src Red Mask src Red Shift 0xff g src Greens data src Green Mask src Green Shift 0xff b src Blues data src Blue Mask src Blue Shift 0xff a src Alphas data src Alpha Mask src Alpha Shift 0xff break case TYPE GENERIC 24 final int data src Data sp 0xff 8 src Data sp 1 0xff 8 src Data sp 2 0xff sp sfx 16 3 r src Reds data src Red Mask src Red Shift 0xff g src Greens data src Green Mask src Green Shift 0xff b src Blues data src Blue Mask src Blue Shift 0xff a src Alphas data src Alpha Mask src Alpha Shift 0xff break case TYPE GENERIC 32 MSB final int data src Data sp 0xff 8 src Data sp 1 0xff 8 src Data sp 2 0xff 8 src Data sp 3 0xff sp sfx 16 4 r src Reds data src Red Mask src Red Shift 0xff g src Greens data src Green Mask src Green Shift 0xff b src Blues data src Blue Mask src Blue Shift 0xff a src Alphas data src Alpha Mask src Alpha Shift 0xff break case TYPE GENERIC 32 LSB final int data src Data sp 3 0xff 8 src Data sp 2 0xff 8 src Data sp 1 0xff 8 src Data sp 0xff sp sfx 16 4 r src Reds data src Red Mask src Red Shift 0xff g src Greens data src Green Mask src Green Shift 0xff b src Blues data src Blue Mask src Blue Shift 0xff a src Alphas data src Alpha Mask src Alpha Shift 0xff break DO SPECIAL PROCESSING IF REQUIRED switch alpha Mode case ALPHA CHANNEL SEPARATE alpha alpha Data ap 0xff 16 255 ap sfx 16 break case ALPHA CHANNEL SOURCE alpha a 16 255 break case ALPHA MASK UNPACKED alpha alpha Data ap 0 0x10000 0 ap sfx 16 break case BLIT_xxx BLIT_xxx srcData srcDepth srcStride srcOrder MSB_FIRST LSB_FIRST srcDepth srcWidth srcHeight srcRedMask srcGreenMask srcBlueMask alphaMode BLIT_ALPHA ALPHA_MODE_xxx alphaData alphaMode alphaStride destData destDepth destStride destOrder MSB_FIRST LSB_FIRST destDepth destWidth destHeight destReds destGreens destBlues srcData srcDepth srcStride srcOrder srcWidth srcHeight srcRedMask srcGreenMask srcBlueMask alphaMode alphaData alphaStride destData destDepth destStride destOrder destWidth destHeight destReds destGreens destBlues destWidth destHeight alphaMode ALPHA_TRANSPARENT srcAlphaMask destWidth srcWidth destHeight srcHeight srcDepth TYPE_GENERIC_8 srcOrder MSB_FIRST TYPE_GENERIC_16_MSB TYPE_GENERIC_16_LSB TYPE_GENERIC_24 srcOrder MSB_FIRST TYPE_GENERIC_32_MSB TYPE_GENERIC_32_LSB IllegalArgumentException srcStride destDepth TYPE_INDEX_8 destStride TYPE_INDEX_4 destStride TYPE_INDEX_2 destStride destOrder MSB_FIRST TYPE_INDEX_1_MSB TYPE_INDEX_1_LSB IllegalArgumentException destStride destStride destStride BLIT_ALPHA alphaMode ALPHA_MASK_UNPACKED ALPHA_CHANNEL_SEPARATE alphaData alphaMode alphaStride ALPHA_MASK_PACKED alphaData alphaMode alphaStride alphaStride ALPHA_MASK_INDEX IllegalArgumentException ALPHA_MASK_RGB alphaData alphaMode alphaMode alphaMode ALPHA_CHANNEL_SOURCE alphaMode ditherEnabled BLIT_DITHER srcRedShift getChannelShift srcRedMask srcReds ANY_TO_EIGHT getChannelWidth srcRedMask srcRedShift srcGreenShift getChannelShift srcGreenMask srcGreens ANY_TO_EIGHT getChannelWidth srcGreenMask srcGreenShift srcBlueShift getChannelShift srcBlueMask srcBlues ANY_TO_EIGHT getChannelWidth srcBlueMask srcBlueShift srcAlphaShift getChannelShift srcAlphaMask srcAlphas ANY_TO_EIGHT getChannelWidth srcAlphaMask srcAlphaShift alphaMode destPaletteSize destDepth destReds destReds destPaletteSize destPaletteSize destReds ditherEnabled destWidth destWidth destWidth destHeight srcStride alphaStride destWidth TYPE_GENERIC_8 srcData srcReds srcRedMask srcRedShift srcGreens srcGreenMask srcGreenShift srcBlues srcBlueMask srcBlueShift srcAlphas srcAlphaMask srcAlphaShift TYPE_GENERIC_16_MSB srcData srcData srcReds srcRedMask srcRedShift srcGreens srcGreenMask srcGreenShift srcBlues srcBlueMask srcBlueShift srcAlphas srcAlphaMask srcAlphaShift TYPE_GENERIC_16_LSB srcData srcData srcReds srcRedMask srcRedShift srcGreens srcGreenMask srcGreenShift srcBlues srcBlueMask srcBlueShift srcAlphas srcAlphaMask srcAlphaShift TYPE_GENERIC_24 srcData srcData srcData srcReds srcRedMask srcRedShift srcGreens srcGreenMask srcGreenShift srcBlues srcBlueMask srcBlueShift srcAlphas srcAlphaMask srcAlphaShift TYPE_GENERIC_32_MSB srcData srcData srcData srcData srcReds srcRedMask srcRedShift srcGreens srcGreenMask srcGreenShift srcBlues srcBlueMask srcBlueShift srcAlphas srcAlphaMask srcAlphaShift TYPE_GENERIC_32_LSB srcData srcData srcData srcData srcReds srcRedMask srcRedShift srcGreens srcGreenMask srcGreenShift srcBlues srcBlueMask srcBlueShift srcAlphas srcAlphaMask srcAlphaShift alphaMode ALPHA_CHANNEL_SEPARATE alphaData ALPHA_CHANNEL_SOURCE ALPHA_MASK_UNPACKED alphaData
Computes the required channel shift from a mask static int get Channel Shift int mask if mask 0 return 0 int i for i 0 mask 1 0 i 32 i mask 1 return i  getChannelShift
Computes the required channel width depth from a mask static int get Channel Width int mask int shift if mask 0 return 0 int i mask shift for i shift mask 1 0 i 32 i mask 1 return i shift  getChannelWidth
Extracts a field from packed RGB data given a mask for that field static byte get Channel Field int data int mask final int shift get Channel Shift mask return ANY TO EIGHT get Channel Width mask shift data mask shift  getChannelField getChannelShift ANY_TO_EIGHT getChannelWidth
Creates an Image Data containing one band s worth of a gradient filled block If code vertical code is true the band must be tiled horizontally to fill a region otherwise it must be tiled vertically param width the width of the region to be filled param height the height of the region to be filled param vertical if true sweeps from top to bottom else sweeps from left to right param fromRGB the color to start with param toRGB the color to end with param red Bits the number of significant red bits 0 for palette modes param green Bits the number of significant green bits 0 for palette modes param blue Bits the number of significant blue bits 0 for palette modes return the new Image Data static Image Data create Gradient Band int width int height boolean vertical RGB fromRGB RGB toRGB int red Bits int green Bits int blue Bits Gradients are drawn as tiled bands final int band Width band Height bitmap Depth final byte bitmap Data final Palette Data palette Data Select an algorithm depending on the depth of the screen if red Bits 0 green Bits 0 blue Bits 0 palette Data new Palette Data 0x0000ff00 0x00ff0000 0xff000000 bitmap Depth 32 if red Bits 8 green Bits 8 blue Bits 8 Precise color final int steps if vertical band Width 1 band Height height steps band Height 1 band Height 1 1 else band Width width band Height 1 steps band Width 1 band Width 1 1 final int bytes Per Line band Width 4 bitmap Data new byte band Height bytes Per Line build Precise Gradient Channel fromRGB blue toRGB blue steps band Width band Height vertical bitmap Data 0 bytes Per Line build Precise Gradient Channel fromRGB green toRGB green steps band Width band Height vertical bitmap Data 1 bytes Per Line build Precise Gradient Channel fromRGB red toRGB red steps band Width band Height vertical bitmap Data 2 bytes Per Line else Dithered color final int steps if vertical band Width width 8 width 8 band Height height steps band Height 1 band Height 1 1 else band Width width band Height height 8 height 8 steps band Width 1 band Width 1 1 final int bytes Per Line band Width 4 bitmap Data new byte band Height bytes Per Line build Dithered Gradient Channel fromRGB blue toRGB blue steps band Width band Height vertical bitmap Data 0 bytes Per Line blue Bits build Dithered Gradient Channel fromRGB green toRGB green steps band Width band Height vertical bitmap Data 1 bytes Per Line green Bits build Dithered Gradient Channel fromRGB red toRGB red steps band Width band Height vertical bitmap Data 2 bytes Per Line red Bits else Dithered two tone palette Data new Palette Data new RGB fromRGB toRGB bitmap Depth 8 final int blendi if vertical band Width width 8 width 8 band Height height blendi band Height 1 0x1040000 band Height 1 1 1 else band Width width band Height height 8 height 8 blendi band Width 1 0x1040000 band Width 1 1 1 final int bytes Per Line band Width 3 4 bitmap Data new byte band Height bytes Per Line if vertical for int dy 0 blend 0 dp 0 dy band Height dy blend blendi dp bytes Per Line for int dx 0 dx band Width dx bitmap Data dp dx blend DITHER MATRIX dy 7 dx 0x1000000 byte 0 byte 1 else for int dx 0 blend 0 dx band Width dx blend blendi for int dy 0 dptr dx dy band Height dy dptr bytes Per Line bitmap Data dptr blend DITHER MATRIX dy dx 7 0x1000000 byte 0 byte 1 return new Image Data band Width band Height bitmap Depth palette Data 4 bitmap Data  ImageData redBits greenBits blueBits ImageData ImageData createGradientBand redBits greenBits blueBits bandWidth bandHeight bitmapDepth bitmapData PaletteData paletteData redBits greenBits blueBits paletteData PaletteData bitmapDepth redBits greenBits blueBits bandWidth bandHeight bandHeight bandHeight bandWidth bandHeight bandWidth bandWidth bytesPerLine bandWidth bitmapData bandHeight bytesPerLine buildPreciseGradientChannel bandWidth bandHeight bitmapData bytesPerLine buildPreciseGradientChannel bandWidth bandHeight bitmapData bytesPerLine buildPreciseGradientChannel bandWidth bandHeight bitmapData bytesPerLine bandWidth bandHeight bandHeight bandHeight bandWidth bandHeight bandWidth bandWidth bytesPerLine bandWidth bitmapData bandHeight bytesPerLine buildDitheredGradientChannel bandWidth bandHeight bitmapData bytesPerLine blueBits buildDitheredGradientChannel bandWidth bandHeight bitmapData bytesPerLine greenBits buildDitheredGradientChannel bandWidth bandHeight bitmapData bytesPerLine redBits paletteData PaletteData bitmapDepth bandWidth bandHeight bandHeight bandHeight bandWidth bandHeight bandWidth bandWidth bytesPerLine bandWidth bitmapData bandHeight bytesPerLine bandHeight bytesPerLine bandWidth bitmapData DITHER_MATRIX bandWidth bandHeight bytesPerLine bitmapData DITHER_MATRIX ImageData bandWidth bandHeight bitmapDepth paletteData bitmapData
static final void build Precise Gradient Channel int from int to int steps int band Width int band Height boolean vertical byte bitmap Data int dp int bytes Per Line int val from 16 final int inc to 16 val steps 1 if vertical for int dy 0 dy band Height dy dp bytes Per Line bitmap Data dp byte val 16 val inc else for int dx 0 dx band Width dx dp 4 bitmap Data dp byte val 16 val inc  buildPreciseGradientChannel bandWidth bandHeight bitmapData bytesPerLine bandHeight bytesPerLine bitmapData bandWidth bitmapData
static final void build Dithered Gradient Channel int from int to int steps int band Width int band Height boolean vertical byte bitmap Data int dp int bytes Per Line int bits final int mask 0xff00 bits int val from 16 final int inc to 16 val steps 1 if vertical for int dy 0 dy band Height dy dp bytes Per Line for int dx 0 dptr dp dx band Width dx dptr 4 final int thresh DITHER MATRIX dy 7 dx bits int temp val thresh if temp 0xffffff bitmap Data dptr 1 else bitmap Data dptr byte temp 16 mask val inc else for int dx 0 dx band Width dx dp 4 for int dy 0 dptr dp dy band Height dy dptr bytes Per Line final int thresh DITHER MATRIX dy dx 7 bits int temp val thresh if temp 0xffffff bitmap Data dptr 1 else bitmap Data dptr byte temp 16 mask val inc  buildDitheredGradientChannel bandWidth bandHeight bitmapData bytesPerLine bandHeight bytesPerLine bandWidth DITHER_MATRIX bitmapData bitmapData bandWidth bandHeight bytesPerLine DITHER_MATRIX bitmapData bitmapData
Renders a gradient onto a GC p This is a GC helper p param gc the GC to render the gradient onto param device the device the GC belongs to param x the top left x coordinate of the region to be filled param y the top left y coordinate of the region to be filled param width the width of the region to be filled param height the height of the region to be filled param vertical if true sweeps from top to bottom else sweeps from left to right param fromRGB the color to start with param toRGB the color to end with param red Bits the number of significant red bits 0 for palette modes param green Bits the number of significant green bits 0 for palette modes param blue Bits the number of significant blue bits 0 for palette modes static void fill Gradient Rectangle GC gc Device device int x int y int width int height boolean vertical RGB fromRGB RGB toRGB int red Bits int green Bits int blue Bits Create the bitmap and tile it Image Data band create Gradient Band width height vertical fromRGB toRGB red Bits green Bits blue Bits Image image new Image device band if band width 1 band height 1 gc draw Image image 0 0 band width band height x y width height else if vertical for int dx 0 dx width dx band width int blit Width width dx if blit Width band width blit Width band width gc draw Image image 0 0 blit Width band height dx x y blit Width band height else for int dy 0 dy height dy band height int blit Height height dy if blit Height band height blit Height band height gc draw Image image 0 0 band width blit Height x dy y band width blit Height image dispose  redBits greenBits blueBits fillGradientRectangle redBits greenBits blueBits ImageData createGradientBand redBits greenBits blueBits drawImage blitWidth blitWidth blitWidth drawImage blitWidth blitWidth blitHeight blitHeight blitHeight drawImage blitHeight blitHeight

Construct a new empty Image Loader public Image Loader reset  ImageLoader ImageLoader
Resets the fields of the Image Loader except for the code image Loader Listeners code field void reset data null logical Screen Width 0 logical Screen Height 0 background Pixel 1 repeat Count 1  ImageLoader imageLoaderListeners logicalScreenWidth logicalScreenHeight backgroundPixel repeatCount
Loads an array of code Image Data code objects from the specified input stream Throws an error if either an error occurs while loading the images or if the images are not of a supported type Returns the loaded image data array param stream the input stream to load the images from return an array of code Image Data code objects loaded from the specified input stream exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the stream is null li ul exception SWT Exception ul li ERROR INVALID IMAGE if the image file contains invalid data li li ERROR IO if an input output error occurs while reading data li ul public Image Data load Input Stream stream if stream null SWT error SWT ERROR NULL ARGUMENT reset data File Format load stream this return data  ImageData ImageData IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_INVALID_IMAGE ERROR_IO ImageData InputStream ERROR_NULL_ARGUMENT FileFormat
Loads an array of code Image Data code objects from the file with the specified name Throws an error if either an error occurs while loading the images or if the images are not of a supported type Returns the loaded image data array param filename the name of the file to load the images from return an array of code Image Data code objects loaded from the specified file exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the file name is null li ul exception SWT Exception ul li ERROR INVALID IMAGE if the image file contains invalid data li li ERROR IO if an IO error occurs while reading data li ul public Image Data load String filename if filename null SWT error SWT ERROR NULL ARGUMENT Input Stream stream null try stream Compatibility new File Input Stream filename return load stream catch IO Exception e SWT error SWT ERROR IO e finally try if stream null stream close catch IO Exception e Ignore error return null  ImageData ImageData IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_INVALID_IMAGE ERROR_IO ImageData ERROR_NULL_ARGUMENT InputStream newFileInputStream IOException ERROR_IO IOException
Saves the image data in this Image Loader to the specified stream The format parameter can have one of the following values dl dt code IMAGE BMP code dt dd Windows BMP file format no compression dd dt code IMAGE BMP RLE code dt dd Windows BMP file format RLE compression if appropriate dd dt code IMAGE GIF code dt dd GIF file format dd dt code IMAGE ICO code dt dd Windows ICO file format dd dt code IMAGE JPEG code dt dd JPEG file format dd dt code IMAGE PNG code dt dd PNG file format dd dl param stream the output stream to write the images to param format the format to write the images in exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the stream is null li ul exception SWT Exception ul li ERROR INVALID IMAGE if the image data contains invalid data li li ERROR IO if an IO error occurs while writing to the stream li ul public void save Output Stream stream int format if stream null SWT error SWT ERROR NULL ARGUMENT File Format save stream format this  ImageLoader IMAGE_BMP IMAGE_BMP_RLE IMAGE_GIF IMAGE_ICO IMAGE_JPEG IMAGE_PNG IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_INVALID_IMAGE ERROR_IO OutputStream ERROR_NULL_ARGUMENT FileFormat
Saves the image data in this Image Loader to a file with the specified name The format parameter can have one of the following values dl dt code IMAGE BMP code dt dd Windows BMP file format no compression dd dt code IMAGE BMP RLE code dt dd Windows BMP file format RLE compression if appropriate dd dt code IMAGE GIF code dt dd GIF file format dd dt code IMAGE ICO code dt dd Windows ICO file format dd dt code IMAGE JPEG code dt dd JPEG file format dd dt code IMAGE PNG code dt dd PNG file format dd dl param filename the name of the file to write the images to param format the format to write the images in exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the file name is null li ul exception SWT Exception ul li ERROR INVALID IMAGE if the image data contains invalid data li li ERROR IO if an IO error occurs while writing to the file li ul public void save String filename int format if filename null SWT error SWT ERROR NULL ARGUMENT Output Stream stream null try stream Compatibility new File Output Stream filename catch IO Exception e SWT error SWT ERROR IO e save stream format  ImageLoader IMAGE_BMP IMAGE_BMP_RLE IMAGE_GIF IMAGE_ICO IMAGE_JPEG IMAGE_PNG IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_INVALID_IMAGE ERROR_IO ERROR_NULL_ARGUMENT OutputStream newFileOutputStream IOException ERROR_IO
Adds a listener to receive image loader events p An Image Loader Listener should be added before invoking one of the receiver s load methods The listener s code image Data Loaded code method is called when image data has been partially loaded as is supported by interlaced GIF PNG or progressive JPEG images param listener the Image Loader Listener to add exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul see Image Loader Listener see Image Loader Event public void add Image Loader Listener Image Loader Listener listener if listener null SWT error SWT ERROR NULL ARGUMENT if image Loader Listeners null image Loader Listeners new Vector image Loader Listeners add Element listener  ImageLoaderListener imageDataLoaded ImageLoaderListener IllegalArgumentException ERROR_NULL_ARGUMENT ImageLoaderListener ImageLoaderEvent addImageLoaderListener ImageLoaderListener ERROR_NULL_ARGUMENT imageLoaderListeners imageLoaderListeners imageLoaderListeners addElement
Removes a listener that was receiving image loader events param listener the Image Loader Listener to remove exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul see add Image Loader Listener Image Loader Listener public void remove Image Loader Listener Image Loader Listener listener if listener null SWT error SWT ERROR NULL ARGUMENT if image Loader Listeners null return image Loader Listeners remove Element listener  ImageLoaderListener IllegalArgumentException ERROR_NULL_ARGUMENT addImageLoaderListener ImageLoaderListener removeImageLoaderListener ImageLoaderListener ERROR_NULL_ARGUMENT imageLoaderListeners imageLoaderListeners removeElement
Returns code true code if the receiver has image loader listeners and code false code otherwise return code true code if there are code Image Loader Listener code s and code false code otherwise see add Image Loader Listener Image Loader Listener see remove Image Loader Listener Image Loader Listener public boolean has Listeners return image Loader Listeners null image Loader Listeners size 0  ImageLoaderListener addImageLoaderListener ImageLoaderListener removeImageLoaderListener ImageLoaderListener hasListeners imageLoaderListeners imageLoaderListeners
Notifies all image loader listeners that an image loader event has occurred Pass the specified event object to each listener param event the code Image Loader Event code to send to each code Image Loader Listener code public void notify Listeners Image Loader Event event if has Listeners return int size image Loader Listeners size for int i 0 i size i Image Loader Listener listener Image Loader Listener image Loader Listeners element At i listener image Data Loaded event  ImageLoaderEvent ImageLoaderListener notifyListeners ImageLoaderEvent hasListeners imageLoaderListeners ImageLoaderListener ImageLoaderListener imageLoaderListeners elementAt imageDataLoaded

Constructs a new instance of this class given the event source and the values to store in its fields param source the Image Loader that was loading when the event occurred param image Data the image data for the event param increment Count the image data increment for the event param end Of Image the end of image flag for the event public Image Loader Event Image Loader source Image Data image Data int increment Count boolean end Of Image super source this image Data image Data this increment Count increment Count this end Of Image end Of Image  ImageLoader imageData incrementCount endOfImage ImageLoaderEvent ImageLoader ImageData imageData incrementCount endOfImage imageData imageData incrementCount incrementCount endOfImage endOfImage
Returns a string containing a concise human readable description of the receiver return a string representation of the event public String to String return Image Loader Event source source image Data image Data increment Count increment Count end Of Image end Of Image NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5  toString ImageLoaderEvent imageData imageData incrementCount incrementCount endOfImage endOfImage

Sent when image data is either partially or completely loaded p The timing of when this method is called varies depending on the format of the image being loaded p param e an event containing information about the image loading operation 

Constructs a new indexed palette given an array of RGB values param colors the array of code RGB code s for the palette exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li ul public Palette Data RGB colors if colors null SWT error SWT ERROR NULL ARGUMENT this colors colors this is Direct false  IllegalArgumentException ERROR_NULL_ARGUMENT PaletteData ERROR_NULL_ARGUMENT isDirect
Constructs a new direct palette given the red green and blue masks param red Mask the red mask param green Mask the green mask param blue Mask the blue mask public Palette Data int red Mask int green Mask int blue Mask this red Mask red Mask this green Mask green Mask this blue Mask blue Mask this is Direct true this red Shift shift For Mask red Mask this green Shift shift For Mask green Mask this blue Shift shift For Mask blue Mask  redMask greenMask blueMask PaletteData redMask greenMask blueMask redMask redMask greenMask greenMask blueMask blueMask isDirect redShift shiftForMask redMask greenShift shiftForMask greenMask blueShift shiftForMask blueMask
Returns the pixel value corresponding to the given code RBG code param rgb the RGB to get the pixel value for return the pixel value for the given RGB exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li li ERROR INVALID ARGUMENT if the RGB is not found in the palette li ul public int get Pixel RGB rgb if rgb null SWT error SWT ERROR NULL ARGUMENT if is Direct int pixel 0 pixel red Shift 0 rgb red red Shift rgb red red Shift red Mask pixel green Shift 0 rgb green green Shift rgb green green Shift green Mask pixel blue Shift 0 rgb blue blue Shift rgb blue blue Shift blue Mask return pixel else for int i 0 i colors length i if colors i equals rgb return i The RGB did not exist in the palette SWT error SWT ERROR INVALID ARGUMENT return 0  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT getPixel ERROR_NULL_ARGUMENT isDirect redShift redShift redShift redMask greenShift greenShift greenShift greenMask blueShift blueShift blueShift blueMask ERROR_INVALID_ARGUMENT
Returns an code RGB code corresponding to the given pixel value param pixel the pixel to get the RGB value for return the RGB value for the given pixel exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li li ERROR INVALID ARGUMENT if the pixel does not exist in the palette li ul public RGB getRGB int pixel if is Direct int r pixel red Mask r red Shift 0 r red Shift r red Shift int g pixel green Mask g green Shift 0 g green Shift g green Shift int b pixel blue Mask b blue Shift 0 b blue Shift b blue Shift return new RGB r g b else if pixel 0 pixel colors length SWT error SWT ERROR INVALID ARGUMENT return colors pixel  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT isDirect redMask redShift redShift redShift greenMask greenShift greenShift greenShift blueMask blueShift blueShift blueShift ERROR_INVALID_ARGUMENT
Returns all the RGB values in the receiver if it is an indexed palette or null if it is a direct palette return the code RGB code s for the receiver or null public RGB getRG Bs return colors  getRGBs
Computes the shift value for a given mask param mask the mask to compute the shift for return the shift amount see Palette Data int shift For Mask int mask for int i 31 i 0 i if mask i 0x1 0 return 7 i return 32  PaletteData shiftForMask

Constructs a new point with the given x and y coordinates param x the x coordinate of the new point param y the y coordinate of the new point public Point int x int y this x x this y y 
Compares the argument to the receiver and returns true if they represent the em same em object using a class specific comparison param object the object to compare with this object return code true code if the object is the same as this object and code false code otherwise see hash Code public boolean equals Object object if object this return true if object instanceof Point return false Point p Point object return p x this x p y this y  hashCode
Returns an integer hash code for the receiver Any two objects which return code true code when passed to code equals code must return the same value for this method return the receiver s hash see equals Object public int hash Code return x y  hashCode
Returns a string containing a concise human readable description of the receiver return a string representation of the point public String to String return Point x y NON NLS 1 NON NLS 2 NON NLS 3  toString

Construct a new instance of this class given the x y width and height values param x the x coordinate of the origin of the rectangle param y the y coordinate of the origin of the rectangle param width the width of the rectangle param height the height of the rectangle public Rectangle int x int y int width int height this x x this y y this width width this height height 
Destructively replaces the x y width and height values in the receiver with ones which represent the union of the rectangles specified by the receiver and the given rectangle p The union of two rectangles is the smallest single rectangle that completely covers both of the areas covered by the two given rectangles p param rect the rectangle to merge with the receiver exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li ul public void add Rectangle rect if rect null SWT error SWT ERROR NULL ARGUMENT int left x rect x x rect x int top y rect y y rect y int lhs x width int rhs rect x rect width int right lhs rhs lhs rhs lhs y height rhs rect y rect height int bottom lhs rhs lhs rhs x left y top width right left height bottom top  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT
Returns code true code if the point specified by the arguments is inside the area specified by the receiver and code false code otherwise param x the x coordinate of the point to test for containment param y the y coordinate of the point to test for containment return code true code if the rectangle contains the point and code false code otherwise public boolean contains int x int y return x this x y this y x this x width y this y height 
Returns code true code if the given point is inside the area specified by the receiver and code false code otherwise param pt the point to test for containment return code true code if the rectangle contains the point and code false code otherwise exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li ul public boolean contains Point pt if pt null SWT error SWT ERROR NULL ARGUMENT return contains pt x pt y  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT
Compares the argument to the receiver and returns true if they represent the em same em object using a class specific comparison param object the object to compare with this object return code true code if the object is the same as this object and code false code otherwise see hash Code public boolean equals Object object if object this return true if object instanceof Rectangle return false Rectangle r Rectangle object return r x this x r y this y r width this width r height this height  hashCode
Returns an integer hash code for the receiver Any two objects which return code true code when passed to code equals code must return the same value for this method return the receiver s hash see equals Object public int hash Code return x y width height  hashCode
Destructively replaces the x y width and height values in the receiver with ones which represent the intersection of the rectangles specified by the receiver and the given rectangle param rect the rectangle to intersect with the receiver exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li ul since 3 0 public void intersect Rectangle rect if rect null SWT error SWT ERROR NULL ARGUMENT if this rect return int left x rect x x rect x int top y rect y y rect y int lhs x width int rhs rect x rect width int right lhs rhs lhs rhs lhs y height rhs rect y rect height int bottom lhs rhs lhs rhs x right left 0 left y bottom top 0 top width right left 0 right left height bottom top 0 bottom top  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT
Returns a new rectangle which represents the intersection of the receiver and the given rectangle p The intersection of two rectangles is the rectangle that covers the area which is contained within both rectangles p param rect the rectangle to intersect with the receiver return the intersection of the receiver and the argument exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li ul public Rectangle intersection Rectangle rect if rect null SWT error SWT ERROR NULL ARGUMENT if this rect return new Rectangle x y width height int left x rect x x rect x int top y rect y y rect y int lhs x width int rhs rect x rect width int right lhs rhs lhs rhs lhs y height rhs rect y rect height int bottom lhs rhs lhs rhs return new Rectangle right left 0 left bottom top 0 top right left 0 right left bottom top 0 bottom top  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT
Returns code true code if the rectangle described by the arguments intersects with the receiver and code false code otherwise p Two rectangles intersect if the area of the rectangle representing their intersection is not empty p param x the x coordinate of the origin of the rectangle param y the y coordinate of the origin of the rectangle param width the width of the rectangle param height the height of the rectangle return code true code if the rectangle intersects with the receiver and code false code otherwise exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li ul see intersection Rectangle see is Empty since 3 0 public boolean intersects int x int y int width int height return x this x this width y this y this height x width this x y height this y  IllegalArgumentException ERROR_NULL_ARGUMENT isEmpty
Returns code true code if the given rectangle intersects with the receiver and code false code otherwise p Two rectangles intersect if the area of the rectangle representing their intersection is not empty p param rect the rectangle to test for intersection return code true code if the rectangle intersects with the receiver and code false code otherwise exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li ul see intersection Rectangle see is Empty public boolean intersects Rectangle rect if rect null SWT error SWT ERROR NULL ARGUMENT return rect this intersects rect x rect y rect width rect height  IllegalArgumentException ERROR_NULL_ARGUMENT isEmpty ERROR_NULL_ARGUMENT
Returns code true code if the receiver does not cover any area in the x y coordinate plane and code false code if the receiver does cover some area in the plane p A rectangle is considered to em cover area em in the x y coordinate plane if both its width and height are non zero p return code true code if the receiver is empty and code false code otherwise public boolean is Empty return width 0 height 0  isEmpty
Returns a string containing a concise human readable description of the receiver return a string representation of the rectangle public String to String return Rectangle x y width height NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5  toString
Returns a new rectangle which represents the union of the receiver and the given rectangle p The union of two rectangles is the smallest single rectangle that completely covers both of the areas covered by the two given rectangles p param rect the rectangle to perform union with return the union of the receiver and the argument exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the argument is null li ul see add Rectangle public Rectangle union Rectangle rect if rect null SWT error SWT ERROR NULL ARGUMENT int left x rect x x rect x int top y rect y y rect y int lhs x width int rhs rect x rect width int right lhs rhs lhs rhs lhs y height rhs rect y rect height int bottom lhs rhs lhs rhs return new Rectangle left top right left bottom top  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT

Constructs an instance of this class with the given red green and blue values param red the red component of the new instance param green the green component of the new instance param blue the blue component of the new instance exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the red green or blue argument is not between 0 and 255 li ul public RGB int red int green int blue if red 255 red 0 green 255 green 0 blue 255 blue 0 SWT error SWT ERROR INVALID ARGUMENT this red red this green green this blue blue  IllegalArgumentException ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT
Compares the argument to the receiver and returns true if they represent the em same em object using a class specific comparison param object the object to compare with this object return code true code if the object is the same as this object and code false code otherwise see hash Code public boolean equals Object object if object this return true if object instanceof RGB return false RGB rgb RGB object return rgb red this red rgb green this green rgb blue this blue  hashCode
Returns an integer hash code for the receiver Any two objects which return code true code when passed to code equals code must return the same value for this method return the receiver s hash see equals Object public int hash Code return blue 16 green 8 red  hashCode
Returns a string containing a concise human readable description of the receiver return a string representation of the code RGB code public String to String return RGB red green blue NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4  toString

Create a new text style with the specified font foreground and background param font the font of the style code null code if none param foreground the foreground color of the style code null code if none param background the background color of the style code null code if none public Text Style Font font Color foreground Color background if font null font is Disposed SWT error SWT ERROR INVALID ARGUMENT if foreground null foreground is Disposed SWT error SWT ERROR INVALID ARGUMENT if background null background is Disposed SWT error SWT ERROR INVALID ARGUMENT this font font this foreground foreground this background background  TextStyle isDisposed ERROR_INVALID_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT
public boolean equals Object object if object this return true if object null return false if object instanceof Text Style return false Text Style style Text Style object if this foreground null if this foreground equals style foreground return false else if style foreground null return false if this background null if this background equals style background return false else if style background null return false if this font null if this font equals style font return false else if style font null return false return true  TextStyle TextStyle TextStyle
public int hash Code int hash super hash Code if font null hash font hash Code if foreground null hash foreground hash Code if background null hash background hash Code return hash  hashCode hashCode hashCode hashCode hashCode

Constructs a new instance of this class given an object to send the message to a string naming the method to invoke and an argument count Note that if the object is an instance of code Class code it is assumed that the method is a static method on that class param object the object to send the message to param method the name of the method to invoke param arg Count the number of arguments that the method takes public Callback Object object String method int arg Count this object method arg Count false  argCount argCount argCount
Constructs a new instance of this class given an object to send the message to a string naming the method to invoke an argument count and a flag indicating whether or not the arguments will be passed in an array Note that if the object is an instance of code Class code it is assumed that the method is a static method on that class param object the object to send the message to param method the name of the method to invoke param arg Count the number of arguments that the method takes param is Array Based code true code if the arguments should be passed in an array and false otherwise public Callback Object object String method int arg Count boolean is Array Based Set the callback fields this object object this method method this arg Count arg Count is Static object instanceof Class this is Array Based is Array Based Inline the common cases if is Array Based signature SIGNATURE N else switch arg Count case 0 signature SIGNATURE 0 break NON NLS 1 case 1 signature SIGNATURE 1 break NON NLS 1 case 2 signature SIGNATURE 2 break NON NLS 1 case 3 signature SIGNATURE 3 break NON NLS 1 case 4 signature SIGNATURE 4 break NON NLS 1 default signature get Signature arg Count Bind the address address bind this  argCount isArrayBased argCount isArrayBased argCount argCount isStatic isArrayBased isArrayBased isArrayBased SIGNATURE_N argCount SIGNATURE_0 SIGNATURE_1 SIGNATURE_2 SIGNATURE_3 SIGNATURE_4 getSignature argCount
static final native int PTR sizeof  PTR_sizeof
Allocates the native level resources associated with the callback This method is only invoked from within the constructor for the argument param callback the callback to bind 
Releases the native level resources associated with the callback and removes all references between the callback and other objects This helps to prevent bad application code from accidentally holding onto extraneous garbage public void dispose if object null return unbind this object method signature null address 0 
Returns the address of a block of machine code which will invoke the callback represented by the receiver return the callback address public int long get Address return address  getAddress
Returns the SWT platform name return the platform name of the currently running SWT 
Returns the number of times the system has been recursively entered through a callback p Note This should not be called by application code p return the entry count since 2 1 
static String get Signature int arg Count String signature NON NLS 1 for int i 0 i arg Count i signature PTR SIGNATURE signature PTR SIGNATURE NON NLS 1 return signature  getSignature argCount argCount PTR_SIGNATURE PTR_SIGNATURE
Indicates whether or not callbacks which are triggered at the native level should cause the messages described by the matching code Callback code objects to be invoked This method is used to safely shut down SWT when it is run within environments which can generate spurious events p Note This should not be called by application code p param enable true if callbacks should be invoked 
Returns whether or not callbacks which are triggered at the native level should cause the messages described by the matching code Callback code objects to be invoked This method is used to safely shut down SWT when it is run within environments which can generate spurious events p Note This should not be called by application code p return true if callbacks should not be invoked 
This might be called directly from native code in environments which can generate spurious events Check before removing it deprecated param ignore true if callbacks should not be invoked static final void ignore Callbacks boolean ignore set Enabled ignore  ignoreCallbacks setEnabled
Immediately wipes out all native level state associated with em all em callbacks p b WARNING b This operation is em extremely em dangerous and should never be performed by application code p 
Releases the native level resources associated with the callback see dispose 

byte bit Invert Data byte data int start Index int end Index Destructively bit invert data in the given byte array for int i start Index i end Index i data i byte 255 data i start Index return data  bitInvertData startIndex endIndex startIndex endIndex startIndex
Return whether or not the specified input stream represents a supported file format 
abstract boolean is File Format LE Data Input Stream stream abstract Image Data load From Byte Stream  isFileFormat LEDataInputStream ImageData loadFromByteStream
public Image Data load From Stream LE Data Input Stream stream try input Stream stream return load From Byte Stream catch Exception e SWT error SWT ERROR IO e return null  ImageData loadFromStream LEDataInputStream inputStream loadFromByteStream ERROR_IO
public static Image Data load Input Stream is Image Loader loader File Format file Format null LE Data Input Stream stream new LE Data Input Stream is boolean is Supported false for int i 1 i FORMATS length i if FORMATS i null try Class clazz Class for Name FORMAT PACKAGE FORMATS i FORMAT SUFFIX file Format File Format clazz new Instance if file Format is File Format stream is Supported true break catch Class Not Found Exception e FORMATS i null catch Exception e if is Supported SWT error SWT ERROR UNSUPPORTED FORMAT file Format loader loader return file Format load From Stream stream  ImageData InputStream ImageLoader FileFormat fileFormat LEDataInputStream LEDataInputStream isSupported forName FORMAT_PACKAGE FORMAT_SUFFIX fileFormat FileFormat newInstance fileFormat isFileFormat isSupported ClassNotFoundException isSupported ERROR_UNSUPPORTED_FORMAT fileFormat fileFormat loadFromStream
public static void save Output Stream os int format Image Loader loader if format 0 format FORMATS length SWT error SWT ERROR INVALID ARGUMENT if FORMATS format null SWT error SWT ERROR INVALID ARGUMENT We do not currently support writing multi image files so we use the first image data in the loader s array Image Data data loader data 0 LE Data Output Stream stream new LE Data Output Stream os File Format file Format null try Class clazz Class for Name FORMAT PACKAGE FORMATS format FORMAT SUFFIX file Format File Format clazz new Instance catch Exception e SWT error SWT ERROR INVALID ARGUMENT if format SWT IMAGE BMP RLE switch data depth case 8 file Format compression 1 break case 4 file Format compression 2 break file Format unload Into Stream data stream  OutputStream ImageLoader ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT ImageData LEDataOutputStream LEDataOutputStream FileFormat fileFormat forName FORMAT_PACKAGE FORMAT_SUFFIX fileFormat FileFormat newInstance ERROR_INVALID_ARGUMENT IMAGE_BMP_RLE fileFormat fileFormat fileFormat unloadIntoStream
abstract void unload Into Byte Stream Image Data image  unloadIntoByteStream ImageData
public void unload Into Stream Image Data image LE Data Output Stream stream try output Stream stream unload Into Byte Stream image output Stream close catch Exception e try output Stream close catch Exception f SWT error SWT ERROR IO e  unloadIntoStream ImageData LEDataOutputStream outputStream unloadIntoByteStream outputStream outputStream ERROR_IO

Answer a palette containing num Grays shades of gray ranging from black to white static Palette Data gray Ramp int num Grays int n num Grays 1 RGB colors new RGB num Grays for int i 0 i num Grays i int intensity byte i 3 256 n colors i new RGB intensity intensity intensity return new Palette Data colors  numGrays PaletteData grayRamp numGrays numGrays numGrays numGrays PaletteData
boolean is File Format LE Data Input Stream stream try byte signature new byte 3 stream read signature stream unread signature return new String signature equals GIF NON NLS 1 catch Exception e return false  isFileFormat LEDataInputStream
Load the GIF image s stored in the input stream Return an array of Image Data representing the image s Image Data load From Byte Stream byte signature Bytes new byte 3 byte version Bytes new byte 3 byte block new byte 7 try input Stream read signature Bytes signature new String signature Bytes if signature equals GIF NON NLS 1 SWT error SWT ERROR INVALID IMAGE input Stream read version Bytes version new String version Bytes input Stream read block catch IO Exception e SWT error SWT ERROR IO e screen Width block 0 0xFF block 1 0xFF 8 loader logical Screen Width screen Width screen Height block 2 0xFF block 3 0xFF 8 loader logical Screen Height screen Height byte bit Field block 4 background Pixel block 5 0xFF aspect block 6 0xFF bits Per Pixel bit Field 4 0x07 1 default Depth bit Field 0x7 1 Palette Data palette null if bit Field 0x80 0 Global palette sorted bit Field 0x8 0 palette read Palette 1 default Depth else No global palette sorted false background Pixel 1 default Depth bits Per Pixel loader background Pixel background Pixel get Extensions int id readID Image Data images new Image Data 0 while id GIF IMAGE BLOCK ID Image Data image read Image Block palette if loader has Listeners loader notify Listeners new Image Loader Event loader image 3 true Image Data old Images images images new Image Data old Images length 1 System arraycopy old Images 0 images 0 old Images length images images length 1 image try Read the 0 byte terminator at the end of the image id input Stream read if id 0 We read the terminator earlier input Stream unread new byte byte id catch IO Exception e SWT error SWT ERROR IO e get Extensions id readID return images  ImageData ImageData loadFromByteStream signatureBytes versionBytes inputStream signatureBytes signatureBytes ERROR_INVALID_IMAGE inputStream versionBytes versionBytes inputStream IOException ERROR_IO screenWidth logicalScreenWidth screenWidth screenHeight logicalScreenHeight screenHeight bitField backgroundPixel bitsPerPixel bitField defaultDepth bitField PaletteData bitField bitField readPalette defaultDepth backgroundPixel defaultDepth bitsPerPixel backgroundPixel backgroundPixel getExtensions ImageData ImageData GIF_IMAGE_BLOCK_ID ImageData readImageBlock hasListeners notifyListeners ImageLoaderEvent ImageData oldImages ImageData oldImages oldImages oldImages inputStream inputStream IOException ERROR_IO getExtensions
Read and return the next block or extension identifier from the file int readID try return input Stream read catch IO Exception e SWT error SWT ERROR IO e return 1  inputStream IOException ERROR_IO
Read extensions until an image descriptor appears In the future if we care about the extensions they should be properly grouped with the image data before which they appeared Right now the interesting parts of some extensions are kept but the rest is discarded Throw an error if an error occurs void get Extensions int id readID while id GIF IMAGE BLOCK ID id GIF TRAILER ID id 0 if id GIF EXTENSION BLOCK ID read Extension else SWT error SWT ERROR INVALID IMAGE id readID if id GIF IMAGE BLOCK ID id GIF TRAILER ID try input Stream unread new byte byte id catch IO Exception e SWT error SWT ERROR IO e  getExtensions GIF_IMAGE_BLOCK_ID GIF_TRAILER_ID GIF_EXTENSION_BLOCK_ID readExtension ERROR_INVALID_IMAGE GIF_IMAGE_BLOCK_ID GIF_TRAILER_ID inputStream IOException ERROR_IO
Read a control extension Return the extension block data byte read Extension int extensionID readID if extensionID GIF COMMENT BLOCK ID return read Comment Extension if extensionID GIF PLAIN TEXT BLOCK ID return read Plain Text Extension if extensionID GIF GRAPHICS CONTROL BLOCK ID return read Graphics Control Extension if extensionID GIF APPLICATION EXTENSION BLOCK ID return read Application Extension Otherwise we don t recognize the block If the field size is correct we can just skip over the block contents try int ext Size input Stream read if ext Size 0 SWT error SWT ERROR INVALID IMAGE byte ext new byte ext Size input Stream read ext 0 ext Size return ext catch IO Exception e SWT error SWT ERROR IO e return null  readExtension GIF_COMMENT_BLOCK_ID readCommentExtension GIF_PLAIN_TEXT_BLOCK_ID readPlainTextExtension GIF_GRAPHICS_CONTROL_BLOCK_ID readGraphicsControlExtension GIF_APPLICATION_EXTENSION_BLOCK_ID readApplicationExtension extSize inputStream extSize ERROR_INVALID_IMAGE extSize inputStream extSize IOException ERROR_IO
We have just read the Comment extension identifier from the input stream Read in the rest of the comment and return it GIF comment blocks are variable size byte read Comment Extension try byte comment new byte 0 byte block new byte 255 int size input Stream read while size 0 input Stream read block 0 size 1 byte old Comment comment comment new byte old Comment length size System arraycopy old Comment 0 comment 0 old Comment length System arraycopy block 0 comment old Comment length size size input Stream read return comment catch Exception e SWT error SWT ERROR IO e return null  readCommentExtension inputStream inputStream oldComment oldComment oldComment oldComment oldComment inputStream ERROR_IO
We have just read the Plain Text extension identifier from the input stream Read in the plain text info and text and return the text GIF plain text blocks are variable size byte read Plain Text Extension try Read size of block 0x0C input Stream read Read the text information x y width height colors byte info new byte 12 input Stream read info Read the text byte text new byte 0 byte block new byte 255 int size input Stream read while size 0 input Stream read block 0 size 1 byte old Text text text new byte old Text length size System arraycopy old Text 0 text 0 old Text length System arraycopy block 0 text old Text length size size input Stream read return text catch Exception e SWT error SWT ERROR IO e return null  PlainText readPlainTextExtension inputStream inputStream inputStream inputStream oldText oldText oldText oldText oldText inputStream ERROR_IO
We have just read the Graphics Control extension identifier from the input stream Read in the control information store it and return it byte read Graphics Control Extension try Read size of block 0x04 input Stream read Read the control block byte control Block new byte 4 input Stream read control Block byte bit Field control Block 0 Store the user input field user Input bit Field 0x02 0 Store the disposal method disposal Method bit Field 2 0x07 Store the delay time delay Time control Block 1 0xFF control Block 2 0xFF 8 Store the transparent color if bit Field 0x01 0 int color Index control Block 3 0xFF Work around a customer has a GIF that specifies an invalid color index that is larger than the number of entries in the palette Detect this case and ignore the specified color index if color Index 1 default Depth transparent Pixel color Index else transparent Pixel 1 Read block terminator input Stream read return control Block catch Exception e SWT error SWT ERROR IO e return null  GraphicsControl readGraphicsControlExtension inputStream controlBlock inputStream controlBlock bitField controlBlock userInput bitField disposalMethod bitField delayTime controlBlock controlBlock bitField colorIndex controlBlock colorIndex defaultDepth transparentPixel colorIndex transparentPixel inputStream controlBlock ERROR_IO
We have just read the Application extension identifier from the input stream Read in the rest of the extension look for and store number of repeats and return the data byte read Application Extension try Read size of block 0x0B input Stream read Read application identifier byte application Bytes new byte 8 input Stream read application Bytes String application new String application Bytes Read authentication code byte authentication Bytes new byte 3 input Stream read authentication Bytes String authentication new String authentication Bytes Read application data byte data new byte 0 byte block new byte 255 int size input Stream read while size 0 input Stream read block 0 size 1 byte old Data data data new byte old Data length size System arraycopy old Data 0 data 0 old Data length System arraycopy block 0 data old Data length size size input Stream read Look for the NETSCAPE repeat count field for an animated GIF if application equals NETSCAPE authentication equals 2 0 data 0 01 NON NLS 1 NON NLS 2 repeat Count data 1 0xFF data 2 0xFF 8 loader repeat Count repeat Count return data catch Exception e SWT error SWT ERROR IO e return null  readApplicationExtension inputStream applicationBytes inputStream applicationBytes applicationBytes authenticationBytes inputStream authenticationBytes authenticationBytes inputStream inputStream oldData oldData oldData oldData oldData inputStream repeatCount repeatCount repeatCount ERROR_IO
Return a Device Independent Image representing the image block at the current position in the input stream Throw an error if an error occurs Image Data read Image Block Palette Data default Palette int depth Palette Data palette byte block new byte 9 try input Stream read block catch IO Exception e SWT error SWT ERROR IO e int left block 0 0xFF block 1 0xFF 8 int top block 2 0xFF block 3 0xFF 8 int width block 4 0xFF block 5 0xFF 8 int height block 6 0xFF block 7 0xFF 8 byte bit Field block 8 boolean interlaced bit Field 0x40 0 boolean sorted bit Field 0x20 0 if bit Field 0x80 0 Local palette depth bit Field 0x7 1 palette read Palette 1 depth else No local palette depth default Depth palette default Palette Promote depth to next highest supported value if depth 1 depth 4 depth 8 if depth 4 depth 4 else depth 8 if palette null palette gray Ramp 1 depth int initial Code Size 1 try initial Code Size input Stream read catch IO Exception e SWT error SWT ERROR IO e if initial Code Size 0 SWT error SWT ERROR INVALID IMAGE Image Data image Image Data internal new width height depth palette 4 null 0 null null 1 transparent Pixel SWT IMAGE GIF left top disposal Method delay Time LZW Codec codec new LZW Codec codec decode input Stream loader image interlaced initial Code Size return image  DeviceIndependentImage ImageData readImageBlock PaletteData defaultPalette PaletteData inputStream IOException ERROR_IO bitField bitField bitField bitField bitField readPalette defaultDepth defaultPalette grayRamp initialCodeSize initialCodeSize inputStream IOException ERROR_IO initialCodeSize ERROR_INVALID_IMAGE ImageData ImageData internal_new transparentPixel IMAGE_GIF disposalMethod delayTime LZWCodec LZWCodec inputStream initialCodeSize
Read a palette from the input stream Palette Data read Palette int num Colors byte bytes new byte num Colors 3 try if input Stream read bytes bytes length SWT error SWT ERROR INVALID IMAGE catch IO Exception e SWT error SWT ERROR IO e RGB colors new RGB num Colors for int i 0 i num Colors i colors i new RGB bytes i 3 0xFF bytes i 3 1 0xFF bytes i 3 2 0xFF return new Palette Data colors  PaletteData readPalette numColors numColors inputStream ERROR_INVALID_IMAGE IOException ERROR_IO numColors numColors PaletteData
Write the specified device independent image to the output stream void unload Into Byte Stream Image Data image if image depth 1 image depth 4 image depth 8 SWT error SWT ERROR UNSUPPORTED DEPTH byte bit Field byte 0x80 0xF8 0xF7 0x8F image depth 1 image depth 1 16 try output Stream write new byte byte G byte I byte F output Stream write new byte byte 8 byte 9 byte a output Stream write Short short image width output Stream write Short short image height output Stream write Byte bit Field output Stream write Byte byte 0 output Stream write Byte byte 0 catch IO Exception e SWT error SWT ERROR IO e write Palette image palette image depth if image transparent Pixel 1 image disposal Method 0 image delay Time 0 write Graphics Control Block image write Image Block image try output Stream write 0x3B catch IO Exception e SWT error SWT ERROR IO e  unloadIntoByteStream ImageData ERROR_UNSUPPORTED_DEPTH bitField outputStream outputStream outputStream writeShort outputStream writeShort outputStream writeByte bitField outputStream writeByte outputStream writeByte IOException ERROR_IO writePalette transparentPixel disposalMethod delayTime writeGraphicsControlBlock writeImageBlock outputStream IOException ERROR_IO
Write out a Graphics Control Block to describe the specified device independent image void write Graphics Control Block Image Data image try output Stream write GIF EXTENSION BLOCK ID output Stream write GIF GRAPHICS CONTROL BLOCK ID output Stream write 0x04 size of block byte gc Block new byte 4 gc Block 0 byte 0xFD gc Block 1 0 gc Block 2 0 gc Block 3 0 if image transparent Pixel 1 gc Block 0 byte gc Block 0 0xFE else gc Block 0 byte gc Block 0 0x01 gc Block 3 byte image transparent Pixel if image disposal Method 0 gc Block 0 byte gc Block 0 image disposal Method 0x07 2 if image delay Time 0 gc Block 1 byte image delay Time 0xFF gc Block 2 byte image delay Time 8 0xFF output Stream write gc Block output Stream write 0 block terminator catch IO Exception e SWT error SWT ERROR IO e  GraphicsControlBlock writeGraphicsControlBlock ImageData outputStream GIF_EXTENSION_BLOCK_ID outputStream GIF_GRAPHICS_CONTROL_BLOCK_ID outputStream gcBlock gcBlock gcBlock gcBlock gcBlock transparentPixel gcBlock gcBlock gcBlock gcBlock gcBlock transparentPixel disposalMethod gcBlock gcBlock disposalMethod delayTime gcBlock delayTime gcBlock delayTime outputStream gcBlock outputStream IOException ERROR_IO
Write the specified device independent image to the current position in the output stream void write Image Block Image Data image try output Stream write GIF IMAGE BLOCK ID byte block new byte 9 block 0 byte image x 0xFF block 1 byte image x 8 0xFF block 2 byte image y 0xFF block 3 byte image y 8 0xFF block 4 byte image width 0xFF block 5 byte image width 8 0xFF block 6 byte image height 0xFF block 7 byte image height 8 0xFF block 8 0 no interlace no sort no local palette output Stream write block output Stream write image depth catch IO Exception e SWT error SWT ERROR IO e new LZW Codec encode output Stream image  writeImageBlock ImageData outputStream GIF_IMAGE_BLOCK_ID outputStream outputStream IOException ERROR_IO LZWCodec outputStream
Write the specified palette to the output stream void write Palette Palette Data palette int depth byte bytes new byte 1 depth 3 int offset 0 for int i 0 i palette colors length i RGB color palette colors i bytes offset byte color red bytes offset 1 byte color green bytes offset 2 byte color blue offset 3 try output Stream write bytes catch IO Exception e SWT error SWT ERROR IO e  writePalette PaletteData outputStream IOException ERROR_IO

final class JPEG Appn extends JPEG Variable Size Segment public JPEG Appn byte reference super reference  JPEGAppn JPEGVariableSizeSegment JPEGAppn
public JPEG Appn LE Data Input Stream byte Stream super byte Stream  JPEGAppn LEDataInputStream byteStream byteStream
public boolean verify int marker get Segment Marker return marker JPEG File Format APP0 marker JPEG File Format APP15  getSegmentMarker JPEGFileFormat JPEGFileFormat

final class JPEG Arithmetic Conditioning Table extends JPEG Variable Size Segment public JPEG Arithmetic Conditioning Table LE Data Input Stream byte Stream super byte Stream  JPEGArithmeticConditioningTable JPEGVariableSizeSegment JPEGArithmeticConditioningTable LEDataInputStream byteStream byteStream
public int signature return JPEG File Format DAC  JPEGFileFormat

final class JPEG Comment extends JPEG Variable Size Segment public JPEG Comment byte reference super reference  JPEGComment JPEGVariableSizeSegment JPEGComment
public JPEG Comment LE Data Input Stream byte Stream super byte Stream  JPEGComment LEDataInputStream byteStream byteStream
public int signature return JPEG File Format COM  JPEGFileFormat

final class JPEG End Of Image extends JPEG Fixed Size Segment public JPEG End Of Image super  JPEGEndOfImage JPEGFixedSizeSegment JPEGEndOfImage
public JPEG End Of Image byte reference super reference  JPEGEndOfImage
public int signature return JPEG File Format EOI  JPEGFileFormat
public int fixed Size return 2  fixedSize

void compress Image Data image byte dataY Comp byte data Cb Comp byte data Cr Comp int src Width image width int src Height image height int vh Factor maxV maxH int frame Component image Components new byte n Components for int i 0 i n Components i frame Component frame Components component Ids i image Components i new byte frame Component CW frame Component CH frame Component frame Components component Ids ID Y for int y Pos 0 y Pos src Height y Pos int src Ofs y Pos src Width int dst Ofs y Pos frame Component CW System arraycopy dataY Comp src Ofs image Components ID Y dst Ofs src Width frame Component frame Components component Ids ID CB for int y Pos 0 y Pos src Height maxV y Pos int dest Row Index y Pos frame Component CW for int x Pos 0 x Pos src Width maxH x Pos int sum 0 for int iv 0 iv maxV iv int src Index y Pos maxV iv src Width x Pos maxH for int ih 0 ih maxH ih sum data Cb Comp src Index ih 0xFF image Components ID CB dest Row Index x Pos byte sum vh Factor frame Component frame Components component Ids ID CR for int y Pos 0 y Pos src Height maxV y Pos int dest Row Index y Pos frame Component CW for int x Pos 0 x Pos src Width maxH x Pos int sum 0 for int iv 0 iv maxV iv int src Index y Pos maxV iv src Width x Pos maxH for int ih 0 ih maxH ih sum data Cr Comp src Index ih 0xFF image Components ID CR dest Row Index x Pos byte sum vh Factor for int i Comp 0 i Comp n Components i Comp byte image Component image Components i Comp frame Component frame Components component Ids i Comp int h Factor frame Component HI int v Factor frame Component VI int component Width frame Component CW int component Height frame Component CH int compressed Width src Width maxH h Factor int compressed Height src Height maxV v Factor if compressed Width component Width int delta component Width compressed Width for int y Pos 0 y Pos compressed Height y Pos int dst Ofs y Pos 1 component Width delta int data Value image Component dst Ofs 1 0xFF for int i 0 i delta i image Component dst Ofs i byte data Value if compressed Height component Height int src Ofs compressed Height 1 component Width for int y Pos compressed Height y Pos component Height y Pos int dst Ofs y Pos 1 component Width System arraycopy image Component src Ofs image Component dst Ofs component Width  ImageData dataYComp dataCbComp dataCrComp srcWidth srcHeight vhFactor frameComponent imageComponents nComponents nComponents frameComponent frameComponents componentIds imageComponents frameComponent frameComponent frameComponent frameComponents componentIds ID_Y yPos yPos srcHeight yPos srcOfs yPos srcWidth dstOfs yPos frameComponent dataYComp srcOfs imageComponents ID_Y dstOfs srcWidth frameComponent frameComponents componentIds ID_CB yPos yPos srcHeight yPos destRowIndex yPos frameComponent xPos xPos srcWidth xPos srcIndex yPos srcWidth xPos dataCbComp srcIndex imageComponents ID_CB destRowIndex xPos vhFactor frameComponent frameComponents componentIds ID_CR yPos yPos srcHeight yPos destRowIndex yPos frameComponent xPos xPos srcWidth xPos srcIndex yPos srcWidth xPos dataCrComp srcIndex imageComponents ID_CR destRowIndex xPos vhFactor iComp iComp nComponents iComp imageComponent imageComponents iComp frameComponent frameComponents componentIds iComp hFactor frameComponent vFactor frameComponent componentWidth frameComponent componentHeight frameComponent compressedWidth srcWidth hFactor compressedHeight srcHeight vFactor compressedWidth componentWidth componentWidth compressedWidth yPos yPos compressedHeight yPos dstOfs yPos componentWidth dataValue imageComponent dstOfs imageComponent dstOfs dataValue compressedHeight componentHeight srcOfs compressedHeight componentWidth yPos compressedHeight yPos componentHeight yPos dstOfs yPos componentWidth imageComponent srcOfs imageComponent dstOfs componentWidth
void convert4 BitRGB ToY Cb Cr Image Data image RGB rgbs image getRG Bs int palette Size rgbs length byte y Comp new byte palette Size byte cb Comp new byte palette Size byte cr Comp new byte palette Size int src Width image width int src Height image height for int i 0 i palette Size i RGB color rgbs i int r color red int g color green int b color blue int n RY Table r GY Table g BY Table b y Comp i byte n 65536 if n 0 n 65536 0 y Comp i n R Cb Table r G Cb Table g B Cb Table b cb Comp i byte n 65536 if n 0 n 65536 0 cb Comp i n R Cr Table r G Cr Table g B Cr Table b cr Comp i byte n 65536 if n 0 n 65536 0 cr Comp i int b Size src Width src Height byte dataY Comp new byte b Size byte data Cb Comp new byte b Size byte data Cr Comp new byte b Size byte orig Data image data for int y Pos 0 y Pos src Height y Pos for int x Pos 0 x Pos src Width 2 x Pos int src Index y Pos src Width 2 x Pos int dst Index y Pos src Width x Pos 2 int value2 orig Data src Index 0xFF int value1 value2 16 value2 value2 16 dataY Comp dst Index y Comp value1 data Cb Comp dst Index cb Comp value1 data Cr Comp dst Index cr Comp value1 dataY Comp dst Index 1 y Comp value2 data Cb Comp dst Index 1 cb Comp value2 data Cr Comp dst Index 1 cr Comp value2 compress image dataY Comp data Cb Comp data Cr Comp  convert4BitRGBToYCbCr ImageData getRGBs paletteSize yComp paletteSize cbComp paletteSize crComp paletteSize srcWidth srcHeight paletteSize RYTable GYTable BYTable yComp yComp RCbTable GCbTable BCbTable cbComp cbComp RCrTable GCrTable BCrTable crComp crComp bSize srcWidth srcHeight dataYComp bSize dataCbComp bSize dataCrComp bSize origData yPos yPos srcHeight yPos xPos xPos srcWidth xPos srcIndex yPos srcWidth xPos dstIndex yPos srcWidth xPos origData srcIndex dataYComp dstIndex yComp dataCbComp dstIndex cbComp dataCrComp dstIndex crComp dataYComp dstIndex yComp dataCbComp dstIndex cbComp dataCrComp dstIndex crComp dataYComp dataCbComp dataCrComp
void convert8 BitRGB ToY Cb Cr Image Data image RGB rgbs image getRG Bs int palette Size rgbs length byte y Comp new byte palette Size byte cb Comp new byte palette Size byte cr Comp new byte palette Size int src Width image width int src Height image height for int i 0 i palette Size i RGB color rgbs i int r color red int g color green int b color blue int n RY Table r GY Table g BY Table b y Comp i byte n 65536 if n 0 n 65536 0 y Comp i n R Cb Table r G Cb Table g B Cb Table b cb Comp i byte n 65536 if n 0 n 65536 0 cb Comp i n R Cr Table r G Cr Table g B Cr Table b cr Comp i byte n 65536 if n 0 n 65536 0 cr Comp i int dst Width image width int dst Height src Height int stride src Width 3 4 4 int b Size dst Width dst Height byte dataY Comp new byte b Size byte data Cb Comp new byte b Size byte data Cr Comp new byte b Size byte orig Data image data for int y Pos 0 y Pos src Height y Pos int src Row Index y Pos stride int dst Row Index y Pos dst Width for int x Pos 0 x Pos src Width x Pos int value orig Data src Row Index x Pos 0xFF int dst Index dst Row Index x Pos dataY Comp dst Index y Comp value data Cb Comp dst Index cb Comp value data Cr Comp dst Index cr Comp value compress image dataY Comp data Cb Comp data Cr Comp  convert8BitRGBToYCbCr ImageData getRGBs paletteSize yComp paletteSize cbComp paletteSize crComp paletteSize srcWidth srcHeight paletteSize RYTable GYTable BYTable yComp yComp RCbTable GCbTable BCbTable cbComp cbComp RCrTable GCrTable BCrTable crComp crComp dstWidth dstHeight srcHeight srcWidth bSize dstWidth dstHeight dataYComp bSize dataCbComp bSize dataCrComp bSize origData yPos yPos srcHeight yPos srcRowIndex yPos dstRowIndex yPos dstWidth xPos xPos srcWidth xPos origData srcRowIndex xPos dstIndex dstRowIndex xPos dataYComp dstIndex yComp dataCbComp dstIndex cbComp dataCrComp dstIndex crComp dataYComp dataCbComp dataCrComp
compress image dataY Comp data Cb Comp data Cr Comp byte convertCMYK ToRGB Unsupported CMYK format Answer an empty byte array return new byte 0  dataYComp dataCbComp dataCrComp convertCMYKToRGB
void convert Image ToY Cb Cr Image Data image switch image depth case 4 convert4 BitRGB ToY Cb Cr image return case 8 convert8 BitRGB ToY Cb Cr image return case 16 case 24 case 32 convert MultiRGB ToY Cb Cr image return default SWT error SWT ERROR UNSUPPORTED DEPTH return  convertImageToYCbCr ImageData convert4BitRGBToYCbCr convert8BitRGBToYCbCr convertMultiRGBToYCbCr ERROR_UNSUPPORTED_DEPTH
void convert MultiRGB ToY Cb Cr Image Data image int src Width image width int src Height image height int b Size src Width src Height byte dataY Comp new byte b Size byte data Cb Comp new byte b Size byte data Cr Comp new byte b Size Palette Data palette image palette int buffer new int src Width if palette is Direct int red Mask palette red Mask int green Mask palette green Mask int blue Mask palette blue Mask int red Shift palette red Shift int green Shift palette green Shift int blue Shift palette blue Shift for int y Pos 0 y Pos src Height y Pos image get Pixels 0 y Pos src Width buffer 0 int dst Row Index y Pos src Width for int x Pos 0 x Pos src Width x Pos int pixel buffer x Pos int dst Data Index dst Row Index x Pos int r pixel red Mask r red Shift 0 r red Shift r red Shift int g pixel green Mask g green Shift 0 g green Shift g green Shift int b pixel blue Mask b blue Shift 0 b blue Shift b blue Shift dataY Comp dst Data Index byte RY Table r GY Table g BY Table b 65536 data Cb Comp dst Data Index byte R Cb Table r G Cb Table g B Cb Table b 65536 data Cr Comp dst Data Index byte R Cr Table r G Cr Table g B Cr Table b 65536 else for int y Pos 0 y Pos src Height y Pos image get Pixels 0 y Pos src Width buffer 0 int dst Row Index y Pos src Width for int x Pos 0 x Pos src Width x Pos int pixel buffer x Pos int dst Data Index dst Row Index x Pos RGB rgb palette getRGB pixel int r rgb red int g rgb green int b rgb blue dataY Comp dst Data Index byte RY Table r GY Table g BY Table b 65536 data Cb Comp dst Data Index byte R Cb Table r G Cb Table g B Cb Table b 65536 data Cr Comp dst Data Index byte R Cr Table r G Cr Table g B Cr Table b 65536 compress image dataY Comp data Cb Comp data Cr Comp  convertMultiRGBToYCbCr ImageData srcWidth srcHeight bSize srcWidth srcHeight dataYComp bSize dataCbComp bSize dataCrComp bSize PaletteData srcWidth isDirect redMask redMask greenMask greenMask blueMask blueMask redShift redShift greenShift greenShift blueShift blueShift yPos yPos srcHeight yPos getPixels yPos srcWidth dstRowIndex yPos srcWidth xPos xPos srcWidth xPos xPos dstDataIndex dstRowIndex xPos redMask redShift redShift redShift greenMask greenShift greenShift greenShift blueMask blueShift blueShift blueShift dataYComp dstDataIndex RYTable GYTable BYTable dataCbComp dstDataIndex RCbTable GCbTable BCbTable dataCrComp dstDataIndex RCrTable GCrTable BCrTable yPos yPos srcHeight yPos getPixels yPos srcWidth dstRowIndex yPos srcWidth xPos xPos srcWidth xPos xPos dstDataIndex dstRowIndex xPos dataYComp dstDataIndex RYTable GYTable BYTable dataCbComp dstDataIndex RCbTable GCbTable BCbTable dataCrComp dstDataIndex RCrTable GCrTable BCrTable dataYComp dataCbComp dataCrComp
byte convertY ToRGB int comp Width frame Components component Ids ID Y CW int bytes Per Line image Width 8 7 8 3 4 4 byte data new byte bytes Per Line image Height byte y Comp image Components ID Y int dest Index 0 for int i 0 i image Height i int src Index i comp Width for int j 0 j bytes Per Line j int y y Comp src Index 0xFF if y 0 y 0 else if y 255 y 255 if j image Width y 0 data dest Index byte y src Index dest Index return data  convertYToRGB compWidth frameComponents componentIds ID_Y bytesPerLine imageWidth bytesPerLine imageHeight yComp imageComponents ID_Y destIndex imageHeight srcIndex compWidth bytesPerLine yComp srcIndex imageWidth destIndex srcIndex destIndex
byte convertY Cb Cr ToRGB Convert existing image components into an RGB format Y Cb Cr is defined per CCIR 601 1 except that Cb and Cr are normalized to the range 0 MAXJSAMPLE rather than 0 5 0 5 The conversion equations to be implemented are therefore R Y 1 40200 Cr G Y 0 34414 Cb 0 71414 Cr B Y 1 77200 Cb where Cb and Cr represent the incoming values less MAXJSAMPLE 2 These numbers are derived from TIFF 6 0 section 21 dated 3 June 92 To avoid floating point arithmetic we represent the fractional constants as integers scaled up by 2 16 about 4 digits precision we have to divide the products by 2 16 with appropriate rounding to get the correct answer Notice that Y being an integral input does not contribute any fraction so it need not participate in the rounding For even more speed we avoid doing any multiplications in the inner loop by precalculating the constants times Cb and Cr for all possible values For 8 bit JSAMPL Es this is very reasonable only 256 entries per table for 12 bit samples it is still acceptable It s not very reasonable for 16 bit samples but if you want lossless storage you shouldn t be changing colorspace anyway The Cr R and Cb B values can be rounded to integers in advance the values for the G calculation are left scaled up since we must add them together before rounding int b Size image Width image Height n Components byte rgb Data new byte b Size int dest Index 0 expand Image Components byte y Comp image Components ID Y byte cb Comp image Components ID CB byte cr Comp image Components ID CR int comp Width frame Components component Ids ID Y CW for int v 0 v image Height v int src Index v comp Width for int i 0 i image Width i int y y Comp src Index 0xFF int cb cb Comp src Index 0xFF int cr cr Comp src Index 0xFF int r y CrR Table cr int g y CbG Table cb CrG Table cr 65536 int b y CbB Table cb if r 0 r 0 else if r 255 r 255 if g 0 g 0 else if g 255 g 255 if b 0 b 0 else if b 255 b 255 rgb Data dest Index byte b rgb Data dest Index 1 byte g rgb Data dest Index 2 byte r dest Index 3 src Index return rgb Data  convertYCbCrToRGB YCbCr JSAMPLEs bSize imageWidth imageHeight nComponents rgbData bSize destIndex expandImageComponents yComp imageComponents ID_Y cbComp imageComponents ID_CB crComp imageComponents ID_CR compWidth frameComponents componentIds ID_Y imageHeight srcIndex compWidth imageWidth yComp srcIndex cbComp srcIndex crComp srcIndex CrRTable CbGTable CrGTable CbBTable rgbData destIndex rgbData destIndex rgbData destIndex destIndex srcIndex rgbData
return rgb Data byte convertYIQ ToRGB Unsupported CMYK format Answer an empty byte array return new byte 0  rgbData convertYIQToRGB
void decodeAC Coefficients int data Unit int i Comp int s Params scan Header component Parameters component Ids i Comp JPEG Huffman Table ac Table ac Huffman Tables s Params AC int k 1 while k 64 int rs decode Using Table ac Table int r rs 4 int s rs 0xF if s 0 if r 15 k 16 else break else k r int bits receive s data Unit Zig Zag8x8 k extend By bits s k  decodeACCoefficients dataUnit iComp sParams scanHeader componentParameters componentIds iComp JPEGHuffmanTable acTable acHuffmanTables sParams decodeUsingTable acTable dataUnit ZigZag8x8 extendBy
void decodeAC First Coefficients int data Unit int i Comp int start int end int approx Bit if eobrun 0 eobrun return int s Params scan Header component Parameters component Ids i Comp JPEG Huffman Table ac Table ac Huffman Tables s Params AC int k start while k end int rs decode Using Table ac Table int r rs 4 int s rs 0xF if s 0 if r 15 k 16 else eobrun 1 r receive r 1 break else k r int bits receive s data Unit Zig Zag8x8 k extend By bits s approx Bit k  decodeACFirstCoefficients dataUnit iComp approxBit sParams scanHeader componentParameters componentIds iComp JPEGHuffmanTable acTable acHuffmanTables sParams decodeUsingTable acTable dataUnit ZigZag8x8 extendBy approxBit
void decodeAC Refine Coefficients int data Unit int i Comp int start int end int approx Bit int s Params scan Header component Parameters component Ids i Comp JPEG Huffman Table ac Table ac Huffman Tables s Params AC int k start while k end if eobrun 0 while k end int zz Index Zig Zag8x8 k if data Unit zz Index 0 data Unit zz Index refineAC data Unit zz Index approx Bit k eobrun else int rs decode Using Table ac Table int r rs 4 int s rs 0xF if s 0 if r 15 int zeros 0 while zeros 16 k end int zz Index Zig Zag8x8 k if data Unit zz Index 0 data Unit zz Index refineAC data Unit zz Index approx Bit else zeros k else eobrun 1 r receive r else int bit receive s int zeros 0 int zz Index Zig Zag8x8 k while zeros r data Unit zz Index 0 k end if data Unit zz Index 0 data Unit zz Index refineAC data Unit zz Index approx Bit else zeros k zz Index Zig Zag8x8 k if bit 0 data Unit zz Index 1 approx Bit else data Unit zz Index 1 approx Bit k  decodeACRefineCoefficients dataUnit iComp approxBit sParams scanHeader componentParameters componentIds iComp JPEGHuffmanTable acTable acHuffmanTables sParams zzIndex ZigZag8x8 dataUnit zzIndex dataUnit zzIndex dataUnit zzIndex approxBit decodeUsingTable acTable zzIndex ZigZag8x8 dataUnit zzIndex dataUnit zzIndex dataUnit zzIndex approxBit zzIndex ZigZag8x8 dataUnit zzIndex dataUnit zzIndex dataUnit zzIndex dataUnit zzIndex approxBit zzIndex ZigZag8x8 dataUnit zzIndex approxBit dataUnit zzIndex approxBit
int refineAC int ac int approx Bit if ac 0 int bit next Bit if bit 0 ac ac 1 approx Bit else if ac 0 int bit next Bit if bit 0 ac ac 1 approx Bit return ac  approxBit nextBit approxBit nextBit approxBit
void decodeDC Coefficient int data Unit int i Comp boolean first int approx Bit int s Params scan Header component Parameters component Ids i Comp JPEG Huffman Table dc Table dc Huffman Tables s Params DC int lastDC 0 if progressive first int bit next Bit lastDC data Unit 0 bit approx Bit else lastDC precedingD Cs i Comp int n Bits decode Using Table dc Table if n Bits 0 int bits receive n Bits int diff extend By bits n Bits lastDC lastDC diff precedingD Cs i Comp lastDC if progressive lastDC lastDC approx Bit data Unit 0 lastDC  decodeDCCoefficient dataUnit iComp approxBit sParams scanHeader componentParameters componentIds iComp JPEGHuffmanTable dcTable dcHuffmanTables sParams nextBit dataUnit approxBit precedingDCs iComp nBits decodeUsingTable dcTable nBits nBits extendBy nBits precedingDCs iComp approxBit dataUnit
void dequantize int data Unit int i Comp int q Table quantization Tables frame Components component Ids i Comp TQI for int i 0 i data Unit length i int zz Index Zig Zag8x8 i data Unit zz Index data Unit zz Index q Table i  dataUnit iComp qTable quantizationTables frameComponents componentIds iComp dataUnit zzIndex ZigZag8x8 dataUnit zzIndex dataUnit zzIndex qTable
byte decode Image Components int comp Ids new int n Components int comp Ids Index 0 for int i 0 i n Components i comp Ids comp Ids Index i 1 comp Ids Index if comp Ids length 3 comp Ids 0 1 comp Ids 1 2 comp Ids 2 3 return convertY Cb Cr ToRGB if comp Ids length 3 comp Ids 0 1 comp Ids 1 4 comp Ids 2 5 return convertYIQ ToRGB if comp Ids length 4 return convertCMYK ToRGB return convertY ToRGB  decodeImageComponents compIds nComponents compIdsIndex nComponents compIds compIdsIndex compIdsIndex compIds compIds compIds compIds convertYCbCrToRGB compIds compIds compIds compIds convertYIQToRGB compIds convertCMYKToRGB convertYToRGB
void decodeMCU AtX AndY int xmcu int ymcu int n Components In Scan boolean first int start int end int approx Bit for int i Comp 0 i Comp n Components In Scan i Comp int scan Component i Comp while scan Header component Parameters component Ids scan Component null scan Component int frame Component frame Components component Ids scan Component int hi frame Component HI int vi frame Component VI if n Components In Scan 1 hi 1 vi 1 int comp Width frame Component CW for int ivi 0 ivi vi ivi for int ihi 0 ihi hi ihi if progressive Progressive First scan create a new data unit Subsequent scans refine the existing data unit int index ymcu vi ivi comp Width xmcu hi ihi data Unit data Units scan Component index if data Unit null data Unit new int 64 data Units scan Component index data Unit else Sequential Clear and reuse the data unit buffer for int i 0 i data Unit length i data Unit i 0 if progressive scan Header isDC Progressive Scan decodeDC Coefficient data Unit scan Component first approx Bit if progressive decodeAC Coefficients data Unit scan Component else if scan Header isAC Progressive Scan if first decodeAC First Coefficients data Unit scan Component start end approx Bit else decodeAC Refine Coefficients data Unit scan Component start end approx Bit if loader has Listeners Dequantization IDCT up sampling and color conversion are done on a copy of the coefficient data in order to display the image incrementally int temp data Unit data Unit new int 64 System arraycopy temp 0 data Unit 0 64 if progressive progressive loader has Listeners dequantize data Unit scan Component inverseDCT data Unit store Data data Unit scan Component xmcu ymcu hi ihi vi ivi  decodeMCUAtXAndY nComponentsInScan approxBit iComp iComp nComponentsInScan iComp scanComponent iComp scanHeader componentParameters componentIds scanComponent scanComponent frameComponent frameComponents componentIds scanComponent frameComponent frameComponent nComponentsInScan compWidth frameComponent compWidth dataUnit dataUnits scanComponent dataUnit dataUnit dataUnits scanComponent dataUnit dataUnit dataUnit scanHeader isDCProgressiveScan decodeDCCoefficient dataUnit scanComponent approxBit decodeACCoefficients dataUnit scanComponent scanHeader isACProgressiveScan decodeACFirstCoefficients dataUnit scanComponent approxBit decodeACRefineCoefficients dataUnit scanComponent approxBit hasListeners dataUnit dataUnit dataUnit hasListeners dataUnit scanComponent dataUnit storeData dataUnit scanComponent
void decode Scan if progressive scan Header verify Progressive Scan SWT error SWT ERROR INVALID IMAGE int n Components In Scan scan Header get Number Of Image Components int mcu Rows In Scan interleaved Mcu Rows int mcus Per Row interleaved Mcu Cols if n Components In Scan 1 Non interleaved int scan Component 0 while scan Header component Parameters component Ids scan Component null scan Component int frame Component frame Components component Ids scan Component int hi frame Component HI int vi frame Component VI int mcu Width DCTSIZE maxH hi int mcu Height DCTSIZE maxV vi mcus Per Row image Width mcu Width 1 mcu Width mcu Rows In Scan image Height mcu Height 1 mcu Height boolean first scan Header is First Scan int start scan Header get Start Of Spectral Selection int end scan Header get End Of Spectral Selection int approx Bit scan Header get Approx Bit Position Low restarts To Go restart Interval next Restart Number 0 for int ymcu 0 ymcu mcu Rows In Scan ymcu for int xmcu 0 xmcu mcus Per Row xmcu if restart Interval 0 if restarts To Go 0 process Restart Interval restarts To Go decodeMCU AtX AndY xmcu ymcu n Components In Scan first start end approx Bit  decodeScan scanHeader verifyProgressiveScan ERROR_INVALID_IMAGE nComponentsInScan scanHeader getNumberOfImageComponents mcuRowsInScan interleavedMcuRows mcusPerRow interleavedMcuCols nComponentsInScan scanComponent scanHeader componentParameters componentIds scanComponent scanComponent frameComponent frameComponents componentIds scanComponent frameComponent frameComponent mcuWidth mcuHeight mcusPerRow imageWidth mcuWidth mcuWidth mcuRowsInScan imageHeight mcuHeight mcuHeight scanHeader isFirstScan scanHeader getStartOfSpectralSelection scanHeader getEndOfSpectralSelection approxBit scanHeader getApproxBitPositionLow restartsToGo restartInterval nextRestartNumber mcuRowsInScan mcusPerRow restartInterval restartsToGo processRestartInterval restartsToGo decodeMCUAtXAndY nComponentsInScan approxBit
int decode Using Table JPEG Huffman Table huffman Table int i 0 int max Codes huffman Table get Dh Max Codes int min Codes huffman Table get Dh Min Codes int val Ptrs huffman Table get Dh Val Ptrs int huff Vals huffman Table get Dh Values int code next Bit while code max Codes i code code 2 next Bit i int j val Ptrs i j j code min Codes i return huff Vals j  decodeUsingTable JPEGHuffmanTable huffmanTable maxCodes huffmanTable getDhMaxCodes minCodes huffmanTable getDhMinCodes valPtrs huffmanTable getDhValPtrs huffVals huffmanTable getDhValues nextBit maxCodes nextBit valPtrs minCodes huffVals
void emit int huff Code int n Bits if n Bits 0 SWT error SWT ERROR INVALID IMAGE int power2m1 new int 1 3 7 15 31 63 127 255 511 1023 2047 4095 8191 16383 32767 65535 131125 int code huff Code power2m1 n Bits 1 24 n Bits current Bit Count byte code Buffer new byte 4 code Buffer 0 byte code 256 code Buffer 1 byte code 256 256 code Buffer 2 byte code 65536 256 code Buffer 3 byte code 16777216 256 int abs n Bits 8 current Bit Count if abs 0 abs abs if abs 8 0 current Byte code Buffer 2 emit Byte byte current Byte emit Byte byte code Buffer 1 current Byte code Buffer 0 current Bit Count n Bits 16 else current Bit Count n Bits if current Bit Count 8 current Byte code Buffer 2 emit Byte byte current Byte current Byte code Buffer 1 current Bit Count 8 else current Byte code Buffer 2  huffCode nBits nBits ERROR_INVALID_IMAGE huffCode nBits nBits currentBitCount codeBuffer codeBuffer codeBuffer codeBuffer codeBuffer nBits currentBitCount currentByte codeBuffer emitByte currentByte emitByte codeBuffer currentByte codeBuffer currentBitCount nBits currentBitCount nBits currentBitCount currentByte codeBuffer emitByte currentByte currentByte codeBuffer currentBitCount currentByte codeBuffer
void emit Byte byte byte Value if buffer Current Position 512 reset Output Buffer data Buffer buffer Current Position byte Value buffer Current Position if byte Value 1 emit Byte byte 0  emitByte byteValue bufferCurrentPosition resetOutputBuffer dataBuffer bufferCurrentPosition byteValue bufferCurrentPosition byteValue emitByte
void encodeAC Coefficients int data Unit int i Comp int s Params scan Header component Parameters i Comp JPEG Huffman Table ac Table ac Huffman Tables s Params AC int eh Codes ac Table eh Codes byte eh Sizes ac Table eh Code Lengths int r 0 int k 1 while k 64 k int ac Value data Unit Zig Zag8x8 k 1 if ac Value 0 if k 64 emit eh Codes 0 eh Sizes 0 0xFF else r else while r 15 emit eh Codes 0xF0 eh Sizes 0xF0 0xFF r 16 if ac Value 0 int absAC Value ac Value if absAC Value 0 absAC Value absAC Value int n Bits N Bits Table absAC Value int rs r 16 n Bits emit eh Codes rs eh Sizes rs 0xFF emit 0xFFFFFF absAC Value n Bits else int n Bits N Bits Table ac Value int rs r 16 n Bits emit eh Codes rs eh Sizes rs 0xFF emit ac Value n Bits r 0  encodeACCoefficients dataUnit iComp sParams scanHeader componentParameters iComp JPEGHuffmanTable acTable acHuffmanTables sParams ehCodes acTable ehCodes ehSizes acTable ehCodeLengths acValue dataUnit ZigZag8x8 acValue ehCodes ehSizes ehCodes ehSizes acValue absACValue acValue absACValue absACValue absACValue nBits NBitsTable absACValue nBits ehCodes ehSizes absACValue nBits nBits NBitsTable acValue nBits ehCodes ehSizes acValue nBits
void encodeDC Coefficients int data Unit int i Comp int s Params scan Header component Parameters i Comp JPEG Huffman Table dc Table dc Huffman Tables s Params DC int lastDC precedingD Cs i Comp int dc Value data Unit 0 int diff dc Value lastDC precedingD Cs i Comp dc Value if diff 0 int abs Diff 0 diff int n Bits N Bits Table abs Diff emit dc Table eh Codes n Bits dc Table eh Code Lengths n Bits emit 0xFFFFFF abs Diff n Bits else int n Bits N Bits Table diff emit dc Table eh Codes n Bits dc Table eh Code Lengths n Bits if n Bits 0 emit diff n Bits  encodeDCCoefficients dataUnit iComp sParams scanHeader componentParameters iComp JPEGHuffmanTable dcTable dcHuffmanTables sParams precedingDCs iComp dcValue dataUnit dcValue precedingDCs iComp dcValue absDiff nBits NBitsTable absDiff dcTable ehCodes nBits dcTable ehCodeLengths nBits absDiff nBits nBits NBitsTable dcTable ehCodes nBits dcTable ehCodeLengths nBits nBits nBits
void encodeMCU AtX AndY int xmcu int ymcu int n Components In Scan scan Header get Number Of Image Components data Unit new int 64 for int i Comp 0 i Comp n Components In Scan i Comp int frame Component frame Components component Ids i Comp int hi frame Component HI int vi frame Component VI for int ivi 0 ivi vi ivi for int ihi 0 ihi hi ihi extract Data data Unit i Comp xmcu ymcu ihi ivi forwardDCT data Unit quantize Data data Unit i Comp encodeDC Coefficients data Unit i Comp encodeAC Coefficients data Unit i Comp  encodeMCUAtXAndY nComponentsInScan scanHeader getNumberOfImageComponents dataUnit iComp iComp nComponentsInScan iComp frameComponent frameComponents componentIds iComp frameComponent frameComponent extractData dataUnit iComp dataUnit quantizeData dataUnit iComp encodeDCCoefficients dataUnit iComp encodeACCoefficients dataUnit iComp
void encode Scan for int ymcu 0 ymcu interleaved Mcu Rows ymcu for int xmcu 0 xmcu interleaved Mcu Cols xmcu encodeMCU AtX AndY xmcu ymcu if current Bit Count 0 emit Byte byte current Byte reset Output Buffer  encodeScan interleavedMcuRows interleavedMcuCols encodeMCUAtXAndY currentBitCount emitByte currentByte resetOutputBuffer
void expand Image Components for int i Comp 0 i Comp n Components i Comp int frame Component frame Components component Ids i Comp int hi frame Component HI int vi frame Component VI int upH maxH hi int upV maxV vi if upH upV 1 byte component image Components i Comp int comp Width frame Component CW int comp Height frame Component CH int up Comp Width comp Width upH int up Comp Height comp Height upV RGB rgbs new RGB new RGB 0 0 0 new RGB 0x80 0 0 new RGB 0 0x80 0 new RGB 0x80 0x80 0 new RGB 0 0 0x80 new RGB 0x80 0 0x80 new RGB 0 0x80 0x80 new RGB 0xC0 0xC0 0xC0 new RGB 0x80 0x80 0x80 new RGB 0xFF 0 0 new RGB 0 0xFF 0 new RGB 0xFF 0xFF 0 new RGB 0 0 0xFF new RGB 0xFF 0 0xFF new RGB 0 0xFF 0xFF new RGB 0xFF 0xFF 0xFF Image Data src new Image Data comp Width comp Height 8 new Palette Data rgbs 4 component Image Data dest src scaled To up Comp Width up Comp Height image Components i Comp dest data  expandImageComponents iComp iComp nComponents iComp frameComponent frameComponents componentIds iComp frameComponent frameComponent imageComponents iComp compWidth frameComponent compHeight frameComponent upCompWidth compWidth upCompHeight compHeight ImageData ImageData compWidth compHeight PaletteData ImageData scaledTo upCompWidth upCompHeight imageComponents iComp
int extend By int diff int t if diff Extend Test t return diff Extend Offset t else return diff  extendBy ExtendTest ExtendOffset
void extract Data int data Unit int i Comp int xmcu int ymcu int ihi int ivi byte comp Image image Components i Comp int frame Component frame Components component Ids i Comp int hi frame Component HI int vi frame Component VI int comp Width frame Component CW int src Index ymcu vi ivi comp Width DCTSIZE xmcu hi ihi DCTSIZE int dest Index 0 for int i 0 i DCTSIZE i for int col 0 col DCTSIZE col data Unit dest Index comp Image src Index col 0xFF 128 dest Index src Index comp Width  extractData dataUnit iComp compImage imageComponents iComp frameComponent frameComponents componentIds iComp frameComponent frameComponent compWidth frameComponent srcIndex compWidth destIndex dataUnit destIndex compImage srcIndex destIndex srcIndex compWidth
void forwardDCT int data Unit for int row 0 row 8 row int r Index row DCTSIZE int tmp0 data Unit r Index data Unit r Index 7 int tmp7 data Unit r Index data Unit r Index 7 int tmp1 data Unit r Index 1 data Unit r Index 6 int tmp6 data Unit r Index 1 data Unit r Index 6 int tmp2 data Unit r Index 2 data Unit r Index 5 int tmp5 data Unit r Index 2 data Unit r Index 5 int tmp3 data Unit r Index 3 data Unit r Index 4 int tmp4 data Unit r Index 3 data Unit r Index 4 Even part per LL M figure 1 note that published figure is faulty rotator sqrt 2 c1 should be sqrt 2 c6 int tmp10 tmp0 tmp3 int tmp13 tmp0 tmp3 int tmp11 tmp1 tmp2 int tmp12 tmp1 tmp2 data Unit r Index tmp10 tmp11 4 data Unit r Index 4 tmp10 tmp11 4 int z1 tmp12 tmp13 FIX 0 541196100 int scale Factor1 Extend Test 11 int scale Factor2 Extend Test 12 int n z1 tmp13 FIX 0 765366865 scale Factor1 data Unit r Index 2 n scale Factor2 if n 0 n scale Factor2 0 data Unit r Index 2 n z1 tmp12 0 FIX 1 847759065 scale Factor1 data Unit r Index 6 n scale Factor2 if n 0 n scale Factor2 0 data Unit r Index 6 Odd part per figure 8 note paper omits factor of sqrt 2 cK represents cos K pi 16 i0 i3 in the paper are tmp4 tmp7 here z1 tmp4 tmp7 int z2 tmp5 tmp6 int z3 tmp4 tmp6 int z4 tmp5 tmp7 int z5 z3 z4 FIX 1 175875602 sqrt 2 c3 tmp4 tmp4 FIX 0 298631336 sqrt 2 c1 c3 c5 c7 tmp5 tmp5 FIX 2 053119869 sqrt 2 c1 c3 c5 c7 tmp6 tmp6 FIX 3 072711026 sqrt 2 c1 c3 c5 c7 tmp7 tmp7 FIX 1 501321110 sqrt 2 c1 c3 c5 c7 z1 z1 0 FIX 0 899976223 sqrt 2 c7 c3 z2 z2 0 FIX 2 562915447 sqrt 2 c1 c3 z3 z3 0 FIX 1 961570560 sqrt 2 c3 c5 z4 z4 0 FIX 0 390180644 sqrt 2 c5 c3 z3 z3 z5 z4 z4 z5 n tmp4 z1 z3 scale Factor1 data Unit r Index 7 n scale Factor2 if n 0 n scale Factor2 0 data Unit r Index 7 n tmp5 z2 z4 scale Factor1 data Unit r Index 5 n scale Factor2 if n 0 n scale Factor2 0 data Unit r Index 5 n tmp6 z2 z3 scale Factor1 data Unit r Index 3 n scale Factor2 if n 0 n scale Factor2 0 data Unit r Index 3 n tmp7 z1 z4 scale Factor1 data Unit r Index 1 n scale Factor2 if n 0 n scale Factor2 0 data Unit r Index 1 Pass 2 process columns Note that we must descale the results by a factor of 8 2 3 and also undo the PASS1 BITS scaling for int col 0 col 8 col int c0 col int c1 col 8 int c2 col 16 int c3 col 24 int c4 col 32 int c5 col 40 int c6 col 48 int c7 col 56 int tmp0 data Unit c0 data Unit c7 int tmp7 data Unit c0 data Unit c7 int tmp1 data Unit c1 data Unit c6 int tmp6 data Unit c1 data Unit c6 int tmp2 data Unit c2 data Unit c5 int tmp5 data Unit c2 data Unit c5 int tmp3 data Unit c3 data Unit c4 int tmp4 data Unit c3 data Unit c4 Even part per LL M figure 1 note that published figure is faulty rotator sqrt 2 c1 should be sqrt 2 c6 int tmp10 tmp0 tmp3 int tmp13 tmp0 tmp3 int tmp11 tmp1 tmp2 int tmp12 tmp1 tmp2 int scale Factor1 Extend Test 5 int scale Factor2 Extend Test 6 int n tmp10 tmp11 scale Factor1 data Unit c0 n scale Factor2 if n 0 n scale Factor2 0 data Unit c0 n tmp10 tmp11 scale Factor1 data Unit c4 n scale Factor2 if n 0 n scale Factor2 0 data Unit c4 int z1 tmp12 tmp13 FIX 0 541196100 scale Factor1 Extend Test 18 scale Factor2 Extend Test 19 n z1 tmp13 FIX 0 765366865 scale Factor1 data Unit c2 n scale Factor2 if n 0 n scale Factor2 0 data Unit c2 n z1 tmp12 0 FIX 1 847759065 scale Factor1 data Unit c6 n scale Factor2 if n 0 n scale Factor2 0 data Unit c6 Odd part per figure 8 note paper omits factor of sqrt 2 cK represents cos K pi 16 i0 i3 in the paper are tmp4 tmp7 here z1 tmp4 tmp7 int z2 tmp5 tmp6 int z3 tmp4 tmp6 int z4 tmp5 tmp7 int z5 z3 z4 FIX 1 175875602 sqrt 2 c3 tmp4 tmp4 FIX 0 298631336 sqrt 2 c1 c3 c5 c7 tmp5 tmp5 FIX 2 053119869 sqrt 2 c1 c3 c5 c7 tmp6 tmp6 FIX 3 072711026 sqrt 2 c1 c3 c5 c7 tmp7 tmp7 FIX 1 501321110 sqrt 2 c1 c3 c5 c7 z1 z1 0 FIX 0 899976223 sqrt 2 c7 c3 z2 z2 0 FIX 2 562915447 sqrt 2 c1 c3 z3 z3 0 FIX 1 961570560 sqrt 2 c3 c5 z4 z4 0 FIX 0 390180644 sqrt 2 c5 c3 z3 z3 z5 z4 z4 z5 n tmp4 z1 z3 scale Factor1 data Unit c7 n scale Factor2 if n 0 n scale Factor2 0 data Unit c7 n tmp5 z2 z4 scale Factor1 data Unit c5 n scale Factor2 if n 0 n scale Factor2 0 data Unit c5 n tmp6 z2 z3 scale Factor1 data Unit c3 n scale Factor2 if n 0 n scale Factor2 0 data Unit c3 n tmp7 z1 z4 scale Factor1 data Unit c1 n scale Factor2 if n 0 n scale Factor2 0 data Unit c1  dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex FIX_0_541196100 scaleFactor1 ExtendTest scaleFactor2 ExtendTest FIX_0_765366865 scaleFactor1 dataUnit rIndex scaleFactor2 scaleFactor2 dataUnit rIndex FIX_1_847759065 scaleFactor1 dataUnit rIndex scaleFactor2 scaleFactor2 dataUnit rIndex FIX_1_175875602 FIX_0_298631336 FIX_2_053119869 FIX_3_072711026 FIX_1_501321110 FIX_0_899976223 FIX_2_562915447 FIX_1_961570560 FIX_0_390180644 scaleFactor1 dataUnit rIndex scaleFactor2 scaleFactor2 dataUnit rIndex scaleFactor1 dataUnit rIndex scaleFactor2 scaleFactor2 dataUnit rIndex scaleFactor1 dataUnit rIndex scaleFactor2 scaleFactor2 dataUnit rIndex scaleFactor1 dataUnit rIndex scaleFactor2 scaleFactor2 dataUnit rIndex PASS1_BITS dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit scaleFactor1 ExtendTest scaleFactor2 ExtendTest scaleFactor1 dataUnit scaleFactor2 scaleFactor2 dataUnit scaleFactor1 dataUnit scaleFactor2 scaleFactor2 dataUnit FIX_0_541196100 scaleFactor1 ExtendTest scaleFactor2 ExtendTest FIX_0_765366865 scaleFactor1 dataUnit scaleFactor2 scaleFactor2 dataUnit FIX_1_847759065 scaleFactor1 dataUnit scaleFactor2 scaleFactor2 dataUnit FIX_1_175875602 FIX_0_298631336 FIX_2_053119869 FIX_3_072711026 FIX_1_501321110 FIX_0_899976223 FIX_2_562915447 FIX_1_961570560 FIX_0_390180644 scaleFactor1 dataUnit scaleFactor2 scaleFactor2 dataUnit scaleFactor1 dataUnit scaleFactor2 scaleFactor2 dataUnit scaleFactor1 dataUnit scaleFactor2 scaleFactor2 dataUnit scaleFactor1 dataUnit scaleFactor2 scaleFactor2 dataUnit
void getAPP0 JPEG Appn appn new JPEG Appn input Stream if appn verify SWT error SWT ERROR INVALID IMAGE  JPEGAppn JPEGAppn inputStream ERROR_INVALID_IMAGE
void getCOM new JPEG Comment input Stream  JPEGComment inputStream
new JPEG Comment input Stream void getDAC JPEG Arithmetic Conditioning Table dac new JPEG Arithmetic Conditioning Table input Stream arithmetic Tables dac  JPEGComment inputStream JPEGArithmeticConditioningTable JPEGArithmeticConditioningTable inputStream arithmeticTables
void getDHT JPEG Huffman Table dht new JPEG Huffman Table input Stream if dht verify SWT error SWT ERROR INVALID IMAGE if ac Huffman Tables null ac Huffman Tables new JPEG Huffman Table 4 if dc Huffman Tables null dc Huffman Tables new JPEG Huffman Table 4 JPEG Huffman Table dht Tables dht get All Tables for int i 0 i dht Tables length i JPEG Huffman Table dht Table dht Tables i if dht Table get Table Class 0 dc Huffman Tables dht Table get Table Identifier dht Table else ac Huffman Tables dht Table get Table Identifier dht Table  JPEGHuffmanTable JPEGHuffmanTable inputStream ERROR_INVALID_IMAGE acHuffmanTables acHuffmanTables JPEGHuffmanTable dcHuffmanTables dcHuffmanTables JPEGHuffmanTable JPEGHuffmanTable dhtTables getAllTables dhtTables JPEGHuffmanTable dhtTable dhtTables dhtTable getTableClass dcHuffmanTables dhtTable getTableIdentifier dhtTable acHuffmanTables dhtTable getTableIdentifier dhtTable
void getDNL new JPEG Restart Interval input Stream  JPEGRestartInterval inputStream
void getDQT JPEG Quantization Table dqt new JPEG Quantization Table input Stream int current Tables quantization Tables if current Tables null current Tables new int 4 int dqt Tables Keys dqt get Quantization Tables Keys int dqt Tables Values dqt get Quantization Tables Values for int i 0 i dqt Tables Keys length i int index dqt Tables Keys i current Tables index dqt Tables Values i quantization Tables current Tables  JPEGQuantizationTable JPEGQuantizationTable inputStream currentTables quantizationTables currentTables currentTables dqtTablesKeys getQuantizationTablesKeys dqtTablesValues getQuantizationTablesValues dqtTablesKeys dqtTablesKeys currentTables dqtTablesValues quantizationTables currentTables
void getDRI JPEG Restart Interval dri new JPEG Restart Interval input Stream if dri verify SWT error SWT ERROR INVALID IMAGE restart Interval dri get Restart Interval  JPEGRestartInterval JPEGRestartInterval inputStream ERROR_INVALID_IMAGE restartInterval getRestartInterval
static void initialize initializeRGBY Cb Cr Tables initializeY Cb CrRGB Tables initialize Bit Count Table  initializeRGBYCbCrTables initializeYCbCrRGBTables initializeBitCountTable
static void initialize Bit Count Table int n Bits 1 int power2 2 N Bits Table new int 2048 N Bits Table 0 0 for int i 1 i N Bits Table length i if i power2 n Bits power2 2 N Bits Table i n Bits  initializeBitCountTable nBits NBitsTable NBitsTable NBitsTable nBits NBitsTable nBits
static void initializeRGBY Cb Cr Tables RY Table new int 256 GY Table new int 256 BY Table new int 256 R Cb Table new int 256 G Cb Table new int 256 B Cb Table new int 256 R Cr Table B Cb Table G Cr Table new int 256 B Cr Table new int 256 for int i 0 i 256 i RY Table i i 19595 GY Table i i 38470 BY Table i i 7471 32768 R Cb Table i i 11059 G Cb Table i i 21709 B Cb Table i i 32768 8388608 G Cr Table i i 27439 B Cr Table i i 5329  initializeRGBYCbCrTables RYTable GYTable BYTable RCbTable GCbTable BCbTable RCrTable BCbTable GCrTable BCrTable RYTable GYTable BYTable RCbTable GCbTable BCbTable GCrTable BCrTable
static void initializeY Cb CrRGB Tables CrR Table new int 256 CbB Table new int 256 CrG Table new int 256 CbG Table new int 256 for int i 0 i 256 i int x2 2 i 255 CrR Table i 45941 x2 32768 65536 CbB Table i 58065 x2 32768 65536 CrG Table i 23401 x2 CbG Table i 11277 x2 32768  initializeYCbCrRGBTables CrRTable CbBTable CrGTable CbGTable CrRTable CbBTable CrGTable CbGTable
void inverseDCT int data Unit for int row 0 row 8 row int r Index row DCTSIZE Due to quantization we will usually find that many of the input coefficients are zero especially the AC terms We can exploit this by short circuiting the IDCT calculation for any row in which all the AC terms are zero In that case each output is equal to the DC coefficient with scale factor as needed With typical images and quantization tables half or more of the row DCT calculations can be simplified this way if is Zero In Row data Unit r Index int dc Val data Unit r Index 4 for int i r Index i r Index 8 i data Unit i dc Val else Even part reverse the even part of the forward DCT The rotator is sqrt 2 c 6 int z2 data Unit r Index 2 int z3 data Unit r Index 6 int z1 z2 z3 FIX 0 541196100 int tmp2 z1 z3 0 FIX 1 847759065 int tmp3 z1 z2 FIX 0 765366865 int tmp0 data Unit r Index data Unit r Index 4 8192 int tmp1 data Unit r Index data Unit r Index 4 8192 int tmp10 tmp0 tmp3 int tmp13 tmp0 tmp3 int tmp11 tmp1 tmp2 int tmp12 tmp1 tmp2 Odd part per figure 8 the matrix is unitary and hence its transpose is its inverse i0 i3 are y7 y5 y3 y1 respectively tmp0 data Unit r Index 7 tmp1 data Unit r Index 5 tmp2 data Unit r Index 3 tmp3 data Unit r Index 1 z1 tmp0 tmp3 z2 tmp1 tmp2 z3 tmp0 tmp2 int z4 tmp1 tmp3 int z5 z3 z4 FIX 1 175875602 sqrt 2 c3 tmp0 tmp0 FIX 0 298631336 sqrt 2 c1 c3 c5 c7 tmp1 tmp1 FIX 2 053119869 sqrt 2 c1 c3 c5 c7 tmp2 tmp2 FIX 3 072711026 sqrt 2 c1 c3 c5 c7 tmp3 tmp3 FIX 1 501321110 sqrt 2 c1 c3 c5 c7 z1 z1 0 FIX 0 899976223 sqrt 2 c7 c3 z2 z2 0 FIX 2 562915447 sqrt 2 c1 c3 z3 z3 0 FIX 1 961570560 sqrt 2 c3 c5 z4 z4 0 FIX 0 390180644 sqrt 2 c5 c3 z3 z3 z5 z4 z4 z5 tmp0 tmp0 z1 z3 tmp1 tmp1 z2 z4 tmp2 tmp2 z2 z3 tmp3 tmp3 z1 z4 int descale Factor1 Extend Test 11 int descale Factor2 Extend Test 12 data Unit r Index tmp10 tmp3 descale Factor1 descale Factor2 data Unit r Index 7 tmp10 tmp3 descale Factor1 descale Factor2 data Unit r Index 1 tmp11 tmp2 descale Factor1 descale Factor2 data Unit r Index 6 tmp11 tmp2 descale Factor1 descale Factor2 data Unit r Index 2 tmp12 tmp1 descale Factor1 descale Factor2 data Unit r Index 5 tmp12 tmp1 descale Factor1 descale Factor2 data Unit r Index 3 tmp13 tmp0 descale Factor1 descale Factor2 data Unit r Index 4 tmp13 tmp0 descale Factor1 descale Factor2 Pass 2 process columns Note that we must descale the results by a factor of 8 2 3 and also undo the PASS1 BITS scaling for int col 0 col 8 col int c0 col int c1 col 8 int c2 col 16 int c3 col 24 int c4 col 32 int c5 col 40 int c6 col 48 int c7 col 56 if is Zero In Column data Unit col int dc Val data Unit c0 16 32 data Unit c0 dc Val data Unit c1 dc Val data Unit c2 dc Val data Unit c3 dc Val data Unit c4 dc Val data Unit c5 dc Val data Unit c6 dc Val data Unit c7 dc Val else Even part reverse the even part of the forward DCT The rotator is sqrt 2 c 6 int z2 data Unit c2 int z3 data Unit c6 int z1 z2 z3 FIX 0 541196100 int tmp2 z1 z3 0 FIX 1 847759065 int tmp3 z1 z2 FIX 0 765366865 int tmp0 data Unit c0 data Unit c4 8192 int tmp1 data Unit c0 data Unit c4 8192 int tmp10 tmp0 tmp3 int tmp13 tmp0 tmp3 int tmp11 tmp1 tmp2 int tmp12 tmp1 tmp2 Odd part per figure 8 the matrix is unitary and hence its transpose is its inverse i0 i3 are y7 y5 y3 y1 respectively tmp0 data Unit c7 tmp1 data Unit c5 tmp2 data Unit c3 tmp3 data Unit c1 z1 tmp0 tmp3 z2 tmp1 tmp2 z3 tmp0 tmp2 int z4 tmp1 tmp3 int z5 z3 z4 FIX 1 175875602 sqrt 2 c3 tmp0 tmp0 FIX 0 298631336 sqrt 2 c1 c3 c5 c7 tmp1 tmp1 FIX 2 053119869 sqrt 2 c1 c3 c5 c7 tmp2 tmp2 FIX 3 072711026 sqrt 2 c1 c3 c5 c7 tmp3 tmp3 FIX 1 501321110 sqrt 2 c1 c3 c5 c7 z1 z1 0 FIX 0 899976223 sqrt 2 c7 c3 z2 z2 0 FIX 2 562915447 sqrt 2 c1 c3 z3 z3 0 FIX 1 961570560 sqrt 2 c3 c5 z4 z4 0 FIX 0 390180644 sqrt 2 c5 c3 z3 z3 z5 z4 z4 z5 tmp0 tmp0 z1 z3 tmp1 tmp1 z2 z4 tmp2 tmp2 z2 z3 tmp3 tmp3 z1 z4 Final output stage inputs are tmp10 tmp13 tmp0 tmp3 int descale Factor1 Extend Test 18 int descale Factor2 Extend Test 19 data Unit c0 tmp10 tmp3 descale Factor1 descale Factor2 data Unit c7 tmp10 tmp3 descale Factor1 descale Factor2 data Unit c1 tmp11 tmp2 descale Factor1 descale Factor2 data Unit c6 tmp11 tmp2 descale Factor1 descale Factor2 data Unit c2 tmp12 tmp1 descale Factor1 descale Factor2 data Unit c5 tmp12 tmp1 descale Factor1 descale Factor2 data Unit c3 tmp13 tmp0 descale Factor1 descale Factor2 data Unit c4 tmp13 tmp0 descale Factor1 descale Factor2  dataUnit rIndex isZeroInRow dataUnit rIndex dcVal dataUnit rIndex rIndex rIndex dataUnit dcVal dataUnit rIndex dataUnit rIndex FIX_0_541196100 FIX_1_847759065 FIX_0_765366865 dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex FIX_1_175875602 FIX_0_298631336 FIX_2_053119869 FIX_3_072711026 FIX_1_501321110 FIX_0_899976223 FIX_2_562915447 FIX_1_961570560 FIX_0_390180644 descaleFactor1 ExtendTest descaleFactor2 ExtendTest dataUnit rIndex descaleFactor1 descaleFactor2 dataUnit rIndex descaleFactor1 descaleFactor2 dataUnit rIndex descaleFactor1 descaleFactor2 dataUnit rIndex descaleFactor1 descaleFactor2 dataUnit rIndex descaleFactor1 descaleFactor2 dataUnit rIndex descaleFactor1 descaleFactor2 dataUnit rIndex descaleFactor1 descaleFactor2 dataUnit rIndex descaleFactor1 descaleFactor2 PASS1_BITS isZeroInColumn dataUnit dcVal dataUnit dataUnit dcVal dataUnit dcVal dataUnit dcVal dataUnit dcVal dataUnit dcVal dataUnit dcVal dataUnit dcVal dataUnit dcVal dataUnit dataUnit FIX_0_541196100 FIX_1_847759065 FIX_0_765366865 dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit FIX_1_175875602 FIX_0_298631336 FIX_2_053119869 FIX_3_072711026 FIX_1_501321110 FIX_0_899976223 FIX_2_562915447 FIX_1_961570560 FIX_0_390180644 descaleFactor1 ExtendTest descaleFactor2 ExtendTest dataUnit descaleFactor1 descaleFactor2 dataUnit descaleFactor1 descaleFactor2 dataUnit descaleFactor1 descaleFactor2 dataUnit descaleFactor1 descaleFactor2 dataUnit descaleFactor1 descaleFactor2 dataUnit descaleFactor1 descaleFactor2 dataUnit descaleFactor1 descaleFactor2 dataUnit descaleFactor1 descaleFactor2
boolean is File Format LE Data Input Stream stream try JPEG Start Of Image soi new JPEG Start Of Image stream stream unread soi reference return soi verify we no longer check for appN catch Exception e return false  isFileFormat LEDataInputStream JPEGStartOfImage JPEGStartOfImage
boolean is Zero In Column int data Unit int col return data Unit col 8 data Unit col 16 data Unit col 24 data Unit col 32 data Unit col 40 data Unit col 48 data Unit col 56 0  isZeroInColumn dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit dataUnit
boolean is Zero In Row int data Unit int r Index return data Unit r Index 1 data Unit r Index 2 data Unit r Index 3 data Unit r Index 4 data Unit r Index 5 data Unit r Index 6 data Unit r Index 7 0  isZeroInRow dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex dataUnit rIndex
Image Data load From Byte Stream JPEG Start Of Image soi new JPEG Start Of Image input Stream if soi verify SWT error SWT ERROR INVALID IMAGE restart Interval 0 Process the tables preceding the frame header process Tables Start of Frame frame Header new JPEG Frame Header input Stream if frame Header verify SWT error SWT ERROR INVALID IMAGE image Width frame Header get Samples Per Line image Height frame Header get Number Of Lines maxH frame Header get MaxH Factor maxV frame Header get MaxV Factor int mcu Width maxH DCTSIZE int mcu Height maxV DCTSIZE interleaved Mcu Cols image Width mcu Width 1 mcu Width interleaved Mcu Rows image Height mcu Height 1 mcu Height progressive frame Header is Progressive sample Precision frame Header get Sample Precision n Components frame Header get Number Of Image Components frame Components frame Header component Parameters component Ids frame Header component Identifiers image Components new byte n Components if progressive Progressive jpeg need to keep all of the data units data Units new int n Components else Sequential jpeg only need one data unit data Unit new int 8 8 for int i 0 i n Components i int frame Component frame Components component Ids i int buffer Size frame Component CW frame Component CH image Components i new byte buffer Size if progressive data Units i new int buffer Size Process the tables preceding the scan header process Tables Start of Scan scan Header new JPEG Scan Header input Stream if scan Header verify SWT error SWT ERROR INVALID IMAGE Process scan s and further tables until EOI int progressive Scan Count 0 boolean done false while done reset Input Buffer precedingD Cs new int 4 decode Scan if progressive loader has Listeners Image Data image Data create Image Data loader notify Listeners new Image Loader Event loader image Data progressive Scan Count false progressive Scan Count Unread any buffered data before looking for tables again int delta 512 buffer Current Position 1 if delta 0 byte unread Buffer new byte delta System arraycopy data Buffer buffer Current Position 1 unread Buffer 0 delta try input Stream unread unread Buffer catch IO Exception e SWT error SWT ERROR IO e Process the tables preceding the next scan header JPEG Segment jpeg Segment process Tables if jpeg Segment null jpeg Segment get Segment Marker EOI done true else scan Header new JPEG Scan Header input Stream if scan Header verify SWT error SWT ERROR INVALID IMAGE if progressive for int ymcu 0 ymcu interleaved Mcu Rows ymcu for int xmcu 0 xmcu interleaved Mcu Cols xmcu for int i Comp 0 i Comp n Components i Comp int frame Component frame Components component Ids i Comp int hi frame Component HI int vi frame Component VI int comp Width frame Component CW for int ivi 0 ivi vi ivi for int ihi 0 ihi hi ihi int index ymcu vi ivi comp Width xmcu hi ihi data Unit data Units i Comp index dequantize data Unit i Comp inverseDCT data Unit store Data data Unit i Comp xmcu ymcu hi ihi vi ivi Image Data image Data create Image Data if progressive loader has Listeners loader notify Listeners new Image Loader Event loader image Data progressive Scan Count true return new Image Data image Data  ImageData loadFromByteStream JPEGStartOfImage JPEGStartOfImage inputStream ERROR_INVALID_IMAGE restartInterval processTables frameHeader JPEGFrameHeader inputStream frameHeader ERROR_INVALID_IMAGE imageWidth frameHeader getSamplesPerLine imageHeight frameHeader getNumberOfLines frameHeader getMaxHFactor frameHeader getMaxVFactor mcuWidth mcuHeight interleavedMcuCols imageWidth mcuWidth mcuWidth interleavedMcuRows imageHeight mcuHeight mcuHeight frameHeader isProgressive samplePrecision frameHeader getSamplePrecision nComponents frameHeader getNumberOfImageComponents frameComponents frameHeader componentParameters componentIds frameHeader componentIdentifiers imageComponents nComponents dataUnits nComponents dataUnit nComponents frameComponent frameComponents componentIds bufferSize frameComponent frameComponent imageComponents bufferSize dataUnits bufferSize processTables scanHeader JPEGScanHeader inputStream scanHeader ERROR_INVALID_IMAGE progressiveScanCount resetInputBuffer precedingDCs decodeScan hasListeners ImageData imageData createImageData notifyListeners ImageLoaderEvent imageData progressiveScanCount progressiveScanCount bufferCurrentPosition unreadBuffer dataBuffer bufferCurrentPosition unreadBuffer inputStream unreadBuffer IOException ERROR_IO JPEGSegment jpegSegment processTables jpegSegment jpegSegment getSegmentMarker scanHeader JPEGScanHeader inputStream scanHeader ERROR_INVALID_IMAGE interleavedMcuRows interleavedMcuCols iComp iComp nComponents iComp frameComponent frameComponents componentIds iComp frameComponent frameComponent compWidth frameComponent compWidth dataUnit dataUnits iComp dataUnit iComp dataUnit storeData dataUnit iComp ImageData imageData createImageData hasListeners notifyListeners ImageLoaderEvent imageData progressiveScanCount ImageData imageData
Image Data create Image Data return Image Data internal new image Width image Height n Components sample Precision set Up Palette n Components 1 4 1 decode Image Components 0 null null 1 1 SWT IMAGE JPEG 0 0 0 0  ImageData createImageData ImageData internal_new imageWidth imageHeight nComponents samplePrecision setUpPalette nComponents decodeImageComponents IMAGE_JPEG
int next Bit if current Bit Count 0 current Bit Count current Byte 2 if current Byte 255 current Byte 256 return 1 else return 0 buffer Current Position if buffer Current Position 512 reset Input Buffer buffer Current Position 0 current Byte data Buffer buffer Current Position 0xFF current Bit Count 8 byte next Byte if buffer Current Position 511 reset Input Buffer current Bit Count 8 next Byte data Buffer 0 else next Byte data Buffer buffer Current Position 1 if current Byte 0xFF if next Byte 0 buffer Current Position current Bit Count current Byte 2 if current Byte 255 current Byte 256 return 1 else return 0 else if next Byte 0xFF 0xFF00 DNL getDNL return 0 else SWT error SWT ERROR INVALID IMAGE return 0 else current Bit Count current Byte 2 if current Byte 255 current Byte 256 return 1 else return 0  nextBit currentBitCount currentBitCount currentByte currentByte currentByte bufferCurrentPosition bufferCurrentPosition resetInputBuffer bufferCurrentPosition currentByte dataBuffer bufferCurrentPosition currentBitCount nextByte bufferCurrentPosition resetInputBuffer currentBitCount nextByte dataBuffer nextByte dataBuffer bufferCurrentPosition currentByte nextByte bufferCurrentPosition currentBitCount currentByte currentByte currentByte nextByte ERROR_INVALID_IMAGE currentBitCount currentByte currentByte currentByte
void process Restart Interval do buffer Current Position if buffer Current Position 511 reset Input Buffer buffer Current Position 0 current Byte data Buffer buffer Current Position 0xFF while current Byte 0xFF while current Byte 0xFF buffer Current Position if buffer Current Position 511 reset Input Buffer buffer Current Position 0 current Byte data Buffer buffer Current Position 0xFF if current Byte RST0 next Restart Number 256 SWT error SWT ERROR INVALID IMAGE buffer Current Position if buffer Current Position 511 reset Input Buffer buffer Current Position 0 current Byte data Buffer buffer Current Position 0xFF current Bit Count 8 restarts To Go restart Interval next Restart Number next Restart Number 1 8 precedingD Cs new int 4 eobrun 0  processRestartInterval bufferCurrentPosition bufferCurrentPosition resetInputBuffer bufferCurrentPosition currentByte dataBuffer bufferCurrentPosition currentByte currentByte bufferCurrentPosition bufferCurrentPosition resetInputBuffer bufferCurrentPosition currentByte dataBuffer bufferCurrentPosition currentByte nextRestartNumber ERROR_INVALID_IMAGE bufferCurrentPosition bufferCurrentPosition resetInputBuffer bufferCurrentPosition currentByte dataBuffer bufferCurrentPosition currentBitCount restartsToGo restartInterval nextRestartNumber nextRestartNumber precedingDCs
Process all markers until a frame header scan header or EOI is found JPEG Segment process Tables while true JPEG Segment jpeg Segment seek Unspecified Marker input Stream if jpeg Segment null return null JPEG Frame Header sof new JPEG Frame Header jpeg Segment reference if sof verify return jpeg Segment int marker jpeg Segment get Segment Marker switch marker case SOI there should only be one SOI per file SWT error SWT ERROR INVALID IMAGE case EOI case SOS return jpeg Segment case DQT getDQT break case DHT getDHT break case DAC getDAC break case DRI getDRI break case APP0 getAPP0 break case COM getCOM break default skip Segment From input Stream  JPEGSegment processTables JPEGSegment jpegSegment seekUnspecifiedMarker inputStream jpegSegment JPEGFrameHeader JPEGFrameHeader jpegSegment jpegSegment jpegSegment getSegmentMarker ERROR_INVALID_IMAGE jpegSegment skipSegmentFrom inputStream
void quantize Data int data Unit int i Comp int q Table quantization Tables frame Components component Ids i Comp TQI for int i 0 i data Unit length i int zz Index Zig Zag8x8 i int data data Unit zz Index int abs Data data 0 0 data data int q Value q Table i int q2 q Value 2 abs Data q2 if abs Data q Value data Unit zz Index 0 else abs Data q Value if data 0 data Unit zz Index abs Data else data Unit zz Index 0 abs Data  quantizeData dataUnit iComp qTable quantizationTables frameComponents componentIds iComp dataUnit zzIndex ZigZag8x8 dataUnit zzIndex absData qValue qTable qValue absData absData qValue dataUnit zzIndex absData qValue dataUnit zzIndex absData dataUnit zzIndex absData
int receive int n Bits int v 0 for int i 0 i n Bits i v v 2 next Bit return v  nBits nBits nextBit
void reset Input Buffer if data Buffer null data Buffer new byte 512 try input Stream read data Buffer catch IO Exception e SWT error SWT ERROR IO e current Bit Count 0 buffer Current Position 1  resetInputBuffer dataBuffer dataBuffer inputStream dataBuffer IOException ERROR_IO currentBitCount bufferCurrentPosition
void reset Output Buffer if data Buffer null data Buffer new byte 512 else try output Stream write data Buffer 0 buffer Current Position catch IO Exception e SWT error SWT ERROR IO e buffer Current Position 0  resetOutputBuffer dataBuffer dataBuffer outputStream dataBuffer bufferCurrentPosition IOException ERROR_IO bufferCurrentPosition
static JPEG Segment seek Unspecified Marker LE Data Input Stream byte Stream byte byte Array new byte 2 try while true if byte Stream read byte Array 0 1 1 return null if byte Array 0 byte 0xFF if byte Stream read byte Array 1 1 1 return null if byte Array 1 byte 0xFF byte Array 1 0 byte Stream unread byte Array return new JPEG Segment byte Array catch IO Exception e SWT error SWT ERROR IO e return null  JPEGSegment seekUnspecifiedMarker LEDataInputStream byteStream byteArray byteStream byteArray byteArray byteStream byteArray byteArray byteArray byteStream byteArray JPEGSegment byteArray IOException ERROR_IO
Palette Data set Up Palette if n Components 1 RGB entries new RGB 256 for int i 0 i 256 i entries i new RGB i i i return new Palette Data entries return new Palette Data 0xFF 0xFF00 0xFF0000  PaletteData setUpPalette nComponents PaletteData PaletteData
static void skip Segment From LE Data Input Stream byte Stream try byte byte Array new byte 4 JPEG Segment jpeg Segment new JPEG Segment byte Array if byte Stream read byte Array byte Array length SWT error SWT ERROR INVALID IMAGE if byte Array 0 1 byte Array 1 0 byte Array 1 1 SWT error SWT ERROR INVALID IMAGE int delta jpeg Segment get Segment Length 2 byte Stream skip delta catch Exception e SWT error SWT ERROR IO e  skipSegmentFrom LEDataInputStream byteStream byteArray JPEGSegment jpegSegment JPEGSegment byteArray byteStream byteArray byteArray ERROR_INVALID_IMAGE byteArray byteArray byteArray ERROR_INVALID_IMAGE jpegSegment getSegmentLength byteStream ERROR_IO
void store Data int data Unit int i Comp int xmcu int ymcu int hi int ihi int vi int ivi byte comp Image image Components i Comp int frame Component frame Components component Ids i Comp int comp Width frame Component CW int dest Index ymcu vi ivi comp Width DCTSIZE xmcu hi ihi DCTSIZE int src Index 0 for int i 0 i DCTSIZE i for int col 0 col DCTSIZE col int x data Unit src Index 128 if x 0 x 0 else if x 255 x 255 comp Image dest Index col byte x src Index dest Index comp Width  storeData dataUnit iComp compImage imageComponents iComp frameComponent frameComponents componentIds iComp compWidth frameComponent destIndex compWidth srcIndex dataUnit srcIndex compImage destIndex srcIndex destIndex compWidth
void unload Into Byte Stream Image Data image if new JPEG Start Of Image write To Stream output Stream SWT error SWT ERROR IO JPEG Appn appn new JPEG Appn new byte byte 0xFF byte 0xE0 0 0x10 0x4A 0x46 0x49 0x46 0 1 1 0 0 1 0 1 0 0 if appn write To Stream output Stream SWT error SWT ERROR IO quantization Tables new int 4 JPEG Quantization Table chromDQT JPEG Quantization Table default Chrominance Table chromDQT scale By encoderQ Factor int jpegDQT Keys chromDQT get Quantization Tables Keys int jpegDQT Values chromDQT get Quantization Tables Values for int i 0 i jpegDQT Keys length i quantization Tables jpegDQT Keys i jpegDQT Values i JPEG Quantization Table lumDQT JPEG Quantization Table default Luminance Table lumDQT scale By encoderQ Factor jpegDQT Keys lumDQT get Quantization Tables Keys jpegDQT Values lumDQT get Quantization Tables Values for int i 0 i jpegDQT Keys length i quantization Tables jpegDQT Keys i jpegDQT Values i if lumDQT write To Stream output Stream SWT error SWT ERROR IO if chromDQT write To Stream output Stream SWT error SWT ERROR IO int frame Length scan Length precision int frame Params scan Params if image depth 1 frame Length 11 frame Params new int 1 frame Params 0 new int 1 1 1 0 0 scan Params new int 1 scan Params 0 new int 0 0 scan Length 8 n Components 1 precision 1 else frame Length 17 frame Params new int 3 frame Params 0 new int 0 2 2 0 0 frame Params 1 new int 1 1 1 0 0 frame Params 2 new int 1 1 1 0 0 scan Params new int 3 scan Params 0 new int 0 0 scan Params 1 new int 1 1 scan Params 2 new int 1 1 scan Length 12 n Components 3 precision 8 image Width image width image Height image height frame Header new JPEG Frame Header new byte 19 frame Header set Segment Marker SOF0 frame Header set Segment Length frame Length frame Header set Sample Precision precision frame Header set Samples Per Line image Width frame Header set Number Of Lines image Height frame Header set Number Of Image Components n Components frame Header component Parameters frame Params frame Header component Identifiers new int 0 1 2 frame Header initialize Contents if frame Header write To Stream output Stream SWT error SWT ERROR IO frame Components frame Params component Ids frame Header component Identifiers maxH frame Header get MaxH Factor maxV frame Header get MaxV Factor int mcu Width maxH DCTSIZE int mcu Height maxV DCTSIZE interleaved Mcu Cols image Width mcu Width 1 mcu Width interleaved Mcu Rows image Height mcu Height 1 mcu Height ac Huffman Tables new JPEG Huffman Table 4 dc Huffman Tables new JPEG Huffman Table 4 JPEG Huffman Table dht Tables new JPEG Huffman Table JPEG Huffman Table get DefaultDC Luminance Table JPEG Huffman Table get DefaultDC Chrominance Table JPEG Huffman Table get DefaultAC Luminance Table JPEG Huffman Table get DefaultAC Chrominance Table for int i 0 i dht Tables length i JPEG Huffman Table dht Table dht Tables i if dht Table write To Stream output Stream SWT error SWT ERROR IO JPEG Huffman Table all Tables dht Table get All Tables for int j 0 j all Tables length j JPEG Huffman Table huffman Table all Tables j if huffman Table get Table Class 0 dc Huffman Tables huffman Table get Table Identifier huffman Table else ac Huffman Tables huffman Table get Table Identifier huffman Table precedingD Cs new int 4 scan Header new JPEG Scan Header new byte 14 scan Header set Segment Marker SOS scan Header set Segment Length scan Length scan Header set Number Of Image Components n Components scan Header set Start Of Spectral Selection 0 scan Header set End Of Spectral Selection 63 scan Header component Parameters scan Params scan Header initialize Contents if scan Header write To Stream output Stream SWT error SWT ERROR IO convert Image ToY Cb Cr image reset Output Buffer current Byte 0 current Bit Count 0 encode Scan if new JPEG End Of Image write To Stream output Stream SWT error SWT ERROR IO  unloadIntoByteStream ImageData JPEGStartOfImage writeToStream outputStream ERROR_IO JPEGAppn JPEGAppn writeToStream outputStream ERROR_IO quantizationTables JPEGQuantizationTable JPEGQuantizationTable defaultChrominanceTable scaleBy encoderQFactor jpegDQTKeys getQuantizationTablesKeys jpegDQTValues getQuantizationTablesValues jpegDQTKeys quantizationTables jpegDQTKeys jpegDQTValues JPEGQuantizationTable JPEGQuantizationTable defaultLuminanceTable scaleBy encoderQFactor jpegDQTKeys getQuantizationTablesKeys jpegDQTValues getQuantizationTablesValues jpegDQTKeys quantizationTables jpegDQTKeys jpegDQTValues writeToStream outputStream ERROR_IO writeToStream outputStream ERROR_IO frameLength scanLength frameParams scanParams frameLength frameParams frameParams scanParams scanParams scanLength nComponents frameLength frameParams frameParams frameParams frameParams scanParams scanParams scanParams scanParams scanLength nComponents imageWidth imageHeight frameHeader JPEGFrameHeader frameHeader setSegmentMarker frameHeader setSegmentLength frameLength frameHeader setSamplePrecision frameHeader setSamplesPerLine imageWidth frameHeader setNumberOfLines imageHeight frameHeader setNumberOfImageComponents nComponents frameHeader componentParameters frameParams frameHeader componentIdentifiers frameHeader initializeContents frameHeader writeToStream outputStream ERROR_IO frameComponents frameParams componentIds frameHeader componentIdentifiers frameHeader getMaxHFactor frameHeader getMaxVFactor mcuWidth mcuHeight interleavedMcuCols imageWidth mcuWidth mcuWidth interleavedMcuRows imageHeight mcuHeight mcuHeight acHuffmanTables JPEGHuffmanTable dcHuffmanTables JPEGHuffmanTable JPEGHuffmanTable dhtTables JPEGHuffmanTable JPEGHuffmanTable getDefaultDCLuminanceTable JPEGHuffmanTable getDefaultDCChrominanceTable JPEGHuffmanTable getDefaultACLuminanceTable JPEGHuffmanTable getDefaultACChrominanceTable dhtTables JPEGHuffmanTable dhtTable dhtTables dhtTable writeToStream outputStream ERROR_IO JPEGHuffmanTable allTables dhtTable getAllTables allTables JPEGHuffmanTable huffmanTable allTables huffmanTable getTableClass dcHuffmanTables huffmanTable getTableIdentifier huffmanTable acHuffmanTables huffmanTable getTableIdentifier huffmanTable precedingDCs scanHeader JPEGScanHeader scanHeader setSegmentMarker scanHeader setSegmentLength scanLength scanHeader setNumberOfImageComponents nComponents scanHeader setStartOfSpectralSelection scanHeader setEndOfSpectralSelection scanHeader componentParameters scanParams scanHeader initializeContents scanHeader writeToStream outputStream ERROR_IO convertImageToYCbCr resetOutputBuffer currentByte currentBitCount encodeScan JPEGEndOfImage writeToStream outputStream ERROR_IO

abstract class JPEG Fixed Size Segment extends JPEG Segment public JPEG Fixed Size Segment reference new byte fixed Size set Segment Marker signature  JPEGFixedSizeSegment JPEGSegment JPEGFixedSizeSegment fixedSize setSegmentMarker
public JPEG Fixed Size Segment byte reference super reference  JPEGFixedSizeSegment
public JPEG Fixed Size Segment LE Data Input Stream byte Stream reference new byte fixed Size try byte Stream read reference catch Exception e SWT error SWT ERROR IO e  JPEGFixedSizeSegment LEDataInputStream byteStream fixedSize byteStream ERROR_IO
abstract public int fixed Size  fixedSize
abstract public int fixed Size public int get Segment Length return fixed Size 2  fixedSize getSegmentLength fixedSize
public void set Segment Length int length  setSegmentLength

public int component Parameters public JPEG Frame Header byte reference super reference  componentParameters JPEGFrameHeader
public JPEG Frame Header LE Data Input Stream byte Stream super byte Stream initialize Component Parameters  JPEGFrameHeader LEDataInputStream byteStream byteStream initializeComponentParameters
public int get Sample Precision return reference 4 0xFF  getSamplePrecision
public int get Number Of Lines return reference 5 0xFF 8 reference 6 0xFF  getNumberOfLines
public int get Samples Per Line return reference 7 0xFF 8 reference 8 0xFF  getSamplesPerLine
public int get Number Of Image Components return reference 9 0xFF  getNumberOfImageComponents
public void set Sample Precision int precision reference 4 byte precision 0xFF  setSamplePrecision
public void set Number Of Lines int an Integer reference 5 byte an Integer 0xFF00 8 reference 6 byte an Integer 0xFF  setNumberOfLines anInteger anInteger anInteger
public void set Samples Per Line int samples reference 7 byte samples 0xFF00 8 reference 8 byte samples 0xFF  setSamplesPerLine
public void set Number Of Image Components int an Integer reference 9 byte an Integer 0xFF  setNumberOfImageComponents anInteger anInteger
public int get MaxH Factor return maxH Factor  getMaxHFactor maxHFactor
public int get MaxV Factor return maxV Factor  getMaxVFactor maxVFactor
public void set MaxH Factor int an Integer maxH Factor an Integer  setMaxHFactor anInteger maxHFactor anInteger
public void set MaxV Factor int an Integer maxV Factor an Integer  setMaxVFactor anInteger maxVFactor anInteger
Used when decoding void initialize Component Parameters int nf get Number Of Image Components component Identifiers new int nf int comp Spec Params new int 0 int hmax 1 int vmax 1 for int i 0 i nf i int ofs i 3 10 int ci reference ofs 0xFF component Identifiers i ci int hi reference ofs 1 0xFF 16 int vi reference ofs 1 0xFF 16 int tqi reference ofs 2 0xFF if hi hmax hmax hi if vi vmax vmax vi int comp Param new int 5 comp Param 0 tqi comp Param 1 hi comp Param 2 vi if comp Spec Params length ci int new Params new int ci 1 System arraycopy comp Spec Params 0 new Params 0 comp Spec Params length comp Spec Params new Params comp Spec Params ci comp Param int x get Samples Per Line int y get Number Of Lines int multiples new int 8 16 24 32 for int i 0 i nf i int comp Param comp Spec Params component Identifiers i int hi comp Param 1 int vi comp Param 2 int comp Width x hi hmax 1 hmax int comp Height y vi vmax 1 vmax int ds Width round Up To Multiple comp Width multiples hi 1 int ds Height round Up To Multiple comp Height multiples vi 1 comp Param 3 ds Width comp Param 4 ds Height set MaxH Factor hmax set MaxV Factor vmax component Parameters comp Spec Params  initializeComponentParameters getNumberOfImageComponents componentIdentifiers compSpecParams componentIdentifiers compParam compParam compParam compParam compSpecParams newParams compSpecParams newParams compSpecParams compSpecParams newParams compSpecParams compParam getSamplesPerLine getNumberOfLines compParam compSpecParams componentIdentifiers compParam compParam compWidth compHeight dsWidth roundUpToMultiple compWidth dsHeight roundUpToMultiple compHeight compParam dsWidth compParam dsHeight setMaxHFactor setMaxVFactor componentParameters compSpecParams
Used when encoding public void initialize Contents int nf get Number Of Image Components if nf 0 nf component Parameters length SWT error SWT ERROR INVALID IMAGE int hmax 0 int vmax 0 int comp Spec Params component Parameters for int i 0 i nf i int ofs i 3 10 int comp Param comp Spec Params component Identifiers i int hi comp Param 1 int vi comp Param 2 if hi vi 4 SWT error SWT ERROR INVALID IMAGE reference ofs byte i 1 reference ofs 1 byte hi 16 vi reference ofs 2 byte comp Param 0 if hi hmax hmax hi if vi vmax vmax vi int x get Samples Per Line int y get Number Of Lines int multiples new int 8 16 24 32 for int i 0 i nf i int comp Param comp Spec Params component Identifiers i int hi comp Param 1 int vi comp Param 2 int comp Width x hi hmax 1 hmax int comp Height y vi vmax 1 vmax int ds Width round Up To Multiple comp Width multiples hi 1 int ds Height round Up To Multiple comp Height multiples vi 1 comp Param 3 ds Width comp Param 4 ds Height set MaxH Factor hmax set MaxV Factor vmax  initializeContents getNumberOfImageComponents componentParameters ERROR_INVALID_IMAGE compSpecParams componentParameters compParam compSpecParams componentIdentifiers compParam compParam ERROR_INVALID_IMAGE compParam getSamplesPerLine getNumberOfLines compParam compSpecParams componentIdentifiers compParam compParam compWidth compHeight dsWidth roundUpToMultiple compWidth dsHeight roundUpToMultiple compHeight compParam dsWidth compParam dsHeight setMaxHFactor setMaxVFactor
int round Up To Multiple int an Integer int m Integer int a an Integer m Integer 1 return a a m Integer  roundUpToMultiple anInteger mInteger anInteger mInteger mInteger
public boolean verify int marker get Segment Marker return marker JPEG File Format SOF0 marker JPEG File Format SOF3 marker JPEG File Format SOF5 marker JPEG File Format SOF7 marker JPEG File Format SOF9 marker JPEG File Format SOF11 marker JPEG File Format SOF13 marker JPEG File Format SOF15  getSegmentMarker JPEGFileFormat JPEGFileFormat JPEGFileFormat JPEGFileFormat JPEGFileFormat JPEGFileFormat JPEGFileFormat JPEGFileFormat
public boolean is Progressive int marker get Segment Marker return marker JPEG File Format SOF2 marker JPEG File Format SOF6 marker JPEG File Format SOF10 marker JPEG File Format SOF14  isProgressive getSegmentMarker JPEGFileFormat JPEGFileFormat JPEGFileFormat JPEGFileFormat
public boolean is Arithmetic Coding return get Segment Marker JPEG File Format SOF9  isArithmeticCoding getSegmentMarker JPEGFileFormat

public JPEG Huffman Table byte reference super reference  JPEGHuffmanTable
public JPEG Huffman Table LE Data Input Stream byte Stream super byte Stream initialize  JPEGHuffmanTable LEDataInputStream byteStream byteStream
public JPEG Huffman Table get All Tables return all Tables  JPEGHuffmanTable getAllTables allTables
public static JPEG Huffman Table get DefaultAC Chrominance Table JPEG Huffman Table result new JPEG Huffman Table AC Chrominance Table result initialize return result  JPEGHuffmanTable getDefaultACChrominanceTable JPEGHuffmanTable JPEGHuffmanTable ACChrominanceTable
public static JPEG Huffman Table get DefaultAC Luminance Table JPEG Huffman Table result new JPEG Huffman Table AC Luminance Table result initialize return result  JPEGHuffmanTable getDefaultACLuminanceTable JPEGHuffmanTable JPEGHuffmanTable ACLuminanceTable
public static JPEG Huffman Table get DefaultDC Chrominance Table JPEG Huffman Table result new JPEG Huffman Table DC Chrominance Table result initialize return result  JPEGHuffmanTable getDefaultDCChrominanceTable JPEGHuffmanTable JPEGHuffmanTable DCChrominanceTable
public static JPEG Huffman Table get DefaultDC Luminance Table JPEG Huffman Table result new JPEG Huffman Table DC Luminance Table result initialize return result  JPEGHuffmanTable getDefaultDCLuminanceTable JPEGHuffmanTable JPEGHuffmanTable DCLuminanceTable
public int get Dh Max Codes return dh Max Codes  getDhMaxCodes dhMaxCodes
public int get Dh Min Codes return dh Min Codes  getDhMinCodes dhMinCodes
public int get Dh Val Ptrs return dh Val Ptrs  getDhValPtrs dhValPtrs
public int get Dh Values return dh Values  getDhValues dhValues
public int get Table Class return table Class  getTableClass tableClass
public int get Table Identifier return table Identifier  getTableIdentifier tableIdentifier
void initialize int total Length get Segment Length 2 int ofs 4 int bits new int 16 JPEG Huffman Table huff Tables new JPEG Huffman Table 8 maximum is 4 AC 4 DC int huff Table Count 0 while total Length 0 int tc reference ofs 0xFF 16 table class AC 1 or DC 0 int tid reference ofs 0xFF 16 table id 0 1 baseline 0 3 prog ext ofs Read the 16 count bytes and add them together to get the table size int count 0 for int i 0 i bits length i int b Count reference ofs i 0xFF bits i b Count count b Count ofs 16 total Length 17 Read the table int huff Vals new int count for int i 0 i count i huff Vals i reference ofs i 0xFF ofs count total Length count Calculate the lengths int huff Code Lengths new int 50 start with 50 and increment as needed int huff Code Lengths Index 0 for int i 0 i 16 i for int j 0 j bits i j if huff Code Lengths Index huff Code Lengths length int new Huff Code Lengths new int huff Code Lengths length 50 System arraycopy huff Code Lengths 0 new Huff Code Lengths 0 huff Code Lengths length huff Code Lengths new Huff Code Lengths huff Code Lengths huff Code Lengths Index i 1 huff Code Lengths Index Truncate huff Code Lengths to the correct size if huff Code Lengths Index huff Code Lengths length int new Huff Code Lengths new int huff Code Lengths Index System arraycopy huff Code Lengths 0 new Huff Code Lengths 0 huff Code Lengths Index huff Code Lengths new Huff Code Lengths Calculate the Huffman codes int huff Codes new int 50 start with 50 and increment as needed int huff Codes Index 0 int k 1 int code 0 int si huff Code Lengths 0 int p 0 while p huff Code Lengths Index while p huff Code Lengths Index huff Code Lengths p si if huff Codes Index huff Codes length int new Huff Codes new int huff Codes length 50 System arraycopy huff Codes 0 new Huff Codes 0 huff Codes length huff Codes new Huff Codes huff Codes huff Codes Index code huff Codes Index code p code 2 si Truncate huff Codes to the correct size if huff Codes Index huff Codes length int new Huff Codes new int huff Codes Index System arraycopy huff Codes 0 new Huff Codes 0 huff Codes Index huff Codes new Huff Codes Calculate the maximum and minimum codes k 0 int max Codes new int 16 int min Codes new int 16 int val Ptrs new int 16 for int i 0 i 16 i int b Size bits i if b Size 0 max Codes i 1 else val Ptrs i k min Codes i huff Codes k k b Size max Codes i huff Codes k 1 Calculate the e Huffman codes and lengths int e Huff Codes new int 256 byte e Huff Size new byte 256 for int i 0 i huff Codes Index i e Huff Codes huff Vals i huff Codes i e Huff Size huff Vals i byte huff Code Lengths i Create the new JPEG Huffman Table and add it to the all Tables array JPEG Huffman Table dht Table new JPEG Huffman Table reference dht Table table Class tc dht Table table Identifier tid dht Table dh Values huff Vals dht Table dh Codes huff Codes dht Table dh Code Lengths huff Code Lengths dht Table dh Min Codes min Codes dht Table dh Max Codes max Codes dht Table dh Val Ptrs val Ptrs dht Table eh Codes e Huff Codes dht Table eh Code Lengths e Huff Size huff Tables huff Table Count dht Table huff Table Count all Tables new JPEG Huffman Table huff Table Count System arraycopy huff Tables 0 all Tables 0 huff Table Count  totalLength getSegmentLength JPEGHuffmanTable huffTables JPEGHuffmanTable huffTableCount totalLength bCount bCount bCount totalLength huffVals huffVals totalLength huffCodeLengths huffCodeLengthsIndex huffCodeLengthsIndex huffCodeLengths newHuffCodeLengths huffCodeLengths huffCodeLengths newHuffCodeLengths huffCodeLengths huffCodeLengths newHuffCodeLengths huffCodeLengths huffCodeLengthsIndex huffCodeLengthsIndex huffCodeLengths huffCodeLengthsIndex huffCodeLengths newHuffCodeLengths huffCodeLengthsIndex huffCodeLengths newHuffCodeLengths huffCodeLengthsIndex huffCodeLengths newHuffCodeLengths huffCodes huffCodesIndex huffCodeLengths huffCodeLengthsIndex huffCodeLengthsIndex huffCodeLengths huffCodesIndex huffCodes newHuffCodes huffCodes huffCodes newHuffCodes huffCodes huffCodes newHuffCodes huffCodes huffCodesIndex huffCodesIndex huffCodes huffCodesIndex huffCodes newHuffCodes huffCodesIndex huffCodes newHuffCodes huffCodesIndex huffCodes newHuffCodes maxCodes minCodes valPtrs bSize bSize maxCodes valPtrs minCodes huffCodes bSize maxCodes huffCodes eHuffman eHuffCodes eHuffSize huffCodesIndex eHuffCodes huffVals huffCodes eHuffSize huffVals huffCodeLengths JPEGHuffmanTable allTables JPEGHuffmanTable dhtTable JPEGHuffmanTable dhtTable tableClass dhtTable tableIdentifier dhtTable dhValues huffVals dhtTable dhCodes huffCodes dhtTable dhCodeLengths huffCodeLengths dhtTable dhMinCodes minCodes dhtTable dhMaxCodes maxCodes dhtTable dhValPtrs valPtrs dhtTable ehCodes eHuffCodes dhtTable ehCodeLengths eHuffSize huffTables huffTableCount dhtTable huffTableCount allTables JPEGHuffmanTable huffTableCount huffTables allTables huffTableCount
public int signature return JPEG File Format DHT  JPEGFileFormat

public JPEG Quantization Table byte reference super reference  JPEGQuantizationTable
public JPEG Quantization Table LE Data Input Stream byte Stream super byte Stream  JPEGQuantizationTable LEDataInputStream byteStream byteStream
public static JPEG Quantization Table default Chrominance Table byte data new byte Default ChrominanceQ Table length System arraycopy Default ChrominanceQ Table 0 data 0 data length return new JPEG Quantization Table data  JPEGQuantizationTable defaultChrominanceTable DefaultChrominanceQTable DefaultChrominanceQTable JPEGQuantizationTable
public static JPEG Quantization Table default Luminance Table byte data new byte Default LuminanceQ Table length System arraycopy Default LuminanceQ Table 0 data 0 data length return new JPEG Quantization Table data  JPEGQuantizationTable defaultLuminanceTable DefaultLuminanceQTable DefaultLuminanceQTable JPEGQuantizationTable
public int get Quantization Tables Keys int keys new int 4 int keys Index 0 int total Length get Segment Length 2 int ofs 4 while total Length 64 int tq reference ofs 0xFF 16 int pq reference ofs 0xFF 16 if pq 0 ofs 65 total Length 65 else ofs 129 total Length 129 if keys Index keys length int new Keys new int keys length 4 System arraycopy keys 0 new Keys 0 keys length keys new Keys keys keys Index tq keys Index int new Keys new int keys Index System arraycopy keys 0 new Keys 0 keys Index return new Keys  getQuantizationTablesKeys keysIndex totalLength getSegmentLength totalLength totalLength totalLength keysIndex newKeys newKeys newKeys keysIndex keysIndex newKeys keysIndex newKeys keysIndex newKeys
public int get Quantization Tables Values int values new int 4 int values Index 0 int total Length get Segment Length 2 int ofs 4 while total Length 64 int qk new int 64 int pq reference ofs 0xFF 16 if pq 0 for int i 0 i qk length i qk i reference ofs i 1 ofs 65 total Length 65 else for int i 0 i qk length i int idx i 1 2 qk i reference ofs idx 1 0xFF 256 reference ofs idx 2 0xFF ofs 129 total Length 129 if values Index values length int new Values new int values length 4 System arraycopy values 0 new Values 0 values length values new Values values values Index qk values Index int new Values new int values Index System arraycopy values 0 new Values 0 values Index return new Values  getQuantizationTablesValues valuesIndex totalLength getSegmentLength totalLength totalLength totalLength valuesIndex newValues newValues newValues valuesIndex valuesIndex newValues valuesIndex newValues valuesIndex newValues
public void scale By int quality Factor int q Factor quality Factor if q Factor 0 q Factor 1 if q Factor 100 q Factor 100 if q Factor 50 q Factor 5000 q Factor else q Factor 200 q Factor 2 int total Length get Segment Length 2 int ofs 4 while total Length 64 int tq reference ofs 0xFF 16 int pq reference ofs 0xFF 16 if pq 0 for int i ofs 1 i ofs 64 i int temp reference i 0xFF q Factor 50 100 if temp 0 temp 1 if temp 255 temp 255 reference i byte temp ofs 65 total Length 65 else for int i ofs 1 i ofs 128 i 2 int temp reference i 0xFF 256 reference i 1 0xFF q Factor 50 100 if temp 0 temp 1 if temp 32767 temp 32767 reference i byte temp 256 reference i 1 byte temp 256 ofs 129 total Length 129  scaleBy qualityFactor qFactor qualityFactor qFactor qFactor qFactor qFactor qFactor qFactor qFactor qFactor qFactor totalLength getSegmentLength totalLength qFactor totalLength qFactor totalLength
public int signature return JPEG File Format DQT  JPEGFileFormat

final class JPEG Restart Interval extends JPEG Fixed Size Segment public JPEG Restart Interval LE Data Input Stream byte Stream super byte Stream  JPEGRestartInterval JPEGFixedSizeSegment JPEGRestartInterval LEDataInputStream byteStream byteStream
public int signature return JPEG File Format DRI  JPEGFileFormat
public int get Restart Interval return reference 4 0xFF 8 reference 5 0xFF  getRestartInterval
public int fixed Size return 6  fixedSize

public int component Parameters public JPEG Scan Header byte reference super reference  componentParameters JPEGScanHeader
public JPEG Scan Header LE Data Input Stream byte Stream super byte Stream initialize Component Parameters  JPEGScanHeader LEDataInputStream byteStream byteStream initializeComponentParameters
public int get Approx Bit Position High return reference 2 get Number Of Image Components 7 0xFF 16  getApproxBitPositionHigh getNumberOfImageComponents
public int get Approx Bit Position Low return reference 2 get Number Of Image Components 7 0xFF 16  getApproxBitPositionLow getNumberOfImageComponents
public int get End Of Spectral Selection return reference 2 get Number Of Image Components 6 0xFF  getEndOfSpectralSelection getNumberOfImageComponents
public int get Number Of Image Components return reference 4 0xFF  getNumberOfImageComponents
public int get Start Of Spectral Selection return reference 2 get Number Of Image Components 5 0xFF  getStartOfSpectralSelection getNumberOfImageComponents
Used when decoding void initialize Component Parameters int comp Count get Number Of Image Components component Parameters new int 0 for int i 0 i comp Count i int ofs 5 i 2 int cid reference ofs 0xFF int dc reference ofs 1 0xFF 16 int ac reference ofs 1 0xFF 16 if component Parameters length cid int new Params new int cid 1 System arraycopy component Parameters 0 new Params 0 component Parameters length component Parameters new Params component Parameters cid new int dc ac  initializeComponentParameters compCount getNumberOfImageComponents componentParameters compCount componentParameters newParams componentParameters newParams componentParameters componentParameters newParams componentParameters
Used when encoding public void initialize Contents int comp Count get Number Of Image Components int comp Spec Params component Parameters if comp Count 0 comp Count comp Spec Params length SWT error SWT ERROR INVALID IMAGE for int i 0 i comp Count i int ofs i 2 5 int comp Params comp Spec Params i reference ofs byte i 1 reference ofs 1 byte comp Params 0 16 comp Params 1  initializeContents compCount getNumberOfImageComponents compSpecParams componentParameters compCount compCount compSpecParams ERROR_INVALID_IMAGE compCount compParams compSpecParams compParams compParams
public void set End Of Spectral Selection int an Integer reference 2 get Number Of Image Components 6 byte an Integer  setEndOfSpectralSelection anInteger getNumberOfImageComponents anInteger
public void set Number Of Image Components int an Integer reference 4 byte an Integer 0xFF  setNumberOfImageComponents anInteger anInteger
public void set Start Of Spectral Selection int an Integer reference 2 get Number Of Image Components 5 byte an Integer  setStartOfSpectralSelection anInteger getNumberOfImageComponents anInteger
public int signature return JPEG File Format SOS  JPEGFileFormat
public boolean verify Progressive Scan int start get Start Of Spectral Selection int end get End Of Spectral Selection int low get Approx Bit Position Low int high get Approx Bit Position High int count get Number Of Image Components if start 0 end 00 start end end 63 if low 13 high 13 high 0 high low 1 return start 0 start 0 count 1 return false  verifyProgressiveScan getStartOfSpectralSelection getEndOfSpectralSelection getApproxBitPositionLow getApproxBitPositionHigh getNumberOfImageComponents
public boolean isAC Progressive Scan return get Start Of Spectral Selection 0 get End Of Spectral Selection 0  isACProgressiveScan getStartOfSpectralSelection getEndOfSpectralSelection
public boolean isDC Progressive Scan return get Start Of Spectral Selection 0 get End Of Spectral Selection 0  isDCProgressiveScan getStartOfSpectralSelection getEndOfSpectralSelection
public boolean is First Scan return get Approx Bit Position High 0  isFirstScan getApproxBitPositionHigh

public byte reference JPEG Segment  JPEGSegment
public JPEG Segment byte reference this reference reference  JPEGSegment
public int signature return 0 
public boolean verify return get Segment Marker signature  getSegmentMarker
public int get Segment Marker return reference 0 0xFF 8 reference 1 0xFF  getSegmentMarker
public void set Segment Marker int marker reference 0 byte marker 0xFF00 8 reference 1 byte marker 0xFF  setSegmentMarker
public int get Segment Length return reference 2 0xFF 8 reference 3 0xFF  getSegmentLength
public void set Segment Length int length reference 2 byte length 0xFF00 8 reference 3 byte length 0xFF  setSegmentLength
public boolean write To Stream LE Data Output Stream byte Stream try byte Stream write reference return true catch Exception e return false  writeToStream LEDataOutputStream byteStream byteStream

final class JPEG Start Of Image extends JPEG Fixed Size Segment public JPEG Start Of Image super  JPEGStartOfImage JPEGFixedSizeSegment JPEGStartOfImage
public JPEG Start Of Image byte reference super reference  JPEGStartOfImage
public JPEG Start Of Image LE Data Input Stream byte Stream super byte Stream  JPEGStartOfImage LEDataInputStream byteStream byteStream
public int signature return JPEG File Format SOI  JPEGFileFormat
public int fixed Size return 2  fixedSize

abstract class JPEG Variable Size Segment extends JPEG Segment public JPEG Variable Size Segment byte reference super reference  JPEGVariableSizeSegment JPEGSegment JPEGVariableSizeSegment
public JPEG Variable Size Segment LE Data Input Stream byte Stream try byte header new byte 4 byte Stream read header reference header to use get Segment Length byte contents new byte get Segment Length 2 contents 0 header 0 contents 1 header 1 contents 2 header 2 contents 3 header 3 byte Stream read contents 4 contents length 4 reference contents catch Exception e SWT error SWT ERROR IO e  JPEGVariableSizeSegment LEDataInputStream byteStream byteStream getSegmentLength getSegmentLength byteStream ERROR_IO

public LE Data Input Stream Input Stream input this input 512  LEDataInputStream InputStream
public LE Data Input Stream Input Stream input int buffer Size this in input if buffer Size 0 buf new byte buffer Size pos buffer Size else throw new Illegal Argument Exception  LEDataInputStream InputStream bufferSize bufferSize bufferSize bufferSize IllegalArgumentException
public void close throws IO Exception buf null if in null in close in null  IOException
Answer how many bytes were read public int get Position return position  getPosition
Answers how many bytes are available for reading without blocking public int available throws IO Exception if buf null throw new IO Exception return buf length pos in available  IOException IOException
Answer the next byte of the input stream public int read throws IO Exception if buf null throw new IO Exception position if pos buf length return buf pos 0xFF return in read  IOException IOException
Don t imitate the JDK behaviour of reading a random number of bytes when you can actually read them all public int read byte b int off int len throws IO Exception int result int left len result read Data b off len while true if result 1 return 1 position result if result left return len left result off result result read Data b off left  IOException readData readData
Reads at most code length code bytes from this LE Data Input Stream and stores them in byte array code buffer code starting at code offset code p Answer the number of bytes actually read or 1 if no bytes were read and end of stream was encountered This implementation reads bytes from the pushback buffer first then the target stream if more bytes are required to satisfy code count code p param buffer the byte array in which to store the read bytes param offset the offset in code buffer code to store the read bytes param length the maximum number of bytes to store in code buffer code return int the number of bytes actually read or 1 if end of stream exception java io IO Exception if an IO Exception occurs private int read Data byte buffer int offset int length throws IO Exception if buf null throw new IO Exception if offset 0 offset buffer length length 0 length buffer length offset throw new Array Index Out Of Bounds Exception int cache Copied 0 int new Offset offset Are there pushback bytes available int available buf length pos if available 0 cache Copied available length length available System arraycopy buf pos buffer new Offset cache Copied new Offset cache Copied pos cache Copied Have we copied enough if cache Copied length return length int in Copied in read buffer new Offset length cache Copied if in Copied 0 return in Copied cache Copied if cache Copied 0 return in Copied return cache Copied  LEDataInputStream IOException IOException readData IOException IOException ArrayIndexOutOfBoundsException cacheCopied newOffset cacheCopied newOffset cacheCopied newOffset cacheCopied cacheCopied cacheCopied inCopied newOffset cacheCopied inCopied inCopied cacheCopied cacheCopied inCopied cacheCopied
Answer an integer comprised of the next four bytes of the input stream public int read Int throws IO Exception byte buf new byte 4 read buf return buf 3 0xFF 8 buf 2 0xFF 8 buf 1 0xFF 8 buf 0 0xFF  readInt IOException
Answer a short comprised of the next two bytes of the input stream public short read Short throws IO Exception byte buf new byte 2 read buf return short buf 1 0xFF 8 buf 0 0xFF  readShort IOException
Push back the entire content of the given buffer code b code p The bytes are pushed so that they would be read back b 0 b 1 etc If the push back buffer cannot handle the bytes copied from code b code an IO Exception will be thrown and no byte will be pushed back p param b the byte array containing bytes to push back into the stream exception java io IO Exception if the pushback buffer is too small public void unread byte b throws IO Exception int length b length if length pos throw new IO Exception position length pos length System arraycopy b 0 buf pos length  IOException IOException IOException IOException

final class LE Data Output Stream extends Output Stream Output Stream out public LE Data Output Stream Output Stream output this out output  LEDataOutputStream OutputStream OutputStream LEDataOutputStream OutputStream
this out output public void close throws IO Exception out close  IOException
out close public void write byte b int off int len throws IO Exception out write b off len  IOException
Write the given byte to the output stream public void write int b throws IO Exception out write b  IOException
Write the given byte to the output stream public void write Byte byte b throws IO Exception out write b 0xFF  writeByte IOException
Write the four bytes of the given integer to the output stream public void write Int int the Int throws IO Exception out write the Int 0xFF out write the Int 8 0xFF out write the Int 16 0xFF out write the Int 24 0xFF  writeInt theInt IOException theInt theInt theInt theInt
Write the two bytes of the given short to the output stream public void write Short int the Short throws IO Exception out write the Short 0xFF out write the Short 8 0xFF  writeShort theShort IOException theShort theShort

Decode the input void decode int code int oc 0 int fc 0 byte buf new byte image Width int stack Index 0 int buf Index 0 int c while c next Code end Code if c clear Code code Size bits Per Pixel 1 code Mask MASK TABLE bits Per Pixel current Slot new Codes top Slot 1 code Size while c next Code clear Code if c end Code oc fc c buf buf Index byte c buf Index if buf Index image Width next Put Pixels buf buf Index 0 else code c if code current Slot if code current Slot SWT error SWT ERROR INVALID IMAGE code oc stack stack Index fc stack Index while code new Codes stack stack Index suffix code stack Index code prefix code stack stack Index code stack Index if current Slot top Slot fc code suffix current Slot fc prefix current Slot oc current Slot oc c if current Slot top Slot if code Size 12 code Mask MASK TABLE code Size code Size top Slot top Slot top Slot while stack Index 0 stack Index buf buf Index byte stack stack Index buf Index if buf Index image Width next Put Pixels buf buf Index 0 if buf Index 0 line image Height next Put Pixels buf  imageWidth stackIndex bufIndex nextCode endCode clearCode codeSize bitsPerPixel codeMask MASK_TABLE bitsPerPixel currentSlot newCodes topSlot codeSize nextCode clearCode endCode bufIndex bufIndex bufIndex imageWidth nextPutPixels bufIndex currentSlot currentSlot ERROR_INVALID_IMAGE stackIndex stackIndex newCodes stackIndex stackIndex stackIndex stackIndex currentSlot topSlot currentSlot currentSlot currentSlot currentSlot topSlot codeSize codeMask MASK_TABLE codeSize codeSize topSlot topSlot topSlot stackIndex stackIndex bufIndex stackIndex bufIndex bufIndex imageWidth nextPutPixels bufIndex bufIndex imageHeight nextPutPixels
Decode the LZW encoded bytes in the given byte stream into the given Device Independent Image public void decode LE Data Input Stream input Stream Image Loader loader Image Data image boolean interlaced int depth this input Stream input Stream this loader loader this image image this interlaced interlaced this bits Per Pixel depth initialize For Decoding decode  DeviceIndependentImage LEDataInputStream inputStream ImageLoader ImageData inputStream inputStream bitsPerPixel initializeForDecoding
Encode the image void encode next Put Code clear Code int last Prefix encode Loop next Put Code last Prefix next Put Code end Code Write out last partial block if bits Left 8 block 0 byte block Index 1 Nothing in last byte else block 0 byte block Index Last byte has data write Block Write out empty block to indicate the end if needed if block 0 0 block 0 0 write Block  nextPutCode clearCode lastPrefix encodeLoop nextPutCode lastPrefix nextPutCode endCode bitsLeft blockIndex blockIndex writeBlock writeBlock
Encode the bytes into the given byte stream from the given Device Independent Image public void encode LE Data Output Stream byte Stream Image Data image this output Stream byte Stream this image image initialize For Encoding encode  DeviceIndependentImage LEDataOutputStream byteStream ImageData outputStream byteStream initializeForEncoding
Encoding loop broken out to allow early return int encode Loop int pixel next Pixel boolean found LZW Node node while true int current Prefix pixel node node Stack current Prefix found true pixel next Pixel if pixel 0 return current Prefix while found node children null node node children while found node suffix pixel if pixel node suffix if node left null node left new LZW Node found false node node left else if node right null node right new LZW Node found false node node right if found current Prefix node code pixel next Pixel if pixel 0 return current Prefix if found node children new LZW Node node node children node children null node left null node right null node code current Slot node prefix current Prefix node suffix pixel next Put Code current Prefix current Slot Off by one if current Slot 4096 if current Slot top Slot code Size code Mask MASK TABLE code Size 1 top Slot 2 else next Put Code clear Code for int i 0 i node Stack length i node Stack i children null code Size bits Per Pixel 1 code Mask MASK TABLE code Size 1 current Slot new Codes top Slot 1 code Size  encodeLoop nextPixel LZWNode currentPrefix nodeStack currentPrefix nextPixel currentPrefix LZWNode LZWNode currentPrefix nextPixel currentPrefix LZWNode currentSlot currentPrefix nextPutCode currentPrefix currentSlot currentSlot currentSlot topSlot codeSize codeMask MASK_TABLE codeSize topSlot nextPutCode clearCode nodeStack nodeStack codeSize bitsPerPixel codeMask MASK_TABLE codeSize currentSlot newCodes topSlot codeSize
Initialize the receiver for decoding the given byte array void initialize For Decoding pass 1 line 0 code Size bits Per Pixel 1 top Slot 1 code Size clear Code 1 bits Per Pixel end Code clear Code 1 new Codes current Slot end Code 1 current Byte 1 block Size bits Left 0 block Index 0 code Mask MASK TABLE code Size 1 stack new int 4096 suffix new int 4096 prefix new int 4096 block new byte 256 image Width image width image Height image height  initializeForDecoding codeSize bitsPerPixel topSlot codeSize clearCode bitsPerPixel endCode clearCode newCodes currentSlot endCode currentByte blockSize bitsLeft blockIndex codeMask MASK_TABLE codeSize imageWidth imageHeight
Initialize the receiver for encoding the given byte array void initialize For Encoding interlaced false bits Per Pixel image depth code Size bits Per Pixel 1 top Slot 1 code Size clear Code 1 bits Per Pixel end Code clear Code 1 new Codes current Slot end Code 1 bits Left 8 current Byte 0 block Index 1 block Size 255 block new byte block Size block 0 byte block Size 1 node Stack new LZW Node 1 bits Per Pixel for int i 0 i node Stack length i LZW Node node new LZW Node node code i 1 node prefix 1 node suffix i 1 node Stack i node image Width image width image Height image height imageY 1 line Array new byte image Width imageX image Width 1 Force a read  initializeForEncoding bitsPerPixel codeSize bitsPerPixel topSlot codeSize clearCode bitsPerPixel endCode clearCode newCodes currentSlot endCode bitsLeft currentByte blockIndex blockSize blockSize blockSize nodeStack LZWNode bitsPerPixel nodeStack LZWNode LZWNode nodeStack imageWidth imageHeight lineArray imageWidth imageWidth
Answer the next code from the input byte array int next Code int code if bits Left 0 if block Index block Size block Size read Block block Index 0 if block Size 0 return end Code block Index current Byte block block Index 0xFF bits Left 8 code current Byte else int shift bits Left 8 if shift 0 code current Byte 0 shift else code current Byte shift while code Size bits Left if block Index block Size block Size read Block block Index 0 if block Size 0 return end Code block Index current Byte block block Index 0xFF code current Byte bits Left bits Left 8 bits Left code Size return code code Mask  nextCode bitsLeft blockIndex blockSize blockSize readBlock blockIndex blockSize endCode blockIndex currentByte blockIndex bitsLeft currentByte bitsLeft currentByte currentByte codeSize bitsLeft blockIndex blockSize blockSize readBlock blockIndex blockSize endCode blockIndex currentByte blockIndex currentByte bitsLeft bitsLeft bitsLeft codeSize codeMask
Answer the next pixel to encode in the image int next Pixel imageX if imageX image Width imageY if imageY image Height return 1 else next Pixels line Array image Width imageX 1 return this line Array imageX 1 0xFF  nextPixel imageWidth imageHeight nextPixels lineArray imageWidth lineArray
Copy a row of pixel values from the image void next Pixels byte buf int line Width if image depth 8 System arraycopy image data imageY image bytes Per Line buf 0 line Width else image get Pixels 0 imageY line Width buf 0  nextPixels lineWidth bytesPerLine lineWidth getPixels lineWidth
Output a Code to the output stream void next Put Code int a Code int code To Do a Code int code Bits To Do code Size Fill in the remainder of the current byte with the high order bits of the code int c code To Do MASK TABLE bits Left 1 current Byte current Byte c 8 bits Left block block Index byte current Byte code Bits To Do bits Left if code Bits To Do 1 The whole code fit in the first byte so we are done bits Left code Size if bits Left 0 We used the whole last byte so get ready for the next one bits Left 8 block Index if block Index block Size write Block block Index 1 current Byte 0 return code To Do code To Do bits Left Fill in any remaining whole bytes i e not the last one block Index if block Index block Size write Block block Index 1 while code Bits To Do 8 current Byte code To Do 0xFF block block Index byte current Byte code To Do code To Do 8 code Bits To Do 8 block Index if block Index block Size write Block block Index 1 Fill the low order bits of the last byte with the remainder bits Left 8 code Bits To Do current Byte code To Do block block Index byte current Byte  aCode nextPutCode aCode codeToDo aCode codeBitsToDo codeSize codeToDo MASK_TABLE bitsLeft currentByte currentByte bitsLeft blockIndex currentByte codeBitsToDo bitsLeft codeBitsToDo bitsLeft codeSize bitsLeft bitsLeft blockIndex blockIndex blockSize writeBlock blockIndex currentByte codeToDo codeToDo bitsLeft blockIndex blockIndex blockSize writeBlock blockIndex codeBitsToDo currentByte codeToDo blockIndex currentByte codeToDo codeToDo codeBitsToDo blockIndex blockIndex blockSize writeBlock blockIndex bitsLeft codeBitsToDo currentByte codeToDo blockIndex currentByte
Copy a row of pixel values to the image void next Put Pixels byte buf if image depth 8 Slight optimization for depth 8 int start line image bytes Per Line for int i 0 i image Width i image data start i buf i else image set Pixels 0 line image Width buf 0 if interlaced if pass 1 copy Row buf 7 line 8 else if pass 2 copy Row buf 3 line 8 else if pass 3 copy Row buf 1 line 4 else if pass 4 line 2 else if pass 5 line 0 if line image Height pass if pass 2 line 4 else if pass 3 line 2 else if pass 4 line 1 else if pass 5 line 0 if pass 5 if loader has Listeners Image Data image Copy Image Data image clone loader notify Listeners new Image Loader Event loader image Copy pass 2 false if line image Height line 0 else line  nextPutPixels bytesPerLine imageWidth setPixels imageWidth copyRow copyRow copyRow imageHeight hasListeners ImageData imageCopy ImageData notifyListeners ImageLoaderEvent imageCopy imageHeight
Copy duplicate rows of pixel values to the image This is to fill in rows if the image is interlaced void copy Row byte buf int copies for int i 1 i copies i if line i image Height image set Pixels 0 line i image Width buf 0  copyRow imageHeight setPixels imageWidth
Read a block from the byte stream Return the number of bytes read Throw an exception if the block could not be read int read Block int size 1 try size input Stream read if size 1 SWT error SWT ERROR INVALID IMAGE block 0 byte size size input Stream read block 1 size if size 1 SWT error SWT ERROR INVALID IMAGE catch Exception e SWT error SWT ERROR IO e return size  readBlock inputStream ERROR_INVALID_IMAGE inputStream ERROR_INVALID_IMAGE ERROR_IO
Write a block to the byte stream Throw an exception if the block could not be written void write Block try output Stream write block 0 block 0 0xFF 1 catch Exception e SWT error SWT ERROR IO e  writeBlock outputStream ERROR_IO

Construct a Png Chunk using the reference bytes given Png Chunk byte reference super set Reference reference  PngChunk PngChunk setReference
Get the Png Chunk s reference byte Array byte get Reference return reference  PngChunk byteArray getReference
Set the Png Chunk s reference byte Array void set Reference byte reference this reference reference  PngChunk byteArray setReference
Get the 32 bit integer from the reference byte array at the given offset int get Int32 int offset int answer 0 answer reference offset 0xFF 24 answer reference offset 1 0xFF 16 answer reference offset 2 0xFF 8 answer reference offset 3 0xFF return answer  getInt32
Set the 32 bit integer in the reference byte array at the given offset void set Int32 int offset int value reference offset byte value 24 0xFF reference offset 1 byte value 16 0xFF reference offset 2 byte value 8 0xFF reference offset 3 byte value 0xFF  setInt32
Get the length of the data component of this chunk This is not the length of the entire chunk int get Length return get Int32 LENGTH OFFSET  getLength getInt32 LENGTH_OFFSET
Set the length of the data component of this chunk This is not the length of the entire chunk void set Length int value set Int32 LENGTH OFFSET value  setLength setInt32 LENGTH_OFFSET
Get the chunk type This is a four byte value Each byte should be an ASCII character The first byte is upper case if the chunk is critical The second byte is upper case if the chunk is publicly defined The third byte must be upper case The fourth byte is upper case if the chunk is unsafe to copy Public chunk types are defined by the PNG Development Group byte get Type Bytes byte type new byte 4 System arraycopy reference TYPE OFFSET type 0 TYPE FIELD LENGTH return type  getTypeBytes TYPE_OFFSET TYPE_FIELD_LENGTH
Set the chunk type This is a four byte value Each byte should be an ASCII character The first byte is upper case if the chunk is critical The second byte is upper case if the chunk is publicly defined The third byte must be upper case The fourth byte is upper case if the chunk is unsafe to copy Public chunk types are defined by the PNG Development Group void set Type byte value if value length TYPE FIELD LENGTH SWT error SWT ERROR INVALID ARGUMENT System arraycopy value 0 reference TYPE OFFSET TYPE FIELD LENGTH  setType TYPE_FIELD_LENGTH ERROR_INVALID_ARGUMENT TYPE_OFFSET TYPE_FIELD_LENGTH
Get the chunk s data byte get Data int data Length get Length if reference length MIN LENGTH data Length SWT error SWT ERROR INVALID RANGE byte data new byte data Length System arraycopy reference DATA OFFSET data 0 data Length return data  getData dataLength getLength MIN_LENGTH dataLength ERROR_INVALID_RANGE dataLength DATA_OFFSET dataLength
Set the chunk s data This method has two side effects 1 It will set the length field to be the length of the data array given 2 It will set the CRC field to the computed CRC value of the data array given void set Data byte data set Length data length System arraycopy data 0 reference DATA OFFSET data length setCRC computeCRC  setData setLength DATA_OFFSET
Get the CRC value for the chunk s data Ensure that the length field has a good value before making this call int getCRC int crc Offset DATA OFFSET get Length return get Int32 crc Offset  crcOffset DATA_OFFSET getLength getInt32 crcOffset
Set the CRC value for the chunk s data Ensure that the length field has a good value before making this call void setCRC int value int crc Offset DATA OFFSET get Length set Int32 crc Offset value  crcOffset DATA_OFFSET getLength setInt32 crcOffset
Get the chunk s total size including the length type and crc fields int get Size return MIN LENGTH get Length  getSize MIN_LENGTH getLength
Compute the CRC value for the chunk s data Answer whether this value matches the value stored in the chunk boolean checkCRC int crc computeCRC int storedCRC getCRC return crc storedCRC 
Answer the CRC value of chunk s data int computeCRC int crc 0xFFFFFFFF int start TYPE OFFSET int stop DATA OFFSET get Length for int i start i stop i int index crc reference i 0xFF crc CRC TABLE index crc 8 0x00FFFFFF return crc  TYPE_OFFSET DATA_OFFSET getLength CRC_TABLE
boolean type Matches Array byte array for int i 0 i TYPE FIELD LENGTH i if reference TYPE OFFSET i array i return false return true  typeMatchesArray TYPE_FIELD_LENGTH TYPE_OFFSET
boolean is Critical return Character is Upper Case char get Type Bytes 0  isCritical isUpperCase getTypeBytes
int get Chunk Type if type Matches Array TYPE IHDR return CHUNK IHDR if type Matches Array TYPE PLTE return CHUNK PLTE if type Matches Array TYPE IDAT return CHUNK IDAT if type Matches Array TYPE IEND return CHUNK IEND if type Matches Array TYPE tRNS return CHUNK tRNS return CHUNK UNKNOWN  getChunkType typeMatchesArray TYPE_IHDR CHUNK_IHDR typeMatchesArray TYPE_PLTE CHUNK_PLTE typeMatchesArray TYPE_IDAT CHUNK_IDAT typeMatchesArray TYPE_IEND CHUNK_IEND typeMatchesArray TYPE_tRNS CHUNK_tRNS CHUNK_UNKNOWN
Read the next PNG chunk from the input stream given If unable to read a chunk return null static Png Chunk read Next From Stream LE Data Input Stream stream try int header Length LENGTH FIELD LENGTH TYPE FIELD LENGTH byte header Bytes new byte header Length int result stream read header Bytes 0 header Length stream unread header Bytes if result header Length return null Png Chunk temp Chunk new Png Chunk header Bytes int chunk Length temp Chunk get Size byte chunk new byte chunk Length result stream read chunk 0 chunk Length if result chunk Length return null switch temp Chunk get Chunk Type case CHUNK IHDR return new Png Ihdr Chunk chunk case CHUNK PLTE return new Png Plte Chunk chunk case CHUNK IDAT return new Png Idat Chunk chunk case CHUNK IEND return new Png Iend Chunk chunk case CHUNK tRNS return new Png Trns Chunk chunk default return new Png Chunk chunk catch IO Exception e return null  PngChunk readNextFromStream LEDataInputStream headerLength LENGTH_FIELD_LENGTH TYPE_FIELD_LENGTH headerBytes headerLength headerBytes headerLength headerBytes headerLength PngChunk tempChunk PngChunk headerBytes chunkLength tempChunk getSize chunkLength chunkLength chunkLength tempChunk getChunkType CHUNK_IHDR PngIhdrChunk CHUNK_PLTE PngPlteChunk CHUNK_IDAT PngIdatChunk CHUNK_IEND PngIendChunk CHUNK_tRNS PngTrnsChunk PngChunk IOException
Answer whether the chunk is a valid PNG chunk void validate Png File Read State read State Png Ihdr Chunk header Chunk if reference length MIN LENGTH SWT error SWT ERROR INVALID IMAGE byte type get Type Bytes The third character MUST be upper case if Character is Upper Case char type 2 SWT error SWT ERROR INVALID IMAGE All characters must be letters for int i 0 i TYPE FIELD LENGTH i if Compatibility is Letter char type i SWT error SWT ERROR INVALID IMAGE The stored CRC must match the data s computed CRC if checkCRC SWT error SWT ERROR INVALID IMAGE  PngFileReadState readState PngIhdrChunk headerChunk MIN_LENGTH ERROR_INVALID_IMAGE getTypeBytes isUpperCase ERROR_INVALID_IMAGE TYPE_FIELD_LENGTH isLetter ERROR_INVALID_IMAGE ERROR_INVALID_IMAGE
Provided so that subclasses can override and add data to the to String call  toString
public String to String String Buffer buffer new String Buffer buffer append buffer append n t Length buffer append get Length buffer append n t Type byte type get Type Bytes for int i 0 i type length i buffer append char type i contribute To String buffer buffer append n tCRC buffer append Integer to Hex String getCRC buffer append n return buffer to String  toString StringBuffer StringBuffer tLength getLength tType getTypeBytes contributeToString toHexString toString

Png Chunk Reader LE Data Input Stream input Stream this input Stream input Stream read State new Png File Read State header Chunk null  PngChunkReader LEDataInputStream inputStream inputStream inputStream readState PngFileReadState headerChunk
Png Ihdr Chunk get Ihdr Chunk if header Chunk null try Png Chunk chunk Png Chunk read Next From Stream input Stream header Chunk Png Ihdr Chunk chunk header Chunk validate read State null catch Class Cast Exception e SWT error SWT ERROR INVALID IMAGE return header Chunk  PngIhdrChunk getIhdrChunk headerChunk PngChunk PngChunk readNextFromStream inputStream headerChunk PngIhdrChunk headerChunk readState ClassCastException ERROR_INVALID_IMAGE headerChunk
Png Chunk read Next Chunk if header Chunk null return get Ihdr Chunk Png Chunk chunk Png Chunk read Next From Stream input Stream switch chunk get Chunk Type case Png Chunk CHUNK tRNS Png Trns Chunk chunk validate read State header Chunk palette Chunk break case Png Chunk CHUNK PLTE chunk validate read State header Chunk palette Chunk Png Plte Chunk chunk break default chunk validate read State header Chunk if read State readIDAT chunk get Chunk Type Png Chunk CHUNK IDAT read State read Pixel Data true return chunk  PngChunk readNextChunk headerChunk getIhdrChunk PngChunk PngChunk readNextFromStream inputStream getChunkType PngChunk CHUNK_tRNS PngTrnsChunk readState headerChunk paletteChunk PngChunk CHUNK_PLTE readState headerChunk paletteChunk PngPlteChunk readState headerChunk readState getChunkType PngChunk CHUNK_IDAT readState readPixelData
boolean read Pixel Data return read State read Pixel Data  readPixelData readState readPixelData
boolean has More Chunks return read State readIEND  hasMoreChunks readState

Png Decoding Data Stream Png Idat Chunk idat Chunk Png Chunk Reader chunk Reader super this current Chunk idat Chunk this chunk Reader chunk Reader next Byte Index 0 next Bit Index MAX BIT 1 adler Value 1 lz Block Reader new Png Lz Block Reader this read Compressed Data Header lz Block Reader read Next Block Header  PngDecodingDataStream PngIdatChunk idatChunk PngChunkReader chunkReader currentChunk idatChunk chunkReader chunkReader nextByteIndex nextBitIndex MAX_BIT adlerValue lzBlockReader PngLzBlockReader readCompressedDataHeader lzBlockReader readNextBlockHeader
This method should be called when the image decoder thinks that all of the compressed image data has been read This method will ensure that the next data value is an end of block marker If there are more blocks after this one the method will read them and ensure that they are empty void assert Image Data At End lz Block Reader assert Compressed Data At End  assertImageDataAtEnd lzBlockReader assertCompressedDataAtEnd
int get Next Idat Bits int length int value 0 for int i 0 i length i value get Next Idat Bit i return value  getNextIdatBits getNextIdatBit
byte get Next Idat Bit if next Bit Index MAX BIT current Byte get Next Idat Byte next Bit Index 0 int mask 1 next Bit Index next Bit Index return current Byte mask 0 byte 1 byte 0  getNextIdatBit nextBitIndex MAX_BIT currentByte getNextIdatByte nextBitIndex nextBitIndex nextBitIndex currentByte
private Png Idat Chunk get Next Chunk Png Chunk chunk chunk Reader read Next Chunk if chunk null error if chunk get Chunk Type Png Chunk CHUNK IDAT error return Png Idat Chunk chunk  PngIdatChunk getNextChunk PngChunk chunkReader readNextChunk getChunkType PngChunk CHUNK_IDAT PngIdatChunk
byte get Next Idat Byte if next Byte Index current Chunk get Length 1 current Chunk get Next Chunk next Byte Index 0 byte next Byte current Chunk get Data Byte At Offset next Byte Index next Byte Index next Bit Index MAX BIT 1 return next Byte  getNextIdatByte nextByteIndex currentChunk getLength currentChunk getNextChunk nextByteIndex nextByte currentChunk getDataByteAtOffset nextByteIndex nextByteIndex nextBitIndex MAX_BIT nextByte
private void update Adler byte value int low adler Value 0xFFFF int high adler Value 16 0xFFFF int value Int value 0xFF low low value Int PRIME high low high PRIME adler Value high 16 low  updateAdler adlerValue adlerValue valueInt valueInt adlerValue
byte get Next Decoded Byte byte next Decoded Byte lz Block Reader get Next Byte update Adler next Decoded Byte return next Decoded Byte  getNextDecodedByte nextDecodedByte lzBlockReader getNextByte updateAdler nextDecodedByte nextDecodedByte
void error SWT error SWT ERROR INVALID IMAGE  ERROR_INVALID_IMAGE
private void read Compressed Data Header byte header Byte1 get Next Idat Byte byte header Byte2 get Next Idat Byte int number header Byte1 0xFF 8 header Byte2 0xFF if number 31 0 error int compression Method header Byte1 0x0F if compression Method 8 error int window Size Hint header Byte1 0xF0 4 if window Size Hint 7 error int window Size 1 window Size Hint 8 lz Block Reader set Window Size window Size int dictionary header Byte2 1 5 if dictionary 0 error int compression Level header Byte2 0xC0 6  readCompressedDataHeader headerByte1 getNextIdatByte headerByte2 getNextIdatByte headerByte1 headerByte2 compressionMethod headerByte1 compressionMethod windowSizeHint headerByte1 windowSizeHint windowSize windowSizeHint lzBlockReader setWindowSize windowSize headerByte2 compressionLevel headerByte2
void check Adler int stored Adler get Next Idat Byte 0xFF 24 get Next Idat Byte 0xFF 16 get Next Idat Byte 0xFF 8 get Next Idat Byte 0xFF if stored Adler adler Value error  checkAdler storedAdler getNextIdatByte getNextIdatByte getNextIdatByte getNextIdatByte storedAdler adlerValue

Skip over signature data This has already been verified in isPNG File void read Signature throws IO Exception byte signature new byte SIGNATURE LENGTH input Stream read signature  isPNGFile readSignature IOException SIGNATURE_LENGTH inputStream
Load the PNG image from the byte stream Image Data load From Byte Stream try read Signature Png Chunk Reader chunk Reader new Png Chunk Reader input Stream header Chunk chunk Reader get Ihdr Chunk int image Size get Aligned Bytes Per Row header Chunk get Height data new byte image Size image Data Image Data internal new header Chunk get Width header Chunk get Height header Chunk get Swt Bits Per Pixel new Palette Data 0 0 0 4 data 0 null null 1 1 SWT IMAGE PNG 0 0 0 0 if header Chunk uses Direct Color image Data palette header Chunk get Palette Data Read and process chunks until the IEND chunk is encountered while chunk Reader has More Chunks read Next Chunk chunk Reader return new Image Data image Data catch IO Exception e SWT error SWT ERROR INVALID IMAGE return null  ImageData loadFromByteStream readSignature PngChunkReader chunkReader PngChunkReader inputStream headerChunk chunkReader getIhdrChunk imageSize getAlignedBytesPerRow headerChunk getHeight imageSize imageData ImageData internal_new headerChunk getWidth headerChunk getHeight headerChunk getSwtBitsPerPixel PaletteData IMAGE_PNG headerChunk usesDirectColor imageData headerChunk getPaletteData chunkReader hasMoreChunks readNextChunk chunkReader ImageData imageData IOException ERROR_INVALID_IMAGE
Read and handle the next chunk of data from the PNG file void read Next Chunk Png Chunk Reader chunk Reader Png Chunk chunk chunk Reader read Next Chunk switch chunk get Chunk Type case Png Chunk CHUNK IEND break case Png Chunk CHUNK PLTE if header Chunk uses Direct Color palette Chunk Png Plte Chunk chunk image Data palette palette Chunk get Palette Data break case Png Chunk CHUNK tRNS Png Trns Chunk trns Chunk Png Trns Chunk chunk if trns Chunk get Transparency Type header Chunk Png Trns Chunk TRANSPARENCY TYPE PIXEL image Data transparent Pixel trns Chunk get Swt Transparent Pixel header Chunk else alpha Palette trns Chunk get Alpha Values header Chunk palette Chunk int transparent Count 0 transparent Pixel 1 for int i 0 i alpha Palette length i if alpha Palette i 0xFF 255 transparent Count transparent Pixel i if transparent Count 0 alpha Palette null else if transparent Count 1 alpha Palette transparent Pixel 0 alpha Palette null image Data transparent Pixel transparent Pixel break case Png Chunk CHUNK IDAT if chunk Reader read Pixel Data All IDAT chunks in an image file must be sequential If the pixel data has already been read and another IDAT block is encountered then this is an invalid image SWT error SWT ERROR INVALID IMAGE else Read in the pixel data for the image This should go through all the image s IDAT chunks Png Idat Chunk data Chunk Png Idat Chunk chunk read Pixel Data data Chunk chunk Reader break default if chunk is Critical All critical chunks must be supported SWT error SWT ERROR NOT IMPLEMENTED  readNextChunk PngChunkReader chunkReader PngChunk chunkReader readNextChunk getChunkType PngChunk CHUNK_IEND PngChunk CHUNK_PLTE headerChunk usesDirectColor paletteChunk PngPlteChunk imageData paletteChunk getPaletteData PngChunk CHUNK_tRNS PngTrnsChunk trnsChunk PngTrnsChunk trnsChunk getTransparencyType headerChunk PngTrnsChunk TRANSPARENCY_TYPE_PIXEL imageData transparentPixel trnsChunk getSwtTransparentPixel headerChunk alphaPalette trnsChunk getAlphaValues headerChunk paletteChunk transparentCount transparentPixel alphaPalette alphaPalette transparentCount transparentPixel transparentCount alphaPalette transparentCount alphaPalette transparentPixel alphaPalette imageData transparentPixel transparentPixel PngChunk CHUNK_IDAT chunkReader readPixelData ERROR_INVALID_IMAGE PngIdatChunk dataChunk PngIdatChunk readPixelData dataChunk chunkReader isCritical ERROR_NOT_IMPLEMENTED
void unload Into Byte Stream Image Data p1 SWT error SWT ERROR NOT IMPLEMENTED  unloadIntoByteStream ImageData ERROR_NOT_IMPLEMENTED
boolean is File Format LE Data Input Stream stream try byte signature new byte SIGNATURE LENGTH stream read signature stream unread signature if signature 0 0xFF 137 return false 137 if signature 1 0xFF 80 return false P if signature 2 0xFF 78 return false N if signature 3 0xFF 71 return false G if signature 4 0xFF 13 return false RETURN if signature 5 0xFF 10 return false LINEFEED if signature 6 0xFF 26 return false CTRL Z if signature 7 0xFF 10 return false LINEFEED return true catch Exception e return false  isFileFormat LEDataInputStream SIGNATURE_LENGTH
SWT does not support 16 bit depths If this image uses 16 bit depths convert the data to an 8 bit depth byte validate Bit Depth byte data if header Chunk get Bit Depth 8 byte result new byte data length 2 compress16 Bit Depth To8 Bit Depth data 0 result 0 result length return result else return data  validateBitDepth headerChunk getBitDepth compress16BitDepthTo8BitDepth
SWT does not support greyscale as a color type For plain grayscale we create a palette For Grayscale with Alpha however we need to convert the pixels to use RGB values Note This method assumes that the bit depth of the data has already been restricted to 8 or less void set Pixel Data byte data Image Data image Data switch header Chunk get Color Type case Png Ihdr Chunk COLOR TYPE GRAYSCALE WITH ALPHA int width image Data width int height image Data height int dest Bytes Per Line image Data bytes Per Line If the image uses 16 bit depth it is converted to an 8 bit depth image int src Bytes Per Line get Aligned Bytes Per Row if header Chunk get Bit Depth 8 src Bytes Per Line 2 byte rgb Data new byte dest Bytes Per Line height byte alpha Data new byte width height for int y 0 y height y int src Index src Bytes Per Line y int dest Index dest Bytes Per Line y int dest Alpha Index width y for int x 0 x width x byte grey data src Index byte alpha data src Index 1 rgb Data dest Index 0 grey rgb Data dest Index 1 grey rgb Data dest Index 2 grey alpha Data dest Alpha Index alpha src Index 2 dest Index 3 dest Alpha Index image Data data rgb Data image Data alpha Data alpha Data break case Png Ihdr Chunk COLOR TYPE RGB WITH ALPHA int width image Data width int height image Data height int dest Bytes Per Line image Data bytes Per Line int src Bytes Per Line get Aligned Bytes Per Row If the image uses 16 bit depth it is converted to an 8 bit depth image if header Chunk get Bit Depth 8 src Bytes Per Line 2 byte rgb Data new byte dest Bytes Per Line height byte alpha Data new byte width height for int y 0 y height y int src Index src Bytes Per Line y int dest Index dest Bytes Per Line y int dest Alpha Index width y for int x 0 x width x rgb Data dest Index 0 data src Index 0 rgb Data dest Index 1 data src Index 1 rgb Data dest Index 2 data src Index 2 alpha Data dest Alpha Index data src Index 3 src Index 4 dest Index 3 dest Alpha Index image Data data rgb Data image Data alpha Data alpha Data break case Png Ihdr Chunk COLOR TYPE RGB image Data data data break case Png Ihdr Chunk COLOR TYPE PALETTE image Data data data if alpha Palette null int size image Data width image Data height byte alpha Data new byte size byte pixel Data new byte size image Data get Pixels 0 0 size pixel Data 0 for int i 0 i pixel Data length i alpha Data i alpha Palette pixel Data i 0xFF image Data alpha Data alpha Data break default image Data data data break  setPixelData ImageData imageData headerChunk getColorType PngIhdrChunk COLOR_TYPE_GRAYSCALE_WITH_ALPHA imageData imageData destBytesPerLine imageData bytesPerLine srcBytesPerLine getAlignedBytesPerRow headerChunk getBitDepth srcBytesPerLine rgbData destBytesPerLine alphaData srcIndex srcBytesPerLine destIndex destBytesPerLine destAlphaIndex srcIndex srcIndex rgbData destIndex rgbData destIndex rgbData destIndex alphaData destAlphaIndex srcIndex destIndex destAlphaIndex imageData rgbData imageData alphaData alphaData PngIhdrChunk COLOR_TYPE_RGB_WITH_ALPHA imageData imageData destBytesPerLine imageData bytesPerLine srcBytesPerLine getAlignedBytesPerRow headerChunk getBitDepth srcBytesPerLine rgbData destBytesPerLine alphaData srcIndex srcBytesPerLine destIndex destBytesPerLine destAlphaIndex rgbData destIndex srcIndex rgbData destIndex srcIndex rgbData destIndex srcIndex alphaData destAlphaIndex srcIndex srcIndex destIndex destAlphaIndex imageData rgbData imageData alphaData alphaData PngIhdrChunk COLOR_TYPE_RGB imageData PngIhdrChunk COLOR_TYPE_PALETTE imageData alphaPalette imageData imageData alphaData pixelData imageData getPixels pixelData pixelData alphaData alphaPalette pixelData imageData alphaData alphaData imageData
PNG supports some color types and bit depths that are unsupported by SWT If the image uses an unsupported color type either of the gray scale types or bit depth 16 convert the data to an SWT supported format Then assign the data into the Image Data given void set Image Data Values byte data Image Data image Data byte result validate Bit Depth data set Pixel Data result image Data  ImageData setImageDataValues ImageData imageData validateBitDepth setPixelData imageData
Read the image data from the data stream This must handle decoding the data filtering and interlacing void read Pixel Data Png Idat Chunk chunk Png Chunk Reader chunk Reader decoding Stream new Png Decoding Data Stream chunk chunk Reader int interlace Method header Chunk get Interlace Method if interlace Method Png Ihdr Chunk INTERLACE METHOD NONE read Non Interlaced Image else read Interlaced Image decoding Stream assert Image Data At End decoding Stream check Adler  readPixelData PngIdatChunk PngChunkReader chunkReader decodingStream PngDecodingDataStream chunkReader interlaceMethod headerChunk getInterlaceMethod interlaceMethod PngIhdrChunk INTERLACE_METHOD_NONE readNonInterlacedImage readInterlacedImage decodingStream assertImageDataAtEnd decodingStream checkAdler
Answer the number of bytes in a word aligned row of pixel data int get Aligned Bytes Per Row return get Bytes Per Row header Chunk get Width 3 4 4  getAlignedBytesPerRow getBytesPerRow headerChunk getWidth
Answer the number of bytes in each row of the image data Each PNG row is byte aligned so images with bit depths less than a byte may have unused bits at the end of each row The value of these bits is undefined int get Bytes Per Row return get Bytes Per Row header Chunk get Width  getBytesPerRow getBytesPerRow headerChunk getWidth
Answer the number of bytes needed to represent a pixel This value depends on the image s color type and bit depth Note that this method rounds up if an image s pixel size isn t byte aligned int get Bytes Per Pixel int bits Per Pixel header Chunk get Bits Per Pixel return bits Per Pixel 7 8  getBytesPerPixel bitsPerPixel headerChunk getBitsPerPixel bitsPerPixel
Answer the number of bytes in a row of the given pixel width Each row is byte aligned so images with bit depths less than a byte may have unused bits at the end of each row The value of these bits is undefined int get Bytes Per Row int row Width In Pixels int bits Per Pixel header Chunk get Bits Per Pixel int bits Per Row bits Per Pixel row Width In Pixels int bits Per Byte 8 return bits Per Row bits Per Byte 1 bits Per Byte  getBytesPerRow rowWidthInPixels bitsPerPixel headerChunk getBitsPerPixel bitsPerRow bitsPerPixel rowWidthInPixels bitsPerByte bitsPerRow bitsPerByte bitsPerByte
1 Read one of the seven frames of interlaced data 2 Update the image Data 3 Notify the image loader s listeners of the frame load void read Interlace Frame int row Interval int column Interval int start Row int start Column int frame Count int width header Chunk get Width int aligned Bytes Per Row get Aligned Bytes Per Row int height header Chunk get Height if start Row height start Column width return int pixels Per Row width start Column column Interval 1 column Interval int bytes Per Row get Bytes Per Row pixels Per Row byte row1 new byte bytes Per Row byte row2 new byte bytes Per Row byte current Row row1 byte last Row row2 for int row start Row row height row row Interval byte filter Type decoding Stream get Next Decoded Byte for int col 0 col bytes Per Row col current Row col decoding Stream get Next Decoded Byte filter Row current Row last Row filter Type if header Chunk get Bit Depth 8 int bytes Per Pixel get Bytes Per Pixel int data Offset row aligned Bytes Per Row start Column bytes Per Pixel for int row Offset 0 row Offset current Row length row Offset bytes Per Pixel for int byte Offset 0 byte Offset bytes Per Pixel byte Offset data data Offset byte Offset current Row row Offset byte Offset data Offset column Interval bytes Per Pixel else int bits Per Pixel header Chunk get Bit Depth int pixels Per Byte 8 bits Per Pixel int column start Column int row Base row aligned Bytes Per Row int value Mask 0 for int i 0 i bits Per Pixel i value Mask 1 value Mask 1 int max Shift 8 bits Per Pixel for int byte Offset 0 byte Offset current Row length byte Offset for int bit Offset max Shift bit Offset 0 bit Offset bits Per Pixel if column width int data Offset row Base column bits Per Pixel 8 int value current Row byte Offset bit Offset value Mask int data Shift max Shift bits Per Pixel column pixels Per Byte data data Offset value data Shift column column Interval current Row current Row row1 row2 row1 last Row last Row row1 row2 row1 set Image Data Values data image Data fire Interlaced Frame Event frame Count  imageData readInterlaceFrame rowInterval columnInterval startRow startColumn frameCount headerChunk getWidth alignedBytesPerRow getAlignedBytesPerRow headerChunk getHeight startRow startColumn pixelsPerRow startColumn columnInterval columnInterval bytesPerRow getBytesPerRow pixelsPerRow bytesPerRow bytesPerRow currentRow lastRow startRow rowInterval filterType decodingStream getNextDecodedByte bytesPerRow currentRow decodingStream getNextDecodedByte filterRow currentRow lastRow filterType headerChunk getBitDepth bytesPerPixel getBytesPerPixel dataOffset alignedBytesPerRow startColumn bytesPerPixel rowOffset rowOffset currentRow rowOffset bytesPerPixel byteOffset byteOffset bytesPerPixel byteOffset dataOffset byteOffset currentRow rowOffset byteOffset dataOffset columnInterval bytesPerPixel bitsPerPixel headerChunk getBitDepth pixelsPerByte bitsPerPixel startColumn rowBase alignedBytesPerRow valueMask bitsPerPixel valueMask valueMask maxShift bitsPerPixel byteOffset byteOffset currentRow byteOffset bitOffset maxShift bitOffset bitOffset bitsPerPixel dataOffset rowBase bitsPerPixel currentRow byteOffset bitOffset valueMask dataShift maxShift bitsPerPixel pixelsPerByte dataOffset dataShift columnInterval currentRow currentRow lastRow lastRow setImageDataValues imageData fireInterlacedFrameEvent frameCount
Read the pixel data for an interlaced image from the data stream void read Interlaced Image read Interlace Frame 8 8 0 0 0 read Interlace Frame 8 8 0 4 1 read Interlace Frame 8 4 4 0 2 read Interlace Frame 4 4 0 2 3 read Interlace Frame 4 2 2 0 4 read Interlace Frame 2 2 0 1 5 read Interlace Frame 2 1 1 0 6  readInterlacedImage readInterlaceFrame readInterlaceFrame readInterlaceFrame readInterlaceFrame readInterlaceFrame readInterlaceFrame readInterlaceFrame
Fire an event to let listeners know that an interlaced frame has been loaded final Frame should be true if the image has finished loading false if there are more frames to come void fire Interlaced Frame Event int frame Count if loader has Listeners Image Data image Image Data image Data clone boolean final Frame frame Count 6 loader notify Listeners new Image Loader Event loader image frame Count final Frame  finalFrame fireInterlacedFrameEvent frameCount hasListeners ImageData ImageData imageData finalFrame frameCount notifyListeners ImageLoaderEvent frameCount finalFrame
Read the pixel data for a non interlaced image from the data stream Update the image Data to reflect the new data void read Non Interlaced Image int data Offset 0 int aligned Bytes Per Row get Aligned Bytes Per Row int bytes Per Row get Bytes Per Row byte row1 new byte bytes Per Row byte row2 new byte bytes Per Row byte current Row row1 byte last Row row2 for int row 0 row header Chunk get Height row byte filter Type decoding Stream get Next Decoded Byte for int col 0 col bytes Per Row col current Row col decoding Stream get Next Decoded Byte filter Row current Row last Row filter Type System arraycopy current Row 0 data data Offset bytes Per Row data Offset aligned Bytes Per Row current Row current Row row1 row2 row1 last Row last Row row1 row2 row1 set Image Data Values data image Data  imageData readNonInterlacedImage dataOffset alignedBytesPerRow getAlignedBytesPerRow bytesPerRow getBytesPerRow bytesPerRow bytesPerRow currentRow lastRow headerChunk getHeight filterType decodingStream getNextDecodedByte bytesPerRow currentRow decodingStream getNextDecodedByte filterRow currentRow lastRow filterType currentRow dataOffset bytesPerRow dataOffset alignedBytesPerRow currentRow currentRow lastRow lastRow setImageDataValues imageData
SWT does not support 16 bit depth color formats Convert the 16 bit data to 8 bit data The correct way to do this is to multiply each 16 bit value by the value 2 8 1 2 16 1 The fast way to do this is just to drop the low byte of the 16 bit value static void compress16 Bit Depth To8 Bit Depth byte source int source Offset byte destination int destination Offset int number Of Values double multiplier Compatibility pow2 8 1 Compatibility pow2 16 1 for int i 0 i number Of Values i int source Index source Offset 2 i int destination Index destination Offset i int value source source Index 8 source source Index 1 byte compressed Value byte value multiplier byte compressed Value source source Index destination destination Index compressed Value  compress16BitDepthTo8BitDepth sourceOffset destinationOffset numberOfValues numberOfValues sourceIndex sourceOffset destinationIndex destinationOffset sourceIndex sourceIndex compressedValue compressedValue sourceIndex destinationIndex compressedValue
SWT does not support 16 bit depth color formats Convert the 16 bit data to 8 bit data The correct way to do this is to multiply each 16 bit value by the value 2 8 1 2 16 1 The fast way to do this is just to drop the low byte of the 16 bit value static int compress16 Bit Depth To8 Bit Depth int value double multiplier Compatibility pow2 8 1 Compatibility pow2 16 1 byte compressed Value byte value multiplier return value 8  compress16BitDepthTo8BitDepth compressedValue
PNG supports four filtering types These types are applied per row of image data This method unfilters the given row based on the filter Type void filter Row byte row byte previous Row int filter Type int byte Offset header Chunk get Filter Byte Offset switch filter Type case Png Ihdr Chunk FILTER NONE break case Png Ihdr Chunk FILTER SUB for int i byte Offset i row length i int current row i 0xFF int left row i byte Offset 0xFF row i byte current left 0xFF break case Png Ihdr Chunk FILTER UP for int i 0 i row length i int current row i 0xFF int above previous Row i 0xFF row i byte current above 0xFF break case Png Ihdr Chunk FILTER AVERAGE for int i 0 i row length i int left i byte Offset 0 row i byte Offset 0xFF int above previous Row i 0xFF int current row i 0xFF row i byte current left above 2 0xFF break case Png Ihdr Chunk FILTER PAETH for int i 0 i row length i int left i byte Offset 0 row i byte Offset 0xFF int above Left i byte Offset 0 previous Row i byte Offset 0xFF int above previous Row i 0xFF int a Math abs above above Left int b Math abs left above Left int c Math abs left above Left above above Left int preductor 0 if a b a c preductor left else if b c preductor above else preductor above Left int current Value row i 0xFF row i byte current Value preductor 0xFF break  filterType filterRow previousRow filterType byteOffset headerChunk getFilterByteOffset filterType PngIhdrChunk FILTER_NONE PngIhdrChunk FILTER_SUB byteOffset byteOffset PngIhdrChunk FILTER_UP previousRow PngIhdrChunk FILTER_AVERAGE byteOffset byteOffset previousRow PngIhdrChunk FILTER_PAETH byteOffset byteOffset aboveLeft byteOffset previousRow byteOffset previousRow aboveLeft aboveLeft aboveLeft aboveLeft aboveLeft currentValue currentValue

Png Huffman Table int lengths super initialize lengths generate Table lengths  PngHuffmanTable generateTable
private void initialize int lengths code Values new int lengths length for int i 0 i code Values length i code Values i i min Codes By Length n The smallest Huffman code of length n 1 max Codes By Length n The largest Huffman code of length n 1 indexes By Length n Index into the values array First value with a code of length n 1 code Length Info new Code Length Info MAX CODE LENGTH for int i 0 i MAX CODE LENGTH i code Length Info i new Code Length Info code Length Info i length i code Length Info i base Index 0 code Length Info i min BAD CODE code Length Info i max 1  codeValues codeValues codeValues minCodesByLength maxCodesByLength indexesByLength codeLengthInfo CodeLengthInfo MAX_CODE_LENGTH MAX_CODE_LENGTH codeLengthInfo CodeLengthInfo codeLengthInfo codeLengthInfo baseIndex codeLengthInfo BAD_CODE codeLengthInfo
private void generate Table int lengths Sort the values Primary key is code size Secondary key is value for int i 0 i lengths length 1 i for int j i 1 j lengths length j if lengths j lengths i lengths j lengths i code Values j code Values i int tmp tmp lengths j lengths j lengths i lengths i tmp tmp code Values j code Values j code Values i code Values i tmp These values in these arrays correspond to the elements of the values array The Huffman code for code Values N is codes N and the length of the code is lengths N int codes new int lengths length int last Length 0 int code 0 for int i 0 i lengths length i while last Length lengths i last Length code 1 if last Length 0 codes i code code int last 0 for int i 0 i lengths length i if last lengths i last lengths i code Length Info last 1 base Index i code Length Info last 1 min codes i if last 0 code Length Info last 1 max codes i  generateTable codeValues codeValues codeValues codeValues codeValues codeValues codeValues lastLength lastLength lastLength lastLength codeLengthInfo baseIndex codeLengthInfo codeLengthInfo
int get Next Value Png Decoding Data Stream stream int code stream get Next Idat Bit int codelength 0 Here we are taking advantage of the fact that 1 bits are used as a prefix to the longer code Values while codelength MAX CODE LENGTH code code Length Info codelength max code code 1 stream get Next Idat Bit codelength if codelength MAX CODE LENGTH stream error Now we have a Huffman code of length codelength 1 that is somewhere in the range min Codes By Length codelength max Codes By Length codelength This code is the offset 1 th code of codelength 1 int offset code code Length Info codelength min indexes By Length codelength is the first code of length codelength 1 so now we can look up the value for the Huffman code in the table int index code Length Info codelength base Index offset return code Values index  getNextValue PngDecodingDataStream getNextIdatBit codeValues MAX_CODE_LENGTH codeLengthInfo getNextIdatBit MAX_CODE_LENGTH minCodesByLength maxCodesByLength codeLengthInfo indexesByLength codeLengthInfo baseIndex codeValues

static Png Huffman Tables get Dynamic Tables Png Decoding Data Stream stream return new Png Huffman Tables stream  PngHuffmanTables getDynamicTables PngDecodingDataStream PngHuffmanTables
return new Png Huffman Tables stream static Png Huffman Tables get Fixed Tables return new Png Huffman Tables  PngHuffmanTables PngHuffmanTables getFixedTables PngHuffmanTables
private Png Huffman Table get Fixed Literal Table if Fixed Literal Table null Fixed Literal Table new Png Huffman Table Fixed Literal Lengths return Fixed Literal Table  PngHuffmanTable getFixedLiteralTable FixedLiteralTable FixedLiteralTable PngHuffmanTable FixedLiteralLengths FixedLiteralTable
private Png Huffman Table get Fixed Distance Table if Fixed Distance Table null Fixed Distance Table new Png Huffman Table Fixed Distance Lengths return Fixed Distance Table  PngHuffmanTable getFixedDistanceTable FixedDistanceTable FixedDistanceTable PngHuffmanTable FixedDistanceLengths FixedDistanceTable
private Png Huffman Tables literal Table get Fixed Literal Table distance Table get Fixed Distance Table  PngHuffmanTables literalTable getFixedLiteralTable distanceTable getFixedDistanceTable
private Png Huffman Tables Png Decoding Data Stream stream int literals Png Lz Block Reader FIRST LENGTH CODE stream get Next Idat Bits 5 int distances Png Lz Block Reader FIRST DISTANCE CODE stream get Next Idat Bits 5 int code Length Codes Png Lz Block Reader FIRST CODE LENGTH CODE stream get Next Idat Bits 4 if code Length Codes Png Lz Block Reader LAST CODE LENGTH CODE stream error Tricky tricky tricky The length codes are stored in a very odd order For the order see the definition of the static field length Code Order Also the data may not contain values for all the codes It may just contain values for the first X number of codes The table should be of size Length Code Table Size regardless of the number of values actually given in the table int length Codes new int Length Code Table Size for int i 0 i code Length Codes i length Codes Length Code Order i stream get Next Idat Bits 3 Png Huffman Table code Lengths Table new Png Huffman Table length Codes int literal Lengths read Lengths stream literals code Lengths Table Literal Table Size int distance Lengths read Lengths stream distances code Lengths Table Distance Table Size literal Table new Png Huffman Table literal Lengths distance Table new Png Huffman Table distance Lengths  PngHuffmanTables PngDecodingDataStream PngLzBlockReader FIRST_LENGTH_CODE getNextIdatBits PngLzBlockReader FIRST_DISTANCE_CODE getNextIdatBits codeLengthCodes PngLzBlockReader FIRST_CODE_LENGTH_CODE getNextIdatBits codeLengthCodes PngLzBlockReader LAST_CODE_LENGTH_CODE lengthCodeOrder LengthCodeTableSize lengthCodes LengthCodeTableSize codeLengthCodes lengthCodes LengthCodeOrder getNextIdatBits PngHuffmanTable codeLengthsTable PngHuffmanTable lengthCodes literalLengths readLengths codeLengthsTable LiteralTableSize distanceLengths readLengths codeLengthsTable DistanceTableSize literalTable PngHuffmanTable literalLengths distanceTable PngHuffmanTable distanceLengths
private int read Lengths Png Decoding Data Stream stream int num Lengths Png Huffman Table lengths Table int table Size int lengths new int table Size for int index 0 index num Lengths int value lengths Table get Next Value stream if value 16 Literal value lengths index value index else if value 16 Repeat the previous code 3 6 times int count stream get Next Idat Bits 2 3 for int i 0 i count i lengths index lengths index 1 index else if value 17 Repeat 0 3 10 times int count stream get Next Idat Bits 3 3 for int i 0 i count i lengths index 0 index else if value 18 Repeat 0 11 138 times int count stream get Next Idat Bits 7 11 for int i 0 i count i lengths index 0 index else stream error return lengths  readLengths PngDecodingDataStream numLengths PngHuffmanTable lengthsTable tableSize tableSize numLengths lengthsTable getNextValue getNextIdatBits getNextIdatBits getNextIdatBits
int get Next Literal Value Png Decoding Data Stream stream return literal Table get Next Value stream  getNextLiteralValue PngDecodingDataStream literalTable getNextValue
int get Next Distance Value Png Decoding Data Stream stream return distance Table get Next Value stream  getNextDistanceValue PngDecodingDataStream distanceTable getNextValue

class Png Idat Chunk extends Png Chunk Png Idat Chunk byte reference super reference  PngIdatChunk PngChunk PngIdatChunk
Answer whether the chunk is a valid IDAT chunk void validate Png File Read State read State Png Ihdr Chunk header Chunk if read State readIHDR header Chunk get Must Have Palette read State readPLTE read State readIEND SWT error SWT ERROR INVALID IMAGE else read State readIDAT true super validate read State header Chunk  PngFileReadState readState PngIhdrChunk headerChunk readState headerChunk getMustHavePalette readState readState ERROR_INVALID_IMAGE readState readState headerChunk
byte get Data Byte At Offset int offset return reference DATA OFFSET offset  getDataByteAtOffset DATA_OFFSET

class Png Iend Chunk extends Png Chunk Png Iend Chunk byte reference super reference  PngIendChunk PngChunk PngIendChunk
Answer whether the chunk is a valid IEND chunk void validate Png File Read State read State Png Ihdr Chunk header Chunk An IEND chunk is invalid if no IHDR has been read Or if a palette is required and has not been read Or if no IDAT chunk has been read if read State readIHDR header Chunk get Must Have Palette read State readPLTE read State readIDAT read State readIEND SWT error SWT ERROR INVALID IMAGE else read State readIEND true super validate read State header Chunk IEND chunks are not allowed to have any data if get Length 0 SWT error SWT ERROR INVALID IMAGE  PngFileReadState readState PngIhdrChunk headerChunk readState headerChunk getMustHavePalette readState readState readState ERROR_INVALID_IMAGE readState readState headerChunk getLength ERROR_INVALID_IMAGE

Construct a PNG Chunk using the reference bytes given Png Ihdr Chunk byte reference super reference  PNGChunk PngIhdrChunk
Get the image s width in pixels int get Width return get Int32 WIDTH DATA OFFSET  getWidth getInt32 WIDTH_DATA_OFFSET
Set the image s width in pixels void set Width int value set Int32 WIDTH DATA OFFSET value  setWidth setInt32 WIDTH_DATA_OFFSET
Get the image s height in pixels int get Height return get Int32 HEIGHT DATA OFFSET  getHeight getInt32 HEIGHT_DATA_OFFSET
Set the image s height in pixels void set Height int value set Int32 HEIGHT DATA OFFSET value  setHeight setInt32 HEIGHT_DATA_OFFSET
Get the image s bit depth This is limited to the values 1 2 4 8 or 16 byte get Bit Depth return reference BIT DEPTH OFFSET  getBitDepth BIT_DEPTH_OFFSET
Set the image s bit depth This is limited to the values 1 2 4 8 or 16 void set Bit Depth byte value reference BIT DEPTH OFFSET value  setBitDepth BIT_DEPTH_OFFSET
Get the image s color type This is limited to the values 0 Grayscale image 2 RGB triple 3 Palette 4 Grayscale with Alpha channel 6 RGB with Alpha channel byte get Color Type return reference COLOR TYPE OFFSET  getColorType COLOR_TYPE_OFFSET
Set the image s color type This is limited to the values 0 Grayscale image 2 RGB triple 3 Palette 4 Grayscale with Alpha channel 6 RGB with Alpha channel void set Color Type byte value reference COLOR TYPE OFFSET value  setColorType COLOR_TYPE_OFFSET
Get the image s compression method This value must be 0 byte get Compression Method return reference COMPRESSION METHOD OFFSET  getCompressionMethod COMPRESSION_METHOD_OFFSET
Set the image s compression method This value must be 0 void set Compression Method byte value reference COMPRESSION METHOD OFFSET value  setCompressionMethod COMPRESSION_METHOD_OFFSET
Get the image s filter method This value must be 0 byte get Filter Method return reference FILTER METHOD OFFSET  getFilterMethod FILTER_METHOD_OFFSET
Set the image s filter method This value must be 0 void set Filter Method byte value reference FILTER METHOD OFFSET value  setFilterMethod FILTER_METHOD_OFFSET
Get the image s interlace method This value is limited to 0 No interlacing used 1 Adam7 interlacing used byte get Interlace Method return reference INTERLACE METHOD OFFSET  getInterlaceMethod INTERLACE_METHOD_OFFSET
Set the image s interlace method This value is limited to 0 No interlacing used 1 Adam7 interlacing used void set Interlace Method byte value reference INTERLACE METHOD OFFSET value  setInterlaceMethod INTERLACE_METHOD_OFFSET
Answer whether the chunk is a valid IHDR chunk void validate Png File Read State read State Png Ihdr Chunk header Chunk An IHDR chunk is invalid if any other chunk has been read if read State readIHDR read State readPLTE read State readIDAT read State readIEND SWT error SWT ERROR INVALID IMAGE else read State readIHDR true super validate read State header Chunk if get Length EXPECTED DATA LENGTH SWT error SWT ERROR INVALID IMAGE if get Compression Method 0 SWT error SWT ERROR INVALID IMAGE if get Interlace Method INTERLACE METHOD NONE get Interlace Method INTERLACE METHOD ADAM7 SWT error SWT ERROR INVALID IMAGE boolean color Type Is Valid false byte color Type get Color Type for int i 0 i Valid Color Types length i if Valid Color Types i color Type color Type Is Valid true break if color Type Is Valid SWT error SWT ERROR INVALID IMAGE boolean bit Depth Is Valid false byte bit Depth get Bit Depth for int i 0 i Valid Bit Depths length i if Valid Bit Depths i bit Depth bit Depth Is Valid true break if bit Depth Is Valid SWT error SWT ERROR INVALID IMAGE if color Type COLOR TYPE RGB color Type COLOR TYPE RGB WITH ALPHA color Type COLOR TYPE GRAYSCALE WITH ALPHA bit Depth 8 SWT error SWT ERROR INVALID IMAGE if color Type COLOR TYPE PALETTE bit Depth 8 SWT error SWT ERROR INVALID IMAGE  PngFileReadState readState PngIhdrChunk headerChunk readState readState readState readState ERROR_INVALID_IMAGE readState readState headerChunk getLength EXPECTED_DATA_LENGTH ERROR_INVALID_IMAGE getCompressionMethod ERROR_INVALID_IMAGE getInterlaceMethod INTERLACE_METHOD_NONE getInterlaceMethod INTERLACE_METHOD_ADAM7 ERROR_INVALID_IMAGE colorTypeIsValid colorType getColorType ValidColorTypes ValidColorTypes colorType colorTypeIsValid colorTypeIsValid ERROR_INVALID_IMAGE bitDepthIsValid bitDepth getBitDepth ValidBitDepths ValidBitDepths bitDepth bitDepthIsValid bitDepthIsValid ERROR_INVALID_IMAGE colorType COLOR_TYPE_RGB colorType COLOR_TYPE_RGB_WITH_ALPHA colorType COLOR_TYPE_GRAYSCALE_WITH_ALPHA bitDepth ERROR_INVALID_IMAGE colorType COLOR_TYPE_PALETTE bitDepth ERROR_INVALID_IMAGE
String get Color Type String switch get Color Type case COLOR TYPE GRAYSCALE return Grayscale case COLOR TYPE RGB return RGB case COLOR TYPE PALETTE return Palette case COLOR TYPE GRAYSCALE WITH ALPHA return Grayscale with Alpha case COLOR TYPE RGB WITH ALPHA return RGB with Alpha default return Unknown get Color Type  getColorTypeString getColorType COLOR_TYPE_GRAYSCALE COLOR_TYPE_RGB COLOR_TYPE_PALETTE COLOR_TYPE_GRAYSCALE_WITH_ALPHA COLOR_TYPE_RGB_WITH_ALPHA getColorType
String get Filter Method String switch get Filter Method case FILTER NONE return None case FILTER SUB return Sub case FILTER UP return Up case FILTER AVERAGE return Average case FILTER PAETH return Paeth default return Unknown  getFilterMethodString getFilterMethod FILTER_NONE FILTER_SUB FILTER_UP FILTER_AVERAGE FILTER_PAETH
String get Interlace Method String switch get Interlace Method case INTERLACE METHOD NONE return Not Interlaced case INTERLACE METHOD ADAM7 return Interlaced ADAM7 default return Unknown  getInterlaceMethodString getInterlaceMethod INTERLACE_METHOD_NONE INTERLACE_METHOD_ADAM7
void contribute To String String Buffer buffer buffer append n t Width buffer append get Width buffer append n t Height buffer append get Height buffer append n t Bit Depth buffer append get Bit Depth buffer append n t Color Type buffer append get Color Type String buffer append n t Compression Method buffer append get Compression Method buffer append n t Filter Method buffer append get Filter Method String buffer append n t Interlace Method buffer append get Interlace Method String  contributeToString StringBuffer tWidth getWidth tHeight getHeight tBit getBitDepth tColor getColorTypeString tCompression getCompressionMethod tFilter getFilterMethodString tInterlace getInterlaceMethodString
boolean get Must Have Palette return get Color Type COLOR TYPE PALETTE  getMustHavePalette getColorType COLOR_TYPE_PALETTE
boolean get Can Have Palette int color Type get Color Type return color Type COLOR TYPE GRAYSCALE color Type COLOR TYPE GRAYSCALE WITH ALPHA  getCanHavePalette colorType getColorType colorType COLOR_TYPE_GRAYSCALE colorType COLOR_TYPE_GRAYSCALE_WITH_ALPHA
Answer the pixel size in bits based on the color type and bit depth int get Bits Per Pixel int bit Depth get Bit Depth switch get Color Type case COLOR TYPE RGB WITH ALPHA return 4 bit Depth case COLOR TYPE RGB return 3 bit Depth case COLOR TYPE GRAYSCALE WITH ALPHA return 2 bit Depth case COLOR TYPE GRAYSCALE case COLOR TYPE PALETTE return bit Depth default SWT error SWT ERROR INVALID IMAGE return 0  getBitsPerPixel bitDepth getBitDepth getColorType COLOR_TYPE_RGB_WITH_ALPHA bitDepth COLOR_TYPE_RGB bitDepth COLOR_TYPE_GRAYSCALE_WITH_ALPHA bitDepth COLOR_TYPE_GRAYSCALE COLOR_TYPE_PALETTE bitDepth ERROR_INVALID_IMAGE
Answer the pixel size in bits based on the color type and bit depth int get Swt Bits Per Pixel int bit Depth get Bit Depth switch get Color Type case COLOR TYPE RGB WITH ALPHA case COLOR TYPE RGB case COLOR TYPE GRAYSCALE WITH ALPHA return 24 case COLOR TYPE GRAYSCALE case COLOR TYPE PALETTE return Math min bit Depth 8 default SWT error SWT ERROR INVALID IMAGE return 0  getSwtBitsPerPixel bitDepth getBitDepth getColorType COLOR_TYPE_RGB_WITH_ALPHA COLOR_TYPE_RGB COLOR_TYPE_GRAYSCALE_WITH_ALPHA COLOR_TYPE_GRAYSCALE COLOR_TYPE_PALETTE bitDepth ERROR_INVALID_IMAGE
int get Filter Byte Offset if get Bit Depth 8 return 1 return get Bits Per Pixel 8  getFilterByteOffset getBitDepth getBitsPerPixel
boolean uses Direct Color switch get Color Type case COLOR TYPE GRAYSCALE case COLOR TYPE GRAYSCALE WITH ALPHA case COLOR TYPE RGB case COLOR TYPE RGB WITH ALPHA return true default return false  usesDirectColor getColorType COLOR_TYPE_GRAYSCALE COLOR_TYPE_GRAYSCALE_WITH_ALPHA COLOR_TYPE_RGB COLOR_TYPE_RGB_WITH_ALPHA
Palette Data create Grayscale Palette int bit Depth Math min get Bit Depth 8 int max Compatibility pow2 bit Depth 1 int delta 255 max int gray 0 RGB rgbs new RGB max 1 for int i 0 i max i rgbs i new RGB gray gray gray gray delta return new Palette Data rgbs  PaletteData createGrayscalePalette bitDepth getBitDepth bitDepth PaletteData
Palette Data get Palette Data switch get Color Type case COLOR TYPE GRAYSCALE return create Grayscale Palette case COLOR TYPE GRAYSCALE WITH ALPHA case COLOR TYPE RGB case COLOR TYPE RGB WITH ALPHA return new Palette Data 0xFF0000 0xFF00 0xFF default return null  PaletteData getPaletteData getColorType COLOR_TYPE_GRAYSCALE createGrayscalePalette COLOR_TYPE_GRAYSCALE_WITH_ALPHA COLOR_TYPE_RGB COLOR_TYPE_RGB_WITH_ALPHA PaletteData

Png Lz Block Reader Png Decoding Data Stream stream this stream stream read Header false is Last Block false  PngLzBlockReader PngDecodingDataStream readHeader isLastBlock
void set Window Size int window Size window new byte window Size  setWindowSize windowSize windowSize
void read Next Block Header is Last Block stream get Next Idat Bit 0 compression Type byte stream get Next Idat Bits 2 0xFF if compression Type 2 stream error if compression Type UNCOMPRESSED byte b1 stream get Next Idat Byte byte b2 stream get Next Idat Byte byte b3 stream get Next Idat Byte byte b4 stream get Next Idat Byte if b1 b3 b2 b4 stream error uncompressed Bytes Remaining b1 0xFF b2 0xFF 8 else if compression Type COMPRESSED DYNAMIC huffman Tables Png Huffman Tables get Dynamic Tables stream else huffman Tables Png Huffman Tables get Fixed Tables  readNextBlockHeader isLastBlock getNextIdatBit compressionType getNextIdatBits compressionType compressionType getNextIdatByte getNextIdatByte getNextIdatByte getNextIdatByte uncompressedBytesRemaining compressionType COMPRESSED_DYNAMIC huffmanTables PngHuffmanTables getDynamicTables huffmanTables PngHuffmanTables getFixedTables
byte get Next Byte if compression Type UNCOMPRESSED if uncompressed Bytes Remaining 0 read Next Block Header return get Next Byte uncompressed Bytes Remaining return stream get Next Idat Byte else byte value get Next Compressed Byte if value END OF COMPRESSED BLOCK if is Last Block stream error read Next Block Header return get Next Byte else return value  getNextByte compressionType uncompressedBytesRemaining readNextBlockHeader getNextByte uncompressedBytesRemaining getNextIdatByte getNextCompressedByte END_OF_COMPRESSED_BLOCK isLastBlock readNextBlockHeader getNextByte
private void assert Block At End if compression Type UNCOMPRESSED if uncompressed Bytes Remaining 0 stream error else if copy Bytes Remaining 0 huffman Tables get Next Literal Value stream END OF COMPRESSED BLOCK stream error  assertBlockAtEnd compressionType uncompressedBytesRemaining copyBytesRemaining huffmanTables getNextLiteralValue END_OF_COMPRESSED_BLOCK
void assert Compressed Data At End assert Block At End while is Last Block read Next Block Header assert Block At End  assertCompressedDataAtEnd assertBlockAtEnd isLastBlock readNextBlockHeader assertBlockAtEnd
private byte get Next Compressed Byte if copy Bytes Remaining 0 byte value window copy Index window window Index value copy Bytes Remaining copy Index window Index if copy Index window length copy Index 0 if window Index window length window Index 0 return value int value huffman Tables get Next Literal Value stream if value END OF COMPRESSED BLOCK window window Index byte value 0xFF window Index if window Index window length window Index 0 return byte value 0xFF else if value END OF COMPRESSED BLOCK read Next Block Header return get Next Byte else if value LAST LENGTH CODE int extra Bits extra Length Bits value FIRST LENGTH CODE int length length Bases value FIRST LENGTH CODE if extra Bits 0 length stream get Next Idat Bits extra Bits value huffman Tables get Next Distance Value stream if value LAST DISTANCE CODE stream error extra Bits extra Distance Bits value int distance distance Bases value if extra Bits 0 distance stream get Next Idat Bits extra Bits copy Index window Index distance if copy Index 0 copy Index window length copy Bytes Remaining length return get Next Compressed Byte else stream error return 0  getNextCompressedByte copyBytesRemaining copyIndex windowIndex copyBytesRemaining copyIndex windowIndex copyIndex copyIndex windowIndex windowIndex huffmanTables getNextLiteralValue END_OF_COMPRESSED_BLOCK windowIndex windowIndex windowIndex windowIndex END_OF_COMPRESSED_BLOCK readNextBlockHeader getNextByte LAST_LENGTH_CODE extraBits extraLengthBits FIRST_LENGTH_CODE lengthBases FIRST_LENGTH_CODE extraBits getNextIdatBits extraBits huffmanTables getNextDistanceValue LAST_DISTANCE_CODE extraBits extraDistanceBits distanceBases extraBits getNextIdatBits extraBits copyIndex windowIndex copyIndex copyIndex copyBytesRemaining getNextCompressedByte

class Png Plte Chunk extends Png Chunk Png Plte Chunk byte reference super reference  PngPlteChunk PngChunk PngPlteChunk
Get the number of colors in this palette int get Palette Size return get Length 3  getPaletteSize getLength
Get a Palette Data object representing the colors stored in this PLTE chunk The result should be cached as the PLTE chunk does not store the palette data created Palette Data get Palette Data RGB rgbs new RGB get Palette Size int start DATA OFFSET int end DATA OFFSET get Length for int i 0 i rgbs length i int offset DATA OFFSET i 3 int red reference offset 0xFF int green reference offset 1 0xFF int blue reference offset 2 0xFF rgbs i new RGB red green blue return new Palette Data rgbs  PaletteData PaletteData getPaletteData getPaletteSize DATA_OFFSET DATA_OFFSET getLength DATA_OFFSET PaletteData
Answer whether the chunk is a valid PLTE chunk void validate Png File Read State read State Png Ihdr Chunk header Chunk A PLTE chunk is invalid if no IHDR has been read or if any PLTE IDAT or IEND chunk has been read if read State readIHDR read State readPLTE read State readTRNS read State readBKGD read State readIDAT read State readIEND SWT error SWT ERROR INVALID IMAGE else read State readPLTE true super validate read State header Chunk Palettes cannot be included in grayscale images if header Chunk get Can Have Palette SWT error SWT ERROR INVALID IMAGE Palette chunks data fields must be event multiples of 3 Each 3 byte group represents an RGB value if get Length 3 0 SWT error SWT ERROR INVALID IMAGE Palettes cannot have more entries than 2 bit Depth where bit Depth is the bit depth of the image given in the IHDR chunk if Compatibility pow2 header Chunk get Bit Depth get Palette Size SWT error SWT ERROR INVALID IMAGE Palettes cannot have more than 256 entries if 256 get Palette Size SWT error SWT ERROR INVALID IMAGE  PngFileReadState readState PngIhdrChunk headerChunk readState readState readState readState readState readState ERROR_INVALID_IMAGE readState readState headerChunk headerChunk getCanHavePalette ERROR_INVALID_IMAGE getLength ERROR_INVALID_IMAGE bitDepth bitDepth headerChunk getBitDepth getPaletteSize ERROR_INVALID_IMAGE getPaletteSize ERROR_INVALID_IMAGE
void contribute To String String Buffer buffer buffer append n t Palette size buffer append get Palette Size  contributeToString StringBuffer tPalette getPaletteSize

static final int TRANSPARENCY TYPE ALPHAS 1 Png Trns Chunk byte reference super reference  TRANSPARENCY_TYPE_ALPHAS PngTrnsChunk
void validate Length Png Ihdr Chunk header Png Plte Chunk palette Chunk boolean valid switch header get Color Type case Png Ihdr Chunk COLOR TYPE RGB Three 2 byte values RGB valid get Length 6 break case Png Ihdr Chunk COLOR TYPE PALETTE Three 2 byte values RGB valid get Length palette Chunk get Length break case Png Ihdr Chunk COLOR TYPE GRAYSCALE One 2 byte value valid get Length 2 break Cannot use both Alpha and tRNS case Png Ihdr Chunk COLOR TYPE RGB WITH ALPHA case Png Ihdr Chunk COLOR TYPE GRAYSCALE WITH ALPHA default valid false if valid SWT error SWT ERROR INVALID IMAGE  validateLength PngIhdrChunk PngPlteChunk paletteChunk getColorType PngIhdrChunk COLOR_TYPE_RGB getLength PngIhdrChunk COLOR_TYPE_PALETTE getLength paletteChunk getLength PngIhdrChunk COLOR_TYPE_GRAYSCALE getLength PngIhdrChunk COLOR_TYPE_RGB_WITH_ALPHA PngIhdrChunk COLOR_TYPE_GRAYSCALE_WITH_ALPHA ERROR_INVALID_IMAGE
Answer whether the chunk is a valid tRNS chunk void validate Png File Read State read State Png Ihdr Chunk header Chunk Png Plte Chunk palette Chunk if read State readIHDR header Chunk get Must Have Palette read State readPLTE read State readIDAT read State readIEND SWT error SWT ERROR INVALID IMAGE else read State readTRNS true validate Length header Chunk palette Chunk super validate read State header Chunk  PngFileReadState readState PngIhdrChunk headerChunk PngPlteChunk paletteChunk readState headerChunk getMustHavePalette readState readState readState ERROR_INVALID_IMAGE readState validateLength headerChunk paletteChunk readState headerChunk
int get Transparency Type Png Ihdr Chunk header if header get Color Type Png Ihdr Chunk COLOR TYPE PALETTE return TRANSPARENCY TYPE ALPHAS return TRANSPARENCY TYPE PIXEL  getTransparencyType PngIhdrChunk getColorType PngIhdrChunk COLOR_TYPE_PALETTE TRANSPARENCY_TYPE_ALPHAS TRANSPARENCY_TYPE_PIXEL
Answer the transparent pixel RGB value This is not valid for palette color types This is not valid for alpha color types This will convert a grayscale value into a palette index It will compress a 6 byte RGB into a 3 byte RGB int get Swt Transparent Pixel Png Ihdr Chunk header switch header get Color Type case Png Ihdr Chunk COLOR TYPE GRAYSCALE int gray reference DATA OFFSET 0xFF 8 reference DATA OFFSET 1 0xFF if header get Bit Depth 8 return PNG File Format compress16 Bit Depth To8 Bit Depth gray return gray 0xFF case Png Ihdr Chunk COLOR TYPE RGB int red reference DATA OFFSET 0xFF 8 reference DATA OFFSET 1 0xFF int green reference DATA OFFSET 2 0xFF 8 reference DATA OFFSET 3 0xFF int blue reference DATA OFFSET 4 0xFF 8 reference DATA OFFSET 5 0xFF if header get Bit Depth 8 red PNG File Format compress16 Bit Depth To8 Bit Depth red green PNG File Format compress16 Bit Depth To8 Bit Depth green blue PNG File Format compress16 Bit Depth To8 Bit Depth blue return red 16 green 8 blue default SWT error SWT ERROR INVALID IMAGE return 1  getSwtTransparentPixel PngIhdrChunk getColorType PngIhdrChunk COLOR_TYPE_GRAYSCALE DATA_OFFSET DATA_OFFSET getBitDepth PNGFileFormat compress16BitDepthTo8BitDepth PngIhdrChunk COLOR_TYPE_RGB DATA_OFFSET DATA_OFFSET DATA_OFFSET DATA_OFFSET DATA_OFFSET DATA_OFFSET getBitDepth PNGFileFormat compress16BitDepthTo8BitDepth PNGFileFormat compress16BitDepthTo8BitDepth PNGFileFormat compress16BitDepthTo8BitDepth ERROR_INVALID_IMAGE
Answer an array of Alpha values that correspond to the colors in the palette This is only valid for the COLOR TYPE PALETTE color type byte get Alpha Values Png Ihdr Chunk header Png Plte Chunk palette Chunk if header get Color Type Png Ihdr Chunk COLOR TYPE PALETTE SWT error SWT ERROR INVALID IMAGE byte alphas new byte palette Chunk get Palette Size int data Length get Length int i 0 for i 0 i data Length i alphas i reference DATA OFFSET i Any palette entries which do not have a corresponding alpha value in the tRNS chunk are spec d to have an alpha of 255 for int j i j alphas length j alphas j byte 255 return alphas  COLOR_TYPE_PALETTE getAlphaValues PngIhdrChunk PngPlteChunk paletteChunk getColorType PngIhdrChunk COLOR_TYPE_PALETTE ERROR_INVALID_IMAGE paletteChunk getPaletteSize dataLength getLength dataLength DATA_OFFSET

public TIFF Directory TIFF Random File Access file boolean is Little Endian Image Loader loader this file file this is Little Endian is Little Endian this loader loader  TIFFDirectory TIFFRandomFileAccess isLittleEndian ImageLoader isLittleEndian isLittleEndian
public TIFF Directory Image Data image this image image  TIFFDirectory ImageData
Pack Bits decoder int decode Pack Bits byte src byte dest int offset Dest int dest Index offset Dest int src Index 0 while src Index src length byte n src src Index if 0 n n 127 Copy next n 1 bytes literally System arraycopy src src Index dest dest Index n 1 src Index n 1 dest Index n 1 else if 127 n n 1 Copy next byte n 1 times byte value src src Index for int j 0 j n 1 j dest dest Index value src Index else Noop when n 128 src Index Number of bytes copied return dest Index offset Dest  PackBits decodePackBits offsetDest destIndex offsetDest srcIndex srcIndex srcIndex srcIndex destIndex srcIndex destIndex srcIndex destIndex srcIndex srcIndex destIndex offsetDest
int get Entry Value int type byte buffer int index return to Int buffer index 8 type  getEntryValue toInt
void get Entry Value int type byte buffer int index int values throws IO Exception int start index 8 int size int offset to Int buffer start TYPE LONG switch type case TYPE SHORT size 2 break case TYPE LONG size 4 break case TYPE RATIONAL size 8 break case TYPE ASCII case TYPE BYTE size 1 break default SWT error SWT ERROR UNSUPPORTED FORMAT return if values length size 4 buffer new byte values length size file seek offset file read buffer start 0 for int i 0 i values length i values i to Int buffer start i size type  getEntryValue IOException toInt TYPE_LONG TYPE_SHORT TYPE_LONG TYPE_RATIONAL TYPE_ASCII TYPE_BYTE ERROR_UNSUPPORTED_FORMAT toInt
void decode Pixels Image Data image throws IO Exception Each row is byte aligned byte image Data new byte image Width depth 7 8 image Length image data image Data int dest Index 0 int length strip Offsets length for int i 0 i length i Read a strip byte data new byte strip Byte Counts i file seek strip Offsets i file read data if compression COMPRESSION NONE System arraycopy data 0 image Data dest Index data length dest Index data length else if compression COMPRESSION PACKBITS dest Index decode Pack Bits data image Data dest Index else if compression COMPRESSION CCITT 3 1 compression 3 TIFF Modified Huffman Codec codec new TIFF Modified Huffman Codec int n Rows rows Per Strip if i length 1 int n image Length rows Per Strip if n 0 n Rows n dest Index codec decode data image Data dest Index image Width n Rows if loader has Listeners loader notify Listeners new Image Loader Event loader image i i length 1  decodePixels ImageData IOException imageData imageWidth imageLength imageData destIndex stripOffsets stripByteCounts stripOffsets COMPRESSION_NONE imageData destIndex destIndex COMPRESSION_PACKBITS destIndex decodePackBits imageData destIndex COMPRESSION_CCITT_3_1 TIFFModifiedHuffmanCodec TIFFModifiedHuffmanCodec nRows rowsPerStrip imageLength rowsPerStrip nRows destIndex imageData destIndex imageWidth nRows hasListeners notifyListeners ImageLoaderEvent
Palette Data get Color Map throws IO Exception int num Colors 1 bits Per Sample 0 R G B entries are 16 bit wide 2 bytes int num Bytes 3 2 num Colors byte buffer new byte num Bytes file seek color Map Offset file read buffer RGB colors new RGB num Colors SWT does not support 16 bit depth color formats Convert the 16 bit data to 8 bit data The correct way to do this is to multiply each 16 bit value by the value 2 8 1 2 16 1 The fast way to do this is just to drop the low byte of the 16 bit value int offset is Little Endian 1 0 int startG 2 num Colors int startB startG 2 num Colors for int i 0 i num Colors i int r buffer offset 0xFF int g buffer startG offset 0xFF int b buffer startB offset 0xFF colors i new RGB r g b offset 2 return new Palette Data colors  PaletteData getColorMap IOException numColors bitsPerSample numBytes numColors numBytes colorMapOffset numColors isLittleEndian numColors numColors numColors PaletteData
Palette Data get Gray Palette int num Colors 1 bits Per Sample 0 RGB rgbs new RGB num Colors for int i 0 i num Colors i int value i 0xFF num Colors 1 if photometric Interpretation 0 value 0xFF value rgbs i new RGB value value value return new Palette Data rgbs  PaletteData getGrayPalette numColors bitsPerSample numColors numColors numColors photometricInterpretation PaletteData
Palette Data getRGB Palette int bitsR int bitsG int bitsB int blue Mask 0 for int i 0 i bitsB i blue Mask 1 i int green Mask 0 for int i bitsB i bitsB bitsG i green Mask 1 i int red Mask 0 for int i bitsB bitsG i bitsB bitsG bitsR i red Mask 1 i return new Palette Data red Mask green Mask blue Mask  PaletteData getRGBPalette blueMask blueMask greenMask greenMask redMask redMask PaletteData redMask greenMask blueMask
int format Strips int row Byte Size int nbr Rows byte data int max Strip Byte Size int offset PostIFD int extra Bytes int strips Calculate the nbr of required strips given the following requirements each strip should if possible not be greater than max Strip Byte Size each strip should contain 1 or more entire rows Format the strip fields arrays so that the image data is stored in one contiguous block This block is stored after the IFD and after any tag info described in the IFD int n nbr Rows Per Strip if row Byte Size max Strip Byte Size Each strip contains 1 row n data length row Byte Size nbr Rows Per Strip 1 else int nbr data length max Strip Byte Size 1 max Strip Byte Size nbr Rows Per Strip nbr Rows nbr n nbr Rows nbr Rows Per Strip 1 nbr Rows Per Strip int strip Byte Size row Byte Size nbr Rows Per Strip int offsets new int n int counts new int n Nbr of bytes between the end of the IFD directory and the start of the image data Keep space for at least the offsets and counts data each field being TYPE LONG 4 bytes If other tags require space between the IFD and the image block use the extra Bytes parameter If there is only one strip the offsets and counts data is stored directly in the IFD and we need not reserve space for it int postIFD Data n 1 0 n 2 4 int start Offset offset PostIFD extra Bytes postIFD Data offset of image data int offset start Offset for int i 0 i n i Store all strips sequentially to allow us to copy all pixels in one contiguous area offsets i offset counts i strip Byte Size offset strip Byte Size The last strip may contain fewer rows int mod data length strip Byte Size if mod 0 counts counts length 1 mod strips 0 offsets strips 1 counts return nbr Rows Per Strip  formatStrips rowByteSize nbrRows maxStripByteSize offsetPostIFD extraBytes maxStripByteSize nbrRowsPerStrip rowByteSize maxStripByteSize rowByteSize nbrRowsPerStrip maxStripByteSize maxStripByteSize nbrRowsPerStrip nbrRows nbrRows nbrRowsPerStrip nbrRowsPerStrip stripByteSize rowByteSize nbrRowsPerStrip TYPE_LONG extraBytes postIFDData startOffset offsetPostIFD extraBytes postIFDData startOffset stripByteSize stripByteSize stripByteSize nbrRowsPerStrip
int format Color Map RGB rgbs In a TIFF Color Map all red come first followed by green and blue All values must be converted from 8 bit to 16 bit int color Map new int rgbs length 3 int offset Green rgbs length int offset Blue rgbs length 2 for int i 0 i rgbs length i color Map i rgbs i red 8 rgbs i red color Map i offset Green rgbs i green 8 rgbs i green color Map i offset Blue rgbs i blue 8 rgbs i blue return color Map  formatColorMap ColorMap colorMap offsetGreen offsetBlue colorMap colorMap offsetGreen colorMap offsetBlue colorMap
void parse Entries byte buffer throws IO Exception for int offset 0 offset buffer length offset IFD ENTRY SIZE int tag to Int buffer offset TYPE SHORT int type to Int buffer offset 2 TYPE SHORT int count to Int buffer offset 4 TYPE LONG switch tag case TAG ImageWidth image Width get Entry Value type buffer offset break case TAG ImageLength image Length get Entry Value type buffer offset break case TAG BitsPerSample if type TYPE SHORT SWT error SWT ERROR INVALID IMAGE bits Per Sample new int count get Entry Value type buffer offset bits Per Sample break case TAG Compression compression get Entry Value type buffer offset break case TAG PhotometricInterpretation photometric Interpretation get Entry Value type buffer offset break case TAG StripOffsets if type TYPE LONG type TYPE SHORT SWT error SWT ERROR INVALID IMAGE strip Offsets new int count get Entry Value type buffer offset strip Offsets break case TAG SamplesPerPixel if type TYPE SHORT SWT error SWT ERROR INVALID IMAGE samples Per Pixel get Entry Value type buffer offset Only the basic 1 and 3 values are supported if samples Per Pixel 1 samples Per Pixel 3 SWT error SWT ERROR UNSUPPORTED DEPTH break case TAG RowsPerStrip rows Per Strip get Entry Value type buffer offset break case TAG StripByteCounts strip Byte Counts new int count get Entry Value type buffer offset strip Byte Counts break case TAG XResolution Ignored break case TAG YResolution Ignored break case TAG T4Options if type TYPE LONG SWT error SWT ERROR INVALID IMAGE t4 Options get Entry Value type buffer offset if t4 Options 0x1 1 2 dimensional coding is not supported SWT error SWT ERROR UNSUPPORTED FORMAT break case TAG ResolutionUnit Ignored break case TAG ColorMap if type TYPE SHORT SWT error SWT ERROR INVALID IMAGE Get the offset of the color Map use TYPE LONG color Map Offset get Entry Value TYPE LONG buffer offset break  parseEntries IOException IFD_ENTRY_SIZE toInt TYPE_SHORT toInt TYPE_SHORT toInt TYPE_LONG TAG_ImageWidth imageWidth getEntryValue TAG_ImageLength imageLength getEntryValue TAG_BitsPerSample TYPE_SHORT ERROR_INVALID_IMAGE bitsPerSample getEntryValue bitsPerSample TAG_Compression getEntryValue TAG_PhotometricInterpretation photometricInterpretation getEntryValue TAG_StripOffsets TYPE_LONG TYPE_SHORT ERROR_INVALID_IMAGE stripOffsets getEntryValue stripOffsets TAG_SamplesPerPixel TYPE_SHORT ERROR_INVALID_IMAGE samplesPerPixel getEntryValue samplesPerPixel samplesPerPixel ERROR_UNSUPPORTED_DEPTH TAG_RowsPerStrip rowsPerStrip getEntryValue TAG_StripByteCounts stripByteCounts getEntryValue stripByteCounts TAG_XResolution TAG_YResolution TAG_T4Options TYPE_LONG ERROR_INVALID_IMAGE t4Options getEntryValue t4Options ERROR_UNSUPPORTED_FORMAT TAG_ResolutionUnit TAG_ColorMap TYPE_SHORT ERROR_INVALID_IMAGE colorMap TYPE_LONG colorMapOffset getEntryValue TYPE_LONG
public Image Data read throws IO Exception Set TIFF default values bits Per Sample new int 1 color Map Offset NO VALUE compression 1 image Length NO VALUE image Width NO VALUE photometric Interpretation NO VALUE rows Per Strip Integer MAX VALUE samples Per Pixel 1 strip Byte Counts null strip Offsets null byte buffer new byte 2 file read buffer int number Entries to Int buffer 0 TYPE SHORT buffer new byte IFD ENTRY SIZE number Entries file read buffer parse Entries buffer Palette Data palette null depth 0 switch photometric Interpretation case 0 case 1 Bilevel or Grayscale image palette get Gray Palette depth bits Per Sample 0 break case 2 RGB image if color Map Offset NO VALUE SWT error SWT ERROR INVALID IMAGE Samples Per Pixel 3 is the only value supported palette getRGB Palette bits Per Sample 0 bits Per Sample 1 bits Per Sample 2 depth bits Per Sample 0 bits Per Sample 1 bits Per Sample 2 break case 3 Palette Color image if color Map Offset NO VALUE SWT error SWT ERROR INVALID IMAGE palette get Color Map depth bits Per Sample 0 break default SWT error SWT ERROR INVALID IMAGE Image Data image Image Data internal new image Width image Length depth palette 1 null 0 null null 1 1 SWT IMAGE TIFF 0 0 0 0 decode Pixels image return image  ImageData IOException bitsPerSample colorMapOffset NO_VALUE imageLength NO_VALUE imageWidth NO_VALUE photometricInterpretation NO_VALUE rowsPerStrip MAX_VALUE samplesPerPixel stripByteCounts stripOffsets numberEntries toInt TYPE_SHORT IFD_ENTRY_SIZE numberEntries parseEntries PaletteData photometricInterpretation getGrayPalette bitsPerSample colorMapOffset NO_VALUE ERROR_INVALID_IMAGE SamplesPerPixel getRGBPalette bitsPerSample bitsPerSample bitsPerSample bitsPerSample bitsPerSample bitsPerSample colorMapOffset NO_VALUE ERROR_INVALID_IMAGE getColorMap bitsPerSample ERROR_INVALID_IMAGE ImageData ImageData internal_new imageWidth imageLength IMAGE_TIFF decodePixels
int to Int byte buffer int i int type if type TYPE LONG return is Little Endian buffer i 0xFF buffer i 1 0xFF 8 buffer i 2 0xFF 16 buffer i 3 0xFF 24 buffer i 3 0xFF buffer i 2 0xFF 8 buffer i 1 0xFF 16 buffer i 0xFF 24 if type TYPE SHORT return is Little Endian buffer i 0xFF buffer i 1 0xFF 8 buffer i 1 0xFF buffer i 0xFF 8 Invalid type SWT error SWT ERROR INVALID IMAGE return 1  toInt TYPE_LONG isLittleEndian TYPE_SHORT isLittleEndian ERROR_INVALID_IMAGE
void write int photometric Interpretation throws IO Exception boolean isRGB photometric Interpretation 2 boolean is Color Map photometric Interpretation 3 boolean is Bi Level photometric Interpretation 0 photometric Interpretation 1 int image Width image width int image Length image height int row Byte Size image bytes Per Line int number Entries is Bi Level 9 11 int length Directory 2 12 number Entries 4 Offset following the header and the directory int next Offset 8 length Directory Extra space used by X Resolution and Y Resolution values int extra Bytes 16 int color Map null if is Color Map Palette Data palette image palette RGB rgbs palette getRG Bs color Map format Color Map rgbs The number of entries of the Color Map must match the bits Per Sample field if color Map length 3 1 image depth SWT error SWT ERROR UNSUPPORTED FORMAT Extra space used by Color Map values extra Bytes color Map length 2 if isRGB Extra space used by Bits Per Sample values extra Bytes 6 TIFF recommends storing the data in strips of no more than 8 Ko byte data image data int strips new int 2 int nbr Rows Per Strip format Strips row Byte Size image Length data 8192 next Offset extra Bytes strips int strip Offsets strips 0 int strip Byte Counts strips 1 int bits Per Sample Offset NO VALUE if isRGB bits Per Sample Offset next Offset next Offset 6 int strip Offsets Offset NO VALUE strip Byte Counts Offset NO VALUE int x Resolution Offset y Resolution Offset color Map Offset NO VALUE int cnt strip Offsets length if cnt 1 strip Offsets Offset next Offset next Offset 4 cnt strip Byte Counts Offset next Offset next Offset 4 cnt x Resolution Offset next Offset next Offset 8 y Resolution Offset next Offset next Offset 8 if is Color Map color Map Offset next Offset next Offset color Map length 2 TIFF header write Header Image File Directory out write Short number Entries write Entry TAG ImageWidth TYPE LONG 1 image Width write Entry TAG ImageLength TYPE LONG 1 image Length if is Color Map write Entry TAG BitsPerSample TYPE SHORT 1 image depth if isRGB write Entry TAG BitsPerSample TYPE SHORT 3 bits Per Sample Offset write Entry TAG Compression TYPE SHORT 1 COMPRESSION NONE write Entry TAG PhotometricInterpretation TYPE SHORT 1 photometric Interpretation write Entry TAG StripOffsets TYPE LONG cnt cnt 1 strip Offsets Offset strip Offsets 0 if isRGB write Entry TAG SamplesPerPixel TYPE SHORT 1 3 write Entry TAG RowsPerStrip TYPE LONG 1 nbr Rows Per Strip write Entry TAG StripByteCounts TYPE LONG cnt cnt 1 strip Byte Counts Offset strip Byte Counts 0 write Entry TAG XResolution TYPE RATIONAL 1 x Resolution Offset write Entry TAG YResolution TYPE RATIONAL 1 y Resolution Offset if is Color Map write Entry TAG ColorMap TYPE SHORT color Map length color Map Offset Offset of next IFD 0 for last IFD out write Int 0 Values longer than 4 bytes Section Bits Per Sample 8 8 8 if isRGB for int i 0 i 3 i out write Short 8 if cnt 1 for int i 0 i cnt i out write Int strip Offsets i for int i 0 i cnt i out write Int strip Byte Counts i X Resolution and Y Resolution set to 300 dpi for int i 0 i 2 i out write Int 300 out write Int 1 Color Map if is Color Map for int i 0 i color Map length i out write Short color Map i Image Data out write data  photometricInterpretation IOException photometricInterpretation isColorMap photometricInterpretation isBiLevel photometricInterpretation photometricInterpretation imageWidth imageLength rowByteSize bytesPerLine numberEntries isBiLevel lengthDirectory numberEntries nextOffset lengthDirectory XResolution YResolution extraBytes colorMap isColorMap PaletteData getRGBs colorMap formatColorMap bitsPerSample colorMap ERROR_UNSUPPORTED_FORMAT ColorMap extraBytes colorMap BitsPerSample extraBytes nbrRowsPerStrip formatStrips rowByteSize imageLength nextOffset extraBytes stripOffsets stripByteCounts bitsPerSampleOffset NO_VALUE bitsPerSampleOffset nextOffset nextOffset stripOffsetsOffset NO_VALUE stripByteCountsOffset NO_VALUE xResolutionOffset yResolutionOffset colorMapOffset NO_VALUE stripOffsets stripOffsetsOffset nextOffset nextOffset stripByteCountsOffset nextOffset nextOffset xResolutionOffset nextOffset nextOffset yResolutionOffset nextOffset nextOffset isColorMap colorMapOffset nextOffset nextOffset colorMap writeHeader writeShort numberEntries writeEntry TAG_ImageWidth TYPE_LONG imageWidth writeEntry TAG_ImageLength TYPE_LONG imageLength isColorMap writeEntry TAG_BitsPerSample TYPE_SHORT writeEntry TAG_BitsPerSample TYPE_SHORT bitsPerSampleOffset writeEntry TAG_Compression TYPE_SHORT COMPRESSION_NONE writeEntry TAG_PhotometricInterpretation TYPE_SHORT photometricInterpretation writeEntry TAG_StripOffsets TYPE_LONG stripOffsetsOffset stripOffsets writeEntry TAG_SamplesPerPixel TYPE_SHORT writeEntry TAG_RowsPerStrip TYPE_LONG nbrRowsPerStrip writeEntry TAG_StripByteCounts TYPE_LONG stripByteCountsOffset stripByteCounts writeEntry TAG_XResolution TYPE_RATIONAL xResolutionOffset writeEntry TAG_YResolution TYPE_RATIONAL yResolutionOffset isColorMap writeEntry TAG_ColorMap TYPE_SHORT colorMap colorMapOffset writeInt BitsPerSample writeShort writeInt stripOffsets writeInt stripByteCounts XResolution YResolution writeInt writeInt ColorMap isColorMap colorMap writeShort colorMap
void write Entry short tag int type int count int value throws IO Exception out write Short tag out write Short type out write Int count out write Int value  writeEntry IOException writeShort writeShort writeInt writeInt
void write Header throws IO Exception little endian out write Byte byte 0x49 out write Byte byte 0x49 TIFF identifier out write Short 42 Offset of the first IFD is chosen to be 8 It is word aligned and immediately after this header out write Int 8  writeHeader IOException writeByte writeByte writeShort writeInt
void write To Stream LE Data Output Stream byte Stream throws IO Exception out byte Stream int photometric Interpretation 1 Scanline pad must be 1 if image scanline Pad 1 SWT error SWT ERROR UNSUPPORTED FORMAT switch image depth case 1 Palette must be black and white or white and black Palette Data palette image palette RGB rgbs palette colors if palette is Direct rgbs null rgbs length 2 SWT error SWT ERROR UNSUPPORTED FORMAT RGB rgb0 rgbs 0 RGB rgb1 rgbs 1 if rgb0 red rgb0 green rgb0 green rgb0 blue rgb1 red rgb1 green rgb1 green rgb1 blue rgb0 red 0x0 rgb1 red 0xFF rgb0 red 0xFF rgb1 red 0x0 SWT error SWT ERROR UNSUPPORTED FORMAT 0 means a color index of 0 is imaged as white photometric Interpretation image palette colors 0 red 0xFF 0 1 break case 4 case 8 photometric Interpretation 3 break case 24 photometric Interpretation 2 break default SWT error SWT ERROR UNSUPPORTED FORMAT write photometric Interpretation  writeToStream LEDataOutputStream byteStream IOException byteStream photometricInterpretation scanlinePad ERROR_UNSUPPORTED_FORMAT PaletteData isDirect ERROR_UNSUPPORTED_FORMAT ERROR_UNSUPPORTED_FORMAT photometricInterpretation photometricInterpretation photometricInterpretation ERROR_UNSUPPORTED_FORMAT photometricInterpretation

boolean is File Format LE Data Input Stream stream try byte header new byte 4 stream read header stream unread header if header 0 header 1 return false if header 0 0x49 header 2 42 header 3 0 header 0 0x4d header 2 0 header 3 42 return false return true catch Exception e return false  isFileFormat LEDataInputStream
Image Data load From Byte Stream byte header new byte 8 boolean is Little Endian Image Data images new Image Data 0 TIFF Random File Access file new TIFF Random File Access input Stream try file read header if header 0 header 1 SWT error SWT ERROR INVALID IMAGE if header 0 0x49 header 2 42 header 3 0 header 0 0x4d header 2 0 header 3 42 SWT error SWT ERROR INVALID IMAGE is Little Endian header 0 0x49 int offset is Little Endian header 4 0xFF header 5 0xFF 8 header 6 0xFF 16 header 7 0xFF 24 header 7 0xFF header 6 0xFF 8 header 5 0xFF 16 header 4 0xFF 24 file seek offset TIFF Directory directory new TIFF Directory file is Little Endian loader Image Data image directory read A baseline reader is only expected to read the first directory images new Image Data image catch IO Exception e SWT error SWT ERROR IO e return images  ImageData loadFromByteStream isLittleEndian ImageData ImageData TIFFRandomFileAccess TIFFRandomFileAccess inputStream ERROR_INVALID_IMAGE ERROR_INVALID_IMAGE isLittleEndian isLittleEndian TIFFDirectory TIFFDirectory isLittleEndian ImageData ImageData IOException ERROR_IO
void unload Into Byte Stream Image Data image TIFF Directory directory new TIFF Directory image try directory write To Stream output Stream catch IO Exception e SWT error SWT ERROR IO e  unloadIntoByteStream ImageData TIFFDirectory TIFFDirectory writeToStream outputStream IOException ERROR_IO

public int decode byte src byte dest int offset Dest int row Size int n Rows this src src this dest dest this row Size row Size byte Offset Src 0 bit Offset Src 0 byte Offset Dest offset Dest bit Offset Dest 0 int cnt 0 while cnt n Rows decode Row cnt byte aligned if bit Offset Dest 0 byte Offset Dest bit Offset Dest 0 return byte Offset Dest offset Dest  offsetDest rowSize nRows rowSize rowSize byteOffsetSrc bitOffsetSrc byteOffsetDest offsetDest bitOffsetDest nRows decodeRow bitOffsetDest byteOffsetDest bitOffsetDest byteOffsetDest offsetDest
boolean decode Row is White true int n 0 while n row Size int run Length decode Run Length if run Length 0 return false n run Length set Next Bits is White white Value black Value run Length is White is White return true  decodeRow isWhite rowSize runLength decodeRunLength runLength runLength setNextBits isWhite whiteValue blackValue runLength isWhite isWhite
int decode Run Length int run Length 0 int partial Run 0 short huffman Code is White WHITE CODE BLACK CODE while true boolean found false nbr Bits is White WHITE MIN BITS BLACK MIN BITS code get Next Bits nbr Bits for int i 0 i huffman Code length i for int j 0 j huffman Code i length j if huffman Code i j 0 code found true partial Run huffman Code i j 1 if partial Run 1 Stop when reaching final EOL on last byte if byte Offset Src src length 1 return 1 Group 3 starts each row with an EOL ignore it else run Length partial Run if partial Run 64 return run Length break if found break code code 1 get Next Bit if found SWT error SWT ERROR INVALID IMAGE  decodeRunLength runLength partialRun huffmanCode isWhite WHITE_CODE BLACK_CODE nbrBits isWhite WHITE_MIN_BITS BLACK_MIN_BITS getNextBits nbrBits huffmanCode huffmanCode huffmanCode partialRun huffmanCode partialRun byteOffsetSrc runLength partialRun partialRun runLength getNextBit ERROR_INVALID_IMAGE
int get Next Bit int value src byte Offset Src 7 bit Offset Src 0x1 bit Offset Src if bit Offset Src 7 byte Offset Src bit Offset Src 0 return value  getNextBit byteOffsetSrc bitOffsetSrc bitOffsetSrc bitOffsetSrc byteOffsetSrc bitOffsetSrc
int get Next Bits int cnt int value 0 for int i 0 i cnt i value value 1 get Next Bit return value  getNextBits getNextBit
void set Next Bits int value int cnt int n cnt while bit Offset Dest 0 bit Offset Dest 7 n 0 dest byte Offset Dest value 1 byte dest byte Offset Dest 1 7 bit Offset Dest byte dest byte Offset Dest 1 7 bit Offset Dest n bit Offset Dest if bit Offset Dest 8 byte Offset Dest bit Offset Dest 0 while n 8 dest byte Offset Dest byte value 1 0xFF 0 n 8 while n 0 dest byte Offset Dest value 1 byte dest byte Offset Dest 1 7 bit Offset Dest byte dest byte Offset Dest 1 7 bit Offset Dest n bit Offset Dest  setNextBits bitOffsetDest bitOffsetDest byteOffsetDest byteOffsetDest bitOffsetDest byteOffsetDest bitOffsetDest bitOffsetDest bitOffsetDest byteOffsetDest bitOffsetDest byteOffsetDest byteOffsetDest byteOffsetDest bitOffsetDest byteOffsetDest bitOffsetDest bitOffsetDest

public TIFF Random File Access LE Data Input Stream stream input Stream stream start current next input Stream get Position buffers new byte LIST SIZE  TIFFRandomFileAccess LEDataInputStream inputStream inputStream getPosition LIST_SIZE
void seek int pos throws IO Exception if pos current return if pos start throw new IO Exception current pos if current next int n current next store required bytes int index next CHUNK SIZE int offset next CHUNK SIZE while n 0 if index buffers length byte old Buffers buffers buffers new byte Math max index 1 old Buffers length LIST SIZE System arraycopy old Buffers 0 buffers 0 old Buffers length if buffers index null buffers index new byte CHUNK SIZE int cnt input Stream read buffers index offset Math min n CHUNK SIZE offset n cnt next cnt index offset 0  IOException IOException CHUNK_SIZE CHUNK_SIZE oldBuffers oldBuffers LIST_SIZE oldBuffers oldBuffers CHUNK_SIZE inputStream CHUNK_SIZE
void read byte b throws IO Exception int size b length int n Cached Math min size next current int n Missing size next current int dest Next 0 if n Cached 0 Get cached bytes int index current CHUNK SIZE int offset current CHUNK SIZE while n Cached 0 int cnt Math min n Cached CHUNK SIZE offset System arraycopy buffers index offset b dest Next cnt n Cached cnt dest Next cnt index offset 0 if n Missing 0 Read required bytes int index next CHUNK SIZE int offset next CHUNK SIZE while n Missing 0 if index buffers length byte old Buffers buffers buffers new byte Math max index old Buffers length LIST SIZE System arraycopy old Buffers 0 buffers 0 old Buffers length if buffers index null buffers index new byte CHUNK SIZE int cnt input Stream read buffers index offset Math min n Missing CHUNK SIZE offset System arraycopy buffers index offset b dest Next cnt n Missing cnt next cnt dest Next cnt index offset 0 current size  IOException nCached nMissing destNext nCached CHUNK_SIZE CHUNK_SIZE nCached nCached CHUNK_SIZE destNext nCached destNext nMissing CHUNK_SIZE CHUNK_SIZE nMissing oldBuffers oldBuffers LIST_SIZE oldBuffers oldBuffers CHUNK_SIZE inputStream nMissing CHUNK_SIZE destNext nMissing destNext

Compress num Bytes bytes of image data from src storing in dest starting at 0 using the technique specified by comp If last is true this indicates the last line of the image Answer the size of the compressed data int compress int comp byte src int src Offset int num Bytes byte dest boolean last if comp 1 BMP RLE8 COMPRESSION return compressRLE8 Data src src Offset num Bytes dest last if comp 2 BMP RLE4 COMPRESSION return compressRLE4 Data src src Offset num Bytes dest last SWT error SWT ERROR INVALID IMAGE return 0  numBytes srcOffset numBytes BMP_RLE8_COMPRESSION compressRLE8Data srcOffset numBytes BMP_RLE4_COMPRESSION compressRLE4Data srcOffset numBytes ERROR_INVALID_IMAGE
int compressRLE4 Data byte src int src Offset int num Bytes byte dest boolean last int sp src Offset end src Offset num Bytes dp 0 int size 0 left i n byte the Byte while sp end find two consecutive bytes that are the same in the next 128 left end sp 1 if left 127 left 127 for n 0 n left n if src sp n src sp n 1 break if there is only one more byte in the scan line include it if n 127 n left n store the intervening data switch n case 0 break case 1 handled separately because 0 2 is a command dest dp 2 dp 1 byte 2 pixels dest dp src sp dp sp size 2 break default dest dp 0 dp dest dp byte n n dp n bytes n 2 pixels for i n i 0 i dest dp src sp dp sp size 2 n if n 1 0 pad to word dest dp 0 dp size break find the length of the next run up to 127 and store it left end sp if left 0 if left 127 left 127 the Byte src sp for n 1 n left n if src sp n the Byte break dest dp byte n n dp n bytes n 2 pixels dest dp the Byte dp sp n size 2 store the end of line or end of bitmap codes dest dp 0 dp if last dest dp 1 dp else dest dp 0 dp size 2 return size  compressRLE4Data srcOffset numBytes srcOffset srcOffset numBytes theByte theByte theByte theByte
int compressRLE8 Data byte src int src Offset int num Bytes byte dest boolean last int sp src Offset end src Offset num Bytes dp 0 int size 0 left i n byte the Byte while sp end find two consecutive bytes that are the same in the next 256 left end sp 1 if left 254 left 254 for n 0 n left n if src sp n src sp n 1 break if there is only one more byte in the scan line include it if n left n store the intervening data switch n case 0 break case 2 handled separately because 0 2 is a command dest dp 1 dp dest dp src sp dp sp size 2 don t break fall through case 1 handled separately because 0 1 is a command dest dp 1 dp dest dp src sp dp sp size 2 break default dest dp 0 dp dest dp byte n dp for i n i 0 i dest dp src sp dp sp size 2 n if n 1 0 pad to word dest dp 0 dp size break find the length of the next run up to 255 and store it left end sp if left 0 if left 255 left 255 the Byte src sp for n 1 n left n if src sp n the Byte break dest dp byte n dp dest dp the Byte dp sp n size 2 store the end of line or end of bitmap codes dest dp 0 dp if last dest dp 1 dp else dest dp 0 dp size 2 return size  compressRLE8Data srcOffset numBytes srcOffset srcOffset numBytes theByte theByte theByte theByte
void decompress Data byte src byte dest int stride int cmp if cmp 1 BMP RLE8 COMPRESSION if decompressRLE8 Data src src length stride dest dest length 0 SWT error SWT ERROR INVALID IMAGE return if cmp 2 BMP RLE4 COMPRESSION if decompressRLE4 Data src src length stride dest dest length 0 SWT error SWT ERROR INVALID IMAGE return SWT error SWT ERROR INVALID IMAGE  decompressData BMP_RLE8_COMPRESSION decompressRLE8Data ERROR_INVALID_IMAGE BMP_RLE4_COMPRESSION decompressRLE4Data ERROR_INVALID_IMAGE ERROR_INVALID_IMAGE
int decompressRLE4 Data byte src int num Bytes int stride byte dest int dest Size int sp 0 int se num Bytes int dp 0 int de dest Size int x 0 y 0 while sp se int len src sp 0xFF sp if len 0 len src sp 0xFF sp switch len case 0 end of line y x 0 dp y stride if dp de return 1 break case 1 end of bitmap return 1 case 2 delta x src sp 0xFF sp y src sp 0xFF sp dp y stride x 2 if dp de return 1 break default absolute mode run if len 1 0 odd run lengths not currently supported return 1 x len len len 2 if len se sp return 1 if len de dp return 1 for int i 0 i len i dest dp src sp dp sp if sp 1 0 sp word align sp break else if len 1 0 return 1 x len len len 2 byte the Byte src sp sp if len de dp return 1 for int i 0 i len i dest dp the Byte dp return 1  decompressRLE4Data numBytes destSize numBytes destSize theByte theByte
int decompressRLE8 Data byte src int num Bytes int stride byte dest int dest Size int sp 0 int se num Bytes int dp 0 int de dest Size int x 0 y 0 while sp se int len src sp 0xFF sp if len 0 len src sp 0xFF sp switch len case 0 end of line y x 0 dp y stride if dp de return 1 break case 1 end of bitmap return 1 case 2 delta x src sp 0xFF sp y src sp 0xFF sp dp y stride x if dp de return 1 break default absolute mode run if len se sp return 1 if len de dp return 1 for int i 0 i len i dest dp src sp dp sp if sp 1 0 sp word align sp x len break else byte the Byte src sp sp if len de dp return 1 for int i 0 i len i dest dp the Byte dp x len return 1  decompressRLE8Data numBytes destSize numBytes destSize theByte theByte
boolean is File Format LE Data Input Stream stream try byte header new byte 2 stream read header stream unread header return header 0 0x42 header 1 0x4D catch Exception e return false  isFileFormat LEDataInputStream
byte load Data byte info Header int width info Header 4 0xFF info Header 5 0xFF 8 info Header 6 0xFF 16 info Header 7 0xFF 24 int height info Header 8 0xFF info Header 9 0xFF 8 info Header 10 0xFF 16 info Header 11 0xFF 24 int bit Count info Header 14 0xFF info Header 15 0xFF 8 int stride width bit Count 7 8 stride stride 3 4 4 Round up to 4 byte multiple byte data load Data info Header stride flip Scan Lines data stride height return data  loadData infoHeader infoHeader infoHeader infoHeader infoHeader infoHeader infoHeader infoHeader infoHeader bitCount infoHeader infoHeader bitCount loadData infoHeader flipScanLines
byte load Data byte info Header int stride int height info Header 8 0xFF info Header 9 0xFF 8 info Header 10 0xFF 16 info Header 11 0xFF 24 int data Size height stride byte data new byte data Size int cmp info Header 16 0xFF info Header 17 0xFF 8 info Header 18 0xFF 16 info Header 19 0xFF 24 if cmp 0 BMP NO COMPRESSION try if input Stream read data data Size SWT error SWT ERROR INVALID IMAGE catch IO Exception e SWT error SWT ERROR IO e else int compressed Size info Header 20 0xFF info Header 21 0xFF 8 info Header 22 0xFF 16 info Header 23 0xFF 24 byte compressed new byte compressed Size try if input Stream read compressed compressed Size SWT error SWT ERROR INVALID IMAGE catch IO Exception e SWT error SWT ERROR IO e decompress Data compressed data stride cmp return data  loadData infoHeader infoHeader infoHeader infoHeader infoHeader dataSize dataSize infoHeader infoHeader infoHeader infoHeader BMP_NO_COMPRESSION inputStream dataSize ERROR_INVALID_IMAGE IOException ERROR_IO compressedSize infoHeader infoHeader infoHeader infoHeader compressedSize inputStream compressedSize ERROR_INVALID_IMAGE IOException ERROR_IO decompressData
int load File Header int header new int 5 try header 0 input Stream read Short header 1 input Stream read Int header 2 input Stream read Short header 3 input Stream read Short header 4 input Stream read Int catch IO Exception e SWT error SWT ERROR IO e if header 0 0x4D42 SWT error SWT ERROR INVALID IMAGE return header  loadFileHeader inputStream readShort inputStream readInt inputStream readShort inputStream readShort inputStream readInt IOException ERROR_IO ERROR_INVALID_IMAGE
Image Data load From Byte Stream int file Header load File Header byte info Header new byte BMP Header Fixed Size try input Stream read info Header catch Exception e SWT error SWT ERROR IO e Palette Data palette load Palette info Header if input Stream get Position file Header 4 Seek to the specified offset try input Stream skip file Header 4 input Stream get Position catch IO Exception e SWT error SWT ERROR IO e byte data load Data info Header this compression info Header 16 0xFF info Header 17 0xFF 8 info Header 18 0xFF 16 info Header 19 0xFF 24 this important Colors info Header 36 0xFF info Header 37 0xFF 8 info Header 38 0xFF 16 info Header 39 0xFF 24 int x Pels Per Meter info Header 24 0xFF info Header 25 0xFF 8 info Header 26 0xFF 16 info Header 27 0xFF 24 int y Pels Per Meter info Header 28 0xFF info Header 29 0xFF 8 info Header 30 0xFF 16 info Header 31 0xFF 24 this pels Per Meter new Point x Pels Per Meter y Pels Per Meter int width info Header 4 0xFF info Header 5 0xFF 8 info Header 6 0xFF 16 info Header 7 0xFF 24 int height info Header 8 0xFF info Header 9 0xFF 8 info Header 10 0xFF 16 info Header 11 0xFF 24 int bit Count info Header 14 0xFF info Header 15 0xFF 8 int type this compression 1 BMP RLE8 COMPRESSION this compression 2 BMP RLE4 COMPRESSION SWT IMAGE BMP RLE SWT IMAGE BMP return new Image Data Image Data internal new width height bit Count palette 4 data 0 null null 1 1 type 0 0 0 0  ImageData loadFromByteStream fileHeader loadFileHeader infoHeader BMPHeaderFixedSize inputStream infoHeader ERROR_IO PaletteData loadPalette infoHeader inputStream getPosition fileHeader inputStream fileHeader inputStream getPosition IOException ERROR_IO loadData infoHeader infoHeader infoHeader infoHeader infoHeader importantColors infoHeader infoHeader infoHeader infoHeader xPelsPerMeter infoHeader infoHeader infoHeader infoHeader yPelsPerMeter infoHeader infoHeader infoHeader infoHeader pelsPerMeter xPelsPerMeter yPelsPerMeter infoHeader infoHeader infoHeader infoHeader infoHeader infoHeader infoHeader infoHeader bitCount infoHeader infoHeader BMP_RLE8_COMPRESSION BMP_RLE4_COMPRESSION IMAGE_BMP_RLE IMAGE_BMP ImageData ImageData internal_new bitCount
Palette Data load Palette byte info Header int depth info Header 14 0xFF info Header 15 0xFF 8 if depth 8 int num Colors info Header 32 0xFF info Header 33 0xFF 8 info Header 34 0xFF 16 info Header 35 0xFF 24 if num Colors 0 num Colors 1 info Header 14 0xFF info Header 15 0xFF 8 else if num Colors 256 num Colors 256 byte buf new byte num Colors 4 try if input Stream read buf buf length SWT error SWT ERROR INVALID IMAGE catch IO Exception e SWT error SWT ERROR IO e return palette From Bytes buf num Colors if depth 16 return new Palette Data 0x7C00 0x3E0 0x1F if depth 24 return new Palette Data 0xFF 0xFF00 0xFF0000 return new Palette Data 0xFF00 0xFF0000 0xFF000000  PaletteData loadPalette infoHeader infoHeader infoHeader numColors infoHeader infoHeader infoHeader infoHeader numColors numColors infoHeader infoHeader numColors numColors numColors inputStream ERROR_INVALID_IMAGE IOException ERROR_IO paletteFromBytes numColors PaletteData PaletteData PaletteData
Palette Data palette From Bytes byte bytes int num Colors int bytes Offset 0 RGB colors new RGB num Colors for int i 0 i num Colors i colors i new RGB bytes bytes Offset 2 0xFF bytes bytes Offset 1 0xFF bytes bytes Offset 0xFF bytes Offset 4 return new Palette Data colors  PaletteData paletteFromBytes numColors bytesOffset numColors numColors bytesOffset bytesOffset bytesOffset bytesOffset PaletteData
Answer a byte array containing the BMP representation of the given device independent palette static byte palette To Bytes Palette Data pal int n pal colors null 0 pal colors length 256 pal colors length 256 byte bytes new byte n 4 int offset 0 for int i 0 i n i RGB col pal colors i bytes offset byte col blue bytes offset 1 byte col green bytes offset 2 byte col red offset 4 return bytes  paletteToBytes PaletteData
Unload the given image s data into the given byte stream using the given compression strategy Answer the number of bytes written int unload Data Image Data image Output Stream out int comp int total Size 0 try if comp 0 return unload Data No Compression image out int bpl image width image depth 7 8 int bmp Bpl bpl 3 4 4 BMP pads scanlines to multiples of 4 bytes int image Bpl image bytes Per Line Compression can actually take twice as much space in worst case byte buf new byte bmp Bpl 2 int src Offset image Bpl image height 1 Start at last line byte data image data total Size 0 byte buf2 new byte 32768 int buf2 Offset 0 for int y image height 1 y 0 y int line Size compress comp data src Offset bpl buf y 0 if buf2 Offset line Size buf2 length out write buf2 0 buf2 Offset buf2 Offset 0 System arraycopy buf 0 buf2 buf2 Offset line Size buf2 Offset line Size total Size line Size src Offset image Bpl if buf2 Offset 0 out write buf2 0 buf2 Offset catch IO Exception e SWT error SWT ERROR IO e return total Size  unloadData ImageData OutputStream totalSize unloadDataNoCompression bmpBpl imageBpl bytesPerLine bmpBpl srcOffset imageBpl totalSize buf2Offset lineSize srcOffset buf2Offset lineSize buf2Offset buf2Offset buf2Offset lineSize buf2Offset lineSize totalSize lineSize srcOffset imageBpl buf2Offset buf2Offset IOException ERROR_IO totalSize
Prepare the given image s data for unloading into a byte stream using no compression strategy Answer the number of bytes written int unload Data No Compression Image Data image Output Stream out int bmp Bpl 0 try int bpl image width image depth 7 8 bmp Bpl bpl 3 4 4 BMP pads scanlines to multiples of 4 bytes int lines Per Buf 32678 bmp Bpl byte buf new byte lines Per Buf bmp Bpl byte data image data int image Bpl image bytes Per Line int data Index image Bpl image height 1 Start at last line if image depth 16 for int y 0 y image height y lines Per Buf int count image height y if lines Per Buf count count lines Per Buf int buf Offset 0 for int i 0 i count i for int w Index 0 w Index bpl w Index 2 buf buf Offset w Index 1 data data Index w Index 1 buf buf Offset w Index data data Index w Index buf Offset bmp Bpl data Index image Bpl out write buf 0 buf Offset else for int y 0 y image height y lines Per Buf int tmp image height y int count tmp lines Per Buf tmp lines Per Buf int buf Offset 0 for int i 0 i count i System arraycopy data data Index buf buf Offset bpl buf Offset bmp Bpl data Index image Bpl out write buf 0 buf Offset catch IO Exception e SWT error SWT ERROR IO e return bmp Bpl image height  unloadDataNoCompression ImageData OutputStream bmpBpl bmpBpl linesPerBuf bmpBpl linesPerBuf bmpBpl imageBpl bytesPerLine dataIndex imageBpl linesPerBuf linesPerBuf linesPerBuf bufOffset wIndex wIndex wIndex bufOffset wIndex dataIndex wIndex bufOffset wIndex dataIndex wIndex bufOffset bmpBpl dataIndex imageBpl bufOffset linesPerBuf linesPerBuf linesPerBuf bufOffset dataIndex bufOffset bufOffset bmpBpl dataIndex imageBpl bufOffset IOException ERROR_IO bmpBpl
Unload a Device Independent Image using Windows BMP format into the given byte stream void unload Into Byte Stream Image Data image byte rgbs int num Cols if image depth 1 image depth 4 image depth 8 image depth 16 image depth 24 image depth 32 SWT error SWT ERROR UNSUPPORTED DEPTH int comp this compression if comp 0 comp 1 image depth 8 comp 2 image depth 4 SWT error SWT ERROR INVALID IMAGE Palette Data pal image palette if image depth 16 image depth 24 image depth 32 if pal is Direct SWT error SWT ERROR INVALID IMAGE num Cols 0 rgbs null else if pal is Direct SWT error SWT ERROR INVALID IMAGE num Cols pal colors length rgbs palette To Bytes pal Fill in file header except for bfsize which is done later int headers Size 54 int file Header new int 5 file Header 0 0x4D42 Signature file Header 1 0 File size filled in later file Header 2 0 Reserved 1 file Header 3 0 Reserved 2 file Header 4 headers Size Offset to data if rgbs null file Header 4 rgbs length Prepare data This is done first so we don t have to try to rewind the stream and fill in the details later Byte Array Output Stream out new Byte Array Output Stream unload Data image out comp byte compressed Data out to Byte Array Calculate file size file Header 1 file Header 4 compressed Data length Write the headers try output Stream write Short file Header 0 output Stream write Int file Header 1 output Stream write Short file Header 2 output Stream write Short file Header 3 output Stream write Int file Header 4 catch IO Exception e SWT error SWT ERROR IO e try output Stream write Int WinBMP File Format BMP Header Fixed Size output Stream write Int image width output Stream write Int image height output Stream write Short 1 output Stream write Short short image depth output Stream write Int comp output Stream write Int compressed Data length output Stream write Int pels Per Meter x output Stream write Int pels Per Meter y output Stream write Int num Cols output Stream write Int important Colors catch IO Exception e SWT error SWT ERROR IO e Unload palette if num Cols 0 try output Stream write rgbs catch IO Exception e SWT error SWT ERROR IO e Unload the data try output Stream write compressed Data catch IO Exception e SWT error SWT ERROR IO e  DeviceIndependentImage unloadIntoByteStream ImageData numCols ERROR_UNSUPPORTED_DEPTH ERROR_INVALID_IMAGE PaletteData isDirect ERROR_INVALID_IMAGE numCols isDirect ERROR_INVALID_IMAGE numCols paletteToBytes headersSize fileHeader fileHeader fileHeader fileHeader fileHeader fileHeader headersSize fileHeader ByteArrayOutputStream ByteArrayOutputStream unloadData compressedData toByteArray fileHeader fileHeader compressedData outputStream writeShort fileHeader outputStream writeInt fileHeader outputStream writeShort fileHeader outputStream writeShort fileHeader outputStream writeInt fileHeader IOException ERROR_IO outputStream writeInt WinBMPFileFormat BMPHeaderFixedSize outputStream writeInt outputStream writeInt outputStream writeShort outputStream writeShort outputStream writeInt outputStream writeInt compressedData outputStream writeInt pelsPerMeter outputStream writeInt pelsPerMeter outputStream writeInt numCols outputStream writeInt importantColors IOException ERROR_IO numCols outputStream IOException ERROR_IO outputStream compressedData IOException ERROR_IO
void flip Scan Lines byte data int stride int height int i1 0 int i2 height 1 stride for int i 0 i height 2 i for int index 0 index stride index byte b data index i1 data index i1 data index i2 data index i2 b i1 stride i2 stride  flipScanLines

static final byte convert Pad byte data int width int height int depth int pad int new Pad if pad new Pad return data int stride width depth 7 8 int bpl stride pad 1 pad pad int new Bpl stride new Pad 1 new Pad new Pad byte new Data new byte height new Bpl int src Index 0 dest Index 0 for int y 0 y height y System arraycopy data src Index new Data dest Index new Bpl src Index bpl dest Index new Bpl return new Data  convertPad newPad newPad newBpl newPad newPad newPad newData newBpl srcIndex destIndex srcIndex newData destIndex newBpl srcIndex destIndex newBpl newData
Answer the size in bytes of the file representation of the given icon int icon Size Image Data i int shape Data Stride i width i depth 31 32 4 int mask Data Stride i width 31 32 4 int data Size shape Data Stride mask Data Stride i height int palette Size i palette colors null i palette colors length 4 0 return WinBMP File Format BMP Header Fixed Size palette Size data Size  iconSize ImageData shapeDataStride maskDataStride dataSize shapeDataStride maskDataStride paletteSize WinBMPFileFormat BMPHeaderFixedSize paletteSize dataSize
boolean is File Format LE Data Input Stream stream try byte header new byte 4 stream read header stream unread header return header 0 0 header 1 0 header 2 1 header 3 0 catch Exception e return false  isFileFormat LEDataInputStream
boolean is Valid Icon Image Data i switch i depth case 1 case 4 case 8 if i palette is Direct return false int size i palette colors length return size 2 size 16 size 32 size 256 case 24 case 32 return i palette is Direct return false  isValidIcon ImageData isDirect isDirect
int load File Header LE Data Input Stream byte Stream int file Header new int 3 try file Header 0 byte Stream read Short file Header 1 byte Stream read Short file Header 2 byte Stream read Short catch IO Exception e SWT error SWT ERROR IO e if file Header 0 0 file Header 1 1 SWT error SWT ERROR INVALID IMAGE int num Icons file Header 2 if num Icons 0 SWT error SWT ERROR INVALID IMAGE return num Icons  loadFileHeader LEDataInputStream byteStream fileHeader fileHeader byteStream readShort fileHeader byteStream readShort fileHeader byteStream readShort IOException ERROR_IO fileHeader fileHeader ERROR_INVALID_IMAGE numIcons fileHeader numIcons ERROR_INVALID_IMAGE numIcons
int load File Header LE Data Input Stream byte Stream boolean has Header int file Header new int 3 try if has Header file Header 0 byte Stream read Short file Header 1 byte Stream read Short else file Header 0 0 file Header 1 1 file Header 2 byte Stream read Short catch IO Exception e SWT error SWT ERROR IO e if file Header 0 0 file Header 1 1 SWT error SWT ERROR INVALID IMAGE int num Icons file Header 2 if num Icons 0 SWT error SWT ERROR INVALID IMAGE return num Icons  loadFileHeader LEDataInputStream byteStream hasHeader fileHeader hasHeader fileHeader byteStream readShort fileHeader byteStream readShort fileHeader fileHeader fileHeader byteStream readShort IOException ERROR_IO fileHeader fileHeader ERROR_INVALID_IMAGE numIcons fileHeader numIcons ERROR_INVALID_IMAGE numIcons
Image Data load From Byte Stream int num Icons load File Header input Stream int headers load Icon Headers num Icons Image Data icons new Image Data headers length for int i 0 i icons length i icons i load Icon headers i return icons  ImageData loadFromByteStream numIcons loadFileHeader inputStream loadIconHeaders numIcons ImageData ImageData loadIcon
Load one icon from the byte stream Image Data load Icon int icon Header byte info Header load Info Header icon Header WinBMP File Format bmp Format new WinBMP File Format bmp Format input Stream input Stream Palette Data palette bmp Format load Palette info Header byte shape Data bmp Format load Data info Header int width info Header 4 0xFF info Header 5 0xFF 8 info Header 6 0xFF 16 info Header 7 0xFF 24 int height info Header 8 0xFF info Header 9 0xFF 8 info Header 10 0xFF 16 info Header 11 0xFF 24 int depth info Header 14 0xFF info Header 15 0xFF 8 info Header 14 1 info Header 15 0 byte mask Data bmp Format load Data info Header mask Data convert Pad mask Data width height 1 4 2 bit Invert Data mask Data 0 mask Data length return Image Data internal new width height depth palette 4 shape Data 2 mask Data null 1 1 SWT IMAGE ICO 0 0 0 0  ImageData loadIcon iconHeader infoHeader loadInfoHeader iconHeader WinBMPFileFormat bmpFormat WinBMPFileFormat bmpFormat inputStream inputStream PaletteData bmpFormat loadPalette infoHeader shapeData bmpFormat loadData infoHeader infoHeader infoHeader infoHeader infoHeader infoHeader infoHeader infoHeader infoHeader infoHeader infoHeader infoHeader infoHeader maskData bmpFormat loadData infoHeader maskData convertPad maskData bitInvertData maskData maskData ImageData internal_new shapeData maskData IMAGE_ICO
int load Icon Headers int num Icons int headers new int num Icons 7 try for int i 0 i num Icons i headers i 0 input Stream read headers i 1 input Stream read headers i 2 input Stream read Short headers i 3 input Stream read Short headers i 4 input Stream read Short headers i 5 input Stream read Int headers i 6 input Stream read Int catch IO Exception e SWT error SWT ERROR IO e return headers  loadIconHeaders numIcons numIcons numIcons inputStream inputStream inputStream readShort inputStream readShort inputStream readShort inputStream readInt inputStream readInt IOException ERROR_IO
byte load Info Header int icon Header int width icon Header 0 int height icon Header 1 int num Colors icon Header 2 the number of colors is in the low byte but the high byte must be 0 if num Colors 0 num Colors 256 this is specified 00 represents 256 0x100 colors if num Colors 2 num Colors 8 num Colors 16 num Colors 32 num Colors 256 SWT error SWT ERROR INVALID IMAGE if input Stream get Position icon Header 6 Seek to the specified offset try input Stream skip icon Header 6 input Stream get Position catch IO Exception e SWT error SWT ERROR IO e return null byte info Header new byte WinBMP File Format BMP Header Fixed Size try input Stream read info Header catch IO Exception e SWT error SWT ERROR IO e if info Header 12 0xFF info Header 13 0xFF 8 1 SWT error SWT ERROR INVALID IMAGE int info Width info Header 4 0xFF info Header 5 0xFF 8 info Header 6 0xFF 16 info Header 7 0xFF 24 int info Height info Header 8 0xFF info Header 9 0xFF 8 info Header 10 0xFF 16 info Header 11 0xFF 24 int bit Count info Header 14 0xFF info Header 15 0xFF 8 if height info Height bit Count 1 height 2 if width info Width height 2 info Height bit Count 1 bit Count 4 bit Count 8 bit Count 24 bit Count 32 SWT error SWT ERROR INVALID IMAGE info Header 8 byte height 0xFF info Header 9 byte height 8 0xFF info Header 10 byte height 16 0xFF info Header 11 byte height 24 0xFF return info Header  loadInfoHeader iconHeader iconHeader iconHeader numColors iconHeader numColors numColors numColors numColors numColors numColors numColors ERROR_INVALID_IMAGE inputStream getPosition iconHeader inputStream iconHeader inputStream getPosition IOException ERROR_IO infoHeader WinBMPFileFormat BMPHeaderFixedSize inputStream infoHeader IOException ERROR_IO infoHeader infoHeader ERROR_INVALID_IMAGE infoWidth infoHeader infoHeader infoHeader infoHeader infoHeight infoHeader infoHeader infoHeader infoHeader bitCount infoHeader infoHeader infoHeight bitCount infoWidth infoHeight bitCount bitCount bitCount bitCount bitCount ERROR_INVALID_IMAGE infoHeader infoHeader infoHeader infoHeader infoHeader
Unload a single icon void unload Icon Image Data icon int size Image icon width icon depth 31 32 4 icon width 31 32 4 icon height try output Stream write Int WinBMP File Format BMP Header Fixed Size output Stream write Int icon width output Stream write Int icon height 2 output Stream write Short 1 output Stream write Short short icon depth output Stream write Int 0 output Stream write Int size Image output Stream write Int 0 output Stream write Int 0 output Stream write Int icon palette colors null icon palette colors length 0 output Stream write Int 0 catch IO Exception e SWT error SWT ERROR IO e byte rgbs WinBMP File Format palette To Bytes icon palette try output Stream write rgbs catch IO Exception e SWT error SWT ERROR IO e unload Shape Data icon unload Mask Data icon  unloadIcon ImageData sizeImage outputStream writeInt WinBMPFileFormat BMPHeaderFixedSize outputStream writeInt outputStream writeInt outputStream writeShort outputStream writeShort outputStream writeInt outputStream writeInt sizeImage outputStream writeInt outputStream writeInt outputStream writeInt outputStream writeInt IOException ERROR_IO WinBMPFileFormat paletteToBytes outputStream IOException ERROR_IO unloadShapeData unloadMaskData
Unload the icon header for the given icon calculating the offset void unload Icon Header Image Data i int header Size 16 int offset header Size 6 int icon Size icon Size i try output Stream write Byte byte i width output Stream write Byte byte i height output Stream write Short i palette colors null i palette colors length 0 output Stream write Short 0 output Stream write Short 0 output Stream write Int icon Size output Stream write Int offset catch IO Exception e SWT error SWT ERROR IO e  unloadIconHeader ImageData headerSize headerSize iconSize iconSize outputStream writeByte outputStream writeByte outputStream writeShort outputStream writeShort outputStream writeShort outputStream writeInt iconSize outputStream writeInt IOException ERROR_IO
void unload Into Byte Stream Image Data image if is Valid Icon image SWT error SWT ERROR INVALID IMAGE try output Stream write Short 0 output Stream write Short 1 output Stream write Short 1 catch IO Exception e SWT error SWT ERROR IO e unload Icon Header image unload Icon image  unloadIntoByteStream ImageData isValidIcon ERROR_INVALID_IMAGE outputStream writeShort outputStream writeShort outputStream writeShort IOException ERROR_IO unloadIconHeader unloadIcon
Unload the mask data for an icon The data is flipped vertically and inverted void unload Mask Data Image Data icon Image Data mask icon get Transparency Mask int bpl icon width 7 8 int pad mask scanline Pad int src Bpl bpl pad 1 pad pad int dest Bpl bpl 3 4 4 byte buf new byte dest Bpl int offset icon height 1 src Bpl byte data mask data try for int i 0 i icon height i System arraycopy data offset buf 0 bpl bit Invert Data buf 0 bpl output Stream write buf 0 dest Bpl offset src Bpl catch IO Exception e SWT error SWT ERROR IO e  unloadMaskData ImageData ImageData getTransparencyMask scanlinePad srcBpl destBpl destBpl srcBpl bitInvertData outputStream destBpl srcBpl IOException ERROR_IO
Unload the shape data for an icon The data is flipped vertically void unload Shape Data Image Data icon int bpl icon width icon depth 7 8 int pad icon scanline Pad int src Bpl bpl pad 1 pad pad int dest Bpl bpl 3 4 4 byte buf new byte dest Bpl int offset icon height 1 src Bpl byte data icon data try for int i 0 i icon height i System arraycopy data offset buf 0 bpl output Stream write buf 0 dest Bpl offset src Bpl catch IO Exception e SWT error SWT ERROR IO e  unloadShapeData ImageData scanlinePad srcBpl destBpl destBpl srcBpl outputStream destBpl srcBpl IOException ERROR_IO

new nsID NS IAPPSHELL IID STRING public nsI App Shell int address super address  NS_IAPPSHELL_IID_STRING nsIAppShell
public int Create int argc int argv return XPCOM Vtbl Call super LAST METHOD ID 1 get Address argc argv  VtblCall LAST_METHOD_ID getAddress
public int Run return XPCOM Vtbl Call super LAST METHOD ID 2 get Address  VtblCall LAST_METHOD_ID getAddress
public int Spinup return XPCOM Vtbl Call super LAST METHOD ID 3 get Address  VtblCall LAST_METHOD_ID getAddress
public int Spindown return XPCOM Vtbl Call super LAST METHOD ID 4 get Address  VtblCall LAST_METHOD_ID getAddress
public int Listen To Event Queue int a Queue boolean a Listen return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a Queue a Listen  ListenToEventQueue aQueue aListen VtblCall LAST_METHOD_ID getAddress aQueue aListen
public int Get Native Event int a Real Event int a Event return XPCOM Vtbl Call super LAST METHOD ID 6 get Address a Real Event a Event  GetNativeEvent aRealEvent aEvent VtblCall LAST_METHOD_ID getAddress aRealEvent aEvent
public int Dispatch Native Event boolean a Real Event int a Event return XPCOM NS ERROR NOT IMPLEMENTED  DispatchNativeEvent aRealEvent aEvent NS_ERROR_NOT_IMPLEMENTED
public int Exit return XPCOM Vtbl Call super LAST METHOD ID 8 get Address  VtblCall LAST_METHOD_ID getAddress

new nsID NS IBASEWINDOW IID STRING public nsI Base Window int address super address  NS_IBASEWINDOW_IID_STRING nsIBaseWindow
public int Init Window int parent Native Window int parent Widget int x int y int cx int cy return XPCOM Vtbl Call super LAST METHOD ID 1 get Address parent Native Window parent Widget x y cx cy  InitWindow parentNativeWindow parentWidget VtblCall LAST_METHOD_ID getAddress parentNativeWindow parentWidget
public int Create return XPCOM Vtbl Call super LAST METHOD ID 2 get Address  VtblCall LAST_METHOD_ID getAddress
public int Destroy return XPCOM Vtbl Call super LAST METHOD ID 3 get Address  VtblCall LAST_METHOD_ID getAddress
public int Set Position int x int y return XPCOM Vtbl Call super LAST METHOD ID 4 get Address x y  SetPosition VtblCall LAST_METHOD_ID getAddress
public int Get Position int x int y return XPCOM Vtbl Call super LAST METHOD ID 5 get Address x y  GetPosition VtblCall LAST_METHOD_ID getAddress
public int Set Size int cx int cy boolean f Repaint return XPCOM Vtbl Call super LAST METHOD ID 6 get Address cx cy f Repaint  SetSize fRepaint VtblCall LAST_METHOD_ID getAddress fRepaint
public int Get Size int cx int cy return XPCOM Vtbl Call super LAST METHOD ID 7 get Address cx cy  GetSize VtblCall LAST_METHOD_ID getAddress
public int Set Position And Size int x int y int cx int cy boolean f Repaint return XPCOM Vtbl Call super LAST METHOD ID 8 get Address x y cx cy f Repaint  SetPositionAndSize fRepaint VtblCall LAST_METHOD_ID getAddress fRepaint
public int Get Position And Size int x int y int cx int cy return XPCOM Vtbl Call super LAST METHOD ID 9 get Address x y cx cy  GetPositionAndSize VtblCall LAST_METHOD_ID getAddress
public int Repaint boolean force return XPCOM Vtbl Call super LAST METHOD ID 10 get Address force  VtblCall LAST_METHOD_ID getAddress
public int Get Parent Widget int a Parent Widget return XPCOM Vtbl Call super LAST METHOD ID 11 get Address a Parent Widget  GetParentWidget aParentWidget VtblCall LAST_METHOD_ID getAddress aParentWidget
public int Set Parent Widget int a Parent Widget return XPCOM Vtbl Call super LAST METHOD ID 12 get Address a Parent Widget  SetParentWidget aParentWidget VtblCall LAST_METHOD_ID getAddress aParentWidget
public int Get Parent Native Window int a Parent Native Window return XPCOM Vtbl Call super LAST METHOD ID 13 get Address a Parent Native Window  GetParentNativeWindow aParentNativeWindow VtblCall LAST_METHOD_ID getAddress aParentNativeWindow
public int Set Parent Native Window int a Parent Native Window return XPCOM Vtbl Call super LAST METHOD ID 14 get Address a Parent Native Window  SetParentNativeWindow aParentNativeWindow VtblCall LAST_METHOD_ID getAddress aParentNativeWindow
public int Get Visibility boolean a Visibility return XPCOM Vtbl Call super LAST METHOD ID 15 get Address a Visibility  GetVisibility aVisibility VtblCall LAST_METHOD_ID getAddress aVisibility
public int Set Visibility boolean a Visibility return XPCOM Vtbl Call super LAST METHOD ID 16 get Address a Visibility  SetVisibility aVisibility VtblCall LAST_METHOD_ID getAddress aVisibility
public int Get Enabled boolean a Enabled return XPCOM Vtbl Call super LAST METHOD ID 17 get Address a Enabled  GetEnabled aEnabled VtblCall LAST_METHOD_ID getAddress aEnabled
public int Set Enabled boolean a Enabled return XPCOM Vtbl Call super LAST METHOD ID 18 get Address a Enabled  SetEnabled aEnabled VtblCall LAST_METHOD_ID getAddress aEnabled
public int Get Blur Suppression boolean a Blur Suppression return XPCOM Vtbl Call super LAST METHOD ID 19 get Address a Blur Suppression  GetBlurSuppression aBlurSuppression VtblCall LAST_METHOD_ID getAddress aBlurSuppression
public int Set Blur Suppression boolean a Blur Suppression return XPCOM Vtbl Call super LAST METHOD ID 20 get Address a Blur Suppression  SetBlurSuppression aBlurSuppression VtblCall LAST_METHOD_ID getAddress aBlurSuppression
public int Get Main Widget int a Main Widget return XPCOM Vtbl Call super LAST METHOD ID 21 get Address a Main Widget  GetMainWidget aMainWidget VtblCall LAST_METHOD_ID getAddress aMainWidget
public int Set Focus return XPCOM Vtbl Call super LAST METHOD ID 22 get Address  SetFocus VtblCall LAST_METHOD_ID getAddress
public int Get Title int a Title return XPCOM Vtbl Call super LAST METHOD ID 23 get Address a Title  GetTitle aTitle VtblCall LAST_METHOD_ID getAddress aTitle
public int Set Title char a Title return XPCOM Vtbl Call super LAST METHOD ID 24 get Address a Title  SetTitle aTitle VtblCall LAST_METHOD_ID getAddress aTitle

Contributor s 
IBM 
Binding to permit interfacing between Mozilla and SWT Copyright C 2003 IBM Corp All Rights Reserved 
END LICENSE BLOCK 
package org eclipse swt internal mozilla 
public class nsI Category Manager extends nsI Supports  nsICategoryManager nsISupports
static final int LAST METHOD ID nsI Supports LAST METHOD ID 6  LAST_METHOD_ID nsISupports LAST_METHOD_ID

Contributor s 
IBM 
Binding to permit interfacing between Mozilla and SWT Copyright C 2003 IBM Corp All Rights Reserved 
END LICENSE BLOCK 
package org eclipse swt internal mozilla 
public class nsI Channel extends nsI Request  nsIChannel nsIRequest
static final int LAST METHOD ID nsI Request LAST METHOD ID 16  LAST_METHOD_ID nsIRequest LAST_METHOD_ID
public static final String NS ICHANNEL IID STRING c63a055a a676 4e71 bf3c 6cfa11082018  NS_ICHANNEL_IID_STRING
public static final nsID NS ICHANNEL IID  NS_ICHANNEL_IID
new nsID NS ICHANNEL IID STRING  NS_ICHANNEL_IID_STRING
public nsI Channel int address super address  nsIChannel
public int Get OriginalURI int a OriginalURI return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a OriginalURI  GetOriginalURI aOriginalURI VtblCall LAST_METHOD_ID getAddress aOriginalURI
public int Set OriginalURI int a OriginalURI return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a OriginalURI  SetOriginalURI aOriginalURI VtblCall LAST_METHOD_ID getAddress aOriginalURI
public int GetURI int aURI return XPCOM Vtbl Call super LAST METHOD ID 3 get Address aURI  VtblCall LAST_METHOD_ID getAddress

new nsID NS ICOMPONENTMANAGER IID STRING public nsI Component Manager int address super address  NS_ICOMPONENTMANAGER_IID_STRING nsIComponentManager
public int Get Class Object nsID a Class nsID aIID int result return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Class aIID result  GetClassObject aClass VtblCall LAST_METHOD_ID getAddress aClass
public int Get Class Object By ContractID byte a ContractID nsID aIID int result return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a ContractID aIID result  GetClassObjectByContractID aContractID VtblCall LAST_METHOD_ID getAddress aContractID
public int Create Instance nsID a Class int a Delegate nsID aIID int result return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a Class a Delegate aIID result  CreateInstance aClass aDelegate VtblCall LAST_METHOD_ID getAddress aClass aDelegate
public int Create Instance By ContractID byte a ContractID int a Delegate nsID aIID int result return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a ContractID a Delegate aIID result  CreateInstanceByContractID aContractID aDelegate VtblCall LAST_METHOD_ID getAddress aContractID aDelegate

new nsID NS ICOMPONENTREGISTRAR IID STRING public nsI Component Registrar int address super address  NS_ICOMPONENTREGISTRAR_IID_STRING nsIComponentRegistrar
public int Auto Register int a Spec return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Spec  AutoRegister aSpec VtblCall LAST_METHOD_ID getAddress aSpec
public int Auto Unregister int a Spec return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Spec  AutoUnregister aSpec VtblCall LAST_METHOD_ID getAddress aSpec
public int Register Factory nsID a Class byte a Class Name byte a ContractID int a Factory return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a Class a Class Name a ContractID a Factory  RegisterFactory aClass aClassName aContractID aFactory VtblCall LAST_METHOD_ID getAddress aClass aClassName aContractID aFactory
public int Unregister Factory nsID a Class int a Factory return XPCOM NS ERROR NOT IMPLEMENTED  UnregisterFactory aClass aFactory NS_ERROR_NOT_IMPLEMENTED
public int Register Factory Location nsID a Class byte a Class Name byte a ContractID int a File byte a Loader Str byte a Type return XPCOM NS ERROR NOT IMPLEMENTED  RegisterFactoryLocation aClass aClassName aContractID aFile aLoaderStr aType NS_ERROR_NOT_IMPLEMENTED
public int Unregister Factory Location nsID a Class int a File return XPCOM NS ERROR NOT IMPLEMENTED  UnregisterFactoryLocation aClass aFile NS_ERROR_NOT_IMPLEMENTED
public int IsCID Registered nsID a Class boolean  retval return XPCOM NS ERROR NOT IMPLEMENTED  IsCIDRegistered aClass _retval NS_ERROR_NOT_IMPLEMENTED
public int Is ContractID Registered byte a ContractID boolean  retval return XPCOM NS ERROR NOT IMPLEMENTED  IsContractIDRegistered aContractID _retval NS_ERROR_NOT_IMPLEMENTED
public int EnumerateCI Ds int  retval return XPCOM Vtbl Call super LAST METHOD ID 9 get Address  retval  EnumerateCIDs _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Enumerate ContractI Ds int  retval return XPCOM Vtbl Call super LAST METHOD ID 10 get Address  retval  EnumerateContractIDs _retval VtblCall LAST_METHOD_ID getAddress _retval
public int CID To ContractID nsID a Class int  retval return XPCOM Vtbl Call super LAST METHOD ID 11 get Address a Class  retval  CIDToContractID aClass _retval VtblCall LAST_METHOD_ID getAddress aClass _retval
public int ContractID ToCID byte a ContractID nsID  retval return XPCOM NS ERROR NOT IMPLEMENTED  ContractIDToCID aContractID _retval NS_ERROR_NOT_IMPLEMENTED

Contributor s 
IBM 
Binding to permit interfacing between Mozilla and SWT Copyright C 2003 IBM Corp All Rights Reserved 
END LICENSE BLOCK 
package org eclipse swt internal mozilla 
public class nsI Content Viewer extends nsI Supports  nsIContentViewer nsISupports
static final int LAST METHOD ID nsI Supports LAST METHOD ID 22  LAST_METHOD_ID nsISupports LAST_METHOD_ID
public static final String NS ICONTENTVIEWER IID STRING a6cf9056 15b3 11d2 932e 00805f8add32  NS_ICONTENTVIEWER_IID_STRING
public static final nsID NS ICONTENTVIEWER IID  NS_ICONTENTVIEWER_IID
new nsID NS ICONTENTVIEWER IID STRING  NS_ICONTENTVIEWER_IID_STRING
public nsI Content Viewer int address super address  nsIContentViewer
public int Init int a Parent Widget int a Device Context int a Bounds return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Parent Widget a Device Context a Bounds  aParentWidget aDeviceContext aBounds VtblCall LAST_METHOD_ID getAddress aParentWidget aDeviceContext aBounds
public int Get Container int a Container return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Container  GetContainer aContainer VtblCall LAST_METHOD_ID getAddress aContainer
public int Set Container int a Container return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a Container  SetContainer aContainer VtblCall LAST_METHOD_ID getAddress aContainer
public int Load Start int a Doc return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a Doc  LoadStart aDoc VtblCall LAST_METHOD_ID getAddress aDoc
public int Load Complete int a Status return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a Status  LoadComplete aStatus VtblCall LAST_METHOD_ID getAddress aStatus
public int Unload return XPCOM Vtbl Call super LAST METHOD ID 6 get Address  VtblCall LAST_METHOD_ID getAddress

Contributor s 
IBM 
Binding to permit interfacing between Mozilla and SWT Copyright C 2003 IBM Corp All Rights Reserved 

new nsID NS ICONTEXTMENULISTENER IID STRING public nsI Context Menu Listener int address super address  NS_ICONTEXTMENULISTENER_IID_STRING nsIContextMenuListener
public static final int CONTEXT INPUT 16 public int On Show Context Menu int a Context Flags int a Event int a Node return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Context Flags a Event a Node  CONTEXT_INPUT OnShowContextMenu aContextFlags aEvent aNode VtblCall LAST_METHOD_ID getAddress aContextFlags aEvent aNode

new nsID NS ICONTROLLER IID STRING public nsI Controller int address super address  NS_ICONTROLLER_IID_STRING nsIController
public int Is Command Enabled byte command boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 1 get Address command  retval  IsCommandEnabled _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Supports Command byte command boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 2 get Address command  retval  SupportsCommand _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Do Command byte command return XPCOM Vtbl Call super LAST METHOD ID 3 get Address command  DoCommand VtblCall LAST_METHOD_ID getAddress
public int On Event byte event Name return XPCOM Vtbl Call super LAST METHOD ID 4 get Address event Name  OnEvent eventName VtblCall LAST_METHOD_ID getAddress eventName

new nsID NS ICONTROLLERS IID STRING public nsI Controllers int address super address  NS_ICONTROLLERS_IID_STRING nsIControllers
public int Get Command Dispatcher int a Command Dispatcher return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Command Dispatcher  GetCommandDispatcher aCommandDispatcher VtblCall LAST_METHOD_ID getAddress aCommandDispatcher
public int Set Command Dispatcher int a Command Dispatcher return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Command Dispatcher  SetCommandDispatcher aCommandDispatcher VtblCall LAST_METHOD_ID getAddress aCommandDispatcher
public int Get Controller For Command byte command int  retval return XPCOM Vtbl Call super LAST METHOD ID 3 get Address command  retval  GetControllerForCommand _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Insert Controller At int index int controller return XPCOM Vtbl Call super LAST METHOD ID 4 get Address index controller  InsertControllerAt VtblCall LAST_METHOD_ID getAddress
public int Remove Controller At int index int  retval return XPCOM Vtbl Call super LAST METHOD ID 5 get Address index  retval  RemoveControllerAt _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Get Controller At int index int  retval return XPCOM Vtbl Call super LAST METHOD ID 6 get Address index  retval  GetControllerAt _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Append Controller int controller return XPCOM Vtbl Call super LAST METHOD ID 7 get Address controller  AppendController VtblCall LAST_METHOD_ID getAddress
public int Remove Controller int controller return XPCOM Vtbl Call super LAST METHOD ID 8 get Address controller  RemoveController VtblCall LAST_METHOD_ID getAddress
public int Get Controller Id int controller int  retval return XPCOM Vtbl Call super LAST METHOD ID 9 get Address controller  retval  GetControllerId _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Get Controller By Id int controllerID int  retval return XPCOM Vtbl Call super LAST METHOD ID 10 get Address controllerID  retval  GetControllerById _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Get Controller Count int  retval return XPCOM Vtbl Call super LAST METHOD ID 11 get Address  retval  GetControllerCount _retval VtblCall LAST_METHOD_ID getAddress _retval

public static final int sizeof 16 public nsID 
public nsID String id Parse id 
public boolean Equals nsID other int ptr XPCOM nsID new XPCOM memmove ptr this nsID sizeof int other Ptr XPCOM nsID new XPCOM memmove other Ptr other nsID sizeof boolean result XPCOM nsID Equals ptr other Ptr XPCOM nsID delete ptr XPCOM nsID delete other Ptr return result  nsID_new otherPtr nsID_new otherPtr nsID_Equals otherPtr nsID_delete nsID_delete otherPtr
public boolean Parse String aID Str int ptr XPCOM nsID new boolean result XPCOM nsID Parse ptr aID Str XPCOM memmove this ptr nsID sizeof XPCOM nsID delete ptr return result  aIDStr nsID_new nsID_Parse aIDStr nsID_delete

new nsID NS IDIRECTORYSERVICE IID STRING public nsI Directory Service int address super address  NS_IDIRECTORYSERVICE_IID_STRING nsIDirectoryService
public int Init return XPCOM Vtbl Call super LAST METHOD ID 1 get Address  VtblCall LAST_METHOD_ID getAddress
public int Register Provider int prov return XPCOM Vtbl Call super LAST METHOD ID 2 get Address prov  RegisterProvider VtblCall LAST_METHOD_ID getAddress
public int Unregister Provider int prov return XPCOM Vtbl Call super LAST METHOD ID 3 get Address prov  UnregisterProvider VtblCall LAST_METHOD_ID getAddress

new nsID NS IDIRECTORYSERVICEPROVIDER IID STRING public nsI Directory Service Provider int address super address  NS_IDIRECTORYSERVICEPROVIDER_IID_STRING nsIDirectoryServiceProvider
public int Get File byte prop boolean persistent int  retval return XPCOM NS ERROR NOT IMPLEMENTED  GetFile _retval NS_ERROR_NOT_IMPLEMENTED

new nsID NS IDIRECTORYSERVICEPROVIDER2 IID STRING public nsI Directory Service Provider2 int address super address  NS_IDIRECTORYSERVICEPROVIDER2_IID_STRING nsIDirectoryServiceProvider2
public int Get Files byte prop int  retval return XPCOM Vtbl Call super LAST METHOD ID 1 get Address prop  retval  GetFiles _retval VtblCall LAST_METHOD_ID getAddress _retval

Contributor s 
IBM 
Binding to permit interfacing between Mozilla and SWT Copyright C 2003 IBM Corp All Rights Reserved 
END LICENSE BLOCK 
package org eclipse swt internal mozilla 
public class nsI Doc Shell extends nsI Supports  nsIDocShell nsISupports
static final int LAST METHOD ID nsI Supports LAST METHOD ID 51  LAST_METHOD_ID nsISupports LAST_METHOD_ID
public static final String NS IDOCSHELL IID STRING 69E5DE00 7B8B 11d3 AF61 00A024FFC08C  NS_IDOCSHELL_IID_STRING
public static final nsID NS IDOCSHELL IID  NS_IDOCSHELL_IID
new nsID NS IDOCSHELL IID STRING  NS_IDOCSHELL_IID_STRING
public nsI Doc Shell int address super address  nsIDocShell
public int LoadURI int uri int load Info int a Load Flags boolean first Party return XPCOM Vtbl Call super LAST METHOD ID 1 get Address uri load Info a Load Flags first Party  loadInfo aLoadFlags firstParty VtblCall LAST_METHOD_ID getAddress loadInfo aLoadFlags firstParty
public int Load Stream int a Stream int aURI int a Content Type int a Content Charset int a Load Info return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Stream aURI a Content Type a Content Charset a Load Info  LoadStream aStream aContentType aContentCharset aLoadInfo VtblCall LAST_METHOD_ID getAddress aStream aContentType aContentCharset aLoadInfo
public int Internal Load int aURI int a Referrer int a Owner boolean a Inherit Owner char a Window Target int a Post Data Stream int a Headers Stream int a Load Flags int aSH Entry boolean first Party int a Doc Shell int a Request return XPCOM NS ERROR NOT IMPLEMENTED  InternalLoad aReferrer aOwner aInheritOwner aWindowTarget aPostDataStream aHeadersStream aLoadFlags aSHEntry firstParty aDocShell aRequest NS_ERROR_NOT_IMPLEMENTED
public int Create Load Info int load Info return XPCOM Vtbl Call super LAST METHOD ID 4 get Address load Info  CreateLoadInfo loadInfo VtblCall LAST_METHOD_ID getAddress loadInfo
public int Prepare For New Content Model return XPCOM Vtbl Call super LAST METHOD ID 5 get Address  PrepareForNewContentModel VtblCall LAST_METHOD_ID getAddress
public int Set CurrentURI int aURI return XPCOM Vtbl Call super LAST METHOD ID 6 get Address aURI  SetCurrentURI VtblCall LAST_METHOD_ID getAddress
public int Fire Unload Notification return XPCOM Vtbl Call super LAST METHOD ID 7 get Address  FireUnloadNotification VtblCall LAST_METHOD_ID getAddress
public int Get Pres Context int a Pres Context return XPCOM Vtbl Call super LAST METHOD ID 8 get Address a Pres Context  GetPresContext aPresContext VtblCall LAST_METHOD_ID getAddress aPresContext
public int Get Content Viewer int a Content Viewer return XPCOM Vtbl Call super LAST METHOD ID 11 get Address a Content Viewer  GetContentViewer aContentViewer VtblCall LAST_METHOD_ID getAddress aContentViewer
public int Get Chrome Event Handler int a Chrome Event Handler return XPCOM Vtbl Call super LAST METHOD ID 12 get Address a Chrome Event Handler  GetChromeEventHandler aChromeEventHandler VtblCall LAST_METHOD_ID getAddress aChromeEventHandler
public int Set Chrome Event Handler int a Chrome Event Handler return XPCOM Vtbl Call super LAST METHOD ID 13 get Address a Chrome Event Handler  SetChromeEventHandler aChromeEventHandler VtblCall LAST_METHOD_ID getAddress aChromeEventHandler
public int Get ParentURI Content Listener int a ParentURI Content Listener return XPCOM Vtbl Call super LAST METHOD ID 14 get Address a ParentURI Content Listener  GetParentURIContentListener aParentURIContentListener VtblCall LAST_METHOD_ID getAddress aParentURIContentListener
public int Set ParentURI Content Listener int a ParentURI Content Listener return XPCOM Vtbl Call super LAST METHOD ID 15 get Address a ParentURI Content Listener  SetParentURIContentListener aParentURIContentListener VtblCall LAST_METHOD_ID getAddress aParentURIContentListener
public int Get Document Charset Info int a Document Charset Info return XPCOM Vtbl Call super LAST METHOD ID 16 get Address a Document Charset Info  GetDocumentCharsetInfo aDocumentCharsetInfo VtblCall LAST_METHOD_ID getAddress aDocumentCharsetInfo
public int Set Document Charset Info int a Document Charset Info return XPCOM Vtbl Call super LAST METHOD ID 17 get Address a Document Charset Info  SetDocumentCharsetInfo aDocumentCharsetInfo VtblCall LAST_METHOD_ID getAddress aDocumentCharsetInfo
public int Get Allow Javascript boolean a Allow Javascript  GetAllowJavascript aAllowJavascript
return XPCOM Vtbl Call super LAST METHOD ID 20 get Address a Allow Javascript  VtblCall LAST_METHOD_ID getAddress aAllowJavascript
public int Set Allow Javascript boolean a Allow Javascript  SetAllowJavascript aAllowJavascript
return XPCOM Vtbl Call super LAST METHOD ID 21 get Address a Allow Javascript  VtblCall LAST_METHOD_ID getAddress aAllowJavascript
public int Get Allow Meta Redirects boolean allow Meta Redirects  GetAllowMetaRedirects allowMetaRedirects
return XPCOM Vtbl Call super LAST METHOD ID 22 get Address allow Meta Redirects  VtblCall LAST_METHOD_ID getAddress allowMetaRedirects
public int Set Allow Meta Redirects boolean allow Meta Redirects  SetAllowMetaRedirects allowMetaRedirects
return XPCOM Vtbl Call super LAST METHOD ID 23 get Address allow Meta Redirects  VtblCall LAST_METHOD_ID getAddress allowMetaRedirects

new nsID NS IDOCSHELLTREEITEM IID STRING public nsI Doc Shell Tree Item int address super address  NS_IDOCSHELLTREEITEM_IID_STRING nsIDocShellTreeItem
public int Get Name int a Name return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Name  GetName aName VtblCall LAST_METHOD_ID getAddress aName
public int Set Name char a Name return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Name  SetName aName VtblCall LAST_METHOD_ID getAddress aName
public int Name Equals char name boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 3 get Address name  retval  NameEquals _retval VtblCall LAST_METHOD_ID getAddress _retval
public static final int type All 2147483647 public int Get Item Type int a Item Type return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a Item Type  typeAll GetItemType aItemType VtblCall LAST_METHOD_ID getAddress aItemType
public int Set Item Type int a Item Type return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a Item Type  SetItemType aItemType VtblCall LAST_METHOD_ID getAddress aItemType
public int Get Parent int a Parent return XPCOM Vtbl Call super LAST METHOD ID 6 get Address a Parent  GetParent aParent VtblCall LAST_METHOD_ID getAddress aParent
public int Set Parent int a Parent return XPCOM Vtbl Call super LAST METHOD ID 7 get Address a Parent  SetParent aParent VtblCall LAST_METHOD_ID getAddress aParent
public int Get Same Type Parent int a Same Type Parent return XPCOM Vtbl Call super LAST METHOD ID 8 get Address a Same Type Parent  GetSameTypeParent aSameTypeParent VtblCall LAST_METHOD_ID getAddress aSameTypeParent
public int Get Root Tree Item int a Root Tree Item return XPCOM Vtbl Call super LAST METHOD ID 9 get Address a Root Tree Item  GetRootTreeItem aRootTreeItem VtblCall LAST_METHOD_ID getAddress aRootTreeItem
public int Get Same Type Root Tree Item int a Same Type Root Tree Item return XPCOM Vtbl Call super LAST METHOD ID 10 get Address a Same Type Root Tree Item  GetSameTypeRootTreeItem aSameTypeRootTreeItem VtblCall LAST_METHOD_ID getAddress aSameTypeRootTreeItem
public int Find Item With Name char name int a Requestor int  retval return XPCOM Vtbl Call super LAST METHOD ID 11 get Address name a Requestor  retval  FindItemWithName aRequestor _retval VtblCall LAST_METHOD_ID getAddress aRequestor _retval
public int Get Tree Owner int a Tree Owner return XPCOM Vtbl Call super LAST METHOD ID 12 get Address a Tree Owner  GetTreeOwner aTreeOwner VtblCall LAST_METHOD_ID getAddress aTreeOwner
public int Set Tree Owner int a Tree Owner return XPCOM Vtbl Call super LAST METHOD ID 13 get Address a Tree Owner  SetTreeOwner aTreeOwner VtblCall LAST_METHOD_ID getAddress aTreeOwner
public int Get Child Offset int a Child Offset return XPCOM Vtbl Call super LAST METHOD ID 14 get Address a Child Offset  GetChildOffset aChildOffset VtblCall LAST_METHOD_ID getAddress aChildOffset
public int Set Child Offset int a Child Offset return XPCOM Vtbl Call super LAST METHOD ID 15 get Address a Child Offset  SetChildOffset aChildOffset VtblCall LAST_METHOD_ID getAddress aChildOffset

Contributor s 
IBM 
Binding to permit interfacing between Mozilla and SWT Copyright C 2003 IBM Corp All Rights Reserved 
END LICENSE BLOCK 

new nsID NS IDOMLOCATION IID STRING public nsIDOM Event int address super address  NS_IDOMLOCATION_IID_STRING nsIDOMEvent
public static final int BUBBLING PHASE 3 public int Get Type int a Type return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Type  BUBBLING_PHASE GetType aType VtblCall LAST_METHOD_ID getAddress aType
public int Get Target int a Target return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Target  GetTarget aTarget VtblCall LAST_METHOD_ID getAddress aTarget
public int Get Current Target int a Current Target return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a Current Target  GetCurrentTarget aCurrentTarget VtblCall LAST_METHOD_ID getAddress aCurrentTarget
public int Get Event Phase short a Event Phase return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a Event Phase  GetEventPhase aEventPhase VtblCall LAST_METHOD_ID getAddress aEventPhase
public int Get Bubbles boolean a Bubbles return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a Bubbles  GetBubbles aBubbles VtblCall LAST_METHOD_ID getAddress aBubbles
public int Get Cancelable boolean a Cancelable return XPCOM Vtbl Call super LAST METHOD ID 6 get Address a Cancelable  GetCancelable aCancelable VtblCall LAST_METHOD_ID getAddress aCancelable
public int Get Time Stamp int a Time Stamp return XPCOM Vtbl Call super LAST METHOD ID 7 get Address a Time Stamp  GetTimeStamp aTimeStamp VtblCall LAST_METHOD_ID getAddress aTimeStamp
public int Stop Propagation return XPCOM Vtbl Call super LAST METHOD ID 8 get Address  StopPropagation VtblCall LAST_METHOD_ID getAddress
public int Prevent Default return XPCOM Vtbl Call super LAST METHOD ID 9 get Address  PreventDefault VtblCall LAST_METHOD_ID getAddress
public int Init Event int event Type Arg boolean can Bubble Arg boolean cancelable Arg return XPCOM Vtbl Call super LAST METHOD ID 10 get Address event Type Arg can Bubble Arg cancelable Arg  InitEvent eventTypeArg canBubbleArg cancelableArg VtblCall LAST_METHOD_ID getAddress eventTypeArg canBubbleArg cancelableArg

new nsID NS IDOMLOCATION IID STRING public nsIDOM Location int address super address  NS_IDOMLOCATION_IID_STRING nsIDOMLocation
public int Get Hash int a Hash return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Hash  GetHash aHash VtblCall LAST_METHOD_ID getAddress aHash
public int Set Hash int a Hash return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Hash  SetHash aHash VtblCall LAST_METHOD_ID getAddress aHash
public int Get Host int a Host return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a Host  GetHost aHost VtblCall LAST_METHOD_ID getAddress aHost
public int Set Host int a Host return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a Host  SetHost aHost VtblCall LAST_METHOD_ID getAddress aHost
public int Get Hostname int a Hostname return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a Hostname  GetHostname aHostname VtblCall LAST_METHOD_ID getAddress aHostname
public int Set Hostname int a Hostname return XPCOM Vtbl Call super LAST METHOD ID 6 get Address a Hostname  SetHostname aHostname VtblCall LAST_METHOD_ID getAddress aHostname
public int Get Href int a Href return XPCOM Vtbl Call super LAST METHOD ID 7 get Address a Href  GetHref aHref VtblCall LAST_METHOD_ID getAddress aHref
public int Set Href int a Href return XPCOM Vtbl Call super LAST METHOD ID 8 get Address a Href  SetHref aHref VtblCall LAST_METHOD_ID getAddress aHref
public int Get Pathname int a Pathname return XPCOM Vtbl Call super LAST METHOD ID 9 get Address a Pathname  GetPathname aPathname VtblCall LAST_METHOD_ID getAddress aPathname
public int Set Pathname int a Pathname return XPCOM Vtbl Call super LAST METHOD ID 10 get Address a Pathname  SetPathname aPathname VtblCall LAST_METHOD_ID getAddress aPathname
public int Get Port int a Port return XPCOM Vtbl Call super LAST METHOD ID 11 get Address a Port  GetPort aPort VtblCall LAST_METHOD_ID getAddress aPort
public int Set Port int a Port return XPCOM Vtbl Call super LAST METHOD ID 12 get Address a Port  SetPort aPort VtblCall LAST_METHOD_ID getAddress aPort
public int Get Protocol int a Protocol return XPCOM Vtbl Call super LAST METHOD ID 13 get Address a Protocol  GetProtocol aProtocol VtblCall LAST_METHOD_ID getAddress aProtocol
public int Set Protocol int a Protocol return XPCOM Vtbl Call super LAST METHOD ID 14 get Address a Protocol  SetProtocol aProtocol VtblCall LAST_METHOD_ID getAddress aProtocol
public int Get Search int a Search return XPCOM Vtbl Call super LAST METHOD ID 15 get Address a Search  GetSearch aSearch VtblCall LAST_METHOD_ID getAddress aSearch
public int Set Search int a Search return XPCOM Vtbl Call super LAST METHOD ID 16 get Address a Search  SetSearch aSearch VtblCall LAST_METHOD_ID getAddress aSearch
public int Reload boolean forceget return XPCOM Vtbl Call super LAST METHOD ID 17 get Address forceget  VtblCall LAST_METHOD_ID getAddress
public int Replace int url return XPCOM Vtbl Call super LAST METHOD ID 18 get Address url  VtblCall LAST_METHOD_ID getAddress
public int Assign int url return XPCOM Vtbl Call super LAST METHOD ID 19 get Address url  VtblCall LAST_METHOD_ID getAddress
public int To String int  retval return XPCOM Vtbl Call super LAST METHOD ID 20 get Address  retval  ToString _retval VtblCall LAST_METHOD_ID getAddress _retval

new nsID NS IDOMMOUSEEVENT IID STRING public nsIDOM Mouse Event int address super address  NS_IDOMMOUSEEVENT_IID_STRING nsIDOMMouseEvent
public int Get ScreenX int a ScreenX return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a ScreenX  GetScreenX aScreenX VtblCall LAST_METHOD_ID getAddress aScreenX
public int Get ScreenY int a ScreenY return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a ScreenY  GetScreenY aScreenY VtblCall LAST_METHOD_ID getAddress aScreenY
public int Get ClientX int a ClientX return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a ClientX  GetClientX aClientX VtblCall LAST_METHOD_ID getAddress aClientX
public int Get ClientY int a ClientY return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a ClientY  GetClientY aClientY VtblCall LAST_METHOD_ID getAddress aClientY
public int Get Ctrl Key boolean a Ctrl Key return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a Ctrl Key  GetCtrlKey aCtrlKey VtblCall LAST_METHOD_ID getAddress aCtrlKey
public int Get Shift Key boolean a Shift Key return XPCOM Vtbl Call super LAST METHOD ID 6 get Address a Shift Key  GetShiftKey aShiftKey VtblCall LAST_METHOD_ID getAddress aShiftKey
public int Get Alt Key boolean a Alt Key return XPCOM Vtbl Call super LAST METHOD ID 7 get Address a Alt Key  GetAltKey aAltKey VtblCall LAST_METHOD_ID getAddress aAltKey
public int Get Meta Key boolean a Meta Key return XPCOM Vtbl Call super LAST METHOD ID 8 get Address a Meta Key  GetMetaKey aMetaKey VtblCall LAST_METHOD_ID getAddress aMetaKey
public int Get Button short a Button return XPCOM Vtbl Call super LAST METHOD ID 9 get Address a Button  GetButton aButton VtblCall LAST_METHOD_ID getAddress aButton
public int Get Related Target int a Related Target return XPCOM Vtbl Call super LAST METHOD ID 10 get Address a Related Target  GetRelatedTarget aRelatedTarget VtblCall LAST_METHOD_ID getAddress aRelatedTarget
public int Init Mouse Event int type Arg boolean can Bubble Arg boolean cancelable Arg int view Arg int detail Arg int screenX Arg int screenY Arg int clientX Arg int clientY Arg boolean ctrl Key Arg boolean alt Key Arg boolean shift Key Arg boolean meta Key Arg short button Arg int related Target Arg return XPCOM NS ERROR NOT IMPLEMENTED  InitMouseEvent typeArg canBubbleArg cancelableArg viewArg detailArg screenXArg screenYArg clientXArg clientYArg ctrlKeyArg altKeyArg shiftKeyArg metaKeyArg buttonArg relatedTargetArg NS_ERROR_NOT_IMPLEMENTED

new nsID NS IDOMUIEVENT IID STRING public nsIDOMUI Event int address super address  NS_IDOMUIEVENT_IID_STRING nsIDOMUIEvent
public int Get View int a View return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a View  GetView aView VtblCall LAST_METHOD_ID getAddress aView
public int Get Detail int a Detail return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Detail  GetDetail aDetail VtblCall LAST_METHOD_ID getAddress aDetail
public int Init Event int type Arg boolean can Bubble Arg boolean cancelable Arg int view Arg int detail Arg return XPCOM NS ERROR NOT IMPLEMENTED  InitEvent typeArg canBubbleArg cancelableArg viewArg detailArg NS_ERROR_NOT_IMPLEMENTED

new nsID NS IDOMWINDOW IID STRING public nsIDOM Window int address super address  NS_IDOMWINDOW_IID_STRING nsIDOMWindow
public int Get Document int a Document return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Document  GetDocument aDocument VtblCall LAST_METHOD_ID getAddress aDocument
public int Get Parent int a Parent return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Parent  GetParent aParent VtblCall LAST_METHOD_ID getAddress aParent
public int Get Top int a Top return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a Top  GetTop aTop VtblCall LAST_METHOD_ID getAddress aTop
public int Get Scrollbars int scrollbars return XPCOM Vtbl Call super LAST METHOD ID 4 get Address scrollbars  GetScrollbars VtblCall LAST_METHOD_ID getAddress
public int Get Frames int frames return XPCOM Vtbl Call super LAST METHOD ID 5 get Address frames  GetFrames VtblCall LAST_METHOD_ID getAddress
public int Get Name int a Name return XPCOM Vtbl Call super LAST METHOD ID 6 get Address a Name  GetName aName VtblCall LAST_METHOD_ID getAddress aName
public int Set Name int a Name return XPCOM Vtbl Call super LAST METHOD ID 7 get Address a Name  SetName aName VtblCall LAST_METHOD_ID getAddress aName
public int Get Text Zoom float a Text Zoom return XPCOM Vtbl Call super LAST METHOD ID 8 get Address a Text Zoom  GetTextZoom aTextZoom VtblCall LAST_METHOD_ID getAddress aTextZoom
public int Set Text Zoom float a Text Zoom return XPCOM Vtbl Call super LAST METHOD ID 9 get Address a Text Zoom  SetTextZoom aTextZoom VtblCall LAST_METHOD_ID getAddress aTextZoom
public int Get ScrollX int a ScrollX return XPCOM Vtbl Call super LAST METHOD ID 10 get Address a ScrollX  GetScrollX aScrollX VtblCall LAST_METHOD_ID getAddress aScrollX
public int Get ScrollY int a ScrollY return XPCOM Vtbl Call super LAST METHOD ID 11 get Address a ScrollY  GetScrollY aScrollY VtblCall LAST_METHOD_ID getAddress aScrollY
public int Scroll To int x Scroll int y Scroll return XPCOM Vtbl Call super LAST METHOD ID 12 get Address x Scroll y Scroll  ScrollTo xScroll yScroll VtblCall LAST_METHOD_ID getAddress xScroll yScroll
public int Scroll By int x Scroll Dif int y Scroll Dif return XPCOM Vtbl Call super LAST METHOD ID 13 get Address x Scroll Dif y Scroll Dif  ScrollBy xScrollDif yScrollDif VtblCall LAST_METHOD_ID getAddress xScrollDif yScrollDif
public int Get Selection int  retval return XPCOM Vtbl Call super LAST METHOD ID 14 get Address  retval  GetSelection _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Scroll By Lines int num Lines return XPCOM Vtbl Call super LAST METHOD ID 15 get Address num Lines  ScrollByLines numLines VtblCall LAST_METHOD_ID getAddress numLines
public int Scroll By Pages int num Pages return XPCOM Vtbl Call super LAST METHOD ID 16 get Address num Pages  ScrollByPages numPages VtblCall LAST_METHOD_ID getAddress numPages
public int Size To Content return XPCOM Vtbl Call super LAST METHOD ID 17 get Address  SizeToContent VtblCall LAST_METHOD_ID getAddress

new nsID NS IEMBEDDINGSITEWINDOW IID STRING public nsI Embedding Site Window int address super address  NS_IEMBEDDINGSITEWINDOW_IID_STRING nsIEmbeddingSiteWindow
public static final int DIM FLAGS SIZE OUTER 4 public int Set Dimensions int flags int x int y int cx int cy return XPCOM Vtbl Call super LAST METHOD ID 1 get Address flags x y cx cy  DIM_FLAGS_SIZE_OUTER SetDimensions VtblCall LAST_METHOD_ID getAddress
public int Get Dimensions int flags int x int y int cx int cy return XPCOM Vtbl Call super LAST METHOD ID 2 get Address flags x y cx cy  GetDimensions VtblCall LAST_METHOD_ID getAddress
public int Set Focus return XPCOM Vtbl Call super LAST METHOD ID 3 get Address  SetFocus VtblCall LAST_METHOD_ID getAddress
public int Get Visibility boolean a Visibility return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a Visibility  GetVisibility aVisibility VtblCall LAST_METHOD_ID getAddress aVisibility
public int Set Visibility boolean a Visibility return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a Visibility  SetVisibility aVisibility VtblCall LAST_METHOD_ID getAddress aVisibility
public int Get Title int a Title return XPCOM Vtbl Call super LAST METHOD ID 6 get Address a Title  GetTitle aTitle VtblCall LAST_METHOD_ID getAddress aTitle
public int Set Title char a Title return XPCOM Vtbl Call super LAST METHOD ID 7 get Address a Title  SetTitle aTitle VtblCall LAST_METHOD_ID getAddress aTitle
public int Get Site Window int a Site Window return XPCOM Vtbl Call super LAST METHOD ID 8 get Address a Site Window  GetSiteWindow aSiteWindow VtblCall LAST_METHOD_ID getAddress aSiteWindow

new nsID NS IEVENTSINK IID STRING public nsI Event Sink int address super address  NS_IEVENTSINK_IID_STRING nsIEventSink
public int Dispatch Event int an Event boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 1 get Address an Event  retval  DispatchEvent anEvent _retval VtblCall LAST_METHOD_ID getAddress anEvent _retval
public int Drag Event int a Message short a Mouse GlobalX short a Mouse GlobalY short a Key Modifiers boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Message a Mouse GlobalX a Mouse GlobalY a Key Modifiers  retval  DragEvent aMessage aMouseGlobalX aMouseGlobalY aKeyModifiers _retval VtblCall LAST_METHOD_ID getAddress aMessage aMouseGlobalX aMouseGlobalY aKeyModifiers _retval
public int Scroll boolean a Vertical short a Num Lines short a Mouse LocalX short a Mouse LocalY boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a Vertical a Num Lines a Mouse LocalX a Mouse LocalY  retval  aVertical aNumLines aMouseLocalX aMouseLocalY _retval VtblCall LAST_METHOD_ID getAddress aVertical aNumLines aMouseLocalX aMouseLocalY _retval
public int Idle return XPCOM Vtbl Call super LAST METHOD ID 4 get Address  VtblCall LAST_METHOD_ID getAddress

new nsID NS IFACTORY IID STRING public nsI Factory int address super address  NS_IFACTORY_IID_STRING nsIFactory
public int Create Instance int a Outer nsID iid int result return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Outer iid result  CreateInstance aOuter VtblCall LAST_METHOD_ID getAddress aOuter
public int Lock Factory boolean lock return XPCOM Vtbl Call super LAST METHOD ID 2 get Address lock  LockFactory VtblCall LAST_METHOD_ID getAddress

new nsID NS IFILE IID STRING public nsI File int address super address  NS_IFILE_IID_STRING nsIFile
public static final int DIRECTORY TYPE 1 public int Append int node return XPCOM Vtbl Call super LAST METHOD ID 1 get Address node  DIRECTORY_TYPE VtblCall LAST_METHOD_ID getAddress
public int Append Native int node return XPCOM Vtbl Call super LAST METHOD ID 2 get Address node  AppendNative VtblCall LAST_METHOD_ID getAddress
public int Normalize return XPCOM Vtbl Call super LAST METHOD ID 3 get Address  VtblCall LAST_METHOD_ID getAddress
public int Create int type int permissions return XPCOM Vtbl Call super LAST METHOD ID 4 get Address type permissions  VtblCall LAST_METHOD_ID getAddress
public int Get Leaf Name int a Leaf Name return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a Leaf Name  GetLeafName aLeafName VtblCall LAST_METHOD_ID getAddress aLeafName
public int Set Leaf Name int a Leaf Name return XPCOM Vtbl Call super LAST METHOD ID 6 get Address a Leaf Name  SetLeafName aLeafName VtblCall LAST_METHOD_ID getAddress aLeafName
public int Get Native Leaf Name int a Native Leaf Name return XPCOM Vtbl Call super LAST METHOD ID 7 get Address a Native Leaf Name  GetNativeLeafName aNativeLeafName VtblCall LAST_METHOD_ID getAddress aNativeLeafName
public int Set Native Leaf Name int a Native Leaf Name return XPCOM Vtbl Call super LAST METHOD ID 8 get Address a Native Leaf Name  SetNativeLeafName aNativeLeafName VtblCall LAST_METHOD_ID getAddress aNativeLeafName
public int Copy To int new Parent Dir int new Name return XPCOM Vtbl Call super LAST METHOD ID 9 get Address new Parent Dir new Name  CopyTo newParentDir newName VtblCall LAST_METHOD_ID getAddress newParentDir newName
public int Copy To Native int new Parent Dir int new Name return XPCOM Vtbl Call super LAST METHOD ID 10 get Address new Parent Dir new Name  CopyToNative newParentDir newName VtblCall LAST_METHOD_ID getAddress newParentDir newName
public int Copy To Following Links int new Parent Dir int new Name return XPCOM Vtbl Call super LAST METHOD ID 11 get Address new Parent Dir new Name  CopyToFollowingLinks newParentDir newName VtblCall LAST_METHOD_ID getAddress newParentDir newName
public int Copy To Following Links Native int new Parent Dir int new Name return XPCOM Vtbl Call super LAST METHOD ID 12 get Address new Parent Dir new Name  CopyToFollowingLinksNative newParentDir newName VtblCall LAST_METHOD_ID getAddress newParentDir newName
public int Move To int new Parent Dir int new Name return XPCOM Vtbl Call super LAST METHOD ID 13 get Address new Parent Dir new Name  MoveTo newParentDir newName VtblCall LAST_METHOD_ID getAddress newParentDir newName
public int Move To Native int new Parent Dir int new Name return XPCOM Vtbl Call super LAST METHOD ID 14 get Address new Parent Dir new Name  MoveToNative newParentDir newName VtblCall LAST_METHOD_ID getAddress newParentDir newName
public int Remove boolean recursive return XPCOM Vtbl Call super LAST METHOD ID 15 get Address recursive  VtblCall LAST_METHOD_ID getAddress
public int Get Permissions int permissions return XPCOM Vtbl Call super LAST METHOD ID 16 get Address permissions  GetPermissions VtblCall LAST_METHOD_ID getAddress
public int Set Permissions int permissions return XPCOM Vtbl Call super LAST METHOD ID 17 get Address permissions  SetPermissions VtblCall LAST_METHOD_ID getAddress
public int Get Permissions Of Link int a Permissions Of Link return XPCOM Vtbl Call super LAST METHOD ID 18 get Address a Permissions Of Link  GetPermissionsOfLink aPermissionsOfLink VtblCall LAST_METHOD_ID getAddress aPermissionsOfLink
public int Set Permissions Of Link int a Permissions Of Link return XPCOM Vtbl Call super LAST METHOD ID 19 get Address a Permissions Of Link  SetPermissionsOfLink aPermissionsOfLink VtblCall LAST_METHOD_ID getAddress aPermissionsOfLink
public int Get Last Modified Time long a Last Modified Time return XPCOM Vtbl Call super LAST METHOD ID 20 get Address a Last Modified Time  GetLastModifiedTime aLastModifiedTime VtblCall LAST_METHOD_ID getAddress aLastModifiedTime
public int Set Last Modified Time long a Last Modified Time return XPCOM Vtbl Call super LAST METHOD ID 21 get Address a Last Modified Time  SetLastModifiedTime aLastModifiedTime VtblCall LAST_METHOD_ID getAddress aLastModifiedTime
public int Get Last Modified Time Of Link long a Last Modified Time Of Link return XPCOM Vtbl Call super LAST METHOD ID 22 get Address a Last Modified Time Of Link  GetLastModifiedTimeOfLink aLastModifiedTimeOfLink VtblCall LAST_METHOD_ID getAddress aLastModifiedTimeOfLink
public int Set Last Modified Time Of Link long a Last Modified Time Of Link return XPCOM Vtbl Call super LAST METHOD ID 23 get Address a Last Modified Time Of Link  SetLastModifiedTimeOfLink aLastModifiedTimeOfLink VtblCall LAST_METHOD_ID getAddress aLastModifiedTimeOfLink
public int Get File Size long a File Size return XPCOM Vtbl Call super LAST METHOD ID 24 get Address a File Size  GetFileSize aFileSize VtblCall LAST_METHOD_ID getAddress aFileSize
public int Set File Size long a File Size return XPCOM Vtbl Call super LAST METHOD ID 25 get Address a File Size  SetFileSize aFileSize VtblCall LAST_METHOD_ID getAddress aFileSize
public int Get File Size Of Link long a File Size Of Link return XPCOM Vtbl Call super LAST METHOD ID 26 get Address a File Size Of Link  GetFileSizeOfLink aFileSizeOfLink VtblCall LAST_METHOD_ID getAddress aFileSizeOfLink
public int Get Target int a Target return XPCOM Vtbl Call super LAST METHOD ID 27 get Address a Target  GetTarget aTarget VtblCall LAST_METHOD_ID getAddress aTarget
public int Get Native Target int a Native Target return XPCOM Vtbl Call super LAST METHOD ID 28 get Address a Native Target  GetNativeTarget aNativeTarget VtblCall LAST_METHOD_ID getAddress aNativeTarget
public int Get Path int a Path return XPCOM Vtbl Call super LAST METHOD ID 29 get Address a Path  GetPath aPath VtblCall LAST_METHOD_ID getAddress aPath
public int Get Native Path int a Native Path return XPCOM Vtbl Call super LAST METHOD ID 30 get Address a Native Path  GetNativePath aNativePath VtblCall LAST_METHOD_ID getAddress aNativePath
public int Exists boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 31 get Address  retval  _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Is Writable boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 32 get Address  retval  IsWritable _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Is Readable boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 33 get Address  retval  IsReadable _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Is Executable boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 34 get Address  retval  IsExecutable _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Is Hidden boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 35 get Address  retval  IsHidden _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Is Directory boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 36 get Address  retval  IsDirectory _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Is File boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 37 get Address  retval  IsFile _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Is Symlink boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 38 get Address  retval  IsSymlink _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Is Special boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 39 get Address  retval  IsSpecial _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Create Unique int type int permissions return XPCOM Vtbl Call super LAST METHOD ID 40 get Address type permissions  CreateUnique VtblCall LAST_METHOD_ID getAddress
public int Clone int  retval return XPCOM Vtbl Call super LAST METHOD ID 41 get Address  retval  _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Equals int in File boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 42 get Address in File  retval  inFile _retval VtblCall LAST_METHOD_ID getAddress inFile _retval
public int Contains int in File boolean recur boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 43 get Address in File recur  retval  inFile _retval VtblCall LAST_METHOD_ID getAddress inFile _retval
public int Get Parent int a Parent return XPCOM Vtbl Call super LAST METHOD ID 44 get Address a Parent  GetParent aParent VtblCall LAST_METHOD_ID getAddress aParent
public int Get Directory Entries int directory Entries return XPCOM Vtbl Call super LAST METHOD ID 45 get Address directory Entries  GetDirectoryEntries directoryEntries VtblCall LAST_METHOD_ID getAddress directoryEntries

Contributor s 
IBM 
Binding to permit interfacing between Mozilla and SWT Copyright C 2003 IBM Corp All Rights Reserved 
END LICENSE BLOCK 
package org eclipse swt internal mozilla 
public class nsI Input Stream extends nsI Supports  nsIInputStream nsISupports

Contributor s 
IBM 
Binding to permit interfacing between Mozilla and SWT Copyright C 2003 IBM Corp All Rights Reserved 
END LICENSE BLOCK 

new nsID NS IINTERFACEREQUESTOR IID STRING public nsI Interface Requestor int address super address  NS_IINTERFACEREQUESTOR_IID_STRING nsIInterfaceRequestor
public int Get Interface nsID uuid int result return XPCOM Vtbl Call super LAST METHOD ID 1 get Address uuid result  GetInterface VtblCall LAST_METHOD_ID getAddress

Contributor s 
IBM 
Binding to permit interfacing between Mozilla and SWT Copyright C 2003 IBM Corp All Rights Reserved 
END LICENSE BLOCK 
package org eclipse swt internal mozilla 
public class nsIIO Service extends nsI Supports  nsIIOService nsISupports
static final int LAST METHOD ID nsI Supports LAST METHOD ID 10  LAST_METHOD_ID nsISupports LAST_METHOD_ID
public static final String NS IIOSERVICE IID STRING bddeda3f 9020 4d12 8c70 984ee9f7935e  NS_IIOSERVICE_IID_STRING
public static final nsID NS IIOSERVICE IID  NS_IIOSERVICE_IID
new nsID NS IIOSERVICE IID STRING  NS_IIOSERVICE_IID_STRING
public nsIIO Service int address super address  nsIIOService

Contributor s 
IBM 
Binding to permit interfacing between Mozilla and SWT Copyright C 2003 IBM Corp All Rights Reserved 
END LICENSE BLOCK 
package org eclipse swt internal mozilla 
public class nsI Load Group extends nsI Request  nsILoadGroup nsIRequest
static final int LAST METHOD ID nsI Request LAST METHOD ID 10  LAST_METHOD_ID nsIRequest LAST_METHOD_ID
public static final String NS ILOADGROUP IID STRING 3de0a31c feaf 400f 9f1e 4ef71f8b20cc  NS_ILOADGROUP_IID_STRING
public static final nsID NS ILOADGROUP IID  NS_ILOADGROUP_IID
new nsID NS ILOADGROUP IID STRING  NS_ILOADGROUP_IID_STRING
public nsI Load Group int address super address  nsILoadGroup

new nsID NS ILOCALFILE IID STRING public nsI Local File int address super address  NS_ILOCALFILE_IID_STRING nsILocalFile
public int Init With Path int file Path return XPCOM Vtbl Call super LAST METHOD ID 1 get Address file Path  InitWithPath filePath VtblCall LAST_METHOD_ID getAddress filePath
public int Init With Native Path int file Path return XPCOM Vtbl Call super LAST METHOD ID 2 get Address file Path  InitWithNativePath filePath VtblCall LAST_METHOD_ID getAddress filePath
public int Init With File int a File return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a File  InitWithFile aFile VtblCall LAST_METHOD_ID getAddress aFile
public int Get Follow Links boolean follow Links return XPCOM Vtbl Call super LAST METHOD ID 4 get Address follow Links  GetFollowLinks followLinks VtblCall LAST_METHOD_ID getAddress followLinks
public int Set Follow Links boolean follow Links return XPCOM Vtbl Call super LAST METHOD ID 5 get Address follow Links  SetFollowLinks followLinks VtblCall LAST_METHOD_ID getAddress followLinks
public int OpenNSPR File Desc int flags int mode int  retval return XPCOM Vtbl Call super LAST METHOD ID 6 get Address flags mode  retval  OpenNSPRFileDesc _retval VtblCall LAST_METHOD_ID getAddress _retval
public int OpenANSI File Desc byte mode int  retval return XPCOM Vtbl Call super LAST METHOD ID 7 get Address mode  retval  OpenANSIFileDesc _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Load int  retval return XPCOM Vtbl Call super LAST METHOD ID 8 get Address  retval  _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Get Disk Space Available long a Disk Space Available return XPCOM Vtbl Call super LAST METHOD ID 9 get Address a Disk Space Available  GetDiskSpaceAvailable aDiskSpaceAvailable VtblCall LAST_METHOD_ID getAddress aDiskSpaceAvailable
public int Append Relative Path int relative File Path return XPCOM Vtbl Call super LAST METHOD ID 10 get Address relative File Path  AppendRelativePath relativeFilePath VtblCall LAST_METHOD_ID getAddress relativeFilePath
public int Append Relative Native Path int relative File Path return XPCOM Vtbl Call super LAST METHOD ID 11 get Address relative File Path  AppendRelativeNativePath relativeFilePath VtblCall LAST_METHOD_ID getAddress relativeFilePath
public int Get Persistent Descriptor int a Persistent Descriptor return XPCOM Vtbl Call super LAST METHOD ID 12 get Address a Persistent Descriptor  GetPersistentDescriptor aPersistentDescriptor VtblCall LAST_METHOD_ID getAddress aPersistentDescriptor
public int Set Persistent Descriptor int a Persistent Descriptor return XPCOM Vtbl Call super LAST METHOD ID 13 get Address a Persistent Descriptor  SetPersistentDescriptor aPersistentDescriptor VtblCall LAST_METHOD_ID getAddress aPersistentDescriptor
public int Reveal return XPCOM Vtbl Call super LAST METHOD ID 14 get Address  VtblCall LAST_METHOD_ID getAddress
public int Launch return XPCOM Vtbl Call super LAST METHOD ID 15 get Address  VtblCall LAST_METHOD_ID getAddress
public int Get Relative Descriptor int from File int  retval return XPCOM Vtbl Call super LAST METHOD ID 16 get Address from File  retval  GetRelativeDescriptor fromFile _retval VtblCall LAST_METHOD_ID getAddress fromFile _retval
public int Set Relative Descriptor int from File int relative Desc return XPCOM Vtbl Call super LAST METHOD ID 17 get Address from File relative Desc  SetRelativeDescriptor fromFile relativeDesc VtblCall LAST_METHOD_ID getAddress fromFile relativeDesc

new nsID NS IMEMORY IID STRING public nsI Memory int address super address  NS_IMEMORY_IID_STRING nsIMemory
public int Alloc int size return XPCOM Vtbl Call super LAST METHOD ID 1 get Address size  VtblCall LAST_METHOD_ID getAddress
public int Realloc int ptr int new Size return XPCOM Vtbl Call super LAST METHOD ID 2 get Address ptr new Size  newSize VtblCall LAST_METHOD_ID getAddress newSize
public void Free int ptr XPCOM Vtbl Call No Ret super LAST METHOD ID 3 get Address ptr  VtblCallNoRet LAST_METHOD_ID getAddress
public int Heap Minimize boolean immediate return XPCOM Vtbl Call super LAST METHOD ID 4 get Address immediate  HeapMinimize VtblCall LAST_METHOD_ID getAddress
public int Is Low Memory boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 5 get Address  retval  IsLowMemory _retval VtblCall LAST_METHOD_ID getAddress _retval

new nsID NS IOBSERVER IID STRING public nsI Observer int address super address  NS_IOBSERVER_IID_STRING nsIObserver
public int Observe int a Subject byte a Topic char a Data return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Subject a Topic a Data  aSubject aTopic aData VtblCall LAST_METHOD_ID getAddress aSubject aTopic aData

new nsID NS IOBSERVERSERVICE IID STRING public nsI Observer Service int address super address  NS_IOBSERVERSERVICE_IID_STRING nsIObserverService
public int Add Observer int an Observer byte a Topic boolean owns Weak return XPCOM Vtbl Call super LAST METHOD ID 1 get Address an Observer a Topic owns Weak  AddObserver anObserver aTopic ownsWeak VtblCall LAST_METHOD_ID getAddress anObserver aTopic ownsWeak
public int Remove Observer int an Observer byte a Topic return XPCOM Vtbl Call super LAST METHOD ID 2 get Address an Observer a Topic  RemoveObserver anObserver aTopic VtblCall LAST_METHOD_ID getAddress anObserver aTopic
public int Notify Observers int a Subject byte a Topic char some Data return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a Subject a Topic some Data  NotifyObservers aSubject aTopic someData VtblCall LAST_METHOD_ID getAddress aSubject aTopic someData
public int Enumerate Observers byte a Topic int  retval return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a Topic  retval  EnumerateObservers aTopic _retval VtblCall LAST_METHOD_ID getAddress aTopic _retval

new nsID NS IPREF IID STRING public nsI Pref int address super address  NS_IPREF_IID_STRING nsIPref
public int Read User Prefs int a File return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a File  ReadUserPrefs aFile VtblCall LAST_METHOD_ID getAddress aFile
public int Reset Prefs return XPCOM Vtbl Call super LAST METHOD ID 2 get Address  ResetPrefs VtblCall LAST_METHOD_ID getAddress
public int Reset User Prefs return XPCOM Vtbl Call super LAST METHOD ID 3 get Address  ResetUserPrefs VtblCall LAST_METHOD_ID getAddress
public int Save Pref File int a File return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a File  SavePrefFile aFile VtblCall LAST_METHOD_ID getAddress aFile
public int Get Branch byte a Pref Root int  retval return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a Pref Root  retval  GetBranch aPrefRoot _retval VtblCall LAST_METHOD_ID getAddress aPrefRoot _retval
public int Get Default Branch byte a Pref Root int  retval return XPCOM Vtbl Call super LAST METHOD ID 6 get Address a Pref Root  retval  GetDefaultBranch aPrefRoot _retval VtblCall LAST_METHOD_ID getAddress aPrefRoot _retval
public static final int e Pref Valuetype Mask 224 public int Get Root int a Root return XPCOM Vtbl Call super LAST METHOD ID 7 get Address a Root  ePrefValuetypeMask GetRoot aRoot VtblCall LAST_METHOD_ID getAddress aRoot
public int Get Pref Type byte a Pref Name int  retval return XPCOM Vtbl Call super LAST METHOD ID 8 get Address a Pref Name  retval  GetPrefType aPrefName _retval VtblCall LAST_METHOD_ID getAddress aPrefName _retval
public int Get Bool Pref byte a Pref Name boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 9 get Address a Pref Name  retval  GetBoolPref aPrefName _retval VtblCall LAST_METHOD_ID getAddress aPrefName _retval
public int Set Bool Pref byte a Pref Name int a Value return XPCOM Vtbl Call super LAST METHOD ID 10 get Address a Pref Name a Value  SetBoolPref aPrefName aValue VtblCall LAST_METHOD_ID getAddress aPrefName aValue
public int Get Char Pref byte a Pref Name int  retval return XPCOM Vtbl Call super LAST METHOD ID 11 get Address a Pref Name  retval  GetCharPref aPrefName _retval VtblCall LAST_METHOD_ID getAddress aPrefName _retval
public int Set Char Pref byte a Pref Name byte a Value return XPCOM Vtbl Call super LAST METHOD ID 12 get Address a Pref Name a Value  SetCharPref aPrefName aValue VtblCall LAST_METHOD_ID getAddress aPrefName aValue
public int Get Int Pref byte a Pref Name int  retval return XPCOM Vtbl Call super LAST METHOD ID 13 get Address a Pref Name  retval  GetIntPref aPrefName _retval VtblCall LAST_METHOD_ID getAddress aPrefName _retval
public int Set Int Pref byte a Pref Name int a Value return XPCOM Vtbl Call super LAST METHOD ID 14 get Address a Pref Name a Value  SetIntPref aPrefName aValue VtblCall LAST_METHOD_ID getAddress aPrefName aValue
public int Get Complex Value byte a Pref Name nsID a Type int a Value return XPCOM Vtbl Call super LAST METHOD ID 15 get Address a Pref Name a Type a Value  GetComplexValue aPrefName aType aValue VtblCall LAST_METHOD_ID getAddress aPrefName aType aValue
public int Set Complex Value byte a Pref Name nsID a Type int a Value return XPCOM Vtbl Call super LAST METHOD ID 16 get Address a Pref Name a Type a Value  SetComplexValue aPrefName aType aValue VtblCall LAST_METHOD_ID getAddress aPrefName aType aValue
public int Clear User Pref byte a Pref Name return XPCOM Vtbl Call super LAST METHOD ID 17 get Address a Pref Name  ClearUserPref aPrefName VtblCall LAST_METHOD_ID getAddress aPrefName
public int Pref Is Locked byte a Pref Name boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 18 get Address a Pref Name  retval  PrefIsLocked aPrefName _retval VtblCall LAST_METHOD_ID getAddress aPrefName _retval
public int Lock Pref byte a Pref Name return XPCOM Vtbl Call super LAST METHOD ID 19 get Address a Pref Name  LockPref aPrefName VtblCall LAST_METHOD_ID getAddress aPrefName
public int Unlock Pref byte a Pref Name return XPCOM Vtbl Call super LAST METHOD ID 20 get Address a Pref Name  UnlockPref aPrefName VtblCall LAST_METHOD_ID getAddress aPrefName
public int Reset Branch byte a Starting At return XPCOM Vtbl Call super LAST METHOD ID 21 get Address a Starting At  ResetBranch aStartingAt VtblCall LAST_METHOD_ID getAddress aStartingAt
public int Delete Branch byte a Starting At return XPCOM Vtbl Call super LAST METHOD ID 22 get Address a Starting At  DeleteBranch aStartingAt VtblCall LAST_METHOD_ID getAddress aStartingAt
public int Get Child List byte a Starting At int a Count int a Child Array return XPCOM NS ERROR NOT IMPLEMENTED  GetChildList aStartingAt aCount aChildArray NS_ERROR_NOT_IMPLEMENTED
public int Add Observer byte a Domain int a Observer boolean a Hold Weak return XPCOM Vtbl Call super LAST METHOD ID 24 get Address a Domain a Observer a Hold Weak  AddObserver aDomain aObserver aHoldWeak VtblCall LAST_METHOD_ID getAddress aDomain aObserver aHoldWeak
public int Remove Observer byte a Domain int a Observer return XPCOM Vtbl Call super LAST METHOD ID 25 get Address a Domain a Observer  RemoveObserver aDomain aObserver VtblCall LAST_METHOD_ID getAddress aDomain aObserver
public int Copy Char Pref byte pref int  retval return XPCOM Vtbl Call super LAST METHOD ID 26 get Address pref  retval  CopyCharPref _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Copy Default Char Pref byte pref int  retval return XPCOM Vtbl Call super LAST METHOD ID 27 get Address pref  retval  CopyDefaultCharPref _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Get Default Bool Pref byte pref boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 28 get Address pref  retval  GetDefaultBoolPref _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Get Default Int Pref byte pref int  retval return XPCOM Vtbl Call super LAST METHOD ID 29 get Address pref  retval  GetDefaultIntPref _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Set Default Bool Pref byte pref boolean value return XPCOM Vtbl Call super LAST METHOD ID 30 get Address pref value  SetDefaultBoolPref VtblCall LAST_METHOD_ID getAddress
public int Set Default Char Pref byte pref byte value return XPCOM Vtbl Call super LAST METHOD ID 31 get Address pref value  SetDefaultCharPref VtblCall LAST_METHOD_ID getAddress
public int Set Default Int Pref byte pref int value return XPCOM Vtbl Call super LAST METHOD ID 32 get Address pref value  SetDefaultIntPref VtblCall LAST_METHOD_ID getAddress
public int Copy Unichar Pref byte pref int  retval return XPCOM Vtbl Call super LAST METHOD ID 33 get Address pref  retval  CopyUnicharPref _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Copy Default Unichar Pref byte pref int  retval return XPCOM Vtbl Call super LAST METHOD ID 34 get Address pref  retval  CopyDefaultUnicharPref _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Set Unichar Pref byte pref char value return XPCOM Vtbl Call super LAST METHOD ID 35 get Address pref value  SetUnicharPref VtblCall LAST_METHOD_ID getAddress
public int Set Default Unichar Pref byte pref char value return XPCOM Vtbl Call super LAST METHOD ID 36 get Address pref value  SetDefaultUnicharPref VtblCall LAST_METHOD_ID getAddress
public int Get Localized Unichar Pref byte pref int  retval return XPCOM Vtbl Call super LAST METHOD ID 37 get Address pref  retval  GetLocalizedUnicharPref _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Get Default Localized Unichar Pref byte pref int  retval return XPCOM Vtbl Call super LAST METHOD ID 38 get Address pref  retval  GetDefaultLocalizedUnicharPref _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Get File Pref byte pref int  retval return XPCOM Vtbl Call super LAST METHOD ID 39 get Address pref  retval  GetFilePref _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Set File Pref byte pref int value boolean set Default return XPCOM Vtbl Call super LAST METHOD ID 40 get Address pref value set Default  SetFilePref setDefault VtblCall LAST_METHOD_ID getAddress setDefault
public int Get FileX Pref byte pref int  retval return XPCOM Vtbl Call super LAST METHOD ID 41 get Address pref  retval  GetFileXPref _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Set FileX Pref byte pref int value return XPCOM Vtbl Call super LAST METHOD ID 42 get Address pref value  SetFileXPref VtblCall LAST_METHOD_ID getAddress
public int Register Callback byte domain int callback int closure return XPCOM Vtbl Call super LAST METHOD ID 43 get Address domain callback closure  RegisterCallback VtblCall LAST_METHOD_ID getAddress
public int Unregister Callback byte domain int callback int closure return XPCOM Vtbl Call super LAST METHOD ID 44 get Address domain callback closure  UnregisterCallback VtblCall LAST_METHOD_ID getAddress
public int Enumerate Children byte parent int callback int data return XPCOM Vtbl Call super LAST METHOD ID 45 get Address parent callback data  EnumerateChildren VtblCall LAST_METHOD_ID getAddress

new nsID NS IPROFILE IID STRING public nsI Profile int address super address  NS_IPROFILE_IID_STRING nsIProfile
public int Get Profile Count int a Profile Count return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Profile Count  GetProfileCount aProfileCount VtblCall LAST_METHOD_ID getAddress aProfileCount
public int Get Profile List int length int profile Names return XPCOM Vtbl Call super LAST METHOD ID 2 get Address length profile Names  GetProfileList profileNames VtblCall LAST_METHOD_ID getAddress profileNames
public int Profile Exists char profile Name boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 3 get Address profile Name  retval  ProfileExists profileName _retval VtblCall LAST_METHOD_ID getAddress profileName _retval
public int Get Current Profile int a Current Profile return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a Current Profile  GetCurrentProfile aCurrentProfile VtblCall LAST_METHOD_ID getAddress aCurrentProfile
public int Set Current Profile char a Current Profile return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a Current Profile  SetCurrentProfile aCurrentProfile VtblCall LAST_METHOD_ID getAddress aCurrentProfile
public static final int SHUTDOWN CLEANSE 2 public int Shut Down Current Profile int shut Down Type return XPCOM Vtbl Call super LAST METHOD ID 6 get Address shut Down Type  SHUTDOWN_CLEANSE ShutDownCurrentProfile shutDownType VtblCall LAST_METHOD_ID getAddress shutDownType
public int Create New Profile char profile Name char native Profile Dir char langcode boolean use Existing Dir return XPCOM Vtbl Call super LAST METHOD ID 7 get Address profile Name native Profile Dir langcode use Existing Dir  CreateNewProfile profileName nativeProfileDir useExistingDir VtblCall LAST_METHOD_ID getAddress profileName nativeProfileDir useExistingDir
public int Rename Profile char old Name char new Name return XPCOM Vtbl Call super LAST METHOD ID 8 get Address old Name new Name  RenameProfile oldName newName VtblCall LAST_METHOD_ID getAddress oldName newName
public int Delete Profile char name boolean can Delete Files return XPCOM Vtbl Call super LAST METHOD ID 9 get Address name can Delete Files  DeleteProfile canDeleteFiles VtblCall LAST_METHOD_ID getAddress canDeleteFiles
public int Clone Profile char profile Name return XPCOM Vtbl Call super LAST METHOD ID 10 get Address profile Name  CloneProfile profileName VtblCall LAST_METHOD_ID getAddress profileName

new nsID NS IPROFILECHANGESTATUS IID STRING public nsI Profile Change Status int address super address  NS_IPROFILECHANGESTATUS_IID_STRING nsIProfileChangeStatus
public int Veto Change return XPCOM Vtbl Call super LAST METHOD ID 1 get Address  VetoChange VtblCall LAST_METHOD_ID getAddress
public int Change Failed return XPCOM Vtbl Call super LAST METHOD ID 2 get Address  ChangeFailed VtblCall LAST_METHOD_ID getAddress

new nsID NS IPROMPTSERVICE IID STRING public nsI Prompt Service int address super address  NS_IPROMPTSERVICE_IID_STRING nsIPromptService
public int Alert int parent char dialog Title char text return XPCOM Vtbl Call super LAST METHOD ID 1 get Address parent dialog Title text  dialogTitle VtblCall LAST_METHOD_ID getAddress dialogTitle
public int Alert Check int parent char dialog Title char text char check Msg boolean check Value return XPCOM NS ERROR NOT IMPLEMENTED  AlertCheck dialogTitle checkMsg checkValue NS_ERROR_NOT_IMPLEMENTED
public int Confirm int parent char dialog Title char text boolean  retval return XPCOM NS ERROR NOT IMPLEMENTED  dialogTitle _retval NS_ERROR_NOT_IMPLEMENTED
public int Confirm Check int parent char dialog Title char text char check Msg boolean check Value boolean  retval return XPCOM NS ERROR NOT IMPLEMENTED  ConfirmCheck dialogTitle checkMsg checkValue _retval NS_ERROR_NOT_IMPLEMENTED
public static final int STD OK CANCEL BUTTONS 513 public int Confirm Ex int parent char dialog Title char text int button Flags char button0 Title char button1 Title char button2 Title char check Msg boolean check Value int  retval return XPCOM NS ERROR NOT IMPLEMENTED  STD_OK_CANCEL_BUTTONS ConfirmEx dialogTitle buttonFlags button0Title button1Title button2Title checkMsg checkValue _retval NS_ERROR_NOT_IMPLEMENTED
public int Prompt int parent char dialog Title char text int value char check Msg boolean check Value boolean  retval return XPCOM NS ERROR NOT IMPLEMENTED  dialogTitle checkMsg checkValue _retval NS_ERROR_NOT_IMPLEMENTED
public int Prompt Username And Password int parent char dialog Title char text int username int password char check Msg boolean check Value boolean  retval return XPCOM NS ERROR NOT IMPLEMENTED  PromptUsernameAndPassword dialogTitle checkMsg checkValue _retval NS_ERROR_NOT_IMPLEMENTED
public int Prompt Password int parent char dialog Title char text int password char check Msg boolean check Value boolean  retval return XPCOM NS ERROR NOT IMPLEMENTED  PromptPassword dialogTitle checkMsg checkValue _retval NS_ERROR_NOT_IMPLEMENTED
public int Select int parent char dialog Title char text int count char select List int out Selection boolean  retval return XPCOM NS ERROR NOT IMPLEMENTED  dialogTitle selectList outSelection _retval NS_ERROR_NOT_IMPLEMENTED

new nsID NS IPROPERTIES IID STRING public nsI Properties int address super address  NS_IPROPERTIES_IID_STRING nsIProperties
public int Get byte prop nsID iid int result return XPCOM Vtbl Call super LAST METHOD ID 1 get Address prop iid result  VtblCall LAST_METHOD_ID getAddress
public int Set byte prop int value return XPCOM Vtbl Call super LAST METHOD ID 2 get Address prop value  VtblCall LAST_METHOD_ID getAddress
public int Has byte prop boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 3 get Address prop  retval  _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Undefine byte prop return XPCOM Vtbl Call super LAST METHOD ID 4 get Address prop  VtblCall LAST_METHOD_ID getAddress
public int Get Keys int count int keys return XPCOM Vtbl Call super LAST METHOD ID 5 get Address count keys  GetKeys VtblCall LAST_METHOD_ID getAddress

Contributor s 
IBM 
Binding to permit interfacing between Mozilla and SWT Copyright C 2003 IBM Corp All Rights Reserved 
END LICENSE BLOCK 
package org eclipse swt internal mozilla 
public class nsI Request extends nsI Supports  nsIRequest nsISupports
static final int LAST METHOD ID nsI Supports LAST METHOD ID 10  LAST_METHOD_ID nsISupports LAST_METHOD_ID
public static final String NS IREQUEST IID STRING ef6bfbd2 fd46 48d8 96b7 9f8f0fd387fe  NS_IREQUEST_IID_STRING
public static final nsID NS IREQUEST IID  NS_IREQUEST_IID
new nsID NS IREQUEST IID STRING  NS_IREQUEST_IID_STRING
public nsI Request int address super address  nsIRequest

Contributor s 
IBM 
Binding to permit interfacing between Mozilla and SWT Copyright C 2003 IBM Corp All Rights Reserved 

new nsID NS ISERVICEMANAGER IID STRING public nsI Service Manager int address super address  NS_ISERVICEMANAGER_IID_STRING nsIServiceManager
public int Get Service nsID a Class nsID aIID int result return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Class aIID result  GetService aClass VtblCall LAST_METHOD_ID getAddress aClass
public int Get Service By ContractID byte a ContractID nsID aIID int result return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a ContractID aIID result  GetServiceByContractID aContractID VtblCall LAST_METHOD_ID getAddress aContractID
public int Is Service Instantiated nsID a Class nsID aIID boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a Class aIID  retval  IsServiceInstantiated aClass _retval VtblCall LAST_METHOD_ID getAddress aClass _retval
public int Is Service Instantiated By ContractID byte a ContractID nsID aIID boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a ContractID aIID  retval  IsServiceInstantiatedByContractID aContractID _retval VtblCall LAST_METHOD_ID getAddress aContractID _retval

Contributor s 
IBM 

private int address public nsI Supports int address this address address  nsISupports
public int get Address return this address  getAddress
public int Query Interface nsID uuid int result return XPCOM Vtbl Call 0 get Address uuid result  QueryInterface VtblCall getAddress
public int Add Ref return XPCOM Vtbl Call 1 get Address  AddRef VtblCall getAddress
public int Release return XPCOM Vtbl Call 2 get Address  VtblCall getAddress

new nsID NS ISUPPORTSWEAKREFERENCE IID STRING public nsI Supports Weak Reference int address super address  NS_ISUPPORTSWEAKREFERENCE_IID_STRING nsISupportsWeakReference
public int Get Weak Reference int ret Val return XPCOM Vtbl Call super LAST METHOD ID 1 get Address ret Val  GetWeakReference retVal VtblCall LAST_METHOD_ID getAddress retVal

new nsID NS ITOOLTIPLISTENER IID STRING public nsI Tooltip Listener int address super address  NS_ITOOLTIPLISTENER_IID_STRING nsITooltipListener
public int On Show Tooltip int aX Coords int aY Coords int a Tip Text return XPCOM Vtbl Call super LAST METHOD ID 1 get Address aX Coords aY Coords a Tip Text  OnShowTooltip aXCoords aYCoords aTipText VtblCall LAST_METHOD_ID getAddress aXCoords aYCoords aTipText
public int On Hide Tooltip return XPCOM Vtbl Call super LAST METHOD ID 2 get Address  OnHideTooltip VtblCall LAST_METHOD_ID getAddress

new nsID NS IURI IID STRING public nsIURI int address super address  NS_IURI_IID_STRING
public int Get Spec int a Spec return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Spec  GetSpec aSpec VtblCall LAST_METHOD_ID getAddress aSpec
public int Set Spec int a Spec return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Spec  SetSpec aSpec VtblCall LAST_METHOD_ID getAddress aSpec
public int Get Pre Path int a Pre Path return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a Pre Path  GetPrePath aPrePath VtblCall LAST_METHOD_ID getAddress aPrePath
public int Get Scheme int a Scheme return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a Scheme  GetScheme aScheme VtblCall LAST_METHOD_ID getAddress aScheme
public int Set Scheme int a Scheme return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a Scheme  SetScheme aScheme VtblCall LAST_METHOD_ID getAddress aScheme
public int Get User Pass int user Pass return XPCOM Vtbl Call super LAST METHOD ID 6 get Address user Pass  GetUserPass userPass VtblCall LAST_METHOD_ID getAddress userPass
public int Set User Pass int user Pass return XPCOM Vtbl Call super LAST METHOD ID 7 get Address user Pass  SetUserPass userPass VtblCall LAST_METHOD_ID getAddress userPass
public int Get Username int a Username return XPCOM Vtbl Call super LAST METHOD ID 8 get Address a Username  GetUsername aUsername VtblCall LAST_METHOD_ID getAddress aUsername
public int Set Username int a Username return XPCOM Vtbl Call super LAST METHOD ID 9 get Address a Username  SetUsername aUsername VtblCall LAST_METHOD_ID getAddress aUsername
public int Get Password int a Password return XPCOM Vtbl Call super LAST METHOD ID 10 get Address a Password  GetPassword aPassword VtblCall LAST_METHOD_ID getAddress aPassword
public int Set Password int a Password return XPCOM Vtbl Call super LAST METHOD ID 11 get Address a Password  SetPassword aPassword VtblCall LAST_METHOD_ID getAddress aPassword
public int Get Host Port int a Host Port return XPCOM Vtbl Call super LAST METHOD ID 12 get Address a Host Port  GetHostPort aHostPort VtblCall LAST_METHOD_ID getAddress aHostPort
public int Set Host Port int a Host Port return XPCOM Vtbl Call super LAST METHOD ID 13 get Address a Host Port  SetHostPort aHostPort VtblCall LAST_METHOD_ID getAddress aHostPort
public int Get Host int a Host return XPCOM Vtbl Call super LAST METHOD ID 14 get Address a Host  GetHost aHost VtblCall LAST_METHOD_ID getAddress aHost
public int Set Host int a Host return XPCOM Vtbl Call super LAST METHOD ID 15 get Address a Host  SetHost aHost VtblCall LAST_METHOD_ID getAddress aHost
public int Get Port int a Port return XPCOM Vtbl Call super LAST METHOD ID 16 get Address a Port  GetPort aPort VtblCall LAST_METHOD_ID getAddress aPort
public int Set Port int a Port return XPCOM Vtbl Call super LAST METHOD ID 17 get Address a Port  SetPort aPort VtblCall LAST_METHOD_ID getAddress aPort
public int Get Path int a Path return XPCOM Vtbl Call super LAST METHOD ID 18 get Address a Path  GetPath aPath VtblCall LAST_METHOD_ID getAddress aPath
public int Set Path int a Path return XPCOM Vtbl Call super LAST METHOD ID 19 get Address a Path  SetPath aPath VtblCall LAST_METHOD_ID getAddress aPath
public int Equals int other boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 20 get Address other  retval  _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Scheme Is byte scheme boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 21 get Address scheme  retval  SchemeIs _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Clone int  retval return XPCOM Vtbl Call super LAST METHOD ID 22 get Address  retval  _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Resolve int relative Path int  retval return XPCOM Vtbl Call super LAST METHOD ID 23 get Address relative Path  retval  relativePath _retval VtblCall LAST_METHOD_ID getAddress relativePath _retval
public int Get Ascii Spec int a Ascii Spec return XPCOM Vtbl Call super LAST METHOD ID 24 get Address a Ascii Spec  GetAsciiSpec aAsciiSpec VtblCall LAST_METHOD_ID getAddress aAsciiSpec
public int Get Ascii Host int a Ascii Host return XPCOM Vtbl Call super LAST METHOD ID 25 get Address a Ascii Host  GetAsciiHost aAsciiHost VtblCall LAST_METHOD_ID getAddress aAsciiHost
public int Get Origin Charset int a Origin Charset return XPCOM Vtbl Call super LAST METHOD ID 26 get Address a Origin Charset  GetOriginCharset aOriginCharset VtblCall LAST_METHOD_ID getAddress aOriginCharset

new nsID NS IURICONTENTLISTENER IID STRING public nsIURI Content Listener int address super address  NS_IURICONTENTLISTENER_IID_STRING nsIURIContentListener
public int On StartURI Open int aURI boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 1 get Address aURI  retval  OnStartURIOpen _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Do Content byte a Content Type boolean a Is Content Preferred int a Request int a Content Handler boolean  retval return XPCOM NS ERROR NOT IMPLEMENTED  DoContent aContentType aIsContentPreferred aRequest aContentHandler _retval NS_ERROR_NOT_IMPLEMENTED
public int Is Preferred byte a Content Type int a Desired Content Type boolean  retval return XPCOM NS ERROR NOT IMPLEMENTED  IsPreferred aContentType aDesiredContentType _retval NS_ERROR_NOT_IMPLEMENTED
public int Can Handle Content byte a Content Type boolean a Is Content Preferred int a Desired Content Type boolean  retval return XPCOM NS ERROR NOT IMPLEMENTED  CanHandleContent aContentType aIsContentPreferred aDesiredContentType _retval NS_ERROR_NOT_IMPLEMENTED
public int Get Load Cookie int a Load Cookie return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a Load Cookie  GetLoadCookie aLoadCookie VtblCall LAST_METHOD_ID getAddress aLoadCookie
public int Set Load Cookie int a Load Cookie return XPCOM Vtbl Call super LAST METHOD ID 6 get Address a Load Cookie  SetLoadCookie aLoadCookie VtblCall LAST_METHOD_ID getAddress aLoadCookie
public int Get Parent Content Listener int a Parent Content Listener return XPCOM Vtbl Call super LAST METHOD ID 7 get Address a Parent Content Listener  GetParentContentListener aParentContentListener VtblCall LAST_METHOD_ID getAddress aParentContentListener
public int Set Parent Content Listener int a Parent Content Listener return XPCOM Vtbl Call super LAST METHOD ID 8 get Address a Parent Content Listener  SetParentContentListener aParentContentListener VtblCall LAST_METHOD_ID getAddress aParentContentListener

new nsID NS IWEAKREFERENCE IID STRING public nsI Weak Reference int address super address  NS_IWEAKREFERENCE_IID_STRING nsIWeakReference
public int Query Referent nsID uuid int result return XPCOM Vtbl Call super LAST METHOD ID 1 get Address uuid result  QueryReferent VtblCall LAST_METHOD_ID getAddress

new nsID NS IWEBBROWSER IID STRING public nsI Web Browser int address super address  NS_IWEBBROWSER_IID_STRING nsIWebBrowser
public int Add Web Browser Listener int a Listener nsID aIID return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Listener aIID  AddWebBrowserListener aListener VtblCall LAST_METHOD_ID getAddress aListener
public int Remove Web Browser Listener int a Listener nsID aIID return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Listener aIID  RemoveWebBrowserListener aListener VtblCall LAST_METHOD_ID getAddress aListener
public int Get Container Window int a Container Window return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a Container Window  GetContainerWindow aContainerWindow VtblCall LAST_METHOD_ID getAddress aContainerWindow
public int Set Container Window int a Container Window return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a Container Window  SetContainerWindow aContainerWindow VtblCall LAST_METHOD_ID getAddress aContainerWindow
public int Get ParentURI Content Listener int a ParentURI Content Listener return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a ParentURI Content Listener  GetParentURIContentListener aParentURIContentListener VtblCall LAST_METHOD_ID getAddress aParentURIContentListener
public int Set ParentURI Content Listener int a ParentURI Content Listener return XPCOM Vtbl Call super LAST METHOD ID 6 get Address a ParentURI Content Listener  SetParentURIContentListener aParentURIContentListener VtblCall LAST_METHOD_ID getAddress aParentURIContentListener
public int Get ContentDOM Window int a ContentDOM Window return XPCOM Vtbl Call super LAST METHOD ID 7 get Address a ContentDOM Window  GetContentDOMWindow aContentDOMWindow VtblCall LAST_METHOD_ID getAddress aContentDOMWindow

new nsID NS IWEBBROWSERCHROME IID STRING public nsI Web Browser Chrome int address super address  NS_IWEBBROWSERCHROME_IID_STRING nsIWebBrowserChrome
public static final int STATUS LINK 3 public int Set Status int status Type char status return XPCOM Vtbl Call super LAST METHOD ID 1 get Address status Type status  STATUS_LINK SetStatus statusType VtblCall LAST_METHOD_ID getAddress statusType
public int Get Web Browser int a Web Browser return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Web Browser  GetWebBrowser aWebBrowser VtblCall LAST_METHOD_ID getAddress aWebBrowser
public int Set Web Browser int a Web Browser return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a Web Browser  SetWebBrowser aWebBrowser VtblCall LAST_METHOD_ID getAddress aWebBrowser
public static final int CHROME ALL 4094 public int Get Chrome Flags int chrome Flags return XPCOM Vtbl Call super LAST METHOD ID 4 get Address chrome Flags  CHROME_ALL GetChromeFlags chromeFlags VtblCall LAST_METHOD_ID getAddress chromeFlags
public int Set Chrome Flags int chrome Flags return XPCOM Vtbl Call super LAST METHOD ID 5 get Address chrome Flags  SetChromeFlags chromeFlags VtblCall LAST_METHOD_ID getAddress chromeFlags
public int Destroy Browser Window return XPCOM Vtbl Call super LAST METHOD ID 6 get Address  DestroyBrowserWindow VtblCall LAST_METHOD_ID getAddress
public int Size Browser To int aCX int aCY return XPCOM Vtbl Call super LAST METHOD ID 7 get Address aCX aCY  SizeBrowserTo VtblCall LAST_METHOD_ID getAddress
public int Show As Modal return XPCOM Vtbl Call super LAST METHOD ID 8 get Address  ShowAsModal VtblCall LAST_METHOD_ID getAddress
public int Is Window Modal boolean  retval return XPCOM Vtbl Call super LAST METHOD ID 9 get Address  retval  IsWindowModal _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Exit Modal Event Loop int a Status return XPCOM Vtbl Call super LAST METHOD ID 10 get Address a Status  ExitModalEventLoop aStatus VtblCall LAST_METHOD_ID getAddress aStatus

new nsID NS IWEBBROWSERCHROMEFOCUS IID STRING public nsI Web Browser Chrome Focus int address super address  NS_IWEBBROWSERCHROMEFOCUS_IID_STRING nsIWebBrowserChromeFocus
public int Focus Next Element return XPCOM Vtbl Call super LAST METHOD ID 1 get Address  FocusNextElement VtblCall LAST_METHOD_ID getAddress
public int Focus Prev Element return XPCOM Vtbl Call super LAST METHOD ID 2 get Address  FocusPrevElement VtblCall LAST_METHOD_ID getAddress

new nsID NS IWEBBROWSERFOCUS IID STRING public nsI Web Browser Focus int address super address  NS_IWEBBROWSERFOCUS_IID_STRING nsIWebBrowserFocus
public int Activate return XPCOM Vtbl Call super LAST METHOD ID 1 get Address  VtblCall LAST_METHOD_ID getAddress
public int Deactivate return XPCOM Vtbl Call super LAST METHOD ID 2 get Address  VtblCall LAST_METHOD_ID getAddress
public int Set Focus At First Element return XPCOM Vtbl Call super LAST METHOD ID 3 get Address  SetFocusAtFirstElement VtblCall LAST_METHOD_ID getAddress
public int Set Focus At Last Element return XPCOM Vtbl Call super LAST METHOD ID 4 get Address  SetFocusAtLastElement VtblCall LAST_METHOD_ID getAddress
public int Get Focused Window int a Focused Window return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a Focused Window  GetFocusedWindow aFocusedWindow VtblCall LAST_METHOD_ID getAddress aFocusedWindow
public int Set Focused Window int a Focused Window return XPCOM Vtbl Call super LAST METHOD ID 6 get Address a Focused Window  SetFocusedWindow aFocusedWindow VtblCall LAST_METHOD_ID getAddress aFocusedWindow
public int Get Focused Element int a Focused Element return XPCOM Vtbl Call super LAST METHOD ID 7 get Address a Focused Element  GetFocusedElement aFocusedElement VtblCall LAST_METHOD_ID getAddress aFocusedElement
public int Set Focused Element int a Focused Element return XPCOM Vtbl Call super LAST METHOD ID 8 get Address a Focused Element  SetFocusedElement aFocusedElement VtblCall LAST_METHOD_ID getAddress aFocusedElement

new nsID NS IWEBNAVIGATION IID STRING public nsI Web Navigation int address super address  NS_IWEBNAVIGATION_IID_STRING nsIWebNavigation
public int Get Can Go Back boolean a Can Go Back return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Can Go Back  GetCanGoBack aCanGoBack VtblCall LAST_METHOD_ID getAddress aCanGoBack
public int Get Can Go Forward boolean a Can Go Forward return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Can Go Forward  GetCanGoForward aCanGoForward VtblCall LAST_METHOD_ID getAddress aCanGoForward
public int Go Back return XPCOM Vtbl Call super LAST METHOD ID 3 get Address  GoBack VtblCall LAST_METHOD_ID getAddress
public int Go Forward return XPCOM Vtbl Call super LAST METHOD ID 4 get Address  GoForward VtblCall LAST_METHOD_ID getAddress
public int Goto Index int index return XPCOM Vtbl Call super LAST METHOD ID 5 get Address index  GotoIndex VtblCall LAST_METHOD_ID getAddress
public static final int LOAD FLAGS CHARSET CHANGE 1024 public int LoadURI char uri int load Flags int referrer int post Data int headers return XPCOM Vtbl Call super LAST METHOD ID 6 get Address uri load Flags referrer post Data headers  LOAD_FLAGS_CHARSET_CHANGE loadFlags postData VtblCall LAST_METHOD_ID getAddress loadFlags postData
public int Reload int reload Flags return XPCOM Vtbl Call super LAST METHOD ID 7 get Address reload Flags  reloadFlags VtblCall LAST_METHOD_ID getAddress reloadFlags
public static final int STOP ALL 3 public int Stop int stop Flags return XPCOM Vtbl Call super LAST METHOD ID 8 get Address stop Flags  STOP_ALL stopFlags VtblCall LAST_METHOD_ID getAddress stopFlags
public int Get Document int a Document return XPCOM Vtbl Call super LAST METHOD ID 9 get Address a Document  GetDocument aDocument VtblCall LAST_METHOD_ID getAddress aDocument
public int Get CurrentURI int a CurrentURI return XPCOM Vtbl Call super LAST METHOD ID 10 get Address a CurrentURI  GetCurrentURI aCurrentURI VtblCall LAST_METHOD_ID getAddress aCurrentURI
public int Get ReferringURI int a ReferringURI return XPCOM Vtbl Call super LAST METHOD ID 11 get Address a ReferringURI  GetReferringURI aReferringURI VtblCall LAST_METHOD_ID getAddress aReferringURI
public int Get Session History int a Session History return XPCOM Vtbl Call super LAST METHOD ID 12 get Address a Session History  GetSessionHistory aSessionHistory VtblCall LAST_METHOD_ID getAddress aSessionHistory
public int Set Session History int a Session History return XPCOM Vtbl Call super LAST METHOD ID 13 get Address a Session History  SetSessionHistory aSessionHistory VtblCall LAST_METHOD_ID getAddress aSessionHistory

new nsID NS IWEBPROGRESS IID STRING public nsI Web Progress int address super address  NS_IWEBPROGRESS_IID_STRING nsIWebProgress
public static final int NOTIFY ALL 255 public int Add Progress Listener int listener int a Notify Mask return XPCOM Vtbl Call super LAST METHOD ID 1 get Address listener a Notify Mask  NOTIFY_ALL AddProgressListener aNotifyMask VtblCall LAST_METHOD_ID getAddress aNotifyMask
public int Remove Progress Listener int listener return XPCOM Vtbl Call super LAST METHOD ID 2 get Address listener  RemoveProgressListener VtblCall LAST_METHOD_ID getAddress
public int GetDOM Window int aDOM Window return XPCOM Vtbl Call super LAST METHOD ID 3 get Address aDOM Window  GetDOMWindow aDOMWindow VtblCall LAST_METHOD_ID getAddress aDOMWindow
public int Get Is Loading Document boolean a Is Loading Document return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a Is Loading Document  GetIsLoadingDocument aIsLoadingDocument VtblCall LAST_METHOD_ID getAddress aIsLoadingDocument

new nsID NS IWEBPROGRESSLISTENER IID STRING public nsI Web Progress Listener int address super address  NS_IWEBPROGRESSLISTENER_IID_STRING nsIWebProgressListener
public static final int STATE SECURE LOW 131072 public int On State Change int a Web Progress int a Request int a State Flags int a Status return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Web Progress a Request a State Flags a Status  STATE_SECURE_LOW OnStateChange aWebProgress aRequest aStateFlags aStatus VtblCall LAST_METHOD_ID getAddress aWebProgress aRequest aStateFlags aStatus
public int On Progress Change int a Web Progress int a Request int a Cur Self Progress int a Max Self Progress int a Cur Total Progress int a Max Total Progress return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Web Progress a Request a Cur Self Progress a Max Self Progress a Cur Total Progress a Max Total Progress  OnProgressChange aWebProgress aRequest aCurSelfProgress aMaxSelfProgress aCurTotalProgress aMaxTotalProgress VtblCall LAST_METHOD_ID getAddress aWebProgress aRequest aCurSelfProgress aMaxSelfProgress aCurTotalProgress aMaxTotalProgress
public int On Location Change int a Web Progress int a Request int location return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a Web Progress a Request location  OnLocationChange aWebProgress aRequest VtblCall LAST_METHOD_ID getAddress aWebProgress aRequest
public int On Status Change int a Web Progress int a Request int a Status char a Message return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a Web Progress a Request a Status a Message  OnStatusChange aWebProgress aRequest aStatus aMessage VtblCall LAST_METHOD_ID getAddress aWebProgress aRequest aStatus aMessage
public int On Security Change int a Web Progress int a Request int state return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a Web Progress a Request state  OnSecurityChange aWebProgress aRequest VtblCall LAST_METHOD_ID getAddress aWebProgress aRequest

static final int LAST METHOD ID nsI Supports LAST METHOD ID 83 public nsI Widget int address super address  LAST_METHOD_ID nsISupports LAST_METHOD_ID nsIWidget
public int Create nsI Widget a Parent int a Rect int a Handle Event Function int a Context int a App Shell int a Toolkit int a Init Data int a Parent Address a Parent null a Parent get Address 0 return XPCOM Vtbl Call super LAST METHOD ID 1 get Address a Parent Address a Rect a Handle Event Function a Context a App Shell a Toolkit a Init Data  nsIWidget aParent aRect aHandleEventFunction aContext aAppShell aToolkit aInitData aParentAddress aParent aParent getAddress VtblCall LAST_METHOD_ID getAddress aParentAddress aRect aHandleEventFunction aContext aAppShell aToolkit aInitData
public int Create int a Parent int a Rect int a Handle Event Function int a Context int a App Shell int a Toolkit int a Init Data return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Parent a Rect a Handle Event Function a Context a App Shell a Toolkit a Init Data  aParent aRect aHandleEventFunction aContext aAppShell aToolkit aInitData VtblCall LAST_METHOD_ID getAddress aParent aRect aHandleEventFunction aContext aAppShell aToolkit aInitData
public int Get Client Data int a Client Data return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a Client Data  GetClientData aClientData VtblCall LAST_METHOD_ID getAddress aClientData
public int Set Client Data int a Client Data return XPCOM Vtbl Call super LAST METHOD ID 4 get Address a Client Data  SetClientData aClientData VtblCall LAST_METHOD_ID getAddress aClientData
public int Destroy return XPCOM Vtbl Call super LAST METHOD ID 5 get Address  VtblCall LAST_METHOD_ID getAddress
public int Set Parent int a New Parent return XPCOM Vtbl Call super LAST METHOD ID 6 get Address a New Parent  SetParent aNewParent VtblCall LAST_METHOD_ID getAddress aNewParent
public int Get Parent return XPCOM Vtbl Call super LAST METHOD ID 7 get Address  GetParent VtblCall LAST_METHOD_ID getAddress
public int Get Children return XPCOM Vtbl Call super LAST METHOD ID 8 get Address  GetChildren VtblCall LAST_METHOD_ID getAddress
public int Show boolean a State return XPCOM Vtbl Call super LAST METHOD ID 9 get Address a State  aState VtblCall LAST_METHOD_ID getAddress aState
public int Set Modal boolean a Modal return XPCOM Vtbl Call super LAST METHOD ID 10 get Address a Modal  SetModal aModal VtblCall LAST_METHOD_ID getAddress aModal
public int Is Visible boolean a State return XPCOM Vtbl Call super LAST METHOD ID 11 get Address a State  IsVisible aState VtblCall LAST_METHOD_ID getAddress aState
public int Constrain Position boolean a Allow Slop int aX int aY return XPCOM Vtbl Call super LAST METHOD ID 12 get Address a Allow Slop aX aY  ConstrainPosition aAllowSlop VtblCall LAST_METHOD_ID getAddress aAllowSlop
public int Move int aX int aY return XPCOM Vtbl Call super LAST METHOD ID 13 get Address aX aY  VtblCall LAST_METHOD_ID getAddress
public int Resize int a Width int a Height boolean a Repaint return XPCOM Vtbl Call super LAST METHOD ID 14 get Address a Width a Height a Repaint  aWidth aHeight aRepaint VtblCall LAST_METHOD_ID getAddress aWidth aHeight aRepaint
public int Resize int aX int aY int a Width int a Height boolean a Repaint return XPCOM Vtbl Call super LAST METHOD ID 15 get Address aX aY a Width a Height a Repaint  aWidth aHeight aRepaint VtblCall LAST_METHOD_ID getAddress aWidth aHeight aRepaint
public int SetZ Index int aZ Index return XPCOM Vtbl Call super LAST METHOD ID 16 get Address aZ Index  SetZIndex aZIndex VtblCall LAST_METHOD_ID getAddress aZIndex
public int GetZ Index int a Zindex return XPCOM Vtbl Call super LAST METHOD ID 17 get Address a Zindex  GetZIndex aZindex VtblCall LAST_METHOD_ID getAddress aZindex
public int Place Behind int a Widget boolean a Activate return XPCOM Vtbl Call super LAST METHOD ID 18 get Address a Widget a Activate  PlaceBehind aWidget aActivate VtblCall LAST_METHOD_ID getAddress aWidget aActivate
public int Set Size Mode int a Mode return XPCOM Vtbl Call super LAST METHOD ID 19 get Address a Mode  SetSizeMode aMode VtblCall LAST_METHOD_ID getAddress aMode
public int Get Size Mode int a Mode return XPCOM Vtbl Call super LAST METHOD ID 20 get Address a Mode  GetSizeMode aMode VtblCall LAST_METHOD_ID getAddress aMode
public int Enable boolean a State return XPCOM Vtbl Call super LAST METHOD ID 21 get Address a State  aState VtblCall LAST_METHOD_ID getAddress aState
public int Is Enabled boolean a State return XPCOM Vtbl Call super LAST METHOD ID 22 get Address a State  IsEnabled aState VtblCall LAST_METHOD_ID getAddress aState
public int Set Focus boolean a Raise return XPCOM Vtbl Call super LAST METHOD ID 23 get Address a Raise  SetFocus aRaise VtblCall LAST_METHOD_ID getAddress aRaise
public int Get Bounds int a Rect return XPCOM Vtbl Call super LAST METHOD ID 24 get Address a Rect  GetBounds aRect VtblCall LAST_METHOD_ID getAddress aRect
public int Get Screen Bounds int a Rect return XPCOM Vtbl Call super LAST METHOD ID 25 get Address a Rect  GetScreenBounds aRect VtblCall LAST_METHOD_ID getAddress aRect
public int Get Client Bounds int a Rect return XPCOM Vtbl Call super LAST METHOD ID 26 get Address a Rect  GetClientBounds aRect VtblCall LAST_METHOD_ID getAddress aRect
public int Get Border Size int a Width int a Height return XPCOM Vtbl Call super LAST METHOD ID 27 get Address a Width a Height  GetBorderSize aWidth aHeight VtblCall LAST_METHOD_ID getAddress aWidth aHeight
public int Get Foreground Color return XPCOM Vtbl Call super LAST METHOD ID 28 get Address  GetForegroundColor VtblCall LAST_METHOD_ID getAddress
public int Set Foreground Color int a Color return XPCOM Vtbl Call super LAST METHOD ID 29 get Address a Color  SetForegroundColor aColor VtblCall LAST_METHOD_ID getAddress aColor
public int Get Background Color return XPCOM Vtbl Call super LAST METHOD ID 30 get Address  GetBackgroundColor VtblCall LAST_METHOD_ID getAddress
public int Set Background Color int a Color return XPCOM Vtbl Call super LAST METHOD ID 31 get Address a Color  SetBackgroundColor aColor VtblCall LAST_METHOD_ID getAddress aColor
public int Get Font return XPCOM Vtbl Call super LAST METHOD ID 32 get Address  GetFont VtblCall LAST_METHOD_ID getAddress
public int Set Font int a Font return XPCOM Vtbl Call super LAST METHOD ID 33 get Address a Font  SetFont aFont VtblCall LAST_METHOD_ID getAddress aFont
public int Get Cursor return XPCOM Vtbl Call super LAST METHOD ID 34 get Address  GetCursor VtblCall LAST_METHOD_ID getAddress
public int Set Cursor int a Cursor return XPCOM Vtbl Call super LAST METHOD ID 35 get Address a Cursor  SetCursor aCursor VtblCall LAST_METHOD_ID getAddress aCursor
public int Get Window Type int a Window Type return XPCOM Vtbl Call super LAST METHOD ID 36 get Address a Window Type  GetWindowType aWindowType VtblCall LAST_METHOD_ID getAddress aWindowType
public int Set Window Translucency boolean a Translucent return XPCOM Vtbl Call super LAST METHOD ID 37 get Address a Translucent  SetWindowTranslucency aTranslucent VtblCall LAST_METHOD_ID getAddress aTranslucent
public int Get Window Translucency boolean a Translucent return XPCOM Vtbl Call super LAST METHOD ID 38 get Address a Translucent  GetWindowTranslucency aTranslucent VtblCall LAST_METHOD_ID getAddress aTranslucent
public int Update Translucent Window Alpha int a Rect int a Alphas return XPCOM Vtbl Call super LAST METHOD ID 39 get Address a Rect a Alphas  UpdateTranslucentWindowAlpha aRect aAlphas VtblCall LAST_METHOD_ID getAddress aRect aAlphas
public int Hide Window Chrome boolean a Should Hide return XPCOM Vtbl Call super LAST METHOD ID 40 get Address a Should Hide  HideWindowChrome aShouldHide VtblCall LAST_METHOD_ID getAddress aShouldHide
public int Make Full Screen boolean a Full Screen return XPCOM Vtbl Call super LAST METHOD ID 41 get Address a Full Screen  MakeFullScreen aFullScreen VtblCall LAST_METHOD_ID getAddress aFullScreen
public int Validate return XPCOM Vtbl Call super LAST METHOD ID 42 get Address  VtblCall LAST_METHOD_ID getAddress
public int Invalidate boolean a Is Synchronous return XPCOM Vtbl Call super LAST METHOD ID 43 get Address a Is Synchronous  aIsSynchronous VtblCall LAST_METHOD_ID getAddress aIsSynchronous
public int Invalidate int a Rect boolean a Is Synchronous return XPCOM Vtbl Call super LAST METHOD ID 44 get Address a Rect a Is Synchronous  aRect aIsSynchronous VtblCall LAST_METHOD_ID getAddress aRect aIsSynchronous
public int Invalidate Region int a Region boolean a Is Synchronous return XPCOM Vtbl Call super LAST METHOD ID 45 get Address  InvalidateRegion aRegion aIsSynchronous VtblCall LAST_METHOD_ID getAddress
public int Update return XPCOM Vtbl Call super LAST METHOD ID 46 get Address  VtblCall LAST_METHOD_ID getAddress
public int Add Mouse Listener int a Listener return XPCOM Vtbl Call super LAST METHOD ID 47 get Address a Listener  AddMouseListener aListener VtblCall LAST_METHOD_ID getAddress aListener
public int Add Event Listener int a Listener return XPCOM Vtbl Call super LAST METHOD ID 48 get Address a Listener  AddEventListener aListener VtblCall LAST_METHOD_ID getAddress aListener
public int Add Menu Listener int a Listener return XPCOM Vtbl Call super LAST METHOD ID 49 get Address a Listener  AddMenuListener aListener VtblCall LAST_METHOD_ID getAddress aListener
public int Get Toolkit return XPCOM Vtbl Call super LAST METHOD ID 50 get Address  GetToolkit VtblCall LAST_METHOD_ID getAddress
public int Set Color Map int a Color Map return XPCOM Vtbl Call super LAST METHOD ID 51 get Address a Color Map  SetColorMap aColorMap VtblCall LAST_METHOD_ID getAddress aColorMap
public int Scroll int a Dx int a Dy int a Clip Rect return XPCOM Vtbl Call super LAST METHOD ID 52 get Address a Dx a Dy a Clip Rect  aDx aDy aClipRect VtblCall LAST_METHOD_ID getAddress aDx aDy aClipRect
public int Scroll Widgets int a Dx int a Dy return XPCOM Vtbl Call super LAST METHOD ID 53 get Address a Dx a Dy  ScrollWidgets aDx aDy VtblCall LAST_METHOD_ID getAddress aDx aDy
public int Scroll Rect int a Scr Rect int a Dx int a Dy return XPCOM Vtbl Call super LAST METHOD ID 54 get Address a Scr Rect a Dx a Dy  ScrollRect aScrRect aDx aDy VtblCall LAST_METHOD_ID getAddress aScrRect aDx aDy
public void Add Child int a Child XPCOM Vtbl Call No Ret super LAST METHOD ID 55 get Address a Child  AddChild aChild VtblCallNoRet LAST_METHOD_ID getAddress aChild
public void Remove Child int a Child XPCOM Vtbl Call No Ret super LAST METHOD ID 56 get Address a Child  RemoveChild aChild VtblCallNoRet LAST_METHOD_ID getAddress aChild
public int Get Native Data int a Data Type return XPCOM Vtbl Call super LAST METHOD ID 57 get Address a Data Type  GetNativeData aDataType VtblCall LAST_METHOD_ID getAddress aDataType
public void Free Native Data int data int a Data Type XPCOM Vtbl Call No Ret super LAST METHOD ID 58 get Address data a Data Type  FreeNativeData aDataType VtblCallNoRet LAST_METHOD_ID getAddress aDataType
public int Get Rendering Context return XPCOM Vtbl Call super LAST METHOD ID 59 get Address  GetRenderingContext VtblCall LAST_METHOD_ID getAddress
public int Get Device Context return XPCOM Vtbl Call super LAST METHOD ID 60 get Address  GetDeviceContext VtblCall LAST_METHOD_ID getAddress
public int Get App Shell return XPCOM Vtbl Call super LAST METHOD ID 61 get Address  GetAppShell VtblCall LAST_METHOD_ID getAddress
public int Set Border Style int a Border Style return XPCOM Vtbl Call super LAST METHOD ID 62 get Address a Border Style  SetBorderStyle aBorderStyle VtblCall LAST_METHOD_ID getAddress aBorderStyle
public int Set Title int a Title return XPCOM Vtbl Call super LAST METHOD ID 63 get Address a Title  SetTitle aTitle VtblCall LAST_METHOD_ID getAddress aTitle
public int Set Icon int an Icon Spec return XPCOM Vtbl Call super LAST METHOD ID 64 get Address an Icon Spec  SetIcon anIconSpec VtblCall LAST_METHOD_ID getAddress anIconSpec
public int Set Menu Bar int a Menu Bar return XPCOM Vtbl Call super LAST METHOD ID 65 get Address a Menu Bar  SetMenuBar aMenuBar VtblCall LAST_METHOD_ID getAddress aMenuBar
public int Show Menu Bar boolean a Show return XPCOM Vtbl Call super LAST METHOD ID 66 get Address a Show  ShowMenuBar aShow VtblCall LAST_METHOD_ID getAddress aShow
public int Widget To Screen int a Old Rect int a New Rect return XPCOM Vtbl Call super LAST METHOD ID 67 get Address a Old Rect a New Rect  WidgetToScreen aOldRect aNewRect VtblCall LAST_METHOD_ID getAddress aOldRect aNewRect
public int Screen To Widget int a Old Rect int a New Rect return XPCOM Vtbl Call super LAST METHOD ID 68 get Address a Old Rect a New Rect  ScreenToWidget aOldRect aNewRect VtblCall LAST_METHOD_ID getAddress aOldRect aNewRect
public int Begin Resizing Children return XPCOM Vtbl Call super LAST METHOD ID 69 get Address  BeginResizingChildren VtblCall LAST_METHOD_ID getAddress
public int End Resizing Chidren return XPCOM Vtbl Call super LAST METHOD ID 70 get Address  EndResizingChidren VtblCall LAST_METHOD_ID getAddress
public int Get Preferred Size int a Width int a Height return XPCOM Vtbl Call super LAST METHOD ID 71 get Address a Width a Height  GetPreferredSize aWidth aHeight VtblCall LAST_METHOD_ID getAddress aWidth aHeight
public int Set Preferred Size int a Width int a Height return XPCOM Vtbl Call super LAST METHOD ID 72 get Address a Width a Height  SetPreferredSize aWidth aHeight VtblCall LAST_METHOD_ID getAddress aWidth aHeight
public int Dispatch Event int event int a Status return XPCOM Vtbl Call super LAST METHOD ID 73 get Address event a Status  DispatchEvent aStatus VtblCall LAST_METHOD_ID getAddress aStatus
public int Paint int a Rendering Context int a Dirty Rect return XPCOM Vtbl Call super LAST METHOD ID 74 get Address a Rendering Context a Dirty Rect  aRenderingContext aDirtyRect VtblCall LAST_METHOD_ID getAddress aRenderingContext aDirtyRect
public int Enable Drag Drop boolean a Enable return XPCOM Vtbl Call super LAST METHOD ID 75 get Address a Enable  EnableDragDrop aEnable VtblCall LAST_METHOD_ID getAddress aEnable
public void Convert To Device Coordinates int aX int aY XPCOM Vtbl Call No Ret super LAST METHOD ID 76 get Address aX aY  ConvertToDeviceCoordinates VtblCallNoRet LAST_METHOD_ID getAddress
public int Capture Mouse boolean a Capture return XPCOM Vtbl Call super LAST METHOD ID 77 get Address a Capture  CaptureMouse aCapture VtblCall LAST_METHOD_ID getAddress aCapture
public int Get Window Class char a Class return XPCOM Vtbl Call super LAST METHOD ID 78 get Address a Class  GetWindowClass aClass VtblCall LAST_METHOD_ID getAddress aClass
public int Set Window Class char a Class return XPCOM Vtbl Call super LAST METHOD ID 79 get Address a Class  SetWindowClass aClass VtblCall LAST_METHOD_ID getAddress aClass
public int Capture Rollup Events int a Listener boolean a Do Capture boolean a Consume Rollup Event return XPCOM Vtbl Call super LAST METHOD ID 80 get Address a Listener a Do Capture a Consume Rollup Event  CaptureRollupEvents aListener aDoCapture aConsumeRollupEvent VtblCall LAST_METHOD_ID getAddress aListener aDoCapture aConsumeRollupEvent
public int Modal Event Filter boolean a Real Event int a Event boolean a For Window return XPCOM Vtbl Call super LAST METHOD ID 81 get Address a Real Event a Event a For Window  ModalEventFilter aRealEvent aEvent aForWindow VtblCall LAST_METHOD_ID getAddress aRealEvent aEvent aForWindow
public int Get Attention return XPCOM Vtbl Call super LAST METHOD ID 82 get Address  GetAttention VtblCall LAST_METHOD_ID getAddress
public int Get Last Input Event Time int a Time return XPCOM Vtbl Call super LAST METHOD ID 83 get Address a Time  GetLastInputEventTime aTime VtblCall LAST_METHOD_ID getAddress aTime

new nsID NS IWINDOWCREATOR IID STRING public nsI Window Creator int address super address  NS_IWINDOWCREATOR_IID_STRING nsIWindowCreator
public int Create Chrome Window int parent int chrome Flags int  retval return XPCOM Vtbl Call super LAST METHOD ID 1 get Address parent chrome Flags  retval  CreateChromeWindow chromeFlags _retval VtblCall LAST_METHOD_ID getAddress chromeFlags _retval

new nsID NS IWINDOWWATCHER IID STRING public nsI Window Watcher int address super address  NS_IWINDOWWATCHER_IID_STRING nsIWindowWatcher
public int Open Window int a Parent byte a Url byte a Name byte a Features int a Arguments int  retval return XPCOM NS ERROR NOT IMPLEMENTED  OpenWindow aParent aUrl aName aFeatures aArguments _retval NS_ERROR_NOT_IMPLEMENTED
public int Register Notification int a Observer return XPCOM Vtbl Call super LAST METHOD ID 2 get Address a Observer  RegisterNotification aObserver VtblCall LAST_METHOD_ID getAddress aObserver
public int Unregister Notification int a Observer return XPCOM Vtbl Call super LAST METHOD ID 3 get Address a Observer  UnregisterNotification aObserver VtblCall LAST_METHOD_ID getAddress aObserver
public int Get Window Enumerator int  retval return XPCOM Vtbl Call super LAST METHOD ID 4 get Address  retval  GetWindowEnumerator _retval VtblCall LAST_METHOD_ID getAddress _retval
public int Get New Prompter int a Parent int  retval return XPCOM Vtbl Call super LAST METHOD ID 5 get Address a Parent  retval  GetNewPrompter aParent _retval VtblCall LAST_METHOD_ID getAddress aParent _retval
public int Get New Auth Prompter int a Parent int  retval return XPCOM Vtbl Call super LAST METHOD ID 6 get Address a Parent  retval  GetNewAuthPrompter aParent _retval VtblCall LAST_METHOD_ID getAddress aParent _retval
public int Set Window Creator int creator return XPCOM Vtbl Call super LAST METHOD ID 7 get Address creator  SetWindowCreator VtblCall LAST_METHOD_ID getAddress
public int Get Chrome For Window int a Window int  retval return XPCOM Vtbl Call super LAST METHOD ID 8 get Address a Window  retval  GetChromeForWindow aWindow _retval VtblCall LAST_METHOD_ID getAddress aWindow _retval
public int Get Window By Name char a Target Name int a Current Window int  retval return XPCOM Vtbl Call super LAST METHOD ID 9 get Address a Target Name a Current Window  retval  GetWindowByName aTargetName aCurrentWindow _retval VtblCall LAST_METHOD_ID getAddress aTargetName aCurrentWindow _retval
public int Get Active Window int a Active Window return XPCOM Vtbl Call super LAST METHOD ID 10 get Address a Active Window  GetActiveWindow aActiveWindow VtblCall LAST_METHOD_ID getAddress aActiveWindow
public int Set Active Window int a Active Window return XPCOM Vtbl Call super LAST METHOD ID 11 get Address a Active Window  SetActiveWindow aActiveWindow VtblCall LAST_METHOD_ID getAddress aActiveWindow

private int handle public ns String handle XPCOM nsString new  nsString nsString_new
public ns String String string if string null char a String new char string length 1 string get Chars 0 string length a String 0 handle XPCOM nsString new a String  nsString aString getChars aString nsString_new aString
public int get Address return handle  getAddress
public String to String if handle 0 return null int length XPCOM nsString Length handle int buffer XPCOM nsString get handle char dest new char length XPCOM memmove dest buffer length 2 return new String dest  toString nsString_Length nsString_get
public void dispose if handle 0 return XPCOM nsString delete handle handle 0  nsString_delete

public static final int NS ERROR HTMLPARSER UNRESOLVEDDTD 0x804e03f3 public static final native void memmove nsID dest int src int nbytes  NS_ERROR_HTMLPARSER_UNRESOLVEDDTD
public static final native void memmove nsID dest int src int nbytes public static final native void memmove int dest nsID src int nbytes 
public static final native void memmove nsID dest int src int nbytes public static final native void memmove int dest nsID src int nbytes public static final native void memmove int dest int src int nbytes 
public static final native void memmove int dest nsID src int nbytes public static final native void memmove int dest int src int nbytes public static final native void memmove int dest int src int nbytes 
public static final native void memmove int dest int src int nbytes public static final native void memmove int dest int src int nbytes public static final native void memmove byte dest int src int nbytes 
public static final native void memmove int dest int src int nbytes public static final native void memmove byte dest int src int nbytes public static final native void memmove char dest int src int nbytes 
public static final native void memmove byte dest int src int nbytes public static final native void memmove char dest int src int nbytes public static final native void memmove int dest byte src int nbytes 
public static final native void memmove char dest int src int nbytes public static final native void memmove int dest byte src int nbytes public static final native void memmove int dest char src int nbytes 
public static final native void memmove int dest byte src int nbytes public static final native void memmove int dest char src int nbytes public static final native void memmove byte dest char src int nbytes 
public static final native void memmove int dest char src int nbytes public static final native void memmove byte dest char src int nbytes public static final native int NS GetComponentManager int result  NS_GetComponentManager
public static final native void memmove byte dest char src int nbytes public static final native int NS GetComponentManager int result public static final native int NS GetServiceManager int result  NS_GetComponentManager NS_GetServiceManager
public static final native int NS GetComponentManager int result public static final native int NS GetServiceManager int result public static final native int NS InitEmbedding int a Moz Bin Directory int a App File Loc Provider  NS_GetComponentManager NS_GetServiceManager NS_InitEmbedding aMozBinDirectory aAppFileLocProvider
public static final native int NS GetServiceManager int result public static final native int NS InitEmbedding int a Moz Bin Directory int a App File Loc Provider public static final native int NS NewLocalFile int path boolean follow Links int result  NS_GetServiceManager NS_InitEmbedding aMozBinDirectory aAppFileLocProvider NS_NewLocalFile followLinks
public static final native int NS InitEmbedding int a Moz Bin Directory int a App File Loc Provider public static final native int NS NewLocalFile int path boolean follow Links int result public static final native int NS NewSingletonEnumerator int local File int enum public static final native int NS TermEmbedding  NS_InitEmbedding aMozBinDirectory aAppFileLocProvider NS_NewLocalFile followLinks NS_NewSingletonEnumerator localFile NS_TermEmbedding
public static final native int NS NewLocalFile int path boolean follow Links int result public static final native int NS NewSingletonEnumerator int local File int enum public static final native int NS TermEmbedding  NS_NewLocalFile followLinks NS_NewSingletonEnumerator localFile NS_TermEmbedding
public static final native int NS NewSingletonEnumerator int local File int enum public static final native int NS TermEmbedding public static final native int nsCRT strlen PRUnichar int s  NS_NewSingletonEnumerator localFile NS_TermEmbedding nsCRT_strlen_PRUnichar
public static final native int NS TermEmbedding public static final native int nsCRT strlen PRUnichar int s public static final native int nsCString new  NS_TermEmbedding nsCRT_strlen_PRUnichar nsCString_new
public static final native int nsCRT strlen PRUnichar int s public static final native int nsCString new public static final native int nsCString new byte a String int length  nsCRT_strlen_PRUnichar nsCString_new nsCString_new aString
public static final native int nsCString new public static final native int nsCString new byte a String int length public static final native void nsCString delete int ptr  nsCString_new nsCString_new aString nsCString_delete
public static final native int nsCString new byte a String int length public static final native void nsCString delete int ptr public static final native int nsCString Length int ptr  nsCString_new aString nsCString_delete nsCString_Length
public static final native void nsCString delete int ptr public static final native int nsCString Length int ptr public static final native int nsCString get int ptr  nsCString_delete nsCString_Length nsCString_get
public static final native int nsCString Length int ptr public static final native int nsCString get int ptr public static final native void nsID delete int ptr  nsCString_Length nsCString_get nsID_delete
public static final native int nsCString get int ptr public static final native void nsID delete int ptr public static final native int nsID new  nsCString_get nsID_delete nsID_new
public static final native void nsID delete int ptr public static final native int nsID new public static final native boolean nsID Parse int ptr String aID Str  nsID_delete nsID_new nsID_Parse aIDStr
public static final native int nsID new public static final native boolean nsID Parse int ptr String aID Str public static final native boolean nsID Equals int ptr int other  nsID_new nsID_Parse aIDStr nsID_Equals
public static final native boolean nsID Parse int ptr String aID Str public static final native boolean nsID Equals int ptr int other public static final native int nsRect new int aX int aY int a Width int a Height  nsID_Parse aIDStr nsID_Equals nsRect_new aWidth aHeight
public static final native boolean nsID Equals int ptr int other public static final native int nsRect new int aX int aY int a Width int a Height public static final native void nsRect delete int ptr  nsID_Equals nsRect_new aWidth aHeight nsRect_delete
public static final native int nsRect new int aX int aY int a Width int a Height public static final native void nsRect delete int ptr public static final native int nsString new  nsRect_new aWidth aHeight nsRect_delete nsString_new
public static final native void nsRect delete int ptr public static final native int nsString new public static final native int nsString new char a String  nsRect_delete nsString_new nsString_new aString
public static final native int nsString new public static final native int nsString new char a String public static final native void nsString delete int ptr  nsString_new nsString_new aString nsString_delete
public static final native int nsString new char a String public static final native void nsString delete int ptr public static final native int nsString Length int ptr  nsString_new aString nsString_delete nsString_Length
public static final native void nsString delete int ptr public static final native int nsString Length int ptr public static final native int nsString get int ptr  nsString_delete nsString_Length nsString_get
public static final native int nsString Length int ptr public static final native int nsString get int ptr public static final native boolean nsString Equals int ptr int other  nsString_Length nsString_get nsString_Equals
public static final native int nsString get int ptr public static final native boolean nsString Equals int ptr int other public static final native void nsString AssignWithConversion int ptr byte a String  nsString_get nsString_Equals nsString_AssignWithConversion aString
public static final native boolean nsString Equals int ptr int other public static final native void nsString AssignWithConversion int ptr byte a String public static final native void PR Free int ptr  nsString_Equals nsString_AssignWithConversion aString PR_Free
public static final native void nsString AssignWithConversion int ptr byte a String public static final native void PR Free int ptr public static final native String PR GetEnv String name  nsString_AssignWithConversion aString PR_Free PR_GetEnv
public static final native void PR Free int ptr public static final native String PR GetEnv String name public static final native int PR Malloc int Length  PR_Free PR_GetEnv PR_Malloc
public static final native String PR GetEnv String name public static final native int PR Malloc int Length public static final native int strlen int s  PR_GetEnv PR_Malloc
public static final native int strlen int s public static final native int ns Write Segment Fun int ptr int a In Stream int a Closure byte a From Segment int a To Offset int a Count int a Write Count  nsWriteSegmentFun aInStream aClosure aFromSegment aToOffset aCount aWriteCount
public static final native int ns Write Segment Fun int ptr int a In Stream int a Closure byte a From Segment int a To Offset int a Count int a Write Count static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 int arg1  nsWriteSegmentFun aInStream aClosure aFromSegment aToOffset aCount aWriteCount VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 nsID arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 nsID arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 byte arg1 byte arg2 int arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 nsID arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 byte arg1 byte arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 byte arg1 byte arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 byte arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 byte arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 byte arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 static final native int Vtbl Call int fn Number int pp Vtbl int arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 static final native void Vtbl Call No Ret int fn Number int pp Vtbl int arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCallNoRet fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 static final native void Vtbl Call No Ret int fn Number int pp Vtbl int arg0 static final native void Vtbl Call No Ret int fn Number int pp Vtbl int arg0 int arg1  VtblCall fnNumber ppVtbl VtblCallNoRet fnNumber ppVtbl VtblCallNoRet fnNumber ppVtbl
static final native void Vtbl Call No Ret int fn Number int pp Vtbl int arg0 static final native void Vtbl Call No Ret int fn Number int pp Vtbl int arg0 int arg1 static final native void Vtbl Call No Ret int fn Number int pp Vtbl int arg0 int arg1  VtblCallNoRet fnNumber ppVtbl VtblCallNoRet fnNumber ppVtbl VtblCallNoRet fnNumber ppVtbl
static final native void Vtbl Call No Ret int fn Number int pp Vtbl int arg0 int arg1 static final native void Vtbl Call No Ret int fn Number int pp Vtbl int arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl char arg0  VtblCallNoRet fnNumber ppVtbl VtblCallNoRet fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native void Vtbl Call No Ret int fn Number int pp Vtbl int arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0  VtblCallNoRet fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 nsID arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 nsID arg1 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 nsID arg1 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 int arg5  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 int arg5 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 int arg5 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 boolean arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 boolean arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 boolean arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 boolean arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 boolean arg1 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 boolean arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 boolean arg1 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 boolean arg1 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 boolean arg1 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 boolean arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 boolean arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 boolean arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl long arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl long arg0 static final native int Vtbl Call int fn Number int pp Vtbl float arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl long arg0 static final native int Vtbl Call int fn Number int pp Vtbl float arg0 static final native int Vtbl Call int fn Number int pp Vtbl double arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl float arg0 static final native int Vtbl Call int fn Number int pp Vtbl double arg0 static final native int Vtbl Call int fn Number int pp Vtbl long arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl double arg0 static final native int Vtbl Call int fn Number int pp Vtbl long arg0 static final native int Vtbl Call int fn Number int pp Vtbl double arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl long arg0 static final native int Vtbl Call int fn Number int pp Vtbl double arg0 static final native int Vtbl Call int fn Number int pp Vtbl short arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl double arg0 static final native int Vtbl Call int fn Number int pp Vtbl short arg0 static final native int Vtbl Call int fn Number int pp Vtbl float arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl short arg0 static final native int Vtbl Call int fn Number int pp Vtbl float arg0 static final native int Vtbl Call int fn Number int pp Vtbl short arg0 float arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl float arg0 static final native int Vtbl Call int fn Number int pp Vtbl short arg0 float arg1 static final native int Vtbl Call int fn Number int pp Vtbl short arg0 float arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl short arg0 float arg1 static final native int Vtbl Call int fn Number int pp Vtbl short arg0 float arg1 static final native int Vtbl Call int fn Number int pp Vtbl short arg0 int arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl short arg0 float arg1 static final native int Vtbl Call int fn Number int pp Vtbl short arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 int arg3 int arg4 int arg5 int arg6 int arg7 int arg8 boolean arg9 boolean arg10 boolean arg11 boolean arg12 short arg13 int arg14  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl short arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 int arg3 int arg4 int arg5 int arg6 int arg7 int arg8 boolean arg9 boolean arg10 boolean arg11 boolean arg12 short arg13 int arg14 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 int arg3 int arg4 int arg5 int arg6 short arg7  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 int arg3 int arg4 int arg5 int arg6 int arg7 int arg8 boolean arg9 boolean arg10 boolean arg11 boolean arg12 short arg13 int arg14 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 int arg3 int arg4 int arg5 int arg6 short arg7 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 short arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 int arg3 int arg4 int arg5 int arg6 short arg7 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 short arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 short arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 short arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 short arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 nsID arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 short arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 nsID arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 nsID arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 nsID arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 nsID arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 nsID arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 byte arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 byte arg1 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 char arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 byte arg1 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 char arg1 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 char arg1 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 boolean arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 boolean arg1 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 boolean arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 boolean arg1 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 boolean arg1 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 nsID arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 boolean arg1 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 nsID arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 nsID arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 nsID arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 nsID arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 nsID arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 byte arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 byte arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 byte arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 char arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 char arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 byte arg1 char arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 char arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 byte arg1 char arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 boolean arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 byte arg1 char arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 boolean arg3 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 boolean arg3 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 char arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 char arg2 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 boolean arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 char arg2 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 boolean arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 boolean arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 boolean arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 boolean arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 char arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 boolean arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 char arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 boolean arg2 int arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 char arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 boolean arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 boolean arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 boolean arg3 int arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 boolean arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 char arg2 int arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 boolean arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 char arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 char arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 int arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 int arg3 boolean arg4 boolean arg5 boolean arg6 boolean arg7 int arg8 int arg9  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 int arg3 boolean arg4 boolean arg5 boolean arg6 boolean arg7 int arg8 int arg9 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 int arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 int arg3 boolean arg4 boolean arg5 boolean arg6 boolean arg7 int arg8 int arg9 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 int arg1 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 int arg2 char arg3 int arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 int arg2 char arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 int arg2 char arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 int arg3 int arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 int arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 boolean arg3 boolean arg4 boolean arg5 boolean arg6 boolean arg7  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 int arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 boolean arg3 boolean arg4 boolean arg5 boolean arg6 boolean arg7 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 int arg3 int arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 boolean arg2 boolean arg3 boolean arg4 boolean arg5 boolean arg6 boolean arg7 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 int arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 int arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 char arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 char arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 char arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 char arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 char arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 char arg3 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 boolean arg3 boolean arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 char arg3 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 boolean arg3 boolean arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 boolean arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 boolean arg3 boolean arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 boolean arg3 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 boolean arg2 int arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 boolean arg3 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 boolean arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 boolean arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 boolean arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 boolean arg3 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 int arg2 char arg3 int arg4 boolean arg5  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 boolean arg3 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 int arg2 char arg3 int arg4 boolean arg5 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 boolean arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 int arg2 char arg3 int arg4 boolean arg5 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 boolean arg3 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 int arg2 char arg3 char arg4 char arg5 char arg6 boolean arg7 int arg8  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 boolean arg3 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 int arg2 char arg3 char arg4 char arg5 char arg6 boolean arg7 int arg8 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 boolean arg3 boolean arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 int arg2 char arg3 char arg4 char arg5 char arg6 boolean arg7 int arg8 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 boolean arg3 boolean arg4 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 char arg2 boolean arg3 boolean arg4 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 nsID arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 nsID arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 char arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 nsID arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 char arg3 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2 int arg3 int arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 char arg3 static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2 int arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 int arg2 boolean arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2 int arg3 int arg4 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 int arg2 boolean arg3 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 boolean arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 int arg2 boolean arg3 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 boolean arg1 static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 nsID arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 boolean arg1 static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 nsID arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 int arg1 nsID arg2 int arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 nsID arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 int arg1 nsID arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 nsID arg2 int arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 int arg1 nsID arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 nsID arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 nsID arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 nsID arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 nsID arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 nsID arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl nsID arg0 nsID arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 nsID arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 int arg5 int arg6  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 nsID arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 int arg5 int arg6 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 int arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 int arg5 int arg6 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 int arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 short arg1 short arg2 short arg3 boolean arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 int arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 short arg1 short arg2 short arg3 boolean arg4 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 short arg1 short arg2 short arg3 boolean arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 short arg1 short arg2 short arg3 boolean arg4 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 short arg1 short arg2 short arg3 boolean arg4 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 int arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 short arg1 short arg2 short arg3 boolean arg4 static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 int arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 byte arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl boolean arg0 int arg1 boolean arg2 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 byte arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 byte arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 byte arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 byte arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 int arg2 byte arg3 int arg4 int arg5 int arg6 int arg7  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl int arg0 byte arg1 int arg2 static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 int arg2 byte arg3 int arg4 int arg5 int arg6 int arg7 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 byte arg2 int arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
static final native int Vtbl Call int fn Number int pp Vtbl byte arg0 int arg1 int arg2 byte arg3 int arg4 int arg5 int arg6 int arg7 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 byte arg2 int arg3 static final native int Vtbl Call int fn Number int pp Vtbl int arg0 byte arg1 int arg2 int arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl

Constructs a new instance of this class public Fill Layout  FillLayout
Constructs a new instance of this class given the type param type the type of fill layout since 2 0 public Fill Layout int type this type type  FillLayout
protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache Control children composite get Children int count children length int max Width 0 max Height 0 for int i 0 i count i Control child children i Point size child compute Size SWT DEFAULT SWT DEFAULT flush Cache max Width Math max max Width size x max Height Math max max Height size y int width 0 height 0 if type SWT HORIZONTAL width count max Width if count 0 width count 1 spacing height max Height else width max Width height count max Height if count 0 height count 1 spacing width margin Width 2 height margin Height 2 return new Point width height  computeSize wHint hHint flushCache getChildren maxWidth maxHeight computeSize flushCache maxWidth maxWidth maxHeight maxHeight maxWidth maxHeight maxWidth maxHeight marginWidth marginHeight
protected void layout Composite composite boolean flush Cache Rectangle rect composite get Client Area Control children composite get Children int count children length if count 0 return int width rect width margin Width 2 int height rect height margin Height 2 if type SWT HORIZONTAL width count 1 spacing int x rect x margin Width extra width count int y rect y margin Height cell Width width count for int i 0 i count i Control child children i int child Width cell Width if i 0 child Width extra 2 else if i count 1 child Width extra 1 2 child set Bounds x y child Width height x child Width spacing else height count 1 spacing int x rect x margin Width cell Height height count int y rect y margin Height extra height count for int i 0 i count i Control child children i int child Height cell Height if i 0 child Height extra 2 else if i count 1 child Height extra 1 2 child set Bounds x y width child Height y child Height spacing  flushCache getClientArea getChildren marginWidth marginHeight marginWidth marginHeight cellWidth childWidth cellWidth childWidth childWidth setBounds childWidth childWidth marginWidth cellHeight marginHeight childHeight cellHeight childHeight childHeight setBounds childHeight childHeight

public int alignment Form Attachment  FormAttachment
Constructs a new instance of this class given a numerator Since no denominator or offset is specified the default is to treat the numerator as a percentage of the form with a denominator of 100 The offset is zero param numerator the percentage of the position param offset the offset of the side from the position since 3 0 public Form Attachment int numerator this numerator 100 0  FormAttachment
Constructs a new instance of this class given a numerator and an offset Since no denominator is specified the default is to treat the numerator as a percentage of the form with a denominator of 100 param numerator the percentage of the position param offset the offset of the side from the position public Form Attachment int numerator int offset this numerator 100 offset  FormAttachment
Constructs a new instance of this class given a numerator and denominator and an offset The position of the side is given by the fraction of the form defined by the numerator and denominator param numerator the numerator of the position param denominator the denominator of the position param offset the offset of the side from the position public Form Attachment int numerator int denominator int offset if denominator 0 SWT error SWT ERROR CANNOT BE ZERO this numerator numerator this denominator denominator this offset offset  FormAttachment ERROR_CANNOT_BE_ZERO
Constructs a new instance of this class given a control Since no alignment is specified the default alignment is to attach the side to the adjacent side of the specified control Since no offset is specified an offset of 0 is used param control the control the side is attached to public Form Attachment Control control this control 0 SWT DEFAULT  FormAttachment
Constructs a new instance of this class given a control and an offset Since no alignment is specified the default alignment is to attach the side to the adjacent side of the specified control param control the control the side is attached to param offset the offset of the side from the control public Form Attachment Control control int offset this control offset SWT DEFAULT  FormAttachment
Constructs a new instance of this class given a control an offset and an alignment param control the control the side is attached to param offset the offset of the side from the control param alignment the alignment of the side to the control it is attached to public Form Attachment Control control int offset int alignment this control control this offset offset this alignment alignment  FormAttachment
Form Attachment divide int value return new Form Attachment numerator denominator value offset value  FormAttachment FormAttachment
int gcd int m int n int temp m Math abs m n Math abs n if m n temp m m n n temp while n 0 temp m m n n temp n return m 
Form Attachment minus Form Attachment attachment Form Attachment solution new Form Attachment solution numerator numerator attachment denominator denominator attachment numerator solution denominator denominator attachment denominator int gcd gcd solution denominator solution numerator solution numerator solution numerator gcd solution denominator solution denominator gcd solution offset offset attachment offset return solution  FormAttachment FormAttachment FormAttachment FormAttachment
Form Attachment minus int value return new Form Attachment numerator denominator offset value  FormAttachment FormAttachment
Form Attachment plus Form Attachment attachment Form Attachment solution new Form Attachment solution numerator numerator attachment denominator denominator attachment numerator solution denominator denominator attachment denominator int gcd gcd solution denominator solution numerator solution numerator solution numerator gcd solution denominator solution denominator gcd solution offset offset attachment offset return solution  FormAttachment FormAttachment FormAttachment FormAttachment
Form Attachment plus int value return new Form Attachment numerator denominator offset value  FormAttachment FormAttachment
int solveX int value if denominator 0 SWT error SWT ERROR CANNOT BE ZERO return numerator value denominator offset  ERROR_CANNOT_BE_ZERO
int solveY int value if numerator 0 SWT error SWT ERROR CANNOT BE ZERO return value offset denominator numerator  ERROR_CANNOT_BE_ZERO
public String to String String string control null control to String numerator denominator return y string offset 0 x offset x offset  toString toString

boolean is Visited public Form Data this SWT DEFAULT SWT DEFAULT  isVisited FormData
public Form Data int width int height this width width this height height  FormData
Form Attachment get Bottom Attachment int spacing if cache Bottom null return cache Bottom if is Visited return cache Bottom new Form Attachment 0 cache Height if bottom null if top null return cache Bottom new Form Attachment 0 cache Height return cache Bottom get Top Attachment spacing plus cache Height Control control bottom control if control null control is Disposed bottom control control null if control null return cache Bottom bottom is Visited true Form Data form Data Form Data control get Layout Data Form Attachment bottom Attachment form Data get Bottom Attachment spacing switch bottom alignment case SWT BOTTOM cache Bottom bottom Attachment plus bottom offset break case SWT CENTER Form Attachment top Attachment form Data get Top Attachment spacing Form Attachment bottom Height bottom Attachment minus top Attachment cache Bottom bottom Attachment minus bottom Height minus cache Height divide 2 break case SWT TOP case SWT DEFAULT default Form Attachment top Attachment form Data get Top Attachment spacing cache Bottom top Attachment plus bottom offset spacing break is Visited false return cache Bottom  FormAttachment getBottomAttachment cacheBottom cacheBottom isVisited cacheBottom FormAttachment cacheHeight cacheBottom FormAttachment cacheHeight cacheBottom getTopAttachment cacheHeight isDisposed cacheBottom isVisited FormData formData FormData getLayoutData FormAttachment bottomAttachment formData getBottomAttachment cacheBottom bottomAttachment FormAttachment topAttachment formData getTopAttachment FormAttachment bottomHeight bottomAttachment topAttachment cacheBottom bottomAttachment bottomHeight cacheHeight FormAttachment topAttachment formData getTopAttachment cacheBottom topAttachment isVisited cacheBottom
Form Attachment get Left Attachment int spacing if cache Left null return cache Left if is Visited return cache Left new Form Attachment 0 0 if left null if right null return cache Left new Form Attachment 0 0 return cache Left get Right Attachment spacing minus cache Width Control control left control if control null control is Disposed left control control null if control null return cache Left left is Visited true Form Data form Data Form Data control get Layout Data Form Attachment left Attachment form Data get Left Attachment spacing switch left alignment case SWT LEFT cache Left left Attachment plus left offset break case SWT CENTER Form Attachment right Attachment form Data get Right Attachment spacing Form Attachment left Width right Attachment minus left Attachment cache Left left Attachment plus left Width minus cache Width divide 2 break case SWT RIGHT case SWT DEFAULT default Form Attachment right Attachment form Data get Right Attachment spacing cache Left right Attachment plus left offset spacing is Visited false return cache Left  FormAttachment getLeftAttachment cacheLeft cacheLeft isVisited cacheLeft FormAttachment cacheLeft FormAttachment cacheLeft getRightAttachment cacheWidth isDisposed cacheLeft isVisited FormData formData FormData getLayoutData FormAttachment leftAttachment formData getLeftAttachment cacheLeft leftAttachment FormAttachment rightAttachment formData getRightAttachment FormAttachment leftWidth rightAttachment leftAttachment cacheLeft leftAttachment leftWidth cacheWidth FormAttachment rightAttachment formData getRightAttachment cacheLeft rightAttachment isVisited cacheLeft
Form Attachment get Right Attachment int spacing if cache Right null return cache Right if is Visited return cache Right new Form Attachment 0 cache Width if right null if left null return cache Right new Form Attachment 0 cache Width return cache Right get Left Attachment spacing plus cache Width Control control right control if control null control is Disposed right control control null if control null return cache Right right is Visited true Form Data form Data Form Data control get Layout Data Form Attachment right Attachment form Data get Right Attachment spacing switch right alignment case SWT RIGHT cache Right right Attachment plus right offset break case SWT CENTER Form Attachment left Attachment form Data get Left Attachment spacing Form Attachment right Width right Attachment minus left Attachment cache Right right Attachment minus right Width minus cache Width divide 2 break case SWT LEFT case SWT DEFAULT default Form Attachment left Attachment form Data get Left Attachment spacing cache Right left Attachment plus right offset spacing break is Visited false return cache Right  FormAttachment getRightAttachment cacheRight cacheRight isVisited cacheRight FormAttachment cacheWidth cacheRight FormAttachment cacheWidth cacheRight getLeftAttachment cacheWidth isDisposed cacheRight isVisited FormData formData FormData getLayoutData FormAttachment rightAttachment formData getRightAttachment cacheRight rightAttachment FormAttachment leftAttachment formData getLeftAttachment FormAttachment rightWidth rightAttachment leftAttachment cacheRight rightAttachment rightWidth cacheWidth FormAttachment leftAttachment formData getLeftAttachment cacheRight leftAttachment isVisited cacheRight
Form Attachment get Top Attachment int spacing if cache Top null return cache Top if is Visited return cache Top new Form Attachment 0 0 if top null if bottom null return cache Top new Form Attachment 0 0 return cache Top get Bottom Attachment spacing minus cache Height Control control top control if control null control is Disposed top control control null if control null return cache Top top is Visited true Form Data form Data Form Data control get Layout Data Form Attachment top Attachment form Data get Top Attachment spacing switch top alignment case SWT TOP cache Top top Attachment plus top offset break case SWT CENTER Form Attachment bottom Attachment form Data get Bottom Attachment spacing Form Attachment top Height bottom Attachment minus top Attachment cache Top top Attachment plus top Height minus cache Height divide 2 break case SWT BOTTOM case SWT DEFAULT default Form Attachment bottom Attachment form Data get Bottom Attachment spacing cache Top bottom Attachment plus top offset spacing break is Visited false return cache Top  FormAttachment getTopAttachment cacheTop cacheTop isVisited cacheTop FormAttachment cacheTop FormAttachment cacheTop getBottomAttachment cacheHeight isDisposed cacheTop isVisited FormData formData FormData getLayoutData FormAttachment topAttachment formData getTopAttachment cacheTop topAttachment FormAttachment bottomAttachment formData getBottomAttachment FormAttachment topHeight bottomAttachment topAttachment cacheTop topAttachment topHeight cacheHeight FormAttachment bottomAttachment formData getBottomAttachment cacheTop bottomAttachment isVisited cacheTop

Constructs a new instance of this class public Form Layout  FormLayout
Computes the preferred height of the form with respect to the preferred height of the control Given that the equations for top T and bottom B of the control in terms of the height of the form X are T AX B B CX D The equation for the height of the control H is bottom B minus top T or H B T or H CX D AX B Solving for X the height of the form we get X H B D C A When A C C A 0 and the equation has no solution for X This is a special case meaning that the control does not constrain the height of the form In this case we need to arbitrarily define the height of the form X Case 1 A C A 0 C 0 Let X D the distance from the top of the form to the bottom edge of the control In this case the control was attatched to the top of the form and the form needs to be large enough to show the bottom edge of the control Case 2 A C A 1 C 1 Let X B the distance from the bottom of the form to the top edge of the control In this case the control was attached to the bottom of the form and the only way that the control would be visible is if the offset is negative If the offset is positive there is no possible height for the form that will show the control as it will always be below the bottom edge of the form Case 3 A C A 0 C 0 and A 1 C 0 Let X D 1 C the distance from the top of the form to the bottom edge of the control In this case since C is not 0 or 1 it must be a fraction U V The offset D is the distance from CX to the bottom edge of the control This represents a fraction of the form 1 C X Since the height of a fraction of the form is known the height of the entire form can be found by setting 1 C X D We solve this equation for X in terms of U and V giving us X U D U V Similarily if the offset D is negative the control is positioned above CX The offset B is the distance from the top edge of the control to CX We can find the height of the entire form by setting CX B Solving in terms of U and V gives us X B V U int compute Height Form Data data Form Attachment top data get Top Attachment spacing Form Attachment bottom data get Bottom Attachment spacing Form Attachment height bottom minus top if height numerator 0 if bottom numerator 0 return bottom offset if bottom numerator bottom denominator return top offset if bottom offset 0 return top offset top denominator bottom numerator int divider bottom denominator bottom numerator return bottom denominator bottom offset divider return height solveY data cache Height  computeHeight FormData FormAttachment getTopAttachment FormAttachment getBottomAttachment FormAttachment cacheHeight
protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache Point size layout composite false 0 0 0 0 flush Cache size x margin Width 2 size y margin Height 2 return size  computeSize wHint hHint flushCache flushCache marginWidth marginHeight
Point compute Size Control control boolean flush Cache Form Data data Form Data control get Layout Data if data null control set Layout Data data new Form Data return control compute Size data width data height flush Cache  computeSize flushCache FormData FormData getLayoutData setLayoutData FormData computeSize flushCache
Computes the preferred height of the form with respect to the preferred height of the control int compute Width Form Data data Form Attachment left data get Left Attachment spacing Form Attachment right data get Right Attachment spacing Form Attachment width right minus left if width numerator 0 if right numerator 0 return right offset if right numerator right denominator return left offset if right offset 0 return left offset left denominator left numerator int divider right denominator right numerator return right denominator right offset divider return width solveY data cache Width  computeWidth FormData FormAttachment getLeftAttachment FormAttachment getRightAttachment FormAttachment cacheWidth
protected void layout Composite composite boolean flush Cache Rectangle rect composite get Client Area int x rect x margin Width int y rect y margin Height int width Math max 0 rect width 2 margin Width int height Math max 0 rect height 2 margin Height layout composite true x y width height flush Cache  flushCache getClientArea marginWidth marginHeight marginWidth marginHeight flushCache
Point layout Composite composite boolean move int x int y int width int height boolean flush Cache Control children composite get Children for int i 0 i children length i Control child children i Point size compute Size child flush Cache Form Data data Form Data child get Layout Data data cache Width size x data cache Height size y data cache Left data cache Right data cache Top data cache Bottom null Rectangle bounds null for int i 0 i children length i Control child children i Form Data data Form Data child get Layout Data if move int x1 data get Left Attachment spacing solveX width int y1 data get Top Attachment spacing solveX height int x2 data get Right Attachment spacing solveX width int y2 data get Bottom Attachment spacing solveX height if bounds null bounds new Rectangle children length bounds i new Rectangle x x1 y y1 x2 x1 y2 y1 else width Math max compute Width data width height Math max compute Height data height for int i 0 i children length i Control child children i Form Data data Form Data child get Layout Data data cache Width data cache Height 0 data cache Left data cache Right data cache Top data cache Bottom null if move for int i 0 i children length i children i set Bounds bounds i return move null new Point width height  flushCache getChildren computeSize flushCache FormData FormData getLayoutData cacheWidth cacheHeight cacheLeft cacheRight cacheTop cacheBottom FormData FormData getLayoutData getLeftAttachment getTopAttachment getRightAttachment getBottomAttachment computeWidth computeHeight FormData FormData getLayoutData cacheWidth cacheHeight cacheLeft cacheRight cacheTop cacheBottom setBounds

boolean is Item Data true int h Span public Grid Data super  isItemData hSpan GridData
public Grid Data int style super if style VERTICAL ALIGN BEGINNING 0 vertical Alignment BEGINNING if style VERTICAL ALIGN CENTER 0 vertical Alignment CENTER if style VERTICAL ALIGN FILL 0 vertical Alignment FILL if style VERTICAL ALIGN END 0 vertical Alignment END if style HORIZONTAL ALIGN BEGINNING 0 horizontal Alignment BEGINNING if style HORIZONTAL ALIGN CENTER 0 horizontal Alignment CENTER if style HORIZONTAL ALIGN FILL 0 horizontal Alignment FILL if style HORIZONTAL ALIGN END 0 horizontal Alignment END if style GRAB HORIZONTAL 0 grab Excess Horizontal Space true else grab Excess Horizontal Space false if style GRAB VERTICAL 0 grab Excess Vertical Space true else grab Excess Vertical Space false  GridData VERTICAL_ALIGN_BEGINNING verticalAlignment VERTICAL_ALIGN_CENTER verticalAlignment VERTICAL_ALIGN_FILL verticalAlignment VERTICAL_ALIGN_END verticalAlignment HORIZONTAL_ALIGN_BEGINNING horizontalAlignment HORIZONTAL_ALIGN_CENTER horizontalAlignment HORIZONTAL_ALIGN_FILL horizontalAlignment HORIZONTAL_ALIGN_END horizontalAlignment GRAB_HORIZONTAL grabExcessHorizontalSpace grabExcessHorizontalSpace GRAB_VERTICAL grabExcessVerticalSpace grabExcessVerticalSpace
since 3 0 public Grid Data int horizontal Alignment int vertical Alignment boolean grab Excess Horizontal Space boolean grab Excess Vertical Space this horizontal Alignment vertical Alignment grab Excess Horizontal Space grab Excess Vertical Space 1 1  GridData horizontalAlignment verticalAlignment grabExcessHorizontalSpace grabExcessVerticalSpace horizontalAlignment verticalAlignment grabExcessHorizontalSpace grabExcessVerticalSpace
public Grid Data int horizontal Alignment int vertical Alignment boolean grab Excess Horizontal Space boolean grab Excess Vertical Space int horizontal Span int vertical Span super this horizontal Alignment horizontal Alignment this vertical Alignment vertical Alignment this grab Excess Horizontal Space grab Excess Horizontal Space this grab Excess Vertical Space grab Excess Vertical Space this horizontal Span horizontal Span this vertical Span vertical Span  GridData horizontalAlignment verticalAlignment grabExcessHorizontalSpace grabExcessVerticalSpace horizontalSpan verticalSpan horizontalAlignment horizontalAlignment verticalAlignment verticalAlignment grabExcessHorizontalSpace grabExcessHorizontalSpace grabExcessVerticalSpace grabExcessVerticalSpace horizontalSpan horizontalSpan verticalSpan verticalSpan
public Grid Data int width int height super this width Hint width this height Hint height  GridData widthHint heightHint
this height Hint height boolean is Item Data return is Item Data  heightHint isItemData isItemData
return is Item Data boolean is Spacer Data return is Item Data  isItemData isSpacerData isItemData

Constructs a new instance of this class public Grid Layout  GridLayout
Constructs a new instance of this class given the number of columns and whether or not the columns should be forced to have the same width param num Columns the number of columns in the grid param make Columns Equal Width whether or not the columns will have equal width since 2 0 public Grid Layout int num Columns boolean make Columns Equal Width this num Columns num Columns this make Columns Equal Width make Columns Equal Width  numColumns makeColumnsEqualWidth GridLayout numColumns makeColumnsEqualWidth numColumns numColumns makeColumnsEqualWidth makeColumnsEqualWidth
void adjust Grid Dimensions Composite composite boolean flush Cache Ensure that controls that span more than one row or column have enough space for int row 0 row grid size row for int column 0 column num Columns column Grid Data spec Grid Data grid element At row column if spec is Item Data Widgets spanning columns if spec h Span 1 Control child composite get Children spec child Index Point extent child compute Size spec width Hint spec height Hint flush Cache Calculate the size of the control s spanned columns int last Span Index column spec h Span int spanned Size 0 for int c column c last Span Index c spanned Size spanned Size pixel Column Widths c horizontal Spacing spanned Size spanned Size horizontal Spacing If the spanned columns are not large enough to display the control adjust the column sizes to account for the extra space that is needed if extent x spec horizontal Indent spanned Size int extra Space Needed extent x spec horizontal Indent spanned Size int last Column column spec h Span 1 int col Width if make Columns Equal Width Evenly distribute the extra space amongst all of the columns int column Extra extra Space Needed num Columns int column Remainder extra Space Needed num Columns for int i 0 i pixel Column Widths length i col Width pixel Column Widths i column Extra pixel Column Widths i col Width col Width pixel Column Widths last Column column Remainder pixel Column Widths last Column col Width else Vector local Expandable Columns new Vector for int i column i last Column i for int j 0 j expandable Columns length j if expandable Columns j i local Expandable Columns add Element new Integer i if local Expandable Columns size 0 If any of the control s columns grab excess space allocate the space amongst those columns int column Extra extra Space Needed local Expandable Columns size int column Remainder extra Space Needed local Expandable Columns size for int i 0 i local Expandable Columns size i int expandable Col Integer local Expandable Columns element At i int Value col Width pixel Column Widths expandable Col column Extra pixel Column Widths expandable Col col Width col Width pixel Column Widths last Column column Remainder pixel Column Widths last Column col Width else Add the extra space to the control s last column if none of its columns grab excess space col Width pixel Column Widths last Column extra Space Needed pixel Column Widths last Column col Width Widgets spanning rows if spec vertical Span 1 Control child composite get Children spec child Index Point extent child compute Size spec width Hint spec height Hint flush Cache Calculate the size of the control s spanned rows int last Span Index row spec vertical Span int spanned Size 0 for int r row r last Span Index r spanned Size spanned Size pixel Row Heights r vertical Spacing spanned Size spanned Size vertical Spacing If the spanned rows are not large enough to display the control adjust the row sizes to account for the extra space that is needed if extent y spanned Size int extra Space Needed extent y spanned Size int last Row row spec vertical Span 1 int row Height Vector local Expandable Rows new Vector for int i row i last Row i for int j 0 j expandable Rows length j if expandable Rows j i local Expandable Rows add Element new Integer i if local Expandable Rows size 0 If any of the control s rows grab excess space allocate the space amongst those rows int row Extra extra Space Needed local Expandable Rows size int row Remainder extra Space Needed local Expandable Rows size for int i 0 i local Expandable Rows size i int expandable Row Integer local Expandable Rows element At i int Value row Height pixel Row Heights expandable Row row Extra pixel Row Heights expandable Row row Height row Height pixel Row Heights last Row row Remainder pixel Row Heights last Row row Height else Add the extra space to the control s last row if no rows grab excess space row Height pixel Row Heights last Row extra Space Needed pixel Row Heights last Row row Height  adjustGridDimensions flushCache numColumns GridData GridData elementAt isItemData hSpan getChildren childIndex computeSize widthHint heightHint flushCache lastSpanIndex hSpan spannedSize lastSpanIndex spannedSize spannedSize pixelColumnWidths horizontalSpacing spannedSize spannedSize horizontalSpacing horizontalIndent spannedSize extraSpaceNeeded horizontalIndent spannedSize lastColumn hSpan colWidth makeColumnsEqualWidth columnExtra extraSpaceNeeded numColumns columnRemainder extraSpaceNeeded numColumns pixelColumnWidths colWidth pixelColumnWidths columnExtra pixelColumnWidths colWidth colWidth pixelColumnWidths lastColumn columnRemainder pixelColumnWidths lastColumn colWidth localExpandableColumns lastColumn expandableColumns expandableColumns localExpandableColumns addElement localExpandableColumns columnExtra extraSpaceNeeded localExpandableColumns columnRemainder extraSpaceNeeded localExpandableColumns localExpandableColumns expandableCol localExpandableColumns elementAt intValue colWidth pixelColumnWidths expandableCol columnExtra pixelColumnWidths expandableCol colWidth colWidth pixelColumnWidths lastColumn columnRemainder pixelColumnWidths lastColumn colWidth colWidth pixelColumnWidths lastColumn extraSpaceNeeded pixelColumnWidths lastColumn colWidth verticalSpan getChildren childIndex computeSize widthHint heightHint flushCache lastSpanIndex verticalSpan spannedSize lastSpanIndex spannedSize spannedSize pixelRowHeights verticalSpacing spannedSize spannedSize verticalSpacing spannedSize extraSpaceNeeded spannedSize lastRow verticalSpan rowHeight localExpandableRows lastRow expandableRows expandableRows localExpandableRows addElement localExpandableRows rowExtra extraSpaceNeeded localExpandableRows rowRemainder extraSpaceNeeded localExpandableRows localExpandableRows expandableRow localExpandableRows elementAt intValue rowHeight pixelRowHeights expandableRow rowExtra pixelRowHeights expandableRow rowHeight rowHeight pixelRowHeights lastRow rowRemainder pixelRowHeights lastRow rowHeight rowHeight pixelRowHeights lastRow extraSpaceNeeded pixelRowHeights lastRow rowHeight
void calculate Grid Dimensions Composite composite boolean flush Cache int max Width child Width max Height child Height Control children composite get Children Point child Sizes new Point children length pixel Column Widths new int num Columns pixel Row Heights new int grid size Loop through the grid by column to get the width that each column needs to be Each column will be as wide as its widest control for int column 0 column num Columns column max Width 0 for int row 0 row grid size row Grid Data spec Grid Data grid element At row column if spec is Item Data Control child children spec child Index child Sizes spec child Index child compute Size spec width Hint spec height Hint flush Cache child Width child Sizes spec child Index x spec horizontal Indent if spec h Span 1 max Width Math max max Width child Width Cache the values for later use pixel Column Widths column max Width if make Columns Equal Width max Width 0 Find the largest column size that is necessary and make each column that size for int i 0 i num Columns i max Width Math max max Width pixel Column Widths i max Width horizontal Spacing for int i 0 i num Columns i pixel Column Widths i max Width Loop through the grid by row to get the height that each row needs to be Each row will be as high as its tallest control for int row 0 row grid size row max Height 0 for int column 0 column num Columns column Grid Data spec Grid Data grid element At row column if spec is Item Data child Height child Sizes spec child Index y if spec vertical Span 1 max Height Math max max Height child Height Cache the values for later use pixel Row Heights row max Height  calculateGridDimensions flushCache maxWidth childWidth maxHeight childHeight getChildren childSizes pixelColumnWidths numColumns pixelRowHeights numColumns maxWidth GridData GridData elementAt isItemData childIndex childSizes childIndex computeSize widthHint heightHint flushCache childWidth childSizes childIndex horizontalIndent hSpan maxWidth maxWidth childWidth pixelColumnWidths maxWidth makeColumnsEqualWidth maxWidth numColumns maxWidth maxWidth pixelColumnWidths maxWidth horizontalSpacing numColumns pixelColumnWidths maxWidth maxHeight numColumns GridData GridData elementAt isItemData childHeight childSizes childIndex verticalSpan maxHeight maxHeight childHeight pixelRowHeights maxHeight
void compute Expandable Cells If a control grabs excess horizontal space the last column that the control spans will be expandable Similarly if a control grabs excess vertical space the last row that the control spans will be expandable Hashtable grow Columns new Hashtable Hashtable grow Rows new Hashtable for int col 0 col num Columns col for int row 0 row grid size row Grid Data spec Grid Data grid element At row col if spec grab Excess Horizontal Space grow Columns put new Integer col spec h Span 1 new Object if spec grab Excess Vertical Space grow Rows put new Integer row spec vertical Span 1 new Object Cache the values These values are used later during children layout int i 0 Enumeration enum grow Columns keys expandable Columns new int grow Columns size while enum has More Elements expandable Columns i Integer enum next Element int Value i i 1 i 0 enum grow Rows keys expandable Rows new int grow Rows size while enum has More Elements expandable Rows i Integer enum next Element int Value i i 1  computeExpandableCells growColumns growRows numColumns GridData GridData elementAt grabExcessHorizontalSpace growColumns hSpan grabExcessVerticalSpace growRows verticalSpan growColumns expandableColumns growColumns hasMoreElements expandableColumns nextElement intValue growRows expandableRows growRows hasMoreElements expandableRows nextElement intValue
Point compute Layout Size Composite composite int w Hint int h Hint boolean flush Cache int total Margin Height total Margin Width int total Width total Height int cols rows Initialize the grid and other cached information that help with the grid layout if grid size 0 create Grid composite calculate Grid Dimensions composite flush Cache compute Expandable Cells adjust Grid Dimensions composite flush Cache cols num Columns rows grid size total Margin Height margin Height total Margin Width margin Width The total width is the margin plus border width plus space between each column plus the width of each column total Width total Margin Width 2 cols 1 horizontal Spacing Add up the width of each column for int i 0 i pixel Column Widths length i total Width total Width pixel Column Widths i The total height is the margin plus border height plus space between each row plus the height of the tallest child in each row total Height total Margin Height 2 rows 1 vertical Spacing Add up the height of each row for int i 0 i pixel Row Heights length i total Height total Height pixel Row Heights i if w Hint SWT DEFAULT total Width w Hint if h Hint SWT DEFAULT total Height h Hint The preferred extent is the width and height that will accomodate the grid s controls return new Point total Width total Height  computeLayoutSize wHint hHint flushCache totalMarginHeight totalMarginWidth totalWidth totalHeight createGrid calculateGridDimensions flushCache computeExpandableCells adjustGridDimensions flushCache numColumns totalMarginHeight marginHeight totalMarginWidth marginWidth totalWidth totalMarginWidth horizontalSpacing pixelColumnWidths totalWidth totalWidth pixelColumnWidths totalHeight totalMarginHeight verticalSpacing pixelRowHeights totalHeight totalHeight pixelRowHeights wHint totalWidth wHint hHint totalHeight hHint totalWidth totalHeight
protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache Control children composite get Children int num Children children length if num Children 0 return new Point 0 0 if flush Cache Cause the grid and its related information to be calculated again grid remove All Elements return compute Layout Size composite w Hint h Hint flush Cache  computeSize wHint hHint flushCache getChildren numChildren numChildren flushCache removeAllElements computeLayoutSize wHint hHint flushCache
Point get First Empty Cell int row int column Grid Data row Data Grid Data grid element At row while column num Columns row Data column null column if column num Columns row column 0 if row grid size grid add Element empty Row return get First Empty Cell row column return new Point row column  getFirstEmptyCell GridData rowData GridData elementAt numColumns rowData numColumns addElement emptyRow getFirstEmptyCell
Point get Last Empty Cell int row int column Grid Data row Data Grid Data grid element At row while column num Columns row Data column null column return new Point row column 1  getLastEmptyCell GridData rowData GridData elementAt numColumns rowData
Point get Cell int row int column int width int height Point start get First Empty Cell row column Point end get Last Empty Cell start x start y if end y 1 start y width return start Grid Data row Data Grid Data grid element At start x for int j start y j end y 1 j Grid Data spacer Spec new Grid Data spacer Spec is Item Data false row Data j spacer Spec return get Cell end x end y width height  getCell getFirstEmptyCell getLastEmptyCell GridData rowData GridData elementAt GridData spacerSpec GridData spacerSpec isItemData rowData spacerSpec getCell
void create Grid Composite composite int row column row Fill column Fill Control children Grid Data spacer Spec children composite get Children grid add Element empty Row row 0 column 0 Loop through the children and place their associated layout specs in the grid Placement occurs left to right top to bottom i e by row for int i 0 i children length i Find the first available spot in the grid Control child children i Grid Data spec Grid Data child get Layout Data if spec null spec new Grid Data child set Layout Data spec spec h Span Math min spec horizontal Span num Columns Point p get Cell row column spec h Span spec vertical Span row p x column p y The vertical span for the item will be at least 1 If it is 1 add other rows to the grid for int j 2 j spec vertical Span j if row j grid size grid add Element empty Row Store the layout spec Also cache the child Index NOTE That we assume the children of a composite are maintained in the order in which they are created and added to the composite Grid Data grid element At row column spec spec child Index i Put spacers in the grid to account for the item s vertical and horizontal span row Fill spec vertical Span 1 column Fill spec h Span 1 for int r 1 r row Fill r for int c 0 c spec h Span c spacer Spec new Grid Data spacer Spec is Item Data false Grid Data grid element At row r column c spacer Spec for int c 1 c column Fill c for int r 0 r spec vertical Span r spacer Spec new Grid Data spacer Spec is Item Data false Grid Data grid element At row r column c spacer Spec column column spec h Span 1 Fill out empty grid cells with spacers for int r row r grid size r Grid Data row Data Grid Data grid element At r for int c 0 c num Columns c if row Data c null spacer Spec new Grid Data spacer Spec is Item Data false row Data c spacer Spec  createGrid rowFill columnFill GridData spacerSpec getChildren addElement emptyRow GridData GridData getLayoutData GridData setLayoutData hSpan horizontalSpan numColumns getCell hSpan verticalSpan verticalSpan addElement emptyRow childIndex GridData elementAt childIndex rowFill verticalSpan columnFill hSpan rowFill hSpan spacerSpec GridData spacerSpec isItemData GridData elementAt spacerSpec columnFill verticalSpan spacerSpec GridData spacerSpec isItemData GridData elementAt spacerSpec hSpan GridData rowData GridData elementAt numColumns rowData spacerSpec GridData spacerSpec isItemData rowData spacerSpec
Grid Data empty Row Grid Data row new Grid Data num Columns for int i 0 i num Columns i row i null return row  GridData emptyRow GridData GridData numColumns numColumns
protected void layout Composite composite boolean flush Cache int column Widths int row Heights int row Size rowY columnX int composite Width composite Height int excess Horizontal excess Vertical Control children if flush Cache Cause the grid and its related information to be calculated again grid remove All Elements children composite get Children if children length 0 return Point extent compute Size composite SWT DEFAULT SWT DEFAULT flush Cache column Widths new int num Columns for int i 0 i pixel Column Widths length i column Widths i pixel Column Widths i row Heights new int grid size for int i 0 i pixel Row Heights length i row Heights i pixel Row Heights i int column Width 0 row Size Math max 1 grid size composite Width extent x composite Height extent y Calculate whether or not there is any extra space or not enough space due to a resize operation Then allocate deallocate the space to columns and rows that are expandable If a control grabs excess space its last column or row will be expandable excess Horizontal composite get Client Area width composite Width excess Vertical composite get Client Area height composite Height Allocate deallocate horizontal space if expandable Columns length 0 int excess remainder last int col Width excess excess Horizontal expandable Columns length remainder excess Horizontal expandable Columns length last 0 for int i 0 i expandable Columns length i int expandable Col expandable Columns i col Width column Widths expandable Col col Width col Width excess column Widths expandable Col col Width last Math max last expandable Col col Width column Widths last col Width col Width remainder column Widths last col Width Go through all specs in each expandable column and get the maximum specified width Hint Use this as the minimum Width for the column for int i 0 i expandable Columns length i int expandable Col expandable Columns i int col Width column Widths expandable Col int min Width 0 for int j 0 j grid size j Grid Data row Grid Data grid element At j Grid Data spec row expandable Col if spec h Span 1 min Width Math max min Width spec width Hint column Widths expandable Col Math max col Width min Width Allocate deallocate vertical space if expandable Rows length 0 int excess remainder last int row Height excess excess Vertical expandable Rows length remainder excess Vertical expandable Rows length last 0 for int i 0 i expandable Rows length i int expandable Row expandable Rows i row Height row Heights expandable Row row Height row Height excess row Heights expandable Row row Height last Math max last expandable Row row Height row Heights last row Height row Height remainder row Heights last row Height Go through all specs in each expandable row and get the maximum specified height Hint Use this as the minimum Height for the row for int i 0 i expandable Rows length i int expandable Row expandable Rows i int row Height row Heights expandable Row int min Height 0 Grid Data row Grid Data grid element At expandable Row for int j 0 j num Columns j Grid Data spec row j if spec vertical Span 1 min Height Math max min Height spec height Hint row Heights expandable Row Math max row Height min Height Get the starting x and y columnX margin Width composite get Client Area x rowY margin Height composite get Client Area y Layout the control left to right top to bottom for int r 0 r row Size r int row Height row Heights r Grid Data row Grid Data grid element At r for int c 0 c row length c int spanned Width 0 spanned Height 0 int h Align 0 v Align 0 int widgetX 0 widgetY 0 int widgetW 0 widgetH 0 Grid Data spec Grid Data row c if make Columns Equal Width column Width composite get Client Area width 2 margin Width num Columns 1 horizontal Spacing column Width column Width num Columns for int i 0 i column Widths length i column Widths i column Width else column Width column Widths c spanned Width column Width for int k 1 k spec h Span k if c k num Columns if make Columns Equal Width column Width column Widths c k spanned Width spanned Width column Width horizontal Spacing spanned Height row Height for int k 1 k spec vertical Span k if r k grid size spanned Height spanned Height row Heights r k vertical Spacing if spec is Item Data Control child children spec child Index Point child Extent child compute Size spec width Hint spec height Hint flush Cache h Align spec horizontal Alignment widgetX columnX Calculate the x and width values for the control if h Align Grid Data CENTER h Align SWT CENTER widgetX widgetX spanned Width 2 child Extent x 2 else if h Align Grid Data END h Align SWT END h Align SWT RIGHT widgetX widgetX spanned Width child Extent x spec horizontal Indent else widgetX widgetX spec horizontal Indent if h Align Grid Data FILL widgetW spanned Width spec horizontal Indent widgetX columnX spec horizontal Indent else widgetW child Extent x Calculate the y and height values for the control v Align spec vertical Alignment widgetY rowY if v Align Grid Data CENTER v Align SWT CENTER widgetY widgetY spanned Height 2 child Extent y 2 else if v Align Grid Data END v Align SWT END v Align SWT BOTTOM widgetY widgetY spanned Height child Extent y if v Align Grid Data FILL widgetH spanned Height widgetY rowY else widgetH child Extent y Place the control child set Bounds widgetX widgetY widgetW widgetH Update the starting x value columnX columnX column Widths c horizontal Spacing Update the starting y value and since we re starting a new row reset the starting x value rowY rowY row Heights r vertical Spacing columnX margin Width composite get Client Area x  flushCache columnWidths rowHeights rowSize compositeWidth compositeHeight excessHorizontal excessVertical flushCache removeAllElements getChildren computeSize flushCache columnWidths numColumns pixelColumnWidths columnWidths pixelColumnWidths rowHeights pixelRowHeights rowHeights pixelRowHeights columnWidth rowSize compositeWidth compositeHeight excessHorizontal getClientArea compositeWidth excessVertical getClientArea compositeHeight expandableColumns colWidth excessHorizontal expandableColumns excessHorizontal expandableColumns expandableColumns expandableCol expandableColumns colWidth columnWidths expandableCol colWidth colWidth columnWidths expandableCol colWidth expandableCol colWidth columnWidths colWidth colWidth columnWidths colWidth widthHint minimumWidth expandableColumns expandableCol expandableColumns colWidth columnWidths expandableCol minWidth GridData GridData elementAt GridData expandableCol hSpan minWidth minWidth widthHint columnWidths expandableCol colWidth minWidth expandableRows rowHeight excessVertical expandableRows excessVertical expandableRows expandableRows expandableRow expandableRows rowHeight rowHeights expandableRow rowHeight rowHeight rowHeights expandableRow rowHeight expandableRow rowHeight rowHeights rowHeight rowHeight rowHeights rowHeight heightHint minimumHeight expandableRows expandableRow expandableRows rowHeight rowHeights expandableRow minHeight GridData GridData elementAt expandableRow numColumns GridData verticalSpan minHeight minHeight heightHint rowHeights expandableRow rowHeight minHeight marginWidth getClientArea marginHeight getClientArea rowSize rowHeight rowHeights GridData GridData elementAt spannedWidth spannedHeight hAlign vAlign GridData GridData makeColumnsEqualWidth columnWidth getClientArea marginWidth numColumns horizontalSpacing columnWidth columnWidth numColumns columnWidths columnWidths columnWidth columnWidth columnWidths spannedWidth columnWidth hSpan numColumns makeColumnsEqualWidth columnWidth columnWidths spannedWidth spannedWidth columnWidth horizontalSpacing spannedHeight rowHeight verticalSpan spannedHeight spannedHeight rowHeights verticalSpacing isItemData childIndex childExtent computeSize widthHint heightHint flushCache hAlign horizontalAlignment hAlign GridData hAlign spannedWidth childExtent hAlign GridData hAlign hAlign spannedWidth childExtent horizontalIndent horizontalIndent hAlign GridData spannedWidth horizontalIndent horizontalIndent childExtent vAlign verticalAlignment vAlign GridData vAlign spannedHeight childExtent vAlign GridData vAlign vAlign spannedHeight childExtent vAlign GridData spannedHeight childExtent setBounds columnWidths horizontalSpacing rowHeights verticalSpacing marginWidth getClientArea

public int height public Row Data this SWT DEFAULT SWT DEFAULT  RowData
public Row Data int width int height this width width this height height  RowData
public Row Data Point point this point x point y  RowData

Constructs a new instance of this class public Row Layout  RowLayout
Constructs a new instance of this class given the type param type the type of row layout since 2 0 public Row Layout int type this type type  RowLayout
protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache Point extent if type SWT HORIZONTAL extent layout Horizontal composite false w Hint SWT DEFAULT wrap w Hint flush Cache else extent layout Vertical composite false h Hint SWT DEFAULT wrap h Hint flush Cache if w Hint SWT DEFAULT extent x w Hint if h Hint SWT DEFAULT extent y h Hint return extent  computeSize wHint hHint flushCache layoutHorizontal wHint wHint flushCache layoutVertical hHint hHint flushCache wHint wHint hHint hHint
Point compute Size Control control boolean flush Cache int w Hint SWT DEFAULT h Hint SWT DEFAULT Row Data data Row Data control get Layout Data if data null w Hint data width h Hint data height return control compute Size w Hint h Hint flush Cache  computeSize flushCache wHint hHint RowData RowData getLayoutData wHint hHint computeSize wHint hHint flushCache
protected void layout Composite composite boolean flush Cache Rectangle client Area composite get Client Area if type SWT HORIZONTAL layout Horizontal composite true wrap client Area width flush Cache else layout Vertical composite true wrap client Area height flush Cache  flushCache clientArea getClientArea layoutHorizontal clientArea flushCache layoutVertical clientArea flushCache
Point layout Horizontal Composite composite boolean move boolean wrap int width boolean flush Cache Control children composite get Children int count children length int child Width 0 child Height 0 max Height 0 if pack for int i 0 i count i Control child children i Point size compute Size child flush Cache child Width Math max child Width size x child Height Math max child Height size y max Height child Height int clientX 0 clientY 0 if move Rectangle rect composite get Client Area clientX rect x clientY rect y int wraps null boolean wrapped false Rectangle bounds null if move justify fill bounds new Rectangle count wraps new int count int maxX 0 x margin Left margin Width y margin Top margin Height for int i 0 i count i Control child children i if pack Point size compute Size child flush Cache child Width size x child Height size y if wrap i 0 x child Width width wrapped true if move justify fill wraps i 1 max Height x margin Left margin Width y spacing max Height if pack max Height 0 if pack fill max Height Math max max Height child Height if move int childX x clientX childY y clientY if justify fill bounds i new Rectangle childX childY child Width child Height else child set Bounds childX childY child Width child Height x spacing child Width maxX Math max maxX x maxX Math max clientX margin Left margin Width maxX spacing if wrapped maxX margin Right margin Width if move justify fill int space 0 margin 0 if wrapped space Math max 0 width maxX count 1 margin Math max 0 width maxX count 1 2 else if fill justify int last 0 if count 0 wraps count 1 max Height for int i 0 i count i if wraps i 0 int wrap Count i last 1 if justify int wrapX 0 for int j last j i j wrapX bounds j width spacing space Math max 0 width wrapX wrap Count 1 margin Math max 0 width wrapX wrap Count 1 2 for int j last j i j if justify bounds j x space j last 1 margin if fill bounds j height wraps i last i 1 for int i 0 i count i if wrapped if justify bounds i x space i 1 margin if fill bounds i height max Height children i set Bounds bounds i return new Point maxX y max Height margin Bottom margin Height  layoutHorizontal flushCache getChildren childWidth childHeight maxHeight computeSize flushCache childWidth childWidth childHeight childHeight maxHeight childHeight getClientArea marginLeft marginWidth marginTop marginHeight computeSize flushCache childWidth childHeight childWidth maxHeight marginLeft marginWidth maxHeight maxHeight maxHeight maxHeight childHeight childWidth childHeight setBounds childWidth childHeight childWidth marginLeft marginWidth marginRight marginWidth maxHeight wrapCount wrapCount wrapCount maxHeight setBounds maxHeight marginBottom marginHeight
Point layout Vertical Composite composite boolean move boolean wrap int height boolean flush Cache Control children composite get Children int count children length int child Width 0 child Height 0 max Width 0 if pack for int i 0 i count i Control child children i Point size compute Size child flush Cache child Width Math max child Width size x child Height Math max child Height size y max Width child Width int clientX 0 clientY 0 if move Rectangle rect composite get Client Area clientX rect x clientY rect y int wraps null boolean wrapped false Rectangle bounds null if move justify fill bounds new Rectangle count wraps new int count int maxY 0 x margin Left margin Width y margin Top margin Height for int i 0 i count i Control child children i if pack Point size compute Size child flush Cache child Width size x child Height size y if wrap i 0 y child Height height wrapped true if move justify fill wraps i 1 max Width x spacing max Width y margin Top margin Height if pack max Width 0 if pack fill max Width Math max max Width child Width if move int childX x clientX childY y clientY if justify fill bounds i new Rectangle childX childY child Width child Height else child set Bounds childX childY child Width child Height y spacing child Height maxY Math max maxY y maxY Math max clientY margin Top margin Height maxY spacing if wrapped maxY margin Bottom margin Height if move justify fill int space 0 margin 0 if wrapped space Math max 0 height maxY count 1 margin Math max 0 height maxY count 1 2 else if fill justify int last 0 if count 0 wraps count 1 max Width for int i 0 i count i if wraps i 0 int wrap Count i last 1 if justify int wrapY 0 for int j last j i j wrapY bounds j height spacing space Math max 0 height wrapY wrap Count 1 margin Math max 0 height wrapY wrap Count 1 2 for int j last j i j if justify bounds j y space j last 1 margin if fill bounds j width wraps i last i 1 for int i 0 i count i if wrapped if justify bounds i y space i 1 margin if fill bounds i width max Width children i set Bounds bounds i return new Point x max Width margin Right margin Width maxY  layoutVertical flushCache getChildren childWidth childHeight maxWidth computeSize flushCache childWidth childWidth childHeight childHeight maxWidth childWidth getClientArea marginLeft marginWidth marginTop marginHeight computeSize flushCache childWidth childHeight childHeight maxWidth maxWidth marginTop marginHeight maxWidth maxWidth maxWidth childWidth childWidth childHeight setBounds childWidth childHeight childHeight marginTop marginHeight marginBottom marginHeight maxWidth wrapCount wrapCount wrapCount maxWidth setBounds maxWidth marginRight marginWidth

Constructs an instance of this class that can be used to print to the default printer exception SWT Error ul li ERROR NO HANDLES if an error occurred constructing the default printer data li ul public Printer Data  SWTError ERROR_NO_HANDLES PrinterData
Constructs an instance of this class with the given printer driver and printer name param driver the printer driver for the printer param name the name of the printer exception SWT Error ul li ERROR NO HANDLES if there are no valid printers ul see driver see name public Printer Data String driver String name this driver driver this name name  SWTError ERROR_NO_HANDLES PrinterData
Returns a string containing a concise human readable description of the receiver return a string representation of the receiver public String to String return Printer Data driver driver name name NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4  toString PrinterData

Answers a concise human readable description of the error code param code the SWT error code return a description of the error code see SWT static String find Error Text int code switch code case ERROR UNSPECIFIED return Unspecified error NON NLS 1 case ERROR NO HANDLES return No more handles NON NLS 1 case ERROR NO MORE CALLBACKS return No more callbacks NON NLS 1 case ERROR NULL ARGUMENT return Argument cannot be null NON NLS 1 case ERROR INVALID ARGUMENT return Argument not valid NON NLS 1 case ERROR INVALID RANGE return Index out of bounds NON NLS 1 case ERROR CANNOT BE ZERO return Argument cannot be zero NON NLS 1 case ERROR CANNOT GET ITEM return Cannot get item NON NLS 1 case ERROR CANNOT GET SELECTION return Cannot get selection NON NLS 1 case ERROR CANNOT GET ITEM HEIGHT return Cannot get item height NON NLS 1 case ERROR CANNOT GET TEXT return Cannot get text NON NLS 1 case ERROR CANNOT SET TEXT return Cannot set text NON NLS 1 case ERROR ITEM NOT ADDED return Item not added NON NLS 1 case ERROR ITEM NOT REMOVED return Item not removed NON NLS 1 case ERROR NOT IMPLEMENTED return Not implemented NON NLS 1 case ERROR MENU NOT DROP DOWN return Menu must be a drop down NON NLS 1 case ERROR THREAD INVALID ACCESS return Invalid thread access NON NLS 1 case ERROR WIDGET DISPOSED return Widget is disposed NON NLS 1 case ERROR MENUITEM NOT CASCADE return Menu item is not a CASCADE NON NLS 1 case ERROR CANNOT SET SELECTION return Cannot set selection NON NLS 1 case ERROR CANNOT SET MENU return Cannot set menu NON NLS 1 case ERROR CANNOT SET ENABLED return Cannot set the enabled state NON NLS 1 case ERROR CANNOT GET ENABLED return Cannot get the enabled state NON NLS 1 case ERROR INVALID PARENT return Widget has the wrong parent NON NLS 1 case ERROR MENU NOT BAR return Menu is not a BAR NON NLS 1 case ERROR CANNOT GET COUNT return Cannot get count NON NLS 1 case ERROR MENU NOT POP UP return Menu is not a POP UP NON NLS 1 case ERROR UNSUPPORTED DEPTH return Unsupported color depth NON NLS 1 case ERROR IO return i o error NON NLS 1 case ERROR INVALID IMAGE return Invalid image NON NLS 1 case ERROR UNSUPPORTED FORMAT return Unsupported or unrecognized format NON NLS 1 case ERROR INVALID SUBCLASS return Subclassing not allowed NON NLS 1 case ERROR GRAPHIC DISPOSED return Graphic is disposed NON NLS 1 case ERROR DEVICE DISPOSED return Device is disposed NON NLS 1 case ERROR FAILED EXEC return Failed to execute runnable NON NLS 1 case ERROR FAILED LOAD LIBRARY return Unable to load library NON NLS 1 return Unknown error NON NLS 1  findErrorText ERROR_UNSPECIFIED ERROR_NO_HANDLES ERROR_NO_MORE_CALLBACKS ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT ERROR_INVALID_RANGE ERROR_CANNOT_BE_ZERO ERROR_CANNOT_GET_ITEM ERROR_CANNOT_GET_SELECTION ERROR_CANNOT_GET_ITEM_HEIGHT ERROR_CANNOT_GET_TEXT ERROR_CANNOT_SET_TEXT ERROR_ITEM_NOT_ADDED ERROR_ITEM_NOT_REMOVED ERROR_NOT_IMPLEMENTED ERROR_MENU_NOT_DROP_DOWN ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED ERROR_MENUITEM_NOT_CASCADE ERROR_CANNOT_SET_SELECTION ERROR_CANNOT_SET_MENU ERROR_CANNOT_SET_ENABLED ERROR_CANNOT_GET_ENABLED ERROR_INVALID_PARENT ERROR_MENU_NOT_BAR ERROR_CANNOT_GET_COUNT ERROR_MENU_NOT_POP_UP POP_UP ERROR_UNSUPPORTED_DEPTH ERROR_IO ERROR_INVALID_IMAGE ERROR_UNSUPPORTED_FORMAT ERROR_INVALID_SUBCLASS ERROR_GRAPHIC_DISPOSED ERROR_DEVICE_DISPOSED ERROR_FAILED_EXEC ERROR_FAILED_LOAD_LIBRARY
Returns the NLS ed message for the given argument param key the key to look up return the message for the given key exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the key is null li ul public static String get Message String key return Compatibility get Message key  IllegalArgumentException ERROR_NULL_ARGUMENT getMessage getMessage
Returns the SWT platform name Examples win32 motif gtk photon carbon return the SWT platform name public static String get Platform return Library get Platform  getPlatform getPlatform
Returns the SWT version number as an integer Example SWT051 51 return the SWT version number public static int get Version return Library get Version  getVersion getVersion
Throws an appropriate exception based on the passed in error code param code the SWT error code public static void error int code error code null 
Throws an appropriate exception based on the passed in error code The code throwable code argument should be either null or the throwable which caused SWT to throw an exception p In SWT errors are reported by throwing one of three exceptions dl dd java lang Illegal Argument Exception dd dt thrown whenever one of the API methods is invoked with an illegal argument dt dd org eclipse swt SWT Exception extends java lang Runtime Exception dd dt thrown whenever a recoverable error happens internally in SWT dt dd org eclipse swt SWT Error extends java lang Error dd dt thrown whenever a b non recoverable b error happens internally in SWT dt dl This method provides the logic which maps between error codes and one of the above exceptions p param code the SWT error code param throwable the exception which caused the error to occur see SWT Error see SWT Exception see Illegal Argument Exception public static void error int code Throwable throwable error code throwable null  IllegalArgumentException SWTException RuntimeException SWTError SWTError SWTException IllegalArgumentException
Throws an appropriate exception based on the passed in error code The code throwable code argument should be either null or the throwable which caused SWT to throw an exception p In SWT errors are reported by throwing one of three exceptions dl dd java lang Illegal Argument Exception dd dt thrown whenever one of the API methods is invoked with an illegal argument dt dd org eclipse swt SWT Exception extends java lang Runtime Exception dd dt thrown whenever a recoverable error happens internally in SWT dt dd org eclipse swt SWT Error extends java lang Error dd dt thrown whenever a b non recoverable b error happens internally in SWT dt dl This method provides the logic which maps between error codes and one of the above exceptions p param code the SWT error code param throwable the exception which caused the error to occur param detail more information about error see SWT Error see SWT Exception see Illegal Argument Exception since 3 0 public static void error int code Throwable throwable String detail This code prevents the creation of chains of SWT Errors and SWT Exceptions which in turn contain other SWT Errors and SWT Exceptions as their throwable This can occur when low level code throws an exception past a point where a higher layer is being safe and catching all exceptions Note that this is  a bad thing  which we always try to avoid On the theory that the low level code is closest to the original problem we simply re throw the original exception here if throwable instanceof SWT Error throw SWT Error throwable if throwable instanceof SWT Exception throw SWT Exception throwable String message find Error Text code if detail null message detail switch code Illegal Arguments non fatal case ERROR NULL ARGUMENT case ERROR CANNOT BE ZERO case ERROR INVALID ARGUMENT case ERROR MENU NOT BAR case ERROR MENU NOT DROP DOWN case ERROR MENU NOT POP UP case ERROR MENUITEM NOT CASCADE case ERROR INVALID PARENT case ERROR INVALID RANGE throw new Illegal Argument Exception message SWT Errors non fatal case ERROR INVALID SUBCLASS case ERROR THREAD INVALID ACCESS case ERROR WIDGET DISPOSED case ERROR GRAPHIC DISPOSED case ERROR DEVICE DISPOSED case ERROR INVALID IMAGE case ERROR UNSUPPORTED DEPTH case ERROR UNSUPPORTED FORMAT case ERROR FAILED EXEC case ERROR IO SWT Exception exception new SWT Exception code message exception throwable throwable throw exception OS Failure Limit fatal may occur only on some platforms case ERROR CANNOT GET COUNT case ERROR CANNOT GET ENABLED case ERROR CANNOT GET ITEM case ERROR CANNOT GET ITEM HEIGHT case ERROR CANNOT GET SELECTION case ERROR CANNOT GET TEXT case ERROR CANNOT SET ENABLED case ERROR CANNOT SET MENU case ERROR CANNOT SET SELECTION case ERROR CANNOT SET TEXT case ERROR ITEM NOT ADDED case ERROR ITEM NOT REMOVED case ERROR NO HANDLES FALL THROUGH SWT Failure Limit fatal may occur only on some platforms case ERROR FAILED LOAD LIBRARY case ERROR NO MORE CALLBACKS case ERROR NOT IMPLEMENTED case ERROR UNSPECIFIED SWT Error error new SWT Error code message error throwable throwable throw error Unknown Undefined Error SWT Error error new SWT Error code message error throwable throwable throw error  IllegalArgumentException SWTException RuntimeException SWTError SWTError SWTException IllegalArgumentException SWTErrors SWTExceptions SWTErrors SWTExceptions _a_bad_thing_ SWTError SWTError SWTException SWTException findErrorText ERROR_NULL_ARGUMENT ERROR_CANNOT_BE_ZERO ERROR_INVALID_ARGUMENT ERROR_MENU_NOT_BAR ERROR_MENU_NOT_DROP_DOWN ERROR_MENU_NOT_POP_UP ERROR_MENUITEM_NOT_CASCADE ERROR_INVALID_PARENT ERROR_INVALID_RANGE IllegalArgumentException ERROR_INVALID_SUBCLASS ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED ERROR_GRAPHIC_DISPOSED ERROR_DEVICE_DISPOSED ERROR_INVALID_IMAGE ERROR_UNSUPPORTED_DEPTH ERROR_UNSUPPORTED_FORMAT ERROR_FAILED_EXEC ERROR_IO SWTException SWTException ERROR_CANNOT_GET_COUNT ERROR_CANNOT_GET_ENABLED ERROR_CANNOT_GET_ITEM ERROR_CANNOT_GET_ITEM_HEIGHT ERROR_CANNOT_GET_SELECTION ERROR_CANNOT_GET_TEXT ERROR_CANNOT_SET_ENABLED ERROR_CANNOT_SET_MENU ERROR_CANNOT_SET_SELECTION ERROR_CANNOT_SET_TEXT ERROR_ITEM_NOT_ADDED ERROR_ITEM_NOT_REMOVED ERROR_NO_HANDLES ERROR_FAILED_LOAD_LIBRARY ERROR_NO_MORE_CALLBACKS ERROR_NOT_IMPLEMENTED ERROR_UNSPECIFIED SWTError SWTError SWTError SWTError

Constructs a new instance of this class with its stack trace filled in The error code is set to an unspecified value public SWT Error this SWT ERROR UNSPECIFIED  SWTError ERROR_UNSPECIFIED
Constructs a new instance of this class with its stack trace and message filled in The error code is set to an unspecified value param message the detail message for the exception public SWT Error String message this SWT ERROR UNSPECIFIED message  SWTError ERROR_UNSPECIFIED
Constructs a new instance of this class with its stack trace and error code filled in param code the SWT error code public SWT Error int code this code SWT find Error Text code  SWTError findErrorText
Constructs a new instance of this class with its stack trace error code and message filled in param code the SWT error code param message the detail message for the exception public SWT Error int code String message super message this code code  SWTError
Returns the string describing this SWT Error object p It is combined with the message string of the Throwable which caused this SWT Error if this information is available p return the error message string of this SWT Error object public String get Message if throwable null return super get Message else return super get Message throwable to String NON NLS 1 NON NLS 2  SWTError SWTError SWTError getMessage getMessage getMessage toString
Outputs a printable representation of this error s stack trace on the standard error stream p Note print Stack Trace Print Stream and print Stack Trace Print Writer are not provided in order to maintain compatibility with CLDC p public synchronized void print Stack Trace super print Stack Trace if throwable null System err println Stack trace of contained error NON NLS 1 throwable print Stack Trace  printStackTrace PrintStream printStackTrace PrintWriter printStackTrace printStackTrace printStackTrace

Constructs a new instance of this class with its stack trace filled in The error code is set to an unspecified value public SWT Exception this SWT ERROR UNSPECIFIED  SWTException ERROR_UNSPECIFIED
Constructs a new instance of this class with its stack trace and message filled in The error code is set to an unspecified value param message the detail message for the exception public SWT Exception String message this SWT ERROR UNSPECIFIED message  SWTException ERROR_UNSPECIFIED
Constructs a new instance of this class with its stack trace and error code filled in param code the SWT error code public SWT Exception int code this code SWT find Error Text code  SWTException findErrorText
Constructs a new instance of this class with its stack trace error code and message filled in param code the SWT error code param message the detail message for the exception public SWT Exception int code String message super message this code code  SWTException
Returns the string describing this SWT Exception object p It is combined with the message string of the Throwable which caused this SWT Exception if this information is available p return the error message string of this SWT Exception object public String get Message if throwable null return super get Message else return super get Message throwable to String NON NLS 1 NON NLS 2  SWTException SWTException SWTException getMessage getMessage getMessage toString
Outputs a printable representation of this exception s stack trace on the standard error stream p Note print Stack Trace Print Stream and print Stack Trace Print Writer are not provided in order to maintain compatibility with CLDC p public void print Stack Trace super print Stack Trace if throwable null System err println Stack trace of contained exception NON NLS 1 throwable print Stack Trace  printStackTrace PrintStream printStackTrace PrintWriter printStackTrace printStackTrace printStackTrace

Constructs a new instance of this class given only its parent param parent a shell which will be the parent of the new instance exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul public Dialog Shell parent this parent SWT PRIMARY MODAL  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS PRIMARY_MODAL
Constructs a new instance of this class 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 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 param parent a shell which will be the parent of the new instance exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul public Dialog Shell parent int style check Parent parent this parent parent this style style title  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS checkParent
Checks that this class can be subclassed p IMPORTANT See the comment in code Widget check Subclass code p exception SWT Exception ul li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see Widget check Subclass protected void check Subclass if Display is Valid Class get Class error SWT ERROR INVALID SUBCLASS  checkSubclass SWTException ERROR_INVALID_SUBCLASS checkSubclass checkSubclass isValidClass getClass ERROR_INVALID_SUBCLASS
Throws an exception if the specified widget can not be used as a parent for the receiver exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li li ERROR INVALID ARGUMENT if the parent is disposed li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul void check Parent Shell parent if parent null error SWT ERROR NULL ARGUMENT parent check Widget  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS checkParent ERROR_NULL_ARGUMENT checkWidget
Does whatever dialog specific cleanup is required and then uses the code in code SWT Error error code to handle the error param code the descriptive error code see SWT Error error void error int code SWT error code  SWTError SWTError
Returns the receiver s parent which must be a code Shell code or null return the receiver s parent 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 Shell get Parent return parent  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getParent
Returns the receiver s style information p Note that the value which is returned by this method em may not match em the value which was provided to the constructor when the receiver was created p return the style bits 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 int get Style return style  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getStyle
Returns the receiver s text which is the string that the window manager will typically display as the receiver s em title em If the text has not previously been set returns an empty string return the text 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 String get Text return title  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getText
Sets the receiver s text which is the string that the window manager will typically display as the receiver s em title em to the argument which must not be null param text the new text exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the text is null li ul 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 set Text String string if string null error SWT ERROR NULL ARGUMENT title string  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setText ERROR_NULL_ARGUMENT

Gets the bounds p return a rectangle that is the bounds public Rectangle get Bounds return new Rectangle x y width height  getBounds
Sets the bounds p param x the new x position param y the new y position param width the new width param height the new height public void set Bounds Rectangle rect this x rect x this y rect y this width rect width this height rect height  setBounds
Returns a string representation of the object return a string representation of the object public String to String return Event type type widget widget x x y y width width height height NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 NON NLS 6 NON NLS 7  toString

public void hook int event Type Listener listener if types null types new int 4 if listeners null listeners new Listener 4 int length types length index length 1 while index 0 if types index 0 break index index if index length if level 0 index 0 for int i 0 i types length i if types i 0 types index types i listeners index listeners i index for int i index i types length i types i 0 listeners i null if index length int new Types new int length 4 System arraycopy types 0 new Types 0 length types new Types Listener new Listeners new Listener length 4 System arraycopy listeners 0 new Listeners 0 length listeners new Listeners types index event Type listeners index listener  eventType newTypes newTypes newTypes newListeners newListeners newListeners eventType
public boolean hooks int event Type if types null return false for int i 0 i types length i if types i event Type return true return false  eventType eventType
public void send Event Event event if types null return level try for int i 0 i types length i if event type SWT None return if types i event type Listener listener listeners i if listener null listener handle Event event finally level  sendEvent handleEvent
public int size if types null return 0 int count 0 for int i 0 i types length i if types i 0 count return count 
void remove int index if level 0 int end types length 1 System arraycopy types index 1 types index end index System arraycopy listeners index 1 listeners index end index index end types index 0 listeners index null 
public void unhook int event Type Listener listener if types null return for int i 0 i types length i if types i event Type listeners i listener remove i return  eventType eventType
public void unhook int event Type SWT Event Listener listener if types null return for int i 0 i types length i if types i event Type if listeners i instanceof Typed Listener Typed Listener typed Listener Typed Listener listeners i if typed Listener get Event Listener listener remove i return  eventType SWTEventListener eventType TypedListener TypedListener typedListener TypedListener typedListener getEventListener

Constructs a new instance of this class given its parent and a style value describing its behavior and appearance The item is added to the end of the items maintained by its parent p The style value is either one of the style constants defined in 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 widget which will be the parent of the new instance cannot be null param style the style of item to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT see get Style public Item Widget parent int style super parent style text  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance and the index at which to place it in the items maintained by its parent p The style value is either one of the style constants defined in 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 widget which will be the parent of the new instance cannot be null param style the style of item to construct param index the index at which to store the receiver in its parent exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT see get Style public Item Widget parent int style int index this parent style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle
protected void check Subclass Do Nothing Subclassing is allowed  checkSubclass
Returns the receiver s image if it has one or null if it does not return the receiver s image 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 Image get Image check Widget return image  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getImage checkWidget
String get Name Text return get Text  getNameText getText
Returns the receiver s text which will be an empty string if it has never been set return the receiver s text 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 String get Text check Widget return text  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getText checkWidget
void release Widget super release Widget text null image null  releaseWidget releaseWidget
Sets the receiver s image to the argument which may be null indicating that no image should be displayed param image the image to display on the receiver may be null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the image has been disposed li ul 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 set Image Image image check Widget if image null image is Disposed error SWT ERROR INVALID ARGUMENT this image image  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setImage checkWidget isDisposed ERROR_INVALID_ARGUMENT
Sets the receiver s text param string the new text exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the text is null li ul 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 set Text String string check Widget if string null error SWT ERROR NULL ARGUMENT text string  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setText checkWidget ERROR_NULL_ARGUMENT

Computes and returns the size of the specified composite s client area according to this layout p This method computes the minimum size that the client area of the composite must be in order to position all children at their minimum size inside the composite according to the layout algorithm encoded by this layout p p When a width or height hint is supplied it is used to constrain the result For example if a width hint is provided that is less than the minimum width of the client area the layout may choose to wrap and increase height clip overlap or otherwise constrain the children p param composite a composite widget using this layout param w Hint width code SWT DEFAULT code for minimum param h Hint height code SWT DEFAULT code for minimum param flush Cache code true code means flush cached layout values return a point containing the computed size width height see layout see Control get Border Width see Control get Bounds see Control get Size see Control pack see compute Trim get Client Area for controls that implement them  wHint hHint flushCache getBorderWidth getBounds getSize computeTrim getClientArea
Lays out the children of the specified composite according to this layout p This method positions and sizes the children of a composite using the layout algorithm encoded by this layout Children of the composite are positioned in the client area of the composite The position of the composite is not altered by this method p p When the flush cache hint is true the layout is instructed to flush any cached values associated with the children Typically a layout will cache the preferred sizes of the children to avoid the expense of computing these values each time the widget is layed out p p When layout is triggered explicitly by the programmer the flush cache hint is true When layout is triggered by a resize either caused by the programmer or by the user the hint is false p param composite a composite widget using this layout param flush Cache code true code means flush cached layout values  flushCache

Sent when an event that the receiver has registered for occurs param event the event which occurred 

Prevents uninitialized instances from being created outside the package Monitor 
public boolean equals Object object if object this return true if object instanceof Monitor return false Monitor monitor Monitor object return handle monitor handle 
Returns a rectangle describing the receiver s size and location relative to its device return the receiver s bounding rectangle public Rectangle get Bounds return new Rectangle x y width height  getBounds
Returns a rectangle which describes the area of the receiver which is capable of displaying data return the client area public Rectangle get Client Area return new Rectangle clientX clientY client Width client Height  getClientArea clientWidth clientHeight
public int hash Code return handle  hashCode

Throwable throwable Runnable Lock Runnable runnable this runnable runnable  RunnableLock
boolean done return runnable null throwable null 
void run if runnable null runnable run runnable null 

Thread sync Thread public Synchronizer Display display this display display  syncThread
void add Last Runnable Lock lock synchronized message Lock if messages null messages new Runnable Lock 4 if message Count messages length Runnable Lock new Messages new Runnable Lock message Count 4 System arraycopy messages 0 new Messages 0 message Count messages new Messages messages message Count lock if message Count 1 display wake Thread  addLast RunnableLock messageLock RunnableLock messageCount RunnableLock newMessages RunnableLock messageCount newMessages messageCount newMessages messageCount messageCount wakeThread
Causes the code run code method of the runnable to be invoked by the user interface thread at the next reasonable opportunity The caller of this method continues to run in parallel and is not notified when the runnable has completed param runnable code to run on the user interface thread see sync Exec protected void async Exec Runnable runnable if runnable null display wake return add Last new Runnable Lock runnable  syncExec asyncExec addLast RunnableLock
int get Message Count return message Count  getMessageCount messageCount
void release Synchronizer display null messages null message Lock null sync Thread null  releaseSynchronizer messageLock syncThread
Runnable Lock remove First synchronized message Lock if message Count 0 return null Runnable Lock lock messages 0 System arraycopy messages 1 messages 0 message Count messages message Count null if message Count 0 messages null return lock  RunnableLock removeFirst messageLock messageCount RunnableLock messageCount messageCount messageCount
boolean run Async Messages if message Count 0 return false Runnable Lock lock remove First if lock null return true synchronized lock sync Thread lock thread try lock run catch Throwable t lock throwable t SWT error SWT ERROR FAILED EXEC t finally sync Thread null lock notify All return true  runAsyncMessages messageCount RunnableLock removeFirst syncThread ERROR_FAILED_EXEC syncThread notifyAll
Causes the code run code method of the runnable to be invoked by the user interface thread at the next reasonable opportunity The thread which calls this method is suspended until the runnable completes param runnable code to run on the user interface thread exception SWT Exception ul li ERROR FAILED EXEC if an exception occured when executing the runnable li ul see async Exec protected void sync Exec Runnable runnable if display is Valid Thread if runnable null runnable run return if runnable null display wake return Runnable Lock lock new Runnable Lock runnable Only remember the sync Thread for sync Exec lock thread Thread current Thread synchronized lock add Last lock boolean interrupted false while lock done try lock wait catch Interrupted Exception e interrupted true if interrupted Compatibility interrupt if lock throwable null SWT error SWT ERROR FAILED EXEC lock throwable  SWTException ERROR_FAILED_EXEC asyncExec syncExec isValidThread RunnableLock RunnableLock syncThread syncExec currentThread addLast InterruptedException ERROR_FAILED_EXEC

Tray Display display int style if display null display Display get Current if display null display Display get Default if display is Valid Thread error SWT ERROR THREAD INVALID ACCESS this display display  getCurrent getDefault isValidThread ERROR_THREAD_INVALID_ACCESS
void create Item Tray Item item int index if 0 index index item Count error SWT ERROR INVALID RANGE if item Count items length Tray Item new Items new Tray Item items length 4 System arraycopy items 0 new Items 0 items length items new Items System arraycopy items index items index 1 item Count index items index item  createItem TrayItem itemCount ERROR_INVALID_RANGE itemCount TrayItem newItems TrayItem newItems newItems itemCount
void destroy Item Tray Item item int index 0 while index item Count if items index item break index if index item Count return System arraycopy items index 1 items index item Count index items item Count null  destroyItem TrayItem itemCount itemCount itemCount itemCount
Returns the item at the given zero relative index in the receiver Throws an exception if the index is out of range param index the index of the item to return return the item at the given index exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li ul 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 Tray Item get Item int index check Widget if 0 index index item Count error SWT ERROR INVALID RANGE return items index  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TrayItem getItem checkWidget itemCount ERROR_INVALID_RANGE
Returns the number of items contained in the receiver return the number of items 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 int get Item Count check Widget return item Count  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getItemCount checkWidget itemCount
Returns an array of code Tray Item code s which are the items in the receiver p Note This is not the actual structure used by the receiver to maintain its list of items so modifying the array will not affect the receiver p return the items in the receiver 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 Tray Item get Items check Widget Tray Item result new Tray Item item Count System arraycopy items 0 result 0 result length return result  TrayItem SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TrayItem getItems checkWidget TrayItem TrayItem itemCount
void release Child super release Child if display tray this display tray null  releaseChild releaseChild
void release Widget for int i 0 i items length i Tray Item item items i if item null item is Disposed item release Resources items null super release Widget  releaseWidget TrayItem isDisposed releaseResources releaseWidget

Constructs a new instance of this class for the given event listener p b IMPORTANT b This method is em not em part of the SWT public API It is marked public only so that it can be shared within the packages provided by SWT It should never be referenced from application code p param listener the event listener to store in the receiver public Typed Listener SWT Event Listener listener event Listener listener  TypedListener SWTEventListener eventListener
Returns the receiver s event listener p b IMPORTANT b This method is em not em part of the SWT public API It is marked public only so that it can be shared within the packages provided by SWT It should never be referenced from application code p return the receiver s event listener public SWT Event Listener get Event Listener return event Listener  SWTEventListener getEventListener eventListener
Handles the given event p b IMPORTANT b This method is em not em part of the SWT public API It is marked public only so that it can be shared within the packages provided by SWT It should never be referenced from application code p public void handle Event Event e switch e type case SWT Paint Field set by Control Paint Event event new Paint Event e Paint Listener event Listener paint Control event e gc event gc break case SWT Selection Fields set by Sash Selection Event event new Selection Event e Selection Listener event Listener widget Selected event e x event x e y event y e doit event doit break case SWT Default Selection Selection Listener event Listener widget Default Selected new Selection Event e break case SWT Dispose Dispose Listener event Listener widget Disposed new Dispose Event e break case SWT Focus In Focus Listener event Listener focus Gained new Focus Event e break case SWT Focus Out Focus Listener event Listener focus Lost new Focus Event e break case SWT Hide Menu Listener event Listener menu Hidden new Menu Event e break case SWT Show Menu Listener event Listener menu Shown new Menu Event e break case SWT Key Down Key Event event new Key Event e Key Listener event Listener key Pressed event e doit event doit break case SWT Key Up Key Event event new Key Event e Key Listener event Listener key Released event e doit event doit break case SWT Mouse Down Mouse Listener event Listener mouse Down new Mouse Event e break case SWT Mouse Up Mouse Listener event Listener mouse Up new Mouse Event e break case SWT Mouse Double Click Mouse Listener event Listener mouse Double Click new Mouse Event e break case SWT Mouse Move Mouse Move Listener event Listener mouse Move new Mouse Event e return case SWT Resize Control Listener event Listener control Resized new Control Event e break case SWT Move Control Listener event Listener control Moved new Control Event e break case SWT Close Fields set by Decorations Shell Event event new Shell Event e Shell Listener event Listener shell Closed event e doit event doit break case SWT Activate Shell Listener event Listener shell Activated new Shell Event e break case SWT Deactivate Shell Listener event Listener shell Deactivated new Shell Event e break case SWT Iconify Shell Listener event Listener shell Iconified new Shell Event e break case SWT Deiconify Shell Listener event Listener shell Deiconified new Shell Event e break case SWT Expand Tree Listener event Listener tree Expanded new Tree Event e break case SWT Collapse Tree Listener event Listener tree Collapsed new Tree Event e break case SWT Modify Modify Listener event Listener modify Text new Modify Event e break case SWT Verify Fields set by Text Rich Text Verify Event event new Verify Event e Verify Listener event Listener verify Text event e text event text e doit event doit break case SWT Help Help Listener event Listener help Requested new Help Event e break case SWT Arm Arm Listener event Listener widget Armed new Arm Event e break case SWT Mouse Exit Mouse Track Listener event Listener mouse Exit new Mouse Event e break case SWT Mouse Enter Mouse Track Listener event Listener mouse Enter new Mouse Event e break case SWT Mouse Hover Mouse Track Listener event Listener mouse Hover new Mouse Event e break case SWT Traverse Fields set by Control Traverse Event event new Traverse Event e Traverse Listener event Listener key Traversed event e detail event detail e doit event doit break  handleEvent PaintEvent PaintEvent PaintListener eventListener paintControl SelectionEvent SelectionEvent SelectionListener eventListener widgetSelected DefaultSelection SelectionListener eventListener widgetDefaultSelected SelectionEvent DisposeListener eventListener widgetDisposed DisposeEvent FocusIn FocusListener eventListener focusGained FocusEvent FocusOut FocusListener eventListener focusLost FocusEvent MenuListener eventListener menuHidden MenuEvent MenuListener eventListener menuShown MenuEvent KeyDown KeyEvent KeyEvent KeyListener eventListener keyPressed KeyUp KeyEvent KeyEvent KeyListener eventListener keyReleased MouseDown MouseListener eventListener mouseDown MouseEvent MouseUp MouseListener eventListener mouseUp MouseEvent MouseDoubleClick MouseListener eventListener mouseDoubleClick MouseEvent MouseMove MouseMoveListener eventListener mouseMove MouseEvent ControlListener eventListener controlResized ControlEvent ControlListener eventListener controlMoved ControlEvent ShellEvent ShellEvent ShellListener eventListener shellClosed ShellListener eventListener shellActivated ShellEvent ShellListener eventListener shellDeactivated ShellEvent ShellListener eventListener shellIconified ShellEvent ShellListener eventListener shellDeiconified ShellEvent TreeListener eventListener treeExpanded TreeEvent TreeListener eventListener treeCollapsed TreeEvent ModifyListener eventListener modifyText ModifyEvent RichText VerifyEvent VerifyEvent VerifyListener eventListener verifyText HelpListener eventListener helpRequested HelpEvent ArmListener eventListener widgetArmed ArmEvent MouseExit MouseTrackListener eventListener mouseExit MouseEvent MouseEnter MouseTrackListener eventListener mouseEnter MouseEvent MouseHover MouseTrackListener eventListener mouseHover MouseEvent TraverseEvent TraverseEvent TraverseListener eventListener keyTraversed

public class Absent Information Exception extends Exception public Absent Information Exception  AbsentInformationException AbsentInformationException
public class Absent Information Exception extends Exception public Absent Information Exception public Absent Information Exception String arg1 super arg1  AbsentInformationException AbsentInformationException AbsentInformationException

public interface Accessible public boolean is Package Private  isPackagePrivate
public interface Accessible public boolean is Package Private public boolean is Private  isPackagePrivate isPrivate
public boolean is Package Private public boolean is Private public boolean is Protected  isPackagePrivate isPrivate isProtected
public boolean is Private public boolean is Protected public boolean is Public  isPrivate isProtected isPublic

public interface Array Reference extends Object Reference public Value get Value int arg1  ArrayReference ObjectReference getValue
public interface Array Reference extends Object Reference public Value get Value int arg1 public List get Values  ArrayReference ObjectReference getValue getValues
public Value get Value int arg1 public List get Values public List get Values int arg1 int arg2  getValue getValues getValues
public List get Values public List get Values int arg1 int arg2 public int length  getValues getValues
public List get Values int arg1 int arg2 public int length public void set Value int arg1 Value arg2 throws Invalid Type Exception Class Not Loaded Exception  getValues setValue InvalidTypeException ClassNotLoadedException
public int length public void set Value int arg1 Value arg2 throws Invalid Type Exception Class Not Loaded Exception public void set Values int arg1 List arg2 int arg3 int arg4 throws Invalid Type Exception Class Not Loaded Exception  setValue InvalidTypeException ClassNotLoadedException setValues InvalidTypeException ClassNotLoadedException
public void set Value int arg1 Value arg2 throws Invalid Type Exception Class Not Loaded Exception public void set Values int arg1 List arg2 int arg3 int arg4 throws Invalid Type Exception Class Not Loaded Exception public void set Values List arg1 throws Invalid Type Exception Class Not Loaded Exception  setValue InvalidTypeException ClassNotLoadedException setValues InvalidTypeException ClassNotLoadedException setValues InvalidTypeException ClassNotLoadedException

public interface Array Type extends Reference Type public String component Signature  ArrayType ReferenceType componentSignature
public interface Array Type extends Reference Type public String component Signature public Type component Type throws Class Not Loaded Exception  ArrayType ReferenceType componentSignature componentType ClassNotLoadedException
public String component Signature public Type component Type throws Class Not Loaded Exception public String component Type Name  componentSignature componentType ClassNotLoadedException componentTypeName
public Type component Type throws Class Not Loaded Exception public String component Type Name public Array Reference new Instance int arg1  componentType ClassNotLoadedException componentTypeName ArrayReference newInstance

public interface Boolean Value extends Primitive Value public boolean equals Object arg1  BooleanValue PrimitiveValue
public interface Boolean Value extends Primitive Value public boolean equals Object arg1 public int hash Code  BooleanValue PrimitiveValue hashCode
public boolean equals Object arg1 public int hash Code public boolean value  hashCode

public class Bootstrap public Virtual Machine Manager virtual Machine Manager return null  VirtualMachineManager virtualMachineManager

public interface Byte Value extends Primitive Value Comparable public boolean equals Object arg1  ByteValue PrimitiveValue
public interface Byte Value extends Primitive Value Comparable public boolean equals Object arg1 public int hash Code  ByteValue PrimitiveValue hashCode
public boolean equals Object arg1 public int hash Code public byte value  hashCode

public interface Char Value extends Primitive Value Comparable public boolean equals Object arg1  CharValue PrimitiveValue
public interface Char Value extends Primitive Value Comparable public boolean equals Object arg1 public int hash Code  CharValue PrimitiveValue hashCode
public boolean equals Object arg1 public int hash Code public char value  hashCode

public interface Class Loader Reference extends Object Reference public List defined Classes  ClassLoaderReference ObjectReference definedClasses
public interface Class Loader Reference extends Object Reference public List defined Classes public List visible Classes  ClassLoaderReference ObjectReference definedClasses visibleClasses

public class Class Not Loaded Exception extends Exception public Class Not Loaded Exception String class Name name class Name  ClassNotLoadedException ClassNotLoadedException className className
public Class Not Loaded Exception String class Name String msg super msg name class Name  ClassNotLoadedException className className
public String class Name return name  className

public class Class Not Prepared Exception extends Runtime Exception public Class Not Prepared Exception  ClassNotPreparedException RuntimeException ClassNotPreparedException
public class Class Not Prepared Exception extends Runtime Exception public Class Not Prepared Exception public Class Not Prepared Exception String arg1 super arg1  ClassNotPreparedException RuntimeException ClassNotPreparedException ClassNotPreparedException

public abstract interface Class Object Reference extends Object Reference public abstract Reference Type reflected Type  ClassObjectReference ObjectReference ReferenceType reflectedType

public interface Class Type extends Reference Type public static final int INVOKE SINGLE THREADED 1 public List all Interfaces  ClassType ReferenceType INVOKE_SINGLE_THREADED allInterfaces
public static final int INVOKE SINGLE THREADED 1 public List all Interfaces public Method concrete Method By Name String arg1 String arg2  INVOKE_SINGLE_THREADED allInterfaces concreteMethodByName
public List all Interfaces public Method concrete Method By Name String arg1 String arg2 public List interfaces  allInterfaces concreteMethodByName
public Method concrete Method By Name String arg1 String arg2 public List interfaces public Value invoke Method Thread Reference arg1 Method arg2 List arg3 int arg4 throws Invalid Type Exception Class Not Loaded Exception Incompatible Thread State Exception Invocation Exception  concreteMethodByName invokeMethod ThreadReference InvalidTypeException ClassNotLoadedException IncompatibleThreadStateException InvocationException
public List interfaces public Value invoke Method Thread Reference arg1 Method arg2 List arg3 int arg4 throws Invalid Type Exception Class Not Loaded Exception Incompatible Thread State Exception Invocation Exception public boolean is Enum  invokeMethod ThreadReference InvalidTypeException ClassNotLoadedException IncompatibleThreadStateException InvocationException isEnum
public Value invoke Method Thread Reference arg1 Method arg2 List arg3 int arg4 throws Invalid Type Exception Class Not Loaded Exception Incompatible Thread State Exception Invocation Exception public boolean is Enum public Object Reference new Instance Thread Reference arg1 Method arg2 List arg3 int arg4 throws Invalid Type Exception Class Not Loaded Exception Incompatible Thread State Exception Invocation Exception  invokeMethod ThreadReference InvalidTypeException ClassNotLoadedException IncompatibleThreadStateException InvocationException isEnum ObjectReference newInstance ThreadReference InvalidTypeException ClassNotLoadedException IncompatibleThreadStateException InvocationException
public boolean is Enum public Object Reference new Instance Thread Reference arg1 Method arg2 List arg3 int arg4 throws Invalid Type Exception Class Not Loaded Exception Incompatible Thread State Exception Invocation Exception public void set Value Field arg1 Value arg2 throws Invalid Type Exception Class Not Loaded Exception  isEnum ObjectReference newInstance ThreadReference InvalidTypeException ClassNotLoadedException IncompatibleThreadStateException InvocationException setValue InvalidTypeException ClassNotLoadedException
public Object Reference new Instance Thread Reference arg1 Method arg2 List arg3 int arg4 throws Invalid Type Exception Class Not Loaded Exception Incompatible Thread State Exception Invocation Exception public void set Value Field arg1 Value arg2 throws Invalid Type Exception Class Not Loaded Exception public List subclasses  ObjectReference newInstance ThreadReference InvalidTypeException ClassNotLoadedException IncompatibleThreadStateException InvocationException setValue InvalidTypeException ClassNotLoadedException
public void set Value Field arg1 Value arg2 throws Invalid Type Exception Class Not Loaded Exception public List subclasses public Class Type superclass  setValue InvalidTypeException ClassNotLoadedException ClassType

public interface Attaching Connector extends Connector public Virtual Machine attach Map arg1 throws IO Exception Illegal Connector Arguments Exception  AttachingConnector VirtualMachine IOException IllegalConnectorArgumentsException

public interface Connector public Map default Arguments  defaultArguments
public interface Connector public Map default Arguments public Transport transport  defaultArguments
public Map default Arguments public Transport transport public String name  defaultArguments
public Transport transport public String name public String description 
public interface Argument extends Serializable public String name 
public interface Argument extends Serializable public String name public String label 
public String name public String label public String description 
public String label public String description public boolean is Valid String arg1  isValid
public String description public boolean is Valid String arg1 public String value  isValid
public boolean is Valid String arg1 public String value public void set Value String arg1  isValid setValue
public String value public void set Value String arg1 public boolean must Specify  setValue mustSpecify
public interface Integer Argument extends Connector Argument public void set Value int arg1  IntegerArgument setValue
public interface Integer Argument extends Connector Argument public void set Value int arg1 public boolean is Valid int arg1  IntegerArgument setValue isValid
public void set Value int arg1 public boolean is Valid int arg1 public String string Value Of int arg1  setValue isValid stringValueOf
public boolean is Valid int arg1 public String string Value Of int arg1 public int int Value  isValid stringValueOf intValue
public String string Value Of int arg1 public int int Value public int max  stringValueOf intValue
public int int Value public int max public int min  intValue
public interface Boolean Argument extends Connector Argument public void set Value boolean arg1  BooleanArgument setValue
public interface Boolean Argument extends Connector Argument public void set Value boolean arg1 public boolean is Valid String arg1  BooleanArgument setValue isValid
public void set Value boolean arg1 public boolean is Valid String arg1 public String string Value Of boolean arg1  setValue isValid stringValueOf
public boolean is Valid String arg1 public String string Value Of boolean arg1 public boolean boolean Value  isValid stringValueOf booleanValue
public interface Selected Argument extends Connector Argument public List choices  SelectedArgument
public interface Selected Argument extends Connector Argument public List choices public boolean is Valid String arg1  SelectedArgument isValid

List f Names public Illegal Connector Arguments Exception String message List arg Names super message f Names arg Names  fNames IllegalConnectorArgumentsException argNames fNames argNames
public Illegal Connector Arguments Exception String message String arg Name super message f Names new Array List 1 f Names add arg Name  IllegalConnectorArgumentsException argName fNames ArrayList fNames argName
public List argument Names return f Names  argumentNames fNames

public interface Launching Connector extends Connector public Virtual Machine launch java util Map arg1 throws IO Exception Illegal Connector Arguments Exception VM Start Exception  LaunchingConnector VirtualMachine IOException IllegalConnectorArgumentsException VMStartException

public interface Listening Connector extends Connector public Virtual Machine accept Map arg1 throws IO Exception Illegal Connector Arguments Exception  ListeningConnector VirtualMachine IOException IllegalConnectorArgumentsException
public interface Listening Connector extends Connector public Virtual Machine accept Map arg1 throws IO Exception Illegal Connector Arguments Exception public String start Listening Map arg1 throws IO Exception Illegal Connector Arguments Exception  ListeningConnector VirtualMachine IOException IllegalConnectorArgumentsException startListening IOException IllegalConnectorArgumentsException
public Virtual Machine accept Map arg1 throws IO Exception Illegal Connector Arguments Exception public String start Listening Map arg1 throws IO Exception Illegal Connector Arguments Exception public void stop Listening Map arg1 throws IO Exception Illegal Connector Arguments Exception  VirtualMachine IOException IllegalConnectorArgumentsException startListening IOException IllegalConnectorArgumentsException stopListening IOException IllegalConnectorArgumentsException
public String start Listening Map arg1 throws IO Exception Illegal Connector Arguments Exception public void stop Listening Map arg1 throws IO Exception Illegal Connector Arguments Exception public boolean supports Multiple Connections throws IO Exception Illegal Connector Arguments Exception  startListening IOException IllegalConnectorArgumentsException stopListening IOException IllegalConnectorArgumentsException supportsMultipleConnections IOException IllegalConnectorArgumentsException

public class Closed Connection Exception extends IO Exception public Closed Connection Exception  ClosedConnectionException IOException ClosedConnectionException
public Closed Connection Exception public Closed Connection Exception String arg1 super arg1  ClosedConnectionException ClosedConnectionException

public abstract class Connection public abstract void close throws IO Exception  IOException
public abstract class Connection public abstract void close throws IO Exception public abstract boolean is Open  IOException isOpen
public abstract void close throws IO Exception public abstract boolean is Open public abstract byte read Packet throws IO Exception  IOException isOpen readPacket IOException
public abstract boolean is Open public abstract byte read Packet throws IO Exception public abstract void write Packet byte arg1 throws IO Exception  isOpen readPacket IOException writePacket IOException

public abstract class Transport Service public abstract static class Capabilities public abstract boolean supports Accept Timeout  TransportService supportsAcceptTimeout
public abstract static class Capabilities public abstract boolean supports Accept Timeout public abstract boolean supports Attach Timeout  supportsAcceptTimeout supportsAttachTimeout
public abstract boolean supports Accept Timeout public abstract boolean supports Attach Timeout public abstract boolean supports Handshake Timeout  supportsAcceptTimeout supportsAttachTimeout supportsHandshakeTimeout
public abstract boolean supports Attach Timeout public abstract boolean supports Handshake Timeout public abstract boolean supports Multiple Connections  supportsAttachTimeout supportsHandshakeTimeout supportsMultipleConnections
public abstract static class Listen Key public abstract String address  ListenKey
public abstract String address public abstract Connection accept Transport Service Listen Key arg1 long arg2 long arg3 throws IO Exception  TransportService ListenKey IOException
public abstract Connection accept Transport Service Listen Key arg1 long arg2 long arg3 throws IO Exception public abstract Connection attach String arg1 long arg2 long arg3 throws IO Exception  TransportService ListenKey IOException IOException
public abstract Connection accept Transport Service Listen Key arg1 long arg2 long arg3 throws IO Exception public abstract Connection attach String arg1 long arg2 long arg3 throws IO Exception public abstract Transport Service Capabilities capabilities  TransportService ListenKey IOException IOException TransportService
public abstract Connection attach String arg1 long arg2 long arg3 throws IO Exception public abstract Transport Service Capabilities capabilities public abstract String description  IOException TransportService
public abstract Transport Service Capabilities capabilities public abstract String description public abstract String name  TransportService
public abstract String description public abstract String name public abstract Transport Service Listen Key start Listening throws IO Exception  TransportService ListenKey startListening IOException
public abstract String name public abstract Transport Service Listen Key start Listening throws IO Exception public abstract Transport Service Listen Key start Listening String arg1 throws IO Exception  TransportService ListenKey startListening IOException TransportService ListenKey startListening IOException
public abstract Transport Service Listen Key start Listening throws IO Exception public abstract Transport Service Listen Key start Listening String arg1 throws IO Exception public abstract void stop Listening Transport Service Listen Key arg1 throws IO Exception  TransportService ListenKey startListening IOException TransportService ListenKey startListening IOException stopListening TransportService ListenKey IOException

public interface Transport public String name 

public class Transport Timeout Exception extends IO Exception public Transport Timeout Exception  TransportTimeoutException IOException TransportTimeoutException
public Transport Timeout Exception public Transport Timeout Exception String arg1 super arg1  TransportTimeoutException TransportTimeoutException

Process f Process public VM Start Exception Process proc f Process proc  fProcess VMStartException fProcess
public VM Start Exception String str Process proc super str f Process proc  VMStartException fProcess
public Process process return f Process  fProcess

public interface Double Value extends Primitive Value Comparable public boolean equals Object arg1  DoubleValue PrimitiveValue
public interface Double Value extends Primitive Value Comparable public boolean equals Object arg1 public int hash Code  DoubleValue PrimitiveValue hashCode
public boolean equals Object arg1 public int hash Code public double value  hashCode

public interface Breakpoint Event extends Locatable Event public Thread Reference thread  BreakpointEvent LocatableEvent ThreadReference

public interface Class Prepare Event extends Event public Reference Type reference Type  ClassPrepareEvent ReferenceType referenceType
public interface Class Prepare Event extends Event public Reference Type reference Type public Thread Reference thread  ClassPrepareEvent ReferenceType referenceType ThreadReference

public interface Class Unload Event extends Event public String class Name  ClassUnloadEvent className
public interface Class Unload Event extends Event public String class Name public String class Signature  ClassUnloadEvent className classSignature

public interface Event extends Mirror public Event Request request  EventRequest

public interface Event Iterator extends Iterator public Event next Event  EventIterator nextEvent

public interface Event Queue extends Mirror public Event Set remove throws Interrupted Exception  EventQueue EventSet InterruptedException
public interface Event Queue extends Mirror public Event Set remove throws Interrupted Exception public Event Set remove long arg1 throws Interrupted Exception  EventQueue EventSet InterruptedException EventSet InterruptedException

public interface Event Set extends Mirror Collection public Event Iterator event Iterator  EventSet EventIterator eventIterator
public interface Event Set extends Mirror Collection public Event Iterator event Iterator public int suspend Policy  EventSet EventIterator eventIterator suspendPolicy
public Event Iterator event Iterator public int suspend Policy public void resume  EventIterator eventIterator suspendPolicy

public interface Exception Event extends Locatable Event public Location catch Location  ExceptionEvent LocatableEvent catchLocation
public interface Exception Event extends Locatable Event public Location catch Location public Object Reference exception  ExceptionEvent LocatableEvent catchLocation ObjectReference
public Location catch Location public Object Reference exception public Thread Reference thread  catchLocation ObjectReference ThreadReference

public abstract interface Locatable Event extends Event Locatable public abstract Thread Reference thread  LocatableEvent ThreadReference

public interface Method Entry Event extends Locatable Event public Method method  MethodEntryEvent LocatableEvent
public interface Method Entry Event extends Locatable Event public Method method public Thread Reference thread  MethodEntryEvent LocatableEvent ThreadReference

public interface Method Exit Event extends Locatable Event public Method method  MethodExitEvent LocatableEvent
public interface Method Exit Event extends Locatable Event public Method method public Thread Reference thread  MethodExitEvent LocatableEvent ThreadReference

public interface Modification Watchpoint Event extends Watchpoint Event public Value value To Be  ModificationWatchpointEvent WatchpointEvent valueToBe

public interface Step Event extends Locatable Event public Thread Reference thread  StepEvent LocatableEvent ThreadReference

public interface Thread Death Event extends Event public Thread Reference thread  ThreadDeathEvent ThreadReference

public interface Thread Start Event extends Event public Thread Reference thread  ThreadStartEvent ThreadReference

public interface VM Start Event extends Event public Thread Reference thread  VMStartEvent ThreadReference

public interface Watchpoint Event extends Locatable Event public Field field  WatchpointEvent LocatableEvent
public interface Watchpoint Event extends Locatable Event public Field field public Object Reference object  WatchpointEvent LocatableEvent ObjectReference
public Field field public Object Reference object public Thread Reference thread  ObjectReference ThreadReference
public Object Reference object public Thread Reference thread public Value value Current  ObjectReference ThreadReference valueCurrent

public interface Field extends Type Component Comparable public boolean equals Object arg1  TypeComponent
public interface Field extends Type Component Comparable public boolean equals Object arg1 public int hash Code  TypeComponent hashCode
public boolean equals Object arg1 public int hash Code public boolean is Enum Constant  hashCode isEnumConstant
public int hash Code public boolean is Enum Constant public boolean is Transient  hashCode isEnumConstant isTransient
public boolean is Enum Constant public boolean is Transient public boolean is Volatile  isEnumConstant isTransient isVolatile
public boolean is Transient public boolean is Volatile public Type type throws Class Not Loaded Exception  isTransient isVolatile ClassNotLoadedException
public boolean is Volatile public Type type throws Class Not Loaded Exception public String type Name  isVolatile ClassNotLoadedException typeName

public interface Float Value extends Primitive Value Comparable public boolean equals Object arg1  FloatValue PrimitiveValue
public interface Float Value extends Primitive Value Comparable public boolean equals Object arg1 public int hash Code  FloatValue PrimitiveValue hashCode
public boolean equals Object arg1 public int hash Code public float value  hashCode

public class Incompatible Thread State Exception extends Exception public Incompatible Thread State Exception  IncompatibleThreadStateException IncompatibleThreadStateException
public class Incompatible Thread State Exception extends Exception public Incompatible Thread State Exception public Incompatible Thread State Exception String arg1 super arg1  IncompatibleThreadStateException IncompatibleThreadStateException IncompatibleThreadStateException

public class Inconsistent Debug Info Exception extends Runtime Exception public Inconsistent Debug Info Exception  InconsistentDebugInfoException RuntimeException InconsistentDebugInfoException
public class Inconsistent Debug Info Exception extends Runtime Exception public Inconsistent Debug Info Exception public Inconsistent Debug Info Exception String arg1 super arg1  InconsistentDebugInfoException RuntimeException InconsistentDebugInfoException InconsistentDebugInfoException

public interface Integer Value extends Primitive Value Comparable public boolean equals Object arg1  IntegerValue PrimitiveValue
public interface Integer Value extends Primitive Value Comparable public boolean equals Object arg1 public int hash Code  IntegerValue PrimitiveValue hashCode
public boolean equals Object arg1 public int hash Code public int value  hashCode

public interface Interface Type extends Reference Type public List implementors  InterfaceType ReferenceType
public interface Interface Type extends Reference Type public List implementors public List subinterfaces  InterfaceType ReferenceType
public List implementors public List subinterfaces public List superinterfaces 

public class Internal Exception extends Runtime Exception public Internal Exception  InternalException RuntimeException InternalException
public Internal Exception public Internal Exception int error Code error error Code  InternalException InternalException errorCode errorCode
public Internal Exception java lang String s super s  InternalException
public Internal Exception java lang String s int error Code super s error error Code  InternalException errorCode errorCode
public int error Code return error  errorCode

public class Invalid Code Index Exception extends Runtime Exception public Invalid Code Index Exception  InvalidCodeIndexException RuntimeException InvalidCodeIndexException
public class Invalid Code Index Exception extends Runtime Exception public Invalid Code Index Exception public Invalid Code Index Exception String arg1 super arg1  InvalidCodeIndexException RuntimeException InvalidCodeIndexException InvalidCodeIndexException

public class Invalid Line Number Exception extends Runtime Exception public Invalid Line Number Exception  InvalidLineNumberException RuntimeException InvalidLineNumberException
public class Invalid Line Number Exception extends Runtime Exception public Invalid Line Number Exception public Invalid Line Number Exception String arg1 super arg1  InvalidLineNumberException RuntimeException InvalidLineNumberException InvalidLineNumberException

public class Invalid Stack Frame Exception extends Runtime Exception public Invalid Stack Frame Exception  InvalidStackFrameException RuntimeException InvalidStackFrameException
public class Invalid Stack Frame Exception extends Runtime Exception public Invalid Stack Frame Exception public Invalid Stack Frame Exception String arg1 super arg1  InvalidStackFrameException RuntimeException InvalidStackFrameException InvalidStackFrameException

public class Invalid Type Exception extends Exception public Invalid Type Exception  InvalidTypeException InvalidTypeException
public class Invalid Type Exception extends Exception public Invalid Type Exception public Invalid Type Exception String arg1 super arg1  InvalidTypeException InvalidTypeException InvalidTypeException

public class Invocation Exception extends Exception private Object Reference exception public Invocation Exception Object Reference arg1 exception arg1  InvocationException ObjectReference InvocationException ObjectReference
exception arg1 public Object Reference exception return exception  ObjectReference

public interface Local Variable extends Mirror Comparable public boolean equals Object arg1  LocalVariable
public interface Local Variable extends Mirror Comparable public boolean equals Object arg1 public String generic Signature  LocalVariable genericSignature
public boolean equals Object arg1 public String generic Signature public int hash Code  genericSignature hashCode
public String generic Signature public int hash Code public boolean is Argument  genericSignature hashCode isArgument
public int hash Code public boolean is Argument public boolean is Visible Stack Frame arg1  hashCode isArgument isVisible StackFrame
public boolean is Argument public boolean is Visible Stack Frame arg1 public String name  isArgument isVisible StackFrame
public boolean is Visible Stack Frame arg1 public String name public String signature  isVisible StackFrame
public String name public String signature public com sun jdi Type type throws Class Not Loaded Exception  ClassNotLoadedException
public String signature public com sun jdi Type type throws Class Not Loaded Exception public String type Name  ClassNotLoadedException typeName

public interface Locatable public Location location 

public interface Location extends Mirror Comparable public long code Index  codeIndex
public interface Location extends Mirror Comparable public long code Index public Reference Type declaring Type  codeIndex ReferenceType declaringType
public long code Index public Reference Type declaring Type public boolean equals Object arg1  codeIndex ReferenceType declaringType
public Reference Type declaring Type public boolean equals Object arg1 public int hash Code  ReferenceType declaringType hashCode
public boolean equals Object arg1 public int hash Code public int line Number  hashCode lineNumber
public int hash Code public int line Number public Method method  hashCode lineNumber
public int line Number public Method method public String source Name throws Absent Information Exception  lineNumber sourceName AbsentInformationException
public Method method public String source Name throws Absent Information Exception public int line Number String stratum  sourceName AbsentInformationException lineNumber
public String source Name throws Absent Information Exception public int line Number String stratum public String source Name String stratum throws Absent Information Exception  sourceName AbsentInformationException lineNumber sourceName AbsentInformationException
public int line Number String stratum public String source Name String stratum throws Absent Information Exception public String source Path String stratum throws Absent Information Exception  lineNumber sourceName AbsentInformationException sourcePath AbsentInformationException
public String source Name String stratum throws Absent Information Exception public String source Path String stratum throws Absent Information Exception public String source Path throws Absent Information Exception  sourceName AbsentInformationException sourcePath AbsentInformationException sourcePath AbsentInformationException

public interface Long Value extends Primitive Value Comparable public boolean equals Object arg1  LongValue PrimitiveValue
public interface Long Value extends Primitive Value Comparable public boolean equals Object arg1 public int hash Code  LongValue PrimitiveValue hashCode
public boolean equals Object arg1 public int hash Code public long value  hashCode

public interface Method extends Type Component Locatable Comparable public List all Line Locations throws Absent Information Exception  TypeComponent allLineLocations AbsentInformationException
public interface Method extends Type Component Locatable Comparable public List all Line Locations throws Absent Information Exception public List arguments throws Absent Information Exception  TypeComponent allLineLocations AbsentInformationException AbsentInformationException
public List all Line Locations throws Absent Information Exception public List arguments throws Absent Information Exception public List argument Type Names  allLineLocations AbsentInformationException AbsentInformationException argumentTypeNames
public List arguments throws Absent Information Exception public List argument Type Names public List argument Types throws Class Not Loaded Exception  AbsentInformationException argumentTypeNames argumentTypes ClassNotLoadedException
public List argument Type Names public List argument Types throws Class Not Loaded Exception public byte bytecodes  argumentTypeNames argumentTypes ClassNotLoadedException
public List argument Types throws Class Not Loaded Exception public byte bytecodes public boolean equals Object arg1  argumentTypes ClassNotLoadedException
public byte bytecodes public boolean equals Object arg1 public int hash Code  hashCode
public boolean equals Object arg1 public int hash Code public boolean is Abstract  hashCode isAbstract
public int hash Code public boolean is Abstract public boolean is Bridge  hashCode isAbstract isBridge
public boolean is Abstract public boolean is Bridge public boolean is Constructor  isAbstract isBridge isConstructor
public boolean is Bridge public boolean is Constructor public boolean is Native  isBridge isConstructor isNative
public boolean is Constructor public boolean is Native public boolean is Static Initializer  isConstructor isNative isStaticInitializer
public boolean is Native public boolean is Static Initializer public boolean is Synchronized  isNative isStaticInitializer isSynchronized
public boolean is Static Initializer public boolean is Synchronized public boolean is Obsolete  isStaticInitializer isSynchronized isObsolete
public boolean is Synchronized public boolean is Obsolete public boolean is Varargs  isSynchronized isObsolete isVarargs
public boolean is Obsolete public boolean is Varargs public Location location Of Code Index long arg1  isObsolete isVarargs locationOfCodeIndex
public boolean is Varargs public Location location Of Code Index long arg1 public List locations Of Line int arg1 throws Absent Information Exception  isVarargs locationOfCodeIndex locationsOfLine AbsentInformationException
public Location location Of Code Index long arg1 public List locations Of Line int arg1 throws Absent Information Exception public Type return Type throws Class Not Loaded Exception  locationOfCodeIndex locationsOfLine AbsentInformationException returnType ClassNotLoadedException
public List locations Of Line int arg1 throws Absent Information Exception public Type return Type throws Class Not Loaded Exception public String return Type Name  locationsOfLine AbsentInformationException returnType ClassNotLoadedException returnTypeName
public Type return Type throws Class Not Loaded Exception public String return Type Name public List variables throws Absent Information Exception  returnType ClassNotLoadedException returnTypeName AbsentInformationException
public String return Type Name public List variables throws Absent Information Exception public List variables By Name String arg1 throws Absent Information Exception  returnTypeName AbsentInformationException variablesByName AbsentInformationException
public List variables throws Absent Information Exception public List variables By Name String arg1 throws Absent Information Exception public List all Line Locations String arg1 String arg2 throws Absent Information Exception  AbsentInformationException variablesByName AbsentInformationException allLineLocations AbsentInformationException
public List variables By Name String arg1 throws Absent Information Exception public List all Line Locations String arg1 String arg2 throws Absent Information Exception public List locations Of Line String arg1 String arg2 int arg3 throws Absent Information Exception  variablesByName AbsentInformationException allLineLocations AbsentInformationException locationsOfLine AbsentInformationException

public interface Mirror public String to String  toString
public interface Mirror public String to String public Virtual Machine virtual Machine  toString VirtualMachine virtualMachine

public class Native Method Exception extends Runtime Exception public Native Method Exception  NativeMethodException RuntimeException NativeMethodException
public class Native Method Exception extends Runtime Exception public Native Method Exception public Native Method Exception String arg1 super arg1  NativeMethodException RuntimeException NativeMethodException NativeMethodException

public class Object Collected Exception extends Runtime Exception public Object Collected Exception  ObjectCollectedException RuntimeException ObjectCollectedException
public class Object Collected Exception extends Runtime Exception public Object Collected Exception public Object Collected Exception String arg1 super arg1  ObjectCollectedException RuntimeException ObjectCollectedException ObjectCollectedException

public static final int INVOKE SINGLE THREADED 1 public static final int INVOKE NONVIRTUAL 2 public void disable Collection  INVOKE_SINGLE_THREADED INVOKE_NONVIRTUAL disableCollection
public static final int INVOKE NONVIRTUAL 2 public void disable Collection public void enable Collection  INVOKE_NONVIRTUAL disableCollection enableCollection
public void disable Collection public void enable Collection public int entry Count throws Incompatible Thread State Exception  disableCollection enableCollection entryCount IncompatibleThreadStateException
public void enable Collection public int entry Count throws Incompatible Thread State Exception public boolean equals Object arg1  enableCollection entryCount IncompatibleThreadStateException
public int entry Count throws Incompatible Thread State Exception public boolean equals Object arg1 public Value get Value Field arg1  entryCount IncompatibleThreadStateException getValue
public boolean equals Object arg1 public Value get Value Field arg1 public Map get Values java util List arg1  getValue getValues
public Value get Value Field arg1 public Map get Values java util List arg1 public int hash Code  getValue getValues hashCode
public Map get Values java util List arg1 public int hash Code public Value invoke Method Thread Reference arg1 Method arg2 List arg3 int arg4 throws Invalid Type Exception Class Not Loaded Exception Incompatible Thread State Exception Invocation Exception  getValues hashCode invokeMethod ThreadReference InvalidTypeException ClassNotLoadedException IncompatibleThreadStateException InvocationException
public int hash Code public Value invoke Method Thread Reference arg1 Method arg2 List arg3 int arg4 throws Invalid Type Exception Class Not Loaded Exception Incompatible Thread State Exception Invocation Exception public boolean is Collected  hashCode invokeMethod ThreadReference InvalidTypeException ClassNotLoadedException IncompatibleThreadStateException InvocationException isCollected
public Value invoke Method Thread Reference arg1 Method arg2 List arg3 int arg4 throws Invalid Type Exception Class Not Loaded Exception Incompatible Thread State Exception Invocation Exception public boolean is Collected public Thread Reference owning Thread throws Incompatible Thread State Exception public com sun jdi Reference Type reference Type  invokeMethod ThreadReference InvalidTypeException ClassNotLoadedException IncompatibleThreadStateException InvocationException isCollected ThreadReference owningThread IncompatibleThreadStateException ReferenceType referenceType
public Value invoke Method Thread Reference arg1 Method arg2 List arg3 int arg4 throws Invalid Type Exception Class Not Loaded Exception Incompatible Thread State Exception Invocation Exception public boolean is Collected public Thread Reference owning Thread throws Incompatible Thread State Exception public com sun jdi Reference Type reference Type  invokeMethod ThreadReference InvalidTypeException ClassNotLoadedException IncompatibleThreadStateException InvocationException isCollected ThreadReference owningThread IncompatibleThreadStateException ReferenceType referenceType
public boolean is Collected public Thread Reference owning Thread throws Incompatible Thread State Exception public com sun jdi Reference Type reference Type public void set Value Field arg1 Value arg2 throws Invalid Type Exception Class Not Loaded Exception  isCollected ThreadReference owningThread IncompatibleThreadStateException ReferenceType referenceType setValue InvalidTypeException ClassNotLoadedException
public Thread Reference owning Thread throws Incompatible Thread State Exception public com sun jdi Reference Type reference Type public void set Value Field arg1 Value arg2 throws Invalid Type Exception Class Not Loaded Exception public long uniqueID  ThreadReference owningThread IncompatibleThreadStateException ReferenceType referenceType setValue InvalidTypeException ClassNotLoadedException
public void set Value Field arg1 Value arg2 throws Invalid Type Exception Class Not Loaded Exception public long uniqueID public List waiting Threads throws Incompatible Thread State Exception  setValue InvalidTypeException ClassNotLoadedException waitingThreads IncompatibleThreadStateException

public abstract interface Path Searching Virtual Machine extends Virtual Machine public abstract List class Path  PathSearchingVirtualMachine VirtualMachine classPath
public abstract interface Path Searching Virtual Machine extends Virtual Machine public abstract List class Path public abstract List boot Class Path  PathSearchingVirtualMachine VirtualMachine classPath bootClassPath
public abstract List class Path public abstract List boot Class Path public abstract String base Directory  classPath bootClassPath baseDirectory

public interface Primitive Value extends Value public boolean boolean Value  PrimitiveValue booleanValue
public interface Primitive Value extends Value public boolean boolean Value public byte byte Value  PrimitiveValue booleanValue byteValue
public boolean boolean Value public byte byte Value public char char Value  booleanValue byteValue charValue
public byte byte Value public char char Value public double double Value  byteValue charValue doubleValue
public char char Value public double double Value public float float Value  charValue doubleValue floatValue
public double double Value public float float Value public int int Value  doubleValue floatValue intValue
public float float Value public int int Value public long long Value  floatValue intValue longValue
public int int Value public long long Value public short short Value  intValue longValue shortValue

public interface Reference Type extends Type Comparable Accessible public List all Fields  ReferenceType allFields
public interface Reference Type extends Type Comparable Accessible public List all Fields public List all Methods  ReferenceType allFields allMethods
public List all Fields public List all Methods public List all Line Locations throws Absent Information Exception  allFields allMethods allLineLocations AbsentInformationException
public List all Methods public List all Line Locations throws Absent Information Exception public Class Loader Reference class Loader  allMethods allLineLocations AbsentInformationException ClassLoaderReference classLoader
public List all Line Locations throws Absent Information Exception public Class Loader Reference class Loader public Class Object Reference class Object  allLineLocations AbsentInformationException ClassLoaderReference classLoader ClassObjectReference classObject
public Class Loader Reference class Loader public Class Object Reference class Object public boolean equals Object arg1  ClassLoaderReference classLoader ClassObjectReference classObject
public Class Object Reference class Object public boolean equals Object arg1 public boolean failed To Initialize  ClassObjectReference classObject failedToInitialize
public boolean equals Object arg1 public boolean failed To Initialize public Field field By Name String arg1  failedToInitialize fieldByName
public boolean failed To Initialize public Field field By Name String arg1 public List fields  failedToInitialize fieldByName
public Field field By Name String arg1 public List fields public String generic Signature  fieldByName genericSignature
public List fields public String generic Signature public Value get Value Field arg1  genericSignature getValue
public String generic Signature public Value get Value Field arg1 public Map get Values List arg1  genericSignature getValue getValues
public Value get Value Field arg1 public Map get Values List arg1 public int hash Code  getValue getValues hashCode
public Map get Values List arg1 public int hash Code public boolean is Abstract  getValues hashCode isAbstract
public int hash Code public boolean is Abstract public boolean is Final  hashCode isAbstract isFinal
public boolean is Abstract public boolean is Final public boolean is Initialized  isAbstract isFinal isInitialized
public boolean is Final public boolean is Initialized public boolean is Prepared  isFinal isInitialized isPrepared
public boolean is Initialized public boolean is Prepared public boolean is Static  isInitialized isPrepared isStatic
public boolean is Prepared public boolean is Static public boolean is Verified  isPrepared isStatic isVerified
public boolean is Static public boolean is Verified public List locations Of Line int arg1 throws Absent Information Exception  isStatic isVerified locationsOfLine AbsentInformationException
public boolean is Verified public List locations Of Line int arg1 throws Absent Information Exception public List methods  isVerified locationsOfLine AbsentInformationException
public List locations Of Line int arg1 throws Absent Information Exception public List methods public List methods By Name String arg1  locationsOfLine AbsentInformationException methodsByName
public List methods public List methods By Name String arg1 public List methods By Name String arg1 String arg2  methodsByName methodsByName
public List methods By Name String arg1 public List methods By Name String arg1 String arg2 public String name  methodsByName methodsByName
public List methods By Name String arg1 String arg2 public String name public List nested Types  methodsByName nestedTypes
public String name public List nested Types public String source Name throws Absent Information Exception  nestedTypes sourceName AbsentInformationException
public List nested Types public String source Name throws Absent Information Exception public List visible Fields  nestedTypes sourceName AbsentInformationException visibleFields
public String source Name throws Absent Information Exception public List visible Fields public List visible Methods  sourceName AbsentInformationException visibleFields visibleMethods
public List visible Fields public List visible Methods public List source Names String arg1 throws Absent Information Exception  visibleFields visibleMethods sourceNames AbsentInformationException
public List visible Methods public List source Names String arg1 throws Absent Information Exception public List source Paths String arg1 throws Absent Information Exception  visibleMethods sourceNames AbsentInformationException sourcePaths AbsentInformationException
public List source Names String arg1 throws Absent Information Exception public List source Paths String arg1 throws Absent Information Exception public String source Debug Extension throws Absent Information Exception  sourceNames AbsentInformationException sourcePaths AbsentInformationException sourceDebugExtension AbsentInformationException
public List source Paths String arg1 throws Absent Information Exception public String source Debug Extension throws Absent Information Exception public List all Line Locations String arg1 String arg2 throws Absent Information Exception  sourcePaths AbsentInformationException sourceDebugExtension AbsentInformationException allLineLocations AbsentInformationException
public String source Debug Extension throws Absent Information Exception public List all Line Locations String arg1 String arg2 throws Absent Information Exception public List locations Of Line String arg1 String arg2 int arg3 throws Absent Information Exception  sourceDebugExtension AbsentInformationException allLineLocations AbsentInformationException locationsOfLine AbsentInformationException
public List all Line Locations String arg1 String arg2 throws Absent Information Exception public List locations Of Line String arg1 String arg2 int arg3 throws Absent Information Exception public List available Strata  allLineLocations AbsentInformationException locationsOfLine AbsentInformationException availableStrata
public List locations Of Line String arg1 String arg2 int arg3 throws Absent Information Exception public List available Strata public String default Stratum  locationsOfLine AbsentInformationException availableStrata defaultStratum

public interface Breakpoint Request extends Event Request Locatable public void add Thread Filter Thread Reference arg1  BreakpointRequest EventRequest addThreadFilter ThreadReference
public interface Breakpoint Request extends Event Request Locatable public void add Thread Filter Thread Reference arg1 public Location location  BreakpointRequest EventRequest addThreadFilter ThreadReference
public void add Thread Filter Thread Reference arg1 public Location location public void add Instance Filter Object Reference instance  addThreadFilter ThreadReference addInstanceFilter ObjectReference

public interface Class Prepare Request extends Event Request public void add Class Exclusion Filter String arg1  ClassPrepareRequest EventRequest addClassExclusionFilter
public interface Class Prepare Request extends Event Request public void add Class Exclusion Filter String arg1 public void add Class Filter Reference Type arg1  ClassPrepareRequest EventRequest addClassExclusionFilter addClassFilter ReferenceType
public void add Class Exclusion Filter String arg1 public void add Class Filter Reference Type arg1 public void add Class Filter String arg1  addClassExclusionFilter addClassFilter ReferenceType addClassFilter

public interface Class Unload Request extends Event Request public void add Class Exclusion Filter String arg1  ClassUnloadRequest EventRequest addClassExclusionFilter
public interface Class Unload Request extends Event Request public void add Class Exclusion Filter String arg1 public void add Class Filter String arg1  ClassUnloadRequest EventRequest addClassExclusionFilter addClassFilter

public class Duplicate Request Exception extends Runtime Exception public Duplicate Request Exception  DuplicateRequestException RuntimeException DuplicateRequestException
public class Duplicate Request Exception extends Runtime Exception public Duplicate Request Exception public Duplicate Request Exception String message super message  DuplicateRequestException RuntimeException DuplicateRequestException DuplicateRequestException

public static final int SUSPEND EVENT THREAD 1 public static final int SUSPEND ALL 2 public void add Count Filter int arg1 throws Invalid Request State Exception  SUSPEND_EVENT_THREAD SUSPEND_ALL addCountFilter InvalidRequestStateException
public static final int SUSPEND ALL 2 public void add Count Filter int arg1 throws Invalid Request State Exception public void disable  SUSPEND_ALL addCountFilter InvalidRequestStateException
public void add Count Filter int arg1 throws Invalid Request State Exception public void disable public void enable  addCountFilter InvalidRequestStateException
public void disable public void enable public boolean is Enabled  isEnabled
public void enable public boolean is Enabled public void set Enabled boolean arg1  isEnabled setEnabled
public boolean is Enabled public void set Enabled boolean arg1 public void set Suspend Policy int arg1  isEnabled setEnabled setSuspendPolicy
public void set Enabled boolean arg1 public void set Suspend Policy int arg1 public int suspend Policy  setEnabled setSuspendPolicy suspendPolicy
public void set Suspend Policy int arg1 public int suspend Policy public Object get Property Object key  setSuspendPolicy suspendPolicy getProperty
public int suspend Policy public Object get Property Object key public void put Property Object key Object value  suspendPolicy getProperty putProperty

public interface Event Request Manager extends Mirror public List access Watchpoint Requests  EventRequestManager accessWatchpointRequests
public interface Event Request Manager extends Mirror public List access Watchpoint Requests public List breakpoint Requests  EventRequestManager accessWatchpointRequests breakpointRequests
public List access Watchpoint Requests public List breakpoint Requests public List class Prepare Requests  accessWatchpointRequests breakpointRequests classPrepareRequests
public List breakpoint Requests public List class Prepare Requests public List class Unload Requests  breakpointRequests classPrepareRequests classUnloadRequests
public List class Prepare Requests public List class Unload Requests public Access Watchpoint Request create Access Watchpoint Request Field arg1  classPrepareRequests classUnloadRequests AccessWatchpointRequest createAccessWatchpointRequest
public List class Unload Requests public Access Watchpoint Request create Access Watchpoint Request Field arg1 public Breakpoint Request create Breakpoint Request Location arg1  classUnloadRequests AccessWatchpointRequest createAccessWatchpointRequest BreakpointRequest createBreakpointRequest
public Access Watchpoint Request create Access Watchpoint Request Field arg1 public Breakpoint Request create Breakpoint Request Location arg1 public Class Prepare Request create Class Prepare Request  AccessWatchpointRequest createAccessWatchpointRequest BreakpointRequest createBreakpointRequest ClassPrepareRequest createClassPrepareRequest
public Breakpoint Request create Breakpoint Request Location arg1 public Class Prepare Request create Class Prepare Request public Class Unload Request create Class Unload Request  BreakpointRequest createBreakpointRequest ClassPrepareRequest createClassPrepareRequest ClassUnloadRequest createClassUnloadRequest
public Class Prepare Request create Class Prepare Request public Class Unload Request create Class Unload Request public Exception Request create Exception Request com sun jdi Reference Type arg1 boolean arg2 boolean arg3  ClassPrepareRequest createClassPrepareRequest ClassUnloadRequest createClassUnloadRequest ExceptionRequest createExceptionRequest ReferenceType
public Class Unload Request create Class Unload Request public Exception Request create Exception Request com sun jdi Reference Type arg1 boolean arg2 boolean arg3 public Method Entry Request create Method Entry Request  ClassUnloadRequest createClassUnloadRequest ExceptionRequest createExceptionRequest ReferenceType MethodEntryRequest createMethodEntryRequest
public Exception Request create Exception Request com sun jdi Reference Type arg1 boolean arg2 boolean arg3 public Method Entry Request create Method Entry Request public Method Exit Request create Method Exit Request  ExceptionRequest createExceptionRequest ReferenceType MethodEntryRequest createMethodEntryRequest MethodExitRequest createMethodExitRequest
public Method Entry Request create Method Entry Request public Method Exit Request create Method Exit Request public Modification Watchpoint Request create Modification Watchpoint Request Field arg1  MethodEntryRequest createMethodEntryRequest MethodExitRequest createMethodExitRequest ModificationWatchpointRequest createModificationWatchpointRequest
public Method Exit Request create Method Exit Request public Modification Watchpoint Request create Modification Watchpoint Request Field arg1 public Step Request create Step Request Thread Reference arg1 int arg2 int arg3  MethodExitRequest createMethodExitRequest ModificationWatchpointRequest createModificationWatchpointRequest StepRequest createStepRequest ThreadReference
public Modification Watchpoint Request create Modification Watchpoint Request Field arg1 public Step Request create Step Request Thread Reference arg1 int arg2 int arg3 public Thread Death Request create Thread Death Request  ModificationWatchpointRequest createModificationWatchpointRequest StepRequest createStepRequest ThreadReference ThreadDeathRequest createThreadDeathRequest
public Step Request create Step Request Thread Reference arg1 int arg2 int arg3 public Thread Death Request create Thread Death Request public Thread Start Request create Thread Start Request  StepRequest createStepRequest ThreadReference ThreadDeathRequest createThreadDeathRequest ThreadStartRequest createThreadStartRequest
public Thread Death Request create Thread Death Request public Thread Start Request create Thread Start Request public void delete All Breakpoints  ThreadDeathRequest createThreadDeathRequest ThreadStartRequest createThreadStartRequest deleteAllBreakpoints
public Thread Start Request create Thread Start Request public void delete All Breakpoints public void delete Event Request Event Request arg1  ThreadStartRequest createThreadStartRequest deleteAllBreakpoints deleteEventRequest EventRequest
public void delete All Breakpoints public void delete Event Request Event Request arg1 public void delete Event Requests List arg1  deleteAllBreakpoints deleteEventRequest EventRequest deleteEventRequests
public void delete Event Request Event Request arg1 public void delete Event Requests List arg1 public List exception Requests  deleteEventRequest EventRequest deleteEventRequests exceptionRequests
public void delete Event Requests List arg1 public List exception Requests public List method Entry Requests  deleteEventRequests exceptionRequests methodEntryRequests
public List exception Requests public List method Entry Requests public List method Exit Requests  exceptionRequests methodEntryRequests methodExitRequests
public List method Entry Requests public List method Exit Requests public List modification Watchpoint Requests  methodEntryRequests methodExitRequests modificationWatchpointRequests
public List method Exit Requests public List modification Watchpoint Requests public List step Requests  methodExitRequests modificationWatchpointRequests stepRequests
public List modification Watchpoint Requests public List step Requests public List thread Death Requests  modificationWatchpointRequests stepRequests threadDeathRequests
public List step Requests public List thread Death Requests public List thread Start Requests  stepRequests threadDeathRequests threadStartRequests
public List thread Death Requests public List thread Start Requests public VM Death Request createVM Death Request  threadDeathRequests threadStartRequests VMDeathRequest createVMDeathRequest
public List thread Start Requests public VM Death Request createVM Death Request public List vm Death Requests  threadStartRequests VMDeathRequest createVMDeathRequest vmDeathRequests

public interface Exception Request extends Event Request public void add Class Exclusion Filter String arg1  ExceptionRequest EventRequest addClassExclusionFilter
public interface Exception Request extends Event Request public void add Class Exclusion Filter String arg1 public void add Class Filter Reference Type arg1  ExceptionRequest EventRequest addClassExclusionFilter addClassFilter ReferenceType
public void add Class Exclusion Filter String arg1 public void add Class Filter Reference Type arg1 public void add Class Filter String arg1  addClassExclusionFilter addClassFilter ReferenceType addClassFilter
public void add Class Filter Reference Type arg1 public void add Class Filter String arg1 public void add Thread Filter Thread Reference arg1  addClassFilter ReferenceType addClassFilter addThreadFilter ThreadReference
public void add Class Filter String arg1 public void add Thread Filter Thread Reference arg1 public Reference Type exception  addClassFilter addThreadFilter ThreadReference ReferenceType
public void add Thread Filter Thread Reference arg1 public Reference Type exception public boolean notify Caught  addThreadFilter ThreadReference ReferenceType notifyCaught
public Reference Type exception public boolean notify Caught public boolean notify Uncaught  ReferenceType notifyCaught notifyUncaught
public boolean notify Caught public boolean notify Uncaught public void add Instance Filter Object Reference instance  notifyCaught notifyUncaught addInstanceFilter ObjectReference

public class Invalid Request State Exception extends Runtime Exception public Invalid Request State Exception  InvalidRequestStateException RuntimeException InvalidRequestStateException
public Invalid Request State Exception String arg1 super arg1  InvalidRequestStateException

public interface Method Entry Request extends Event Request public void add Class Exclusion Filter String arg1  MethodEntryRequest EventRequest addClassExclusionFilter
public interface Method Entry Request extends Event Request public void add Class Exclusion Filter String arg1 public void add Class Filter Reference Type arg1  MethodEntryRequest EventRequest addClassExclusionFilter addClassFilter ReferenceType
public void add Class Exclusion Filter String arg1 public void add Class Filter Reference Type arg1 public void add Class Filter String arg1  addClassExclusionFilter addClassFilter ReferenceType addClassFilter
public void add Class Filter Reference Type arg1 public void add Class Filter String arg1 public void add Thread Filter Thread Reference arg1  addClassFilter ReferenceType addClassFilter addThreadFilter ThreadReference
public void add Class Filter String arg1 public void add Thread Filter Thread Reference arg1 public void add Instance Filter Object Reference instance  addClassFilter addThreadFilter ThreadReference addInstanceFilter ObjectReference

public interface Method Exit Request extends Event Request public void add Class Exclusion Filter String arg1  MethodExitRequest EventRequest addClassExclusionFilter
public interface Method Exit Request extends Event Request public void add Class Exclusion Filter String arg1 public void add Class Filter Reference Type arg1  MethodExitRequest EventRequest addClassExclusionFilter addClassFilter ReferenceType
public void add Class Exclusion Filter String arg1 public void add Class Filter Reference Type arg1 public void add Class Filter String arg1  addClassExclusionFilter addClassFilter ReferenceType addClassFilter
public void add Class Filter Reference Type arg1 public void add Class Filter String arg1 public void add Thread Filter Thread Reference arg1  addClassFilter ReferenceType addClassFilter addThreadFilter ThreadReference
public void add Class Filter String arg1 public void add Thread Filter Thread Reference arg1 public void add Instance Filter Object Reference instance  addClassFilter addThreadFilter ThreadReference addInstanceFilter ObjectReference

public static final int STEP MIN 1 public static final int STEP LINE 2 public void add Class Exclusion Filter String arg1  STEP_MIN STEP_LINE addClassExclusionFilter
public static final int STEP LINE 2 public void add Class Exclusion Filter String arg1 public void add Class Filter Reference Type arg1  STEP_LINE addClassExclusionFilter addClassFilter ReferenceType
public void add Class Exclusion Filter String arg1 public void add Class Filter Reference Type arg1 public void add Class Filter String arg1  addClassExclusionFilter addClassFilter ReferenceType addClassFilter
public void add Class Filter Reference Type arg1 public void add Class Filter String arg1 public int depth  addClassFilter ReferenceType addClassFilter
public void add Class Filter String arg1 public int depth public int size  addClassFilter
public int depth public int size public Thread Reference thread  ThreadReference
public int size public Thread Reference thread public void add Instance Filter Object Reference instance  ThreadReference addInstanceFilter ObjectReference

public interface Thread Death Request extends Event Request public void add Thread Filter Thread Reference arg1  ThreadDeathRequest EventRequest addThreadFilter ThreadReference

public interface Thread Start Request extends Event Request public void add Thread Filter Thread Reference arg1  ThreadStartRequest EventRequest addThreadFilter ThreadReference

public interface Watchpoint Request extends Event Request public void add Class Exclusion Filter String arg1  WatchpointRequest EventRequest addClassExclusionFilter
public interface Watchpoint Request extends Event Request public void add Class Exclusion Filter String arg1 public void add Class Filter Reference Type arg1  WatchpointRequest EventRequest addClassExclusionFilter addClassFilter ReferenceType
public void add Class Exclusion Filter String arg1 public void add Class Filter Reference Type arg1 public void add Class Filter String arg1  addClassExclusionFilter addClassFilter ReferenceType addClassFilter
public void add Class Filter Reference Type arg1 public void add Class Filter String arg1 public void add Thread Filter Thread Reference arg1  addClassFilter ReferenceType addClassFilter addThreadFilter ThreadReference
public void add Class Filter String arg1 public void add Thread Filter Thread Reference arg1 public Field field  addClassFilter addThreadFilter ThreadReference
public void add Thread Filter Thread Reference arg1 public Field field public void add Instance Filter Object Reference instance  addThreadFilter ThreadReference addInstanceFilter ObjectReference

public interface Short Value extends Primitive Value Comparable public boolean equals Object arg1  ShortValue PrimitiveValue
public interface Short Value extends Primitive Value Comparable public boolean equals Object arg1 public int hash Code  ShortValue PrimitiveValue hashCode
public boolean equals Object arg1 public int hash Code public short value  hashCode

public interface Stack Frame extends Mirror Locatable public Value get Value Local Variable arg1  StackFrame getValue LocalVariable
public interface Stack Frame extends Mirror Locatable public Value get Value Local Variable arg1 public Map get Values List arg1  StackFrame getValue LocalVariable getValues
public Value get Value Local Variable arg1 public Map get Values List arg1 public Location location  getValue LocalVariable getValues
public Map get Values List arg1 public Location location public void set Value Local Variable arg1 Value arg2 throws Invalid Type Exception Class Not Loaded Exception  getValues setValue LocalVariable InvalidTypeException ClassNotLoadedException
public Location location public void set Value Local Variable arg1 Value arg2 throws Invalid Type Exception Class Not Loaded Exception public Object Reference this Object  setValue LocalVariable InvalidTypeException ClassNotLoadedException ObjectReference thisObject
public void set Value Local Variable arg1 Value arg2 throws Invalid Type Exception Class Not Loaded Exception public Object Reference this Object public Thread Reference thread  setValue LocalVariable InvalidTypeException ClassNotLoadedException ObjectReference thisObject ThreadReference
public Object Reference this Object public Thread Reference thread public Local Variable visible Variable By Name String arg1 throws Absent Information Exception  ObjectReference thisObject ThreadReference LocalVariable visibleVariableByName AbsentInformationException
public Thread Reference thread public Local Variable visible Variable By Name String arg1 throws Absent Information Exception public List visible Variables throws Absent Information Exception  ThreadReference LocalVariable visibleVariableByName AbsentInformationException visibleVariables AbsentInformationException

public interface String Reference extends Object Reference public String value  StringReference ObjectReference

public interface Thread Group Reference extends Object Reference public String name  ThreadGroupReference ObjectReference
public interface Thread Group Reference extends Object Reference public String name public Thread Group Reference parent  ThreadGroupReference ObjectReference ThreadGroupReference
public String name public Thread Group Reference parent public void resume  ThreadGroupReference
public Thread Group Reference parent public void resume public void suspend  ThreadGroupReference
public void resume public void suspend public List thread Groups  threadGroups
public void suspend public List thread Groups public List threads  threadGroups

public static final int THREAD STATUS WAIT 4 public static final int THREAD STATUS NOT STARTED 5 public Object Reference current Contended Monitor throws Incompatible Thread State Exception  THREAD_STATUS_WAIT THREAD_STATUS_NOT_STARTED ObjectReference currentContendedMonitor IncompatibleThreadStateException
public static final int THREAD STATUS NOT STARTED 5 public Object Reference current Contended Monitor throws Incompatible Thread State Exception public Stack Frame frame int arg1 throws Incompatible Thread State Exception  THREAD_STATUS_NOT_STARTED ObjectReference currentContendedMonitor IncompatibleThreadStateException StackFrame IncompatibleThreadStateException
public Object Reference current Contended Monitor throws Incompatible Thread State Exception public Stack Frame frame int arg1 throws Incompatible Thread State Exception public int frame Count throws Incompatible Thread State Exception  ObjectReference currentContendedMonitor IncompatibleThreadStateException StackFrame IncompatibleThreadStateException frameCount IncompatibleThreadStateException
public Stack Frame frame int arg1 throws Incompatible Thread State Exception public int frame Count throws Incompatible Thread State Exception public List frames throws Incompatible Thread State Exception  StackFrame IncompatibleThreadStateException frameCount IncompatibleThreadStateException IncompatibleThreadStateException
public int frame Count throws Incompatible Thread State Exception public List frames throws Incompatible Thread State Exception public List frames int arg1 int arg2 throws Incompatible Thread State Exception  frameCount IncompatibleThreadStateException IncompatibleThreadStateException IncompatibleThreadStateException
public List frames throws Incompatible Thread State Exception public List frames int arg1 int arg2 throws Incompatible Thread State Exception public void interrupt  IncompatibleThreadStateException IncompatibleThreadStateException
public List frames int arg1 int arg2 throws Incompatible Thread State Exception public void interrupt public boolean is At Breakpoint  IncompatibleThreadStateException isAtBreakpoint
public void interrupt public boolean is At Breakpoint public boolean is Suspended  isAtBreakpoint isSuspended
public boolean is At Breakpoint public boolean is Suspended public String name  isAtBreakpoint isSuspended
public boolean is Suspended public String name public List owned Monitors throws Incompatible Thread State Exception  isSuspended ownedMonitors IncompatibleThreadStateException
public String name public List owned Monitors throws Incompatible Thread State Exception public void resume  ownedMonitors IncompatibleThreadStateException
public List owned Monitors throws Incompatible Thread State Exception public void resume public int status  ownedMonitors IncompatibleThreadStateException
public void resume public int status public void stop Object Reference arg1 throws Invalid Type Exception  ObjectReference InvalidTypeException
public int status public void stop Object Reference arg1 throws Invalid Type Exception public void suspend  ObjectReference InvalidTypeException
public void stop Object Reference arg1 throws Invalid Type Exception public void suspend public int suspend Count  ObjectReference InvalidTypeException suspendCount
public void suspend public int suspend Count public Thread Group Reference thread Group  suspendCount ThreadGroupReference threadGroup
public int suspend Count public Thread Group Reference thread Group public void pop Frames Stack Frame frame throws Incompatible Thread State Exception  suspendCount ThreadGroupReference threadGroup popFrames StackFrame IncompatibleThreadStateException

public interface Type extends Mirror public abstract String name 
public interface Type extends Mirror public abstract String name public abstract String signature 

public interface Type Component extends Mirror Accessible public Reference Type declaring Type  TypeComponent ReferenceType declaringType
public interface Type Component extends Mirror Accessible public Reference Type declaring Type public String generic Signature  TypeComponent ReferenceType declaringType genericSignature
public Reference Type declaring Type public String generic Signature public boolean is Final  ReferenceType declaringType genericSignature isFinal
public String generic Signature public boolean is Final public boolean is Static  genericSignature isFinal isStatic
public boolean is Final public boolean is Static public boolean is Synthetic  isFinal isStatic isSynthetic
public boolean is Static public boolean is Synthetic public String name  isStatic isSynthetic
public boolean is Synthetic public String name public String signature  isSynthetic

public interface Value extends Mirror public Type type 

public static final int TRACE OBJREFS 16 public static final int TRACE ALL 16777215 public List all Classes  TRACE_OBJREFS TRACE_ALL allClasses
public static final int TRACE ALL 16777215 public List all Classes public List all Threads  TRACE_ALL allClasses allThreads
public List all Classes public List all Threads public boolean can Get Bytecodes  allClasses allThreads canGetBytecodes
public List all Threads public boolean can Get Bytecodes public boolean can Get Current Contended Monitor  allThreads canGetBytecodes canGetCurrentContendedMonitor
public boolean can Get Bytecodes public boolean can Get Current Contended Monitor public boolean can Get Monitor Info  canGetBytecodes canGetCurrentContendedMonitor canGetMonitorInfo
public boolean can Get Current Contended Monitor public boolean can Get Monitor Info public boolean can Get Owned Monitor Info  canGetCurrentContendedMonitor canGetMonitorInfo canGetOwnedMonitorInfo
public boolean can Get Monitor Info public boolean can Get Owned Monitor Info public boolean can Get Synthetic Attribute  canGetMonitorInfo canGetOwnedMonitorInfo canGetSyntheticAttribute
public boolean can Get Owned Monitor Info public boolean can Get Synthetic Attribute public boolean can Watch Field Access  canGetOwnedMonitorInfo canGetSyntheticAttribute canWatchFieldAccess
public boolean can Get Synthetic Attribute public boolean can Watch Field Access public boolean can Watch Field Modification  canGetSyntheticAttribute canWatchFieldAccess canWatchFieldModification
public boolean can Watch Field Access public boolean can Watch Field Modification public List classes By Name String arg1  canWatchFieldAccess canWatchFieldModification classesByName
public boolean can Watch Field Modification public List classes By Name String arg1 public String description  canWatchFieldModification classesByName
public List classes By Name String arg1 public String description public void dispose  classesByName
public String description public void dispose public Event Queue event Queue  EventQueue eventQueue
public void dispose public Event Queue event Queue public Event Request Manager event Request Manager  EventQueue eventQueue EventRequestManager eventRequestManager
public Event Queue event Queue public Event Request Manager event Request Manager public void exit int arg1  EventQueue eventQueue EventRequestManager eventRequestManager
public Event Request Manager event Request Manager public void exit int arg1 public Byte Value mirror Of byte arg1  EventRequestManager eventRequestManager ByteValue mirrorOf
public void exit int arg1 public Byte Value mirror Of byte arg1 public Char Value mirror Of char arg1  ByteValue mirrorOf CharValue mirrorOf
public Byte Value mirror Of byte arg1 public Char Value mirror Of char arg1 public Double Value mirror Of double arg1  ByteValue mirrorOf CharValue mirrorOf DoubleValue mirrorOf
public Char Value mirror Of char arg1 public Double Value mirror Of double arg1 public Float Value mirror Of float arg1  CharValue mirrorOf DoubleValue mirrorOf FloatValue mirrorOf
public Double Value mirror Of double arg1 public Float Value mirror Of float arg1 public Integer Value mirror Of int arg1  DoubleValue mirrorOf FloatValue mirrorOf IntegerValue mirrorOf
public Float Value mirror Of float arg1 public Integer Value mirror Of int arg1 public Long Value mirror Of long arg1  FloatValue mirrorOf IntegerValue mirrorOf LongValue mirrorOf
public Integer Value mirror Of int arg1 public Long Value mirror Of long arg1 public String Reference mirror Of String arg1  IntegerValue mirrorOf LongValue mirrorOf StringReference mirrorOf
public Long Value mirror Of long arg1 public String Reference mirror Of String arg1 public Short Value mirror Of short arg1  LongValue mirrorOf StringReference mirrorOf ShortValue mirrorOf
public String Reference mirror Of String arg1 public Short Value mirror Of short arg1 public Boolean Value mirror Of boolean arg1  StringReference mirrorOf ShortValue mirrorOf BooleanValue mirrorOf
public Short Value mirror Of short arg1 public Boolean Value mirror Of boolean arg1 public Process process  ShortValue mirrorOf BooleanValue mirrorOf
public Boolean Value mirror Of boolean arg1 public Process process public void resume  BooleanValue mirrorOf
public Process process public void resume public void set Debug Trace Mode int arg1  setDebugTraceMode
public void resume public void set Debug Trace Mode int arg1 public void suspend  setDebugTraceMode
public void set Debug Trace Mode int arg1 public void suspend public List top Level Thread Groups  setDebugTraceMode topLevelThreadGroups
public void suspend public List top Level Thread Groups public String name  topLevelThreadGroups
public List top Level Thread Groups public String name public String version  topLevelThreadGroups
public String name public String version public void redefine Classes Map arg1  redefineClasses
public String version public void redefine Classes Map arg1 public boolean can Redefine Classes  redefineClasses canRedefineClasses
public void redefine Classes Map arg1 public boolean can Redefine Classes public boolean can Use Instance Filters  redefineClasses canRedefineClasses canUseInstanceFilters
public boolean can Redefine Classes public boolean can Use Instance Filters public boolean can Add Method  canRedefineClasses canUseInstanceFilters canAddMethod
public boolean can Use Instance Filters public boolean can Add Method public boolean can Unrestrictedly Redefine Classes  canUseInstanceFilters canAddMethod canUnrestrictedlyRedefineClasses
public boolean can Add Method public boolean can Unrestrictedly Redefine Classes public boolean can Pop Frames  canAddMethod canUnrestrictedlyRedefineClasses canPopFrames
public boolean can Unrestrictedly Redefine Classes public boolean can Pop Frames public boolean can Get Source Debug Extension  canUnrestrictedlyRedefineClasses canPopFrames canGetSourceDebugExtension
public boolean can Pop Frames public boolean can Get Source Debug Extension public boolean can RequestVM Death Event  canPopFrames canGetSourceDebugExtension canRequestVMDeathEvent
public boolean can Get Source Debug Extension public boolean can RequestVM Death Event public void set Default Stratum String arg1  canGetSourceDebugExtension canRequestVMDeathEvent setDefaultStratum
public boolean can RequestVM Death Event public void set Default Stratum String arg1 public String get Default Stratum  canRequestVMDeathEvent setDefaultStratum getDefaultStratum
public void set Default Stratum String arg1 public String get Default Stratum public boolean can Be Modified  setDefaultStratum getDefaultStratum canBeModified

public interface Virtual Machine Manager public List all Connectors  VirtualMachineManager allConnectors
public interface Virtual Machine Manager public List all Connectors public List attaching Connectors  VirtualMachineManager allConnectors attachingConnectors
public List all Connectors public List attaching Connectors public Virtual Machine create Virtual Machine Connection arg1 throws IO Exception  allConnectors attachingConnectors VirtualMachine createVirtualMachine IOException
public List attaching Connectors public Virtual Machine create Virtual Machine Connection arg1 throws IO Exception public Virtual Machine create Virtual Machine Connection arg1 Process arg2 throws IO Exception  attachingConnectors VirtualMachine createVirtualMachine IOException VirtualMachine createVirtualMachine IOException
public Virtual Machine create Virtual Machine Connection arg1 throws IO Exception public Virtual Machine create Virtual Machine Connection arg1 Process arg2 throws IO Exception public List connected Virtual Machines  VirtualMachine createVirtualMachine IOException VirtualMachine createVirtualMachine IOException connectedVirtualMachines
public Virtual Machine create Virtual Machine Connection arg1 Process arg2 throws IO Exception public List connected Virtual Machines public Launching Connector default Connector  VirtualMachine createVirtualMachine IOException connectedVirtualMachines LaunchingConnector defaultConnector
public List connected Virtual Machines public Launching Connector default Connector public List launching Connectors  connectedVirtualMachines LaunchingConnector defaultConnector launchingConnectors
public Launching Connector default Connector public List launching Connectors public List listening Connectors  LaunchingConnector defaultConnector launchingConnectors listeningConnectors
public List launching Connectors public List listening Connectors public int major Interface Version  launchingConnectors listeningConnectors majorInterfaceVersion
public List listening Connectors public int major Interface Version public int minor Interface Version  listeningConnectors majorInterfaceVersion minorInterfaceVersion

public class VM Cannot Be Modified Exception extends Unsupported Operation Exception public VM Cannot Be Modified Exception  VMCannotBeModifiedException UnsupportedOperationException VMCannotBeModifiedException
public VM Cannot Be Modified Exception public VM Cannot Be Modified Exception String arg1 super arg1  VMCannotBeModifiedException VMCannotBeModifiedException

public class VM Disconnected Exception extends Runtime Exception public VM Disconnected Exception  VMDisconnectedException RuntimeException VMDisconnectedException
public VM Disconnected Exception java lang String arg1 super arg1  VMDisconnectedException

public class VM Mismatch Exception extends Runtime Exception public VM Mismatch Exception  VMMismatchException RuntimeException VMMismatchException
public class VM Mismatch Exception extends Runtime Exception public VM Mismatch Exception public VM Mismatch Exception String arg1 super arg1  VMMismatchException RuntimeException VMMismatchException VMMismatchException

public class VM Out Of Memory Exception extends Runtime Exception public VM Out Of Memory Exception  VMOutOfMemoryException RuntimeException VMOutOfMemoryException
public class VM Out Of Memory Exception extends Runtime Exception public VM Out Of Memory Exception public VM Out Of Memory Exception String s super s  VMOutOfMemoryException RuntimeException VMOutOfMemoryException VMOutOfMemoryException

public interface Void Value extends Value public boolean equals Object arg1  VoidValue
public interface Void Value extends Value public boolean equals Object arg1 public int hash Code  VoidValue hashCode

Not implemented public static void add Language Listener int long hwnd Runnable runnable  addLanguageListener
public static void draw Glyphs GC gc char render Buffer int render Dx int x int y  drawGlyphs renderBuffer renderDx
public static boolean is Bidi Platform return false  isBidiPlatform
Not implemented public static boolean is Keyboard Bidi return false  isKeyboardBidi
Not implemented public static int get Font Bidi Attributes GC gc return 0  getFontBidiAttributes
public static void get Order Info GC gc String text int order byte class Buffer int flags int offsets  getOrderInfo classBuffer
public static char get Render Info GC gc String text int order byte class Buffer int dx int flags int offsets return null  getRenderInfo classBuffer
Not implemented Returns 0 public static int get Keyboard Language return 0  getKeyboardLanguage
Not implemented public static void remove Language Listener int long hwnd  removeLanguageListener
Not implemented public static void set Keyboard Language int language  setKeyboardLanguage
Not implemented public static boolean set Orientation int long hwnd int orientation return false  setOrientation

Listener listener new Listener public void handle Event Event event switch event type case SWT Dispose on Dispose break case SWT Mouse Down on Mouse Down event break case SWT Mouse Exit on Mouse Exit break case SWT Mouse Move on Mouse Move event break case SWT Mouse Up on Mouse Up event break case SWT Mouse Double Click on Mouse Double Click event break case SWT Paint on Paint event break  handleEvent onDispose MouseDown onMouseDown MouseExit onMouseExit MouseMove onMouseMove MouseUp onMouseUp MouseDoubleClick onMouseDoubleClick onPaint
boolean in Dispose false Constructs a new instance of this class 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 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Cool Bar Composite parent int style super parent check Style style hover Cursor new Cursor display SWT CURSOR SIZEWE drag Cursor new Cursor display SWT CURSOR SIZEALL Listener listener new Listener public void handle Event Event event switch event type case SWT Dispose on Dispose break case SWT Mouse Down on Mouse Down event break case SWT Mouse Exit on Mouse Exit break case SWT Mouse Move on Mouse Move event break case SWT Mouse Up on Mouse Up event break case SWT Mouse Double Click on Mouse Double Click event break case SWT Paint on Paint event break int events new int SWT Dispose SWT Mouse Down SWT Mouse Exit SWT Mouse Move SWT Mouse Up SWT Mouse Double Click SWT Paint for int i 0 i events length i add Listener events i listener  inDispose IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle CoolBar checkStyle hoverCursor CURSOR_SIZEWE dragCursor CURSOR_SIZEALL handleEvent onDispose MouseDown onMouseDown MouseExit onMouseExit MouseMove onMouseMove MouseUp onMouseUp MouseDoubleClick onMouseDoubleClick onPaint MouseDown MouseExit MouseMove MouseUp MouseDoubleClick addListener
private static int check Style int style style SWT NO FOCUS return style SWT NO REDRAW RESIZE SWT V SCROLL SWT H SCROLL  checkStyle NO_FOCUS NO_REDRAW_RESIZE V_SCROLL H_SCROLL
return style SWT NO REDRAW RESIZE SWT V SCROLL SWT H SCROLL protected void check Subclass if is Valid Subclass error SWT ERROR INVALID SUBCLASS  NO_REDRAW_RESIZE V_SCROLL H_SCROLL checkSubclass isValidSubclass ERROR_INVALID_SUBCLASS
public Point compute Size int w Hint int h Hint boolean changed check Widget int width 0 height 0 wrap Items w Hint boolean flat style SWT FLAT 0 for int row 0 row items length row int row Width 0 row Height 0 for int i 0 i items row length i Cool Item item items row i row Width item preferred Width row Height Math max row Height item preferred Height height row Height if flat row 0 height ROW SPACING width Math max width row Width wrap Items get Size x if width 0 width DEFAULT WIDTH if height 0 height DEFAULT HEIGHT if w Hint SWT DEFAULT width w Hint if h Hint SWT DEFAULT height h Hint Rectangle trim compute Trim 0 0 width height return new Point trim width trim height  computeSize wHint hHint checkWidget wrapItems wHint rowWidth rowHeight CoolItem rowWidth preferredWidth rowHeight rowHeight preferredHeight rowHeight ROW_SPACING rowWidth wrapItems getSize DEFAULT_WIDTH DEFAULT_HEIGHT wHint wHint hHint hHint computeTrim
Cool Item get Grabbed Item int x int y for int row 0 row items length row for int i 0 i items row length i Cool Item item items row i Rectangle bounds item get Bounds bounds width Cool Item MINIMUM WIDTH if bounds x x break if bounds y y return null if bounds contains x y return item return null  CoolItem getGrabbedItem CoolItem getBounds CoolItem MINIMUM_WIDTH
Returns the item that is currently displayed at the given zero relative index Throws an exception if the index is out of range param index the visual index of the item to return return the item at the given visual index exception Illegal Argument Exception ul li ERROR INVALID RANGE if the index is not between 0 and the number of elements in the list minus 1 inclusive li ul 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 exception SWT Error ul li ERROR CANNOT GET ITEM if the operation fails because of an operating system failure li ul public Cool Item get Item int index check Widget if index 0 error SWT ERROR INVALID RANGE for int row 0 row items length row if items row length index return items row index else index items row length error SWT ERROR INVALID RANGE return null  IllegalArgumentException ERROR_INVALID_RANGE SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_ITEM CoolItem getItem checkWidget ERROR_INVALID_RANGE ERROR_INVALID_RANGE
Returns the number of items contained in the receiver return the number of items 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 exception SWT Error ul li ERROR CANNOT GET COUNT if the operation fails because of an operating system failure li ul public int get Item Count check Widget return original Items length  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_COUNT getItemCount checkWidget originalItems
Returns an array of code Cool Item code s in the order in which they are currently being displayed p Note This is not the actual structure used by the receiver to maintain its list of items so modifying the array will not affect the receiver p return the receiver s items in their current visual order 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 exception SWT Error ul li ERROR CANNOT GET ITEM if the operation fails because of an operating system failure li ul public Cool Item get Items check Widget Cool Item result new Cool Item get Item Count int offset 0 for int row 0 row items length row System arraycopy items row 0 result offset items row length offset items row length return result  CoolItem SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_ITEM CoolItem getItems checkWidget CoolItem CoolItem getItemCount
Point find Item Cool Item item for int row 0 row items length row for int i 0 i items row length i if items row i equals item return new Point i row return new Point 1 1  findItem CoolItem
Searches the receiver s items in the order they are currently being displayed starting at the first item index 0 until an item is found that is equal to the argument and returns the index of that item If no item is found returns 1 param item the search item return the visual order index of the search item or 1 if the item is not found exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the item is null li li ERROR INVALID ARGUMENT if the item is disposed li ul 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 int index Of Cool Item item check Widget if item null error SWT ERROR NULL ARGUMENT if item is Disposed error SWT ERROR INVALID ARGUMENT int answer 0 for int row 0 row items length row for int i 0 i items row length i if items row i equals item return answer else answer return 1  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS indexOf CoolItem checkWidget ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT
Insert the item into the row Adjust the x and width values appropriately void insert Item Into Row Cool Item item int row Index int x root int bar Width get Size x int rowY items row Index 0 get Bounds y int x Math max 0 x root to Display new Point 0 0 x Find the insertion index and add the item int index for index 0 index items row Index length index if x items row Index index get Bounds x break if index 0 item wrap true items row Index 0 wrap false int old Length items row Index length Cool Item new Row new Cool Item old Length 1 System arraycopy items row Index 0 new Row 0 index new Row index item System arraycopy items row Index index new Row index 1 old Length index items row Index new Row Adjust the width of the item to the left if index 0 Cool Item left items row Index index 1 Rectangle left Bounds left get Bounds int new Width x left Bounds x if new Width left internal Get Minimum Width x left internal Get Minimum Width new Width new Width left internal Get Minimum Width left set Bounds left Bounds x left Bounds y new Width left Bounds height left requested Width new Width Set the item s bounds int width 0 height item get Size y if index items row Index length 1 Cool Item right items row Index index 1 width right get Bounds x x if width right internal Get Minimum Width move Right right right internal Get Minimum Width width width right get Bounds x x item set Bounds x rowY width height if width item internal Get Minimum Width move Left item item internal Get Minimum Width width else width Math max item internal Get Minimum Width bar Width x item set Bounds x rowY width height if x width bar Width move Left item x width bar Width Rectangle bounds item get Bounds item requested Width bounds width redraw bounds x bounds y item internal Get Minimum Width bounds height false  insertItemIntoRow CoolItem rowIndex x_root barWidth getSize rowIndex getBounds x_root toDisplay rowIndex rowIndex getBounds rowIndex oldLength rowIndex CoolItem newRow CoolItem oldLength rowIndex newRow newRow rowIndex newRow oldLength rowIndex newRow CoolItem rowIndex leftBounds getBounds newWidth leftBounds newWidth internalGetMinimumWidth internalGetMinimumWidth newWidth newWidth internalGetMinimumWidth setBounds leftBounds leftBounds newWidth leftBounds requestedWidth newWidth getSize rowIndex CoolItem rowIndex getBounds internalGetMinimumWidth moveRight internalGetMinimumWidth getBounds setBounds internalGetMinimumWidth moveLeft internalGetMinimumWidth internalGetMinimumWidth barWidth setBounds barWidth moveLeft barWidth getBounds requestedWidth internalGetMinimumWidth
void create Item Cool Item item int index int item Count get Item Count row 0 if 0 index index item Count error SWT ERROR INVALID RANGE if items length 0 items new Cool Item 1 1 items 0 0 item else int i index find the row to insert into if index item Count while i items row length i items row length row else row items length 1 i items row length Set the last item in the row to the preferred size and add the new one just to it s right int last Index items row length 1 Cool Item last Item items row last Index if last Item ideal Rectangle bounds last Item get Bounds bounds width last Item preferred Width bounds height last Item preferred Height last Item requested Width last Item preferred Width last Item set Bounds bounds x bounds y bounds width bounds height if i 0 item wrap true items row 0 wrap false int old Length items row length Cool Item new Row new Cool Item old Length 1 System arraycopy items row 0 new Row 0 i new Row i item System arraycopy items row i new Row i 1 old Length i items row new Row item requested Width Cool Item MINIMUM WIDTH int length original Items length Cool Item new Originals new Cool Item length 1 System arraycopy original Items 0 new Originals 0 index System arraycopy original Items index new Originals index 1 length index new Originals index item original Items new Originals layout Items  createItem CoolItem itemCount getItemCount itemCount ERROR_INVALID_RANGE CoolItem itemCount lastIndex CoolItem lastItem lastIndex lastItem lastItem getBounds lastItem preferredWidth lastItem preferredHeight lastItem requestedWidth lastItem preferredWidth lastItem setBounds oldLength CoolItem newRow CoolItem oldLength newRow newRow newRow oldLength newRow requestedWidth CoolItem MINIMUM_WIDTH originalItems CoolItem newOriginals CoolItem originalItems newOriginals originalItems newOriginals newOriginals originalItems newOriginals layoutItems
void destroy Item Cool Item item if in Dispose return int row find Item item y if row 1 return Rectangle bounds item get Bounds remove Item From Row item row true int index 0 while index original Items length if original Items index item break index int length original Items length 1 Cool Item new Originals new Cool Item length System arraycopy original Items 0 new Originals 0 index System arraycopy original Items index 1 new Originals index length index original Items new Originals redraw bounds x bounds y Cool Item MINIMUM WIDTH bounds height false relayout  destroyItem CoolItem inDispose findItem getBounds removeItemFromRow originalItems originalItems originalItems CoolItem newOriginals CoolItem originalItems newOriginals originalItems newOriginals originalItems newOriginals CoolItem MINIMUM_WIDTH
void move Down Cool Item item int x root int old Row Index find Item item y boolean resize false if items old Row Index length 1 resize true If this is the only item in the bottom row don t move it if old Row Index items length 1 return int new Row Index items old Row Index length 1 old Row Index old Row Index 1 remove Item From Row item old Row Index false Rectangle old item get Bounds redraw old x old y Cool Item MINIMUM WIDTH old height false if new Row Index items length Create a new bottom row for the item Cool Item new Rows new Cool Item items length 1 System arraycopy items 0 new Rows 0 items length int row items length new Rows row new Cool Item 1 new Rows row 0 item items new Rows resize true item wrap true else insert Item Into Row item new Row Index x root if resize relayout else layout Items  moveDown CoolItem x_root oldRowIndex findItem oldRowIndex oldRowIndex newRowIndex oldRowIndex oldRowIndex oldRowIndex removeItemFromRow oldRowIndex getBounds CoolItem MINIMUM_WIDTH newRowIndex CoolItem newRows CoolItem newRows newRows CoolItem newRows newRows insertItemIntoRow newRowIndex x_root layoutItems
void move Left Cool Item item int pixels Point point find Item item int row point y int index point x if index 0 return Rectangle bounds item get Bounds int min Space On Left 0 for int i 0 i index i min Space On Left items row i internal Get Minimum Width int x Math max min Space On Left bounds x pixels Cool Item left items row index 1 Rectangle left Bounds left get Bounds if left Bounds x left internal Get Minimum Width x int shift left Bounds x left internal Get Minimum Width x move Left left shift left Bounds left get Bounds int left Width Math max left internal Get Minimum Width left Bounds width pixels left set Bounds left Bounds x left Bounds y left Width left Bounds height left requested Width left Width int width bounds width bounds x x item set Bounds x bounds y width bounds height item requested Width width int damaged Width bounds x x Cool Item MINIMUM WIDTH if damaged Width Cool Item MINIMUM WIDTH redraw x bounds y damaged Width bounds height false  moveLeft CoolItem findItem getBounds minSpaceOnLeft minSpaceOnLeft internalGetMinimumWidth minSpaceOnLeft CoolItem leftBounds getBounds leftBounds internalGetMinimumWidth leftBounds internalGetMinimumWidth moveLeft leftBounds getBounds leftWidth internalGetMinimumWidth leftBounds setBounds leftBounds leftBounds leftWidth leftBounds requestedWidth leftWidth setBounds requestedWidth damagedWidth CoolItem MINIMUM_WIDTH damagedWidth CoolItem MINIMUM_WIDTH damagedWidth
void move Right Cool Item item int pixels Point point find Item item int row point y int index point x if index 0 return Rectangle bounds item get Bounds int min Space On Right 0 for int i index i items row length i min Space On Right items row i internal Get Minimum Width int max get Bounds width min Space On Right int x Math min max bounds x pixels int width 0 if index 1 items row length width get Bounds width x else Cool Item right items row index 1 Rectangle right Bounds right get Bounds if x item internal Get Minimum Width right Bounds x int shift x item internal Get Minimum Width right Bounds x move Right right shift right Bounds right get Bounds width right Bounds x x item set Bounds x bounds y width bounds height item requested Width width Cool Item left items row index 1 Rectangle left Bounds left get Bounds int left Width x left Bounds x left set Bounds left Bounds x left Bounds y left Width left Bounds height left requested Width left Width int damaged Width x bounds x Cool Item MINIMUM WIDTH Cool Item MARGIN WIDTH if x bounds x 0 redraw bounds x Cool Item MARGIN WIDTH bounds y damaged Width bounds height false  moveRight CoolItem findItem getBounds minSpaceOnRight minSpaceOnRight internalGetMinimumWidth getBounds minSpaceOnRight getBounds CoolItem rightBounds getBounds internalGetMinimumWidth rightBounds internalGetMinimumWidth rightBounds moveRight rightBounds getBounds rightBounds setBounds requestedWidth CoolItem leftBounds getBounds leftWidth leftBounds setBounds leftBounds leftBounds leftWidth leftBounds requestedWidth leftWidth damagedWidth CoolItem MINIMUM_WIDTH CoolItem MARGIN_WIDTH CoolItem MARGIN_WIDTH damagedWidth
void move Up Cool Item item int x root Point point find Item item int old Row Index point y boolean resize false if items old Row Index length 1 resize true If this is the only item in the top row don t move it if old Row Index 0 return remove Item From Row item old Row Index false Rectangle old item get Bounds redraw old x old y Cool Item MINIMUM WIDTH old height false int new Row Index Math max 0 old Row Index 1 if old Row Index 0 Create a new top row for the item Cool Item new Rows new Cool Item items length 1 System arraycopy items 0 new Rows 1 items length new Rows 0 new Cool Item 1 new Rows 0 0 item items new Rows resize true item wrap true else insert Item Into Row item new Row Index x root if resize relayout else layout Items  moveUp CoolItem x_root findItem oldRowIndex oldRowIndex oldRowIndex removeItemFromRow oldRowIndex getBounds CoolItem MINIMUM_WIDTH newRowIndex oldRowIndex oldRowIndex CoolItem newRows CoolItem newRows newRows CoolItem newRows newRows insertItemIntoRow newRowIndex x_root layoutItems
void on Dispose Usually when an item is disposed destroy Item will change the size of the items array and reset the bounds of all the remaining cool items Since the whole cool bar is being disposed this is not necessary For speed the in Dispose flag is used to skip over this part of the item dispose in Dispose true for int i 0 i items length i for int j 0 j items i length j items i j dispose hover Cursor dispose drag Cursor dispose  onDispose destroyItem inDispose inDispose hoverCursor dragCursor
void on Mouse Down Event event if is Locked event button 1 return dragging get Grabbed Item event x event y if dragging null mouseX Offset event x itemX Offset mouseX Offset dragging get Bounds x set Cursor drag Cursor  onMouseDown isLocked getGrabbedItem mouseXOffset itemXOffset mouseXOffset getBounds setCursor dragCursor
void on Mouse Exit if dragging null set Cursor null  onMouseExit setCursor
void on Mouse Move Event event if is Locked return Cool Item grabbed get Grabbed Item event x event y if dragging null int left root to Display new Point event x event y x itemX Offset Rectangle bounds dragging get Bounds if event y bounds y move Up dragging left root else if event y bounds y bounds height move Down dragging left root else if event x mouseX Offset int distance Math min mouseX Offset bounds x itemX Offset event x if distance 0 move Left dragging distance else if event x mouseX Offset int distance event x Math max mouseX Offset bounds x itemX Offset if distance 0 move Right dragging distance mouseX Offset event x return if grabbed null set Cursor hover Cursor else set Cursor null  onMouseMove isLocked CoolItem getGrabbedItem left_root toDisplay itemXOffset getBounds moveUp left_root moveDown left_root mouseXOffset mouseXOffset itemXOffset moveLeft mouseXOffset mouseXOffset itemXOffset moveRight mouseXOffset setCursor hoverCursor setCursor
void on Mouse Up Event event set Cursor null dragging null  onMouseUp setCursor
void on Mouse Double Click Event event if is Locked return dragging null Cool Item target get Grabbed Item event x event y if target null set Cursor null return Point location find Item target int row location y int index location x if items row length 1 Point size target get Size int max Size get Size x for int i 0 i items row length i if i index max Size items row i internal Get Minimum Width if size x max Size The item is at its maximum width It should be resized to its minimum width int distance size x target internal Get Minimum Width if index 1 items row length There is an item to the right Maximize it Cool Item right items row index 1 move Left right distance else There is no item to the right Move the item all the way right move Right target distance else if size x target preferred Width The item is less than its preferred Width Resize to preferred Width int distance target preferred Width size x if index 1 items row length Cool Item right items row index 1 move Right right distance distance target preferred Width target get Size x if distance 0 move Left target distance else The item is at its minimum width Maximize it for int i 0 i items row length i if i index Cool Item item items row i item requested Width Math max item internal Get Minimum Width Cool Item MINIMUM WIDTH target requested Width max Size layout Items set Cursor hover Cursor  onMouseDoubleClick isLocked CoolItem getGrabbedItem setCursor findItem getSize maxSize getSize maxSize internalGetMinimumWidth maxSize internalGetMinimumWidth CoolItem moveLeft moveRight preferredWidth preferredWidth preferredWidth preferredWidth CoolItem moveRight preferredWidth getSize moveLeft CoolItem requestedWidth internalGetMinimumWidth CoolItem MINIMUM_WIDTH requestedWidth maxSize layoutItems setCursor hoverCursor
void on Paint Event event GC gc event gc if items length 0 return Color shadow Color display get System Color SWT COLOR WIDGET NORMAL SHADOW Color highlight Color display get System Color SWT COLOR WIDGET HIGHLIGHT SHADOW boolean flat style SWT FLAT 0 int stopX get Bounds width Rectangle clipping gc get Clipping for int row 0 row items length row Rectangle bounds new Rectangle 0 0 0 0 for int i 0 i items row length i bounds items row i get Bounds if clipping intersects bounds continue boolean native Gripper false Draw gripper if is Locked if flat native Gripper draw Gripper bounds x bounds y Cool Item MINIMUM WIDTH bounds height if native Gripper int grabber Trim 2 int grabber Height bounds height 2 grabber Trim 1 gc set Foreground shadow Color gc draw Rectangle bounds x Cool Item MARGIN WIDTH bounds y grabber Trim 2 grabber Height gc set Foreground highlight Color gc draw Line bounds x Cool Item MARGIN WIDTH bounds y grabber Trim 1 bounds x Cool Item MARGIN WIDTH bounds y grabber Trim grabber Height 1 gc draw Line bounds x Cool Item MARGIN WIDTH bounds y grabber Trim bounds x Cool Item MARGIN WIDTH 1 bounds y grabber Trim Draw separator if flat native Gripper i 0 gc set Foreground shadow Color gc draw Line bounds x bounds y bounds x bounds y bounds height 1 gc set Foreground highlight Color gc draw Line bounds x 1 bounds y bounds x 1 bounds y bounds height 1 if flat row 1 items length Draw row separator int separatorY bounds y bounds height gc set Foreground shadow Color gc draw Line 0 separatorY stopX separatorY gc set Foreground highlight Color gc draw Line 0 separatorY 1 stopX separatorY 1  onPaint shadowColor getSystemColor COLOR_WIDGET_NORMAL_SHADOW highlightColor getSystemColor COLOR_WIDGET_HIGHLIGHT_SHADOW getBounds getClipping getBounds nativeGripper isLocked nativeGripper drawGripper CoolItem MINIMUM_WIDTH nativeGripper grabberTrim grabberHeight grabberTrim setForeground shadowColor drawRectangle CoolItem MARGIN_WIDTH grabberTrim grabberHeight setForeground highlightColor drawLine CoolItem MARGIN_WIDTH grabberTrim CoolItem MARGIN_WIDTH grabberTrim grabberHeight drawLine CoolItem MARGIN_WIDTH grabberTrim CoolItem MARGIN_WIDTH grabberTrim nativeGripper setForeground shadowColor drawLine setForeground highlightColor drawLine setForeground shadowColor drawLine setForeground highlightColor drawLine
Remove the item from the row Adjust the x and width values appropriately void remove Item From Row Cool Item item int row Index boolean disposed int index find Item item x int new Length items row Index length 1 Rectangle item Bounds item get Bounds item wrap false if new Length 0 Cool Item new Row new Cool Item new Length System arraycopy items row Index 0 new Row 0 index System arraycopy items row Index index 1 new Row index new Row length index items row Index new Row items row Index 0 wrap true else Cool Item new Rows new Cool Item items length 1 System arraycopy items 0 new Rows 0 row Index System arraycopy items row Index 1 new Rows row Index new Rows length row Index items new Rows return if disposed if index 0 Cool Item first items row Index 0 Rectangle bounds first get Bounds int width bounds x bounds width first set Bounds 0 bounds y width bounds height first requested Width width redraw bounds x bounds y Cool Item MINIMUM WIDTH bounds height false else Cool Item previous items row Index index 1 Rectangle bounds previous get Bounds int width bounds width item Bounds width previous set Bounds bounds x bounds y width bounds height previous requested Width width  removeItemFromRow CoolItem rowIndex findItem newLength rowIndex itemBounds getBounds newLength CoolItem newRow CoolItem newLength rowIndex newRow rowIndex newRow newRow rowIndex newRow rowIndex CoolItem newRows CoolItem newRows rowIndex rowIndex newRows rowIndex newRows rowIndex newRows CoolItem rowIndex getBounds setBounds requestedWidth CoolItem MINIMUM_WIDTH CoolItem rowIndex getBounds itemBounds setBounds requestedWidth
Return the height of the bar after it has been properly layed out for the given width int layout Items int y 0 width get Size x wrap Items width int row Spacing style SWT FLAT 0 0 ROW SPACING for int row 0 row items length row int count items row length int x 0 determine the height and the available width for the row int row Height 0 int available width for int i 0 i count i Cool Item item items row i row Height Math max row Height item get Size y available item internal Get Minimum Width if row 0 y row Spacing lay the items out for int i 0 i count i Cool Item child items row i int new Width available child internal Get Minimum Width if i 1 count new Width Math min new Width child requested Width available new Width child internal Get Minimum Width Rectangle old Bounds child get Bounds Rectangle new Bounds new Rectangle x y new Width row Height if old Bounds equals new Bounds child set Bounds new Bounds x new Bounds y new Bounds width new Bounds height Rectangle damage new Rectangle 0 0 0 0 Cases are in descending order from most area to redraw to least if old Bounds y new Bounds y damage new Bounds damage add old Bounds Redraw the row separator as well damage y row Spacing damage height 2 row Spacing else if old Bounds height new Bounds height Draw from the bottom of the gripper to the bottom of the new area Bottom of the gripper is 3 from the bottom of the item damage y new Bounds y Math min old Bounds height new Bounds height 3 damage height new Bounds y new Bounds height row Spacing damage x old Bounds x Cool Item MARGIN WIDTH damage width old Bounds width Cool Item MARGIN WIDTH else if old Bounds x new Bounds x Redraw only the difference between the separators damage x Math min old Bounds x new Bounds x damage width Math abs old Bounds x new Bounds x Cool Item MINIMUM WIDTH damage y old Bounds y damage height old Bounds height redraw damage x damage y damage width damage height false x new Width y row Height return y  layoutItems getSize wrapItems rowSpacing ROW_SPACING rowHeight CoolItem rowHeight rowHeight getSize internalGetMinimumWidth rowSpacing CoolItem newWidth internalGetMinimumWidth newWidth newWidth requestedWidth newWidth internalGetMinimumWidth oldBounds getBounds newBounds newWidth rowHeight oldBounds newBounds setBounds newBounds newBounds newBounds newBounds oldBounds newBounds newBounds oldBounds rowSpacing rowSpacing oldBounds newBounds newBounds oldBounds newBounds newBounds newBounds rowSpacing oldBounds CoolItem MARGIN_WIDTH oldBounds CoolItem MARGIN_WIDTH oldBounds newBounds oldBounds newBounds oldBounds newBounds CoolItem MINIMUM_WIDTH oldBounds oldBounds newWidth rowHeight
void relayout Point size get Size int height layout Items Rectangle trim compute Trim 0 0 0 height if height size y super set Size size x trim height  getSize layoutItems computeTrim setSize
if height size y super set Size size x trim height public void set Bounds int x int y int width int height super set Bounds x y width height layout Items  setSize setBounds setBounds layoutItems
layout Items public void set Size int width int height super set Size width height layout Items  layoutItems setSize setSize layoutItems
Returns an array of zero relative ints that map the creation order of the receiver s items to the order in which they are currently being displayed p Specifically the indices of the returned array represent the current visual order of the items and the contents of the array represent the creation order of the items p p Note This is not the actual structure used by the receiver to maintain its list of items so modifying the array will not affect the receiver p return the current visual order of the receiver s items 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 exception SWT Error ul li ERROR CANNOT GET ITEM if the operation fails because of an operating system failure li ul public int get Item Order check Widget int count get Item Count int indices new int count count 0 for int i 0 i items length i for int j 0 j items i length j Cool Item item items i j int index 0 while index original Items length if original Items index item break index if index original Items length error SWT ERROR CANNOT GET ITEM indices count index return indices  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SWTError ERROR_CANNOT_GET_ITEM getItemOrder checkWidget getItemCount CoolItem originalItems originalItems originalItems ERROR_CANNOT_GET_ITEM
void set Item Order int item Order if item Order null error SWT ERROR NULL ARGUMENT int count original Items length if item Order length count error SWT ERROR INVALID ARGUMENT Ensure that item Order does not contain any duplicates boolean set new boolean count for int i 0 i set length i set i false for int i 0 i item Order length i if item Order i 0 item Order i count error SWT ERROR INVALID ARGUMENT if set item Order i error SWT ERROR INVALID ARGUMENT set item Order i true Cool Item row new Cool Item count for int i 0 i count i row i original Items item Order i items new Cool Item 1 count items 0 row  setItemOrder itemOrder itemOrder ERROR_NULL_ARGUMENT originalItems itemOrder ERROR_INVALID_ARGUMENT itemOrder itemOrder itemOrder itemOrder ERROR_INVALID_ARGUMENT itemOrder ERROR_INVALID_ARGUMENT itemOrder CoolItem CoolItem originalItems itemOrder CoolItem
Returns an array of points whose x and y coordinates describe the widths and heights respectively of the items in the receiver in the order in which they are currently being displayed return the receiver s item sizes in their current visual order 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 Point get Item Sizes check Widget Cool Item items get Items Point sizes new Point items length for int i 0 i items length i sizes i items i get Size return sizes  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getItemSizes checkWidget CoolItem getItems getSize
void set Item Sizes Point sizes if sizes null error SWT ERROR NULL ARGUMENT Cool Item items get Items if sizes length items length error SWT ERROR INVALID ARGUMENT for int i 0 i items length i items i set Size sizes i  setItemSizes ERROR_NULL_ARGUMENT CoolItem getItems ERROR_INVALID_ARGUMENT setSize
Returns whether or not the receiver is locked When a coolbar is locked its items cannot be repositioned return true if the coolbar is locked false otherwise 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 since 2 0 public boolean get Locked check Widget return is Locked  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getLocked checkWidget isLocked
Returns an array of ints that describe the zero relative indices of any item s in the receiver that will begin on a new row The 0th visible item always begins the first row therefore it does not count as a wrap index return an array containing the receiver s wrap indices or an empty array if all items are in one row 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 int get Wrap Indices check Widget if items length 1 return new int int wrap Indices new int items length 1 int i 0 next Wrap items 0 length for int row 1 row items length row if items row 0 wrap wrap Indices i next Wrap next Wrap items row length if i wrap Indices length int tmp new int i System arraycopy wrap Indices 0 tmp 0 i return tmp return wrap Indices  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getWrapIndices checkWidget wrapIndices nextWrap wrapIndices nextWrap nextWrap wrapIndices wrapIndices wrapIndices
Sets whether or not the receiver is locked When a coolbar is locked its items cannot be repositioned param locked lock the coolbar if true otherwise unlock the coolbar 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 since 2 0 public void set Locked boolean locked check Widget if is Locked locked redraw is Locked locked  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setLocked checkWidget isLocked isLocked
Sets the indices of all item s in the receiver that will begin on a new row The indices are given in the order in which they are currently being displayed The 0th item always begins the first row therefore it does not count as a wrap index If indices is null or empty the items will be placed on one line param indices an array of wrap indices or null 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 set Wrap Indices int indices check Widget if indices null indices new int 0 int count original Items length for int i 0 i indices length i if indices i 0 indices i count error SWT ERROR INVALID ARGUMENT for int i 0 i original Items length i original Items i wrap false for int i 0 i indices length i int index indices i for int row 0 row items length row if items row length index items row index wrap true break else index items row length relayout  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setWrapIndices checkWidget originalItems ERROR_INVALID_ARGUMENT originalItems originalItems
Sets the receiver s item order wrap indices and item sizes all at once This method is typically used to restore the displayed state of the receiver to a previously stored state p The item order is the order in which the items in the receiver should be displayed given in terms of the zero relative ordering of when the items were added p p The wrap indices are the indices of all item s in the receiver that will begin on a new row The indices are given in the order specified by the item order The 0th item always begins the first row therefore it does not count as a wrap index If wrap indices is null or empty the items will be placed on one line p p The sizes are specified in an array of points whose x and y coordinates describe the new widths and heights respectively of the receiver s items in the order specified by the item order p param item Order an array of indices that describe the new order to display the items in param wrap Indices an array of wrap indices or null param sizes an array containing the new sizes for each of the receiver s items in visual order 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if item order or sizes is null li li ERROR INVALID ARGUMENT if item order or sizes is not the same length as the number of items li ul exception SWT Error ul li ERROR CANNOT GET ITEM if the operation fails because of an operating system failure li ul public void set Item Layout int item Order int wrap Indices Point sizes check Widget set Item Order item Order set Wrap Indices wrap Indices set Item Sizes sizes relayout  itemOrder wrapIndices SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTError ERROR_CANNOT_GET_ITEM setItemLayout itemOrder wrapIndices checkWidget setItemOrder itemOrder setWrapIndices wrapIndices setItemSizes
void wrap Items int max Width int item Count original Items length if item Count 2 return Cool Item items Visual new Cool Item item Count int start 0 for int row 0 row items length row System arraycopy items row 0 items Visual start items row length start items row length Cool Item new Items new Cool Item item Count int row Count 0 row Width 0 start 0 for int i 0 i item Count i Cool Item item items Visual i int item Width item internal Get Minimum Width if i 0 item wrap max Width SWT DEFAULT row Width item Width max Width if i start new Items row Count new Cool Item 1 new Items row Count 0 item start i 1 row Width 0 else int count i start new Items row Count new Cool Item count System arraycopy items Visual start new Items row Count 0 count start i row Width item Width row Count else row Width item Width if start item Count int count item Count start new Items row Count new Cool Item count System arraycopy items Visual start new Items row Count 0 count row Count if new Items length row Count Cool Item tmp new Cool Item row Count System arraycopy new Items 0 tmp 0 row Count items tmp else items new Items  wrapItems maxWidth itemCount originalItems itemCount CoolItem itemsVisual CoolItem itemCount itemsVisual CoolItem newItems CoolItem itemCount rowCount rowWidth itemCount CoolItem itemsVisual itemWidth internalGetMinimumWidth maxWidth rowWidth itemWidth maxWidth newItems rowCount CoolItem newItems rowCount rowWidth newItems rowCount CoolItem itemsVisual newItems rowCount rowWidth itemWidth rowCount rowWidth itemWidth itemCount itemCount newItems rowCount CoolItem itemsVisual newItems rowCount rowCount newItems rowCount CoolItem CoolItem rowCount newItems rowCount newItems

Constructs a new instance of this class given its parent which must be a code Cool Bar code and a style value describing its behavior and appearance The item is added to the end of the items maintained by its parent p The style value is either one of the style constants defined in 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT DROP DOWN see Widget check Subclass see Widget get Style public Cool Item Cool Bar parent int style super parent style this parent parent parent create Item this parent get Item Count calculate Chevron Trim  CoolBar IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS DROP_DOWN checkSubclass getStyle CoolItem CoolBar createItem getItemCount calculateChevronTrim
Constructs a new instance of this class given its parent which must be a code Cool Bar code a style value describing its behavior and appearance and the index at which to place it in the items maintained by its parent p The style value is either one of the style constants defined in 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 param index the index at which to store the receiver in its parent exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT DROP DOWN see Widget check Subclass see Widget get Style public Cool Item Cool Bar parent int style int index super parent style this parent parent parent create Item this index calculate Chevron Trim  CoolBar IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS DROP_DOWN checkSubclass getStyle CoolItem CoolBar createItem calculateChevronTrim
Adds the listener to the collection of listeners that will be notified when the control is selected by sending it one of the messages defined in the code Selection Listener code interface p If code widget Selected code is called when the mouse is over the drop down arrow or chevron portion of the cool item the event object detail field contains the value code SWT ARROW code and the x and y fields in the event object represent the point at the bottom left of the chevron where the menu should be popped up code widget Default Selected code is not called p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event since 2 0 public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SelectionListener widgetSelected widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
add Listener SWT Default Selection typed Listener protected void check Subclass if is Valid Subclass error SWT ERROR INVALID SUBCLASS  addListener DefaultSelection typedListener checkSubclass isValidSubclass ERROR_INVALID_SUBCLASS
void calculate Chevron Trim Tool Bar tb new Tool Bar parent SWT FLAT Tool Item ti new Tool Item tb SWT PUSH Image image new Image display 1 1 ti set Image image Point size tb compute Size SWT DEFAULT SWT DEFAULT CHEVRON HORIZONTAL TRIM size x 1 CHEVRON VERTICAL TRIM size y 1 tb dispose ti dispose image dispose  calculateChevronTrim ToolBar ToolBar ToolItem ToolItem setImage computeSize CHEVRON_HORIZONTAL_TRIM CHEVRON_VERTICAL_TRIM
Returns the preferred size of the receiver p The em preferred size em of a code Cool Item code is the size that it would best be displayed at The width hint and height hint arguments allow the caller to ask the instance questions such as Given a particular width how high does it need to be to show all of the contents To indicate that the caller does not wish to constrain a particular dimension the constant code SWT DEFAULT code is passed for the hint p param w Hint the width hint can be code SWT DEFAULT code param h Hint the height hint can be code SWT DEFAULT code return the preferred size 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 Layout see get Bounds see get Size see Cool Bar get Border Width see Cool Bar compute Trim see Cool Bar get Client Area public Point compute Size int w Hint int h Hint check Widget int width w Hint height h Hint if w Hint SWT DEFAULT width 32 if h Hint SWT DEFAULT height 32 width MINIMUM WIDTH return new Point width height  CoolItem wHint hHint SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBounds getSize CoolBar getBorderWidth CoolBar computeTrim CoolBar getClientArea computeSize wHint hHint checkWidget wHint hHint wHint hHint MINIMUM_WIDTH
public void dispose if is Disposed return Must call parent destroy Item before super dispose since it needs to query the bounds to properly remove the item parent destroy Item this super dispose parent null control null Although the parent for the chevron is the Cool Bar Cool Item can not be the parent it has to be disposed with the item if chevron null chevron is Disposed chevron dispose chevron null if arrow Image null arrow Image is Disposed arrow Image dispose arrow Image null  isDisposed destroyItem destroyItem CoolBar CoolItem isDisposed arrowImage arrowImage isDisposed arrowImage arrowImage
Image create Arrow Image int width int height Color foreground parent get Foreground Color black display get System Color SWT COLOR BLACK Color background parent get Background Palette Data palette new Palette Data new RGB foreground getRGB background getRGB black getRGB Image Data image Data new Image Data width height 4 palette image Data transparent Pixel 1 Image image new Image display image Data GC gc new GC image gc set Background background gc fill Rectangle 0 0 width height gc set Foreground black int startX 0 int startY height 6 int step 2 gc draw Line startX startY startX step startY step gc draw Line startX startY 2 step startX step startY step startX gc draw Line startX startY startX step startY step gc draw Line startX startY 2 step startX step startY step startX 3 gc draw Line startX startY startX step startY step gc draw Line startX startY 2 step startX step startY step startX gc draw Line startX startY startX step startY step gc draw Line startX startY 2 step startX step startY step gc dispose return image  createArrowImage getForeground getSystemColor COLOR_BLACK getBackground PaletteData PaletteData ImageData imageData ImageData imageData transparentPixel imageData setBackground fillRectangle setForeground drawLine drawLine drawLine drawLine drawLine drawLine drawLine drawLine
Returns a rectangle describing the receiver s size and location relative to its parent return the receiver s bounding rectangle 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 Rectangle get Bounds check Widget return new Rectangle item Bounds x item Bounds y item Bounds width item Bounds height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBounds checkWidget itemBounds itemBounds itemBounds itemBounds
Returns the control that is associated with the receiver return the control that is contained by the receiver 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 Control get Control check Widget return control  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getControl checkWidget
Returns the minimum size that the cool item can be resized to using the cool item s gripper return a point containing the minimum width and height of the cool item in pixels 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 since 2 0 public Point get Minimum Size check Widget return new Point minimum Width minimum Height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getMinimumSize checkWidget minimumWidth minimumHeight
Returns the receiver s parent which must be a code Cool Bar code return the receiver s parent 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 Cool Bar get Parent check Widget return parent  CoolBar SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS CoolBar getParent checkWidget
Returns a point describing the receiver s ideal size The x coordinate of the result is the ideal width of the receiver The y coordinate of the result is the ideal height of the receiver return the receiver s ideal size 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 Point get Preferred Size check Widget return new Point preferred Width preferred Height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getPreferredSize checkWidget preferredWidth preferredHeight
Returns a point describing the receiver s size The x coordinate of the result is the width of the receiver The y coordinate of the result is the height of the receiver return the receiver s size 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 Point get Size check Widget return new Point item Bounds width item Bounds height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getSize checkWidget itemBounds itemBounds
int internal Get Minimum Width int width minimum Width MINIMUM WIDTH if style SWT DROP DOWN 0 width preferred Width width CHEVRON IMAGE WIDTH CHEVRON HORIZONTAL TRIM CHEVRON LEFT MARGIN return width  internalGetMinimumWidth minimumWidth MINIMUM_WIDTH DROP_DOWN preferredWidth CHEVRON_IMAGE_WIDTH CHEVRON_HORIZONTAL_TRIM CHEVRON_LEFT_MARGIN
void on Selection Event ev Rectangle bounds chevron get Bounds Event event new Event event detail SWT ARROW event x bounds x event y bounds y bounds height post Event SWT Selection event  onSelection getBounds postEvent
Removes the listener from the collection of listeners that will be notified when the control is selected param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener since 2 0 public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook SWT Selection listener event Table unhook SWT Default Selection listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT eventTable eventTable eventTable DefaultSelection
void set Bounds int x int y int width int height item Bounds x x item Bounds y y item Bounds width width item Bounds height height if control null int control Width width MINIMUM WIDTH if style SWT DROP DOWN 0 width preferred Width control Width CHEVRON IMAGE WIDTH CHEVRON HORIZONTAL TRIM CHEVRON LEFT MARGIN control set Bounds x MINIMUM WIDTH y control Width height update Chevron  setBounds itemBounds itemBounds itemBounds itemBounds controlWidth MINIMUM_WIDTH DROP_DOWN preferredWidth controlWidth CHEVRON_IMAGE_WIDTH CHEVRON_HORIZONTAL_TRIM CHEVRON_LEFT_MARGIN setBounds MINIMUM_WIDTH controlWidth updateChevron
Sets the control that is associated with the receiver to the argument param control the new control that will be contained by the receiver exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the control has been disposed li li ERROR INVALID PARENT if the control is not in the same widget tree li ul 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 set Control Control control check Widget if control null if control is Disposed error SWT ERROR INVALID ARGUMENT if control parent parent error SWT ERROR INVALID PARENT this control control if control null int control Width item Bounds width MINIMUM WIDTH if style SWT DROP DOWN 0 item Bounds width preferred Width control Width CHEVRON IMAGE WIDTH CHEVRON HORIZONTAL TRIM CHEVRON LEFT MARGIN control set Bounds item Bounds x MINIMUM WIDTH item Bounds y control Width item Bounds height  IllegalArgumentException ERROR_INVALID_ARGUMENT ERROR_INVALID_PARENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setControl checkWidget isDisposed ERROR_INVALID_ARGUMENT ERROR_INVALID_PARENT controlWidth itemBounds MINIMUM_WIDTH DROP_DOWN itemBounds preferredWidth controlWidth CHEVRON_IMAGE_WIDTH CHEVRON_HORIZONTAL_TRIM CHEVRON_LEFT_MARGIN setBounds itemBounds MINIMUM_WIDTH itemBounds controlWidth itemBounds
Sets the minimum size that the cool item can be resized to using the cool item s gripper to the point specified by the arguments param width the minimum width of the cool item in pixels param height the minimum height of the cool item in pixels 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 since 2 0 public void set Minimum Size int width int height check Widget minimum Width width minimum Height height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMinimumSize checkWidget minimumWidth minimumHeight
Sets the minimum size that the cool item can be resized to using the cool item s gripper to the point specified by the argument param size a point representing the minimum width and height of the cool item in pixels exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the point is null li ul 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 since 2 0 public void set Minimum Size Point size check Widget if size null error SWT ERROR NULL ARGUMENT set Minimum Size size x size y  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setMinimumSize checkWidget ERROR_NULL_ARGUMENT setMinimumSize
Sets the receiver s ideal size to the point specified by the arguments param width the new ideal width for the receiver param height the new ideal height for the receiver 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 set Preferred Size int width int height check Widget ideal true preferred Width Math max width minimum Width MINIMUM WIDTH preferred Height height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setPreferredSize checkWidget preferredWidth minimumWidth MINIMUM_WIDTH preferredHeight
Sets the receiver s ideal size to the point specified by the argument param size the new ideal size for the receiver exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the point is null li ul 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 set Preferred Size Point size check Widget if size null error SWT ERROR NULL ARGUMENT set Preferred Size size x size y  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setPreferredSize checkWidget ERROR_NULL_ARGUMENT setPreferredSize
Sets the receiver s size to the point specified by the arguments p Note Attempting to set the width or height of the receiver to a negative number will cause that value to be set to zero instead p param width the new width for the receiver param height the new height for the receiver 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 set Size int width int height check Widget width Math max width minimum Width MINIMUM WIDTH if ideal preferred Width width preferred Height height item Bounds width requested Width width item Bounds height height if control null int control Width width MINIMUM WIDTH if style SWT DROP DOWN 0 width preferred Width control Width CHEVRON IMAGE WIDTH CHEVRON HORIZONTAL TRIM CHEVRON LEFT MARGIN control set Size control Width height parent relayout update Chevron  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSize checkWidget minimumWidth MINIMUM_WIDTH preferredWidth preferredHeight itemBounds requestedWidth itemBounds controlWidth MINIMUM_WIDTH DROP_DOWN preferredWidth controlWidth CHEVRON_IMAGE_WIDTH CHEVRON_HORIZONTAL_TRIM CHEVRON_LEFT_MARGIN setSize controlWidth updateChevron
Sets the receiver s size to the point specified by the argument p Note Attempting to set the width or height of the receiver to a negative number will cause them to be set to zero instead p param size the new size for the receiver exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the point is null li ul 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 set Size Point size check Widget if size null error SWT ERROR NULL ARGUMENT set Size size x size y  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSize checkWidget ERROR_NULL_ARGUMENT setSize
Tool Item tool Item new Tool Item chevron SWT PUSH tool Item add Listener SWT Selection new Listener public void handle Event Event event Cool Item this on Selection event  ToolItem toolItem ToolItem toolItem addListener handleEvent CoolItem onSelection
void update Chevron if control null int width item Bounds width if style SWT DROP DOWN 0 width preferred Width int height Math min control get Size y item Bounds height if chevron null chevron new Tool Bar parent SWT FLAT SWT NO FOCUS Tool Item tool Item new Tool Item chevron SWT PUSH tool Item add Listener SWT Selection new Listener public void handle Event Event event Cool Item this on Selection event int image Height Math max 1 height CHEVRON VERTICAL TRIM if arrow Image null arrow Image null arrow Image get Bounds height image Height Image image create Arrow Image CHEVRON IMAGE WIDTH image Height chevron get Item 0 set Image image if arrow Image null arrow Image dispose arrow Image image chevron set Background parent get Background chevron set Bounds item Bounds x width CHEVRON LEFT MARGIN CHEVRON IMAGE WIDTH CHEVRON HORIZONTAL TRIM item Bounds y CHEVRON IMAGE WIDTH CHEVRON HORIZONTAL TRIM height chevron set Visible true else if chevron null chevron set Visible false  updateChevron itemBounds DROP_DOWN preferredWidth getSize itemBounds ToolBar NO_FOCUS ToolItem toolItem ToolItem toolItem addListener handleEvent CoolItem onSelection imageHeight CHEVRON_VERTICAL_TRIM arrowImage arrowImage arrowImage getBounds imageHeight createArrowImage CHEVRON_IMAGE_WIDTH imageHeight getItem setImage arrowImage arrowImage arrowImage setBackground getBackground setBounds itemBounds CHEVRON_LEFT_MARGIN CHEVRON_IMAGE_WIDTH CHEVRON_HORIZONTAL_TRIM itemBounds CHEVRON_IMAGE_WIDTH CHEVRON_HORIZONTAL_TRIM setVisible setVisible

Control control Accessible Control control this control control 
Invokes platform specific functionality to allocate a new accessible object p b IMPORTANT b This method is em not em part of the public API for code Accessible code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param control the control to get the accessible object for return the platform specific accessible object public static Accessible internal new Accessible Control control return new Accessible control  internal_new_Accessible
Adds the listener to the collection of listeners who will be notifed when an accessible client asks for certain strings such as name description help or keyboard shortcut The listener is notified by sending it one of the messages defined in the code Accessible Listener code interface param listener the listener that should be notified when the receiver is asked for a name description help or keyboard shortcut string exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Exception ul li ERROR WIDGET DISPOSED if the receiver s control has been disposed li li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver s control li ul see Accessible Listener see remove Accessible Listener public void add Accessible Listener Accessible Listener listener  AccessibleListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS AccessibleListener removeAccessibleListener addAccessibleListener AccessibleListener
Removes the listener from the collection of listeners who will be notifed when an accessible client asks for certain strings such as name description help or keyboard shortcut param listener the listener that should no longer be notified when the receiver is asked for a name description help or keyboard shortcut string exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Exception ul li ERROR WIDGET DISPOSED if the receiver s control has been disposed li li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver s control li ul see Accessible Listener see add Accessible Listener public void remove Accessible Listener Accessible Listener listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS AccessibleListener addAccessibleListener removeAccessibleListener AccessibleListener
Adds the listener to the collection of listeners who will be notifed when an accessible client asks for custom control specific information The listener is notified by sending it one of the messages defined in the code Accessible Control Listener code interface param listener the listener that should be notified when the receiver is asked for custom control specific information exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Exception ul li ERROR WIDGET DISPOSED if the receiver s control has been disposed li li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver s control li ul see Accessible Control Listener see remove Accessible Control Listener public void add Accessible Control Listener Accessible Control Listener listener  AccessibleControlListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS AccessibleControlListener removeAccessibleControlListener addAccessibleControlListener AccessibleControlListener
Removes the listener from the collection of listeners who will be notifed when an accessible client asks for custom control specific information param listener the listener that should no longer be notified when the receiver is asked for custom control specific information exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Exception ul li ERROR WIDGET DISPOSED if the receiver s control has been disposed li li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver s control li ul see Accessible Control Listener see add Accessible Control Listener public void remove Accessible Control Listener Accessible Control Listener listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS AccessibleControlListener addAccessibleControlListener removeAccessibleControlListener AccessibleControlListener
Adds the listener to the collection of listeners who will be notifed when an accessible client asks for custom text control specific information The listener is notified by sending it one of the messages defined in the code Accessible Text Listener code interface param listener the listener that should be notified when the receiver is asked for custom text control specific information exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Exception ul li ERROR WIDGET DISPOSED if the receiver s control has been disposed li li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver s control li ul see Accessible Text Listener see remove Accessible Text Listener since 3 0 public void add Accessible Text Listener Accessible Text Listener listener  AccessibleTextListener IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS AccessibleTextListener removeAccessibleTextListener addAccessibleTextListener AccessibleTextListener
Removes the listener from the collection of listeners who will be notifed when an accessible client asks for custom text control specific information param listener the listener that should no longer be notified when the receiver is asked for custom text control specific information exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul exception SWT Exception ul li ERROR WIDGET DISPOSED if the receiver s control has been disposed li li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver s control li ul see Accessible Text Listener see add Accessible Text Listener since 3 0 public void remove Accessible Text Listener Accessible Text Listener listener  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS AccessibleTextListener addAccessibleTextListener removeAccessibleTextListener AccessibleTextListener
Returns the control for this Accessible object return the receiver s control since 3 0 public Control get Control return control  getControl
Sends a message to accessible clients that the child selection within a custom container control has changed exception SWT Exception ul li ERROR WIDGET DISPOSED if the receiver s control has been disposed li li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver s control li ul since 3 0 public void selection Changed  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS selectionChanged
Sends a message to accessible clients that the text caret has moved within a custom control param index the new caret index within the control exception SWT Exception ul li ERROR WIDGET DISPOSED if the receiver s control has been disposed li li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver s control li ul since 3 0 public void text Caret Moved int index  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS textCaretMoved
Sends a message to accessible clients that the text within a custom control has changed param type the type of change one of code ACC NOTIFY TEXT INSERT code or code ACC NOTIFY TEXT DELETE code param start Index the text index within the control where the insertion or deletion begins param length the non negative length in characters of the insertion or deletion exception SWT Exception ul li ERROR WIDGET DISPOSED if the receiver s control has been disposed li li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver s control li ul see ACC TEXT INSERT see ACC TEXT DELETE since 3 0 public void text Changed int type int start Index int length  NOTIFY_TEXT_INSERT NOTIFY_TEXT_DELETE startIndex SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS TEXT_INSERT TEXT_DELETE textChanged startIndex
Sends a message to accessible clients that the text selection has changed within a custom control exception SWT Exception ul li ERROR WIDGET DISPOSED if the receiver s control has been disposed li li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver s control li ul since 3 0 public void text Selection Changed  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS textSelectionChanged
Sends a message to accessible clients indicating that the focus has changed within a custom control param childID an identifier specifying a child of the control exception SWT Exception ul li ERROR WIDGET DISPOSED if the receiver s control has been disposed li li ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver s control li ul public void set Focus int childID  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setFocus
Invokes platform specific functionality to dispose an accessible object p b IMPORTANT b This method is em not em part of the public API for code Accessible code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p public void internal dispose Accessible  internal_dispose_Accessible
Invokes platform specific functionality to handle a window message p b IMPORTANT b This method is em not em part of the public API for code Accessible code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p public int internal WM GETOBJECT int w Param int l Param return 0  internal_WM_GETOBJECT wParam lParam

Creates a new code java awt Frame code This frame is the root for the AWT components that will be embedded within the composite In order for the embedding to succeed the composite must have been created with the SWT EMBEDDED style p IMPORTANT As of JDK1 5 the embedded frame does not receive mouse events When a lightweight component is added as a child of the embedded frame the cursor does not change In order to work around both these problems it is strongly recommended that a heavyweight component such as code java awt Panel code be added to the frame as the root of all components p param parent the parent code Composite code of the new code java awt Frame code return a code java awt Frame code to be the parent of the embedded AWT components exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li li ERROR INVALID ARGUMENT if the parent Composite does not have the SWT EMBEDDED style li ul since 3 0 public static Frame new Frame final Composite parent if parent null SWT error SWT ERROR NULL ARGUMENT if parent get Style SWT EMBEDDED 0 SWT error SWT ERROR INVALID ARGUMENT SWT error SWT ERROR NOT IMPLEMENTED return null  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT new_Frame ERROR_NULL_ARGUMENT getStyle ERROR_INVALID_ARGUMENT ERROR_NOT_IMPLEMENTED
Creates a new code Shell code This Shell is the root for the SWT widgets that will be embedded within the AWT canvas param display the display for the new Shell param parent the parent code java awt Canvas code of the new Shell return a code Shell code to be the parent of the embedded SWT widgets exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the display is null li li ERROR NULL ARGUMENT if the parent is null li ul since 3 0 public static Shell new Shell final Display display final Canvas parent if display null SWT error SWT ERROR NULL ARGUMENT if parent null SWT error SWT ERROR NULL ARGUMENT SWT error SWT ERROR NOT IMPLEMENTED return null  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT new_Shell ERROR_NULL_ARGUMENT ERROR_NULL_ARGUMENT ERROR_NOT_IMPLEMENTED

Constructs a new instance of this class given its parent which must be a code Tray code and a style value describing its behavior and appearance The item is added to the end of the items maintained by its parent p The style value is either one of the style constants defined in 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 exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li li ERROR INVALID SUBCLASS if this class is not an allowed subclass li ul see SWT see Widget check Subclass see Widget get Style public Tray Item Tray parent int style super parent style this parent parent parent create Item this parent get Item Count  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_SUBCLASS checkSubclass getStyle TrayItem createItem getItemCount
Adds the listener to the collection of listeners who will be notified when the receiver is selected by sending it one of the messages defined in the code Selection Listener code interface p code widget Selected code is called when the receiver is selected code widget Default Selected code is called when the receiver is double clicked p param listener the listener which should be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see remove Selection Listener see Selection Event public void add Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT  SelectionListener widgetSelected widgetDefaultSelected IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener removeSelectionListener SelectionEvent addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT
Returns the receiver s tool tip text or null if it has not been set return the receiver s tool tip text 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 String get Tool Tip Text check Widget return tool Tip Text  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getToolTipText checkWidget toolTipText
Returns code true code if the receiver is visible and code false code otherwise return the receiver s visibility 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 boolean get Visible check Widget return visible  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getVisible checkWidget
void release Child super release Child parent destroy Item this  releaseChild releaseChild destroyItem
Removes the listener from the collection of listeners who will be notified when the receiver is selected param listener the listener which should no longer be notified exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 Selection Listener see add Selection Listener public void remove Selection Listener Selection Listener listener check Widget if listener null error SWT ERROR NULL ARGUMENT  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS SelectionListener addSelectionListener removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT
Sets the receiver s image param image the new image exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the image has been disposed li ul 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 set Image Image image check Widget if image null image is Disposed error SWT ERROR INVALID ARGUMENT super set Image image  IllegalArgumentException ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setImage checkWidget isDisposed ERROR_INVALID_ARGUMENT setImage
Sets the receiver s tool tip text to the argument which may be null indicating that no tool tip text should be shown param value the new tool tip text or null 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 set Tool Tip Text String string check Widget tool Tip Text string  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setToolTipText checkWidget toolTipText
Makes the receiver visible if the argument is code true code and makes it invisible otherwise param visible the new visibility 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 public void set Visible boolean visible check Widget if this visible visible return if visible send Event SWT Show this visible visible if visible send Event SWT Hide  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setVisible checkWidget sendEvent sendEvent

Create a new instance of the receiver param parent widget the receiver belongs to param swt Style widget style see Widget class for details Abstract Tree Item Tree parent int swt Style super parent swt Style  swtStyle AbstractTreeItem swtStyle swtStyle
Insert item in the list of child items Notify the parent about the new item param item the item that should be added to the receiver s children param index position that item will be inserted at in the receiver void add Tree Item item int index Vector items get Children int visible Index get Visible Index if index 0 index items size error SWT ERROR INVALID RANGE if item is Root visible Index index else if is Expanded false visible Index 1 if visible Index 1 if index 0 Tree Item previous Child Tree Item get Children element At index 1 visible Index previous Child get Visible Index previous Child get Visible Item Count 1 else visible Index get Visible Index 1 get Selectable Parent adding Item item visible Index item set Index index reset Child Indices index true items insert Element At item index if is Expanded true visible Item Count calculate Visible Item Count Parent get Selectable Parent added Item item visible Index  TreeItem getChildren visibleIndex getVisibleIndex ERROR_INVALID_RANGE isRoot visibleIndex isExpanded visibleIndex visibleIndex TreeItem previousChild TreeItem getChildren elementAt visibleIndex previousChild getVisibleIndex previousChild getVisibleItemCount visibleIndex getVisibleIndex getSelectableParent addingItem visibleIndex setIndex resetChildIndices insertElementAt isExpanded visibleItemCount calculateVisibleItemCountParent getSelectableParent addedItem visibleIndex
Set whether the receiver is expanded or not If the receiver is expanded its child items are visible param expanded true the receiver is expanded making its child items visible false the receiver is collapsed making its child items invisible void internal Set Expanded boolean expanded is Expanded expanded calculate Visible Item Count  internalSetExpanded isExpanded calculateVisibleItemCount
Calculate the number of expanded children Recurse up in the tree to the root item 
abstract void calculate Visible Item Count Calculate the number of expanded children for the parent item of this item  calculateVisibleItemCount
abstract void calculate Visible Item Count Parent Deselect the receiver and all children void deselect All Enumeration children get Children elements Abstract Tree Item tree Item set Selected false while children has More Elements true tree Item Abstract Tree Item children next Element tree Item deselect All  calculateVisibleItemCountParent deselectAll getChildren AbstractTreeItem treeItem setSelected hasMoreElements treeItem AbstractTreeItem nextElement treeItem deselectAll
public void dispose if is Disposed return Vector children get Children Abstract Tree Item child while children size 0 Tree Item objects are removed from vector during dispose child Abstract Tree Item children first Element child dispose super dispose  isDisposed getChildren AbstractTreeItem TreeItem AbstractTreeItem firstElement
void do Dispose set Children null visible Item Count 0 super do Dispose  doDispose setChildren visibleItemCount doDispose
Answer the Vector containing the child items of the receiver Vector get Children if children null children new Vector 4 return children  getChildren
Answer whether the receiver is expanded or not If the receiver is expanded its children are visible return true the receiver is expanded making its children visible false the receiver is collapsed making its children invisible public boolean get Expanded check Widget return is Expanded  getExpanded checkWidget isExpanded
Answer the number of children public int get Item Count check Widget return get Children size  getItemCount checkWidget getChildren
Answer the index of the receiver relative to the first root item If an Index is the global index of the expanded item an Item then the following expressions are true an Item the Root get Visible Item an Index and an Index an Item get Visible Index return The index of the receiver relative to the first root item Answer 1 if the receiver is not visible because the parent is collapsed  anIndex anItem anItem theRoot getVisibleItem anIndex anIndex anItem getVisibleIndex
abstract int get Visible Index Answer the index of the child item identified by child Index relative to the first root item  getVisibleIndex childIndex
abstract int get Visible Index int child Index Answer the item at search Index relativ to the receiver When this method is called for the root item search Index represents the global index into all items of the tree search Index 0 returns the receiver search Index 1 returns the first visible child Note search Index must be 0 Note Visible in this context does not neccessarily mean that the item is displayed on the screen Visible here means that all the parents of the item are expanded An item is only visible on screen if it is within the receiver s parent s client area  getVisibleIndex childIndex searchIndex searchIndex searchIndex searchIndex searchIndex
abstract Tree Item get Visible Item int search Index Answer the number of expanded children direct and indirect int get Visible Item Count return visible Item Count  TreeItem getVisibleItem searchIndex getVisibleItemCount visibleItemCount
Returns the expanded state Circumvent widget thread check for performance For non API callers only boolean internal Get Expanded return is Expanded  internalGetExpanded isExpanded
Answer whether the receiver is a leaf item An item is a leaf when it has no child items return true receiver is a leaf item false receiver is not a leaf item boolean is Leaf return get Children size 0  isLeaf getChildren
Answer whether the receiver is a root item The receiver is a root item when it doesn t have a parent item return true the receiver is a root item false the receiver is not a root item boolean is Root return false  isRoot
Remove child from the receiver Notify the parent widget only if it is not being disposed itself void remove Item Selectable Item child Vector children get Children Selectable Item Widget parent get Selectable Parent int child Index children index Of child if child Index 1 if Tree parent is Removing All true children remove Element At child Index just remove the item from the list if the whole tree is being disposed if is Expanded true visible Item Count calculate Visible Item Count Parent else parent removing Item child children remove Element At child Index if is Expanded true visible Item Count calculate Visible Item Count Parent reset Child Indices child Index false mark child index dirty parent removed Item child  removeItem SelectableItem getChildren SelectableItemWidget getSelectableParent childIndex indexOf childIndex isRemovingAll removeElementAt childIndex isExpanded visibleItemCount calculateVisibleItemCountParent removingItem removeElementAt childIndex isExpanded visibleItemCount calculateVisibleItemCountParent resetChildIndices childIndex removedItem
Allow subclasses to reset any cached data Called for all children of the receiver void reset Enumeration children get Children elements Abstract Tree Item tree Item while children has More Elements true tree Item Abstract Tree Item children next Element tree Item reset  getChildren AbstractTreeItem treeItem hasMoreElements treeItem AbstractTreeItem nextElement treeItem
Mark all child indices dirty starting with the child at start Index This causes get Index to recalculate the index param start Index index in the list of children at which and after which the indices are reset void reset Child Indices int start Index boolean add Item Vector children get Children Tree Item child int increment add Item 1 0 for int i start Index i children size i child Tree Item children element At i child set Index i increment mark child index dirty  startIndex getIndex startIndex resetChildIndices startIndex addItem getChildren TreeItem addItem startIndex TreeItem elementAt setIndex
Select the receiver and all children Return a Vector containing all the items that have been selected and that have not been selected before Vector select All Vector selected Items Enumeration children get Children elements Abstract Tree Item tree Item if is Selected false selected Items add Element this set Selected true get Selectable Parent redraw Selection this while children has More Elements true tree Item Abstract Tree Item children next Element selected Items tree Item select All selected Items return selected Items  selectAll selectedItems getChildren AbstractTreeItem treeItem isSelected selectedItems addElement setSelected getSelectableParent redrawSelection hasMoreElements treeItem AbstractTreeItem nextElement selectedItems treeItem selectAll selectedItems selectedItems
Set the Array containing the receiver s child items to children void set Children Vector children this children children  setChildren
void set Visible Item Count int count visible Item Count count  setVisibleItemCount visibleItemCount

this parent parent add Listener SWT Paint new Listener public void handle Event Event event paint event  addListener handleEvent
Table parent Create a Header widget as a child of parent param parent the parent of the new instance Header Table parent super parent SWT NO REDRAW RESIZE SWT NO FOCUS this parent parent add Listener SWT Paint new Listener public void handle Event Event event paint event set Header Height  NO_REDRAW_RESIZE NO_FOCUS addListener handleEvent setHeaderHeight
Answer the size of the receiver needed to display all items public Point compute Size int w Hint int h Hint boolean changed check Widget int width 0 int height 0 for int i 0 i get Item Count i width get Bounds i width if height 0 height get Bounds i height if width 0 width DEFAULT WIDTH if height 0 height DEFAULT HEIGHT if w Hint SWT DEFAULT width w Hint if h Hint SWT DEFAULT height h Hint return new Point width height  computeSize wHint hHint checkWidget getItemCount getBounds getBounds DEFAULT_WIDTH DEFAULT_HEIGHT wHint wHint hHint hHint
Draw the bright shadow on the upper and left sides of a header item param gc GC to draw on param item Index specifies the item to draw void draw Highlight Shadow GC gc int item Index Rectangle bounds get Bounds item Index Color old Foreground get Foreground gc set Foreground display get System Color SWT COLOR WIDGET HIGHLIGHT SHADOW draw top horizontal line gc draw Line bounds x bounds y bounds x bounds width 1 bounds y draw left vertical line gc draw Line bounds x bounds y bounds x bounds y bounds height 1 gc set Foreground old Foreground  itemIndex drawHighlightShadow itemIndex getBounds itemIndex oldForeground getForeground setForeground getSystemColor COLOR_WIDGET_HIGHLIGHT_SHADOW drawLine drawLine setForeground oldForeground
Draw the dark shadow on the lower and right side of a header item param gc GC to draw on param item Index specifies the item to draw void draw Lowlight Shadows GC gc int item Index Rectangle bounds get Bounds item Index Point bottom Shadow Start new Point bounds x 1 bounds height 2 Point bottom Shadow Stop new Point bottom Shadow Start x bounds width 2 bottom Shadow Start y Point right Shadow Start null Point right Shadow Stop null Color old Foreground get Foreground light inner shadow gc set Foreground display get System Color SWT COLOR WIDGET NORMAL SHADOW gc draw Line bottom Shadow Start x bottom Shadow Start y bottom Shadow Stop x bottom Shadow Stop y if item Index Table Column FILL right Shadow Start new Point bounds x bounds width 2 bounds y 1 right Shadow Stop new Point right Shadow Start x bounds height 2 gc draw Line right Shadow Start x right Shadow Start y right Shadow Stop x right Shadow Stop y dark outer shadow bottom Shadow Start x bottom Shadow Start y bottom Shadow Stop y gc set Foreground display get System Color SWT COLOR WIDGET DARK SHADOW gc draw Line bottom Shadow Start x bottom Shadow Start y bottom Shadow Stop x bottom Shadow Stop y if item Index Table Column FILL right Shadow Start x right Shadow Start y right Shadow Stop y right Shadow Stop x gc draw Line right Shadow Start x right Shadow Start y right Shadow Stop x right Shadow Stop y gc set Foreground old Foreground  itemIndex drawLowlightShadows itemIndex getBounds itemIndex bottomShadowStart bottomShadowStop bottomShadowStart bottomShadowStart rightShadowStart rightShadowStop oldForeground getForeground setForeground getSystemColor COLOR_WIDGET_NORMAL_SHADOW drawLine bottomShadowStart bottomShadowStart bottomShadowStop bottomShadowStop itemIndex TableColumn rightShadowStart rightShadowStop rightShadowStart drawLine rightShadowStart rightShadowStart rightShadowStop rightShadowStop bottomShadowStart bottomShadowStart bottomShadowStop setForeground getSystemColor COLOR_WIDGET_DARK_SHADOW drawLine bottomShadowStart bottomShadowStart bottomShadowStop bottomShadowStop itemIndex TableColumn rightShadowStart rightShadowStart rightShadowStop rightShadowStop drawLine rightShadowStart rightShadowStart rightShadowStop rightShadowStop setForeground oldForeground
Answer the bounding rectangle of the item identified by item Index param item Index specifies the item whose bounding rectangle should be returned return the bouding rectangle of the item identified by item Index Rectangle get Bounds int item Index Rectangle bounds null int item Count get Item Count if item Index 0 item Index item Count bounds parent internal Get Column item Index get Bounds bounds y 0 bounds height get Bounds height else if item Index Table Column FILL if item Count 0 bounds parent internal Get Column item Count 1 get Bounds bounds x bounds width else bounds new Rectangle 0 0 0 0 bounds width Math max 0 get Bounds width bounds x bounds y 0 bounds height get Bounds height return bounds  itemIndex itemIndex itemIndex getBounds itemIndex itemCount getItemCount itemIndex itemIndex itemCount internalGetColumn itemIndex getBounds getBounds itemIndex TableColumn itemCount internalGetColumn itemCount getBounds getBounds getBounds
Answer the image that is going to be drawn in the header item identified by item Index param gc GC to use for measuring the label width param item Index specifies the item whose label should be returned Image get Image int item Index if item Index 0 item Index get Item Count return parent internal Get Column item Index get Image return null  itemIndex itemIndex getImage itemIndex itemIndex itemIndex getItemCount internalGetColumn itemIndex getImage
Answer the size of item images Point get Image Extent Image image null int label Count get Item Count for int i 0 i label Count image null i image get Image i if image null return new Point image get Bounds width image get Bounds height return new Point 0 0  getImageExtent labelCount getItemCount labelCount getImage getBounds getBounds
Answer the number of items in the receiver int get Item Count return parent internal Get Column Count  getItemCount internalGetColumnCount
Answer the width required to display the complete label of the header item at position index param index position of the header item whose preferred width should be returned int get Preferred Width int index Image image get Image index String text get Text index int header Width HORIZONTAL MARGIN if image null header Width get Image Extent x HORIZONTAL MARGIN if text null header Width get Text Width text HORIZONTAL MARGIN return header Width  getPreferredWidth getImage getText headerWidth HORIZONTAL_MARGIN headerWidth getImageExtent HORIZONTAL_MARGIN headerWidth getTextWidth HORIZONTAL_MARGIN headerWidth
Answer the label of the item identified by item Index String get Text int item Index String item Label null if item Index 0 item Index get Item Count item Label parent internal Get Column item Index get Text return item Label  itemIndex getText itemIndex itemLabel itemIndex itemIndex getItemCount itemLabel internalGetColumn itemIndex getText itemLabel
Answer the width of text in pixel Answer 0 if text is null int get Text Width String text int text Width 0 if text null GC gc new GC parent gc set Font parent get Font text Width gc string Extent text x gc dispose return text Width  getTextWidth textWidth setFont getFont textWidth stringExtent textWidth
Draw the header item identified by item Index param gc GC to draw on param item Index item that should be drawn void paint GC gc int item Index gc set Font parent get Font Rectangle bounds get Bounds item Index draw header background gc fill Rectangle bounds x bounds y 1 bounds width bounds height 3 if item Index Table Column FILL int extent Math min bounds width 2 HORIZONTAL MARGIN get Preferred Width item Index int x bounds x int alignment parent internal Get Column item Index get Alignment if alignment SWT CENTER 0 x bounds width extent 2 else if alignment SWT RIGHT 0 x bounds width extent HORIZONTAL MARGIN else x HORIZONTAL MARGIN Image image get Image item Index if image null Rectangle image Bounds image get Bounds Point image Extent get Image Extent int y bounds y bounds height image Extent y 2 gc draw Image image 0 0 image Bounds width image Bounds height x y image Extent x image Extent y x image Extent x HORIZONTAL MARGIN String label get Text item Index if label null int max Width bounds x bounds width x HORIZONTAL MARGIN String trim Label parent trim Item Text label max Width gc Point text Extent gc string Extent trim Label int y bounds y bounds height text Extent y 2 gc draw String trim Label x y draw Highlight Shadow gc item Index draw Lowlight Shadows gc item Index  itemIndex itemIndex itemIndex setFont getFont getBounds itemIndex fillRectangle itemIndex TableColumn HORIZONTAL_MARGIN getPreferredWidth itemIndex internalGetColumn itemIndex getAlignment HORIZONTAL_MARGIN HORIZONTAL_MARGIN getImage itemIndex imageBounds getBounds imageExtent getImageExtent imageExtent drawImage imageBounds imageBounds imageExtent imageExtent imageExtent HORIZONTAL_MARGIN getText itemIndex maxWidth HORIZONTAL_MARGIN trimLabel trimItemText maxWidth textExtent stringExtent trimLabel textExtent drawString trimLabel drawHighlightShadow itemIndex drawLowlightShadows itemIndex
Draw all header items param event Paint event triggering the drawing operation void paint Event event int label Count get Item Count for int i 0 i label Count i paint event gc i paint event gc Table Column FILL paint empty fill item behind last item  labelCount getItemCount labelCount TableColumn
Redraw the item identified by item Index param item Index specifies the header item that should be redrawn void redraw int item Index Rectangle bounds get Bounds item Index if bounds null redraw bounds x 0 bounds width bounds height false  itemIndex itemIndex itemIndex getBounds itemIndex
Set a new font Recalculate the header height and redraw the header public void set Font Font font check Widget if font null font equals get Font true return super set Font font set Header Height redraw  setFont checkWidget getFont setFont setHeaderHeight
Calculate and store the height of the receiver void set Header Height int text Height parent get Font Height VERTICAL MARGIN int image Height get Image Extent y VERTICAL MARGIN Rectangle bounds get Bounds bounds height Math max text Height image Height set Bounds bounds  setHeaderHeight textHeight getFontHeight VERTICAL_MARGIN imageHeight getImageExtent VERTICAL_MARGIN getBounds textHeight imageHeight setBounds
The width of the header item at position item Index is about to change Adjust the width of the header Scroll and redraw all header items starting behind the item identified by item Index param item Index specifies the item after which the redraw should begin param width Diff the width change of the item 0 item width increased 0 item width decreased void width Change int item Index int width Diff Rectangle bounds get Bounds item Index Rectangle header Bounds get Bounds if bounds null if item Index Table Column FILL ignore the fill column header item there s nothing to redraw anyway scroll bounds x bounds width width Diff 0 destination x y bounds x bounds width 0 source x y header Bounds width width Diff header Bounds height false redraw bounds x 0 bounds width bounds height false header Bounds width width Diff set Bounds header Bounds  itemIndex itemIndex itemIndex widthDiff widthChange itemIndex widthDiff getBounds itemIndex headerBounds getBounds itemIndex TableColumn widthDiff headerBounds widthDiff headerBounds headerBounds widthDiff setBounds headerBounds

checked state to create gray checked and gray unchecked Create a new instance of the receiver param parent widget the receiver is created in param style widget style see Widget class for details Selectable Item Selectable Item Widget parent int style super parent style set Parent parent  SelectableItem SelectableItemWidget setParent
void clear is Checked is Grayed false  isChecked isGrayed
public void dispose if is Disposed return super dispose do Dispose  isDisposed doDispose
do Dispose void do Dispose set Parent null  doDispose doDispose setParent
Draw the check box of the receiver at position using gc param gc GC to draw on param destination Position position on the GC to draw at return Answer the position where drawing stopped Point draw Checkbox GC gc Point position Selectable Item Widget parent get Selectable Parent Image image Point image Extent Rectangle image Bounds int image Offset int x Inset int y Inset if get Grayed true image parent get Gray Unchecked Image else image parent get Unchecked Image if image null image Extent parent get Check Box Extent image Offset parent get Item Height image Extent y 2 gc draw Image image position x position y image Offset if get Checked true image parent get Check Mark Image image Bounds image get Bounds x Inset image Extent x image Bounds width 2 y Inset image Extent y image Bounds height 2 gc draw Image image position x x Inset position y image Offset y Inset position x image Extent x position x CHECKBOX PADDING leave extra space behind check box return position  destinationPosition drawCheckbox SelectableItemWidget getSelectableParent imageExtent imageBounds imageOffset xInset yInset getGrayed getGrayUncheckedImage getUncheckedImage imageExtent getCheckBoxExtent imageOffset getItemHeight imageExtent drawImage imageOffset getChecked getCheckMarkImage imageBounds getBounds xInset imageExtent imageBounds yInset imageExtent imageBounds drawImage xInset imageOffset yInset imageExtent CHECKBOX_PADDING
void draw Insert Mark GC gc Point position Selectable Item Widget parent get Selectable Parent Point selection Extent get Selection Extent final int marker Width get Insert Mark Width int insert MarkY Offset 0 if selection Extent null return if parent is Insert After insert MarkY Offset selection Extent y marker Width gc set Background display get System Color SWT COLOR BLACK gc fill Rectangle position x position y insert MarkY Offset selection Extent x marker Width gc set Background parent get Background  drawInsertMark SelectableItemWidget getSelectableParent selectionExtent getSelectionExtent markerWidth getInsertMarkWidth insertMarkYOffset selectionExtent isInsertAfter insertMarkYOffset selectionExtent markerWidth setBackground getSystemColor COLOR_BLACK fillRectangle insertMarkYOffset selectionExtent markerWidth setBackground getBackground
Answer the bounding rectangle of the item check box All points within this rectangle hit the check box Rectangle get Checkbox Bounds Selectable Item Widget parent get Selectable Parent Point check Box Extent int redraw Position Rectangle checkbox Bounds new Rectangle 0 0 0 0 if is Checkable true checkbox Bounds x get CheckboxX Position redraw Position parent get RedrawY this if redraw Position 1 checkbox Bounds y redraw Position check Box Extent parent get Check Box Extent checkbox Bounds width check Box Extent x checkbox Bounds height check Box Extent y checkbox Bounds y parent get Item Height check Box Extent y 2 return checkbox Bounds  getCheckboxBounds SelectableItemWidget getSelectableParent checkBoxExtent redrawPosition checkboxBounds isCheckable checkboxBounds getCheckboxXPosition redrawPosition getRedrawY redrawPosition checkboxBounds redrawPosition checkBoxExtent getCheckBoxExtent checkboxBounds checkBoxExtent checkboxBounds checkBoxExtent checkboxBounds getItemHeight checkBoxExtent checkboxBounds
return checkbox Bounds Answer the x position of the item check box abstract int get CheckboxX Position  checkboxBounds getCheckboxXPosition
abstract int get CheckboxX Position Return whether or not the receiver is checked Always return false if the parent of the receiver does not have the CHECK style public boolean get Checked check Widget boolean checked false if is Checkable true checked is Checked return checked  getCheckboxXPosition getChecked checkWidget isCheckable isChecked
public Font get Font return parent get Font  getFont getFont
Gets the grayed state p return the item grayed state exception SWT Error 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 boolean get Grayed check Widget boolean grayed false if is Checkable true grayed is Grayed return grayed  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED getGrayed checkWidget isCheckable isGrayed
Return the width in pixels of the line drawn to indicate the drop insert position during a drag and drop operation int get Insert Mark Width return 2  getInsertMarkWidth
Answer the parent widget of the receiver Selectable Item Widget get Selectable Parent return parent  SelectableItemWidget getSelectableParent
Answer the background color to use for drawing the selection rectangle Color get Selection Background Color return display get System Color SWT COLOR LIST SELECTION  getSelectionBackgroundColor getSystemColor COLOR_LIST_SELECTION
Return the size of the rectangle drawn to indicate the selected state of the receiver 
abstract Point get Selection Extent Answer the foreground color to use for drawing the selection rectangle Color get Selection Foreground Color return display get System Color SWT COLOR LIST SELECTION TEXT  getSelectionExtent getSelectionForegroundColor getSystemColor COLOR_LIST_SELECTION_TEXT
return display get System Color SWT COLOR LIST SELECTION TEXT Return the x position of the selection rectangle abstract int get SelectionX  getSystemColor COLOR_LIST_SELECTION_TEXT getSelectionX
abstract int get SelectionX Answer whether posiiton is inside the item check box return true item check box hit false item check box not hit boolean is Check Hit Point position boolean is Check Hit false if is Checkable true is Check Hit get Checkbox Bounds contains position return is Check Hit  getSelectionX isCheckHit isCheckHit isCheckable isCheckHit getCheckboxBounds isCheckHit
Return whether or not the receiver has a check box and can be checked boolean is Checkable return get Selectable Parent get Style SWT CHECK 0  isCheckable getSelectableParent getStyle
Answer whether the receiver is selected return true the receiver is selected false the receiver is not selected boolean is Selected return is Selected  isSelected isSelected
Redraw the insert mark param y Position y position in the receiver s client area where the item should be drawn void redraw Insert Mark int y Position Selectable Item Widget parent get Selectable Parent Point selection Extent get Selection Extent int redraw Height get Insert Mark Width if selection Extent null parent redraw get SelectionX y Position selection Extent x redraw Height false parent redraw get SelectionX y Position selection Extent y redraw Height selection Extent x redraw Height false  yPosition redrawInsertMark yPosition SelectableItemWidget getSelectableParent selectionExtent getSelectionExtent redrawHeight getInsertMarkWidth selectionExtent getSelectionX yPosition selectionExtent redrawHeight getSelectionX yPosition selectionExtent redrawHeight selectionExtent redrawHeight
Redraw the selection param y Position y position in the receiver s client area where the item should be drawn void redraw Selection int y Position Selectable Item Widget parent get Selectable Parent Point selection Extent get Selection Extent if selection Extent null parent redraw get SelectionX y Position selection Extent x selection Extent y false  yPosition redrawSelection yPosition SelectableItemWidget getSelectableParent selectionExtent getSelectionExtent selectionExtent getSelectionX yPosition selectionExtent selectionExtent
Set the checked state to checked if the parent of the receiver has the CHECK style public void set Checked boolean checked check Widget Selectable Item Widget parent get Selectable Parent Rectangle redraw Rectangle get Checkbox Bounds if is Checkable true is Checked checked is Checked checked parent redraw redraw Rectangle x redraw Rectangle y redraw Rectangle width redraw Rectangle height false  setChecked checkWidget SelectableItemWidget getSelectableParent redrawRectangle getCheckboxBounds isCheckable isChecked isChecked redrawRectangle redrawRectangle redrawRectangle redrawRectangle
Sets the grayed state p param grayed the new grayed state exception SWT Error 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 set Grayed boolean grayed check Widget Selectable Item Widget parent get Selectable Parent Rectangle redraw Rectangle get Checkbox Bounds if is Checkable true is Grayed grayed is Grayed grayed parent redraw redraw Rectangle x redraw Rectangle y redraw Rectangle width redraw Rectangle height false  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED setGrayed checkWidget SelectableItemWidget getSelectableParent redrawRectangle getCheckboxBounds isCheckable isGrayed isGrayed redrawRectangle redrawRectangle redrawRectangle redrawRectangle
Set the receiver s parent widget to parent void set Parent Selectable Item Widget parent this parent parent  setParent SelectableItemWidget
Set whether the receiver is selected param selected true the receiver is selected false the receiver is not selected void set Selected boolean selected is Selected selected  setSelected isSelected

private int draw Count 0 used to reimplement set Redraw boolean Create a new instance of Scrollable Item Widget param parent the parent window of the new instance param style window style for the new instance Selectable Item Widget Composite parent int style super parent style SWT H SCROLL SWT V SCROLL SWT NO REDRAW RESIZE initialize  drawCount setRedraw ScrollableItemWidget SelectableItemWidget H_SCROLL V_SCROLL NO_REDRAW_RESIZE
The Selectable Item item has been added to the tree Calculate the vertical scroll bar Update the screen to display the new item param item item that has been added to the receiver void added Item Selectable Item item int index calculate Vertical Scrollbar if get Last Focus null if no item has the focus set Last Focus item true set focus to new must be first item  SelectableItem addedItem SelectableItem calculateVerticalScrollbar getLastFocus setLastFocus
The Selectable Item item is about to be added to the tree param item item that is about to be added to the receiver void adding Item Selectable Item item int index if index 0 index get Bottom Index scroll Vertical Adding Item index  SelectableItem addingItem SelectableItem getBottomIndex scrollVerticalAddingItem
Set the scroll range of the horizontal scroll bar Resize the scroll bar if the scroll range maximum has changed void calculate Horizontal Scrollbar if draw Count 0 return int new Maximum get Content Width Scroll Bar horizontal Bar get Horizontal Bar if horizontal Bar get Maximum new Maximum The call to set Maximum is ignored if new Maximum is 0 Therefore we can not rely on get Maximum to subsequently return the number of items in the receiver We always have to use get Visible Item Count Never rely on get Maximum to return what you set It may not accept the value you set Even if you use a valid value now the implementation may change later That s what caused 1FRLOSG horizontal Bar set Maximum new Maximum if get Vertical Bar get Visible false remove these lines horizontal Bar set Maximum new Maximum when PR 1FIG5CG is fixed resize Horizontal Scrollbar  calculateHorizontalScrollbar drawCount newMaximum getContentWidth ScrollBar horizontalBar getHorizontalBar horizontalBar getMaximum newMaximum setMaximum newMaximum getMaximum getVisibleItemCount getMaximum horizontalBar setMaximum newMaximum getVerticalBar getVisible horizontalBar setMaximum newMaximum resizeHorizontalScrollbar
Calculate the height of items in the receiver Only the image height is calculated if an item height has already been calculated Do nothing if both the item height and the image height have already been calculated void calculate Item Height Selectable Item item GC gc String item Text int item Height 1 if item Image Extent null text Height 1 return item Text item get Text if item Text null text Height 1 gc new GC this gc set Font item get Font item Height gc string Extent item Text y text Height item Height gc dispose if item Image Extent null item Image Extent get Image Extent item if item Image Extent null if item Image Extent y text Height item Height item Image Extent y else item Height text Height item Height get Item Padding make sure that there is empty space below the image text if item Height get Item Height only set new item height if it s higher because new set Item Height item Height smaller item height may not include an icon  calculateItemHeight SelectableItem itemText itemHeight itemImageExtent textHeight itemText getText itemText textHeight setFont getFont itemHeight stringExtent itemText textHeight itemHeight itemImageExtent itemImageExtent getImageExtent itemImageExtent itemImageExtent textHeight itemHeight itemImageExtent itemHeight textHeight itemHeight getItemPadding itemHeight getItemHeight setItemHeight itemHeight
Calculate the range of items that need to be selected given the clicked item identified by hit Item Index param hit Item Index item that was clicked and that the new selection range will be based on This index is relative to the top index int calculate Shift Selection Range int hit Item Index int selection Range new int 1 1 Selectable Item closest Item null Selectable Item selected Item Enumeration selected Items get Selection Vector elements while selected Items has More Elements true selected Item Selectable Item selected Items next Element if closest Item null closest Item selected Item else if Math abs hit Item Index get Visible Index selected Item Math abs hit Item Index get Visible Index closest Item closest Item selected Item if closest Item null no item selected closest Item get Last Selection item selected last may still have the focus if closest Item null selection Range 0 get Visible Index closest Item selection Range 1 hit Item Index return selection Range  hitItemIndex hitItemIndex calculateShiftSelectionRange hitItemIndex selectionRange SelectableItem closestItem SelectableItem selectedItem selectedItems getSelectionVector selectedItems hasMoreElements selectedItem SelectableItem selectedItems nextElement closestItem closestItem selectedItem hitItemIndex getVisibleIndex selectedItem hitItemIndex getVisibleIndex closestItem closestItem selectedItem closestItem closestItem getLastSelection closestItem selectionRange getVisibleIndex closestItem selectionRange hitItemIndex selectionRange
Set the scroll range of the vertical scroll bar Resize the scroll bar if the scroll range maximum has changed void calculate Vertical Scrollbar if draw Count 0 return int new Maximum get Visible Item Count Scroll Bar vertical Bar get Vertical Bar The call to set Maximum is ignored if new Maximum is 0 Therefore we can not rely on get Maximum to subsequently return the number of items in the receiver We always have to use get Visible Item Count Never rely on get Maximum to return what you set It may not accept the value you set Even if you use a valid value now the implementation may change later That s what caused 1FRLOSG vertical Bar set Maximum new Maximum if get Horizontal Bar get Visible false remove these lines vertical Bar set Maximum new Maximum when PR 1FIG5CG is fixed resize Vertical Scrollbar  calculateVerticalScrollbar drawCount newMaximum getVisibleItemCount ScrollBar verticalBar getVerticalBar setMaximum newMaximum getMaximum getVisibleItemCount getMaximum verticalBar setMaximum newMaximum getHorizontalBar getVisible verticalBar setMaximum newMaximum resizeVerticalScrollbar
Answer the size of the receiver needed to display all items The length of the longest item in the receiver is used for the width public Point compute Size int w Hint int h Hint boolean changed check Widget int width get Content Width int height get Item Count get Item Height int scroll Bar Width compute Trim 0 0 0 0 width if width 0 width DEFAULT WIDTH if height 0 height DEFAULT HEIGHT if w Hint SWT DEFAULT width w Hint if h Hint SWT DEFAULT height h Hint if get Style SWT V SCROLL 0 width scroll Bar Width if get Style SWT H SCROLL 0 height scroll Bar Width return new Point width height  computeSize wHint hHint checkWidget getContentWidth getItemCount getItemHeight scrollBarWidth computeTrim DEFAULT_WIDTH DEFAULT_HEIGHT wHint wHint hHint hHint getStyle V_SCROLL scrollBarWidth getStyle H_SCROLL scrollBarWidth
Do a ctrl shift selection meaning the ctrl and shift keys were pressed when the mouse click on an item occurred If an already selected item was clicked the focus is moved to that item If the previous selection was a ctrl or ctrl shift selection the range between the last selected item and the clicked item is selected Otherwise a regular shift selection is performed param hit Item specifies the clicked item param hit Item Index specifies the index of the clicked item relative to the first item void ctrl Shift Select Selectable Item hit Item int hit Item Index int from Index 1 int to Index 1 int last Selection Index 1 int selection Range Selectable Item last Selection get Last Selection if last Selection null last Selection Index get Visible Index last Selection if get Selection Vector contains hit Item true clicked an already selected item hit Item Index last Selection Index and click was not on last selected item set Last Selection hit Item true set last selection which also sets the focus else if is Ctrl Selection true was last selection ctrl ctrl shift selection from Index last Selection Index select from last selection to Index hit Item Index else clicked outside existing selection range selection Range calculate Shift Selection Range hit Item Index from Index selection Range 0 to Index selection Range 1 if from Index 1 to Index 1 select Range from Index to Index  hitItem hitItemIndex ctrlShiftSelect SelectableItem hitItem hitItemIndex fromIndex toIndex lastSelectionIndex selectionRange SelectableItem lastSelection getLastSelection lastSelection lastSelectionIndex getVisibleIndex lastSelection getSelectionVector hitItem hitItemIndex lastSelectionIndex setLastSelection hitItem isCtrlSelection fromIndex lastSelectionIndex toIndex hitItemIndex selectionRange calculateShiftSelectionRange hitItemIndex fromIndex selectionRange toIndex selectionRange fromIndex toIndex selectRange fromIndex toIndex
Deselect item param item item that should be deselected void deselect Selectable Item item Vector selected Items get Selection Vector if item null item is Selected true item set Selected false redraw Selection item selected Items remove Element item  SelectableItem selectedItems getSelectionVector isSelected setSelected redrawSelection selectedItems removeElement
Deselect all item except keep Selected param keep Selected item that should remain selected void deselect All Except Selectable Item keep Selected Vector selected Items get Selection Vector Vector deselected Items new Vector selected Items size Enumeration elements selected Items elements Selectable Item item deselect and repaint previously selected items while elements has More Elements true item Selectable Item elements next Element if item is Selected true item keep Selected item set Selected false always redraw the selection even if item is redrawn again in set Last Selection Fixes 1G0GQ8W redraw Selection item deselected Items add Element item elements deselected Items elements while elements has More Elements true item Selectable Item elements next Element selected Items remove Element item set Last Selection keep Selected false  keepSelected keepSelected deselectAllExcept SelectableItem keepSelected selectedItems getSelectionVector deselectedItems selectedItems selectedItems SelectableItem hasMoreElements SelectableItem nextElement isSelected keepSelected setSelected setLastSelection redrawSelection deselectedItems addElement deselectedItems hasMoreElements SelectableItem nextElement selectedItems removeElement setLastSelection keepSelected
Deselect all items except those in keep Selected param keep Selected items that should remain selected void deselect All Except Vector keep Selected Vector selected Items get Selection Vector Vector deselected Items new Vector selected Items size Enumeration elements selected Items elements Selectable Item item deselect and repaint previously selected items while elements has More Elements true item Selectable Item elements next Element if item is Selected true keep Selected contains item false item set Selected false always redraw the selection even if item is redrawn again in set Last Selection Fixes 1G0GQ8W redraw Selection item deselected Items add Element item elements deselected Items elements while elements has More Elements true item Selectable Item elements next Element selected Items remove Element item if keep Selected size 0 set Last Selection Selectable Item keep Selected first Element false  keepSelected keepSelected deselectAllExcept keepSelected selectedItems getSelectionVector deselectedItems selectedItems selectedItems SelectableItem hasMoreElements SelectableItem nextElement isSelected keepSelected setSelected setLastSelection redrawSelection deselectedItems addElement deselectedItems hasMoreElements SelectableItem nextElement selectedItems removeElement keepSelected setLastSelection SelectableItem keepSelected firstElement
display async Exec new Runnable public void run Only send a selection event when the item has not been disposed Fixes 1GE6XQA if item is Disposed false Event event new Event event item item notify Listeners SWT Selection event  asyncExec isDisposed notifyListeners
Deselect item Notify listeners param item item that should be deselected void deselect Notify final Selectable Item item if item is Selected true deselect item set Last Selection item true update looks better when event notification takes long to return display async Exec new Runnable public void run Only send a selection event when the item has not been disposed Fixes 1GE6XQA if item is Disposed false Event event new Event event item item notify Listeners SWT Selection event  deselectNotify SelectableItem isSelected setLastSelection asyncExec isDisposed notifyListeners
Deselect all items starting at and including from Index stopping at and including to Index param from Index index relative to the first item where deselection should start Deselecion includes from Index param to Index index relative to the first item where deselection should stop Deselecion includes to Index void deselect Range int from Index int to Index if from Index to Index for int i to Index i from Index i deselect get Visible Item i else if from Index to Index for int i to Index i from Index i deselect get Visible Item i set Last Selection get Visible Item from Index true  fromIndex toIndex fromIndex fromIndex toIndex toIndex deselectRange fromIndex toIndex fromIndex toIndex toIndex fromIndex getVisibleItem fromIndex toIndex toIndex fromIndex getVisibleItem setLastSelection getVisibleItem fromIndex
Modifier Key Action None Remove old selection move selection down one item Ctrl Keep old selection move input focus down one item Shift Extend selection by one item Modifier Key is ignored when receiver has single selection style param key Mask the modifier key that was pressed void do Arrow Down int key Mask Selectable Item last Focus get Last Focus Selectable Item new Focus int focus Item Index get Visible Index last Focus if focus Item Index get Visible Item Count 1 1 because indices are 0 based focus Item Index new Focus get Visible Item focus Item Index if key Mask SWT MOD1 is Multi Select true set Last Focus new Focus true else if key Mask SWT MOD2 is Multi Select true shift Select new Focus focus Item Index else deselect All Except new Focus select Notify new Focus  keyMask doArrowDown keyMask SelectableItem lastFocus getLastFocus SelectableItem newFocus focusItemIndex getVisibleIndex lastFocus focusItemIndex getVisibleItemCount focusItemIndex newFocus getVisibleItem focusItemIndex keyMask isMultiSelect setLastFocus newFocus keyMask isMultiSelect shiftSelect newFocus focusItemIndex deselectAllExcept newFocus selectNotify newFocus
Modifier Key Action None Scroll receiver to the left Ctrl See None above Shift See None above param key Mask the modifier key that was pressed void do Arrow Left int key Mask Scroll Bar horizontal Bar get Horizontal Bar int scroll Selection horizontal Bar get Selection int scroll Amount if horizontal Bar get Visible false return scroll Amount Math min HORIZONTAL SCROLL INCREMENT scroll Selection horizontal Bar set Selection scroll Selection scroll Amount set Horizontal Offset horizontal Bar get Selection 1  keyMask doArrowLeft keyMask ScrollBar horizontalBar getHorizontalBar scrollSelection horizontalBar getSelection scrollAmount horizontalBar getVisible scrollAmount HORIZONTAL_SCROLL_INCREMENT scrollSelection horizontalBar setSelection scrollSelection scrollAmount setHorizontalOffset horizontalBar getSelection
Modifier Key Action None Scroll receiver to the right Ctrl See None above Shift See None above param key Mask the modifier key that was pressed void do Arrow Right int key Mask Scroll Bar horizontal Bar get Horizontal Bar int scroll Selection horizontal Bar get Selection int scroll Amount if horizontal Bar get Visible false return scroll Amount Math min scroll by the smaller of HORIZONTAL SCROLL INCREMENT the scroll increment horizontal Bar get Maximum and the remaining scroll range horizontal Bar get Page Increment scroll Selection horizontal Bar set Selection scroll Selection scroll Amount set Horizontal Offset horizontal Bar get Selection 1  keyMask doArrowRight keyMask ScrollBar horizontalBar getHorizontalBar scrollSelection horizontalBar getSelection scrollAmount horizontalBar getVisible scrollAmount HORIZONTAL_SCROLL_INCREMENT horizontalBar getMaximum horizontalBar getPageIncrement scrollSelection horizontalBar setSelection scrollSelection scrollAmount setHorizontalOffset horizontalBar getSelection
Modifier Key Action None Remove old selection move selection up one item Ctrl Keep old selection move input focus up one item Shift Extend selection by one item Modifier Key is ignored when receiver has single selection style param key Mask the modifier key that was pressed void do Arrow Up int key Mask Selectable Item last Focus get Last Focus Selectable Item new Focus int focus Item Index get Visible Index last Focus if focus Item Index 0 focus Item Index new Focus get Visible Item focus Item Index if key Mask SWT MOD1 is Multi Select true set Last Focus new Focus true else if key Mask SWT MOD2 is Multi Select true shift Select new Focus focus Item Index else deselect All Except new Focus select Notify new Focus  keyMask doArrowUp keyMask SelectableItem lastFocus getLastFocus SelectableItem newFocus focusItemIndex getVisibleIndex lastFocus focusItemIndex focusItemIndex newFocus getVisibleItem focusItemIndex keyMask isMultiSelect setLastFocus newFocus keyMask isMultiSelect shiftSelect newFocus focusItemIndex deselectAllExcept newFocus selectNotify newFocus
Perform a selection operation on the item check box param item the item that was clicked void do Check Item Selectable Item item Event event new Event item set Checked item get Checked event item item event detail SWT CHECK notify Listeners SWT Selection event  doCheckItem SelectableItem setChecked getChecked notifyListeners
Free resources void do Dispose set Removing All true get Selection Vector remove All Elements last Focus Item null last Selected Item null if unchecked Image null unchecked Image dispose if gray Unchecked Image null gray Unchecked Image dispose if check Mark Image null check Mark Image dispose  doDispose setRemovingAll getSelectionVector removeAllElements lastFocusItem lastSelectedItem uncheckedImage uncheckedImage grayUncheckedImage grayUncheckedImage checkMarkImage checkMarkImage
Modifier Key Action None Remove old selection move selection to the last item Ctrl Keep old selection move input focus to the last item Shift Extend selection to the last item Modifier Key is ignored when receiver has single selection style param key Mask the modifier key that was pressed void do End int key Mask Selectable Item last Focus get Last Focus Selectable Item new Focus int focus Item Index get Visible Index last Focus int last Item Index get Visible Item Count 1 1 because indices are 0 based if focus Item Index last Item Index new Focus get Visible Item last Item Index if key Mask SWT MOD1 is Multi Select true set Last Focus new Focus true else if key Mask SWT MOD2 is Multi Select true shift Select new Focus last Item Index else deselect All Except new Focus select Notify new Focus  keyMask doEnd keyMask SelectableItem lastFocus getLastFocus SelectableItem newFocus focusItemIndex getVisibleIndex lastFocus lastItemIndex getVisibleItemCount focusItemIndex lastItemIndex newFocus getVisibleItem lastItemIndex keyMask isMultiSelect setLastFocus newFocus keyMask isMultiSelect shiftSelect newFocus lastItemIndex deselectAllExcept newFocus selectNotify newFocus
Modifier Key Action None Remove old selection move selection to the first item Ctrl Keep old selection move input focus to the first item Shift Extend selection to the first item Modifier Key is ignored when receiver has single selection style param key Mask the modifier key that was pressed void do Home int key Mask Selectable Item last Focus get Last Focus Selectable Item new Focus int first Item Index 0 if get Visible Index last Focus first Item Index new Focus get Visible Item first Item Index if key Mask SWT MOD1 is Multi Select true set Last Focus new Focus true else if key Mask SWT MOD2 is Multi Select true shift Select new Focus first Item Index else deselect All Except new Focus select Notify new Focus  keyMask doHome keyMask SelectableItem lastFocus getLastFocus SelectableItem newFocus firstItemIndex getVisibleIndex lastFocus firstItemIndex newFocus getVisibleItem firstItemIndex keyMask isMultiSelect setLastFocus newFocus keyMask isMultiSelect shiftSelect newFocus firstItemIndex deselectAllExcept newFocus selectNotify newFocus
Perform a mouse select action according to the key state mask in event State Mask Key state mask is ignored when receiver has the single selection style param item the item that was clicked param item Index the index of the clicked item relative to the first item of the receiver param event State Mask the key state mask of the mouse event param button the mouse button that was pressed void do Mouse Select Selectable Item item int item Index int event State Mask int button ignore Double Click item last Selected Item if button 1 item is Selected true If the item is already selected do not change the selection when using button 2 or 3 These buttons may invoke drag and drop or open the context menu for the current selection return if event State Mask SWT MOD1 0 event State Mask SWT MOD2 0 is Multi Select true if get Selection Vector size 0 no old selection select Notify item do standard CTRL selection else ctrl Shift Select item item Index set Ctrl Selection true else if event State Mask SWT MOD2 0 is Multi Select true shift Select item item Index set Ctrl Selection false else if event State Mask SWT MOD1 0 is Multi Select true toggle Selection Notify item set Ctrl Selection true else if event State Mask SWT MOD3 SWT MOD4 0 On MacOSX holding the control key down while pressing button 1 brings up the context menu Do not change the selection in this case deselect All Except item select Notify item set Ctrl Selection false  eventStateMask itemIndex eventStateMask doMouseSelect SelectableItem itemIndex eventStateMask ignoreDoubleClick lastSelectedItem isSelected eventStateMask eventStateMask isMultiSelect getSelectionVector selectNotify ctrlShiftSelect itemIndex setCtrlSelection eventStateMask isMultiSelect shiftSelect itemIndex setCtrlSelection eventStateMask isMultiSelect toggleSelectionNotify setCtrlSelection eventStateMask deselectAllExcept selectNotify setCtrlSelection
Modifier Key Action None Remove old selection move selection one page down Ctrl Keep old selection move input focus one page down Shift Extend selection one page down One page is the number of items that can be displayed in the receiver s canvas without truncating the last item The selection is set to the last item if there is no full page of items left Modifier Key is ignored when receiver has single selection style param key Mask the modifier key that was pressed void do Page Down int key Mask Selectable Item new Focus int focus Item Index get Visible Index get Last Focus int last Item Index get Visible Item Count 1 1 because indices are 0 based int visible Item Count if focus Item Index last Item Index visible Item Count get Item Count Whole focus Item Index Math min last Item Index focus Item Index visible Item Count 1 new Focus get Visible Item focus Item Index if new Focus null return if key Mask SWT MOD1 is Multi Select true set Last Focus new Focus true else if key Mask SWT MOD2 is Multi Select true shift Select new Focus focus Item Index else deselect All Except new Focus select Notify new Focus  keyMask doPageDown keyMask SelectableItem newFocus focusItemIndex getVisibleIndex getLastFocus lastItemIndex getVisibleItemCount visibleItemCount focusItemIndex lastItemIndex visibleItemCount getItemCountWhole focusItemIndex lastItemIndex focusItemIndex visibleItemCount newFocus getVisibleItem focusItemIndex newFocus keyMask isMultiSelect setLastFocus newFocus keyMask isMultiSelect shiftSelect newFocus focusItemIndex deselectAllExcept newFocus selectNotify newFocus
Modifier Key Action None Remove old selection move selection one page up Ctrl Keep old selection move input focus one page up Shift Extend selection one page up One page is the number of items that can be displayed in the receiver s canvas without truncating the last item The selection is set to the first item if there is no full page of items left Modifier Key is ignored when receiver has single selection style param key Mask the modifier key that was pressed void do Page Up int key Mask Selectable Item new Focus int focus Item Index get Visible Index get Last Focus int visible Item Count if focus Item Index 0 visible Item Count get Item Count Whole focus Item Index Math max 0 focus Item Index visible Item Count 1 new Focus get Visible Item focus Item Index if key Mask SWT MOD1 is Multi Select true set Last Focus new Focus true else if key Mask SWT MOD2 is Multi Select true shift Select new Focus focus Item Index else deselect All Except new Focus select Notify new Focus  keyMask doPageUp keyMask SelectableItem newFocus focusItemIndex getVisibleIndex getLastFocus visibleItemCount focusItemIndex visibleItemCount getItemCountWhole focusItemIndex focusItemIndex visibleItemCount newFocus getVisibleItem focusItemIndex keyMask isMultiSelect setLastFocus newFocus keyMask isMultiSelect shiftSelect newFocus focusItemIndex deselectAllExcept newFocus selectNotify newFocus
Modifier Key Action Ctrl Keep old selection toggle selection of the item that has the input focus Shift Extend selection to the item that has the input focus Ctrl Shift Set selection to the item that has input focus Do nothing if receiver has single selection style param key Mask the modifier key that was pressed void do Space int key Mask Selectable Item item get Last Focus if item null return if item is Checkable true do Check Item item int item Index get Visible Index item if key Mask SWT NULL item is Selected false do simple space select in SINGLE and MULTI mode deselect All Except item select Notify item return if is Multi Select false return if key Mask SWT MOD1 toggle Selection Notify item else if key Mask SWT MOD1 0 key Mask SWT MOD2 0 deselect All Except item select Notify item else if key Mask SWT MOD2 shift Select item item Index  keyMask doSpace keyMask SelectableItem getLastFocus isCheckable doCheckItem itemIndex getVisibleIndex keyMask isSelected deselectAllExcept selectNotify isMultiSelect keyMask toggleSelectionNotify keyMask keyMask deselectAllExcept selectNotify keyMask shiftSelect itemIndex
Make sure that free space at the bottom of the receiver is occupied There will be new space available below the last item when the receiver s height is increased In this case the receiver is scrolled down to occupy the new space if the top item is not the first item of the receiver void claim Bottom Free Space int client Area Item Count get Item Count Whole int top Index get Top Index int new Top Index int last Item Index get Visible Item Count top Index if top Index 0 last Item Index 0 last Item Index client Area Item Count new Top Index Math max 0 top Index client Area Item Count last Item Index set Top Index new Top Index true  claimBottomFreeSpace clientAreaItemCount getItemCountWhole topIndex getTopIndex newTopIndex lastItemIndex getVisibleItemCount topIndex topIndex lastItemIndex lastItemIndex clientAreaItemCount newTopIndex topIndex clientAreaItemCount lastItemIndex setTopIndex newTopIndex
Make sure that free space at the right side of the receiver is occupied There will be new space available at the right side of the receiver when the receiver s width is increased In this case the receiver is scrolled to the right to occupy the new space if possible void claim Right Free Space int client Area Width get Client Area width int new Horizontal Offset client Area Width get Content Width if new Horizontal Offset get Horizontal Offset 0 item is no longer drawn past the right border of the client area new Horizontal Offset Math min 0 new Horizontal Offset align the right end of the item with the right border of the set Horizontal Offset new Horizontal Offset client area window is scrolled right  claimRightFreeSpace clientAreaWidth getClientArea newHorizontalOffset clientAreaWidth getContentWidth newHorizontalOffset getHorizontalOffset newHorizontalOffset newHorizontalOffset setHorizontalOffset newHorizontalOffset
Not used right now Replace focus In focus Out with this method once Display get Focus Window returns the new focus window on Focus Out event see 1FMITIE The focus has moved in to or out of the receiver Redraw the item selection to reflect the focus change param event the focus change event void focus Change Event event Enumeration items get Selection Vector elements Selectable Item last Focus Item get Last Focus Selectable Item item while items has More Elements true item Selectable Item items next Element redraw Selection item if last Focus Item null redraw Selection last Focus Item  focusIn focusOut getFocusWindow FocusOut focusChange getSelectionVector SelectableItem lastFocusItem getLastFocus SelectableItem hasMoreElements SelectableItem nextElement redrawSelection lastFocusItem redrawSelection lastFocusItem
The focus has moved in to or out of the receiver Redraw the item selection to reflect the focus change param event the focus change event void focus In Event event Enumeration items get Selection Vector elements Selectable Item last Focus Item get Last Focus Selectable Item item Workaround for 1FMITIE has Focus true while items has More Elements true item Selectable Item items next Element redraw Selection item if last Focus Item null redraw Selection last Focus Item Fix blank item on slow machines V Ms Also fixes 1G0IFMZ update  focusIn getSelectionVector SelectableItem lastFocusItem getLastFocus SelectableItem hasFocus hasMoreElements SelectableItem nextElement redrawSelection lastFocusItem redrawSelection lastFocusItem VMs
The focus has moved in to or out of the receiver Redraw the item selection to reflect the focus change param event the focus change event void focus Out Event event Enumeration items get Selection Vector elements Selectable Item last Focus Item get Last Focus Selectable Item item Workaround for 1FMITIE has Focus false while items has More Elements true item Selectable Item items next Element redraw Selection item if last Focus Item null redraw Selection last Focus Item Fix blank item on slow machines V Ms Also fixes 1G0IFMZ update  focusOut getSelectionVector SelectableItem lastFocusItem getLastFocus SelectableItem hasFocus hasMoreElements SelectableItem nextElement redrawSelection lastFocusItem redrawSelection lastFocusItem VMs
Answer the index of the last item position in the receiver s client area return 0 based index of the last item position in the tree s client area int get Bottom Index return get Top Index get Item Count Truncated get Client Area  getBottomIndex getTopIndex getItemCountTruncated getClientArea
Answer the size of the check box image The calculation is cached and assumes that the images for the checked and unchecked state are the same size Point get Check Box Extent Image checked Image Rectangle image Bounds if check Box Extent null checked Image get Unchecked Image if checked Image null image Bounds checked Image get Bounds check Box Extent new Point image Bounds width image Bounds height else check Box Extent new Point 0 0 return check Box Extent  getCheckBoxExtent checkedImage imageBounds checkBoxExtent checkedImage getUncheckedImage checkedImage imageBounds checkedImage getBounds checkBoxExtent imageBounds imageBounds checkBoxExtent checkBoxExtent
Answer the image for the selected check box Answer null if the image couldn t be loaded Image get Check Mark Image if check Mark Image null check Mark Image new Image display Check Mark Image Data return check Mark Image  getCheckMarkImage checkMarkImage checkMarkImage CheckMarkImageData checkMarkImage
Answer the width of the receiver s content Needs to be set by subclasses int get Content Width return content Width  getContentWidth contentWidth
Answer the horizontal drawing offset used for scrolling This is 0 if the receiver has been scrolled to the left 0 if the receiver has been scrolled to the right and 0 if the receiver has not been scrolled int get Horizontal Offset return horizontal Offset  getHorizontalOffset horizontalOffset
Answer whether a double click should be ignored boolean get Ignore Double Click return ignore Double Click  getIgnoreDoubleClick ignoreDoubleClick
Answer the size of item images Calculated during the item height calculation Point get Image Extent return item Image Extent  getImageExtent itemImageExtent
Answer the image extent of item Overridden by subclasses Point get Image Extent Selectable Item item Image image item get Image Rectangle image Bounds Point image Extent null if image null image Bounds image get Bounds image Extent new Point image Bounds width image Bounds height return image Extent  getImageExtent SelectableItem getImage imageBounds imageExtent imageBounds getBounds imageExtent imageBounds imageBounds imageExtent
return image Extent Answer the index of item in the receiver abstract int get Index Selectable Item item  imageExtent getIndex SelectableItem
abstract int get Index Selectable Item item Answer the first and last index of items that can be displayed in the area defined by clip Rectangle This includes partial items return Array First element is the index of the first item in clip Rectangle Second element is the index of the last item in clip Rectangle int get Index Range Rectangle clip Rectangle int visible Range new int 0 0 visible Range 0 clip Rectangle y get Item Height visible Range 1 visible Range 0 get Item Count Truncated clip Rectangle 1 1 because item index is 0 based return visible Range  getIndex SelectableItem clipRectangle clipRectangle clipRectangle getIndexRange clipRectangle visibleRange visibleRange clipRectangle getItemHeight visibleRange visibleRange getItemCountTruncated clipRectangle visibleRange
Return the item that draws the marker indicating the insert location in a drag and drop operation Selectable Item get Insert Item return insert Item  SelectableItem getInsertItem insertItem
return insert Item Answer the number of items in the receiver public abstract int get Item Count  insertItem getItemCount
public abstract int get Item Count Answer the number of items that can be displayed in rectangle The result includes partially visible items int get Item Count Truncated Rectangle rectangle int item Height get Item Height int item Count 0 int start Index start Index rectangle y item Height item Count Compatibility ceil rectangle y rectangle height item Height start Index return item Count  getItemCount getItemCountTruncated itemHeight getItemHeight itemCount startIndex startIndex itemHeight itemCount itemHeight startIndex itemCount
Answer the number of items that can be displayed in the client area of the receiver The result only includes items that completely fit into the client area int get Item Count Whole return get Client Area height get Item Height  getItemCountWhole getClientArea getItemHeight
Answer the height of an item in the receiver The item height is the greater of the item icon height and text height of the first item that has text or an image respectively Calculate a default item height based on the font height if no item height has been calculated yet public int get Item Height check Widget GC gc if item Height 0 gc new GC this item Height gc string Extent String y get Item Padding initial item height font height item spacing use real font height here when available in SWT instead of GC text Extent gc dispose return item Height  getItemHeight checkWidget itemHeight itemHeight stringExtent getItemPadding textExtent itemHeight
Answer the number of pixels that should be added to the item height int get Item Padding return 2 display text Highlight Thickness  getItemPadding textHighlightThickness
Answer the item that most recently received the input focus Selectable Item get Last Focus return last Focus Item  SelectableItem getLastFocus lastFocusItem
Answer the item that was selected most recently Selectable Item get Last Selection return last Selected Item  SelectableItem getLastSelection lastSelectedItem
Answer the event listener used for all events Events are dispatched to handler methods in handle Events Event This scheme saves a lot of inner classes Listener get Listener return listener  handleEvents getListener
Answer the y coordinate at which item is drawn param item Selectable Item for which the paint position should be returned return the y coordinate at which item is drawn Return 1 if item is not an item of the receiver int get RedrawY Selectable Item item int redraw Index get Visible Index item int redrawY 1 if redraw Index 1 redrawY redraw Index get Top Index get Item Height return redrawY  SelectableItem getRedrawY SelectableItem redrawIndex getVisibleIndex redrawIndex redrawIndex getTopIndex getItemHeight
Answer the number of selected items in the receiver public int get Selection Count check Widget return get Selection Vector size  getSelectionCount checkWidget getSelectionVector
Answer the selected items of the receiver return The selected items of the receiver stored in a Vector Returned Vector is empty if no items are selected Vector get Selection Vector return selected Items  getSelectionVector selectedItems
Answer the index of the first visible item in the receiver s client area return 0 based index of the first visible item in the receiver s client area int get Top Index return top Index  getTopIndex topIndex
Answer the image for the deselected check box Image get Unchecked Image if unchecked Image null unchecked Image new Image display Unchecked Image Data return unchecked Image  getUncheckedImage uncheckedImage uncheckedImage UncheckedImageData uncheckedImage
Answer the image for the grayed eck box Image get Gray Unchecked Image if gray Unchecked Image null gray Unchecked Image new Image display Gray Unchecked Image Data return gray Unchecked Image  getGrayUncheckedImage grayUncheckedImage grayUncheckedImage GrayUncheckedImageData grayUncheckedImage
Answer the index of item in the receiver Answer 1 if the item is not visible The returned index must refer to a visible item Note Visible in this context does not neccessarily mean that the item is displayed on the screen It only means that the item would be displayed if it is located inside the receiver s client area Normally every item of the receiver is visible 
abstract int get Visible Index Selectable Item item Answer the Selectable Item located at item Index in the receiver param item Index location of the Selectable Item object to return  getVisibleIndex SelectableItem SelectableItem itemIndex itemIndex SelectableItem
abstract Selectable Item get Visible Item int item Index Answer the number of visible items of the receiver Note Visible in this context does not neccessarily mean that the item is displayed on the screen It only means that the item would be displayed if it is located inside the receiver s client area Normally every item of the receiver is visible int get Visible Item Count return get Item Count  SelectableItem getVisibleItem itemIndex getVisibleItemCount getItemCount
Answer the y coordinate at which item is drawn param item Selectable Item for which the paint position should be returned return the y coordinate at which item is drawn Return 1 if item is null or outside the client area  SelectableItem
abstract int get Visible RedrawY Selectable Item item Handle the events the receiver is listening to void handle Events Event event switch event type case SWT Dispose do Dispose break case SWT Key Down key Down event break case SWT Resize resize event break case SWT Selection if event widget get Vertical Bar scroll Vertical event else if event widget get Horizontal Bar scroll Horizontal event break case SWT Focus Out focus Out event break case SWT Focus In focus In event break case SWT Traverse switch event detail case SWT TRAVERSE ESCAPE case SWT TRAVERSE RETURN case SWT TRAVERSE TAB NEXT case SWT TRAVERSE TAB PREVIOUS case SWT TRAVERSE PAGE NEXT case SWT TRAVERSE PAGE PREVIOUS event doit true break break  getVisibleRedrawY SelectableItem handleEvents doDispose KeyDown keyDown getVerticalBar scrollVertical getHorizontalBar scrollHorizontal FocusOut focusOut FocusIn focusIn TRAVERSE_ESCAPE TRAVERSE_RETURN TRAVERSE_TAB_NEXT TRAVERSE_TAB_PREVIOUS TRAVERSE_PAGE_NEXT TRAVERSE_PAGE_PREVIOUS
Answer whether item has the input focus boolean has Focus Selectable Item item return is Focus Control item get Last Focus  hasFocus SelectableItem isFocusControl getLastFocus
listener may be needed by overridden install Listeners listener new Listener public void handle Event Event event handle Events event  installListeners handleEvent handleEvents
Initialize the receiver Add event listeners and set widget colors void initialize Scroll Bar horizontal Bar get Horizontal Bar Scroll Bar vertical Bar get Vertical Bar listener may be needed by overridden install Listeners listener new Listener public void handle Event Event event handle Events event set Selection Vector new Vector install Listeners calculate Vertical Scrollbar calculate Horizontal Scrollbar horizontal Bar set Minimum 0 vertical Bar set Minimum 0 horizontal Bar set Increment HORIZONTAL SCROLL INCREMENT set Foreground display get System Color SWT COLOR LIST FOREGROUND set Background display get System Color SWT COLOR LIST BACKGROUND  ScrollBar horizontalBar getHorizontalBar ScrollBar verticalBar getVerticalBar installListeners handleEvent handleEvents setSelectionVector installListeners calculateVerticalScrollbar calculateHorizontalScrollbar horizontalBar setMinimum verticalBar setMinimum horizontalBar setIncrement HORIZONTAL_SCROLL_INCREMENT setForeground getSystemColor COLOR_LIST_FOREGROUND setBackground getSystemColor COLOR_LIST_BACKGROUND
Initialize the Image Data used for the checked unchecked images static void initialize Image Data Palette Data unchecked Palette new Palette Data new RGB new RGB 128 128 128 new RGB 255 255 255 Palette Data gray Unchecked Palette new Palette Data new RGB new RGB 128 128 128 new RGB 192 192 192 Palette Data check Mark Palette new Palette Data new RGB new RGB 0 0 0 new RGB 252 3 251 byte checkbox new byte 0 0 127 64 127 64 127 64 127 64 127 64 127 64 127 64 127 64 127 64 0 0 Each pixel is represented by one bit in the byte data The bit references the palette position 0 or 1 Each pixel row of an image is padded to one byte Arguments width height depth palette scanline padding data Unchecked Image Data new Image Data 11 11 1 unchecked Palette 2 checkbox Gray Unchecked Image Data new Image Data 11 11 1 gray Unchecked Palette 2 checkbox Check Mark Image Data new Image Data 7 7 1 check Mark Palette 1 new byte 4 8 112 34 6 114 34 Check Mark Image Data transparent Pixel 1  ImageData initializeImageData PaletteData uncheckedPalette PaletteData PaletteData grayUncheckedPalette PaletteData PaletteData checkMarkPalette PaletteData UncheckedImageData ImageData uncheckedPalette GrayUncheckedImageData ImageData grayUncheckedPalette CheckMarkImageData ImageData checkMarkPalette CheckMarkImageData transparentPixel
Add event listeners to the tree widget and its scroll bars void install Listeners Listener listener get Listener add Listener SWT Dispose listener add Listener SWT Resize listener add Listener SWT Key Down listener add Listener SWT Focus Out listener add Listener SWT Focus In listener add Listener SWT Traverse listener get Vertical Bar add Listener SWT Selection listener get Horizontal Bar add Listener SWT Selection listener  installListeners getListener addListener addListener addListener KeyDown addListener FocusOut addListener FocusIn addListener getVerticalBar addListener getHorizontalBar addListener
Answer whether the currently selected items were selected using the ctrl key boolean is Ctrl Selection return is Ctrl Selection  isCtrlSelection isCtrlSelection
Answer true if all items in the widget are disposed Used to optimize item disposal Prevents unnecessary screen updates boolean is Removing All return is Removing All  isRemovingAll isRemovingAll
Answer whether the receiver has the input focus Workaround for 1FMITIE public boolean is Focus Control return has Focus  isFocusControl hasFocus
Return whether the drop insert position is before or after the item set using motif setInsertMark return true insert position is after the insert item false insert position is before the insert item boolean is Insert After return is Insert After  motif_setInsertMark isInsertAfter isInsertAfter
Answer whether the receiver has the MULTI selection style set return true receiver is in multiple selection mode false receiver is in single selection mode boolean is Multi Select return get Style SWT MULTI 0  isMultiSelect getStyle
The item identified by changed Item has changed Calculate the item height based on the new item data it might now have an image which could also be the first image in the receiver Redraw the whole window if the item height has changed Otherwise redraw only the changed item or part of it depending on the repaint StartX and repaint Width parameters param changed Item the item that has changed param repaint StartX x position of the item redraw param repaint Width width of the item redraw void item Changed Selectable Item changed Item int repaint StartX int repaint Width int y Position int item Height int old Item Height get Item Height Point old Image Extent get Image Extent calculate Item Height changed Item make sure that the item height is recalculated no redraw necessary if redraw width is 0 or item is not visible if repaint Width 0 y Position get Visible RedrawY changed Item 1 return if changed Item is the first item with image item Height get Item Height if old Item Height item Height only redraw changed item if the item height and old Image Extent get Image Extent image size has not changed The latter will only change once from null to a value so it s safe to test using redrawing outside the client area redraws the widget border on Motif adjust the redraw width if necessary Workaround for 1G4TQRW repaint Width Math min repaint Width get Client Area width repaint StartX if repaint Width 0 redraw repaint StartX y Position repaint Width item Height true else redraw redraw all items if the item height has changed  changedItem repaintStartX repaintWidth changedItem repaintStartX repaintWidth itemChanged SelectableItem changedItem repaintStartX repaintWidth yPosition itemHeight oldItemHeight getItemHeight oldImageExtent getImageExtent calculateItemHeight changedItem repaintWidth yPosition getVisibleRedrawY changedItem changedItem itemHeight getItemHeight oldItemHeight itemHeight oldImageExtent getImageExtent repaintWidth repaintWidth getClientArea repaintStartX repaintWidth repaintStartX yPosition repaintWidth itemHeight
A key was pressed Call the appropriate handler method param event the key event void key Down Event event boolean is Ctrl Selection is Ctrl Selection if event state Mask SWT MOD1 is Ctrl Selection false switch event key Code case SWT ARROW UP do Arrow Up event state Mask break case SWT ARROW DOWN do Arrow Down event state Mask break case SWT ARROW LEFT do Arrow Left event state Mask break case SWT ARROW RIGHT do Arrow Right event state Mask break case SWT PAGE UP do Page Up event state Mask break case SWT PAGE DOWN do Page Down event state Mask break case SWT HOME do Home event state Mask break case SWT END do End event state Mask break default no selection occurred keep previous is Ctrl Selection is Ctrl Selection selection type information if event character do Space event state Mask is Ctrl Selection event state Mask SWT MOD1 forward the enter key pressed to default Selection listenters if event character SWT CR Event forward Event new Event forward Event item get Last Focus notify Listeners SWT Default Selection forward Event set Ctrl Selection is Ctrl Selection  keyDown isCtrlSelection isCtrlSelection stateMask isCtrlSelection keyCode ARROW_UP doArrowUp stateMask ARROW_DOWN doArrowDown stateMask ARROW_LEFT doArrowLeft stateMask ARROW_RIGHT doArrowRight stateMask PAGE_UP doPageUp stateMask PAGE_DOWN doPageDown stateMask doHome stateMask doEnd stateMask isCtrlSelection isCtrlSelection doSpace stateMask isCtrlSelection stateMask defaultSelection forwardEvent forwardEvent getLastFocus notifyListeners DefaultSelection forwardEvent setCtrlSelection isCtrlSelection
Sets the drop insert item The drop insert item has a visual hint to show where a dragged item will be inserted when dropped on the tree p param item the insert item param after true places the insert mark below item false places the insert mark above item void motif setInsertMark Selectable Item item boolean after Selectable Item current Item get Insert Item int redrawY set Insert Item item set Insert After after if current Item null redrawY get Visible RedrawY current Item if redrawY 1 current Item redraw Insert Mark redrawY if item null redrawY get Visible RedrawY item if redrawY 1 item redraw Insert Mark redrawY  motif_setInsertMark SelectableItem SelectableItem currentItem getInsertItem setInsertItem setInsertAfter currentItem getVisibleRedrawY currentItem currentItem redrawInsertMark getVisibleRedrawY redrawInsertMark
Overridden to implement set Redraw Redraw is ignored if set Redraw was set to false public void redraw check Widget if draw Count 0 super redraw  setRedraw setRedraw checkWidget drawCount
Overridden to implement set Redraw Redraw is ignored if set Redraw was set to false public void redraw int x int y int width int height boolean all check Widget if draw Count 0 super redraw x y width height all  setRedraw setRedraw checkWidget drawCount
Redraw the selection of item param item Selectable Item that should have the selection redrawn void redraw Selection Selectable Item item if item is Disposed return int redraw Position get Visible RedrawY item if redraw Position 1 item redraw Selection redraw Position  SelectableItem redrawSelection SelectableItem isDisposed redrawPosition getVisibleRedrawY redrawPosition redrawSelection redrawPosition
item has been removed from the receiver Update the display and the scroll bars void removed Item Selectable Item item claim Bottom Free Space calculate Vertical Scrollbar if get Item Count 0 reset  removedItem SelectableItem claimBottomFreeSpace calculateVerticalScrollbar getItemCount
item is about to be removed from the tree Move the selection input focus if item is selected or has the input focus param item item that is about to be removed from the tree void removing Item Selectable Item item Selectable Item next Focus Item null int item Index get Visible Index item int item Count get Visible Item Count deselect item and remove from selection if item is Selected true get Selection Vector remove Element item if item get Last Focus item Count 1 select previous item if removed item is bottom item otherwise select next item Fixes 1GA6L85 if item Index item Count 1 next Focus Item get Visible Item item Index 1 else next Focus Item get Visible Item item Index 1 set Last Focus next Focus Item true ignore items below widget client area if item Index 1 item Index get Bottom Index scroll Vertical Removed Item item Index  removingItem SelectableItem SelectableItem nextFocusItem itemIndex getVisibleIndex itemCount getVisibleItemCount isSelected getSelectionVector removeElement getLastFocus itemCount itemIndex itemCount nextFocusItem getVisibleItem itemIndex nextFocusItem getVisibleItem itemIndex setLastFocus nextFocusItem itemIndex itemIndex getBottomIndex scrollVerticalRemovedItem itemIndex
Reset state that is dependent on or calculated from the state of the receiver void reset set Selection Vector new Vector set Top Index No Scroll 0 true last Selected Item null last Focus Item null reset Item Data  setSelectionVector setTopIndexNoScroll lastSelectedItem lastFocusItem resetItemData
Reset state that is dependent on or calculated from the items of the receiver void reset Item Data set Horizontal Offset 0 set Item Height 0 item Image Extent null text Height 1 claim Right Free Space  resetItemData setHorizontalOffset setItemHeight itemImageExtent textHeight claimRightFreeSpace
The receiver has been resized Update the scroll bars and make sure that new space is being occupied by items void resize Event event resize 
void resize int horizontal Page Size get Horizontal Bar get Page Increment resize Horizontal Scrollbar resize Vertical Scrollbar if get Client Area width horizontal Page Size window resized wider Do this check here claim Right Free Space because claim Right Free Space is called elsewhere claim Bottom Free Space  horizontalPageSize getHorizontalBar getPageIncrement resizeHorizontalScrollbar resizeVerticalScrollbar getClientArea horizontalPageSize claimRightFreeSpace claimRightFreeSpace claimBottomFreeSpace
Display the horizontal scroll bar if items are drawn off screen Update the page size void resize Horizontal Scrollbar Scroll Bar horizontal Bar get Horizontal Bar int client Area Width get Client Area width if client Area Width get Content Width if horizontal Bar get Visible false horizontal Bar set Visible true horizontal Bar set Selection 0 else if horizontal Bar get Visible true horizontal Bar set Visible false horizontal Bar set Thumb client Area Width horizontal Bar set Page Increment client Area Width  resizeHorizontalScrollbar ScrollBar horizontalBar getHorizontalBar clientAreaWidth getClientArea clientAreaWidth getContentWidth horizontalBar getVisible horizontalBar setVisible horizontalBar setSelection horizontalBar getVisible horizontalBar setVisible horizontalBar setThumb clientAreaWidth horizontalBar setPageIncrement clientAreaWidth
Display the vertical scroll bar if items are drawn off screen Update the page size void resize Vertical Scrollbar int client Area Item Count get Item Count Whole Scroll Bar vertical Bar get Vertical Bar if client Area Item Count 0 return if client Area Item Count get Visible Item Count if vertical Bar get Visible false vertical Bar set Visible true Only set the page size to something smaller than the scroll range maximum Otherwise the scroll selection will be reset vertical Bar set Page Increment client Area Item Count vertical Bar set Thumb client Area Item Count else if vertical Bar get Visible true vertical Bar set Visible false  resizeVerticalScrollbar clientAreaItemCount getItemCountWhole ScrollBar verticalBar getVerticalBar clientAreaItemCount clientAreaItemCount getVisibleItemCount verticalBar getVisible verticalBar setVisible verticalBar setPageIncrement clientAreaItemCount verticalBar setThumb clientAreaItemCount verticalBar getVisible verticalBar setVisible
Scroll the rectangle specified by x y width height to the destination position Do nothing if redraw is set to false using set Redraw param destX destination x position of the scrolled rectangle param destY destination y position of the scrolled rectangle param x x location of the upper left corner of the scroll rectangle param y y location of the upper left corner of the scroll rectangle param width width of the scroll rectangle param height height of the scroll rectangle param all not used Used to be true scroll children intersecting the scroll rectangle void scroll int destX int destY int x int y int width int height boolean all if draw Count 0 update GC gc new GC this gc copy Area x y width height destX destY gc dispose  setRedraw drawCount copyArea
Scroll horizontally by num Pixel pixel param num Pixel the number of pixel to scroll num Pixel 0 scroll to left num Pixel 0 scroll to right  numPixel numPixel numPixel numPixel
abstract void scroll Horizontal int num Pixel The position of the horizontal scroll bar has been modified by the user Adjust the horizontal offset to trigger a horizontal scroll param event the scroll event void scroll Horizontal Event event set Horizontal Offset get Horizontal Bar get Selection 1  scrollHorizontal numPixel scrollHorizontal setHorizontalOffset getHorizontalBar getSelection
void scroll Show Item int index int item Index From Top index get Top Index int client Area Whole Item Count get Item Count Whole int scroll Amount 0 if item Index From Top client Area Whole Item Count show item below visible items scroll Amount item Index From Top if client Area Whole Item Count 0 will be 0 if show Item is called and receiver hasn t been displayed yet scroll Amount client Area Whole Item Count 1 else if item Index From Top 0 show item above visible items scroll Amount item Index From Top set Top Index get Top Index scroll Amount true  scrollShowItem itemIndexFromTop getTopIndex clientAreaWholeItemCount getItemCountWhole scrollAmount itemIndexFromTop clientAreaWholeItemCount scrollAmount itemIndexFromTop clientAreaWholeItemCount showItem scrollAmount clientAreaWholeItemCount itemIndexFromTop scrollAmount itemIndexFromTop setTopIndex getTopIndex scrollAmount
Scroll vertically by scroll Index Count items param scroll Index Count the number of items to scroll scroll Index Count 0 scroll up scroll Index Count 0 scroll down  scrollIndexCount scrollIndexCount scrollIndexCount scrollIndexCount
abstract void scroll Vertical int scroll Index Count The position of the horizontal scroll bar has been modified by the user Adjust the index of the top item to trigger a vertical scroll param event the scroll event void scroll Vertical Event event set Top Index get Vertical Bar get Selection false  scrollVertical scrollIndexCount scrollVertical setTopIndex getVerticalBar getSelection
Scroll items down to make space for a new item added to the receiver at position index param index position at which space for one new item should be made This index is relative to the first item of the receiver void scroll Vertical Adding Item int index Rectangle client Area get Client Area int item Height get Item Height int sourceY Math max 0 index get Top Index item Height need to scroll in visible area scroll 0 sourceY item Height destination x y 0 sourceY source x y client Area width client Area height true  scrollVerticalAddingItem clientArea getClientArea itemHeight getItemHeight getTopIndex itemHeight itemHeight clientArea clientArea
Scroll the items below the item at position index up so that they cover the removed item param index index of the removed item void scroll Vertical Removed Item int index Rectangle client Area get Client Area int item Height get Item Height int destinationY Math max 0 index get Top Index item Height scroll 0 destinationY destination x y 0 destinationY item Height source x y client Area width client Area height true  scrollVerticalRemovedItem clientArea getClientArea itemHeight getItemHeight getTopIndex itemHeight itemHeight clientArea clientArea
Select item if it is not selected param item item that should be selected void select Selectable Item item Vector selected Items get Selection Vector if item null item is Selected false is Removing All false item set Selected true redraw Selection item selected Items add Element item  SelectableItem selectedItems getSelectionVector isSelected isRemovingAll setSelected redrawSelection selectedItems addElement
Select item if it is not selected Send a Selection event if the selection was changed param item item that should be selected param async Notify true send the selection event asynchronously false send the selection event immediately void select Notify final Selectable Item item boolean async Notify if is Removing All false if item is Selected false select item set Last Selection item true update looks better when event notification takes long to return Event event new Event event item item if async Notify post Event SWT Selection event else send Event SWT Selection event  asyncNotify selectNotify SelectableItem asyncNotify isRemovingAll isSelected setLastSelection asyncNotify postEvent sendEvent
Select item if it is not selected Send a Selection event if the selection was changed param item item that should be selected void select Notify Selectable Item item select Notify item true  selectNotify SelectableItem selectNotify
Select all items of the receiver starting at from Index and including to Index void select Range int from Index int to Index if from Index to Index for int i from Index i to Index i select get Visible Item i else for int i from Index i to Index i select get Visible Item i select Notify get Visible Item to Index select last item notifying listeners  fromIndex toIndex selectRange fromIndex toIndex fromIndex toIndex fromIndex toIndex getVisibleItem fromIndex toIndex getVisibleItem selectNotify getVisibleItem toIndex
Set the width of the receiver s contents to new Width Content width is used to calculate the horizontal scrollbar void set Content Width int new Width Scroll Bar horizontal Bar boolean scroll Bar Visible if content Width new Width horizontal Bar get Horizontal Bar scroll Bar Visible horizontal Bar get Visible content Width new Width calculate Horizontal Scrollbar if scroll Bar Visible horizontal Bar get Visible resize Vertical Scrollbar the vertical scroll bar needs to be resized if the horizontal scroll bar was hidden or made visible during recalculation  newWidth setContentWidth newWidth ScrollBar horizontalBar scrollBarVisible contentWidth newWidth horizontalBar getHorizontalBar scrollBarVisible horizontalBar getVisible contentWidth newWidth calculateHorizontalScrollbar scrollBarVisible horizontalBar getVisible resizeVerticalScrollbar
Set whether the currently selected items were selected using the ctrl key param is Ctrl Selection true currently selected items were selected using the ctrl key false currently selected items were not selected using the ctrl key void set Ctrl Selection boolean is Ctrl Selection this is Ctrl Selection is Ctrl Selection  isCtrlSelection setCtrlSelection isCtrlSelection isCtrlSelection isCtrlSelection
The font is changing Reset the text height to force a recalculation during item Changed public void set Font Font font check Widget super set Font font text Height 1  itemChanged setFont checkWidget setFont textHeight
Set the horizontal drawing offset to offset Scroll the receiver s contents according to the offset change param offset value 0 widget contents is drawn left of the client area void set Horizontal Offset int offset int offset Change offset horizontal Offset if offset Change 0 scroll Horizontal offset Change horizontal Offset offset  setHorizontalOffset offsetChange horizontalOffset offsetChange scrollHorizontal offsetChange horizontalOffset
Set whether the drop insert position is before or after the item set using motif setInsertMark param after true insert position is after the insert item false insert position is before the insert item void set Insert After boolean after is Insert After after  motif_setInsertMark setInsertAfter isInsertAfter
Set the item that draws the marker indicating the insert location in a drag and drop operation param item the item that draws the insert marker void set Insert Item Selectable Item item insert Item item  setInsertItem SelectableItem insertItem
Set the height of the receiver s items to height void set Item Height int height item Height height  setItemHeight itemHeight
Set the item that most recently received the input focus to focus Item Redraw both the item that lost focus and the one that received focus param focus Item the item that most recently received the input focus param show Item true new focus item if any should be scrolled into view false don t scroll void set Last Focus Selectable Item focus Item boolean show Item Selectable Item old Focus Item last Focus Item if focus Item last Focus Item last Focus Item focus Item if old Focus Item null redraw Selection old Focus Item if last Focus Item null is Focus Control true redraw Selection last Focus Item if focus Item null show Item true show Selectable Item focus Item  focusItem focusItem showItem setLastFocus SelectableItem focusItem showItem SelectableItem oldFocusItem lastFocusItem focusItem lastFocusItem lastFocusItem focusItem oldFocusItem redrawSelection oldFocusItem lastFocusItem isFocusControl redrawSelection lastFocusItem focusItem showItem showSelectableItem focusItem
Set the item that was selected most recently to selected Item Set the input focus to that item param selected Item the item that was selected most recently param show Item true new focus item if any should be scrolled into view false don t scroll void set Last Selection Selectable Item selected Item boolean show Item if selected Item null always store the item selected last return set Last Focus selected Item show Item last Selected Item selected Item  selectedItem selectedItem showItem setLastSelection SelectableItem selectedItem showItem selectedItem setLastFocus selectedItem showItem lastSelectedItem selectedItem
Sets the redraw flag param redraw true redraw and scroll operations are performed normally false redraw and scroll operations are ignored public void set Redraw boolean redraw check Widget if redraw if draw Count 0 calculate Vertical Scrollbar calculate Horizontal Scrollbar resize redraw else draw Count  setRedraw checkWidget drawCount calculateVerticalScrollbar calculateHorizontalScrollbar drawCount
Set whether all items in the widget are disposed Used to optimize item disposal Prevents unnecessary screen updates param removing All true all items are removed false normal state no items or not all items are removed void set Removing All boolean removing All is Removing All removing All  removingAll setRemovingAll removingAll isRemovingAll removingAll
Select the items stored in selection Items A SWT Selection event is not going to be sent param selection Items Array containing the items that should be selected void set Selectable Selection Selectable Item selection Items Selectable Item item null int selection Count selection Items length Vector keep Selected if is Multi Select false selection Count 1 selection Count 1 keep Selected new Vector selection Items length for int i 0 i selection Count i if selection Items i null if selection Items i is Disposed error SWT ERROR INVALID ARGUMENT keep Selected add Element selection Items i deselect All Except keep Selected select in the same order as all the other selection and deslection methods Otherwise set Last Selection repeatedly changes the last Selected Item for repeated selections of the items causing flash for int i selection Count 1 i 0 i item selection Items i if item null select item if item null set Last Selection item true  selectionItems selectionItems setSelectableSelection SelectableItem selectionItems SelectableItem selectionCount selectionItems keepSelected isMultiSelect selectionCount selectionCount keepSelected selectionItems selectionCount selectionItems selectionItems isDisposed ERROR_INVALID_ARGUMENT keepSelected addElement selectionItems deselectAllExcept keepSelected setLastSelection lastSelectedItem selectionCount selectionItems setLastSelection
Set the vector used to store the selected items of the receiver to new Vector param new Vector the vector used to store the selected items of the receiver void set Selection Vector Vector new Vector selected Items new Vector  newVector newVector setSelectionVector newVector selectedItems newVector
Scroll the item at index to the top param index 0 based index of the first visible item in the receiver s client area param adjust Scrollbar true set the position of the vertical scroll bar to the new top index false don t adjust the vertical scroll bar void set Top Index int index boolean adjust Scrollbar int index Diff index top Index if index Diff 0 scroll Vertical index Diff set Top Index No Scroll index adjust Scrollbar  adjustScrollbar setTopIndex adjustScrollbar indexDiff topIndex indexDiff scrollVertical indexDiff setTopIndexNoScroll adjustScrollbar
Set the index of the first visible item in the receiver s client area to index param index 0 based index of the first visible item in the receiver s client area param adjust Scrollbar true set the position of the vertical scroll bar to the new top index false don t adjust the vertical scroll bar void set Top Index No Scroll int index boolean adjust Scrollbar top Index index if adjust Scrollbar true get Vertical Bar set Selection index  adjustScrollbar setTopIndexNoScroll adjustScrollbar topIndex adjustScrollbar getVerticalBar setSelection
The shift key was pressed when the mouse click on an item occurred Do a shift selection If an already selected item was clicked the selection is expanded reduced to that item param hit Item specifies the clicked item param hit Item Index specifies the index of the clicked item relative to the first item void shift Select Selectable Item hit Item int hit Item Index int from Index 1 int to Index 1 int last Selection Index 1 int selection Range Selectable Item last Selection get Last Selection if last Selection null last Selection Index get Visible Index last Selection if is Ctrl Selection true was last selection ctrl selection deselect All Except last Selection from Index last Selection Index select from last selection to Index hit Item Index else if get Selection Vector contains hit Item true clicked an item already selected deselect Range hit Item Index last Selection Index reduce selection else clicked outside existing selection range selection Range calculate Shift Selection Range hit Item Index from Index selection Range 0 to Index selection Range 1 if hit Item Index last Selection Index was click on last selected item return if from Index 1 to Index 1 are there previously selected items toggle Selection Notify hit Item do a single select else if last Selection Index from Index hit Item Index from Index does selection reverse direction last Selection Index from Index hit Item Index from Index deselect All Except Selectable Item null remove old selection select Range from Index to Index  hitItem hitItemIndex shiftSelect SelectableItem hitItem hitItemIndex fromIndex toIndex lastSelectionIndex selectionRange SelectableItem lastSelection getLastSelection lastSelection lastSelectionIndex getVisibleIndex lastSelection isCtrlSelection deselectAllExcept lastSelection fromIndex lastSelectionIndex toIndex hitItemIndex getSelectionVector hitItem deselectRange hitItemIndex lastSelectionIndex selectionRange calculateShiftSelectionRange hitItemIndex fromIndex selectionRange toIndex selectionRange hitItemIndex lastSelectionIndex fromIndex toIndex toggleSelectionNotify hitItem lastSelectionIndex fromIndex hitItemIndex fromIndex lastSelectionIndex fromIndex hitItemIndex fromIndex deselectAllExcept SelectableItem selectRange fromIndex toIndex
Make item visible by scrolling it into the receiver s client area if necessary param item the item that should be made visible to the user void show Selectable Item Selectable Item item if item get Selectable Parent this return int index get Index item show Selectable Item index  showSelectableItem SelectableItem getSelectableParent getIndex showSelectableItem
Make index visible by scrolling it into the receiver s client area if necessary param index the item index that should be made visible to the user void show Selectable Item int index scroll Show Item index scroll Show Item index second call makes sure that the item is still visible even if the first scroll caused the horizontal scroll to be displayed and the item to be hidden again  showSelectableItem scrollShowItem scrollShowItem
Show the selection If there is no selection or the selection is already visible this method does nothing If the selection is not visible the top index of the widget is changed such that the selection becomes visible public void show Selection check Widget Vector selection get Selection Vector Selectable Item selection Item if selection size 0 selection Item Selectable Item selection first Element show Selectable Item selection Item  showSelection checkWidget getSelectionVector SelectableItem selectionItem selectionItem SelectableItem firstElement showSelectableItem selectionItem
Sorts the specified range in the array param array the Selectable Item array to be sorted param start the start index to sort param end the last 1 index to sort void sort Selectable Item array int start int end int middle start end 2 if start 1 middle sort array start middle if middle 1 end sort array middle end if start 1 end return this case can only happen when this method is called by the user if get Visible Index array middle 1 get Visible Index array middle return if start 2 end Selectable Item temp array start array start array middle array middle temp return int i1 start i2 middle i3 0 Selectable Item merge new Selectable Item end start while i1 middle i2 end merge i3 get Visible Index array i1 get Visible Index array i2 array i1 array i2 if i1 middle System arraycopy array i1 merge i3 middle i1 System arraycopy merge 0 array start i2 start  SelectableItem SelectableItem getVisibleIndex getVisibleIndex SelectableItem SelectableItem SelectableItem getVisibleIndex getVisibleIndex
Toggle the selection of item param item item that should be selected deselected void toggle Selection Notify Selectable Item item if item is Selected true deselect Notify item else select Notify item  toggleSelectionNotify SelectableItem isSelected deselectNotify selectNotify

class Tree Roots extends Abstract Tree Item Create a tree item that holds one or more root items param parent Tree widget the receiver belongs to Tree Roots Tree parent super parent 0 initialize  TreeRoots AbstractTreeItem TreeRoots
Calculate the number of expanded children Recurse up in the tree to the root item void calculate Visible Item Count Vector children get Children Tree Item child int visible Item Count children size for int i 0 i children size i child Tree Item children element At i visible Item Count child get Visible Item Count set Visible Item Count visible Item Count  calculateVisibleItemCount getChildren TreeItem visibleItemCount TreeItem elementAt visibleItemCount getVisibleItemCount setVisibleItemCount visibleItemCount
Calculate the number of expanded children for the parent item of this item 
public void dispose if is Disposed return Tree parent Tree get Selectable Parent all tree items are removed so we don t need to do time consuming screen updates for each removed item parent set Removing All true super dispose parent set Removing All false  isDisposed getSelectableParent setRemovingAll setRemovingAll
Answer the x position of the item check box int get CheckboxX Position return 0  getCheckboxXPosition
Implements Selectable Item get Selection Extent Should never be called since objects of this type are never rendered Point get Selection Extent return new Point 0 0  SelectableItem getSelectionExtent getSelectionExtent
Implements Selectable Item get SelectionX Should never be called since objects of this type are never rendered int get SelectionX return 0  SelectableItem getSelectionX getSelectionX
Always answer 1 to indicate that the receiver is not visible int get Visible Index return 1  getVisibleIndex
Answer the index of the child item identified by child Index relative to the first root item int get Visible Index int child Index Enumeration children get Children elements Tree Item child int global Item Index 0 while children has More Elements true child Tree Item children next Element if child get Index child Index break global Item Index child get Visible Item Count return global Item Index  childIndex getVisibleIndex childIndex getChildren TreeItem globalItemIndex hasMoreElements TreeItem nextElement getIndex childIndex globalItemIndex getVisibleItemCount globalItemIndex
Answer the item at search Index relativ to the receiver When this method is called for the root item search Index represents the global index into all items of the tree search Index 0 returns the receiver search Index 1 returns the first visible child Note search Index must be 0 Note Visible in this context does not neccessarily mean that the item is displayed on the screen Visible here means that all the parents of the item are expanded An item is only visible on screen if it is within the widget client area Tree Item get Visible Item int search Index Tree Item child Tree Item found Item null Enumeration children get Children elements search Index skip this fake root item Search for expanded items first Count all subitems in the process while children has More Elements true found Item null child Tree Item children next Element search Index if child internal Get Expanded true search Index child get Visible Item Count count children of all expanded items if search Index 0 is searched item past child add back children of current item that s what we want to search found Item child get Visible Item search Index child get Visible Item Count return found Item  searchIndex searchIndex searchIndex searchIndex searchIndex TreeItem getVisibleItem searchIndex TreeItem TreeItem foundItem getChildren searchIndex hasMoreElements foundItem TreeItem nextElement searchIndex internalGetExpanded searchIndex getVisibleItemCount searchIndex foundItem getVisibleItem searchIndex getVisibleItemCount foundItem
Initialize the receiver void initialize internal Set Expanded true  internalSetExpanded
Select the receiver and all children Vector select All Vector selected Items Enumeration children get Children elements Abstract Tree Item tree Item while children has More Elements true tree Item Abstract Tree Item children next Element selected Items tree Item select All selected Items return selected Items  selectAll selectedItems getChildren AbstractTreeItem treeItem hasMoreElements treeItem AbstractTreeItem nextElement selectedItems treeItem selectAll selectedItems selectedItems

public static final int GNOME VFS MIME APPLICATION ARGUMENT TYPE URIS 0 public static final synchronized native int GnomeVFSMimeApplication sizeof  GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS GnomeVFSMimeApplication_sizeof
public static final synchronized native int GnomeVFSMimeApplication sizeof public static final synchronized native void g free int long mem  GnomeVFSMimeApplication_sizeof g_free
public static final synchronized native int GnomeVFSMimeApplication sizeof public static final synchronized native void g free int long mem public static final synchronized native int long g list next int long list  GnomeVFSMimeApplication_sizeof g_free g_list_next
public static final synchronized native void g free int long mem public static final synchronized native int long g list next int long list public static final synchronized native void g object unref int long object  g_free g_list_next g_object_unref
public static final synchronized native int long g list next int long list public static final synchronized native void g object unref int long object public static final synchronized native int long gnome icon lookup int long icon theme int long thumbnail factory byte file uri byte custom icon int long file info byte mime type int flags int result  g_list_next g_object_unref gnome_icon_lookup icon_theme thumbnail_factory file_uri custom_icon file_info mime_type
public static final synchronized native void g object unref int long object public static final synchronized native int long gnome icon lookup int long icon theme int long thumbnail factory byte file uri byte custom icon int long file info byte mime type int flags int result public static final synchronized native int long gnome icon theme lookup icon int long theme int long icon name int size int long icon data int base size  g_object_unref gnome_icon_lookup icon_theme thumbnail_factory file_uri custom_icon file_info mime_type gnome_icon_theme_lookup_icon icon_name icon_data base_size
public static final synchronized native int long gnome icon lookup int long icon theme int long thumbnail factory byte file uri byte custom icon int long file info byte mime type int flags int result public static final synchronized native int long gnome icon theme lookup icon int long theme int long icon name int size int long icon data int base size public static final synchronized native int long gnome icon theme new  gnome_icon_lookup icon_theme thumbnail_factory file_uri custom_icon file_info mime_type gnome_icon_theme_lookup_icon icon_name icon_data base_size gnome_icon_theme_new
public static final synchronized native int long gnome icon theme lookup icon int long theme int long icon name int size int long icon data int base size public static final synchronized native int long gnome icon theme new public static final synchronized native int long gnome vfs get registered mime types  gnome_icon_theme_lookup_icon icon_name icon_data base_size gnome_icon_theme_new gnome_vfs_get_registered_mime_types
public static final synchronized native int long gnome icon theme new public static final synchronized native int long gnome vfs get registered mime types public static final synchronized native boolean gnome vfs init  gnome_icon_theme_new gnome_vfs_get_registered_mime_types gnome_vfs_init
public static final synchronized native int long gnome vfs get registered mime types public static final synchronized native boolean gnome vfs init public static final synchronized native void gnome vfs mime application free int long application  gnome_vfs_get_registered_mime_types gnome_vfs_init gnome_vfs_mime_application_free
public static final synchronized native boolean gnome vfs init public static final synchronized native void gnome vfs mime application free int long application public static final synchronized native void gnome vfs mime extensions list free int long list  gnome_vfs_init gnome_vfs_mime_application_free gnome_vfs_mime_extensions_list_free
public static final synchronized native void gnome vfs mime application free int long application public static final synchronized native void gnome vfs mime extensions list free int long list public static final synchronized native int long gnome vfs mime get default application byte mime Type  gnome_vfs_mime_application_free gnome_vfs_mime_extensions_list_free gnome_vfs_mime_get_default_application mimeType
public static final synchronized native void gnome vfs mime extensions list free int long list public static final synchronized native int long gnome vfs mime get default application byte mime Type public static final synchronized native int long gnome vfs mime get extensions list int long mime type  gnome_vfs_mime_extensions_list_free gnome_vfs_mime_get_default_application mimeType gnome_vfs_mime_get_extensions_list mime_type
public static final synchronized native int long gnome vfs mime get default application byte mime Type public static final synchronized native int long gnome vfs mime get extensions list int long mime type public static final synchronized native void gnome vfs mime registered mime type list free int long list  gnome_vfs_mime_get_default_application mimeType gnome_vfs_mime_get_extensions_list mime_type gnome_vfs_mime_registered_mime_type_list_free
public static final synchronized native int long gnome vfs mime get extensions list int long mime type public static final synchronized native void gnome vfs mime registered mime type list free int long list public static final synchronized native void memmove GnomeVFS Mime Application dest int long src int long count  gnome_vfs_mime_get_extensions_list mime_type gnome_vfs_mime_registered_mime_type_list_free GnomeVFSMimeApplication

private Accessible Factory int long widget Type super If Default Parent Type is 0 then OS accessibility is not active if Default Parent Type 0 return widget Type Name ATK g type name widget Type int widget Type Name Length OS strlen widget Type Name 1 byte buffer new byte widget Type Name Length OS memmove buffer widget Type Name widget Type Name Length byte factory Name new byte FACTORY TYPENAME length widget Type Name Length System arraycopy FACTORY TYPENAME 0 factory Name 0 FACTORY TYPENAME length System arraycopy buffer 0 factory Name FACTORY TYPENAME length widget Type Name Length if ATK g type from name factory Name 0 register the factory int long registry ATK atk get default registry int long previous Factory ATK atk registry get factory registry widget Type object Parent Type ATK atk object factory get accessible type previous Factory if object Parent Type 0 object Parent Type Default Parent Type int long factory Parent Type ATK g type from name FACTORY PARENTTYPENAME gTypeInfo base init factory new Callback this gTypeInfo base init factory 1 G Type Info type Info new G Type Info type Info base init gTypeInfo base init factory get Address type Info class size short ATK AtkObjectFactoryClass sizeof type Info instance size short ATK AtkObjectFactory sizeof handle OS g malloc G Type Info sizeof ATK memmove handle type Info G Type Info sizeof int long swt Factory ATK g type register static factory Parent Type factory Name handle 0 ATK atk registry set factory type registry widget Type swt Factory  AccessibleFactory widgetType DefaultParentType DefaultParentType widgetTypeName g_type_name widgetType widgetTypeNameLength widgetTypeName widgetTypeNameLength widgetTypeName widgetTypeNameLength factoryName FACTORY_TYPENAME widgetTypeNameLength FACTORY_TYPENAME factoryName FACTORY_TYPENAME factoryName FACTORY_TYPENAME widgetTypeNameLength g_type_from_name factoryName atk_get_default_registry previousFactory atk_registry_get_factory widgetType objectParentType atk_object_factory_get_accessible_type previousFactory objectParentType objectParentType DefaultParentType factoryParentType g_type_from_name FACTORY_PARENTTYPENAME gTypeInfo_base_init_factory gTypeInfo_base_init_factory GTypeInfo typeInfo GTypeInfo typeInfo base_init gTypeInfo_base_init_factory getAddress typeInfo class_size AtkObjectFactoryClass_sizeof typeInfo instance_size AtkObjectFactory_sizeof g_malloc GTypeInfo typeInfo GTypeInfo swtFactory g_type_register_static factoryParentType factoryName atk_registry_set_factory_type widgetType swtFactory
void add Accessible Accessible accessible int long control Handle accessible get Control Handle accessibles put new LONG control Handle accessible  addAccessible controlHandle getControlHandle controlHandle
int long atkObjectFactory create accessible int long widget Accessible accessible Accessible accessibles get new LONG widget if accessible null we don t care about this control so create it with the parent s type so that its accessibility callbacks will not pass though here int long result ATK g object new object Parent Type 0 ATK atk object initialize result widget return result int type Name Length OS strlen widget Type Name byte buffer new byte type Name Length OS memmove buffer widget Type Name type Name Length int long type get Type buffer accessible object Parent Type ACC CHILDID SELF Accessible Object object new Accessible Object type widget accessible object Parent Type false accessible accessible Object object return object handle  atkObjectFactory_create_accessible g_object_new objectParentType atk_object_initialize typeNameLength widgetTypeName typeNameLength widgetTypeName typeNameLength getType objectParentType CHILDID_SELF AccessibleObject AccessibleObject objectParentType accessibleObject
static int long get Child Type Accessible accessible int child Index return get Type CHILD TYPENAME accessible Default Parent Type child Index  getChildType childIndex getType CHILD_TYPENAME DefaultParentType childIndex
static int long get Default Parent Type return Default Parent Type  getDefaultParentType DefaultParentType
static int long get Type byte widget Type Name Accessible accessible int long parent Type int child Id Accessible Control Event event new Accessible Control Event accessible event childID child Id Accessible Control Listener listeners accessible get Control Listeners for int i 0 i listeners length i listeners i get Role event boolean action false hypertext false selection false text false if event detail 0 a role was specified for int i 0 i action Roles length i if event detail action Roles i action true break for int i 0 i hypertext Roles length i if event detail hypertext Roles i hypertext true break for int i 0 i selection Roles length i if event detail selection Roles i selection true break for int i 0 i text Roles length i if event detail text Roles i text true break else action hypertext selection text true String swt Type Name new String SWT TYPE PREFIX swt Type Name new String widget Type Name if action swt Type Name Action if hypertext swt Type Name Hypertext if selection swt Type Name Selection if text swt Type Name Text int long type 0 LONG type Int LONG Types get swt Type Name if type Int null type type Int value else define the type int long query Ptr OS g malloc G Type Query sizeof ATK g type query parent Type query Ptr G Type Query query new G Type Query ATK memmove query query Ptr G Type Query sizeof OS g free query Ptr G Type Info type Info new G Type Info type Info base init GTypeInfo base init type get Address type Info class size short query class size type Info instance size short query instance size Object Iface Definition OS g malloc G Type Info sizeof ATK memmove Object Iface Definition type Info G Type Info sizeof byte name Bytes new byte swt Type Name length 1 System arraycopy swt Type Name get Bytes 0 name Bytes 0 swt Type Name length type ATK g type register static parent Type name Bytes Object Iface Definition 0 ATK g type add interface static type Accessible Object ATK COMPONENT TYPE Component Iface Definition if action ATK g type add interface static type Accessible Object ATK ACTION TYPE Action Iface Definition if hypertext ATK g type add interface static type Accessible Object ATK HYPERTEXT TYPE Hypertext Iface Definition if selection ATK g type add interface static type Accessible Object ATK SELECTION TYPE Selection Iface Definition if text ATK g type add interface static type Accessible Object ATK TEXT TYPE Text Iface Definition Types put swt Type Name new LONG type return type  getType widgetTypeName parentType childId AccessibleControlEvent AccessibleControlEvent childId AccessibleControlListener getControlListeners getRole actionRoles actionRoles hypertextRoles hypertextRoles selectionRoles selectionRoles textRoles textRoles swtTypeName SWT_TYPE_PREFIX swtTypeName widgetTypeName swtTypeName swtTypeName swtTypeName swtTypeName typeInt swtTypeName typeInt typeInt queryPtr g_malloc GTypeQuery g_type_query parentType queryPtr GTypeQuery GTypeQuery queryPtr GTypeQuery g_free queryPtr GTypeInfo typeInfo GTypeInfo typeInfo base_init GTypeInfo_base_init_type getAddress typeInfo class_size class_size typeInfo instance_size instance_size ObjectIfaceDefinition g_malloc GTypeInfo ObjectIfaceDefinition typeInfo GTypeInfo nameBytes swtTypeName swtTypeName getBytes nameBytes swtTypeName g_type_register_static parentType nameBytes ObjectIfaceDefinition g_type_add_interface_static AccessibleObject ATK_COMPONENT_TYPE ComponentIfaceDefinition g_type_add_interface_static AccessibleObject ATK_ACTION_TYPE ActionIfaceDefinition g_type_add_interface_static AccessibleObject ATK_HYPERTEXT_TYPE HypertextIfaceDefinition g_type_add_interface_static AccessibleObject ATK_SELECTION_TYPE SelectionIfaceDefinition g_type_add_interface_static AccessibleObject ATK_TEXT_TYPE TextIfaceDefinition swtTypeName
int long gTypeInfo base init factory int long klass int long atk Object Factory Class ATK ATK OBJECT FACTORY CLASS klass Atk Object Factory Class object Factory Class Struct new Atk Object Factory Class ATK memmove object Factory Class Struct atk Object Factory Class atkObjectFactoryCB create accessible new Callback this atkObjectFactory create accessible 1 object Factory Class Struct create accessible atkObjectFactoryCB create accessible get Address ATK memmove atk Object Factory Class object Factory Class Struct return 0  gTypeInfo_base_init_factory atkObjectFactoryClass ATK_OBJECT_FACTORY_CLASS AtkObjectFactoryClass objectFactoryClassStruct AtkObjectFactoryClass objectFactoryClassStruct atkObjectFactoryClass atkObjectFactoryCB_create_accessible atkObjectFactory_create_accessible objectFactoryClassStruct create_accessible atkObjectFactoryCB_create_accessible getAddress atkObjectFactoryClass objectFactoryClassStruct
static int long gTypeInfo base init type int long klass Atk Object Class object Class new Atk Object Class ATK memmove object Class klass object Class get name AtkObjectCB get name get Address object Class get description AtkObjectCB get description get Address object Class get n children AtkObjectCB get n children get Address object Class get role AtkObjectCB get role get Address object Class get parent AtkObjectCB get parent get Address object Class ref state set AtkObjectCB ref state set get Address object Class get index in parent AtkObjectCB get index in parent get Address object Class ref child AtkObjectCB ref child get Address int long g Object Class ATK G OBJECT CLASS klass G Object Class object Class Struct new G Object Class ATK memmove object Class Struct g Object Class object Class Struct finalize GObjectClass finalize get Address ATK memmove g Object Class object Class Struct ATK memmove klass object Class return 0  gTypeInfo_base_init_type AtkObjectClass objectClass AtkObjectClass objectClass objectClass get_name AtkObjectCB_get_name getAddress objectClass get_description AtkObjectCB_get_description getAddress objectClass get_n_children AtkObjectCB_get_n_children getAddress objectClass get_role AtkObjectCB_get_role getAddress objectClass get_parent AtkObjectCB_get_parent getAddress objectClass ref_state_set AtkObjectCB_ref_state_set getAddress objectClass get_index_in_parent AtkObjectCB_get_index_in_parent getAddress objectClass ref_child AtkObjectCB_ref_child getAddress gObjectClass G_OBJECT_CLASS GObjectClass objectClassStruct GObjectClass objectClassStruct gObjectClass objectClassStruct GObjectClass_finalize getAddress gObjectClass objectClassStruct objectClass
static int long init Action IfaceCB int long iface Atk Action Iface action Iface new Atk Action Iface ATK memmove action Iface iface action Iface get keybinding AtkActionCB get keybinding get Address action Iface get name AtkActionCB get name get Address ATK memmove iface action Iface return 0  initActionIfaceCB AtkActionIface actionIface AtkActionIface actionIface actionIface get_keybinding AtkActionCB_get_keybinding getAddress actionIface get_name AtkActionCB_get_name getAddress actionIface
static int long init Component IfaceCB int long iface Atk Component Iface component Iface new Atk Component Iface ATK memmove component Iface iface component Iface get extents AtkComponentCB get extents get Address component Iface get position AtkComponentCB get position get Address component Iface get size AtkComponentCB get size get Address component Iface ref accessible at point AtkComponentCB ref accessible at point get Address ATK memmove iface component Iface return 0  initComponentIfaceCB AtkComponentIface componentIface AtkComponentIface componentIface componentIface get_extents AtkComponentCB_get_extents getAddress componentIface get_position AtkComponentCB_get_position getAddress componentIface get_size AtkComponentCB_get_size getAddress componentIface ref_accessible_at_point AtkComponentCB_ref_accessible_at_point getAddress componentIface
static int long init Hypertext IfaceCB int long iface Atk Hypertext Iface hypertext Iface new Atk Hypertext Iface ATK memmove hypertext Iface iface hypertext Iface get link AtkHypertextCB get link get Address hypertext Iface get link index AtkHypertextCB get link index get Address hypertext Iface get n links AtkHypertextCB get n links get Address ATK memmove iface hypertext Iface return 0  initHypertextIfaceCB AtkHypertextIface hypertextIface AtkHypertextIface hypertextIface hypertextIface get_link AtkHypertextCB_get_link getAddress hypertextIface get_link_index AtkHypertextCB_get_link_index getAddress hypertextIface get_n_links AtkHypertextCB_get_n_links getAddress hypertextIface
static int long init Selection IfaceCB int long iface Atk Selection Iface selection Iface new Atk Selection Iface ATK memmove selection Iface iface selection Iface is child selected AtkSelectionCB is child selected get Address selection Iface ref selection AtkSelectionCB ref selection get Address ATK memmove iface selection Iface return 0  initSelectionIfaceCB AtkSelectionIface selectionIface AtkSelectionIface selectionIface selectionIface is_child_selected AtkSelectionCB_is_child_selected getAddress selectionIface ref_selection AtkSelectionCB_ref_selection getAddress selectionIface
static int long init Text IfaceCB int long iface Atk Text Iface text Interface new Atk Text Iface ATK memmove text Interface iface text Interface get caret offset AtkTextCB get caret offset get Address text Interface get character at offset AtkTextCB get character at offset get Address text Interface get character count AtkTextCB get character count get Address text Interface get n selections AtkTextCB get n selections get Address text Interface get selection AtkTextCB get selection get Address text Interface get text AtkTextCB get text get Address text Interface get text after offset AtkTextCB get text after offset get Address text Interface get text at offset AtkTextCB get text at offset get Address text Interface get text before offset AtkTextCB get text before offset get Address ATK memmove iface text Interface return 0  initTextIfaceCB AtkTextIface textInterface AtkTextIface textInterface textInterface get_caret_offset AtkTextCB_get_caret_offset getAddress textInterface get_character_at_offset AtkTextCB_get_character_at_offset getAddress textInterface get_character_count AtkTextCB_get_character_count getAddress textInterface get_n_selections AtkTextCB_get_n_selections getAddress textInterface get_selection AtkTextCB_get_selection getAddress textInterface get_text AtkTextCB_get_text getAddress textInterface get_text_after_offset AtkTextCB_get_text_after_offset getAddress textInterface get_text_at_offset AtkTextCB_get_text_at_offset getAddress textInterface get_text_before_offset AtkTextCB_get_text_before_offset getAddress textInterface
static void register Accessible Accessible accessible int long control Handle accessible get Control Handle int long widget Type ATK G TYPE FROM INSTANCE control Handle Accessible Factory factory Accessible Factory Factories get new LONG widget Type if factory null factory new Accessible Factory widget Type Factories put new LONG widget Type factory factory add Accessible accessible  registerAccessible controlHandle getControlHandle widgetType G_TYPE_FROM_INSTANCE controlHandle AccessibleFactory AccessibleFactory widgetType AccessibleFactory widgetType widgetType addAccessible
void remove Accessible Accessible accessible accessibles remove new LONG accessible get Control Handle  removeAccessible getControlHandle
static void unregister Accessible Accessible accessible int long control Handle accessible get Control Handle int long widget Type ATK G TYPE FROM INSTANCE control Handle Accessible Factory factory Accessible Factory Factories get new LONG widget Type if factory null factory remove Accessible accessible  unregisterAccessible controlHandle getControlHandle widgetType G_TYPE_FROM_INSTANCE controlHandle AccessibleFactory AccessibleFactory widgetType removeAccessible

Accessible Object int long type int long widget Accessible accessible int long parent Type boolean is Lightweight super handle ATK g object new type 0 this parent Type parent Type ATK atk object initialize handle widget this accessible accessible this is Lightweight is Lightweight Accessible Objects put new LONG handle this if DEBUG System out println new Accessible Object handle  AccessibleObject parentType isLightweight g_object_new parentType parentType atk_object_initialize isLightweight isLightweight AccessibleObjects AccessibleObject
void add Child Accessible Object child children put new LONG child handle child child set Parent this  addChild AccessibleObject setParent
static int long atkAction get keybinding int long atk Object int long index if DEBUG System out println atkAction get keybinding Accessible Object object get Accessible Object atk Object if object null return 0 int long parent Result 0 if ATK g type is a object parent Type ATK ACTION TYPE int long super Type ATK g type interface peek parent ATK ATK ACTION GET IFACE object handle Atk Action Iface action Iface new Atk Action Iface ATK memmove action Iface super Type if action Iface get keybinding 0 parent Result ATK call action Iface get keybinding object handle index Accessible Listener listeners object get Accessible Listeners if listeners length 0 return parent Result Accessible Event event new Accessible Event object event childID object id if parent Result 0 int length OS strlen parent Result byte buffer new byte length OS memmove buffer parent Result length event result new String Converter mbcs To Wcs null buffer for int i 0 i listeners length i listeners i get Keyboard Shortcut event if event result null return parent Result if keybinding Ptr 1 OS g free keybinding Ptr byte name Converter wcs To Mbcs null event result true keybinding Ptr OS g malloc name length OS memmove keybinding Ptr name name length return keybinding Ptr  atkAction_get_keybinding atkObject atkAction_get_keybinding AccessibleObject getAccessibleObject atkObject parentResult g_type_is_a parentType ATK_ACTION_TYPE superType g_type_interface_peek_parent ATK_ACTION_GET_IFACE AtkActionIface actionIface AtkActionIface actionIface superType actionIface get_keybinding parentResult actionIface get_keybinding AccessibleListener getAccessibleListeners parentResult AccessibleEvent AccessibleEvent parentResult parentResult parentResult mbcsToWcs getKeyboardShortcut parentResult keybindingPtr g_free keybindingPtr wcsToMbcs keybindingPtr g_malloc keybindingPtr keybindingPtr
static int long atkAction get name int long atk Object int long index if DEBUG System out println atkAction get name Accessible Object object get Accessible Object atk Object if object null return 0 int long parent Result 0 if ATK g type is a object parent Type ATK ACTION TYPE int long super Type ATK g type interface peek parent ATK ATK ACTION GET IFACE object handle Atk Action Iface action Iface new Atk Action Iface ATK memmove action Iface super Type if action Iface get name 0 parent Result ATK call action Iface get name object handle index Accessible Control Listener listeners object get Control Listeners if listeners length 0 return parent Result Accessible Control Event event new Accessible Control Event object event childID object id if parent Result 0 int length OS strlen parent Result byte buffer new byte length OS memmove buffer parent Result length event result new String Converter mbcs To Wcs null buffer for int i 0 i listeners length i listeners i get Default Action event if event result null return parent Result if action Name Ptr 1 OS g free action Name Ptr byte name Converter wcs To Mbcs null event result true action Name Ptr OS g malloc name length OS memmove action Name Ptr name name length return action Name Ptr  atkAction_get_name atkObject atkAction_get_name AccessibleObject getAccessibleObject atkObject parentResult g_type_is_a parentType ATK_ACTION_TYPE superType g_type_interface_peek_parent ATK_ACTION_GET_IFACE AtkActionIface actionIface AtkActionIface actionIface superType actionIface get_name parentResult actionIface get_name AccessibleControlListener getControlListeners parentResult AccessibleControlEvent AccessibleControlEvent parentResult parentResult parentResult mbcsToWcs getDefaultAction parentResult actionNamePtr g_free actionNamePtr wcsToMbcs actionNamePtr g_malloc actionNamePtr actionNamePtr
static int long atkComponent get extents int long atk Object int long x int long y int long width int long height int long coord type if DEBUG System out println atkComponent get extents Accessible Object object get Accessible Object atk Object if object null return 0 OS memmove x new int 0 4 OS memmove y new int 0 4 OS memmove width new int 0 4 OS memmove height new int 0 4 if ATK g type is a object parent Type ATK COMPONENT TYPE int long super Type ATK g type interface peek parent ATK ATK COMPONENT GET IFACE object handle Atk Component Iface component Iface new Atk Component Iface ATK memmove component Iface super Type if component Iface get extents 0 ATK call component Iface get extents object handle x y width height coord type Accessible Control Listener listeners object get Control Listeners if listeners length 0 return 0 int parentX new int 1 parentY new int 1 int parent Width new int 1 parent Height new int 1 OS memmove parentX x 4 OS memmove parentY y 4 OS memmove parent Width width 4 OS memmove parent Height height 4 Accessible Control Event event new Accessible Control Event object event childID object id event x parentX 0 event y parentY 0 event width parent Width 0 event height parent Height 0 if coord type ATK ATK XY WINDOW translate control display for filling in event to be dispatched int long gtk Accessible Handle ATK GTK ACCESSIBLE object handle Gtk Accessible gtk Accessible new Gtk Accessible ATK memmove gtk Accessible gtk Accessible Handle int long top Level ATK gtk widget get toplevel gtk Accessible widget int long window OS GTK WIDGET WINDOW top Level int top WindowX new int 1 top WindowY new int 1 OS gdk window get origin window top WindowX top WindowY event x top WindowX 0 event y top WindowY 0 for int i 0 i listeners length i listeners i get Location event if coord type ATK ATK XY WINDOW translate display control for answering to the OS int long gtk Accessible Handle ATK GTK ACCESSIBLE object handle Gtk Accessible gtk Accessible new Gtk Accessible ATK memmove gtk Accessible gtk Accessible Handle int long top Level ATK gtk widget get toplevel gtk Accessible widget int long window OS GTK WIDGET WINDOW top Level int top WindowX new int 1 top WindowY new int 1 OS gdk window get origin window top WindowX top WindowY event x top WindowX 0 event y top WindowY 0 OS memmove x new int event x 4 OS memmove y new int event y 4 OS memmove width new int event width 4 OS memmove height new int event height 4 return 0  atkComponent_get_extents atkObject coord_type atkComponent_get_extents AccessibleObject getAccessibleObject atkObject g_type_is_a parentType ATK_COMPONENT_TYPE superType g_type_interface_peek_parent ATK_COMPONENT_GET_IFACE AtkComponentIface componentIface AtkComponentIface componentIface superType componentIface get_extents componentIface get_extents coord_type AccessibleControlListener getControlListeners parentWidth parentHeight parentWidth parentHeight AccessibleControlEvent AccessibleControlEvent parentWidth parentHeight coord_type ATK_XY_WINDOW gtkAccessibleHandle GTK_ACCESSIBLE GtkAccessible gtkAccessible GtkAccessible gtkAccessible gtkAccessibleHandle topLevel gtk_widget_get_toplevel gtkAccessible GTK_WIDGET_WINDOW topLevel topWindowX topWindowY gdk_window_get_origin topWindowX topWindowY topWindowX topWindowY getLocation coord_type ATK_XY_WINDOW gtkAccessibleHandle GTK_ACCESSIBLE GtkAccessible gtkAccessible GtkAccessible gtkAccessible gtkAccessibleHandle topLevel gtk_widget_get_toplevel gtkAccessible GTK_WIDGET_WINDOW topLevel topWindowX topWindowY gdk_window_get_origin topWindowX topWindowY topWindowX topWindowY
static int long atkComponent get position int long atk Object int long x int long y int long coord type if DEBUG System out println atkComponent get position object atk Object x x y y coord coord type Accessible Object object get Accessible Object atk Object if object null return 0 OS memmove x new int 0 4 OS memmove y new int 0 4 if ATK g type is a object parent Type ATK COMPONENT TYPE int long super Type ATK g type interface peek parent ATK ATK COMPONENT GET IFACE object handle Atk Component Iface component Iface new Atk Component Iface ATK memmove component Iface super Type if component Iface get extents 0 ATK call component Iface get position object handle x y coord type Accessible Control Listener listeners object get Control Listeners if listeners length 0 return 0 int parentX new int 1 parentY new int 1 OS memmove parentX x 4 OS memmove parentY y 4 Accessible Control Event event new Accessible Control Event object event childID object id event x parentX 0 event y parentY 0 if coord type ATK ATK XY WINDOW translate control display for filling in event to be dispatched int long gtk Accessible Handle ATK GTK ACCESSIBLE object handle Gtk Accessible gtk Accessible new Gtk Accessible ATK memmove gtk Accessible gtk Accessible Handle int long top Level ATK gtk widget get toplevel gtk Accessible widget int long window OS GTK WIDGET WINDOW top Level int top WindowX new int 1 top WindowY new int 1 OS gdk window get origin window top WindowX top WindowY event x top WindowX 0 event y top WindowY 0 for int i 0 i listeners length i listeners i get Location event if coord type ATK ATK XY WINDOW translate display control for answering to the OS int long gtk Accessible Handle ATK GTK ACCESSIBLE object handle Gtk Accessible gtk Accessible new Gtk Accessible ATK memmove gtk Accessible gtk Accessible Handle int long top Level ATK gtk widget get toplevel gtk Accessible widget int long window OS GTK WIDGET WINDOW top Level int top WindowX new int 1 top WindowY new int 1 OS gdk window get origin window top WindowX top WindowY event x top WindowX 0 event y top WindowY 0 OS memmove x new int event x 4 OS memmove y new int event y 4 return 0  atkComponent_get_position atkObject coord_type atkComponent_get_position atkObject coord_type AccessibleObject getAccessibleObject atkObject g_type_is_a parentType ATK_COMPONENT_TYPE superType g_type_interface_peek_parent ATK_COMPONENT_GET_IFACE AtkComponentIface componentIface AtkComponentIface componentIface superType componentIface get_extents componentIface get_position coord_type AccessibleControlListener getControlListeners AccessibleControlEvent AccessibleControlEvent coord_type ATK_XY_WINDOW gtkAccessibleHandle GTK_ACCESSIBLE GtkAccessible gtkAccessible GtkAccessible gtkAccessible gtkAccessibleHandle topLevel gtk_widget_get_toplevel gtkAccessible GTK_WIDGET_WINDOW topLevel topWindowX topWindowY gdk_window_get_origin topWindowX topWindowY topWindowX topWindowY getLocation coord_type ATK_XY_WINDOW gtkAccessibleHandle GTK_ACCESSIBLE GtkAccessible gtkAccessible GtkAccessible gtkAccessible gtkAccessibleHandle topLevel gtk_widget_get_toplevel gtkAccessible GTK_WIDGET_WINDOW topLevel topWindowX topWindowY gdk_window_get_origin topWindowX topWindowY topWindowX topWindowY
static int long atkComponent get size int long atk Object int long width int long height int long coord type if DEBUG System out println atkComponent get size Accessible Object object get Accessible Object atk Object if object null return 0 OS memmove width new int 0 4 OS memmove height new int 0 4 if ATK g type is a object parent Type ATK COMPONENT TYPE int long super Type ATK g type interface peek parent ATK ATK COMPONENT GET IFACE object handle Atk Component Iface component Iface new Atk Component Iface ATK memmove component Iface super Type if component Iface get extents 0 ATK call component Iface get size object handle width height coord type Accessible Control Listener listeners object get Control Listeners if listeners length 0 return 0 int parent Width new int 1 parent Height new int 1 OS memmove parent Width width 4 OS memmove parent Height height 4 Accessible Control Event event new Accessible Control Event object event childID object id event width parent Width 0 event height parent Height 0 for int i 0 i listeners length i listeners i get Location event OS memmove width new int event width 4 OS memmove height new int event height 4 return 0  atkComponent_get_size atkObject coord_type atkComponent_get_size AccessibleObject getAccessibleObject atkObject g_type_is_a parentType ATK_COMPONENT_TYPE superType g_type_interface_peek_parent ATK_COMPONENT_GET_IFACE AtkComponentIface componentIface AtkComponentIface componentIface superType componentIface get_extents componentIface get_size coord_type AccessibleControlListener getControlListeners parentWidth parentHeight parentWidth parentHeight AccessibleControlEvent AccessibleControlEvent parentWidth parentHeight getLocation
static int long atkComponent ref accessible at point int long atk Object int long x int long y int long coord type if DEBUG System out println atkComponent ref accessible at point Accessible Object object get Accessible Object atk Object if object null return 0 int long parent Result 0 if ATK g type is a object parent Type ATK COMPONENT TYPE int long super Type ATK g type interface peek parent ATK ATK COMPONENT GET IFACE object handle Atk Component Iface component Iface new Atk Component Iface ATK memmove component Iface super Type if component Iface ref accessible at point 0 parent Result ATK call component Iface ref accessible at point object handle x y coord type Accessible Control Listener listeners object get Control Listeners if listeners length 0 return parent Result Accessible Control Event event new Accessible Control Event object event childID object id event x int 64 x event y int 64 y if coord type ATK ATK XY WINDOW translate control display for filling in the event to be dispatched int long gtk Accessible Handle ATK GTK ACCESSIBLE object handle Gtk Accessible gtk Accessible new Gtk Accessible ATK memmove gtk Accessible gtk Accessible Handle int long top Level ATK gtk widget get toplevel gtk Accessible widget int long window OS GTK WIDGET WINDOW top Level int top WindowX new int 1 top WindowY new int 1 OS gdk window get origin window top WindowX top WindowY event x top WindowX 0 event y top WindowY 0 for int i 0 i listeners length i listeners i get Child At Point event if event childID object id event childID ACC CHILDID SELF Accessible Object acc Obj object get Child ByID event childID if acc Obj null if parent Result 0 OS g object unref parent Result OS g object ref acc Obj handle return acc Obj handle return parent Result  atkComponent_ref_accessible_at_point atkObject coord_type atkComponent_ref_accessible_at_point AccessibleObject getAccessibleObject atkObject parentResult g_type_is_a parentType ATK_COMPONENT_TYPE superType g_type_interface_peek_parent ATK_COMPONENT_GET_IFACE AtkComponentIface componentIface AtkComponentIface componentIface superType componentIface ref_accessible_at_point parentResult componentIface ref_accessible_at_point coord_type AccessibleControlListener getControlListeners parentResult AccessibleControlEvent AccessibleControlEvent coord_type ATK_XY_WINDOW gtkAccessibleHandle GTK_ACCESSIBLE GtkAccessible gtkAccessible GtkAccessible gtkAccessible gtkAccessibleHandle topLevel gtk_widget_get_toplevel gtkAccessible GTK_WIDGET_WINDOW topLevel topWindowX topWindowY gdk_window_get_origin topWindowX topWindowY topWindowX topWindowY getChildAtPoint CHILDID_SELF AccessibleObject accObj getChildByID accObj parentResult g_object_unref parentResult g_object_ref accObj accObj parentResult
static int long atkHypertext get link int long atk Object int long link index if DEBUG System out println atkHypertext get link return 0  atkHypertext_get_link atkObject link_index atkHypertext_get_link
static int long atkHypertext get n links int long atk Object if DEBUG System out println atkHypertext get n links return 1  atkHypertext_get_n_links atkObject atkHypertext_get_n_links
static int long atkHypertext get link index int long atk Object int long char index if DEBUG System out println atkHypertext get link index return 0  atkHypertext_get_link_index atkObject char_index atkHypertext_get_link_index
static int long atkObject get description int long atk Object if DEBUG System out println atkObject get description Accessible Object object get Accessible Object atk Object if object null return 0 int long parent Result 0 int long super Type ATK g type class peek object parent Type Atk Object Class object Class new Atk Object Class ATK memmove object Class super Type if object Class get description 0 parent Result ATK call object Class get description object handle Accessible Listener listeners object get Accessible Listeners if listeners length 0 return parent Result Accessible Event event new Accessible Event object event childID object id if parent Result 0 int length OS strlen parent Result byte buffer new byte length OS memmove buffer parent Result length event result new String Converter mbcs To Wcs null buffer for int i 0 i listeners length i listeners i get Description event if event result null return parent Result if description Ptr 1 OS g free description Ptr byte name Converter wcs To Mbcs null event result true description Ptr OS g malloc name length OS memmove description Ptr name name length return description Ptr  atkObject_get_description atkObject atkObject_get_description AccessibleObject getAccessibleObject atkObject parentResult superType g_type_class_peek parentType AtkObjectClass objectClass AtkObjectClass objectClass superType objectClass get_description parentResult objectClass get_description AccessibleListener getAccessibleListeners parentResult AccessibleEvent AccessibleEvent parentResult parentResult parentResult mbcsToWcs getDescription parentResult descriptionPtr g_free descriptionPtr wcsToMbcs descriptionPtr g_malloc descriptionPtr descriptionPtr
static int long atkObject get name int long atk Object if DEBUG System out println atkObject get name atk Object Accessible Object object get Accessible Object atk Object if object null return 0 int long parent Result 0 int long super Type ATK g type class peek object parent Type Atk Object Class object Class new Atk Object Class ATK memmove object Class super Type if object Class get name 0 parent Result ATK call object Class get name object handle Accessible Listener listeners object get Accessible Listeners if listeners length 0 return parent Result Accessible Event event new Accessible Event object event childID object id if parent Result 0 int length OS strlen parent Result byte buffer new byte length OS memmove buffer parent Result length event result new String Converter mbcs To Wcs null buffer for int i 0 i listeners length i listeners i get Name event if event result null return parent Result if name Ptr 1 OS g free name Ptr byte name Converter wcs To Mbcs null event result true name Ptr OS g malloc name length OS memmove name Ptr name name length return name Ptr  atkObject_get_name atkObject atkObject_get_name atkObject AccessibleObject getAccessibleObject atkObject parentResult superType g_type_class_peek parentType AtkObjectClass objectClass AtkObjectClass objectClass superType objectClass get_name parentResult objectClass get_name AccessibleListener getAccessibleListeners parentResult AccessibleEvent AccessibleEvent parentResult parentResult parentResult mbcsToWcs getName parentResult namePtr g_free namePtr wcsToMbcs namePtr g_malloc namePtr namePtr
static int long atkObject get n children int long atk Object if DEBUG System out println atkObject get n children atk Object Accessible Object object get Accessible Object atk Object if object null return 0 int long parent Result 0 int long super Type ATK g type class peek object parent Type Atk Object Class object Class new Atk Object Class ATK memmove object Class super Type if object Class get n children 0 parent Result ATK call object Class get n children object handle Accessible Control Listener listeners object get Control Listeners if listeners length 0 return parent Result Accessible Control Event event new Accessible Control Event object event childID object id event detail int 64 parent Result for int i 0 i listeners length i listeners i get Child Count event return event detail  atkObject_get_n_children atkObject atkObject_get_n_children atkObject AccessibleObject getAccessibleObject atkObject parentResult superType g_type_class_peek parentType AtkObjectClass objectClass AtkObjectClass objectClass superType objectClass get_n_children parentResult objectClass get_n_children AccessibleControlListener getControlListeners parentResult AccessibleControlEvent AccessibleControlEvent parentResult getChildCount
static int long atkObject get index in parent int long atk Object if DEBUG System out println atkObjectCB get index in parent Accessible Object object get Accessible Object atk Object if object null return 0 if object index 1 return object index int long super Type ATK g type class peek object parent Type Atk Object Class object Class new Atk Object Class ATK memmove object Class super Type if object Class get index in parent 0 return 0 return ATK call object Class get index in parent object handle  atkObject_get_index_in_parent atkObject atkObjectCB_get_index_in_parent AccessibleObject getAccessibleObject atkObject superType g_type_class_peek parentType AtkObjectClass objectClass AtkObjectClass objectClass superType objectClass get_index_in_parent objectClass get_index_in_parent
static int long atkObject get parent int long atk Object if DEBUG System out println atkObject get parent atk Object Accessible Object object get Accessible Object atk Object if object null return 0 if object parent null return object parent handle int long super Type ATK g type class peek object parent Type Atk Object Class object Class new Atk Object Class ATK memmove object Class super Type if object Class get parent 0 return 0 return ATK call object Class get parent object handle  atkObject_get_parent atkObject atkObject_get_parent atkObject AccessibleObject getAccessibleObject atkObject superType g_type_class_peek parentType AtkObjectClass objectClass AtkObjectClass objectClass superType objectClass get_parent objectClass get_parent
static int long atkObject get role int long atk Object if DEBUG System out println atkObject get role atk Object Accessible Object object get Accessible Object atk Object if object null return 0 if object get Accessible Listeners length 0 Accessible Control Listener listeners object get Control Listeners Accessible Control Event event new Accessible Control Event object event childID object id event detail 1 for int i 0 i listeners length i listeners i get Role event if event detail 1 switch event detail Convert from win32 role values to atk role values case ACC ROLE CHECKBUTTON return ATK ATK ROLE CHECK BOX case ACC ROLE CLIENT AREA return ATK ATK ROLE DRAWING AREA case ACC ROLE COMBOBOX return ATK ATK ROLE COMBO BOX case ACC ROLE DIALOG return ATK ATK ROLE DIALOG case ACC ROLE LABEL return ATK ATK ROLE LABEL case ACC ROLE LINK return ATK ATK ROLE TEXT case ACC ROLE LIST return ATK ATK ROLE LIST case ACC ROLE LISTITEM return ATK ATK ROLE LIST ITEM case ACC ROLE MENU return ATK ATK ROLE MENU case ACC ROLE MENUBAR return ATK ATK ROLE MENU BAR case ACC ROLE MENUITEM return ATK ATK ROLE MENU ITEM case ACC ROLE PROGRESSBAR return ATK ATK ROLE PROGRESS BAR case ACC ROLE PUSHBUTTON return ATK ATK ROLE PUSH BUTTON case ACC ROLE SCROLLBAR return ATK ATK ROLE SCROLL BAR case ACC ROLE SEPARATOR return ATK ATK ROLE SEPARATOR case ACC ROLE SLIDER return ATK ATK ROLE SLIDER case ACC ROLE TABLE return ATK ATK ROLE TABLE case ACC ROLE TABLECELL return ATK ATK ROLE TABLE CELL case ACC ROLE TABLECOLUMNHEADER return ATK ATK ROLE TABLE COLUMN HEADER case ACC ROLE TABLEROWHEADER return ATK ATK ROLE TABLE ROW HEADER case ACC ROLE TABFOLDER return ATK ATK ROLE PAGE TAB LIST case ACC ROLE TABITEM return ATK ATK ROLE PAGE TAB case ACC ROLE TEXT return ATK ATK ROLE TEXT case ACC ROLE TOOLBAR return ATK ATK ROLE TOOL BAR case ACC ROLE TOOLTIP return ATK ATK ROLE TOOL TIP case ACC ROLE TREE return ATK ATK ROLE TREE case ACC ROLE TREEITEM return ATK ATK ROLE LIST ITEM case ACC ROLE RADIOBUTTON return ATK ATK ROLE RADIO BUTTON case ACC ROLE WINDOW return ATK ATK ROLE WINDOW int long super Type ATK g type class peek object parent Type Atk Object Class object Class new Atk Object Class ATK memmove object Class super Type if object Class get role 0 return 0 return ATK call object Class get role object handle  atkObject_get_role atkObject atkObject_get_role atkObject AccessibleObject getAccessibleObject atkObject getAccessibleListeners AccessibleControlListener getControlListeners AccessibleControlEvent AccessibleControlEvent getRole ROLE_CHECKBUTTON ATK_ROLE_CHECK_BOX ROLE_CLIENT_AREA ATK_ROLE_DRAWING_AREA ROLE_COMBOBOX ATK_ROLE_COMBO_BOX ROLE_DIALOG ATK_ROLE_DIALOG ROLE_LABEL ATK_ROLE_LABEL ROLE_LINK ATK_ROLE_TEXT ROLE_LIST ATK_ROLE_LIST ROLE_LISTITEM ATK_ROLE_LIST_ITEM ROLE_MENU ATK_ROLE_MENU ROLE_MENUBAR ATK_ROLE_MENU_BAR ROLE_MENUITEM ATK_ROLE_MENU_ITEM ROLE_PROGRESSBAR ATK_ROLE_PROGRESS_BAR ROLE_PUSHBUTTON ATK_ROLE_PUSH_BUTTON ROLE_SCROLLBAR ATK_ROLE_SCROLL_BAR ROLE_SEPARATOR ATK_ROLE_SEPARATOR ROLE_SLIDER ATK_ROLE_SLIDER ROLE_TABLE ATK_ROLE_TABLE ROLE_TABLECELL ATK_ROLE_TABLE_CELL ROLE_TABLECOLUMNHEADER ATK_ROLE_TABLE_COLUMN_HEADER ROLE_TABLEROWHEADER ATK_ROLE_TABLE_ROW_HEADER ROLE_TABFOLDER ATK_ROLE_PAGE_TAB_LIST ROLE_TABITEM ATK_ROLE_PAGE_TAB ROLE_TEXT ATK_ROLE_TEXT ROLE_TOOLBAR ATK_ROLE_TOOL_BAR ROLE_TOOLTIP ATK_ROLE_TOOL_TIP ROLE_TREE ATK_ROLE_TREE ROLE_TREEITEM ATK_ROLE_LIST_ITEM ROLE_RADIOBUTTON ATK_ROLE_RADIO_BUTTON ROLE_WINDOW ATK_ROLE_WINDOW superType g_type_class_peek parentType AtkObjectClass objectClass AtkObjectClass objectClass superType objectClass get_role objectClass get_role
static int long atkObject ref child int long atk Object int long index if DEBUG System out println atkObject ref child index of atk Object Accessible Object object get Accessible Object atk Object if object null return 0 object update Children Accessible Object acc Object object get Child By Index int 64 index if acc Object null OS g object ref acc Object handle return acc Object handle int long super Type ATK g type class peek object parent Type Atk Object Class object Class new Atk Object Class ATK memmove object Class super Type if object Class ref child 0 return 0 return ATK call object Class ref child object handle index  atkObject_ref_child atkObject atkObject_ref_child atkObject AccessibleObject getAccessibleObject atkObject updateChildren AccessibleObject accObject getChildByIndex accObject g_object_ref accObject accObject superType g_type_class_peek parentType AtkObjectClass objectClass AtkObjectClass objectClass superType objectClass ref_child objectClass ref_child
static int long atkObject ref state set int long atk Object if DEBUG System out println atkObject ref state set Accessible Object object get Accessible Object atk Object if object null return 0 int long parent Result 0 int long super Type ATK g type class peek object parent Type Atk Object Class object Class new Atk Object Class ATK memmove object Class super Type if object Class ref state set 0 parent Result ATK call object Class ref state set object handle Accessible Control Listener listeners object get Control Listeners if listeners length 0 return parent Result int long set parent Result Accessible Control Event event new Accessible Control Event object event childID object id event detail 1 for int i 0 i listeners length i listeners i get State event if event detail 1 Convert from win32 state values to atk state values int state event detail if state ACC STATE BUSY 0 ATK atk state set add state set ATK ATK STATE BUSY if state ACC STATE CHECKED 0 ATK atk state set add state set ATK ATK STATE CHECKED if state ACC STATE EXPANDED 0 ATK atk state set add state set ATK ATK STATE EXPANDED if state ACC STATE FOCUSABLE 0 ATK atk state set add state set ATK ATK STATE FOCUSABLE if state ACC STATE FOCUSED 0 ATK atk state set add state set ATK ATK STATE FOCUSED if state ACC STATE HOTTRACKED 0 ATK atk state set add state set ATK ATK STATE ARMED if state ACC STATE INVISIBLE 0 ATK atk state set add state set ATK ATK STATE VISIBLE if state ACC STATE MULTISELECTABLE 0 ATK atk state set add state set ATK ATK STATE MULTISELECTABLE if state ACC STATE OFFSCREEN 0 ATK atk state set add state set ATK ATK STATE SHOWING if state ACC STATE PRESSED 0 ATK atk state set add state set ATK ATK STATE PRESSED if state ACC STATE READONLY 0 ATK atk state set add state set ATK ATK STATE EDITABLE if state ACC STATE SELECTABLE 0 ATK atk state set add state set ATK ATK STATE SELECTABLE if state ACC STATE SELECTED 0 ATK atk state set add state set ATK ATK STATE SELECTED if state ACC STATE SIZEABLE 0 ATK atk state set add state set ATK ATK STATE RESIZABLE Note STATE COLLAPSED STATE LINKED and STATE NORMAL have no ATK equivalents return set  atkObject_ref_state_set atkObject atkObject_ref_state_set AccessibleObject getAccessibleObject atkObject parentResult superType g_type_class_peek parentType AtkObjectClass objectClass AtkObjectClass objectClass superType objectClass ref_state_set parentResult objectClass ref_state_set AccessibleControlListener getControlListeners parentResult parentResult AccessibleControlEvent AccessibleControlEvent getState STATE_BUSY atk_state_set_add_state ATK_STATE_BUSY STATE_CHECKED atk_state_set_add_state ATK_STATE_CHECKED STATE_EXPANDED atk_state_set_add_state ATK_STATE_EXPANDED STATE_FOCUSABLE atk_state_set_add_state ATK_STATE_FOCUSABLE STATE_FOCUSED atk_state_set_add_state ATK_STATE_FOCUSED STATE_HOTTRACKED atk_state_set_add_state ATK_STATE_ARMED STATE_INVISIBLE atk_state_set_add_state ATK_STATE_VISIBLE STATE_MULTISELECTABLE atk_state_set_add_state ATK_STATE_MULTISELECTABLE STATE_OFFSCREEN atk_state_set_add_state ATK_STATE_SHOWING STATE_PRESSED atk_state_set_add_state ATK_STATE_PRESSED STATE_READONLY atk_state_set_add_state ATK_STATE_EDITABLE STATE_SELECTABLE atk_state_set_add_state ATK_STATE_SELECTABLE STATE_SELECTED atk_state_set_add_state ATK_STATE_SELECTED STATE_SIZEABLE atk_state_set_add_state ATK_STATE_RESIZABLE STATE_COLLAPSED STATE_LINKED STATE_NORMAL
static int long atkSelection is child selected int long atk Object int long index if DEBUG System out println atkSelection is child selected Accessible Object object get Accessible Object atk Object if object null return 0 int long parent Result 0 if ATK g type is a object parent Type ATK SELECTION TYPE int long super Type ATK g type interface peek parent ATK ATK SELECTION GET IFACE object handle Atk Selection Iface selection Iface new Atk Selection Iface ATK memmove selection Iface super Type if selection Iface is child selected 0 parent Result ATK call selection Iface is child selected object handle index Accessible Control Listener listeners object get Control Listeners if listeners length 0 return parent Result Accessible Control Event event new Accessible Control Event object event childID object id for int i 0 i listeners length i listeners i get Selection event Accessible Object accessible Object object get Child ByID event childID if accessible Object null return accessible Object index index 1 0 return parent Result  atkSelection_is_child_selected atkObject atkSelection_is_child_selected AccessibleObject getAccessibleObject atkObject parentResult g_type_is_a parentType ATK_SELECTION_TYPE superType g_type_interface_peek_parent ATK_SELECTION_GET_IFACE AtkSelectionIface selectionIface AtkSelectionIface selectionIface superType selectionIface is_child_selected parentResult selectionIface is_child_selected AccessibleControlListener getControlListeners parentResult AccessibleControlEvent AccessibleControlEvent getSelection AccessibleObject accessibleObject getChildByID accessibleObject accessibleObject parentResult
static int long atkSelection ref selection int long atk Object int long index if DEBUG System out println atkSelection ref selection Accessible Object object get Accessible Object atk Object if object null return 0 int long parent Result 0 if ATK g type is a object parent Type ATK SELECTION TYPE int long super Type ATK g type interface peek parent ATK ATK SELECTION GET IFACE object handle Atk Selection Iface selection Iface new Atk Selection Iface ATK memmove selection Iface super Type if selection Iface ref selection 0 parent Result ATK call selection Iface ref selection object handle index Accessible Control Listener listeners object get Control Listeners if listeners length 0 return parent Result Accessible Control Event event new Accessible Control Event object event childID object id for int i 0 i listeners length i listeners i get Selection event Accessible Object acc Obj object get Child ByID event childID if acc Obj null if parent Result 0 OS g object unref parent Result OS g object ref acc Obj handle return acc Obj handle return parent Result  atkSelection_ref_selection atkObject atkSelection_ref_selection AccessibleObject getAccessibleObject atkObject parentResult g_type_is_a parentType ATK_SELECTION_TYPE superType g_type_interface_peek_parent ATK_SELECTION_GET_IFACE AtkSelectionIface selectionIface AtkSelectionIface selectionIface superType selectionIface ref_selection parentResult selectionIface ref_selection AccessibleControlListener getControlListeners parentResult AccessibleControlEvent AccessibleControlEvent getSelection AccessibleObject accObj getChildByID accObj parentResult g_object_unref parentResult g_object_ref accObj accObj parentResult
static int long atkText get caret offset int long atk Object if DEBUG System out println atkText get caret offset Accessible Object object get Accessible Object atk Object if object null return 0 int long parent Result 0 if ATK g type is a object parent Type ATK TEXT TYPE int long super Type ATK g type interface peek parent ATK ATK TEXT GET IFACE object handle Atk Text Iface text Iface new Atk Text Iface ATK memmove text Iface super Type if text Iface get caret offset 0 parent Result ATK call text Iface get caret offset object handle Accessible Text Listener listeners object get Text Listeners if listeners length 0 return parent Result Accessible Text Event event new Accessible Text Event object event childID object id event offset int 64 parent Result for int i 0 i listeners length i listeners i get Caret Offset event return event offset  atkText_get_caret_offset atkObject atkText_get_caret_offset AccessibleObject getAccessibleObject atkObject parentResult g_type_is_a parentType ATK_TEXT_TYPE superType g_type_interface_peek_parent ATK_TEXT_GET_IFACE AtkTextIface textIface AtkTextIface textIface superType textIface get_caret_offset parentResult textIface get_caret_offset AccessibleTextListener getTextListeners parentResult AccessibleTextEvent AccessibleTextEvent parentResult getCaretOffset
static int long atkText get character at offset int long atk Object int long offset if DEBUG System out println atkText get character at offset Accessible Object object get Accessible Object atk Object if object null return 0 String text object get Text if text null return int text char At int 64 offset TODO if ATK g type is a object parent Type ATK TEXT TYPE int long super Type ATK g type class peek object parent Type Atk Text Iface text Iface new Atk Text Iface ATK memmove text Iface super Type if text Iface get character at offset 0 return ATK call text Iface get character at offset object handle offset return 0  atkText_get_character_at_offset atkObject atkText_get_character_at_offset AccessibleObject getAccessibleObject atkObject getText charAt g_type_is_a parentType ATK_TEXT_TYPE superType g_type_class_peek parentType AtkTextIface textIface AtkTextIface textIface superType textIface get_character_at_offset textIface get_character_at_offset
static int long atkText get character count int long atk Object if DEBUG System out println atkText get character count Accessible Object object get Accessible Object atk Object if object null return 0 String text object get Text if text null return text length if ATK g type is a object parent Type ATK TEXT TYPE int long super Type ATK g type class peek object parent Type Atk Text Iface text Iface new Atk Text Iface ATK memmove text Iface super Type if text Iface get character count 0 return ATK call text Iface get character count object handle return 0  atkText_get_character_count atkObject atkText_get_character_count AccessibleObject getAccessibleObject atkObject getText g_type_is_a parentType ATK_TEXT_TYPE superType g_type_class_peek parentType AtkTextIface textIface AtkTextIface textIface superType textIface get_character_count textIface get_character_count
static int long atkText get n selections int long atk Object if DEBUG System out println atkText get n selections Accessible Object object get Accessible Object atk Object if object null return 0 int long parent Result 0 if ATK g type is a object parent Type ATK TEXT TYPE int long super Type ATK g type interface peek parent ATK ATK TEXT GET IFACE object handle Atk Text Iface text Iface new Atk Text Iface ATK memmove text Iface super Type if text Iface get n selections 0 parent Result ATK call text Iface get n selections object handle Accessible Text Listener listeners object get Text Listeners if listeners length 0 return parent Result Accessible Text Event event new Accessible Text Event object event childID object id for int i 0 i listeners length i listeners i get Selection Range event return event length 0 parent Result 1  atkText_get_n_selections atkObject atkText_get_n_selections AccessibleObject getAccessibleObject atkObject parentResult g_type_is_a parentType ATK_TEXT_TYPE superType g_type_interface_peek_parent ATK_TEXT_GET_IFACE AtkTextIface textIface AtkTextIface textIface superType textIface get_n_selections parentResult textIface get_n_selections AccessibleTextListener getTextListeners parentResult AccessibleTextEvent AccessibleTextEvent getSelectionRange parentResult
static int long atkText get selection int long atk Object int long selection num int long start offset int long end offset if DEBUG System out println atkText get selection Accessible Object object get Accessible Object atk Object if object null return 0 OS memmove start offset new int 0 4 OS memmove end offset new int 0 4 if ATK g type is a object parent Type ATK TEXT TYPE int long super Type ATK g type interface peek parent ATK ATK TEXT GET IFACE object handle Atk Text Iface text Iface new Atk Text Iface ATK memmove text Iface super Type if text Iface get selection 0 ATK call text Iface get selection object handle selection num start offset end offset Accessible Text Listener listeners object get Text Listeners if listeners length 0 return 0 Accessible Text Event event new Accessible Text Event object event childID object id int parent Start new int 1 int parent End new int 1 OS memmove parent Start start offset 4 OS memmove parent End end offset 4 event offset parent Start 0 event length parent End 0 parent Start 0 for int i 0 i listeners length i listeners i get Selection Range event OS memmove start offset new int event offset 4 OS memmove end offset new int event offset event length 4 return 0  atkText_get_selection atkObject selection_num start_offset end_offset atkText_get_selection AccessibleObject getAccessibleObject atkObject start_offset end_offset g_type_is_a parentType ATK_TEXT_TYPE superType g_type_interface_peek_parent ATK_TEXT_GET_IFACE AtkTextIface textIface AtkTextIface textIface superType textIface get_selection textIface get_selection selection_num start_offset end_offset AccessibleTextListener getTextListeners AccessibleTextEvent AccessibleTextEvent parentStart parentEnd parentStart start_offset parentEnd end_offset parentStart parentEnd parentStart getSelectionRange start_offset end_offset
static int long atkText get text int long atk Object int long start offset int long end offset if DEBUG System out println atkText get text start offset end offset Accessible Object object get Accessible Object atk Object if object null return 0 String text object get Text if text length 0 if end offset 1 end offset text length else end offset Math min end offset text length start offset Math min start offset end offset text text substring int 64 start offset int 64 end offset byte bytes Converter wcs To Mbcs null text true int long result OS g malloc bytes length OS memmove result bytes bytes length return result return 0  atkText_get_text atkObject start_offset end_offset atkText_get_text start_offset end_offset AccessibleObject getAccessibleObject atkObject getText end_offset end_offset end_offset end_offset start_offset start_offset end_offset start_offset end_offset wcsToMbcs g_malloc
static int long atkText get text after offset int long atk Object int long offset value int long boundary type int long start offset int long end offset if DEBUG System out println atkText get text after offset Accessible Object object get Accessible Object atk Object if object null return 0 int offset int 64 offset value String text object get Text if text length 0 int length text length offset Math min offset length 1 int start Bounds offset int end Bounds offset switch int 64 boundary type case ATK ATK TEXT BOUNDARY CHAR if length offset end Bounds break case ATK ATK TEXT BOUNDARY WORD START int word Start1 next Index Of Char text n offset 1 if word Start1 1 start Bounds end Bounds length break word Start1 next Index Of Not Char text n word Start1 if word Start1 length start Bounds end Bounds length break start Bounds word Start1 int word Start2 next Index Of Char text n word Start1 if word Start2 1 end Bounds length break end Bounds next Index Of Not Char text n word Start2 break case ATK ATK TEXT BOUNDARY WORD END int previous Word End previous Index Of Not Char text n offset if previous Word End 1 previous Word End offset 1 offset next Index Of Not Char text n offset if offset 1 start Bounds end Bounds length break int word End1 next Index Of Char text n int 64 offset if word End1 1 start Bounds end Bounds length break word End1 next Index Of Not Char text word End1 if word End1 length start Bounds end Bounds length break start Bounds word End1 int word End2 next Index Of Not Char text n word End1 if word End2 length start Bounds end Bounds length break word End2 next Index Of Char text n word End2 if word End2 1 end Bounds length break end Bounds next Index Of Not Char text word End2 break case ATK ATK TEXT BOUNDARY SENTENCE START int previous Sentence End previous Index Of Char text offset int previous Text previous Index Of Not Char text n offset int sentence Start1 0 if previous Sentence End previous Text sentence Start1 next Index Of Not Char text n offset else sentence Start1 next Index Of Char text offset if sentence Start1 1 start Bounds end Bounds length break sentence Start1 next Index Of Not Char text n sentence Start1 if sentence Start1 length start Bounds end Bounds length break start Bounds sentence Start1 int sentence Start2 next Index Of Char text sentence Start1 if sentence Start2 1 end Bounds length break end Bounds next Index Of Not Char text n sentence Start2 break case ATK ATK TEXT BOUNDARY SENTENCE END int sentence End1 next Index Of Char text offset if sentence End1 1 start Bounds end Bounds length break sentence End1 next Index Of Not Char text sentence End1 if sentence End1 length start Bounds end Bounds length break start Bounds sentence End1 int sentence End2 next Index Of Not Char text n sentence End1 if sentence End2 length start Bounds end Bounds length break sentence End2 next Index Of Char text sentence End2 if sentence End2 1 end Bounds length break end Bounds next Index Of Not Char text sentence End2 break case ATK ATK TEXT BOUNDARY LINE START int line Start1 text index Of n offset 1 if line Start1 1 start Bounds end Bounds length break line Start1 next Index Of Not Char text n line Start1 if line Start1 length start Bounds end Bounds length break start Bounds line Start1 int line Start2 text index Of n line Start1 if line Start2 1 end Bounds length break line Start2 next Index Of Not Char text n line Start2 end Bounds line Start2 break case ATK ATK TEXT BOUNDARY LINE END int line End1 next Index Of Char text n offset if line End1 1 start Bounds end Bounds length break start Bounds line End1 if start Bounds length end Bounds length break int line End2 next Index Of Char text n line End1 1 if line End2 1 end Bounds length break end Bounds line End2 break OS memmove start offset new int start Bounds 4 OS memmove end offset new int end Bounds 4 text text substring start Bounds end Bounds byte bytes Converter wcs To Mbcs null text true int long result OS g malloc bytes length OS memmove result bytes bytes length return result return 0  atkText_get_text_after_offset atkObject offset_value boundary_type start_offset end_offset atkText_get_text_after_offset AccessibleObject getAccessibleObject atkObject offset_value getText startBounds endBounds boundary_type ATK_TEXT_BOUNDARY_CHAR endBounds ATK_TEXT_BOUNDARY_WORD_START wordStart1 nextIndexOfChar wordStart1 startBounds endBounds wordStart1 nextIndexOfNotChar wordStart1 wordStart1 startBounds endBounds startBounds wordStart1 wordStart2 nextIndexOfChar wordStart1 wordStart2 endBounds endBounds nextIndexOfNotChar wordStart2 ATK_TEXT_BOUNDARY_WORD_END previousWordEnd previousIndexOfNotChar previousWordEnd previousWordEnd nextIndexOfNotChar startBounds endBounds wordEnd1 nextIndexOfChar wordEnd1 startBounds endBounds wordEnd1 nextIndexOfNotChar wordEnd1 wordEnd1 startBounds endBounds startBounds wordEnd1 wordEnd2 nextIndexOfNotChar wordEnd1 wordEnd2 startBounds endBounds wordEnd2 nextIndexOfChar wordEnd2 wordEnd2 endBounds endBounds nextIndexOfNotChar wordEnd2 ATK_TEXT_BOUNDARY_SENTENCE_START previousSentenceEnd previousIndexOfChar previousText previousIndexOfNotChar sentenceStart1 previousSentenceEnd previousText sentenceStart1 nextIndexOfNotChar sentenceStart1 nextIndexOfChar sentenceStart1 startBounds endBounds sentenceStart1 nextIndexOfNotChar sentenceStart1 sentenceStart1 startBounds endBounds startBounds sentenceStart1 sentenceStart2 nextIndexOfChar sentenceStart1 sentenceStart2 endBounds endBounds nextIndexOfNotChar sentenceStart2 ATK_TEXT_BOUNDARY_SENTENCE_END sentenceEnd1 nextIndexOfChar sentenceEnd1 startBounds endBounds sentenceEnd1 nextIndexOfNotChar sentenceEnd1 sentenceEnd1 startBounds endBounds startBounds sentenceEnd1 sentenceEnd2 nextIndexOfNotChar sentenceEnd1 sentenceEnd2 startBounds endBounds sentenceEnd2 nextIndexOfChar sentenceEnd2 sentenceEnd2 endBounds endBounds nextIndexOfNotChar sentenceEnd2 ATK_TEXT_BOUNDARY_LINE_START lineStart1 indexOf lineStart1 startBounds endBounds lineStart1 nextIndexOfNotChar lineStart1 lineStart1 startBounds endBounds startBounds lineStart1 lineStart2 indexOf lineStart1 lineStart2 endBounds lineStart2 nextIndexOfNotChar lineStart2 endBounds lineStart2 ATK_TEXT_BOUNDARY_LINE_END lineEnd1 nextIndexOfChar lineEnd1 startBounds endBounds startBounds lineEnd1 startBounds endBounds lineEnd2 nextIndexOfChar lineEnd1 lineEnd2 endBounds endBounds lineEnd2 start_offset startBounds end_offset endBounds startBounds endBounds wcsToMbcs g_malloc
static int long atkText get text at offset int long atk Object int long offset value int long boundary type int long start offset int long end offset if DEBUG System out println atkText get text at offset offset value start start offset end end offset Accessible Object object get Accessible Object atk Object if object null return 0 int offset int 64 offset value String text object get Text if text length 0 int length text length offset Math min offset length 1 int start Bounds offset int end Bounds offset switch int 64 boundary type case ATK ATK TEXT BOUNDARY CHAR if length offset end Bounds break case ATK ATK TEXT BOUNDARY WORD START int word Start1 previous Index Of Not Char text n offset if word Start1 1 start Bounds end Bounds 0 break word Start1 previous Index Of Char text n word Start1 1 if word Start1 1 start Bounds 0 break start Bounds word Start1 int word Start2 next Index Of Char text n word Start1 end Bounds next Index Of Not Char text n word Start2 break case ATK ATK TEXT BOUNDARY WORD END int word End1 previous Index Of Not Char text offset 1 word End1 previous Index Of Char text n word End1 word End1 previous Index Of Not Char text n word End1 1 if word End1 1 start Bounds end Bounds 0 break start Bounds word End1 1 int word End2 next Index Of Not Char text n start Bounds if word End2 length end Bounds start Bounds break word End2 next Index Of Char text n word End2 if word End2 1 end Bounds start Bounds break end Bounds next Index Of Not Char text word End2 break case ATK ATK TEXT BOUNDARY SENTENCE START int sentence Start1 previous Index Of Not Char text n offset 1 if sentence Start1 1 start Bounds end Bounds 0 break sentence Start1 previous Index Of Char text sentence Start1 1 start Bounds next Index Of Not Char text n sentence Start1 int sentence Start2 next Index Of Char text start Bounds end Bounds next Index Of Not Char text n sentence Start2 break case ATK ATK TEXT BOUNDARY SENTENCE END int sentence End1 previous Index Of Not Char text offset 1 sentence End1 previous Index Of Char text sentence End1 sentence End1 previous Index Of Not Char text n sentence End1 1 if sentence End1 1 start Bounds end Bounds 0 break start Bounds sentence End1 1 int sentence End2 next Index Of Not Char text n start Bounds if sentence End2 length end Bounds start Bounds break sentence End2 next Index Of Char text sentence End2 if sentence End2 1 end Bounds start Bounds break end Bounds next Index Of Not Char text sentence End2 break case ATK ATK TEXT BOUNDARY LINE START start Bounds previous Index Of Char text n offset 1 int line End2 next Index Of Char text n start Bounds if line End2 length line End2 end Bounds line End2 break case ATK ATK TEXT BOUNDARY LINE END int line End1 previous Index Of Char text n offset if line End1 1 start Bounds end Bounds 0 break start Bounds line End1 end Bounds next Index Of Char text n line End1 1 OS memmove start offset new int start Bounds 4 OS memmove end offset new int end Bounds 4 text text substring start Bounds end Bounds byte bytes Converter wcs To Mbcs null text true int long result OS g malloc bytes length OS memmove result bytes bytes length return result return 0  atkText_get_text_at_offset atkObject offset_value boundary_type start_offset end_offset atkText_get_text_at_offset offset_value start_offset end_offset AccessibleObject getAccessibleObject atkObject offset_value getText startBounds endBounds boundary_type ATK_TEXT_BOUNDARY_CHAR endBounds ATK_TEXT_BOUNDARY_WORD_START wordStart1 previousIndexOfNotChar wordStart1 startBounds endBounds wordStart1 previousIndexOfChar wordStart1 wordStart1 startBounds startBounds wordStart1 wordStart2 nextIndexOfChar wordStart1 endBounds nextIndexOfNotChar wordStart2 ATK_TEXT_BOUNDARY_WORD_END wordEnd1 previousIndexOfNotChar wordEnd1 previousIndexOfChar wordEnd1 wordEnd1 previousIndexOfNotChar wordEnd1 wordEnd1 startBounds endBounds startBounds wordEnd1 wordEnd2 nextIndexOfNotChar startBounds wordEnd2 endBounds startBounds wordEnd2 nextIndexOfChar wordEnd2 wordEnd2 endBounds startBounds endBounds nextIndexOfNotChar wordEnd2 ATK_TEXT_BOUNDARY_SENTENCE_START sentenceStart1 previousIndexOfNotChar sentenceStart1 startBounds endBounds sentenceStart1 previousIndexOfChar sentenceStart1 startBounds nextIndexOfNotChar sentenceStart1 sentenceStart2 nextIndexOfChar startBounds endBounds nextIndexOfNotChar sentenceStart2 ATK_TEXT_BOUNDARY_SENTENCE_END sentenceEnd1 previousIndexOfNotChar sentenceEnd1 previousIndexOfChar sentenceEnd1 sentenceEnd1 previousIndexOfNotChar sentenceEnd1 sentenceEnd1 startBounds endBounds startBounds sentenceEnd1 sentenceEnd2 nextIndexOfNotChar startBounds sentenceEnd2 endBounds startBounds sentenceEnd2 nextIndexOfChar sentenceEnd2 sentenceEnd2 endBounds startBounds endBounds nextIndexOfNotChar sentenceEnd2 ATK_TEXT_BOUNDARY_LINE_START startBounds previousIndexOfChar lineEnd2 nextIndexOfChar startBounds lineEnd2 lineEnd2 endBounds lineEnd2 ATK_TEXT_BOUNDARY_LINE_END lineEnd1 previousIndexOfChar lineEnd1 startBounds endBounds startBounds lineEnd1 endBounds nextIndexOfChar lineEnd1 start_offset startBounds end_offset endBounds startBounds endBounds wcsToMbcs g_malloc
static int long atkText get text before offset int long atk Object int long offset value int long boundary type int long start offset int long end offset if DEBUG System out println atkText get text before offset Accessible Object object get Accessible Object atk Object if object null return 0 int offset int 64 offset value String text object get Text if text length 0 int length text length offset Math min offset length 1 int start Bounds offset int end Bounds offset switch int 64 boundary type case ATK ATK TEXT BOUNDARY CHAR if length offset offset 0 start Bounds break case ATK ATK TEXT BOUNDARY WORD START int word Start1 previous Index Of Char text n offset 1 if word Start1 1 start Bounds end Bounds 0 break int word Start2 previous Index Of Not Char text n word Start1 if word Start2 1 start Bounds end Bounds 0 break end Bounds word Start1 1 start Bounds previous Index Of Char text n word Start2 1 break case ATK ATK TEXT BOUNDARY WORD END int word End1 previous Index Of Char text n offset if word End1 1 start Bounds end Bounds 0 break word End1 previous Index Of Not Char text n word End1 1 if word End1 1 start Bounds end Bounds 0 break end Bounds word End1 1 int word End2 previous Index Of Not Char text n end Bounds word End2 previous Index Of Char text n word End2 if word End2 1 start Bounds 0 break start Bounds previous Index Of Not Char text n word End2 1 1 break case ATK ATK TEXT BOUNDARY SENTENCE START int sentence Start1 previous Index Of Char text offset if sentence Start1 1 start Bounds end Bounds 0 break int sentence Start2 previous Index Of Not Char text sentence Start1 if sentence Start2 1 start Bounds end Bounds 0 break end Bounds sentence Start1 1 start Bounds previous Index Of Char text sentence Start2 1 break case ATK ATK TEXT BOUNDARY SENTENCE END int sentence End1 previous Index Of Char text offset if sentence End1 1 start Bounds end Bounds 0 break sentence End1 previous Index Of Not Char text n sentence End1 1 if sentence End1 1 start Bounds end Bounds 0 break end Bounds sentence End1 1 int sentence End2 previous Index Of Not Char text end Bounds sentence End2 previous Index Of Char text sentence End2 if sentence End2 1 start Bounds 0 break start Bounds previous Index Of Not Char text n sentence End2 1 1 break case ATK ATK TEXT BOUNDARY LINE START int line Start1 previous Index Of Char text n offset if line Start1 1 start Bounds end Bounds 0 break end Bounds line Start1 1 start Bounds previous Index Of Char text n line Start1 1 break case ATK ATK TEXT BOUNDARY LINE END int line End1 previous Index Of Char text n offset if line End1 1 start Bounds end Bounds 0 break end Bounds line End1 start Bounds previous Index Of Char text n line End1 if start Bounds 1 start Bounds 0 break OS memmove start offset new int start Bounds 4 OS memmove end offset new int end Bounds 4 text text substring start Bounds end Bounds byte bytes Converter wcs To Mbcs null text true int long result OS g malloc bytes length OS memmove result bytes bytes length return result return 0  atkText_get_text_before_offset atkObject offset_value boundary_type start_offset end_offset atkText_get_text_before_offset AccessibleObject getAccessibleObject atkObject offset_value getText startBounds endBounds boundary_type ATK_TEXT_BOUNDARY_CHAR startBounds ATK_TEXT_BOUNDARY_WORD_START wordStart1 previousIndexOfChar wordStart1 startBounds endBounds wordStart2 previousIndexOfNotChar wordStart1 wordStart2 startBounds endBounds endBounds wordStart1 startBounds previousIndexOfChar wordStart2 ATK_TEXT_BOUNDARY_WORD_END wordEnd1 previousIndexOfChar wordEnd1 startBounds endBounds wordEnd1 previousIndexOfNotChar wordEnd1 wordEnd1 startBounds endBounds endBounds wordEnd1 wordEnd2 previousIndexOfNotChar endBounds wordEnd2 previousIndexOfChar wordEnd2 wordEnd2 startBounds startBounds previousIndexOfNotChar wordEnd2 ATK_TEXT_BOUNDARY_SENTENCE_START sentenceStart1 previousIndexOfChar sentenceStart1 startBounds endBounds sentenceStart2 previousIndexOfNotChar sentenceStart1 sentenceStart2 startBounds endBounds endBounds sentenceStart1 startBounds previousIndexOfChar sentenceStart2 ATK_TEXT_BOUNDARY_SENTENCE_END sentenceEnd1 previousIndexOfChar sentenceEnd1 startBounds endBounds sentenceEnd1 previousIndexOfNotChar sentenceEnd1 sentenceEnd1 startBounds endBounds endBounds sentenceEnd1 sentenceEnd2 previousIndexOfNotChar endBounds sentenceEnd2 previousIndexOfChar sentenceEnd2 sentenceEnd2 startBounds startBounds previousIndexOfNotChar sentenceEnd2 ATK_TEXT_BOUNDARY_LINE_START lineStart1 previousIndexOfChar lineStart1 startBounds endBounds endBounds lineStart1 startBounds previousIndexOfChar lineStart1 ATK_TEXT_BOUNDARY_LINE_END lineEnd1 previousIndexOfChar lineEnd1 startBounds endBounds endBounds lineEnd1 startBounds previousIndexOfChar lineEnd1 startBounds startBounds start_offset startBounds end_offset endBounds startBounds endBounds wcsToMbcs g_malloc
Accessible Listener get Accessible Listeners if accessible null return new Accessible Listener 0 return accessible get Accessible Listeners  AccessibleListener getAccessibleListeners AccessibleListener getAccessibleListeners
static Accessible Object get Accessible Object int long atk Object return Accessible Object Accessible Objects get new LONG atk Object  AccessibleObject getAccessibleObject atkObject AccessibleObject AccessibleObjects atkObject
Accessible Object get Child By Handle int long handle return Accessible Object children get new LONG handle  AccessibleObject getChildByHandle AccessibleObject
Accessible Object get Child ByID int child Id if child Id ACC CHILDID SELF return this Enumeration elements children elements while elements has More Elements Accessible Object object Accessible Object elements next Element if object id child Id return object return null  AccessibleObject getChildByID childId childId CHILDID_SELF hasMoreElements AccessibleObject AccessibleObject nextElement childId
Accessible Object get Child By Index int child Index Enumeration elements children elements while elements has More Elements Accessible Object object Accessible Object elements next Element if object index child Index return object return null  AccessibleObject getChildByIndex childIndex hasMoreElements AccessibleObject AccessibleObject nextElement childIndex
Accessible Control Listener get Control Listeners if accessible null return new Accessible Control Listener 0 return accessible get Control Listeners  AccessibleControlListener getControlListeners AccessibleControlListener getControlListeners
String get Text int long parent Result 0 String parent Text if ATK g type is a parent Type ATK TEXT TYPE int long super Type ATK g type interface peek parent ATK ATK TEXT GET IFACE handle Atk Text Iface text Iface new Atk Text Iface ATK memmove text Iface super Type int long character Count 0 if text Iface get character count 0 character Count ATK call text Iface get character count handle if character Count 0 text Iface get text 0 parent Result ATK call text Iface get text handle 0 character Count if parent Result 0 int length OS strlen parent Result byte buffer new byte length OS memmove buffer parent Result length parent Text new String Converter mbcs To Wcs null buffer Accessible Control Listener control Listeners get Control Listeners if control Listeners length 0 return parent Text Accessible Control Event event new Accessible Control Event this event childID id event result parent Text for int i 0 i control Listeners length i control Listeners i get Value event return event result  getText parentResult parentText g_type_is_a parentType ATK_TEXT_TYPE superType g_type_interface_peek_parent ATK_TEXT_GET_IFACE AtkTextIface textIface AtkTextIface textIface superType characterCount textIface get_character_count characterCount textIface get_character_count characterCount textIface get_text parentResult textIface get_text characterCount parentResult parentResult parentResult parentText mbcsToWcs AccessibleControlListener controlListeners getControlListeners controlListeners parentText AccessibleControlEvent AccessibleControlEvent parentText controlListeners controlListeners getValue
Accessible Text Listener get Text Listeners if accessible null return new Accessible Text Listener 0 return accessible get Text Listeners  AccessibleTextListener getTextListeners AccessibleTextListener getTextListeners
static int long gObjectClass finalize int long atk Object int long super Type ATK g type class peek parent ATK G OBJECT GET CLASS atk Object int long g Object Class ATK G OBJECT CLASS super Type G Object Class object Class Struct new G Object Class ATK memmove object Class Struct g Object Class ATK call object Class Struct finalize atk Object Accessible Object object get Accessible Object atk Object if object null Accessible Objects remove new LONG atk Object object release return 0  gObjectClass_finalize atkObject superType g_type_class_peek_parent G_OBJECT_GET_CLASS atkObject gObjectClass G_OBJECT_CLASS superType GObjectClass objectClassStruct GObjectClass objectClassStruct gObjectClass objectClassStruct atkObject AccessibleObject getAccessibleObject atkObject AccessibleObjects atkObject
static int next Index Of Char String string String search Chars int start Index int result string length for int i 0 i search Chars length i char current search Chars char At i int index string index Of current start Index if index 1 result Math min result index return result  nextIndexOfChar searchChars startIndex searchChars searchChars charAt indexOf startIndex
static int next Index Of Not Char String string String search Chars int start Index int length string length int index start Index while index length char current string char At index if search Chars index Of current 1 break index return index  nextIndexOfNotChar searchChars startIndex startIndex charAt searchChars indexOf
static int previous Index Of Char String string String search Chars int start Index int result 1 if start Index 0 return result string string substring 0 start Index for int i 0 i search Chars length i char current search Chars char At i int index string last Index Of current if index 1 result Math max result index return result  previousIndexOfChar searchChars startIndex startIndex startIndex searchChars searchChars charAt lastIndexOf
static int previous Index Of Not Char String string String search Chars int start Index if start Index 0 return 1 int index start Index 1 while index 0 char current string char At index if search Chars index Of current 1 break index return index  previousIndexOfNotChar searchChars startIndex startIndex startIndex charAt searchChars indexOf
void release if DEBUG System out println Accessible Object release handle accessible null Enumeration elements children elements while elements has More Elements Accessible Object child Accessible Object elements next Element if child is Lightweight OS g object unref child handle if parent null parent remove Child this false  AccessibleObject hasMoreElements AccessibleObject AccessibleObject nextElement isLightweight g_object_unref removeChild
void remove Child Accessible Object child boolean unref children remove new LONG child handle if unref child is Lightweight OS g object unref child handle  removeChild AccessibleObject isLightweight g_object_unref
void selection Changed OS g signal emit by name handle ATK selection changed  selectionChanged g_signal_emit_by_name selection_changed
void set Focus int childID update Children Accessible Object acc Object get Child ByID childID if acc Object null ATK atk focus tracker notify acc Object handle  setFocus updateChildren AccessibleObject accObject getChildByID accObject atk_focus_tracker_notify accObject
void set Parent Accessible Object parent this parent parent  setParent AccessibleObject
void text Caret Moved int index OS g signal emit by name handle ATK text caret moved index  textCaretMoved g_signal_emit_by_name text_caret_moved
void text Changed int type int start Index int length if type ACC TEXT DELETE OS g signal emit by name handle ATK text changed delete start Index length else OS g signal emit by name handle ATK text changed insert start Index length  textChanged startIndex TEXT_DELETE g_signal_emit_by_name text_changed_delete startIndex g_signal_emit_by_name text_changed_insert startIndex
void text Selection Changed OS g signal emit by name handle ATK text selection changed  textSelectionChanged g_signal_emit_by_name text_selection_changed
void update Children if is Lightweight return Accessible Control Listener listeners get Control Listeners if listeners length 0 return Accessible Control Event event new Accessible Control Event this for int i 0 i listeners length i listeners i get Children event if event children null event children length 0 Vector ids To Keep new Vector children size if event children 0 instanceof Integer an array of child id s Integers was answered int long parent Type Accessible Factory get Default Parent Type for int i 0 i event children length i Accessible Object object get Child By Index i if object null int long child Type Accessible Factory get Child Type accessible i object new Accessible Object child Type 0 accessible parent Type true Accessible Objects put new LONG object handle object add Child object object index i try object id Integer event children i int Value catch Class Cast Exception e a non ID value was given so don t set the ID ids To Keep add Element new LONG object handle else an array of Accessible children was answered int child Index 0 for int i 0 i event children length i Accessible Object object null try object Accessible event children i accessible Object catch Class Cast Exception e a non Accessible value was given so nothing to do here if object null object index child Index ids To Keep add Element new LONG object handle remove old children that were not provided as children anymore Enumeration ids children keys while ids has More Elements LONG id LONG ids next Element if ids To Keep contains id Accessible Object object Accessible Object children get id remove Child object true  updateChildren isLightweight AccessibleControlListener getControlListeners AccessibleControlEvent AccessibleControlEvent getChildren idsToKeep parentType AccessibleFactory getDefaultParentType AccessibleObject getChildByIndex childType AccessibleFactory getChildType AccessibleObject childType parentType AccessibleObjects addChild intValue ClassCastException idsToKeep addElement childIndex AccessibleObject accessibleObject ClassCastException childIndex idsToKeep addElement hasMoreElements nextElement idsToKeep AccessibleObject AccessibleObject removeChild

display add Listener SWT Dispose new Listener public void handle Event Event event Clipboard Proxy clipbord Proxy Clipboard Proxy display get Data ID if clipbord Proxy null return display set Data ID null clipbord Proxy dispose  addListener handleEvent ClipboardProxy clipbordProxy ClipboardProxy getData clipbordProxy setData clipbordProxy
static Clipboard Proxy  getInstance final Display display Clipboard Proxy proxy Clipboard Proxy display get Data ID if proxy null return proxy proxy new Clipboard Proxy display display set Data ID proxy display add Listener SWT Dispose new Listener public void handle Event Event event Clipboard Proxy clipbord Proxy Clipboard Proxy display get Data ID if clipbord Proxy null return display set Data ID null clipbord Proxy dispose return proxy  ClipboardProxy _getInstance ClipboardProxy ClipboardProxy getData ClipboardProxy setData addListener handleEvent ClipboardProxy clipbordProxy ClipboardProxy getData clipbordProxy setData clipbordProxy
private Clipboard Proxy Display display this display display get Func new Callback this get Func 4 clear Func new Callback this clear Func 2  ClipboardProxy getFunc getFunc clearFunc clearFunc
private int long clear Func int long clipboard int long user data or owner if clipboard Clipboard GTKCLIPBOARD on Clipboard false if clipboard Clipboard GTKPRIMARYCLIPBOARD on Primary false if on Clipboard on Primary data null data Types null return 1  clearFunc user_data_or_owner onClipboard onPrimary onClipboard onPrimary dataTypes
private void dispose if display null return if on Primary OS gtk clipboard clear Clipboard GTKPRIMARYCLIPBOARD on Primary false if on Clipboard OS gtk clipboard clear Clipboard GTKCLIPBOARD on Clipboard false display null if get Func null get Func dispose get Func null if clear Func null clear Func dispose clear Func null data null data Types null  onPrimary gtk_clipboard_clear onPrimary onClipboard gtk_clipboard_clear onClipboard getFunc getFunc getFunc clearFunc clearFunc clearFunc dataTypes
This function provides the data to the clipboard on request When this clipboard is disposed the data will no longer be available private int long get Func int long clipboard int long selection data int long info int long user data or owner if selection data 0 return 0 Gtk Selection Data selection Data new Gtk Selection Data OS memmove selection Data selection data Gtk Selection Data sizeof Transfer Data tdata new Transfer Data tdata type selection Data target int index 1 for int i 0 i data Types length i if data Types i is Supported Type tdata index i break if index 1 return 0 data Types index java To Native data index tdata if tdata format 8 tdata format 8 0 return 0 OS gtk selection data set selection data tdata type tdata format tdata p Value tdata length return 1  getFunc selection_data user_data_or_owner selection_data GtkSelectionData selectionData GtkSelectionData selectionData selection_data GtkSelectionData TransferData TransferData selectionData dataTypes dataTypes isSupportedType dataTypes javaToNative gtk_selection_data_set selection_data pValue
boolean set Data Object data Transfer data Types if on Clipboard OS gtk clipboard clear Clipboard GTKCLIPBOARD if on Primary OS gtk clipboard clear Clipboard GTKPRIMARYCLIPBOARD Gtk Target Entry entries new Gtk Target Entry 0 for int i 0 i data Types length i Transfer transfer data Types i int type Ids transfer get Type Ids String type Names transfer get Type Names for int j 0 j type Ids length j Gtk Target Entry entry new Gtk Target Entry entry info type Ids j byte buffer Converter wcs To Mbcs null type Names j true int long p Name OS g malloc buffer length OS memmove p Name buffer buffer length entry target p Name Gtk Target Entry tmp new Gtk Target Entry entries length 1 System arraycopy entries 0 tmp 0 entries length tmp entries length entry entries tmp int long p Targets List OS g malloc Gtk Target Entry sizeof entries length int offset 0 for int i 0 i entries length i OS memmove p Targets List offset entries i Gtk Target Entry sizeof offset Gtk Target Entry sizeof this data data this data Types data Types on Primary OS gtk clipboard set with data Clipboard GTKPRIMARYCLIPBOARD p Targets List entries length get Func get Address clear Func get Address 0 on Clipboard OS gtk clipboard set with data Clipboard GTKCLIPBOARD p Targets List entries length get Func get Address clear Func get Address 0 for int i 0 i entries length i Gtk Target Entry entry entries i if entry target 0 OS g free entry target if p Targets List 0 OS g free p Targets List return on Clipboard on Primary  setData dataTypes onClipboard gtk_clipboard_clear onPrimary gtk_clipboard_clear GtkTargetEntry GtkTargetEntry dataTypes dataTypes typeIds getTypeIds typeNames getTypeNames typeIds GtkTargetEntry GtkTargetEntry typeIds wcsToMbcs typeNames pName g_malloc pName pName GtkTargetEntry GtkTargetEntry pTargetsList g_malloc GtkTargetEntry pTargetsList GtkTargetEntry GtkTargetEntry dataTypes dataTypes onPrimary gtk_clipboard_set_with_data pTargetsList getFunc getAddress clearFunc getAddress onClipboard gtk_clipboard_set_with_data pTargetsList getFunc getAddress clearFunc getAddress GtkTargetEntry g_free pTargetsList g_free pTargetsList onClipboard onPrimary

public static final byte text selection changed OS signal text selection changed 64 bit public static final synchronized native int AtkObjectFactory sizeof  text_selection_changed text_selection_changed AtkObjectFactory_sizeof
64 bit public static final synchronized native int AtkObjectFactory sizeof public static final synchronized native int AtkObjectFactoryClass sizeof  AtkObjectFactory_sizeof AtkObjectFactoryClass_sizeof
public static final synchronized native int AtkObjectFactory sizeof public static final synchronized native int AtkObjectFactoryClass sizeof public static final synchronized native int GInterfaceInfo sizeof  AtkObjectFactory_sizeof AtkObjectFactoryClass_sizeof GInterfaceInfo_sizeof
public static final synchronized native int AtkObjectFactoryClass sizeof public static final synchronized native int GInterfaceInfo sizeof public static final synchronized native int GTypeInfo sizeof  AtkObjectFactoryClass_sizeof GInterfaceInfo_sizeof GTypeInfo_sizeof
public static final synchronized native int GInterfaceInfo sizeof public static final synchronized native int GTypeInfo sizeof public static final synchronized native int GTypeQuery sizeof  GInterfaceInfo_sizeof GTypeInfo_sizeof GTypeQuery_sizeof
public static final synchronized native int GTypeQuery sizeof Native methods public static final synchronized native int long ATK ACTION GET IFACE int long obj  GTypeQuery_sizeof ATK_ACTION_GET_IFACE
Native methods public static final synchronized native int long ATK ACTION GET IFACE int long obj public static final synchronized native int long ATK COMPONENT GET IFACE int long atk Handle  ATK_ACTION_GET_IFACE ATK_COMPONENT_GET_IFACE atkHandle
public static final synchronized native int long ATK ACTION GET IFACE int long obj public static final synchronized native int long ATK COMPONENT GET IFACE int long atk Handle public static final synchronized native int long ATK OBJECT FACTORY CLASS int long klass  ATK_ACTION_GET_IFACE ATK_COMPONENT_GET_IFACE atkHandle ATK_OBJECT_FACTORY_CLASS
public static final synchronized native int long ATK COMPONENT GET IFACE int long atk Handle public static final synchronized native int long ATK OBJECT FACTORY CLASS int long klass public static final synchronized native int long ATK SELECTION GET IFACE int long obj  ATK_COMPONENT_GET_IFACE atkHandle ATK_OBJECT_FACTORY_CLASS ATK_SELECTION_GET_IFACE
public static final synchronized native int long ATK OBJECT FACTORY CLASS int long klass public static final synchronized native int long ATK SELECTION GET IFACE int long obj public static final synchronized native int long ATK TEXT GET IFACE int long handle  ATK_OBJECT_FACTORY_CLASS ATK_SELECTION_GET_IFACE ATK_TEXT_GET_IFACE
public static final synchronized native int long ATK SELECTION GET IFACE int long obj public static final synchronized native int long ATK TEXT GET IFACE int long handle public static final synchronized native int long G OBJECT CLASS int long klass  ATK_SELECTION_GET_IFACE ATK_TEXT_GET_IFACE G_OBJECT_CLASS
public static final synchronized native int long ATK TEXT GET IFACE int long handle public static final synchronized native int long G OBJECT CLASS int long klass public static final synchronized native int long G OBJECT GET CLASS int long object  ATK_TEXT_GET_IFACE G_OBJECT_CLASS G_OBJECT_GET_CLASS
public static final synchronized native int long G OBJECT CLASS int long klass public static final synchronized native int long G OBJECT GET CLASS int long object public static final synchronized native int long G TYPE FROM INSTANCE int long instance  G_OBJECT_CLASS G_OBJECT_GET_CLASS G_TYPE_FROM_INSTANCE
public static final synchronized native int long G OBJECT GET CLASS int long object public static final synchronized native int long G TYPE FROM INSTANCE int long instance public static final synchronized native int long GTK ACCESSIBLE int long handle  G_OBJECT_GET_CLASS G_TYPE_FROM_INSTANCE GTK_ACCESSIBLE
public static final synchronized native int long G TYPE FROM INSTANCE int long instance public static final synchronized native int long GTK ACCESSIBLE int long handle public static final synchronized native void atk focus tracker notify int long object  G_TYPE_FROM_INSTANCE GTK_ACCESSIBLE atk_focus_tracker_notify
public static final synchronized native int long GTK ACCESSIBLE int long handle public static final synchronized native void atk focus tracker notify int long object public static final synchronized native int long atk get default registry  GTK_ACCESSIBLE atk_focus_tracker_notify atk_get_default_registry
public static final synchronized native void atk focus tracker notify int long object public static final synchronized native int long atk get default registry public static final synchronized native int long atk object factory get accessible type int long factory  atk_focus_tracker_notify atk_get_default_registry atk_object_factory_get_accessible_type
public static final synchronized native int long atk get default registry public static final synchronized native int long atk object factory get accessible type int long factory public static final synchronized native void atk object initialize int long accessible int long data  atk_get_default_registry atk_object_factory_get_accessible_type atk_object_initialize
public static final synchronized native int long atk object factory get accessible type int long factory public static final synchronized native void atk object initialize int long accessible int long data public static final synchronized native int long atk registry get factory int long registry int long type  atk_object_factory_get_accessible_type atk_object_initialize atk_registry_get_factory
public static final synchronized native void atk object initialize int long accessible int long data public static final synchronized native int long atk registry get factory int long registry int long type public static final synchronized native void atk registry set factory type int long registry int long type int long factory type  atk_object_initialize atk_registry_get_factory atk_registry_set_factory_type factory_type
public static final synchronized native int long atk registry get factory int long registry int long type public static final synchronized native void atk registry set factory type int long registry int long type int long factory type public static final synchronized native boolean atk state set add state int long set int type  atk_registry_get_factory atk_registry_set_factory_type factory_type atk_state_set_add_state
public static final synchronized native void atk registry set factory type int long registry int long type int long factory type public static final synchronized native boolean atk state set add state int long set int type public static final synchronized native int long atk state set new  atk_registry_set_factory_type factory_type atk_state_set_add_state atk_state_set_new
public static final synchronized native boolean atk state set add state int long set int type public static final synchronized native int long atk state set new public static final synchronized native int long call int long function int long arg0  atk_state_set_add_state atk_state_set_new
public static final synchronized native int long atk state set new public static final synchronized native int long call int long function int long arg0 public static final synchronized native int long call int long function int long arg0 int long arg1  atk_state_set_new
public static final synchronized native int long call int long function int long arg0 public static final synchronized native int long call int long function int long arg0 int long arg1 public static final synchronized native int long call int long function int long arg0 int long arg1 int long arg2 
public static final synchronized native int long call int long function int long arg0 int long arg1 public static final synchronized native int long call int long function int long arg0 int long arg1 int long arg2 public static final synchronized native int long call int long function int long arg0 int long arg1 int long arg2 int long arg3 
public static final synchronized native int long call int long function int long arg0 int long arg1 int long arg2 public static final synchronized native int long call int long function int long arg0 int long arg1 int long arg2 int long arg3 public static final synchronized native int long call int long function int long arg0 int long arg1 int long arg2 int long arg3 int long arg4 
public static final synchronized native int long call int long function int long arg0 int long arg1 int long arg2 int long arg3 public static final synchronized native int long call int long function int long arg0 int long arg1 int long arg2 int long arg3 int long arg4 public static final synchronized native int long call int long function int long arg0 int long arg1 int long arg2 int long arg3 int long arg4 int long arg5 
public static final synchronized native int long call int long function int long arg0 int long arg1 int long arg2 int long arg3 int long arg4 public static final synchronized native int long call int long function int long arg0 int long arg1 int long arg2 int long arg3 int long arg4 int long arg5 public static final synchronized native int long g object new int long type int long first property name  g_object_new first_property_name
public static final synchronized native int long call int long function int long arg0 int long arg1 int long arg2 int long arg3 int long arg4 int long arg5 public static final synchronized native int long g object new int long type int long first property name public static final synchronized native void g type add interface static int long instance type int long interface type int long info  g_object_new first_property_name g_type_add_interface_static instance_type interface_type
public static final synchronized native int long g object new int long type int long first property name public static final synchronized native void g type add interface static int long instance type int long interface type int long info public static final synchronized native int long g type class peek int long g class  g_object_new first_property_name g_type_add_interface_static instance_type interface_type g_type_class_peek g_class
public static final synchronized native void g type add interface static int long instance type int long interface type int long info public static final synchronized native int long g type class peek int long g class public static final synchronized native int long g type class peek parent int long g class  g_type_add_interface_static instance_type interface_type g_type_class_peek g_class g_type_class_peek_parent g_class
public static final synchronized native int long g type class peek int long g class public static final synchronized native int long g type class peek parent int long g class public static final synchronized native int long g type from name byte name  g_type_class_peek g_class g_type_class_peek_parent g_class g_type_from_name
public static final synchronized native int long g type class peek parent int long g class public static final synchronized native int long g type from name byte name public static final synchronized native int long g type interface peek parent int long iface  g_type_class_peek_parent g_class g_type_from_name g_type_interface_peek_parent
public static final synchronized native int long g type from name byte name public static final synchronized native int long g type interface peek parent int long iface public static final synchronized native boolean g type is a int long type int long is a type  g_type_from_name g_type_interface_peek_parent g_type_is_a is_a_type
public static final synchronized native int long g type interface peek parent int long iface public static final synchronized native boolean g type is a int long type int long is a type public static final synchronized native int long g type name int long handle  g_type_interface_peek_parent g_type_is_a is_a_type g_type_name
public static final synchronized native boolean g type is a int long type int long is a type public static final synchronized native int long g type name int long handle public static final synchronized native int long g type parent int long type  g_type_is_a is_a_type g_type_name g_type_parent
public static final synchronized native int long g type name int long handle public static final synchronized native int long g type parent int long type public static final synchronized native void g type query int long type int long query  g_type_name g_type_parent g_type_query
public static final synchronized native int long g type parent int long type public static final synchronized native void g type query int long type int long query public static final synchronized native int long g type register static int long parent type byte type name int long info int flags  g_type_parent g_type_query g_type_register_static parent_type type_name
public static final synchronized native void g type query int long type int long query public static final synchronized native int long g type register static int long parent type byte type name int long info int flags public static final synchronized native int long gtk widget get toplevel int long widget  g_type_query g_type_register_static parent_type type_name gtk_widget_get_toplevel
public static final synchronized native int long g type register static int long parent type byte type name int long info int flags public static final synchronized native int long gtk widget get toplevel int long widget public static final synchronized native void memmove Atk Action Iface dest int long src  g_type_register_static parent_type type_name gtk_widget_get_toplevel AtkActionIface
public static final synchronized native int long gtk widget get toplevel int long widget public static final synchronized native void memmove Atk Action Iface dest int long src public static final synchronized native void memmove Atk Component Iface dest int long src  gtk_widget_get_toplevel AtkActionIface AtkComponentIface
public static final synchronized native void memmove Atk Action Iface dest int long src public static final synchronized native void memmove Atk Component Iface dest int long src public static final synchronized native void memmove Atk Hypertext Iface dest int long src  AtkActionIface AtkComponentIface AtkHypertextIface
public static final synchronized native void memmove Atk Component Iface dest int long src public static final synchronized native void memmove Atk Hypertext Iface dest int long src public static final synchronized native void memmove Atk Object Class dest int long src  AtkComponentIface AtkHypertextIface AtkObjectClass
public static final synchronized native void memmove Atk Hypertext Iface dest int long src public static final synchronized native void memmove Atk Object Class dest int long src public static final synchronized native void memmove Atk Object Factory Class dest int long src  AtkHypertextIface AtkObjectClass AtkObjectFactoryClass
public static final synchronized native void memmove Atk Object Class dest int long src public static final synchronized native void memmove Atk Object Factory Class dest int long src public static final synchronized native void memmove Atk Selection Iface dest int long src  AtkObjectClass AtkObjectFactoryClass AtkSelectionIface
public static final synchronized native void memmove Atk Object Factory Class dest int long src public static final synchronized native void memmove Atk Selection Iface dest int long src public static final synchronized native void memmove Atk Text Iface dest int long src  AtkObjectFactoryClass AtkSelectionIface AtkTextIface
public static final synchronized native void memmove Atk Selection Iface dest int long src public static final synchronized native void memmove Atk Text Iface dest int long src public static final synchronized native void memmove Gtk Accessible dest int long src  AtkSelectionIface AtkTextIface GtkAccessible
public static final synchronized native void memmove Atk Text Iface dest int long src public static final synchronized native void memmove Gtk Accessible dest int long src public static final synchronized native void memmove G Object Class dest int long src  AtkTextIface GtkAccessible GObjectClass
public static final synchronized native void memmove Gtk Accessible dest int long src public static final synchronized native void memmove G Object Class dest int long src public static final synchronized native void memmove G Type Query dest int long src int long size  GtkAccessible GObjectClass GTypeQuery
public static final synchronized native void memmove G Object Class dest int long src public static final synchronized native void memmove G Type Query dest int long src int long size public static final synchronized native void memmove int long dest Atk Action Iface src  GObjectClass GTypeQuery AtkActionIface
public static final synchronized native void memmove G Type Query dest int long src int long size public static final synchronized native void memmove int long dest Atk Action Iface src public static final synchronized native void memmove int long dest Atk Component Iface src  GTypeQuery AtkActionIface AtkComponentIface
public static final synchronized native void memmove int long dest Atk Action Iface src public static final synchronized native void memmove int long dest Atk Component Iface src public static final synchronized native void memmove int long dest Atk Hypertext Iface src  AtkActionIface AtkComponentIface AtkHypertextIface
public static final synchronized native void memmove int long dest Atk Component Iface src public static final synchronized native void memmove int long dest Atk Hypertext Iface src public static final synchronized native void memmove int long dest Atk Object Class src  AtkComponentIface AtkHypertextIface AtkObjectClass
public static final synchronized native void memmove int long dest Atk Hypertext Iface src public static final synchronized native void memmove int long dest Atk Object Class src public static final synchronized native void memmove int long dest Atk Object Factory Class src  AtkHypertextIface AtkObjectClass AtkObjectFactoryClass
public static final synchronized native void memmove int long dest Atk Object Class src public static final synchronized native void memmove int long dest Atk Object Factory Class src public static final synchronized native void memmove int long dest Atk Selection Iface src  AtkObjectClass AtkObjectFactoryClass AtkSelectionIface
public static final synchronized native void memmove int long dest Atk Object Factory Class src public static final synchronized native void memmove int long dest Atk Selection Iface src public static final synchronized native void memmove int long dest Atk Text Iface src  AtkObjectFactoryClass AtkSelectionIface AtkTextIface
public static final synchronized native void memmove int long dest Atk Selection Iface src public static final synchronized native void memmove int long dest Atk Text Iface src public static final synchronized native void memmove int long dest G Interface Info src int size  AtkSelectionIface AtkTextIface GInterfaceInfo
public static final synchronized native void memmove int long dest Atk Text Iface src public static final synchronized native void memmove int long dest G Interface Info src int size public static final synchronized native void memmove int long dest G Object Class src  AtkTextIface GInterfaceInfo GObjectClass
public static final synchronized native void memmove int long dest G Interface Info src int size public static final synchronized native void memmove int long dest G Object Class src public static final synchronized native void memmove int long dest G Type Info src int size  GInterfaceInfo GObjectClass GTypeInfo

public int long value public LONG int long value this value value 
public boolean equals Object object if object this return true if object instanceof LONG return false LONG obj LONG object return obj value this value 
public int hash Code return int 64 value  hashCode

protected static byte signal String name int length name length char chars new char length name get Chars 0 length chars 0 byte buffer new byte length 1 for int i 0 i length i buffer i byte chars i return buffer  getChars
64 bit public static final int PTR SIZEOF PTR sizeof public static final synchronized native int PTR sizeof  PTR_SIZEOF PTR_sizeof PTR_sizeof
public static final int PTR SIZEOF PTR sizeof public static final synchronized native int PTR sizeof public static final synchronized native int GdkColor sizeof  PTR_SIZEOF PTR_sizeof PTR_sizeof GdkColor_sizeof
public static final synchronized native int PTR sizeof public static final synchronized native int GdkColor sizeof public static final synchronized native int GdkDragContext sizeof  PTR_sizeof GdkColor_sizeof GdkDragContext_sizeof
public static final synchronized native int GdkColor sizeof public static final synchronized native int GdkDragContext sizeof public static final synchronized native int GdkEvent sizeof  GdkColor_sizeof GdkDragContext_sizeof GdkEvent_sizeof
public static final synchronized native int GdkDragContext sizeof public static final synchronized native int GdkEvent sizeof public static final synchronized native int GdkEventButton sizeof  GdkDragContext_sizeof GdkEvent_sizeof GdkEventButton_sizeof
public static final synchronized native int GdkEvent sizeof public static final synchronized native int GdkEventButton sizeof public static final synchronized native int GdkEventCrossing sizeof  GdkEvent_sizeof GdkEventButton_sizeof GdkEventCrossing_sizeof
public static final synchronized native int GdkEventButton sizeof public static final synchronized native int GdkEventCrossing sizeof public static final synchronized native int GdkEventExpose sizeof  GdkEventButton_sizeof GdkEventCrossing_sizeof GdkEventExpose_sizeof
public static final synchronized native int GdkEventCrossing sizeof public static final synchronized native int GdkEventExpose sizeof public static final synchronized native int GdkEventFocus sizeof  GdkEventCrossing_sizeof GdkEventExpose_sizeof GdkEventFocus_sizeof
public static final synchronized native int GdkEventExpose sizeof public static final synchronized native int GdkEventFocus sizeof public static final synchronized native int GdkEventKey sizeof  GdkEventExpose_sizeof GdkEventFocus_sizeof GdkEventKey_sizeof
public static final synchronized native int GdkEventFocus sizeof public static final synchronized native int GdkEventKey sizeof public static final synchronized native int GdkEventMotion sizeof  GdkEventFocus_sizeof GdkEventKey_sizeof GdkEventMotion_sizeof
public static final synchronized native int GdkEventKey sizeof public static final synchronized native int GdkEventMotion sizeof public static final synchronized native int GdkEventVisibility sizeof  GdkEventKey_sizeof GdkEventMotion_sizeof GdkEventVisibility_sizeof
public static final synchronized native int GdkEventMotion sizeof public static final synchronized native int GdkEventVisibility sizeof public static final synchronized native int GdkEventWindowState sizeof  GdkEventMotion_sizeof GdkEventVisibility_sizeof GdkEventWindowState_sizeof
public static final synchronized native int GdkEventVisibility sizeof public static final synchronized native int GdkEventWindowState sizeof public static final synchronized native int GdkGCValues sizeof  GdkEventVisibility_sizeof GdkEventWindowState_sizeof GdkGCValues_sizeof
public static final synchronized native int GdkEventWindowState sizeof public static final synchronized native int GdkGCValues sizeof public static final synchronized native int GdkImage sizeof  GdkEventWindowState_sizeof GdkGCValues_sizeof GdkImage_sizeof
public static final synchronized native int GdkGCValues sizeof public static final synchronized native int GdkImage sizeof public static final synchronized native int GdkRectangle sizeof  GdkGCValues_sizeof GdkImage_sizeof GdkRectangle_sizeof
public static final synchronized native int GdkImage sizeof public static final synchronized native int GdkRectangle sizeof public static final synchronized native int GdkVisual sizeof  GdkImage_sizeof GdkRectangle_sizeof GdkVisual_sizeof
public static final synchronized native int GdkRectangle sizeof public static final synchronized native int GdkVisual sizeof public static final synchronized native int GdkWindowAttr sizeof  GdkRectangle_sizeof GdkVisual_sizeof GdkWindowAttr_sizeof
public static final synchronized native int GdkVisual sizeof public static final synchronized native int GdkWindowAttr sizeof public static final synchronized native int GtkAdjustment sizeof  GdkVisual_sizeof GdkWindowAttr_sizeof GtkAdjustment_sizeof
public static final synchronized native int GdkWindowAttr sizeof public static final synchronized native int GtkAdjustment sizeof public static final synchronized native int GtkAllocation sizeof  GdkWindowAttr_sizeof GtkAdjustment_sizeof GtkAllocation_sizeof
public static final synchronized native int GtkAdjustment sizeof public static final synchronized native int GtkAllocation sizeof public static final synchronized native int GtkColorSelectionDialog sizeof  GtkAdjustment_sizeof GtkAllocation_sizeof GtkColorSelectionDialog_sizeof
public static final synchronized native int GtkAllocation sizeof public static final synchronized native int GtkColorSelectionDialog sizeof public static final synchronized native int GtkCombo sizeof  GtkAllocation_sizeof GtkColorSelectionDialog_sizeof GtkCombo_sizeof
public static final synchronized native int GtkColorSelectionDialog sizeof public static final synchronized native int GtkCombo sizeof public static final synchronized native int GtkFileSelection sizeof  GtkColorSelectionDialog_sizeof GtkCombo_sizeof GtkFileSelection_sizeof
public static final synchronized native int GtkCombo sizeof public static final synchronized native int GtkFileSelection sizeof public static final synchronized native int GtkFixed sizeof  GtkCombo_sizeof GtkFileSelection_sizeof GtkFixed_sizeof
public static final synchronized native int GtkFileSelection sizeof public static final synchronized native int GtkFixed sizeof public static final synchronized native int GtkRequisition sizeof  GtkFileSelection_sizeof GtkFixed_sizeof GtkRequisition_sizeof
public static final synchronized native int GtkFixed sizeof public static final synchronized native int GtkRequisition sizeof public static final synchronized native int GtkSelectionData sizeof  GtkFixed_sizeof GtkRequisition_sizeof GtkSelectionData_sizeof
public static final synchronized native int GtkRequisition sizeof public static final synchronized native int GtkSelectionData sizeof public static final synchronized native int GtkTargetEntry sizeof  GtkRequisition_sizeof GtkSelectionData_sizeof GtkTargetEntry_sizeof
public static final synchronized native int GtkSelectionData sizeof public static final synchronized native int GtkTargetEntry sizeof public static final synchronized native int GtkTargetPair sizeof  GtkSelectionData_sizeof GtkTargetEntry_sizeof GtkTargetPair_sizeof
public static final synchronized native int GtkTargetEntry sizeof public static final synchronized native int GtkTargetPair sizeof public static final synchronized native int GtkTextIter sizeof  GtkTargetEntry_sizeof GtkTargetPair_sizeof GtkTextIter_sizeof
public static final synchronized native int GtkTargetPair sizeof public static final synchronized native int GtkTextIter sizeof public static final synchronized native int GtkTreeIter sizeof  GtkTargetPair_sizeof GtkTextIter_sizeof GtkTreeIter_sizeof
public static final synchronized native int GtkTextIter sizeof public static final synchronized native int GtkTreeIter sizeof public static final synchronized native int PangoAttribute sizeof  GtkTextIter_sizeof GtkTreeIter_sizeof PangoAttribute_sizeof
public static final synchronized native int GtkTreeIter sizeof public static final synchronized native int PangoAttribute sizeof public static final synchronized native int PangoItem sizeof  GtkTreeIter_sizeof PangoAttribute_sizeof PangoItem_sizeof
public static final synchronized native int PangoAttribute sizeof public static final synchronized native int PangoItem sizeof public static final synchronized native int PangoLayoutLine sizeof  PangoAttribute_sizeof PangoItem_sizeof PangoLayoutLine_sizeof
public static final synchronized native int PangoItem sizeof public static final synchronized native int PangoLayoutLine sizeof public static final synchronized native int PangoLayoutRun sizeof  PangoItem_sizeof PangoLayoutLine_sizeof PangoLayoutRun_sizeof
public static final synchronized native int PangoLayoutLine sizeof public static final synchronized native int PangoLayoutRun sizeof public static final synchronized native int PangoLogAttr sizeof  PangoLayoutLine_sizeof PangoLayoutRun_sizeof PangoLogAttr_sizeof
public static final synchronized native int PangoLayoutRun sizeof public static final synchronized native int PangoLogAttr sizeof public static final synchronized native int PangoRectangle sizeof  PangoLayoutRun_sizeof PangoLogAttr_sizeof PangoRectangle_sizeof
public static final synchronized native int PangoLogAttr sizeof public static final synchronized native int PangoRectangle sizeof public static final synchronized native int XAnyEvent sizeof  PangoLogAttr_sizeof PangoRectangle_sizeof XAnyEvent_sizeof
public static final synchronized native int PangoRectangle sizeof public static final synchronized native int XAnyEvent sizeof public static final synchronized native int XClientMessageEvent sizeof  PangoRectangle_sizeof XAnyEvent_sizeof XClientMessageEvent_sizeof
public static final synchronized native int XAnyEvent sizeof public static final synchronized native int XClientMessageEvent sizeof public static final synchronized native int XEvent sizeof  XAnyEvent_sizeof XClientMessageEvent_sizeof XEvent_sizeof
public static final synchronized native int XClientMessageEvent sizeof public static final synchronized native int XEvent sizeof public static final synchronized native int XCrossingEvent sizeof  XClientMessageEvent_sizeof XEvent_sizeof XCrossingEvent_sizeof
public static final synchronized native int XEvent sizeof public static final synchronized native int XCrossingEvent sizeof public static final synchronized native int XExposeEvent sizeof  XEvent_sizeof XCrossingEvent_sizeof XExposeEvent_sizeof
public static final synchronized native int XCrossingEvent sizeof public static final synchronized native int XExposeEvent sizeof public static final synchronized native int XFocusChangeEvent sizeof  XCrossingEvent_sizeof XExposeEvent_sizeof XFocusChangeEvent_sizeof
public static final synchronized native int XExposeEvent sizeof public static final synchronized native int XFocusChangeEvent sizeof public static final synchronized native int XVisibilityEvent sizeof  XExposeEvent_sizeof XFocusChangeEvent_sizeof XVisibilityEvent_sizeof
public static final synchronized native int XFocusChangeEvent sizeof public static final synchronized native int XVisibilityEvent sizeof public static final synchronized native int XWindowChanges sizeof  XFocusChangeEvent_sizeof XVisibilityEvent_sizeof XWindowChanges_sizeof
public static final synchronized native int XVisibilityEvent sizeof public static final synchronized native int XWindowChanges sizeof public static final native int strlen int long str  XVisibilityEvent_sizeof XWindowChanges_sizeof
public static final native int strlen int long str Object private fields accessors public static final synchronized native int GTK WIDGET HEIGHT int long widget  GTK_WIDGET_HEIGHT
Object private fields accessors public static final synchronized native int GTK WIDGET HEIGHT int long widget public static final synchronized native int GTK WIDGET WIDTH int long widget  GTK_WIDGET_HEIGHT GTK_WIDGET_WIDTH
public static final synchronized native int GTK WIDGET HEIGHT int long widget public static final synchronized native int GTK WIDGET WIDTH int long widget public static final synchronized native int long GTK WIDGET WINDOW int long widget  GTK_WIDGET_HEIGHT GTK_WIDGET_WIDTH GTK_WIDGET_WINDOW
public static final synchronized native int GTK WIDGET WIDTH int long widget public static final synchronized native int long GTK WIDGET WINDOW int long widget public static final synchronized native int GTK WIDGET X int long widget  GTK_WIDGET_WIDTH GTK_WIDGET_WINDOW GTK_WIDGET_X
public static final synchronized native int long GTK WIDGET WINDOW int long widget public static final synchronized native int GTK WIDGET X int long widget public static final synchronized native int GTK WIDGET Y int long widget  GTK_WIDGET_WINDOW GTK_WIDGET_X GTK_WIDGET_Y
public static final synchronized native int GTK WIDGET X int long widget public static final synchronized native int GTK WIDGET Y int long widget public static final synchronized native int long GTK SCROLLED WINDOW HSCROLLBAR int long widget  GTK_WIDGET_X GTK_WIDGET_Y GTK_SCROLLED_WINDOW_HSCROLLBAR
public static final synchronized native int GTK WIDGET Y int long widget public static final synchronized native int long GTK SCROLLED WINDOW HSCROLLBAR int long widget public static final synchronized native int long GTK SCROLLED WINDOW VSCROLLBAR int long widget  GTK_WIDGET_Y GTK_SCROLLED_WINDOW_HSCROLLBAR GTK_SCROLLED_WINDOW_VSCROLLBAR
public static final synchronized native int long GTK SCROLLED WINDOW HSCROLLBAR int long widget public static final synchronized native int long GTK SCROLLED WINDOW VSCROLLBAR int long widget public static final synchronized native int GTK SCROLLED WINDOW SCROLLBAR SPACING int long widget  GTK_SCROLLED_WINDOW_HSCROLLBAR GTK_SCROLLED_WINDOW_VSCROLLBAR GTK_SCROLLED_WINDOW_SCROLLBAR_SPACING
public static final synchronized native int long GTK SCROLLED WINDOW VSCROLLBAR int long widget public static final synchronized native int GTK SCROLLED WINDOW SCROLLBAR SPACING int long widget public static final synchronized native void GTK ACCEL LABEL SET ACCEL STRING int long acce label int long string  GTK_SCROLLED_WINDOW_VSCROLLBAR GTK_SCROLLED_WINDOW_SCROLLBAR_SPACING GTK_ACCEL_LABEL_SET_ACCEL_STRING acce_label
public static final synchronized native int GTK SCROLLED WINDOW SCROLLBAR SPACING int long widget public static final synchronized native void GTK ACCEL LABEL SET ACCEL STRING int long acce label int long string public static final synchronized native int long GTK ACCEL LABEL GET ACCEL STRING int long acce label  GTK_SCROLLED_WINDOW_SCROLLBAR_SPACING GTK_ACCEL_LABEL_SET_ACCEL_STRING acce_label GTK_ACCEL_LABEL_GET_ACCEL_STRING acce_label
public static final synchronized native void GTK ACCEL LABEL SET ACCEL STRING int long acce label int long string public static final synchronized native int long GTK ACCEL LABEL GET ACCEL STRING int long acce label public static final synchronized native int long GTK ENTRY IM CONTEXT int long widget  GTK_ACCEL_LABEL_SET_ACCEL_STRING acce_label GTK_ACCEL_LABEL_GET_ACCEL_STRING acce_label GTK_ENTRY_IM_CONTEXT
public static final synchronized native int long GTK ACCEL LABEL GET ACCEL STRING int long acce label public static final synchronized native int long GTK ENTRY IM CONTEXT int long widget public static final synchronized native int long GTK TEXTVIEW IM CONTEXT int long widget  GTK_ACCEL_LABEL_GET_ACCEL_STRING acce_label GTK_ENTRY_IM_CONTEXT GTK_TEXTVIEW_IM_CONTEXT
public static final int Visibility Fully Obscured 2 public static final int Visibility Notify 15 public static final native boolean GDK WINDOWING X11  VisibilityFullyObscured VisibilityNotify GDK_WINDOWING_X11
public static final int Revert To Parent 2 public static final int SYSTEM TRAY REQUEST DOCK 0 public static final synchronized native boolean X Check Mask Event int long display int long event mask int long event return  RevertToParent SYSTEM_TRAY_REQUEST_DOCK XCheckMaskEvent event_mask event_return
public static final int SYSTEM TRAY REQUEST DOCK 0 public static final synchronized native boolean X Check Mask Event int long display int long event mask int long event return public static final synchronized native boolean X Check Window Event int long display int long window int long event mask int long event return  SYSTEM_TRAY_REQUEST_DOCK XCheckMaskEvent event_mask event_return XCheckWindowEvent event_mask event_return
public static final synchronized native boolean X Check Mask Event int long display int long event mask int long event return public static final synchronized native boolean X Check Window Event int long display int long window int long event mask int long event return public static final synchronized native boolean X Check If Event int long display int long event return int long predicate int long arg  XCheckMaskEvent event_mask event_return XCheckWindowEvent event_mask event_return XCheckIfEvent event_return
public static final synchronized native boolean X Check Window Event int long display int long window int long event mask int long event return public static final synchronized native boolean X Check If Event int long display int long event return int long predicate int long arg public static final synchronized native int X Default Screen int long display  XCheckWindowEvent event_mask event_return XCheckIfEvent event_return XDefaultScreen
public static final synchronized native boolean X Check If Event int long display int long event return int long predicate int long arg public static final synchronized native int X Default Screen int long display public static final synchronized native int long X Get Selection Owner int long display int long selection  XCheckIfEvent event_return XDefaultScreen XGetSelectionOwner
public static final synchronized native int X Default Screen int long display public static final synchronized native int long X Get Selection Owner int long display int long selection public static final synchronized native int X Query Tree int long display int long w int long root return int long parent return int long children return int nchildren return  XDefaultScreen XGetSelectionOwner XQueryTree root_return parent_return children_return nchildren_return
public static final synchronized native int long X Get Selection Owner int long display int long selection public static final synchronized native int X Query Tree int long display int long w int long root return int long parent return int long children return int nchildren return public static final synchronized native int X Keysym To Keycode int long display int long keysym  XGetSelectionOwner XQueryTree root_return parent_return children_return nchildren_return XKeysymToKeycode
public static final synchronized native int X Query Tree int long display int long w int long root return int long parent return int long children return int nchildren return public static final synchronized native int X Keysym To Keycode int long display int long keysym public static final synchronized native int X ReconfigureWM Window int long display int long window int screen int value Mask X Window Changes values  XQueryTree root_return parent_return children_return nchildren_return XKeysymToKeycode XReconfigureWMWindow valueMask XWindowChanges
public static final synchronized native int X Keysym To Keycode int long display int long keysym public static final synchronized native int X ReconfigureWM Window int long display int long window int screen int value Mask X Window Changes values public static final synchronized native int X Send Event int long display int long w boolean propogate int long event mask int long event send  XKeysymToKeycode XReconfigureWMWindow valueMask XWindowChanges XSendEvent event_mask event_send
public static final synchronized native int X ReconfigureWM Window int long display int long window int screen int value Mask X Window Changes values public static final synchronized native int X Send Event int long display int long w boolean propogate int long event mask int long event send public static final synchronized native int X Set Input Focus int long display int long window int revert int time  XReconfigureWMWindow valueMask XWindowChanges XSendEvent event_mask event_send XSetInputFocus
public static final synchronized native int X Send Event int long display int long w boolean propogate int long event mask int long event send public static final synchronized native int X Set Input Focus int long display int long window int revert int time public static final synchronized native int long X Synchronize int long display boolean onoff  XSendEvent event_mask event_send XSetInputFocus XSynchronize
public static final synchronized native int X Set Input Focus int long display int long window int revert int time public static final synchronized native int long X Synchronize int long display boolean onoff public static final synchronized native void X Test Fake Button Event int long display int button boolean is press int long delay  XSetInputFocus XSynchronize XTestFakeButtonEvent is_press
public static final synchronized native int long X Synchronize int long display boolean onoff public static final synchronized native void X Test Fake Button Event int long display int button boolean is press int long delay public static final synchronized native void X Test Fake Key Event int long display int keycode boolean is press int long delay  XSynchronize XTestFakeButtonEvent is_press XTestFakeKeyEvent is_press
public static final synchronized native void X Test Fake Button Event int long display int button boolean is press int long delay public static final synchronized native void X Test Fake Key Event int long display int keycode boolean is press int long delay public static final synchronized native void X Test Fake Motion Event int long display int screen number int x int y int long delay  XTestFakeButtonEvent is_press XTestFakeKeyEvent is_press XTestFakeMotionEvent screen_number
public static final synchronized native void X Test Fake Key Event int long display int keycode boolean is press int long delay public static final synchronized native void X Test Fake Motion Event int long display int screen number int x int y int long delay public static final synchronized native int long gdk x11 atom to xatom int long atom  XTestFakeKeyEvent is_press XTestFakeMotionEvent screen_number gdk_x11_atom_to_xatom
public static final synchronized native void X Test Fake Motion Event int long display int screen number int x int y int long delay public static final synchronized native int long gdk x11 atom to xatom int long atom public static final synchronized native int long gdk x11 drawable get xdisplay int long drawable  XTestFakeMotionEvent screen_number gdk_x11_atom_to_xatom gdk_x11_drawable_get_xdisplay
public static final synchronized native int long gdk x11 atom to xatom int long atom public static final synchronized native int long gdk x11 drawable get xdisplay int long drawable public static final synchronized native int long gdk x11 drawable get xid int long drawable  gdk_x11_atom_to_xatom gdk_x11_drawable_get_xdisplay gdk_x11_drawable_get_xid
public static final synchronized native int long gdk x11 drawable get xdisplay int long drawable public static final synchronized native int long gdk x11 drawable get xid int long drawable public static final synchronized native int long gdk window lookup int long xid  gdk_x11_drawable_get_xdisplay gdk_x11_drawable_get_xid gdk_window_lookup
public static final synchronized native int long gdk x11 drawable get xid int long drawable public static final synchronized native int long gdk window lookup int long xid public static final synchronized native void gdk window add filter int long window int long function int long data  gdk_x11_drawable_get_xid gdk_window_lookup gdk_window_add_filter
public static final synchronized native int long gdk window lookup int long xid public static final synchronized native void gdk window add filter int long window int long function int long data public static final native void memmove int long dest X Client Message Event src int long size  gdk_window_lookup gdk_window_add_filter XClientMessageEvent
public static final synchronized native void gdk window add filter int long window int long function int long data public static final native void memmove int long dest X Client Message Event src int long size public static final native void memmove int long dest X Crossing Event src int long size  gdk_window_add_filter XClientMessageEvent XCrossingEvent
public static final native void memmove int long dest X Client Message Event src int long size public static final native void memmove int long dest X Crossing Event src int long size public static final native void memmove int long dest X Expose Event src int long size  XClientMessageEvent XCrossingEvent XExposeEvent
public static final native void memmove int long dest X Crossing Event src int long size public static final native void memmove int long dest X Expose Event src int long size public static final native void memmove int long dest X Focus Change Event src int long size  XCrossingEvent XExposeEvent XFocusChangeEvent
public static final native void memmove int long dest X Expose Event src int long size public static final native void memmove int long dest X Focus Change Event src int long size public static final native void memmove X Crossing Event dest int long src int long size  XExposeEvent XFocusChangeEvent XCrossingEvent
public static final native void memmove int long dest X Focus Change Event src int long size public static final native void memmove X Crossing Event dest int long src int long size public static final native void memmove X Expose Event dest int long src int long size  XFocusChangeEvent XCrossingEvent XExposeEvent
public static final native void memmove X Crossing Event dest int long src int long size public static final native void memmove X Expose Event dest int long src int long size public static final native void memmove X Focus Change Event dest int long src int long size  XCrossingEvent XExposeEvent XFocusChangeEvent
public static final native void memmove X Expose Event dest int long src int long size public static final native void memmove X Focus Change Event dest int long src int long size public static final native void memmove X Visibility Event dest int long src int long size  XExposeEvent XFocusChangeEvent XVisibilityEvent
public static final native void memmove X Visibility Event dest int long src int long size Native methods public static final synchronized native int long GDK DISPLAY  XVisibilityEvent GDK_DISPLAY
Native methods public static final synchronized native int long GDK DISPLAY public static final synchronized native int long GDK ROOT PARENT  GDK_DISPLAY GDK_ROOT_PARENT
public static final synchronized native int long GDK DISPLAY public static final synchronized native int long GDK ROOT PARENT public static final synchronized native int long GDK TYPE COLOR  GDK_DISPLAY GDK_ROOT_PARENT GDK_TYPE_COLOR
public static final synchronized native int long GDK ROOT PARENT public static final synchronized native int long GDK TYPE COLOR public static final synchronized native int long GDK TYPE PIXBUF  GDK_ROOT_PARENT GDK_TYPE_COLOR GDK_TYPE_PIXBUF
public static final synchronized native int long GDK TYPE COLOR public static final synchronized native int long GDK TYPE PIXBUF public static final synchronized native boolean GTK IS BUTTON int long obj  GDK_TYPE_COLOR GDK_TYPE_PIXBUF GTK_IS_BUTTON
public static final synchronized native int long GDK TYPE PIXBUF public static final synchronized native boolean GTK IS BUTTON int long obj public static final synchronized native boolean GTK IS CELL RENDERER PIXBUF int long obj  GDK_TYPE_PIXBUF GTK_IS_BUTTON GTK_IS_CELL_RENDERER_PIXBUF
public static final synchronized native boolean GTK IS BUTTON int long obj public static final synchronized native boolean GTK IS CELL RENDERER PIXBUF int long obj public static final synchronized native boolean GTK IS IMAGE MENU ITEM int long obj  GTK_IS_BUTTON GTK_IS_CELL_RENDERER_PIXBUF GTK_IS_IMAGE_MENU_ITEM
public static final synchronized native boolean GTK IS CELL RENDERER PIXBUF int long obj public static final synchronized native boolean GTK IS IMAGE MENU ITEM int long obj public static final synchronized native int GTK WIDGET FLAGS int long wid  GTK_IS_CELL_RENDERER_PIXBUF GTK_IS_IMAGE_MENU_ITEM GTK_WIDGET_FLAGS
public static final synchronized native boolean GTK IS IMAGE MENU ITEM int long obj public static final synchronized native int GTK WIDGET FLAGS int long wid public static final synchronized native boolean GTK WIDGET HAS DEFAULT int long wid  GTK_IS_IMAGE_MENU_ITEM GTK_WIDGET_FLAGS GTK_WIDGET_HAS_DEFAULT
public static final synchronized native int GTK WIDGET FLAGS int long wid public static final synchronized native boolean GTK WIDGET HAS DEFAULT int long wid public static final synchronized native boolean GTK WIDGET HAS FOCUS int long wid  GTK_WIDGET_FLAGS GTK_WIDGET_HAS_DEFAULT GTK_WIDGET_HAS_FOCUS
public static final synchronized native boolean GTK WIDGET HAS DEFAULT int long wid public static final synchronized native boolean GTK WIDGET HAS FOCUS int long wid public static final synchronized native boolean GTK WIDGET IS SENSITIVE int long wid  GTK_WIDGET_HAS_DEFAULT GTK_WIDGET_HAS_FOCUS GTK_WIDGET_IS_SENSITIVE
public static final synchronized native boolean GTK WIDGET HAS FOCUS int long wid public static final synchronized native boolean GTK WIDGET IS SENSITIVE int long wid public static final synchronized native boolean GTK WIDGET MAPPED int long wid  GTK_WIDGET_HAS_FOCUS GTK_WIDGET_IS_SENSITIVE GTK_WIDGET_MAPPED
public static final synchronized native boolean GTK WIDGET IS SENSITIVE int long wid public static final synchronized native boolean GTK WIDGET MAPPED int long wid public static final synchronized native boolean GTK WIDGET SENSITIVE int long wid  GTK_WIDGET_IS_SENSITIVE GTK_WIDGET_MAPPED GTK_WIDGET_SENSITIVE
public static final synchronized native boolean GTK WIDGET MAPPED int long wid public static final synchronized native boolean GTK WIDGET SENSITIVE int long wid public static final synchronized native void GTK WIDGET SET FLAGS int long wid int flag  GTK_WIDGET_MAPPED GTK_WIDGET_SENSITIVE GTK_WIDGET_SET_FLAGS
public static final synchronized native boolean GTK WIDGET SENSITIVE int long wid public static final synchronized native void GTK WIDGET SET FLAGS int long wid int flag public static final synchronized native void GTK WIDGET UNSET FLAGS int long wid int flag  GTK_WIDGET_SENSITIVE GTK_WIDGET_SET_FLAGS GTK_WIDGET_UNSET_FLAGS
public static final synchronized native void GTK WIDGET SET FLAGS int long wid int flag public static final synchronized native void GTK WIDGET UNSET FLAGS int long wid int flag public static final synchronized native boolean GTK WIDGET VISIBLE int long wid  GTK_WIDGET_SET_FLAGS GTK_WIDGET_UNSET_FLAGS GTK_WIDGET_VISIBLE
public static final synchronized native void GTK WIDGET UNSET FLAGS int long wid int flag public static final synchronized native boolean GTK WIDGET VISIBLE int long wid public static final synchronized native int long G TYPE BOOLEAN  GTK_WIDGET_UNSET_FLAGS GTK_WIDGET_VISIBLE G_TYPE_BOOLEAN
public static final synchronized native boolean GTK WIDGET VISIBLE int long wid public static final synchronized native int long G TYPE BOOLEAN public static final synchronized native int long G TYPE INT  GTK_WIDGET_VISIBLE G_TYPE_BOOLEAN G_TYPE_INT
public static final synchronized native int long G TYPE BOOLEAN public static final synchronized native int long G TYPE INT public static final synchronized native int long G TYPE STRING  G_TYPE_BOOLEAN G_TYPE_INT G_TYPE_STRING
public static final synchronized native int long G TYPE INT public static final synchronized native int long G TYPE STRING public static final synchronized native int PANGO PIXELS int dimension  G_TYPE_INT G_TYPE_STRING PANGO_PIXELS
public static final synchronized native int long G TYPE STRING public static final synchronized native int PANGO PIXELS int dimension public static final synchronized native int long PANGO TYPE FONT DESCRIPTION  G_TYPE_STRING PANGO_PIXELS PANGO_TYPE_FONT_DESCRIPTION
public static final synchronized native int PANGO PIXELS int dimension public static final synchronized native int long PANGO TYPE FONT DESCRIPTION public static final synchronized native int long g filename to utf8 int long opsysstring int long len int long bytes read int long bytes written int long error  PANGO_PIXELS PANGO_TYPE_FONT_DESCRIPTION g_filename_to_utf8 bytes_read bytes_written
public static final synchronized native int long PANGO TYPE FONT DESCRIPTION public static final synchronized native int long g filename to utf8 int long opsysstring int long len int long bytes read int long bytes written int long error public static final synchronized native int long g filename to uri int long filename int long hostname int long error  PANGO_TYPE_FONT_DESCRIPTION g_filename_to_utf8 bytes_read bytes_written g_filename_to_uri
public static final synchronized native int long g filename to utf8 int long opsysstring int long len int long bytes read int long bytes written int long error public static final synchronized native int long g filename to uri int long filename int long hostname int long error public static final synchronized native int long g filename from utf8 int long opsysstring int long len int long bytes read int long bytes written int long error  g_filename_to_utf8 bytes_read bytes_written g_filename_to_uri g_filename_from_utf8 bytes_read bytes_written
public static final synchronized native int long g filename to uri int long filename int long hostname int long error public static final synchronized native int long g filename from utf8 int long opsysstring int long len int long bytes read int long bytes written int long error public static final synchronized native int long g filename from uri int long uri int long hostname int long error  g_filename_to_uri g_filename_from_utf8 bytes_read bytes_written g_filename_from_uri
public static final synchronized native int long g filename from utf8 int long opsysstring int long len int long bytes read int long bytes written int long error public static final synchronized native int long g filename from uri int long uri int long hostname int long error public static final synchronized native void g free int long mem  g_filename_from_utf8 bytes_read bytes_written g_filename_from_uri g_free
public static final synchronized native int long g filename from uri int long uri int long hostname int long error public static final synchronized native void g free int long mem public static final synchronized native int long g list append int long list int long data  g_filename_from_uri g_free g_list_append
public static final synchronized native void g free int long mem public static final synchronized native int long g list append int long list int long data public static final synchronized native int long g list data int long list  g_free g_list_append g_list_data
public static final synchronized native int long g list append int long list int long data public static final synchronized native int long g list data int long list public static final synchronized native void g list free int long list  g_list_append g_list_data g_list_free
public static final synchronized native int long g list data int long list public static final synchronized native void g list free int long list public static final synchronized native void g list free 1 int long list  g_list_data g_list_free g_list_free_1
public static final synchronized native void g list free int long list public static final synchronized native void g list free 1 int long list public static final synchronized native int g list length int long list  g_list_free g_list_free_1 g_list_length
public static final synchronized native void g list free 1 int long list public static final synchronized native int g list length int long list public static final synchronized native void g list set next int long list int long llist  g_list_free_1 g_list_length g_list_set_next
public static final synchronized native int g list length int long list public static final synchronized native void g list set next int long list int long llist public static final synchronized native int long g list next int long list  g_list_length g_list_set_next g_list_next
public static final synchronized native void g list set next int long list int long llist public static final synchronized native int long g list next int long list public static final synchronized native int long g list nth int long list int n  g_list_set_next g_list_next g_list_nth
public static final synchronized native int long g list next int long list public static final synchronized native int long g list nth int long list int n public static final synchronized native int long g list nth data int long list int n  g_list_next g_list_nth g_list_nth_data
public static final synchronized native int long g list nth int long list int n public static final synchronized native int long g list nth data int long list int n public static final synchronized native int long g list prepend int long list int long data  g_list_nth g_list_nth_data g_list_prepend
public static final synchronized native int long g list nth data int long list int n public static final synchronized native int long g list prepend int long list int long data public static final synchronized native void g list set previous int long list int long llist  g_list_nth_data g_list_prepend g_list_set_previous
public static final synchronized native int long g list prepend int long list int long data public static final synchronized native void g list set previous int long list int long llist public static final synchronized native int long g list previous int long list  g_list_prepend g_list_set_previous g_list_previous
public static final synchronized native void g list set previous int long list int long llist public static final synchronized native int long g list previous int long list public static final synchronized native int long g list remove link int long list int long link  g_list_set_previous g_list_previous g_list_remove_link
public static final synchronized native int long g list previous int long list public static final synchronized native int long g list remove link int long list int long link public static final synchronized native int long g list reverse int long list  g_list_previous g_list_remove_link g_list_reverse
public static final synchronized native int long g list remove link int long list int long link public static final synchronized native int long g list reverse int long list public static final synchronized native int long g locale from utf8 int long utf8string int long len int long bytes read int long bytes written int long error  g_list_remove_link g_list_reverse g_locale_from_utf8 bytes_read bytes_written
public static final synchronized native int long g list reverse int long list public static final synchronized native int long g locale from utf8 int long utf8string int long len int long bytes read int long bytes written int long error public static final synchronized native int long g locale to utf8 int long opsysstring int long len int long bytes read int long bytes written int long error  g_list_reverse g_locale_from_utf8 bytes_read bytes_written g_locale_to_utf8 bytes_read bytes_written
public static final synchronized native int long g locale from utf8 int long utf8string int long len int long bytes read int long bytes written int long error public static final synchronized native int long g locale to utf8 int long opsysstring int long len int long bytes read int long bytes written int long error public static final synchronized native void g log default handler int long log domain int log levels int long message int long unused data  g_locale_from_utf8 bytes_read bytes_written g_locale_to_utf8 bytes_read bytes_written g_log_default_handler log_domain log_levels unused_data
public static final synchronized native int long g locale to utf8 int long opsysstring int long len int long bytes read int long bytes written int long error public static final synchronized native void g log default handler int long log domain int log levels int long message int long unused data public static final synchronized native void g log remove handler byte log domain int handler id  g_locale_to_utf8 bytes_read bytes_written g_log_default_handler log_domain log_levels unused_data g_log_remove_handler log_domain handler_id
public static final synchronized native void g log default handler int long log domain int log levels int long message int long unused data public static final synchronized native void g log remove handler byte log domain int handler id public static final synchronized native int g log set handler byte log domain int log levels int long log func int long user data  g_log_default_handler log_domain log_levels unused_data g_log_remove_handler log_domain handler_id g_log_set_handler log_domain log_levels log_func user_data
public static final synchronized native void g log remove handler byte log domain int handler id public static final synchronized native int g log set handler byte log domain int log levels int long log func int long user data public static final synchronized native int long g malloc int long size  g_log_remove_handler log_domain handler_id g_log_set_handler log_domain log_levels log_func user_data g_malloc
public static final synchronized native int g log set handler byte log domain int log levels int long log func int long user data public static final synchronized native int long g malloc int long size public static final synchronized native int long g object get qdata int long object int quark  g_log_set_handler log_domain log_levels log_func user_data g_malloc g_object_get_qdata
public static final synchronized native int long g malloc int long size public static final synchronized native int long g object get qdata int long object int quark public static final synchronized native int long g object ref int long object  g_malloc g_object_get_qdata g_object_ref
public static final synchronized native int long g object get qdata int long object int quark public static final synchronized native int long g object ref int long object public static final synchronized native void g object set int long object byte first property name boolean data int terminator  g_object_get_qdata g_object_ref g_object_set first_property_name
public static final synchronized native int long g object ref int long object public static final synchronized native void g object set int long object byte first property name boolean data int terminator public static final synchronized native void g object set int long object byte first property name int data int terminator  g_object_ref g_object_set first_property_name g_object_set first_property_name
public static final synchronized native void g object set int long object byte first property name boolean data int terminator public static final synchronized native void g object set int long object byte first property name int data int terminator public static final synchronized native void g object set int long object byte first property name float data int terminator  g_object_set first_property_name g_object_set first_property_name g_object_set first_property_name
public static final synchronized native void g object set int long object byte first property name int data int terminator public static final synchronized native void g object set int long object byte first property name float data int terminator public static final synchronized native void g object set qdata int long object int quark int long data  g_object_set first_property_name g_object_set first_property_name g_object_set_qdata
public static final synchronized native void g object set int long object byte first property name float data int terminator public static final synchronized native void g object set qdata int long object int quark int long data public static final synchronized native void g object unref int long object  g_object_set first_property_name g_object_set_qdata g_object_unref
public static final synchronized native void g object set qdata int long object int quark int long data public static final synchronized native void g object unref int long object public static final synchronized native int g quark from string byte string  g_object_set_qdata g_object_unref g_quark_from_string
public static final synchronized native void g object unref int long object public static final synchronized native int g quark from string byte string public static final synchronized native int g signal connect int long instance byte detailed signal int long proc int long data  g_object_unref g_quark_from_string g_signal_connect detailed_signal
public static final synchronized native int g quark from string byte string public static final synchronized native int g signal connect int long instance byte detailed signal int long proc int long data public static final synchronized native int g signal connect after int long instance byte detailed signal int long proc int long data  g_quark_from_string g_signal_connect detailed_signal g_signal_connect_after detailed_signal
public static final synchronized native int g signal connect int long instance byte detailed signal int long proc int long data public static final synchronized native int g signal connect after int long instance byte detailed signal int long proc int long data public static final synchronized native void g signal emit by name int long instance byte detailed signal  g_signal_connect detailed_signal g_signal_connect_after detailed_signal g_signal_emit_by_name detailed_signal
public static final synchronized native int g signal connect after int long instance byte detailed signal int long proc int long data public static final synchronized native void g signal emit by name int long instance byte detailed signal public static final synchronized native void g signal emit by name int long instance byte detailed signal int long data  g_signal_connect_after detailed_signal g_signal_emit_by_name detailed_signal g_signal_emit_by_name detailed_signal
public static final synchronized native void g signal emit by name int long instance byte detailed signal public static final synchronized native void g signal emit by name int long instance byte detailed signal int long data public static final synchronized native void g signal emit by name int long instance byte detailed signal int long data1 int long data2  g_signal_emit_by_name detailed_signal g_signal_emit_by_name detailed_signal g_signal_emit_by_name detailed_signal
public static final synchronized native void g signal emit by name int long instance byte detailed signal int long data public static final synchronized native void g signal emit by name int long instance byte detailed signal int long data1 int long data2 public static final synchronized native void g signal emit by name int long instance byte detailed signal byte data  g_signal_emit_by_name detailed_signal g_signal_emit_by_name detailed_signal g_signal_emit_by_name detailed_signal
public static final synchronized native void g signal emit by name int long instance byte detailed signal int long data1 int long data2 public static final synchronized native void g signal emit by name int long instance byte detailed signal byte data public static final synchronized native void g signal handler disconnect int long instance int handler id  g_signal_emit_by_name detailed_signal g_signal_emit_by_name detailed_signal g_signal_handler_disconnect handler_id
public static final synchronized native void g signal emit by name int long instance byte detailed signal byte data public static final synchronized native void g signal handler disconnect int long instance int handler id public static final synchronized native int g signal handlers block matched int long instance int mask int signal id int detail int long closure int long func int long data  g_signal_emit_by_name detailed_signal g_signal_handler_disconnect handler_id g_signal_handlers_block_matched signal_id
public static final synchronized native void g signal handler disconnect int long instance int handler id public static final synchronized native int g signal handlers block matched int long instance int mask int signal id int detail int long closure int long func int long data public static final synchronized native int g signal handlers disconnect matched int long instance int mask int signal id int detail int long closure int long func int long data  g_signal_handler_disconnect handler_id g_signal_handlers_block_matched signal_id g_signal_handlers_disconnect_matched signal_id
public static final synchronized native int g signal handlers block matched int long instance int mask int signal id int detail int long closure int long func int long data public static final synchronized native int g signal handlers disconnect matched int long instance int mask int signal id int detail int long closure int long func int long data public static final synchronized native int g signal handlers unblock matched int long instance int mask int signal id int detail int long closure int long func int long data  g_signal_handlers_block_matched signal_id g_signal_handlers_disconnect_matched signal_id g_signal_handlers_unblock_matched signal_id
public static final synchronized native int g signal handlers disconnect matched int long instance int mask int signal id int detail int long closure int long func int long data public static final synchronized native int g signal handlers unblock matched int long instance int mask int signal id int detail int long closure int long func int long data public static final synchronized native int g signal lookup byte name int long itype  g_signal_handlers_disconnect_matched signal_id g_signal_handlers_unblock_matched signal_id g_signal_lookup
public static final synchronized native int g signal handlers unblock matched int long instance int mask int signal id int detail int long closure int long func int long data public static final synchronized native int g signal lookup byte name int long itype public static final synchronized native void g signal stop emission by name int long instance byte detailed signal  g_signal_handlers_unblock_matched signal_id g_signal_lookup g_signal_stop_emission_by_name detailed_signal
public static final synchronized native int g signal lookup byte name int long itype public static final synchronized native void g signal stop emission by name int long instance byte detailed signal public static final synchronized native int long g slist next int long list  g_signal_lookup g_signal_stop_emission_by_name detailed_signal g_slist_next
public static final synchronized native void g signal stop emission by name int long instance byte detailed signal public static final synchronized native int long g slist next int long list public static final synchronized native int long g slist data int long list  g_signal_stop_emission_by_name detailed_signal g_slist_next g_slist_data
public static final synchronized native int long g slist next int long list public static final synchronized native int long g slist data int long list public static final synchronized native void g strfreev int long string array  g_slist_next g_slist_data g_strfreev string_array
public static final synchronized native int long g slist data int long list public static final synchronized native void g strfreev int long string array public static final synchronized native void g thread init int long vtable  g_slist_data g_strfreev string_array g_thread_init
public static final synchronized native void g strfreev int long string array public static final synchronized native void g thread init int long vtable public static final synchronized native boolean g thread supported  g_strfreev string_array g_thread_init g_thread_supported
public static final synchronized native void g thread init int long vtable public static final synchronized native boolean g thread supported public static final synchronized native int long g utf16 to utf8 char str int long len int long items read int long items written int long error  g_thread_init g_thread_supported g_utf16_to_utf8 items_read items_written
public static final synchronized native boolean g thread supported public static final synchronized native int long g utf16 to utf8 char str int long len int long items read int long items written int long error public static final synchronized native int long g utf8 offset to pointer int long str int long offset  g_thread_supported g_utf16_to_utf8 items_read items_written g_utf8_offset_to_pointer
public static final synchronized native int long g utf16 to utf8 char str int long len int long items read int long items written int long error public static final synchronized native int long g utf8 offset to pointer int long str int long offset public static final synchronized native int long g utf8 pointer to offset int long str int long pos  g_utf16_to_utf8 items_read items_written g_utf8_offset_to_pointer g_utf8_pointer_to_offset
public static final synchronized native int long g utf8 offset to pointer int long str int long offset public static final synchronized native int long g utf8 pointer to offset int long str int long pos public static final synchronized native int long g utf8 strlen int long str int long max  g_utf8_offset_to_pointer g_utf8_pointer_to_offset g_utf8_strlen
public static final synchronized native int long g utf8 pointer to offset int long str int long pos public static final synchronized native int long g utf8 strlen int long str int long max public static final synchronized native int long g utf8 to utf16 byte str int long len int long items read int long items written int long error  g_utf8_pointer_to_offset g_utf8_strlen g_utf8_to_utf16 items_read items_written
public static final synchronized native int long g utf8 strlen int long str int long max public static final synchronized native int long g utf8 to utf16 byte str int long len int long items read int long items written int long error public static final synchronized native int long g utf8 to utf16 int long str int long len int long items read int long items written int long error  g_utf8_strlen g_utf8_to_utf16 items_read items_written g_utf8_to_utf16 items_read items_written
public static final synchronized native int long g utf8 to utf16 byte str int long len int long items read int long items written int long error public static final synchronized native int long g utf8 to utf16 int long str int long len int long items read int long items written int long error public static final synchronized native int long gdk atom intern byte atom name boolean only if exists  g_utf8_to_utf16 items_read items_written g_utf8_to_utf16 items_read items_written gdk_atom_intern atom_name only_if_exists
public static final synchronized native int long g utf8 to utf16 int long str int long len int long items read int long items written int long error public static final synchronized native int long gdk atom intern byte atom name boolean only if exists public static final synchronized native int long gdk atom name int long atom  g_utf8_to_utf16 items_read items_written gdk_atom_intern atom_name only_if_exists gdk_atom_name
public static final synchronized native int long gdk atom intern byte atom name boolean only if exists public static final synchronized native int long gdk atom name int long atom public static final synchronized native void gdk beep  gdk_atom_intern atom_name only_if_exists gdk_atom_name gdk_beep
public static final synchronized native int long gdk atom name int long atom public static final synchronized native void gdk beep public static final synchronized native int long gdk bitmap create from data int long window byte data int width int height  gdk_atom_name gdk_beep gdk_bitmap_create_from_data
public static final synchronized native void gdk beep public static final synchronized native int long gdk bitmap create from data int long window byte data int width int height public static final synchronized native boolean gdk color white int long colormap Gdk Color color  gdk_beep gdk_bitmap_create_from_data gdk_color_white GdkColor
public static final synchronized native int long gdk bitmap create from data int long window byte data int width int height public static final synchronized native boolean gdk color white int long colormap Gdk Color color public static final synchronized native boolean gdk colormap alloc color int long colormap Gdk Color color boolean writeable boolean best match  gdk_bitmap_create_from_data gdk_color_white GdkColor gdk_colormap_alloc_color GdkColor best_match
public static final synchronized native boolean gdk color white int long colormap Gdk Color color public static final synchronized native boolean gdk colormap alloc color int long colormap Gdk Color color boolean writeable boolean best match public static final synchronized native void gdk colormap free colors int long colormap Gdk Color colors int ncolors  gdk_color_white GdkColor gdk_colormap_alloc_color GdkColor best_match gdk_colormap_free_colors GdkColor
public static final synchronized native boolean gdk colormap alloc color int long colormap Gdk Color color boolean writeable boolean best match public static final synchronized native void gdk colormap free colors int long colormap Gdk Color colors int ncolors public static final synchronized native int long gdk colormap get system  gdk_colormap_alloc_color GdkColor best_match gdk_colormap_free_colors GdkColor gdk_colormap_get_system
public static final synchronized native void gdk colormap free colors int long colormap Gdk Color colors int ncolors public static final synchronized native int long gdk colormap get system public static final synchronized native void gdk colormap query color int long colormap int long pixel Gdk Color result  gdk_colormap_free_colors GdkColor gdk_colormap_get_system gdk_colormap_query_color GdkColor
public static final synchronized native int long gdk colormap get system public static final synchronized native void gdk colormap query color int long colormap int long pixel Gdk Color result public static final synchronized native void gdk cursor destroy int long cursor  gdk_colormap_get_system gdk_colormap_query_color GdkColor gdk_cursor_destroy
public static final synchronized native void gdk colormap query color int long colormap int long pixel Gdk Color result public static final synchronized native void gdk cursor destroy int long cursor public static final synchronized native int long gdk cursor new int long cursor type  gdk_colormap_query_color GdkColor gdk_cursor_destroy gdk_cursor_new cursor_type
public static final synchronized native void gdk cursor destroy int long cursor public static final synchronized native int long gdk cursor new int long cursor type public static final synchronized native int long gdk cursor new from pixmap int long source int long mask Gdk Color fg Gdk Color bg int x int y  gdk_cursor_destroy gdk_cursor_new cursor_type gdk_cursor_new_from_pixmap GdkColor GdkColor
public static final synchronized native int long gdk cursor new int long cursor type public static final synchronized native int long gdk cursor new from pixmap int long source int long mask Gdk Color fg Gdk Color bg int x int y public static final synchronized native void gdk drag status int long context int action int time  gdk_cursor_new cursor_type gdk_cursor_new_from_pixmap GdkColor GdkColor gdk_drag_status
public static final synchronized native int long gdk cursor new from pixmap int long source int long mask Gdk Color fg Gdk Color bg int x int y public static final synchronized native void gdk drag status int long context int action int time public static final synchronized native void gdk draw arc int long drawable int long gc int filled int x int y int width int height int angle1 int angle2  gdk_cursor_new_from_pixmap GdkColor GdkColor gdk_drag_status gdk_draw_arc
public static final synchronized native void gdk drag status int long context int action int time public static final synchronized native void gdk draw arc int long drawable int long gc int filled int x int y int width int height int angle1 int angle2 public static final synchronized native void gdk draw drawable int long drawable int long gc int long src int xsrc int ysrc int xdest int ydest int width int height  gdk_drag_status gdk_draw_arc gdk_draw_drawable
public static final synchronized native void gdk draw arc int long drawable int long gc int filled int x int y int width int height int angle1 int angle2 public static final synchronized native void gdk draw drawable int long drawable int long gc int long src int xsrc int ysrc int xdest int ydest int width int height public static final synchronized native void gdk draw layout int long drawable int long gc int x int y int long layout  gdk_draw_arc gdk_draw_drawable gdk_draw_layout
public static final synchronized native void gdk draw drawable int long drawable int long gc int long src int xsrc int ysrc int xdest int ydest int width int height public static final synchronized native void gdk draw layout int long drawable int long gc int x int y int long layout public static final synchronized native void gdk draw layout with colors int long drawable int long gc int x int y int long layout Gdk Color foreground Gdk Color background  gdk_draw_drawable gdk_draw_layout gdk_draw_layout_with_colors GdkColor GdkColor
public static final synchronized native void gdk draw layout int long drawable int long gc int x int y int long layout public static final synchronized native void gdk draw layout with colors int long drawable int long gc int x int y int long layout Gdk Color foreground Gdk Color background public static final synchronized native void gdk draw line int long drawable int long gc int x1 int y1 int x2 int y2  gdk_draw_layout gdk_draw_layout_with_colors GdkColor GdkColor gdk_draw_line
public static final synchronized native void gdk draw layout with colors int long drawable int long gc int x int y int long layout Gdk Color foreground Gdk Color background public static final synchronized native void gdk draw line int long drawable int long gc int x1 int y1 int x2 int y2 public static final synchronized native void gdk draw lines int long drawable int long gc int points int npoints  gdk_draw_layout_with_colors GdkColor GdkColor gdk_draw_line gdk_draw_lines
public static final synchronized native void gdk draw line int long drawable int long gc int x1 int y1 int x2 int y2 public static final synchronized native void gdk draw lines int long drawable int long gc int points int npoints public static final synchronized native void gdk draw point int long drawable int long gc int x int y  gdk_draw_line gdk_draw_lines gdk_draw_point
public static final synchronized native void gdk draw lines int long drawable int long gc int points int npoints public static final synchronized native void gdk draw point int long drawable int long gc int x int y public static final synchronized native void gdk draw polygon int long drawable int long gc int filled int points int npoints  gdk_draw_lines gdk_draw_point gdk_draw_polygon
public static final synchronized native void gdk draw point int long drawable int long gc int x int y public static final synchronized native void gdk draw polygon int long drawable int long gc int filled int points int npoints public static final synchronized native void gdk draw rectangle int long drawable int long gc int filled int x int y int width int height  gdk_draw_point gdk_draw_polygon gdk_draw_rectangle
public static final synchronized native void gdk draw polygon int long drawable int long gc int filled int points int npoints public static final synchronized native void gdk draw rectangle int long drawable int long gc int filled int x int y int width int height public static final synchronized native int long gdk drawable get image int long drawable int x int y int width int height  gdk_draw_polygon gdk_draw_rectangle gdk_drawable_get_image
public static final synchronized native void gdk draw rectangle int long drawable int long gc int filled int x int y int width int height public static final synchronized native int long gdk drawable get image int long drawable int x int y int width int height public static final synchronized native void gdk drawable get size int long drawable int width int height  gdk_draw_rectangle gdk_drawable_get_image gdk_drawable_get_size
public static final synchronized native int long gdk drawable get image int long drawable int x int y int width int height public static final synchronized native void gdk drawable get size int long drawable int width int height public static final synchronized native int long gdk drawable get visible region int long drawable  gdk_drawable_get_image gdk_drawable_get_size gdk_drawable_get_visible_region
public static final synchronized native void gdk drawable get size int long drawable int width int height public static final synchronized native int long gdk drawable get visible region int long drawable public static final synchronized native int long gdk event copy int long event  gdk_drawable_get_size gdk_drawable_get_visible_region gdk_event_copy
public static final synchronized native int long gdk drawable get visible region int long drawable public static final synchronized native int long gdk event copy int long event public static final synchronized native void gdk event free int long event  gdk_drawable_get_visible_region gdk_event_copy gdk_event_free
public static final synchronized native int long gdk event copy int long event public static final synchronized native void gdk event free int long event public static final synchronized native int long gdk event get  gdk_event_copy gdk_event_free gdk_event_get
public static final synchronized native void gdk event free int long event public static final synchronized native int long gdk event get public static final synchronized native boolean gdk event get root coords int long event double px double py  gdk_event_free gdk_event_get gdk_event_get_root_coords
public static final synchronized native int long gdk event get public static final synchronized native boolean gdk event get root coords int long event double px double py public static final synchronized native boolean gdk event get coords int long event double px double py  gdk_event_get gdk_event_get_root_coords gdk_event_get_coords
public static final synchronized native boolean gdk event get root coords int long event double px double py public static final synchronized native boolean gdk event get coords int long event double px double py public static final synchronized native int long gdk event get graphics expose int long window  gdk_event_get_root_coords gdk_event_get_coords gdk_event_get_graphics_expose
public static final synchronized native boolean gdk event get coords int long event double px double py public static final synchronized native int long gdk event get graphics expose int long window public static final synchronized native boolean gdk event get state int long event int pmod  gdk_event_get_coords gdk_event_get_graphics_expose gdk_event_get_state
public static final synchronized native int long gdk event get graphics expose int long window public static final synchronized native boolean gdk event get state int long event int pmod public static final synchronized native int gdk event get time int long event  gdk_event_get_graphics_expose gdk_event_get_state gdk_event_get_time
public static final synchronized native boolean gdk event get state int long event int pmod public static final synchronized native int gdk event get time int long event public static final synchronized native void gdk event handler set int long func int long data int long notify  gdk_event_get_state gdk_event_get_time gdk_event_handler_set
public static final synchronized native int gdk event get time int long event public static final synchronized native void gdk event handler set int long func int long data int long notify public static final synchronized native void gdk event put int long event  gdk_event_get_time gdk_event_handler_set gdk_event_put
public static final synchronized native void gdk event handler set int long func int long data int long notify public static final synchronized native void gdk event put int long event public static final synchronized native void gdk error trap push  gdk_event_handler_set gdk_event_put gdk_error_trap_push
public static final synchronized native void gdk event put int long event public static final synchronized native void gdk error trap push public static final synchronized native int gdk error trap pop  gdk_event_put gdk_error_trap_push gdk_error_trap_pop
public static final synchronized native void gdk error trap push public static final synchronized native int gdk error trap pop public static final synchronized native void gdk flush  gdk_error_trap_push gdk_error_trap_pop gdk_flush
public static final synchronized native int gdk error trap pop public static final synchronized native void gdk flush public static final synchronized native void gdk free text list int long list  gdk_error_trap_pop gdk_flush gdk_free_text_list
public static final synchronized native void gdk flush public static final synchronized native void gdk free text list int long list public static final synchronized native void gdk gc get values int long gc GdkGC Values values  gdk_flush gdk_free_text_list gdk_gc_get_values GdkGCValues
public static final synchronized native void gdk free text list int long list public static final synchronized native void gdk gc get values int long gc GdkGC Values values public static final synchronized native int long gdk gc new int long window  gdk_free_text_list gdk_gc_get_values GdkGCValues gdk_gc_new
public static final synchronized native void gdk gc get values int long gc GdkGC Values values public static final synchronized native int long gdk gc new int long window public static final synchronized native void gdk gc set background int long gc Gdk Color color  gdk_gc_get_values GdkGCValues gdk_gc_new gdk_gc_set_background GdkColor
public static final synchronized native int long gdk gc new int long window public static final synchronized native void gdk gc set background int long gc Gdk Color color public static final synchronized native void gdk gc set clip mask int long gc int long mask  gdk_gc_new gdk_gc_set_background GdkColor gdk_gc_set_clip_mask
public static final synchronized native void gdk gc set background int long gc Gdk Color color public static final synchronized native void gdk gc set clip mask int long gc int long mask public static final synchronized native void gdk gc set clip origin int long gc int x int y  gdk_gc_set_background GdkColor gdk_gc_set_clip_mask gdk_gc_set_clip_origin
public static final synchronized native void gdk gc set clip mask int long gc int long mask public static final synchronized native void gdk gc set clip origin int long gc int x int y public static final synchronized native void gdk gc set clip rectangle int long gc Gdk Rectangle rectangle  gdk_gc_set_clip_mask gdk_gc_set_clip_origin gdk_gc_set_clip_rectangle GdkRectangle
public static final synchronized native void gdk gc set clip origin int long gc int x int y public static final synchronized native void gdk gc set clip rectangle int long gc Gdk Rectangle rectangle public static final synchronized native void gdk gc set clip region int long gc int long region  gdk_gc_set_clip_origin gdk_gc_set_clip_rectangle GdkRectangle gdk_gc_set_clip_region
public static final synchronized native void gdk gc set clip rectangle int long gc Gdk Rectangle rectangle public static final synchronized native void gdk gc set clip region int long gc int long region public static final synchronized native void gdk gc set dashes int long gc int dash offset byte dash list int n  gdk_gc_set_clip_rectangle GdkRectangle gdk_gc_set_clip_region gdk_gc_set_dashes dash_offset dash_list
public static final synchronized native void gdk gc set clip region int long gc int long region public static final synchronized native void gdk gc set dashes int long gc int dash offset byte dash list int n public static final synchronized native void gdk gc set exposures int long gc boolean exposures  gdk_gc_set_clip_region gdk_gc_set_dashes dash_offset dash_list gdk_gc_set_exposures
public static final synchronized native void gdk gc set dashes int long gc int dash offset byte dash list int n public static final synchronized native void gdk gc set exposures int long gc boolean exposures public static final synchronized native void gdk gc set fill int long gc int fill  gdk_gc_set_dashes dash_offset dash_list gdk_gc_set_exposures gdk_gc_set_fill
public static final synchronized native void gdk gc set exposures int long gc boolean exposures public static final synchronized native void gdk gc set fill int long gc int fill public static final synchronized native void gdk gc set foreground int long gc Gdk Color color  gdk_gc_set_exposures gdk_gc_set_fill gdk_gc_set_foreground GdkColor
public static final synchronized native void gdk gc set fill int long gc int fill public static final synchronized native void gdk gc set foreground int long gc Gdk Color color public static final synchronized native void gdk gc set function int long gc int long function  gdk_gc_set_fill gdk_gc_set_foreground GdkColor gdk_gc_set_function
public static final synchronized native void gdk gc set foreground int long gc Gdk Color color public static final synchronized native void gdk gc set function int long gc int long function public static final synchronized native void gdk gc set line attributes int long gc int line width int line style int cap style int join style  gdk_gc_set_foreground GdkColor gdk_gc_set_function gdk_gc_set_line_attributes line_width line_style cap_style join_style
public static final synchronized native void gdk gc set function int long gc int long function public static final synchronized native void gdk gc set line attributes int long gc int line width int line style int cap style int join style public static final synchronized native void gdk gc set stipple int long gc int long stipple  gdk_gc_set_function gdk_gc_set_line_attributes line_width line_style cap_style join_style gdk_gc_set_stipple
public static final synchronized native void gdk gc set line attributes int long gc int line width int line style int cap style int join style public static final synchronized native void gdk gc set stipple int long gc int long stipple public static final synchronized native void gdk gc set subwindow int long gc int long mode  gdk_gc_set_line_attributes line_width line_style cap_style join_style gdk_gc_set_stipple gdk_gc_set_subwindow
public static final synchronized native void gdk gc set stipple int long gc int long stipple public static final synchronized native void gdk gc set subwindow int long gc int long mode public static final synchronized native void gdk gc set values int long gc GdkGC Values values int values mask  gdk_gc_set_stipple gdk_gc_set_subwindow gdk_gc_set_values GdkGCValues values_mask
public static final synchronized native void gdk gc set subwindow int long gc int long mode public static final synchronized native void gdk gc set values int long gc GdkGC Values values int values mask public static final synchronized native int long gdk image get int long window int x int y int width int height  gdk_gc_set_subwindow gdk_gc_set_values GdkGCValues values_mask gdk_image_get
public static final synchronized native void gdk gc set values int long gc GdkGC Values values int values mask public static final synchronized native int long gdk image get int long window int x int y int width int height public static final synchronized native int long gdk image get pixel int long image int x int y  gdk_gc_set_values GdkGCValues values_mask gdk_image_get gdk_image_get_pixel
public static final synchronized native int long gdk image get int long window int x int y int width int height public static final synchronized native int long gdk image get pixel int long image int x int y public static final synchronized native void gdk keyboard ungrab int time  gdk_image_get gdk_image_get_pixel gdk_keyboard_ungrab
public static final synchronized native int long gdk image get pixel int long image int x int y public static final synchronized native void gdk keyboard ungrab int time public static final synchronized native int long gdk keymap get default  gdk_image_get_pixel gdk_keyboard_ungrab gdk_keymap_get_default
public static final synchronized native void gdk keyboard ungrab int time public static final synchronized native int long gdk keymap get default public static final synchronized native boolean gdk keymap translate keyboard state int long keymap int hardware keycode int state int group int keyval int effective group int level int consumed modifiers  gdk_keyboard_ungrab gdk_keymap_get_default gdk_keymap_translate_keyboard_state hardware_keycode effective_group consumed_modifiers
public static final synchronized native int long gdk keymap get default public static final synchronized native boolean gdk keymap translate keyboard state int long keymap int hardware keycode int state int group int keyval int effective group int level int consumed modifiers public static final synchronized native int gdk keyval to lower int keyval  gdk_keymap_get_default gdk_keymap_translate_keyboard_state hardware_keycode effective_group consumed_modifiers gdk_keyval_to_lower
public static final synchronized native boolean gdk keymap translate keyboard state int long keymap int hardware keycode int state int group int keyval int effective group int level int consumed modifiers public static final synchronized native int gdk keyval to lower int keyval public static final synchronized native int gdk keyval to unicode int keyval  gdk_keymap_translate_keyboard_state hardware_keycode effective_group consumed_modifiers gdk_keyval_to_lower gdk_keyval_to_unicode
public static final synchronized native int gdk keyval to lower int keyval public static final synchronized native int gdk keyval to unicode int keyval public static final synchronized native int long gdk pango context get  gdk_keyval_to_lower gdk_keyval_to_unicode gdk_pango_context_get
public static final synchronized native int gdk keyval to unicode int keyval public static final synchronized native int long gdk pango context get public static final synchronized native void gdk pango context set colormap int long context int long colormap  gdk_keyval_to_unicode gdk_pango_context_get gdk_pango_context_set_colormap
public static final synchronized native int long gdk pango context get public static final synchronized native void gdk pango context set colormap int long context int long colormap public static final synchronized native int long gdk pango layout get clip region int long layout int x origin int y origin int index ranges int n ranges  gdk_pango_context_get gdk_pango_context_set_colormap gdk_pango_layout_get_clip_region x_origin y_origin index_ranges n_ranges
public static final synchronized native void gdk pango context set colormap int long context int long colormap public static final synchronized native int long gdk pango layout get clip region int long layout int x origin int y origin int index ranges int n ranges public static final synchronized native int long gdk pixbuf get from drawable int long dest int long src int long cmap int src x int src y int dest x int dest y int width int height  gdk_pango_context_set_colormap gdk_pango_layout_get_clip_region x_origin y_origin index_ranges n_ranges gdk_pixbuf_get_from_drawable src_x src_y dest_x dest_y
public static final synchronized native int long gdk pango layout get clip region int long layout int x origin int y origin int index ranges int n ranges public static final synchronized native int long gdk pixbuf get from drawable int long dest int long src int long cmap int src x int src y int dest x int dest y int width int height public static final synchronized native int long gdk pixbuf get pixels int long pixbuf  gdk_pango_layout_get_clip_region x_origin y_origin index_ranges n_ranges gdk_pixbuf_get_from_drawable src_x src_y dest_x dest_y gdk_pixbuf_get_pixels
public static final synchronized native int long gdk pixbuf get from drawable int long dest int long src int long cmap int src x int src y int dest x int dest y int width int height public static final synchronized native int long gdk pixbuf get pixels int long pixbuf public static final synchronized native int gdk pixbuf get rowstride int long pixbuf  gdk_pixbuf_get_from_drawable src_x src_y dest_x dest_y gdk_pixbuf_get_pixels gdk_pixbuf_get_rowstride
public static final synchronized native int long gdk pixbuf get pixels int long pixbuf public static final synchronized native int gdk pixbuf get rowstride int long pixbuf public static final synchronized native int long gdk pixbuf new int colorspace boolean has alpha int bits per sample int width int height  gdk_pixbuf_get_pixels gdk_pixbuf_get_rowstride gdk_pixbuf_new has_alpha bits_per_sample
public static final synchronized native int gdk pixbuf get rowstride int long pixbuf public static final synchronized native int long gdk pixbuf new int colorspace boolean has alpha int bits per sample int width int height public static final synchronized native void gdk pixbuf render to drawable int long pixbuf int long drawable int long gc int src x int src y int dest x int dest y int width int height int dither int x dither int y dither  gdk_pixbuf_get_rowstride gdk_pixbuf_new has_alpha bits_per_sample gdk_pixbuf_render_to_drawable src_x src_y dest_x dest_y x_dither y_dither
public static final synchronized native int long gdk pixbuf new int colorspace boolean has alpha int bits per sample int width int height public static final synchronized native void gdk pixbuf render to drawable int long pixbuf int long drawable int long gc int src x int src y int dest x int dest y int width int height int dither int x dither int y dither public static final synchronized native void gdk pixbuf render to drawable alpha int long pixbuf int long drawable int src x int src y int dest x int dest y int width int height int alpha mode int alpha threshold int dither int x dither int y dither  gdk_pixbuf_new has_alpha bits_per_sample gdk_pixbuf_render_to_drawable src_x src_y dest_x dest_y x_dither y_dither gdk_pixbuf_render_to_drawable_alpha src_x src_y dest_x dest_y alpha_mode alpha_threshold x_dither y_dither
public static final synchronized native void gdk pixbuf render to drawable int long pixbuf int long drawable int long gc int src x int src y int dest x int dest y int width int height int dither int x dither int y dither public static final synchronized native void gdk pixbuf render to drawable alpha int long pixbuf int long drawable int src x int src y int dest x int dest y int width int height int alpha mode int alpha threshold int dither int x dither int y dither public static final synchronized native void gdk pixbuf render pixmap and mask int long pixbuf int long pixmap return int long mask return int alpha threshold  gdk_pixbuf_render_to_drawable src_x src_y dest_x dest_y x_dither y_dither gdk_pixbuf_render_to_drawable_alpha src_x src_y dest_x dest_y alpha_mode alpha_threshold x_dither y_dither gdk_pixbuf_render_pixmap_and_mask pixmap_return mask_return alpha_threshold
public static final synchronized native void gdk pixbuf render to drawable alpha int long pixbuf int long drawable int src x int src y int dest x int dest y int width int height int alpha mode int alpha threshold int dither int x dither int y dither public static final synchronized native void gdk pixbuf render pixmap and mask int long pixbuf int long pixmap return int long mask return int alpha threshold public static final synchronized native void gdk pixbuf scale int long src int long dest int dest x int dest y int dest width int dest height double offset x double offset y double scale x double scale y int interp type  gdk_pixbuf_render_to_drawable_alpha src_x src_y dest_x dest_y alpha_mode alpha_threshold x_dither y_dither gdk_pixbuf_render_pixmap_and_mask pixmap_return mask_return alpha_threshold gdk_pixbuf_scale dest_x dest_y dest_width dest_height offset_x offset_y scale_x scale_y interp_type
public static final synchronized native void gdk pixbuf render pixmap and mask int long pixbuf int long pixmap return int long mask return int alpha threshold public static final synchronized native void gdk pixbuf scale int long src int long dest int dest x int dest y int dest width int dest height double offset x double offset y double scale x double scale y int interp type public static final synchronized native int long gdk pixbuf scale simple int long src int dest width int dest height int interp type  gdk_pixbuf_render_pixmap_and_mask pixmap_return mask_return alpha_threshold gdk_pixbuf_scale dest_x dest_y dest_width dest_height offset_x offset_y scale_x scale_y interp_type gdk_pixbuf_scale_simple dest_width dest_height interp_type
public static final synchronized native void gdk pixbuf scale int long src int long dest int dest x int dest y int dest width int dest height double offset x double offset y double scale x double scale y int interp type public static final synchronized native int long gdk pixbuf scale simple int long src int dest width int dest height int interp type public static final synchronized native int long gdk pixmap new int long window int width int height int depth  gdk_pixbuf_scale dest_x dest_y dest_width dest_height offset_x offset_y scale_x scale_y interp_type gdk_pixbuf_scale_simple dest_width dest_height interp_type gdk_pixmap_new
public static final synchronized native int long gdk pixbuf scale simple int long src int dest width int dest height int interp type public static final synchronized native int long gdk pixmap new int long window int width int height int depth public static final synchronized native int gdk pointer grab int long window boolean owner events int event mask int long confine to int long cursor int time  gdk_pixbuf_scale_simple dest_width dest_height interp_type gdk_pixmap_new gdk_pointer_grab owner_events event_mask confine_to
public static final synchronized native int long gdk pixmap new int long window int width int height int depth public static final synchronized native int gdk pointer grab int long window boolean owner events int event mask int long confine to int long cursor int time public static final synchronized native boolean gdk pointer is grabbed  gdk_pixmap_new gdk_pointer_grab owner_events event_mask confine_to gdk_pointer_is_grabbed
public static final synchronized native int gdk pointer grab int long window boolean owner events int event mask int long confine to int long cursor int time public static final synchronized native boolean gdk pointer is grabbed public static final synchronized native void gdk pointer ungrab int time  gdk_pointer_grab owner_events event_mask confine_to gdk_pointer_is_grabbed gdk_pointer_ungrab
public static final synchronized native boolean gdk pointer is grabbed public static final synchronized native void gdk pointer ungrab int time public static final synchronized native boolean gdk property get int long window int long property int long type int long offset int long length int pdelete int long actual property type int actual format int actual length int long data  gdk_pointer_is_grabbed gdk_pointer_ungrab gdk_property_get actual_property_type actual_format actual_length
public static final synchronized native void gdk pointer ungrab int time public static final synchronized native boolean gdk property get int long window int long property int long type int long offset int long length int pdelete int long actual property type int actual format int actual length int long data public static final synchronized native void gdk region destroy int long region  gdk_pointer_ungrab gdk_property_get actual_property_type actual_format actual_length gdk_region_destroy
public static final synchronized native boolean gdk property get int long window int long property int long type int long offset int long length int pdelete int long actual property type int actual format int actual length int long data public static final synchronized native void gdk region destroy int long region public static final synchronized native boolean gdk region empty int long region  gdk_property_get actual_property_type actual_format actual_length gdk_region_destroy gdk_region_empty
public static final synchronized native void gdk region destroy int long region public static final synchronized native boolean gdk region empty int long region public static final synchronized native void gdk region get clipbox int long region Gdk Rectangle rectangle  gdk_region_destroy gdk_region_empty gdk_region_get_clipbox GdkRectangle
public static final synchronized native boolean gdk region empty int long region public static final synchronized native void gdk region get clipbox int long region Gdk Rectangle rectangle public static final synchronized native void gdk region get rectangles int long region int long rectangles int n rectangles  gdk_region_empty gdk_region_get_clipbox GdkRectangle gdk_region_get_rectangles n_rectangles
public static final synchronized native void gdk region get clipbox int long region Gdk Rectangle rectangle public static final synchronized native void gdk region get rectangles int long region int long rectangles int n rectangles public static final synchronized native void gdk region intersect int long source1 int long source2  gdk_region_get_clipbox GdkRectangle gdk_region_get_rectangles n_rectangles gdk_region_intersect
public static final synchronized native void gdk region get rectangles int long region int long rectangles int n rectangles public static final synchronized native void gdk region intersect int long source1 int long source2 public static final synchronized native int long gdk region new  gdk_region_get_rectangles n_rectangles gdk_region_intersect gdk_region_new
public static final synchronized native void gdk region intersect int long source1 int long source2 public static final synchronized native int long gdk region new public static final synchronized native void gdk region offset int long region int dx int dy  gdk_region_intersect gdk_region_new gdk_region_offset
public static final synchronized native int long gdk region new public static final synchronized native void gdk region offset int long region int dx int dy public static final synchronized native boolean gdk region point in int long region int x int y  gdk_region_new gdk_region_offset gdk_region_point_in
public static final synchronized native void gdk region offset int long region int dx int dy public static final synchronized native boolean gdk region point in int long region int x int y public static final synchronized native int long gdk region polygon int points int npoints int fill rule  gdk_region_offset gdk_region_point_in gdk_region_polygon fill_rule
public static final synchronized native boolean gdk region point in int long region int x int y public static final synchronized native int long gdk region polygon int points int npoints int fill rule public static final synchronized native int long gdk region rectangle Gdk Rectangle rectangle  gdk_region_point_in gdk_region_polygon fill_rule gdk_region_rectangle GdkRectangle
public static final synchronized native int long gdk region polygon int points int npoints int fill rule public static final synchronized native int long gdk region rectangle Gdk Rectangle rectangle public static final synchronized native int long gdk region rect in int long region Gdk Rectangle rect  gdk_region_polygon fill_rule gdk_region_rectangle GdkRectangle gdk_region_rect_in GdkRectangle
public static final synchronized native int long gdk region rectangle Gdk Rectangle rectangle public static final synchronized native int long gdk region rect in int long region Gdk Rectangle rect public static final synchronized native void gdk region subtract int long source1 int long source2  gdk_region_rectangle GdkRectangle gdk_region_rect_in GdkRectangle gdk_region_subtract
public static final synchronized native int long gdk region rect in int long region Gdk Rectangle rect public static final synchronized native void gdk region subtract int long source1 int long source2 public static final synchronized native void gdk region union int long source1 int long source2  gdk_region_rect_in GdkRectangle gdk_region_subtract gdk_region_union
public static final synchronized native void gdk region subtract int long source1 int long source2 public static final synchronized native void gdk region union int long source1 int long source2 public static final synchronized native void gdk region union with rect int long region Gdk Rectangle rect  gdk_region_subtract gdk_region_union gdk_region_union_with_rect GdkRectangle
public static final synchronized native void gdk region union int long source1 int long source2 public static final synchronized native void gdk region union with rect int long region Gdk Rectangle rect public static final synchronized native void gdk rgb init  gdk_region_union gdk_region_union_with_rect GdkRectangle gdk_rgb_init
public static final synchronized native void gdk region union with rect int long region Gdk Rectangle rect public static final synchronized native void gdk rgb init public static final synchronized native int long gdk screen get default  gdk_region_union_with_rect GdkRectangle gdk_rgb_init gdk_screen_get_default
public static final synchronized native void gdk rgb init public static final synchronized native int long gdk screen get default public static final synchronized native int gdk screen get monitor at window int long screen int long window  gdk_rgb_init gdk_screen_get_default gdk_screen_get_monitor_at_window
public static final synchronized native int long gdk screen get default public static final synchronized native int gdk screen get monitor at window int long screen int long window public static final synchronized native void gdk screen get monitor geometry int long screen int monitor num Gdk Rectangle dest  gdk_screen_get_default gdk_screen_get_monitor_at_window gdk_screen_get_monitor_geometry monitor_num GdkRectangle
public static final synchronized native int gdk screen get monitor at window int long screen int long window public static final synchronized native void gdk screen get monitor geometry int long screen int monitor num Gdk Rectangle dest public static final synchronized native int gdk screen get n monitors int long screen  gdk_screen_get_monitor_at_window gdk_screen_get_monitor_geometry monitor_num GdkRectangle gdk_screen_get_n_monitors
public static final synchronized native void gdk screen get monitor geometry int long screen int monitor num Gdk Rectangle dest public static final synchronized native int gdk screen get n monitors int long screen public static final synchronized native int gdk screen get number int long screen  gdk_screen_get_monitor_geometry monitor_num GdkRectangle gdk_screen_get_n_monitors gdk_screen_get_number
public static final synchronized native int gdk screen get n monitors int long screen public static final synchronized native int gdk screen get number int long screen public static final synchronized native int gdk screen height  gdk_screen_get_n_monitors gdk_screen_get_number gdk_screen_height
public static final synchronized native int gdk screen get number int long screen public static final synchronized native int gdk screen height public static final synchronized native int gdk screen width  gdk_screen_get_number gdk_screen_height gdk_screen_width
public static final synchronized native int gdk screen height public static final synchronized native int gdk screen width public static final synchronized native int gdk screen width mm  gdk_screen_height gdk_screen_width gdk_screen_width_mm
public static final synchronized native int gdk screen width public static final synchronized native int gdk screen width mm public static final synchronized native void gdk set program class byte program class  gdk_screen_width gdk_screen_width_mm gdk_set_program_class program_class
public static final synchronized native int gdk screen width mm public static final synchronized native void gdk set program class byte program class public static final synchronized native boolean gdk utf8 to compound text byte str int long encoding int format int long ctext int length  gdk_screen_width_mm gdk_set_program_class program_class gdk_utf8_to_compound_text
public static final synchronized native void gdk set program class byte program class public static final synchronized native boolean gdk utf8 to compound text byte str int long encoding int format int long ctext int length public static final synchronized native int gdk text property to utf8 list int long encoding int format int long text int length int long list  gdk_set_program_class program_class gdk_utf8_to_compound_text gdk_text_property_to_utf8_list
public static final synchronized native boolean gdk utf8 to compound text byte str int long encoding int format int long ctext int length public static final synchronized native int gdk text property to utf8 list int long encoding int format int long text int length int long list public static final synchronized native void gdk threads enter  gdk_utf8_to_compound_text gdk_text_property_to_utf8_list gdk_threads_enter
public static final synchronized native int gdk text property to utf8 list int long encoding int format int long text int length int long list public static final synchronized native void gdk threads enter public static final synchronized native void gdk threads init  gdk_text_property_to_utf8_list gdk_threads_enter gdk_threads_init
public static final synchronized native void gdk threads enter public static final synchronized native void gdk threads init public static final synchronized native void gdk threads leave  gdk_threads_enter gdk_threads_init gdk_threads_leave
public static final synchronized native void gdk threads init public static final synchronized native void gdk threads leave public static final synchronized native int gdk unicode to keyval int wc  gdk_threads_init gdk_threads_leave gdk_unicode_to_keyval
public static final synchronized native void gdk threads leave public static final synchronized native int gdk unicode to keyval int wc public static final synchronized native int long gdk visual get system  gdk_threads_leave gdk_unicode_to_keyval gdk_visual_get_system
public static final synchronized native int gdk unicode to keyval int wc public static final synchronized native int long gdk visual get system public static final synchronized native int long gdk window at pointer int win x int win y  gdk_unicode_to_keyval gdk_visual_get_system gdk_window_at_pointer win_x win_y
public static final synchronized native int long gdk visual get system public static final synchronized native int long gdk window at pointer int win x int win y public static final synchronized native void gdk window begin paint rect int long window Gdk Rectangle rectangle  gdk_visual_get_system gdk_window_at_pointer win_x win_y gdk_window_begin_paint_rect GdkRectangle
public static final synchronized native int long gdk window at pointer int win x int win y public static final synchronized native void gdk window begin paint rect int long window Gdk Rectangle rectangle public static final synchronized native void gdk window destroy int long window  gdk_window_at_pointer win_x win_y gdk_window_begin_paint_rect GdkRectangle gdk_window_destroy
public static final synchronized native void gdk window begin paint rect int long window Gdk Rectangle rectangle public static final synchronized native void gdk window destroy int long window public static final synchronized native void gdk window end paint int long window  gdk_window_begin_paint_rect GdkRectangle gdk_window_destroy gdk_window_end_paint
public static final synchronized native void gdk window destroy int long window public static final synchronized native void gdk window end paint int long window public static final synchronized native int long gdk window get children int long window  gdk_window_destroy gdk_window_end_paint gdk_window_get_children
public static final synchronized native void gdk window end paint int long window public static final synchronized native int long gdk window get children int long window public static final synchronized native int gdk window get events int long window  gdk_window_end_paint gdk_window_get_children gdk_window_get_events
public static final synchronized native int long gdk window get children int long window public static final synchronized native int gdk window get events int long window public static final synchronized native void gdk window focus int long window int timestamp  gdk_window_get_children gdk_window_get_events gdk_window_focus
public static final synchronized native int gdk window get events int long window public static final synchronized native void gdk window focus int long window int timestamp public static final synchronized native void gdk window freeze updates int long window  gdk_window_get_events gdk_window_focus gdk_window_freeze_updates
public static final synchronized native void gdk window focus int long window int timestamp public static final synchronized native void gdk window freeze updates int long window public static final synchronized native void gdk window get frame extents int long window Gdk Rectangle rect  gdk_window_focus gdk_window_freeze_updates gdk_window_get_frame_extents GdkRectangle
public static final synchronized native void gdk window freeze updates int long window public static final synchronized native void gdk window get frame extents int long window Gdk Rectangle rect public static final synchronized native int gdk window get origin int long window int x int y  gdk_window_freeze_updates gdk_window_get_frame_extents GdkRectangle gdk_window_get_origin
public static final synchronized native void gdk window get frame extents int long window Gdk Rectangle rect public static final synchronized native int gdk window get origin int long window int x int y public static final synchronized native int long gdk window get parent int long window  gdk_window_get_frame_extents GdkRectangle gdk_window_get_origin gdk_window_get_parent
public static final synchronized native int gdk window get origin int long window int x int y public static final synchronized native int long gdk window get parent int long window public static final synchronized native int long gdk window get pointer int long window int x int y int mask  gdk_window_get_origin gdk_window_get_parent gdk_window_get_pointer
public static final synchronized native int long gdk window get parent int long window public static final synchronized native int long gdk window get pointer int long window int x int y int mask public static final synchronized native void gdk window get user data int long window int long data  gdk_window_get_parent gdk_window_get_pointer gdk_window_get_user_data
public static final synchronized native int long gdk window get pointer int long window int x int y int mask public static final synchronized native void gdk window get user data int long window int long data public static final synchronized native void gdk window hide int long window  gdk_window_get_pointer gdk_window_get_user_data gdk_window_hide
public static final synchronized native void gdk window get user data int long window int long data public static final synchronized native void gdk window hide int long window public static final synchronized native void gdk window invalidate rect int long window Gdk Rectangle rectangle boolean invalidate children  gdk_window_get_user_data gdk_window_hide gdk_window_invalidate_rect GdkRectangle invalidate_children
public static final synchronized native void gdk window hide int long window public static final synchronized native void gdk window invalidate rect int long window Gdk Rectangle rectangle boolean invalidate children public static final synchronized native void gdk window invalidate region int long window int long region boolean invalidate children  gdk_window_hide gdk_window_invalidate_rect GdkRectangle invalidate_children gdk_window_invalidate_region invalidate_children
public static final synchronized native void gdk window invalidate rect int long window Gdk Rectangle rectangle boolean invalidate children public static final synchronized native void gdk window invalidate region int long window int long region boolean invalidate children public static final synchronized native void gdk window move int long window int x int y  gdk_window_invalidate_rect GdkRectangle invalidate_children gdk_window_invalidate_region invalidate_children gdk_window_move
public static final synchronized native void gdk window invalidate region int long window int long region boolean invalidate children public static final synchronized native void gdk window move int long window int x int y public static final synchronized native int long gdk window new int long parent Gdk Window Attr attributes int attributes mask  gdk_window_invalidate_region invalidate_children gdk_window_move gdk_window_new GdkWindowAttr attributes_mask
public static final synchronized native void gdk window move int long window int x int y public static final synchronized native int long gdk window new int long parent Gdk Window Attr attributes int attributes mask public static final synchronized native void gdk window lower int long window  gdk_window_move gdk_window_new GdkWindowAttr attributes_mask gdk_window_lower
public static final synchronized native int long gdk window new int long parent Gdk Window Attr attributes int attributes mask public static final synchronized native void gdk window lower int long window public static final synchronized native void gdk window process all updates  gdk_window_new GdkWindowAttr attributes_mask gdk_window_lower gdk_window_process_all_updates
public static final synchronized native void gdk window lower int long window public static final synchronized native void gdk window process all updates public static final synchronized native void gdk window process updates int long window boolean update children  gdk_window_lower gdk_window_process_all_updates gdk_window_process_updates update_children
public static final synchronized native void gdk window process all updates public static final synchronized native void gdk window process updates int long window boolean update children public static final synchronized native void gdk window raise int long window  gdk_window_process_all_updates gdk_window_process_updates update_children gdk_window_raise
public static final synchronized native void gdk window process updates int long window boolean update children public static final synchronized native void gdk window raise int long window public static final synchronized native void gdk window resize int long window int width int height  gdk_window_process_updates update_children gdk_window_raise gdk_window_resize
public static final synchronized native void gdk window raise int long window public static final synchronized native void gdk window resize int long window int width int height public static final synchronized native void gdk window scroll int long window int dx int dy  gdk_window_raise gdk_window_resize gdk_window_scroll
public static final synchronized native void gdk window resize int long window int width int height public static final synchronized native void gdk window scroll int long window int dx int dy public static final synchronized native void gdk window set accept focus int long window boolean accept focus  gdk_window_resize gdk_window_scroll gdk_window_set_accept_focus accept_focus
public static final synchronized native void gdk window scroll int long window int dx int dy public static final synchronized native void gdk window set accept focus int long window boolean accept focus public static final synchronized native void gdk window set back pixmap int long window int long pixmap boolean parent relative  gdk_window_scroll gdk_window_set_accept_focus accept_focus gdk_window_set_back_pixmap parent_relative
public static final synchronized native void gdk window set accept focus int long window boolean accept focus public static final synchronized native void gdk window set back pixmap int long window int long pixmap boolean parent relative public static final synchronized native void gdk window set cursor int long window int long cursor  gdk_window_set_accept_focus accept_focus gdk_window_set_back_pixmap parent_relative gdk_window_set_cursor
public static final synchronized native void gdk window set back pixmap int long window int long pixmap boolean parent relative public static final synchronized native void gdk window set cursor int long window int long cursor public static final synchronized native void gdk window set decorations int long window int decorations  gdk_window_set_back_pixmap parent_relative gdk_window_set_cursor gdk_window_set_decorations
public static final synchronized native void gdk window set cursor int long window int long cursor public static final synchronized native void gdk window set decorations int long window int decorations public static final synchronized native void gdk window set events int long window int event mask  gdk_window_set_cursor gdk_window_set_decorations gdk_window_set_events event_mask
public static final synchronized native void gdk window set decorations int long window int decorations public static final synchronized native void gdk window set events int long window int event mask public static final synchronized native void gdk window set icon int long window int long icon window int long pixmap int long mask  gdk_window_set_decorations gdk_window_set_events event_mask gdk_window_set_icon icon_window
public static final synchronized native void gdk window set events int long window int event mask public static final synchronized native void gdk window set icon int long window int long icon window int long pixmap int long mask public static final synchronized native void gdk window set icon list int long window int long pixbufs  gdk_window_set_events event_mask gdk_window_set_icon icon_window gdk_window_set_icon_list
public static final synchronized native void gdk window set icon int long window int long icon window int long pixmap int long mask public static final synchronized native void gdk window set icon list int long window int long pixbufs public static final synchronized native void gdk window set keep above int long window boolean setting  gdk_window_set_icon icon_window gdk_window_set_icon_list gdk_window_set_keep_above
public static final synchronized native void gdk window set icon list int long window int long pixbufs public static final synchronized native void gdk window set keep above int long window boolean setting public static final synchronized native void gdk window set override redirect int long window boolean override redirect  gdk_window_set_icon_list gdk_window_set_keep_above gdk_window_set_override_redirect override_redirect
public static final synchronized native void gdk window set keep above int long window boolean setting public static final synchronized native void gdk window set override redirect int long window boolean override redirect public static final synchronized native void gdk window set user data int long window int long user data  gdk_window_set_keep_above gdk_window_set_override_redirect override_redirect gdk_window_set_user_data user_data
public static final synchronized native void gdk window set override redirect int long window boolean override redirect public static final synchronized native void gdk window set user data int long window int long user data public static final synchronized native void gdk window shape combine region int long window int long shape region int offset x int offset y  gdk_window_set_override_redirect override_redirect gdk_window_set_user_data user_data gdk_window_shape_combine_region shape_region offset_x offset_y
public static final synchronized native void gdk window set user data int long window int long user data public static final synchronized native void gdk window shape combine region int long window int long shape region int offset x int offset y public static final synchronized native void gdk window show int long window  gdk_window_set_user_data user_data gdk_window_shape_combine_region shape_region offset_x offset_y gdk_window_show
public static final synchronized native void gdk window shape combine region int long window int long shape region int offset x int offset y public static final synchronized native void gdk window show int long window public static final synchronized native void gdk window thaw updates int long window  gdk_window_shape_combine_region shape_region offset_x offset_y gdk_window_show gdk_window_thaw_updates
public static final synchronized native void gdk window show int long window public static final synchronized native void gdk window thaw updates int long window public static final synchronized native int long gtk accel group new  gdk_window_show gdk_window_thaw_updates gtk_accel_group_new
public static final synchronized native void gdk window thaw updates int long window public static final synchronized native int long gtk accel group new public static final synchronized native boolean gtk accel groups activate int long accel Group int accel Key int accel Mods  gdk_window_thaw_updates gtk_accel_group_new gtk_accel_groups_activate accelGroup accelKey accelMods
public static final synchronized native int long gtk accel group new public static final synchronized native boolean gtk accel groups activate int long accel Group int accel Key int accel Mods public static final synchronized native void gtk accel label set accel widget int long accel label int long accel widget  gtk_accel_group_new gtk_accel_groups_activate accelGroup accelKey accelMods gtk_accel_label_set_accel_widget accel_label accel_widget
public static final synchronized native boolean gtk accel groups activate int long accel Group int accel Key int accel Mods public static final synchronized native void gtk accel label set accel widget int long accel label int long accel widget public static final synchronized native void gtk adjustment changed int long adjustment  gtk_accel_groups_activate accelGroup accelKey accelMods gtk_accel_label_set_accel_widget accel_label accel_widget gtk_adjustment_changed
public static final synchronized native void gtk accel label set accel widget int long accel label int long accel widget public static final synchronized native void gtk adjustment changed int long adjustment public static final synchronized native int long gtk adjustment new double value double lower double upper double step increment double page increment double page size  gtk_accel_label_set_accel_widget accel_label accel_widget gtk_adjustment_changed gtk_adjustment_new step_increment page_increment page_size
public static final synchronized native void gtk adjustment changed int long adjustment public static final synchronized native int long gtk adjustment new double value double lower double upper double step increment double page increment double page size public static final synchronized native void gtk adjustment set value int long adjustment double value  gtk_adjustment_changed gtk_adjustment_new step_increment page_increment page_size gtk_adjustment_set_value
public static final synchronized native int long gtk adjustment new double value double lower double upper double step increment double page increment double page size public static final synchronized native void gtk adjustment set value int long adjustment double value public static final synchronized native void gtk adjustment value changed int long adjustment  gtk_adjustment_new step_increment page_increment page_size gtk_adjustment_set_value gtk_adjustment_value_changed
public static final synchronized native void gtk adjustment set value int long adjustment double value public static final synchronized native void gtk adjustment value changed int long adjustment public static final synchronized native int long gtk arrow new int arrow type int shadow type  gtk_adjustment_set_value gtk_adjustment_value_changed gtk_arrow_new arrow_type shadow_type
public static final synchronized native void gtk adjustment value changed int long adjustment public static final synchronized native int long gtk arrow new int arrow type int shadow type public static final synchronized native void gtk arrow set int long arrow int arrow type int shadow type  gtk_adjustment_value_changed gtk_arrow_new arrow_type shadow_type gtk_arrow_set arrow_type shadow_type
public static final synchronized native int long gtk arrow new int arrow type int shadow type public static final synchronized native void gtk arrow set int long arrow int arrow type int shadow type public static final synchronized native int long gtk bin get child int long bin  gtk_arrow_new arrow_type shadow_type gtk_arrow_set arrow_type shadow_type gtk_bin_get_child
public static final synchronized native void gtk arrow set int long arrow int arrow type int shadow type public static final synchronized native int long gtk bin get child int long bin public static final synchronized native int long gtk button new  gtk_arrow_set arrow_type shadow_type gtk_bin_get_child gtk_button_new
public static final synchronized native int long gtk bin get child int long bin public static final synchronized native int long gtk button new public static final synchronized native void gtk button set relief int long button int newstyle  gtk_bin_get_child gtk_button_new gtk_button_set_relief
public static final synchronized native int long gtk button new public static final synchronized native void gtk button set relief int long button int newstyle public static final synchronized native void gtk cell renderer get size int long cell int long widget Gdk Rectangle area int x offset int y offset int width int height  gtk_button_new gtk_button_set_relief gtk_cell_renderer_get_size GdkRectangle x_offset y_offset
public static final synchronized native void gtk button set relief int long button int newstyle public static final synchronized native void gtk cell renderer get size int long cell int long widget Gdk Rectangle area int x offset int y offset int width int height public static final synchronized native int long gtk cell renderer pixbuf new  gtk_button_set_relief gtk_cell_renderer_get_size GdkRectangle x_offset y_offset gtk_cell_renderer_pixbuf_new
public static final synchronized native void gtk cell renderer get size int long cell int long widget Gdk Rectangle area int x offset int y offset int width int height public static final synchronized native int long gtk cell renderer pixbuf new public static final synchronized native int long gtk cell renderer text new  gtk_cell_renderer_get_size GdkRectangle x_offset y_offset gtk_cell_renderer_pixbuf_new gtk_cell_renderer_text_new
public static final synchronized native int long gtk cell renderer pixbuf new public static final synchronized native int long gtk cell renderer text new public static final synchronized native int long gtk cell renderer toggle new  gtk_cell_renderer_pixbuf_new gtk_cell_renderer_text_new gtk_cell_renderer_toggle_new
public static final synchronized native int long gtk cell renderer text new public static final synchronized native int long gtk cell renderer toggle new public static final synchronized native int long gtk check button new  gtk_cell_renderer_text_new gtk_cell_renderer_toggle_new gtk_check_button_new
public static final synchronized native int long gtk cell renderer toggle new public static final synchronized native int long gtk check button new public static final synchronized native boolean gtk check menu item get active int long wid  gtk_cell_renderer_toggle_new gtk_check_button_new gtk_check_menu_item_get_active
public static final synchronized native int long gtk check button new public static final synchronized native boolean gtk check menu item get active int long wid public static final synchronized native int long gtk check menu item new with label byte label  gtk_check_button_new gtk_check_menu_item_get_active gtk_check_menu_item_new_with_label
public static final synchronized native boolean gtk check menu item get active int long wid public static final synchronized native int long gtk check menu item new with label byte label public static final synchronized native void gtk check menu item set active int long wid boolean active  gtk_check_menu_item_get_active gtk_check_menu_item_new_with_label gtk_check_menu_item_set_active
public static final synchronized native int long gtk check menu item new with label byte label public static final synchronized native void gtk check menu item set active int long wid boolean active public static final synchronized native int long gtk check version int required major int required minor int required micro  gtk_check_menu_item_new_with_label gtk_check_menu_item_set_active gtk_check_version required_major required_minor required_micro
public static final synchronized native void gtk check menu item set active int long wid boolean active public static final synchronized native int long gtk check version int required major int required minor int required micro public static final synchronized native void gtk clipboard clear int long clipboard  gtk_check_menu_item_set_active gtk_check_version required_major required_minor required_micro gtk_clipboard_clear
public static final synchronized native int long gtk check version int required major int required minor int required micro public static final synchronized native void gtk clipboard clear int long clipboard public static final synchronized native int long gtk clipboard get int long selection  gtk_check_version required_major required_minor required_micro gtk_clipboard_clear gtk_clipboard_get
public static final synchronized native void gtk clipboard clear int long clipboard public static final synchronized native int long gtk clipboard get int long selection public static final synchronized native boolean gtk clipboard set with data int long clipboard int long target int n targets int long get func int long clear func int long user data  gtk_clipboard_clear gtk_clipboard_get gtk_clipboard_set_with_data n_targets get_func clear_func user_data
public static final synchronized native int long gtk clipboard get int long selection public static final synchronized native boolean gtk clipboard set with data int long clipboard int long target int n targets int long get func int long clear func int long user data public static final synchronized native int long gtk clipboard wait for contents int long clipboard int long target  gtk_clipboard_get gtk_clipboard_set_with_data n_targets get_func clear_func user_data gtk_clipboard_wait_for_contents
public static final synchronized native boolean gtk clipboard set with data int long clipboard int long target int n targets int long get func int long clear func int long user data public static final synchronized native int long gtk clipboard wait for contents int long clipboard int long target public static final synchronized native int long gtk color selection dialog new byte title  gtk_clipboard_set_with_data n_targets get_func clear_func user_data gtk_clipboard_wait_for_contents gtk_color_selection_dialog_new
public static final synchronized native int long gtk clipboard wait for contents int long clipboard int long target public static final synchronized native int long gtk color selection dialog new byte title public static final synchronized native void gtk color selection get current color int long colorsel Gdk Color color  gtk_clipboard_wait_for_contents gtk_color_selection_dialog_new gtk_color_selection_get_current_color GdkColor
public static final synchronized native int long gtk color selection dialog new byte title public static final synchronized native void gtk color selection get current color int long colorsel Gdk Color color public static final synchronized native void gtk color selection set current color int long colorsel Gdk Color color  gtk_color_selection_dialog_new gtk_color_selection_get_current_color GdkColor gtk_color_selection_set_current_color GdkColor
public static final synchronized native void gtk color selection get current color int long colorsel Gdk Color color public static final synchronized native void gtk color selection set current color int long colorsel Gdk Color color public static final synchronized native void gtk combo disable activate int long combo  gtk_color_selection_get_current_color GdkColor gtk_color_selection_set_current_color GdkColor gtk_combo_disable_activate
public static final synchronized native void gtk color selection set current color int long colorsel Gdk Color color public static final synchronized native void gtk combo disable activate int long combo public static final synchronized native int long gtk combo new  gtk_color_selection_set_current_color GdkColor gtk_combo_disable_activate gtk_combo_new
public static final synchronized native void gtk combo disable activate int long combo public static final synchronized native int long gtk combo new public static final synchronized native void gtk combo set case sensitive int long combo boolean val  gtk_combo_disable_activate gtk_combo_new gtk_combo_set_case_sensitive
public static final synchronized native int long gtk combo new public static final synchronized native void gtk combo set case sensitive int long combo boolean val public static final synchronized native void gtk combo set popdown strings int long combo int long strings  gtk_combo_new gtk_combo_set_case_sensitive gtk_combo_set_popdown_strings
public static final synchronized native void gtk combo set case sensitive int long combo boolean val public static final synchronized native void gtk combo set popdown strings int long combo int long strings public static final synchronized native void gtk container add int long container int long widget  gtk_combo_set_case_sensitive gtk_combo_set_popdown_strings gtk_container_add
public static final synchronized native void gtk combo set popdown strings int long combo int long strings public static final synchronized native void gtk container add int long container int long widget public static final synchronized native int gtk container get border width int long container  gtk_combo_set_popdown_strings gtk_container_add gtk_container_get_border_width
public static final synchronized native void gtk container add int long container int long widget public static final synchronized native int gtk container get border width int long container public static final synchronized native int long gtk container get children int long container  gtk_container_add gtk_container_get_border_width gtk_container_get_children
public static final synchronized native int gtk container get border width int long container public static final synchronized native int long gtk container get children int long container public static final synchronized native void gtk container remove int long container int long widget  gtk_container_get_border_width gtk_container_get_children gtk_container_remove
public static final synchronized native int long gtk container get children int long container public static final synchronized native void gtk container remove int long container int long widget public static final synchronized native void gtk container resize children int long container  gtk_container_get_children gtk_container_remove gtk_container_resize_children
public static final synchronized native void gtk container remove int long container int long widget public static final synchronized native void gtk container resize children int long container public static final synchronized native void gtk container set border width int long container int border width  gtk_container_remove gtk_container_resize_children gtk_container_set_border_width border_width
public static final synchronized native void gtk container resize children int long container public static final synchronized native void gtk container set border width int long container int border width public static final synchronized native int long gtk dialog add button int long dialog String button text int response id  gtk_container_resize_children gtk_container_set_border_width border_width gtk_dialog_add_button button_text response_id
public static final synchronized native void gtk container set border width int long container int border width public static final synchronized native int long gtk dialog add button int long dialog String button text int response id public static final synchronized native int gtk dialog run int long dialog  gtk_container_set_border_width border_width gtk_dialog_add_button button_text response_id gtk_dialog_run
public static final synchronized native int long gtk dialog add button int long dialog String button text int response id public static final synchronized native int gtk dialog run int long dialog public static final synchronized native int long gtk drag begin int long widget int long targets int actions int button int long event  gtk_dialog_add_button button_text response_id gtk_dialog_run gtk_drag_begin
public static final synchronized native int gtk dialog run int long dialog public static final synchronized native int long gtk drag begin int long widget int long targets int actions int button int long event public static final synchronized native boolean gtk drag check threshold int long widget int start x int start y int current x int current y  gtk_dialog_run gtk_drag_begin gtk_drag_check_threshold start_x start_y current_x current_y
public static final synchronized native int long gtk drag begin int long widget int long targets int actions int button int long event public static final synchronized native boolean gtk drag check threshold int long widget int start x int start y int current x int current y public static final synchronized native int long gtk drag dest find target int long widget int long context int long target list  gtk_drag_begin gtk_drag_check_threshold start_x start_y current_x current_y gtk_drag_dest_find_target target_list
public static final synchronized native boolean gtk drag check threshold int long widget int start x int start y int current x int current y public static final synchronized native int long gtk drag dest find target int long widget int long context int long target list public static final synchronized native void gtk drag dest set int long widget int flags int long targets int n targets int actions  gtk_drag_check_threshold start_x start_y current_x current_y gtk_drag_dest_find_target target_list gtk_drag_dest_set n_targets
public static final synchronized native int long gtk drag dest find target int long widget int long context int long target list public static final synchronized native void gtk drag dest set int long widget int flags int long targets int n targets int actions public static final synchronized native void gtk drag dest unset int long widget  gtk_drag_dest_find_target target_list gtk_drag_dest_set n_targets gtk_drag_dest_unset
public static final synchronized native void gtk drag dest set int long widget int flags int long targets int n targets int actions public static final synchronized native void gtk drag dest unset int long widget public static final synchronized native void gtk drag finish int long context boolean success boolean delete int time  gtk_drag_dest_set n_targets gtk_drag_dest_unset gtk_drag_finish
public static final synchronized native void gtk drag dest unset int long widget public static final synchronized native void gtk drag finish int long context boolean success boolean delete int time public static final synchronized native void gtk drag get data int long widget int long context int long target int time  gtk_drag_dest_unset gtk_drag_finish gtk_drag_get_data
public static final synchronized native void gtk drag finish int long context boolean success boolean delete int time public static final synchronized native void gtk drag get data int long widget int long context int long target int time public static final synchronized native int long gtk drawing area new  gtk_drag_finish gtk_drag_get_data gtk_drawing_area_new
public static final synchronized native void gtk drag get data int long widget int long context int long target int time public static final synchronized native int long gtk drawing area new public static final synchronized native void gtk editable copy clipboard int long editable  gtk_drag_get_data gtk_drawing_area_new gtk_editable_copy_clipboard
public static final synchronized native int long gtk drawing area new public static final synchronized native void gtk editable copy clipboard int long editable public static final synchronized native void gtk editable cut clipboard int long editable  gtk_drawing_area_new gtk_editable_copy_clipboard gtk_editable_cut_clipboard
public static final synchronized native void gtk editable copy clipboard int long editable public static final synchronized native void gtk editable cut clipboard int long editable public static final synchronized native void gtk editable delete selection int long editable  gtk_editable_copy_clipboard gtk_editable_cut_clipboard gtk_editable_delete_selection
public static final synchronized native void gtk editable cut clipboard int long editable public static final synchronized native void gtk editable delete selection int long editable public static final synchronized native void gtk editable delete text int long editable int start pos int end pos  gtk_editable_cut_clipboard gtk_editable_delete_selection gtk_editable_delete_text start_pos end_pos
public static final synchronized native void gtk editable delete selection int long editable public static final synchronized native void gtk editable delete text int long editable int start pos int end pos public static final synchronized native int long gtk editable get chars int long editable int start pos int end pos  gtk_editable_delete_selection gtk_editable_delete_text start_pos end_pos gtk_editable_get_chars start_pos end_pos
public static final synchronized native void gtk editable delete text int long editable int start pos int end pos public static final synchronized native int long gtk editable get chars int long editable int start pos int end pos public static final synchronized native boolean gtk editable get editable int long editable  gtk_editable_delete_text start_pos end_pos gtk_editable_get_chars start_pos end_pos gtk_editable_get_editable
public static final synchronized native int long gtk editable get chars int long editable int start pos int end pos public static final synchronized native boolean gtk editable get editable int long editable public static final synchronized native int gtk editable get position int long editable  gtk_editable_get_chars start_pos end_pos gtk_editable_get_editable gtk_editable_get_position
public static final synchronized native boolean gtk editable get editable int long editable public static final synchronized native int gtk editable get position int long editable public static final synchronized native boolean gtk editable get selection bounds int long editable int start int end  gtk_editable_get_editable gtk_editable_get_position gtk_editable_get_selection_bounds
public static final synchronized native int gtk editable get position int long editable public static final synchronized native boolean gtk editable get selection bounds int long editable int start int end public static final synchronized native void gtk editable insert text int long editable byte new text int new text length int position  gtk_editable_get_position gtk_editable_get_selection_bounds gtk_editable_insert_text new_text new_text_length
public static final synchronized native boolean gtk editable get selection bounds int long editable int start int end public static final synchronized native void gtk editable insert text int long editable byte new text int new text length int position public static final synchronized native void gtk editable paste clipboard int long editable  gtk_editable_get_selection_bounds gtk_editable_insert_text new_text new_text_length gtk_editable_paste_clipboard
public static final synchronized native void gtk editable insert text int long editable byte new text int new text length int position public static final synchronized native void gtk editable paste clipboard int long editable public static final synchronized native void gtk editable select region int long editable int start int end  gtk_editable_insert_text new_text new_text_length gtk_editable_paste_clipboard gtk_editable_select_region
public static final synchronized native void gtk editable paste clipboard int long editable public static final synchronized native void gtk editable select region int long editable int start int end public static final synchronized native void gtk editable set editable int long entry boolean editable  gtk_editable_paste_clipboard gtk_editable_select_region gtk_editable_set_editable
public static final synchronized native void gtk editable select region int long editable int start int end public static final synchronized native void gtk editable set editable int long entry boolean editable public static final synchronized native void gtk editable set position int long editable int position  gtk_editable_select_region gtk_editable_set_editable gtk_editable_set_position
public static final synchronized native void gtk editable set editable int long entry boolean editable public static final synchronized native void gtk editable set position int long editable int position public static final synchronized native char gtk entry get invisible char int long entry  gtk_editable_set_editable gtk_editable_set_position gtk_entry_get_invisible_char
public static final synchronized native void gtk editable set position int long editable int position public static final synchronized native char gtk entry get invisible char int long entry public static final synchronized native int long gtk entry get layout int long entry  gtk_editable_set_position gtk_entry_get_invisible_char gtk_entry_get_layout
public static final synchronized native char gtk entry get invisible char int long entry public static final synchronized native int long gtk entry get layout int long entry public static final synchronized native int gtk entry get max length int long entry  gtk_entry_get_invisible_char gtk_entry_get_layout gtk_entry_get_max_length
public static final synchronized native int long gtk entry get layout int long entry public static final synchronized native int gtk entry get max length int long entry public static final synchronized native int long gtk entry get text int long entry  gtk_entry_get_layout gtk_entry_get_max_length gtk_entry_get_text
public static final synchronized native int gtk entry get max length int long entry public static final synchronized native int long gtk entry get text int long entry public static final synchronized native boolean gtk entry get visibility int long entry  gtk_entry_get_max_length gtk_entry_get_text gtk_entry_get_visibility
public static final synchronized native int long gtk entry get text int long entry public static final synchronized native boolean gtk entry get visibility int long entry public static final synchronized native int long gtk entry new  gtk_entry_get_text gtk_entry_get_visibility gtk_entry_new
public static final synchronized native boolean gtk entry get visibility int long entry public static final synchronized native int long gtk entry new public static final synchronized native void gtk entry set activates default int long entry boolean setting  gtk_entry_get_visibility gtk_entry_new gtk_entry_set_activates_default
public static final synchronized native int long gtk entry new public static final synchronized native void gtk entry set activates default int long entry boolean setting public static final synchronized native void gtk entry set alignment int long entry float xalign  gtk_entry_new gtk_entry_set_activates_default gtk_entry_set_alignment
public static final synchronized native void gtk entry set activates default int long entry boolean setting public static final synchronized native void gtk entry set alignment int long entry float xalign public static final synchronized native void gtk entry set has frame int long entry boolean setting  gtk_entry_set_activates_default gtk_entry_set_alignment gtk_entry_set_has_frame
public static final synchronized native void gtk entry set alignment int long entry float xalign public static final synchronized native void gtk entry set has frame int long entry boolean setting public static final synchronized native void gtk entry set invisible char int long entry char ch  gtk_entry_set_alignment gtk_entry_set_has_frame gtk_entry_set_invisible_char
public static final synchronized native void gtk entry set has frame int long entry boolean setting public static final synchronized native void gtk entry set invisible char int long entry char ch public static final synchronized native void gtk entry set max length int long entry int max  gtk_entry_set_has_frame gtk_entry_set_invisible_char gtk_entry_set_max_length
public static final synchronized native void gtk entry set invisible char int long entry char ch public static final synchronized native void gtk entry set max length int long entry int max public static final synchronized native void gtk entry set text int long entry byte text  gtk_entry_set_invisible_char gtk_entry_set_max_length gtk_entry_set_text
public static final synchronized native void gtk entry set max length int long entry int max public static final synchronized native void gtk entry set text int long entry byte text public static final synchronized native void gtk entry set visibility int long entry boolean visible  gtk_entry_set_max_length gtk_entry_set_text gtk_entry_set_visibility
public static final synchronized native void gtk entry set text int long entry byte text public static final synchronized native void gtk entry set visibility int long entry boolean visible public static final synchronized native int gtk events pending  gtk_entry_set_text gtk_entry_set_visibility gtk_events_pending
public static final synchronized native void gtk entry set visibility int long entry boolean visible public static final synchronized native int gtk events pending public static final synchronized native void gtk file selection complete int long filesel byte pattern  gtk_entry_set_visibility gtk_events_pending gtk_file_selection_complete
public static final synchronized native int gtk events pending public static final synchronized native void gtk file selection complete int long filesel byte pattern public static final synchronized native int long gtk file selection get filename int long filesel  gtk_events_pending gtk_file_selection_complete gtk_file_selection_get_filename
public static final synchronized native void gtk file selection complete int long filesel byte pattern public static final synchronized native int long gtk file selection get filename int long filesel public static final synchronized native int long gtk file selection get selections int long filesel  gtk_file_selection_complete gtk_file_selection_get_filename gtk_file_selection_get_selections
public static final synchronized native int long gtk file selection get filename int long filesel public static final synchronized native int long gtk file selection get selections int long filesel public static final synchronized native void gtk file selection hide fileop buttons int long filesel  gtk_file_selection_get_filename gtk_file_selection_get_selections gtk_file_selection_hide_fileop_buttons
public static final synchronized native int long gtk file selection get selections int long filesel public static final synchronized native void gtk file selection hide fileop buttons int long filesel public static final synchronized native int long gtk file selection new byte title  gtk_file_selection_get_selections gtk_file_selection_hide_fileop_buttons gtk_file_selection_new
public static final synchronized native void gtk file selection hide fileop buttons int long filesel public static final synchronized native int long gtk file selection new byte title public static final synchronized native void gtk file selection set filename int long filesel int long filename  gtk_file_selection_hide_fileop_buttons gtk_file_selection_new gtk_file_selection_set_filename
public static final synchronized native int long gtk file selection new byte title public static final synchronized native void gtk file selection set filename int long filesel int long filename public static final synchronized native void gtk file selection set select multiple int long filesel boolean select multiple  gtk_file_selection_new gtk_file_selection_set_filename gtk_file_selection_set_select_multiple select_multiple
public static final synchronized native void gtk file selection set filename int long filesel int long filename public static final synchronized native void gtk file selection set select multiple int long filesel boolean select multiple public static final synchronized native void gtk fixed move int long fixed int long widget int x int y  gtk_file_selection_set_filename gtk_file_selection_set_select_multiple select_multiple gtk_fixed_move
public static final synchronized native void gtk file selection set select multiple int long filesel boolean select multiple public static final synchronized native void gtk fixed move int long fixed int long widget int x int y public static final synchronized native int long gtk fixed new  gtk_file_selection_set_select_multiple select_multiple gtk_fixed_move gtk_fixed_new
public static final synchronized native void gtk fixed move int long fixed int long widget int x int y public static final synchronized native int long gtk fixed new public static final synchronized native void gtk fixed set has window int long fixed boolean has window  gtk_fixed_move gtk_fixed_new gtk_fixed_set_has_window has_window
public static final synchronized native int long gtk fixed new public static final synchronized native void gtk fixed set has window int long fixed boolean has window public static final synchronized native int long gtk font selection dialog get font name int long fsd  gtk_fixed_new gtk_fixed_set_has_window has_window gtk_font_selection_dialog_get_font_name
public static final synchronized native void gtk fixed set has window int long fixed boolean has window public static final synchronized native int long gtk font selection dialog get font name int long fsd public static final synchronized native int long gtk font selection dialog new byte title  gtk_fixed_set_has_window has_window gtk_font_selection_dialog_get_font_name gtk_font_selection_dialog_new
public static final synchronized native int long gtk font selection dialog get font name int long fsd public static final synchronized native int long gtk font selection dialog new byte title public static final synchronized native boolean gtk font selection dialog set font name int long fsd byte fontname  gtk_font_selection_dialog_get_font_name gtk_font_selection_dialog_new gtk_font_selection_dialog_set_font_name
public static final synchronized native int long gtk font selection dialog new byte title public static final synchronized native boolean gtk font selection dialog set font name int long fsd byte fontname public static final synchronized native int long gtk frame new byte label  gtk_font_selection_dialog_new gtk_font_selection_dialog_set_font_name gtk_frame_new
public static final synchronized native boolean gtk font selection dialog set font name int long fsd byte fontname public static final synchronized native int long gtk frame new byte label public static final synchronized native int long gtk frame get label widget int long frame  gtk_font_selection_dialog_set_font_name gtk_frame_new gtk_frame_get_label_widget
public static final synchronized native int long gtk frame new byte label public static final synchronized native int long gtk frame get label widget int long frame public static final synchronized native void gtk frame set label int long frame byte label  gtk_frame_new gtk_frame_get_label_widget gtk_frame_set_label
public static final synchronized native int long gtk frame get label widget int long frame public static final synchronized native void gtk frame set label int long frame byte label public static final synchronized native void gtk frame set label widget int long frame int long label widget  gtk_frame_get_label_widget gtk_frame_set_label gtk_frame_set_label_widget label_widget
public static final synchronized native void gtk frame set label int long frame byte label public static final synchronized native void gtk frame set label widget int long frame int long label widget public static final synchronized native void gtk frame set shadow type int long frame int type  gtk_frame_set_label gtk_frame_set_label_widget label_widget gtk_frame_set_shadow_type
public static final synchronized native void gtk frame set label widget int long frame int long label widget public static final synchronized native void gtk frame set shadow type int long frame int type public static final synchronized native int long gtk get current event  gtk_frame_set_label_widget label_widget gtk_frame_set_shadow_type gtk_get_current_event
public static final synchronized native void gtk frame set shadow type int long frame int type public static final synchronized native int long gtk get current event public static final synchronized native boolean gtk get current event state int state  gtk_frame_set_shadow_type gtk_get_current_event gtk_get_current_event_state
public static final synchronized native int long gtk get current event public static final synchronized native boolean gtk get current event state int state public static final synchronized native int gtk get current event time  gtk_get_current_event gtk_get_current_event_state gtk_get_current_event_time
public static final synchronized native boolean gtk get current event state int state public static final synchronized native int gtk get current event time public static final synchronized native int long gtk get default language  gtk_get_current_event_state gtk_get_current_event_time gtk_get_default_language
public static final synchronized native int gtk get current event time public static final synchronized native int long gtk get default language public static final synchronized native int long gtk get event widget int long event  gtk_get_current_event_time gtk_get_default_language gtk_get_event_widget
public static final synchronized native int long gtk get default language public static final synchronized native int long gtk get event widget int long event public static final synchronized native void gtk grab add int long widget  gtk_get_default_language gtk_get_event_widget gtk_grab_add
public static final synchronized native int long gtk get event widget int long event public static final synchronized native void gtk grab add int long widget public static final synchronized native int long gtk grab get current  gtk_get_event_widget gtk_grab_add gtk_grab_get_current
public static final synchronized native void gtk grab add int long widget public static final synchronized native int long gtk grab get current public static final synchronized native void gtk grab remove int long widget  gtk_grab_add gtk_grab_get_current gtk_grab_remove
public static final synchronized native int long gtk grab get current public static final synchronized native void gtk grab remove int long widget public static final synchronized native int long gtk hbox new boolean homogeneous int spacing  gtk_grab_get_current gtk_grab_remove gtk_hbox_new
public static final synchronized native void gtk grab remove int long widget public static final synchronized native int long gtk hbox new boolean homogeneous int spacing public static final synchronized native int long gtk hscale new int long adjustment  gtk_grab_remove gtk_hbox_new gtk_hscale_new
public static final synchronized native int long gtk hbox new boolean homogeneous int spacing public static final synchronized native int long gtk hscale new int long adjustment public static final synchronized native int long gtk hscrollbar new int long adjustment  gtk_hbox_new gtk_hscale_new gtk_hscrollbar_new
public static final synchronized native int long gtk hscale new int long adjustment public static final synchronized native int long gtk hscrollbar new int long adjustment public static final synchronized native int long gtk hseparator new  gtk_hscale_new gtk_hscrollbar_new gtk_hseparator_new
public static final synchronized native int long gtk hscrollbar new int long adjustment public static final synchronized native int long gtk hseparator new public static final synchronized native int long gtk icon factory lookup default byte stock id  gtk_hscrollbar_new gtk_hseparator_new gtk_icon_factory_lookup_default stock_id
public static final synchronized native int long gtk hseparator new public static final synchronized native int long gtk icon factory lookup default byte stock id public static final synchronized native int long gtk icon set render icon int long icon set int long style int direction int state int size int long widget int long detail  gtk_hseparator_new gtk_icon_factory_lookup_default stock_id gtk_icon_set_render_icon icon_set
public static final synchronized native int long gtk icon factory lookup default byte stock id public static final synchronized native int long gtk icon set render icon int long icon set int long style int direction int state int size int long widget int long detail public static final synchronized native boolean gtk im context filter keypress int long context int long event  gtk_icon_factory_lookup_default stock_id gtk_icon_set_render_icon icon_set gtk_im_context_filter_keypress
public static final synchronized native int long gtk icon set render icon int long icon set int long style int direction int state int size int long widget int long detail public static final synchronized native boolean gtk im context filter keypress int long context int long event public static final synchronized native void gtk im context focus in int long context  gtk_icon_set_render_icon icon_set gtk_im_context_filter_keypress gtk_im_context_focus_in
public static final synchronized native boolean gtk im context filter keypress int long context int long event public static final synchronized native void gtk im context focus in int long context public static final synchronized native void gtk im context focus out int long context  gtk_im_context_filter_keypress gtk_im_context_focus_in gtk_im_context_focus_out
public static final synchronized native void gtk im context focus in int long context public static final synchronized native void gtk im context focus out int long context public static final synchronized native void gtk im context get preedit string int long context int long str int long attrs int cursor pos  gtk_im_context_focus_in gtk_im_context_focus_out gtk_im_context_get_preedit_string cursor_pos
public static final synchronized native void gtk im context focus out int long context public static final synchronized native void gtk im context get preedit string int long context int long str int long attrs int cursor pos public static final synchronized native int long gtk im context get type  gtk_im_context_focus_out gtk_im_context_get_preedit_string cursor_pos gtk_im_context_get_type
public static final synchronized native void gtk im context get preedit string int long context int long str int long attrs int cursor pos public static final synchronized native int long gtk im context get type public static final synchronized native void gtk im context reset int long context  gtk_im_context_get_preedit_string cursor_pos gtk_im_context_get_type gtk_im_context_reset
public static final synchronized native int long gtk im context get type public static final synchronized native void gtk im context reset int long context public static final synchronized native void gtk im context set client window int long context int long window  gtk_im_context_get_type gtk_im_context_reset gtk_im_context_set_client_window
public static final synchronized native void gtk im context reset int long context public static final synchronized native void gtk im context set client window int long context int long window public static final synchronized native void gtk im context set cursor location int long context Gdk Rectangle area  gtk_im_context_reset gtk_im_context_set_client_window gtk_im_context_set_cursor_location GdkRectangle
public static final synchronized native void gtk im context set client window int long context int long window public static final synchronized native void gtk im context set cursor location int long context Gdk Rectangle area public static final synchronized native void gtk im multicontext append menuitems int long context int long menushell  gtk_im_context_set_client_window gtk_im_context_set_cursor_location GdkRectangle gtk_im_multicontext_append_menuitems
public static final synchronized native void gtk im context set cursor location int long context Gdk Rectangle area public static final synchronized native void gtk im multicontext append menuitems int long context int long menushell public static final synchronized native int long gtk im multicontext new  gtk_im_context_set_cursor_location GdkRectangle gtk_im_multicontext_append_menuitems gtk_im_multicontext_new
public static final synchronized native void gtk im multicontext append menuitems int long context int long menushell public static final synchronized native int long gtk im multicontext new public static final synchronized native int long gtk image menu item new with label byte label  gtk_im_multicontext_append_menuitems gtk_im_multicontext_new gtk_image_menu_item_new_with_label
public static final synchronized native int long gtk im multicontext new public static final synchronized native int long gtk image menu item new with label byte label public static final synchronized native void gtk image menu item set image int long menu item int long image  gtk_im_multicontext_new gtk_image_menu_item_new_with_label gtk_image_menu_item_set_image menu_item
public static final synchronized native int long gtk image menu item new with label byte label public static final synchronized native void gtk image menu item set image int long menu item int long image public static final synchronized native int long gtk image new  gtk_image_menu_item_new_with_label gtk_image_menu_item_set_image menu_item gtk_image_new
public static final synchronized native void gtk image menu item set image int long menu item int long image public static final synchronized native int long gtk image new public static final synchronized native int long gtk image new from pixmap int long pixmap int long mask  gtk_image_menu_item_set_image menu_item gtk_image_new gtk_image_new_from_pixmap
public static final synchronized native int long gtk image new public static final synchronized native int long gtk image new from pixmap int long pixmap int long mask public static final synchronized native void gtk image set from pixmap int long image int long pixmap int long mask  gtk_image_new gtk_image_new_from_pixmap gtk_image_set_from_pixmap
public static final synchronized native int long gtk image new from pixmap int long pixmap int long mask public static final synchronized native void gtk image set from pixmap int long image int long pixmap int long mask public static final synchronized native boolean gtk init check int long argc int long argv  gtk_image_new_from_pixmap gtk_image_set_from_pixmap gtk_init_check
public static final synchronized native void gtk image set from pixmap int long image int long pixmap int long mask public static final synchronized native boolean gtk init check int long argc int long argv public static final synchronized native int gtk label get mnemonic keyval int long label  gtk_image_set_from_pixmap gtk_init_check gtk_label_get_mnemonic_keyval
public static final synchronized native boolean gtk init check int long argc int long argv public static final synchronized native int gtk label get mnemonic keyval int long label public static final synchronized native int long gtk label new byte label  gtk_init_check gtk_label_get_mnemonic_keyval gtk_label_new
public static final synchronized native int gtk label get mnemonic keyval int long label public static final synchronized native int long gtk label new byte label public static final synchronized native int long gtk label new with mnemonic byte str  gtk_label_get_mnemonic_keyval gtk_label_new gtk_label_new_with_mnemonic
public static final synchronized native int long gtk label new byte label public static final synchronized native int long gtk label new with mnemonic byte str public static final synchronized native void gtk label set attributes int long label int long attrs  gtk_label_new gtk_label_new_with_mnemonic gtk_label_set_attributes
public static final synchronized native int long gtk label new with mnemonic byte str public static final synchronized native void gtk label set attributes int long label int long attrs public static final synchronized native void gtk label set justify int long label int jtype  gtk_label_new_with_mnemonic gtk_label_set_attributes gtk_label_set_justify
public static final synchronized native void gtk label set attributes int long label int long attrs public static final synchronized native void gtk label set justify int long label int jtype public static final synchronized native void gtk label set line wrap int long label boolean wrap  gtk_label_set_attributes gtk_label_set_justify gtk_label_set_line_wrap
public static final synchronized native void gtk label set justify int long label int jtype public static final synchronized native void gtk label set line wrap int long label boolean wrap public static final synchronized native void gtk label set text int long label int long str  gtk_label_set_justify gtk_label_set_line_wrap gtk_label_set_text
public static final synchronized native void gtk label set line wrap int long label boolean wrap public static final synchronized native void gtk label set text int long label int long str public static final synchronized native void gtk label set text with mnemonic int long label byte str  gtk_label_set_line_wrap gtk_label_set_text gtk_label_set_text_with_mnemonic
public static final synchronized native void gtk label set text int long label int long str public static final synchronized native void gtk label set text with mnemonic int long label byte str public static final synchronized native void gtk list store append int long list store int long iter  gtk_label_set_text gtk_label_set_text_with_mnemonic gtk_list_store_append list_store
public static final synchronized native void gtk label set text with mnemonic int long label byte str public static final synchronized native void gtk list store append int long list store int long iter public static final synchronized native void gtk list store clear int long store  gtk_label_set_text_with_mnemonic gtk_list_store_append list_store gtk_list_store_clear
public static final synchronized native void gtk list store append int long list store int long iter public static final synchronized native void gtk list store clear int long store public static final synchronized native void gtk list store insert int long list store int long iter int position  gtk_list_store_append list_store gtk_list_store_clear gtk_list_store_insert list_store
public static final synchronized native void gtk list store clear int long store public static final synchronized native void gtk list store insert int long list store int long iter int position public static final synchronized native int long gtk list store newv int num Columns int long types  gtk_list_store_clear gtk_list_store_insert list_store gtk_list_store_newv numColumns
public static final synchronized native void gtk list store insert int long list store int long iter int position public static final synchronized native int long gtk list store newv int num Columns int long types public static final synchronized native void gtk list store remove int long list store int long iter  gtk_list_store_insert list_store gtk_list_store_newv numColumns gtk_list_store_remove list_store
public static final synchronized native int long gtk list store newv int num Columns int long types public static final synchronized native void gtk list store remove int long list store int long iter public static final synchronized native void gtk list store set int long store int long iter int column byte value int terminator  gtk_list_store_newv numColumns gtk_list_store_remove list_store gtk_list_store_set
public static final synchronized native void gtk list store remove int long list store int long iter public static final synchronized native void gtk list store set int long store int long iter int column byte value int terminator public static final synchronized native void gtk list store set int long store int long iter int column int value int terminator  gtk_list_store_remove list_store gtk_list_store_set gtk_list_store_set
public static final synchronized native void gtk list store set int long store int long iter int column byte value int terminator public static final synchronized native void gtk list store set int long store int long iter int column int value int terminator public static final synchronized native void gtk list store set int long store int long iter int column long value int terminator  gtk_list_store_set gtk_list_store_set gtk_list_store_set
public static final synchronized native void gtk list store set int long store int long iter int column int value int terminator public static final synchronized native void gtk list store set int long store int long iter int column long value int terminator public static final synchronized native void gtk list store set int long store int long iter int column Gdk Color value int terminator  gtk_list_store_set gtk_list_store_set gtk_list_store_set GdkColor
public static final synchronized native void gtk list store set int long store int long iter int column long value int terminator public static final synchronized native void gtk list store set int long store int long iter int column Gdk Color value int terminator public static final synchronized native void gtk list store set int long store int long iter int column boolean value int terminator  gtk_list_store_set gtk_list_store_set GdkColor gtk_list_store_set
public static final synchronized native void gtk list store set int long store int long iter int column Gdk Color value int terminator public static final synchronized native void gtk list store set int long store int long iter int column boolean value int terminator public static final synchronized native int gtk major version  gtk_list_store_set GdkColor gtk_list_store_set gtk_major_version
public static final synchronized native void gtk list store set int long store int long iter int column boolean value int terminator public static final synchronized native int gtk major version public static final synchronized native int gtk minor version  gtk_list_store_set gtk_major_version gtk_minor_version
public static final synchronized native int gtk major version public static final synchronized native int gtk minor version public static final synchronized native int gtk micro version  gtk_major_version gtk_minor_version gtk_micro_version
public static final synchronized native int gtk minor version public static final synchronized native int gtk micro version public static final synchronized native void gtk main  gtk_minor_version gtk_micro_version gtk_main
public static final synchronized native int gtk micro version public static final synchronized native void gtk main public static final synchronized native int gtk main iteration  gtk_micro_version gtk_main gtk_main_iteration
public static final synchronized native void gtk main public static final synchronized native int gtk main iteration public static final synchronized native void gtk main do event int long event  gtk_main gtk_main_iteration gtk_main_do_event
public static final synchronized native int gtk main iteration public static final synchronized native void gtk main do event int long event public static final synchronized native int long gtk menu bar new  gtk_main_iteration gtk_main_do_event gtk_menu_bar_new
public static final synchronized native void gtk main do event int long event public static final synchronized native int long gtk menu bar new public static final synchronized native void gtk menu item remove submenu int long menu item  gtk_main_do_event gtk_menu_bar_new gtk_menu_item_remove_submenu menu_item
public static final synchronized native int long gtk menu bar new public static final synchronized native void gtk menu item remove submenu int long menu item public static final synchronized native void gtk menu item set submenu int long menu item int long submenu  gtk_menu_bar_new gtk_menu_item_remove_submenu menu_item gtk_menu_item_set_submenu menu_item
public static final synchronized native void gtk menu item remove submenu int long menu item public static final synchronized native void gtk menu item set submenu int long menu item int long submenu public static final synchronized native int long gtk menu new  gtk_menu_item_remove_submenu menu_item gtk_menu_item_set_submenu menu_item gtk_menu_new
public static final synchronized native void gtk menu item set submenu int long menu item int long submenu public static final synchronized native int long gtk menu new public static final synchronized native void gtk menu popdown int long menu  gtk_menu_item_set_submenu menu_item gtk_menu_new gtk_menu_popdown
public static final synchronized native int long gtk menu new public static final synchronized native void gtk menu popdown int long menu public static final synchronized native void gtk menu popup int long menu int long parent menu shell int long parent menu item int long func int long data int button int activate time  gtk_menu_new gtk_menu_popdown gtk_menu_popup parent_menu_shell parent_menu_item activate_time
public static final synchronized native void gtk menu popdown int long menu public static final synchronized native void gtk menu popup int long menu int long parent menu shell int long parent menu item int long func int long data int button int activate time public static final synchronized native void gtk menu shell deactivate int long menu shell  gtk_menu_popdown gtk_menu_popup parent_menu_shell parent_menu_item activate_time gtk_menu_shell_deactivate menu_shell
public static final synchronized native void gtk menu popup int long menu int long parent menu shell int long parent menu item int long func int long data int button int activate time public static final synchronized native void gtk menu shell deactivate int long menu shell public static final synchronized native void gtk menu shell insert int long menu shell int long child int position  gtk_menu_popup parent_menu_shell parent_menu_item activate_time gtk_menu_shell_deactivate menu_shell gtk_menu_shell_insert menu_shell
public static final synchronized native void gtk menu shell deactivate int long menu shell public static final synchronized native void gtk menu shell insert int long menu shell int long child int position public static final synchronized native void gtk menu shell select item int long menu shell int long menu item  gtk_menu_shell_deactivate menu_shell gtk_menu_shell_insert menu_shell gtk_menu_shell_select_item menu_shell menu_item
public static final synchronized native void gtk menu shell insert int long menu shell int long child int position public static final synchronized native void gtk menu shell select item int long menu shell int long menu item public static final synchronized native int long gtk message dialog new int long parent int flags int type int buttons String message format  gtk_menu_shell_insert menu_shell gtk_menu_shell_select_item menu_shell menu_item gtk_message_dialog_new message_format
public static final synchronized native void gtk menu shell select item int long menu shell int long menu item public static final synchronized native int long gtk message dialog new int long parent int flags int type int buttons String message format public static final synchronized native void gtk misc set alignment int long misc float xalign float yalign  gtk_menu_shell_select_item menu_shell menu_item gtk_message_dialog_new message_format gtk_misc_set_alignment
public static final synchronized native int long gtk message dialog new int long parent int flags int type int buttons String message format public static final synchronized native void gtk misc set alignment int long misc float xalign float yalign public static final synchronized native int gtk notebook get current page int long notebook  gtk_message_dialog_new message_format gtk_misc_set_alignment gtk_notebook_get_current_page
public static final synchronized native void gtk misc set alignment int long misc float xalign float yalign public static final synchronized native int gtk notebook get current page int long notebook public static final synchronized native boolean gtk notebook get scrollable int long notebook  gtk_misc_set_alignment gtk_notebook_get_current_page gtk_notebook_get_scrollable
public static final synchronized native int gtk notebook get current page int long notebook public static final synchronized native boolean gtk notebook get scrollable int long notebook public static final synchronized native void gtk notebook insert page int long notebook int long child int long tab label int position  gtk_notebook_get_current_page gtk_notebook_get_scrollable gtk_notebook_insert_page tab_label
public static final synchronized native boolean gtk notebook get scrollable int long notebook public static final synchronized native void gtk notebook insert page int long notebook int long child int long tab label int position public static final synchronized native int long gtk notebook new  gtk_notebook_get_scrollable gtk_notebook_insert_page tab_label gtk_notebook_new
public static final synchronized native void gtk notebook insert page int long notebook int long child int long tab label int position public static final synchronized native int long gtk notebook new public static final synchronized native void gtk notebook remove page int long notebook int page num  gtk_notebook_insert_page tab_label gtk_notebook_new gtk_notebook_remove_page page_num
public static final synchronized native int long gtk notebook new public static final synchronized native void gtk notebook remove page int long notebook int page num public static final synchronized native void gtk notebook set current page int long notebook int page num  gtk_notebook_new gtk_notebook_remove_page page_num gtk_notebook_set_current_page page_num
public static final synchronized native void gtk notebook remove page int long notebook int page num public static final synchronized native void gtk notebook set current page int long notebook int page num public static final synchronized native void gtk notebook set scrollable int long notebook boolean scrollable  gtk_notebook_remove_page page_num gtk_notebook_set_current_page page_num gtk_notebook_set_scrollable
public static final synchronized native void gtk notebook set current page int long notebook int page num public static final synchronized native void gtk notebook set scrollable int long notebook boolean scrollable public static final synchronized native void gtk notebook set show tabs int long notebook boolean show tabs  gtk_notebook_set_current_page page_num gtk_notebook_set_scrollable gtk_notebook_set_show_tabs show_tabs
public static final synchronized native void gtk notebook set scrollable int long notebook boolean scrollable public static final synchronized native void gtk notebook set show tabs int long notebook boolean show tabs public static final synchronized native void gtk notebook set tab pos int long notebook int pos  gtk_notebook_set_scrollable gtk_notebook_set_show_tabs show_tabs gtk_notebook_set_tab_pos
public static final synchronized native void gtk notebook set show tabs int long notebook boolean show tabs public static final synchronized native void gtk notebook set tab pos int long notebook int pos public static final synchronized native void gtk object sink int long object  gtk_notebook_set_show_tabs show_tabs gtk_notebook_set_tab_pos gtk_object_sink
public static final synchronized native void gtk notebook set tab pos int long notebook int pos public static final synchronized native void gtk object sink int long object public static final synchronized native void gtk paint handle int long style int long window int state type int shadow type Gdk Rectangle area int long widget byte detail int x int y int width int height int orientation  gtk_notebook_set_tab_pos gtk_object_sink gtk_paint_handle state_type shadow_type GdkRectangle
public static final synchronized native void gtk object sink int long object public static final synchronized native void gtk paint handle int long style int long window int state type int shadow type Gdk Rectangle area int long widget byte detail int x int y int width int height int orientation public static final synchronized native int long gtk plug get id int long plug  gtk_object_sink gtk_paint_handle state_type shadow_type GdkRectangle gtk_plug_get_id
public static final synchronized native void gtk paint handle int long style int long window int state type int shadow type Gdk Rectangle area int long widget byte detail int x int y int width int height int orientation public static final synchronized native int long gtk plug get id int long plug public static final synchronized native int long gtk plug new int long socket id  gtk_paint_handle state_type shadow_type GdkRectangle gtk_plug_get_id gtk_plug_new socket_id
public static final synchronized native int long gtk plug get id int long plug public static final synchronized native int long gtk plug new int long socket id public static final synchronized native int long gtk progress bar new  gtk_plug_get_id gtk_plug_new socket_id gtk_progress_bar_new
public static final synchronized native int long gtk plug new int long socket id public static final synchronized native int long gtk progress bar new public static final synchronized native void gtk progress bar pulse int long pbar  gtk_plug_new socket_id gtk_progress_bar_new gtk_progress_bar_pulse
public static final synchronized native int long gtk progress bar new public static final synchronized native void gtk progress bar pulse int long pbar public static final synchronized native void gtk progress bar set fraction int long pbar double fraction  gtk_progress_bar_new gtk_progress_bar_pulse gtk_progress_bar_set_fraction
public static final synchronized native void gtk progress bar pulse int long pbar public static final synchronized native void gtk progress bar set fraction int long pbar double fraction public static final synchronized native void gtk progress bar set orientation int long pbar int orientation  gtk_progress_bar_pulse gtk_progress_bar_set_fraction gtk_progress_bar_set_orientation
public static final synchronized native void gtk progress bar set fraction int long pbar double fraction public static final synchronized native void gtk progress bar set orientation int long pbar int orientation public static final synchronized native int long gtk radio button get group int long radio button  gtk_progress_bar_set_fraction gtk_progress_bar_set_orientation gtk_radio_button_get_group radio_button
public static final synchronized native void gtk progress bar set orientation int long pbar int orientation public static final synchronized native int long gtk radio button get group int long radio button public static final synchronized native int long gtk radio button new int long group  gtk_progress_bar_set_orientation gtk_radio_button_get_group radio_button gtk_radio_button_new
public static final synchronized native int long gtk radio button get group int long radio button public static final synchronized native int long gtk radio button new int long group public static final synchronized native int long gtk radio menu item new with label int long group byte label  gtk_radio_button_get_group radio_button gtk_radio_button_new gtk_radio_menu_item_new_with_label
public static final synchronized native int long gtk radio button new int long group public static final synchronized native int long gtk radio menu item new with label int long group byte label public static final synchronized native int long gtk range get adjustment int long range  gtk_radio_button_new gtk_radio_menu_item_new_with_label gtk_range_get_adjustment
public static final synchronized native int long gtk radio menu item new with label int long group byte label public static final synchronized native int long gtk range get adjustment int long range public static final synchronized native void gtk range set increments int long range double step double page  gtk_radio_menu_item_new_with_label gtk_range_get_adjustment gtk_range_set_increments
public static final synchronized native int long gtk range get adjustment int long range public static final synchronized native void gtk range set increments int long range double step double page public static final synchronized native void gtk range set range int long range double min double max  gtk_range_get_adjustment gtk_range_set_increments gtk_range_set_range
public static final synchronized native void gtk range set increments int long range double step double page public static final synchronized native void gtk range set range int long range double min double max public static final synchronized native void gtk range set value int long range double value  gtk_range_set_increments gtk_range_set_range gtk_range_set_value
public static final synchronized native void gtk range set range int long range double min double max public static final synchronized native void gtk range set value int long range double value public static final synchronized native void gtk rc parse string byte rc string  gtk_range_set_range gtk_range_set_value gtk_rc_parse_string rc_string
public static final synchronized native void gtk range set value int long range double value public static final synchronized native void gtk rc parse string byte rc string public static final synchronized native int long gtk rc style get bg pixmap name int long style int index  gtk_range_set_value gtk_rc_parse_string rc_string gtk_rc_style_get_bg_pixmap_name
public static final synchronized native void gtk rc parse string byte rc string public static final synchronized native int long gtk rc style get bg pixmap name int long style int index public static final synchronized native int gtk rc style get color flags int long style int index  gtk_rc_parse_string rc_string gtk_rc_style_get_bg_pixmap_name gtk_rc_style_get_color_flags
public static final synchronized native int long gtk rc style get bg pixmap name int long style int index public static final synchronized native int gtk rc style get color flags int long style int index public static final synchronized native void gtk rc style set bg int long style int index Gdk Color color  gtk_rc_style_get_bg_pixmap_name gtk_rc_style_get_color_flags gtk_rc_style_set_bg GdkColor
public static final synchronized native int gtk rc style get color flags int long style int index public static final synchronized native void gtk rc style set bg int long style int index Gdk Color color public static final synchronized native void gtk rc style set bg pixmap name int long style int index int long name  gtk_rc_style_get_color_flags gtk_rc_style_set_bg GdkColor gtk_rc_style_set_bg_pixmap_name
public static final synchronized native void gtk rc style set bg int long style int index Gdk Color color public static final synchronized native void gtk rc style set bg pixmap name int long style int index int long name public static final synchronized native void gtk rc style set color flags int long style int index int flag  gtk_rc_style_set_bg GdkColor gtk_rc_style_set_bg_pixmap_name gtk_rc_style_set_color_flags
public static final synchronized native void gtk rc style set bg pixmap name int long style int index int long name public static final synchronized native void gtk rc style set color flags int long style int index int flag public static final synchronized native void gtk scale set digits int long scale int digits  gtk_rc_style_set_bg_pixmap_name gtk_rc_style_set_color_flags gtk_scale_set_digits
public static final synchronized native void gtk rc style set color flags int long style int index int flag public static final synchronized native void gtk scale set digits int long scale int digits public static final synchronized native void gtk scale set draw value int long scale boolean draw value  gtk_rc_style_set_color_flags gtk_scale_set_digits gtk_scale_set_draw_value draw_value
public static final synchronized native void gtk scale set digits int long scale int digits public static final synchronized native void gtk scale set draw value int long scale boolean draw value public static final synchronized native int long gtk scrolled window get hadjustment int long scrolled window  gtk_scale_set_digits gtk_scale_set_draw_value draw_value gtk_scrolled_window_get_hadjustment scrolled_window
public static final synchronized native void gtk scale set draw value int long scale boolean draw value public static final synchronized native int long gtk scrolled window get hadjustment int long scrolled window public static final synchronized native void gtk scrolled window get policy int long scrolled window int hscrollbar policy int vscrollbar policy  gtk_scale_set_draw_value draw_value gtk_scrolled_window_get_hadjustment scrolled_window gtk_scrolled_window_get_policy scrolled_window hscrollbar_policy vscrollbar_policy
public static final synchronized native int long gtk scrolled window get hadjustment int long scrolled window public static final synchronized native void gtk scrolled window get policy int long scrolled window int hscrollbar policy int vscrollbar policy public static final synchronized native int gtk scrolled window get shadow type int long scrolled window  gtk_scrolled_window_get_hadjustment scrolled_window gtk_scrolled_window_get_policy scrolled_window hscrollbar_policy vscrollbar_policy gtk_scrolled_window_get_shadow_type scrolled_window
public static final synchronized native void gtk scrolled window get policy int long scrolled window int hscrollbar policy int vscrollbar policy public static final synchronized native int gtk scrolled window get shadow type int long scrolled window public static final synchronized native int long gtk scrolled window get vadjustment int long scrolled window  gtk_scrolled_window_get_policy scrolled_window hscrollbar_policy vscrollbar_policy gtk_scrolled_window_get_shadow_type scrolled_window gtk_scrolled_window_get_vadjustment scrolled_window
public static final synchronized native int gtk scrolled window get shadow type int long scrolled window public static final synchronized native int long gtk scrolled window get vadjustment int long scrolled window public static final synchronized native int long gtk scrolled window new int long hadjustment int long vadjustment  gtk_scrolled_window_get_shadow_type scrolled_window gtk_scrolled_window_get_vadjustment scrolled_window gtk_scrolled_window_new
public static final synchronized native int long gtk scrolled window get vadjustment int long scrolled window public static final synchronized native int long gtk scrolled window new int long hadjustment int long vadjustment public static final synchronized native void gtk scrolled window set placement int long scrolled window int placement  gtk_scrolled_window_get_vadjustment scrolled_window gtk_scrolled_window_new gtk_scrolled_window_set_placement scrolled_window
public static final synchronized native int long gtk scrolled window new int long hadjustment int long vadjustment public static final synchronized native void gtk scrolled window set placement int long scrolled window int placement public static final synchronized native void gtk scrolled window set policy int long scrolled window int hscrollbar policy int vscrollbar policy  gtk_scrolled_window_new gtk_scrolled_window_set_placement scrolled_window gtk_scrolled_window_set_policy scrolled_window hscrollbar_policy vscrollbar_policy
public static final synchronized native void gtk scrolled window set placement int long scrolled window int placement public static final synchronized native void gtk scrolled window set policy int long scrolled window int hscrollbar policy int vscrollbar policy public static final synchronized native void gtk scrolled window set shadow type int long scrolled window int type  gtk_scrolled_window_set_placement scrolled_window gtk_scrolled_window_set_policy scrolled_window hscrollbar_policy vscrollbar_policy gtk_scrolled_window_set_shadow_type scrolled_window
public static final synchronized native void gtk scrolled window set policy int long scrolled window int hscrollbar policy int vscrollbar policy public static final synchronized native void gtk scrolled window set shadow type int long scrolled window int type public static final synchronized native void gtk selection data free int long selection data  gtk_scrolled_window_set_policy scrolled_window hscrollbar_policy vscrollbar_policy gtk_scrolled_window_set_shadow_type scrolled_window gtk_selection_data_free selection_data
public static final synchronized native void gtk scrolled window set shadow type int long scrolled window int type public static final synchronized native void gtk selection data free int long selection data public static final synchronized native void gtk selection data set int long selection data int long type int format int long data int length  gtk_scrolled_window_set_shadow_type scrolled_window gtk_selection_data_free selection_data gtk_selection_data_set selection_data
public static final synchronized native void gtk selection data free int long selection data public static final synchronized native void gtk selection data set int long selection data int long type int format int long data int length public static final synchronized native int long gtk separator menu item new  gtk_selection_data_free selection_data gtk_selection_data_set selection_data gtk_separator_menu_item_new
public static final synchronized native void gtk selection data set int long selection data int long type int format int long data int length public static final synchronized native int long gtk separator menu item new public static final synchronized native int long gtk set locale  gtk_selection_data_set selection_data gtk_separator_menu_item_new gtk_set_locale
public static final synchronized native int long gtk separator menu item new public static final synchronized native int long gtk set locale public static final synchronized native int long gtk socket get id int long socket  gtk_separator_menu_item_new gtk_set_locale gtk_socket_get_id
public static final synchronized native int long gtk set locale public static final synchronized native int long gtk socket get id int long socket public static final synchronized native int long gtk socket new  gtk_set_locale gtk_socket_get_id gtk_socket_new
public static final synchronized native int long gtk socket get id int long socket public static final synchronized native int long gtk socket new public static final synchronized native void gtk style get base int long style int index Gdk Color color  gtk_socket_get_id gtk_socket_new gtk_style_get_base GdkColor
public static final synchronized native int long gtk socket new public static final synchronized native void gtk style get base int long style int index Gdk Color color public static final synchronized native void gtk style get black int long style Gdk Color color  gtk_socket_new gtk_style_get_base GdkColor gtk_style_get_black GdkColor
public static final synchronized native void gtk style get base int long style int index Gdk Color color public static final synchronized native void gtk style get black int long style Gdk Color color public static final synchronized native void gtk style get bg int long style int index Gdk Color color  gtk_style_get_base GdkColor gtk_style_get_black GdkColor gtk_style_get_bg GdkColor
public static final synchronized native void gtk style get black int long style Gdk Color color public static final synchronized native void gtk style get bg int long style int index Gdk Color color public static final synchronized native void gtk style get dark int long style int index Gdk Color color  gtk_style_get_black GdkColor gtk_style_get_bg GdkColor gtk_style_get_dark GdkColor
public static final synchronized native void gtk style get bg int long style int index Gdk Color color public static final synchronized native void gtk style get dark int long style int index Gdk Color color public static final synchronized native void gtk style get fg int long style int index Gdk Color color  gtk_style_get_bg GdkColor gtk_style_get_dark GdkColor gtk_style_get_fg GdkColor
public static final synchronized native void gtk style get dark int long style int index Gdk Color color public static final synchronized native void gtk style get fg int long style int index Gdk Color color public static final synchronized native int long gtk style get font desc int long style  gtk_style_get_dark GdkColor gtk_style_get_fg GdkColor gtk_style_get_font_desc
public static final synchronized native void gtk style get fg int long style int index Gdk Color color public static final synchronized native int long gtk style get font desc int long style public static final synchronized native void gtk style get light int long style int index Gdk Color color  gtk_style_get_fg GdkColor gtk_style_get_font_desc gtk_style_get_light GdkColor
public static final synchronized native int long gtk style get font desc int long style public static final synchronized native void gtk style get light int long style int index Gdk Color color public static final synchronized native void gtk style get text int long style int index Gdk Color color  gtk_style_get_font_desc gtk_style_get_light GdkColor gtk_style_get_text GdkColor
public static final synchronized native void gtk style get light int long style int index Gdk Color color public static final synchronized native void gtk style get text int long style int index Gdk Color color public static final synchronized native int gtk style get xthickness int long style  gtk_style_get_light GdkColor gtk_style_get_text GdkColor gtk_style_get_xthickness
public static final synchronized native void gtk style get text int long style int index Gdk Color color public static final synchronized native int gtk style get xthickness int long style public static final synchronized native int gtk style get ythickness int long style  gtk_style_get_text GdkColor gtk_style_get_xthickness gtk_style_get_ythickness
public static final synchronized native int gtk style get xthickness int long style public static final synchronized native int gtk style get ythickness int long style public static final synchronized native int long gtk target list new int long targets int ntargets  gtk_style_get_xthickness gtk_style_get_ythickness gtk_target_list_new
public static final synchronized native int gtk style get ythickness int long style public static final synchronized native int long gtk target list new int long targets int ntargets public static final synchronized native void gtk target list unref int long list  gtk_style_get_ythickness gtk_target_list_new gtk_target_list_unref
public static final synchronized native int long gtk target list new int long targets int ntargets public static final synchronized native void gtk target list unref int long list public static final synchronized native void gtk text buffer copy clipboard int long buffer int long clipboard  gtk_target_list_new gtk_target_list_unref gtk_text_buffer_copy_clipboard
public static final synchronized native void gtk target list unref int long list public static final synchronized native void gtk text buffer copy clipboard int long buffer int long clipboard public static final synchronized native void gtk text buffer cut clipboard int long buffer int long clipboard boolean default editable  gtk_target_list_unref gtk_text_buffer_copy_clipboard gtk_text_buffer_cut_clipboard default_editable
public static final synchronized native void gtk text buffer copy clipboard int long buffer int long clipboard public static final synchronized native void gtk text buffer cut clipboard int long buffer int long clipboard boolean default editable public static final synchronized native void gtk text buffer delete int long buffer byte start byte end  gtk_text_buffer_copy_clipboard gtk_text_buffer_cut_clipboard default_editable gtk_text_buffer_delete
public static final synchronized native void gtk text buffer cut clipboard int long buffer int long clipboard boolean default editable public static final synchronized native void gtk text buffer delete int long buffer byte start byte end public static final synchronized native void gtk text buffer get bounds int long buffer byte start byte end  gtk_text_buffer_cut_clipboard default_editable gtk_text_buffer_delete gtk_text_buffer_get_bounds
public static final synchronized native void gtk text buffer delete int long buffer byte start byte end public static final synchronized native void gtk text buffer get bounds int long buffer byte start byte end public static final synchronized native int gtk text buffer get char count int long buffer  gtk_text_buffer_delete gtk_text_buffer_get_bounds gtk_text_buffer_get_char_count
public static final synchronized native void gtk text buffer get bounds int long buffer byte start byte end public static final synchronized native int gtk text buffer get char count int long buffer public static final synchronized native void gtk text buffer get end iter int long buffer byte iter  gtk_text_buffer_get_bounds gtk_text_buffer_get_char_count gtk_text_buffer_get_end_iter
public static final synchronized native int gtk text buffer get char count int long buffer public static final synchronized native void gtk text buffer get end iter int long buffer byte iter public static final synchronized native int long gtk text buffer get insert int long buffer  gtk_text_buffer_get_char_count gtk_text_buffer_get_end_iter gtk_text_buffer_get_insert
public static final synchronized native void gtk text buffer get end iter int long buffer byte iter public static final synchronized native int long gtk text buffer get insert int long buffer public static final synchronized native void gtk text buffer get iter at line int long buffer byte iter int line number  gtk_text_buffer_get_end_iter gtk_text_buffer_get_insert gtk_text_buffer_get_iter_at_line line_number
public static final synchronized native int long gtk text buffer get insert int long buffer public static final synchronized native void gtk text buffer get iter at line int long buffer byte iter int line number public static final synchronized native void gtk text buffer get iter at mark int long buffer byte iter int long mark  gtk_text_buffer_get_insert gtk_text_buffer_get_iter_at_line line_number gtk_text_buffer_get_iter_at_mark
public static final synchronized native void gtk text buffer get iter at line int long buffer byte iter int line number public static final synchronized native void gtk text buffer get iter at mark int long buffer byte iter int long mark public static final synchronized native void gtk text buffer get iter at offset int long buffer byte iter int char offset  gtk_text_buffer_get_iter_at_line line_number gtk_text_buffer_get_iter_at_mark gtk_text_buffer_get_iter_at_offset char_offset
public static final synchronized native void gtk text buffer get iter at mark int long buffer byte iter int long mark public static final synchronized native void gtk text buffer get iter at offset int long buffer byte iter int char offset public static final synchronized native int gtk text buffer get line count int long buffer  gtk_text_buffer_get_iter_at_mark gtk_text_buffer_get_iter_at_offset char_offset gtk_text_buffer_get_line_count
public static final synchronized native void gtk text buffer get iter at offset int long buffer byte iter int char offset public static final synchronized native int gtk text buffer get line count int long buffer public static final synchronized native int long gtk text buffer get selection bound int long buffer  gtk_text_buffer_get_iter_at_offset char_offset gtk_text_buffer_get_line_count gtk_text_buffer_get_selection_bound
public static final synchronized native int gtk text buffer get line count int long buffer public static final synchronized native int long gtk text buffer get selection bound int long buffer public static final synchronized native boolean gtk text buffer get selection bounds int long buffer byte start byte end  gtk_text_buffer_get_line_count gtk_text_buffer_get_selection_bound gtk_text_buffer_get_selection_bounds
public static final synchronized native int long gtk text buffer get selection bound int long buffer public static final synchronized native boolean gtk text buffer get selection bounds int long buffer byte start byte end public static final synchronized native int long gtk text buffer get text int long buffer byte start byte end boolean include hidden chars  gtk_text_buffer_get_selection_bound gtk_text_buffer_get_selection_bounds gtk_text_buffer_get_text include_hidden_chars
public static final synchronized native boolean gtk text buffer get selection bounds int long buffer byte start byte end public static final synchronized native int long gtk text buffer get text int long buffer byte start byte end boolean include hidden chars public static final synchronized native void gtk text buffer insert int long buffer byte iter byte text int len  gtk_text_buffer_get_selection_bounds gtk_text_buffer_get_text include_hidden_chars gtk_text_buffer_insert
public static final synchronized native int long gtk text buffer get text int long buffer byte start byte end boolean include hidden chars public static final synchronized native void gtk text buffer insert int long buffer byte iter byte text int len public static final synchronized native void gtk text buffer insert int long buffer int long iter byte text int len  gtk_text_buffer_get_text include_hidden_chars gtk_text_buffer_insert gtk_text_buffer_insert
public static final synchronized native void gtk text buffer insert int long buffer byte iter byte text int len public static final synchronized native void gtk text buffer insert int long buffer int long iter byte text int len public static final synchronized native void gtk text buffer move mark int long buffer int long mark byte where  gtk_text_buffer_insert gtk_text_buffer_insert gtk_text_buffer_move_mark
public static final synchronized native void gtk text buffer insert int long buffer int long iter byte text int len public static final synchronized native void gtk text buffer move mark int long buffer int long mark byte where public static final synchronized native void gtk text buffer paste clipboard int long buffer int long clipboard byte override location boolean default editable  gtk_text_buffer_insert gtk_text_buffer_move_mark gtk_text_buffer_paste_clipboard override_location default_editable
public static final synchronized native void gtk text buffer move mark int long buffer int long mark byte where public static final synchronized native void gtk text buffer paste clipboard int long buffer int long clipboard byte override location boolean default editable public static final synchronized native void gtk text buffer place cursor int long buffer byte where  gtk_text_buffer_move_mark gtk_text_buffer_paste_clipboard override_location default_editable gtk_text_buffer_place_cursor
public static final synchronized native void gtk text buffer paste clipboard int long buffer int long clipboard byte override location boolean default editable public static final synchronized native void gtk text buffer place cursor int long buffer byte where public static final synchronized native void gtk text buffer set text int long buffer byte text int len  gtk_text_buffer_paste_clipboard override_location default_editable gtk_text_buffer_place_cursor gtk_text_buffer_set_text
public static final synchronized native void gtk text buffer place cursor int long buffer byte where public static final synchronized native void gtk text buffer set text int long buffer byte text int len public static final synchronized native int gtk text iter get line byte iter  gtk_text_buffer_place_cursor gtk_text_buffer_set_text gtk_text_iter_get_line
public static final synchronized native void gtk text buffer set text int long buffer byte text int len public static final synchronized native int gtk text iter get line byte iter public static final synchronized native int gtk text iter get offset byte iter  gtk_text_buffer_set_text gtk_text_iter_get_line gtk_text_iter_get_offset
public static final synchronized native int gtk text iter get line byte iter public static final synchronized native int gtk text iter get offset byte iter public static final synchronized native void gtk text view buffer to window coords int long text view int win int buffer x int buffer y int window x int window y  gtk_text_iter_get_line gtk_text_iter_get_offset gtk_text_view_buffer_to_window_coords text_view buffer_x buffer_y window_x window_y
public static final synchronized native int gtk text iter get offset byte iter public static final synchronized native void gtk text view buffer to window coords int long text view int win int buffer x int buffer y int window x int window y public static final synchronized native int long gtk text view get buffer int long text view  gtk_text_iter_get_offset gtk_text_view_buffer_to_window_coords text_view buffer_x buffer_y window_x window_y gtk_text_view_get_buffer text_view
public static final synchronized native void gtk text view buffer to window coords int long text view int win int buffer x int buffer y int window x int window y public static final synchronized native int long gtk text view get buffer int long text view public static final synchronized native boolean gtk text view get editable int long text view  gtk_text_view_buffer_to_window_coords text_view buffer_x buffer_y window_x window_y gtk_text_view_get_buffer text_view gtk_text_view_get_editable text_view
public static final synchronized native int long gtk text view get buffer int long text view public static final synchronized native boolean gtk text view get editable int long text view public static final synchronized native void gtk text view get iter location int long text view byte iter Gdk Rectangle location  gtk_text_view_get_buffer text_view gtk_text_view_get_editable text_view gtk_text_view_get_iter_location text_view GdkRectangle
public static final synchronized native boolean gtk text view get editable int long text view public static final synchronized native void gtk text view get iter location int long text view byte iter Gdk Rectangle location public static final synchronized native void gtk text view get line at y int long text view byte target iter int y int line top  gtk_text_view_get_editable text_view gtk_text_view_get_iter_location text_view GdkRectangle gtk_text_view_get_line_at_y text_view target_iter line_top
public static final synchronized native void gtk text view get iter location int long text view byte iter Gdk Rectangle location public static final synchronized native void gtk text view get line at y int long text view byte target iter int y int line top public static final synchronized native void gtk text view get visible rect int long text view Gdk Rectangle visible rect  gtk_text_view_get_iter_location text_view GdkRectangle gtk_text_view_get_line_at_y text_view target_iter line_top gtk_text_view_get_visible_rect text_view GdkRectangle visible_rect
public static final synchronized native void gtk text view get line at y int long text view byte target iter int y int line top public static final synchronized native void gtk text view get visible rect int long text view Gdk Rectangle visible rect public static final synchronized native int long gtk text view get window int long text view int win  gtk_text_view_get_line_at_y text_view target_iter line_top gtk_text_view_get_visible_rect text_view GdkRectangle visible_rect gtk_text_view_get_window text_view
public static final synchronized native void gtk text view get visible rect int long text view Gdk Rectangle visible rect public static final synchronized native int long gtk text view get window int long text view int win public static final synchronized native int long gtk text view new  gtk_text_view_get_visible_rect text_view GdkRectangle visible_rect gtk_text_view_get_window text_view gtk_text_view_new
public static final synchronized native int long gtk text view get window int long text view int win public static final synchronized native int long gtk text view new public static final synchronized native void gtk text view scroll mark onscreen int long text view int long mark  gtk_text_view_get_window text_view gtk_text_view_new gtk_text_view_scroll_mark_onscreen text_view
public static final synchronized native int long gtk text view new public static final synchronized native void gtk text view scroll mark onscreen int long text view int long mark public static final synchronized native boolean gtk text view scroll to iter int long text view byte iter double within margin boolean use align double xalign double yalign  gtk_text_view_new gtk_text_view_scroll_mark_onscreen text_view gtk_text_view_scroll_to_iter text_view within_margin use_align
public static final synchronized native void gtk text view scroll mark onscreen int long text view int long mark public static final synchronized native boolean gtk text view scroll to iter int long text view byte iter double within margin boolean use align double xalign double yalign public static final synchronized native void gtk text view set editable int long text view boolean setting  gtk_text_view_scroll_mark_onscreen text_view gtk_text_view_scroll_to_iter text_view within_margin use_align gtk_text_view_set_editable text_view
public static final synchronized native boolean gtk text view scroll to iter int long text view byte iter double within margin boolean use align double xalign double yalign public static final synchronized native void gtk text view set editable int long text view boolean setting public static final synchronized native void gtk text view set justification int long text view int justification  gtk_text_view_scroll_to_iter text_view within_margin use_align gtk_text_view_set_editable text_view gtk_text_view_set_justification text_view
public static final synchronized native void gtk text view set editable int long text view boolean setting public static final synchronized native void gtk text view set justification int long text view int justification public static final synchronized native void gtk text view set tabs int long text view int long tabs  gtk_text_view_set_editable text_view gtk_text_view_set_justification text_view gtk_text_view_set_tabs text_view
public static final synchronized native void gtk text view set justification int long text view int justification public static final synchronized native void gtk text view set tabs int long text view int long tabs public static final synchronized native void gtk text view set wrap mode int long text view int wrap mode  gtk_text_view_set_justification text_view gtk_text_view_set_tabs text_view gtk_text_view_set_wrap_mode text_view wrap_mode
public static final synchronized native void gtk text view set tabs int long text view int long tabs public static final synchronized native void gtk text view set wrap mode int long text view int wrap mode public static final synchronized native int gtk timeout add int interval int long function int long data  gtk_text_view_set_tabs text_view gtk_text_view_set_wrap_mode text_view wrap_mode gtk_timeout_add
public static final synchronized native void gtk text view set wrap mode int long text view int wrap mode public static final synchronized native int gtk timeout add int interval int long function int long data public static final synchronized native void gtk timeout remove int timeout handler id  gtk_text_view_set_wrap_mode text_view wrap_mode gtk_timeout_add gtk_timeout_remove timeout_handler_id
public static final synchronized native int gtk timeout add int interval int long function int long data public static final synchronized native void gtk timeout remove int timeout handler id public static final synchronized native boolean gtk toggle button get active int long toggle button  gtk_timeout_add gtk_timeout_remove timeout_handler_id gtk_toggle_button_get_active toggle_button
public static final synchronized native void gtk timeout remove int timeout handler id public static final synchronized native boolean gtk toggle button get active int long toggle button public static final synchronized native int long gtk toggle button new  gtk_timeout_remove timeout_handler_id gtk_toggle_button_get_active toggle_button gtk_toggle_button_new
public static final synchronized native boolean gtk toggle button get active int long toggle button public static final synchronized native int long gtk toggle button new public static final synchronized native void gtk toggle button set active int long toggle button boolean is active  gtk_toggle_button_get_active toggle_button gtk_toggle_button_new gtk_toggle_button_set_active toggle_button is_active
public static final synchronized native int long gtk toggle button new public static final synchronized native void gtk toggle button set active int long toggle button boolean is active public static final synchronized native void gtk toggle button set mode int long toggle button boolean draw indicator  gtk_toggle_button_new gtk_toggle_button_set_active toggle_button is_active gtk_toggle_button_set_mode toggle_button draw_indicator
public static final synchronized native void gtk toggle button set active int long toggle button boolean is active public static final synchronized native void gtk toggle button set mode int long toggle button boolean draw indicator public static final synchronized native void gtk toolbar insert widget int long toolbar int long widget byte tooltip text byte tooltip private text int position  gtk_toggle_button_set_active toggle_button is_active gtk_toggle_button_set_mode toggle_button draw_indicator gtk_toolbar_insert_widget tooltip_text tooltip_private_text
public static final synchronized native void gtk toggle button set mode int long toggle button boolean draw indicator public static final synchronized native void gtk toolbar insert widget int long toolbar int long widget byte tooltip text byte tooltip private text int position public static final synchronized native int long gtk toolbar new  gtk_toggle_button_set_mode toggle_button draw_indicator gtk_toolbar_insert_widget tooltip_text tooltip_private_text gtk_toolbar_new
public static final synchronized native void gtk toolbar insert widget int long toolbar int long widget byte tooltip text byte tooltip private text int position public static final synchronized native int long gtk toolbar new public static final synchronized native void gtk toolbar set orientation int long toolbar int orientation  gtk_toolbar_insert_widget tooltip_text tooltip_private_text gtk_toolbar_new gtk_toolbar_set_orientation
public static final synchronized native int long gtk toolbar new public static final synchronized native void gtk toolbar set orientation int long toolbar int orientation public static final synchronized native void gtk tooltips disable int long tooltips  gtk_toolbar_new gtk_toolbar_set_orientation gtk_tooltips_disable
public static final synchronized native void gtk toolbar set orientation int long toolbar int orientation public static final synchronized native void gtk tooltips disable int long tooltips public static final synchronized native void gtk tooltips enable int long tooltips  gtk_toolbar_set_orientation gtk_tooltips_disable gtk_tooltips_enable
public static final synchronized native void gtk tooltips disable int long tooltips public static final synchronized native void gtk tooltips enable int long tooltips public static final synchronized native int long gtk tooltips new  gtk_tooltips_disable gtk_tooltips_enable gtk_tooltips_new
public static final synchronized native void gtk tooltips enable int long tooltips public static final synchronized native int long gtk tooltips new public static final synchronized native void gtk tooltips set tip int long tooltips int long widget byte tip text byte tip private  gtk_tooltips_enable gtk_tooltips_new gtk_tooltips_set_tip tip_text tip_private
public static final synchronized native int long gtk tooltips new public static final synchronized native void gtk tooltips set tip int long tooltips int long widget byte tip text byte tip private public static final synchronized native void gtk tree model get int long tree model int long iter int column int value int terminator  gtk_tooltips_new gtk_tooltips_set_tip tip_text tip_private gtk_tree_model_get tree_model
public static final synchronized native void gtk tooltips set tip int long tooltips int long widget byte tip text byte tip private public static final synchronized native void gtk tree model get int long tree model int long iter int column int value int terminator public static final synchronized native void gtk tree model get int long tree model int long iter int column long value int terminator  gtk_tooltips_set_tip tip_text tip_private gtk_tree_model_get tree_model gtk_tree_model_get tree_model
public static final synchronized native void gtk tree model get int long tree model int long iter int column int value int terminator public static final synchronized native void gtk tree model get int long tree model int long iter int column long value int terminator public static final synchronized native boolean gtk tree model get iter int long tree model int long iter int long path  gtk_tree_model_get tree_model gtk_tree_model_get tree_model gtk_tree_model_get_iter tree_model
public static final synchronized native void gtk tree model get int long tree model int long iter int column long value int terminator public static final synchronized native boolean gtk tree model get iter int long tree model int long iter int long path public static final synchronized native boolean gtk tree model get iter first int long tree model int long iter  gtk_tree_model_get tree_model gtk_tree_model_get_iter tree_model gtk_tree_model_get_iter_first tree_model
public static final synchronized native boolean gtk tree model get iter int long tree model int long iter int long path public static final synchronized native boolean gtk tree model get iter first int long tree model int long iter public static final synchronized native int gtk tree model get n columns int long tree model  gtk_tree_model_get_iter tree_model gtk_tree_model_get_iter_first tree_model gtk_tree_model_get_n_columns tree_model
public static final synchronized native boolean gtk tree model get iter first int long tree model int long iter public static final synchronized native int gtk tree model get n columns int long tree model public static final synchronized native int long gtk tree model get path int long tree model int long iter  gtk_tree_model_get_iter_first tree_model gtk_tree_model_get_n_columns tree_model gtk_tree_model_get_path tree_model
public static final synchronized native int gtk tree model get n columns int long tree model public static final synchronized native int long gtk tree model get path int long tree model int long iter public static final synchronized native int long gtk tree model get type  gtk_tree_model_get_n_columns tree_model gtk_tree_model_get_path tree_model gtk_tree_model_get_type
public static final synchronized native int long gtk tree model get path int long tree model int long iter public static final synchronized native int long gtk tree model get type public static final synchronized native boolean gtk tree model iter children int long model int long iter int long parent  gtk_tree_model_get_path tree_model gtk_tree_model_get_type gtk_tree_model_iter_children
public static final synchronized native int long gtk tree model get type public static final synchronized native boolean gtk tree model iter children int long model int long iter int long parent public static final synchronized native int gtk tree model iter n children int long model int long iter  gtk_tree_model_get_type gtk_tree_model_iter_children gtk_tree_model_iter_n_children
public static final synchronized native boolean gtk tree model iter children int long model int long iter int long parent public static final synchronized native int gtk tree model iter n children int long model int long iter public static final synchronized native boolean gtk tree model iter next int long model int long iter  gtk_tree_model_iter_children gtk_tree_model_iter_n_children gtk_tree_model_iter_next
public static final synchronized native int gtk tree model iter n children int long model int long iter public static final synchronized native boolean gtk tree model iter next int long model int long iter public static final synchronized native boolean gtk tree model iter nth child int long tree model int long iter int long parent int n  gtk_tree_model_iter_n_children gtk_tree_model_iter_next gtk_tree_model_iter_nth_child tree_model
public static final synchronized native boolean gtk tree model iter next int long model int long iter public static final synchronized native boolean gtk tree model iter nth child int long tree model int long iter int long parent int n public static final synchronized native void gtk tree path append index int long path int index  gtk_tree_model_iter_next gtk_tree_model_iter_nth_child tree_model gtk_tree_path_append_index
public static final synchronized native boolean gtk tree model iter nth child int long tree model int long iter int long parent int n public static final synchronized native void gtk tree path append index int long path int index public static final synchronized native void gtk tree path free int long path  gtk_tree_model_iter_nth_child tree_model gtk_tree_path_append_index gtk_tree_path_free
public static final synchronized native void gtk tree path append index int long path int index public static final synchronized native void gtk tree path free int long path public static final synchronized native int gtk tree path get depth int long path  gtk_tree_path_append_index gtk_tree_path_free gtk_tree_path_get_depth
public static final synchronized native void gtk tree path free int long path public static final synchronized native int gtk tree path get depth int long path public static final synchronized native int long gtk tree path get indices int long path  gtk_tree_path_free gtk_tree_path_get_depth gtk_tree_path_get_indices
public static final synchronized native int gtk tree path get depth int long path public static final synchronized native int long gtk tree path get indices int long path public static final synchronized native int long gtk tree path new  gtk_tree_path_get_depth gtk_tree_path_get_indices gtk_tree_path_new
public static final synchronized native int long gtk tree path get indices int long path public static final synchronized native int long gtk tree path new public static final synchronized native int long gtk tree path new first  gtk_tree_path_get_indices gtk_tree_path_new gtk_tree_path_new_first
public static final synchronized native int long gtk tree path new public static final synchronized native int long gtk tree path new first public static final synchronized native int long gtk tree path new from string byte path  gtk_tree_path_new gtk_tree_path_new_first gtk_tree_path_new_from_string
public static final synchronized native int long gtk tree path new first public static final synchronized native int long gtk tree path new from string byte path public static final synchronized native int long gtk tree path new from string int long path  gtk_tree_path_new_first gtk_tree_path_new_from_string gtk_tree_path_new_from_string
public static final synchronized native int long gtk tree path new from string byte path public static final synchronized native int long gtk tree path new from string int long path public static final synchronized native boolean gtk tree path up int long path  gtk_tree_path_new_from_string gtk_tree_path_new_from_string gtk_tree_path_up
public static final synchronized native int long gtk tree path new from string int long path public static final synchronized native boolean gtk tree path up int long path public static final synchronized native boolean gtk tree selection get selected int long selection int long model int long iter  gtk_tree_path_new_from_string gtk_tree_path_up gtk_tree_selection_get_selected
public static final synchronized native boolean gtk tree path up int long path public static final synchronized native boolean gtk tree selection get selected int long selection int long model int long iter public static final synchronized native int long gtk tree selection get selected rows int long selection int long model  gtk_tree_path_up gtk_tree_selection_get_selected gtk_tree_selection_get_selected_rows
public static final synchronized native boolean gtk tree selection get selected int long selection int long model int long iter public static final synchronized native int long gtk tree selection get selected rows int long selection int long model public static final synchronized native boolean gtk tree selection path is selected int long selection int long path  gtk_tree_selection_get_selected gtk_tree_selection_get_selected_rows gtk_tree_selection_path_is_selected
public static final synchronized native int long gtk tree selection get selected rows int long selection int long model public static final synchronized native boolean gtk tree selection path is selected int long selection int long path public static final synchronized native void gtk tree selection select all int long selection  gtk_tree_selection_get_selected_rows gtk_tree_selection_path_is_selected gtk_tree_selection_select_all
public static final synchronized native boolean gtk tree selection path is selected int long selection int long path public static final synchronized native void gtk tree selection select all int long selection public static final synchronized native void gtk tree selection select iter int long selection int long iter  gtk_tree_selection_path_is_selected gtk_tree_selection_select_all gtk_tree_selection_select_iter
public static final synchronized native void gtk tree selection select all int long selection public static final synchronized native void gtk tree selection select iter int long selection int long iter public static final synchronized native void gtk tree selection selected foreach int long selection int long func int long data  gtk_tree_selection_select_all gtk_tree_selection_select_iter gtk_tree_selection_selected_foreach
public static final synchronized native void gtk tree selection select iter int long selection int long iter public static final synchronized native void gtk tree selection selected foreach int long selection int long func int long data public static final synchronized native void gtk tree selection set mode int long selection int mode  gtk_tree_selection_select_iter gtk_tree_selection_selected_foreach gtk_tree_selection_set_mode
public static final synchronized native void gtk tree selection selected foreach int long selection int long func int long data public static final synchronized native void gtk tree selection set mode int long selection int mode public static final synchronized native void gtk tree selection unselect all int long selection  gtk_tree_selection_selected_foreach gtk_tree_selection_set_mode gtk_tree_selection_unselect_all
public static final synchronized native void gtk tree selection set mode int long selection int mode public static final synchronized native void gtk tree selection unselect all int long selection public static final synchronized native void gtk tree selection unselect iter int long selection int long iter  gtk_tree_selection_set_mode gtk_tree_selection_unselect_all gtk_tree_selection_unselect_iter
public static final synchronized native void gtk tree selection unselect all int long selection public static final synchronized native void gtk tree selection unselect iter int long selection int long iter public static final synchronized native void gtk tree store append int long store int long iter int long parent  gtk_tree_selection_unselect_all gtk_tree_selection_unselect_iter gtk_tree_store_append
public static final synchronized native void gtk tree selection unselect iter int long selection int long iter public static final synchronized native void gtk tree store append int long store int long iter int long parent public static final synchronized native void gtk tree store clear int long store  gtk_tree_selection_unselect_iter gtk_tree_store_append gtk_tree_store_clear
public static final synchronized native void gtk tree store append int long store int long iter int long parent public static final synchronized native void gtk tree store clear int long store public static final synchronized native void gtk tree store insert int long store int long iter int long parent int position  gtk_tree_store_append gtk_tree_store_clear gtk_tree_store_insert
public static final synchronized native void gtk tree store clear int long store public static final synchronized native void gtk tree store insert int long store int long iter int long parent int position public static final synchronized native int long gtk tree store newv int num Columns int long types  gtk_tree_store_clear gtk_tree_store_insert gtk_tree_store_newv numColumns
public static final synchronized native void gtk tree store insert int long store int long iter int long parent int position public static final synchronized native int long gtk tree store newv int num Columns int long types public static final synchronized native void gtk tree store remove int long store int long iter  gtk_tree_store_insert gtk_tree_store_newv numColumns gtk_tree_store_remove
public static final synchronized native int long gtk tree store newv int num Columns int long types public static final synchronized native void gtk tree store remove int long store int long iter public static final synchronized native void gtk tree store set int long store int long iter int column byte value int terminator  gtk_tree_store_newv numColumns gtk_tree_store_remove gtk_tree_store_set
public static final synchronized native void gtk tree store remove int long store int long iter public static final synchronized native void gtk tree store set int long store int long iter int column byte value int terminator public static final synchronized native void gtk tree store set int long store int long iter int column int value int terminator  gtk_tree_store_remove gtk_tree_store_set gtk_tree_store_set
public static final synchronized native void gtk tree store set int long store int long iter int column byte value int terminator public static final synchronized native void gtk tree store set int long store int long iter int column int value int terminator public static final synchronized native void gtk tree store set int long store int long iter int column long value int terminator  gtk_tree_store_set gtk_tree_store_set gtk_tree_store_set
public static final synchronized native void gtk tree store set int long store int long iter int column int value int terminator public static final synchronized native void gtk tree store set int long store int long iter int column long value int terminator public static final synchronized native void gtk tree store set int long store int long iter int column Gdk Color value int terminator  gtk_tree_store_set gtk_tree_store_set gtk_tree_store_set GdkColor
public static final synchronized native void gtk tree store set int long store int long iter int column long value int terminator public static final synchronized native void gtk tree store set int long store int long iter int column Gdk Color value int terminator public static final synchronized native void gtk tree store set int long store int long iter int column boolean value int terminator  gtk_tree_store_set gtk_tree_store_set GdkColor gtk_tree_store_set
public static final synchronized native void gtk tree store set int long store int long iter int column Gdk Color value int terminator public static final synchronized native void gtk tree store set int long store int long iter int column boolean value int terminator public static final synchronized native boolean gtk tree view collapse row int long view int long path  gtk_tree_store_set GdkColor gtk_tree_store_set gtk_tree_view_collapse_row
public static final synchronized native void gtk tree store set int long store int long iter int column boolean value int terminator public static final synchronized native boolean gtk tree view collapse row int long view int long path public static final synchronized native void gtk tree view column add attribute int long tree Column int long cell Renderer String attribute int column  gtk_tree_store_set gtk_tree_view_collapse_row gtk_tree_view_column_add_attribute treeColumn cellRenderer
public static final synchronized native boolean gtk tree view collapse row int long view int long path public static final synchronized native void gtk tree view column add attribute int long tree Column int long cell Renderer String attribute int column public static final synchronized native boolean gtk tree view column cell get position int long tree column int long cell renderer int start pos int width  gtk_tree_view_collapse_row gtk_tree_view_column_add_attribute treeColumn cellRenderer gtk_tree_view_column_cell_get_position tree_column cell_renderer start_pos
public static final synchronized native void gtk tree view column add attribute int long tree Column int long cell Renderer String attribute int column public static final synchronized native boolean gtk tree view column cell get position int long tree column int long cell renderer int start pos int width public static final synchronized native void gtk tree view column cell get size int long tree column Gdk Rectangle cell area int x offset int y offset int width int height  gtk_tree_view_column_add_attribute treeColumn cellRenderer gtk_tree_view_column_cell_get_position tree_column cell_renderer start_pos gtk_tree_view_column_cell_get_size tree_column GdkRectangle cell_area x_offset y_offset
public static final synchronized native boolean gtk tree view column cell get position int long tree column int long cell renderer int start pos int width public static final synchronized native void gtk tree view column cell get size int long tree column Gdk Rectangle cell area int x offset int y offset int width int height public static final synchronized native void gtk tree view column cell set cell data int long tree column int long tree model int long iter boolean is expander boolean is expanded  gtk_tree_view_column_cell_get_position tree_column cell_renderer start_pos gtk_tree_view_column_cell_get_size tree_column GdkRectangle cell_area x_offset y_offset gtk_tree_view_column_cell_set_cell_data tree_column tree_model is_expander is_expanded
public static final synchronized native void gtk tree view column cell get size int long tree column Gdk Rectangle cell area int x offset int y offset int width int height public static final synchronized native void gtk tree view column cell set cell data int long tree column int long tree model int long iter boolean is expander boolean is expanded public static final synchronized native void gtk tree view column clear int long tree column  gtk_tree_view_column_cell_get_size tree_column GdkRectangle cell_area x_offset y_offset gtk_tree_view_column_cell_set_cell_data tree_column tree_model is_expander is_expanded gtk_tree_view_column_clear tree_column
public static final synchronized native void gtk tree view column cell set cell data int long tree column int long tree model int long iter boolean is expander boolean is expanded public static final synchronized native void gtk tree view column clear int long tree column public static final synchronized native int long gtk tree view column get cell renderers int long tree column  gtk_tree_view_column_cell_set_cell_data tree_column tree_model is_expander is_expanded gtk_tree_view_column_clear tree_column gtk_tree_view_column_get_cell_renderers tree_column
public static final synchronized native void gtk tree view column clear int long tree column public static final synchronized native int long gtk tree view column get cell renderers int long tree column public static final synchronized native boolean gtk tree view column get resizable int long column  gtk_tree_view_column_clear tree_column gtk_tree_view_column_get_cell_renderers tree_column gtk_tree_view_column_get_resizable
public static final synchronized native int long gtk tree view column get cell renderers int long tree column public static final synchronized native boolean gtk tree view column get resizable int long column public static final synchronized native int gtk tree view column get spacing int long tree column  gtk_tree_view_column_get_cell_renderers tree_column gtk_tree_view_column_get_resizable gtk_tree_view_column_get_spacing tree_column
public static final synchronized native boolean gtk tree view column get resizable int long column public static final synchronized native int gtk tree view column get spacing int long tree column public static final synchronized native boolean gtk tree view column get visible int long column  gtk_tree_view_column_get_resizable gtk_tree_view_column_get_spacing tree_column gtk_tree_view_column_get_visible
public static final synchronized native int gtk tree view column get spacing int long tree column public static final synchronized native boolean gtk tree view column get visible int long column public static final synchronized native int gtk tree view column get width int long column  gtk_tree_view_column_get_spacing tree_column gtk_tree_view_column_get_visible gtk_tree_view_column_get_width
public static final synchronized native boolean gtk tree view column get visible int long column public static final synchronized native int gtk tree view column get width int long column public static final synchronized native int long gtk tree view column new  gtk_tree_view_column_get_visible gtk_tree_view_column_get_width gtk_tree_view_column_new
public static final synchronized native int gtk tree view column get width int long column public static final synchronized native int long gtk tree view column new public static final synchronized native void gtk tree view column pack start int long tree column int long cell renderer boolean expand  gtk_tree_view_column_get_width gtk_tree_view_column_new gtk_tree_view_column_pack_start tree_column cell_renderer
public static final synchronized native int long gtk tree view column new public static final synchronized native void gtk tree view column pack start int long tree column int long cell renderer boolean expand public static final synchronized native void gtk tree view column pack end int long tree column int long cell renderer boolean expand  gtk_tree_view_column_new gtk_tree_view_column_pack_start tree_column cell_renderer gtk_tree_view_column_pack_end tree_column cell_renderer
public static final synchronized native void gtk tree view column pack start int long tree column int long cell renderer boolean expand public static final synchronized native void gtk tree view column pack end int long tree column int long cell renderer boolean expand public static final synchronized native void gtk tree view column set alignment int long tree column float xalign  gtk_tree_view_column_pack_start tree_column cell_renderer gtk_tree_view_column_pack_end tree_column cell_renderer gtk_tree_view_column_set_alignment tree_column
public static final synchronized native void gtk tree view column pack end int long tree column int long cell renderer boolean expand public static final synchronized native void gtk tree view column set alignment int long tree column float xalign public static final synchronized native void gtk tree view column set cell data func int long tree column int long cell renderer int long func int long func data int long destroy  gtk_tree_view_column_pack_end tree_column cell_renderer gtk_tree_view_column_set_alignment tree_column gtk_tree_view_column_set_cell_data_func tree_column cell_renderer func_data
public static final synchronized native void gtk tree view column set alignment int long tree column float xalign public static final synchronized native void gtk tree view column set cell data func int long tree column int long cell renderer int long func int long func data int long destroy public static final synchronized native void gtk tree view column set clickable int long column boolean clickable  gtk_tree_view_column_set_alignment tree_column gtk_tree_view_column_set_cell_data_func tree_column cell_renderer func_data gtk_tree_view_column_set_clickable
public static final synchronized native void gtk tree view column set cell data func int long tree column int long cell renderer int long func int long func data int long destroy public static final synchronized native void gtk tree view column set clickable int long column boolean clickable public static final synchronized native void gtk tree view column set fixed width int long column int fixed width  gtk_tree_view_column_set_cell_data_func tree_column cell_renderer func_data gtk_tree_view_column_set_clickable gtk_tree_view_column_set_fixed_width fixed_width
public static final synchronized native void gtk tree view column set clickable int long column boolean clickable public static final synchronized native void gtk tree view column set fixed width int long column int fixed width public static final synchronized native void gtk tree view column set resizable int long column boolean resizable  gtk_tree_view_column_set_clickable gtk_tree_view_column_set_fixed_width fixed_width gtk_tree_view_column_set_resizable
public static final synchronized native void gtk tree view column set fixed width int long column int fixed width public static final synchronized native void gtk tree view column set resizable int long column boolean resizable public static final synchronized native void gtk tree view column set sizing int long column int type  gtk_tree_view_column_set_fixed_width fixed_width gtk_tree_view_column_set_resizable gtk_tree_view_column_set_sizing
public static final synchronized native void gtk tree view column set resizable int long column boolean resizable public static final synchronized native void gtk tree view column set sizing int long column int type public static final synchronized native void gtk tree view column set title int long tree column byte title  gtk_tree_view_column_set_resizable gtk_tree_view_column_set_sizing gtk_tree_view_column_set_title tree_column
public static final synchronized native void gtk tree view column set sizing int long column int type public static final synchronized native void gtk tree view column set title int long tree column byte title public static final synchronized native void gtk tree view column set visible int long tree column boolean visible  gtk_tree_view_column_set_sizing gtk_tree_view_column_set_title tree_column gtk_tree_view_column_set_visible tree_column
public static final synchronized native void gtk tree view column set title int long tree column byte title public static final synchronized native void gtk tree view column set visible int long tree column boolean visible public static final synchronized native void gtk tree view column set widget int long tree column int long widget  gtk_tree_view_column_set_title tree_column gtk_tree_view_column_set_visible tree_column gtk_tree_view_column_set_widget tree_column
public static final synchronized native void gtk tree view column set visible int long tree column boolean visible public static final synchronized native void gtk tree view column set widget int long tree column int long widget public static final synchronized native void gtk tree view set drag dest row int long view int long path int pos  gtk_tree_view_column_set_visible tree_column gtk_tree_view_column_set_widget tree_column gtk_tree_view_set_drag_dest_row
public static final synchronized native void gtk tree view column set widget int long tree column int long widget public static final synchronized native void gtk tree view set drag dest row int long view int long path int pos public static final synchronized native boolean gtk tree view expand row int long view int long path boolean open all  gtk_tree_view_column_set_widget tree_column gtk_tree_view_set_drag_dest_row gtk_tree_view_expand_row open_all
public static final synchronized native void gtk tree view set drag dest row int long view int long path int pos public static final synchronized native boolean gtk tree view expand row int long view int long path boolean open all public static final synchronized native int long gtk tree view get bin window int long tree view  gtk_tree_view_set_drag_dest_row gtk_tree_view_expand_row open_all gtk_tree_view_get_bin_window tree_view
public static final synchronized native boolean gtk tree view expand row int long view int long path boolean open all public static final synchronized native int long gtk tree view get bin window int long tree view public static final synchronized native void gtk tree view get cell area int long tree view int long path int long column Gdk Rectangle rect  gtk_tree_view_expand_row open_all gtk_tree_view_get_bin_window tree_view gtk_tree_view_get_cell_area tree_view GdkRectangle
public static final synchronized native int long gtk tree view get bin window int long tree view public static final synchronized native void gtk tree view get cell area int long tree view int long path int long column Gdk Rectangle rect public static final synchronized native int long gtk tree view get expander column int long tree view  gtk_tree_view_get_bin_window tree_view gtk_tree_view_get_cell_area tree_view GdkRectangle gtk_tree_view_get_expander_column tree_view
public static final synchronized native void gtk tree view get cell area int long tree view int long path int long column Gdk Rectangle rect public static final synchronized native int long gtk tree view get expander column int long tree view public static final synchronized native int long gtk tree view get column int long tree view int n  gtk_tree_view_get_cell_area tree_view GdkRectangle gtk_tree_view_get_expander_column tree_view gtk_tree_view_get_column tree_view
public static final synchronized native int long gtk tree view get expander column int long tree view public static final synchronized native int long gtk tree view get column int long tree view int n public static final synchronized native void gtk tree view get cursor int long tree view int long path int long focus column  gtk_tree_view_get_expander_column tree_view gtk_tree_view_get_column tree_view gtk_tree_view_get_cursor tree_view focus_column
public static final synchronized native int long gtk tree view get column int long tree view int n public static final synchronized native void gtk tree view get cursor int long tree view int long path int long focus column public static final synchronized native boolean gtk tree view get headers visible int long tree view  gtk_tree_view_get_column tree_view gtk_tree_view_get_cursor tree_view focus_column gtk_tree_view_get_headers_visible tree_view
public static final synchronized native void gtk tree view get cursor int long tree view int long path int long focus column public static final synchronized native boolean gtk tree view get headers visible int long tree view public static final synchronized native boolean gtk tree view get path at pos int long tree view int x int y int long path int long column int cell x int cell y  gtk_tree_view_get_cursor tree_view focus_column gtk_tree_view_get_headers_visible tree_view gtk_tree_view_get_path_at_pos tree_view cell_x cell_y
public static final synchronized native boolean gtk tree view get headers visible int long tree view public static final synchronized native boolean gtk tree view get path at pos int long tree view int x int y int long path int long column int cell x int cell y public static final synchronized native boolean gtk tree view get rules hint int long tree view  gtk_tree_view_get_headers_visible tree_view gtk_tree_view_get_path_at_pos tree_view cell_x cell_y gtk_tree_view_get_rules_hint tree_view
public static final synchronized native boolean gtk tree view get path at pos int long tree view int x int y int long path int long column int cell x int cell y public static final synchronized native boolean gtk tree view get rules hint int long tree view public static final synchronized native int long gtk tree view get selection int long tree view  gtk_tree_view_get_path_at_pos tree_view cell_x cell_y gtk_tree_view_get_rules_hint tree_view gtk_tree_view_get_selection tree_view
public static final synchronized native boolean gtk tree view get rules hint int long tree view public static final synchronized native int long gtk tree view get selection int long tree view public static final synchronized native void gtk tree view get visible rect int long tree view Gdk Rectangle visible rect  gtk_tree_view_get_rules_hint tree_view gtk_tree_view_get_selection tree_view gtk_tree_view_get_visible_rect tree_view GdkRectangle visible_rect
public static final synchronized native int long gtk tree view get selection int long tree view public static final synchronized native void gtk tree view get visible rect int long tree view Gdk Rectangle visible rect public static final synchronized native int gtk tree view insert column int long tree view int long column int position  gtk_tree_view_get_selection tree_view gtk_tree_view_get_visible_rect tree_view GdkRectangle visible_rect gtk_tree_view_insert_column tree_view
public static final synchronized native void gtk tree view get visible rect int long tree view Gdk Rectangle visible rect public static final synchronized native int gtk tree view insert column int long tree view int long column int position public static final synchronized native int long gtk tree view new with model int long model  gtk_tree_view_get_visible_rect tree_view GdkRectangle visible_rect gtk_tree_view_insert_column tree_view gtk_tree_view_new_with_model
public static final synchronized native int gtk tree view insert column int long tree view int long column int position public static final synchronized native int long gtk tree view new with model int long model public static final synchronized native void gtk tree view remove column int long tree view int long column  gtk_tree_view_insert_column tree_view gtk_tree_view_new_with_model gtk_tree_view_remove_column tree_view
public static final synchronized native int long gtk tree view new with model int long model public static final synchronized native void gtk tree view remove column int long tree view int long column public static final synchronized native boolean gtk tree view row expanded int long view int long path  gtk_tree_view_new_with_model gtk_tree_view_remove_column tree_view gtk_tree_view_row_expanded
public static final synchronized native void gtk tree view remove column int long tree view int long column public static final synchronized native boolean gtk tree view row expanded int long view int long path public static final synchronized native void gtk tree view scroll to cell int long tree view int long path int long column boolean use align float row aligh float column align  gtk_tree_view_remove_column tree_view gtk_tree_view_row_expanded gtk_tree_view_scroll_to_cell tree_view use_align row_aligh column_align
public static final synchronized native boolean gtk tree view row expanded int long view int long path public static final synchronized native void gtk tree view scroll to cell int long tree view int long path int long column boolean use align float row aligh float column align public static final synchronized native void gtk tree view scroll to point int long tree view int tree x int tree y  gtk_tree_view_row_expanded gtk_tree_view_scroll_to_cell tree_view use_align row_aligh column_align gtk_tree_view_scroll_to_point tree_view tree_x tree_y
public static final synchronized native void gtk tree view scroll to cell int long tree view int long path int long column boolean use align float row aligh float column align public static final synchronized native void gtk tree view scroll to point int long tree view int tree x int tree y public static final synchronized native void gtk tree view set cursor int long tree view int long path int long focus column boolean start editing  gtk_tree_view_scroll_to_cell tree_view use_align row_aligh column_align gtk_tree_view_scroll_to_point tree_view tree_x tree_y gtk_tree_view_set_cursor tree_view focus_column start_editing
public static final synchronized native void gtk tree view scroll to point int long tree view int tree x int tree y public static final synchronized native void gtk tree view set cursor int long tree view int long path int long focus column boolean start editing public static final synchronized native void gtk tree view set headers visible int long tree view boolean visible  gtk_tree_view_scroll_to_point tree_view tree_x tree_y gtk_tree_view_set_cursor tree_view focus_column start_editing gtk_tree_view_set_headers_visible tree_view
public static final synchronized native void gtk tree view set cursor int long tree view int long path int long focus column boolean start editing public static final synchronized native void gtk tree view set headers visible int long tree view boolean visible public static final synchronized native void gtk tree view set model int long tree view int long model  gtk_tree_view_set_cursor tree_view focus_column start_editing gtk_tree_view_set_headers_visible tree_view gtk_tree_view_set_model tree_view
public static final synchronized native void gtk tree view set headers visible int long tree view boolean visible public static final synchronized native void gtk tree view set model int long tree view int long model public static final synchronized native void gtk tree view set rules hint int long tree view boolean setting  gtk_tree_view_set_headers_visible tree_view gtk_tree_view_set_model tree_view gtk_tree_view_set_rules_hint tree_view
public static final synchronized native void gtk tree view set model int long tree view int long model public static final synchronized native void gtk tree view set rules hint int long tree view boolean setting public static final synchronized native void gtk tree view tree to widget coords int long tree view int tx int ty int wx int wy  gtk_tree_view_set_model tree_view gtk_tree_view_set_rules_hint tree_view gtk_tree_view_tree_to_widget_coords tree_view
public static final synchronized native void gtk tree view set rules hint int long tree view boolean setting public static final synchronized native void gtk tree view tree to widget coords int long tree view int tx int ty int wx int wy public static final synchronized native void gtk tree view unset rows drag dest int long tree view  gtk_tree_view_set_rules_hint tree_view gtk_tree_view_tree_to_widget_coords tree_view gtk_tree_view_unset_rows_drag_dest tree_view
public static final synchronized native void gtk tree view tree to widget coords int long tree view int tx int ty int wx int wy public static final synchronized native void gtk tree view unset rows drag dest int long tree view public static final synchronized native void gtk tree view widget to tree coords int long tree view int wx int wy int tx int ty  gtk_tree_view_tree_to_widget_coords tree_view gtk_tree_view_unset_rows_drag_dest tree_view gtk_tree_view_widget_to_tree_coords tree_view
public static final synchronized native void gtk tree view unset rows drag dest int long tree view public static final synchronized native void gtk tree view widget to tree coords int long tree view int wx int wy int tx int ty public static final synchronized native int long gtk vbox new boolean homogeneous int spacing  gtk_tree_view_unset_rows_drag_dest tree_view gtk_tree_view_widget_to_tree_coords tree_view gtk_vbox_new
public static final synchronized native void gtk tree view widget to tree coords int long tree view int wx int wy int tx int ty public static final synchronized native int long gtk vbox new boolean homogeneous int spacing public static final synchronized native int long gtk vscale new int long adjustment  gtk_tree_view_widget_to_tree_coords tree_view gtk_vbox_new gtk_vscale_new
public static final synchronized native int long gtk vbox new boolean homogeneous int spacing public static final synchronized native int long gtk vscale new int long adjustment public static final synchronized native int long gtk vscrollbar new int long adjustment  gtk_vbox_new gtk_vscale_new gtk_vscrollbar_new
public static final synchronized native int long gtk vscale new int long adjustment public static final synchronized native int long gtk vscrollbar new int long adjustment public static final synchronized native int long gtk vseparator new  gtk_vscale_new gtk_vscrollbar_new gtk_vseparator_new
public static final synchronized native int long gtk vscrollbar new int long adjustment public static final synchronized native int long gtk vseparator new public static final synchronized native void gtk widget add accelerator int long widget byte accel signal int long accel group int accel key int accel mods int accel flags  gtk_vscrollbar_new gtk_vseparator_new gtk_widget_add_accelerator accel_signal accel_group accel_key accel_mods accel_flags
public static final synchronized native int long gtk vseparator new public static final synchronized native void gtk widget add accelerator int long widget byte accel signal int long accel group int accel key int accel mods int accel flags public static final synchronized native void gtk widget add events int long widget int events  gtk_vseparator_new gtk_widget_add_accelerator accel_signal accel_group accel_key accel_mods accel_flags gtk_widget_add_events
public static final synchronized native void gtk widget add accelerator int long widget byte accel signal int long accel group int accel key int accel mods int accel flags public static final synchronized native void gtk widget add events int long widget int events public static final synchronized native boolean gtk widget child focus int long widget int direction  gtk_widget_add_accelerator accel_signal accel_group accel_key accel_mods accel_flags gtk_widget_add_events gtk_widget_child_focus
public static final synchronized native void gtk widget add events int long widget int events public static final synchronized native boolean gtk widget child focus int long widget int direction public static final synchronized native int long gtk widget create pango layout int long widget byte text  gtk_widget_add_events gtk_widget_child_focus gtk_widget_create_pango_layout
public static final synchronized native boolean gtk widget child focus int long widget int direction public static final synchronized native int long gtk widget create pango layout int long widget byte text public static final synchronized native int long gtk widget create pango layout int long widget int long text  gtk_widget_child_focus gtk_widget_create_pango_layout gtk_widget_create_pango_layout
public static final synchronized native int long gtk widget create pango layout int long widget byte text public static final synchronized native int long gtk widget create pango layout int long widget int long text public static final synchronized native void gtk widget destroy int long widget  gtk_widget_create_pango_layout gtk_widget_create_pango_layout gtk_widget_destroy
public static final synchronized native int long gtk widget create pango layout int long widget int long text public static final synchronized native void gtk widget destroy int long widget public static final synchronized native boolean gtk widget event int long widget int long event  gtk_widget_create_pango_layout gtk_widget_destroy gtk_widget_event
public static final synchronized native void gtk widget destroy int long widget public static final synchronized native boolean gtk widget event int long widget int long event public static final synchronized native int gtk widget get default direction  gtk_widget_destroy gtk_widget_event gtk_widget_get_default_direction
public static final synchronized native boolean gtk widget event int long widget int long event public static final synchronized native int gtk widget get default direction public static final synchronized native int long gtk widget get default style  gtk_widget_event gtk_widget_get_default_direction gtk_widget_get_default_style
public static final synchronized native int gtk widget get default direction public static final synchronized native int long gtk widget get default style public static final synchronized native int gtk widget get direction int long widget  gtk_widget_get_default_direction gtk_widget_get_default_style gtk_widget_get_direction
public static final synchronized native int long gtk widget get default style public static final synchronized native int gtk widget get direction int long widget public static final synchronized native int gtk widget get events int long widget  gtk_widget_get_default_style gtk_widget_get_direction gtk_widget_get_events
public static final synchronized native int gtk widget get direction int long widget public static final synchronized native int gtk widget get events int long widget public static final synchronized native int long gtk widget get modifier style int long widget  gtk_widget_get_direction gtk_widget_get_events gtk_widget_get_modifier_style
public static final synchronized native int gtk widget get events int long widget public static final synchronized native int long gtk widget get modifier style int long widget public static final synchronized native int long gtk widget get pango context int long widget  gtk_widget_get_events gtk_widget_get_modifier_style gtk_widget_get_pango_context
public static final synchronized native int long gtk widget get modifier style int long widget public static final synchronized native int long gtk widget get pango context int long widget public static final synchronized native int long gtk widget get parent int long widget  gtk_widget_get_modifier_style gtk_widget_get_pango_context gtk_widget_get_parent
public static final synchronized native int long gtk widget get pango context int long widget public static final synchronized native int long gtk widget get parent int long widget public static final synchronized native int long gtk widget get style int long widget  gtk_widget_get_pango_context gtk_widget_get_parent gtk_widget_get_style
public static final synchronized native int long gtk widget get parent int long widget public static final synchronized native int long gtk widget get style int long widget public static final synchronized native void gtk widget grab focus int long widget  gtk_widget_get_parent gtk_widget_get_style gtk_widget_grab_focus
public static final synchronized native int long gtk widget get style int long widget public static final synchronized native void gtk widget grab focus int long widget public static final synchronized native void gtk widget hide int long widget  gtk_widget_get_style gtk_widget_grab_focus gtk_widget_hide
public static final synchronized native void gtk widget grab focus int long widget public static final synchronized native void gtk widget hide int long widget public static final synchronized native boolean gtk widget is focus int long widget  gtk_widget_grab_focus gtk_widget_hide gtk_widget_is_focus
public static final synchronized native void gtk widget hide int long widget public static final synchronized native boolean gtk widget is focus int long widget public static final synchronized native boolean gtk widget mnemonic activate int long widget boolean group cycling  gtk_widget_hide gtk_widget_is_focus gtk_widget_mnemonic_activate group_cycling
public static final synchronized native boolean gtk widget is focus int long widget public static final synchronized native boolean gtk widget mnemonic activate int long widget boolean group cycling public static final synchronized native void gtk widget modify base int long widget int state Gdk Color color  gtk_widget_is_focus gtk_widget_mnemonic_activate group_cycling gtk_widget_modify_base GdkColor
public static final synchronized native boolean gtk widget mnemonic activate int long widget boolean group cycling public static final synchronized native void gtk widget modify base int long widget int state Gdk Color color public static final synchronized native void gtk widget modify bg int long widget int state Gdk Color color  gtk_widget_mnemonic_activate group_cycling gtk_widget_modify_base GdkColor gtk_widget_modify_bg GdkColor
public static final synchronized native void gtk widget modify base int long widget int state Gdk Color color public static final synchronized native void gtk widget modify bg int long widget int state Gdk Color color public static final synchronized native void gtk widget modify fg int long widget int state Gdk Color color  gtk_widget_modify_base GdkColor gtk_widget_modify_bg GdkColor gtk_widget_modify_fg GdkColor
public static final synchronized native void gtk widget modify bg int long widget int state Gdk Color color public static final synchronized native void gtk widget modify fg int long widget int state Gdk Color color public static final synchronized native void gtk widget modify font int long widget int long pango font descr  gtk_widget_modify_bg GdkColor gtk_widget_modify_fg GdkColor gtk_widget_modify_font pango_font_descr
public static final synchronized native void gtk widget modify fg int long widget int state Gdk Color color public static final synchronized native void gtk widget modify font int long widget int long pango font descr public static final synchronized native void gtk widget modify style int long widget int long style  gtk_widget_modify_fg GdkColor gtk_widget_modify_font pango_font_descr gtk_widget_modify_style
public static final synchronized native void gtk widget modify font int long widget int long pango font descr public static final synchronized native void gtk widget modify style int long widget int long style public static final synchronized native void gtk widget modify text int long widget int state Gdk Color color  gtk_widget_modify_font pango_font_descr gtk_widget_modify_style gtk_widget_modify_text GdkColor
public static final synchronized native void gtk widget modify style int long widget int long style public static final synchronized native void gtk widget modify text int long widget int state Gdk Color color public static final synchronized native void gtk widget realize int long widget  gtk_widget_modify_style gtk_widget_modify_text GdkColor gtk_widget_realize
public static final synchronized native void gtk widget modify text int long widget int state Gdk Color color public static final synchronized native void gtk widget realize int long widget public static final synchronized native void gtk widget remove accelerator int long widget int long accel group int accel key int accel mods  gtk_widget_modify_text GdkColor gtk_widget_realize gtk_widget_remove_accelerator accel_group accel_key accel_mods
public static final synchronized native void gtk widget realize int long widget public static final synchronized native void gtk widget remove accelerator int long widget int long accel group int accel key int accel mods public static final synchronized native void gtk widget reparent int long widget int long new parent  gtk_widget_realize gtk_widget_remove_accelerator accel_group accel_key accel_mods gtk_widget_reparent new_parent
public static final synchronized native void gtk widget remove accelerator int long widget int long accel group int accel key int accel mods public static final synchronized native void gtk widget reparent int long widget int long new parent public static final synchronized native void gtk widget set default direction int dir  gtk_widget_remove_accelerator accel_group accel_key accel_mods gtk_widget_reparent new_parent gtk_widget_set_default_direction
public static final synchronized native void gtk widget reparent int long widget int long new parent public static final synchronized native void gtk widget set default direction int dir public static final synchronized native void gtk widget set direction int long widget int dir  gtk_widget_reparent new_parent gtk_widget_set_default_direction gtk_widget_set_direction
public static final synchronized native void gtk widget set default direction int dir public static final synchronized native void gtk widget set direction int long widget int dir public static final synchronized native void gtk widget set double buffered int long widget boolean double buffered  gtk_widget_set_default_direction gtk_widget_set_direction gtk_widget_set_double_buffered double_buffered
public static final synchronized native void gtk widget set direction int long widget int dir public static final synchronized native void gtk widget set double buffered int long widget boolean double buffered public static final synchronized native void gtk widget set name int long widget byte name  gtk_widget_set_direction gtk_widget_set_double_buffered double_buffered gtk_widget_set_name
public static final synchronized native void gtk widget set double buffered int long widget boolean double buffered public static final synchronized native void gtk widget set name int long widget byte name public static final synchronized native void gtk widget set redraw on allocate int long widget boolean redraw  gtk_widget_set_double_buffered double_buffered gtk_widget_set_name gtk_widget_set_redraw_on_allocate
public static final synchronized native void gtk widget set name int long widget byte name public static final synchronized native void gtk widget set redraw on allocate int long widget boolean redraw public static final synchronized native void gtk widget set sensitive int long widget boolean sensitive  gtk_widget_set_name gtk_widget_set_redraw_on_allocate gtk_widget_set_sensitive
public static final synchronized native void gtk widget set redraw on allocate int long widget boolean redraw public static final synchronized native void gtk widget set sensitive int long widget boolean sensitive public static final synchronized native void gtk widget set size request int long widget int width int height  gtk_widget_set_redraw_on_allocate gtk_widget_set_sensitive gtk_widget_set_size_request
public static final synchronized native void gtk widget set sensitive int long widget boolean sensitive public static final synchronized native void gtk widget set size request int long widget int width int height public static final synchronized native void gtk widget set state int long widget int state  gtk_widget_set_sensitive gtk_widget_set_size_request gtk_widget_set_state
public static final synchronized native void gtk widget set size request int long widget int width int height public static final synchronized native void gtk widget set state int long widget int state public static final synchronized native void gtk widget shape combine mask int long widget int long shape mask int offset x int offset y  gtk_widget_set_size_request gtk_widget_set_state gtk_widget_shape_combine_mask shape_mask offset_x offset_y
public static final synchronized native void gtk widget set state int long widget int state public static final synchronized native void gtk widget shape combine mask int long widget int long shape mask int offset x int offset y public static final synchronized native void gtk widget show int long widget  gtk_widget_set_state gtk_widget_shape_combine_mask shape_mask offset_x offset_y gtk_widget_show
public static final synchronized native void gtk widget shape combine mask int long widget int long shape mask int offset x int offset y public static final synchronized native void gtk widget show int long widget public static final synchronized native void gtk widget show now int long widget  gtk_widget_shape_combine_mask shape_mask offset_x offset_y gtk_widget_show gtk_widget_show_now
public static final synchronized native void gtk widget show int long widget public static final synchronized native void gtk widget show now int long widget public static final synchronized native void gtk widget size allocate int long widget Gtk Allocation allocation  gtk_widget_show gtk_widget_show_now gtk_widget_size_allocate GtkAllocation
public static final synchronized native void gtk widget show now int long widget public static final synchronized native void gtk widget size allocate int long widget Gtk Allocation allocation public static final synchronized native void gtk widget size request int long widget Gtk Requisition requisition  gtk_widget_show_now gtk_widget_size_allocate GtkAllocation gtk_widget_size_request GtkRequisition
public static final synchronized native void gtk widget size allocate int long widget Gtk Allocation allocation public static final synchronized native void gtk widget size request int long widget Gtk Requisition requisition public static final synchronized native void gtk widget style get int long widget byte property name int value int null terminator  gtk_widget_size_allocate GtkAllocation gtk_widget_size_request GtkRequisition gtk_widget_style_get property_name null_terminator
public static final synchronized native void gtk widget size request int long widget Gtk Requisition requisition public static final synchronized native void gtk widget style get int long widget byte property name int value int null terminator public static final synchronized native void gtk widget unrealize int long widget  gtk_widget_size_request GtkRequisition gtk_widget_style_get property_name null_terminator gtk_widget_unrealize
public static final synchronized native void gtk widget style get int long widget byte property name int value int null terminator public static final synchronized native void gtk widget unrealize int long widget public static final synchronized native boolean gtk window activate default int long window  gtk_widget_style_get property_name null_terminator gtk_widget_unrealize gtk_window_activate_default
public static final synchronized native void gtk widget unrealize int long widget public static final synchronized native boolean gtk window activate default int long window public static final synchronized native void gtk window add accel group int long window int long accel group  gtk_widget_unrealize gtk_window_activate_default gtk_window_add_accel_group accel_group
public static final synchronized native boolean gtk window activate default int long window public static final synchronized native void gtk window add accel group int long window int long accel group public static final synchronized native void gtk window deiconify int long handle  gtk_window_activate_default gtk_window_add_accel_group accel_group gtk_window_deiconify
public static final synchronized native void gtk window add accel group int long window int long accel group public static final synchronized native void gtk window deiconify int long handle public static final synchronized native int long gtk window get focus int long window  gtk_window_add_accel_group accel_group gtk_window_deiconify gtk_window_get_focus
public static final synchronized native void gtk window deiconify int long handle public static final synchronized native int long gtk window get focus int long window public static final synchronized native int gtk window get mnemonic modifier int long window  gtk_window_deiconify gtk_window_get_focus gtk_window_get_mnemonic_modifier
public static final synchronized native int long gtk window get focus int long window public static final synchronized native int gtk window get mnemonic modifier int long window public static final synchronized native void gtk window get position int long handle int x int y  gtk_window_get_focus gtk_window_get_mnemonic_modifier gtk_window_get_position
public static final synchronized native int gtk window get mnemonic modifier int long window public static final synchronized native void gtk window get position int long handle int x int y public static final synchronized native void gtk window get size int long handle int x int y  gtk_window_get_mnemonic_modifier gtk_window_get_position gtk_window_get_size
public static final synchronized native void gtk window get position int long handle int x int y public static final synchronized native void gtk window get size int long handle int x int y public static final synchronized native void gtk window iconify int long handle  gtk_window_get_position gtk_window_get_size gtk_window_iconify
public static final synchronized native void gtk window get size int long handle int x int y public static final synchronized native void gtk window iconify int long handle public static final synchronized native void gtk window maximize int long handle  gtk_window_get_size gtk_window_iconify gtk_window_maximize
public static final synchronized native void gtk window iconify int long handle public static final synchronized native void gtk window maximize int long handle public static final synchronized native void gtk window move int long handle int x int y  gtk_window_iconify gtk_window_maximize gtk_window_move
public static final synchronized native void gtk window maximize int long handle public static final synchronized native void gtk window move int long handle int x int y public static final synchronized native int long gtk window new int type  gtk_window_maximize gtk_window_move gtk_window_new
public static final synchronized native void gtk window move int long handle int x int y public static final synchronized native int long gtk window new int type public static final synchronized native void gtk window present int long window  gtk_window_move gtk_window_new gtk_window_present
public static final synchronized native int long gtk window new int type public static final synchronized native void gtk window present int long window public static final synchronized native void gtk window remove accel group int long window int long accel group  gtk_window_new gtk_window_present gtk_window_remove_accel_group accel_group
public static final synchronized native void gtk window present int long window public static final synchronized native void gtk window remove accel group int long window int long accel group public static final synchronized native void gtk window resize int long handle int x int y  gtk_window_present gtk_window_remove_accel_group accel_group gtk_window_resize
public static final synchronized native void gtk window remove accel group int long window int long accel group public static final synchronized native void gtk window resize int long handle int x int y public static final synchronized native void gtk window set default int long window int long widget  gtk_window_remove_accel_group accel_group gtk_window_resize gtk_window_set_default
public static final synchronized native void gtk window resize int long handle int x int y public static final synchronized native void gtk window set default int long window int long widget public static final synchronized native void gtk window set destroy with parent int long window boolean setting  gtk_window_resize gtk_window_set_default gtk_window_set_destroy_with_parent
public static final synchronized native void gtk window set default int long window int long widget public static final synchronized native void gtk window set destroy with parent int long window boolean setting public static final synchronized native void gtk window set modal int long window boolean modal  gtk_window_set_default gtk_window_set_destroy_with_parent gtk_window_set_modal
public static final synchronized native void gtk window set destroy with parent int long window boolean setting public static final synchronized native void gtk window set modal int long window boolean modal public static final synchronized native void gtk window set resizable int long window boolean resizable  gtk_window_set_destroy_with_parent gtk_window_set_modal gtk_window_set_resizable
public static final synchronized native void gtk window set modal int long window boolean modal public static final synchronized native void gtk window set resizable int long window boolean resizable public static final synchronized native void gtk window set title int long window byte title  gtk_window_set_modal gtk_window_set_resizable gtk_window_set_title
public static final synchronized native void gtk window set resizable int long window boolean resizable public static final synchronized native void gtk window set title int long window byte title public static final synchronized native void gtk window set type hint int long window int hint  gtk_window_set_resizable gtk_window_set_title gtk_window_set_type_hint
public static final synchronized native void gtk window set title int long window byte title public static final synchronized native void gtk window set type hint int long window int hint public static final synchronized native void gtk window set transient for int long window int long parent  gtk_window_set_title gtk_window_set_type_hint gtk_window_set_transient_for
public static final synchronized native void gtk window set type hint int long window int hint public static final synchronized native void gtk window set transient for int long window int long parent public static final synchronized native void gtk window unmaximize int long handle  gtk_window_set_type_hint gtk_window_set_transient_for gtk_window_unmaximize
public static final synchronized native void gtk window set transient for int long window int long parent public static final synchronized native void gtk window unmaximize int long handle public static final native void memmove int long dest Gtk Target Entry src int long size  gtk_window_set_transient_for gtk_window_unmaximize GtkTargetEntry
public static final synchronized native void gtk window unmaximize int long handle public static final native void memmove int long dest Gtk Target Entry src int long size public static final native void memmove int long dest Gtk Adjustment src  gtk_window_unmaximize GtkTargetEntry GtkAdjustment
public static final native void memmove int long dest Gtk Target Entry src int long size public static final native void memmove int long dest Gtk Adjustment src public static final native void memmove int long dest Gdk Event Button src int long size  GtkTargetEntry GtkAdjustment GdkEventButton
public static final native void memmove int long dest Gtk Adjustment src public static final native void memmove int long dest Gdk Event Button src int long size public static final native void memmove int long dest Pango Attribute src int long size  GtkAdjustment GdkEventButton PangoAttribute
public static final native void memmove int long dest Gdk Event Button src int long size public static final native void memmove int long dest Pango Attribute src int long size public static final native void memmove Gtk Color Selection Dialog dest int long src  GdkEventButton PangoAttribute GtkColorSelectionDialog
public static final native void memmove int long dest Pango Attribute src int long size public static final native void memmove Gtk Color Selection Dialog dest int long src public static final native void memmove Gtk File Selection dest int long src  PangoAttribute GtkColorSelectionDialog GtkFileSelection
public static final native void memmove Gtk Color Selection Dialog dest int long src public static final native void memmove Gtk File Selection dest int long src public static final native void memmove Gdk Drag Context dest int long src int long size  GtkColorSelectionDialog GtkFileSelection GdkDragContext
public static final native void memmove Gtk File Selection dest int long src public static final native void memmove Gdk Drag Context dest int long src int long size public static final native void memmove Gtk Selection Data dest int long src int long size  GtkFileSelection GdkDragContext GtkSelectionData
public static final native void memmove Gdk Drag Context dest int long src int long size public static final native void memmove Gtk Selection Data dest int long src int long size public static final native void memmove Gtk Target Pair dest int long src int long size  GdkDragContext GtkSelectionData GtkTargetPair
public static final native void memmove Gtk Selection Data dest int long src int long size public static final native void memmove Gtk Target Pair dest int long src int long size public static final native void memmove Gtk Combo dest int long src  GtkSelectionData GtkTargetPair GtkCombo
public static final native void memmove Gtk Target Pair dest int long src int long size public static final native void memmove Gtk Combo dest int long src public static final native void memmove Gtk Adjustment dest int long src  GtkTargetPair GtkCombo GtkAdjustment
public static final native void memmove Gtk Combo dest int long src public static final native void memmove Gtk Adjustment dest int long src public static final native void memmove Gdk Color dest int long src int long size  GtkCombo GtkAdjustment GdkColor
public static final native void memmove Gtk Adjustment dest int long src public static final native void memmove Gdk Color dest int long src int long size public static final native void memmove Gdk Event dest int long src int long size  GtkAdjustment GdkColor GdkEvent
public static final native void memmove Gdk Color dest int long src int long size public static final native void memmove Gdk Event dest int long src int long size public static final native void memmove Gdk Event Button dest int long src int long size  GdkColor GdkEvent GdkEventButton
public static final native void memmove Gdk Event dest int long src int long size public static final native void memmove Gdk Event Button dest int long src int long size public static final native void memmove Gdk Event Crossing dest int long src int long size  GdkEvent GdkEventButton GdkEventCrossing
public static final native void memmove Gdk Event Button dest int long src int long size public static final native void memmove Gdk Event Crossing dest int long src int long size public static final native void memmove Gdk Event Expose dest int long src int long size  GdkEventButton GdkEventCrossing GdkEventExpose
public static final native void memmove Gdk Event Crossing dest int long src int long size public static final native void memmove Gdk Event Expose dest int long src int long size public static final native void memmove Gdk Event Focus dest int long src int long size  GdkEventCrossing GdkEventExpose GdkEventFocus
public static final native void memmove Gdk Event Expose dest int long src int long size public static final native void memmove Gdk Event Focus dest int long src int long size public static final native void memmove Gdk Event Key dest int long src int long size  GdkEventExpose GdkEventFocus GdkEventKey
public static final native void memmove Gdk Event Focus dest int long src int long size public static final native void memmove Gdk Event Key dest int long src int long size public static final native void memmove Gdk Event Motion dest int long src int long size  GdkEventFocus GdkEventKey GdkEventMotion
public static final native void memmove Gdk Event Key dest int long src int long size public static final native void memmove Gdk Event Motion dest int long src int long size public static final native void memmove Gdk Event Visibility dest int long src int long size  GdkEventKey GdkEventMotion GdkEventVisibility
public static final native void memmove Gdk Event Motion dest int long src int long size public static final native void memmove Gdk Event Visibility dest int long src int long size public static final native void memmove Gdk Event Window State dest int long src int long size  GdkEventMotion GdkEventVisibility GdkEventWindowState
public static final native void memmove Gdk Event Visibility dest int long src int long size public static final native void memmove Gdk Event Window State dest int long src int long size public static final native void memmove Gtk Fixed dest int long src  GdkEventVisibility GdkEventWindowState GtkFixed
public static final native void memmove Gdk Event Window State dest int long src int long size public static final native void memmove Gtk Fixed dest int long src public static final native void memmove int long dest Gtk Fixed src  GdkEventWindowState GtkFixed GtkFixed
public static final native void memmove Gtk Fixed dest int long src public static final native void memmove int long dest Gtk Fixed src public static final native void memmove Gdk Visual dest int long src  GtkFixed GtkFixed GdkVisual
public static final native void memmove int long dest Gtk Fixed src public static final native void memmove Gdk Visual dest int long src public static final native void memmove Gdk Image dest int long src  GtkFixed GdkVisual GdkImage
public static final native void memmove Gdk Visual dest int long src public static final native void memmove Gdk Image dest int long src public static final native void memmove Gdk Rectangle dest int long src int long size  GdkVisual GdkImage GdkRectangle
public static final native void memmove Gdk Image dest int long src public static final native void memmove Gdk Rectangle dest int long src int long size public static final native void memmove Pango Attribute dest int long src int long size  GdkImage GdkRectangle PangoAttribute
public static final native void memmove Gdk Rectangle dest int long src int long size public static final native void memmove Pango Attribute dest int long src int long size public static final native void memmove Pango Item dest int long src int long size  GdkRectangle PangoAttribute PangoItem
public static final native void memmove Pango Attribute dest int long src int long size public static final native void memmove Pango Item dest int long src int long size public static final native void memmove Pango Layout Line dest int long src int long size  PangoAttribute PangoItem PangoLayoutLine
public static final native void memmove Pango Item dest int long src int long size public static final native void memmove Pango Layout Line dest int long src int long size public static final native void memmove Pango Layout Run dest int long src int long size  PangoItem PangoLayoutLine PangoLayoutRun
public static final native void memmove Pango Layout Line dest int long src int long size public static final native void memmove Pango Layout Run dest int long src int long size public static final native void memmove Pango Log Attr dest int long src int long size  PangoLayoutLine PangoLayoutRun PangoLogAttr
public static final native void memmove Pango Layout Run dest int long src int long size public static final native void memmove Pango Log Attr dest int long src int long size public static final native void memmove int long dest int src int long size  PangoLayoutRun PangoLogAttr
public static final native void memmove Pango Log Attr dest int long src int long size public static final native void memmove int long dest int src int long size public static final native void memmove int long dest byte src int long size  PangoLogAttr
public static final native void memmove int long dest int src int long size public static final native void memmove int long dest byte src int long size public static final native void memmove int dest byte src int long size 
public static final native void memmove int long dest byte src int long size public static final native void memmove int dest byte src int long size public static final native void memmove byte dest int long src int long size 
public static final native void memmove int dest byte src int long size public static final native void memmove byte dest int long src int long size public static final native void memmove char dest int long src int long size 
public static final native void memmove byte dest int long src int long size public static final native void memmove char dest int long src int long size public static final native void memmove int dest int long src int long size 
public static final native void memmove char dest int long src int long size public static final native void memmove int dest int long src int long size public static final native void memmove long dest int long src int long size 
public static final native void memmove int dest int long src int long size public static final native void memmove long dest int long src int long size public static final native void memset int long buffer char c int long num 
public static final native void memmove long dest int long src int long size public static final native void memset int long buffer char c int long num public static final synchronized native int long pango attr background new short red short green short blue  pango_attr_background_new
public static final native void memset int long buffer char c int long num public static final synchronized native int long pango attr background new short red short green short blue public static final synchronized native int long pango attr font desc new int long desc  pango_attr_background_new pango_attr_font_desc_new
public static final synchronized native int long pango attr background new short red short green short blue public static final synchronized native int long pango attr font desc new int long desc public static final synchronized native int long pango attr foreground new short red short green short blue  pango_attr_background_new pango_attr_font_desc_new pango_attr_foreground_new
public static final synchronized native int long pango attr font desc new int long desc public static final synchronized native int long pango attr foreground new short red short green short blue public static final synchronized native int long pango attr shape new Pango Rectangle ink rect Pango Rectangle logical rect  pango_attr_font_desc_new pango_attr_foreground_new pango_attr_shape_new PangoRectangle ink_rect PangoRectangle logical_rect
public static final synchronized native int long pango attr foreground new short red short green short blue public static final synchronized native int long pango attr shape new Pango Rectangle ink rect Pango Rectangle logical rect public static final synchronized native void pango attr list insert int long list int long attr  pango_attr_foreground_new pango_attr_shape_new PangoRectangle ink_rect PangoRectangle logical_rect pango_attr_list_insert
public static final synchronized native int long pango attr shape new Pango Rectangle ink rect Pango Rectangle logical rect public static final synchronized native void pango attr list insert int long list int long attr public static final synchronized native void pango attr list change int long list int long attr  pango_attr_shape_new PangoRectangle ink_rect PangoRectangle logical_rect pango_attr_list_insert pango_attr_list_change
public static final synchronized native void pango attr list insert int long list int long attr public static final synchronized native void pango attr list change int long list int long attr public static final synchronized native int long pango attr list new  pango_attr_list_insert pango_attr_list_change pango_attr_list_new
public static final synchronized native void pango attr list change int long list int long attr public static final synchronized native int long pango attr list new public static final synchronized native void pango attr list unref int long list  pango_attr_list_change pango_attr_list_new pango_attr_list_unref
public static final synchronized native int long pango attr list new public static final synchronized native void pango attr list unref int long list public static final synchronized native int long pango attr strikethrough new boolean strikethrough  pango_attr_list_new pango_attr_list_unref pango_attr_strikethrough_new
public static final synchronized native void pango attr list unref int long list public static final synchronized native int long pango attr strikethrough new boolean strikethrough public static final synchronized native int long pango attr underline new int underline  pango_attr_list_unref pango_attr_strikethrough_new pango_attr_underline_new
public static final synchronized native int long pango attr strikethrough new boolean strikethrough public static final synchronized native int long pango attr underline new int underline public static final synchronized native int long pango attr weight new int weight  pango_attr_strikethrough_new pango_attr_underline_new pango_attr_weight_new
public static final synchronized native int long pango attr underline new int underline public static final synchronized native int long pango attr weight new int weight public static final synchronized native int pango context get base dir int long context  pango_attr_underline_new pango_attr_weight_new pango_context_get_base_dir
public static final synchronized native int long pango attr weight new int weight public static final synchronized native int pango context get base dir int long context public static final synchronized native int long pango context get language int long context  pango_attr_weight_new pango_context_get_base_dir pango_context_get_language
public static final synchronized native int pango context get base dir int long context public static final synchronized native int long pango context get language int long context public static final synchronized native int long pango context get metrics int long context int long desc int long language  pango_context_get_base_dir pango_context_get_language pango_context_get_metrics
public static final synchronized native int long pango context get language int long context public static final synchronized native int long pango context get metrics int long context int long desc int long language public static final synchronized native void pango context list families int long context int long families int n families  pango_context_get_language pango_context_get_metrics pango_context_list_families n_families
public static final synchronized native int long pango context get metrics int long context int long desc int long language public static final synchronized native void pango context list families int long context int long families int n families public static final synchronized native void pango context set base dir int long context int direction  pango_context_get_metrics pango_context_list_families n_families pango_context_set_base_dir
public static final synchronized native void pango context list families int long context int long families int n families public static final synchronized native void pango context set base dir int long context int direction public static final synchronized native void pango context set language int long context int long language  pango_context_list_families n_families pango_context_set_base_dir pango_context_set_language
public static final synchronized native void pango context set base dir int long context int direction public static final synchronized native void pango context set language int long context int long language public static final synchronized native int long pango font description copy int long desc  pango_context_set_base_dir pango_context_set_language pango_font_description_copy
public static final synchronized native void pango context set language int long context int long language public static final synchronized native int long pango font description copy int long desc public static final synchronized native void pango font description free int long desc  pango_context_set_language pango_font_description_copy pango_font_description_free
public static final synchronized native int long pango font description copy int long desc public static final synchronized native void pango font description free int long desc public static final synchronized native int long pango font description from string byte str  pango_font_description_copy pango_font_description_free pango_font_description_from_string
public static final synchronized native void pango font description free int long desc public static final synchronized native int long pango font description from string byte str public static final synchronized native int long pango font description get family int long desc  pango_font_description_free pango_font_description_from_string pango_font_description_get_family
public static final synchronized native int long pango font description from string byte str public static final synchronized native int long pango font description get family int long desc public static final synchronized native int pango font description get size int long desc  pango_font_description_from_string pango_font_description_get_family pango_font_description_get_size
public static final synchronized native int long pango font description get family int long desc public static final synchronized native int pango font description get size int long desc public static final synchronized native int pango font description get style int long desc  pango_font_description_get_family pango_font_description_get_size pango_font_description_get_style
public static final synchronized native int pango font description get size int long desc public static final synchronized native int pango font description get style int long desc public static final synchronized native int pango font description get weight int long desc  pango_font_description_get_size pango_font_description_get_style pango_font_description_get_weight
public static final synchronized native int pango font description get style int long desc public static final synchronized native int pango font description get weight int long desc public static final synchronized native int long pango font description new  pango_font_description_get_style pango_font_description_get_weight pango_font_description_new
public static final synchronized native int pango font description get weight int long desc public static final synchronized native int long pango font description new public static final synchronized native void pango font description set family int long desc byte family  pango_font_description_get_weight pango_font_description_new pango_font_description_set_family
public static final synchronized native int long pango font description new public static final synchronized native void pango font description set family int long desc byte family public static final synchronized native void pango font description set size int long desc int size  pango_font_description_new pango_font_description_set_family pango_font_description_set_size
public static final synchronized native void pango font description set family int long desc byte family public static final synchronized native void pango font description set size int long desc int size public static final synchronized native void pango font description set stretch int long desc int stretch  pango_font_description_set_family pango_font_description_set_size pango_font_description_set_stretch
public static final synchronized native void pango font description set size int long desc int size public static final synchronized native void pango font description set stretch int long desc int stretch public static final synchronized native void pango font description set style int long desc int weight  pango_font_description_set_size pango_font_description_set_stretch pango_font_description_set_style
public static final synchronized native void pango font description set stretch int long desc int stretch public static final synchronized native void pango font description set style int long desc int weight public static final synchronized native void pango font description set weight int long desc int weight  pango_font_description_set_stretch pango_font_description_set_style pango_font_description_set_weight
public static final synchronized native void pango font description set style int long desc int weight public static final synchronized native void pango font description set weight int long desc int weight public static final synchronized native int long pango font description to string int long desc  pango_font_description_set_style pango_font_description_set_weight pango_font_description_to_string
public static final synchronized native void pango font description set weight int long desc int weight public static final synchronized native int long pango font description to string int long desc public static final synchronized native int long pango font face describe int long face  pango_font_description_set_weight pango_font_description_to_string pango_font_face_describe
public static final synchronized native int long pango font description to string int long desc public static final synchronized native int long pango font face describe int long face public static final synchronized native void pango font family list faces int long family int long faces int n faces  pango_font_description_to_string pango_font_face_describe pango_font_family_list_faces n_faces
public static final synchronized native int long pango font face describe int long face public static final synchronized native void pango font family list faces int long family int long faces int n faces public static final synchronized native int long pango font get metrics int long font int long language  pango_font_face_describe pango_font_family_list_faces n_faces pango_font_get_metrics
public static final synchronized native void pango font family list faces int long family int long faces int n faces public static final synchronized native int long pango font get metrics int long font int long language public static final synchronized native int pango font metrics get approximate char width int long metrics  pango_font_family_list_faces n_faces pango_font_get_metrics pango_font_metrics_get_approximate_char_width
public static final synchronized native int long pango font get metrics int long font int long language public static final synchronized native int pango font metrics get approximate char width int long metrics public static final synchronized native int pango font metrics get ascent int long metrics  pango_font_get_metrics pango_font_metrics_get_approximate_char_width pango_font_metrics_get_ascent
public static final synchronized native int pango font metrics get approximate char width int long metrics public static final synchronized native int pango font metrics get ascent int long metrics public static final synchronized native int pango font metrics get descent int long metrics  pango_font_metrics_get_approximate_char_width pango_font_metrics_get_ascent pango_font_metrics_get_descent
public static final synchronized native int pango font metrics get ascent int long metrics public static final synchronized native int pango font metrics get descent int long metrics public static final synchronized native void pango font metrics unref int long metrics  pango_font_metrics_get_ascent pango_font_metrics_get_descent pango_font_metrics_unref
public static final synchronized native int pango font metrics get descent int long metrics public static final synchronized native void pango font metrics unref int long metrics public static final synchronized native int long pango language from string byte language  pango_font_metrics_get_descent pango_font_metrics_unref pango_language_from_string
public static final synchronized native void pango font metrics unref int long metrics public static final synchronized native int long pango language from string byte language public static final synchronized native void pango layout context changed int long layout  pango_font_metrics_unref pango_language_from_string pango_layout_context_changed
public static final synchronized native int long pango language from string byte language public static final synchronized native void pango layout context changed int long layout public static final synchronized native int pango layout get alignment int long layout  pango_language_from_string pango_layout_context_changed pango_layout_get_alignment
public static final synchronized native void pango layout context changed int long layout public static final synchronized native int pango layout get alignment int long layout public static final synchronized native int long pango layout get attributes int long layout  pango_layout_context_changed pango_layout_get_alignment pango_layout_get_attributes
public static final synchronized native int pango layout get alignment int long layout public static final synchronized native int long pango layout get attributes int long layout public static final synchronized native int long pango layout get iter int long layout  pango_layout_get_alignment pango_layout_get_attributes pango_layout_get_iter
public static final synchronized native int long pango layout get attributes int long layout public static final synchronized native int long pango layout get iter int long layout public static final synchronized native int long pango layout get line int long layout int line  pango_layout_get_attributes pango_layout_get_iter pango_layout_get_line
public static final synchronized native int long pango layout get iter int long layout public static final synchronized native int long pango layout get line int long layout int line public static final synchronized native int pango layout get line count int long layout  pango_layout_get_iter pango_layout_get_line pango_layout_get_line_count
public static final synchronized native int long pango layout get line int long layout int line public static final synchronized native int pango layout get line count int long layout public static final synchronized native void pango layout get log attrs int long layout int long attrs int n attrs  pango_layout_get_line pango_layout_get_line_count pango_layout_get_log_attrs n_attrs
public static final synchronized native int pango layout get line count int long layout public static final synchronized native void pango layout get log attrs int long layout int long attrs int n attrs public static final synchronized native void pango layout get size int long layout int width int height  pango_layout_get_line_count pango_layout_get_log_attrs n_attrs pango_layout_get_size
public static final synchronized native void pango layout get log attrs int long layout int long attrs int n attrs public static final synchronized native void pango layout get size int long layout int width int height public static final synchronized native int pango layout get spacing int long layout  pango_layout_get_log_attrs n_attrs pango_layout_get_size pango_layout_get_spacing
public static final synchronized native void pango layout get size int long layout int width int height public static final synchronized native int pango layout get spacing int long layout public static final synchronized native int long pango layout get tabs int long layout  pango_layout_get_size pango_layout_get_spacing pango_layout_get_tabs
public static final synchronized native int pango layout get spacing int long layout public static final synchronized native int long pango layout get tabs int long layout public static final synchronized native int long pango layout get text int long layout  pango_layout_get_spacing pango_layout_get_tabs pango_layout_get_text
public static final synchronized native int long pango layout get tabs int long layout public static final synchronized native int long pango layout get text int long layout public static final synchronized native int pango layout get width int long layout  pango_layout_get_tabs pango_layout_get_text pango_layout_get_width
public static final synchronized native int long pango layout get text int long layout public static final synchronized native int pango layout get width int long layout public static final synchronized native void pango layout index to pos int long layout int index Pango Rectangle pos  pango_layout_get_text pango_layout_get_width pango_layout_index_to_pos PangoRectangle
public static final synchronized native int pango layout get width int long layout public static final synchronized native void pango layout index to pos int long layout int index Pango Rectangle pos public static final synchronized native void pango layout iter free int long iter  pango_layout_get_width pango_layout_index_to_pos PangoRectangle pango_layout_iter_free
public static final synchronized native void pango layout index to pos int long layout int index Pango Rectangle pos public static final synchronized native void pango layout iter free int long iter public static final synchronized native void pango layout iter get line extents int long iter Pango Rectangle ink rect Pango Rectangle logical rect  pango_layout_index_to_pos PangoRectangle pango_layout_iter_free pango_layout_iter_get_line_extents PangoRectangle ink_rect PangoRectangle logical_rect
public static final synchronized native void pango layout iter free int long iter public static final synchronized native void pango layout iter get line extents int long iter Pango Rectangle ink rect Pango Rectangle logical rect public static final synchronized native int pango layout iter get index int long iter  pango_layout_iter_free pango_layout_iter_get_line_extents PangoRectangle ink_rect PangoRectangle logical_rect pango_layout_iter_get_index
public static final synchronized native void pango layout iter get line extents int long iter Pango Rectangle ink rect Pango Rectangle logical rect public static final synchronized native int pango layout iter get index int long iter public static final synchronized native int long pango layout iter get run int long iter  pango_layout_iter_get_line_extents PangoRectangle ink_rect PangoRectangle logical_rect pango_layout_iter_get_index pango_layout_iter_get_run
public static final synchronized native int pango layout iter get index int long iter public static final synchronized native int long pango layout iter get run int long iter public static final synchronized native boolean pango layout iter next line int long iter  pango_layout_iter_get_index pango_layout_iter_get_run pango_layout_iter_next_line
public static final synchronized native int long pango layout iter get run int long iter public static final synchronized native boolean pango layout iter next line int long iter public static final synchronized native boolean pango layout iter next run int long iter  pango_layout_iter_get_run pango_layout_iter_next_line pango_layout_iter_next_run
public static final synchronized native boolean pango layout iter next line int long iter public static final synchronized native boolean pango layout iter next run int long iter public static final synchronized native void pango layout line get extents int long line Pango Rectangle ink rect Pango Rectangle logical rect  pango_layout_iter_next_line pango_layout_iter_next_run pango_layout_line_get_extents PangoRectangle ink_rect PangoRectangle logical_rect
public static final synchronized native boolean pango layout iter next run int long iter public static final synchronized native void pango layout line get extents int long line Pango Rectangle ink rect Pango Rectangle logical rect public static final synchronized native boolean pango layout line x to index int long line int x pos int index  int trailing  pango_layout_iter_next_run pango_layout_line_get_extents PangoRectangle ink_rect PangoRectangle logical_rect pango_layout_line_x_to_index x_pos index_
public static final synchronized native void pango layout line get extents int long line Pango Rectangle ink rect Pango Rectangle logical rect public static final synchronized native boolean pango layout line x to index int long line int x pos int index  int trailing public static final synchronized native int long pango layout new int long context  pango_layout_line_get_extents PangoRectangle ink_rect PangoRectangle logical_rect pango_layout_line_x_to_index x_pos index_ pango_layout_new
public static final synchronized native boolean pango layout line x to index int long line int x pos int index  int trailing public static final synchronized native int long pango layout new int long context public static final synchronized native void pango layout set alignment int long layout int alignment  pango_layout_line_x_to_index x_pos index_ pango_layout_new pango_layout_set_alignment
public static final synchronized native int long pango layout new int long context public static final synchronized native void pango layout set alignment int long layout int alignment public static final synchronized native void pango layout set attributes int long layout int long attrs  pango_layout_new pango_layout_set_alignment pango_layout_set_attributes
public static final synchronized native void pango layout set alignment int long layout int alignment public static final synchronized native void pango layout set attributes int long layout int long attrs public static final synchronized native void pango layout set font description int long context int long descr  pango_layout_set_alignment pango_layout_set_attributes pango_layout_set_font_description
public static final synchronized native void pango layout set attributes int long layout int long attrs public static final synchronized native void pango layout set font description int long context int long descr public static final synchronized native void pango layout set single paragraph mode int long context boolean setting  pango_layout_set_attributes pango_layout_set_font_description pango_layout_set_single_paragraph_mode
public static final synchronized native void pango layout set font description int long context int long descr public static final synchronized native void pango layout set single paragraph mode int long context boolean setting public static final synchronized native void pango layout set spacing int long layout int spacing  pango_layout_set_font_description pango_layout_set_single_paragraph_mode pango_layout_set_spacing
public static final synchronized native void pango layout set single paragraph mode int long context boolean setting public static final synchronized native void pango layout set spacing int long layout int spacing public static final synchronized native void pango layout set tabs int long layout int long tabs  pango_layout_set_single_paragraph_mode pango_layout_set_spacing pango_layout_set_tabs
public static final synchronized native void pango layout set spacing int long layout int spacing public static final synchronized native void pango layout set tabs int long layout int long tabs public static final synchronized native void pango layout set text int long layout byte text int length  pango_layout_set_spacing pango_layout_set_tabs pango_layout_set_text
public static final synchronized native void pango layout set tabs int long layout int long tabs public static final synchronized native void pango layout set text int long layout byte text int length public static final synchronized native void pango layout set width int long layout int width  pango_layout_set_tabs pango_layout_set_text pango_layout_set_width
public static final synchronized native void pango layout set text int long layout byte text int length public static final synchronized native void pango layout set width int long layout int width public static final synchronized native void pango layout set wrap int long layout int wrap  pango_layout_set_text pango_layout_set_width pango_layout_set_wrap
public static final synchronized native void pango layout set width int long layout int width public static final synchronized native void pango layout set wrap int long layout int wrap public static final synchronized native boolean pango layout xy to index int long layout int x int y int index int trailing  pango_layout_set_width pango_layout_set_wrap pango_layout_xy_to_index
public static final synchronized native void pango layout set wrap int long layout int wrap public static final synchronized native boolean pango layout xy to index int long layout int x int y int index int trailing public static final synchronized native int pango tab array get size int long tab array  pango_layout_set_wrap pango_layout_xy_to_index pango_tab_array_get_size tab_array
public static final synchronized native boolean pango layout xy to index int long layout int x int y int index int trailing public static final synchronized native int pango tab array get size int long tab array public static final synchronized native void pango tab array get tabs int long tab array int long alignments int long locations  pango_layout_xy_to_index pango_tab_array_get_size tab_array pango_tab_array_get_tabs tab_array
public static final synchronized native int pango tab array get size int long tab array public static final synchronized native void pango tab array get tabs int long tab array int long alignments int long locations public static final synchronized native void pango tab array free int long tab array  pango_tab_array_get_size tab_array pango_tab_array_get_tabs tab_array pango_tab_array_free tab_array
public static final synchronized native void pango tab array get tabs int long tab array int long alignments int long locations public static final synchronized native void pango tab array free int long tab array public static final synchronized native int long pango tab array new int initial size boolean positions in pixels  pango_tab_array_get_tabs tab_array pango_tab_array_free tab_array pango_tab_array_new initial_size positions_in_pixels
public static final synchronized native void pango tab array free int long tab array public static final synchronized native int long pango tab array new int initial size boolean positions in pixels public static final synchronized native void pango tab array set tab int long tab array int tab index int long alignment int location  pango_tab_array_free tab_array pango_tab_array_new initial_size positions_in_pixels pango_tab_array_set_tab tab_array tab_index

Image images public Image List images new Image 4 pixbufs new int long 4  ImageList
public int add Image image int index 0 while index images length if images index null if images index is Disposed OS g object unref pixbufs index images index null pixbufs index 0 if images index null break index int w new int 1 h new int 1 OS gdk drawable get size image pixmap w h boolean has Mask image mask 0 int long pixbuf OS gdk pixbuf new OS GDK COLORSPACE RGB has Mask 8 w 0 h 0 if pixbuf 0 SWT error SWT ERROR NO HANDLES int long colormap OS gdk colormap get system OS gdk pixbuf get from drawable pixbuf image pixmap colormap 0 0 0 0 w 0 h 0 if has Mask int long gdk Mask Image Ptr OS gdk drawable get image image mask 0 0 w 0 h 0 if gdk Mask Image Ptr 0 SWT error SWT ERROR NO HANDLES int stride OS gdk pixbuf get rowstride pixbuf int long pixels OS gdk pixbuf get pixels pixbuf byte line new byte stride for int y 0 y h 0 y int long offset pixels y stride OS memmove line offset stride for int x 0 x w 0 x if OS gdk image get pixel gdk Mask Image Ptr x y 0 line x 4 3 0 OS memmove offset line stride OS g object unref gdk Mask Image Ptr if width 1 height 1 width w 0 height h 0 if w 0 width h 0 height int long scaled Pixbuf OS gdk pixbuf scale simple pixbuf width height OS GDK INTERP BILINEAR OS g object unref pixbuf pixbuf scaled Pixbuf if index images length Image new Images new Image images length 4 System arraycopy images 0 new Images 0 images length images new Images int long new Pixbufs new int long pixbufs length 4 System arraycopy pixbufs 0 new Pixbufs 0 pixbufs length pixbufs new Pixbufs pixbufs index pixbuf images index image return index  isDisposed g_object_unref gdk_drawable_get_size hasMask gdk_pixbuf_new GDK_COLORSPACE_RGB hasMask ERROR_NO_HANDLES gdk_colormap_get_system gdk_pixbuf_get_from_drawable hasMask gdkMaskImagePtr gdk_drawable_get_image gdkMaskImagePtr ERROR_NO_HANDLES gdk_pixbuf_get_rowstride gdk_pixbuf_get_pixels gdk_image_get_pixel gdkMaskImagePtr g_object_unref gdkMaskImagePtr scaledPixbuf gdk_pixbuf_scale_simple GDK_INTERP_BILINEAR g_object_unref scaledPixbuf newImages newImages newImages newPixbufs newPixbufs newPixbufs
public void dispose if pixbufs null return for int index 0 index pixbufs length index if pixbufs index 0 OS g object unref pixbufs index images null pixbufs null  g_object_unref
public Image get int index return images index 
int long get Pixbuf int index return pixbufs index  getPixbuf
public int index Of Image image if image null return 1 for int index 0 index images length index if image images index return index return 1  indexOf
int index Of int long pixbuf if pixbuf 0 return 1 for int index 0 index images length index if pixbuf pixbufs index return index return 1  indexOf
public boolean is Disposed return images null  isDisposed
public void remove Image image if image null return for int index 0 index images length index if image images index OS g object unref pixbufs index images index null pixbufs index 0  g_object_unref
public int size int result 0 for int index 0 index images length index if images index null if images index is Disposed OS g object unref pixbufs index images index null pixbufs index 0 if images index null result return result  isDisposed g_object_unref

public class GTK public static final synchronized native int GTK WIDGET HEIGHT int widget  GTK_WIDGET_HEIGHT
public static final synchronized native int GTK WIDGET HEIGHT int widget public static final synchronized native int GTK WIDGET WIDTH int widget  GTK_WIDGET_HEIGHT GTK_WIDGET_WIDTH
public static final synchronized native int GTK WIDGET HEIGHT int widget public static final synchronized native int GTK WIDGET WIDTH int widget public static final synchronized native int g signal connect int instance byte detailed signal int proc int data  GTK_WIDGET_HEIGHT GTK_WIDGET_WIDTH g_signal_connect detailed_signal
public static final synchronized native int GTK WIDGET WIDTH int widget public static final synchronized native int g signal connect int instance byte detailed signal int proc int data public static final synchronized native int gtk events pending  GTK_WIDGET_WIDTH g_signal_connect detailed_signal gtk_events_pending
public static final synchronized native int g signal connect int instance byte detailed signal int proc int data public static final synchronized native int gtk events pending public static final synchronized native boolean gtk init check int argc int argv  g_signal_connect detailed_signal gtk_events_pending gtk_init_check
public static final synchronized native int gtk events pending public static final synchronized native boolean gtk init check int argc int argv public static final synchronized native void gtk main  gtk_events_pending gtk_init_check gtk_main
public static final synchronized native boolean gtk init check int argc int argv public static final synchronized native void gtk main public static final synchronized native int gtk main iteration  gtk_init_check gtk_main gtk_main_iteration
public static final synchronized native void gtk main public static final synchronized native int gtk main iteration public static final synchronized native int gtk plug new int socket id  gtk_main gtk_main_iteration gtk_plug_new socket_id
public static final synchronized native int gtk main iteration public static final synchronized native int gtk plug new int socket id public static final synchronized native void gtk widget destroy int widget  gtk_main_iteration gtk_plug_new socket_id gtk_widget_destroy
public static final synchronized native int gtk plug new int socket id public static final synchronized native void gtk widget destroy int widget public static final synchronized native void gtk widget show int widget  gtk_plug_new socket_id gtk_widget_destroy gtk_widget_show
public static final synchronized native void gtk widget destroy int widget public static final synchronized native void gtk widget show int widget public static final synchronized native void gtk widget show now int widget  gtk_widget_destroy gtk_widget_show gtk_widget_show_now
public static final synchronized native void gtk widget show int widget public static final synchronized native void gtk widget show now int widget public static final synchronized native int gtk window new int type  gtk_widget_show gtk_widget_show_now gtk_window_new

public App File Loc Provider mozilla Path GRE mozilla Path gre Path GRE gre Path if mozilla Path null Browser error XPCOM NS ERROR FAILURE createCOM Interfaces  AppFileLocProvider mozillaPath mozillaPath grePath grePath mozillaPath NS_ERROR_FAILURE createCOMInterfaces
int Add Ref ref Count return ref Count  AddRef refCount refCount
Create each of the interfaces that this object implements supports new XPCOM Object new int 2 0 0 public int method0 int args return query Interface args 0 args 1  XPCOMObject queryInterface
supports new XPCOM Object new int 2 0 0 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref  XPCOMObject queryInterface AddRef
public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  queryInterface AddRef
directory Service Provider new XPCOM Object new int 2 0 0 3 public int method0 int args return query Interface args 0 args 1  directoryServiceProvider XPCOMObject queryInterface
directory Service Provider new XPCOM Object new int 2 0 0 3 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref  directoryServiceProvider XPCOMObject queryInterface AddRef
public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  queryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return get File args 0 args 1 args 2  AddRef getFile
directory Service Provider2 new XPCOM Object new int 2 0 0 3 2 public int method0 int args return query Interface args 0 args 1  directoryServiceProvider2 XPCOMObject queryInterface
directory Service Provider2 new XPCOM Object new int 2 0 0 3 2 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref  directoryServiceProvider2 XPCOMObject queryInterface AddRef
public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  queryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return get File args 0 args 1 args 2  AddRef getFile
public int method2 int args return Release public int method3 int args return get File args 0 args 1 args 2 public int method4 int args return get Files args 0 args 1  getFile getFiles
void createCOM Interfaces Create each of the interfaces that this object implements supports new XPCOM Object new int 2 0 0 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release directory Service Provider new XPCOM Object new int 2 0 0 3 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return get File args 0 args 1 args 2 directory Service Provider2 new XPCOM Object new int 2 0 0 3 2 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return get File args 0 args 1 args 2 public int method4 int args return get Files args 0 args 1  createCOMInterfaces XPCOMObject queryInterface AddRef directoryServiceProvider XPCOMObject queryInterface AddRef getFile directoryServiceProvider2 XPCOMObject queryInterface AddRef getFile getFiles
void disposeCOM Interfaces if supports null supports dispose supports null if directory Service Provider null directory Service Provider dispose directory Service Provider null if directory Service Provider2 null directory Service Provider2 dispose directory Service Provider2 null  disposeCOMInterfaces directoryServiceProvider directoryServiceProvider directoryServiceProvider directoryServiceProvider2 directoryServiceProvider2 directoryServiceProvider2
int get Address return directory Service Provider get Address  getAddress directoryServiceProvider getAddress
int query Interface int riid int ppv Object if riid 0 ppv Object 0 return XPCOM NS ERROR NO INTERFACE nsID guid new nsID XPCOM memmove guid riid nsID sizeof if guid Equals nsI Supports NS ISUPPORTS IID XPCOM memmove ppv Object new int supports get Address 4 Add Ref return XPCOM NS OK if guid Equals nsI Directory Service Provider NS IDIRECTORYSERVICEPROVIDER IID XPCOM memmove ppv Object new int directory Service Provider get Address 4 Add Ref return XPCOM NS OK if guid Equals nsI Directory Service Provider2 NS IDIRECTORYSERVICEPROVIDER2 IID XPCOM memmove ppv Object new int directory Service Provider2 get Address 4 Add Ref return XPCOM NS OK XPCOM memmove ppv Object new int 0 4 return XPCOM NS ERROR NO INTERFACE  queryInterface ppvObject ppvObject NS_ERROR_NO_INTERFACE nsISupports NS_ISUPPORTS_IID ppvObject getAddress AddRef NS_OK nsIDirectoryServiceProvider NS_IDIRECTORYSERVICEPROVIDER_IID ppvObject directoryServiceProvider getAddress AddRef NS_OK nsIDirectoryServiceProvider2 NS_IDIRECTORYSERVICEPROVIDER2_IID ppvObject directoryServiceProvider2 getAddress AddRef NS_OK ppvObject NS_ERROR_NO_INTERFACE
int Release ref Count if ref Count 0 disposeCOM Interfaces return ref Count  refCount refCount disposeCOMInterfaces refCount
int get Files int str int nsI Simple Enumerator int rc XPCOM NS ERROR FAILURE int length XPCOM strlen str byte dest new byte length XPCOM memmove dest str length String prop new String dest XPCOM memmove nsI Simple Enumerator new int 0 4 nsI Local File local File null if XPCOM NS APP PLUGINS DIR LIST equals prop if mozilla Path null return XPCOM NS ERROR FAILURE if mozilla Path length 0 return XPCOM NS ERROR FAILURE int result new int 1 ns String path new ns String mozilla Path rc XPCOM NS NewLocalFile path get Address true result path dispose if rc XPCOM NS OK result 0 0 rc XPCOM NS ERROR NULL POINTER if rc XPCOM NS OK local File new nsI Local File result 0 ns String node new ns String XPCOM PLUGINS DIR NAME rc local File Append node get Address node dispose if rc XPCOM NS OK int ret Val new int 1 rc XPCOM NS NewSingletonEnumerator local File get Address ret Val if rc XPCOM NS OK ret Val 0 0 rc XPCOM NS ERROR NULL POINTER if rc XPCOM NS OK XPCOM memmove nsI Simple Enumerator ret Val 4 if local File null local File Release return rc  getFiles nsISimpleEnumerator NS_ERROR_FAILURE nsISimpleEnumerator nsILocalFile localFile NS_APP_PLUGINS_DIR_LIST mozillaPath NS_ERROR_FAILURE mozillaPath NS_ERROR_FAILURE nsString nsString mozillaPath NS_NewLocalFile getAddress NS_OK NS_ERROR_NULL_POINTER NS_OK localFile nsILocalFile nsString nsString PLUGINS_DIR_NAME localFile getAddress NS_OK retVal NS_NewSingletonEnumerator localFile getAddress retVal NS_OK retVal NS_ERROR_NULL_POINTER NS_OK nsISimpleEnumerator retVal localFile localFile
int get File int str int persistent int ns File int rc XPCOM NS ERROR FAILURE int length XPCOM strlen str byte dest new byte length XPCOM memmove dest str length String prop new String dest XPCOM memmove persistent new int 1 4 XPCOM memmove ns File new int 0 4 nsI Local File local File null if XPCOM NS GRE DIR equals prop XPCOM NS GRE COMPONENT DIR equals prop if gre Path null gre Path length 0 return XPCOM NS ERROR FAILURE int result new int 1 ns String path new ns String gre Path rc XPCOM NS NewLocalFile path get Address true result path dispose if rc XPCOM NS OK result 0 0 rc XPCOM NS ERROR NULL POINTER if rc XPCOM NS OK local File new nsI Local File result 0 if XPCOM NS GRE COMPONENT DIR equals prop ns String node new ns String XPCOM COMPONENTS DIR NAME rc local File Append node get Address node dispose else if XPCOM NS XPCOM INIT CURRENT PROCESS DIR equals prop XPCOM NS OS CURRENT PROCESS DIR equals prop XPCOM NS XPCOM COMPONENT DIR equals prop XPCOM NS APP USER PROFILE 50 DIR equals prop if mozilla Path null mozilla Path length 0 return XPCOM NS ERROR FAILURE int result new int 1 ns String path new ns String mozilla Path rc XPCOM NS NewLocalFile path get Address true result path dispose if rc XPCOM NS OK result 0 0 rc XPCOM NS ERROR NULL POINTER if rc XPCOM NS OK local File new nsI Local File result 0 if XPCOM NS XPCOM COMPONENT DIR equals prop ns String node new ns String XPCOM COMPONENTS DIR NAME rc local File Append node get Address node dispose if local File null XPCOM NS OK rc int result new int 1 int rc1 local File Query Interface nsI File NS IFILE IID result if rc1 XPCOM NS OK result 0 0 rc1 XPCOM NS NOINTERFACE else XPCOM memmove ns File result 4 if local File null local File Release return rc  getFile nsFile NS_ERROR_FAILURE nsFile nsILocalFile localFile NS_GRE_DIR NS_GRE_COMPONENT_DIR grePath grePath NS_ERROR_FAILURE nsString nsString grePath NS_NewLocalFile getAddress NS_OK NS_ERROR_NULL_POINTER NS_OK localFile nsILocalFile NS_GRE_COMPONENT_DIR nsString nsString COMPONENTS_DIR_NAME localFile getAddress NS_XPCOM_INIT_CURRENT_PROCESS_DIR NS_OS_CURRENT_PROCESS_DIR NS_XPCOM_COMPONENT_DIR NS_APP_USER_PROFILE_50_DIR mozillaPath mozillaPath NS_ERROR_FAILURE nsString nsString mozillaPath NS_NewLocalFile getAddress NS_OK NS_ERROR_NULL_POINTER NS_OK localFile nsILocalFile NS_XPCOM_COMPONENT_DIR nsString nsString COMPONENTS_DIR_NAME localFile getAddress localFile NS_OK localFile QueryInterface nsIFile NS_IFILE_IID NS_OK NS_NOINTERFACE nsFile localFile localFile

import org eclipse swt internal mozilla 
class Input Stream XPCOM Object supports  InputStream XPCOMObject
int ref Count 0  refCount
C eclipse source Build src Included 3 0 plugins org eclipse swt Eclipse SWT Browser motif org eclipse swt browser Input Stream java sourceBuild srcIncluded InputStream
byte buffer 
int index 0 
C eclipse source Build src Included 3 0 plugins org eclipse swt Eclipse SWT Browser motif org eclipse swt browser Input Stream java sourceBuild srcIncluded InputStream
public Input Stream byte buffer  InputStream
public Input Stream byte buffer  InputStream
public Input Stream byte buffer this buffer buffer  InputStream
this buffer buffer 
this buffer buffer index 0 
index 0 
XPCOM Object input Stream int ref Count 0 byte buffer int index 0 public Input Stream byte buffer this buffer buffer index 0 createCOM Interfaces  XPCOMObject inputStream refCount InputStream createCOMInterfaces
int Add Ref ref Count return ref Count  AddRef refCount refCount
void createCOM Interfaces  createCOMInterfaces
Create each of the interfaces that this object implements supports new XPCOM Object new int 2 0 0 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release input Stream new XPCOM Object new int 2 0 0 0 1 3 4 1 public int method0 int args return query Interface args 0 args 1  XPCOMObject queryInterface AddRef inputStream XPCOMObject queryInterface
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Close  AddRef
public int method5 int args return Read args 0 args 1 args 2 public int method6 int args return Read Segments args 0 args 1 args 2 args 3 public int method7 int args return Is Non Blocking args 0  ReadSegments IsNonBlocking
void disposeCOM Interfaces  disposeCOMInterfaces
supports dispose supports null if input Stream null input Stream dispose  inputStream inputStream
int get Address return input Stream get Address int query Interface int riid int ppv Object if riid 0 ppv Object 0 return XPCOM NS ERROR NO INTERFACE nsID guid new nsID  getAddress inputStream getAddress queryInterface ppvObject ppvObject NS_ERROR_NO_INTERFACE
XPCOM memmove guid riid nsID sizeof if guid Equals nsI Supports NS ISUPPORTS IID  nsISupports NS_ISUPPORTS_IID

class Prompt Dialog extends Dialog public Prompt Dialog Shell parent int style super parent style  PromptDialog PromptDialog
public Prompt Dialog Shell parent this parent 0  PromptDialog
public void confirm Ex String title String text String check String button1 String button2 String button3 final int check Value final int result Shell parent get Parent final Shell shell new Shell parent SWT DIALOG TRIM SWT APPLICATION MODAL shell set Text title Grid Layout grid Layout new Grid Layout shell set Layout grid Layout Label label new Label shell SWT WRAP label set Text text Grid Data data new Grid Data data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true label set Layout Data data final Button buttons new Button 4 Listener listener new Listener public void handle Event Event event if buttons 0 null check Value 0 buttons 0 get Selection 1 0 Widget widget event widget for int i 1 i buttons length i if widget buttons i result 0 i 1 break shell close if check null buttons 0 new Button shell SWT CHECK buttons 0 set Text check buttons 0 set Selection check Value 0 0 data new Grid Data data horizontal Alignment Grid Data END buttons 0 set Layout Data data Composite composite new Composite shell SWT NONE data new Grid Data data horizontal Alignment Grid Data END composite set Layout Data data composite set Layout new Row Layout if button1 null buttons 1 new Button composite SWT PUSH buttons 1 set Text button1 buttons 1 add Listener SWT Selection listener if button2 null buttons 2 new Button composite SWT PUSH buttons 2 set Text button2 buttons 2 add Listener SWT Selection listener if button3 null buttons 3 new Button composite SWT PUSH buttons 3 set Text button3 buttons 3 add Listener SWT Selection listener shell pack shell open Display display parent get Display while shell is Disposed if display read And Dispatch display sleep  confirmEx checkValue getParent DIALOG_TRIM APPLICATION_MODAL setText GridLayout gridLayout GridLayout setLayout gridLayout setText GridData GridData horizontalAlignment GridData grabExcessHorizontalSpace setLayoutData handleEvent checkValue getSelection setText setSelection checkValue GridData horizontalAlignment GridData setLayoutData GridData horizontalAlignment GridData setLayoutData setLayout RowLayout setText addListener setText addListener setText addListener getDisplay isDisposed readAndDispatch
public void prompt Username And Password String title String text String check final String user final String pass final int check Value final int result Shell parent get Parent final Shell shell new Shell parent SWT DIALOG TRIM SWT APPLICATION MODAL shell set Text title Grid Layout grid Layout new Grid Layout shell set Layout grid Layout Label label new Label shell SWT WRAP label set Text text Grid Data data new Grid Data data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true label set Layout Data data Label user Label new Label shell SWT NONE user Label set Text SWT get Message SWT Username NON NLS 1 final Text user Text new Text shell SWT BORDER if user 0 null user Text set Text user 0 data new Grid Data data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true user Text set Layout Data data Label password Label new Label shell SWT NONE password Label set Text SWT get Message SWT Password NON NLS 1 final Text password Text new Text shell SWT PASSWORD SWT BORDER if pass 0 null password Text set Text pass 0 data new Grid Data data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true password Text set Layout Data data final Button buttons new Button 3 Listener listener new Listener public void handle Event Event event if buttons 0 null check Value 0 buttons 0 get Selection 1 0 user 0 user Text get Text pass 0 password Text get Text result 0 event widget buttons 1 1 0 shell close if check null buttons 0 new Button shell SWT CHECK buttons 0 set Text check buttons 0 set Selection check Value 0 0 data new Grid Data data horizontal Alignment Grid Data END buttons 0 set Layout Data data Composite composite new Composite shell SWT NONE data new Grid Data data horizontal Alignment Grid Data END composite set Layout Data data composite set Layout new Row Layout buttons 1 new Button composite SWT PUSH buttons 1 set Text SWT get Message SWT OK NON NLS 1 buttons 1 add Listener SWT Selection listener buttons 2 new Button composite SWT PUSH buttons 2 set Text SWT get Message SWT Cancel NON NLS 1 buttons 2 add Listener SWT Selection listener shell pack shell open Display display parent get Display while shell is Disposed if display read And Dispatch display sleep  promptUsernameAndPassword checkValue getParent DIALOG_TRIM APPLICATION_MODAL setText GridLayout gridLayout GridLayout setLayout gridLayout setText GridData GridData horizontalAlignment GridData grabExcessHorizontalSpace setLayoutData userLabel userLabel setText getMessage SWT_Username userText userText setText GridData horizontalAlignment GridData grabExcessHorizontalSpace userText setLayoutData passwordLabel passwordLabel setText getMessage SWT_Password passwordText passwordText setText GridData horizontalAlignment GridData grabExcessHorizontalSpace passwordText setLayoutData handleEvent checkValue getSelection userText getText passwordText getText setText setSelection checkValue GridData horizontalAlignment GridData setLayoutData GridData horizontalAlignment GridData setLayoutData setLayout RowLayout setText getMessage SWT_OK addListener setText getMessage SWT_Cancel addListener getDisplay isDisposed readAndDispatch

int ref Count 0 public Prompt Service createCOM Interfaces  refCount PromptService createCOMInterfaces
int Add Ref ref Count return ref Count  AddRef refCount refCount
Create each of the interfaces that this object implements supports new XPCOM Object new int 2 0 0 public int method0 int args return query Interface args 0 args 1  XPCOMObject queryInterface
supports new XPCOM Object new int 2 0 0 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref  XPCOMObject queryInterface AddRef
public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  queryInterface AddRef
prompt Service new XPCOM Object new int 2 0 0 3 5 4 6 10 7 8 7 7 public int method0 int args return query Interface args 0 args 1  promptService XPCOMObject queryInterface
prompt Service new XPCOM Object new int 2 0 0 3 5 4 6 10 7 8 7 7 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref  promptService XPCOMObject queryInterface AddRef
public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  queryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Alert args 0 args 1 args 2  AddRef
public int method2 int args return Release public int method3 int args return Alert args 0 args 1 args 2 public int method4 int args return Alert Check args 0 args 1 args 2 args 3 args 4  AlertCheck
public int method3 int args return Alert args 0 args 1 args 2 public int method4 int args return Alert Check args 0 args 1 args 2 args 3 args 4 public int method5 int args return Confirm args 0 args 1 args 2 args 3  AlertCheck
public int method4 int args return Alert Check args 0 args 1 args 2 args 3 args 4 public int method5 int args return Confirm args 0 args 1 args 2 args 3 public int method6 int args return Confirm Check args 0 args 1 args 2 args 3 args 4 args 5  AlertCheck ConfirmCheck
public int method5 int args return Confirm args 0 args 1 args 2 args 3 public int method6 int args return Confirm Check args 0 args 1 args 2 args 3 args 4 args 5 public int method7 int args return Confirm Ex args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7 args 8 args 9  ConfirmCheck ConfirmEx
public int method6 int args return Confirm Check args 0 args 1 args 2 args 3 args 4 args 5 public int method7 int args return Confirm Ex args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7 args 8 args 9 public int method8 int args return Prompt args 0 args 1 args 2 args 3 args 4 args 5 args 6  ConfirmCheck ConfirmEx
public int method7 int args return Confirm Ex args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7 args 8 args 9 public int method8 int args return Prompt args 0 args 1 args 2 args 3 args 4 args 5 args 6 public int method9 int args return Prompt Username And Password args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7  ConfirmEx PromptUsernameAndPassword
public int method8 int args return Prompt args 0 args 1 args 2 args 3 args 4 args 5 args 6 public int method9 int args return Prompt Username And Password args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7 public int method10 int args return Prompt Password args 0 args 1 args 2 args 3 args 4 args 5 args 6  PromptUsernameAndPassword PromptPassword
public int method9 int args return Prompt Username And Password args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7 public int method10 int args return Prompt Password args 0 args 1 args 2 args 3 args 4 args 5 args 6 public int method11 int args return Select args 0 args 1 args 2 args 3 args 4 args 5 args 6  PromptUsernameAndPassword PromptPassword
void createCOM Interfaces Create each of the interfaces that this object implements supports new XPCOM Object new int 2 0 0 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release prompt Service new XPCOM Object new int 2 0 0 3 5 4 6 10 7 8 7 7 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Alert args 0 args 1 args 2 public int method4 int args return Alert Check args 0 args 1 args 2 args 3 args 4 public int method5 int args return Confirm args 0 args 1 args 2 args 3 public int method6 int args return Confirm Check args 0 args 1 args 2 args 3 args 4 args 5 public int method7 int args return Confirm Ex args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7 args 8 args 9 public int method8 int args return Prompt args 0 args 1 args 2 args 3 args 4 args 5 args 6 public int method9 int args return Prompt Username And Password args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7 public int method10 int args return Prompt Password args 0 args 1 args 2 args 3 args 4 args 5 args 6 public int method11 int args return Select args 0 args 1 args 2 args 3 args 4 args 5 args 6  createCOMInterfaces XPCOMObject queryInterface AddRef promptService XPCOMObject queryInterface AddRef AlertCheck ConfirmCheck ConfirmEx PromptUsernameAndPassword PromptPassword
void disposeCOM Interfaces if supports null supports dispose supports null if prompt Service null prompt Service dispose prompt Service null  disposeCOMInterfaces promptService promptService promptService
int get Address return prompt Service get Address  getAddress promptService getAddress
int query Interface int riid int ppv Object if riid 0 ppv Object 0 return XPCOM NS ERROR NO INTERFACE nsID guid new nsID XPCOM memmove guid riid nsID sizeof if guid Equals nsI Supports NS ISUPPORTS IID XPCOM memmove ppv Object new int supports get Address 4 Add Ref return XPCOM NS OK if guid Equals nsI Prompt Service NS IPROMPTSERVICE IID XPCOM memmove ppv Object new int prompt Service get Address 4 Add Ref return XPCOM NS OK XPCOM memmove ppv Object new int 0 4 return XPCOM NS ERROR NO INTERFACE  queryInterface ppvObject ppvObject NS_ERROR_NO_INTERFACE nsISupports NS_ISUPPORTS_IID ppvObject getAddress AddRef NS_OK nsIPromptService NS_IPROMPTSERVICE_IID ppvObject promptService getAddress AddRef NS_OK ppvObject NS_ERROR_NO_INTERFACE
int Release ref Count if ref Count 0 disposeCOM Interfaces return ref Count  refCount refCount disposeCOMInterfaces refCount
Browser get Browser int aDOM Window int result new int 1 int rc XPCOM NS GetServiceManager result if rc XPCOM NS OK Browser error rc if result 0 0 Browser error XPCOM NS NOINTERFACE nsI Service Manager service Manager new nsI Service Manager result 0 result 0 0 byte buffer XPCOM NS WINDOWWATCHER CONTRACTID get Bytes byte a ContractID new byte buffer length 1 System arraycopy buffer 0 a ContractID 0 buffer length rc service Manager Get Service By ContractID a ContractID nsI Window Watcher NS IWINDOWWATCHER IID result if rc XPCOM NS OK Browser error rc if result 0 0 Browser error XPCOM NS NOINTERFACE service Manager Release nsI Window Watcher window Watcher new nsI Window Watcher result 0 result 0 0 rc window Watcher Get Chrome For Window aDOM Window result if rc XPCOM NS OK Browser error rc if result 0 0 Browser error XPCOM NS NOINTERFACE window Watcher Release nsI Web Browser Chrome web Browser Chrome new nsI Web Browser Chrome result 0 result 0 0 rc web Browser Chrome Query Interface nsI Embedding Site Window NS IEMBEDDINGSITEWINDOW IID result if rc XPCOM NS OK Browser error rc if result 0 0 Browser error XPCOM NS NOINTERFACE web Browser Chrome Release nsI Embedding Site Window embedding Site Window new nsI Embedding Site Window result 0 result 0 0 rc embedding Site Window Get Site Window result if rc XPCOM NS OK Browser error rc if result 0 0 Browser error XPCOM NS NOINTERFACE embedding Site Window Release Display display Display get Current Shell shells display get Shells Browser browser null for int i 0 i shells length i browser Browser find Browser shells i result 0 if browser null break return browser  getBrowser aDOMWindow NS_GetServiceManager NS_OK NS_NOINTERFACE nsIServiceManager serviceManager nsIServiceManager NS_WINDOWWATCHER_CONTRACTID getBytes aContractID aContractID serviceManager GetServiceByContractID aContractID nsIWindowWatcher NS_IWINDOWWATCHER_IID NS_OK NS_NOINTERFACE serviceManager nsIWindowWatcher windowWatcher nsIWindowWatcher windowWatcher GetChromeForWindow aDOMWindow NS_OK NS_NOINTERFACE windowWatcher nsIWebBrowserChrome webBrowserChrome nsIWebBrowserChrome webBrowserChrome QueryInterface nsIEmbeddingSiteWindow NS_IEMBEDDINGSITEWINDOW_IID NS_OK NS_NOINTERFACE webBrowserChrome nsIEmbeddingSiteWindow embeddingSiteWindow nsIEmbeddingSiteWindow embeddingSiteWindow GetSiteWindow NS_OK NS_NOINTERFACE embeddingSiteWindow getCurrent getShells findBrowser
String get Label int button Flag int index int button Title String label null int flag button Flag 0xff index index switch flag case nsI Prompt Service BUTTON TITLE CANCEL label SWT get Message SWT Cancel break NON NLS 1 case nsI Prompt Service BUTTON TITLE NO label SWT get Message SWT No break NON NLS 1 case nsI Prompt Service BUTTON TITLE OK label SWT get Message SWT OK break NON NLS 1 case nsI Prompt Service BUTTON TITLE SAVE label SWT get Message SWT Save break NON NLS 1 case nsI Prompt Service BUTTON TITLE YES label SWT get Message SWT Yes break NON NLS 1 case nsI Prompt Service BUTTON TITLE IS STRING int length XPCOM nsCRT strlen PRUnichar button Title char dest new char length XPCOM memmove dest button Title length 2 label new String dest return label  getLabel buttonFlag buttonTitle buttonFlag nsIPromptService BUTTON_TITLE_CANCEL getMessage SWT_Cancel nsIPromptService BUTTON_TITLE_NO getMessage SWT_No nsIPromptService BUTTON_TITLE_OK getMessage SWT_OK nsIPromptService BUTTON_TITLE_SAVE getMessage SWT_Save nsIPromptService BUTTON_TITLE_YES getMessage SWT_Yes nsIPromptService BUTTON_TITLE_IS_STRING nsCRT_strlen_PRUnichar buttonTitle buttonTitle
public int Alert int parent int dialog Title int text Browser browser get Browser parent int length XPCOM nsCRT strlen PRUnichar dialog Title char dest new char length XPCOM memmove dest dialog Title length 2 String title Label new String dest length XPCOM nsCRT strlen PRUnichar text dest new char length XPCOM memmove dest text length 2 String text Label new String dest Message Box message Box new Message Box browser get Shell SWT OK message Box set Text title Label message Box set Message text Label message Box open return XPCOM NS OK  dialogTitle getBrowser nsCRT_strlen_PRUnichar dialogTitle dialogTitle titleLabel nsCRT_strlen_PRUnichar textLabel MessageBox messageBox MessageBox getShell messageBox setText titleLabel messageBox setMessage textLabel messageBox NS_OK
public int Alert Check int parent int dialog Title int text int check Msg int check Value return XPCOM NS ERROR NOT IMPLEMENTED  AlertCheck dialogTitle checkMsg checkValue NS_ERROR_NOT_IMPLEMENTED
public int Confirm int parent int dialog Title int text int  retval return XPCOM NS ERROR NOT IMPLEMENTED  dialogTitle _retval NS_ERROR_NOT_IMPLEMENTED
public int Confirm Check int parent int dialog Title int text int check Msg int check Value int  retval return XPCOM NS ERROR NOT IMPLEMENTED  ConfirmCheck dialogTitle checkMsg checkValue _retval NS_ERROR_NOT_IMPLEMENTED
public int Confirm Ex int parent int dialog Title int text int button Flags int button0 Title int button1 Title int button2 Title int check Msg int check Value int  retval Browser browser get Browser parent int length XPCOM nsCRT strlen PRUnichar dialog Title char dest new char length XPCOM memmove dest dialog Title length 2 String title Label new String dest length XPCOM nsCRT strlen PRUnichar text dest new char length XPCOM memmove dest text length 2 String text Label new String dest String check Label null if check Msg 0 length XPCOM nsCRT strlen PRUnichar check Msg dest new char length XPCOM memmove dest check Msg length 2 check Label new String dest String button1 Label get Label button Flags nsI Prompt Service BUTTON POS 0 button0 Title String button2 Label get Label button Flags nsI Prompt Service BUTTON POS 1 button0 Title String button3 Label get Label button Flags nsI Prompt Service BUTTON POS 2 button0 Title Prompt Dialog dialog new Prompt Dialog browser get Shell int check new int 1 result new int 1 if check Value 0 XPCOM memmove check check Value 4 dialog confirm Ex title Label text Label check Label button1 Label button2 Label button3 Label check result if check Value 0 XPCOM memmove check Value check 4 XPCOM memmove  retval result 4 return XPCOM NS OK  ConfirmEx dialogTitle buttonFlags button0Title button1Title button2Title checkMsg checkValue _retval getBrowser nsCRT_strlen_PRUnichar dialogTitle dialogTitle titleLabel nsCRT_strlen_PRUnichar textLabel checkLabel checkMsg nsCRT_strlen_PRUnichar checkMsg checkMsg checkLabel button1Label getLabel buttonFlags nsIPromptService BUTTON_POS_0 button0Title button2Label getLabel buttonFlags nsIPromptService BUTTON_POS_1 button0Title button3Label getLabel buttonFlags nsIPromptService BUTTON_POS_2 button0Title PromptDialog PromptDialog getShell checkValue checkValue confirmEx titleLabel textLabel checkLabel button1Label button2Label button3Label checkValue checkValue _retval NS_OK
public int Prompt int parent int dialog Title int text int value int check Msg int check Value int  retval return XPCOM NS ERROR NOT IMPLEMENTED  dialogTitle checkMsg checkValue _retval NS_ERROR_NOT_IMPLEMENTED
public int Prompt Username And Password int parent int dialog Title int text int username int password int check Msg int check Value int  retval Browser browser get Browser parent String title Label null text Label check Label null String user Label new String 1 pass Label new String 1 char dest int length if dialog Title 0 length XPCOM nsCRT strlen PRUnichar dialog Title dest new char length XPCOM memmove dest dialog Title length 2 title Label new String dest else title Label SWT get Message SWT Prompt NON NLS 1 length XPCOM nsCRT strlen PRUnichar text dest new char length XPCOM memmove dest text length 2 text Label new String dest int user Addr new int 1 XPCOM memmove user Addr username 4 if user Addr 0 0 length XPCOM nsCRT strlen PRUnichar user Addr 0 dest new char length XPCOM memmove dest user Addr 0 length 2 user Label 0 new String dest int pass Addr new int 1 XPCOM memmove pass Addr password 4 if pass Addr 0 0 length XPCOM nsCRT strlen PRUnichar pass Addr 0 dest new char length XPCOM memmove dest pass Addr 0 length 2 pass Label 0 new String dest if check Msg 0 length XPCOM nsCRT strlen PRUnichar check Msg dest new char length XPCOM memmove dest check Msg length 2 check Label new String dest Prompt Dialog dialog new Prompt Dialog browser get Shell int check new int 1 result new int 1 if check Value 0 XPCOM memmove check check Value 4 dialog prompt Username And Password title Label text Label check Label user Label pass Label check result XPCOM memmove  retval result 4 if result 0 1 User selected OK User name and password are returned as PR Unichar values Any default value that we override must be freed using the nsI Memory service int cnt size ptr char buffer if user Label 0 null cnt user Label 0 length buffer new char cnt 1 user Label 0 get Chars 0 cnt buffer 0 size buffer length 2 ptr XPCOM PR Malloc size XPCOM memmove ptr buffer size XPCOM memmove username new int ptr 4 if user Addr 0 0 result 0 0 int rc XPCOM NS GetServiceManager result if rc XPCOM NS OK SWT error rc if result 0 0 SWT error XPCOM NS NOINTERFACE nsI Service Manager service Manager new nsI Service Manager result 0 result 0 0 byte tmp XPCOM NS MEMORY CONTRACTID get Bytes byte a ContractID new byte tmp length 1 System arraycopy tmp 0 a ContractID 0 tmp length rc service Manager Get Service By ContractID a ContractID nsI Memory NS IMEMORY IID result if rc XPCOM NS OK SWT error rc if result 0 0 SWT error XPCOM NS NOINTERFACE service Manager Release nsI Memory memory new nsI Memory result 0 result 0 0 memory Free user Addr 0 memory Release if pass Label 0 null cnt pass Label 0 length buffer new char cnt 1 pass Label 0 get Chars 0 cnt buffer 0 size buffer length 2 ptr XPCOM PR Malloc size XPCOM memmove ptr buffer size XPCOM memmove password new int ptr 4 if pass Addr 0 0 result 0 0 int rc XPCOM NS GetServiceManager result if rc XPCOM NS OK SWT error rc if result 0 0 SWT error XPCOM NS NOINTERFACE nsI Service Manager service Manager new nsI Service Manager result 0 result 0 0 byte tmp XPCOM NS MEMORY CONTRACTID get Bytes byte a ContractID new byte tmp length 1 System arraycopy tmp 0 a ContractID 0 tmp length rc service Manager Get Service By ContractID a ContractID nsI Memory NS IMEMORY IID result if rc XPCOM NS OK SWT error rc if result 0 0 SWT error XPCOM NS NOINTERFACE service Manager Release nsI Memory memory new nsI Memory result 0 result 0 0 memory Free pass Addr 0 memory Release if check Value 0 XPCOM memmove check Value check 4 return XPCOM NS OK  PromptUsernameAndPassword dialogTitle checkMsg checkValue _retval getBrowser titleLabel textLabel checkLabel userLabel passLabel dialogTitle nsCRT_strlen_PRUnichar dialogTitle dialogTitle titleLabel titleLabel getMessage SWT_Prompt nsCRT_strlen_PRUnichar textLabel userAddr userAddr userAddr nsCRT_strlen_PRUnichar userAddr userAddr userLabel passAddr passAddr passAddr nsCRT_strlen_PRUnichar passAddr passAddr passLabel checkMsg nsCRT_strlen_PRUnichar checkMsg checkMsg checkLabel PromptDialog PromptDialog getShell checkValue checkValue promptUsernameAndPassword titleLabel textLabel checkLabel userLabel passLabel _retval PRUnichar nsIMemory userLabel userLabel userLabel getChars PR_Malloc userAddr NS_GetServiceManager NS_OK NS_NOINTERFACE nsIServiceManager serviceManager nsIServiceManager NS_MEMORY_CONTRACTID getBytes aContractID aContractID serviceManager GetServiceByContractID aContractID nsIMemory NS_IMEMORY_IID NS_OK NS_NOINTERFACE serviceManager nsIMemory nsIMemory userAddr passLabel passLabel passLabel getChars PR_Malloc passAddr NS_GetServiceManager NS_OK NS_NOINTERFACE nsIServiceManager serviceManager nsIServiceManager NS_MEMORY_CONTRACTID getBytes aContractID aContractID serviceManager GetServiceByContractID aContractID nsIMemory NS_IMEMORY_IID NS_OK NS_NOINTERFACE serviceManager nsIMemory nsIMemory passAddr checkValue checkValue NS_OK
public int Prompt Password int parent int dialog Title int text int password int check Msg int check Value int  retval return XPCOM NS ERROR NOT IMPLEMENTED  PromptPassword dialogTitle checkMsg checkValue _retval NS_ERROR_NOT_IMPLEMENTED
public int Select int parent int dialog Title int text int count int select List int out Selection int  retval return XPCOM NS ERROR NOT IMPLEMENTED  dialogTitle selectList outSelection _retval NS_ERROR_NOT_IMPLEMENTED

int ref Count 0 public Prompt Service Factory createCOM Interfaces  refCount PromptServiceFactory createCOMInterfaces
int Add Ref ref Count return ref Count  AddRef refCount refCount
Create each of the interfaces that this object implements supports new XPCOM Object new int 2 0 0 public int method0 int args return query Interface args 0 args 1  XPCOMObject queryInterface
supports new XPCOM Object new int 2 0 0 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref  XPCOMObject queryInterface AddRef
public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  queryInterface AddRef
factory new XPCOM Object new int 2 0 0 3 1 public int method0 int args return query Interface args 0 args 1  XPCOMObject queryInterface
factory new XPCOM Object new int 2 0 0 3 1 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref  XPCOMObject queryInterface AddRef
public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  queryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Create Instance args 0 args 1 args 2  AddRef CreateInstance
public int method2 int args return Release public int method3 int args return Create Instance args 0 args 1 args 2 public int method4 int args return Lock Factory args 0  CreateInstance LockFactory
void createCOM Interfaces Create each of the interfaces that this object implements supports new XPCOM Object new int 2 0 0 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release factory new XPCOM Object new int 2 0 0 3 1 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Create Instance args 0 args 1 args 2 public int method4 int args return Lock Factory args 0  createCOMInterfaces XPCOMObject queryInterface AddRef XPCOMObject queryInterface AddRef CreateInstance LockFactory
void disposeCOM Interfaces if supports null supports dispose supports null if factory null factory dispose factory null  disposeCOMInterfaces
int get Address return factory get Address  getAddress getAddress
int query Interface int riid int ppv Object if riid 0 ppv Object 0 return XPCOM NS ERROR NO INTERFACE nsID guid new nsID XPCOM memmove guid riid nsID sizeof if guid Equals nsI Supports NS ISUPPORTS IID XPCOM memmove ppv Object new int supports get Address 4 Add Ref return XPCOM NS OK if guid Equals nsI Factory NS IFACTORY IID XPCOM memmove ppv Object new int factory get Address 4 Add Ref return XPCOM NS OK XPCOM memmove ppv Object new int 0 4 return XPCOM NS ERROR NO INTERFACE  queryInterface ppvObject ppvObject NS_ERROR_NO_INTERFACE nsISupports NS_ISUPPORTS_IID ppvObject getAddress AddRef NS_OK nsIFactory NS_IFACTORY_IID ppvObject getAddress AddRef NS_OK ppvObject NS_ERROR_NO_INTERFACE
int Release ref Count if ref Count 0 disposeCOM Interfaces return ref Count  refCount refCount disposeCOMInterfaces refCount
public int Create Instance int a Outer int iid int result Prompt Service prompt Service new Prompt Service prompt Service Add Ref XPCOM memmove result new int prompt Service get Address 4 return XPCOM NS OK  CreateInstance aOuter PromptService promptService PromptService promptService AddRef promptService getAddress NS_OK
public int Lock Factory int lock return XPCOM NS OK  LockFactory NS_OK

int ref Count 0 public Window Creator createCOM Interfaces  refCount WindowCreator createCOMInterfaces
int Add Ref ref Count return ref Count  AddRef refCount refCount
Create each of the interfaces that this object implements supports new XPCOM Object new int 2 0 0 public int method0 int args return query Interface args 0 args 1  XPCOMObject queryInterface
supports new XPCOM Object new int 2 0 0 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref  XPCOMObject queryInterface AddRef
public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  queryInterface AddRef
window Creator new XPCOM Object new int 2 0 0 3 public int method0 int args return query Interface args 0 args 1  windowCreator XPCOMObject queryInterface
window Creator new XPCOM Object new int 2 0 0 3 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref  windowCreator XPCOMObject queryInterface AddRef
public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  queryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Create Chrome Window args 0 args 1 args 2  AddRef CreateChromeWindow
void createCOM Interfaces Create each of the interfaces that this object implements supports new XPCOM Object new int 2 0 0 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release window Creator new XPCOM Object new int 2 0 0 3 public int method0 int args return query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Create Chrome Window args 0 args 1 args 2  createCOMInterfaces XPCOMObject queryInterface AddRef windowCreator XPCOMObject queryInterface AddRef CreateChromeWindow
void disposeCOM Interfaces if supports null supports dispose supports null if window Creator null window Creator dispose window Creator null  disposeCOMInterfaces windowCreator windowCreator windowCreator
int get Address return window Creator get Address  getAddress windowCreator getAddress
int query Interface int riid int ppv Object if riid 0 ppv Object 0 return XPCOM NS ERROR NO INTERFACE nsID guid new nsID XPCOM memmove guid riid nsID sizeof if guid Equals nsI Supports NS ISUPPORTS IID XPCOM memmove ppv Object new int supports get Address 4 Add Ref return XPCOM NS OK if guid Equals nsI Window Creator NS IWINDOWCREATOR IID XPCOM memmove ppv Object new int window Creator get Address 4 Add Ref return XPCOM NS OK XPCOM memmove ppv Object new int 0 4 return XPCOM NS ERROR NO INTERFACE  queryInterface ppvObject ppvObject NS_ERROR_NO_INTERFACE nsISupports NS_ISUPPORTS_IID ppvObject getAddress AddRef NS_OK nsIWindowCreator NS_IWINDOWCREATOR_IID ppvObject windowCreator getAddress AddRef NS_OK ppvObject NS_ERROR_NO_INTERFACE
int Release ref Count if ref Count 0 disposeCOM Interfaces return ref Count  refCount refCount disposeCOMInterfaces refCount
browser new Browser shell SWT NONE browser add Visibility Window Listener new Visibility Window Listener public void hide Window Event event  addVisibilityWindowListener VisibilityWindowListener WindowEvent
public void show Window Event event if event location null shell set Location event location if event size null Point size event size shell set Size shell compute Size size x size y shell open  WindowEvent setLocation setSize computeSize
browser add Close Window Listener new Close Window Listener public void close Window Event event shell close  addCloseWindowListener CloseWindowListener WindowEvent
int Create Chrome Window int parent int chrome Flags int  retval if parent 0 return XPCOM NS ERROR NOT IMPLEMENTED nsI Web Browser Chrome browser Chrome Parent new nsI Web Browser Chrome parent int a Web Browser new int 1 int rc browser Chrome Parent Get Web Browser a Web Browser if rc XPCOM NS OK Browser error rc if a Web Browser 0 0 Browser error XPCOM NS ERROR NO INTERFACE nsI Web Browser web Browser new nsI Web Browser a Web Browser 0 int result new int 1 rc web Browser Query Interface nsI Base Window NS IBASEWINDOW IID result if rc XPCOM NS OK Browser error rc if result 0 0 Browser error XPCOM NS ERROR NO INTERFACE web Browser Release nsI Base Window base Window new nsI Base Window result 0 result 0 0 int a Parent Native Window new int 1 rc base Window Get Parent Native Window a Parent Native Window if rc XPCOM NS OK Browser error rc if a Parent Native Window 0 0 Browser error XPCOM NS ERROR NO INTERFACE base Window Release Display display Display get Current Shell shells display get Shells Browser src null for int i 0 i shells length i src Browser find Browser shells i a Parent Native Window 0 if src null break final Browser browser boolean doit false if chrome Flags nsI Web Browser Chrome CHROME MODAL 0 Feature on Mozilla On platforms that lack a native dialog Mozilla sends a requests for a new Browser instance in a modal window e g on Windows Mozilla brings up automatically a native Print Dialog in response to the javascript command window print whereas on Linux Mozilla requests a new modal window and a Browser to display an emulated HTML based print dialog For this reason modal requests are handled here and not exposed to the user final Shell shell new Shell src get Shell SWT DIALOG TRIM SWT APPLICATION MODAL shell set Layout new Fill Layout browser new Browser shell SWT NONE browser add Visibility Window Listener new Visibility Window Listener public void hide Window Event event public void show Window Event event if event location null shell set Location event location if event size null Point size event size shell set Size shell compute Size size x size y shell open browser add Close Window Listener new Close Window Listener public void close Window Event event shell close doit true else Window Event event new Window Event src event display display event widget src for int i 0 i src open Window Listeners length i src open Window Listeners i open event browser event browser doit browser null browser is Disposed if doit int address browser web Browser Chrome get Address nsI Web Browser Chrome web Browser Chrome new nsI Web Browser Chrome address web Browser Chrome Add Ref XPCOM memmove  retval new int address 4 return doit XPCOM NS OK XPCOM NS ERROR NOT IMPLEMENTED  CreateChromeWindow chromeFlags _retval NS_ERROR_NOT_IMPLEMENTED nsIWebBrowserChrome browserChromeParent nsIWebBrowserChrome aWebBrowser browserChromeParent GetWebBrowser aWebBrowser NS_OK aWebBrowser NS_ERROR_NO_INTERFACE nsIWebBrowser webBrowser nsIWebBrowser aWebBrowser webBrowser QueryInterface nsIBaseWindow NS_IBASEWINDOW_IID NS_OK NS_ERROR_NO_INTERFACE webBrowser nsIBaseWindow baseWindow nsIBaseWindow aParentNativeWindow baseWindow GetParentNativeWindow aParentNativeWindow NS_OK aParentNativeWindow NS_ERROR_NO_INTERFACE baseWindow getCurrent getShells findBrowser aParentNativeWindow chromeFlags nsIWebBrowserChrome CHROME_MODAL getShell DIALOG_TRIM APPLICATION_MODAL setLayout FillLayout addVisibilityWindowListener VisibilityWindowListener WindowEvent WindowEvent setLocation setSize computeSize addCloseWindowListener CloseWindowListener WindowEvent WindowEvent WindowEvent openWindowListeners openWindowListeners isDisposed webBrowserChrome getAddress nsIWebBrowserChrome webBrowserChrome nsIWebBrowserChrome webBrowserChrome AddRef _retval NS_OK NS_ERROR_NOT_IMPLEMENTED

public static final native boolean Dt App Initialize int app Context int display int top Wiget byte app Name  DtAppInitialize appContext topWiget appName
byte app Name byte app Class public static final native void Dt Db Load  appName appClass DtDbLoad
byte app Class public static final native void Dt Db Load public static final native int Dt Dts Data Type Names  appClass DtDbLoad DtDtsDataTypeNames
public static final native void Dt Db Load public static final native int Dt Dts Data Type Names public static final native int Dt Dts File To Data Type byte file Name  DtDbLoad DtDtsDataTypeNames DtDtsFileToDataType fileName
public static final native int Dt Dts Data Type Names public static final native int Dt Dts File To Data Type byte file Name public static final native boolean Dt Dts Data Type Is Action byte data Type  DtDtsDataTypeNames DtDtsFileToDataType fileName DtDtsDataTypeIsAction dataType
public static final native int Dt Dts File To Data Type byte file Name public static final native boolean Dt Dts Data Type Is Action byte data Type public static final native int Dt Dts Data Type To Attribute Value byte data Type byte attr Name byte opt Name  DtDtsFileToDataType fileName DtDtsDataTypeIsAction dataType DtDtsDataTypeToAttributeValue dataType attrName optName
byte attr Name byte opt Name public static final native void Dt Dts Free Data Type int data Type  attrName optName DtDtsFreeDataType dataType
byte opt Name public static final native void Dt Dts Free Data Type int data Type public static final native void Dt Dts Free Data Type Names int data Type List  optName DtDtsFreeDataType dataType DtDtsFreeDataTypeNames dataTypeList
public static final native void Dt Dts Free Data Type int data Type public static final native void Dt Dts Free Data Type Names int data Type List public static final native void Dt Dts Free Attribute Value int attr Value  DtDtsFreeDataType dataType DtDtsFreeDataTypeNames dataTypeList DtDtsFreeAttributeValue attrValue
public static final native void Dt Dts Free Attribute Value int attr Value public static final native int Dt Action Invoke int top Widget byte action byte file Name TBD argument should be Dt Action Arg args int arg Count byte term Opts byte exec Host byte context Dir int use Indicator int callback  DtDtsFreeAttributeValue attrValue DtActionInvoke topWidget fileName DtActionArg argCount termOpts execHost contextDir useIndicator
Utility methods for processing CDE related structures public static final native int list Element At int name List int index  listElementAt nameList

public static final int KICON SMALL 0 public static final native int KApplication new int qc String  KICON_SMALL KApplication_new qcString
public static final native int KApplication new int qc String public static final native int KGlobal iconLoader  KApplication_new qcString KGlobal_iconLoader
public static final native int KGlobal iconLoader public static final native int KIconLoader iconPath int loader int iconQ String int icon Type int can Return Null  KGlobal_iconLoader KIconLoader_iconPath iconQString iconType canReturnNull
public static final native int KIconLoader iconPath int loader int iconQ String int icon Type int can Return Null public static final native int KMimeType mimeType int mime Type Name  KIconLoader_iconPath iconQString iconType canReturnNull KMimeType_mimeType mimeTypeName
public static final native int KMimeType mimeType int mime Type Name public static final native int KMimeType icon int mime Type int unused1 int unused2  KMimeType_mimeType mimeTypeName KMimeType_icon mimeType
public static final native int KMimeType mimeType int mime Type Name public static final native int KMimeType icon int mime Type int unused1 int unused2 public static final native int KMimeType name int mime Type  KMimeType_mimeType mimeTypeName KMimeType_icon mimeType KMimeType_name mimeType
public static final native int KMimeType icon int mime Type int unused1 int unused2 public static final native int KMimeType name int mime Type public static final native int KMimeType patterns int mime Type  KMimeType_icon mimeType KMimeType_name mimeType KMimeType_patterns mimeType
public static final native int KMimeType name int mime Type public static final native int KMimeType patterns int mime Type public static final native int KMimeType offers int mime Type Name  KMimeType_name mimeType KMimeType_patterns mimeType KMimeType_offers mimeTypeName
public static final native int KMimeType patterns int mime Type public static final native int KMimeType offers int mime Type Name public static final native int KMimeType allMimeTypes  KMimeType_patterns mimeType KMimeType_offers mimeTypeName KMimeType_allMimeTypes
public static final native int KMimeType allMimeTypes public static final native int KMimeTypeList begin int mime Type List  KMimeType_allMimeTypes KMimeTypeList_begin mimeTypeList
public static final native int KMimeTypeList begin int mime Type List public static final native int KMimeTypeList delete int mime Type List  KMimeTypeList_begin mimeTypeList KMimeTypeList_delete mimeTypeList
public static final native int KMimeTypeList begin int mime Type List public static final native int KMimeTypeList delete int mime Type List public static final native int KMimeTypeList end int mime Type List  KMimeTypeList_begin mimeTypeList KMimeTypeList_delete mimeTypeList KMimeTypeList_end mimeTypeList
public static final native int KMimeTypeList end int mime Type List public static final native int KMimeTypeListIterator delete int iterator  KMimeTypeList_end mimeTypeList KMimeTypeListIterator_delete
public static final native int KMimeTypeListIterator delete int iterator public static final native int KMimeTypeListIterator dereference int iterator  KMimeTypeListIterator_delete KMimeTypeListIterator_dereference
public static final native int KMimeTypeListIterator delete int iterator public static final native int KMimeTypeListIterator dereference int iterator public static final native int KMimeTypeListIterator equals int iterator int iterator2  KMimeTypeListIterator_delete KMimeTypeListIterator_dereference KMimeTypeListIterator_equals
public static final native int KMimeTypeListIterator dereference int iterator public static final native int KMimeTypeListIterator equals int iterator int iterator2 public static final native void KMimeTypeListIterator increment int iterator  KMimeTypeListIterator_dereference KMimeTypeListIterator_equals KMimeTypeListIterator_increment
public static final native void KMimeTypeListIterator increment int iterator public static final native int QStringList begin int qstring List  KMimeTypeListIterator_increment QStringList_begin qstringList
public static final native int QStringList begin int qstring List public static final native int QStringList delete int qstring List  QStringList_begin qstringList QStringList_delete qstringList
public static final native int QStringList begin int qstring List public static final native int QStringList delete int qstring List public static final native int QStringList end int qstring List  QStringList_begin qstringList QStringList_delete qstringList QStringList_end qstringList
public static final native int QStringList end int qstring List public static final native int QStringListIterator delete int iterator  QStringList_end qstringList QStringListIterator_delete
public static final native int QStringListIterator delete int iterator public static final native int QStringListIterator dereference int iterator  QStringListIterator_delete QStringListIterator_dereference
public static final native int QStringListIterator delete int iterator public static final native int QStringListIterator dereference int iterator public static final native int QStringListIterator equals int iterator int iterator2  QStringListIterator_delete QStringListIterator_dereference QStringListIterator_equals
public static final native int QStringListIterator dereference int iterator public static final native int QStringListIterator equals int iterator int iterator2 public static final native void QStringListIterator increment int iterator  QStringListIterator_dereference QStringListIterator_equals QStringListIterator_increment
public static final native void QStringListIterator increment int iterator public static final native int KURL new int qURL String  QStringListIterator_increment KURL_new qURLString
public static final native int KURL new int qURL String public static final native void KURL delete int url  KURL_new qURLString KURL_delete
public static final native int KURL new int qURL String public static final native void KURL delete int url public static final native int KRun runURL int url int mime Type Name  KURL_new qURLString KURL_delete KRun_runURL mimeTypeName
public static final native int KRun runURL int url int mime Type Name public static final native int KServiceList delete int service List  KRun_runURL mimeTypeName KServiceList_delete serviceList
public static final native int KServiceList delete int service List public static final native int QCString data int qc String  KServiceList_delete serviceList QCString_data qcString
public static final native int QCString data int qc String public static final native int QCString delete int qc String  QCString_data qcString QCString_delete qcString
public static final native int QCString data int qc String public static final native int QCString delete int qc String public static final native int QCString new byte string  QCString_data qcString QCString_delete qcString QCString_new
public static final native int QCString new byte string public static final native int QString delete int q String  QCString_new QString_delete qString
public static final native int QString delete int q String public static final native int QString equals int q String int q String2  QString_delete qString QString_equals qString qString2
public static final native int QString delete int q String public static final native int QString equals int q String int q String2 public static final native int QString new byte string  QString_delete qString QString_equals qString qString2 QString_new
public static final native int QString equals int q String int q String2 public static final native int QString new byte string public static final native int QString utf8 int q String  QString_equals qString qString2 QString_new QString_utf8 qString

static int malloc String name int length int str Len name length if Next Resource Start str Len 2 RESOURCE START RESOURCE LENGTH System out println Warning SWT Resource overrun Increase OS RESOURCE LENGTH System out println Warning Exiting System exit 0 char unicode new char str Len name get Chars 0 str Len unicode 0 byte buffer new byte str Len 2 buffer 0 byte length for int i 0 i str Len i buffer i 1 byte unicode i OS memmove Next Resource Start buffer str Len 2 int result Next Resource Start 1 Next Resource Start str Len 2 return result  strLen NextResourceStart strLen RESOURCE_START RESOURCE_LENGTH RESOURCE_LENGTH strLen getChars strLen strLen strLen NextResourceStart strLen NextResourceStart NextResourceStart strLen
return result static final native int set Resource Mem int start int end  setResourceMem
static final native int set Resource Mem int start int end Natives public static final synchronized native int Call int proc int arg1 int arg2  setResourceMem
Natives public static final synchronized native int Call int proc int arg1 int arg2 public static final synchronized native int Connection Number int display  ConnectionNumber
public static final synchronized native int Call int proc int arg1 int arg2 public static final synchronized native int Connection Number int display public static final native int CODESET  ConnectionNumber
public static final synchronized native int Connection Number int display public static final native int CODESET public static final native boolean FD ISSET int fd byte fd set  ConnectionNumber FD_ISSET fd_set
public static final native int CODESET public static final native boolean FD ISSET int fd byte fd set public static final native void FD SET int fd byte fd set  FD_ISSET fd_set FD_SET fd_set
public static final native boolean FD ISSET int fd byte fd set public static final native void FD SET int fd byte fd set public static final native void FD ZERO byte fd set  FD_ISSET fd_set FD_SET fd_set FD_ZERO fd_set
public static final native void FD SET int fd byte fd set public static final native void FD ZERO byte fd set public static final native int LC CTYPE  FD_SET fd_set FD_ZERO fd_set LC_CTYPE
public static final native void FD ZERO byte fd set public static final native int LC CTYPE public static final native int MB CUR MAX  FD_ZERO fd_set LC_CTYPE MB_CUR_MAX
public static final native int LC CTYPE public static final native int MB CUR MAX public static final synchronized native int override Shell Widget Class  LC_CTYPE MB_CUR_MAX overrideShellWidgetClass
public static final native int MB CUR MAX public static final synchronized native int override Shell Widget Class public static final synchronized native int shell Widget Class  MB_CUR_MAX overrideShellWidgetClass shellWidgetClass
public static final synchronized native int override Shell Widget Class public static final synchronized native int shell Widget Class public static final synchronized native int top Level Shell Widget Class  overrideShellWidgetClass shellWidgetClass topLevelShellWidgetClass
public static final synchronized native int shell Widget Class public static final synchronized native int top Level Shell Widget Class public static final synchronized native int transient Shell Widget Class  shellWidgetClass topLevelShellWidgetClass transientShellWidgetClass
public static final synchronized native int top Level Shell Widget Class public static final synchronized native int transient Shell Widget Class public static final synchronized native int xm Menu Shell Widget Class  topLevelShellWidgetClass transientShellWidgetClass xmMenuShellWidgetClass
public static final synchronized native int transient Shell Widget Class public static final synchronized native int xm Menu Shell Widget Class public static final synchronized native int X Alloc Color int display int colormap X Color color  transientShellWidgetClass xmMenuShellWidgetClass XAllocColor XColor
public static final synchronized native int xm Menu Shell Widget Class public static final synchronized native int X Alloc Color int display int colormap X Color color public static final synchronized native void X Bell int display int ms  xmMenuShellWidgetClass XAllocColor XColor XBell
public static final synchronized native int X Alloc Color int display int colormap X Color color public static final synchronized native void X Bell int display int ms public static final synchronized native int X Black Pixel int display int screen Num  XAllocColor XColor XBell XBlackPixel screenNum
public static final synchronized native void X Bell int display int ms public static final synchronized native int X Black Pixel int display int screen Num public static final synchronized native int X Change Active Pointer Grab int display int event Mask int cursor int time  XBell XBlackPixel screenNum XChangeActivePointerGrab eventMask
public static final synchronized native int X Black Pixel int display int screen Num public static final synchronized native int X Change Active Pointer Grab int display int event Mask int cursor int time public static final synchronized native void X Change Property int display int w int property int type int format int mode int data int nelements  XBlackPixel screenNum XChangeActivePointerGrab eventMask XChangeProperty
public static final synchronized native int X Change Active Pointer Grab int display int event Mask int cursor int time public static final synchronized native void X Change Property int display int w int property int type int format int mode int data int nelements public static final synchronized native void X Change Window Attributes int display int window int mask X Set Window Attributes attributes  XChangeActivePointerGrab eventMask XChangeProperty XChangeWindowAttributes XSetWindowAttributes
public static final synchronized native void X Change Property int display int w int property int type int format int mode int data int nelements public static final synchronized native void X Change Window Attributes int display int window int mask X Set Window Attributes attributes public static final synchronized native int X Check If Event int display int event return int predicate int arg  XChangeProperty XChangeWindowAttributes XSetWindowAttributes XCheckIfEvent event_return
public static final synchronized native void X Change Window Attributes int display int window int mask X Set Window Attributes attributes public static final synchronized native int X Check If Event int display int event return int predicate int arg public static final synchronized native boolean X Check Mask Event int display int mask int event  XChangeWindowAttributes XSetWindowAttributes XCheckIfEvent event_return XCheckMaskEvent
public static final synchronized native int X Check If Event int display int event return int predicate int arg public static final synchronized native boolean X Check Mask Event int display int mask int event public static final synchronized native boolean X Check Window Event int display int window int mask int event  XCheckIfEvent event_return XCheckMaskEvent XCheckWindowEvent
public static final synchronized native boolean X Check Mask Event int display int mask int event public static final synchronized native boolean X Check Window Event int display int window int mask int event public static final synchronized native void X Clear Area int display int window int x int y int width int height boolean exposures  XCheckMaskEvent XCheckWindowEvent XClearArea
public static final synchronized native boolean X Check Window Event int display int window int mask int event public static final synchronized native void X Clear Area int display int window int x int y int width int height boolean exposures public static final synchronized native void X Clip Box int region X Rectangle rectangle  XCheckWindowEvent XClearArea XClipBox XRectangle
public static final synchronized native void X Clear Area int display int window int x int y int width int height boolean exposures public static final synchronized native void X Clip Box int region X Rectangle rectangle public static final synchronized native void X Close Display int display  XClearArea XClipBox XRectangle XCloseDisplay
public static final synchronized native void X Clip Box int region X Rectangle rectangle public static final synchronized native void X Close Display int display public static final synchronized native void X Copy Area int display int src int dest int gc int src x int src y int width int height int dest x int dest y  XClipBox XRectangle XCloseDisplay XCopyArea src_x src_y dest_x dest_y
public static final synchronized native void X Close Display int display public static final synchronized native void X Copy Area int display int src int dest int gc int src x int src y int width int height int dest x int dest y public static final synchronized native void X Copy Plane int display int src int dest int gc int src x int src y int width int height int dest x int dest y int plane  XCloseDisplay XCopyArea src_x src_y dest_x dest_y XCopyPlane src_x src_y dest_x dest_y
public static final synchronized native void X Copy Area int display int src int dest int gc int src x int src y int width int height int dest x int dest y public static final synchronized native void X Copy Plane int display int src int dest int gc int src x int src y int width int height int dest x int dest y int plane public static final synchronized native int X Create Bitmap From Data int display int drawable byte data int width int height  XCopyArea src_x src_y dest_x dest_y XCopyPlane src_x src_y dest_x dest_y XCreateBitmapFromData
public static final synchronized native void X Copy Plane int display int src int dest int gc int src x int src y int width int height int dest x int dest y int plane public static final synchronized native int X Create Bitmap From Data int display int drawable byte data int width int height public static final synchronized native int X Create Font Cursor int display int shape  XCopyPlane src_x src_y dest_x dest_y XCreateBitmapFromData XCreateFontCursor
public static final synchronized native int X Create Bitmap From Data int display int drawable byte data int width int height public static final synchronized native int X Create Font Cursor int display int shape public static final synchronized native int X CreateGC int display int window int mask XGC Values values  XCreateBitmapFromData XCreateFontCursor XCreateGC XGCValues
public static final synchronized native int X Create Font Cursor int display int shape public static final synchronized native int X CreateGC int display int window int mask XGC Values values public static final synchronized native int X Create Image int display int visual int depth int format int offset int data int width int height int bitmap pad int bytes per line  XCreateFontCursor XCreateGC XGCValues XCreateImage bitmap_pad bytes_per_line
public static final synchronized native int X CreateGC int display int window int mask XGC Values values public static final synchronized native int X Create Image int display int visual int depth int format int offset int data int width int height int bitmap pad int bytes per line public static final synchronized native int X Create Pixmap int display int drawable int width int height int depth  XCreateGC XGCValues XCreateImage bitmap_pad bytes_per_line XCreatePixmap
public static final synchronized native int X Create Image int display int visual int depth int format int offset int data int width int height int bitmap pad int bytes per line public static final synchronized native int X Create Pixmap int display int drawable int width int height int depth public static final synchronized native int X Create Pixmap Cursor int display int source int mask X Color foreground color X Color background color int x int y  XCreateImage bitmap_pad bytes_per_line XCreatePixmap XCreatePixmapCursor XColor foreground_color XColor background_color
public static final synchronized native int X Create Pixmap int display int drawable int width int height int depth public static final synchronized native int X Create Pixmap Cursor int display int source int mask X Color foreground color X Color background color int x int y public static final synchronized native int X Create Region  XCreatePixmap XCreatePixmapCursor XColor foreground_color XColor background_color XCreateRegion
public static final synchronized native int X Create Pixmap Cursor int display int source int mask X Color foreground color X Color background color int x int y public static final synchronized native int X Create Region public static final synchronized native int X Create Window int display int parent int x int y int width int height int border width int depth int clazz int visual long value mask X Set Window Attributes attributes  XCreatePixmapCursor XColor foreground_color XColor background_color XCreateRegion XCreateWindow border_width value_mask XSetWindowAttributes
public static final synchronized native int X Create Region public static final synchronized native int X Create Window int display int parent int x int y int width int height int border width int depth int clazz int visual long value mask X Set Window Attributes attributes public static final synchronized native int X Default Colormap int display int screen number  XCreateRegion XCreateWindow border_width value_mask XSetWindowAttributes XDefaultColormap screen_number
public static final synchronized native int X Create Window int display int parent int x int y int width int height int border width int depth int clazz int visual long value mask X Set Window Attributes attributes public static final synchronized native int X Default Colormap int display int screen number public static final synchronized native int X Default Colormap Of Screen int screen  XCreateWindow border_width value_mask XSetWindowAttributes XDefaultColormap screen_number XDefaultColormapOfScreen
public static final synchronized native int X Default Colormap int display int screen number public static final synchronized native int X Default Colormap Of Screen int screen public static final synchronized native int X Default Depth Of Screen int screen  XDefaultColormap screen_number XDefaultColormapOfScreen XDefaultDepthOfScreen
public static final synchronized native int X Default Colormap Of Screen int screen public static final synchronized native int X Default Depth Of Screen int screen public static final synchronized native int X DefaultGC Of Screen int screen  XDefaultColormapOfScreen XDefaultDepthOfScreen XDefaultGCOfScreen
public static final synchronized native int X Default Depth Of Screen int screen public static final synchronized native int X DefaultGC Of Screen int screen public static final synchronized native int X Default Root Window int display  XDefaultDepthOfScreen XDefaultGCOfScreen XDefaultRootWindow
public static final synchronized native int X DefaultGC Of Screen int screen public static final synchronized native int X Default Root Window int display public static final synchronized native int X Default Screen int display  XDefaultGCOfScreen XDefaultRootWindow XDefaultScreen
public static final synchronized native int X Default Root Window int display public static final synchronized native int X Default Screen int display public static final synchronized native int X Default Screen Of Display int display  XDefaultRootWindow XDefaultScreen XDefaultScreenOfDisplay
public static final synchronized native int X Default Screen int display public static final synchronized native int X Default Screen Of Display int display public static final synchronized native int X Default Visual int display int screen number  XDefaultScreen XDefaultScreenOfDisplay XDefaultVisual screen_number
public static final synchronized native int X Default Screen Of Display int display public static final synchronized native int X Default Visual int display int screen number public static final synchronized native void X Define Cursor int display int window int cursor  XDefaultScreenOfDisplay XDefaultVisual screen_number XDefineCursor
public static final synchronized native int X Default Visual int display int screen number public static final synchronized native void X Define Cursor int display int window int cursor public static final synchronized native int X Destroy Image int ximage  XDefaultVisual screen_number XDefineCursor XDestroyImage
public static final synchronized native void X Define Cursor int display int window int cursor public static final synchronized native int X Destroy Image int ximage public static final synchronized native void X Destroy Region int region  XDefineCursor XDestroyImage XDestroyRegion
public static final synchronized native int X Destroy Image int ximage public static final synchronized native void X Destroy Region int region public static final synchronized native void X Destroy Window int display int w  XDestroyImage XDestroyRegion XDestroyWindow
public static final synchronized native void X Destroy Region int region public static final synchronized native void X Destroy Window int display int w public static final synchronized native int X Display Height int display int screen  XDestroyRegion XDestroyWindow XDisplayHeight
public static final synchronized native void X Destroy Window int display int w public static final synchronized native int X Display Height int display int screen public static final synchronized native int X Display HeightMM int display int screen  XDestroyWindow XDisplayHeight XDisplayHeightMM
public static final synchronized native int X Display Height int display int screen public static final synchronized native int X Display HeightMM int display int screen public static final synchronized native int X Display Width int display int screen  XDisplayHeight XDisplayHeightMM XDisplayWidth
public static final synchronized native int X Display HeightMM int display int screen public static final synchronized native int X Display Width int display int screen public static final synchronized native int X Display WidthMM int display int screen  XDisplayHeightMM XDisplayWidth XDisplayWidthMM
public static final synchronized native int X Display Width int display int screen public static final synchronized native int X Display WidthMM int display int screen public static final synchronized native void X Draw Arc int display int drawable int gc int x1 int y1 int x2 int y2 int a1 int a2  XDisplayWidth XDisplayWidthMM XDrawArc
public static final synchronized native int X Display WidthMM int display int screen public static final synchronized native void X Draw Arc int display int drawable int gc int x1 int y1 int x2 int y2 int a1 int a2 public static final synchronized native void X Draw Line int display int drawable int gc int x1 int y1 int x2 int y2  XDisplayWidthMM XDrawArc XDrawLine
public static final synchronized native void X Draw Arc int display int drawable int gc int x1 int y1 int x2 int y2 int a1 int a2 public static final synchronized native void X Draw Line int display int drawable int gc int x1 int y1 int x2 int y2 public static final synchronized native void X Draw Lines int display int drawable int gc short x Points int n Points int mode  XDrawArc XDrawLine XDrawLines xPoints nPoints
public static final synchronized native void X Draw Line int display int drawable int gc int x1 int y1 int x2 int y2 public static final synchronized native void X Draw Lines int display int drawable int gc short x Points int n Points int mode public static final synchronized native void X Draw Rectangle int display int drawable int gc int x int y int width int height  XDrawLine XDrawLines xPoints nPoints XDrawRectangle
public static final synchronized native void X Draw Lines int display int drawable int gc short x Points int n Points int mode public static final synchronized native void X Draw Rectangle int display int drawable int gc int x int y int width int height public static final synchronized native void X Draw Point int display int drawable int gc int x int y  XDrawLines xPoints nPoints XDrawRectangle XDrawPoint
public static final synchronized native void X Draw Rectangle int display int drawable int gc int x int y int width int height public static final synchronized native void X Draw Point int display int drawable int gc int x int y public static final synchronized native boolean X Empty Region int region  XDrawRectangle XDrawPoint XEmptyRegion
public static final synchronized native void X Draw Point int display int drawable int gc int x int y public static final synchronized native boolean X Empty Region int region public static final synchronized native int X Events Queued int display int mode  XDrawPoint XEmptyRegion XEventsQueued
public static final synchronized native boolean X Empty Region int region public static final synchronized native int X Events Queued int display int mode public static final synchronized native void X Fill Arc int display int drawable int gc int x1 int y1 int x2 int y2 int a1 int a2  XEmptyRegion XEventsQueued XFillArc
public static final synchronized native int X Events Queued int display int mode public static final synchronized native void X Fill Arc int display int drawable int gc int x1 int y1 int x2 int y2 int a1 int a2 public static final synchronized native int X Fill Polygon int display int drawable int gc short x Points int n Points int mode int style  XEventsQueued XFillArc XFillPolygon xPoints nPoints
public static final synchronized native void X Fill Arc int display int drawable int gc int x1 int y1 int x2 int y2 int a1 int a2 public static final synchronized native int X Fill Polygon int display int drawable int gc short x Points int n Points int mode int style public static final synchronized native void X Fill Rectangle int display int drawable int gc int x int y int width int height  XFillArc XFillPolygon xPoints nPoints XFillRectangle
public static final synchronized native int X Fill Polygon int display int drawable int gc short x Points int n Points int mode int style public static final synchronized native void X Fill Rectangle int display int drawable int gc int x int y int width int height public static final synchronized native boolean X Filter Event int event int window  XFillPolygon xPoints nPoints XFillRectangle XFilterEvent
public static final synchronized native void X Fill Rectangle int display int drawable int gc int x int y int width int height public static final synchronized native boolean X Filter Event int event int window public static final synchronized native void X Flush int display  XFillRectangle XFilterEvent XFlush
public static final synchronized native boolean X Filter Event int event int window public static final synchronized native void X Flush int display public static final synchronized native int X Fonts Of Font Set int font Set int font Structs int font Names  XFilterEvent XFlush XFontsOfFontSet fontSet fontStructs fontNames
public static final synchronized native void X Flush int display public static final synchronized native int X Fonts Of Font Set int font Set int font Structs int font Names public static final synchronized native int X Free int address  XFlush XFontsOfFontSet fontSet fontStructs fontNames XFree
public static final synchronized native int X Fonts Of Font Set int font Set int font Structs int font Names public static final synchronized native int X Free int address public static final synchronized native int X Free Colors int display int colormap int pixels int npixels int planes  XFontsOfFontSet fontSet fontStructs fontNames XFree XFreeColors
public static final synchronized native int X Free int address public static final synchronized native int X Free Colors int display int colormap int pixels int npixels int planes public static final synchronized native void X Free Cursor int display int pixmap  XFree XFreeColors XFreeCursor
public static final synchronized native int X Free Colors int display int colormap int pixels int npixels int planes public static final synchronized native void X Free Cursor int display int pixmap public static final synchronized native void X Free Font int display int font struct  XFreeColors XFreeCursor XFreeFont font_struct
public static final synchronized native void X Free Cursor int display int pixmap public static final synchronized native void X Free Font int display int font struct public static final synchronized native void X Free Font Names int list  XFreeCursor XFreeFont font_struct XFreeFontNames
public static final synchronized native void X Free Font int display int font struct public static final synchronized native void X Free Font Names int list public static final synchronized native void X FreeGC int display int gc  XFreeFont font_struct XFreeFontNames XFreeGC
public static final synchronized native void X Free Font Names int list public static final synchronized native void X FreeGC int display int gc public static final synchronized native void X Free Pixmap int display int pixmap  XFreeFontNames XFreeGC XFreePixmap
public static final synchronized native void X FreeGC int display int gc public static final synchronized native void X Free Pixmap int display int pixmap public static final synchronized native void X Free String List int list  XFreeGC XFreePixmap XFreeStringList
public static final synchronized native void X Free Pixmap int display int pixmap public static final synchronized native void X Free String List int list public static final synchronized native int X GetGC Values int display int gc int valuemask XGC Values values  XFreePixmap XFreeStringList XGetGCValues XGCValues
public static final synchronized native void X Free String List int list public static final synchronized native int X GetGC Values int display int gc int valuemask XGC Values values public static final synchronized native int X Get Geometry int display int drawable int root return int x return int y return int width return int height return int border width return int depth return  XFreeStringList XGetGCValues XGCValues XGetGeometry root_return x_return y_return width_return height_return border_width_return depth_return
public static final synchronized native int X GetGC Values int display int gc int valuemask XGC Values values public static final synchronized native int X Get Geometry int display int drawable int root return int x return int y return int width return int height return int border width return int depth return public static final synchronized native int X Get Image int display int drawable int x int y int width int height int plane mask int format  XGetGCValues XGCValues XGetGeometry root_return x_return y_return width_return height_return border_width_return depth_return XGetImage plane_mask
public static final synchronized native int X Get Geometry int display int drawable int root return int x return int y return int width return int height return int border width return int depth return public static final synchronized native int X Get Image int display int drawable int x int y int width int height int plane mask int format public static final synchronized native int X Get Input Focus int display int window int revert  XGetGeometry root_return x_return y_return width_return height_return border_width_return depth_return XGetImage plane_mask XGetInputFocus
public static final synchronized native int X Get Image int display int drawable int x int y int width int height int plane mask int format public static final synchronized native int X Get Input Focus int display int window int revert public static final synchronized native boolean X Get Window Attributes int display int window X Window Attributes attributes  XGetImage plane_mask XGetInputFocus XGetWindowAttributes XWindowAttributes
public static final synchronized native int X Get Input Focus int display int window int revert public static final synchronized native boolean X Get Window Attributes int display int window X Window Attributes attributes public static final synchronized native int X Get Window Property int display int window int property int offset int length boolean delete int req type int actual type return int actual format return int nitems return int bytes after return int prop return  XGetInputFocus XGetWindowAttributes XWindowAttributes XGetWindowProperty req_type actual_type_return actual_format_return nitems_return bytes_after_return prop_return
public static final synchronized native boolean X Get Window Attributes int display int window X Window Attributes attributes public static final synchronized native int X Get Window Property int display int window int property int offset int length boolean delete int req type int actual type return int actual format return int nitems return int bytes after return int prop return public static final synchronized native int X Grab Keyboard int display int grab Window int owner Events int pointer Mode int keyboard Mode int time  XGetWindowAttributes XWindowAttributes XGetWindowProperty req_type actual_type_return actual_format_return nitems_return bytes_after_return prop_return XGrabKeyboard grabWindow ownerEvents pointerMode keyboardMode
public static final synchronized native int X Get Window Property int display int window int property int offset int length boolean delete int req type int actual type return int actual format return int nitems return int bytes after return int prop return public static final synchronized native int X Grab Keyboard int display int grab Window int owner Events int pointer Mode int keyboard Mode int time public static final synchronized native int X Grab Pointer int display int grab Window int owner Events int event Mask int pointer Mode int keyboard Mode int confine To Window int cursor int time  XGetWindowProperty req_type actual_type_return actual_format_return nitems_return bytes_after_return prop_return XGrabKeyboard grabWindow ownerEvents pointerMode keyboardMode XGrabPointer grabWindow ownerEvents eventMask pointerMode keyboardMode confineToWindow
public static final synchronized native int X Grab Keyboard int display int grab Window int owner Events int pointer Mode int keyboard Mode int time public static final synchronized native int X Grab Pointer int display int grab Window int owner Events int event Mask int pointer Mode int keyboard Mode int confine To Window int cursor int time public static final synchronized native int X Init Threads  XGrabKeyboard grabWindow ownerEvents pointerMode keyboardMode XGrabPointer grabWindow ownerEvents eventMask pointerMode keyboardMode confineToWindow XInitThreads
public static final synchronized native int X Grab Pointer int display int grab Window int owner Events int event Mask int pointer Mode int keyboard Mode int confine To Window int cursor int time public static final synchronized native int X Init Threads public static final synchronized native int X Intern Atom int display byte name boolean if Exists  XGrabPointer grabWindow ownerEvents eventMask pointerMode keyboardMode confineToWindow XInitThreads XInternAtom ifExists
public static final synchronized native int X Init Threads public static final synchronized native int X Intern Atom int display byte name boolean if Exists public static final synchronized native void X Intersect Region int sra int srb int dr return  XInitThreads XInternAtom ifExists XIntersectRegion dr_return
public static final synchronized native int X Intern Atom int display byte name boolean if Exists public static final synchronized native void X Intersect Region int sra int srb int dr return public static final synchronized native int X Keysym To Keycode int display int keysym  XInternAtom ifExists XIntersectRegion dr_return XKeysymToKeycode
public static final synchronized native void X Intersect Region int sra int srb int dr return public static final synchronized native int X Keysym To Keycode int display int keysym public static final synchronized native int X Keysym To String int keysym  XIntersectRegion dr_return XKeysymToKeycode XKeysymToString
public static final synchronized native int X Keysym To Keycode int display int keysym public static final synchronized native int X Keysym To String int keysym public static final synchronized native int X List Fonts int display byte pattern int maxnames int actual count return  XKeysymToKeycode XKeysymToString XListFonts actual_count_return
public static final synchronized native int X Keysym To String int keysym public static final synchronized native int X List Fonts int display byte pattern int maxnames int actual count return public static final synchronized native int X List Properties int display int window int num prop return  XKeysymToString XListFonts actual_count_return XListProperties num_prop_return
public static final synchronized native int X List Fonts int display byte pattern int maxnames int actual count return public static final synchronized native int X List Properties int display int window int num prop return public static final synchronized native int X Locale Of Font Set int font Set  XListFonts actual_count_return XListProperties num_prop_return XLocaleOfFontSet fontSet
public static final synchronized native int X List Properties int display int window int num prop return public static final synchronized native int X Locale Of Font Set int font Set public static final synchronized native int X Lookup String X Key Event event byte string int size int keysym int status  XListProperties num_prop_return XLocaleOfFontSet fontSet XLookupString XKeyEvent
public static final synchronized native int X Locale Of Font Set int font Set public static final synchronized native int X Lookup String X Key Event event byte string int size int keysym int status public static final synchronized native int X Lower Window int display int window  XLocaleOfFontSet fontSet XLookupString XKeyEvent XLowerWindow
public static final synchronized native int X Lookup String X Key Event event byte string int size int keysym int status public static final synchronized native int X Lower Window int display int window public static final synchronized native void X Map Window int display int w  XLookupString XKeyEvent XLowerWindow XMapWindow
public static final synchronized native int X Lower Window int display int window public static final synchronized native void X Map Window int display int w public static final synchronized native int X Get Modifier Mapping int display  XLowerWindow XMapWindow XGetModifierMapping
public static final synchronized native void X Map Window int display int w public static final synchronized native int X Get Modifier Mapping int display public static final synchronized native int X Get Icon Sizes int display int w int size list return int count return  XMapWindow XGetModifierMapping XGetIconSizes size_list_return count_return
public static final synchronized native int X Get Modifier Mapping int display public static final synchronized native int X Get Icon Sizes int display int w int size list return int count return public static final synchronized native void X Move Resize Window int display int w int x int y int width int height  XGetModifierMapping XGetIconSizes size_list_return count_return XMoveResizeWindow
public static final synchronized native int X Get Icon Sizes int display int w int size list return int count return public static final synchronized native void X Move Resize Window int display int w int x int y int width int height public static final synchronized native int X Open Display byte display name  XGetIconSizes size_list_return count_return XMoveResizeWindow XOpenDisplay display_name
public static final synchronized native void X Move Resize Window int display int w int x int y int width int height public static final synchronized native int X Open Display byte display name public static final synchronized native boolean X Point In Region int region int x int y  XMoveResizeWindow XOpenDisplay display_name XPointInRegion
public static final synchronized native int X Open Display byte display name public static final synchronized native boolean X Point In Region int region int x int y public static final synchronized native int X Polygon Region short points int n int fill rule  XOpenDisplay display_name XPointInRegion XPolygonRegion fill_rule
public static final synchronized native boolean X Point In Region int region int x int y public static final synchronized native int X Polygon Region short points int n int fill rule public static final synchronized native int X Put Image int display int drawable int gc int image int srcX int srcY int destX int destY int width int height  XPointInRegion XPolygonRegion fill_rule XPutImage
public static final synchronized native int X Polygon Region short points int n int fill rule public static final synchronized native int X Put Image int display int drawable int gc int image int srcX int srcY int destX int destY int width int height public static final synchronized native int X Query Color int display int colormap X Color color  XPolygonRegion fill_rule XPutImage XQueryColor XColor
public static final synchronized native int X Put Image int display int drawable int gc int image int srcX int srcY int destX int destY int width int height public static final synchronized native int X Query Color int display int colormap X Color color public static final synchronized native int X Query Best Cursor int display int d int width int height int width return int height return  XPutImage XQueryColor XColor XQueryBestCursor width_return height_return
public static final synchronized native int X Query Color int display int colormap X Color color public static final synchronized native int X Query Best Cursor int display int d int width int height int width return int height return public static final synchronized native int X Query Pointer int display int window int root int child int rootX int rootY int windowX int windowY int mask  XQueryColor XColor XQueryBestCursor width_return height_return XQueryPointer
public static final synchronized native int X Query Best Cursor int display int d int width int height int width return int height return public static final synchronized native int X Query Pointer int display int window int root int child int rootX int rootY int windowX int windowY int mask public static final synchronized native int X Query Tree int display int window int root return int parent return int children return int nChildren return  XQueryBestCursor width_return height_return XQueryPointer XQueryTree root_return parent_return children_return nChildren_return
public static final synchronized native int X Query Pointer int display int window int root int child int rootX int rootY int windowX int windowY int mask public static final synchronized native int X Query Tree int display int window int root return int parent return int children return int nChildren return public static final synchronized native int X Raise Window int display int window  XQueryPointer XQueryTree root_return parent_return children_return nChildren_return XRaiseWindow
public static final synchronized native int X Query Tree int display int window int root return int parent return int children return int nChildren return public static final synchronized native int X Raise Window int display int window public static final synchronized native int X ReconfigureWM Window int display int window int screen int value Mask X Window Changes values  XQueryTree root_return parent_return children_return nChildren_return XRaiseWindow XReconfigureWMWindow valueMask XWindowChanges
public static final synchronized native int X Raise Window int display int window public static final synchronized native int X ReconfigureWM Window int display int window int screen int value Mask X Window Changes values public static final synchronized native int X Rect In Region int region int x int y int width int height  XRaiseWindow XReconfigureWMWindow valueMask XWindowChanges XRectInRegion
public static final synchronized native int X ReconfigureWM Window int display int window int screen int value Mask X Window Changes values public static final synchronized native int X Rect In Region int region int x int y int width int height public static final synchronized native int X Reparent Window int display int win int parent int x int y  XReconfigureWMWindow valueMask XWindowChanges XRectInRegion XReparentWindow
public static final synchronized native int X Rect In Region int region int x int y int width int height public static final synchronized native int X Reparent Window int display int win int parent int x int y public static final synchronized native void X Resize Window int display int w int width int height  XRectInRegion XReparentWindow XResizeWindow
public static final synchronized native int X Reparent Window int display int win int parent int x int y public static final synchronized native void X Resize Window int display int w int width int height public static final synchronized native int X Root Window Of Screen int screen  XReparentWindow XResizeWindow XRootWindowOfScreen
public static final synchronized native void X Resize Window int display int w int width int height public static final synchronized native int X Root Window Of Screen int screen public static final synchronized native void X Select Input int display int window int mask  XResizeWindow XRootWindowOfScreen XSelectInput
public static final synchronized native int X Root Window Of Screen int screen public static final synchronized native void X Select Input int display int window int mask public static final synchronized native int X Send Event int display int window boolean propagate int event mask int event  XRootWindowOfScreen XSelectInput XSendEvent event_mask
public static final synchronized native void X Select Input int display int window int mask public static final synchronized native int X Send Event int display int window boolean propagate int event mask int event public static final synchronized native void X Set Background int display int gc int background  XSelectInput XSendEvent event_mask XSetBackground
public static final synchronized native int X Send Event int display int window boolean propagate int event mask int event public static final synchronized native void X Set Background int display int gc int background public static final synchronized native void X Set Clip Mask int display int gc int pixmap  XSendEvent event_mask XSetBackground XSetClipMask
public static final synchronized native void X Set Background int display int gc int background public static final synchronized native void X Set Clip Mask int display int gc int pixmap public static final synchronized native void X Set Clip Rectangles int display int gc int clip x origin int clip y origin X Rectangle rectangles int n int ordering  XSetBackground XSetClipMask XSetClipRectangles clip_x_origin clip_y_origin XRectangle
public static final synchronized native void X Set Clip Mask int display int gc int pixmap public static final synchronized native void X Set Clip Rectangles int display int gc int clip x origin int clip y origin X Rectangle rectangles int n int ordering public static final synchronized native int X Set Dashes int display int gc int dash offset byte dash list int n  XSetClipMask XSetClipRectangles clip_x_origin clip_y_origin XRectangle XSetDashes dash_offset dash_list
public static final synchronized native void X Set Clip Rectangles int display int gc int clip x origin int clip y origin X Rectangle rectangles int n int ordering public static final synchronized native int X Set Dashes int display int gc int dash offset byte dash list int n public static final synchronized native int X Set Error Handler int handler  XSetClipRectangles clip_x_origin clip_y_origin XRectangle XSetDashes dash_offset dash_list XSetErrorHandler
public static final synchronized native int X Set Dashes int display int gc int dash offset byte dash list int n public static final synchronized native int X Set Error Handler int handler public static final synchronized native void X Set Fill Style int display int gc int fill style  XSetDashes dash_offset dash_list XSetErrorHandler XSetFillStyle fill_style
public static final synchronized native int X Set Error Handler int handler public static final synchronized native void X Set Fill Style int display int gc int fill style public static final synchronized native void X Set Foreground int display int gc int foreground  XSetErrorHandler XSetFillStyle fill_style XSetForeground
public static final synchronized native void X Set Fill Style int display int gc int fill style public static final synchronized native void X Set Foreground int display int gc int foreground public static final synchronized native void X Set Function int display int gc int function  XSetFillStyle fill_style XSetForeground XSetFunction
public static final synchronized native void X Set Foreground int display int gc int foreground public static final synchronized native void X Set Function int display int gc int function public static final synchronized native void X Set Graphics Exposures int display int gc boolean graphics exposures  XSetForeground XSetFunction XSetGraphicsExposures graphics_exposures
public static final synchronized native void X Set Function int display int gc int function public static final synchronized native void X Set Graphics Exposures int display int gc boolean graphics exposures public static final synchronized native int X SetIO Error Handler int handler  XSetFunction XSetGraphicsExposures graphics_exposures XSetIOErrorHandler
public static final synchronized native void X Set Graphics Exposures int display int gc boolean graphics exposures public static final synchronized native int X SetIO Error Handler int handler public static final synchronized native int X Set Input Focus int display int window int revert int time  XSetGraphicsExposures graphics_exposures XSetIOErrorHandler XSetInputFocus
public static final synchronized native int X SetIO Error Handler int handler public static final synchronized native int X Set Input Focus int display int window int revert int time public static final synchronized native int X Set Line Attributes int display int gc int line Width int line Style int cap Style int join Style  XSetIOErrorHandler XSetInputFocus XSetLineAttributes lineWidth lineStyle capStyle joinStyle
public static final synchronized native int X Set Input Focus int display int window int revert int time public static final synchronized native int X Set Line Attributes int display int gc int line Width int line Style int cap Style int join Style public static final synchronized native void X Set Region int display int gc int region  XSetInputFocus XSetLineAttributes lineWidth lineStyle capStyle joinStyle XSetRegion
public static final synchronized native int X Set Line Attributes int display int gc int line Width int line Style int cap Style int join Style public static final synchronized native void X Set Region int display int gc int region public static final synchronized native void X Set Stipple int display int gc int pixmap  XSetLineAttributes lineWidth lineStyle capStyle joinStyle XSetRegion XSetStipple
public static final synchronized native void X Set Region int display int gc int region public static final synchronized native void X Set Stipple int display int gc int pixmap public static final synchronized native void X Set Subwindow Mode int display int gc int subwindow mode  XSetRegion XSetStipple XSetSubwindowMode subwindow_mode
public static final synchronized native void X Set Stipple int display int gc int pixmap public static final synchronized native void X Set Subwindow Mode int display int gc int subwindow mode public static final synchronized native void X SetWM Normal Hints int display int w X Size Hints hints  XSetStipple XSetSubwindowMode subwindow_mode XSetWMNormalHints XSizeHints
public static final synchronized native void X Set Subwindow Mode int display int gc int subwindow mode public static final synchronized native void X SetWM Normal Hints int display int w X Size Hints hints public static final synchronized native void X Shape Combine Mask int display int dest int dest kind int x off int y off int src int op  XSetSubwindowMode subwindow_mode XSetWMNormalHints XSizeHints XShapeCombineMask dest_kind x_off y_off
public static final synchronized native void X SetWM Normal Hints int display int w X Size Hints hints public static final synchronized native void X Shape Combine Mask int display int dest int dest kind int x off int y off int src int op public static final synchronized native void X Shape Combine Region int display int dest int dest kind int x off int y off int region int op  XSetWMNormalHints XSizeHints XShapeCombineMask dest_kind x_off y_off XShapeCombineRegion dest_kind x_off y_off
public static final synchronized native void X Shape Combine Mask int display int dest int dest kind int x off int y off int src int op public static final synchronized native void X Shape Combine Region int display int dest int dest kind int x off int y off int region int op public static final synchronized native void X Subtract Region int sra int srb int dr return  XShapeCombineMask dest_kind x_off y_off XShapeCombineRegion dest_kind x_off y_off XSubtractRegion dr_return
public static final synchronized native void X Shape Combine Region int display int dest int dest kind int x off int y off int region int op public static final synchronized native void X Subtract Region int sra int srb int dr return public static final synchronized native void X Sync int display boolean discard  XShapeCombineRegion dest_kind x_off y_off XSubtractRegion dr_return XSync
public static final synchronized native void X Subtract Region int sra int srb int dr return public static final synchronized native void X Sync int display boolean discard public static final synchronized native int X Synchronize int display boolean onoff  XSubtractRegion dr_return XSync XSynchronize
public static final synchronized native void X Sync int display boolean discard public static final synchronized native int X Synchronize int display boolean onoff public static final synchronized native void X Test Fake Button Event int display int button boolean is press int delay  XSync XSynchronize XTestFakeButtonEvent is_press
public static final synchronized native int X Synchronize int display boolean onoff public static final synchronized native void X Test Fake Button Event int display int button boolean is press int delay public static final synchronized native void X Test Fake Key Event int display int keycode boolean is press int delay  XSynchronize XTestFakeButtonEvent is_press XTestFakeKeyEvent is_press
public static final synchronized native void X Test Fake Button Event int display int button boolean is press int delay public static final synchronized native void X Test Fake Key Event int display int keycode boolean is press int delay public static final synchronized native void X Test Fake Motion Event int display int screen number int x int y int delay  XTestFakeButtonEvent is_press XTestFakeKeyEvent is_press XTestFakeMotionEvent screen_number
public static final synchronized native void X Test Fake Key Event int display int keycode boolean is press int delay public static final synchronized native void X Test Fake Motion Event int display int screen number int x int y int delay public static final synchronized native void X Undefine Cursor int display int window  XTestFakeKeyEvent is_press XTestFakeMotionEvent screen_number XUndefineCursor
public static final synchronized native void X Test Fake Motion Event int display int screen number int x int y int delay public static final synchronized native void X Undefine Cursor int display int window public static final synchronized native int X Ungrab Keyboard int display int time  XTestFakeMotionEvent screen_number XUndefineCursor XUngrabKeyboard
public static final synchronized native void X Undefine Cursor int display int window public static final synchronized native int X Ungrab Keyboard int display int time public static final synchronized native int X Ungrab Pointer int display int time  XUndefineCursor XUngrabKeyboard XUngrabPointer
public static final synchronized native int X Ungrab Keyboard int display int time public static final synchronized native int X Ungrab Pointer int display int time public static final synchronized native void X Union Rect With Region X Rectangle rectangle int src region int dest region return  XUngrabKeyboard XUngrabPointer XUnionRectWithRegion XRectangle src_region dest_region_return
public static final synchronized native int X Ungrab Pointer int display int time public static final synchronized native void X Union Rect With Region X Rectangle rectangle int src region int dest region return public static final synchronized native void X Union Region int sra int srb int dr return  XUngrabPointer XUnionRectWithRegion XRectangle src_region dest_region_return XUnionRegion dr_return
public static final synchronized native void X Union Rect With Region X Rectangle rectangle int src region int dest region return public static final synchronized native void X Union Region int sra int srb int dr return public static final synchronized native void X Unmap Window int display int window  XUnionRectWithRegion XRectangle src_region dest_region_return XUnionRegion dr_return XUnmapWindow
public static final synchronized native void X Union Region int sra int srb int dr return public static final synchronized native void X Unmap Window int display int window public static final synchronized native int X Warp Pointer int display int source Window int dest Window int sourceX int sourceY int source Width int source Height int destX int destY  XUnionRegion dr_return XUnmapWindow XWarpPointer sourceWindow destWindow sourceWidth sourceHeight
public static final synchronized native void X Unmap Window int display int window public static final synchronized native int X Warp Pointer int display int source Window int dest Window int sourceX int sourceY int source Width int source Height int destX int destY public static final synchronized native int X White Pixel int display int screen Num  XUnmapWindow XWarpPointer sourceWindow destWindow sourceWidth sourceHeight XWhitePixel screenNum
public static final synchronized native int X Warp Pointer int display int source Window int dest Window int sourceX int sourceY int source Width int source Height int destX int destY public static final synchronized native int X White Pixel int display int screen Num public static final synchronized native void X Withdraw Window int display int window int screen  XWarpPointer sourceWindow destWindow sourceWidth sourceHeight XWhitePixel screenNum XWithdrawWindow
public static final synchronized native int X White Pixel int display int screen Num public static final synchronized native void X Withdraw Window int display int window int screen public static final synchronized native boolean Xinerama Is Active int dpy  XWhitePixel screenNum XWithdrawWindow XineramaIsActive
public static final synchronized native void X Withdraw Window int display int window int screen public static final synchronized native boolean Xinerama Is Active int dpy public static final synchronized native int Xinerama Query Screens int dpy int number  XWithdrawWindow XineramaIsActive XineramaQueryScreens
public static final synchronized native boolean Xinerama Is Active int dpy public static final synchronized native int Xinerama Query Screens int dpy int number public static final synchronized native void Xm AddWM Protocol Callback int shell int protocol int callback int closure  XineramaIsActive XineramaQueryScreens XmAddWMProtocolCallback
public static final synchronized native int Xinerama Query Screens int dpy int number public static final synchronized native void Xm AddWM Protocol Callback int shell int protocol int callback int closure public static final synchronized native void Xm Change Color int widget int pixel  XineramaQueryScreens XmAddWMProtocolCallback XmChangeColor
public static final synchronized native void Xm AddWM Protocol Callback int shell int protocol int callback int closure public static final synchronized native void Xm Change Color int widget int pixel public static final synchronized native int Xm Clipboard Copy int display int window int item id byte format name byte buffer int length int private id int data id  XmAddWMProtocolCallback XmChangeColor XmClipboardCopy item_id format_name private_id data_id
public static final synchronized native void Xm Change Color int widget int pixel public static final synchronized native int Xm Clipboard Copy int display int window int item id byte format name byte buffer int length int private id int data id public static final synchronized native int Xm Clipboard End Copy int display int window int item id  XmChangeColor XmClipboardCopy item_id format_name private_id data_id XmClipboardEndCopy item_id
public static final synchronized native int Xm Clipboard Copy int display int window int item id byte format name byte buffer int length int private id int data id public static final synchronized native int Xm Clipboard End Copy int display int window int item id public static final synchronized native int Xm Clipboard End Retrieve int display int window  XmClipboardCopy item_id format_name private_id data_id XmClipboardEndCopy item_id XmClipboardEndRetrieve
public static final synchronized native int Xm Clipboard End Copy int display int window int item id public static final synchronized native int Xm Clipboard End Retrieve int display int window public static final synchronized native int Xm Clipboard Inquire Count int display int window int count int max format name length  XmClipboardEndCopy item_id XmClipboardEndRetrieve XmClipboardInquireCount max_format_name_length
public static final synchronized native int Xm Clipboard End Retrieve int display int window public static final synchronized native int Xm Clipboard Inquire Count int display int window int count int max format name length public static final synchronized native int Xm Clipboard Inquire Format int display int window int index byte format name buf int buffer len int copied len  XmClipboardEndRetrieve XmClipboardInquireCount max_format_name_length XmClipboardInquireFormat format_name_buf buffer_len copied_len
public static final synchronized native int Xm Clipboard Inquire Count int display int window int count int max format name length public static final synchronized native int Xm Clipboard Inquire Format int display int window int index byte format name buf int buffer len int copied len public static final synchronized native int Xm Clipboard Inquire Length int display int widget byte format name int length  XmClipboardInquireCount max_format_name_length XmClipboardInquireFormat format_name_buf buffer_len copied_len XmClipboardInquireLength format_name
public static final synchronized native int Xm Clipboard Inquire Format int display int window int index byte format name buf int buffer len int copied len public static final synchronized native int Xm Clipboard Inquire Length int display int widget byte format name int length public static final synchronized native int Xm Clipboard Retrieve int display int window byte format name byte buffer int length int num bytes int private id  XmClipboardInquireFormat format_name_buf buffer_len copied_len XmClipboardInquireLength format_name XmClipboardRetrieve format_name num_bytes private_id
public static final synchronized native int Xm Clipboard Inquire Length int display int widget byte format name int length public static final synchronized native int Xm Clipboard Retrieve int display int window byte format name byte buffer int length int num bytes int private id public static final synchronized native int Xm Clipboard Start Copy int display int window int clip label int timestamp int widget int callback int item id  XmClipboardInquireLength format_name XmClipboardRetrieve format_name num_bytes private_id XmClipboardStartCopy clip_label item_id
public static final synchronized native int Xm Clipboard Retrieve int display int window byte format name byte buffer int length int num bytes int private id public static final synchronized native int Xm Clipboard Start Copy int display int window int clip label int timestamp int widget int callback int item id public static final synchronized native int Xm Clipboard Start Retrieve int display int window int timestamp  XmClipboardRetrieve format_name num_bytes private_id XmClipboardStartCopy clip_label item_id XmClipboardStartRetrieve
public static final synchronized native int Xm Clipboard Start Copy int display int window int clip label int timestamp int widget int callback int item id public static final synchronized native int Xm Clipboard Start Retrieve int display int window int timestamp public static final synchronized native void Xm Combo Box Add Item int widget int xm String int position boolean unique  XmClipboardStartCopy clip_label item_id XmClipboardStartRetrieve XmComboBoxAddItem xmString
public static final synchronized native int Xm Clipboard Start Retrieve int display int window int timestamp public static final synchronized native void Xm Combo Box Add Item int widget int xm String int position boolean unique public static final synchronized native void Xm Combo Box Delete Pos int widget int position  XmClipboardStartRetrieve XmComboBoxAddItem xmString XmComboBoxDeletePos
public static final synchronized native void Xm Combo Box Add Item int widget int xm String int position boolean unique public static final synchronized native void Xm Combo Box Delete Pos int widget int position public static final synchronized native void Xm Combo Box Select Item int widget int xm String  XmComboBoxAddItem xmString XmComboBoxDeletePos XmComboBoxSelectItem xmString
public static final synchronized native void Xm Combo Box Delete Pos int widget int position public static final synchronized native void Xm Combo Box Select Item int widget int xm String public static final synchronized native int Xm Create Arrow Button int parent byte name int arglist int argcount  XmComboBoxDeletePos XmComboBoxSelectItem xmString XmCreateArrowButton
public static final synchronized native void Xm Combo Box Select Item int widget int xm String public static final synchronized native int Xm Create Arrow Button int parent byte name int arglist int argcount public static final synchronized native int Xm Create Cascade Button Gadget int parent byte name int arglist int argcount  XmComboBoxSelectItem xmString XmCreateArrowButton XmCreateCascadeButtonGadget
public static final synchronized native int Xm Create Arrow Button int parent byte name int arglist int argcount public static final synchronized native int Xm Create Cascade Button Gadget int parent byte name int arglist int argcount public static final synchronized native int Xm Create Combo Box int parent byte name int arglist int argcount  XmCreateArrowButton XmCreateCascadeButtonGadget XmCreateComboBox
public static final synchronized native int Xm Create Cascade Button Gadget int parent byte name int arglist int argcount public static final synchronized native int Xm Create Combo Box int parent byte name int arglist int argcount public static final synchronized native int Xm Create Dialog Shell int parent byte name int arglist int argcount  XmCreateCascadeButtonGadget XmCreateComboBox XmCreateDialogShell
public static final synchronized native int Xm Create Combo Box int parent byte name int arglist int argcount public static final synchronized native int Xm Create Dialog Shell int parent byte name int arglist int argcount public static final synchronized native int Xm Create Drawing Area int parent byte name int arglist int argcount  XmCreateComboBox XmCreateDialogShell XmCreateDrawingArea
public static final synchronized native int Xm Create Dialog Shell int parent byte name int arglist int argcount public static final synchronized native int Xm Create Drawing Area int parent byte name int arglist int argcount public static final synchronized native int Xm Create Drawn Button int parent byte name int arglist int argcount  XmCreateDialogShell XmCreateDrawingArea XmCreateDrawnButton
public static final synchronized native int Xm Create Drawing Area int parent byte name int arglist int argcount public static final synchronized native int Xm Create Drawn Button int parent byte name int arglist int argcount public static final synchronized native int Xm Create Error Dialog int parent byte name int arglist int argcount  XmCreateDrawingArea XmCreateDrawnButton XmCreateErrorDialog
public static final synchronized native int Xm Create Drawn Button int parent byte name int arglist int argcount public static final synchronized native int Xm Create Error Dialog int parent byte name int arglist int argcount public static final synchronized native int Xm Create File Selection Dialog int parent byte name int arglist int argcount  XmCreateDrawnButton XmCreateErrorDialog XmCreateFileSelectionDialog
public static final synchronized native int Xm Create Error Dialog int parent byte name int arglist int argcount public static final synchronized native int Xm Create File Selection Dialog int parent byte name int arglist int argcount public static final synchronized native int Xm Create Form int parent byte name int arglist int argcount  XmCreateErrorDialog XmCreateFileSelectionDialog XmCreateForm
public static final synchronized native int Xm Create File Selection Dialog int parent byte name int arglist int argcount public static final synchronized native int Xm Create Form int parent byte name int arglist int argcount public static final synchronized native int Xm Create Frame int parent byte name int arglist int argcount  XmCreateFileSelectionDialog XmCreateForm XmCreateFrame
public static final synchronized native int Xm Create Form int parent byte name int arglist int argcount public static final synchronized native int Xm Create Frame int parent byte name int arglist int argcount public static final synchronized native int Xm Create Information Dialog int parent byte name int arglist int argcount  XmCreateForm XmCreateFrame XmCreateInformationDialog
public static final synchronized native int Xm Create Frame int parent byte name int arglist int argcount public static final synchronized native int Xm Create Information Dialog int parent byte name int arglist int argcount public static final synchronized native int Xm Create Label int parent byte name int arglist int argcount  XmCreateFrame XmCreateInformationDialog XmCreateLabel
public static final synchronized native int Xm Create Information Dialog int parent byte name int arglist int argcount public static final synchronized native int Xm Create Label int parent byte name int arglist int argcount public static final synchronized native int Xm Create List int parent byte name int arglist int argcount  XmCreateInformationDialog XmCreateLabel XmCreateList
public static final synchronized native int Xm Create Label int parent byte name int arglist int argcount public static final synchronized native int Xm Create List int parent byte name int arglist int argcount public static final synchronized native int Xm Create Main Window int parent byte name int arglist int argcount  XmCreateLabel XmCreateList XmCreateMainWindow
public static final synchronized native int Xm Create List int parent byte name int arglist int argcount public static final synchronized native int Xm Create Main Window int parent byte name int arglist int argcount public static final synchronized native int Xm Create Menu Bar int parent byte name int arglist int argcount  XmCreateList XmCreateMainWindow XmCreateMenuBar
public static final synchronized native int Xm Create Main Window int parent byte name int arglist int argcount public static final synchronized native int Xm Create Menu Bar int parent byte name int arglist int argcount public static final synchronized native int Xm Create Message Dialog int parent byte name int arglist int argcount  XmCreateMainWindow XmCreateMenuBar XmCreateMessageDialog
public static final synchronized native int Xm Create Menu Bar int parent byte name int arglist int argcount public static final synchronized native int Xm Create Message Dialog int parent byte name int arglist int argcount public static final synchronized native int Xm Create Popup Menu int parent byte name int arglist int argcount  XmCreateMenuBar XmCreateMessageDialog XmCreatePopupMenu
public static final synchronized native int Xm Create Message Dialog int parent byte name int arglist int argcount public static final synchronized native int Xm Create Popup Menu int parent byte name int arglist int argcount public static final synchronized native int Xm Create Pulldown Menu int parent byte name int arglist int argcount  XmCreateMessageDialog XmCreatePopupMenu XmCreatePulldownMenu
public static final synchronized native int Xm Create Popup Menu int parent byte name int arglist int argcount public static final synchronized native int Xm Create Pulldown Menu int parent byte name int arglist int argcount public static final synchronized native int Xm Create Push Button int parent byte name int arglist int argcount  XmCreatePopupMenu XmCreatePulldownMenu XmCreatePushButton
public static final synchronized native int Xm Create Pulldown Menu int parent byte name int arglist int argcount public static final synchronized native int Xm Create Push Button int parent byte name int arglist int argcount public static final synchronized native int Xm Create Push Button Gadget int parent byte name int arglist int argcount  XmCreatePulldownMenu XmCreatePushButton XmCreatePushButtonGadget
public static final synchronized native int Xm Create Push Button int parent byte name int arglist int argcount public static final synchronized native int Xm Create Push Button Gadget int parent byte name int arglist int argcount public static final synchronized native int Xm Create Question Dialog int parent byte name int arglist int argcount  XmCreatePushButton XmCreatePushButtonGadget XmCreateQuestionDialog
public static final synchronized native int Xm Create Push Button Gadget int parent byte name int arglist int argcount public static final synchronized native int Xm Create Question Dialog int parent byte name int arglist int argcount public static final synchronized native int Xm Create Scale int parent byte name int arglist int argcount  XmCreatePushButtonGadget XmCreateQuestionDialog XmCreateScale
public static final synchronized native int Xm Create Question Dialog int parent byte name int arglist int argcount public static final synchronized native int Xm Create Scale int parent byte name int arglist int argcount public static final synchronized native int Xm Create Scroll Bar int parent byte name int arglist int argcount  XmCreateQuestionDialog XmCreateScale XmCreateScrollBar
public static final synchronized native int Xm Create Scale int parent byte name int arglist int argcount public static final synchronized native int Xm Create Scroll Bar int parent byte name int arglist int argcount public static final synchronized native int Xm Create Scrolled List int parent byte name int arglist int argcount  XmCreateScale XmCreateScrollBar XmCreateScrolledList
public static final synchronized native int Xm Create Scroll Bar int parent byte name int arglist int argcount public static final synchronized native int Xm Create Scrolled List int parent byte name int arglist int argcount public static final synchronized native int Xm Create Scrolled Text int parent byte name int arglist int argcount  XmCreateScrollBar XmCreateScrolledList XmCreateScrolledText
public static final synchronized native int Xm Create Scrolled List int parent byte name int arglist int argcount public static final synchronized native int Xm Create Scrolled Text int parent byte name int arglist int argcount public static final synchronized native int Xm Create Separator int parent byte name int arglist int argcount  XmCreateScrolledList XmCreateScrolledText XmCreateSeparator
public static final synchronized native int Xm Create Scrolled Text int parent byte name int arglist int argcount public static final synchronized native int Xm Create Separator int parent byte name int arglist int argcount public static final synchronized native int Xm Create Separator Gadget int parent byte name int arglist int argcount  XmCreateScrolledText XmCreateSeparator XmCreateSeparatorGadget
public static final synchronized native int Xm Create Separator int parent byte name int arglist int argcount public static final synchronized native int Xm Create Separator Gadget int parent byte name int arglist int argcount public static final synchronized native int Xm Create Text Field int parent byte name int arglist int argcount  XmCreateSeparator XmCreateSeparatorGadget XmCreateTextField
public static final synchronized native int Xm Create Separator Gadget int parent byte name int arglist int argcount public static final synchronized native int Xm Create Text Field int parent byte name int arglist int argcount public static final synchronized native int Xm Create Toggle Button int parent byte name int arglist int argcount  XmCreateSeparatorGadget XmCreateTextField XmCreateToggleButton
public static final synchronized native int Xm Create Text Field int parent byte name int arglist int argcount public static final synchronized native int Xm Create Toggle Button int parent byte name int arglist int argcount public static final synchronized native int Xm Create Toggle Button Gadget int parent byte name int arglist int argcount  XmCreateTextField XmCreateToggleButton XmCreateToggleButtonGadget
public static final synchronized native int Xm Create Toggle Button int parent byte name int arglist int argcount public static final synchronized native int Xm Create Toggle Button Gadget int parent byte name int arglist int argcount public static final synchronized native int Xm Create Warning Dialog int parent byte name int arglist int argcount  XmCreateToggleButton XmCreateToggleButtonGadget XmCreateWarningDialog
public static final synchronized native int Xm Create Toggle Button Gadget int parent byte name int arglist int argcount public static final synchronized native int Xm Create Warning Dialog int parent byte name int arglist int argcount public static final synchronized native int Xm Create Working Dialog int parent byte name int arglist int argcount  XmCreateToggleButtonGadget XmCreateWarningDialog XmCreateWorkingDialog
public static final synchronized native int Xm Create Warning Dialog int parent byte name int arglist int argcount public static final synchronized native int Xm Create Working Dialog int parent byte name int arglist int argcount public static final synchronized native boolean Xm Destroy Pixmap int screen int pixmap  XmCreateWarningDialog XmCreateWorkingDialog XmDestroyPixmap
public static final synchronized native int Xm Create Working Dialog int parent byte name int arglist int argcount public static final synchronized native boolean Xm Destroy Pixmap int screen int pixmap public static final synchronized native void Xm Drag Cancel int dragcontext  XmCreateWorkingDialog XmDestroyPixmap XmDragCancel
public static final synchronized native boolean Xm Destroy Pixmap int screen int pixmap public static final synchronized native void Xm Drag Cancel int dragcontext public static final synchronized native int Xm Drag Start int widget int event int arglist int argcount  XmDestroyPixmap XmDragCancel XmDragStart
public static final synchronized native void Xm Drag Cancel int dragcontext public static final synchronized native int Xm Drag Start int widget int event int arglist int argcount public static final synchronized native void Xm Drop Site Register int widget int arglist int argcount  XmDragCancel XmDragStart XmDropSiteRegister
public static final synchronized native int Xm Drag Start int widget int event int arglist int argcount public static final synchronized native void Xm Drop Site Register int widget int arglist int argcount public static final synchronized native void Xm Drop Site Unregister int widget  XmDragStart XmDropSiteRegister XmDropSiteUnregister
public static final synchronized native void Xm Drop Site Register int widget int arglist int argcount public static final synchronized native void Xm Drop Site Unregister int widget public static final synchronized native void Xm Drop Site Update int widget int arglist int argcount  XmDropSiteRegister XmDropSiteUnregister XmDropSiteUpdate
public static final synchronized native void Xm Drop Site Unregister int widget public static final synchronized native void Xm Drop Site Update int widget int arglist int argcount public static final synchronized native void Xm Drop Transfer Add int drop transfer int transfers int num transfers  XmDropSiteUnregister XmDropSiteUpdate XmDropTransferAdd drop_transfer num_transfers
public static final synchronized native void Xm Drop Site Update int widget int arglist int argcount public static final synchronized native void Xm Drop Transfer Add int drop transfer int transfers int num transfers public static final synchronized native int Xm Drop Transfer Start int widget int arglist int argcount  XmDropSiteUpdate XmDropTransferAdd drop_transfer num_transfers XmDropTransferStart
public static final synchronized native void Xm Drop Transfer Add int drop transfer int transfers int num transfers public static final synchronized native int Xm Drop Transfer Start int widget int arglist int argcount public static final synchronized native int Xm File Selection Box Get Child int widget int child  XmDropTransferAdd drop_transfer num_transfers XmDropTransferStart XmFileSelectionBoxGetChild
public static final synchronized native int Xm Drop Transfer Start int widget int arglist int argcount public static final synchronized native int Xm File Selection Box Get Child int widget int child public static final synchronized native int Xm Font List Append Entry int old List int entry  XmDropTransferStart XmFileSelectionBoxGetChild XmFontListAppendEntry oldList
public static final synchronized native int Xm File Selection Box Get Child int widget int child public static final synchronized native int Xm Font List Append Entry int old List int entry public static final synchronized native int Xm Font List Copy int fontlist  XmFileSelectionBoxGetChild XmFontListAppendEntry oldList XmFontListCopy
public static final synchronized native int Xm Font List Append Entry int old List int entry public static final synchronized native int Xm Font List Copy int fontlist public static final synchronized native void Xm Font List Entry Free int entry  XmFontListAppendEntry oldList XmFontListCopy XmFontListEntryFree
public static final synchronized native int Xm Font List Copy int fontlist public static final synchronized native void Xm Font List Entry Free int entry public static final synchronized native int Xm Font List Entry Get Font int entry int type return  XmFontListCopy XmFontListEntryFree XmFontListEntryGetFont type_return
public static final synchronized native void Xm Font List Entry Free int entry public static final synchronized native int Xm Font List Entry Get Font int entry int type return public static final synchronized native int Xm Font List Entry Load int display byte font Name int type byte tag  XmFontListEntryFree XmFontListEntryGetFont type_return XmFontListEntryLoad fontName
public static final synchronized native int Xm Font List Entry Get Font int entry int type return public static final synchronized native int Xm Font List Entry Load int display byte font Name int type byte tag public static final synchronized native void Xm Font List Free int list  XmFontListEntryGetFont type_return XmFontListEntryLoad fontName XmFontListFree
public static final synchronized native int Xm Font List Entry Load int display byte font Name int type byte tag public static final synchronized native void Xm Font List Free int list public static final synchronized native void Xm Font List Free Font Context int context  XmFontListEntryLoad fontName XmFontListFree XmFontListFreeFontContext
public static final synchronized native void Xm Font List Free int list public static final synchronized native void Xm Font List Free Font Context int context public static final synchronized native boolean Xm Font List Init Font Context int context int font List  XmFontListFree XmFontListFreeFontContext XmFontListInitFontContext fontList
public static final synchronized native void Xm Font List Free Font Context int context public static final synchronized native boolean Xm Font List Init Font Context int context int font List public static final synchronized native int Xm Font List Next Entry int context  XmFontListFreeFontContext XmFontListInitFontContext fontList XmFontListNextEntry
public static final synchronized native boolean Xm Font List Init Font Context int context int font List public static final synchronized native int Xm Font List Next Entry int context public static final synchronized native int Xm Get Atom Name int display int atom  XmFontListInitFontContext fontList XmFontListNextEntry XmGetAtomName
public static final synchronized native int Xm Font List Next Entry int context public static final synchronized native int Xm Get Atom Name int display int atom public static final synchronized native int Xm Get Drag Context int widget int timestamp  XmFontListNextEntry XmGetAtomName XmGetDragContext
public static final synchronized native int Xm Get Atom Name int display int atom public static final synchronized native int Xm Get Drag Context int widget int timestamp public static final synchronized native int Xm Get Focus Widget int widget  XmGetAtomName XmGetDragContext XmGetFocusWidget
public static final synchronized native int Xm Get Drag Context int widget int timestamp public static final synchronized native int Xm Get Focus Widget int widget public static final synchronized native int Xm Get Pixmap int screen byte name int fg Pixel int bg Pixel  XmGetDragContext XmGetFocusWidget XmGetPixmap fgPixel bgPixel
public static final synchronized native int Xm Get Focus Widget int widget public static final synchronized native int Xm Get Pixmap int screen byte name int fg Pixel int bg Pixel public static final synchronized native int Xm Get Pixmap By Depth int screen byte image name int foreground int background int depth  XmGetFocusWidget XmGetPixmap fgPixel bgPixel XmGetPixmapByDepth image_name
public static final synchronized native int Xm Get Pixmap int screen byte name int fg Pixel int bg Pixel public static final synchronized native int Xm Get Pixmap By Depth int screen byte image name int foreground int background int depth public static final synchronized native int Xm Get Xm Display int display  XmGetPixmap fgPixel bgPixel XmGetPixmapByDepth image_name XmGetXmDisplay
public static final synchronized native int Xm Get Pixmap By Depth int screen byte image name int foreground int background int depth public static final synchronized native int Xm Get Xm Display int display public static final synchronized native int Xm Im Mb Lookup String int widget X Key Event event byte string int size int keysym int status  XmGetPixmapByDepth image_name XmGetXmDisplay XmImMbLookupString XKeyEvent
public static final synchronized native int Xm Get Xm Display int display public static final synchronized native int Xm Im Mb Lookup String int widget X Key Event event byte string int size int keysym int status public static final synchronized native void Xm Im Register int widget int reserved  XmGetXmDisplay XmImMbLookupString XKeyEvent XmImRegister
public static final synchronized native int Xm Im Mb Lookup String int widget X Key Event event byte string int size int keysym int status public static final synchronized native void Xm Im Register int widget int reserved public static final synchronized native void Xm Im Set Focus Values int widget int args int num args  XmImMbLookupString XKeyEvent XmImRegister XmImSetFocusValues num_args
public static final synchronized native void Xm Im Register int widget int reserved public static final synchronized native void Xm Im Set Focus Values int widget int args int num args public static final synchronized native void Xm Im Set Values int widget int args int num args  XmImRegister XmImSetFocusValues num_args XmImSetValues num_args
public static final synchronized native void Xm Im Set Focus Values int widget int args int num args public static final synchronized native void Xm Im Set Values int widget int args int num args public static final synchronized native void Xm Im Unregister int widget  XmImSetFocusValues num_args XmImSetValues num_args XmImUnregister
public static final synchronized native void Xm Im Set Values int widget int args int num args public static final synchronized native void Xm Im Unregister int widget public static final synchronized native void Xm Im Unset Focus int widget  XmImSetValues num_args XmImUnregister XmImUnsetFocus
public static final synchronized native void Xm Im Unregister int widget public static final synchronized native void Xm Im Unset Focus int widget public static final synchronized native int Xm Intern Atom int display byte name boolean only if exists  XmImUnregister XmImUnsetFocus XmInternAtom only_if_exists
public static final synchronized native void Xm Im Unset Focus int widget public static final synchronized native int Xm Intern Atom int display byte name boolean only if exists public static final synchronized native void Xm List Add Item Unselected int list int xm String int position  XmImUnsetFocus XmInternAtom only_if_exists XmListAddItemUnselected xmString
public static final synchronized native int Xm Intern Atom int display byte name boolean only if exists public static final synchronized native void Xm List Add Item Unselected int list int xm String int position public static final synchronized native void Xm List Delete All Items int list  XmInternAtom only_if_exists XmListAddItemUnselected xmString XmListDeleteAllItems
public static final synchronized native void Xm List Add Item Unselected int list int xm String int position public static final synchronized native void Xm List Delete All Items int list public static final synchronized native void Xm List Delete Items Pos int list int item count int position  XmListAddItemUnselected xmString XmListDeleteAllItems XmListDeleteItemsPos item_count
public static final synchronized native void Xm List Delete All Items int list public static final synchronized native void Xm List Delete Items Pos int list int item count int position public static final synchronized native void Xm List Delete Pos int list int position  XmListDeleteAllItems XmListDeleteItemsPos item_count XmListDeletePos
public static final synchronized native void Xm List Delete Items Pos int list int item count int position public static final synchronized native void Xm List Delete Pos int list int position public static final synchronized native void Xm List Delete Positions int list int position list int position count  XmListDeleteItemsPos item_count XmListDeletePos XmListDeletePositions position_list position_count
public static final synchronized native void Xm List Delete Pos int list int position public static final synchronized native void Xm List Delete Positions int list int position list int position count public static final synchronized native void Xm List Deselect All Items int list  XmListDeletePos XmListDeletePositions position_list position_count XmListDeselectAllItems
public static final synchronized native void Xm List Delete Positions int list int position list int position count public static final synchronized native void Xm List Deselect All Items int list public static final synchronized native void Xm List Deselect Pos int list int position  XmListDeletePositions position_list position_count XmListDeselectAllItems XmListDeselectPos
public static final synchronized native void Xm List Deselect All Items int list public static final synchronized native void Xm List Deselect Pos int list int position public static final synchronized native int Xm List Get Kbd Item Pos int list  XmListDeselectAllItems XmListDeselectPos XmListGetKbdItemPos
public static final synchronized native void Xm List Deselect Pos int list int position public static final synchronized native int Xm List Get Kbd Item Pos int list public static final synchronized native boolean Xm List Get Selected Pos int list int positions int count  XmListDeselectPos XmListGetKbdItemPos XmListGetSelectedPos
public static final synchronized native int Xm List Get Kbd Item Pos int list public static final synchronized native boolean Xm List Get Selected Pos int list int positions int count public static final synchronized native int Xm List Item Pos int list int xm String  XmListGetKbdItemPos XmListGetSelectedPos XmListItemPos xmString
public static final synchronized native boolean Xm List Get Selected Pos int list int positions int count public static final synchronized native int Xm List Item Pos int list int xm String public static final synchronized native boolean Xm List Pos Selected int list int position  XmListGetSelectedPos XmListItemPos xmString XmListPosSelected
public static final synchronized native int Xm List Item Pos int list int xm String public static final synchronized native boolean Xm List Pos Selected int list int position public static final synchronized native void Xm List Replace Items Pos Unselected int list int new items int item count int position  XmListItemPos xmString XmListPosSelected XmListReplaceItemsPosUnselected new_items item_count
public static final synchronized native boolean Xm List Pos Selected int list int position public static final synchronized native void Xm List Replace Items Pos Unselected int list int new items int item count int position public static final synchronized native void Xm List Select Pos int list int position boolean notify  XmListPosSelected XmListReplaceItemsPosUnselected new_items item_count XmListSelectPos
public static final synchronized native void Xm List Replace Items Pos Unselected int list int new items int item count int position public static final synchronized native void Xm List Select Pos int list int position boolean notify public static final synchronized native boolean Xm List Set Kbd Item Pos int list int position  XmListReplaceItemsPosUnselected new_items item_count XmListSelectPos XmListSetKbdItemPos
public static final synchronized native void Xm List Select Pos int list int position boolean notify public static final synchronized native boolean Xm List Set Kbd Item Pos int list int position public static final synchronized native void Xm List Set Pos int list int position  XmListSelectPos XmListSetKbdItemPos XmListSetPos
public static final synchronized native boolean Xm List Set Kbd Item Pos int list int position public static final synchronized native void Xm List Set Pos int list int position public static final synchronized native void Xm List Update Selected List int list  XmListSetKbdItemPos XmListSetPos XmListUpdateSelectedList
public static final synchronized native void Xm List Set Pos int list int position public static final synchronized native void Xm List Update Selected List int list public static final synchronized native void Xm Main Window Set Areas int widget int menu int command int hscroll int vscroll int wregion  XmListSetPos XmListUpdateSelectedList XmMainWindowSetAreas
public static final synchronized native void Xm List Update Selected List int list public static final synchronized native void Xm Main Window Set Areas int widget int menu int command int hscroll int vscroll int wregion public static final synchronized native int Xm Message Box Get Child int widget int child  XmListUpdateSelectedList XmMainWindowSetAreas XmMessageBoxGetChild
public static final synchronized native void Xm Main Window Set Areas int widget int menu int command int hscroll int vscroll int wregion public static final synchronized native int Xm Message Box Get Child int widget int child public static final synchronized native int Xm Parse Mapping Create int arg List int arg Count  XmMainWindowSetAreas XmMessageBoxGetChild XmParseMappingCreate argList argCount
public static final synchronized native int Xm Message Box Get Child int widget int child public static final synchronized native int Xm Parse Mapping Create int arg List int arg Count public static final synchronized native void Xm Parse Mapping Free int parse Mapping  XmMessageBoxGetChild XmParseMappingCreate argList argCount XmParseMappingFree parseMapping
public static final synchronized native int Xm Parse Mapping Create int arg List int arg Count public static final synchronized native void Xm Parse Mapping Free int parse Mapping public static final synchronized native boolean Xm Process Traversal int widget int dir  XmParseMappingCreate argList argCount XmParseMappingFree parseMapping XmProcessTraversal
public static final synchronized native void Xm Parse Mapping Free int parse Mapping public static final synchronized native boolean Xm Process Traversal int widget int dir public static final synchronized native int Xm Render Table Add Renditions int old Table int renditions int rendition Count int merge Mode  XmParseMappingFree parseMapping XmProcessTraversal XmRenderTableAddRenditions oldTable renditionCount mergeMode
public static final synchronized native boolean Xm Process Traversal int widget int dir public static final synchronized native int Xm Render Table Add Renditions int old Table int renditions int rendition Count int merge Mode public static final synchronized native void Xm Render Table Free int render Table  XmProcessTraversal XmRenderTableAddRenditions oldTable renditionCount mergeMode XmRenderTableFree renderTable
public static final synchronized native int Xm Render Table Add Renditions int old Table int renditions int rendition Count int merge Mode public static final synchronized native void Xm Render Table Free int render Table public static final synchronized native int Xm Rendition Create int widget byte tag int arg List int arg Count  XmRenderTableAddRenditions oldTable renditionCount mergeMode XmRenderTableFree renderTable XmRenditionCreate argList argCount
public static final synchronized native void Xm Render Table Free int render Table public static final synchronized native int Xm Rendition Create int widget byte tag int arg List int arg Count public static final synchronized native void Xm Rendition Free int rendition  XmRenderTableFree renderTable XmRenditionCreate argList argCount XmRenditionFree
public static final synchronized native int Xm Rendition Create int widget byte tag int arg List int arg Count public static final synchronized native void Xm Rendition Free int rendition public static final synchronized native int Xm String Baseline int font List int xm String  XmRenditionCreate argList argCount XmRenditionFree XmStringBaseline fontList xmString
public static final synchronized native void Xm Rendition Free int rendition public static final synchronized native int Xm String Baseline int font List int xm String public static final synchronized native boolean Xm String Compare int xm String1 int xm String2  XmRenditionFree XmStringBaseline fontList xmString XmStringCompare xmString1 xmString2
public static final synchronized native int Xm String Baseline int font List int xm String public static final synchronized native boolean Xm String Compare int xm String1 int xm String2 public static final synchronized native int Xm String Component Create int type int length byte value  XmStringBaseline fontList xmString XmStringCompare xmString1 xmString2 XmStringComponentCreate
public static final synchronized native boolean Xm String Compare int xm String1 int xm String2 public static final synchronized native int Xm String Component Create int type int length byte value public static final synchronized native int Xm String Concat int xm String1 int xm String2  XmStringCompare xmString1 xmString2 XmStringComponentCreate XmStringConcat xmString1 xmString2
public static final synchronized native int Xm String Component Create int type int length byte value public static final synchronized native int Xm String Concat int xm String1 int xm String2 public static final synchronized native int Xm String Create byte string byte charset  XmStringComponentCreate XmStringConcat xmString1 xmString2 XmStringCreate
public static final synchronized native int Xm String Concat int xm String1 int xm String2 public static final synchronized native int Xm String Create byte string byte charset public static final synchronized native int Xm String Create Localized byte string  XmStringConcat xmString1 xmString2 XmStringCreate XmStringCreateLocalized
public static final synchronized native int Xm String Create byte string byte charset public static final synchronized native int Xm String Create Localized byte string public static final synchronized native void Xm String Draw int display int window int render Table int xm String int gc int x int y int width int align int lay dir X Rectangle clip  XmStringCreate XmStringCreateLocalized XmStringDraw renderTable xmString lay_dir XRectangle
public static final synchronized native int Xm String Create Localized byte string public static final synchronized native void Xm String Draw int display int window int render Table int xm String int gc int x int y int width int align int lay dir X Rectangle clip public static final synchronized native void Xm String Draw Image int display int window int render Table int xm String int gc int x int y int width int align int lay dir X Rectangle clip  XmStringCreateLocalized XmStringDraw renderTable xmString lay_dir XRectangle XmStringDrawImage renderTable xmString lay_dir XRectangle
public static final synchronized native void Xm String Draw int display int window int render Table int xm String int gc int x int y int width int align int lay dir X Rectangle clip public static final synchronized native void Xm String Draw Image int display int window int render Table int xm String int gc int x int y int width int align int lay dir X Rectangle clip public static final synchronized native void Xm String Draw Underline int display int window int fontlist int xm String int gc int x int y int width int align int lay dir X Rectangle clip int xm String Underline  XmStringDraw renderTable xmString lay_dir XRectangle XmStringDrawImage renderTable xmString lay_dir XRectangle XmStringDrawUnderline xmString lay_dir XRectangle xmStringUnderline
public static final synchronized native void Xm String Draw Image int display int window int render Table int xm String int gc int x int y int width int align int lay dir X Rectangle clip public static final synchronized native void Xm String Draw Underline int display int window int fontlist int xm String int gc int x int y int width int align int lay dir X Rectangle clip int xm String Underline public static final synchronized native boolean Xm String Empty int s1  XmStringDrawImage renderTable xmString lay_dir XRectangle XmStringDrawUnderline xmString lay_dir XRectangle xmStringUnderline XmStringEmpty
public static final synchronized native void Xm String Draw Underline int display int window int fontlist int xm String int gc int x int y int width int align int lay dir X Rectangle clip int xm String Underline public static final synchronized native boolean Xm String Empty int s1 public static final synchronized native void Xm String Extent int font List int xm String short width short height  XmStringDrawUnderline xmString lay_dir XRectangle xmStringUnderline XmStringEmpty XmStringExtent fontList xmString
public static final synchronized native boolean Xm String Empty int s1 public static final synchronized native void Xm String Extent int font List int xm String short width short height public static final synchronized native void Xm String Free int xm String  XmStringEmpty XmStringExtent fontList xmString XmStringFree xmString
public static final synchronized native void Xm String Extent int font List int xm String short width short height public static final synchronized native void Xm String Free int xm String public static final synchronized native int Xm String Generate byte text byte tag int type byte rendition  XmStringExtent fontList xmString XmStringFree xmString XmStringGenerate
public static final synchronized native void Xm String Free int xm String public static final synchronized native int Xm String Generate byte text byte tag int type byte rendition public static final synchronized native int Xm String Height int font List int xm String  XmStringFree xmString XmStringGenerate XmStringHeight fontList xmString
public static final synchronized native int Xm String Generate byte text byte tag int type byte rendition public static final synchronized native int Xm String Height int font List int xm String public static final synchronized native int Xm String Parse Text byte text int text End byte tag int tag Type int parse Table int parse Count int call Data  XmStringGenerate XmStringHeight fontList xmString XmStringParseText textEnd tagType parseTable parseCount callData
public static final synchronized native int Xm String Height int font List int xm String public static final synchronized native int Xm String Parse Text byte text int text End byte tag int tag Type int parse Table int parse Count int call Data public static final synchronized native int Xm String Unparse int xm String byte tag int tag Type int output Type int parse Table int parse Count int parse Model  XmStringHeight fontList xmString XmStringParseText textEnd tagType parseTable parseCount callData XmStringUnparse xmString tagType outputType parseTable parseCount parseModel
public static final synchronized native int Xm String Parse Text byte text int text End byte tag int tag Type int parse Table int parse Count int call Data public static final synchronized native int Xm String Unparse int xm String byte tag int tag Type int output Type int parse Table int parse Count int parse Model public static final synchronized native int Xm String Width int font List int xm String  XmStringParseText textEnd tagType parseTable parseCount callData XmStringUnparse xmString tagType outputType parseTable parseCount parseModel XmStringWidth fontList xmString
public static final synchronized native int Xm String Unparse int xm String byte tag int tag Type int output Type int parse Table int parse Count int parse Model public static final synchronized native int Xm String Width int font List int xm String public static final synchronized native int Xm Tab Create int value byte units byte offset Model byte alignment byte decimal  XmStringUnparse xmString tagType outputType parseTable parseCount parseModel XmStringWidth fontList xmString XmTabCreate offsetModel
public static final synchronized native int Xm String Width int font List int xm String public static final synchronized native int Xm Tab Create int value byte units byte offset Model byte alignment byte decimal public static final synchronized native void Xm Tab Free int tab  XmStringWidth fontList xmString XmTabCreate offsetModel XmTabFree
public static final synchronized native int Xm Tab Create int value byte units byte offset Model byte alignment byte decimal public static final synchronized native void Xm Tab Free int tab public static final synchronized native void Xm Tab List Free int tab List  XmTabCreate offsetModel XmTabFree XmTabListFree tabList
public static final synchronized native void Xm Tab Free int tab public static final synchronized native void Xm Tab List Free int tab List public static final synchronized native int Xm Tab List Insert Tabs int old List int tabs int tab count int position  XmTabFree XmTabListFree tabList XmTabListInsertTabs oldList tab_count
public static final synchronized native void Xm Tab List Free int tab List public static final synchronized native int Xm Tab List Insert Tabs int old List int tabs int tab count int position public static final synchronized native void Xm Text Clear Selection int widget int time  XmTabListFree tabList XmTabListInsertTabs oldList tab_count XmTextClearSelection
public static final synchronized native int Xm Tab List Insert Tabs int old List int tabs int tab count int position public static final synchronized native void Xm Text Clear Selection int widget int time public static final synchronized native boolean Xm Text Copy int widget int time  XmTabListInsertTabs oldList tab_count XmTextClearSelection XmTextCopy
public static final synchronized native void Xm Text Clear Selection int widget int time public static final synchronized native boolean Xm Text Copy int widget int time public static final synchronized native boolean Xm Text Cut int widget int time  XmTextClearSelection XmTextCopy XmTextCut
public static final synchronized native boolean Xm Text Copy int widget int time public static final synchronized native boolean Xm Text Cut int widget int time public static final synchronized native void Xm Text Disable Redisplay int widget  XmTextCopy XmTextCut XmTextDisableRedisplay
public static final synchronized native boolean Xm Text Cut int widget int time public static final synchronized native void Xm Text Disable Redisplay int widget public static final synchronized native void Xm Text Enable Redisplay int widget  XmTextCut XmTextDisableRedisplay XmTextEnableRedisplay
public static final synchronized native void Xm Text Disable Redisplay int widget public static final synchronized native void Xm Text Enable Redisplay int widget public static final synchronized native boolean Xm Text Field Paste int widget  XmTextDisableRedisplay XmTextEnableRedisplay XmTextFieldPaste
public static final synchronized native void Xm Text Enable Redisplay int widget public static final synchronized native boolean Xm Text Field Paste int widget public static final synchronized native int Xm Text Get Insertion Position int widget  XmTextEnableRedisplay XmTextFieldPaste XmTextGetInsertionPosition
public static final synchronized native boolean Xm Text Field Paste int widget public static final synchronized native int Xm Text Get Insertion Position int widget public static final synchronized native int Xm Text Get Last Position int widget  XmTextFieldPaste XmTextGetInsertionPosition XmTextGetLastPosition
public static final synchronized native int Xm Text Get Insertion Position int widget public static final synchronized native int Xm Text Get Last Position int widget public static final synchronized native int Xm Text Get Max Length int widget  XmTextGetInsertionPosition XmTextGetLastPosition XmTextGetMaxLength
public static final synchronized native int Xm Text Get Last Position int widget public static final synchronized native int Xm Text Get Max Length int widget public static final synchronized native int Xm Text Get Selection int widget  XmTextGetLastPosition XmTextGetMaxLength XmTextGetSelection
public static final synchronized native int Xm Text Get Max Length int widget public static final synchronized native int Xm Text Get Selection int widget public static final synchronized native boolean Xm Text Get Selection Position int widget int left int right  XmTextGetMaxLength XmTextGetSelection XmTextGetSelectionPosition
public static final synchronized native int Xm Text Get Selection int widget public static final synchronized native boolean Xm Text Get Selection Position int widget int left int right public static final synchronized native int Xm Text Get String int widget  XmTextGetSelection XmTextGetSelectionPosition XmTextGetString
public static final synchronized native boolean Xm Text Get Selection Position int widget int left int right public static final synchronized native int Xm Text Get String int widget public static final synchronized native int Xm Text Get Substring int widget int start int num chars int buffer size byte buffer  XmTextGetSelectionPosition XmTextGetString XmTextGetSubstring num_chars buffer_size
public static final synchronized native int Xm Text Get String int widget public static final synchronized native int Xm Text Get Substring int widget int start int num chars int buffer size byte buffer public static final synchronized native int Xm Text Get Substring Wcs int widget int start int num chars int buffer size char buffer  XmTextGetString XmTextGetSubstring num_chars buffer_size XmTextGetSubstringWcs num_chars buffer_size
public static final synchronized native int Xm Text Get Substring int widget int start int num chars int buffer size byte buffer public static final synchronized native int Xm Text Get Substring Wcs int widget int start int num chars int buffer size char buffer public static final synchronized native void Xm Text Insert int widget int position byte value  XmTextGetSubstring num_chars buffer_size XmTextGetSubstringWcs num_chars buffer_size XmTextInsert
public static final synchronized native int Xm Text Get Substring Wcs int widget int start int num chars int buffer size char buffer public static final synchronized native void Xm Text Insert int widget int position byte value public static final synchronized native boolean Xm Text Paste int widget  XmTextGetSubstringWcs num_chars buffer_size XmTextInsert XmTextPaste
public static final synchronized native void Xm Text Insert int widget int position byte value public static final synchronized native boolean Xm Text Paste int widget public static final synchronized native boolean Xm Text Pos ToXY int widget int position short x short y  XmTextInsert XmTextPaste XmTextPosToXY
public static final synchronized native boolean Xm Text Paste int widget public static final synchronized native boolean Xm Text Pos ToXY int widget int position short x short y public static final synchronized native void Xm Text Replace int widget int from pos int to pos byte value  XmTextPaste XmTextPosToXY XmTextReplace from_pos to_pos
public static final synchronized native boolean Xm Text Pos ToXY int widget int position short x short y public static final synchronized native void Xm Text Replace int widget int from pos int to pos byte value public static final synchronized native void Xm Text Scroll int widget int lines  XmTextPosToXY XmTextReplace from_pos to_pos XmTextScroll
public static final synchronized native void Xm Text Replace int widget int from pos int to pos byte value public static final synchronized native void Xm Text Scroll int widget int lines public static final synchronized native void Xm Text Set Editable int widget boolean editable  XmTextReplace from_pos to_pos XmTextScroll XmTextSetEditable
public static final synchronized native void Xm Text Scroll int widget int lines public static final synchronized native void Xm Text Set Editable int widget boolean editable public static final synchronized native void Xm Text Set Highlight int widget int left int right int mode  XmTextScroll XmTextSetEditable XmTextSetHighlight
public static final synchronized native void Xm Text Set Editable int widget boolean editable public static final synchronized native void Xm Text Set Highlight int widget int left int right int mode public static final synchronized native void Xm Text Set Insertion Position int widget int position  XmTextSetEditable XmTextSetHighlight XmTextSetInsertionPosition
public static final synchronized native void Xm Text Set Highlight int widget int left int right int mode public static final synchronized native void Xm Text Set Insertion Position int widget int position public static final synchronized native void Xm Text Set Max Length int widget int max length  XmTextSetHighlight XmTextSetInsertionPosition XmTextSetMaxLength max_length
public static final synchronized native void Xm Text Set Insertion Position int widget int position public static final synchronized native void Xm Text Set Max Length int widget int max length public static final synchronized native void Xm Text Set Selection int widget int first int last int time  XmTextSetInsertionPosition XmTextSetMaxLength max_length XmTextSetSelection
public static final synchronized native void Xm Text Set Max Length int widget int max length public static final synchronized native void Xm Text Set Selection int widget int first int last int time public static final synchronized native void Xm Text Set String int widget byte value  XmTextSetMaxLength max_length XmTextSetSelection XmTextSetString
public static final synchronized native void Xm Text Set Selection int widget int first int last int time public static final synchronized native void Xm Text Set String int widget byte value public static final synchronized native void Xm Text Show Position int widget int position  XmTextSetSelection XmTextSetString XmTextShowPosition
public static final synchronized native void Xm Text Set String int widget byte value public static final synchronized native void Xm Text Show Position int widget int position public static final synchronized native void Xm Update Display int widget  XmTextSetString XmTextShowPosition XmUpdateDisplay
public static final synchronized native void Xm Text Show Position int widget int position public static final synchronized native void Xm Update Display int widget public static final synchronized native boolean Xm Widget Get Display Rect int region X Rectangle rectangle  XmTextShowPosition XmUpdateDisplay XmWidgetGetDisplayRect XRectangle
public static final synchronized native void Xm Update Display int widget public static final synchronized native boolean Xm Widget Get Display Rect int region X Rectangle rectangle public static final synchronized native int Xmb Text List To Text Property int display int list int count int style X Text Property text prop return  XmUpdateDisplay XmWidgetGetDisplayRect XRectangle XmbTextListToTextProperty XTextProperty text_prop_return
public static final synchronized native boolean Xm Widget Get Display Rect int region X Rectangle rectangle public static final synchronized native int Xmb Text List To Text Property int display int list int count int style X Text Property text prop return public static final synchronized native int Xmb Text Property To Text List int display X Text Property text prop int list return int count return  XmWidgetGetDisplayRect XRectangle XmbTextListToTextProperty XTextProperty text_prop_return XmbTextPropertyToTextList XTextProperty text_prop list_return count_return
public static final synchronized native int Xmb Text List To Text Property int display int list int count int style X Text Property text prop return public static final synchronized native int Xmb Text Property To Text List int display X Text Property text prop int list return int count return public static final synchronized native void Xp Cancel Job int display boolean discard  XmbTextListToTextProperty XTextProperty text_prop_return XmbTextPropertyToTextList XTextProperty text_prop list_return count_return XpCancelJob
public static final synchronized native int Xmb Text Property To Text List int display X Text Property text prop int list return int count return public static final synchronized native void Xp Cancel Job int display boolean discard public static final synchronized native int Xp Create Context int display byte printer name  XmbTextPropertyToTextList XTextProperty text_prop list_return count_return XpCancelJob XpCreateContext printer_name
public static final synchronized native void Xp Cancel Job int display boolean discard public static final synchronized native int Xp Create Context int display byte printer name public static final synchronized native void Xp Destroy Context int display int print context  XpCancelJob XpCreateContext printer_name XpDestroyContext print_context
public static final synchronized native int Xp Create Context int display byte printer name public static final synchronized native void Xp Destroy Context int display int print context public static final synchronized native void Xp End Job int display  XpCreateContext printer_name XpDestroyContext print_context XpEndJob
public static final synchronized native void Xp Destroy Context int display int print context public static final synchronized native void Xp End Job int display public static final synchronized native void Xp End Page int display  XpDestroyContext print_context XpEndJob XpEndPage
public static final synchronized native void Xp End Job int display public static final synchronized native void Xp End Page int display public static final synchronized native void Xp Free Printer List int printer list  XpEndJob XpEndPage XpFreePrinterList printer_list
public static final synchronized native void Xp End Page int display public static final synchronized native void Xp Free Printer List int printer list public static final synchronized native int Xp Get One Attribute int display int print context byte type byte attribute name  XpEndPage XpFreePrinterList printer_list XpGetOneAttribute print_context attribute_name
public static final synchronized native void Xp Free Printer List int printer list public static final synchronized native int Xp Get One Attribute int display int print context byte type byte attribute name public static final synchronized native int Xp Get Page Dimensions int display int print context short width short height X Rectangle reproducible area  XpFreePrinterList printer_list XpGetOneAttribute print_context attribute_name XpGetPageDimensions print_context XRectangle reproducible_area
public static final synchronized native int Xp Get One Attribute int display int print context byte type byte attribute name public static final synchronized native int Xp Get Page Dimensions int display int print context short width short height X Rectangle reproducible area public static final synchronized native int Xp Get Printer List int display byte printer name int list count  XpGetOneAttribute print_context attribute_name XpGetPageDimensions print_context XRectangle reproducible_area XpGetPrinterList printer_name list_count
public static final synchronized native int Xp Get Page Dimensions int display int print context short width short height X Rectangle reproducible area public static final synchronized native int Xp Get Printer List int display byte printer name int list count public static final synchronized native int Xp Get Screen Of Context int display int print context  XpGetPageDimensions print_context XRectangle reproducible_area XpGetPrinterList printer_name list_count XpGetScreenOfContext print_context
public static final synchronized native int Xp Get Printer List int display byte printer name int list count public static final synchronized native int Xp Get Screen Of Context int display int print context public static final synchronized native void Xp Set Attributes int display int print context byte type byte pool byte replacement rule  XpGetPrinterList printer_name list_count XpGetScreenOfContext print_context XpSetAttributes print_context replacement_rule
public static final synchronized native int Xp Get Screen Of Context int display int print context public static final synchronized native void Xp Set Attributes int display int print context byte type byte pool byte replacement rule public static final synchronized native void Xp Set Context int display int print context  XpGetScreenOfContext print_context XpSetAttributes print_context replacement_rule XpSetContext print_context
public static final synchronized native void Xp Set Attributes int display int print context byte type byte pool byte replacement rule public static final synchronized native void Xp Set Context int display int print context public static final synchronized native void Xp Start Job int display byte save data  XpSetAttributes print_context replacement_rule XpSetContext print_context XpStartJob save_data
public static final synchronized native void Xp Set Context int display int print context public static final synchronized native void Xp Start Job int display byte save data public static final synchronized native void Xp Start Page int display int window  XpSetContext print_context XpStartJob save_data XpStartPage
public static final synchronized native void Xp Start Job int display byte save data public static final synchronized native void Xp Start Page int display int window public static final synchronized native void Xt Add Callback int widget int callback name int callback int client data  XpStartJob save_data XpStartPage XtAddCallback callback_name client_data
public static final synchronized native void Xp Start Page int display int window public static final synchronized native void Xt Add Callback int widget int callback name int callback int client data public static final synchronized native void Xt Add Event Handler int widget int event mask boolean nonmaskable int proc int client data  XpStartPage XtAddCallback callback_name client_data XtAddEventHandler event_mask client_data
public static final synchronized native void Xt Add Callback int widget int callback name int callback int client data public static final synchronized native void Xt Add Event Handler int widget int event mask boolean nonmaskable int proc int client data public static final synchronized native void Xt Add Exposure To Region int event int region  XtAddCallback callback_name client_data XtAddEventHandler event_mask client_data XtAddExposureToRegion
public static final synchronized native void Xt Add Event Handler int widget int event mask boolean nonmaskable int proc int client data public static final synchronized native void Xt Add Exposure To Region int event int region public static final synchronized native int Xt App Add Input int app context int source int condition int proc int client data  XtAddEventHandler event_mask client_data XtAddExposureToRegion XtAppAddInput app_context client_data
public static final synchronized native void Xt Add Exposure To Region int event int region public static final synchronized native int Xt App Add Input int app context int source int condition int proc int client data public static final synchronized native int Xt App Add Time Out int app context int interval int proc int client data  XtAddExposureToRegion XtAppAddInput app_context client_data XtAppAddTimeOut app_context client_data
public static final synchronized native int Xt App Add Input int app context int source int condition int proc int client data public static final synchronized native int Xt App Add Time Out int app context int interval int proc int client data public static final synchronized native int Xt App Create Shell byte app Name byte app Class int widget Class int display int arg List int arg Count  XtAppAddInput app_context client_data XtAppAddTimeOut app_context client_data XtAppCreateShell appName appClass widgetClass argList argCount
public static final synchronized native int Xt App Add Time Out int app context int interval int proc int client data public static final synchronized native int Xt App Create Shell byte app Name byte app Class int widget Class int display int arg List int arg Count public static final synchronized native int Xt App Get Selection Timeout int app Context  XtAppAddTimeOut app_context client_data XtAppCreateShell appName appClass widgetClass argList argCount XtAppGetSelectionTimeout appContext
public static final synchronized native int Xt App Create Shell byte app Name byte app Class int widget Class int display int arg List int arg Count public static final synchronized native int Xt App Get Selection Timeout int app Context public static final synchronized native void Xt App Next Event int app Context int event  XtAppCreateShell appName appClass widgetClass argList argCount XtAppGetSelectionTimeout appContext XtAppNextEvent appContext
public static final synchronized native int Xt App Get Selection Timeout int app Context public static final synchronized native void Xt App Next Event int app Context int event public static final synchronized native boolean Xt App Peek Event int app Context int event  XtAppGetSelectionTimeout appContext XtAppNextEvent appContext XtAppPeekEvent appContext
public static final synchronized native void Xt App Next Event int app Context int event public static final synchronized native boolean Xt App Peek Event int app Context int event public static final synchronized native int Xt App Pending int app Context  XtAppNextEvent appContext XtAppPeekEvent appContext XtAppPending appContext
public static final synchronized native boolean Xt App Peek Event int app Context int event public static final synchronized native int Xt App Pending int app Context public static final synchronized native void Xt App Process Event int app Context int input Mask  XtAppPeekEvent appContext XtAppPending appContext XtAppProcessEvent appContext inputMask
public static final synchronized native int Xt App Pending int app Context public static final synchronized native void Xt App Process Event int app Context int input Mask public static final synchronized native int Xt App Set Error Handler int app context int handler  XtAppPending appContext XtAppProcessEvent appContext inputMask XtAppSetErrorHandler app_context
public static final synchronized native void Xt App Process Event int app Context int input Mask public static final synchronized native int Xt App Set Error Handler int app context int handler public static final synchronized native void Xt App Set Fallback Resources int app context int specification list  XtAppProcessEvent appContext inputMask XtAppSetErrorHandler app_context XtAppSetFallbackResources app_context specification_list
public static final synchronized native int Xt App Set Error Handler int app context int handler public static final synchronized native void Xt App Set Fallback Resources int app context int specification list public static final synchronized native void Xt App Set Selection Timeout int app Context int timeout  XtAppSetErrorHandler app_context XtAppSetFallbackResources app_context specification_list XtAppSetSelectionTimeout appContext
public static final synchronized native void Xt App Set Fallback Resources int app context int specification list public static final synchronized native void Xt App Set Selection Timeout int app Context int timeout public static final synchronized native int Xt App Set Warning Handler int app context int handler  XtAppSetFallbackResources app_context specification_list XtAppSetSelectionTimeout appContext XtAppSetWarningHandler app_context
public static final synchronized native void Xt App Set Selection Timeout int app Context int timeout public static final synchronized native int Xt App Set Warning Handler int app context int handler public static final synchronized native int Xt Build Event Mask int widget  XtAppSetSelectionTimeout appContext XtAppSetWarningHandler app_context XtBuildEventMask
public static final synchronized native int Xt App Set Warning Handler int app context int handler public static final synchronized native int Xt Build Event Mask int widget public static final synchronized native void Xt Call Action Proc int widget byte action int event int params int num params  XtAppSetWarningHandler app_context XtBuildEventMask XtCallActionProc num_params
public static final synchronized native int Xt Build Event Mask int widget public static final synchronized native void Xt Call Action Proc int widget byte action int event int params int num params public static final synchronized native int Xt Class int widget  XtBuildEventMask XtCallActionProc num_params XtClass
public static final synchronized native void Xt Call Action Proc int widget byte action int event int params int num params public static final synchronized native int Xt Class int widget public static final synchronized native void Xt Configure Widget int widget int x int y int width int height int border Width  XtCallActionProc num_params XtClass XtConfigureWidget borderWidth
public static final synchronized native int Xt Class int widget public static final synchronized native void Xt Configure Widget int widget int x int y int width int height int border Width public static final synchronized native int Xt Create Application Context  XtClass XtConfigureWidget borderWidth XtCreateApplicationContext
public static final synchronized native void Xt Configure Widget int widget int x int y int width int height int border Width public static final synchronized native int Xt Create Application Context public static final synchronized native int Xt Create Popup Shell byte name int widget Class int parent int arg List int arg Count  XtConfigureWidget borderWidth XtCreateApplicationContext XtCreatePopupShell widgetClass argList argCount
public static final synchronized native int Xt Create Application Context public static final synchronized native int Xt Create Popup Shell byte name int widget Class int parent int arg List int arg Count public static final synchronized native void Xt Destroy Application Context int app Context  XtCreateApplicationContext XtCreatePopupShell widgetClass argList argCount XtDestroyApplicationContext appContext
public static final synchronized native int Xt Create Popup Shell byte name int widget Class int parent int arg List int arg Count public static final synchronized native void Xt Destroy Application Context int app Context public static final synchronized native void Xt Destroy Widget int widget  XtCreatePopupShell widgetClass argList argCount XtDestroyApplicationContext appContext XtDestroyWidget
public static final synchronized native void Xt Destroy Application Context int app Context public static final synchronized native void Xt Destroy Widget int widget public static final synchronized native boolean Xt Dispatch Event int event  XtDestroyApplicationContext appContext XtDestroyWidget XtDispatchEvent
public static final synchronized native void Xt Destroy Widget int widget public static final synchronized native boolean Xt Dispatch Event int event public static final synchronized native int Xt Display int widget  XtDestroyWidget XtDispatchEvent XtDisplay
public static final synchronized native boolean Xt Dispatch Event int event public static final synchronized native int Xt Display int widget public static final synchronized native int Xt Display To Application Context int display  XtDispatchEvent XtDisplay XtDisplayToApplicationContext
public static final synchronized native int Xt Display int widget public static final synchronized native int Xt Display To Application Context int display public static final synchronized native void Xt Free int ptr  XtDisplay XtDisplayToApplicationContext XtFree
public static final synchronized native int Xt Display To Application Context int display public static final synchronized native void Xt Free int ptr public static final synchronized native int Xt Get Multi Click Time int display  XtDisplayToApplicationContext XtFree XtGetMultiClickTime
public static final synchronized native void Xt Free int ptr public static final synchronized native int Xt Get Multi Click Time int display public static final synchronized native void Xt Get Values int widget int arg List int num Args  XtFree XtGetMultiClickTime XtGetValues argList numArgs
public static final synchronized native int Xt Get Multi Click Time int display public static final synchronized native void Xt Get Values int widget int arg List int num Args public static final synchronized native void Xt Insert Event Handler int w int event mask boolean nonmaskable int proc int client data int position  XtGetMultiClickTime XtGetValues argList numArgs XtInsertEventHandler event_mask client_data
public static final synchronized native void Xt Get Values int widget int arg List int num Args public static final synchronized native void Xt Insert Event Handler int w int event mask boolean nonmaskable int proc int client data int position public static final synchronized native boolean Xt Is Managed int widget  XtGetValues argList numArgs XtInsertEventHandler event_mask client_data XtIsManaged
public static final synchronized native void Xt Insert Event Handler int w int event mask boolean nonmaskable int proc int client data int position public static final synchronized native boolean Xt Is Managed int widget public static final synchronized native boolean Xt Is Realized int widget  XtInsertEventHandler event_mask client_data XtIsManaged XtIsRealized
public static final synchronized native boolean Xt Is Managed int widget public static final synchronized native boolean Xt Is Realized int widget public static final synchronized native boolean Xt Is Subclass int widget int widget Class  XtIsManaged XtIsRealized XtIsSubclass widgetClass
public static final synchronized native boolean Xt Is Realized int widget public static final synchronized native boolean Xt Is Subclass int widget int widget Class public static final synchronized native boolean Xt Is Top Level Shell int widget  XtIsRealized XtIsSubclass widgetClass XtIsTopLevelShell
public static final synchronized native boolean Xt Is Subclass int widget int widget Class public static final synchronized native boolean Xt Is Top Level Shell int widget public static final synchronized native int Xt Last Timestamp Processed int display  XtIsSubclass widgetClass XtIsTopLevelShell XtLastTimestampProcessed
public static final synchronized native boolean Xt Is Top Level Shell int widget public static final synchronized native int Xt Last Timestamp Processed int display public static final synchronized native int Xt Malloc int size  XtIsTopLevelShell XtLastTimestampProcessed XtMalloc
public static final synchronized native int Xt Last Timestamp Processed int display public static final synchronized native int Xt Malloc int size public static final synchronized native void Xt Manage Child int widget  XtLastTimestampProcessed XtMalloc XtManageChild
public static final synchronized native int Xt Malloc int size public static final synchronized native void Xt Manage Child int widget public static final synchronized native void Xt Map Widget int widget  XtMalloc XtManageChild XtMapWidget
public static final synchronized native void Xt Manage Child int widget public static final synchronized native void Xt Map Widget int widget public static final synchronized native void Xt Move Widget int widget int x int y  XtManageChild XtMapWidget XtMoveWidget
public static final synchronized native void Xt Map Widget int widget public static final synchronized native void Xt Move Widget int widget int x int y public static final synchronized native int Xt Name To Widget int reference byte names  XtMapWidget XtMoveWidget XtNameToWidget
public static final synchronized native void Xt Move Widget int widget int x int y public static final synchronized native int Xt Name To Widget int reference byte names public static final synchronized native int Xt Open Display int xt App Context byte display Name byte application Name byte application Class int options int num Options int argc int argv  XtMoveWidget XtNameToWidget XtOpenDisplay xtAppContext displayName applicationName applicationClass numOptions
public static final synchronized native int Xt Name To Widget int reference byte names public static final synchronized native int Xt Open Display int xt App Context byte display Name byte application Name byte application Class int options int num Options int argc int argv public static final synchronized native void Xt Override Translations int w int translations  XtNameToWidget XtOpenDisplay xtAppContext displayName applicationName applicationClass numOptions XtOverrideTranslations
public static final synchronized native int Xt Open Display int xt App Context byte display Name byte application Name byte application Class int options int num Options int argc int argv public static final synchronized native void Xt Override Translations int w int translations public static final synchronized native int Xt Parent int widget  XtOpenDisplay xtAppContext displayName applicationName applicationClass numOptions XtOverrideTranslations XtParent
public static final synchronized native void Xt Override Translations int w int translations public static final synchronized native int Xt Parent int widget public static final synchronized native int Xt Parse Translation Table byte string  XtOverrideTranslations XtParent XtParseTranslationTable
public static final synchronized native int Xt Parent int widget public static final synchronized native int Xt Parse Translation Table byte string public static final synchronized native void Xt Popdown int widget  XtParent XtParseTranslationTable XtPopdown
public static final synchronized native int Xt Parse Translation Table byte string public static final synchronized native void Xt Popdown int widget public static final synchronized native void Xt Popup int widget int flags  XtParseTranslationTable XtPopdown XtPopup
public static final synchronized native void Xt Popdown int widget public static final synchronized native void Xt Popup int widget int flags public static final synchronized native int Xt Query Geometry int widget Xt Widget Geometry intended Xt Widget Geometry preferred return  XtPopdown XtPopup XtQueryGeometry XtWidgetGeometry XtWidgetGeometry preferred_return
public static final synchronized native void Xt Popup int widget int flags public static final synchronized native int Xt Query Geometry int widget Xt Widget Geometry intended Xt Widget Geometry preferred return public static final synchronized native void Xt Realize Widget int widget  XtPopup XtQueryGeometry XtWidgetGeometry XtWidgetGeometry preferred_return XtRealizeWidget
public static final synchronized native int Xt Query Geometry int widget Xt Widget Geometry intended Xt Widget Geometry preferred return public static final synchronized native void Xt Realize Widget int widget public static final synchronized native void Xt Register Drawable int display int drawable int widget  XtQueryGeometry XtWidgetGeometry XtWidgetGeometry preferred_return XtRealizeWidget XtRegisterDrawable
public static final synchronized native void Xt Realize Widget int widget public static final synchronized native void Xt Register Drawable int display int drawable int widget public static final synchronized native void Xt Remove Event Handler int widget int event mask boolean nonmaskable int proc int client data  XtRealizeWidget XtRegisterDrawable XtRemoveEventHandler event_mask client_data
public static final synchronized native void Xt Register Drawable int display int drawable int widget public static final synchronized native void Xt Remove Event Handler int widget int event mask boolean nonmaskable int proc int client data public static final synchronized native void Xt Remove Input int id  XtRegisterDrawable XtRemoveEventHandler event_mask client_data XtRemoveInput
public static final synchronized native void Xt Remove Event Handler int widget int event mask boolean nonmaskable int proc int client data public static final synchronized native void Xt Remove Input int id public static final synchronized native void Xt Remove Time Out int id  XtRemoveEventHandler event_mask client_data XtRemoveInput XtRemoveTimeOut
public static final synchronized native void Xt Remove Input int id public static final synchronized native void Xt Remove Time Out int id public static final synchronized native void Xt Resize Widget int widget int width int height int border Width  XtRemoveInput XtRemoveTimeOut XtResizeWidget borderWidth
public static final synchronized native void Xt Remove Time Out int id public static final synchronized native void Xt Resize Widget int widget int width int height int border Width public static final synchronized native void Xt Resize Window int widget  XtRemoveTimeOut XtResizeWidget borderWidth XtResizeWindow
public static final synchronized native void Xt Resize Widget int widget int width int height int border Width public static final synchronized native void Xt Resize Window int widget public static final synchronized native int Xt Set Language Proc int app Context int language Proc int pointer  XtResizeWidget borderWidth XtResizeWindow XtSetLanguageProc appContext languageProc
public static final synchronized native void Xt Resize Window int widget public static final synchronized native int Xt Set Language Proc int app Context int language Proc int pointer public static final synchronized native void Xt Set Mapped When Managed int widget boolean flag  XtResizeWindow XtSetLanguageProc appContext languageProc XtSetMappedWhenManaged
public static final synchronized native int Xt Set Language Proc int app Context int language Proc int pointer public static final synchronized native void Xt Set Mapped When Managed int widget boolean flag public static final synchronized native void Xt Set Values int widget int arg List int num Args  XtSetLanguageProc appContext languageProc XtSetMappedWhenManaged XtSetValues argList numArgs
public static final synchronized native void Xt Set Mapped When Managed int widget boolean flag public static final synchronized native void Xt Set Values int widget int arg List int num Args public static final synchronized native void Xt Toolkit Initialize  XtSetMappedWhenManaged XtSetValues argList numArgs XtToolkitInitialize
public static final synchronized native void Xt Set Values int widget int arg List int num Args public static final synchronized native void Xt Toolkit Initialize public static final synchronized native boolean Xt Toolkit Thread Initialize  XtSetValues argList numArgs XtToolkitInitialize XtToolkitThreadInitialize
public static final synchronized native void Xt Toolkit Initialize public static final synchronized native boolean Xt Toolkit Thread Initialize public static final synchronized native void Xt Translate Coords int widget short x short y short root x short root y  XtToolkitInitialize XtToolkitThreadInitialize XtTranslateCoords root_x root_y
public static final synchronized native boolean Xt Toolkit Thread Initialize public static final synchronized native void Xt Translate Coords int widget short x short y short root x short root y public static final synchronized native void Xt Unmanage Child int widget  XtToolkitThreadInitialize XtTranslateCoords root_x root_y XtUnmanageChild
public static final synchronized native void Xt Translate Coords int widget short x short y short root x short root y public static final synchronized native void Xt Unmanage Child int widget public static final synchronized native void Xt Unmap Widget int widget  XtTranslateCoords root_x root_y XtUnmanageChild XtUnmapWidget
public static final synchronized native void Xt Unmanage Child int widget public static final synchronized native void Xt Unmap Widget int widget public static final synchronized native void Xt Unregister Drawable int display int drawable  XtUnmanageChild XtUnmapWidget XtUnregisterDrawable
public static final synchronized native void Xt Unmap Widget int widget public static final synchronized native void Xt Unregister Drawable int display int drawable public static final synchronized native int Xt Window int widget  XtUnmapWidget XtUnregisterDrawable XtWindow
public static final synchronized native void Xt Unregister Drawable int display int drawable public static final synchronized native int Xt Window int widget public static final synchronized native int Xt Window To Widget int display int widget  XtUnregisterDrawable XtWindow XtWindowToWidget
public static final synchronized native int Xt Window int widget public static final synchronized native int Xt Window To Widget int display int widget public static final synchronized native void  XmSetMenuTraversal int menu boolean traversal  XtWindow XtWindowToWidget _XmSetMenuTraversal
public static final synchronized native int Xt Window To Widget int display int widget public static final synchronized native void  XmSetMenuTraversal int menu boolean traversal public static final native int close int filedes  XtWindowToWidget _XmSetMenuTraversal
public static final synchronized native void  XmSetMenuTraversal int menu boolean traversal public static final native int close int filedes public static final native int fd set sizeof  _XmSetMenuTraversal fd_set_sizeof
public static final native int close int filedes public static final native int fd set sizeof public static final native int getenv byte name  fd_set_sizeof
public static final native int fd set sizeof public static final native int getenv byte name public static final native int iconv int cd int in Buf int in Bytes Left int out Buf int out Bytes Left  fd_set_sizeof inBuf inBytesLeft outBuf outBytesLeft
public static final native int getenv byte name public static final native int iconv int cd int in Buf int in Bytes Left int out Buf int out Bytes Left public static final native int iconv close int cd  inBuf inBytesLeft outBuf outBytesLeft iconv_close
public static final native int iconv int cd int in Buf int in Bytes Left int out Buf int out Bytes Left public static final native int iconv close int cd public static final native int iconv open byte tocode byte fromcode  inBuf inBytesLeft outBuf outBytesLeft iconv_close iconv_open
public static final native int iconv close int cd public static final native int iconv open byte tocode byte fromcode public static final native void memmove int dest X Image src int count  iconv_close iconv_open XImage
public static final native int iconv open byte tocode byte fromcode public static final native void memmove int dest X Image src int count public static final native void memmove int dest Xm Drag Proc Callback Struct src int count  iconv_open XImage XmDragProcCallbackStruct
public static final native void memmove int dest X Image src int count public static final native void memmove int dest Xm Drag Proc Callback Struct src int count public static final native void memmove int dest Xm Text Block Rec src int count  XImage XmDragProcCallbackStruct XmTextBlockRec
public static final native void memmove int dest Xm Drag Proc Callback Struct src int count public static final native void memmove int dest Xm Text Block Rec src int count public static final native void memmove int dest Xm Text Verify Callback Struct src int count  XmDragProcCallbackStruct XmTextBlockRec XmTextVerifyCallbackStruct
public static final native void memmove int dest Xm Text Block Rec src int count public static final native void memmove int dest Xm Text Verify Callback Struct src int count public static final native void memmove int dest byte src int count  XmTextBlockRec XmTextVerifyCallbackStruct
public static final native void memmove int dest Xm Text Verify Callback Struct src int count public static final native void memmove int dest byte src int count public static final native void memmove int dest char src int count  XmTextVerifyCallbackStruct
public static final native void memmove int dest byte src int count public static final native void memmove int dest char src int count public static final native void memmove int dest int src int count 
public static final native void memmove int dest char src int count public static final native void memmove int dest int src int count public static final native void memmove Visual dest int src int count 
public static final native void memmove int dest int src int count public static final native void memmove Visual dest int src int count public static final native void memmove X Button Event dest int src int count  XButtonEvent
public static final native void memmove Visual dest int src int count public static final native void memmove X Button Event dest int src int count public static final native void memmove int dest X Button Event src int count  XButtonEvent XButtonEvent
public static final native void memmove X Button Event dest int src int count public static final native void memmove int dest X Button Event src int count public static final native void memmove X Char Struct dest int src int count  XButtonEvent XButtonEvent XCharStruct
public static final native void memmove int dest X Button Event src int count public static final native void memmove X Char Struct dest int src int count public static final native void memmove X Client Message Event dest int src int count  XButtonEvent XCharStruct XClientMessageEvent
public static final native void memmove X Char Struct dest int src int count public static final native void memmove X Client Message Event dest int src int count public static final native void memmove X Configure Event dest int src int count  XCharStruct XClientMessageEvent XConfigureEvent
public static final native void memmove X Client Message Event dest int src int count public static final native void memmove X Configure Event dest int src int count public static final native void memmove X Create Window Event dest int src int count  XClientMessageEvent XConfigureEvent XCreateWindowEvent
public static final native void memmove X Configure Event dest int src int count public static final native void memmove X Create Window Event dest int src int count public static final native void memmove X Crossing Event dest int src int count  XConfigureEvent XCreateWindowEvent XCrossingEvent
public static final native void memmove X Create Window Event dest int src int count public static final native void memmove X Crossing Event dest int src int count public static final native void memmove X Destroy Window Event dest int src int count  XCreateWindowEvent XCrossingEvent XDestroyWindowEvent
public static final native void memmove X Crossing Event dest int src int count public static final native void memmove X Destroy Window Event dest int src int count public static final native void memmove X Expose Event dest int src int count  XCrossingEvent XDestroyWindowEvent XExposeEvent
public static final native void memmove X Destroy Window Event dest int src int count public static final native void memmove X Expose Event dest int src int count public static final native void memmove X Focus Change Event dest int src int count  XDestroyWindowEvent XExposeEvent XFocusChangeEvent
public static final native void memmove X Expose Event dest int src int count public static final native void memmove X Focus Change Event dest int src int count public static final native void memmove X Font Struct dest int src int count  XExposeEvent XFocusChangeEvent XFontStruct
public static final native void memmove X Focus Change Event dest int src int count public static final native void memmove X Font Struct dest int src int count public static final native void memmove X Image dest int src int count  XFocusChangeEvent XFontStruct XImage
public static final native void memmove X Font Struct dest int src int count public static final native void memmove X Image dest int src int count public static final native void memmove Xinerama Screen Info dest int src int count  XFontStruct XImage XineramaScreenInfo
public static final native void memmove X Image dest int src int count public static final native void memmove Xinerama Screen Info dest int src int count public static final native void memmove X Key Event dest int src int count  XImage XineramaScreenInfo XKeyEvent
public static final native void memmove Xinerama Screen Info dest int src int count public static final native void memmove X Key Event dest int src int count public static final native void memmove X Event dest int src int count  XineramaScreenInfo XKeyEvent XEvent
public static final native void memmove X Key Event dest int src int count public static final native void memmove X Event dest int src int count public static final native void memmove X Modifier Keymap dest int src int count  XKeyEvent XEvent XModifierKeymap
public static final native void memmove X Event dest int src int count public static final native void memmove X Modifier Keymap dest int src int count public static final native void memmove X Motion Event dest int src int count  XEvent XModifierKeymap XMotionEvent
public static final native void memmove X Modifier Keymap dest int src int count public static final native void memmove X Motion Event dest int src int count public static final native void memmove X Property Event dest int src int count  XModifierKeymap XMotionEvent XPropertyEvent
public static final native void memmove X Motion Event dest int src int count public static final native void memmove X Property Event dest int src int count public static final native void memmove X Reparent Event dest int src int count  XMotionEvent XPropertyEvent XReparentEvent
public static final native void memmove X Property Event dest int src int count public static final native void memmove X Reparent Event dest int src int count public static final native void memmove Xm Any Callback Struct dest int src int count  XPropertyEvent XReparentEvent XmAnyCallbackStruct
public static final native void memmove X Reparent Event dest int src int count public static final native void memmove Xm Any Callback Struct dest int src int count public static final native void memmove Xm Drag Proc Callback Struct dest int src int count  XReparentEvent XmAnyCallbackStruct XmDragProcCallbackStruct
public static final native void memmove Xm Any Callback Struct dest int src int count public static final native void memmove Xm Drag Proc Callback Struct dest int src int count public static final native void memmove Xm Drop Finish Callback Struct dest int src int count  XmAnyCallbackStruct XmDragProcCallbackStruct XmDropFinishCallbackStruct
public static final native void memmove Xm Drag Proc Callback Struct dest int src int count public static final native void memmove Xm Drop Finish Callback Struct dest int src int count public static final native void memmove Xm Drop Proc Callback Struct dest int src int count  XmDragProcCallbackStruct XmDropFinishCallbackStruct XmDropProcCallbackStruct
public static final native void memmove Xm Drop Finish Callback Struct dest int src int count public static final native void memmove Xm Drop Proc Callback Struct dest int src int count public static final native void memmove Xm Text Block Rec dest int src int count  XmDropFinishCallbackStruct XmDropProcCallbackStruct XmTextBlockRec
public static final native void memmove Xm Drop Proc Callback Struct dest int src int count public static final native void memmove Xm Text Block Rec dest int src int count public static final native void memmove Xm Text Verify Callback Struct dest int src int count  XmDropProcCallbackStruct XmTextBlockRec XmTextVerifyCallbackStruct
public static final native void memmove Xm Text Block Rec dest int src int count public static final native void memmove Xm Text Verify Callback Struct dest int src int count public static final native void memmove byte dest int src int count  XmTextBlockRec XmTextVerifyCallbackStruct
public static final native void memmove Xm Text Verify Callback Struct dest int src int count public static final native void memmove byte dest int src int count public static final native void memmove char dest int src int count  XmTextVerifyCallbackStruct
public static final native void memmove byte dest int src int count public static final native void memmove char dest int src int count public static final native void memmove int dest int src int count 
public static final native void memmove char dest int src int count public static final native void memmove int dest int src int count public static final native void memmove int dest short src int count 
public static final native void memmove int dest int src int count public static final native void memmove int dest short src int count public static final native void memmove int dest X Expose Event src int count  XExposeEvent
public static final native void memmove int dest short src int count public static final native void memmove int dest X Expose Event src int count public static final native void memmove int dest X Client Message Event src int count  XExposeEvent XClientMessageEvent
public static final native void memmove int dest X Expose Event src int count public static final native void memmove int dest X Client Message Event src int count public static final native void memmove int dest X Configure Event src int count  XExposeEvent XClientMessageEvent XConfigureEvent
public static final native void memmove int dest X Client Message Event src int count public static final native void memmove int dest X Configure Event src int count public static final native void memmove int dest X Key Event src int count  XClientMessageEvent XConfigureEvent XKeyEvent
public static final native void memmove int dest X Configure Event src int count public static final native void memmove int dest X Key Event src int count public static final native void memmove X Icon Size dest int src int count  XConfigureEvent XKeyEvent XIconSize
public static final native void memmove int dest X Key Event src int count public static final native void memmove X Icon Size dest int src int count public static final native int nl langinfo int item  XKeyEvent XIconSize nl_langinfo
public static final native void memmove X Icon Size dest int src int count public static final native int nl langinfo int item public static final native int pipe int filedes  XIconSize nl_langinfo
public static final native int nl langinfo int item public static final native int pipe int filedes public static final native int read int filedes byte buf int nbyte  nl_langinfo
public static final native int pipe int filedes public static final native int read int filedes byte buf int nbyte public static final native int select int n byte readfds byte writefds byte exceptfds int timeout 
public static final native int read int filedes byte buf int nbyte public static final native int select int n byte readfds byte writefds byte exceptfds int timeout public static final native int setlocale int category byte locale 
public static final native int select int n byte readfds byte writefds byte exceptfds int timeout public static final native int setlocale int category byte locale public static final native int strlen int string 
public static final native int setlocale int category byte locale public static final native int strlen int string public static final native int write int filedes byte buf int nbyte 

public XPCOM Object int arg Counts int callback Addresses new int arg Counts length for int i 0 length arg Counts length i length i if Callbacks i arg Counts i null Callbacks i arg Counts i new Callback this get Class callback i arg Counts i 1 true NON NLS 1 callback Addresses i Callbacks i arg Counts i get Address int p Vtable XPCOM PR Malloc 4 arg Counts length XPCOM memmove p Vtable callback Addresses 4 arg Counts length pp Vtable XPCOM PR Malloc 4 XPCOM memmove pp Vtable new int p Vtable 4 Object Map put new Integer pp Vtable this  XPCOMObject argCounts callbackAddresses argCounts argCounts argCounts argCounts getClass argCounts callbackAddresses argCounts getAddress pVtable PR_Malloc argCounts pVtable callbackAddresses argCounts ppVtable PR_Malloc ppVtable pVtable ObjectMap ppVtable
static int callback0 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method0 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback1 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method1 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback10 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method10 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback11 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method11 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback12 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method12 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback13 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method13 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback14 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method14 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback15 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method15 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback16 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method16 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback17 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method17 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback18 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method18 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback19 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method19 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback2 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method2 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback20 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method20 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback21 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method21 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback22 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method22 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback23 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method23 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback24 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method24 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback25 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method25 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback26 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method26 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback27 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method27 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback28 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method28 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback29 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method29 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback3 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method3 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback30 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method30 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback31 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method31 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback32 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method32 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback33 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method33 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback34 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method34 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback35 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method35 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback36 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method36 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback37 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method37 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback38 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method38 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback39 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method39 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback4 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method4 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback40 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method40 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback41 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method41 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback42 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method42 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback43 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method43 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback44 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method44 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback45 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method45 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback46 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method46 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback47 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method47 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback48 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method48 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback49 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method49 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback5 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method5 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback50 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method50 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback51 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method51 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback52 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method52 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback53 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method53 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback54 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method54 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback55 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method55 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback56 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method56 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback57 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method57 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback58 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method58 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback59 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method59 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback6 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method6 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback60 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method60 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback61 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method61 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback62 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method62 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback63 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method63 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback64 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method64 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback65 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method65 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback66 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method66 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback67 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method67 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback68 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method68 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback69 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method69 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback7 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method7 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback70 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method70 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback71 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method71 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback72 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method72 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback73 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method73 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback74 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method74 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback75 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method75 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback76 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method76 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback77 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method77 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback78 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method78 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback79 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method79 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback8 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method8 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
static int callback9 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return XPCOM NS ERROR FAILURE int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return XPCOM Object object method9 args  callbackArgs callbackArgs ObjectMap NS_ERROR_FAILURE callbackArgs callbackArgs XPCOMObject
public void dispose free the memory for this reference int p Vtable new int 1 XPCOM memmove p Vtable pp Vtable 4 XPCOM PR Free p Vtable 0 XPCOM PR Free pp Vtable remove this pp Vtable from the list Object Map remove new Integer pp Vtable pp Vtable 0  pVtable pVtable ppVtable PR_Free pVtable PR_Free ppVtable ppVtable ObjectMap ppVtable ppVtable
public int get Address return pp Vtable  getAddress ppVtable
public int method0 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method1 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method10 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method11 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method12 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method13 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method14 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method15 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method16 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method17 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method18 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method19 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method2 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method20 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method21 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method22 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method23 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method24 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method25 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method26 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method27 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method28 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method29 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method3 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method30 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method31 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method32 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method33 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method34 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method35 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method36 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method37 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method38 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method39 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method4 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method40 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method41 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method42 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method43 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method44 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method45 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method46 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method47 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method48 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method49 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method5 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method50 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method51 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method52 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method53 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method54 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method55 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method56 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method57 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method58 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method59 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method6 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method60 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method61 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method62 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method63 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method64 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method65 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method66 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method67 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method68 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method69 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method7 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method70 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method71 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method72 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method73 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method74 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method75 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method76 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method77 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method78 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method79 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method8 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED
return XPCOM NS ERROR NOT IMPLEMENTED public int method9 int args return XPCOM NS ERROR NOT IMPLEMENTED  NS_ERROR_NOT_IMPLEMENTED NS_ERROR_NOT_IMPLEMENTED

Constructs an instance of this plug in runtime class p An instance of this plug in runtime class is automatically created when the facilities provided by the Ant Core plug in are required b Clients must never explicitly instantiate a plug in runtime class b p param descriptor the plug in descriptor for the Ant Core plug in public Ant Core Plugin I Plugin Descriptor descriptor super descriptor plugin this  AntCorePlugin IPluginDescriptor
public void shutdown if preferences null return save Plugin Preferences  savePluginPreferences
Given an extension point name extract its extensions and return them as a List param point Name The name of the extension point return The list of the extensions private List extract Extensions String point Name I Extension Point extension Point get Descriptor get Extension Point point Name if extension Point null return null I Configuration Element extensions extension Point get Configuration Elements return Arrays as List extensions  pointName extractExtensions pointName IExtensionPoint extensionPoint getDescriptor getExtensionPoint pointName extensionPoint IConfigurationElement extensionPoint getConfigurationElements asList
Returns an object representing this plug in s preferences return the Ant core object representing the preferences for this plug in public Ant Core Preferences get Preferences if preferences null preferences new Ant Core Preferences extract Extensions PT TASKS extract Extensions PT EXTRA CLASSPATH extract Extensions PT TYPES extract Extensions PT PROPERTIES false return preferences  AntCorePreferences getPreferences AntCorePreferences extractExtensions PT_TASKS extractExtensions PT_EXTRA_CLASSPATH extractExtensions PT_TYPES extractExtensions PT_PROPERTIES
Set this plug in s preferences for running headless based on the headless parameter This method is public for testing purposes only It should not be called outside of the Ant integration framework param headless Whether or not to mark that the plug in is running headless or not public void set Running Headless boolean headless preferences new Ant Core Preferences extract Extensions PT TASKS extract Extensions PT EXTRA CLASSPATH extract Extensions PT TYPES extract Extensions PT PROPERTIES headless  setRunningHeadless AntCorePreferences extractExtensions PT_TASKS extractExtensions PT_EXTRA_CLASSPATH extractExtensions PT_TYPES extractExtensions PT_PROPERTIES
Returns this plug in instance return the single instance of this plug in runtime class public static Ant Core Plugin get Plugin return plugin  AntCorePlugin getPlugin
Returns a new class loader to use when executing Ant builds return the new class loader public Class Loader get New Class Loader return get New Class Loader false  ClassLoader getNewClassLoader getNewClassLoader
Returns a new class loader to use when executing Ant builds or other applications such as parsing or code proposal determination param allow Loading whether to allow plugin classloaders associated with the new classloader to load Apache Ant classes return the new class loader public Class Loader get New Class Loader boolean allow Loading Ant Core Preferences core Preferences get Preferences URL urls core Preferences getUR Ls Class Loader plugin Loaders core Preferences get Plugin Class Loaders Ant Class Loader loader new Ant Class Loader urls plugin Loaders loader allow Plugin Class Loaders To Load Ant Classes allow Loading return loader  allowLoading ClassLoader getNewClassLoader allowLoading AntCorePreferences corePreferences getPreferences corePreferences getURLs ClassLoader pluginLoaders corePreferences getPluginClassLoaders AntClassLoader AntClassLoader pluginLoaders allowPluginClassLoadersToLoadAntClasses allowLoading
Logs the specified throwable with this plug in s log param t throwable to log since 2 1 public static void log Throwable t I Status status new Status I Status ERROR PI ANTCORE INTERNAL ERROR Error logged from Ant Core t NON NLS 1 get Plugin get Log log status  IStatus IStatus PI_ANTCORE INTERNAL_ERROR getPlugin getLog

private boolean running Headless false protected Ant Core Preferences List default Tasks List default Extra Classpath List default Types boolean headless this default Tasks default Extra Classpath default Types Collections EMPTY LIST headless  runningHeadless AntCorePreferences defaultTasks defaultExtraClasspath defaultTypes defaultTasks defaultExtraClasspath defaultTypes EMPTY_LIST
protected Ant Core Preferences List default Tasks List default Extra Classpath List default Types List default Properties boolean headless running Headless headless initialize Plugin Class Loaders extra ClasspathUR Ls new Array List 20 this default Tasks compute Default Tasks default Tasks this default Types compute Default Types default Types compute Default Extra Classpath Entries default Extra Classpath compute Default Properties default Properties restore Custom Objects  AntCorePreferences defaultTasks defaultExtraClasspath defaultTypes defaultProperties runningHeadless initializePluginClassLoaders extraClasspathURLs ArrayList defaultTasks computeDefaultTasks defaultTasks defaultTypes computeDefaultTypes defaultTypes computeDefaultExtraClasspathEntries defaultExtraClasspath computeDefaultProperties defaultProperties restoreCustomObjects
When a preference changes update the in memory cache of the preference param event The property change event that has occurred see org eclipse core runtime Preferences I Property Change Listener property Change org eclipse core runtime Preferences Property Change Event public void property Change Preferences Property Change Event event Preferences prefs Ant Core Plugin get Plugin get Plugin Preferences String property event get Property if property equals I Ant Core Constants PREFERENCE TASKS property starts With I Ant Core Constants PREFIX TASK restore Tasks prefs else if property equals I Ant Core Constants PREFERENCE TYPES property starts With I Ant Core Constants PREFIX TYPE restore Types prefs else if property equals I Ant Core Constants PREFERENCE ANT HOME ENTRIES restore Ant Home Entries prefs else if property equals I Ant Core Constants PREFERENCE ADDITIONAL ENTRIES restore Additional Entries prefs else if property equals I Ant Core Constants PREFERENCE ANT HOME restore Ant Home prefs else if property equals I Ant Core Constants PREFERENCE PROPERTIES property starts With I Ant Core Constants PREFIX PROPERTY restore Custom Properties prefs else if property equals I Ant Core Constants PREFERENCE PROPERTY FILES restore Custom Property Files prefs  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent AntCorePlugin getPlugin getPluginPreferences getProperty IAntCoreConstants PREFERENCE_TASKS startsWith IAntCoreConstants PREFIX_TASK restoreTasks IAntCoreConstants PREFERENCE_TYPES startsWith IAntCoreConstants PREFIX_TYPE restoreTypes IAntCoreConstants PREFERENCE_ANT_HOME_ENTRIES restoreAntHomeEntries IAntCoreConstants PREFERENCE_ADDITIONAL_ENTRIES restoreAdditionalEntries IAntCoreConstants PREFERENCE_ANT_HOME restoreAntHome IAntCoreConstants PREFERENCE_PROPERTIES startsWith IAntCoreConstants PREFIX_PROPERTY restoreCustomProperties IAntCoreConstants PREFERENCE_PROPERTY_FILES restoreCustomPropertyFiles
Restores the in memory model of the preferences from the preference store private void restore Custom Objects Preferences prefs Ant Core Plugin get Plugin get Plugin Preferences restore Ant Home prefs restore Tasks prefs restore Types prefs restore Ant Home Entries prefs restore Additional Entries prefs restore Custom Properties prefs restore Custom Property Files prefs prefs add Property Change Listener this  restoreCustomObjects AntCorePlugin getPlugin getPluginPreferences restoreAntHome restoreTasks restoreTypes restoreAntHomeEntries restoreAdditionalEntries restoreCustomProperties restoreCustomPropertyFiles addPropertyChangeListener
private void restore Tasks Preferences prefs String tasks prefs get String I Ant Core Constants PREFERENCE TASKS if tasks equals NON NLS 1 custom Tasks new Task 0 else custom Tasks extract Tasks prefs get Array From String tasks  restoreTasks getString IAntCoreConstants PREFERENCE_TASKS customTasks customTasks extractTasks getArrayFromString
private void restore Types Preferences prefs String types prefs get String I Ant Core Constants PREFERENCE TYPES if types equals NON NLS 1 custom Types new Type 0 else custom Types extract Types prefs get Array From String types  restoreTypes getString IAntCoreConstants PREFERENCE_TYPES customTypes customTypes extractTypes getArrayFromString
private void restore Ant Home Entries Preferences prefs String entries prefs get String ant urls old constant NON NLS 1 if entries equals NON NLS 1 entries prefs get String I Ant Core Constants PREFERENCE ANT HOME ENTRIES else prefs set To Default ant urls NON NLS 1 ant Home Entries migrateURL Entries get Array From String entries return if entries equals NON NLS 1 ant Home Entries get Default Ant Home Entries else ant Home Entries extract Entries get Array From String entries  restoreAntHomeEntries getString ant_urls getString IAntCoreConstants PREFERENCE_ANT_HOME_ENTRIES setToDefault ant_urls antHomeEntries migrateURLEntries getArrayFromString antHomeEntries getDefaultAntHomeEntries antHomeEntries extractEntries getArrayFromString
private void restore Additional Entries Preferences prefs String entries prefs get String urls old constant NON NLS 1 if entries equals NON NLS 1 entries prefs get String I Ant Core Constants PREFERENCE ADDITIONAL ENTRIES else prefs set To Default urls NON NLS 1 additional Entries migrateURL Entries get Array From String entries return if entries equals NON NLS 1 I Ant Classpath Entry tools Jar Entry get Tools Jar Entry if tools Jar Entry null additional Entries new I Ant Classpath Entry 0 else additional Entries new I Ant Classpath Entry tools Jar Entry else additional Entries extract Entries get Array From String entries  restoreAdditionalEntries getString getString IAntCoreConstants PREFERENCE_ADDITIONAL_ENTRIES setToDefault additionalEntries migrateURLEntries getArrayFromString IAntClasspathEntry toolsJarEntry getToolsJarEntry toolsJarEntry additionalEntries IAntClasspathEntry additionalEntries IAntClasspathEntry toolsJarEntry additionalEntries extractEntries getArrayFromString
private I Ant Classpath Entry migrateURL Entries String url Entries List result new Array List url Entries length for int i 0 i url Entries length i URL url try url new URL url Entries i catch MalformedURL Exception e continue result add new Ant Classpath Entry url return I Ant Classpath Entry result to Array new I Ant Classpath Entry result size  IAntClasspathEntry migrateURLEntries urlEntries ArrayList urlEntries urlEntries urlEntries MalformedURLException AntClasspathEntry IAntClasspathEntry toArray IAntClasspathEntry
private void restore Ant Home Preferences prefs ant Home prefs get String I Ant Core Constants PREFERENCE ANT HOME if ant Home null ant Home length 0 ant Home get Default Ant Home  restoreAntHome antHome getString IAntCoreConstants PREFERENCE_ANT_HOME antHome antHome antHome getDefaultAntHome
Returns the absolute path of the default ant home to use for the build The default is the org apache ant plugin folder provided with Eclipse return String absolute path of the default ant home since 3 0 public String get Default Ant Home I Ant Classpath Entry entries get Default Ant Home Entries if entries length 0 URL antjar entries 0 get EntryURL I Path ant Home Path new Path antjar get File parent directory of the lib directory ant Home Path ant Home Path remove Last Segments 2 return ant Home Path to File get Absolute Path return null  getDefaultAntHome IAntClasspathEntry getDefaultAntHomeEntries getEntryURL IPath antHomePath getFile antHomePath antHomePath removeLastSegments antHomePath toFile getAbsolutePath
private void restore Custom Properties Preferences prefs String properties prefs get String I Ant Core Constants PREFERENCE PROPERTIES if properties equals NON NLS 1 custom Properties new Property 0 else custom Properties extract Properties prefs get Array From String properties  restoreCustomProperties getString IAntCoreConstants PREFERENCE_PROPERTIES customProperties customProperties extractProperties getArrayFromString
private void restore Custom Property Files Preferences prefs String property Files prefs get String I Ant Core Constants PREFERENCE PROPERTY FILES if property Files equals NON NLS 1 custom Property Files new String 0 else custom Property Files get Array From String property Files  restoreCustomPropertyFiles propertyFiles getString IAntCoreConstants PREFERENCE_PROPERTY_FILES propertyFiles customPropertyFiles customPropertyFiles getArrayFromString propertyFiles
protected Task extract Tasks Preferences prefs String tasks List result new Array List tasks length for int i 0 i tasks length i String task Name tasks i String values get Array From String prefs get String I Ant Core Constants PREFIX TASK task Name if values length 2 continue Task task new Task task set Task Name task Name task set Class Name values 0 String library values 1 if library starts With file NON NLS 1 old format where UR Ls were persisted library library substring 5 task set Library Entry new Ant Classpath Entry library result add task return Task result to Array new Task result size  extractTasks ArrayList taskName getArrayFromString getString IAntCoreConstants PREFIX_TASK taskName setTaskName taskName setClassName startsWith URLs setLibraryEntry AntClasspathEntry toArray
protected Type extract Types Preferences prefs String types List result new Array List types length for int i 0 i types length i String type Name types i String values get Array From String prefs get String I Ant Core Constants PREFIX TYPE type Name if values length 2 continue Type type new Type type set Type Name type Name type set Class Name values 0 String library values 1 if library starts With file NON NLS 1 old format where UR Ls were persisted library library substring 5 type set Library Entry new Ant Classpath Entry library result add type return Type result to Array new Type result size  extractTypes ArrayList typeName getArrayFromString getString IAntCoreConstants PREFIX_TYPE typeName setTypeName typeName setClassName startsWith URLs setLibraryEntry AntClasspathEntry toArray
protected Property extract Properties Preferences prefs String properties Property result new Property properties length for int i 0 i properties length i String property Name properties i String values get Array From String prefs get String I Ant Core Constants PREFIX PROPERTY property Name if values length 1 continue Property property new Property property set Name property Name property set Value values 0 result i property return result  extractProperties propertyName getArrayFromString getString IAntCoreConstants PREFIX_PROPERTY propertyName setName propertyName setValue
private I Ant Classpath Entry extract Entries String entries I Ant Classpath Entry result new I Ant Classpath Entry entries length for int i 0 i entries length i result i new Ant Classpath Entry entries i return result  IAntClasspathEntry extractEntries IAntClasspathEntry IAntClasspathEntry AntClasspathEntry
Returns the array of UR Ls that is the default set of UR Ls defining the Ant classpath Ant running through the command line tries to find tools jar to help the user Try emulating the same behaviour here return the default set of UR Ls defining the Ant classpath deprecated public URL get Default AntUR Ls I Ant Classpath Entry entries get Default Ant Home Entries List result new Array List 3 for int i 0 i entries length i I Ant Classpath Entry entry entries i result add entry get EntryURL URL toolsURL get Tools JarURL if toolsURL null result add toolsURL return URL result to Array new URL result size  URLs URLs URLs getDefaultAntURLs IAntClasspathEntry getDefaultAntHomeEntries ArrayList IAntClasspathEntry getEntryURL getToolsJarURL toArray
Returns the array of classpath entries that is the default set of entries defining the Ant classpath return the default set of classpath entries defining the Ant classpath public I Ant Classpath Entry get Default Ant Home Entries if default Ant Home Entries null List result new Array List 29 Plugin ant Plugin Platform get Plugin org apache ant NON NLS 1 if ant Plugin null I Plugin Descriptor descriptor ant Plugin get Descriptor add Libraries descriptor result default Ant Home Entries I Ant Classpath Entry result to Array new I Ant Classpath Entry result size return default Ant Home Entries  IAntClasspathEntry getDefaultAntHomeEntries defaultAntHomeEntries ArrayList antPlugin getPlugin antPlugin IPluginDescriptor antPlugin getDescriptor addLibraries defaultAntHomeEntries IAntClasspathEntry toArray IAntClasspathEntry defaultAntHomeEntries
Returns the array of UR Ls that is the set of UR Ls defining the Ant classpath return the set of UR Ls defining the Ant classpath deprecated use get Ant Home Classpath Entries and get Tools Jar Entry public URL get AntUR Ls int extra 0 I Ant Classpath Entry entry get Tools Jar Entry if entry null extra URL urls new URL ant Home Entries length extra int i for i 0 i ant Home Entries length i URL url ant Home Entries i get EntryURL if url null urls i url if extra 0 urls i entry get EntryURL return urls  URLs URLs URLs getAntHomeClasspathEntries getToolsJarEntry getAntURLs IAntClasspathEntry getToolsJarEntry antHomeEntries antHomeEntries antHomeEntries getEntryURL getEntryURL
protected List compute Default Tasks List tasks List result new Array List tasks size for Iterator iterator tasks iterator iterator has Next I Configuration Element element I Configuration Element iterator next if relevant Running Headless element continue Task task new Task task set Task Name element get Attribute Ant Core Plugin NAME task set Class Name element get Attribute Ant Core Plugin CLASS configure Ant Object result element task task get Task Name Internal Core Ant Messages get String Ant Core Preferences No library for task NON NLS 1 return result  computeDefaultTasks ArrayList hasNext IConfigurationElement IConfigurationElement relevantRunningHeadless setTaskName getAttribute AntCorePlugin setClassName getAttribute AntCorePlugin configureAntObject getTaskName InternalCoreAntMessages getString AntCorePreferences No_library_for_task
private void addURL To Extra Classpath Entries URL url I Configuration Element element String eclipse Runtime element get Attribute Ant Core Plugin ECLIPSE RUNTIME boolean eclipse Runtime Required true if eclipse Runtime null eclipse Runtime Required Boolean get Boolean eclipse Runtime Iterator itr extra ClasspathUR Ls iterator while itr has Next I Ant Classpath Entry entry I Ant Classpath Entry itr next if entry get EntryURL equals url return Ant Classpath Entry entry new Ant Classpath Entry url entry set Eclipse Runtime Required eclipse Runtime Required extra ClasspathUR Ls add entry  addURLToExtraClasspathEntries IConfigurationElement eclipseRuntime getAttribute AntCorePlugin ECLIPSE_RUNTIME eclipseRuntimeRequired eclipseRuntime eclipseRuntimeRequired getBoolean eclipseRuntime extraClasspathURLs hasNext IAntClasspathEntry IAntClasspathEntry getEntryURL AntClasspathEntry AntClasspathEntry setEclipseRuntimeRequired eclipseRuntimeRequired extraClasspathURLs
protected List compute Default Types List types List result new Array List types size for Iterator iterator types iterator iterator has Next I Configuration Element element I Configuration Element iterator next if relevant Running Headless element continue Type type new Type type set Type Name element get Attribute Ant Core Plugin NAME type set Class Name element get Attribute Ant Core Plugin CLASS configure Ant Object result element type type get Type Name Internal Core Ant Messages get String Ant Core Preferences No library for type NON NLS 1 return result  computeDefaultTypes ArrayList hasNext IConfigurationElement IConfigurationElement relevantRunningHeadless setTypeName getAttribute AntCorePlugin setClassName getAttribute AntCorePlugin configureAntObject getTypeName InternalCoreAntMessages getString AntCorePreferences No_library_for_type
private void configure Ant Object List result I Configuration Element element Ant Object ant Object String object Name String error Message String runtime element get Attribute Ant Core Plugin ECLIPSE RUNTIME if runtime null ant Object set Eclipse Runtime Required Boolean value Of runtime boolean Value String library element get Attribute Ant Core Plugin LIBRARY if library null I Status status new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR LIBRARY NOT SPECIFIED Message Format format Internal Core Ant Messages get String Ant Core Preferences Library not specified for   0  4 new String object Name null NON NLS 1 Ant Core Plugin get Plugin get Log log status return I Plugin Descriptor descriptor element get Declaring Extension get Declaring Plugin Descriptor try ant Object set Plugin Label descriptor get Label URL url Platform as LocalURL new URL descriptor get InstallURL library if new File url get Path exists addURL To Extra Classpath Entries url element result add ant Object add Plugin Class Loader descriptor get Plugin Class Loader ant Object set Library Entry new Ant Classpath Entry url return type specifies a library that does not exist I Status status new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR LIBRARY NOT SPECIFIED Message Format format error Message new String url to External Form descriptor get Label null NON NLS 1 Ant Core Plugin get Plugin get Log log status return catch MalformedURL Exception e if the URL does not have a valid format just log and ignore the exception I Status status new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR MALFORMED URL Internal Core Ant Messages get String Ant Core Preferences Malformed URL  1 e NON NLS 1 Ant Core Plugin get Plugin get Log log status return catch Exception e likely extra classpath entry library that does not exist I Status status new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR LIBRARY NOT SPECIFIED Message Format format Internal Core Ant Messages get String Ant Core Preferences 8 new String descriptor get Label null NON NLS 1 Ant Core Plugin get Plugin get Log log status return  configureAntObject IConfigurationElement AntObject antObject objectName errorMessage getAttribute AntCorePlugin ECLIPSE_RUNTIME antObject setEclipseRuntimeRequired valueOf booleanValue getAttribute AntCorePlugin IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_LIBRARY_NOT_SPECIFIED MessageFormat InternalCoreAntMessages getString AntCorePreferences Library_not_specified_for__ _4 objectName AntCorePlugin getPlugin getLog IPluginDescriptor getDeclaringExtension getDeclaringPluginDescriptor antObject setPluginLabel getLabel asLocalURL getInstallURL getPath addURLToExtraClasspathEntries antObject addPluginClassLoader getPluginClassLoader antObject setLibraryEntry AntClasspathEntry IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_LIBRARY_NOT_SPECIFIED MessageFormat errorMessage toExternalForm getLabel AntCorePlugin getPlugin getLog MalformedURLException IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_MALFORMED_URL InternalCoreAntMessages getString AntCorePreferences Malformed_URL _1 AntCorePlugin getPlugin getLog IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_LIBRARY_NOT_SPECIFIED MessageFormat InternalCoreAntMessages getString AntCorePreferences getLabel AntCorePlugin getPlugin getLog
protected void compute Default Extra Classpath Entries List entries for Iterator iterator entries iterator iterator has Next I Configuration Element element I Configuration Element iterator next if relevant Running Headless element continue String library element get Attribute Ant Core Plugin LIBRARY I Plugin Descriptor descriptor element get Declaring Extension get Declaring Plugin Descriptor try URL url Platform as LocalURL new URL descriptor get InstallURL library if new File url get Path exists addURL To Extra Classpath Entries url element add Plugin Class Loader descriptor get Plugin Class Loader else extra classpath entry that does not exist I Status status new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR LIBRARY NOT SPECIFIED Message Format format Internal Core Ant Messages get String Ant Core Preferences No library for extraClasspathEntry new String url to External Form descriptor get Label null NON NLS 1 Ant Core Plugin get Plugin get Log log status continue catch MalformedURL Exception e if the URL does not have a valid format just log and ignore the exception I Status status new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR MALFORMED URL Internal Core Ant Messages get String Ant Core Preferences Malformed URL  1 e NON NLS 1 Ant Core Plugin get Plugin get Log log status continue catch Exception e likely extra classpath entry that does not exist I Status status new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR LIBRARY NOT SPECIFIED Message Format format Internal Core Ant Messages get String Ant Core Preferences 6 new String descriptor get Label null NON NLS 1 Ant Core Plugin get Plugin get Log log status continue  computeDefaultExtraClasspathEntries hasNext IConfigurationElement IConfigurationElement relevantRunningHeadless getAttribute AntCorePlugin IPluginDescriptor getDeclaringExtension getDeclaringPluginDescriptor asLocalURL getInstallURL getPath addURLToExtraClasspathEntries addPluginClassLoader getPluginClassLoader IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_LIBRARY_NOT_SPECIFIED MessageFormat InternalCoreAntMessages getString AntCorePreferences No_library_for_extraClasspathEntry toExternalForm getLabel AntCorePlugin getPlugin getLog MalformedURLException IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_MALFORMED_URL InternalCoreAntMessages getString AntCorePreferences Malformed_URL _1 AntCorePlugin getPlugin getLog IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_LIBRARY_NOT_SPECIFIED MessageFormat InternalCoreAntMessages getString AntCorePreferences getLabel AntCorePlugin getPlugin getLog
private boolean relevant Running Headless I Configuration Element element if running Headless String headless element get Attribute Ant Core Plugin HEADLESS if headless null boolean headless Property Boolean value Of headless boolean Value if headless Property return false return true  relevantRunningHeadless IConfigurationElement runningHeadless getAttribute AntCorePlugin headlessProperty valueOf booleanValue headlessProperty
private void compute Default Properties List properties default Properties new Array List properties size for Iterator iterator properties iterator iterator has Next I Configuration Element element I Configuration Element iterator next if relevant Running Headless element continue String name element get Attribute Ant Core Plugin NAME if name null continue String value element get Attribute Ant Core Plugin VALUE Property property if value null property new Property name value I Plugin Descriptor descriptor element get Declaring Extension get Declaring Plugin Descriptor property set Plugin Label descriptor get Label else property new Property property set Name name I Plugin Descriptor descriptor element get Declaring Extension get Declaring Plugin Descriptor property set Plugin Label descriptor get Label String class Name element get Attribute Ant Core Plugin CLASS property set Value Provider class Name descriptor get Plugin Class Loader default Properties add property String runtime element get Attribute Ant Core Plugin ECLIPSE RUNTIME if runtime null property set Eclipse Runtime Required Boolean value Of runtime boolean Value  computeDefaultProperties defaultProperties ArrayList hasNext IConfigurationElement IConfigurationElement relevantRunningHeadless getAttribute AntCorePlugin getAttribute AntCorePlugin IPluginDescriptor getDeclaringExtension getDeclaringPluginDescriptor setPluginLabel getLabel setName IPluginDescriptor getDeclaringExtension getDeclaringPluginDescriptor setPluginLabel getLabel className getAttribute AntCorePlugin setValueProvider className getPluginClassLoader defaultProperties getAttribute AntCorePlugin ECLIPSE_RUNTIME setEclipseRuntimeRequired valueOf booleanValue
Returns the I Ant Classpath Entry for the tools jar associated with the path supplied May return code null code if no tools jar is found e g the path points to a JRE install param java Home Path path for Java home return I Ant Classpath Entry tools jar I Ant Classpath Entry or code null code since 3 0 public I Ant Classpath Entry get Tools Jar Entry I Path java Home Path if jre equals Ignore Case java Home Path last Segment NON NLS 1 java Home Path java Home Path remove Last Segments 1 java Home Path java Home Path append lib append tools jar NON NLS 1 NON NLS 2 File tools java Home Path to File if tools exists attempt to find in the older 1 1 java Home Path java Home Path remove Last Segments 1 java Home Path java Home Path append classes zip NON NLS 1 tools java Home Path to File if tools exists return null return new Ant Classpath Entry tools get Absolute Path  IAntClasspathEntry javaHomePath IAntClasspathEntry IAntClasspathEntry IAntClasspathEntry getToolsJarEntry IPath javaHomePath equalsIgnoreCase javaHomePath lastSegment javaHomePath javaHomePath removeLastSegments javaHomePath javaHomePath javaHomePath toFile javaHomePath javaHomePath removeLastSegments javaHomePath javaHomePath javaHomePath toFile AntClasspathEntry getAbsolutePath
Returns the URL for the tools jar associated with the System property java home location If java home has no associated tools jar such as a JRE install the environment variable JAVA HOME is resolved to check for a tools jar May return code null code if no tools jar is found return URL tools jar URL or code null code deprecated use get Tools Jar Entry public URL get Tools JarURL I Path path new Path System get Property java home NON NLS 1 I Ant Classpath Entry entry get Tools Jar Entry path if entry null I Dynamic Variable variable Variables Plugin get Default get String Variable Manager get Dynamic Variable env var NON NLS 1 String java Home null try if variable null java Home variable get Value JAVA HOME NON NLS 1 if java Home null path new Path java Home entry get Tools Jar Entry path catch Core Exception e if entry null return entry get EntryURL return null  JAVA_HOME getToolsJarEntry getToolsJarURL IPath getProperty IAntClasspathEntry getToolsJarEntry IDynamicVariable VariablesPlugin getDefault getStringVariableManager getDynamicVariable env_var javaHome javaHome getValue JAVA_HOME javaHome javaHome getToolsJarEntry CoreException getEntryURL
Returns the code I Ant Classpath Entry code for the tools jar associated with the System property java home location If java home has no associated tools jar such as a JRE install the environment variable JAVA HOME is resolved to check for a tools jar May return code null code if no tools jar is found return I Ant Classpath Entry tools jar I Ant Classpath Entry or code null code public I Ant Classpath Entry get Tools Jar Entry I Path path new Path System get Property java home NON NLS 1 I Ant Classpath Entry entry get Tools Jar Entry path if entry null I Dynamic Variable variable Variables Plugin get Default get String Variable Manager get Dynamic Variable env var NON NLS 1 String java Home null try if variable null java Home variable get Value JAVA HOME NON NLS 1 if java Home null path new Path java Home entry get Tools Jar Entry path catch Core Exception e return entry  IAntClasspathEntry JAVA_HOME IAntClasspathEntry IAntClasspathEntry IAntClasspathEntry getToolsJarEntry IPath getProperty IAntClasspathEntry getToolsJarEntry IDynamicVariable VariablesPlugin getDefault getStringVariableManager getDynamicVariable env_var javaHome javaHome getValue JAVA_HOME javaHome javaHome getToolsJarEntry CoreException
private void add Libraries I Plugin Descriptor source List destination URL root source get InstallURL I Library libraries source get Runtime Libraries for int i 0 i libraries length i try URL url new URL root libraries i get Path to String destination add new Ant Classpath Entry Platform as LocalURL url catch Exception e if the URL does not have a valid format just log and ignore the exception I Status status new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR MALFORMED URL Internal Core Ant Messages get String Ant Core Preferences Malformed URL  1 e NON NLS 1 Ant Core Plugin get Plugin get Log log status  addLibraries IPluginDescriptor getInstallURL ILibrary getRuntimeLibraries getPath toString AntClasspathEntry asLocalURL IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_MALFORMED_URL InternalCoreAntMessages getString AntCorePreferences Malformed_URL _1 AntCorePlugin getPlugin getLog
protected void add Plugin Class Loader Class Loader loader if plugin Class Loaders contains loader plugin Class Loaders add loader  addPluginClassLoader ClassLoader pluginClassLoaders pluginClassLoaders
Returns the list of urls added to the classpath by the extra classpath entries extension point return the list of extra classpath UR Ls public URL get Extra ClasspathUR Ls URL urls new URL extra ClasspathUR Ls size for int i 0 i extra ClasspathUR Ls size i I Ant Classpath Entry entry I Ant Classpath Entry extra ClasspathUR Ls get i urls i entry get EntryURL return urls  URLs getExtraClasspathURLs extraClasspathURLs extraClasspathURLs IAntClasspathEntry IAntClasspathEntry extraClasspathURLs getEntryURL
Returns the list of urls added to the classpath by the extra classpath entries extension point for an Ant build that is occuring without the Eclipse runtime return the list of extra classpath UR Ls since 3 0 public URL get Remote Extra ClasspathUR Ls List urls new Array List extra ClasspathUR Ls size for int i 0 i extra ClasspathUR Ls size i I Ant Classpath Entry entry I Ant Classpath Entry extra ClasspathUR Ls get i if entry is Eclipse Runtime Required urls add entry get EntryURL return URL urls to Array new URL urls size  URLs getRemoteExtraClasspathURLs ArrayList extraClasspathURLs extraClasspathURLs IAntClasspathEntry IAntClasspathEntry extraClasspathURLs isEclipseRuntimeRequired getEntryURL toArray
Returns the entire set of UR Ls that define the Ant runtime classpath Includes the Ant UR Ls the additional UR Ls and extra classpath UR Ls return the entire runtime classpath of UR Ls public URL getUR Ls List result new Array List 60 if ant Home Entries null add EntryUR Ls result ant Home Entries if additional Entries null additional Entries length 0 add EntryUR Ls result additional Entries for int i 0 i extra ClasspathUR Ls size i I Ant Classpath Entry entry I Ant Classpath Entry extra ClasspathUR Ls get i URL url entry get EntryURL if url null result add url return URL result to Array new URL result size  URLs URLs URLs URLs URLs getURLs ArrayList antHomeEntries addEntryURLs antHomeEntries additionalEntries additionalEntries addEntryURLs additionalEntries extraClasspathURLs IAntClasspathEntry IAntClasspathEntry extraClasspathURLs getEntryURL toArray
private void add EntryUR Ls List result I Ant Classpath Entry entries for int i 0 i entries length i I Ant Classpath Entry entry entries i URL url entry get EntryURL if url null result add url  addEntryURLs IAntClasspathEntry IAntClasspathEntry getEntryURL
protected Class Loader get Plugin Class Loaders if ordered Plugin Class Loaders null Iterator class Loaders plugin Class Loaders iterator Map id To Loader new Hash Map plugin Class Loaders size I Plugin Descriptor descriptors new I Plugin Descriptor plugin Class Loaders size int i 0 while class Loaders has Next Plugin Class Loader loader Plugin Class Loader class Loaders next I Plugin Descriptor descriptor loader get Plugin Descriptor id To Loader put descriptor get Unique Identifier loader descriptors i descriptor i String ids compute Prerequisite Order Plugins descriptors ordered Plugin Class Loaders new Class Loader plugin Class Loaders size for int j 0 j ids length j String id ids j ordered Plugin Class Loaders j Class Loader id To Loader get id return ordered Plugin Class Loaders  ClassLoader getPluginClassLoaders orderedPluginClassLoaders classLoaders pluginClassLoaders idToLoader HashMap pluginClassLoaders IPluginDescriptor IPluginDescriptor pluginClassLoaders classLoaders hasNext PluginClassLoader PluginClassLoader classLoaders IPluginDescriptor getPluginDescriptor idToLoader getUniqueIdentifier computePrerequisiteOrderPlugins orderedPluginClassLoaders ClassLoader pluginClassLoaders orderedPluginClassLoaders ClassLoader idToLoader orderedPluginClassLoaders
private String compute Prerequisite Order Plugins I Plugin Descriptor plugins List prereqs new Array List 9 Set plugin List new Hash Set plugins length for int i 0 i plugins length i plugin List add plugins i get Unique Identifier create a collection of directed edges from plugin to prereq for int i 0 i plugins length i boolean boot false boolean runtime false boolean found false I Plugin Prerequisite prereq List plugins i get Plugin Prerequisites if prereq List null for int j 0 j prereq List length j ensure that we only include values from the original set String prereq prereq List j get Unique Identifier boot boot prereq equals Boot Loader PI BOOT runtime runtime prereq equals Platform PI RUNTIME if plugin List contains prereq found true prereqs add new String plugins i get Unique Identifier prereq if we didn t find any prereqs for this plugin add a null prereq to ensure the value is in the output if found prereqs add new String plugins i get Unique Identifier null if we didn t find the boot or runtime plugins as prereqs and they are in the list of plugins to build add prereq relations for them This is required since the boot and runtime are implicitly added to a plugin s requires list by the platform runtime Note that we should skip the xerces plugin as this would cause a circularity if plugins i get Unique Identifier equals org apache xerces NON NLS 1 continue if boot plugin List contains Boot Loader PI BOOT plugins i get Unique Identifier equals Boot Loader PI BOOT prereqs add new String plugins i get Unique Identifier Boot Loader PI BOOT if runtime plugin List contains Platform PI RUNTIME plugins i get Unique Identifier equals Platform PI RUNTIME plugins i get Unique Identifier equals Boot Loader PI BOOT prereqs add new String plugins i get Unique Identifier Platform PI RUNTIME do a topological sort insert the fragments into the sorted elements String prereq Array String prereqs to Array new String prereqs size return compute Node Order prereq Array  computePrerequisiteOrderPlugins IPluginDescriptor ArrayList pluginList HashSet pluginList getUniqueIdentifier IPluginPrerequisite prereqList getPluginPrerequisites prereqList prereqList prereqList getUniqueIdentifier BootLoader PI_BOOT PI_RUNTIME pluginList getUniqueIdentifier getUniqueIdentifier getUniqueIdentifier pluginList BootLoader PI_BOOT getUniqueIdentifier BootLoader PI_BOOT getUniqueIdentifier BootLoader PI_BOOT pluginList PI_RUNTIME getUniqueIdentifier PI_RUNTIME getUniqueIdentifier BootLoader PI_BOOT getUniqueIdentifier PI_RUNTIME prereqArray toArray computeNodeOrder prereqArray
private String compute Node Order String specs Map counts compute Counts specs List nodes new Array List counts size while counts is Empty List roots find Root Nodes counts if roots is Empty break for Iterator i roots iterator i has Next counts remove i next nodes add All roots remove Arcs specs roots counts String result new String nodes size nodes to Array result return result  computeNodeOrder computeCounts ArrayList isEmpty findRootNodes isEmpty hasNext addAll removeArcs toArray
private void remove Arcs String mappings List roots Map counts for Iterator j roots iterator j has Next String root String j next for int i 0 i mappings length i if root equals mappings i 1 String input mappings i 0 Integer count Integer counts get input if count null counts put input new Integer count int Value 1  removeArcs hasNext intValue
private List find Root Nodes Map counts List result new Array List 5 for Iterator i counts key Set iterator i has Next String node String i next int count Integer counts get node int Value if count 0 result add node return result  findRootNodes ArrayList keySet hasNext intValue
private Map compute Counts String mappings Map counts new Hash Map 5 for int i 0 i mappings length i String from mappings i 0 Integer from Count Integer counts get from String to mappings i 1 if to null counts put from new Integer 0 else if Integer counts get to null counts put to new Integer 0 from Count from Count null new Integer 1 new Integer from Count int Value 1 counts put from from Count return counts  computeCounts HashMap fromCount fromCount fromCount fromCount intValue fromCount
private void initialize Plugin Class Loaders plugin Class Loaders new Array List 10 ant core should always be present plugin Class Loaders add Platform get Plugin Ant Core Plugin PI ANTCORE get Descriptor get Plugin Class Loader  initializePluginClassLoaders pluginClassLoaders ArrayList pluginClassLoaders getPlugin AntCorePlugin PI_ANTCORE getDescriptor getPluginClassLoader
Returns the default and custom tasks return the list of default and custom tasks public List get Tasks List result new Array List 10 if default Tasks null default Tasks is Empty result add All default Tasks if custom Tasks null custom Tasks length 0 result add All Arrays as List custom Tasks return result  getTasks ArrayList defaultTasks defaultTasks isEmpty addAll defaultTasks customTasks customTasks addAll asList customTasks
Returns the default and custom tasks that are relavent when there is no Eclipse runtime context an Ant build in a separate VM return the list of default and custom tasks public List get Remote Tasks List result new Array List 10 if default Tasks null default Tasks is Empty Iterator iter default Tasks iterator while iter has Next Task task Task iter next if task is Eclipse Runtime Required result add task if custom Tasks null custom Tasks length 0 result add All Arrays as List custom Tasks return result  getRemoteTasks ArrayList defaultTasks defaultTasks isEmpty defaultTasks hasNext isEclipseRuntimeRequired customTasks customTasks addAll asList customTasks
Returns the user defined custom tasks return the user defined tasks public Task get Custom Tasks return custom Tasks  getCustomTasks customTasks
Returns the user defined custom types return the user defined types public Type get Custom Types return custom Types  getCustomTypes customTypes
Returns the custom user properties specified for Ant builds return the properties defined for Ant builds public Property get Custom Properties return custom Properties  getCustomProperties customProperties
Returns the default and custom properties return the list of default and custom properties since 3 0 public List get Properties List result new Array List 10 if default Properties null default Properties is Empty result add All default Properties if custom Properties null custom Properties length 0 result add All Arrays as List custom Properties return result  getProperties ArrayList defaultProperties defaultProperties isEmpty addAll defaultProperties customProperties customProperties addAll asList customProperties
Returns the default and custom properties that are relavent when there is no Eclipse runtime context Ant build in a separate VM return the list of default and custom properties since 3 0 public List get Remote Ant Properties List result new Array List 10 if default Properties null default Properties is Empty Iterator iter default Properties iterator while iter has Next Property property Property iter next if property is Eclipse Runtime Required result add property if custom Properties null custom Properties length 0 result add All Arrays as List custom Properties return result  getRemoteAntProperties ArrayList defaultProperties defaultProperties isEmpty defaultProperties hasNext isEclipseRuntimeRequired customProperties customProperties addAll asList customProperties
Returns the custom property files specified for Ant builds performing any required string substition if indicated param perform String Substition whether or not to perform the string subsitution on the property file strings return the property files defined for Ant builds since 3 0 public String get Custom Property Files boolean perform String Substition if perform String Substition custom Property Files null custom Property Files length 0 return custom Property Files List files new Array List custom Property Files length for int i 0 i custom Property Files length i String filename custom Property Files i try filename Variables Plugin get Default get String Variable Manager perform String Substitution filename files add filename catch Core Exception e notify the user via the Ant console of the missing file files add filename return String files to Array new String files size  performStringSubstition getCustomPropertyFiles performStringSubstition performStringSubstition customPropertyFiles customPropertyFiles customPropertyFiles ArrayList customPropertyFiles customPropertyFiles customPropertyFiles VariablesPlugin getDefault getStringVariableManager performStringSubstitution CoreException toArray
Returns the custom property files specified for Ant builds return the property files defined for Ant builds public String get Custom Property Files return get Custom Property Files true  getCustomPropertyFiles getCustomPropertyFiles
Returns the custom UR Ls specified for the Ant classpath return the urls defining the Ant classpath deprecated public URL get CustomUR Ls URL urls new URL additional Entries length int i for i 0 i additional Entries length i URL url additional Entries i get EntryURL if url null urls i url return urls  URLs getCustomURLs additionalEntries additionalEntries additionalEntries getEntryURL
Sets the user defined custom tasks To commit the changes update Plugin Preferences must be called param tasks public void set Custom Tasks Task tasks old Custom Tasks custom Tasks custom Tasks tasks  updatePluginPreferences setCustomTasks oldCustomTasks customTasks customTasks
Sets the user defined custom types To commit the changes update Plugin Preferences must be called param types The custom types public void set Custom Types Type types old Custom Types custom Types custom Types types  updatePluginPreferences setCustomTypes oldCustomTypes customTypes customTypes
Sets the custom UR Ls specified for the Ant classpath To commit the changes update Plugin Preferences must be called param urls the urls defining the Ant classpath deprecated use set Additional Entries I Ant Classpath Entry public void set CustomUR Ls URL urls additional Entries new I Ant Classpath Entry urls length for int i 0 i urls length i URL url urls i I Ant Classpath Entry entry new Ant Classpath Entry url additional Entries i entry  URLs updatePluginPreferences setAdditionalEntries IAntClasspathEntry setCustomURLs additionalEntries IAntClasspathEntry IAntClasspathEntry AntClasspathEntry additionalEntries
Sets the Ant UR Ls specified for the Ant classpath To commit the changes update Plugin Preferences must be called param urls the urls defining the Ant classpath deprecated use set Ant Home Entires I Ant Classpath Entry public void set AntUR Ls URL urls ant Home Entries new I Ant Classpath Entry urls length for int i 0 i urls length i URL url urls i I Ant Classpath Entry entry new Ant Classpath Entry url ant Home Entries i entry  URLs updatePluginPreferences setAntHomeEntires IAntClasspathEntry setAntURLs antHomeEntries IAntClasspathEntry IAntClasspathEntry AntClasspathEntry antHomeEntries
Sets the custom property files specified for Ant builds To commit the changes update Plugin Preferences must be called param paths the absolute paths defining the property files to use public void set Custom Property Files String paths custom Property Files paths  updatePluginPreferences setCustomPropertyFiles customPropertyFiles
Sets the custom user properties specified for Ant builds To commit the changes update Plugin Preferences must be called param properties the properties defining the Ant properties public void set Custom Properties Property properties old Custom Properties custom Properties custom Properties properties  updatePluginPreferences setCustomProperties oldCustomProperties customProperties customProperties
Returns the default and custom types return all of the defined types public List get Types List result new Array List 10 if default Types null default Types is Empty result add All default Types if custom Types null custom Types length 0 result add All Arrays as List custom Types return result  getTypes ArrayList defaultTypes defaultTypes isEmpty addAll defaultTypes customTypes customTypes addAll asList customTypes
Returns the default and custom types that are relavent when there is no Eclipse runtime context an Ant build in a separate VM return the list of default and custom types public List get Remote Types List result new Array List 10 if default Types null default Types is Empty Iterator iter default Types iterator while iter has Next Type type Type iter next if type is Eclipse Runtime Required result add type if custom Types null custom Types length 0 result add All Arrays as List custom Types return result  getRemoteTypes ArrayList defaultTypes defaultTypes isEmpty defaultTypes hasNext isEclipseRuntimeRequired customTypes customTypes addAll asList customTypes
Returns the default types defined via the type extension point return all of the default types public List get Default Types List result new Array List 10 if default Types null default Types is Empty result add All default Types return result  getDefaultTypes ArrayList defaultTypes defaultTypes isEmpty addAll defaultTypes
Returns the default tasks defined via the task extension point return all of the default tasks public List get Default Tasks List result new Array List 10 if default Tasks null default Tasks is Empty result add All default Tasks return result  getDefaultTasks ArrayList defaultTasks defaultTasks isEmpty addAll defaultTasks
Returns the default properties defined via the properties extension point return all of the default properties since 3 0 public List get Default Properties List result new Array List 10 if default Properties null default Properties is Empty result add All default Properties return result  getDefaultProperties ArrayList defaultProperties defaultProperties isEmpty addAll defaultProperties
protected String get Array From String String list String separator NON NLS 1 if list null list trim equals NON NLS 1 return new String 0 Array List result new Array List for String Tokenizer tokens new String Tokenizer list separator tokens has More Tokens String token tokens next Token trim if token equals NON NLS 1 result add token return String result to Array new String result size  getArrayFromString ArrayList ArrayList StringTokenizer StringTokenizer hasMoreTokens nextToken toArray
Updates the underlying plugin preferences to the current state public void update Plugin Preferences Preferences prefs Ant Core Plugin get Plugin get Plugin Preferences prefs remove Property Change Listener this update Tasks prefs update Types prefs update Ant Home Entries prefs update Additional Entries prefs update Properties prefs update Property Files prefs boolean classpath Changed Ant Core Plugin get Plugin get Plugin Preferences needs Saving Ant Core Plugin get Plugin save Plugin Preferences if classpath Changed prefs set Value I Ant Core Constants PREFERENCE CLASSPATH CHANGED true prefs set Value I Ant Core Constants PREFERENCE CLASSPATH CHANGED false prefs add Property Change Listener this  updatePluginPreferences AntCorePlugin getPlugin getPluginPreferences removePropertyChangeListener updateTasks updateTypes updateAntHomeEntries updateAdditionalEntries updateProperties updatePropertyFiles classpathChanged AntCorePlugin getPlugin getPluginPreferences needsSaving AntCorePlugin getPlugin savePluginPreferences classpathChanged setValue IAntCoreConstants PREFERENCE_CLASSPATH_CHANGED setValue IAntCoreConstants PREFERENCE_CLASSPATH_CHANGED addPropertyChangeListener
protected void update Tasks Preferences prefs if old Custom Tasks null for int i 0 i old Custom Tasks length i Task old Task old Custom Tasks i prefs set To Default I Ant Core Constants PREFIX TASK old Task get Task Name old Custom Tasks null if custom Tasks length 0 prefs set Value I Ant Core Constants PREFERENCE TASKS NON NLS 1 return String Buffer tasks new String Buffer for int i 0 i custom Tasks length i tasks append custom Tasks i get Task Name tasks append prefs set Value I Ant Core Constants PREFIX TASK custom Tasks i get Task Name custom Tasks i get Class Name custom Tasks i get Library Entry get Label NON NLS 1 prefs set Value I Ant Core Constants PREFERENCE TASKS tasks to String  updateTasks oldCustomTasks oldCustomTasks oldTask oldCustomTasks setToDefault IAntCoreConstants PREFIX_TASK oldTask getTaskName oldCustomTasks customTasks setValue IAntCoreConstants PREFERENCE_TASKS StringBuffer StringBuffer customTasks customTasks getTaskName setValue IAntCoreConstants PREFIX_TASK customTasks getTaskName customTasks getClassName customTasks getLibraryEntry getLabel setValue IAntCoreConstants PREFERENCE_TASKS toString
protected void update Types Preferences prefs if old Custom Types null for int i 0 i old Custom Types length i Type old Type old Custom Types i prefs set To Default I Ant Core Constants PREFIX TYPE old Type get Type Name old Custom Types null if custom Types length 0 prefs set Value I Ant Core Constants PREFERENCE TYPES NON NLS 1 return String Buffer types new String Buffer for int i 0 i custom Types length i types append custom Types i get Type Name types append prefs set Value I Ant Core Constants PREFIX TYPE custom Types i get Type Name custom Types i get Class Name custom Types i get Library Entry get Label NON NLS 1 prefs set Value I Ant Core Constants PREFERENCE TYPES types to String  updateTypes oldCustomTypes oldCustomTypes oldType oldCustomTypes setToDefault IAntCoreConstants PREFIX_TYPE oldType getTypeName oldCustomTypes customTypes setValue IAntCoreConstants PREFERENCE_TYPES StringBuffer StringBuffer customTypes customTypes getTypeName setValue IAntCoreConstants PREFIX_TYPE customTypes getTypeName customTypes getClassName customTypes getLibraryEntry getLabel setValue IAntCoreConstants PREFERENCE_TYPES toString
protected void update Properties Preferences prefs if old Custom Properties null for int i 0 i old Custom Properties length i Property old Property old Custom Properties i prefs set To Default I Ant Core Constants PREFIX PROPERTY old Property get Name old Custom Properties null if custom Properties length 0 prefs set Value I Ant Core Constants PREFERENCE PROPERTIES NON NLS 1 return String Buffer properties new String Buffer for int i 0 i custom Properties length i properties append custom Properties i get Name properties append prefs set Value I Ant Core Constants PREFIX PROPERTY custom Properties i get Name custom Properties i get Value false NON NLS 1 prefs set Value I Ant Core Constants PREFERENCE PROPERTIES properties to String  updateProperties oldCustomProperties oldCustomProperties oldProperty oldCustomProperties setToDefault IAntCoreConstants PREFIX_PROPERTY oldProperty getName oldCustomProperties customProperties setValue IAntCoreConstants PREFERENCE_PROPERTIES StringBuffer StringBuffer customProperties customProperties getName setValue IAntCoreConstants PREFIX_PROPERTY customProperties getName customProperties getValue setValue IAntCoreConstants PREFERENCE_PROPERTIES toString
protected void update Additional Entries Preferences prefs prefs set Value urls old constant removed NON NLS 1 NON NLS 2 String serialized null I Ant Classpath Entry tools Jar Entry get Tools Jar Entry if additional Entries length 1 tools Jar Entry null additional Entries 0 get Label equals tools Jar Entry get Label serialized NON NLS 1 else String Buffer entries new String Buffer for int i 0 i additional Entries length i entries append additional Entries i get Label entries append serialized entries to String prefs set Value I Ant Core Constants PREFERENCE ADDITIONAL ENTRIES serialized String pref Ant Home NON NLS 1 if ant Home null ant Home equals get Default Ant Home pref Ant Home ant Home prefs set Value I Ant Core Constants PREFERENCE ANT HOME pref Ant Home  updateAdditionalEntries setValue IAntClasspathEntry toolsJarEntry getToolsJarEntry additionalEntries toolsJarEntry additionalEntries getLabel toolsJarEntry getLabel StringBuffer StringBuffer additionalEntries additionalEntries getLabel toString setValue IAntCoreConstants PREFERENCE_ADDITIONAL_ENTRIES prefAntHome antHome antHome getDefaultAntHome prefAntHome antHome setValue IAntCoreConstants PREFERENCE_ANT_HOME prefAntHome
protected void update Ant Home Entries Preferences prefs prefs set Value ant urls old constant removed NON NLS 1 NON NLS 2 see if the custom entries are just the default entries I Ant Classpath Entry default Entries get Default Ant Home Entries boolean dflt false if default Entries length ant Home Entries length dflt true for int i 0 i ant Home Entries length i if ant Home Entries i equals default Entries i dflt false break if dflt always want to recalculate the default Ant urls to pick up any changes in the default Ant classpath prefs set Value I Ant Core Constants PREFERENCE ANT HOME ENTRIES NON NLS 1 return String Buffer entries new String Buffer for int i 0 i ant Home Entries length i entries append ant Home Entries i get Label entries append prefs set Value I Ant Core Constants PREFERENCE ANT HOME ENTRIES entries to String  updateAntHomeEntries setValue ant_urls IAntClasspathEntry defaultEntries getDefaultAntHomeEntries defaultEntries antHomeEntries antHomeEntries antHomeEntries defaultEntries setValue IAntCoreConstants PREFERENCE_ANT_HOME_ENTRIES StringBuffer StringBuffer antHomeEntries antHomeEntries getLabel setValue IAntCoreConstants PREFERENCE_ANT_HOME_ENTRIES toString
protected void update Property Files Preferences prefs String Buffer files new String Buffer for int i 0 i custom Property Files length i files append custom Property Files i files append prefs set Value I Ant Core Constants PREFERENCE PROPERTY FILES files to String  updatePropertyFiles StringBuffer StringBuffer customPropertyFiles customPropertyFiles setValue IAntCoreConstants PREFERENCE_PROPERTY_FILES toString
Sets the string that defines the Ant home set by the user May be set to code null code param ant Home the fully qualified path to Ant home public void set Ant Home String ant Home this ant Home ant Home  antHome setAntHome antHome antHome antHome
Returns the string that defines the Ant home set by the user or the location of the Eclipse Ant plugin if Ant home has not been specifically set by the user Can return code null code return the fully qualified path to Ant home public String get Ant Home return ant Home  getAntHome antHome
Returns the set of classpath entries that compose the libraries added to the Ant runtime classpath from the Ant home location return the set of ant home classpath entries since 3 0 public I Ant Classpath Entry get Ant Home Classpath Entries return ant Home Entries  IAntClasspathEntry getAntHomeClasspathEntries antHomeEntries
Returns the set of classpath entries that the user has added to the Ant runtime classpath return the set of user classpath entries since 3 0 public I Ant Classpath Entry get Additional Classpath Entries return additional Entries  IAntClasspathEntry getAdditionalClasspathEntries additionalEntries
Sets the set of classpath entries that compose the libraries added to the Ant runtime classpath from the Ant home location param entries the set of ant home classpath entries since 3 0 public void set Ant Home Classpath Entries I Ant Classpath Entry entries ant Home Entries entries  setAntHomeClasspathEntries IAntClasspathEntry antHomeEntries
Sets the set of classpath entries that the user has added to the Ant runtime classpath param entries the set of user classpath entries since 3 0 public void set Additional Classpath Entries I Ant Classpath Entry entries additional Entries entries  setAdditionalClasspathEntries IAntClasspathEntry additionalEntries
Returns the list of UR Ls to added to the classpath for an Ant build that is occuring without the Eclipse runtime return the list of classpath entries since 3 0 public URL get Remote AntUR Ls List result new Array List 40 if ant Home Entries null for int i 0 i ant Home Entries length i I Ant Classpath Entry entry ant Home Entries i result add entry get EntryURL if additional Entries null additional Entries length 0 for int i 0 i additional Entries length i I Ant Classpath Entry entry additional Entries i result add entry get EntryURL if extra ClasspathUR Ls null for int i 0 i extra ClasspathUR Ls size i I Ant Classpath Entry entry I Ant Classpath Entry extra ClasspathUR Ls get i if entry is Eclipse Runtime Required result add entry get EntryURL return URL result to Array new URL result size  URLs getRemoteAntURLs ArrayList antHomeEntries antHomeEntries IAntClasspathEntry antHomeEntries getEntryURL additionalEntries additionalEntries additionalEntries IAntClasspathEntry additionalEntries getEntryURL extraClasspathURLs extraClasspathURLs IAntClasspathEntry IAntClasspathEntry extraClasspathURLs isEclipseRuntimeRequired getEntryURL toArray
Returns all contributed classpath entries via the code extra Classpath Entries code extension point return all contributed classpath entries via the code extra Classpath Entries code extension point since 3 0 public I Ant Classpath Entry get Contributed Classpath Entries return I Ant Classpath Entry extra ClasspathUR Ls to Array new I Ant Classpath Entry extra ClasspathUR Ls size  extraClasspathEntries extraClasspathEntries IAntClasspathEntry getContributedClasspathEntries IAntClasspathEntry extraClasspathURLs toArray IAntClasspathEntry extraClasspathURLs

Sets the build file location on the file system param build File Location the file system location of the build file public void set Build File Location String build File Location if build File Location null this build File Location I Ant Core Constants DEFAULT BUILD FILENAME else this build File Location build File Location  buildFileLocation setBuildFileLocation buildFileLocation buildFileLocation buildFileLocation IAntCoreConstants DEFAULT_BUILD_FILENAME buildFileLocation buildFileLocation
Set the message output level p Valid values are ul li code org apache tools ant Project ERR code li code org apache tools ant Project WARN code li code org apache tools ant Project INFO code li code org apache tools ant Project VERBOSE code or li code org apache tools ant Project DEBUG code ul param level the message output level public void set Message Output Level int level message Output Level level  setMessageOutputLevel messageOutputLevel
Sets the arguments to be passed to the build e g Dos win32 Dws win32 verbose param arguments the arguments to be passed to the build public void set Arguments String arguments this arguments get Array arguments  setArguments getArray
private String get Array String args String Buffer sb new String Buffer boolean waiting For Quote false Array List result new Array List for String Tokenizer tokens new String Tokenizer args true tokens has More Tokens NON NLS 1 String token tokens next Token if waiting For Quote if token equals NON NLS 1 result add sb to String sb set Length 0 waiting For Quote false else sb append token else if token equals NON NLS 1 test if we have something like Dproperty value if result size 0 int index result size 1 String last String result get index if last char At last length 1 result remove index sb append last waiting For Quote true else if token equals token equals NON NLS 1 NON NLS 2 result add token return String result to Array new String result size  getArray StringBuffer StringBuffer waitingForQuote ArrayList ArrayList StringTokenizer StringTokenizer hasMoreTokens nextToken waitingForQuote toString setLength waitingForQuote charAt waitingForQuote toArray
Sets the arguments to be passed to the build e g Dos win32 Dws win32 verbose param arguments the arguments to be passed to the build since 2 1 public void set Arguments String arguments this arguments arguments  setArguments
Sets the targets and execution order param execution Targets which targets should be run and in which order public void set Execution Targets String execution Targets this targets execution Targets  executionTargets setExecutionTargets executionTargets executionTargets
Adds a build listener The parameter code class Name code is the class name of a code org apache tools ant Build Listener code implementation The class will be instantiated at runtime and the listener will be called on build events code org apache tools ant Build Event code param class Name a build listener class name public void add Build Listener String class Name if class Name null return if build Listeners null build Listeners new Array List 5 build Listeners add class Name  className BuildListener BuildEvent className addBuildListener className className buildListeners buildListeners ArrayList buildListeners className
Sets the build logger The parameter code class Name code is the class name of a code org apache tools ant Build Logger code implementation The class will be instantiated at runtime and the logger will be called on build events code org apache tools ant Build Event code Only one build logger is permitted for any build param class Name a build logger class name public void add Build Logger String class Name build Logger Class Name class Name  className BuildLogger BuildEvent className addBuildLogger className buildLoggerClassName className
Adds user defined properties Keys and values must be String objects param properties a Map of user defined properties public void add User Properties Map properties user Properties properties  addUserProperties userProperties
Returns the buildfile target information return an array containing the target information see Target Info since 2 1 throws Core Exception Thrown if problem is encountered determining the targets public synchronized Target Info get Available Targets throws Core Exception Class class Internal Ant Runner null Object runner null Class Loader original Class Loader Thread current Thread get Context Class Loader try class Internal Ant Runner get Internal Ant Runner runner class Internal Ant Runner new Instance basic Configure class Internal Ant Runner runner get the info for each targets Method get Targets class Internal Ant Runner get Method get Targets null NON NLS 1 Object results get Targets invoke runner null get the default target Method get Default class Internal Ant Runner get Method get Default Target null NON NLS 1 String default Name String get Default invoke runner null collect the info into target objects List infos List results Project Info project new Project Info String infos remove 0 String infos remove 0 int i 0 Iterator iter infos iterator Target Info target Info new Target Info infos size List info while iter has Next info List iter next target Info i new Target Info project String info get 0 String info get 1 String info get 2 info get 0 equals default Name return target Info catch No Class Def Found Error e problem Loading Class e not possible to reach this line return new Target Info 0 catch Class Not Found Exception e problem Loading Class e not possible to reach this line return new Target Info 0 catch Invocation Target Exception e handle Invocation Target Exception runner class Internal Ant Runner e not possible to reach this line return new Target Info 0 catch Exception e String message e get Message null Internal Core Ant Messages get String Ant Runner Build Failed  3 e get Message NON NLS 1 throw new Core Exception new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR RUNNING BUILD message e finally Thread current Thread set Context Class Loader original Class Loader  TargetInfo CoreException TargetInfo getAvailableTargets CoreException classInternalAntRunner ClassLoader originalClassLoader currentThread getContextClassLoader classInternalAntRunner getInternalAntRunner classInternalAntRunner newInstance basicConfigure classInternalAntRunner getTargets classInternalAntRunner getMethod getTargets getTargets getDefault classInternalAntRunner getMethod getDefaultTarget defaultName getDefault ProjectInfo ProjectInfo TargetInfo targetInfo TargetInfo hasNext targetInfo TargetInfo defaultName targetInfo NoClassDefFoundError problemLoadingClass TargetInfo ClassNotFoundException problemLoadingClass TargetInfo InvocationTargetException handleInvocationTargetException classInternalAntRunner TargetInfo getMessage InternalCoreAntMessages getString AntRunner Build_Failed _3 getMessage CoreException IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_RUNNING_BUILD currentThread setContextClassLoader originalClassLoader
private void basic Configure Class class Internal Ant Runner Object runner throws No Such Method Exception Illegal Access Exception Invocation Target Exception Method set Build File Location class Internal Ant Runner get Method set Build File Location new Class String class NON NLS 1 set Build File Location invoke runner new Object build File Location if ant Home null Method set Ant Home class Internal Ant Runner get Method set Ant Home new Class String class NON NLS 1 set Ant Home invoke runner new Object ant Home set Properties runner class Internal Ant Runner if arguments null arguments length 0 Method set Arguments class Internal Ant Runner get Method set Arguments new Class String class NON NLS 1 set Arguments invoke runner new Object arguments  basicConfigure classInternalAntRunner NoSuchMethodException IllegalAccessException InvocationTargetException setBuildFileLocation classInternalAntRunner getMethod setBuildFileLocation setBuildFileLocation buildFileLocation antHome setAntHome classInternalAntRunner getMethod setAntHome setAntHome antHome setProperties classInternalAntRunner setArguments classInternalAntRunner getMethod setArguments setArguments
Runs the build file If a progress monitor is specified it will be available during the script execution as a reference in the Ant Project code org apache tools ant Project get References code A long running task could for example get the monitor during its execution and check for cancellation The key value to retrieve the progress monitor instance is code Ant Core Plugin ECLIPSE PROGRESS MONITOR code Only one build can occur at any given time Sets the current threads context class loader to the Ant Class Loader for the duration of the build param monitor a progress monitor or code null code if progress reporting and cancellation are not desired throws Core Exception Thrown if a build is already occuring or if an exception occurs during the build public void run I Progress Monitor monitor throws Core Exception if build Running I Status status new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR RUNNING BUILD Message Format format Internal Core Ant Messages get String Ant Runner Already in progess new String build File Location null NON NLS 1 throw new Core Exception status build Running true Object runner null Class class Internal Ant Runner null Class Loader original Class Loader Thread current Thread get Context Class Loader try class Internal Ant Runner get Internal Ant Runner runner class Internal Ant Runner new Instance set build file Method set Build File Location class Internal Ant Runner get Method set Build File Location new Class String class NON NLS 1 set Build File Location invoke runner new Object build File Location set the custom classpath if custom Classpath null Method set Custom Classpath class Internal Ant Runner get Method set Custom Classpath new Class URL class NON NLS 1 set Custom Classpath invoke runner new Object custom Classpath add listeners if build Listeners null Method add Build Listeners class Internal Ant Runner get Method add Build Listeners new Class List class NON NLS 1 add Build Listeners invoke runner new Object build Listeners if build Logger Class Name null indicate that the default logger is not to be used build Logger Class Name NON NLS 1 add build logger Method add Build Logger class Internal Ant Runner get Method add Build Logger new Class String class NON NLS 1 add Build Logger invoke runner new Object build Logger Class Name if input Handler Class Name null add the input handler Method set Input Handler class Internal Ant Runner get Method set Input Handler new Class String class NON NLS 1 set Input Handler invoke runner new Object input Handler Class Name basic Configure class Internal Ant Runner runner add progress monitor if monitor null Method set Progress Monitor class Internal Ant Runner get Method set Progress Monitor new Class I Progress Monitor class NON NLS 1 set Progress Monitor invoke runner new Object monitor set message output level if message Output Level 2 changed from the default Project MSG INFO Method set Message Output Level class Internal Ant Runner get Method set Message Output Level new Class int class NON NLS 1 set Message Output Level invoke runner new Object new Integer message Output Level set execution targets if targets null Method set Execution Targets class Internal Ant Runner get Method set Execution Targets new Class String class NON NLS 1 set Execution Targets invoke runner new Object targets run Method run class Internal Ant Runner get Method run null NON NLS 1 run invoke runner null catch No Class Def Found Error e problem Loading Class e catch Class Not Found Exception e problem Loading Class e catch Invocation Target Exception e handle Invocation Target Exception runner class Internal Ant Runner e catch Exception e String message e get Message null Internal Core Ant Messages get String Ant Runner Build Failed  3 e get Message NON NLS 1 I Status status new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR RUNNING BUILD message e throw new Core Exception status finally build Running false Thread current Thread set Context Class Loader original Class Loader  getReferences AntCorePlugin ECLIPSE_PROGRESS_MONITOR AntClassLoader CoreException IProgressMonitor CoreException buildRunning IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_RUNNING_BUILD MessageFormat InternalCoreAntMessages getString AntRunner Already_in_progess buildFileLocation CoreException buildRunning classInternalAntRunner ClassLoader originalClassLoader currentThread getContextClassLoader classInternalAntRunner getInternalAntRunner classInternalAntRunner newInstance setBuildFileLocation classInternalAntRunner getMethod setBuildFileLocation setBuildFileLocation buildFileLocation customClasspath setCustomClasspath classInternalAntRunner getMethod setCustomClasspath setCustomClasspath customClasspath buildListeners addBuildListeners classInternalAntRunner getMethod addBuildListeners addBuildListeners buildListeners buildLoggerClassName buildLoggerClassName addBuildLogger classInternalAntRunner getMethod addBuildLogger addBuildLogger buildLoggerClassName inputHandlerClassName setInputHandler classInternalAntRunner getMethod setInputHandler setInputHandler inputHandlerClassName basicConfigure classInternalAntRunner setProgressMonitor classInternalAntRunner getMethod setProgressMonitor IProgressMonitor setProgressMonitor messageOutputLevel MSG_INFO setMessageOutputLevel classInternalAntRunner getMethod setMessageOutputLevel setMessageOutputLevel messageOutputLevel setExecutionTargets classInternalAntRunner getMethod setExecutionTargets setExecutionTargets classInternalAntRunner getMethod NoClassDefFoundError problemLoadingClass ClassNotFoundException problemLoadingClass InvocationTargetException handleInvocationTargetException classInternalAntRunner getMessage InternalCoreAntMessages getString AntRunner Build_Failed _3 getMessage IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_RUNNING_BUILD CoreException buildRunning currentThread setContextClassLoader originalClassLoader
private Class get Internal Ant Runner throws Class Not Found Exception Class Loader loader get Class Loader Thread current Thread set Context Class Loader loader return loader load Class org eclipse ant internal core ant Internal Ant Runner NON NLS 1  getInternalAntRunner ClassNotFoundException ClassLoader getClassLoader currentThread setContextClassLoader loadClass InternalAntRunner
private void set Properties Object runner Class class Internal Ant Runner throws No Such Method Exception Illegal Access Exception Invocation Target Exception add properties if user Properties null Method add User Properties class Internal Ant Runner get Method add User Properties new Class Map class NON NLS 1 add User Properties invoke runner new Object user Properties add property files if property Files null Method add Property Files class Internal Ant Runner get Method add Property Files new Class String class NON NLS 1 add Property Files invoke runner new Object property Files  setProperties classInternalAntRunner NoSuchMethodException IllegalAccessException InvocationTargetException userProperties addUserProperties classInternalAntRunner getMethod addUserProperties addUserProperties userProperties propertyFiles addPropertyFiles classInternalAntRunner getMethod addPropertyFiles addPropertyFiles propertyFiles
protected void handle Invocation Target Exception Object runner Class class Internal Ant Runner Invocation Target Exception e throws Core Exception Throwable real Exception e get Target Exception if real Exception instanceof Operation Canceled Exception return String message null if runner null try Method get Build Error Message class Internal Ant Runner get Method get Build Exception Error Message new Class Throwable class NON NLS 1 message String get Build Error Message invoke runner new Object real Exception catch Exception ex do nothing as already in error state J9 throws No Class Def Found Error nested in a Invocation Target Exception if message null real Exception instanceof No Class Def Found Error real Exception instanceof Class Not Found Exception problem Loading Class real Exception return boolean internal Error false if message null error did not result from a Build Exception internal Error true message real Exception get Message null Internal Core Ant Messages get String Ant Runner Build Failed  3 real Exception get Message NON NLS 1 I Status status new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR RUNNING BUILD message real Exception if internal Error Ant Core Plugin get Plugin get Log log status throw new Core Exception status  handleInvocationTargetException classInternalAntRunner InvocationTargetException CoreException realException getTargetException realException OperationCanceledException getBuildErrorMessage classInternalAntRunner getMethod getBuildExceptionErrorMessage getBuildErrorMessage realException NoClassDefFoundError InvocationTargetException realException NoClassDefFoundError realException ClassNotFoundException problemLoadingClass realException internalError BuildException internalError realException getMessage InternalCoreAntMessages getString AntRunner Build_Failed _3 realException getMessage IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_RUNNING_BUILD realException internalError AntCorePlugin getPlugin getLog CoreException
protected void problem Loading Class Throwable e throws Core Exception String missing Class Name e get Message String message if missing Class Name null missing Class Name missing Class Name replace message Internal Core Ant Messages get String Ant Runner Could not find one or more classes  Please check the Ant classpath  2 NON NLS 1 message Message Format format message new String missing Class Name else message Internal Core Ant Messages get String Ant Runner Could not find one or more classes  Please check the Ant classpath  1 NON NLS 1 I Status status new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR RUNNING BUILD message e Ant Core Plugin get Plugin get Log log status throw new Core Exception status  problemLoadingClass CoreException missingClassName getMessage missingClassName missingClassName missingClassName InternalCoreAntMessages getString AntRunner Could_not_find_one_or_more_classes _Please_check_the_Ant_classpath _2 MessageFormat missingClassName InternalCoreAntMessages getString AntRunner Could_not_find_one_or_more_classes _Please_check_the_Ant_classpath _1 IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_RUNNING_BUILD AntCorePlugin getPlugin getLog CoreException
Runs the build file throws Core Exception Thrown if a build is already occuring or if an exception occurs during the build public void run throws Core Exception run I Progress Monitor null  CoreException CoreException IProgressMonitor
Invokes the building of a project object and executes a build using either a given target or the default target This method is called when running Eclipse headless and specifying code org eclipse ant core ant Runner code as the application Sets the current threads context class loader to the Ant Class Loader for the duration of the build param arg Array the command line arguments exception Exception if a problem occurred during the buildfile execution return an exit object code EXIT OK code indicating normal termination if no exception occurs see org eclipse core boot I Platform Runnable run java lang Object public Object run Object arg Array throws Exception Class Loader original Class Loader Thread current Thread get Context Class Loader try set the preferences for headless mode Ant Core Plugin get Plugin set Running Headless true Add debug information if necessary fix for bug 5672 Since the platform parses the debug command line arg and removes it from the args passed to the applications we have to check if Eclipse is in debug mode in order to forward the debug argument to Ant if Boot Loader in Debug Mode String args String arg Array String new Args new String args length 1 for int i 0 i args length i new Args i args i new Args args length debug NON NLS 1 arg Array new Args Class Loader loader get Class Loader Thread current Thread set Context Class Loader loader Class class Internal Ant Runner loader load Class org eclipse ant internal core ant Internal Ant Runner NON NLS 1 Object runner class Internal Ant Runner new Instance Method run class Internal Ant Runner get Method run new Class Object class NON NLS 1 run invoke runner new Object arg Array finally Thread current Thread set Context Class Loader original Class Loader return EXIT OK  antRunner AntClassLoader argArray EXIT_OK IPlatformRunnable argArray ClassLoader originalClassLoader currentThread getContextClassLoader AntCorePlugin getPlugin setRunningHeadless BootLoader inDebugMode argArray newArgs newArgs newArgs argArray newArgs ClassLoader getClassLoader currentThread setContextClassLoader classInternalAntRunner loadClass InternalAntRunner classInternalAntRunner newInstance classInternalAntRunner getMethod argArray currentThread setContextClassLoader originalClassLoader EXIT_OK
private Class Loader get Class Loader if custom Classpath null return Ant Core Plugin get Plugin get New Class Loader Ant Core Preferences preferences Ant Core Plugin get Plugin get Preferences List full Classpath new Array List full Classpath add All Arrays as List custom Classpath full Classpath add All Arrays as List preferences get Extra ClasspathUR Ls return new Ant Class Loader URL full Classpath to Array new URL full Classpath size preferences get Plugin Class Loaders  ClassLoader getClassLoader customClasspath AntCorePlugin getPlugin getNewClassLoader AntCorePreferences AntCorePlugin getPlugin getPreferences fullClasspath ArrayList fullClasspath addAll asList customClasspath fullClasspath addAll asList getExtraClasspathURLs AntClassLoader fullClasspath toArray fullClasspath getPluginClassLoaders
Sets the input handler The parameter code class Name code is the class name of a code org apache tools ant input Input Handler code implementation The class will be instantiated at runtime and the input handler will be used to respond to lt input gt requests Only one input handler is permitted for any build param class Name an input handler class name since 2 1 public void set Input Handler String class Name input Handler Class Name class Name  className InputHandler className setInputHandler className inputHandlerClassName className
Sets the user specified property files param property Files array of property file paths since 2 1 public void set Property Files String property Files this property Files property Files  propertyFiles setPropertyFiles propertyFiles propertyFiles propertyFiles
Sets the custom classpath to use for this build param custom Classpath array of UR Ls that define the custom classpath public void set Custom Classpath URL custom Classpath this custom Classpath custom Classpath  customClasspath URLs setCustomClasspath customClasspath customClasspath customClasspath
Sets the Ant home to use for this build param ant Home String specifying the Ant home to use since 2 1 public void set Ant Home String ant Home this ant Home ant Home  antHome setAntHome antHome antHome antHome
Returns whether an Ant build is already in progress Only one Ant build can occur at any given time since 2 1 return boolean public static boolean is Build Running return build Running  isBuildRunning buildRunning

Returns the label for this classpath entry return the label for this entry 
Returns the URL for this classpath entry or code null code if it cannot be resolved return the url for this classpath entry 
Returns whether this classpath entry requires the Eclipse runtime to be relevant Defaults value is code true code return whether this classpath entry requires the Eclipse runtime 

Returns a value that the Ant entry point will use to set the value of the Ant property param ant Property Name the Ant property to set return the value for the property or code null code if the property should not be set  antPropertyName

Create a project information param name project name param description a brief explanation of the project s purpose or code null code if not specified package Project Info String name String description this name name null name NON NLS 1 this description description  ProjectInfo
Returns the project name return the project name public String get Name return name  getName
Returns the project description or code null code if no description is provided return the project description or code null code if none public String get Description return description  getDescription

private boolean eclipse Runtime true public Property String name String value this name name this value value  eclipseRuntime
public Property 
Gets the name return Returns a String public String get Name return name  getName
Sets the name param name The name to set public void set Name String name this name name  setName
public boolean equals Object other if other get Class equals get Class Property elem Property other return name equals elem get Name return false  getClass getClass getName
see Object hash Code public int hash Code return name hash Code  hashCode hashCode hashCode
Returns the value Equivalent to calling get Value true return String public String get Value return get Value true  getValue getValue getValue
Returns the value param substitute Variables whether the value has any variables resolved return String since 3 0 public String get Value boolean substitute Variables if class Name null Class cls null try cls loader load Class class Name catch Class Not Found Exception e Ant Core Plugin log e return null try value Provider I Ant Property Value Provider cls new Instance catch Instantiation Exception e Ant Core Plugin log e return null catch Illegal Access Exception ex Ant Core Plugin log ex return null loader null class Name null if value Provider null return value Provider get Ant Property Value name if substitute Variables try String expanded Variables Plugin get Default get String Variable Manager perform String Substitution value return expanded catch Core Exception e Ant Core Plugin log e else return value return null  substituteVariables getValue substituteVariables className loadClass className ClassNotFoundException AntCorePlugin valueProvider IAntPropertyValueProvider newInstance InstantiationException AntCorePlugin IllegalAccessException AntCorePlugin className valueProvider valueProvider getAntPropertyValue substituteVariables VariablesPlugin getDefault getStringVariableManager performStringSubstitution CoreException AntCorePlugin
Sets the value param value The value to set public void set Value String value this value value  setValue
Returns whether this Ant property has been created because of an extension point definition return boolean since 3 0 public boolean is Default return plugin Label null  isDefault pluginLabel
Sets the label of the plugin that contributed this Ant property via an extension point param plugin Label The label of the plugin since 3 0 public void set Plugin Label String plugin Label this plugin Label plugin Label  pluginLabel setPluginLabel pluginLabel pluginLabel pluginLabel
Returns the label of the plugin that contributed this Ant property via an extension point return plugin Label The label of the plugin since 3 0 public String get Plugin Label return this plugin Label  pluginLabel getPluginLabel pluginLabel
Sets the name of the class that is an code I Ant Property Value Provider code to be used to dynamically provide a value for this property Sets the class loader to load the code I Ant Property Value Provider code to be used to dynamically provide a value for this property param class Name The name of the value provider class to use to resolve the value of this property param loader The class loader to use to load the value provider class to use to resolve the value of this property since 3 0 public void set Value Provider String class Name Class Loader loader this class Name class Name this loader loader  IAntPropertyValueProvider IAntPropertyValueProvider className setValueProvider className ClassLoader className className
public String to String String Buffer buff new String Buffer NON NLS 1 buff append get Name buff append NON NLS 1 buff append get Value false buff append NON NLS 1 return buff to String  toString StringBuffer StringBuffer getName getValue toString
Returns whether this property requires the Eclipse runtime to be relevant Defaults value is code true code return whether this property requires the Eclipse runtime since 3 0 public boolean is Eclipse Runtime Required return eclipse Runtime  isEclipseRuntimeRequired eclipseRuntime
public void set Eclipse Runtime Required boolean eclipse Runtime this eclipse Runtime eclipse Runtime  setEclipseRuntimeRequired eclipseRuntime eclipseRuntime eclipseRuntime

Create a target information param name target name param description a brief explanation of the target s purpose or code null code if not specified param project enclosing project param dependencies names of prerequisite projects param is Default whether this is the build file default target package Target Info Project Info project String name String description String dependencies boolean is Default this name name null name NON NLS 1 this description description this project project this dependencies dependencies this is Default is Default  isDefault TargetInfo ProjectInfo isDefault isDefault isDefault
Returns the target name return the target name public String get Name return name  getName
Returns the target description or code null code if no description is provided return the target description or code null code if none public String get Description return description  getDescription
Returns the Project Info of the enclosing project return the project info for the enclosing project public Project Info get Project return project  ProjectInfo ProjectInfo getProject
Return the names of the targets that this target depends on return the dependent names public String get Dependencies return dependencies  getDependencies
Returns whether this is the build file default target return whether this is the build file default target public boolean is Default return is Default  isDefault isDefault
public boolean equals Object obj if obj instanceof Target Info return false Target Info other Target Info obj return get Name equals other get Name  TargetInfo TargetInfo TargetInfo getName getName
see java lang Object hash Code public int hash Code return get Name hash Code  hashCode hashCode getName hashCode
see java lang Object to String public String to String return get Name  toString toString getName

Returns the name of the task return the name of the task public String get Task Name return f Name  getTaskName fName
Sets the name of the task param task Name The task Name to set public void set Task Name String task Name f Name task Name  taskName taskName setTaskName taskName fName taskName

Returns the type name return Returns a String public String get Type Name return f Name  getTypeName fName
Sets the task Name param task Name The task Name to set public void set Type Name String task Name f Name task Name  taskName taskName taskName setTypeName taskName fName taskName

protected Security Manager security Manager null protected Ant Security Manager Security Manager security Manager this security Manager security Manager  SecurityManager securityManager AntSecurityManager SecurityManager securityManager securityManager securityManager
public void check Exit int status no exit allowed System exit is being called by some ant task do not want Eclipse to exit if in the same VM The message is used in loggers to determine that this is not really an exception case throw new Ant Security Exception  checkExit AntSecurityException
public void check Accept String host int port if security Manager null security Manager check Accept host port  checkAccept securityManager securityManager checkAccept
public void check Access Thread t if security Manager null security Manager check Access t  checkAccess securityManager securityManager checkAccess
public void check Access Thread Group g if security Manager null security Manager check Access g  checkAccess ThreadGroup securityManager securityManager checkAccess
public void check Awt Event Queue Access if security Manager null security Manager check Awt Event Queue Access  checkAwtEventQueueAccess securityManager securityManager checkAwtEventQueueAccess
public void check Connect String host int port Object context if security Manager null security Manager check Connect host port context  checkConnect securityManager securityManager checkConnect
public void check Connect String host int port if security Manager null security Manager check Connect host port  checkConnect securityManager securityManager checkConnect
public void check Create Class Loader if security Manager null security Manager check Create Class Loader  checkCreateClassLoader securityManager securityManager checkCreateClassLoader
public void check Delete String file if security Manager null security Manager check Delete file  checkDelete securityManager securityManager checkDelete
public void check Exec String cmd if security Manager null security Manager check Exec cmd  checkExec securityManager securityManager checkExec
public void check Link String lib if security Manager null security Manager check Link lib  checkLink securityManager securityManager checkLink
public void check Listen int port if security Manager null security Manager check Listen port  checkListen securityManager securityManager checkListen
public void check Member Access Class clazz int which if security Manager null security Manager check Member Access clazz which  checkMemberAccess securityManager securityManager checkMemberAccess
see java lang Security Manager check Multicast java net Inet Address byte deprecated public void check Multicast Inet Address maddr byte ttl if security Manager null String host maddr get Host Address if host starts With host index Of 1 NON NLS 1 host host NON NLS 1 NON NLS 2 check Permission new Socket Permission host accept connect NON NLS 1  SecurityManager checkMulticast InetAddress checkMulticast InetAddress securityManager getHostAddress startsWith indexOf checkPermission SocketPermission
public void check Multicast Inet Address maddr if security Manager null security Manager check Multicast maddr  checkMulticast InetAddress securityManager securityManager checkMulticast
public void check Package Access String pkg if security Manager null security Manager check Package Access pkg  checkPackageAccess securityManager securityManager checkPackageAccess
public void check Package Definition String pkg if security Manager null security Manager check Package Definition pkg  checkPackageDefinition securityManager securityManager checkPackageDefinition
public void check Permission Permission perm Object context if security Manager null security Manager check Permission perm context  checkPermission securityManager securityManager checkPermission
public void check Permission Permission perm if security Manager null security Manager check Permission perm  checkPermission securityManager securityManager checkPermission
public void check Print Job Access if security Manager null security Manager check Print Job Access  checkPrintJobAccess securityManager securityManager checkPrintJobAccess
public void check Properties Access if security Manager null security Manager check Properties Access  checkPropertiesAccess securityManager securityManager checkPropertiesAccess
public void check Property Access String key if security Manager null security Manager check Property Access key  checkPropertyAccess securityManager securityManager checkPropertyAccess
public void check Read File Descriptor fd if security Manager null security Manager check Read fd  checkRead FileDescriptor securityManager securityManager checkRead
public void check Read String file Object context if security Manager null security Manager check Read file context  checkRead securityManager securityManager checkRead
public void check Read String file if security Manager null security Manager check Read file  checkRead securityManager securityManager checkRead
public void check Security Access String target if security Manager null security Manager check Security Access target  checkSecurityAccess securityManager securityManager checkSecurityAccess
public void check Set Factory if security Manager null security Manager check Set Factory  checkSetFactory securityManager securityManager checkSetFactory
public void check System Clipboard Access if security Manager null security Manager check System Clipboard Access  checkSystemClipboardAccess securityManager securityManager checkSystemClipboardAccess
public boolean check Top Level Window Object window if security Manager null return security Manager check Top Level Window window return super check Top Level Window window  checkTopLevelWindow securityManager securityManager checkTopLevelWindow checkTopLevelWindow
public void check Write File Descriptor fd if security Manager null security Manager check Write fd  checkWrite FileDescriptor securityManager securityManager checkWrite
public void check Write String file if security Manager null security Manager check Write file  checkWrite securityManager securityManager checkWrite
see java lang Security Manager get In Check deprecated public boolean get In Check if security Manager null return security Manager get In Check return super get In Check  SecurityManager getInCheck getInCheck securityManager securityManager getInCheck getInCheck
public Object get Security Context if security Manager null return security Manager get Security Context return super get Security Context  getSecurityContext securityManager securityManager getSecurityContext getSecurityContext
public Thread Group get Thread Group if security Manager null security Manager get Thread Group return super get Thread Group  ThreadGroup getThreadGroup securityManager securityManager getThreadGroup getThreadGroup

private static final String ANT PACKAGES PREFIX org apache tools NON NLS 1 public Ant Class Loader URL urls Class Loader plugin Loaders super urls Class Loader get System Class Loader this plugin Loaders plugin Loaders  ANT_PACKAGES_PREFIX AntClassLoader ClassLoader pluginLoaders ClassLoader getSystemClassLoader pluginLoaders pluginLoaders
protected Class find Class String name throws Class Not Found Exception Class result null check whether to load the Apache Ant classes from the plugin class loaders or to only load from the UR Ls specified from the Ant runtime classpath preferences setting if allow Plugin Loading name starts With ANT PACKAGES PREFIX result load Class Plugins name if result null result load ClassUR Ls name if result null throw new Class Not Found Exception name return result  findClass ClassNotFoundException URLs allowPluginLoading startsWith ANT_PACKAGES_PREFIX loadClassPlugins loadClassURLs ClassNotFoundException
protected Class load ClassUR Ls String name try return super find Class name catch Class Not Found Exception e Ignore exception now If necessary we ll throw a Class Not Found Exception in find Class String return null  loadClassURLs findClass ClassNotFoundException ClassNotFoundException findClass
protected Class load Class Plugins String name Class result null if plugin Loaders null for int i 0 i plugin Loaders length result null i try result plugin Loaders i load Class name catch Class Not Found Exception e Ignore exception now If necessary we ll throw a Class Not Found Exception in load Class String return result  loadClassPlugins pluginLoaders pluginLoaders pluginLoaders loadClass ClassNotFoundException ClassNotFoundException loadClass
Sets whether this classloader will allow Apache Ant classes to be found or loaded from its set of plugin classloaders param allow Loading whether or not to allow the plugin classloaders to load the Apache Ant classes public void allow Plugin Class Loaders To Load Ant Classes boolean allow Loading this allow Plugin Loading allow Loading  allowLoading allowPluginClassLoadersToLoadAntClasses allowLoading allowPluginLoading allowLoading

see org eclipse ant core I Ant Classpath Entry get Label public String get Label return entry String  IAntClasspathEntry getLabel getLabel entryString
public URL get EntryURL if url null return url try String expanded Variables Plugin get Default get String Variable Manager perform String Substitution entry String return new URL file expanded NON NLS 1 catch Core Exception e try return new URL file entry String NON NLS 1 catch MalformedURL Exception e1 return null catch MalformedURL Exception e Ant Core Plugin log e return null  getEntryURL VariablesPlugin getDefault getStringVariableManager performStringSubstitution entryString CoreException entryString MalformedURLException MalformedURLException AntCorePlugin
public Ant Classpath Entry String entry String this entry String entry String  AntClasspathEntry entryString entryString entryString
public Ant Classpath Entry URL url this url url this entry String new File url get Path get Absolute Path  AntClasspathEntry entryString getPath getAbsolutePath
public boolean equals Object obj if obj instanceof I Ant Classpath Entry I Ant Classpath Entry other I Ant Classpath Entry obj return entry String equals other get Label return false  IAntClasspathEntry IAntClasspathEntry IAntClasspathEntry entryString getLabel
see java lang Object hash Code public int hash Code return entry String hash Code  hashCode hashCode entryString hashCode
see java lang Object to String public String to String return get Label  toString toString getLabel
see org eclipse ant core I Ant Classpath Entry is Eclipse Runtime Required public boolean is Eclipse Runtime Required return eclipse Required  IAntClasspathEntry isEclipseRuntimeRequired isEclipseRuntimeRequired eclipseRequired
public void set Eclipse Runtime Required boolean eclipse Required this eclipse Required eclipse Required  setEclipseRuntimeRequired eclipseRequired eclipseRequired eclipseRequired

class Demux Input Stream Setter protected void remap System In Project project System set In new Demux Input Stream project  DemuxInputStreamSetter remapSystemIn setIn DemuxInputStream

protected void set Input Handler Project project String input Handler Classname Input Handler handler null if input Handler Classname null handler new Default Input Handler else try handler Input Handler Class for Name input Handler Classname new Instance catch Class Cast Exception e String msg Message Format format Internal Ant Messages get String Internal Ant Runner The specified input handler class  0  does not implement the org apache tools ant input InputHandler interface 5 new String input Handler Classname NON NLS 1 throw new Build Exception msg e catch Exception e String msg Message Format format Internal Ant Messages get String Internal Ant Runner Unable to instantiate specified input handler class  0     1  6 new String input Handler Classname e get Class get Name NON NLS 1 throw new Build Exception msg e project set Input Handler handler  setInputHandler inputHandlerClassname InputHandler inputHandlerClassname DefaultInputHandler InputHandler forName inputHandlerClassname newInstance ClassCastException MessageFormat InternalAntMessages getString InternalAntRunner The_specified_input_handler_class_ _does_not_implement_the_org InputHandler_interface_5 inputHandlerClassname BuildException MessageFormat InternalAntMessages getString InternalAntRunner Unable_to_instantiate_specified_input_handler_class_ ___ _6 inputHandlerClassname getClass getName BuildException setInputHandler

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Internal Ant Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME InternalAntMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Adds a build listener param class Names the fully qualified names of the build listeners to be added public void add Build Listeners List class Names if build Listeners null build Listeners new Array List class Names size build Listeners add All class Names  classNames addBuildListeners classNames buildListeners buildListeners ArrayList classNames buildListeners addAll classNames
Adds a build logger param class Name The fully qualified name of the build logger to add public void add Build Logger String class Name logger Classname class Name  className addBuildLogger className loggerClassname className
Adds user properties to the current collection of user properties param properties The user properties to be added public void add User Properties Map properties if user Properties null user Properties new Hash Map properties size user Properties put All properties no Explicit User Properties false  addUserProperties userProperties userProperties HashMap userProperties putAll noExplicitUserProperties
Adds user property files param additional Property Files The property files to add since 2 1 public void add Property Files String additional Property Files property Files add All Arrays as List additional Property Files  additionalPropertyFiles addPropertyFiles additionalPropertyFiles propertyFiles addAll asList additionalPropertyFiles
private void add Build Listeners Project project String class Name null try Build Logger logger create Logger if logger null project add Build Listener logger if build Listeners null for Iterator iterator build Listeners iterator iterator has Next class Name String iterator next Class listener Class for Name class Name project add Build Listener Build Listener listener new Instance catch Class Cast Exception e String message Message Format format Internal Ant Messages get String Internal Ant Runner 0  which was specified to be a build listener is not an instance of org apache tools ant Build Listener  1 new String class Name NON NLS 1 log Message null message Project MSG ERR throw new Build Exception message e catch Build Exception e throw e catch Exception e throw new Build Exception e  addBuildListeners className BuildLogger createLogger addBuildListener buildListeners buildListeners hasNext className forName className addBuildListener BuildListener newInstance ClassCastException MessageFormat InternalAntMessages getString InternalAntRunner _which_was_specified_to_be_a_build_listener_is_not_an_instance_of_org BuildListener _1 className logMessage MSG_ERR BuildException BuildException BuildException
private void set Properties Project project set Built In Properties project if user Properties null for Iterator iterator user Properties entry Set iterator iterator has Next Map Entry entry Map Entry iterator next project set User Property String entry get Key String entry get Value may have properties set always have the Ant process ID using the Arguments and not the Properties page if set using the arguments still include the global properties if no Explicit User Properties set Global Properties project else set Global Properties project  setProperties setBuiltInProperties userProperties userProperties entrySet hasNext setUserProperty getKey getValue noExplicitUserProperties setGlobalProperties setGlobalProperties
private void set Built In Properties Project project note also see process Ant Home for system properties that are set project set User Property ant file get Build File Location NON NLS 1 project set User Property ant version Main get Ant Version NON NLS 1  setBuiltInProperties processAntHome setUserProperty getBuildFileLocation setUserProperty getAntVersion
private void set Global Properties Project project Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences List properties prefs get Properties if properties null for Iterator iter properties iterator iter has Next Property property Property iter next String value property get Value if value null project set User Property property get Name value  setGlobalProperties AntCorePreferences AntCorePlugin getPlugin getPreferences getProperties hasNext getValue setUserProperty getName
private void set Tasks Project project List tasks Ant Core Plugin get Plugin get Preferences get Tasks for Iterator iterator tasks iterator iterator has Next org eclipse ant core Task task org eclipse ant core Task iterator next if is Version Compatible 1 6 NON NLS 1 Ant Type Definition def new Ant Type Definition def set Name task get Task Name def set Class Name task get Class Name def set Class Loader this get Class get Class Loader def set Adapt To Class Task class def set Adapter Class Task Adapter class Component Helper get Component Helper project add Data Type Definition def else try Class task Class Class for Name task get Class Name if is Version Compatible 1 5 NON NLS 1 try project check Task Class task Class catch Build Exception e I Status status new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR RUNNING BUILD Message Format format Internal Ant Messages get String Internal Ant Runner Error setting Ant task new String task get Task Name e NON NLS 1 Ant Core Plugin get Plugin get Log log status continue project add Task Definition task get Task Name task Class catch Class Not Found Exception e I Status status new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR RUNNING BUILD Message Format format Internal Ant Messages get String Internal Ant Runner Class  0  not found for task  1  1 new String task get Class Name task get Task Name e NON NLS 1 Ant Core Plugin get Plugin get Log log status  setTasks AntCorePlugin getPlugin getPreferences getTasks hasNext isVersionCompatible AntTypeDefinition AntTypeDefinition setName getTaskName setClassName getClassName setClassLoader getClass getClassLoader setAdaptToClass setAdapterClass TaskAdapter ComponentHelper getComponentHelper addDataTypeDefinition taskClass forName getClassName isVersionCompatible checkTaskClass taskClass BuildException IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_RUNNING_BUILD MessageFormat InternalAntMessages getString InternalAntRunner Error_setting_Ant_task getTaskName AntCorePlugin getPlugin getLog addTaskDefinition getTaskName taskClass ClassNotFoundException IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_RUNNING_BUILD MessageFormat InternalAntMessages getString InternalAntRunner Class_ _not_found_for_task_ _1 getClassName getTaskName AntCorePlugin getPlugin getLog
private void set Types Project project List types Ant Core Plugin get Plugin get Preferences get Types for Iterator iterator types iterator iterator has Next Type type Type iterator next if is Version Compatible 1 6 NON NLS 1 Ant Type Definition def new Ant Type Definition def set Name type get Type Name def set Class Name type get Class Name def set Class Loader this get Class get Class Loader Component Helper get Component Helper project add Data Type Definition def else try Class type Class Class for Name type get Class Name project add Data Type Definition type get Type Name type Class catch Class Not Found Exception e I Status status new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin ERROR RUNNING BUILD Message Format format Internal Ant Messages get String Internal Ant Runner Class  0  not found for type  1  2 new String type get Class Name type get Type Name e NON NLS 1 Ant Core Plugin get Plugin get Log log status  setTypes AntCorePlugin getPlugin getPreferences getTypes hasNext isVersionCompatible AntTypeDefinition AntTypeDefinition setName getTypeName setClassName getClassName setClassLoader getClass getClassLoader ComponentHelper getComponentHelper addDataTypeDefinition typeClass forName getClassName addDataTypeDefinition getTypeName typeClass ClassNotFoundException IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin ERROR_RUNNING_BUILD MessageFormat InternalAntMessages getString InternalAntRunner Class_ _not_found_for_type_ _2 getClassName getTypeName AntCorePlugin getPlugin getLog
Parses the build file and adds necessary information into the given project param project The project to configure private void parse Build File Project project File build File new File get Build File Location if build File exists throw new Build Exception Message Format format Internal Ant Messages get String Internal Ant Runner Buildfile   0  does not exist   1 NON NLS 1 new String build File get Absolute Path if build File is File throw new Build Exception Message Format format Internal Ant Messages get String Internal Ant Runner Buildfile   0  is not a file 1 NON NLS 1 new String build File get Absolute Path Project Helper helper Project Helper get Project Helper project add Reference ant project Helper helper NON NLS 1 helper parse project build File  parseBuildFile buildFile getBuildFileLocation buildFile BuildException MessageFormat InternalAntMessages getString InternalAntRunner Buildfile__ _does_not_exist_ _1 buildFile getAbsolutePath buildFile isFile BuildException MessageFormat InternalAntMessages getString InternalAntRunner Buildfile__ _is_not_a_file_1 buildFile getAbsolutePath ProjectHelper ProjectHelper getProjectHelper addReference projectHelper buildFile
Gets all the target information from the build script Returns a list of lists Each item in the enclosing list represents a target where the first element is the name the second element is the description the third element is the project name and the last elements is an array of dependencies return a list of lists representing the targets public List get Targets try Project ant Project if is Version Compatible 1 6 NON NLS 1 in Ant version 1 6 or greater all tasks can exist outside the scope of a target ant Project new Project else ant Project new Internal Project process Ant Home false ant Project init set Types ant Project process Properties get Array List extra Arguments set Properties ant Project if is Version Compatible 1 6 NON NLS 1 new Input Handler Setter set Input Handler ant Project org eclipse ant internal core ant Null Input Handler NON NLS 1 parse Build File ant Project default Target ant Project get Default Target Enumeration project Targets ant Project get Targets elements List infos new Array List infos add ant Project get Name infos add ant Project get Description List info Target target boolean default Found false while project Targets has More Elements target Target project Targets next Element String name target get Name if name length 0 no name implicit target of Ant 1 6 continue info new Array List 4 info add name if target get Name equals default Target default Found true info add target get Description List dependencies new Array List Enumeration enumeration target get Dependencies while enumeration has More Elements dependencies add enumeration next Element String dependency Array new String dependencies size dependencies to Array dependency Array info add dependency Array infos add info if default Found default target must exist throw new Build Exception Message Format format Internal Ant Messages get String Internal Ant Runner Default target  0 1 2  does not exist in this project 1 new String default Target NON NLS 1 NON NLS 2 NON NLS 3 return infos finally process Ant Home true  getTargets antProject isVersionCompatible antProject antProject InternalProject processAntHome antProject setTypes antProject processProperties getArrayList extraArguments setProperties antProject isVersionCompatible InputHandlerSetter setInputHandler antProject NullInputHandler parseBuildFile antProject defaultTarget antProject getDefaultTarget projectTargets antProject getTargets ArrayList antProject getName antProject getDescription defaultFound projectTargets hasMoreElements projectTargets nextElement getName ArrayList getName defaultTarget defaultFound getDescription ArrayList getDependencies hasMoreElements nextElement dependencyArray toArray dependencyArray dependencyArray defaultFound BuildException MessageFormat InternalAntMessages getString InternalAntRunner Default_target_ _does_not_exist_in_this_project_1 defaultTarget processAntHome
Returns the default target name that was last computed or code null code if no default target has been computed return the default target name public String get Default Target return default Target  getDefaultTarget defaultTarget
Runs the build script public void run run get Array List extra Arguments  getArrayList extraArguments
private void print Arguments Project project if message Output Level Project MSG DEBUG message Output Level Project MSG VERBOSE return String Buffer sb new String Buffer for int i 0 i extra Arguments length i sb append extra Arguments i sb append project log Message Format format Internal Ant Messages get String Internal Ant Runner Arguments   0  2 new String sb to String trim NON NLS 1  printArguments messageOutputLevel MSG_DEBUG messageOutputLevel MSG_VERBOSE StringBuffer StringBuffer extraArguments extraArguments MessageFormat InternalAntMessages getString InternalAntRunner Arguments__ _2 toString
private void create Monitor Build Listener Project project if monitor null return List chosen Targets targets if chosen Targets null chosen Targets is Empty chosen Targets new Array List 1 String deflt Target project get Default Target if deflt Target null chosen Targets add deflt Target project add Build Listener new Progress Build Listener project chosen Targets monitor  createMonitorBuildListener chosenTargets chosenTargets chosenTargets isEmpty chosenTargets ArrayList defltTarget getDefaultTarget defltTarget chosenTargets defltTarget addBuildListener ProgressBuildListener chosenTargets
Logs a message with the client that lists the targets in a project param project the project to list targets from private void print Targets Project project find the target with the longest name int max Length 0 Enumeration ptargets project get Targets elements String target Name String target Description Target current Target split the targets in top level and sub targets depending on the presence of a description List top Names new Array List List top Descriptions new Array List List sub Names new Array List while ptargets has More Elements current Target Target ptargets next Element target Name current Target get Name target Description current Target get Description if target Description null sub Names add target Name else top Names add target Name top Descriptions add target Description if target Name length max Length max Length target Name length Collections sort sub Names Collections sort top Names Collections sort top Descriptions String default Target Name project get Default Target if default Target Name null equals default Target Name shouldn t need to check but NON NLS 1 List default Name new Array List 1 List default Desc null default Name add default Target Name int index Of Def Desc top Names index Of default Target Name if index Of Def Desc 0 default Desc new Array List 1 default Desc add top Descriptions get index Of Def Desc print Targets project default Name default Desc Internal Ant Messages get String Internal Ant Runner Default target  3 max Length NON NLS 1 print Targets project top Names top Descriptions Internal Ant Messages get String Internal Ant Runner Main targets  4 max Length NON NLS 1 print Targets project sub Names null Internal Ant Messages get String Internal Ant Runner Subtargets  5 0 NON NLS 1  printTargets maxLength getTargets targetName targetDescription currentTarget topNames ArrayList topDescriptions ArrayList subNames ArrayList hasMoreElements currentTarget nextElement targetName currentTarget getName targetDescription currentTarget getDescription targetDescription subNames targetName topNames targetName topDescriptions targetDescription targetName maxLength maxLength targetName subNames topNames topDescriptions defaultTargetName getDefaultTarget defaultTargetName defaultTargetName defaultName ArrayList defaultDesc defaultName defaultTargetName indexOfDefDesc topNames indexOf defaultTargetName indexOfDefDesc defaultDesc ArrayList defaultDesc topDescriptions indexOfDefDesc printTargets defaultName defaultDesc InternalAntMessages getString InternalAntRunner Default_target__3 maxLength printTargets topNames topDescriptions InternalAntMessages getString InternalAntRunner Main_targets__4 maxLength printTargets subNames InternalAntMessages getString InternalAntRunner Subtargets__5
Logs a message with the client that lists the target names and optional descriptions param project the enclosing target param names the targets names param descriptions the corresponding descriptions param heading the message heading param maxlen maximum length that can be allocated for a name private void print Targets Project project List names List descriptions String heading int maxlen now start printing the targets and their descriptions String l Sep System get Property line separator NON NLS 1 String spaces NON NLS 1 while spaces length maxlen spaces spaces String Buffer msg new String Buffer msg append heading l Sep l Sep for int i 0 i names size i msg append msg append names get i if descriptions null msg append spaces substring 0 maxlen String names get i length 2 msg append descriptions get i msg append l Sep log Message project msg to String Project MSG INFO  printTargets lSep getProperty StringBuffer StringBuffer lSep lSep lSep logMessage toString MSG_INFO
Invokes the building of a project object and executes a build using either a given target or the default target This method is called if running in headless mode see org eclipse ant core Ant Runner run Object param arg Array the command line arguments exception Exception execution exceptions public void run Object arg Array throws Exception run get Array List String arg Array  AntRunner argArray argArray getArrayList argArray
private void run List arg List set Current Project new Project Throwable error null Print Stream original Err System err Print Stream original Out System out Input Stream original In System in Security Manager originalSM System get Security Manager set Java Class Path script Executed true process Ant Home false try if arg List null arg List remove projecthelp arg List remove p NON NLS 1 NON NLS 2 project Help true get Current Project init if arg List null script Executed preprocess Command Line arg List if script Executed return add Build Listeners get Current Project process Properties arg List set Properties get Current Project add Input Handler get Current Project remap System In System set Out new Print Stream new Demux Output Stream get Current Project false System set Err new Print Stream new Demux Output Stream get Current Project true if project Help fire Build Started get Current Project if arg List null arg List is Empty try script Executed process Command Line arg List catch Build Exception e script Executed false throw e if script Executed return if allow Input set the system property that any input handler can check to see if handling input is allowed System set Property eclipse ant no Input true NON NLS 1 NON NLS 2 else if is Version Compatible 1 6 NON NLS 1 get Current Project set Default Input Stream original In get Current Project log Message Format format Internal Ant Messages get String Internal Ant Runner Build file   0  1 new String get Build File Location NON NLS 1 set Tasks get Current Project set Types get Current Project if is Version Compatible 1 6 NON NLS 1 get Current Project set Keep Going Mode keep Going parse Build File get Current Project validate Default Target create Monitor Build Listener get Current Project if project Help print Help get Current Project script Executed false return if extra Arguments null print Arguments get Current Project System set Security Manager new Ant Security Manager originalSM if targets null targets is Empty get Current Project execute Targets targets else get Current Project execute Target get Current Project get Default Target catch Operation Canceled Exception e script Executed false log Message get Current Project e get Message Project MSG INFO throw e catch Ant Security Exception e expected catch Runtime Exception e error e throw e catch Error e error e throw e finally System set Err original Err System set Out original Out System set In original In if System get Security Manager instanceof Ant Security Manager System set Security Manager originalSM if project Help fire Build Finished get Current Project error close any user specified build log if err original Err err close if out original Out out close process Ant Home true if allow Input System get Properties remove eclipse ant no Input NON NLS 1  argList setCurrentProject PrintStream originalErr PrintStream originalOut InputStream originalIn SecurityManager getSecurityManager setJavaClassPath scriptExecuted processAntHome argList argList argList projectHelp getCurrentProject argList scriptExecuted preprocessCommandLine argList scriptExecuted addBuildListeners getCurrentProject processProperties argList setProperties getCurrentProject addInputHandler getCurrentProject remapSystemIn setOut PrintStream DemuxOutputStream getCurrentProject setErr PrintStream DemuxOutputStream getCurrentProject projectHelp fireBuildStarted getCurrentProject argList argList isEmpty scriptExecuted processCommandLine argList BuildException scriptExecuted scriptExecuted allowInput setProperty noInput isVersionCompatible getCurrentProject setDefaultInputStream originalIn getCurrentProject MessageFormat InternalAntMessages getString InternalAntRunner Build_file__ _1 getBuildFileLocation setTasks getCurrentProject setTypes getCurrentProject isVersionCompatible getCurrentProject setKeepGoingMode keepGoing parseBuildFile getCurrentProject validateDefaultTarget createMonitorBuildListener getCurrentProject projectHelp printHelp getCurrentProject scriptExecuted extraArguments printArguments getCurrentProject setSecurityManager AntSecurityManager isEmpty getCurrentProject executeTargets getCurrentProject executeTarget getCurrentProject getDefaultTarget OperationCanceledException scriptExecuted logMessage getCurrentProject getMessage MSG_INFO AntSecurityException RuntimeException setErr originalErr setOut originalOut setIn originalIn getSecurityManager AntSecurityManager setSecurityManager projectHelp fireBuildFinished getCurrentProject originalErr originalOut processAntHome allowInput getProperties noInput
private void remap System In if is Version Compatible 1 6 NON NLS 1 return Demux Input Stream Setter setter new Demux Input Stream Setter setter remap System In get Current Project  remapSystemIn isVersionCompatible DemuxInputStreamSetter DemuxInputStreamSetter remapSystemIn getCurrentProject
private void process Ant Home boolean finished Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences String ant Home prefs get Ant Home if build Ant Home null finished ant Home build Ant Home if ant Home null ant Home length 0 System get Properties remove ant home NON NLS 1 System get Properties remove ant library dir NON NLS 1 else System set Property ant home ant Home NON NLS 1 File ant Lib Dir new File ant Home lib NON NLS 1 System set Property ant library dir ant Lib Dir get Absolute Path NON NLS 1  processAntHome AntCorePreferences AntCorePlugin getPlugin getPreferences antHome getAntHome buildAntHome antHome buildAntHome antHome antHome getProperties getProperties setProperty antHome antLibDir antHome setProperty antLibDir getAbsolutePath
public void set Ant Home String ant Home this build Ant Home ant Home  setAntHome antHome buildAntHome antHome
private void validate Default Target default Target get Current Project get Default Target Enumeration current Targets get Current Project get Targets elements boolean default Found false while current Targets has More Elements Target target Target current Targets next Element if target get Name equals default Target default Found true break if default Found default target must exist throw new Build Exception Message Format format Internal Ant Messages get String Internal Ant Runner Default target  0 1 2  does not exist in this project 1 new String default Target NON NLS 1 NON NLS 2 NON NLS 3  validateDefaultTarget defaultTarget getCurrentProject getDefaultTarget currentTargets getCurrentProject getTargets defaultFound currentTargets hasMoreElements currentTargets nextElement getName defaultTarget defaultFound defaultFound BuildException MessageFormat InternalAntMessages getString InternalAntRunner Default_target_ _does_not_exist_in_this_project_1 defaultTarget
Creates and returns the default build logger for logging build events to the ant log return the default build logger for logging build events to the ant log can return code null code if no logging is to occur private Build Logger create Logger if logger Classname null build Logger new Default Logger else if equals logger Classname NON NLS 1 try build Logger Build Logger Class for Name logger Classname new Instance catch Class Cast Exception e String message Message Format format Internal Ant Messages get String Internal Ant Runner 0  which was specified to perform logging is not an instance of org apache tools ant Build Logger  2 new String logger Classname NON NLS 1 log Message null message Project MSG ERR throw new Build Exception message e catch Exception e String message Message Format format Internal Ant Messages get String Internal Ant Runner Unable to instantiate logger   0  6 new String logger Classname NON NLS 1 log Message null message Project MSG ERR throw new Build Exception message e if build Logger null build Logger set Message Output Level message Output Level build Logger set Output Print Stream out build Logger set Error Print Stream err build Logger set Emacs Mode emacs Mode return build Logger  BuildLogger createLogger loggerClassname buildLogger DefaultLogger loggerClassname buildLogger BuildLogger forName loggerClassname newInstance ClassCastException MessageFormat InternalAntMessages getString InternalAntRunner _which_was_specified_to_perform_logging_is_not_an_instance_of_org BuildLogger _2 loggerClassname logMessage MSG_ERR BuildException MessageFormat InternalAntMessages getString InternalAntRunner Unable_to_instantiate_logger__ _6 loggerClassname logMessage MSG_ERR BuildException buildLogger buildLogger setMessageOutputLevel messageOutputLevel buildLogger setOutputPrintStream buildLogger setErrorPrintStream buildLogger setEmacsMode emacsMode buildLogger
private void fire Build Started Project project Build Event event new Build Event project for Iterator iterator project get Build Listeners iterator iterator has Next Build Listener listener Build Listener iterator next listener build Started event  fireBuildStarted BuildEvent BuildEvent getBuildListeners hasNext BuildListener BuildListener buildStarted
private void fire Build Finished Project project Throwable error if using Xml Logger generate the log file in the correct location String file Name project get Property Xml Logger file NON NLS 1 if file Name null file Name log xml NON NLS 1 String real Path new Path get Build File Location to File get Absolute Path I Path path new Path real Path path path remove Last Segments 1 path path add Trailing Separator path path append file Name project set Property Xml Logger file path toOS String NON NLS 1 if error null script Executed log Message project Internal Ant Messages get String Internal Ant Runner BUILD SUCCESSFUL 1 message Output Level NON NLS 1 project fire Build Finished error  fireBuildFinished usingXmlLogger fileName getProperty XmlLogger fileName fileName realPath getBuildFileLocation toFile getAbsolutePath IPath realPath removeLastSegments addTrailingSeparator fileName setProperty XmlLogger toOSString scriptExecuted logMessage InternalAntMessages getString InternalAntRunner BUILD_SUCCESSFUL_1 messageOutputLevel fireBuildFinished
private boolean using Xml Logger if build Logger instanceof Xml Logger return true if build Listeners null Enumeration e get Current Project get Build Listeners elements while e has More Elements Build Listener element Build Listener e next Element if element instanceof Xml Logger return true return false  usingXmlLogger buildLogger XmlLogger buildListeners getCurrentProject getBuildListeners hasMoreElements BuildListener BuildListener nextElement XmlLogger
private void log Message Project project String message int priority if project null project log message priority else if build Listeners null project new Project Build Event event new Build Event project event set Message message priority notify the build listeners that are not registered as no project existed for Iterator iterator build Listeners iterator iterator has Next try Build Listener listener Build Listener iterator next listener message Logged event catch Class Cast Exception e ignore we could be trying to log that a build listener is the wrong type of class else I Status s new Status I Status ERROR Ant Core Plugin PI ANTCORE Ant Core Plugin INTERNAL ERROR message null Ant Core Plugin get Plugin get Log log s  logMessage buildListeners BuildEvent BuildEvent setMessage buildListeners hasNext BuildListener BuildListener messageLogged ClassCastException IStatus IStatus AntCorePlugin PI_ANTCORE AntCorePlugin INTERNAL_ERROR AntCorePlugin getPlugin getLog
Sets the build File Location param build File Location the file system location of the build file public void set Build File Location String build File Location this build File Location build File Location if get Current Project null get Current Project set User Property ant file build File Location NON NLS 1  buildFileLocation buildFileLocation setBuildFileLocation buildFileLocation buildFileLocation buildFileLocation getCurrentProject getCurrentProject setUserProperty buildFileLocation
Sets the input handler class name param input Handler Classname the name of the class to use for the input handler public void set Input Handler String input Handler Classname this input Handler Classname input Handler Classname  inputHandlerClassname setInputHandler inputHandlerClassname inputHandlerClassname inputHandlerClassname
private String get Build File Location if build File Location null build File Location new File build xml get Absolute Path NON NLS 1 return build File Location  getBuildFileLocation buildFileLocation buildFileLocation getAbsolutePath buildFileLocation
Sets the message output level Use 1 for none param level The message output level public void set Message Output Level int level message Output Level level if build Logger null build Logger set Message Output Level level  setMessageOutputLevel messageOutputLevel buildLogger buildLogger setMessageOutputLevel
Sets the extra user arguments param args The extra user arguments public void set Arguments String args extra Arguments args  setArguments extraArguments
Sets the execution targets param execution Targets The targets to execute for the build public void set Execution Targets String execution Targets targets new Vector execution Targets length for int i 0 i execution Targets length i targets add execution Targets i  executionTargets setExecutionTargets executionTargets executionTargets executionTargets executionTargets
private String get Ant Version Number throws Build Exception if ant Version Number null try Properties props new Properties Input Stream in Main class get Resource As Stream org apache tools ant version txt NON NLS 1 props load in in close String version Number props get Property VERSION NON NLS 1 ant Version Number version Number catch IO Exception ioe throw new Build Exception Message Format format Internal Ant Messages get String Internal Ant Runner Could not load the version information   0  9 new String ioe get Message NON NLS 1 catch Null Pointer Exception npe throw new Build Exception Internal Ant Messages get String Internal Ant Runner Could not load the version information  10 NON NLS 1 return ant Version Number  getAntVersionNumber BuildException antVersionNumber InputStream getResourceAsStream versionNumber getProperty antVersionNumber versionNumber IOException BuildException MessageFormat InternalAntMessages getString InternalAntRunner Could_not_load_the_version_information _ _9 getMessage NullPointerException BuildException InternalAntMessages getString InternalAntRunner Could_not_load_the_version_information _10 antVersionNumber
than or equal to the current version private boolean is Version Compatible String comparison String version get Ant Version Number return version compare To comparison 0  isVersionCompatible getAntVersionNumber compareTo
private boolean preprocess Command Line List commands String arg get Argument commands listener NON NLS 1 while arg null if arg length 0 throw new Build Exception Internal Ant Messages get String Internal Ant Runner You must specify a classname when using the  listener argument 1 NON NLS 1 if build Listeners null build Listeners new Array List 1 build Listeners add arg arg get Argument commands listener NON NLS 1 arg get Argument commands logger NON NLS 1 if arg null if arg length 0 throw new Build Exception Internal Ant Messages get String Internal Ant Runner You must specify a classname when using the  logger argument 2 NON NLS 1 logger Classname arg arg get Argument commands logger NON NLS 1 if arg null throw new Build Exception Internal Ant Messages get String Internal Ant Runner Only one logger class may be specified 1 NON NLS 1 arg get Argument commands inputhandler NON NLS 1 if arg null if is Version Compatible 1 5 NON NLS 1 throw new Build Exception Internal Ant Messages get String Internal Ant Runner Specifying an InputHandler is an Ant 1 5  feature  Please update your Ant classpath to include an Ant version greater than this  2 NON NLS 1 if arg length 0 throw new Build Exception Internal Ant Messages get String Internal Ant Runner You must specify a classname when using the  inputhandler argument 1 NON NLS 1 input Handler Classname arg arg get Argument commands inputhandler NON NLS 1 if arg null throw new Build Exception Internal Ant Messages get String Internal Ant Runner Only one input handler class may be specified  2 NON NLS 1 return true  preprocessCommandLine getArgument BuildException InternalAntMessages getString InternalAntRunner You_must_specify_a_classname_when_using_the_ listener_argument_1 buildListeners buildListeners ArrayList buildListeners getArgument getArgument BuildException InternalAntMessages getString InternalAntRunner You_must_specify_a_classname_when_using_the_ logger_argument_2 loggerClassname getArgument BuildException InternalAntMessages getString InternalAntRunner Only_one_logger_class_may_be_specified_1 getArgument isVersionCompatible BuildException InternalAntMessages getString InternalAntRunner Specifying_an_InputHandler_is_an_Ant_1 _feature _Please_update_your_Ant_classpath_to_include_an_Ant_version_greater_than_this _2 BuildException InternalAntMessages getString InternalAntRunner You_must_specify_a_classname_when_using_the_ inputhandler_argument_1 inputHandlerClassname getArgument BuildException InternalAntMessages getString InternalAntRunner Only_one_input_handler_class_may_be_specified _2
private boolean process Command Line List commands if commands remove help commands remove h NON NLS 1 NON NLS 2 print Usage return false if commands remove version NON NLS 1 print Version return false if commands remove verbose commands remove v NON NLS 1 NON NLS 2 print Version set Message Output Level Project MSG VERBOSE if commands remove debug commands remove d NON NLS 1 NON NLS 2 print Version set Message Output Level Project MSG DEBUG if commands remove quiet commands remove q NON NLS 1 NON NLS 2 set Message Output Level Project MSG WARN if commands remove emacs commands remove e NON NLS 1 NON NLS 2 emacs Mode true if build Logger null build Logger set Emacs Mode true if commands remove diagnostics NON NLS 1 if is Version Compatible 1 5 NON NLS 1 throw new Build Exception Internal Ant Messages get String Internal Ant Runner The diagnositics options is an Ant 1 5  feature  Please update your Ant classpath to include an Ant version greater than this  4 NON NLS 1 try Diagnostics do Report System out catch Null Pointer Exception e log Message get Current Project Internal Ant Messages get String Internal Ant Runner ANT HOME must be set to use Ant diagnostics 2 Project MSG ERR NON NLS 1 return false String arg get Argument commands logfile NON NLS 1 if arg null arg get Argument commands l NON NLS 1 if arg null if arg length 0 String message Internal Ant Messages get String Internal Ant Runner You must specify a log file when using the  log argument 3 NON NLS 1 log Message current Project message Project MSG ERR throw new Build Exception message try create Log File arg catch IO Exception e just log message and ignore exception log Message get Current Project Message Format format Internal Ant Messages get String Internal Ant Runner Could not write to the specified log file   0  Make sure the path exists and you have write permissions  2 new String arg Project MSG ERR NON NLS 1 return false arg get Argument commands buildfile NON NLS 1 if arg null arg get Argument commands file NON NLS 1 if arg null arg get Argument commands f NON NLS 1 if arg null if arg length 0 String message Internal Ant Messages get String Internal Ant Runner You must specify a buildfile when using the  buildfile argument 4 NON NLS 1 log Message current Project message Project MSG ERR throw new Build Exception message set Build File Location arg if is Version Compatible 1 6 NON NLS 1 if commands remove k commands remove keep going NON NLS 1 NON NLS 2 keep Going true if commands remove noinput NON NLS 1 allow Input false arg get Argument commands lib NON NLS 1 if arg null log Message current Project Internal Ant Messages get String Internal Ant Runner 157 Project MSG ERR NON NLS 1 return false arg get Argument commands find NON NLS 1 if arg null arg get Argument commands s NON NLS 1 if arg null log Message current Project Internal Ant Messages get String Internal Ant Runner find not supported Project MSG ERR NON NLS 1 return false if commands null commands is Empty process Unrecognized Commands commands if commands null commands is Empty process Targets commands return true  processCommandLine printUsage printVersion printVersion setMessageOutputLevel MSG_VERBOSE printVersion setMessageOutputLevel MSG_DEBUG setMessageOutputLevel MSG_WARN emacsMode buildLogger buildLogger setEmacsMode isVersionCompatible BuildException InternalAntMessages getString InternalAntRunner The_diagnositics_options_is_an_Ant_1 _feature _Please_update_your_Ant_classpath_to_include_an_Ant_version_greater_than_this _4 doReport NullPointerException logMessage getCurrentProject InternalAntMessages getString InternalAntRunner ANT_HOME_must_be_set_to_use_Ant_diagnostics_2 MSG_ERR getArgument getArgument InternalAntMessages getString InternalAntRunner You_must_specify_a_log_file_when_using_the_ log_argument_3 logMessage currentProject MSG_ERR BuildException createLogFile IOException logMessage getCurrentProject MessageFormat InternalAntMessages getString InternalAntRunner Could_not_write_to_the_specified_log_file__ _Make_sure_the_path_exists_and_you_have_write_permissions _2 MSG_ERR getArgument getArgument getArgument InternalAntMessages getString InternalAntRunner You_must_specify_a_buildfile_when_using_the_ buildfile_argument_4 logMessage currentProject MSG_ERR BuildException setBuildFileLocation isVersionCompatible keepGoing allowInput getArgument logMessage currentProject InternalAntMessages getString InternalAntRunner MSG_ERR getArgument getArgument logMessage currentProject InternalAntMessages getString InternalAntRunner find_not_supported MSG_ERR isEmpty processUnrecognizedCommands isEmpty processTargets
private void process Unrecognized Commands List commands int p 1 find the last arg that begins with for int i commands size 1 i 0 i if String commands get 0 starts With NON NLS 1 p i break if p 0 return remove everything preceding that last arg String s NON NLS 1 for int i 0 i p i s String commands get 0 NON NLS 1 commands remove 0 warn of ignored commands String message Message Format format Internal Ant Messages get String Internal Ant Runner Unknown argument   0  2 new Object s substring 1 NON NLS 1 log Message current Project message Project MSG WARN  processUnrecognizedCommands startsWith MessageFormat InternalAntMessages getString InternalAntRunner Unknown_argument__ _2 logMessage currentProject MSG_WARN
private void process Targets List commands if targets null targets new Vector commands size for Iterator iter commands iterator iter has Next targets add iter next  processTargets hasNext
private void create Log File String file Name throws File Not Found Exception IO Exception File log File get File Relative To Base Dir file Name this stream is closed in the finally block of run list out new Print Stream new File Output Stream log File err out log Message get Current Project Message Format format Internal Ant Messages get String Internal Ant Runner Using  0  file as build log  1 new String log File get Canonical Path Project MSG INFO NON NLS 1 if build Logger null build Logger set Error Print Stream err build Logger set Output Print Stream out  createLogFile fileName FileNotFoundException IOException logFile getFileRelativeToBaseDir fileName PrintStream FileOutputStream logFile logMessage getCurrentProject MessageFormat InternalAntMessages getString InternalAntRunner Using_ _file_as_build_log _1 logFile getCanonicalPath MSG_INFO buildLogger buildLogger setErrorPrintStream buildLogger setOutputPrintStream
private File get File Relative To Base Dir String file Name I Path path new Path file Name if path is Absolute String base get Current Project get User Property basedir NON NLS 1 if base null File base Dir new File base if base Dir null relative to the base dir path new Path base Dir get Absolute Path else relative to the build file location path new Path get Build File Location path path remove Last Segments 1 path path add Trailing Separator path path append file Name return path to File  getFileRelativeToBaseDir fileName IPath fileName isAbsolute getCurrentProject getUserProperty baseDir baseDir baseDir getAbsolutePath getBuildFileLocation removeLastSegments addTrailingSeparator fileName toFile
private void process Properties List commands MULTIPLE property files are allowed String arg get Argument commands propertyfile NON NLS 1 while arg null if is Version Compatible 1 5 NON NLS 1 log Message current Project Internal Ant Messages get String Internal Ant Runner Specifying property files is a Ant 1 5  feature  Please update your Ant classpath  6 Project MSG ERR NON NLS 1 break if arg length 0 String message Internal Ant Messages get String Internal Ant Runner You must specify a property filename when using the  propertyfile argument 3 NON NLS 1 log Message current Project message Project MSG ERR throw new Build Exception message property Files add arg arg get Argument commands propertyfile NON NLS 1 String global Property Files Ant Core Plugin get Plugin get Preferences get Custom Property Files if global Property Files length 0 if property Files null property Files new Array List global Property Files length property Files add All Arrays as List global Property Files if property Files null property Files is Empty load Property Files if commands null return process MinusD Properties commands  processProperties getArgument isVersionCompatible logMessage currentProject InternalAntMessages getString InternalAntRunner Specifying_property_files_is_a_Ant_1 _feature _Please_update_your_Ant_classpath _6 MSG_ERR InternalAntMessages getString InternalAntRunner You_must_specify_a_property_filename_when_using_the_ propertyfile_argument_3 logMessage currentProject MSG_ERR BuildException propertyFiles getArgument globalPropertyFiles AntCorePlugin getPlugin getPreferences getCustomPropertyFiles globalPropertyFiles propertyFiles propertyFiles ArrayList globalPropertyFiles propertyFiles addAll asList globalPropertyFiles propertyFiles propertyFiles isEmpty loadPropertyFiles processMinusDProperties
private void process MinusD Properties List commands String args String commands to Array new String commands size for int i 0 i args length i String arg args i if arg starts With D NON NLS 1 String name arg substring 2 arg length String value null int pos Eq name index Of NON NLS 1 if pos Eq 0 value name substring 1 name NON NLS 1 else if pos Eq 0 pos Eq name length 1 value name substring pos Eq 1 trim name name substring 0 pos Eq if value null the user has specified something like Debug continue if user Properties null user Properties new Hash Map user Properties put name value commands remove args i  processMinusDProperties toArray startsWith posEq indexOf posEq posEq posEq posEq posEq userProperties userProperties HashMap userProperties
private void print Help Project project if project get Description null log Message project project get Description Project MSG INFO print Targets project  printHelp getDescription logMessage getDescription MSG_INFO printTargets
fronts private void print Version log Message get Current Project Main get Ant Version Project MSG INFO  printVersion logMessage getCurrentProject getAntVersion MSG_INFO
private void print Usage String l Sep System get Property line separator NON NLS 1 String Buffer msg new String Buffer msg append ant NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner options 13 NON NLS 1 msg append NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner target 15 NON NLS 1 msg append NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner target 15 NON NLS 1 msg append 2 NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner target 15 NON NLS 1 msg append 3 NON NLS 1 msg append l Sep msg append Internal Ant Messages get String Internal Ant Runner Options   21 NON NLS 1 msg append l Sep msg append t help h t t t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner print this message 23 NON NLS 1 msg append l Sep msg append t projecthelp p t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner print project help information 25 NON NLS 1 msg append l Sep msg append t version t t t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner print the version information and exit 27 NON NLS 1 msg append l Sep msg append t diagnostics t t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 12 NON NLS 1 msg append l Sep msg append Internal Ant Messages get String Internal Ant Runner 13 NON NLS 1 msg append l Sep msg append t quiet q t t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner be extra quiet 29 NON NLS 1 msg append l Sep msg append t verbose v t t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner be extra verbose 31 NON NLS 1 msg append l Sep msg append t debug d t t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner print debugging information 33 NON NLS 1 msg append l Sep msg append t emacs e t t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner produce logging information without adornments 35 NON NLS 1 msg append l Sep msg append t logfile t file t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner use given file for log 37 NON NLS 1 msg append l Sep msg append t t l t file NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 1 NON NLS 1 NON NLS 2 msg append l Sep msg append t logger classname t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner the class which is to perform logging 39 NON NLS 1 msg append l Sep msg append t listener classname t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner add an instance of class as a project listener 41 NON NLS 1 msg append l Sep msg append t noinput t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 158 NON NLS 1 msg append l Sep msg append t buildfile t file t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner use given buildfile 43 NON NLS 1 msg append l Sep msg append t t file t file NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 1 NON NLS 1 msg append l Sep msg append t t f t t file NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 1 NON NLS 1 msg append l Sep msg append t D property value t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner use value for given property 45 NON NLS 1 msg append l Sep msg append t keep going k NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 159 NON NLS 1 msg append l Sep msg append Internal Ant Messages get String Internal Ant Runner 160 NON NLS 1 msg append l Sep msg append t propertyfile name t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 19 NON NLS 1 msg append l Sep msg append Internal Ant Messages get String Internal Ant Runner 20 NON NLS 1 msg append l Sep msg append t inputhandler class t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 22 NON NLS 1 msg append l Sep log Message get Current Project msg to String Project MSG INFO  printUsage lSep getProperty StringBuffer StringBuffer InternalAntMessages getString InternalAntRunner options_13 InternalAntMessages getString InternalAntRunner target_15 InternalAntMessages getString InternalAntRunner target_15 InternalAntMessages getString InternalAntRunner target_15 lSep InternalAntMessages getString InternalAntRunner Options___21 lSep InternalAntMessages getString InternalAntRunner print_this_message_23 lSep InternalAntMessages getString InternalAntRunner print_project_help_information_25 lSep InternalAntMessages getString InternalAntRunner print_the_version_information_and_exit_27 lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner be_extra_quiet_29 lSep InternalAntMessages getString InternalAntRunner be_extra_verbose_31 lSep InternalAntMessages getString InternalAntRunner print_debugging_information_33 lSep InternalAntMessages getString InternalAntRunner produce_logging_information_without_adornments_35 lSep InternalAntMessages getString InternalAntRunner use_given_file_for_log_37 lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner the_class_which_is_to_perform_logging_39 lSep InternalAntMessages getString InternalAntRunner add_an_instance_of_class_as_a_project_listener_41 lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner use_given_buildfile_43 lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner use_value_for_given_property_45 lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner lSep logMessage getCurrentProject toString MSG_INFO
private String get Argument List commands String param if commands null return null int index commands index Of param if index 1 return null commands remove index if index commands size if this is the last command return NON NLS 1 String command String commands get index if command starts With new parameter NON NLS 1 return NON NLS 1 commands remove index return command  getArgument indexOf startsWith
private Array List get Array List String args if args null return null We could be using Arrays as List here but it does not specify what kind of list it will return We need a list that implements the method List remove Object and Array List does Array List result new Array List args length for int i 0 i args length i result add args i return result  ArrayList getArrayList asList ArrayList ArrayList ArrayList
Sets the build progress monitor param monitor The progress monitor to use public void set Progress Monitor I Progress Monitor monitor this monitor monitor  setProgressMonitor IProgressMonitor
private Project get Current Project return current Project  getCurrentProject currentProject
private void set Current Project Project current Project this current Project current Project  setCurrentProject currentProject currentProject currentProject
public String get Build Exception Error Message Throwable t if t instanceof Build Exception return t to String return null  getBuildExceptionErrorMessage BuildException toString
Load all properties from the files specified by propertyfile private void load Property Files Iterator itr property Files iterator while itr has Next String filename String itr next File file get File Relative To Base Dir filename Properties props new Properties File Input Stream fis null try fis new File Input Stream file props load fis catch IO Exception e String msg Message Format format Internal Ant Messages get String Internal Ant Runner Could not load property file  0    1  4 new String filename e get Message NON NLS 1 log Message get Current Project msg Project MSG ERR finally if fis null try fis close catch IO Exception e if user Properties null user Properties new Hash Map Enumeration property Names props property Names while property Names has More Elements String name String property Names next Element most specific to global do not overwrite specific with a global property if user Properties get name null user Properties put name props get Property name  loadPropertyFiles propertyFiles hasNext getFileRelativeToBaseDir FileInputStream FileInputStream IOException MessageFormat InternalAntMessages getString InternalAntRunner Could_not_load_property_file_ __ _4 getMessage logMessage getCurrentProject MSG_ERR IOException userProperties userProperties HashMap propertyNames propertyNames propertyNames hasMoreElements propertyNames nextElement userProperties userProperties getProperty
private void add Input Handler Project project if is Version Compatible 1 5 NON NLS 1 return Input Handler Setter setter new Input Handler Setter setter set Input Handler project input Handler Classname  addInputHandler isVersionCompatible InputHandlerSetter InputHandlerSetter setInputHandler inputHandlerClassname
private void set Java Class Path URL ant Classpath null Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences if custom Classpath null ant Classpath prefs getUR Ls else URL extra Classpath prefs get Extra ClasspathUR Ls ant Classpath new URL custom Classpath length extra Classpath length System arraycopy custom Classpath 0 ant Classpath 0 custom Classpath length System arraycopy extra Classpath 0 ant Classpath custom Classpath length extra Classpath length String Buffer buff new String Buffer File file null for int i 0 i ant Classpath length i try file new File Platform as LocalURL ant Classpath i get Path catch IO Exception e continue buff append file get Absolute Path buff append NON NLS 1 org apache tools ant types Path system Classpath new org apache tools ant types Path null buff substring 0 buff length 2 org apache tools ant types Path system Classpath system Classpath  setJavaClassPath antClasspath AntCorePreferences AntCorePlugin getPlugin getPreferences customClasspath antClasspath getURLs extraClasspath getExtraClasspathURLs antClasspath customClasspath extraClasspath customClasspath antClasspath customClasspath extraClasspath antClasspath customClasspath extraClasspath StringBuffer StringBuffer antClasspath asLocalURL antClasspath getPath IOException getAbsolutePath systemClasspath systemClasspath systemClasspath
Sets the custom classpath to be included when setting the Java classpath for this build param classpath The custom classpath for this build public void set Custom Classpath URL classpath custom Classpath classpath  setCustomClasspath customClasspath

private Hashtable type Name To Class null public Internal Project super  typeNameToClass InternalProject
public void init throws Build Exception set Java Version Property try Class task Class Class for Name org apache tools ant taskdefs Property NON NLS 1 add Task Definition property task Class NON NLS 1 task Class Class for Name org apache tools ant taskdefs Typedef NON NLS 1 add Task Definition typedef task Class NON NLS 1 task Class Class for Name org apache tools ant taskdefs Taskdef NON NLS 1 add Task Definition taskdef task Class NON NLS 1 catch No Class Def Found Error e throw new Build Exception Internal Ant Messages get String Internal Ant Runner Missing Class e NON NLS 1 catch Class Not Found Exception c throw new Build Exception Internal Ant Messages get String Internal Ant Runner Missing Class c NON NLS 1 set System Properties  BuildException setJavaVersionProperty taskClass forName addTaskDefinition taskClass taskClass forName addTaskDefinition taskClass taskClass forName addTaskDefinition taskClass NoClassDefFoundError BuildException InternalAntMessages getString InternalAntRunner Missing_Class ClassNotFoundException BuildException InternalAntMessages getString InternalAntRunner Missing_Class setSystemProperties
public Object create Data Type String type Name throws Build Exception if type Name To Class null initialize Types Class type Class Class type Name To Class get type Name if type Class null return null Throwable thrown null try Constructor ctor null boolean no Arg false Data Type can have a no arg constructor or take a single Project argument try ctor type Class get Constructor new Class 0 no Arg true catch No Such Method Exception nse ctor type Class get Constructor new Class Project class no Arg false Object o null if no Arg o ctor new Instance new Object 0 else o ctor new Instance new Object this if o instanceof Project Component Project Component o set Project this return o catch Invocation Target Exception ite thrown ite get Target Exception catch Illegal Argument Exception e thrown e catch Instantiation Exception e thrown e catch Illegal Access Exception e thrown e catch No Such Method Exception nse thrown nse catch No Class Def Found Error ncdfe thrown ncdfe if thrown null String message Message Format format Internal Ant Messages get String Internal Project 0 new String type Name thrown to String NON NLS 1 throw new Build Exception message thrown this line is actually unreachable return null  createDataType typeName BuildException typeNameToClass initializeTypes typeClass typeNameToClass typeName typeClass noArg DataType typeClass getConstructor noArg NoSuchMethodException typeClass getConstructor noArg noArg newInstance newInstance ProjectComponent ProjectComponent setProject InvocationTargetException getTargetException IllegalArgumentException InstantiationException IllegalAccessException NoSuchMethodException NoClassDefFoundError MessageFormat InternalAntMessages getString InternalProject typeName toString BuildException
Initialize the mapping of data type name to data type classname private void initialize Types type Name To Class new Hashtable 18 String data Defs org apache tools ant types defaults properties NON NLS 1 try Properties props new Properties Input Stream in Project class get Resource As Stream data Defs if in null return props load in in close Enumeration enumeration props property Names while enumeration has More Elements String type Name String enumeration next Element String class Name props get Property type Name try Class type Class Class for Name class Name type Name To Class put type Name type Class catch No Class Def Found Error e ignore catch Class Not Found Exception c ignore catch IO Exception ioe return  initializeTypes typeNameToClass dataDefs InputStream getResourceAsStream dataDefs propertyNames hasMoreElements typeName nextElement className getProperty typeName typeClass forName className typeNameToClass typeName typeClass NoClassDefFoundError ClassNotFoundException IOException
public Hashtable get Data Type Definitions if type Name To Class null initialize Types return type Name To Class  getDataTypeDefinitions typeNameToClass initializeTypes typeNameToClass
see org apache tools ant Project add Data Type Definition java lang String java lang Class public void add Data Type Definition String type Name Class type Class get Data Type Definitions type Name To Class put type Name type Class  addDataTypeDefinition addDataTypeDefinition typeName typeClass getDataTypeDefinitions typeNameToClass typeName typeClass

public class Null Input Handler implements Input Handler public Null Input Handler  NullInputHandler InputHandler NullInputHandler
see org apache tools ant input Input Handler handle Input org apache tools ant input Input Request public void handle Input Input Request request throws Build Exception  InputHandler handleInput InputRequest handleInput InputRequest BuildException

Gets the class Name return Returns a String public String get Class Name return f Class Name  className getClassName fClassName
Sets the class Name param class Name The class Name to set public void set Class Name String class Name f Class Name class Name  className className className setClassName className fClassName className
Gets the library return Returns a URL deprecated use get Library Entry public URL get Library if f Library null return f Library return f Library Entry get EntryURL  getLibraryEntry getLibrary fLibrary fLibrary fLibraryEntry getEntryURL
Sets the library param library The library to set deprecated use set Library Entry I Ant Classpath Entry public void set Library URL library f Library library  setLibraryEntry IAntClasspathEntry setLibrary fLibrary
Gets the library classpath entry return Returns a classpath entry for the library of this Ant object public I Ant Classpath Entry get Library Entry if f Library Entry null return f Library Entry f Library Entry new Ant Classpath Entry f Library return f Library Entry  IAntClasspathEntry getLibraryEntry fLibraryEntry fLibraryEntry fLibraryEntry AntClasspathEntry fLibrary fLibraryEntry
Sets the library classpath entry param library Entry The library entry to set public void set Library Entry I Ant Classpath Entry library Entry f Library Entry library Entry  libraryEntry setLibraryEntry IAntClasspathEntry libraryEntry fLibraryEntry libraryEntry
see java lang Object to String public String to String return f Name  toString toString fName
Returns whether this Ant object has been created because of an extension point definition return boolean public boolean is Default return f Plugin Label null  isDefault fPluginLabel
Sets that this ant object has been created by the appropriate extension point param is Default Whether this Ant object has been created because of an extension point defintion deprecated Since 3 0 Set the plugin label to indicate a default object public void set Is Default boolean is Default if is Default f Plugin Label null  isDefault setIsDefault isDefault isDefault fPluginLabel
Sets the label of the plugin that contributed this Ant object via an extension point param plugin Label The label of the plugin since 3 0 public void set Plugin Label String plugin Label f Plugin Label plugin Label  pluginLabel setPluginLabel pluginLabel fPluginLabel pluginLabel
Returns the label of the plugin that contributed this Ant object via an extension point return plugin Label The label of the plugin since 3 0 public String get Plugin Label return f Plugin Label  pluginLabel getPluginLabel fPluginLabel
Returns whether this Ant object requires the Eclipse runtime to be relevant Defaults value is code true code return whether this Ant obhject requires the Eclipse runtime since 3 0 public boolean is Eclipse Runtime Required return eclipse Runtime  isEclipseRuntimeRequired eclipseRuntime
public void set Eclipse Runtime Required boolean eclipse Runtime this eclipse Runtime eclipse Runtime  setEclipseRuntimeRequired eclipseRuntime eclipseRuntime eclipseRuntime

private I Progress Monitor task Monitor protected I Progress Monitor get Main Monitor return main Monitor  IProgressMonitor taskMonitor IProgressMonitor getMainMonitor mainMonitor
protected Target get Main Target return main Target  getMainTarget mainTarget
protected I Progress Monitor get Target Monitor return target Monitor  IProgressMonitor getTargetMonitor targetMonitor
protected I Progress Monitor get Task Monitor return task Monitor  IProgressMonitor getTaskMonitor taskMonitor
protected void set Main Monitor I Progress Monitor main Monitor this main Monitor main Monitor  setMainMonitor IProgressMonitor mainMonitor mainMonitor mainMonitor
protected void set Main Target Target main Target this main Target main Target  setMainTarget mainTarget mainTarget mainTarget
protected void set Target Monitor I Progress Monitor target Monitor this target Monitor target Monitor  setTargetMonitor IProgressMonitor targetMonitor targetMonitor targetMonitor
protected void set Task Monitor I Progress Monitor task Monitor this task Monitor task Monitor  setTaskMonitor IProgressMonitor taskMonitor taskMonitor taskMonitor
public Progress Build Listener Project project List target Names I Progress Monitor monitor projects new Hash Map main Project project Project Monitors monitors new Project Monitors if monitor null monitor new Null Progress Monitor monitors set Main Monitor monitor projects put main Project monitors List targets new Array List target Names size for int i 0 i target Names size i String target Name String target Names get i Target target Target main Project get Targets get target Name if target null targets add target int work compute Work targets monitors get Main Monitor begin Task work NON NLS 1  ProgressBuildListener targetNames IProgressMonitor HashMap mainProject ProjectMonitors ProjectMonitors NullProgressMonitor setMainMonitor mainProject ArrayList targetNames targetNames targetName targetNames mainProject getTargets targetName computeWork getMainMonitor beginTask
see org apache tools ant Build Listener build Started org apache tools ant Build Event public void build Started Build Event event check Canceled  BuildListener buildStarted BuildEvent buildStarted BuildEvent checkCanceled
protected int compute Work List targets int result 0 for int i 0 i targets size i result result count Target Target targets get i return result  computeWork countTarget
protected int count Target Target target int result 1 Project project target get Project Hashtable targets project get Targets for Enumeration dependencies target get Dependencies dependencies has More Elements String target Name String dependencies next Element Target dependency Target targets get target Name if dependency null result result count Target dependency we have to handle antcall tasks as well Task tasks target get Tasks for int i 0 i tasks length i if tasks i instanceof Call Target As we do not have access to the information at least in Ant 1 4 1 describing what target is executed by this antcall task we assume a scenario where it depends on all targets of the project but itself result result targets size 1 return result  countTarget getProject getTargets getDependencies hasMoreElements targetName nextElement targetName countTarget getTasks CallTarget
public void build Finished Build Event event Project Monitors monitors Project Monitors projects get main Project monitors get Main Monitor done Set keys projects key Set Iterator itr keys iterator while itr has Next Project project Project itr next project remove Build Listener this project get References remove Ant Core Plugin ECLIPSE PROGRESS MONITOR  buildFinished BuildEvent ProjectMonitors ProjectMonitors mainProject getMainMonitor keySet hasNext removeBuildListener getReferences AntCorePlugin ECLIPSE_PROGRESS_MONITOR
public void target Started Build Event event check Canceled Project current Project event get Project if current Project null return Target target event get Target Project Monitors monitors Project Monitors projects get current Project if monitors is null we are in a new script if monitors null monitors create Monitors current Project target monitors set Target Monitor sub Monitor For monitors get Main Monitor 1 int work target null target get Tasks length 100 monitors get Target Monitor begin Task work NON NLS 1  targetStarted BuildEvent checkCanceled currentProject getProject currentProject getTarget ProjectMonitors ProjectMonitors currentProject createMonitors currentProject setTargetMonitor subMonitorFor getMainMonitor getTasks getTargetMonitor beginTask
protected Project Monitors create Monitors Project current Project Target target Project Monitors monitors new Project Monitors remember the target so we can remove this monitors object later monitors set Main Target target List targets new Array List 1 targets add target int work compute Work targets Project Monitors parent Monitors null if parent Project null parent Monitors Project Monitors projects get main Project monitors set Main Monitor sub Monitor For parent Monitors get Main Monitor 1 else parent Monitors Project Monitors projects get parent Project parent Project null monitors set Main Monitor sub Monitor For parent Monitors get Task Monitor 1 monitors get Main Monitor begin Task work NON NLS 1 projects put current Project monitors return monitors  ProjectMonitors createMonitors currentProject ProjectMonitors ProjectMonitors setMainTarget ArrayList computeWork ProjectMonitors parentMonitors parentProject parentMonitors ProjectMonitors mainProject setMainMonitor subMonitorFor parentMonitors getMainMonitor parentMonitors ProjectMonitors parentProject parentProject setMainMonitor subMonitorFor parentMonitors getTaskMonitor getMainMonitor beginTask currentProject
public void target Finished Build Event event check Canceled Project current Project event get Project if current Project null return Project Monitors monitors Project Monitors projects get current Project if monitors null return monitors get Target Monitor done if this is not the main project test if we are done with this project if current Project main Project monitors get Main Target event get Target monitors get Main Monitor done projects remove current Project  targetFinished BuildEvent checkCanceled currentProject getProject currentProject ProjectMonitors ProjectMonitors currentProject getTargetMonitor currentProject mainProject getMainTarget getTarget getMainMonitor currentProject
public void task Started Build Event event check Canceled Project current Project event get Project if current Project null return current Project get References remove Ant Core Plugin ECLIPSE PROGRESS MONITOR Project Monitors monitors Project Monitors projects get current Project if monitors null return Task task event get Task if task null return current Task Thread Thread current Thread monitors set Task Monitor sub Monitor For monitors get Target Monitor 1 monitors get Task Monitor begin Task 1 NON NLS 1 If this script is calling another one track the project chain if task instanceof Ant parent Project current Project else current Project add Reference Ant Core Plugin ECLIPSE PROGRESS MONITOR monitors get Task Monitor  taskStarted BuildEvent checkCanceled currentProject getProject currentProject currentProject getReferences AntCorePlugin ECLIPSE_PROGRESS_MONITOR ProjectMonitors ProjectMonitors currentProject getTask currentTaskThread currentThread setTaskMonitor subMonitorFor getTargetMonitor getTaskMonitor beginTask parentProject currentProject currentProject addReference AntCorePlugin ECLIPSE_PROGRESS_MONITOR getTaskMonitor
public void task Finished Build Event event check Canceled Project project event get Project if project null return project get References remove Ant Core Plugin ECLIPSE PROGRESS MONITOR Project Monitors monitors Project Monitors projects get project if monitors null return monitors get Task Monitor done current Task Thread null  taskFinished BuildEvent checkCanceled getProject getReferences AntCorePlugin ECLIPSE_PROGRESS_MONITOR ProjectMonitors ProjectMonitors getTaskMonitor currentTaskThread
see org apache tools ant Build Listener message Logged org apache tools ant Build Event public void message Logged Build Event event check Canceled  BuildListener messageLogged BuildEvent messageLogged BuildEvent checkCanceled
protected void check Canceled only cancel if the current task thread matches the current thread do not want to throw an exception in a separate thread or process see bug 32657 if current Task Thread null current Task Thread Thread current Thread return Project Monitors monitors Project Monitors projects get main Project if monitors get Main Monitor is Canceled current Task Thread null throw new Operation Canceled Exception Internal Ant Messages get String Progress Build Listener Build cancelled  5 NON NLS 1  checkCanceled currentTaskThread currentTaskThread currentThread ProjectMonitors ProjectMonitors mainProject getMainMonitor isCanceled currentTaskThread OperationCanceledException InternalAntMessages getString ProgressBuildListener Build_cancelled _5
protected I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks  IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor

public class Ant Property Value Provider implements I Ant Property Value Provider Returns the dynamic property values for Ant properties param property Name The name of the property to resovle the value for return The resolved value for the property see org eclipse ant core I Ant Property Value Provider get Ant Property Value String public String get Ant Property Value String property Name String value null if eclipse running equals property Name NON NLS 1 return true NON NLS 1 else if eclipse home equals property Name NON NLS 1 try value new File Platform resolve new URL platform base get Path get Absolute Path NON NLS 1 if value ends With NON NLS 1 value value substring 0 value length 1 catch Exception e Ant Core Plugin log e return value  AntPropertyValueProvider IAntPropertyValueProvider propertyName IAntPropertyValueProvider getAntPropertyValue getAntPropertyValue propertyName propertyName propertyName getPath getAbsolutePath endsWith AntCorePlugin

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Internal Core Ant Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME InternalCoreAntMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

protected Security Manager security Manager null protected Ant Security Manager Security Manager security Manager this security Manager security Manager  SecurityManager securityManager AntSecurityManager SecurityManager securityManager securityManager securityManager
see java lang Security Manager check Exit int public void check Exit int status no exit allowed System exit is being called by some ant task do not want Eclipse to exit if in the same VM The message is used in loggers to determine that this is not really an exception case throw new Ant Security Exception  SecurityManager checkExit checkExit AntSecurityException
see java lang Security Manager check Accept java lang String int public void check Accept String host int port if security Manager null security Manager check Accept host port  SecurityManager checkAccept checkAccept securityManager securityManager checkAccept
see java lang Security Manager check Access java lang Thread public void check Access Thread t if security Manager null security Manager check Access t  SecurityManager checkAccess checkAccess securityManager securityManager checkAccess
see java lang Security Manager check Access java lang Thread Group public void check Access Thread Group g if security Manager null security Manager check Access g  SecurityManager checkAccess ThreadGroup checkAccess ThreadGroup securityManager securityManager checkAccess
see java lang Security Manager check Awt Event Queue Access public void check Awt Event Queue Access if security Manager null security Manager check Awt Event Queue Access  SecurityManager checkAwtEventQueueAccess checkAwtEventQueueAccess securityManager securityManager checkAwtEventQueueAccess
see java lang Security Manager check Connect java lang String int java lang Object public void check Connect String host int port Object context if security Manager null security Manager check Connect host port context  SecurityManager checkConnect checkConnect securityManager securityManager checkConnect
see java lang Security Manager check Connect java lang String int public void check Connect String host int port if security Manager null security Manager check Connect host port  SecurityManager checkConnect checkConnect securityManager securityManager checkConnect
see java lang Security Manager check Create Class Loader public void check Create Class Loader if security Manager null security Manager check Create Class Loader  SecurityManager checkCreateClassLoader checkCreateClassLoader securityManager securityManager checkCreateClassLoader
see java lang Security Manager check Delete java lang String public void check Delete String file if security Manager null security Manager check Delete file  SecurityManager checkDelete checkDelete securityManager securityManager checkDelete
see java lang Security Manager check Exec java lang String public void check Exec String cmd if security Manager null security Manager check Exec cmd  SecurityManager checkExec checkExec securityManager securityManager checkExec
see java lang Security Manager check Link java lang String public void check Link String lib if security Manager null security Manager check Link lib  SecurityManager checkLink checkLink securityManager securityManager checkLink
see java lang Security Manager check Listen int public void check Listen int port if security Manager null security Manager check Listen port  SecurityManager checkListen checkListen securityManager securityManager checkListen
see java lang Security Manager check Member Access java lang Class int public void check Member Access Class clazz int which if security Manager null security Manager check Member Access clazz which  SecurityManager checkMemberAccess checkMemberAccess securityManager securityManager checkMemberAccess
see java lang Security Manager check Multicast java net Inet Address byte deprecated public void check Multicast Inet Address maddr byte ttl if security Manager null String host maddr get Host Address if host starts With host index Of 1 NON NLS 1 host host NON NLS 1 NON NLS 2 check Permission new Socket Permission host accept connect NON NLS 1  SecurityManager checkMulticast InetAddress checkMulticast InetAddress securityManager getHostAddress startsWith indexOf checkPermission SocketPermission
see java lang Security Manager check Multicast java net Inet Address public void check Multicast Inet Address maddr if security Manager null security Manager check Multicast maddr  SecurityManager checkMulticast InetAddress checkMulticast InetAddress securityManager securityManager checkMulticast
see java lang Security Manager check Package Access java lang String public void check Package Access String pkg if security Manager null security Manager check Package Access pkg  SecurityManager checkPackageAccess checkPackageAccess securityManager securityManager checkPackageAccess
see java lang Security Manager check Package Definition java lang String public void check Package Definition String pkg if security Manager null security Manager check Package Definition pkg  SecurityManager checkPackageDefinition checkPackageDefinition securityManager securityManager checkPackageDefinition
see java lang Security Manager check Permission java security Permission java lang Object public void check Permission Permission perm Object context if security Manager null security Manager check Permission perm context  SecurityManager checkPermission checkPermission securityManager securityManager checkPermission
see java lang Security Manager check Permission java security Permission public void check Permission Permission perm if security Manager null security Manager check Permission perm  SecurityManager checkPermission checkPermission securityManager securityManager checkPermission
see java lang Security Manager check Print Job Access public void check Print Job Access if security Manager null security Manager check Print Job Access  SecurityManager checkPrintJobAccess checkPrintJobAccess securityManager securityManager checkPrintJobAccess
see java lang Security Manager check Properties Access public void check Properties Access if security Manager null security Manager check Properties Access  SecurityManager checkPropertiesAccess checkPropertiesAccess securityManager securityManager checkPropertiesAccess
see java lang Security Manager check Property Access java lang String public void check Property Access String key if security Manager null security Manager check Property Access key  SecurityManager checkPropertyAccess checkPropertyAccess securityManager securityManager checkPropertyAccess
see java lang Security Manager check Read java io File Descriptor public void check Read File Descriptor fd if security Manager null security Manager check Read fd  SecurityManager checkRead FileDescriptor checkRead FileDescriptor securityManager securityManager checkRead
see java lang Security Manager check Read java lang String java lang Object public void check Read String file Object context if security Manager null security Manager check Read file context  SecurityManager checkRead checkRead securityManager securityManager checkRead
see java lang Security Manager check Read java lang String public void check Read String file if security Manager null security Manager check Read file  SecurityManager checkRead checkRead securityManager securityManager checkRead
see java lang Security Manager check Security Access java lang String public void check Security Access String target if security Manager null security Manager check Security Access target  SecurityManager checkSecurityAccess checkSecurityAccess securityManager securityManager checkSecurityAccess
see java lang Security Manager check Set Factory public void check Set Factory if security Manager null security Manager check Set Factory  SecurityManager checkSetFactory checkSetFactory securityManager securityManager checkSetFactory
see java lang Security Manager check System Clipboard Access public void check System Clipboard Access if security Manager null security Manager check System Clipboard Access  SecurityManager checkSystemClipboardAccess checkSystemClipboardAccess securityManager securityManager checkSystemClipboardAccess
see java lang Security Manager check Top Level Window java lang Object public boolean check Top Level Window Object window if security Manager null return security Manager check Top Level Window window return super check Top Level Window window  SecurityManager checkTopLevelWindow checkTopLevelWindow securityManager securityManager checkTopLevelWindow checkTopLevelWindow
see java lang Security Manager check Write java io File Descriptor public void check Write File Descriptor fd if security Manager null security Manager check Write fd  SecurityManager checkWrite FileDescriptor checkWrite FileDescriptor securityManager securityManager checkWrite
see java lang Security Manager check Write java lang String public void check Write String file if security Manager null security Manager check Write file  SecurityManager checkWrite checkWrite securityManager securityManager checkWrite
see java lang Security Manager get In Check deprecated public boolean get In Check if security Manager null return security Manager get In Check return super get In Check  SecurityManager getInCheck getInCheck securityManager securityManager getInCheck getInCheck
see java lang Security Manager get Security Context public Object get Security Context if security Manager null return security Manager get Security Context return super get Security Context  SecurityManager getSecurityContext getSecurityContext securityManager securityManager getSecurityContext getSecurityContext
see java lang Security Manager get Thread Group public Thread Group get Thread Group if security Manager null security Manager get Thread Group return super get Thread Group  SecurityManager getThreadGroup ThreadGroup getThreadGroup securityManager securityManager getThreadGroup getThreadGroup

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Ant Support Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME AntSupportMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

class Demux Input Stream Setter protected void remap System In Project project System set In new Demux Input Stream project  DemuxInputStreamSetter remapSystemIn setIn DemuxInputStream

public void handle Input Input Request request throws Build Exception if System get Property eclipse ant no Input null NON NLS 1 throw new Build Exception Ant Support Messages get String Ant Input Handler 5 NON NLS 1 Build Exception problem new Build Exception 1 Runnable runnable get Handle Input Runnable request problem Display get Default sync Exec runnable if problem 0 null throw problem 0  handleInput InputRequest BuildException getProperty noInput BuildException AntSupportMessages getString AntInputHandler BuildException BuildException getHandleInputRunnable getDefault syncExec
I Input Validator validator new I Input Validator public String is Valid String value request set Input value if request is Input Valid return null return Ant Support Messages get String Ant Input Handler Invalid input 2 NON NLS 1  IInputValidator IInputValidator isValid setInput isInputValid AntSupportMessages getString AntInputHandler Invalid_input_2
return new Runnable public void run String prompt get Prompt request String title Ant Support Messages get String Ant Input Handler Ant Input Request 1 NON NLS 1 I Input Validator validator new I Input Validator public String is Valid String value request set Input value if request is Input Valid return null return Ant Support Messages get String Ant Input Handler Invalid input 2 NON NLS 1 Input Dialog dialog new Input Dialog null title prompt validator NON NLS 1 if dialog open Window OK problem 0 new Build Exception Ant Support Messages get String Ant Input Handler Unable to respond to  input  request 4 NON NLS 1  getPrompt AntSupportMessages getString AntInputHandler Ant_Input_Request_1 IInputValidator IInputValidator isValid setInput isInputValid AntSupportMessages getString AntInputHandler Invalid_input_2 InputDialog InputDialog BuildException AntSupportMessages getString AntInputHandler Unable_to_respond_to_ _request_4
protected Runnable get Handle Input Runnable final Input Request request final Build Exception problem return new Runnable public void run String prompt get Prompt request String title Ant Support Messages get String Ant Input Handler Ant Input Request 1 NON NLS 1 I Input Validator validator new I Input Validator public String is Valid String value request set Input value if request is Input Valid return null return Ant Support Messages get String Ant Input Handler Invalid input 2 NON NLS 1 Input Dialog dialog new Input Dialog null title prompt validator NON NLS 1 if dialog open Window OK problem 0 new Build Exception Ant Support Messages get String Ant Input Handler Unable to respond to  input  request 4 NON NLS 1  getHandleInputRunnable InputRequest BuildException getPrompt AntSupportMessages getString AntInputHandler Ant_Input_Request_1 IInputValidator IInputValidator isValid setInput isInputValid AntSupportMessages getString AntInputHandler Invalid_input_2 InputDialog InputDialog BuildException AntSupportMessages getString AntInputHandler Unable_to_respond_to_ _request_4

protected void set Input Handler Project project String input Handler Classname Input Handler handler null if input Handler Classname null handler new Default Input Handler else try handler Input Handler Class for Name input Handler Classname new Instance catch Class Cast Exception e String msg Message Format format Internal Ant Messages get String Internal Ant Runner The specified input handler class  0  does not implement the org apache tools ant input InputHandler interface 5 new String input Handler Classname NON NLS 1 throw new Build Exception msg e catch Exception e String msg Message Format format Internal Ant Messages get String Internal Ant Runner Unable to instantiate specified input handler class  0     1  6 new String input Handler Classname e get Class get Name NON NLS 1 throw new Build Exception msg e project set Input Handler handler  setInputHandler inputHandlerClassname InputHandler inputHandlerClassname DefaultInputHandler InputHandler forName inputHandlerClassname newInstance ClassCastException MessageFormat InternalAntMessages getString InternalAntRunner The_specified_input_handler_class_ _does_not_implement_the_org InputHandler_interface_5 inputHandlerClassname BuildException MessageFormat InternalAntMessages getString InternalAntRunner Unable_to_instantiate_specified_input_handler_class_ ___ _6 inputHandlerClassname getClass getName BuildException setInputHandler

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Internal Ant Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME InternalAntMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

private boolean allow Input true public static void main String args new Internal Ant Runner run get Array List args  allowInput InternalAntRunner getArrayList
private void add Build Listeners Project project String class Name null try Build Logger logger create Logger if logger null project add Build Listener logger if build Listeners null for Iterator iterator build Listeners iterator iterator has Next class Name String iterator next Class listener Class for Name class Name project add Build Listener Build Listener listener new Instance catch Class Cast Exception e String message Message Format format Internal Ant Messages get String Internal Ant Runner 0  which was specified to be a build listener is not an instance of org apache tools ant Build Listener  1 new String class Name NON NLS 1 log Message null message Project MSG ERR throw new Build Exception message e catch Build Exception e throw e catch Exception e throw new Build Exception e  addBuildListeners className BuildLogger createLogger addBuildListener buildListeners buildListeners hasNext className forName className addBuildListener BuildListener newInstance ClassCastException MessageFormat InternalAntMessages getString InternalAntRunner _which_was_specified_to_be_a_build_listener_is_not_an_instance_of_org BuildListener _1 className logMessage MSG_ERR BuildException BuildException BuildException
Parses the build file and adds necessary information into the given project param project The project to configure private void parse Build File Project project File build File new File get Build File Location if build File exists throw new Build Exception Message Format format Internal Ant Messages get String Internal Ant Runner Buildfile   0  does not exist   1 NON NLS 1 new String build File get Absolute Path if build File is File throw new Build Exception Message Format format Internal Ant Messages get String Internal Ant Runner Buildfile   0  is not a file 1 NON NLS 1 new String build File get Absolute Path Project Helper helper Project Helper get Project Helper project add Reference ant project Helper helper NON NLS 1 helper parse project build File  parseBuildFile buildFile getBuildFileLocation buildFile BuildException MessageFormat InternalAntMessages getString InternalAntRunner Buildfile__ _does_not_exist_ _1 buildFile getAbsolutePath buildFile isFile BuildException MessageFormat InternalAntMessages getString InternalAntRunner Buildfile__ _is_not_a_file_1 buildFile getAbsolutePath ProjectHelper ProjectHelper getProjectHelper addReference projectHelper buildFile
private void print Arguments Project project if message Output Level Project MSG DEBUG message Output Level Project MSG VERBOSE return String Buffer sb new String Buffer for int i 0 i extra Arguments length i sb append extra Arguments i sb append project log Message Format format Internal Ant Messages get String Internal Ant Runner Arguments   0  2 new String sb to String trim NON NLS 1  printArguments messageOutputLevel MSG_DEBUG messageOutputLevel MSG_VERBOSE StringBuffer StringBuffer extraArguments extraArguments MessageFormat InternalAntMessages getString InternalAntRunner Arguments__ _2 toString
Logs a message with the client that lists the targets in a project param project the project to list targets from private void print Targets Project project notify the logger that project help message are coming since there is no buildstarted or targetstarted to to be used to establish the connection log Message project MSG PROJECT HELP NON NLS 1 find the target with the longest name int max Length 0 Enumeration ptargets project get Targets elements String target Name String target Description Target current Target split the targets in top level and sub targets depending on the presence of a description List top Names new Array List List top Descriptions new Array List List sub Names new Array List while ptargets has More Elements current Target Target ptargets next Element target Name current Target get Name target Description current Target get Description if target Description null sub Names add target Name else top Names add target Name top Descriptions add target Description if target Name length max Length max Length target Name length Collections sort sub Names Collections sort top Names Collections sort top Descriptions String default Target Name project get Default Target if default Target Name null equals default Target Name shouldn t need to check but NON NLS 1 List default Name new Array List 1 List default Desc null default Name add default Target Name int index Of Def Desc top Names index Of default Target Name if index Of Def Desc 0 default Desc new Array List 1 default Desc add top Descriptions get index Of Def Desc print Targets project default Name default Desc Internal Ant Messages get String Internal Ant Runner Default target  3 max Length NON NLS 1 print Targets project top Names top Descriptions Internal Ant Messages get String Internal Ant Runner Main targets  4 max Length NON NLS 1 print Targets project sub Names null Internal Ant Messages get String Internal Ant Runner Subtargets  5 0 NON NLS 1  printTargets logMessage MSG_PROJECT_HELP maxLength getTargets targetName targetDescription currentTarget topNames ArrayList topDescriptions ArrayList subNames ArrayList hasMoreElements currentTarget nextElement targetName currentTarget getName targetDescription currentTarget getDescription targetDescription subNames targetName topNames targetName topDescriptions targetDescription targetName maxLength maxLength targetName subNames topNames topDescriptions defaultTargetName getDefaultTarget defaultTargetName defaultTargetName defaultName ArrayList defaultDesc defaultName defaultTargetName indexOfDefDesc topNames indexOf defaultTargetName indexOfDefDesc defaultDesc ArrayList defaultDesc topDescriptions indexOfDefDesc printTargets defaultName defaultDesc InternalAntMessages getString InternalAntRunner Default_target__3 maxLength printTargets topNames topDescriptions InternalAntMessages getString InternalAntRunner Main_targets__4 maxLength printTargets subNames InternalAntMessages getString InternalAntRunner Subtargets__5
Logs a message with the client that lists the target names and optional descriptions param project the enclosing target param names the targets names param descriptions the corresponding descriptions param heading the message heading param maxlen maximum length that can be allocated for a name private void print Targets Project project List names List descriptions String heading int maxlen now start printing the targets and their descriptions String l Sep System get Property line separator NON NLS 1 String spaces NON NLS 1 while spaces length maxlen spaces spaces String Buffer msg new String Buffer msg append heading l Sep l Sep for int i 0 i names size i msg append msg append names get i if descriptions null msg append spaces substring 0 maxlen String names get i length 2 msg append descriptions get i msg append l Sep log Message project msg to String Project MSG INFO  printTargets lSep getProperty StringBuffer StringBuffer lSep lSep lSep logMessage toString MSG_INFO
private void run List arg List set Current Project new Project Throwable error null Print Stream original Err System err Print Stream original Out System out Input Stream original In System in Security Manager originalSM System get Security Manager script Executed true try if arg List null arg List remove projecthelp arg List remove p NON NLS 1 NON NLS 2 project Help true get Current Project init if arg List null script Executed preprocess Command Line arg List if script Executed return add Build Listeners get Current Project process Properties arg List set Properties get Current Project add Input Handler get Current Project remap System In System set Out new Print Stream new Demux Output Stream get Current Project false System set Err new Print Stream new Demux Output Stream get Current Project true if project Help fire Build Started get Current Project if arg List null arg List is Empty try script Executed process Command Line arg List catch Build Exception e script Executed false throw e if script Executed return we do not want to set the default input stream for the default input handler as we currently have no means for querying from System in for input see bug 45484 if allow Input input Handler Classname null if is Version Compatible 1 6 NON NLS 1 get Current Project set Default Input Stream original In get Current Project log Message Format format Internal Ant Messages get String Internal Ant Runner Build file   0  1 new String get Build File Location NON NLS 1 set Tasks set Types if is Version Compatible 1 6 NON NLS 1 get Current Project set Keep Going Mode keep Going parse Build File get Current Project validate Default Target if project Help print Help get Current Project script Executed false return if extra Arguments null print Arguments get Current Project System set Security Manager new Ant Security Manager originalSM if targets null targets is Empty get Current Project execute Targets targets else get Current Project execute Target get Current Project get Default Target catch Ant Security Exception e expected catch Throwable e error e finally System set Err original Err System set Out original Out System set In original In if System get Security Manager instanceof Ant Security Manager System set Security Manager originalSM if project Help fire Build Finished get Current Project error close any user specified build log if err original Err err close if out original Out out close  argList setCurrentProject PrintStream originalErr PrintStream originalOut InputStream originalIn SecurityManager getSecurityManager scriptExecuted argList argList argList projectHelp getCurrentProject argList scriptExecuted preprocessCommandLine argList scriptExecuted addBuildListeners getCurrentProject processProperties argList setProperties getCurrentProject addInputHandler getCurrentProject remapSystemIn setOut PrintStream DemuxOutputStream getCurrentProject setErr PrintStream DemuxOutputStream getCurrentProject projectHelp fireBuildStarted getCurrentProject argList argList isEmpty scriptExecuted processCommandLine argList BuildException scriptExecuted scriptExecuted allowInput inputHandlerClassname isVersionCompatible getCurrentProject setDefaultInputStream originalIn getCurrentProject MessageFormat InternalAntMessages getString InternalAntRunner Build_file__ _1 getBuildFileLocation setTasks setTypes isVersionCompatible getCurrentProject setKeepGoingMode keepGoing parseBuildFile getCurrentProject validateDefaultTarget projectHelp printHelp getCurrentProject scriptExecuted extraArguments printArguments getCurrentProject setSecurityManager AntSecurityManager isEmpty getCurrentProject executeTargets getCurrentProject executeTarget getCurrentProject getDefaultTarget AntSecurityException setErr originalErr setOut originalOut setIn originalIn getSecurityManager AntSecurityManager setSecurityManager projectHelp fireBuildFinished getCurrentProject originalErr originalOut
private void set Tasks if eclipse Specified Tasks null Iterator itr eclipse Specified Tasks key Set iterator String task Name String task Class Name while itr has Next task Name String itr next task Class Name String eclipse Specified Tasks get task Name if is Version Compatible 1 6 NON NLS 1 Ant Type Definition def new Ant Type Definition def set Name task Name def set Class Name task Class Name def set Class Loader this get Class get Class Loader def set Adapt To Class Task class def set Adapter Class Task Adapter class Component Helper get Component Helper get Current Project add Data Type Definition def else try Class task Class Class for Name task Class Name get Current Project add Task Definition task Name task Class catch Class Not Found Exception e String message Message Format format Internal Ant Messages get String Internal Ant Runner 161 new String task Class Name task Name NON NLS 1 get Current Project log message Project MSG WARN  setTasks eclipseSpecifiedTasks eclipseSpecifiedTasks keySet taskName taskClassName hasNext taskName taskClassName eclipseSpecifiedTasks taskName isVersionCompatible AntTypeDefinition AntTypeDefinition setName taskName setClassName taskClassName setClassLoader getClass getClassLoader setAdaptToClass setAdapterClass TaskAdapter ComponentHelper getComponentHelper getCurrentProject addDataTypeDefinition taskClass forName taskClassName getCurrentProject addTaskDefinition taskName taskClass ClassNotFoundException MessageFormat InternalAntMessages getString InternalAntRunner taskClassName taskName getCurrentProject MSG_WARN
private void set Types if eclipse Specified Types null Iterator itr eclipse Specified Types key Set iterator String type Name String type Class Name while itr has Next type Name String itr next type Class Name String eclipse Specified Types get type Name if is Version Compatible 1 6 NON NLS 1 Ant Type Definition def new Ant Type Definition def set Name type Name def set Class Name type Class Name def set Class Loader this get Class get Class Loader Component Helper get Component Helper get Current Project add Data Type Definition def else try Class type Class Class for Name type Class Name get Current Project add Data Type Definition type Name type Class catch Class Not Found Exception e String message Message Format format Internal Ant Messages get String Internal Ant Runner 162 new String type Class Name type Name NON NLS 1 get Current Project log message Project MSG WARN  setTypes eclipseSpecifiedTypes eclipseSpecifiedTypes keySet typeName typeClassName hasNext typeName typeClassName eclipseSpecifiedTypes typeName isVersionCompatible AntTypeDefinition AntTypeDefinition setName typeName setClassName typeClassName setClassLoader getClass getClassLoader ComponentHelper getComponentHelper getCurrentProject addDataTypeDefinition typeClass forName typeClassName getCurrentProject addDataTypeDefinition typeName typeClass ClassNotFoundException MessageFormat InternalAntMessages getString InternalAntRunner typeClassName typeName getCurrentProject MSG_WARN
private void remap System In if is Version Compatible 1 6 NON NLS 1 return Demux Input Stream Setter setter new Demux Input Stream Setter setter remap System In get Current Project  remapSystemIn isVersionCompatible DemuxInputStreamSetter DemuxInputStreamSetter remapSystemIn getCurrentProject
private void validate Default Target default Target get Current Project get Default Target Enumeration current Targets get Current Project get Targets elements boolean default Found false while current Targets has More Elements Target target Target current Targets next Element if target get Name equals default Target default Found true break if default Found default target must exist throw new Build Exception Message Format format Internal Ant Messages get String Internal Ant Runner Default target  0 1 2  does not exist in this project 1 new String default Target NON NLS 1 NON NLS 2 NON NLS 3  validateDefaultTarget defaultTarget getCurrentProject getDefaultTarget currentTargets getCurrentProject getTargets defaultFound currentTargets hasMoreElements currentTargets nextElement getName defaultTarget defaultFound defaultFound BuildException MessageFormat InternalAntMessages getString InternalAntRunner Default_target_ _does_not_exist_in_this_project_1 defaultTarget
Creates and returns the default build logger for logging build events to the ant log return the default build logger for logging build events to the ant log can return code null code if no logging is to occur private Build Logger create Logger if logger Classname null build Logger new Default Logger else if equals logger Classname NON NLS 1 try build Logger Build Logger Class for Name logger Classname new Instance catch Class Cast Exception e String message Message Format format Internal Ant Messages get String Internal Ant Runner 0  which was specified to perform logging is not an instance of org apache tools ant Build Logger  2 new String logger Classname NON NLS 1 log Message null message Project MSG ERR throw new Build Exception message e catch Exception e String message Message Format format Internal Ant Messages get String Internal Ant Runner Unable to instantiate logger   0  6 new String logger Classname NON NLS 1 log Message null message Project MSG ERR throw new Build Exception message e if build Logger null build Logger set Message Output Level message Output Level build Logger set Output Print Stream out build Logger set Error Print Stream err build Logger set Emacs Mode emacs Mode return build Logger  BuildLogger createLogger loggerClassname buildLogger DefaultLogger loggerClassname buildLogger BuildLogger forName loggerClassname newInstance ClassCastException MessageFormat InternalAntMessages getString InternalAntRunner _which_was_specified_to_perform_logging_is_not_an_instance_of_org BuildLogger _2 loggerClassname logMessage MSG_ERR BuildException MessageFormat InternalAntMessages getString InternalAntRunner Unable_to_instantiate_logger__ _6 loggerClassname logMessage MSG_ERR BuildException buildLogger buildLogger setMessageOutputLevel messageOutputLevel buildLogger setOutputPrintStream buildLogger setErrorPrintStream buildLogger setEmacsMode emacsMode buildLogger
private void fire Build Started Project project Build Event event new Build Event project for Iterator iterator project get Build Listeners iterator iterator has Next Build Listener listener Build Listener iterator next listener build Started event  fireBuildStarted BuildEvent BuildEvent getBuildListeners hasNext BuildListener BuildListener buildStarted
private void fire Build Finished Project project Throwable error if error null script Executed log Message project Internal Ant Messages get String Internal Ant Runner BUILD SUCCESSFUL 1 message Output Level NON NLS 1 project fire Build Finished error  fireBuildFinished scriptExecuted logMessage InternalAntMessages getString InternalAntRunner BUILD_SUCCESSFUL_1 messageOutputLevel fireBuildFinished
private void log Message Project project String message int priority if project null project log message priority else if build Listeners null project new Project Build Event event new Build Event project event set Message message priority notify the build listeners that are not registered as no project existed for Iterator iterator build Listeners iterator iterator has Next try Build Listener listener Build Listener iterator next listener message Logged event catch Class Cast Exception e ignore we could be trying to log that a build listener is the wrong type of class  logMessage buildListeners BuildEvent BuildEvent setMessage buildListeners hasNext BuildListener BuildListener messageLogged ClassCastException
Sets the build File Location param build File Location the file system location of the build file private void set Build File Location String build File Location this build File Location build File Location if get Current Project null get Current Project set User Property ant file build File Location NON NLS 1  buildFileLocation buildFileLocation setBuildFileLocation buildFileLocation buildFileLocation buildFileLocation getCurrentProject getCurrentProject setUserProperty buildFileLocation
private String get Build File Location if build File Location null build File Location new File build xml get Absolute Path NON NLS 1 return build File Location  getBuildFileLocation buildFileLocation buildFileLocation getAbsolutePath buildFileLocation
Sets the message output level Use 1 for none param level The message output level private void set Message Output Level int level message Output Level level if build Logger null build Logger set Message Output Level level  setMessageOutputLevel messageOutputLevel buildLogger buildLogger setMessageOutputLevel
private String get Ant Version Number throws Build Exception if ant Version Number null try Properties props new Properties Input Stream in Main class get Resource As Stream org apache tools ant version txt NON NLS 1 props load in in close String version Number props get Property VERSION NON NLS 1 ant Version Number version Number catch IO Exception ioe throw new Build Exception Message Format format Internal Ant Messages get String Internal Ant Runner Could not load the version information   0  9 new String ioe get Message NON NLS 1 catch Null Pointer Exception npe throw new Build Exception Internal Ant Messages get String Internal Ant Runner Could not load the version information  10 NON NLS 1 return ant Version Number  getAntVersionNumber BuildException antVersionNumber InputStream getResourceAsStream versionNumber getProperty antVersionNumber versionNumber IOException BuildException MessageFormat InternalAntMessages getString InternalAntRunner Could_not_load_the_version_information _ _9 getMessage NullPointerException BuildException InternalAntMessages getString InternalAntRunner Could_not_load_the_version_information _10 antVersionNumber
than or equal to the current version private boolean is Version Compatible String comparison String version get Ant Version Number return version compare To comparison 0  isVersionCompatible getAntVersionNumber compareTo
private boolean preprocess Command Line List commands String arg get Argument commands listener NON NLS 1 while arg null if arg length 0 throw new Build Exception Internal Ant Messages get String Internal Ant Runner You must specify a classname when using the  listener argument 1 NON NLS 1 if build Listeners null build Listeners new Array List 1 build Listeners add arg arg get Argument commands listener NON NLS 1 arg get Argument commands logger NON NLS 1 if arg null if arg length 0 throw new Build Exception Internal Ant Messages get String Internal Ant Runner You must specify a classname when using the  logger argument 2 NON NLS 1 logger Classname arg arg get Argument commands logger NON NLS 1 if arg null throw new Build Exception Internal Ant Messages get String Internal Ant Runner Only one logger class may be specified 1 NON NLS 1 arg get Argument commands inputhandler NON NLS 1 if arg null if is Version Compatible 1 5 NON NLS 1 throw new Build Exception Internal Ant Messages get String Internal Ant Runner Specifying an InputHandler is an Ant 1 5  feature  Please update your Ant classpath to include an Ant version greater than this  2 NON NLS 1 if arg length 0 throw new Build Exception Internal Ant Messages get String Internal Ant Runner You must specify a classname when using the  inputhandler argument 1 NON NLS 1 input Handler Classname arg arg get Argument commands inputhandler NON NLS 1 if arg null throw new Build Exception Internal Ant Messages get String Internal Ant Runner Only one input handler class may be specified  2 NON NLS 1 return true  preprocessCommandLine getArgument BuildException InternalAntMessages getString InternalAntRunner You_must_specify_a_classname_when_using_the_ listener_argument_1 buildListeners buildListeners ArrayList buildListeners getArgument getArgument BuildException InternalAntMessages getString InternalAntRunner You_must_specify_a_classname_when_using_the_ logger_argument_2 loggerClassname getArgument BuildException InternalAntMessages getString InternalAntRunner Only_one_logger_class_may_be_specified_1 getArgument isVersionCompatible BuildException InternalAntMessages getString InternalAntRunner Specifying_an_InputHandler_is_an_Ant_1 _feature _Please_update_your_Ant_classpath_to_include_an_Ant_version_greater_than_this _2 BuildException InternalAntMessages getString InternalAntRunner You_must_specify_a_classname_when_using_the_ inputhandler_argument_1 inputHandlerClassname getArgument BuildException InternalAntMessages getString InternalAntRunner Only_one_input_handler_class_may_be_specified _2
private boolean process Command Line List commands if commands remove help commands remove h NON NLS 1 NON NLS 2 print Usage return false if commands remove version NON NLS 1 print Version return false if commands remove verbose commands remove v NON NLS 1 NON NLS 2 print Version set Message Output Level Project MSG VERBOSE if commands remove debug commands remove d NON NLS 1 NON NLS 2 print Version set Message Output Level Project MSG DEBUG if commands remove quiet commands remove q NON NLS 1 NON NLS 2 set Message Output Level Project MSG WARN if commands remove emacs commands remove e NON NLS 1 NON NLS 2 emacs Mode true if build Logger null build Logger set Emacs Mode true if commands remove diagnostics NON NLS 1 if is Version Compatible 1 5 NON NLS 1 throw new Build Exception Internal Ant Messages get String Internal Ant Runner The diagnositics options is an Ant 1 5  feature  Please update your Ant classpath to include an Ant version greater than this  4 NON NLS 1 try Diagnostics do Report System out catch Null Pointer Exception e log Message get Current Project Internal Ant Messages get String Internal Ant Runner ANT HOME must be set to use Ant diagnostics 2 Project MSG ERR NON NLS 1 return false String arg get Argument commands logfile NON NLS 1 if arg null arg get Argument commands l NON NLS 1 if arg null if arg length 0 String message Internal Ant Messages get String Internal Ant Runner You must specify a log file when using the  log argument 3 NON NLS 1 log Message current Project message Project MSG ERR throw new Build Exception message try create Log File arg catch IO Exception e just log message and ignore exception log Message get Current Project Message Format format Internal Ant Messages get String Internal Ant Runner Could not write to the specified log file   0  Make sure the path exists and you have write permissions  2 new String arg Project MSG ERR NON NLS 1 return false arg get Argument commands buildfile NON NLS 1 if arg null arg get Argument commands file NON NLS 1 if arg null arg get Argument commands f NON NLS 1 if arg null if arg length 0 String message Internal Ant Messages get String Internal Ant Runner You must specify a buildfile when using the  buildfile argument 4 NON NLS 1 log Message current Project message Project MSG ERR throw new Build Exception message set Build File Location arg if is Version Compatible 1 6 NON NLS 1 if commands remove k commands remove keep going NON NLS 1 NON NLS 2 keep Going true if commands remove noinput NON NLS 1 allow Input false arg get Argument commands lib NON NLS 1 if arg null log Message current Project Internal Ant Messages get String Internal Ant Runner 157 Project MSG ERR NON NLS 1 return false arg get Argument commands find NON NLS 1 if arg null arg get Argument commands s NON NLS 1 if arg null log Message current Project Internal Ant Messages get String Internal Ant Runner find not supported Project MSG ERR NON NLS 1 return false process Tasks And Types commands if commands null commands is Empty process Unrecognized Commands commands if commands null commands is Empty process Targets commands return true  processCommandLine printUsage printVersion printVersion setMessageOutputLevel MSG_VERBOSE printVersion setMessageOutputLevel MSG_DEBUG setMessageOutputLevel MSG_WARN emacsMode buildLogger buildLogger setEmacsMode isVersionCompatible BuildException InternalAntMessages getString InternalAntRunner The_diagnositics_options_is_an_Ant_1 _feature _Please_update_your_Ant_classpath_to_include_an_Ant_version_greater_than_this _4 doReport NullPointerException logMessage getCurrentProject InternalAntMessages getString InternalAntRunner ANT_HOME_must_be_set_to_use_Ant_diagnostics_2 MSG_ERR getArgument getArgument InternalAntMessages getString InternalAntRunner You_must_specify_a_log_file_when_using_the_ log_argument_3 logMessage currentProject MSG_ERR BuildException createLogFile IOException logMessage getCurrentProject MessageFormat InternalAntMessages getString InternalAntRunner Could_not_write_to_the_specified_log_file__ _Make_sure_the_path_exists_and_you_have_write_permissions _2 MSG_ERR getArgument getArgument getArgument InternalAntMessages getString InternalAntRunner You_must_specify_a_buildfile_when_using_the_ buildfile_argument_4 logMessage currentProject MSG_ERR BuildException setBuildFileLocation isVersionCompatible keepGoing allowInput getArgument logMessage currentProject InternalAntMessages getString InternalAntRunner MSG_ERR getArgument getArgument logMessage currentProject InternalAntMessages getString InternalAntRunner find_not_supported MSG_ERR processTasksAndTypes isEmpty processUnrecognizedCommands isEmpty processTargets
private void process Tasks And Types List commands String arg get Argument commands eclipse Task NON NLS 1 while arg null if eclipse Specified Tasks null eclipse Specified Tasks new Hash Map int index arg index Of String name arg substring 0 index String class Name arg substring index 1 eclipse Specified Tasks put name class Name arg get Argument commands eclipse Task NON NLS 1 arg get Argument commands eclipse Type NON NLS 1 while arg null if eclipse Specified Types null eclipse Specified Types new Hash Map int index arg index Of String name arg substring 0 index String class Name arg substring index 1 eclipse Specified Types put name class Name arg get Argument commands eclipse Type NON NLS 1  processTasksAndTypes getArgument eclipseTask eclipseSpecifiedTasks eclipseSpecifiedTasks HashMap indexOf className eclipseSpecifiedTasks className getArgument eclipseTask getArgument eclipseType eclipseSpecifiedTypes eclipseSpecifiedTypes HashMap indexOf className eclipseSpecifiedTypes className getArgument eclipseType
private void process Unrecognized Commands List commands int p 1 find the last arg that begins with for int i commands size 1 i 0 i if String commands get 0 starts With NON NLS 1 p i break if p 0 return remove everything preceding that last arg String s NON NLS 1 for int i 0 i p i s String commands get 0 NON NLS 1 commands remove 0 warn of ignored commands String message Message Format format Internal Ant Messages get String Internal Ant Runner Unknown argument   0  2 new Object s substring 1 NON NLS 1 log Message current Project message Project MSG WARN  processUnrecognizedCommands startsWith MessageFormat InternalAntMessages getString InternalAntRunner Unknown_argument__ _2 logMessage currentProject MSG_WARN
private void process Targets List commands if targets null targets new Vector commands size for Iterator iter commands iterator iter has Next targets add iter next  processTargets hasNext
private void create Log File String file Name throws File Not Found Exception IO Exception File log File get File Relative To Base Dir file Name this stream is closed in the finally block of run list out new Print Stream new File Output Stream log File err out log Message get Current Project Message Format format Internal Ant Messages get String Internal Ant Runner Using  0  file as build log  1 new String log File get Canonical Path Project MSG INFO NON NLS 1 if build Logger null build Logger set Error Print Stream err build Logger set Output Print Stream out  createLogFile fileName FileNotFoundException IOException logFile getFileRelativeToBaseDir fileName PrintStream FileOutputStream logFile logMessage getCurrentProject MessageFormat InternalAntMessages getString InternalAntRunner Using_ _file_as_build_log _1 logFile getCanonicalPath MSG_INFO buildLogger buildLogger setErrorPrintStream buildLogger setOutputPrintStream
private File get File Relative To Base Dir String file Name File parent File null String base get Current Project get User Property basedir NON NLS 1 if base null parent File new File base else relative to the build file location parent File new File get Build File Location get Parent File return File Utils new File Utils resolve File parent File file Name  getFileRelativeToBaseDir fileName parentFile getCurrentProject getUserProperty parentFile parentFile getBuildFileLocation getParentFile FileUtils newFileUtils resolveFile parentFile fileName
private void process Properties List commands MULTIPLE property files are allowed String arg get Argument commands propertyfile NON NLS 1 while arg null if is Version Compatible 1 5 NON NLS 1 log Message current Project Internal Ant Messages get String Internal Ant Runner Specifying property files is a Ant 1 5  feature  Please update your Ant classpath  6 Project MSG ERR NON NLS 1 break if arg length 0 String message Internal Ant Messages get String Internal Ant Runner You must specify a property filename when using the  propertyfile argument 3 NON NLS 1 log Message current Project message Project MSG ERR throw new Build Exception message property Files add arg arg get Argument commands propertyfile NON NLS 1 if property Files null property Files is Empty load Property Files if commands null return process MinusD Properties commands  processProperties getArgument isVersionCompatible logMessage currentProject InternalAntMessages getString InternalAntRunner Specifying_property_files_is_a_Ant_1 _feature _Please_update_your_Ant_classpath _6 MSG_ERR InternalAntMessages getString InternalAntRunner You_must_specify_a_property_filename_when_using_the_ propertyfile_argument_3 logMessage currentProject MSG_ERR BuildException propertyFiles getArgument propertyFiles propertyFiles isEmpty loadPropertyFiles processMinusDProperties
private void process MinusD Properties List commands String args String commands to Array new String commands size for int i 0 i args length i String arg args i if arg starts With D NON NLS 1 String name arg substring 2 arg length String value null int pos Eq name index Of NON NLS 1 if pos Eq 0 value name substring 1 name NON NLS 1 else if pos Eq 0 pos Eq name length 1 value name substring pos Eq 1 trim name name substring 0 pos Eq if value null the user has specified something like Debug continue if user Properties null user Properties new Hash Map user Properties put name value commands remove args i  processMinusDProperties toArray startsWith posEq indexOf posEq posEq posEq posEq posEq userProperties userProperties HashMap userProperties
private void set Properties Project project set Built In Properties project if user Properties null for Iterator iterator user Properties entry Set iterator iterator has Next Map Entry entry Map Entry iterator next project set User Property String entry get Key String entry get Value  setProperties setBuiltInProperties userProperties userProperties entrySet hasNext setUserProperty getKey getValue
private void set Built In Properties Project project project set User Property ant file get Build File Location NON NLS 1 project set User Property ant version Main get Ant Version NON NLS 1  setBuiltInProperties setUserProperty getBuildFileLocation setUserProperty getAntVersion
private void print Help Project project if project get Description null log Message project project get Description Project MSG INFO print Targets project  printHelp getDescription logMessage getDescription MSG_INFO printTargets
fronts private void print Version log Message get Current Project Main get Ant Version Project MSG INFO  printVersion logMessage getCurrentProject getAntVersion MSG_INFO
private void print Usage String l Sep System get Property line separator NON NLS 1 String Buffer msg new String Buffer msg append ant NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner options 13 NON NLS 1 msg append NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner target 15 NON NLS 1 msg append NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner target 15 NON NLS 1 msg append 2 NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner target 15 NON NLS 1 msg append 3 NON NLS 1 msg append l Sep msg append Internal Ant Messages get String Internal Ant Runner Options   21 NON NLS 1 msg append l Sep msg append t help h t t t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner print this message 23 NON NLS 1 msg append l Sep msg append t projecthelp p t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner print project help information 25 NON NLS 1 msg append l Sep msg append t version t t t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner print the version information and exit 27 NON NLS 1 msg append l Sep msg append t diagnostics t t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 12 NON NLS 1 msg append l Sep msg append Internal Ant Messages get String Internal Ant Runner 13 NON NLS 1 msg append l Sep msg append t quiet q t t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner be extra quiet 29 NON NLS 1 msg append l Sep msg append t verbose v t t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner be extra verbose 31 NON NLS 1 msg append l Sep msg append t debug d t t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner print debugging information 33 NON NLS 1 msg append l Sep msg append t emacs e t t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner produce logging information without adornments 35 NON NLS 1 msg append l Sep msg append t logfile t file t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner use given file for log 37 NON NLS 1 msg append l Sep msg append t t l t file NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 1 NON NLS 1 NON NLS 2 msg append l Sep msg append t logger classname t t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner the class which is to perform logging 39 NON NLS 1 msg append l Sep msg append t listener classname t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner add an instance of class as a project listener 41 NON NLS 1 msg append l Sep msg append t noinput t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 158 NON NLS 1 msg append l Sep msg append t buildfile t file t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner use given buildfile 43 NON NLS 1 msg append l Sep msg append t t file t file NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 1 NON NLS 1 msg append l Sep msg append t t f t t file NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 1 NON NLS 1 msg append l Sep msg append t D property value t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner use value for given property 45 NON NLS 1 msg append l Sep msg append t keep going k NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 159 NON NLS 1 msg append l Sep msg append Internal Ant Messages get String Internal Ant Runner 160 NON NLS 1 msg append l Sep msg append t propertyfile name t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 19 NON NLS 1 msg append l Sep msg append Internal Ant Messages get String Internal Ant Runner 20 NON NLS 1 msg append l Sep msg append t inputhandler class t NON NLS 1 msg append Internal Ant Messages get String Internal Ant Runner 22 NON NLS 1 msg append l Sep log Message get Current Project msg to String Project MSG INFO  printUsage lSep getProperty StringBuffer StringBuffer InternalAntMessages getString InternalAntRunner options_13 InternalAntMessages getString InternalAntRunner target_15 InternalAntMessages getString InternalAntRunner target_15 InternalAntMessages getString InternalAntRunner target_15 lSep InternalAntMessages getString InternalAntRunner Options___21 lSep InternalAntMessages getString InternalAntRunner print_this_message_23 lSep InternalAntMessages getString InternalAntRunner print_project_help_information_25 lSep InternalAntMessages getString InternalAntRunner print_the_version_information_and_exit_27 lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner be_extra_quiet_29 lSep InternalAntMessages getString InternalAntRunner be_extra_verbose_31 lSep InternalAntMessages getString InternalAntRunner print_debugging_information_33 lSep InternalAntMessages getString InternalAntRunner produce_logging_information_without_adornments_35 lSep InternalAntMessages getString InternalAntRunner use_given_file_for_log_37 lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner the_class_which_is_to_perform_logging_39 lSep InternalAntMessages getString InternalAntRunner add_an_instance_of_class_as_a_project_listener_41 lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner use_given_buildfile_43 lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner use_value_for_given_property_45 lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner lSep InternalAntMessages getString InternalAntRunner lSep logMessage getCurrentProject toString MSG_INFO
private String get Argument List commands String param if commands null return null int index commands index Of param if index 1 return null commands remove index if index commands size if this is the last command return NON NLS 1 String command String commands get index if command starts With new parameter NON NLS 1 return NON NLS 1 commands remove index return command  getArgument indexOf startsWith
private static Array List get Array List String args if args null return null We could be using Arrays as List here but it does not specify what kind of list it will return We need a list that implements the method List remove Object and Array List does Array List result new Array List args length for int i 0 i args length i result add args i return result  ArrayList getArrayList asList ArrayList ArrayList ArrayList
private Project get Current Project return current Project  getCurrentProject currentProject
private void set Current Project Project current Project this current Project current Project  setCurrentProject currentProject currentProject currentProject
Load all properties from the files specified by propertyfile private void load Property Files Iterator itr property Files iterator while itr has Next String filename String itr next File file get File Relative To Base Dir filename Properties props new Properties File Input Stream fis null try fis new File Input Stream file props load fis catch IO Exception e String msg Message Format format Internal Ant Messages get String Internal Ant Runner Could not load property file  0    1  4 new String filename e get Message NON NLS 1 log Message get Current Project msg Project MSG ERR finally if fis null try fis close catch IO Exception e if user Properties null user Properties new Hash Map Enumeration property Names props property Names while property Names has More Elements String name String property Names next Element most specific to global do not overwrite specific with a global property if user Properties get name null user Properties put name props get Property name  loadPropertyFiles propertyFiles hasNext getFileRelativeToBaseDir FileInputStream FileInputStream IOException MessageFormat InternalAntMessages getString InternalAntRunner Could_not_load_property_file_ __ _4 getMessage logMessage getCurrentProject MSG_ERR IOException userProperties userProperties HashMap propertyNames propertyNames propertyNames hasMoreElements propertyNames nextElement userProperties userProperties getProperty
private void add Input Handler Project project if is Version Compatible 1 5 NON NLS 1 return Input Handler Setter setter new Input Handler Setter setter set Input Handler project input Handler Classname  addInputHandler isVersionCompatible InputHandlerSetter InputHandlerSetter setInputHandler inputHandlerClassname

protected void log Message String message Build Event event int override Priority int priority override Priority if priority 1 priority event get Priority if priority get Message Output Level return Ant Process ant Process get Ant Process event get Project get User Property Ant Process ATTR ANT PROCESS ID if ant Process null return String Buffer full Message new String Buffer System get Property line separator NON NLS 1 if event get Exception null event get Task null f Emacs Mode adorn Message event full Message else full Message append message message full Message to String Ant Stream Monitor monitor get Monitor priority monitor append message log Message To Log File message priority  logMessage BuildEvent overridePriority overridePriority getPriority getMessageOutputLevel AntProcess antProcess getAntProcess getProject getUserProperty AntProcess ATTR_ANT_PROCESS_ID antProcess StringBuffer fullMessage StringBuffer getProperty getException getTask fEmacsMode adornMessage fullMessage fullMessage fullMessage toString AntStreamMonitor getMonitor logMessageToLogFile
Builds a right justified task prefix for the given build event placing it in the given string buffer Creates the hyperlinks for the task prefix param event build event param full Message buffer to place task prefix in private void adorn Message Build Event event String Buffer full Message String name event get Task get Task Name if name null name null NON NLS 1 Location location event get Task get Location String Buffer column new String Buffer int size I AntUI Constants LEFT COLUMN SIZE name length 3 for int i 0 i size i column append String Buffer label Buff new String Buffer label Buff append label Buff append name label Buff append NON NLS 1 int offset Math max size 0 1 String label label Buff to String if event get Message null return try Buffered Reader r new Buffered Reader new String Reader event get Message String line r read Line full Message append column append And Link full Message location label offset line line r read Line while line null full Message append System get Property line separator NON NLS 1 full Message append column append And Link full Message location label offset line line r read Line catch IO Exception e if event get Message null full Message append label append event get Message  fullMessage adornMessage BuildEvent StringBuffer fullMessage getTask getTaskName getTask getLocation StringBuffer StringBuffer IAntUIConstants LEFT_COLUMN_SIZE StringBuffer labelBuff StringBuffer labelBuff labelBuff labelBuff labelBuff toString getMessage BufferedReader BufferedReader StringReader getMessage readLine fullMessage appendAndLink fullMessage readLine fullMessage getProperty fullMessage appendAndLink fullMessage readLine IOException getMessage fullMessage getMessage
private void append And Link String Buffer full Message Location location String label int offset String line full Message append label full Message append line if location null String new Line label line trim I Region region new Region offset label length 3 only want the name length name I Console Hyperlink link get Task Link location if link null Task Link Manager add Task Hyperlink get Ant Process null link region new Line  appendAndLink StringBuffer fullMessage fullMessage fullMessage newLine IRegion IConsoleHyperlink getTaskLink TaskLinkManager addTaskHyperlink getAntProcess newLine
private Ant Stream Monitor get Monitor int priority Ant Streams Proxy proxy Ant Streams Proxy f Process get Streams Proxy Ant Stream Monitor monitor null switch priority case Project MSG INFO monitor Ant Stream Monitor proxy get Output Stream Monitor break case Project MSG ERR monitor Ant Stream Monitor proxy get Error Stream Monitor break case Project MSG DEBUG monitor Ant Stream Monitor proxy get Debug Stream Monitor break case Project MSG WARN monitor Ant Stream Monitor proxy get Warning Stream Monitor break case Project MSG VERBOSE monitor Ant Stream Monitor proxy get Verbose Stream Monitor break return monitor  AntStreamMonitor getMonitor AntStreamsProxy AntStreamsProxy fProcess getStreamsProxy AntStreamMonitor MSG_INFO AntStreamMonitor getOutputStreamMonitor MSG_ERR AntStreamMonitor getErrorStreamMonitor MSG_DEBUG AntStreamMonitor getDebugStreamMonitor MSG_WARN AntStreamMonitor getWarningStreamMonitor MSG_VERBOSE AntStreamMonitor getVerboseStreamMonitor
private void log Message To Log File String message int priority if priority Project MSG ERR if get Error Print Stream null get Error Print Stream System err user has designated to log to a logfile get Error Print Stream println message else if get Output Print Stream null get Output Print Stream System out user has designated to log to a logfile get Output Print Stream println message  logMessageToLogFile MSG_ERR getErrorPrintStream getErrorPrintStream getErrorPrintStream getOutputPrintStream getOutputPrintStream getOutputPrintStream
Returns a hyperlink for the given task or code null code if unable to parse a valid location for the task The link is set to exist at the specified offset and length return hyper link or code null code private I Console Hyperlink get Task Link Location location if location null return Ant Util get Task Link location to String f Build File Parent return null  IConsoleHyperlink getTaskLink AntUtil getTaskLink toString fBuildFileParent
Returns the associated Ant process finding it if necessary if not already found private Ant Process get Ant Process String process Id if f Process null process Id null I Process all Debug Plugin get Default get Launch Manager get Processes for int i 0 i all length i I Process process all i if process instanceof Ant Process process Id equals process get Attribute Ant Process ATTR ANT PROCESS ID f Process Ant Process process break return f Process  AntProcess getAntProcess processId fProcess processId IProcess DebugPlugin getDefault getLaunchManager getProcesses IProcess AntProcess processId getAttribute AntProcess ATTR_ANT_PROCESS_ID fProcess AntProcess fProcess
see org apache tools ant Build Listener build Started org apache tools ant Build Event public void build Started Build Event event f Start Time System current Time Millis  BuildListener buildStarted BuildEvent buildStarted BuildEvent fStartTime currentTimeMillis
public void build Finished Build Event event handle Exception event f Handled Exception null f Build File Parent null log Message get Time String System current Time Millis f Start Time event f Message Output Level f Process null event get Project remove Build Listener this  buildFinished BuildEvent handleException fHandledException fBuildFileParent logMessage getTimeString currentTimeMillis fStartTime fMessageOutputLevel fProcess getProject removeBuildListener
private String get Time String long milliseconds long seconds milliseconds 1000 long minutes seconds 60 seconds seconds 60 String Buffer result new String Buffer Ant Support Messages get String Ant Process Build Logger Total time NON NLS 1 if minutes 0 result append minutes if minutes 1 result append Ant Support Messages get String Ant Process Build Logger  minutes 2 NON NLS 1 else result append Ant Support Messages get String Ant Process Build Logger  minute 3 NON NLS 1 if seconds 0 if minutes 0 result append result append seconds if seconds 1 result append Ant Support Messages get String Ant Process Build Logger  seconds 4 NON NLS 1 else result append Ant Support Messages get String Ant Process Build Logger  second 5 NON NLS 1 if seconds 0 minutes 0 result append milliseconds result append Ant Support Messages get String Ant Process Build Logger  milliseconds 6 NON NLS 1 result append System get Property line separator NON NLS 1 return result to String  getTimeString StringBuffer StringBuffer AntSupportMessages getString AntProcessBuildLogger Total_time AntSupportMessages getString AntProcessBuildLogger _minutes_2 AntSupportMessages getString AntProcessBuildLogger _minute_3 AntSupportMessages getString AntProcessBuildLogger _seconds_4 AntSupportMessages getString AntProcessBuildLogger _second_5 AntSupportMessages getString AntProcessBuildLogger _milliseconds_6 getProperty toString
public void message Logged Build Event event if event get Priority get Message Output Level return if event get Message null event get Message length 0 log Message event get Message event 1  messageLogged BuildEvent getPriority getMessageOutputLevel getMessage getMessage logMessage getMessage
protected void handle Exception Build Event event Throwable exception event get Exception if exception null exception f Handled Exception exception instanceof Operation Canceled Exception exception instanceof Ant Security Exception return f Handled Exception exception log Message Message Format format Ant Support Messages get String Ant Process Build Logger BUILD FAILED   0  1 new String exception to String NON NLS 1 event Project MSG ERR  handleException BuildEvent getException fHandledException OperationCanceledException AntSecurityException fHandledException logMessage MessageFormat AntSupportMessages getString AntProcessBuildLogger BUILD_FAILED__ _1 toString MSG_ERR
public void target Started Build Event event if Project MSG INFO get Message Output Level return String Buffer msg new String Buffer System get Property line separator NON NLS 1 msg append event get Target get Name msg append log Message msg to String event Project MSG INFO  targetStarted BuildEvent MSG_INFO getMessageOutputLevel StringBuffer StringBuffer getProperty getTarget getName logMessage toString MSG_INFO

see org apache tools ant Build Logger set Message Output Level int public void set Message Output Level int level f Message Output Level level  BuildLogger setMessageOutputLevel setMessageOutputLevel fMessageOutputLevel
protected int get Message Output Level return f Message Output Level  getMessageOutputLevel fMessageOutputLevel
see org apache tools ant Build Logger set Emacs Mode boolean public void set Emacs Mode boolean emacs Mode f Emacs Mode emacs Mode  BuildLogger setEmacsMode setEmacsMode emacsMode fEmacsMode emacsMode
see org apache tools ant Build Listener build Started org apache tools ant Build Event public void build Started Build Event event  BuildListener buildStarted BuildEvent buildStarted BuildEvent
see org apache tools ant Build Listener build Finished org apache tools ant Build Event public void build Finished Build Event event handle Exception event f Handled Exception null  BuildListener buildFinished BuildEvent buildFinished BuildEvent handleException fHandledException
see org apache tools ant Build Listener target Started org apache tools ant Build Event public void target Started Build Event event  BuildListener targetStarted BuildEvent targetStarted BuildEvent
see org apache tools ant Build Listener target Finished org apache tools ant Build Event public void target Finished Build Event event handle Exception event  BuildListener targetFinished BuildEvent targetFinished BuildEvent handleException
see org apache tools ant Build Listener task Started org apache tools ant Build Event public void task Started Build Event event  BuildListener taskStarted BuildEvent taskStarted BuildEvent
see org apache tools ant Build Listener task Finished org apache tools ant Build Event public void task Finished Build Event event handle Exception event  BuildListener taskFinished BuildEvent taskFinished BuildEvent handleException
see org apache tools ant Build Listener message Logged org apache tools ant Build Event public void message Logged Build Event event log Message event get Message event get Priority  BuildListener messageLogged BuildEvent messageLogged BuildEvent logMessage getMessage getPriority
protected Print Stream get Error Print Stream return f Err  PrintStream getErrorPrintStream fErr
protected Print Stream get Output Print Stream return f Out  PrintStream getOutputPrintStream fOut
see org apache tools ant Build Logger set Error Print Stream java io Print Stream public void set Error Print Stream Print Stream err this build logger logs to null unless the user has explicitly set a logfile to use if err System err f Err null else f Err err  BuildLogger setErrorPrintStream PrintStream setErrorPrintStream PrintStream fErr fErr
see org apache tools ant Build Logger set Output Print Stream java io Print Stream public void set Output Print Stream Print Stream output this build logger logs to null unless the user has explicitly set a logfile to use if output System out f Out null else f Out output  BuildLogger setOutputPrintStream PrintStream setOutputPrintStream PrintStream fOut fOut
protected void log Message String message int priority if priority get Message Output Level return if priority Project MSG ERR if get Error Print Stream null get Error Print Stream System err user has designated to log to a logfile get Error Print Stream println message else if get Output Print Stream null get Output Print Stream System out user has designated to log to a logfile get Output Print Stream println message  logMessage getMessageOutputLevel MSG_ERR getErrorPrintStream getErrorPrintStream getErrorPrintStream getOutputPrintStream getOutputPrintStream getOutputPrintStream
protected void handle Exception Build Event event Throwable exception event get Exception if exception null exception f Handled Exception exception instanceof Operation Canceled Exception exception instanceof Ant Security Exception return f Handled Exception exception log Message Message Format format Ant Support Messages get String Ant Process Build Logger BUILD FAILED   0  1 NON NLS 1 new String exception to String Project MSG ERR  handleException BuildEvent getException fHandledException OperationCanceledException AntSecurityException fHandledException logMessage MessageFormat AntSupportMessages getString AntProcessBuildLogger BUILD_FAILED__ _1 toString MSG_ERR

see org apache tools ant Default Logger print Message java lang String java io Print Stream int protected void print Message String message Print Stream stream int priority marshal Message priority message  DefaultLogger printMessage PrintStream printMessage PrintStream marshalMessage
Connect to the remote Ant build listener private void connect if f Debug Mode System out println Remote Ant Build Logger trying to connect f Host f Port NON NLS 1 NON NLS 2 for int i 1 i 5 i try f Client Socket new Socket f Host f Port f Writer new Print Writer f Client Socket get Output Stream true return catch IO Exception e try Thread sleep 500 catch Interrupted Exception e shut Down  fDebugMode RemoteAntBuildLogger fHost fPort fClientSocket fHost fPort fWriter PrintWriter fClientSocket getOutputStream IOException InterruptedException shutDown
Shutdown the connection to the remote build listener private void shut Down if f Event Queue null f Event Queue clear if f Writer null f Writer close f Writer null try if f Client Socket null f Client Socket close f Client Socket null catch IO Exception e  shutDown fEventQueue fEventQueue fWriter fWriter fWriter fClientSocket fClientSocket fClientSocket IOException
private void send Message String msg if f Writer null return f Writer println msg  sendMessage fWriter fWriter
public void build Finished Build Event event handle Exception event print Message get Time String System current Time Millis start Time out Project MSG INFO shut Down  buildFinished BuildEvent handleException printMessage getTimeString currentTimeMillis startTime MSG_INFO shutDown
protected void handle Exception Build Event event Throwable exception event get Exception if exception null exception instanceof Ant Security Exception return print Message Message Format format Internal Ant Messages get String Remote Ant Build Logger BUILD FAILED   0  1 new String exception to String NON NLS 1 out Project MSG ERR  handleException BuildEvent getException AntSecurityException printMessage MessageFormat InternalAntMessages getString RemoteAntBuildLogger BUILD_FAILED__ _1 toString MSG_ERR
private String get Time String long milliseconds long seconds milliseconds 1000 long minutes seconds 60 seconds seconds 60 String Buffer result new String Buffer Internal Ant Messages get String Remote Ant Build Logger Total time NON NLS 1 if minutes 0 result append minutes if minutes 1 result append Internal Ant Messages get String Remote Ant Build Logger  minutes 2 NON NLS 1 else result append Internal Ant Messages get String Remote Ant Build Logger  minute 3 NON NLS 1 if seconds 0 if minutes 0 result append result append seconds if seconds 1 result append Internal Ant Messages get String Remote Ant Build Logger  seconds 4 NON NLS 1 else result append Internal Ant Messages get String Remote Ant Build Logger  second 5 NON NLS 1 if seconds 0 minutes 0 result append milliseconds result append Internal Ant Messages get String Remote Ant Build Logger  milliseconds 6 NON NLS 1 return result to String  getTimeString StringBuffer StringBuffer InternalAntMessages getString RemoteAntBuildLogger Total_time InternalAntMessages getString RemoteAntBuildLogger _minutes_2 InternalAntMessages getString RemoteAntBuildLogger _minute_3 InternalAntMessages getString RemoteAntBuildLogger _seconds_4 InternalAntMessages getString RemoteAntBuildLogger _second_5 InternalAntMessages getString RemoteAntBuildLogger _milliseconds_6 toString
public void target Started Build Event event if f Sent Process Id establish Connection event if Project MSG INFO msg Output Level String msg event get Target get Name NON NLS 1 print Message msg out Project MSG INFO  targetStarted BuildEvent fSentProcessId establishConnection MSG_INFO msgOutputLevel getTarget getName printMessage MSG_INFO
private void establish Connection Build Event event String port Property event get Project get Property eclipse connect port NON NLS 1 if port Property null f Port Integer parse Int port Property connect f Sent Process Id true String Buffer message new String Buffer Message Ids PROCESS ID message append event get Project get Property org eclipse ant ui ATTR ANT PROCESS ID NON NLS 1 send Message message to String if f Event Queue null for Iterator iter f Event Queue iterator iter has Next process Event Build Event iter next f Event Queue null  establishConnection BuildEvent portProperty getProject getProperty portProperty fPort parseInt portProperty fSentProcessId StringBuffer StringBuffer MessageIds PROCESS_ID getProject getProperty ATTR_ANT_PROCESS_ID sendMessage toString fEventQueue fEventQueue hasNext processEvent BuildEvent fEventQueue
public void message Logged Build Event event if event get Priority msg Output Level event get Priority Internal Ant Runner MSG PROJECT HELP return if f Sent Process Id if event get Priority Internal Ant Runner MSG PROJECT HELP if Project MSG INFO msg Output Level return no buildstarted or project started for project help option establish Connection event return if f Event Queue null f Event Queue new Array List 10 f Event Queue add event return process Event event  messageLogged BuildEvent getPriority msgOutputLevel getPriority InternalAntRunner MSG_PROJECT_HELP fSentProcessId getPriority InternalAntRunner MSG_PROJECT_HELP MSG_INFO msgOutputLevel establishConnection fEventQueue fEventQueue ArrayList fEventQueue processEvent
private void process Event Build Event event if event get Task null emacs Mode try marshal Task Message event catch IO Exception e else marshal Message event  processEvent BuildEvent getTask emacsMode marshalTaskMessage IOException marshalMessage
private void marshal Message Build Event event String event Message event get Message trim if event Message length 0 return marshal Message event get Priority event Message  marshalMessage BuildEvent eventMessage getMessage eventMessage marshalMessage getPriority eventMessage
private void marshal Message int priority String message try Buffered Reader r new Buffered Reader new String Reader message String line r read Line String Buffer message Line while line null message Line new String Buffer message Line append priority message Line append message Line append line send Message message Line to String line r read Line catch IO Exception e  marshalMessage BufferedReader BufferedReader StringReader readLine StringBuffer messageLine messageLine StringBuffer messageLine messageLine messageLine sendMessage messageLine toString readLine IOException
private void marshal Task Message Build Event event throws IO Exception String event Message event get Message trim if event Message length 0 return Buffered Reader r new Buffered Reader new String Reader event Message String line r read Line String Buffer message String task Name event get Task get Task Name String Buffer label Buff new String Buffer label Buff append label Buff append task Name label Buff append NON NLS 1 String label label Buff to String Location location event get Task get Location int priority event get Priority while line null message new String Buffer Message Ids TASK message append priority message append message append task Name message append line label line trim message append line length message append message append line message append message append location send Message message to String line r read Line  marshalTaskMessage BuildEvent IOException eventMessage getMessage eventMessage BufferedReader BufferedReader StringReader eventMessage readLine StringBuffer taskName getTask getTaskName StringBuffer labelBuff StringBuffer labelBuff labelBuff taskName labelBuff labelBuff toString getTask getLocation getPriority StringBuffer MessageIds taskName sendMessage toString readLine
see org apache tools ant Build Listener build Started org apache tools ant Build Event public void build Started Build Event event establish Connection event super build Started event  BuildListener buildStarted BuildEvent buildStarted BuildEvent establishConnection buildStarted

public Color get Color String stream Identifer if stream Identifer equals I DebugUI Constants ID STANDARD OUTPUT STREAM return AntUI Plugin get Preference Color I AntUI Preference Constants CONSOLE INFO COLOR if stream Identifer equals I DebugUI Constants ID STANDARD ERROR STREAM return AntUI Plugin get Preference Color I AntUI Preference Constants CONSOLE ERROR COLOR if stream Identifer equals Ant Streams Proxy ANT DEBUG STREAM return AntUI Plugin get Preference Color I AntUI Preference Constants CONSOLE DEBUG COLOR if stream Identifer equals Ant Streams Proxy ANT VERBOSE STREAM return AntUI Plugin get Preference Color I AntUI Preference Constants CONSOLE VERBOSE COLOR if stream Identifer equals Ant Streams Proxy ANT WARNING STREAM return AntUI Plugin get Preference Color I AntUI Preference Constants CONSOLE WARNING COLOR return super get Color stream Identifer  getColor streamIdentifer streamIdentifer IDebugUIConstants ID_STANDARD_OUTPUT_STREAM AntUIPlugin getPreferenceColor IAntUIPreferenceConstants CONSOLE_INFO_COLOR streamIdentifer IDebugUIConstants ID_STANDARD_ERROR_STREAM AntUIPlugin getPreferenceColor IAntUIPreferenceConstants CONSOLE_ERROR_COLOR streamIdentifer AntStreamsProxy ANT_DEBUG_STREAM AntUIPlugin getPreferenceColor IAntUIPreferenceConstants CONSOLE_DEBUG_COLOR streamIdentifer AntStreamsProxy ANT_VERBOSE_STREAM AntUIPlugin getPreferenceColor IAntUIPreferenceConstants CONSOLE_VERBOSE_COLOR streamIdentifer AntStreamsProxy ANT_WARNING_STREAM AntUIPlugin getPreferenceColor IAntUIPreferenceConstants CONSOLE_WARNING_COLOR getColor streamIdentifer
public void connect I Process process I Console console Both remote and local Ant builds are guaranteed to have an Ant Streams Proxy The remote Ant builds make use of the org eclipse debug core process Factories extension point Ant Streams Proxy proxy Ant Streams Proxy process get Streams Proxy if process instanceof Ant Process Ant Process process set Console console if proxy null console connect proxy get Debug Stream Monitor Ant Streams Proxy ANT DEBUG STREAM console connect proxy get Warning Stream Monitor Ant Streams Proxy ANT WARNING STREAM console connect proxy get Verbose Stream Monitor Ant Streams Proxy ANT VERBOSE STREAM AntUI Plugin get Default get Preference Store add Property Change Listener this super connect process console  IProcess IConsole AntStreamsProxy processFactories AntStreamsProxy AntStreamsProxy getStreamsProxy AntProcess AntProcess setConsole getDebugStreamMonitor AntStreamsProxy ANT_DEBUG_STREAM getWarningStreamMonitor AntStreamsProxy ANT_WARNING_STREAM getVerboseStreamMonitor AntStreamsProxy ANT_VERBOSE_STREAM AntUIPlugin getDefault getPreferenceStore addPropertyChangeListener
see org eclipse debug ui console I Console Color Provider is Read Only public boolean is Read Only return true  IConsoleColorProvider isReadOnly isReadOnly
AntUI Plugin get Standard Display async Exec new Runnable public void run I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null I Workbench Page page window get Active Page if page null I Workbench Part part page find View I Console Constants ID CONSOLE VIEW if part null Widget text Widget Widget part get Adapter Widget class if text Widget instanceof Styled Text Styled Text text Widget redraw  AntUIPlugin getStandardDisplay asyncExec IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IWorkbenchPage getActivePage IWorkbenchPart findView IConsoleConstants ID_CONSOLE_VIEW textWidget getAdapter textWidget StyledText StyledText textWidget
public void property Change Property Change Event event if affects Ant Console event get Property AntUI Plugin get Standard Display async Exec new Runnable public void run I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null I Workbench Page page window get Active Page if page null I Workbench Part part page find View I Console Constants ID CONSOLE VIEW if part null Widget text Widget Widget part get Adapter Widget class if text Widget instanceof Styled Text Styled Text text Widget redraw  propertyChange PropertyChangeEvent affectsAntConsole getProperty AntUIPlugin getStandardDisplay asyncExec IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IWorkbenchPage getActivePage IWorkbenchPart findView IConsoleConstants ID_CONSOLE_VIEW textWidget getAdapter textWidget StyledText StyledText textWidget
private boolean affects Ant Console String property if I AntUI Preference Constants CONSOLE DEBUG COLOR equals property return true else if I AntUI Preference Constants CONSOLE ERROR COLOR equals property return true else if I AntUI Preference Constants CONSOLE INFO COLOR equals property return true else if I AntUI Preference Constants CONSOLE VERBOSE COLOR equals property return true else if I AntUI Preference Constants CONSOLE WARNING COLOR equals property return true return false  affectsAntConsole IAntUIPreferenceConstants CONSOLE_DEBUG_COLOR IAntUIPreferenceConstants CONSOLE_ERROR_COLOR IAntUIPreferenceConstants CONSOLE_INFO_COLOR IAntUIPreferenceConstants CONSOLE_VERBOSE_COLOR IAntUIPreferenceConstants CONSOLE_WARNING_COLOR
see org eclipse debug ui console I Console Color Provider disconnect public void disconnect AntUI Plugin get Default get Preference Store remove Property Change Listener this super disconnect  IConsoleColorProvider AntUIPlugin getDefault getPreferenceStore removePropertyChangeListener

public void init I Console console f Console console BUILD FAILED file c 1115 test build Files 23638 xml 12 f Error Matcher new String Matcher BUILD FAILED xml false false NON NLS 1 f Error Matcher2 new String Matcher xml false false NON NLS 1  IConsole fConsole buildFiles fErrorMatcher StringMatcher fErrorMatcher2 StringMatcher
public void line Appended I Region line try int line Offset line get Offset int line Length line get Length String text f Console get Document get line Offset line Length String file Name null String line Number NON NLS 1 int file Start 1 int index 1 if f Error Matcher match text f Build Failed true index text index Of file NON NLS 1 if index 0 file Start index 5 else file Start text index Of BUILD FAILED 14 NON NLS 1 index file Start else if f Build Failed f Error Matcher2 match text output resulting from failures which occurred in nested build from using the ant task BUILD FAILED C Darins Debugger 20021213 eclipse runtime workspace Mine build xml 4 Following error occured while executing this line C Darins Debugger 20021213 eclipse runtime workspace Mine subbuild xml 4 srcdir attribute must be set index 0 file Start 0 if index 1 index text index Of xml index NON NLS 1 if index 0 int number Start index 4 int number End text index Of number Start int file End index 3 if number Start 0 file End 0 file Name text substring file Start file End trim if number End 0 line Number text substring number Start number End trim if file Name null int num 1 try num Integer parse Int line Number catch Number Format Exception e I File files Resources Plugin get Workspace get Root find Files For Location new Path file Name I File file null if files length 0 file files 0 if file null file exists File Link link new File Link file null 1 1 num f Console add Link link line Offset file Start line Length file Start catch Bad Location Exception e  lineAppended IRegion lineOffset getOffset lineLength getLength fConsole getDocument lineOffset lineLength fileName lineNumber fileStart fErrorMatcher fBuildFailed indexOf fileStart fileStart indexOf fileStart fBuildFailed fErrorMatcher2 fileStart indexOf numberStart numberEnd indexOf numberStart fileEnd numberStart fileEnd fileName fileStart fileEnd numberEnd lineNumber numberStart numberEnd fileName parseInt lineNumber NumberFormatException IFile ResourcesPlugin getWorkspace getRoot findFilesForLocation fileName IFile FileLink FileLink fConsole addLink lineOffset fileStart lineLength fileStart BadLocationException
see org eclipse debug ui console I Console Line Tracker dispose public void dispose f Console null  IConsoleLineTracker fConsole

Constructor for Javac Line Tracker public Javac Line Tracker super  JavacLineTracker JavacLineTracker
see org eclipse debug ui console I Console Line Tracker init org eclipse debug ui console I Console public void init I Console console f Console console f Eclipse Compiler Matcher new String Matcher javac ERROR in java at line false false NON NLS 1 f Javac Matcher new String Matcher javac java false false NON NLS 1 f Jikes Matcher new String Matcher javac java false false NON NLS 1  IConsoleLineTracker IConsole IConsole fConsole fEclipseCompilerMatcher StringMatcher fJavacMatcher StringMatcher fJikesMatcher StringMatcher
see org eclipse debug ui console I Console Line Tracker line Appended org eclipse jface text I Region public void line Appended I Region line try int line Offset line get Offset int line Length line get Length String text f Console get Document get line Offset line Length String file Name null String line Number NON NLS 1 int file Start 1 if f Eclipse Compiler Matcher match text f Trolling false int index text index Of ERROR in NON NLS 1 if index 0 file Start index 9 index text last Index Of at line NON NLS 1 if index 0 int file End index 1 int number Start index 9 index text last Index Of if index 0 int number End index file Name text substring file Start file End trim line Number text substring number Start number End trim else if f Javac Matcher match text f Trolling false file Start text index Of javac NON NLS 1 file Start 8 int index text index Of java file Start NON NLS 1 if index 0 int number Start index 6 file Name text substring file Start number Start 1 trim index text index Of number Start NON NLS 1 if index number Start line Number text substring number Start index else if f Jikes Matcher match text file Start text index Of file Start int index text index Of java file Start NON NLS 1 if index 0 index 5 file Name text substring file Start index trim f Trolling true else if f Trolling int index text index Of javac NON NLS 1 if index 0 look for a line number index 7 int num End text index Of index NON NLS 1 if num End 0 String number text substring index num End trim try int num Integer parse Int number int num Start text index Of number index if f Last File null f Last File exists File Link link new File Link f Last File null 1 1 num f Console add Link link line Offset num Start line Length num Start catch Number Format Exception e not a line number else f Trolling false if file Name null int num 1 try num Integer parse Int line Number catch Number Format Exception e I File file null I Path file Path new Path file Name first check if in the same file faster if f Last File null f Last File get Location equals file Path file f Last File else I File files Resources Plugin get Workspace get Root find Files For Location file Path if files length 0 file files 0 f Last File file if file null file exists File Link link new File Link file null 1 1 num f Console add Link link line Offset file Start line Length file Start catch Bad Location Exception e  IConsoleLineTracker lineAppended IRegion lineAppended IRegion lineOffset getOffset lineLength getLength fConsole getDocument lineOffset lineLength fileName lineNumber fileStart fEclipseCompilerMatcher fTrolling indexOf fileStart lastIndexOf fileEnd numberStart lastIndexOf numberEnd fileName fileStart fileEnd lineNumber numberStart numberEnd fJavacMatcher fTrolling fileStart indexOf fileStart indexOf fileStart numberStart fileName fileStart numberStart indexOf numberStart numberStart lineNumber numberStart fJikesMatcher fileStart indexOf fileStart indexOf fileStart fileName fileStart fTrolling fTrolling indexOf numEnd indexOf numEnd numEnd parseInt numStart indexOf fLastFile fLastFile FileLink FileLink fLastFile fConsole addLink lineOffset numStart lineLength numStart NumberFormatException fTrolling fileName parseInt lineNumber NumberFormatException IFile IPath filePath fileName fLastFile fLastFile getLocation filePath fLastFile IFile ResourcesPlugin getWorkspace getRoot findFilesForLocation filePath fLastFile FileLink FileLink fConsole addLink lineOffset fileStart lineLength fileStart BadLocationException
see org eclipse debug ui console I Console Line Tracker dispose public void dispose f Console null  IConsoleLineTracker fConsole

Constructor for Task Line Tracker public Task Line Tracker super  TaskLineTracker TaskLineTracker
see org eclipse debug ui console I Console Line Tracker init org eclipse debug ui console I Console public void init I Console console f Console console  IConsoleLineTracker IConsole IConsole fConsole
see org eclipse debug ui console I Console Line Tracker line Appended org eclipse jface text I Region public void line Appended I Region line Task Link Manager process New Line f Console line  IConsoleLineTracker lineAppended IRegion lineAppended IRegion TaskLinkManager processNewLine fConsole
see org eclipse debug ui console I Console Line Tracker dispose public void dispose f Console null  IConsoleLineTracker fConsole
see org eclipse debug ui console I Console Line Tracker Extension console Closed public void console Closed Task Link Manager dispose f Console get Process  IConsoleLineTrackerExtension consoleClosed consoleClosed TaskLinkManager fConsole getProcess

private External Ant Buildfile Import Page main Page public Ant Buildfile Import Wizard super  ExternalAntBuildfileImportPage mainPage AntBuildfileImportWizard
public void add Pages super add Pages main Page new External Ant Buildfile Import Page add Page main Page  addPages addPages mainPage ExternalAntBuildfileImportPage addPage mainPage
public void init I Workbench workbench I Structured Selection current Selection set Window Title Data Transfer Messages get String Ant Buildfile Import Wizard 0 NON NLS 1 set Default Page Image Descriptor AntUI Images get Image Descriptor I AntUI Constants IMG IMPORT WIZARD BANNER  IWorkbench IStructuredSelection currentSelection setWindowTitle DataTransferMessages getString AntBuildfileImportWizard setDefaultPageImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_IMPORT_WIZARD_BANNER
see org eclipse jface wizard I Wizard perform Cancel public boolean perform Cancel return true  IWizard performCancel performCancel
see org eclipse jface wizard I Wizard perform Finish public boolean perform Finish return main Page create Project null  IWizard performFinish performFinish mainPage createProject

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Data Transfer Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME DataTransferMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

private static class Import Overwrite Query implements I Overwrite Query public String query Overwrite String file return ALL  ImportOverwriteQuery IOverwriteQuery queryOverwrite
private Listener location Modify Listener new Listener public void handle Event Event e f Ant Model get Ant Model get Build File get Project Location Field Value set Project Name set Page Complete validate Page  locationModifyListener handleEvent fAntModel getAntModel getBuildFile getProjectLocationFieldValue setProjectName setPageComplete validatePage
private Listener name Modify Listener new Listener public void handle Event Event e set Page Complete validate Page  nameModifyListener handleEvent setPageComplete validatePage
public External Ant Buildfile Import Page super external Ant Buildfile Page NON NLS 1 set Page Complete false set Title Data Transfer Messages get String External Ant Buildfile Import Page 9 NON NLS 1 set Description Data Transfer Messages get String External Ant Buildfile Import Page 10 NON NLS 1  ExternalAntBuildfileImportPage externalAntBuildfilePage setPageComplete setTitle DataTransferMessages getString ExternalAntBuildfileImportPage setDescription DataTransferMessages getString ExternalAntBuildfileImportPage
public void create Control Composite parent initialize Dialog Units parent Composite composite new Composite parent SWT NULL Workbench Help set Help composite I Help Context Ids NEW PROJECT WIZARD PAGE composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL BOTH composite set Font parent get Font create Project Name Group composite create Project Location Group composite validate Page Show description on opening set Error Message null set Message null set Control composite  createControl initializeDialogUnits WorkbenchHelp setHelp IHelpContextIds NEW_PROJECT_WIZARD_PAGE setLayout GridLayout setLayoutData GridData GridData FILL_BOTH setFont getFont createProjectNameGroup createProjectLocationGroup validatePage setErrorMessage setMessage setControl
Creates the project location specification controls param parent the parent composite private final void create Project Location Group Composite parent project specification group Composite project Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 project Group set Layout layout project Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL project Group set Font parent get Font new project label Label project Contents Label new Label project Group SWT NONE project Contents Label set Text Data Transfer Messages get String External Ant Buildfile Import Page 11 NON NLS 1 project Contents Label set Font parent get Font create User Specified Project Location Group project Group  createProjectLocationGroup projectGroup GridLayout GridLayout numColumns projectGroup setLayout projectGroup setLayoutData GridData GridData FILL_HORIZONTAL projectGroup setFont getFont projectContentsLabel projectGroup projectContentsLabel setText DataTransferMessages getString ExternalAntBuildfileImportPage projectContentsLabel setFont getFont createUserSpecifiedProjectLocationGroup projectGroup
Creates the project name specification controls param parent the parent composite private final void create Project Name Group Composite parent Font dialog Font parent get Font project specification group Composite project Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 project Group set Font dialog Font project Group set Layout layout project Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL new project label Label project Label new Label project Group SWT NONE project Label set Text Data Transfer Messages get String External Ant Buildfile Import Page 12 NON NLS 1 project Label set Font dialog Font new project name entry field project Name Field new Text project Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH project Name Field set Layout Data data project Name Field set Font dialog Font project Name Field add Listener SWT Modify name Modify Listener  createProjectNameGroup dialogFont getFont projectGroup GridLayout GridLayout numColumns projectGroup setFont dialogFont projectGroup setLayout projectGroup setLayoutData GridData GridData FILL_HORIZONTAL projectLabel projectGroup projectLabel setText DataTransferMessages getString ExternalAntBuildfileImportPage projectLabel setFont dialogFont projectNameField projectGroup GridData GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH projectNameField setLayoutData projectNameField setFont dialogFont projectNameField addListener nameModifyListener
this browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Browse Button Pressed  browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleBrowseButtonPressed
Creates the project location specification controls param project Group the parent composite param boolean the initial enabled state of the widgets created private void create User Specified Project Location Group Composite project Group Font dialog Font project Group get Font project location entry field this location Path Field new Text project Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH this location Path Field set Layout Data data this location Path Field set Font dialog Font browse button this browse Button new Button project Group SWT PUSH this browse Button set Text Data Transfer Messages get String External Ant Buildfile Import Page 13 NON NLS 1 this browse Button set Font dialog Font set Button Layout Data this browse Button this browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Browse Button Pressed location Path Field add Listener SWT Modify location Modify Listener  projectGroup createUserSpecifiedProjectLocationGroup projectGroup dialogFont projectGroup getFont locationPathField projectGroup GridData GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH locationPathField setLayoutData locationPathField setFont dialogFont browseButton projectGroup browseButton setText DataTransferMessages getString ExternalAntBuildfileImportPage browseButton setFont dialogFont setButtonLayoutData browseButton browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleBrowseButtonPressed locationPathField addListener locationModifyListener
Returns the current project name as entered by the user or its anticipated initial value return the project name its anticipated initial value or code null code if no project name is known private String get Project Name Ant Project Node project Node String user Specified Name get Project Name Field Value if user Specified Name length 0 return user Specified Name String project Name project Node get Label if project Name null project Name Data Transfer Messages get String External Ant Buildfile Import Page 14 NON NLS 1 return project Name  getProjectName AntProjectNode projectNode userSpecifiedName getProjectNameFieldValue userSpecifiedName userSpecifiedName projectName projectNode getLabel projectName projectName DataTransferMessages getString ExternalAntBuildfileImportPage projectName
Returns the value of the project name field with leading and trailing spaces removed return the project name in the field private String get Project Name Field Value if project Name Field null return NON NLS 1 return project Name Field get Text trim  getProjectNameFieldValue projectNameField projectNameField getText
Returns the value of the project location field with leading and trailing spaces removed return the project location directory in the field private String get Project Location Field Value return location Path Field get Text trim  getProjectLocationFieldValue locationPathField getText
Determine the buildfile the user wishes to operate from private void handle Browse Button Pressed String last Used Path null last Used Path dialog Settings get I AntUI Constants DIALOGSTORE LASTEXTFILE if last Used Path null last Used Path NON NLS 1 File Dialog dialog new File Dialog get Shell SWT SINGLE dialog set Filter Extensions new String xml NON NLS 1 dialog set Filter Path last Used Path String result dialog open if result null return I Path filter Path new Path dialog get Filter Path String build File Name dialog get File Name I Path path filter Path append build File Name make Absolute previously Browsed Directory selected Directory location Path Field set Text path toOS String  handleBrowseButtonPressed lastUsedPath lastUsedPath dialogSettings IAntUIConstants DIALOGSTORE_LASTEXTFILE lastUsedPath lastUsedPath FileDialog FileDialog getShell setFilterExtensions setFilterPath lastUsedPath IPath filterPath getFilterPath buildFileName getFileName IPath filterPath buildFileName makeAbsolute previouslyBrowsedDirectory selectedDirectory locationPathField setText toOSString
Returns whether this page s controls currently all contain valid values return code true code if all controls are valid and code false code if at least one is invalid private boolean validate Page String location Field Contents get Project Location Field Value if location Field Contents equals NON NLS 1 set Error Message null set Message Data Transfer Messages get String External Ant Buildfile Import Page 15 NON NLS 1 return false I Path path new Path NON NLS 1 if path is Valid Path location Field Contents set Error Message Data Transfer Messages get String External Ant Buildfile Import Page 16 NON NLS 1 return false if f Ant Model null set Error Message Data Transfer Messages get String External Ant Buildfile Import Page 17 NON NLS 1 return false if get Project Name Field Value length 0 set Error Message Data Transfer Messages get String External Ant Buildfile Import Page 18 NON NLS 1 return false I Project existing Project Resources Plugin get Workspace get Root get Project get Project Name Field Value if existing Project exists set Error Message Data Transfer Messages get String External Ant Buildfile Import Page 19 NON NLS 1 return false set Error Message null set Message null return true  validatePage locationFieldContents getProjectLocationFieldValue locationFieldContents setErrorMessage setMessage DataTransferMessages getString ExternalAntBuildfileImportPage IPath isValidPath locationFieldContents setErrorMessage DataTransferMessages getString ExternalAntBuildfileImportPage fAntModel setErrorMessage DataTransferMessages getString ExternalAntBuildfileImportPage getProjectNameFieldValue setErrorMessage DataTransferMessages getString ExternalAntBuildfileImportPage IProject existingProject ResourcesPlugin getWorkspace getRoot getProject getProjectNameFieldValue existingProject setErrorMessage DataTransferMessages getString ExternalAntBuildfileImportPage setErrorMessage setMessage
Set the project name using either the name of the parent of the file or the name entry in the xml for the file private void set Project Name if f Ant Model null return Ant Project Node node f Ant Model get Project Node String project Name get Project Name node project Name Field set Text project Name  setProjectName fAntModel AntProjectNode fAntModel getProjectNode projectName getProjectName projectNameField setText projectName
Return a xml file from the specified location If there isn t one return null private File get Build File String location Field Contents File build File new File location Field Contents if build File is File build File exists return null return build File  getBuildFile locationFieldContents buildFile locationFieldContents buildFile isFile buildFile buildFile
Workspace Modify Operation op new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception List javac Tasks resolve Javac Tasks javac Nodes TODO no javactasks throw Core Exception Project Creator creator new Project Creator Iterator iter javac Tasks iterator while iter has Next Javac javac Task Javac iter next I Java Project java Project creator create Java Project From Javac Node project Name javac Task import Build File monitor java Project get Path build File result 0 java Project  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException javacTasks resolveJavacTasks javacNodes CoreException ProjectCreator ProjectCreator javacTasks hasNext javacTask IJavaProject javaProject createJavaProjectFromJavacNode projectName javacTask importBuildFile javaProject getPath buildFile javaProject
Creates a new project resource based on the Ant buildfile return the created project resource or code null code if the project was not created protected I Java Project create Project Ant Project Node project Node f Ant Model get Project Node final List javac Nodes new Array List get Javac Nodes javac Nodes project Node final I Java Project result new I Java Project 1 final String project Name get Project Name Field Value final File build File get Build File get Project Location Field Value if javac Nodes size 1 set Error Message Data Transfer Messages get String External Ant Buildfile Import Page 20 NON NLS 1 return null Workspace Modify Operation op new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception List javac Tasks resolve Javac Tasks javac Nodes TODO no javactasks throw Core Exception Project Creator creator new Project Creator Iterator iter javac Tasks iterator while iter has Next Javac javac Task Javac iter next I Java Project java Project creator create Java Project From Javac Node project Name javac Task import Build File monitor java Project get Path build File result 0 java Project run the new project creation operation try get Container run true true op catch Interrupted Exception e return null catch Invocation Target Exception e ie one of the steps resulted in a core exception Throwable t e get Target Exception if t instanceof Core Exception Error Dialog open Error get Shell Data Transfer Messages get String External Ant Buildfile Import Page 21 NON NLS 1 null Core Exception t get Status return result 0  IJavaProject createProject AntProjectNode projectNode fAntModel getProjectNode javacNodes ArrayList getJavacNodes javacNodes projectNode IJavaProject IJavaProject projectName getProjectNameFieldValue buildFile getBuildFile getProjectLocationFieldValue javacNodes setErrorMessage DataTransferMessages getString ExternalAntBuildfileImportPage WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException javacTasks resolveJavacTasks javacNodes CoreException ProjectCreator ProjectCreator javacTasks hasNext javacTask IJavaProject javaProject createJavaProjectFromJavacNode projectName javacTask importBuildFile javaProject getPath buildFile javaProject getContainer InterruptedException InvocationTargetException getTargetException CoreException ErrorDialog openError getShell DataTransferMessages getString ExternalAntBuildfileImportPage CoreException getStatus
protected void import Build File I Progress Monitor monitor I Path dest Path File build File I Import Structure Provider structure Provider File System Structure Provider INSTANCE List files new Array List 1 files add build File File root Dir build File get Parent File try Import Operation op new Import Operation dest Path root Dir structure Provider new Import Overwrite Query files op set Create Container Structure false op run monitor catch Interrupted Exception e should not happen catch Invocation Target Exception e Throwable t e get Target Exception if t instanceof Core Exception Error Dialog open Error get Shell Data Transfer Messages get String External Ant Buildfile Import Page 22 NON NLS 1 null Core Exception t get Status  importBuildFile IProgressMonitor IPath destPath buildFile IImportStructureProvider structureProvider FileSystemStructureProvider ArrayList buildFile rootDir buildFile getParentFile ImportOperation ImportOperation destPath rootDir structureProvider ImportOverwriteQuery setCreateContainerStructure InterruptedException InvocationTargetException getTargetException CoreException ErrorDialog openError getShell DataTransferMessages getString ExternalAntBuildfileImportPage CoreException getStatus
private List resolve Javac Tasks List javac Nodes List resolved Javac Tasks new Array List javac Nodes size Iterator nodes javac Nodes iterator while nodes has Next Ant Task Node task Node Ant Task Node nodes next Task javac Task task Node get Task if javac Task instanceof Unknown Element if Unknown Element javac Task get Real Thing null javac Task maybe Configure resolved Javac Tasks add Unknown Element javac Task get Real Thing else resolved Javac Tasks add javac Task return resolved Javac Tasks  resolveJavacTasks javacNodes resolvedJavacTasks ArrayList javacNodes javacNodes hasNext AntTaskNode taskNode AntTaskNode javacTask taskNode getTask javacTask UnknownElement UnknownElement javacTask getRealThing javacTask maybeConfigure resolvedJavacTasks UnknownElement javacTask getRealThing resolvedJavacTasks javacTask resolvedJavacTasks
see org eclipse ant internal ui editor outline I Location Provider get Location public I Path get Location return new Path build File get Absolute Path  ILocationProvider getLocation IPath getLocation buildFile getAbsolutePath
private Ant Model get Ant Model final File build File I Document doc get Document build File if doc null return null Ant Model model new Ant Model XML Core get Default doc null new Location Provider null non Javadoc see org eclipse ant internal ui editor outline I Location Provider get Location public I Path get Location return new Path build File get Absolute Path model reconcile null return model  AntModel getAntModel buildFile IDocument getDocument buildFile AntModel AntModel XMLCore getDefault LocationProvider ILocationProvider getLocation IPath getLocation buildFile getAbsolutePath
private I Document get Document File build File Input Stream in try in new File Input Stream build File catch File Not Found Exception e return null String initial Content get Stream Content As String in return new Document initial Content  IDocument getDocument buildFile InputStream FileInputStream buildFile FileNotFoundException initialContent getStreamContentAsString initialContent
private String get Stream Content As String Input Stream input Stream Input Stream Reader reader try reader new Input Stream Reader input Stream Resources Plugin get Encoding catch Unsupported Encoding Exception e AntUI Plugin log e return NON NLS 1 return get Reader Content As String new Buffered Reader reader  getStreamContentAsString InputStream inputStream InputStreamReader InputStreamReader inputStream ResourcesPlugin getEncoding UnsupportedEncodingException AntUIPlugin getReaderContentAsString BufferedReader
private String get Reader Content As String Buffered Reader buffered Reader String Buffer result new String Buffer try String line buffered Reader read Line while line null if result length 0 result append n NON NLS 1 result append line line buffered Reader read Line catch IO Exception e AntUI Plugin log e return null return result to String  getReaderContentAsString BufferedReader bufferedReader StringBuffer StringBuffer bufferedReader readLine bufferedReader readLine IOException AntUIPlugin toString
private void get Javac Nodes List javac Nodes Ant Element Node parent if parent has Children return List children parent get Child Nodes for Iterator iter children iterator iter has Next Ant Element Node node Ant Element Node iter next if node instanceof Ant Target Node get Javac Nodes javac Nodes node else if node instanceof Ant Task Node Ant Task Node task Ant Task Node node if task get Name javac NON NLS 1 javac Nodes add task  getJavacNodes javacNodes AntElementNode hasChildren getChildNodes hasNext AntElementNode AntElementNode AntTargetNode getJavacNodes javacNodes AntTaskNode AntTaskNode AntTaskNode getName javacNodes
public void set Visible boolean visible super set Visible visible if visible this location Path Field set Focus  setVisible setVisible locationPathField setFocus

public I Java Project create Java Project From Javac Node String project Name Javac javac Task throws Core Exception I Java Project java Project create Java Project project Name File dest Dir javac Task get Destdir String dest Dir Name dest Dir get Name org apache tools ant types Path source Dirs javac Task get Srcdir create Source Directories dest Dir dest Dir Name source Dirs java Project add rt jar add Variable Entry java Project new Path Java Runtime JRELIB VARIABLE new Path Java Runtime JRESRC VARIABLE new Path Java Runtime JRESRCROOT VARIABLE set Classpath javac Task java Project java Project get Project refresh Local I Resource DEPTH INFINITE null return java Project  IJavaProject createJavaProjectFromJavacNode projectName javacTask CoreException IJavaProject javaProject createJavaProject projectName destDir javacTask getDestdir destDirName destDir getName sourceDirs javacTask getSrcdir createSourceDirectories destDir destDirName sourceDirs javaProject addVariableEntry javaProject JavaRuntime JRELIB_VARIABLE JavaRuntime JRESRC_VARIABLE JavaRuntime JRESRCROOT_VARIABLE setClasspath javacTask javaProject javaProject getProject refreshLocal IResource DEPTH_INFINITE javaProject
private void set Classpath Javac javac Task I Java Project java Project throws Java Model Exception org apache tools ant types Path classpath javac Task get Classpath if classpath null return String classpaths classpath list for int i 0 i classpaths length i String cp classpaths i File classpath Entry new File cp add Library java Project new Path classpath Entry get Absolute Path  setClasspath javacTask IJavaProject javaProject JavaModelException javacTask getClasspath classpathEntry addLibrary javaProject classpathEntry getAbsolutePath
private void create Source Directories File dest Dir String dest Dir Name org apache tools ant types Path source Dirs I Java Project java Project throws Core Exception create the source directories String source Directories source Dirs list for int i 0 i source Directories length i String src Dir source Directories i File src Directory new File src Dir add Source Container java Project src Directory get Name src Dir dest Dir Name dest Dir get Absolute Path  createSourceDirectories destDir destDirName sourceDirs IJavaProject javaProject CoreException sourceDirectories sourceDirs sourceDirectories srcDir sourceDirectories srcDirectory srcDir addSourceContainer javaProject srcDirectory getName srcDir destDirName destDir getAbsolutePath
private I Java Project create Java Project String project Name throws Core Exception I Workspace Root root Resources Plugin get Workspace get Root I Project project root get Project project Name if project exists project create null else project refresh Local I Resource DEPTH INFINITE null if project is Open project open null if project has Nature Java Core NATURE ID add Nature To Project project Java Core NATURE ID I Java Project jproject Java Core create project jproject set Raw Classpath new I Classpath Entry 0 null return jproject  IJavaProject createJavaProject projectName CoreException IWorkspaceRoot ResourcesPlugin getWorkspace getRoot IProject getProject projectName refreshLocal IResource DEPTH_INFINITE isOpen hasNature JavaCore NATURE_ID addNatureToProject JavaCore NATURE_ID IJavaProject JavaCore setRawClasspath IClasspathEntry
private void add Nature To Project I Project proj String nature Id throws Core Exception I Project Description description proj get Description String prev Natures description get Nature Ids String new Natures new String prev Natures length 1 System arraycopy prev Natures 0 new Natures 0 prev Natures length new Natures prev Natures length nature Id description set Nature Ids new Natures proj set Description description null  addNatureToProject IProject natureId CoreException IProjectDescription getDescription prevNatures getNatureIds newNatures prevNatures prevNatures newNatures prevNatures newNatures prevNatures natureId setNatureIds newNatures setDescription
Adds a source container to a I Java Project private I Package Fragment Root add Source Container I Java Project jproject String src Name String src Path String output Name String output Path throws Core Exception I Project project jproject get Project I Container container null if src Name null src Name length 0 container project else I Folder folder project get Folder src Name if folder exists folder create Link new Path src Path I Resource ALLOW MISSING LOCAL null container folder I Package Fragment Root root jproject get Package Fragment Root container I Folder output null if output Name null output project get Folder output Name if output exists output create Link new Path output Path I Resource ALLOW MISSING LOCAL null I Classpath Entry cpe Java Core new Source Entry root get Path new I Path 0 output get Full Path add To Classpath jproject cpe return root  IJavaProject IPackageFragmentRoot addSourceContainer IJavaProject srcName srcPath outputName outputPath CoreException IProject getProject IContainer srcName srcName IFolder getFolder srcName createLink srcPath IResource ALLOW_MISSING_LOCAL IPackageFragmentRoot getPackageFragmentRoot IFolder outputName getFolder outputName createLink outputPath IResource ALLOW_MISSING_LOCAL IClasspathEntry JavaCore newSourceEntry getPath IPath getFullPath addToClasspath
private void add To Classpath I Java Project jproject I Classpath Entry cpe throws Java Model Exception I Classpath Entry old Entries jproject get Raw Classpath for int i 0 i old Entries length i if old Entries i equals cpe return int n Entries old Entries length I Classpath Entry new Entries new I Classpath Entry n Entries 1 System arraycopy old Entries 0 new Entries 0 n Entries new Entries n Entries cpe jproject set Raw Classpath new Entries null  addToClasspath IJavaProject IClasspathEntry JavaModelException IClasspathEntry oldEntries getRawClasspath oldEntries oldEntries nEntries oldEntries IClasspathEntry newEntries IClasspathEntry nEntries oldEntries newEntries nEntries newEntries nEntries setRawClasspath newEntries
Adds a variable entry with source attachment to a I Java Project if the path can be resolved private void add Variable Entry I Java Project jproject I Path path I Path source Attach Path I Path source Attach Root throws Java Model Exception I Classpath Entry cpe Java Core new Variable Entry path source Attach Path source Attach Root add To Classpath jproject cpe I Path resolved Path Java Core get Resolved Variable Path path if resolved Path null jproject get Package Fragment Root resolved Path to String  IJavaProject addVariableEntry IJavaProject IPath IPath sourceAttachPath IPath sourceAttachRoot JavaModelException IClasspathEntry JavaCore newVariableEntry sourceAttachPath sourceAttachRoot addToClasspath IPath resolvedPath JavaCore getResolvedVariablePath resolvedPath getPackageFragmentRoot resolvedPath toString
Adds a library entry with source attchment to a I Java Project private void add Library I Java Project jproject I Path path throws Java Model Exception I Classpath Entry cpe Java Core new Library Entry path null null add To Classpath jproject cpe jproject get Package Fragment Root path to String  IJavaProject addLibrary IJavaProject IPath JavaModelException IClasspathEntry JavaCore newLibraryEntry addToClasspath getPackageFragmentRoot toString

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private AntDTD Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME AntDTDMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public static final int ATTRIBUTE 1 Return the atom name public String get Name  getName
public String get Name Return the atom name public String to String  getName toString

return the attribute type This will be one of CDATA ID IDREF IDREFS NMTOKEN NMTOKENS ENTITY ENTITIES NOTATION or enumeration The type is interned and may be compared to a constant with For NOTATION or enumeration code get Enum code will return a list of values  getEnum
return String or null if type is not NOTATION or ENUMERATION 
public String get Enum Return the element the attribute is defined in public I Element get Element  getEnum IElement getElement
public I Element get Element Return the default value or null if none public String get Default  IElement getElement getDefault
public String get Default Return true if the default value is fixed public boolean is Fixed  getDefault isFixed
public boolean is Fixed Return true if attribute is required false if it is optional public boolean is Required  isFixed isRequired

public interface I Dfm Return true if no further symbols are required boolean is Accepting  IDfm isAccepting
If the symbol represented by name is acceptable return the dfm to apply to the next child symbol Otherwise return null 
If the symbol represented by the namespace name pair is acceptable return the dfm to apply to the next child symbol Otherwise return null 
If the symbol represented by name is acceptable to code advance code return the corresponding atom Otherwise return null 
Return the symbols for which code advance code will return a next dfm If no symbols will advance this dfm or if any symbol will returns an empty array Use code is Any code and code is Empty code to disambiguate the cases  isAny isEmpty
Return the symbols for which code advance code will return a next dfm If no symbols will advance this dfm or if any symbol will returns null Use code is Any code and code is Empty code to disambiguate the cases  isAny isEmpty
Return true if dfm will accept any symbol and return itself false otherwise This interface keeps the dfm from needing schema knowledge but a better way to process an ANY dfm for elements is use the schema to look up the element and use its dfm instead of this one 
Return true if dfm will reject every symbol code advance code returns null false otherwise Included for completeness so every element can have a dfm regardless of its type 

return true if the element has been referenced in a schema but is not yet defined 
public boolean is Undefined return true if element model is code PCDATA code public boolean is Text  isUndefined isText
public boolean is Text return true if element model is EMPTY public boolean is Empty  isText isEmpty
public boolean is Empty return true if element model is ANY public boolean is Any  isEmpty isAny
return the element s content model The content model will be empty if code is Text code code is Any code or code is Empty code Note that the content model deals with child elements only use code is Mixed code to see if text is also allowed  isText isAny isEmpty isMixed
return the DFM corresponding to the content model Every element has a DFM 
return Map with attribute qname keys and I Attr values If element has no attributes the map is empty Map must not be modified by caller for performance reasons it is not a copy  IAttr

public static final int UNBOUNDED Integer MAX VALUE return one of SEQUENCE CHOICE LEAF public int get Kind  MAX_VALUE getKind
public int get Kind return one of 0 or 1 public int get Min Occurs  getKind getMinOccurs
public int get Min Occurs return one of 1 or UNBOUNDED public int get Max Occurs  getMinOccurs getMaxOccurs
return if SEQUENCE or CHOICE return array of sub models otherwise undefined 
public I Model get Contents return if LEAF return atom otherwise undefined public I Atom get Leaf  IModel getContents IAtom getLeaf
return if SEQUENCE or CHOICE return and respectively otherwise undefined Useful when printing model 
public String get Operator return one of or Useful when printing model public String get Qualifier  getOperator getQualifier
public String get Qualifier Convert content model to string representation public String string Rep  getQualifier stringRep
Convert the model to an Nfm on demand return Nfm 

Find element by name param qname Element name return element or null if no such element 
I Element get Element String qname return I Element of all visible elements I Element get Elements  IElement getElement IElement IElement getElements
return Exception thrown by parser when schema was built or code null code if none Note that the exception does not necessarily mean the schema is incomplete 

Constructor for Parse Error param msg Message public Parse Error String msg super msg  ParseError ParseError

Parse the XML document at the input source and return a document walker that can be used to validate any document with the same DTD internal and external or provide user assistance for this document param input Source Source for XML document to start DTD parse Must contain a DOCTYPE declaration with internal or external subset or both param entity Resolver Entity Resolver or null return schema for document throws Parse Error for NOT SUPPORTED or PARSE ERROR throws IO Exception public I Schema parse Input Source input Source Entity Resolver entity Resolver throws Parse Error IO Exception XML Reader parser null Schema Factory factory new Schema Factory try parser getXML Reader Decl Handler handler factory parser set Property http xml org sax properties declaration handler handler NON NLS 1 if entity Resolver null parser set Entity Resolver entity Resolver parser parse input Source catch SAX Not Recognized Exception e throw new Parse Error NOT SUPPORTED catch SAX Not Supported Exception e throw new Parse Error NOT SUPPORTED catch SAX Exception e Don t care about errors in XML so just fall thru If parse failed in DTD may have incomplete schema but this is better than no schema factory set Error Exception e return factory get Schema  inputSource entityResolver EntityResolver ParseError NOT_SUPPORTED PARSE_ERROR IOException ISchema InputSource inputSource EntityResolver entityResolver ParseError IOException XMLReader SchemaFactory SchemaFactory getXMLReader DeclHandler setProperty entityResolver setEntityResolver entityResolver inputSource SAXNotRecognizedException ParseError NOT_SUPPORTED SAXNotSupportedException ParseError NOT_SUPPORTED SAXException setErrorException getSchema
private XML Reader getXML Reader throws Parse Error SAX Parser parser null try parser SAX Parser Factory new Instance newSAX Parser return parser getXML Reader catch Parser Configuration Exception e throw new Parse Error e get Message catch SAX Exception e throw new Parse Error e get Message  XMLReader getXMLReader ParseError SAXParser SAXParserFactory newInstance newSAXParser getXMLReader ParserConfigurationException ParseError getMessage SAXException ParseError getMessage
Parse the XML document at the argument URL and return a document walker that can be used to validate any document with the same DTD internal and external or provide user assistance for this document param url Of XML document to start DTD parse Must contain a DOCTYPE declaration with internal or external subset or both return I Walker that can be used to traverse document throws Parse Error for NOT SUPPORTED or PARSE ERROR throws IO Exception public I Schema parse String url throws Parse Error IO Exception return parse new Input Source url null  IWalker ParseError NOT_SUPPORTED PARSE_ERROR IOException ISchema ParseError IOException InputSource
Parse the XML document using the argument reader and return a document walker that can be used to validate any document with the same DTD internal and external or provide user assistance for this document param reader Reader for XML document to start DTD parse Must contain a DOCTYPE declaration with internal or external subset or both return I Walker that can be used to traverse document throws Parse Error for NOT SUPPORTED or PARSE ERROR throws IO Exception public I Schema parse Reader reader throws Parse Error IO Exception return parse new Input Source reader null  IWalker ParseError NOT_SUPPORTED PARSE_ERROR IOException ISchema ParseError IOException InputSource
Parse the DTD with the given public and system ids and return a document walker that can be used to validate or provide user assistance for any document with the same external DTD and no internal subset param pub PUBLIC id of DTD param sys SYSTEM id of DTD param root Plausible root element qname Any name will do but a name that will not cause a validation error is preferred return I Walker that can be used to traverse document throws Parse Error for NOT SUPPORTED or PARSE ERROR throws IO Exception public I Schema parseDTD String pub String sys String root throws Parse Error IO Exception return parse new Input Source new DTD Reader pub sys root null  IWalker ParseError NOT_SUPPORTED PARSE_ERROR IOException ISchema ParseError IOException InputSource DTDReader
Parse the DTD from the reader and return a document walker that can be used to validate or provide user assistance for any document with the same external DTD and no internal subset param reader Reader for external subset DTD param root Plausible root element qname Any name will do but a name that will not cause a validation error is preferred return I Schema that can be used to traverse document throws Parse Error for NOT SUPPORTED or PARSE ERROR throws IO Exception public I Schema parseDTD Reader reader String root throws Parse Error IO Exception return parse new Input Source new DTD Reader INTERNAL INTERNAL root new DTD Entity Resolver reader  ISchema ParseError NOT_SUPPORTED PARSE_ERROR IOException ISchema ParseError IOException InputSource DTDReader DTDEntityResolver
private Reader f Delegate public DTD Reader String pub String sys String root String document DOCTYPE root PUBLIC pub sys root NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 f Delegate new String Reader document  fDelegate DTDReader fDelegate StringReader
see java io Reader close public void close throws IO Exception f Delegate close  IOException fDelegate
see java io Reader read char int int public int read char cbuf int off int len throws IO Exception return f Delegate read cbuf off len  IOException fDelegate
private static class DTD Entity Resolver implements Entity Resolver private Reader reader public DTD Entity Resolver Reader reader this reader reader  DTDEntityResolver EntityResolver DTDEntityResolver
see org xml sax Entity Resolver resolve Entity java lang String java lang String public Input Source resolve Entity String public Id String system Id if public Id equals INTERNAL system Id equals INTERNAL return new Input Source reader return null  EntityResolver resolveEntity InputSource resolveEntity publicId systemId publicId systemId InputSource

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private AntDTD Schema Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME AntDTDSchemaMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

protected int f Kind protected Atom int kind String name f Kind kind f Name name intern  fKind fKind fName
public String get Name return f Name  getName fName
public String to String return f Name  toString fName

Constructor param name Attribute qname param element Parent element public Attribute String name I Element element super ATTRIBUTE name f Element element  IElement fElement
see org eclipse ant internal ui dtd I Attribute get Type public String get Type return f Type  IAttribute getType getType fType
see org eclipse ant internal ui dtd I Attribute get Enum public String get Enum return f Enum  IAttribute getEnum getEnum fEnum
see org eclipse ant internal ui dtd I Attribute get Element public I Element get Element return f Element  IAttribute getElement IElement getElement fElement
see org eclipse ant internal ui dtd I Attribute get Default public String get Default return f Default  IAttribute getDefault getDefault fDefault
see org eclipse ant internal ui dtd I Attribute is Fixed public boolean is Fixed return f Fixed  IAttribute isFixed isFixed fFixed
see org eclipse ant internal ui dtd I Attribute is Required public boolean is Required return f Required  IAttribute isRequired isRequired fRequired
public void set Type String type f Type type  setType fType
Sets the default value param default Value Value public void set Default String default Value f Default default Value  defaultValue setDefault defaultValue fDefault defaultValue
Sets the enumeration param enumeration The enumeration to set public void set Enum String enumeration f Enum enumeration  setEnum fEnum
Sets the fixed param fixed The fixed to set public void set Fixed boolean fixed f Fixed fixed  setFixed fFixed
Sets the required param required The required to set public void set Required boolean required f Required required  setRequired fRequired

public static Dfm dfm boolean accepting Dfm dfm free dfm accepting accepting return dfm 
protected Dfm 
private static Dfm free Dfm dfm Dfm factory get Free if dfm null dfm new Dfm dfm accepting dfm empty dfm any false dfm id unique return dfm  getFree
public static Dfm dfm I Atom accept Dfm follow Dfm dfm free dfm keys new Object 1 dfm keys 0 accept dfm values new Object 1 dfm values 0 follow return dfm  IAtom
public static void free Dfm dfm dfm set Keys null dfm set Values null factory set Free dfm  setKeys setValues setFree
public boolean is Accepting return accepting  isAccepting
public I Dfm advance String name if any return this if empty return null if keys null return null Sorted Map map get Indirect String Map this Dfm dfm Dfm map get name free Map map return dfm  IDfm SortedMap getIndirectStringMap freeMap
public String get Accepts if keys null return new String 0 String s new String keys length for int i 0 i s length i s i keys i to String return s  getAccepts toString
public Dfm get Follows if values null return new Dfm 0 Dfm s new Dfm values length System arraycopy values 0 s 0 values length return s  getFollows
public void merge Dfm other accepting other accepting Sorted Map map get Indirect String Map this Sorted Map othermap get Indirect String Map other map merge othermap free Map map free Map othermap  SortedMap getIndirectStringMap SortedMap getIndirectStringMap freeMap freeMap
public Sorted Map get Map return get Indirect String Map this  SortedMap getMap getIndirectStringMap
see org eclipse ant internal ui dtd util Factory Object next public Factory Object next return f Next  FactoryObject FactoryObject fNext
see org eclipse ant internal ui dtd util Factory Object next org eclipse ant internal ui dtd util Factory Object public void next Factory Object obj f Next Dfm obj  FactoryObject FactoryObject FactoryObject fNext
see org eclipse ant internal ui dtd I Dfm is Any public boolean is Any return any  IDfm isAny isAny
see org eclipse ant internal ui dtd I Dfm is Empty public boolean is Empty return empty  IDfm isEmpty isEmpty
public I Atom get Atom String name Object all Keys get Keys if empty all Keys null return null Sorted Map map get Indirect String Map this int index map key Index name if index 0 return null return I Atom all Keys index  IAtom getAtom allKeys getKeys allKeys SortedMap getIndirectStringMap keyIndex IAtom allKeys
see org eclipse ant internal ui dtd I Dfm advance java lang String java lang String public I Dfm advance String namespace String localname no namespace support here return advance localname  IDfm IDfm

Constructor param name Q Name of element public Element String name super ELEMENT name  QName
Set undefined property param undefined False if defined otherwise true default public void set Undefined boolean undefined f Undefined undefined  setUndefined fUndefined
Set text property param text True if text only otherwise false default public void set Text boolean text f Text text  setText fText
Set model property param model Dfm describing content model public void set Content Model I Model model f Model model  setContentModel IModel fModel
Add an attribute to the attribute map param attribute Attribute to add public void add Attribute I Attribute attribute f Map put attribute get Name attribute  addAttribute IAttribute fMap getName
see org eclipse ant internal ui dtd I Element get Attributes public Map get Attributes return f Map  IElement getAttributes getAttributes fMap
see org eclipse ant internal ui dtd I Element is Mixed public I Model get Content Model return f Model  IElement isMixed IModel getContentModel fModel
see org eclipse ant internal ui dtd I Element is Text public boolean is Text return f Text  IElement isText isText fText
see org eclipse ant internal ui dtd I Element is Undefined public boolean is Undefined return f Undefined  IElement isUndefined isUndefined fUndefined
see org eclipse ant internal ui dtd I Element get Dfm public I Dfm get Dfm Dfm dfm f Element Dfm if dfm null dfm parse Element Dfm f Element Dfm dfm return dfm  IElement getDfm IDfm getDfm fElementDfm parseElementDfm fElementDfm
private Dfm parse Element Dfm Dfm dfm if f Any dfm Dfm dfm true dfm any true else if f Empty f Text dfm Dfm dfm true dfm empty true else dfm parse Model f Model return dfm  parseElementDfm fAny fEmpty fText parseModel fModel
private Dfm parse Model I Model model Dfm dfm Nfm nfm model to Nfm if nfm null try dfm f Nfm Parser parse nfm catch Parse Error e this would be the place to log the error dfm Dfm dfm false else dfm Dfm dfm false return dfm  parseModel IModel toNfm fNfmParser ParseError
see org eclipse ant internal ui dtd I Element is Any public boolean is Any return f Any  IElement isAny isAny fAny
see org eclipse ant internal ui dtd I Element is Empty public boolean is Empty return f Empty  IElement isEmpty isEmpty fEmpty
Sets the any param any The any to set public void set Any boolean any f Any any  setAny fAny
Sets the empty param empty The empty to set public void set Empty boolean empty f Empty empty  setEmpty fEmpty

protected static I Model f Empty Contents new I Model 0 public Model int kind f Kind kind  IModel fEmptyContents IModel fKind
public Model f Kind UNKNOWN  fKind
public void set Kind int kind f Kind kind  setKind fKind
public void set Min Occurs int min f Min min  setMinOccurs fMin
public void set Max Occurs int max f Max max  setMaxOccurs fMax
public void set Contents I Model contents f Contents contents  setContents IModel fContents
public void add Model I Model model if f Contents null throw new Illegal State Exception AntDTD Schema Messages get String Model model may not be changed NON NLS 1 if f Contents List null f Contents List new Linked List f Contents List add model  addModel IModel fContents IllegalStateException AntDTDSchemaMessages getString model_may_not_be_changed fContentsList fContentsList LinkedList fContentsList
public void set Leaf I Atom leaf f Leaf leaf  setLeaf IAtom fLeaf
private Nfm qualify Nfm Nfm nfm if nfm null return null if f Min 1 f Max 1 return nfm if f Min 0 f Max 1 return Nfm get Question nfm if f Min 0 f Max UNBOUNDED return Nfm get Star nfm if f Min 1 f Max UNBOUNDED return Nfm get Plus nfm the following cases cannot be reached by DTD models if f Max 0 return Nfm get Nfm null if f Max UNBOUNDED return Nfm get Unbounded nfm f Min return Nfm get Min Max nfm f Min f Max  qualifyNfm fMin fMax fMin fMax getQuestion fMin fMax getStar fMin fMax getPlus fMax getNfm fMax getUnbounded fMin getMinMax fMin fMax
public Model shallow Copy Model copy new Model get Kind copy f Mixed f Mixed copy f Leaf f Leaf if f Contents null copy f Contents List new Linked List for int i 0 i f Contents length i copy f Contents List add f Contents i else if f Contents List null copy f Contents List new Linked List Iterator it f Contents List iterator while it has Next copy f Contents List add it next return copy  shallowCopy getKind fMixed fMixed fLeaf fLeaf fContents fContentsList LinkedList fContents fContentsList fContents fContentsList fContentsList LinkedList fContentsList hasNext fContentsList
see org eclipse ant internal ui dtd I Model get Kind public int get Kind return 0  IModel getKind getKind
see org eclipse ant internal ui dtd I Model get Min Occurs public int get Min Occurs return f Min  IModel getMinOccurs getMinOccurs fMin
see org eclipse ant internal ui dtd I Model get Max Occurs public int get Max Occurs return f Max  IModel getMaxOccurs getMaxOccurs fMax
see org eclipse ant internal ui dtd I Model get Contents public I Model get Contents A model contents may be referred to many times it would be inefficient to convert to array each time if f Contents null if f Contents List null f Contents I Model f Contents List to Array new I Model f Contents List size f Contents List null else f Contents f Empty Contents return f Contents  IModel getContents IModel getContents fContents fContentsList fContents IModel fContentsList toArray IModel fContentsList fContentsList fContents fEmptyContents fContents
see org eclipse ant internal ui dtd I Model get Leaf public I Atom get Leaf return f Leaf  IModel getLeaf IAtom getLeaf fLeaf
see org eclipse ant internal ui dtd I Model get Operator public String get Operator return f Ops f Kind  IModel getOperator getOperator fOps fKind
public String string Rep String Buffer buf new String Buffer string Rep buf return buf to String  stringRep StringBuffer StringBuffer stringRep toString
private void string Rep String Buffer buf switch get Kind case I Model CHOICE case I Model SEQUENCE buf append Iterator it f Contents List iterator while it has Next Model model Model it next model string Rep buf if it has Next buf append get Operator buf append buf append get Qualifier break case I Model LEAF I Atom atom get Leaf buf append atom get Name break default buf append AntDTD Schema Messages get String Model UNKNOWN  2 NON NLS 1 break  stringRep StringBuffer getKind IModel IModel fContentsList hasNext stringRep hasNext getOperator getQualifier IModel IAtom getLeaf getName AntDTDSchemaMessages getString _2
see org eclipse ant internal ui dtd I Model get Qualifier public String get Qualifier return f Min 1 f Max UNBOUNDED f Max UNBOUNDED NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4  IModel getQualifier getQualifier fMin fMax fMax
see org eclipse ant internal ui dtd I Model to Nfm public Nfm to Nfm Nfm nfm null switch f Kind case CHOICE case SEQUENCE I Model contents get Contents if contents null contents length 0 nfm null else nfm contents 0 to Nfm for int i 1 i contents length i Nfm tmp contents i to Nfm if f Kind SEQUENCE nfm Nfm get Comma nfm tmp else nfm Nfm get Or nfm tmp break case LEAF nfm Nfm get Nfm f Leaf break return qualify Nfm nfm  IModel toNfm toNfm fKind IModel getContents toNfm toNfm fKind getComma getOr getNfm fLeaf qualifyNfm

private Nfm Node stop public Nfm Node get Start return start  NfmNode NfmNode getStart
public Nfm Node get Stop return stop  NfmNode getStop
Construct an nfm such that pre start stop s pre In all pictures boxes are Nfm Nodes private static Nfm nfm I Atom s Nfm nfm free nfm stop Nfm Node nfm Node nfm start Nfm Node nfm Node s nfm stop return nfm  NfmNodes IAtom NfmNode nfmNode NfmNode nfmNode
Construct an nfm that wraps an existing nfm x such that pre start stop x start x stop pre private static Nfm nfm Nfm x Nfm nfm free nfm start Nfm Node nfm Node x start nfm stop Nfm Node nfm Node x stop next1 nfm stop return nfm  NfmNode nfmNode NfmNode nfmNode
private static Nfm nfm Nfm nfm free nfm start Nfm Node nfm Node nfm stop Nfm Node nfm Node return nfm  NfmNode nfmNode NfmNode nfmNode
public static Nfm get Nfm I Atom s return nfm s  getNfm IAtom
Star an existing nfm x pre start stop x start x stop pre Frees x public static Nfm get Star Nfm x Make the back link x stop next2 x start Nfm tmp nfm x Make the forward link tmp start next2 tmp stop free x return tmp  getStar
Question an existing nfm x x x pre start stop x start x stop pre Frees x public static Nfm get Question Nfm x Nfm tmp nfm x Make the forward link tmp start next2 tmp stop free x return tmp  getQuestion
Plus an existing nfm x x pre start stop x start x stop pre Frees x public static Nfm get Plus Nfm x Make the back link x stop next2 x start Nfm tmp nfm x free x return tmp  getPlus
Or two existing nfms x y x y pre start stop x start x stop y start y stop pre Frees x and y public static Nfm get Or Nfm x Nfm y Nfm tmp nfm tmp start next1 x start tmp start next2 y start x stop next1 tmp stop y stop next1 tmp stop free x free y return tmp  getOr
Comma two existing nfms x y x y p Re uses x so that x stop is first transformed to y start and then x stop is reset to y stop This is as efficient as possible pre x start former x stop x stop x start y start y stop pre Frees y returns x modified public static Nfm get Comma Nfm x Nfm y x stop next1 y start next1 x stop next2 y start next2 x stop symbol y start symbol x stop y stop free y return x  getComma
min an existing nfm x x 0 x 1 x min 1 x min Frees x public static Nfm get Unbounded Nfm x int min if min 0 return get Star x if min 1 return get Plus x Nfm last1 nfm x last2 nfm x for int i 2 i min i last1 get Comma last1 last2 free last2 last2 nfm x free x return get Comma last1 get Star last2  getUnbounded getStar getPlus getComma getComma getStar
min max an existing nfm x x 0 x 1 x min 1 x min x max 1 Frees or returns x public static Nfm get Min Max Nfm x int min int max if max Integer MAX VALUE return get Unbounded x min if max 0 free x return nfm I Atom null if max 1 if min 0 return get Question x return x Nfm last null int i 0 for i min i if last null last nfm x else Nfm tmp nfm x last get Comma last tmp free tmp for i max i if last null last get Question x else Nfm tmp get Question x last get Comma last tmp free tmp this is inefficient since the first failure in a sequence of x x x can skip to the end rather than keep trying to match x free x return last  getMinMax MAX_VALUE getUnbounded IAtom getQuestion getComma getQuestion getQuestion getComma
see org eclipse ant internal ui dtd util Factory Object next public Factory Object next return f Next  FactoryObject FactoryObject fNext
see org eclipse ant internal ui dtd util Factory Object next org eclipse ant internal ui dtd util Factory Object public void next Factory Object obj f Next Nfm obj  FactoryObject FactoryObject FactoryObject fNext
private static Factory f Factory new Factory private static Nfm free Nfm nfm Nfm f Factory get Free if nfm null return new Nfm return nfm  fFactory fFactory getFree
return nfm public static void free Nfm nfm nfm start nfm stop null f Factory set Free nfm  fFactory setFree
f Factory set Free nfm private Nfm  fFactory setFree

public int mark private Nfm Node  NfmNode
public static Nfm Node nfm Node I Atom symbol Nfm Node next Nfm Node nfm get Free nfm symbol symbol nfm next1 next return nfm  NfmNode nfmNode IAtom NfmNode NfmNode getFree
public static Nfm Node nfm Node Nfm Node next Nfm Node nfm get Free nfm next1 next return nfm  NfmNode nfmNode NfmNode NfmNode getFree
public static Nfm Node nfm Node return get Free  NfmNode nfmNode getFree
Free all Nfm Nodes in use public static void free All while f Used null Factory Object nfm f Used f Used nfm next set Free Nfm Node nfm  NfmNodes freeAll fUsed FactoryObject fUsed fUsed setFree NfmNode
see org eclipse ant internal ui dtd util Factory Object next public Factory Object next return next  FactoryObject FactoryObject
see org eclipse ant internal ui dtd util Factory Object next org eclipse ant internal ui dtd util Factory Object public void next Factory Object obj next Nfm Node obj  FactoryObject FactoryObject FactoryObject NfmNode
private static Factory Object f Used null private static Nfm Node get Free Nfm Node nfm Nfm Node f Factory get Free if nfm null nfm new Nfm Node nfm next f Used f Used nfm return nfm  FactoryObject fUsed NfmNode getFree NfmNode NfmNode fFactory getFree NfmNode fUsed fUsed
private static void set Free Nfm Node nfm nfm symbol null nfm next1 nfm next2 null nfm dfm null nfm mark 0 f Factory set Free nfm  setFree NfmNode fFactory setFree

public Dfm parse Nfm nfm throws Parse Error Parse nfm into dfm Dfm dfm parse Start nfm get Start nfm get Stop Make list of dfms in graph Array List dfms new Array List collect dfm dfms Detect accept conflicts Hash Map duplicates new Hash Map detect dfms duplicates Replace duplicate dfms in graph replace dfms duplicates Allow nfm memory to be re used Nfm free nfm Nfm Node free All return dfm  ParseError parseStart getStart getStop ArrayList ArrayList HashMap HashMap NfmNode freeAll
private void report Error String name throws Parse Error throw new Parse Error Message Format format AntDTD Schema Messages get String Nfm Parser Ambiguous new String name NON NLS 1  reportError ParseError ParseError MessageFormat AntDTDSchemaMessages getString NfmParser
public static void collect Dfm dfm List dfms dfms add dfm collect1 dfm dfms 
private static void collect1 Dfm dfm List dfms Object follows dfm get Values if follows null for int i 0 i follows length i Dfm follow Dfm follows i if dfms contains follow dfms add follow collect1 follow dfms  getValues
Replace duplicate dfms found during conflict resolution private void replace Array List dfms Hash Map removed for int i 0 i dfms size i Dfm dfm Dfm dfms get i Object follows dfm get Values if follows null for int j 0 j follows length j Dfm replacement follow Dfm follows j while replacement Dfm removed get follow null follow replacement follows j follow release dfms so can be re used Iterator rit removed key Set iterator while rit has Next Dfm free Dfm rit next  ArrayList HashMap getValues keySet hasNext
Detect conflicts in each state Two transitions are a potential conflict if they accept the same string value They are an actual conflict if their follow dfms are not identical and they are an actual ambiguity if the transition atoms of the follow dfms are not pairwise identical This is derived from the rule of Bruggemann Klein which determines that a a b is not ambiguous but both a b a c and a b a b are The latter might be surprising but that s committee work for you If two transitions are not ambiguous one can be removed without affecting the language accepted and thus we have converted our epsilon free NFA into a DFA If any two transitions are ambiguous we report an error and our responsibility ends Note that no transitions can be removed until all have been checked this might disguise the ambiguity in e g a a b a a private void detect Array List dfms Hash Map duplicates throws Parse Error for Iterator iter dfms iterator iter has Next Dfm dfm Dfm iter next Object accepts dfm get Keys Object follows dfm get Values if accepts null String last null for int i 0 lasti 1 i accepts length i String accept accepts i to String accepts strings are interned allowing identity comparison if last null last accept if follows i follows lasti check Conflict new Conflict accept Dfm follows lasti Dfm follows i else last accept lasti i once more for removal for Iterator iter dfms iterator iter has Next Dfm dfm Dfm iter next record conflicts Object accepts dfm get Keys Object follows dfm get Values boolean remove false if accepts null boolean removes new boolean accepts length String last null for int i 0 lasti 1 i accepts length i String accept accepts i to String if last null last accept remove true removes i true if follows i follows lasti Dfm dfmhi Dfm follows i Dfm dfmlo Dfm follows lasti if dfmhi id dfmlo id Dfm tmp dfmhi dfmhi dfmlo dfmlo tmp Dfm dup Dfm duplicates get dfmhi if dup null dfmlo id dup id duplicates put dfmhi dfmlo else duplicates put dfmlo dup else last accept lasti i if remove Sorted Map map dfm get Map int i 0 for Iterator iterator map key Iterator iterator has Next i iterator next if removes i iterator remove Sorted Map Factory free Map map  ArrayList HashMap ParseError hasNext getKeys getValues toString checkConflict hasNext getKeys getValues toString SortedMap getMap keyIterator hasNext SortedMapFactory freeMap
Check conflict and report ambiguity param conflict Potential ambiguity private void check Conflict Conflict conflict throws Parse Error if conflict dfm1 accepting conflict dfm2 accepting report Error conflict name Object accept1 conflict dfm1 get Keys Object accept2 conflict dfm2 get Keys if accept1 null accept2 null report Error conflict name if accept1 null if accept1 length accept2 length report Error conflict name for int j 0 j accept2 length j if accept1 j accept2 j report Error conflict name  checkConflict ParseError reportError getKeys getKeys reportError reportError reportError
Recursive parse that visits every node reachable from the start symbol private Dfm parse Start Nfm Node start Nfm Node accept mark the start node Dfm result Dfm dfm false start dfm result we can minimize alias dfms by marking all starting transfer links while start next1 null start next2 null start symbol null start start next1 start dfm result Dfm parsed parse 1 start accept result merge parsed Dfm free parsed return result  parseStart NfmNode NfmNode
private void parse Next int mark Dfm result Nfm Node start Nfm Node accept Dfm parsed parse mark 1 start accept result merge parsed Dfm free parsed  parseNext NfmNode NfmNode
Recursive parse that visits every node reachable from the start symbol private Dfm parse int mark Nfm Node start Nfm Node accept eliminate useless recursion note that accept node has no branches while start next1 null start next2 null start symbol null start start next1 if we reached the accept node return an empty dfm that accepts if start accept return Dfm dfm true for a symbol construct a dfm that accepts the symbol if start symbol null Dfm nextdfm null Nfm Node next start next1 snext next while snext dfm null snext next1 null snext next2 null snext symbol null snext snext next1 if snext dfm null for Nfm Node n next n snext n n next1 n dfm snext dfm nextdfm snext dfm else nextdfm Dfm dfm false snext dfm nextdfm for Nfm Node n next n snext n n next1 n dfm nextdfm parse Next mark nextdfm snext accept Dfm dfm Dfm dfm start symbol nextdfm return dfm otherwise follow both branches and return the combined result Dfm dfm1 null dfm2 null int save Mark if start next1 null start next1 mark mark save Mark start next1 mark start next1 mark mark dfm1 parse mark start next1 accept start next1 mark save Mark if start next2 null start next2 mark mark save Mark start next2 mark start next2 mark mark dfm2 parse mark start next2 accept start next2 mark save Mark if dfm2 null if dfm1 null dfm1 merge dfm2 else dfm1 dfm2 return dfm1  NfmNode NfmNode NfmNode NfmNode NfmNode parseNext saveMark saveMark saveMark saveMark saveMark
public Dfm dfm1 dfm2 public Conflict String name Dfm dfm1 Dfm dfm2 this name name this dfm1 dfm1 this dfm2 dfm2 
this dfm2 dfm2 public int hash Code return dfm1 hash Code dfm2 hash Code  hashCode hashCode hashCode
public boolean equals Object o if o this return true if o instanceof Conflict return false Conflict other Conflict o return dfm1 other dfm1 dfm2 other dfm2 dfm1 other dfm2 dfm2 other dfm1 

private Exception f Error Exception see org eclipse ant internal ui dtd I Schema get Element java lang String public I Element get Element String qname return I Element f Element Map get qname  fErrorException ISchema getElement IElement getElement IElement fElementMap
see org eclipse ant internal ui dtd I Schema get Elements public I Element get Elements return I Element f Element Map entry Set to Array new I Element f Element Map entry Set size  ISchema getElements IElement getElements IElement fElementMap entrySet toArray IElement fElementMap entrySet
Add a visible element to the schema param element Element to add public void add Element I Element element f Element Map put element get Name element  addElement IElement fElementMap getName
Sets the exception thrown by then parser when the schema was built Note that the exception does not necessarily mean the schema is incomplete param e the Exception public void set Error Exception Exception e f Error Exception e  setErrorException fErrorException
see org eclipse ant internal ui dtd I Schema get Error Exception public Exception get Error Exception return f Error Exception  ISchema getErrorException getErrorException fErrorException

Constructor public Schema Factory f Schema new Schema  SchemaFactory fSchema
return I Schema produced from the Decl Handler The schema is always correct though it may be incomplete if the parse was interrupted due to validation or well formed errors public I Schema get Schema f Schema set Error Exception f Error Exception return f Schema  ISchema DeclHandler ISchema getSchema fSchema setErrorException fErrorException fSchema
see org xml sax ext Decl Handler attribute Decl java lang String java lang String java lang String java lang String java lang String public void attribute Decl String e Name String a Name String type String value Default String value Element element get Element e Name Attribute attr Attribute element get Attributes get a Name if attr null attr new Attribute a Name element element add Attribute attr String enumeration null if f Types contains type attr set Type type else if type starts With NOTATION NON NLS 1 enumeration parse Values type substring NOTATION length 1 NON NLS 1 else type strip Surrounding Parentheses type enumeration parse Values type attr set Enum enumeration attr set Required value Default null value Default equals IMPLIED NON NLS 1 attr set Fixed value Default null value Default equals FIXED NON NLS 1 attr set Default value  DeclHandler attributeDecl attributeDecl eName aName valueDefault getElement eName getAttributes aName aName addAttribute fTypes setType startsWith parseValues stripSurroundingParentheses parseValues setEnum setRequired valueDefault valueDefault setFixed valueDefault valueDefault setDefault
Strips the surrounding parentheses from code a String code P i e true false true false private String strip Surrounding Parentheses String a String if a String starts With NON NLS 1 a String a String substring 1 if a String ends With NON NLS 1 a String a String substring 0 a String length 1 return a String  aString stripSurroundingParentheses aString aString startsWith aString aString aString endsWith aString aString aString aString
param e Name Element name return Element from schema or new element Either way the element is in the schema upon return private Element get Element String e Name Element element Element f Schema get Element e Name if element null element new Element e Name f Schema add Element element return element  eName getElement eName fSchema getElement eName eName fSchema addElement
private String parse Values String type char separator int start 0 pos len type length Linked List values new Linked List while start len pos type index Of separator start if pos 0 pos len String term type substring start pos start pos 1 values add term return String values to Array new String values size  parseValues LinkedList LinkedList indexOf toArray
see org xml sax ext Decl Handler element Decl java lang String java lang String public void element Decl String name String model throws SAX Exception Element element get Element name if element is Undefined if the element has already been defined this is an error throw new SAX Exception Message Format format AntDTD Schema Messages get String Schema Factory Doubly defined new String name NON NLS 1 f Element element if model equals ANY NON NLS 1 element set Any true else if model equals EMPTY NON NLS 1 element set Empty true else if model equals PCDATA NON NLS 1 element set Text true else element set Content Model parse Model model  DeclHandler elementDecl elementDecl SAXException getElement isUndefined SAXException MessageFormat AntDTDSchemaMessages getString SchemaFactory Doubly_defined fElement setAny setEmpty setText setContentModel parseModel
Convert model string to I Model The code f Element code variable is an implicit argument to this method and it sets code f Buf code code f Pos code and code f Len code for use by other parser methods param model String from DTD with parameter entities replaced return I Model throws SAX Exception if syntax error detected in model This is a validation error Since the DTD is usually not read unless the parser is validating we may not ever be handed a bad content model but we need to check them just the same private I Model parse Model String model throws SAX Exception f Buf model to Char Array f Len f Buf length if f Buf 0 throw new SAX Exception Message Format format AntDTD Schema Messages get String Schema Factory Start with left parenthesis new String f Element get Name NON NLS 1 boolean ortext model starts With PCDATA NON NLS 1 if ortext f Pos 8 PCDATA length else f Pos 0 I Model emodel scan Expr return emodel  IModel fElement fBuf fPos fLen IModel SAXException IModel parseModel SAXException fBuf toCharArray fLen fBuf fBuf SAXException MessageFormat AntDTDSchemaMessages getString SchemaFactory Start_with_left_parenthesis fElement getName startsWith fPos fPos IModel scanExpr
Scan a parenthesized expression starting from the left parenthesis or leftmost operator return I Model private I Model scan Expr throws SAX Exception skip opening or f Pos return scan Expr scan Element  IModel IModel scanExpr SAXException fPos scanExpr scanElement
Scan a parenthesized expression with the first term in hand param term The first operand in the expression pre scanned return I Model throws SAX Exception if errors are detected in the model private I Model scan Expr I Model term throws SAX Exception check Len if f Buf f Pos char op f Buf f Pos if op op throw new SAX Exception Message Format format AntDTD Schema Messages get String Schema Factory Expecting operator or right parenthesis NON NLS 1 new String f Element get Name String value Of f Buf Model model new Model op I Model CHOICE I Model SEQUENCE model add Model term term model while f Buf f Pos op f Pos I Model next scan Element model add Model next if f Buf f Pos throw new SAX Exception Message Format format AntDTD Schema Messages get String Schema Factory Expecting operator or right parenthesis NON NLS 1 new String f Element get Name String value Of f Buf f Pos return term  IModel SAXException IModel scanExpr IModel SAXException checkLen fBuf fPos fBuf fPos SAXException MessageFormat AntDTDSchemaMessages getString SchemaFactory Expecting_operator_or_right_parenthesis fElement getName valueOf fBuf IModel IModel addModel fBuf fPos fPos IModel scanElement addModel fBuf fPos SAXException MessageFormat AntDTDSchemaMessages getString SchemaFactory Expecting_operator_or_right_parenthesis fElement getName valueOf fBuf fPos
Scan an element name or a parenthesized sub expression return I Model throws SAX Exception private I Model scan Element throws SAX Exception check Len if f Buf f Pos return scan Expr String Buffer sb new String Buffer while f Buf f Pos f Buf f Pos f Buf f Pos f Buf f Pos f Buf f Pos f Buf f Pos sb append f Buf f Pos check Len String name sb to String Element element get Element name Model model new Model I Model LEAF model set Leaf element return model  IModel SAXException IModel scanElement SAXException checkLen fBuf fPos scanExpr StringBuffer StringBuffer fBuf fPos fBuf fPos fBuf fPos fBuf fPos fBuf fPos fBuf fPos fBuf fPos checkLen toString getElement IModel setLeaf
private void check Len throws SAX Exception if f Pos f Len throw new SAX Exception Message Format format AntDTD Schema Messages get String Schema Factory Unexpected end NON NLS 1 new String f Element get Name String value Of f Buf  checkLen SAXException fPos fLen SAXException MessageFormat AntDTDSchemaMessages getString SchemaFactory Unexpected_end fElement getName valueOf fBuf
see org xml sax ext Decl Handler external Entity Decl java lang String java lang String java lang String public void external Entity Decl String name String public Id String system Id  DeclHandler externalEntityDecl externalEntityDecl publicId systemId
see org xml sax ext Decl Handler internal Entity Decl java lang String java lang String public void internal Entity Decl String name String value  DeclHandler internalEntityDecl internalEntityDecl
public void set Error Exception Exception e f Error Exception e  setErrorException fErrorException

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private AntDTD Util Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME AntDTDUtilMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Return the first object on the free list or null if none public Factory Object get Free Head head get Head Factory Object obj head next if obj null head next obj next obj next null return obj  FactoryObject getFree getHead FactoryObject
Add an object to the free list public void set Free Factory Object obj Head head get Head obj next head next head next obj  setFree FactoryObject getHead
private Head get Head Head head Head free get if head null head is needed because you can t change the referent of a Soft Reference Without head we would need to create a new Soft Reference each time we remove a map from the list With head getting a free object only causes memory allocation when the list has been previously collected head new Head free new Soft Reference head return head  getHead SoftReference SoftReference SoftReference

public interface Factory Object Factory Object next  FactoryObject FactoryObject
Factory Object next void next Factory Object obj  FactoryObject FactoryObject

public interface I Key Holder Object get Keys  IKeyHolder getKeys
Object get Keys void set Keys Object keys  getKeys setKeys

public interface I Value Holder Object get Values  IValueHolder getValues
Object get Values void set Values Object values  getValues setValues

see org eclipse ant internal ui dtd util I Key Holder get Keys public Object get Keys return keys  IKeyHolder getKeys getKeys
see org eclipse ant internal ui dtd util I Key Holder set Keys java lang Object public void set Keys Object keys this keys keys  IKeyHolder setKeys setKeys
see org eclipse ant internal ui dtd util I Value Holder get Values public Object get Values return values  IValueHolder getValues getValues
see org eclipse ant internal ui dtd util I Value Holder set Values java lang Object public void set Values Object values this values values  IValueHolder setValues setValues

private Sorted Map f Next public Sorted Map I Map Holder holder Comparator comp f Holder holder f Set new Sorted Set holder comp  SortedMap fNext SortedMap IMapHolder fHolder fSet SortedSet
public Sorted Map Comparator comp f Set new Sorted Set comp  SortedMap fSet SortedSet
public Sorted Map I Map Holder holder f Holder holder f Set new Sorted Set holder  SortedMap IMapHolder fHolder fSet SortedSet
public Sorted Map f Set new Sorted Set  SortedMap fSet SortedSet
public void set Map Holder I Map Holder holder f Holder holder f Set set Key Holder holder  setMapHolder IMapHolder fHolder fSet setKeyHolder
public void set Comparator Comparator comp f Set set Comparator comp  setComparator fSet setComparator
public boolean contains Key Object key return f Set contains key  containsKey fSet
public boolean contains Key Identity Object key return f Set contains Identity key  containsKeyIdentity fSet containsIdentity
public Object put Object key Object val Object values f Holder get Values int index f Set index Of key Object result index 0 values null values index null int i f Set internal Add key false if i 0 internal Put i val return result  fHolder getValues fSet indexOf fSet internalAdd internalPut
protected void internal Put int i Object val Object values f Holder get Values if values null values new Object 1 values 0 val return Object tmp new Object values length 1 System arraycopy values 0 tmp 0 i tmp i val System arraycopy values i tmp i 1 values length i f Holder set Values tmp  internalPut fHolder getValues fHolder setValues
public int put Always Object key Object val int i f Set internal Add key true internal Put i val return i  putAlways fSet internalAdd internalPut
public void append Object key Object val Object values f Holder get Values int len values null values length 0 f Set internal Add len key internal Put len val  fHolder getValues fSet internalAdd internalPut
public Object get Object key Object values f Holder get Values if values null return null int i f Set index Of key if i 0 return values i return null  fHolder getValues fSet indexOf
public Object get Identity Object key Object values f Holder get Values if values null return null int i f Set index Of Identity key if i 0 return values i return null  getIdentity fHolder getValues fSet indexOfIdentity
public Object keys return f Set members  fSet
public Object values Object values f Holder get Values if values null return new Object 0 return values  fHolder getValues
public Iterator key Iterator return new Array Iterator  keyIterator ArrayIterator
public Iterator value Iterator return new Array Iterator  valueIterator ArrayIterator
private int f Index public Array Iterator f Index 1  fIndex ArrayIterator fIndex
see java util Iterator has Next public boolean has Next Object array Sorted Map this f Holder get Keys if array null return false return f Index 1 array length  hasNext hasNext SortedMap fHolder getKeys fIndex
see java util Iterator next public Object next Object array Sorted Map this f Holder get Keys if array null throw new Illegal State Exception AntDTD Util Messages get String Sorted Map next  called for empty array 1 NON NLS 1 return array f Index  SortedMap fHolder getKeys IllegalStateException AntDTDUtilMessages getString SortedMap _called_for_empty_array_1 fIndex
see java util Iterator remove public void remove Sorted Map this remove f Index f Index  SortedMap fIndex fIndex
public void remove int i Object values f Holder get Values if values null throw new Illegal Argument Exception Message Format format AntDTD Util Messages get String Sorted Map remove 0  in empty map 2 new String Integer to String i NON NLS 1 f Set remove i Object tmp new Object values length 1 System arraycopy values 0 tmp 0 i System arraycopy values i 1 tmp i values length i 1 f Holder set Values tmp  fHolder getValues IllegalArgumentException MessageFormat AntDTDUtilMessages getString SortedMap _in_empty_map_2 toString fSet fHolder setValues
public Object remove Object obj Object values f Holder get Values if values null return null int i f Set index Of obj if i 0 Object tmp values i f Set remove i remove i return tmp return null  fHolder getValues fSet indexOf fSet
public Object remove Identity Object obj Object values f Holder get Values if values null return null int i f Set index Of Identity obj if i 0 Object tmp values i f Set remove i remove i return tmp return null  removeIdentity fHolder getValues fSet indexOfIdentity fSet
public int size return f Set size  fSet
public int key Index Object key return f Set index Of key  keyIndex fSet indexOf
public void merge Sorted Map other Object values f Holder get Values Object keys f Holder get Keys Object othervalues other f Holder get Values Object otherkeys other f Holder get Keys if otherkeys null return if keys null f Holder set Keys otherkeys f Holder set Values othervalues return int ithis 0 iother 0 i 0 int mthis keys length mother otherkeys length Object ktmp new Object mthis mother Object vtmp new Object mthis mother while ithis mthis iother mother int comp f Set f Comp compare keys ithis otherkeys iother if comp 0 vtmp i values ithis ktmp i keys ithis else vtmp i othervalues iother ktmp i otherkeys iother while ithis mthis vtmp i values ithis ktmp i keys ithis while iother mother vtmp i othervalues iother ktmp i otherkeys iother f Holder set Keys ktmp f Holder set Values vtmp  SortedMap fHolder getValues fHolder getKeys fHolder getValues fHolder getKeys fHolder setKeys fHolder setValues fSet fComp fHolder setKeys fHolder setValues
public Factory Object next return f Next  FactoryObject fNext
public void next Factory Object next f Next Sorted Map next  FactoryObject fNext SortedMap

private static class String Comparator implements Comparator see java util Comparator compare Object Object public int compare Object o1 Object o2 return String o1 compare To o2  StringComparator compareTo
private static class Indirect String Comparator implements Comparator see java util Comparator compare Object Object public int compare Object o1 Object o2 return o1 to String compare To o2 to String  IndirectStringComparator toString compareTo toString
public static Sorted Map get Map I Map Holder holder Comparator comp Sorted Map map Sorted Map f Factory get Free if map null map new Sorted Map map set Map Holder holder map set Comparator comp return map  SortedMap getMap IMapHolder SortedMap SortedMap fFactory getFree SortedMap setMapHolder setComparator
public static Sorted Map get String Map I Map Holder holder return get Map holder f String Comp  SortedMap getStringMap IMapHolder getMap fStringComp
public static Sorted Map get Indirect String Map I Map Holder holder return get Map holder f Indirect String Comp  SortedMap getIndirectStringMap IMapHolder getMap fIndirectStringComp
public static Sorted Map get Case Insensitive String Map I Map Holder holder return get Map holder String CASE INSENSITIVE ORDER  SortedMap getCaseInsensitiveStringMap IMapHolder getMap CASE_INSENSITIVE_ORDER
public static void free Map Sorted Map map map set Comparator null map set Map Holder null f Factory set Free map  freeMap SortedMap setComparator setMapHolder fFactory setFree

protected Sorted Set f Next public Sorted Set I Key Holder holder Comparator comp f Comp comp f Key Holder holder  SortedSet fNext SortedSet IKeyHolder fComp fKeyHolder
Constructor A keyholder must be supplied by code set Key Holder code prior ot i any i operations public Sorted Set Comparator comp f Comp comp  setKeyHolder SortedSet fComp
Constructor no comparator Only identity operations may be performed in this set public Sorted Set I Key Holder holder f Key Holder holder  SortedSet IKeyHolder fKeyHolder
Constructor no comparator Only identity operations may be performed in this set A keyholder must be supplied by code set Key Holder code prior ot i any i operations public Sorted Set  setKeyHolder SortedSet
public Sorted Set public void set Key Holder I Key Holder holder f Key Holder holder  SortedSet setKeyHolder IKeyHolder fKeyHolder
f Key Holder holder public void set Comparator Comparator comp f Comp comp  fKeyHolder setComparator fComp
Add to set no duplicates allowed param obj Object to add return true if object was added false if object was already in the set public boolean add Object obj return internal Add obj false 0  internalAdd
protected int internal Add Object obj boolean always Object array f Key Holder get Keys if array null array new Object 1 f Key Holder set Keys array array 0 obj return 0 int i 0 int comp 1 for i array length i if comp f Comp compare obj array i 0 break if comp 0 always return 1 internal Add i obj return i  internalAdd fKeyHolder getKeys fKeyHolder setKeys fComp internalAdd
protected void internal Add int i Object obj Object array f Key Holder get Keys if array null array new Object 1 array 0 obj f Key Holder set Keys array else Object tmp new Object array length 1 System arraycopy array 0 tmp 0 i tmp i obj System arraycopy array i tmp i 1 array length i f Key Holder set Keys tmp  internalAdd fKeyHolder getKeys fKeyHolder setKeys fKeyHolder setKeys
Add allowing duplicates param obj Object to add return index where object was added in sorted order public int add Always Object obj return internal Add obj true  addAlways internalAdd
Append a variant of add allowing duplicates that always puts the new member at the end of the set Set can be used with identity operations only public void append Object obj Object array f Key Holder get Keys int len array null array length 0 internal Add len obj  fKeyHolder getKeys internalAdd
internal Add len obj public boolean contains Object obj return index Of obj 0  internalAdd indexOf
public int index Of Object obj Object array f Key Holder get Keys if array null return 1 for int i 0 i array length i int comp f Comp compare obj array i if comp 0 return i if comp 0 return 1 return 1  indexOf fKeyHolder getKeys fComp
return 1 public boolean contains Identity Object obj return index Of obj 0  containsIdentity indexOf
public int index Of Identity Object obj Object array f Key Holder get Keys if array null return 1 for int i 0 i array length i if obj array i return i return 1  indexOfIdentity fKeyHolder getKeys
public boolean equals Object o if this o return true if o instanceof Sorted Set return false Sorted Set other Sorted Set o Object array f Key Holder get Keys Object otherarray other f Key Holder get Keys if array null otherarray null return false if array null return true if array length otherarray length return false for int i 0 i array length i if array i otherarray i return false return true  SortedSet SortedSet SortedSet fKeyHolder getKeys fKeyHolder getKeys
public boolean equals Identify Object o if this o return true if o instanceof Sorted Set return false Sorted Set other Sorted Set o Object array f Key Holder get Keys Object otherarray other f Key Holder get Keys if array null otherarray null return false if array null return true if array length otherarray length return false for int i 0 i array length i if f Comp compare array i otherarray i 0 return false return true  equalsIdentify SortedSet SortedSet SortedSet fKeyHolder getKeys fKeyHolder getKeys fComp
public void merge Sorted Set other Object array f Key Holder get Keys Object otherarray other f Key Holder get Keys if otherarray null return if array null array otherarray return int ithis 0 iother 0 i 0 int mthis array length mother otherarray length Object tmp new Object mthis mother while ithis mthis iother mother int comp f Comp compare array ithis otherarray iother if comp 0 tmp i array ithis else tmp i otherarray iother while ithis mthis tmp i array ithis while iother mother tmp i otherarray iother  SortedSet fKeyHolder getKeys fKeyHolder getKeys fComp
public Object members Object array f Key Holder get Keys if array null return new Object 0 return array  fKeyHolder getKeys
return array public int size Object array f Key Holder get Keys return array null 0 array length  fKeyHolder getKeys
public void remove int i Object array f Key Holder get Keys Object tmp new Object array length 1 System arraycopy array 0 tmp 0 i System arraycopy array i 1 tmp i array length i 1 f Key Holder set Keys tmp  fKeyHolder getKeys fKeyHolder setKeys
public boolean remove Object obj int i index Of obj if i 0 remove i return true return false  indexOf
public boolean remove Identity Object obj int i index Of Identity obj if i 0 remove i return true return false  removeIdentity indexOfIdentity
return false public Sorted Set get Next Set return f Next  SortedSet getNextSet fNext
return f Next public void set Next Set Sorted Set next f Next next  fNext setNextSet SortedSet fNext

private Ant Editor Proc Instr Scanner get Default Scanner if instruction Scanner null instruction Scanner new Ant Editor Proc Instr Scanner return instruction Scanner  AntEditorProcInstrScanner getDefaultScanner instructionScanner instructionScanner AntEditorProcInstrScanner instructionScanner
private Ant Editor Tag Scanner get Tag Scanner if tag Scanner null tag Scanner new Ant Editor Tag Scanner return tag Scanner  AntEditorTagScanner getTagScanner tagScanner tagScanner AntEditorTagScanner tagScanner
public I Presentation Reconciler get Presentation Reconciler I Source Viewer source Viewer Presentation Reconciler reconciler new Presentation Reconciler reconciler set Document Partitioning get Configured Document Partitioning source Viewer Multiline Damager Repairer dr new Multiline Damager Repairer get Default Scanner null reconciler set Damager dr I Document DEFAULT CONTENT TYPE reconciler set Repairer dr I Document DEFAULT CONTENT TYPE dr new Multiline Damager Repairer get Tag Scanner null reconciler set Damager dr Ant Editor Partition Scanner XML TAG reconciler set Repairer dr Ant Editor Partition Scanner XML TAG I Preference Store store AntUI Plugin get Default get Preference Store int style SWT NORMAL if store get Boolean I Ant Editor Color Constants XML COMMENT COLOR Ant Editor Preference Constants EDITOR BOLD SUFFIX style SWT BOLD if store get Boolean I Ant Editor Color Constants XML COMMENT COLOR Ant Editor Preference Constants EDITOR ITALIC SUFFIX style SWT ITALIC xml Comment Attribute new Text Attribute AntUI Plugin get Preference Color I Ant Editor Color Constants XML COMMENT COLOR null style damage Repairer new Multiline Damager Repairer null xml Comment Attribute reconciler set Damager damage Repairer Ant Editor Partition Scanner XML COMMENT reconciler set Repairer damage Repairer Ant Editor Partition Scanner XML COMMENT return reconciler  IPresentationReconciler getPresentationReconciler ISourceViewer sourceViewer PresentationReconciler PresentationReconciler setDocumentPartitioning getConfiguredDocumentPartitioning sourceViewer MultilineDamagerRepairer MultilineDamagerRepairer getDefaultScanner setDamager IDocument DEFAULT_CONTENT_TYPE setRepairer IDocument DEFAULT_CONTENT_TYPE MultilineDamagerRepairer getTagScanner setDamager AntEditorPartitionScanner XML_TAG setRepairer AntEditorPartitionScanner XML_TAG IPreferenceStore AntUIPlugin getDefault getPreferenceStore getBoolean IAntEditorColorConstants XML_COMMENT_COLOR AntEditorPreferenceConstants EDITOR_BOLD_SUFFIX getBoolean IAntEditorColorConstants XML_COMMENT_COLOR AntEditorPreferenceConstants EDITOR_ITALIC_SUFFIX xmlCommentAttribute TextAttribute AntUIPlugin getPreferenceColor IAntEditorColorConstants XML_COMMENT_COLOR damageRepairer MultilineDamagerRepairer xmlCommentAttribute setDamager damageRepairer AntEditorPartitionScanner XML_COMMENT setRepairer damageRepairer AntEditorPartitionScanner XML_COMMENT
Preference colors have changed Update the default tokens of the scanners public void adapt To Preference Change Property Change Event event if tag Scanner null return property change before the editor is fully created tag Scanner adapt To Preference Change event instruction Scanner adapt To Preference Change event String property event get Property if property starts With I Ant Editor Color Constants XML COMMENT COLOR if property ends With Ant Editor Preference Constants EDITOR BOLD SUFFIX adapt To Style Change event SWT BOLD else if property ends With Ant Editor Preference Constants EDITOR ITALIC SUFFIX adapt To Style Change event SWT ITALIC else adapt To Color Change event damage Repairer set Default Text Attribute xml Comment Attribute  adaptToPreferenceChange PropertyChangeEvent tagScanner tagScanner adaptToPreferenceChange instructionScanner adaptToPreferenceChange getProperty startsWith IAntEditorColorConstants XML_COMMENT_COLOR endsWith AntEditorPreferenceConstants EDITOR_BOLD_SUFFIX adaptToStyleChange endsWith AntEditorPreferenceConstants EDITOR_ITALIC_SUFFIX adaptToStyleChange adaptToColorChange damageRepairer setDefaultTextAttribute xmlCommentAttribute
private void adapt To Style Change Property Change Event event int style Attribute boolean event Value false Object value event get New Value if value instanceof Boolean event Value Boolean value boolean Value else if I Preference Store TRUE equals value event Value true boolean active Value xml Comment Attribute get Style style Attribute style Attribute if active Value event Value xml Comment Attribute new Text Attribute xml Comment Attribute get Foreground xml Comment Attribute get Background event Value xml Comment Attribute get Style style Attribute xml Comment Attribute get Style style Attribute  adaptToStyleChange PropertyChangeEvent styleAttribute eventValue getNewValue eventValue booleanValue IPreferenceStore eventValue activeValue xmlCommentAttribute getStyle styleAttribute styleAttribute activeValue eventValue xmlCommentAttribute TextAttribute xmlCommentAttribute getForeground xmlCommentAttribute getBackground eventValue xmlCommentAttribute getStyle styleAttribute xmlCommentAttribute getStyle styleAttribute
Update the text attributes associated with the tokens of this scanner as a color preference has been changed private void adapt To Color Change Property Change Event event RGB rgb null Object value event get New Value if value instanceof RGB rgb RGB value else if value instanceof String rgb String Converter asRGB String value if rgb null xml Comment Attribute new Text Attribute Color Manager get Default get Color rgb xml Comment Attribute get Background xml Comment Attribute get Style  adaptToColorChange PropertyChangeEvent getNewValue StringConverter xmlCommentAttribute TextAttribute ColorManager getDefault getColor xmlCommentAttribute getBackground xmlCommentAttribute getStyle
public String get Configured Content Types I Source Viewer source Viewer return new String I Document DEFAULT CONTENT TYPE Ant Editor Partition Scanner XML COMMENT Ant Editor Partition Scanner XML TAG Ant Editor Partition Scanner XML CDATA  getConfiguredContentTypes ISourceViewer sourceViewer IDocument DEFAULT_CONTENT_TYPE AntEditorPartitionScanner XML_COMMENT AntEditorPartitionScanner XML_TAG AntEditorPartitionScanner XML_CDATA
see org eclipse jface text source Source Viewer Configuration get Tab Width org eclipse jface text source I Source Viewer public int get Tab Width I Source Viewer source Viewer return AntUI Plugin get Default get Preference Store get Int Abstract Decorated Text Editor Preference Constants EDITOR TAB WIDTH  SourceViewerConfiguration getTabWidth ISourceViewer getTabWidth ISourceViewer sourceViewer AntUIPlugin getDefault getPreferenceStore getInt AbstractDecoratedTextEditorPreferenceConstants EDITOR_TAB_WIDTH
public boolean affects Text Presentation Property Change Event event String property event get Property return property starts With I Ant Editor Color Constants TEXT COLOR property starts With I Ant Editor Color Constants PROCESSING INSTRUCTIONS COLOR property starts With I Ant Editor Color Constants STRING COLOR property starts With I Ant Editor Color Constants TAG COLOR property starts With I Ant Editor Color Constants XML COMMENT COLOR  affectsTextPresentation PropertyChangeEvent getProperty startsWith IAntEditorColorConstants TEXT_COLOR startsWith IAntEditorColorConstants PROCESSING_INSTRUCTIONS_COLOR startsWith IAntEditorColorConstants STRING_COLOR startsWith IAntEditorColorConstants TAG_COLOR startsWith IAntEditorColorConstants XML_COMMENT_COLOR
see org eclipse jface text source Source Viewer Configuration get Configured Document Partitioning org eclipse jface text source I Source Viewer public String get Configured Document Partitioning I Source Viewer source Viewer return Ant Document Setup Participant ANT PARTITIONING  SourceViewerConfiguration getConfiguredDocumentPartitioning ISourceViewer getConfiguredDocumentPartitioning ISourceViewer sourceViewer AntDocumentSetupParticipant ANT_PARTITIONING

private int f Accumulated Change 0 public Ant Auto Indent Strategy Ant Model model f Model model  fAccumulatedChange AntAutoIndentStrategy AntModel fModel
Sets the indentation based on the Ant element node that contains the offset of the document command param d the document to work on param c the command to deal with private synchronized void auto Indent After New Line I Document d Document Command c if c offset 1 d get Length 0 f Model get Project Node false null return int position c offset d get Length c offset 1 c offset Ant Element Node node f Model get Project Node false get Node position f Accumulated Change if node null return try String Buffer correct Xml Document Formatter get Leading Whitespace node get Offset d if next Node Is End Tag c offset d correct append Xml Document Formatter create Indent String Buffer buf new String Buffer c text buf append correct f Accumulated Change buf length int line d get Line Of Offset position I Region reg d get Line Information line int line End reg get Offset reg get Length int content Start find End Of White Space d c offset line End c length Math max content Start c offset 0 c caret Offset c offset buf length c shifts Caret false c text buf to String catch Bad Location Exception e AntUI Plugin log e  autoIndentAfterNewLine IDocument DocumentCommand getLength fModel getProjectNode getLength AntElementNode fModel getProjectNode getNode fAccumulatedChange StringBuffer XmlDocumentFormatter getLeadingWhitespace getOffset nextNodeIsEndTag XmlDocumentFormatter createIndent StringBuffer StringBuffer fAccumulatedChange getLineOfOffset IRegion getLineInformation lineEnd getOffset getLength contentStart findEndOfWhiteSpace lineEnd contentStart caretOffset shiftsCaret toString BadLocationException AntUIPlugin
private boolean next Node Is End Tag int offset I Document document if offset 1 document get Length return false try I Region line Region document get Line Information Of Offset offset offset find End Of White Space document offset line Region get Offset line Region get Length String next Chars document get offset 2 trim if equals next Chars equals next Chars NON NLS 1 NON NLS 2 return true catch Bad Location Exception e return false  nextNodeIsEndTag IDocument getLength IRegion lineRegion getLineInformationOfOffset findEndOfWhiteSpace lineRegion getOffset lineRegion getLength nextChars nextChars nextChars BadLocationException
public void customize Document Command I Document d Document Command c if c length 0 c text null is Line Delimiter d c text auto Indent After New Line d c else if c text length 1 smart Paste d c  customizeDocumentCommand IDocument DocumentCommand isLineDelimiter autoIndentAfterNewLine smartPaste
private boolean is Line Delimiter I Document document String text String delimiters document get Legal Line Delimiters if delimiters null return Text Utilities equals delimiters text 1 return false  isLineDelimiter IDocument getLegalLineDelimiters TextUtilities
public synchronized void reconciled f Accumulated Change 0  fAccumulatedChange
private void smart Paste I Document document Document Command command try if command offset 1 document get Length 0 f Model get Project Node false null return String orig Change command text int position command offset document get Length command offset 1 command offset Ant Element Node node f Model get Project Node false get Node position f Accumulated Change if node null return eat any WS before the insertion to the beginning of the line int first Line 1 don t format the first line if it has other content before it I Region line document get Line Information Of Offset command offset String not Selected document get line get Offset command offset line get Offset if not Selected trim length 0 command length not Selected length command offset line get Offset first Line 0 handle the indentation computation inside a temporary document Document temp new Document command text indent the first and second line compute the relative indentation difference from the second line as the first might be partially selected and use the value to indent all other lines boolean is Indent Detected false String Buffer addition new String Buffer int insert Length 0 int lines temp get Number Of Lines for int l first Line l lines l we don t change the number of lines while adding indents I Region r temp get Line Information l int line Offset r get Offset int line Length r get Length if line Length 0 don t modify empty lines continue if is Indent Detected indent the first pasted line String Buffer current Xml Document Formatter get Leading Whitespace line Offset temp String Buffer correct Xml Document Formatter get Leading Whitespace node get Offset document correct append Xml Document Formatter create Indent insert Length subtract Indent correct current addition is Indent Detected true relatively indent all pasted lines if insert Length 0 add Indent temp l addition else if insert Length 0 cut Indent temp l insert Length modify the command if orig Change equals temp get f Accumulated Change temp get Length command text temp get catch Bad Location Exception e AntUI Plugin log e  smartPaste IDocument DocumentCommand getLength fModel getProjectNode origChange getLength AntElementNode fModel getProjectNode getNode fAccumulatedChange firstLine IRegion getLineInformationOfOffset notSelected getOffset getOffset notSelected notSelected getOffset firstLine isIndentDetected StringBuffer StringBuffer insertLength getNumberOfLines firstLine IRegion getLineInformation lineOffset getOffset lineLength getLength lineLength isIndentDetected StringBuffer XmlDocumentFormatter getLeadingWhitespace lineOffset StringBuffer XmlDocumentFormatter getLeadingWhitespace getOffset XmlDocumentFormatter createIndent insertLength subtractIndent isIndentDetected insertLength addIndent insertLength cutIndent insertLength origChange fAccumulatedChange getLength BadLocationException AntUIPlugin
Indents line code line code in code document code with code indent code Leaves leading comment signs alone param document the document param line the line param indent the indentation to insert throws Bad Location Exception on concurrent document modification private void add Indent Document document int line Char Sequence indent throws Bad Location Exception I Region region document get Line Information line int insert region get Offset insert indent document replace insert 0 indent to String  BadLocationException addIndent CharSequence BadLocationException IRegion getLineInformation getOffset toString
Cuts the visual equivalent of code to Delete code characters out of the indentation of line code line code in code document code param document the document param line the line param to Delete the number of space equivalents to delete throws Bad Location Exception on concurrent document modification private void cut Indent Document document int line int to Delete throws Bad Location Exception I Region region document get Line Information line int from region get Offset int end Offset region get Offset region get Length int to from while to Delete 0 to end Offset char ch document get Char to if Character is Whitespace ch break to Delete compute Visual Length ch if to Delete 0 to else break document replace from to from null  toDelete toDelete BadLocationException cutIndent toDelete BadLocationException IRegion getLineInformation getOffset endOffset getOffset getLength toDelete endOffset getChar isWhitespace toDelete computeVisualLength toDelete
Returns the visual length of a given character taking into account the visual tabulator length param ch the character to measure return the visual length of code ch code private int compute Visual Length char ch if ch t return get Visual Tab Length Preference return 1  computeVisualLength getVisualTabLengthPreference
Returns the visual length of a given code Char Sequence code taking into account the visual tabulator length param seq the string to measure return the visual length of code seq code private int compute Visual Length Char Sequence seq int size 0 int tablen get Visual Tab Length Preference for int i 0 i seq length i char ch seq char At i if ch t size tablen size tablen else size return size  CharSequence computeVisualLength CharSequence getVisualTabLengthPreference charAt
Computes the difference of two indentations and returns the difference in length of current and correct If the return value is positive code addition code is initialized with a substring of that length of code correct code param correct the correct indentation param current the current indentation might contain non whitespace param difference a string buffer if the return value is positive it will be cleared and set to the substring of code current code of that length return the difference in length of code correct code and code current code private int subtract Indent Char Sequence correct Char Sequence current String Buffer difference int c1 compute Visual Length correct int c2 compute Visual Length current int diff c1 c2 if diff 0 return diff difference set Length 0 int len 0 i 0 while len diff char c correct char At i difference append c len compute Visual Length c return diff  subtractIndent CharSequence CharSequence StringBuffer computeVisualLength computeVisualLength setLength charAt computeVisualLength
The preference setting for the visual tabulator display return the number of spaces displayed for a tabulator in the editor private int get Visual Tab Length Preference return AntUI Plugin get Default get Preference Store get Int Abstract Decorated Text Editor Preference Constants EDITOR TAB WIDTH  getVisualTabLengthPreference AntUIPlugin getDefault getPreferenceStore getInt AbstractDecoratedTextEditorPreferenceConstants EDITOR_TAB_WIDTH

Creates a new Ant completion proposal All fields are initialized based on the provided information param replacement String the actual string to be inserted into the document param replacement Offset the offset of the text to be replaced param replacement Length the length of the text to be replaced param cursor Position the position of the cursor following the insert relative to replacement Offset param image the image to display for this proposal param display String the string to be displayed for the proposal param additional Proposal Info the additional information associated with this proposal param type the type of this proposal public Ant Completion Proposal String replacement String int replacement Offset int replacement Length int cursor Position Image image String display String String additional Proposal Info int type f Replacement String replacement String f Replacement Offset replacement Offset f Replacement Length replacement Length f Cursor Position cursor Position f Image image f Display String display String f Additional Proposal Info additional Proposal Info f Type type  replacementString replacementOffset replacementLength cursorPosition replacementOffset displayString additionalProposalInfo AntCompletionProposal replacementString replacementOffset replacementLength cursorPosition displayString additionalProposalInfo fReplacementString replacementString fReplacementOffset replacementOffset fReplacementLength replacementLength fCursorPosition cursorPosition fImage fDisplayString displayString fAdditionalProposalInfo additionalProposalInfo fType
see org eclipse jface text contentassist I Completion Proposal Extension2 apply org eclipse jface text I Text Viewer char int int public void apply I Text Viewer viewer char trigger int state Mask int offset apply viewer get Document  ICompletionProposalExtension2 ITextViewer ITextViewer stateMask getDocument
see org eclipse jface text contentassist I Completion Proposal Extension2 selected org eclipse jface text I Text Viewer boolean public void selected I Text Viewer viewer boolean smart Toggle  ICompletionProposalExtension2 ITextViewer ITextViewer smartToggle
see org eclipse jface text contentassist I Completion Proposal Extension2 unselected org eclipse jface text I Text Viewer public void unselected I Text Viewer viewer  ICompletionProposalExtension2 ITextViewer ITextViewer
public boolean validate I Document document int offset Document Event event String entered Text NON NLS 1 try entered Text document get f Replacement Offset offset f Replacement Offset catch Bad Location Exception e int entered Length entered Text length if f Type TASK PROPOSAL entered Text starts With NON NLS 1 entered Text entered Text substring 1 else if f Type PROPERTY PROPOSAL if entered Text starts With NON NLS 1 entered Text entered Text substring 2 if entered Text starts With NON NLS 1 entered Text entered Text substring 1 else if f Type TAG CLOSING PROPOSAL if entered Text starts With NON NLS 1 entered Text entered Text substring 2 else if entered Text starts With NON NLS 1 try if document get Char f Replacement Offset 1 entered Text entered Text substring 1 catch Bad Location Exception e else if entered Text starts With NON NLS 1 entered Text entered Text substring 1 boolean valid f Display String to Lower Case starts With entered Text to Lower Case if valid f Replacement Length entered Length return valid  IDocument DocumentEvent enteredText enteredText fReplacementOffset fReplacementOffset BadLocationException enteredLength enteredText fType TASK_PROPOSAL enteredText startsWith enteredText enteredText fType PROPERTY_PROPOSAL enteredText startsWith enteredText enteredText enteredText startsWith enteredText enteredText fType TAG_CLOSING_PROPOSAL enteredText startsWith enteredText enteredText enteredText startsWith getChar fReplacementOffset enteredText enteredText BadLocationException enteredText startsWith enteredText enteredText fDisplayString toLowerCase startsWith enteredText toLowerCase fReplacementLength enteredLength
public void apply I Document document try document replace f Replacement Offset f Replacement Length f Replacement String catch Bad Location Exception x ignore  IDocument fReplacementOffset fReplacementLength fReplacementString BadLocationException
see org eclipse jface text contentassist I Completion Proposal get Selection org eclipse jface text I Document public Point get Selection I Document document return new Point f Replacement Offset f Cursor Position 0  ICompletionProposal getSelection IDocument getSelection IDocument fReplacementOffset fCursorPosition
see org eclipse jface text contentassist I Completion Proposal get Additional Proposal Info public String get Additional Proposal Info return f Additional Proposal Info  ICompletionProposal getAdditionalProposalInfo getAdditionalProposalInfo fAdditionalProposalInfo
public String get Display String if f Display String null return f Display String return f Replacement String  getDisplayString fDisplayString fDisplayString fReplacementString
see org eclipse jface text contentassist I Completion Proposal get Image public Image get Image return f Image  ICompletionProposal getImage getImage fImage
see org eclipse jface text contentassist I Completion Proposal get Context Information public I Context Information get Context Information return null  ICompletionProposal getContextInformation IContextInformation getContextInformation
see java lang Object to String public String to String return get Display String  toString toString getDisplayString
return Returns the type of the completion proposal public int get Type return f Type  getType fType

Installs this selection changed listener with the given selection provider If the selection provider is a post selection provider post selection changed events are the preferred choice otherwise normal selection changed events are requested param selection Provider public void install I Selection Provider selection Provider if selection Provider null return if selection Provider instanceof I Post Selection Provider I Post Selection Provider provider I Post Selection Provider selection Provider provider add Post Selection Changed Listener this else selection Provider add Selection Changed Listener this  selectionProvider ISelectionProvider selectionProvider selectionProvider selectionProvider IPostSelectionProvider IPostSelectionProvider IPostSelectionProvider selectionProvider addPostSelectionChangedListener selectionProvider addSelectionChangedListener
Removes this selection changed listener from the given selection provider param selection Providerstyle public void uninstall I Selection Provider selection Provider if selection Provider null return if selection Provider instanceof I Post Selection Provider I Post Selection Provider provider I Post Selection Provider selection Provider provider remove Post Selection Changed Listener this else selection Provider remove Selection Changed Listener this  selectionProviderstyle ISelectionProvider selectionProvider selectionProvider selectionProvider IPostSelectionProvider IPostSelectionProvider IPostSelectionProvider selectionProvider removePostSelectionChangedListener selectionProvider removeSelectionChangedListener
public void selection Changed Selection Changed Event event Ant Model model get Ant Model if model null external file return I Selection selection event get Selection Ant Element Node node null if selection instanceof I Text Selection I Text Selection text Selection I Text Selection selection int offset text Selection get Offset node model get Node offset false if AntUI Plugin get Default get Preference Store get Boolean I AntUI Preference Constants OUTLINE LINK WITH EDITOR synchronize Outline Page node true set Selection node false  selectionChanged SelectionChangedEvent AntModel getAntModel ISelection getSelection AntElementNode ITextSelection ITextSelection textSelection ITextSelection textSelection getOffset getNode AntUIPlugin getDefault getPreferenceStore getBoolean IAntUIPreferenceConstants OUTLINE_LINK_WITH_EDITOR synchronizeOutlinePage setSelection
private I Line Tracker f Line Tracker public void set Number Of Spaces Per Tab int ratio f Tab Ratio ratio  ILineTracker fLineTracker setNumberOfSpacesPerTab fTabRatio
public void set Line Tracker I Line Tracker line Tracker f Line Tracker line Tracker  setLineTracker ILineTracker lineTracker fLineTracker lineTracker
private int insert Tab String String Buffer buffer int offset In Line if f Tab Ratio 0 return 0 int remainder offset In Line f Tab Ratio remainder f Tab Ratio remainder for int i 0 i remainder i buffer append return remainder  insertTabString StringBuffer offsetInLine fTabRatio offsetInLine fTabRatio fTabRatio
public void customize Document Command I Document document Document Command command String text command text if text null return int index text index Of t if index 1 String Buffer buffer new String Buffer f Line Tracker set command text int lines f Line Tracker get Number Of Lines try for int i 0 i lines i int offset f Line Tracker get Line Offset i int end Offset offset f Line Tracker get Line Length i String line text substring offset end Offset int position 0 if i 0 I Region first Line document get Line Information Of Offset command offset position command offset first Line get Offset int length line length for int j 0 j length j char c line char At j if c t position insert Tab String buffer position else buffer append c position command text buffer to String catch Bad Location Exception x  customizeDocumentCommand IDocument DocumentCommand indexOf StringBuffer StringBuffer fLineTracker fLineTracker getNumberOfLines fLineTracker getLineOffset endOffset fLineTracker getLineLength endOffset IRegion firstLine getLineInformationOfOffset firstLine getOffset charAt insertTabString toString BadLocationException
private boolean f Ignore Text Converters false public Status Line Source Viewer Composite composite I Vertical Ruler vertical Ruler I Overview Ruler overview Ruler int styles super composite vertical Ruler overview Ruler is Overview Ruler Visible styles  fIgnoreTextConverters StatusLineSourceViewer IVerticalRuler verticalRuler IOverviewRuler overviewRuler verticalRuler overviewRuler isOverviewRulerVisible
public void do Operation int operation if get Text Widget null redraws return switch operation case CONTENTASSIST PROPOSALS String msg f Content Assistant show Possible Completions set Status Line Error Message msg return case UNDO f Ignore Text Converters true break case REDO f Ignore Text Converters true break super do Operation operation  doOperation getTextWidget CONTENTASSIST_PROPOSALS fContentAssistant showPossibleCompletions setStatusLineErrorMessage fIgnoreTextConverters fIgnoreTextConverters doOperation
public void set Text Converter Tab Converter tab Converter f Tab Converter tab Converter  setTextConverter TabConverter tabConverter fTabConverter tabConverter
public void update Indentation Prefixes Source Viewer Configuration configuration get Source Viewer Configuration String types configuration get Configured Content Types this for int i 0 i types length i String prefixes configuration get Indent Prefixes this types i if prefixes null prefixes length 0 set Indent Prefixes prefixes types i  updateIndentationPrefixes SourceViewerConfiguration getSourceViewerConfiguration getConfiguredContentTypes getIndentPrefixes setIndentPrefixes
protected void customize Document Command Document Command command super customize Document Command command if f Ignore Text Converters f Tab Converter null f Tab Converter customize Document Command get Document command f Ignore Text Converters false  customizeDocumentCommand DocumentCommand customizeDocumentCommand fIgnoreTextConverters fTabConverter fTabConverter customizeDocumentCommand getDocument fIgnoreTextConverters
protected I Selection Changed Listener f Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event do Selection Changed event  ISelectionChangedListener fSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent doSelectionChanged
public void document Model Changed Document Model Change Event event if event is Preference Change update Editor Image  documentModelChanged DocumentModelChangeEvent isPreferenceChange updateEditorImage
public Ant Editor super set Source Viewer Configuration new Ant Editor Source Viewer Configuration this set Document Provider new Ant Editor Document Provider XML Core get Default XML Core get Default add Document Model Listener f Document Model Listener  AntEditor setSourceViewerConfiguration AntEditorSourceViewerConfiguration setDocumentProvider AntEditorDocumentProvider XMLCore getDefault XMLCore getDefault addDocumentModelListener fDocumentModelListener
protected void create Actions super create Actions Resource Bundle bundle Resource Bundle get Bundle org eclipse ant internal ui editor Ant Editor Messages NON NLS 1 I Action action new Content Assist Action bundle Content Assist Proposal this NON NLS 1 This action definition is associated with the accelerator Ctrl Space action set Action Definition Id I Text Editor Action Definition Ids CONTENT ASSIST PROPOSALS set Action Content Assist Proposal action NON NLS 1 action new Text Operation Action bundle Content Format this I Source Viewer FORMAT NON NLS 1 action set Action Definition Id I Java Editor Action Definition Ids FORMAT set Action Content Format action NON NLS 1 TODO set help Workbench Help set Help action I Java Help Context Ids FORMAT ACTION  createActions createActions ResourceBundle ResourceBundle getBundle AntEditorMessages IAction ContentAssistAction ContentAssistProposal setActionDefinitionId ITextEditorActionDefinitionIds CONTENT_ASSIST_PROPOSALS setAction ContentAssistProposal TextOperationAction ContentFormat ISourceViewer setActionDefinitionId IJavaEditorActionDefinitionIds setAction ContentFormat WorkbenchHelp setHelp IJavaHelpContextIds FORMAT_ACTION
protected void initialize Editor super initialize Editor set Preference Store create Combined Preference Store set Compatibility Mode false set Help Context Id I AntUI Help Context Ids ANT EDITOR  initializeEditor initializeEditor setPreferenceStore createCombinedPreferenceStore setCompatibilityMode setHelpContextId IAntUIHelpContextIds ANT_EDITOR
public Object get Adapter Class key if key equals I Content Outline Page class return get Outline Page return super get Adapter key  getAdapter IContentOutlinePage getOutlinePage getAdapter
private Ant Editor Content Outline Page get Outline Page if f Outline Page null f Outline Page new Ant Editor Content Outline Page XML Core get Default this f Outline Page add Post Selection Changed Listener f Selection Changed Listener set Outline Page Input get Editor Input return f Outline Page  AntEditorContentOutlinePage getOutlinePage fOutlinePage fOutlinePage AntEditorContentOutlinePage XMLCore getDefault fOutlinePage addPostSelectionChangedListener fSelectionChangedListener setOutlinePageInput getEditorInput fOutlinePage
private void do Selection Changed Selection Changed Event selection Changed Event I Structured Selection selection I Structured Selection selection Changed Event get Selection if is Active Part AntUI Plugin get Active Page null AntUI Plugin get Active Page bring To Top this Ant Element Node selected Xml Element Ant Element Node selection get First Element if selected Xml Element null set Selection selected Xml Element is Active Part  doSelectionChanged SelectionChangedEvent selectionChangedEvent IStructuredSelection IStructuredSelection selectionChangedEvent getSelection isActivePart AntUIPlugin getActivePage AntUIPlugin getActivePage bringToTop AntElementNode selectedXmlElement AntElementNode getFirstElement selectedXmlElement setSelection selectedXmlElement isActivePart
private boolean is Active Part I Workbench Part part get Active Part return part null part equals this  isActivePart IWorkbenchPart getActivePart
private void set Selection Ant Element Node reference boolean move Cursor if reference null while reference get Import Node null reference reference get Import Node if reference is External return Styled Text text Widget null I Source Viewer source Viewer get Source Viewer if source Viewer null text Widget source Viewer get Text Widget if text Widget null return try int offset reference get Offset int length reference get Selection Length int high Light Length reference get Length if offset 0 return text Widget set Redraw false if high Light Length 0 set Highlight Range offset high Light Length move Cursor if move Cursor return if offset 1 length 0 source Viewer reveal Range offset length Selected region begins one index after offset source Viewer set Selected Range offset length catch Illegal Argument Exception x AntUI Plugin log x finally if text Widget null text Widget set Redraw true else if move Cursor reset Highlight Range  setSelection AntElementNode moveCursor getImportNode getImportNode isExternal StyledText textWidget ISourceViewer sourceViewer getSourceViewer sourceViewer textWidget sourceViewer getTextWidget textWidget getOffset getSelectionLength highLightLength getLength textWidget setRedraw highLightLength setHighlightRange highLightLength moveCursor moveCursor sourceViewer revealRange sourceViewer setSelectedRange IllegalArgumentException AntUIPlugin textWidget textWidget setRedraw moveCursor resetHighlightRange
see org eclipse ui texteditor Abstract Text Editor affects Text Presentation org eclipse jface util Property Change Event protected boolean affects Text Presentation Property Change Event event return Ant Editor Source Viewer Configuration get Source Viewer Configuration affects Text Presentation event  AbstractTextEditor affectsTextPresentation PropertyChangeEvent affectsTextPresentation PropertyChangeEvent AntEditorSourceViewerConfiguration getSourceViewerConfiguration affectsTextPresentation
protected void handle Preference Store Changed Property Change Event event String property event get Property if Abstract Decorated Text Editor Preference Constants EDITOR TAB WIDTH equals property Object value event get New Value Status Line Source Viewer viewer Status Line Source Viewer get Source Viewer if value instanceof Integer viewer get Text Widget set Tabs Integer value int Value else if value instanceof String viewer get Text Widget set Tabs Integer parse Int String value return if Ant Editor Preference Constants EDITOR SPACES FOR TABS equals property if is Tab Conversion Enabled start Tab Conversion else stop Tab Conversion return Ant Editor Source Viewer Configuration source Viewer Configuration Ant Editor Source Viewer Configuration get Source Viewer Configuration if affects Text Presentation event source Viewer Configuration adapt To Preference Change event source Viewer Configuration change Configuration event super handle Preference Store Changed event  handlePreferenceStoreChanged PropertyChangeEvent getProperty AbstractDecoratedTextEditorPreferenceConstants EDITOR_TAB_WIDTH getNewValue StatusLineSourceViewer StatusLineSourceViewer getSourceViewer getTextWidget setTabs intValue getTextWidget setTabs parseInt AntEditorPreferenceConstants EDITOR_SPACES_FOR_TABS isTabConversionEnabled startTabConversion stopTabConversion AntEditorSourceViewerConfiguration sourceViewerConfiguration AntEditorSourceViewerConfiguration getSourceViewerConfiguration affectsTextPresentation sourceViewerConfiguration adaptToPreferenceChange sourceViewerConfiguration changeConfiguration handlePreferenceStoreChanged
see org eclipse ui editors text Text Editor do Set Input org eclipse ui I Editor Input protected void do Set Input I Editor Input input throws Core Exception super do Set Input input set Outline Page Input input  TextEditor doSetInput IEditorInput doSetInput IEditorInput CoreException doSetInput setOutlinePageInput
private void set Outline Page Input I Editor Input input if f Outline Page null I Document Provider provider get Document Provider if provider instanceof Ant Editor Document Provider Ant Editor Document Provider document Provider Ant Editor Document Provider provider Ant Model model document Provider get Ant Model input f Outline Page set Page Input model  setOutlinePageInput IEditorInput fOutlinePage IDocumentProvider getDocumentProvider AntEditorDocumentProvider AntEditorDocumentProvider documentProvider AntEditorDocumentProvider AntModel documentProvider getAntModel fOutlinePage setPageInput
Returns the Ant model for the current editor input of this editor return the Ant model for this editor or code null code public Ant Model get Ant Model I Document Provider provider get Document Provider if provider instanceof Ant Editor Document Provider Ant Editor Document Provider document Provider Ant Editor Document Provider provider return document Provider get Ant Model get Editor Input return null  AntModel getAntModel IDocumentProvider getDocumentProvider AntEditorDocumentProvider AntEditorDocumentProvider documentProvider AntEditorDocumentProvider documentProvider getAntModel getEditorInput
see org eclipse ui texteditor Abstract Decorated Text Editor create Annotation Access protected I Annotation Access create Annotation Access return new Annotation Access  AbstractDecoratedTextEditor createAnnotationAccess IAnnotationAccess createAnnotationAccess AnnotationAccess
protected I Source Viewer create Source Viewer Composite parent I Vertical Ruler ruler int styles f Overview Ruler create Overview Ruler get Shared Colors I Source Viewer viewer new Status Line Source Viewer parent ruler get Overview Ruler styles ensure decoration support has been created and configured get Source Viewer Decoration Support viewer return viewer  ISourceViewer createSourceViewer IVerticalRuler fOverviewRuler createOverviewRuler getSharedColors ISourceViewer StatusLineSourceViewer getOverviewRuler getSourceViewerDecorationSupport
Ses the given message as error message to this editor s status line param msg message to be set protected void set Status Line Error Message String msg I Editor Status Line status Line I Editor Status Line get Adapter I Editor Status Line class if status Line null status Line set Message true msg null  setStatusLineErrorMessage IEditorStatusLine statusLine IEditorStatusLine getAdapter IEditorStatusLine statusLine statusLine setMessage
public void open Reference Element I Selection selection get Selection Provider get Selection String error Message null if selection instanceof I Text Selection I Text Selection text Selection I Text Selection selection String text text Selection get Text Ant Element Node node get Ant Model get Reference Node text if node null set Selection node true return String path get Ant Model get Entity Path text if path null I File file Ant Util get File For Location path null if file exists try open In Editor file is Active Part return catch Part Init Exception e error Message e get Localized Message if error Message null error Message Ant Editor Messages get String Ant Editor 3 NON NLS 1 set Status Line Error Message error Message get Site get Shell get Display beep  openReferenceElement ISelection getSelectionProvider getSelection errorMessage ITextSelection ITextSelection textSelection ITextSelection textSelection getText AntElementNode getAntModel getReferenceNode setSelection getAntModel getEntityPath IFile AntUtil getFileForLocation openInEditor isActivePart PartInitException errorMessage getLocalizedMessage errorMessage errorMessage AntEditorMessages getString AntEditor setStatusLineErrorMessage errorMessage getSite getShell getDisplay
private void open In Editor I File file boolean activate throws Part Init Exception if file null I Workbench Page p get Editor Site get Page if p null IDE open Editor p file activate  openInEditor IFile PartInitException IWorkbenchPage getEditorSite getPage openEditor
public void editor Context Menu About To Show I Menu Manager menu super editor Context Menu About To Show menu I Action format Action get Action Content Format NON NLS 1 if format Action null return if format Action is Enabled menu add format Action  editorContextMenuAboutToShow IMenuManager editorContextMenuAboutToShow IAction formatAction getAction ContentFormat formatAction formatAction isEnabled formatAction
private void start Tab Conversion if f Tab Converter null f Tab Converter new Tab Converter f Tab Converter set Line Tracker new Default Line Tracker f Tab Converter set Number Of Spaces Per Tab get Tab Size Status Line Source Viewer viewer Status Line Source Viewer get Source Viewer viewer set Text Converter f Tab Converter http dev eclipse org bugs show bug cgi id 19270 viewer update Indentation Prefixes  startTabConversion fTabConverter fTabConverter TabConverter fTabConverter setLineTracker DefaultLineTracker fTabConverter setNumberOfSpacesPerTab getTabSize StatusLineSourceViewer StatusLineSourceViewer getSourceViewer setTextConverter fTabConverter show_bug updateIndentationPrefixes
private void stop Tab Conversion if f Tab Converter null Status Line Source Viewer viewer Status Line Source Viewer get Source Viewer viewer set Text Converter null http dev eclipse org bugs show bug cgi id 19270 viewer update Indentation Prefixes f Tab Converter null  stopTabConversion fTabConverter StatusLineSourceViewer StatusLineSourceViewer getSourceViewer setTextConverter show_bug updateIndentationPrefixes fTabConverter
private int get Tab Size I Preference Store preferences get Preference Store return preferences get Int Abstract Decorated Text Editor Preference Constants EDITOR TAB WIDTH  getTabSize IPreferenceStore getPreferenceStore getInt AbstractDecoratedTextEditorPreferenceConstants EDITOR_TAB_WIDTH
public void create Part Control Composite parent super create Part Control parent if is Tab Conversion Enabled start Tab Conversion f Editor Selection Changed Listener new Editor Selection Changed Listener f Editor Selection Changed Listener install get Selection Provider  createPartControl createPartControl isTabConversionEnabled startTabConversion fEditorSelectionChangedListener EditorSelectionChangedListener fEditorSelectionChangedListener getSelectionProvider
private boolean is Tab Conversion Enabled I Preference Store store get Preference Store return store get Boolean Ant Editor Preference Constants EDITOR SPACES FOR TABS  isTabConversionEnabled IPreferenceStore getPreferenceStore getBoolean AntEditorPreferenceConstants EDITOR_SPACES_FOR_TABS
public void dispose super dispose if f Editor Selection Changed Listener null f Editor Selection Changed Listener uninstall get Selection Provider f Editor Selection Changed Listener null XML Core get Default remove Document Model Listener f Document Model Listener  fEditorSelectionChangedListener fEditorSelectionChangedListener getSelectionProvider fEditorSelectionChangedListener XMLCore getDefault removeDocumentModelListener fDocumentModelListener
public void do Save I Progress Monitor monitor super do Save monitor get Ant Model update Markers update Editor Image  doSave IProgressMonitor doSave getAntModel updateMarkers updateEditorImage
private void update Editor Image Image title Image get Title Image if title Image null return Ant Project Node node get Ant Model get Project Node if node null post Image Change node  updateEditorImage titleImage getTitleImage titleImage AntProjectNode getAntModel getProjectNode postImageChange
private void update For Initial Reconcile if get Ant Model null return f Initial Reconcile false update Editor Image get Ant Model update For Initial Reconcile  updateForInitialReconcile getAntModel fInitialReconcile updateEditorImage getAntModel updateForInitialReconcile
shell get Display async Exec new Runnable public void run if get Site get Shell null get Site get Shell is Disposed return Image title Image get Title Image Image new Image node get Image if title Image new Image set Title Image new Image  getDisplay asyncExec getSite getShell getSite getShell isDisposed titleImage getTitleImage newImage getImage titleImage newImage setTitleImage newImage
private void post Image Change final Ant Element Node node Shell shell get Site get Shell if shell null shell is Disposed shell get Display async Exec new Runnable public void run if get Site get Shell null get Site get Shell is Disposed return Image title Image get Title Image Image new Image node get Image if title Image new Image set Title Image new Image  postImageChange AntElementNode getSite getShell isDisposed getDisplay asyncExec getSite getShell getSite getShell isDisposed titleImage getTitleImage newImage getImage titleImage newImage setTitleImage newImage
public void synchronize Outline Page boolean check If Outline Page Active if get Selection Provider null return Ant Element Node node get Node synchronize Outline Page node check If Outline Page Active  synchronizeOutlinePage checkIfOutlinePageActive getSelectionProvider AntElementNode getNode synchronizeOutlinePage checkIfOutlinePageActive
protected void synchronize boolean check If Outline Page Active if get Selection Provider null return Ant Element Node node get Node if AntUI Plugin get Default get Preference Store get Boolean I AntUI Preference Constants OUTLINE LINK WITH EDITOR synchronize Outline Page node check If Outline Page Active set Selection node false  checkIfOutlinePageActive getSelectionProvider AntElementNode getNode AntUIPlugin getDefault getPreferenceStore getBoolean IAntUIPreferenceConstants OUTLINE_LINK_WITH_EDITOR synchronizeOutlinePage checkIfOutlinePageActive setSelection
private Ant Element Node get Node Ant Model model get Ant Model if model null return null Ant Element Node node null I Selection selection get Selection Provider get Selection if selection instanceof I Text Selection I Text Selection text Selection I Text Selection selection int offset text Selection get Offset node model get Node offset false return node  AntElementNode getNode AntModel getAntModel AntElementNode ISelection getSelectionProvider getSelection ITextSelection ITextSelection textSelection ITextSelection textSelection getOffset getNode
protected void synchronize Outline Page Ant Element Node node boolean check If Outline Page Active if f Outline Page null check If Outline Page Active is Ant Outline Page Action f Outline Page remove Post Selection Changed Listener f Selection Changed Listener f Outline Page select node f Outline Page add Post Selection Changed Listener f Selection Changed Listener  synchronizeOutlinePage AntElementNode checkIfOutlinePageActive fOutlinePage checkIfOutlinePageActive isAntOutlinePageAction fOutlinePage removePostSelectionChangedListener fSelectionChangedListener fOutlinePage fOutlinePage addPostSelectionChangedListener fSelectionChangedListener
shell get Display async Exec new Runnable public void run if get Site get Shell null get Site get Shell is Disposed return synchronize true  getDisplay asyncExec getSite getShell getSite getShell isDisposed
public void reconciled if get Source Viewer Configuration null return editor has been disposed if f Initial Reconcile update For Initial Reconcile I Auto Indent Strategy strategy get Source Viewer Configuration get Auto Indent Strategy null null if strategy instanceof Ant Auto Indent Strategy Ant Auto Indent Strategy strategy reconciled Shell shell get Site get Shell if shell null shell is Disposed shell get Display async Exec new Runnable public void run if get Site get Shell null get Site get Shell is Disposed return synchronize true  getSourceViewerConfiguration fInitialReconcile updateForInitialReconcile IAutoIndentStrategy getSourceViewerConfiguration getAutoIndentStrategy AntAutoIndentStrategy AntAutoIndentStrategy getSite getShell isDisposed getDisplay asyncExec getSite getShell getSite getShell isDisposed
private boolean is Ant Outline Page Action I Workbench Part part get Active Part return part instanceof Content Outline Content Outline part get Current Page f Outline Page  isAntOutlinePageAction IWorkbenchPart getActivePart ContentOutline ContentOutline getCurrentPage fOutlinePage
private I Workbench Part get Active Part I Workbench Window window get Site get Workbench Window I Part Service service window get Part Service return service get Active Part  IWorkbenchPart getActivePart IWorkbenchWindow getSite getWorkbenchWindow IPartService getPartService getActivePart
see org eclipse ui texteditor Abstract Text Editor do Set Selection org eclipse jface viewers I Selection protected void do Set Selection I Selection selection super do Set Selection selection synchronize Outline Page true  AbstractTextEditor doSetSelection ISelection doSetSelection ISelection doSetSelection synchronizeOutlinePage
Creates a combined preference store this store is read only return the combined preference store since 3 0 private I Preference Store create Combined Preference Store I Preference Store ant Store AntUI Plugin get Default get Preference Store I Preference Store general Text Store EditorsUI get Preference Store return new Chained Preference Store new I Preference Store ant Store general Text Store  IPreferenceStore createCombinedPreferenceStore IPreferenceStore antStore AntUIPlugin getDefault getPreferenceStore IPreferenceStore generalTextStore getPreferenceStore ChainedPreferenceStore IPreferenceStore antStore generalTextStore

public Ant Editor Action Contributor super Resource Bundle bundle Resource Bundle get Bundle org eclipse ant internal ui editor Ant Editor Messages NON NLS 1 f Content Assist Proposal new Retarget Text Editor Action bundle Content Assist Proposal NON NLS 1 f Content Format new Retarget Text Editor Action bundle Content Format NON NLS 1  AntEditorActionContributor ResourceBundle ResourceBundle getBundle AntEditorMessages fContentAssistProposal RetargetTextEditorAction ContentAssistProposal fContentFormat RetargetTextEditorAction ContentFormat
protected void initialize Actions Ant Editor editor f Open Declaration Action new Open Declaration Action editor  initializeActions AntEditor fOpenDeclarationAction OpenDeclarationAction
private void do Set Active Editor I Editor Part part super set Active Editor part I Text Editor editor null if part instanceof I Text Editor editor I Text Editor part f Content Assist Proposal set Action get Action editor Content Assist Proposal NON NLS 1 f Content Format set Action get Action editor Content Format NON NLS 1 if part instanceof Ant Editor if f Open Declaration Action null initialize Actions Ant Editor part contribute To Menu get Action Bars get Menu Manager if f Open Declaration Action null f Open Declaration Action set Editor Ant Editor part  doSetActiveEditor IEditorPart setActiveEditor ITextEditor ITextEditor ITextEditor fContentAssistProposal setAction getAction ContentAssistProposal fContentFormat setAction getAction ContentFormat AntEditor fOpenDeclarationAction initializeActions AntEditor contributeToMenu getActionBars getMenuManager fOpenDeclarationAction fOpenDeclarationAction setEditor AntEditor
public void contribute To Menu I Menu Manager menu if f Open Declaration Action null return super contribute To Menu menu I Menu Manager navigate Menu menu find Menu Using Path I Workbench Action Constants M NAVIGATE if navigate Menu null navigate Menu append To Group I Workbench Action Constants OPEN EXT f Open Declaration Action navigate Menu set Visible true  contributeToMenu IMenuManager fOpenDeclarationAction contributeToMenu IMenuManager navigateMenu findMenuUsingPath IWorkbenchActionConstants M_NAVIGATE navigateMenu navigateMenu appendToGroup IWorkbenchActionConstants OPEN_EXT fOpenDeclarationAction navigateMenu setVisible
public void init I Action Bars bars super init bars I Menu Manager menu Manager bars get Menu Manager I Menu Manager edit Menu menu Manager find Menu Using Path I Workbench Action Constants M EDIT if edit Menu null edit Menu add new Separator edit Menu add f Content Assist Proposal edit Menu add f Content Format  IActionBars IMenuManager menuManager getMenuManager IMenuManager editMenu menuManager findMenuUsingPath IWorkbenchActionConstants M_EDIT editMenu editMenu editMenu fContentAssistProposal editMenu fContentFormat
public void contribute To Tool Bar I Tool Bar Manager tool Bar Manager super contribute To Tool Bar tool Bar Manager TODO the validate action is still in development tool Bar Manager add f Validate Action tool Bar Manager update false  contributeToToolBar IToolBarManager toolBarManager contributeToToolBar toolBarManager toolBarManager fValidateAction toolBarManager
see org eclipse ui I Editor Action Bar Contributor set Active Editor org eclipse ui I Editor Part public void set Active Editor I Editor Part part do Set Active Editor part  IEditorActionBarContributor setActiveEditor IEditorPart setActiveEditor IEditorPart doSetActiveEditor
see org eclipse ui I Editor Action Bar Contributor dispose public void dispose do Set Active Editor null super dispose  IEditorActionBarContributor doSetActiveEditor

private Comparator proposal Comparator new Comparator public int compare Object o1 Object o2 int type1 get Proposal Type o1 int type2 get Proposal Type o2 if type1 type2 if type1 type2 return 1 return 1 String string1 I Completion Proposal o1 get Display String String string2 I Completion Proposal o2 get Display String return string1 compare To Ignore Case string2  proposalComparator getProposalType getProposalType ICompletionProposal getDisplayString ICompletionProposal getDisplayString compareToIgnoreCase
private int get Proposal Type Object o if o instanceof Ant Completion Proposal return Ant Completion Proposal o get Type return Ant Completion Proposal TASK PROPOSAL  getProposalType AntCompletionProposal AntCompletionProposal getType AntCompletionProposal TASK_PROPOSAL
public Ant Editor Completion Processor Ant Model model super if dtd null try dtd parse Dtd catch IO Exception e AntUI Plugin log e catch Parse Error e AntUI Plugin log e ant Model model  AntEditorCompletionProcessor AntModel parseDtd IOException AntUIPlugin ParseError AntUIPlugin antModel
Parses the dtd private I Schema parse Dtd throws Parse Error IO Exception Input Stream stream get Class get Resource As Stream ANT DTD FILENAME Input Stream Reader reader new Input Stream Reader stream UTF 8 NON NLS 1 Parser parser new Parser I Schema schema parser parseDTD reader project NON NLS 1 reader close return schema  ISchema parseDtd ParseError IOException InputStream getClass getResourceAsStream ANT_DTD_FILENAME InputStreamReader InputStreamReader ISchema
public I Completion Proposal compute Completion Proposals I Text Viewer ref Viewer int document Offset this viewer ref Viewer I Completion Proposal matching Proposals determine Proposals I Completion Proposal matching Template Proposals determine Template Proposals ref Viewer document Offset current Prefix null current Proposal Mode 1 return merge Proposals matching Proposals matching Template Proposals  ICompletionProposal computeCompletionProposals ITextViewer refViewer documentOffset refViewer ICompletionProposal matchingProposals determineProposals ICompletionProposal matchingTemplateProposals determineTemplateProposals refViewer documentOffset currentPrefix currentProposalMode mergeProposals matchingProposals matchingTemplateProposals
private I Completion Proposal determine Template Proposals I Text Viewer ref Viewer int document Offset String prefix get Current Prefix I Completion Proposal matching Template Proposals if prefix length 0 matching Template Proposals super compute Completion Proposals ref Viewer document Offset else I Completion Proposal template Proposals super compute Completion Proposals ref Viewer document Offset List template Proposal List new Array List template Proposals length for int i 0 i template Proposals length i if template Proposals i get Display String to Lower Case starts With prefix template Proposal List add template Proposals i matching Template Proposals I Completion Proposal template Proposal List to Array new I Completion Proposal template Proposal List size return matching Template Proposals  ICompletionProposal determineTemplateProposals ITextViewer refViewer documentOffset getCurrentPrefix ICompletionProposal matchingTemplateProposals matchingTemplateProposals computeCompletionProposals refViewer documentOffset ICompletionProposal templateProposals computeCompletionProposals refViewer documentOffset templateProposalList ArrayList templateProposals templateProposals templateProposals getDisplayString toLowerCase startsWith templateProposalList templateProposals matchingTemplateProposals ICompletionProposal templateProposalList toArray ICompletionProposal templateProposalList matchingTemplateProposals
private I Completion Proposal merge Proposals I Completion Proposal proposals1 I Completion Proposal proposals2 I Completion Proposal combined Proposals new I Completion Proposal proposals1 length proposals2 length System arraycopy proposals1 0 combined Proposals 0 proposals1 length System arraycopy proposals2 0 combined Proposals proposals1 length proposals2 length Arrays sort combined Proposals proposal Comparator return combined Proposals  ICompletionProposal mergeProposals ICompletionProposal ICompletionProposal ICompletionProposal combinedProposals ICompletionProposal combinedProposals combinedProposals combinedProposals proposalComparator combinedProposals
see org eclipse jface text contentassist I Content Assist Processor compute Context Information I Text Viewer int public I Context Information compute Context Information I Text Viewer ref Viewer int document Offset return new I Context Information 0  IContentAssistProcessor computeContextInformation ITextViewer IContextInformation computeContextInformation ITextViewer refViewer documentOffset IContextInformation
see org eclipse jface text contentassist I Content Assist Processor get Completion Proposal Auto Activation Characters public char get Completion Proposal Auto Activation Characters return auto Activation Chars  IContentAssistProcessor getCompletionProposalAutoActivationCharacters getCompletionProposalAutoActivationCharacters autoActivationChars
see org eclipse jface text contentassist I Content Assist Processor get Context Information Auto Activation Characters public char get Context Information Auto Activation Characters return null  IContentAssistProcessor getContextInformationAutoActivationCharacters getContextInformationAutoActivationCharacters
see org eclipse jface text contentassist I Content Assist Processor get Context Information Validator public I Context Information Validator get Context Information Validator return null  IContentAssistProcessor getContextInformationValidator IContextInformationValidator getContextInformationValidator
see org eclipse jface text contentassist I Content Assist Processor get Error Message public String get Error Message return error Message  IContentAssistProcessor getErrorMessage getErrorMessage errorMessage
Returns the new determined proposals private I Completion Proposal determine Proposals I Text Selection selection I Text Selection viewer get Selection Provider get Selection cursor Position selection get Offset selection get Length I Document doc viewer get Document try line Number doc get Line Of Offset cursor Position column Number cursor Position doc get Line Offset line Number catch Bad Location Exception e AntUI Plugin log e String prefix get Current Prefix if prefix null cursor Position 1 AntUI Plugin get Standard Display beep return NO PROPOSALS I Completion Proposal proposals get Proposals From Document doc prefix return proposals  ICompletionProposal determineProposals ITextSelection ITextSelection getSelectionProvider getSelection cursorPosition getOffset getLength IDocument getDocument lineNumber getLineOfOffset cursorPosition columnNumber cursorPosition getLineOffset lineNumber BadLocationException AntUIPlugin getCurrentPrefix cursorPosition AntUIPlugin getStandardDisplay NO_PROPOSALS ICompletionProposal getProposalsFromDocument
Returns the proposals for the specified document protected I Completion Proposal get Proposals From Document I Document document String prefix String task String null I Completion Proposal proposals null current Proposal Mode determine Proposal Mode document cursor Position prefix switch current Proposal Mode case PROPOSAL MODE ATTRIBUTE PROPOSAL task String get Task String From Document String To Prefix document get substring 0 cursor Position prefix length proposals get Attribute Proposals task String prefix if proposals length 0 error Message Ant Editor Messages get String Ant Editor Completion Processor 28 NON NLS 1 break case PROPOSAL MODE TASK PROPOSAL String parent Name get Parent Name document line Number column Number if parent Name null parent Name length 0 outside of any parent element proposals NO PROPOSALS current Proposal Mode PROPOSAL MODE NONE else proposals get Task Proposals document parent Name prefix if proposals length 0 error Message Ant Editor Messages get String Ant Editor Completion Processor 29 NON NLS 1 break case PROPOSAL MODE BUILDFILE proposals get Build File Proposals document prefix if proposals length 0 error Message Ant Editor Messages get String Ant Editor Completion Processor 29 NON NLS 1 break case PROPOSAL MODE TASK PROPOSAL CLOSING I Completion Proposal proposal get Closing Task Proposal get Open Element Name prefix true if proposal null error Message Ant Editor Messages get String Ant Editor Completion Processor 30 NON NLS 1 proposals NO PROPOSALS else proposals new I Completion Proposal proposal break case PROPOSAL MODE ATTRIBUTE VALUE PROPOSAL String text To Search document get substring 0 cursor Position prefix length task String get Task String From Document String To Prefix text To Search String attribute String get Attribute String From Document String To Prefix text To Search if target equals Ignore Case task String NON NLS 1 proposals get Target Attribute Value Proposals document text To Search prefix attribute String else if refid equals Ignore Case attribute String NON NLS 1 proposals get References Value Proposals prefix else proposals get Attribute Value Proposals task String attribute String prefix if proposals length 0 error Message Ant Editor Messages get String Ant Editor Completion Processor 31 NON NLS 1 break case PROPOSAL MODE PROPERTY PROPOSAL proposals get Property Proposals document prefix cursor Position if proposals length 0 error Message Ant Editor Messages get String Ant Editor Completion Processor 32 NON NLS 1 break case PROPOSAL MODE NONE default proposals NO PROPOSALS error Message Ant Editor Messages get String Ant Editor Completion Processor 33 NON NLS 1 if proposals length 0 error Message NON NLS 1 return proposals  ICompletionProposal getProposalsFromDocument IDocument taskString ICompletionProposal currentProposalMode determineProposalMode cursorPosition currentProposalMode PROPOSAL_MODE_ATTRIBUTE_PROPOSAL taskString getTaskStringFromDocumentStringToPrefix cursorPosition getAttributeProposals taskString errorMessage AntEditorMessages getString AntEditorCompletionProcessor PROPOSAL_MODE_TASK_PROPOSAL parentName getParentName lineNumber columnNumber parentName parentName NO_PROPOSALS currentProposalMode PROPOSAL_MODE_NONE getTaskProposals parentName errorMessage AntEditorMessages getString AntEditorCompletionProcessor PROPOSAL_MODE_BUILDFILE getBuildFileProposals errorMessage AntEditorMessages getString AntEditorCompletionProcessor PROPOSAL_MODE_TASK_PROPOSAL_CLOSING ICompletionProposal getClosingTaskProposal getOpenElementName errorMessage AntEditorMessages getString AntEditorCompletionProcessor NO_PROPOSALS ICompletionProposal PROPOSAL_MODE_ATTRIBUTE_VALUE_PROPOSAL textToSearch cursorPosition taskString getTaskStringFromDocumentStringToPrefix textToSearch attributeString getAttributeStringFromDocumentStringToPrefix textToSearch equalsIgnoreCase taskString getTargetAttributeValueProposals textToSearch attributeString equalsIgnoreCase attributeString getReferencesValueProposals getAttributeValueProposals taskString attributeString errorMessage AntEditorMessages getString AntEditorCompletionProcessor PROPOSAL_MODE_PROPERTY_PROPOSAL getPropertyProposals cursorPosition errorMessage AntEditorMessages getString AntEditorCompletionProcessor PROPOSAL_MODE_NONE NO_PROPOSALS errorMessage AntEditorMessages getString AntEditorCompletionProcessor errorMessage
private I Completion Proposal get References Value Proposals String prefix Project project ant Model get Project Node get Project Map references project get References if references is Empty return NO PROPOSALS Set ref Ids references key Set Ant Element Node node ant Model get Node cursor Position false while node get Parent Node instanceof Ant Task Node node node get Parent Node String id null if node instanceof Ant Task Node id Ant Task Node node get Id List proposals new Array List ref Ids size int i 0 String ref Id I Completion Proposal proposal for Iterator iter ref Ids iterator iter has Next i ref Id String iter next if ref Id equals id prefix length 0 ref Id to Lower Case starts With prefix proposal new Ant Completion Proposal ref Id cursor Position prefix length prefix length ref Id length null ref Id null Ant Completion Proposal TASK PROPOSAL proposals add proposal return I Completion Proposal proposals to Array new I Completion Proposal proposals size  ICompletionProposal getReferencesValueProposals antModel getProjectNode getProject getReferences isEmpty NO_PROPOSALS refIds keySet AntElementNode antModel getNode cursorPosition getParentNode AntTaskNode getParentNode AntTaskNode AntTaskNode getId ArrayList refIds refId ICompletionProposal refIds hasNext refId refId refId toLowerCase startsWith AntCompletionProposal refId cursorPosition refId refId AntCompletionProposal TASK_PROPOSAL ICompletionProposal toArray ICompletionProposal
protected I Completion Proposal get Target Attribute Value Proposals I Document document String text To Search String prefix String attribute Name if attribute Name equals Ignore Case depends NON NLS 1 return get Depends Value Proposals document prefix else if attribute Name equals Ignore Case if attribute Name equals Ignore Case unless NON NLS 1 NON NLS 2 if text To Search trim ends With NON NLS 1 return get Property Proposals document prefix cursor Position return NO PROPOSALS  ICompletionProposal getTargetAttributeValueProposals IDocument textToSearch attributeName attributeName equalsIgnoreCase getDependsValueProposals attributeName equalsIgnoreCase attributeName equalsIgnoreCase textToSearch endsWith getPropertyProposals cursorPosition NO_PROPOSALS
private I Completion Proposal get Depends Value Proposals I Document document String prefix List possible Dependencies new Array List String current Target Name get Enclosing Target Name document line Number column Number if current Target Name null return NO PROPOSALS Map targets get Targets Set target Names targets key Set Iterator itr target Names iterator Enumeration dependencies null while itr has Next String target Name String itr next if target Name equals current Target Name Target current Target Target targets get target Name dependencies current Target get Dependencies continue if target Name to Lower Case starts With prefix target Name length 0 possible Dependencies add target Name if dependencies null while dependencies has More Elements possible Dependencies remove dependencies next Element I Completion Proposal proposals new I Completion Proposal possible Dependencies size int i 0 for Iterator iter possible Dependencies iterator iter has Next i String target Name String iter next I Completion Proposal proposal new Ant Completion Proposal target Name cursor Position prefix length prefix length target Name length null target Name null Ant Completion Proposal TASK PROPOSAL proposals i proposal return proposals  ICompletionProposal getDependsValueProposals IDocument possibleDependencies ArrayList currentTargetName getEnclosingTargetName lineNumber columnNumber currentTargetName NO_PROPOSALS getTargets targetNames keySet targetNames hasNext targetName targetName currentTargetName currentTarget targetName currentTarget getDependencies targetName toLowerCase startsWith targetName possibleDependencies targetName hasMoreElements possibleDependencies nextElement ICompletionProposal ICompletionProposal possibleDependencies possibleDependencies hasNext targetName ICompletionProposal AntCompletionProposal targetName cursorPosition targetName targetName AntCompletionProposal TASK_PROPOSAL
Returns all possible attributes for the specified task param task Name the name of the task for that the attribute shall be completed param prefix prefix that all proposals should start with The prefix may be an empty string protected I Completion Proposal get Attribute Proposals String task Name String prefix List proposals new Array List I Element element dtd get Element task Name if element null Iterator keys element get Attributes key Set iterator while keys has Next String attr Name String keys next if prefix length 0 attr Name to Lower Case starts With prefix I Attribute dtd Attributes I Attribute element get Attributes get attr Name String replacement String attr Name NON NLS 1 String display String attr Name String items dtd Attributes get Enum if items null if items length 1 display String NON NLS 1 for int i 0 i items length i display String items i if i 1 items length display String NON NLS 1 else display String NON NLS 1 add Attribute Proposal task Name prefix proposals attr Name replacement String display String true else possibly a user defined task or type Class task Class get Task Class task Name if task Class null if task Class Macro Instance class add Macro Def Attribute Proposals task Name prefix proposals else Introspection Helper helper get Introspection Helper task Class if helper null add Attribute Proposals helper task Name prefix proposals else nested user defined element Class nested Type get Nested Type if nested Type null Introspection Helper helper get Introspection Helper nested Type if helper null add Attribute Proposals helper task Name prefix proposals return I Completion Proposal proposals to Array new I Completion Proposal proposals size  taskName ICompletionProposal getAttributeProposals taskName ArrayList IElement getElement taskName getAttributes keySet hasNext attrName attrName toLowerCase startsWith IAttribute dtdAttributes IAttribute getAttributes attrName replacementString attrName displayString attrName dtdAttributes getEnum displayString displayString displayString displayString addAttributeProposal taskName attrName replacementString displayString taskClass getTaskClass taskName taskClass taskClass MacroInstance addMacroDefAttributeProposals taskName IntrospectionHelper getIntrospectionHelper taskClass addAttributeProposals taskName nestedType getNestedType nestedType IntrospectionHelper getIntrospectionHelper nestedType addAttributeProposals taskName ICompletionProposal toArray ICompletionProposal
private void add Attribute Proposals Introspection Helper helper String task Name String prefix List proposals Enumeration attributes helper get Attributes while attributes has More Elements String attribute String attributes next Element if prefix length 0 attribute to Lower Case starts With prefix String replacement String attribute NON NLS 1 add Attribute Proposal task Name prefix proposals attribute replacement String attribute false  addAttributeProposals IntrospectionHelper taskName getAttributes hasMoreElements nextElement toLowerCase startsWith replacementString addAttributeProposal taskName replacementString
private Class get Nested Type Ant Element Node current Node ant Model get Node cursor Position false Ant Element Node parent current Node get Parent Node if parent instanceof Ant Task Node String parent Name parent get Name if has Nested Elements parent Name Class task Class get Task Class parent Name if task Class null Introspection Helper helper get Introspection Helper task Class if helper null Class nested Type null try nested Type helper get Element Type current Node get Name catch Build Exception be return nested Type return null  getNestedType AntElementNode currentNode antModel getNode cursorPosition AntElementNode currentNode getParentNode AntTaskNode parentName getName hasNestedElements parentName taskClass getTaskClass parentName taskClass IntrospectionHelper getIntrospectionHelper taskClass nestedType nestedType getElementType currentNode getName BuildException nestedType
private Introspection Helper get Introspection Helper Class task Class Introspection Helper helper null try helper Introspection Helper get Helper ant Model get Project Node get Project task Class catch No Class Def Found Error e AntUI Plugin log Message Format format Ant Editor Messages get String Ant Editor Completion Processor 0 new String task Class get Name e NON NLS 1 return helper  IntrospectionHelper getIntrospectionHelper taskClass IntrospectionHelper IntrospectionHelper getHelper antModel getProjectNode getProject taskClass NoClassDefFoundError AntUIPlugin MessageFormat AntEditorMessages getString AntEditorCompletionProcessor taskClass getName
private void add Macro Def Attribute Proposals String task Name String prefix List proposals current Proposal Mode PROPOSAL MODE ATTRIBUTE PROPOSAL Ant Project Node project Node ant Model get Project Node Ant Defining Task Node node project Node get Definining Task Node task Name Object task node get Real Task if task instanceof Macro Def return List attributes Macro Def task get Attributes Iterator itr attributes iterator while itr has Next Macro Def Attribute attribute Macro Def Attribute itr next String attribute Name attribute get Name if prefix length 0 attribute Name to Lower Case starts With prefix continue String replacement String attribute Name NON NLS 1 String proposal Info null String description attribute get Description if description null proposal Info description String deflt attribute get Default if deflt null deflt length 0 proposal Info proposal Info null BR BR proposal Info BR BR NON NLS 1 NON NLS 2 proposal Info Message Format format Ant Editor Messages get String Ant Editor Completion Processor 59 new String deflt NON NLS 1 I Completion Proposal proposal new Ant Completion Proposal replacement String cursor Position prefix length prefix length attribute Name length 2 null attribute Name proposal Info Ant Completion Proposal TASK PROPOSAL proposals add proposal  addMacroDefAttributeProposals taskName currentProposalMode PROPOSAL_MODE_ATTRIBUTE_PROPOSAL AntProjectNode projectNode antModel getProjectNode AntDefiningTaskNode projectNode getDefininingTaskNode taskName getRealTask MacroDef MacroDef getAttributes hasNext MacroDef MacroDef attributeName getName attributeName toLowerCase startsWith replacementString attributeName proposalInfo getDescription proposalInfo getDefault proposalInfo proposalInfo proposalInfo proposalInfo MessageFormat AntEditorMessages getString AntEditorCompletionProcessor ICompletionProposal AntCompletionProposal replacementString cursorPosition attributeName attributeName proposalInfo AntCompletionProposal TASK_PROPOSAL
private void add Macro Def Element Proposals String task Name String prefix List proposals current Proposal Mode PROPOSAL MODE ATTRIBUTE PROPOSAL Ant Project Node project Node ant Model get Project Node Ant Defining Task Node node project Node get Definining Task Node task Name Object task node get Real Task if task instanceof Macro Def return Map elements Macro Def task get Elements Iterator itr elements key Set iterator while itr has Next String element Name String itr next if prefix length 0 element Name to Lower Case starts With prefix continue Macro Def Template Element element Macro Def Template Element elements get element Name String replacement String Message Format format 0 n 1 new String element Name element Name NON NLS 1 String proposal Info null String description element get Description if description null proposal Info description proposal Info proposal Info null BR BR proposal Info BR BR NON NLS 1 NON NLS 2 if element is Optional proposal Info Ant Editor Messages get String Ant Editor Completion Processor 1 NON NLS 1 else proposal Info Ant Editor Messages get String Ant Editor Completion Processor 2 NON NLS 1 I Completion Proposal proposal new Ant Completion Proposal replacement String cursor Position prefix length prefix length element Name length 2 null element Name proposal Info Ant Completion Proposal TASK PROPOSAL proposals add proposal  addMacroDefElementProposals taskName currentProposalMode PROPOSAL_MODE_ATTRIBUTE_PROPOSAL AntProjectNode projectNode antModel getProjectNode AntDefiningTaskNode projectNode getDefininingTaskNode taskName getRealTask MacroDef MacroDef getElements keySet hasNext elementName elementName toLowerCase startsWith MacroDef TemplateElement MacroDef TemplateElement elementName replacementString MessageFormat elementName elementName proposalInfo getDescription proposalInfo proposalInfo proposalInfo proposalInfo isOptional proposalInfo AntEditorMessages getString AntEditorCompletionProcessor proposalInfo AntEditorMessages getString AntEditorCompletionProcessor ICompletionProposal AntCompletionProposal replacementString cursorPosition elementName elementName proposalInfo AntCompletionProposal TASK_PROPOSAL
private void add Attribute Proposal String task Name String prefix List proposals String attr Name String replacement String String display String boolean lookup Description String proposal Info null if lookup Description String required description Provider get Required Attribute For Task Attribute task Name attr Name if required null required length 0 proposal Info Ant Editor Messages get String Ant Editor Completion Processor Required   4 required NON NLS 1 proposal Info BR BR NON NLS 1 String description description Provider get Description For Task Attribute task Name attr Name if description null proposal Info proposal Info null proposal Info NON NLS 1 proposal Info description I Completion Proposal proposal new Ant Completion Proposal replacement String cursor Position prefix length prefix length attr Name length 2 null display String proposal Info Ant Completion Proposal TASK PROPOSAL proposals add proposal  addAttributeProposal taskName attrName replacementString displayString lookupDescription proposalInfo lookupDescription descriptionProvider getRequiredAttributeForTaskAttribute taskName attrName proposalInfo AntEditorMessages getString AntEditorCompletionProcessor Required___4 proposalInfo descriptionProvider getDescriptionForTaskAttribute taskName attrName proposalInfo proposalInfo proposalInfo proposalInfo ICompletionProposal AntCompletionProposal replacementString cursorPosition attrName displayString proposalInfo AntCompletionProposal TASK_PROPOSAL
Returns all possible values for the specified attribute of the specified task param a Task Name the name of the task that the specified attribute belongs to param an Attribute Name the name of the attribute for that the value shall be completed param prefix the prefix that all proposals should start with The prefix may be an empty string private I Completion Proposal get Attribute Value Proposals String task Name String attribute Name String prefix List proposals new Array List I Element task Element dtd get Element task Name if task Element null I Attribute attribute I Attribute task Element get Attributes get attribute Name if attribute null String items attribute get Enum if items null String item for int i 0 i items length i item items i if prefix length 0 item to Lower Case starts With prefix proposals add new Ant Completion Proposal item cursor Position prefix length prefix length item length null item null Ant Completion Proposal TASK PROPOSAL else possibly a user defined task or type Class task Class get Task Class task Name if task Class null Introspection Helper helper get Introspection Helper task Class if helper null add Attribute Value Proposals helper attribute Name prefix proposals else nested user defined element Class nested Type get Nested Type if nested Type null Introspection Helper helper get Introspection Helper nested Type if helper null add Attribute Value Proposals helper attribute Name prefix proposals return I Completion Proposal proposals to Array new I Completion Proposal proposals size  aTaskName anAttributeName ICompletionProposal getAttributeValueProposals taskName attributeName ArrayList IElement taskElement getElement taskName taskElement IAttribute IAttribute taskElement getAttributes attributeName getEnum toLowerCase startsWith AntCompletionProposal cursorPosition AntCompletionProposal TASK_PROPOSAL taskClass getTaskClass taskName taskClass IntrospectionHelper getIntrospectionHelper taskClass addAttributeValueProposals attributeName nestedType getNestedType nestedType IntrospectionHelper getIntrospectionHelper nestedType addAttributeValueProposals attributeName ICompletionProposal toArray ICompletionProposal
private void add Attribute Value Proposals Introspection Helper helper String attribute Name String prefix List proposals Enumeration attributes helper get Attributes while attributes has More Elements String attribute String attributes next Element if attribute equals attribute Name Class attribute Type helper get Attribute Type attribute add Attribute Value Proposals For Attribute Type attribute Type prefix proposals break  addAttributeValueProposals IntrospectionHelper attributeName getAttributes hasMoreElements nextElement attributeName attributeType getAttributeType addAttributeValueProposalsForAttributeType attributeType
private void add Attribute Value Proposals For Attribute Type Class attribute Type String prefix List proposals if attribute Type Boolean TYPE attribute Type Boolean class prefix length 5 add Boolean Attribute Value Proposals prefix proposals else if Enumerated Attribute class is Assignable From attribute Type try add Enumerated Attribute Value Proposals attribute Type prefix proposals catch Instantiation Exception e catch Illegal Access Exception e else if Reference class attribute Type proposals add All Arrays as List get References Value Proposals prefix  addAttributeValueProposalsForAttributeType attributeType attributeType attributeType addBooleanAttributeValueProposals EnumeratedAttribute isAssignableFrom attributeType addEnumeratedAttributeValueProposals attributeType InstantiationException IllegalAccessException attributeType addAll asList getReferencesValueProposals
private void add Enumerated Attribute Value Proposals Class type String prefix List proposals throws Instantiation Exception Illegal Access Exception Enumerated Attribute ea Enumerated Attribute type new Instance String values ea get Values String enumerated for int i 0 i values length i enumerated values i to Lower Case if prefix length 0 enumerated starts With prefix proposals add new Ant Completion Proposal enumerated cursor Position prefix length prefix length enumerated length null enumerated null Ant Completion Proposal TASK PROPOSAL  addEnumeratedAttributeValueProposals InstantiationException IllegalAccessException EnumeratedAttribute EnumeratedAttribute newInstance getValues toLowerCase startsWith AntCompletionProposal cursorPosition AntCompletionProposal TASK_PROPOSAL
private void add Boolean Attribute Value Proposals String prefix List proposals String boolean Values new String true false on off yes no NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 NON NLS 6 String boolean Assist for int i 0 i boolean Values length i boolean Assist boolean Values i to Lower Case if prefix length 0 boolean Assist starts With prefix proposals add new Ant Completion Proposal boolean Assist cursor Position prefix length prefix length boolean Assist length null boolean Assist null Ant Completion Proposal TASK PROPOSAL  addBooleanAttributeValueProposals booleanValues booleanAssist booleanValues booleanAssist booleanValues toLowerCase booleanAssist startsWith AntCompletionProposal booleanAssist cursorPosition booleanAssist booleanAssist AntCompletionProposal TASK_PROPOSAL
Returns all possible properties for the specified prefix P Note that the completion mode must be property mode otherwise it is not safe to call this method protected I Completion Proposal get Property Proposals I Document document String prefix int a Cursor Position List proposals new Array List Map display String To Proposals new Hash Map Map properties find Properties From Document Image image AntUI Images get Image I AntUI Constants IMG PROPERTY Determine replacement length and offset String from beginning to the beginning of the prefix int replacement Length prefix length int replacement Offset 0 String text document get String string To Prefix text substring 0 a Cursor Position prefix length Property proposal String last Two Characters string To Prefix substring string To Prefix length 2 string To Prefix length boolean append Braces true if last Two Characters equals NON NLS 1 replacement Length 2 replacement Offset a Cursor Position prefix length 2 else if last Two Characters ends With NON NLS 1 replacement Length 1 replacement Offset a Cursor Position prefix length 1 else support for property proposals for the if unless attributes of targets replacement Offset a Cursor Position prefix length append Braces false if text length a Cursor Position text char At a Cursor Position replacement Length 1 String property Name for Iterator i properties key Set iterator i has Next property Name String i next if prefix length 0 property Name to Lower Case starts With prefix String additional Property Info String properties get property Name String Buffer replacement String new String Buffer if append Braces replacement String append NON NLS 1 replacement String append property Name if append Braces replacement String append if display String To Proposals get property Name null I Completion Proposal proposal new Ant Completion Proposal replacement String to String replacement Offset replacement Length replacement String length image property Name additional Property Info Ant Completion Proposal PROPERTY PROPOSAL proposals add proposal display String To Proposals put property Name proposal return I Completion Proposal proposals to Array new I Completion Proposal proposals size  ICompletionProposal getPropertyProposals IDocument aCursorPosition ArrayList displayStringToProposals HashMap findPropertiesFromDocument AntUIImages getImage IAntUIConstants IMG_PROPERTY replacementLength replacementOffset stringToPrefix aCursorPosition lastTwoCharacters stringToPrefix stringToPrefix stringToPrefix appendBraces lastTwoCharacters replacementLength replacementOffset aCursorPosition lastTwoCharacters endsWith replacementLength replacementOffset aCursorPosition replacementOffset aCursorPosition appendBraces aCursorPosition charAt aCursorPosition replacementLength propertyName keySet hasNext propertyName propertyName toLowerCase startsWith additionalPropertyInfo propertyName StringBuffer replacementString StringBuffer appendBraces replacementString replacementString propertyName appendBraces replacementString displayStringToProposals propertyName ICompletionProposal AntCompletionProposal replacementString toString replacementOffset replacementLength replacementString propertyName additionalPropertyInfo AntCompletionProposal PROPERTY_PROPOSAL displayStringToProposals propertyName ICompletionProposal toArray ICompletionProposal
Returns all possible proposals for the specified parent name P No completions will be returned if code parent Name code is not known param document the entire document param parent Name name of the parent surrounding element param prefix the prefix that all proposals should start with The prefix may be an empty string protected I Completion Proposal get Task Proposals I Document document String parent Name String prefix List proposals new Array List 250 I Completion Proposal proposal if are Tasks Or Types Valid Children parent Name use the definitions in the project as that includes more than what is defined in the DTD Project project ant Model get Project Node get Project Map tasks And Types Component Helper get Component Helper project get Ant Type Table create Proposals document prefix proposals tasks And Types if parent Name equals project target starts With prefix NON NLS 1 NON NLS 2 proposals add new Completion Proposal document prefix target NON NLS 1 else I Element parent dtd get Element parent Name if parent null I Dfm dfm parent get Dfm String accepts dfm get Accepts String element Name for int i 0 i accepts length i element Name accepts i if prefix length 0 element Name to Lower Case starts With prefix proposal new Completion Proposal document prefix element Name proposals add proposal else a nested element of a user defined task type Class task Class get Task Class parent Name if task Class null if task Class Macro Instance class add Macro Def Element Proposals parent Name prefix proposals else Introspection Helper helper get Introspection Helper task Class if helper null Enumeration nested helper get Nested Elements String nested Element while nested has More Elements nested Element String nested next Element if prefix length 0 nested Element to Lower Case starts With prefix proposal new Completion Proposal document prefix nested Element proposals add proposal proposal get Closing Task Proposal get Open Element Name prefix false if proposal null proposals add proposal return I Completion Proposal proposals to Array new I Completion Proposal proposals size  parentName parentName ICompletionProposal getTaskProposals IDocument parentName ArrayList ICompletionProposal areTasksOrTypesValidChildren parentName antModel getProjectNode getProject tasksAndTypes ComponentHelper getComponentHelper getAntTypeTable createProposals tasksAndTypes parentName startsWith newCompletionProposal IElement getElement parentName IDfm getDfm getAccepts elementName elementName elementName toLowerCase startsWith newCompletionProposal elementName taskClass getTaskClass parentName taskClass taskClass MacroInstance addMacroDefElementProposals parentName IntrospectionHelper getIntrospectionHelper taskClass getNestedElements nestedElement hasMoreElements nestedElement nextElement nestedElement toLowerCase startsWith newCompletionProposal nestedElement getClosingTaskProposal getOpenElementName ICompletionProposal toArray ICompletionProposal
private boolean are Tasks Or Types Valid Children String parent Name return parent Name project parent Name target parent Name sequential NON NLS 1 NON NLS 2 NON NLS 3 parent Name presetdef parent Name parallel parent Name daemons NON NLS 1 NON NLS 2 NON NLS 3  areTasksOrTypesValidChildren parentName parentName parentName parentName parentName parentName parentName
Returns proposals that define the structure of a buildfile Note that template proposals which define the structure of a buildfile are handled by link determine Template Proposals I Text Viewer int which limits proposals by context type param document the entire document param prefix the prefix that all proposals should start with The prefix may be an empty string protected I Completion Proposal get Build File Proposals I Document document String prefix String root Element Name project NON NLS 1 I Element root Element dtd get Element root Element Name if root Element null root Element Name to Lower Case starts With prefix I Completion Proposal proposal new Completion Proposal document prefix root Element Name return new I Completion Proposal proposal return NO PROPOSALS  determineTemplateProposals ITextViewer ICompletionProposal getBuildFileProposals IDocument rootElementName IElement rootElement getElement rootElementName rootElement rootElementName toLowerCase startsWith ICompletionProposal newCompletionProposal rootElementName ICompletionProposal NO_PROPOSALS
private void create Proposals I Document document String prefix List proposals Map tasks Iterator keys tasks key Set iterator I Completion Proposal proposal String key while keys has Next key String keys next if prefix length 0 key to Lower Case starts With prefix proposal new Completion Proposal document prefix key proposals add proposal  createProposals IDocument keySet ICompletionProposal hasNext toLowerCase startsWith newCompletionProposal
private I Completion Proposal new Completion Proposal I Document document String a Prefix String element Name additional Proposal Offset 0 Image proposal Image AntUI Images get Image I AntUI Constants IMG TASK PROPOSAL String proposal Info description Provider get Description For Task element Name boolean has Nested Elements has Nested Elements element Name String replacement String get Task Proposal Replacement String element Name has Nested Elements int replacement Offset cursor Position a Prefix length int replacement Length a Prefix length if replacement Offset 0 document get char At replacement Offset 1 replacement Offset replacement Length int proposal Cursor Position if has Nested Elements proposal Cursor Position element Name length 2 additional Proposal Offset else if additional Proposal Offset 0 additional Proposal Offset 2 antstructure output else additional Proposal Offset 1 arg proposal Cursor Position element Name length additional Proposal Offset return new Ant Completion Proposal replacement String replacement Offset replacement Length proposal Cursor Position proposal Image element Name proposal Info Ant Completion Proposal TASK PROPOSAL  ICompletionProposal newCompletionProposal IDocument aPrefix elementName additionalProposalOffset proposalImage AntUIImages getImage IAntUIConstants IMG_TASK_PROPOSAL proposalInfo descriptionProvider getDescriptionForTask elementName hasNestedElements hasNestedElements elementName replacementString getTaskProposalReplacementString elementName hasNestedElements replacementOffset cursorPosition aPrefix replacementLength aPrefix replacementOffset charAt replacementOffset replacementOffset replacementLength proposalCursorPosition hasNestedElements proposalCursorPosition elementName additionalProposalOffset additionalProposalOffset additionalProposalOffset additionalProposalOffset proposalCursorPosition elementName additionalProposalOffset AntCompletionProposal replacementString replacementOffset replacementLength proposalCursorPosition proposalImage elementName proposalInfo AntCompletionProposal TASK_PROPOSAL
Returns the one possible completion for the specified unclosed task param open Element Name the task that hasn t been closed last param prefix The prefix that the one possible proposal should start with The prefix may be an empty string return the proposal or code null code if no closing proposal available private I Completion Proposal get Closing Task Proposal String open Element Name String prefix boolean closing Mode char previous Char get Previous Char I Completion Proposal proposal null if open Element Name null if prefix length 0 open Element Name to Lower Case starts With prefix String Buffer replace String new String Buffer if closing Mode if previous Char if previous Char replace String append replace String append replace String append open Element Name replace String append String Buffer display String new String Buffer NON NLS 1 display String append open Element Name display String append proposal new Ant Completion Proposal replace String to String cursor Position prefix length prefix length replace String length null display String to String Ant Editor Messages get String Ant Editor Completion Processor 39 Ant Completion Proposal TAG CLOSING PROPOSAL NON NLS 1 return proposal  openElementName ICompletionProposal getClosingTaskProposal openElementName closingMode previousChar getPreviousChar ICompletionProposal openElementName openElementName toLowerCase startsWith StringBuffer replaceString StringBuffer closingMode previousChar previousChar replaceString replaceString replaceString openElementName replaceString StringBuffer displayString StringBuffer displayString openElementName displayString AntCompletionProposal replaceString toString cursorPosition replaceString displayString toString AntEditorMessages getString AntEditorCompletionProcessor AntCompletionProposal TAG_CLOSING_PROPOSAL
protected char get Previous Char I Text Selection selection I Text Selection viewer get Selection Provider get Selection int offset selection get Offset char previous Char try previous Char viewer get Document get Char offset 1 catch Bad Location Exception e return previous Char  getPreviousChar ITextSelection ITextSelection getSelectionProvider getSelection getOffset previousChar previousChar getDocument getChar BadLocationException previousChar
Returns the replacement string for the specified task name private String get Task Proposal Replacement String String a Task Name boolean has Nested String Buffer replacement new String Buffer NON NLS 1 replacement append a Task Name Node attribute Node description Provider get Attributes Node a Task Name if attribute Node null append Required Attributes replacement attribute Node else if project equals a Task Name NON NLS 1 replacement append default NON NLS 1 additional Proposal Offset 9 if has Nested replacement append NON NLS 1 replacement append a Task Name replacement append else replacement append NON NLS 1 return replacement to String  getTaskProposalReplacementString aTaskName hasNested StringBuffer StringBuffer aTaskName attributeNode descriptionProvider getAttributesNode aTaskName attributeNode appendRequiredAttributes attributeNode aTaskName additionalProposalOffset hasNested aTaskName toString
private void append Required Attributes String Buffer replacement Node attribute Node boolean required Added false Node List attributes attribute Node get Child Nodes String required Node attribute for int i 0 i attributes get Length i attribute attributes item i required description Provider get Required Of Node attribute if required equals Ignore Case yes NON NLS 1 String attribute Name description Provider get Task Attribute Name attribute replacement append replacement append attribute Name replacement append NON NLS 1 if required Added additional Proposal Offset attribute Name length 2 required Added true  appendRequiredAttributes StringBuffer attributeNode requiredAdded NodeList attributeNode getChildNodes getLength descriptionProvider getRequiredOfNode equalsIgnoreCase attributeName descriptionProvider getTaskAttributeName attributeName requiredAdded additionalProposalOffset attributeName requiredAdded
Returns whether the named element supports nested elements private boolean has Nested Elements String element Name I Element element dtd get Element element Name if element null return element is Empty Class task Class get Task Class element Name if task Class null Introspection Helper helper get Introspection Helper task Class if helper null Enumeration nested helper get Nested Elements return nested has More Elements return false  hasNestedElements elementName IElement getElement elementName isEmpty taskClass getTaskClass elementName taskClass IntrospectionHelper getIntrospectionHelper taskClass getNestedElements hasMoreElements
Finds a direct child element with code a Child Element Name code of code an Element code P The child will not be searched for in the whole hierarchy but only in the hierarchy step below return the found child or code null code if not found protected Element find Child Element Named Of Element an Element String a Child Element Name Node List node List an Element get Child Nodes for int i 0 i node List get Length i Node child Node node List item i if child Node get Node Type Node ELEMENT NODE if child Node get Node Name equals a Child Element Name return Element child Node return null  aChildElementName anElement findChildElementNamedOf anElement aChildElementName NodeList nodeList anElement getChildNodes nodeList getLength childNode nodeList childNode getNodeType ELEMENT_NODE childNode getNodeName aChildElementName childNode
Determines the current prefix that should be used for completion private String get Current Prefix if current Prefix null return current Prefix I Text Selection selection I Text Selection viewer get Selection Provider get Selection I Document doc viewer get Document return get Prefix From Document doc get selection get Offset selection get Length to Lower Case  getCurrentPrefix currentPrefix currentPrefix ITextSelection ITextSelection getSelectionProvider getSelection IDocument getDocument getPrefixFromDocument getOffset getLength toLowerCase
Returns the prefix in the specified document text with respect to the specified offset param a Document Text the whole content of the edited file as String param an Offset the cursor position protected String get Prefix From Document String a Document Text int an Offset if current Prefix null return current Prefix int start Of Word Token an Offset char token a if start Of Word Token 0 token a Document Text char At start Of Word Token 1 while start Of Word Token 0 Character is Java Identifier Part token token token token token start Of Word Token if start Of Word Token 0 break word goes right to the beginning of the doc token a Document Text char At start Of Word Token 1 if start Of Word Token an Offset current Prefix a Document Text substring start Of Word Token an Offset to Lower Case else current Prefix NON NLS 1 return current Prefix  aDocumentText anOffset getPrefixFromDocument aDocumentText anOffset currentPrefix currentPrefix startOfWordToken anOffset startOfWordToken aDocumentText charAt startOfWordToken startOfWordToken isJavaIdentifierPart startOfWordToken startOfWordToken aDocumentText charAt startOfWordToken startOfWordToken anOffset currentPrefix aDocumentText startOfWordToken anOffset toLowerCase currentPrefix currentPrefix
Returns the current proposal mode protected int determine Proposal Mode I Document document int a Cursor Position String a Prefix if current Proposal Mode 1 return current Proposal Mode if ant Model null ant Model get Project Node null return PROPOSAL MODE BUILDFILE if document get Length 0 document get Length 1 document get equals NON NLS 1 return PROPOSAL MODE BUILDFILE String from beginning of document to the beginning of the prefix String text document get String string To Prefix text substring 0 a Cursor Position a Prefix length if string To Prefix length 0 return PROPOSAL MODE BUILDFILE Is trimmable from behind String trimmed String string To Prefix trim char last Char 0 if trimmed String length 0 last Char trimmed String char At trimmed String length 1 else return PROPOSAL MODE TASK PROPOSAL if string To Prefix char At string To Prefix length 1 last Char last Char last Char Substring must be trimmable from behind in case of attribute proposal because a space or a new line must be used as delimiter between task name and attribute or attribute and attribute Example property id bla name hups Attribute proposal if last Char last Char String task String get Task String From Document String To Prefix trimmed String if task String null is Known Element task String return PROPOSAL MODE ATTRIBUTE PROPOSAL else if string To Prefix char At string To Prefix length 1 trimmed String char At trimmed String length 1 Attribute value proposal String task String get Task String From Document String To Prefix trimmed String if task String null is Known Element task String return PROPOSAL MODE ATTRIBUTE VALUE PROPOSAL else Possibly a Task proposal int space Index string To Prefix last Index Of int less Than Index string To Prefix last Index Of int greater Than Index string To Prefix last Index Of Task proposal if less Than Index space Index greater Than Index less Than Index int slash Index string To Prefix last Index Of if slash Index less Than Index 1 return PROPOSAL MODE TASK PROPOSAL CLOSING return PROPOSAL MODE TASK PROPOSAL if less Than Index greater Than Index if is Property Proposal Mode string To Prefix return PROPOSAL MODE PROPERTY PROPOSAL return PROPOSAL MODE TASK PROPOSAL Property proposal if is Property Proposal Mode string To Prefix return PROPOSAL MODE PROPERTY PROPOSAL return PROPOSAL MODE NONE  determineProposalMode IDocument aCursorPosition aPrefix currentProposalMode currentProposalMode antModel antModel getProjectNode PROPOSAL_MODE_BUILDFILE getLength getLength PROPOSAL_MODE_BUILDFILE stringToPrefix aCursorPosition aPrefix stringToPrefix PROPOSAL_MODE_BUILDFILE trimmedString stringToPrefix lastChar trimmedString lastChar trimmedString charAt trimmedString PROPOSAL_MODE_TASK_PROPOSAL stringToPrefix charAt stringToPrefix lastChar lastChar lastChar lastChar lastChar taskString getTaskStringFromDocumentStringToPrefix trimmedString taskString isKnownElement taskString PROPOSAL_MODE_ATTRIBUTE_PROPOSAL stringToPrefix charAt stringToPrefix trimmedString charAt trimmedString taskString getTaskStringFromDocumentStringToPrefix trimmedString taskString isKnownElement taskString PROPOSAL_MODE_ATTRIBUTE_VALUE_PROPOSAL spaceIndex stringToPrefix lastIndexOf lessThanIndex stringToPrefix lastIndexOf greaterThanIndex stringToPrefix lastIndexOf lessThanIndex spaceIndex greaterThanIndex lessThanIndex slashIndex stringToPrefix lastIndexOf slashIndex lessThanIndex PROPOSAL_MODE_TASK_PROPOSAL_CLOSING PROPOSAL_MODE_TASK_PROPOSAL lessThanIndex greaterThanIndex isPropertyProposalMode stringToPrefix PROPOSAL_MODE_PROPERTY_PROPOSAL PROPOSAL_MODE_TASK_PROPOSAL isPropertyProposalMode stringToPrefix PROPOSAL_MODE_PROPERTY_PROPOSAL PROPOSAL_MODE_NONE
private boolean is Property Proposal Mode String string To Prefix if string To Prefix length 2 String last Two Chars string To Prefix substring string To Prefix length 2 string To Prefix length if last Two Chars equals NON NLS 1 string To Prefix char At string To Prefix length 1 return true return false  isPropertyProposalMode stringToPrefix stringToPrefix lastTwoChars stringToPrefix stringToPrefix stringToPrefix lastTwoChars stringToPrefix charAt stringToPrefix
Returns the last occuring task string in the specified string P The returned string must not necessarily be a valid Ant task string This can be tested with the method code in Named Task Known String code after invoking this method param a Document String To Prefix the String that contains the whole string of the currently edited file from the beginning up to the prefix for code completion Example project default name property return the extracted task string or code null code if no string could be extracted private String get Task String From Document String To Prefix String a Document String To Prefix int less Than Index a Document String To Prefix last Index Of if less Than Index 1 String task String a Document String To Prefix trim task String task String substring less Than Index 1 task String length int index task String index Of if index 0 task String task String substring 0 index index task String index Of n if index 0 task String task String substring 0 index index task String index Of r if index 0 task String task String substring 0 index return task String return null  inNamedTaskKnown aDocumentStringToPrefix getTaskStringFromDocumentStringToPrefix aDocumentStringToPrefix lessThanIndex aDocumentStringToPrefix lastIndexOf lessThanIndex taskString aDocumentStringToPrefix taskString taskString lessThanIndex taskString taskString indexOf taskString taskString taskString indexOf taskString taskString taskString indexOf taskString taskString taskString
Returns the last occuring attribute string in the specified string P Calling this method is only safe if the current proposal mode is really code PROPOSAL MODE ATTRIBUTE VALUE PROPOSAL code private String get Attribute String From Document String To Prefix String doc String To Prefix int index doc String To Prefix last Index Of String sub String doc String To Prefix substring 0 index sub String sub String trim index sub String last Index Of if index 0 sub String sub String substring index 1 sub String length index sub String last Index Of n if index 0 sub String sub String substring index 1 sub String length index sub String last Index Of r if index 0 sub String sub String substring index 1 sub String length return trim Beginning sub String  PROPOSAL_MODE_ATTRIBUTE_VALUE_PROPOSAL getAttributeStringFromDocumentStringToPrefix docStringToPrefix docStringToPrefix lastIndexOf subString docStringToPrefix subString subString subString lastIndexOf subString subString subString subString lastIndexOf subString subString subString subString lastIndexOf subString subString subString trimBeginning subString
private String trim Beginning String to Be Trimmed int i 0 while i to Be Trimmed length Character is Whitespace to Be Trimmed char At i i return to Be Trimmed substring i  trimBeginning toBeTrimmed toBeTrimmed isWhitespace toBeTrimmed charAt toBeTrimmed
Returns whether the specified element name is known protected boolean is Known Element String element Name if element Name equals target element Name equals project NON NLS 1 NON NLS 2 return true Ant Project Node node ant Model get Project Node if node null Project ant Project node get Project if Component Helper get Component Helper ant Project get Definition element Name null return true not everything is a task or type nested elements if dtd get Element element Name null return true if get Nested Type null return true return false  isKnownElement elementName elementName elementName AntProjectNode antModel getProjectNode antProject getProject ComponentHelper getComponentHelper antProject getDefinition elementName getElement elementName getNestedType
private Class get Task Class String task Name Ant Project Node node ant Model get Project Node if node null Project ant Project node get Project Map tasks And Types Component Helper get Component Helper ant Project get Ant Type Table return Class tasks And Types get task Name return null  getTaskClass taskName AntProjectNode antModel getProjectNode antProject getProject tasksAndTypes ComponentHelper getComponentHelper antProject getAntTypeTable tasksAndTypes taskName
Finds the parent task element in respect to the cursor position return the parent task element or code null code if not found protected String get Parent Name I Document document int a Line Number int a Column Number if document get Length 0 return null Ant Project Node project ant Model get Project Node if project null return null int offset get Offset document a Line Number a Column Number if offset 1 return null Ant Element Node node project get Node offset if node null node ant Model get Open Element if node null return NON NLS 1 else if node instanceof Ant Task Node String name node get Name if offset node get Offset name length 1 not really the enclosing node as the offset is within the name of the node node node get Parent Node else return name if node instanceof Ant Task Node return node get Name else if node instanceof Ant Target Node return target NON NLS 1 else return project NON NLS 1  getParentName IDocument aLineNumber aColumnNumber getLength AntProjectNode antModel getProjectNode getOffset aLineNumber aColumnNumber AntElementNode getNode antModel getOpenElement AntTaskNode getName getOffset getParentNode AntTaskNode getName AntTargetNode
Return the properties as defined in the entire buildfile return a map with all the found properties private Map find Properties From Document Project project ant Model get Project Node get Project return project get Properties  findPropertiesFromDocument antModel getProjectNode getProject getProperties
private Map get Targets Project project ant Model get Project Node get Project return project get Targets  getTargets antModel getProjectNode getProject getTargets
protected File get Edited File I Workbench Page page AntUI Plugin get Active Page if page null return null I Editor Part editor page get Active Editor if editor null return null File Editor Input input File Editor Input editor get Editor Input String project Path input get File get Project get Location to File get Absolute Path String project Relative File Path input get File get Full Path remove First Segments 1 make Relative to String return new File project Path File separator project Relative File Path  getEditedFile IWorkbenchPage AntUIPlugin getActivePage IEditorPart getActiveEditor FileEditorInput FileEditorInput getEditorInput projectPath getFile getProject getLocation toFile getAbsolutePath projectRelativeFilePath getFile getFullPath removeFirstSegments makeRelative toString projectPath projectRelativeFilePath
private String get Open Element Name Ant Element Node node ant Model get Open Element if node null return null return node get Name  getOpenElementName AntElementNode antModel getOpenElement getName
Finds the enclosing target in respect to the cursor position and returns its name return the name of the enclosing target or code null code if not found or the element is not contained in a target private String get Enclosing Target Name I Document document int a Line Number int a Column Number Ant Project Node project ant Model get Project Node int offset get Offset document a Line Number a Column Number if offset 1 return null Ant Element Node node project get Node offset if node instanceof Ant Task Node node node get Parent Node if node instanceof Ant Target Node top level task node null else if node instanceof Ant Project Node node null String target Name null if node null target Name Ant Target Node node get Target get Name null target Name length 0 return null return target Name  getEnclosingTargetName IDocument aLineNumber aColumnNumber AntProjectNode antModel getProjectNode getOffset aLineNumber aColumnNumber AntElementNode getNode AntTaskNode getParentNode AntTargetNode AntProjectNode targetName targetName AntTargetNode getTarget getName targetName targetName
private int get Offset I Document document int line int column try return document get Line Offset line column 1 catch Bad Location Exception e return 1  getOffset IDocument getLineOffset BadLocationException
Sets this processor s set of characters triggering the activation of the completion proposal computation param activation Set the activation set public void set Completion Proposal Auto Activation Characters char activation Set auto Activation Chars activation Set  activationSet setCompletionProposalAutoActivationCharacters activationSet autoActivationChars activationSet
see org eclipse jface text templates Template Completion Processor extract Prefix org eclipse jface text I Text Viewer int protected String extract Prefix I Text Viewer text Viewer int offset return get Prefix From Document text Viewer get Document get offset  TemplateCompletionProcessor extractPrefix ITextViewer extractPrefix ITextViewer textViewer getPrefixFromDocument textViewer getDocument
Cut out angular brackets for relevance sorting since the template name does not contain the brackets protected int get Relevance Template template String prefix if prefix starts With NON NLS 1 prefix prefix substring 1 if template get Name starts With prefix return 90 return 0  getRelevance startsWith getName startsWith
see org eclipse jface text templates Template Completion Processor get Templates java lang String protected Template get Templates String context Type Id return Ant Template Access get Default get Template Store get Templates  TemplateCompletionProcessor getTemplates getTemplates contextTypeId AntTemplateAccess getDefault getTemplateStore getTemplates
protected Template Context Type get Context Type I Text Viewer text Viewer I Region region switch determine Proposal Mode text Viewer get Document cursor Position get Current Prefix case PROPOSAL MODE TASK PROPOSAL return Ant Template Access get Default get Context Type Registry get Context Type Task Context Type TASK CONTEXT TYPE case PROPOSAL MODE BUILDFILE return Ant Template Access get Default get Context Type Registry get Context Type Build File Context Type BUILDFILE CONTEXT TYPE case PROPOSAL MODE NONE case PROPOSAL MODE ATTRIBUTE PROPOSAL case PROPOSAL MODE TASK PROPOSAL CLOSING case PROPOSAL MODE ATTRIBUTE VALUE PROPOSAL case PROPOSAL MODE PROPERTY PROPOSAL default return null  TemplateContextType getContextType ITextViewer textViewer IRegion determineProposalMode textViewer getDocument cursorPosition getCurrentPrefix PROPOSAL_MODE_TASK_PROPOSAL AntTemplateAccess getDefault getContextTypeRegistry getContextType TaskContextType TASK_CONTEXT_TYPE PROPOSAL_MODE_BUILDFILE AntTemplateAccess getDefault getContextTypeRegistry getContextType BuildFileContextType BUILDFILE_CONTEXT_TYPE PROPOSAL_MODE_NONE PROPOSAL_MODE_ATTRIBUTE_PROPOSAL PROPOSAL_MODE_TASK_PROPOSAL_CLOSING PROPOSAL_MODE_ATTRIBUTE_VALUE_PROPOSAL PROPOSAL_MODE_PROPERTY_PROPOSAL
see org eclipse jface text templates Template Completion Processor get Image org eclipse jface text templates Template protected Image get Image Template template return AntUI Images get Image I AntUI Constants IMG TEMPLATE PROPOSAL  TemplateCompletionProcessor getImage getImage AntUIImages getImage IAntUIConstants IMG_TEMPLATE_PROPOSAL
protected Template Context create Context I Text Viewer context Viewer I Region region Template Context Type context Type get Context Type context Viewer region if context Type null I Document document context Viewer get Document return new Ant Context context Type document ant Model region get Offset region get Length return null  TemplateContext createContext ITextViewer contextViewer IRegion TemplateContextType contextType getContextType contextViewer contextType IDocument contextViewer getDocument AntContext contextType antModel getOffset getLength
see org eclipse jface text templates Template Completion Processor create Proposal org eclipse jface text templates Template org eclipse jface text templates Template Context org eclipse jface text Region int protected I Completion Proposal create Proposal Template template Template Context context Region region int relevance return new Ant Template Proposal template context region get Image template relevance  TemplateCompletionProcessor createProposal TemplateContext ICompletionProposal createProposal TemplateContext AntTemplateProposal getImage

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Ant Editor Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME AntEditorMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Creates an instance with the specified color manager public Ant Editor Source Viewer Configuration Ant Editor editor super f Editor editor  AntEditorSourceViewerConfiguration AntEditor fEditor
public I Content Assistant get Content Assistant I Source Viewer source Viewer content Assistant new Content Assistant Ant Editor Completion Processor processor new Ant Editor Completion Processor f Editor get Ant Model content Assistant set Content Assist Processor processor I Document DEFAULT CONTENT TYPE content Assistant set Content Assist Processor processor Ant Editor Partition Scanner XML TAG I Preference Store store AntUI Plugin get Default get Preference Store String triggers store get String Ant Editor Preference Constants CODEASSIST AUTOACTIVATION TRIGGERS if triggers null processor set Completion Proposal Auto Activation Characters triggers to Char Array content Assistant enable Auto Insert store get Boolean Ant Editor Preference Constants CODEASSIST AUTOINSERT content Assistant enable Auto Activation store get Boolean Ant Editor Preference Constants CODEASSIST AUTOACTIVATION content Assistant set Auto Activation Delay store get Int Ant Editor Preference Constants CODEASSIST AUTOACTIVATION DELAY content Assistant set Proposal Popup Orientation I Content Assistant PROPOSAL OVERLAY content Assistant set Context Information Popup Orientation I Content Assistant CONTEXT INFO ABOVE content Assistant set Information Control Creator get Information Control Creator source Viewer Color Manager manager Color Manager get Default Color background get Color store Ant Editor Preference Constants CODEASSIST PROPOSALS BACKGROUND manager content Assistant set Context Information Popup Background background content Assistant set Context Selector Background background content Assistant set Proposal Selector Background background Color foreground get Color store Ant Editor Preference Constants CODEASSIST PROPOSALS FOREGROUND manager content Assistant set Context Information Popup Foreground foreground content Assistant set Context Selector Foreground foreground content Assistant set Proposal Selector Foreground foreground I Information Control Creator creator get Information Control Creator true content Assistant set Information Control Creator creator return content Assistant  IContentAssistant getContentAssistant ISourceViewer sourceViewer contentAssistant ContentAssistant AntEditorCompletionProcessor AntEditorCompletionProcessor fEditor getAntModel contentAssistant setContentAssistProcessor IDocument DEFAULT_CONTENT_TYPE contentAssistant setContentAssistProcessor AntEditorPartitionScanner XML_TAG IPreferenceStore AntUIPlugin getDefault getPreferenceStore getString AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION_TRIGGERS setCompletionProposalAutoActivationCharacters toCharArray contentAssistant enableAutoInsert getBoolean AntEditorPreferenceConstants CODEASSIST_AUTOINSERT contentAssistant enableAutoActivation getBoolean AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION contentAssistant setAutoActivationDelay getInt AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION_DELAY contentAssistant setProposalPopupOrientation IContentAssistant PROPOSAL_OVERLAY contentAssistant setContextInformationPopupOrientation IContentAssistant CONTEXT_INFO_ABOVE contentAssistant setInformationControlCreator getInformationControlCreator sourceViewer ColorManager ColorManager getDefault getColor AntEditorPreferenceConstants CODEASSIST_PROPOSALS_BACKGROUND contentAssistant setContextInformationPopupBackground contentAssistant setContextSelectorBackground contentAssistant setProposalSelectorBackground getColor AntEditorPreferenceConstants CODEASSIST_PROPOSALS_FOREGROUND contentAssistant setContextInformationPopupForeground contentAssistant setContextSelectorForeground contentAssistant setProposalSelectorForeground IInformationControlCreator getInformationControlCreator contentAssistant setInformationControlCreator contentAssistant
protected I Information Control Creator get Information Control Creator final boolean cut Down return new I Information Control Creator public I Information Control create Information Control Shell parent int style cut Down SWT NONE SWT V SCROLL SWT H SCROLL return new Default Information Control parent style new HTML Text Presenter cut Down  IInformationControlCreator getInformationControlCreator cutDown IInformationControlCreator IInformationControl createInformationControl cutDown V_SCROLL H_SCROLL DefaultInformationControl HTMLTextPresenter cutDown
protected I Information Control Creator get Information Control Creator final boolean cut Down return new I Information Control Creator public I Information Control create Information Control Shell parent int style cut Down SWT NONE SWT V SCROLL SWT H SCROLL return new Default Information Control parent style new HTML Text Presenter cut Down  IInformationControlCreator getInformationControlCreator cutDown IInformationControlCreator IInformationControl createInformationControl cutDown V_SCROLL H_SCROLL DefaultInformationControl HTMLTextPresenter cutDown
public I Reconciler get Reconciler I Source Viewer source Viewer Notifying Reconciler reconciler new Notifying Reconciler new XML Reconciling Strategy f Editor true reconciler set Delay XML Reconciling Strategy DELAY reconciler add Reconciling Participant f Editor return reconciler  IReconciler getReconciler ISourceViewer sourceViewer NotifyingReconciler NotifyingReconciler XMLReconcilingStrategy fEditor setDelay XMLReconcilingStrategy addReconcilingParticipant fEditor
see org eclipse jface text source Source Viewer Configuration get Annotation Hover org eclipse jface text source I Source Viewer public I Annotation Hover get Annotation Hover I Source Viewer source Viewer return new XML Annotation Hover  SourceViewerConfiguration getAnnotationHover ISourceViewer IAnnotationHover getAnnotationHover ISourceViewer sourceViewer XMLAnnotationHover
see org eclipse jface text source Source Viewer Configuration get Information Control Creator org eclipse jface text source I Source Viewer public I Information Control Creator get Information Control Creator I Source Viewer source Viewer return get Information Control Creator true  SourceViewerConfiguration getInformationControlCreator ISourceViewer IInformationControlCreator getInformationControlCreator ISourceViewer sourceViewer getInformationControlCreator
public I Text Hover get Text Hover I Source Viewer source Viewer String content Type if f Text Hover null f Text Hover new XML Text Hover f Editor return f Text Hover  ITextHover getTextHover ISourceViewer sourceViewer contentType fTextHover fTextHover XMLTextHover fEditor fTextHover
private Color get Color I Preference Store store String key Color Manager manager RGB rgb Preference Converter get Color store key return manager get Color rgb  getColor IPreferenceStore ColorManager PreferenceConverter getColor getColor
protected void change Configuration Property Change Event event I Preference Store store AntUI Plugin get Default get Preference Store String p event get Property Color Manager manager Color Manager get Default if Ant Editor Preference Constants CODEASSIST AUTOACTIVATION equals p boolean enabled store get Boolean Ant Editor Preference Constants CODEASSIST AUTOACTIVATION content Assistant enable Auto Activation enabled else if Ant Editor Preference Constants CODEASSIST AUTOACTIVATION DELAY equals p content Assistant null int delay store get Int Ant Editor Preference Constants CODEASSIST AUTOACTIVATION DELAY content Assistant set Auto Activation Delay delay else if Ant Editor Preference Constants CODEASSIST PROPOSALS FOREGROUND equals p content Assistant null Color c get Color store Ant Editor Preference Constants CODEASSIST PROPOSALS FOREGROUND manager content Assistant set Proposal Selector Foreground c else if Ant Editor Preference Constants CODEASSIST PROPOSALS BACKGROUND equals p content Assistant null Color c get Color store Ant Editor Preference Constants CODEASSIST PROPOSALS BACKGROUND manager content Assistant set Proposal Selector Background c else if Ant Editor Preference Constants CODEASSIST AUTOINSERT equals p content Assistant null boolean enabled store get Boolean Ant Editor Preference Constants CODEASSIST AUTOINSERT content Assistant enable Auto Insert enabled else if Ant Editor Preference Constants CODEASSIST AUTOACTIVATION TRIGGERS equals p change Content Assist Processor store  changeConfiguration PropertyChangeEvent IPreferenceStore AntUIPlugin getDefault getPreferenceStore getProperty ColorManager ColorManager getDefault AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION getBoolean AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION contentAssistant enableAutoActivation AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION_DELAY contentAssistant getInt AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION_DELAY contentAssistant setAutoActivationDelay AntEditorPreferenceConstants CODEASSIST_PROPOSALS_FOREGROUND contentAssistant getColor AntEditorPreferenceConstants CODEASSIST_PROPOSALS_FOREGROUND contentAssistant setProposalSelectorForeground AntEditorPreferenceConstants CODEASSIST_PROPOSALS_BACKGROUND contentAssistant getColor AntEditorPreferenceConstants CODEASSIST_PROPOSALS_BACKGROUND contentAssistant setProposalSelectorBackground AntEditorPreferenceConstants CODEASSIST_AUTOINSERT contentAssistant getBoolean AntEditorPreferenceConstants CODEASSIST_AUTOINSERT contentAssistant enableAutoInsert AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION_TRIGGERS changeContentAssistProcessor
private void change Content Assist Processor I Preference Store store String triggers store get String Ant Editor Preference Constants CODEASSIST AUTOACTIVATION TRIGGERS if triggers null Ant Editor Completion Processor cp Ant Editor Completion Processor content Assistant get Content Assist Processor I Document DEFAULT CONTENT TYPE if cp null cp set Completion Proposal Auto Activation Characters triggers to Char Array  changeContentAssistProcessor IPreferenceStore getString AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION_TRIGGERS AntEditorCompletionProcessor AntEditorCompletionProcessor contentAssistant getContentAssistProcessor IDocument DEFAULT_CONTENT_TYPE setCompletionProposalAutoActivationCharacters toCharArray
public I Content Formatter get Content Formatter I Source Viewer source Viewer Multi Pass Content Formatter formatter new Multi Pass Content Formatter get Configured Document Partitioning source Viewer I Document DEFAULT CONTENT TYPE formatter set Master Strategy new Xml Document Formatting Strategy formatter set Slave Strategy new Xml Element Formatting Strategy Ant Editor Partition Scanner XML TAG formatter set Slave Strategy new Xml Comment Formatting Strategy Ant Editor Partition Scanner XML COMMENT return formatter  IContentFormatter getContentFormatter ISourceViewer sourceViewer MultiPassContentFormatter MultiPassContentFormatter getConfiguredDocumentPartitioning sourceViewer IDocument DEFAULT_CONTENT_TYPE setMasterStrategy XmlDocumentFormattingStrategy setSlaveStrategy XmlElementFormattingStrategy AntEditorPartitionScanner XML_TAG setSlaveStrategy XmlCommentFormattingStrategy AntEditorPartitionScanner XML_COMMENT
public I Auto Indent Strategy get Auto Indent Strategy I Source Viewer source Viewer String content Type if Ant Editor Partition Scanner XML COMMENT equals content Type return super get Auto Indent Strategy source Viewer content Type if auto Indent Strategy null auto Indent Strategy new Ant Auto Indent Strategy f Editor get Ant Model return auto Indent Strategy  IAutoIndentStrategy getAutoIndentStrategy ISourceViewer sourceViewer contentType AntEditorPartitionScanner XML_COMMENT contentType getAutoIndentStrategy sourceViewer contentType autoIndentStrategy autoIndentStrategy AntAutoIndentStrategy fEditor getAntModel autoIndentStrategy

Transforms the html text from the reader to formatted text param presentation If not code null code formattings will be applied to the presentation public HTML2 Text Reader Reader reader Text Presentation presentation super new Pushback Reader reader f Text Presentation presentation  HTML2TextReader TextPresentation PushbackReader fTextPresentation
public int read throws IO Exception int c super read if c 1 f Counter return c  IOException fCounter
protected void start Bold if f Bold 0 f Start Offset f Counter f Bold  startBold fBold fStartOffset fCounter fBold
protected void start Preformatted Text f Is Preformatted Text true set Skip Whitespace false  startPreformattedText fIsPreformattedText setSkipWhitespace
protected void stop Preformatted Text f Is Preformatted Text false set Skip Whitespace true  stopPreformattedText fIsPreformattedText setSkipWhitespace
protected void stop Bold f Bold if f Bold 0 if f Text Presentation null f Text Presentation add Style Range new Style Range f Start Offset f Counter f Start Offset null null SWT BOLD f Start Offset 1  stopBold fBold fBold fTextPresentation fTextPresentation addStyleRange StyleRange fStartOffset fCounter fStartOffset fStartOffset
see Substitution Text Reader compute Substitution char protected String compute Substitution int c throws IO Exception if c return processHTML Tag else if c return process Entity else if f Is Preformatted Text return process Preformatted Text c return null  SubstitutionTextReader computeSubstitution computeSubstitution IOException processHTMLTag processEntity fIsPreformattedText processPreformattedText
private String html2 Text String html String tag html if tag char At 0 tag tag substring 1 if fg Tags contains tag return EMPTY STRING if pre equals html NON NLS 1 start Preformatted Text return EMPTY STRING if pre equals html NON NLS 1 stop Preformatted Text return EMPTY STRING if f Is Preformatted Text return EMPTY STRING if b equals html NON NLS 1 start Bold return EMPTY STRING if h5 equals html dt equals html NON NLS 1 NON NLS 2 start Bold return EMPTY STRING if dl equals html NON NLS 1 return LINE DELIM if dd equals html NON NLS 1 return t NON NLS 1 if li equals html NON NLS 1 return LINE DELIM t NON NLS 1 if b equals html NON NLS 1 stop Bold return EMPTY STRING if p equals html NON NLS 1 f In Paragraph true return LINE DELIM if br equals html NON NLS 1 return LINE DELIM if p equals html NON NLS 1 boolean in Paragraph f In Paragraph f In Paragraph false return in Paragraph EMPTY STRING LINE DELIM if h5 equals html dt equals html NON NLS 1 NON NLS 2 stop Bold return LINE DELIM if dd equals html NON NLS 1 return LINE DELIM return EMPTY STRING  html2Text charAt fgTags EMPTY_STRING startPreformattedText EMPTY_STRING stopPreformattedText EMPTY_STRING fIsPreformattedText EMPTY_STRING startBold EMPTY_STRING startBold EMPTY_STRING LINE_DELIM LINE_DELIM stopBold EMPTY_STRING fInParagraph LINE_DELIM LINE_DELIM inParagraph fInParagraph fInParagraph inParagraph EMPTY_STRING LINE_DELIM stopBold LINE_DELIM LINE_DELIM EMPTY_STRING
private String processHTML Tag throws IO Exception String Buffer buf new String Buffer int ch do ch next Char while ch 1 ch buf append Character to Lower Case char ch ch next Char if ch buf append Character to Lower Case char ch ch next Char while ch 1 ch buf append Character to Lower Case char ch ch next Char if ch unread ch return buf to String if ch 1 return null int tag Len buf length needs special treatment for comments if tag Len 3 equals buf substring 0 3 NON NLS 1 tag Len 5 equals buf substring tag Len 3 NON NLS 1 unfinished comment buf append ch else break while true return html2 Text buf to String  processHTMLTag IOException StringBuffer StringBuffer nextChar toLowerCase nextChar toLowerCase nextChar toLowerCase nextChar toString tagLen tagLen tagLen tagLen html2Text toString
private String process Preformatted Text int c if c r c n f Counter return null  processPreformattedText fCounter
private void unread int ch throws IO Exception Pushback Reader get Reader unread ch  IOException PushbackReader getReader
protected String entity2 Text String symbol if symbol length 1 symbol char At 0 int ch try if symbol char At 1 x ch Integer parse Int symbol substring 2 16 else ch Integer parse Int symbol substring 1 10 return EMPTY STRING char ch catch Number Format Exception e else String str String fg Entity Lookup get symbol if str null return str return symbol not found NON NLS 1  entity2Text charAt charAt parseInt parseInt EMPTY_STRING NumberFormatException fgEntityLookup
private String process Entity throws IO Exception String Buffer buf new String Buffer int ch next Char while Character is Letter Or Digit char ch ch buf append char ch ch next Char if ch return entity2 Text buf to String buf insert 0 if ch 1 buf append char ch return buf to String  processEntity IOException StringBuffer StringBuffer nextChar isLetterOrDigit nextChar entity2Text toString toString

public class HTML Printer private HTML Printer  HTMLPrinter HTMLPrinter
private static String replace String text char c String s int previous 0 int current text index Of c previous if current 1 return text String Buffer buffer new String Buffer while current 1 buffer append text substring previous current buffer append s previous current 1 current text index Of c previous buffer append text substring previous return buffer to String  indexOf StringBuffer StringBuffer indexOf toString
public static String convert ToHTML Content String content content replace content lt NON NLS 1 return replace content gt NON NLS 1  convertToHTMLContent
public static String read Reader rd String Buffer buffer new String Buffer char read Buffer new char 2048 try int n rd read read Buffer while n 0 buffer append read Buffer 0 n n rd read read Buffer return buffer to String catch IO Exception x return null  StringBuffer StringBuffer readBuffer readBuffer readBuffer readBuffer toString IOException
public static void insert Page Prolog String Buffer buffer int position buffer insert position html body text 000000 bgcolor FFFF88 font size 1 NON NLS 1  insertPageProlog StringBuffer
public static void add Page Prolog String Buffer buffer insert Page Prolog buffer buffer length  addPageProlog StringBuffer insertPageProlog
public static void add Page Epilog String Buffer buffer buffer append font body html NON NLS 1  addPageEpilog StringBuffer
public static void start Bullet List String Buffer buffer buffer append ul NON NLS 1  startBulletList StringBuffer
public static void end Bullet List String Buffer buffer buffer append ul NON NLS 1  endBulletList StringBuffer
public static void add Bullet String Buffer buffer String bullet if bullet null buffer append li NON NLS 1 buffer append bullet buffer append li NON NLS 1  addBullet StringBuffer
public static void add Small Header String Buffer buffer String header if header null buffer append h5 NON NLS 1 buffer append header buffer append h5 NON NLS 1  addSmallHeader StringBuffer
public static void add Paragraph String Buffer buffer String paragraph if paragraph null buffer append p NON NLS 1 buffer append paragraph  addParagraph StringBuffer
public static void add Paragraph String Buffer buffer Reader paragraph Reader if paragraph Reader null add Paragraph buffer read paragraph Reader  addParagraph StringBuffer paragraphReader paragraphReader addParagraph paragraphReader

private boolean f Enforce Upper Line Limit public HTML Text Presenter boolean enforce Upper Line Limit super f Enforce Upper Line Limit enforce Upper Line Limit  fEnforceUpperLineLimit HTMLTextPresenter enforceUpperLineLimit fEnforceUpperLineLimit enforceUpperLineLimit
public HTML Text Presenter this true  HTMLTextPresenter
protected Reader create Reader String hover Info Text Presentation presentation return new HTML2 Text Reader new String Reader hover Info presentation  createReader hoverInfo TextPresentation HTML2TextReader StringReader hoverInfo
protected void adapt Text Presentation Text Presentation presentation int offset int insert Length int yours Start offset int yours End offset insert Length 1 yours End Math max yours Start yours End Iterator e presentation get All Style Range Iterator while e has Next Style Range range Style Range e next int my Start range start int my End range start range length 1 my End Math max my Start my End if my End yours Start continue if my Start yours Start range length insert Length else range start insert Length  adaptTextPresentation TextPresentation insertLength yoursStart yoursEnd insertLength yoursEnd yoursStart yoursEnd getAllStyleRangeIterator hasNext StyleRange StyleRange myStart myEnd myEnd myStart myEnd myEnd yoursStart myStart yoursStart insertLength insertLength
private void append String Buffer buffer String string Text Presentation presentation int length string length buffer append string if presentation null adapt Text Presentation presentation f Counter length f Counter length  StringBuffer TextPresentation adaptTextPresentation fCounter fCounter
private String get Indent String line int length line length int i 0 while i length Character is Whitespace line char At i i return i length line line substring 0 i NON NLS 1  getIndent isWhitespace charAt
public String update Presentation Display display String hover Info Text Presentation presentation int max Width int max Height if hover Info null return null GC gc new GC display try String Buffer buffer new String Buffer int max Number Of Lines Math round max Height gc get Font Metrics get Height f Counter 0 Line Breaking Reader reader new Line Breaking Reader create Reader hover Info presentation gc max Width boolean last Line Formatted false String last Line Indent null String line reader read Line boolean line Formatted reader is Formatted Line boolean first Line Processed false while line null if f Enforce Upper Line Limit max Number Of Lines 0 break if first Line Processed if last Line Formatted append buffer LINE DELIM null else append buffer LINE DELIM presentation if last Line Indent null append buffer last Line Indent presentation append buffer line null first Line Processed true last Line Formatted line Formatted if line Formatted last Line Indent null else if last Line Indent null last Line Indent get Indent line line reader read Line line Formatted reader is Formatted Line max Number Of Lines if line null append buffer LINE DELIM line Formatted presentation null append buffer presentation NON NLS 1 return trim buffer presentation catch IO Exception e AntUI Plugin log e return null finally gc dispose  updatePresentation hoverInfo TextPresentation maxWidth maxHeight hoverInfo StringBuffer StringBuffer maxNumberOfLines maxHeight getFontMetrics getHeight fCounter LineBreakingReader LineBreakingReader createReader hoverInfo maxWidth lastLineFormatted lastLineIndent readLine lineFormatted isFormattedLine firstLineProcessed fEnforceUpperLineLimit maxNumberOfLines firstLineProcessed lastLineFormatted LINE_DELIM LINE_DELIM lastLineIndent lastLineIndent firstLineProcessed lastLineFormatted lineFormatted lineFormatted lastLineIndent lastLineIndent lastLineIndent getIndent readLine lineFormatted isFormattedLine maxNumberOfLines LINE_DELIM lineFormatted IOException AntUIPlugin
private String trim String Buffer buffer Text Presentation presentation int length buffer length int end length 1 while end 0 Character is Whitespace buffer char At end end if end 1 return NON NLS 1 if end length 1 buffer delete end 1 length else end length int start 0 while start end Character is Whitespace buffer char At start start buffer delete 0 start presentation set Result Window new Region start buffer length return buffer to String  StringBuffer TextPresentation isWhitespace charAt isWhitespace charAt setResultWindow toString

Creates a reader that breaks an input text to fit in a given width param reader Reader of the input text param gc The graphic context that defines the currently used font sizes param max Line Width The max width pixes where the text has to fit in public Line Breaking Reader Reader reader GC gc int max Line Width f Reader new Buffered Reader reader fGC gc f Max Width max Line Width f Offset 0 f Line null f Line Break Iterator Break Iterator get Line Instance  maxLineWidth LineBreakingReader maxLineWidth fReader BufferedReader fMaxWidth maxLineWidth fOffset fLine fLineBreakIterator BreakIterator getLineInstance
public boolean is Formatted Line return f Line null  isFormattedLine fLine
Reads the next line The lengths of the line will not exceed the gived maximum width public String read Line throws IO Exception if f Line null String line f Reader read Line if line null return null int line Len fGC text Extent line x if line Len f Max Width return line f Line line f Line Break Iterator set Text line f Offset 0 int break Offset find Next Break Offset f Offset String res if break Offset Break Iterator DONE res f Line substring f Offset break Offset f Offset find Word Begin break Offset if f Offset f Line length f Line null else res f Line substring f Offset f Line null return res  readLine IOException fLine fReader readLine lineLen textExtent lineLen fMaxWidth fLine fLineBreakIterator setText fOffset breakOffset findNextBreakOffset fOffset breakOffset BreakIterator fLine fOffset breakOffset fOffset findWordBegin breakOffset fOffset fLine fLine fLine fOffset fLine
private int find Next Break Offset int curr Offset int curr Width 0 int next Offset f Line Break Iterator following curr Offset while next Offset Break Iterator DONE String word f Line substring curr Offset next Offset int word Width fGC text Extent word x int next Width word Width curr Width if next Width f Max Width if curr Width 0 return curr Offset return next Offset curr Width next Width curr Offset next Offset next Offset f Line Break Iterator next return next Offset  findNextBreakOffset currOffset currWidth nextOffset fLineBreakIterator currOffset nextOffset BreakIterator fLine currOffset nextOffset wordWidth textExtent nextWidth wordWidth currWidth nextWidth fMaxWidth currWidth currOffset nextOffset currWidth nextWidth currOffset nextOffset nextOffset fLineBreakIterator nextOffset
private int find Word Begin int idx while idx f Line length Character is Whitespace f Line char At idx idx return idx  findWordBegin fLine isWhitespace fLine charAt

public abstract class Single Char Reader extends Reader see Reader read public abstract int read throws IO Exception  SingleCharReader IOException
see Reader read char int int public int read char cbuf int off int len throws IO Exception int end off len for int i off i end i int ch read if ch 1 if i off return 1 return i off cbuf i char ch return len  IOException
see Reader ready public boolean ready throws IO Exception return true  IOException
Gets the content as a String public String get String throws IO Exception String Buffer buf new String Buffer int ch while ch read 1 buf append char ch return buf to String  getString IOException StringBuffer StringBuffer toString

protected Substitution Text Reader Reader reader f Reader reader f Buffer new String Buffer f Index 0 f Read From Buffer false f Char After White Space 1 f Was White Space true  SubstitutionTextReader fReader fBuffer StringBuffer fIndex fReadFromBuffer fCharAfterWhiteSpace fWasWhiteSpace
Implement to compute the substitution for the given character and if necessary subsequent characters Use code next Char code to read subsequent characters  nextChar
Returns the internal reader protected Reader get Reader return f Reader  getReader fReader
Returns the next character protected int next Char throws IO Exception f Read From Buffer f Buffer length 0 if f Read From Buffer char ch f Buffer char At f Index if f Index f Buffer length f Buffer set Length 0 f Index 0 return ch int ch f Char After White Space if ch 1 ch f Reader read if f Skip White Space Character is Whitespace char ch do ch f Reader read while Character is Whitespace char ch if ch 1 f Char After White Space ch return else f Char After White Space 1 return ch  nextChar IOException fReadFromBuffer fBuffer fReadFromBuffer fBuffer charAt fIndex fIndex fBuffer fBuffer setLength fIndex fCharAfterWhiteSpace fReader fSkipWhiteSpace isWhitespace fReader isWhitespace fCharAfterWhiteSpace fCharAfterWhiteSpace
see Reader read public int read throws IO Exception int c do c next Char while f Read From Buffer String s compute Substitution c if s null break if s length 0 f Buffer insert 0 s c next Char while f Skip White Space f Was White Space c f Was White Space c c r c n return c  IOException nextChar fReadFromBuffer computeSubstitution fBuffer nextChar fSkipWhiteSpace fWasWhiteSpace fWasWhiteSpace
see Reader ready public boolean ready throws IO Exception return f Reader ready  IOException fReader
see Reader close public void close throws IO Exception f Reader close  IOException fReader
see Reader reset public void reset throws IO Exception f Reader reset f Was White Space true f Char After White Space 1 f Buffer set Length 0 f Index 0  IOException fReader fWasWhiteSpace fCharAfterWhiteSpace fBuffer setLength fIndex
protected final void set Skip Whitespace boolean state f Skip White Space state  setSkipWhitespace fSkipWhiteSpace
protected final boolean is Skipping Whitespace return f Skip White Space  isSkippingWhitespace fSkipWhiteSpace

public String get Canonical Indent String canonical Indent if use Spaces Instead Of Tabs canonical Indent t NON NLS 1 else String tab NON NLS 1 for int i 0 i get Tab Width i tab tab concat NON NLS 1 canonical Indent tab return canonical Indent  getCanonicalIndent canonicalIndent useSpacesInsteadOfTabs canonicalIndent getTabWidth canonicalIndent canonicalIndent
public int get Maximum Line Width return f Prefs get Int Ant Editor Preference Constants FORMATTER MAX LINE LENGTH  getMaximumLineWidth fPrefs getInt AntEditorPreferenceConstants FORMATTER_MAX_LINE_LENGTH
public boolean wrap Long Tags return f Prefs get Boolean Ant Editor Preference Constants FORMATTER WRAP LONG  wrapLongTags fPrefs getBoolean AntEditorPreferenceConstants FORMATTER_WRAP_LONG
public boolean align Element Close Char return f Prefs get Boolean Ant Editor Preference Constants FORMATTER ALIGN  alignElementCloseChar fPrefs getBoolean AntEditorPreferenceConstants FORMATTER_ALIGN
public int get Tab Width return f Prefs get Int Ant Editor Preference Constants FORMATTER TAB SIZE  getTabWidth fPrefs getInt AntEditorPreferenceConstants FORMATTER_TAB_SIZE
public boolean use Spaces Instead Of Tabs return f Prefs get Boolean Ant Editor Preference Constants FORMATTER TAB CHAR  useSpacesInsteadOfTabs fPrefs getBoolean AntEditorPreferenceConstants FORMATTER_TAB_CHAR
public static boolean affects Formatting Property Change Event event String property event get Property return property starts With Ant Editor Preference Constants FORMATTER ALIGN property starts With Ant Editor Preference Constants FORMATTER MAX LINE LENGTH property starts With Ant Editor Preference Constants FORMATTER TAB CHAR property starts With Ant Editor Preference Constants FORMATTER TAB SIZE property starts With Ant Editor Preference Constants FORMATTER WRAP LONG  affectsFormatting PropertyChangeEvent getProperty startsWith AntEditorPreferenceConstants FORMATTER_ALIGN startsWith AntEditorPreferenceConstants FORMATTER_MAX_LINE_LENGTH startsWith AntEditorPreferenceConstants FORMATTER_TAB_CHAR startsWith AntEditorPreferenceConstants FORMATTER_TAB_SIZE startsWith AntEditorPreferenceConstants FORMATTER_WRAP_LONG
Sets the preference store for these formatting preferences param prefs the preference store to use as a reference for the formatting preferences public void set Preference Store I Preference Store prefs f Prefs prefs  setPreferenceStore IPreferenceStore fPrefs

private boolean complete false protected void clear this complete false 
public String get Start Of Tag return NON NLS 1  getStartOfTag
protected String read Tag throws IO Exception int int Char char c String Buffer node new String Buffer while complete int Char reader read 1 c char int Char node append c if c node to String ends With NON NLS 1 complete true return node to String  readTag IOException intChar StringBuffer StringBuffer intChar intChar toString endsWith toString
private boolean complete false protected void clear this complete false 
public String get Start Of Tag return NON NLS 1  getStartOfTag
protected String read Tag throws IO Exception int int Char char c String Buffer node new String Buffer while complete int Char reader read 1 c char int Char node append c if c complete true return node to String  readTag IOException intChar StringBuffer StringBuffer intChar intChar toString
private boolean complete false protected void clear this complete false 
public String get Start Of Tag return NON NLS 1  getStartOfTag
protected String read Tag throws IO Exception int int Char char c String Buffer node new String Buffer while complete int Char reader read 1 c char int Char node append c if c node to String ends With NON NLS 1 complete true return node to String  readTag IOException intChar StringBuffer StringBuffer intChar intChar toString endsWith toString
private String tag Text protected abstract void clear  tagText
protected abstract void clear public int get Post Tag Depth Modifier return 0  getPostTagDepthModifier
public int get Pre Tag Depth Modifier return 0  getPreTagDepthModifier
abstract public String get Start Of Tag  getStartOfTag
abstract public String get Start Of Tag public String get Tag Text return this tag Text  getStartOfTag getTagText tagText
public boolean is Text Node return false  isTextNode
protected abstract String read Tag throws IO Exception  readTag IOException
protected abstract String read Tag throws IO Exception public boolean requires Initial Indent return true  readTag IOException requiresInitialIndent
public void set Reader Reader reader throws IO Exception this reader reader this clear this tag Text read Tag  setReader IOException tagText readTag
public boolean starts On Newline return true  startsOnNewline
public static Tag Reader create Tag Reader For Reader reader throws IO Exception char buf new char 10 reader mark 10 reader read buf 0 10 reader reset String start Of Tag String value Of buf for int i 0 i tag Readers length i if start Of Tag starts With tag Readers i get Start Of Tag tag Readers i set Reader reader return tag Readers i else text Node Reader set Reader reader return text Node Reader  TagReader createTagReaderFor IOException startOfTag valueOf tagReaders startOfTag startsWith tagReaders getStartOfTag tagReaders setReader tagReaders textNodeReader setReader textNodeReader
private boolean is Text Node protected void clear this complete false  isTextNode
see org eclipse ant internal ui editor formatter Xml Document Formatter Tag Reader get Start Of Tag public String get Start Of Tag return NON NLS 1  XmlDocumentFormatter TagReader getStartOfTag getStartOfTag
see org eclipse ant internal ui editor formatter Xml Document Formatter Tag Reader is Text Node public boolean is Text Node return this is Text Node  XmlDocumentFormatter TagReader isTextNode isTextNode isTextNode
protected String read Tag throws IO Exception String Buffer node new String Buffer while complete reader mark 1 int int Char reader read if int Char 1 break char c char int Char if c reader reset complete true else node append c if this text node is just whitespace remove it except for the newlines if node length 1 this is Text Node false else if node to String trim length 0 String whitespace node to String node new String Buffer for int i 0 i whitespace length i char whitespace Character whitespace char At i if whitespace Character n node append whitespace Character this is Text Node false else this is Text Node true return node to String  readTag IOException StringBuffer StringBuffer intChar intChar intChar isTextNode toString toString StringBuffer whitespaceCharacter charAt whitespaceCharacter whitespaceCharacter isTextNode isTextNode toString
see org eclipse ant internal ui editor formatter Xml Document Formatter Tag Reader requires Initial Indent public boolean requires Initial Indent return false  XmlDocumentFormatter TagReader requiresInitialIndent requiresInitialIndent
see org eclipse ant internal ui editor formatter Xml Document Formatter Tag Reader starts On Newline public boolean starts On Newline return false  XmlDocumentFormatter TagReader startsOnNewline startsOnNewline
private boolean complete false protected void clear this complete false 
public int get Post Tag Depth Modifier if get Tag Text ends With get Tag Text ends With NON NLS 1 NON NLS 2 return 0 else if get Tag Text starts With NON NLS 1 return 0 else return 1  getPostTagDepthModifier getTagText endsWith getTagText endsWith getTagText startsWith
public int get Pre Tag Depth Modifier if get Tag Text starts With NON NLS 1 return 1 return 0  getPreTagDepthModifier getTagText startsWith
public String get Start Of Tag return NON NLS 1  getStartOfTag
protected String read Tag throws IO Exception String Buffer node new String Buffer boolean inside Quote false int int Char while complete int Char reader read 1 char c char int Char node append c TODO logic incorrectly assumes that is quote character when it could also be if c inside Quote inside Quote if c inside Quote complete true return node to String  readTag IOException StringBuffer StringBuffer insideQuote intChar intChar intChar insideQuote insideQuote insideQuote toString
private boolean last Node Was Text public Xml Document Formatter super depth 1  lastNodeWasText XmlDocumentFormatter
private void copy Node Reader reader String Buffer out Formatting Preferences prefs throws IO Exception Tag Reader tag Tag Reader Factory create Tag Reader For reader depth depth tag get Pre Tag Depth Modifier if last Node Was Text if tag starts On Newline has Newline Already out out append n NON NLS 1 if tag requires Initial Indent out append indent prefs get Canonical Indent out append tag get Tag Text depth depth tag get Post Tag Depth Modifier last Node Was Text tag is Text Node  copyNode StringBuffer FormattingPreferences IOException TagReader TagReaderFactory createTagReaderFor getPreTagDepthModifier lastNodeWasText startsOnNewline hasNewlineAlready requiresInitialIndent getCanonicalIndent getTagText getPostTagDepthModifier lastNodeWasText isTextNode
Returns the indent of the given string param line the text line param tab Width the width of the t character public static int compute Indent String line int tab Width int result 0 int blanks 0 int size line length for int i 0 i size i char c line char At i if c t result blanks 0 else if is Indent Char c blanks if blanks tab Width result blanks 0 else return result return result  tabWidth computeIndent tabWidth charAt isIndentChar tabWidth
Indent char is a space char but not a line delimiters code Character is Whitespace ch ch n ch r code public static boolean is Indent Char char ch return Character is Whitespace ch is Line Delimiter Char ch  isWhitespace isIndentChar isWhitespace isLineDelimiterChar
Line delimiter chars are n and r public static boolean is Line Delimiter Char char ch return ch n ch r  isLineDelimiterChar
return public String format String document Text Formatting Preferences prefs Assert is Not Null document Text Assert is Not Null prefs Reader reader new String Reader document Text formatted Xml new String Buffer if depth 1 depth 0 last Node Was Text false try while true reader mark 1 int int Char reader read reader reset if int Char 1 copy Node reader formatted Xml prefs else break reader close catch IO Exception e AntUI Plugin log e return formatted Xml to String  documentText FormattingPreferences isNotNull documentText isNotNull StringReader documentText formattedXml StringBuffer lastNodeWasText intChar intChar copyNode formattedXml IOException AntUIPlugin formattedXml toString
private boolean has Newline Already String Buffer out return out last Index Of n formatted Xml length 1 NON NLS 1 out last Index Of r formatted Xml length 1 NON NLS 1  hasNewlineAlready StringBuffer lastIndexOf formattedXml lastIndexOf formattedXml
private String indent String canonical Indent String Buffer indent new String Buffer 30 for int i 0 i depth i indent append canonical Indent return indent to String  canonicalIndent StringBuffer StringBuffer canonicalIndent toString
public void set Initial Indent int indent depth indent  setInitialIndent
Returns the indentation of the line at code offset code as a code String Buffer code If the offset is not valid the empty string is returned param offset the offset in the document return the indentation leading whitespace of the line in which code offset code is located public static String Buffer get Leading Whitespace int offset I Document document String Buffer indent new String Buffer try I Region line document get Line Information Of Offset offset int line Offset line get Offset int nonWS find End Of White Space document line Offset line Offset line get Length indent append document get line Offset nonWS line Offset return indent catch Bad Location Exception e return indent  StringBuffer StringBuffer getLeadingWhitespace IDocument StringBuffer StringBuffer IRegion getLineInformationOfOffset lineOffset getOffset findEndOfWhiteSpace lineOffset lineOffset getLength lineOffset lineOffset BadLocationException
Returns the first offset greater than code offset code and smaller than code end code whose character is not a space or tab character If no such offset is found code end code is returned param document the document to search in param offset the offset at which searching start param end the offset at which searching stops return the offset in the specifed range whose character is not a space or tab exception Bad Location Exception if position is an invalid range in the given document public static int find End Of White Space I Document document int offset int end throws Bad Location Exception while offset end char c document get Char offset if c c t return offset offset return end  BadLocationException findEndOfWhiteSpace IDocument BadLocationException getChar
Creates a string that represents one indent can be spaces or tabs return one indentation public static String Buffer create Indent String Buffer one Indent new String Buffer I Preference Store plugin Prefs AntUI Plugin get Default get Preference Store plugin Prefs get Boolean Ant Editor Preference Constants FORMATTER TAB CHAR if plugin Prefs get Boolean Ant Editor Preference Constants FORMATTER TAB CHAR int tab Len plugin Prefs get Int Ant Editor Preference Constants FORMATTER TAB SIZE for int i 0 i tab Len i one Indent append else one Indent append t default return one Indent  StringBuffer createIndent StringBuffer oneIndent StringBuffer IPreferenceStore pluginPrefs AntUIPlugin getDefault getPreferenceStore pluginPrefs getBoolean AntEditorPreferenceConstants FORMATTER_TAB_CHAR pluginPrefs getBoolean AntEditorPreferenceConstants FORMATTER_TAB_CHAR tabLen pluginPrefs getInt AntEditorPreferenceConstants FORMATTER_TAB_SIZE tabLen oneIndent oneIndent oneIndent

private int indent 1 public Xml Document Formatting Strategy this prefs new Formatting Preferences  XmlDocumentFormattingStrategy FormattingPreferences
public Xml Document Formatting Strategy Formatting Preferences prefs int indent Assert is Not Null prefs this prefs prefs this indent indent  XmlDocumentFormattingStrategy FormattingPreferences isNotNull
public void format super format final I Document document I Document f Documents remove First if document null TODO allow formatting of regions not just the entire document String document Text document get Xml Document Formatter formatter new Xml Document Formatter if indent 1 formatter set Initial Indent indent String formatted Text formatter format document Text this prefs if formatted Text null formatted Text equals document Text document set formatted Text  IDocument IDocument fDocuments removeFirst documentText XmlDocumentFormatter XmlDocumentFormatter setInitialIndent formattedText documentText formattedText formattedText documentText formattedText
public void formatter Starts final I Formatting Context context super formatter Starts context f Documents add Last context get Property Formatting Context Properties CONTEXT MEDIUM  formatterStarts IFormattingContext formatterStarts fDocuments addLast getProperty FormattingContextProperties CONTEXT_MEDIUM
public void formatter Stops super formatter Stops f Documents clear  formatterStops formatterStops fDocuments

private final Linked List f Partitions new Linked List public Xml Element Formatting Strategy this prefs new Formatting Preferences  LinkedList fPartitions LinkedList XmlElementFormattingStrategy FormattingPreferences
public Xml Element Formatting Strategy Formatting Preferences prefs Assert is Not Null prefs this prefs prefs  XmlElementFormattingStrategy FormattingPreferences isNotNull
public void format super format final I Document document I Document f Documents remove First final Typed Position partition Typed Position f Partitions remove First if document null partition null return try String formatted format Element document partition String partition Text document get partition get Offset partition get Length if formatted null formatted equals partition Text document replace partition get Offset partition get Length formatted catch Bad Location Exception e  IDocument IDocument fDocuments removeFirst TypedPosition TypedPosition fPartitions removeFirst formatElement partitionText getOffset getLength partitionText getOffset getLength BadLocationException
private String format Element I Document document Typed Position partition throws Bad Location Exception String partition Text document get partition get Offset partition get Length I Region line document get Line Information Of Offset partition get Offset int indent Length partition get Offset line get Offset return Xml Tag Formatter format partition Text prefs document get line get Offset indent Length  formatElement IDocument TypedPosition BadLocationException partitionText getOffset getLength IRegion getLineInformationOfOffset getOffset indentLength getOffset getOffset XmlTagFormatter partitionText getOffset indentLength
public void formatter Starts final I Formatting Context context super formatter Starts context f Partitions add Last context get Property Formatting Context Properties CONTEXT PARTITION f Documents add Last context get Property Formatting Context Properties CONTEXT MEDIUM  formatterStarts IFormattingContext formatterStarts fPartitions addLast getProperty FormattingContextProperties CONTEXT_PARTITION fDocuments addLast getProperty FormattingContextProperties CONTEXT_MEDIUM
public void formatter Stops super formatter Stops f Partitions clear f Documents clear  formatterStops formatterStops fPartitions fDocuments

Format the text using the ant code formatter param text The text to format Must be a non null value param prefs Preferences to use for this format operation If null the preferences currently set in the plug in s preferences store are used return The formatted text public static String format String text Formatting Preferences prefs return format text prefs 1  FormattingPreferences
private static String format String text Formatting Preferences prefs int indent Assert is Not Null text Formatting Preferences apply Prefs if prefs null apply Prefs new Formatting Preferences else apply Prefs prefs I Document doc new Document doc set text new Ant Document Setup Participant setup doc format apply Prefs doc indent return doc get  FormattingPreferences isNotNull FormattingPreferences applyPrefs applyPrefs FormattingPreferences applyPrefs IDocument AntDocumentSetupParticipant applyPrefs
private static void format Formatting Preferences prefs I Document doc int indent Multi Pass Content Formatter formatter new Multi Pass Content Formatter Ant Document Setup Participant ANT PARTITIONING I Document DEFAULT CONTENT TYPE formatter set Master Strategy new Xml Document Formatting Strategy prefs indent formatter set Slave Strategy new Xml Element Formatting Strategy prefs Ant Editor Partition Scanner XML TAG formatter format doc new Region 0 doc get Length  FormattingPreferences IDocument MultiPassContentFormatter MultiPassContentFormatter AntDocumentSetupParticipant ANT_PARTITIONING IDocument DEFAULT_CONTENT_TYPE setMasterStrategy XmlDocumentFormattingStrategy setSlaveStrategy XmlElementFormattingStrategy AntEditorPartitionScanner XML_TAG getLength
Format the text using the ant code formatter using the preferences settings in the plug in preference store param text The text to format Must be a non null value return The formatted text public static String format String text return format text null 
public static void format Template Buffer template Buffer Ant Context ant Context Formatting Preferences prefs String template String template Buffer get String I Document full Document new Document ant Context get Document get int completion Offset ant Context get Completion Offset try trim any starting whitespace I Region line Region full Document get Line Information Of Offset completion Offset String line String full Document get line Region get Offset line Region get Length line String trim Begin line String full Document replace line Region get Offset line Region get Length line String catch Bad Location Exception e1 return Template Variable variables template Buffer get Variables int offsets variables To Offsets variables completion Offset I Document orig Template Doc new Document full Document get try orig Template Doc replace completion Offset ant Context get Completion Length template String catch Bad Location Exception e return don t format if the document has changed I Document template Document create Document orig Template Doc get create Positions offsets String leading Text get Leading Text full Document ant Context get Ant Model completion Offset String new Template String leading Text template String int indent Xml Document Formatter compute Indent leading Text prefs get Tab Width new Template String format new Template String prefs indent try template Document replace completion Offset template String length new Template String catch Bad Location Exception e return Position positions null try positions template Document get Positions POS CATEGORY catch Bad Position Category Exception e2 offsets To Variables offsets variables completion Offset positions To Variables positions variables completion Offset template Buffer set Content new Template String variables  TemplateBuffer templateBuffer AntContext antContext FormattingPreferences templateString templateBuffer getString IDocument fullDocument antContext getDocument completionOffset antContext getCompletionOffset IRegion lineRegion fullDocument getLineInformationOfOffset completionOffset lineString fullDocument lineRegion getOffset lineRegion getLength lineString trimBegin lineString fullDocument lineRegion getOffset lineRegion getLength lineString BadLocationException TemplateVariable templateBuffer getVariables variablesToOffsets completionOffset IDocument origTemplateDoc fullDocument origTemplateDoc completionOffset antContext getCompletionLength templateString BadLocationException IDocument templateDocument createDocument origTemplateDoc createPositions leadingText getLeadingText fullDocument antContext getAntModel completionOffset newTemplateString leadingText templateString XmlDocumentFormatter computeIndent leadingText getTabWidth newTemplateString newTemplateString templateDocument completionOffset templateString newTemplateString BadLocationException templateDocument getPositions POS_CATEGORY BadPositionCategoryException offsetsToVariables completionOffset positionsToVariables completionOffset templateBuffer setContent newTemplateString
private static void positions To Variables Position positions Template Variable variables int start for int i 0 i variables length i Template Variable variable variables i int offsets new int variable get Offsets length for int j 0 j offsets length j offsets j positions j get Offset start variable set Offsets offsets  positionsToVariables TemplateVariable TemplateVariable getOffsets getOffset setOffsets
doc add Position Updater new Default Position Updater POS CATEGORY protected boolean not Deleted if f Offset f Position offset f Position offset f Position length f Offset f Length f Position offset f Offset f Length deleted positions set to end of remove return false return true  addPositionUpdater DefaultPositionUpdater POS_CATEGORY notDeleted fOffset fPosition fPosition fPosition fOffset fLength fPosition fOffset fLength
private static Document create Document String string Position positions throws Illegal Argument Exception Document doc new Document string try if positions null doc add Position Category POS CATEGORY doc add Position Updater new Default Position Updater POS CATEGORY protected boolean not Deleted if f Offset f Position offset f Position offset f Position length f Offset f Length f Position offset f Offset f Length deleted positions set to end of remove return false return true for int i 0 i positions length i try doc add Position POS CATEGORY positions i catch Bad Location Exception e throw new Illegal Argument Exception Position outside of string offset positions i offset length positions i length string size string length NON NLS 1 NON NLS 2 NON NLS 3 catch Bad Position Category Exception cannot Happen can not happen category is correctly set up return doc  createDocument IllegalArgumentException addPositionCategory POS_CATEGORY addPositionUpdater DefaultPositionUpdater POS_CATEGORY notDeleted fOffset fPosition fPosition fPosition fOffset fLength fPosition fOffset fLength addPosition POS_CATEGORY BadLocationException IllegalArgumentException BadPositionCategoryException cannotHappen
public static String trim Begin String to Be Trimmed int i 0 while i to Be Trimmed length Character is Whitespace to Be Trimmed char At i i return to Be Trimmed substring i  trimBegin toBeTrimmed toBeTrimmed isWhitespace toBeTrimmed charAt toBeTrimmed
private static int variables To Offsets Template Variable variables int start List list new Array List for int i 0 i variables length i int offsets variables i get Offsets for int j 0 j offsets length j list add new Integer offsets j int offsets new int list size for int i 0 i offsets length i offsets i Integer list get i int Value start Arrays sort offsets return offsets  variablesToOffsets TemplateVariable ArrayList getOffsets intValue
private static void offsets To Variables int all Offsets Template Variable variables int start int current Indices new int variables length for int i 0 i current Indices length i current Indices i 0 int offsets new int variables length for int i 0 i variables length i offsets i variables i get Offsets for int i 0 i all Offsets length i int min Integer MAX VALUE int min Variable Index 1 for int j 0 j variables length j int current Index current Indices j determine minimum if current Index offsets j length continue int offset offsets j current Index if offset min min offset min Variable Index j offsets min Variable Index current Indices min Variable Index all Offsets i start current Indices min Variable Index for int i 0 i variables length i variables i set Offsets offsets i  offsetsToVariables allOffsets TemplateVariable currentIndices currentIndices currentIndices getOffsets allOffsets MAX_VALUE minVariableIndex currentIndex currentIndices currentIndex currentIndex minVariableIndex minVariableIndex currentIndices minVariableIndex allOffsets currentIndices minVariableIndex setOffsets
Returns the indentation level at the position of code completion private static String get Leading Text I Document document Ant Model model int completion Offset Ant Project Node project model get Project Node false if project null return NON NLS 1 Ant Element Node node project get Node completion Offset f Accumulated Change if node null return NON NLS 1 String Buffer buf new String Buffer buf append Xml Document Formatter get Leading Whitespace node get Offset document buf append Xml Document Formatter create Indent return buf to String  getLeadingText IDocument AntModel completionOffset AntProjectNode getProjectNode AntElementNode getNode completionOffset fAccumulatedChange StringBuffer StringBuffer XmlDocumentFormatter getLeadingWhitespace getOffset XmlDocumentFormatter createIndent toString
private static Position create Positions int positions Position p null if positions null p new Position positions length for int i 0 i positions length i p i new Position positions i 0 return p  createPositions

private String value public Attribute Pair String attribute String value this attribute attribute this value value  AttributePair
public String get Attribute return attribute  getAttribute
public String get Value return value  getValue
protected static class Parse Exception extends Exception public Parse Exception String message super message  ParseException ParseException
private String element Name public void add Attribute String attribute String value attributes add new Attribute Pair attribute value  elementName addAttribute AttributePair
public int attribute Count return attributes size  attributeCount
public Attribute Pair get Attribute Pair int i return Attribute Pair attributes get i  AttributePair getAttributePair AttributePair
public String get Element Name return this element Name  getElementName elementName
public boolean is Closed return closed  isClosed
public int minimum Length int length 2 for the if this is Closed length if we need to add an length this get Element Name length if this attribute Count 0 this is Closed length for int i 0 i this attribute Count i Attribute Pair attribute Pair this get Attribute Pair i length attribute Pair get Attribute length length attribute Pair get Value length length 4 equals sign quote characters trailing space if this attribute Count 0 this is Closed length return length  minimumLength isClosed getElementName attributeCount isClosed attributeCount AttributePair attributePair getAttributePair attributePair getAttribute attributePair getValue attributeCount isClosed
public void set Attributes List attribute Pair attributes clear attributes add All attribute Pair  setAttributes attributePair addAll attributePair
public void set Closed boolean closed this closed closed  setClosed
public void set Element Name String element Name this element Name element Name  setElementName elementName elementName elementName
public String to String String Buffer sb new String Buffer 500 sb append NON NLS 1 sb append this get Element Name if this attribute Count 0 this is Closed sb append for int i 0 i this attribute Count i Attribute Pair attribute Pair this get Attribute Pair i sb append attribute Pair get Attribute sb append NON NLS 1 sb append attribute Pair get Value sb append NON NLS 1 if this is Closed i this attribute Count 1 sb append if this is Closed sb append NON NLS 1 sb append NON NLS 1 return sb to String  toString StringBuffer StringBuffer getElementName attributeCount isClosed attributeCount AttributePair attributePair getAttributePair attributePair getAttribute attributePair getValue isClosed attributeCount isClosed toString
param search Char param in Target String return private int count Char char search Char String in Target String String Character Iterator iter new String Character Iterator in Target String int i 0 if iter first search Char i while iter get Index iter get End Index if iter next search Char i return i  searchChar inTargetString countChar searchChar inTargetString StringCharacterIterator StringCharacterIterator inTargetString searchChar getIndex getEndIndex searchChar
param tag Text param prefs param indent return public String format Tag tag Formatting Preferences prefs String indent if prefs wrap Long Tags line Requires Wrap indent tag to String prefs get Maximum Line Width prefs get Tab Width return wrap Tag tag prefs indent return tag to String  tagText FormattingPreferences wrapLongTags lineRequiresWrap toString getMaximumLineWidth getTabWidth wrapTag toString
param line param line Width param tab Width return protected boolean line Requires Wrap String line int line Width int tab Width return tab Expanded Line Width line tab Width line Width  lineWidth tabWidth lineRequiresWrap lineWidth tabWidth tabExpandedLineWidth tabWidth lineWidth
param line the line in which spaces are to be expanded param tab Width number of spaces to substitute for a tab return length of the line with tabs expanded to spaces protected int tab Expanded Line Width String line int tab Width int tab Count count Char t line return line length tab Count tab Count tab Width  tabWidth tabExpandedLineWidth tabWidth tabCount countChar tabCount tabCount tabWidth
param tag param prefs param indent return protected String wrap Tag Tag tag Formatting Preferences prefs String indent String Buffer sb new String Buffer 1024 sb append sb append tag get Element Name sb append if tag attribute Count 0 sb append tag get Attribute Pair 0 get Attribute sb append NON NLS 1 sb append tag get Attribute Pair 0 get Value sb append if tag attribute Count 1 char extra Indent new char tag get Element Name length 2 Arrays fill extra Indent for int i 1 i tag attribute Count i sb append n sb append indent sb append extra Indent sb append tag get Attribute Pair i get Attribute sb append NON NLS 1 sb append tag get Attribute Pair i get Value sb append if prefs align Element Close Char sb append n NON NLS 1 sb append indent else if tag is Closed sb append if tag is Closed sb append NON NLS 1 sb append NON NLS 1 return sb to String  wrapTag FormattingPreferences StringBuffer StringBuffer getElementName attributeCount getAttributePair getAttribute getAttributePair getValue attributeCount extraIndent getElementName extraIndent attributeCount extraIndent getAttributePair getAttribute getAttributePair getValue alignElementCloseChar isClosed isClosed toString
class Mode private int mode public void set Attribute Name Searching mode 0  setAttributeNameSearching
private int mode public void set Attribute Name Searching mode 0 public void set Attribute Name Found mode 1  setAttributeNameSearching setAttributeNameFound
public void set Attribute Name Searching mode 0 public void set Attribute Name Found mode 1 public void set Attribute Value Searching mode 2  setAttributeNameSearching setAttributeNameFound setAttributeValueSearching
public void set Attribute Name Found mode 1 public void set Attribute Value Searching mode 2 public void set Attribute Value Found mode 3  setAttributeNameFound setAttributeValueSearching setAttributeValueFound
public void set Attribute Value Searching mode 2 public void set Attribute Value Found mode 3 public void set Finished mode 4  setAttributeValueSearching setAttributeValueFound setFinished
public void set Attribute Value Found mode 3 public void set Finished mode 4 public boolean is Attribute Name Searching return mode 0  setAttributeValueFound setFinished isAttributeNameSearching
public void set Finished mode 4 public boolean is Attribute Name Searching return mode 0 public boolean is Attribute Name Found return mode 1  setFinished isAttributeNameSearching isAttributeNameFound
public boolean is Attribute Name Searching return mode 0 public boolean is Attribute Name Found return mode 1 public boolean is Attribute Value Searching return mode 2  isAttributeNameSearching isAttributeNameFound isAttributeValueSearching
public boolean is Attribute Name Found return mode 1 public boolean is Attribute Value Searching return mode 2 public boolean is Attribute Value Found return mode 3  isAttributeNameFound isAttributeValueSearching isAttributeValueFound
public boolean is Attribute Value Searching return mode 2 public boolean is Attribute Value Found return mode 3 public boolean is Finished return mode 4  isAttributeValueSearching isAttributeValueFound isFinished
protected List get Attibutes String element Text throws Parse Exception class Mode private int mode public void set Attribute Name Searching mode 0 public void set Attribute Name Found mode 1 public void set Attribute Value Searching mode 2 public void set Attribute Value Found mode 3 public void set Finished mode 4 public boolean is Attribute Name Searching return mode 0 public boolean is Attribute Name Found return mode 1 public boolean is Attribute Value Searching return mode 2 public boolean is Attribute Value Found return mode 3 public boolean is Finished return mode 4 List attribute Pairs new Array List Character Iterator iter new String Character Iterator element Text substring get Element Name element Text length 2 state for finding attributes Mode mode new Mode mode set Attribute Name Searching char attribute Quote String Buffer current Attribute Name null String Buffer current Attribute Value null char c iter first while iter get Index iter get End Index switch c case case if mode is Attribute Value Searching start of an attribute value attribute Quote c mode set Attribute Value Found current Attribute Value new String Buffer 1024 else if mode is Attribute Value Found attribute Quote c we ve completed a pair Attribute Pair pair new Attribute Pair current Attribute Name to String current Attribute Value to String attribute Pairs add pair start looking for another attribute mode set Attribute Name Searching else if mode is Attribute Value Found attribute Quote c this quote character is part of the attribute value current Attribute Value append c else this is no place for a quote throw new Parse Exception Unexpected c NON NLS 1 when parsing n t element Text NON NLS 1 break case if mode is Attribute Value Found this character is part of the attribute value current Attribute Value append c else if mode is Attribute Name Found end of the name now start looking for the value mode set Attribute Value Searching else this is no place for an equals sign throw new Parse Exception Unexpected c NON NLS 1 when parsing n t element Text NON NLS 1 break case case if mode is Attribute Value Found attribute values are CDATA add it all current Attribute Value append c else if mode is Attribute Name Searching mode set Finished else if mode is Finished consume the remaining characters else we aren t ready to be done throw new Parse Exception Unexpected c NON NLS 1 when parsing n t element Text NON NLS 1 break default if mode is Attribute Value Found attribute values are CDATA add it all current Attribute Value append c else if mode is Finished if Character is Whitespace c throw new Parse Exception Unexpected c NON NLS 1 when parsing n t element Text NON NLS 1 else if Character is Whitespace c if mode is Attribute Name Searching we found the start of an attribute name mode set Attribute Name Found current Attribute Name new String Buffer 255 current Attribute Name append c else if mode is Attribute Name Found current Attribute Name append c break c iter next if mode is Finished throw new Parse Exception Element did not complete normally NON NLS 1 return attribute Pairs  getAttibutes elementText ParseException setAttributeNameSearching setAttributeNameFound setAttributeValueSearching setAttributeValueFound setFinished isAttributeNameSearching isAttributeNameFound isAttributeValueSearching isAttributeValueFound isFinished attributePairs ArrayList CharacterIterator StringCharacterIterator elementText getElementName elementText setAttributeNameSearching attributeQuote StringBuffer currentAttributeName StringBuffer currentAttributeValue getIndex getEndIndex isAttributeValueSearching attributeQuote setAttributeValueFound currentAttributeValue StringBuffer isAttributeValueFound attributeQuote AttributePair AttributePair currentAttributeName toString currentAttributeValue toString attributePairs setAttributeNameSearching isAttributeValueFound attributeQuote currentAttributeValue ParseException elementText isAttributeValueFound currentAttributeValue isAttributeNameFound setAttributeValueSearching ParseException elementText isAttributeValueFound currentAttributeValue isAttributeNameSearching setFinished isFinished ParseException elementText isAttributeValueFound currentAttributeValue isFinished isWhitespace ParseException elementText isWhitespace isAttributeNameSearching setAttributeNameFound currentAttributeName StringBuffer currentAttributeName isAttributeNameFound currentAttributeName isFinished ParseException attributePairs
param tag Text text of an XML tag return extracted XML element name protected String get Element Name String tag Text throws Parse Exception if tag Text equals this parse Text this element Name null int end Of Tag tag End tag Text if tag Text length 2 end Of Tag 1 this parse Text tag Text this element Name tag Text substring 1 end Of Tag else throw new Parse Exception No element name for the tag n t NON NLS 1 tag Text return element Name  tagText getElementName tagText ParseException tagText parseText elementName endOfTag tagEnd tagText tagText endOfTag parseText tagText elementName tagText endOfTag ParseException tagText elementName
param tag Text return protected boolean is Closed String tag Text return tag Text char At tag Text last Index Of 1 NON NLS 1  tagText isClosed tagText tagText charAt tagText lastIndexOf
param tag Text return an fully populated tag public Tag parse String tag Text throws Parse Exception Tag tag new Tag tag set Element Name get Element Name tag Text tag set Attributes get Attibutes tag Text tag set Closed is Closed tag Text return tag  tagText tagText ParseException setElementName getElementName tagText setAttributes getAttibutes tagText setClosed isClosed tagText
private int tag End String text This is admittedly a little loose but we don t want the formatter to be too strict http www w3 org TR 2000 REC xml 20001006 NT Name for int i 1 i text length i char c text char At i if Character is Letter Or Digit c c c c c   return i return 1  tagEnd charAt isLetterOrDigit _
param tag Text param prefs param indent return public static String format String tag Text Formatting Preferences prefs String indent Tag tag if tag Text starts With tag Text starts With NON NLS 1 NON NLS 2 tag Text starts With tag Text starts With NON NLS 1 NON NLS 2 return tag Text try tag new Tag Parser parse tag Text catch Parse Exception e if we can t parse the tag give up and leave the text as is return tag Text return new Tag Formatter format tag prefs indent  tagText tagText FormattingPreferences tagText startsWith tagText startsWith tagText startsWith tagText startsWith tagText TagParser tagText ParseException tagText TagFormatter

public class Ant Defining Task Node extends Ant Task Node public Ant Defining Task Node Task task String label super task label  AntDefiningTaskNode AntTaskNode AntDefiningTaskNode
protected Image Descriptor get Base Image Descriptor String task Name get Task get Task Name if taskdef equals Ignore Case task Name typedef equals Ignore Case task Name NON NLS 1 NON NLS 2 return super get Base Image Descriptor return AntUI Images get Image Descriptor I AntUI Constants IMG ANT MACRODEF  ImageDescriptor getBaseImageDescriptor taskName getTask getTaskName equalsIgnoreCase taskName equalsIgnoreCase taskName getBaseImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_ANT_MACRODEF
Execute the defining task public boolean configure boolean validate Fully I Preference Store store AntUI Plugin get Default get Preference Store boolean enabled store get Boolean Ant Editor Preference Constants CODEASSIST USER DEFINED TASKS if enabled try get Task maybe Configure get Task execute return false catch Build Exception be handle Build Exception be Ant Editor Preference Constants PROBLEM CLASSPATH return false  validateFully IPreferenceStore AntUIPlugin getDefault getPreferenceStore getBoolean AntEditorPreferenceConstants CODEASSIST_USER_DEFINED_TASKS getTask maybeConfigure getTask BuildException handleBuildException AntEditorPreferenceConstants PROBLEM_CLASSPATH
public Object get Real Task Task task get Task if task instanceof Unknown Element task maybe Configure return Unknown Element task get Real Thing return task  getRealTask getTask UnknownElement maybeConfigure UnknownElement getRealThing
public static void set Java Class Path Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences URL ant Classpath prefs getUR Ls String Buffer buff new String Buffer File file null for int i 0 i ant Classpath length i try file new File Platform as LocalURL ant Classpath i get Path catch IO Exception e continue buff append file get Absolute Path buff append NON NLS 1 org apache tools ant types Path system Classpath new org apache tools ant types Path null buff substring 0 buff length 2 org apache tools ant types Path system Classpath system Classpath  setJavaClassPath AntCorePreferences AntCorePlugin getPlugin getPreferences antClasspath getURLs StringBuffer StringBuffer antClasspath asLocalURL antClasspath getPath IOException getAbsolutePath systemClasspath systemClasspath systemClasspath
see org eclipse ant internal ui editor model Ant Element Node set Parent org eclipse ant internal ui editor model Ant Element Node protected void set Parent Ant Element Node node super set Parent node get Project Node add Defining Task Node this  AntElementNode setParent AntElementNode setParent AntElementNode setParent getProjectNode addDefiningTaskNode

Creates an instance with the specified name public Ant Element Node String a Name name a Name  AntElementNode aName aName
Creates an instance with the specified name public Ant Element Node  AntElementNode
Returns the name public String get Name return name  getName
Returns the label that is used for display in outline view P The default implementation returns just the same as the method code get Name code Override this method in your own subclass for special elements in order to provide a custom label public String get Label return get Name  getName getLabel getName
Returns the child nodes public List get Child Nodes return child Nodes  getChildNodes childNodes
Returns all the descendents of this target public List get Descendents if child Nodes null return null List descendents new Array List determine Descendents descendents child Nodes return descendents  getDescendents childNodes ArrayList determineDescendents childNodes
private void determine Descendents List descendents List children Nodes Iterator itr children Nodes iterator while itr has Next Ant Element Node element Ant Element Node itr next if element has Children determine Descendents descendents element get Child Nodes descendents add element  determineDescendents childrenNodes childrenNodes hasNext AntElementNode AntElementNode hasChildren determineDescendents getChildNodes
Returns the parent code Ant Element Node code return the parent or code null code if this element has no parent public Ant Element Node get Parent Node return parent  AntElementNode AntElementNode getParentNode
public Ant Project Node get Project Node Ant Element Node project Parent get Parent Node while project Parent null project Parent instanceof Ant Project Node project Parent project Parent get Parent Node return Ant Project Node project Parent  AntProjectNode getProjectNode AntElementNode projectParent getParentNode projectParent projectParent AntProjectNode projectParent projectParent getParentNode AntProjectNode projectParent
Adds the specified element as child P The specified element will have this assigned as its parent public void add Child Node Ant Element Node child Element child Element set Parent this if child Nodes null child Nodes new Array List child Nodes add child Element  addChildNode AntElementNode childElement childElement setParent childNodes childNodes ArrayList childNodes childElement
protected void set Parent Ant Element Node node parent node  setParent AntElementNode
Sets the absolute file system path of the file this element is defined within public void set File Path String path if path null return URL url null try url new URL path catch MalformedURL Exception e file Path path return file Path new Path new File url get Path get Absolute Path to String  setFilePath MalformedURLException filePath filePath getPath getAbsolutePath toString
Returns the absolute file system path of the file this element is defined within Only relevant for nodes that are external see is External public String get File Path return file Path  isExternal getFilePath filePath
Returns the 0 based index of the first character of the source code for this element relative to the source buffer in which this element is contained return the 0 based index of the first character of the source code for this element relative to the source buffer in which this element is contained public int get Offset return offset  getOffset
Sets the offset see get Offset public void set Offset int an Offset offset an Offset  getOffset setOffset anOffset anOffset
Returns the number of characters of the source code for this element relative to the source buffer in which this element is contained return the number of characters of the source code for this element relative to the source buffer in which this element is contained public int get Length return length  getLength
Sets the length see get Length public void set Length int a Length length a Length if f Problem null f Problem instanceof XML Problem XML Problem f Problem set Length a Length f Problem null  getLength setLength aLength aLength fProblem fProblem XMLProblem XMLProblem fProblem setLength aLength fProblem
Returns a string representation of this element public String to String return Ant Element Node get Label Offset get Offset Length get Length NON NLS 1 NON NLS 2 NON NLS 3  toString getLabel getOffset getLength
Returns whether this element has been generated as part of an element hierarchy this is not complete as a result of an error public boolean is Error Node return problem Severity XML Problem SEVERITY ERROR problem Severity XML Problem SEVERITY FATAL ERROR  isErrorNode problemSeverity XMLProblem SEVERITY_ERROR problemSeverity XMLProblem SEVERITY_FATAL_ERROR
Returns whether this element has been generated as part of an element hierarchy that has warning s associated with it public boolean is Warning Node return problem Severity XML Problem SEVERITY WARNING  isWarningNode problemSeverity XMLProblem SEVERITY_WARNING
Sets whether this element has been generated as part of an element hierarchy that has problems The severity of the problem is provided public void set Problem Severity int severity this problem Severity severity  setProblemSeverity problemSeverity
Returns whether this xml element is defined in an external entity return boolean public boolean is External return is External  isExternal isExternal
Sets whether this xml element is defined in an external entity public void set External boolean is External this is External is External  setExternal isExternal isExternal isExternal
private String get Element Path if f Element Path null String Buffer buffer new String Buffer get Parent Node null get Parent Node get Element Path NON NLS 1 buffer append buffer append get Element Identifier buffer append buffer append get Parent Node null get Parent Node get Element Index Of this 0 buffer append f Element Path buffer to String return f Element Path  getElementPath fElementPath StringBuffer StringBuffer getParentNode getParentNode getElementPath getElementIdentifier getParentNode getParentNode getElementIndexOf fElementPath toString fElementPath
private String get Element Identifier if f Element Identifier null String Buffer buffer escape new String Buffer get Name null get Name NON NLS 1 NON NLS 2 buffer append buffer append escape new String Buffer get Label null get Label to String NON NLS 1 NON NLS 2 f Element Identifier buffer to String return f Element Identifier  getElementIdentifier fElementIdentifier StringBuffer StringBuffer getName getName StringBuffer getLabel getLabel toString fElementIdentifier toString fElementIdentifier
private String Buffer escape String Buffer sb char esc String special for int i 0 i sb length i if special index Of sb char At i 0 sb insert i esc return sb  StringBuffer StringBuffer indexOf charAt
private int get Element Index Of Ant Element Node child if get Child Nodes null return 1 int result 1 Iterator iter get Child Nodes iterator Ant Element Node current null while current child iter has Next current Ant Element Node iter next if child get Element Identifier equals current get Element Identifier result if current child return 1 return result  getElementIndexOf AntElementNode getChildNodes getChildNodes AntElementNode hasNext AntElementNode getElementIdentifier getElementIdentifier
public boolean equals Object o2 prepared to be used in an I Element Comparer depends on http dev eclipse org bugs show bug cgi id 32254 Object o1 this if o1 o2 return true if o1 null o2 null return false if o1 instanceof Ant Element Node o2 instanceof Ant Element Node return o2 equals o1 if o1 instanceof Ant Element Node o2 instanceof Ant Element Node return false Ant Element Node e1 Ant Element Node o1 Ant Element Node e2 Ant Element Node o2 return e1 get Element Path equals e2 get Element Path  IElementComparer show_bug AntElementNode AntElementNode AntElementNode AntElementNode AntElementNode AntElementNode AntElementNode AntElementNode getElementPath getElementPath
public int hash Code prepared to be used in an I Element Comparer depends on http dev eclipse org bugs show bug cgi id 32254 return get Element Path hash Code  hashCode IElementComparer show_bug getElementPath hashCode
Returns the length of source to select for this node return the length of source to select public int get Selection Length return selection Length  getSelectionLength selectionLength
public void set Selection Length int selection Length this selection Length selection Length  setSelectionLength selectionLength selectionLength selectionLength
Returns the node with the narrowest source range that contains the offset It may be this node or one of its children or code null code if the offset is not in the source range of this node param source Offset The source offset return the node that includes the offset in its source range or code null code public Ant Element Node get Node int source Offset if child Nodes null for Iterator iter child Nodes iterator iter has Next Ant Element Node node Ant Element Node iter next Ant Element Node containing Node node get Node source Offset if containing Node null return containing Node if length 1 offset source Offset is External this is still an open element return this if offset source Offset source Offset offset length 2 return this return null  sourceOffset AntElementNode getNode sourceOffset childNodes childNodes hasNext AntElementNode AntElementNode AntElementNode containingNode getNode sourceOffset containingNode containingNode sourceOffset isExternal sourceOffset sourceOffset
public Image get Image int flags 0 if is Error Node flags flags Ant Image Descriptor HAS ERRORS else if is Warning Node flags flags Ant Image Descriptor HAS WARNINGS if import Node null is External flags flags Ant Image Descriptor IMPORTED Image Descriptor base get Base Image Descriptor return AntUI Images get Image new Ant Image Descriptor base flags  getImage isErrorNode AntImageDescriptor HAS_ERRORS isWarningNode AntImageDescriptor HAS_WARNINGS importNode isExternal AntImageDescriptor ImageDescriptor getBaseImageDescriptor AntUIImages getImage AntImageDescriptor
protected Image Descriptor get Base Image Descriptor return AntUI Images get Image Descriptor I AntUI Constants IMG TASK PROPOSAL  ImageDescriptor getBaseImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_TASK_PROPOSAL
protected Ant Model get Ant Model Ant Element Node parent Node get Parent Node while parent Node instanceof Ant Project Node parent Node parent Node get Parent Node return parent Node get Ant Model  AntModel getAntModel AntElementNode parentNode getParentNode parentNode AntProjectNode parentNode parentNode getParentNode parentNode getAntModel
Sets the problem associated with this element param problem The problem associated with this element public void associated Problem I Problem problem f Problem problem  associatedProblem IProblem fProblem
protected void append Entity Name String Buffer display Name String path get File Path if get Import Node null display Name append Message Format format Ant Model Messages get String Ant Element Node 9 new String get Import Node get Label NON NLS 1 else String entity Name get Ant Model get Entity Name path display Name append Message Format format Ant Model Messages get String Ant Element Node 9 new String entity Name NON NLS 1  appendEntityName StringBuffer displayName getFilePath getImportNode displayName MessageFormat AntModelMessages getString AntElementNode getImportNode getLabel entityName getAntModel getEntityName displayName MessageFormat AntModelMessages getString AntElementNode entityName
public Ant Element Node get Import Node return import Node  AntElementNode getImportNode importNode
public void set Import Node Ant Element Node import Node this import Node import Node  setImportNode AntElementNode importNode importNode importNode
public boolean has Children if child Nodes null return false return child Nodes is Empty  hasChildren childNodes childNodes isEmpty
public void reset child Nodes null  childNodes
public void set External Info int line int column f Line line f Column column  setExternalInfo fLine fColumn
public int get External Info return new int f Line f Column  getExternalInfo fLine fColumn
Return the resource that contains the definition of this Ant node return The resource that contains the definition of this ant node or code null code if that resource could not be determined a buildfile that is external to the workspace public I File getI File if is External return Ant Util get File For Location file Path null return get Build File Resource  IFile getIFile isExternal AntUtil getFileForLocation filePath getBuildFileResource
Return the resource that is the main build file for this Ant node return The resource that is the main buildfile for this ant node or code null code if that resource could not be determined a buildfile that is external to the workspace public I File get Build File Resource Location Provider location Provider get Ant Model get Location Provider return location Provider get File  IFile getBuildFileResource LocationProvider locationProvider getAntModel getLocationProvider locationProvider getFile
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return Platform get Adapter Manager get Adapter this adapter  IAdaptable getAdapter getAdapter getAdapterManager getAdapter

private String f File null public Ant Import Node Task task Attributes attributes super task f File attributes get Value I Ant Model Constants ATTR FILE  fFile AntImportNode fFile getValue IAntModelConstants ATTR_FILE
public String get File return f File  getFile fFile
see org eclipse ant internal ui editor model Ant Element Node get Base Image Descriptor protected Image Descriptor get Base Image Descriptor return AntUI Images get Image Descriptor I AntUI Constants IMG ANT IMPORT  AntElementNode getBaseImageDescriptor ImageDescriptor getBaseImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_ANT_IMPORT
public String get Label String Buffer label new String Buffer get Task get Task Name label append label append f File if is External append Entity Name label return label to String  getLabel StringBuffer StringBuffer getTask getTaskName fFile isExternal appendEntityName toString
Execute the import Returns code true code as the import adds to the Ant model public boolean configure boolean validate Fully if configured return false try get Task maybe Configure get Task execute configured true return true catch Build Exception be handle Build Exception be Ant Editor Preference Constants PROBLEM IMPORTS return false  validateFully getTask maybeConfigure getTask BuildException handleBuildException AntEditorPreferenceConstants PROBLEM_IMPORTS
public I File getI File I File file if is External file Ant Util get File For Location get File Path null else String path get File file Ant Util get File For Location path get Ant Model get Edited File get Parent File return file  IFile getIFile IFile isExternal AntUtil getFileForLocation getFilePath getFile AntUtil getFileForLocation getAntModel getEditedFile getParentFile

Resource Bundle get Bundle BUNDLE NAME private Ant Model Messages  ResourceBundle getBundle BUNDLE_NAME AntModelMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public Ant Project Node Ant Model Project project Ant Model ant Model super project NON NLS 1 f Project project f Model ant Model  AntProjectNode AntModelProject AntModel antModel fProject fModel antModel
public String get Label String project Name f Project get Name if project Name null project Name length 0 project Name project NON NLS 1 return project Name  getLabel projectName fProject getName projectName projectName projectName projectName
see org eclipse ant internal ui editor model Ant Element Node get Base Image Descriptor protected Image Descriptor get Base Image Descriptor return AntUI Images get Image Descriptor I AntUI Constants IMG ANT PROJECT  AntElementNode getBaseImageDescriptor ImageDescriptor getBaseImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_ANT_PROJECT
Returns the Ant project associated with this project node return the Ant project public Project get Project return f Project  getProject fProject
protected Ant Model get Ant Model return f Model  AntModel getAntModel fModel
public void reset super reset f Project reset if f Name To Defining Node Map null get Ant Model set Names Of Old Defining Nodes f Name To Defining Node Map key Set f Name To Defining Node Map null set Problem Severity XML Problem NO PROBLEM  fProject fNameToDefiningNodeMap getAntModel setNamesOfOldDefiningNodes fNameToDefiningNodeMap keySet fNameToDefiningNodeMap setProblemSeverity XMLProblem NO_PROBLEM
public void add Defining Task Node Ant Defining Task Node node if f Name To Defining Node Map null f Name To Defining Node Map new Hash Map String label node get Label if label equals Ignore Case macrodef NON NLS 1 label equals Ignore Case presetdef NON NLS 1 label equals Ignore Case typedef NON NLS 1 label equals Ignore Case taskdef NON NLS 1 only add user defined names return f Name To Defining Node Map put node get Label node  addDefiningTaskNode AntDefiningTaskNode fNameToDefiningNodeMap fNameToDefiningNodeMap HashMap getLabel equalsIgnoreCase equalsIgnoreCase equalsIgnoreCase equalsIgnoreCase fNameToDefiningNodeMap getLabel
public Ant Defining Task Node get Definining Task Node String node Name if f Name To Defining Node Map null return Ant Defining Task Node f Name To Defining Node Map get node Name return null  AntDefiningTaskNode getDefininingTaskNode nodeName fNameToDefiningNodeMap AntDefiningTaskNode fNameToDefiningNodeMap nodeName

public Ant Property Node Task task Attributes attributes super task String label attributes get Value I Ant Model Constants ATTR NAME if label null label attributes get Value I Ant Model Constants ATTR FILE if label null label file label NON NLS 1 else label attributes get Value I Ant Model Constants ATTR RESOURCE if label null label resource label NON NLS 1 else label attributes get Value I Ant Model Constants ATTR ENVIRONMENT if label null label environment label NON NLS 1 else f Value attributes get Value I Ant Model Constants ATTR VALUE set Label label  AntPropertyNode getValue IAntModelConstants ATTR_NAME getValue IAntModelConstants ATTR_FILE getValue IAntModelConstants ATTR_RESOURCE getValue IAntModelConstants ATTR_ENVIRONMENT fValue getValue IAntModelConstants ATTR_VALUE setLabel
public String get Value return f Value  getValue fValue
see org eclipse ant internal ui editor model Ant Element Node get Base Image Descriptor protected Image Descriptor get Base Image Descriptor return AntUI Images get Image Descriptor I AntUI Constants IMG PROPERTY  AntElementNode getBaseImageDescriptor ImageDescriptor getBaseImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_PROPERTY
Sets the property in the project public boolean configure boolean validate Fully if configured return false try get Task maybe Configure get Task execute configured true catch Build Exception be handle Build Exception be Ant Editor Preference Constants PROBLEM PROPERTIES return false  validateFully getTask maybeConfigure getTask BuildException handleBuildException AntEditorPreferenceConstants PROBLEM_PROPERTIES

private Target f Target null public Ant Target Node Target target super target NON NLS 1 f Target target  fTarget AntTargetNode fTarget
public String get Label String target Name f Target get Name if target Name null target Name target NON NLS 1 set Problem Severity XML Problem SEVERITY ERROR String Buffer display Name new String Buffer target Name if is Default Target display Name append Ant Model Messages get String Ant Target Node 2 NON NLS 1 if is External append Entity Name display Name return display Name to String  getLabel targetName fTarget getName targetName targetName setProblemSeverity XMLProblem SEVERITY_ERROR StringBuffer displayName StringBuffer targetName isDefaultTarget displayName AntModelMessages getString AntTargetNode isExternal appendEntityName displayName displayName toString
public Target get Target return f Target  getTarget fTarget
public boolean is Default Target String target Name f Target get Name if target Name null return false return target Name equals f Target get Project get Default Target  isDefaultTarget targetName fTarget getName targetName targetName fTarget getProject getDefaultTarget
protected Image Descriptor get Base Image Descriptor Image Descriptor base null if is Default Target base AntUI Images get Image Descriptor I AntUI Constants IMG ANT DEFAULT TARGET else if get Target get Description null base AntUI Images get Image Descriptor I AntUI Constants IMG ANT TARGET INTERNAL else base AntUI Images get Image Descriptor I AntUI Constants IMG ANT TARGET return base  ImageDescriptor getBaseImageDescriptor ImageDescriptor isDefaultTarget AntUIImages getImageDescriptor IAntUIConstants IMG_ANT_DEFAULT_TARGET getTarget getDescription AntUIImages getImageDescriptor IAntUIConstants IMG_ANT_TARGET_INTERNAL AntUIImages getImageDescriptor IAntUIConstants IMG_ANT_TARGET
param target The Target to set public void set Target Target target f Target target  setTarget fTarget
public void reset super reset Map current Targets f Target get Project get Targets if current Targets get f Target get Name null current Targets remove f Target get Name  currentTargets fTarget getProject getTargets currentTargets fTarget getName currentTargets fTarget getName
Returns the name of a missing dependency or code null code if all dependencies exist in the project public String check Dependencies Enumeration dependencies f Target get Dependencies while dependencies has More Elements String dependency String dependencies next Element if f Target get Project get Targets get dependency null return dependency return null  checkDependencies fTarget getDependencies hasMoreElements nextElement fTarget getProject getTargets

protected boolean configured false public Ant Task Node Task task super task get Task Name f Task task  AntTaskNode getTaskName fTask
public Ant Task Node Task task String label super task get Task Name f Task task f Label label  AntTaskNode getTaskName fTask fLabel
public String get Label String Buffer label new String Buffer if f Label null label append f Label else if f Id null label append f Id else label append f Task get Task Name if is External append Entity Name label return label to String  getLabel StringBuffer StringBuffer fLabel fLabel fId fId fTask getTaskName isExternal appendEntityName toString
public void set Label String label f Label label  setLabel fLabel
public Task get Task return f Task  getTask fTask
public void set Task Task task f Task task  setTask fTask
protected Image Descriptor get Base Image Descriptor if f Id null return AntUI Images get Image Descriptor I AntUI Constants IMG ANT TYPE return super get Base Image Descriptor  ImageDescriptor getBaseImageDescriptor fId AntUIImages getImageDescriptor IAntUIConstants IMG_ANT_TYPE getBaseImageDescriptor
The reference id for this task param id The reference id for this task public void set Id String id f Id id  setId fId
Returns the reference id for this task or code null code if it has no reference id return The reference id for this task public String get Id return f Id  getId fId
Configures the associated task if required Allows subclasses to do specific configuration such as executing the task by calling code node Specific Configure code return whether the configuration of this node could have impact on other nodes public boolean configure boolean validate Fully if validate Fully get Parent Node instanceof Ant Task Node return false if configured return false try get Task maybe Configure node Specific Configure configured true return true catch Build Exception be handle Build Exception be Ant Editor Preference Constants PROBLEM TASKS return false  nodeSpecificConfigure validateFully validateFully getParentNode AntTaskNode getTask maybeConfigure nodeSpecificConfigure BuildException handleBuildException AntEditorPreferenceConstants PROBLEM_TASKS
protected void node Specific Configure by default do nothing  nodeSpecificConfigure
protected void handle Build Exception Build Exception be String preference Key int severity XML Problem get Severity preference Key if severity XML Problem NO PROBLEM get Ant Model handle Build Exception be this severity  handleBuildException BuildException preferenceKey XMLProblem getSeverity preferenceKey XMLProblem NO_PROBLEM getAntModel handleBuildException

public Open Declaration Action Ant Editor ant Editor super ant Editor get Site f Editor ant Editor set Action Definition Id I Java Editor Action Definition Ids OPEN EDITOR ant Editor get Site get Key Binding Service register Action this set Text Ant Editor Messages get String Open Declaration Action 0 NON NLS 1 set Description Ant Editor Messages get String Open Declaration Action 1 NON NLS 1 set Tool Tip Text Ant Editor Messages get String Open Declaration Action 1 NON NLS 1  OpenDeclarationAction AntEditor antEditor antEditor getSite fEditor antEditor setActionDefinitionId IJavaEditorActionDefinitionIds OPEN_EDITOR antEditor getSite getKeyBindingService registerAction setText AntEditorMessages getString OpenDeclarationAction setDescription AntEditorMessages getString OpenDeclarationAction setToolTipText AntEditorMessages getString OpenDeclarationAction
public void run if f Editor null return f Editor open Reference Element  fEditor fEditor openReferenceElement
see org eclipse jdt ui actions Selection Dispatch Action selection Changed org eclipse jface text I Text Selection public void selection Changed I Text Selection selection set Enabled f Editor null  SelectionDispatchAction selectionChanged ITextSelection selectionChanged ITextSelection setEnabled fEditor
public void set Editor Ant Editor editor f Editor editor  setEditor AntEditor fEditor

Returns whether the given target is an internal target Internal targets are targets which have no description The default target is never considered internal public boolean select Viewer viewer Object parent Element Object element if element instanceof Ant Target Node Target target Ant Target Node element get Target return target get Description null Ant Target Node element is Default Target return true  parentElement AntTargetNode AntTargetNode getTarget getDescription AntTargetNode isDefaultTarget
Returns whether the given link Ant Element Node is imported from another file public boolean select Viewer viewer Object parent Element Object element if element instanceof Ant Element Node Ant Element Node node Ant Element Node element if node get Import Node null node is External if node instanceof Ant Target Node Ant Target Node node is Default Target return true return false return true  AntElementNode parentElement AntElementNode AntElementNode AntElementNode getImportNode isExternal AntTargetNode AntTargetNode isDefaultTarget
public boolean select Viewer viewer Object parent Element Object element if element instanceof Ant Property Node return false return true  parentElement AntPropertyNode
public boolean select Viewer viewer Object parent Element Object element if element instanceof Ant Task Node if parent Element instanceof Ant Project Node return false return true  parentElement AntTaskNode parentElement AntProjectNode
private class Ant Outline Sorter extends Viewer Sorter see org eclipse jface viewers Viewer Sorter compare org eclipse jface viewers Viewer java lang Object java lang Object public int compare Viewer viewer Object e1 Object e2 if e1 instanceof Ant Element Node e2 instanceof Ant Element Node return super compare viewer e1 e2 String name1 Ant Element Node e1 get Label String name2 Ant Element Node e2 get Label return get Collator compare name1 name2  AntOutlineSorter ViewerSorter ViewerSorter AntElementNode AntElementNode AntElementNode getLabel AntElementNode getLabel getCollator
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
do nothing see org eclipse jface viewers I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
public Object get Children Object parent Node Ant Element Node temp Parent Element Ant Element Node parent Node if temp Parent Element has Children List children temp Parent Element get Child Nodes return children to Array return EMPTY ARRAY  getChildren parentNode AntElementNode tempParentElement AntElementNode parentNode tempParentElement hasChildren tempParentElement getChildNodes toArray EMPTY_ARRAY
see org eclipse jface viewers I Tree Content Provider get Parent Object public Object get Parent Object a Node Ant Element Node temp Element Ant Element Node a Node return temp Element get Parent Node  ITreeContentProvider getParent getParent aNode AntElementNode tempElement AntElementNode aNode tempElement getParentNode
see org eclipse jface viewers I Tree Content Provider has Children Object public boolean has Children Object a Node return Ant Element Node a Node has Children  ITreeContentProvider hasChildren hasChildren aNode AntElementNode aNode hasChildren
see org eclipse jface viewers I Structured Content Provider get Elements Object public Object get Elements Object an Input Element return Ant Model an Input Element get Root Elements  IStructuredContentProvider getElements getElements anInputElement AntModel anInputElement getRootElements
see org eclipse jface viewers I Label Provider get Image Object public Image get Image Object an Element Ant Element Node node Ant Element Node an Element return node get Image  ILabelProvider getImage getImage anElement AntElementNode AntElementNode anElement getImage
see org eclipse jface viewers I Label Provider get Text Object public String get Text Object node Ant Element Node element Ant Element Node node return element get Label  ILabelProvider getText getText AntElementNode AntElementNode getLabel
public Color get Foreground Object node if node instanceof Ant Target Node Ant Target Node node is Default Target return Display get Default get System Color SWT COLOR BLUE return null  getForeground AntTargetNode AntTargetNode isDefaultTarget getDefault getSystemColor COLOR_BLUE
public Color get Background Object element return null  getBackground
Sets whether internal targets should be filtered out of the outline param filter whether or not internal targets should be filtered out protected void set Filter Internal Targets boolean filter f Filter Internal Targets filter set Filter filter get Internal Targets Filter I AntUI Preference Constants ANTEDITOR FILTER INTERNAL TARGETS  setFilterInternalTargets fFilterInternalTargets setFilter getInternalTargetsFilter IAntUIPreferenceConstants ANTEDITOR_FILTER_INTERNAL_TARGETS
Sets whether imported elements should be filtered out of the outline param filter whether or not imported elements should be filtered out protected void set Filter Imported Elements boolean filter f Filter Imported Elements filter set Filter filter get Imported Elements Filter I AntUI Preference Constants ANTEDITOR FILTER IMPORTED ELEMENTS  setFilterImportedElements fFilterImportedElements setFilter getImportedElementsFilter IAntUIPreferenceConstants ANTEDITOR_FILTER_IMPORTED_ELEMENTS
private void set Filter boolean filter Viewer Filter viewer Filter String name if filter get Tree Viewer add Filter viewer Filter else get Tree Viewer remove Filter viewer Filter AntUI Plugin get Default get Preference Store set Value name filter get Tree Viewer refresh  setFilter ViewerFilter viewerFilter getTreeViewer addFilter viewerFilter getTreeViewer removeFilter viewerFilter AntUIPlugin getDefault getPreferenceStore setValue getTreeViewer
Sets whether properties should be filtered out of the outline param filter whether or not properties should be filtered out protected void set Filter Properties boolean filter f Filter Properties filter set Filter filter get Properties Filter I AntUI Preference Constants ANTEDITOR FILTER PROPERTIES  setFilterProperties fFilterProperties setFilter getPropertiesFilter IAntUIPreferenceConstants ANTEDITOR_FILTER_PROPERTIES
Sets whether internal targets should be filtered out of the outline param filter whether or not internal targets should be filtered out protected void set Filter Top Level boolean filter f Filter Top Level filter set Filter filter get Top Level Filter I AntUI Preference Constants ANTEDITOR FILTER TOP LEVEL  setFilterTopLevel fFilterTopLevel setFilter getTopLevelFilter IAntUIPreferenceConstants ANTEDITOR_FILTER_TOP_LEVEL
private Viewer Filter get Internal Targets Filter if f Internal Target Filter null f Internal Target Filter new Internal Target Filter return f Internal Target Filter  ViewerFilter getInternalTargetsFilter fInternalTargetFilter fInternalTargetFilter InternalTargetFilter fInternalTargetFilter
private Viewer Filter get Imported Elements Filter if f Imported Elements Filter null f Imported Elements Filter new Imported Elements Filter return f Imported Elements Filter  ViewerFilter getImportedElementsFilter fImportedElementsFilter fImportedElementsFilter ImportedElementsFilter fImportedElementsFilter
private Viewer Filter get Properties Filter if f Properties Filter null f Properties Filter new Properties Filter return f Properties Filter  ViewerFilter getPropertiesFilter fPropertiesFilter fPropertiesFilter PropertiesFilter fPropertiesFilter
private Viewer Filter get Top Level Filter if f Top Level Filter null f Top Level Filter new Top Level Filter return f Top Level Filter  ViewerFilter getTopLevelFilter fTopLevelFilter fTopLevelFilter TopLevelFilter fTopLevelFilter
Returns whether internal targets are currently being filtered out of the outline return whether or not internal targets are being filtered out protected boolean filter Internal Targets return f Filter Internal Targets  filterInternalTargets fFilterInternalTargets
Returns whether imported elements are currently being filtered out of the outline return whether or not imported elements are being filtered out protected boolean filter Imported Elements return f Filter Imported Elements  filterImportedElements fFilterImportedElements
Returns whether properties are currently being filtered out of the outline return whether or not properties are being filtered out protected boolean filter Properties return f Filter Properties  filterProperties fFilterProperties
Returns whether top level tasks types are currently being filtered out of the outline return whether or not top level tasks types are being filtered out protected boolean filter Top Level return f Filter Top Level  filterTopLevel fFilterTopLevel
Sets whether elements should be sorted in the outline param sort whether or not elements should be sorted protected void set Sort boolean sort f Sort sort if sort if f Sorter null f Sorter new Ant Outline Sorter get Tree Viewer set Sorter f Sorter else get Tree Viewer set Sorter null AntUI Plugin get Default get Preference Store set Value I AntUI Preference Constants ANTEDITOR SORT sort  setSort fSort fSorter fSorter AntOutlineSorter getTreeViewer setSorter fSorter getTreeViewer setSorter AntUIPlugin getDefault getPreferenceStore setValue IAntUIPreferenceConstants ANTEDITOR_SORT
Returns whether elements are currently being sorted return whether elements are currently being sorted protected boolean is Sort return f Sort  isSort fSort
Creates a new Ant Editor Content Outline Page public Ant Editor Content Outline Page XML Core core Ant Editor editor super f Core core f Filter Internal Targets AntUI Plugin get Default get Preference Store get Boolean I AntUI Preference Constants ANTEDITOR FILTER INTERNAL TARGETS f Filter Imported Elements AntUI Plugin get Default get Preference Store get Boolean I AntUI Preference Constants ANTEDITOR FILTER IMPORTED ELEMENTS f Filter Properties AntUI Plugin get Default get Preference Store get Boolean I AntUI Preference Constants ANTEDITOR FILTER PROPERTIES f Filter Top Level AntUI Plugin get Default get Preference Store get Boolean I AntUI Preference Constants ANTEDITOR FILTER TOP LEVEL f Sort AntUI Plugin get Default get Preference Store get Boolean I AntUI Preference Constants ANTEDITOR SORT f Editor editor  AntEditorContentOutlinePage AntEditorContentOutlinePage XMLCore AntEditor fCore fFilterInternalTargets AntUIPlugin getDefault getPreferenceStore getBoolean IAntUIPreferenceConstants ANTEDITOR_FILTER_INTERNAL_TARGETS fFilterImportedElements AntUIPlugin getDefault getPreferenceStore getBoolean IAntUIPreferenceConstants ANTEDITOR_FILTER_IMPORTED_ELEMENTS fFilterProperties AntUIPlugin getDefault getPreferenceStore getBoolean IAntUIPreferenceConstants ANTEDITOR_FILTER_PROPERTIES fFilterTopLevel AntUIPlugin getDefault getPreferenceStore getBoolean IAntUIPreferenceConstants ANTEDITOR_FILTER_TOP_LEVEL fSort AntUIPlugin getDefault getPreferenceStore getBoolean IAntUIPreferenceConstants ANTEDITOR_SORT fEditor
public void dispose if menu null menu dispose if open With Menu null open With Menu dispose if f Listener null f Core remove Document Model Listener f Listener f Listener null  openWithMenu openWithMenu fListener fCore removeDocumentModelListener fListener fListener
manager set Remove All When Shown true manager add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager menu Manager context Menu About To Show menu Manager  setRemoveAllWhenShown addMenuListener IMenuListener menuAboutToShow IMenuManager menuManager contextMenuAboutToShow menuManager
viewer add Post Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event fire Post Selection Changed event get Selection  addPostSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent firePostSelectionChanged getSelection
Creates the control outline view for this page public void create Control Composite parent super create Control parent Tree Viewer viewer get Tree Viewer We might want to implement our own content provider This content provider should be able to work on a dom like tree structure that resembles the file contents viewer set Content Provider new Content Provider set Sort f Sort We probably also need our own label provider viewer set Label Provider new Label Provider if f Model null set Viewer Input f Model Menu Manager manager new Menu Manager Pop Up NON NLS 1 manager set Remove All When Shown true manager add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager menu Manager context Menu About To Show menu Manager menu manager create Context Menu viewer get Tree viewer get Tree set Menu menu I Page Site site get Site site register Context Menu I AntUI Constants PLUGIN ID ant Editor Outline manager viewer NON NLS 1 I Tool Bar Manager tbm site get Action Bars get Tool Bar Manager tbm add new Toggle Sort Ant Outline Action this tbm add new Filter Internal Targets Action this tbm add new Filter Properties Action this tbm add new Filter Imported Elements Action this tbm add new Filter Top Level Action this I Menu Manager view Menu site get Action Bars get Menu Manager view Menu add new Toggle Link With Editor Action f Editor open With Menu new Ant Open With Menu this get Site get Page viewer add Post Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event fire Post Selection Changed event get Selection set Filter Internal Targets f Filter Internal Targets set Filter Imported Elements f Filter Imported Elements set Filter Properties f Filter Properties set Filter Top Level f Filter Top Level  createControl createControl TreeViewer getTreeViewer setContentProvider ContentProvider setSort fSort setLabelProvider LabelProvider fModel setViewerInput fModel MenuManager MenuManager PopUp setRemoveAllWhenShown addMenuListener IMenuListener menuAboutToShow IMenuManager menuManager contextMenuAboutToShow menuManager createContextMenu getTree getTree setMenu IPageSite getSite registerContextMenu IAntUIConstants PLUGIN_ID antEditorOutline IToolBarManager getActionBars getToolBarManager ToggleSortAntOutlineAction FilterInternalTargetsAction FilterPropertiesAction FilterImportedElementsAction FilterTopLevelAction IMenuManager viewMenu getActionBars getMenuManager viewMenu ToggleLinkWithEditorAction fEditor openWithMenu AntOpenWithMenu getSite getPage addPostSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent firePostSelectionChanged getSelection setFilterInternalTargets fFilterInternalTargets setFilterImportedElements fFilterImportedElements setFilterProperties fFilterProperties setFilterTopLevel fFilterTopLevel
private void set Viewer Input Object new Input Tree Viewer tree get Tree Viewer Object old Input tree get Input boolean is Ant Model new Input instanceof Ant Model boolean was Ant Model old Input instanceof Ant Model if is Ant Model was Ant Model if f Listener null f Listener create Ant Model Change Listener f Core add Document Model Listener f Listener else if is Ant Model was Ant Model f Listener null f Core remove Document Model Listener f Listener f Listener null tree set Input new Input if is Ant Model update Tree Expansion  setViewerInput newInput TreeViewer getTreeViewer oldInput getInput isAntModel newInput AntModel wasAntModel oldInput AntModel isAntModel wasAntModel fListener fListener createAntModelChangeListener fCore addDocumentModelListener fListener isAntModel wasAntModel fListener fCore removeDocumentModelListener fListener fListener setInput newInput isAntModel updateTreeExpansion
public void set Page Input Ant Model xml Model f Model xml Model if get Tree Viewer null set Viewer Input f Model  setPageInput AntModel xmlModel fModel xmlModel getTreeViewer setViewerInput fModel
get Control get Display async Exec new Runnable public void run Control ctrl get Control if ctrl null ctrl is Disposed get Tree Viewer refresh update Tree Expansion  getControl getDisplay asyncExec getControl isDisposed getTreeViewer updateTreeExpansion
return new I Document Model Listener public void document Model Changed final Document Model Change Event event if event get Model f Model get Control is Disposed get Control get Display async Exec new Runnable public void run Control ctrl get Control if ctrl null ctrl is Disposed get Tree Viewer refresh update Tree Expansion  IDocumentModelListener documentModelChanged DocumentModelChangeEvent getModel fModel getControl isDisposed getControl getDisplay asyncExec getControl isDisposed getTreeViewer updateTreeExpansion
private I Document Model Listener create Ant Model Change Listener return new I Document Model Listener public void document Model Changed final Document Model Change Event event if event get Model f Model get Control is Disposed get Control get Display async Exec new Runnable public void run Control ctrl get Control if ctrl null ctrl is Disposed get Tree Viewer refresh update Tree Expansion  IDocumentModelListener createAntModelChangeListener IDocumentModelListener documentModelChanged DocumentModelChangeEvent getModel fModel getControl isDisposed getControl getDisplay asyncExec getControl isDisposed getTreeViewer updateTreeExpansion
public void add Post Selection Changed Listener I Selection Changed Listener listener f Post Selection Changed Listeners add listener  addPostSelectionChangedListener ISelectionChangedListener fPostSelectionChangedListeners
public void remove Post Selection Changed Listener I Selection Changed Listener listener f Post Selection Changed Listeners remove listener  removePostSelectionChangedListener ISelectionChangedListener fPostSelectionChangedListeners
private void update Tree Expansion boolean was Model Empty f Is Model Empty f Is Model Empty f Model null f Model get Root Elements null f Model get Root Elements length 0 if was Model Empty f Is Model Empty get Tree Viewer expand To Level EXPAND TO LEVEL  updateTreeExpansion wasModelEmpty fIsModelEmpty fIsModelEmpty fModel fModel getRootElements fModel getRootElements wasModelEmpty fIsModelEmpty getTreeViewer expandToLevel EXPAND_TO_LEVEL
private void fire Post Selection Changed I Selection selection create an event Selection Changed Event event new Selection Changed Event this selection fire the event Object listeners f Post Selection Changed Listeners get Listeners for int i 0 i listeners length i I Selection Changed Listener listeners i selection Changed event  firePostSelectionChanged ISelection SelectionChangedEvent SelectionChangedEvent fPostSelectionChangedListeners getListeners ISelectionChangedListener selectionChanged
private void context Menu About To Show I Menu Manager menu Manager if should Add Open With Menu add Open With Menu menu Manager menu Manager add new Separator I Workbench Action Constants MB ADDITIONS  contextMenuAboutToShow IMenuManager menuManager shouldAddOpenWithMenu addOpenWithMenu menuManager menuManager IWorkbenchActionConstants MB_ADDITIONS
private void add Open With Menu I Menu Manager menu Manager Ant Element Node element get Selected Node I File file element getI File if file null menu Manager add new Separator group open NON NLS 1 I Menu Manager submenu new Menu Manager Ant Outline Messages get String Ant Editor Content Outline Page Open With 1 NON NLS 1 open With Menu set File file if element get Import Node null int line And Column element get External Info open With Menu set External Info line And Column 0 line And Column 1 submenu add open With Menu menu Manager append To Group group open submenu NON NLS 1  addOpenWithMenu IMenuManager menuManager AntElementNode getSelectedNode IFile getIFile menuManager IMenuManager MenuManager AntOutlineMessages getString AntEditorContentOutlinePage Open_With_1 openWithMenu setFile getImportNode lineAndColumn getExternalInfo openWithMenu setExternalInfo lineAndColumn lineAndColumn openWithMenu menuManager appendToGroup
private boolean should Add Open With Menu Ant Element Node node get Selected Node if node instanceof Ant Import Node return true if node null node is External String path node get File Path if path null path length 0 return true return false  shouldAddOpenWithMenu AntElementNode getSelectedNode AntImportNode isExternal getFilePath
private Ant Element Node get Selected Node I Selection iselection get Selection if iselection instanceof I Structured Selection I Structured Selection selection I Structured Selection iselection if selection size 1 Object selected selection get First Element if selected instanceof Ant Element Node return Ant Element Node selected return null  AntElementNode getSelectedNode ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement AntElementNode AntElementNode
public Object get Adapter Class key if key I Show In Source class return this return null  getAdapter IShowInSource
public Show In Context get Show In Context I File file null if f Model null Ant Element Node node get Selected Node file node getI File if file null I Selection selection new Structured Selection file return new Show In Context null selection return null  ShowInContext getShowInContext IFile fModel AntElementNode getSelectedNode getIFile ISelection StructuredSelection ShowInContext
public void select Ant Element Node node if get Tree Viewer null I Selection s get Tree Viewer get Selection if s instanceof I Structured Selection I Structured Selection ss I Structured Selection s List nodes ss to List if nodes contains node s node null Structured Selection EMPTY new Structured Selection node get Tree Viewer set Selection s true  AntElementNode getTreeViewer ISelection getTreeViewer getSelection IStructuredSelection IStructuredSelection IStructuredSelection toList StructuredSelection StructuredSelection getTreeViewer setSelection

public Ant Editor Marker Updater Job List problems super Ant editor marker updater job NON NLS 1 f Problems problems set System true  AntEditorMarkerUpdaterJob fProblems setSystem
see org eclipse core internal resources Workspace Job run In Workspace org eclipse core runtime I Progress Monitor public I Status run In Workspace I Progress Monitor monitor update Markers0 f Problems return new Status I Status OK AntUI Plugin get Unique Identifier I Status OK null NON NLS 1  WorkspaceJob runInWorkspace IProgressMonitor IStatus runInWorkspace IProgressMonitor updateMarkers0 fProblems IStatus AntUIPlugin getUniqueIdentifier IStatus
public synchronized void accept Problem I Problem problem if f Collected Problems contains problem return f Collected Problems add problem  acceptProblem IProblem fCollectedProblems fCollectedProblems
public synchronized void begin Reporting f Collected Problems clear  beginReporting fCollectedProblems
private void remove Problems I File file get File if file null file exists return try file delete Markers BUILDFILE PROBLEM MARKER false I Resource DEPTH INFINITE catch Core Exception e AntUI Plugin log e  removeProblems IFile getFile deleteMarkers BUILDFILE_PROBLEM_MARKER IResource DEPTH_INFINITE CoreException AntUIPlugin
private void create Marker I Problem problem I File file get File Map attributes get Marker Attributes problem try Marker Utilities create Marker file attributes BUILDFILE PROBLEM MARKER catch Core Exception e AntUI Plugin log e  createMarker IProblem IFile getFile getMarkerAttributes MarkerUtilities createMarker BUILDFILE_PROBLEM_MARKER CoreException AntUIPlugin
public void set Model Ant Model model f Model model  setModel AntModel fModel
public synchronized void update Markers I File file get File if file null List problems new Array List f Collected Problems size Iterator e f Collected Problems iterator while e has Next problems add e next f Collected Problems clear Ant Editor Marker Updater Job job new Ant Editor Marker Updater Job problems job set Rule Resources Plugin get Workspace get Rule Factory marker Rule file job schedule  updateMarkers IFile getFile ArrayList fCollectedProblems fCollectedProblems hasNext fCollectedProblems AntEditorMarkerUpdaterJob AntEditorMarkerUpdaterJob setRule ResourcesPlugin getWorkspace getRuleFactory markerRule
private void update Markers0 List problems remove Problems if should Add Markers return if problems size 0 Iterator e problems iterator while e has Next I Problem problem I Problem e next create Marker problem  updateMarkers0 removeProblems shouldAddMarkers hasNext IProblem IProblem createMarker
private I File get File if f File null f File f Model get File return f File  IFile getFile fFile fFile fModel getFile fFile
Returns the attributes with which a newly created marker will be initialized return the initial marker attributes private Map get Marker Attributes I Problem problem Map attributes new Hash Map 11 int severity I Marker SEVERITY ERROR if problem is Warning severity I Marker SEVERITY WARNING marker line numbers are 1 based Marker Utilities set Message attributes problem get Unmodified Message Marker Utilities set Line Number attributes problem get Line Number Marker Utilities set Char Start attributes problem get Offset Marker Utilities set Char End attributes problem get Offset problem get Length attributes put I Marker SEVERITY new Integer severity return attributes  getMarkerAttributes IProblem HashMap IMarker SEVERITY_ERROR isWarning IMarker SEVERITY_WARNING MarkerUtilities setMessage getUnmodifiedMessage MarkerUtilities setLineNumber getLineNumber MarkerUtilities setCharStart getOffset MarkerUtilities setCharEnd getOffset getLength IMarker
Returns whether or not to add markers to the file based on the file s content type The content type is considered an Ant buildfile if the XML has a root quot project quot element Content type is defined in the org eclipse ant core plugin xml return whether or not to add markers to the file based on the files content type private boolean should Add Markers I File file get File if file null file exists return false I Content Description description try description file get Content Description catch Core Exception e return false if description null I Content Type type description get Content Type return type null Ant Core Plugin ANT BUILDFILE CONTENT TYPE equals type get Id return false  shouldAddMarkers IFile getFile IContentDescription getContentDescription CoreException IContentType getContentType AntCorePlugin ANT_BUILDFILE_CONTENT_TYPE getId

private Preferences I Property Change Listener f Core Property Change Listener new Preferences I Property Change Listener public void property Change Preferences Property Change Event event if event get Property equals I Ant Core Constants PREFERENCE CLASSPATH CHANGED if Boolean event get New Value Boolean TRUE reconcile For Property Change true  IPropertyChangeListener fCorePropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty IAntCoreConstants PREFERENCE_CLASSPATH_CHANGED getNewValue reconcileForPropertyChange
private Preferences I Property Change Listener fUI Property Change Listener new Preferences I Property Change Listener public void property Change Preferences Property Change Event event String property event get Property if property equals Ant Editor Preference Constants PROBLEM AntUI Plugin get Default get Plugin Preferences remove Property Change Listener fUI Property Change Listener reconcile For Property Change false AntUI Plugin get Default get Plugin Preferences set To Default Ant Editor Preference Constants PROBLEM AntUI Plugin get Default get Plugin Preferences add Property Change Listener fUI Property Change Listener else if property equals Ant Editor Preference Constants CODEASSIST USER DEFINED TASKS if Boolean event get New Value boolean Value reconcile For Property Change false  IPropertyChangeListener fUIPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty AntEditorPreferenceConstants AntUIPlugin getDefault getPluginPreferences removePropertyChangeListener fUIPropertyChangeListener reconcileForPropertyChange AntUIPlugin getDefault getPluginPreferences setToDefault AntEditorPreferenceConstants AntUIPlugin getDefault getPluginPreferences addPropertyChangeListener fUIPropertyChangeListener AntEditorPreferenceConstants CODEASSIST_USER_DEFINED_TASKS getNewValue booleanValue reconcileForPropertyChange
public Ant Model XML Core core I Document document I Problem Requestor problem Requestor Location Provider location Provider f Core core f Document document f Problem Requestor problem Requestor f Marker Updater new Ant Editor Marker Updater f Marker Updater set Model this f Location Provider location Provider Ant Core Plugin get Plugin get Plugin Preferences add Property Change Listener f Core Property Change Listener AntUI Plugin get Default get Plugin Preferences add Property Change Listener fUI Property Change Listener Ant Defining Task Node set Java Class Path fg Instance Count  AntModel XMLCore IDocument IProblemRequestor problemRequestor LocationProvider locationProvider fCore fDocument fProblemRequestor problemRequestor fMarkerUpdater AntEditorMarkerUpdater fMarkerUpdater setModel fLocationProvider locationProvider AntCorePlugin getPlugin getPluginPreferences addPropertyChangeListener fCorePropertyChangeListener AntUIPlugin getDefault getPluginPreferences addPropertyChangeListener fUIPropertyChangeListener AntDefiningTaskNode setJavaClassPath fgInstanceCount
private void reconcile For Property Change boolean classpath Changed if classpath Changed fg Class Loader null Ant Defining Task Node set Java Class Path f Is Dirty true reconcile null f Core notify Document Model Listeners new Document Model Change Event this true f Marker Updater update Markers  reconcileForPropertyChange classpathChanged classpathChanged fgClassLoader AntDefiningTaskNode setJavaClassPath fIsDirty fCore notifyDocumentModelListeners DocumentModelChangeEvent fMarkerUpdater updateMarkers
f Listener new I Document Listener public void document About To Be Changed Document Event event synchronized f Dirty Lock f Is Dirty true  fListener IDocumentListener documentAboutToBeChanged DocumentEvent fDirtyLock fIsDirty
public void document Changed Document Event event  documentChanged DocumentEvent
public void install f Listener new I Document Listener public void document About To Be Changed Document Event event synchronized f Dirty Lock f Is Dirty true public void document Changed Document Event event f Document add Document Listener f Listener  fListener IDocumentListener documentAboutToBeChanged DocumentEvent fDirtyLock fIsDirty documentChanged DocumentEvent fDocument addDocumentListener fListener
public void dispose synchronized this if f Document null f Document remove Document Listener f Listener f Document null f Core null Project Helper set Ant Model null Ant Core Plugin get Plugin get Plugin Preferences remove Property Change Listener f Core Property Change Listener AntUI Plugin get Default get Plugin Preferences remove Property Change Listener fUI Property Change Listener fg Instance Count if fg Instance Count 0 fg Class Loader null if get Project Node null cleanup the introspection helpers that may have been generated Introspection Helper get Helper get Project Node get Project Ant Model class get Project Node get Project fire Build Finished null  fDocument fDocument removeDocumentListener fListener fDocument fCore ProjectHelper setAntModel AntCorePlugin getPlugin getPluginPreferences removePropertyChangeListener fCorePropertyChangeListener AntUIPlugin getDefault getPluginPreferences removePropertyChangeListener fUIPropertyChangeListener fgInstanceCount fgInstanceCount fgClassLoader getProjectNode IntrospectionHelper getHelper getProjectNode getProject AntModel getProjectNode getProject fireBuildFinished
public void reconcile Dirty Region region TODO turn off incremental as it is deferred to post 3 0 region null f Dirty Region region synchronized f Dirty Lock if f Is Dirty return if f Replace Has Occurred region null this is the removed part of a replace the insert region will be along shortly f Remove Length Of Replace region get Length f Replace Has Occurred false return f Is Dirty false synchronized this if f Core null disposed return if f Document null f Project Node null else reset region parse Document f Document region f Remove Length Of Replace 0 f Dirty Region null reconcile Task And Types f Core notify Document Model Listeners new Document Model Change Event this  DirtyRegion fDirtyRegion fDirtyLock fIsDirty fReplaceHasOccurred fRemoveLengthOfReplace getLength fReplaceHasOccurred fIsDirty fCore fDocument fProjectNode parseDocument fDocument fRemoveLengthOfReplace fDirtyRegion reconcileTaskAndTypes fCore notifyDocumentModelListeners DocumentModelChangeEvent
private void reset Dirty Region region TODO this could be better for incremental parsing cleaning up the task to node map do when a target is reset f Current Target Node null if region null f Still Open Elements new Stack f Task To Node new Hash Map f Task Nodes new Array List f Node Being Resolved null f Last Node null  DirtyRegion fCurrentTargetNode fStillOpenElements fTaskToNode HashMap fTaskNodes ArrayList fNodeBeingResolved fLastNode
public Ant Element Node get Root Elements reconcile null if f Project Node null return new Ant Element Node 0 return new Ant Element Node f Project Node  AntElementNode getRootElements fProjectNode AntElementNode AntElementNode fProjectNode
private void parse Document I Document input Dirty Region region boolean parsed true if input get Length 0 f Project Node null parsed false return Class Loader parsing Class Loader get Class Loader Class Loader original Class Loader Thread current Thread get Context Class Loader Thread current Thread set Context Class Loader parsing Class Loader boolean incremental false Project project null try String text To Parse null Project Helper project Helper null if region null f Project Node null full parse if f Project Node null f Project Node has Children f Project Node null project new Ant Model Project project Helper prepare For Full Parse project parsing Class Loader text To Parse input get the entire document else project f Project Node get Project project Helper Project Helper project get Reference ant project Helper NON NLS 1 text To Parse prepare For Full Incremental input else incremental project f Project Node get Project text To Parse prepare For Incremental Parse project region input if text To Parse null parsed false return incremental true project Helper Project Helper project get Reference ant project Helper NON NLS 1 begin Reporting Map references project get References references remove ant parsing context NON NLS 1 Project Helper set Ant Model this project Helper parse project text To Parse catch Build Exception e handle Build Exception e null finally Thread current Thread set Context Class Loader original Class Loader if parsed if incremental update After Incremental Change region true resolve Buildfile end Reporting project fire Build Finished null cleanup Introspection Helper f Incremental Target null  parseDocument IDocument DirtyRegion getLength fProjectNode ClassLoader parsingClassLoader getClassLoader ClassLoader originalClassLoader currentThread getContextClassLoader currentThread setContextClassLoader parsingClassLoader textToParse ProjectHelper projectHelper fProjectNode fProjectNode fProjectNode hasChildren fProjectNode AntModelProject projectHelper prepareForFullParse parsingClassLoader textToParse fProjectNode getProject projectHelper ProjectHelper getReference projectHelper textToParse prepareForFullIncremental fProjectNode getProject textToParse prepareForIncrementalParse textToParse projectHelper ProjectHelper getReference projectHelper beginReporting getReferences ProjectHelper setAntModel projectHelper textToParse BuildException handleBuildException currentThread setContextClassLoader originalClassLoader updateAfterIncrementalChange resolveBuildfile endReporting fireBuildFinished IntrospectionHelper fIncrementalTarget
private void update After Incremental Change Dirty Region region boolean update Project Length if f Project Node null return int edit Adjustment determine Edit Adjustment region if edit Adjustment 0 return if update Project Length edit within the project f Project Node set Length f Project Node get Length edit Adjustment else f Project Node set Offset f Project Node get Offset edit Adjustment if f Incremental Target null update Project Length f Project Node has Children List children f Project Node get Child Nodes int index children index Of f Incremental Target 1 update Nodes For Incremental Parse edit Adjustment children index  updateAfterIncrementalChange DirtyRegion updateProjectLength fProjectNode editAdjustment determineEditAdjustment editAdjustment updateProjectLength fProjectNode setLength fProjectNode getLength editAdjustment fProjectNode setOffset fProjectNode getOffset editAdjustment fIncrementalTarget updateProjectLength fProjectNode hasChildren fProjectNode getChildNodes indexOf fIncrementalTarget updateNodesForIncrementalParse editAdjustment
private void update Nodes For Incremental Parse int edit Adjustment List children int index Ant Element Node node for int i index i children size i node Ant Element Node children get i node set Offset node get Offset edit Adjustment if node has Children update Nodes For Incremental Parse edit Adjustment node get Child Nodes 0  updateNodesForIncrementalParse editAdjustment AntElementNode AntElementNode setOffset getOffset editAdjustment hasChildren updateNodesForIncrementalParse editAdjustment getChildNodes
private Project Helper prepare For Full Parse Project project Class Loader parsing Class Loader initialize Project project parsing Class Loader Ant s parsing facilities always works on a file therefore we need to determine the actual location of the file Though the file contents will not be parsed We parse the passed document string File file get Edited File String file Path NON NLS 1 if file null file Path file get Absolute Path project set User Property ant file file Path NON NLS 1 Project Helper project Helper new Project Helper this project Helper set Build File file project add Reference ant project Helper project Helper NON NLS 1 return project Helper  ProjectHelper prepareForFullParse ClassLoader parsingClassLoader initializeProject parsingClassLoader getEditedFile filePath filePath getAbsolutePath setUserProperty filePath ProjectHelper projectHelper ProjectHelper projectHelper setBuildFile addReference projectHelper projectHelper projectHelper
private String prepare For Incremental Parse Project project Dirty Region region I Document input String text To Parse null Ant Element Node node f Project Node get Node region get Offset if node null if f Project Node get Length 0 outside of any element if region get Offset f Project Node get Offset update After Incremental Change region false return null nodes don t know their lengths due to parsing error full parse text To Parse prepare For Full Incremental input return text To Parse while node null node instanceof Ant Target Node node node get Parent Node if node null no enclosing target node found if region get Text null region get Text trim length 0 return null no need to parse for whitespace additions text To Parse prepare For Full Incremental input else f Incremental Target Ant Target Node node if f Incremental Target has Children Collection nodes f Task To Node values nodes remove All f Incremental Target get Descendents mark Hierarchy node XML Problem NO PROBLEM String Buffer temp create Incremental Contents project f Incremental Target reset try int edit Adjustment determine Edit Adjustment region 1 String target String input get node get Offset 1 node get Length edit Adjustment temp append target String temp append n project NON NLS 1 text To Parse temp to String catch Bad Location Exception e text To Parse input get return text To Parse  prepareForIncrementalParse DirtyRegion IDocument textToParse AntElementNode fProjectNode getNode getOffset fProjectNode getLength getOffset fProjectNode getOffset updateAfterIncrementalChange textToParse prepareForFullIncremental textToParse AntTargetNode getParentNode getText getText textToParse prepareForFullIncremental fIncrementalTarget AntTargetNode fIncrementalTarget hasChildren fTaskToNode removeAll fIncrementalTarget getDescendents markHierarchy XMLProblem NO_PROBLEM StringBuffer createIncrementalContents fIncrementalTarget editAdjustment determineEditAdjustment targetString getOffset getLength editAdjustment targetString textToParse toString BadLocationException textToParse textToParse
private String prepare For Full Incremental I Document input String text To Parse input get f Project Node reset f Task To Node new Hash Map f Task Nodes new Array List return text To Parse  prepareForFullIncremental IDocument textToParse fProjectNode fTaskToNode HashMap fTaskNodes ArrayList textToParse
private String Buffer create Incremental Contents Project project int offset f Incremental Target get Offset int line get Line offset 1 String Buffer temp new String Buffer project NON NLS 1 String deflt Target project get Default Target if deflt Target null temp append default NON NLS 1 temp append deflt Target temp append NON NLS 1 temp append NON NLS 1 while line 0 temp append n NON NLS 1 line return temp  StringBuffer createIncrementalContents fIncrementalTarget getOffset getLine StringBuffer StringBuffer defltTarget getDefaultTarget defltTarget defltTarget
private int determine Edit Adjustment Dirty Region region int edit Adjustment 0 if region get Type equals Dirty Region INSERT edit Adjustment region get Length f Remove Length Of Replace else edit Adjustment region get Length return edit Adjustment  determineEditAdjustment DirtyRegion editAdjustment getType DirtyRegion editAdjustment getLength fRemoveLengthOfReplace editAdjustment getLength editAdjustment
private void initialize Project Project project Class Loader loader project init set Tasks project loader set Types project loader  initializeProject ClassLoader setTasks setTypes
private void set Tasks Project project Class Loader loader List tasks Ant Core Plugin get Plugin get Preferences get Tasks for Iterator iterator tasks iterator iterator has Next org eclipse ant core Task task org eclipse ant core Task iterator next Ant Type Definition def new Ant Type Definition def set Name task get Task Name def set Class Name task get Class Name def set Class Loader loader def set Adapt To Class Task class def set Adapter Class Task Adapter class Component Helper get Component Helper project add Data Type Definition def  setTasks ClassLoader AntCorePlugin getPlugin getPreferences getTasks hasNext AntTypeDefinition AntTypeDefinition setName getTaskName setClassName getClassName setClassLoader setAdaptToClass setAdapterClass TaskAdapter ComponentHelper getComponentHelper addDataTypeDefinition
private void set Types Project project Class Loader loader List types Ant Core Plugin get Plugin get Preferences get Types for Iterator iterator types iterator iterator has Next Type type Type iterator next Ant Type Definition def new Ant Type Definition def set Name type get Type Name def set Class Name type get Class Name def set Class Loader loader Component Helper get Component Helper project add Data Type Definition def  setTypes ClassLoader AntCorePlugin getPlugin getPreferences getTypes hasNext AntTypeDefinition AntTypeDefinition setName getTypeName setClassName getClassName setClassLoader ComponentHelper getComponentHelper addDataTypeDefinition
private void resolve Buildfile Collection node Copy new Array List f Task Nodes size node Copy add All f Task Nodes Iterator iter node Copy iterator while iter has Next Ant Task Node node Ant Task Node iter next f Node Being Resolved node if node configure false resolve any new elements that may have been added resolve Buildfile f Node Being Resolved null check Targets  resolveBuildfile nodeCopy ArrayList fTaskNodes nodeCopy addAll fTaskNodes nodeCopy hasNext AntTaskNode AntTaskNode fNodeBeingResolved resolveBuildfile fNodeBeingResolved checkTargets
Check that we have a default target defined and that the target dependencies exist private void check Targets if f Project Node null return String default Target Name f Project Node get Project get Default Target if default Target Name null f Project Node get Project get Targets get default Target Name null no default target String message if default Target Name null message Ant Outline Messages get String Ant Model 0 NON NLS 1 else message Message Format format Ant Outline Messages get String Ant Model 43 new String default Target Name NON NLS 1 I Problem problem create Problem message f Project Node get Offset f Project Node get Selection Length XML Problem SEVERITY ERROR accept Problem problem mark Hierarchy f Project Node XML Problem SEVERITY ERROR if f Project Node has Children return List children f Project Node get Child Nodes Iterator iter children iterator while iter has Next Ant Element Node node Ant Element Node iter next Ant Element Node original Node node if node instanceof Ant Target Node String missing Ant Target Node node check Dependencies if missing null String message Message Format format Ant Outline Messages get String Ant Model 44 new String missing NON NLS 1 Ant Element Node import Node node get Import Node if import Node null node import Node I Problem problem create Problem message node get Offset node get Selection Length XML Problem SEVERITY ERROR accept Problem problem mark Hierarchy original Node XML Problem SEVERITY ERROR  checkTargets fProjectNode defaultTargetName fProjectNode getProject getDefaultTarget defaultTargetName fProjectNode getProject getTargets defaultTargetName defaultTargetName AntOutlineMessages getString AntModel MessageFormat AntOutlineMessages getString AntModel defaultTargetName IProblem createProblem fProjectNode getOffset fProjectNode getSelectionLength XMLProblem SEVERITY_ERROR acceptProblem markHierarchy fProjectNode XMLProblem SEVERITY_ERROR fProjectNode hasChildren fProjectNode getChildNodes hasNext AntElementNode AntElementNode AntElementNode originalNode AntTargetNode AntTargetNode checkDependencies MessageFormat AntOutlineMessages getString AntModel AntElementNode importNode getImportNode importNode importNode IProblem createProblem getOffset getSelectionLength XMLProblem SEVERITY_ERROR acceptProblem markHierarchy originalNode XMLProblem SEVERITY_ERROR
public void handle Build Exception Build Exception e Ant Element Node node int severity try if node null mark Hierarchy node severity Location location e get Location int line 0 int original Offset 0 int non Whitespace Offset 0 int length 0 if location Location UNKNOWN LOCATION node null non Whitespace Offset node get Offset length node get Length else line location get Line Number if line 0 if get Project Node null length get Project Node get Selection Length non Whitespace Offset get Project Node get Offset if severity XML Problem SEVERITY ERROR get Project Node set Problem Severity XML Problem NO PROBLEM else return else if node null original Offset get Offset line 1 non Whitespace Offset original Offset try non Whitespace Offset get Non Whitespace Offset line 1 catch Bad Location Exception be length get Last Char Column line non Whitespace Offset original Offset else non Whitespace Offset node get Offset length node get Length notify Problem Requestor e non Whitespace Offset length severity catch Bad Location Exception e1  handleBuildException BuildException AntElementNode markHierarchy getLocation originalOffset nonWhitespaceOffset UNKNOWN_LOCATION nonWhitespaceOffset getOffset getLength getLineNumber getProjectNode getProjectNode getSelectionLength nonWhitespaceOffset getProjectNode getOffset XMLProblem SEVERITY_ERROR getProjectNode setProblemSeverity XMLProblem NO_PROBLEM originalOffset getOffset nonWhitespaceOffset originalOffset nonWhitespaceOffset getNonWhitespaceOffset BadLocationException getLastCharColumn nonWhitespaceOffset originalOffset nonWhitespaceOffset getOffset getLength notifyProblemRequestor nonWhitespaceOffset BadLocationException
public void handle Build Exception Build Exception e Ant Element Node node handle Build Exception e node XML Problem SEVERITY ERROR  handleBuildException BuildException AntElementNode handleBuildException XMLProblem SEVERITY_ERROR
public File get Edited File if f Location Provider null f Edited File null f Edited File f Location Provider get Location to File return f Edited File  getEditedFile fLocationProvider fEditedFile fEditedFile fLocationProvider getLocation toFile fEditedFile
private void mark Hierarchy Ant Element Node open Element int severity while open Element null open Element set Problem Severity severity open Element open Element get Parent Node  markHierarchy AntElementNode openElement openElement openElement setProblemSeverity openElement openElement getParentNode
public Location Provider get Location Provider return f Location Provider  LocationProvider getLocationProvider fLocationProvider
public void add Target Target new Target int line int column if f Incremental Target null f Current Target Node f Incremental Target f Current Target Node set Target new Target f Still Open Elements push f Current Target Node else Ant Target Node target Node new Ant Target Node new Target f Project Node add Child Node target Node f Current Target Node target Node f Still Open Elements push target Node compute Offset target Node line column if f Node Being Resolved instanceof Ant Import Node target Node set Import Node f Node Being Resolved  addTarget newTarget fIncrementalTarget fCurrentTargetNode fIncrementalTarget fCurrentTargetNode setTarget newTarget fStillOpenElements fCurrentTargetNode AntTargetNode targetNode AntTargetNode newTarget fProjectNode addChildNode targetNode fCurrentTargetNode targetNode fStillOpenElements targetNode computeOffset targetNode fNodeBeingResolved AntImportNode targetNode setImportNode fNodeBeingResolved
public void add Project Project project int line int column if f Incremental Target null return f Project Node new Ant Project Node Ant Model Project project this f Still Open Elements push f Project Node compute Offset f Project Node line column  addProject fIncrementalTarget fProjectNode AntProjectNode AntModelProject fStillOpenElements fProjectNode computeOffset fProjectNode
public void add Task Task new Task Task parent Task Attributes attributes int line int column Ant Task Node task Node null if parent Task null task Node new Task Node new Task attributes if f Current Target Node null f Project Node add Child Node task Node else f Current Target Node add Child Node task Node if task Node is External f Current Target Node set External true f Current Target Node set File Path task Node get File Path else task Node new Not Well Known Task Node new Task attributes Ant Task Node f Task To Node get parent Task add Child Node task Node f Task To Node put new Task task Node f Still Open Elements push task Node compute Offset task Node line column if f Node Being Resolved instanceof Ant Import Node task Node set Import Node f Node Being Resolved place the node in the collection right after the import node int index f Task Nodes index Of f Node Being Resolved 1 f Task Nodes add index task Node else f Task Nodes add task Node  addTask newTask parentTask AntTaskNode taskNode parentTask taskNode newTaskNode newTask fCurrentTargetNode fProjectNode addChildNode taskNode fCurrentTargetNode addChildNode taskNode taskNode isExternal fCurrentTargetNode setExternal fCurrentTargetNode setFilePath taskNode getFilePath taskNode newNotWellKnownTaskNode newTask AntTaskNode fTaskToNode parentTask addChildNode taskNode fTaskToNode newTask taskNode fStillOpenElements taskNode computeOffset taskNode fNodeBeingResolved AntImportNode taskNode setImportNode fNodeBeingResolved fTaskNodes indexOf fNodeBeingResolved fTaskNodes taskNode fTaskNodes taskNode
public void add Entity String entity Name String entity Path if f Entity Name To Path null f Entity Name To Path new Hash Map f Entity Name To Path put entity Name entity Path  addEntity entityName entityPath fEntityNameToPath fEntityNameToPath HashMap fEntityNameToPath entityName entityPath
private Ant Task Node new Task Node Task new Task Attributes attributes Ant Task Node new Node null String task Name new Task get Task Name if is Property Setting Task task Name NON NLS 1 new Node new Ant Property Node new Task attributes else if task Name equals Ignore Case import NON NLS 1 new Node new Ant Import Node new Task attributes else if task Name equals Ignore Case macrodef NON NLS 1 task Name equals Ignore Case presetdef NON NLS 1 task Name equals Ignore Case typedef NON NLS 1 task Name equals Ignore Case taskdef NON NLS 1 String name attributes get Value I Ant Model Constants ATTR NAME new Node new Ant Defining Task Node new Task name else if task Name equals Ignore Case antcall NON NLS 1 new Node new Ant Task Node new Task generate Label task Name attributes I Ant Model Constants ATTR TARGET else if task Name equals Ignore Case mkdir NON NLS 1 new Node new Ant Task Node new Task generate Label task Name attributes I Ant Model Constants ATTR DIR else if task Name equals Ignore Case copy NON NLS 1 new Node new Ant Task Node new Task generate Label task Name attributes I Ant Model Constants ATTR DESTFILE else if task Name equals Ignore Case tar NON NLS 1 task Name equals Ignore Case jar NON NLS 1 task Name equals Ignore Case war NON NLS 1 task Name equals Ignore Case zip NON NLS 1 new Node new Ant Task Node new Task generate Label new Task get Task Name attributes I Ant Model Constants ATTR DESTFILE else if task Name equals Ignore Case untar NON NLS 1 task Name equals Ignore Case unjar NON NLS 1 task Name equals Ignore Case unwar NON NLS 1 task Name equals Ignore Case gunzip NON NLS 1 task Name equals Ignore Case bunzip2 NON NLS 1 task Name equals Ignore Case unzip NON NLS 1 new Node new Ant Task Node new Task generate Label new Task get Task Name attributes I Ant Model Constants ATTR SRC else if task Name equals Ignore Case gzip NON NLS 1 task Name equals Ignore Case bzip2 NON NLS 1 new Node new Ant Task Node new Task generate Label new Task get Task Name attributes I Ant Model Constants ATTR ZIPFILE else if task Name equals Ignore Case exec NON NLS 1 String label exec NON NLS 1 String command attributes get Value I Ant Model Constants ATTR COMMAND if command null label command command attributes get Value I Ant Model Constants ATTR EXECUTABLE if command null label command new Node new Ant Task Node new Task label else if task Name equals Ignore Case delete NON NLS 1 String label delete NON NLS 1 String file attributes get Value I Ant Model Constants ATTR FILE if file null label file else file attributes get Value I Ant Model Constants ATTR DIR if file null label file new Node new Ant Task Node new Task label else if task Name equals Ignore Case import NON NLS 1 new Node new Ant Task Node new Task generate Label task Name attributes I Ant Model Constants ATTR FILE NON NLS 1 else new Node new Not Well Known Task Node new Task attributes String task File Name new Task get Location get File Name boolean external is Task External task File Name new Node set External external if external new Node set File Path task File Name return new Node  AntTaskNode newTaskNode newTask AntTaskNode newNode taskName newTask getTaskName isPropertySettingTask taskName newNode AntPropertyNode newTask taskName equalsIgnoreCase newNode AntImportNode newTask taskName equalsIgnoreCase taskName equalsIgnoreCase taskName equalsIgnoreCase taskName equalsIgnoreCase getValue IAntModelConstants ATTR_NAME newNode AntDefiningTaskNode newTask taskName equalsIgnoreCase newNode AntTaskNode newTask generateLabel taskName IAntModelConstants ATTR_TARGET taskName equalsIgnoreCase newNode AntTaskNode newTask generateLabel taskName IAntModelConstants ATTR_DIR taskName equalsIgnoreCase newNode AntTaskNode newTask generateLabel taskName IAntModelConstants ATTR_DESTFILE taskName equalsIgnoreCase taskName equalsIgnoreCase taskName equalsIgnoreCase taskName equalsIgnoreCase newNode AntTaskNode newTask generateLabel newTask getTaskName IAntModelConstants ATTR_DESTFILE taskName equalsIgnoreCase taskName equalsIgnoreCase taskName equalsIgnoreCase taskName equalsIgnoreCase taskName equalsIgnoreCase taskName equalsIgnoreCase newNode AntTaskNode newTask generateLabel newTask getTaskName IAntModelConstants ATTR_SRC taskName equalsIgnoreCase taskName equalsIgnoreCase newNode AntTaskNode newTask generateLabel newTask getTaskName IAntModelConstants ATTR_ZIPFILE taskName equalsIgnoreCase getValue IAntModelConstants ATTR_COMMAND getValue IAntModelConstants ATTR_EXECUTABLE newNode AntTaskNode newTask taskName equalsIgnoreCase getValue IAntModelConstants ATTR_FILE getValue IAntModelConstants ATTR_DIR newNode AntTaskNode newTask taskName equalsIgnoreCase newNode AntTaskNode newTask generateLabel taskName IAntModelConstants ATTR_FILE newNode newNotWellKnownTaskNode newTask taskFileName newTask getLocation getFileName isTaskExternal taskFileName newNode setExternal newNode setFilePath taskFileName newNode
param task Name the name of the task to check return whether or not a task with this name sets properties public static boolean is Property Setting Task String task Name return task Name equals Ignore Case property NON NLS 1 task Name equals Ignore Case available NON NLS 1 task Name equals Ignore Case basename NON NLS 1 task Name equals Ignore Case condition NON NLS 1 task Name equals Ignore Case dirname NON NLS 1 task Name equals Ignore Case loadfile NON NLS 1 task Name equals Ignore Case pathconvert NON NLS 1 task Name equals Ignore Case uptodate NON NLS 1 task Name equals Ignore Case xmlproperty NON NLS 1  taskName isPropertySettingTask taskName taskName equalsIgnoreCase taskName equalsIgnoreCase taskName equalsIgnoreCase taskName equalsIgnoreCase taskName equalsIgnoreCase taskName equalsIgnoreCase taskName equalsIgnoreCase taskName equalsIgnoreCase taskName equalsIgnoreCase
private boolean is Task External String task File Name File task File new File task File Name return task File equals get Edited File  isTaskExternal taskFileName taskFile taskFileName taskFile getEditedFile
private Ant Task Node new Not Well Known Task Node Task new Task Attributes attributes Ant Task Node new Node new Ant Task Node new Task String id attributes get Value id NON NLS 1 if id null new Node set Id id return new Node  AntTaskNode newNotWellKnownTaskNode newTask AntTaskNode newNode AntTaskNode newTask getValue newNode setId newNode
private String generate Label String task Name Attributes attributes String attribute Name String Buffer label new String Buffer task Name String src File attributes get Value attribute Name if src File null label append label append src File return label to String  generateLabel taskName attributeName StringBuffer StringBuffer taskName srcFile getValue attributeName srcFile srcFile toString
private void compute Length Ant Element Node element int line int column if element is External element set External Info line column return try int length int offset if column 0 column get Last Char Column line String line Text f Document get f Document get Line Offset line 1 column String Buffer search String new String Buffer NON NLS 1 search String append element get Name search String append int index line Text index Of search String to String if index 1 index line Text index Of NON NLS 1 if index 1 index column set to the end of line else index index 3 else index index search String length 1 offset get Offset line index else offset get Offset line column length offset element get Offset element set Length length catch Bad Location Exception e ignore as the parser may be out of sync with the document during reconciliation  computeLength AntElementNode isExternal setExternalInfo getLastCharColumn lineText fDocument fDocument getLineOffset StringBuffer searchString StringBuffer searchString getName searchString lineText indexOf searchString toString lineText indexOf searchString getOffset getOffset getOffset setLength BadLocationException
private void compute Offset Ant Element Node element int line int column if element is External return try int offset String prefix NON NLS 1 if column 0 offset get Offset line 0 int last Char Column get Last Char Column line offset compute Offset Using Prefix element line offset prefix last Char Column else offset get Offset line column offset compute Offset Using Prefix element line offset prefix column element set Offset offset 1 element set Selection Length element get Name length catch Bad Location Exception e ignore as the parser may be out of sync with the document during reconciliation  computeOffset AntElementNode isExternal getOffset lastCharColumn getLastCharColumn computeOffsetUsingPrefix lastCharColumn getOffset computeOffsetUsingPrefix setOffset setSelectionLength getName BadLocationException
private int compute Offset Using Prefix Ant Element Node element int line int offset String prefix int column throws Bad Location Exception String line Text f Document get f Document get Line Offset line 1 column int last Index line Text index Of prefix element get Name if last Index 1 offset get Offset line last Index 1 else return compute Offset Using Prefix element line 1 offset prefix get Last Char Column line 1 return offset  computeOffsetUsingPrefix AntElementNode BadLocationException lineText fDocument fDocument getLineOffset lastIndex lineText indexOf getName lastIndex getOffset lastIndex computeOffsetUsingPrefix getLastCharColumn
public int get Offset int line int column throws Bad Location Exception return f Document get Line Offset line 1 column 1  getOffset BadLocationException fDocument getLineOffset
private int get Non Whitespace Offset int line int column throws Bad Location Exception int offset f Document get Line Offset line 1 column 1 while Character is Whitespace f Document get Char offset offset return offset  getNonWhitespaceOffset BadLocationException fDocument getLineOffset isWhitespace fDocument getChar
private int get Line int offset try return f Document get Line Of Offset offset 1 catch Bad Location Exception be return 1  getLine fDocument getLineOfOffset BadLocationException
private int get Last Char Column int line throws Bad Location Exception String line Delimiter f Document get Line Delimiter line 1 int line Delimiter Length line Delimiter null line Delimiter length 0 return f Document get Line Length line 1 line Delimiter Length  getLastCharColumn BadLocationException lineDelimiter fDocument getLineDelimiter lineDelimiterLength lineDelimiter lineDelimiter fDocument getLineLength lineDelimiterLength
public void set Current Element Length int line Number int column f Last Node Ant Element Node f Still Open Elements pop if f Last Node f Current Target Node f Current Target Node null the current target element has been closed compute Length f Last Node line Number column  setCurrentElementLength lineNumber fLastNode AntElementNode fStillOpenElements fLastNode fCurrentTargetNode fCurrentTargetNode computeLength fLastNode lineNumber
public void accept Problem I Problem problem if f Problem Requestor null f Problem Requestor accept Problem problem f Marker Updater accept Problem problem  acceptProblem IProblem fProblemRequestor fProblemRequestor acceptProblem fMarkerUpdater acceptProblem
protected I File get File I Path location f Location Provider get Location if location null return null I File files Resources Plugin get Workspace get Root find Files For Location location if files length 0 return files 0 return null  IFile getFile IPath fLocationProvider getLocation IFile ResourcesPlugin getWorkspace getRoot findFilesForLocation
private void begin Reporting if f Problem Requestor null f Problem Requestor begin Reporting f Marker Updater begin Reporting  beginReporting fProblemRequestor fProblemRequestor beginReporting fMarkerUpdater beginReporting
private void end Reporting if f Problem Requestor null f Problem Requestor end Reporting  endReporting fProblemRequestor fProblemRequestor endReporting
private I Problem create Problem Exception exception int offset int length int severity return create Problem exception get Message offset length severity  IProblem createProblem createProblem getMessage
private I Problem create Problem String message int offset int length int severity return new XML Problem message severity offset length get Line offset  IProblem createProblem XMLProblem getLine
protected void notify Problem Requestor Exception exception Ant Element Node element int severity Ant Element Node import Node element get Import Node if import Node null element import Node I Problem problem create Problem exception element get Offset element get Length severity accept Problem problem element associated Problem problem  notifyProblemRequestor AntElementNode AntElementNode importNode getImportNode importNode importNode IProblem createProblem getOffset getLength acceptProblem associatedProblem
protected void notify Problem Requestor Exception exception int offset int length int severity if f Problem Requestor null I Problem problem create Problem exception offset length severity accept Problem problem  notifyProblemRequestor fProblemRequestor IProblem createProblem acceptProblem
public void warning Exception exception notify Problem Requestor exception Ant Element Node f Still Open Elements pop XML Problem SEVERITY WARNING  notifyProblemRequestor AntElementNode fStillOpenElements XMLProblem SEVERITY_WARNING
public void error Exception exception handle Error exception XML Problem SEVERITY ERROR  handleError XMLProblem SEVERITY_ERROR
public void error From Element Text Exception exception int start int count Ant Element Node node f Last Node if node null if f Still Open Elements empty node Ant Element Node f Still Open Elements peek if node null return compute End Location For Error Node node start count notify Problem Requestor exception start count XML Problem SEVERITY ERROR mark Hierarchy f Last Node XML Problem SEVERITY ERROR  errorFromElementText AntElementNode fLastNode fStillOpenElements AntElementNode fStillOpenElements computeEndLocationForErrorNode notifyProblemRequestor XMLProblem SEVERITY_ERROR markHierarchy fLastNode XMLProblem SEVERITY_ERROR
public void error From Element Exception exception Ant Element Node node int line Number int column if node null if f Still Open Elements empty node Ant Element Node f Still Open Elements peek else node f Last Node compute End Location For Error Node node line Number column notify Problem Requestor exception node XML Problem SEVERITY ERROR mark Hierarchy node XML Problem SEVERITY ERROR  errorFromElement AntElementNode lineNumber fStillOpenElements AntElementNode fStillOpenElements fLastNode computeEndLocationForErrorNode lineNumber notifyProblemRequestor XMLProblem SEVERITY_ERROR markHierarchy XMLProblem SEVERITY_ERROR
private Ant Element Node create Problem Element SAX Parse Exception exception int line Number exception get Line Number String Buffer message new String Buffer exception get Message if line Number 1 message append Ant Outline Messages get String Ant Model 1 line Number NON NLS 1 Ant Element Node error Node new Ant Element Node message to String error Node set File Path exception get System Id error Node set Problem Severity XML Problem SEVERITY ERROR compute Error Location error Node exception return error Node  AntElementNode createProblemElement SAXParseException lineNumber getLineNumber StringBuffer StringBuffer getMessage lineNumber AntOutlineMessages getString AntModel lineNumber AntElementNode errorNode AntElementNode toString errorNode setFilePath getSystemId errorNode setProblemSeverity XMLProblem SEVERITY_ERROR computeErrorLocation errorNode errorNode
private void compute Error Location Ant Element Node element SAX Parse Exception exception if element is External return int line exception get Line Number int start Column exception get Column Number compute End Location For Error Node element line start Column  computeErrorLocation AntElementNode SAXParseException isExternal getLineNumber startColumn getColumnNumber computeEndLocationForErrorNode startColumn
private void compute End Location For Error Node Ant Element Node element int line int start Column try if line 0 line 1 int end Column if start Column 0 if element get Offset 1 start Column element get Offset 1 else start Column 1 end Column get Last Char Column line 1 else if start Column 1 start Column end Column start Column if start Column get Last Char Column line end Column int correction 0 if element get Offset 1 int original Offset get Offset line start Column int non Whitespace Offset original Offset try non Whitespace Offset get Non Whitespace Offset line start Column catch Bad Location Exception be element set Offset non Whitespace Offset correction non Whitespace Offset original Offset if end Column start Column 0 int offset get Offset line start Column element set Length offset element get Offset correction else element set Length end Column start Column correction catch Bad Location Exception e ignore as the parser may be out of sync with the document during reconciliation  computeEndLocationForErrorNode AntElementNode startColumn endColumn startColumn getOffset startColumn getOffset startColumn endColumn getLastCharColumn startColumn startColumn endColumn startColumn startColumn getLastCharColumn endColumn getOffset originalOffset getOffset startColumn nonWhitespaceOffset originalOffset nonWhitespaceOffset getNonWhitespaceOffset startColumn BadLocationException setOffset nonWhitespaceOffset nonWhitespaceOffset originalOffset endColumn startColumn getOffset startColumn setLength getOffset setLength endColumn startColumn BadLocationException
private void handle Error Exception exception int severity Ant Element Node node null if f Still Open Elements is Empty if exception instanceof SAX Parse Exception node create Problem Element SAX Parse Exception exception else node Ant Element Node f Still Open Elements peek if node null return mark Hierarchy node severity if exception instanceof SAX Parse Exception SAX Parse Exception parse Exception SAX Parse Exception exception if node get Offset 1 compute End Location For Error Node node parse Exception get Line Number 1 parse Exception get Column Number else int line Number parse Exception get Line Number int column Number parse Exception get Column Number if column Number 1 column Number 1 try Ant Element Node child Node node get Node get Non Whitespace Offset line Number column Number 1 if child Node null child Node node node child Node node set Problem Severity severity else node create Problem Element parse Exception catch Bad Location Exception be node create Problem Element parse Exception notify Problem Requestor exception node severity if node null while node get Parent Node null Ant Element Node parent Node node get Parent Node if parent Node get Length 1 parent Node set Length node get Offset parent Node get Offset node get Length node parent Node if f Incremental Target null update the targets length for the edit int edit Adjustment determine Edit Adjustment f Dirty Region f Incremental Target set Length f Incremental Target get Length edit Adjustment Ant Element Node starting Node null while f Still Open Elements peek f Incremental Target starting Node Ant Element Node f Still Open Elements pop if starting Node get Length 1 starting Node set Length starting Node get Length edit Adjustment f Still Open Elements pop get rid of the incremental target if starting Node null f Incremental Target has Children List children f Incremental Target get Child Nodes int index children index Of starting Node update Nodes For Incremental Parse edit Adjustment children index  handleError AntElementNode fStillOpenElements isEmpty SAXParseException createProblemElement SAXParseException AntElementNode fStillOpenElements markHierarchy SAXParseException SAXParseException parseException SAXParseException getOffset computeEndLocationForErrorNode parseException getLineNumber parseException getColumnNumber lineNumber parseException getLineNumber columnNumber parseException getColumnNumber columnNumber columnNumber AntElementNode childNode getNode getNonWhitespaceOffset lineNumber columnNumber childNode childNode childNode setProblemSeverity createProblemElement parseException BadLocationException createProblemElement parseException notifyProblemRequestor getParentNode AntElementNode parentNode getParentNode parentNode getLength parentNode setLength getOffset parentNode getOffset getLength parentNode fIncrementalTarget editAdjustment determineEditAdjustment fDirtyRegion fIncrementalTarget setLength fIncrementalTarget getLength editAdjustment AntElementNode startingNode fStillOpenElements fIncrementalTarget startingNode AntElementNode fStillOpenElements startingNode getLength startingNode setLength startingNode getLength editAdjustment fStillOpenElements startingNode fIncrementalTarget hasChildren fIncrementalTarget getChildNodes indexOf startingNode updateNodesForIncrementalParse editAdjustment
public void fatal Error Exception exception handle Error exception XML Problem SEVERITY FATAL ERROR  fatalError handleError XMLProblem SEVERITY_FATAL_ERROR
public Ant Element Node get Open Element if f Still Open Elements is Empty return null return Ant Element Node f Still Open Elements peek  AntElementNode getOpenElement fStillOpenElements isEmpty AntElementNode fStillOpenElements
public String get Entity Path String entity Name if f Entity Name To Path null return String f Entity Name To Path get entity Name return null  getEntityPath entityName fEntityNameToPath fEntityNameToPath entityName
public String get Entity Name String path if f Entity Name To Path null Iterator itr f Entity Name To Path key Set iterator String entity Path String name while itr has Next name String itr next entity Path String f Entity Name To Path get name if entity Path equals path return name return null  getEntityName fEntityNameToPath fEntityNameToPath keySet entityPath hasNext entityPath fEntityNameToPath entityPath
public String get Property Value String property Name Ant Project Node project Node get Project Node if project Node null return null return project Node get Project get Property property Name  getPropertyValue propertyName AntProjectNode projectNode getProjectNode projectNode projectNode getProject getProperty propertyName
public Object get Reference Object String ref Id Ant Project Node project Node get Project Node if project Node null return null try Project project project Node get Project Object ref project get Reference ref Id return ref catch Build Exception be handle Build Exception be null return null  getReferenceObject refId AntProjectNode projectNode getProjectNode projectNode projectNode getProject getReference refId BuildException handleBuildException
public Ant Element Node get Reference Node String text Object reference get Reference Object text if reference null return null Collection nodes f Task To Node key Set Iterator iter nodes iterator while iter has Next Object original iter next Object object original if object instanceof Unknown Element Unknown Element element Unknown Element object object element get Real Thing if object null continue if object reference return Ant Element Node f Task To Node get original return null  AntElementNode getReferenceNode getReferenceObject fTaskToNode keySet hasNext UnknownElement UnknownElement UnknownElement getRealThing AntElementNode fTaskToNode
private Class Loader get Class Loader if fg Class Loader null fg Class Loader Ant Core Plugin get Plugin get New Class Loader true return fg Class Loader  ClassLoader getClassLoader fgClassLoader fgClassLoader AntCorePlugin getPlugin getNewClassLoader fgClassLoader
public String get Target Description String target Rename Ant Project Node project Node get Project Node if project Node null return null Project project project Node get Project Map targets project get Targets Target target Target targets get target Rename if target null return target get Description return null  getTargetDescription targetRename AntProjectNode projectNode getProjectNode projectNode projectNode getProject getTargets targetRename getDescription
public Ant Project Node get Project Node boolean do Reconcile if do Reconcile reconcile null return f Project Node  AntProjectNode getProjectNode doReconcile doReconcile fProjectNode
public Ant Project Node get Project Node return get Project Node true  AntProjectNode getProjectNode getProjectNode
public void set Replace Has Occurred f Replace Has Occurred true  setReplaceHasOccurred fReplaceHasOccurred
public void update Markers reconcile null f Marker Updater update Markers  updateMarkers fMarkerUpdater updateMarkers
public Ant Element Node get Node int offset boolean wait For Reconcile if get Project Node wait For Reconcile null return get Project Node wait For Reconcile get Node offset return null  AntElementNode getNode waitForReconcile getProjectNode waitForReconcile getProjectNode waitForReconcile getNode
The Ant model has been reconciled for the first time with the contents displayed in the Ant editor Since problem marker creation has been added after many buildfiles have been created or if the file has been created outside of Eclipse we need to update the markers to match the problems public void update For Initial Reconcile f Marker Updater update Markers  updateForInitialReconcile fMarkerUpdater updateMarkers
Provides the set of names of the defining nodes that existed from the previous parse of the build file public void set Names Of Old Defining Nodes Set set f Names Of Old Defining Nodes set  setNamesOfOldDefiningNodes fNamesOfOldDefiningNodes
Removes any type definitions that no longer exist in the buildfile private void reconcile Task And Types if f Names Of Old Defining Nodes null return Iterator iter f Names Of Old Defining Nodes iterator while iter has Next String node Label String iter next if f Project Node get Definining Task Node node Label null Component Helper helper Component Helper get Component Helper f Project Node get Project helper get Ant Type Table remove node Label iter remove  reconcileTaskAndTypes fNamesOfOldDefiningNodes fNamesOfOldDefiningNodes hasNext nodeLabel fProjectNode getDefininingTaskNode nodeLabel ComponentHelper ComponentHelper getComponentHelper fProjectNode getProject getAntTypeTable nodeLabel

public void set New Property String name String value if f Current Properties get name null return always property values to be over written for this parse session there is currently no way to remove properties from the Apache Ant project the project resets it properties for each parse see reset f Current Properties put name value super set Property name value  setNewProperty fCurrentProperties fCurrentProperties setProperty
public void fire Build Finished Throwable exception super fire Build Finished exception Enumeration e get Build Listeners elements while e has More Elements Build Listener listener Build Listener e next Element remove Build Listener listener  fireBuildFinished fireBuildFinished getBuildListeners hasMoreElements BuildListener BuildListener nextElement removeBuildListener
public void reset get Targets clear set Default null set Description null set Name NON NLS 1 reset the properties to the initial set f Current Properties new Hashtable Enumeration e f Base Properties keys while e has More Elements Object name e next Element Object value f Base Properties get name f Current Properties put name value  getTargets setDefault setDescription setName fCurrentProperties fBaseProperties hasMoreElements nextElement fBaseProperties fCurrentProperties
see org apache tools ant Project get Property java lang String public String get Property String name override as we cannot remove properties from the Apache Ant project return String f Current Properties get name  getProperty getProperty fCurrentProperties
see org apache tools ant Project get Properties public Hashtable get Properties override as we cannot remove properties from the Apache Ant project return f Current Properties  getProperties getProperties fCurrentProperties
public void init throws Build Exception super init f Base Properties super get Properties f Current Properties super get Properties  BuildException fBaseProperties getProperties fCurrentProperties getProperties

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Ant Outline Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME AntOutlineMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

private boolean f Preference Change false Document Model Change Event Ant Model model f Model model  fPreferenceChange DocumentModelChangeEvent AntModel fModel
Document Model Change Event Ant Model model boolean preference Change f Model model f Preference Change preference Change  DocumentModelChangeEvent AntModel preferenceChange fModel fPreferenceChange preferenceChange
public Ant Model get Model return f Model  AntModel getModel fModel
Returns whether the document model has changed as a result of a preference change return whether the model has changed from a preference change public boolean is Preference Change return f Preference Change  isPreferenceChange fPreferenceChange

public Filter Imported Elements Action Ant Editor Content Outline Page page super Ant Outline Messages get String Filter Imported Elements Action 0 NON NLS 1 f Page page set Image Descriptor AntUI Images get Image Descriptor I AntUI Constants IMG FILTER IMPORTED ELEMENTS set Tool Tip Text Ant Outline Messages get String Filter Imported Elements Action 0 NON NLS 1 set Checked f Page filter Imported Elements  FilterImportedElementsAction AntEditorContentOutlinePage AntOutlineMessages getString FilterImportedElementsAction fPage setImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_FILTER_IMPORTED_ELEMENTS setToolTipText AntOutlineMessages getString FilterImportedElementsAction setChecked fPage filterImportedElements
public void run Busy Indicator show While f Page get Control get Display new Runnable public void run f Page set Filter Imported Elements is Checked  BusyIndicator showWhile fPage getControl getDisplay fPage setFilterImportedElements isChecked
Toggles the filtering of imported elements from the Ant outline see org eclipse jface action I Action run public void run Busy Indicator show While f Page get Control get Display new Runnable public void run f Page set Filter Imported Elements is Checked  IAction BusyIndicator showWhile fPage getControl getDisplay fPage setFilterImportedElements isChecked

public Filter Internal Targets Action Ant Editor Content Outline Page page super Ant Outline Messages get String Filter Internal Targets Action 0 NON NLS 1 f Page page set Image Descriptor AntUI Images get Image Descriptor I AntUI Constants IMG FILTER INTERNAL TARGETS set Tool Tip Text Ant Outline Messages get String Filter Internal Targets Action 0 NON NLS 1 set Checked f Page filter Internal Targets  FilterInternalTargetsAction AntEditorContentOutlinePage AntOutlineMessages getString FilterInternalTargetsAction fPage setImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_FILTER_INTERNAL_TARGETS setToolTipText AntOutlineMessages getString FilterInternalTargetsAction setChecked fPage filterInternalTargets
public void run Busy Indicator show While f Page get Control get Display new Runnable public void run f Page set Filter Internal Targets is Checked  BusyIndicator showWhile fPage getControl getDisplay fPage setFilterInternalTargets isChecked
Toggles the filtering of internal targets from the Ant outline see org eclipse jface action I Action run public void run Busy Indicator show While f Page get Control get Display new Runnable public void run f Page set Filter Internal Targets is Checked  IAction BusyIndicator showWhile fPage getControl getDisplay fPage setFilterInternalTargets isChecked

public Filter Properties Action Ant Editor Content Outline Page page super Ant Outline Messages get String Filter Properties Action 0 NON NLS 1 f Page page set Image Descriptor AntUI Images get Image Descriptor I AntUI Constants IMG FILTER PROPERTIES set Tool Tip Text Ant Outline Messages get String Filter Properties Action 0 NON NLS 1 set Checked f Page filter Properties  FilterPropertiesAction AntEditorContentOutlinePage AntOutlineMessages getString FilterPropertiesAction fPage setImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_FILTER_PROPERTIES setToolTipText AntOutlineMessages getString FilterPropertiesAction setChecked fPage filterProperties
public void run Busy Indicator show While f Page get Control get Display new Runnable public void run f Page set Filter Properties is Checked  BusyIndicator showWhile fPage getControl getDisplay fPage setFilterProperties isChecked
Toggles the filtering of properties from the Ant outline see org eclipse jface action I Action run public void run Busy Indicator show While f Page get Control get Display new Runnable public void run f Page set Filter Properties is Checked  IAction BusyIndicator showWhile fPage getControl getDisplay fPage setFilterProperties isChecked

public Filter Top Level Action Ant Editor Content Outline Page page super Ant Outline Messages get String Filter Top Level Action 0 NON NLS 1 f Page page set Image Descriptor AntUI Images get Image Descriptor I AntUI Constants IMG FILTER TOP LEVEL set Tool Tip Text Ant Outline Messages get String Filter Top Level Action 0 NON NLS 1 set Checked f Page filter Top Level  FilterTopLevelAction AntEditorContentOutlinePage AntOutlineMessages getString FilterTopLevelAction fPage setImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_FILTER_TOP_LEVEL setToolTipText AntOutlineMessages getString FilterTopLevelAction setChecked fPage filterTopLevel
public void run Busy Indicator show While f Page get Control get Display new Runnable public void run f Page set Filter Top Level is Checked  BusyIndicator showWhile fPage getControl getDisplay fPage setFilterTopLevel isChecked
Toggles the filtering of top level tasks and types from the Ant outline see org eclipse jface action I Action run public void run Busy Indicator show While f Page get Control get Display new Runnable public void run f Page set Filter Top Level is Checked  IAction BusyIndicator showWhile fPage getControl getDisplay fPage setFilterTopLevel isChecked

public interface I Document Model Listener public void document Model Changed Document Model Change Event event  IDocumentModelListener documentModelChanged DocumentModelChangeEvent

Answer a localized human readable message string which describes the problem The message has been escaped to handle special characters return a localized human readable message string which describes the problem 
Answer a localized human readable message string which describes the problem The message is in its original form special characters have not been escaped return localized human readable message string which describes the problem 
Checks the severity to see if the Error bit is set return true if the Error bit is set for the severity false otherwise 
Checks the severity to see if the Error bit is not set return true if the Error bit is not set for the severity false otherwise 
Returns the line number of this problem return the line number of this problem 

Notification of a XML problem param problem I Problem The discovered Java problem  IProblem
Notification sent before starting the problem detection process Typically this would tell a problem collector to clear previously recorded problems 
Notification sent after having completed problem detection process Typically this would tell a problem collector that no more problems should be expected in this iteration 

private I Editor Input f Editor Input public Location Provider I Editor Input input f Editor Input input  IEditorInput fEditorInput LocationProvider IEditorInput fEditorInput
public I Path get Location if f Editor Input instanceof I File Editor Input return I File Editor Input f Editor Input get File get Location else if f Editor Input instanceof I Location Provider return I Location Provider f Editor Input get Path f Editor Input return null  IPath getLocation fEditorInput IFileEditorInput IFileEditorInput fEditorInput getFile getLocation fEditorInput ILocationProvider ILocationProvider fEditorInput getPath fEditorInput
public I File get File if f Editor Input instanceof I File Editor Input return I File Editor Input f Editor Input get File return null  IFile getFile fEditorInput IFileEditorInput IFileEditorInput fEditorInput getFile

public Toggle Link With Editor Action Ant Editor editor super Ant Outline Messages get String Toggle Link With Editor Action 0 NON NLS 1 boolean is Linking Enabled AntUI Plugin get Default get Preference Store get Boolean I AntUI Preference Constants OUTLINE LINK WITH EDITOR set Checked is Linking Enabled f Editor editor set Tool Tip Text Ant Outline Messages get String Toggle Link With Editor Action 1 NON NLS 1 set Description Ant Outline Messages get String Toggle Link With Editor Action 2 NON NLS 1 set Image Descriptor AntUI Images get Image Descriptor I AntUI Constants IMG LINK WITH EDITOR  ToggleLinkWithEditorAction AntEditor AntOutlineMessages getString ToggleLinkWithEditorAction isLinkingEnabled AntUIPlugin getDefault getPreferenceStore getBoolean IAntUIPreferenceConstants OUTLINE_LINK_WITH_EDITOR setChecked isLinkingEnabled fEditor setToolTipText AntOutlineMessages getString ToggleLinkWithEditorAction setDescription AntOutlineMessages getString ToggleLinkWithEditorAction setImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_LINK_WITH_EDITOR
public void run AntUI Plugin get Default get Preference Store set Value I AntUI Preference Constants OUTLINE LINK WITH EDITOR is Checked if is Checked f Editor synchronize Outline Page false  AntUIPlugin getDefault getPreferenceStore setValue IAntUIPreferenceConstants OUTLINE_LINK_WITH_EDITOR isChecked isChecked fEditor synchronizeOutlinePage

public Toggle Sort Ant Outline Action Ant Editor Content Outline Page page super Ant Outline Messages get String Toggle Sort Ant Outline Action 0 NON NLS 1 f Page page set Image Descriptor AntUI Images get Image Descriptor I AntUI Constants IMG SORT OUTLINE set Tool Tip Text Ant Outline Messages get String Toggle Sort Ant Outline Action 0 NON NLS 1 set Checked f Page is Sort  ToggleSortAntOutlineAction AntEditorContentOutlinePage AntOutlineMessages getString ToggleSortAntOutlineAction fPage setImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_SORT_OUTLINE setToolTipText AntOutlineMessages getString ToggleSortAntOutlineAction setChecked fPage isSort
Toggles the sorting of targets in the Ant outline see org eclipse jface action I Action run public void run f Page set Sort is Checked  IAction fPage setSort isChecked

public static XML Core get Default if inst null inst new XML Core return inst  XMLCore getDefault XMLCore
private List f Model Change Listeners new Array List private XML Core  fModelChangeListeners ArrayList XMLCore
public void add Document Model Listener I Document Model Listener listener synchronized f Model Change Listeners f Model Change Listeners add listener  addDocumentModelListener IDocumentModelListener fModelChangeListeners fModelChangeListeners
public void remove Document Model Listener I Document Model Listener listener synchronized f Model Change Listeners f Model Change Listeners remove listener  removeDocumentModelListener IDocumentModelListener fModelChangeListeners fModelChangeListeners
public void notify Document Model Listeners Document Model Change Event event Iterator i synchronized f Model Change Listeners i new Array List f Model Change Listeners iterator while i has Next I Document Model Listener i next document Model Changed event  notifyDocumentModelListeners DocumentModelChangeEvent fModelChangeListeners ArrayList fModelChangeListeners hasNext IDocumentModelListener documentModelChanged

public XML Problem String message int severity int offset int length int line Number super offset length f Message message f Escaped Message get Escaped message f Severity severity f Line Number line Number  XMLProblem lineNumber fMessage fEscapedMessage getEscaped fSeverity fLineNumber lineNumber
see org eclipse ant internal ui editor outline I Problem get Message public String get Message return f Escaped Message  IProblem getMessage getMessage fEscapedMessage
see org eclipse ant internal ui editor outline I Problem is Error public boolean is Error return f Severity SEVERITY ERROR f Severity SEVERITY FATAL ERROR  IProblem isError isError fSeverity SEVERITY_ERROR fSeverity SEVERITY_FATAL_ERROR
see org eclipse ant internal ui editor outline I Problem is Warning public boolean is Warning return f Severity SEVERITY WARNING  IProblem isWarning isWarning fSeverity SEVERITY_WARNING
public int get Length if f Adjusted Length 1 return f Adjusted Length return super get Length  getLength fAdjustedLength fAdjustedLength getLength
Sets the length for this problem public void set Length int adjusted Length f Adjusted Length adjusted Length  setLength adjustedLength fAdjustedLength adjustedLength
see org eclipse ant internal ui editor outline I Problem get Line Number public int get Line Number return f Line Number  IProblem getLineNumber getLineNumber fLineNumber
private void append Escaped Char String Buffer buffer char c String replacement get Replacement c if replacement null buffer append replacement else buffer append c  appendEscapedChar StringBuffer getReplacement
private String get Escaped String s String Buffer result new String Buffer s length 10 for int i 0 i s length i append Escaped Char result s char At i return result to String  getEscaped StringBuffer StringBuffer appendEscapedChar charAt toString
private String get Replacement char c Encode special characters into the equivalent character references Ensures that error messages that include special characters do not get incorrectly represented as HTML in the text hover bug 56258 switch c case return lt NON NLS 1 case return gt NON NLS 1 case return quot NON NLS 1 case return apos NON NLS 1 case return amp NON NLS 1 return null  getReplacement
see org eclipse ant internal ui editor outline I Problem get Unmodified Message public String get Unmodified Message return f Message  IProblem getUnmodifiedMessage getUnmodifiedMessage fMessage
public static int get Severity String preference Key I Preference Store store AntUI Plugin get Default get Preference Store String severity Level store get String preference Key if severity Level length 0 severity Level equals Ant Editor Preference Constants BUILDFILE ERROR return SEVERITY ERROR else if severity Level equals Ant Editor Preference Constants BUILDFILE WARNING return SEVERITY WARNING else return NO PROBLEM  getSeverity preferenceKey IPreferenceStore AntUIPlugin getDefault getPreferenceStore severityLevel getString preferenceKey severityLevel severityLevel AntEditorPreferenceConstants BUILDFILE_ERROR SEVERITY_ERROR severityLevel AntEditorPreferenceConstants BUILDFILE_WARNING SEVERITY_WARNING NO_PROBLEM
public boolean equals Object o boolean equal super equals o if equal return XML Problem o get Unmodified Message equals get Unmodified Message return false  XMLProblem getUnmodifiedMessage getUnmodifiedMessage

Meant to be a singleton private Task Description Provider initialize  TaskDescriptionProvider
public static Task Description Provider get Default if fg Default null fg Default new Task Description Provider return fg Default  TaskDescriptionProvider getDefault fgDefault fgDefault TaskDescriptionProvider fgDefault
Parses the task description xml file and stores the information protected void initialize Document temp Document parse File TASKS DESCRIPTION XML FILE NAME Node temp Root Node temp Document get Document Element Node List temp Child Nodes temp Root Node get Child Nodes for int i 0 i temp Child Nodes get Length i Node temp Node temp Child Nodes item i if temp Node get Node Type Node ELEMENT NODE String temp Tag Name temp Node get Node Name if temp Tag Name equals XML TAG TASK Named Node Map temp Attributes temp Node get Attributes Node temp Attribute Node temp Attributes get Named Item XML ATTRIBUTE NAME if temp Attribute Node null String temp Task Name temp Attribute Node get Node Value if temp Task Name null task Nodes put temp Task Name temp Node  tempDocument parseFile TASKS_DESCRIPTION_XML_FILE_NAME tempRootNode tempDocument getDocumentElement NodeList tempChildNodes tempRootNode getChildNodes tempChildNodes getLength tempNode tempChildNodes tempNode getNodeType ELEMENT_NODE tempTagName tempNode getNodeName tempTagName XML_TAG_TASK NamedNodeMap tempAttributes tempNode getAttributes tempAttributeNode tempAttributes getNamedItem XML_ATTRIBUTE_NAME tempAttributeNode tempTaskName tempAttributeNode getNodeValue tempTaskName taskNodes tempTaskName tempNode
Returns the DOM document as a result of parsing the file with the specified file name P The file will be loaded as resource thus must begin with and must be relative to the classpath protected Document parse File String a File Name Document temp Document null Document Builder Factory temp Factory Document Builder Factory new Instance temp Factory set Ignoring Comments true temp Factory set Ignoring Element Content Whitespace true temp Factory set Coalescing true try Document Builder temp Doc Builder temp Factory new Document Builder URL tempURL get Class get Resource a File Name Input Source temp Input Source new Input Source tempURL to External Form temp Document temp Doc Builder parse temp Input Source catch Parser Configuration Exception e AntUI Plugin log e catch IO Exception io Exception AntUI Plugin log io Exception catch SAX Exception sax Exception AntUI Plugin log sax Exception return temp Document  parseFile aFileName tempDocument DocumentBuilderFactory tempFactory DocumentBuilderFactory newInstance tempFactory setIgnoringComments tempFactory setIgnoringElementContentWhitespace tempFactory setCoalescing DocumentBuilder tempDocBuilder tempFactory newDocumentBuilder getClass getResource aFileName InputSource tempInputSource InputSource toExternalForm tempDocument tempDocBuilder tempInputSource ParserConfigurationException AntUIPlugin IOException ioException AntUIPlugin ioException SAXException saxException AntUIPlugin saxException tempDocument
Returns the description string for the specified task return description string or code null code if task not known or no description available public String get Description For Task String a Task Name Element task Element Element task Nodes get a Task Name if task Element null return get Description Of Node task Element return null  getDescriptionForTask aTaskName taskElement taskNodes aTaskName taskElement getDescriptionOfNode taskElement
Returns the description of the specified node P The node must be either one of task node or attribute node protected String get Description Of Node Node a Node Node List temp Child Nodes a Node get Child Nodes for int i 0 i temp Child Nodes get Length i Node temp Node temp Child Nodes item i if temp Node instanceof Element XML TAG DESCRIPTION equals temp Node get Node Name Element temp Description Element Element temp Node Node temp Child Node temp Description Element get First Child if temp Child Node instanceof Text return Text temp Child Node get Data break return null  getDescriptionOfNode aNode NodeList tempChildNodes aNode getChildNodes tempChildNodes getLength tempNode tempChildNodes tempNode XML_TAG_DESCRIPTION tempNode getNodeName tempDescriptionElement tempNode tempChildNode tempDescriptionElement getFirstChild tempChildNode tempChildNode getData
Returns the Required value of the specified node P Currently the XML file has Required defined as NOTDEFINED in some cases If so the value returned is an empty string protected String get Required Of Node Node a Node String tmp Node Name a Node get Node Name String tmp Required Value null if a Node get Node Type Node ELEMENT NODE XML TAG ATTRIBUTE equals tmp Node Name XML TAG ELEMENT equals tmp Node Name tmp Required Value a Node get Attributes get Named Item XML ATTRIBUTE REQUIRED get Node Value if tmp Required Value null tmp Required Value equals NOTDEFINED NON NLS 1 return NON NLS 1 return tmp Required Value  getRequiredOfNode aNode tmpNodeName aNode getNodeName tmpRequiredValue aNode getNodeType ELEMENT_NODE XML_TAG_ATTRIBUTE tmpNodeName XML_TAG_ELEMENT tmpNodeName tmpRequiredValue aNode getAttributes getNamedItem XML_ATTRIBUTE_REQUIRED getNodeValue tmpRequiredValue tmpRequiredValue tmpRequiredValue
Returns the description string for the specified attribute of the specified task return description string or code null code if task or attribute not known or no description available public String get Description For Task Attribute String a Task Name String an Attribute Name String tmp Description null Node tmp Attributes Node get Attributes Node a Task Name if tmp Attributes Node null tmp Description get Description For Node Named With Name In Node List XML TAG ATTRIBUTE an Attribute Name tmp Attributes Node get Child Nodes If Description is null we try the elements section else we re satisfied if tmp Description null return tmp Description Not yet found Try the elements Node tmp Attributes Node get Elements Node a Task Name if tmp Attributes Node null tmp Description get Description For Node Named With Name In Node List XML TAG ELEMENT an Attribute Name tmp Attributes Node get Child Nodes return tmp Description return null  getDescriptionForTaskAttribute aTaskName anAttributeName tmpDescription tmpAttributesNode getAttributesNode aTaskName tmpAttributesNode tmpDescription getDescriptionForNodeNamedWithNameInNodeList XML_TAG_ATTRIBUTE anAttributeName tmpAttributesNode getChildNodes tmpDescription tmpDescription tmpAttributesNode getElementsNode aTaskName tmpAttributesNode tmpDescription getDescriptionForNodeNamedWithNameInNodeList XML_TAG_ELEMENT anAttributeName tmpAttributesNode getChildNodes tmpDescription
Returns the required string value for the specified attribute of the specified task return required string or code null code if task or attribute not known or no description available public String get Required Attribute For Task Attribute String a Task Name String an Attribute Name String tmp Required null Node tmp Attributes Node get Attributes Node a Task Name if tmp Attributes Node null tmp Required get Required For Node Named With Name In Node List XML TAG ATTRIBUTE an Attribute Name tmp Attributes Node get Child Nodes If Required is null we try the elements section else we re satisfied if tmp Required null return tmp Required Not yet found Try the elements Node tmp Attributes Node get Elements Node a Task Name if tmp Attributes Node null tmp Required get Description For Node Named With Name In Node List XML TAG ELEMENT an Attribute Name tmp Attributes Node get Child Nodes Return it even if its null return tmp Required Not found return null return null  getRequiredAttributeForTaskAttribute aTaskName anAttributeName tmpRequired tmpAttributesNode getAttributesNode aTaskName tmpAttributesNode tmpRequired getRequiredForNodeNamedWithNameInNodeList XML_TAG_ATTRIBUTE anAttributeName tmpAttributesNode getChildNodes tmpRequired tmpRequired tmpAttributesNode getElementsNode aTaskName tmpAttributesNode tmpRequired getDescriptionForNodeNamedWithNameInNodeList XML_TAG_ELEMENT anAttributeName tmpAttributesNode getChildNodes tmpRequired
Returns the Elements Node of the specified Task Name param a Task Name The name of the task return The Elements Node of the Task protected Node get Elements Node String a Task Name Node tmp Structure Node get Structure Node a Task Name if tmp Structure Node null return get Child Node Named Of Type From Node XML TAG ELEMENTS Node ELEMENT NODE tmp Structure Node return null  TaskName aTaskName getElementsNode aTaskName tmpStructureNode getStructureNode aTaskName tmpStructureNode getChildNodeNamedOfTypeFromNode XML_TAG_ELEMENTS ELEMENT_NODE tmpStructureNode
Returns the Attributes Node of the specified Task Name param a Task Name The name of the task return The Attributes Node of the Task or code null code if one does not exist protected Node get Attributes Node String a Task Name Node tmp Structure Node get Structure Node a Task Name if tmp Structure Node null return get Child Node Named Of Type From Node XML TAG ATTRIBUTES Node ELEMENT NODE tmp Structure Node return null  TaskName aTaskName getAttributesNode aTaskName tmpStructureNode getStructureNode aTaskName tmpStructureNode getChildNodeNamedOfTypeFromNode XML_TAG_ATTRIBUTES ELEMENT_NODE tmpStructureNode
Returns the Structure Node of the specified Task Name param a Task Name The name of the task return The Structure Node of the Task protected Node get Structure Node String a Task Name Element task Element Element task Nodes get a Task Name if task Element null Dig us down to the Structure node Node structure Node get Child Node Named Of Type From Node XML TAG STRUCTURE Node ELEMENT NODE task Element return structure Node return null  TaskName aTaskName getStructureNode aTaskName taskElement taskNodes aTaskName taskElement structureNode getChildNodeNamedOfTypeFromNode XML_TAG_STRUCTURE ELEMENT_NODE taskElement structureNode
Returns the Description for a Node satisfying the criterias in the Node List given as Argument param a Node Name The Name of the Node param an Attribute Name The string of the Name value param an Attributes Node List The Node List to search in return The Description found or null if none is found protected String get Description For Node Named With Name In Node List String a Node Name String an Attribute Name Node List an Attributes Node List for int i 0 i an Attributes Node List get Length i Node temp Node an Attributes Node List item i if temp Node get Node Type Node ELEMENT NODE a Node Name equals temp Node get Node Name if an Attribute Name equals get Task Attribute Name temp Node return get Description Of Node temp Node Not found return null  NodeList aNodeName anAttributeName anAttributesNodeList NodeList getDescriptionForNodeNamedWithNameInNodeList aNodeName anAttributeName NodeList anAttributesNodeList anAttributesNodeList getLength tempNode anAttributesNodeList tempNode getNodeType ELEMENT_NODE aNodeName tempNode getNodeName anAttributeName getTaskAttributeName tempNode getDescriptionOfNode tempNode
Returns the Name of Task Attribute return The Name of the Attribute public String get Task Attribute Name Node a Task Attribute Node Named Node Map tmp Named Node Map a Task Attribute Node get Attributes return tmp Named Node Map get Named Item XML ATTRIBUTE NAME get Node Value  getTaskAttributeName aTaskAttributeNode NamedNodeMap tmpNamedNodeMap aTaskAttributeNode getAttributes tmpNamedNodeMap getNamedItem XML_ATTRIBUTE_NAME getNodeValue
Returns the Child Node of the node defined by the Arguments The first child found matching the criterias is returned param a Node Name The Name of the Node to return param a Type The Type of the node see Node param a Parent Node The Node to get the child from return The First Child Node found matching the criterias or null if none is found protected Node get Child Node Named Of Type From Node String a Node Name short a Node Type Node a Parent Node Node List tmp Node List a Parent Node get Child Nodes for int i 0 i tmp Node List get Length i Node tmp Node tmp Node List item i if tmp Node get Node Type a Node Type a Node Name equals tmp Node get Node Name return tmp Node Not found return null  ChildNode aNodeName aType aParentNode getChildNodeNamedOfTypeFromNode aNodeName aNodeType aParentNode NodeList tmpNodeList aParentNode getChildNodes tmpNodeList getLength tmpNode tmpNodeList tmpNode getNodeType aNodeType aNodeName tmpNode getNodeName tmpNode
Returns the Required Field for a Node satisfying the criterias in the Node List given as Argument param a Node Name The Name of the Node param an Attribute Name The string of the Name value param an Attributes Node List The Node List to search in return The Description found or null if none is found protected String get Required For Node Named With Name In Node List String a Node Name String an Attribute Name Node List an Attributes Node List for int i 0 i an Attributes Node List get Length i Node temp Node an Attributes Node List item i if temp Node get Node Type Node ELEMENT NODE a Node Name equals temp Node get Node Name if an Attribute Name equals get Task Attribute Name temp Node return get Required Of Node temp Node Not found return null  NodeList aNodeName anAttributeName anAttributesNodeList NodeList getRequiredForNodeNamedWithNameInNodeList aNodeName anAttributeName NodeList anAttributesNodeList anAttributesNodeList getLength tempNode anAttributesNodeList tempNode getNodeType ELEMENT_NODE aNodeName tempNode getNodeName anAttributeName getTaskAttributeName tempNode getRequiredOfNode tempNode

private Ant Model f Ant Model public Ant Context Template Context Type type I Document document Ant Model model int completion Offset int completion Length super type document completion Offset completion Length f Ant Model model  AntModel fAntModel AntContext TemplateContextType IDocument AntModel completionOffset completionLength completionOffset completionLength fAntModel
public Template Buffer evaluate Template template throws Bad Location Exception Template Exception Template Buffer template Buffer super evaluate template if template Buffer null return null TODO Not enabled see bug 55356 if false AntUI Plugin get Default get Preference Store get Boolean Ant Editor Preference Constants TEMPLATES USE CODEFORMATTER Formatting Preferences prefs new Formatting Preferences Xml Formatter format template Buffer this prefs return template Buffer  TemplateBuffer BadLocationException TemplateException TemplateBuffer templateBuffer templateBuffer AntUIPlugin getDefault getPreferenceStore getBoolean AntEditorPreferenceConstants TEMPLATES_USE_CODEFORMATTER FormattingPreferences FormattingPreferences XmlFormatter templateBuffer templateBuffer
return Returns the Ant Model public Ant Model get Ant Model return f Ant Model  AntModel AntModel getAntModel fAntModel
public int get End int replacement Offset get Completion Offset int replacement Length get Completion Length if replacement Offset 0 get Document get char At replacement Offset 1 replacement Length return replacement Length  getEnd replacementOffset getCompletionOffset replacementLength getCompletionLength replacementOffset getDocument charAt replacementOffset replacementLength replacementLength
public int get Start int replacement Offset get Completion Offset if replacement Offset 0 get Document get char At replacement Offset 1 replacement Offset return replacement Offset  getStart replacementOffset getCompletionOffset replacementOffset getDocument charAt replacementOffset replacementOffset replacementOffset

public class Ant Source Viewer Information Control extends Default Information Control public Ant Source Viewer Information Control Shell parent int shell Style int style I Information Presenter presenter super parent shell Style style presenter  AntSourceViewerInformationControl DefaultInformationControl AntSourceViewerInformationControl shellStyle IInformationPresenter shellStyle
public Ant Source Viewer Information Control Shell parent int shell Style int style I Information Presenter presenter String status Field Text super parent shell Style style presenter status Field Text  AntSourceViewerInformationControl shellStyle IInformationPresenter statusFieldText shellStyle statusFieldText
public Ant Source Viewer Information Control Shell parent int style I Information Presenter presenter super parent style presenter  AntSourceViewerInformationControl IInformationPresenter
public Ant Source Viewer Information Control Shell parent int style I Information Presenter presenter String status Field Text super parent style presenter status Field Text  AntSourceViewerInformationControl IInformationPresenter statusFieldText statusFieldText
public Ant Source Viewer Information Control Shell parent super parent  AntSourceViewerInformationControl
public Ant Source Viewer Information Control Shell parent I Information Presenter presenter super parent presenter  AntSourceViewerInformationControl IInformationPresenter
public void set Information String content if content null AntUI Plugin get Default get Preference Store get Boolean Ant Editor Preference Constants TEMPLATES USE CODEFORMATTER content Xml Formatter format content new Formatting Preferences super set Information content  setInformation AntUIPlugin getDefault getPreferenceStore getBoolean AntEditorPreferenceConstants TEMPLATES_USE_CODEFORMATTER XmlFormatter FormattingPreferences setInformation

private Contribution Context Type Registry f Registry private Ant Template Access  ContributionContextTypeRegistry fRegistry AntTemplateAccess
Returns the shared instance return the shared instance public static Ant Template Access get Default if fg Instance null fg Instance new Ant Template Access return fg Instance  AntTemplateAccess getDefault fgInstance fgInstance AntTemplateAccess fgInstance
Returns this plug in s template store return the template store of this plug in instance public Template Store get Template Store if f Store null f Store new Contribution Template Store get Context Type Registry AntUI Plugin get Default get Preference Store CUSTOM TEMPLATES KEY try f Store load catch IO Exception e AntUI Plugin log e return f Store  TemplateStore getTemplateStore fStore fStore ContributionTemplateStore getContextTypeRegistry AntUIPlugin getDefault getPreferenceStore CUSTOM_TEMPLATES_KEY fStore IOException AntUIPlugin fStore
Returns this plug in s context type registry return the context type registry for this plug in instance public Context Type Registry get Context Type Registry if f Registry null create and configure the contexts available in the template editor f Registry new Contribution Context Type Registry f Registry add Context Type Build File Context Type BUILDFILE CONTEXT TYPE f Registry add Context Type Task Context Type TASK CONTEXT TYPE return f Registry  ContextTypeRegistry getContextTypeRegistry fRegistry fRegistry ContributionContextTypeRegistry fRegistry addContextType BuildFileContextType BUILDFILE_CONTEXT_TYPE fRegistry addContextType TaskContextType TASK_CONTEXT_TYPE fRegistry
public I Preference Store get Preference Store return AntUI Plugin get Default get Preference Store  IPreferenceStore getPreferenceStore AntUIPlugin getDefault getPreferenceStore
public void save Plugin Preferences AntUI Plugin get Default save Plugin Preferences  savePluginPreferences AntUIPlugin getDefault savePluginPreferences

private Ant Source Viewer Information Control f Control public Ant Template Information Control Creator  AntSourceViewerInformationControl fControl AntTemplateInformationControlCreator
f Control new Ant Source Viewer Information Control parent f Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e f Control null  fControl AntSourceViewerInformationControl fControl addDisposeListener DisposeListener widgetDisposed DisposeEvent fControl
public I Information Control create Information Control Shell parent f Control new Ant Source Viewer Information Control parent f Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e f Control null return f Control  IInformationControl createInformationControl fControl AntSourceViewerInformationControl fControl addDisposeListener DisposeListener widgetDisposed DisposeEvent fControl fControl
see org eclipse jface text I Information Control Creator Extension can Reuse org eclipse jface text I Information Control public boolean can Reuse I Information Control control return f Control control f Control null  IInformationControlCreatorExtension canReuse IInformationControl canReuse IInformationControl fControl fControl
see org eclipse jface text I Information Control Creator Extension can Replace org eclipse jface text I Information Control Creator public boolean can Replace I Information Control Creator creator return creator null get Class creator get Class  IInformationControlCreatorExtension canReplace IInformationControlCreator canReplace IInformationControlCreator getClass getClass

public Ant Template Preference Page set Preference Store AntUI Plugin get Default get Preference Store set Template Store Ant Template Access get Default get Template Store set Context Type Registry Ant Template Access get Default get Context Type Registry  AntTemplatePreferencePage setPreferenceStore AntUIPlugin getDefault getPreferenceStore setTemplateStore AntTemplateAccess getDefault getTemplateStore setContextTypeRegistry AntTemplateAccess getDefault getContextTypeRegistry
public boolean perform Ok boolean ok super perform Ok AntUI Plugin get Default save Plugin Preferences return ok  performOk performOk AntUIPlugin getDefault savePluginPreferences
protected Source Viewer create Viewer Composite parent Source Viewer viewer new Source Viewer parent null null false SWT BORDER SWT V SCROLL SWT H SCROLL Source Viewer Configuration configuration new Ant Template Viewer Configuration I Document document new Document new Ant Document Setup Participant setup document viewer configure configuration viewer set Document document viewer set Editable false Font font J Face Resources get Font J Face Resources TEXT FONT viewer get Text Widget set Font font return viewer  SourceViewer createViewer SourceViewer SourceViewer V_SCROLL H_SCROLL SourceViewerConfiguration AntTemplateViewerConfiguration IDocument AntDocumentSetupParticipant setDocument setEditable JFaceResources getFont JFaceResources TEXT_FONT getTextWidget setFont
see org eclipse ui texteditor templates Template Preference Page get Formatter Preference Key protected String get Formatter Preference Key return Ant Editor Preference Constants TEMPLATES USE CODEFORMATTER  TemplatePreferencePage getFormatterPreferenceKey getFormatterPreferenceKey AntEditorPreferenceConstants TEMPLATES_USE_CODEFORMATTER
protected void update Viewer Input I Structured Selection selection I Structured Selection get Table Viewer get Selection Source Viewer viewer get Viewer if selection size 1 selection get First Element instanceof Template Persistence Data Template Persistence Data data Template Persistence Data selection get First Element Template template data get Template if AntUI Plugin get Default get Preference Store get Boolean get Formatter Preference Key String formatted Xml Formatter format template get Pattern f Formatting Preferences viewer get Document set formatted else viewer get Document set template get Pattern else viewer get Document set NON NLS 1  updateViewerInput IStructuredSelection IStructuredSelection getTableViewer getSelection SourceViewer getViewer getFirstElement TemplatePersistenceData TemplatePersistenceData TemplatePersistenceData getFirstElement getTemplate AntUIPlugin getDefault getPreferenceStore getBoolean getFormatterPreferenceKey XmlFormatter getPattern fFormattingPreferences getDocument getDocument getPattern getDocument
see org eclipse ui texteditor templates Template Preference Page is Show Formatter Setting protected boolean is Show Formatter Setting return false  TemplatePreferencePage isShowFormatterSetting isShowFormatterSetting

public class Ant Template Proposal extends Template Proposal public Ant Template Proposal Template template Template Context context I Region region Image image super template context region image  AntTemplateProposal TemplateProposal AntTemplateProposal TemplateContext IRegion
public Ant Template Proposal Template template Template Context context I Region region Image image int relevance super template context region image relevance  AntTemplateProposal TemplateContext IRegion
see org eclipse jface text contentassist I Completion Proposal Extension3 get Information Control Creator public I Information Control Creator get Information Control Creator return new Ant Template Information Control Creator  ICompletionProposalExtension3 getInformationControlCreator IInformationControlCreator getInformationControlCreator AntTemplateInformationControlCreator

public class Ant Template Variable Text Hover implements I Text Hover public Ant Template Variable Text Hover  AntTemplateVariableTextHover ITextHover AntTemplateVariableTextHover
public String get Hover Info I Text Viewer text Viewer I Region subject try I Document doc text Viewer get Document int offset subject get Offset if offset 2 equals doc get offset 2 2 NON NLS 1 String var Name doc get offset subject get Length Template Context Type context Type Ant Template Access get Default get Context Type Registry get Context Type Task Context Type TASK CONTEXT TYPE if context Type null Iterator iter context Type resolvers while iter has Next Template Variable Resolver var Template Variable Resolver iter next if var Name equals var get Type return var get Description catch Bad Location Exception e return null  getHoverInfo ITextViewer textViewer IRegion IDocument textViewer getDocument getOffset varName getLength TemplateContextType contextType AntTemplateAccess getDefault getContextTypeRegistry getContextType TaskContextType TASK_CONTEXT_TYPE contextType contextType hasNext TemplateVariableResolver TemplateVariableResolver varName getType getDescription BadLocationException
public I Region get Hover Region I Text Viewer text Viewer int offset if text Viewer null return XML Text Hover get Region text Viewer offset return null  IRegion getHoverRegion ITextViewer textViewer textViewer XMLTextHover getRegion textViewer

see org eclipse jface text source Source Viewer Configuration get Text Hover org eclipse jface text source I Source Viewer java lang String public I Text Hover get Text Hover I Source Viewer source Viewer String content Type return new Ant Template Variable Text Hover  SourceViewerConfiguration getTextHover ISourceViewer ITextHover getTextHover ISourceViewer sourceViewer contentType AntTemplateVariableTextHover

Arrays sort proposals new Comparator public int compare Object o1 Object o2 return get Common Prefix Length get Type String o2 get Common Prefix Length get Type String o1  getCommonPrefixLength getType getCommonPrefixLength getType
private int get Common Prefix Length String type String var int i 0 Char Sequence v Seq var sub Sequence 2 var length 1 strip away while i type length i v Seq length if Character to Lower Case type char At i Character to Lower Case v Seq char At i i else break return i  getCommonPrefixLength CharSequence vSeq subSequence vSeq toLowerCase charAt toLowerCase vSeq charAt
protected String resolve All Template Context context String proposals new String src Dir dst Dir NON NLS 1 NON NLS 2 Arrays sort proposals new Comparator public int compare Object o1 Object o2 return get Common Prefix Length get Type String o2 get Common Prefix Length get Type String o1 private int get Common Prefix Length String type String var int i 0 Char Sequence v Seq var sub Sequence 2 var length 1 strip away while i type length i v Seq length if Character to Lower Case type char At i Character to Lower Case v Seq char At i i else break return i return proposals  resolveAll TemplateContext srcDir dstDir getCommonPrefixLength getType getCommonPrefixLength getType getCommonPrefixLength CharSequence vSeq subSequence vSeq toLowerCase charAt toLowerCase vSeq charAt

Creates a new XML context type public Build File Context Type add Global Resolvers  BuildFileContextType addGlobalResolvers
private void add Global Resolvers add Resolver new Global Template Variables Cursor add Resolver new Global Template Variables Word Selection add Resolver new Global Template Variables Line Selection add Resolver new Global Template Variables Dollar add Resolver new Global Template Variables Date add Resolver new Global Template Variables Year add Resolver new Global Template Variables Time add Resolver new Global Template Variables User  addGlobalResolvers addResolver GlobalTemplateVariables addResolver GlobalTemplateVariables WordSelection addResolver GlobalTemplateVariables LineSelection addResolver GlobalTemplateVariables addResolver GlobalTemplateVariables addResolver GlobalTemplateVariables addResolver GlobalTemplateVariables addResolver GlobalTemplateVariables

protected void adapt To Color Change Property Change Event event Token token RGB rgb null Object value event get New Value if value instanceof RGB rgb RGB value else if value instanceof String rgb String Converter asRGB String value if rgb null Text Attribute attr Text Attribute token get Data token set Data new Text Attribute Color Manager get Default get Color rgb attr get Background attr get Style  adaptToColorChange PropertyChangeEvent getNewValue StringConverter TextAttribute TextAttribute getData setData TextAttribute ColorManager getDefault getColor getBackground getStyle
protected void adapt To Style Change Property Change Event event Token token int style Attribute if token null return boolean event Value false Object value event get New Value if value instanceof Boolean event Value Boolean value boolean Value else if I Preference Store TRUE equals value event Value true Text Attribute attr Text Attribute token get Data boolean active Value attr get Style style Attribute style Attribute if active Value event Value token set Data new Text Attribute attr get Foreground attr get Background event Value attr get Style style Attribute attr get Style style Attribute  adaptToStyleChange PropertyChangeEvent styleAttribute eventValue getNewValue eventValue booleanValue IPreferenceStore eventValue TextAttribute TextAttribute getData activeValue getStyle styleAttribute styleAttribute activeValue eventValue setData TextAttribute getForeground getBackground eventValue getStyle styleAttribute getStyle styleAttribute
protected Text Attribute create Text Attribute String colorID String bold Key String italic Key Color color null if colorID null color AntUI Plugin get Preference Color colorID I Preference Store store AntUI Plugin get Default get Preference Store int style store get Boolean bold Key SWT BOLD SWT NORMAL if store get Boolean italic Key style SWT ITALIC return new Text Attribute color null style  TextAttribute createTextAttribute boldKey italicKey AntUIPlugin getPreferenceColor IPreferenceStore AntUIPlugin getDefault getPreferenceStore getBoolean boldKey getBoolean italicKey TextAttribute

public Object get Type Annotation annotation if annotation instanceof IXML Annotation IXML Annotation xml Annotation IXML Annotation annotation if xml Annotation is Relevant return xml Annotation get Type return super get Type annotation  getType IXMLAnnotation IXMLAnnotation xmlAnnotation IXMLAnnotation xmlAnnotation isRelevant xmlAnnotation getType getType
public boolean is Temporary Annotation annotation if annotation instanceof IXML Annotation IXML Annotation xml Annotation IXML Annotation annotation if xml Annotation is Relevant return xml Annotation is Temporary return super is Temporary annotation  isTemporary IXMLAnnotation IXMLAnnotation xmlAnnotation IXMLAnnotation xmlAnnotation isRelevant xmlAnnotation isTemporary isTemporary

public class Ant Document Factory implements I Document Factory public Ant Document Factory  AntDocumentFactory IDocumentFactory AntDocumentFactory
see org eclipse core filebuffers I Document Factory create Document public I Document create Document return new Partially Synchronized Document  IDocumentFactory createDocument IDocument createDocument PartiallySynchronizedDocument

public final static String ANT PARTITIONING    ant partitioning NON NLS 1 public Ant Document Setup Participant  ANT_PARTITIONING ___ant_partitioning AntDocumentSetupParticipant
public void setup I Document document if document instanceof I Document Extension3 I Document Extension3 extension3 I Document Extension3 document I Document Partitioner partitioner create Document Partitioner extension3 set Document Partitioner ANT PARTITIONING partitioner partitioner connect document  IDocument IDocumentExtension3 IDocumentExtension3 IDocumentExtension3 IDocumentPartitioner createDocumentPartitioner setDocumentPartitioner ANT_PARTITIONING
private I Document Partitioner create Document Partitioner return new Default Partitioner new Ant Editor Partition Scanner new String Ant Editor Partition Scanner XML TAG Ant Editor Partition Scanner XML COMMENT Ant Editor Partition Scanner XML CDATA  IDocumentPartitioner createDocumentPartitioner DefaultPartitioner AntEditorPartitionScanner AntEditorPartitionScanner XML_TAG AntEditorPartitionScanner XML_COMMENT AntEditorPartitionScanner XML_CDATA

private List f Currently Overlaid new Array List public Ant Annotation Model I File file super file  fCurrentlyOverlaid ArrayList AntAnnotationModel IFile
protected Marker Annotation create Marker Annotation I Marker marker String marker Type Marker Utilities get Marker Type marker if Ant Editor Marker Updater BUILDFILE PROBLEM MARKER equals marker Type return null return new XML Marker Annotation EditorsUI get Annotation Type Lookup get Annotation Type marker marker  MarkerAnnotation createMarkerAnnotation IMarker markerType MarkerUtilities getMarkerType AntEditorMarkerUpdater BUILDFILE_PROBLEM_MARKER markerType XMLMarkerAnnotation getAnnotationTypeLookup getAnnotationType
protected Position create Position From Problem I Problem problem int start problem get Offset if start 0 int length problem get Length if length 0 return new Position start length return null  createPositionFromProblem IProblem getOffset getLength
see org eclipse ant internal ui editor outline I Problem Requestor accept Problem org eclipse ant internal ui editor outline I Problem public void accept Problem I Problem problem f Collected Problems add problem  IProblemRequestor acceptProblem IProblem acceptProblem IProblem fCollectedProblems
see org eclipse ant internal ui editor outline I Problem Requestor accept Problem org eclipse ant internal ui editor outline I Problem public void begin Reporting  IProblemRequestor acceptProblem IProblem beginReporting
public void end Reporting boolean temporary Problems Changed false f Previously Overlaid f Currently Overlaid f Currently Overlaid new Array List synchronized get Annotation Map if f Generated Annotations size 0 temporary Problems Changed true remove Annotations f Generated Annotations false true f Generated Annotations clear if f Collected Problems null f Collected Problems size 0 Iterator e f Collected Problems iterator while e has Next I Problem problem I Problem e next Position position create Position From Problem problem if position null XML Problem Annotation annotation new XML Problem Annotation problem overlay Markers position annotation f Generated Annotations add annotation try add Annotation annotation position false catch Bad Location Exception ex AntUI Plugin log ex temporary Problems Changed true f Collected Problems clear remove Marker Overlays f Previously Overlaid clear f Previously Overlaid null if temporary Problems Changed fire Model Changed new Annotation Model Event this  endReporting temporaryProblemsChanged fPreviouslyOverlaid fCurrentlyOverlaid fCurrentlyOverlaid ArrayList getAnnotationMap fGeneratedAnnotations temporaryProblemsChanged removeAnnotations fGeneratedAnnotations fGeneratedAnnotations fCollectedProblems fCollectedProblems fCollectedProblems hasNext IProblem IProblem createPositionFromProblem XMLProblemAnnotation XMLProblemAnnotation overlayMarkers fGeneratedAnnotations addAnnotation BadLocationException AntUIPlugin temporaryProblemsChanged fCollectedProblems removeMarkerOverlays fPreviouslyOverlaid fPreviouslyOverlaid temporaryProblemsChanged fireModelChanged AnnotationModelEvent
private void remove Marker Overlays Iterator e f Previously Overlaid iterator while e has Next XML Marker Annotation annotation XML Marker Annotation e next annotation set Overlay null  removeMarkerOverlays fPreviouslyOverlaid hasNext XMLMarkerAnnotation XMLMarkerAnnotation setOverlay
Overlays value with problem annotation param problem Annotation private void set Overlay Object value XML Problem Annotation problem Annotation if value instanceof XML Marker Annotation XML Marker Annotation annotation XML Marker Annotation value if annotation is Problem annotation set Overlay problem Annotation f Previously Overlaid remove annotation f Currently Overlaid add annotation  problemAnnotation setOverlay XMLProblemAnnotation problemAnnotation XMLMarkerAnnotation XMLMarkerAnnotation XMLMarkerAnnotation isProblem setOverlay problemAnnotation fPreviouslyOverlaid fCurrentlyOverlaid
private void overlay Markers Position position XML Problem Annotation problem Annotation Object value get Annotations position if value instanceof List List list List value for Iterator e list iterator e has Next set Overlay e next problem Annotation else set Overlay value problem Annotation  overlayMarkers XMLProblemAnnotation problemAnnotation getAnnotations hasNext setOverlay problemAnnotation setOverlay problemAnnotation
private Object get Annotations Position position return f Reverse Map get position  getAnnotations fReverseMap
protected void add Annotation Annotation annotation Position position boolean fire Model Changed throws Bad Location Exception super add Annotation annotation position fire Model Changed Object cached f Reverse Map get position if cached null f Reverse Map put position annotation else if cached instanceof List List list List cached list add annotation else if cached instanceof Annotation List list new Array List 2 list add cached list add annotation f Reverse Map put position list  addAnnotation fireModelChanged BadLocationException addAnnotation fireModelChanged fReverseMap fReverseMap ArrayList fReverseMap
see org eclipse jface text source Annotation Model remove All Annotations boolean protected void remove All Annotations boolean fire Model Changed super remove All Annotations fire Model Changed f Reverse Map clear  AnnotationModel removeAllAnnotations removeAllAnnotations fireModelChanged removeAllAnnotations fireModelChanged fReverseMap
protected void remove Annotation Annotation annotation boolean fire Model Changed Position position get Position annotation Object cached f Reverse Map get position if cached instanceof List List list List cached list remove annotation if list size 1 f Reverse Map put position list get 0 list clear else if cached instanceof Annotation f Reverse Map remove position super remove Annotation annotation fire Model Changed  removeAnnotation fireModelChanged getPosition fReverseMap fReverseMap fReverseMap removeAnnotation fireModelChanged
public Ant Model f Ant Model public Ant File Info  AntModel fAntModel AntFileInfo
private int f Anchor 0 public Reverse Map  fAnchor ReverseMap
public Object get Position position Entry entry behind anchor int length f List size for int i f Anchor i length i entry Entry f List get i if entry f Position equals position f Anchor i return entry f Value before anchor for int i 0 i f Anchor i entry Entry f List get i if entry f Position equals position f Anchor i return entry f Value return null  fList fAnchor fList fPosition fAnchor fValue fAnchor fList fPosition fAnchor fValue
private int get Index Position position Entry entry int length f List size for int i 0 i length i entry Entry f List get i if entry f Position equals position return i return 1  getIndex fList fList fPosition
public void put Position position Object value int index get Index position if index 1 Entry entry new Entry entry f Position position entry f Value value f List add entry else Entry entry Entry f List get index entry f Value value  getIndex fPosition fValue fList fList fValue
public void remove Position position int index get Index position if index 1 f List remove index  getIndex fList
public void clear f List clear  fList
public Ant Editor Document Provider XML Core core I Document Provider provider new Text File Document Provider new Ant Storage Document Provider provider new Forwarding Document Provider Ant Document Setup Participant ANT PARTITIONING new Ant Document Setup Participant provider set Parent Document Provider provider f Core core  AntEditorDocumentProvider XMLCore IDocumentProvider TextFileDocumentProvider AntStorageDocumentProvider ForwardingDocumentProvider AntDocumentSetupParticipant ANT_PARTITIONING AntDocumentSetupParticipant setParentDocumentProvider fCore
public Ant Model get Ant Model Object element File Info info get File Info element if info instanceof Ant File Info Ant File Info xml Info Ant File Info info return xml Info f Ant Model return null  AntModel getAntModel FileInfo getFileInfo AntFileInfo AntFileInfo xmlInfo AntFileInfo xmlInfo fAntModel
see org eclipse ui editors text Text File Document Provider create Annotation Model org eclipse core resources I File protected I Annotation Model create Annotation Model I File file return new Ant Annotation Model file  TextFileDocumentProvider createAnnotationModel IFile IAnnotationModel createAnnotationModel IFile AntAnnotationModel
protected Ant Model create Ant Model Object element I Document document I Annotation Model annotation Model I Problem Requestor requestor annotation Model instanceof I Problem Requestor I Problem Requestor annotation Model null return new Ant Model f Core document requestor new Location Provider element instanceof I Editor Input I Editor Input element null  AntModel createAntModel IDocument IAnnotationModel annotationModel IProblemRequestor annotationModel IProblemRequestor IProblemRequestor annotationModel AntModel fCore LocationProvider IEditorInput IEditorInput
protected File Info create File Info Object element throws Core Exception File Info info super create File Info element if info instanceof Ant File Info return null Ant File Info xml Info Ant File Info info I Annotation Model model xml Info f Model if model null model create Annotation Model null model connect xml Info f Text File Buffer get Document Ant Model ant Model create Ant Model element xml Info f Text File Buffer get Document model ant Model install xml Info f Ant Model ant Model set Up Synchronization xml Info return xml Info  FileInfo createFileInfo CoreException FileInfo createFileInfo AntFileInfo AntFileInfo xmlInfo AntFileInfo IAnnotationModel xmlInfo fModel createAnnotationModel xmlInfo fTextFileBuffer getDocument AntModel antModel createAntModel xmlInfo fTextFileBuffer getDocument antModel xmlInfo fAntModel antModel setUpSynchronization xmlInfo xmlInfo
protected void dispose File Info Object element File Info info if info instanceof Ant File Info Ant File Info xml Info Ant File Info info if xml Info f Ant Model null xml Info f Ant Model dispose super dispose File Info element info  disposeFileInfo FileInfo AntFileInfo AntFileInfo xmlInfo AntFileInfo xmlInfo fAntModel xmlInfo fAntModel disposeFileInfo
see org eclipse ui editors text Text File Document Provider create Empty File Info protected File Info create Empty File Info return new Ant File Info  TextFileDocumentProvider createEmptyFileInfo FileInfo createEmptyFileInfo AntFileInfo
private void set Up Synchronization Ant File Info ant Info I Document document ant Info f Text File Buffer get Document I Annotation Model model ant Info f Model if document instanceof I Synchronizable model instanceof I Synchronizable Object lock I Synchronizable document get Lock Object I Synchronizable model set Lock Object lock  setUpSynchronization AntFileInfo antInfo IDocument antInfo fTextFileBuffer getDocument IAnnotationModel antInfo fModel ISynchronizable ISynchronizable ISynchronizable getLockObject ISynchronizable setLockObject

Creates an instance public Ant Editor Partition Scanner I Predicate Rule rules new I Predicate Rule 3 I Token xmlCDATA new Token XML CDATA rules 0 new Multi Line Rule CDATA xmlCDATA NON NLS 1 NON NLS 2 I Token xml Comment new Token XML COMMENT rules 1 new Multi Line Rule xml Comment true NON NLS 1 NON NLS 2 I Token tag new Token XML TAG rules 2 new Tag Rule tag set Predicate Rules rules  AntEditorPartitionScanner IPredicateRule IPredicateRule IToken XML_CDATA MultiLineRule IToken xmlComment XML_COMMENT MultiLineRule xmlComment IToken XML_TAG TagRule setPredicateRules

public Ant Editor Proc Instr Scanner I Rule rules new I Rule 2 f Proc Instruction Token new Token create Text Attribute I Ant Editor Color Constants PROCESSING INSTRUCTIONS COLOR I Ant Editor Color Constants PROCESSING INSTRUCTIONS COLOR Ant Editor Preference Constants EDITOR BOLD SUFFIX I Ant Editor Color Constants PROCESSING INSTRUCTIONS COLOR Ant Editor Preference Constants EDITOR ITALIC SUFFIX Add rule for processing instructions rules 0 new Single Line Rule f Proc Instruction Token NON NLS 1 NON NLS 2 Add generic whitespace rule rules 1 new Whitespace Rule new Ant Editor Whitespace Detector set Rules rules set Default Return Token new Token create Text Attribute I Ant Editor Color Constants TEXT COLOR I Ant Editor Color Constants TEXT COLOR Ant Editor Preference Constants EDITOR BOLD SUFFIX I Ant Editor Color Constants TEXT COLOR Ant Editor Preference Constants EDITOR ITALIC SUFFIX  AntEditorProcInstrScanner IRule IRule fProcInstructionToken createTextAttribute IAntEditorColorConstants PROCESSING_INSTRUCTIONS_COLOR IAntEditorColorConstants PROCESSING_INSTRUCTIONS_COLOR AntEditorPreferenceConstants EDITOR_BOLD_SUFFIX IAntEditorColorConstants PROCESSING_INSTRUCTIONS_COLOR AntEditorPreferenceConstants EDITOR_ITALIC_SUFFIX SingleLineRule fProcInstructionToken WhitespaceRule AntEditorWhitespaceDetector setRules setDefaultReturnToken createTextAttribute IAntEditorColorConstants TEXT_COLOR IAntEditorColorConstants TEXT_COLOR AntEditorPreferenceConstants EDITOR_BOLD_SUFFIX IAntEditorColorConstants TEXT_COLOR AntEditorPreferenceConstants EDITOR_ITALIC_SUFFIX
private Token get Token Affected Property Change Event event if event get Property starts With I Ant Editor Color Constants PROCESSING INSTRUCTIONS COLOR return f Proc Instruction Token return Token f Default Return Token  getTokenAffected PropertyChangeEvent getProperty startsWith IAntEditorColorConstants PROCESSING_INSTRUCTIONS_COLOR fProcInstructionToken fDefaultReturnToken
public void adapt To Preference Change Property Change Event event String property event get Property if property starts With I Ant Editor Color Constants TEXT COLOR property starts With I Ant Editor Color Constants PROCESSING INSTRUCTIONS COLOR if property ends With Ant Editor Preference Constants EDITOR BOLD SUFFIX adapt To Style Change event get Token Affected event SWT BOLD else if property ends With Ant Editor Preference Constants EDITOR ITALIC SUFFIX adapt To Style Change event get Token Affected event SWT ITALIC else adapt To Color Change event get Token Affected event  adaptToPreferenceChange PropertyChangeEvent getProperty startsWith IAntEditorColorConstants TEXT_COLOR startsWith IAntEditorColorConstants PROCESSING_INSTRUCTIONS_COLOR endsWith AntEditorPreferenceConstants EDITOR_BOLD_SUFFIX adaptToStyleChange getTokenAffected endsWith AntEditorPreferenceConstants EDITOR_ITALIC_SUFFIX adaptToStyleChange getTokenAffected adaptToColorChange getTokenAffected

public Ant Editor Tag Scanner f String Token new Token create Text Attribute I Ant Editor Color Constants STRING COLOR I Ant Editor Color Constants STRING COLOR Ant Editor Preference Constants EDITOR BOLD SUFFIX I Ant Editor Color Constants STRING COLOR Ant Editor Preference Constants EDITOR ITALIC SUFFIX I Rule rules new I Rule 3 Add rule for single and double quotes rules 0 new Multi Line Rule f String Token NON NLS 1 NON NLS 2 rules 1 new Single Line Rule f String Token NON NLS 1 NON NLS 2 Add generic whitespace rule rules 2 new Whitespace Rule new Ant Editor Whitespace Detector set Rules rules set Default Return Token new Token create Text Attribute I Ant Editor Color Constants TAG COLOR I Ant Editor Color Constants TAG COLOR Ant Editor Preference Constants EDITOR BOLD SUFFIX I Ant Editor Color Constants TAG COLOR Ant Editor Preference Constants EDITOR ITALIC SUFFIX  AntEditorTagScanner fStringToken createTextAttribute IAntEditorColorConstants STRING_COLOR IAntEditorColorConstants STRING_COLOR AntEditorPreferenceConstants EDITOR_BOLD_SUFFIX IAntEditorColorConstants STRING_COLOR AntEditorPreferenceConstants EDITOR_ITALIC_SUFFIX IRule IRule MultiLineRule fStringToken SingleLineRule fStringToken WhitespaceRule AntEditorWhitespaceDetector setRules setDefaultReturnToken createTextAttribute IAntEditorColorConstants TAG_COLOR IAntEditorColorConstants TAG_COLOR AntEditorPreferenceConstants EDITOR_BOLD_SUFFIX IAntEditorColorConstants TAG_COLOR AntEditorPreferenceConstants EDITOR_ITALIC_SUFFIX
public void adapt To Preference Change Property Change Event event String property event get Property if property starts With I Ant Editor Color Constants TAG COLOR property starts With I Ant Editor Color Constants STRING COLOR if property ends With Ant Editor Preference Constants EDITOR BOLD SUFFIX adapt To Style Change event get Token Affected event SWT BOLD else if property ends With Ant Editor Preference Constants EDITOR ITALIC SUFFIX adapt To Style Change event get Token Affected event SWT ITALIC else adapt To Color Change event get Token Affected event  adaptToPreferenceChange PropertyChangeEvent getProperty startsWith IAntEditorColorConstants TAG_COLOR startsWith IAntEditorColorConstants STRING_COLOR endsWith AntEditorPreferenceConstants EDITOR_BOLD_SUFFIX adaptToStyleChange getTokenAffected endsWith AntEditorPreferenceConstants EDITOR_ITALIC_SUFFIX adaptToStyleChange getTokenAffected adaptToColorChange getTokenAffected
private Token get Token Affected Property Change Event event String property event get Property if property starts With I Ant Editor Color Constants STRING COLOR return f String Token else if property starts With I Ant Editor Color Constants TAG COLOR return Token f Default Return Token  getTokenAffected PropertyChangeEvent getProperty startsWith IAntEditorColorConstants STRING_COLOR fStringToken startsWith IAntEditorColorConstants TAG_COLOR fDefaultReturnToken

get Bundle BUNDLE NAME private Ant Editor Text Messages  getBundle BUNDLE_NAME AntEditorTextMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public class Ant Editor Whitespace Detector implements I Whitespace Detector public boolean is Whitespace char c return c c t c n c r  AntEditorWhitespaceDetector IWhitespaceDetector isWhitespace

protected void setup Document Object element I Document document if document null I Document Partitioner partitioner create Document Partitioner if document instanceof I Document Extension3 I Document Extension3 extension3 I Document Extension3 document extension3 set Document Partitioner Ant Document Setup Participant ANT PARTITIONING partitioner else document set Document Partitioner partitioner partitioner connect document  setupDocument IDocument IDocumentPartitioner createDocumentPartitioner IDocumentExtension3 IDocumentExtension3 IDocumentExtension3 setDocumentPartitioner AntDocumentSetupParticipant ANT_PARTITIONING setDocumentPartitioner
private I Document Partitioner create Document Partitioner return new Default Partitioner new Ant Editor Partition Scanner new String Ant Editor Partition Scanner XML TAG Ant Editor Partition Scanner XML COMMENT Ant Editor Partition Scanner XML CDATA  IDocumentPartitioner createDocumentPartitioner DefaultPartitioner AntEditorPartitionScanner AntEditorPartitionScanner XML_TAG AntEditorPartitionScanner XML_COMMENT AntEditorPartitionScanner XML_CDATA

public class File Scanner extends Directory Scanner public String get Excludes Patterns return excludes  FileScanner DirectoryScanner getExcludesPatterns
public String get Include Patterns return includes  getIncludePatterns

public interface I Reconciling Participant Called after reconciling has been finished void reconciled  IReconcilingParticipant

Returns the type of this annotation return the type of the annotation or code null code if it has none 
Returns whether this annotation is temporary rather than persistent return code true code if temporary code false code otherwise 
Returns the message assocaited with this annotation return the message for this annotation 
Returns an image for this annotation param display the display for which the image is requested return the image for this annotation 
Returns whether this annotation is relavant p If the annotation is overlaid then it is not relevant After all overlays have been removed the annotation might either become relevant again or stay irrelevant p return code true code if relevant see has Overlay  hasOverlay
Returns whether this annotation is overlaid return code true code if overlaid 
Returns an iterator for iterating over the annotation which are overlaid by this annotation return an iterator over the overlaid annotaions 
Adds the given annotation to the list of annotations which overlaid by this annotations param annotation the problem annoation 
Removes the given annotation from the list of annotations which are overlaid by this annotation param annotation the problem annoation 
Tells whether this annotation is a problem annotation return code true code if it is a problem annotation 

Creates a damager repairer that uses the given scanner and returns the given default text attribute if the current token does not carry a text attribute param scanner the token scanner to be used param default Text Attribute the text attribute to be returned if none is specified by the current token may be code null code public Multiline Damager Repairer I Token Scanner scanner Text Attribute default Text Attribute f Scanner scanner f Default Text Attribute default Text Attribute  defaultTextAttribute MultilineDamagerRepairer ITokenScanner TextAttribute defaultTextAttribute fScanner fDefaultTextAttribute defaultTextAttribute
see I Presentation Repairer set Document I Document public void set Document I Document document f Document document  IPresentationRepairer setDocument IDocument setDocument IDocument fDocument
Returns the end offset of the line that contains the specified offset or if the offset is inside a line delimiter the end offset of the next line param offset the offset whose line end offset must be computed return the line end offset for the given offset exception Bad Location Exception if offset is invalid in the current document protected int end Of Line Of int offset throws Bad Location Exception I Region info f Document get Line Information Of Offset offset if offset info get Offset info get Length return info get Offset info get Length int line f Document get Line Of Offset offset try info f Document get Line Information line 1 return info get Offset info get Length catch Bad Location Exception x return f Document get Length  BadLocationException endOfLineOf BadLocationException IRegion fDocument getLineInformationOfOffset getOffset getLength getOffset getLength fDocument getLineOfOffset fDocument getLineInformation getOffset getLength BadLocationException fDocument getLength
see I Presentation Damager get Damage Region I Typed Region Document Event boolean public I Region get Damage Region I Typed Region partition Document Event e boolean document Partitioning Changed return partition  IPresentationDamager getDamageRegion ITypedRegion DocumentEvent IRegion getDamageRegion ITypedRegion DocumentEvent documentPartitioningChanged
public void create Presentation Text Presentation presentation I Typed Region region if f Scanner null add Range presentation region get Offset region get Length f Default Text Attribute return int last Start region get Offset int length 0 I Token last Token Token UNDEFINED Text Attribute last Attribute get Token Text Attribute last Token f Scanner set Range f Document last Start region get Length while true I Token token f Scanner next Token if token isEOF break Text Attribute attribute get Token Text Attribute token if last Attribute null last Attribute equals attribute length f Scanner get Token Length else add Range presentation last Start length last Attribute last Token token last Attribute attribute last Start f Scanner get Token Offset length f Scanner get Token Length add Range presentation last Start length last Attribute  createPresentation TextPresentation ITypedRegion fScanner addRange getOffset getLength fDefaultTextAttribute lastStart getOffset IToken lastToken TextAttribute lastAttribute getTokenTextAttribute lastToken fScanner setRange fDocument lastStart getLength IToken fScanner nextToken TextAttribute getTokenTextAttribute lastAttribute lastAttribute fScanner getTokenLength addRange lastStart lastAttribute lastToken lastAttribute lastStart fScanner getTokenOffset fScanner getTokenLength addRange lastStart lastAttribute
Returns a text attribute encoded in the given token If the token s data is not code null code and a text attribute it is assumed that it is the encoded text attribute It returns the default text attribute if there is no encoded text attribute found param token the token whose text attribute is to be determined return the token s text attribute protected Text Attribute get Token Text Attribute I Token token Object data token get Data if data instanceof Text Attribute return Text Attribute data return f Default Text Attribute  TextAttribute getTokenTextAttribute IToken getData TextAttribute TextAttribute fDefaultTextAttribute
Adds style information to the given text presentation param presentation the text presentation to be extended param offset the offset of the range to be styled param length the length of the range to be styled param attr the attribute describing the style of the range to be styled protected void add Range Text Presentation presentation int offset int length Text Attribute attr if attr null presentation add Style Range new Style Range offset length attr get Foreground attr get Background attr get Style  addRange TextPresentation TextAttribute addStyleRange StyleRange getForeground getBackground getStyle
Configures the scanner s default return token This is the text attribute which is returned when none is returned by the current token public void set Default Text Attribute Text Attribute default Text Attribute f Default Text Attribute default Text Attribute  setDefaultTextAttribute TextAttribute defaultTextAttribute fDefaultTextAttribute defaultTextAttribute

Constructor for Notifying Reconciler param strategy param is Incremental public Notifying Reconciler I Reconciling Strategy strategy boolean is Incremental super strategy is Incremental  NotifyingReconciler isIncremental NotifyingReconciler IReconcilingStrategy isIncremental isIncremental
see org eclipse jface text reconciler Abstract Reconciler process org eclipse jface text reconciler Dirty Region protected void process Dirty Region dirty Region super process dirty Region notify Reconciling Participants  AbstractReconciler DirtyRegion DirtyRegion dirtyRegion dirtyRegion notifyReconcilingParticipants
public void add Reconciling Participant I Reconciling Participant participant f Reconciling Participants add participant  addReconcilingParticipant IReconcilingParticipant fReconcilingParticipants
public void remove Reconciling Participant I Reconciling Participant participant f Reconciling Participants remove participant  removeReconcilingParticipant IReconcilingParticipant fReconcilingParticipants
protected void notify Reconciling Participants Iterator i new Array List f Reconciling Participants iterator while i has Next I Reconciling Participant i next reconciled  notifyReconcilingParticipants ArrayList fReconcilingParticipants hasNext IReconcilingParticipant
see org eclipse jface text reconciler Abstract Reconciler initial Process protected void initial Process super initial Process notify Reconciling Participants  AbstractReconciler initialProcess initialProcess initialProcess notifyReconcilingParticipants

see org eclipse jface text I Document Extension start Sequential Rewrite boolean synchronized public void start Sequential Rewrite boolean normalized super start Sequential Rewrite normalized  IDocumentExtension startSequentialRewrite startSequentialRewrite startSequentialRewrite
see org eclipse jface text I Document Extension stop Sequential Rewrite synchronized public void stop Sequential Rewrite super stop Sequential Rewrite  IDocumentExtension stopSequentialRewrite stopSequentialRewrite stopSequentialRewrite
see org eclipse jface text I Document get synchronized public String get return super get  IDocument
see org eclipse jface text I Document get int int synchronized public String get int offset int length throws Bad Location Exception return super get offset length  IDocument BadLocationException
see org eclipse jface text I Document get Char int synchronized public char get Char int offset throws Bad Location Exception return super get Char offset  IDocument getChar getChar BadLocationException getChar
synchronized public void replace int offset int length String text throws Bad Location Exception super replace offset length text TODO to be used for incremental parsing not for 3 0 if length 0 text null Insert else if text null text length 0 Remove else f Ant Model set Replace Has Occurred  BadLocationException fAntModel setReplaceHasOccurred
see org eclipse jface text I Document set java lang String synchronized public void set String text super set text  IDocument
see org eclipse jface text I Synchronizable set Lock Object java lang Object public void set Lock Object Object lock Object f Lock Object lock Object  ISynchronizable setLockObject setLockObject lockObject fLockObject lockObject
see org eclipse jface text I Synchronizable get Lock Object public Object get Lock Object return f Lock Object null f Internal Lock Object f Lock Object  ISynchronizable getLockObject getLockObject fLockObject fInternalLockObject fLockObject

public class Tag Rule extends Multi Line Rule public Tag Rule I Token token super token NON NLS 1 NON NLS 2  TagRule MultiLineRule TagRule IToken
protected boolean sequence Detected I Character Scanner scanner char sequence boolean eof Allowed int c scanner read if sequence 0 if c processing instruction abort scanner unread return false if c scanner unread comment abort return false else if sequence 0 scanner unread return super sequence Detected scanner sequence eof Allowed  sequenceDetected ICharacterScanner eofAllowed sequenceDetected eofAllowed
protected boolean end Sequence Detected I Character Scanner scanner int c char delimiters scanner get Legal Line Delimiters boolean previous Was Escape Character false while c scanner read I Character Scanner EOF if c f Escape Character Skip the escaped character scanner read else if f End Sequence length 0 c f End Sequence 0 Check if the specified end sequence has been found if sequence Detected scanner f End Sequence true if f End Sequence 0 return end Of Tag Detected scanner return true else if f Breaks OnEOL Check for end of line since it can be used to terminate the pattern for int i 0 i delimiters length i if c delimiters i 0 sequence Detected scanner delimiters i true if f Escape Continues Line previous Was Escape Character return true previous Was Escape Character c f Escape Character if f Breaks OnEOF return true scanner unread return false  endSequenceDetected ICharacterScanner getLegalLineDelimiters previousWasEscapeCharacter ICharacterScanner fEscapeCharacter fEndSequence fEndSequence sequenceDetected fEndSequence fEndSequence endOfTagDetected fBreaksOnEOL sequenceDetected fEscapeContinuesLine previousWasEscapeCharacter previousWasEscapeCharacter fEscapeCharacter fBreaksOnEOF
private boolean end Of Tag Detected I Character Scanner scanner int c int scan Ahead 0 int end Of Tag Offset 0 while c scanner read I Character Scanner EOF c scan Ahead if c end Of Tag Offset scan Ahead if c int rewind scan Ahead end Of Tag Offset 1 for int i 0 i rewind i scanner unread return true  endOfTagDetected ICharacterScanner scanAhead endOfTagOffset ICharacterScanner scanAhead endOfTagOffset scanAhead scanAhead endOfTagOffset

Returns the distance to the ruler line private int compare Ruler Line Position position I Document document int line if position get Offset 1 position get Length 1 try int xml Annotation Line document get Line Of Offset position get Offset if line xml Annotation Line return 1 if xml Annotation Line line line document get Line Of Offset position get Offset position get Length return 2 catch Bad Location Exception x return 0  compareRulerLine IDocument getOffset getLength xmlAnnotationLine getLineOfOffset getOffset xmlAnnotationLine xmlAnnotationLine getLineOfOffset getOffset getLength BadLocationException
Returns one marker which includes the ruler s line of activity private List getXML Annotations For Line I Source Viewer viewer int line I Document document viewer get Document I Annotation Model model viewer get Annotation Model if model null return null List exact new Array List Iterator e model get Annotation Iterator Map messages At Position new Hash Map while e has Next Object o e next if o instanceof IXML Annotation IXML Annotation a IXML Annotation o if a has Overlay Position position model get Position Annotation a if position null continue if is DuplicateXML Annotation messages At Position position a get Message continue switch compare Ruler Line position document line case 1 exact add a break return exact  getXMLAnnotationsForLine ISourceViewer IDocument getDocument IAnnotationModel getAnnotationModel ArrayList getAnnotationIterator messagesAtPosition HashMap hasNext IXMLAnnotation IXMLAnnotation IXMLAnnotation hasOverlay getPosition isDuplicateXMLAnnotation messagesAtPosition getMessage compareRulerLine
private boolean is DuplicateXML Annotation Map messages At Position Position position String message if messages At Position contains Key position Object value messages At Position get position if message equals value return true if value instanceof List List messages List value if messages contains message return true messages add message else Array List messages new Array List messages add value messages add message messages At Position put position messages else messages At Position put position message return false  isDuplicateXMLAnnotation messagesAtPosition messagesAtPosition containsKey messagesAtPosition ArrayList ArrayList messagesAtPosition messagesAtPosition
public String get Hover Info I Source Viewer source Viewer int line Number List xml Annotations getXML Annotations For Line source Viewer line Number if xml Annotations null if xml Annotations size 1 optimization IXML Annotation xml Annotation IXML Annotation xml Annotations get 0 String message xml Annotation get Message if message null message trim length 0 return format Single Message message else List messages new Array List Iterator e xml Annotations iterator while e has Next IXML Annotation xml Annotation IXML Annotation e next String message xml Annotation get Message if message null message trim length 0 messages add message trim if messages size 1 return format Single Message String messages get 0 if messages size 1 return format Multiple Messages messages return null  getHoverInfo ISourceViewer sourceViewer lineNumber xmlAnnotations getXMLAnnotationsForLine sourceViewer lineNumber xmlAnnotations xmlAnnotations IXMLAnnotation xmlAnnotation IXMLAnnotation xmlAnnotations xmlAnnotation getMessage formatSingleMessage ArrayList xmlAnnotations hasNext IXMLAnnotation xmlAnnotation IXMLAnnotation xmlAnnotation getMessage formatSingleMessage formatMultipleMessages
private String format Single Message String message String Buffer buffer new String Buffer HTML Printer add Page Prolog buffer HTML Printer add Paragraph buffer HTML Printer convert ToHTML Content message HTML Printer add Page Epilog buffer return buffer to String  formatSingleMessage StringBuffer StringBuffer HTMLPrinter addPageProlog HTMLPrinter addParagraph HTMLPrinter convertToHTMLContent HTMLPrinter addPageEpilog toString
private String format Multiple Messages List messages String Buffer buffer new String Buffer HTML Printer add Page Prolog buffer HTML Printer add Paragraph buffer HTML Printer convert ToHTML Content Ant Editor Messages get String Ant Annotation Hover multiple Markers At This Line NON NLS 1 HTML Printer start Bullet List buffer Iterator e messages iterator while e has Next HTML Printer add Bullet buffer HTML Printer convert ToHTML Content String e next HTML Printer end Bullet List buffer HTML Printer add Page Epilog buffer return buffer to String  formatMultipleMessages StringBuffer StringBuffer HTMLPrinter addPageProlog HTMLPrinter addParagraph HTMLPrinter convertToHTMLContent AntEditorMessages getString AntAnnotationHover multipleMarkersAtThisLine HTMLPrinter startBulletList hasNext HTMLPrinter addBullet HTMLPrinter convertToHTMLContent HTMLPrinter endBulletList HTMLPrinter addPageEpilog toString

public XML Annotation Iterator I Annotation Model model boolean skip Irrelevants f Iterator model get Annotation Iterator f Skip Irrelevants skip Irrelevants skip  XMLAnnotationIterator IAnnotationModel skipIrrelevants fIterator getAnnotationIterator fSkipIrrelevants skipIrrelevants
private void skip while f Iterator has Next Object next f Iterator next if next instanceof IXML Annotation IXML Annotation a IXML Annotation next if f Skip Irrelevants if a is Relevant f Next a return else f Next a return f Next null  fIterator hasNext fIterator IXMLAnnotation IXMLAnnotation IXMLAnnotation fSkipIrrelevants isRelevant fNext fNext fNext
see Iterator has Next public boolean has Next return f Next null  hasNext hasNext fNext
public Object next try return f Next finally skip  fNext
see Iterator remove public void remove throw new Unsupported Operation Exception  UnsupportedOperationException

private int f Image Type public XML Marker Annotation String annotation Type I Marker marker super annotation Type marker  fImageType XMLMarkerAnnotation annotationType IMarker annotationType
protected void initialize f Image Type NO IMAGE super initialize  fImageType NO_IMAGE
public String get Message I Marker marker get Marker if marker null marker exists return NON NLS 1 return marker get Attribute I Marker MESSAGE NON NLS 1  getMessage IMarker getMarker getAttribute IMarker
see org eclipse ui texteditor I Annotation Extension is Temporary public boolean is Temporary return false  IAnnotationExtension isTemporary isTemporary
see org eclipse ant internal ui editor text IXML Annotation is Problem public boolean is Problem return WARNING ANNOTATION TYPE equals get Type ERROR ANNOTATION TYPE equals get Type  IXMLAnnotation isProblem isProblem WARNING_ANNOTATION_TYPE getType ERROR_ANNOTATION_TYPE getType
see org eclipse ant internal ui editor text IXML Annotation is Relevant public boolean is Relevant return f Not Relevant  IXMLAnnotation isRelevant isRelevant fNotRelevant
Overlays this annotation with the given xml Annotation param xml Annotation annotation that is overlaid by this annotation public void set Overlay IXML Annotation xml Annotation if f Overlay null f Overlay remove Overlaid this f Overlay xml Annotation f Not Relevant f Not Relevant f Overlay null if xml Annotation null xml Annotation add Overlaid this  xmlAnnotation xmlAnnotation setOverlay IXMLAnnotation xmlAnnotation fOverlay fOverlay removeOverlaid fOverlay xmlAnnotation fNotRelevant fNotRelevant fOverlay xmlAnnotation xmlAnnotation addOverlaid
see org eclipse ant internal ui editor text IXML Annotation has Overlay public boolean has Overlay return f Overlay null  IXMLAnnotation hasOverlay hasOverlay fOverlay
public Image get Image Display display int new Image Type NO IMAGE if has Overlay new Image Type OVERLAY IMAGE else if is Relevant new Image Type ORIGINAL MARKER IMAGE else new Image Type GRAY IMAGE if f Image Type new Image Type new Image Type OVERLAY IMAGE Nothing changed simply return the current image return super get Image display Image new Image null switch new Image Type case ORIGINAL MARKER IMAGE new Image null break case OVERLAY IMAGE new Image f Overlay get Image display break case GRAY IMAGE if f Image Type ORIGINAL MARKER IMAGE set Image null Image original Image super get Image display if original Image null Image Registry image Registry get Gray Marker Image Registry display if image Registry null String key Integer to String original Image hash Code Image gray Image image Registry get key if gray Image null gray Image new Image display original Image SWT IMAGE GRAY image Registry put key gray Image new Image gray Image break default Assert is Legal false f Image Type new Image Type set Image new Image return super get Image display  getImage newImageType NO_IMAGE hasOverlay newImageType OVERLAY_IMAGE isRelevant newImageType ORIGINAL_MARKER_IMAGE newImageType GRAY_IMAGE fImageType newImageType newImageType OVERLAY_IMAGE getImage newImage newImageType ORIGINAL_MARKER_IMAGE newImage OVERLAY_IMAGE newImage fOverlay getImage GRAY_IMAGE fImageType ORIGINAL_MARKER_IMAGE setImage originalImage getImage originalImage ImageRegistry imageRegistry getGrayMarkerImageRegistry imageRegistry toString originalImage hashCode grayImage imageRegistry grayImage grayImage originalImage IMAGE_GRAY imageRegistry grayImage newImage grayImage isLegal fImageType newImageType setImage newImage getImage
private Image Registry get Gray Marker Image Registry Display display if fg Gray Markers Image Registry null fg Gray Markers Image Registry new Image Registry display return fg Gray Markers Image Registry  ImageRegistry getGrayMarkerImageRegistry fgGrayMarkersImageRegistry fgGrayMarkersImageRegistry ImageRegistry fgGrayMarkersImageRegistry
see org eclipse ant internal ui editor text IXML Annotation add Overlaid org eclipse ant internal ui editor text IXML Annotation public void add Overlaid IXML Annotation annotation not supported  IXMLAnnotation addOverlaid IXMLAnnotation addOverlaid IXMLAnnotation
see org eclipse ant internal ui editor text IXML Annotation remove Overlaid org eclipse ant internal ui editor text IXML Annotation public void remove Overlaid IXML Annotation annotation not supported  IXMLAnnotation removeOverlaid IXMLAnnotation removeOverlaid IXMLAnnotation
see org eclipse ant internal ui editor text IXML Annotation get Overlaid Iterator public Iterator get Overlaid Iterator not supported return null  IXMLAnnotation getOverlaidIterator getOverlaidIterator

public XML Problem Annotation I Problem problem f Problem problem if f Problem is Error set Type ERROR ANNOTATION TYPE else if f Problem is Warning set Type WARNING ANNOTATION TYPE else set Type INFO ANNOTATION TYPE  XMLProblemAnnotation IProblem fProblem fProblem isError setType ERROR_ANNOTATION_TYPE fProblem isWarning setType WARNING_ANNOTATION_TYPE setType INFO_ANNOTATION_TYPE
see org eclipse ant internal ui editor text IXML Annotation get Image org eclipse swt widgets Display public Image get Image Display display return null  IXMLAnnotation getImage getImage
see org eclipse ant internal ui editor text IXML Annotation get Message public String get Message return f Problem get Message  IXMLAnnotation getMessage getMessage fProblem getMessage
see org eclipse ant internal ui editor text IXML Annotation is Temporary public boolean is Temporary return true  IXMLAnnotation isTemporary isTemporary
see org eclipse ant internal ui editor text IXML Annotation is Problem public boolean is Problem return WARNING ANNOTATION TYPE equals get Type ERROR ANNOTATION TYPE equals get Type  IXMLAnnotation isProblem isProblem WARNING_ANNOTATION_TYPE getType ERROR_ANNOTATION_TYPE getType
see org eclipse ant internal ui editor text IXML Annotation is Relevant public boolean is Relevant return true  IXMLAnnotation isRelevant isRelevant
see org eclipse ant internal ui editor text IXML Annotation has Overlay public boolean has Overlay return false  IXMLAnnotation hasOverlay hasOverlay
public void add Overlaid IXML Annotation annotation if f Overlaids null f Overlaids new Array List 1 f Overlaids add annotation  addOverlaid IXMLAnnotation fOverlaids fOverlaids ArrayList fOverlaids
public void remove Overlaid IXML Annotation annotation if f Overlaids null f Overlaids remove annotation if f Overlaids size 0 f Overlaids null  removeOverlaid IXMLAnnotation fOverlaids fOverlaids fOverlaids fOverlaids
public Iterator get Overlaid Iterator if f Overlaids null return f Overlaids iterator return null  getOverlaidIterator fOverlaids fOverlaids

private I Text Editor f Editor public XML Reconciling Strategy I Text Editor editor f Editor editor  ITextEditor fEditor XMLReconcilingStrategy ITextEditor fEditor
private void internal Reconcile Dirty Region dirty Region try I Document Provider provider f Editor get Document Provider if provider instanceof Ant Editor Document Provider Ant Editor Document Provider document Provider Ant Editor Document Provider provider Ant Model model document Provider get Ant Model f Editor get Editor Input if model null model reconcile dirty Region catch Exception e AntUI Plugin log e  internalReconcile DirtyRegion dirtyRegion IDocumentProvider fEditor getDocumentProvider AntEditorDocumentProvider AntEditorDocumentProvider documentProvider AntEditorDocumentProvider AntModel documentProvider getAntModel fEditor getEditorInput dirtyRegion AntUIPlugin
see org eclipse jface text reconciler I Reconciling Strategy reconcile org eclipse jface text I Region public void reconcile I Region partition internal Reconcile null  IReconcilingStrategy IRegion IRegion internalReconcile
see org eclipse jface text reconciler I Reconciling Strategy reconcile org eclipse jface text reconciler Dirty Region org eclipse jface text I Region public void reconcile Dirty Region dirty Region I Region sub Region internal Reconcile dirty Region  IReconcilingStrategy DirtyRegion IRegion DirtyRegion dirtyRegion IRegion subRegion internalReconcile dirtyRegion
see org eclipse jface text reconciler I Reconciling Strategy set Document org eclipse jface text I Document public void set Document I Document document  IReconcilingStrategy setDocument IDocument setDocument IDocument
see org eclipse jface text reconciler I Reconciling Strategy Extension set Progress Monitor org eclipse core runtime I Progress Monitor public void set Progress Monitor I Progress Monitor monitor  IReconcilingStrategyExtension setProgressMonitor IProgressMonitor setProgressMonitor IProgressMonitor
see org eclipse jface text reconciler I Reconciling Strategy Extension initial Reconcile public void initial Reconcile internal Reconcile null  IReconcilingStrategyExtension initialReconcile initialReconcile internalReconcile

private Ant Editor f Editor public XML Text Hover Ant Editor editor super f Editor editor  AntEditor fEditor XMLTextHover AntEditor fEditor
private String format Message String message String Buffer buffer new String Buffer HTML Printer add Page Prolog buffer HTML Printer add Paragraph buffer HTML Printer convert ToHTML Content message HTML Printer add Page Epilog buffer return buffer to String  formatMessage StringBuffer StringBuffer HTMLPrinter addPageProlog HTMLPrinter addParagraph HTMLPrinter convertToHTMLContent HTMLPrinter addPageEpilog toString
private String format Path Message String list String Buffer buffer new String Buffer HTML Printer add Page Prolog buffer HTML Printer add Small Header buffer Ant Editor Text Messages get String XML Text Hover 4 NON NLS 1 HTML Printer start Bullet List buffer for int i 0 i list length i HTML Printer add Bullet buffer list i HTML Printer end Bullet List buffer HTML Printer add Page Epilog buffer return buffer to String  formatPathMessage StringBuffer StringBuffer HTMLPrinter addPageProlog HTMLPrinter addSmallHeader AntEditorTextMessages getString XMLTextHover HTMLPrinter startBulletList HTMLPrinter addBullet HTMLPrinter endBulletList HTMLPrinter addPageEpilog toString
public String get Hover Info I Text Viewer text Viewer I Region hover Region if text Viewer instanceof I Source Viewer return null I Source Viewer source Viewer I Source Viewer text Viewer I Annotation Model model source Viewer get Annotation Model if model null Iterator e new XML Annotation Iterator model true while e has Next Annotation a Annotation e next Position p model get Position a if p overlaps With hover Region get Offset hover Region get Length String msg IXML Annotation a get Message if msg null msg trim length 0 return format Message msg Ant Model ant Model f Editor get Ant Model if ant Model null the ant model has not been created yet return null try I Document document text Viewer get Document int offset hover Region get Offset int length hover Region get Length String text document get offset length String value Ant Element Node node ant Model get Node offset false if document get offset 2 2 equals node instanceof Ant Property Node NON NLS 1 value ant Model get Property Value text if value null return format Message value value ant Model get Target Description text if value null return format Message value Object referenced Object ant Model get Reference Object text if referenced Object null if referenced Object instanceof Path return format Path Message Path referenced Object list else if referenced Object instanceof Pattern Set return format Pattern Set Message Pattern Set referenced Object else if referenced Object instanceof Abstract File Set return format File Set Message Abstract File Set referenced Object catch Bad Location Exception e catch Build Exception be ant Model handle Build Exception be null return null  getHoverInfo ITextViewer textViewer IRegion hoverRegion textViewer ISourceViewer ISourceViewer sourceViewer ISourceViewer textViewer IAnnotationModel sourceViewer getAnnotationModel XMLAnnotationIterator hasNext getPosition overlapsWith hoverRegion getOffset hoverRegion getLength IXMLAnnotation getMessage formatMessage AntModel antModel fEditor getAntModel antModel IDocument textViewer getDocument hoverRegion getOffset hoverRegion getLength AntElementNode antModel getNode AntPropertyNode antModel getPropertyValue formatMessage antModel getTargetDescription formatMessage referencedObject antModel getReferenceObject referencedObject referencedObject formatPathMessage referencedObject referencedObject PatternSet formatPatternSetMessage PatternSet referencedObject referencedObject AbstractFileSet formatFileSetMessage AbstractFileSet referencedObject BadLocationException BuildException antModel handleBuildException
private String format File Set Message Abstract File Set set File Scanner file Scanner new File Scanner Ant Model ant Model f Editor get Ant Model Project project ant Model get Project Node get Project set setup Directory Scanner file Scanner project String excluded Patterns file Scanner get Excludes Patterns String includes Patterns file Scanner get Include Patterns return format Set Message includes Patterns excluded Patterns  formatFileSetMessage AbstractFileSet FileScanner fileScanner FileScanner AntModel antModel fEditor getAntModel antModel getProjectNode getProject setupDirectoryScanner fileScanner excludedPatterns fileScanner getExcludesPatterns includesPatterns fileScanner getIncludePatterns formatSetMessage includesPatterns excludedPatterns
private String format Pattern Set Message Pattern Set set Ant Model ant Model f Editor get Ant Model Project project ant Model get Project Node get Project String includes set get Include Patterns project String excludes set get Exclude Patterns project return format Set Message includes excludes  formatPatternSetMessage PatternSet AntModel antModel fEditor getAntModel antModel getProjectNode getProject getIncludePatterns getExcludePatterns formatSetMessage
private String format Set Message String includes String excludes String Buffer buffer new String Buffer HTML Printer add Page Prolog buffer if includes null includes length 0 HTML Printer add Small Header buffer Ant Editor Text Messages get String XML Text Hover 5 NON NLS 1 for int i 0 i includes length i HTML Printer add Bullet buffer includes i HTML Printer add Paragraph buffer NON NLS 1 HTML Printer add Paragraph buffer NON NLS 1 if excludes null excludes length 0 HTML Printer add Small Header buffer Ant Editor Text Messages get String XML Text Hover 6 NON NLS 1 for int i 0 i excludes length i HTML Printer add Bullet buffer excludes i HTML Printer add Page Epilog buffer return buffer to String  formatSetMessage StringBuffer StringBuffer HTMLPrinter addPageProlog HTMLPrinter addSmallHeader AntEditorTextMessages getString XMLTextHover HTMLPrinter addBullet HTMLPrinter addParagraph HTMLPrinter addParagraph HTMLPrinter addSmallHeader AntEditorTextMessages getString XMLTextHover HTMLPrinter addBullet HTMLPrinter addPageEpilog toString
public I Region get Hover Region I Text Viewer text Viewer int offset if text Viewer null return get Region text Viewer offset return null  IRegion getHoverRegion ITextViewer textViewer textViewer getRegion textViewer
public static I Region get Region I Text Viewer text Viewer int offset I Document document text Viewer get Document int start 1 int end 1 try int pos offset char c while pos 0 c document get Char pos if c c c c Character is Java Identifier Part c break pos start pos pos offset int length document get Length while pos length c document get Char pos if c c Character is Java Identifier Part c break pos end pos catch Bad Location Exception x if start 1 end 1 if start offset end offset return new Region offset 0 else if start offset return new Region start end start else return new Region start 1 end start 1 return null  IRegion getRegion ITextViewer textViewer IDocument textViewer getDocument getChar isJavaIdentifierPart getLength getChar isJavaIdentifierPart BadLocationException
return new I Information Control Creator public I Information Control create Information Control Shell parent return new Default Information Control parent SWT NONE new HTML Text Presenter true Ant Editor Text Messages get String XML Text Hover 7 NON NLS 1  IInformationControlCreator IInformationControl createInformationControl DefaultInformationControl HTMLTextPresenter AntEditorTextMessages getString XMLTextHover
public I Information Control Creator get Hover Control Creator if Preference Constants get Preference Store get Boolean Preference Constants EDITOR SHOW TEXT HOVER AFFORDANCE return new I Information Control Creator public I Information Control create Information Control Shell parent return new Default Information Control parent SWT NONE new HTML Text Presenter true Ant Editor Text Messages get String XML Text Hover 7 NON NLS 1 return null  IInformationControlCreator getHoverControlCreator PreferenceConstants getPreferenceStore getBoolean PreferenceConstants EDITOR_SHOW_TEXT_HOVER_AFFORDANCE IInformationControlCreator IInformationControl createInformationControl DefaultInformationControl HTMLTextPresenter AntEditorTextMessages getString XMLTextHover

see org apache tools ant helper Project Helper2 Ant Handler on Start Child java lang String java lang String java lang String org xml sax Attributes org apache tools ant helper AntXML Context public Ant Handler on Start Child String uri String tag String qname Attributes attrs AntXML Context context return Project Helper element Handler  ProjectHelper2 AntHandler onStartChild AntXMLContext AntHandler onStartChild AntXMLContext ProjectHelper elementHandler
public void on Start Element String uri String tag String qname Attributes attrs AntXML Context context try Runtime Configurable wrapper context current Wrapper current Task null task null if wrapper null current Task Task wrapper get Proxy on Start Element0 uri tag qname attrs context Locator locator context get Locator get Ant Model add Task task current Task attrs locator get Line Number locator get Column Number catch Build Exception be Locator locator context get Locator get Ant Model add Task task current Task attrs locator get Line Number locator get Column Number get Ant Model error be  onStartElement AntXMLContext RuntimeConfigurable currentWrapper currentTask currentTask getProxy onStartElement0 getLocator getAntModel addTask currentTask getLineNumber getColumnNumber BuildException getLocator getAntModel addTask currentTask getLineNumber getColumnNumber getAntModel
public void on End Element String uri String tag AntXML Context context super on End Element uri tag context Locator locator context get Locator get Ant Model set Current Element Length locator get Line Number locator get Column Number  onEndElement AntXMLContext onEndElement getLocator getAntModel setCurrentElementLength getLineNumber getColumnNumber
private void on Start Element0 String uri String tag String qname Attributes attrs AntXML Context context Runtime Configurable parent Wrapper context current Wrapper Object parent null if parent Wrapper null parent parent Wrapper get Proxy Unknown Element is used for tasks and data types with delayed eval task new Unknown Element tag task set Project context get Project task set Namespace uri task setQ Name qname task set Task Type org apache tools ant Project Helper gen Component Name task get Namespace tag task set Task Name qname Location location new Location context get Locator get System Id context get Locator get Line Number context get Locator get Column Number task set Location location task set Owning Target context get Current Target context configure Id task attrs if parent null Nested element Unknown Element parent add Child task else Task included in a target including the default one context get Current Target add Task task container add Task task This is a nop in UE task init Runtime Configurable wrapper new Runtime Configurable task task get Task Name for int i 0 i attrs get Length i String attr Uri attrs getURI i if attr Uri null attr Uri equals NON NLS 1 attr Uri equals uri continue Ignore attributes from unknown uris String name attrs get Local Name i String value attrs get Value i PR Hack for ant type value an ant type is a component name which can be namespaced need to extract the name and convert from qualified name to uri name if name equals ant type NON NLS 1 int index value index Of if index 1 String prefix value substring 0 index String mapped Uri context get Prefix Mapping prefix if mapped Uri null throw new Build Exception Unable to find XML NS prefix prefix NON NLS 1 value org apache tools ant Project Helper gen Component Name mapped Uri value substring index 1 wrapper set Attribute name value if parent Wrapper null parent Wrapper add Child wrapper context push Wrapper wrapper  onStartElement0 AntXMLContext RuntimeConfigurable parentWrapper currentWrapper parentWrapper parentWrapper getProxy UnknownElement UnknownElement setProject getProject setNamespace setQName setTaskType ProjectHelper genComponentName getNamespace setTaskName getLocator getSystemId getLocator getLineNumber getLocator getColumnNumber setLocation setOwningTarget getCurrentTarget configureId UnknownElement addChild getCurrentTarget addTask addTask RuntimeConfigurable RuntimeConfigurable getTaskName getLength attrUri attrUri attrUri attrUri getLocalName getValue indexOf mappedUri getPrefixMapping mappedUri BuildException ProjectHelper genComponentName mappedUri setAttribute parentWrapper parentWrapper addChild pushWrapper
public void characters char buf int start int count AntXML Context context try super characters buf start count context catch SAX Parse Exception e Error Helper handle Error From Element Text start count context e catch Build Exception be Error Helper handle Error From Element Text start count context be  AntXMLContext SAXParseException ErrorHelper handleErrorFromElementText BuildException ErrorHelper handleErrorFromElementText
public void reset task null current Task null  currentTask
public Ant Handler on Start Child String uri String name String qname Attributes attrs AntXML Context context throws SAX Parse Exception if name equals project NON NLS 1 uri equals uri equals ANT CORE URI NON NLS 1 return Project Helper project Handler try return super on Start Child uri name qname attrs context catch SAX Parse Exception e get Ant Model error e throw e  AntHandler onStartChild AntXMLContext SAXParseException ANT_CORE_URI ProjectHelper projectHandler onStartChild SAXParseException getAntModel
public Ant Handler on Start Child String uri String name String qname Attributes attrs AntXML Context context if name equals target NON NLS 1 uri equals uri equals ANT CORE URI NON NLS 1 return Project Helper target Handler return Project Helper element Handler  AntHandler onStartChild AntXMLContext ANT_CORE_URI ProjectHelper targetHandler ProjectHelper elementHandler
public void on End Element String uri String tag AntXML Context context super on End Element uri tag context if current Import Stack Size 1 Locator locator context get Locator get Ant Model set Current Element Length locator get Line Number locator get Column Number  onEndElement AntXMLContext onEndElement currentImportStackSize getLocator getAntModel setCurrentElementLength getLineNumber getColumnNumber
public void on Start Element String uri String tag String qname Attributes attrs AntXML Context context try super on Start Element uri tag qname attrs context catch SAX Parse Exception e get Ant Model error e catch Build Exception be get Ant Model error be if current Import Stack Size 1 Locator locator context get Locator get Ant Model add Project context get Project locator get Line Number locator get Column Number  onStartElement AntXMLContext onStartElement SAXParseException getAntModel BuildException getAntModel currentImportStackSize getLocator getAntModel addProject getProject getLineNumber getColumnNumber
public void characters char buf int start int count AntXML Context context try super characters buf start count context catch SAX Parse Exception e Error Helper handle Error From Element Text start count context e catch Build Exception be Error Helper handle Error From Element Text start count context be  AntXMLContext SAXParseException ErrorHelper handleErrorFromElementText BuildException ErrorHelper handleErrorFromElementText
see org apache tools ant helper Project Helper2 Ant Handler on Start Child java lang String java lang String java lang String org xml sax Attributes org apache tools ant helper AntXML Context public Ant Handler on Start Child String uri String name String qname Attributes attrs AntXML Context context return Project Helper element Handler  ProjectHelper2 AntHandler onStartChild AntXMLContext AntHandler onStartChild AntXMLContext ProjectHelper elementHandler
public void on Start Element String uri String tag String qname Attributes attrs AntXML Context context try super on Start Element uri tag qname attrs context Target new Target context get Current Target Locator locator context get Locator get Ant Model add Target new Target locator get Line Number locator get Column Number catch SAX Parse Exception e handle Error In Target context e catch Build Exception be handle Error In Target context be  onStartElement AntXMLContext onStartElement newTarget getCurrentTarget getLocator getAntModel addTarget newTarget getLineNumber getColumnNumber SAXParseException handleErrorInTarget BuildException handleErrorInTarget
private void handle Error In Target AntXML Context context Exception e Target new Target context get Current Target Locator locator context get Locator get Ant Model add Target new Target locator get Line Number locator get Column Number get Ant Model error From Element e null locator get Line Number locator get Column Number  handleErrorInTarget AntXMLContext newTarget getCurrentTarget getLocator getAntModel addTarget newTarget getLineNumber getColumnNumber getAntModel errorFromElement getLineNumber getColumnNumber
public void on End Element String uri String tag AntXML Context context super on End Element uri tag context Locator locator context get Locator get Ant Model set Current Element Length locator get Line Number locator get Column Number  onEndElement AntXMLContext onEndElement getLocator getAntModel setCurrentElementLength getLineNumber getColumnNumber
public void characters char buf int start int count AntXML Context context try super characters buf start count context catch SAX Parse Exception e Error Helper handle Error From Element Text start count context e catch Build Exception be Error Helper handle Error From Element Text start count context be  AntXMLContext SAXParseException ErrorHelper handleErrorFromElementText BuildException ErrorHelper handleErrorFromElementText
public static class Root Handler extends Project Helper2 Root Handler public Root Handler AntXML Context context Ant Handler root Handler super context root Handler  RootHandler ProjectHelper2 RootHandler RootHandler AntXMLContext AntHandler rootHandler rootHandler
see org xml sax Error Handler error org xml sax SAX Parse Exception public void error SAX Parse Exception e get Ant Model error e  ErrorHandler SAXParseException SAXParseException getAntModel
see org xml sax Error Handler fatal Error org xml sax SAX Parse Exception public void fatal Error SAX Parse Exception e get Ant Model fatal Error e  ErrorHandler fatalError SAXParseException fatalError SAXParseException getAntModel fatalError
see org xml sax Error Handler warning org xml sax SAX Parse Exception public void warning SAX Parse Exception e get Ant Model warning e  ErrorHandler SAXParseException SAXParseException getAntModel
public Input Source resolve Entity String public Id String system Id Input Source source super resolve Entity public Id system Id if source null String path get File Utils fromURI source get System Id if current Entity Name null current Entity Path path else get Ant Model add Entity current Entity Name path current Entity Name null return source  InputSource resolveEntity publicId systemId InputSource resolveEntity publicId systemId getFileUtils getSystemId currentEntityName currentEntityPath getAntModel addEntity currentEntityName currentEntityName
private static class Error Helper public static void handle Error From Element Text int start int count AntXML Context context Exception e Locator locator context get Locator int column Number locator get Column Number if column Number 1 int offset start try offset get Ant Model get Offset locator get Line Number 1 catch Bad Location Exception e1 get Ant Model error From Element Text e offset locator get Column Number else get Ant Model error From Element Text e start count  ErrorHelper handleErrorFromElementText AntXMLContext getLocator columnNumber getColumnNumber columnNumber getAntModel getOffset getLineNumber BadLocationException getAntModel errorFromElementText getColumnNumber getAntModel errorFromElementText
see org xml sax ext Lexical Handler endCDATA public void endCDATA throws SAX Exception  LexicalHandler SAXException
see org xml sax ext Lexical Handler endDTD public void endDTD throws SAX Exception  LexicalHandler SAXException
see org xml sax ext Lexical Handler startCDATA public void startCDATA throws SAX Exception  LexicalHandler SAXException
see org xml sax ext Lexical Handler comment char int int public void comment char ch int start int length throws SAX Exception  LexicalHandler SAXException
see org xml sax ext Lexical Handler end Entity java lang String public void end Entity String name throws SAX Exception  LexicalHandler endEntity endEntity SAXException
public void start Entity String name throws SAX Exception if current Entity Path null current Entity Name name else get Ant Model add Entity name current Entity Path current Entity Path null  startEntity SAXException currentEntityPath currentEntityName getAntModel addEntity currentEntityPath currentEntityPath
see org xml sax ext Lexical Handler startDTD java lang String java lang String java lang String public void startDTD String name String public Id String system Id throws SAX Exception  LexicalHandler publicId systemId SAXException
public Project Helper Ant Model model set Ant Model model  ProjectHelper AntModel setAntModel
Parses the project file configuring the project as it goes param project the current project param source the xml source param handler the root handler to use contains the current context exception Build Exception if the configuration is invalid or cannot be read public void parse Project project Object source org apache tools ant helper Project Helper2 Root Handler handler throws Build Exception if source instanceof String super parse project source handler return AntXML Context context AntXML Context project get Reference ant parsing context NON NLS 1 switch to using our handler so parsing will continue on hitting errors handler new Root Handler context main Handler Reader stream new String Reader String source Input Source input Source null try SAX 2 style parser used to parse the given file We cannot use the JAXP Utils support here as the underlying parser factory is cached and will not reflect classpath changes that effect which XML parser will be returned see bug 59764 XML Reader parser JAXP Utils get NamespaceXML Reader XML Reader parser get NamespaceXML Reader if parser null throw new Build Exception Project Helper Messages get String Project Helper 0 NON NLS 1 String uri null if build File null uri get File Utils toURI build File get Absolute Path input Source new Input Source stream if uri null input Source set System Id uri context set Build File build File parser set Content Handler handler parser set Entity Resolver handler parser set Error Handler handler parser setDTD Handler handler parser set Property http xml org sax properties lexical handler lexical Handler NON NLS 1 parser parse input Source catch SAX Parse Exception exc get Ant Model fatal Error exc catch SAX Exception exc ignore as we will be parsing incomplete source catch File Not Found Exception exc throw new Build Exception exc catch Unsupported Encoding Exception exc throw new Build Exception exc catch IO Exception exc throw new Build Exception exc finally if stream null try stream close catch IO Exception ioe ignore this  BuildException ProjectHelper2 RootHandler BuildException AntXMLContext AntXMLContext getReference RootHandler mainHandler StringReader InputSource inputSource JAXPUtils XMLReader JAXPUtils getNamespaceXMLReader XMLReader getNamespaceXMLReader BuildException ProjectHelperMessages getString ProjectHelper buildFile getFileUtils buildFile getAbsolutePath inputSource InputSource inputSource setSystemId setBuildFile buildFile setContentHandler setEntityResolver setErrorHandler setDTDHandler setProperty lexicalHandler inputSource SAXParseException getAntModel fatalError SAXException FileNotFoundException BuildException UnsupportedEncodingException BuildException IOException BuildException IOException
Sets the buildfile that is about to be parsed or code null code if parsing has completed param file The buildfile about to be parsed public void set Build File File file build File file current Import Stack Size 1  setBuildFile buildFile currentImportStackSize
public void parse Project project Object source throws Build Exception AntXML Context context AntXML Context project get Reference ant parsing context NON NLS 1 if context null get Import Stack remove All Elements context new AntXML Context project project add Reference ant parsing context context NON NLS 1 project add Reference ant targets context get Targets NON NLS 1 get Import Stack add Element source current Import Stack Size get Import Stack size if get Import Stack size 1 we are in an imported file context set Ignore Project Tag true Target current Target context get Current Target try Target new Current new Target new Current set Project project new Current set Name NON NLS 1 context set Current Target new Current parse project source new Root Handler context main Handler finally context set Current Target current Target else top level file parse project source new Root Handler context main Handler  BuildException AntXMLContext AntXMLContext getReference getImportStack removeAllElements AntXMLContext addReference addReference getTargets getImportStack addElement currentImportStackSize getImportStack getImportStack setIgnoreProjectTag currentTarget getCurrentTarget newCurrent newCurrent setProject newCurrent setName setCurrentTarget newCurrent RootHandler mainHandler setCurrentTarget currentTarget RootHandler mainHandler
public static void set Ant Model Ant Model ant Model fg Ant Model ant Model Project Helper Element Handler element Handler reset fu null  setAntModel AntModel antModel fgAntModel antModel ProjectHelper ElementHandler elementHandler
public static Ant Model get Ant Model return fg Ant Model  AntModel getAntModel fgAntModel
private static File Utils get File Utils if fu null fu File Utils new File Utils return fu  FileUtils getFileUtils FileUtils newFileUtils
Returns a newly created SAX 2 XML Reader which is namespace aware return a SAX 2 XML Reader since Ant 1 6 from org apache tools ant util JAXP Utils private XML Reader get NamespaceXML Reader throws Build Exception try return newSAX Parser getNS Parser Factory getXML Reader catch SAX Exception e return null  XMLReader XMLReader JAXPUtils XMLReader getNamespaceXMLReader BuildException newSAXParser getNSParserFactory getXMLReader SAXException
Returns the parser factory to use to create namespace aware parsers return a SAX Parser Factory to use which supports manufacture of namespace aware parsers since Ant 1 6 from org apache tools ant util JAXP Utils private SAX Parser Factory getNS Parser Factory throws Build Exception SAX Parser Factory ns Parser Factory JAXP Utils new Parser Factory ns Parser Factory set Namespace Aware true return ns Parser Factory  SAXParserFactory JAXPUtils SAXParserFactory getNSParserFactory BuildException SAXParserFactory nsParserFactory JAXPUtils newParserFactory nsParserFactory setNamespaceAware nsParserFactory
return a new SAX Parser instance as helper for get Parser and getXML Reader since Ant 1 5 from org apache tools ant util JAXP Utils private SAX Parser newSAX Parser SAX Parser Factory factory try return factory newSAX Parser catch Parser Configuration Exception e catch SAX Exception e return null  SAXParser getParser getXMLReader JAXPUtils SAXParser newSAXParser SAXParserFactory newSAXParser ParserConfigurationException SAXException

private static final String BUNDLE NAME org eclipse ant internal ui editor utils Project Helper Messages NON NLS 1 private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Project Helper Messages  BUNDLE_NAME ProjectHelperMessages ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME ProjectHelperMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public class Add Variable String Action extends Runtime Classpath Action public Add Variable String Action I Classpath Viewer viewer super Ant Launch Configuration Messages get String Add Variable String Action 1 viewer NON NLS 1  AddVariableStringAction RuntimeClasspathAction AddVariableStringAction IClasspathViewer AntLaunchConfigurationMessages getString AddVariableStringAction
see org eclipse jdt internal debug ui actions Runtime Classpath Action get Action Type protected int get Action Type return ADD  RuntimeClasspathAction getActionType getActionType
public void run Variable Input Dialog input Dialog new Variable Input Dialog get Shell input Dialog open String variable String input Dialog get Variable String if variable String null variable String trim length 0 I Runtime Classpath Entry new Entry Java Runtime new String Variable Classpath Entry variable String get Viewer add Entries new I Runtime Classpath Entry new Entry  VariableInputDialog inputDialog VariableInputDialog getShell inputDialog variableString inputDialog getVariableString variableString variableString IRuntimeClasspathEntry newEntry JavaRuntime newStringVariableClasspathEntry variableString getViewer addEntries IRuntimeClasspathEntry newEntry

public void create Tabs I Launch Configuration Dialog dialog String mode I Launch Configuration Tab tabs new I Launch Configuration Tab new Ant Main Tab new Refresh Tab new Ant Targets Tab new Ant Classpath Tab new Ant Properties Tab new AntJRE Tab new Ant Environment Tab new External Tools Builder Tab set Tabs tabs  createTabs ILaunchConfigurationDialog ILaunchConfigurationTab ILaunchConfigurationTab AntMainTab RefreshTab AntTargetsTab AntClasspathTab AntPropertiesTab AntJRETab AntEnvironmentTab ExternalToolsBuilderTab setTabs

see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return I Workspace input Element get Root get Projects  IStructuredContentProvider getElements getElements inputElement IWorkspace inputElement getRoot getProjects
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
f Build Button create Check Button main Composite Ant Launch Configuration Messages get String Ant Build Tab 1 NON NLS 1 f Build Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Enabled State update Launch Configuration Dialog  fBuildButton createCheckButton mainComposite AntLaunchConfigurationMessages getString AntBuildTab fBuildButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateEnabledState updateLaunchConfigurationDialog
Selection Adapter adapter new Selection Adapter public void widget Selected Selection Event e if Button e get Source get Selection update Enabled State update Launch Configuration Dialog  SelectionAdapter SelectionAdapter widgetSelected SelectionEvent getSource getSelection updateEnabledState updateLaunchConfigurationDialog
gd horizontal Alignment Grid Data HORIZONTAL ALIGN END f Select Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select Resources  horizontalAlignment GridData HORIZONTAL_ALIGN_END fSelectButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectResources
see org eclipse debug ui I Launch Configuration Tab create Control org eclipse swt widgets Composite public void create Control Composite parent Composite main Composite new Composite parent SWT NONE set Control main Composite Workbench Help set Help get Control I AntUI Help Context Ids ANT BUILD TAB Grid Layout layout new Grid Layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL main Composite set Layout layout main Composite set Layout Data gd main Composite set Font parent get Font f Build Button create Check Button main Composite Ant Launch Configuration Messages get String Ant Build Tab 1 NON NLS 1 f Build Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Enabled State update Launch Configuration Dialog f Group new Group main Composite SWT NONE f Group set Font main Composite get Font layout new Grid Layout layout num Columns 2 layout make Columns Equal Width false f Group set Layout layout gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 f Group set Layout Data gd Selection Adapter adapter new Selection Adapter public void widget Selected Selection Event e if Button e get Source get Selection update Enabled State update Launch Configuration Dialog f Workspace Button create Radio Button f Group Ant Launch Configuration Messages get String Ant Build Tab 2 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 f Workspace Button set Layout Data gd f Workspace Button add Selection Listener adapter f Project Button create Radio Button f Group Ant Launch Configuration Messages get String Ant Build Tab 3 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 f Project Button set Layout Data gd f Project Button add Selection Listener adapter f Specific Projects Button create Radio Button f Group Ant Launch Configuration Messages get String Ant Build Tab 4 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 1 f Specific Projects Button set Layout Data gd f Specific Projects Button add Selection Listener adapter f Select Button create Push Button f Group Ant Launch Configuration Messages get String Ant Build Tab 5 null NON NLS 1 gd Grid Data f Select Button get Layout Data gd horizontal Alignment Grid Data HORIZONTAL ALIGN END f Select Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select Resources create Vertical Spacer main Composite 1 f Referenced Projects create Check Button main Composite Ant Launch Configuration Messages get String Ant Build Tab 6 NON NLS 1  ILaunchConfigurationTab createControl createControl mainComposite setControl mainComposite WorkbenchHelp setHelp getControl IAntUIHelpContextIds ANT_BUILD_TAB GridLayout GridLayout GridData GridData GridData FILL_HORIZONTAL mainComposite setLayout mainComposite setLayoutData mainComposite setFont getFont fBuildButton createCheckButton mainComposite AntLaunchConfigurationMessages getString AntBuildTab fBuildButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateEnabledState updateLaunchConfigurationDialog fGroup mainComposite fGroup setFont mainComposite getFont GridLayout numColumns makeColumnsEqualWidth fGroup setLayout GridData GridData FILL_HORIZONTAL horizontalSpan fGroup setLayoutData SelectionAdapter SelectionAdapter widgetSelected SelectionEvent getSource getSelection updateEnabledState updateLaunchConfigurationDialog fWorkspaceButton createRadioButton fGroup AntLaunchConfigurationMessages getString AntBuildTab GridData GridData FILL_HORIZONTAL horizontalSpan fWorkspaceButton setLayoutData fWorkspaceButton addSelectionListener fProjectButton createRadioButton fGroup AntLaunchConfigurationMessages getString AntBuildTab GridData GridData FILL_HORIZONTAL horizontalSpan fProjectButton setLayoutData fProjectButton addSelectionListener fSpecificProjectsButton createRadioButton fGroup AntLaunchConfigurationMessages getString AntBuildTab GridData GridData FILL_HORIZONTAL horizontalSpan fSpecificProjectsButton setLayoutData fSpecificProjectsButton addSelectionListener fSelectButton createPushButton fGroup AntLaunchConfigurationMessages getString AntBuildTab GridData fSelectButton getLayoutData horizontalAlignment GridData HORIZONTAL_ALIGN_END fSelectButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectResources createVerticalSpacer mainComposite fReferencedProjects createCheckButton mainComposite AntLaunchConfigurationMessages getString AntBuildTab
Prompts the user to select the projects to build private void select Resources List Selection Dialog dialog new List Selection Dialog get Shell Resources Plugin get Workspace new Projects Content Provider new Workbench Label Provider Ant Launch Configuration Messages get String Ant Build Tab 7 NON NLS 1 dialog set Initial Element Selections f Projects if dialog open Window CANCEL return Object res dialog get Result f Projects new Array List res length for int i 0 i res length i f Projects add res i update Launch Configuration Dialog  selectResources ListSelectionDialog ListSelectionDialog getShell ResourcesPlugin getWorkspace ProjectsContentProvider WorkbenchLabelProvider AntLaunchConfigurationMessages getString AntBuildTab setInitialElementSelections fProjects getResult fProjects ArrayList fProjects updateLaunchConfigurationDialog
see org eclipse debug ui I Launch Configuration Tab set Defaults org eclipse debug core I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy
see org eclipse debug ui I Launch Configuration Tab initialize From org eclipse debug core I Launch Configuration public void initialize From I Launch Configuration configuration update Scope configuration update Referenced Projects configuration update Enabled State  ILaunchConfigurationTab initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration updateScope updateReferencedProjects updateEnabledState
private void update Referenced Projects I Launch Configuration configuration boolean ref false try ref configuration get Attribute ATTR INCLUDE REFERENCED PROJECTS true catch Core Exception e AntUI Plugin log AntUI Plugin new Error Status Exception reading launch configuration e NON NLS 1 f Referenced Projects set Selection ref  updateReferencedProjects ILaunchConfiguration getAttribute ATTR_INCLUDE_REFERENCED_PROJECTS CoreException AntUIPlugin AntUIPlugin newErrorStatus fReferencedProjects setSelection
Updates the tab to display the build scope specified by the launch config private void update Scope I Launch Configuration configuration String scope null try scope configuration get Attribute ATTR BUILD SCOPE String null catch Core Exception ce AntUI Plugin log AntUI Plugin new Error Status Exception reading launch configuration ce NON NLS 1 f Build Button set Selection scope null f Workspace Button set Selection false f Project Button set Selection false f Specific Projects Button set Selection false f Projects clear if scope null select the workspace by default f Build Button set Selection true f Workspace Button set Selection true else if scope equals none NON NLS 1 f Build Button set Selection false else if scope equals project NON NLS 1 f Project Button set Selection true else if scope starts With projects NON NLS 1 f Specific Projects Button set Selection true I Project projects get Build Projects scope f Projects new Array List projects length for int i 0 i projects length i f Projects add projects i  updateScope ILaunchConfiguration getAttribute ATTR_BUILD_SCOPE CoreException AntUIPlugin AntUIPlugin newErrorStatus fBuildButton setSelection fWorkspaceButton setSelection fProjectButton setSelection fSpecificProjectsButton setSelection fProjects fBuildButton setSelection fWorkspaceButton setSelection fBuildButton setSelection fProjectButton setSelection startsWith fSpecificProjectsButton setSelection IProject getBuildProjects fProjects ArrayList fProjects
see org eclipse debug ui I Launch Configuration Tab perform Apply org eclipse debug core I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy configuration String scope generate Scope Memento configuration set Attribute ATTR BUILD SCOPE scope if f Referenced Projects get Selection default is true configuration set Attribute ATTR INCLUDE REFERENCED PROJECTS String null else configuration set Attribute ATTR INCLUDE REFERENCED PROJECTS false  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy generateScopeMemento setAttribute ATTR_BUILD_SCOPE fReferencedProjects getSelection setAttribute ATTR_INCLUDE_REFERENCED_PROJECTS setAttribute ATTR_INCLUDE_REFERENCED_PROJECTS
Generates a memento for the build scope private String generate Scope Memento if f Build Button get Selection if f Workspace Button get Selection return null if f Project Button get Selection return project NON NLS 1 if f Specific Projects Button get Selection return get Build Scope Attribute f Projects return null return none NON NLS 1  generateScopeMemento fBuildButton getSelection fWorkspaceButton getSelection fProjectButton getSelection fSpecificProjectsButton getSelection getBuildScopeAttribute fProjects
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Ant Launch Configuration Messages get String Ant Build Tab 8 NON NLS 1  ILaunchConfigurationTab getName getName AntLaunchConfigurationMessages getString AntBuildTab
Updates the enablement state of the fields private void update Enabled State boolean enabled f Build Button get Selection f Group set Enabled enabled f Workspace Button set Enabled enabled f Project Button set Enabled enabled f Specific Projects Button set Enabled enabled f Select Button set Enabled enabled f Specific Projects Button get Selection if enabled super set Error Message null if enabled if f Workspace Button get Selection f Project Button get Selection f Specific Projects Button get Selection f Workspace Button set Selection true f Referenced Projects set Enabled f Build Button get Selection f Project Button get Selection f Specific Projects Button get Selection  updateEnabledState fBuildButton getSelection fGroup setEnabled fWorkspaceButton setEnabled fProjectButton setEnabled fSpecificProjectsButton setEnabled fSelectButton setEnabled fSpecificProjectsButton getSelection setErrorMessage fWorkspaceButton getSelection fProjectButton getSelection fSpecificProjectsButton getSelection fWorkspaceButton setSelection fReferencedProjects setEnabled fBuildButton getSelection fProjectButton getSelection fSpecificProjectsButton getSelection
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return AntUI Images get Image I AntUI Constants IMG ANT BUILD TAB  ILaunchConfigurationTab getImage getImage AntUIImages getImage IAntUIConstants IMG_ANT_BUILD_TAB
public boolean is Valid I Launch Configuration launch Config set Error Message null set Message null if f Build Button get Selection f Specific Projects Button get Selection f Projects is Empty set Error Message Ant Launch Configuration Messages get String Ant Build Tab 9 NON NLS 1 return false return true  isValid ILaunchConfiguration launchConfig setErrorMessage setMessage fBuildButton getSelection fSpecificProjectsButton getSelection fProjects isEmpty setErrorMessage AntLaunchConfigurationMessages getString AntBuildTab
Returns a collection of projects referenced by a build scope attribute param scope build scope attribute code ATTR BUILD SCOPE code return collection of porjects referred to by the scope attribute public static I Project get Build Projects String scope if scope starts With projects NON NLS 1 String path String scope substring 11 scope length 1 if path String length 1 String names path String split NON NLS 1 I Project projects new I Project names length I Workspace Root root Resources Plugin get Workspace get Root for int i 0 i names length i projects i root get Project names i return projects else if scope equals project NON NLS 1 I Resource resource DebugUI Tools get Selected Resource if resource null return new I Project resource get Project return new I Project 0  ATTR_BUILD_SCOPE IProject getBuildProjects startsWith pathString pathString pathString IProject IProject IWorkspaceRoot ResourcesPlugin getWorkspace getRoot getProject IResource DebugUITools getSelectedResource IProject getProject IProject
Returns the build scope attribute specified by the given launch configuration or code null code if none param configuration launch configuration return build scope attribute code ATTR BUILD SCOPE code throws Core Exception if unable to access the associated attribute public static String get Build Scope I Launch Configuration configuration throws Core Exception return configuration get Attribute ATTR BUILD SCOPE String null  ATTR_BUILD_SCOPE CoreException getBuildScope ILaunchConfiguration CoreException getAttribute ATTR_BUILD_SCOPE
Whether referenced projects should be considered when building Only valid when a set of projects is to be built param configuration return whether referenced projects should be considerd when building throws Core Exception if unable to access the associated attribute public static boolean is Include Referenced Projects I Launch Configuration configuration throws Core Exception return configuration get Attribute ATTR INCLUDE REFERENCED PROJECTS true  CoreException isIncludeReferencedProjects ILaunchConfiguration CoreException getAttribute ATTR_INCLUDE_REFERENCED_PROJECTS
Creates and returns a memento for the given project set to be used as a build scope attribute param projects list of projects return an equivalent refresh attribute public static String get Build Scope Attribute List projects String Buffer buf new String Buffer buf append projects NON NLS 1 Iterator iterator projects iterator while iterator has Next I Project project I Project iterator next buf append project get Name if iterator has Next buf append NON NLS 1 buf append NON NLS 1 return buf to String  getBuildScopeAttribute StringBuffer StringBuffer hasNext IProject IProject getName hasNext toString
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy do nothing on activation  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy do nothing on deactivation  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy

public I Runtime Classpath Entry compute Unresolved Classpath I Launch Configuration configuration throws Core Exception boolean use Default configuration get Attribute I Java Launch Configuration Constants ATTR DEFAULT CLASSPATH true if use Default List rtes new Array List 10 IVM Install vm null try vm Java Runtime computeVM Install configuration catch Core Exception ce likely in a non Java project vm Java Runtime get DefaultVM Install I Path container Path new Path Java Runtime JRE CONTAINER container Path container Path append new Path vm getVM Install Type get Id container Path container Path append new Path vm get Name rtes add Java Runtime new Runtime Container Classpath Entry container Path I Runtime Classpath Entry STANDARD CLASSES rtes add new Ant Home Classpath Entry rtes add new Contributed Classpath Entries Entry return I Runtime Classpath Entry rtes to Array new I Runtime Classpath Entry rtes size return super compute Unresolved Classpath configuration  IRuntimeClasspathEntry computeUnresolvedClasspath ILaunchConfiguration CoreException useDefault getAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_CLASSPATH useDefault ArrayList IVMInstall JavaRuntime computeVMInstall CoreException JavaRuntime getDefaultVMInstall IPath containerPath JavaRuntime JRE_CONTAINER containerPath containerPath getVMInstallType getId containerPath containerPath getName JavaRuntime newRuntimeContainerClasspathEntry containerPath IRuntimeClasspathEntry STANDARD_CLASSES AntHomeClasspathEntry ContributedClasspathEntriesEntry IRuntimeClasspathEntry toArray IRuntimeClasspathEntry computeUnresolvedClasspath

see org eclipse jdt debug ui launch Configurations Java Classpath Tab is Show Bootpath public boolean is Show Bootpath return false  launchConfigurations JavaClasspathTab isShowBootpath isShowBootpath
Creates actions to manipulate the classpath param path Button Comp composite buttons are contained in since 3 0 protected void create Path Buttons Composite path Button Comp create Button path Button Comp new Move Up Action f Classpath Viewer create Button path Button Comp new Move Down Action f Classpath Viewer create Button path Button Comp new Remove Action f Classpath Viewer create Button path Button Comp new Add Jar Action f Classpath Viewer create Button path Button Comp new Add External Jar Action f Classpath Viewer DIALOG SETTINGS PREFIX Button button create Button path Button Comp new Add Folder Action f Classpath Viewer button set Text Ant Launch Configuration Messages get String Ant Classpath Tab 0 NON NLS 1 create Button path Button Comp new Add Variable String Action f Classpath Viewer Runtime Classpath Action action new Restore Default Entries Action f Classpath Viewer this create Button path Button Comp action action set Enabled true action new Edit Ant Home Entry Action f Classpath Viewer this create Button path Button Comp action action set Enabled true  pathButtonComp createPathButtons pathButtonComp createButton pathButtonComp MoveUpAction fClasspathViewer createButton pathButtonComp MoveDownAction fClasspathViewer createButton pathButtonComp RemoveAction fClasspathViewer createButton pathButtonComp AddJarAction fClasspathViewer createButton pathButtonComp AddExternalJarAction fClasspathViewer DIALOG_SETTINGS_PREFIX createButton pathButtonComp AddFolderAction fClasspathViewer setText AntLaunchConfigurationMessages getString AntClasspathTab createButton pathButtonComp AddVariableStringAction fClasspathViewer RuntimeClasspathAction RestoreDefaultEntriesAction fClasspathViewer createButton pathButtonComp setEnabled EditAntHomeEntryAction fClasspathViewer createButton pathButtonComp setEnabled
see org eclipse debug ui Abstract Launch Configuration Tab set Dirty boolean public void set Dirty boolean dirty super set Dirty dirty  AbstractLaunchConfigurationTab setDirty setDirty setDirty
public void initialize From I Launch Configuration configuration try Ant Util migrate To New Classpath Format configuration catch Core Exception e super initialize From configuration  initializeFrom ILaunchConfiguration AntUtil migrateToNewClasspathFormat CoreException initializeFrom
public void entries Changed I Classpath Viewer viewer super entries Changed viewer I Launch Configuration Tab tabs get Launch Configuration Dialog get Tabs for int i 0 i tabs length i I Launch Configuration Tab tab tabs i if tab instanceof Ant Targets Tab Ant Targets Tab tab set Dirty true  entriesChanged IClasspathViewer entriesChanged ILaunchConfigurationTab getLaunchConfigurationDialog getTabs ILaunchConfigurationTab AntTargetsTab AntTargetsTab setDirty
public boolean is Valid I Launch Configuration launch Config boolean valid super is Valid launch Config if valid return false return validate Ant Home  isValid ILaunchConfiguration launchConfig isValid launchConfig validateAntHome
private boolean validate Ant Home Classpath Model model get Model I Classpath Entry user Entry model get User Entry I Classpath Entry entries user Entry get Entries for int i 0 i entries length i Classpath Entry entry Classpath Entry entries i I Runtime Classpath Entry runtime Entry entry get Delegate if runtime Entry instanceof Ant Home Classpath Entry try Ant Home Classpath Entry runtime Entry resolve Ant Home catch Core Exception ce set Error Message ce get Status get Message return false break return true  validateAntHome ClasspathModel getModel IClasspathEntry userEntry getUserEntry IClasspathEntry userEntry getEntries ClasspathEntry ClasspathEntry IRuntimeClasspathEntry runtimeEntry getDelegate runtimeEntry AntHomeClasspathEntry AntHomeClasspathEntry runtimeEntry resolveAntHome CoreException setErrorMessage getStatus getMessage

public void create Control Composite parent wrapping Composite new Composite parent SWT NONE wrapping Composite set Layout new Grid Layout wrapping Composite set Layout Data new Grid Data Grid Data FILL BOTH wrapping Composite set Font parent get Font warning Label new Label wrapping Composite SWT NONE warning Label set Text Ant Launch Configuration Messages get String Ant Environment Tab 0 NON NLS 1 super create Control wrapping Composite set Control wrapping Composite Overwrite setting in super method Dialog apply Dialog Font parent  createControl wrappingComposite wrappingComposite setLayout GridLayout wrappingComposite setLayoutData GridData GridData FILL_BOTH wrappingComposite setFont getFont warningLabel wrappingComposite warningLabel setText AntLaunchConfigurationMessages getString AntEnvironmentTab createControl wrappingComposite setControl wrappingComposite applyDialogFont
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy update Widgets Enabled working Copy  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy updateWidgetsEnabled workingCopy
protected void update Widgets Enabled I Launch Configuration Working Copy working Copy if wrapping Composite null return String vm Name null try vm Name working Copy get Attribute I Java Launch Configuration Constants ATTR VM INSTALL NAME String null catch Core Exception e boolean enabled true if vm Name null enabled false Color table Color enabled null Display get Default get System Color SWT COLOR WIDGET BACKGROUND Color label Color enabled null Display get Default get System Color SWT COLOR RED Table table environment Table get Table table set Enabled enabled table set Background table Color warning Label set Foreground label Color env Add Button set Enabled enabled env Select Button set Enabled enabled update Append Replace update the enabled state of the edit and remove buttons environment Table set Selection environment Table get Selection  updateWidgetsEnabled ILaunchConfigurationWorkingCopy workingCopy wrappingComposite vmName vmName workingCopy getAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_NAME CoreException vmName tableColor getDefault getSystemColor COLOR_WIDGET_BACKGROUND labelColor getDefault getSystemColor COLOR_RED environmentTable getTable setEnabled setBackground tableColor warningLabel setForeground labelColor envAddButton setEnabled envSelectButton setEnabled updateAppendReplace environmentTable setSelection environmentTable getSelection

Creates an Ant Home entry for the default Ant Home installation public Ant Home Classpath Entry ant Home Location null  AntHome AntHome AntHomeClasspathEntry antHomeLocation
Constructs an Ant Home entry for the Ant installed at the specified root directory param ant Home path in the local file system to an Ant installation public Ant Home Classpath Entry String ant Home ant Home Location ant Home  AntHome antHome AntHomeClasspathEntry antHome antHomeLocation antHome
protected void build Memento Document document Element memento throws Core Exception if ant Home Location null memento set Attribute default true NON NLS 1 NON NLS 2 else memento set Attribute ant Home new Path ant Home Location to String NON NLS 1  buildMemento CoreException antHomeLocation setAttribute setAttribute antHome antHomeLocation toString
public void initialize From Element memento throws Core Exception String ant Home memento get Attribute ant Home NON NLS 1 if ant Home null ant Home length 0 I Path path new Path ant Home ant Home Location path toOS String else ant Home Location null  initializeFrom CoreException antHome getAttribute antHome antHome antHome IPath antHome antHomeLocation toOSString antHomeLocation
see org eclipse jdt launching I Runtime Classpath Entry2 get Type Id public String get Type Id return TYPE ID  IRuntimeClasspathEntry2 getTypeId getTypeId TYPE_ID
public I Runtime Classpath Entry get Runtime Classpath Entries I Launch Configuration configuration throws Core Exception List libs new Array List 40 Ant Core Preferences preferences Ant Core Plugin get Plugin get Preferences if ant Home Location null I Ant Classpath Entry entries preferences get Ant Home Classpath Entries for int i 0 i entries length i I Ant Classpath Entry entry entries i libs add Java Runtime new String Variable Classpath Entry entry get Label else File lib resolve Ant Home I Path lib Dir new Path ant Home Location append lib NON NLS 1 String file Names lib list for int i 0 i file Names length i String name file Names i I Path path new Path name String file Extension path get File Extension if jar equals Ignore Case file Extension NON NLS 1 libs add Java Runtime new Archive Runtime Classpath Entry lib Dir append path return I Runtime Classpath Entry libs to Array new I Runtime Classpath Entry libs size  IRuntimeClasspathEntry getRuntimeClasspathEntries ILaunchConfiguration CoreException ArrayList AntCorePreferences AntCorePlugin getPlugin getPreferences antHomeLocation IAntClasspathEntry getAntHomeClasspathEntries IAntClasspathEntry JavaRuntime newStringVariableClasspathEntry getLabel resolveAntHome IPath libDir antHomeLocation fileNames fileNames fileNames IPath fileExtension getFileExtension equalsIgnoreCase fileExtension JavaRuntime newArchiveRuntimeClasspathEntry libDir IRuntimeClasspathEntry toArray IRuntimeClasspathEntry
public File resolve Ant Home throws Core Exception if ant Home Location null using the default ant home return null I Path lib Dir new Path ant Home Location append lib NON NLS 1 File lib lib Dir to File File parent Dir lib get Parent File if parent Dir null parent Dir exists abort Message Format format Ant Launch Configuration Messages get String Ant Home Classpath Entry 10 new String ant Home Location null NON NLS 1 if lib exists lib is Directory abort Message Format format Ant Launch Configuration Messages get String Ant Home Classpath Entry 11 new String ant Home Location null NON NLS 1 return lib  resolveAntHome CoreException antHomeLocation IPath libDir antHomeLocation libDir toFile parentDir getParentFile parentDir parentDir MessageFormat AntLaunchConfigurationMessages getString AntHomeClasspathEntry antHomeLocation isDirectory MessageFormat AntLaunchConfigurationMessages getString AntHomeClasspathEntry antHomeLocation
public String get Name if ant Home Location null return Ant Launch Configuration Messages get String Ant Home Classpath Entry 8 NON NLS 1 return Message Format format Ant Launch Configuration Messages get String Ant Home Classpath Entry 9 new String ant Home Location NON NLS 1  getName antHomeLocation AntLaunchConfigurationMessages getString AntHomeClasspathEntry MessageFormat AntLaunchConfigurationMessages getString AntHomeClasspathEntry antHomeLocation
see org eclipse jdt launching I Runtime Classpath Entry get Type public int get Type return I Runtime Classpath Entry OTHER  IRuntimeClasspathEntry getType getType IRuntimeClasspathEntry
see org eclipse jdt launching I Runtime Classpath Entry2 is Composite public boolean is Composite return true  IRuntimeClasspathEntry2 isComposite isComposite
see java lang Object equals java lang Object public boolean equals Object obj return obj instanceof Ant Home Classpath Entry equals Or Null ant Home Location Ant Home Classpath Entry obj ant Home Location  AntHomeClasspathEntry equalsOrNull antHomeLocation AntHomeClasspathEntry antHomeLocation
Return whether s1 is equivalent to s2 param s1 param s2 return whether s1 is equivalent to s2 private boolean equals Or Null String s1 String s2 if s1 null s2 null return s1 s2 return s1 equals Ignore Case s2  equalsOrNull equalsIgnoreCase
see java lang Object hash Code public int hash Code return get Class hash Code  hashCode hashCode getClass hashCode
Sets the ant home to use param path path to toor of an ant home installation protected void set Ant Home String path ant Home Location path  setAntHome antHomeLocation
Returns the ant home location return path to root ant installation directory public String get Ant Home return ant Home Location  getAntHome antHomeLocation

public boolean pre Launch Check I Launch Configuration configuration String mode I Progress Monitor monitor throws Core Exception try return super pre Launch Check configuration mode monitor catch Core Exception ce likely dealing with a non Java project no need to check for breakpoints as always in run mode return true  preLaunchCheck ILaunchConfiguration IProgressMonitor CoreException preLaunchCheck CoreException
public String get Program Arguments I Launch Configuration configuration throws Core Exception try return super get Program Arguments configuration catch Core Exception ce return configuration get Attribute I Java Launch Configuration Constants ATTR PROGRAM ARGUMENTS NON NLS 1  getProgramArguments ILaunchConfiguration CoreException getProgramArguments CoreException getAttribute IJavaLaunchConfigurationConstants ATTR_PROGRAM_ARGUMENTS

public void create Control Composite parent super create Control parent Workbench Help set Help get Control I AntUI Help Context Ids ANT JRE TAB Composite comp Composite fJRE Block get Control Grid Data comp get Layout Data grab Excess Vertical Space true Grid Data comp get Layout Data vertical Alignment SWT FILL fVM Arguments Block create Control comp Grid Data fVM Arguments Block get Control get Layout Data horizontal Span 2 f Working Directory Block create Control comp Grid Data f Working Directory Block get Control get Layout Data horizontal Span 2  createControl createControl WorkbenchHelp setHelp getControl IAntUIHelpContextIds ANT_JRE_TAB fJREBlock getControl GridData getLayoutData grabExcessVerticalSpace GridData getLayoutData verticalAlignment fVMArgumentsBlock createControl GridData fVMArgumentsBlock getControl getLayoutData horizontalSpan fWorkingDirectoryBlock createControl GridData fWorkingDirectoryBlock getControl getLayoutData horizontalSpan
see org eclipse jdt internal debug ui jres JRE Descriptor get Description public String get Description return Ant Launch Configuration Messages get String AntJRE Tab 2 NON NLS 1  JREDescriptor getDescription getDescription AntLaunchConfigurationMessages getString AntJRETab
protected JRE Descriptor get DefaultJRE Descriptor return new JRE Descriptor non Javadoc see org eclipse jdt internal debug ui jres JRE Descriptor get Description public String get Description return Ant Launch Configuration Messages get String AntJRE Tab 2 NON NLS 1  JREDescriptor getDefaultJREDescriptor JREDescriptor JREDescriptor getDescription getDescription AntLaunchConfigurationMessages getString AntJRETab
see org eclipse jdt internal debug ui jres JRE Descriptor get Description public String get Description return Ant Launch Configuration Messages get String AntJRE Tab 3 NON NLS 1  JREDescriptor getDescription getDescription AntLaunchConfigurationMessages getString AntJRETab
protected JRE Descriptor get SpecificJRE Descriptor return new JRE Descriptor non Javadoc see org eclipse jdt internal debug ui jres JRE Descriptor get Description public String get Description return Ant Launch Configuration Messages get String AntJRE Tab 3 NON NLS 1  JREDescriptor getSpecificJREDescriptor JREDescriptor JREDescriptor getDescription getDescription AntLaunchConfigurationMessages getString AntJRETab
public void perform Apply I Launch Configuration Working Copy configuration f Working Directory Block set Enabled fJRE Block is DefaultJRE fVM Arguments Block set Enabled fJRE Block is DefaultJRE if fJRE Block is DefaultJRE configuration set Attribute I Java Launch Configuration Constants ATTR VM INSTALL NAME String null configuration set Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE String null configuration set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME String null configuration set Attribute I Java Launch Configuration Constants ATTR PROGRAM ARGUMENTS String null else super perform Apply configuration apply SeparateVM Attributes configuration fVM Arguments Block perform Apply configuration f Working Directory Block perform Apply configuration set Launch Configuration Working Copy configuration  performApply ILaunchConfigurationWorkingCopy fWorkingDirectoryBlock setEnabled fJREBlock isDefaultJRE fVMArgumentsBlock setEnabled fJREBlock isDefaultJRE fJREBlock isDefaultJRE setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_NAME setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME setAttribute IJavaLaunchConfigurationConstants ATTR_PROGRAM_ARGUMENTS performApply applySeparateVMAttributes fVMArgumentsBlock performApply fWorkingDirectoryBlock performApply setLaunchConfigurationWorkingCopy
private void apply SeparateVM Attributes I Launch Configuration Working Copy configuration configuration set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME MAIN TYPE NAME configuration set Attribute Debug Plugin ATTR PROCESS FACTORY ID I AntUI Constants REMOTE ANT PROCESS FACTORY ID  applySeparateVMAttributes ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME MAIN_TYPE_NAME setAttribute DebugPlugin ATTR_PROCESS_FACTORY_ID IAntUIConstants REMOTE_ANT_PROCESS_FACTORY_ID
public void initialize From I Launch Configuration configuration super initialize From configuration fVM Arguments Block initialize From configuration f Working Directory Block initialize From configuration boolean separateVM fJRE Block is DefaultJRE f Working Directory Block set Enabled separateVM fVM Arguments Block set Enabled separateVM  initializeFrom ILaunchConfiguration initializeFrom fVMArgumentsBlock initializeFrom fWorkingDirectoryBlock initializeFrom fJREBlock isDefaultJRE fWorkingDirectoryBlock setEnabled fVMArgumentsBlock setEnabled
see org eclipse debug ui I Launch Configuration Tab is Valid org eclipse debug core I Launch Configuration public boolean is Valid I Launch Configuration config return f Working Directory Block is Valid config  ILaunchConfigurationTab isValid ILaunchConfiguration isValid ILaunchConfiguration fWorkingDirectoryBlock isValid
public void set Launch Configuration Dialog I Launch Configuration Dialog dialog super set Launch Configuration Dialog dialog f Working Directory Block set Launch Configuration Dialog dialog fVM Arguments Block set Launch Configuration Dialog dialog  setLaunchConfigurationDialog ILaunchConfigurationDialog setLaunchConfigurationDialog fWorkingDirectoryBlock setLaunchConfigurationDialog fVMArgumentsBlock setLaunchConfigurationDialog
public String get Error Message String m super get Error Message if m null return f Working Directory Block get Error Message return m  getErrorMessage getErrorMessage fWorkingDirectoryBlock getErrorMessage
public String get Message String m super get Message if m null return f Working Directory Block get Message return m  getMessage getMessage fWorkingDirectoryBlock getMessage
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy set Launch Configuration Working Copy working Copy  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy setLaunchConfigurationWorkingCopy workingCopy
public void set Defaults I Launch Configuration Working Copy config super set Defaults config by default set an Ant build to occur in a separate VM IVM Install default Install null try default Install Java Runtime computeVM Install config catch Core Exception e core exception thrown for non Java project default Install Java Runtime get DefaultVM Install if default Install null String vm Name default Install get Name String vm TypeID default Install getVM Install Type get Id config set Attribute I Java Launch Configuration Constants ATTR VM INSTALL NAME vm Name config set Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE vm TypeID apply SeparateVM Attributes config  setDefaults ILaunchConfigurationWorkingCopy setDefaults IVMInstall defaultInstall defaultInstall JavaRuntime computeVMInstall CoreException defaultInstall JavaRuntime getDefaultVMInstall defaultInstall vmName defaultInstall getName vmTypeID defaultInstall getVMInstallType getId setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_NAME vmName setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE vmTypeID applySeparateVMAttributes
see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy

Resource Bundle get Bundle BUNDLE NAME private Ant Launch Configuration Messages  ResourceBundle getBundle BUNDLE_NAME AntLaunchConfigurationMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

see org eclipse debug core model I Launch Configuration Delegate launch org eclipse debug core I Launch Configuration java lang String org eclipse debug core I Launch org eclipse core runtime I Progress Monitor public void launch I Launch Configuration configuration String mode I Launch launch I Progress Monitor monitor throws Core Exception if monitor is Canceled return migrate the config to the new classpath format if required Ant Util migrate To New Classpath Format configuration String vm TypeID null try check if set to run in a separate VM vm TypeID configuration get Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE String null catch Core Exception ce AntUI Plugin log ce if Common Tab is Launch In Background configuration monitor begin Task Message Format format Ant Launch Configuration Messages get String Ant Launch Delegate Launching  0  1 new String configuration get Name 10 NON NLS 1 else monitor begin Task Message Format format Ant Launch Configuration Messages get String Ant Launch Delegate Running  0  2 new String configuration get Name 100 NON NLS 1 resolve location I Path location External Tools Util get Location configuration monitor worked 1 if monitor is Canceled return if vm TypeID null Ant Runner is Build Running I Status status new Status I Status ERROR I AntUI Constants PLUGIN ID 1 Message Format format Ant Launch Configuration Messages get String Ant Launch Delegate Build In Progress new String location toOS String null NON NLS 1 throw new Core Exception status resolve working directory I Path working Directory External Tools Util get Working Directory configuration String basedir null if working Directory null basedir working Directory toOS String monitor worked 1 if monitor is Canceled return link the process to its build logger via a timestamp long time Stamp System current Time Millis String id Stamp Long to String time Stamp String Buffer id Property new String Buffer D NON NLS 1 id Property append Ant Process ATTR ANT PROCESS ID id Property append id Property append id Stamp resolve arguments String arguments External Tools Util get Arguments configuration Map user Properties Ant Util get Properties configuration String property Files Ant Util get Property Files configuration String targets Ant Util get Targets From Config configuration URL custom Classpath Ant Util get Custom Classpath configuration String ant Home Ant Util get Ant Home configuration Ant Runner runner null if vm TypeID null runner configure Ant Runner configuration location basedir id Property arguments user Properties property Files targets custom Classpath ant Home monitor worked 1 if monitor is Canceled return boolean capture Output External Tools Util get Capture Output configuration int port 1 if vm TypeID null capture Output if user Properties null user Properties new Hash Map port Socket Util find Free Port user Properties put Ant Process ATTR ANT PROCESS ID id Stamp user Properties put eclipse connect port Integer to String port NON NLS 1 String Buffer command Line generate Command Line location arguments user Properties property Files targets ant Home basedir vm TypeID null capture Output if vm TypeID null monitor begin Task Message Format format Ant Launch Configuration Messages get String Ant Launch Delegate Launching  0  1 new String configuration get Name 10 NON NLS 1 run In SeparateVM configuration launch monitor id Stamp port command Line capture Output else run In SameVM configuration launch monitor location id Stamp runner command Line monitor done  ILaunchConfigurationDelegate ILaunchConfiguration ILaunch IProgressMonitor ILaunchConfiguration ILaunch IProgressMonitor CoreException isCanceled AntUtil migrateToNewClasspathFormat vmTypeID vmTypeID getAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE CoreException AntUIPlugin CommonTab isLaunchInBackground beginTask MessageFormat AntLaunchConfigurationMessages getString AntLaunchDelegate Launching_ _1 getName beginTask MessageFormat AntLaunchConfigurationMessages getString AntLaunchDelegate Running_ _2 getName IPath ExternalToolsUtil getLocation isCanceled vmTypeID AntRunner isBuildRunning IStatus IStatus IAntUIConstants PLUGIN_ID MessageFormat AntLaunchConfigurationMessages getString AntLaunchDelegate Build_In_Progress toOSString CoreException IPath workingDirectory ExternalToolsUtil getWorkingDirectory workingDirectory workingDirectory toOSString isCanceled timeStamp currentTimeMillis idStamp toString timeStamp StringBuffer idProperty StringBuffer idProperty AntProcess ATTR_ANT_PROCESS_ID idProperty idProperty idStamp ExternalToolsUtil getArguments userProperties AntUtil getProperties propertyFiles AntUtil getPropertyFiles AntUtil getTargetsFromConfig customClasspath AntUtil getCustomClasspath antHome AntUtil getAntHome AntRunner vmTypeID configureAntRunner idProperty userProperties propertyFiles customClasspath antHome isCanceled captureOutput ExternalToolsUtil getCaptureOutput vmTypeID captureOutput userProperties userProperties HashMap SocketUtil findFreePort userProperties AntProcess ATTR_ANT_PROCESS_ID idStamp userProperties toString StringBuffer commandLine generateCommandLine userProperties propertyFiles antHome vmTypeID captureOutput vmTypeID beginTask MessageFormat AntLaunchConfigurationMessages getString AntLaunchDelegate Launching_ _1 getName runInSeparateVM idStamp commandLine captureOutput runInSameVM idStamp commandLine
Runnable r new Runnable public void run try final Runner run process catch Core Exception e handle Exception e Ant Launch Configuration Messages get String Ant Launch Delegate Failure NON NLS 1 process terminated  finalRunner CoreException handleException AntLaunchConfigurationMessages getString AntLaunchDelegate
private void run In SameVM I Launch Configuration configuration I Launch launch I Progress Monitor monitor I Path location String id Stamp Ant Runner runner String Buffer command Line throws Core Exception Map attributes new Hash Map 2 attributes put I Process ATTR PROCESS TYPE I Ant Launch Configuration Constants ID ANT PROCESS TYPE attributes put Ant Process ATTR ANT PROCESS ID id Stamp final Ant Process process new Ant Process location toOS String launch attributes set Process Attributes process id Stamp command Line if Common Tab is Launch In Background configuration final Ant Runner final Runner runner Runnable r new Runnable public void run try final Runner run process catch Core Exception e handle Exception e Ant Launch Configuration Messages get String Ant Launch Delegate Failure NON NLS 1 process terminated Thread background new Thread r background start monitor worked 1 refresh resources after process finishes if Refresh Tab get Refresh Scope configuration null Background Resource Refresher refresher new Background Resource Refresher configuration process refresher start Background Refresh else execute the build try runner run monitor catch Core Exception e process terminated monitor done handle Exception e Ant Launch Configuration Messages get String Ant Launch Delegate 23 NON NLS 1 return process terminated refresh resources Refresh Tab refresh Resources configuration monitor  runInSameVM ILaunchConfiguration ILaunch IProgressMonitor IPath idStamp AntRunner StringBuffer commandLine CoreException HashMap IProcess ATTR_PROCESS_TYPE IAntLaunchConfigurationConstants ID_ANT_PROCESS_TYPE AntProcess ATTR_ANT_PROCESS_ID idStamp AntProcess AntProcess toOSString setProcessAttributes idStamp commandLine CommonTab isLaunchInBackground AntRunner finalRunner finalRunner CoreException handleException AntLaunchConfigurationMessages getString AntLaunchDelegate RefreshTab getRefreshScope BackgroundResourceRefresher BackgroundResourceRefresher startBackgroundRefresh CoreException handleException AntLaunchConfigurationMessages getString AntLaunchDelegate RefreshTab refreshResources
private Ant Runner configure Ant Runner I Launch Configuration configuration I Path location String base Dir String Buffer id Property String arguments Map user Properties String property Files String targets URL custom Classpath String ant Home throws Core Exception int arg Length 1 at least one user property timestamp if arguments null arg Length arguments length if base Dir null base Dir length 0 arg Length String runner Args new String arg Length if arguments null System arraycopy arguments 0 runner Args 0 arguments length if base Dir null base Dir length 0 runner Args runner Args length 2 BASE DIR PREFIX base Dir runner Args runner Args length 1 id Property to String Ant Runner runner new Ant Runner runner set Build File Location location toOS String if External Tools Util get Capture Output configuration runner add Build Logger ANT LOGGER CLASS else runner add Build Logger NULL LOGGER CLASS runner set Input Handler INPUT HANDLER CLASS runner set Arguments runner Args if user Properties null runner add User Properties user Properties if property Files null runner set Property Files property Files if targets null runner set Execution Targets targets if custom Classpath null runner set Custom Classpath custom Classpath if ant Home null runner set Ant Home ant Home return runner  AntRunner configureAntRunner ILaunchConfiguration IPath baseDir StringBuffer idProperty userProperties propertyFiles customClasspath antHome CoreException argLength argLength baseDir baseDir argLength runnerArgs argLength runnerArgs baseDir baseDir runnerArgs runnerArgs BASE_DIR_PREFIX baseDir runnerArgs runnerArgs idProperty toString AntRunner AntRunner setBuildFileLocation toOSString ExternalToolsUtil getCaptureOutput addBuildLogger ANT_LOGGER_CLASS addBuildLogger NULL_LOGGER_CLASS setInputHandler INPUT_HANDLER_CLASS setArguments runnerArgs userProperties addUserProperties userProperties propertyFiles setPropertyFiles propertyFiles setExecutionTargets customClasspath setCustomClasspath customClasspath antHome setAntHome antHome
if store get Boolean I AntUI Preference Constants ANT ERROR DIALOG AntUI Plugin get Standard Display async Exec new Runnable public void run Message Dialog With Toggle open Error null title e get Message Ant Launch Configuration Messages get String Ant Launch Delegate 22 false AntUI Plugin get Default get Preference Store I AntUI Preference Constants ANT ERROR DIALOG NON NLS 1  getBoolean IAntUIPreferenceConstants ANT_ERROR_DIALOG AntUIPlugin getStandardDisplay asyncExec MessageDialogWithToggle openError getMessage AntLaunchConfigurationMessages getString AntLaunchDelegate AntUIPlugin getDefault getPreferenceStore IAntUIPreferenceConstants ANT_ERROR_DIALOG
private void handle Exception final Core Exception e final String title I Preference Store store AntUI Plugin get Default get Preference Store if store get Boolean I AntUI Preference Constants ANT ERROR DIALOG AntUI Plugin get Standard Display async Exec new Runnable public void run Message Dialog With Toggle open Error null title e get Message Ant Launch Configuration Messages get String Ant Launch Delegate 22 false AntUI Plugin get Default get Preference Store I AntUI Preference Constants ANT ERROR DIALOG NON NLS 1  handleException CoreException IPreferenceStore AntUIPlugin getDefault getPreferenceStore getBoolean IAntUIPreferenceConstants ANT_ERROR_DIALOG AntUIPlugin getStandardDisplay asyncExec MessageDialogWithToggle openError getMessage AntLaunchConfigurationMessages getString AntLaunchDelegate AntUIPlugin getDefault getPreferenceStore IAntUIPreferenceConstants ANT_ERROR_DIALOG
private void set Process Attributes I Process process String id Stamp String Buffer command Line link the process to its build logger via a timestamp process set Attribute Ant Process ATTR ANT PROCESS ID id Stamp create fake command line for the process if command Line null process set Attribute I Process ATTR CMDLINE command Line to String Task Link Manager register Ant Build process  setProcessAttributes IProcess idStamp StringBuffer commandLine setAttribute AntProcess ATTR_ANT_PROCESS_ID idStamp commandLine setAttribute IProcess ATTR_CMDLINE commandLine toString TaskLinkManager registerAntBuild
private String Buffer generate Command Line I Path location String arguments Map user Properties String property Files String targets String ant Home String basedir boolean separateVM boolean capture Output String Buffer command Line new String Buffer if separateVM command Line append ant NON NLS 1 if arguments null for int i 0 i arguments length i String arg arguments i command Line append command Line append arg Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences if property Files null global String files prefs get Custom Property Files for int i 0 i files length i String path files i command Line append propertyfile NON NLS 1 command Line append path command Line append else local configuration for int i 0 i property Files length i String path property Files i command Line append propertyfile NON NLS 1 command Line append path command Line append local configuration if user Properties null Iterator keys user Properties key Set iterator String key while keys has Next key String keys next append Property command Line key String user Properties get key global List properties null if separateVM properties prefs get Properties else properties prefs get Remote Ant Properties String key if we have user properties this means that the user has chosen to override the global properties if in a separate VM and have only two user properties these are really only Eclipse generated properties and the user is still using the global properties boolean use Global Properties user Properties null separateVM user Properties size 2 if use Global Properties for Iterator iter properties iterator iter has Next Property property Property iter next key property get Name String value property get Value if value null append Property command Line key value if basedir null basedir length 0 append Property command Line basedir basedir NON NLS 1 if ant Home null command Line append Dant home NON NLS 1 command Line append ant Home command Line append if separateVM if command Line index Of logger 1 capture Output NON NLS 1 command Line append logger NON NLS 1 command Line append REMOTE ANT LOGGER CLASS else command Line append inputhandler NON NLS 1 command Line append INPUT HANDLER CLASS command Line append logger NON NLS 1 if capture Output command Line append ANT LOGGER CLASS else command Line append NULL LOGGER CLASS if separateVM append Task And Types prefs command Line command Line append buildfile NON NLS 1 command Line append location toOS String command Line append if targets null for int i 0 i targets length i command Line append NON NLS 1 command Line append targets i command Line append return command Line  StringBuffer generateCommandLine IPath userProperties propertyFiles antHome captureOutput StringBuffer commandLine StringBuffer commandLine commandLine commandLine AntCorePreferences AntCorePlugin getPlugin getPreferences propertyFiles getCustomPropertyFiles commandLine commandLine commandLine propertyFiles propertyFiles commandLine commandLine commandLine userProperties userProperties keySet hasNext appendProperty commandLine userProperties getProperties getRemoteAntProperties useGlobalProperties userProperties userProperties useGlobalProperties hasNext getName getValue appendProperty commandLine appendProperty commandLine antHome commandLine commandLine antHome commandLine commandLine indexOf captureOutput commandLine commandLine REMOTE_ANT_LOGGER_CLASS commandLine commandLine INPUT_HANDLER_CLASS commandLine captureOutput commandLine ANT_LOGGER_CLASS commandLine NULL_LOGGER_CLASS appendTaskAndTypes commandLine commandLine commandLine toOSString commandLine commandLine commandLine commandLine commandLine
private void append Task And Types Ant Core Preferences prefs String Buffer command Line List tasks prefs get Remote Tasks Iterator itr tasks iterator while itr has Next Task task Task itr next command Line append eclipse Task NON NLS 1 command Line append task get Task Name command Line append command Line append task get Class Name List types prefs get Remote Types itr types iterator while itr has Next Type type Type itr next command Line append eclipse Type NON NLS 1 command Line append type get Type Name command Line append command Line append type get Class Name  appendTaskAndTypes AntCorePreferences StringBuffer commandLine getRemoteTasks hasNext commandLine eclipseTask commandLine getTaskName commandLine commandLine getClassName getRemoteTypes hasNext commandLine eclipseType commandLine getTypeName commandLine commandLine getClassName
private void append Property String Buffer command Line String name String value command Line append D NON NLS 1 command Line append name command Line append command Line append value command Line append NON NLS 1  appendProperty StringBuffer commandLine commandLine commandLine commandLine commandLine commandLine
see org eclipse debug core model I Source Locator get Source Element org eclipse debug core model I Stack Frame public Object get Source Element I Stack Frame stack Frame return null  ISourceLocator getSourceElement IStackFrame getSourceElement IStackFrame stackFrame
I Debug Event Set Listener listener new I Debug Event Set Listener public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i for int j 0 num Processes processes length j num Processes j if event get Source processes j event get Kind Debug Event TERMINATE terminated 0 true break  IDebugEventSetListener IDebugEventSetListener handleDebugEvents DebugEvent DebugEvent numProcesses numProcesses getSource getKind DebugEvent
private void run In SeparateVM I Launch Configuration configuration I Launch launch I Progress Monitor monitor String id Stamp int port String Buffer command Line boolean capture Output throws Core Exception if capture Output Remote Ant Build Listener client new Remote Ant Build Listener launch if port 1 client start Listening port I Launch Configuration Working Copy copy configuration get Working Copy copy set Attribute I Java Launch Configuration Constants ATTR PROGRAM ARGUMENTS command Line to String String Buffer vm Args generateVM Arguments copy copy set Attribute I Java Launch Configuration Constants ATTR VM ARGUMENTS vm Args to String launch set Source Locator new I Source Locator non Javadoc see org eclipse debug core model I Source Locator get Source Element org eclipse debug core model I Stack Frame public Object get Source Element I Stack Frame stack Frame return null copy set Attribute I Java Launch Configuration Constants ATTR VM ARGUMENTS Xdebug Xnoagent Djava compiler NONE Xrunjdwp transport dt socket server y suspend y address 8000 NON NLS 1 I Progress Monitor sub Monitor new Sub Progress Monitor monitor 10 Ant Java Launch Delegate delegate new Ant Java Launch Delegate delegate pre Launch Check copy I Launch Manager RUN MODE sub Monitor delegate launch copy I Launch Manager RUN MODE launch sub Monitor final I Process processes launch get Processes for int i 0 i processes length i set Process Attributes processes i id Stamp null if Common Tab is Launch In Background configuration refresh resources after process finishes if Refresh Tab get Refresh Scope configuration null Background Resource Refresher refresher new Background Resource Refresher configuration processes 0 refresher start Background Refresh else final boolean terminated new boolean 1 terminated 0 launch is Terminated I Debug Event Set Listener listener new I Debug Event Set Listener public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i for int j 0 num Processes processes length j num Processes j if event get Source processes j event get Kind Debug Event TERMINATE terminated 0 true break Debug Plugin get Default add Debug Event Listener listener monitor sub Task Ant Launch Configuration Messages get String Ant Launch Delegate 28 NON NLS 1 while monitor is Canceled terminated 0 try Thread sleep 50 catch Interrupted Exception e Debug Plugin get Default remove Debug Event Listener listener if monitor is Canceled refresh resources Refresh Tab refresh Resources configuration monitor  runInSeparateVM ILaunchConfiguration ILaunch IProgressMonitor idStamp StringBuffer commandLine captureOutput CoreException captureOutput RemoteAntBuildListener RemoteAntBuildListener startListening ILaunchConfigurationWorkingCopy getWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_PROGRAM_ARGUMENTS commandLine toString StringBuffer vmArgs generateVMArguments setAttribute IJavaLaunchConfigurationConstants ATTR_VM_ARGUMENTS vmArgs toString setSourceLocator ISourceLocator ISourceLocator getSourceElement IStackFrame getSourceElement IStackFrame stackFrame setAttribute IJavaLaunchConfigurationConstants ATTR_VM_ARGUMENTS dt_socket IProgressMonitor subMonitor SubProgressMonitor AntJavaLaunchDelegate AntJavaLaunchDelegate preLaunchCheck ILaunchManager RUN_MODE subMonitor ILaunchManager RUN_MODE subMonitor IProcess getProcesses setProcessAttributes idStamp CommonTab isLaunchInBackground RefreshTab getRefreshScope BackgroundResourceRefresher BackgroundResourceRefresher startBackgroundRefresh isTerminated IDebugEventSetListener IDebugEventSetListener handleDebugEvents DebugEvent DebugEvent numProcesses numProcesses getSource getKind DebugEvent DebugPlugin getDefault addDebugEventListener subTask AntLaunchConfigurationMessages getString AntLaunchDelegate isCanceled InterruptedException DebugPlugin getDefault removeDebugEventListener isCanceled RefreshTab refreshResources
private String Buffer generateVM Arguments I Launch Configuration config String Buffer vm Args new String Buffer try String config Args config get Attribute I Java Launch Configuration Constants ATTR VM ARGUMENTS String null if config Args null vm Args append config Args vm Args append catch Core Exception e vm Args append Dant home NON NLS 1 vm Args append Ant Core Plugin get Plugin get Preferences get Ant Home vm Args append NON NLS 1 File ant Lib Dir new File Ant Core Plugin get Plugin get Preferences get Ant Home lib NON NLS 1 vm Args append Dant library dir NON NLS 1 vm Args append ant Lib Dir get Absolute Path vm Args append return vm Args  StringBuffer generateVMArguments ILaunchConfiguration StringBuffer vmArgs StringBuffer configArgs getAttribute IJavaLaunchConfigurationConstants ATTR_VM_ARGUMENTS configArgs vmArgs configArgs vmArgs CoreException vmArgs vmArgs AntCorePlugin getPlugin getPreferences getAntHome vmArgs antLibDir AntCorePlugin getPlugin getPreferences getAntHome vmArgs vmArgs antLibDir getAbsolutePath vmArgs vmArgs
protected I Project get Build Order I Launch Configuration configuration String mode throws Core Exception String scope null try scope configuration get Attribute Ant Build Tab ATTR BUILD SCOPE String null catch Core Exception e return null if scope null return null I Project projects Ant Build Tab get Build Projects scope boolean is Ref Ant Build Tab is Include Referenced Projects configuration if is Ref return compute Referenced Build Order projects return compute Build Order projects  IProject getBuildOrder ILaunchConfiguration CoreException getAttribute AntBuildTab ATTR_BUILD_SCOPE CoreException IProject AntBuildTab getBuildProjects isRef AntBuildTab isIncludeReferencedProjects isRef computeReferencedBuildOrder computeBuildOrder

Constructor for Ant Launch Shortcut public Ant Launch Shortcut super  AntLaunchShortcut AntLaunchShortcut
see org eclipse debug ui I Launch Shortcut launch org eclipse jface viewers I Selection java lang String public void launch I Selection selection String mode if selection instanceof I Structured Selection I Structured Selection structured Selection I Structured Selection selection Object object structured Selection get First Element if object instanceof I Adaptable I Resource resource I Resource I Adaptable object get Adapter I Resource class if resource null launch resource mode return else if object instanceof Ant Element Node launch Ant Element Node object return ant File Not Found  ILaunchShortcut ISelection ISelection IStructuredSelection IStructuredSelection structuredSelection IStructuredSelection structuredSelection getFirstElement IAdaptable IResource IResource IAdaptable getAdapter IResource AntElementNode AntElementNode antFileNotFound
Launches the given Ant node which can correspond to an Ant target or an Ant project node param node the Ant node to launch public void launch Ant Element Node node String selected Target null if node instanceof Ant Target Node Ant Target Node target Node Ant Target Node node if target Node is Default Target selected Target NON NLS 1 else selected Target target Node get Target get Name else if node instanceof Ant Project Node selected Target NON NLS 1 if selected Target null return I File file node get Build File Resource if file null launch file I Launch Manager RUN MODE selected Target return external buildfile I Path file Path get External Build File Path if file Path null launch file Path I Launch Manager RUN MODE selected Target return ant File Not Found  AntElementNode selectedTarget AntTargetNode AntTargetNode targetNode AntTargetNode targetNode isDefaultTarget selectedTarget selectedTarget targetNode getTarget getName AntProjectNode selectedTarget selectedTarget IFile getBuildFileResource ILaunchManager RUN_MODE selectedTarget IPath filePath getExternalBuildFilePath filePath filePath ILaunchManager RUN_MODE selectedTarget antFileNotFound
private I Path get External Build File Path I Workbench Page page AntUI Plugin get Active Workbench Window get Active Page I Editor Input editor Input page get Active Editor get Editor Input I Path file Path null if editor Input instanceof I Location Provider file Path I Location Provider editor Input get Path editor Input return file Path  IPath getExternalBuildFilePath IWorkbenchPage AntUIPlugin getActiveWorkbenchWindow getActivePage IEditorInput editorInput getActiveEditor getEditorInput IPath filePath editorInput ILocationProvider filePath ILocationProvider editorInput getPath editorInput filePath
Inform the user that an ant file was not found to run private void ant File Not Found report Error Ant Launch Configuration Messages get String Ant Launch Shortcut Unable null NON NLS 1  antFileNotFound reportError AntLaunchConfigurationMessages getString AntLaunchShortcut
Launch the given file in the specified mode param resource either a build file xml file to execute or a resource from whose location a build file should be searched for If the given resource is a file that does not end in xml a search will begin at the resource s enclosing folder The given resource must be of type I File or I Container param mode the mode in which the build file should be executed protected void launch I Resource resource String mode if xml equals Ignore Case resource get File Extension NON NLS 1 if resource get Type I Resource FILE resource resource get Parent resource find Build File I Container resource if resource null launch I File resource mode null else ant File Not Found  IFile IContainer IResource equalsIgnoreCase getFileExtension getType IResource getParent findBuildFile IContainer IFile antFileNotFound
Launch the given targets in the given build file The targets are launched in the given mode param file the build file to launch param mode the mode in which the build file should be executed param target Attribute the targets to launch in the form of the launch configuration targets attribute public void launch I File file String mode String target Attribute I Launch Configuration configuration null if verify Mode mode List configurations find Existing Launch Configurations file if configurations is Empty configuration create Default Launch Configuration file else if configurations size 1 configuration I Launch Configuration configurations get 0 else configuration choose Config configurations if configuration null User cancelled selection return if configuration null ant File Not Found ensure that the targets are selected in the launch configuration try if target Attribute null target Attribute equals configuration get Attribute I Ant Launch Configuration Constants ATTR ANT TARGETS NON NLS 1 String project Name null try project Name configuration get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME String null catch Core Exception e String new Name get New Launch Configuration Name file get Full Path project Name target Attribute configuration configuration copy new Name I Launch Configuration Working Copy configuration set Attribute I Ant Launch Configuration Constants ATTR ANT TARGETS target Attribute if f Show Dialog configuration I Launch Configuration Working Copy configuration do Save catch Core Exception exception report Error Message Format format Ant Launch Configuration Messages get String Ant Launch Shortcut Exception launching new String file get Name exception NON NLS 1 return if f Show Dialog Offer to save dirty editors before opening the dialog as the contents of an Ant editor often affect the contents of the dialog if DebugUI Tools save Before Launch return I Status status new Status I Status INFO I AntUI Constants PLUGIN ID I AntUI Constants STATUS INIT RUN ANT null NON NLS 1 DebugUI Tools open Launch Configuration Dialog AntUI Plugin get Active Workbench Window get Shell configuration I External Tool Constants ID EXTERNAL TOOLS LAUNCH GROUP status else DebugUI Tools launch configuration mode  targetAttribute IFile targetAttribute ILaunchConfiguration verifyMode findExistingLaunchConfigurations isEmpty createDefaultLaunchConfiguration ILaunchConfiguration chooseConfig antFileNotFound targetAttribute targetAttribute getAttribute IAntLaunchConfigurationConstants ATTR_ANT_TARGETS projectName projectName getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME CoreException newName getNewLaunchConfigurationName getFullPath projectName targetAttribute newName ILaunchConfigurationWorkingCopy setAttribute IAntLaunchConfigurationConstants ATTR_ANT_TARGETS targetAttribute fShowDialog ILaunchConfigurationWorkingCopy doSave CoreException reportError MessageFormat AntLaunchConfigurationMessages getString AntLaunchShortcut Exception_launching getName fShowDialog DebugUITools saveBeforeLaunch IStatus IStatus IAntUIConstants PLUGIN_ID IAntUIConstants STATUS_INIT_RUN_ANT DebugUITools openLaunchConfigurationDialog AntUIPlugin getActiveWorkbenchWindow getShell IExternalToolConstants ID_EXTERNAL_TOOLS_LAUNCH_GROUP DebugUITools
Returns a unique name for a copy of the given launch configuration with the given targets The name seed is the same as the name for a new launch configuration with target List appended to the end param config param target Attribute return public static String get New Launch Configuration Name I Path file Path String project Name String target Attribute String Buffer buffer new String Buffer if project Name null buffer append project Name buffer append buffer append file Path last Segment else buffer append file Path toOS String if target Attribute null buffer append NON NLS 1 if target Attribute length MAX TARGET APPEND LENGTH 3 The target attribute can potentially be a long comma separated list of target Make sure the generated name isn t extremely long buffer append target Attribute substring 0 MAX TARGET APPEND LENGTH buffer append NON NLS 1 else buffer append target Attribute buffer append String name Debug Plugin get Default get Launch Manager generate Unique Launch Configuration Name From buffer to String return name to String  targetList targetAttribute getNewLaunchConfigurationName IPath filePath projectName targetAttribute StringBuffer StringBuffer projectName projectName filePath lastSegment filePath toOSString targetAttribute targetAttribute MAX_TARGET_APPEND_LENGTH targetAttribute MAX_TARGET_APPEND_LENGTH targetAttribute DebugPlugin getDefault getLaunchManager generateUniqueLaunchConfigurationNameFrom toString toString
Launch the given targets in the given build file The targets are launched in the given mode param file Path the path to the build file to launch param mode the mode in which the build file should be executed param target Attribute the targets to launch in the form of the launch configuration targets attribute public void launch I Path file Path String mode String target Attribute I Launch Configuration configuration null if verify Mode mode List configurations find Existing Launch Configurations file Path if configurations is Empty configuration create Default Launch Configuration file Path null else if configurations size 1 configuration I Launch Configuration configurations get 0 else configuration choose Config configurations if configuration null User cancelled selection return if configuration null ant File Not Found ensure that the targets are selected in the launch configuration try if target Attribute null target Attribute equals configuration get Attribute I Ant Launch Configuration Constants ATTR ANT TARGETS NON NLS 1 String project Name null try project Name configuration get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME String null catch Core Exception e String new Name get New Launch Configuration Name file Path project Name target Attribute configuration configuration copy new Name I Launch Configuration Working Copy configuration set Attribute I Ant Launch Configuration Constants ATTR ANT TARGETS target Attribute if f Show Dialog configuration I Launch Configuration Working Copy configuration do Save catch Core Exception exception report Error Message Format format Ant Launch Configuration Messages get String Ant Launch Shortcut Exception launching new String file Path to File get Name exception NON NLS 1 return if f Show Dialog Offer to save dirty editors before opening the dialog as the contents of an Ant editor often affect the contents of the dialog if DebugUI Tools save Before Launch return I Status status new Status I Status INFO I AntUI Constants PLUGIN ID I AntUI Constants STATUS INIT RUN ANT null NON NLS 1 DebugUI Tools open Launch Configuration Dialog AntUI Plugin get Active Workbench Window get Shell configuration I External Tool Constants ID EXTERNAL TOOLS LAUNCH GROUP status else DebugUI Tools launch configuration mode  filePath targetAttribute IPath filePath targetAttribute ILaunchConfiguration verifyMode findExistingLaunchConfigurations filePath isEmpty createDefaultLaunchConfiguration filePath ILaunchConfiguration chooseConfig antFileNotFound targetAttribute targetAttribute getAttribute IAntLaunchConfigurationConstants ATTR_ANT_TARGETS projectName projectName getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME CoreException newName getNewLaunchConfigurationName filePath projectName targetAttribute newName ILaunchConfigurationWorkingCopy setAttribute IAntLaunchConfigurationConstants ATTR_ANT_TARGETS targetAttribute fShowDialog ILaunchConfigurationWorkingCopy doSave CoreException reportError MessageFormat AntLaunchConfigurationMessages getString AntLaunchShortcut Exception_launching filePath toFile getName fShowDialog DebugUITools saveBeforeLaunch IStatus IStatus IAntUIConstants PLUGIN_ID IAntUIConstants STATUS_INIT_RUN_ANT DebugUITools openLaunchConfigurationDialog AntUIPlugin getActiveWorkbenchWindow getShell IExternalToolConstants ID_EXTERNAL_TOOLS_LAUNCH_GROUP DebugUITools
Walks the file hierarchy looking for a build file Returns the first build file found that matches the search criteria private I File find Build File I Container parent String names get Build File Names if names null return null I Resource file null while file null file get Type I Resource FILE for int i 0 i names length i String string names i file parent find Member string if file null file get Type I Resource FILE break parent parent get Parent if parent null return null return I File file  IFile findBuildFile IContainer getBuildFileNames IResource getType IResource findMember getType IResource getParent IFile
private String get Build File Names I Preference Store prefs AntUI Plugin get Default get Preference Store String build File Names prefs get String I AntUI Preference Constants ANT FIND BUILD FILE NAMES if build File Names length 0 the user has not specified any names to look for return null return Ant Util parse String build File Names NON NLS 1  getBuildFileNames IPreferenceStore AntUIPlugin getDefault getPreferenceStore buildFileNames getString IAntUIPreferenceConstants ANT_FIND_BUILD_FILE_NAMES buildFileNames AntUtil parseString buildFileNames
Creates and returns a default launch configuration for the given file param file return default launch configuration public static I Launch Configuration create Default Launch Configuration I File file return create Default Launch Configuration file get Full Path file get Project  ILaunchConfiguration createDefaultLaunchConfiguration IFile createDefaultLaunchConfiguration getFullPath getProject
Creates and returns a default launch configuration for the given file path and project param file Path the path to the buildfile param project the project containing the buildfile or code null code if the buildfile is not contained in a project is external return default launch configuration or code null code if one could not be created public static I Launch Configuration create Default Launch Configuration I Path file Path I Project project I Launch Manager manager Debug Plugin get Default get Launch Manager I Launch Configuration Type type manager get Launch Configuration Type I Ant Launch Configuration Constants ID ANT LAUNCH CONFIGURATION TYPE String project Name project null project get Name null String name get New Launch Configuration Name file Path project Name null try I Launch Configuration Working Copy working Copy type new Instance null name if project null working Copy set Attribute I External Tool Constants ATTR LOCATION Variables Plugin get Default get String Variable Manager generate Variable Expression workspace loc file Path to String NON NLS 1 else working Copy set Attribute I External Tool Constants ATTR LOCATION file Path to String working Copy set Attribute I Java Launch Configuration Constants ATTR CLASSPATH PROVIDER org eclipse ant ui Ant Classpath Provider NON NLS 1 set default for common settings Common Tab tab new Common Tab tab set Defaults working Copy tab dispose set the project name so that the correct default VM install can be determined if project null working Copy set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME project get Name AntJRE Tab jre Tab new AntJRE Tab jre Tab set Defaults working Copy jre Tab dispose return working Copy do Save catch Core Exception e report Error Message Format format Ant Launch Configuration Messages get String Ant Launch Shortcut 2 new String file Path to String e NON NLS 1 return null  filePath ILaunchConfiguration createDefaultLaunchConfiguration IPath filePath IProject ILaunchManager DebugPlugin getDefault getLaunchManager ILaunchConfigurationType getLaunchConfigurationType IAntLaunchConfigurationConstants ID_ANT_LAUNCH_CONFIGURATION_TYPE projectName getName getNewLaunchConfigurationName filePath projectName ILaunchConfigurationWorkingCopy workingCopy newInstance workingCopy setAttribute IExternalToolConstants ATTR_LOCATION VariablesPlugin getDefault getStringVariableManager generateVariableExpression workspace_loc filePath toString workingCopy setAttribute IExternalToolConstants ATTR_LOCATION filePath toString workingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_CLASSPATH_PROVIDER AntClasspathProvider CommonTab CommonTab setDefaults workingCopy workingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME getName AntJRETab jreTab AntJRETab jreTab setDefaults workingCopy jreTab workingCopy doSave CoreException reportError MessageFormat AntLaunchConfigurationMessages getString AntLaunchShortcut filePath toString
Returns a list of existing launch configuration for the given file param file the buildfile resource return list of launch configurations public static List find Existing Launch Configurations I File file I Path file Path file get Location return find Existing Launch Configurations file Path  findExistingLaunchConfigurations IFile IPath filePath getLocation findExistingLaunchConfigurations filePath
Returns a list of existing launch configuration for the given file param file Path the fully qualified path for the buildfile return list of launch configurations public static List find Existing Launch Configurations I Path file Path I Launch Manager manager Debug Plugin get Default get Launch Manager I Launch Configuration Type type manager get Launch Configuration Type I Ant Launch Configuration Constants ID ANT LAUNCH CONFIGURATION TYPE List valid Configs new Array List if type null I Launch Configuration configs null try configs manager get Launch Configurations type catch Core Exception e report Error Ant Launch Configuration Messages get String Ant Launch Shortcut 3 e NON NLS 1 if configs null configs length 0 if file Path null report Error Ant Launch Configuration Messages get String Ant Launch Shortcut 0 null NON NLS 1 else for int i 0 i configs length i I Launch Configuration configuration configs i I Path location try location External Tools Util get Location configuration if file Path equals location valid Configs add configuration catch Core Exception e error occurred in variable expand ignore return valid Configs  filePath findExistingLaunchConfigurations IPath filePath ILaunchManager DebugPlugin getDefault getLaunchManager ILaunchConfigurationType getLaunchConfigurationType IAntLaunchConfigurationConstants ID_ANT_LAUNCH_CONFIGURATION_TYPE validConfigs ArrayList ILaunchConfiguration getLaunchConfigurations CoreException reportError AntLaunchConfigurationMessages getString AntLaunchShortcut filePath reportError AntLaunchConfigurationMessages getString AntLaunchShortcut ILaunchConfiguration IPath ExternalToolsUtil getLocation filePath validConfigs CoreException validConfigs
Prompts the user to choose from the list of given launch configurations and returns the config the user choose or code null code if the user pressed Cancel or if the given list is empty public static I Launch Configuration choose Config List configs if configs is Empty return null I Label Provider label Provider DebugUI Tools new Debug Model Presentation Element List Selection Dialog dialog new Element List Selection Dialog Display get Default get Active Shell label Provider dialog set Elements configs to Array new I Launch Configuration configs size dialog set Title Ant Launch Configuration Messages get String Ant Launch Shortcut 4 NON NLS 1 dialog set Message Ant Launch Configuration Messages get String Ant Launch Shortcut 5 NON NLS 1 dialog set Multiple Selection false int result dialog open label Provider dispose if result Window OK return I Launch Configuration dialog get First Result return null  ILaunchConfiguration chooseConfig isEmpty ILabelProvider labelProvider DebugUITools newDebugModelPresentation ElementListSelectionDialog ElementListSelectionDialog getDefault getActiveShell labelProvider setElements toArray ILaunchConfiguration setTitle AntLaunchConfigurationMessages getString AntLaunchShortcut setMessage AntLaunchConfigurationMessages getString AntLaunchShortcut setMultipleSelection labelProvider ILaunchConfiguration getFirstResult
Verifies the mode is supported param mode return boolean protected boolean verify Mode String mode if mode equals I Launch Manager RUN MODE report Error Ant Launch Configuration Messages get String Ant Launch Shortcut 6 null NON NLS 1 return false return true  verifyMode ILaunchManager RUN_MODE reportError AntLaunchConfigurationMessages getString AntLaunchShortcut
see org eclipse debug ui I Launch Shortcut launch org eclipse ui I Editor Part java lang String public void launch I Editor Part editor String mode I Editor Input input editor get Editor Input I File file I File input get Adapter I File class if file null launch file mode return if input instanceof I Location Provider I Path file Path I Location Provider input get Path input if xml equals file Path get File Extension NON NLS 1 launch file Path mode null return ant File Not Found  ILaunchShortcut IEditorPart IEditorPart IEditorInput getEditorInput IFile IFile getAdapter IFile ILocationProvider IPath filePath ILocationProvider getPath filePath getFileExtension filePath antFileNotFound
protected static void report Error String message Throwable throwable I Status status null if throwable instanceof Core Exception status Core Exception throwable get Status else status new Status I Status ERROR I AntUI Constants PLUGIN ID 0 message throwable Error Dialog open Error AntUI Plugin get Active Workbench Window get Shell Ant Launch Configuration Messages get String Ant Launch Shortcut Error 7 Ant Launch Configuration Messages get String Ant Launch Shortcut Build Failed 2 status NON NLS 1 NON NLS 2  reportError IStatus CoreException CoreException getStatus IStatus IAntUIConstants PLUGIN_ID ErrorDialog openError AntUIPlugin getActiveWorkbenchWindow getShell AntLaunchConfigurationMessages getString AntLaunchShortcut Error_7 AntLaunchConfigurationMessages getString AntLaunchShortcut Build_Failed_2
Sets whether to show the external tools launch configuration dialog param show Dialog If true the launch configuration dialog will always be shown public void set Show Dialog boolean show Dialog f Show Dialog show Dialog  showDialog setShowDialog showDialog fShowDialog showDialog

Creates a new Ant launch shortcut that will open the launch configuration dialog public Ant Launch Shortcut With Dialog super set Show Dialog true  AntLaunchShortcutWithDialog setShowDialog

public void initialize From I Launch Configuration configuration super initialize From configuration try current Location configuration get Attribute I External Tool Constants ATTR LOCATION String null catch Core Exception e update Capture Output configuration  initializeFrom ILaunchConfiguration initializeFrom currentLocation getAttribute IExternalToolConstants ATTR_LOCATION CoreException updateCaptureOutput
public void perform Apply I Launch Configuration Working Copy configuration super perform Apply configuration try has the location changed String new Location configuration get Attribute I External Tool Constants ATTR LOCATION String null if new Location null if new Location equals current Location update Targets Tab current Location new Location else if current Location null update Targets Tab current Location new Location catch Core Exception e set Attribute I External Tool Constants ATTR CAPTURE OUTPUT configuration capture Output Button get Selection true  performApply ILaunchConfigurationWorkingCopy performApply newLocation getAttribute IExternalToolConstants ATTR_LOCATION newLocation newLocation currentLocation updateTargetsTab currentLocation newLocation currentLocation updateTargetsTab currentLocation newLocation CoreException setAttribute IExternalToolConstants ATTR_CAPTURE_OUTPUT captureOutputButton getSelection
public void create Control Composite parent Composite main Composite new Composite parent SWT NONE set Control main Composite Workbench Help set Help main Composite I AntUI Help Context Ids ANT MAIN TAB Grid Layout layout new Grid Layout layout num Columns 1 Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL main Composite set Layout layout main Composite set Layout Data grid Data main Composite set Font parent get Font create Location Component main Composite create Work Directory Component main Composite create Argument Component main Composite create Vertical Spacer main Composite 2 create Capture Output Component main Composite Dialog apply Dialog Font parent  createControl mainComposite setControl mainComposite WorkbenchHelp setHelp mainComposite IAntUIHelpContextIds ANT_MAIN_TAB GridLayout GridLayout numColumns GridData gridData GridData GridData FILL_HORIZONTAL mainComposite setLayout mainComposite setLayoutData gridData mainComposite setFont getFont createLocationComponent mainComposite createWorkDirectoryComponent mainComposite createArgumentComponent mainComposite createVerticalSpacer mainComposite createCaptureOutputComponent mainComposite applyDialogFont
capture Output Button set Layout Data data capture Output Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  captureOutputButton setLayoutData captureOutputButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
Creates the controls needed to edit the capture output attribute of an external tool param parent the composite to create the controls in protected void create Capture Output Component Composite parent capture Output Button create Check Button parent Ant Launch Configuration Messages get String Ant Main Tab Capture  output 1 NON NLS 1 Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL data horizontal Span 2 capture Output Button set Layout Data data capture Output Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  createCaptureOutputComponent captureOutputButton createCheckButton AntLaunchConfigurationMessages getString AntMainTab Capture_ output_1 GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan captureOutputButton setLayoutData captureOutputButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
protected void update Capture Output I Launch Configuration configuration boolean capture Output true try capture Output configuration get Attribute I External Tool Constants ATTR CAPTURE OUTPUT true catch Core Exception ce AntUI Plugin log External Tools Launch Configuration Messages get String External Tools Main Tab Error reading configuration 7 ce NON NLS 1 capture Output Button set Selection capture Output  updateCaptureOutput ILaunchConfiguration captureOutput captureOutput getAttribute IExternalToolConstants ATTR_CAPTURE_OUTPUT CoreException AntUIPlugin ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab Error_reading_configuration_7 captureOutputButton setSelection captureOutput
protected void handle Workspace Location Button Selected File Selection Dialog dialog dialog new File Selection Dialog get Shell Resources Plugin get Workspace get Root Ant Launch Configuration Messages get String Ant Main Tab Select a build file  1 NON NLS 1 dialog set File Filter xml true NON NLS 1 dialog open I Structured Selection result dialog get Result if result null return Object file result get First Element if file instanceof I File location Field set Text Variables Plugin get Default get String Variable Manager generate Variable Expression workspace loc I File file get Full Path to String NON NLS 1  handleWorkspaceLocationButtonSelected FileSelectionDialog FileSelectionDialog getShell ResourcesPlugin getWorkspace getRoot AntLaunchConfigurationMessages getString AntMainTab Select_a_build_file__1 setFileFilter IStructuredSelection getResult getFirstElement IFile locationField setText VariablesPlugin getDefault getStringVariableManager generateVariableExpression workspace_loc IFile getFullPath toString
see org eclipse ui externaltools internal launch Configurations External Tools Main Tab get Working Directory Label protected String get Working Directory Label return Ant Launch Configuration Messages get String Ant Main Tab Base  Directory  3 NON NLS 1  launchConfigurations ExternalToolsMainTab getWorkingDirectoryLabel getWorkingDirectoryLabel AntLaunchConfigurationMessages getString AntMainTab Base_ Directory__3
private void update Targets Tab the location has changed set the targets tab to need to be recomputed I Launch Configuration Tab tabs get Launch Configuration Dialog get Tabs for int i 0 i tabs length i I Launch Configuration Tab tab tabs i if tab instanceof Ant Targets Tab Ant Targets Tab tab set Dirty true break  updateTargetsTab ILaunchConfigurationTab getLaunchConfigurationDialog getTabs ILaunchConfigurationTab AntTargetsTab AntTargetsTab setDirty
see org eclipse ui externaltools internal launch Configurations External Tools Main Tab get Location Label protected String get Location Label return Ant Launch Configuration Messages get String Ant Main Tab 6 NON NLS 1  launchConfigurations ExternalToolsMainTab getLocationLabel getLocationLabel AntLaunchConfigurationMessages getString AntMainTab

public Ant Process String label I Launch launch Map attributes f Label label f Launch launch if attributes null f Attributes new Hash Map else f Attributes attributes launch add Process this  AntProcess ILaunch fLabel fLaunch fAttributes HashMap fAttributes addProcess
see org eclipse debug core model I Process get Label public String get Label return f Label  IProcess getLabel getLabel fLabel
see org eclipse debug core model I Process get Launch public I Launch get Launch return f Launch  IProcess getLaunch ILaunch getLaunch fLaunch
see org eclipse debug core model I Process get Streams Proxy public I Streams Proxy get Streams Proxy return f Proxy  IProcess getStreamsProxy IStreamsProxy getStreamsProxy fProxy
see org eclipse debug core model I Process set Attribute java lang String java lang String public void set Attribute String key String value f Attributes put key value  IProcess setAttribute setAttribute fAttributes
see org eclipse debug core model I Process get Attribute java lang String public String get Attribute String key return String f Attributes get key  IProcess getAttribute getAttribute fAttributes
see org eclipse debug core model I Process get Exit Value public int get Exit Value return 0  IProcess getExitValue getExitValue
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return null  IAdaptable getAdapter getAdapter
see org eclipse debug core model I Terminate can Terminate public boolean can Terminate return is Canceled is Terminated  ITerminate canTerminate canTerminate isCanceled isTerminated
see org eclipse debug core model I Terminate is Terminated public boolean is Terminated return f Terminated  ITerminate isTerminated isTerminated fTerminated
protected void terminated if f Terminated f Terminated true if Debug Plugin get Default null Debug Plugin get Default fire Debug Event Set new Debug Event new Debug Event this Debug Event TERMINATE  fTerminated fTerminated DebugPlugin getDefault DebugPlugin getDefault fireDebugEventSet DebugEvent DebugEvent DebugEvent
see org eclipse debug core model I Terminate terminate public void terminate set Canceled true  ITerminate setCanceled
Returns the console associated with this process or code null code if none return console or code null code public I Console get Console return f Console  IConsole getConsole fConsole
Sets the console associated with this process param console public void set Console I Console console f Console console  setConsole IConsole fConsole
see org eclipse core runtime I Progress Monitor begin Task java lang String int public void begin Task String name int total Work  IProgressMonitor beginTask beginTask totalWork
see org eclipse core runtime I Progress Monitor done public void done  IProgressMonitor
see org eclipse core runtime I Progress Monitor internal Worked double public void internal Worked double work  IProgressMonitor internalWorked internalWorked
see org eclipse core runtime I Progress Monitor is Canceled public boolean is Canceled return f Cancelled  IProgressMonitor isCanceled isCanceled fCancelled
see org eclipse core runtime I Progress Monitor set Canceled boolean public void set Canceled boolean value f Cancelled value  IProgressMonitor setCanceled setCanceled fCancelled
see org eclipse core runtime I Progress Monitor set Task Name java lang String public void set Task Name String name  IProgressMonitor setTaskName setTaskName
see org eclipse core runtime I Progress Monitor sub Task java lang String public void sub Task String name  IProgressMonitor subTask subTask
see org eclipse core runtime I Progress Monitor worked int public void worked int work  IProgressMonitor

public void create Control Composite parent Composite top new Composite parent SWT NONE top set Font parent get Font set Control top Workbench Help set Help get Control I AntUI Help Context Ids ANT PROPERTIES TAB Grid Layout layout new Grid Layout layout num Columns 2 top set Layout layout Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL top set Layout Data grid Data create Change Properties top ant Properties Block create Control top Ant Launch Configuration Messages get String Ant Properties Tab Properties  6 Ant Launch Configuration Messages get String Ant Properties Tab Property f iles  7 NON NLS 1 NON NLS 2  createControl setFont getFont setControl WorkbenchHelp setHelp getControl IAntUIHelpContextIds ANT_PROPERTIES_TAB GridLayout GridLayout numColumns setLayout GridData gridData GridData GridData FILL_HORIZONTAL setLayoutData gridData createChangeProperties antPropertiesBlock createControl AntLaunchConfigurationMessages getString AntPropertiesTab Properties__6 AntLaunchConfigurationMessages getString AntPropertiesTab Property_f iles__7
use Default Button create Check Button change Properties Ant Launch Configuration Messages get String Ant Properties Tab 6 NON NLS 1 use Default Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e toggle Use Default Properties update Launch Configuration Dialog  useDefaultButton createCheckButton changeProperties AntLaunchConfigurationMessages getString AntPropertiesTab useDefaultButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent toggleUseDefaultProperties updateLaunchConfigurationDialog
private void create Change Properties Composite top Font font top get Font Composite change Properties new Composite top SWT NONE change Properties set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 change Properties set Layout layout change Properties set Font font use Default Button create Check Button change Properties Ant Launch Configuration Messages get String Ant Properties Tab 6 NON NLS 1 use Default Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e toggle Use Default Properties update Launch Configuration Dialog  createChangeProperties getFont changeProperties changeProperties setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridLayout GridLayout marginHeight marginWidth changeProperties setLayout changeProperties setFont useDefaultButton createCheckButton changeProperties AntLaunchConfigurationMessages getString AntPropertiesTab useDefaultButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent toggleUseDefaultProperties updateLaunchConfigurationDialog
private void toggle Use Default Properties boolean enable use Default Button get Selection ant Properties Block set Enabled enable  toggleUseDefaultProperties useDefaultButton getSelection antPropertiesBlock setEnabled
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return AntUI Images get Image I AntUI Constants IMG PROPERTY  ILaunchConfigurationTab getImage getImage AntUIImages getImage IAntUIConstants IMG_PROPERTY
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Ant Launch Configuration Messages get String Ant Properties Tab P roperties 8 NON NLS 1  ILaunchConfigurationTab getName getName AntLaunchConfigurationMessages getString AntPropertiesTab roperties_8
see org eclipse debug ui I Launch Configuration Tab initialize From org eclipse debug core I Launch Configuration public void initialize From I Launch Configuration configuration set Error Message null set Message null Map properties null try properties configuration get Attribute I Ant Launch Configuration Constants ATTR ANT PROPERTIES Map null catch Core Exception ce AntUI Plugin log Ant Launch Configuration Messages get String Ant Properties Tab Error reading configuration 9 ce NON NLS 1 String property Files null try property Files configuration get Attribute I Ant Launch Configuration Constants ATTR ANT PROPERTY FILES String null catch Core Exception ce AntUI Plugin log Ant Launch Configuration Messages get String Ant Properties Tab Error reading configuration 9 ce NON NLS 1 if properties null property Files null ant Properties Block set Tables Enabled false use Default Button set Selection true else use Default Button set Selection false ant Properties Block populate Property Viewer properties String files Ant Util parse String property Files NON NLS 1 ant Properties Block set Property Files Input files toggle Use Default Properties  ILaunchConfigurationTab initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration setErrorMessage setMessage getAttribute IAntLaunchConfigurationConstants ATTR_ANT_PROPERTIES CoreException AntUIPlugin AntLaunchConfigurationMessages getString AntPropertiesTab Error_reading_configuration_9 propertyFiles propertyFiles getAttribute IAntLaunchConfigurationConstants ATTR_ANT_PROPERTY_FILES CoreException AntUIPlugin AntLaunchConfigurationMessages getString AntPropertiesTab Error_reading_configuration_9 propertyFiles antPropertiesBlock setTablesEnabled useDefaultButton setSelection useDefaultButton setSelection antPropertiesBlock populatePropertyViewer AntUtil parseString propertyFiles antPropertiesBlock setPropertyFilesInput toggleUseDefaultProperties
see org eclipse debug ui I Launch Configuration Tab perform Apply org eclipse debug core I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy configuration if use Default Button get Selection configuration set Attribute I Ant Launch Configuration Constants ATTR ANT PROPERTIES Map null configuration set Attribute I Ant Launch Configuration Constants ATTR ANT PROPERTY FILES String null return Object items ant Properties Block get Properties Map properties null if items length 0 properties new Hash Map items length for int i 0 i items length i Property property Property items i properties put property get Name property get Value false configuration set Attribute I Ant Launch Configuration Constants ATTR ANT PROPERTIES properties items ant Properties Block get Property Files String files null if items length 0 String Buffer buff new String Buffer for int i 0 i items length i String path String items i buff append path buff append files buff to String configuration set Attribute I Ant Launch Configuration Constants ATTR ANT PROPERTY FILES files  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy useDefaultButton getSelection setAttribute IAntLaunchConfigurationConstants ATTR_ANT_PROPERTIES setAttribute IAntLaunchConfigurationConstants ATTR_ANT_PROPERTY_FILES antPropertiesBlock getProperties HashMap getName getValue setAttribute IAntLaunchConfigurationConstants ATTR_ANT_PROPERTIES antPropertiesBlock getPropertyFiles StringBuffer StringBuffer toString setAttribute IAntLaunchConfigurationConstants ATTR_ANT_PROPERTY_FILES
see org eclipse debug ui I Launch Configuration Tab set Defaults org eclipse debug core I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy
see org eclipse ant internal ui preferences I Ant Block Container create Push Button org eclipse swt widgets Composite java lang String public void set Message String message super set Message message  IAntBlockContainer createPushButton setMessage setMessage
see org eclipse ant internal ui preferences I Ant Block Container create Push Button org eclipse swt widgets Composite java lang String public void set Error Message String message super set Error Message message  IAntBlockContainer createPushButton setErrorMessage setErrorMessage
see org eclipse ant internal ui preferences I Ant Block Container create Push Button org eclipse swt widgets Composite java lang String public Button create Push Button Composite parent String button Text return super create Push Button parent button Text null  IAntBlockContainer createPushButton createPushButton buttonText createPushButton buttonText
see org eclipse ant internal ui preferences I Ant Block Container create Push Button org eclipse swt widgets Composite java lang String public void update update Targets Tab update Launch Configuration Dialog  IAntBlockContainer createPushButton updateTargetsTab updateLaunchConfigurationDialog
private void update Targets Tab the properties have changed set the targets tab to need to be recomputed I Launch Configuration Tab tabs get Launch Configuration Dialog get Tabs for int i 0 i tabs length i I Launch Configuration Tab tab tabs i if tab instanceof Ant Targets Tab Ant Targets Tab tab set Dirty true break  updateTargetsTab ILaunchConfigurationTab getLaunchConfigurationDialog getTabs ILaunchConfigurationTab AntTargetsTab AntTargetsTab setDirty
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy

see org eclipse debug core model I Stream Monitor add Listener org eclipse debug core I Stream Listener public void add Listener I Stream Listener listener f Listeners add listener  IStreamMonitor addListener IStreamListener addListener IStreamListener fListeners
see org eclipse debug core model I Stream Monitor get Contents public String get Contents return f Contents to String  IStreamMonitor getContents getContents fContents toString
see org eclipse debug core model I Stream Monitor remove Listener org eclipse debug core I Stream Listener public void remove Listener I Stream Listener listener f Listeners remove listener  IStreamMonitor removeListener IStreamListener removeListener IStreamListener fListeners
Appends the given message to this stream and notifies listeners param message public void append String message if is Buffered f Contents append message Object listeners f Listeners get Listeners for int i 0 i listeners length i I Stream Listener listener I Stream Listener listeners i listener stream Appended message this  isBuffered fContents fListeners getListeners IStreamListener IStreamListener streamAppended
see org eclipse debug core model I Flushable Stream Monitor flush Contents public void flush Contents f Contents set Length 0  IFlushableStreamMonitor flushContents flushContents fContents setLength
see org eclipse debug core model I Flushable Stream Monitor is Buffered public boolean is Buffered return f Buffered  IFlushableStreamMonitor isBuffered isBuffered fBuffered
see org eclipse debug core model I Flushable Stream Monitor set Buffered boolean public void set Buffered boolean buffer f Buffered buffer  IFlushableStreamMonitor setBuffered setBuffered fBuffered

see org eclipse debug core model I Streams Proxy get Error Stream Monitor public I Stream Monitor get Error Stream Monitor return f Error Monitor  IStreamsProxy getErrorStreamMonitor IStreamMonitor getErrorStreamMonitor fErrorMonitor
see org eclipse debug core model I Streams Proxy get Output Stream Monitor public I Stream Monitor get Output Stream Monitor return f Output Monitor  IStreamsProxy getOutputStreamMonitor IStreamMonitor getOutputStreamMonitor fOutputMonitor
see org eclipse debug core model I Streams Proxy write java lang String public void write String input  IStreamsProxy
public I Stream Monitor get Warning Stream Monitor return f Warning Monitor  IStreamMonitor getWarningStreamMonitor fWarningMonitor
public I Stream Monitor get Debug Stream Monitor return f Debug Monitor  IStreamMonitor getDebugStreamMonitor fDebugMonitor
public I Stream Monitor get Verbose Stream Monitor return f Verbose Monitor  IStreamMonitor getVerboseStreamMonitor fVerboseMonitor

see org eclipse debug ui I Launch Configuration Tab Group create Tabs org eclipse debug ui I Launch Configuration Dialog java lang String public void create Tabs I Launch Configuration Dialog dialog String mode I Launch Configuration Tab tabs new I Launch Configuration Tab new Ant Main Tab new Refresh Tab new Ant Build Tab new Ant Targets Tab new Ant Classpath Tab new Ant Properties Tab new AntJRE Tab new Ant Environment Tab new Common Tab set Tabs tabs  ILaunchConfigurationTabGroup createTabs ILaunchConfigurationDialog createTabs ILaunchConfigurationDialog ILaunchConfigurationTab ILaunchConfigurationTab AntMainTab RefreshTab AntBuildTab AntTargetsTab AntClasspathTab AntPropertiesTab AntJRETab AntEnvironmentTab CommonTab setTabs
see org eclipse debug ui I Launch Configuration Tab Group set Defaults org eclipse debug core I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration set default name for script I Resource resource DebugUI Tools get Selected Resource if resource null resource instanceof I File I File file I File resource String extension file get File Extension if extension null extension equals Ignore Case xml NON NLS 1 String project Name file get Project get Name String Buffer buffer new String Buffer project Name buffer append buffer append file get Name String name buffer to String trim name Debug Plugin get Default get Launch Manager generate Unique Launch Configuration Name From name configuration rename name set the project name so that the correct default VM install can be determined configuration set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME project Name configuration set Attribute I External Tool Constants ATTR LOCATION Variables Plugin get Default get String Variable Manager generate Variable Expression workspace loc file get Full Path to String NON NLS 1 configuration set Attribute I Java Launch Configuration Constants ATTR CLASSPATH PROVIDER org eclipse ant ui Ant Classpath Provider NON NLS 1 super set Defaults configuration  ILaunchConfigurationTabGroup setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy IResource DebugUITools getSelectedResource IFile IFile IFile getFileExtension equalsIgnoreCase projectName getProject getName StringBuffer StringBuffer projectName getName toString DebugPlugin getDefault getLaunchManager generateUniqueLaunchConfigurationNameFrom setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME projectName setAttribute IExternalToolConstants ATTR_LOCATION VariablesPlugin getDefault getStringVariableManager generateVariableExpression workspace_loc getFullPath toString setAttribute IJavaLaunchConfigurationConstants ATTR_CLASSPATH_PROVIDER AntClasspathProvider setDefaults

private int f Num Total Targets 0 public void add Object o elements add o viewer add o  fNumTotalTargets
public void add All List list elements add All list viewer add list to Array  addAll addAll toArray
public void dispose 
public Object get Elements Object input Element f Num Total Targets elements size f Num Filtered Targets 0 if f Num Total Targets 0 return new Object 0 if f Filter Internal Targets return elements to Array new Object f Num Total Targets Iterator iter elements iterator while iter has Next if is Internal Target Info iter next f Num Filtered Targets Object targets new Object get Num Targets iter elements iterator int i 0 while iter has Next Target Info target Target Info iter next if is Internal target targets i target return targets  getElements inputElement fNumTotalTargets fNumFilteredTargets fNumTotalTargets fFilterInternalTargets toArray fNumTotalTargets hasNext isInternal TargetInfo fNumFilteredTargets getNumTargets hasNext TargetInfo TargetInfo isInternal
Returns whether the given target is an internal target Internal targets are targets which has no description The default target is never considered internal param target the target to examine return whether the given target is an internal target public boolean is Internal Target Info target return target is Default target get Description null  isInternal TargetInfo isDefault getDescription
public void input Changed Viewer new Viewer Object old Input Object new Input this viewer Table Viewer new Viewer elements clear if new Input null Object new Input length 0 elements add All Arrays as List Object new Input  inputChanged newViewer oldInput newInput TableViewer newViewer newInput newInput addAll asList newInput
Removes the given target from the list of targets Has no effect if the given target does not exist in the list param target the target to remove public void remove Target Object target elements remove target viewer remove target  removeTarget
Moves the given target up in the list of active targets Has no effect if the given target is already the first target in the list or the given index is invalid param index the index of the target to move up public void move Up Target int index Object target elements get index if index 0 target null return elements set index elements get index 1 elements set index 1 target  moveUpTarget
Moves the given target down in the list of active targets Has no effect if the given target is already the last target in the list or the given index is invalid param index the index of the target to move down public void move Down Target int index Object target elements get index if index elements size 1 target null return elements set index elements get index 1 elements set index 1 target  moveDownTarget
Returns the number of targets filtered out of the list of targets last returned by this content provider return the number of targets filtered out of the last request for targets public int get Num Filtered return f Num Filtered Targets  getNumFiltered fNumFilteredTargets
Returns the number of targets returned the last time this content provider was queried If targets were filtered out those targets are not included in this count return the number of targets returned the last time targets were requested public int get Num Targets return f Num Total Targets f Num Filtered Targets  getNumTargets fNumTotalTargets fNumFilteredTargets
Sets whether this content provider should filter out internal targets Internal targets are targets which have no description If set code true code targets with no description will not be returned when get Elements is called param filter sets whether internal targets should be filtered out public void set Filter Internal Targets boolean filter f Filter Internal Targets filter  getElements setFilterInternalTargets fFilterInternalTargets

private class Ant Targets Sorter extends Viewer Sorter see org eclipse jface viewers Viewer Sorter compare org eclipse jface viewers Viewer java lang Object java lang Object public int compare Viewer viewer Object e1 Object e2 if e1 instanceof Target Info e2 instanceof Target Info return super compare viewer e1 e2 if f Sort Direction SORT NONE return 0 String string1 string2 int result 0 if f Sort Direction SORT NAME f Sort Direction SORT NAME REVERSE string1 Target Info e1 get Name string2 Target Info e2 get Name else string1 Target Info e1 get Description string2 Target Info e2 get Description if string1 null string2 null result get Collator compare string1 string2 else if string1 null result 1 else if string2 null result 1 if f Sort Direction 0 reverse sort if result 0 result 1 else result result return result  AntTargetsSorter ViewerSorter ViewerSorter TargetInfo TargetInfo fSortDirection SORT_NONE fSortDirection SORT_NAME fSortDirection SORT_NAME_REVERSE TargetInfo getName TargetInfo getName TargetInfo getDescription TargetInfo getDescription getCollator fSortDirection
public void create Control Composite parent Font font parent get Font Composite comp new Composite parent SWT NONE set Control comp Workbench Help set Help get Control I AntUI Help Context Ids ANT TARGETS TAB Grid Layout top Layout new Grid Layout comp set Layout top Layout Grid Data gd new Grid Data Grid Data FILL BOTH comp set Layout Data gd comp set Font font create Targets Table comp create Selection Count comp Composite button Composite new Composite comp SWT NONE Grid Layout layout new Grid Layout layout vertical Spacing 0 layout margin Height 0 layout margin Width 0 button Composite set Layout layout button Composite set Font font create Sort Targets button Composite create Filter Internal Targets button Composite create Vertical Spacer comp 1 create Target Order comp Dialog apply Dialog Font parent  createControl getFont setControl WorkbenchHelp setHelp getControl IAntUIHelpContextIds ANT_TARGETS_TAB GridLayout topLayout GridLayout setLayout topLayout GridData GridData GridData FILL_BOTH setLayoutData setFont createTargetsTable createSelectionCount buttonComposite GridLayout GridLayout verticalSpacing marginHeight marginWidth buttonComposite setLayout buttonComposite setFont createSortTargets buttonComposite createFilterInternalTargets buttonComposite createVerticalSpacer createTargetOrder applyDialogFont
Creates the selection count widget param parent the parent composite private void create Selection Count Composite parent f Selection Count Label new Label parent SWT NONE f Selection Count Label set Font parent get Font f Selection Count Label set Text Ant Launch Configuration Messages get String Ant Targets Tab 0 out of 0 selected 2 NON NLS 1 Grid Data gd new Grid Data Grid Data FILL HORIZONTAL f Selection Count Label set Layout Data gd  createSelectionCount fSelectionCountLabel fSelectionCountLabel setFont getFont fSelectionCountLabel setText AntLaunchConfigurationMessages getString AntTargetsTab 0_out_of_0_selected_2 GridData GridData GridData FILL_HORIZONTAL fSelectionCountLabel setLayoutData
f Order Button set Font font f Order Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Order Pressed  fOrderButton setFont fOrderButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleOrderPressed
Creates the widgets that display the target order param parent the parent composite private void create Target Order Composite parent Font font parent get Font Label label new Label parent SWT NONE label set Text Ant Launch Configuration Messages get String Ant Targets Tab Target execution order  3 NON NLS 1 label set Font font Composite order Composite new Composite parent SWT NONE Grid Data gd new Grid Data Grid Data FILL HORIZONTAL order Composite set Layout Data gd Grid Layout layout new Grid Layout 2 false layout margin Height 0 layout margin Width 0 order Composite set Layout layout order Composite set Font font f Target Order Text new Text order Composite SWT MULTI SWT WRAP SWT BORDER SWT V SCROLL SWT READ ONLY f Target Order Text set Font font gd new Grid Data Grid Data FILL HORIZONTAL gd height Hint 40 gd width Hint I Dialog Constants ENTRY FIELD WIDTH f Target Order Text set Layout Data gd f Order Button create Push Button order Composite Ant Launch Configuration Messages get String Ant Targets Tab Order  4 null NON NLS 1 gd Grid Data f Order Button get Layout Data gd vertical Alignment Grid Data BEGINNING f Order Button set Font font f Order Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Order Pressed  createTargetOrder getFont setText AntLaunchConfigurationMessages getString AntTargetsTab Target_execution_order__3 setFont orderComposite GridData GridData GridData FILL_HORIZONTAL orderComposite setLayoutData GridLayout GridLayout marginHeight marginWidth orderComposite setLayout orderComposite setFont fTargetOrderText orderComposite V_SCROLL READ_ONLY fTargetOrderText setFont GridData GridData FILL_HORIZONTAL heightHint widthHint IDialogConstants ENTRY_FIELD_WIDTH fTargetOrderText setLayoutData fOrderButton createPushButton orderComposite AntLaunchConfigurationMessages getString AntTargetsTab _4 GridData fOrderButton getLayoutData verticalAlignment GridData fOrderButton setFont fOrderButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleOrderPressed
f Filter Internal Targets create Check Button parent Ant Launch Configuration Messages get String Ant Targets Tab 12 NON NLS 1 f Filter Internal Targets add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Filter Targets Selected  fFilterInternalTargets createCheckButton AntLaunchConfigurationMessages getString AntTargetsTab fFilterInternalTargets addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleFilterTargetsSelected
Creates the toggle to filter internal targets from the table param parent the parent composite private void create Filter Internal Targets Composite parent f Filter Internal Targets create Check Button parent Ant Launch Configuration Messages get String Ant Targets Tab 12 NON NLS 1 f Filter Internal Targets add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Filter Targets Selected  createFilterInternalTargets fFilterInternalTargets createCheckButton AntLaunchConfigurationMessages getString AntTargetsTab fFilterInternalTargets addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleFilterTargetsSelected
f Sort Button create Check Button parent Ant Launch Configuration Messages get String Ant Targets Tab 14 NON NLS 1 f Sort Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Sort Targets Selected  fSortButton createCheckButton AntLaunchConfigurationMessages getString AntTargetsTab fSortButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSortTargetsSelected
Creates the toggle to sort targets in the table param parent the parent composite private void create Sort Targets Composite parent f Sort Button create Check Button parent Ant Launch Configuration Messages get String Ant Targets Tab 14 NON NLS 1 f Sort Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Sort Targets Selected  createSortTargets fSortButton createCheckButton AntLaunchConfigurationMessages getString AntTargetsTab fSortButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSortTargetsSelected
The filter targets button has been toggled If it s been turned on filter out internal targets Else restore internal targets to the table private void handle Filter Targets Selected boolean filter f Filter Internal Targets get Selection f Target Content Provider set Filter Internal Targets filter if filter List Iterator iter f Ordered Targets list Iterator while iter has Next Target Info target Target Info iter next if f Target Content Provider is Internal target iter remove f Table Viewer refresh Must refresh before updating selection count because the selection count s hidden reporting needs the content provider to be queried first to count how many targets are hidden update Selection Count update Launch Configuration Dialog  handleFilterTargetsSelected fFilterInternalTargets getSelection fTargetContentProvider setFilterInternalTargets ListIterator fOrderedTargets listIterator hasNext TargetInfo TargetInfo fTargetContentProvider isInternal fTableViewer updateSelectionCount updateLaunchConfigurationDialog
The button to sort targets has been toggled Set the tab s sorting as appropriate private void handle Sort Targets Selected set Sort f Sort Button get Selection SORT NAME SORT NONE  handleSortTargetsSelected setSort fSortButton getSelection SORT_NAME SORT_NONE
Sets the sorting of targets in this tab See the sort constants defined above param column the column which should be sorted on private void set Sort int column f Sort Direction column f Table Viewer refresh if f Initializing update Launch Configuration Dialog  setSort fSortDirection fTableViewer fInitializing updateLaunchConfigurationDialog
The target order button has been pressed Prompt the user to reorder the selected targets private void handle Order Pressed Target Order Dialog dialog new Target Order Dialog get Shell f Ordered Targets to Array int ok dialog open if ok Window OK f Ordered Targets clear Object targets dialog get Targets for int i 0 i targets length i f Ordered Targets add targets i update Selection Count update Launch Configuration Dialog  handleOrderPressed TargetOrderDialog TargetOrderDialog getShell fOrderedTargets toArray fOrderedTargets getTargets fOrderedTargets updateSelectionCount updateLaunchConfigurationDialog
f Table Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event I Selection selection event get Selection if selection is Empty selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection Object element ss get First Element boolean checked f Table Viewer get Checked element f Table Viewer set Checked element checked update Ordered Targets element checked  fTableViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent ISelection getSelection isEmpty IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement fTableViewer getChecked fTableViewer setChecked updateOrderedTargets
f Table Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event update Ordered Targets event get Element event get Checked  fTableViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent updateOrderedTargets getElement getChecked
columns index add Selection Listener new Selection Adapter public void widget Selected Selection Event e if f Sort Button get Selection index 0 sort name 1 index 1 sort description 2 int column index 1 if column f Sort Direction column column invert the sort when the same column is selected twice in a row set Sort column  addSelectionListener SelectionAdapter widgetSelected SelectionEvent fSortButton getSelection sort_name sort_description fSortDirection setSort
Creates the table which displays the available targets param parent the parent composite private void create Targets Table Composite parent Font font parent get Font Label label new Label parent SWT NONE label set Font font label set Text Ant Launch Configuration Messages get String Ant Targets Tab Check targets to e xecute  1 NON NLS 1 Table table new Table parent SWT CHECK SWT BORDER SWT FULL SELECTION SWT RESIZE Grid Data data new Grid Data Grid Data FILL BOTH int available Rows available Rows parent data height Hint table get Item Height available Rows 20 data width Hint 250 table set Layout Data data table set Font font table set Header Visible true table set Lines Visible true Table Layout table Layout new Table Layout Column Weight Data weight Data new Column Weight Data 30 true table Layout add Column Data weight Data weight Data new Column Weight Data 70 true table Layout add Column Data weight Data table set Layout table Layout Table Column column1 new Table Column table SWT NULL column1 set Text Ant Launch Configuration Messages get String Ant Targets Tab Name 5 NON NLS 1 Table Column column2 new Table Column table SWT NULL column2 set Text Ant Launch Configuration Messages get String Ant Targets Tab Description 6 NON NLS 1 f Table Viewer new Checkbox Table Viewer table f Table Viewer set Label Provider new Target Table Label Provider f Target Content Provider new Ant Target Content Provider f Table Viewer set Content Provider f Target Content Provider f Table Viewer set Sorter new Ant Targets Sorter f Table Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event I Selection selection event get Selection if selection is Empty selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection Object element ss get First Element boolean checked f Table Viewer get Checked element f Table Viewer set Checked element checked update Ordered Targets element checked f Table Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event update Ordered Targets event get Element event get Checked Table Column columns f Table Viewer get Table get Columns for int i 0 i columns length i final int index i columns index add Selection Listener new Selection Adapter public void widget Selected Selection Event e if f Sort Button get Selection index 0 sort name 1 index 1 sort description 2 int column index 1 if column f Sort Direction column column invert the sort when the same column is selected twice in a row set Sort column  createTargetsTable getFont setFont setText AntLaunchConfigurationMessages getString AntTargetsTab Check_targets_to_e xecute__1 FULL_SELECTION GridData GridData GridData FILL_BOTH availableRows availableRows heightHint getItemHeight availableRows widthHint setLayoutData setFont setHeaderVisible setLinesVisible TableLayout tableLayout TableLayout ColumnWeightData weightData ColumnWeightData tableLayout addColumnData weightData weightData ColumnWeightData tableLayout addColumnData weightData setLayout tableLayout TableColumn TableColumn setText AntLaunchConfigurationMessages getString AntTargetsTab Name_5 TableColumn TableColumn setText AntLaunchConfigurationMessages getString AntTargetsTab Description_6 fTableViewer CheckboxTableViewer fTableViewer setLabelProvider TargetTableLabelProvider fTargetContentProvider AntTargetContentProvider fTableViewer setContentProvider fTargetContentProvider fTableViewer setSorter AntTargetsSorter fTableViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent ISelection getSelection isEmpty IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement fTableViewer getChecked fTableViewer setChecked updateOrderedTargets fTableViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent updateOrderedTargets getElement getChecked TableColumn fTableViewer getTable getColumns addSelectionListener SelectionAdapter widgetSelected SelectionEvent fSortButton getSelection sort_name sort_description fSortDirection setSort
Return the number of rows available in the current display using the current font param parent The Composite whose Font will be queried return int The result of the display size divided by the font size private int available Rows Composite parent int font Height parent get Font get Font Data 0 get Height int display Height parent get Display get Client Area height return display Height font Height  availableRows fontHeight getFont getFontData getHeight displayHeight getDisplay getClientArea displayHeight fontHeight
Updates the ordered targets list in response to an element being checked or unchecked When the element is checked it s added to the list When unchecked it s removed param element the element in question param checked whether the element has been checked or unchecked private void update Ordered Targets Object element boolean checked if checked f Ordered Targets add element else f Ordered Targets remove element update Selection Count update Launch Configuration Dialog  updateOrderedTargets fOrderedTargets fOrderedTargets updateSelectionCount updateLaunchConfigurationDialog
Updates the selection count widget to display how many targets are selected example 1 out of 6 selected private void update Selection Count Object checked f Table Viewer get Checked Elements String num Selected Integer to String checked length int length f Target Content Provider get Num Targets String total Integer to String length int num Hidden f Target Content Provider get Num Filtered if num Hidden 0 f Selection Count Label set Text Message Format format Ant Launch Configuration Messages get String Ant Targets Tab 13 new String num Selected total String value Of num Hidden NON NLS 1 else f Selection Count Label set Text Message Format format Ant Launch Configuration Messages get String Ant Targets Tab 0  out of  1  selected 7 new String num Selected total NON NLS 1 f Order Button set Enabled checked length 1 String Buffer buffer new String Buffer Iterator iter f Ordered Targets iterator while iter has Next buffer append Target Info iter next get Name buffer append NON NLS 1 if buffer length 2 remove trailing comma buffer set Length buffer length 2 f Target Order Text set Text buffer to String  updateSelectionCount fTableViewer getCheckedElements numSelected toString fTargetContentProvider getNumTargets toString numHidden fTargetContentProvider getNumFiltered numHidden fSelectionCountLabel setText MessageFormat AntLaunchConfigurationMessages getString AntTargetsTab numSelected valueOf numHidden fSelectionCountLabel setText MessageFormat AntLaunchConfigurationMessages getString AntTargetsTab _out_of_ _selected_7 numSelected fOrderButton setEnabled StringBuffer StringBuffer fOrderedTargets hasNext TargetInfo getName setLength fTargetOrderText setText toString
public void run I Progress Monitor monitor try f All Targets Ant Util get Targets expanded Location arguments f Launch Configuration catch Core Exception ce exceptions 0 ce  IProgressMonitor fAllTargets AntUtil getTargets expandedLocation fLaunchConfiguration CoreException
Returns all targets in the buildfile return all targets in the buildfile private Target Info get Targets if f All Targets null is Dirty f All Targets null set Dirty false set Error Message null set Message null final String expanded Location validate Location if expanded Location null return f All Targets final Core Exception exceptions new Core Exception 1 try final String arguments Ant Util parse String f Launch Configuration get Attribute I External Tool Constants ATTR TOOL ARGUMENTS String null NON NLS 1 I Runnable With Progress operation new I Runnable With Progress non Javadoc see org eclipse jface operation I Runnable With Progress run org eclipse core runtime I Progress Monitor public void run I Progress Monitor monitor try f All Targets Ant Util get Targets expanded Location arguments f Launch Configuration catch Core Exception ce exceptions 0 ce I Runnable Context context PlatformUI get Workbench get Active Workbench Window if context null context get Launch Configuration Dialog I Scheduling Rule rule null if Resources Plugin get Workspace is Tree Locked only set a scheduling rule if not in a resource change callback rule Ant Util get File For Location expanded Location null PlatformUI get Workbench get Progress Service run InUI context operation rule catch Core Exception ce exceptions 0 ce catch Invocation Target Exception e catch Interrupted Exception e if exceptions 0 null I Status exception Status exceptions 0 get Status I Status children exception Status get Children String Buffer message new String Buffer exceptions 0 get Message for int i 0 i children length i message append I Status child Status children i message append child Status get Message set Error Message message to String f All Targets null return f All Targets for int i 0 i f All Targets length i if f All Targets i is Default f Default Target f All Targets i break return f All Targets  TargetInfo getTargets fAllTargets isDirty fAllTargets setDirty setErrorMessage setMessage expandedLocation validateLocation expandedLocation fAllTargets CoreException CoreException AntUtil parseString fLaunchConfiguration getAttribute IExternalToolConstants ATTR_TOOL_ARGUMENTS IRunnableWithProgress IRunnableWithProgress IRunnableWithProgress IProgressMonitor IProgressMonitor fAllTargets AntUtil getTargets expandedLocation fLaunchConfiguration CoreException IRunnableContext getWorkbench getActiveWorkbenchWindow getLaunchConfigurationDialog ISchedulingRule ResourcesPlugin getWorkspace isTreeLocked AntUtil getFileForLocation expandedLocation getWorkbench getProgressService runInUI CoreException InvocationTargetException InterruptedException IStatus exceptionStatus getStatus IStatus exceptionStatus getChildren StringBuffer StringBuffer getMessage IStatus childStatus childStatus getMessage setErrorMessage toString fAllTargets fAllTargets fAllTargets fAllTargets isDefault fDefaultTarget fAllTargets fAllTargets
see org eclipse debug ui I Launch Configuration Tab set Defaults org eclipse debug core I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy
public void initialize From I Launch Configuration configuration f Initializing true f Launch Configuration configuration set Error Message null set Message null set Dirty true boolean hide Internal false try hide Internal f Launch Configuration get Attribute I Ant Launch Configuration Constants ATTR HIDE INTERNAL TARGETS false catch Core Exception e AntUI Plugin log e f Filter Internal Targets set Selection hide Internal f Target Content Provider set Filter Internal Targets hide Internal int sort SORT NONE try sort f Launch Configuration get Attribute I Ant Launch Configuration Constants ATTR SORT TARGETS sort catch Core Exception e AntUI Plugin log e f Sort Button set Selection sort SORT NONE set Sort sort String config Targets null String new Location null f Ordered Targets new Array List try config Targets configuration get Attribute I Ant Launch Configuration Constants ATTR ANT TARGETS String null new Location configuration get Attribute I External Tool Constants ATTR LOCATION String null catch Core Exception ce AntUI Plugin log Ant Launch Configuration Messages get String Ant Targets Tab Error reading configuration 12 ce NON NLS 1 if new Location null f All Targets null initialize For No Targets return Target Info all Infos get Targets if all Infos null initialize For No Targets return String target Names Ant Util parse Run Targets config Targets if target Names length 0 f Ordered Targets add f Default Target f Table Viewer set All Checked false set Execute Input all Infos if f Default Target null f Table Viewer set Checked f Default Target true update Selection Count update Launch Configuration Dialog f Initializing false return set Execute Input all Infos f Table Viewer set All Checked false for int i 0 i target Names length i for int j 0 j f All Targets length j if target Names i equals f All Targets j get Name f Ordered Targets add f All Targets j f Table Viewer set Checked f All Targets j true update Selection Count f Initializing false  initializeFrom ILaunchConfiguration fInitializing fLaunchConfiguration setErrorMessage setMessage setDirty hideInternal hideInternal fLaunchConfiguration getAttribute IAntLaunchConfigurationConstants ATTR_HIDE_INTERNAL_TARGETS CoreException AntUIPlugin fFilterInternalTargets setSelection hideInternal fTargetContentProvider setFilterInternalTargets hideInternal SORT_NONE fLaunchConfiguration getAttribute IAntLaunchConfigurationConstants ATTR_SORT_TARGETS CoreException AntUIPlugin fSortButton setSelection SORT_NONE setSort configTargets newLocation fOrderedTargets ArrayList configTargets getAttribute IAntLaunchConfigurationConstants ATTR_ANT_TARGETS newLocation getAttribute IExternalToolConstants ATTR_LOCATION CoreException AntUIPlugin AntLaunchConfigurationMessages getString AntTargetsTab Error_reading_configuration_12 newLocation fAllTargets initializeForNoTargets TargetInfo allInfos getTargets allInfos initializeForNoTargets targetNames AntUtil parseRunTargets configTargets targetNames fOrderedTargets fDefaultTarget fTableViewer setAllChecked setExecuteInput allInfos fDefaultTarget fTableViewer setChecked fDefaultTarget updateSelectionCount updateLaunchConfigurationDialog fInitializing setExecuteInput allInfos fTableViewer setAllChecked targetNames fAllTargets targetNames fAllTargets getName fOrderedTargets fAllTargets fTableViewer setChecked fAllTargets updateSelectionCount fInitializing
private void initialize For No Targets set Execute Input new Target Info 0 f Table Viewer set Input new Target Info 0 f Initializing false  initializeForNoTargets setExecuteInput TargetInfo fTableViewer setInput TargetInfo fInitializing
Sets the execute table s input to the given input private void set Execute Input Object input f Table Viewer set Input input update Selection Count  setExecuteInput fTableViewer setInput updateSelectionCount
public void perform Apply I Launch Configuration Working Copy configuration attribute added in 3 0 so null must be used instead of false for backwards compatibility if f Filter Internal Targets get Selection configuration set Attribute I Ant Launch Configuration Constants ATTR HIDE INTERNAL TARGETS true else configuration set Attribute I Ant Launch Configuration Constants ATTR HIDE INTERNAL TARGETS String null attribute added in 3 0 so null must be used instead of 0 for backwards compatibility if f Sort Direction SORT NONE configuration set Attribute I Ant Launch Configuration Constants ATTR SORT TARGETS f Sort Direction else configuration set Attribute I Ant Launch Configuration Constants ATTR SORT TARGETS String null if f Ordered Targets size 1 Target Info item Target Info f Ordered Targets get 0 if item is Default configuration set Attribute I Ant Launch Configuration Constants ATTR ANT TARGETS String null return else if f Ordered Targets size 0 configuration set Attribute I Ant Launch Configuration Constants ATTR ANT TARGETS String null return String Buffer buff new String Buffer Iterator iter f Ordered Targets iterator String targets null while iter has Next Target Info item Target Info iter next buff append item get Name buff append if buff length 0 targets buff to String configuration set Attribute I Ant Launch Configuration Constants ATTR ANT TARGETS targets  performApply ILaunchConfigurationWorkingCopy fFilterInternalTargets getSelection setAttribute IAntLaunchConfigurationConstants ATTR_HIDE_INTERNAL_TARGETS setAttribute IAntLaunchConfigurationConstants ATTR_HIDE_INTERNAL_TARGETS fSortDirection SORT_NONE setAttribute IAntLaunchConfigurationConstants ATTR_SORT_TARGETS fSortDirection setAttribute IAntLaunchConfigurationConstants ATTR_SORT_TARGETS fOrderedTargets TargetInfo TargetInfo fOrderedTargets isDefault setAttribute IAntLaunchConfigurationConstants ATTR_ANT_TARGETS fOrderedTargets setAttribute IAntLaunchConfigurationConstants ATTR_ANT_TARGETS StringBuffer StringBuffer fOrderedTargets hasNext TargetInfo TargetInfo getName toString setAttribute IAntLaunchConfigurationConstants ATTR_ANT_TARGETS
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Ant Launch Configuration Messages get String Ant Targets Tab Tar gets 14 NON NLS 1  ILaunchConfigurationTab getName getName AntLaunchConfigurationMessages getString AntTargetsTab gets_14
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return AntUI Images get Image I AntUI Constants IMG TAB ANT TARGETS  ILaunchConfigurationTab getImage getImage AntUIImages getImage IAntUIConstants IMG_TAB_ANT_TARGETS
public boolean is Valid I Launch Configuration launch Config if f All Targets null is Dirty if get Error Message null is Dirty error in parsing return false targets not up to date and no error message we have not parsed recently initialize From launch Config if get Error Message null error in parsing return false if f All Targets null f Table Viewer get Checked Elements length 0 set Error Message Ant Launch Configuration Messages get String Ant Targets Tab No targets NON NLS 1 return false set Error Message null return super is Valid launch Config  isValid ILaunchConfiguration launchConfig fAllTargets isDirty getErrorMessage isDirty initializeFrom launchConfig getErrorMessage fAllTargets fTableViewer getCheckedElements setErrorMessage AntLaunchConfigurationMessages getString AntTargetsTab No_targets setErrorMessage isValid launchConfig
see org eclipse debug ui Abstract Launch Configuration Tab set Dirty boolean protected void set Dirty boolean dirty provide package visibility super set Dirty dirty  AbstractLaunchConfigurationTab setDirty setDirty setDirty
public void activated I Launch Configuration Working Copy working Copy if is Dirty super activated working Copy  ILaunchConfigurationWorkingCopy workingCopy isDirty workingCopy
public void deactivated I Launch Configuration Working Copy working Copy if f Ordered Targets size 0 set the dirty flag so that the state will be reinitialized on activation set Dirty true  ILaunchConfigurationWorkingCopy workingCopy fOrderedTargets setDirty
private String validate Location String expanded Location null String location null I String Variable Manager manager Variables Plugin get Default get String Variable Manager try location f Launch Configuration get Attribute I External Tool Constants ATTR LOCATION String null if location null return null expanded Location manager perform String Substitution location if expanded Location null return null File file new File expanded Location if file exists set Error Message Ant Launch Configuration Messages get String Ant Targets Tab 15 NON NLS 1 return null if file is File set Error Message Ant Launch Configuration Messages get String Ant Targets Tab 16 NON NLS 1 return null return expanded Location catch Core Exception e1 if location null try manager validate String Variables location set Message Ant Launch Configuration Messages get String Ant Targets Tab 17 NON NLS 1 return null catch Core Exception e2 invalid variable set Error Message e2 get Status get Message return null set Error Message e1 get Status get Message return null  validateLocation expandedLocation IStringVariableManager VariablesPlugin getDefault getStringVariableManager fLaunchConfiguration getAttribute IExternalToolConstants ATTR_LOCATION expandedLocation performStringSubstitution expandedLocation expandedLocation setErrorMessage AntLaunchConfigurationMessages getString AntTargetsTab isFile setErrorMessage AntLaunchConfigurationMessages getString AntTargetsTab expandedLocation CoreException validateStringVariables setMessage AntLaunchConfigurationMessages getString AntTargetsTab CoreException setErrorMessage getStatus getMessage setErrorMessage getStatus getMessage

private String f Default Working Dir Path public String get Default Working Dir Path return f Default Working Dir Path  fDefaultWorkingDirPath getDefaultWorkingDirPath fDefaultWorkingDirPath
protected void set Default Working Dir if f Default Working Dir Path null super set Default Working Dir return f Working Dir Text set Text f Default Working Dir Path  setDefaultWorkingDir fDefaultWorkingDirPath setDefaultWorkingDir fWorkingDirText setText fDefaultWorkingDirPath
public void initialize From I Launch Configuration configuration set Launch Configuration configuration try try f Default Working Dir Path External Tools Util get Location configuration remove Last Segments 1 toOS String catch Core Exception e no location String wd configuration get Attribute I Java Launch Configuration Constants ATTR WORKING DIRECTORY String null NON NLS 1 f Working Dir Text set Text NON NLS 1 if wd null is Same As Default wd f Use Default Working Dir Button set Selection true else f Working Dir Text set Text wd f Use Default Working Dir Button set Selection false handle Use Default Working Dir Button Selected catch Core Exception e set Error Message Launcher Messages get String Java Arguments Tab Exception occurred reading configuration   15 e get Status get Message NON NLS 1 JDI DebugUI Plugin log e  initializeFrom ILaunchConfiguration setLaunchConfiguration fDefaultWorkingDirPath ExternalToolsUtil getLocation removeLastSegments toOSString CoreException getAttribute IJavaLaunchConfigurationConstants ATTR_WORKING_DIRECTORY fWorkingDirText setText isSameAsDefault fUseDefaultWorkingDirButton setSelection fWorkingDirText setText fUseDefaultWorkingDirButton setSelection handleUseDefaultWorkingDirButtonSelected CoreException setErrorMessage LauncherMessages getString JavaArgumentsTab Exception_occurred_reading_configuration___15 getStatus getMessage JDIDebugUIPlugin
private boolean is Same As Default String working Dir return working Dir null working Dir equals f Default Working Dir Path working Dir equals System get Property user dir NON NLS 1  isSameAsDefault workingDir workingDir workingDir fDefaultWorkingDirPath workingDir getProperty
see org eclipse debug ui I Launch Configuration Tab perform Apply org eclipse debug core I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy configuration String wd get Attribute Value From f Working Dir Text configuration set Attribute I Java Launch Configuration Constants ATTR WORKING DIRECTORY wd  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy getAttributeValueFrom fWorkingDirText setAttribute IJavaLaunchConfigurationConstants ATTR_WORKING_DIRECTORY
public void set Enabled boolean enabled f Use Default Working Dir Button set Enabled enabled boolean def is Default Working Directory f Use Default Working Dir Button set Selection def enabled enabled def f Working Dir Text set Enabled enabled f Workspace Button set Enabled enabled f File System Button set Enabled enabled f Variables Button set Enabled enabled  setEnabled fUseDefaultWorkingDirButton setEnabled isDefaultWorkingDirectory fUseDefaultWorkingDirButton setSelection fWorkingDirText setEnabled fWorkspaceButton setEnabled fFileSystemButton setEnabled fVariablesButton setEnabled

Default contructor required to instantiate persisted extensions public Contributed Classpath Entries Entry  ContributedClasspathEntriesEntry
see org eclipse jdt internal launching Abstract Runtime Classpath Entry build Memento org w3c dom Document org w3c dom Element protected void build Memento Document document Element memento throws Core Exception  AbstractRuntimeClasspathEntry buildMemento buildMemento CoreException
see org eclipse jdt internal launching I Runtime Classpath Entry2 initialize From org w3c dom Element public void initialize From Element memento throws Core Exception  IRuntimeClasspathEntry2 initializeFrom initializeFrom CoreException
see org eclipse jdt launching I Runtime Classpath Entry2 get Type Id public String get Type Id return TYPE ID  IRuntimeClasspathEntry2 getTypeId getTypeId TYPE_ID
public I Runtime Classpath Entry get Runtime Classpath Entries I Launch Configuration configuration throws Core Exception boolean separateVM null configuration get Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE String null Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences I Ant Classpath Entry ant Classpath Entries prefs get Contributed Classpath Entries I Ant Classpath Entry user Entries prefs get Additional Classpath Entries List rtes new Array List ant Classpath Entries length user Entries length I Ant Classpath Entry entry for int i 0 i ant Classpath Entries length i entry ant Classpath Entries i if separateVM separateVM entry is Eclipse Runtime Required rtes add Java Runtime new String Variable Classpath Entry entry get Label boolean have Tools Entry false String path for int i 0 i user Entries length i entry user Entries i path entry get Label if path ends With tools jar NON NLS 1 have Tools Entry true replace with dynamically resolved tools jar based on the JRE being used add Tools Jar configuration rtes path else rtes add Java Runtime new String Variable Classpath Entry path if have Tools Entry add Tools Jar configuration rtes null return I Runtime Classpath Entry rtes to Array new I Runtime Classpath Entry rtes size  IRuntimeClasspathEntry getRuntimeClasspathEntries ILaunchConfiguration CoreException getAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE AntCorePreferences AntCorePlugin getPlugin getPreferences IAntClasspathEntry antClasspathEntries getContributedClasspathEntries IAntClasspathEntry userEntries getAdditionalClasspathEntries ArrayList antClasspathEntries userEntries IAntClasspathEntry antClasspathEntries antClasspathEntries isEclipseRuntimeRequired JavaRuntime newStringVariableClasspathEntry getLabel haveToolsEntry userEntries userEntries getLabel endsWith haveToolsEntry addToolsJar JavaRuntime newStringVariableClasspathEntry haveToolsEntry addToolsJar IRuntimeClasspathEntry toArray IRuntimeClasspathEntry
private void add Tools Jar I Launch Configuration configuration List rtes String path I Runtime Classpath Entry tools get Tools Jar configuration if tools null if path null use the global entry rtes add Java Runtime new Archive Runtime Classpath Entry new Path path else use the default vm install to try to find a tools jar IVM Install install Java Runtime get DefaultVM Install if install null I Ant Classpath Entry entry Ant Core Plugin get Plugin get Preferences get Tools Jar Entry new Path install get Install Location get Absolute Path if entry null rtes add Java Runtime new Archive Runtime Classpath Entry new Path entry get EntryURL get Path else rtes add tools  addToolsJar ILaunchConfiguration IRuntimeClasspathEntry getToolsJar JavaRuntime newArchiveRuntimeClasspathEntry IVMInstall JavaRuntime getDefaultVMInstall IAntClasspathEntry AntCorePlugin getPlugin getPreferences getToolsJarEntry getInstallLocation getAbsolutePath JavaRuntime newArchiveRuntimeClasspathEntry getEntryURL getPath
Returns the tools jar to use for this launch configuration or code null code if none param configuration configuration to resolve a tools jar for return associated tools jar archive or code null code private I Runtime Classpath Entry get Tools Jar I Launch Configuration configuration try IVM Install install Java Runtime computeVM Install configuration if install null I Ant Classpath Entry entry Ant Core Plugin get Plugin get Preferences get Tools Jar Entry new Path install get Install Location get Absolute Path if entry null return Java Runtime new Archive Runtime Classpath Entry new Path entry get EntryURL get Path catch Core Exception ce likely dealing with a non Java project return null  IRuntimeClasspathEntry getToolsJar ILaunchConfiguration IVMInstall JavaRuntime computeVMInstall IAntClasspathEntry AntCorePlugin getPlugin getPreferences getToolsJarEntry getInstallLocation getAbsolutePath JavaRuntime newArchiveRuntimeClasspathEntry getEntryURL getPath CoreException
see org eclipse jdt launching I Runtime Classpath Entry2 get Name public String get Name return Ant Launch Configuration Messages get String Contributed Classpath Entries Entry 1 NON NLS 1  IRuntimeClasspathEntry2 getName getName AntLaunchConfigurationMessages getString ContributedClasspathEntriesEntry
see org eclipse jdt launching I Runtime Classpath Entry get Type public int get Type return I Runtime Classpath Entry OTHER  IRuntimeClasspathEntry getType getType IRuntimeClasspathEntry
see org eclipse jdt launching I Runtime Classpath Entry2 is Composite public boolean is Composite return true  IRuntimeClasspathEntry2 isComposite isComposite
see java lang Object equals java lang Object public boolean equals Object obj return obj instanceof Contributed Classpath Entries Entry  ContributedClasspathEntriesEntry
see java lang Object hash Code public int hash Code return get Class hash Code  hashCode hashCode getClass hashCode

private Ant Classpath Tab f Tab Constructs an action to edit the Ant Home setting for a launch config param viewer classpath viewer public Edit Ant Home Entry Action I Classpath Viewer viewer Ant Classpath Tab tab super Ant Launch Configuration Messages get String Edit Ant Home Entry Action 1 viewer NON NLS 1 f Tab tab  AntClasspathTab fTab EditAntHomeEntryAction IClasspathViewer AntClasspathTab AntLaunchConfigurationMessages getString EditAntHomeEntryAction fTab
public void run I Dialog Settings dialog Settings AntUI Plugin get Default get Dialog Settings String last Used Path dialog Settings get I AntUI Constants DIALOGSTORE LASTANTHOME if last Used Path null last Used Path Resources Plugin get Workspace get Root get Location toOS String Directory Dialog dialog new Directory Dialog get Shell dialog set Message Ant Preferences Messages get String Ant Classpath Block 3 NON NLS 1 dialog set Filter Path last Used Path String path dialog open if path null return dialog Settings put I AntUI Constants DIALOGSTORE LASTANTHOME path Ant Core Preferences preferences Ant Core Plugin get Plugin get Preferences String default Home preferences get Ant Home if path equals Ignore Case default Home path null f Tab set Dirty true update existing entry or add a new one I Runtime Classpath Entry entries get Viewer get Entries for int i 0 i entries length i I Runtime Classpath Entry entry entries i if entry get Type I Runtime Classpath Entry OTHER I Runtime Classpath Entry2 entry2 I Runtime Classpath Entry2 Classpath Entry entry get Delegate if entry2 get Type Id equals Ant Home Classpath Entry TYPE ID Ant Home Classpath Entry entry2 set Ant Home path get Viewer refresh entry get Viewer notify Changed return no entry found add a new one get Viewer add Entries new I Runtime Classpath Entry new Ant Home Classpath Entry path  IDialogSettings dialogSettings AntUIPlugin getDefault getDialogSettings lastUsedPath dialogSettings IAntUIConstants DIALOGSTORE_LASTANTHOME lastUsedPath lastUsedPath ResourcesPlugin getWorkspace getRoot getLocation toOSString DirectoryDialog DirectoryDialog getShell setMessage AntPreferencesMessages getString AntClasspathBlock setFilterPath lastUsedPath dialogSettings IAntUIConstants DIALOGSTORE_LASTANTHOME AntCorePreferences AntCorePlugin getPlugin getPreferences defaultHome getAntHome equalsIgnoreCase defaultHome fTab setDirty IRuntimeClasspathEntry getViewer getEntries IRuntimeClasspathEntry getType IRuntimeClasspathEntry IRuntimeClasspathEntry2 IRuntimeClasspathEntry2 ClasspathEntry getDelegate getTypeId AntHomeClasspathEntry TYPE_ID AntHomeClasspathEntry setAntHome getViewer getViewer notifyChanged getViewer addEntries IRuntimeClasspathEntry AntHomeClasspathEntry
see Selection Listener Action update Selection I Structured Selection protected boolean update Selection I Structured Selection selection return true  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection

public class Remote Ant Build Listener implements I Launches Listener public abstract class Listener Safe Runnable implements I Safe Runnable public void handle Exception Throwable exception AntUI Plugin log exception  RemoteAntBuildListener ILaunchesListener ListenerSafeRunnable ISafeRunnable handleException AntUIPlugin
private int f Server Port public Server Connection int port super Ant Build Server Connection NON NLS 1 f Server Port port  fServerPort ServerConnection fServerPort
public void run try if f Debug System out println Creating server socket f Server Port NON NLS 1 f Server Socket new Server Socket f Server Port f Socket f Server Socket accept if f Debug System out println Connection NON NLS 1 f Buffered Reader new Buffered Reader new Input Stream Reader f Socket get Input Stream String message while f Buffered Reader null message f Buffered Reader read Line null receive Message message catch Socket Exception e catch IO Exception e fall through shut Down  fDebug fServerPort fServerSocket ServerSocket fServerPort fSocket fServerSocket fDebug fBufferedReader BufferedReader InputStreamReader fSocket getInputStream fBufferedReader fBufferedReader readLine receiveMessage SocketException IOException shutDown
public Remote Ant Build Listener I Launch launch super f Launch launch Debug Plugin get Default get Launch Manager add Launch Listener this  RemoteAntBuildListener ILaunch fLaunch DebugPlugin getDefault getLaunchManager addLaunchListener
Start listening to an Ant build Start a server connection that the Remote Ant Build Logger can connect to param port The port number to create the server connection on public synchronized void start Listening int port f Port port Server Connection connection new Server Connection port connection start  RemoteAntBuildLogger startListening fPort ServerConnection ServerConnection
private synchronized void shut Down if f Debug System out println shutdown f Port NON NLS 1 f Launch null Debug Plugin get Default get Launch Manager remove Launch Listener this try if f Buffered Reader null f Buffered Reader close f Buffered Reader null catch IO Exception e try if f Socket null f Socket close f Socket null catch IO Exception e try if f Server Socket null f Server Socket close f Server Socket null catch IO Exception e  shutDown fDebug fPort fLaunch DebugPlugin getDefault getLaunchManager removeLaunchListener fBufferedReader fBufferedReader fBufferedReader IOException fSocket fSocket fSocket IOException fServerSocket fServerSocket fServerSocket IOException
private void receive Message String message if f Debug System out println message if message starts With Message Ids TASK message message substring Message Ids TASK length int index message index Of int priority Integer parse Int message substring 0 index int index2 message index Of index 1 String task Name message substring index 1 index2 int index3 message index Of index2 1 int line Length Integer parse Int message substring index2 1 index3 int final Index index3 1 line Length String line message substring index3 1 final Index String location message substring final Index 1 int size I AntUI Constants LEFT COLUMN SIZE task Name length 3 int offset Math max size 2 1 int length I AntUI Constants LEFT COLUMN SIZE size 3 I Console Hyperlink task Link Ant Util get Task Link location f Build File Parent if task Link null Task Link Manager add Task Hyperlink get Process task Link new Region offset length line String Buffer full Message new String Buffer adorn Message task Name line full Message write Message full Message append System get Property line separator to String priority NON NLS 1 else if message starts With Message Ids PROCESS ID message message substring Message Ids PROCESS ID length f Process Id message else int index message index Of if index 0 int priority Integer parse Int message substring 0 index message message substring index 1 write Message message System get Property line separator priority NON NLS 1  receiveMessage fDebug startsWith MessageIds MessageIds indexOf parseInt indexOf taskName indexOf lineLength parseInt finalIndex lineLength finalIndex finalIndex IAntUIConstants LEFT_COLUMN_SIZE taskName IAntUIConstants LEFT_COLUMN_SIZE IConsoleHyperlink taskLink AntUtil getTaskLink fBuildFileParent taskLink TaskLinkManager addTaskHyperlink getProcess taskLink StringBuffer fullMessage StringBuffer adornMessage taskName fullMessage writeMessage fullMessage getProperty toString startsWith MessageIds PROCESS_ID MessageIds PROCESS_ID fProcessId indexOf parseInt writeMessage getProperty
Returns the associated process finding it if necessary private I Process get Process if f Process null f Process Id null I Process all Debug Plugin get Default get Launch Manager get Processes for int i 0 i all length i I Process process all i if f Process Id equals process get Attribute Ant Process ATTR ANT PROCESS ID f Process process break return f Process  IProcess getProcess fProcess fProcessId IProcess DebugPlugin getDefault getLaunchManager getProcesses IProcess fProcessId getAttribute AntProcess ATTR_ANT_PROCESS_ID fProcess fProcess
private Ant Stream Monitor get Monitor int priority I Process process get Process if process null return null Ant Streams Proxy proxy Ant Streams Proxy process get Streams Proxy if proxy null return null Ant Stream Monitor monitor null switch priority case Project MSG INFO monitor Ant Stream Monitor proxy get Output Stream Monitor break case Project MSG ERR monitor Ant Stream Monitor proxy get Error Stream Monitor break case Project MSG DEBUG monitor Ant Stream Monitor proxy get Debug Stream Monitor break case Project MSG WARN monitor Ant Stream Monitor proxy get Warning Stream Monitor break case Project MSG VERBOSE monitor Ant Stream Monitor proxy get Verbose Stream Monitor break return monitor  AntStreamMonitor getMonitor IProcess getProcess AntStreamsProxy AntStreamsProxy getStreamsProxy AntStreamMonitor MSG_INFO AntStreamMonitor getOutputStreamMonitor MSG_ERR AntStreamMonitor getErrorStreamMonitor MSG_DEBUG AntStreamMonitor getDebugStreamMonitor MSG_WARN AntStreamMonitor getWarningStreamMonitor MSG_VERBOSE AntStreamMonitor getVerboseStreamMonitor
Builds a right justified task prefix for the given build event placing it in the given string buffer param event build event param full Message buffer to place task prefix in private void adorn Message String task Name String line String Buffer full Message if task Name null task Name null NON NLS 1 int size I AntUI Constants LEFT COLUMN SIZE task Name length 6 for int i 0 i size i full Message append full Message append line  fullMessage adornMessage taskName StringBuffer fullMessage taskName taskName IAntUIConstants LEFT_COLUMN_SIZE taskName fullMessage fullMessage
private void write Message String message int priority Ant Stream Monitor monitor get Monitor priority if monitor null if f Message Queue null f Message Queue new Array List f Message Queue add message return if f Message Queue null for Iterator iter f Message Queue iterator iter has Next String old Message String iter next monitor append old Message f Message Queue null monitor append message  writeMessage AntStreamMonitor getMonitor fMessageQueue fMessageQueue ArrayList fMessageQueue fMessageQueue fMessageQueue hasNext oldMessage oldMessage fMessageQueue
see org eclipse debug core I Launches Listener launches Added org eclipse debug core I Launch public void launches Added I Launch launches  ILaunchesListener launchesAdded ILaunch launchesAdded ILaunch
see org eclipse debug core I Launches Listener launches Changed org eclipse debug core I Launch public void launches Changed I Launch launches  ILaunchesListener launchesChanged ILaunch launchesChanged ILaunch
public void launches Removed I Launch launches for int i 0 i launches length i I Launch launch launches i if launch equals f Launch shut Down return  launchesRemoved ILaunch ILaunch fLaunch shutDown

public I Process new Process I Launch launch Process process String label Map attributes if attributes null attributes new Hash Map 1 attributes put I Process ATTR PROCESS TYPE I Ant Launch Configuration Constants ID ANT PROCESS TYPE return new Remote Ant Runtime Process launch process label attributes  IProcess newProcess ILaunch HashMap IProcess ATTR_PROCESS_TYPE IAntLaunchConfigurationConstants ID_ANT_PROCESS_TYPE RemoteAntRuntimeProcess

Constructs a Runtime Process on the given system process with the given name adding this process to the given launch Sets the streams proxy to an Ant Streams Proxy public Remote Ant Runtime Process I Launch launch Process process String name Map attributes super launch process name attributes  RuntimeProcess AntStreamsProxy RemoteAntRuntimeProcess ILaunch
see org eclipse debug internal core Runtime Process create Streams Proxy protected I Streams Proxy create Streams Proxy return new Ant Streams Proxy  RuntimeProcess createStreamsProxy IStreamsProxy createStreamsProxy AntStreamsProxy

see org eclipse debug core I Status Handler handle Status org eclipse core runtime I Status java lang Object public Object handle Status I Status status Object source I Launch Configuration Dialog dialog I Launch Configuration Dialog source dialog set Active Tab 3 return null  IStatusHandler handleStatus IStatus handleStatus IStatus ILaunchConfigurationDialog ILaunchConfigurationDialog setActiveTab

Constructs the dialog param parent Shell public Target Order Dialog Shell parent Shell Object targets super parent Shell f Targets targets  parentShell TargetOrderDialog parentShell parentShell fTargets
protected Control create Dialog Area Composite parent get Shell set Text Ant Launch Configuration Messages get String Target Order Dialog Order Targets 1 NON NLS 1 Composite comp Composite super create Dialog Area parent Grid Layout comp get Layout num Columns 2 Label label new Label comp SWT NONE label set Text Ant Launch Configuration Messages get String Target Order Dialog Specify target execution order  2 NON NLS 1 label set Font comp get Font Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 label set Layout Data gd create Target List comp create Buttons comp update Buttons return comp  createDialogArea getShell setText AntLaunchConfigurationMessages getString TargetOrderDialog Order_Targets_1 createDialogArea GridLayout getLayout numColumns setText AntLaunchConfigurationMessages getString TargetOrderDialog Specify_target_execution_order__2 setFont getFont GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData createTargetList createButtons updateButtons
Create button area buttons param comp private void create Buttons Composite parent Composite comp new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd vertical Alignment Grid Data BEGINNING comp set Layout layout comp set Layout Data gd f Up new Button comp SWT PUSH f Up set Font parent get Font f Up set Text Ant Launch Configuration Messages get String Target Order Dialog Up 3 NON NLS 1 set Button Layout Data f Up f Up add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Up Pressed f Down new Button comp SWT PUSH f Down set Font parent get Font f Down set Text Ant Launch Configuration Messages get String Target Order Dialog Down 4 NON NLS 1 set Button Layout Data f Down f Down add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Down Pressed  createButtons GridLayout GridLayout marginHeight marginWidth GridData GridData GridData HORIZONTAL_ALIGN_FILL verticalAlignment GridData setLayout setLayoutData fUp fUp setFont getFont fUp setText AntLaunchConfigurationMessages getString TargetOrderDialog Up_3 setButtonLayoutData fUp fUp addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleUpPressed fDown fDown setFont getFont fDown setText AntLaunchConfigurationMessages getString TargetOrderDialog Down_4 setButtonLayoutData fDown fDown addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleDownPressed
private void handle Down Pressed List targets get Ordered Selection if targets is Empty return List list new Array List Arrays as List f Content Provider get Elements null int bottom list size 1 int index 0 for int i targets size 1 i 0 i Object target targets get i index list index Of target if index bottom bottom index 1 Object temp list get bottom list set bottom target list set index temp bottom index set Entries list  handleDownPressed getOrderedSelection isEmpty ArrayList asList fContentProvider getElements indexOf setEntries
private void handle Up Pressed List targets get Ordered Selection if targets is Empty return int top 0 int index 0 List list new Array List Arrays as List f Content Provider get Elements null Iterator entries targets iterator while entries has Next Object target entries next index list index Of target if index top top index 1 Object temp list get top list set top target list set index temp top index set Entries list  handleUpPressed getOrderedSelection isEmpty ArrayList asList fContentProvider getElements hasNext indexOf setEntries
Updates the entries to the entries in the given list private void set Entries List list f Targets list to Array f Viewer set Input f Targets update all selection listeners f Viewer set Selection f Viewer get Selection  setEntries fTargets toArray fViewer setInput fTargets fViewer setSelection fViewer getSelection
Returns the selected items in the list in the order they are displayed return targets for an action private List get Ordered Selection List targets new Array List List selection I Structured Selection f Viewer get Selection to List Object entries f Content Provider get Elements null for int i 0 i entries length i Object target entries i if selection contains target targets add target return targets  getOrderedSelection ArrayList IStructuredSelection fViewer getSelection toList fContentProvider getElements
Creates a list viewer for the targets param comp private void create Target List Composite comp f Viewer new Table Viewer comp SWT MULTI SWT FULL SELECTION SWT BORDER f Viewer set Label Provider new Target Table Label Provider f Content Provider new Ant Target Content Provider f Viewer set Content Provider f Content Provider f Viewer set Input f Targets f Viewer add Selection Changed Listener this Table table f Viewer get Table Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint 200 gd width Hint 250 table set Layout Data gd table set Font comp get Font  createTargetList fViewer TableViewer FULL_SELECTION fViewer setLabelProvider TargetTableLabelProvider fContentProvider AntTargetContentProvider fViewer setContentProvider fContentProvider fViewer setInput fTargets fViewer addSelectionChangedListener fViewer getTable GridData GridData GridData FILL_BOTH heightHint widthHint setLayoutData setFont getFont
Returns the ordered targets public Object get Targets return f Targets  getTargets fTargets
Update button enablement see org eclipse jface viewers I Selection Changed Listener selection Changed org eclipse jface viewers Selection Changed Event public void selection Changed Selection Changed Event event update Buttons  ISelectionChangedListener selectionChanged SelectionChangedEvent selectionChanged SelectionChangedEvent updateButtons
private void update Buttons int selections f Viewer get Table get Selection Indices int last f Targets length 1 boolean up true selections length 0 boolean down true selections length 0 for int i 0 i selections length i if selections i 0 up false if selections i last down false f Up set Enabled up f Down set Enabled down  updateButtons fViewer getTable getSelectionIndices fTargets fUp setEnabled fDown setEnabled
see org eclipse jface window Window configure Shell org eclipse swt widgets Shell protected void configure Shell Shell shell super configure Shell shell Workbench Help set Help shell I AntUI Help Context Ids TARGET ORDER DIALOG  configureShell configureShell configureShell WorkbenchHelp setHelp IAntUIHelpContextIds TARGET_ORDER_DIALOG

public class Target Table Label Provider extends Label Provider implements I Table Label Provider I Color Provider public Target Table Label Provider super  TargetTableLabelProvider LabelProvider ITableLabelProvider IColorProvider TargetTableLabelProvider
public String get Text Object model Target Info target Target Info model String Buffer result new String Buffer target get Name if target is Default result append NON NLS 1 result append Ant Launch Configuration Messages get String Ant Target Label Provider default target 1 NON NLS 1 result append NON NLS 1 return result to String  getText TargetInfo TargetInfo StringBuffer StringBuffer getName isDefault AntLaunchConfigurationMessages getString AntTargetLabelProvider default_target_1 toString
see org eclipse jface viewers I Label Provider get Image java lang Object public Image get Image Object element Target Info target Target Info element Image Descriptor base null int flags 0 if target is Default base AntUI Images get Image Descriptor I AntUI Constants IMG ANT DEFAULT TARGET else if target get Description null base AntUI Images get Image Descriptor I AntUI Constants IMG ANT TARGET INTERNAL else base AntUI Images get Image Descriptor I AntUI Constants IMG ANT TARGET return AntUI Images get Image new Ant Image Descriptor base flags  ILabelProvider getImage getImage TargetInfo TargetInfo ImageDescriptor isDefault AntUIImages getImageDescriptor IAntUIConstants IMG_ANT_DEFAULT_TARGET getDescription AntUIImages getImageDescriptor IAntUIConstants IMG_ANT_TARGET_INTERNAL AntUIImages getImageDescriptor IAntUIConstants IMG_ANT_TARGET AntUIImages getImage AntImageDescriptor
public Image get Column Image Object element int column Index if column Index 0 return get Image element return null  getColumnImage columnIndex columnIndex getImage
public String get Column Text Object element int column Index if column Index 0 return get Text element String desc Target Info element get Description if desc null return NON NLS 1 return desc  getColumnText columnIndex columnIndex getText TargetInfo getDescription
public Color get Foreground Object element if element instanceof Target Info return null Target Info info Target Info element if info is Default return Display get Default get System Color SWT COLOR BLUE return null  getForeground TargetInfo TargetInfo TargetInfo isDefault getDefault getSystemColor COLOR_BLUE
public Color get Background Object element return null  getBackground

public Hyperlink Entry I Console Hyperlink link I Region region String message f Link link f Region region f Message message  HyperlinkEntry IConsoleHyperlink IRegion fLink fRegion fMessage
public I Region get Region return f Region  IRegion getRegion fRegion
public I Console Hyperlink get Link return f Link  IConsoleHyperlink getLink fLink
public String get Message return f Message  getMessage fMessage
private I Region f Region public Line Entry I Console console I Region region f Console console f Region region  IRegion fRegion LineEntry IConsole IRegion fConsole fRegion
public I Region get Region return f Region  IRegion getRegion fRegion
public I Console get Console return f Console  IConsole getConsole fConsole
Not to be called private Task Link Manager super  TaskLinkManager
Registers a hyperlink for the given process and task name The given region is relative to the beginning of the line not the document param process the process associated with the link param link the link for the process param region The region within the line param message The message related to the link public static synchronized void add Task Hyperlink I Process process I Console Hyperlink link I Region region String message if fg Process To New Lines null List new Lines List fg Process To New Lines get process if new Lines null for int index 0 index new Lines size index Line Entry new Line Line Entry new Lines get index if add Link new Line get Console link new Line get Region region message new Lines sub List 0 index 1 clear return if fg Process To Links null fg Process To Links new Hash Map List links List fg Process To Links get process if links null links new Array List 10 fg Process To Links put process links links add new Hyperlink Entry link region message  addTaskHyperlink IProcess IConsoleHyperlink IRegion fgProcessToNewLines newLines fgProcessToNewLines newLines newLines LineEntry newLine LineEntry newLines addLink newLine getConsole newLine getRegion newLines subList fgProcessToLinks fgProcessToLinks HashMap fgProcessToLinks ArrayList fgProcessToLinks HyperlinkEntry
private static boolean add Link I Console console I Console Hyperlink link I Region line Region I Region region String message int length region get Length String text try text console get Document get line Region get Offset line Region get Length catch Bad Location Exception e return false if text trim equals message int offset line Region get Offset region get Offset console add Link link offset length return true return false  addLink IConsole IConsoleHyperlink IRegion lineRegion IRegion getLength getDocument lineRegion getOffset lineRegion getLength BadLocationException lineRegion getOffset getOffset addLink
A new line has been added to the given console Adds any task hyperlink associated with the line to the console The new line may be stored to process future incoming tasks hyperlinks param console param new Line public static synchronized void process New Line I Console console I Region new Line I Process process console get Process if fg Ant Builds null fg Ant Builds contains process if link Build File Message console new Line fg Ant Builds remove process return if fg Process To Links null add New Line console new Line process return List links List fg Process To Links get process if links null add New Line console new Line process return for int index 0 index links size index Hyperlink Entry link Hyperlink Entry links get index if add Link console link get Link new Line link get Region link get Message links sub List 0 index 1 clear return  newLine processNewLine IConsole IRegion newLine IProcess getProcess fgAntBuilds fgAntBuilds linkBuildFileMessage newLine fgAntBuilds fgProcessToLinks addNewLine newLine fgProcessToLinks addNewLine newLine HyperlinkEntry HyperlinkEntry addLink getLink newLine getRegion getMessage subList
private static void add New Line I Console console I Region new Line I Process process if fg Process To New Lines null fg Process To New Lines new Hash Map List new Lines List fg Process To New Lines get process if new Lines null new Lines new Array List new Lines add new Line Entry console new Line fg Process To New Lines put process new Lines  addNewLine IConsole IRegion newLine IProcess fgProcessToNewLines fgProcessToNewLines HashMap newLines fgProcessToNewLines newLines newLines ArrayList newLines LineEntry newLine fgProcessToNewLines newLines
Disposes any information stored for the given process param process public static void dispose I Process process if fg Process To Links null fg Process To Links remove process if fg Process To New Lines null fg Process To New Lines remove process if fg Ant Builds null fg Ant Builds remove process  IProcess fgProcessToLinks fgProcessToLinks fgProcessToNewLines fgProcessToNewLines fgAntBuilds fgAntBuilds
Registers the specified process as an Ant build process Allows for the generation of the Buildfile somefile link in the Ant output param process public static synchronized void register Ant Build I Process process if fg Process To New Lines null List new Lines List fg Process To New Lines get process if new Lines null for Iterator iter new Lines iterator iter has Next Line Entry new Line Line Entry iter next if link Build File Message new Line get Console new Line get Region iter remove return if fg Ant Builds null fg Ant Builds new Array List fg Ant Builds add process  registerAntBuild IProcess fgProcessToNewLines newLines fgProcessToNewLines newLines newLines hasNext LineEntry newLine LineEntry linkBuildFileMessage newLine getConsole newLine getRegion fgAntBuilds fgAntBuilds ArrayList fgAntBuilds
private static boolean link Build File Message I Console console I Region region String message NON NLS 1 int offset region get Offset try message console get Document get offset region get Length catch Bad Location Exception e if message starts With Buildfile NON NLS 1 String file Name message substring 10 trim I File file Ant Util get File For Location file Name null if file null File Link link new File Link file null 1 1 1 console add Link link offset 11 file Name length NON NLS 1 f Build File Parent file get Location to File get Parent File return true return false  linkBuildFileMessage IConsole IRegion getOffset getDocument getLength BadLocationException startsWith fileName IFile AntUtil getFileForLocation fileName FileLink FileLink addLink fileName fBuildFileParent getLocation toFile getParentFile

private String f Variable String public Variable Input Dialog Shell shell super shell set Shell Style SWT RESIZE get Shell Style  fVariableString VariableInputDialog setShellStyle getShellStyle
protected Control create Dialog Area Composite parent Composite inner new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 1 inner set Layout layout inner set Layout Data new Grid Data Grid Data FILL BOTH Label label new Label inner SWT NONE label set Text Ant Launch Configuration Messages get String Add Variable String Action 2 NON NLS 1 Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING label set Layout Data gd Composite input Comp new Composite inner SWT NONE layout new Grid Layout 2 false input Comp set Layout layout input Comp set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Text new Text input Comp SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL gd grab Excess Horizontal Space true gd width Hint 200 f Text set Layout Data gd Button button new Button input Comp SWT PUSH button set Text Ant Launch Configuration Messages get String Add Variable String Action 3 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN END gd height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH gd width Hint Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x button set Layout Data gd button add Selection Listener new Selection Adapter public void widget Selected Selection Event se get Variable apply Dialog Font parent return inner  createDialogArea GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_BOTH setText AntLaunchConfigurationMessages getString AddVariableStringAction GridData GridData GridData HORIZONTAL_ALIGN_BEGINNING setLayoutData inputComp GridLayout inputComp setLayout inputComp setLayoutData GridData GridData FILL_HORIZONTAL fText inputComp GridData GridData FILL_HORIZONTAL grabExcessHorizontalSpace widthHint fText setLayoutData inputComp setText AntLaunchConfigurationMessages getString AddVariableStringAction GridData GridData HORIZONTAL_ALIGN_END heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize setLayoutData addSelectionListener SelectionAdapter widgetSelected SelectionEvent getVariable applyDialogFont
protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
see org eclipse jface window Window configure Shell org eclipse swt widgets Shell protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text Ant Launch Configuration Messages get String Add Variable String Action 4 NON NLS 1  configureShell configureShell newShell configureShell newShell newShell setText AntLaunchConfigurationMessages getString AddVariableStringAction
private void get Variable String Variable Selection Dialog variable Dialog new String Variable Selection Dialog get Shell int return Code variable Dialog open if return Code I Dialog Constants OK ID String variable variable Dialog get Variable Expression if variable null f Text append variable  getVariable StringVariableSelectionDialog variableDialog StringVariableSelectionDialog getShell returnCode variableDialog returnCode IDialogConstants OK_ID variableDialog getVariableExpression fText
protected void ok Pressed String variable String f Text get Text if variable String null variable String trim length 0 f Variable String variable String else f Variable String null super ok Pressed  okPressed variableString fText getText variableString variableString fVariableString variableString fVariableString okPressed
public String get Variable String return f Variable String  getVariableString fVariableString
see org eclipse jface window Window close public boolean close Dialog Settings Helper persist Shell Geometry get Shell DIALOG SETTINGS SECTION return super close  DialogSettingsHelper persistShellGeometry getShell DIALOG_SETTINGS_SECTION
see org eclipse jface window Window get Initial Location org eclipse swt graphics Point protected Point get Initial Location Point initial Size Point p Dialog Settings Helper get Initial Location DIALOG SETTINGS SECTION return p null p super get Initial Location initial Size  getInitialLocation getInitialLocation initialSize DialogSettingsHelper getInitialLocation DIALOG_SETTINGS_SECTION getInitialLocation initialSize
see org eclipse jface window Window get Initial Size protected Point get Initial Size Point p super get Initial Size return Dialog Settings Helper get Initial Size DIALOG SETTINGS SECTION p  getInitialSize getInitialSize getInitialSize DialogSettingsHelper getInitialSize DIALOG_SETTINGS_SECTION

Create a new Ant Image Descriptor param base Image an image descriptor used as the base image param flags flags indicating which adornments are to be rendered public Ant Image Descriptor Image Descriptor base Image int flags set Base Image base Image set Flags flags  AntImageDescriptor baseImage AntImageDescriptor ImageDescriptor baseImage setBaseImage baseImage setFlags
see Composite Image Descriptor get Size protected Point get Size if f Size null Image Data data get Base Image get Image Data set Size new Point data width data height return f Size  CompositeImageDescriptor getSize getSize fSize ImageData getBaseImage getImageData setSize fSize
see Object equals java lang Object public boolean equals Object object if object instanceof Ant Image Descriptor return false Ant Image Descriptor other Ant Image Descriptor object return get Base Image equals other get Base Image get Flags other get Flags  AntImageDescriptor AntImageDescriptor AntImageDescriptor getBaseImage getBaseImage getFlags getFlags
see Object hash Code public int hash Code return get Base Image hash Code get Flags  hashCode hashCode getBaseImage hashCode getFlags
see Composite Image Descriptor draw Composite Image int int protected void draw Composite Image int width int height Image Data bg get Base Image get Image Data if bg null bg DEFAULT IMAGE DATA draw Image bg 0 0 draw Overlays  CompositeImageDescriptor drawCompositeImage drawCompositeImage ImageData getBaseImage getImageData DEFAULT_IMAGE_DATA drawImage drawOverlays
Add any overlays to the image as specified in the flags protected void draw Overlays int flags get Flags int y 0 Image Data data null if flags IMPORTED 0 data AntUI Images get Image Descriptor I AntUI Constants IMG OVR IMPORT get Image Data draw Image data 0 0 if flags HAS ERRORS 0 y get Size y data AntUI Images get Image Descriptor I AntUI Constants IMG OVR ERROR get Image Data y data height draw Image data 0 y else if flags HAS WARNINGS 0 y get Size y data AntUI Images get Image Descriptor I AntUI Constants IMG OVR WARNING get Image Data y data height draw Image data 0 y  drawOverlays getFlags ImageData AntUIImages getImageDescriptor IAntUIConstants IMG_OVR_IMPORT getImageData drawImage HAS_ERRORS getSize AntUIImages getImageDescriptor IAntUIConstants IMG_OVR_ERROR getImageData drawImage HAS_WARNINGS getSize AntUIImages getImageDescriptor IAntUIConstants IMG_OVR_WARNING getImageData drawImage
protected Image Descriptor get Base Image return f Base Image  ImageDescriptor getBaseImage fBaseImage
protected void set Base Image Image Descriptor base Image f Base Image base Image  setBaseImage ImageDescriptor baseImage fBaseImage baseImage
protected int get Flags return f Flags  getFlags fFlags
protected void set Flags int flags f Flags flags  setFlags fFlags
protected void set Size Point size f Size size  setSize fSize

Declare all images private static void declare Images Ant Editor images declare Registry Image I AntUI Constants IMG PROPERTY OBJECT property obj gif NON NLS 1 declare Registry Image I AntUI Constants IMG TASK PROPOSAL OBJECT task obj gif NON NLS 1 declare Registry Image I AntUI Constants IMG TEMPLATE PROPOSAL OBJECT template obj gif NON NLS 1 Ant View Actions declare Registry Image I AntUI Constants IMG ANT OBJECT ant gif NON NLS 1 declare Registry Image I AntUI Constants IMG REMOVE LOCALTOOL remove co gif NON NLS 1 declare Registry Image I AntUI Constants IMG REMOVE ALL LOCALTOOL removeAll co gif NON NLS 1 declare Registry Image I AntUI Constants IMG ADD LOCALTOOL add co gif NON NLS 1 declare Registry Image I AntUI Constants IMG RUN LOCALTOOL run tool gif NON NLS 1 declare Registry Image I AntUI Constants IMG SEARCH LOCALTOOL search gif NON NLS 1 declare Registry Image I AntUI Constants IMG FILTER INTERNAL TARGETS LOCALTOOL filter internal targets gif NON NLS 1 declare Registry Image I AntUI Constants IMG FILTER IMPORTED ELEMENTS LOCALTOOL filter imported elements gif NON NLS 1 declare Registry Image I AntUI Constants IMG FILTER PROPERTIES LOCALTOOL filter properties gif NON NLS 1 declare Registry Image I AntUI Constants IMG FILTER TOP LEVEL LOCALTOOL filter top level gif NON NLS 1 declare Registry Image I AntUI Constants IMG LINK WITH EDITOR LOCALTOOL synced gif NON NLS 1 declare Registry Image I AntUI Constants IMG SORT OUTLINE LOCALTOOL alpha mode gif NON NLS 1 declare Registry Image I AntUI Constants IMG REFRESH LOCALTOOL refresh gif NON NLS 1 Ant View Labels declare Registry Image I AntUI Constants IMG ANT PROJECT OBJECT ant buildfile gif NON NLS 1 declare Registry Image I AntUI Constants IMG ANT TARGET OBJECT targetpublic obj gif NON NLS 1 declare Registry Image I AntUI Constants IMG ANT TARGET INTERNAL OBJECT targetinternal obj gif NON NLS 1 declare Registry Image I AntUI Constants IMG ANT DEFAULT TARGET OBJECT defaulttarget obj gif NON NLS 1 declare Registry Image I AntUI Constants IMG ANT TARGET ERROR OBJECT ant target err gif NON NLS 1 declare Registry Image I AntUI Constants IMG ANT MACRODEF OBJECT macrodef obj gif NON NLS 1 declare Registry Image I AntUI Constants IMG ANT IMPORT OBJECT import obj gif NON NLS 1 declare Registry Image I AntUI Constants IMG ANT BUILD TAB OBJECT build tab gif NON NLS 1 ANT object declare Registry Image I AntUI Constants IMG TAB ANT TARGETS LOCALTOOL ant targets gif NON NLS 1 declare Registry Image I AntUI Constants IMG TAB CLASSPATH OBJECT classpath gif NON NLS 1 declare Registry Image I AntUI Constants IMG JAR FILE OBJECT jar l obj gif NON NLS 1 declare Registry Image I AntUI Constants IMG ANT TYPE OBJECT type gif NON NLS 1 declare Registry Image I AntUI Constants IMG IMPORT WIZARD BANNER WIZ importbuildfile wiz gif NON NLS 1 Overlays declare Registry Image I AntUI Constants IMG OVR ERROR OVR error co gif NON NLS 1 declare Registry Image I AntUI Constants IMG OVR WARNING OVR warning co gif NON NLS 1 declare Registry Image I AntUI Constants IMG OVR IMPORT OVR import co gif NON NLS 1  declareImages declareRegistryImage IAntUIConstants IMG_PROPERTY property_obj declareRegistryImage IAntUIConstants IMG_TASK_PROPOSAL task_obj declareRegistryImage IAntUIConstants IMG_TEMPLATE_PROPOSAL template_obj declareRegistryImage IAntUIConstants IMG_ANT declareRegistryImage IAntUIConstants IMG_REMOVE remove_co declareRegistryImage IAntUIConstants IMG_REMOVE_ALL removeAll_co declareRegistryImage IAntUIConstants IMG_ADD add_co declareRegistryImage IAntUIConstants IMG_RUN run_tool declareRegistryImage IAntUIConstants IMG_SEARCH declareRegistryImage IAntUIConstants IMG_FILTER_INTERNAL_TARGETS filter_internal_targets declareRegistryImage IAntUIConstants IMG_FILTER_IMPORTED_ELEMENTS filter_imported_elements declareRegistryImage IAntUIConstants IMG_FILTER_PROPERTIES filter_properties declareRegistryImage IAntUIConstants IMG_FILTER_TOP_LEVEL filter_top_level declareRegistryImage IAntUIConstants IMG_LINK_WITH_EDITOR declareRegistryImage IAntUIConstants IMG_SORT_OUTLINE alpha_mode declareRegistryImage IAntUIConstants IMG_REFRESH declareRegistryImage IAntUIConstants IMG_ANT_PROJECT ant_buildfile declareRegistryImage IAntUIConstants IMG_ANT_TARGET targetpublic_obj declareRegistryImage IAntUIConstants IMG_ANT_TARGET_INTERNAL targetinternal_obj declareRegistryImage IAntUIConstants IMG_ANT_DEFAULT_TARGET defaulttarget_obj declareRegistryImage IAntUIConstants IMG_ANT_TARGET_ERROR ant_target_err declareRegistryImage IAntUIConstants IMG_ANT_MACRODEF macrodef_obj declareRegistryImage IAntUIConstants IMG_ANT_IMPORT import_obj declareRegistryImage IAntUIConstants IMG_ANT_BUILD_TAB build_tab declareRegistryImage IAntUIConstants IMG_TAB_ANT_TARGETS ant_targets declareRegistryImage IAntUIConstants IMG_TAB_CLASSPATH declareRegistryImage IAntUIConstants IMG_JAR_FILE jar_l_obj declareRegistryImage IAntUIConstants IMG_ANT_TYPE declareRegistryImage IAntUIConstants IMG_IMPORT_WIZARD_BANNER importbuildfile_wiz declareRegistryImage IAntUIConstants IMG_OVR_ERROR error_co declareRegistryImage IAntUIConstants IMG_OVR_WARNING warning_co declareRegistryImage IAntUIConstants IMG_OVR_IMPORT import_co
Declare an Image in the registry table param key The key to use when registering the image param path The path where the image can be found This path is relative to where this plugin class is found i e typically the packages directory private final static void declare Registry Image String key String path Image Descriptor desc Image Descriptor get Missing Image Descriptor try desc Image Descriptor create FromURL make Icon FileURL path catch MalformedURL Exception me image Registry put key desc image Descriptors put key desc  declareRegistryImage ImageDescriptor ImageDescriptor getMissingImageDescriptor ImageDescriptor createFromURL makeIconFileURL MalformedURLException imageRegistry imageDescriptors
Returns the Image Registry public static Image Registry get Image Registry if image Registry null initialize Image Registry return image Registry  ImageRegistry ImageRegistry getImageRegistry imageRegistry initializeImageRegistry imageRegistry
Initialize the image registry by declaring all of the required graphics This involves creating J Face image descriptors describing how to create find the image should it be needed The image is not actually allocated until requested Prefix conventions Wizard Banners WIZBAN  Preference Banners PREF BAN  Property Page Banners PROPBAN  Color toolbar CTOOL  Enable toolbar ETOOL  Disable toolbar DTOOL  Local enabled toolbar ELCL  Local Disable toolbar DLCL  Object large OBJL  Object small OBJS  View VIEW  Product images PROD  Misc images MISC  Where are the images The images typically gifs are found in the same location as this plugin class This may mean the same package directory as the package holding this class The images are declared using this get Class to ensure they are looked up via this plugin class see org eclipse jface resource Image Registry public static Image Registry initialize Image Registry image Registry new Image Registry AntUI Plugin get Standard Display image Descriptors new Hash Map 30 declare Images return image Registry  JFace WIZBAN_ PREF_BAN_ PROPBAN_ CTOOL_ ETOOL_ DTOOL_ ELCL_ DLCL_ OBJL_ OBJS_ VIEW_ PROD_ MISC_ getClass ImageRegistry ImageRegistry initializeImageRegistry imageRegistry ImageRegistry AntUIPlugin getStandardDisplay imageDescriptors HashMap declareImages imageRegistry
Returns the code Image code identified by the given key or code null code if it does not exist public static Image get Image String key return get Image Registry get key  getImage getImageRegistry
Returns the code Image Descriptor code identified by the given key or code null code if it does not exist public static Image Descriptor get Image Descriptor String key if image Descriptors null initialize Image Registry return Image Descriptor image Descriptors get key  ImageDescriptor ImageDescriptor getImageDescriptor imageDescriptors initializeImageRegistry ImageDescriptor imageDescriptors
private static URL make Icon FileURL String icon Path throws MalformedURL Exception if ICON BASE URL null throw new MalformedURL Exception return new URL ICON BASE URL icon Path  makeIconFileURL iconPath MalformedURLException ICON_BASE_URL MalformedURLException ICON_BASE_URL iconPath
Sets the three image descriptors for enabled disabled and hovered to an action The actions are retrieved from the lcl16 folders public static void set Local Image Descriptors I Action action String icon Name set Image Descriptors action lcl16 icon Name NON NLS 1  setLocalImageDescriptors IAction iconName setImageDescriptors iconName
private static void set Image Descriptors I Action action String type String rel Path try Image Descriptor id Image Descriptor create FromURL make Icon FileURL d type rel Path NON NLS 1 if id null action set Disabled Image Descriptor id catch MalformedURL Exception e AntUI Plugin log e try Image Descriptor id Image Descriptor create FromURL make Icon FileURL c type rel Path NON NLS 1 if id null action set Hover Image Descriptor id catch MalformedURL Exception e AntUI Plugin log e action set Image Descriptor create e type rel Path NON NLS 1  setImageDescriptors IAction relPath ImageDescriptor ImageDescriptor createFromURL makeIconFileURL relPath setDisabledImageDescriptor MalformedURLException AntUIPlugin ImageDescriptor ImageDescriptor createFromURL makeIconFileURL relPath setHoverImageDescriptor MalformedURLException AntUIPlugin setImageDescriptor relPath
private static URL make Icon FileURL String prefix String name throws MalformedURL Exception if ICON BASE URL null throw new MalformedURL Exception String Buffer buffer new String Buffer prefix buffer append buffer append name return new URL ICON BASE URL buffer to String  makeIconFileURL MalformedURLException ICON_BASE_URL MalformedURLException StringBuffer StringBuffer ICON_BASE_URL toString
private static Image Descriptor create String prefix String name try return Image Descriptor create FromURL make Icon FileURL prefix name catch MalformedURL Exception e AntUI Plugin log e return Image Descriptor get Missing Image Descriptor  ImageDescriptor ImageDescriptor createFromURL makeIconFileURL MalformedURLException AntUIPlugin ImageDescriptor getMissingImageDescriptor
Returns the image for the given composite descriptor public static Image get Image Composite Image Descriptor image Descriptor if image Descriptor Registry null image Descriptor Registry new Image Descriptor Registry return image Descriptor Registry get image Descriptor  getImage CompositeImageDescriptor imageDescriptor imageDescriptorRegistry imageDescriptorRegistry ImageDescriptorRegistry imageDescriptorRegistry imageDescriptor
public static void dispose Image Descriptor Registry if image Descriptor Registry null image Descriptor Registry dispose  disposeImageDescriptorRegistry imageDescriptorRegistry imageDescriptorRegistry

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private AntUI Model Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME AntUIModelMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Constructs an instance of this plug in runtime class p An instance of this plug in runtime class is automatically created when the facilities provided by the Ant Core plug in are required b Clients must never explicitly instantiate a plug in runtime class b p public AntUI Plugin super plugin this  AntUIPlugin
public void stop Bundle Context context throws Exception try AntUI Images dispose Image Descriptor Registry finally super stop context  BundleContext AntUIImages disposeImageDescriptorRegistry
Returns this plug in instance return the single instance of this plug in runtime class public static AntUI Plugin get Default return plugin  AntUIPlugin getDefault
Convenience method which returns the unique identifier of this plugin public static String get Unique Identifier return PI ANTUI  getUniqueIdentifier PI_ANTUI
Logs the specified throwable with this plug in s log param t throwable to log public static void log Throwable t I Status status new Status I Status ERROR PI ANTUI INTERNAL ERROR Error logged from Ant UI t NON NLS 1 log status  IStatus IStatus PI_ANTUI INTERNAL_ERROR
Logs the specified status with this plug in s log param status status public static void log I Status status get Default get Log log status  IStatus getDefault getLog
Writes the message to the plug in s log param message the text to write to the log public static void log String message Throwable exception I Status status new Error Status message exception log status  IStatus newErrorStatus
Returns a new code I Status code for this plug in public static I Status new Error Status String message Throwable exception if message null message EMPTY STRING return new Status I Status ERROR I AntUI Constants PLUGIN ID 0 message exception  IStatus IStatus newErrorStatus EMPTY_STRING IStatus IAntUIConstants PLUGIN_ID
protected void initialize Default Preferences I Preference Store prefs prefs set Default I AntUI Preference Constants ANT FIND BUILD FILE NAMES build xml NON NLS 1 EditorsUI use Annotations Preference Page prefs EditorsUI use Quick Diff Preference Page prefs if is MacOS the mac does not have a tools jar Bug 40778 prefs set Default I AntUI Preference Constants ANT TOOLS JAR WARNING false else prefs set Default I AntUI Preference Constants ANT TOOLS JAR WARNING true prefs set Default I AntUI Preference Constants ANT ERROR DIALOG true prefs set Default I AntUI Preference Constants ANTEDITOR FILTER INTERNAL TARGETS false prefs set Default I AntUI Preference Constants ANTEDITOR FILTER IMPORTED ELEMENTS false prefs set Default I AntUI Preference Constants ANTEDITOR FILTER PROPERTIES false prefs set Default I AntUI Preference Constants ANTEDITOR FILTER TOP LEVEL false Ant Editor color preferences Preference Converter set Default prefs I Ant Editor Color Constants TEXT COLOR I Ant Editor Color Constants DEFAULT Preference Converter set Default prefs I Ant Editor Color Constants PROCESSING INSTRUCTIONS COLOR I Ant Editor Color Constants PROC INSTR Preference Converter set Default prefs I Ant Editor Color Constants STRING COLOR I Ant Editor Color Constants STRING Preference Converter set Default prefs I Ant Editor Color Constants TAG COLOR I Ant Editor Color Constants TAG Preference Converter set Default prefs I Ant Editor Color Constants XML COMMENT COLOR I Ant Editor Color Constants XML COMMENT Preference Converter set Default prefs I AntUI Preference Constants CONSOLE ERROR COLOR new RGB 255 0 0 red exactly the same as debug Console Preference Converter set Default prefs I AntUI Preference Constants CONSOLE WARNING COLOR new RGB 250 100 0 orange Preference Converter set Default prefs I AntUI Preference Constants CONSOLE INFO COLOR new RGB 0 0 255 blue Preference Converter set Default prefs I AntUI Preference Constants CONSOLE VERBOSE COLOR new RGB 0 200 125 green Preference Converter set Default prefs I AntUI Preference Constants CONSOLE DEBUG COLOR new RGB 0 0 0 black Ant Editor Preference Constants initialize Default Values prefs  initializeDefaultPreferences IPreferenceStore setDefault IAntUIPreferenceConstants ANT_FIND_BUILD_FILE_NAMES useAnnotationsPreferencePage useQuickDiffPreferencePage isMacOS setDefault IAntUIPreferenceConstants ANT_TOOLS_JAR_WARNING setDefault IAntUIPreferenceConstants ANT_TOOLS_JAR_WARNING setDefault IAntUIPreferenceConstants ANT_ERROR_DIALOG setDefault IAntUIPreferenceConstants ANTEDITOR_FILTER_INTERNAL_TARGETS setDefault IAntUIPreferenceConstants ANTEDITOR_FILTER_IMPORTED_ELEMENTS setDefault IAntUIPreferenceConstants ANTEDITOR_FILTER_PROPERTIES setDefault IAntUIPreferenceConstants ANTEDITOR_FILTER_TOP_LEVEL PreferenceConverter setDefault IAntEditorColorConstants TEXT_COLOR IAntEditorColorConstants PreferenceConverter setDefault IAntEditorColorConstants PROCESSING_INSTRUCTIONS_COLOR IAntEditorColorConstants PROC_INSTR PreferenceConverter setDefault IAntEditorColorConstants STRING_COLOR IAntEditorColorConstants PreferenceConverter setDefault IAntEditorColorConstants TAG_COLOR IAntEditorColorConstants PreferenceConverter setDefault IAntEditorColorConstants XML_COMMENT_COLOR IAntEditorColorConstants XML_COMMENT PreferenceConverter setDefault IAntUIPreferenceConstants CONSOLE_ERROR_COLOR PreferenceConverter setDefault IAntUIPreferenceConstants CONSOLE_WARNING_COLOR PreferenceConverter setDefault IAntUIPreferenceConstants CONSOLE_INFO_COLOR PreferenceConverter setDefault IAntUIPreferenceConstants CONSOLE_VERBOSE_COLOR PreferenceConverter setDefault IAntUIPreferenceConstants CONSOLE_DEBUG_COLOR AntEditorPreferenceConstants initializeDefaultValues
Returns the standard display to be used The method first checks if the thread calling this method has an associated display If so this display is returned Otherwise the method returns the default display public static Display get Standard Display Display display Display get Current if display null display Display get Default return display  getStandardDisplay getCurrent getDefault
see org eclipse ui plugin AbstractUI Plugin create Image Registry protected Image Registry create Image Registry return AntUI Images initialize Image Registry  AbstractUIPlugin createImageRegistry ImageRegistry createImageRegistry AntUIImages initializeImageRegistry
Returns the preference color identified by the given preference public static Color get Preference Color String pref return Color Manager get Default get Color Preference Converter get Color get Default get Preference Store pref  getPreferenceColor ColorManager getDefault getColor PreferenceConverter getColor getDefault getPreferenceStore
Returns the active workbench page or code null code if none public static I Workbench Page get Active Page I Workbench Window window get Active Workbench Window if window null return window get Active Page return null  IWorkbenchPage getActivePage IWorkbenchWindow getActiveWorkbenchWindow getActivePage
Returns the active workbench window or code null code if none public static I Workbench Window get Active Workbench Window return get Default get Workbench get Active Workbench Window  IWorkbenchWindow getActiveWorkbenchWindow getDefault getWorkbench getActiveWorkbenchWindow
Returns whether the current OS claims to be Mac public static boolean is MacOS String osname System get Property os name to Lower Case Locale US NON NLS 1 return osname index Of mac 1 NON NLS 1  isMacOS getProperty toLowerCase indexOf

public static final String ANT GLOBAL USER CLASSPATH PLACEHOLDER UG NON NLS 1 No instances allowed private Ant Util super  ANT_GLOBAL_USER_CLASSPATH_PLACEHOLDER AntUtil
Returns a single string of the strings for storage param strings the array of strings return a single string representation of the strings or code null code if the array is empty public static String combine Strings String strings if strings length 0 return null if strings length 1 return strings 0 String Buffer buf new String Buffer for int i 0 i strings length 1 i buf append strings i buf append ATTRIBUTE SEPARATOR buf append strings strings length 1 return buf to String  combineStrings StringBuffer StringBuffer ATTRIBUTE_SEPARATOR toString
Returns an array of targets to be run or code null code if none are specified indicating the default target should be run param configuration launch configuration return array of target names or code null code throws Core Exception if unable to access the associated attribute public static String get Targets From Config I Launch Configuration configuration throws Core Exception String attribute configuration get Attribute I Ant Launch Configuration Constants ATTR ANT TARGETS String null if attribute null return null return Ant Util parse Run Targets attribute  CoreException getTargetsFromConfig ILaunchConfiguration CoreException getAttribute IAntLaunchConfigurationConstants ATTR_ANT_TARGETS AntUtil parseRunTargets
Returns a map of properties to be defined for the build or code null code if none are specified indicating no additional properties specified for the build param configuration launch configuration return map of properties name value or code null code throws Core Exception if unable to access the associated attribute public static Map get Properties I Launch Configuration configuration throws Core Exception Map map configuration get Attribute I Ant Launch Configuration Constants ATTR ANT PROPERTIES Map null return map  CoreException getProperties ILaunchConfiguration CoreException getAttribute IAntLaunchConfigurationConstants ATTR_ANT_PROPERTIES
Returns a String specifying the Ant home to use for the build or code null code if none is specified param configuration launch configuration return String specifying Ant home to use or code null code throws Core Exception if unable to access the associated attribute public static String get Ant Home I Launch Configuration configuration throws Core Exception I Runtime Classpath Entry entries Java Runtime compute Unresolved Runtime Classpath configuration for int i 0 i entries length i I Runtime Classpath Entry entry entries i if entry get Type I Runtime Classpath Entry OTHER I Runtime Classpath Entry2 entry2 I Runtime Classpath Entry2 entry if entry2 get Type Id equals Ant Home Classpath Entry TYPE ID return Ant Home Classpath Entry entry2 get Ant Home return null  CoreException getAntHome ILaunchConfiguration CoreException IRuntimeClasspathEntry JavaRuntime computeUnresolvedRuntimeClasspath IRuntimeClasspathEntry getType IRuntimeClasspathEntry IRuntimeClasspathEntry2 IRuntimeClasspathEntry2 getTypeId AntHomeClasspathEntry TYPE_ID AntHomeClasspathEntry getAntHome
Returns an array of property files to be used for the build or code null code if none are specified indicating no additional property files specified for the build param configuration launch configuration return array of property file names or code null code throws Core Exception if unable to access the associated attribute public static String get Property Files I Launch Configuration configuration throws Core Exception String attribute configuration get Attribute I Ant Launch Configuration Constants ATTR ANT PROPERTY FILES String null if attribute null return null String property Files Ant Util parse String attribute NON NLS 1 for int i 0 i property Files length i String property File property Files i property File expand Variable String property File AntUI Model Messages get String Ant Util 6 NON NLS 1 NON NLS 2 property Files i property File return property Files  CoreException getPropertyFiles ILaunchConfiguration CoreException getAttribute IAntLaunchConfigurationConstants ATTR_ANT_PROPERTY_FILES propertyFiles AntUtil parseString propertyFiles propertyFile propertyFiles propertyFile expandVariableString propertyFile AntUIModelMessages getString AntUtil propertyFiles propertyFile propertyFiles
Returns the list of all targets for the Ant build file specified by the provided I Path or code null code if no targets found param path the location of the Ant build file to get the targets from return a list of code Target Info code throws Core Exception if file does not exist IO problems or invalid format public static Target Info get Targets String path throws Core Exception Ant Runner runner new Ant Runner runner set Build File Location path return runner get Available Targets  IPath TargetInfo CoreException TargetInfo getTargets CoreException AntRunner AntRunner setBuildFileLocation getAvailableTargets
Returns the list of all targets for the Ant build file specified by the provided I Path arguments and I Launch Configuration or code null code if no targets found param path the location of the Ant build file to get the targets from param arguments command line arguments for the Ant build param config the launch configuration for the Ant build return a list of code Target Info code throws Core Exception if file does not exist IO problems or invalid format public static Target Info get Targets String path String arguments I Launch Configuration config throws Core Exception Map properties get Properties config String property Files get Property Files config Ant Runner runner new Ant Runner runner set Build File Location path if properties null runner add User Properties properties if property Files null property Files length 0 runner set Property Files property Files if arguments null arguments length 0 runner set Arguments arguments runner set Custom Classpath get Custom Classpath config String ant Home get Ant Home config if ant Home null runner set Ant Home ant Home return runner get Available Targets  IPath ILaunchConfiguration TargetInfo CoreException TargetInfo getTargets ILaunchConfiguration CoreException getProperties propertyFiles getPropertyFiles AntRunner AntRunner setBuildFileLocation addUserProperties propertyFiles propertyFiles setPropertyFiles propertyFiles setArguments setCustomClasspath getCustomClasspath antHome getAntHome antHome setAntHome antHome getAvailableTargets
Returns the list of urls that define the custom classpath for the Ant build or code null code if the global classpath is to be used param config launch configuration return a list of code URL code throws Core Exception if file does not exist IO problems or invalid format public static URL get Custom Classpath I Launch Configuration config throws Core Exception boolean use Default config get Attribute I Java Launch Configuration Constants ATTR DEFAULT CLASSPATH true if use Default return null I Runtime Classpath Entry unresolved Java Runtime compute Unresolved Runtime Classpath config don t consider bootpath entries List user Entries new Array List unresolved length for int i 0 i unresolved length i I Runtime Classpath Entry entry unresolved i if entry get Classpath Property I Runtime Classpath Entry USER CLASSES user Entries add entry I Runtime Classpath Entry entries Java Runtime resolve Runtime Classpath I Runtime Classpath Entry user Entries to Array new I Runtime Classpath Entry user Entries size config URL urls new URL entries length for int i 0 i entries length i I Runtime Classpath Entry entry entries i try urls i new URL file entry get Location NON NLS 1 catch MalformedURL Exception e throw new Core Exception new Status I Status ERROR AntUI Plugin get Unique Identifier AntUI Plugin INTERNAL ERROR AntUI Model Messages get String Ant Util 7 e NON NLS 1 return urls  CoreException getCustomClasspath ILaunchConfiguration CoreException useDefault getAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_CLASSPATH useDefault IRuntimeClasspathEntry JavaRuntime computeUnresolvedRuntimeClasspath userEntries ArrayList IRuntimeClasspathEntry getClasspathProperty IRuntimeClasspathEntry USER_CLASSES userEntries IRuntimeClasspathEntry JavaRuntime resolveRuntimeClasspath IRuntimeClasspathEntry userEntries toArray IRuntimeClasspathEntry userEntries IRuntimeClasspathEntry getLocation MalformedURLException CoreException IStatus AntUIPlugin getUniqueIdentifier AntUIPlugin INTERNAL_ERROR AntUIModelMessages getString AntUtil
Adds the Ant home entries and additional entries to the provided lists If no custom classpath is set no entries are added to the lists param config launch configuration param ant Home Entries list to add the Ant home entries to param additional Entries list to add the additional entries to deprecated this method is no longer supported should be deleted with old classpath tab support public static void get Custom Classpaths I Launch Configuration config List ant Home Entries List additional Entries String classpath String null try classpath String config get Attribute I Ant Launch Configuration Constants ATTR ANT CUSTOM CLASSPATH String null catch Core Exception e if classpath String null return String ant String null String user String null int delim classpath String index Of ANT CLASSPATH DELIMITER if delim 1 ant String classpath String else ant String classpath String substring 0 delim user String classpath String substring delim 1 get Entries ant Home Entries ant String if user String null get Entries additional Entries user String  antHomeEntries additionalEntries getCustomClasspaths ILaunchConfiguration antHomeEntries additionalEntries classpathString classpathString getAttribute IAntLaunchConfigurationConstants ATTR_ANT_CUSTOM_CLASSPATH CoreException classpathString antString userString classpathString indexOf ANT_CLASSPATH_DELIMITER antString classpathString antString classpathString userString classpathString getEntries antHomeEntries antString userString getEntries additionalEntries userString
private static void get Entries List entries String url String String entry Strings Ant Util parse String url String Ant Util ATTRIBUTE SEPARATOR Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences for int i 0 i entry Strings length i String string entry Strings i if string equals ANT HOME CLASSPATH PLACEHOLDER entries add All Arrays as List prefs get Ant Home Classpath Entries else if string equals ANT GLOBAL USER CLASSPATH PLACEHOLDER entries add All Arrays as List prefs get Additional Classpath Entries else if string char At 0 string string substring 1 entries add new Ant Classpath Entry string  getEntries urlString entryStrings AntUtil parseString urlString AntUtil ATTRIBUTE_SEPARATOR AntCorePreferences AntCorePlugin getPlugin getPreferences entryStrings entryStrings ANT_HOME_CLASSPATH_PLACEHOLDER addAll asList getAntHomeClasspathEntries ANT_GLOBAL_USER_CLASSPATH_PLACEHOLDER addAll asList getAdditionalClasspathEntries charAt AntClasspathEntry
private static String expand Variable String String variable String String invalid Message throws Core Exception String expanded String Variables Plugin get Default get String Variable Manager perform String Substitution variable String if expanded String null expanded String length 0 String msg Message Format format invalid Message new String variable String throw new Core Exception new Status I Status ERROR I AntUI Constants PLUGIN ID 0 msg null return expanded String  expandVariableString variableString invalidMessage CoreException expandedString VariablesPlugin getDefault getStringVariableManager performStringSubstitution variableString expandedString expandedString MessageFormat invalidMessage variableString CoreException IStatus IAntUIConstants PLUGIN_ID expandedString
Returns the currently displayed Ant View if it is open return the Ant View open in the current workbench page or code null code if there is none public static Ant View get Ant View I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null I Workbench Page page window get Active Page if page null return Ant View page find View I AntUI Constants ANT VIEW ID return null  AntView getAntView IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IWorkbenchPage getActivePage AntView findView IAntUIConstants ANT_VIEW_ID
Returns the list of target names to run param extra Attibute Value the external tool s extra attribute value for the run targets key return a list of target names public static String parse Run Targets String extra Attibute Value return parse String extra Attibute Value ATTRIBUTE SEPARATOR  extraAttibuteValue parseRunTargets extraAttibuteValue parseString extraAttibuteValue ATTRIBUTE_SEPARATOR
Returns the list of Strings that were delimiter separated param delim String the String to be tokenized based on the delimiter return a list of Strings public static String parse String String delim String String delim if delim String null return new String 0 Need to handle case where separator character is actually part of the target name String Tokenizer tokenizer new String Tokenizer delim String delim String results new String tokenizer count Tokens for int i 0 i results length i results i tokenizer next Token return results  delimString parseString delimString delimString StringTokenizer StringTokenizer delimString countTokens nextToken
Returns an I File with the given fully qualified path relative to the workspace root The returned I File may or may not exist public static I File get File String full Path I Workspace Root root Resources Plugin get Workspace get Root return root get File new Path full Path  IFile IFile IFile getFile fullPath IWorkspaceRoot ResourcesPlugin getWorkspace getRoot getFile fullPath
public static File Link get Task Link String path File build File Parent path path trim if path length 0 return null if path starts With file NON NLS 1 remove file path path substring 5 path length format is file F L where F is file path and L is line number int index path last Index Of if index path length 1 remove trailing path path substring 0 index index path last Index Of split file and line number String file Name path substring 0 index I File file get File For Location file Name build File Parent if file null try String line Number path substring index 1 int line Integer parse Int line Number return new File Link file null 1 1 line catch Number Format Exception e return null  FileLink getTaskLink buildFileParent startsWith lastIndexOf lastIndexOf fileName IFile getFileForLocation fileName buildFileParent lineNumber parseInt lineNumber FileLink NumberFormatException
Returns the workspace file associated with the given path in the local file system or code null code if none If the path happens to be a relative path then the path is interpreted as relative to the specified parent file Attempts to handle linked files the first found linked file with the correct path is returned param path param build File Parent return file or code null code see org eclipse core resources I Workspace Root find Files For Location I Path public static I File get File For Location String path File build File Parent I Path file Path new Path path I File file null I File files Resources Plugin get Workspace get Root find Files For Location file Path if files length 0 file files 0 if file null relative path File relative File null try this call is ok if build File Parent is null relative File File Utils new File Utils resolve File build File Parent path file Path new Path relative File get Absolute Path files Resources Plugin get Workspace get Root find Files For Location file Path if files length 0 file files 0 else return null catch Build Exception be return null if file exists return file File io File file get Location to File if io File exists needs to handle case insensitivity on WINOS try files Resources Plugin get Workspace get Root find Files For Location new Path io File get Canonical Path if files length 0 return files 0 catch IO Exception e return null  buildFileParent IWorkspaceRoot findFilesForLocation IPath IFile getFileForLocation buildFileParent IPath filePath IFile IFile ResourcesPlugin getWorkspace getRoot findFilesForLocation filePath relativeFile buildFileParent relativeFile FileUtils newFileUtils resolveFile buildFileParent filePath relativeFile getAbsolutePath ResourcesPlugin getWorkspace getRoot findFilesForLocation filePath BuildException ioFile getLocation toFile ioFile ResourcesPlugin getWorkspace getRoot findFilesForLocation ioFile getCanonicalPath IOException
Migrates the classpath in the given configuration from the old format to the new foramt The old format is not preserved Instead the default classpath will be used However ANT HOME settings are preserved param configuration a configuration to migrate throws Core Exception if unable to migrate since 3 0 public static void migrate To New Classpath Format I Launch Configuration configuration throws Core Exception String old Classpath configuration get Attribute I Ant Launch Configuration Constants ATTR ANT CUSTOM CLASSPATH String null String old Ant Home configuration get Attribute I Ant Launch Configuration Constants ATTR ANT HOME String null String provider configuration get Attribute I Java Launch Configuration Constants ATTR CLASSPATH PROVIDER String null if old Classpath null old Ant Home null provider null I Launch Configuration Working Copy working Copy null if configuration is Working Copy working Copy I Launch Configuration Working Copy configuration else working Copy configuration get Working Copy working Copy set Attribute I Ant Launch Configuration Constants ATTR ANT CUSTOM CLASSPATH String null working Copy set Attribute I Ant Launch Configuration Constants ATTR ANT HOME String null working Copy set Attribute I Java Launch Configuration Constants ATTR CLASSPATH PROVIDER org eclipse ant ui Ant Classpath Provider NON NLS 1 working Copy set Attribute I Java Launch Configuration Constants ATTR DEFAULT CLASSPATH true if old Ant Home null I Runtime Classpath Entry entries Java Runtime compute Unresolved Runtime Classpath working Copy List mementos new Array List entries length for int i 0 i entries length i I Runtime Classpath Entry entry entries i if entry get Type I Runtime Classpath Entry OTHER I Runtime Classpath Entry2 entry2 I Runtime Classpath Entry2 entry if entry2 get Type Id equals Ant Home Classpath Entry TYPE ID Ant Home Classpath Entry home Entry new Ant Home Classpath Entry old Ant Home mementos add home Entry get Memento continue mementos add entry get Memento working Copy set Attribute I Java Launch Configuration Constants ATTR DEFAULT CLASSPATH false working Copy set Attribute I Java Launch Configuration Constants ATTR CLASSPATH mementos working Copy do Save  ANT_HOME CoreException migrateToNewClasspathFormat ILaunchConfiguration CoreException oldClasspath getAttribute IAntLaunchConfigurationConstants ATTR_ANT_CUSTOM_CLASSPATH oldAntHome getAttribute IAntLaunchConfigurationConstants ATTR_ANT_HOME getAttribute IJavaLaunchConfigurationConstants ATTR_CLASSPATH_PROVIDER oldClasspath oldAntHome ILaunchConfigurationWorkingCopy workingCopy isWorkingCopy workingCopy ILaunchConfigurationWorkingCopy workingCopy getWorkingCopy workingCopy setAttribute IAntLaunchConfigurationConstants ATTR_ANT_CUSTOM_CLASSPATH workingCopy setAttribute IAntLaunchConfigurationConstants ATTR_ANT_HOME workingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_CLASSPATH_PROVIDER AntClasspathProvider workingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_CLASSPATH oldAntHome IRuntimeClasspathEntry JavaRuntime computeUnresolvedRuntimeClasspath workingCopy ArrayList IRuntimeClasspathEntry getType IRuntimeClasspathEntry IRuntimeClasspathEntry2 IRuntimeClasspathEntry2 getTypeId AntHomeClasspathEntry TYPE_ID AntHomeClasspathEntry homeEntry AntHomeClasspathEntry oldAntHome homeEntry getMemento getMemento workingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_CLASSPATH workingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_CLASSPATH workingCopy doSave

private static Color Manager fg Color Manager private Color Manager  ColorManager fgColorManager ColorManager
public static Color Manager get Default if fg Color Manager null fg Color Manager new Color Manager return fg Color Manager  ColorManager getDefault fgColorManager fgColorManager ColorManager fgColorManager
public Color get Color RGB rgb Color color Color f Color Table get rgb if color null color new Color Display get Current rgb f Color Table put rgb color return color  getColor fColorTable getCurrent fColorTable
public void dispose Iterator e f Color Table values iterator while e has Next Color e next dispose  fColorTable hasNext

Creates a new image descriptor registry for the current or default display respectively public Image Descriptor Registry this AntUI Plugin get Standard Display  ImageDescriptorRegistry AntUIPlugin getStandardDisplay
Creates a new image descriptor registry for the given display All images managed by this registry will be disposed when the display gets disposed param display the display the images managed by this registry are allocated for public Image Descriptor Registry Display display f Display display Assert is Not Null f Display hook Display  ImageDescriptorRegistry fDisplay isNotNull fDisplay hookDisplay
Returns the image associated with the given image descriptor param descriptor the image descriptor for which the registry manages an image return the image associated with the image descriptor or code null code if the image descriptor can t create the requested image public Image get Image Descriptor descriptor if descriptor null descriptor Image Descriptor get Missing Image Descriptor Image result Image f Registry get descriptor if result null return result Assert is True f Display AntUI Plugin get Standard Display AntUI Model Messages get String Image Descriptor Registry Allocating image for wrong display 1 NON NLS 1 result descriptor create Image if result null f Registry put descriptor result return result  ImageDescriptor ImageDescriptor getMissingImageDescriptor fRegistry isTrue fDisplay AntUIPlugin getStandardDisplay AntUIModelMessages getString ImageDescriptorRegistry Allocating_image_for_wrong_display_1 createImage fRegistry
Disposes all images managed by this registry public void dispose for Iterator iter f Registry values iterator iter has Next Image image Image iter next image dispose f Registry clear  fRegistry hasNext fRegistry
private void hook Display f Display dispose Exec new Runnable public void run dispose  hookDisplay fDisplay disposeExec
private void hook Display f Display dispose Exec new Runnable public void run dispose  hookDisplay fDisplay disposeExec

private Map f Check Boxes new Hash Map private Selection Listener f Check Box Listener new Selection Listener public void widget Default Selected Selection Event e  fCheckBoxes HashMap SelectionListener fCheckBoxListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Default Selected Selection Event e public void widget Selected Selection Event e Button button Button e widget f Overlay Store set Value String f Check Boxes get button button get Selection  widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent fOverlayStore setValue fCheckBoxes getSelection
private Map f Text Fields new Hash Map private Modify Listener f Text Field Listener new Modify Listener public void modify Text Modify Event e Text text Text e widget f Overlay Store set Value String f Text Fields get text text get Text  fTextFields HashMap ModifyListener fTextFieldListener ModifyListener modifyText ModifyEvent fOverlayStore setValue fTextFields getText
private Map f Number Fields new Hash Map private Modify Listener f Number Field Listener new Modify Listener public void modify Text Modify Event e number Field Changed Text e widget  fNumberFields HashMap ModifyListener fNumberFieldListener ModifyListener modifyText ModifyEvent numberFieldChanged
public Abstract Ant Editor Preference Page super set Preference Store AntUI Plugin get Default get Preference Store f Overlay Store create Overlay Store  AbstractAntEditorPreferencePage setPreferenceStore AntUIPlugin getDefault getPreferenceStore fOverlayStore createOverlayStore
protected abstract Overlay Preference Store create Overlay Store  OverlayPreferenceStore createOverlayStore
see org eclipse ui I Workbench Preference Page init org eclipse ui I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
protected void initialize Fields Map check Boxes get Check Boxes Map text Fields get Text Fields Iterator e check Boxes key Set iterator while e has Next Button b Button e next String key String check Boxes get b b set Selection get Overlay Store get Boolean key e text Fields key Set iterator while e has Next Text t Text e next String key String text Fields get t t set Text get Overlay Store get String key  initializeFields checkBoxes getCheckBoxes textFields getTextFields checkBoxes keySet hasNext checkBoxes setSelection getOverlayStore getBoolean textFields keySet hasNext textFields setText getOverlayStore getString
public boolean perform Ok get Overlay Store propagate AntUI Plugin get Default save Plugin Preferences return true  performOk getOverlayStore AntUIPlugin getDefault savePluginPreferences
protected Overlay Preference Store get Overlay Store return f Overlay Store  OverlayPreferenceStore getOverlayStore fOverlayStore
protected Overlay Preference Store set Overlay Store return f Overlay Store  OverlayPreferenceStore setOverlayStore fOverlayStore
protected Map get Check Boxes return f Check Boxes  getCheckBoxes fCheckBoxes
protected Map get Text Fields return f Text Fields  getTextFields fTextFields
protected Map get Number Fields return f Number Fields  getNumberFields fNumberFields
protected void perform Defaults get Overlay Store load Defaults initialize Fields handle Defaults super perform Defaults  performDefaults getOverlayStore loadDefaults initializeFields handleDefaults performDefaults
protected abstract void handle Defaults  handleDefaults
public void dispose if get Overlay Store null get Overlay Store stop f Overlay Store null super dispose  getOverlayStore getOverlayStore fOverlayStore
protected Button add Check Box Composite parent String label Text String key int indentation Button check Box new Button parent SWT CHECK check Box set Text label Text check Box set Font parent get Font Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Indent indentation gd horizontal Span 2 check Box set Layout Data gd check Box add Selection Listener f Check Box Listener get Check Boxes put check Box key return check Box  addCheckBox labelText checkBox checkBox setText labelText checkBox setFont getFont GridData GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalIndent horizontalSpan checkBox setLayoutData checkBox addSelectionListener fCheckBoxListener getCheckBoxes checkBox checkBox
protected Control add Text Field Composite composite String label Text String key int text Limit int indentation String error Messages Font font composite get Font Label label new Label composite SWT NONE label set Text label Text label set Font font Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Indent indentation label set Layout Data gd Text text Control new Text composite SWT BORDER SWT SINGLE text Control set Font font gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd width Hint convert Width In Chars To Pixels text Limit 1 text Control set Layout Data gd text Control set Text Limit text Limit get Text Fields put text Control key if error Messages null get Number Fields put text Control error Messages text Control add Modify Listener f Number Field Listener else text Control add Modify Listener f Text Field Listener return text Control  addTextField labelText textLimit errorMessages getFont setText labelText setFont GridData GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalIndent setLayoutData textControl textControl setFont GridData GridData HORIZONTAL_ALIGN_BEGINNING widthHint convertWidthInCharsToPixels textLimit textControl setLayoutData textControl setTextLimit textLimit getTextFields textControl errorMessages getNumberFields textControl errorMessages textControl addModifyListener fNumberFieldListener textControl addModifyListener fTextFieldListener textControl
private void number Field Changed Text text Control String number text Control get Text I Status status validate Positive Number number String get Number Fields get text Control if status matches I Status ERROR get Overlay Store set Value String get Text Fields get text Control number update Status status  numberFieldChanged textControl textControl getText IStatus validatePositiveNumber getNumberFields textControl IStatus getOverlayStore setValue getTextFields textControl updateStatus
private I Status validate Positive Number String number String error Messages Status Info status new Status Info if number length 0 status set Error error Messages 0 else try int value Integer parse Int number if value 0 status set Error Message Format format error Messages 1 new String number NON NLS 1 catch Number Format Exception e status set Error Message Format format error Messages 1 new String number NON NLS 1 return status  IStatus validatePositiveNumber errorMessages StatusInfo StatusInfo setError errorMessages parseInt setError MessageFormat errorMessages NumberFormatException setError MessageFormat errorMessages
private void update Status I Status status if status matches I Status ERROR Set keys get Number Fields key Set for Iterator iter keys iterator iter has Next Text text Text iter next I Status s validate Positive Number text get Text String get Number Fields get text status s get Severity status get Severity s status set Valid status matches I Status ERROR apply To Status Line this status  updateStatus IStatus IStatus getNumberFields keySet hasNext IStatus validatePositiveNumber getText getNumberFields getSeverity getSeverity setValid IStatus applyToStatusLine
private void apply To Status Line Dialog Page page I Status status String message status get Message switch status get Severity case I Status OK page set Message message I Message Provider NONE page set Error Message null break case I Status WARNING page set Message message I Message Provider WARNING page set Error Message null break case I Status INFO page set Message message I Message Provider INFORMATION page set Error Message null break default if message length 0 message null page set Message null page set Error Message message break  applyToStatusLine DialogPage IStatus getMessage getSeverity IStatus setMessage IMessageProvider setErrorMessage IStatus setMessage IMessageProvider setErrorMessage IStatus setMessage IMessageProvider setErrorMessage setMessage setErrorMessage
Returns an array of size 2 first element is of type code Label code second element is of type code Text code Use code get Label Control code and code get Text Control code to get the 2 controls protected Control add Labelled Text Field Composite composite String label String key int text Limit int indentation String error Messages Label label Control new Label composite SWT NONE label Control set Text label label Control set Font composite get Font Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Indent indentation label Control set Layout Data gd Text text Control new Text composite SWT BORDER SWT SINGLE gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd width Hint convert Width In Chars To Pixels text Limit 1 text Control set Layout Data gd text Control set Text Limit text Limit text Control set Font composite get Font f Text Fields put text Control key if error Messages null f Number Fields put text Control error Messages text Control add Modify Listener f Number Field Listener else text Control add Modify Listener f Text Field Listener return new Control label Control text Control  getLabelControl getTextControl addLabelledTextField textLimit errorMessages labelControl labelControl setText labelControl setFont getFont GridData GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalIndent labelControl setLayoutData textControl GridData GridData HORIZONTAL_ALIGN_BEGINNING widthHint convertWidthInCharsToPixels textLimit textControl setLayoutData textControl setTextLimit textLimit textControl setFont getFont fTextFields textControl errorMessages fNumberFields textControl errorMessages textControl addModifyListener fNumberFieldListener textControl addModifyListener fTextFieldListener labelControl textControl
protected String load Preview Content From File String filename String line String separator System get Property line separator NON NLS 1 String Buffer buffer new String Buffer 512 Buffered Reader reader null try reader new Buffered Reader new Input Stream Reader get Class get Resource As Stream filename while line reader read Line null buffer append line buffer append separator catch IO Exception io AntUI Plugin log io finally if reader null try reader close catch IO Exception e return buffer to String  loadPreviewContentFromFile getProperty StringBuffer StringBuffer BufferedReader BufferedReader InputStreamReader getClass getResourceAsStream readLine IOException AntUIPlugin IOException toString

see org eclipse ant internal ui preferences I Classpath Entry get Entries public I Ant Classpath Entry get Entries return I Ant Classpath Entry child Entries to Array new I Ant Classpath Entry child Entries size  IClasspathEntry getEntries IAntClasspathEntry getEntries IAntClasspathEntry childEntries toArray IAntClasspathEntry childEntries
see org eclipse ant internal ui preferences I Classpath Entry has Entries public boolean has Entries return child Entries is Empty  IClasspathEntry hasEntries hasEntries childEntries isEmpty
see org eclipse ant internal ui preferences I Classpath Entry get Parent public I Classpath Entry get Parent return parent  IClasspathEntry getParent IClasspathEntry getParent
param parent The parent to set public void set Parent I Classpath Entry parent this parent parent  setParent IClasspathEntry
see org eclipse ant core I Ant Classpath Entry get EntryURL public URL get EntryURL return null  IAntClasspathEntry getEntryURL getEntryURL
see org eclipse ant core I Ant Classpath Entry get Label public String get Label return to String  IAntClasspathEntry getLabel getLabel toString
see org eclipse ant core I Ant Classpath Entry is Eclipse Runtime Required public boolean is Eclipse Runtime Required return true  IAntClasspathEntry isEclipseRuntimeRequired isEclipseRuntimeRequired

Creates a new dialog with the given shell and title public Add Custom Dialog Shell parent List library Entries List existing Names String help Context super parent this library Entries library Entries this existing Names existing Names this help Context help Context  AddCustomDialog libraryEntries existingNames helpContext libraryEntries libraryEntries existingNames existingNames helpContext helpContext
protected Control create Dialog Area Composite parent Composite top Composite Composite super create Dialog Area parent top Composite set Size top Composite compute Size SWT DEFAULT SWT DEFAULT create Name Group top Composite new Label top Composite SWT NULL create Root Directory Group top Composite create File Selection Group top Composite if library null set Source Name library get Label return top Composite  createDialogArea topComposite createDialogArea topComposite setSize topComposite computeSize createNameGroup topComposite topComposite createRootDirectoryGroup topComposite createFileSelectionGroup topComposite setSourceName getLabel topComposite
name Field set Text name name Field add Modify Listener new Modify Listener public void modify Text Modify Event e update Status  nameField setText nameField addModifyListener ModifyListener modifyText ModifyEvent updateStatus
private void create Name Group Composite top Composite Composite name Container Group new Composite top Composite SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 name Container Group set Layout layout name Container Group set Font top Composite get Font name Container Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Label label new Label name Container Group SWT NONE label set Font top Composite get Font label set Text Ant Preferences Messages get String Add Custom Dialog Name  3 NON NLS 1 name Field new Text name Container Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint I Dialog Constants ENTRY FIELD WIDTH name Field set Layout Data data name Field set Font top Composite get Font name Field set Text name name Field add Modify Listener new Modify Listener public void modify Text Modify Event e update Status  createNameGroup topComposite nameContainerGroup topComposite GridLayout GridLayout numColumns marginHeight marginWidth nameContainerGroup setLayout nameContainerGroup setFont topComposite getFont nameContainerGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL nameContainerGroup setFont topComposite getFont setText AntPreferencesMessages getString AddCustomDialog Name__3 nameField nameContainerGroup GridData GridData GridData FILL_HORIZONTAL widthHint IDialogConstants ENTRY_FIELD_WIDTH nameField setLayoutData nameField setFont topComposite getFont nameField setText nameField addModifyListener ModifyListener modifyText ModifyEvent updateStatus
see org eclipse jface window Window configure Shell org eclipse swt widgets Shell protected void configure Shell Shell new Shell super configure Shell new Shell Workbench Help set Help new Shell help Context  configureShell configureShell newShell configureShell newShell WorkbenchHelp setHelp newShell helpContext
Clears the cached structure provider after first finalizing it properly private void clear Provider Cache if provider Cache null close Zip File provider Cache get Zip File provider Cache null  clearProviderCache providerCache closeZipFile providerCache getZipFile providerCache
Attempts to close the passed zip file and answers a boolean indicating success private boolean close Zip File Zip File file try file close catch IO Exception e AntUI Plugin log Message Format format Ant Preferences Messages get String Add Custom Dialog Could not close zip file  0  4 new String file get Name e NON NLS 1 return false return true  closeZipFile ZipFile IOException AntUIPlugin MessageFormat AntPreferencesMessages getString AddCustomDialog Could_not_close_zip_file_ _4 getName
source Name Field add Selection Listener new Selection Adapter public void widget Selected Selection Event e update From Source Field  sourceNameField addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateFromSourceField
see Key Listener key Pressed public void key Pressed Key Event e If there has been a key pressed then mark as dirty entry Changed true  KeyListener keyPressed keyPressed KeyEvent entryChanged
public void focus Lost Focus Event e Clear the flag to prevent constant update if entry Changed entry Changed false update From Source Field  focusLost FocusEvent entryChanged entryChanged updateFromSourceField
Create the group for creating the root directory private void create Root Directory Group Composite parent Composite source Container Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 source Container Group set Layout layout source Container Group set Font parent get Font source Container Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Label group Label new Label source Container Group SWT NONE group Label set Text Ant Preferences Messages get String Add Custom Dialog Location NON NLS 1 group Label set Font parent get Font source name entry field source Name Field new Combo source Container Group SWT BORDER SWT READ ONLY Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data width Hint I Dialog Constants ENTRY FIELD WIDTH source Name Field set Layout Data data source Name Field set Font parent get Font source Name Field add Selection Listener new Selection Adapter public void widget Selected Selection Event e update From Source Field Iterator libraries library Entries iterator while libraries has Next Classpath Entry entry Classpath Entry libraries next source Name Field add entry get Label source Name Field add Key Listener new Key Adapter see Key Listener key Pressed public void key Pressed Key Event e If there has been a key pressed then mark as dirty entry Changed true source Name Field add Focus Listener new Focus Adapter see Focus Listener focus Lost Focus Event public void focus Lost Focus Event e Clear the flag to prevent constant update if entry Changed entry Changed false update From Source Field  createRootDirectoryGroup sourceContainerGroup GridLayout GridLayout numColumns marginHeight marginWidth sourceContainerGroup setLayout sourceContainerGroup setFont getFont sourceContainerGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL groupLabel sourceContainerGroup groupLabel setText AntPreferencesMessages getString AddCustomDialog groupLabel setFont getFont sourceNameField sourceContainerGroup READ_ONLY GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL widthHint IDialogConstants ENTRY_FIELD_WIDTH sourceNameField setLayoutData sourceNameField setFont getFont sourceNameField addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateFromSourceField libraryEntries hasNext ClasspathEntry ClasspathEntry sourceNameField getLabel sourceNameField addKeyListener KeyAdapter KeyListener keyPressed keyPressed KeyEvent entryChanged sourceNameField addFocusListener FocusAdapter FocusListener focusLost FocusEvent focusLost FocusEvent entryChanged entryChanged updateFromSourceField
Update the receiver from the source name field private void update From Source Field set Source Name source Name Field get Text update Status  updateFromSourceField setSourceName sourceNameField getText updateStatus
Check the field values and display a message in the status if needed private void update Status Status Info status new Status Info String custom Name name Field get Text trim if custom Name length 0 status set Error no Name Error Msg else if editing Iterator names existing Names iterator while names has Next String a Name String names next if a Name equals custom Name status set Error Message Format format already Exists Error Msg new String custom Name update Status status return if selection Group get List Table Selection is Empty status set Error Ant Preferences Messages get String Add Custom Dialog must Select NON NLS 1 update Status status  updateStatus StatusInfo StatusInfo customName nameField getText customName setError noNameErrorMsg existingNames hasNext aName aName customName setError MessageFormat alreadyExistsErrorMsg customName updateStatus selectionGroup getListTableSelection isEmpty setError AntPreferencesMessages getString AddCustomDialog mustSelect updateStatus
Sets the source name of the import to be the supplied path Adds the name of the path to the list of items in the source combo and selects it param path the path to be added private void set Source Name String path if path length 0 String current Items this source Name Field get Items int selection Index 1 for int i 0 i current Items length i if current Items i equals path selection Index i break if selection Index 0 int old Length current Items length String new Items new String old Length 1 System arraycopy current Items 0 new Items 0 old Length new Items old Length path this source Name Field set Items new Items selection Index old Length this source Name Field select selection Index reset Selection  setSourceName currentItems sourceNameField getItems selectionIndex currentItems currentItems selectionIndex selectionIndex oldLength currentItems newItems oldLength currentItems newItems oldLength newItems oldLength sourceNameField setItems newItems selectionIndex oldLength sourceNameField selectionIndex resetSelection
I Selection Changed Listener listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Status  ISelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateStatus
selection Group add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if get Button I Dialog Constants OK ID is Enabled button Pressed I Dialog Constants OK ID  selectionGroup addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getButton IDialogConstants OK_ID isEnabled buttonPressed IDialogConstants OK_ID
private void create File Selection Group Composite parent Just create with a dummy root File System Element dummy Root new File System Element Dummy null true NON NLS 1 this selection Group new Tree And List Group parent dummy Root get Folder Provider new Workbench Label Provider get File Provider new Workbench Label Provider SWT NONE 400 150 false I Selection Changed Listener listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Status Workbench Viewer Sorter sorter new Workbench Viewer Sorter this selection Group set Tree Sorter sorter this selection Group set List Sorter sorter this selection Group add Selection Changed Listener listener selection Group add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if get Button I Dialog Constants OK ID is Enabled button Pressed I Dialog Constants OK ID  createFileSelectionGroup FileSystemElement dummyRoot FileSystemElement selectionGroup TreeAndListGroup dummyRoot getFolderProvider WorkbenchLabelProvider getFileProvider WorkbenchLabelProvider ISelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateStatus WorkbenchViewerSorter WorkbenchViewerSorter selectionGroup setTreeSorter selectionGroup setListSorter selectionGroup addSelectionChangedListener selectionGroup addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getButton IDialogConstants OK_ID isEnabled buttonPressed IDialogConstants OK_ID
Returns whether the specified source currently exists and is valid ie proper format protected boolean ensure Source Is Valid Zip File specified File get Specified Source File if specified File null return false return close Zip File specified File  ensureSourceIsValid ZipFile specifiedFile getSpecifiedSourceFile specifiedFile closeZipFile specifiedFile
Answer the root File System Element that represents the contents of the currently specified zip file If this File System Element is not currently defined then create and return it private Minimized File System Element get File System Tree I Import Structure Provider provider null Minimized File System Element element null Zip File source File get Specified Source File if source File null File file new File source Name Field get Text if file exists provider File System Structure Provider INSTANCE element select Files file provider else zip file set as location provider get Structure Provider source File element select Files Zip File Structure Provider provider get Root provider this current Provider provider return element  FileSystemElement FileSystemElement MinimizedFileSystemElement getFileSystemTree IImportStructureProvider MinimizedFileSystemElement ZipFile sourceFile getSpecifiedSourceFile sourceFile sourceNameField getText FileSystemStructureProvider selectFiles getStructureProvider sourceFile selectFiles ZipFileStructureProvider getRoot currentProvider
Busy Indicator show While get Shell get Display new Runnable public void run Create the root element from the supplied file system object results 0 create Root Element root File System Object structure Provider  BusyIndicator showWhile getShell getDisplay createRootElement rootFileSystemObject structureProvider
Invokes a file selection operation using the specified file system and structure provider If the user specifies files then this selection is cached for later retrieval and is returned private Minimized File System Element select Files final Object root File System Object final I Import Structure Provider structure Provider final Minimized File System Element results new Minimized File System Element 1 Busy Indicator show While get Shell get Display new Runnable public void run Create the root element from the supplied file system object results 0 create Root Element root File System Object structure Provider return results 0  MinimizedFileSystemElement selectFiles rootFileSystemObject IImportStructureProvider structureProvider MinimizedFileSystemElement MinimizedFileSystemElement BusyIndicator showWhile getShell getDisplay createRootElement rootFileSystemObject structureProvider
Creates and returns a code Minimized File System Element code if the specified file system object merits one private Minimized File System Element create Root Element Object file System Object I Import Structure Provider provider boolean is Container provider is Folder file System Object String element Label provider get Label file System Object Use an empty label so that display of the element s full name doesn t include a confusing label Minimized File System Element dummy Parent new Minimized File System Element null true NON NLS 1 dummy Parent set Populated Minimized File System Element result new Minimized File System Element element Label dummy Parent is Container result set File System Object file System Object Get the files for the element so as to build the first level result get Files provider return dummy Parent  MinimizedFileSystemElement MinimizedFileSystemElement createRootElement fileSystemObject IImportStructureProvider isContainer isFolder fileSystemObject elementLabel getLabel fileSystemObject MinimizedFileSystemElement dummyParent MinimizedFileSystemElement dummyParent setPopulated MinimizedFileSystemElement MinimizedFileSystemElement elementLabel dummyParent isContainer setFileSystemObject fileSystemObject getFiles dummyParent
Answer a handle to the zip file currently specified as being the source Return code null code if this file does not exist or is not of valid format private Zip File get Specified Source File try String expanded source Name Field get Text expanded Variables Plugin get Default get String Variable Manager perform String Substitution expanded return new Zip File expanded catch Zip Exception e Status Info status new Status Info status set Error Ant Preferences Messages get String Add Custom Dialog Bad Format NON NLS 1 update Status status catch IO Exception e Status Info status new Status Info status set Error Ant Preferences Messages get String Add Custom Dialog Unreadable NON NLS 1 update Status status catch Core Exception e Status Info status new Status Info status set Error Ant Preferences Messages get String Add Custom Dialog 13 NON NLS 1 update Status status source Name Field set Focus return null  ZipFile getSpecifiedSourceFile sourceNameField getText VariablesPlugin getDefault getStringVariableManager performStringSubstitution ZipFile ZipException StatusInfo StatusInfo setError AntPreferencesMessages getString AddCustomDialog Bad_Format updateStatus IOException StatusInfo StatusInfo setError AntPreferencesMessages getString AddCustomDialog updateStatus CoreException StatusInfo StatusInfo setError AntPreferencesMessages getString AddCustomDialog updateStatus sourceNameField setFocus
Returns a structure provider for the specified zip file private Zip File Structure Provider get Structure Provider Zip File target Zip if provider Cache null provider Cache new Zip File Structure Provider target Zip else if provider Cache get Zip File get Name equals target Zip get Name clear Provider Cache ie new value so finalize remove old value provider Cache new Zip File Structure Provider target Zip else if provider Cache get Zip File equals target Zip close Zip File target Zip ie duplicate handle to same zip return provider Cache  ZipFileStructureProvider getStructureProvider ZipFile targetZip providerCache providerCache ZipFileStructureProvider targetZip providerCache getZipFile getName targetZip getName clearProviderCache providerCache ZipFileStructureProvider targetZip providerCache getZipFile targetZip closeZipFile targetZip providerCache
Repopulate the view based on the currently entered directory private void reset Selection Minimized File System Element current Root get File System Tree selection Group set Root current Root if class Name length 0 String Tokenizer tokenizer new String Tokenizer class Name NON NLS 1 select Class current Root tokenizer  resetSelection MinimizedFileSystemElement currentRoot getFileSystemTree selectionGroup setRoot currentRoot className StringTokenizer StringTokenizer className selectClass currentRoot
private void select Class Minimized File System Element current Parent String Tokenizer tokenizer if tokenizer has More Tokens return List folders current Parent get Folders current Provider if folders size 1 Minimized File System Element element Minimized File System Element folders get 0 if element get Label null equals NON NLS 1 selection Group select And Reveal Folder element select Class element tokenizer return String current Name tokenizer next Token if tokenizer has More Tokens Iterator all Folders folders iterator while all Folders has Next Minimized File System Element folder Minimized File System Element all Folders next if folder get Label null equals current Name selection Group select And Reveal Folder folder select Class folder tokenizer return else List files current Parent get Files current Provider Iterator iter files iterator while iter has Next Minimized File System Element file Minimized File System Element iter next if file get Label null equals current Name class NON NLS 1 selection Group select And Reveal File file return  selectClass MinimizedFileSystemElement currentParent StringTokenizer hasMoreTokens currentParent getFolders currentProvider MinimizedFileSystemElement MinimizedFileSystemElement getLabel selectionGroup selectAndRevealFolder selectClass currentName nextToken hasMoreTokens allFolders allFolders hasNext MinimizedFileSystemElement MinimizedFileSystemElement allFolders getLabel currentName selectionGroup selectAndRevealFolder selectClass currentParent getFiles currentProvider hasNext MinimizedFileSystemElement MinimizedFileSystemElement getLabel currentName selectionGroup selectAndRevealFile
return new Workbench Content Provider public Object get Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o return element get Files current Provider to Array return new Object 0  WorkbenchContentProvider getChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement getFiles currentProvider toArray
Returns a content provider for code Minimized File System Element code s that returns only files as children private I Tree Content Provider get File Provider return new Workbench Content Provider public Object get Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o return element get Files current Provider to Array return new Object 0  MinimizedFileSystemElement ITreeContentProvider getFileProvider WorkbenchContentProvider getChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement getFiles currentProvider toArray
return new Workbench Content Provider public Object get Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o return element get Folders current Provider to Array return new Object 0  WorkbenchContentProvider getChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement getFolders currentProvider toArray
public boolean has Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o if element is Populated return get Children element length 0 If we have not populated then wait until asked return true return false  hasChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement isPopulated getChildren
Returns a content provider for code Minimized File System Element code s that returns only folders as children private I Tree Content Provider get Folder Provider return new Workbench Content Provider public Object get Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o return element get Folders current Provider to Array return new Object 0 public boolean has Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o if element is Populated return get Children element length 0 If we have not populated then wait until asked return true return false  MinimizedFileSystemElement ITreeContentProvider getFolderProvider WorkbenchContentProvider getChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement getFolders currentProvider toArray hasChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement isPopulated getChildren
see org eclipse jface dialogs Dialog cancel Pressed protected void cancel Pressed clear Provider Cache super cancel Pressed  cancelPressed cancelPressed clearProviderCache cancelPressed
protected void ok Pressed clear Provider Cache name name Field get Text trim library Classpath Entry library Entries get source Name Field get Selection Index I Structured Selection selection this selection Group get List Table Selection Minimized File System Element element Minimized File System Element selection get First Element if element null super ok Pressed return Object file element get File System Object if file instanceof Zip Entry class Name Zip Entry file get Name else class Name File file get Absolute Path I Path class Path new Path class Name I Path library Path new Path library get EntryURL get Path int matching class Path matching First Segments library Path class Path class Path remove First Segments matching class Path class Path set Device null class Name class Path to String int index class Name last Index Of class Name class Name substring 0 index class Name class Name replace super ok Pressed  okPressed clearProviderCache nameField getText ClasspathEntry libraryEntries sourceNameField getSelectionIndex IStructuredSelection selectionGroup getListTableSelection MinimizedFileSystemElement MinimizedFileSystemElement getFirstElement okPressed getFileSystemObject ZipEntry className ZipEntry getName className getAbsolutePath IPath classPath className IPath libraryPath getEntryURL getPath classPath matchingFirstSegments libraryPath classPath classPath removeFirstSegments classPath classPath setDevice className classPath toString className lastIndexOf className className className className okPressed
protected String get Name return name  getName
protected void set Name String name this name name  setName
protected void set Library Entry I Ant Classpath Entry library this library library editing true  setLibraryEntry IAntClasspathEntry
protected I Ant Classpath Entry get Library Entry return this library  IAntClasspathEntry getLibraryEntry
protected String get Class Name return class Name  getClassName className
protected void set Class Name String class Name this class Name class Name  setClassName className className className
see org eclipse jface window Window create public void create super create get Button I Dialog Constants OK ID set Enabled library null  getButton IDialogConstants OK_ID setEnabled
protected void set Already Exists Error Msg String already Exists Error Msg this already Exists Error Msg already Exists Error Msg  setAlreadyExistsErrorMsg alreadyExistsErrorMsg alreadyExistsErrorMsg alreadyExistsErrorMsg
protected void set No Name Error Msg String no Name Error Msg this no Name Error Msg no Name Error Msg  setNoNameErrorMsg noNameErrorMsg noNameErrorMsg noNameErrorMsg

public Add Property Dialog Shell shell String title String initial Values super shell f Title title f Initial Values initial Values  AddPropertyDialog initialValues fTitle fInitialValues initialValues
protected Control create Dialog Area Composite parent Composite comp Composite super create Dialog Area parent Grid Layout comp get Layout num Columns 2 f Name Label new Label comp SWT NONE f Name Label set Text Ant Preferences Messages get String Add Property Dialog Name  1 NON NLS 1 f Name Label set Font comp get Font f Name Text new Text comp SWT BORDER SWT SINGLE f Name Text set Text f Initial Values 0 Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 300 f Name Text set Layout Data gd f Name Text set Font comp get Font f Name Text add Modify Listener new Modify Listener public void modify Text Modify Event e update Buttons f Value Label new Label comp SWT NONE f Value Label set Text Ant Preferences Messages get String Add Property Dialog Value  2 NON NLS 1 f Value Label set Font comp get Font f Value Text new Text comp SWT BORDER SWT SINGLE f Value Text set Text f Initial Values 1 gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 300 f Value Text set Layout Data gd f Value Text set Font comp get Font f Value Text add Modify Listener new Modify Listener public void modify Text Modify Event e update Buttons Button variables Button new Button comp SWT PUSH variables Button set Text Ant Preferences Messages get String Add Property Dialog 2 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN END gd horizontal Span 2 gd height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH gd width Hint Math max width Hint variables Button compute Size SWT DEFAULT SWT DEFAULT true x variables Button set Layout Data gd variables Button set Font comp get Font variables Button add Selection Listener new Selection Adapter public void widget Selected Selection Event se get Variable return comp  createDialogArea createDialogArea GridLayout getLayout numColumns fNameLabel fNameLabel setText AntPreferencesMessages getString AddPropertyDialog Name__1 fNameLabel setFont getFont fNameText fNameText setText fInitialValues GridData GridData GridData FILL_HORIZONTAL widthHint fNameText setLayoutData fNameText setFont getFont fNameText addModifyListener ModifyListener modifyText ModifyEvent updateButtons fValueLabel fValueLabel setText AntPreferencesMessages getString AddPropertyDialog Value__2 fValueLabel setFont getFont fValueText fValueText setText fInitialValues GridData GridData FILL_HORIZONTAL widthHint fValueText setLayoutData fValueText setFont getFont fValueText addModifyListener ModifyListener modifyText ModifyEvent updateButtons variablesButton variablesButton setText AntPreferencesMessages getString AddPropertyDialog GridData GridData HORIZONTAL_ALIGN_END horizontalSpan heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint variablesButton computeSize variablesButton setLayoutData variablesButton setFont getFont variablesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent getVariable
protected void get Variable String Variable Selection Dialog variables Dialog new String Variable Selection Dialog get Shell int return Code variables Dialog open if return Code I Dialog Constants OK ID String variable variables Dialog get Variable Expression if variable null f Value Text append variable trim  getVariable StringVariableSelectionDialog variablesDialog StringVariableSelectionDialog getShell returnCode variablesDialog returnCode IDialogConstants OK_ID variablesDialog getVariableExpression fValueText
Return the name value pair entered in this dialog If the cancel button was hit both will be code null code public String get Name Value Pair return new String f Name f Value  getNameValuePair fName fValue
protected void button Pressed int button Id if button Id I Dialog Constants OK ID f Name f Name Text get Text f Value f Value Text get Text else f Name null f Value null super button Pressed button Id  buttonPressed buttonId buttonId IDialogConstants OK_ID fName fNameText getText fValue fValueText getText fName fValue buttonPressed buttonId
protected void configure Shell Shell shell super configure Shell shell if f Title null shell set Text f Title if f Initial Values 0 length 0 Workbench Help set Help shell I AntUI Help Context Ids ADD PROPERTY DIALOG else Workbench Help set Help shell I AntUI Help Context Ids EDIT PROPERTY DIALOG  configureShell configureShell fTitle setText fTitle fInitialValues WorkbenchHelp setHelp IAntUIHelpContextIds ADD_PROPERTY_DIALOG WorkbenchHelp setHelp IAntUIHelpContextIds EDIT_PROPERTY_DIALOG
Enable the OK button if valid input protected void update Buttons String name f Name Text get Text trim String value f Value Text get Text trim get Button I Dialog Constants OK ID set Enabled name length 0 value length 0  updateButtons fNameText getText fValueText getText getButton IDialogConstants OK_ID setEnabled
Enable the buttons on creation see org eclipse jface window Window create public void create super create update Buttons  updateButtons

private Selection Listener selection Listener new Selection Adapter public void widget Selected Selection Event e Object source e get Source if source addJAR Button add Jars else if source add ExternalJAR Button add External Jars else if source add Folder Button add Folder NON NLS 1 else if up Button source handle Move Up else if down Button source handle Move Down else if remove Button source remove else if add Variable Button source add Variable else if ant Home Button source browse Ant Home  SelectionListener selectionListener SelectionAdapter widgetSelected SelectionEvent getSource addJARButton addJars addExternalJARButton addExternalJars addFolderButton addFolder upButton handleMoveUp downButton handleMoveDown removeButton addVariableButton addVariable antHomeButton browseAntHome
public void set Container I Ant Block Container container this container container  setContainer IAntBlockContainer
private void add Buttons To Button Group Composite parent up Button container create Push Button parent Ant Preferences Messages get String Ant Classpath Block up Button Title NON NLS 1 up Button add Selection Listener selection Listener down Button container create Push Button parent Ant Preferences Messages get String Ant Classpath Block down Button Title NON NLS 1 down Button add Selection Listener selection Listener remove Button container create Push Button parent Ant Preferences Messages get String Ant Classpath Block remove Button Title NON NLS 1 remove Button add Selection Listener selection Listener addJAR Button container create Push Button parent Ant Preferences Messages get String Ant Classpath Block add Jar Button Title NON NLS 1 addJAR Button add Selection Listener selection Listener add ExternalJAR Button container create Push Button parent Ant Preferences Messages get String Ant Classpath Block 42 NON NLS 1 add ExternalJAR Button add Selection Listener selection Listener add Folder Button container create Push Button parent Ant Preferences Messages get String Ant Classpath Block add Folder Button Title NON NLS 1 add Folder Button add Selection Listener selection Listener add Variable Button container create Push Button parent Ant Preferences Messages get String Ant Classpath Block 2 NON NLS 1 add Variable Button add Selection Listener selection Listener ant Home Button container create Push Button parent Ant Preferences Messages get String Ant Classpath Block 30 NON NLS 1 ant Home Button add Selection Listener selection Listener  addButtonsToButtonGroup upButton createPushButton AntPreferencesMessages getString AntClasspathBlock upButtonTitle upButton addSelectionListener selectionListener downButton createPushButton AntPreferencesMessages getString AntClasspathBlock downButtonTitle downButton addSelectionListener selectionListener removeButton createPushButton AntPreferencesMessages getString AntClasspathBlock removeButtonTitle removeButton addSelectionListener selectionListener addJARButton createPushButton AntPreferencesMessages getString AntClasspathBlock addJarButtonTitle addJARButton addSelectionListener selectionListener addExternalJARButton createPushButton AntPreferencesMessages getString AntClasspathBlock addExternalJARButton addSelectionListener selectionListener addFolderButton createPushButton AntPreferencesMessages getString AntClasspathBlock addFolderButtonTitle addFolderButton addSelectionListener selectionListener addVariableButton createPushButton AntPreferencesMessages getString AntClasspathBlock addVariableButton addSelectionListener selectionListener antHomeButton createPushButton AntPreferencesMessages getString AntClasspathBlock antHomeButton addSelectionListener selectionListener
Returns the selected items in the list in the order they are displayed return targets for an action private List get Ordered Selection I Classpath Entry parent List targets new Array List List selection I Structured Selection tree Viewer get Selection to List I Ant Classpath Entry entries parent get Entries for int i 0 i entries length i I Ant Classpath Entry target entries i if selection contains target targets add target return targets  getOrderedSelection IClasspathEntry ArrayList IStructuredSelection treeViewer getSelection toList IAntClasspathEntry getEntries IAntClasspathEntry
private void handle Move Down List targets get Ordered Selection current Parent List list new Array List Arrays as List current Parent get Entries int bottom list size 1 int index 0 for int i targets size 1 i 0 i Object target targets get i index list index Of target if index bottom bottom index 1 Object temp list get bottom list set bottom target list set index temp bottom index finish Move list  handleMoveDown getOrderedSelection currentParent ArrayList asList currentParent getEntries indexOf finishMove
private void finish Move List list Ant Classpath Content Provider viewer Content Provider Ant Classpath Content Provider tree Viewer get Content Provider viewer Content Provider set Entries current Parent list tree Viewer refresh tree Viewer set Selection tree Viewer get Selection update Container  finishMove AntClasspathContentProvider viewerContentProvider AntClasspathContentProvider treeViewer getContentProvider viewerContentProvider setEntries currentParent treeViewer treeViewer setSelection treeViewer getSelection updateContainer
private void handle Move Up List targets get Ordered Selection current Parent int top 0 int index 0 List list new Array List Arrays as List current Parent get Entries Iterator entries targets iterator while entries has Next Object target entries next index list index Of target if index top top index 1 Object temp list get top list set top target list set index temp top index finish Move list  handleMoveUp getOrderedSelection currentParent ArrayList asList currentParent getEntries hasNext indexOf finishMove
private void remove Ant Classpath Content Provider viewer Content Provider Ant Classpath Content Provider tree Viewer get Content Provider I Structured Selection sel I Structured Selection tree Viewer get Selection viewer Content Provider remove sel update Container  AntClasspathContentProvider viewerContentProvider AntClasspathContentProvider treeViewer getContentProvider IStructuredSelection IStructuredSelection treeViewer getSelection viewerContentProvider updateContainer
Allows the user to enter a folder as a classpath private void add Folder String last Used Path dialog Settings get I AntUI Constants DIALOGSTORE LASTFOLDER if last Used Path null last Used Path Resources Plugin get Workspace get Root get Location toOS String Directory Dialog dialog new Directory Dialog tree Viewer get Control get Shell dialog set Message Ant Preferences Messages get String Ant Classpath Block 1 NON NLS 1 dialog set Filter Path last Used Path String result dialog open if result null try URL url new URL file result NON NLS 2 NON NLS 1 Ant Classpath Content Provider tree Viewer get Content Provider add current Parent url catch MalformedURL Exception e tree Viewer set Selection tree Viewer get Selection dialog Settings put I AntUI Constants DIALOGSTORE LASTFOLDER result update Container  addFolder lastUsedPath dialogSettings IAntUIConstants DIALOGSTORE_LASTFOLDER lastUsedPath lastUsedPath ResourcesPlugin getWorkspace getRoot getLocation toOSString DirectoryDialog DirectoryDialog treeViewer getControl getShell setMessage AntPreferencesMessages getString AntClasspathBlock setFilterPath lastUsedPath AntClasspathContentProvider treeViewer getContentProvider currentParent MalformedURLException treeViewer setSelection treeViewer getSelection dialogSettings IAntUIConstants DIALOGSTORE_LASTFOLDER updateContainer
private void add External Jars String last Used Path dialog Settings get I AntUI Constants DIALOGSTORE LASTEXTJAR if last Used Path null last Used Path Resources Plugin get Workspace get Root get Location toOS String File Dialog dialog new File Dialog tree Viewer get Control get Shell SWT MULTI dialog set Filter Extensions new String jar zip NON NLS 1 dialog set Filter Path last Used Path String result dialog open if result null return I Path filter Path new Path dialog get Filter Path String results dialog get File Names Ant Classpath Content Provider content Provider Ant Classpath Content Provider tree Viewer get Content Provider content Provider set Refresh Enabled false for int i 0 i results length i String jar Name results i try I Path path filter Path append jar Name make Absolute URL url new URL file path toOS String NON NLS 1 content Provider add current Parent url catch MalformedURL Exception e content Provider set Refresh Enabled true tree Viewer set Selection tree Viewer get Selection dialog Settings put I AntUI Constants DIALOGSTORE LASTEXTJAR filter Path toOS String update Container  addExternalJars lastUsedPath dialogSettings IAntUIConstants DIALOGSTORE_LASTEXTJAR lastUsedPath lastUsedPath ResourcesPlugin getWorkspace getRoot getLocation toOSString FileDialog FileDialog treeViewer getControl getShell setFilterExtensions setFilterPath lastUsedPath IPath filterPath getFilterPath getFileNames AntClasspathContentProvider contentProvider AntClasspathContentProvider treeViewer getContentProvider contentProvider setRefreshEnabled jarName IPath filterPath jarName makeAbsolute toOSString contentProvider currentParent MalformedURLException contentProvider setRefreshEnabled treeViewer setSelection treeViewer getSelection dialogSettings IAntUIConstants DIALOGSTORE_LASTEXTJAR filterPath toOSString updateContainer
I Selection Status Validator validator new I Selection Status Validator public I Status validate Object selection if selection length 0 return new Status I Status ERROR AntUI Plugin get Unique Identifier 0 null NON NLS 1 for int i 0 i selection length i if selection i instanceof I File return new Status I Status ERROR AntUI Plugin get Unique Identifier 0 null NON NLS 1 return new Status I Status OK AntUI Plugin get Unique Identifier 0 null NON NLS 1  ISelectionStatusValidator ISelectionStatusValidator IStatus IStatus AntUIPlugin getUniqueIdentifier IFile IStatus AntUIPlugin getUniqueIdentifier IStatus AntUIPlugin getUniqueIdentifier
private void add Jars List all Entries new Array List if current Parent null all Entries add All Arrays as List current Parent get Entries else Object entries ant Content Provider get Model get Entries Classpath Model USER if entries null all Entries add All Arrays as List entries Viewer Filter filter new Archive Filter all Entries I Label Provider lp new Workbench Label Provider I Tree Content Provider cp new Workbench Content Provider Element Tree Selection Dialog dialog new Element Tree Selection Dialog tree Viewer get Control get Shell lp cp dialog set Title Ant Preferences Messages get String Ant Classpath Block 44 NON NLS 1 dialog set Message Ant Preferences Messages get String Ant Classpath Block 45 NON NLS 1 dialog add Filter filter dialog set Input Resources Plugin get Workspace get Root dialog set Sorter new Resource Sorter Resource Sorter NAME I Selection Status Validator validator new I Selection Status Validator public I Status validate Object selection if selection length 0 return new Status I Status ERROR AntUI Plugin get Unique Identifier 0 null NON NLS 1 for int i 0 i selection length i if selection i instanceof I File return new Status I Status ERROR AntUI Plugin get Unique Identifier 0 null NON NLS 1 return new Status I Status OK AntUI Plugin get Unique Identifier 0 null NON NLS 1 dialog set Validator validator if dialog open Window OK Object elements dialog get Result Ant Classpath Content Provider content Provider Ant Classpath Content Provider tree Viewer get Content Provider content Provider set Refresh Enabled false for int i 0 i elements length i I File file I File elements i String var Expression Variables Plugin get Default get String Variable Manager generate Variable Expression workspace loc file get Full Path to String NON NLS 1 content Provider add current Parent var Expression content Provider set Refresh Enabled true update Container  addJars allEntries ArrayList currentParent allEntries addAll asList currentParent getEntries antContentProvider getModel getEntries ClasspathModel allEntries addAll asList ViewerFilter ArchiveFilter allEntries ILabelProvider WorkbenchLabelProvider ITreeContentProvider WorkbenchContentProvider ElementTreeSelectionDialog ElementTreeSelectionDialog treeViewer getControl getShell setTitle AntPreferencesMessages getString AntClasspathBlock setMessage AntPreferencesMessages getString AntClasspathBlock addFilter setInput ResourcesPlugin getWorkspace getRoot setSorter ResourceSorter ResourceSorter ISelectionStatusValidator ISelectionStatusValidator IStatus IStatus AntUIPlugin getUniqueIdentifier IFile IStatus AntUIPlugin getUniqueIdentifier IStatus AntUIPlugin getUniqueIdentifier setValidator getResult AntClasspathContentProvider contentProvider AntClasspathContentProvider treeViewer getContentProvider contentProvider setRefreshEnabled IFile IFile varExpression VariablesPlugin getDefault getStringVariableManager generateVariableExpression workspace_loc getFullPath toString contentProvider currentParent varExpression contentProvider setRefreshEnabled updateContainer
private void update Container validated 0 container update  updateContainer
Creates the group which will contain the buttons private void create Button Group Composite top Composite button Group new Composite top SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 button Group set Layout layout button Group set Layout Data new Grid Data Grid Data FILL VERTICAL button Group set Font top get Font add Buttons To Button Group button Group  createButtonGroup buttonGroup GridLayout GridLayout marginHeight marginWidth buttonGroup setLayout buttonGroup setLayoutData GridData GridData FILL_VERTICAL buttonGroup setFont getFont addButtonsToButtonGroup buttonGroup
tree add Key Listener new Key Adapter public void key Pressed Key Event event if event character SWT DEL event state Mask 0 remove  addKeyListener KeyAdapter keyPressed KeyEvent stateMask
tree Viewer set Label Provider label Provider tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event table Selection Changed I Structured Selection event get Selection Ant Classpath Content Provider tree Viewer get Content Provider  treeViewer setLabelProvider labelProvider treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent tableSelectionChanged IStructuredSelection getSelection AntClasspathContentProvider treeViewer getContentProvider
private void create Classpath Tree Composite parent Tree tree new Tree parent SWT MULTI SWT FULL SELECTION SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data width Hint I Dialog Constants ENTRY FIELD WIDTH data height Hint tree get Item Height tree set Layout Data data tree set Font parent get Font tree add Key Listener new Key Adapter public void key Pressed Key Event event if event character SWT DEL event state Mask 0 remove ant Content Provider new Ant Classpath Content Provider tree Viewer new Tree Viewer tree tree Viewer set Content Provider ant Content Provider tree Viewer set Label Provider label Provider tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event table Selection Changed I Structured Selection event get Selection Ant Classpath Content Provider tree Viewer get Content Provider  createClasspathTree FULL_SELECTION GridData GridData GridData FILL_BOTH widthHint IDialogConstants ENTRY_FIELD_WIDTH heightHint getItemHeight setLayoutData setFont getFont addKeyListener KeyAdapter keyPressed KeyEvent stateMask antContentProvider AntClasspathContentProvider treeViewer TreeViewer treeViewer setContentProvider antContentProvider treeViewer setLabelProvider labelProvider treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent tableSelectionChanged IStructuredSelection getSelection AntClasspathContentProvider treeViewer getContentProvider
public void create Contents Composite parent create Classpath Tree parent create Button Group parent table Selection Changed I Structured Selection tree Viewer get Selection ant Content Provider  createContents createClasspathTree createButtonGroup tableSelectionChanged IStructuredSelection treeViewer getSelection antContentProvider
private void table Selection Changed I Structured Selection selection Ant Classpath Content Provider content Provider boolean not Empty selection is Empty Iterator selected selection iterator boolean first false boolean last false boolean can Remove true while selected has Next I Classpath Entry element I Classpath Entry selected next if element instanceof Global Classpath Entries if Global Classpath Entries element can Be Removed can Remove false I Classpath Entry parent element get Parent Object child Entries content Provider get Children parent List entries Arrays as List child Entries int last Entry Index entries size 1 if first entries index Of element 0 first true if last entries index Of element last Entry Index last true boolean can Add resolve Current Parent selection not Empty if addJAR Button null addJAR Button set Enabled can Add add ExternalJAR Button set Enabled can Add add Folder Button set Enabled can Add add Variable Button set Enabled can Add remove Button set Enabled not Empty can Remove up Button set Enabled can Remove not Empty first down Button set Enabled can Remove not Empty last  tableSelectionChanged IStructuredSelection AntClasspathContentProvider contentProvider notEmpty isEmpty canRemove hasNext IClasspathEntry IClasspathEntry GlobalClasspathEntries GlobalClasspathEntries canBeRemoved canRemove IClasspathEntry getParent childEntries contentProvider getChildren asList childEntries lastEntryIndex indexOf indexOf lastEntryIndex canAdd resolveCurrentParent notEmpty addJARButton addJARButton setEnabled canAdd addExternalJARButton setEnabled canAdd addFolderButton setEnabled canAdd addVariableButton setEnabled canAdd removeButton setEnabled notEmpty canRemove upButton setEnabled canRemove notEmpty downButton setEnabled canRemove notEmpty
private boolean resolve Current Parent I Structured Selection selection current Parent null Iterator selected selection iterator while selected has Next Object element selected next if element instanceof Classpath Entry I Classpath Entry parent I Classpath Entry element get Parent if current Parent null if current Parent equals parent return false else current Parent parent else if current Parent null if current Parent equals element return false else current Parent I Classpath Entry element return true  resolveCurrentParent IStructuredSelection currentParent hasNext ClasspathEntry IClasspathEntry IClasspathEntry getParent currentParent currentParent currentParent currentParent currentParent currentParent IClasspathEntry
private File validate Ant Home String path File root Dir null boolean invalid true if path length 0 root Dir new File path lib NON NLS 1 File parent Dir root Dir get Parent File if parent Dir null parent Dir exists container set Error Message Ant Preferences Messages get String Ant Classpath Block 56 NON NLS 1 else if root Dir exists container set Error Message Ant Preferences Messages get String Ant Classpath Block 7 NON NLS 1 else invalid false else container set Error Message Ant Preferences Messages get String Ant Classpath Block 57 NON NLS 1 if invalid set Validated return null container set Error Message null return root Dir  validateAntHome rootDir rootDir parentDir rootDir getParentFile parentDir parentDir setErrorMessage AntPreferencesMessages getString AntClasspathBlock rootDir setErrorMessage AntPreferencesMessages getString AntClasspathBlock setErrorMessage AntPreferencesMessages getString AntClasspathBlock setValidated setErrorMessage rootDir
private void browse Ant Home String last Used Path dialog Settings get I AntUI Constants DIALOGSTORE LASTANTHOME if last Used Path null last Used Path Resources Plugin get Workspace get Root get Location toOS String Directory Dialog dialog new Directory Dialog tree Viewer get Control get Shell dialog set Message Ant Preferences Messages get String Ant Classpath Block 3 NON NLS 1 dialog set Filter Path last Used Path String path dialog open if path null return ant Home path if path length 0 File root Dir new File path lib NON NLS 1 set Ant Home root Dir else update Container dialog Settings put I AntUI Constants DIALOGSTORE LASTANTHOME path  browseAntHome lastUsedPath dialogSettings IAntUIConstants DIALOGSTORE_LASTANTHOME lastUsedPath lastUsedPath ResourcesPlugin getWorkspace getRoot getLocation toOSString DirectoryDialog DirectoryDialog treeViewer getControl getShell setMessage AntPreferencesMessages getString AntClasspathBlock setFilterPath lastUsedPath antHome rootDir setAntHome rootDir updateContainer dialogSettings IAntUIConstants DIALOGSTORE_LASTANTHOME
private void set Ant Home File root Dir Ant Classpath Content Provider content Provider Ant Classpath Content Provider tree Viewer get Content Provider content Provider set Refresh Enabled false content Provider remove All Global Ant Classpath Entries String names root Dir list if names null Arrays sort names for int i 0 i names length i File file new File root Dir names i if file is File file get Path ends With jar NON NLS 1 try URL url new URL file file get Absolute Path NON NLS 1 content Provider add Classpath Model ANT HOME url catch MalformedURL Exception e content Provider set Refresh Enabled true update Container  setAntHome rootDir AntClasspathContentProvider contentProvider AntClasspathContentProvider treeViewer getContentProvider contentProvider setRefreshEnabled contentProvider removeAllGlobalAntClasspathEntries rootDir rootDir isFile getPath endsWith getAbsolutePath contentProvider ClasspathModel ANT_HOME MalformedURLException contentProvider setRefreshEnabled updateContainer
public String get Ant Home return ant Home  getAntHome antHome
public void initialize Ant Home String ant Home String ant Home ant Home String  initializeAntHome antHomeString antHome antHomeString
public void set Input Classpath Model model tree Viewer set Input model validated 0  setInput ClasspathModel treeViewer setInput
public boolean validate Ant Home validated return validate Ant Home ant Home null  validateAntHome validateAntHome antHome
public Image get Classpath Image return label Provider get Classpath Image  getClasspathImage labelProvider getClasspathImage
public boolean validate ToolsJAR validated boolean check AntUI Plugin get Default get Preference Store get Boolean I AntUI Preference Constants ANT TOOLS JAR WARNING if check AntUI Plugin is MacOS Object entries ant Content Provider get Model get Entries Classpath Model ANT HOME boolean valid JAR Present entries TOOLS is Empty if valid entries ant Content Provider get Model get Entries Classpath Model GLOBAL USER valid JAR Present entries TOOLS is Empty if valid entries ant Content Provider get Model get Entries Classpath Model USER valid JAR Present entries TOOLS is Empty if valid Message Dialog With Toggle dialog Message Dialog With Toggle open Yes No Question AntUI Plugin get Active Workbench Window get Shell Ant Preferences Messages get String Ant Classpath Block 31 Ant Preferences Messages get String Ant Classpath Block 32 Ant Preferences Messages get String Ant Classpath Block 33 false AntUI Plugin get Default get Preference Store I AntUI Preference Constants ANT TOOLS JAR WARNING NON NLS 1 NON NLS 2 NON NLS 3 valid dialog get Return Code I Dialog Constants YES ID if valid container set Error Message Ant Preferences Messages get String Ant Classpath Block 34 NON NLS 1 set Validated return valid return true  validateToolsJAR AntUIPlugin getDefault getPreferenceStore getBoolean IAntUIPreferenceConstants ANT_TOOLS_JAR_WARNING AntUIPlugin isMacOS antContentProvider getModel getEntries ClasspathModel ANT_HOME JARPresent isEmpty antContentProvider getModel getEntries ClasspathModel GLOBAL_USER JARPresent isEmpty antContentProvider getModel getEntries ClasspathModel JARPresent isEmpty MessageDialogWithToggle MessageDialogWithToggle openYesNoQuestion AntUIPlugin getActiveWorkbenchWindow getShell AntPreferencesMessages getString AntClasspathBlock AntPreferencesMessages getString AntClasspathBlock AntPreferencesMessages getString AntClasspathBlock AntUIPlugin getDefault getPreferenceStore IAntUIPreferenceConstants ANT_TOOLS_JAR_WARNING getReturnCode IDialogConstants YES_ID setErrorMessage AntPreferencesMessages getString AntClasspathBlock setValidated
private List JAR Present Object classpath Entries String suffixes if classpath Entries null return Collections EMPTY LIST List found new Array List 2 for int i 0 i classpath Entries length i String file Object entry classpath Entries i if entry instanceof URL file URL entry get File else file entry to String for int j 0 j suffixes length j String suffix suffixes j if file ends With suffix found add suffix return found  JARPresent classpathEntries classpathEntries EMPTY_LIST ArrayList classpathEntries classpathEntries getFile toString endsWith
public boolean is Validated return validated 2  isValidated
public void set Validated validated 2  setValidated
private void add Variable Variable Input Dialog input Dialog new Variable Input Dialog tree Viewer get Control get Shell input Dialog open String variable String input Dialog get Variable String if variable String null variable String trim length 0 Ant Classpath Content Provider tree Viewer get Content Provider add current Parent variable String tree Viewer set Selection tree Viewer get Selection update Container  addVariable VariableInputDialog inputDialog VariableInputDialog treeViewer getControl getShell inputDialog variableString inputDialog getVariableString variableString variableString AntClasspathContentProvider treeViewer getContentProvider currentParent variableString treeViewer setSelection treeViewer getSelection updateContainer

public void add I Classpath Entry parent Object child Object new Entry null boolean added false if parent null parent model added true new Entry model add Entry child if new Entry null entry already exists new Entry model create Entry child model added false parent model else if parent instanceof Global Classpath Entries Global Classpath Entries global Parent Global Classpath Entries parent new Entry model create Entry child global Parent Classpath Entry new Classpath Entry Classpath Entry new Entry if global Parent contains new Classpath Entry added true global Parent add Entry new Classpath Entry if new Entry null if added tree Viewer add parent new Entry tree Viewer set Expanded State parent true tree Viewer set Selection new Structured Selection new Entry true refresh  IClasspathEntry newEntry newEntry addEntry newEntry newEntry createEntry GlobalClasspathEntries GlobalClasspathEntries globalParent GlobalClasspathEntries newEntry createEntry globalParent ClasspathEntry newClasspathEntry ClasspathEntry newEntry globalParent newClasspathEntry globalParent addEntry newClasspathEntry newEntry treeViewer newEntry treeViewer setExpandedState treeViewer setSelection StructuredSelection newEntry
public void add int entry Type Object child Object new Entry model add Entry entry Type child if new Entry null tree Viewer add get Parent new Entry new Entry refresh  entryType newEntry addEntry entryType newEntry treeViewer getParent newEntry newEntry
public void remove All model remove All refresh  removeAll removeAll
private void refresh if refresh Enabled tree Viewer refresh refresh Requested false else refresh Requested true  refreshEnabled treeViewer refreshRequested refreshRequested
public void remove All Global Ant Classpath Entries model remove All Classpath Model ANT HOME refresh  removeAllGlobalAntClasspathEntries removeAll ClasspathModel ANT_HOME
see I Tree Content Provider get Parent Object public Object get Parent Object element if element instanceof Classpath Entry return Classpath Entry element get Parent if element instanceof Global Classpath Entries return model return null  ITreeContentProvider getParent getParent ClasspathEntry ClasspathEntry getParent GlobalClasspathEntries
see I Tree Content Provider has Children Object public boolean has Children Object element if element instanceof Classpath Entry return false if element instanceof Global Classpath Entries return Global Classpath Entries element has Entries if element instanceof Classpath Model return Classpath Model element has Entries return false  ITreeContentProvider hasChildren hasChildren ClasspathEntry GlobalClasspathEntries GlobalClasspathEntries hasEntries ClasspathModel ClasspathModel hasEntries
see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return get Children input Element  IStructuredContentProvider getElements getElements inputElement getChildren inputElement
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
public void input Changed Viewer viewer Object old Input Object new Input tree Viewer Tree Viewer viewer if new Input null model Classpath Model new Input else if model null model remove All model null  inputChanged oldInput newInput treeViewer TreeViewer newInput ClasspathModel newInput removeAll
public Object get Children Object parent Element if parent Element instanceof Global Classpath Entries return Global Classpath Entries parent Element get Entries if parent Element instanceof Classpath Model return Classpath Model parent Element get Entries if parent Element null List all new Array List Object top Entries model get Entries for int i 0 i top Entries length i Object object top Entries i if object instanceof Classpath Entry all add object else if object instanceof Global Classpath Entries all add All Arrays as List Global Classpath Entries object get Entries return all to Array return null  getChildren parentElement parentElement GlobalClasspathEntries GlobalClasspathEntries parentElement getEntries parentElement ClasspathModel ClasspathModel parentElement getEntries parentElement ArrayList topEntries getEntries topEntries topEntries ClasspathEntry GlobalClasspathEntries addAll asList GlobalClasspathEntries getEntries toArray
public void remove I Structured Selection selection Object array selection to Array model remove All array tree Viewer remove array refresh  IStructuredSelection toArray removeAll treeViewer
public Classpath Model get Model return model  ClasspathModel getModel
public void set Refresh Enabled boolean refresh Enabled this refresh Enabled refresh Enabled tree Viewer get Tree set Redraw refresh Enabled if refresh Enabled refresh Requested refresh  setRefreshEnabled refreshEnabled refreshEnabled refreshEnabled treeViewer getTree setRedraw refreshEnabled refreshEnabled refreshRequested
param current Parent public void set Entries I Classpath Entry current Parent List entries if current Parent instanceof Global Classpath Entries Global Classpath Entries group Global Classpath Entries current Parent group set Entries entries  currentParent setEntries IClasspathEntry currentParent currentParent GlobalClasspathEntries GlobalClasspathEntries GlobalClasspathEntries currentParent setEntries

private Ant Classpath Block f Block public Ant Classpath Label Provider Ant Classpath Block block f Block block  AntClasspathBlock fBlock AntClasspathLabelProvider AntClasspathBlock fBlock
private Image get Folder Image return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJ FOLDER  getFolderImage getWorkbench getSharedImages getImage ISharedImages IMG_OBJ_FOLDER
private Image get Jar Image return AntUI Images get Image I AntUI Constants IMG JAR FILE  getJarImage AntUIImages getImage IAntUIConstants IMG_JAR_FILE
public Image get Classpath Image return AntUI Images get Image I AntUI Constants IMG TAB CLASSPATH  getClasspathImage AntUIImages getImage IAntUIConstants IMG_TAB_CLASSPATH
public Image get Image Object element String file if element instanceof Classpath Entry Classpath Entry entry Classpath Entry element file entry to String if file ends With NON NLS 1 return get Folder Image return get Jar Image return get Classpath Image  getImage ClasspathEntry ClasspathEntry ClasspathEntry toString endsWith getFolderImage getJarImage getClasspathImage
public String get Text Object element if element instanceof I Ant Classpath Entry String Buffer label new String Buffer I Ant Classpath Entry element get Label if element instanceof Global Classpath Entries Global Classpath Entries element get Type Classpath Model ANT HOME Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences String default Ant Home prefs get Default Ant Home String current Ant Home f Block get Ant Home label append NON NLS 1 if default Ant Home equals current Ant Home label append Ant Preferences Messages get String Ant Classpath Label Provider 0 NON NLS 1 else label append f Block get Ant Home label append return label to String return element to String  getText IAntClasspathEntry StringBuffer StringBuffer IAntClasspathEntry getLabel GlobalClasspathEntries GlobalClasspathEntries getType ClasspathModel ANT_HOME AntCorePreferences AntCorePlugin getPlugin getPreferences defaultAntHome getDefaultAntHome currentAntHome fBlock getAntHome defaultAntHome currentAntHome AntPreferencesMessages getString AntClasspathLabelProvider fBlock getAntHome toString toString
public Color get Background Object element if element instanceof Global Classpath Entries Display display Display get Current return display get System Color SWT COLOR INFO BACKGROUND else if element instanceof Classpath Entry return null  getBackground GlobalClasspathEntries getCurrent getSystemColor COLOR_INFO_BACKGROUND ClasspathEntry
see org eclipse jface viewers I Color Provider get Foreground java lang Object public Color get Foreground Object element return null  IColorProvider getForeground getForeground
see org eclipse jface viewers I Base Label Provider add Listener org eclipse jface viewers I Label Provider Listener public void add Listener I Label Provider Listener listener  IBaseLabelProvider addListener ILabelProviderListener addListener ILabelProviderListener
see org eclipse jface viewers I Base Label Provider dispose public void dispose  IBaseLabelProvider
see org eclipse jface viewers I Base Label Provider is Label Property java lang Object java lang String public boolean is Label Property Object element String property return false  IBaseLabelProvider isLabelProperty isLabelProperty
see org eclipse jface viewers I Base Label Provider remove Listener org eclipse jface viewers I Label Provider Listener public void remove Listener I Label Provider Listener listener  IBaseLabelProvider removeListener ILabelProviderListener removeListener ILabelProviderListener

Creates an instance public Ant Classpath Page Ant Runtime Preference Page preference Page this preference Page preference Page  AntClasspathPage AntRuntimePreferencePage preferencePage preferencePage preferencePage
Returns the specified user classpath entries return set of user classpath entries protected I Ant Classpath Entry get Additional Entries return model get Entries Classpath Model GLOBAL USER  IAntClasspathEntry getAdditionalEntries getEntries ClasspathModel GLOBAL_USER
Returns the specified ant home classpath entries protected I Ant Classpath Entry get Ant Home Entries return model get Entries Classpath Model ANT HOME  IAntClasspathEntry getAntHomeEntries getEntries ClasspathModel ANT_HOME
protected String get Ant Home return ant Classpath Block get Ant Home  getAntHome antClasspathBlock getAntHome
Sets the contents of the tables on this page protected void initialize Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences create Classpath Model ant Classpath Block initialize Ant Home prefs get Ant Home ant Classpath Block set Input model preference Page set Error Message null preference Page set Valid true  AntCorePreferences AntCorePlugin getPlugin getPreferences createClasspathModel antClasspathBlock initializeAntHome getAntHome antClasspathBlock setInput preferencePage setErrorMessage preferencePage setValid
protected void create Classpath Model model new Classpath Model Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences model set Ant Home Entries prefs get Ant Home Classpath Entries model set Global Entries prefs get Additional Classpath Entries  createClasspathModel ClasspathModel AntCorePreferences AntCorePlugin getPlugin getPreferences setAntHomeEntries getAntHomeClasspathEntries setGlobalEntries getAdditionalClasspathEntries
protected void perform Defaults Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences model new Classpath Model model set Ant Home Entries prefs get Default Ant Home Entries I Ant Classpath Entry tools Entry prefs get Tools Jar Entry I Ant Classpath Entry additional Entries if tools Entry null additional Entries new I Ant Classpath Entry 0 else additional Entries new I Ant Classpath Entry tools Entry model set Global Entries additional Entries ant Classpath Block initialize Ant Home prefs get Default Ant Home ant Classpath Block set Input model update  performDefaults AntCorePreferences AntCorePlugin getPlugin getPreferences ClasspathModel setAntHomeEntries getDefaultAntHomeEntries IAntClasspathEntry toolsEntry getToolsJarEntry IAntClasspathEntry additionalEntries toolsEntry additionalEntries IAntClasspathEntry additionalEntries IAntClasspathEntry toolsEntry setGlobalEntries additionalEntries antClasspathBlock initializeAntHome getDefaultAntHome antClasspathBlock setInput
Creates the tab item that contains this sub page protected Tab Item create Tab Item Tab Folder folder Tab Item item new Tab Item folder SWT NONE item set Text Ant Preferences Messages get String Ant Classpath Page title NON NLS 1 item set Image ant Classpath Block get Classpath Image item set Data this item set Control create Contents folder return item  TabItem createTabItem TabFolder TabItem TabItem setText AntPreferencesMessages getString AntClasspathPage setImage antClasspathBlock getClasspathImage setData setControl createContents
Creates this page s controls protected Composite create Contents Composite parent Workbench Help set Help parent I AntUI Help Context Ids ANT CLASSPATH PAGE Font font parent get Font Composite top new Composite parent SWT NONE top set Font font Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 2 layout margin Width 2 top set Layout layout top set Layout Data new Grid Data Grid Data FILL BOTH ant Classpath Block set Container this ant Classpath Block create Contents top return top  createContents WorkbenchHelp setHelp IAntUIHelpContextIds ANT_CLASSPATH_PAGE getFont setFont GridLayout GridLayout numColumns marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_BOTH antClasspathBlock setContainer antClasspathBlock createContents
public void update if ant Classpath Block is Validated return set Message null set Error Message null boolean valid ant Classpath Block validate Ant Home if valid valid ant Classpath Block validate ToolsJAR preference Page set Valid valid  antClasspathBlock isValidated setMessage setErrorMessage antClasspathBlock validateAntHome antClasspathBlock validateToolsJAR preferencePage setValid
see org eclipse ant internal ui preferences I Ant Block Container set Message java lang String public void set Message String message preference Page set Message message  IAntBlockContainer setMessage setMessage preferencePage setMessage
see org eclipse ant internal ui preferences I Ant Block Container set Error Message java lang String public void set Error Message String message preference Page set Error Message message  IAntBlockContainer setErrorMessage setErrorMessage preferencePage setErrorMessage
public Button create Push Button Composite parent String button Text Button button new Button parent SWT PUSH button set Font parent get Font button set Text button Text preference Page set Button Layout Data button return button  createPushButton buttonText setFont getFont setText buttonText preferencePage setButtonLayoutData

protected Overlay Preference Store create Overlay Store Array List overlay Keys new Array List overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Ant Editor Preference Constants CODEASSIST AUTOACTIVATION overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store INT Ant Editor Preference Constants CODEASSIST AUTOACTIVATION DELAY overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Ant Editor Preference Constants CODEASSIST AUTOINSERT overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Ant Editor Preference Constants CODEASSIST USER DEFINED TASKS overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Ant Editor Preference Constants CODEASSIST PROPOSALS BACKGROUND overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Ant Editor Preference Constants CODEASSIST PROPOSALS FOREGROUND overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Ant Editor Preference Constants CODEASSIST AUTOACTIVATION TRIGGERS Overlay Preference Store Overlay Key keys new Overlay Preference Store Overlay Key overlay Keys size overlay Keys to Array keys return new Overlay Preference Store get Preference Store keys  OverlayPreferenceStore createOverlayStore ArrayList overlayKeys ArrayList overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION_DELAY overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants CODEASSIST_AUTOINSERT overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants CODEASSIST_USER_DEFINED_TASKS overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants CODEASSIST_PROPOSALS_BACKGROUND overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants CODEASSIST_PROPOSALS_FOREGROUND overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION_TRIGGERS OverlayPreferenceStore OverlayKey OverlayPreferenceStore OverlayKey overlayKeys overlayKeys toArray OverlayPreferenceStore getPreferenceStore
private Label get Label Control Control labelled Text Field return Label labelled Text Field 0  getLabelControl labelledTextField labelledTextField
private Text get Text Control Control labelled Text Field return Text labelled Text Field 1  getTextControl labelledTextField labelledTextField
final Button autoactivation add Check Box content Assist Composite text Ant Editor Preference Constants CODEASSIST AUTOACTIVATION 0 autoactivation add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Autoactivation Controls  addCheckBox contentAssistComposite AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateAutoactivationControls
f Content Assist Color List add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  fContentAssistColorList addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
do nothing public void widget Selected Selection Event e handle Content Assist Color List Selection  widgetSelected SelectionEvent handleContentAssistColorListSelection
color Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  colorButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Selected Selection Event e int i f Content Assist Color List get Selection Index String key f Content Assist Color List Model i 1 Preference Converter set Value get Overlay Store key f Content Assist Color Editor get Color Value  widgetSelected SelectionEvent fContentAssistColorList getSelectionIndex fContentAssistColorListModel PreferenceConverter setValue getOverlayStore fContentAssistColorEditor getColorValue
private Control create Content Assist Page Composite parent Font font parent get Font Composite content Assist Composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 content Assist Composite set Layout layout content Assist Composite set Font font String text Ant Preferences Messages get String Ant Code Assist Preference Page Insert NON NLS 1 add Check Box content Assist Composite text Ant Editor Preference Constants CODEASSIST AUTOINSERT 0 text Ant Preferences Messages get String Ant Code Assist Preference Page 0 NON NLS 1 add Check Box content Assist Composite text Ant Editor Preference Constants CODEASSIST USER DEFINED TASKS 0 text Ant Preferences Messages get String Ant Code Assist Preference Page Enable auto activation 2 NON NLS 1 final Button autoactivation add Check Box content Assist Composite text Ant Editor Preference Constants CODEASSIST AUTOACTIVATION 0 autoactivation add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Autoactivation Controls Control labelled Text Field text Ant Preferences Messages get String Ant Code Assist Preference Page Auto activation  delay  3 NON NLS 1 String error Messages new String Ant Preferences Messages get String Ant Code Assist Preference Page empty input auto activation Ant Preferences Messages get String Ant Code Assist Preference Page invalid input auto activation NON NLS 1 NON NLS 2 labelled Text Field add Labelled Text Field content Assist Composite text Ant Editor Preference Constants CODEASSIST AUTOACTIVATION DELAY 4 0 error Messages f Auto Insert Delay Label get Label Control labelled Text Field f Auto Insert Delay Text get Text Control labelled Text Field text Ant Preferences Messages get String Ant Code Assist Preference Page Auto activation tri ggers  4 NON NLS 1 labelled Text Field add Labelled Text Field content Assist Composite text Ant Editor Preference Constants CODEASSIST AUTOACTIVATION TRIGGERS 4 0 null f Auto Insert Trigger Label get Label Control labelled Text Field f Auto Insert Trigger Text get Text Control labelled Text Field Label label new Label content Assist Composite SWT LEFT label set Text Ant Preferences Messages get String Ant Code Assist Preference Page Code assist colo r options  5 NON NLS 1 label set Font font Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 label set Layout Data gd Composite editor Composite new Composite content Assist Composite SWT NONE layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 editor Composite set Layout layout editor Composite set Font font gd new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data FILL VERTICAL gd horizontal Span 2 editor Composite set Layout Data gd f Content Assist Color List new List editor Composite SWT SINGLE SWT V SCROLL SWT BORDER gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data FILL HORIZONTAL gd height Hint convert Height In Chars To Pixels 3 f Content Assist Color List set Layout Data gd f Content Assist Color List set Font font Composite styles Composite new Composite editor Composite SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 2 styles Composite set Layout layout styles Composite set Layout Data new Grid Data Grid Data FILL BOTH styles Composite set Font font label new Label styles Composite SWT LEFT label set Text Ant Preferences Messages get String Ant Editor Preference Page 6 NON NLS 1 label set Font font gd new Grid Data gd horizontal Alignment Grid Data BEGINNING label set Layout Data gd f Content Assist Color Editor new Color Editor styles Composite Button color Button f Content Assist Color Editor get Button gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING color Button set Layout Data gd f Content Assist Color List add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e handle Content Assist Color List Selection color Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e int i f Content Assist Color List get Selection Index String key f Content Assist Color List Model i 1 Preference Converter set Value get Overlay Store key f Content Assist Color Editor get Color Value return content Assist Composite  createContentAssistPage getFont contentAssistComposite GridLayout GridLayout numColumns contentAssistComposite setLayout contentAssistComposite setFont AntPreferencesMessages getString AntCodeAssistPreferencePage addCheckBox contentAssistComposite AntEditorPreferenceConstants CODEASSIST_AUTOINSERT AntPreferencesMessages getString AntCodeAssistPreferencePage addCheckBox contentAssistComposite AntEditorPreferenceConstants CODEASSIST_USER_DEFINED_TASKS AntPreferencesMessages getString AntCodeAssistPreferencePage Enable_auto_activation_2 addCheckBox contentAssistComposite AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateAutoactivationControls labelledTextField AntPreferencesMessages getString AntCodeAssistPreferencePage Auto_activation_ delay__3 errorMessages AntPreferencesMessages getString AntCodeAssistPreferencePage empty_input_auto_activation AntPreferencesMessages getString AntCodeAssistPreferencePage invalid_input_auto_activation labelledTextField addLabelledTextField contentAssistComposite AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION_DELAY errorMessages fAutoInsertDelayLabel getLabelControl labelledTextField fAutoInsertDelayText getTextControl labelledTextField AntPreferencesMessages getString AntCodeAssistPreferencePage Auto_activation_tri ggers__4 labelledTextField addLabelledTextField contentAssistComposite AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION_TRIGGERS fAutoInsertTriggerLabel getLabelControl labelledTextField fAutoInsertTriggerText getTextControl labelledTextField contentAssistComposite setText AntPreferencesMessages getString AntCodeAssistPreferencePage Code_assist_colo r_options__5 setFont GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan setLayoutData editorComposite contentAssistComposite GridLayout numColumns marginHeight marginWidth editorComposite setLayout editorComposite setFont GridData GridData HORIZONTAL_ALIGN_FILL GridData FILL_VERTICAL horizontalSpan editorComposite setLayoutData fContentAssistColorList editorComposite V_SCROLL GridData GridData VERTICAL_ALIGN_BEGINNING GridData FILL_HORIZONTAL heightHint convertHeightInCharsToPixels fContentAssistColorList setLayoutData fContentAssistColorList setFont stylesComposite editorComposite GridLayout marginHeight marginWidth numColumns stylesComposite setLayout stylesComposite setLayoutData GridData GridData FILL_BOTH stylesComposite setFont stylesComposite setText AntPreferencesMessages getString AntEditorPreferencePage setFont GridData horizontalAlignment GridData setLayoutData fContentAssistColorEditor ColorEditor stylesComposite colorButton fContentAssistColorEditor getButton GridData GridData FILL_HORIZONTAL horizontalAlignment GridData colorButton setLayoutData fContentAssistColorList addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent handleContentAssistColorListSelection colorButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent fContentAssistColorList getSelectionIndex fContentAssistColorListModel PreferenceConverter setValue getOverlayStore fContentAssistColorEditor getColorValue contentAssistComposite
private void handle Content Assist Color List Selection int i f Content Assist Color List get Selection Index String key f Content Assist Color List Model i 1 RGB rgb Preference Converter get Color get Overlay Store key f Content Assist Color Editor set Color Value rgb  handleContentAssistColorListSelection fContentAssistColorList getSelectionIndex fContentAssistColorListModel PreferenceConverter getColor getOverlayStore fContentAssistColorEditor setColorValue
private void update Autoactivation Controls boolean autoactivation get Overlay Store get Boolean Ant Editor Preference Constants CODEASSIST AUTOACTIVATION f Auto Insert Delay Text set Enabled autoactivation f Auto Insert Delay Label set Enabled autoactivation f Auto Insert Trigger Text set Enabled autoactivation f Auto Insert Trigger Label set Enabled autoactivation  updateAutoactivationControls getOverlayStore getBoolean AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION fAutoInsertDelayText setEnabled fAutoInsertDelayLabel setEnabled fAutoInsertTriggerText setEnabled fAutoInsertTriggerLabel setEnabled
protected Control create Contents Composite parent get Overlay Store load get Overlay Store start Composite control new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 control set Layout layout create Content Assist Page control initialize apply Dialog Font control TODO set help context Workbench Help set Help control I AntUI Help Context Ids ANT CONTENTASSIST PREFERENCE PAGE return control  createContents getOverlayStore getOverlayStore GridLayout GridLayout numColumns marginHeight marginWidth setLayout createContentAssistPage applyDialogFont WorkbenchHelp setHelp IAntUIHelpContextIds ANT_CONTENTASSIST_PREFERENCE_PAGE
f Content Assist Color List get Display async Exec new Runnable public void run if f Content Assist Color List null f Content Assist Color List is Disposed f Content Assist Color List select 0 handle Content Assist Color List Selection  fContentAssistColorList getDisplay asyncExec fContentAssistColorList fContentAssistColorList isDisposed fContentAssistColorList handleContentAssistColorListSelection
private void initialize initialize Fields for int i 0 i f Content Assist Color List Model length i f Content Assist Color List add f Content Assist Color List Model i 0 f Content Assist Color List get Display async Exec new Runnable public void run if f Content Assist Color List null f Content Assist Color List is Disposed f Content Assist Color List select 0 handle Content Assist Color List Selection  initializeFields fContentAssistColorListModel fContentAssistColorList fContentAssistColorListModel fContentAssistColorList getDisplay asyncExec fContentAssistColorList fContentAssistColorList isDisposed fContentAssistColorList handleContentAssistColorListSelection
see org eclipse ant internal ui preferences Abstract Ant Editor Preference Page handle Defaults protected void handle Defaults handle Content Assist Color List Selection  AbstractAntEditorPreferencePage handleDefaults handleDefaults handleContentAssistColorListSelection

protected Overlay Preference Store create Overlay Store List overlay Keys new Array List overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Ant Editor Preference Constants FORMATTER WRAP LONG overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Ant Editor Preference Constants FORMATTER ALIGN overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store INT Ant Editor Preference Constants FORMATTER MAX LINE LENGTH overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Ant Editor Preference Constants FORMATTER TAB CHAR overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store INT Ant Editor Preference Constants FORMATTER TAB SIZE Overlay Preference Store Overlay Key keys new Overlay Preference Store Overlay Key overlay Keys size overlay Keys to Array keys return new Overlay Preference Store get Preference Store keys  OverlayPreferenceStore createOverlayStore overlayKeys ArrayList overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants FORMATTER_WRAP_LONG overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants FORMATTER_ALIGN overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants FORMATTER_MAX_LINE_LENGTH overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants FORMATTER_TAB_CHAR overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants FORMATTER_TAB_SIZE OverlayPreferenceStore OverlayKey OverlayPreferenceStore OverlayKey overlayKeys overlayKeys toArray OverlayPreferenceStore getPreferenceStore
public void create Control Composite parent super create Control parent TODO set help Workbench Help set Help get Control ANT FORMATTER PREFERENCE PAGE NON NLS 1  createControl createControl WorkbenchHelp setHelp getControl ANT_FORMATTER_PREFERENCE_PAGE
protected Control create Contents Composite parent initialize Dialog Units parent get Overlay Store load get Overlay Store start int num Columns 2 Composite result new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout vertical Spacing convert VerticalDL Us To Pixels 10 layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING result set Layout layout Group indentation Group create Group num Columns result Ant Preferences Messages get String Ant Code Formatter Preference Page 0 NON NLS 1 String label Text Ant Preferences Messages get String Ant Code Formatter Preference Page 1 NON NLS 1 String error Messages new String Ant Preferences Messages get String Ant Code Formatter Preference Page 2 Ant Preferences Messages get String Ant Code Formatter Preference Page 3 NON NLS 1 NON NLS 2 add Text Field indentation Group label Text Ant Editor Preference Constants FORMATTER TAB SIZE 3 0 error Messages label Text Ant Preferences Messages get String Ant Code Formatter Preference Page 4 NON NLS 1 add Check Box indentation Group label Text Ant Editor Preference Constants FORMATTER TAB CHAR 1 Group wrapping Group create Group num Columns result Ant Preferences Messages get String Ant Code Formatter Preference Page 6 NON NLS 1 label Text Ant Preferences Messages get String Ant Code Formatter Preference Page 7 NON NLS 1 error Messages new String Ant Preferences Messages get String Ant Code Formatter Preference Page 8 Ant Preferences Messages get String Ant Code Formatter Preference Page 9 NON NLS 1 NON NLS 2 add Text Field wrapping Group label Text Ant Editor Preference Constants FORMATTER MAX LINE LENGTH 3 0 error Messages label Text Ant Preferences Messages get String Ant Code Formatter Preference Page 10 NON NLS 1 add Check Box wrapping Group label Text Ant Editor Preference Constants FORMATTER WRAP LONG 1 label Text Ant Preferences Messages get String Ant Code Formatter Preference Page 5 NON NLS 1 add Check Box wrapping Group label Text Ant Editor Preference Constants FORMATTER ALIGN 1 Label label new Label result SWT LEFT label set Text Ant Preferences Messages get String Ant Editor Preference Page 9 NON NLS 1 label set Layout Data new Grid Data Grid Data FILL HORIZONTAL Control previewer create Previewer result Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint convert Width In Chars To Pixels 20 gd height Hint convert Height In Chars To Pixels 5 previewer set Layout Data gd initialize Fields apply Dialog Font result return result  createContents initializeDialogUnits getOverlayStore getOverlayStore numColumns GridLayout GridLayout marginHeight marginWidth verticalSpacing convertVerticalDLUsToPixels horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING setLayout indentationGroup createGroup numColumns AntPreferencesMessages getString AntCodeFormatterPreferencePage labelText AntPreferencesMessages getString AntCodeFormatterPreferencePage errorMessages AntPreferencesMessages getString AntCodeFormatterPreferencePage AntPreferencesMessages getString AntCodeFormatterPreferencePage addTextField indentationGroup labelText AntEditorPreferenceConstants FORMATTER_TAB_SIZE errorMessages labelText AntPreferencesMessages getString AntCodeFormatterPreferencePage addCheckBox indentationGroup labelText AntEditorPreferenceConstants FORMATTER_TAB_CHAR wrappingGroup createGroup numColumns AntPreferencesMessages getString AntCodeFormatterPreferencePage labelText AntPreferencesMessages getString AntCodeFormatterPreferencePage errorMessages AntPreferencesMessages getString AntCodeFormatterPreferencePage AntPreferencesMessages getString AntCodeFormatterPreferencePage addTextField wrappingGroup labelText AntEditorPreferenceConstants FORMATTER_MAX_LINE_LENGTH errorMessages labelText AntPreferencesMessages getString AntCodeFormatterPreferencePage addCheckBox wrappingGroup labelText AntEditorPreferenceConstants FORMATTER_WRAP_LONG labelText AntPreferencesMessages getString AntCodeFormatterPreferencePage addCheckBox wrappingGroup labelText AntEditorPreferenceConstants FORMATTER_ALIGN setText AntPreferencesMessages getString AntEditorPreferencePage setLayoutData GridData GridData FILL_HORIZONTAL createPreviewer GridData GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels heightHint convertHeightInCharsToPixels setLayoutData initializeFields applyDialogFont
Convenience method to create a group private Group create Group int num Columns Composite parent String text final Group group new Group parent SWT NONE Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span num Columns gd width Hint 0 group set Layout Data gd group set Font parent get Font final Grid Layout layout new Grid Layout num Columns false layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING layout margin Height 0 convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width 0 convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN group set Layout layout group set Text text return group  createGroup numColumns GridData GridData GridData FILL_HORIZONTAL horizontalSpan numColumns widthHint setLayoutData setFont getFont GridLayout GridLayout numColumns verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN setLayout setText
private Control create Previewer Composite parent f Preview Viewer new Source Viewer parent null null false SWT BORDER SWT V SCROLL SWT H SCROLL Abstract Ant Source Viewer Configuration configuration new Ant Template Viewer Configuration f Preview Viewer configure configuration f Preview Viewer set Editable false Font font J Face Resources get Font J Face Resources TEXT FONT f Preview Viewer get Text Widget set Font font I Preference Store store new Chained Preference Store new I Preference Store get Overlay Store EditorsUI get Preference Store f Previewer Updater new Ant Previewer Updater f Preview Viewer configuration store String content load Preview Content From File Format Preview Code txt NON NLS 1 content format Content content store I Document document new Document content new Ant Document Setup Participant setup document f Preview Viewer set Document document return f Preview Viewer get Control  createPreviewer fPreviewViewer SourceViewer V_SCROLL H_SCROLL AbstractAntSourceViewerConfiguration AntTemplateViewerConfiguration fPreviewViewer fPreviewViewer setEditable JFaceResources getFont JFaceResources TEXT_FONT fPreviewViewer getTextWidget setFont IPreferenceStore ChainedPreferenceStore IPreferenceStore getOverlayStore getPreferenceStore fPreviewerUpdater AntPreviewerUpdater fPreviewViewer loadPreviewContentFromFile FormatPreviewCode formatContent IDocument AntDocumentSetupParticipant fPreviewViewer setDocument fPreviewViewer getControl
private String format Content String content I Preference Store preference Store Formatting Preferences prefs new Formatting Preferences prefs set Preference Store preference Store return Xml Formatter format content prefs  formatContent IPreferenceStore preferenceStore FormattingPreferences FormattingPreferences setPreferenceStore preferenceStore XmlFormatter
see org eclipse ant internal ui preferences Abstract Ant Editor Preference Page handle Defaults protected void handle Defaults  AbstractAntEditorPreferencePage handleDefaults handleDefaults
public void dispose super dispose if f Previewer Updater null f Previewer Updater dispose  fPreviewerUpdater fPreviewerUpdater

public void add Object o if elements contains o return elements add o table Viewer add o table Viewer set Selection new Structured Selection o true  tableViewer tableViewer setSelection StructuredSelection
public void dispose 
public Object get Elements Object input Element return elements to Array new Object elements size  getElements inputElement toArray
public void input Changed Viewer viewer Object old Input Object new Input table Viewer Table Viewer viewer elements clear if new Input null table Viewer set Sorter get Sorter List list if new Input instanceof List list List new Input else list Arrays as List Object new Input elements add All list  inputChanged oldInput newInput tableViewer TableViewer newInput tableViewer setSorter getSorter newInput newInput asList newInput addAll
public void remove Object o elements remove o table Viewer remove o  tableViewer
public void remove I Structured Selection selection Object array selection to Array elements remove All Arrays as List array table Viewer remove array  IStructuredSelection toArray removeAll asList tableViewer
sorter new Viewer Sorter see org eclipse jface viewers Viewer Sorter compare org eclipse jface viewers Viewer java lang Object java lang Object public int compare Viewer viewer Object e1 Object e2 return e1 to String compare To Ignore Case e2 to String  ViewerSorter ViewerSorter toString compareToIgnoreCase toString
protected Viewer Sorter get Sorter if sorter null sorter new Viewer Sorter see org eclipse jface viewers Viewer Sorter compare org eclipse jface viewers Viewer java lang Object java lang Object public int compare Viewer viewer Object e1 Object e2 return e1 to String compare To Ignore Case e2 to String return sorter  ViewerSorter getSorter ViewerSorter ViewerSorter toString compareToIgnoreCase toString

public class Ant Editor Preference Constants private Ant Editor Preference Constants  AntEditorPreferenceConstants AntEditorPreferenceConstants
public static void initialize Default Values I Preference Store store Text Editor Preference Constants initialize Default Values store store set Default Abstract Text Editor PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT true store set Default CODEASSIST AUTOINSERT true store set Default CODEASSIST USER DEFINED TASKS true store set Default CODEASSIST AUTOACTIVATION true store set Default CODEASSIST AUTOACTIVATION DELAY 500 Preference Converter set Default store CODEASSIST PROPOSALS BACKGROUND new RGB 254 241 233 Preference Converter set Default store CODEASSIST PROPOSALS FOREGROUND new RGB 0 0 0 store set Default CODEASSIST AUTOACTIVATION TRIGGERS NON NLS 1 store set Default EDITOR SPACES FOR TABS false store set Default FORMATTER TAB CHAR true store set Default FORMATTER TAB SIZE 4 store set Default FORMATTER ALIGN false store set Default FORMATTER MAX LINE LENGTH 80 store set Default FORMATTER WRAP LONG false store set Default TEMPLATES USE CODEFORMATTER true store set Default PROBLEM CLASSPATH BUILDFILE WARNING store set Default PROBLEM PROPERTIES BUILDFILE IGNORE store set Default PROBLEM IMPORTS BUILDFILE WARNING store set Default PROBLEM TASKS BUILDFILE ERROR  initializeDefaultValues IPreferenceStore TextEditorPreferenceConstants initializeDefaultValues setDefault AbstractTextEditor PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT setDefault CODEASSIST_AUTOINSERT setDefault CODEASSIST_USER_DEFINED_TASKS setDefault CODEASSIST_AUTOACTIVATION setDefault CODEASSIST_AUTOACTIVATION_DELAY PreferenceConverter setDefault CODEASSIST_PROPOSALS_BACKGROUND PreferenceConverter setDefault CODEASSIST_PROPOSALS_FOREGROUND setDefault CODEASSIST_AUTOACTIVATION_TRIGGERS setDefault EDITOR_SPACES_FOR_TABS setDefault FORMATTER_TAB_CHAR setDefault FORMATTER_TAB_SIZE setDefault FORMATTER_ALIGN setDefault FORMATTER_MAX_LINE_LENGTH setDefault FORMATTER_WRAP_LONG setDefault TEMPLATES_USE_CODEFORMATTER setDefault PROBLEM_CLASSPATH BUILDFILE_WARNING setDefault PROBLEM_PROPERTIES BUILDFILE_IGNORE setDefault PROBLEM_IMPORTS BUILDFILE_WARNING setDefault PROBLEM_TASKS BUILDFILE_ERROR

private String f Values public Control Data String key String values f Key key f Values values  fValues ControlData fKey fValues
public String get Key return f Key  getKey fKey
public String get Value boolean selection int index selection 0 1 return f Values index  getValue fValues
public String get Value int index return f Values index  getValue fValues
public int get Selection String value if value null for int i 0 i f Values length i if value equals f Values i return i return f Values length 1 assume the last option is the least severe  getSelection fValues fValues fValues
Initialize the item with the given values param display Name the display name param color Key the color preference key param bold Key the bold preference key param italic Key the italic preference key param item Color the item color public Highlighting Color List Item String display Name String color Key String bold Key String italic Key Color item Color f Display Name display Name f Color Key color Key f Bold Key bold Key f Italic Key italic Key f Item Color item Color  displayName colorKey boldKey italicKey itemColor HighlightingColorListItem displayName colorKey boldKey italicKey itemColor fDisplayName displayName fColorKey colorKey fBoldKey boldKey fItalicKey italicKey fItemColor itemColor
return the bold preference key public String get Bold Key return f Bold Key  getBoldKey fBoldKey
return the bold preference key public String get Italic Key return f Italic Key  getItalicKey fItalicKey
return the color preference key public String get Color Key return f Color Key  getColorKey fColorKey
return the display name public String get Display Name return f Display Name  getDisplayName fDisplayName
return the item color public Color get Item Color return f Item Color  getItemColor fItemColor
see org eclipse jface viewers I Label Provider get Text java lang Object public String get Text Object element return Highlighting Color List Item element get Display Name  ILabelProvider getText getText HighlightingColorListItem getDisplayName
see org eclipse jface viewers I Color Provider get Foreground java lang Object public Color get Foreground Object element return Highlighting Color List Item element get Item Color  IColorProvider getForeground getForeground HighlightingColorListItem getItemColor
see org eclipse jface viewers I Color Provider get Background java lang Object public Color get Background Object element return null  IColorProvider getBackground getBackground
see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return java util List input Element to Array  IStructuredContentProvider getElements getElements inputElement inputElement toArray
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
protected Array List f Combo Boxes public Ant Editor Preference Page super set Description Ant Preferences Messages get String Ant Editor Preference Page description NON NLS 1  ArrayList fComboBoxes AntEditorPreferencePage setDescription AntPreferencesMessages getString AntEditorPreferencePage
protected Overlay Preference Store create Overlay Store f Syntax Color List Model new String Ant Preferences Messages get String Ant Editor Preference Page Ant editor text 1 I Ant Editor Color Constants TEXT COLOR null NON NLS 1 Ant Preferences Messages get String Ant Editor Preference Page Ant editor processing instuctions 2 I Ant Editor Color Constants PROCESSING INSTRUCTIONS COLOR null NON NLS 1 Ant Preferences Messages get String Ant Editor Preference Page Ant editor constant strings 3 I Ant Editor Color Constants STRING COLOR null NON NLS 1 Ant Preferences Messages get String Ant Editor Preference Page Ant editor tags 4 I Ant Editor Color Constants TAG COLOR null NON NLS 1 Ant Preferences Messages get String Ant Editor Preference Page Ant editor comments 5 I Ant Editor Color Constants XML COMMENT COLOR null NON NLS 1 Array List overlay Keys new Array List overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Abstract Text Editor PREFERENCE COLOR BACKGROUND overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Text Editor PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Abstract Decorated Text Editor Preference Constants EDITOR SELECTION FOREGROUND COLOR overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR SELECTION FOREGROUND DEFAULT COLOR overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Abstract Decorated Text Editor Preference Constants EDITOR SELECTION BACKGROUND COLOR overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR SELECTION BACKGROUND DEFAULT COLOR overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR CURRENT LINE overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store INT Abstract Decorated Text Editor Preference Constants EDITOR PRINT MARGIN COLUMN overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR PRINT MARGIN overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Abstract Decorated Text Editor Preference Constants EDITOR CURRENT LINE COLOR overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR CURRENT LINE overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Abstract Decorated Text Editor Preference Constants EDITOR PRINT MARGIN COLOR overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store INT Abstract Decorated Text Editor Preference Constants EDITOR PRINT MARGIN COLUMN overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR PRINT MARGIN overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store INT Abstract Decorated Text Editor Preference Constants EDITOR TAB WIDTH overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Ant Editor Preference Constants EDITOR SPACES FOR TABS overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR OVERVIEW RULER overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Abstract Decorated Text Editor Preference Constants EDITOR LINE NUMBER RULER COLOR overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR LINE NUMBER RULER overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Ant Editor Preference Constants CODEASSIST AUTOACTIVATION overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store INT Ant Editor Preference Constants CODEASSIST AUTOACTIVATION DELAY overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Ant Editor Preference Constants CODEASSIST AUTOINSERT overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Ant Editor Preference Constants CODEASSIST PROPOSALS BACKGROUND overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Ant Editor Preference Constants CODEASSIST PROPOSALS FOREGROUND overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Ant Editor Preference Constants CODEASSIST AUTOACTIVATION TRIGGERS for int i 0 i f Syntax Color List Model length i String color Key f Syntax Color List Model i 1 add Text Key To Cover overlay Keys color Key Overlay Preference Store Overlay Key keys new Overlay Preference Store Overlay Key overlay Keys size overlay Keys to Array keys return new Overlay Preference Store get Preference Store keys  OverlayPreferenceStore createOverlayStore fSyntaxColorListModel AntPreferencesMessages getString AntEditorPreferencePage Ant_editor_text_1 IAntEditorColorConstants TEXT_COLOR AntPreferencesMessages getString AntEditorPreferencePage Ant_editor_processing_instuctions_2 IAntEditorColorConstants PROCESSING_INSTRUCTIONS_COLOR AntPreferencesMessages getString AntEditorPreferencePage Ant_editor_constant_strings_3 IAntEditorColorConstants STRING_COLOR AntPreferencesMessages getString AntEditorPreferencePage Ant_editor_tags_4 IAntEditorColorConstants TAG_COLOR AntPreferencesMessages getString AntEditorPreferencePage Ant_editor_comments_5 IAntEditorColorConstants XML_COMMENT_COLOR ArrayList overlayKeys ArrayList overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractTextEditor PREFERENCE_COLOR_BACKGROUND overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractTextEditor PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_FOREGROUND_COLOR overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_FOREGROUND_DEFAULT_COLOR overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_BACKGROUND_COLOR overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_BACKGROUND_DEFAULT_COLOR overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_CURRENT_LINE overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_PRINT_MARGIN_COLUMN overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_PRINT_MARGIN overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_CURRENT_LINE_COLOR overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_CURRENT_LINE overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_PRINT_MARGIN_COLOR overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_PRINT_MARGIN_COLUMN overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_PRINT_MARGIN overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_TAB_WIDTH overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants EDITOR_SPACES_FOR_TABS overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_OVERVIEW_RULER overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_LINE_NUMBER_RULER_COLOR overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_LINE_NUMBER_RULER overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION_DELAY overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants CODEASSIST_AUTOINSERT overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants CODEASSIST_PROPOSALS_BACKGROUND overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants CODEASSIST_PROPOSALS_FOREGROUND overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AntEditorPreferenceConstants CODEASSIST_AUTOACTIVATION_TRIGGERS fSyntaxColorListModel colorKey fSyntaxColorListModel addTextKeyToCover overlayKeys colorKey OverlayPreferenceStore OverlayKey OverlayPreferenceStore OverlayKey overlayKeys overlayKeys toArray OverlayPreferenceStore getPreferenceStore
private void add Text Key To Cover Array List overlay Keys String main Key overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING main Key overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING main Key Ant Editor Preference Constants EDITOR BOLD SUFFIX overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING main Key Ant Editor Preference Constants EDITOR ITALIC SUFFIX  addTextKeyToCover ArrayList overlayKeys mainKey overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore mainKey overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore mainKey AntEditorPreferenceConstants EDITOR_BOLD_SUFFIX overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore mainKey AntEditorPreferenceConstants EDITOR_ITALIC_SUFFIX
private void handle Appearance Color List Selection int i f Appearance Color List get Selection Index String key f Appearance Color List Model i 1 RGB rgb Preference Converter get Color get Overlay Store key f Appearance Color Editor set Color Value rgb update Appearance Color Widgets f Appearance Color List Model i 2  handleAppearanceColorListSelection fAppearanceColorList getSelectionIndex fAppearanceColorListModel PreferenceConverter getColor getOverlayStore fAppearanceColorEditor setColorValue updateAppearanceColorWidgets fAppearanceColorListModel
private void update Appearance Color Widgets String system Default Key if system Default Key null f Appearance Color Default set Selection false f Appearance Color Default set Visible false f Appearance Color Editor get Button set Enabled true else boolean system Default get Overlay Store get Boolean system Default Key f Appearance Color Default set Selection system Default f Appearance Color Default set Visible true f Appearance Color Editor get Button set Enabled system Default  updateAppearanceColorWidgets systemDefaultKey systemDefaultKey fAppearanceColorDefault setSelection fAppearanceColorDefault setVisible fAppearanceColorEditor getButton setEnabled systemDefault getOverlayStore getBoolean systemDefaultKey fAppearanceColorDefault setSelection systemDefault fAppearanceColorDefault setVisible fAppearanceColorEditor getButton setEnabled systemDefault
f Appearance Color List add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  fAppearanceColorList addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
do nothing public void widget Selected Selection Event e handle Appearance Color List Selection  widgetSelected SelectionEvent handleAppearanceColorListSelection
Selection Listener color Default Selection Listener new Selection Listener public void widget Selected Selection Event e boolean system Default f Appearance Color Default get Selection f Appearance Color Editor get Button set Enabled system Default int i f Appearance Color List get Selection Index String key f Appearance Color List Model i 2 if key null get Overlay Store set Value key system Default  SelectionListener colorDefaultSelectionListener SelectionListener widgetSelected SelectionEvent systemDefault fAppearanceColorDefault getSelection fAppearanceColorEditor getButton setEnabled systemDefault fAppearanceColorList getSelectionIndex fAppearanceColorListModel getOverlayStore setValue systemDefault
get Overlay Store set Value key system Default public void widget Default Selected Selection Event e  getOverlayStore setValue systemDefault widgetDefaultSelected SelectionEvent
foreground Color Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  foregroundColorButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Selected Selection Event e int i f Appearance Color List get Selection Index String key f Appearance Color List Model i 1 Preference Converter set Value get Overlay Store key f Appearance Color Editor get Color Value  widgetSelected SelectionEvent fAppearanceColorList getSelectionIndex fAppearanceColorListModel PreferenceConverter setValue getOverlayStore fAppearanceColorEditor getColorValue
private Control create Appearance Page Composite parent Font font parent get Font Composite appearance Composite new Composite parent SWT NONE appearance Composite set Font font Grid Layout layout new Grid Layout layout num Columns 2 appearance Composite set Layout layout String label Text Ant Preferences Messages get String Ant Editor Preference Page print Margin Column NON NLS 1 String error Messages new String Ant Preferences Messages get String Ant Editor Preference Page empty input print margin Ant Preferences Messages get String Ant Editor Preference Page invalid input print margin NON NLS 1 NON NLS 2 add Text Field appearance Composite label Text Abstract Decorated Text Editor Preference Constants EDITOR PRINT MARGIN COLUMN 3 0 error Messages label Text Ant Preferences Messages get String Ant Editor Preference Page 37 NON NLS 1 error Messages new String Ant Preferences Messages get String Ant Editor Preference Page 38 Ant Preferences Messages get String Ant Editor Preference Page 39 NON NLS 1 NON NLS 2 add Text Field appearance Composite label Text Abstract Decorated Text Editor Preference Constants EDITOR TAB WIDTH 3 0 error Messages label Text Ant Preferences Messages get String Ant Editor Preference Page 40 NON NLS 1 add Check Box appearance Composite label Text Ant Editor Preference Constants EDITOR SPACES FOR TABS 1 label Text Ant Preferences Messages get String Ant Editor Preference Page show Overview Ruler NON NLS 1 add Check Box appearance Composite label Text Abstract Decorated Text Editor Preference Constants EDITOR OVERVIEW RULER 0 label Text Ant Preferences Messages get String Ant Editor Preference Page show Line Numbers NON NLS 1 add Check Box appearance Composite label Text Abstract Decorated Text Editor Preference Constants EDITOR LINE NUMBER RULER 0 label Text Ant Preferences Messages get String Ant Editor Preference Page highlight Current Line NON NLS 1 add Check Box appearance Composite label Text Abstract Decorated Text Editor Preference Constants EDITOR CURRENT LINE 0 label Text Ant Preferences Messages get String Ant Editor Preference Page show Print Margin NON NLS 1 add Check Box appearance Composite label Text Abstract Decorated Text Editor Preference Constants EDITOR PRINT MARGIN 0 Label label new Label appearance Composite SWT LEFT label set Font font Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 gd height Hint convert Height In Chars To Pixels 1 2 label set Layout Data gd label new Label appearance Composite SWT LEFT label set Font font label set Text Ant Preferences Messages get String Ant Editor Preference Page appearance Options NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 label set Layout Data gd Composite editor Composite new Composite appearance Composite SWT NONE editor Composite set Font font layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 editor Composite set Layout layout gd new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data FILL VERTICAL gd horizontal Span 2 editor Composite set Layout Data gd f Appearance Color List new List editor Composite SWT SINGLE SWT V SCROLL SWT BORDER f Appearance Color List set Font font gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data FILL HORIZONTAL gd height Hint convert Height In Chars To Pixels 6 f Appearance Color List set Layout Data gd Composite styles Composite new Composite editor Composite SWT NONE styles Composite set Font font layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 2 styles Composite set Layout layout styles Composite set Layout Data new Grid Data Grid Data FILL BOTH label new Label styles Composite SWT LEFT label set Font font label set Text Ant Preferences Messages get String Ant Editor Preference Page 6 NON NLS 1 gd new Grid Data gd horizontal Alignment Grid Data BEGINNING label set Layout Data gd f Appearance Color Editor new Color Editor styles Composite Button foreground Color Button f Appearance Color Editor get Button foreground Color Button set Font font gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING foreground Color Button set Layout Data gd f Appearance Color List add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e handle Appearance Color List Selection Selection Listener color Default Selection Listener new Selection Listener public void widget Selected Selection Event e boolean system Default f Appearance Color Default get Selection f Appearance Color Editor get Button set Enabled system Default int i f Appearance Color List get Selection Index String key f Appearance Color List Model i 2 if key null get Overlay Store set Value key system Default public void widget Default Selected Selection Event e f Appearance Color Default new Button styles Composite SWT CHECK f Appearance Color Default set Text Ant Preferences Messages get String Ant Editor Preference Page 0 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING gd horizontal Span 2 f Appearance Color Default set Layout Data gd f Appearance Color Default set Visible false f Appearance Color Default add Selection Listener color Default Selection Listener foreground Color Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e int i f Appearance Color List get Selection Index String key f Appearance Color List Model i 1 Preference Converter set Value get Overlay Store key f Appearance Color Editor get Color Value return appearance Composite  createAppearancePage getFont appearanceComposite appearanceComposite setFont GridLayout GridLayout numColumns appearanceComposite setLayout labelText AntPreferencesMessages getString AntEditorPreferencePage printMarginColumn errorMessages AntPreferencesMessages getString AntEditorPreferencePage empty_input_print_margin AntPreferencesMessages getString AntEditorPreferencePage invalid_input_print_margin addTextField appearanceComposite labelText AbstractDecoratedTextEditorPreferenceConstants EDITOR_PRINT_MARGIN_COLUMN errorMessages labelText AntPreferencesMessages getString AntEditorPreferencePage errorMessages AntPreferencesMessages getString AntEditorPreferencePage AntPreferencesMessages getString AntEditorPreferencePage addTextField appearanceComposite labelText AbstractDecoratedTextEditorPreferenceConstants EDITOR_TAB_WIDTH errorMessages labelText AntPreferencesMessages getString AntEditorPreferencePage addCheckBox appearanceComposite labelText AntEditorPreferenceConstants EDITOR_SPACES_FOR_TABS labelText AntPreferencesMessages getString AntEditorPreferencePage showOverviewRuler addCheckBox appearanceComposite labelText AbstractDecoratedTextEditorPreferenceConstants EDITOR_OVERVIEW_RULER labelText AntPreferencesMessages getString AntEditorPreferencePage showLineNumbers addCheckBox appearanceComposite labelText AbstractDecoratedTextEditorPreferenceConstants EDITOR_LINE_NUMBER_RULER labelText AntPreferencesMessages getString AntEditorPreferencePage highlightCurrentLine addCheckBox appearanceComposite labelText AbstractDecoratedTextEditorPreferenceConstants EDITOR_CURRENT_LINE labelText AntPreferencesMessages getString AntEditorPreferencePage showPrintMargin addCheckBox appearanceComposite labelText AbstractDecoratedTextEditorPreferenceConstants EDITOR_PRINT_MARGIN appearanceComposite setFont GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan heightHint convertHeightInCharsToPixels setLayoutData appearanceComposite setFont setText AntPreferencesMessages getString AntEditorPreferencePage appearanceOptions GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan setLayoutData editorComposite appearanceComposite editorComposite setFont GridLayout numColumns marginHeight marginWidth editorComposite setLayout GridData GridData HORIZONTAL_ALIGN_FILL GridData FILL_VERTICAL horizontalSpan editorComposite setLayoutData fAppearanceColorList editorComposite V_SCROLL fAppearanceColorList setFont GridData GridData VERTICAL_ALIGN_BEGINNING GridData FILL_HORIZONTAL heightHint convertHeightInCharsToPixels fAppearanceColorList setLayoutData stylesComposite editorComposite stylesComposite setFont GridLayout marginHeight marginWidth numColumns stylesComposite setLayout stylesComposite setLayoutData GridData GridData FILL_BOTH stylesComposite setFont setText AntPreferencesMessages getString AntEditorPreferencePage GridData horizontalAlignment GridData setLayoutData fAppearanceColorEditor ColorEditor stylesComposite foregroundColorButton fAppearanceColorEditor getButton foregroundColorButton setFont GridData GridData FILL_HORIZONTAL horizontalAlignment GridData foregroundColorButton setLayoutData fAppearanceColorList addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent handleAppearanceColorListSelection SelectionListener colorDefaultSelectionListener SelectionListener widgetSelected SelectionEvent systemDefault fAppearanceColorDefault getSelection fAppearanceColorEditor getButton setEnabled systemDefault fAppearanceColorList getSelectionIndex fAppearanceColorListModel getOverlayStore setValue systemDefault widgetDefaultSelected SelectionEvent fAppearanceColorDefault stylesComposite fAppearanceColorDefault setText AntPreferencesMessages getString AntEditorPreferencePage GridData GridData FILL_HORIZONTAL horizontalAlignment GridData horizontalSpan fAppearanceColorDefault setLayoutData fAppearanceColorDefault setVisible fAppearanceColorDefault addSelectionListener colorDefaultSelectionListener foregroundColorButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent fAppearanceColorList getSelectionIndex fAppearanceColorListModel PreferenceConverter setValue getOverlayStore fAppearanceColorEditor getColorValue appearanceComposite
protected Control create Contents Composite parent initialize Default Colors Workbench Help set Help get Control I AntUI Help Context Ids ANT EDITOR PREFERENCE PAGE get Overlay Store load get Overlay Store start Tab Folder folder new Tab Folder parent SWT NONE folder set Layout new Tab Folder Layout folder set Layout Data new Grid Data Grid Data FILL BOTH Tab Item item new Tab Item folder SWT NONE item set Text Ant Preferences Messages get String Ant Editor Preference Page general NON NLS 1 item set Control create Appearance Page folder item new Tab Item folder SWT NONE item set Text Ant Preferences Messages get String Ant Editor Preference Page 1 NON NLS 1 item set Control create Syntax Page folder item new Tab Item folder SWT NONE item set Text Ant Preferences Messages get String Ant Editor Preference Page 10 NON NLS 1 item set Control create Problems Tab Content folder initialize apply Dialog Font folder return folder  createContents initializeDefaultColors WorkbenchHelp setHelp getControl IAntUIHelpContextIds ANT_EDITOR_PREFERENCE_PAGE getOverlayStore getOverlayStore TabFolder TabFolder setLayout TabFolderLayout setLayoutData GridData GridData FILL_BOTH TabItem TabItem setText AntPreferencesMessages getString AntEditorPreferencePage setControl createAppearancePage TabItem setText AntPreferencesMessages getString AntEditorPreferencePage setControl createSyntaxPage TabItem setText AntPreferencesMessages getString AntEditorPreferencePage setControl createProblemsTabContent applyDialogFont
private void initialize Default Colors if get Preference Store contains Abstract Text Editor PREFERENCE COLOR BACKGROUND RGB rgb get Control get Display get System Color SWT COLOR LIST BACKGROUND getRGB Preference Converter set Default get Overlay Store Abstract Text Editor PREFERENCE COLOR BACKGROUND rgb Preference Converter set Default get Preference Store Abstract Text Editor PREFERENCE COLOR BACKGROUND rgb if get Preference Store contains Abstract Text Editor PREFERENCE COLOR FOREGROUND RGB rgb get Control get Display get System Color SWT COLOR LIST FOREGROUND getRGB Preference Converter set Default get Overlay Store Abstract Text Editor PREFERENCE COLOR FOREGROUND rgb Preference Converter set Default get Preference Store Abstract Text Editor PREFERENCE COLOR FOREGROUND rgb if get Preference Store contains Abstract Decorated Text Editor Preference Constants EDITOR SELECTION BACKGROUND COLOR RGB rgb get Control get Display get System Color SWT COLOR LIST SELECTION getRGB Preference Converter set Default get Overlay Store Abstract Decorated Text Editor Preference Constants EDITOR SELECTION BACKGROUND COLOR rgb Preference Converter set Default get Preference Store Abstract Decorated Text Editor Preference Constants EDITOR SELECTION BACKGROUND COLOR rgb if get Preference Store contains Abstract Decorated Text Editor Preference Constants EDITOR SELECTION FOREGROUND COLOR RGB rgb get Control get Display get System Color SWT COLOR LIST SELECTION TEXT getRGB Preference Converter set Default get Overlay Store Abstract Decorated Text Editor Preference Constants EDITOR SELECTION FOREGROUND COLOR rgb Preference Converter set Default get Preference Store Abstract Decorated Text Editor Preference Constants EDITOR SELECTION FOREGROUND COLOR rgb  initializeDefaultColors getPreferenceStore AbstractTextEditor PREFERENCE_COLOR_BACKGROUND getControl getDisplay getSystemColor COLOR_LIST_BACKGROUND PreferenceConverter setDefault getOverlayStore AbstractTextEditor PREFERENCE_COLOR_BACKGROUND PreferenceConverter setDefault getPreferenceStore AbstractTextEditor PREFERENCE_COLOR_BACKGROUND getPreferenceStore AbstractTextEditor PREFERENCE_COLOR_FOREGROUND getControl getDisplay getSystemColor COLOR_LIST_FOREGROUND PreferenceConverter setDefault getOverlayStore AbstractTextEditor PREFERENCE_COLOR_FOREGROUND PreferenceConverter setDefault getPreferenceStore AbstractTextEditor PREFERENCE_COLOR_FOREGROUND getPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_BACKGROUND_COLOR getControl getDisplay getSystemColor COLOR_LIST_SELECTION PreferenceConverter setDefault getOverlayStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_BACKGROUND_COLOR PreferenceConverter setDefault getPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_BACKGROUND_COLOR getPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_FOREGROUND_COLOR getControl getDisplay getSystemColor COLOR_LIST_SELECTION_TEXT PreferenceConverter setDefault getOverlayStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_FOREGROUND_COLOR PreferenceConverter setDefault getPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_FOREGROUND_COLOR
f Appearance Color List get Display async Exec new Runnable public void run if f Appearance Color List null f Appearance Color List is Disposed f Appearance Color List select 0 handle Appearance Color List Selection  fAppearanceColorList getDisplay asyncExec fAppearanceColorList fAppearanceColorList isDisposed fAppearanceColorList handleAppearanceColorListSelection
private void initialize initialize Fields for int i 0 n f Syntax Color List Model length i n i f Highlighting Color List add new Highlighting Color List Item f Syntax Color List Model i 0 f Syntax Color List Model i 1 f Syntax Color List Model i 1 Ant Editor Preference Constants EDITOR BOLD SUFFIX f Syntax Color List Model i 1 Ant Editor Preference Constants EDITOR ITALIC SUFFIX null f Highlighting Color List Viewer set Input f Highlighting Color List f Highlighting Color List Viewer set Selection new Structured Selection f Highlighting Color List Viewer get Element At 0 for int i 0 i f Appearance Color List Model length i f Appearance Color List add f Appearance Color List Model i 0 f Appearance Color List get Display async Exec new Runnable public void run if f Appearance Color List null f Appearance Color List is Disposed f Appearance Color List select 0 handle Appearance Color List Selection initialize Background Color Fields  initializeFields fSyntaxColorListModel fHighlightingColorList HighlightingColorListItem fSyntaxColorListModel fSyntaxColorListModel fSyntaxColorListModel AntEditorPreferenceConstants EDITOR_BOLD_SUFFIX fSyntaxColorListModel AntEditorPreferenceConstants EDITOR_ITALIC_SUFFIX fHighlightingColorListViewer setInput fHighlightingColorList fHighlightingColorListViewer setSelection StructuredSelection fHighlightingColorListViewer getElementAt fAppearanceColorListModel fAppearanceColorList fAppearanceColorListModel fAppearanceColorList getDisplay asyncExec fAppearanceColorList fAppearanceColorList isDisposed fAppearanceColorList handleAppearanceColorListSelection initializeBackgroundColorFields
private void initialize Background Color Fields RGB rgb Preference Converter get Color get Overlay Store Abstract Text Editor PREFERENCE COLOR BACKGROUND f Background Color Editor set Color Value rgb boolean dflt get Overlay Store get Boolean Abstract Text Editor PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT f Background Default Radio Button set Selection dflt f Background Custom Radio Button set Selection dflt f Background Color Button set Enabled dflt  initializeBackgroundColorFields PreferenceConverter getColor getOverlayStore AbstractTextEditor PREFERENCE_COLOR_BACKGROUND fBackgroundColorEditor setColorValue getOverlayStore getBoolean AbstractTextEditor PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT fBackgroundDefaultRadioButton setSelection fBackgroundCustomRadioButton setSelection fBackgroundColorButton setEnabled
protected void handle Defaults handle Appearance Color List Selection handle Syntax Color List Selection initialize Background Color Fields restore Working Values To Defaults  handleDefaults handleAppearanceColorListSelection handleSyntaxColorListSelection initializeBackgroundColorFields restoreWorkingValuesToDefaults
Selection Listener background Selection Listener new Selection Listener public void widget Selected Selection Event e boolean custom f Background Custom Radio Button get Selection f Background Color Button set Enabled custom get Overlay Store set Value Abstract Text Editor PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT custom  SelectionListener backgroundSelectionListener SelectionListener widgetSelected SelectionEvent fBackgroundCustomRadioButton getSelection fBackgroundColorButton setEnabled getOverlayStore setValue AbstractTextEditor PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT
get Overlay Store set Value Abstract Text Editor PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT custom public void widget Default Selected Selection Event e  getOverlayStore setValue AbstractTextEditor PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT widgetDefaultSelected SelectionEvent
f Highlighting Color List Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Syntax Color List Selection  fHighlightingColorListViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSyntaxColorListSelection
foreground Color Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  foregroundColorButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
do nothing public void widget Selected Selection Event e Highlighting Color List Item item get Highlighting Color List Item Preference Converter set Value get Overlay Store item get Color Key f Syntax Foreground Color Editor get Color Value  widgetSelected SelectionEvent HighlightingColorListItem getHighlightingColorListItem PreferenceConverter setValue getOverlayStore getColorKey fSyntaxForegroundColorEditor getColorValue
f Background Color Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  fBackgroundColorButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
do nothing public void widget Selected Selection Event e Preference Converter set Value get Overlay Store Abstract Text Editor PREFERENCE COLOR BACKGROUND f Background Color Editor get Color Value  widgetSelected SelectionEvent PreferenceConverter setValue getOverlayStore AbstractTextEditor PREFERENCE_COLOR_BACKGROUND fBackgroundColorEditor getColorValue
f Bold Check Box add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  fBoldCheckBox addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
do nothing public void widget Selected Selection Event e Highlighting Color List Item item get Highlighting Color List Item get Overlay Store set Value item get Bold Key f Bold Check Box get Selection  widgetSelected SelectionEvent HighlightingColorListItem getHighlightingColorListItem getOverlayStore setValue getBoldKey fBoldCheckBox getSelection
f Italic Check Box add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  fItalicCheckBox addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
do nothing public void widget Selected Selection Event e Highlighting Color List Item item get Highlighting Color List Item get Overlay Store set Value item get Italic Key f Italic Check Box get Selection  widgetSelected SelectionEvent HighlightingColorListItem getHighlightingColorListItem getOverlayStore setValue getItalicKey fItalicCheckBox getSelection
private Control create Syntax Page Composite parent Composite color Composite new Composite parent SWT NONE color Composite set Layout new Grid Layout Group background Composite new Group color Composite SWT SHADOW ETCHED IN Grid Layout layout new Grid Layout layout num Columns 3 background Composite set Layout layout background Composite set Text Ant Preferences Messages get String Ant Editor Preference Page 2 NON NLS 1 Selection Listener background Selection Listener new Selection Listener public void widget Selected Selection Event e boolean custom f Background Custom Radio Button get Selection f Background Color Button set Enabled custom get Overlay Store set Value Abstract Text Editor PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT custom public void widget Default Selected Selection Event e f Background Default Radio Button new Button background Composite SWT RADIO SWT LEFT f Background Default Radio Button set Text Ant Preferences Messages get String Ant Editor Preference Page 3 NON NLS 1 f Background Default Radio Button add Selection Listener background Selection Listener f Background Custom Radio Button new Button background Composite SWT RADIO SWT LEFT f Background Custom Radio Button set Text Ant Preferences Messages get String Ant Editor Preference Page 4 NON NLS 1 f Background Custom Radio Button add Selection Listener background Selection Listener f Background Color Editor new Color Editor background Composite f Background Color Button f Background Color Editor get Button Label label new Label color Composite SWT LEFT label set Text Ant Preferences Messages get String Ant Editor Preference Page 5 NON NLS 1 label set Layout Data new Grid Data Grid Data FILL HORIZONTAL Composite editor Composite new Composite color Composite SWT NONE layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 editor Composite set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH editor Composite set Layout Data gd f Highlighting Color List Viewer new Table Viewer editor Composite SWT SINGLE SWT V SCROLL SWT BORDER SWT FULL SELECTION f Highlighting Color List Viewer set Label Provider new Color List Label Provider f Highlighting Color List Viewer set Content Provider new Color List Content Provider f Highlighting Color List Viewer set Sorter new Workbench Viewer Sorter gd new Grid Data Grid Data FILL BOTH gd height Hint convert Height In Chars To Pixels 5 f Highlighting Color List Viewer get Control set Layout Data gd Composite styles Composite new Composite editor Composite SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 2 styles Composite set Layout layout styles Composite set Layout Data new Grid Data Grid Data FILL BOTH label new Label styles Composite SWT LEFT label set Text Ant Preferences Messages get String Ant Editor Preference Page 6 NON NLS 1 gd new Grid Data gd horizontal Alignment Grid Data BEGINNING label set Layout Data gd f Syntax Foreground Color Editor new Color Editor styles Composite Button foreground Color Button f Syntax Foreground Color Editor get Button gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING foreground Color Button set Layout Data gd f Bold Check Box new Button styles Composite SWT CHECK f Bold Check Box set Text Ant Preferences Messages get String Ant Editor Preference Page 7 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING gd horizontal Span 2 f Bold Check Box set Layout Data gd f Italic Check Box new Button styles Composite SWT CHECK f Italic Check Box set Text Ant Preferences Messages get String Ant Editor Preference Page 8 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING gd horizontal Span 2 f Italic Check Box set Layout Data gd label new Label color Composite SWT LEFT label set Text Ant Preferences Messages get String Ant Editor Preference Page 9 NON NLS 1 label set Layout Data new Grid Data Grid Data FILL HORIZONTAL Control previewer create Previewer color Composite gd new Grid Data Grid Data FILL BOTH gd width Hint convert Width In Chars To Pixels 20 gd height Hint convert Height In Chars To Pixels 5 previewer set Layout Data gd f Highlighting Color List Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Syntax Color List Selection foreground Color Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e Highlighting Color List Item item get Highlighting Color List Item Preference Converter set Value get Overlay Store item get Color Key f Syntax Foreground Color Editor get Color Value f Background Color Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e Preference Converter set Value get Overlay Store Abstract Text Editor PREFERENCE COLOR BACKGROUND f Background Color Editor get Color Value f Bold Check Box add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e Highlighting Color List Item item get Highlighting Color List Item get Overlay Store set Value item get Bold Key f Bold Check Box get Selection f Italic Check Box add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e Highlighting Color List Item item get Highlighting Color List Item get Overlay Store set Value item get Italic Key f Italic Check Box get Selection return color Composite  createSyntaxPage colorComposite colorComposite setLayout GridLayout backgroundComposite colorComposite SHADOW_ETCHED_IN GridLayout GridLayout numColumns backgroundComposite setLayout backgroundComposite setText AntPreferencesMessages getString AntEditorPreferencePage SelectionListener backgroundSelectionListener SelectionListener widgetSelected SelectionEvent fBackgroundCustomRadioButton getSelection fBackgroundColorButton setEnabled getOverlayStore setValue AbstractTextEditor PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT widgetDefaultSelected SelectionEvent fBackgroundDefaultRadioButton backgroundComposite fBackgroundDefaultRadioButton setText AntPreferencesMessages getString AntEditorPreferencePage fBackgroundDefaultRadioButton addSelectionListener backgroundSelectionListener fBackgroundCustomRadioButton backgroundComposite fBackgroundCustomRadioButton setText AntPreferencesMessages getString AntEditorPreferencePage fBackgroundCustomRadioButton addSelectionListener backgroundSelectionListener fBackgroundColorEditor ColorEditor backgroundComposite fBackgroundColorButton fBackgroundColorEditor getButton colorComposite setText AntPreferencesMessages getString AntEditorPreferencePage setLayoutData GridData GridData FILL_HORIZONTAL editorComposite colorComposite GridLayout numColumns marginHeight marginWidth editorComposite setLayout GridData GridData GridData FILL_BOTH editorComposite setLayoutData fHighlightingColorListViewer TableViewer editorComposite V_SCROLL FULL_SELECTION fHighlightingColorListViewer setLabelProvider ColorListLabelProvider fHighlightingColorListViewer setContentProvider ColorListContentProvider fHighlightingColorListViewer setSorter WorkbenchViewerSorter GridData GridData FILL_BOTH heightHint convertHeightInCharsToPixels fHighlightingColorListViewer getControl setLayoutData stylesComposite editorComposite GridLayout marginHeight marginWidth numColumns stylesComposite setLayout stylesComposite setLayoutData GridData GridData FILL_BOTH stylesComposite setText AntPreferencesMessages getString AntEditorPreferencePage GridData horizontalAlignment GridData setLayoutData fSyntaxForegroundColorEditor ColorEditor stylesComposite foregroundColorButton fSyntaxForegroundColorEditor getButton GridData GridData FILL_HORIZONTAL horizontalAlignment GridData foregroundColorButton setLayoutData fBoldCheckBox stylesComposite fBoldCheckBox setText AntPreferencesMessages getString AntEditorPreferencePage GridData GridData FILL_HORIZONTAL horizontalAlignment GridData horizontalSpan fBoldCheckBox setLayoutData fItalicCheckBox stylesComposite fItalicCheckBox setText AntPreferencesMessages getString AntEditorPreferencePage GridData GridData FILL_HORIZONTAL horizontalAlignment GridData horizontalSpan fItalicCheckBox setLayoutData colorComposite setText AntPreferencesMessages getString AntEditorPreferencePage setLayoutData GridData GridData FILL_HORIZONTAL createPreviewer colorComposite GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels heightHint convertHeightInCharsToPixels setLayoutData fHighlightingColorListViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSyntaxColorListSelection foregroundColorButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent HighlightingColorListItem getHighlightingColorListItem PreferenceConverter setValue getOverlayStore getColorKey fSyntaxForegroundColorEditor getColorValue fBackgroundColorButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent PreferenceConverter setValue getOverlayStore AbstractTextEditor PREFERENCE_COLOR_BACKGROUND fBackgroundColorEditor getColorValue fBoldCheckBox addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent HighlightingColorListItem getHighlightingColorListItem getOverlayStore setValue getBoldKey fBoldCheckBox getSelection fItalicCheckBox addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent HighlightingColorListItem getHighlightingColorListItem getOverlayStore setValue getItalicKey fItalicCheckBox getSelection colorComposite
private Control create Previewer Composite parent f Preview Viewer new Source Viewer parent null null false SWT BORDER SWT V SCROLL SWT H SCROLL Abstract Ant Source Viewer Configuration configuration new Ant Template Viewer Configuration f Preview Viewer configure configuration f Preview Viewer set Editable false Font font J Face Resources get Font J Face Resources TEXT FONT f Preview Viewer get Text Widget set Font font I Preference Store store new Chained Preference Store new I Preference Store get Overlay Store EditorsUI get Preference Store f Previewer Updater new Ant Previewer Updater f Preview Viewer configuration store String content load Preview Content From File Syntax Preview Code txt NON NLS 1 I Document document new Document content new Ant Document Setup Participant setup document f Preview Viewer set Document document return f Preview Viewer get Control  createPreviewer fPreviewViewer SourceViewer V_SCROLL H_SCROLL AbstractAntSourceViewerConfiguration AntTemplateViewerConfiguration fPreviewViewer fPreviewViewer setEditable JFaceResources getFont JFaceResources TEXT_FONT fPreviewViewer getTextWidget setFont IPreferenceStore ChainedPreferenceStore IPreferenceStore getOverlayStore getPreferenceStore fPreviewerUpdater AntPreviewerUpdater fPreviewViewer loadPreviewContentFromFile SyntaxPreviewCode IDocument AntDocumentSetupParticipant fPreviewViewer setDocument fPreviewViewer getControl
private void handle Syntax Color List Selection Highlighting Color List Item item get Highlighting Color List Item RGB rgb Preference Converter get Color get Overlay Store item get Color Key f Syntax Foreground Color Editor set Color Value rgb f Bold Check Box set Selection get Overlay Store get Boolean item get Bold Key f Italic Check Box set Selection get Overlay Store get Boolean item get Italic Key  handleSyntaxColorListSelection HighlightingColorListItem getHighlightingColorListItem PreferenceConverter getColor getOverlayStore getColorKey fSyntaxForegroundColorEditor setColorValue fBoldCheckBox setSelection getOverlayStore getBoolean getBoldKey fItalicCheckBox setSelection getOverlayStore getBoolean getItalicKey
Returns the current highlighting color list item return the current highlighting color list item since 3 0 private Highlighting Color List Item get Highlighting Color List Item I Structured Selection selection I Structured Selection f Highlighting Color List Viewer get Selection return Highlighting Color List Item selection get First Element  HighlightingColorListItem getHighlightingColorListItem IStructuredSelection IStructuredSelection fHighlightingColorListViewer getSelection HighlightingColorListItem getFirstElement
public void dispose super dispose if f Previewer Updater null f Previewer Updater dispose  fPreviewerUpdater fPreviewerUpdater
private Composite create Problems Tab Content Tab Folder folder f Combo Boxes new Array List initialize Working Values String error Warning Ignore Labels new String Ant Preferences Messages get String Ant Editor Preference Page 11 Ant Preferences Messages get String Ant Editor Preference Page 12 Ant Preferences Messages get String Ant Editor Preference Page 13 NON NLS 1 NON NLS 2 NON NLS 3 String error Warning Ignore new String Ant Editor Preference Constants BUILDFILE ERROR Ant Editor Preference Constants BUILDFILE WARNING Ant Editor Preference Constants BUILDFILE IGNORE int n Columns 3 Grid Layout layout new Grid Layout layout num Columns n Columns Composite others Composite new Composite folder SWT NULL others Composite set Layout layout Label description new Label others Composite SWT WRAP description set Text Ant Preferences Messages get String Ant Editor Preference Page 14 NON NLS 1 Grid Data gd new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL gd horizontal Span n Columns description set Layout Data gd String label Ant Preferences Messages get String Ant Editor Preference Page 18 NON NLS 1 add Combo Box others Composite label Ant Editor Preference Constants PROBLEM TASKS error Warning Ignore error Warning Ignore Labels 0 label Ant Preferences Messages get String Ant Editor Preference Page 15 NON NLS 1 add Combo Box others Composite label Ant Editor Preference Constants PROBLEM CLASSPATH error Warning Ignore error Warning Ignore Labels 0 label Ant Preferences Messages get String Ant Editor Preference Page 16 NON NLS 1 add Combo Box others Composite label Ant Editor Preference Constants PROBLEM PROPERTIES error Warning Ignore error Warning Ignore Labels 0 label Ant Preferences Messages get String Ant Editor Preference Page 17 NON NLS 1 add Combo Box others Composite label Ant Editor Preference Constants PROBLEM IMPORTS error Warning Ignore error Warning Ignore Labels 0 return others Composite  createProblemsTabContent TabFolder fComboBoxes ArrayList initializeWorkingValues errorWarningIgnoreLabels AntPreferencesMessages getString AntEditorPreferencePage AntPreferencesMessages getString AntEditorPreferencePage AntPreferencesMessages getString AntEditorPreferencePage errorWarningIgnore AntEditorPreferenceConstants BUILDFILE_ERROR AntEditorPreferenceConstants BUILDFILE_WARNING AntEditorPreferenceConstants BUILDFILE_IGNORE nColumns GridLayout GridLayout numColumns nColumns othersComposite othersComposite setLayout othersComposite setText AntPreferencesMessages getString AntEditorPreferencePage GridData GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL horizontalSpan nColumns setLayoutData AntPreferencesMessages getString AntEditorPreferencePage addComboBox othersComposite AntEditorPreferenceConstants PROBLEM_TASKS errorWarningIgnore errorWarningIgnoreLabels AntPreferencesMessages getString AntEditorPreferencePage addComboBox othersComposite AntEditorPreferenceConstants PROBLEM_CLASSPATH errorWarningIgnore errorWarningIgnoreLabels AntPreferencesMessages getString AntEditorPreferencePage addComboBox othersComposite AntEditorPreferenceConstants PROBLEM_PROPERTIES errorWarningIgnore errorWarningIgnoreLabels AntPreferencesMessages getString AntEditorPreferencePage addComboBox othersComposite AntEditorPreferenceConstants PROBLEM_IMPORTS errorWarningIgnore errorWarningIgnoreLabels othersComposite
private void initialize Working Values f Working Values new Hash Map f Problem Preference Keys length for int i 0 i f Problem Preference Keys length i String key f Problem Preference Keys i f Working Values put key get Preference Store get String key  initializeWorkingValues fWorkingValues HashMap fProblemPreferenceKeys fProblemPreferenceKeys fProblemPreferenceKeys fWorkingValues getPreferenceStore getString
private void restore Working Values To Defaults f Working Values new Hash Map f Problem Preference Keys length for int i 0 i f Problem Preference Keys length i String key f Problem Preference Keys i f Working Values put key get Preference Store get Default String key update Controls  restoreWorkingValuesToDefaults fWorkingValues HashMap fProblemPreferenceKeys fProblemPreferenceKeys fProblemPreferenceKeys fWorkingValues getPreferenceStore getDefaultString updateControls
protected Combo add Combo Box Composite parent String label String key String values String value Labels int indent Control Data data new Control Data key values Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Indent indent Label label Control new Label parent SWT LEFT SWT WRAP label Control set Text label label Control set Layout Data gd Combo combo Box new Combo parent SWT READ ONLY combo Box set Items value Labels combo Box set Data data combo Box set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL combo Box add Selection Listener get Selection Listener Label place Holder new Label parent SWT NONE place Holder set Layout Data new Grid Data Grid Data FILL HORIZONTAL String curr Value String f Working Values get key combo Box select data get Selection curr Value f Combo Boxes add combo Box return combo Box  addComboBox valueLabels ControlData ControlData GridData GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalIndent labelControl labelControl setText labelControl setLayoutData comboBox READ_ONLY comboBox setItems valueLabels comboBox setData comboBox setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL comboBox addSelectionListener getSelectionListener placeHolder placeHolder setLayoutData GridData GridData FILL_HORIZONTAL currValue fWorkingValues comboBox getSelection currValue fComboBoxes comboBox comboBox
if f Selection Listener null f Selection Listener new Selection Listener public void widget Default Selected Selection Event e  fSelectionListener fSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Default Selected Selection Event e public void widget Selected Selection Event e control Changed e widget  widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent controlChanged
protected Selection Listener get Selection Listener if f Selection Listener null f Selection Listener new Selection Listener public void widget Default Selected Selection Event e public void widget Selected Selection Event e control Changed e widget return f Selection Listener  SelectionListener getSelectionListener fSelectionListener fSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent controlChanged fSelectionListener
protected void control Changed Widget widget Control Data data Control Data widget get Data String new Value null if widget instanceof Button new Value data get Value Button widget get Selection else if widget instanceof Combo new Value data get Value Combo widget get Selection Index else return f Working Values put data get Key new Value validate Settings data get Key new Value  controlChanged ControlData ControlData getData newValue newValue getValue getSelection newValue getValue getSelectionIndex fWorkingValues getKey newValue validateSettings getKey newValue
protected void update Controls update the UI for int i f Combo Boxes size 1 i 0 i Combo curr Combo f Combo Boxes get i Control Data data Control Data curr get Data String curr Value String f Working Values get data get Key curr select data get Selection curr Value  updateControls fComboBoxes fComboBoxes ControlData ControlData getData currValue fWorkingValues getKey getSelection currValue
public boolean perform Ok Iterator iter f Working Values key Set iterator I Preference Store store get Preference Store while iter has Next String key String iter next store put Value key String f Working Values get key if store needs Saving store put Value Ant Editor Preference Constants PROBLEM changed NON NLS 1 return super perform Ok  performOk fWorkingValues keySet IPreferenceStore getPreferenceStore hasNext putValue fWorkingValues needsSaving putValue AntEditorPreferenceConstants performOk

Method declared on I Base Label Provider public void dispose  IBaseLabelProvider
public Image get Column Image Object element int column Index if element instanceof Property return get Property Image else if element instanceof Type return get Type Image else if element instanceof Task return get Task Image return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJ FILE  getColumnImage columnIndex getPropertyImage getTypeImage getTaskImage getWorkbench getSharedImages getImage ISharedImages IMG_OBJ_FILE
public String get Column Text Object element int column Index if element instanceof Property Property property Property element if property is Default return element to String Message Format format Ant Preferences Messages get String Ant Object Label Provider 10 new String property get Plugin Label NON NLS 1 else if element instanceof Ant Object Ant Object object Ant Object element String Buffer text new String Buffer object to String text append NON NLS 1 text append object get Library Entry get Label text append NON NLS 1 text append object get Class Name text append if object is Default text append Message Format format Ant Preferences Messages get String Ant Object Label Provider 10 new String object get Plugin Label NON NLS 1 return text to String return element to String  getColumnText columnIndex isDefault toString MessageFormat AntPreferencesMessages getString AntObjectLabelProvider getPluginLabel AntObject AntObject AntObject StringBuffer StringBuffer toString getLibraryEntry getLabel getClassName isDefault MessageFormat AntPreferencesMessages getString AntObjectLabelProvider getPluginLabel toString toString
public Image get Type Image return AntUI Images get Image I AntUI Constants IMG ANT TYPE  getTypeImage AntUIImages getImage IAntUIConstants IMG_ANT_TYPE
public Image get Task Image return PlatformUI get Workbench get Shared Images get Image IDE Shared Images IMG OBJS TASK TSK  getTaskImage getWorkbench getSharedImages getImage SharedImages IMG_OBJS_TASK_TSK
public static Image get Property Image return AntUI Images get Image I AntUI Constants IMG PROPERTY  getPropertyImage AntUIImages getImage IAntUIConstants IMG_PROPERTY
see org eclipse jface viewers I Color Provider get Foreground java lang Object public Color get Foreground Object element return null  IColorProvider getForeground getForeground
public Color get Background Object element if element instanceof Ant Object if Ant Object element is Default Display display Display get Current return display get System Color SWT COLOR INFO BACKGROUND else if element instanceof Property if Property element is Default Display display Display get Current return display get System Color SWT COLOR INFO BACKGROUND return null  getBackground AntObject AntObject isDefault getCurrent getSystemColor COLOR_INFO_BACKGROUND isDefault getCurrent getSystemColor COLOR_INFO_BACKGROUND

public abstract class Ant Page protected Selection Adapter selection Adapter new Selection Adapter public void widget Selected Selection Event e button Pressed Integer e widget get Data int Value  AntPage SelectionAdapter selectionAdapter SelectionAdapter widgetSelected SelectionEvent buttonPressed getData intValue
Creates an instance of this page public Ant Page Ant Runtime Preference Page preference Page super this preference Page preference Page  AntPage AntRuntimePreferencePage preferencePage preferencePage preferencePage
Adds buttons specific to the page protected abstract void add Buttons To Button Group Composite parent  addButtonsToButtonGroup
protected abstract void add Buttons To Button Group Composite parent Give this page a chance to initialize itself protected abstract void initialize  addButtonsToButtonGroup
Adds an object to the contents protected void add Content Object o if content Provider null content Provider add o  addContent contentProvider contentProvider
Handles a button pressed event protected abstract void button Pressed int button Id  buttonPressed buttonId
Creates and returns a button with appropriate size and layout param parent the control to create the button on param label Key the key to lookup the button s label param button Id the id to assign to this button return a new and initialized button protected Button create Push Button Composite parent String button Text int button Id Button button new Button parent SWT PUSH button set Font parent get Font button set Text button Text button set Data new Integer button Id button add Selection Listener selection Adapter preference Page set Button Layout Data button return button  labelKey buttonId createPushButton buttonText buttonId setFont getFont setText buttonText setData buttonId addSelectionListener selectionAdapter preferencePage setButtonLayoutData
Creates the group which will contain the buttons protected void create Button Group Composite top Composite button Group new Composite top SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 button Group set Layout layout button Group set Layout Data new Grid Data Grid Data FILL VERTICAL button Group set Font top get Font add Buttons To Button Group button Group  createButtonGroup buttonGroup GridLayout GridLayout marginHeight marginWidth buttonGroup setLayout buttonGroup setLayoutData GridData GridData FILL_VERTICAL buttonGroup setFont getFont addButtonsToButtonGroup buttonGroup
table Viewer set Label Provider get Label Provider table Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event table Selection Changed I Structured Selection event get Selection  tableViewer setLabelProvider getLabelProvider tableViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent tableSelectionChanged IStructuredSelection getSelection
table Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if event get Selection is Empty edit Button is Enabled edit I Structured Selection event get Selection  tableViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getSelection isEmpty editButton isEnabled IStructuredSelection getSelection
table add Key Listener new Key Adapter public void key Pressed Key Event event if edit Button is Enabled event character SWT DEL event state Mask 0 remove table Viewer  addKeyListener KeyAdapter keyPressed KeyEvent editButton isEnabled stateMask tableViewer
Creates the table viewer protected void create Table Composite parent Table table new Table parent SWT MULTI SWT FULL SELECTION SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data width Hint I Dialog Constants ENTRY FIELD WIDTH data height Hint table get Item Height data horizontal Span 1 table set Layout Data data table set Font parent get Font content Provider get Content Provider table Viewer new Table Viewer table table Viewer set Content Provider content Provider table Viewer set Label Provider get Label Provider table Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event table Selection Changed I Structured Selection event get Selection table Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if event get Selection is Empty edit Button is Enabled edit I Structured Selection event get Selection table add Key Listener new Key Adapter public void key Pressed Key Event event if edit Button is Enabled event character SWT DEL event state Mask 0 remove table Viewer  createTable FULL_SELECTION GridData GridData GridData FILL_BOTH widthHint IDialogConstants ENTRY_FIELD_WIDTH heightHint getItemHeight horizontalSpan setLayoutData setFont getFont contentProvider getContentProvider tableViewer TableViewer tableViewer setContentProvider contentProvider tableViewer setLabelProvider getLabelProvider tableViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent tableSelectionChanged IStructuredSelection getSelection tableViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getSelection isEmpty editButton isEnabled IStructuredSelection getSelection addKeyListener KeyAdapter keyPressed KeyEvent editButton isEnabled stateMask tableViewer
Returns the content provider to use for the table viewer return Ant Page Content Provider protected Ant Content Provider get Content Provider return new Ant Content Provider  AntPageContentProvider AntContentProvider getContentProvider AntContentProvider
Returns the currently listed objects in the table if the library for that entry is still included in the preferences Default objects are included depending on the value of the code for Display code parameter Returns code null code if this widget has not yet been created or has been disposed param for Display Whether the result is to be displayed in the UI or stored in the preferences return The list of objects currently displayed in the table protected List get Contents boolean for Display if table Viewer null table Viewer get Control is Disposed return null List entries get Preference Page get Library Entries Object elements content Provider get Elements table Viewer get Input List contents new Array List elements length Object element Ant Object ant Object for int i 0 i elements length i element elements i if element instanceof Ant Object ant Object Ant Object element if for Display if ant Object is Default entries contains ant Object get Library Entry continue else if ant Object is Default entries contains ant Object get Library Entry continue contents add element return contents  forDisplay forDisplay getContents forDisplay tableViewer tableViewer getControl isDisposed getPreferencePage getLibraryEntries contentProvider getElements tableViewer getInput ArrayList AntObject antObject AntObject antObject AntObject forDisplay antObject isDefault antObject getLibraryEntry antObject isDefault antObject getLibraryEntry
Returns the label provider the sub page wants to use to display its content with 
Returns the selection in the viewer or code null code if none protected final I Structured Selection get Selection if table Viewer null table Viewer get Control is Disposed return null return I Structured Selection table Viewer get Selection  IStructuredSelection getSelection tableViewer tableViewer getControl isDisposed IStructuredSelection tableViewer getSelection
Returns the shell of the sub page protected final Shell get Shell if table Viewer null table Viewer get Control is Disposed return null return table Viewer get Control get Shell  getShell tableViewer tableViewer getControl isDisposed tableViewer getControl getShell
Handles the remove button pressed event protected void remove remove table Viewer  tableViewer
protected void remove Table Viewer viewer Ant Content Provider ant Content Provider Ant Content Provider viewer get Content Provider I Structured Selection sel I Structured Selection viewer get Selection Iterator itr sel iterator while itr has Next ant Content Provider remove itr next  TableViewer AntContentProvider antContentProvider AntContentProvider getContentProvider IStructuredSelection IStructuredSelection getSelection hasNext antContentProvider
Sets the contents of the table on this page Has no effect if this widget has not yet been created or has been disposed protected void set Input List inputs if table Viewer null table Viewer get Control is Disposed return table Viewer set Input inputs table Selection Changed I Structured Selection table Viewer get Selection  setInput tableViewer tableViewer getControl isDisposed tableViewer setInput tableSelectionChanged IStructuredSelection tableViewer getSelection
Updates the content element in the table viewer protected final void update Content Object element if table Viewer null table Viewer get Control is Disposed return table Viewer update element null  updateContent tableViewer tableViewer getControl isDisposed tableViewer
Creates the default contents of this page protected Composite create Contents Composite top Workbench Help set Help top get Help Context Id Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 2 layout margin Width 2 top set Layout layout top set Layout Data new Grid Data Grid Data FILL BOTH create Table top create Button Group top return top  createContents WorkbenchHelp setHelp getHelpContextId GridLayout GridLayout numColumns marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_BOTH createTable createButtonGroup
protected Ant Runtime Preference Page get Preference Page return preference Page  AntRuntimePreferencePage getPreferencePage preferencePage
protected Table Viewer get Table Viewer return table Viewer  TableViewer getTableViewer tableViewer
Handles selection changes in the table viewer protected void table Selection Changed I Structured Selection new Selection int size new Selection size boolean enabled true Iterator itr new Selection iterator while itr has Next Object element itr next if element instanceof Ant Object Ant Object ant Object Ant Object element if ant Object is Default enabled false break edit Button set Enabled enabled size 1 remove Button set Enabled enabled size 0  tableSelectionChanged IStructuredSelection newSelection newSelection newSelection hasNext AntObject AntObject antObject AntObject antObject isDefault editButton setEnabled removeButton setEnabled
Allows the user to edit a custom Ant object param selection The selection containing the object to edit 
Returns this page s help context id which is hooked to this page on creation return help context id 
folder add Selection Listener new Selection Adapter public void widget Selected Selection Event e if e item item remove ant objects whose library has been removed set Input get Contents true  addSelectionListener SelectionAdapter widgetSelected SelectionEvent setInput getContents
protected void connect To Folder final Tab Item item Tab Folder folder folder add Selection Listener new Selection Adapter public void widget Selected Selection Event e if e item item remove ant objects whose library has been removed set Input get Contents true  connectToFolder TabItem TabFolder addSelectionListener SelectionAdapter widgetSelected SelectionEvent setInput getContents

Create the Ant page public Ant Preference Page super GRID set Description Ant Preferences Messages get String Ant Preference Page General NON NLS 1 set Preference Store AntUI Plugin get Default get Preference Store  AntPreferencePage setDescription AntPreferencesMessages getString AntPreferencePage setPreferenceStore AntUIPlugin getDefault getPreferenceStore
protected void create Field Editors store Applied Values Font font get Field Editor Parent get Font Label label new Label get Field Editor Parent SWT NONE label set Text Ant Preferences Messages get String Ant Preference Page Enter NON NLS 1 Grid Data gd new Grid Data gd horizontal Span 2 label set Layout Data gd label set Font font f Build File Names new String Field Editor I AntUI Preference Constants ANT FIND BUILD FILE NAMES Ant Preferences Messages get String Ant Preference Page Names  3 get Field Editor Parent NON NLS 1 add Field f Build File Names new Label get Field Editor Parent SWT NONE if AntUI Plugin is MacOS the mac does not have a tools jar Bug 40778 tools Warning Editor new Boolean Field Editor I AntUI Preference Constants ANT TOOLS JAR WARNING Ant Preferences Messages get String Ant Preference Page 10 get Field Editor Parent NON NLS 1 add Field tools Warning Editor add Field new Boolean Field Editor I AntUI Preference Constants ANT ERROR DIALOG Ant Preferences Messages get String Ant Preference Page 12 get Field Editor Parent NON NLS 1 new Label get Field Editor Parent SWT NONE create Color Composite get Preference Store add Property Change Listener this  createFieldEditors storeAppliedValues getFieldEditorParent getFont getFieldEditorParent setText AntPreferencesMessages getString AntPreferencePage GridData GridData horizontalSpan setLayoutData setFont fBuildFileNames StringFieldEditor IAntUIPreferenceConstants ANT_FIND_BUILD_FILE_NAMES AntPreferencesMessages getString AntPreferencePage Names__3 getFieldEditorParent addField fBuildFileNames getFieldEditorParent AntUIPlugin isMacOS toolsWarningEditor BooleanFieldEditor IAntUIPreferenceConstants ANT_TOOLS_JAR_WARNING AntPreferencesMessages getString AntPreferencePage getFieldEditorParent addField toolsWarningEditor addField BooleanFieldEditor IAntUIPreferenceConstants ANT_ERROR_DIALOG AntPreferencesMessages getString AntPreferencePage getFieldEditorParent getFieldEditorParent createColorComposite getPreferenceStore addPropertyChangeListener
Stores the initial values of the color preferences The preference values are updated on the fly as the user edits them instead of only when they press Apply We need to store the old values so that we can reset them when the user chooses Cancel private void store Applied Values I Preference Store store get Preference Store for int i 0 i f Appearance Color List Model length i String preference f Appearance Color List Model i 1 f Appearance Color List Model i 2 store get String preference  storeAppliedValues IPreferenceStore getPreferenceStore fAppearanceColorListModel fAppearanceColorListModel fAppearanceColorListModel getString
f Console Color List add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Appearance Color List Selection  fConsoleColorList addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAppearanceColorListSelection
foreground Color Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e int i f Console Color List get Selection Index String key f Appearance Color List Model i 1 Preference Converter set Value get Preference Store key f Console Color Editor get Color Value  foregroundColorButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fConsoleColorList getSelectionIndex fAppearanceColorListModel PreferenceConverter setValue getPreferenceStore fConsoleColorEditor getColorValue
private void create Color Composite Font font get Field Editor Parent get Font Label label new Label get Field Editor Parent SWT LEFT label set Text Ant Preferences Messages get String Ant Preference Page Ant Color Options  6 NON NLS 1 label set Font font Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 label set Layout Data gd Composite editor Composite new Composite get Field Editor Parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 editor Composite set Layout layout editor Composite set Font font gd new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data FILL VERTICAL gd horizontal Span 2 editor Composite set Layout Data gd f Console Color List new List editor Composite SWT SINGLE SWT V SCROLL SWT H SCROLL SWT BORDER gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data FILL HORIZONTAL gd height Hint convert Height In Chars To Pixels 8 f Console Color List set Layout Data gd f Console Color List set Font font Composite styles Composite new Composite editor Composite SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 2 styles Composite set Layout layout styles Composite set Layout Data new Grid Data Grid Data FILL BOTH styles Composite set Font font label new Label styles Composite SWT LEFT label set Text Ant Preferences Messages get String Ant Preference Page Color  7 NON NLS 1 label set Font font gd new Grid Data gd horizontal Alignment Grid Data BEGINNING label set Layout Data gd f Console Color Editor new Color Editor styles Composite Button foreground Color Button f Console Color Editor get Button gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING foreground Color Button set Layout Data gd foreground Color Button set Font font f Console Color List add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Appearance Color List Selection foreground Color Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e int i f Console Color List get Selection Index String key f Appearance Color List Model i 1 Preference Converter set Value get Preference Store key f Console Color Editor get Color Value  createColorComposite getFieldEditorParent getFont getFieldEditorParent setText AntPreferencesMessages getString AntPreferencePage Ant_Color_Options__6 setFont GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan setLayoutData editorComposite getFieldEditorParent GridLayout GridLayout numColumns marginHeight marginWidth editorComposite setLayout editorComposite setFont GridData GridData HORIZONTAL_ALIGN_FILL GridData FILL_VERTICAL horizontalSpan editorComposite setLayoutData fConsoleColorList editorComposite V_SCROLL H_SCROLL GridData GridData VERTICAL_ALIGN_BEGINNING GridData FILL_HORIZONTAL heightHint convertHeightInCharsToPixels fConsoleColorList setLayoutData fConsoleColorList setFont stylesComposite editorComposite GridLayout marginHeight marginWidth numColumns stylesComposite setLayout stylesComposite setLayoutData GridData GridData FILL_BOTH stylesComposite setFont stylesComposite setText AntPreferencesMessages getString AntPreferencePage Color__7 setFont GridData horizontalAlignment GridData setLayoutData fConsoleColorEditor ColorEditor stylesComposite foregroundColorButton fConsoleColorEditor getButton GridData GridData FILL_HORIZONTAL horizontalAlignment GridData foregroundColorButton setLayoutData foregroundColorButton setFont fConsoleColorList addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAppearanceColorListSelection foregroundColorButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fConsoleColorList getSelectionIndex fAppearanceColorListModel PreferenceConverter setValue getPreferenceStore fConsoleColorEditor getColorValue
Restore all color preferences to their values when the page was opened public boolean perform Cancel for int i 0 i f Appearance Color List Model length i String preference f Appearance Color List Model i 1 Preference Converter set Value get Preference Store preference String Converter asRGB f Appearance Color List Model i 2 return super perform Cancel  performCancel fAppearanceColorListModel fAppearanceColorListModel PreferenceConverter setValue getPreferenceStore StringConverter fAppearanceColorListModel performCancel
When the user applies the preferences update the set of stored preferences so that we will fall back to the applied values on Cancel public boolean perform Ok store Applied Values return super perform Ok  performOk storeAppliedValues performOk
private void handle Appearance Color List Selection int i f Console Color List get Selection Index String key f Appearance Color List Model i 1 RGB rgb Preference Converter get Color get Preference Store key f Console Color Editor set Color Value rgb  handleAppearanceColorListSelection fConsoleColorList getSelectionIndex fAppearanceColorListModel PreferenceConverter getColor getPreferenceStore fConsoleColorEditor setColorValue
see Field Editor Preference Page create Contents org eclipse swt widgets Composite protected Control create Contents Composite parent Workbench Help set Help parent I AntUI Help Context Ids ANT PREFERENCE PAGE return super create Contents parent  FieldEditorPreferencePage createContents createContents WorkbenchHelp setHelp IAntUIHelpContextIds ANT_PREFERENCE_PAGE createContents
see I Workbench Preference Page init I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
f Console Color List get Display async Exec new Runnable public void run if f Console Color List null f Console Color List is Disposed f Console Color List select 0 handle Appearance Color List Selection  fConsoleColorList getDisplay asyncExec fConsoleColorList fConsoleColorList isDisposed fConsoleColorList handleAppearanceColorListSelection
see org eclipse jface preference Field Editor Preference Page initialize protected void initialize super initialize for int i 0 i f Appearance Color List Model length i f Console Color List add f Appearance Color List Model i 0 f Console Color List get Display async Exec new Runnable public void run if f Console Color List null f Console Color List is Disposed f Console Color List select 0 handle Appearance Color List Selection  FieldEditorPreferencePage fAppearanceColorListModel fConsoleColorList fAppearanceColorListModel fConsoleColorList getDisplay asyncExec fConsoleColorList fConsoleColorList isDisposed fConsoleColorList handleAppearanceColorListSelection
see org eclipse jface preference Preference Page perform Defaults protected void perform Defaults for int i 0 i f Appearance Color List Model length i String key f Appearance Color List Model i 1 Preference Converter set Value get Preference Store key Preference Converter get Default Color get Preference Store key handle Appearance Color List Selection super perform Defaults  PreferencePage performDefaults performDefaults fAppearanceColorListModel fAppearanceColorListModel PreferenceConverter setValue getPreferenceStore PreferenceConverter getDefaultColor getPreferenceStore handleAppearanceColorListSelection performDefaults
see org eclipse jface dialogs I Dialog Page dispose public void dispose get Preference Store remove Property Change Listener this  IDialogPage getPreferenceStore removePropertyChangeListener
public void property Change Property Change Event event if event get Property equals I AntUI Preference Constants ANT TOOLS JAR WARNING if tools Warning Editor null tools Warning Editor load else super property Change event  propertyChange PropertyChangeEvent getProperty IAntUIPreferenceConstants ANT_TOOLS_JAR_WARNING toolsWarningEditor toolsWarningEditor propertyChange

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Ant Preferences Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME AntPreferencesMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public void property Change Property Change Event event if event get Property equals J Face Resources TEXT FONT Font font J Face Resources get Font J Face Resources TEXT FONT viewer get Text Widget set Font font  propertyChange PropertyChangeEvent getProperty JFaceResources TEXT_FONT JFaceResources getFont JFaceResources TEXT_FONT getTextWidget setFont
public void property Change Property Change Event event String property event get Property if Abstract Text Editor PREFERENCE COLOR FOREGROUND equals property Abstract Text Editor PREFERENCE COLOR FOREGROUND SYSTEM DEFAULT equals property Abstract Text Editor PREFERENCE COLOR BACKGROUND equals property Abstract Text Editor PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT equals property Abstract Text Editor PREFERENCE COLOR SELECTION FOREGROUND equals property Abstract Text Editor PREFERENCE COLOR SELECTION FOREGROUND SYSTEM DEFAULT equals property Abstract Text Editor PREFERENCE COLOR SELECTION BACKGROUND equals property Abstract Text Editor PREFERENCE COLOR SELECTION BACKGROUND SYSTEM DEFAULT equals property initialize Viewer Colors viewer preference Store if configuration affects Text Presentation event configuration adapt To Preference Change event viewer invalidate Text Presentation if Formatting Preferences affects Formatting event format viewer preference Store  propertyChange PropertyChangeEvent getProperty AbstractTextEditor PREFERENCE_COLOR_FOREGROUND AbstractTextEditor PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT AbstractTextEditor PREFERENCE_COLOR_BACKGROUND AbstractTextEditor PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT AbstractTextEditor PREFERENCE_COLOR_SELECTION_FOREGROUND AbstractTextEditor PREFERENCE_COLOR_SELECTION_FOREGROUND_SYSTEM_DEFAULT AbstractTextEditor PREFERENCE_COLOR_SELECTION_BACKGROUND AbstractTextEditor PREFERENCE_COLOR_SELECTION_BACKGROUND_SYSTEM_DEFAULT initializeViewerColors preferenceStore affectsTextPresentation adaptToPreferenceChange invalidateTextPresentation FormattingPreferences affectsFormatting preferenceStore
param viewer param preference Store private void format final Source Viewer source Viewer final I Preference Store store String contents source Viewer get Document get Formatting Preferences prefs new Formatting Preferences prefs set Preference Store store contents Xml Formatter format contents prefs viewer get Document set contents  preferenceStore SourceViewer sourceViewer IPreferenceStore sourceViewer getDocument FormattingPreferences FormattingPreferences setPreferenceStore XmlFormatter getDocument
see org eclipse swt events Dispose Listener widget Disposed org eclipse swt events Dispose Event public void widget Disposed Dispose Event e preference Store remove Property Change Listener property Change Listener J Face Resources get Font Registry remove Listener font Change Listener  DisposeListener widgetDisposed DisposeEvent widgetDisposed DisposeEvent preferenceStore removePropertyChangeListener propertyChangeListener JFaceResources getFontRegistry removeListener fontChangeListener
Creates a source preview updater for the given viewer configuration and preference store param viewer the viewer param configuration the configuration param preference Store the preference store public Ant Previewer Updater final Source Viewer viewer final Abstract Ant Source Viewer Configuration configuration final I Preference Store preference Store initialize Viewer Colors viewer preference Store final I Property Change Listener font Change Listener new I Property Change Listener see org eclipse jface util I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event if event get Property equals J Face Resources TEXT FONT Font font J Face Resources get Font J Face Resources TEXT FONT viewer get Text Widget set Font font final I Property Change Listener property Change Listener new I Property Change Listener see org eclipse jface util I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event String property event get Property if Abstract Text Editor PREFERENCE COLOR FOREGROUND equals property Abstract Text Editor PREFERENCE COLOR FOREGROUND SYSTEM DEFAULT equals property Abstract Text Editor PREFERENCE COLOR BACKGROUND equals property Abstract Text Editor PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT equals property Abstract Text Editor PREFERENCE COLOR SELECTION FOREGROUND equals property Abstract Text Editor PREFERENCE COLOR SELECTION FOREGROUND SYSTEM DEFAULT equals property Abstract Text Editor PREFERENCE COLOR SELECTION BACKGROUND equals property Abstract Text Editor PREFERENCE COLOR SELECTION BACKGROUND SYSTEM DEFAULT equals property initialize Viewer Colors viewer preference Store if configuration affects Text Presentation event configuration adapt To Preference Change event viewer invalidate Text Presentation if Formatting Preferences affects Formatting event format viewer preference Store param viewer param preference Store private void format final Source Viewer source Viewer final I Preference Store store String contents source Viewer get Document get Formatting Preferences prefs new Formatting Preferences prefs set Preference Store store contents Xml Formatter format contents prefs viewer get Document set contents viewer get Text Widget add Dispose Listener new Dispose Listener see org eclipse swt events Dispose Listener widget Disposed org eclipse swt events Dispose Event public void widget Disposed Dispose Event e preference Store remove Property Change Listener property Change Listener J Face Resources get Font Registry remove Listener font Change Listener J Face Resources get Font Registry add Listener font Change Listener preference Store add Property Change Listener property Change Listener  preferenceStore AntPreviewerUpdater SourceViewer AbstractAntSourceViewerConfiguration IPreferenceStore preferenceStore initializeViewerColors preferenceStore IPropertyChangeListener fontChangeListener IPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent getProperty JFaceResources TEXT_FONT JFaceResources getFont JFaceResources TEXT_FONT getTextWidget setFont IPropertyChangeListener propertyChangeListener IPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent getProperty AbstractTextEditor PREFERENCE_COLOR_FOREGROUND AbstractTextEditor PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT AbstractTextEditor PREFERENCE_COLOR_BACKGROUND AbstractTextEditor PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT AbstractTextEditor PREFERENCE_COLOR_SELECTION_FOREGROUND AbstractTextEditor PREFERENCE_COLOR_SELECTION_FOREGROUND_SYSTEM_DEFAULT AbstractTextEditor PREFERENCE_COLOR_SELECTION_BACKGROUND AbstractTextEditor PREFERENCE_COLOR_SELECTION_BACKGROUND_SYSTEM_DEFAULT initializeViewerColors preferenceStore affectsTextPresentation adaptToPreferenceChange invalidateTextPresentation FormattingPreferences affectsFormatting preferenceStore preferenceStore SourceViewer sourceViewer IPreferenceStore sourceViewer getDocument FormattingPreferences FormattingPreferences setPreferenceStore XmlFormatter getDocument getTextWidget addDisposeListener DisposeListener DisposeListener widgetDisposed DisposeEvent widgetDisposed DisposeEvent preferenceStore removePropertyChangeListener propertyChangeListener JFaceResources getFontRegistry removeListener fontChangeListener JFaceResources getFontRegistry addListener fontChangeListener preferenceStore addPropertyChangeListener propertyChangeListener
Initializes the given viewer s colors param viewer the viewer to be initialized since 2 0 protected void initialize Viewer Colors I Source Viewer viewer I Preference Store store Styled Text styled Text viewer get Text Widget foreground color Color color store get Boolean Abstract Text Editor PREFERENCE COLOR FOREGROUND SYSTEM DEFAULT null create Color store Abstract Text Editor PREFERENCE COLOR FOREGROUND styled Text get Display styled Text set Foreground color if f Foreground Color null f Foreground Color dispose f Foreground Color color background color color store get Boolean Abstract Text Editor PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT null create Color store Abstract Text Editor PREFERENCE COLOR BACKGROUND styled Text get Display styled Text set Background color if f Background Color null f Background Color dispose f Background Color color selection foreground color color store get Boolean Abstract Text Editor PREFERENCE COLOR SELECTION FOREGROUND SYSTEM DEFAULT null create Color store Abstract Text Editor PREFERENCE COLOR SELECTION FOREGROUND styled Text get Display styled Text set Selection Foreground color if f Selection Foreground Color null f Selection Foreground Color dispose f Selection Foreground Color color selection background color color store get Boolean Abstract Text Editor PREFERENCE COLOR SELECTION BACKGROUND SYSTEM DEFAULT null create Color store Abstract Text Editor PREFERENCE COLOR SELECTION BACKGROUND styled Text get Display styled Text set Selection Background color if f Selection Background Color null f Selection Background Color dispose f Selection Background Color color  initializeViewerColors ISourceViewer IPreferenceStore StyledText styledText getTextWidget getBoolean AbstractTextEditor PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT createColor AbstractTextEditor PREFERENCE_COLOR_FOREGROUND styledText getDisplay styledText setForeground fForegroundColor fForegroundColor fForegroundColor getBoolean AbstractTextEditor PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT createColor AbstractTextEditor PREFERENCE_COLOR_BACKGROUND styledText getDisplay styledText setBackground fBackgroundColor fBackgroundColor fBackgroundColor getBoolean AbstractTextEditor PREFERENCE_COLOR_SELECTION_FOREGROUND_SYSTEM_DEFAULT createColor AbstractTextEditor PREFERENCE_COLOR_SELECTION_FOREGROUND styledText getDisplay styledText setSelectionForeground fSelectionForegroundColor fSelectionForegroundColor fSelectionForegroundColor getBoolean AbstractTextEditor PREFERENCE_COLOR_SELECTION_BACKGROUND_SYSTEM_DEFAULT createColor AbstractTextEditor PREFERENCE_COLOR_SELECTION_BACKGROUND styledText getDisplay styledText setSelectionBackground fSelectionBackgroundColor fSelectionBackgroundColor fSelectionBackgroundColor
Creates a color from the information stored in the given preference store Returns code null code if there is no such information available param store the store to read from param key the key used for the lookup in the preference store param display the display used create the color return the created color according to the specification in the preference store since 2 0 private Color create Color I Preference Store store String key Display display RGB rgb null if store contains key if store is Default key rgb Preference Converter get Default Color store key else rgb Preference Converter get Color store key if rgb null return new Color display rgb return null  createColor IPreferenceStore isDefault PreferenceConverter getDefaultColor PreferenceConverter getColor
public void dispose if f Foreground Color null f Foreground Color dispose f Foreground Color null if f Background Color null f Background Color dispose f Background Color null if f Selection Foreground Color null f Selection Foreground Color dispose f Selection Foreground Color null if f Selection Background Color null f Selection Background Color dispose f Selection Background Color null  fForegroundColor fForegroundColor fForegroundColor fBackgroundColor fBackgroundColor fBackgroundColor fSelectionForegroundColor fSelectionForegroundColor fSelectionForegroundColor fSelectionBackgroundColor fSelectionBackgroundColor fSelectionBackgroundColor

private Selection Adapter button Listener new Selection Adapter public void widget Selected Selection Event event if event widget add Button add Property else if event widget edit Button edit else if event widget remove Button remove property Table Viewer else if event widget add File Button add Property File else if event widget add External File Button add External Property File else if event widget remove File Button remove file Table Viewer  SelectionAdapter buttonListener SelectionAdapter widgetSelected SelectionEvent addButton addProperty editButton removeButton propertyTableViewer addFileButton addPropertyFile addExternalFileButton addExternalPropertyFile removeFileButton fileTableViewer
private Key Adapter key Listener new Key Adapter public void key Pressed Key Event event if event get Source property Table Viewer if remove Button is Enabled event character SWT DEL event state Mask 0 remove property Table Viewer else if event get Source file Table Viewer if remove File Button is Enabled event character SWT DEL event state Mask 0 remove file Table Viewer  KeyAdapter keyListener KeyAdapter keyPressed KeyEvent getSource propertyTableViewer removeButton isEnabled stateMask propertyTableViewer getSource fileTableViewer removeFileButton isEnabled stateMask fileTableViewer
private I Selection Changed Listener table Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event if tables Enabled if event get Source property Table Viewer property Table Selection Changed I Structured Selection event get Selection else if event get Source file Table Viewer file Table Selection Changed I Structured Selection event get Selection  ISelectionChangedListener tableListener ISelectionChangedListener selectionChanged SelectionChangedEvent tablesEnabled getSource propertyTableViewer propertyTableSelectionChanged IStructuredSelection getSelection getSource fileTableViewer fileTableSelectionChanged IStructuredSelection getSelection
public Ant Properties Block I Ant Block Container container this container container  AntPropertiesBlock IAntBlockContainer
private void add Property File I Label Provider lp new Workbench Label Provider I Tree Content Provider cp new Workbench Content Provider Ant Properties File Selection Dialog dialog new Ant Properties File Selection Dialog property Table Viewer get Control get Shell lp cp Arrays as List get Property Files if dialog open Window OK Object elements dialog get Result for int i 0 i elements length i I File file I File elements i String var Expression Variables Plugin get Default get String Variable Manager generate Variable Expression workspace loc file get Full Path to String NON NLS 1 Ant Content Provider file Table Viewer get Content Provider add var Expression container update  addPropertyFile ILabelProvider WorkbenchLabelProvider ITreeContentProvider WorkbenchContentProvider AntPropertiesFileSelectionDialog AntPropertiesFileSelectionDialog propertyTableViewer getControl getShell asList getPropertyFiles getResult IFile IFile varExpression VariablesPlugin getDefault getStringVariableManager generateVariableExpression workspace_loc getFullPath toString AntContentProvider fileTableViewer getContentProvider varExpression
property Table Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if event get Selection is Empty edit Button is Enabled edit  propertyTableViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getSelection isEmpty editButton isEnabled
public void create Control Composite top String property Label String property File Label Font font top get Font dialog Settings AntUI Plugin get Default get Dialog Settings Label label new Label top SWT NONE Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 label set Layout Data gd label set Font font label set Text property Label property Table Viewer create Table Viewer top property Table Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if event get Selection is Empty edit Button is Enabled edit property Table Viewer get Table add Key Listener key Listener create Button Group top label new Label top SWT NONE gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 label set Layout Data gd label set Font font label set Text property File Label file Table Viewer create Table Viewer top file Table Viewer get Table add Key Listener key Listener create Button Group top  createControl propertyLabel propertyFileLabel getFont dialogSettings AntUIPlugin getDefault getDialogSettings GridData GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan setLayoutData setFont setText propertyLabel propertyTableViewer createTableViewer propertyTableViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getSelection isEmpty editButton isEnabled propertyTableViewer getTable addKeyListener keyListener createButtonGroup GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan setLayoutData setFont setText propertyFileLabel fileTableViewer createTableViewer fileTableViewer getTable addKeyListener keyListener createButtonGroup
Creates the group which will contain the buttons private void create Button Group Composite top Composite button Group new Composite top SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 button Group set Layout layout button Group set Layout Data new Grid Data Grid Data FILL VERTICAL Grid Data HORIZONTAL ALIGN FILL button Group set Font top get Font add Buttons To Button Group button Group  createButtonGroup buttonGroup GridLayout GridLayout marginHeight marginWidth buttonGroup setLayout buttonGroup setLayoutData GridData GridData FILL_VERTICAL GridData HORIZONTAL_ALIGN_FILL buttonGroup setFont getFont addButtonsToButtonGroup buttonGroup
Creates and returns a configured table viewer in the given parent private Table Viewer create Table Viewer Composite parent Table table new Table parent SWT MULTI SWT FULL SELECTION SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data width Hint I Dialog Constants ENTRY FIELD WIDTH table set Layout Data data table set Font parent get Font Table Viewer table Viewer new Table Viewer table table Viewer set Content Provider new Ant Content Provider table Viewer set Label Provider label Provider table Viewer add Selection Changed Listener table Listener return table Viewer  TableViewer createTableViewer FULL_SELECTION GridData GridData GridData FILL_BOTH widthHint IDialogConstants ENTRY_FIELD_WIDTH setLayoutData setFont getFont TableViewer tableViewer TableViewer tableViewer setContentProvider AntContentProvider tableViewer setLabelProvider labelProvider tableViewer addSelectionChangedListener tableListener tableViewer
protected void add Buttons To Button Group Composite parent if edit Button null add Button create Push Button parent Ant Preferences Messages get String Ant Properties Block 1 NON NLS 1 edit Button create Push Button parent Ant Preferences Messages get String Ant Properties Block 2 NON NLS 1 remove Button create Push Button parent Ant Preferences Messages get String Ant Properties Block 3 NON NLS 1 else add File Button create Push Button parent Ant Preferences Messages get String Ant Properties Block 4 NON NLS 1 add External File Button create Push Button parent Ant Preferences Messages get String Ant Properties Block 14 NON NLS 1 remove File Button create Push Button parent Ant Preferences Messages get String Ant Properties Block remove File Button NON NLS 1  addButtonsToButtonGroup editButton addButton createPushButton AntPreferencesMessages getString AntPropertiesBlock editButton createPushButton AntPreferencesMessages getString AntPropertiesBlock removeButton createPushButton AntPreferencesMessages getString AntPropertiesBlock addFileButton createPushButton AntPreferencesMessages getString AntPropertiesBlock addExternalFileButton createPushButton AntPreferencesMessages getString AntPropertiesBlock removeFileButton createPushButton AntPreferencesMessages getString AntPropertiesBlock removeFileButton
Creates and returns a configured button in the given composite with the given label Widget selection callbacks for the returned button will be processed by the code button Listener code private Button create Push Button Composite parent String label Button button container create Push Button parent label button add Selection Listener button Listener Grid Data grid Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data FILL HORIZONTAL button set Layout Data grid Data return button  buttonListener createPushButton createPushButton addSelectionListener buttonListener GridData gridData GridData GridData VERTICAL_ALIGN_BEGINNING GridData FILL_HORIZONTAL setLayoutData gridData
Allows the user to enter external property files private void add External Property File String last Used Path last Used Path dialog Settings get I AntUI Constants DIALOGSTORE LASTEXTFILE if last Used Path null last Used Path NON NLS 1 File Dialog dialog new File Dialog file Table Viewer get Control get Shell SWT MULTI dialog set Filter Extensions new String properties NON NLS 1 NON NLS 2 dialog set Filter Path last Used Path String result dialog open if result null return I Path filter Path new Path dialog get Filter Path String results dialog get File Names for int i 0 i results length i String file Name results i I Path path filter Path append file Name make Absolute Ant Content Provider file Table Viewer get Content Provider add path toOS String dialog Settings put I AntUI Constants DIALOGSTORE LASTEXTFILE filter Path toOS String container update  addExternalPropertyFile lastUsedPath lastUsedPath dialogSettings IAntUIConstants DIALOGSTORE_LASTEXTFILE lastUsedPath lastUsedPath FileDialog FileDialog fileTableViewer getControl getShell setFilterExtensions setFilterPath lastUsedPath IPath filterPath getFilterPath getFileNames fileName IPath filterPath fileName makeAbsolute AntContentProvider fileTableViewer getContentProvider toOSString dialogSettings IAntUIConstants DIALOGSTORE_LASTEXTFILE filterPath toOSString
private void remove Table Viewer viewer Ant Content Provider ant Content Provider Ant Content Provider viewer get Content Provider I Structured Selection sel I Structured Selection viewer get Selection ant Content Provider remove sel container update  TableViewer AntContentProvider antContentProvider AntContentProvider getContentProvider IStructuredSelection IStructuredSelection getSelection antContentProvider
Allows the user to enter a user property private void add Property String title Ant Preferences Messages get String Ant Properties Block Add Property 2 NON NLS 1 Add Property Dialog dialog new Add Property Dialog property Table Viewer get Control get Shell title new String NON NLS 1 NON NLS 2 if dialog open Window CANCEL return String pair dialog get Name Value Pair String name pair 0 if overwrite name return Property prop new Property prop set Name name prop set Value pair 1 Ant Content Provider property Table Viewer get Content Provider add prop container update  addProperty AntPreferencesMessages getString AntPropertiesBlock Add_Property_2 AddPropertyDialog AddPropertyDialog propertyTableViewer getControl getShell getNameValuePair setName setValue AntContentProvider propertyTableViewer getContentProvider
private void edit I Structured Selection selection I Structured Selection property Table Viewer get Selection Property prop Property selection get First Element String original Name prop get Name String title Ant Preferences Messages get String Ant Properties Block Edit User Property 5 NON NLS 1 Add Property Dialog dialog new Add Property Dialog property Table Viewer get Control get Shell title new String prop get Name prop get Value false if dialog open Window CANCEL return String pair dialog get Name Value Pair String name pair 0 if name equals original Name if overwrite name return prop set Name name prop set Value pair 1 trigger a resort property Table Viewer refresh container update  IStructuredSelection IStructuredSelection propertyTableViewer getSelection getFirstElement originalName getName AntPreferencesMessages getString AntPropertiesBlock Edit_User_Property_5 AddPropertyDialog AddPropertyDialog propertyTableViewer getControl getShell getName getValue getNameValuePair originalName setName setValue propertyTableViewer
private boolean overwrite String name Object properties get Properties for int i 0 i properties length i Property property Property properties i String property Name property get Name if property Name equals name if property is Default Message Dialog open Error property Table Viewer get Control get Shell Ant Preferences Messages get String Ant Properties Block 17 Message Format format Ant Preferences Messages get String Ant Properties Block 18 new String property Name property get Plugin Label NON NLS 1 NON NLS 2 return false boolean over Write Message Dialog open Question property Table Viewer get Control get Shell Ant Preferences Messages get String Ant Properties Block 15 Message Format format Ant Preferences Messages get String Ant Properties Block 16 new String name NON NLS 1 NON NLS 2 if over Write return false Ant Content Provider property Table Viewer get Content Provider remove property break return true  getProperties propertyName getName propertyName isDefault MessageDialog openError propertyTableViewer getControl getShell AntPreferencesMessages getString AntPropertiesBlock MessageFormat AntPreferencesMessages getString AntPropertiesBlock propertyName getPluginLabel overWrite MessageDialog openQuestion propertyTableViewer getControl getShell AntPreferencesMessages getString AntPropertiesBlock MessageFormat AntPreferencesMessages getString AntPropertiesBlock overWrite AntContentProvider propertyTableViewer getContentProvider
Handles selection changes in the Property file table viewer private void file Table Selection Changed I Structured Selection new Selection remove File Button set Enabled new Selection size 0  fileTableSelectionChanged IStructuredSelection newSelection removeFileButton setEnabled newSelection
Handles selection changes in the Property table viewer private void property Table Selection Changed I Structured Selection new Selection int size new Selection size boolean enabled true Iterator itr new Selection iterator while itr has Next Object element itr next if element instanceof Property Property property Property element if property is Default enabled false break edit Button set Enabled enabled size 1 remove Button set Enabled enabled size 0  propertyTableSelectionChanged IStructuredSelection newSelection newSelection newSelection hasNext isDefault editButton setEnabled removeButton setEnabled
public void populate Property Viewer Map properties if properties null property Table Viewer set Input new Property 0 return Property result new Property properties size Iterator entries properties entry Set iterator int i 0 while entries has Next Map Entry element Map Entry entries next Property property new Property property set Name String element get Key property set Value String element get Value result i property i property Table Viewer set Input result  populatePropertyViewer propertyTableViewer setInput entrySet hasNext setName getKey setValue getValue propertyTableViewer setInput
public void set Properties Input Property properties property Table Viewer set Input properties  setPropertiesInput propertyTableViewer setInput
public void set Property Files Input String files file Table Viewer set Input files  setPropertyFilesInput fileTableViewer setInput
public void update property Table Selection Changed I Structured Selection property Table Viewer get Selection file Table Selection Changed I Structured Selection file Table Viewer get Selection  propertyTableSelectionChanged IStructuredSelection propertyTableViewer getSelection fileTableSelectionChanged IStructuredSelection fileTableViewer getSelection
public Object get Properties return Ant Content Provider property Table Viewer get Content Provider get Elements null  getProperties AntContentProvider propertyTableViewer getContentProvider getElements
public Object get Property Files return Ant Content Provider file Table Viewer get Content Provider get Elements null  getPropertyFiles AntContentProvider fileTableViewer getContentProvider getElements
public void set Enabled boolean enable set Tables Enabled enable add Button set Enabled enable add External File Button set Enabled enable add File Button set Enabled enable edit Button set Enabled enable remove Button set Enabled enable remove File Button set Enabled enable if enable property Table Viewer set Selection property Table Viewer get Selection file Table Viewer set Selection file Table Viewer get Selection else Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences List properties prefs get Properties property Table Viewer set Input properties file Table Viewer set Input prefs get Custom Property Files false  setEnabled setTablesEnabled addButton setEnabled addExternalFileButton setEnabled addFileButton setEnabled editButton setEnabled removeButton setEnabled removeFileButton setEnabled propertyTableViewer setSelection propertyTableViewer getSelection fileTableViewer setSelection fileTableViewer getSelection AntCorePreferences AntCorePlugin getPlugin getPreferences getProperties propertyTableViewer setInput fileTableViewer setInput getCustomPropertyFiles
public void set Tables Enabled boolean tables Enabled this tables Enabled tables Enabled  setTablesEnabled tablesEnabled tablesEnabled tablesEnabled

I Selection Status Validator validator new I Selection Status Validator public I Status validate Object selection if selection length 0 return new Status I Status ERROR AntUI Plugin get Unique Identifier 0 null NON NLS 1 for int i 0 i selection length i if selection i instanceof I File return new Status I Status ERROR AntUI Plugin get Unique Identifier 0 null NON NLS 1 return new Status I Status OK AntUI Plugin get Unique Identifier 0 null NON NLS 1  ISelectionStatusValidator ISelectionStatusValidator IStatus IStatus AntUIPlugin getUniqueIdentifier IFile IStatus AntUIPlugin getUniqueIdentifier IStatus AntUIPlugin getUniqueIdentifier
public Ant Properties File Selection Dialog Shell parent I Label Provider label Provider I Tree Content Provider content Provider List property Files super parent label Provider content Provider set Title Ant Preferences Messages get String Ant Properties File Selection Dialog 12 NON NLS 1 set Message Ant Preferences Messages get String Ant Properties File Selection Dialog 13 NON NLS 1 f Filter new Property File Filter property Files set Input Resources Plugin get Workspace get Root set Sorter new Resource Sorter Resource Sorter NAME I Selection Status Validator validator new I Selection Status Validator public I Status validate Object selection if selection length 0 return new Status I Status ERROR AntUI Plugin get Unique Identifier 0 null NON NLS 1 for int i 0 i selection length i if selection i instanceof I File return new Status I Status ERROR AntUI Plugin get Unique Identifier 0 null NON NLS 1 return new Status I Status OK AntUI Plugin get Unique Identifier 0 null NON NLS 1 set Validator validator  AntPropertiesFileSelectionDialog ILabelProvider labelProvider ITreeContentProvider contentProvider propertyFiles labelProvider contentProvider setTitle AntPreferencesMessages getString AntPropertiesFileSelectionDialog setMessage AntPreferencesMessages getString AntPropertiesFileSelectionDialog fFilter PropertyFileFilter propertyFiles setInput ResourcesPlugin getWorkspace getRoot setSorter ResourceSorter ResourceSorter ISelectionStatusValidator ISelectionStatusValidator IStatus IStatus AntUIPlugin getUniqueIdentifier IFile IStatus AntUIPlugin getUniqueIdentifier IStatus AntUIPlugin getUniqueIdentifier setValidator
button add Selection Listener new Selection Adapter public void widget Selected Selection Event event if button get Selection f Show All false get Tree Viewer add Filter f Filter else f Show All true get Tree Viewer remove Filter f Filter  addSelectionListener SelectionAdapter widgetSelected SelectionEvent getSelection fShowAll getTreeViewer addFilter fFilter fShowAll getTreeViewer removeFilter fFilter
protected Control create Dialog Area Composite parent Composite result Composite super create Dialog Area parent final Button button new Button result SWT CHECK button set Text Ant Preferences Messages get String Ant Properties File Selection Dialog 14 NON NLS 1 button set Font parent get Font Grid Data data new Grid Data data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT button set Layout Data data I Dialog Settings settings AntUI Plugin get Default get Dialog Settings f Show All settings get Boolean DIALOG SETTING if f Show All get Tree Viewer add Filter f Filter button set Selection true button add Selection Listener new Selection Adapter public void widget Selected Selection Event event if button get Selection f Show All false get Tree Viewer add Filter f Filter else f Show All true get Tree Viewer remove Filter f Filter apply Dialog Font result return result  createDialogArea createDialogArea setText AntPreferencesMessages getString AntPropertiesFileSelectionDialog setFont getFont GridData GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT setLayoutData IDialogSettings AntUIPlugin getDefault getDialogSettings fShowAll getBoolean DIALOG_SETTING fShowAll getTreeViewer addFilter fFilter setSelection addSelectionListener SelectionAdapter widgetSelected SelectionEvent getSelection fShowAll getTreeViewer addFilter fFilter fShowAll getTreeViewer removeFilter fFilter applyDialogFont
public boolean close I Dialog Settings settings AntUI Plugin get Default get Dialog Settings settings put DIALOG SETTING f Show All return super close  IDialogSettings AntUIPlugin getDefault getDialogSettings DIALOG_SETTING fShowAll

Creates an instance public Ant Properties Page Ant Runtime Preference Page preference Page this preference Page preference Page  AntPropertiesPage AntRuntimePreferencePage preferencePage preferencePage preferencePage
Creates the tab item that contains this sub page protected Tab Item create Tab Item Tab Folder folder Tab Item item new Tab Item folder SWT NONE item set Text Ant Preferences Messages get String Ant Properties Page title NON NLS 1 item set Image Ant Object Label Provider get Property Image item set Data this item set Control create Contents folder return item  TabItem createTabItem TabFolder TabItem TabItem setText AntPreferencesMessages getString AntPropertiesPage setImage AntObjectLabelProvider getPropertyImage setData setControl createContents
protected Composite create Contents Composite parent Font font parent get Font Composite top new Composite parent SWT NONE top set Font font Workbench Help set Help top I AntUI Help Context Ids ANT PROPERTIES PAGE Grid Layout layout new Grid Layout layout num Columns 2 top set Layout layout Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL top set Layout Data grid Data ant Properties Block create Control top Ant Preferences Messages get String Ant Properties Page Global properties  1 Ant Preferences Messages get String Ant Properties Page Glo bal property files  2 NON NLS 1 NON NLS 2 return top  createContents getFont setFont WorkbenchHelp setHelp IAntUIHelpContextIds ANT_PROPERTIES_PAGE GridLayout GridLayout numColumns setLayout GridData gridData GridData GridData FILL_HORIZONTAL setLayoutData gridData antPropertiesBlock createControl AntPreferencesMessages getString AntPropertiesPage Global_properties__1 AntPreferencesMessages getString AntPropertiesPage bal_property_files__2
Sets the contents of the tables on this page protected void initialize List all Properties Ant Core Plugin get Plugin get Preferences get Default Properties all Properties add All Arrays as List Ant Core Plugin get Plugin get Preferences get Custom Properties ant Properties Block set Properties Input Property all Properties to Array new Property all Properties size ant Properties Block set Property Files Input Ant Core Plugin get Plugin get Preferences get Custom Property Files false ant Properties Block update  allProperties AntCorePlugin getPlugin getPreferences getDefaultProperties allProperties addAll asList AntCorePlugin getPlugin getPreferences getCustomProperties antPropertiesBlock setPropertiesInput allProperties toArray allProperties antPropertiesBlock setPropertyFilesInput AntCorePlugin getPlugin getPreferences getCustomPropertyFiles antPropertiesBlock
protected void perform Defaults List default Properties Ant Core Plugin get Plugin get Preferences get Default Properties ant Properties Block set Properties Input Property default Properties to Array new Property default Properties size ant Properties Block set Property Files Input new String 0 ant Properties Block update  performDefaults defaultProperties AntCorePlugin getPlugin getPreferences getDefaultProperties antPropertiesBlock setPropertiesInput defaultProperties toArray defaultProperties antPropertiesBlock setPropertyFilesInput antPropertiesBlock
Returns the specified property files return String protected String get Property Files Object elements ant Properties Block get Property Files String files new String elements length for int i 0 i elements length i files i String elements i return files  getPropertyFiles antPropertiesBlock getPropertyFiles
see org eclipse ant internal ui preferences I Ant Block Container set Message java lang String public void set Message String message preference Page set Message message  IAntBlockContainer setMessage setMessage preferencePage setMessage
see org eclipse ant internal ui preferences I Ant Block Container set Error Message java lang String public void set Error Message String message preference Page set Error Message message  IAntBlockContainer setErrorMessage setErrorMessage preferencePage setErrorMessage
public Button create Push Button Composite parent String button Text Button button new Button parent SWT PUSH button set Font parent get Font button set Text button Text preference Page set Button Layout Data button return button  createPushButton buttonText setFont getFont setText buttonText preferencePage setButtonLayoutData
see org eclipse ant internal ui preferences I Ant Block Container update public void update  IAntBlockContainer
protected List get Properties Object all Properties ant Properties Block get Properties List properties new Array List all Properties length for int i 0 i all Properties length i Property property Property all Properties i if property is Default properties add property return properties  getProperties allProperties antPropertiesBlock getProperties ArrayList allProperties allProperties allProperties isDefault

Creates the preference page public Ant Runtime Preference Page set Description Ant Preferences Messages get String Ant Preference Page description NON NLS 1 set Preference Store AntUI Plugin get Default get Preference Store  AntRuntimePreferencePage setDescription AntPreferencesMessages getString AntPreferencePage setPreferenceStore AntUIPlugin getDefault getPreferenceStore
see org eclipse ui I Workbench Preference Page init org eclipse ui I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
protected Control create Contents Composite parent Workbench Help set Help get Control I AntUI Help Context Ids ANT RUNTIME PREFERENCE PAGE initialize Dialog Units parent Tab Folder folder new Tab Folder parent SWT NONE folder set Layout new Tab Folder Layout folder set Layout Data new Grid Data Grid Data FILL BOTH folder set Font parent get Font classpath Page new Ant Classpath Page this classpath Page create Tab Item folder tasks Page new Ant Tasks Page this tasks Page create Tab Item folder types Page new Ant Types Page this types Page create Tab Item folder properties Page new Ant Properties Page this properties Page create Tab Item folder tasks Page initialize types Page initialize classpath Page initialize properties Page initialize return folder  createContents WorkbenchHelp setHelp getControl IAntUIHelpContextIds ANT_RUNTIME_PREFERENCE_PAGE initializeDialogUnits TabFolder TabFolder setLayout TabFolderLayout setLayoutData GridData GridData FILL_BOTH setFont getFont classpathPage AntClasspathPage classpathPage createTabItem tasksPage AntTasksPage tasksPage createTabItem typesPage AntTypesPage typesPage createTabItem propertiesPage AntPropertiesPage propertiesPage createTabItem tasksPage typesPage classpathPage propertiesPage
protected void perform Defaults super perform Defaults Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences tasks Page set Input prefs get Default Tasks types Page set Input prefs get Default Types classpath Page perform Defaults properties Page perform Defaults  performDefaults performDefaults AntCorePreferences AntCorePlugin getPlugin getPreferences tasksPage setInput getDefaultTasks typesPage setInput getDefaultTypes classpathPage performDefaults propertiesPage performDefaults
public boolean perform Ok Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences prefs set Ant Home Classpath Entries classpath Page get Ant Home Entries prefs set Additional Classpath Entries classpath Page get Additional Entries String ant Home classpath Page get Ant Home prefs set Ant Home ant Home List contents tasks Page get Contents false if contents null Task tasks Task contents to Array new Task contents size prefs set Custom Tasks tasks contents types Page get Contents false if contents null Type types Type contents to Array new Type contents size prefs set Custom Types types contents properties Page get Properties if contents null Property properties Property contents to Array new Property contents size prefs set Custom Properties properties String files properties Page get Property Files prefs set Custom Property Files files prefs update Plugin Preferences return super perform Ok  performOk AntCorePreferences AntCorePlugin getPlugin getPreferences setAntHomeClasspathEntries classpathPage getAntHomeEntries setAdditionalClasspathEntries classpathPage getAdditionalEntries antHome classpathPage getAntHome setAntHome antHome tasksPage getContents toArray setCustomTasks typesPage getContents toArray setCustomTypes propertiesPage getProperties toArray setCustomProperties propertiesPage getPropertyFiles setCustomPropertyFiles updatePluginPreferences performOk
see org eclipse jface dialogs Dialog Page set Button Layout Data org eclipse swt widgets Button protected Grid Data set Button Layout Data Button button return super set Button Layout Data button  DialogPage setButtonLayoutData GridData setButtonLayoutData setButtonLayoutData
protected List get Library Entries List urls new Array List urls add All Arrays as List classpath Page get Ant Home Entries urls add All Arrays as List classpath Page get Additional Entries return urls  getLibraryEntries ArrayList addAll asList classpathPage getAntHomeEntries addAll asList classpathPage getAdditionalEntries

private final Ant Object Label Provider label Provider new Ant Object Label Provider Creates an instance public Ant Tasks Page Ant Runtime Preference Page preference Page super preference Page  AntObjectLabelProvider labelProvider AntObjectLabelProvider AntTasksPage AntRuntimePreferencePage preferencePage preferencePage
protected void add Buttons To Button Group Composite parent create Push Button parent Ant Preferences Messages get String Ant Tasks Page 1 ADD TASK BUTTON NON NLS 1 edit Button create Push Button parent Ant Preferences Messages get String Ant Tasks Page 2 EDIT TASK BUTTON NON NLS 1 remove Button create Push Button parent Ant Preferences Messages get String Ant Tasks Page 3 REMOVE BUTTON NON NLS 1  addButtonsToButtonGroup createPushButton AntPreferencesMessages getString AntTasksPage ADD_TASK_BUTTON editButton createPushButton AntPreferencesMessages getString AntTasksPage EDIT_TASK_BUTTON removeButton createPushButton AntPreferencesMessages getString AntTasksPage REMOVE_BUTTON
Allows the user to enter a custom task private void add Task String title Ant Preferences Messages get String Ant Tasks Page add Task Dialog Title NON NLS 1 Add Custom Dialog dialog get Custom Dialog title I AntUI Help Context Ids ADD TASK DIALOG if dialog open Window CANCEL return Task task new Task task set Task Name dialog get Name task set Class Name dialog get Class Name task set Library Entry dialog get Library Entry add Content task  addTask AntPreferencesMessages getString AntTasksPage addTaskDialogTitle AddCustomDialog getCustomDialog IAntUIHelpContextIds ADD_TASK_DIALOG setTaskName getName setClassName getClassName setLibraryEntry getLibraryEntry addContent
private Add Custom Dialog get Custom Dialog String title String help Context Iterator tasks get Contents true iterator List names new Array List while tasks has Next Task task Task tasks next names add task get Task Name Add Custom Dialog dialog new Add Custom Dialog get Shell get Preference Page get Library Entries names help Context dialog set Title title dialog set Already Exists Error Msg Ant Preferences Messages get String Ant Tasks Page 8 NON NLS 1 dialog set No Name Error Msg Ant Preferences Messages get String Ant Tasks Page 9 NON NLS 1 return dialog  AddCustomDialog getCustomDialog helpContext getContents ArrayList hasNext getTaskName AddCustomDialog AddCustomDialog getShell getPreferencePage getLibraryEntries helpContext setTitle setAlreadyExistsErrorMsg AntPreferencesMessages getString AntTasksPage setNoNameErrorMsg AntPreferencesMessages getString AntTasksPage
protected void button Pressed int button Id switch button Id case ADD TASK BUTTON add Task break case EDIT TASK BUTTON edit get Selection break case REMOVE BUTTON remove break  buttonPressed buttonId buttonId ADD_TASK_BUTTON addTask EDIT_TASK_BUTTON getSelection REMOVE_BUTTON
Creates the tab item that contains this sub page protected Tab Item create Tab Item Tab Folder folder Tab Item item new Tab Item folder SWT NONE item set Text Ant Preferences Messages get String Ant Tasks Page title NON NLS 1 item set Image label Provider get Task Image item set Data this Composite top new Composite folder SWT NONE top set Font folder get Font item set Control create Contents top connect To Folder item folder return item  TabItem createTabItem TabFolder TabItem TabItem setText AntPreferencesMessages getString AntTasksPage setImage labelProvider getTaskImage setData setFont getFont setControl createContents connectToFolder
protected void edit I Structured Selection selection Task task Task selection get First Element String title Ant Preferences Messages get String Ant Tasks Page edit Task Dialog Title NON NLS 1 Add Custom Dialog dialog get Custom Dialog title I AntUI Help Context Ids EDIT TASK DIALOG dialog set Class Name task get Class Name dialog set Name task get Task Name dialog set Library Entry task get Library Entry if dialog open Window CANCEL return task set Task Name dialog get Name task set Class Name dialog get Class Name task set Library Entry dialog get Library Entry update Content task  IStructuredSelection getFirstElement AntPreferencesMessages getString AntTasksPage editTaskDialogTitle AddCustomDialog getCustomDialog IAntUIHelpContextIds EDIT_TASK_DIALOG setClassName getClassName setName getTaskName setLibraryEntry getLibraryEntry setTaskName getName setClassName getClassName setLibraryEntry getLibraryEntry updateContent
see org eclipse ant internal ui preferences Ant Page get Label Provider protected I Table Label Provider get Label Provider return label Provider  AntPage getLabelProvider ITableLabelProvider getLabelProvider labelProvider
see org eclipse ant internal ui preferences Ant Page initialize protected void initialize Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences set Input prefs get Tasks  AntPage AntCorePreferences AntCorePlugin getPlugin getPreferences setInput getTasks
see org eclipse ant internal ui preferences Ant Page get Help Context Id protected String get Help Context Id return I AntUI Help Context Ids ANT TASKS PAGE  AntPage getHelpContextId getHelpContextId IAntUIHelpContextIds ANT_TASKS_PAGE

private final Ant Object Label Provider label Provider new Ant Object Label Provider Creates an instance public Ant Types Page Ant Runtime Preference Page preference Page super preference Page  AntObjectLabelProvider labelProvider AntObjectLabelProvider AntTypesPage AntRuntimePreferencePage preferencePage preferencePage
protected void add Buttons To Button Group Composite parent create Push Button parent Ant Preferences Messages get String Ant Types Page 2 ADD TYPE BUTTON NON NLS 1 edit Button create Push Button parent Ant Preferences Messages get String Ant Types Page 3 EDIT TYPE BUTTON NON NLS 1 remove Button create Push Button parent Ant Preferences Messages get String Ant Types Page 1 REMOVE BUTTON NON NLS 1  addButtonsToButtonGroup createPushButton AntPreferencesMessages getString AntTypesPage ADD_TYPE_BUTTON editButton createPushButton AntPreferencesMessages getString AntTypesPage EDIT_TYPE_BUTTON removeButton createPushButton AntPreferencesMessages getString AntTypesPage REMOVE_BUTTON
Allows the user to enter a custom type private void add Type String title Ant Preferences Messages get String Ant Types Page add Type Dialog Title NON NLS 1 Add Custom Dialog dialog get Custom Dialog title I AntUI Help Context Ids ADD TYPE DIALOG if dialog open Window CANCEL return Type type new Type type set Type Name dialog get Name type set Class Name dialog get Class Name type set Library Entry dialog get Library Entry add Content type  addType AntPreferencesMessages getString AntTypesPage addTypeDialogTitle AddCustomDialog getCustomDialog IAntUIHelpContextIds ADD_TYPE_DIALOG setTypeName getName setClassName getClassName setLibraryEntry getLibraryEntry addContent
protected void button Pressed int button Id switch button Id case ADD TYPE BUTTON add Type break case EDIT TYPE BUTTON edit get Selection break case REMOVE BUTTON remove break  buttonPressed buttonId buttonId ADD_TYPE_BUTTON addType EDIT_TYPE_BUTTON getSelection REMOVE_BUTTON
Creates the tab item that contains this sub page protected Tab Item create Tab Item Tab Folder folder Tab Item item new Tab Item folder SWT NONE item set Text Ant Preferences Messages get String Ant Types Page types Page Title NON NLS 1 item set Image label Provider get Type Image item set Data this Composite top new Composite folder SWT NONE top set Font folder get Font item set Control create Contents top connect To Folder item folder return item  TabItem createTabItem TabFolder TabItem TabItem setText AntPreferencesMessages getString AntTypesPage typesPageTitle setImage labelProvider getTypeImage setData setFont getFont setControl createContents connectToFolder
protected void edit I Structured Selection selection Type type Type selection get First Element String title Ant Preferences Messages get String Ant Types Page edit Type Dialog Title NON NLS 1 Add Custom Dialog dialog get Custom Dialog title I AntUI Help Context Ids EDIT TYPE DIALOG dialog set Class Name type get Class Name dialog set Name type get Type Name dialog set Library Entry type get Library Entry if dialog open Window CANCEL return type set Type Name dialog get Name type set Class Name dialog get Class Name type set Library Entry dialog get Library Entry update Content type  IStructuredSelection getFirstElement AntPreferencesMessages getString AntTypesPage editTypeDialogTitle AddCustomDialog getCustomDialog IAntUIHelpContextIds EDIT_TYPE_DIALOG setClassName getClassName setName getTypeName setLibraryEntry getLibraryEntry setTypeName getName setClassName getClassName setLibraryEntry getLibraryEntry updateContent
private Add Custom Dialog get Custom Dialog String title String help Context Iterator types get Contents true iterator List names new Array List while types has Next Type a Task Type types next names add a Task get Type Name Add Custom Dialog dialog new Add Custom Dialog get Shell get Preference Page get Library Entries names help Context dialog set Title title dialog set Already Exists Error Msg Ant Preferences Messages get String Ant Types Page 8 NON NLS 1 dialog set No Name Error Msg Ant Preferences Messages get String Ant Types Page 9 NON NLS 1 return dialog  AddCustomDialog getCustomDialog helpContext getContents ArrayList hasNext aTask aTask getTypeName AddCustomDialog AddCustomDialog getShell getPreferencePage getLibraryEntries helpContext setTitle setAlreadyExistsErrorMsg AntPreferencesMessages getString AntTypesPage setNoNameErrorMsg AntPreferencesMessages getString AntTypesPage
see org eclipse ant internal ui preferences Ant Page get Label Provider protected I Table Label Provider get Label Provider return label Provider  AntPage getLabelProvider ITableLabelProvider getLabelProvider labelProvider
see org eclipse ant internal ui preferences Ant Page initialize protected void initialize Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences set Input prefs get Types  AntPage AntCorePreferences AntCorePlugin getPlugin getPreferences setInput getTypes
see org eclipse ant internal ui preferences Ant Page get Help Context Id protected String get Help Context Id return I AntUI Help Context Ids ANT TYPES PAGE  AntPage getHelpContextId getHelpContextId IAntUIHelpContextIds ANT_TYPES_PAGE

public Classpath Entry Object o I Classpath Entry parent this parent parent if o instanceof URL url URL o else if o instanceof String variable String String o else if o instanceof I Ant Classpath Entry entry I Ant Classpath Entry o  ClasspathEntry IClasspathEntry variableString IAntClasspathEntry IAntClasspathEntry
public boolean equals Object obj if obj instanceof I Ant Classpath Entry I Ant Classpath Entry other I Ant Classpath Entry obj return other get Label equals get Label return false  IAntClasspathEntry IAntClasspathEntry IAntClasspathEntry getLabel getLabel
see java lang Object hash Code public int hash Code return get Label hash Code  hashCode hashCode getLabel hashCode
public String to String if entry null return entry get Label if getURL null return getURL get File return get Variable String  toString getLabel getFile getVariableString
protected URL getURL return url 
protected String get Variable String return variable String  getVariableString variableString
public String get Label if entry null return to String return entry get Label  getLabel toString getLabel
public URL get EntryURL if entry null return entry get EntryURL if url null return url try String expanded Variables Plugin get Default get String Variable Manager perform String Substitution variable String return new URL file expanded NON NLS 1 catch Core Exception e AntUI Plugin log e catch MalformedURL Exception e AntUI Plugin log e return null  getEntryURL getEntryURL VariablesPlugin getDefault getStringVariableManager performStringSubstitution variableString CoreException AntUIPlugin MalformedURLException AntUIPlugin

public Object add Entry Object entry if entry instanceof Global Classpath Entries if child Entries contains entry child Entries add entry return entry return null Classpath Entry new Entry create Entry entry null Iterator entries child Entries iterator while entries has Next Object element entries next if element instanceof Global Classpath Entries if Global Classpath Entries element contains new Entry return null else if element equals new Entry return null child Entries add new Entry return new Entry  addEntry GlobalClasspathEntries childEntries childEntries ClasspathEntry newEntry createEntry childEntries hasNext GlobalClasspathEntries GlobalClasspathEntries newEntry newEntry childEntries newEntry newEntry
public Object add Entry int entry Type Object entry I Classpath Entry entry Parent null switch entry Type case ANT HOME if ant Home Entry null String name Ant Preferences Messages get String Classpath Model 2 NON NLS 1 ant Home Entry create Global Entry new I Ant Classpath Entry 0 name false true ANT HOME entry Parent ant Home Entry break case GLOBAL USER if user Global Entry null String name Ant Preferences Messages get String Classpath Model 3 NON NLS 1 user Global Entry create Global Entry new I Ant Classpath Entry 0 name true true GLOBAL USER entry Parent user Global Entry break default break Classpath Entry new Entry create Entry entry entry Parent Iterator entries child Entries iterator while entries has Next Object element entries next if element instanceof Global Classpath Entries if Global Classpath Entries element contains new Entry return null else if element equals new Entry return null if entry Parent null Global Classpath Entries entry Parent add Entry new Entry else child Entries add new Entry return new Entry  addEntry entryType IClasspathEntry entryParent entryType ANT_HOME antHomeEntry AntPreferencesMessages getString ClasspathModel antHomeEntry createGlobalEntry IAntClasspathEntry ANT_HOME entryParent antHomeEntry GLOBAL_USER userGlobalEntry AntPreferencesMessages getString ClasspathModel userGlobalEntry createGlobalEntry IAntClasspathEntry GLOBAL_USER entryParent userGlobalEntry ClasspathEntry newEntry createEntry entryParent childEntries hasNext GlobalClasspathEntries GlobalClasspathEntries newEntry newEntry entryParent GlobalClasspathEntries entryParent addEntry newEntry childEntries newEntry newEntry
Returns entries of the specified kind possibly empty param entry Type kind of entries to retrieve return entries of the specified kind possibly empty public I Ant Classpath Entry get Entries int entry Type switch entry Type case ANT HOME if ant Home Entry null return ant Home Entry get Entries break case GLOBAL USER if user Global Entry null return user Global Entry get Entries break case USER return get User Entries return new I Ant Classpath Entry 0  entryType IAntClasspathEntry getEntries entryType entryType ANT_HOME antHomeEntry antHomeEntry getEntries GLOBAL_USER userGlobalEntry userGlobalEntry getEntries getUserEntries IAntClasspathEntry
public void remove Object entry child Entries remove entry if entry user Global Entry user Global Entry null  childEntries userGlobalEntry userGlobalEntry
public Classpath Entry create Entry Object entry I Classpath Entry entry Parent if entry Parent null entry Parent this return new Classpath Entry entry entry Parent  ClasspathEntry createEntry IClasspathEntry entryParent entryParent entryParent ClasspathEntry entryParent
public void remove All if ant Home Entry null ant Home Entry remove All if user Global Entry null user Global Entry remove All  removeAll antHomeEntry antHomeEntry removeAll userGlobalEntry userGlobalEntry removeAll
public void remove All int entry Type switch entry Type case ANT HOME if ant Home Entry null ant Home Entry remove All break case GLOBAL USER if user Global Entry null user Global Entry remove All break default break  removeAll entryType entryType ANT_HOME antHomeEntry antHomeEntry removeAll GLOBAL_USER userGlobalEntry userGlobalEntry removeAll
public void remove All Object entries for int i 0 i entries length i Object object entries i if object instanceof Classpath Entry I Classpath Entry entry Parent Classpath Entry object get Parent if entry Parent instanceof Global Classpath Entries Global Classpath Entries entry Parent remove Entry Classpath Entry object else remove object else remove object  removeAll ClasspathEntry IClasspathEntry entryParent ClasspathEntry getParent entryParent GlobalClasspathEntries GlobalClasspathEntries entryParent removeEntry ClasspathEntry
public void set Ant Home Entries I Ant Classpath Entry entries if ant Home Entry null String name Ant Preferences Messages get String Classpath Model 2 NON NLS 1 ant Home Entry create Global Entry entries name false true ANT HOME else ant Home Entry remove All for int i 0 i entries length i ant Home Entry add Entry new Classpath Entry entries i ant Home Entry  setAntHomeEntries IAntClasspathEntry antHomeEntry AntPreferencesMessages getString ClasspathModel antHomeEntry createGlobalEntry ANT_HOME antHomeEntry removeAll antHomeEntry addEntry ClasspathEntry antHomeEntry
private Global Classpath Entries create Global Entry I Ant Classpath Entry entries String name boolean can Be Removed boolean add Entry int type Global Classpath Entries global new Global Classpath Entries name this can Be Removed type for int i 0 i entries length i global add Entry new Classpath Entry entries i global if add Entry add Entry global return global  GlobalClasspathEntries createGlobalEntry IAntClasspathEntry canBeRemoved addEntry GlobalClasspathEntries GlobalClasspathEntries canBeRemoved addEntry ClasspathEntry addEntry addEntry
public void set Global Entries I Ant Classpath Entry entries if user Global Entry null String name Ant Preferences Messages get String Classpath Model 3 NON NLS 1 user Global Entry create Global Entry entries name true true GLOBAL USER else user Global Entry remove All for int i 0 i entries length i user Global Entry add Entry new Classpath Entry entries i user Global Entry  setGlobalEntries IAntClasspathEntry userGlobalEntry AntPreferencesMessages getString ClasspathModel userGlobalEntry createGlobalEntry GLOBAL_USER userGlobalEntry removeAll userGlobalEntry addEntry ClasspathEntry userGlobalEntry
private I Ant Classpath Entry get User Entries List user Entries new Array List child Entries size Iterator itr child Entries iterator while itr has Next I Classpath Entry element I Classpath Entry itr next if element instanceof Global Classpath Entries continue user Entries add element return I Ant Classpath Entry user Entries to Array new I Ant Classpath Entry user Entries size  IAntClasspathEntry getUserEntries userEntries ArrayList childEntries childEntries hasNext IClasspathEntry IClasspathEntry GlobalClasspathEntries userEntries IAntClasspathEntry userEntries toArray IAntClasspathEntry userEntries
public String serialize Classpath boolean default Ant Home Iterator itr child Entries iterator String Buffer buff new String Buffer while itr has Next I Classpath Entry element I Classpath Entry itr next if element instanceof Global Classpath Entries if element ant Home Entry if default Ant Home is Same As Default Ant Home I Ant Classpath Entry ant Home Entries ant Home Entry get Entries for int i 0 i ant Home Entries length i I Ant Classpath Entry entry ant Home Entries i buff append buff append entry to String buff append Ant Util ATTRIBUTE SEPARATOR else buff append Ant Util ANT HOME CLASSPATH PLACEHOLDER else buff append Ant Util ANT GLOBAL USER CLASSPATH PLACEHOLDER else buff append element to String buff append Ant Util ATTRIBUTE SEPARATOR if buff length 0 return buff substring 0 buff length 1 return NON NLS 1  serializeClasspath defaultAntHome childEntries StringBuffer StringBuffer hasNext IClasspathEntry IClasspathEntry GlobalClasspathEntries antHomeEntry defaultAntHome isSameAsDefaultAntHome IAntClasspathEntry antHomeEntries antHomeEntry getEntries antHomeEntries IAntClasspathEntry antHomeEntries toString AntUtil ATTRIBUTE_SEPARATOR AntUtil ANT_HOME_CLASSPATH_PLACEHOLDER AntUtil ANT_GLOBAL_USER_CLASSPATH_PLACEHOLDER toString AntUtil ATTRIBUTE_SEPARATOR
private boolean is Same As Default Ant Home Ant Core Preferences prefs Ant Core Plugin get Plugin get Preferences I Ant Classpath Entry default Ant Home Entries prefs get Ant Home Classpath Entries I Ant Classpath Entry ant Home Entries ant Home Entry get Entries if ant Home Entries length default Ant Home Entries length return false for int i 0 i ant Home Entries length i I Ant Classpath Entry entry ant Home Entries i I Ant Classpath Entry default Entry default Ant Home Entries i if sameURL entry default Entry return false return true  isSameAsDefaultAntHome AntCorePreferences AntCorePlugin getPlugin getPreferences IAntClasspathEntry defaultAntHomeEntries getAntHomeClasspathEntries IAntClasspathEntry antHomeEntries antHomeEntry getEntries antHomeEntries defaultAntHomeEntries antHomeEntries IAntClasspathEntry antHomeEntries IAntClasspathEntry defaultEntry defaultAntHomeEntries defaultEntry
private boolean sameURL I Ant Classpath Entry first I Ant Classpath Entry second if first null second null return false File new File new File first get EntryURL get File File existing File new File second get EntryURL get File if existing File equals new File return true return false  IAntClasspathEntry IAntClasspathEntry newFile getEntryURL getFile existingFile getEntryURL getFile existingFile newFile
public Classpath Model String serialized Classpath boolean custom Ant Home String Tokenizer tokenizer new String Tokenizer serialized Classpath Ant Util ATTRIBUTE SEPARATOR while tokenizer has More Tokens String string tokenizer next Token trim if string equals Ant Util ANT HOME CLASSPATH PLACEHOLDER I Ant Classpath Entry ant Home Entries new I Ant Classpath Entry 0 if custom Ant Home ant Home Entries Ant Core Plugin get Plugin get Preferences get Ant Home Classpath Entries set Ant Home Entries ant Home Entries else if string equals Ant Util ANT GLOBAL USER CLASSPATH PLACEHOLDER set Global Entries Ant Core Plugin get Plugin get Preferences get Additional Classpath Entries else boolean is Ant Home Entry false Object entry null if string char At 0 old customclasspath string string substring 1 if string char At 0 ant home entry string string substring 1 is Ant Home Entry true try entry new URL file string NON NLS 1 catch MalformedURL Exception e entry string if is Ant Home Entry add Entry ANT HOME entry else add Entry entry  ClasspathModel serializedClasspath customAntHome StringTokenizer StringTokenizer serializedClasspath AntUtil ATTRIBUTE_SEPARATOR hasMoreTokens nextToken AntUtil ANT_HOME_CLASSPATH_PLACEHOLDER IAntClasspathEntry antHomeEntries IAntClasspathEntry customAntHome antHomeEntries AntCorePlugin getPlugin getPreferences getAntHomeClasspathEntries setAntHomeEntries antHomeEntries AntUtil ANT_GLOBAL_USER_CLASSPATH_PLACEHOLDER setGlobalEntries AntCorePlugin getPlugin getPreferences getAdditionalClasspathEntries isAntHomeEntry charAt charAt isAntHomeEntry MalformedURLException isAntHomeEntry addEntry ANT_HOME addEntry
public Classpath Model super  ClasspathModel
return public Object get Removed Global Entries if user Global Entry null String name Ant Preferences Messages get String Classpath Model 3 NON NLS 1 return new Object create Global Entry new I Ant Classpath Entry 0 name true false GLOBAL USER return new Object  getRemovedGlobalEntries userGlobalEntry AntPreferencesMessages getString ClasspathModel createGlobalEntry IAntClasspathEntry GLOBAL_USER
return public Object get Ant Home Entry return ant Home Entry  getAntHomeEntry antHomeEntry

public Color Editor Composite parent f Button new Button parent SWT PUSH f Extent compute Image Size parent f Image new Image parent get Display f Extent x f Extent y GC gc new GC f Image gc set Background f Button get Background gc fill Rectangle 0 0 f Extent x f Extent y gc dispose f Button set Image f Image f Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event Color Dialog color Dialog new Color Dialog f Button get Shell color Dialog setRGB f Color Value RGB new Color color Dialog open if new Color null f Color Value new Color update Color Image f Button add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event if f Image null f Image dispose f Image null if f Color null f Color dispose f Color null  ColorEditor fButton fExtent computeImageSize fImage getDisplay fExtent fExtent fImage setBackground fButton getBackground fillRectangle fExtent fExtent fButton setImage fImage fButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent ColorDialog colorDialog ColorDialog fButton getShell colorDialog fColorValue newColor colorDialog newColor fColorValue newColor updateColorImage fButton addDisposeListener DisposeListener widgetDisposed DisposeEvent fImage fImage fImage fColor fColor fColor
public RGB get Color Value return f Color Value  getColorValue fColorValue
public void set Color Value RGB rgb f Color Value rgb update Color Image  setColorValue fColorValue updateColorImage
public Button get Button return f Button  getButton fButton
protected void update Color Image Display display f Button get Display GC gc new GC f Image gc set Foreground display get System Color SWT COLOR BLACK gc draw Rectangle 0 2 f Extent x 1 f Extent y 4 if f Color null f Color dispose f Color new Color display f Color Value gc set Background f Color gc fill Rectangle 1 3 f Extent x 2 f Extent y 5 gc dispose f Button set Image f Image  updateColorImage fButton getDisplay fImage setForeground getSystemColor COLOR_BLACK drawRectangle fExtent fExtent fColor fColor fColor fColorValue setBackground fColor fillRectangle fExtent fExtent fButton setImage fImage
protected Point compute Image Size Control window GC gc new GC window Font f J Face Resources get Font Registry get J Face Resources DEFAULT FONT gc set Font f int height gc get Font Metrics get Height gc dispose Point p new Point height 3 6 height return p  computeImageSize JFaceResources getFontRegistry JFaceResources DEFAULT_FONT setFont getFontMetrics getHeight

Persists the location and dimensions of the shell in the Debug UI Plugin dialog settings under the provided dialog settings section name param shell The shell whose geometry is to be stored param dialog Settings Section Name The name of the dialog settings section public static void persist Shell Geometry Shell shell String dialog Settings Section Name Point shell Location shell get Location Point shell Size shell get Size I Dialog Settings settings get Dialog Settings dialog Settings Section Name settings put DIALOG ORIGIN X shell Location x settings put DIALOG ORIGIN Y shell Location y settings put DIALOG WIDTH shell Size x settings put DIALOG HEIGHT shell Size y  dialogSettingsSectionName persistShellGeometry dialogSettingsSectionName shellLocation getLocation shellSize getSize IDialogSettings getDialogSettings dialogSettingsSectionName DIALOG_ORIGIN_X shellLocation DIALOG_ORIGIN_Y shellLocation DIALOG_WIDTH shellSize DIALOG_HEIGHT shellSize
private static I Dialog Settings get Dialog Settings String dialog Settings Section Name I Dialog Settings settings AntUI Plugin get Default get Dialog Settings I Dialog Settings section settings get Section dialog Settings Section Name if section null section settings add New Section dialog Settings Section Name return section  IDialogSettings getDialogSettings dialogSettingsSectionName IDialogSettings AntUIPlugin getDefault getDialogSettings IDialogSettings getSection dialogSettingsSectionName addNewSection dialogSettingsSectionName
Returns the initial size which is the larger of the code initial Size code or the size persisted in the Debug UI Plugin dialog settings under the provided dialog setttings section name If no size is persisted in the settings the code initial Size code is returned param initial Size The initial Size to compare against param dialog Settings Section Name The name of the dialog settings section return the initial size public static Point get Initial Size String dialog Settings Section Name Point initial Size I Dialog Settings settings get Dialog Settings dialog Settings Section Name try int x y x settings get Int I Debug Preference Constants DIALOG WIDTH y settings get Int I Debug Preference Constants DIALOG HEIGHT return new Point Math max x initial Size x Math max y initial Size y catch Number Format Exception e return initial Size  initialSize initialSize initialSize initialSize dialogSettingsSectionName getInitialSize dialogSettingsSectionName initialSize IDialogSettings getDialogSettings dialogSettingsSectionName getInt IDebugPreferenceConstants DIALOG_WIDTH getInt IDebugPreferenceConstants DIALOG_HEIGHT initialSize initialSize NumberFormatException initialSize
Returns the initial location which is persisted in the Debug UI Plugin dialog settings under the provided dialog setttings section name If location is not persisted in the settings the code null code is returned param dialog Settings Section Name The name of the dialog settings section return The initial location or code null code public static Point get Initial Location String dialog Settings Section Name I Dialog Settings settings get Dialog Settings dialog Settings Section Name try int x settings get Int I Debug Preference Constants DIALOG ORIGIN X int y settings get Int I Debug Preference Constants DIALOG ORIGIN Y return new Point x y catch Number Format Exception e return null  dialogSettingsSectionName getInitialLocation dialogSettingsSectionName IDialogSettings getDialogSettings dialogSettingsSectionName getInt IDebugPreferenceConstants DIALOG_ORIGIN_X getInt IDebugPreferenceConstants DIALOG_ORIGIN_Y NumberFormatException

public Global Classpath Entries String name I Classpath Entry parent boolean can Be Removed int type this parent parent this name name this can Be Removed can Be Removed this type type  GlobalClasspathEntries IClasspathEntry canBeRemoved canBeRemoved canBeRemoved
public void add Entry Classpath Entry entry child Entries add entry  addEntry ClasspathEntry childEntries
public void remove Entry Classpath Entry entry child Entries remove entry  removeEntry ClasspathEntry childEntries
public boolean contains Classpath Entry entry return child Entries contains entry  ClasspathEntry childEntries
public String to String return name  toString
public void remove All child Entries clear  removeAll childEntries
public boolean can Be Removed return can Be Removed  canBeRemoved canBeRemoved
Set the child entries of this classpath entry param entries The child entries public void set Entries List entries child Entries entries  setEntries childEntries
return Returns the type of this global classpath entry see Classpath Model ANT HOME see Classpath Model GLOBAL USER public int get Type return type  ClasspathModel ANT_HOME ClasspathModel GLOBAL_USER getType

Sets the error message for the container May be code null code to remove the error message param message A string error message or code null code 
Sets the message for the container May be code null code to remove the message param message A string message or code null code 
Creates and returns a properly configured push button with the supplied label param parent The composite parent of the button param label The button label return button the created button 
public Button create Push Button Composite parent String label Notifies the container that state has changed public void update  createPushButton

Returns the classpath entries that are the children of this classpath entry return the child classpath entries of this entry 
Returns whether this classpath entries has child entries return whether code true code if this classpath entry has childern code false code otherwise 
Returns the parent of this classpath entry return the parent of this classpath entry or code null code if none 

Creates a new message line as a child of the given parent public Message Line Composite parent this parent SWT LEFT  MessageLine
Creates a new message line as a child of the parent and with the given SWT stylebits public Message Line Composite parent int style super parent style f Normal Msg Area Background get Background f Error Msg Area Background null  MessageLine fNormalMsgAreaBackground getBackground fErrorMsgAreaBackground
private Image find Image I Status status if status isOK return null else if status matches I Status ERROR return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJS ERROR TSK else if status matches I Status WARNING return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJS WARN TSK else if status matches I Status INFO return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJS INFO TSK return null  findImage IStatus IStatus getWorkbench getSharedImages getImage ISharedImages IMG_OBJS_ERROR_TSK IStatus getWorkbench getSharedImages getImage ISharedImages IMG_OBJS_WARN_TSK IStatus getWorkbench getSharedImages getImage ISharedImages IMG_OBJS_INFO_TSK
Sets the message and image to the given status code null code is a valid argument and will set the empty text and no image public void set Error Status I Status status if status null String message status get Message if message null message length 0 set Text message set Image find Image status if f Error Msg Area Background null f Error Msg Area Background new Color get Display ERROR BACKGROUND RGB set Background f Error Msg Area Background return set Text NON NLS 1 set Image null set Background f Normal Msg Area Background  setErrorStatus IStatus getMessage setText setImage findImage fErrorMsgAreaBackground fErrorMsgAreaBackground getDisplay ERROR_BACKGROUND_RGB setBackground fErrorMsgAreaBackground setText setImage setBackground fNormalMsgAreaBackground
public void dispose if f Error Msg Area Background null f Error Msg Area Background dispose f Error Msg Area Background null super dispose  fErrorMsgAreaBackground fErrorMsgAreaBackground fErrorMsgAreaBackground

Create a code Minimized File System Element code with the supplied name and parent param name the name of the file element this represents param parent the containing parent param is Directory indicated if this could have children or not public Minimized File System Element String name Minimized File System Element parent boolean is Directory this name name this parent parent this is Directory is Directory if parent null parent add Child this  MinimizedFileSystemElement isDirectory MinimizedFileSystemElement MinimizedFileSystemElement isDirectory isDirectory isDirectory addChild
Returns the adapter public Object get Adapter Class adapter if adapter I Workbench Adapter class return this defer to the platform return Platform get Adapter Manager get Adapter this adapter  getAdapter IWorkbenchAdapter getAdapterManager getAdapter
Returns true if this element represents a directory and false otherwise public boolean is Directory return is Directory  isDirectory isDirectory
Adds the passed child to this object s collection of children param child Minimized File System Element private void add Child Minimized File System Element child if child is Directory if folders null folders new Array List 1 folders add child else if files null files new Array List 1 files add child  MinimizedFileSystemElement addChild MinimizedFileSystemElement isDirectory ArrayList ArrayList
Returns a list of the files that are immediate children Use the supplied provider if it needs to be populated protected List get Files I Import Structure Provider provider if populated populate provider if files null return Collections EMPTY LIST return files  getFiles IImportStructureProvider EMPTY_LIST
Returns a list of the folders that are immediate children Use the supplied provider if it needs to be populated protected List get Folders I Import Structure Provider provider if populated populate provider return get Folders  getFolders IImportStructureProvider getFolders
protected List get Folders if folders null return Collections EMPTY LIST return folders  getFolders EMPTY_LIST
Return whether or not population has happened for the receiver protected boolean is Populated return this populated  isPopulated
Return whether or not population has not happened for the receiver protected boolean not Populated return this populated  notPopulated
Populate the files and folders of the receiver using the supplied structure provider param provider org eclipse ui wizards datatransfer I Import Structure Provider private void populate I Import Structure Provider provider List children provider get Children file System Object if children null children new Array List 1 Iterator children Enum children iterator while children Enum has Next Object child children Enum next String element Label provider get Label child boolean is Folder provider is Folder child if is Folder element Label ends With class NON NLS 1 continue Create one level below Minimized File System Element result new Minimized File System Element element Label this is Folder result set File System Object child set Populated  IImportStructureProvider IImportStructureProvider getChildren fileSystemObject ArrayList childrenEnum childrenEnum hasNext childrenEnum elementLabel getLabel isFolder isFolder isFolder elementLabel endsWith MinimizedFileSystemElement MinimizedFileSystemElement elementLabel isFolder setFileSystemObject setPopulated
Returns the file system object property of this element return the file system object protected Object get File System Object return file System Object  getFileSystemObject fileSystemObject
Set the file system object property of this element param value the file system object protected void set File System Object Object value file System Object value  setFileSystemObject fileSystemObject
Set whether or not population has happened for the receiver to true protected void set Populated this populated true  setPopulated
see org eclipse ui model I Workbench Adapter get Children java lang Object public Object get Children Object o return get Folders to Array  IWorkbenchAdapter getChildren getChildren getFolders toArray
see org eclipse ui model I Workbench Adapter get Image Descriptor java lang Object public Image Descriptor get Image Descriptor Object object if is Directory return PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG OBJ FOLDER return PlatformUI get Workbench get Editor Registry get Image Descriptor name  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor isDirectory getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_OBJ_FOLDER getWorkbench getEditorRegistry getImageDescriptor
see org eclipse ui model I Workbench Adapter get Label java lang Object public String get Label Object o return name  IWorkbenchAdapter getLabel getLabel
see org eclipse ui model I Workbench Adapter get Parent java lang Object public Object get Parent Object o return parent  IWorkbenchAdapter getParent getParent

public static final class Type Descriptor private Type Descriptor  TypeDescriptor TypeDescriptor
String f Key public Overlay Key Type Descriptor descriptor String key f Descriptor descriptor f Key key  fKey OverlayKey TypeDescriptor fDescriptor fKey
public void property Change Property Change Event event Overlay Key key find Overlay Key event get Property if key null propagate Property f Parent key f Store  propertyChange PropertyChangeEvent OverlayKey findOverlayKey getProperty propagateProperty fParent fStore
public Overlay Preference Store I Preference Store parent Overlay Key overlay Keys f Parent parent f Overlay Keys overlay Keys f Store new Preference Store  OverlayPreferenceStore IPreferenceStore OverlayKey overlayKeys fParent fOverlayKeys overlayKeys fStore PreferenceStore
private Overlay Key find Overlay Key String key for int i 0 i f Overlay Keys length i if f Overlay Keys i f Key equals key return f Overlay Keys i return null  OverlayKey findOverlayKey fOverlayKeys fOverlayKeys fKey fOverlayKeys
private boolean covers String key return find Overlay Key key null  findOverlayKey
private void propagate Property I Preference Store orgin Overlay Key key I Preference Store target if orgin is Default key f Key if target is Default key f Key target set To Default key f Key return Type Descriptor d key f Descriptor if BOOLEAN d boolean origin Value orgin get Boolean key f Key boolean target Value target get Boolean key f Key if target Value origin Value target set Value key f Key origin Value else if DOUBLE d double origin Value orgin get Double key f Key double target Value target get Double key f Key if target Value origin Value target set Value key f Key origin Value else if FLOAT d float origin Value orgin get Float key f Key float target Value target get Float key f Key if target Value origin Value target set Value key f Key origin Value else if INT d int origin Value orgin get Int key f Key int target Value target get Int key f Key if target Value origin Value target set Value key f Key origin Value else if LONG d long origin Value orgin get Long key f Key long target Value target get Long key f Key if target Value origin Value target set Value key f Key origin Value else if STRING d String origin Value orgin get String key f Key String target Value target get String key f Key if target Value null origin Value null target Value equals origin Value target set Value key f Key origin Value  propagateProperty IPreferenceStore OverlayKey IPreferenceStore isDefault fKey isDefault fKey setToDefault fKey TypeDescriptor fDescriptor originValue getBoolean fKey targetValue getBoolean fKey targetValue originValue setValue fKey originValue originValue getDouble fKey targetValue getDouble fKey targetValue originValue setValue fKey originValue originValue getFloat fKey targetValue getFloat fKey targetValue originValue setValue fKey originValue originValue getInt fKey targetValue getInt fKey targetValue originValue setValue fKey originValue originValue getLong fKey targetValue getLong fKey targetValue originValue setValue fKey originValue originValue getString fKey targetValue getString fKey targetValue originValue targetValue originValue setValue fKey originValue
public void propagate for int i 0 i f Overlay Keys length i propagate Property f Store f Overlay Keys i f Parent  fOverlayKeys propagateProperty fStore fOverlayKeys fParent
private void load Property I Preference Store orgin Overlay Key key I Preference Store target boolean force Initialization Type Descriptor d key f Descriptor if BOOLEAN d if force Initialization target set Value key f Key true target set Value key f Key orgin get Boolean key f Key target set Default key f Key orgin get Default Boolean key f Key else if DOUBLE d if force Initialization target set Value key f Key 1 0D target set Value key f Key orgin get Double key f Key target set Default key f Key orgin get Default Double key f Key else if FLOAT d if force Initialization target set Value key f Key 1 0F target set Value key f Key orgin get Float key f Key target set Default key f Key orgin get Default Float key f Key else if INT d if force Initialization target set Value key f Key 1 target set Value key f Key orgin get Int key f Key target set Default key f Key orgin get Default Int key f Key else if LONG d if force Initialization target set Value key f Key 1L target set Value key f Key orgin get Long key f Key target set Default key f Key orgin get Default Long key f Key else if STRING d if force Initialization target set Value key f Key 1 NON NLS 1 target set Value key f Key orgin get String key f Key target set Default key f Key orgin get Default String key f Key  loadProperty IPreferenceStore OverlayKey IPreferenceStore forceInitialization TypeDescriptor fDescriptor forceInitialization setValue fKey setValue fKey getBoolean fKey setDefault fKey getDefaultBoolean fKey forceInitialization setValue fKey setValue fKey getDouble fKey setDefault fKey getDefaultDouble fKey forceInitialization setValue fKey setValue fKey getFloat fKey setDefault fKey getDefaultFloat fKey forceInitialization setValue fKey setValue fKey getInt fKey setDefault fKey getDefaultInt fKey forceInitialization setValue fKey setValue fKey getLong fKey setDefault fKey getDefaultLong fKey forceInitialization setValue fKey setValue fKey getString fKey setDefault fKey getDefaultString fKey
public void load for int i 0 i f Overlay Keys length i load Property f Parent f Overlay Keys i f Store true  fOverlayKeys loadProperty fParent fOverlayKeys fStore
public void load Defaults for int i 0 i f Overlay Keys length i set To Default f Overlay Keys i f Key  loadDefaults fOverlayKeys setToDefault fOverlayKeys fKey
public void start if f Property Listener null f Property Listener new Property Listener f Parent add Property Change Listener f Property Listener  fPropertyListener fPropertyListener PropertyListener fParent addPropertyChangeListener fPropertyListener
public void stop if f Property Listener null f Parent remove Property Change Listener f Property Listener f Property Listener null  fPropertyListener fParent removePropertyChangeListener fPropertyListener fPropertyListener
see I Preference Store add Property Change Listener I Property Change Listener public void add Property Change Listener I Property Change Listener listener f Store add Property Change Listener listener  IPreferenceStore addPropertyChangeListener IPropertyChangeListener addPropertyChangeListener IPropertyChangeListener fStore addPropertyChangeListener
see I Preference Store remove Property Change Listener I Property Change Listener public void remove Property Change Listener I Property Change Listener listener f Store remove Property Change Listener listener  IPreferenceStore removePropertyChangeListener IPropertyChangeListener removePropertyChangeListener IPropertyChangeListener fStore removePropertyChangeListener
see I Preference Store fire Property Change Event String Object Object public void fire Property Change Event String name Object old Value Object new Value f Store fire Property Change Event name old Value new Value  IPreferenceStore firePropertyChangeEvent firePropertyChangeEvent oldValue newValue fStore firePropertyChangeEvent oldValue newValue
see I Preference Store contains String public boolean contains String name return f Store contains name  IPreferenceStore fStore
see I Preference Store get Boolean String public boolean get Boolean String name return f Store get Boolean name  IPreferenceStore getBoolean getBoolean fStore getBoolean
see I Preference Store get Default Boolean String public boolean get Default Boolean String name return f Store get Default Boolean name  IPreferenceStore getDefaultBoolean getDefaultBoolean fStore getDefaultBoolean
see I Preference Store get Default Double String public double get Default Double String name return f Store get Default Double name  IPreferenceStore getDefaultDouble getDefaultDouble fStore getDefaultDouble
see I Preference Store get Default Float String public float get Default Float String name return f Store get Default Float name  IPreferenceStore getDefaultFloat getDefaultFloat fStore getDefaultFloat
see I Preference Store get Default Int String public int get Default Int String name return f Store get Default Int name  IPreferenceStore getDefaultInt getDefaultInt fStore getDefaultInt
see I Preference Store get Default Long String public long get Default Long String name return f Store get Default Long name  IPreferenceStore getDefaultLong getDefaultLong fStore getDefaultLong
see I Preference Store get Default String String public String get Default String String name return f Store get Default String name  IPreferenceStore getDefaultString getDefaultString fStore getDefaultString
see I Preference Store get Double String public double get Double String name return f Store get Double name  IPreferenceStore getDouble getDouble fStore getDouble
see I Preference Store get Float String public float get Float String name return f Store get Float name  IPreferenceStore getFloat getFloat fStore getFloat
see I Preference Store get Int String public int get Int String name return f Store get Int name  IPreferenceStore getInt getInt fStore getInt
see I Preference Store get Long String public long get Long String name return f Store get Long name  IPreferenceStore getLong getLong fStore getLong
see I Preference Store get String String public String get String String name return f Store get String name  IPreferenceStore getString getString fStore getString
see I Preference Store is Default String public boolean is Default String name return f Store is Default name  IPreferenceStore isDefault isDefault fStore isDefault
see I Preference Store needs Saving public boolean needs Saving return f Store needs Saving  IPreferenceStore needsSaving needsSaving fStore needsSaving
see I Preference Store put Value String String public void put Value String name String value if covers name f Store put Value name value  IPreferenceStore putValue putValue fStore putValue
see I Preference Store set Default String double public void set Default String name double value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set Default String float public void set Default String name float value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set Default String int public void set Default String name int value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set Default String long public void set Default String name long value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set Default String String public void set Default String name String value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set Default String boolean public void set Default String name boolean value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set To Default String public void set To Default String name f Store set To Default name  IPreferenceStore setToDefault setToDefault fStore setToDefault
see I Preference Store set Value String double public void set Value String name double value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
see I Preference Store set Value String float public void set Value String name float value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
see I Preference Store set Value String int public void set Value String name int value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
see I Preference Store set Value String long public void set Value String name long value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
see I Preference Store set Value String String public void set Value String name String value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
see I Preference Store set Value String boolean public void set Value String name boolean value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue

Creates a new filter that filters the given objects public Property File Filter List objects f Filter objects init  PropertyFileFilter fFilter
see Viewer Filter select Viewer Object Object public boolean select Viewer viewer Object parent Element Object element return f Property Files contains element f Filter contains element  ViewerFilter parentElement fPropertyFiles fFilter
private void init Busy Indicator show While AntUI Plugin get Standard Display new Runnable public void run f Property Files new Hash Set traverse Resources Plugin get Workspace get Root f Property Files  BusyIndicator showWhile AntUIPlugin getStandardDisplay fPropertyFiles HashSet ResourcesPlugin getWorkspace getRoot fPropertyFiles
Search for all archives in the workspace private void init Busy Indicator show While AntUI Plugin get Standard Display new Runnable public void run f Property Files new Hash Set traverse Resources Plugin get Workspace get Root f Property Files  BusyIndicator showWhile AntUIPlugin getStandardDisplay fPropertyFiles HashSet ResourcesPlugin getWorkspace getRoot fPropertyFiles
Traverse the given container adding property file to the given set Returns whether any files were added private boolean traverse I Container container Set set boolean added false try I Resource resources container members for int i 0 i resources length i I Resource resource resources i if resource instanceof I File I File file I File resource String ext file get File Extension if ext null ext equals Ignore Case properties NON NLS 1 set add file added true else if resource instanceof I Container if traverse I Container resource set set add resource added true catch Core Exception e return added  IContainer IResource IResource IFile IFile IFile getFileExtension equalsIgnoreCase IContainer IContainer CoreException

Creates an instane of a status dialog public Status Dialog Shell parent super parent f Last Status new Status Info  StatusDialog fLastStatus StatusInfo
Update the dialog s status line to reflect the given status It is save to call this method before the dialog has been opened protected void update Status I Status status f Last Status status if f Status Line null f Status Line is Disposed update Buttons Enable State status f Status Line set Error Status status  updateStatus IStatus fLastStatus fStatusLine fStatusLine isDisposed updateButtonsEnableState fStatusLine setErrorStatus
Returns the last status public I Status get Status return f Last Status  IStatus getStatus fLastStatus
Updates the status of the ok button to reflect the given status Subclasses may override this method to update additional buttons param status the status protected void update Buttons Enable State I Status status if f Ok Button null f Ok Button is Disposed f Ok Button set Enabled status matches I Status ERROR  updateButtonsEnableState IStatus fOkButton fOkButton isDisposed fOkButton setEnabled IStatus
protected void configure Shell Shell shell super configure Shell shell if f Title null shell set Text f Title Workbench Help set Help shell I AntUI Help Context Ids STATUS DIALOG  configureShell configureShell fTitle setText fTitle WorkbenchHelp setHelp IAntUIHelpContextIds STATUS_DIALOG
public void create super create if f Last Status null policy dialogs are not allowed to come up with an error message if f Last Status matches I Status ERROR Status Info status new Status Info status set Error NON NLS 1 f Last Status status update Status f Last Status  fLastStatus fLastStatus IStatus StatusInfo StatusInfo setError fLastStatus updateStatus fLastStatus
see Dialog create Buttons For Button Bar Composite protected void create Buttons For Button Bar Composite parent f Ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButtonsForButtonBar fOkButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
protected Control create Button Bar Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 1 layout margin Height 0 layout margin Width 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Status Line new Message Line composite f Status Line set Alignment SWT LEFT f Status Line set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Status Line set Error Status null NON NLS 1 super create Button Bar composite return composite  createButtonBar GridLayout GridLayout numColumns marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_HORIZONTAL fStatusLine MessageLine fStatusLine setAlignment fStatusLine setLayoutData GridData GridData FILL_HORIZONTAL fStatusLine setErrorStatus createButtonBar
Sets the title for this dialog param title the title public void set Title String title f Title title null title NON NLS 1 Shell shell get Shell if shell null shell is Disposed shell set Text f Title  setTitle fTitle getShell isDisposed setText fTitle
Sets the image for this dialog param image the image public void set Image Image image f Image image Shell shell get Shell if shell null shell is Disposed shell set Image f Image  setImage fImage getShell isDisposed setImage fImage

Creates a status set to OK no message public Status Info this OK null  StatusInfo
Creates a status param severity The status severity ERROR WARNING INFO and OK param message The message of the status Applies only for ERROR WARNING and INFO public Status Info int severity String message f Status Message message f Severity severity  StatusInfo fStatusMessage fSeverity
Returns if the status severity is OK public boolean isOK return f Severity I Status OK  fSeverity IStatus
Returns if the status severity is WARNING public boolean is Warning return f Severity I Status WARNING  isWarning fSeverity IStatus
Returns if the status severity is INFO public boolean is Info return f Severity I Status INFO  isInfo fSeverity IStatus
Returns if the status severity is ERROR public boolean is Error return f Severity I Status ERROR  isError fSeverity IStatus
see org eclipse core runtime I Status get Message public String get Message return f Status Message  IStatus getMessage getMessage fStatusMessage
Sets the status to ERROR param error Message The error message can be empty but not null public void set Error String error Message Assert is Not Null error Message f Status Message error Message f Severity I Status ERROR  errorMessage setError errorMessage isNotNull errorMessage fStatusMessage errorMessage fSeverity IStatus
Sets the status to WARNING param warning Message The warning message can be empty but not null public void set Warning String warning Message Assert is Not Null warning Message f Status Message warning Message f Severity I Status WARNING  warningMessage setWarning warningMessage isNotNull warningMessage fStatusMessage warningMessage fSeverity IStatus
Sets the status to INFO param info Message The info message can be empty but not null public void set Info String info Message Assert is Not Null info Message f Status Message info Message f Severity I Status INFO  infoMessage setInfo infoMessage isNotNull infoMessage fStatusMessage infoMessage fSeverity IStatus
Sets the status to OK public void setOK f Status Message null f Severity I Status OK  fStatusMessage fSeverity IStatus
see I Status matches int public boolean matches int severity Mask return f Severity severity Mask 0  IStatus severityMask fSeverity severityMask
Returns always code false code see I Status is Multi Status public boolean is Multi Status return false  IStatus isMultiStatus isMultiStatus
see I Status get Severity public int get Severity return f Severity  IStatus getSeverity getSeverity fSeverity
see I Status get Plugin public String get Plugin return I AntUI Constants PLUGIN ID  IStatus getPlugin getPlugin IAntUIConstants PLUGIN_ID
Returns always code null code see I Status get Exception public Throwable get Exception return null  IStatus getException getException
Returns always the error severity see I Status get Code public int get Code return f Severity  IStatus getCode getCode fSeverity
Returns always code null code see I Status get Children public I Status get Children return new I Status 0  IStatus getChildren IStatus getChildren IStatus

protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache if w Hint SWT DEFAULT h Hint SWT DEFAULT return new Point w Hint h Hint Control children composite get Children int count children length int max Width 0 max Height 0 for int i 0 i count i Control child children i Point pt child compute Size SWT DEFAULT SWT DEFAULT flush Cache max Width Math max max Width pt x max Height Math max max Height pt y if w Hint SWT DEFAULT max Width w Hint if h Hint SWT DEFAULT max Height h Hint return new Point max Width max Height  computeSize wHint hHint flushCache wHint hHint wHint hHint getChildren maxWidth maxHeight computeSize flushCache maxWidth maxWidth maxHeight maxHeight wHint maxWidth wHint hHint maxHeight hHint maxWidth maxHeight
protected void layout Composite composite boolean flush Cache Rectangle rect composite get Client Area Control children composite get Children for int i 0 i children length i children i set Bounds rect  flushCache getClientArea getChildren setBounds

public Add Build Files Action Ant View view super Ant View Action Messages get String Add Build Files Action 1 AntUI Images get Image Descriptor I AntUI Constants IMG ADD NON NLS 1 this view view set Tool Tip Text Ant View Action Messages get String Add Build Files Action 0 NON NLS 1 Workbench Help set Help this I AntUI Help Context Ids ADD BUILDFILE ACTION  AddBuildFilesAction AntView AntViewActionMessages getString AddBuildFilesAction AntUIImages getImageDescriptor IAntUIConstants IMG_ADD setToolTipText AntViewActionMessages getString AddBuildFilesAction WorkbenchHelp setHelp IAntUIHelpContextIds ADD_BUILDFILE_ACTION
monitor worked 1 Display get Default async Exec new Runnable public void run view add Project project  getDefault asyncExec addProject
PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor monitor begin Task Ant View Action Messages get String Add Build Files Action 3 result size NON NLS 1 Object files result to Array files for int i 0 i files length monitor is Canceled i Object file files i if file instanceof I File String build File Name I File file get Full Path to String Project Node existing Projects view get Projects for int j 0 j existing Projects length j Project Node existing Project existing Projects j if existing Project get Build File Name equals build File Name Don t parse projects that have already been added monitor worked 1 continue files final Project Node project new Project Node build File Name project get Name monitor worked 1 Display get Default async Exec new Runnable public void run view add Project project  getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor beginTask AntViewActionMessages getString AddBuildFilesAction toArray isCanceled IFile buildFileName IFile getFullPath toString ProjectNode existingProjects getProjects existingProjects ProjectNode existingProject existingProjects existingProject getBuildFileName buildFileName ProjectNode ProjectNode buildFileName getName getDefault asyncExec addProject
public void run File Selection Dialog dialog new File Selection Dialog Display get Current get Active Shell Resources Plugin get Workspace get Root Ant View Action Messages get String Add Build Files Action 2 NON NLS 1 dialog set File Filter xml true NON NLS 1 dialog set Allow Multiselection true dialog open final I Structured Selection result dialog get Result if result null return try PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor monitor begin Task Ant View Action Messages get String Add Build Files Action 3 result size NON NLS 1 Object files result to Array files for int i 0 i files length monitor is Canceled i Object file files i if file instanceof I File String build File Name I File file get Full Path to String Project Node existing Projects view get Projects for int j 0 j existing Projects length j Project Node existing Project existing Projects j if existing Project get Build File Name equals build File Name Don t parse projects that have already been added monitor worked 1 continue files final Project Node project new Project Node build File Name project get Name monitor worked 1 Display get Default async Exec new Runnable public void run view add Project project catch Invocation Target Exception e catch Interrupted Exception e  FileSelectionDialog FileSelectionDialog getCurrent getActiveShell ResourcesPlugin getWorkspace getRoot AntViewActionMessages getString AddBuildFilesAction setFileFilter setAllowMultiselection IStructuredSelection getResult getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor beginTask AntViewActionMessages getString AddBuildFilesAction toArray isCanceled IFile buildFileName IFile getFullPath toString ProjectNode existingProjects getProjects existingProjects ProjectNode existingProject existingProjects existingProject getBuildFileName buildFileName ProjectNode ProjectNode buildFileName getName getDefault asyncExec addProject InvocationTargetException InterruptedException

public static final String ID I AntUI Constants PLUGIN ID Ant Open With Menu NON NLS 1 public Ant Open With Menu I Workbench Page page super ID this page page  IAntUIConstants PLUGIN_ID AntOpenWithMenu AntOpenWithMenu IWorkbenchPage
public void set File I Adaptable file this file file  setFile IAdaptable
public void dispose super dispose Iterator iter image Cache values iterator while iter has Next Image image Image iter next image dispose image Cache clear  imageCache hasNext imageCache
Returns an image to show for the corresponding editor descriptor param editor Desc the editor descriptor or null for the system editor return the image or null private Image get Image I Editor Descriptor editor Desc Image Descriptor image Desc get Image Descriptor editor Desc if image Desc null return null Image image Image image Cache get image Desc if image null image image Desc create Image image Cache put image Desc image return image  editorDesc getImage IEditorDescriptor editorDesc ImageDescriptor imageDesc getImageDescriptor editorDesc imageDesc imageCache imageDesc imageDesc createImage imageCache imageDesc
Returns the image descriptor for the given editor descriptor or null if it has no image private Image Descriptor get Image Descriptor I Editor Descriptor editor Desc Image Descriptor image Desc null if editor Desc null image Desc registry get Image Descriptor get File Resource get Name else image Desc editor Desc get Image Descriptor if image Desc null if editor Desc get Id equals SYSTEM EDITOR ID image Desc get System Editor Image Descriptor get File Resource get File Extension return image Desc  ImageDescriptor getImageDescriptor IEditorDescriptor editorDesc ImageDescriptor imageDesc editorDesc imageDesc getImageDescriptor getFileResource getName imageDesc editorDesc getImageDescriptor imageDesc editorDesc getId SYSTEM_EDITOR_ID imageDesc getSystemEditorImageDescriptor getFileResource getFileExtension imageDesc
Return the image descriptor of the system editor that is registered with the OS to edit files of this type Null if none can be found private Image Descriptor get System Editor Image Descriptor String extension Program external Program null if extension null external Program Program find Program extension if external Program null return null return new Editor Image Descriptor external Program  ImageDescriptor getSystemEditorImageDescriptor externalProgram externalProgram findProgram externalProgram EditorImageDescriptor externalProgram
Listener listener new Listener public void handle Event Event event switch event type case SWT Selection if menu Item get Selection open Editor descriptor break  handleEvent menuItem getSelection openEditor
Creates the menu item for the editor descriptor param menu the menu to add the item to param descriptor the editor descriptor or null for the system editor param preferred Editor the descriptor of the preferred editor or code null code private void create Menu Item Menu menu final I Editor Descriptor descriptor final I Editor Descriptor preferred Editor XXX Would be better to use bold here but SWT does not support it final Menu Item menu Item new Menu Item menu SWT RADIO boolean is Preferred preferred Editor null descriptor get Id equals preferred Editor get Id menu Item set Selection is Preferred menu Item set Text descriptor get Label Image image get Image descriptor if image null menu Item set Image image Listener listener new Listener public void handle Event Event event switch event type case SWT Selection if menu Item get Selection open Editor descriptor break menu Item add Listener SWT Selection listener  preferredEditor createMenuItem IEditorDescriptor IEditorDescriptor preferredEditor MenuItem menuItem MenuItem isPreferred preferredEditor getId preferredEditor getId menuItem setSelection isPreferred menuItem setText getLabel getImage menuItem setImage handleEvent menuItem getSelection openEditor menuItem addListener
Arrays sort editors new Comparator see java util Comparator compare java lang Object java lang Object public int compare Object o1 Object o2 String s1 I Editor Descriptor o1 get Label String s2 I Editor Descriptor o2 get Label Return true if element Two is greater than element One return s1 compare To Ignore Case s2  IEditorDescriptor getLabel IEditorDescriptor getLabel elementTwo elementOne compareToIgnoreCase
public void fill Menu menu int index I File file Resource get File Resource if file Resource null return I Editor Descriptor default Editor registry find Editor I Editor Registry SYSTEM INPLACE EDITOR ID should not be null I Editor Descriptor preferred Editor IDE get Default Editor file Resource may be null Object editors registry get Editors file Resource get Name Arrays sort editors new Comparator see java util Comparator compare java lang Object java lang Object public int compare Object o1 Object o2 String s1 I Editor Descriptor o1 get Label String s2 I Editor Descriptor o2 get Label Return true if element Two is greater than element One return s1 compare To Ignore Case s2 I Editor Descriptor ant Editor registry find Editor org eclipse ant internal ui editor Ant Editor NON NLS 1 boolean default Found false boolean ant Found false List already Added Editors new Array List editors length for int i 0 i editors length i I Editor Descriptor editor I Editor Descriptor editors i if already Added Editors contains editor get Id continue create Menu Item menu editor preferred Editor if default Editor null editor get Id equals default Editor get Id default Found true if ant Editor null editor get Id equals ant Editor get Id ant Found true already Added Editors add editor get Id Only add a separator if there is something to separate if editors length 0 new Menu Item menu SWT SEPARATOR Add ant editor if ant Found ant Editor null create Menu Item menu ant Editor preferred Editor Add default editor if default Found default Editor null create Menu Item menu default Editor preferred Editor Add system editor I Editor Descriptor descriptor registry find Editor I Editor Registry SYSTEM EXTERNAL EDITOR ID create Menu Item menu descriptor preferred Editor create Default Menu Item menu file Resource  IFile fileResource getFileResource fileResource IEditorDescriptor defaultEditor findEditor IEditorRegistry SYSTEM_INPLACE_EDITOR_ID IEditorDescriptor preferredEditor getDefaultEditor fileResource getEditors fileResource getName IEditorDescriptor getLabel IEditorDescriptor getLabel elementTwo elementOne compareToIgnoreCase IEditorDescriptor antEditor findEditor AntEditor defaultFound antFound alreadyAddedEditors ArrayList IEditorDescriptor IEditorDescriptor alreadyAddedEditors getId createMenuItem preferredEditor defaultEditor getId defaultEditor getId defaultFound antEditor getId antEditor getId antFound alreadyAddedEditors getId MenuItem antFound antEditor createMenuItem antEditor preferredEditor defaultFound defaultEditor createMenuItem defaultEditor preferredEditor IEditorDescriptor findEditor IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID createMenuItem preferredEditor createDefaultMenuItem fileResource
Converts the I Adaptable file to I File or null private I File get File Resource if this file instanceof I File return I File this file I Resource resource I Resource this file get Adapter I Resource class if resource instanceof I File return I File resource return null  IAdaptable IFile IFile getFileResource IFile IFile IResource IResource getAdapter IResource IFile IFile
Returns whether this menu is dynamic public boolean is Dynamic return true  isDynamic
Opens the given editor on the selected file param editor the editor descriptor or null for the system editor private void open Editor I Editor Descriptor editor Descriptor I Editor Part editor Part null I File file Resource get File Resource try if editor Descriptor null editor Part page open Editor new File Editor Input file Resource I Editor Registry SYSTEM EXTERNAL EDITOR ID else editor Part page open Editor new File Editor Input file Resource editor Descriptor get Id catch Part Init Exception e AntUI Plugin log Message Format format Ant View Action Messages get String Ant View Open With Menu Editor failed new String file Resource get Location toOS String e NON NLS 1 if f Line 1 return if editor Part instanceof I Text Editor I Text Editor editor I Text Editor editor Part int offset get Offset f Line f Column editor if offset 1 return I Document Provider provider editor get Document Provider if provider instanceof Ant Editor Document Provider Ant Model model Ant Editor Document Provider provider get Ant Model editor get Editor Input Ant Element Node node model get Project Node get Node offset editor set Highlight Range node get Offset node get Length true editor select And Reveal node get Offset node get Selection Length  openEditor IEditorDescriptor editorDescriptor IEditorPart editorPart IFile fileResource getFileResource editorDescriptor editorPart openEditor FileEditorInput fileResource IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID editorPart openEditor FileEditorInput fileResource editorDescriptor getId PartInitException AntUIPlugin MessageFormat AntViewActionMessages getString AntViewOpenWithMenu Editor_failed fileResource getLocation toOSString fLine editorPart ITextEditor ITextEditor ITextEditor editorPart getOffset fLine fColumn IDocumentProvider getDocumentProvider AntEditorDocumentProvider AntModel AntEditorDocumentProvider getAntModel getEditorInput AntElementNode getProjectNode getNode setHighlightRange getOffset getLength selectAndReveal getOffset getSelectionLength
private int get Offset int line int column I Text Editor editor I Document Provider provider editor get Document Provider I Editor Input input editor get Editor Input try provider connect input catch Core Exception e return 1 try I Document document provider get Document input if document null if column 1 column marks the length adjust to 0 index and to be within the element s source range return document get Line Offset line 1 column 1 2 return document get Line Offset line 1 catch Bad Location Exception e finally provider disconnect input return 1  getOffset ITextEditor IDocumentProvider getDocumentProvider IEditorInput getEditorInput CoreException IDocument getDocument getLineOffset getLineOffset BadLocationException
Listener listener new Listener public void handle Event Event event switch event type case SWT Selection if menu Item get Selection IDE set Default Editor file Resource null try IDE open Editor page file Resource true catch Part Init Exception e AntUI Plugin log Message Format format Ant View Action Messages get String Ant View Open With Menu Editor failed new String file Resource get Location toOS String e NON NLS 1 break  handleEvent menuItem getSelection setDefaultEditor fileResource openEditor fileResource PartInitException AntUIPlugin MessageFormat AntViewActionMessages getString AntViewOpenWithMenu Editor_failed fileResource getLocation toOSString
Creates the menu item for the default editor param menu the menu to add the item to param file the file being edited param registry the editor registry private void create Default Menu Item Menu menu final I File file Resource final Menu Item menu Item new Menu Item menu SWT RADIO menu Item set Selection IDE get Default Editor file Resource null menu Item set Text Ant View Action Messages get String Ant View Open With Menu Default Editor 4 NON NLS 1 Listener listener new Listener public void handle Event Event event switch event type case SWT Selection if menu Item get Selection IDE set Default Editor file Resource null try IDE open Editor page file Resource true catch Part Init Exception e AntUI Plugin log Message Format format Ant View Action Messages get String Ant View Open With Menu Editor failed new String file Resource get Location toOS String e NON NLS 1 break menu Item add Listener SWT Selection listener  createDefaultMenuItem IFile fileResource MenuItem menuItem MenuItem menuItem setSelection getDefaultEditor fileResource menuItem setText AntViewActionMessages getString AntViewOpenWithMenu Default_Editor_4 handleEvent menuItem getSelection setDefaultEditor fileResource openEditor fileResource PartInitException AntUIPlugin MessageFormat AntViewActionMessages getString AntViewOpenWithMenu Editor_failed fileResource getLocation toOSString menuItem addListener
public void set External Info int line int column f Line line f Column column  setExternalInfo fLine fColumn

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Ant View Action Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME AntViewActionMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Creates a new Image Descriptor The image is loaded from a file with the given name code name code public Editor Image Descriptor Program program this program program  ImageDescriptor EditorImageDescriptor
public boolean equals Object o if o instanceof Editor Image Descriptor return false Editor Image Descriptor other Editor Image Descriptor o See if there is a name compare it if so and compare the programs if not String other Name other program get Name if other Name null return other program equals program return other Name equals program get Name  EditorImageDescriptor EditorImageDescriptor EditorImageDescriptor otherName getName otherName otherName getName
Returns an SWT Image that is described by the information in this descriptor Each call returns a new Image public Image get Image return create Image  getImage createImage
see org eclipse jface resource Image Descriptor get Image Data public Image Data get Image Data Image Data default Image PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG OBJ FILE get Image Data if default Image null return null Image Data data null if program null data program get Image Data null return default Image The images in GNOME are too big Scaling them does not give nice result so return default Image if data height default Image height data width default Image width return default Image return data  ImageDescriptor getImageData ImageData getImageData ImageData defaultImage getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_OBJ_FILE getImageData defaultImage ImageData getImageData defaultImage defaultImage defaultImage defaultImage defaultImage
public int hash Code String program Name program get Name if program Name null return program hash Code return program Name hash Code  hashCode programName getName programName hashCode programName hashCode

public Filter Internal Targets Action Ant View view super Ant View Action Messages get String Filter Internal Targets Action 0 NON NLS 1 f View view set Image Descriptor AntUI Images get Image Descriptor I AntUI Constants IMG FILTER INTERNAL TARGETS set Tool Tip Text Ant View Action Messages get String Filter Internal Targets Action 0 NON NLS 1 set Checked f View is Filter Internal Targets  FilterInternalTargetsAction AntView AntViewActionMessages getString FilterInternalTargetsAction fView setImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_FILTER_INTERNAL_TARGETS setToolTipText AntViewActionMessages getString FilterInternalTargetsAction setChecked fView isFilterInternalTargets
Toggles the filtering of internal targets from the Ant view see org eclipse jface action I Action run public void run f View set Filter Internal Targets is Checked  IAction fView setFilterInternalTargets isChecked

Creates a new code Refresh Build Files Action code which will refresh buildfiles in the given Ant view param view the Ant view whose selection this action will use when determining which buildfiles to refresh public Refresh Build Files Action Ant View view super Ant View Action Messages get String Refresh Build Files Action Refresh Buildfiles 1 AntUI Images get Image Descriptor I AntUI Constants IMG REFRESH NON NLS 1 set Tool Tip Text Ant View Action Messages get String Refresh Build Files Action Refresh Buildfiles 1 NON NLS 1 this view view Workbench Help set Help this I AntUI Help Context Ids REFRESH BUILDFILE ACTION  RefreshBuildFilesAction RefreshBuildFilesAction AntView AntViewActionMessages getString RefreshBuildFilesAction Refresh_Buildfiles_1 AntUIImages getImageDescriptor IAntUIConstants IMG_REFRESH setToolTipText AntViewActionMessages getString RefreshBuildFilesAction Refresh_Buildfiles_1 WorkbenchHelp setHelp IAntUIHelpContextIds REFRESH_BUILDFILE_ACTION
PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor monitor begin Task Ant View Action Messages get String Refresh Build Files Action Refreshing buildfiles 3 projects size NON NLS 1 Project Node project while iter has Next project Project Node iter next monitor sub Task Message Format format Ant View Action Messages get String Refresh Build Files Action Refreshing  0  4 new String project get Build File Name NON NLS 1 project parse Build File monitor worked 1  getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor beginTask AntViewActionMessages getString RefreshBuildFilesAction Refreshing_buildfiles_3 ProjectNode hasNext ProjectNode subTask MessageFormat AntViewActionMessages getString RefreshBuildFilesAction Refreshing_ _4 getBuildFileName parseBuildFile
Refreshes the selected buildfiles or all buildfiles if none selected in the Ant view public void run final Set projects get Selected Projects if projects is Empty If no selection add all Project Node all Projects view get Projects for int i 0 i all Projects length i projects add all Projects i final Iterator iter projects iterator if iter has Next return try PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor monitor begin Task Ant View Action Messages get String Refresh Build Files Action Refreshing buildfiles 3 projects size NON NLS 1 Project Node project while iter has Next project Project Node iter next monitor sub Task Message Format format Ant View Action Messages get String Refresh Build Files Action Refreshing  0  4 new String project get Build File Name NON NLS 1 project parse Build File monitor worked 1 catch Invocation Target Exception e catch Interrupted Exception e view get Project Viewer refresh  getSelectedProjects isEmpty ProjectNode allProjects getProjects allProjects allProjects hasNext getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor beginTask AntViewActionMessages getString RefreshBuildFilesAction Refreshing_buildfiles_3 ProjectNode hasNext ProjectNode subTask MessageFormat AntViewActionMessages getString RefreshBuildFilesAction Refreshing_ _4 getBuildFileName parseBuildFile InvocationTargetException InterruptedException getProjectViewer
Returns the selected project nodes to refresh return Set the selected code Project Node code s to refresh private Set get Selected Projects I Structured Selection selection I Structured Selection view get Project Viewer get Selection Hash Set set new Hash Set Iterator iter selection iterator Object data while iter has Next data iter next if data instanceof Project Node set add data else if data instanceof Target Node set add Target Node data get Project return set  ProjectNode getSelectedProjects IStructuredSelection IStructuredSelection getProjectViewer getSelection HashSet HashSet hasNext ProjectNode TargetNode TargetNode getProject
Updates the enablement of this action based on the user s selection public void update set Enabled view get Projects length 0  setEnabled getProjects

public Remove All Action Ant View view super Ant View Action Messages get String Remove All Action Remove All AntUI Images get Image Descriptor I AntUI Constants IMG REMOVE ALL NON NLS 1 set Description Ant View Action Messages get String Remove All Action Remove All NON NLS 1 set Tool Tip Text Ant View Action Messages get String Remove All Action Remove All NON NLS 1 this view view Workbench Help set Help this I AntUI Help Context Ids REMOVE ALL ACTION  RemoveAllAction AntView AntViewActionMessages getString RemoveAllAction Remove_All AntUIImages getImageDescriptor IAntUIConstants IMG_REMOVE_ALL setDescription AntViewActionMessages getString RemoveAllAction Remove_All setToolTipText AntViewActionMessages getString RemoveAllAction Remove_All WorkbenchHelp setHelp IAntUIHelpContextIds REMOVE_ALL_ACTION
public void run view remove All Projects  removeAllProjects
see org eclipse ui texteditor I Update update public void update set Enabled view get Project Viewer get Tree get Item Count 0  IUpdate setEnabled getProjectViewer getTree getItemCount

public Remove Project Action Ant View view super Ant View Action Messages get String Remove Project Action Remove AntUI Images get Image Descriptor I AntUI Constants IMG REMOVE NON NLS 1 this view view set Tool Tip Text Ant View Action Messages get String Remove Project Action Remove 2 NON NLS 1 Workbench Help set Help this I AntUI Help Context Ids REMOVE PROJECT ACTION  RemoveProjectAction AntView AntViewActionMessages getString RemoveProjectAction AntUIImages getImageDescriptor IAntUIConstants IMG_REMOVE setToolTipText AntViewActionMessages getString RemoveProjectAction Remove_2 WorkbenchHelp setHelp IAntUIHelpContextIds REMOVE_PROJECT_ACTION
see org eclipse jface action I Action run public void run I Structured Selection selection I Structured Selection view get Project Viewer get Selection Iterator iter selection iterator Object element List project Nodes new Array List while iter has Next element iter next if element instanceof Project Node project Nodes add element view remove Projects project Nodes  IAction IStructuredSelection IStructuredSelection getProjectViewer getSelection projectNodes ArrayList hasNext ProjectNode projectNodes removeProjects projectNodes
see org eclipse ui texteditor I Update update public void update I Structured Selection selection I Structured Selection view get Project Viewer get Selection if selection is Empty set Enabled false return Object element Iterator iter selection iterator while iter has Next element iter next if element instanceof Project Node set Enabled false return set Enabled true  IUpdate IStructuredSelection IStructuredSelection getProjectViewer getSelection isEmpty setEnabled hasNext ProjectNode setEnabled setEnabled

Creates a new code Run Target Action code which will execute targets in the given view param view the Ant view whose selection this action will use when determining which target to run param show Dialog whether or not to display the launch configuration dialog to edit the associated launch configuration public Run Target Action Ant View view boolean show Dialog if show Dialog set Text Ant View Action Messages get String Run Target Action 4 NON NLS 1 set Image Descriptor AntUI Images get Image Descriptor I AntUI Constants IMG TAB ANT TARGETS Workbench Help set Help this I AntUI Help Context Ids EDIT LAUNCH CONFIGURATION ACTION else set Text Ant View Action Messages get String Run Target Action Run 1 NON NLS 1 set Image Descriptor AntUI Images get Image Descriptor I AntUI Constants IMG RUN Workbench Help set Help this I AntUI Help Context Ids RUN TARGET ACTION set Tool Tip Text Ant View Action Messages get String Run Target Action Run Default NON NLS 1 this view view this show Dialog show Dialog  RunTargetAction showDialog RunTargetAction AntView showDialog showDialog setText AntViewActionMessages getString RunTargetAction setImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_TAB_ANT_TARGETS WorkbenchHelp setHelp IAntUIHelpContextIds EDIT_LAUNCH_CONFIGURATION_ACTION setText AntViewActionMessages getString RunTargetAction Run_1 setImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_RUN WorkbenchHelp setHelp IAntUIHelpContextIds RUN_TARGET_ACTION setToolTipText AntViewActionMessages getString RunTargetAction Run_Default showDialog showDialog
UI Job job new UI Job Ant View Action Messages get String Run Target Action 2 NON NLS 1 public I Status run InUI Thread I Progress Monitor monitor Target Node target get Selected Target if target null return new Status I Status ERROR AntUI Plugin get Unique Identifier I Status ERROR Ant View Action Messages get String Run Target Action 3 null NON NLS 1 run Target target return Status OK STATUS  UIJob UIJob AntViewActionMessages getString RunTargetAction IStatus runInUIThread IProgressMonitor TargetNode getSelectedTarget IStatus AntUIPlugin getUniqueIdentifier IStatus AntViewActionMessages getString RunTargetAction runTarget OK_STATUS
Executes the selected target or project in the Ant view public void run UI Job job new UI Job Ant View Action Messages get String Run Target Action 2 NON NLS 1 public I Status run InUI Thread I Progress Monitor monitor Target Node target get Selected Target if target null return new Status I Status ERROR AntUI Plugin get Unique Identifier I Status ERROR Ant View Action Messages get String Run Target Action 3 null NON NLS 1 run Target target return Status OK STATUS job schedule  UIJob UIJob AntViewActionMessages getString RunTargetAction IStatus runInUIThread IProgressMonitor TargetNode getSelectedTarget IStatus AntUIPlugin getUniqueIdentifier IStatus AntViewActionMessages getString RunTargetAction runTarget OK_STATUS
Executes the given target param target the target to execute public void run Target Target Node target I File file Ant Util get File target get Project get Build File Name if file null AntUI Plugin get Standard Display beep return Ant Launch Shortcut shortcut new Ant Launch Shortcut shortcut set Show Dialog show Dialog shortcut launch file I Launch Manager RUN MODE target get Name  runTarget TargetNode IFile AntUtil getFile getProject getBuildFileName AntUIPlugin getStandardDisplay AntLaunchShortcut AntLaunchShortcut setShowDialog showDialog ILaunchManager RUN_MODE getName
Updates the enablement of this action based on the user s selection public void update Ant Node selection get Selected Element boolean enabled false if selection instanceof Target Node if Target Node selection is Error Node enabled true else if selection instanceof Project Node if Project Node selection is Error Node enabled true set Enabled enabled  AntNode getSelectedElement TargetNode TargetNode isErrorNode ProjectNode ProjectNode isErrorNode setEnabled
Returns the selected target or project node or code null code if no target or project is selected or if more than one element is selected return Ant Node the selected code Target Node code or code Project Node code private Ant Node get Selected Element I Structured Selection selection I Structured Selection view get Project Viewer get Selection if selection is Empty return null Iterator iter selection iterator Object data iter next if iter has Next data instanceof Target Node data instanceof Project Node Only return a Target Node or Project Node return null return Ant Node data  AntNode TargetNode ProjectNode AntNode getSelectedElement IStructuredSelection IStructuredSelection getProjectViewer getSelection isEmpty hasNext TargetNode ProjectNode TargetNode ProjectNode AntNode
Returns the selected target in the project viewer or code null code if no target is selected or more than one element is selected return Target Node the selected target private Target Node get Selected Target Ant Node selected Node get Selected Element if selected Node instanceof Target Node return Target Node selected Node else if selected Node instanceof Project Node return Project Node selected Node get Default Target return null  TargetNode TargetNode getSelectedTarget AntNode selectedNode getSelectedElement selectedNode TargetNode TargetNode selectedNode selectedNode ProjectNode ProjectNode selectedNode getDefaultTarget

public Search For Build Files Action Ant View view super Ant View Action Messages get String Search For Build Files Action Search 1 AntUI Images get Image Descriptor I AntUI Constants IMG SEARCH NON NLS 1 set Tool Tip Text Ant View Action Messages get String Search For Build Files Action Add build files with search 2 NON NLS 1 this view view Workbench Help set Help this I AntUI Help Context Ids SEARCH FOR BUILDFILES ACTION  SearchForBuildFilesAction AntView AntViewActionMessages getString SearchForBuildFilesAction Search_1 AntUIImages getImageDescriptor IAntUIConstants IMG_SEARCH setToolTipText AntViewActionMessages getString SearchForBuildFilesAction Add_build_files_with_search_2 WorkbenchHelp setHelp IAntUIHelpContextIds SEARCH_FOR_BUILDFILES_ACTION
if include Error Nodes project is Error Node Display get Default async Exec new Runnable public void run view add Project project  includeErrorNodes isErrorNode getDefault asyncExec addProject
PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor monitor begin Task Ant View Action Messages get String Search For Build Files Action Processing search results 3 files length NON NLS 1 for int i 0 i files length monitor is Canceled i String build File Name files i get Full Path to String monitor sub Task Message Format format Ant View Action Messages get String Search For Build Files Action Adding  0  4 new String build File Name NON NLS 1 if already Added build File Name Don t parse projects that have already been added continue final Project Node project new Project Node build File Name Force the project to be parsed so the error state is set project get Name monitor worked 1 if include Error Nodes project is Error Node Display get Default async Exec new Runnable public void run view add Project project  getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor beginTask AntViewActionMessages getString SearchForBuildFilesAction Processing_search_results_3 isCanceled buildFileName getFullPath toString subTask MessageFormat AntViewActionMessages getString SearchForBuildFilesAction Adding_ _4 buildFileName alreadyAdded buildFileName ProjectNode ProjectNode buildFileName getName includeErrorNodes isErrorNode getDefault asyncExec addProject
Returns whether or not the given build file already exists in the ant view private boolean already Added String build File Name for int j 0 j existing Projects length j Project Node existing Project existing Projects j if existing Project get Build File Name equals build File Name return true return false  alreadyAdded buildFileName existingProjects ProjectNode existingProject existingProjects existingProject getBuildFileName buildFileName
Opens the code Search For Build Files Dialog code and adds the results to the ant view public void run Search For Build Files Dialog dialog new Search For Build Files Dialog if dialog open Window CANCEL final I File files dialog get Results final boolean include Error Nodes dialog get Include Error Results final Project Node existing Projects view get Projects try PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor monitor begin Task Ant View Action Messages get String Search For Build Files Action Processing search results 3 files length NON NLS 1 for int i 0 i files length monitor is Canceled i String build File Name files i get Full Path to String monitor sub Task Message Format format Ant View Action Messages get String Search For Build Files Action Adding  0  4 new String build File Name NON NLS 1 if already Added build File Name Don t parse projects that have already been added continue final Project Node project new Project Node build File Name Force the project to be parsed so the error state is set project get Name monitor worked 1 if include Error Nodes project is Error Node Display get Default async Exec new Runnable public void run view add Project project Returns whether or not the given build file already exists in the ant view private boolean already Added String build File Name for int j 0 j existing Projects length j Project Node existing Project existing Projects j if existing Project get Build File Name equals build File Name return true return false catch Invocation Target Exception e catch Interrupted Exception e  SearchForBuildFilesDialog SearchForBuildFilesDialog SearchForBuildFilesDialog IFile getResults includeErrorNodes getIncludeErrorResults ProjectNode existingProjects getProjects getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor beginTask AntViewActionMessages getString SearchForBuildFilesAction Processing_search_results_3 isCanceled buildFileName getFullPath toString subTask MessageFormat AntViewActionMessages getString SearchForBuildFilesAction Adding_ _4 buildFileName alreadyAdded buildFileName ProjectNode ProjectNode buildFileName getName includeErrorNodes isErrorNode getDefault asyncExec addProject alreadyAdded buildFileName existingProjects ProjectNode existingProject existingProjects existingProject getBuildFileName buildFileName InvocationTargetException InterruptedException

settings get I AntUI Preference Constants ANTVIEW LAST SEARCH STRING new I Input Validator public String is Valid String new Text String trimmed Text new Text trim if trimmed Text length 0 return Ant View Action Messages get String Search For Build Files Dialog Build name cannot be empty 3 NON NLS 1 return null  IAntUIPreferenceConstants ANTVIEW_LAST_SEARCH_STRING IInputValidator isValid newText trimmedText newText trimmedText AntViewActionMessages getString SearchForBuildFilesDialog Build_name_cannot_be_empty_3
Creates a new dialog to search for build files public Search For Build Files Dialog super Display get Current get Active Shell Ant View Action Messages get String Search For Build Files Dialog Search for Build Files 1 Ant View Action Messages get String Search For Build Files Dialog Input NON NLS 1 NON NLS 2 settings get I AntUI Preference Constants ANTVIEW LAST SEARCH STRING new I Input Validator public String is Valid String new Text String trimmed Text new Text trim if trimmed Text length 0 return Ant View Action Messages get String Search For Build Files Dialog Build name cannot be empty 3 NON NLS 1 return null  SearchForBuildFilesDialog getCurrent getActiveShell AntViewActionMessages getString SearchForBuildFilesDialog Search_for_Build_Files_1 AntViewActionMessages getString SearchForBuildFilesDialog IAntUIPreferenceConstants ANTVIEW_LAST_SEARCH_STRING IInputValidator isValid newText trimmedText newText trimmedText AntViewActionMessages getString SearchForBuildFilesDialog Build_name_cannot_be_empty_3
Change the label on the Ok button and initialize the enabled state protected void create Buttons For Button Bar Composite parent super create Buttons For Button Bar parent get Ok Button set Text Ant View Action Messages get String Search For Build Files Dialog Search 4 NON NLS 1 String working Set Name settings get I AntUI Preference Constants ANTVIEW LAST WORKINGSET SEARCH SCOPE if working Set Name length 0 set Working Set PlatformUI get Workbench get Working Set Manager get Working Set working Set Name if settings get Boolean I AntUI Preference Constants ANTVIEW USE WORKINGSET SEARCH SCOPE select Radio Button workspace Scope Button handle Radio Button Pressed  createButtonsForButtonBar createButtonsForButtonBar getOkButton setText AntViewActionMessages getString SearchForBuildFilesDialog Search_4 workingSetName IAntUIPreferenceConstants ANTVIEW_LAST_WORKINGSET_SEARCH_SCOPE workingSetName setWorkingSet getWorkbench getWorkingSetManager getWorkingSet workingSetName getBoolean IAntUIPreferenceConstants ANTVIEW_USE_WORKINGSET_SEARCH_SCOPE selectRadioButton workspaceScopeButton handleRadioButtonPressed
Add the scope selection widgets to the dialog area protected Control create Dialog Area Composite parent Font font parent get Font Composite composite Composite super create Dialog Area parent create Include Error Result Button composite font create Scope Group composite font return composite  createDialogArea getFont createDialogArea createIncludeErrorResultButton createScopeGroup
Selection Adapter selection Listener new Selection Adapter public void widget Selected Selection Event e handle Radio Button Pressed  SelectionAdapter selectionListener SelectionAdapter widgetSelected SelectionEvent handleRadioButtonPressed
choose Button set Text Ant View Action Messages get String Search For Build Files Dialog Choose  8 NON NLS 1 choose Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Choose Button Pressed  chooseButton setText AntViewActionMessages getString SearchForBuildFilesDialog _8 chooseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleChooseButtonPressed
private void create Scope Group Composite composite Font font Group scope new Group composite SWT NONE scope set Text Ant View Action Messages get String Search For Build Files Dialog Scope 5 NON NLS 1 Grid Data data new Grid Data Grid Data FILL BOTH scope set Layout Data data Grid Layout layout new Grid Layout 3 false scope set Layout layout scope set Font font Create a composite for the radio buttons Composite radio Composite new Composite scope SWT NONE Grid Layout radio Layout new Grid Layout radio Layout margin Height 0 radio Composite set Layout radio Layout Selection Adapter selection Listener new Selection Adapter public void widget Selected Selection Event e handle Radio Button Pressed workspace Scope Button new Button radio Composite SWT RADIO workspace Scope Button set Font font workspace Scope Button set Text Ant View Action Messages get String Search For Build Files Dialog Workspace 6 NON NLS 1 workspace Scope Button add Selection Listener selection Listener working Set Scope Button new Button radio Composite SWT RADIO working Set Scope Button set Font font working Set Scope Button set Text Ant View Action Messages get String Search For Build Files Dialog Wor king Set  7 NON NLS 1 working Set Scope Button add Selection Listener selection Listener select Radio Button workspace Scope Button working Set Text new Text scope SWT BORDER working Set Text set Editable false data new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN END working Set Text set Layout Data data working Set Text set Font font Button choose Button new Button scope SWT PUSH data new Grid Data Grid Data VERTICAL ALIGN END choose Button set Layout Data data choose Button set Font font choose Button set Text Ant View Action Messages get String Search For Build Files Dialog Choose  8 NON NLS 1 choose Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Choose Button Pressed  createScopeGroup setText AntViewActionMessages getString SearchForBuildFilesDialog Scope_5 GridData GridData GridData FILL_BOTH setLayoutData GridLayout GridLayout setLayout setFont radioComposite GridLayout radioLayout GridLayout radioLayout marginHeight radioComposite setLayout radioLayout SelectionAdapter selectionListener SelectionAdapter widgetSelected SelectionEvent handleRadioButtonPressed workspaceScopeButton radioComposite workspaceScopeButton setFont workspaceScopeButton setText AntViewActionMessages getString SearchForBuildFilesDialog Workspace_6 workspaceScopeButton addSelectionListener selectionListener workingSetScopeButton radioComposite workingSetScopeButton setFont workingSetScopeButton setText AntViewActionMessages getString SearchForBuildFilesDialog king_Set__7 workingSetScopeButton addSelectionListener selectionListener selectRadioButton workspaceScopeButton workingSetText workingSetText setEditable GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_END workingSetText setLayoutData workingSetText setFont chooseButton GridData GridData VERTICAL_ALIGN_END chooseButton setLayoutData chooseButton setFont chooseButton setText AntViewActionMessages getString SearchForBuildFilesDialog _8 chooseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleChooseButtonPressed
Programatically selects the given radio button deselecting the other radio button param button the radio button to select This parameter must be one of either the code working Set Scope Button code or the code workspace Scope Button code or this method will have no effect private void select Radio Button Button button if button working Set Scope Button working Set Scope Button set Selection true workspace Scope Button set Selection false else if button workspace Scope Button workspace Scope Button set Selection true working Set Scope Button set Selection false  workingSetScopeButton workspaceScopeButton selectRadioButton workingSetScopeButton workingSetScopeButton setSelection workspaceScopeButton setSelection workspaceScopeButton workspaceScopeButton setSelection workingSetScopeButton setSelection
One of the search scope radio buttons has been pressed Update the dialog accordingly private void handle Radio Button Pressed if working Set Scope Button get Selection I Working Set set PlatformUI get Workbench get Working Set Manager get Working Set get Working Set Name if set null set Working Set set return set Working Set null  handleRadioButtonPressed workingSetScopeButton getSelection IWorkingSet getWorkbench getWorkingSetManager getWorkingSet getWorkingSetName setWorkingSet setWorkingSet
Returns the working set name currently displayed private String get Working Set Name return working Set Text get Text trim  getWorkingSetName workingSetText getText
Creates the button that allows the user to specify whether or not build files should that cannot be parsed should be included in the results private void create Include Error Result Button Composite composite Font font include Error Result Button new Button composite SWT CHECK include Error Result Button set Font font include Error Result Button set Text Ant View Action Messages get String Search For Build Files Dialog Include errors NON NLS 1 include Error Result Button set Selection settings get Boolean I AntUI Preference Constants ANTVIEW INCLUDE ERROR SEARCH RESULTS  createIncludeErrorResultButton includeErrorResultButton includeErrorResultButton setFont includeErrorResultButton setText AntViewActionMessages getString SearchForBuildFilesDialog Include_errors includeErrorResultButton setSelection getBoolean IAntUIPreferenceConstants ANTVIEW_INCLUDE_ERROR_SEARCH_RESULTS
Updates the dialog based on the state of the working set settings ul li Sets the enablement of the Search button based on the validity of the settings li li Sets any or clears the error message li ul private void update For Working Set Settings if working Set Scope Button get Selection String error null if search Scopes null error Ant View Action Messages get String Search For Build Files Dialog Must select a working set 10 NON NLS 1 else if search Scopes is Empty error Ant View Action Messages get String Search For Build Files Dialog No searchable NON NLS 1 if error null set Error Message error get Ok Button set Enabled false return get Ok Button set Enabled true set Error Message null  updateForWorkingSetSettings workingSetScopeButton getSelection searchScopes AntViewActionMessages getString SearchForBuildFilesDialog Must_select_a_working_set_10 searchScopes isEmpty AntViewActionMessages getString SearchForBuildFilesDialog No_searchable setErrorMessage getOkButton setEnabled getOkButton setEnabled setErrorMessage
Handles the working set choose button pressed Returns the name of the chosen working set or code null code if none private void handle Choose Button Pressed I Working Set Selection Dialog dialog PlatformUI get Workbench get Working Set Manager create Working Set Selection Dialog get Shell false if dialog open Window CANCEL return I Working Set sets dialog get Selection if sets null return if sets length 0 set Working Set null ok pressed with no working set selected else set Working Set sets 0 We disallowed multi select  handleChooseButtonPressed IWorkingSetSelectionDialog getWorkbench getWorkingSetManager createWorkingSetSelectionDialog getShell IWorkingSet getSelection setWorkingSet setWorkingSet
Sets the current working set search scope This populates the search scope with resources found in the given working set and updates the enabled state of the dialog based on the sets contents param set the working set scope for the search private void set Working Set I Working Set set if set null search Scopes null working Set Text set Text NON NLS 1 validate Input return I Adaptable elements set get Elements search Scopes new Array List for int i 0 i elements length i Try to get an I Resource object from each element I Resource resource null I Adaptable adaptable elements i if adaptable instanceof I Resource resource I Resource adaptable else resource I Resource adaptable get Adapter I Resource class if resource null search Scopes add resource working Set Text set Text set get Name select Radio Button working Set Scope Button validate Input  setWorkingSet IWorkingSet searchScopes workingSetText setText validateInput IAdaptable getElements searchScopes ArrayList IResource IResource IAdaptable IResource IResource IResource getAdapter IResource searchScopes workingSetText setText getName selectRadioButton workingSetScopeButton validateInput
Returns the trimmed user input private String get Input return get Text get Text trim  getInput getText getText
Returns the search results public I File get Results return I File results to Array new I File results size  IFile getResults IFile toArray IFile
Returns whether the user wishes to include results which cannot be parsed protected boolean get Include Error Results return settings get Boolean I AntUI Preference Constants ANTVIEW INCLUDE ERROR SEARCH RESULTS  getIncludeErrorResults getBoolean IAntUIPreferenceConstants ANTVIEW_INCLUDE_ERROR_SEARCH_RESULTS
When the user presses the search button tied to the OK id search the workspace for files matching the regular expression in the input field protected void ok Pressed String input get Input settings put I AntUI Preference Constants ANTVIEW LAST SEARCH STRING input settings put I AntUI Preference Constants ANTVIEW INCLUDE ERROR SEARCH RESULTS include Error Result Button get Selection settings put I AntUI Preference Constants ANTVIEW LAST WORKINGSET SEARCH SCOPE get Working Set Name settings put I AntUI Preference Constants ANTVIEW USE WORKINGSET SEARCH SCOPE working Set Scope Button get Selection results new Array List Clear previous results Resource Proxy Visitor visitor new Resource Proxy Visitor if search Scopes null search Scopes is Empty try Resources Plugin get Workspace get Root accept visitor I Resource NONE catch Core Exception ce Closed project don t want build files from there else Iterator iter search Scopes iterator while iter has Next try I Resource iter next accept visitor I Resource NONE catch Core Exception ce Closed project don t want build files from there super ok Pressed  okPressed getInput IAntUIPreferenceConstants ANTVIEW_LAST_SEARCH_STRING IAntUIPreferenceConstants ANTVIEW_INCLUDE_ERROR_SEARCH_RESULTS includeErrorResultButton getSelection IAntUIPreferenceConstants ANTVIEW_LAST_WORKINGSET_SEARCH_SCOPE getWorkingSetName IAntUIPreferenceConstants ANTVIEW_USE_WORKINGSET_SEARCH_SCOPE workingSetScopeButton getSelection ArrayList ResourceProxyVisitor ResourceProxyVisitor searchScopes searchScopes isEmpty ResourcesPlugin getWorkspace getRoot IResource CoreException searchScopes hasNext IResource IResource CoreException okPressed
see org eclipse core resources I Resource Proxy Visitor visit org eclipse core resources I Resource Proxy public boolean visit I Resource Proxy proxy if proxy get Type I Resource FILE if matcher match proxy get Name results add proxy request Resource return false return true  IResourceProxyVisitor IResourceProxy IResourceProxy getType IResource getName requestResource
see org eclipse jface window Window configure Shell org eclipse swt widgets Shell protected void configure Shell Shell shell super configure Shell shell Workbench Help set Help shell I AntUI Help Context Ids SEARCH FOR BUILDFILES DIALOG  configureShell configureShell configureShell WorkbenchHelp setHelp IAntUIHelpContextIds SEARCH_FOR_BUILDFILES_DIALOG
protected void validate Input String error Message null if get Validator null error Message get Validator is Valid get Text get Text set Error Message error Message if error Message null update For Working Set Settings  validateInput errorMessage getValidator errorMessage getValidator isValid getText getText setErrorMessage errorMessage errorMessage updateForWorkingSetSettings

see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return get Children input Element  IStructuredContentProvider getElements getElements inputElement getChildren inputElement
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input if new Input instanceof Root Node root Node Root Node new Input  IContentProvider inputChanged inputChanged oldInput newInput newInput RootNode rootNode RootNode newInput
Adds the project to the tree Has no effect if a project with the same buildfile name is already present in the tree param project The project to add public void add Project Project Node project Project Node projects get Root Node get Projects for int i 0 i projects length i Project Node node projects i if node get Build File Name equals project get Build File Name return get Root Node add Project project  addProject ProjectNode ProjectNode getRootNode getProjects ProjectNode getBuildFileName getBuildFileName getRootNode addProject
Returns the root node of the tree or code null code if no root has been set as the input return Root Node the root node of the tree public Root Node get Root Node return root Node  RootNode RootNode getRootNode rootNode
see org eclipse jface viewers I Tree Content Provider get Children Object public Object get Children Object element if element instanceof Root Node return Root Node element get Projects else if element instanceof Project Node if f Is Filtering Internal Targets return Project Node element get Targets Target Node targets Project Node element get Targets List filtered Targets new Array List for int i 0 i targets length i Target Node node targets i if is Internal node filtered Targets add node return filtered Targets to Array return null  ITreeContentProvider getChildren getChildren RootNode RootNode getProjects ProjectNode fIsFilteringInternalTargets ProjectNode getTargets TargetNode ProjectNode getTargets filteredTargets ArrayList TargetNode isInternal filteredTargets filteredTargets toArray
Returns whether the given target is an internal target Internal targets are targets which has no description The default target is never considered internal param target the target to examine return whether the given target is an internal target private boolean is Internal Target Node target return target target get Project get Default Target target get Description null  isInternal TargetNode getProject getDefaultTarget getDescription
see org eclipse jface viewers I Tree Content Provider get Parent Object public Object get Parent Object element if element instanceof Ant Node return Ant Node element get Parent return null  ITreeContentProvider getParent getParent AntNode AntNode getParent
see org eclipse jface viewers I Tree Content Provider has Children Object public boolean has Children Object element if element instanceof Target Node return false return true  ITreeContentProvider hasChildren hasChildren TargetNode
public boolean is Filter Internal Targets return f Is Filtering Internal Targets  isFilterInternalTargets fIsFilteringInternalTargets
param filter public void set Filter Internal Targets boolean filter f Is Filtering Internal Targets filter  setFilterInternalTargets fIsFilteringInternalTargets

see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return targets to Array  IStructuredContentProvider getElements getElements inputElement toArray
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
Returns the user s currently selected targets The list contains code Target Node code objects return List the user s currently selected targets public List get Targets return targets  TargetNode getTargets
Adds the given target to the list of selected targets Targets will appear in the list as often as they are added param target the target to add public void add Target Target Node target targets add target  addTarget TargetNode
Removes the given target from the list of selected targets Has no effect if the given index is invalid param index the index of the the target to remove public void remove Target int index if targets size index index 0 targets remove index  removeTarget
Moves the given target up in the list of active targets Has no effect if the given target is already the first target in the list or the given index is invalid param index the index of the target to move up public void move Up Target int index Object target targets get index if index 0 target null return targets set index targets get index 1 targets set index 1 target  moveUpTarget
Moves the given target down in the list of active targets Has no effect if the given target is already the last target in the list or the given index is invalid param index the index of the target to move down public void move Down Target int index Object target targets get index if index targets size 1 target null return targets set index targets get index 1 targets set index 1 target  moveDownTarget

project parse Build File Display get Default async Exec new Runnable public void run must do a full refresh to re sort project Viewer refresh  parseBuildFile getDefault asyncExec projectViewer
The given build file has changed Refresh the view to pick up any structural changes private void handle Build File Changed final Project Node project project parse Build File Display get Default async Exec new Runnable public void run must do a full refresh to re sort project Viewer refresh  handleBuildFileChanged ProjectNode parseBuildFile getDefault asyncExec projectViewer
see org eclipse ui I Workbench Part create Part Control org eclipse swt widgets Composite public void create Part Control Composite parent initialize Actions create Project Viewer parent initialize Drag And Drop fill Main Tool Bar if get Projects length 0 If any projects have been added to the view during startup begin listening for resource changes Resources Plugin get Workspace add Resource Change Listener this Workbench Help set Help parent I AntUI Help Context Ids ANT VIEW update Project Actions  IWorkbenchPart createPartControl createPartControl initializeActions createProjectViewer initializeDragAndDrop fillMainToolBar getProjects ResourcesPlugin getWorkspace addResourceChangeListener WorkbenchHelp setHelp IAntUIHelpContextIds ANT_VIEW updateProjectActions
private void initialize Drag And Drop int ops DND DROP COPY DND DROP MOVE DND DROP DEFAULT Transfer transfers new Transfer File Transfer get Instance Tree Viewer viewer get Project Viewer Ant View Drop Adapter adapter new Ant View Drop Adapter this viewer add Drop Support ops transfers adapter  initializeDragAndDrop DROP_COPY DROP_MOVE DROP_DEFAULT FileTransfer getInstance TreeViewer getProjectViewer AntViewDropAdapter AntViewDropAdapter addDropSupport
menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr fill Context Menu viewer mgr  menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu
Creates a pop up menu on the given control param menu Control the control with which the pop up menu will be associated private void create Context Menu final Viewer viewer Control menu Control viewer get Control Menu Manager menu Mgr new Menu Manager Pop Up NON NLS 1 menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr fill Context Menu viewer mgr Menu menu menu Mgr create Context Menu menu Control menu Control set Menu menu register the context menu such that other plugins may contribute to it get Site register Context Menu menu Mgr viewer  menuControl createContextMenu menuControl getControl MenuManager menuMgr MenuManager PopUp menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu menuMgr createContextMenu menuControl menuControl setMenu getSite registerContextMenu menuMgr
Adds actions to the context menu param viewer the viewer who s menu we re configuring param menu The menu to contribute to private void fill Context Menu Viewer viewer I Menu Manager menu if viewer project Viewer menu add run Target Action menu add edit Config Action menu add new Separator add Open With Menu menu menu add new Separator menu add add Build File Action menu add remove Project Action menu add remove All Action menu add refresh Build Files Action menu add new Separator I Workbench Action Constants MB ADDITIONS  fillContextMenu IMenuManager projectViewer runTargetAction editConfigAction addOpenWithMenu addBuildFileAction removeProjectAction removeAllAction refreshBuildFilesAction IWorkbenchActionConstants MB_ADDITIONS
private void add Open With Menu I Menu Manager menu I File build File get Selection Build File if build File null build File exists menu add new Separator group open NON NLS 1 I Menu Manager submenu new Menu Manager Ant View Messages get String Ant View Open With 3 NON NLS 1 open With Menu set File build File submenu add open With Menu menu append To Group group open submenu NON NLS 1  addOpenWithMenu IMenuManager IFile buildFile getSelectionBuildFile buildFile buildFile IMenuManager MenuManager AntViewMessages getString AntView Open_With_3 openWithMenu setFile buildFile openWithMenu appendToGroup
Initialize the actions for this view private void initialize Actions update Project Actions new Array List 5 add Build File Action new Add Build Files Action this remove Project Action new Remove Project Action this update Project Actions add remove Project Action remove All Action new Remove All Action this update Project Actions add remove All Action run Target Action new Run Target Action this false update Project Actions add run Target Action search For Build Files Action new Search For Build Files Action this refresh Build Files Action new Refresh Build Files Action this update Project Actions add refresh Build Files Action open With Menu new Ant Open With Menu this get View Site get Page edit Config Action new Run Target Action this true update Project Actions add edit Config Action filter Internal Targets Action new Filter Internal Targets Action this  initializeActions updateProjectActions ArrayList addBuildFileAction AddBuildFilesAction removeProjectAction RemoveProjectAction updateProjectActions removeProjectAction removeAllAction RemoveAllAction updateProjectActions removeAllAction runTargetAction RunTargetAction updateProjectActions runTargetAction searchForBuildFilesAction SearchForBuildFilesAction refreshBuildFilesAction RefreshBuildFilesAction updateProjectActions refreshBuildFilesAction openWithMenu AntOpenWithMenu getViewSite getPage editConfigAction RunTargetAction updateProjectActions editConfigAction filterInternalTargetsAction FilterInternalTargetsAction
Updates the enabled state of all I Update actions associated with the project viewer private void update Project Actions Iterator iter update Project Actions iterator while iter has Next I Update iter next update  IUpdate updateProjectActions updateProjectActions hasNext IUpdate
project Viewer set Sorter new Viewer Sorter see org eclipse jface viewers Viewer Sorter compare org eclipse jface viewers Viewer java lang Object java lang Object public int compare Viewer viewer Object e1 Object e2 return e1 to String compare To Ignore Case e2 to String  projectViewer setSorter ViewerSorter ViewerSorter toString compareToIgnoreCase toString
project Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Selection Changed event  projectViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged
project Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if event get Selection is Empty handle Project Viewer Double Click event  projectViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getSelection isEmpty handleProjectViewerDoubleClick
project Viewer get Control add Key Listener new Key Adapter public void key Pressed Key Event event handle Project Viewer Key Press event  projectViewer getControl addKeyListener KeyAdapter keyPressed KeyEvent handleProjectViewerKeyPress
Create the viewer which displays the ant projects private void create Project Viewer Composite parent project Viewer new Tree Viewer parent SWT H SCROLL SWT V SCROLL project Content Provider new Ant Project Content Provider project Viewer set Content Provider project Content Provider project Content Provider set Filter Internal Targets restored Filter Internal Targets filter Internal Targets Action set Checked restored Filter Internal Targets project Viewer set Label Provider new Ant View Label Provider if temp Memento null restore Root temp Memento project Viewer set Input restored Root project Viewer set Sorter new Viewer Sorter see org eclipse jface viewers Viewer Sorter compare org eclipse jface viewers Viewer java lang Object java lang Object public int compare Viewer viewer Object e1 Object e2 return e1 to String compare To Ignore Case e2 to String project Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Selection Changed event project Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if event get Selection is Empty handle Project Viewer Double Click event project Viewer get Control add Key Listener new Key Adapter public void key Pressed Key Event event handle Project Viewer Key Press event create Context Menu project Viewer  createProjectViewer projectViewer TreeViewer H_SCROLL V_SCROLL projectContentProvider AntProjectContentProvider projectViewer setContentProvider projectContentProvider projectContentProvider setFilterInternalTargets restoredFilterInternalTargets filterInternalTargetsAction setChecked restoredFilterInternalTargets projectViewer setLabelProvider AntViewLabelProvider tempMemento restoreRoot tempMemento projectViewer setInput restoredRoot projectViewer setSorter ViewerSorter ViewerSorter toString compareToIgnoreCase toString projectViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged projectViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getSelection isEmpty handleProjectViewerDoubleClick projectViewer getControl addKeyListener KeyAdapter keyPressed KeyEvent handleProjectViewerKeyPress createContextMenu projectViewer
private void handle Project Viewer Key Press Key Event event if event character SWT DEL event state Mask 0 if remove Project Action is Enabled remove Project Action run else if event key Code SWT F5 event state Mask 0 if refresh Build Files Action is Enabled refresh Build Files Action run  handleProjectViewerKeyPress KeyEvent stateMask removeProjectAction isEnabled removeProjectAction keyCode stateMask refreshBuildFilesAction isEnabled refreshBuildFilesAction
private void handle Project Viewer Double Click Double Click Event event I Selection s event get Selection if s is Empty s instanceof I Structured Selection return Object selection I Structured Selection s get First Element if selection instanceof Project Node Project Node project Project Node selection I Editor Registry registry PlatformUI get Workbench get Editor Registry I File file Ant Util get File project get Build File Name I Editor Descriptor editor IDE get Default Editor file if editor null editor registry find Editor I Editor Registry SYSTEM INPLACE EDITOR ID try if editor null get View Site get Page open Editor new File Editor Input file I Editor Registry SYSTEM EXTERNAL EDITOR ID else get View Site get Page open Editor new File Editor Input file editor get Id catch Part Init Exception e AntUI Plugin log e else if selection instanceof Target Node run Target Action run  handleProjectViewerDoubleClick DoubleClickEvent ISelection getSelection isEmpty IStructuredSelection IStructuredSelection getFirstElement ProjectNode ProjectNode ProjectNode IEditorRegistry getWorkbench getEditorRegistry IFile AntUtil getFile getBuildFileName IEditorDescriptor getDefaultEditor findEditor IEditorRegistry SYSTEM_INPLACE_EDITOR_ID getViewSite getPage openEditor FileEditorInput IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID getViewSite getPage openEditor FileEditorInput getId PartInitException AntUIPlugin TargetNode runTargetAction
Updates the actions and status line for selection change in one of the viewers private void handle Selection Changed Selection Changed Event event update Project Actions Iterator selection Iter I Structured Selection event get Selection iterator Object selection null if selection Iter has Next selection selection Iter next String message String null if selection Iter has Next message String get Status Line Text selection get View Site get Action Bars get Status Line Manager set Message message String  handleSelectionChanged SelectionChangedEvent updateProjectActions selectionIter IStructuredSelection getSelection selectionIter hasNext selectionIter messageString selectionIter hasNext messageString getStatusLineText getViewSite getActionBars getStatusLineManager setMessage messageString
Returns text appropriate for display in the workbench status line for the given node private static String get Status Line Text Object node if node instanceof Project Node Project Node project Project Node node String Buffer message new String Buffer project get Build File Name String description project get Description if description null message append NON NLS 1 message append description return message to String else if node instanceof Target Node Target Node target Target Node node String Buffer message new String Buffer Ant View Messages get String Ant View Name   1 NON NLS 1 message append target get Name message append String depends target get Dependencies if depends length 0 message append Ant View Messages get String Ant View  Depends   2 NON NLS 1 message append depends 0 Unroll the loop to avoid trailing comma for int i 1 i depends length i message append append depends i message append String description target get Description if description null description length 0 message append Ant View Messages get String Ant View  Description   4 NON NLS 1 message append description message append return message to String return null  getStatusLineText ProjectNode ProjectNode ProjectNode StringBuffer StringBuffer getBuildFileName getDescription toString TargetNode TargetNode TargetNode StringBuffer StringBuffer AntViewMessages getString AntView Name___1 getName getDependencies AntViewMessages getString AntView _Depends___2 getDescription AntViewMessages getString AntView _Description___4 toString
Returns the tree viewer that displays the projects in this view return Tree Viewer this view s project viewer public Tree Viewer get Project Viewer return project Viewer  TreeViewer TreeViewer getProjectViewer projectViewer
Returns the code Project Node code s currently displayed in this view return Project Node the code Project Node code s currently displayed in this view public Project Node get Projects return project Content Provider get Root Node get Projects  ProjectNode ProjectNode ProjectNode ProjectNode getProjects projectContentProvider getRootNode getProjects
Adds the given project project to the view param project the project to add public void add Project Project Node project project Content Provider add Project project project Viewer refresh Resources Plugin get Workspace add Resource Change Listener this update Project Actions  addProject ProjectNode projectContentProvider addProject projectViewer ResourcesPlugin getWorkspace addResourceChangeListener updateProjectActions
Removes the given project from the view param project the project to remove private void remove Project Project Node project remove Project From Content Providers project project Viewer refresh if get Projects length 0 Resources Plugin get Workspace remove Resource Change Listener this set Project Viewer Selection After Deletion  removeProject ProjectNode removeProjectFromContentProviders projectViewer getProjects ResourcesPlugin getWorkspace removeResourceChangeListener setProjectViewerSelectionAfterDeletion
private void set Project Viewer Selection After Deletion Object children project Content Provider get Children project Content Provider get Root Node if children length 0 Viewer Sorter sorter project Viewer get Sorter sorter sort project Viewer children project Viewer set Selection new Structured Selection children 0  setProjectViewerSelectionAfterDeletion projectContentProvider getChildren projectContentProvider getRootNode ViewerSorter projectViewer getSorter projectViewer projectViewer setSelection StructuredSelection
Removes the given list of code Project Node code objects from the view This method should be called whenever multiple projects are to be removed because this method optimizes the viewer refresh associated with removing multiple items param project Nodes the list of code Project Node code objects to remove public void remove Projects List project Nodes Iterator iter project Nodes iterator while iter has Next Project Node project Project Node iter next remove Project From Content Providers project project Viewer refresh set Project Viewer Selection After Deletion  ProjectNode projectNodes ProjectNode removeProjects projectNodes projectNodes hasNext ProjectNode ProjectNode removeProjectFromContentProviders projectViewer setProjectViewerSelectionAfterDeletion
Removes the given project node from the project content provider Also removes any targets from the given project from the target content provider param project the project to remove private void remove Project From Content Providers Project Node project project Content Provider get Root Node remove Project project if project Content Provider get Root Node has Projects Resources Plugin get Workspace remove Resource Change Listener this  removeProjectFromContentProviders ProjectNode projectContentProvider getRootNode removeProject projectContentProvider getRootNode hasProjects ResourcesPlugin getWorkspace removeResourceChangeListener
Removes all projects from the view public void remove All Projects Remove all projects project Content Provider get Root Node remove All Projects Refresh the viewer project Viewer refresh Resources Plugin get Workspace remove Resource Change Listener this update Project Actions  removeAllProjects projectContentProvider getRootNode removeAllProjects projectViewer ResourcesPlugin getWorkspace removeResourceChangeListener updateProjectActions
see org eclipse ui I Workbench Part set Focus public void set Focus if get Project Viewer null get Project Viewer get Control set Focus  IWorkbenchPart setFocus setFocus getProjectViewer getProjectViewer getControl setFocus
Restore the projects and selected targets see org eclipse ui I View Part init I View Site I Memento public void init I View Site site I Memento memento throws Part Init Exception init site restore Root memento if memento null I Memento child memento get Child TAG FILTER INTERNAL TARGETS if child null restored Filter Internal Targets Boolean value Of child get String KEY VALUE boolean Value  IViewPart IViewSite IMemento IViewSite IMemento PartInitException restoreRoot IMemento getChild TAG_FILTER_INTERNAL_TARGETS restoredFilterInternalTargets valueOf getString KEY_VALUE booleanValue
Initialize the root node by restoring the persisted projects param memento the memento containing the persisted projects private void restore Root I Memento memento if memento null restored Root new Root Node return I Memento projects memento get Children TAG PROJECT if projects length 1 restored Root new Root Node return List project Nodes new Array List projects length for int i 0 i projects length i I Memento project Memento projects i String path String project Memento get String KEY PATH if Resources Plugin get Workspace get Root get File new Path path String exists If the file no longer exists don t add it continue String name String project Memento get String KEY NAME String default Target project Memento get String KEY DEFAULT String error String project Memento get String KEY ERROR Project Node project null if name String null name String NON NLS 1 project new Project Node name String path String if error String null Boolean value Of error String boolean Value project set Is Error Node true if default Target null project set Default Target Name default Target project Nodes add project restored Root new Root Node Project Node project Nodes to Array new Project Node project Nodes size  restoreRoot IMemento restoredRoot RootNode IMemento getChildren TAG_PROJECT restoredRoot RootNode projectNodes ArrayList IMemento projectMemento pathString projectMemento getString KEY_PATH ResourcesPlugin getWorkspace getRoot getFile pathString nameString projectMemento getString KEY_NAME defaultTarget projectMemento getString KEY_DEFAULT errorString projectMemento getString KEY_ERROR ProjectNode nameString nameString ProjectNode nameString pathString errorString valueOf errorString booleanValue setIsErrorNode defaultTarget setDefaultTargetName defaultTarget projectNodes restoredRoot RootNode ProjectNode projectNodes toArray ProjectNode projectNodes
Save the contents of the project viewer and the target viewer see org eclipse ui I View Part save State I Memento public void save State I Memento memento Save the projects Project Node projects project Content Provider get Root Node get Projects Project Node project I Memento project Memento for int i 0 i projects length i project projects i project Memento memento create Child TAG PROJECT project Memento put String KEY PATH project get Build File Name project Memento put String KEY NAME project get Name String default Target project get Default Target Name if project is Error Node project Memento put String KEY ERROR String value Of true else if default Target null project Memento put String KEY DEFAULT default Target project Memento put String KEY ERROR String value Of false I Memento filter Targets memento create Child TAG FILTER INTERNAL TARGETS filter Targets put String KEY VALUE is Filter Internal Targets String value Of true String value Of false  IViewPart saveState IMemento saveState IMemento ProjectNode projectContentProvider getRootNode getProjects ProjectNode IMemento projectMemento projectMemento createChild TAG_PROJECT projectMemento putString KEY_PATH getBuildFileName projectMemento putString KEY_NAME getName defaultTarget getDefaultTargetName isErrorNode projectMemento putString KEY_ERROR valueOf defaultTarget projectMemento putString KEY_DEFAULT defaultTarget projectMemento putString KEY_ERROR valueOf IMemento filterTargets createChild TAG_FILTER_INTERNAL_TARGETS filterTargets putString KEY_VALUE isFilterInternalTargets valueOf valueOf
see org eclipse ui I Workbench Part dispose public void dispose temp Memento XML Memento create Write Root Ant View Memento NON NLS 1 save State temp Memento super dispose if open With Menu null open With Menu dispose Resources Plugin get Workspace remove Resource Change Listener this  IWorkbenchPart tempMemento XMLMemento createWriteRoot AntViewMemento saveState tempMemento openWithMenu openWithMenu ResourcesPlugin getWorkspace removeResourceChangeListener
public void resource Changed I Resource Change Event event I Resource Delta delta event get Delta if delta null Project Node projects project Content Provider get Root Node get Projects I Path build File Path for int i 0 i projects length i build File Path new Path projects i get Build File Name I Resource Delta change delta find Member build File Path if change null handle Change Delta change projects i  resourceChanged IResourceChangeEvent IResourceDelta getDelta ProjectNode projectContentProvider getRootNode getProjects IPath buildFilePath buildFilePath getBuildFileName IResourceDelta findMember buildFilePath handleChangeDelta
if delta get Kind I Resource Delta REMOVED Display get Default async Exec new Runnable public void run remove Project project  getKind IResourceDelta getDefault asyncExec removeProject
Update the view for the given resource delta The delta is a resource delta for the given build file in the view param delta a delta for a build file in the view param project the project node that has changed private void handle Change Delta I Resource Delta delta final Project Node project I Resource resource delta get Resource if resource get Type I Resource FILE return if delta get Kind I Resource Delta REMOVED Display get Default async Exec new Runnable public void run remove Project project else if delta get Kind I Resource Delta CHANGED delta get Flags I Resource Delta CONTENT 0 handle Build File Changed project  handleChangeDelta IResourceDelta ProjectNode IResource getResource getType IResource getKind IResourceDelta getDefault asyncExec removeProject getKind IResourceDelta getFlags IResourceDelta handleBuildFileChanged
private void fill Main Tool Bar I Tool Bar Manager tool Bar Mgr get View Site get Action Bars get Tool Bar Manager tool Bar Mgr remove All tool Bar Mgr add add Build File Action tool Bar Mgr add search For Build Files Action tool Bar Mgr add filter Internal Targets Action tool Bar Mgr add run Target Action tool Bar Mgr add remove Project Action tool Bar Mgr add remove All Action tool Bar Mgr update false  fillMainToolBar IToolBarManager toolBarMgr getViewSite getActionBars getToolBarManager toolBarMgr removeAll toolBarMgr addBuildFileAction toolBarMgr searchForBuildFilesAction toolBarMgr filterInternalTargetsAction toolBarMgr runTargetAction toolBarMgr removeProjectAction toolBarMgr removeAllAction toolBarMgr
private I File get Selection Build File I Structured Selection selection I Structured Selection get Project Viewer get Selection if selection size 1 Object element selection get First Element Project Node project Node null if element instanceof Project Node project Node Project Node element else if element instanceof Target Node project Node Target Node element get Project if project Node null return Ant Util get File project Node get Build File Name return null  IFile getSelectionBuildFile IStructuredSelection IStructuredSelection getProjectViewer getSelection getFirstElement ProjectNode projectNode ProjectNode projectNode ProjectNode TargetNode projectNode TargetNode getProject projectNode AntUtil getFile projectNode getBuildFileName
public Show In Context get Show In Context I File build File get Selection Build File if build File null build File exists I Selection selection new Structured Selection build File return new Show In Context null selection return null  ShowInContext getShowInContext IFile buildFile getSelectionBuildFile buildFile buildFile ISelection StructuredSelection buildFile ShowInContext
Returns whether internal targets are currently being filtered out of the view return whether or not internal targets are being filtered out public boolean is Filter Internal Targets if project Content Provider null return project Content Provider is Filter Internal Targets return false  isFilterInternalTargets projectContentProvider projectContentProvider isFilterInternalTargets
Sets whether internal targets should be filtered out of the view param filter whether or not internal targets should be filtered out public void set Filter Internal Targets boolean filter if project Content Provider null project Content Provider set Filter Internal Targets filter project Viewer refresh  setFilterInternalTargets projectContentProvider projectContentProvider setFilterInternalTargets projectViewer

Creates a new drop adapter for the given Ant view param view the view which dropped files will be added to public Ant View Drop Adapter Ant View view this view view  AntViewDropAdapter AntView
Busy Indicator show While null new Runnable public void run for int i 0 i strings length i process String strings i  BusyIndicator showWhile processString
see org eclipse swt dnd Drop Target Listener drop org eclipse swt dnd Drop Target Event public void drop Drop Target Event event Object data event data if data instanceof String final String strings String data Busy Indicator show While null new Runnable public void run for int i 0 i strings length i process String strings i  DropTargetListener DropTargetEvent DropTargetEvent BusyIndicator showWhile processString
Attempts to process the given string as a path to an XML file If the string is determined to be a path to an XML file in the workspace that file is added to the Ant view param build File Name the string to process private void process String String build File Name I File build File Ant Util get File For Location build File Name null if build File null build File Name to Lower Case ends With xml NON NLS 1 return build File Name build File get Full Path to String Project Node existing Projects view get Projects for int j 0 j existing Projects length j Project Node existing Project existing Projects j if existing Project get Build File Name equals build File Name Don t parse projects that have already been added return Project Node project new Project Node build File Name view add Project project  buildFileName processString buildFileName IFile buildFile AntUtil getFileForLocation buildFileName buildFile buildFileName toLowerCase endsWith buildFileName buildFile getFullPath toString ProjectNode existingProjects getProjects existingProjects ProjectNode existingProject existingProjects existingProject getBuildFileName buildFileName ProjectNode ProjectNode buildFileName addProject

see org eclipse jface viewers I Label Provider get Image java lang Object public Image get Image Object element if element instanceof Project Node Project Node project Project Node element int flags 0 if project is Error Node flags flags Ant Image Descriptor HAS ERRORS Composite Image Descriptor descriptor new Ant Image Descriptor AntUI Images get Image Descriptor I AntUI Constants IMG ANT PROJECT flags return AntUI Images get Image descriptor else if element instanceof Target Node Target Node target Target Node element int flags 0 Image Descriptor base null if target equals target get Project get Default Target base AntUI Images get Image Descriptor I AntUI Constants IMG ANT DEFAULT TARGET else if target get Description null base AntUI Images get Image Descriptor I AntUI Constants IMG ANT TARGET INTERNAL else base AntUI Images get Image Descriptor I AntUI Constants IMG ANT TARGET if target is Error Node flags flags Ant Image Descriptor HAS ERRORS return AntUI Images get Image new Ant Image Descriptor base flags return null  ILabelProvider getImage getImage ProjectNode ProjectNode ProjectNode isErrorNode AntImageDescriptor HAS_ERRORS CompositeImageDescriptor AntImageDescriptor AntUIImages getImageDescriptor IAntUIConstants IMG_ANT_PROJECT AntUIImages getImage TargetNode TargetNode TargetNode ImageDescriptor getProject getDefaultTarget AntUIImages getImageDescriptor IAntUIConstants IMG_ANT_DEFAULT_TARGET getDescription AntUIImages getImageDescriptor IAntUIConstants IMG_ANT_TARGET_INTERNAL AntUIImages getImageDescriptor IAntUIConstants IMG_ANT_TARGET isErrorNode AntImageDescriptor HAS_ERRORS AntUIImages getImage AntImageDescriptor
see org eclipse jface viewers I Label Provider get Text java lang Object public String get Text Object element if element instanceof Target Node Target Node node Target Node element String Buffer name new String Buffer node get Name if node get Name equals node get Project get Default Target Name name append Ant View Messages get String Target Node default NON NLS 1 return name to String else if element instanceof Project Node Project Node project Project Node element String Buffer buffer new String Buffer project get Name String default Target project get Default Target Name if default Target null buffer append append default Target append NON NLS 1 return buffer to String else return element to String  ILabelProvider getText getText TargetNode TargetNode TargetNode StringBuffer StringBuffer getName getName getProject getDefaultTargetName AntViewMessages getString TargetNode toString ProjectNode ProjectNode ProjectNode StringBuffer StringBuffer getName defaultTarget getDefaultTargetName defaultTarget defaultTarget toString toString
see org eclipse jface viewers I Base Label Provider add Listener org eclipse jface viewers I Label Provider Listener public void add Listener I Label Provider Listener listener  IBaseLabelProvider addListener ILabelProviderListener addListener ILabelProviderListener
see org eclipse jface viewers I Base Label Provider dispose public void dispose  IBaseLabelProvider
see org eclipse jface viewers I Base Label Provider is Label Property java lang Object java lang String public boolean is Label Property Object element String property return false  IBaseLabelProvider isLabelProperty isLabelProperty
see org eclipse jface viewers I Base Label Provider remove Listener org eclipse jface viewers I Label Provider Listener public void remove Listener I Label Provider Listener listener  IBaseLabelProvider removeListener ILabelProviderListener removeListener ILabelProviderListener
public Color get Foreground Object element if element instanceof Target Node Target Node target Target Node element if target target get Project get Default Target return Display get Default get System Color SWT COLOR BLUE return null  getForeground TargetNode TargetNode TargetNode getProject getDefaultTarget getDefault getSystemColor COLOR_BLUE
see org eclipse jface viewers I Color Provider get Background java lang Object public Color get Background Object element return null  IColorProvider getBackground getBackground

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Ant View Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME AntViewMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Creates a new node with no parent private Ant Node  AntNode
Creates a new node with the given name param name the new node s name public Ant Node String name this null name  AntNode
Creates a new node with the given parent and the given name param parent the new node s parent node param name the new node s name public Ant Node Ant Node parent String name this parent parent this name name  AntNode AntNode
Returns this node s parent or code null code if none return Ant Node this node s parent node public Ant Node get Parent return parent  AntNode AntNode getParent
Sets this node s parent node to the given node param parent the parent node public void set Parent Ant Node parent this parent parent  setParent AntNode
Returns this node s name or code null code if none Subclasses which represent an ant build element that has a required name must override this method to never return code null code return String this node s name or code null code if the name attribute is optional for this node public String get Name return name  getName
Sets this node s name to the given name param name the new name public void set Name String name this name name  setName
public String to String if get Name null return get Name return super to String  toString getName getName toString
Sets this node s description to the given description param description the new description public void set Description String description this description description  setDescription
Returns this node s description or code null code if none Subclasses which represent an ant build element that has a required description must override this method to never return code null code return String this node s description or code null code if the description attribute is optional for this node public String get Description return description  getDescription

Resource Bundle get Bundle BUNDLE NAME private Ant View Elements Messages  ResourceBundle getBundle BUNDLE_NAME AntViewElementsMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

private String default Target Name Creates a new project node with the given name and the given build file name param name the project s name or code null code if the project s name is not known If this value is code null code the file will be parsed the first time a value is requested that requires it param build File Name public Project Node String name String build File Name super name this build File Name build File Name  defaultTargetName buildFileName ProjectNode buildFileName buildFileName buildFileName
Creates a new project node on the given build file public Project Node String build File Name this null build File Name  ProjectNode buildFileName buildFileName
Returns the targets in this project return Target Node the targets in this project public Target Node get Targets if targets null Lazily parse the file to populate the targets parse Build File return Target Node targets to Array new Target Node targets size  TargetNode TargetNode getTargets parseBuildFile TargetNode toArray TargetNode
Adds the given target to this project param target the target to add private void add Target Target Node target targets add target target set Parent this  addTarget TargetNode setParent
Sets this project s default target to the given target param target this project s default target public void set Default Target Target Node target default Target target if target null default Target Name target get Name  setDefaultTarget TargetNode defaultTarget defaultTargetName getName
Returns the name of the build file containing this project return String the name of this project s build file public String get Build File Name return build File Name  getBuildFileName buildFileName
Returns the default target in this project or code null code if none has been set return Target Node the default target or code null code if none has been set public Target Node get Default Target if targets null Lazily parse the file to populate the targets parse Build File return default Target  TargetNode TargetNode getDefaultTarget parseBuildFile defaultTarget
Returns the default target name If this project has not been parsed yet this method will return the default target name specified via set Default Target Name String or code null code if no default target name has been specified This method is intended to be used by clients who want to access the name of this project s default target without forcing the build file to be parsed return String the name of the default target in this project public String get Default Target Name return default Target Name  setDefaultTargetName getDefaultTargetName defaultTargetName
Sets the name of this project node s default target param name the name of this project node s default target see Project Node get Default Target Name public void set Default Target Name String name default Target Name name  ProjectNode getDefaultTargetName setDefaultTargetName defaultTargetName
Sets this project s error node state param is Error Node whether or not an error occurred while parsing this node public void set Is Error Node boolean is Error Node this is Error Node is Error Node  isErrorNode setIsErrorNode isErrorNode isErrorNode isErrorNode
Returns whether an error occurred while parsing this Ant node return whether an error occurred while parsing this Ant node public boolean is Error Node return is Error Node  isErrorNode isErrorNode
Collections sort targets new Comparator see java util Comparator compare java lang Object java lang Object public int compare Object o1 Object o2 String name1 NON NLS 1 String name2 NON NLS 1 if o1 instanceof Target Node name1 Target Node o1 get Name if o2 instanceof Target Node name2 Target Node o2 get Name return name1 compare To Ignore Case name2  TargetNode TargetNode getName TargetNode TargetNode getName compareToIgnoreCase
Parses the given build file and populates the targets contained in the build file If an error occurs while parsing the file the error state will be set and a target error node will be added public void parse Build File clear Target Info infos null I Path build File Path Ant Util get File get Build File Name get Location if build File Path null set Error Message Ant View Elements Messages get String Project Node Build file not found 1 NON NLS 1 return try infos Ant Util get Targets build File Path to String catch Core Exception e set Error Message e get Message return if infos length 1 set Error Message Ant View Elements Messages get String Project Node No targets NON NLS 1 return Project Info project Info infos 0 get Project Create Apache Ant objects Project project new Project if project Info get Name null project set Name project Info get Name for int i 0 i infos length i Target Info info infos i if info is Default project set Default info get Name Target target new Target target set Name info get Name String dependencies info get Dependencies String Buffer depends new String Buffer int num Dependencies dependencies length if num Dependencies 0 Onroll the loop to avoid trailing comma depends append dependencies 0 for int j 1 j num Dependencies j depends append append dependencies j target set Depends depends to String target set Description info get Description project add Target target if project get Default Target null set Error Message Ant View Elements Messages get String Project Node No default NON NLS 1 return Set the project node data based on the Apache Ant data String project Name project get Name if project Name null project Name Ant View Elements Messages get String Project Node name unspecified  1 NON NLS 1 Update the project name set Name project Name set Description project Info get Description Enumeration proj Targets project get Targets elements while proj Targets has More Elements Target target Target proj Targets next Element Target Node Enumeration target Dependencies target get Dependencies Target Node target Node new Target Node target get Name target get Description while target Dependencies has More Elements target Node add Dependency String target Dependencies next Element add Target target Node if target get Name equals project get Default Target set Default Target target Node Collections sort targets new Comparator see java util Comparator compare java lang Object java lang Object public int compare Object o1 Object o2 String name1 NON NLS 1 String name2 NON NLS 1 if o1 instanceof Target Node name1 Target Node o1 get Name if o2 instanceof Target Node name2 Target Node o2 get Name return name1 compare To Ignore Case name2  parseBuildFile TargetInfo IPath buildFilePath AntUtil getFile getBuildFileName getLocation buildFilePath setErrorMessage AntViewElementsMessages getString ProjectNode Build_file_not_found_1 AntUtil getTargets buildFilePath toString CoreException setErrorMessage getMessage setErrorMessage AntViewElementsMessages getString ProjectNode No_targets ProjectInfo projectInfo getProject projectInfo getName setName projectInfo getName TargetInfo isDefault setDefault getName setName getName getDependencies StringBuffer StringBuffer numDependencies numDependencies numDependencies setDepends toString setDescription getDescription addTarget getDefaultTarget setErrorMessage AntViewElementsMessages getString ProjectNode No_default projectName getName projectName projectName AntViewElementsMessages getString ProjectNode name_unspecified _1 setName projectName setDescription projectInfo getDescription projTargets getTargets projTargets hasMoreElements projTargets nextElement targetDependencies getDependencies TargetNode targetNode TargetNode getName getDescription targetDependencies hasMoreElements targetNode addDependency targetDependencies nextElement addTarget targetNode getName getDefaultTarget setDefaultTarget targetNode TargetNode TargetNode getName TargetNode TargetNode getName compareToIgnoreCase
Clear s this node s internally stored data private void clear targets new Array List set Is Error Node false set Default Target null set Default Target Name null  ArrayList setIsErrorNode setDefaultTarget setDefaultTargetName
Sets the error message of this project and creates a new target child node with the message param error Message the error message generated while parsing this project private void set Error Message String error Message set Name get Build File Name set Is Error Node true Target Node target new Target Node error Message error Message target set Is Error Node true add Target target  errorMessage setErrorMessage errorMessage setName getBuildFileName setIsErrorNode TargetNode TargetNode errorMessage errorMessage setIsErrorNode addTarget
Returns the name of this project parsing the build file first if necessary return String this project s name public String get Name if super get Name null parse Build File String name super get Name if name null name length 0 name Ant View Elements Messages get String Project Node name unspecified  1 NON NLS 1 return name  getName getName parseBuildFile getName AntViewElementsMessages getString ProjectNode name_unspecified _1
see java lang Object to String public String to String return get Name  toString toString getName

private List projects new Array List public Root Node super null  ArrayList RootNode
Creates a new root node containing the given projects param projects the projects to add to this node public Root Node Project Node projects super null for int i 0 i projects length i this projects add projects i  RootNode ProjectNode
Returns the list of projects stored in this root node return Project Node the projects in this node public Project Node get Projects return Project Node projects to Array new Project Node projects size  ProjectNode ProjectNode getProjects ProjectNode toArray ProjectNode
Returns whether this root node contains any projects return boolean Whether there are any projects public boolean has Projects return projects is Empty  hasProjects isEmpty
Adds the given project to this root node param project the project to add public void add Project Project Node project projects add project  addProject ProjectNode
Removes the given project from this root node Has no effect if the given project is not a child of this root param project the project to remove public void remove Project Project Node project projects remove project  removeProject ProjectNode
Removes all projects from this root node Has no effect if this node has no projects public void remove All Projects projects clear  removeAllProjects

Creates a new target node with the given name and description param name the new node s name param description the target description or code null code if the target has no description public Target Node String name String description super name set Description description  TargetNode setDescription
Adds the given dependency to the list of this target s dependencies param dependency the dependency to add public void add Dependency String dependency dependencies add dependency  addDependency
Returns the dependency node containing the names of the targets on which this target depends return Dependency Node the node containing the names of this target s dependencies public String get Dependencies return String dependencies to Array new String dependencies size  DependencyNode getDependencies toArray
Returns the Project Node containing this target This method is equivalent to calling get Parent and casting the result to a Project Node return Project Node the project containing this target public Project Node get Project return Project Node get Parent  ProjectNode getParent ProjectNode ProjectNode ProjectNode getProject ProjectNode getParent
Sets this target s error node state param is Error Node whether or not an error occurred while parsing this node public void set Is Error Node boolean is Error Node this is Error Node is Error Node  isErrorNode setIsErrorNode isErrorNode isErrorNode isErrorNode
Returns whether an error occurred while parsing this Ant node return whether an error occurred while parsing this Ant node public boolean is Error Node return is Error Node  isErrorNode isErrorNode

Creates a buffered stream content accessor protected Buffered Content  BufferedContent
public Input Stream get Contents throws Core Exception if f Content null return new Byte Array Input Stream f Content return create Stream  InputStream getContents CoreException fContent ByteArrayInputStream fContent createStream
Creates and returns a stream for reading the contents p Subclasses must implement this method p return the stream from which the content is read exception Core Exception if the contents could not be accessed  CoreException
Sets the contents Registered content change listeners are notified param contents the new contents public void set Content byte contents f Content contents fire Content Changed  setContent fContent fireContentChanged
Returns the contents as an array of bytes return the contents as an array of bytes or code null code if the contents could not be accessed public byte get Content if f Content null try Input Stream is create Stream f Content Utilities read Bytes is catch Core Exception ex Need Work return f Content  getContent fContent InputStream createStream fContent readBytes CoreException NeedWork fContent
Discards the buffered content public void discard Buffer f Content null  discardBuffer fContent
public void add Content Change Listener I Content Change Listener listener if f Listener List null f Listener List new Listener List f Listener List add listener  addContentChangeListener IContentChangeListener fListenerList fListenerList ListenerList fListenerList
public void remove Content Change Listener I Content Change Listener listener if f Listener List null f Listener List remove listener if f Listener List is Empty f Listener List null  removeContentChangeListener IContentChangeListener fListenerList fListenerList fListenerList isEmpty fListenerList
Notifies all registered code I Content Change Listener code s of a content change protected void fire Content Changed if f Listener List null Object listeners f Listener List get Listeners for int i 0 i listeners length i I Content Change Listener listeners i content Changed this  IContentChangeListener fireContentChanged fListenerList fListenerList getListeners IContentChangeListener contentChanged

Creates a new configuration with editable left and right sides suitable default labels and no images The given preference store is used to connect this configuration with the Compare preference page properties code Compare Preference Page INITIALLY SHOW ANCESTOR PANE code and code Compare Configuration IGNORE WHITESPACE code param pref Store the preference store which this configuration holds onto since 2 0 public Compare Configuration I Preference Store pref Store set Property LEFT IS LOCAL new Boolean f Left Is Local NON NLS 1 f Preference Store pref Store if f Preference Store null boolean b f Preference Store get Boolean Compare Preference Page INITIALLY SHOW ANCESTOR PANE set Property Compare Preference Page INITIALLY SHOW ANCESTOR PANE new Boolean b b f Preference Store get Boolean Compare Preference Page IGNORE WHITESPACE set Property Compare Configuration IGNORE WHITESPACE new Boolean b  ComparePreferencePage INITIALLY_SHOW_ANCESTOR_PANE CompareConfiguration IGNORE_WHITESPACE prefStore CompareConfiguration IPreferenceStore prefStore setProperty LEFT_IS_LOCAL fLeftIsLocal fPreferenceStore prefStore fPreferenceStore fPreferenceStore getBoolean ComparePreferencePage INITIALLY_SHOW_ANCESTOR_PANE setProperty ComparePreferencePage INITIALLY_SHOW_ANCESTOR_PANE fPreferenceStore getBoolean ComparePreferencePage IGNORE_WHITESPACE setProperty CompareConfiguration IGNORE_WHITESPACE
Creates a new configuration with editable left and right sides suitable default labels and no images This configuration uses the preference store of the Compare plugin code CompareUI Plugin get Default get Preference Store code public Compare Configuration this CompareUI Plugin get Default get Preference Store  CompareUIPlugin getDefault getPreferenceStore CompareConfiguration CompareUIPlugin getDefault getPreferenceStore
Returns the preference store of this configuration return the preference store of this configuration since 2 0 public I Preference Store get Preference Store return f Preference Store  IPreferenceStore getPreferenceStore fPreferenceStore
Returns an image showing the specified change kind The different kind of changes are defined in the code Differencer code Newly created images are remembered by this class and disposed when the code dispose code method is called param kind the kind of change as defined in code Differencer code return an modification of the base image reflecting the kind of change see org eclipse compare structuremergeviewer Differencer since 2 0 public Image get Image int kind Image image f Images kind 15 if image null Image Descriptor id fg Images kind 15 if id null image id create Image f Images kind 15 image return image  getImage fImages ImageDescriptor fgImages createImage fImages
Returns an image showing the specified change kind applied to a given base image The different kind of changes are defined in the code Differencer code Typically an implementation would build a composite image from the given base image and an image representing the change kind Newly created images are remembered by this class and disposed when the code dispose code method is called param base the image which is modified to reflect the kind of change param kind the kind of change as defined in code Differencer code return an modification of the base image reflecting the kind of change see org eclipse compare structuremergeviewer Differencer public Image get Image Image base int kind Object key base if key null key fg Dummy kind 15 Image a Image fg Map get key if a null a new Image 16 fg Map put key a Image b a kind if b null b new Diff Image base fg Images kind WIDTH f Left Is Local create Image CompareUI dispose On Shutdown b a kind b return b  getImage fgDummy fgMap fgMap DiffImage fgImages fLeftIsLocal createImage disposeOnShutdown
Dispose of this compare configuration This method is called if the compare configuration is no longer used An implementation must dispose of all resources public void dispose if f Images null for int i 0 i f Images length i Image image f Images i if image null image is Disposed image dispose f Images null  fImages fImages fImages isDisposed fImages
Fires a code Property Change Event code to registered listeners param property Name the name of the property that has changed param old Value the property s old value param new Value the property s new value private void fire Change String property Name Object old Value Object new Value Property Change Event event null Object listeners f Listeners get Listeners if listeners null for int i 0 i listeners length i I Property Change Listener l I Property Change Listener listeners i if event null event new Property Change Event this property Name old Value new Value l property Change event  PropertyChangeEvent propertyName oldValue newValue fireChange propertyName oldValue newValue PropertyChangeEvent fListeners getListeners IPropertyChangeListener IPropertyChangeListener PropertyChangeEvent propertyName oldValue newValue propertyChange
see I Property Change Notifier add Listener public void add Property Change Listener I Property Change Listener listener f Listeners add listener  IPropertyChangeNotifier addListener addPropertyChangeListener IPropertyChangeListener fListeners
see I Property Change Notifier remove Listener public void remove Property Change Listener I Property Change Listener listener f Listeners remove listener  IPropertyChangeNotifier removeListener removePropertyChangeListener IPropertyChangeListener fListeners
Sets the property with the given name If the new value differs from the old a code Property Change Event code is sent to registered listeners param key the name of the property to set param new Value the new value of the property public void set Property String key Object new Value Object old Value f Properties get key f Properties put key new Value if old Value null old Value equals new Value fire Change key old Value new Value  PropertyChangeEvent newValue setProperty newValue oldValue fProperties fProperties newValue oldValue oldValue newValue fireChange oldValue newValue
Returns the property with the given name or code null code if no such property exists param key the name of the property to retrieve return the property with the given name or code null code if not found public Object get Property String key return f Properties get key  getProperty fProperties
Sets the label to use for the ancestor of compare merge viewers param label the new label for the ancestor of compare merge viewers public void set Ancestor Label String label f Ancestor Label label  setAncestorLabel fAncestorLabel
Returns the label for the ancestor side of compare merge viewers This label is typically shown in the title of the ancestor area in a compare viewer param element the input object of a compare merge viewer or code null code return the label for the ancestor side or code null code public String get Ancestor Label Object element return f Ancestor Label  getAncestorLabel fAncestorLabel
Sets the image to use for the ancestor of compare merge viewers The Compare Configuration does not automatically dispose the old image param image the new image for the ancestor of compare merge viewers public void set Ancestor Image Image image f Ancestor Image image  CompareConfiguration setAncestorImage fAncestorImage
Returns the image for the ancestor side of compare merge viewers This image is typically shown in the title of the ancestor area in a compare viewer param element the input object of a compare merge viewer or code null code return the image for the ancestor side or code null code public Image get Ancestor Image Object element return f Ancestor Image  getAncestorImage fAncestorImage
Controls whether the left side of a merge viewer is editable param editable if the value is code true code left side is editable public void set Left Editable boolean editable f Left Editable editable  setLeftEditable fLeftEditable
Returns whether the left hand side of a merge viewer is editable return code true code if the left hand side is editable public boolean is Left Editable return f Left Editable  isLeftEditable fLeftEditable
Sets the label to use for the left side of compare merge viewers param label the new label for the left side of compare merge viewers public void set Left Label String label f Left Label label  setLeftLabel fLeftLabel
Returns the label for the left hand side of compare merge viewers This label is typically shown in the title of the left side of a compare viewer param element the input object of a compare merge viewer or code null code return the label for the left hand side or code null code public String get Left Label Object element return f Left Label  getLeftLabel fLeftLabel
Sets the image to use for the left side of compare merge viewers The compare configuration does not automatically dispose the old image param image the new image for the left side of compare merge viewers public void set Left Image Image image f Left Image image  setLeftImage fLeftImage
Returns the image for the left hand side of compare merge viewers This image is typically shown in the title of the left side of a compare viewer param element the input object of a compare merge viewer or code null code return the image for the left hand side or code null code public Image get Left Image Object element return f Left Image  getLeftImage fLeftImage
Controls whether the right side of a merge viewer is editable param editable if the value is code true code right side is editable public void set Right Editable boolean editable f Right Editable editable  setRightEditable fRightEditable
Returns whether the right hand side of a merge viewer is editable return code true code if the right hand side is editable public boolean is Right Editable return f Right Editable  isRightEditable fRightEditable
Sets the label to use for the right side of compare merge viewers param label the new label for the right side of compare merge viewers public void set Right Label String label f Right Label label  setRightLabel fRightLabel
Returns the label for the right hand side of compare merge viewers This label is typically shown in the title of the right side of a compare viewer param element the input object of a compare merge viewer or code null code return the label for the right hand side or code null code public String get Right Label Object element return f Right Label  getRightLabel fRightLabel
Sets the image to use for the right side of compare merge viewers The compare configuration does not automatically dispose the old image param image the new image for the right side of compare merge viewers public void set Right Image Image image f Right Image image  setRightImage fRightImage
Returns the image for the right hand side of compare merge viewers This image is typically shown in the title of the right side of a compare viewer param element the input object of a compare merge viewer or code null code return the image for the right hand side or code null code public Image get Right Image Object element return f Right Image  getRightImage fRightImage

f Dirty State Listener new I Property Change Listener public void property Change Property Change Event e String property Name e get Property if Compare Editor Input DIRTY STATE equals property Name boolean changed false Object new Value e get New Value if new Value instanceof Boolean changed Boolean new Value boolean Value set Dirty e get Source changed  fDirtyStateListener IPropertyChangeListener propertyChange PropertyChangeEvent propertyName getProperty CompareEditorInput DIRTY_STATE propertyName newValue getNewValue newValue newValue booleanValue setDirty getSource
Creates a code Compare Editor Input code which is initialized with the given compare configuration The compare configuration is passed to subsequently created viewers param configuration the compare configuration public Compare Editor Input Compare Configuration configuration f Compare Configuration configuration Assert is Not Null configuration Object object f Compare Configuration get Property Compare Configuration USE OUTLINE VIEW if object instanceof Boolean f Use Outline View Boolean object boolean Value Resource Bundle bundle CompareUI get Resource Bundle f Ignore Whitespace new Ignore White Space Action bundle configuration f Show Pseudo Conflicts new Show Pseudo Conflicts bundle configuration f Dirty State Listener new I Property Change Listener public void property Change Property Change Event e String property Name e get Property if Compare Editor Input DIRTY STATE equals property Name boolean changed false Object new Value e get New Value if new Value instanceof Boolean changed Boolean new Value boolean Value set Dirty e get Source changed I Preference Store ps configuration get Preference Store if ps null f Structure Compare On Single Click ps get Boolean Compare Preference Page OPEN STRUCTURE COMPARE  CompareEditorInput CompareEditorInput CompareConfiguration fCompareConfiguration isNotNull fCompareConfiguration getProperty CompareConfiguration USE_OUTLINE_VIEW fUseOutlineView booleanValue ResourceBundle getResourceBundle fIgnoreWhitespace IgnoreWhiteSpaceAction fShowPseudoConflicts ShowPseudoConflicts fDirtyStateListener IPropertyChangeListener propertyChange PropertyChangeEvent propertyName getProperty CompareEditorInput DIRTY_STATE propertyName newValue getNewValue newValue newValue booleanValue setDirty getSource IPreferenceStore getPreferenceStore fStructureCompareOnSingleClick getBoolean ComparePreferencePage OPEN_STRUCTURE_COMPARE
private boolean structure Compare On Single Click return f Structure Compare On Single Click  structureCompareOnSingleClick fStructureCompareOnSingleClick
public Object get Adapter Class adapter if I Compare Navigator class equals adapter Compare Navigator class equals adapter if f Navigator null f Navigator new Compare Navigator new Compare Viewer Switching Pane f Structure Input Pane f Structure Pane1 f Structure Pane2 f Content Input Pane return f Navigator if I File class equals adapter I Progress Monitor pm new Null Progress Monitor flush changes in any dirty viewer try flush Viewer f Structure Input Pane pm flush Viewer f Structure Pane1 pm flush Viewer f Structure Pane2 pm flush Viewer f Content Input Pane pm catch Core Exception e CompareUI Plugin log e I File files I File get Adapter I File class if files length 0 return files 0 can only return one limitation on IDE save All Editors see 64617 return null return null  getAdapter ICompareNavigator CompareNavigator fNavigator fNavigator CompareNavigator CompareViewerSwitchingPane fStructureInputPane fStructurePane1 fStructurePane2 fContentInputPane fNavigator IFile IProgressMonitor NullProgressMonitor flushViewer fStructureInputPane flushViewer fStructurePane1 flushViewer fStructurePane2 flushViewer fContentInputPane CoreException CompareUIPlugin IFile IFile getAdapter IFile saveAllEditors
see I Editor Input get Image Descriptor public Image Descriptor get Image Descriptor return null  IEditorInput getImageDescriptor ImageDescriptor getImageDescriptor
see I Editor Input get Tool Tip Text public String get Tool Tip Text return get Title  IEditorInput getToolTipText getToolTipText getTitle
see I Editor Input get Name public String get Name return get Title  IEditorInput getName getName getTitle
Returns code null code since this editor cannot be persisted return code null code because this editor cannot be persisted public I Persistable Element get Persistable return null  IPersistableElement getPersistable
Returns code false code to indicate that this input should not appear in the File Most Recently Used menu return code false code public boolean exists return false 
FIXME protected void set Message String message f Message message  setMessage fMessage
FIXME public String get Message return f Message  getMessage fMessage
Returns the title which will be used in the compare editor s title bar It can be set with code set Title code return the title public String get Title if f Title null return Utilities get String Compare Editor Input default Title NON NLS 1 return f Title  setTitle getTitle fTitle getString CompareEditorInput defaultTitle fTitle
Sets the title which will be used when presenting the compare result This method must be called before the editor is opened param title the title to use for the Compare Editor public void set Title String title f Title title  CompareEditor setTitle fTitle
Returns the title image which will be used in the compare editor s title bar Returns the title image which will be used when presenting the compare result This implementation returns a generic compare icon Subclasses can override return the title image or code null code if none public Image get Title Image if fg Title Image null fg Title Image CompareUI Plugin get Image Descriptor COMPARE EDITOR IMAGE NAME create Image CompareUI dispose On Shutdown fg Title Image return fg Title Image  getTitleImage fgTitleImage fgTitleImage CompareUIPlugin getImageDescriptor COMPARE_EDITOR_IMAGE_NAME createImage disposeOnShutdown fgTitleImage fgTitleImage
Returns the configuration object for the viewers within the compare editor Returns the configuration which was passed to the constructor return the compare configuration public Compare Configuration get Compare Configuration return f Compare Configuration  CompareConfiguration getCompareConfiguration fCompareConfiguration
Adds standard actions to the given code Tool Bar Manager code p Subclasses may override to add their own actions p param tool Bar Manager the code Tool Bar Manager code to which to contribute public void contribute To Tool Bar Tool Bar Manager tool Bar Manager tool Bar Manager add new Separator tool Bar Manager add f Ignore Whitespace tool Bar Manager add f Show Pseudo Conflicts  ToolBarManager toolBarManager ToolBarManager contributeToToolBar ToolBarManager toolBarManager toolBarManager toolBarManager fIgnoreWhitespace toolBarManager fShowPseudoConflicts
Runs the compare operation and stores the compare result param monitor the progress monitor to use to display progress and receive requests for cancelation exception Invocation Target Exception if the code prepare Input code method must propagate a checked exception it should wrap it inside an code Invocation Target Exception code runtime exceptions are automatically wrapped in an code Invocation Target Exception code by the calling context exception Interrupted Exception if the operation detects a request to cancel using code I Progress Monitor is Canceled code it should exit by throwing code Interrupted Exception code public void run I Progress Monitor monitor throws Interrupted Exception Invocation Target Exception f Input prepare Input monitor  InvocationTargetException prepareInput InvocationTargetException InvocationTargetException InterruptedException IProgressMonitor isCanceled InterruptedException IProgressMonitor InterruptedException InvocationTargetException fInput prepareInput
Runs the compare operation and returns the compare result If code null code is returned no differences were found and no compare editor needs to be opened Progress should be reported to the given progress monitor A request to cancel the operation should be honored and acknowledged by throwing code Interrupted Exception code p Note this method is typically called in a modal context thread which doesn t have a Display assigned Implementors of this method shouldn t therefore allocated any SWT resources in this method p param monitor the progress monitor to use to display progress and receive requests for cancelation return the result of the compare operation or code null code if there are no differences exception Invocation Target Exception if the code prepare Input code method must propagate a checked exception it should wrap it inside an code Invocation Target Exception code runtime exceptions are automatically wrapped in an code Invocation Target Exception code by the calling context exception Interrupted Exception if the operation detects a request to cancel using code I Progress Monitor is Canceled code it should exit by throwing code Interrupted Exception code protected abstract Object prepare Input I Progress Monitor monitor  InterruptedException InvocationTargetException prepareInput InvocationTargetException InvocationTargetException InterruptedException IProgressMonitor isCanceled InterruptedException prepareInput IProgressMonitor
Returns the compare result computed by the most recent call to the code run code method Returns code null code if no differences were found return the compare result prepared in method code prepare Input code or code null code if there were no differences public Object get Compare Result return f Input  prepareInput getCompareResult fInput
f Content Input Pane new Compare Viewer Switching Pane f Composite SWT BORDER SWT FLAT protected Viewer get Viewer Viewer old Viewer Object input if input instanceof I Compare Input return find Content Viewer old Viewer I Compare Input input this return null  fContentInputPane CompareViewerSwitchingPane fComposite getViewer oldViewer ICompareInput findContentViewer oldViewer ICompareInput
Create the SWT controls that are used to display the result of the compare operation Creates the SWT Controls and sets up the wiring between the individual panes This implementation creates all four panes but makes only the necessary ones visible Finally it feeds the compare result into the top left structure viewer and the content viewer p Subclasses may override if they need to change the layout or wiring between panes param parent the parent control under which the control must be created return the SWT control hierarchy for the compare editor public Control create Contents Composite parent f Composite new Splitter parent SWT VERTICAL f Composite set Data this Control outline null if f Use Outline View outline create Outline Contents f Composite SWT HORIZONTAL f Content Input Pane new Compare Viewer Switching Pane f Composite SWT BORDER SWT FLAT protected Viewer get Viewer Viewer old Viewer Object input if input instanceof I Compare Input return find Content Viewer old Viewer I Compare Input input this return null if f Focus Pane null f Focus Pane f Content Input Pane if outline null f Composite set Visible outline false f Composite set Visible f Content Input Pane true if f Structure Input Pane null f Composite set Weights new int 30 70 f Composite layout if f Structure Input Pane null f Input instanceof I Compare Input f Structure Input Pane set Input f Input I Selection sel f Structure Input Pane get Selection if sel null sel is Empty feed1 sel we only feed downstream viewers if the top left pane is empty f Composite set Data Nav NON NLS 1 new Compare Viewer Switching Pane f Structure Input Pane f Structure Pane1 f Structure Pane2 f Content Input Pane return f Composite  createContents fComposite fComposite setData fUseOutlineView createOutlineContents fComposite fContentInputPane CompareViewerSwitchingPane fComposite getViewer oldViewer ICompareInput findContentViewer oldViewer ICompareInput fFocusPane fFocusPane fContentInputPane fComposite setVisible fComposite setVisible fContentInputPane fStructureInputPane fComposite setWeights fComposite fStructureInputPane fInput ICompareInput fStructureInputPane setInput fInput ISelection fStructureInputPane getSelection isEmpty fComposite setData CompareViewerSwitchingPane fStructureInputPane fStructurePane1 fStructurePane2 fContentInputPane fComposite
f Structure Input Pane new Compare Viewer Switching Pane h SWT BORDER SWT FLAT true protected Viewer get Viewer Viewer old Viewer Object input if input instanceof Diff Node Diff Node dn Diff Node input if dn has Children return create Diff Viewer this if input instanceof I Compare Input return find Structure Viewer old Viewer I Compare Input input this return null  fStructureInputPane CompareViewerSwitchingPane getViewer oldViewer DiffNode DiffNode DiffNode hasChildren createDiffViewer ICompareInput findStructureViewer oldViewer ICompareInput
f Structure Pane1 new Compare Viewer Switching Pane h SWT BORDER SWT FLAT true protected Viewer get Viewer Viewer old Viewer Object input if input instanceof I Compare Input return find Structure Viewer old Viewer I Compare Input input this return null  fStructurePane1 CompareViewerSwitchingPane getViewer oldViewer ICompareInput findStructureViewer oldViewer ICompareInput
f Structure Pane2 new Compare Viewer Switching Pane h SWT BORDER SWT FLAT true protected Viewer get Viewer Viewer old Viewer Object input if input instanceof I Compare Input return find Structure Viewer old Viewer I Compare Input input this return null  fStructurePane2 CompareViewerSwitchingPane getViewer oldViewer ICompareInput findStructureViewer oldViewer ICompareInput
f Structure Input Pane add Open Listener new I Open Listener public void open Open Event oe feed1 oe get Selection  fStructureInputPane addOpenListener IOpenListener OpenEvent getSelection
new I Selection Changed Listener public void selection Changed Selection Changed Event e I Selection s e get Selection if s null s is Empty feed1 s  ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection isEmpty
f Structure Input Pane add Double Click Listener new I Double Click Listener public void double Click Double Click Event event feed Default1 event get Selection  fStructureInputPane addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent feedDefault1 getSelection
f Structure Pane1 add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e feed2 e get Selection  fStructurePane1 addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getSelection
f Structure Pane2 add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e feed3 e get Selection  fStructurePane2 addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getSelection
param parent the parent control under which the control must be created return the SWT control hierarchy for the outline part of the compare editor since 3 0 public Control create Outline Contents Composite parent int direction final Splitter h new Splitter parent direction f Structure Input Pane new Compare Viewer Switching Pane h SWT BORDER SWT FLAT true protected Viewer get Viewer Viewer old Viewer Object input if input instanceof Diff Node Diff Node dn Diff Node input if dn has Children return create Diff Viewer this if input instanceof I Compare Input return find Structure Viewer old Viewer I Compare Input input this return null f Focus Pane f Structure Input Pane f Structure Pane1 new Compare Viewer Switching Pane h SWT BORDER SWT FLAT true protected Viewer get Viewer Viewer old Viewer Object input if input instanceof I Compare Input return find Structure Viewer old Viewer I Compare Input input this return null h set Visible f Structure Pane1 false f Structure Pane2 new Compare Viewer Switching Pane h SWT BORDER SWT FLAT true protected Viewer get Viewer Viewer old Viewer Object input if input instanceof I Compare Input return find Structure Viewer old Viewer I Compare Input input this return null h set Visible f Structure Pane2 false setup the wiring for top left pane f Structure Input Pane add Open Listener new I Open Listener public void open Open Event oe feed1 oe get Selection f Structure Input Pane add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e I Selection s e get Selection if s null s is Empty feed1 s f Structure Input Pane add Double Click Listener new I Double Click Listener public void double Click Double Click Event event feed Default1 event get Selection f Structure Pane1 add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e feed2 e get Selection f Structure Pane2 add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e feed3 e get Selection if f Use Outline View if f Input instanceof I Compare Input f Structure Input Pane set Input f Input I Selection sel f Structure Input Pane get Selection if sel null sel is Empty feed1 sel we only feed downstream viewers if the top left pane is empty f Composite set Data Nav NON NLS 1 new Compare Viewer Switching Pane f Structure Input Pane f Structure Pane1 f Structure Pane2 f Content Input Pane return h  createOutlineContents fStructureInputPane CompareViewerSwitchingPane getViewer oldViewer DiffNode DiffNode DiffNode hasChildren createDiffViewer ICompareInput findStructureViewer oldViewer ICompareInput fFocusPane fStructureInputPane fStructurePane1 CompareViewerSwitchingPane getViewer oldViewer ICompareInput findStructureViewer oldViewer ICompareInput setVisible fStructurePane1 fStructurePane2 CompareViewerSwitchingPane getViewer oldViewer ICompareInput findStructureViewer oldViewer ICompareInput setVisible fStructurePane2 fStructureInputPane addOpenListener IOpenListener OpenEvent getSelection fStructureInputPane addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection isEmpty fStructureInputPane addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent feedDefault1 getSelection fStructurePane1 addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getSelection fStructurePane2 addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getSelection fUseOutlineView fInput ICompareInput fStructureInputPane setInput fInput ISelection fStructureInputPane getSelection isEmpty fComposite setData CompareViewerSwitchingPane fStructureInputPane fStructurePane1 fStructurePane2 fContentInputPane
new Runnable public void run if selection null selection is Empty Object input f Structure Input Pane get Input f Content Input Pane set Input input f Structure Pane2 set Input null clear downstream pane f Structure Pane1 set Input null else Object input get Element selection f Content Input Pane set Input input if structure Compare On Single Click f Structure Pane1 set Input input f Structure Pane2 set Input null clear downstream pane if f Structure Pane1 get Input input f Structure Pane1 set Input null  isEmpty fStructureInputPane getInput fContentInputPane setInput fStructurePane2 setInput fStructurePane1 setInput getElement fContentInputPane setInput structureCompareOnSingleClick fStructurePane1 setInput fStructurePane2 setInput fStructurePane1 getInput fStructurePane1 setInput
private void feed1 final I Selection selection Busy Indicator show While f Composite get Display new Runnable public void run if selection null selection is Empty Object input f Structure Input Pane get Input f Content Input Pane set Input input f Structure Pane2 set Input null clear downstream pane f Structure Pane1 set Input null else Object input get Element selection f Content Input Pane set Input input if structure Compare On Single Click f Structure Pane1 set Input input f Structure Pane2 set Input null clear downstream pane if f Structure Pane1 get Input input f Structure Pane1 set Input null  ISelection BusyIndicator showWhile fComposite getDisplay isEmpty fStructureInputPane getInput fContentInputPane setInput fStructurePane2 setInput fStructurePane1 setInput getElement fContentInputPane setInput structureCompareOnSingleClick fStructurePane1 setInput fStructurePane2 setInput fStructurePane1 getInput fStructurePane1 setInput
Busy Indicator show While f Composite get Display new Runnable public void run if selection is Empty f Structure Pane1 set Input get Element selection  BusyIndicator showWhile fComposite getDisplay isEmpty fStructurePane1 setInput getElement
private void feed Default1 final I Selection selection Busy Indicator show While f Composite get Display new Runnable public void run if selection is Empty f Structure Pane1 set Input get Element selection  feedDefault1 ISelection BusyIndicator showWhile fComposite getDisplay isEmpty fStructurePane1 setInput getElement
new Runnable public void run if selection is Empty Object input f Structure Pane1 get Input f Content Input Pane set Input input f Structure Pane2 set Input null else Object input get Element selection f Content Input Pane set Input input f Structure Pane2 set Input input  isEmpty fStructurePane1 getInput fContentInputPane setInput fStructurePane2 setInput getElement fContentInputPane setInput fStructurePane2 setInput
private void feed2 final I Selection selection Busy Indicator show While f Composite get Display new Runnable public void run if selection is Empty Object input f Structure Pane1 get Input f Content Input Pane set Input input f Structure Pane2 set Input null else Object input get Element selection f Content Input Pane set Input input f Structure Pane2 set Input input  ISelection BusyIndicator showWhile fComposite getDisplay isEmpty fStructurePane1 getInput fContentInputPane setInput fStructurePane2 setInput getElement fContentInputPane setInput fStructurePane2 setInput
new Runnable public void run if selection is Empty f Content Input Pane set Input f Structure Pane2 get Input else f Content Input Pane set Input get Element selection  isEmpty fContentInputPane setInput fStructurePane2 getInput fContentInputPane setInput getElement
private void feed3 final I Selection selection Busy Indicator show While f Composite get Display new Runnable public void run if selection is Empty f Content Input Pane set Input f Structure Pane2 get Input else f Content Input Pane set Input get Element selection  ISelection BusyIndicator showWhile fComposite getDisplay isEmpty fContentInputPane setInput fStructurePane2 getInput fContentInputPane setInput getElement
Returns the first element of the given selection if the selection is a code I Structured Selection code with exactly one element Returns code null code otherwise param selection the selection return the first element of the selection or code null code private static Object get Element I Selection selection if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection if ss size 1 return ss get First Element return null  IStructuredSelection getElement ISelection IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement
Asks this input to take focus within its container editor p Clients should not call this method but they may override if they implement a different layout with different visual components Clients are free to call the inherited method p public void set Focus if f Focus Pane null Viewer v f Focus Pane get Viewer if v null Control c v get Control if c null c set Focus else if f Composite null f Composite set Focus  setFocus fFocusPane fFocusPane getViewer getControl setFocus fComposite fComposite setFocus
Factory method for creating a differences viewer for the top left pane It is called from code create Contents code and returns a code Diff Tree Viewer code p Subclasses may override if they need a different viewer p param parent the SWT parent control under which to create the viewer s SWT controls return a compare viewer for the top left pane public Viewer create Diff Viewer Composite parent return new Diff Tree Viewer parent f Compare Configuration  createContents DiffTreeViewer createDiffViewer DiffTreeViewer fCompareConfiguration
Implements the dynamic viewer switching for structure viewers The method must return a compare viewer based on the old or current viewer and a new input object If the old viewer is suitable for showing the new input the old viewer can be returned Otherwise a new viewer must be created under the given parent composite or code null code can be returned to indicate that no viewer could be found p This implementation forwards the request to code CompareUI find Structure Viewer code p Subclasses may override to implement a different strategy p return a compare viewer which is suitable for the given input object or code null code public Viewer find Structure Viewer Viewer old Viewer I Compare Input input Composite parent return CompareUI find Structure Viewer old Viewer input parent f Compare Configuration  findStructureViewer findStructureViewer oldViewer ICompareInput findStructureViewer oldViewer fCompareConfiguration
c add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dsp remove Property Change Listener f Dirty State Listener  addDisposeListener DisposeListener widgetDisposed DisposeEvent removePropertyChangeListener fDirtyStateListener
Implements the dynamic viewer switching for content viewers The method must return a compare viewer based on the old or current viewer and a new input object If the old viewer is suitable for showing the new input the old viewer can be returned Otherwise a new viewer must be created under the given parent composite or code null code can be returned to indicate that no viewer could be found p This implementation forwards the request to code CompareUI find Content Viewer code p Subclasses may override to implement a different strategy p return a compare viewer which is suitable for the given input object or code null code public Viewer find Content Viewer Viewer old Viewer I Compare Input input Composite parent Viewer new Viewer CompareUI find Content Viewer old Viewer input parent f Compare Configuration boolean is New Viewer new Viewer old Viewer if DEBUG System out println Compare Editor Input find Content Viewer is New Viewer NON NLS 1 if is New Viewer new Viewer instanceof I Property Change Notifier final I Property Change Notifier dsp I Property Change Notifier new Viewer dsp add Property Change Listener f Dirty State Listener Control c new Viewer get Control c add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dsp remove Property Change Listener f Dirty State Listener return new Viewer  findContentViewer findContentViewer oldViewer ICompareInput newViewer findContentViewer oldViewer fCompareConfiguration isNewViewer newViewer oldViewer CompareEditorInput findContentViewer isNewViewer isNewViewer newViewer IPropertyChangeNotifier IPropertyChangeNotifier IPropertyChangeNotifier newViewer addPropertyChangeListener fDirtyStateListener newViewer getControl addDisposeListener DisposeListener widgetDisposed DisposeEvent removePropertyChangeListener fDirtyStateListener newViewer
Returns code true code if there are unsaved changes The value returned is the value of the code DIRTY STATE code property of this input object Returns code true code if this input has unsaved changes that is if code set Dirty true code has been called Subclasses don t have to override if the functionality provided by doce set Dirty code is sufficient return code true code if there are changes that need to be saved public boolean is Save Needed return f Dirty f Dirty Viewers size 0  DIRTY_STATE setDirty setDirty isSaveNeeded fDirty fDirtyViewers
Sets the dirty state of this input to the given value and sends out a code Property Change Event code if the new value differs from the old value param dirty the dirty state for this compare input public void set Dirty boolean dirty boolean confirm Save true Object o f Compare Configuration get Property Compare Editor CONFIRM SAVE PROPERTY if o instanceof Boolean confirm Save Boolean o boolean Value if confirm Save f Dirty dirty if f Dirty f Dirty Viewers clear  PropertyChangeEvent setDirty confirmSave fCompareConfiguration getProperty CompareEditor CONFIRM_SAVE_PROPERTY confirmSave booleanValue confirmSave fDirty fDirty fDirtyViewers
private void set Dirty Object source boolean dirty Assert is Not Null source boolean old Dirty f Dirty Viewers size 0 if dirty f Dirty Viewers add source else f Dirty Viewers remove source boolean new Dirty f Dirty f Dirty Viewers size 0 if DEBUG System out println set Dirty source dirty new Dirty NON NLS 1 NON NLS 2 NON NLS 3 if old Dirty new Dirty Utilities fire Property Change f Listener List this DIRTY STATE new Boolean old Dirty new Boolean new Dirty  setDirty isNotNull oldDirty fDirtyViewers fDirtyViewers fDirtyViewers newDirty fDirty fDirtyViewers setDirty newDirty oldDirty newDirty firePropertyChange fListenerList DIRTY_STATE oldDirty newDirty
see I Property Change Notifier add Listener public void add Property Change Listener I Property Change Listener listener if listener null f Listener List add listener  IPropertyChangeNotifier addListener addPropertyChangeListener IPropertyChangeListener fListenerList
see I Property Change Notifier remove Listener public void remove Property Change Listener I Property Change Listener listener if listener null f Listener List remove listener  IPropertyChangeNotifier removeListener removePropertyChangeListener IPropertyChangeListener fListenerList
Save any unsaved changes Empty implementation Subclasses must override to save any changes param pm an code I Progress Monitor code that the implementation of save may use to show progress deprecated Override method save Changes instead public void save I Progress Monitor pm  IProgressMonitor saveChanges IProgressMonitor
Save any unsaved changes Subclasses must override to save any changes This implementation tries to flush changes in all viewers by calling code I Savable save code on them param pm an code I Progress Monitor code that the implementation of save may use to show progress since 2 0 public void save Changes I Progress Monitor pm throws Core Exception flush changes in any dirty viewer flush Viewer f Structure Input Pane pm flush Viewer f Structure Pane1 pm flush Viewer f Structure Pane2 pm flush Viewer f Content Input Pane pm save pm  ISavable IProgressMonitor saveChanges IProgressMonitor CoreException flushViewer fStructureInputPane flushViewer fStructurePane1 flushViewer fStructurePane2 flushViewer fContentInputPane
private static void flush Viewer Compare Viewer Switching Pane pane I Progress Monitor pm throws Core Exception if pane null Viewer v pane get Viewer if v instanceof I Savable I Savable v save pm  flushViewer CompareViewerSwitchingPane IProgressMonitor CoreException getViewer ISavable ISavable

public static final String COMPARE VIEWER TITLE org eclipse compare CompareUI Compare Viewer Title NON NLS 1 private CompareUI  COMPARE_VIEWER_TITLE CompareViewerTitle
public static AbstractUI Plugin get Plugin return CompareUI Plugin get Default  AbstractUIPlugin getPlugin CompareUIPlugin getDefault
Returns this plug in s resource bundle return the plugin s resource bundle public static Resource Bundle get Resource Bundle return CompareUI Plugin get Default get Resource Bundle  ResourceBundle getResourceBundle CompareUIPlugin getDefault getResourceBundle
Performs the comparison described by the given input and opens a compare editor on the result in the currently active workbench page param input the input on which to open the compare editor public static void open Compare Editor Compare Editor Input input open Compare Editor On Page input null  openCompareEditor CompareEditorInput openCompareEditorOnPage
Performs the comparison described by the given input and opens a compare editor on the result in the given workbench page param input the input on which to open the compare editor param page the workbench page in which to open the compare editor since 2 1 public static void open Compare Editor On Page Compare Editor Input input I Workbench Page page CompareUI Plugin plugin CompareUI Plugin get Default if plugin null plugin open Compare Editor input page null  openCompareEditorOnPage CompareEditorInput IWorkbenchPage CompareUIPlugin CompareUIPlugin getDefault openCompareEditor
Performs the comparison described by the given input and shows the result in the given editor param input the input on which to open the compare editor param editor the compare editor to reuse or null to create a new one since 3 0 public static void reuse Compare Editor Compare Editor Input input I Reusable Editor editor CompareUI Plugin plugin CompareUI Plugin get Default if plugin null plugin open Compare Editor input null editor  reuseCompareEditor CompareEditorInput IReusableEditor CompareUIPlugin CompareUIPlugin getDefault openCompareEditor
Performs the comparison described by the given input and opens a modal compare dialog on the result param input the input on which to open the compare dialog public static void open Compare Dialog Compare Editor Input input CompareUI Plugin plugin CompareUI Plugin get Default if plugin null plugin open Compare Dialog input  openCompareDialog CompareEditorInput CompareUIPlugin CompareUIPlugin getDefault openCompareDialog
Registers an image descriptor for the given type param type the type param descriptor the image descriptor public static void register Image Descriptor String type Image Descriptor descriptor CompareUI Plugin register Image Descriptor type descriptor  registerImageDescriptor ImageDescriptor CompareUIPlugin registerImageDescriptor
Returns a shared image for the given type or a generic image if none has been registered for the given type p Note Images returned from this method will be automatically disposed of when this plug in shuts down Callers must not dispose of these images themselves p param type the type return the image public static Image get Image String type return CompareUI Plugin get Image type  getImage CompareUIPlugin getImage
Registers the given image for being disposed when this plug in is shutdown param image the image to register for disposal public static void dispose On Shutdown Image image CompareUI Plugin dispose On Shutdown image  disposeOnShutdown CompareUIPlugin disposeOnShutdown
Returns a shared image for the given adaptable This convenience method queries the given adaptable for its code I Workbench Adapter get Image Descriptor code which it uses to create an image if it does not already have one p Note Images returned from this method will be automatically disposed of when this plug in shuts down Callers must not dispose of these images themselves p param adaptable the adaptable for which to find an image return an image public static Image get Image I Adaptable adaptable return CompareUI Plugin get Image adaptable  IWorkbenchAdapter getImageDescriptor getImage IAdaptable CompareUIPlugin getImage
Creates a stream merger for the given content type If no stream merger is registered for the given content type code null code is returned param type the type for which to find a stream merger return a stream merger for the given type or code null code if no stream merger has been registered public static I Stream Merger create Stream Merger I Content Type type return CompareUI Plugin get Default create Stream Merger type  IStreamMerger createStreamMerger IContentType CompareUIPlugin getDefault createStreamMerger
Creates a stream merger for the given file extension If no stream merger is registered for the file extension code null code is returned param type the type for which to find a stream merger return a stream merger for the given type or code null code if no stream merger has been registered public static I Stream Merger create Stream Merger String type return CompareUI Plugin get Default create Stream Merger type  IStreamMerger createStreamMerger CompareUIPlugin getDefault createStreamMerger
Returns a structure compare viewer based on an old viewer and an input object If the old viewer is suitable for showing the input the old viewer is returned Otherwise the input s type is used to find a viewer descriptor in the registry which in turn is used to create a structure compare viewer under the given parent composite If no viewer descriptor can be found code null code is returned param old Viewer a new viewer is only created if this old viewer cannot show the given input param input the input object for which to find a structure viewer param parent the SWT parent composite under which the new viewer is created param configuration a configuration which is passed to a newly created viewer return the compare viewer which is suitable for the given input object or code null code public static Viewer find Structure Viewer Viewer old Viewer I Compare Input input Composite parent Compare Configuration configuration return CompareUI Plugin get Default find Structure Viewer old Viewer input parent configuration  oldViewer findStructureViewer oldViewer ICompareInput CompareConfiguration CompareUIPlugin getDefault findStructureViewer oldViewer
Returns a content compare viewer based on an old viewer and an input object If the old viewer is suitable for showing the input the old viewer is returned Otherwise the input s type is used to find a viewer descriptor in the registry which in turn is used to create a content compare viewer under the given parent composite If no viewer descriptor can be found code null code is returned param old Viewer a new viewer is only created if this old viewer cannot show the given input param input the input object for which to find a content viewer param parent the SWT parent composite under which the new viewer is created param configuration a configuration which is passed to a newly created viewer return the compare viewer which is suitable for the given input object or code null code public static Viewer find Content Viewer Viewer old Viewer I Compare Input input Composite parent Compare Configuration configuration return CompareUI Plugin get Default find Content Viewer old Viewer input parent configuration  oldViewer findContentViewer oldViewer ICompareInput CompareConfiguration CompareUIPlugin getDefault findContentViewer oldViewer
Returns a content compare viewer based on an old viewer and an input object If the old viewer is suitable for showing the input the old viewer is returned Otherwise the input s type is used to find a viewer descriptor in the registry which in turn is used to create a content compare viewer under the given parent composite In order to determine the input s type the input must either implement I Stream Content Accessor and I Typed Element or I Compare Input If no viewer descriptor can be found code null code is returned param old Viewer a new viewer is only created if this old viewer cannot show the given input param input the input object for which to find a content viewer Must implement either code I Stream Content Accessor code and code I Typed Element code or code I Compare Input code param parent the SWT parent composite under which the new viewer is created param configuration a configuration which is passed to a newly created viewer return the compare viewer which is suitable for the given input object or code null code public static Viewer find Content Viewer Viewer old Viewer Object input Composite parent Compare Configuration configuration return CompareUI Plugin get Default find Content Viewer old Viewer input parent configuration  IStreamContentAccessor ITypedElement ICompareInput oldViewer IStreamContentAccessor ITypedElement ICompareInput findContentViewer oldViewer CompareConfiguration CompareUIPlugin getDefault findContentViewer oldViewer
Adds an alias for the given type Subsequent calls to code find Structure Viewer code treat alias as a synonym for type and return the same viewer p Note this method is for internal use only Clients should not call this method param type a type name for which a viewer has been registered param alias a type name which should be treated as a synonym of type since 2 0 public static void add Structure Viewer Alias String type String alias CompareUI Plugin get Default add Structure Viewer Alias type alias  findStructureViewer addStructureViewerAlias CompareUIPlugin getDefault addStructureViewerAlias
Remove all aliases for the given type This method does not affect the initial binding between type and viewer If no aliases exist for the given type this method does nothing p Note this method is for internal use only Clients should not call this method param type the type name for which all synonymes are removed since 2 0 public static void remove All Structure Viewer Aliases String type CompareUI Plugin get Default remove All Structure Viewer Aliases type  removeAllStructureViewerAliases CompareUIPlugin getDefault removeAllStructureViewerAliases

C Label label new C Label this SWT NONE public Point compute Size int w Hint int h Hint boolean changed return super compute Size w Hint Math max 24 h Hint changed  CLabel CLabel computeSize wHint hHint computeSize wHint hHint
Mouse Adapter ml new Mouse Adapter public void mouse Double Click Mouse Event e Control content get Content if content null content get Bounds contains e x e y return Control parent get Parent if parent instanceof Splitter Splitter parent set Maximized Control Compare Viewer Pane this  MouseAdapter MouseAdapter mouseDoubleClick MouseEvent getContent getBounds getParent setMaximizedControl CompareViewerPane
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance param container a widget which will be the container of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul public Compare Viewer Pane Composite container int style super container style margin Width 0 margin Height 0 C Label label new C Label this SWT NONE public Point compute Size int w Hint int h Hint boolean changed return super compute Size w Hint Math max 24 h Hint changed set Top Left label Mouse Adapter ml new Mouse Adapter public void mouse Double Click Mouse Event e Control content get Content if content null content get Bounds contains e x e y return Control parent get Parent if parent instanceof Splitter Splitter parent set Maximized Control Compare Viewer Pane this add Mouse Listener ml label add Mouse Listener ml  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS CompareViewerPane marginWidth marginHeight CLabel CLabel computeSize wHint hHint computeSize wHint hHint setTopLeft MouseAdapter MouseAdapter mouseDoubleClick MouseEvent getContent getBounds getParent setMaximizedControl CompareViewerPane addMouseListener addMouseListener
Set the pane s title text The value code null code clears it param label the text to be displayed in the pane or null public void set Text String label C Label cl C Label get Top Left cl set Text label  setText CLabel CLabel getTopLeft setText
Set the pane s title Image The value code null code clears it param image the image to be displayed in the pane or null public void set Image Image image C Label cl C Label get Top Left cl set Image image  setImage CLabel CLabel getTopLeft setImage
Returns a code Tool Bar Manager code if the given parent is a code Compare Viewer Pane code or code null code otherwise param parent a code Composite code or code null code return a code Tool Bar Manager code if the given parent is a code Compare Viewer Pane code otherwise code null code public static Tool Bar Manager get Tool Bar Manager Composite parent if parent instanceof Compare Viewer Pane Compare Viewer Pane pane Compare Viewer Pane parent return pane get Tool Bar Manager return null  ToolBarManager CompareViewerPane ToolBarManager CompareViewerPane ToolBarManager getToolBarManager CompareViewerPane CompareViewerPane CompareViewerPane getToolBarManager
Clears tool items in the code Compare Viewer Pane code s control bar param parent a code Composite code or code null code public static void clear Tool Bar Composite parent Tool Bar Manager tbm get Tool Bar Manager parent if tbm null tbm remove All tbm update true  CompareViewerPane clearToolBar ToolBarManager getToolBarManager removeAll
private Tool Bar Manager get Tool Bar Manager if f Tool Bar Manager null Tool Bar tb new Tool Bar this SWT FLAT set Top Center tb f Tool Bar Manager new Tool Bar Manager tb return f Tool Bar Manager  ToolBarManager getToolBarManager fToolBarManager ToolBar ToolBar setTopCenter fToolBarManager ToolBarManager fToolBarManager

private I Open Listener f Open Handler new I Open Listener public void open Open Event event Object listeners f Open Listener get Listeners for int i 0 i listeners length i I Open Listener listeners i open event  IOpenListener fOpenHandler IOpenListener OpenEvent fOpenListener getListeners IOpenListener
Creates a code Compare Viewer Switching Pane code as a child of the given parent and with the specified SWT style bits param parent a widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul public Compare Viewer Switching Pane Composite parent int style this parent style false  CompareViewerSwitchingPane IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS CompareViewerSwitchingPane
new Dispose Listener public void widget Disposed Dispose Event e if f Viewer instanceof I Selection Provider I Selection Provider f Viewer remove Selection Changed Listener Compare Viewer Switching Pane this if f Viewer instanceof Structured Viewer Structured Viewer sv Structured Viewer f Viewer sv remove Double Click Listener Compare Viewer Switching Pane this sv remove Open Listener f Open Handler f Viewer null f Input null f Selection Listeners null  DisposeListener widgetDisposed DisposeEvent fViewer ISelectionProvider ISelectionProvider fViewer removeSelectionChangedListener CompareViewerSwitchingPane fViewer StructuredViewer StructuredViewer StructuredViewer fViewer removeDoubleClickListener CompareViewerSwitchingPane removeOpenListener fOpenHandler fViewer fInput fSelectionListeners
Creates a code Compare Viewer Switching Pane code as a child of the given parent and with the specified SWT style bits param parent a widget which will be the parent of the new instance cannot be null param style the style of widget to construct param visibility the initial visibility of the Compare Viewer Switching Pane exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul public Compare Viewer Switching Pane Composite parent int style boolean visibility super parent style f Control Visibility visibility set Viewer new Null Viewer this add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Viewer instanceof I Selection Provider I Selection Provider f Viewer remove Selection Changed Listener Compare Viewer Switching Pane this if f Viewer instanceof Structured Viewer Structured Viewer sv Structured Viewer f Viewer sv remove Double Click Listener Compare Viewer Switching Pane this sv remove Open Listener f Open Handler f Viewer null f Input null f Selection Listeners null  CompareViewerSwitchingPane CompareViewerSwitchingPane IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS CompareViewerSwitchingPane fControlVisibility setViewer NullViewer addDisposeListener DisposeListener widgetDisposed DisposeEvent fViewer ISelectionProvider ISelectionProvider fViewer removeSelectionChangedListener CompareViewerSwitchingPane fViewer StructuredViewer StructuredViewer StructuredViewer fViewer removeDoubleClickListener CompareViewerSwitchingPane removeOpenListener fOpenHandler fViewer fInput fSelectionListeners
Returns the current viewer return the current viewer public Viewer get Viewer return f Viewer  getViewer fViewer
private void set Viewer Viewer new Viewer if new Viewer f Viewer return boolean old Empty is Empty if f Viewer null if f Viewer instanceof I Selection Provider I Selection Provider f Viewer remove Selection Changed Listener this if f Viewer instanceof Structured Viewer Structured Viewer sv Structured Viewer f Viewer sv remove Double Click Listener this sv remove Open Listener f Open Handler Control content get Content set Content null f Viewer set Input null if content null content is Disposed content dispose else old Empty false set Content null f Viewer new Viewer if f Viewer null we have to remember and restore the old visibility of the Custom Pane since set Content changes the visibility boolean old get Visible set Content f Viewer get Control set Visible old restore old visibility boolean new Empty is Empty if f Viewer instanceof I Selection Provider I Selection Provider f Viewer add Selection Changed Listener this if f Viewer instanceof Structured Viewer Structured Viewer sv Structured Viewer f Viewer sv add Double Click Listener this sv add Open Listener f Open Handler if old Empty new Empty relayout my container Composite parent get Parent if parent instanceof Splitter Splitter parent set Visible this f Control Visibility new Empty true layout true  setViewer newViewer newViewer fViewer oldEmpty isEmpty fViewer fViewer ISelectionProvider ISelectionProvider fViewer removeSelectionChangedListener fViewer StructuredViewer StructuredViewer StructuredViewer fViewer removeDoubleClickListener removeOpenListener fOpenHandler getContent setContent fViewer setInput isDisposed oldEmpty setContent fViewer newViewer fViewer CustomPane setContent getVisible setContent fViewer getControl setVisible newEmpty isEmpty fViewer ISelectionProvider ISelectionProvider fViewer addSelectionChangedListener fViewer StructuredViewer StructuredViewer StructuredViewer fViewer addDoubleClickListener addOpenListener fOpenHandler oldEmpty newEmpty getParent setVisible fControlVisibility newEmpty
Returns the optional title argument that has been set with code set Titel Argument code or code null code if no optional title argument has been set p Note this method is for internal use only Clients should not call this method return the optional title argument or code null code public String get Title Argument return f Title Argument  setTitelArgument getTitleArgument fTitleArgument
Returns code true code if no viewer is installed or if the current viewer is a code Null Viewer code return code true code if no viewer is installed or if the current viewer is a code Null Viewer code public boolean is Empty return f Viewer null f Viewer instanceof Null Viewer  NullViewer NullViewer isEmpty fViewer fViewer NullViewer
public void add Selection Changed Listener I Selection Changed Listener l f Selection Listeners add l  addSelectionChangedListener ISelectionChangedListener fSelectionListeners
public void remove Selection Changed Listener I Selection Changed Listener l f Selection Listeners remove l  removeSelectionChangedListener ISelectionChangedListener fSelectionListeners
public void add Double Click Listener I Double Click Listener l f Double Click Listener add l  addDoubleClickListener IDoubleClickListener fDoubleClickListener
public void remove Double Click Listener I Double Click Listener l f Double Click Listener remove l  removeDoubleClickListener IDoubleClickListener fDoubleClickListener
public void add Open Listener I Open Listener l f Open Listener add l  addOpenListener IOpenListener fOpenListener
public void remove Open Listener I Open Listener l f Open Listener remove l  removeOpenListener IOpenListener fOpenListener
public void double Click Double Click Event event Object listeners f Double Click Listener get Listeners for int i 0 i listeners length i I Double Click Listener listeners i double Click event  doubleClick DoubleClickEvent fDoubleClickListener getListeners IDoubleClickListener doubleClick
public I Selection get Selection if f Viewer instanceof I Selection Provider return I Selection Provider f Viewer get Selection return null  ISelection getSelection fViewer ISelectionProvider ISelectionProvider fViewer getSelection
public void set Selection I Selection s if f Viewer instanceof I Selection Provider I Selection Provider f Viewer set Selection s  setSelection ISelection fViewer ISelectionProvider ISelectionProvider fViewer setSelection
public void selection Changed Selection Changed Event ev Object listeners f Selection Listeners get Listeners for int i 0 i listeners length i I Selection Changed Listener listeners i selection Changed ev  selectionChanged SelectionChangedEvent fSelectionListeners getListeners ISelectionChangedListener selectionChanged
private boolean has Focus2 do we have focus Display display get Display if display null for Control focus display get Focus Control focus null focus focus get Parent if focus this return true return false  hasFocus2 getDisplay getFocusControl getParent
Sets the input object of this pane For this input object a suitable viewer is determined by calling the abstract method code get Viewer Viewer Object code If the returned viewer differs from the current one the old viewer is disposed and the new one installed Then the input object is fed into the newly installed viewer by calling its code set Input Object code method If new and old viewer don t differ no new viewer is installed but just code set Input Object code is called If the input is code null code the pane is cleared that is the current viewer is disposed param input the new input object or code null code public void set Input Object input if f Input input return boolean had Focus has Focus2 f Input input viewer switching Viewer new Viewer null if input null new Viewer get Viewer f Viewer input if new Viewer null if f Viewer instanceof Null Viewer return new Viewer new Null Viewer this set Viewer new Viewer set input f Viewer set Input input Image image null if f Viewer instanceof Null Viewer input instanceof I Compare Input image I Compare Input input get Image set Image image String title null if f Viewer null Control c f Viewer get Control if c null Object data c get Data CompareUI COMPARE VIEWER TITLE if data instanceof String title String data if had Focus c set Focus f Title title update Title  getViewer setInput setInput setInput fInput hadFocus hasFocus2 fInput newViewer newViewer getViewer fViewer newViewer fViewer NullViewer newViewer NullViewer setViewer newViewer fViewer setInput fViewer NullViewer ICompareInput ICompareInput getImage setImage fViewer fViewer getControl getData COMPARE_VIEWER_TITLE hadFocus setFocus fTitle updateTitle
Sets an additional and optional argument for the pane s title Note this method is for internal use only Clients should not call this method param argument an optional argument for the pane s title public void set Title Argument String argument f Title Argument argument update Title  setTitleArgument fTitleArgument updateTitle
private void update Title if f Title null if f Title Argument null String format Compare Messages get String Compare Viewer Switching Pane Titleformat NON NLS 1 String t Message Format format format new String f Title f Title Argument set Text t else set Text f Title else set Text NON NLS 1  updateTitle fTitle fTitleArgument CompareMessages getString CompareViewerSwitchingPane MessageFormat fTitle fTitleArgument setText setText fTitle setText
Returns the current input of this pane or null if the pane has no input return an code Object code that is the input to this pane or null if the pane has no input public Object get Input return f Input  getInput fInput
Returns a viewer which is able to display the given input If no viewer can be found code null code is returned The additional argument old Viewer represents the viewer currently installed in the pane or code null code if no viewer is installed It can be returned from this method if the current viewer can deal with the input and no new viewer must be created param old Viewer the currently installed viewer or code null code param input the input object for which a viewer must be determined or code null code return a viewer for the given input or code null code if no viewer can be determined  oldViewer oldViewer

class Save Action extends Merge Viewer Action Save Action boolean left super true false false Utilities init Action this get Resource Bundle action save NON NLS 1  SaveAction MergeViewerAction SaveAction initAction getResourceBundle
public void run save Content get Input  saveContent getInput
private class Content Merge Viewer Layout extends Layout public Point compute Size Composite c int w int h boolean force return new Point 100 100  ContentMergeViewerLayout computeSize
public void layout Composite composite boolean force determine some derived sizes int header Height f Left Label compute Size SWT DEFAULT SWT DEFAULT true y Rectangle r composite get Client Area int center Width get Center Width int width1 int r width center Width fH Split int width2 r width width1 center Width int height1 0 int height2 0 if f Ancestor Enabled f Show Ancestor height1 int r height 2 header Height fV Split height2 r height 2 header Height height1 else height1 0 height2 r height header Height int y 0 if f Ancestor Enabled f Show Ancestor f Ancestor Label set Bounds 0 y r width header Height f Ancestor Label set Visible true y header Height handle Resize Ancestor 0 y r width height1 y height1 else f Ancestor Label set Visible false handle Resize Ancestor 0 0 0 0 f Left Label get Size without this resizing would not always work if center Width 3 f Left Label set Bounds 0 y width1 1 header Height f Direction Label set Visible true f Direction Label set Bounds width1 1 y center Width 1 header Height f Right Label set Bounds width1 center Width y width2 header Height else f Left Label set Bounds 0 y width1 header Height f Direction Label set Visible false f Right Label set Bounds width1 y r width width1 header Height y header Height if f Center null f Center is Disposed f Center set Bounds width1 y center Width height2 handle Resize Left Right 0 y width1 center Width width2 height2  headerHeight fLeftLabel computeSize getClientArea centerWidth getCenterWidth centerWidth fHSplit centerWidth fAncestorEnabled fShowAncestor headerHeight fVSplit headerHeight headerHeight fAncestorEnabled fShowAncestor fAncestorLabel setBounds headerHeight fAncestorLabel setVisible headerHeight handleResizeAncestor fAncestorLabel setVisible handleResizeAncestor fLeftLabel getSize centerWidth fLeftLabel setBounds headerHeight fDirectionLabel setVisible fDirectionLabel setBounds centerWidth headerHeight fRightLabel setBounds centerWidth headerHeight fLeftLabel setBounds headerHeight fDirectionLabel setVisible fRightLabel setBounds headerHeight headerHeight fCenter fCenter isDisposed fCenter setBounds centerWidth handleResizeLeftRight centerWidth
public Resizer Control c int dir f Direction dir f Control c f Live Resize f Control instanceof Sash update Cursor c dir f Control add Mouse Listener this f Control add Mouse Move Listener this f Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e f Control null  fDirection fControl fLiveResize fControl updateCursor fControl addMouseListener fControl addMouseMoveListener fControl addDisposeListener DisposeListener widgetDisposed DisposeEvent fControl
public void mouse Double Click Mouse Event e if f Direction HORIZONTAL 0 fH Split HSPLIT if f Direction VERTICAL 0 fV Split VSPLIT f Composite layout true  mouseDoubleClick MouseEvent fDirection fHSplit fDirection fVSplit fComposite
public void mouse Down Mouse Event e Composite parent f Control get Parent Point s parent get Size Point as f Ancestor Label get Size Point ys f Left Label get Size Point ms f Right Label get Size f Width1 ys x f Width2 ms x f Height1 f Left Label get Location y as y f Height2 s y f Left Label get Location y ys y fX e x fY e y f Is Down true  mouseDown MouseEvent fControl getParent getSize fAncestorLabel getSize fLeftLabel getSize fRightLabel getSize fWidth1 fWidth2 fHeight1 fLeftLabel getLocation fHeight2 fLeftLabel getLocation fIsDown
public void mouse Up Mouse Event e f Is Down false if f Live Resize resize e  mouseUp MouseEvent fIsDown fLiveResize
public void mouse Move Mouse Event e if f Is Down f Live Resize resize e  mouseMove MouseEvent fIsDown fLiveResize
private void resize Mouse Event e int dx e x fX int dy e y fY int center Width f Center get Size x if f Width1 dx center Width f Width2 dx center Width f Width1 dx f Width2 dx if f Direction HORIZONTAL 0 fH Split double f Width1 double f Width1 f Width2 if f Height1 dy center Width f Height2 dy center Width f Height1 dy f Height2 dy if f Direction VERTICAL 0 fV Split double f Height1 double f Height1 f Height2 f Composite layout true f Control get Display update  MouseEvent centerWidth fCenter getSize fWidth1 centerWidth fWidth2 centerWidth fWidth1 fWidth2 fDirection fHSplit fWidth1 fWidth1 fWidth2 fHeight1 centerWidth fHeight2 centerWidth fHeight1 fHeight2 fDirection fVSplit fHeight1 fHeight1 fHeight2 fComposite fControl getDisplay
f Compare Input Change Listener new I Compare Input Change Listener public void compare Input Changed I Compare Input input Content Merge Viewer this internal Refresh input  fCompareInputChangeListener ICompareInputChangeListener compareInputChanged ICompareInput ContentMergeViewer internalRefresh
if f Compare Configuration null f Property Change Listener new I Property Change Listener public void property Change Property Change Event event Content Merge Viewer this property Change event  fCompareConfiguration fPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent ContentMergeViewer propertyChange
Creates a new content merge viewer and initializes with a resource bundle and a configuration param bundle the resource bundle param cc the configuration object protected Content Merge Viewer int style Resource Bundle bundle Compare Configuration cc f Styles style f Bundle bundle f Ancestor Enabled Utilities get Boolean cc ANCESTOR ENABLED f Ancestor Enabled f Confirm Save Utilities get Boolean cc Compare Editor CONFIRM SAVE PROPERTY f Confirm Save set Content Provider new Merge Viewer Content Provider cc f Compare Input Change Listener new I Compare Input Change Listener public void compare Input Changed I Compare Input input Content Merge Viewer this internal Refresh input f Compare Configuration cc if f Compare Configuration null f Property Change Listener new I Property Change Listener public void property Change Property Change Event event Content Merge Viewer this property Change event f Compare Configuration add Property Change Listener f Property Change Listener f Left Save Action new Save Action true f Left Save Action set Enabled false f Right Save Action new Save Action false f Right Save Action set Enabled false  ContentMergeViewer ResourceBundle CompareConfiguration fStyles fBundle fAncestorEnabled getBoolean ANCESTOR_ENABLED fAncestorEnabled fConfirmSave getBoolean CompareEditor CONFIRM_SAVE_PROPERTY fConfirmSave setContentProvider MergeViewerContentProvider fCompareInputChangeListener ICompareInputChangeListener compareInputChanged ICompareInput ContentMergeViewer internalRefresh fCompareConfiguration fCompareConfiguration fPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent ContentMergeViewer propertyChange fCompareConfiguration addPropertyChangeListener fPropertyChangeListener fLeftSaveAction SaveAction fLeftSaveAction setEnabled fRightSaveAction SaveAction fRightSaveAction setEnabled
Returns the viewer s name return the viewer s name public String get Title return Utilities get String get Resource Bundle title NON NLS 1  getTitle getString getResourceBundle
Creates the SWT controls for the ancestor left and right content areas of this compare viewer Implementations typically hold onto the controls so that they can be initialized with the input objects in method code update Content code param composite the container for the three areas  updateContent
Lays out the ancestor area of the compare viewer It is called whenever the viewer is resized or when the sashes between the areas are moved to adjust the size of the areas param x the horizontal position of the ancestor area within its container param y the vertical position of the ancestor area within its container param width the width of the ancestor area param height the height of the ancestor area 
Lays out the left and right areas of the compare viewer It is called whenever the viewer is resized or when the sashes between the areas are moved to adjust the size of the areas param x the horizontal position of the left area within its container param y the vertical position of the left and right area within its container param left Width the width of the left area param center Width the width of the gap between the left and right areas param right Width the width of the right area param height the height of the left and right areas abstract protected void handle Resize Left Right int x int y int left Width int center Width  leftWidth centerWidth rightWidth handleResizeLeftRight leftWidth centerWidth
Contributes items to the given code Tool Bar Manager code It is called when this viewer is installed in its container and if the container has a code Tool Bar Manager code The code Content Merge Viewer code implementation of this method does nothing Subclasses may reimplement param tool Bar Manager the toolbar manager to contribute to protected void create Tool Items Tool Bar Manager tool Bar Manager  ToolBarManager ToolBarManager ContentMergeViewer toolBarManager createToolItems ToolBarManager toolBarManager
Initializes the controls of the three content areas with the given input objects param ancestor the input for the ancestor area param left the input for the left area param right the input for the right area 
Copies the content of one side to the other side Called from the internal actions for copying the sides of the viewer s input object param left To Right if code true code the left side is copied to the right side if code false code the right side is copied to the left side  leftToRight
Returns the byte contents of the left or right side If the viewer has no editable content code null code can be returned param left if code true code the byte contents of the left area is returned if code false code the byte contents of the right area return the content as an array of bytes or code null code 
Returns the resource bundle of this viewer return the resource bundle protected Resource Bundle get Resource Bundle return f Bundle  ResourceBundle getResourceBundle fBundle
Returns the compare configuration of this viewer or code null code if this viewer does not yet have a configuration return the compare configuration or code null code if none protected Compare Configuration get Compare Configuration return f Compare Configuration  CompareConfiguration getCompareConfiguration fCompareConfiguration
The code Content Merge Viewer code implementation of this code Content Viewer code method checks to ensure that the content provider is an code I Merge Viewer Content Provider code public void set Content Provider I Content Provider content Provider Assert is True content Provider instanceof I Merge Viewer Content Provider super set Content Provider content Provider  ContentMergeViewer ContentViewer IMergeViewerContentProvider setContentProvider IContentProvider contentProvider isTrue contentProvider IMergeViewerContentProvider setContentProvider contentProvider
package I Merge Viewer Content Provider get Merge Content Provider return I Merge Viewer Content Provider get Content Provider  IMergeViewerContentProvider getMergeContentProvider IMergeViewerContentProvider getContentProvider
public I Selection get Selection return new I Selection public boolean is Empty return true  ISelection getSelection ISelection isEmpty
The code Content Merge Viewer code implementation of this code Viewer code method returns the empty selection Subclasses may override public I Selection get Selection return new I Selection public boolean is Empty return true  ContentMergeViewer ISelection getSelection ISelection isEmpty
The code Content Merge Viewer code implementation of this code Viewer code method does nothing Subclasses may reimplement public void set Selection I Selection s boolean reveal  ContentMergeViewer setSelection ISelection
package void property Change Property Change Event event String key event get Property if key equals ANCESTOR ENABLED f Ancestor Enabled Utilities get Boolean get Compare Configuration ANCESTOR ENABLED f Ancestor Enabled f Composite layout true update Cursor f Left Label VERTICAL update Cursor f Direction Label HORIZONTAL VERTICAL update Cursor f Right Label VERTICAL return  propertyChange PropertyChangeEvent getProperty ANCESTOR_ENABLED fAncestorEnabled getBoolean getCompareConfiguration ANCESTOR_ENABLED fAncestorEnabled fComposite updateCursor fLeftLabel updateCursor fDirectionLabel updateCursor fRightLabel
void update Cursor Control c int dir if c instanceof Sash Cursor cursor null switch dir case VERTICAL if f Ancestor Enabled if fV Sash Cursor null fV Sash Cursor new Cursor c get Display SWT CURSOR SIZENS cursor fV Sash Cursor else if f Normal Cursor null f Normal Cursor new Cursor c get Display SWT CURSOR ARROW cursor f Normal Cursor break case HORIZONTAL if fH Sash Cursor null fH Sash Cursor new Cursor c get Display SWT CURSOR SIZEWE cursor fH Sash Cursor break case VERTICAL HORIZONTAL if f Ancestor Enabled if fHV Sash Cursor null fHV Sash Cursor new Cursor c get Display SWT CURSOR SIZEALL cursor fHV Sash Cursor else if fH Sash Cursor null fH Sash Cursor new Cursor c get Display SWT CURSOR SIZEWE cursor fH Sash Cursor break if cursor null c set Cursor cursor  updateCursor fAncestorEnabled fVSashCursor fVSashCursor getDisplay CURSOR_SIZENS fVSashCursor fNormalCursor fNormalCursor getDisplay CURSOR_ARROW fNormalCursor fHSashCursor fHSashCursor getDisplay CURSOR_SIZEWE fHSashCursor fAncestorEnabled fHVSashCursor fHVSashCursor getDisplay CURSOR_SIZEALL fHVSashCursor fHSashCursor fHSashCursor getDisplay CURSOR_SIZEWE fHSashCursor setCursor
void set Ancestor Visibility boolean visible boolean enabled if f Ancestor Item null Action action Action f Ancestor Item get Action if action null action set Checked visible action set Enabled enabled if f Compare Configuration null f Compare Configuration set Property ANCESTOR ENABLED new Boolean visible  setAncestorVisibility fAncestorItem fAncestorItem getAction setChecked setEnabled fCompareConfiguration fCompareConfiguration setProperty ANCESTOR_ENABLED
input package boolean is Three Way return f Is Three Way  isThreeWay fIsThreeWay
Internal hook method called when the input to this viewer is initially set or subsequently changed p The code Content Merge Viewer code implementation of this code Viewer code method tries to save the old input by calling code do Save code and then calls code internal Refresh code param input the new input of this viewer or code null code if there is no new input param old Input the old input element or code null code if there was previously no input protected final void input Changed Object input Object old Input if input old Input if old Input instanceof I Compare Input I Compare Input old Input remove Compare Input Change Listener f Compare Input Change Listener boolean success do Save input old Input if input old Input if input instanceof I Compare Input I Compare Input input add Compare Input Change Listener f Compare Input Change Listener if success set Left Dirty false set Right Dirty false if input old Input internal Refresh input  ContentMergeViewer doSave internalRefresh oldInput inputChanged oldInput oldInput oldInput ICompareInput ICompareInput oldInput removeCompareInputChangeListener fCompareInputChangeListener doSave oldInput oldInput ICompareInput ICompareInput addCompareInputChangeListener fCompareInputChangeListener setLeftDirty setRightDirty oldInput internalRefresh
This method is called from the code Viewer code method code input Changed code to save any unsaved changes of the old input p The code Content Merge Viewer code implementation of this method calls code save Content code If confirmation has been turned on with code set Confirm Save true code a confirmation alert is posted before saving p Clients can override this method and are free to decide whether they want to call the inherited method param new Input the new input of this viewer or code null code if there is no new input param old Input the old input element or code null code if there was previously no input return code true code if saving was successful or if the user didn t want to save by pressing NO in the confirmation dialog since 2 0 protected boolean do Save Object new Input Object old Input before setting the new input we have to save the old if f Left Save Action is Enabled f Right Save Action is Enabled post alert if f Confirm Save Shell shell f Composite get Shell Message Dialog dialog new Message Dialog shell Utilities get String get Resource Bundle save Dialog title NON NLS 1 null accept the default window icon Utilities get String get Resource Bundle save Dialog message NON NLS 1 Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL 0 default button index switch dialog open open returns index of pressed button case 0 save Content old Input break case 1 set Left Dirty false set Right Dirty false break case 2 throw new Viewer Switching Cancelled else save Content old Input return true return false  inputChanged ContentMergeViewer saveContent setConfirmSave newInput oldInput doSave newInput oldInput fLeftSaveAction isEnabled fRightSaveAction isEnabled fConfirmSave fComposite getShell MessageDialog MessageDialog getString getResourceBundle saveDialog getString getResourceBundle saveDialog MessageDialog IDialogConstants YES_LABEL IDialogConstants NO_LABEL saveContent oldInput setLeftDirty setRightDirty ViewerSwitchingCancelled saveContent oldInput
Controls whether code do Save Object Object code asks for confirmation before saving the old input with code save Content Object code param enable a value of code true code enables confirmation since 2 0 public void set Confirm Save boolean enable f Confirm Save enable  doSave saveContent setConfirmSave fConfirmSave
see Viewer refresh public void refresh internal Refresh get Input  internalRefresh getInput
private void internal Refresh Object input I Merge Viewer Content Provider content get Merge Content Provider if content null Object ancestor content get Ancestor Content input if input instanceof I Compare Input f Is Three Way I Compare Input input get Kind Differencer DIRECTION MASK 0 else f Is Three Way ancestor null if f Ancestor Item null f Ancestor Item set Visible f Is Three Way boolean old Flag f Show Ancestor f Show Ancestor f Is Three Way content show Ancestor input if f Ancestor Enabled old Flag f Show Ancestor f Composite layout true Tool Bar Manager tbm Compare Viewer Pane get Tool Bar Manager f Composite get Parent if tbm null update Tool Items tbm update true tbm get Control get Parent layout true update Header Object left content get Left Content input Object right content get Right Content input update Content ancestor left right  internalRefresh IMergeViewerContentProvider getMergeContentProvider getAncestorContent ICompareInput fIsThreeWay ICompareInput getKind DIRECTION_MASK fIsThreeWay fAncestorItem fAncestorItem setVisible fIsThreeWay oldFlag fShowAncestor fShowAncestor fIsThreeWay showAncestor fAncestorEnabled oldFlag fShowAncestor fComposite ToolBarManager CompareViewerPane getToolBarManager fComposite getParent updateToolItems getControl getParent updateHeader getLeftContent getRightContent updateContent
Builds the SWT controls for the three areas of a compare merge viewer p Calls the hooks code create Controls code and code create Tool Items code to let subclasses build the specific content areas and to add items to an enclosing toolbar p This method must only be called in the constructor of subclasses param parent the parent control return the new control protected final Control build Control Composite parent f Composite new Composite parent f Styles public boolean set Focus return internal Set Focus f Composite set Data CompareUI COMPARE VIEWER TITLE get Title hook Control f Composite hook help dispose listener f Composite set Layout new Content Merge Viewer Layout int style SWT SHADOW OUT f Ancestor Label new C Label f Composite style f Left Label new C Label f Composite style new Resizer f Left Label VERTICAL f Direction Label new C Label f Composite style f Direction Label set Alignment SWT CENTER new Resizer f Direction Label HORIZONTAL VERTICAL f Right Label new C Label f Composite style new Resizer f Right Label VERTICAL if f Center null f Center is Disposed f Center create Center f Composite create Controls f Composite I Workbench Part Site ps Utilities find Site f Composite f Key Binding Service ps null ps get Key Binding Service null Tool Bar Manager tbm Compare Viewer Pane get Tool Bar Manager parent if tbm null tbm remove All define groups tbm add new Separator modes NON NLS 1 tbm add new Separator merge NON NLS 1 tbm add new Separator navigation NON NLS 1 Compare Configuration cc get Compare Configuration if cc is Right Editable f Copy Left To Right Action new Action public void run copy true Utilities init Action f Copy Left To Right Action get Resource Bundle action Copy Left To Right NON NLS 1 tbm append To Group merge f Copy Left To Right Action NON NLS 1 Utilities register Action f Key Binding Service f Copy Left To Right Action org eclipse compare copy All Left To Right NON NLS 1 if cc is Left Editable f Copy Right To Left Action new Action public void run copy false Utilities init Action f Copy Right To Left Action get Resource Bundle action Copy Right To Left NON NLS 1 tbm append To Group merge f Copy Right To Left Action NON NLS 1 Utilities register Action f Key Binding Service f Copy Right To Left Action org eclipse compare copy All Right To Left NON NLS 1 Action a new Change Property Action f Bundle f Compare Configuration action Enable Ancestor ANCESTOR ENABLED NON NLS 1 a set Checked f Ancestor Enabled f Ancestor Item new Action Contribution Item a f Ancestor Item set Visible false tbm append To Group modes f Ancestor Item NON NLS 1 create Tool Items tbm update Tool Items tbm update true return f Composite  createControls createToolItems buildControl fComposite fStyles setFocus internalSetFocus fComposite setData COMPARE_VIEWER_TITLE getTitle hookControl fComposite fComposite setLayout ContentMergeViewerLayout SHADOW_OUT fAncestorLabel CLabel fComposite fLeftLabel CLabel fComposite fLeftLabel fDirectionLabel CLabel fComposite fDirectionLabel setAlignment fDirectionLabel fRightLabel CLabel fComposite fRightLabel fCenter fCenter isDisposed fCenter createCenter fComposite createControls fComposite IWorkbenchPartSite findSite fComposite fKeyBindingService getKeyBindingService ToolBarManager CompareViewerPane getToolBarManager removeAll CompareConfiguration getCompareConfiguration isRightEditable fCopyLeftToRightAction initAction fCopyLeftToRightAction getResourceBundle CopyLeftToRight appendToGroup fCopyLeftToRightAction registerAction fKeyBindingService fCopyLeftToRightAction copyAllLeftToRight isLeftEditable fCopyRightToLeftAction initAction fCopyRightToLeftAction getResourceBundle CopyRightToLeft appendToGroup fCopyRightToLeftAction registerAction fKeyBindingService fCopyRightToLeftAction copyAllRightToLeft ChangePropertyAction fBundle fCompareConfiguration EnableAncestor ANCESTOR_ENABLED setChecked fAncestorEnabled fAncestorItem ActionContributionItem fAncestorItem setVisible appendToGroup fAncestorItem createToolItems updateToolItems fComposite
package boolean internal Set Focus return false  internalSetFocus
package int get Center Width return 3  getCenterWidth
package boolean get Ancestor Enabled return f Ancestor Enabled  getAncestorEnabled fAncestorEnabled
package Control create Center Composite parent Sash sash new Sash parent SWT VERTICAL new Resizer sash HORIZONTAL return sash  createCenter
package Control get Center return f Center  getCenter fCenter
see Viewer get Control public Control get Control return f Composite  getControl getControl fComposite
Called on the viewer disposal Unregisters from the compare configuration Clients may extend if they have to do additional cleanup protected void handle Dispose Dispose Event event if f Key Binding Service null if f Copy Left To Right Action null f Key Binding Service unregister Action f Copy Left To Right Action if f Copy Right To Left Action null f Key Binding Service unregister Action f Copy Right To Left Action f Key Binding Service null Object input get Input if input instanceof I Compare Input I Compare Input input remove Compare Input Change Listener f Compare Input Change Listener if f Compare Configuration null f Property Change Listener null f Compare Configuration remove Property Change Listener f Property Change Listener f Property Change Listener null f Ancestor Label null f Left Label null f Direction Label null f Right Label null f Center null if f Right Arrow null f Right Arrow dispose f Right Arrow null if f Left Arrow null f Left Arrow dispose f Left Arrow null if f Both Arrow null f Both Arrow dispose f Both Arrow null if f Normal Cursor null f Normal Cursor dispose f Normal Cursor null if fH Sash Cursor null fH Sash Cursor dispose fH Sash Cursor null if fV Sash Cursor null fV Sash Cursor dispose fV Sash Cursor null if fHV Sash Cursor null fHV Sash Cursor dispose fHV Sash Cursor null super handle Dispose event  handleDispose DisposeEvent fKeyBindingService fCopyLeftToRightAction fKeyBindingService unregisterAction fCopyLeftToRightAction fCopyRightToLeftAction fKeyBindingService unregisterAction fCopyRightToLeftAction fKeyBindingService getInput ICompareInput ICompareInput removeCompareInputChangeListener fCompareInputChangeListener fCompareConfiguration fPropertyChangeListener fCompareConfiguration removePropertyChangeListener fPropertyChangeListener fPropertyChangeListener fAncestorLabel fLeftLabel fDirectionLabel fRightLabel fCenter fRightArrow fRightArrow fRightArrow fLeftArrow fLeftArrow fLeftArrow fBothArrow fBothArrow fBothArrow fNormalCursor fNormalCursor fNormalCursor fHSashCursor fHSashCursor fHSashCursor fVSashCursor fVSashCursor fVSashCursor fHVSashCursor fHVSashCursor fHVSashCursor handleDispose
Updates the enabled state of the toolbar items p This method is called whenever the state of the items needs updating p Subclasses may extend this method although this is generally not required protected void update Tool Items I Merge Viewer Content Provider content get Merge Content Provider Object input get Input if f Copy Left To Right Action null boolean enable content is Right Editable input if enable input instanceof I Compare Input I Typed Element e I Compare Input input get Left if e null enable false f Copy Left To Right Action set Enabled enable if f Copy Right To Left Action null boolean enable content is Left Editable input if enable input instanceof I Compare Input I Typed Element e I Compare Input input get Right if e null enable false f Copy Right To Left Action set Enabled enable  updateToolItems IMergeViewerContentProvider getMergeContentProvider getInput fCopyLeftToRightAction isRightEditable ICompareInput ITypedElement ICompareInput getLeft fCopyLeftToRightAction setEnabled fCopyRightToLeftAction isLeftEditable ICompareInput ITypedElement ICompareInput getRight fCopyRightToLeftAction setEnabled
Updates the headers of the three areas by querying the content provider for a name and image for the three sides of the input object p This method is called whenever the header must be updated p Subclasses may extend this method although this is generally not required protected void update Header I Merge Viewer Content Provider content get Merge Content Provider Object input get Input if f Ancestor Label null f Ancestor Label set Image content get Ancestor Image input f Ancestor Label set Text content get Ancestor Label input if f Left Label null f Left Label set Image content get Left Image input f Left Label set Text content get Left Label input if f Right Label null f Right Label set Image content get Right Image input f Right Label set Text content get Right Label input  updateHeader IMergeViewerContentProvider getMergeContentProvider getInput fAncestorLabel fAncestorLabel setImage getAncestorImage fAncestorLabel setText getAncestorLabel fLeftLabel fLeftLabel setImage getLeftImage fLeftLabel setText getLeftLabel fRightLabel fRightLabel setImage getRightImage fRightLabel setText getRightLabel
Calculates the height of the header package int get Header Height int header Height f Left Label compute Size SWT DEFAULT SWT DEFAULT true y header Height Math max header Height f Direction Label compute Size SWT DEFAULT SWT DEFAULT true y return header Height  getHeaderHeight headerHeight fLeftLabel computeSize headerHeight headerHeight fDirectionLabel computeSize headerHeight
Returns true if both sides are editable package boolean can Toggle Merge Direction I Merge Viewer Content Provider content get Merge Content Provider Object input get Input return content is Left Editable input content is Right Editable input  canToggleMergeDirection IMergeViewerContentProvider getMergeContentProvider getInput isLeftEditable isRightEditable
public void add Property Change Listener I Property Change Listener listener if f Listener List null f Listener List new Listener List f Listener List add listener  addPropertyChangeListener IPropertyChangeListener fListenerList fListenerList ListenerList fListenerList
public void remove Property Change Listener I Property Change Listener listener if f Listener List null f Listener List remove listener if f Listener List is Empty f Listener List null  removePropertyChangeListener IPropertyChangeListener fListenerList fListenerList fListenerList isEmpty fListenerList
package void fire Dirty State boolean state Utilities fire Property Change f Listener List this Compare Editor Input DIRTY STATE null new Boolean state  fireDirtyState firePropertyChange fListenerList CompareEditorInput DIRTY_STATE
Sets the dirty state of the left side of this viewer If the new value differs from the old all registered listener are notified with a code Property Change Event code with the property name code Compare Editor Input DIRTY STATE code param dirty the state of the left side dirty flag protected void set Left Dirty boolean dirty if f Left Save Action is Enabled dirty f Left Save Action set Enabled dirty fire Dirty State dirty  PropertyChangeEvent CompareEditorInput DIRTY_STATE setLeftDirty fLeftSaveAction isEnabled fLeftSaveAction setEnabled fireDirtyState
Sets the dirty state of the right side of this viewer If the new value differs from the old all registered listener are notified with a code Property Change Event code with the property name code Compare Editor Input DIRTY STATE code param dirty the state of the right side dirty flag protected void set Right Dirty boolean dirty if f Right Save Action is Enabled dirty f Right Save Action set Enabled dirty fire Dirty State dirty  PropertyChangeEvent CompareEditorInput DIRTY_STATE setRightDirty fRightSaveAction isEnabled fRightSaveAction setEnabled fireDirtyState
Save the viewers s content Note this method is for internal use only Clients should not call this method since 2 0 public void save I Progress Monitor pm throws Core Exception save Content get Input  IProgressMonitor CoreException saveContent getInput
Save modified content back to input elements via the content provider package void save Content Object old Input write back modified contents I Merge Viewer Content Provider content I Merge Viewer Content Provider get Content Provider boolean left Empty content get Left Content old Input null boolean right Empty content get Right Content old Input null if f Compare Configuration is Left Editable f Left Save Action is Enabled byte bytes get Contents true if left Empty bytes null bytes length 0 bytes null set Left Dirty false content save Left Content old Input bytes if f Compare Configuration is Right Editable f Right Save Action is Enabled byte bytes get Contents false if right Empty bytes null bytes length 0 bytes null set Right Dirty false content save Right Content old Input bytes  saveContent oldInput IMergeViewerContentProvider IMergeViewerContentProvider getContentProvider leftEmpty getLeftContent oldInput rightEmpty getRightContent oldInput fCompareConfiguration isLeftEditable fLeftSaveAction isEnabled getContents leftEmpty setLeftDirty saveLeftContent oldInput fCompareConfiguration isRightEditable fRightSaveAction isEnabled getContents rightEmpty setRightDirty saveRightContent oldInput

Returns the underlying document return the underlying document 
Returns a position that specifies a subrange in the underlying document or code null code if this document range spans the whole underlying document return a position that specifies a subrange in the underlying document or code null code 

Returns the label for the ancestor side of a code Content Merge Viewer code param input the input object of the code Content Merge Viewer code return the label for the ancestor side of a code Content Merge Viewer code  ContentMergeViewer ContentMergeViewer ContentMergeViewer
Returns an optional image for the ancestor side of a code Content Merge Viewer code param input the input object of the code Content Merge Viewer code return the image for the ancestor side of a code Content Merge Viewer code or code null code if none  ContentMergeViewer ContentMergeViewer ContentMergeViewer
Returns the contents for the ancestor side of a code Content Merge Viewer code The interpretation of the returned object depends on the concrete code Content Merge Viewer code param input the input object of the code Content Merge Viewer code return the content for the ancestor side of a code Content Merge Viewer code or code null code if none  ContentMergeViewer ContentMergeViewer ContentMergeViewer ContentMergeViewer
Returns whether the ancestor side of the given input element should be shown return code true code if the ancestor side of the given input element should be shown 
Returns the label for the left side of a code Content Merge Viewer code param input the input object of the code Content Merge Viewer code return the label for the left side of a code Content Merge Viewer code  ContentMergeViewer ContentMergeViewer ContentMergeViewer
Returns an optional image for the left side of a code Content Merge Viewer code param input the input object of the code Content Merge Viewer code return the image for the left side of a code Content Merge Viewer code or code null code if none  ContentMergeViewer ContentMergeViewer ContentMergeViewer
Returns the contents for the left side of a code Content Merge Viewer code The interpretation of the returned object depends on the concrete code Content Merge Viewer code param input the input object of the code Content Merge Viewer code return the content for the left side of a code Content Merge Viewer code or code null code if none  ContentMergeViewer ContentMergeViewer ContentMergeViewer ContentMergeViewer
Returns whether the left side is editable param input the input object of the code Content Merge Viewer code return code true code if the left side of a code Content Merge Viewer code is editable  ContentMergeViewer ContentMergeViewer
Saves new contents for the left side of the code Content Merge Viewer code param input the input object of the code Content Merge Viewer code param bytes the new contents to save for the left side  ContentMergeViewer ContentMergeViewer
Returns the label for the right side of a code Content Merge Viewer code param input the input object of the code Content Merge Viewer code return the label for the right side of a code Content Merge Viewer code  ContentMergeViewer ContentMergeViewer ContentMergeViewer
Returns an optional image for the right side of a code Content Merge Viewer code param input the input object of the code Content Merge Viewer code return the image for the right side of a code Content Merge Viewer code or code null code if none  ContentMergeViewer ContentMergeViewer ContentMergeViewer
Returns the contents for the right side of a code Content Merge Viewer code The interpretation of the returned object depends on the concrete code Content Merge Viewer code param input the input object of the code Content Merge Viewer code return the content for the right side of a code Content Merge Viewer code or code null code if none  ContentMergeViewer ContentMergeViewer ContentMergeViewer ContentMergeViewer
Returns whether the right side is editable param input the input object of the code Content Merge Viewer code return code true code if the right side of a code Content Merge Viewer code is editable  ContentMergeViewer ContentMergeViewer
Saves new contents for the right side of the code Content Merge Viewer code param input the input object of the code Content Merge Viewer code param bytes the new contents to save for the right side  ContentMergeViewer ContentMergeViewer

Returns the start character position of the token with the given index If the index is out of range but not negative the character position behind the last character the length of the input string is returned param index index of the token for which to return the start position return the start position of the token with the given index throws java lang Index Out Of Bounds Exception if index is negative  IndexOutOfBoundsException
Returns the character length of the token with the given index If the index is out of range but not negative the value 0 is returned param index index of the token for which to return the start position return the character length of the token with the given index throws java lang Index Out Of Bounds Exception if index is negative  IndexOutOfBoundsException

private Color f Separator Color public Header Painter f Separator Color f Summary Header get Display get System Color SWT COLOR WIDGET NORMAL SHADOW  fSeparatorColor HeaderPainter fSeparatorColor fSummaryHeader getDisplay getSystemColor COLOR_WIDGET_NORMAL_SHADOW
Returns true on color change public boolean set Color RGB color RGB old Color f Indicator Color f Indicator Color color if color null return old Color null if old Color null return color equals old Color return true  setColor oldColor fIndicatorColor fIndicatorColor oldColor oldColor oldColor
private void draw Bevel Rect GC gc int x int y int w int h Color top Left Color bottom Right gc set Foreground top Left gc draw Line x y x w 1 y gc draw Line x y x y h 1 gc set Foreground bottom Right gc draw Line x w y x w y h gc draw Line x y h x w y h  drawBevelRect topLeft bottomRight setForeground topLeft drawLine drawLine setForeground bottomRight drawLine drawLine
public void paint Control Paint Event e Point s f Summary Header get Size if f Indicator Color null Display d f Summary Header get Display e gc set Background get Color d f Indicator Color int min Math min s x s y 2 INSET Rectangle r new Rectangle s x min 2 s y min 2 min min e gc fill Rectangle r if d null draw Bevel Rect e gc r x r y r width 1 r height 1 d get System Color SWT COLOR WIDGET NORMAL SHADOW d get System Color SWT COLOR WIDGET HIGHLIGHT SHADOW e gc set Foreground f Separator Color e gc set Line Width 1 e gc draw Line 0 1 s y 1 s x 1 1 s y 1  paintControl PaintEvent fSummaryHeader getSize fIndicatorColor fSummaryHeader getDisplay setBackground getColor fIndicatorColor fillRectangle drawBevelRect getSystemColor COLOR_WIDGET_NORMAL_SHADOW getSystemColor COLOR_WIDGET_HIGHLIGHT_SHADOW setForeground fSeparatorColor setLineWidth drawLine
Creates the position updated protected Child Position Updater String category super category  ChildPositionUpdater
Child document ranges cannot be deleted other then by calling free Child Document protected boolean not Deleted return true  freeChildDocument notDeleted
If an insertion happens at a child document s start offset the position is extended rather than shifted Also if something is added right behind the end of the position the position is extended rather than kept stable protected void adapt To Insert if f Position f Left get Region f Position f Right get Region int my Start f Position offset int my End f Position offset f Position length my End Math max my Start my End int yours Start f Offset int yours End f Offset f Replace Length 1 yours End Math max yours Start yours End if my End yours Start return if my Start yours Start f Position length f Replace Length else f Position offset f Replace Length else super adapt To Insert  adaptToInsert fPosition fLeft getRegion fPosition fRight getRegion myStart fPosition myEnd fPosition fPosition myEnd myStart myEnd yoursStart fOffset yoursEnd fOffset fReplaceLength yoursEnd yoursStart yoursEnd myEnd yoursStart myStart yoursStart fPosition fReplaceLength fPosition fReplaceLength adaptToInsert
Create Diff from two ranges and an optional parent diff Diff Diff parent int dir I Document ancestor Doc Position a Range int ancestor Start int ancestor End I Document left Doc Position l Range int left Start int left End I Document right Doc Position r Range int right Start int right End f Parent parent null parent this f Direction dir f Left Pos create Position left Doc l Range left Start left End f Right Pos create Position right Doc r Range right Start right End if ancestor Doc null f Ancestor Pos create Position ancestor Doc a Range ancestor Start ancestor End  IDocument ancestorDoc aRange ancestorStart ancestorEnd IDocument leftDoc lRange leftStart leftEnd IDocument rightDoc rRange rightStart rightEnd fParent fDirection fLeftPos createPosition leftDoc lRange leftStart leftEnd fRightPos createPosition rightDoc rRange rightStart rightEnd ancestorDoc fAncestorPos createPosition ancestorDoc aRange ancestorStart ancestorEnd
Position get Position char type switch type case A return f Ancestor Pos case L return f Left Pos case R return f Right Pos return null  getPosition fAncestorPos fLeftPos fRightPos
boolean is In Range char type int pos Position p get Position type return pos p offset pos p offset p length  isInRange getPosition
String change Type boolean left Empty f Left Pos length 0 boolean right Empty f Right Pos length 0 if f Direction Range Difference LEFT if left Empty right Empty return Compare Messages get String Text Merge Viewer change Type addition NON NLS 1 if left Empty right Empty return Compare Messages get String Text Merge Viewer change Type deletion NON NLS 1 else if left Empty right Empty return Compare Messages get String Text Merge Viewer change Type addition NON NLS 1 if left Empty right Empty return Compare Messages get String Text Merge Viewer change Type deletion NON NLS 1 return Compare Messages get String Text Merge Viewer change Type change NON NLS 1  changeType leftEmpty fLeftPos rightEmpty fRightPos fDirection RangeDifference leftEmpty rightEmpty CompareMessages getString TextMergeViewer changeType leftEmpty rightEmpty CompareMessages getString TextMergeViewer changeType leftEmpty rightEmpty CompareMessages getString TextMergeViewer changeType leftEmpty rightEmpty CompareMessages getString TextMergeViewer changeType CompareMessages getString TextMergeViewer changeType
Image get Image int code Differencer CHANGE switch f Direction case Range Difference RIGHT code Differencer LEFT break case Range Difference LEFT code Differencer RIGHT break case Range Difference ANCESTOR case Range Difference CONFLICT code Differencer CONFLICTING break if code 0 return get Compare Configuration get Image code return null  getImage fDirection RangeDifference RangeDifference RangeDifference RangeDifference getCompareConfiguration getImage
Position create Position I Document doc Position range int start int end try int l end start if range null int dl range length if l dl l dl else int dl doc get Length if start l dl l dl start Position p null try p new Position start l catch Runtime Exception ex silently ignored try doc add Position I Document Range RANGE CATEGORY p catch Bad Position Category Exception ex silently ignored return p catch Bad Location Exception ee silently ignored return null  createPosition IDocument getLength RuntimeException addPosition IDocumentRange RANGE_CATEGORY BadPositionCategoryException BadLocationException
void add Diff d if f Diffs null f Diffs new Array List f Diffs add d  fDiffs fDiffs ArrayList fDiffs
boolean is Deleted if f Ancestor Pos null f Ancestor Pos is Deleted return true return f Left Pos is Deleted f Right Pos is Deleted  isDeleted fAncestorPos fAncestorPos isDeleted fLeftPos isDeleted fRightPos isDeleted
void set Resolved boolean r f Resolved r if r f Diffs null  setResolved fResolved fDiffs
boolean is Resolved if f Resolved f Diffs null Iterator e f Diffs iterator while e has Next Diff d Diff e next if d is Resolved return false return true return f Resolved  isResolved fResolved fDiffs fDiffs hasNext isResolved fResolved
private boolean is Incoming Or Conflicting switch f Direction case Range Difference RIGHT if f Left Is Local return true break case Range Difference LEFT if f Left Is Local return true break case Range Difference CONFLICT return true return false  isIncomingOrConflicting fDirection RangeDifference fLeftIsLocal RangeDifference fLeftIsLocal RangeDifference
private boolean is Unresolved Incoming Or Conflicting if f Resolved return false return is Incoming Or Conflicting  isUnresolvedIncomingOrConflicting fResolved isIncomingOrConflicting
Position get Position Merge Source Viewer w if w f Left return f Left Pos if w f Right return f Right Pos if w f Ancestor return f Ancestor Pos return null  getPosition MergeSourceViewer fLeft fLeftPos fRight fRightPos fAncestor fAncestorPos
Returns true if given character range overlaps with this Diff boolean overlaps Merge Source Viewer w int start int end Position h get Position w if h null int ds h get Offset int de ds h get Length if start de end ds return true return false  MergeSourceViewer getPosition getOffset getLength
int get Max Diff Height boolean with Ancestor Point region new Point 0 0 int h f Left get Line Range f Left Pos region y if with Ancestor h Math max h f Ancestor get Line Range f Ancestor Pos region y return Math max h f Right get Line Range f Right Pos region y  getMaxDiffHeight withAncestor fLeft getLineRange fLeftPos withAncestor fAncestor getLineRange fAncestorPos fRight getLineRange fRightPos
int get Ancestor Height Point region new Point 0 0 return f Ancestor get Line Range f Ancestor Pos region y  getAncestorHeight fAncestor getLineRange fAncestorPos
int get Left Height Point region new Point 0 0 return f Left get Line Range f Left Pos region y  getLeftHeight fLeft getLineRange fLeftPos
int get Right Height Point region new Point 0 0 return f Right get Line Range f Right Pos region y  getRightHeight fRight getLineRange fRightPos
Creates a text merge viewer under the given parent control param parent the parent control param configuration the configuration object public Text Merge Viewer Composite parent Compare Configuration configuration this parent SWT NULL configuration  TextMergeViewer CompareConfiguration
f Preference Change Listener new I Property Change Listener public void property Change Property Change Event event Text Merge Viewer this property Change event  fPreferenceChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent TextMergeViewer propertyChange
f Document Listener new I Document Listener public void document About To Be Changed Document Event e  fDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent
public void document Changed Document Event e Text Merge Viewer this document Changed e  documentChanged DocumentEvent TextMergeViewer documentChanged
I Navigatable nav new I Navigatable public boolean goto Difference boolean next return navigate next false false  INavigatable INavigatable gotoDifference
Creates a text merge viewer under the given parent control param parent the parent control param style SWT style bits for top level composite of this viewer param configuration the configuration object public Text Merge Viewer Composite parent int style Compare Configuration configuration super style Resource Bundle get Bundle BUNDLE NAME configuration f Symbolic Font Name get Class get Name String platform SWT get Platform f Is Motif motif equals platform NON NLS 1 f Is Carbon carbon equals platform NON NLS 1 if f Is Motif f Margin Width 0 Display display parent get Display f Preference Change Listener new I Property Change Listener public void property Change Property Change Event event Text Merge Viewer this property Change event f Preference Store configuration get Preference Store if f Preference Store null f Preference Store add Property Change Listener f Preference Change Listener check For Color Update display f Left Is Local Utilities get Boolean configuration LEFT IS LOCAL false NON NLS 1 f Synchronized Scrolling f Preference Store get Boolean Compare Preference Page SYNCHRONIZE SCROLLING f Show More Info f Preference Store get Boolean Compare Preference Page SHOW MORE INFO f Show Pseudo Conflicts f Preference Store get Boolean Compare Preference Page SHOW PSEUDO CONFLICTS f Use Splines f Preference Store get Boolean Compare Preference Page USE SPLINES f Use Single Line f Preference Store get Boolean Compare Preference Page USE SINGLE LINE f Use ResolveUI f Preference Store get Boolean Compare Preference Page USE RESOLVE UI f Document Listener new I Document Listener public void document About To Be Changed Document Event e public void document Changed Document Event e Text Merge Viewer this document Changed e build Control parent I Navigatable nav new I Navigatable public boolean goto Difference boolean next return navigate next false false f Composite set Data I Navigatable NAVIGATOR PROPERTY nav f Birds Eye Cursor new Cursor parent get Display SWT CURSOR HAND J Face Resources get Font Registry add Listener f Preference Change Listener J Face Resources get Color Registry add Listener f Preference Change Listener update Font  TextMergeViewer CompareConfiguration ResourceBundle getBundle BUNDLE_NAME fSymbolicFontName getClass getName getPlatform fIsMotif fIsCarbon fIsMotif fMarginWidth getDisplay fPreferenceChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent TextMergeViewer propertyChange fPreferenceStore getPreferenceStore fPreferenceStore fPreferenceStore addPropertyChangeListener fPreferenceChangeListener checkForColorUpdate fLeftIsLocal getBoolean LEFT_IS_LOCAL fSynchronizedScrolling fPreferenceStore getBoolean ComparePreferencePage SYNCHRONIZE_SCROLLING fShowMoreInfo fPreferenceStore getBoolean ComparePreferencePage SHOW_MORE_INFO fShowPseudoConflicts fPreferenceStore getBoolean ComparePreferencePage SHOW_PSEUDO_CONFLICTS fUseSplines fPreferenceStore getBoolean ComparePreferencePage USE_SPLINES fUseSingleLine fPreferenceStore getBoolean ComparePreferencePage USE_SINGLE_LINE fUseResolveUI fPreferenceStore getBoolean ComparePreferencePage USE_RESOLVE_UI fDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent documentChanged DocumentEvent TextMergeViewer documentChanged buildControl INavigatable INavigatable gotoDifference fComposite setData INavigatable NAVIGATOR_PROPERTY fBirdsEyeCursor getDisplay CURSOR_HAND JFaceResources getFontRegistry addListener fPreferenceChangeListener JFaceResources getColorRegistry addListener fPreferenceChangeListener updateFont
private void update Font Font f J Face Resources get Font f Symbolic Font Name if f null if f Ancestor null f Ancestor set Font f if f Left null f Left set Font f if f Right null f Right set Font f  updateFont JFaceResources getFont fSymbolicFontName fAncestor fAncestor setFont fLeft fLeft setFont fRight fRight setFont
private void check For Color Update Display display if f Poll System Foreground RGB fg display get System Color SWT COLOR LIST FOREGROUND getRGB if f Foreground null fg equals f Foreground f Foreground fg update Colors display if f Poll System Background RGB bg display get System Color SWT COLOR LIST BACKGROUND getRGB if f Background null bg equals f Background f Background bg update Colors display  checkForColorUpdate fPollSystemForeground getSystemColor COLOR_LIST_FOREGROUND fForeground fForeground fForeground updateColors fPollSystemBackground getSystemColor COLOR_LIST_BACKGROUND fBackground fBackground fBackground updateColors
Sets the viewer s background color to the given RGB value If the value is code null code the system s default background color is used param background the background color or code null code to use the system s default background color since 2 0 public void set Background Color RGB background f Poll System Background background null f Background background update Colors null  setBackgroundColor fPollSystemBackground fBackground updateColors
private RGB get Background Display display if f Background null return f Background if display null display f Composite get Display return display get System Color SWT COLOR LIST BACKGROUND getRGB  getBackground fBackground fBackground fComposite getDisplay getSystemColor COLOR_LIST_BACKGROUND
Sets the viewer s foreground color to the given RGB value If the value is code null code the system s default foreground color is used param foreground the foreground color or code null code to use the system s default foreground color since 2 0 public void set Foreground Color RGB foreground f Poll System Foreground foreground null f Foreground foreground update Colors null  setForegroundColor fPollSystemForeground fForeground updateColors
private RGB get Foreground Display display if f Foreground null return f Foreground if display null display f Composite get Display return display get System Color SWT COLOR LIST FOREGROUND getRGB  getForeground fForeground fForeground fComposite getDisplay getSystemColor COLOR_LIST_FOREGROUND
private void update Colors Display display if display null display f Composite get Display Color color null if f Background null color get Color display f Background if f Ancestor null f Ancestor set Background Color color if f Left null f Left set Background Color color if f Right null f Right set Background Color color Color Registry registry J Face Resources get Color Registry RGB bg get Background display SELECTED INCOMING registry getRGB INCOMING COLOR if SELECTED INCOMING null SELECTED INCOMING new RGB 0 0 255 BLUE INCOMING interpolate SELECTED INCOMING bg 0 6 INCOMING FILL interpolate SELECTED INCOMING bg 0 97 SELECTED OUTGOING registry getRGB OUTGOING COLOR if SELECTED OUTGOING null SELECTED OUTGOING new RGB 0 0 0 BLACK OUTGOING interpolate SELECTED OUTGOING bg 0 6 OUTGOING FILL interpolate SELECTED OUTGOING bg 0 97 SELECTED CONFLICT registry getRGB CONFLICTING COLOR if SELECTED CONFLICT null SELECTED CONFLICT new RGB 255 0 0 RED CONFLICT interpolate SELECTED CONFLICT bg 0 6 CONFLICT FILL interpolate SELECTED CONFLICT bg 0 97 RESOLVED registry getRGB RESOLVED COLOR if RESOLVED null RESOLVED new RGB 0 255 0 GREEN refresh Birds Eye View invalidate Lines update All Diff Backgrounds display  updateColors fComposite getDisplay fBackground getColor fBackground fAncestor fAncestor setBackgroundColor fLeft fLeft setBackgroundColor fRight fRight setBackgroundColor ColorRegistry JFaceResources getColorRegistry getBackground SELECTED_INCOMING INCOMING_COLOR SELECTED_INCOMING SELECTED_INCOMING SELECTED_INCOMING INCOMING_FILL SELECTED_INCOMING SELECTED_OUTGOING OUTGOING_COLOR SELECTED_OUTGOING SELECTED_OUTGOING SELECTED_OUTGOING OUTGOING_FILL SELECTED_OUTGOING SELECTED_CONFLICT CONFLICTING_COLOR SELECTED_CONFLICT SELECTED_CONFLICT SELECTED_CONFLICT CONFLICT_FILL SELECTED_CONFLICT RESOLVED_COLOR refreshBirdsEyeView invalidateLines updateAllDiffBackgrounds
Invalidates the current presentation by invalidating the three text viewers since 2 0 public void invalidate Text Presentation if f Ancestor null f Ancestor invalidate Text Presentation if f Left null f Left invalidate Text Presentation if f Right null f Right invalidate Text Presentation  invalidateTextPresentation fAncestor fAncestor invalidateTextPresentation fLeft fLeft invalidateTextPresentation fRight fRight invalidateTextPresentation
Configures the passed text viewer This method is called after the three text viewers have been created for the content areas The code Text Merge Viewer code implementation of this method does nothing Subclasses may reimplement to provide a specific configuration for the text viewer param text Viewer the text viewer to configure protected void configure Text Viewer Text Viewer text Viewer  TextMergeViewer textViewer configureTextViewer TextViewer textViewer
Creates an code I Token Comparator code which is used to show the intra line differences The code Text Merge Viewer code implementation of this method returns a tokenizer that breaks a line into words separated by whitespace Subclasses may reimplement to provide a specific tokenizer return a I Token Comparator which is used for a second level token compare protected I Token Comparator create Token Comparator String s return new Token Comparator s  ITokenComparator TextMergeViewer ITokenComparator ITokenComparator createTokenComparator TokenComparator
Returns a document partitioner which is suitable for the underlying content type This method is only called if the input provided by the content provider is a code I Stream Content Accessor code and an internal document must be created This document is initialized with the partitioner returned from this method p The code Text Merge Viewer code implementation of this method returns code null code Subclasses may reimplement to create a partitioner for a specific content type return a document partitioner or code null code protected I Document Partitioner get Document Partitioner return null  IStreamContentAccessor TextMergeViewer IDocumentPartitioner getDocumentPartitioner
Called on the viewer disposal Unregisters from the compare configuration Clients may extend if they have to do additional cleanup protected void handle Dispose Dispose Event event if f Key Binding Service null I Action a if f Next Item null a f Next Item get Action if a null f Key Binding Service unregister Action a if f Previous Item null a f Previous Item get Action if a null f Key Binding Service unregister Action a if f Copy Diff Left To Right Item null a f Copy Diff Left To Right Item get Action if a null f Key Binding Service unregister Action a if f Copy Diff Right To Left Item null a f Copy Diff Right To Left Item get Action if a null f Key Binding Service unregister Action a f Key Binding Service null Object input get Input Document Manager remove get Document2 A input Document Manager remove get Document2 L input Document Manager remove get Document2 R input if DEBUG Document Manager dump if f Preference Change Listener null J Face Resources get Font Registry remove Listener f Preference Change Listener J Face Resources get Color Registry remove Listener f Preference Change Listener if f Preference Store null f Preference Store remove Property Change Listener f Preference Change Listener f Preference Change Listener null f Left Canvas null f Right Canvas null fV Scroll Bar null f Birds Eye Canvas null f Summary Header null unset Document f Ancestor unset Document f Left unset Document f Right if f Colors null Iterator i f Colors values iterator while i has Next Color color Color i next if color is Disposed color dispose f Colors null if f Birds Eye Cursor null f Birds Eye Cursor dispose f Birds Eye Cursor null super handle Dispose event  handleDispose DisposeEvent fKeyBindingService IAction fNextItem fNextItem getAction fKeyBindingService unregisterAction fPreviousItem fPreviousItem getAction fKeyBindingService unregisterAction fCopyDiffLeftToRightItem fCopyDiffLeftToRightItem getAction fKeyBindingService unregisterAction fCopyDiffRightToLeftItem fCopyDiffRightToLeftItem getAction fKeyBindingService unregisterAction fKeyBindingService getInput DocumentManager getDocument2 DocumentManager getDocument2 DocumentManager getDocument2 DocumentManager fPreferenceChangeListener JFaceResources getFontRegistry removeListener fPreferenceChangeListener JFaceResources getColorRegistry removeListener fPreferenceChangeListener fPreferenceStore fPreferenceStore removePropertyChangeListener fPreferenceChangeListener fPreferenceChangeListener fLeftCanvas fRightCanvas fVScrollBar fBirdsEyeCanvas fSummaryHeader unsetDocument fAncestor unsetDocument fLeft unsetDocument fRight fColors fColors hasNext isDisposed fColors fBirdsEyeCursor fBirdsEyeCursor fBirdsEyeCursor handleDispose
if f Margin Width 0 f Ancestor Canvas new Buffered Canvas composite SWT NONE public void do Paint GC gc paint Sides gc f Ancestor f Ancestor Canvas false  fMarginWidth fAncestorCanvas BufferedCanvas doPaint paintSides fAncestor fAncestorCanvas
f Ancestor Canvas add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e set Current Diff2 handle Mouse In Sides f Ancestor Canvas f Ancestor e y false  fAncestorCanvas addMouseListener MouseAdapter mouseDown MouseEvent setCurrentDiff2 handleMouseInSides fAncestorCanvas fAncestor
if f Margin Width 0 f Left Canvas new Buffered Canvas composite SWT NONE public void do Paint GC gc paint Sides gc f Left f Left Canvas false  fMarginWidth fLeftCanvas BufferedCanvas doPaint paintSides fLeft fLeftCanvas
f Left Canvas add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e set Current Diff2 handle Mouse In Sides f Left Canvas f Left e y false  fLeftCanvas addMouseListener MouseAdapter mouseDown MouseEvent setCurrentDiff2 handleMouseInSides fLeftCanvas fLeft
if f Margin Width 0 f Right Canvas new Buffered Canvas composite SWT NONE public void do Paint GC gc paint Sides gc f Right f Right Canvas f Synchronized Scrolling  fMarginWidth fRightCanvas BufferedCanvas doPaint paintSides fRight fRightCanvas fSynchronizedScrolling
f Right Canvas add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e set Current Diff2 handle Mouse In Sides f Right Canvas f Right e y false  fRightCanvas addMouseListener MouseAdapter mouseDown MouseEvent setCurrentDiff2 handleMouseInSides fRightCanvas fRight
new Listener public void handle Event Event e int vpos Scroll Bar e widget get Selection scroll Vertical vpos vpos vpos null workaround65205  handleEvent ScrollBar getSelection scrollVertical
f Birds Eye Canvas new Buffered Canvas composite SWT NONE public void do Paint GC gc paint Birds Eye View this gc  fBirdsEyeCanvas BufferedCanvas doPaint paintBirdsEyeView
f Birds Eye Canvas add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e set Current Diff2 handlemouse In Birds Eye View f Birds Eye Canvas e y true  fBirdsEyeCanvas addMouseListener MouseAdapter mouseDown MouseEvent setCurrentDiff2 handlemouseInBirdsEyeView fBirdsEyeCanvas
public void mouse Move Mouse Event e Cursor cursor null Diff diff handlemouse In Birds Eye View f Birds Eye Canvas e y if diff null diff f Direction Range Difference NOCHANGE cursor f Birds Eye Cursor if f Last Cursor cursor f Birds Eye Canvas set Cursor cursor f Last Cursor cursor  mouseMove MouseEvent handlemouseInBirdsEyeView fBirdsEyeCanvas fDirection RangeDifference fBirdsEyeCursor fLastCursor fBirdsEyeCanvas setCursor fLastCursor
Creates the specific SWT controls for the content areas Clients must not call or override this method protected void create Controls Composite composite Workbench Help set Help composite I Compare Context Ids TEXT MERGE VIEW 1st row if f Margin Width 0 f Ancestor Canvas new Buffered Canvas composite SWT NONE public void do Paint GC gc paint Sides gc f Ancestor f Ancestor Canvas false f Ancestor Canvas add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e set Current Diff2 handle Mouse In Sides f Ancestor Canvas f Ancestor e y false f Ancestor create Part composite f Ancestor set Editable false f Summary Header new Canvas composite SWT NONE f Header Painter new Header Painter f Summary Header add Paint Listener f Header Painter update Resolve Status 2nd row if f Margin Width 0 f Left Canvas new Buffered Canvas composite SWT NONE public void do Paint GC gc paint Sides gc f Left f Left Canvas false f Left Canvas add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e set Current Diff2 handle Mouse In Sides f Left Canvas f Left e y false f Left create Part composite f Left get Text Widget get Vertical Bar set Visible f Synchronized Scrolling f Left add Action Merge Source Viewer SAVE ID f Left Save Action f Right create Part composite f Right get Text Widget get Vertical Bar set Visible f Synchronized Scrolling f Right add Action Merge Source Viewer SAVE ID f Right Save Action hsynch Viewport f Ancestor f Left f Right hsynch Viewport f Left f Ancestor f Right hsynch Viewport f Right f Ancestor f Left if f Margin Width 0 f Right Canvas new Buffered Canvas composite SWT NONE public void do Paint GC gc paint Sides gc f Right f Right Canvas f Synchronized Scrolling f Right Canvas add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e set Current Diff2 handle Mouse In Sides f Right Canvas f Right e y false f Scroll Canvas new Canvas composite SWT V SCROLL Rectangle trim f Left get Text Widget compute Trim 0 0 0 0 f Top Inset trim y fV Scroll Bar f Scroll Canvas get Vertical Bar fV Scroll Bar set Increment 1 fV Scroll Bar set Visible true fV Scroll Bar add Listener SWT Selection new Listener public void handle Event Event e int vpos Scroll Bar e widget get Selection scroll Vertical vpos vpos vpos null workaround65205 f Birds Eye Canvas new Buffered Canvas composite SWT NONE public void do Paint GC gc paint Birds Eye View this gc f Birds Eye Canvas add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e set Current Diff2 handlemouse In Birds Eye View f Birds Eye Canvas e y true f Birds Eye Canvas add Mouse Move Listener new Mouse Move Listener private Cursor f Last Cursor public void mouse Move Mouse Event e Cursor cursor null Diff diff handlemouse In Birds Eye View f Birds Eye Canvas e y if diff null diff f Direction Range Difference NOCHANGE cursor f Birds Eye Cursor if f Last Cursor cursor f Birds Eye Canvas set Cursor cursor f Last Cursor cursor  createControls WorkbenchHelp setHelp ICompareContextIds TEXT_MERGE_VIEW fMarginWidth fAncestorCanvas BufferedCanvas doPaint paintSides fAncestor fAncestorCanvas fAncestorCanvas addMouseListener MouseAdapter mouseDown MouseEvent setCurrentDiff2 handleMouseInSides fAncestorCanvas fAncestor fAncestor createPart fAncestor setEditable fSummaryHeader fHeaderPainter HeaderPainter fSummaryHeader addPaintListener fHeaderPainter updateResolveStatus fMarginWidth fLeftCanvas BufferedCanvas doPaint paintSides fLeft fLeftCanvas fLeftCanvas addMouseListener MouseAdapter mouseDown MouseEvent setCurrentDiff2 handleMouseInSides fLeftCanvas fLeft fLeft createPart fLeft getTextWidget getVerticalBar setVisible fSynchronizedScrolling fLeft addAction MergeSourceViewer SAVE_ID fLeftSaveAction fRight createPart fRight getTextWidget getVerticalBar setVisible fSynchronizedScrolling fRight addAction MergeSourceViewer SAVE_ID fRightSaveAction hsynchViewport fAncestor fLeft fRight hsynchViewport fLeft fAncestor fRight hsynchViewport fRight fAncestor fLeft fMarginWidth fRightCanvas BufferedCanvas doPaint paintSides fRight fRightCanvas fSynchronizedScrolling fRightCanvas addMouseListener MouseAdapter mouseDown MouseEvent setCurrentDiff2 handleMouseInSides fRightCanvas fRight fScrollCanvas V_SCROLL fLeft getTextWidget computeTrim fTopInset fVScrollBar fScrollCanvas getVerticalBar fVScrollBar setIncrement fVScrollBar setVisible fVScrollBar addListener handleEvent ScrollBar getSelection scrollVertical fBirdsEyeCanvas BufferedCanvas doPaint paintBirdsEyeView fBirdsEyeCanvas addMouseListener MouseAdapter mouseDown MouseEvent setCurrentDiff2 handlemouseInBirdsEyeView fBirdsEyeCanvas fBirdsEyeCanvas addMouseMoveListener MouseMoveListener fLastCursor mouseMove MouseEvent handlemouseInBirdsEyeView fBirdsEyeCanvas fDirection RangeDifference fBirdsEyeCursor fLastCursor fBirdsEyeCanvas setCursor fLastCursor
sb1 add Selection Listener new Selection Adapter public void widget Selected Selection Event e if f Synchronized Scrolling int max sb1 get Maximum sb1 get Thumb double v 0 0 if max 0 v float sb1 get Selection float max if st2 is Visible Scroll Bar sb2 st2 get Horizontal Bar st2 set Horizontal Pixel int sb2 get Maximum sb2 get Thumb v if st3 is Visible Scroll Bar sb3 st3 get Horizontal Bar st3 set Horizontal Pixel int sb3 get Maximum sb3 get Thumb v workaround65205  addSelectionListener SelectionAdapter widgetSelected SelectionEvent fSynchronizedScrolling getMaximum getThumb getSelection isVisible ScrollBar getHorizontalBar setHorizontalPixel getMaximum getThumb isVisible ScrollBar getHorizontalBar setHorizontalPixel getMaximum getThumb
private void hsynch Viewport final Text Viewer tv1 final Text Viewer tv2 final Text Viewer tv3 final Styled Text st1 tv1 get Text Widget final Styled Text st2 tv2 get Text Widget final Styled Text st3 tv3 get Text Widget final Scroll Bar sb1 st1 get Horizontal Bar sb1 add Selection Listener new Selection Adapter public void widget Selected Selection Event e if f Synchronized Scrolling int max sb1 get Maximum sb1 get Thumb double v 0 0 if max 0 v float sb1 get Selection float max if st2 is Visible Scroll Bar sb2 st2 get Horizontal Bar st2 set Horizontal Pixel int sb2 get Maximum sb2 get Thumb v if st3 is Visible Scroll Bar sb3 st3 get Horizontal Bar st3 set Horizontal Pixel int sb3 get Maximum sb3 get Thumb v workaround65205  hsynchViewport TextViewer TextViewer TextViewer StyledText getTextWidget StyledText getTextWidget StyledText getTextWidget ScrollBar getHorizontalBar addSelectionListener SelectionAdapter widgetSelected SelectionEvent fSynchronizedScrolling getMaximum getThumb getSelection isVisible ScrollBar getHorizontalBar setHorizontalPixel getMaximum getThumb isVisible ScrollBar getHorizontalBar setHorizontalPixel getMaximum getThumb
A workaround for bug 65205 On MacOS X a Display update is required to flush pending paint requests after programmatical scolling private void workaround65205 if f Is Carbon f Composite null f Composite is Disposed f Composite get Display update  fIsCarbon fComposite fComposite isDisposed fComposite getDisplay
private void set Current Diff2 Diff diff boolean reveal if diff null diff f Direction Range Difference NOCHANGE f Current Diff null set Current Diff diff reveal  setCurrentDiff2 fDirection RangeDifference fCurrentDiff setCurrentDiff
private Diff handle Mouse In Sides Canvas canvas Merge Source Viewer tp int my int line Height tp get Text Widget get Line Height int visible Height tp get Viewport Height if f Highlight Ranges return null if f Change Diffs null int shift tp get Vertical Scroll Offset 2 LW Point region new Point 0 0 Iterator e f Change Diffs iterator while e has Next Diff diff Diff e next if diff is Deleted continue if f Show Current Only2 is Current Diff diff continue tp get Line Range diff get Position tp region int y region x line Height shift int h region y line Height if y h 0 continue if y visible Height break if my y my y h return diff return null  handleMouseInSides MergeSourceViewer lineHeight getTextWidget getLineHeight visibleHeight getViewportHeight fHighlightRanges fChangeDiffs getVerticalScrollOffset fChangeDiffs hasNext isDeleted fShowCurrentOnly2 isCurrentDiff getLineRange getPosition lineHeight lineHeight visibleHeight
private Diff get Diff Under Mouse Canvas canvas int mx int my Rectangle r if f Synchronized Scrolling return null int line Height f Left get Text Widget get Line Height int visible Height f Right get Viewport Height Point size canvas get Size int w size x if f Highlight Ranges return null if f Change Diffs null int lshift f Left get Vertical Scroll Offset int rshift f Right get Vertical Scroll Offset Point region new Point 0 0 Iterator e f Change Diffs iterator while e has Next Diff diff Diff e next if diff is Deleted continue if f Show Current Only2 is Current Diff diff continue f Left get Line Range diff f Left Pos region int ly region x line Height lshift int lh region y line Height f Right get Line Range diff f Right Pos region int ry region x line Height rshift int rh region y line Height if Math max ly lh ry rh 0 continue if Math min ly ry visible Height break int cx w RESOLVE SIZE 2 int cy ly lh 2 ry rh 2 RESOLVE SIZE 2 if my cy my cy RESOLVE SIZE mx cx mx cx RESOLVE SIZE if r null int SIZE f Is Carbon 30 20 r x cx RESOLVE SIZE SIZE 2 r y cy RESOLVE SIZE SIZE 2 r width SIZE r height SIZE return diff return null  getDiffUnderMouse fSynchronizedScrolling lineHeight fLeft getTextWidget getLineHeight visibleHeight fRight getViewportHeight getSize fHighlightRanges fChangeDiffs fLeft getVerticalScrollOffset fRight getVerticalScrollOffset fChangeDiffs hasNext isDeleted fShowCurrentOnly2 isCurrentDiff fLeft getLineRange fLeftPos lineHeight lineHeight fRight getLineRange fRightPos lineHeight lineHeight visibleHeight RESOLVE_SIZE RESOLVE_SIZE RESOLVE_SIZE RESOLVE_SIZE fIsCarbon RESOLVE_SIZE RESOLVE_SIZE
private Diff handlemouse In Birds Eye View Canvas canvas int my int yy hh Point size canvas get Size int virtual Height f Synchronized Scrolling get Virtual Height get Right Height if virtual Height get Viewport Height return null int y 0 if f All Diffs null Iterator e f All Diffs iterator for int i 0 e has Next i Diff diff Diff e next int h f Synchronized Scrolling diff get Max Diff Height f Show Ancestor diff get Right Height if use Change diff f Direction diff f Is Whitespace yy y size y virtual Height hh h size y virtual Height if hh 3 hh 3 if my yy my yy hh return diff y h return null  handlemouseInBirdsEyeView getSize virtualHeight fSynchronizedScrolling getVirtualHeight getRightHeight virtualHeight getViewportHeight fAllDiffs fAllDiffs hasNext fSynchronizedScrolling getMaxDiffHeight fShowAncestor getRightHeight useChange fDirection fIsWhitespace virtualHeight virtualHeight
private void paint Birds Eye View Canvas canvas GC gc Color c Rectangle r new Rectangle 0 0 0 0 int yy hh Point size canvas get Size int virtual Height f Synchronized Scrolling get Virtual Height get Right Height if virtual Height get Viewport Height return Display display canvas get Display int y 0 if f All Diffs null Iterator e f All Diffs iterator for int i 0 e has Next i Diff diff Diff e next int h f Synchronized Scrolling diff get Max Diff Height f Show Ancestor diff get Right Height if use Change diff f Direction diff f Is Whitespace yy y size y virtual Height hh h size y virtual Height if hh 3 hh 3 c get Color display get Fill Color diff if c null gc set Background c gc fill Rectangle BIRDS EYE VIEW INSET yy size x 2 BIRDS EYE VIEW INSET hh c get Color display get Stroke Color diff if c null gc set Foreground c r x BIRDS EYE VIEW INSET r y yy r width size x 2 BIRDS EYE VIEW INSET 1 r height hh if diff f Current Diff f Current Diff null diff f Current Diff f Parent gc set Line Width 2 r x r y r width r height else gc set Line Width 1 gc draw Rectangle r y h  paintBirdsEyeView getSize virtualHeight fSynchronizedScrolling getVirtualHeight getRightHeight virtualHeight getViewportHeight getDisplay fAllDiffs fAllDiffs hasNext fSynchronizedScrolling getMaxDiffHeight fShowAncestor getRightHeight useChange fDirection fIsWhitespace virtualHeight virtualHeight getColor getFillColor setBackground fillRectangle BIRDS_EYE_VIEW_INSET BIRDS_EYE_VIEW_INSET getColor getStrokeColor setForeground BIRDS_EYE_VIEW_INSET BIRDS_EYE_VIEW_INSET fCurrentDiff fCurrentDiff fCurrentDiff fParent setLineWidth setLineWidth drawRectangle
private void refresh Birds Eye View if f Birds Eye Canvas null f Birds Eye Canvas redraw  refreshBirdsEyeView fBirdsEyeCanvas fBirdsEyeCanvas
Called whenever set Focus is called on the Content Viewer s top level SWT Composite This implementation sets the focus to the first enabled text widget package boolean internal Set Focus if f Focus Part null if f Left null f Left get Enabled f Focus Part f Left else if f Right null f Right get Enabled f Focus Part f Right else if f Ancestor null f Ancestor get Enabled f Focus Part f Ancestor if f Focus Part null Styled Text st f Focus Part get Text Widget if st null return st set Focus return false could not set focus  setFocus ContentViewer internalSetFocus fFocusPart fLeft fLeft getEnabled fFocusPart fLeft fRight fRight getEnabled fFocusPart fRight fAncestor fAncestor getEnabled fFocusPart fAncestor fFocusPart StyledText fFocusPart getTextWidget setFocus
class Hover Resizer extends Resizer Canvas f Canvas public Hover Resizer Canvas c int dir super c dir f Canvas c  HoverResizer fCanvas HoverResizer fCanvas
public void mouse Move Mouse Event e if f Is Down f Use Single Line show ResolveUI handle Mouse Move Over Center f Canvas e x e y return super mouse Move e  mouseMove MouseEvent fIsDown fUseSingleLine showResolveUI handleMouseMoveOverCenter fCanvas mouseMove
if f Synchronized Scrolling final Canvas canvas new Buffered Canvas parent SWT NONE public void do Paint GC gc paint Center this gc  fSynchronizedScrolling BufferedCanvas doPaint paintCenter
new Selection Adapter public void widget Selected Selection Event e f Center Button set Visible false if f Button Diff null set Current Diff f Button Diff false copy f Current Diff false f Current Diff f Direction Range Difference CONFLICT  SelectionAdapter widgetSelected SelectionEvent fCenterButton setVisible fButtonDiff setCurrentDiff fButtonDiff fCurrentDiff fCurrentDiff fDirection RangeDifference
Creates the central Canvas Called from Content Merge Viewer package Control create Center Composite parent if f Synchronized Scrolling final Canvas canvas new Buffered Canvas parent SWT NONE public void do Paint GC gc paint Center this gc if f Use ResolveUI new Hover Resizer canvas HORIZONTAL f Center Button new Button canvas f Is Carbon SWT FLAT SWT PUSH if f Normal Cursor null f Normal Cursor new Cursor canvas get Display SWT CURSOR ARROW f Center Button set Cursor f Normal Cursor f Center Button set Text NON NLS 1 f Center Button pack f Center Button set Visible false f Center Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Center Button set Visible false if f Button Diff null set Current Diff f Button Diff false copy f Current Diff false f Current Diff f Direction Range Difference CONFLICT else new Resizer canvas HORIZONTAL return canvas return super create Center parent  ContentMergeViewer createCenter fSynchronizedScrolling BufferedCanvas doPaint paintCenter fUseResolveUI HoverResizer fCenterButton fIsCarbon fNormalCursor fNormalCursor getDisplay CURSOR_ARROW fCenterButton setCursor fNormalCursor fCenterButton setText fCenterButton fCenterButton setVisible fCenterButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fCenterButton setVisible fButtonDiff setCurrentDiff fButtonDiff fCurrentDiff fCurrentDiff fDirection RangeDifference createCenter
private boolean handle Mouse Move Over Center Canvas canvas int x int y Rectangle r new Rectangle 0 0 0 0 Diff diff get Diff Under Mouse canvas x y r if diff null diff is Unresolved Incoming Or Conflicting diff null if diff f Button Diff if diff null if f Left is Editable f Button Diff diff f Center Button set Text NON NLS 1 String tt f Copy Diff Right To Left Item get Action get Tool Tip Text f Center Button set Tool Tip Text tt f Center Button set Bounds r f Center Button set Visible true else if f Right is Editable f Button Diff diff f Center Button set Text NON NLS 1 String tt f Copy Diff Left To Right Item get Action get Tool Tip Text f Center Button set Tool Tip Text tt f Center Button set Bounds r f Center Button set Visible true else f Button Diff null else f Center Button set Visible false f Button Diff null return f Button Diff null  handleMouseMoveOverCenter getDiffUnderMouse isUnresolvedIncomingOrConflicting fButtonDiff fLeft isEditable fButtonDiff fCenterButton setText fCopyDiffRightToLeftItem getAction getToolTipText fCenterButton setToolTipText fCenterButton setBounds fCenterButton setVisible fRight isEditable fButtonDiff fCenterButton setText fCopyDiffLeftToRightItem getAction getToolTipText fCenterButton setToolTipText fCenterButton setBounds fCenterButton setVisible fButtonDiff fCenterButton setVisible fButtonDiff fButtonDiff
Returns width of central canvas Overridden from Content Merge Viewer package int get Center Width if f Synchronized Scrolling return CENTER WIDTH return super get Center Width  ContentMergeViewer getCenterWidth fSynchronizedScrolling CENTER_WIDTH getCenterWidth
te add Paint Listener new Paint Listener public void paint Control Paint Event e paint e part  addPaintListener PaintListener paintControl PaintEvent
te add Key Listener new Key Adapter public void key Pressed Key Event e handle Selection Changed part  addKeyListener KeyAdapter keyPressed KeyEvent handleSelectionChanged
te add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e sync Viewport part handle Selection Changed part  addMouseListener MouseAdapter mouseDown MouseEvent syncViewport handleSelectionChanged
te add Focus Listener new Focus Adapter public void focus Gained Focus Event fe f Focus Part part connect Global Actions f Focus Part  addFocusListener FocusAdapter focusGained FocusEvent fFocusPart connectGlobalActions fFocusPart
connect Global Actions f Focus Part public void focus Lost Focus Event fe connect Global Actions null  connectGlobalActions fFocusPart focusLost FocusEvent connectGlobalActions
part add Viewport Listener new I Viewport Listener public void viewport Changed int vertical Position sync Viewport part  addViewportListener IViewportListener viewportChanged verticalPosition syncViewport
Creates and initializes a text part private Merge Source Viewer create Part Composite parent final Merge Source Viewer part new Merge Source Viewer parent get Resource Bundle final Styled Text te part get Text Widget if f Confirm Save part hide Save Action te add Paint Listener new Paint Listener public void paint Control Paint Event e paint e part te add Key Listener new Key Adapter public void key Pressed Key Event e handle Selection Changed part te add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e sync Viewport part handle Selection Changed part te add Focus Listener new Focus Adapter public void focus Gained Focus Event fe f Focus Part part connect Global Actions f Focus Part public void focus Lost Focus Event fe connect Global Actions null part add Viewport Listener new I Viewport Listener public void viewport Changed int vertical Position sync Viewport part Font font J Face Resources get Font f Symbolic Font Name if font null te set Font font if f Background null not default te set Background get Color parent get Display f Background configure Text Viewer part return part  MergeSourceViewer createPart MergeSourceViewer MergeSourceViewer getResourceBundle StyledText getTextWidget fConfirmSave hideSaveAction addPaintListener PaintListener paintControl PaintEvent addKeyListener KeyAdapter keyPressed KeyEvent handleSelectionChanged addMouseListener MouseAdapter mouseDown MouseEvent syncViewport handleSelectionChanged addFocusListener FocusAdapter focusGained FocusEvent fFocusPart connectGlobalActions fFocusPart focusLost FocusEvent connectGlobalActions addViewportListener IViewportListener viewportChanged verticalPosition syncViewport JFaceResources getFont fSymbolicFontName setFont fBackground setBackground getColor getDisplay fBackground configureTextViewer
private void connect Global Actions Merge Source Viewer part I Action Bars action Bars Utilities find Action Bars f Composite if action Bars null for int i 0 i GLOBAL ACTIONS length i I Action action null if part null action part get Action TEXT ACTIONS i if action null TEXT ACTIONS i equals Merge Source Viewer SAVE ID if part f Left action f Left Save Action else action f Right Save Action action Bars set Global Action Handler GLOBAL ACTIONS i action action Bars update Action Bars  connectGlobalActions MergeSourceViewer IActionBars actionBars findActionBars fComposite actionBars GLOBAL_ACTIONS IAction getAction TEXT_ACTIONS TEXT_ACTIONS MergeSourceViewer SAVE_ID fLeft fLeftSaveAction fRightSaveAction actionBars setGlobalActionHandler GLOBAL_ACTIONS actionBars updateActionBars
I Typed Element get Leg char type Object input if input instanceof I Compare Input switch type case A return I Compare Input input get Ancestor case L return I Compare Input input get Left case R return I Compare Input input get Right return null  ITypedElement getLeg ICompareInput ICompareInput getAncestor ICompareInput getLeft ICompareInput getRight
I Document get Document char type Object input I Typed Element te get Leg type input if te instanceof I Document return I Document te if te instanceof I Document Range return I Document Range te get Document if te instanceof I Stream Content Accessor return Document Manager get te return null  IDocument getDocument ITypedElement getLeg IDocument IDocument IDocumentRange IDocumentRange getDocument IStreamContentAccessor DocumentManager
I Document get Document2 char type Object input I Document doc get Document type input if doc null return doc if input instanceof I Diff Element I Diff Container parent I Diff Element input get Parent return get Document type parent return null  IDocument getDocument2 IDocument getDocument IDiffElement IDiffContainer IDiffElement getParent getDocument
Returns true if the given inputs map to the same documents boolean same Doc char type Object new Input Object old Input I Document new Doc get Document2 type new Input I Document old Doc get Document2 type old Input return new Doc old Doc  sameDoc newInput oldInput IDocument newDoc getDocument2 newInput IDocument oldDoc getDocument2 oldInput newDoc oldDoc
Overridden to prevent save confirmation if new input is sub document of current input param new Input the new input of this viewer or code null code if there is no new input param old Input the old input element or code null code if there was previously no input return code true code if saving was successful or if the user didn t want to save by pressing NO in the confirmation dialog since 2 0 protected boolean do Save Object new Input Object old Input if old Input null new Input null check whether underlying documents have changed if same Doc A new Input old Input same Doc L new Input old Input same Doc R new Input old Input if DEBUG System out println Same docs NON NLS 1 return false if DEBUG System out println New docs NON NLS 1 I Document a Doc get Document2 A old Input Document Manager remove a Doc I Document l Doc get Document2 L old Input Document Manager remove l Doc I Document r Doc get Document2 R old Input Document Manager remove r Doc if DEBUG Document Manager dump return super do Save new Input old Input  newInput oldInput doSave newInput oldInput oldInput newInput sameDoc newInput oldInput sameDoc newInput oldInput sameDoc newInput oldInput IDocument aDoc getDocument2 oldInput DocumentManager aDoc IDocument lDoc getDocument2 oldInput DocumentManager lDoc IDocument rDoc getDocument2 oldInput DocumentManager rDoc DocumentManager doSave newInput oldInput
private I Typed Element get Parent char type Object input get Input if input instanceof I Diff Element I Diff Container parent I Diff Element input get Parent return get Leg type parent return null  ITypedElement getParent getInput IDiffElement IDiffContainer IDiffElement getParent getLeg
Initializes the text viewers of the three content areas with the given input objects Subclasses may extend protected void update Content Object ancestor Object left Object right boolean empty Input ancestor null left null right null Object input get Input Position ancestor Range null Position left Range null Position right Range null int dir 0 if one side is empty use container if FIX 47640 empty Input left null right null if input instanceof I Diff Element I Diff Container parent I Diff Element input get Parent if parent instanceof I Compare Input I Compare Input ci I Compare Input parent if ci get Ancestor instanceof I Document Range ci get Left instanceof I Document Range ci get Right instanceof I Document Range if ancestor instanceof I Document Range ancestor Range I Document Range ancestor get Range if left instanceof I Document Range left Range I Document Range left get Range if right instanceof I Document Range right Range I Document Range right get Range ancestor ci get Ancestor left ci get Left right ci get Right dir I Diff Element input get Kind int n 0 if left null n if right null n f Highlight Ranges n 1 clear stuff f Current Diff null f Change Diffs null f All Diffs null f End Of Doc Reached false f Has Errors false start with no errors Compare Configuration cc get Compare Configuration I Merge Viewer Content Provider cp get Merge Content Provider if cp instanceof Merge Viewer Content Provider Merge Viewer Content Provider mcp Merge Viewer Content Provider cp mcp set Ancestor Error null mcp set Left Error null mcp set Right Error null set new documents set Document f Left L left f Left Line Count f Left get Line Count f Left Encoding get Encoding left set Document f Right R right f Right Line Count f Right get Line Count f Right Encoding get Encoding right set Document f Ancestor A ancestor update Header update Controls update Tool Items if f Has Errors do Diff f Right set Editable cc is Right Editable cp is Right Editable input f Left set Editable cc is Left Editable cp is Left Editable input invalidate Lines updateV Scroll Bar refresh Birds Eye View if f Has Errors empty Input f Composite is Disposed Diff select Diff null if FIX 47640 if left Range null select Diff find Diff L left Range else if right Range null select Diff find Diff R right Range if select Diff null set Current Diff select Diff true else select First Diff  updateContent emptyInput getInput ancestorRange leftRange rightRange FIX_47640 emptyInput IDiffElement IDiffContainer IDiffElement getParent ICompareInput ICompareInput ICompareInput getAncestor IDocumentRange getLeft IDocumentRange getRight IDocumentRange IDocumentRange ancestorRange IDocumentRange getRange IDocumentRange leftRange IDocumentRange getRange IDocumentRange rightRange IDocumentRange getRange getAncestor getLeft getRight IDiffElement getKind fHighlightRanges fCurrentDiff fChangeDiffs fAllDiffs fEndOfDocReached fHasErrors CompareConfiguration getCompareConfiguration IMergeViewerContentProvider getMergeContentProvider MergeViewerContentProvider MergeViewerContentProvider MergeViewerContentProvider setAncestorError setLeftError setRightError setDocument fLeft fLeftLineCount fLeft getLineCount fLeftEncoding getEncoding setDocument fRight fRightLineCount fRight getLineCount fRightEncoding getEncoding setDocument fAncestor updateHeader updateControls updateToolItems fHasErrors doDiff fRight setEditable isRightEditable isRightEditable fLeft setEditable isLeftEditable isLeftEditable invalidateLines updateVScrollBar refreshBirdsEyeView fHasErrors emptyInput fComposite isDisposed selectDiff FIX_47640 leftRange selectDiff findDiff leftRange rightRange selectDiff findDiff rightRange selectDiff setCurrentDiff selectDiff selectFirstDiff
private Diff find Diff char c Position range Merge Source Viewer v int start range get Offset int end start range get Length if c L v f Left else if c R v f Right else return null if f Change Diffs null boolean three Way is Three Way Iterator iter f Change Diffs iterator while iter has Next Diff diff Diff iter next if diff is Deleted diff f Direction Range Difference NOCHANGE continue if diff overlaps v start end return diff return null  findDiff MergeSourceViewer getOffset getLength fLeft fRight fChangeDiffs threeWay isThreeWay fChangeDiffs hasNext isDeleted fDirection RangeDifference
private static String get Encoding Object o String encoding null if o instanceof I Encoded Stream Content Accessor try encoding I Encoded Stream Content Accessor o get Charset catch Core Exception e ignored if encoding null encoding Resources Plugin get Encoding return encoding  getEncoding IEncodedStreamContentAccessor IEncodedStreamContentAccessor getCharset CoreException ResourcesPlugin getEncoding
private void update Diff Background Diff diff if f Highlight Ranges return if diff null diff f Is Token return if f Show Current Only is Current Diff diff return Color c get Color null get Fill Color diff if c null return if is Three Way f Ancestor set Line Background diff f Ancestor Pos c f Left set Line Background diff f Left Pos c f Right set Line Background diff f Right Pos c  updateDiffBackground fHighlightRanges fIsToken fShowCurrentOnly isCurrentDiff getColor getFillColor isThreeWay fAncestor setLineBackground fAncestorPos fLeft setLineBackground fLeftPos fRight setLineBackground fRightPos
private void update All Diff Backgrounds Display display if f Change Diffs null boolean three Way is Three Way Iterator iter f Change Diffs iterator while iter has Next Diff diff Diff iter next Color c get Color display get Fill Color diff if three Way f Ancestor set Line Background diff f Ancestor Pos c f Left set Line Background diff f Left Pos c f Right set Line Background diff f Right Pos c  updateAllDiffBackgrounds fChangeDiffs threeWay isThreeWay fChangeDiffs hasNext getColor getFillColor threeWay fAncestor setLineBackground fAncestorPos fLeft setLineBackground fLeftPos fRight setLineBackground fRightPos
boolean is Current Diff Diff diff if diff null return false if diff f Current Diff return true if f Current Diff null f Current Diff f Parent diff return true return false  isCurrentDiff fCurrentDiff fCurrentDiff fCurrentDiff fParent
Called whenver one of the documents changes Sets the dirty state of this viewer and updates the lines Implements I Document Listener private void document Changed Document Event e I Document doc e get Document if doc f Left get Document set Left Dirty true else if doc f Right get Document set Right Dirty true update Lines doc  IDocumentListener documentChanged DocumentEvent IDocument getDocument fLeft getDocument setLeftDirty fRight getDocument setRightDirty updateLines
This method is called if a range of text on one side is copied into an empty subdocument on the other side The method returns the position where the subdocument is placed into the base document This default implementation determines the position by using the text range differencer However this position is not always optimal for specific types of text So subclasses which are aware of the type of text they are dealing with may override this method to find a better position where to insert a newly added piece of text param type the side for which the insertion position should be determined A for ancestor L for left hand side R for right hand side param input the current input object of this viewer since 2 0 protected int find Insertion Position char type I Compare Input input I Typed Element other null char other Type 0 switch type case A other input get Left other Type L if other null other input get Right other Type R break case L other input get Right other Type R if other null other input get Ancestor other Type A break case R other input get Left other Type L if other null other input get Ancestor other Type A break if other instanceof I Document Range I Document Range dr I Document Range other Position p dr get Range Diff diff find Diff other Type p offset if diff null switch type case A if diff f Ancestor Pos null return diff f Ancestor Pos offset break case L if diff f Left Pos null return diff f Left Pos offset break case R if diff f Right Pos null return diff f Right Pos offset break return 0  findInsertionPosition ICompareInput ITypedElement otherType getLeft otherType getRight otherType getRight otherType getAncestor otherType getLeft otherType getAncestor otherType IDocumentRange IDocumentRange IDocumentRange getRange findDiff otherType fAncestorPos fAncestorPos fLeftPos fLeftPos fRightPos fRightPos
private void set Error char type String message I Merge Viewer Content Provider cp get Merge Content Provider if cp instanceof Merge Viewer Content Provider Merge Viewer Content Provider mcp Merge Viewer Content Provider cp switch type case A mcp set Ancestor Error message break case L mcp set Left Error message break case R mcp set Right Error message break f Has Errors true  setError IMergeViewerContentProvider getMergeContentProvider MergeViewerContentProvider MergeViewerContentProvider MergeViewerContentProvider setAncestorError setLeftError setRightError fHasErrors
Returns true if a new Document could be installed private boolean set Document Merge Source Viewer tp char type Object o if tp null return false I Document new Doc null Position range null if o instanceof I Document Range new Doc I Document Range o get Document range I Document Range o get Range else if o instanceof I Document new Doc I Document o else if o instanceof I Stream Content Accessor new Doc Document Manager get o if new Doc null I Stream Content Accessor sca I Stream Content Accessor o String s null try s Utilities read String sca catch Core Exception ex set Error type ex get Message new Doc new Document s null s NON NLS 1 Document Manager put o new Doc I Document Partitioner partitioner get Document Partitioner if partitioner null new Doc set Document Partitioner partitioner partitioner connect new Doc else if o null deletion on one side I Typed Element parent get Parent type we try to find an insertion position within the deletion s parent if parent instanceof I Document Range new Doc I Document Range parent get Document new Doc add Position Category I Document Range RANGE CATEGORY Object input get Input range get New Range type input if range null int pos 0 if input instanceof I Compare Input pos find Insertion Position type I Compare Input input range new Position pos 0 try new Doc add Position I Document Range RANGE CATEGORY range catch Bad Position Category Exception ex silently ignored if DEBUG System out println Bad Position Category Exception ex NON NLS 1 catch Bad Location Exception ex silently ignored if DEBUG System out println Bad Location Exception ex NON NLS 1 add New Range type input range else if parent instanceof I Document new Doc I Document Range o get Document boolean enabled true if new Doc null System out println set Document create new Document new Doc new Document NON NLS 1 enabled false I Document old Doc tp get Document if new Doc old Doc got a new document unset Document tp if new Doc null new Doc add Position Category I Document Range RANGE CATEGORY if f Position Updater null f Position Updater new Child Position Updater I Document Range RANGE CATEGORY else new Doc remove Position Updater f Position Updater new Doc add Position Updater f Position Updater install new document if new Doc null tp set Region range if f Sub Doc if range null I Region r normalize Document Region new Doc to Region range tp set Document new Doc r get Offset r get Length else tp set Document new Doc else tp set Document new Doc new Doc add Document Listener f Document Listener else same document but different range tp set Region range if f Sub Doc if range null I Region r normalize Document Region new Doc to Region range tp set Visible Region r get Offset r get Length else tp reset Visible Region else tp reset Visible Region tp set Enabled enabled return enabled  setDocument MergeSourceViewer IDocument newDoc IDocumentRange newDoc IDocumentRange getDocument IDocumentRange getRange IDocument newDoc IDocument IStreamContentAccessor newDoc DocumentManager newDoc IStreamContentAccessor IStreamContentAccessor readString CoreException setError getMessage newDoc DocumentManager newDoc IDocumentPartitioner getDocumentPartitioner newDoc setDocumentPartitioner newDoc ITypedElement getParent IDocumentRange newDoc IDocumentRange getDocument newDoc addPositionCategory IDocumentRange RANGE_CATEGORY getInput getNewRange ICompareInput findInsertionPosition ICompareInput newDoc addPosition IDocumentRange RANGE_CATEGORY BadPositionCategoryException BadPositionCategoryException BadLocationException BadLocationException addNewRange IDocument newDoc IDocumentRange getDocument newDoc setDocument newDoc IDocument oldDoc getDocument newDoc oldDoc unsetDocument newDoc newDoc addPositionCategory IDocumentRange RANGE_CATEGORY fPositionUpdater fPositionUpdater ChildPositionUpdater IDocumentRange RANGE_CATEGORY newDoc removePositionUpdater fPositionUpdater newDoc addPositionUpdater fPositionUpdater newDoc setRegion fSubDoc IRegion normalizeDocumentRegion newDoc toRegion setDocument newDoc getOffset getLength setDocument newDoc setDocument newDoc newDoc addDocumentListener fDocumentListener setRegion fSubDoc IRegion normalizeDocumentRegion newDoc toRegion setVisibleRegion getOffset getLength resetVisibleRegion resetVisibleRegion setEnabled
private Position get New Range char type Object input switch type case A return Position f New Ancestor Ranges get input case L return Position f New Left Ranges get input case R return Position f New Right Ranges get input return null  getNewRange fNewAncestorRanges fNewLeftRanges fNewRightRanges
private void add New Range char type Object input Position range switch type case A f New Ancestor Ranges put input range break case L f New Left Ranges put input range break case R f New Right Ranges put input range break  addNewRange fNewAncestorRanges fNewLeftRanges fNewRightRanges
private void unset Document Merge Source Viewer tp I Document old Doc tp get Document if old Doc null deinstall old positions if f Position Updater null old Doc remove Position Updater f Position Updater try old Doc remove Position Category I Document Range RANGE CATEGORY catch Bad Position Category Exception ex Need Work old Doc remove Document Listener f Document Listener  unsetDocument MergeSourceViewer IDocument oldDoc getDocument oldDoc fPositionUpdater oldDoc removePositionUpdater fPositionUpdater oldDoc removePositionCategory IDocumentRange RANGE_CATEGORY BadPositionCategoryException NeedWork oldDoc removeDocumentListener fDocumentListener
Returns the contents of the underlying document as an array of bytes using the current workbench encoding param left if code true code the contents of the left side is returned otherwise the right side return the contents of the left or right document or null protected byte get Contents boolean left Merge Source Viewer v left f Left f Right if v null I Document d v get Document if d null String contents d get if contents null byte bytes try bytes contents get Bytes left f Left Encoding f Right Encoding catch Unsupported Encoding Exception ex use default encoding bytes contents get Bytes return bytes return null  getContents MergeSourceViewer fLeft fRight IDocument getDocument getBytes fLeftEncoding fRightEncoding UnsupportedEncodingException getBytes
private I Region normalize Document Region I Document doc I Region region if region null doc null return region int max Length doc get Length int start region get Offset if start 0 start 0 else if start max Length start max Length int length region get Length if length 0 length 0 else if start length max Length length max Length start return new Region start length  IRegion normalizeDocumentRegion IDocument IRegion maxLength getLength getOffset maxLength maxLength getLength maxLength maxLength
protected final void handle Resize Ancestor int x int y int width int height if width 0 Rectangle trim f Left get Text Widget compute Trim 0 0 0 0 int scrollbar Height trim height if Utilities ok To Use f Ancestor Canvas f Ancestor Canvas set Visible true if f Ancestor is Control Ok To Use f Ancestor get Text Widget set Visible true if f Ancestor Canvas null f Ancestor Canvas set Bounds x y f Margin Width height scrollbar Height x f Margin Width width f Margin Width f Ancestor get Text Widget set Bounds x y width height else if Utilities ok To Use f Ancestor Canvas f Ancestor Canvas set Visible false if f Ancestor is Control Ok To Use Styled Text t f Ancestor get Text Widget t set Visible false t set Bounds 0 0 0 0 if f Focus Part f Ancestor f Focus Part f Left f Focus Part get Text Widget set Focus  handleResizeAncestor fLeft getTextWidget computeTrim scrollbarHeight okToUse fAncestorCanvas fAncestorCanvas setVisible fAncestor isControlOkToUse fAncestor getTextWidget setVisible fAncestorCanvas fAncestorCanvas setBounds fMarginWidth scrollbarHeight fMarginWidth fMarginWidth fAncestor getTextWidget setBounds okToUse fAncestorCanvas fAncestorCanvas setVisible fAncestor isControlOkToUse StyledText fAncestor getTextWidget setVisible setBounds fFocusPart fAncestor fFocusPart fLeft fFocusPart getTextWidget setFocus
Lays out everything protected final void handle Resize Left Right int x int y int width1 int center Width int width2 int height if f Birds Eye Canvas null width2 BIRDS EYE VIEW WIDTH Rectangle trim f Left get Text Widget compute Trim 0 0 0 0 int scrollbar Height trim height trim x Composite composite Composite get Control int left Text Width width1 if f Left Canvas null f Left Canvas set Bounds x y f Margin Width height scrollbar Height x f Margin Width left Text Width f Margin Width f Left get Text Widget set Bounds x y left Text Width height x left Text Width if f Center null f Center is Disposed f Center create Center composite f Center set Bounds x y center Width height scrollbar Height x center Width if f Synchronized Scrolling canvas is to the left of text if f Right Canvas null f Right Canvas set Bounds x y f Margin Width height scrollbar Height f Right Canvas redraw x f Margin Width we draw the canvas to the left of the text widget int scrollbar Width 0 if f Synchronized Scrolling f Scroll Canvas null trim f Left get Text Widget compute Trim 0 0 0 0 scrollbar Width trim width 2 trim x int right Text Width width2 scrollbar Width if f Right Canvas null right Text Width f Margin Width f Right get Text Widget set Bounds x y right Text Width height x right Text Width if f Synchronized Scrolling if f Right Canvas null canvas is to the right of the text f Right Canvas set Bounds x y f Margin Width height scrollbar Height x f Margin Width if f Scroll Canvas null f Scroll Canvas set Bounds x y scrollbar Width height scrollbar Height if f Birds Eye Canvas null int vertical Scrollbar Button Height scrollbar Width int horizontal Scrollbar Button Height scrollbar Height if f Is Carbon vertical Scrollbar Button Height 2 horizontal Scrollbar Button Height 18 if f Summary Header null f Summary Header set Bounds x scrollbar Width y BIRDS EYE VIEW WIDTH vertical Scrollbar Button Height y vertical Scrollbar Button Height f Birds Eye Canvas set Bounds x scrollbar Width y BIRDS EYE VIEW WIDTH height 2 vertical Scrollbar Button Height horizontal Scrollbar Button Height doesn t work since Text Editors don t have their correct size yet updateV Scroll Bar refresh Birds Eye View  handleResizeLeftRight centerWidth fBirdsEyeCanvas BIRDS_EYE_VIEW_WIDTH fLeft getTextWidget computeTrim scrollbarHeight getControl leftTextWidth fLeftCanvas fLeftCanvas setBounds fMarginWidth scrollbarHeight fMarginWidth leftTextWidth fMarginWidth fLeft getTextWidget setBounds leftTextWidth leftTextWidth fCenter fCenter isDisposed fCenter createCenter fCenter setBounds centerWidth scrollbarHeight centerWidth fSynchronizedScrolling fRightCanvas fRightCanvas setBounds fMarginWidth scrollbarHeight fRightCanvas fMarginWidth scrollbarWidth fSynchronizedScrolling fScrollCanvas fLeft getTextWidget computeTrim scrollbarWidth rightTextWidth scrollbarWidth fRightCanvas rightTextWidth fMarginWidth fRight getTextWidget setBounds rightTextWidth rightTextWidth fSynchronizedScrolling fRightCanvas fRightCanvas setBounds fMarginWidth scrollbarHeight fMarginWidth fScrollCanvas fScrollCanvas setBounds scrollbarWidth scrollbarHeight fBirdsEyeCanvas verticalScrollbarButtonHeight scrollbarWidth horizontalScrollbarButtonHeight scrollbarHeight fIsCarbon verticalScrollbarButtonHeight horizontalScrollbarButtonHeight fSummaryHeader fSummaryHeader setBounds scrollbarWidth BIRDS_EYE_VIEW_WIDTH verticalScrollbarButtonHeight verticalScrollbarButtonHeight fBirdsEyeCanvas setBounds scrollbarWidth BIRDS_EYE_VIEW_WIDTH verticalScrollbarButtonHeight horizontalScrollbarButtonHeight TextEditors updateVScrollBar refreshBirdsEyeView
Track selection changes to update the current Diff private void handle Selection Changed Merge Source Viewer tw Point p tw get Selected Range Diff d find Diff tw p x p x p y update Status d set Current Diff d false don t select or reveal  handleSelectionChanged MergeSourceViewer getSelectedRange findDiff updateStatus setCurrentDiff
private static I Region to Region Position position if position null return new Region position get Offset position get Length return null  IRegion toRegion getOffset getLength
private static int max Work I Range Comparator a I Range Comparator l I Range Comparator r int ln l get Range Count int rn r get Range Count if a null int an a get Range Count return 2 Math max an ln 2 Math max an rn return 2 Math max ln rn  maxWork IRangeComparator IRangeComparator IRangeComparator getRangeCount getRangeCount getRangeCount
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Interrupted Exception Invocation Target Exception String progress Title Utilities get String bundle compare Progress Task title NON NLS 1 monitor begin Task progress Title max Work sa sl sr try result 0 Range Differencer find Ranges monitor sa sl sr catch Out Of Memory Error ex System gc throw new Invocation Target Exception ex if monitor is Canceled cancelled throw new Interrupted Exception monitor done  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InterruptedException InvocationTargetException progressTitle getString compareProgressTask beginTask progressTitle maxWork RangeDifferencer findRanges OutOfMemoryError InvocationTargetException isCanceled InterruptedException
Perform a two level 2 or 3 way diff The first level is based on line comparison the second level on token comparison private void do Diff f All Diffs new Array List f Change Diffs new Array List f Current Diff null I Document a Doc null I Document l Doc f Left get Document I Document r Doc f Right get Document if l Doc null r Doc null return Position a Region null Position l Region f Left get Region Position r Region f Right get Region boolean three Way is Three Way if three Way f Ignore Ancestor a Doc f Ancestor get Document a Region f Ancestor get Region f Ancestor reset Line Background f Left reset Line Background f Right reset Line Background boolean ignore White Space Utilities get Boolean get Compare Configuration Compare Configuration IGNORE WHITESPACE false Doc Line Comparator sright new Doc Line Comparator r Doc to Region r Region ignore White Space Doc Line Comparator sleft new Doc Line Comparator l Doc to Region l Region ignore White Space Doc Line Comparator sancestor null if a Doc null sancestor new Doc Line Comparator a Doc to Region a Region ignore White Space if f Sub Doc r Region null l Region null we have to add a diff for the ignored lines int astart 0 int as 0 if a Region null astart a Region get Offset as Math max 0 astart 1 int ys Math max 0 l Region get Offset 1 int ms Math max 0 r Region get Offset 1 if as 0 ys 0 ms 0 Diff diff new Diff null Range Difference NOCHANGE a Doc a Region 0 astart l Doc l Region 0 l Region get Offset r Doc r Region 0 r Region get Offset f All Diffs add diff final Resource Bundle bundle get Resource Bundle final Object result new Object 1 final Doc Line Comparator sa sancestor sl sleft sr sright I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Interrupted Exception Invocation Target Exception String progress Title Utilities get String bundle compare Progress Task title NON NLS 1 monitor begin Task progress Title max Work sa sl sr try result 0 Range Differencer find Ranges monitor sa sl sr catch Out Of Memory Error ex System gc throw new Invocation Target Exception ex if monitor is Canceled cancelled throw new Interrupted Exception monitor done I Progress Service progress Service PlatformUI get Workbench get Progress Service Range Difference e null try progress Service run true true runnable e Range Difference result 0 catch Invocation Target Exception ex String title Utilities get String bundle too Complex Error title NON NLS 1 String format Utilities get String bundle too Complex Error format NON NLS 1 String msg Message Format format format new Object Integer to String progress Service get Long Operation Time 1000 Message Dialog open Error f Composite get Shell title msg e null catch Interrupted Exception ex if e null we create a NOCHANGE range for the whole document Diff diff new Diff null Range Difference NOCHANGE a Doc a Region 0 a Doc null a Doc get Length 0 l Doc l Region 0 l Doc get Length r Doc r Region 0 r Doc get Length f All Diffs add diff else for int i 0 i e length i String a null s null d null Range Difference es e i int kind es kind int ancestor Start 0 int ancestor End 0 if sancestor null ancestor Start sancestor get Token Start es ancestor Start ancestor End get Token End2 sancestor es ancestor Start es ancestor Length int left Start sleft get Token Start es left Start int left End get Token End2 sleft es left Start es left Length int right Start sright get Token Start es right Start int right End get Token End2 sright es right Start es right Length Diff diff new Diff null kind a Doc a Region ancestor Start ancestor End l Doc l Region left Start left End r Doc r Region right Start right End f All Diffs add diff remember all range diffs for scrolling if ignore White Space if sancestor null a extract2 a Doc sancestor es ancestor Start es ancestor Length s extract2 l Doc sleft es left Start es left Length d extract2 r Doc sright es right Start es right Length if a null a trim length 0 s trim length 0 d trim length 0 diff f Is Whitespace true continue if use Change kind f Change Diffs add diff here we remember only the real diffs update Diff Background diff if s null s extract2 l Doc sleft es left Start es left Length if d null d extract2 r Doc sright es right Start es right Length if s length 0 d length 0 if a null sancestor null a extract2 a Doc sancestor es ancestor Start es ancestor Length if USE MERGING TOKEN DIFF merging Token Diff diff a Doc a r Doc d l Doc s else simple Token Diff diff a Doc a r Doc d l Doc s if f Sub Doc r Region null l Region null we have to add a diff for the ignored lines int a End 0 int a Len 0 if a Region null a Doc null a End a Region get Offset a Region get Length a Len a Doc get Length Diff diff new Diff null Range Difference NOCHANGE a Doc a Region a End a Len l Doc l Region l Region get Offset l Region get Length l Doc get Length r Doc r Region r Region get Offset r Region get Length r Doc get Length f All Diffs add diff  doDiff fAllDiffs ArrayList fChangeDiffs ArrayList fCurrentDiff IDocument aDoc IDocument lDoc fLeft getDocument IDocument rDoc fRight getDocument lDoc rDoc aRegion lRegion fLeft getRegion rRegion fRight getRegion threeWay isThreeWay threeWay fIgnoreAncestor aDoc fAncestor getDocument aRegion fAncestor getRegion fAncestor resetLineBackground fLeft resetLineBackground fRight resetLineBackground ignoreWhiteSpace getBoolean getCompareConfiguration CompareConfiguration IGNORE_WHITESPACE DocLineComparator DocLineComparator rDoc toRegion rRegion ignoreWhiteSpace DocLineComparator DocLineComparator lDoc toRegion lRegion ignoreWhiteSpace DocLineComparator aDoc DocLineComparator aDoc toRegion aRegion ignoreWhiteSpace fSubDoc rRegion lRegion aRegion aRegion getOffset lRegion getOffset rRegion getOffset RangeDifference aDoc aRegion lDoc lRegion lRegion getOffset rDoc rRegion rRegion getOffset fAllDiffs ResourceBundle getResourceBundle DocLineComparator IRunnableWithProgress IRunnableWithProgress IProgressMonitor InterruptedException InvocationTargetException progressTitle getString compareProgressTask beginTask progressTitle maxWork RangeDifferencer findRanges OutOfMemoryError InvocationTargetException isCanceled InterruptedException IProgressService progressService getWorkbench getProgressService RangeDifference progressService RangeDifference InvocationTargetException getString tooComplexError getString tooComplexError MessageFormat toString progressService getLongOperationTime MessageDialog openError fComposite getShell InterruptedException RangeDifference aDoc aRegion aDoc aDoc getLength lDoc lRegion lDoc getLength rDoc rRegion rDoc getLength fAllDiffs RangeDifference ancestorStart ancestorEnd ancestorStart getTokenStart ancestorStart ancestorEnd getTokenEnd2 ancestorStart ancestorLength leftStart getTokenStart leftStart leftEnd getTokenEnd2 leftStart leftLength rightStart getTokenStart rightStart rightEnd getTokenEnd2 rightStart rightLength aDoc aRegion ancestorStart ancestorEnd lDoc lRegion leftStart leftEnd rDoc rRegion rightStart rightEnd fAllDiffs ignoreWhiteSpace aDoc ancestorStart ancestorLength lDoc leftStart leftLength rDoc rightStart rightLength fIsWhitespace useChange fChangeDiffs updateDiffBackground lDoc leftStart leftLength rDoc rightStart rightLength aDoc ancestorStart ancestorLength USE_MERGING_TOKEN_DIFF mergingTokenDiff aDoc rDoc lDoc simpleTokenDiff aDoc rDoc lDoc fSubDoc rRegion lRegion aEnd aLen aRegion aDoc aEnd aRegion getOffset aRegion getLength aLen aDoc getLength RangeDifference aDoc aRegion aEnd aLen lDoc lRegion lRegion getOffset lRegion getLength lDoc getLength rDoc rRegion rRegion getOffset rRegion getLength rDoc getLength fAllDiffs
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Interrupted Exception Invocation Target Exception String progress Title Utilities get String bundle compare Progress Task title NON NLS 1 monitor begin Task progress Title max Work sa sl sr try result 0 Range Differencer find Ranges monitor sa sl sr catch Out Of Memory Error ex System gc throw new Invocation Target Exception ex if monitor is Canceled cancelled throw new Interrupted Exception monitor done  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InterruptedException InvocationTargetException progressTitle getString compareProgressTask beginTask progressTitle maxWork RangeDifferencer findRanges OutOfMemoryError InvocationTargetException isCanceled InterruptedException
private Diff find Diff char type int pos I Document a Doc null I Document l Doc f Left get Document I Document r Doc f Right get Document if l Doc null r Doc null return null Position a Region null Position l Region null Position r Region null boolean three Way is Three Way if three Way f Ignore Ancestor a Doc f Ancestor get Document boolean ignore White Space Utilities get Boolean get Compare Configuration Compare Configuration IGNORE WHITESPACE false Doc Line Comparator sright new Doc Line Comparator r Doc to Region r Region ignore White Space Doc Line Comparator sleft new Doc Line Comparator l Doc to Region l Region ignore White Space Doc Line Comparator sancestor null if a Doc null sancestor new Doc Line Comparator a Doc to Region a Region ignore White Space final Resource Bundle bundle get Resource Bundle final Object result new Object 1 final Doc Line Comparator sa sancestor sl sleft sr sright I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Interrupted Exception Invocation Target Exception String progress Title Utilities get String bundle compare Progress Task title NON NLS 1 monitor begin Task progress Title max Work sa sl sr try result 0 Range Differencer find Ranges monitor sa sl sr catch Out Of Memory Error ex System gc throw new Invocation Target Exception ex if monitor is Canceled cancelled throw new Interrupted Exception monitor done I Progress Service progress Service PlatformUI get Workbench get Progress Service Range Difference e null try progress Service run true true runnable e Range Difference result 0 catch Invocation Target Exception ex String title Utilities get String bundle too Complex Error title NON NLS 1 String format Utilities get String bundle too Complex Error format NON NLS 1 String msg Message Format format format new Object Integer to String progress Service get Long Operation Time 1000 Message Dialog open Error f Composite get Shell title msg e null catch Interrupted Exception ex if e null for int i 0 i e length i Range Difference es e i int kind es kind int ancestor Start 0 int ancestor End 0 if sancestor null ancestor Start sancestor get Token Start es ancestor Start ancestor End get Token End2 sancestor es ancestor Start es ancestor Length int left Start sleft get Token Start es left Start int left End get Token End2 sleft es left Start es left Length int right Start sright get Token Start es right Start int right End get Token End2 sright es right Start es right Length Diff diff new Diff null kind a Doc a Region ancestor Start ancestor End l Doc l Region left Start left End r Doc r Region right Start right End if diff is In Range type pos return diff return null  findDiff IDocument aDoc IDocument lDoc fLeft getDocument IDocument rDoc fRight getDocument lDoc rDoc aRegion lRegion rRegion threeWay isThreeWay threeWay fIgnoreAncestor aDoc fAncestor getDocument ignoreWhiteSpace getBoolean getCompareConfiguration CompareConfiguration IGNORE_WHITESPACE DocLineComparator DocLineComparator rDoc toRegion rRegion ignoreWhiteSpace DocLineComparator DocLineComparator lDoc toRegion lRegion ignoreWhiteSpace DocLineComparator aDoc DocLineComparator aDoc toRegion aRegion ignoreWhiteSpace ResourceBundle getResourceBundle DocLineComparator IRunnableWithProgress IRunnableWithProgress IProgressMonitor InterruptedException InvocationTargetException progressTitle getString compareProgressTask beginTask progressTitle maxWork RangeDifferencer findRanges OutOfMemoryError InvocationTargetException isCanceled InterruptedException IProgressService progressService getWorkbench getProgressService RangeDifference progressService RangeDifference InvocationTargetException getString tooComplexError getString tooComplexError MessageFormat toString progressService getLongOperationTime MessageDialog openError fComposite getShell InterruptedException RangeDifference ancestorStart ancestorEnd ancestorStart getTokenStart ancestorStart ancestorEnd getTokenEnd2 ancestorStart ancestorLength leftStart getTokenStart leftStart leftEnd getTokenEnd2 leftStart leftLength rightStart getTokenStart rightStart rightEnd getTokenEnd2 rightStart rightLength aDoc aRegion ancestorStart ancestorEnd lDoc lRegion leftStart leftEnd rDoc rRegion rightStart rightEnd isInRange
Returns true if kind of change should be shown private boolean use Change int kind if kind Range Difference NOCHANGE return false if kind Range Difference ANCESTOR return f Show Pseudo Conflicts return true  useChange RangeDifference RangeDifference fShowPseudoConflicts
private int get Token End I Token Comparator tc int start int count if count 0 return tc get Token Start start int index start count 1 return tc get Token Start index tc get Token Length index  getTokenEnd ITokenComparator getTokenStart getTokenStart getTokenLength
private static int get Token End2 I Token Comparator tc int start int length return tc get Token Start start length  getTokenEnd2 ITokenComparator getTokenStart
Returns the content of lines in the specified range as a String This includes the line separators param doc the document from which to extract the characters param start index of first line param length number of lines return the contents of the specified line range as a String private String extract2 I Document doc I Token Comparator tc int start int length int count tc get Range Count if length 0 count 0 int start Pos tc get Token Start start int end Pos start Pos if length 1 end Pos tc get Token Start start length 1 end Pos tc get Token Length start length 1 int start Pos tc get Token Start start int end Pos if length 1 end Pos start Pos tc get Token Length start else end Pos tc get Token Start start length try return doc get start Pos end Pos start Pos catch Bad Location Exception e silently ignored return NON NLS 1  IDocument ITokenComparator getRangeCount startPos getTokenStart endPos startPos endPos getTokenStart endPos getTokenLength startPos getTokenStart endPos endPos startPos getTokenLength endPos getTokenStart startPos endPos startPos BadLocationException
Performs a token based 3 way diff on the character range specified by the given base Diff private void simple Token Diff final Diff base Diff I Document ancestor Doc String a I Document right Doc String d I Document left Doc String s int ancestor Start 0 I Token Comparator sa null if ancestor Doc null ancestor Start base Diff f Ancestor Pos get Offset sa create Token Comparator a int right Start base Diff f Right Pos get Offset I Token Comparator sm create Token Comparator d int left Start base Diff f Left Pos get Offset I Token Comparator sy create Token Comparator s Range Difference e Range Differencer find Ranges sa sy sm for int i 0 i e length i Range Difference es e i int kind es kind if kind Range Difference NOCHANGE int ancestor Start2 ancestor Start int ancestor End2 ancestor Start if ancestor Doc null ancestor Start2 sa get Token Start es ancestor Start ancestor End2 get Token End sa es ancestor Start es ancestor Length int left Start2 left Start sy get Token Start es left Start int left End2 left Start get Token End sy es left Start es left Length int right Start2 right Start sm get Token Start es right Start int right End2 right Start get Token End sm es right Start es right Length Diff diff new Diff base Diff kind ancestor Doc null ancestor Start2 ancestor End2 left Doc null left Start2 left End2 right Doc null right Start2 right End2 ensure that token diff is smaller than basediff int leftS base Diff f Left Pos offset int leftE base Diff f Left Pos offset base Diff f Left Pos length int rightS base Diff f Right Pos offset int rightE base Diff f Right Pos offset base Diff f Right Pos length if leftS left Start2 leftE left End2 rightS right Start2 rightE right End2 diff f Is Token true add to base Diff base Diff add diff  baseDiff simpleTokenDiff baseDiff IDocument ancestorDoc IDocument rightDoc IDocument leftDoc ancestorStart ITokenComparator ancestorDoc ancestorStart baseDiff fAncestorPos getOffset createTokenComparator rightStart baseDiff fRightPos getOffset ITokenComparator createTokenComparator leftStart baseDiff fLeftPos getOffset ITokenComparator createTokenComparator RangeDifference RangeDifferencer findRanges RangeDifference RangeDifference ancestorStart2 ancestorStart ancestorEnd2 ancestorStart ancestorDoc ancestorStart2 getTokenStart ancestorStart ancestorEnd2 getTokenEnd ancestorStart ancestorLength leftStart2 leftStart getTokenStart leftStart leftEnd2 leftStart getTokenEnd leftStart leftLength rightStart2 rightStart getTokenStart rightStart rightEnd2 rightStart getTokenEnd rightStart rightLength baseDiff ancestorDoc ancestorStart2 ancestorEnd2 leftDoc leftStart2 leftEnd2 rightDoc rightStart2 rightEnd2 baseDiff fLeftPos baseDiff fLeftPos baseDiff fLeftPos baseDiff fRightPos baseDiff fRightPos baseDiff fRightPos leftStart2 leftEnd2 rightStart2 rightEnd2 fIsToken baseDiff
Performs a smart token based 3 way diff on the character range specified by the given base Diff It is smart because it tries to minimize the number of token diffs by merging them private void merging Token Diff Diff base Diff I Document ancestor Doc String a I Document right Doc String d I Document left Doc String s I Token Comparator sa null int ancestor Start 0 if ancestor Doc null sa create Token Comparator a ancestor Start base Diff f Ancestor Pos get Offset int right Start base Diff f Right Pos get Offset I Token Comparator sm create Token Comparator d int left Start base Diff f Left Pos get Offset I Token Comparator sy create Token Comparator s Range Difference r Range Differencer find Ranges sa sy sm for int i 0 i r length i Range Difference es r i determine range of diffs in one line int start i int left Line 1 int right Line 1 try left Line left Doc get Line Of Offset left Start sy get Token Start es left Start right Line right Doc get Line Of Offset right Start sm get Token Start es right Start catch Bad Location Exception e silently ignored i for i r length i es r i try if left Line left Doc get Line Of Offset left Start sy get Token Start es left Start break if right Line right Doc get Line Of Offset right Start sm get Token Start es right Start break catch Bad Location Exception e silently ignored int end i find first diff from left Range Difference first null for int ii start ii end ii es r ii if use Change es kind first es break find first diff from mine Range Difference last null for int ii end 1 ii start ii es r ii if use Change es kind last es break if first null last null int ancestor Start2 0 int ancestor End2 0 if ancestor Doc null ancestor Start2 ancestor Start sa get Token Start first ancestor Start ancestor End2 ancestor Start get Token End sa last ancestor Start last ancestor Length int left Start2 left Start sy get Token Start first left Start int left End2 left Start get Token End sy last left Start last left Length int right Start2 right Start sm get Token Start first right Start int right End2 right Start get Token End sm last right Start last right Length Diff diff new Diff base Diff first kind ancestor Doc null ancestor Start2 ancestor End2 1 left Doc null left Start2 left End2 1 right Doc null right Start2 right End2 1 diff f Is Token true base Diff add diff  baseDiff mergingTokenDiff baseDiff IDocument ancestorDoc IDocument rightDoc IDocument leftDoc ITokenComparator ancestorStart ancestorDoc createTokenComparator ancestorStart baseDiff fAncestorPos getOffset rightStart baseDiff fRightPos getOffset ITokenComparator createTokenComparator leftStart baseDiff fLeftPos getOffset ITokenComparator createTokenComparator RangeDifference RangeDifferencer findRanges RangeDifference leftLine rightLine leftLine leftDoc getLineOfOffset leftStart getTokenStart leftStart rightLine rightDoc getLineOfOffset rightStart getTokenStart rightStart BadLocationException leftLine leftDoc getLineOfOffset leftStart getTokenStart leftStart rightLine rightDoc getLineOfOffset rightStart getTokenStart rightStart BadLocationException RangeDifference useChange RangeDifference useChange ancestorStart2 ancestorEnd2 ancestorDoc ancestorStart2 ancestorStart getTokenStart ancestorStart ancestorEnd2 ancestorStart getTokenEnd ancestorStart ancestorLength leftStart2 leftStart getTokenStart leftStart leftEnd2 leftStart getTokenEnd leftStart leftLength rightStart2 rightStart getTokenStart rightStart rightEnd2 rightStart getTokenEnd rightStart rightLength baseDiff ancestorDoc ancestorStart2 ancestorEnd2 leftDoc leftStart2 leftEnd2 rightDoc rightStart2 rightEnd2 fIsToken baseDiff
private void update Controls boolean left To Right false boolean right To Left false update Status f Current Diff update Resolve Status if f Current Diff null I Merge Viewer Content Provider cp get Merge Content Provider if cp null right To Left cp is Left Editable get Input left To Right cp is Right Editable get Input if f Direction Label null if f Highlight Ranges f Current Diff null is Three Way f Ignore Ancestor f Direction Label set Image f Current Diff get Image else f Direction Label set Image null if f Copy Diff Left To Right Item null Action f Copy Diff Left To Right Item get Action set Enabled left To Right if f Copy Diff Right To Left Item null Action f Copy Diff Right To Left Item get Action set Enabled right To Left boolean enable Navigation false if f Current Diff null f Change Diffs null f Change Diffs size 0 enable Navigation true else if f Change Diffs null f Change Diffs size 1 enable Navigation true else if f Current Diff null f Current Diff f Diffs null enable Navigation true else if f Current Diff null f Current Diff f Is Token enable Navigation true if f Next Item null I Action a f Next Item get Action a set Enabled enable Navigation if f Previous Item null I Action a f Previous Item get Action a set Enabled enable Navigation  updateControls leftToRight rightToLeft updateStatus fCurrentDiff updateResolveStatus fCurrentDiff IMergeViewerContentProvider getMergeContentProvider rightToLeft isLeftEditable getInput leftToRight isRightEditable getInput fDirectionLabel fHighlightRanges fCurrentDiff isThreeWay fIgnoreAncestor fDirectionLabel setImage fCurrentDiff getImage fDirectionLabel setImage fCopyDiffLeftToRightItem fCopyDiffLeftToRightItem getAction setEnabled leftToRight fCopyDiffRightToLeftItem fCopyDiffRightToLeftItem getAction setEnabled rightToLeft enableNavigation fCurrentDiff fChangeDiffs fChangeDiffs enableNavigation fChangeDiffs fChangeDiffs enableNavigation fCurrentDiff fCurrentDiff fDiffs enableNavigation fCurrentDiff fCurrentDiff fIsToken enableNavigation fNextItem IAction fNextItem getAction setEnabled enableNavigation fPreviousItem IAction fPreviousItem getAction setEnabled enableNavigation
private void update Resolve Status RGB rgb null if show ResolveUI we only show red or green if there is at least one incoming or conflicting change int incoming Or Conflicting 0 int unresolved Incoming 0 int unresolved Conflicting 0 if f Change Diffs null Iterator e f Change Diffs iterator while e has Next Diff d Diff e next if d is Incoming Or Conflicting use Change d f Direction d f Is Whitespace incoming Or Conflicting if d f Resolved if d f Direction Range Difference CONFLICT unresolved Conflicting break we can stop here because a conflict has the maximum priority else unresolved Incoming if incoming Or Conflicting 0 if unresolved Conflicting 0 rgb SELECTED CONFLICT else if unresolved Incoming 0 rgb SELECTED INCOMING else rgb RESOLVED if f Header Painter set Color rgb f Summary Header redraw  updateResolveStatus showResolveUI incomingOrConflicting unresolvedIncoming unresolvedConflicting fChangeDiffs fChangeDiffs hasNext isIncomingOrConflicting useChange fDirection fIsWhitespace incomingOrConflicting fResolved fDirection RangeDifference unresolvedConflicting unresolvedIncoming incomingOrConflicting unresolvedConflicting SELECTED_CONFLICT unresolvedIncoming SELECTED_INCOMING fHeaderPainter setColor fSummaryHeader
private void update Status Diff diff if f Show More Info return I Action Bars bars Utilities find Action Bars f Composite if bars null return I Status Line Manager slm bars get Status Line Manager if slm null return String diff Description if diff null diff Description Compare Messages get String Text Merge Viewer diff Description no Diff format NON NLS 1 else if diff f Is Token we don t show special info for token diffs diff diff f Parent String format Compare Messages get String Text Merge Viewer diff Description diff format NON NLS 1 diff Description Message Format format format new String get Diff Type diff 0 diff type get Diff Number diff 1 diff number get Diff Range f Left diff f Left Pos 2 left start line get Diff Range f Right diff f Right Pos 3 left end line String format Compare Messages get String Text Merge Viewer status Line format NON NLS 1 String s Message Format format format new String get Cursor Position f Left 0 left column get Cursor Position f Right 1 right column diff Description 2 diff description slm set Message s  updateStatus fShowMoreInfo IActionBars findActionBars fComposite IStatusLineManager getStatusLineManager diffDescription diffDescription CompareMessages getString TextMergeViewer diffDescription noDiff fIsToken fParent CompareMessages getString TextMergeViewer diffDescription diffDescription MessageFormat getDiffType getDiffNumber getDiffRange fLeft fLeftPos getDiffRange fRight fRightPos CompareMessages getString TextMergeViewer statusLine MessageFormat getCursorPosition fLeft getCursorPosition fRight diffDescription setMessage
private void clear Status I Action Bars bars Utilities find Action Bars f Composite if bars null return I Status Line Manager slm bars get Status Line Manager if slm null return slm set Message null  clearStatus IActionBars findActionBars fComposite IStatusLineManager getStatusLineManager setMessage
private String get Diff Type Diff diff String s NON NLS 1 switch diff f Direction case Range Difference LEFT s Compare Messages get String Text Merge Viewer direction outgoing NON NLS 1 break case Range Difference RIGHT s Compare Messages get String Text Merge Viewer direction incoming NON NLS 1 break case Range Difference CONFLICT s Compare Messages get String Text Merge Viewer direction conflicting NON NLS 1 break String format Compare Messages get String Text Merge Viewer diff Type format NON NLS 1 return Message Format format format new String s diff change Type  getDiffType fDirection RangeDifference CompareMessages getString TextMergeViewer RangeDifference CompareMessages getString TextMergeViewer RangeDifference CompareMessages getString TextMergeViewer CompareMessages getString TextMergeViewer diffType MessageFormat changeType
private String get Diff Number Diff diff find the diff s number int diff Number 0 if f Change Diffs null Iterator e f Change Diffs iterator while e has Next Diff d Diff e next diff Number if d diff break return Integer to String diff Number  getDiffNumber diffNumber fChangeDiffs fChangeDiffs hasNext diffNumber toString diffNumber
private String get Diff Range Merge Source Viewer v Position pos Point p v get Line Range pos new Point 0 0 int start Line p x 1 int end Line p x p y String format if end Line start Line format Compare Messages get String Text Merge Viewer before Line format NON NLS 1 else format Compare Messages get String Text Merge Viewer range format NON NLS 1 return Message Format format format new String Integer to String start Line Integer to String end Line  getDiffRange MergeSourceViewer getLineRange startLine endLine endLine startLine CompareMessages getString TextMergeViewer beforeLine CompareMessages getString TextMergeViewer MessageFormat toString startLine toString endLine
Returns a description of the cursor position return a description of the cursor position private String get Cursor Position Merge Source Viewer v if v null Styled Text styled Text v get Text Widget I Document document v get Document if document null int offset v get Visible Region get Offset int caret offset styled Text get Caret Offset try int line document get Line Of Offset caret int line Offset document get Line Offset line int occurrences 0 for int i line Offset i caret i if t document get Char i occurrences int tab Width styled Text get Tabs int column caret line Offset tab Width 1 occurrences String format Compare Messages get String Text Merge Viewer cursor Position format NON NLS 1 return Message Format format format new String Integer to String line 1 Integer to String column 1 catch Bad Location Exception x silently ignored return NON NLS 1  getCursorPosition MergeSourceViewer StyledText styledText getTextWidget IDocument getDocument getVisibleRegion getOffset styledText getCaretOffset getLineOfOffset lineOffset getLineOffset lineOffset getChar tabWidth styledText getTabs lineOffset tabWidth CompareMessages getString TextMergeViewer cursorPosition MessageFormat toString toString BadLocationException
protected void update Header super update Header update Controls  updateHeader updateHeader updateControls
final String ignore Ancestor Action Key action Ignore Ancestor NON NLS 1 Action ignore Ancestor Action new Action public void run set Ignore Ancestor f Ignore Ancestor Utilities init Toggle Action this get Resource Bundle ignore Ancestor Action Key f Ignore Ancestor  ignoreAncestorActionKey IgnoreAncestor ignoreAncestorAction setIgnoreAncestor fIgnoreAncestor initToggleAction getResourceBundle ignoreAncestorActionKey fIgnoreAncestor
Action a new Action public void run navigate true true true 
a new Action public void run navigate false true true 
if cc is Right Editable a new Action public void run copy Diff Left To Right  isRightEditable copyDiffLeftToRight
if cc is Left Editable a new Action public void run copy Diff Right To Left  isLeftEditable copyDiffRightToLeft
Creates the two items for copying a difference range from one side to the other and adds them to the given toolbar manager protected void create Tool Items Tool Bar Manager tbm I Workbench Part Site ps Utilities find Site f Composite f Key Binding Service ps null ps get Key Binding Service null final String ignore Ancestor Action Key action Ignore Ancestor NON NLS 1 Action ignore Ancestor Action new Action public void run set Ignore Ancestor f Ignore Ancestor Utilities init Toggle Action this get Resource Bundle ignore Ancestor Action Key f Ignore Ancestor ignore Ancestor Action set Checked f Ignore Ancestor Utilities init Action ignore Ancestor Action get Resource Bundle ignore Ancestor Action Key Utilities init Toggle Action ignore Ancestor Action get Resource Bundle ignore Ancestor Action Key f Ignore Ancestor f Ignore Ancestor Item new Action Contribution Item ignore Ancestor Action f Ignore Ancestor Item set Visible false tbm append To Group modes f Ignore Ancestor Item NON NLS 1 tbm add new Separator Action a new Action public void run navigate true true true Utilities init Action a get Resource Bundle action Next Diff NON NLS 1 f Next Item new Action Contribution Item a tbm append To Group navigation f Next Item NON NLS 1 Utilities register Action f Key Binding Service a org eclipse compare select Next Change NON NLS 1 a new Action public void run navigate false true true Utilities init Action a get Resource Bundle action Prev Diff NON NLS 1 f Previous Item new Action Contribution Item a tbm append To Group navigation f Previous Item NON NLS 1 Utilities register Action f Key Binding Service a org eclipse compare select Previous Change NON NLS 1 Compare Configuration cc get Compare Configuration if cc is Right Editable a new Action public void run copy Diff Left To Right Utilities init Action a get Resource Bundle action Copy Diff Left To Right NON NLS 1 f Copy Diff Left To Right Item new Action Contribution Item a f Copy Diff Left To Right Item set Visible true tbm append To Group merge f Copy Diff Left To Right Item NON NLS 1 Utilities register Action f Key Binding Service a org eclipse compare copy Left To Right NON NLS 1 if cc is Left Editable a new Action public void run copy Diff Right To Left Utilities init Action a get Resource Bundle action Copy Diff Right To Left NON NLS 1 f Copy Diff Right To Left Item new Action Contribution Item a f Copy Diff Right To Left Item set Visible true tbm append To Group merge f Copy Diff Right To Left Item NON NLS 1 Utilities register Action f Key Binding Service a org eclipse compare copy Right To Left NON NLS 1  createToolItems ToolBarManager IWorkbenchPartSite findSite fComposite fKeyBindingService getKeyBindingService ignoreAncestorActionKey IgnoreAncestor ignoreAncestorAction setIgnoreAncestor fIgnoreAncestor initToggleAction getResourceBundle ignoreAncestorActionKey fIgnoreAncestor ignoreAncestorAction setChecked fIgnoreAncestor initAction ignoreAncestorAction getResourceBundle ignoreAncestorActionKey initToggleAction ignoreAncestorAction getResourceBundle ignoreAncestorActionKey fIgnoreAncestor fIgnoreAncestorItem ActionContributionItem ignoreAncestorAction fIgnoreAncestorItem setVisible appendToGroup fIgnoreAncestorItem initAction getResourceBundle NextDiff fNextItem ActionContributionItem appendToGroup fNextItem registerAction fKeyBindingService selectNextChange initAction getResourceBundle PrevDiff fPreviousItem ActionContributionItem appendToGroup fPreviousItem registerAction fKeyBindingService selectPreviousChange CompareConfiguration getCompareConfiguration isRightEditable copyDiffLeftToRight initAction getResourceBundle CopyDiffLeftToRight fCopyDiffLeftToRightItem ActionContributionItem fCopyDiffLeftToRightItem setVisible appendToGroup fCopyDiffLeftToRightItem registerAction fKeyBindingService copyLeftToRight isLeftEditable copyDiffRightToLeft initAction getResourceBundle CopyDiffRightToLeft fCopyDiffRightToLeftItem ActionContributionItem fCopyDiffRightToLeftItem setVisible appendToGroup fCopyDiffRightToLeftItem registerAction fKeyBindingService copyRightToLeft
package void property Change Property Change Event event String key event get Property if key equals Compare Configuration IGNORE WHITESPACE key equals Compare Preference Page SHOW PSEUDO CONFLICTS f Show Pseudo Conflicts f Preference Store get Boolean Compare Preference Page SHOW PSEUDO CONFLICTS clear stuff f Current Diff null f Change Diffs null f All Diffs null do Diff update Controls invalidate Lines updateV Scroll Bar refresh Birds Eye View select First Diff else if key equals Compare Preference Page USE SPLINES f Use Splines f Preference Store get Boolean Compare Preference Page USE SPLINES invalidate Lines else if key equals Compare Preference Page USE SINGLE LINE f Use Single Line f Preference Store get Boolean Compare Preference Page USE SINGLE LINE f Use ResolveUI f Use Single Line f Basic Center Curve null update Resolve Status invalidate Lines else if key equals Compare Preference Page USE RESOLVE UI f Use ResolveUI f Preference Store get Boolean Compare Preference Page USE RESOLVE UI update Resolve Status invalidate Lines else if key equals f Symbolic Font Name update Font invalidate Lines else if key equals INCOMING COLOR key equals OUTGOING COLOR key equals CONFLICTING COLOR key equals RESOLVED COLOR update Colors null invalidate Lines else if key equals Compare Preference Page SYNCHRONIZE SCROLLING boolean b f Preference Store get Boolean Compare Preference Page SYNCHRONIZE SCROLLING if b f Synchronized Scrolling toggle Synch Mode else if key equals Compare Preference Page SHOW MORE INFO boolean b f Preference Store get Boolean Compare Preference Page SHOW MORE INFO if b f Show More Info f Show More Info b if f Show More Info update Status f Current Diff else clear Status else super property Change event  propertyChange PropertyChangeEvent getProperty CompareConfiguration IGNORE_WHITESPACE ComparePreferencePage SHOW_PSEUDO_CONFLICTS fShowPseudoConflicts fPreferenceStore getBoolean ComparePreferencePage SHOW_PSEUDO_CONFLICTS fCurrentDiff fChangeDiffs fAllDiffs doDiff updateControls invalidateLines updateVScrollBar refreshBirdsEyeView selectFirstDiff ComparePreferencePage USE_SPLINES fUseSplines fPreferenceStore getBoolean ComparePreferencePage USE_SPLINES invalidateLines ComparePreferencePage USE_SINGLE_LINE fUseSingleLine fPreferenceStore getBoolean ComparePreferencePage USE_SINGLE_LINE fUseResolveUI fUseSingleLine fBasicCenterCurve updateResolveStatus invalidateLines ComparePreferencePage USE_RESOLVE_UI fUseResolveUI fPreferenceStore getBoolean ComparePreferencePage USE_RESOLVE_UI updateResolveStatus invalidateLines fSymbolicFontName updateFont invalidateLines INCOMING_COLOR OUTGOING_COLOR CONFLICTING_COLOR RESOLVED_COLOR updateColors invalidateLines ComparePreferencePage SYNCHRONIZE_SCROLLING fPreferenceStore getBoolean ComparePreferencePage SYNCHRONIZE_SCROLLING fSynchronizedScrolling toggleSynchMode ComparePreferencePage SHOW_MORE_INFO fPreferenceStore getBoolean ComparePreferencePage SHOW_MORE_INFO fShowMoreInfo fShowMoreInfo fShowMoreInfo updateStatus fCurrentDiff clearStatus propertyChange
private void set Ignore Ancestor boolean ignore if ignore f Ignore Ancestor f Ignore Ancestor ignore set Ancestor Visibility false f Ignore Ancestor clear stuff f Current Diff null f Change Diffs null f All Diffs null do Diff invalidate Lines updateV Scroll Bar refresh Birds Eye View select First Diff  setIgnoreAncestor fIgnoreAncestor fIgnoreAncestor setAncestorVisibility fIgnoreAncestor fCurrentDiff fChangeDiffs fAllDiffs doDiff invalidateLines updateVScrollBar refreshBirdsEyeView selectFirstDiff
private void select First Diff if f Left null f Right null return if f Left get Document null f Right get Document null return Diff first Diff null if Compare Navigator get Direction f Composite first Diff find Next f Right f Change Diffs 1 1 false else first Diff find Prev f Right f Change Diffs 9999999 9999999 false set Current Diff first Diff true  selectFirstDiff fLeft fRight fLeft getDocument fRight getDocument firstDiff CompareNavigator getDirection fComposite firstDiff findNext fRight fChangeDiffs firstDiff findPrev fRight fChangeDiffs setCurrentDiff firstDiff
private void toggle Synch Mode f Synchronized Scrolling f Synchronized Scrolling scroll Vertical 0 0 0 null throw away central control Sash or Canvas Control center get Center if center null center is Disposed center dispose f Left get Text Widget get Vertical Bar set Visible f Synchronized Scrolling f Right get Text Widget get Vertical Bar set Visible f Synchronized Scrolling f Composite layout true  toggleSynchMode fSynchronizedScrolling fSynchronizedScrolling scrollVertical getCenter isDisposed fLeft getTextWidget getVerticalBar setVisible fSynchronizedScrolling fRight getTextWidget getVerticalBar setVisible fSynchronizedScrolling fComposite
protected void update Tool Items if f Ignore Ancestor Item null f Ignore Ancestor Item set Visible is Three Way if f Copy Diff Left To Right Item null I Action a f Copy Diff Left To Right Item get Action if a null a set Enabled a is Enabled f Has Errors if f Copy Diff Right To Left Item null I Action a f Copy Diff Right To Left Item get Action if a null a set Enabled a is Enabled f Has Errors super update Tool Items  updateToolItems fIgnoreAncestorItem fIgnoreAncestorItem setVisible isThreeWay fCopyDiffLeftToRightItem IAction fCopyDiffLeftToRightItem getAction setEnabled isEnabled fHasErrors fCopyDiffRightToLeftItem IAction fCopyDiffRightToLeftItem getAction setEnabled isEnabled fHasErrors updateToolItems
private void update Lines I Document d boolean left false boolean right false FIXME this optimization is incorrect because it doesn t take replace operations into account where the old and new line count does not differ if d f Left get Document int l f Left get Line Count left f Left Line Count l f Left Line Count l else if d f Right get Document int l f Right get Line Count right f Right Line Count l f Right Line Count l if left right if left if f Left Canvas null f Left Canvas redraw else if f Right Canvas null f Right Canvas redraw Control center get Center if center null center redraw updateV Scroll Bar refresh Birds Eye View  updateLines IDocument fLeft getDocument fLeft getLineCount fLeftLineCount fLeftLineCount fRight getDocument fRight getLineCount fRightLineCount fRightLineCount fLeftCanvas fLeftCanvas fRightCanvas fRightCanvas getCenter updateVScrollBar refreshBirdsEyeView
private void invalidate Lines if is Three Way if Utilities ok To Use f Ancestor Canvas f Ancestor Canvas redraw if f Ancestor null f Ancestor is Control Ok To Use f Ancestor get Text Widget redraw if Utilities ok To Use f Left Canvas f Left Canvas redraw if f Left null f Left is Control Ok To Use f Left get Text Widget redraw if Utilities ok To Use get Center get Center redraw if f Right null f Right is Control Ok To Use f Right get Text Widget redraw if Utilities ok To Use f Right Canvas f Right Canvas redraw  invalidateLines isThreeWay okToUse fAncestorCanvas fAncestorCanvas fAncestor fAncestor isControlOkToUse fAncestor getTextWidget okToUse fLeftCanvas fLeftCanvas fLeft fLeft isControlOkToUse fLeft getTextWidget okToUse getCenter getCenter fRight fRight isControlOkToUse fRight getTextWidget okToUse fRightCanvas fRightCanvas
private boolean show ResolveUI if f Use ResolveUI is Three Way f Ignore Ancestor return false Compare Configuration cc get Compare Configuration if cc null return false we only enable the new resolve ui if exactly one side is editable boolean l cc is Left Editable boolean r cc is Right Editable return l r r l return l r  showResolveUI fUseResolveUI isThreeWay fIgnoreAncestor CompareConfiguration getCompareConfiguration isLeftEditable isRightEditable
private void paint Center Canvas canvas GC g Display display canvas get Display check For Color Update display if f Synchronized Scrolling return int line Height f Left get Text Widget get Line Height int visible Height f Right get Viewport Height Point size canvas get Size int x 0 int w size x g set Background canvas get Background g fill Rectangle x 1 0 w 2 size y if f Is Motif draw thin line between center ruler and both texts g set Background display get System Color SWT COLOR WIDGET NORMAL SHADOW g fill Rectangle 0 0 1 size y g fill Rectangle w 1 0 1 size y if f Highlight Ranges return boolean show ResolveUI show ResolveUI if f Change Diffs null int lshift f Left get Vertical Scroll Offset int rshift f Right get Vertical Scroll Offset Point region new Point 0 0 Iterator e f Change Diffs iterator while e has Next Diff diff Diff e next if diff is Deleted continue if f Show Current Only2 is Current Diff diff continue f Left get Line Range diff f Left Pos region int ly region x line Height lshift int lh region y line Height f Right get Line Range diff f Right Pos region int ry region x line Height rshift int rh region y line Height if Math max ly lh ry rh 0 continue if Math min ly ry visible Height break f Pts 0 x f Pts 1 ly f Pts 2 w f Pts 3 ry f Pts 6 x f Pts 7 ly lh f Pts 4 w f Pts 5 ry rh Color fill Color get Color display get Fill Color diff Color stroke Color get Color display get Stroke Color diff if f Use Single Line int w2 3 g set Background fill Color g fill Rectangle 0 ly w2 lh left g fill Rectangle w w2 ry w2 rh right g set Line Width LW g set Foreground stroke Color g draw Rectangle 0 1 ly w2 lh left g draw Rectangle w w2 ry w2 rh right if f Use Splines int points get Center Curve Points w2 ly lh 2 w w2 ry rh 2 for int i 1 i points length i g draw Line w2 i 1 points i 1 w2 i points i else g draw Line w2 ly lh 2 w w2 ry rh 2 else two lines if f Use Splines g set Background fill Color g set Line Width LW g set Foreground stroke Color int top Points get Center Curve Points f Pts 0 f Pts 1 f Pts 2 f Pts 3 int bottom Points get Center Curve Points f Pts 6 f Pts 7 f Pts 4 f Pts 5 g set Foreground fill Color g draw Line 0 bottom Points 0 0 top Points 0 for int i 1 i bottom Points length i g set Foreground fill Color g draw Line i bottom Points i i top Points i g set Foreground stroke Color g draw Line i 1 top Points i 1 i top Points i g draw Line i 1 bottom Points i 1 i bottom Points i else g set Background fill Color g fill Polygon f Pts g set Line Width LW g set Foreground stroke Color g draw Line f Pts 0 f Pts 1 f Pts 2 f Pts 3 g draw Line f Pts 6 f Pts 7 f Pts 4 f Pts 5 if f Use Single Line show ResolveUI diff is Unresolved Incoming Or Conflicting draw resolve state int cx w RESOLVE SIZE 2 int cy ly lh 2 ry rh 2 RESOLVE SIZE 2 g set Background fill Color g fill Rectangle cx cy RESOLVE SIZE RESOLVE SIZE g set Foreground stroke Color g draw Rectangle cx cy RESOLVE SIZE RESOLVE SIZE  paintCenter getDisplay checkForColorUpdate fSynchronizedScrolling lineHeight fLeft getTextWidget getLineHeight visibleHeight fRight getViewportHeight getSize setBackground getBackground fillRectangle fIsMotif setBackground getSystemColor COLOR_WIDGET_NORMAL_SHADOW fillRectangle fillRectangle fHighlightRanges showResolveUI showResolveUI fChangeDiffs fLeft getVerticalScrollOffset fRight getVerticalScrollOffset fChangeDiffs hasNext isDeleted fShowCurrentOnly2 isCurrentDiff fLeft getLineRange fLeftPos lineHeight lineHeight fRight getLineRange fRightPos lineHeight lineHeight visibleHeight fPts fPts fPts fPts fPts fPts fPts fPts fillColor getColor getFillColor strokeColor getColor getStrokeColor fUseSingleLine setBackground fillColor fillRectangle fillRectangle setLineWidth setForeground strokeColor drawRectangle drawRectangle fUseSplines getCenterCurvePoints drawLine drawLine fUseSplines setBackground fillColor setLineWidth setForeground strokeColor topPoints getCenterCurvePoints fPts fPts fPts fPts bottomPoints getCenterCurvePoints fPts fPts fPts fPts setForeground fillColor drawLine bottomPoints topPoints bottomPoints setForeground fillColor drawLine bottomPoints topPoints setForeground strokeColor drawLine topPoints topPoints drawLine bottomPoints bottomPoints setBackground fillColor fillPolygon fPts setLineWidth setForeground strokeColor drawLine fPts fPts fPts fPts drawLine fPts fPts fPts fPts fUseSingleLine showResolveUI isUnresolvedIncomingOrConflicting RESOLVE_SIZE RESOLVE_SIZE setBackground fillColor fillRectangle RESOLVE_SIZE RESOLVE_SIZE setForeground strokeColor drawRectangle RESOLVE_SIZE RESOLVE_SIZE
private int get Center Curve Points int startx int starty int endx int endy if f Basic Center Curve null build Base Center Curve endx startx double height endy starty height height 2 int width endx startx int points new int width for int i 0 i width i points i int height f Basic Center Curve i height starty return points  getCenterCurvePoints fBasicCenterCurve buildBaseCenterCurve fBasicCenterCurve
private void build Base Center Curve int w double width w f Basic Center Curve new double get Center Width for int i 0 i get Center Width i double r i width f Basic Center Curve i Math cos Math PI r  buildBaseCenterCurve fBasicCenterCurve getCenterWidth getCenterWidth fBasicCenterCurve
private void paint Sides GC g Merge Source Viewer tp Canvas canvas boolean right Display display canvas get Display int line Height tp get Text Widget get Line Height int visible Height tp get Viewport Height Point size canvas get Size int x 0 int w f Margin Width int w2 w 2 g set Background canvas get Background g fill Rectangle x 0 w size y if f Is Motif draw thin line between ruler and text g set Background display get System Color SWT COLOR WIDGET NORMAL SHADOW if right g fill Rectangle 0 0 1 size y else g fill Rectangle size x 1 0 1 size y if f Highlight Ranges return if f Change Diffs null int shift tp get Vertical Scroll Offset 2 LW Point region new Point 0 0 Iterator e f Change Diffs iterator while e has Next Diff diff Diff e next if diff is Deleted continue if f Show Current Only2 is Current Diff diff continue tp get Line Range diff get Position tp region int y region x line Height shift int h region y line Height if y h 0 continue if y visible Height break g set Background get Color display get Fill Color diff if right g fill Rectangle x y w2 h else g fill Rectangle x w2 y w2 h g set Line Width LW g set Foreground get Color display get Stroke Color diff if right g draw Rectangle x 1 y 1 w2 h else g draw Rectangle x w2 y 1 w2 h  paintSides MergeSourceViewer getDisplay lineHeight getTextWidget getLineHeight visibleHeight getViewportHeight getSize fMarginWidth setBackground getBackground fillRectangle fIsMotif setBackground getSystemColor COLOR_WIDGET_NORMAL_SHADOW fillRectangle fillRectangle fHighlightRanges fChangeDiffs getVerticalScrollOffset fChangeDiffs hasNext isDeleted fShowCurrentOnly2 isCurrentDiff getLineRange getPosition lineHeight lineHeight visibleHeight setBackground getColor getFillColor fillRectangle fillRectangle setLineWidth setForeground getColor getStrokeColor drawRectangle drawRectangle
private void paint Paint Event event Merge Source Viewer tp if f Highlight Ranges return if f Change Diffs null return Control canvas Control event widget GC g event gc Display display canvas get Display int line Height tp get Text Widget get Line Height int w canvas get Size x int shift tp get Vertical Scroll Offset 2 LW int maxh event y event height visible Height if f Is Motif shift f Top Inset Point range new Point 0 0 Iterator e f Change Diffs iterator while e has Next Diff diff Diff e next if diff is Deleted continue if f Show Current Only is Current Diff diff continue tp get Line Range diff get Position tp range int y range x line Height shift int h range y line Height if y h event y continue if y maxh break g set Background get Color display get Stroke Color diff g fill Rectangle 0 y 1 w LW g fill Rectangle 0 y h 1 w LW  PaintEvent MergeSourceViewer fHighlightRanges fChangeDiffs getDisplay lineHeight getTextWidget getLineHeight getSize getVerticalScrollOffset visibleHeight fIsMotif fTopInset fChangeDiffs hasNext isDeleted fShowCurrentOnly isCurrentDiff getLineRange getPosition lineHeight lineHeight setBackground getColor getStrokeColor fillRectangle fillRectangle
private RGB get Fill Color Diff diff boolean selected f Current Diff null f Current Diff f Parent diff RGB selected fill get Background null if is Three Way f Ignore Ancestor switch diff f Direction case Range Difference RIGHT if f Left Is Local return selected selected fill INCOMING FILL return selected selected fill OUTGOING FILL case Range Difference ANCESTOR return selected selected fill CONFLICT FILL case Range Difference LEFT if f Left Is Local return selected selected fill OUTGOING FILL return selected selected fill INCOMING FILL case Range Difference CONFLICT return selected selected fill CONFLICT FILL return null return selected selected fill OUTGOING FILL  getFillColor fCurrentDiff fCurrentDiff fParent selected_fill getBackground isThreeWay fIgnoreAncestor fDirection RangeDifference fLeftIsLocal selected_fill INCOMING_FILL selected_fill OUTGOING_FILL RangeDifference selected_fill CONFLICT_FILL RangeDifference fLeftIsLocal selected_fill OUTGOING_FILL selected_fill INCOMING_FILL RangeDifference selected_fill CONFLICT_FILL selected_fill OUTGOING_FILL
private RGB get Stroke Color Diff diff boolean selected f Current Diff null f Current Diff f Parent diff if is Three Way f Ignore Ancestor switch diff f Direction case Range Difference RIGHT if f Left Is Local return selected SELECTED INCOMING INCOMING return selected SELECTED OUTGOING OUTGOING case Range Difference ANCESTOR return selected SELECTED CONFLICT CONFLICT case Range Difference LEFT if f Left Is Local return selected SELECTED OUTGOING OUTGOING return selected SELECTED INCOMING INCOMING case Range Difference CONFLICT return selected SELECTED CONFLICT CONFLICT return null return selected SELECTED OUTGOING OUTGOING  getStrokeColor fCurrentDiff fCurrentDiff fParent isThreeWay fIgnoreAncestor fDirection RangeDifference fLeftIsLocal SELECTED_INCOMING SELECTED_OUTGOING RangeDifference SELECTED_CONFLICT RangeDifference fLeftIsLocal SELECTED_OUTGOING SELECTED_INCOMING RangeDifference SELECTED_CONFLICT SELECTED_OUTGOING
private Color get Color Display display RGB rgb if rgb null return null if f Colors null f Colors new Hash Map 20 Color c Color f Colors get rgb if c null c new Color display rgb f Colors put rgb c return c  getColor fColors fColors HashMap fColors fColors
static RGB interpolate RGB fg RGB bg double scale if fg null bg null return new RGB int 1 0 scale fg red scale bg red int 1 0 scale fg green scale bg green int 1 0 scale fg blue scale bg blue if fg null return fg if bg null return bg return new RGB 128 128 128 a gray 
Returns true if end or beginning of document reached private boolean navigate boolean down boolean wrap boolean deep Diff diff null for if f Change Diffs null Merge Source Viewer part f Focus Part if part null part f Right if part null Point s part get Selected Range if down diff find Next part f Change Diffs s x s x s y deep else diff find Prev part f Change Diffs s x s x s y deep if diff null at end or beginning if wrap if f End Of Doc Reached f End Of Doc Reached true if end Of Document Reached down return true f End Of Doc Reached false if f Change Diffs null f Change Diffs size 0 if down diff Diff f Change Diffs get 0 else diff Diff f Change Diffs get f Change Diffs size 1 else f End Of Doc Reached false return true set Current Diff diff true if diff null diff f Direction Range Difference ANCESTOR get Ancestor Enabled continue break return false  fChangeDiffs MergeSourceViewer fFocusPart fRight getSelectedRange findNext fChangeDiffs findPrev fChangeDiffs fEndOfDocReached fEndOfDocReached endOfDocumentReached fEndOfDocReached fChangeDiffs fChangeDiffs fChangeDiffs fChangeDiffs fChangeDiffs fEndOfDocReached setCurrentDiff fDirection RangeDifference getAncestorEnabled
private boolean end Of Document Reached boolean down Control c get Control if Utilities ok To Use c c get Display beep String key down at End at Beginning NON NLS 1 NON NLS 2 return Message Dialog open Question c get Shell Compare Messages get String Text Merge Viewer key title NON NLS 1 NON NLS 2 Compare Messages get String Text Merge Viewer key message NON NLS 1 NON NLS 2 return false  endOfDocumentReached getControl okToUse getDisplay atEnd atBeginning MessageDialog openQuestion getShell CompareMessages getString TextMergeViewer CompareMessages getString TextMergeViewer
Find the Diff that overlaps with the given Text Part s text range If the range doesn t overlap with any range code null code is returned private Diff find Diff Merge Source Viewer tp int range Start int range End if f Change Diffs null Iterator e f Change Diffs iterator while e has Next Diff diff Diff e next if diff overlaps tp range Start range End return diff return null  TextPart findDiff MergeSourceViewer rangeStart rangeEnd fChangeDiffs fChangeDiffs hasNext rangeStart rangeEnd
private static Diff find Next Merge Source Viewer tp List v int start int end boolean deep for int i 0 i v size i Diff diff Diff v get i Position p diff get Position tp if p null int start Offset p get Offset if end start Offset return diff if deep diff f Diffs null Diff d null int end Offset start Offset p get Length if start start Offset end end Offset end end Offset 1 d find Next tp diff f Diffs start 1 start 1 deep else if end end Offset d find Next tp diff f Diffs start end deep if d null return d return null  findNext MergeSourceViewer getPosition startOffset getOffset startOffset fDiffs endOffset startOffset getLength startOffset endOffset endOffset findNext fDiffs endOffset findNext fDiffs
private static Diff find Prev Merge Source Viewer tp List v int start int end boolean deep for int i v size 1 i 0 i Diff diff Diff v get i Position p diff get Position tp if p null int start Offset p get Offset int end Offset start Offset p get Length if start end Offset return diff if deep diff f Diffs null Diff d null if start start Offset end end Offset d find Prev tp diff f Diffs end end deep else if start start Offset d find Prev tp diff f Diffs start end deep if d null return d return null  findPrev MergeSourceViewer getPosition startOffset getOffset endOffset startOffset getLength endOffset fDiffs startOffset endOffset findPrev fDiffs startOffset findPrev fDiffs
private void set Current Diff Diff d boolean reveal And Select if d f Current Diff return if f Center Button null f Center Button set Visible false f End Of Doc Reached false Diff old Diff f Current Diff if d null reveal And Select before we set f Current Diff we change the selection so that the paint code uses the old background colors otherwise selection isn t drawn correctly if is Three Way f Ignore Ancestor f Ancestor set Selection d f Ancestor Pos f Left set Selection d f Left Pos f Right set Selection d f Right Pos now switch diffs f Current Diff d reveal Diff d d f Is Token else f Current Diff d Diff d1 old Diff null old Diff f Parent null Diff d2 f Current Diff null f Current Diff f Parent null if d1 d2 update Diff Background d1 update Diff Background d2 update Controls invalidate Lines refresh Birds Eye View  setCurrentDiff revealAndSelect fCurrentDiff fCenterButton fCenterButton setVisible fEndOfDocReached oldDiff fCurrentDiff revealAndSelect fCurrentDiff isThreeWay fIgnoreAncestor fAncestor setSelection fAncestorPos fLeft setSelection fLeftPos fRight setSelection fRightPos fCurrentDiff revealDiff fIsToken fCurrentDiff oldDiff oldDiff fParent fCurrentDiff fCurrentDiff fParent updateDiffBackground updateDiffBackground updateControls invalidateLines refreshBirdsEyeView
Smart determines whether private void reveal Diff Diff d boolean smart boolean ancestor Is Visible false boolean left Is Visible false boolean right Is Visible false if smart Point region new Point 0 0 find the starting line of the diff in all text widgets int ls f Left get Line Range d f Left Pos region x int rs f Right get Line Range d f Right Pos region x if is Three Way f Ignore Ancestor int as f Ancestor get Line Range d f Ancestor Pos region x if as f Ancestor get Top Index as f Ancestor get Bottom Index ancestor Is Visible true if ls f Left get Top Index ls f Left get Bottom Index left Is Visible true if rs f Right get Top Index rs f Right get Bottom Index right Is Visible true vertical scrolling if left Is Visible right Is Visible int avpos 0 lvpos 0 rvpos 0 Merge Source Viewer all But This null if left Is Visible avpos lvpos rvpos real To Virtual Position f Left f Left get Top Index all But This f Left else if right Is Visible avpos lvpos rvpos real To Virtual Position f Right f Right get Top Index all But This f Right else if ancestor Is Visible avpos lvpos rvpos real To Virtual Position f Ancestor f Ancestor get Top Index all But This f Ancestor else if f All Diffs null int vpos 0 Iterator e f All Diffs iterator for int i 0 e has Next i Diff diff Diff e next if diff d break if f Synchronized Scrolling vpos diff get Max Diff Height f Show Ancestor else avpos diff get Ancestor Height lvpos diff get Left Height rvpos diff get Right Height if f Synchronized Scrolling avpos lvpos rvpos vpos int delta f Right get Viewport Lines 4 avpos delta if avpos 0 avpos 0 lvpos delta if lvpos 0 lvpos 0 rvpos delta if rvpos 0 rvpos 0 scroll Vertical avpos lvpos rvpos all But This if fV Scroll Bar null fV Scroll Bar set Selection avpos horizontal scrolling if d f Is Token we only scroll horizontally for token diffs reveal f Ancestor d f Ancestor Pos reveal f Left d f Left Pos reveal f Right d f Right Pos else in all other cases we reset the horizontal offset hscroll f Ancestor hscroll f Left hscroll f Right  revealDiff ancestorIsVisible leftIsVisible rightIsVisible fLeft getLineRange fLeftPos fRight getLineRange fRightPos isThreeWay fIgnoreAncestor fAncestor getLineRange fAncestorPos fAncestor getTopIndex fAncestor getBottomIndex ancestorIsVisible fLeft getTopIndex fLeft getBottomIndex leftIsVisible fRight getTopIndex fRight getBottomIndex rightIsVisible leftIsVisible rightIsVisible MergeSourceViewer allButThis leftIsVisible realToVirtualPosition fLeft fLeft getTopIndex allButThis fLeft rightIsVisible realToVirtualPosition fRight fRight getTopIndex allButThis fRight ancestorIsVisible realToVirtualPosition fAncestor fAncestor getTopIndex allButThis fAncestor fAllDiffs fAllDiffs hasNext fSynchronizedScrolling getMaxDiffHeight fShowAncestor getAncestorHeight getLeftHeight getRightHeight fSynchronizedScrolling fRight getViewportLines scrollVertical allButThis fVScrollBar fVScrollBar setSelection fIsToken fAncestor fAncestorPos fLeft fLeftPos fRight fRightPos fAncestor fLeft fRight
private static void reveal Merge Source Viewer v Position p if v null p null Styled Text st v get Text Widget if st null Rectangle r st get Client Area if r is Empty workaround for 7320 Next diff scrolls when going into current diff v reveal Range p offset p length  MergeSourceViewer StyledText getTextWidget getClientArea isEmpty revealRange
private static void hscroll Merge Source Viewer v if v null Styled Text st v get Text Widget if st null st set Horizontal Index 0  MergeSourceViewer StyledText getTextWidget setHorizontalIndex
void copy All Unresolved boolean left To Right if f Change Diffs null is Three Way f Ignore Ancestor I Rewrite Target target left To Right f Right get Rewrite Target f Left get Rewrite Target boolean compound Change Started false Iterator e f Change Diffs iterator try while e has Next Diff diff Diff e next switch diff f Direction case Range Difference LEFT if left To Right if compound Change Started target begin Compound Change compound Change Started true copy diff left To Right break case Range Difference RIGHT if left To Right if compound Change Started target begin Compound Change compound Change Started true copy diff left To Right break default continue finally if compound Change Started target end Compound Change  copyAllUnresolved leftToRight fChangeDiffs isThreeWay fIgnoreAncestor IRewriteTarget leftToRight fRight getRewriteTarget fLeft getRewriteTarget compoundChangeStarted fChangeDiffs hasNext fDirection RangeDifference leftToRight compoundChangeStarted beginCompoundChange compoundChangeStarted leftToRight RangeDifference leftToRight compoundChangeStarted beginCompoundChange compoundChangeStarted leftToRight compoundChangeStarted endCompoundChange
protected void copy boolean left To Right if show ResolveUI copy All Unresolved left To Right invalidate Lines return if left To Right if f Left get Enabled copy text String text f Left get Text Widget get Text f Right get Text Widget set Text text f Right set Enabled true else delete f Right get Text Widget set Text NON NLS 1 f Right set Enabled false f Right Line Count f Right get Line Count set Right Dirty true else if f Right get Enabled copy text String text f Right get Text Widget get Text f Left get Text Widget set Text text f Left set Enabled true else delete f Left get Text Widget set Text NON NLS 1 f Left set Enabled false f Left Line Count f Left get Line Count set Left Dirty true do Diff invalidate Lines updateV Scroll Bar select First Diff refresh Birds Eye View  leftToRight showResolveUI copyAllUnresolved leftToRight invalidateLines leftToRight fLeft getEnabled fLeft getTextWidget getText fRight getTextWidget setText fRight setEnabled fRight getTextWidget setText fRight setEnabled fRightLineCount fRight getLineCount setRightDirty fRight getEnabled fRight getTextWidget getText fLeft getTextWidget setText fLeft setEnabled fLeft getTextWidget setText fLeft setEnabled fLeftLineCount fLeft getLineCount setLeftDirty doDiff invalidateLines updateVScrollBar selectFirstDiff refreshBirdsEyeView
private void copy Diff Left To Right copy f Current Diff true false  copyDiffLeftToRight fCurrentDiff
private void copy Diff Right To Left copy f Current Diff false false  copyDiffRightToLeft fCurrentDiff
private void copy Diff diff boolean left To Right boolean goto Next if copy diff left To Right if goto Next navigate true true true else reveal Diff diff true update Controls  leftToRight gotoNext leftToRight gotoNext revealDiff updateControls
private boolean copy Diff diff boolean left To Right if diff null diff is Resolved Position from Pos null Position to Pos null I Document from Doc null I Document to Doc null if left To Right f Right set Enabled true from Pos diff f Left Pos to Pos diff f Right Pos from Doc f Left get Document to Doc f Right get Document else f Left set Enabled true from Pos diff f Right Pos to Pos diff f Left Pos from Doc f Right get Document to Doc f Left get Document if from Doc null int from Start from Pos get Offset int from Len from Pos get Length int to Start to Pos get Offset int to Len to Pos get Length try String s null switch diff f Direction case Range Difference RIGHT case Range Difference LEFT s from Doc get from Start from Len break case Range Difference ANCESTOR break case Range Difference CONFLICT if APPEND CONFLICT s to Doc get to Start to Len s from Doc get from Start from Len else s from Doc get from Start from Len break if s null to Doc replace to Start to Len s to Pos set Offset to Start to Pos set Length s length catch Bad Location Exception e silently ignored diff set Resolved true update Resolve Status return true return false  leftToRight isResolved fromPos toPos IDocument fromDoc IDocument toDoc leftToRight fRight setEnabled fromPos fLeftPos toPos fRightPos fromDoc fLeft getDocument toDoc fRight getDocument fLeft setEnabled fromPos fRightPos toPos fLeftPos fromDoc fRight getDocument toDoc fLeft getDocument fromDoc fromStart fromPos getOffset fromLen fromPos getLength toStart toPos getOffset toLen toPos getLength fDirection RangeDifference RangeDifference fromDoc fromStart fromLen RangeDifference RangeDifference APPEND_CONFLICT toDoc toStart toLen fromDoc fromStart fromLen fromDoc fromStart fromLen toDoc toStart toLen toPos setOffset toStart toPos setLength BadLocationException setResolved updateResolveStatus
Calculates virtual height in lines of views by adding the maximum of corresponding diffs private int get Virtual Height int h 1 if f All Diffs null Iterator e f All Diffs iterator for int i 0 e has Next i Diff diff Diff e next h diff get Max Diff Height f Show Ancestor return h  getVirtualHeight fAllDiffs fAllDiffs hasNext getMaxDiffHeight fShowAncestor
Calculates height in lines of right view by adding the height of the right diffs private int get Right Height int h 1 if f All Diffs null Iterator e f All Diffs iterator for int i 0 e has Next i Diff diff Diff e next h diff get Right Height return h  getRightHeight fAllDiffs fAllDiffs hasNext getRightHeight
The height of the Text Editors in lines private int get Viewport Height Styled Text te f Left get Text Widget int vh te get Client Area height if vh 0 Rectangle trim te compute Trim 0 0 0 0 int scrollbar Height trim height int header Height get Header Height Composite composite Composite get Control Rectangle r composite get Client Area vh r height header Height scrollbar Height return vh te get Line Height  TextEditors getViewportHeight StyledText fLeft getTextWidget getClientArea computeTrim scrollbarHeight headerHeight getHeaderHeight getControl getClientArea headerHeight scrollbarHeight getLineHeight
Returns the virtual position for the given view position private int real To Virtual Position Merge Source Viewer w int vpos if f Synchronized Scrolling f All Diffs null return vpos int view Pos 0 real view position int virtual Pos 0 virtual position Point region new Point 0 0 Iterator e f All Diffs iterator while e has Next Diff diff Diff e next Position pos diff get Position w w get Line Range pos region int real Height region y int virtual Height diff get Max Diff Height f Show Ancestor if vpos view Pos real Height OK found vpos view Pos make relative to this slot now scale position within this slot to virtual slot if real Height 0 vpos 0 else vpos vpos virtual Height real Height return virtual Pos vpos view Pos real Height virtual Pos virtual Height return virtual Pos  realToVirtualPosition MergeSourceViewer fSynchronizedScrolling fAllDiffs viewPos virtualPos fAllDiffs hasNext getPosition getLineRange realHeight virtualHeight getMaxDiffHeight fShowAncestor viewPos realHeight viewPos realHeight virtualHeight realHeight virtualPos viewPos realHeight virtualPos virtualHeight virtualPos
private void scroll Vertical int avpos int lvpos int rvpos Merge Source Viewer all But int s 0 if f Synchronized Scrolling s get Virtual Height rvpos int height f Right get Viewport Lines 4 if s 0 s 0 if s height s height f In Scrolling true if is Three Way all But f Ancestor if f Synchronized Scrolling all But null int y virtual To Real Position f Ancestor avpos s s f Ancestor vscroll y if all But f Left if f Synchronized Scrolling all But null int y virtual To Real Position f Left lvpos s s f Left vscroll y if all But f Right if f Synchronized Scrolling all But null int y virtual To Real Position f Right rvpos s s f Right vscroll y f In Scrolling false if is Three Way f Ancestor Canvas null f Ancestor Canvas repaint if f Left Canvas null f Left Canvas repaint Control center get Center if center instanceof Buffered Canvas Buffered Canvas center repaint if f Right Canvas null f Right Canvas repaint  scrollVertical MergeSourceViewer allBut fSynchronizedScrolling getVirtualHeight fRight getViewportLines fInScrolling isThreeWay allBut fAncestor fSynchronizedScrolling allBut virtualToRealPosition fAncestor fAncestor allBut fLeft fSynchronizedScrolling allBut virtualToRealPosition fLeft fLeft allBut fRight fSynchronizedScrolling allBut virtualToRealPosition fRight fRight fInScrolling isThreeWay fAncestorCanvas fAncestorCanvas fLeftCanvas fLeftCanvas getCenter BufferedCanvas BufferedCanvas fRightCanvas fRightCanvas
Updates Scrollbars with viewports private void sync Viewport Merge Source Viewer w if f In Scrolling return int ix w get Top Index int ix2 w get Document Region Offset int view Position real To Virtual Position w ix ix2 scroll Vertical view Position view Position view Position w scroll all but the given views if fV Scroll Bar null int value Math max 0 Math min view Position get Virtual Height get Viewport Height fV Scroll Bar set Selection value refresh Bird Eye View  syncViewport MergeSourceViewer fInScrolling getTopIndex getDocumentRegionOffset viewPosition realToVirtualPosition scrollVertical viewPosition viewPosition viewPosition fVScrollBar viewPosition getVirtualHeight getViewportHeight fVScrollBar setSelection refreshBirdEyeView
private void updateV Scroll Bar if Utilities ok To Use fV Scroll Bar f Synchronized Scrolling int virtual Height get Virtual Height int view Port Height get Viewport Height int page Increment view Port Height 1 int thumb view Port Height virtual Height virtual Height view Port Height fV Scroll Bar set Page Increment page Increment fV Scroll Bar set Maximum virtual Height fV Scroll Bar set Thumb thumb  updateVScrollBar okToUse fVScrollBar fSynchronizedScrolling virtualHeight getVirtualHeight viewPortHeight getViewportHeight pageIncrement viewPortHeight viewPortHeight virtualHeight virtualHeight viewPortHeight fVScrollBar setPageIncrement pageIncrement fVScrollBar setMaximum virtualHeight fVScrollBar setThumb
maps given virtual position into a real view position of this view private int virtual To Real Position Merge Source Viewer part int v if f Synchronized Scrolling f All Diffs null return v int virtual Pos 0 int view Pos 0 Point region new Point 0 0 Iterator e f All Diffs iterator while e has Next Diff diff Diff e next Position pos diff get Position part int view Height part get Line Range pos region y int virtual Height diff get Max Diff Height f Show Ancestor if v virtual Pos virtual Height v virtual Pos make relative to this slot if view Height 0 v 0 else v v view Height virtual Height return view Pos v virtual Pos virtual Height view Pos view Height return view Pos  virtualToRealPosition MergeSourceViewer fSynchronizedScrolling fAllDiffs virtualPos viewPos fAllDiffs hasNext getPosition viewHeight getLineRange virtualHeight getMaxDiffHeight fShowAncestor virtualPos virtualHeight virtualPos viewHeight viewHeight virtualHeight viewPos virtualPos virtualHeight viewPos viewHeight viewPos

Pair I Structure Creator structure Creator I Typed Element edition I Typed Element item f Structure Creator structure Creator f Edition edition f Item item  IStructureCreator structureCreator ITypedElement ITypedElement fStructureCreator structureCreator fEdition fItem
Pair I Structure Creator structure Creator I Typed Element edition this structure Creator edition edition  IStructureCreator structureCreator ITypedElement structureCreator
I Typed Element get Edition return f Edition  ITypedElement getEdition fEdition
I Typed Element get Item return f Item  ITypedElement getItem fItem
The content is lazily loaded private String get Content if f Content null if f Structure Creator null f Content f Structure Creator get Contents f Item false else if f Item instanceof I Stream Content Accessor I Stream Content Accessor sca I Stream Content Accessor f Item try f Content Utilities read String sca catch Core Exception ex Need Work if f Content null f Content NON NLS 1 return f Content  getContent fContent fStructureCreator fContent fStructureCreator getContents fItem fItem IStreamContentAccessor IStreamContentAccessor IStreamContentAccessor fItem fContent readString CoreException NeedWork fContent fContent fContent
Compares content of item public boolean equals Object other if other null other get Class get Class if get Content equals Pair other get Content return true return super equals other  getClass getClass getContent getContent
Creates a new modal resizable dialog Various titles icons and labels are configured from the given resource bundle The following resource keys are used pre key type description title String dialog title width Integer initial width of dialog height Integer initial height of dialog tree Title Format Message Format pane title for edition tree arg 0 is the target date Icon String icon for node in edition tree path relative to plugin time Icon String icon for leaf in edition tree path relative to plugin today Format Message Format format string if date is todays date arg 0 is date yesterday Format Message Format format string if date is yesterdays date arg 0 is date day Format Message Format format string if date is any other date arg 0 is date edition Label String label for editions side of compare viewer arg 0 is the date target Label String label for target side of compare viewer button Label String label for OK button default is I Dialog Constants OK LABEL pre param parent if not code null code the new dialog stays on top of this parent shell param bundle code Resource Bundle code to configure the dialog public Edition Selection Dialog Shell parent Resource Bundle bundle super parent bundle  treeTitleFormat MessageFormat dateIcon timeIcon todayFormat MessageFormat yesterdayFormat MessageFormat dayFormat MessageFormat editionLabel targetLabel buttonLabel IDialogConstants OK_LABEL ResourceBundle EditionSelectionDialog ResourceBundle
private Compare Configuration get Compare Configuration if f Compare Configuration null f Compare Configuration new Compare Configuration f Compare Configuration set Left Editable false f Compare Configuration set Right Editable false return f Compare Configuration  CompareConfiguration getCompareConfiguration fCompareConfiguration fCompareConfiguration CompareConfiguration fCompareConfiguration setLeftEditable fCompareConfiguration setRightEditable fCompareConfiguration
Sets an additional and optional argument for the edition pane s title param title Argument an optional argument for the edition pane s title since 2 0 public void set Edition Title Argument String title Argument f Title Arg title Argument  titleArgument setEditionTitleArgument titleArgument fTitleArg titleArgument
Sets an optional image for the edition pane s title param title Image an optional image for the edition pane s title since 2 0 public void set Edition Title Image Image title Image f Title Image title Image  titleImage setEditionTitleImage titleImage fTitleImage titleImage
Select the previous edition presenting a UI param target the input object against which the editions are compared must not be code null code param input Editions the list of editions element type code I Typed Element code s param ppath If code null code dialog shows full input if non code null code it extracts a subsection return returns the selected edition or code null code if error occurred The returned code I Typed Element code is one of the original editions if code path code was code null code otherwise it is an code I Typed Element code returned from code I Structure Creator locate path item code since 2 0 public I Typed Element select Previous Edition final I Typed Element target I Typed Element input Editions Object ppath Assert is Not Null target f Target Pair new Pair null target sort input editions final int count input Editions length final I Modification Date editions new I Modification Date count for int i 0 i count i editions i I Modification Date input Editions i if count 1 internal Sort editions 0 count 1 find Structure Creator if ppath is not null I Structure Creator structure Creator null if ppath null String type target get Type Structure Creator Descriptor scd CompareUI Plugin get Default get Structure Creator type if scd null structure Creator scd create Structure Creator if f Add Mode does not work in add mode return null if structure Creator null Pair pair create Pair structure Creator ppath target if pair null f Target Pair pair else ppath null couldn t extract item because of error from front newest to back oldest for int i 0 i count i I Typed Element edition I Typed Element editions i Pair pair null if structure Creator null ppath null extract sub element from edition pair create Pair structure Creator ppath edition else pair new Pair null edition if pair null pair f Has Error return null if pair null f Target Pair equals pair return pair f Item nothing found return null  inputEditions ITypedElement ITypedElement ITypedElement IStructureCreator ITypedElement selectPreviousEdition ITypedElement ITypedElement inputEditions isNotNull fTargetPair inputEditions IModificationDate IModificationDate IModificationDate inputEditions internalSort StructureCreator IStructureCreator structureCreator getType StructureCreatorDescriptor CompareUIPlugin getDefault getStructureCreator structureCreator createStructureCreator fAddMode structureCreator createPair structureCreator fTargetPair ITypedElement ITypedElement structureCreator createPair structureCreator fHasError fTargetPair fItem
f Thread new Thread public void run from front newest to back oldest for int i 0 i count i if f Edition Tree null f Edition Tree is Disposed break I Typed Element edition I Typed Element editions i extract sub element from edition Pair pair create Pair sc path edition if pair null send Pair pair send Pair null  fThread fEditionTree fEditionTree isDisposed ITypedElement ITypedElement createPair sendPair sendPair
f Thread new Thread public void run from front newest to back oldest for int i 0 i count i if f Edition Tree null f Edition Tree is Disposed break I Typed Element edition I Typed Element editions i I Structure Comparator sco2 sc locate container edition if sco2 null Object children sco2 get Children if children null for int i2 0 i2 children length i2 I Typed Element child I Typed Element children i2 if current contains child send Pair new Pair sc edition child send Pair null  fThread fEditionTree fEditionTree isDisposed ITypedElement ITypedElement IStructureComparator getChildren ITypedElement ITypedElement sendPair sendPair
Presents this modal dialog with the functionality described in the class comment above param target the input object against which the editions are compared must not be code null code param input Editions the list of editions element type code I Typed Element code s param ppath If code null code dialog shows full input if non code null code it extracts a subsection return returns the selected edition or code null code if dialog was cancelled The returned code I Typed Element code is one of the original editions if code path code was code null code otherwise it is an code I Typed Element code returned from code I Structure Creator locate path item code public I Typed Element select Edition final I Typed Element target I Typed Element input Editions Object ppath Assert is Not Null target f Target Pair new Pair null target sort input editions final int count input Editions length final I Modification Date editions new I Modification Date count for int i 0 i count i editions i I Modification Date input Editions i if count 1 internal Sort editions 0 count 1 find Structure Creator if ppath is not null I Structure Creator structure Creator null if ppath null String type target get Type Structure Creator Descriptor scd CompareUI Plugin get Default get Structure Creator type if scd null structure Creator scd create Structure Creator if f Add Mode replace mode if structure Creator null Pair pair create Pair structure Creator ppath target if pair null f Target Pair pair else ppath null couldn t extract item because of error set the left and right labels for the compare viewer String target Label get Target Label target f Target Pair get Item if f Target Is Right get Compare Configuration set Right Label target Label else get Compare Configuration set Left Label target Label if structure Creator null ppath null extract sub element final I Structure Creator sc structure Creator final Object path ppath construct the comparer thread and perform the background extract f Thread new Thread public void run from front newest to back oldest for int i 0 i count i if f Edition Tree null f Edition Tree is Disposed break I Typed Element edition I Typed Element editions i extract sub element from edition Pair pair create Pair sc path edition if pair null send Pair pair send Pair null else create tree widget create from front newest to back oldest for int i 0 i count i add Member Edition new Pair null I Typed Element editions i else add mode final Object container ppath Assert is Not Null container if structure Creator null return null error extract all elements of container final Hash Set current new Hash Set I Structure Comparator sco structure Creator locate container target if sco null Object children sco get Children if children null for int i 0 i children length i current add children i final I Structure Creator sc structure Creator construct the comparer thread and perform the background extract f Thread new Thread public void run from front newest to back oldest for int i 0 i count i if f Edition Tree null f Edition Tree is Disposed break I Typed Element edition I Typed Element editions i I Structure Comparator sco2 sc locate container edition if sco2 null Object children sco2 get Children if children null for int i2 0 i2 children length i2 I Typed Element child I Typed Element children i2 if current contains child send Pair new Pair sc edition child send Pair null open if get Return Code OK return f Selected Item return null  inputEditions ITypedElement ITypedElement ITypedElement IStructureCreator ITypedElement selectEdition ITypedElement ITypedElement inputEditions isNotNull fTargetPair inputEditions IModificationDate IModificationDate IModificationDate inputEditions internalSort StructureCreator IStructureCreator structureCreator getType StructureCreatorDescriptor CompareUIPlugin getDefault getStructureCreator structureCreator createStructureCreator fAddMode structureCreator createPair structureCreator fTargetPair targetLabel getTargetLabel fTargetPair getItem fTargetIsRight getCompareConfiguration setRightLabel targetLabel getCompareConfiguration setLeftLabel targetLabel structureCreator IStructureCreator structureCreator fThread fEditionTree fEditionTree isDisposed ITypedElement ITypedElement createPair sendPair sendPair addMemberEdition ITypedElement isNotNull structureCreator HashSet HashSet IStructureComparator structureCreator getChildren IStructureCreator structureCreator fThread fEditionTree fEditionTree isDisposed ITypedElement ITypedElement IStructureComparator getChildren ITypedElement ITypedElement sendPair sendPair getReturnCode fSelectedItem
private Pair create Pair I Structure Creator sc Object path I Typed Element input I Structure Comparator scmp sc locate path input if scmp null sc get Structure input null parse error Pair p new Pair sc input p f Has Error true return p if scmp instanceof I Typed Element return new Pair sc input I Typed Element scmp return null  createPair IStructureCreator ITypedElement IStructureComparator getStructure fHasError ITypedElement ITypedElement
Controls whether identical entries are shown or not default This method must be called before code select Edition code param hide if true identical entries are hidden otherwise they are shown since 2 0 public void set Hide Identical Entries boolean hide f Hide Identical hide  selectEdition setHideIdenticalEntries fHideIdentical
Controls whether workspace target is on the left the default or right hand side param is Right if true target is shown on right hand side since 2 0 public void set Target Is Right boolean is Right f Target Is Right is Right  isRight setTargetIsRight isRight fTargetIsRight isRight
Controls whether the code Edition Selection Dialog code is in add mode or replace mode the default param add Mode if true dialog is in add mode since 2 0 public void set Add Mode boolean add Mode f Add Mode add Mode f Multi Select add Mode  EditionSelectionDialog addMode setAddMode addMode fAddMode addMode fMultiSelect addMode
Controls whether the code Edition Selection Dialog code is in compare mode or add replace the default mode param compare Mode if true dialog is in add mode since 2 0 public void set Compare Mode boolean compare Mode f Compare Mode compare Mode f Structure Compare f Compare Mode f Add Mode  EditionSelectionDialog compareMode setCompareMode compareMode fCompareMode compareMode fStructureCompare fCompareMode fAddMode
Returns the input target that has been specified with the most recent call to code select Edition code If a not code null code path was specified this method returns a subsection of this target code I Structure Creator locate path target code instead of the input target p For example if the code target code is a Java compilation unit and code path code specifies a method the value returned from code get Target code will be the method not the compilation unit return the last specified target or a subsection thereof public I Typed Element get Target return f Target Pair get Item  selectEdition IStructureCreator getTarget ITypedElement getTarget fTargetPair getItem
Returns the editions that have been selected with the most recent call to code select Edition code return the selected editions as an array since 2 1 public I Typed Element get Selection Array List result new Array List if f Member Selection null Iterator iter f Array List iterator for int i 0 iter has Next i Object edition iter next Object item f Member Selection get edition if item null result add item else if f Selected Item null result add f Selected Item return I Typed Element result to Array new I Typed Element result size  selectEdition ITypedElement getSelection ArrayList ArrayList fMemberSelection fArrayList hasNext fMemberSelection fSelectedItem fSelectedItem ITypedElement toArray ITypedElement
Returns a label for identifying the target side of a compare viewer This implementation extracts the value for the key target Label from the resource bundle and passes it as the format argument to code Message Format format code The single format argument for code Message Format format code 0 in the format string is the name of the given input element p Subclasses may override to create their own label p param target the target element for which a label must be returned param item if a path has been specified in code select Edition code a sub element of the given target otherwise the same as target return a label the target side of a compare viewer protected String get Target Label I Typed Element target I Typed Element item String format null if target instanceof Resource Node format Utilities get String f Bundle workspace Target Label null NON NLS 1 if format null format Utilities get String f Bundle target Label NON NLS 1 if format null format x 0 NON NLS 1 return Message Format format format new Object target get Name  targetLabel MessageFormat MessageFormat selectEdition getTargetLabel ITypedElement ITypedElement ResourceNode getString fBundle workspaceTargetLabel getString fBundle targetLabel MessageFormat getName
Returns a label for identifying the edition side of a compare viewer This implementation extracts the value for the key edition Label from the resource bundle and passes it as the format argument to code Message Format format code The single format argument for code Message Format format code 0 in the format string is the formatted modification date of the given input element p Subclasses may override to create their own label p param selected Edition the selected edition for which a label must be returned param item if a path has been specified in code select Edition code a sub element of the given selected Edition otherwise the same as selected Edition return a label for the edition side of a compare viewer protected String get Edition Label I Typed Element selected Edition I Typed Element item String format null if selected Edition instanceof Resource Node format Utilities get String f Bundle workspace Edition Label null NON NLS 1 else if selected Edition instanceof History Item format Utilities get String f Bundle history Edition Label null NON NLS 1 if format null format Utilities get String f Bundle edition Label NON NLS 1 if format null format x 0 NON NLS 1 String date NON NLS 1 if selected Edition instanceof I Modification Date long mod Date I Modification Date selected Edition get Modification Date date Date Format get Date Time Instance format new Date mod Date return Message Format format format new Object date  editionLabel MessageFormat MessageFormat selectedEdition selectEdition selectedEdition selectedEdition getEditionLabel ITypedElement selectedEdition ITypedElement selectedEdition ResourceNode getString fBundle workspaceEditionLabel selectedEdition HistoryItem getString fBundle historyEditionLabel getString fBundle editionLabel selectedEdition IModificationDate modDate IModificationDate selectedEdition getModificationDate DateFormat getDateTimeInstance modDate MessageFormat
Returns a label for identifying a node in the edition tree viewer This implementation extracts the value for the key workspace Tree Format or tree Format in that order from the resource bundle and passes it as the format argument to code Message Format format code The single format argument for code Message Format format code 0 in the format string is the formatted modification date of the given input element p Subclasses may override to create their own label p param edition the edition for which a label must be returned param item if a path has been specified in code edition code a sub element of the given edition otherwise the same as edition return a label of a node in the edition tree viewer since 2 0 protected String get Short Edition Label I Typed Element edition I Typed Element item Date date String format null if edition instanceof Resource Node format Utilities get String f Bundle workspace Tree Format null NON NLS 1 if format null format Utilities get String f Bundle tree Format null NON NLS 1 if format null format x 0 NON NLS 1 String ds Date Format get Time Instance format date return Message Format format format new Object ds  workspaceTreeFormat treeFormat MessageFormat MessageFormat getShortEditionLabel ITypedElement ITypedElement ResourceNode getString fBundle workspaceTreeFormat getString fBundle treeFormat DateFormat getTimeInstance MessageFormat
Returns an image for identifying the edition side of a compare viewer This implementation extracts the value for the key edition Label from the resource bundle and passes it as the format argument to code Message Format format code The single format argument for code Message Format format code 0 in the format string is the formatted modification date of the given input element p Subclasses may override to create their own label p param selected Edition the selected edition for which a label must be returned param item if a path has been specified in code select Edition code a sub element of the given selected Edition otherwise the same as selected Edition return a label the edition side of a compare viewer since 2 0 protected Image get Edition Image I Typed Element selected Edition I Typed Element item if selected Edition instanceof Resource Node return selected Edition get Image if selected Edition instanceof History Item if f Time Image null String icon Name Utilities get String f Bundle time Icon obj16 resource obj gif NON NLS 1 NON NLS 2 Image Descriptor id CompareUI Plugin get Image Descriptor icon Name if id null f Time Image id create Image return f Time Image return null  editionLabel MessageFormat MessageFormat selectedEdition selectEdition selectedEdition selectedEdition getEditionImage ITypedElement selectedEdition ITypedElement selectedEdition ResourceNode selectedEdition getImage selectedEdition HistoryItem fTimeImage iconName getString fBundle timeIcon resource_obj ImageDescriptor CompareUIPlugin getImageDescriptor iconName fTimeImage createImage fTimeImage
protected synchronized Control create Dialog Area Composite parent2 Composite parent Composite super create Dialog Area parent2 get Shell set Text Utilities get String f Bundle title NON NLS 1 Splitter vsplitter new Splitter parent SWT VERTICAL vsplitter set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Grid Data VERTICAL ALIGN FILL Grid Data GRAB VERTICAL vsplitter add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Compare Configuration null f Compare Configuration dispose f Compare Configuration null if f Date Image null f Date Image dispose f Date Image null if f Time Image null f Time Image dispose f Time Image null if f Add Mode we need two panes the left for the elements the right one for the editions Splitter hsplitter new Splitter vsplitter SWT HORIZONTAL f Member Pane new Compare Viewer Pane hsplitter SWT BORDER SWT FLAT f Member Pane set Text Utilities get String f Bundle member Pane Title NON NLS 1 int flags SWT H SCROLL SWT V SCROLL if f Multi Select flags SWT CHECK f Member Table new Table f Member Pane flags f Member Table add Selection Listener new Selection Adapter public void widget Selected Selection Event e if e detail SWT CHECK if e item instanceof Table Item Table Item ti Table Item e item Object data ti get Data if ti get Checked f Array List add data else f Array List remove data if f Commit Button null f Commit Button set Enabled f Array List size 0 f Member Table set Selection new Table Item ti handle Member Select e item f Member Pane set Content f Member Table f Member Table set Focus f Edition Pane new Compare Viewer Pane hsplitter SWT BORDER SWT FLAT else if f Structure Compare we need two panes the left for the elements the right one for the structured diff Splitter hsplitter new Splitter vsplitter SWT HORIZONTAL f Edition Pane new Compare Viewer Pane hsplitter SWT BORDER SWT FLAT f Structured Compare Pane new Compare Viewer Switching Pane hsplitter SWT BORDER SWT FLAT true protected Viewer get Viewer Viewer old Viewer Object input if input instanceof I Compare Input return CompareUI find Structure Viewer old Viewer I Compare Input input this get Compare Configuration return null f Structured Compare Pane add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e feed Input2 e get Selection else only a single pane showing the editions f Edition Pane new Compare Viewer Pane vsplitter SWT BORDER SWT FLAT if f Title Arg null f Title Arg f Target Pair get Item get Name String title Format Utilities get String f Bundle tree Title Format NON NLS 1 String title Message Format format title Format new String f Title Arg f Edition Pane set Text title if f Title Image null f Edition Pane set Image f Title Image f Edition Tree new Tree f Edition Pane SWT H SCROLL SWT V SCROLL f Edition Tree add Selection Listener new Selection Adapter public void widget Default Selected Selection Event e handle Default Selected public void widget Selected Selection Event e feed Input e item f Edition Pane set Content f Edition Tree now start the thread and forget about it if f Thread null f Thread start f Thread null f Content Pane new Compare Viewer Switching Pane vsplitter SWT BORDER SWT FLAT protected Viewer get Viewer Viewer old Viewer Object input return CompareUI find Content Viewer old Viewer input this get Compare Configuration vsplitter set Weights new int 30 70 apply Dialog Font parent return parent  createDialogArea createDialogArea getShell setText getString fBundle setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridData VERTICAL_ALIGN_FILL GridData GRAB_VERTICAL addDisposeListener DisposeListener widgetDisposed DisposeEvent fCompareConfiguration fCompareConfiguration fCompareConfiguration fDateImage fDateImage fDateImage fTimeImage fTimeImage fTimeImage fAddMode fMemberPane CompareViewerPane fMemberPane setText getString fBundle memberPaneTitle H_SCROLL V_SCROLL fMultiSelect fMemberTable fMemberPane fMemberTable addSelectionListener SelectionAdapter widgetSelected SelectionEvent TableItem TableItem TableItem getData getChecked fArrayList fArrayList fCommitButton fCommitButton setEnabled fArrayList fMemberTable setSelection TableItem handleMemberSelect fMemberPane setContent fMemberTable fMemberTable setFocus fEditionPane CompareViewerPane fStructureCompare fEditionPane CompareViewerPane fStructuredComparePane CompareViewerSwitchingPane getViewer oldViewer ICompareInput findStructureViewer oldViewer ICompareInput getCompareConfiguration fStructuredComparePane addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent feedInput2 getSelection fEditionPane CompareViewerPane fTitleArg fTitleArg fTargetPair getItem getName titleFormat getString fBundle treeTitleFormat MessageFormat titleFormat fTitleArg fEditionPane setText fTitleImage fEditionPane setImage fTitleImage fEditionTree fEditionPane H_SCROLL V_SCROLL fEditionTree addSelectionListener SelectionAdapter widgetDefaultSelected SelectionEvent handleDefaultSelected widgetSelected SelectionEvent feedInput fEditionPane setContent fEditionTree fThread fThread fThread fContentPane CompareViewerSwitchingPane getViewer oldViewer findContentViewer oldViewer getCompareConfiguration setWeights applyDialogFont
protected void create Buttons For Button Bar Composite parent String button Label Utilities get String f Bundle button Label I Dialog Constants OK LABEL NON NLS 1 if f Compare Mode only a Done button create Button parent I Dialog Constants CANCEL ID button Label false else a Cancel and a Add Replace button f Commit Button create Button parent I Dialog Constants OK ID button Label true f Commit Button set Enabled false create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar buttonLabel getString fBundle buttonLabel IDialogConstants OK_LABEL fCompareMode createButton IDialogConstants CANCEL_ID buttonLabel fCommitButton createButton IDialogConstants OK_ID buttonLabel fCommitButton setEnabled createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
Overidden to disable dismiss on double click in compare mode since 2 0 protected void ok Pressed if f Compare Mode don t dismiss dialog else super ok Pressed  okPressed fCompareMode okPressed
display async Exec new Runnable public void run add Member Edition pair  asyncExec addMemberEdition
Asynchroneously sends a Pair or null to the UI thread private void send Pair final Pair pair if f Edition Tree null f Edition Tree is Disposed Display display f Edition Tree get Display display async Exec new Runnable public void run add Member Edition pair  sendPair fEditionTree fEditionTree isDisposed fEditionTree getDisplay asyncExec addMemberEdition
private static void internal Sort I Modification Date keys int left int right int original left left int original right right I Modification Date mid keys left right 2 do while keys left get Modification Date mid get Modification Date left while mid get Modification Date keys right get Modification Date right if left right I Modification Date tmp keys left keys left keys right keys right tmp left right while left right if original left right internal Sort keys original left right if left original right internal Sort keys left original right  internalSort IModificationDate original_left original_right IModificationDate getModificationDate getModificationDate getModificationDate getModificationDate IModificationDate original_left internalSort original_left original_right internalSort original_right
Adds the given Pair to the member editions If HIDE IDENTICAL is true the new Pair is only added if its contents is different from the preceeding Pair If the argument is code null code the message No Editions found is shown in the member or edition viewer private void add Member Edition Pair pair if pair null end of list of pairs if f Member Table null if f Member Table is Disposed f Member Table get Item Count 0 if f Multi Select f Member Table dispose f Member Table new Table f Member Pane SWT NONE f Member Pane set Content f Member Table Table Item ti new Table Item f Member Table SWT NONE ti set Text Utilities get String f Bundle no Additional Members Message NON NLS 1 return if f Edition Tree null f Edition Tree is Disposed f Edition Tree get Item Count 0 Tree Item ti new Tree Item f Edition Tree SWT NONE ti set Text Utilities get String f Bundle not Found In Local History Message NON NLS 1 return if f Member Editions null f Member Editions new Hash Map if f Multi Select f Member Selection null f Member Selection new Hash Map I Typed Element item pair get Item List editions List f Member Editions get item if editions null editions new Array List f Member Editions put item editions if f Member Table null f Member Table is Disposed I Typed Element te item String name te get Name find position Table Item items f Member Table get Items int where items length for int i 0 i where i String n items i get Text if n compare To name 0 where i break Table Item ti new Table Item f Member Table where SWT NULL ti set Image te get Image ti set Text name ti set Data editions if f Hide Identical Pair last f Target Pair int size editions size if size 0 last Pair editions get size 1 if last null last equals pair return don t add since the new one is equal to old editions add pair if f Add Mode editions f Current Editions add Edition pair  HIDE_IDENTICAL addMemberEdition fMemberTable fMemberTable isDisposed fMemberTable getItemCount fMultiSelect fMemberTable fMemberTable fMemberPane fMemberPane setContent fMemberTable TableItem TableItem fMemberTable setText getString fBundle noAdditionalMembersMessage fEditionTree fEditionTree isDisposed fEditionTree getItemCount TreeItem TreeItem fEditionTree setText getString fBundle notFoundInLocalHistoryMessage fMemberEditions fMemberEditions HashMap fMultiSelect fMemberSelection fMemberSelection HashMap ITypedElement getItem fMemberEditions ArrayList fMemberEditions fMemberTable fMemberTable isDisposed ITypedElement getName TableItem fMemberTable getItems getText compareTo TableItem TableItem fMemberTable setImage getImage setText setData fHideIdentical fTargetPair fAddMode fCurrentEditions addEdition
Returns the number of s since Jan 1st 1970 The given date is converted to GMT and daylight saving is taken into account too private long day Number long date int ONE DAY MS 24 60 60 1000 one day in milli seconds Calendar calendar Calendar get Instance long local Time Offset calendar get Calendar ZONE OFFSET calendar get Calendar DST OFFSET return date local Time Offset ONE DAY MS  dayNumber ONE_DAY_MS getInstance localTimeOffset ZONE_OFFSET DST_OFFSET localTimeOffset ONE_DAY_MS
Adds the given Pair to the edition tree It takes care of creating tree nodes for different dates private void add Edition Pair pair if f Edition Tree null f Edition Tree is Disposed return find last day Tree Item days f Edition Tree get Items Tree Item last Day null if days length 0 last Day days days length 1 boolean first last Day null I Typed Element edition pair get Edition I Typed Element item pair get Item long ldate I Modification Date edition get Modification Date long day day Number ldate Date date new Date ldate if last Day null day day Number Date last Day get Data get Time last Day new Tree Item f Edition Tree SWT NONE if f Date Image null String icon Name Utilities get String f Bundle date Icon obj16 day obj gif NON NLS 2 NON NLS 1 Image Descriptor id CompareUI Plugin get Image Descriptor icon Name if id null f Date Image id create Image last Day set Image f Date Image String df Date Format get Date Instance format date long today day Number System current Time Millis String format Key if day today format Key today Format NON NLS 1 else if day today 1 format Key yesterday Format NON NLS 1 else format Key day Format NON NLS 1 String pattern Utilities get String f Bundle format Key if pattern null df Message Format format pattern new String df last Day set Text df last Day set Data date Tree Item ti new Tree Item last Day SWT NONE ti set Image get Edition Image edition item String s get Short Edition Label edition item date if pair f Has Error String pattern Utilities get String f Bundle parse Error Format NON NLS 1 s Message Format format pattern new String s ti set Text s ti set Data pair determine selected Tree Item Tree Item selection first ti null if f Member Selection null Object selected f Member Selection get f Current Editions if selected null if selected pair get Item selection ti else selection null if selection null f Edition Tree set Selection new Tree Item selection if f Add Mode f Edition Tree set Focus feed Input selection if first expand first node last Day set Expanded true  addEdition fEditionTree fEditionTree isDisposed TreeItem fEditionTree getItems TreeItem lastDay lastDay lastDay ITypedElement getEdition ITypedElement getItem IModificationDate getModificationDate dayNumber lastDay dayNumber lastDay getData getTime lastDay TreeItem fEditionTree fDateImage iconName getString fBundle dateIcon day_obj ImageDescriptor CompareUIPlugin getImageDescriptor iconName fDateImage createImage lastDay setImage fDateImage DateFormat getDateInstance dayNumber currentTimeMillis formatKey formatKey todayFormat formatKey yesterdayFormat formatKey dayFormat getString fBundle formatKey MessageFormat lastDay setText lastDay setData TreeItem TreeItem lastDay setImage getEditionImage getShortEditionLabel fHasError getString fBundle parseErrorFormat MessageFormat setText setData TreeItem TreeItem fMemberSelection fMemberSelection fCurrentEditions getItem fEditionTree setSelection TreeItem fAddMode fEditionTree setFocus feedInput lastDay setExpanded
Feeds selection from member viewer to edition viewer private void handle Member Select Widget w Object data w get Data if data instanceof List List editions List data if editions f Current Editions f Current Editions editions f Edition Tree remove All String pattern Utilities get String f Bundle tree Title Format NON NLS 1 String title Message Format format pattern new Object Item w get Text f Edition Pane set Text title Iterator iter editions iterator while iter has Next Object item iter next if item instanceof Pair add Edition Pair item  handleMemberSelect getData fCurrentEditions fCurrentEditions fEditionTree removeAll getString fBundle treeTitleFormat MessageFormat getText fEditionPane setText hasNext addEdition
private void set Input Object input if f Compare input instanceof I Compare Input I Compare Input ci I Compare Input input if f Target Is Right input ci get Left else input ci get Right f Content Pane set Input input if f Structured Compare Pane null f Structured Compare Pane set Input input  setInput fCompare ICompareInput ICompareInput ICompareInput fTargetIsRight getLeft getRight fContentPane setInput fStructuredComparePane fStructuredComparePane setInput
private void feed Input Widget w Object input w get Data boolean isOK false if input instanceof Pair Pair pair Pair input f Selected Item pair get Item isOK pair f Has Error I Typed Element edition pair get Edition String edition Label get Edition Label edition f Selected Item Image edition Image get Edition Image edition f Selected Item if f Add Mode if f Member Selection null f Member Selection put f Current Editions f Selected Item set Input f Selected Item f Content Pane set Text edition Label f Content Pane set Image edition Image else get Compare Configuration if f Target Is Right f Compare Configuration set Left Label edition Label f Compare Configuration set Left Image edition Image set Input new Diff Node f Selected Item f Target Pair get Item else f Compare Configuration set Right Label edition Label f Compare Configuration set Right Image edition Image set Input new Diff Node f Target Pair get Item f Selected Item else f Selected Item null set Input null if f Commit Button null if f Multi Select f Commit Button set Enabled isOK f Selected Item null f Array List size 0 else f Commit Button set Enabled isOK f Selected Item null f Target Pair get Item f Selected Item  feedInput getData fSelectedItem getItem fHasError ITypedElement getEdition editionLabel getEditionLabel fSelectedItem editionImage getEditionImage fSelectedItem fAddMode fMemberSelection fMemberSelection fCurrentEditions fSelectedItem setInput fSelectedItem fContentPane setText editionLabel fContentPane setImage editionImage getCompareConfiguration fTargetIsRight fCompareConfiguration setLeftLabel editionLabel fCompareConfiguration setLeftImage editionImage setInput DiffNode fSelectedItem fTargetPair getItem fCompareConfiguration setRightLabel editionLabel fCompareConfiguration setRightImage editionImage setInput DiffNode fTargetPair getItem fSelectedItem fSelectedItem setInput fCommitButton fMultiSelect fCommitButton setEnabled fSelectedItem fArrayList fCommitButton setEnabled fSelectedItem fTargetPair getItem fSelectedItem
private void feed Input2 I Selection sel if sel instanceof I Structured Selection I Structured Selection ss I Structured Selection sel if ss size 1 f Content Pane set Input ss get First Element  feedInput2 ISelection IStructuredSelection IStructuredSelection IStructuredSelection fContentPane setInput getFirstElement

Creates a code History Item code object which combines the given code I File State code and code I Typed Element code into an object which is suitable as input for a compare viewer or code Replace With Edition Dialog code param base the implementation of the code I Typed Element code interface delegates to this base code I Typed Element code param file State the code I File State code from which the streamable contents and the modification time is derived from public History Item I Typed Element base I File State file State f Base base f File State file State  HistoryItem IFileState ITypedElement ReplaceWithEditionDialog ITypedElement ITypedElement fileState IFileState HistoryItem ITypedElement IFileState fileState fBase fFileState fileState
see I Typed Element get Name public String get Name return f Base get Name  ITypedElement getName getName fBase getName
see I Typed Element get Image public Image get Image return f Base get Image  ITypedElement getImage getImage fBase getImage
see I Typed Element get Type public String get Type return f Base get Type  ITypedElement getType getType fBase getType
see I Modification Date get Modification Date public long get Modification Date return f File State get Modification Time  IModificationDate getModificationDate getModificationDate fFileState getModificationTime
see I Stream Content Accessor get Contents public Input Stream get Contents throws Core Exception return new Buffered Input Stream f File State get Contents  IStreamContentAccessor getContents InputStream getContents CoreException BufferedInputStream fFileState getContents
public String get Charset throws Core Exception String charset f File State get Charset if charset null I Path full Path f File State get Full Path I Resource resource Resources Plugin get Workspace get Root find Member full Path if resource instanceof I Encoded Storage charset I Encoded Storage resource get Charset return charset  getCharset CoreException fFileState getCharset IPath fullPath fFileState getFullPath IResource ResourcesPlugin getWorkspace getRoot findMember fullPath IEncodedStorage IEncodedStorage getCharset

Starting from the current selection code select Change code selects and reveals the next previous change If the end or beginning is reached the method returns code true code param next if code true code the next change is selected otherwise the previous change return returns code true code if end beginning is reached code false code otherwise  selectChange

Called whenever the content of the given source has changed param source the source whose contents has changed 

Adds a content change listener to this notifier Has no effect if an identical listener is already registered param listener a content changed listener 
Removes the given content changed listener from this notifier Has no effect if the listener is not registered param listener a content changed listener 

Returns code true code if this object can be modified If it returns code false code the other methods of this API must not be called return code true code if this object can be modified 
Replaces the current content with the given new bytes param new Content this new contents replaces the old contents  newContent
This method is called on a parent to add or remove a child or to copy the contents of a child What to do is encoded in the two arguments as follows TABLE TR TD add TD TD child null TD TD other null TD TR TR TD remove TD TD child null TD TD other null TD TR TR TD copy TD TD child null TD TD other null TD TR TABLE 

Returns the name of a charset encoding to be used when decoding this stream accessor s contents into characters Returns code null code if a proper encoding cannot be determined p b Note b this method does not check whether the result is a supported charset name Callers should be prepared to handle code Unsupported Encoding Exception code where this charset is used p return the name of a charset or code null code exception Core Exception if an error happens while determining the charset See any refinements for more information see I Stream Content Accessor get Contents since 3 0  UnsupportedEncodingException CoreException IStreamContentAccessor getContents

Returns the modification time of this object p Note that this value should only be used to give the user a general idea of how old the object is return the time of last modification in milliseconds since January 1 1970 00 00 00 GMT 

public abstract class Abstract Viewer extends Viewer public void set Input Object input  AbstractViewer setInput
public Object get Input return null  getInput
public I Selection get Selection return null  ISelection getSelection
public void set Selection I Selection s boolean reveal  setSelection ISelection
public void refresh 

private static final String BUNDLE NAME org eclipse compare internal Add From History Action NON NLS 1 public Add From History Action  BUNDLE_NAME AddFromHistoryAction AddFromHistoryAction
protected boolean is Enabled I Selection selection return Utilities get Resources selection length 1  isEnabled ISelection getResources
protected void run I Selection selection Resource Bundle bundle Resource Bundle get Bundle BUNDLE NAME String title Utilities get String bundle title NON NLS 1 Shell parent Shell CompareUI Plugin get Shell Add From History Dialog dialog null Object s Utilities get Resources selection for int i 0 i s length i Object o s i if o instanceof I Container I Container container I Container o Progress Monitor Dialog pmdialog new Progress Monitor Dialog parent Shell I Progress Monitor pm pmdialog get Progress Monitor I File states null try states container find Deleted Members With History I Resource DEPTH INFINITE pm catch Core Exception ex pm done if states null states length 0 String msg Utilities get String bundle no Local History Error NON NLS 1 Message Dialog open Information parent Shell title msg return if dialog null dialog new Add From History Dialog parent Shell bundle dialog set Help Context Id I Compare Context Ids ADD FROM HISTORY DIALOG if dialog select container states Add From History Dialog History Input selected dialog get Selected if selected null selected length 0 try update Workspace bundle parent Shell selected catch Interrupted Exception x Do nothing Operation has been canceled by user catch Invocation Target Exception x String reason x get Target Exception get Message Message Dialog open Error parent Shell title Utilities get Formatted String bundle replace Error reason NON NLS 1  ISelection ResourceBundle ResourceBundle getBundle BUNDLE_NAME getString parentShell CompareUIPlugin getShell AddFromHistoryDialog getResources IContainer IContainer IContainer ProgressMonitorDialog ProgressMonitorDialog parentShell IProgressMonitor getProgressMonitor IFile findDeletedMembersWithHistory IResource DEPTH_INFINITE CoreException getString noLocalHistoryError MessageDialog openInformation parentShell AddFromHistoryDialog parentShell setHelpContextId ICompareContextIds ADD_FROM_HISTORY_DIALOG AddFromHistoryDialog HistoryInput getSelected updateWorkspace parentShell InterruptedException InvocationTargetException getTargetException getMessage MessageDialog openError parentShell getFormattedString replaceError
void create Containers I Resource resource throws Core Exception I Container container resource get Parent if container instanceof I Folder I Folder parent I Folder container if parent null parent exists create Containers parent parent create false true null  createContainers IResource CoreException IContainer getParent IFolder IFolder IFolder createContainers
Workspace Modify Operation operation new Workspace Modify Operation public void execute I Progress Monitor pm throws Invocation Target Exception try String task Name Utilities get String bundle task Name NON NLS 1 pm begin Task task Name selected length for int i 0 i selected length i I File file selected i f File I File State file State selected i f File State create Containers file Sub Progress Monitor sub Monitor new Sub Progress Monitor pm 1 try file create file State get Contents false sub Monitor finally sub Monitor done catch Core Exception e throw new Invocation Target Exception e finally pm done  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor InvocationTargetException taskName getString taskName beginTask taskName IFile fFile IFileState fileState fFileState createContainers SubProgressMonitor subMonitor SubProgressMonitor fileState getContents subMonitor subMonitor CoreException InvocationTargetException
private void update Workspace final Resource Bundle bundle Shell shell final Add From History Dialog History Input selected throws Invocation Target Exception Interrupted Exception Workspace Modify Operation operation new Workspace Modify Operation public void execute I Progress Monitor pm throws Invocation Target Exception try String task Name Utilities get String bundle task Name NON NLS 1 pm begin Task task Name selected length for int i 0 i selected length i I File file selected i f File I File State file State selected i f File State create Containers file Sub Progress Monitor sub Monitor new Sub Progress Monitor pm 1 try file create file State get Contents false sub Monitor finally sub Monitor done catch Core Exception e throw new Invocation Target Exception e finally pm done Progress Monitor Dialog pmdialog new Progress Monitor Dialog shell pmdialog run false true operation  updateWorkspace ResourceBundle AddFromHistoryDialog HistoryInput InvocationTargetException InterruptedException WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor InvocationTargetException taskName getString taskName beginTask taskName IFile fFile IFileState fileState fFileState createContainers SubProgressMonitor subMonitor SubProgressMonitor fileState getContents subMonitor subMonitor CoreException InvocationTargetException ProgressMonitorDialog ProgressMonitorDialog

I File State f File State History Input I File file I File State file State f File file f File State file State  IFileState fFileState HistoryInput IFile IFileState fileState fFile fFileState fileState
f File State file State public Input Stream get Contents throws Core Exception return new Buffered Input Stream f File State get Contents  fFileState fileState InputStream getContents CoreException BufferedInputStream fFileState getContents
public String get Charset String charset null try charset f File State get Charset catch Core Exception e fall through if charset null charset Utilities get Charset f File return charset  getCharset fFileState getCharset CoreException getCharset fFile
return charset public String get Name return f File get Name  getName fFile getName
return f File get Name public String get Type return f File get File Extension  fFile getName getType fFile getFileExtension
return f File get File Extension public Image get Image return CompareUI get Image f File  fFile getFileExtension getImage getImage fFile
return CompareUI get Image f File public long get Modification Date return f File State get Modification Time  getImage fFile getModificationDate fFileState getModificationTime
private int f Selected File History I File file f File file  fSelected FileHistory IFile fFile
I File get File return f File  IFile getFile fFile
I File State get States if f States null try f States f File get History new Null Progress Monitor catch Core Exception ex Need Work return f States  IFileState getStates fStates fStates fFile getHistory NullProgressMonitor CoreException NeedWork fStates
I File State get Selected State return get States f Selected  IFileState getSelectedState getStates fSelected
void set Selected I File State state for int i 0 i f States length i if f States i state f Selected i return  setSelected IFileState fStates fStates fSelected
History Input get History Input return new History Input f File get Selected State  HistoryInput getHistoryInput HistoryInput fFile getSelectedState
boolean is Selected int index return index f Selected  isSelected fSelected
public Add From History Dialog Shell parent Resource Bundle bundle super parent bundle String icon Name Utilities get String f Bundle date Icon obj16 day obj gif NON NLS 2 NON NLS 1 Image Descriptor id CompareUI Plugin get Image Descriptor icon Name if id null f Date Image id create Image icon Name Utilities get String f Bundle time Icon obj16 resource obj gif NON NLS 1 NON NLS 2 id CompareUI Plugin get Image Descriptor icon Name if id null f Time Image id create Image  AddFromHistoryDialog ResourceBundle iconName getString fBundle dateIcon day_obj ImageDescriptor CompareUIPlugin getImageDescriptor iconName fDateImage createImage iconName getString fBundle timeIcon resource_obj CompareUIPlugin getImageDescriptor iconName fTimeImage createImage
public boolean select I Container root I File input Files create create widgets String format Utilities get String f Bundle member Pane Title NON NLS 1 String title Message Format format format new Object root get Name f Member Pane set Image CompareUI get Image root f Member Pane set Text title sort input files final int count input Files length final I File files new I File count for int i 0 i count i files i input Files i if count 1 internal Sort files 0 count 1 String prefix root get Full Path to String if f Member Table null f Member Table is Disposed for int i 0 i files length i I File file files i String path file get Full Path to String if path starts With prefix path path substring prefix length 1 Table Item ti new Table Item f Member Table SWT NONE ti set Image CompareUI get Image file ti set Text path ti set Data new File History file open return get Return Code OK f Array List size 0  IContainer IFile inputFiles getString fBundle memberPaneTitle MessageFormat getName fMemberPane setImage getImage fMemberPane setText inputFiles IFile IFile inputFiles internalSort getFullPath toString fMemberTable fMemberTable isDisposed IFile getFullPath toString startsWith TableItem TableItem fMemberTable setImage getImage setText setData FileHistory getReturnCode fArrayList
History Input get Selected History Input selected new History Input f Array List size Iterator iter f Array List iterator for int i 0 iter has Next i File History h File History iter next selected i h get History Input return selected  HistoryInput getSelected HistoryInput HistoryInput fArrayList fArrayList hasNext FileHistory FileHistory getHistoryInput
new Dispose Listener public void widget Disposed Dispose Event e if f Date Image null f Date Image dispose if f Time Image null f Time Image dispose  DisposeListener widgetDisposed DisposeEvent fDateImage fDateImage fTimeImage fTimeImage
new Selection Adapter public void widget Selected Selection Event e if e detail SWT CHECK if e item instanceof Table Item Table Item ti Table Item e item if ti get Checked f Array List add ti get Data else f Array List remove ti get Data if f Commit Button null f Commit Button set Enabled f Array List size 0 else handle Member Select e item  SelectionAdapter widgetSelected SelectionEvent TableItem TableItem TableItem getChecked fArrayList getData fArrayList getData fCommitButton fCommitButton setEnabled fArrayList handleMemberSelect
f Edition Tree add Selection Listener new Selection Adapter public void widget Selected Selection Event e feed Content e item  fEditionTree addSelectionListener SelectionAdapter widgetSelected SelectionEvent feedContent
apply Dialog Font parent to avoid applying font to compare viewer f Content Pane new Compare Viewer Switching Pane vsplitter SWT BORDER SWT FLAT protected Viewer get Viewer Viewer old Viewer Object input return CompareUI find Content Viewer old Viewer input this f Compare Configuration  applyDialogFont fContentPane CompareViewerSwitchingPane getViewer oldViewer findContentViewer oldViewer fCompareConfiguration
protected synchronized Control create Dialog Area Composite parent2 Composite parent Composite super create Dialog Area parent2 get Shell set Text Utilities get String f Bundle title NON NLS 1 org eclipse compare Splitter vsplitter new org eclipse compare Splitter parent SWT VERTICAL vsplitter set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Grid Data VERTICAL ALIGN FILL Grid Data GRAB VERTICAL vsplitter add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Date Image null f Date Image dispose if f Time Image null f Time Image dispose we need two panes the left for the elements the right one for the editions Splitter hsplitter new Splitter vsplitter SWT HORIZONTAL Composite c new Composite hsplitter SWT NONE Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 2 layout vertical Spacing 2 layout num Columns 1 c set Layout layout Label l1 new Label c SWT NONE l1 set Text Utilities get String f Bundle member Description NON NLS 1 f Member Pane new Compare Viewer Pane c SWT BORDER SWT FLAT Grid Data gd new Grid Data Grid Data FILL HORIZONTAL Grid Data FILL VERTICAL f Member Pane set Layout Data gd f Member Table new Table f Member Pane SWT CHECK SWT H SCROLL SWT V SCROLL f Member Table add Selection Listener new Selection Adapter public void widget Selected Selection Event e if e detail SWT CHECK if e item instanceof Table Item Table Item ti Table Item e item if ti get Checked f Array List add ti get Data else f Array List remove ti get Data if f Commit Button null f Commit Button set Enabled f Array List size 0 else handle Member Select e item f Member Pane set Content f Member Table c new Composite hsplitter SWT NONE layout new Grid Layout layout margin Width 0 layout margin Height 2 layout vertical Spacing 2 layout num Columns 1 c set Layout layout Label l2 new Label c SWT NONE l2 set Text Utilities get String f Bundle edition Description NON NLS 1 f Edition Pane new Compare Viewer Pane c SWT BORDER SWT FLAT gd new Grid Data Grid Data FILL HORIZONTAL Grid Data FILL VERTICAL f Edition Pane set Layout Data gd f Edition Tree new Tree f Edition Pane SWT H SCROLL SWT V SCROLL f Edition Tree add Selection Listener new Selection Adapter public void widget Selected Selection Event e feed Content e item f Edition Pane set Content f Edition Tree apply Dialog Font parent to avoid applying font to compare viewer f Content Pane new Compare Viewer Switching Pane vsplitter SWT BORDER SWT FLAT protected Viewer get Viewer Viewer old Viewer Object input return CompareUI find Content Viewer old Viewer input this f Compare Configuration vsplitter set Weights new int 30 70 return parent  createDialogArea createDialogArea getShell setText getString fBundle setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridData VERTICAL_ALIGN_FILL GridData GRAB_VERTICAL addDisposeListener DisposeListener widgetDisposed DisposeEvent fDateImage fDateImage fTimeImage fTimeImage GridLayout GridLayout marginWidth marginHeight verticalSpacing numColumns setLayout setText getString fBundle memberDescription fMemberPane CompareViewerPane GridData GridData GridData FILL_HORIZONTAL GridData FILL_VERTICAL fMemberPane setLayoutData fMemberTable fMemberPane H_SCROLL V_SCROLL fMemberTable addSelectionListener SelectionAdapter widgetSelected SelectionEvent TableItem TableItem TableItem getChecked fArrayList getData fArrayList getData fCommitButton fCommitButton setEnabled fArrayList handleMemberSelect fMemberPane setContent fMemberTable GridLayout marginWidth marginHeight verticalSpacing numColumns setLayout setText getString fBundle editionDescription fEditionPane CompareViewerPane GridData GridData FILL_HORIZONTAL GridData FILL_VERTICAL fEditionPane setLayoutData fEditionTree fEditionPane H_SCROLL V_SCROLL fEditionTree addSelectionListener SelectionAdapter widgetSelected SelectionEvent feedContent fEditionPane setContent fEditionTree applyDialogFont fContentPane CompareViewerSwitchingPane getViewer oldViewer findContentViewer oldViewer fCompareConfiguration setWeights
Feeds selection from member viewer to edition viewer private void handle Member Select Widget w Object data null if w null data w get Data if data instanceof File History File History h File History data f Current File History h I File file h get File I File State states h get States f Edition Pane set Image CompareUI get Image file String pattern Utilities get String f Bundle tree Title Format NON NLS 1 String title Message Format format pattern new Object file get Name f Edition Pane set Text title if f Edition Tree null f Edition Tree set Redraw false f Edition Tree remove All for int i 0 i states length i add Edition new History Input file states i h is Selected i f Edition Tree set Redraw true else f Current File History null  handleMemberSelect getData FileHistory FileHistory FileHistory fCurrentFileHistory IFile getFile IFileState getStates fEditionPane setImage getImage getString fBundle treeTitleFormat MessageFormat getName fEditionPane setText fEditionTree fEditionTree setRedraw fEditionTree removeAll addEdition HistoryInput isSelected fEditionTree setRedraw fCurrentFileHistory
Adds the given Pair to the edition tree It takes care of creating tree nodes for different dates private void add Edition History Input input boolean is Selected if f Edition Tree null f Edition Tree is Disposed return I File State state input f File State find last day Tree Item days f Edition Tree get Items Tree Item last Day null if days length 0 last Day days days length 1 long ldate state get Modification Time long day day Number ldate Date date new Date ldate if last Day null day day Number Date last Day get Data get Time last Day new Tree Item f Edition Tree SWT NONE last Day set Image f Date Image String df Date Format get Date Instance format date long today day Number System current Time Millis String format Key if day today format Key today Format NON NLS 1 else if day today 1 format Key yesterday Format NON NLS 1 else format Key day Format NON NLS 1 String pattern Utilities get String f Bundle format Key if pattern null df Message Format format pattern new String df last Day set Text df last Day set Data date Tree Item ti new Tree Item last Day SWT NONE ti set Image f Time Image ti set Text Date Format get Time Instance format date ti set Data input if is Selected last Day set Expanded true f Edition Tree set Selection new Tree Item ti feed Content ti  addEdition HistoryInput isSelected fEditionTree fEditionTree isDisposed IFileState fFileState TreeItem fEditionTree getItems TreeItem lastDay lastDay getModificationTime dayNumber lastDay dayNumber lastDay getData getTime lastDay TreeItem fEditionTree lastDay setImage fDateImage DateFormat getDateInstance dayNumber currentTimeMillis formatKey formatKey todayFormat formatKey yesterdayFormat formatKey dayFormat getString fBundle formatKey MessageFormat lastDay setText lastDay setData TreeItem TreeItem lastDay setImage fTimeImage setText DateFormat getTimeInstance setData isSelected lastDay setExpanded fEditionTree setSelection TreeItem feedContent
Returns the number of s since Jan 1st 1970 The given date is converted to GMT and daylight saving is taken into account too private long day Number long date int ONE DAY MS 24 60 60 1000 one day in milli seconds Calendar calendar Calendar get Instance long local Time Offset calendar get Calendar ZONE OFFSET calendar get Calendar DST OFFSET return date local Time Offset ONE DAY MS  dayNumber ONE_DAY_MS getInstance localTimeOffset ZONE_OFFSET DST_OFFSET localTimeOffset ONE_DAY_MS
Feeds the tree viewer s selection to the contentviewer private void feed Content Widget w if f Content Pane null f Content Pane is Disposed Object o w get Data if o instanceof History Input History Input selected History Input o f Content Pane set Input selected f Content Pane set Text get Edition Label selected f Content Pane set Image f Time Image if f Current File History null f Current File History set Selected selected f File State else f Content Pane set Input null  feedContent fContentPane fContentPane isDisposed getData HistoryInput HistoryInput HistoryInput fContentPane setInput fContentPane setText getEditionLabel fContentPane setImage fTimeImage fCurrentFileHistory fCurrentFileHistory setSelected fFileState fContentPane setInput
protected String get Edition Label History Input input String format Utilities get String f Bundle history Edition Label null NON NLS 1 if format null format Utilities get String f Bundle edition Label NON NLS 1 if format null format x 0 NON NLS 1 long mod Date input get Modification Date String date Date Format get Date Time Instance format new Date mod Date return Message Format format format new Object date  getEditionLabel HistoryInput getString fBundle historyEditionLabel getString fBundle editionLabel modDate getModificationDate DateFormat getDateTimeInstance modDate MessageFormat
protected void create Buttons For Button Bar Composite parent String button Label Utilities get String f Bundle button Label I Dialog Constants OK LABEL NON NLS 1 a Cancel and a Add button f Commit Button create Button parent I Dialog Constants OK ID button Label true f Commit Button set Enabled false create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar buttonLabel getString fBundle buttonLabel IDialogConstants OK_LABEL fCommitButton createButton IDialogConstants OK_ID buttonLabel fCommitButton setEnabled createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
Returns true if the pathname of f1 comes after f2 private static boolean greater Than I File f1 I File f2 String ss1 f1 get Full Path segments String ss2 f2 get Full Path segments int l1 ss1 length int l2 ss2 length int n Math max l1 l2 for int i 0 i n i String s1 i l1 ss1 i NON NLS 1 String s2 i l2 ss2 i NON NLS 1 int rc s1 compare To Ignore Case s2 if rc 0 return rc 0 return false  greaterThan IFile IFile getFullPath getFullPath compareToIgnoreCase
private static void internal Sort I File keys int left int right int original left left int original right right I File mid keys left right 2 do while greater Than keys left mid left while greater Than mid keys right right if left right I File tmp keys left keys left keys right keys right tmp left right while left right if original left right internal Sort keys original left right if left original right internal Sort keys left original right  internalSort IFile original_left original_right IFile greaterThan greaterThan IFile original_left internalSort original_left original_right internalSort original_right

see org eclipse ui I Action Delegate run org eclipse jface action I Action final public void run I Action action run f Selection  IActionDelegate IAction IAction fSelection
final public void selection Changed I Action action I Selection selection f Selection selection if action null action set Enabled is Enabled f Selection  selectionChanged IAction ISelection fSelection setEnabled isEnabled fSelection
protected boolean is Enabled I Selection selection return false  isEnabled ISelection
abstract protected void run I Selection selection  ISelection

public Binary Compare Viewer Composite parent Compare Configuration cc Workbench Help set Help parent I Compare Context Ids BINARY COMPARE VIEW f Bundle Resource Bundle get Bundle BUNDLE NAME f Control new Label parent SWT WRAP f Control set Data CompareUI COMPARE VIEWER TITLE Utilities get String f Bundle title NON NLS 1 f Left Is Local Utilities get Boolean cc LEFT IS LOCAL false NON NLS 1  BinaryCompareViewer CompareConfiguration WorkbenchHelp setHelp ICompareContextIds BINARY_COMPARE_VIEW fBundle ResourceBundle getBundle BUNDLE_NAME fControl fControl setData COMPARE_VIEWER_TITLE getString fBundle fLeftIsLocal getBoolean LEFT_IS_LOCAL
public Control get Control return f Control  getControl fControl
public void set Input Object input if f Control null input instanceof I Compare Input f Input I Compare Input input Input Stream left null Input Stream right null String message null try left get Stream f Input get Left right get Stream f Input get Right if left null right null int pos 0 while true int l left read int r right read if l r String format Utilities get String f Bundle diff Message Format NON NLS 1 message Message Format format format new String Integer to String pos break if l EOF break pos else if left null right null message Utilities get String f Bundle delete Conflict Message NON NLS 1 else if left null if f Left Is Local message Utilities get String f Bundle deleted Message NON NLS 1 else message Utilities get String f Bundle added Message NON NLS 1 else if right null if f Left Is Local message Utilities get String f Bundle added Message NON NLS 1 else message Utilities get String f Bundle deleted Message NON NLS 1 catch Core Exception ex message Utilities get String f Bundle error Message NON NLS 1 catch IO Exception ex message Utilities get String f Bundle error Message NON NLS 1 finally Utilities close left Utilities close right if message null f Control set Text message  setInput fControl ICompareInput fInput ICompareInput InputStream InputStream getStream fInput getLeft getStream fInput getRight getString fBundle diffMessageFormat MessageFormat toString getString fBundle deleteConflictMessage fLeftIsLocal getString fBundle deletedMessage getString fBundle addedMessage fLeftIsLocal getString fBundle addedMessage getString fBundle deletedMessage CoreException getString fBundle errorMessage IOException getString fBundle errorMessage fControl setText
public Object get Input return f Input  getInput fInput
private Input Stream get Stream I Typed Element input throws Core Exception if input instanceof I Stream Content Accessor return I Stream Content Accessor input get Contents return null  InputStream getStream ITypedElement CoreException IStreamContentAccessor IStreamContentAccessor getContents

public class Binary Compare Viewer Creator implements I Viewer Creator public Viewer create Viewer Composite parent Compare Configuration mp return new Binary Compare Viewer parent mp  BinaryCompareViewerCreator IViewerCreator createViewer CompareConfiguration BinaryCompareViewer

add Paint Listener new Paint Listener public void paint Control Paint Event event double Buffer Paint event gc  addPaintListener PaintListener paintControl PaintEvent doubleBufferPaint
new Dispose Listener public void widget Disposed Dispose Event e if f Buffer null f Buffer dispose f Buffer null  DisposeListener widgetDisposed DisposeEvent fBuffer fBuffer fBuffer
public Buffered Canvas Composite parent int flags super parent flags SWT NO BACKGROUND add Paint Listener new Paint Listener public void paint Control Paint Event event double Buffer Paint event gc add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Buffer null f Buffer dispose f Buffer null  BufferedCanvas NO_BACKGROUND addPaintListener PaintListener paintControl PaintEvent doubleBufferPaint addDisposeListener DisposeListener widgetDisposed DisposeEvent fBuffer fBuffer fBuffer
public void repaint if is Disposed GC gc new GC this double Buffer Paint gc gc dispose  isDisposed doubleBufferPaint
Double buffer drawing void double Buffer Paint GC dest if USE DOUBLE BUFFER do Paint dest return Point size get Size if size x 1 size y 1 we test for 1 because on X11 controls have initial size 1 1 return if f Buffer null Rectangle r f Buffer get Bounds if r width size x r height size y f Buffer dispose f Buffer null if f Buffer null f Buffer new Image get Display size x size y GC gc new GC f Buffer try gc set Background get Background gc fill Rectangle 0 0 size x size y do Paint gc finally gc dispose dest draw Image f Buffer 0 0  doubleBufferPaint USE_DOUBLE_BUFFER doPaint getSize fBuffer fBuffer getBounds fBuffer fBuffer fBuffer fBuffer getDisplay fBuffer setBackground getBackground fillRectangle doPaint drawImage fBuffer
abstract public void do Paint GC gc  doPaint

Creates a code Resource Node code for the given resource param resource the resource public Buffered Resource Node I Resource resource super resource  ResourceNode BufferedResourceNode IResource
Returns code true code if buffer contains uncommitted changes public boolean is Dirty return f Dirty  isDirty fDirty
protected I Structure Comparator create Child I Resource child return new Buffered Resource Node child  IStructureComparator createChild IResource BufferedResourceNode
public void set Content byte contents f Dirty true super set Content contents  setContent fDirty setContent
Commits buffered contents to resource public void commit I Progress Monitor pm throws Core Exception if f Dirty if f Delete File null f Delete File delete true true pm return I Resource resource get Resource if resource instanceof I File byte bytes get Content Byte Array Input Stream is new Byte Array Input Stream bytes try I File file I File resource if file exists file set Contents is false true pm else file create is false pm f Dirty false finally if is null try is close catch IO Exception ex Silently ignored  IProgressMonitor CoreException fDirty fDeleteFile fDeleteFile IResource getResource IFile getContent ByteArrayInputStream ByteArrayInputStream IFile IFile setContents fDirty IOException
public I Typed Element replace I Typed Element child I Typed Element other if child null add resource create a node without a resource behind it I Resource resource get Resource if resource instanceof I Folder I Folder folder I Folder resource I File file folder get File other get Name child new Buffered Resource Node file if other null delete resource I Resource resource get Resource if resource instanceof I Folder I Folder folder I Folder resource I File file folder get File child get Name if file null file exists f Delete File file f Dirty true return null if other instanceof I Stream Content Accessor child instanceof I Editable Content I Editable Content dst I Editable Content child try Input Stream is I Stream Content Accessor other get Contents byte bytes Utilities read Bytes is if bytes null dst set Content bytes catch Core Exception ex Need Work return child  ITypedElement ITypedElement ITypedElement IResource getResource IFolder IFolder IFolder IFile getFile getName BufferedResourceNode IResource getResource IFolder IFolder IFolder IFile getFile getName fDeleteFile fDirty IStreamContentAccessor IEditableContent IEditableContent IEditableContent InputStream IStreamContentAccessor getContents readBytes setContent CoreException NeedWork

public Change Property Action Resource Bundle bundle Compare Configuration cc String rkey String pkey f Property Key pkey f Bundle bundle f Prefix rkey Utilities init Action this f Bundle f Prefix set Compare Configuration cc  ChangePropertyAction ResourceBundle CompareConfiguration fPropertyKey fBundle fPrefix initAction fBundle fPrefix setCompareConfiguration
public void run boolean b Utilities get Boolean f Compare Configuration f Property Key false set Checked b if f Compare Configuration null f Compare Configuration set Property f Property Key new Boolean b  getBoolean fCompareConfiguration fPropertyKey setChecked fCompareConfiguration fCompareConfiguration setProperty fPropertyKey
public void set Checked boolean state super set Checked state Utilities init Toggle Action this f Bundle f Prefix state  setChecked setChecked initToggleAction fBundle fPrefix
public void set Compare Configuration Compare Configuration cc f Compare Configuration cc set Checked Utilities get Boolean f Compare Configuration f Property Key false  setCompareConfiguration CompareConfiguration fCompareConfiguration setChecked getBoolean fCompareConfiguration fPropertyKey

public void run I Selection selection if f Input null f Input set Selection selection f Input initialize Compare Configuration CompareUI open Compare Editor On Page f Input f Workbench Page f Input null don t reuse this input  ISelection fInput fInput setSelection fInput initializeCompareConfiguration openCompareEditorOnPage fInput fWorkbenchPage fInput
protected boolean is Enabled I Selection selection if f Input null Compare Configuration cc new Compare Configuration buffered merge mode don t ask for confirmation when switching between modified resources cc set Property Compare Editor CONFIRM SAVE PROPERTY new Boolean false uncomment following line to have separate outline view cc set Property Compare Configuration USE OUTLINE VIEW new Boolean true f Input new Resource Compare Input cc return f Input is Enabled selection  isEnabled ISelection fInput CompareConfiguration CompareConfiguration setProperty CompareEditor CONFIRM_SAVE_PROPERTY setProperty CompareConfiguration USE_OUTLINE_VIEW fInput ResourceCompareInput fInput isEnabled
public void set Active Part I Action action I Workbench Part target Part f Workbench Page target Part get Site get Page  setActivePart IAction IWorkbenchPart targetPart fWorkbenchPage targetPart getSite getPage

Compare Dialog Shell shell Compare Editor Input input super shell null Assert is Not Null input f Compare Editor Input input f Compare Editor Input add Property Change Listener this set Help Context Id I Compare Context Ids COMPARE DIALOG  CompareDialog CompareEditorInput isNotNull fCompareEditorInput fCompareEditorInput addPropertyChangeListener setHelpContextId ICompareContextIds COMPARE_DIALOG
public boolean close if super close if f Compare Editor Input null f Compare Editor Input add Property Change Listener this return true return false  fCompareEditorInput fCompareEditorInput addPropertyChangeListener
protected void create Buttons For Button Bar Composite parent f Commit Button create Button parent I Dialog Constants OK ID Utilities get String Compare Dialog commit Action label true NON NLS 1 f Commit Button set Enabled false create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar fCommitButton createButton IDialogConstants OK_ID getString CompareDialog commitAction fCommitButton setEnabled createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
public void property Change Property Change Event event if f Commit Button null f Compare Editor Input null f Commit Button set Enabled f Compare Editor Input is Save Needed  propertyChange PropertyChangeEvent fCommitButton fCompareEditorInput fCommitButton setEnabled fCompareEditorInput isSaveNeeded
protected Control create Dialog Area Composite parent2 Composite parent Composite super create Dialog Area parent2 Control c f Compare Editor Input create Contents parent c set Layout Data new Grid Data Grid Data FILL BOTH Shell shell c get Shell shell set Text f Compare Editor Input get Title shell set Image f Compare Editor Input get Title Image apply Dialog Font parent return parent  createDialogArea createDialogArea fCompareEditorInput createContents setLayoutData GridData GridData FILL_BOTH getShell setText fCompareEditorInput getTitle setImage fCompareEditorInput getTitleImage applyDialogFont
Workspace Modify Operation operation new Workspace Modify Operation public void execute I Progress Monitor pm throws Core Exception f Compare Editor Input save Changes pm  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException fCompareEditorInput saveChanges
public int open int rc super open if rc OK f Compare Editor Input is Save Needed Workspace Modify Operation operation new Workspace Modify Operation public void execute I Progress Monitor pm throws Core Exception f Compare Editor Input save Changes pm Shell shell get Parent Shell Progress Monitor Dialog pmd new Progress Monitor Dialog shell try operation run pmd get Progress Monitor catch Interrupted Exception x Need Work catch Operation Canceled Exception x Need Work catch Invocation Target Exception x String title Utilities get String Compare Dialog save Error Title NON NLS 1 String msg Utilities get String Compare Dialog save Error Message NON NLS 1 Message Dialog open Error shell title msg x get Target Exception get Message return rc  fCompareEditorInput isSaveNeeded WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException fCompareEditorInput saveChanges getParentShell ProgressMonitorDialog ProgressMonitorDialog getProgressMonitor InterruptedException NeedWork OperationCanceledException NeedWork InvocationTargetException getString CompareDialog saveErrorTitle getString CompareDialog saveErrorMessage MessageDialog openError getTargetException getMessage

see I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event Compare Editor this property Change event  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent CompareEditor propertyChange
private Compare Outline Page f Outline Page enable outline public Compare Editor  CompareOutlinePage fOutlinePage CompareEditor
non Javadoc Method declared on I Adaptable public Object get Adapter Class key if key equals I Content Outline Page class Object object get Compare Configuration get Property Compare Configuration USE OUTLINE VIEW if object instanceof Boolean Boolean object boolean Value I Editor Input input get Editor Input if input instanceof Compare Editor Input f Outline Page new Compare Outline Page Compare Editor Input input return f Outline Page return super get Adapter key  IAdaptable getAdapter IContentOutlinePage getCompareConfiguration getProperty CompareConfiguration USE_OUTLINE_VIEW booleanValue IEditorInput getEditorInput CompareEditorInput fOutlinePage CompareOutlinePage CompareEditorInput fOutlinePage getAdapter
package Compare Configuration get Compare Configuration I Editor Input input get Editor Input if input instanceof Compare Editor Input return Compare Editor Input input get Compare Configuration return null  CompareConfiguration getCompareConfiguration IEditorInput getEditorInput CompareEditorInput CompareEditorInput getCompareConfiguration
public void init I Editor Site site I Editor Input input throws Part Init Exception if input instanceof Compare Editor Input throw new Part Init Exception Utilities get String Compare Editor invalid Input NON NLS 1 set Site site set Input input  IEditorSite IEditorInput PartInitException CompareEditorInput PartInitException getString CompareEditor invalidInput setSite setInput
public void set Input I Editor Input input try do Set Input input catch Core Exception x String title Utilities get String Compare Editor error setinput title NON NLS 1 String msg Utilities get String Compare Editor error setinput message NON NLS 1 Error Dialog open Error get Site get Shell title msg x get Status  setInput IEditorInput doSetInput CoreException getString CompareEditor getString CompareEditor ErrorDialog openError getSite getShell getStatus
public void do Set Input I Editor Input input throws Core Exception if input instanceof Compare Editor Input I Status s new Status I Status ERROR PlatformUI PLUGIN ID I Status OK Utilities get String Compare Editor invalid Input null NON NLS 1 throw new Core Exception s I Editor Input old Input get Editor Input if old Input instanceof I Property Change Notifier I Property Change Notifier input remove Property Change Listener f Property Change Listener super set Input input Compare Editor Input cei Compare Editor Input input set Title Image cei get Title Image set Part Name cei get Title was set Title cei get Title if input instanceof I Property Change Notifier I Property Change Notifier input add Property Change Listener f Property Change Listener if old Input null if f Control null f Control is Disposed Point old Size f Control get Size Composite parent f Control get Parent f Control dispose create Part Control parent if f Control null f Control set Size old Size  doSetInput IEditorInput CoreException CompareEditorInput IStatus IStatus PLUGIN_ID IStatus getString CompareEditor invalidInput CoreException IEditorInput oldInput getEditorInput oldInput IPropertyChangeNotifier IPropertyChangeNotifier removePropertyChangeListener fPropertyChangeListener setInput CompareEditorInput CompareEditorInput setTitleImage getTitleImage setPartName getTitle setTitle getTitle IPropertyChangeNotifier IPropertyChangeNotifier addPropertyChangeListener fPropertyChangeListener oldInput fControl fControl isDisposed oldSize fControl getSize fControl getParent fControl createPartControl fControl fControl setSize oldSize
public I Action Bars get Action Bars return f Action Bars  IActionBars getActionBars fActionBars
public void set Action Bars I Action Bars action Bars f Action Bars action Bars  setActionBars IActionBars actionBars fActionBars actionBars
public void create Part Control Composite parent parent set Data this I Editor Input input get Editor Input if input instanceof Compare Editor Input f Control Compare Editor Input input create Contents parent Workbench Help set Help f Control I Compare Context Ids COMPARE EDITOR  createPartControl setData IEditorInput getEditorInput CompareEditorInput fControl CompareEditorInput createContents WorkbenchHelp setHelp fControl ICompareContextIds COMPARE_EDITOR
public void dispose I Editor Input input get Editor Input if input instanceof I Property Change Notifier I Property Change Notifier input remove Property Change Listener f Property Change Listener super dispose f Property Change Listener null  IEditorInput getEditorInput IPropertyChangeNotifier IPropertyChangeNotifier removePropertyChangeListener fPropertyChangeListener fPropertyChangeListener
public void set Focus I Editor Input input get Editor Input if input instanceof Compare Editor Input Compare Editor Input input set Focus  setFocus IEditorInput getEditorInput CompareEditorInput CompareEditorInput setFocus
Returns false because the editor doesn t support Save As public boolean is Save As Allowed return false  isSaveAsAllowed
public void goto Marker I Marker marker  gotoMarker IMarker
Always throws an Assertion Failed Exception see I Editor Part do Save As public void do Save As Assert is True false Save As not supported for Compare Editor  AssertionFailedException IEditorPart doSaveAs doSaveAs isTrue CompareEditor
Workspace Modify Operation operation new Workspace Modify Operation public void execute I Progress Monitor pm throws Core Exception if input instanceof Compare Editor Input Compare Editor Input input save Changes pm  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException CompareEditorInput CompareEditorInput saveChanges
public void do Save I Progress Monitor progress Monitor final I Editor Input input get Editor Input Workspace Modify Operation operation new Workspace Modify Operation public void execute I Progress Monitor pm throws Core Exception if input instanceof Compare Editor Input Compare Editor Input input save Changes pm Shell shell get Site get Shell try operation run progress Monitor fire Property Change PROP DIRTY catch Interrupted Exception x Need Work catch Operation Canceled Exception x Need Work catch Invocation Target Exception x String title Utilities get String Compare Editor save Error title NON NLS 1 String reason x get Target Exception get Message Message Dialog open Error shell title Utilities get Formatted String Compare Editor cant Save Error reason NON NLS 1  doSave IProgressMonitor progressMonitor IEditorInput getEditorInput WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException CompareEditorInput CompareEditorInput saveChanges getSite getShell progressMonitor firePropertyChange PROP_DIRTY InterruptedException NeedWork OperationCanceledException NeedWork InvocationTargetException getString CompareEditor saveError getTargetException getMessage MessageDialog openError getFormattedString CompareEditor cantSaveError
public boolean is Dirty I Editor Input input get Editor Input if input instanceof Compare Editor Input return Compare Editor Input input is Save Needed return false  isDirty IEditorInput getEditorInput CompareEditorInput CompareEditorInput isSaveNeeded
public void property Change Property Change Event event Object old value event get Old Value Object new value event get New Value if old value null new value null old value equals new value fire Property Change PROP DIRTY  propertyChange PropertyChangeEvent old_value getOldValue new_value getNewValue old_value new_value old_value new_value firePropertyChange PROP_DIRTY

public Compare Editor Contributor Resource Bundle bundle CompareUI get Resource Bundle f Ignore Whitespace new Ignore White Space Action bundle null Workbench Help set Help f Ignore Whitespace I Compare Context Ids IGNORE WHITESPACE ACTION f Next new Navigation Action bundle true Workbench Help set Help f Next I Compare Context Ids GLOBAL NEXT DIFF ACTION f Previous new Navigation Action bundle false Workbench Help set Help f Previous I Compare Context Ids GLOBAL PREVIOUS DIFF ACTION f Toolbar Next new Navigation Action bundle true Workbench Help set Help f Toolbar Next I Compare Context Ids NEXT DIFF ACTION f Toolbar Previous new Navigation Action bundle false Workbench Help set Help f Toolbar Previous I Compare Context Ids PREVIOUS DIFF ACTION  CompareEditorContributor ResourceBundle getResourceBundle fIgnoreWhitespace IgnoreWhiteSpaceAction WorkbenchHelp setHelp fIgnoreWhitespace ICompareContextIds IGNORE_WHITESPACE_ACTION fNext NavigationAction WorkbenchHelp setHelp fNext ICompareContextIds GLOBAL_NEXT_DIFF_ACTION fPrevious NavigationAction WorkbenchHelp setHelp fPrevious ICompareContextIds GLOBAL_PREVIOUS_DIFF_ACTION fToolbarNext NavigationAction WorkbenchHelp setHelp fToolbarNext ICompareContextIds NEXT_DIFF_ACTION fToolbarPrevious NavigationAction WorkbenchHelp setHelp fToolbarPrevious ICompareContextIds PREVIOUS_DIFF_ACTION
public void contribute To Tool Bar I Tool Bar Manager tbm tbm add new Separator tbm add f Ignore Whitespace tbm add f Toolbar Next tbm add f Toolbar Previous  contributeToToolBar IToolBarManager fIgnoreWhitespace fToolbarNext fToolbarPrevious
see Editor Action Bar Contributor contribute To Menu I Menu Manager public void contribute To Menu I Menu Manager menu Manager  EditorActionBarContributor contributeToMenu IMenuManager contributeToMenu IMenuManager menuManager
public void set Active Editor I Editor Part target Editor if f Active Editor Part target Editor return f Active Editor Part target Editor if f Active Editor Part null I Editor Input input f Active Editor Part get Editor Input if input instanceof Compare Editor Input Compare Editor Input compare Input Compare Editor Input input f Next set Compare Editor Input compare Input f Previous set Compare Editor Input compare Input Begin fix http bugs eclipse org bugs show bug cgi id 20105 f Toolbar Next set Compare Editor Input compare Input f Toolbar Previous set Compare Editor Input compare Input End fix http bugs eclipse org bugs show bug cgi id 20105 if target Editor instanceof Compare Editor I Action Bars action Bars get Action Bars Compare Editor editor Compare Editor target Editor editor set Action Bars action Bars action Bars set Global Action Handler Action Factory NEXT get Id f Next action Bars set Global Action Handler Action Factory PREVIOUS get Id f Previous Compare Configuration cc editor get Compare Configuration f Ignore Whitespace set Compare Configuration cc  setActiveEditor IEditorPart targetEditor fActiveEditorPart targetEditor fActiveEditorPart targetEditor fActiveEditorPart IEditorInput fActiveEditorPart getEditorInput CompareEditorInput CompareEditorInput compareInput CompareEditorInput fNext setCompareEditorInput compareInput fPrevious setCompareEditorInput compareInput show_bug fToolbarNext setCompareEditorInput compareInput fToolbarPrevious setCompareEditorInput compareInput show_bug targetEditor CompareEditor IActionBars actionBars getActionBars CompareEditor CompareEditor targetEditor setActionBars actionBars actionBars setGlobalActionHandler ActionFactory getId fNext actionBars setGlobalActionHandler ActionFactory getId fPrevious CompareConfiguration getCompareConfiguration fIgnoreWhitespace setCompareConfiguration

public Compare Filter  CompareFilter
Returns true if path matches filter that is if path should be filtered public boolean filter String path0 boolean folder boolean is Archive if folder f Extra Resource File Filters null char name path0 to Char Array for int i 0 l f Extra Resource File Filters length i l i if match f Extra Resource File Filters i name true return true if folder f Extra Resource Folder Filters null for int i 0 l f Extra Resource Folder Filters length i l i if f Extra Resource Folder Filters 0 equals path0 return true return false  isArchive fExtraResourceFileFilters toCharArray fExtraResourceFileFilters fExtraResourceFileFilters fExtraResourceFolderFilters fExtraResourceFolderFilters fExtraResourceFolderFilters
public static String validate Resource Filters String text I Workspace workspace Resources Plugin get Workspace String filters get Tokens text NON NLS 1 for int i 0 i filters length i String file Name filters i replace x int resource Type I Resource FILE int last Character file Name length 1 if last Character 0 file Name char At last Character file Name file Name substring 0 last Character resource Type I Resource FOLDER I Status status workspace validate Name file Name resource Type if status matches I Status ERROR String format Utilities get String Compare Preference Page filter invalidsegment error NON NLS 1 return Message Format format format new String status get Message return null  validateResourceFilters IWorkspace ResourcesPlugin getWorkspace getTokens fileName resourceType IResource lastCharacter fileName lastCharacter fileName charAt lastCharacter fileName fileName lastCharacter resourceType IResource IStatus validateName fileName resourceType IStatus getString ComparePreferencePage MessageFormat getMessage
public void set Filters String filter Sequence char filters filter Sequence null filter Sequence length 0 split And Trim On filter Sequence to Char Array null if filters null f Extra Resource File Filters null f Extra Resource Folder Filters null else int file Count 0 folder Count 0 for int i 0 l filters length i l i char f filters i if f length 0 continue if f f length 1 folder Count else file Count f Extra Resource File Filters new char file Count f Extra Resource Folder Filters new String folder Count for int i 0 l filters length i l i char f filters i if f length 0 continue if f f length 1 f Extra Resource Folder Filters folder Count new String subarray f 0 f length 1 else f Extra Resource File Filters file Count f  setFilters filterSequence filterSequence filterSequence splitAndTrimOn filterSequence toCharArray fExtraResourceFileFilters fExtraResourceFolderFilters fileCount folderCount folderCount fileCount fExtraResourceFileFilters fileCount fExtraResourceFolderFilters folderCount fExtraResourceFolderFilters folderCount fExtraResourceFileFilters fileCount
private static String get Tokens String text String separator String Tokenizer tok new String Tokenizer text separator NON NLS 1 int n Tokens tok count Tokens String res new String n Tokens for int i 0 i res length i res i tok next Token trim return res  getTokens StringTokenizer StringTokenizer nTokens countTokens nTokens nextToken
Answers true if the pattern matches the given name false otherwise This char pattern matching accepts wild cards and When not case sensitive the pattern is assumed to already be lowercased the name will be lowercased character per character as comparing If name is null the answer is false If pattern is null the answer is true if name is not null br br For example ol li pre pattern b name a b c d is Case Sensitive true result true pre li li pre pattern b name a b c d is Case Sensitive true result false pre li li pre pattern b name a b c d is Case Sensitive true result false pre li ol param pattern the given pattern param name the given name param is Case Sensitive flag to know whether or not the matching should be case sensitive return true if the pattern matches the given name false otherwise private boolean match char pattern char name boolean is Case Sensitive if name null return false null name cannot match if pattern null return true null pattern is equivalent to return match pattern 0 pattern length name 0 name length is Case Sensitive  isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive
Answers true if the a sub pattern matches the subpart of the given name false otherwise char pattern matching accepting wild cards and Can match only subset of name pattern end positions are non inclusive The subpattern is defined by the pattern Start and patttern End positions When not case sensitive the pattern is assumed to already be lowercased the name will be lowercased character per character as comparing br br For example ol li pre pattern b pattern Start 1 pattern End 3 name a b c d name Start 1 name End 4 is Case Sensitive true result true pre li li pre pattern b pattern Start 1 pattern End 2 name a b c d name Start 1 name End 2 is Case Sensitive true result false pre li ol param pattern the given pattern param pattern Start the given pattern start param pattern End the given pattern end param name the given name param name Start the given name start param name End the given name end param is Case Sensitive flag to know if the matching should be case sensitive return true if the a sub pattern matches the subpart of the given name false otherwise private boolean match char pattern int pattern Start int pattern End char name int name Start int name End boolean is Case Sensitive if name null return false null name cannot match if pattern null return true null pattern is equivalent to int i Pattern pattern Start int i Name name Start if pattern End 0 pattern End pattern length if name End 0 name End name length check first segment char pattern Char 0 while i Pattern pattern End pattern Char pattern i Pattern if i Name name End return false if pattern Char is Case Sensitive name i Name Character to Lower Case name i Name pattern Char return false i Name i Pattern check sequence of star segment int segment Start if pattern Char segment Start i Pattern skip star else segment Start 0 force i Name check int prefix Start i Name check Segment while i Name name End if i Pattern pattern End i Pattern segment Start mismatch restart current segment i Name prefix Start continue check Segment segment is ending if pattern Char pattern i Pattern segment Start i Pattern skip start if segment Start pattern End return true prefix Start i Name continue check Segment check current name character if is Case Sensitive name i Name Character to Lower Case name i Name pattern Char pattern Char i Pattern segment Start mismatch restart current segment i Name prefix Start continue check Segment i Name i Pattern return segment Start pattern End i Name name End i Pattern pattern End i Pattern pattern End 1 pattern i Pattern  patternStart pattternEnd patternStart patternEnd nameStart nameEnd isCaseSensitive patternStart patternEnd nameStart nameEnd isCaseSensitive patternStart patternEnd nameStart nameEnd isCaseSensitive patternStart patternEnd nameStart nameEnd isCaseSensitive iPattern patternStart iName nameStart patternEnd patternEnd nameEnd nameEnd patternChar iPattern patternEnd patternChar iPattern iName nameEnd patternChar isCaseSensitive iName toLowerCase iName patternChar iName iPattern segmentStart patternChar segmentStart iPattern segmentStart iName prefixStart iName checkSegment iName nameEnd iPattern patternEnd iPattern segmentStart iName prefixStart checkSegment patternChar iPattern segmentStart iPattern segmentStart patternEnd prefixStart iName checkSegment isCaseSensitive iName toLowerCase iName patternChar patternChar iPattern segmentStart iName prefixStart checkSegment iName iPattern segmentStart patternEnd iName nameEnd iPattern patternEnd iPattern patternEnd iPattern
Return a new array which is the split of the given array using the given divider and triming each subarray to remove whitespaces equals to br br For example ol li pre divider b array a b b a b a result a a a pre li li pre divider c array a b b a b a result a b b a b a pre li li pre divider b array a b b a b a result a a a pre li li pre divider c array a b b a b a result a b b a b a pre li ol param divider the given divider param array the given array return a new array which is the split of the given array using the given divider and triming each subarray to remove whitespaces equals to private char split And Trim On char divider char array int length array null 0 array length if length 0 return NO CHAR CHAR int word Count 1 for int i 0 i length i if array i divider word Count char split new char word Count int last 0 current Word 0 for int i 0 i length i if array i divider int start last end i 1 while start i array start start while end start array end end split current Word new char end start 1 System arraycopy array start split current Word 0 end start 1 last i 1 int start last end length 1 while start length array start start while end start array end end split current Word new char end start 1 System arraycopy array start split current Word 0 end start 1 return split  splitAndTrimOn NO_CHAR_CHAR wordCount wordCount wordCount currentWord currentWord currentWord currentWord currentWord
Answers a new array which is a copy of the given array starting at the given start and ending at the given end The given start is inclusive and the given end is exclusive Answers null if start is greater than end if start is lower than 0 or if end is greater than the length of the given array If end equals 1 it is converted to the array length br br For example ol li pre array a b start 0 end 1 result a pre li li pre array a b start 0 end 1 result a b pre li ol param array the given array param start the given starting index param end the given ending index return a new array which is a copy of the given array starting at the given start and ending at the given end exception Null Pointer Exception if the given array is null private char subarray char array int start int end if end 1 end array length if start end return null if start 0 return null if end array length return null char result new char end start System arraycopy array start result 0 end start return result  NullPointerException

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Compare Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE CompareMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

private boolean f Next First Time true public Compare Navigator Compare Viewer Switching Pane panes f Panes panes  fNextFirstTime CompareNavigator CompareViewerSwitchingPane fPanes
public Compare Viewer Switching Pane get Panes return f Panes  CompareViewerSwitchingPane getPanes fPanes
public boolean select Change boolean next f Last Direction next Fix for http dev eclipse org bugs show bug cgi id 20106 if next f Next First Time must Open f Next First Time false open Element find most down stream Compare Viewer Pane int n 0 I Navigatable navigators new I Navigatable 4 for int i 0 i f Panes length i navigators n get Navigator f Panes i if navigators n null n while n 0 n if navigators n goto Difference next at end of this navigator continue else not at end return false return true  selectChange fLastDirection show_bug fNextFirstTime mustOpen fNextFirstTime openElement CompareViewerPane INavigatable INavigatable fPanes getNavigator fPanes gotoDifference
private static I Navigatable get Navigator Compare Viewer Switching Pane pane if pane null return null if pane is Empty return null Viewer viewer pane get Viewer if viewer null return null Control control viewer get Control if control null return null Object data control get Data I Navigatable NAVIGATOR PROPERTY if data instanceof I Navigatable return I Navigatable data return null  INavigatable getNavigator CompareViewerSwitchingPane isEmpty getViewer getControl getData INavigatable NAVIGATOR_PROPERTY INavigatable INavigatable
private static Compare Navigator find Navigator Control c while c null c is Disposed PR 1GEUVV2 Object data c get Data if data instanceof Compare Editor Input Compare Editor Input cei Compare Editor Input data Object adapter cei get Adapter Compare Navigator class if adapter instanceof Compare Navigator return Compare Navigator adapter c c get Parent return null  CompareNavigator findNavigator isDisposed getData CompareEditorInput CompareEditorInput CompareEditorInput getAdapter CompareNavigator CompareNavigator CompareNavigator getParent
private boolean reset Direction boolean last f Last Direction f Last Direction true return last  resetDirection fLastDirection fLastDirection
public static boolean get Direction Control c Compare Navigator nav find Navigator c if nav null return nav reset Direction return true  getDirection CompareNavigator findNavigator resetDirection
private boolean must Open if f Panes null f Panes length 0 return false for int i 1 i f Panes length i Compare Viewer Switching Pane pane f Panes i if pane null pane get Input null return false return true  mustOpen fPanes fPanes fPanes CompareViewerSwitchingPane fPanes getInput
private void open Element if f Panes null f Panes length 0 return I Openable openable get Openable f Panes 0 if openable null openable open Selected  openElement fPanes fPanes IOpenable getOpenable fPanes openSelected
private static I Openable get Openable Compare Viewer Switching Pane pane if pane null return null if pane is Empty return null Viewer viewer pane get Viewer if viewer null return null Control control viewer get Control if control null return null Object data control get Data I Openable OPENABLE PROPERTY if data instanceof I Openable return I Openable data return null  IOpenable getOpenable CompareViewerSwitchingPane isEmpty getViewer getControl getData IOpenable OPENABLE_PROPERTY IOpenable IOpenable

private Compare Editor Input f Compare Editor Input Compare Outline Page Compare Editor Input input f Compare Editor Input input  CompareEditorInput fCompareEditorInput CompareOutlinePage CompareEditorInput fCompareEditorInput
public void create Control Composite parent if f Compare Editor Input null f Control f Compare Editor Input create Outline Contents parent SWT VERTICAL  createControl fCompareEditorInput fControl fCompareEditorInput createOutlineContents
see org eclipse ui part I Page dispose public void dispose if f Control null f Control dispose  IPage fControl fControl
see org eclipse ui part I Page get Control public Control get Control return f Control  IPage getControl getControl fControl
public void set Action Bars I Action Bars action Bars f Action Bars action Bars if f Control null f Control set Data action Bars action Bars  setActionBars IActionBars actionBars fActionBars actionBars fControl fControl setData actionBars actionBars
see org eclipse ui part I Page set Focus public void set Focus if f Control null f Control set Focus  IPage setFocus setFocus fControl fControl setFocus
see org eclipse jface viewers I Selection Provider add Selection Changed Listener org eclipse jface viewers I Selection Changed Listener public void add Selection Changed Listener I Selection Changed Listener listener f Listeners add listener  ISelectionProvider addSelectionChangedListener ISelectionChangedListener addSelectionChangedListener ISelectionChangedListener fListeners
see org eclipse jface viewers I Selection Provider get Selection public I Selection get Selection return f Selection  ISelectionProvider getSelection ISelection getSelection fSelection
see org eclipse jface viewers I Selection Provider remove Selection Changed Listener org eclipse jface viewers I Selection Changed Listener public void remove Selection Changed Listener I Selection Changed Listener listener f Listeners remove listener  ISelectionProvider removeSelectionChangedListener ISelectionChangedListener removeSelectionChangedListener ISelectionChangedListener fListeners
see org eclipse jface viewers I Selection Provider set Selection org eclipse jface viewers I Selection public void set Selection I Selection selection f Selection selection  ISelectionProvider setSelection ISelection setSelection ISelection fSelection

String f Content Fake Input String name f Content load Preview Content From File name  fContent FakeInput fContent loadPreviewContentFromFile
f Content load Preview Content From File name public Image get Image return null  fContent loadPreviewContentFromFile getImage
return null public String get Name return no name NON NLS 1  getName
return no name NON NLS 1 public String get Type return no type NON NLS 1  getType
return no type NON NLS 1 public Input Stream get Contents return new Byte Array Input Stream Utilities get Bytes f Content UTF 16  InputStream getContents ByteArrayInputStream getBytes fContent UTF_16
return new Byte Array Input Stream Utilities get Bytes f Content UTF 16 public String get Charset return UTF 16  ByteArrayInputStream getBytes fContent UTF_16 getCharset UTF_16
public static void init Defaults I Preference Store store store set Default OPEN STRUCTURE COMPARE true store set Default SYNCHRONIZE SCROLLING true store set Default SHOW PSEUDO CONFLICTS false store set Default INITIALLY SHOW ANCESTOR PANE false store set Default SHOW MORE INFO false store set Default IGNORE WHITESPACE false store set Default PREF SAVE ALL EDITORS false store set Default USE SPLINES false store set Default USE SINGLE LINE true store set Default USE RESOLVE UI false store set Default PATH FILTER NON NLS 1 store set Default Abstract Text Editor PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT true  initDefaults IPreferenceStore setDefault OPEN_STRUCTURE_COMPARE setDefault SYNCHRONIZE_SCROLLING setDefault SHOW_PSEUDO_CONFLICTS setDefault INITIALLY_SHOW_ANCESTOR_PANE setDefault SHOW_MORE_INFO setDefault IGNORE_WHITESPACE setDefault PREF_SAVE_ALL_EDITORS setDefault USE_SPLINES setDefault USE_SINGLE_LINE setDefault USE_RESOLVE_UI setDefault PATH_FILTER setDefault AbstractTextEditor PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT
f Preference Change Listener new I Property Change Listener public void property Change Property Change Event event String key event get Property if key equals INITIALLY SHOW ANCESTOR PANE boolean b f Overlay Store get Boolean INITIALLY SHOW ANCESTOR PANE if f Compare Configuration null f Compare Configuration set Property INITIALLY SHOW ANCESTOR PANE new Boolean b  fPreferenceChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty INITIALLY_SHOW_ANCESTOR_PANE fOverlayStore getBoolean INITIALLY_SHOW_ANCESTOR_PANE fCompareConfiguration fCompareConfiguration setProperty INITIALLY_SHOW_ANCESTOR_PANE
public Compare Preference Page set Description Utilities get String Compare Preference Page description NON NLS 1 set Preference Store CompareUI Plugin get Default get Preference Store f Overlay Store new Overlay Preference Store get Preference Store f Keys f Preference Change Listener new I Property Change Listener public void property Change Property Change Event event String key event get Property if key equals INITIALLY SHOW ANCESTOR PANE boolean b f Overlay Store get Boolean INITIALLY SHOW ANCESTOR PANE if f Compare Configuration null f Compare Configuration set Property INITIALLY SHOW ANCESTOR PANE new Boolean b f Overlay Store add Property Change Listener f Preference Change Listener  ComparePreferencePage setDescription getString ComparePreferencePage setPreferenceStore CompareUIPlugin getDefault getPreferenceStore fOverlayStore OverlayPreferenceStore getPreferenceStore fKeys fPreferenceChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty INITIALLY_SHOW_ANCESTOR_PANE fOverlayStore getBoolean INITIALLY_SHOW_ANCESTOR_PANE fCompareConfiguration fCompareConfiguration setProperty INITIALLY_SHOW_ANCESTOR_PANE fOverlayStore addPropertyChangeListener fPreferenceChangeListener
see I Workbench Preference Page init public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench
see Preference Page perform Ok public boolean perform Ok f Overlay Store propagate return true  PreferencePage performOk performOk fOverlayStore
protected void perform Defaults f Overlay Store load Defaults initialize Fields super perform Defaults  performDefaults fOverlayStore loadDefaults initializeFields performDefaults
public void dispose if f Overlay Store null if f Preference Change Listener null f Overlay Store remove Property Change Listener f Preference Change Listener f Preference Change Listener null f Overlay Store stop f Overlay Store null super dispose  fOverlayStore fPreferenceChangeListener fOverlayStore removePropertyChangeListener fPreferenceChangeListener fPreferenceChangeListener fOverlayStore fOverlayStore
static public boolean get Save All Editors I Preference Store store CompareUI Plugin get Default get Preference Store return store get Boolean PREF SAVE ALL EDITORS  getSaveAllEditors IPreferenceStore CompareUIPlugin getDefault getPreferenceStore getBoolean PREF_SAVE_ALL_EDITORS
static public void set Save All Editors boolean value I Preference Store store CompareUI Plugin get Default get Preference Store store set Value PREF SAVE ALL EDITORS value  setSaveAllEditors IPreferenceStore CompareUIPlugin getDefault getPreferenceStore setValue PREF_SAVE_ALL_EDITORS
protected Control create Contents Composite parent Workbench Help set Help parent I Compare Context Ids COMPARE PREFERENCE PAGE f Overlay Store load f Overlay Store start Tab Folder folder new Tab Folder parent SWT NONE folder set Layout new Tab Folder Layout folder set Layout Data new Grid Data Grid Data FILL BOTH Tab Item item new Tab Item folder SWT NONE item set Text Utilities get String Compare Preference Page general Tab label NON NLS 1 item set Image Java Plugin Images get Java Plugin Images IMG OBJS CFILE item set Control create General Page folder item new Tab Item folder SWT NONE item set Text Utilities get String Compare Preference Page text Compare Tab label NON NLS 1 item set Image Java Plugin Images get Java Plugin Images IMG OBJS CFILE item set Control create Text Compare Page folder initialize Fields Dialog apply Dialog Font folder return folder  createContents WorkbenchHelp setHelp ICompareContextIds COMPARE_PREFERENCE_PAGE fOverlayStore fOverlayStore TabFolder TabFolder setLayout TabFolderLayout setLayoutData GridData GridData FILL_BOTH TabItem TabItem setText getString ComparePreferencePage generalTab setImage JavaPluginImages JavaPluginImages IMG_OBJS_CFILE setControl createGeneralPage TabItem setText getString ComparePreferencePage textCompareTab setImage JavaPluginImages JavaPluginImages IMG_OBJS_CFILE setControl createTextComparePage initializeFields applyDialogFont
new Modify Listener public void modify Text Modify Event e String filters t get Text String message Compare Filter validate Resource Filters filters set Valid message null set Message null set Error Message message f Overlay Store set Value PATH FILTER filters  ModifyListener modifyText ModifyEvent getText CompareFilter validateResourceFilters setValid setMessage setErrorMessage fOverlayStore setValue PATH_FILTER
private Control create General Page Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 1 composite set Layout layout add Check Box composite Compare Preference Page structure Compare label OPEN STRUCTURE COMPARE 0 NON NLS 1 add Check Box composite Compare Preference Page show More Info label SHOW MORE INFO 0 NON NLS 1 add Check Box composite Compare Preference Page ignore Whitespace label IGNORE WHITESPACE 0 NON NLS 1 a spacer new Label composite SWT NONE add Check Box composite Compare Preference Page save Before Patching label PREF SAVE ALL EDITORS 0 NON NLS 1 a spacer new Label composite SWT NONE Label l new Label composite SWT WRAP l set Text Utilities get String Compare Preference Page filter description NON NLS 1 Composite c2 new Composite composite SWT NONE c2 set Layout Data new Grid Data Grid Data FILL HORIZONTAL layout new Grid Layout 2 false layout margin Width 0 c2 set Layout layout l new Label c2 SWT NONE l set Text Utilities get String Compare Preference Page filter label NON NLS 1 final Text t new Text c2 SWT BORDER t set Layout Data new Grid Data Grid Data FILL HORIZONTAL t set Text f Overlay Store get String PATH FILTER t add Modify Listener new Modify Listener public void modify Text Modify Event e String filters t get Text String message Compare Filter validate Resource Filters filters set Valid message null set Message null set Error Message message f Overlay Store set Value PATH FILTER filters return composite  createGeneralPage GridLayout GridLayout numColumns setLayout addCheckBox ComparePreferencePage structureCompare OPEN_STRUCTURE_COMPARE addCheckBox ComparePreferencePage showMoreInfo SHOW_MORE_INFO addCheckBox ComparePreferencePage ignoreWhitespace IGNORE_WHITESPACE addCheckBox ComparePreferencePage saveBeforePatching PREF_SAVE_ALL_EDITORS setText getString ComparePreferencePage setLayoutData GridData GridData FILL_HORIZONTAL GridLayout marginWidth setLayout setText getString ComparePreferencePage setLayoutData GridData GridData FILL_HORIZONTAL setText fOverlayStore getString PATH_FILTER addModifyListener ModifyListener modifyText ModifyEvent getText CompareFilter validateResourceFilters setValid setMessage setErrorMessage fOverlayStore setValue PATH_FILTER
private Control create Text Compare Page Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 1 composite set Layout layout add Check Box composite Compare Preference Page synchronize Scrolling label SYNCHRONIZE SCROLLING 0 NON NLS 1 add Check Box composite Compare Preference Page initially Show Ancestor Pane label INITIALLY SHOW ANCESTOR PANE 0 NON NLS 1 add Check Box composite Compare Preference Page show Pseudo Conflicts label SHOW PSEUDO CONFLICTS 0 NON NLS 1 add Check Box composite Compare Preference Page use Splines label USE SPLINES 0 NON NLS 1 add Check Box composite Compare Preference Page use Single Line label USE SINGLE LINE 0 NON NLS 1 add Check Box composite Compare Preference Page use ResolveUI label USE RESOLVE UI 0 NON NLS 1 a spacer new Label composite SWT NONE Label preview Label new Label composite SWT NULL preview Label set Text Utilities get String Compare Preference Page preview label NON NLS 1 Control previewer create Previewer composite Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint convert Width In Chars To Pixels 60 gd height Hint convert Height In Chars To Pixels 13 previewer set Layout Data gd return composite  createTextComparePage GridLayout GridLayout numColumns setLayout addCheckBox ComparePreferencePage synchronizeScrolling SYNCHRONIZE_SCROLLING addCheckBox ComparePreferencePage initiallyShowAncestorPane INITIALLY_SHOW_ANCESTOR_PANE addCheckBox ComparePreferencePage showPseudoConflicts SHOW_PSEUDO_CONFLICTS addCheckBox ComparePreferencePage useSplines USE_SPLINES addCheckBox ComparePreferencePage useSingleLine USE_SINGLE_LINE addCheckBox ComparePreferencePage useResolveUI USE_RESOLVE_UI previewLabel previewLabel setText getString ComparePreferencePage createPreviewer GridData GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels heightHint convertHeightInCharsToPixels setLayoutData
Control c f Preview Viewer get Control c add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Compare Configuration null f Compare Configuration dispose  fPreviewViewer getControl addDisposeListener DisposeListener widgetDisposed DisposeEvent fCompareConfiguration fCompareConfiguration
private Control create Previewer Composite parent f Compare Configuration new Compare Configuration f Overlay Store f Compare Configuration set Ancestor Label Utilities get String Compare Preference Page ancestor label NON NLS 1 f Compare Configuration set Left Label Utilities get String Compare Preference Page left label NON NLS 1 f Compare Configuration set Left Editable false f Compare Configuration set Right Label Utilities get String Compare Preference Page right label NON NLS 1 f Compare Configuration set Right Editable false f Preview Viewer new Text Merge Viewer parent SWT BORDER f Compare Configuration f Preview Viewer set Input new Diff Node Differencer CONFLICTING new Fake Input Compare Preference Page preview Ancestor NON NLS 1 new Fake Input Compare Preference Page preview Left NON NLS 1 new Fake Input Compare Preference Page preview Right NON NLS 1 Control c f Preview Viewer get Control c add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Compare Configuration null f Compare Configuration dispose return c  createPreviewer fCompareConfiguration CompareConfiguration fOverlayStore fCompareConfiguration setAncestorLabel getString ComparePreferencePage fCompareConfiguration setLeftLabel getString ComparePreferencePage fCompareConfiguration setLeftEditable fCompareConfiguration setRightLabel getString ComparePreferencePage fCompareConfiguration setRightEditable fPreviewViewer TextMergeViewer fCompareConfiguration fPreviewViewer setInput DiffNode FakeInput ComparePreferencePage previewAncestor FakeInput ComparePreferencePage previewLeft FakeInput ComparePreferencePage previewRight fPreviewViewer getControl addDisposeListener DisposeListener widgetDisposed DisposeEvent fCompareConfiguration fCompareConfiguration
private void initialize Fields Iterator e f Check Boxes key Set iterator while e has Next Button b Button e next String key String f Check Boxes get b b set Selection f Overlay Store get Boolean key  initializeFields fCheckBoxes keySet hasNext fCheckBoxes setSelection fOverlayStore getBoolean
if f Check Box Listener null f Check Box Listener new Selection Adapter public void widget Selected Selection Event e Button button Button e widget f Overlay Store set Value String f Check Boxes get button button get Selection  fCheckBoxListener fCheckBoxListener SelectionAdapter widgetSelected SelectionEvent fOverlayStore setValue fCheckBoxes getSelection
private Button add Check Box Composite parent String label Key String key int indentation String label Utilities get String label Key Button check Box new Button parent SWT CHECK check Box set Text label Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Indent indentation gd horizontal Span 2 check Box set Layout Data gd if f Check Box Listener null f Check Box Listener new Selection Adapter public void widget Selected Selection Event e Button button Button e widget f Overlay Store set Value String f Check Boxes get button button get Selection check Box add Selection Listener f Check Box Listener f Check Boxes put check Box key return check Box  addCheckBox labelKey getString labelKey checkBox checkBox setText GridData GridData GridData FILL_HORIZONTAL horizontalIndent horizontalSpan checkBox setLayoutData fCheckBoxListener fCheckBoxListener SelectionAdapter widgetSelected SelectionEvent fOverlayStore setValue fCheckBoxes getSelection checkBox addSelectionListener fCheckBoxListener fCheckBoxes checkBox checkBox
private String load Preview Content From File String key String preview Utilities get String key String separator System get Property line separator NON NLS 1 String Buffer buffer new String Buffer for int i 0 i preview length i char c preview char At i if c n buffer append separator else buffer append c return buffer to String  loadPreviewContentFromFile getString getProperty StringBuffer StringBuffer charAt toString

void register I Configuration Element element Object data String id element get Attribute ID ATTRIBUTE if id null if f Id Map null f Id Map new Hash Map f Id Map put id data String types element get Attribute EXTENSIONS ATTRIBUTE if types null if f Extension Map null f Extension Map new Hash Map String Tokenizer tokenizer new String Tokenizer types NON NLS 1 while tokenizer has More Elements String extension tokenizer next Token trim f Extension Map put normalize Case extension data  IConfigurationElement getAttribute ID_ATTRIBUTE fIdMap fIdMap HashMap fIdMap getAttribute EXTENSIONS_ATTRIBUTE fExtensionMap fExtensionMap HashMap StringTokenizer StringTokenizer hasMoreElements nextToken fExtensionMap normalizeCase
void create Binding I Configuration Element element String id Attribute Name String type element get Attribute CONTENT TYPE ID ATTRIBUTE String id element get Attribute id Attribute Name if id null log Error Message Utilities get Formatted String CompareUI Plugin target Id Attribute Missing id Attribute Name NON NLS 1 if type null id null f Id Map null Object o f Id Map get id if o null I Content Type ct fg Content Type Manager get Content Type type if ct null if f Content Type Bindings null f Content Type Bindings new Hash Map f Content Type Bindings put ct o else log Error Message Utilities get Formatted String CompareUI Plugin content Type Not Found type NON NLS 1 else log Error Message Utilities get Formatted String CompareUI Plugin target Not Found id NON NLS 1  createBinding IConfigurationElement idAttributeName getAttribute CONTENT_TYPE_ID_ATTRIBUTE getAttribute idAttributeName logErrorMessage getFormattedString CompareUIPlugin targetIdAttributeMissing idAttributeName fIdMap fIdMap IContentType fgContentTypeManager getContentType fContentTypeBindings fContentTypeBindings HashMap fContentTypeBindings logErrorMessage getFormattedString CompareUIPlugin contentTypeNotFound logErrorMessage getFormattedString CompareUIPlugin targetNotFound
Object search I Content Type type if type null f Content Type Bindings null Object b f Content Type Bindings get type if b null return b Iterator iter f Content Type Bindings key Set iterator while iter has Next I Content Type ct I Content Type iter next if type is Kind Of ct return f Content Type Bindings get ct return null  IContentType fContentTypeBindings fContentTypeBindings fContentTypeBindings keySet hasNext IContentType IContentType isKindOf fContentTypeBindings
Object search String extension if f Extension Map null return f Extension Map get normalize Case extension return null  fExtensionMap fExtensionMap normalizeCase
Creates the code CompareUI Plugin code object and registers all structure creators content merge viewers and structure merge viewers contributed to this plug in s extension points 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 public CompareUI Plugin I Plugin Descriptor descriptor super descriptor Assert is True fg Compare Plugin null fg Compare Plugin this f Resource Bundle descriptor get Resource Bundle register Extensions init Preference Store  CompareUIPlugin CompareUIPlugin IPluginDescriptor isTrue fgComparePlugin fgComparePlugin fResourceBundle getResourceBundle registerExtensions initPreferenceStore
see AbstractUI Plugin initialize Default Preferences protected void initialize Default Preferences I Preference Store store super initialize Default Preferences store Compare Preference Page init Defaults store  AbstractUIPlugin initializeDefaultPreferences initializeDefaultPreferences IPreferenceStore initializeDefaultPreferences ComparePreferencePage initDefaults
Returns the singleton instance of this plug in runtime class return the compare plug in instance public static CompareUI Plugin get Default return fg Compare Plugin  CompareUIPlugin getDefault fgComparePlugin
Returns this plug in s resource bundle return the plugin s resource bundle public Resource Bundle get Resource Bundle return get Default f Resource Bundle  ResourceBundle getResourceBundle getDefault fResourceBundle
Returns this plug in s unique identifier return the plugin s unique identifier public static String get Plugin Id return get Default get Descriptor get Unique Identifier  getPluginId getDefault getDescriptor getUniqueIdentifier
Registers all stream mergers structure creators content merge viewers and structure merge viewers that are found in the XML plugin files private void register Extensions I Plugin Registry registry Platform get Plugin Registry collect all I Stream Mergers I Configuration Element elements registry get Configuration Elements For PLUGIN ID STREAM MERGER EXTENSION POINT for int i 0 i elements length i I Configuration Element element elements i if STREAM MERGER equals element get Name f Stream Mergers register element new Stream Merger Descriptor element for int i 0 i elements length i I Configuration Element element elements i if CONTENT TYPE BINDING equals element get Name f Stream Mergers create Binding element STREAM MERGER ID ATTRIBUTE collect all I Structure Creators elements registry get Configuration Elements For PLUGIN ID STRUCTURE CREATOR EXTENSION POINT for int i 0 i elements length i I Configuration Element element elements i String name element get Name if CONTENT TYPE BINDING equals name if STRUCTURE CREATOR equals name log Error Message Utilities get Formatted String CompareUI Plugin unexpected Tag name STRUCTURE CREATOR NON NLS 1 f Structure Creators register element new Structure Creator Descriptor element for int i 0 i elements length i I Configuration Element element elements i if CONTENT TYPE BINDING equals element get Name f Structure Creators create Binding element STRUCTURE CREATOR ID ATTRIBUTE collect all viewers which define the structure mergeviewer extension point elements registry get Configuration Elements For PLUGIN ID STRUCTURE MERGE VIEWER EXTENSION POINT for int i 0 i elements length i I Configuration Element element elements i String name element get Name if CONTENT TYPE BINDING equals name if VIEWER TAG equals name log Error Message Utilities get Formatted String CompareUI Plugin unexpected Tag name VIEWER TAG NON NLS 1 f Structure Merge Viewers register element new Viewer Descriptor element for int i 0 i elements length i I Configuration Element element elements i if CONTENT TYPE BINDING equals element get Name f Structure Merge Viewers create Binding element STRUCTURE MERGE VIEWER ID ATTRIBUTE collect all viewers which define the content mergeviewer extension point elements registry get Configuration Elements For PLUGIN ID CONTENT MERGE VIEWER EXTENSION POINT for int i 0 i elements length i I Configuration Element element elements i String name element get Name if CONTENT TYPE BINDING equals name if VIEWER TAG equals name log Error Message Utilities get Formatted String CompareUI Plugin unexpected Tag name VIEWER TAG NON NLS 1 f Content Merge Viewers register element new Viewer Descriptor element for int i 0 i elements length i I Configuration Element element elements i if CONTENT TYPE BINDING equals element get Name f Content Merge Viewers create Binding element CONTENT MERGE VIEWER ID ATTRIBUTE collect all viewers which define the content viewer extension point elements registry get Configuration Elements For PLUGIN ID CONTENT VIEWER EXTENSION POINT for int i 0 i elements length i I Configuration Element element elements i String name element get Name if CONTENT TYPE BINDING equals name if VIEWER TAG equals name log Error Message Utilities get Formatted String CompareUI Plugin unexpected Tag name VIEWER TAG NON NLS 1 f Content Viewers register element new Viewer Descriptor element for int i 0 i elements length i I Configuration Element element elements i if CONTENT TYPE BINDING equals element get Name f Content Viewers create Binding element CONTENT VIEWER ID ATTRIBUTE  registerExtensions IPluginRegistry getPluginRegistry IStreamMergers IConfigurationElement getConfigurationElementsFor PLUGIN_ID STREAM_MERGER_EXTENSION_POINT IConfigurationElement STREAM_MERGER getName fStreamMergers StreamMergerDescriptor IConfigurationElement CONTENT_TYPE_BINDING getName fStreamMergers createBinding STREAM_MERGER_ID_ATTRIBUTE IStructureCreators getConfigurationElementsFor PLUGIN_ID STRUCTURE_CREATOR_EXTENSION_POINT IConfigurationElement getName CONTENT_TYPE_BINDING STRUCTURE_CREATOR logErrorMessage getFormattedString CompareUIPlugin unexpectedTag STRUCTURE_CREATOR fStructureCreators StructureCreatorDescriptor IConfigurationElement CONTENT_TYPE_BINDING getName fStructureCreators createBinding STRUCTURE_CREATOR_ID_ATTRIBUTE getConfigurationElementsFor PLUGIN_ID STRUCTURE_MERGE_VIEWER_EXTENSION_POINT IConfigurationElement getName CONTENT_TYPE_BINDING VIEWER_TAG logErrorMessage getFormattedString CompareUIPlugin unexpectedTag VIEWER_TAG fStructureMergeViewers ViewerDescriptor IConfigurationElement CONTENT_TYPE_BINDING getName fStructureMergeViewers createBinding STRUCTURE_MERGE_VIEWER_ID_ATTRIBUTE getConfigurationElementsFor PLUGIN_ID CONTENT_MERGE_VIEWER_EXTENSION_POINT IConfigurationElement getName CONTENT_TYPE_BINDING VIEWER_TAG logErrorMessage getFormattedString CompareUIPlugin unexpectedTag VIEWER_TAG fContentMergeViewers ViewerDescriptor IConfigurationElement CONTENT_TYPE_BINDING getName fContentMergeViewers createBinding CONTENT_MERGE_VIEWER_ID_ATTRIBUTE getConfigurationElementsFor PLUGIN_ID CONTENT_VIEWER_EXTENSION_POINT IConfigurationElement getName CONTENT_TYPE_BINDING VIEWER_TAG logErrorMessage getFormattedString CompareUIPlugin unexpectedTag VIEWER_TAG fContentViewers ViewerDescriptor IConfigurationElement CONTENT_TYPE_BINDING getName fContentViewers createBinding CONTENT_VIEWER_ID_ATTRIBUTE
public static I Workbench get Active Workbench CompareUI Plugin plugin get Default if plugin null return null return plugin get Workbench  IWorkbench getActiveWorkbench CompareUIPlugin getDefault getWorkbench
public static I Workbench Window get Active Workbench Window I Workbench workbench get Active Workbench if workbench null return null return workbench get Active Workbench Window  IWorkbenchWindow getActiveWorkbenchWindow IWorkbench getActiveWorkbench getActiveWorkbenchWindow
Returns the active workkbench page or code null code if no active workkbench page can be determined return the active workkbench page or code null code if no active workkbench page can be determined private static I Workbench Page get Active Page I Workbench Window window get Active Workbench Window if window null return null return window get Active Page  IWorkbenchPage getActivePage IWorkbenchWindow getActiveWorkbenchWindow getActivePage
Returns the SWT Shell of the active workbench window or code null code if no workbench window is active return the SWT Shell of the active workbench window or code null code if no workbench window is active public static Shell get Shell I Workbench Window window get Active Workbench Window if window null return null return window get Shell  getShell IWorkbenchWindow getActiveWorkbenchWindow getShell
Registers the given image for being disposed when this plug in is shutdown param image the image to register for disposal public static void dispose On Shutdown Image image if image null fg Dispose On Shutdown Images add image  disposeOnShutdown fgDisposeOnShutdownImages
public void shutdown throws Core Exception Converts the aliases into a single string before they are stored in the preference store The format is key alias key alias I Preference Store ps get Preference Store if ps null String Buffer sb new String Buffer Iterator iter f Structure Viewer Aliases key Set iterator while iter has Next String key String iter next String alias String f Structure Viewer Aliases get key sb append key sb append sb append alias sb append ps set Value STRUCTUREVIEWER ALIASES PREFERENCE NAME sb to String if f Property Change Listener null ps remove Property Change Listener f Property Change Listener f Property Change Listener null super shutdown if fg Dispose On Shutdown Images null Iterator i fg Dispose On Shutdown Images iterator while i has Next Image img Image i next if img is Disposed img dispose fg Images null  CoreException IPreferenceStore getPreferenceStore StringBuffer StringBuffer fStructureViewerAliases keySet hasNext fStructureViewerAliases setValue STRUCTUREVIEWER_ALIASES_PREFERENCE_NAME toString fPropertyChangeListener removePropertyChangeListener fPropertyChangeListener fPropertyChangeListener fgDisposeOnShutdownImages fgDisposeOnShutdownImages hasNext isDisposed fgImages
Performs the comparison described by the given input and opens a compare editor on the result param input the input on which to open the compare editor param page the workbench page on which to create a new compare editor param editor if not null the input is opened in this editor see Compare Editor Input public void open Compare Editor Compare Editor Input input I Workbench Page page I Reusable Editor editor if compare ResultOK input if editor null reuse the given editor editor set Input input return if page null page get Active Page if page null open new Compare Editor on page try page open Editor input COMPARE EDITOR catch Part Init Exception e Message Dialog open Error get Shell Utilities get String CompareUI Plugin open Editor Error e get Message NON NLS 1 else Message Dialog open Error get Shell Utilities get String CompareUI Plugin open Editor Error NON NLS 1 Utilities get String CompareUI Plugin no Active Workbench Page NON NLS 1  CompareEditorInput openCompareEditor CompareEditorInput IWorkbenchPage IReusableEditor compareResultOK setInput getActivePage CompareEditor openEditor COMPARE_EDITOR PartInitException MessageDialog openError getShell getString CompareUIPlugin openEditorError getMessage MessageDialog openError getShell getString CompareUIPlugin openEditorError getString CompareUIPlugin noActiveWorkbenchPage
Performs the comparison described by the given input and opens a compare dialog on the result param input the input on which to open the compare editor see Compare Editor Input public void open Compare Dialog final Compare Editor Input input if compare ResultOK input Compare Dialog dialog new Compare Dialog get Shell input dialog open  CompareEditorInput openCompareDialog CompareEditorInput compareResultOK CompareDialog CompareDialog getShell
return code true code if compare result is OK to show code false code otherwise private boolean compare ResultOK Compare Editor Input input final Shell shell get Shell try run operation in separate thread and make it canceable PlatformUI get Workbench get Progress Service run true true input String message input get Message if message null Message Dialog open Error shell Utilities get String CompareUI Plugin compare Failed message NON NLS 1 return false if input get Compare Result null Message Dialog open Information shell Utilities get String CompareUI Plugin dialog Title Utilities get String CompareUI Plugin no Differences NON NLS 2 NON NLS 1 return false return true catch Interrupted Exception x cancelled by user catch Invocation Target Exception x Message Dialog open Error shell Utilities get String CompareUI Plugin compare Failed x get Target Exception get Message NON NLS 1 return false  compareResultOK CompareEditorInput getShell getWorkbench getProgressService getMessage MessageDialog openError getString CompareUIPlugin compareFailed getCompareResult MessageDialog openInformation getString CompareUIPlugin dialogTitle getString CompareUIPlugin noDifferences InterruptedException InvocationTargetException MessageDialog openError getString CompareUIPlugin compareFailed getTargetException getMessage
Registers an image for the given type private static void register Image String type Image image boolean dispose fg Images put normalize Case type image if image null dispose fg Dispose On Shutdown Images add image  registerImage fgImages normalizeCase fgDisposeOnShutdownImages
Registers an image descriptor for the given type param type the type param descriptor the image descriptor public static void register Image Descriptor String type Image Descriptor descriptor fg Image Descriptors put normalize Case type descriptor  registerImageDescriptor ImageDescriptor fgImageDescriptors normalizeCase
public static Image Descriptor get Image Descriptor String relative Path URL installURL null if fg Compare Plugin null installURL fg Compare Plugin get Descriptor get InstallURL if installURL null try URL url new URL installURL Utilities get Icon Path null relative Path return Image Descriptor create FromURL url catch MalformedURL Exception e Assert is True false return null  ImageDescriptor getImageDescriptor relativePath fgComparePlugin fgComparePlugin getDescriptor getInstallURL getIconPath relativePath ImageDescriptor createFromURL MalformedURLException isTrue
Returns a shared image for the given type or a generic image if none has been registered for the given type p Note Images returned from this method will be automitically disposed of when this plug in shuts down Callers must not dispose of these images themselves p param type the type return the image public static Image get Image String type type normalize Case type boolean dispose false Image image null if type null image Image fg Images get type if image null Image Descriptor id Image Descriptor fg Image Descriptors get type if id null image id create Image dispose true if image null if fg Compare Plugin null if I Typed Element FOLDER TYPE equals type image get Default get Workbench get Shared Images get Image I Shared Images IMG OBJ FOLDER image Shared Images get Image I Shared Images IMG OBJ FOLDER else image create Workbench Image type dispose true else id Image Descriptor fg Image Descriptors get normalize Case file NON NLS 1 image id create Image dispose true if image null register Image type image dispose return image  getImage normalizeCase fgImages ImageDescriptor ImageDescriptor fgImageDescriptors createImage fgComparePlugin ITypedElement FOLDER_TYPE getDefault getWorkbench getSharedImages getImage ISharedImages IMG_OBJ_FOLDER SharedImages getImage ISharedImages IMG_OBJ_FOLDER createWorkbenchImage ImageDescriptor fgImageDescriptors normalizeCase createImage registerImage
Returns a shared image for the given adaptable This convenience method queries the given adaptable for its code I Workbench Adapter get Image Descriptor code which it uses to create an image if it does not already have one p Note Images returned from this method will be automitically disposed of when this plug in shuts down Callers must not dispose of these images themselves p param adaptable the adaptable for which to find an image return an image public static Image get Image I Adaptable adaptable if adaptable null Object o adaptable get Adapter I Workbench Adapter class if o instanceof I Workbench Adapter Image Descriptor id I Workbench Adapter o get Image Descriptor adaptable if id null Image image Image fg Images2 get id if image null image id create Image try fg Images2 put id image catch Null Pointer Exception ex Need Work fg Dispose On Shutdown Images add image return image return null  IWorkbenchAdapter getImageDescriptor getImage IAdaptable getAdapter IWorkbenchAdapter IWorkbenchAdapter ImageDescriptor IWorkbenchAdapter getImageDescriptor fgImages2 createImage fgImages2 NullPointerException NeedWork fgDisposeOnShutdownImages
private static Image create Workbench Image String type I Editor Registry er get Default get Workbench get Editor Registry Image Descriptor id er get Image Descriptor foo type NON NLS 1 return id create Image  createWorkbenchImage IEditorRegistry getDefault getWorkbench getEditorRegistry ImageDescriptor getImageDescriptor createImage
Returns an structure creator descriptor for the given type param type the type for which to find a descriptor return a descriptor for the given type or code null code if no descriptor has been registered public Structure Creator Descriptor get Structure Creator String type return Structure Creator Descriptor f Structure Creators search type  StructureCreatorDescriptor getStructureCreator StructureCreatorDescriptor fStructureCreators
Returns a stream merger for the given type param type the type for which to find a stream merger return a stream merger for the given type or code null code if no stream merger has been registered public I Stream Merger create Stream Merger String type Stream Merger Descriptor descriptor Stream Merger Descriptor f Stream Mergers search type if descriptor null return descriptor create Stream Merger return null  IStreamMerger createStreamMerger StreamMergerDescriptor StreamMergerDescriptor fStreamMergers createStreamMerger
Returns a stream merger for the given content type param type the type for which to find a stream merger return a stream merger for the given type or code null code if no stream merger has been registered public I Stream Merger create Stream Merger I Content Type type Stream Merger Descriptor descriptor Stream Merger Descriptor f Stream Mergers search type if descriptor null return descriptor create Stream Merger return null  IStreamMerger createStreamMerger IContentType StreamMergerDescriptor StreamMergerDescriptor fStreamMergers createStreamMerger
Returns a structure compare viewer based on an old viewer and an input object If the old viewer is suitable for showing the input the old viewer is returned Otherwise the input s type is used to find a viewer descriptor in the registry which in turn is used to create a structure compare viewer under the given parent composite If no viewer descriptor can be found code null code is returned param old Viewer a new viewer is only created if this old viewer cannot show the given input param input the input object for which to find a structure viewer param parent the SWT parent composite under which the new viewer is created param configuration a configuration which is passed to a newly created viewer return the compare viewer which is suitable for the given input object or code null code public Viewer find Structure Viewer Viewer old Viewer I Compare Input input Composite parent Compare Configuration configuration if input get Left null input get Right null we don t show the structure of additions or deletions return null content type search I Content Type ctype get Common Type get Content Types input if ctype null Viewer viewer get Viewer f Structure Merge Viewers search ctype old Viewer parent configuration if viewer null return viewer old style search String types get Types input String type null if is Homogenous types type normalize Case types 0 I Viewer Descriptor vd I Viewer Descriptor f Structure Merge Viewers search type if vd null String alias String f Structure Viewer Aliases get type if alias null vd I Viewer Descriptor f Structure Merge Viewers search alias if vd null return vd create Viewer old Viewer parent configuration we didn t found any viewer so far now we try to find a structurecreator for the generic Structure Diff Viewer Structure Creator Descriptor scc null Object desc f Structure Creators search ctype search for content type if desc instanceof Structure Creator Descriptor scc Structure Creator Descriptor desc if scc null type null scc get Structure Creator type search for old style type scheme if scc null I Structure Creator sc scc create Structure Creator if sc null Structure Diff Viewer sdv new Structure Diff Viewer parent configuration sdv set Structure Creator sc return sdv return null  oldViewer findStructureViewer oldViewer ICompareInput CompareConfiguration getLeft getRight IContentType getCommonType getContentTypes getViewer fStructureMergeViewers oldViewer getTypes isHomogenous normalizeCase IViewerDescriptor IViewerDescriptor fStructureMergeViewers fStructureViewerAliases IViewerDescriptor fStructureMergeViewers createViewer oldViewer StructureDiffViewer StructureCreatorDescriptor fStructureCreators StructureCreatorDescriptor StructureCreatorDescriptor getStructureCreator IStructureCreator createStructureCreator StructureDiffViewer StructureDiffViewer setStructureCreator
Returns a content compare viewer based on an old viewer and an input object If the old viewer is suitable for showing the input the old viewer is returned Otherwise the input s type is used to find a viewer descriptor in the registry which in turn is used to create a content compare viewer under the given parent composite If no viewer descriptor can be found code null code is returned param old Viewer a new viewer is only created if this old viewer cannot show the given input param input the input object for which to find a content viewer param parent the SWT parent composite under which the new viewer is created param configuration a configuration which is passed to a newly created viewer return the compare viewer which is suitable for the given input object or code null code public Viewer find Content Viewer Viewer old Viewer Object in Composite parent Compare Configuration cc if in instanceof I Stream Content Accessor String type I Typed Element TEXT TYPE if in instanceof I Typed Element I Typed Element tin I Typed Element in I Content Type ct get Content Type tin if ct null Viewer viewer get Viewer f Content Viewers search ct old Viewer parent cc if viewer null return viewer String ty tin get Type if ty null type ty Viewer viewer get Viewer f Content Viewers search type old Viewer parent cc if viewer null return viewer fallback return new Simple Text Viewer parent if in instanceof I Compare Input return null I Compare Input input I Compare Input in I Content Type ctype get Common Type get Content Types input if ctype null Viewer viewer get Viewer f Content Merge Viewers search ctype old Viewer parent cc if viewer null return viewer String types get Types input String type null if is Homogenous types type types 0 if I Typed Element FOLDER TYPE equals type return null if type null int n 0 for int i 0 i types length i if I Typed Element UNKNOWN TYPE equals types i n if type null type types i remember the first known type if n 1 don t use the type if there were more than one type null if type null Viewer viewer get Viewer f Content Merge Viewers search type old Viewer parent cc if viewer null return viewer fallback String left Type guess Type input get Left String right Type guess Type input get Right if left Type null right Type null boolean right text right Type null I Typed Element TEXT TYPE equals right Type boolean left text left Type null I Typed Element TEXT TYPE equals left Type if left Type null right text left text right Type null left text right text type I Typed Element TEXT TYPE else type BINARY TYPE I Viewer Descriptor vd I Viewer Descriptor f Content Merge Viewers search type if vd null return vd create Viewer old Viewer parent cc return null  oldViewer findContentViewer oldViewer CompareConfiguration IStreamContentAccessor ITypedElement TEXT_TYPE ITypedElement ITypedElement ITypedElement IContentType getContentType getViewer fContentViewers oldViewer getType getViewer fContentViewers oldViewer SimpleTextViewer ICompareInput ICompareInput ICompareInput IContentType getCommonType getContentTypes getViewer fContentMergeViewers oldViewer getTypes isHomogenous ITypedElement FOLDER_TYPE ITypedElement UNKNOWN_TYPE getViewer fContentMergeViewers oldViewer leftType guessType getLeft rightType guessType getRight leftType rightType right_text rightType ITypedElement TEXT_TYPE rightType left_text leftType ITypedElement TEXT_TYPE leftType leftType right_text left_text rightType left_text right_text ITypedElement TEXT_TYPE BINARY_TYPE IViewerDescriptor IViewerDescriptor fContentMergeViewers createViewer oldViewer
private static Viewer get Viewer Object descriptor Viewer old Viewer Composite parent Compare Configuration cc if descriptor instanceof I Viewer Descriptor return I Viewer Descriptor descriptor create Viewer old Viewer parent cc return null  getViewer oldViewer CompareConfiguration IViewerDescriptor IViewerDescriptor createViewer oldViewer
private static String get Types I Compare Input input I Typed Element ancestor input get Ancestor I Typed Element left input get Left I Typed Element right input get Right Array List tmp new Array List if ancestor null String type ancestor get Type if type null tmp add normalize Case type if left null String type left get Type if type null tmp add normalize Case type if right null String type right get Type if type null tmp add normalize Case type return String tmp to Array new String tmp size  getTypes ICompareInput ITypedElement getAncestor ITypedElement getLeft ITypedElement getRight ArrayList ArrayList getType normalizeCase getType normalizeCase getType normalizeCase toArray
private static I Content Type get Content Types I Compare Input input I Typed Element ancestor input get Ancestor I Typed Element left input get Left I Typed Element right input get Right Array List tmp new Array List I Content Type type get Content Type ancestor if type null tmp add type type get Content Type left if type null tmp add type type get Content Type right if type null tmp add type return I Content Type tmp to Array new I Content Type tmp size  IContentType getContentTypes ICompareInput ITypedElement getAncestor ITypedElement getLeft ITypedElement getRight ArrayList ArrayList IContentType getContentType getContentType getContentType IContentType toArray IContentType
private static I Content Type get Content Type I Typed Element element if element null return null String name element get Name I Content Type associated fg Content Type Manager find Content Types For name if associated length 0 return associated 0 I Content Type ct null if element instanceof I Stream Content Accessor I Stream Content Accessor isa I Stream Content Accessor element try Input Stream is isa get Contents if is null Input Stream bis new Buffered Input Stream is try ct fg Content Type Manager find Content Type For is name catch IO Exception e try bis close catch IO Exception e2 silently ignored catch Core Exception e1 return ct  IContentType getContentType ITypedElement getName IContentType fgContentTypeManager findContentTypesFor IContentType IStreamContentAccessor IStreamContentAccessor IStreamContentAccessor InputStream getContents InputStream BufferedInputStream fgContentTypeManager findContentTypeFor IOException IOException CoreException
Returns true if the given types are homogenous private static boolean is Homogenous String types switch types length case 1 return true case 2 return types 0 equals types 1 case 3 return types 0 equals types 1 types 1 equals types 2 return false  isHomogenous
Returns the most specific content type that is common to the given inputs or null private static I Content Type get Common Type I Content Type types Set s null Array List l null switch types length case 1 return types 0 case 2 l new Array List s to Set l types 0 s retain All to Set l types 1 break case 3 l new Array List s to Set l types 0 s retain All to Set l types 1 s retain All to Set l types 2 break if s null s is Empty Iterator iter l iterator while iter has Next I Content Type ct I Content Type iter next if s contains ct return ct return null  IContentType getCommonType IContentType ArrayList ArrayList toSet retainAll toSet ArrayList toSet retainAll toSet retainAll toSet isEmpty hasNext IContentType IContentType
private static Set to Set Array List l I Content Type ct Set set new Hash Set for ct null ct ct get Base Type l add ct set add ct return set  toSet ArrayList IContentType HashSet getBaseType
Guesses the file type of the given input Returns I Typed Element TEXT TYPE if none of the first 10 lines is longer than 1000 bytes Returns I Typed Element UNKNOWN TYPE otherwise Returns code null code if the input isn t an code I Stream Content Accessor code private static String guess Type I Typed Element input if input instanceof I Stream Content Accessor I Stream Content Accessor sca I Stream Content Accessor input Input Stream is null try is sca get Contents if is null return null int line Length 0 int lines 0 while lines 10 int c is read if c 1 EOF break if c n c r reset line length line Length 0 lines else line Length if line Length 1000 return I Typed Element UNKNOWN TYPE return I Typed Element TEXT TYPE catch Core Exception ex be silent and return UNKNOWN TYPE catch IO Exception ex be silent and return UNKNOWN TYPE finally if is null try is close catch IO Exception ex silently ignored return I Typed Element UNKNOWN TYPE return null  ITypedElement TEXT_TYPE ITypedElement UNKNOWN_TYPE IStreamContentAccessor guessType ITypedElement IStreamContentAccessor IStreamContentAccessor IStreamContentAccessor InputStream getContents lineLength lineLength lineLength lineLength ITypedElement UNKNOWN_TYPE ITypedElement TEXT_TYPE CoreException UNKNOWN_TYPE IOException UNKNOWN_TYPE IOException ITypedElement UNKNOWN_TYPE
private static String normalize Case String s if NORMALIZE CASE s null return s to Upper Case return s  normalizeCase NORMALIZE_CASE toUpperCase
f Filter set Filters ps get String Compare Preference Page PATH FILTER f Property Change Listener new I Property Change Listener public void property Change Property Change Event event if Compare Preference Page PATH FILTER equals event get Property f Filter set Filters ps get String Compare Preference Page PATH FILTER  fFilter setFilters getString ComparePreferencePage PATH_FILTER fPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent ComparePreferencePage PATH_FILTER getProperty fFilter setFilters getString ComparePreferencePage PATH_FILTER
private void init Preference Store System out println init Preference Store final I Preference Store ps get Preference Store if ps null String aliases ps get String STRUCTUREVIEWER ALIASES PREFERENCE NAME System out println aliases if aliases null aliases length 0 String Tokenizer st new String Tokenizer aliases NON NLS 1 while st has More Tokens String pair st next Token int pos pair index Of if pos 0 String key pair substring 0 pos String alias pair substring pos 1 f Structure Viewer Aliases put key alias System out println key alias f Filter new Compare Filter f Filter set Filters ps get String Compare Preference Page PATH FILTER f Property Change Listener new I Property Change Listener public void property Change Property Change Event event if Compare Preference Page PATH FILTER equals event get Property f Filter set Filters ps get String Compare Preference Page PATH FILTER ps add Property Change Listener f Property Change Listener  initPreferenceStore initPreferenceStore IPreferenceStore getPreferenceStore getString STRUCTUREVIEWER_ALIASES_PREFERENCE_NAME StringTokenizer StringTokenizer hasMoreTokens nextToken indexOf fStructureViewerAliases fFilter CompareFilter fFilter setFilters getString ComparePreferencePage PATH_FILTER fPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent ComparePreferencePage PATH_FILTER getProperty fFilter setFilters getString ComparePreferencePage PATH_FILTER addPropertyChangeListener fPropertyChangeListener
public void add Structure Viewer Alias String type String alias f Structure Viewer Aliases put normalize Case alias normalize Case type  addStructureViewerAlias fStructureViewerAliases normalizeCase normalizeCase
public void remove All Structure Viewer Aliases String type String t normalize Case type Set entry Set f Structure Viewer Aliases entry Set for Iterator iter entry Set iterator iter has Next Map Entry entry Map Entry iter next if entry get Value equals t iter remove  removeAllStructureViewerAliases normalizeCase entrySet fStructureViewerAliases entrySet entrySet hasNext getValue
Returns an array of all editors that have an unsaved content If the identical content is presented in more than one editor only one of those editor parts is part of the result return an array of all dirty editor parts public static I Editor Part get Dirty Editors Set inputs new Hash Set List result new Array List 0 I Workbench workbench get Default get Workbench I Workbench Window windows workbench get Workbench Windows for int i 0 i windows length i I Workbench Page pages windows i get Pages for int x 0 x pages length x I Editor Part editors pages x get Dirty Editors for int z 0 z editors length z I Editor Part ep editors z I Editor Input input ep get Editor Input if inputs contains input inputs add input result add ep return I Editor Part result to Array new I Editor Part result size  IEditorPart getDirtyEditors HashSet ArrayList IWorkbench getDefault getWorkbench IWorkbenchWindow getWorkbenchWindows IWorkbenchPage getPages IEditorPart getDirtyEditors IEditorPart IEditorInput getEditorInput IEditorPart toArray IEditorPart
public boolean filter String name boolean is Folder boolean is Archive if f Filter null return f Filter filter name is Folder is Archive return false  isFolder isArchive fFilter fFilter isFolder isArchive
public static void log Error Message String message if message null message NON NLS 1 log new Status I Status ERROR get Plugin Id INTERNAL ERROR message null  logErrorMessage IStatus getPluginId INTERNAL_ERROR
public static void log Throwable e log new Status I Status ERROR get Plugin Id INTERNAL ERROR Compare Messages get String Compare Plugin internal error e NON NLS 1  IStatus getPluginId INTERNAL_ERROR CompareMessages getString ComparePlugin internal_error
public static void log I Status status get Default get Log log status  IStatus getDefault getLog

public class Compare With Edition Action extends Edition Action public Compare With Edition Action super false org eclipse compare internal Compare With Edition Action NON NLS 1 this f Help Context Id I Compare Context Ids COMPARE WITH EDITION DIALOG  CompareWithEditionAction EditionAction CompareWithEditionAction CompareWithEditionAction fHelpContextId ICompareContextIds COMPARE_WITH_EDITION_DIALOG

public Diff Image Image base Image Descriptor overlay int w f Base Image base f Overlay Image overlay f Width w  DiffImage ImageDescriptor fBaseImage fOverlayImage fWidth
public Diff Image Image base Image Descriptor overlay int w boolean on Left f Base Image base f Overlay Image overlay f Width w f Left on Left  DiffImage ImageDescriptor onLeft fBaseImage fOverlayImage fWidth fLeft onLeft
protected Point get Size return new Point f Width HEIGHT  getSize fWidth
protected void draw Composite Image int width int height if f Left if f Base Image null Image Data base f Base Image get Image Data if base null base DEFAULT IMAGE DATA draw Image base f Width base width 0 if f Overlay Image null Image Data overlay f Overlay Image get Image Data if overlay null overlay DEFAULT IMAGE DATA draw Image overlay 0 HEIGHT overlay height 2 else if f Base Image null Image Data base f Base Image get Image Data if base null base DEFAULT IMAGE DATA draw Image base 0 0 if f Overlay Image null Image Data overlay f Overlay Image get Image Data if overlay null overlay DEFAULT IMAGE DATA draw Image overlay f Width overlay width HEIGHT overlay height 2  drawCompositeImage fLeft fBaseImage ImageData fBaseImage getImageData DEFAULT_IMAGE_DATA drawImage fWidth fOverlayImage ImageData fOverlayImage getImageData DEFAULT_IMAGE_DATA drawImage fBaseImage ImageData fBaseImage getImageData DEFAULT_IMAGE_DATA drawImage fOverlayImage ImageData fOverlayImage getImageData DEFAULT_IMAGE_DATA drawImage fWidth

Creates a code Doc Line Comparator code for the given document range ignore White Space controls whether comparing lines in method code ranges Equal code should ignore whitespace param document the document from which the lines are taken param region if non code null code only lines within this range are taken param ignore White Space if code true code white space is ignored when comparing lines public Doc Line Comparator I Document document I Region region boolean ignore White Space f Document document f Ignore White Space ignore White Space f Line Offset 0 if region null f Length region get Length int start region get Offset try f Line Offset f Document get Line Of Offset start catch Bad Location Exception ex silently ignored if f Length 0 f Line Count 0 else int end Line f Document get Number Of Lines try end Line f Document get Line Of Offset start f Length catch Bad Location Exception ex silently ignored f Line Count end Line f Line Offset 1 else f Length document get Length f Line Count f Document get Number Of Lines  DocLineComparator ignoreWhiteSpace rangesEqual ignoreWhiteSpace DocLineComparator IDocument IRegion ignoreWhiteSpace fDocument fIgnoreWhiteSpace ignoreWhiteSpace fLineOffset fLength getLength getOffset fLineOffset fDocument getLineOfOffset BadLocationException fLength fLineCount endLine fDocument getNumberOfLines endLine fDocument getLineOfOffset fLength BadLocationException fLineCount endLine fLineOffset fLength getLength fLineCount fDocument getNumberOfLines
Returns the number of lines in the document return number of lines public int get Range Count return f Line Count  getRangeCount fLineCount
public int get Token Start int line try I Region r f Document get Line Information f Line Offset line return r get Offset catch Bad Location Exception ex return f Document get Length  getTokenStart IRegion fDocument getLineInformation fLineOffset getOffset BadLocationException fDocument getLength
see I Token Comparator get Token Length public int get Token Length int line return get Token Start line 1 get Token Start line  ITokenComparator getTokenLength getTokenLength getTokenStart getTokenStart
Returns code true code if a line given by the first index matches a line specified by the other code I Range Comparator code and index param this Index the number of the line within this range comparator param other the range comparator to compare this with param other Index the number of the line within the other comparator return code true code if the lines are equal public boolean ranges Equal int this Index I Range Comparator other0 int other Index if other0 null other0 get Class get Class Doc Line Comparator other Doc Line Comparator other0 if f Ignore White Space String s1 extract this Index String s2 other extract other Index return compare s1 s2 int tlen get Token Length this Index int olen other get Token Length other Index if tlen olen String s1 extract this Index String s2 other extract other Index return s1 equals s2 return false  IRangeComparator thisIndex otherIndex rangesEqual thisIndex IRangeComparator otherIndex getClass getClass DocLineComparator DocLineComparator fIgnoreWhiteSpace thisIndex otherIndex getTokenLength thisIndex getTokenLength otherIndex thisIndex otherIndex
Aborts the comparison if the number of tokens is too large return code true code to abort a token comparison public boolean skip Range Comparison int length int max I Range Comparator other return false  skipRangeComparison IRangeComparator
Extract a single line from the underlying document without the line separator param line the number of the line to extract return the contents of the line as a String private String extract int line if line f Line Count try I Region r f Document get Line Information f Line Offset line return f Document get r get Offset r get Length catch Bad Location Exception e silently ignored return NON NLS 1  fLineCount IRegion fDocument getLineInformation fLineOffset fDocument getOffset getLength BadLocationException
private boolean compare String s1 String s2 int l1 s1 length int l2 s2 length int c1 0 c2 0 int i1 0 i2 0 while c1 1 c1 1 while i1 l1 char c s1 char At i1 if Character is Whitespace c c1 c break c2 1 while i2 l2 char c s2 char At i2 if Character is Whitespace c c2 c break if c1 c2 return false return true  charAt isWhitespace charAt isWhitespace

public static I Document get Object o for int i 0 i fg Keys size i if fg Keys get i o return I Document fg Values get i return null  IDocument fgKeys fgKeys IDocument fgValues
public static void put Object o I Document document if DEBUG System out println Document Manager put document NON NLS 1 for int i 0 i fg Keys size i if fg Keys get i o fg Values set i document return fg Keys add o fg Values add document  IDocument DocumentManager fgKeys fgKeys fgValues fgKeys fgValues
public static void remove I Document document if document null if DEBUG System out println Document Manager remove document NON NLS 1 for int i 0 i fg Values size i if fg Values get i document fg Keys remove i fg Values remove i return if DEBUG System out println Document Manager remove not found NON NLS 1  IDocument DocumentManager fgValues fgValues fgKeys fgValues DocumentManager
public static void dump if DEBUG System out println Document Manager managed docs fg Values size NON NLS 1  DocumentManager fgValues

private I File f File Document Buffer Node I Document document I File file f Document document f File file  IFile fFile DocumentBufferNode IDocument IFile fDocument fFile
public String get Name return f File get Name  getName fFile getName
public String get Type return f File get File Extension  getType fFile getFileExtension
public Image get Image return null  getImage
public Input Stream get Contents return new Byte Array Input Stream Utilities get Bytes f Document get UTF 16  InputStream getContents ByteArrayInputStream getBytes fDocument UTF_16
public String get Charset return UTF 16  getCharset UTF_16
protected String f Help Context Id Edition Action boolean replace Mode String bundle Name f Replace Mode replace Mode f Bundle Name bundle Name  fHelpContextId EditionAction replaceMode bundleName fReplaceMode replaceMode fBundleName bundleName
protected boolean is Enabled I Selection selection return Utilities get Files selection length 1 we don t support multiple selection for now  isEnabled ISelection getFiles
protected void run I Selection selection I File files Utilities get Files selection for int i 0 i files length i do From History files i  ISelection IFile getFiles doFromHistory
private void do From History final I File file Resource Bundle bundle Resource Bundle get Bundle f Bundle Name String title Utilities get String bundle title NON NLS 1 Shell parent Shell CompareUI Plugin get Shell I File State states null try states file get History null catch Core Exception ex Message Dialog open Error parent Shell title ex get Message return if states null states length 0 String msg Utilities get String bundle no Local History Error NON NLS 1 Message Dialog open Information parent Shell title msg return I Typed Element base new Resource Node file I Document document get Document file I Typed Element target base if document null target new Document Buffer Node document file I Typed Element editions new I Typed Element states length 1 editions 0 base for int i 0 i states length i editions i 1 new History Item base states i Edition Selection Dialog d new Edition Selection Dialog parent Shell bundle d set Edition Title Argument file get Name d set Edition Title Image CompareUI Plugin get Image file d set Hide Identical Entries false if f Help Context Id null d set Help Context Id f Help Context Id if f Replace Mode I Typed Element ti null if f Previous ti d select Previous Edition target editions null else ti d select Edition target editions null if ti instanceof I Stream Content Accessor I Stream Content Accessor sa I Stream Content Accessor ti if Utilities validate Resource file parent Shell title try if document null update Document document sa else update Workspace bundle parent Shell sa file catch Interrupted Exception x Do nothing Operation has been canceled by user catch Invocation Target Exception x String reason x get Target Exception get Message Message Dialog open Error parent Shell title Utilities get Formatted String bundle replace Error reason NON NLS 1 else d set Compare Mode true d select Edition target editions null  doFromHistory IFile ResourceBundle ResourceBundle getBundle fBundleName getString parentShell CompareUIPlugin getShell IFileState getHistory CoreException MessageDialog openError parentShell getMessage getString noLocalHistoryError MessageDialog openInformation parentShell ITypedElement ResourceNode IDocument getDocument ITypedElement DocumentBufferNode ITypedElement ITypedElement HistoryItem EditionSelectionDialog EditionSelectionDialog parentShell setEditionTitleArgument getName setEditionTitleImage CompareUIPlugin getImage setHideIdenticalEntries fHelpContextId setHelpContextId fHelpContextId fReplaceMode ITypedElement fPrevious selectPreviousEdition selectEdition IStreamContentAccessor IStreamContentAccessor IStreamContentAccessor validateResource parentShell updateDocument updateWorkspace parentShell InterruptedException InvocationTargetException getTargetException getMessage MessageDialog openError parentShell getFormattedString replaceError setCompareMode selectEdition
private void update Workspace final Resource Bundle bundle Shell shell final I Stream Content Accessor sa final I File file throws Invocation Target Exception Interrupted Exception Workspace Modify Operation operation new Workspace Modify Operation public void execute I Progress Monitor pm throws Invocation Target Exception try String task Name Utilities get String bundle task Name NON NLS 1 pm begin Task task Name I Progress Monitor UNKNOWN file set Contents sa get Contents false true pm catch Core Exception e throw new Invocation Target Exception e finally pm done Progress Monitor Dialog pmdialog new Progress Monitor Dialog shell pmdialog run false true operation  updateWorkspace ResourceBundle IStreamContentAccessor IFile InvocationTargetException InterruptedException WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor InvocationTargetException taskName getString taskName beginTask taskName IProgressMonitor setContents getContents CoreException InvocationTargetException ProgressMonitorDialog ProgressMonitorDialog
private void update Document I Document document I Stream Content Accessor sa throws Invocation Target Exception try String text Utilities read String sa document replace 0 document get Length text catch Core Exception e throw new Invocation Target Exception e catch Bad Location Exception e throw new Invocation Target Exception e  updateDocument IDocument IStreamContentAccessor InvocationTargetException readString getLength CoreException InvocationTargetException BadLocationException InvocationTargetException
private I Document get Document I File file I Workbench wb PlatformUI get Workbench if wb null return null I Workbench Window ws wb get Workbench Windows if ws null return null File Editor Input test new File Editor Input file for int i 0 i ws length i I Workbench Window w ws i I Workbench Page wps w get Pages if wps null for int j 0 j wps length j I Workbench Page wp wps j I Editor Part ep wp find Editor test if ep instanceof I Text Editor I Text Editor te I Text Editor ep I Document Provider dp te get Document Provider if dp null I Document doc dp get Document ep if doc null return doc return null  IDocument getDocument IFile IWorkbench getWorkbench IWorkbenchWindow getWorkbenchWindows FileEditorInput FileEditorInput IWorkbenchWindow IWorkbenchPage getPages IWorkbenchPage IEditorPart findEditor ITextEditor ITextEditor ITextEditor IDocumentProvider getDocumentProvider IDocument getDocument

Logs the given exception using the platform s logging mechanism The exception is logged as an error with the error code code Java Status Constants INTERNAL ERROR code public static void log Throwable t String message CompareUI Plugin log new Status I Status ERROR CompareUI Plugin get Plugin Id CompareUI Plugin INTERNAL ERROR message t  JavaStatusConstants INTERNAL_ERROR CompareUIPlugin IStatus CompareUIPlugin getPluginId CompareUIPlugin INTERNAL_ERROR
Handles the given code Core Exception code The workbench shell is used as a parent for the dialog window param e the code Core Exception code to be handled param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Core Exception e String title String message handle e CompareUI Plugin get Shell title message  CoreException CoreException CoreException CompareUIPlugin getShell
Handles the given code Core Exception code param e the code Core Exception code to be handled param parent the dialog window s parent shell param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Core Exception e Shell parent String title String message fg Instance perform e parent title message  CoreException CoreException CoreException fgInstance
Handles the given code Invocation Target Exception code The workbench shell is used as a parent for the dialog window param e the code Invocation Target Exception code to be handled param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Invocation Target Exception e String title String message handle e CompareUI Plugin get Shell title message  InvocationTargetException InvocationTargetException InvocationTargetException CompareUIPlugin getShell
Handles the given code Invocation Target Exception code param e the code Invocation Target Exception code to be handled param parent the dialog window s parent shell param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Invocation Target Exception e Shell parent String title String message fg Instance perform e parent title message  InvocationTargetException InvocationTargetException InvocationTargetException fgInstance
protected void perform Core Exception e Shell shell String title String message CompareUI Plugin log e I Status status e get Status if status null Error Dialog open Error shell title message status else display Message Dialog e e get Message shell title message  CoreException CompareUIPlugin IStatus getStatus ErrorDialog openError displayMessageDialog getMessage
protected void perform Invocation Target Exception e Shell shell String title String message Throwable target e get Target Exception if target instanceof Core Exception perform Core Exception target shell title message else CompareUI Plugin log e if e get Message null e get Message length 0 display Message Dialog e e get Message shell title message else display Message Dialog e target get Message shell title message  InvocationTargetException getTargetException CoreException CoreException CompareUIPlugin getMessage getMessage displayMessageDialog getMessage displayMessageDialog getMessage
private void display Message Dialog Throwable t String exception Message Shell shell String title String message String Writer msg new String Writer if message null msg write message msg write n n NON NLS 1 if exception Message null exception Message length 0 msg write Compare Messages get String Exception Dialog see Error Log Message NON NLS 1 else msg write exception Message Message Dialog open Error shell title msg to String  displayMessageDialog exceptionMessage StringWriter StringWriter exceptionMessage exceptionMessage CompareMessages getString ExceptionDialog seeErrorLogMessage exceptionMessage MessageDialog openError toString

public class Ignore White Space Action extends Change Property Action public Ignore White Space Action Resource Bundle bundle Compare Configuration cc super bundle cc action Ignore White Space Compare Configuration IGNORE WHITESPACE NON NLS 1  IgnoreWhiteSpaceAction ChangePropertyAction IgnoreWhiteSpaceAction ResourceBundle CompareConfiguration IgnoreWhiteSpace CompareConfiguration IGNORE_WHITESPACE

sb set Increment 20 sb add Listener SWT Selection new Listener public void handle Event Event e repaint  setIncrement addListener handleEvent
sb set Increment 20 sb add Listener SWT Selection new Listener public void handle Event Event e repaint  setIncrement addListener handleEvent
add Listener SWT Resize new Listener public void handle Event Event e update Scrollbars  addListener handleEvent updateScrollbars
add Listener SWT Paint new Listener public void handle Event Event event paint event gc  addListener handleEvent
Create a new Image Canvas with the given SWT stylebits SWT H SCROLL and SWT V SCROLL are automtically added public Image Canvas Composite parent int style super parent style SWT H SCROLL SWT V SCROLL Scroll Bar sb get Horizontal Bar sb set Increment 20 sb add Listener SWT Selection new Listener public void handle Event Event e repaint sb get Vertical Bar sb set Increment 20 sb add Listener SWT Selection new Listener public void handle Event Event e repaint add Listener SWT Resize new Listener public void handle Event Event e update Scrollbars add Listener SWT Paint new Listener public void handle Event Event event paint event gc  ImageCanvas H_SCROLL V_SCROLL ImageCanvas H_SCROLL V_SCROLL ScrollBar getHorizontalBar setIncrement addListener handleEvent getVerticalBar setIncrement addListener handleEvent addListener handleEvent updateScrollbars addListener handleEvent
Set the SWT Image to use as the Image Canvas contents public void set Image Image img f Image img if is Disposed get Horizontal Bar set Selection 0 get Vertical Bar set Selection 0 update Scrollbars get Parent layout redraw  ImageCanvas setImage fImage isDisposed getHorizontalBar setSelection getVerticalBar setSelection updateScrollbars getParent
public void repaint if is Disposed GC gc new GC this paint gc gc dispose  isDisposed
private void paint GC gc if f Image null Rectangle bounds f Image get Bounds Rectangle client Area get Client Area int x if bounds width client Area width x client Area width bounds width 2 else x get Horizontal Bar get Selection int y if bounds height client Area height y client Area height bounds height 2 else y get Vertical Bar get Selection gc draw Image f Image x y  fImage fImage getBounds clientArea getClientArea clientArea clientArea getHorizontalBar getSelection clientArea clientArea getVerticalBar getSelection drawImage fImage
private void update Scrollbars Rectangle bounds f Image null f Image get Bounds new Rectangle 0 0 0 0 Point size get Size Rectangle client Area get Client Area Scroll Bar horizontal get Horizontal Bar if bounds width client Area width horizontal set Visible false horizontal set Selection 0 else horizontal set Page Increment client Area width horizontal get Increment int max bounds width size x client Area width horizontal set Maximum max horizontal set Thumb size x max max size x horizontal set Visible true Scroll Bar vertical get Vertical Bar if bounds height client Area height vertical set Visible false vertical set Selection 0 else vertical set Page Increment client Area height vertical get Increment int max bounds height size y client Area height vertical set Maximum max vertical set Thumb size y max max size y vertical set Visible true  updateScrollbars fImage fImage getBounds getSize clientArea getClientArea ScrollBar getHorizontalBar clientArea setVisible setSelection setPageIncrement clientArea getIncrement clientArea setMaximum setThumb setVisible ScrollBar getVerticalBar clientArea setVisible setSelection setPageIncrement clientArea getIncrement clientArea setMaximum setThumb setVisible

public Image Merge Viewer Composite parent int styles Compare Configuration mp super styles Resource Bundle get Bundle BUNDLE NAME mp Workbench Help set Help parent I Compare Context Ids IMAGE COMPARE VIEW build Control parent String title Utilities get String get Resource Bundle title NON NLS 1 get Control set Data CompareUI COMPARE VIEWER TITLE title  ImageMergeViewer CompareConfiguration ResourceBundle getBundle BUNDLE_NAME WorkbenchHelp setHelp ICompareContextIds IMAGE_COMPARE_VIEW buildControl getString getResourceBundle getControl setData COMPARE_VIEWER_TITLE
protected void update Content Object ancestor Object left Object right set Input f Ancestor ancestor f Left Image left set Input f Left left f Right Image right set Input f Right right  updateContent setInput fAncestor fLeftImage setInput fLeft fRightImage setInput fRight
We can t modify the contents of either side we just return null protected byte get Contents boolean left return null  getContents
public void create Controls Composite composite f Ancestor new Image Canvas composite SWT NO FOCUS f Left new Image Canvas composite SWT NO FOCUS f Right new Image Canvas composite SWT NO FOCUS  createControls fAncestor ImageCanvas NO_FOCUS fLeft ImageCanvas NO_FOCUS fRight ImageCanvas NO_FOCUS
private static void set Input Image Canvas canvas Object input if canvas null Input Stream stream null if input instanceof I Stream Content Accessor I Stream Content Accessor sca I Stream Content Accessor input if sca null try stream sca get Contents catch Core Exception ex Need Work Image image null Display display canvas get Display if stream null try image new Image display stream catch SWT Exception ex silently ignored canvas set Image image if image null canvas set Background display get System Color SWT COLOR LIST BACKGROUND else canvas set Background null if stream null try stream close catch IO Exception ex silently ignored  setInput ImageCanvas InputStream IStreamContentAccessor IStreamContentAccessor IStreamContentAccessor getContents CoreException NeedWork getDisplay SWTException setImage setBackground getSystemColor COLOR_LIST_BACKGROUND setBackground IOException
protected void handle Resize Ancestor int x int y int width int height if width 0 f Ancestor set Visible true f Ancestor set Bounds x y width height else f Ancestor set Visible false  handleResizeAncestor fAncestor setVisible fAncestor setBounds fAncestor setVisible
protected void handle Resize Left Right int x int y int width1 int center Width int width2 int height f Left set Bounds x y width1 height f Right set Bounds x width1 center Width y width2 height  handleResizeLeftRight centerWidth fLeft setBounds fRight setBounds centerWidth
protected void copy boolean left To Right if left To Right f Right Image f Left Image set Input f Right f Right Image set Right Dirty true else f Left Image f Right Image set Input f Left f Left Image set Left Dirty true  leftToRight leftToRight fRightImage fLeftImage setInput fRight fRightImage setRightDirty fLeftImage fRightImage setInput fLeft fLeftImage setLeftDirty

public class Image Merge Viewer Creator implements I Viewer Creator public Viewer create Viewer Composite parent Compare Configuration mp return new Image Merge Viewer parent SWT NULL mp  ImageMergeViewerCreator IViewerCreator createViewer CompareConfiguration ImageMergeViewer

static final String NAVIGATOR PROPERTY org eclipse compare internal Navigator NON NLS 1 Returns true if at end or beginning boolean goto Difference boolean next  NAVIGATOR_PROPERTY gotoDifference

static final String OPENABLE PROPERTY org eclipse compare internal Openable NON NLS 1 Opens the selected element void open Selected  OPENABLE_PROPERTY openSelected

public interface I Savable void save I Progress Monitor pm throws Core Exception  ISavable IProgressMonitor CoreException

Creates a new viewer from this descriptor under the given STW parent control If the current viewer has the same type as a new viewer the implementation of this method is free to return the current viewer instead param current Viewer the current viewer which is going to be replaced with a new viewer param parent the SWT parent control under which the new viewer has to be created param config a compare configuration the new viewer might be interested in return a new viewer or the current viewer  currentViewer

List f Contents public List Content Provider  fContents ListContentProvider
public Object get Elements Object input if f Contents null f Contents input return f Contents to Array return new Object 0  getElements fContents fContents fContents toArray
public void input Changed Viewer viewer Object old Input Object new Input if new Input instanceof List f Contents List new Input else f Contents null we use a fixed set  inputChanged oldInput newInput newInput fContents newInput fContents
public void dispose 
public boolean is Deleted Object o return f Contents null f Contents contains o  isDeleted fContents fContents

private boolean f Add Cancel Button public List Dialog Shell parent super parent f Add Cancel Button false  fAddCancelButton ListDialog fAddCancelButton
public void set Input Object input f Input input  setInput fInput
public void set Content Provider I Structured Content Provider sp f Content Provider sp  setContentProvider IStructuredContentProvider fContentProvider
public void set Label Provider I Label Provider lp f Label Provider lp  setLabelProvider ILabelProvider fLabelProvider
public void set Add Cancel Button boolean add Cancel Button f Add Cancel Button add Cancel Button  setAddCancelButton addCancelButton fAddCancelButton addCancelButton
public Table Viewer get Table Viewer return f Table Viewer  TableViewer getTableViewer fTableViewer
public boolean has Filters return f Table Viewer get Filters null f Table Viewer get Filters length 0  hasFilters fTableViewer getFilters fTableViewer getFilters
public void create set Shell Style SWT DIALOG TRIM SWT RESIZE super create  setShellStyle DIALOG_TRIM
protected void create Buttons For Button Bar Composite parent if f Add Cancel Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true else super create Buttons For Button Bar parent  createButtonsForButtonBar fAddCancelButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButtonsForButtonBar
protected Control create Dialog Area Composite container Composite parent Composite super create Dialog Area container create Message Area parent f Table Viewer new Table Viewer parent get Table Style f Table Viewer set Content Provider f Content Provider Table table f Table Viewer get Table f Table Viewer set Label Provider f Label Provider f Table Viewer set Input f Input Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint convert Height In Chars To Pixels 15 gd width Hint convert Width In Chars To Pixels 55 table set Layout Data gd apply Dialog Font parent return parent  createDialogArea createDialogArea createMessageArea fTableViewer TableViewer getTableStyle fTableViewer setContentProvider fContentProvider fTableViewer getTable fTableViewer setLabelProvider fLabelProvider fTableViewer setInput fInput GridData GridData GridData FILL_BOTH heightHint convertHeightInCharsToPixels widthHint convertWidthInCharsToPixels setLayoutData applyDialogFont
protected int get Table Style return SWT SINGLE SWT H SCROLL SWT V SCROLL SWT BORDER  getTableStyle H_SCROLL V_SCROLL

public Line Comparator Input Stream is String encoding throws Unsupported Encoding Exception Buffered Reader br new Buffered Reader new Input Stream Reader is encoding String line Array List ar new Array List try while line br read Line null ar add line catch IO Exception e try is close catch IO Exception e1 f Lines String ar to Array new String ar size  LineComparator InputStream UnsupportedEncodingException BufferedReader BufferedReader InputStreamReader ArrayList ArrayList readLine IOException IOException fLines toArray
String get Line int ix return f Lines ix  getLine fLines
see org eclipse compare rangedifferencer I Range Comparator get Range Count public int get Range Count return f Lines length  IRangeComparator getRangeCount getRangeCount fLines
public boolean ranges Equal int this Index I Range Comparator other int other Index String s1 f Lines this Index String s2 Line Comparator other f Lines other Index return s1 equals s2  rangesEqual thisIndex IRangeComparator otherIndex fLines thisIndex LineComparator fLines otherIndex
see org eclipse compare rangedifferencer I Range Comparator skip Range Comparison int int org eclipse compare rangedifferencer I Range Comparator public boolean skip Range Comparison int length int max Length I Range Comparator other return false  IRangeComparator skipRangeComparison IRangeComparator skipRangeComparison maxLength IRangeComparator

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Merge Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE MergeMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

Text Operation Action int operation Code boolean mutable boolean selection boolean content super mutable selection content f Operation Code operation Code update  TextOperationAction operationCode fOperationCode operationCode
public void run if is Enabled do Operation f Operation Code  isEnabled doOperation fOperationCode
public boolean is Enabled return f Operation Code 1 can Do Operation f Operation Code  isEnabled fOperationCode canDoOperation fOperationCode
public void update this set Enabled is Enabled  setEnabled isEnabled
public Merge Source Viewer Composite parent Resource Bundle bundle super parent null SWT H SCROLL SWT V SCROLL f Resource Bundle bundle Menu Manager menu new Menu Manager menu set Remove All When Shown true menu add Menu Listener this Styled Text te get Text Widget te set Menu menu create Context Menu te  MergeSourceViewer ResourceBundle H_SCROLL V_SCROLL fResourceBundle MenuManager MenuManager setRemoveAllWhenShown addMenuListener StyledText getTextWidget setMenu createContextMenu
public void hide Save Action f Add Save Action false  hideSaveAction fAddSaveAction
public void set Font Font font Styled Text te get Text Widget if te null te set Font font  setFont StyledText getTextWidget setFont
public void set Background Color Color color Styled Text te get Text Widget if te null te set Background color  setBackgroundColor StyledText getTextWidget setBackground
public void set Enabled boolean enabled if enabled f Enabled f Enabled enabled Styled Text c get Text Widget if c null c set Enabled enabled Display d c get Display c set Background enabled d get System Color SWT COLOR LIST BACKGROUND null  setEnabled fEnabled fEnabled StyledText getTextWidget setEnabled getDisplay setBackground getSystemColor COLOR_LIST_BACKGROUND
public boolean get Enabled return f Enabled  getEnabled fEnabled
public void set Region Position region f Region region  setRegion fRegion
public Position get Region return f Region  getRegion fRegion
public boolean is Control Ok To Use Styled Text t get Text Widget return t null t is Disposed  isControlOkToUse StyledText getTextWidget isDisposed
public void set Selection Position position if position null set Selected Range position get Offset position get Length  setSelection setSelectedRange getOffset getLength
public void set Line Background Position position Color c Styled Text t get Text Widget if t null t is Disposed Point region new Point 0 0 get Line Range position region region x get Document Region Offset try t set Line Background region x region y c catch Illegal Argument Exception ex silently ignored  setLineBackground StyledText getTextWidget isDisposed getLineRange getDocumentRegionOffset setLineBackground IllegalArgumentException
public void reset Line Background Styled Text t get Text Widget if t null t is Disposed int lines get Line Count t set Line Background 0 lines null  resetLineBackground StyledText getTextWidget isDisposed getLineCount setLineBackground
Returns number of lines in document region public int get Line Count I Region region get Visible Region int length region get Length if length 0 return 0 I Document doc get Document int start Line 0 int end Line 0 int start region get Offset try start Line doc get Line Of Offset start catch Bad Location Exception ex silently ignored try end Line doc get Line Of Offset start length catch Bad Location Exception ex silently ignored return end Line start Line 1  getLineCount IRegion getVisibleRegion getLength IDocument getDocument startLine endLine getOffset startLine getLineOfOffset BadLocationException endLine getLineOfOffset BadLocationException endLine startLine
public int get Viewport Lines Styled Text te get Text Widget Rectangle cl Area te get Client Area if cl Area is Empty return cl Area height te get Line Height return 0  getViewportLines StyledText getTextWidget clArea getClientArea clArea isEmpty clArea getLineHeight
public int get Viewport Height Styled Text te get Text Widget Rectangle cl Area te get Client Area if cl Area is Empty return cl Area height return 0  getViewportHeight StyledText getTextWidget clArea getClientArea clArea isEmpty clArea
Returns lines public int get Document Region Offset int start get Visible Region get Offset I Document doc get Document if doc null try return doc get Line Of Offset start catch Bad Location Exception ex silently ignored return 0  getDocumentRegionOffset getVisibleRegion getOffset IDocument getDocument getLineOfOffset BadLocationException
public int get Vertical Scroll Offset Styled Text st get Text Widget int line Height st get Line Height return get Top Inset get Document Region Offset line Height st get Top Pixel  getVerticalScrollOffset StyledText getTextWidget lineHeight getLineHeight getTopInset getDocumentRegionOffset lineHeight getTopPixel
Returns the start line and the number of lines which correspond to the given position Starting line number is 0 based public Point get Line Range Position p Point region I Document doc get Document if p null doc null region x 0 region y 0 return region int start p get Offset int length p get Length int start Line 0 try start Line doc get Line Of Offset start catch Bad Location Exception e silently ignored int line Count 0 if length 0 if range length is 0 and if range starts a new line try if start doc get Line Start Offset start Line lines catch Bad Location Exception e lines else int end Line 0 try end Line doc get Line Of Offset start length 1 why 1 catch Bad Location Exception e silently ignored line Count end Line start Line 1 region x start Line region y line Count return region  getLineRange IDocument getDocument getOffset getLength startLine startLine getLineOfOffset BadLocationException lineCount getLineStartOffset startLine BadLocationException endLine endLine getLineOfOffset BadLocationException lineCount endLine startLine startLine lineCount
Scroll Text Part to the given line public void vscroll int line int src View Size get Line Count int src Extent Size get Viewport Lines if src View Size src Extent Size if line 0 line 0 int cp get Top Index if cp line set Top Index line get Document Region Offset  TextPart srcViewSize getLineCount srcExtentSize getViewportLines srcViewSize srcExtentSize getTopIndex setTopIndex getDocumentRegionOffset
public void add Action String action Id Merge Viewer Action action f Actions put action Id action  addAction actionId MergeViewerAction fActions actionId
public Merge Viewer Action get Action String action Id Merge Viewer Action action Merge Viewer Action f Actions get action Id if action null action create Action action Id if action null return null if action is Content Dependent add Text Listener this if action is Selection Dependent add Selection Changed Listener this Utilities init Action action f Resource Bundle action action Id NON NLS 1 NON NLS 2 f Actions put action Id action if action is Editable Dependent is Editable return null return action  MergeViewerAction getAction actionId MergeViewerAction MergeViewerAction fActions actionId createAction actionId isContentDependent addTextListener isSelectionDependent addSelectionChangedListener initAction fResourceBundle actionId fActions actionId isEditableDependent isEditable
protected Merge Viewer Action create Action String action Id if UNDO ID equals action Id return new Text Operation Action UNDO true false true if REDO ID equals action Id return new Text Operation Action REDO true false true if CUT ID equals action Id return new Text Operation Action CUT true true false if COPY ID equals action Id return new Text Operation Action COPY false true false if PASTE ID equals action Id return new Text Operation Action PASTE true false false if DELETE ID equals action Id return new Text Operation Action DELETE true false false if SELECT ALL ID equals action Id return new Text Operation Action SELECT ALL false false false return null  MergeViewerAction createAction actionId UNDO_ID actionId TextOperationAction REDO_ID actionId TextOperationAction CUT_ID actionId TextOperationAction COPY_ID actionId TextOperationAction PASTE_ID actionId TextOperationAction DELETE_ID actionId TextOperationAction SELECT_ALL_ID actionId TextOperationAction SELECT_ALL
public void selection Changed Selection Changed Event event Iterator e f Actions values iterator while e has Next Merge Viewer Action action Merge Viewer Action e next if action is Selection Dependent action update  selectionChanged SelectionChangedEvent fActions hasNext MergeViewerAction MergeViewerAction isSelectionDependent
public void text Changed Text Event event Iterator e f Actions values iterator while e has Next Merge Viewer Action action Merge Viewer Action e next if action is Content Dependent action update  textChanged TextEvent fActions hasNext MergeViewerAction MergeViewerAction isContentDependent
Allows the viewer to add menus and or tools to the context menu public void menu About To Show I Menu Manager menu menu add new Separator undo NON NLS 1 add Menu menu UNDO ID add Menu menu REDO ID menu add new Separator ccp NON NLS 1 add Menu menu CUT ID add Menu menu COPY ID add Menu menu PASTE ID add Menu menu DELETE ID add Menu menu SELECT ALL ID menu add new Separator edit NON NLS 1 menu add new Separator find NON NLS 1 add Menu menu FIND ID menu add new Separator save NON NLS 1 if f Add Save Action add Menu menu SAVE ID menu add new Separator rest NON NLS 1  menuAboutToShow IMenuManager addMenu UNDO_ID addMenu REDO_ID addMenu CUT_ID addMenu COPY_ID addMenu PASTE_ID addMenu DELETE_ID addMenu SELECT_ALL_ID addMenu FIND_ID fAddSaveAction addMenu SAVE_ID
private void add Menu I Menu Manager menu String action Id I Action action get Action action Id if action null menu add action  addMenu IMenuManager actionId IAction getAction actionId
protected void handle Dispose remove Text Listener this remove Selection Changed Listener this super handle Dispose  handleDispose removeTextListener removeSelectionChangedListener handleDispose

public I Status merge Output Stream output String output Encoding Input Stream ancestor String ancestor Encoding Input Stream target String target Encoding Input Stream other String other Encoding I Progress Monitor monitor Line Comparator a t o try a new Line Comparator ancestor ancestor Encoding t new Line Comparator target target Encoding o new Line Comparator other other Encoding catch Unsupported Encoding Exception e return new Status Status ERROR CompareUI PLUGIN ID 1 Merge Messages get String Text Auto Merge input Encoding Error e NON NLS 1 try char line Separator n Range Difference diffs Range Differencer find Ranges monitor a t o for int i 0 i diffs length i Range Difference rd diffs i switch rd kind case Range Difference ANCESTOR pseudo conflict case Range Difference NOCHANGE case Range Difference RIGHT for int j rd right Start j rd right End j String s o get Line j output write s get Bytes output Encoding output write line Separator break case Range Difference LEFT for int j rd left Start j rd left End j String s t get Line j output write s get Bytes output Encoding output write line Separator break case Range Difference CONFLICT return new Status Status ERROR CompareUI PLUGIN ID CONFLICT Merge Messages get String Text Auto Merge conflict null NON NLS 1 default break catch Unsupported Encoding Exception e return new Status Status ERROR CompareUI PLUGIN ID 1 Merge Messages get String Text Auto Merge output Encoding Error e NON NLS 1 catch IO Exception e return new Status Status ERROR CompareUI PLUGIN ID 1 Merge Messages get String Text Auto Merge outputIO Error e NON NLS 1 return Status OK STATUS  IStatus OutputStream outputEncoding InputStream ancestorEncoding InputStream targetEncoding InputStream otherEncoding IProgressMonitor LineComparator LineComparator ancestorEncoding LineComparator targetEncoding LineComparator otherEncoding UnsupportedEncodingException PLUGIN_ID MergeMessages getString TextAutoMerge inputEncodingError lineSeparator RangeDifference RangeDifferencer findRanges RangeDifference RangeDifference RangeDifference RangeDifference rightStart rightEnd getLine getBytes outputEncoding lineSeparator RangeDifference leftStart leftEnd getLine getBytes outputEncoding lineSeparator RangeDifference PLUGIN_ID MergeMessages getString TextAutoMerge UnsupportedEncodingException PLUGIN_ID MergeMessages getString TextAutoMerge outputEncodingError IOException PLUGIN_ID MergeMessages getString TextAutoMerge outputIOError OK_STATUS

public Merge Viewer Action boolean mutable boolean selection boolean content f Mutable mutable f Selection selection f Content content  MergeViewerAction fMutable fSelection fContent
public boolean is Selection Dependent return f Selection  isSelectionDependent fSelection
public boolean is Content Dependent return f Content  isContentDependent fContent
public boolean is Editable Dependent return f Mutable  isEditableDependent fMutable
public void update 

private String f Right Error public Merge Viewer Content Provider Compare Configuration cc f Compare Configuration cc  fRightError MergeViewerContentProvider CompareConfiguration fCompareConfiguration
private boolean has Error return f Ancestor Error null f Left Error null f Right Error null  hasError fAncestorError fLeftError fRightError
public void dispose 
public void input Changed Viewer v Object o1 Object o2 we are not interested since we have no state  inputChanged
ancestor public void set Ancestor Error String error Message f Ancestor Error error Message  setAncestorError errorMessage fAncestorError errorMessage
public String get Ancestor Label Object element if f Ancestor Error null return f Ancestor Error return f Compare Configuration get Ancestor Label element  getAncestorLabel fAncestorError fAncestorError fCompareConfiguration getAncestorLabel
public Image get Ancestor Image Object element if f Ancestor Error null return null return f Compare Configuration get Ancestor Image element  getAncestorImage fAncestorError fCompareConfiguration getAncestorImage
public Object get Ancestor Content Object element if element instanceof I Compare Input return I Compare Input element get Ancestor return null  getAncestorContent ICompareInput ICompareInput getAncestor
public boolean show Ancestor Object element if element instanceof I Compare Input return true fix for 45239 Show ancestor for incoming and outgoing changes return I Compare Input element get Kind Differencer DIRECTION MASK Differencer CONFLICTING return false  showAncestor ICompareInput ICompareInput getKind DIRECTION_MASK
left public void set Left Error String error Message f Left Error error Message  setLeftError errorMessage fLeftError errorMessage
public String get Left Label Object element if f Left Error null return f Left Error return f Compare Configuration get Left Label element  getLeftLabel fLeftError fLeftError fCompareConfiguration getLeftLabel
public Image get Left Image Object element if f Left Error null return null return f Compare Configuration get Left Image element  getLeftImage fLeftError fCompareConfiguration getLeftImage
public Object get Left Content Object element if element instanceof I Compare Input return I Compare Input element get Left return null  getLeftContent ICompareInput ICompareInput getLeft
public boolean is Left Editable Object element if has Error return false if element instanceof I Compare Input Object left I Compare Input element get Left if left null I Diff Element parent I Diff Element element get Parent if parent instanceof I Compare Input left I Compare Input parent get Left if left instanceof I Editable Content return I Editable Content left is Editable return false  isLeftEditable hasError ICompareInput ICompareInput getLeft IDiffElement IDiffElement getParent ICompareInput ICompareInput getLeft IEditableContent IEditableContent isEditable
public void save Left Content Object element byte bytes if element instanceof I Compare Input I Compare Input node I Compare Input element if bytes null I Typed Element left node get Left 9869 problem if left is null because no resource exists yet nothing is done if left null node copy false left node get Left if left instanceof I Editable Content I Editable Content left set Content bytes if node instanceof Resource Compare Input My Diff Node Resource Compare Input My Diff Node node fire Change else node copy false  saveLeftContent ICompareInput ICompareInput ICompareInput ITypedElement getLeft getLeft IEditableContent IEditableContent setContent ResourceCompareInput MyDiffNode ResourceCompareInput MyDiffNode fireChange
right public void set Right Error String error Message f Right Error error Message  setRightError errorMessage fRightError errorMessage
public String get Right Label Object element if f Right Error null return f Right Error return f Compare Configuration get Right Label element  getRightLabel fRightError fRightError fCompareConfiguration getRightLabel
public Image get Right Image Object element if f Right Error null return null return f Compare Configuration get Right Image element  getRightImage fRightError fCompareConfiguration getRightImage
public Object get Right Content Object element if element instanceof I Compare Input return I Compare Input element get Right return null  getRightContent ICompareInput ICompareInput getRight
public boolean is Right Editable Object element if has Error return false if element instanceof I Compare Input Object right I Compare Input element get Right if right null I Diff Container parent I Diff Element element get Parent if parent instanceof I Compare Input right I Compare Input parent get Right if right instanceof I Editable Content return I Editable Content right is Editable return false  isRightEditable hasError ICompareInput ICompareInput getRight IDiffContainer IDiffElement getParent ICompareInput ICompareInput getRight IEditableContent IEditableContent isEditable
public void save Right Content Object element byte bytes if element instanceof I Compare Input I Compare Input node I Compare Input element if bytes null I Typed Element right node get Right 9869 problem if right is null because no resource exists yet nothing is done if right null node copy true right node get Right if right instanceof I Editable Content I Editable Content right set Content bytes if node instanceof Resource Compare Input My Diff Node Resource Compare Input My Diff Node node fire Change else node copy true  saveRightContent ICompareInput ICompareInput ICompareInput ITypedElement getRight getRight IEditableContent IEditableContent setContent ResourceCompareInput MyDiffNode ResourceCompareInput MyDiffNode fireChange

public Null Viewer Composite parent f Dummy new Tree parent SWT NULL Compare Viewer Pane clear Tool Bar parent  NullViewer fDummy CompareViewerPane clearToolBar
public Control get Control return f Dummy  getControl fDummy

public static final class Type Descriptor private Type Descriptor  TypeDescriptor TypeDescriptor
String f Key public Overlay Key Type Descriptor descriptor String key f Descriptor descriptor f Key key  fKey OverlayKey TypeDescriptor fDescriptor fKey
public void property Change Property Change Event event Overlay Key key find Overlay Key event get Property if key null propagate Property f Parent key f Store  propertyChange PropertyChangeEvent OverlayKey findOverlayKey getProperty propagateProperty fParent fStore
public Overlay Preference Store I Preference Store parent Overlay Key overlay Keys f Parent parent f Overlay Keys overlay Keys f Store new Preference Store  OverlayPreferenceStore IPreferenceStore OverlayKey overlayKeys fParent fOverlayKeys overlayKeys fStore PreferenceStore
private Overlay Key find Overlay Key String key for int i 0 i f Overlay Keys length i if f Overlay Keys i f Key equals key return f Overlay Keys i return null  OverlayKey findOverlayKey fOverlayKeys fOverlayKeys fKey fOverlayKeys
private boolean covers String key return find Overlay Key key null  findOverlayKey
private void propagate Property I Preference Store orgin Overlay Key key I Preference Store target if orgin is Default key f Key if target is Default key f Key target set To Default key f Key return Type Descriptor d key f Descriptor if BOOLEAN d boolean origin Value orgin get Boolean key f Key boolean target Value target get Boolean key f Key if target Value origin Value target set Value key f Key origin Value else if DOUBLE d double origin Value orgin get Double key f Key double target Value target get Double key f Key if target Value origin Value target set Value key f Key origin Value else if FLOAT d float origin Value orgin get Float key f Key float target Value target get Float key f Key if target Value origin Value target set Value key f Key origin Value else if INT d int origin Value orgin get Int key f Key int target Value target get Int key f Key if target Value origin Value target set Value key f Key origin Value else if LONG d long origin Value orgin get Long key f Key long target Value target get Long key f Key if target Value origin Value target set Value key f Key origin Value else if STRING d String origin Value orgin get String key f Key String target Value target get String key f Key if target Value null origin Value null target Value equals origin Value target set Value key f Key origin Value  propagateProperty IPreferenceStore OverlayKey IPreferenceStore isDefault fKey isDefault fKey setToDefault fKey TypeDescriptor fDescriptor originValue getBoolean fKey targetValue getBoolean fKey targetValue originValue setValue fKey originValue originValue getDouble fKey targetValue getDouble fKey targetValue originValue setValue fKey originValue originValue getFloat fKey targetValue getFloat fKey targetValue originValue setValue fKey originValue originValue getInt fKey targetValue getInt fKey targetValue originValue setValue fKey originValue originValue getLong fKey targetValue getLong fKey targetValue originValue setValue fKey originValue originValue getString fKey targetValue getString fKey targetValue originValue targetValue originValue setValue fKey originValue
public void propagate for int i 0 i f Overlay Keys length i propagate Property f Store f Overlay Keys i f Parent  fOverlayKeys propagateProperty fStore fOverlayKeys fParent
private void load Property I Preference Store orgin Overlay Key key I Preference Store target boolean force Initialization Type Descriptor d key f Descriptor if BOOLEAN d if force Initialization target set Value key f Key true target set Value key f Key orgin get Boolean key f Key target set Default key f Key orgin get Default Boolean key f Key else if DOUBLE d if force Initialization target set Value key f Key 1 0D target set Value key f Key orgin get Double key f Key target set Default key f Key orgin get Default Double key f Key else if FLOAT d if force Initialization target set Value key f Key 1 0F target set Value key f Key orgin get Float key f Key target set Default key f Key orgin get Default Float key f Key else if INT d if force Initialization target set Value key f Key 1 target set Value key f Key orgin get Int key f Key target set Default key f Key orgin get Default Int key f Key else if LONG d if force Initialization target set Value key f Key 1L target set Value key f Key orgin get Long key f Key target set Default key f Key orgin get Default Long key f Key else if STRING d if force Initialization target set Value key f Key 1 NON NLS 1 target set Value key f Key orgin get String key f Key target set Default key f Key orgin get Default String key f Key  loadProperty IPreferenceStore OverlayKey IPreferenceStore forceInitialization TypeDescriptor fDescriptor forceInitialization setValue fKey setValue fKey getBoolean fKey setDefault fKey getDefaultBoolean fKey forceInitialization setValue fKey setValue fKey getDouble fKey setDefault fKey getDefaultDouble fKey forceInitialization setValue fKey setValue fKey getFloat fKey setDefault fKey getDefaultFloat fKey forceInitialization setValue fKey setValue fKey getInt fKey setDefault fKey getDefaultInt fKey forceInitialization setValue fKey setValue fKey getLong fKey setDefault fKey getDefaultLong fKey forceInitialization setValue fKey setValue fKey getString fKey setDefault fKey getDefaultString fKey
public void load for int i 0 i f Overlay Keys length i load Property f Parent f Overlay Keys i f Store true  fOverlayKeys loadProperty fParent fOverlayKeys fStore
public void load Defaults for int i 0 i f Overlay Keys length i set To Default f Overlay Keys i f Key  loadDefaults fOverlayKeys setToDefault fOverlayKeys fKey
public void start if f Property Listener null f Property Listener new Property Listener f Parent add Property Change Listener f Property Listener  fPropertyListener fPropertyListener PropertyListener fParent addPropertyChangeListener fPropertyListener
public void stop if f Property Listener null f Parent remove Property Change Listener f Property Listener f Property Listener null  fPropertyListener fParent removePropertyChangeListener fPropertyListener fPropertyListener
see I Preference Store add Property Change Listener I Property Change Listener public void add Property Change Listener I Property Change Listener listener f Store add Property Change Listener listener  IPreferenceStore addPropertyChangeListener IPropertyChangeListener addPropertyChangeListener IPropertyChangeListener fStore addPropertyChangeListener
see I Preference Store remove Property Change Listener I Property Change Listener public void remove Property Change Listener I Property Change Listener listener f Store remove Property Change Listener listener  IPreferenceStore removePropertyChangeListener IPropertyChangeListener removePropertyChangeListener IPropertyChangeListener fStore removePropertyChangeListener
see I Preference Store fire Property Change Event String Object Object public void fire Property Change Event String name Object old Value Object new Value f Store fire Property Change Event name old Value new Value  IPreferenceStore firePropertyChangeEvent firePropertyChangeEvent oldValue newValue fStore firePropertyChangeEvent oldValue newValue
see I Preference Store contains String public boolean contains String name return f Store contains name  IPreferenceStore fStore
see I Preference Store get Boolean String public boolean get Boolean String name return f Store get Boolean name  IPreferenceStore getBoolean getBoolean fStore getBoolean
see I Preference Store get Default Boolean String public boolean get Default Boolean String name return f Store get Default Boolean name  IPreferenceStore getDefaultBoolean getDefaultBoolean fStore getDefaultBoolean
see I Preference Store get Default Double String public double get Default Double String name return f Store get Default Double name  IPreferenceStore getDefaultDouble getDefaultDouble fStore getDefaultDouble
see I Preference Store get Default Float String public float get Default Float String name return f Store get Default Float name  IPreferenceStore getDefaultFloat getDefaultFloat fStore getDefaultFloat
see I Preference Store get Default Int String public int get Default Int String name return f Store get Default Int name  IPreferenceStore getDefaultInt getDefaultInt fStore getDefaultInt
see I Preference Store get Default Long String public long get Default Long String name return f Store get Default Long name  IPreferenceStore getDefaultLong getDefaultLong fStore getDefaultLong
see I Preference Store get Default String String public String get Default String String name return f Store get Default String name  IPreferenceStore getDefaultString getDefaultString fStore getDefaultString
see I Preference Store get Double String public double get Double String name return f Store get Double name  IPreferenceStore getDouble getDouble fStore getDouble
see I Preference Store get Float String public float get Float String name return f Store get Float name  IPreferenceStore getFloat getFloat fStore getFloat
see I Preference Store get Int String public int get Int String name return f Store get Int name  IPreferenceStore getInt getInt fStore getInt
see I Preference Store get Long String public long get Long String name return f Store get Long name  IPreferenceStore getLong getLong fStore getLong
see I Preference Store get String String public String get String String name return f Store get String name  IPreferenceStore getString getString fStore getString
see I Preference Store is Default String public boolean is Default String name return f Store is Default name  IPreferenceStore isDefault isDefault fStore isDefault
see I Preference Store needs Saving public boolean needs Saving return f Store needs Saving  IPreferenceStore needsSaving needsSaving fStore needsSaving
see I Preference Store put Value String String public void put Value String name String value if covers name f Store put Value name value  IPreferenceStore putValue putValue fStore putValue
see I Preference Store set Default String double public void set Default String name double value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set Default String float public void set Default String name float value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set Default String int public void set Default String name int value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set Default String long public void set Default String name long value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set Default String String public void set Default String name String value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set Default String boolean public void set Default String name boolean value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set To Default String public void set To Default String name f Store set To Default name  IPreferenceStore setToDefault setToDefault fStore setToDefault
see I Preference Store set Value String double public void set Value String name double value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
see I Preference Store set Value String float public void set Value String name float value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
see I Preference Store set Value String int public void set Value String name int value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
see I Preference Store set Value String long public void set Value String name long value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
see I Preference Store set Value String String public void set Value String name String value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
see I Preference Store set Value String boolean public void set Value String name boolean value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue

Patch Wizard Dialog Shell parent I Wizard wizard super parent wizard set Shell Style get Shell Style SWT RESIZE set Minimum Page Size 700 500  PatchWizardDialog IWizard setShellStyle getShellStyle setMinimumPageSize
protected boolean is Enabled I Selection selection return Utilities get Resources selection length 1  isEnabled ISelection getResources
protected void run I Selection selection Patch Wizard wizard new Patch Wizard selection if are All Editors Saved Patch Wizard Dialog dialog new Patch Wizard Dialog CompareUI Plugin get Shell wizard dialog open  ISelection PatchWizard PatchWizard areAllEditorsSaved PatchWizardDialog PatchWizardDialog CompareUIPlugin getShell
private boolean are All Editors Saved if CompareUI Plugin get Dirty Editors length 0 return true if save All Dirty Editors return false Shell shell CompareUI Plugin get Shell try Save isn t cancelable I Workspace workspace Resources Plugin get Workspace I Workspace Description description workspace get Description boolean auto Build description is Auto Building description set Auto Building false workspace set Description description try new Progress Monitor Dialog shell run false false create Runnable finally description set Auto Building auto Build workspace set Description description return true catch Invocation Target Exception e Exception Handler handle e shell Patch Messages get String Patch Action Exception Title Patch Messages get String Exception NON NLS 1 NON NLS 2 return false catch Core Exception e Exception Handler handle e shell Patch Messages get String Patch Action Exception Title Patch Messages get String Exception NON NLS 1 NON NLS 2 return false catch Interrupted Exception e Assert is True false Can t happen Operation isn t cancelable return false  areAllEditorsSaved CompareUIPlugin getDirtyEditors saveAllDirtyEditors CompareUIPlugin getShell IWorkspace ResourcesPlugin getWorkspace IWorkspaceDescription getDescription autoBuild isAutoBuilding setAutoBuilding setDescription ProgressMonitorDialog createRunnable setAutoBuilding autoBuild setDescription InvocationTargetException ExceptionHandler PatchMessages getString PatchAction ExceptionTitle PatchMessages getString CoreException ExceptionHandler PatchMessages getString PatchAction ExceptionTitle PatchMessages getString InterruptedException isTrue
return new I Runnable With Progress public void run I Progress Monitor pm I Editor Part editors To Save CompareUI Plugin get Dirty Editors pm begin Task Patch Messages get String Patch Action Saving Dirty Editors Task editors To Save length NON NLS 1 for int i 0 i editors To Save length i editors To Save i do Save new Sub Progress Monitor pm 1 pm worked 1 pm done  IRunnableWithProgress IProgressMonitor IEditorPart editorsToSave CompareUIPlugin getDirtyEditors beginTask PatchMessages getString PatchAction SavingDirtyEditorsTask editorsToSave editorsToSave editorsToSave doSave SubProgressMonitor
private I Runnable With Progress create Runnable return new I Runnable With Progress public void run I Progress Monitor pm I Editor Part editors To Save CompareUI Plugin get Dirty Editors pm begin Task Patch Messages get String Patch Action Saving Dirty Editors Task editors To Save length NON NLS 1 for int i 0 i editors To Save length i editors To Save i do Save new Sub Progress Monitor pm 1 pm worked 1 pm done  IRunnableWithProgress createRunnable IRunnableWithProgress IProgressMonitor IEditorPart editorsToSave CompareUIPlugin getDirtyEditors beginTask PatchMessages getString PatchAction SavingDirtyEditorsTask editorsToSave editorsToSave editorsToSave doSave SubProgressMonitor
check add Selection Listener new Selection Adapter public void widget Selected Selection Event e Compare Preference Page set Save All Editors check get Selection  addSelectionListener SelectionAdapter widgetSelected SelectionEvent ComparePreferencePage setSaveAllEditors getSelection
List Dialog dialog new List Dialog CompareUI Plugin get Shell protected Control create Dialog Area Composite parent Composite result Composite super create Dialog Area parent final Button check new Button result SWT CHECK check set Text Patch Messages get String Patch Action Always Save Question NON NLS 1 check set Selection Compare Preference Page get Save All Editors check add Selection Listener new Selection Adapter public void widget Selected Selection Event e Compare Preference Page set Save All Editors check get Selection apply Dialog Font result return result  ListDialog ListDialog CompareUIPlugin getShell createDialogArea createDialogArea setText PatchMessages getString PatchAction AlwaysSaveQuestion setSelection ComparePreferencePage getSaveAllEditors addSelectionListener SelectionAdapter widgetSelected SelectionEvent ComparePreferencePage setSaveAllEditors getSelection applyDialogFont
private boolean save All Dirty Editors if Compare Preference Page get Save All Editors must save everything return true List Dialog dialog new List Dialog CompareUI Plugin get Shell protected Control create Dialog Area Composite parent Composite result Composite super create Dialog Area parent final Button check new Button result SWT CHECK check set Text Patch Messages get String Patch Action Always Save Question NON NLS 1 check set Selection Compare Preference Page get Save All Editors check add Selection Listener new Selection Adapter public void widget Selected Selection Event e Compare Preference Page set Save All Editors check get Selection apply Dialog Font result return result dialog set Title Patch Messages get String Patch Action Save All Question NON NLS 1 dialog set Add Cancel Button true dialog set Label Provider create Dialog Label Provider dialog set Message Patch Messages get String Patch Action Save All Description NON NLS 1 dialog set Content Provider new List Content Provider dialog set Input Arrays as List CompareUI Plugin get Dirty Editors return dialog open Window OK  saveAllDirtyEditors ComparePreferencePage getSaveAllEditors ListDialog ListDialog CompareUIPlugin getShell createDialogArea createDialogArea setText PatchMessages getString PatchAction AlwaysSaveQuestion setSelection ComparePreferencePage getSaveAllEditors addSelectionListener SelectionAdapter widgetSelected SelectionEvent ComparePreferencePage setSaveAllEditors getSelection applyDialogFont setTitle PatchMessages getString PatchAction SaveAllQuestion setAddCancelButton setLabelProvider createDialogLabelProvider setMessage PatchMessages getString PatchAction SaveAllDescription setContentProvider ListContentProvider setInput asList CompareUIPlugin getDirtyEditors
private I Label Provider create Dialog Label Provider return new Label Provider public Image get Image Object element return I Editor Part element get Title Image  ILabelProvider createDialogLabelProvider LabelProvider getImage IEditorPart getTitleImage
return I Editor Part element get Title Image public String get Text Object element return I Editor Part element get Title  IEditorPart getTitleImage getText IEditorPart getTitle
private I Label Provider create Dialog Label Provider return new Label Provider public Image get Image Object element return I Editor Part element get Title Image public String get Text Object element return I Editor Part element get Title  ILabelProvider createDialogLabelProvider LabelProvider getImage IEditorPart getTitleImage getText IEditorPart getTitle

package Diff I Path old Path long old Date I Path new Path long new Date f Old Path old Path f Old Date old Path null 0 old Date f New Path new Path f New Date new Path null 0 new Date  IPath oldPath oldDate IPath newPath newDate fOldPath oldPath fOldDate oldPath oldDate fNewPath newPath fNewDate newPath newDate
boolean is Enabled return f Is Enabled2  isEnabled fIsEnabled2
void set Enabled boolean b f Is Enabled2 b  setEnabled fIsEnabled2
void reverse I Path tp f Old Path f Old Path f New Path f New Path tp long t f Old Date f Old Date f New Date f New Date t Iterator iter f Hunks iterator while iter has Next Hunk hunk Hunk iter next hunk reverse  IPath fOldPath fOldPath fNewPath fNewPath fOldDate fOldDate fNewDate fNewDate fHunks hasNext
Hunk get Hunks return Hunk f Hunks to Array new Hunk f Hunks size  getHunks fHunks toArray fHunks
I Path get Path if f Old Path null return f Old Path return f New Path  IPath getPath fOldPath fOldPath fNewPath
void finish if f Hunks size 1 Hunk h Hunk f Hunks get 0 if h f New Length 0 f New Date 0 f New Path f Old Path  fHunks fHunks fNewLength fNewDate fNewPath fOldPath
package void add Hunk hunk f Hunks add hunk  fHunks
package int get Type if f Old Date 0 return Differencer ADDITION if f New Date 0 return Differencer DELETION return Differencer CHANGE  getType fOldDate fNewDate
package String get Description int strip I Path path f Old Path if f Old Date 0 path f New Path if strip 0 strip path segment Count path path remove First Segments strip return path toOS String  getDescription IPath fOldPath fOldDate fNewPath segmentCount removeFirstSegments toOSString

package Hunk Diff parent int old Range int new Range List lines f Parent parent if f Parent null f Parent add this if old Range 0 0 f Old Start old Range 0 1 line number start at 0 else f Old Start 0 f Old Length old Range 1 if new Range 0 0 f New Start new Range 0 1 line number start at 0 else f New Start 0 f New Length new Range 1 f Lines String lines to Array new String lines size  oldRange newRange fParent fParent fParent oldRange fOldStart oldRange fOldStart fOldLength oldRange newRange fNewStart newRange fNewStart fNewLength newRange fLines toArray
boolean is Enabled return f Is Enabled  isEnabled fIsEnabled
void set Enabled boolean enable f Is Enabled enable  setEnabled fIsEnabled
void reverse int t f Old Start f Old Start f New Start f New Start t t f Old Length f Old Length f New Length f New Length t for int i 0 i f Lines length i String line f Lines i char c line char At 0 switch c case f Lines i line substring 1 break case f Lines i line substring 1 break default break  fOldStart fOldStart fNewStart fNewStart fOldLength fOldLength fNewLength fNewLength fLines fLines charAt fLines fLines
Returns the contents of this hunk Each line starts with a control character Their meaning is as follows ul li add the line li delete the line li no change context line ul String get Content String Buffer sb new String Buffer for int i 0 i f Lines length i String line f Lines i sb append line substring 0 Patcher length line sb append n return sb to String  getContent StringBuffer StringBuffer fLines fLines toString
Returns a descriptive String for this hunk It is in the form old start old length new start new length String get Description String Buffer sb new String Buffer sb append Integer to String f Old Start sb append sb append Integer to String f Old Length sb append NON NLS 1 sb append Integer to String f New Start sb append sb append Integer to String f New Length return sb to String  old_start old_length new_start new_length getDescription StringBuffer StringBuffer toString fOldStart toString fOldLength toString fNewStart toString fNewLength toString
String get Rejected Description String Buffer sb new String Buffer sb append NON NLS 1 sb append Integer to String f Old Start sb append sb append Integer to String f Old Length sb append NON NLS 1 sb append Integer to String f New Start sb append sb append Integer to String f New Length sb append NON NLS 1 return sb to String  getRejectedDescription StringBuffer StringBuffer toString fOldStart toString fOldLength toString fNewStart toString fNewLength toString

Input Patch Page Patch Wizard pw super Input Patch Page Patch Messages get String Input Patch Page title null NON NLS 1 NON NLS 2 f Patch Wizard pw set Message Patch Messages get String Input Patch Page message NON NLS 1  InputPatchPage PatchWizard InputPatchPage PatchMessages getString InputPatchPage fPatchWizard setMessage PatchMessages getString InputPatchPage
Get a path from the supplied text widget return org eclipse core runtime I Path protected I Path get Path From Text Text text Field return new Path text Field get Text make Absolute  IPath IPath getPathFromText textField textField getText makeAbsolute
package String get Patch Name if get Use Clipboard return Patch Messages get String Input Patch Page Clipboard NON NLS 1 return get Patch File Path  getPatchName getUseClipboard PatchMessages getString InputPatchPage getPatchFilePath
public void create Control Composite parent Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL set Control composite Label l new Label composite SWT NONE l set Text Patch Messages get String Input Patch Page Select Input NON NLS 1 build Input Group composite new Label composite SWT NONE a spacer build Patch File Group composite restore Widget Values update Widget Enablements Dialog apply Dialog Font composite Workbench Help set Help composite I Compare Context Ids PATCH INPUT WIZARD PAGE  createControl setLayout GridLayout setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL setControl setText PatchMessages getString InputPatchPage SelectInput buildInputGroup buildPatchFileGroup restoreWidgetValues updateWidgetEnablements applyDialogFont WorkbenchHelp setHelp ICompareContextIds PATCH_INPUT_WIZARD_PAGE
public I Wizard Page get Next Page Patcher patcher Patch Wizard get Wizard get Patcher String source Create a reader for the input Reader reader null if get Use Clipboard Control c get Control if c null Clipboard clipboard new Clipboard c get Display Object o clipboard get Contents Text Transfer get Instance clipboard dispose if o instanceof String reader new String Reader String o source Patch Messages get String Input Patch Page Clipboard title NON NLS 1 else String patch File Path get Patch File Path if patch File Path null try reader new File Reader patch File Path catch File Not Found Exception ex Message Dialog open Error null Patch Messages get String Input Patch Page Patch Error Dialog title NON NLS 1 Patch Messages get String Input Patch Page Patch File Not Found message NON NLS 1 source Patch Messages get String Input Patch Page Patch File title NON NLS 1 parse the input if reader null try patcher parse new Buffered Reader reader catch IO Exception ex Message Dialog open Error null Patch Messages get String Input Patch Page Patch Error Dialog title NON NLS 1 Patch Messages get String Input Patch Page Parse Error message NON NLS 1 try reader close catch IO Exception x silently ignored Diff diffs patcher get Diffs if diffs null diffs length 0 String format Patch Messages get String Input Patch Page No Diffs Found format NON NLS 1 String message Message Format format format new String source Message Dialog open Information null Patch Messages get String Input Patch Page Patch Error Dialog title message NON NLS 1 return this if selected target is file ensure that patch file contains only a patch for a single file I Resource target f Patch Wizard get Target if target instanceof I File diffs length 1 String format Patch Messages get String Input Patch Page Single File Error format NON NLS 1 String message Message Format format format new String source Message Dialog open Information null Patch Messages get String Input Patch Page Patch Error Dialog title message NON NLS 1 return this guess prefix count int guess 0 guess Prefix diffs patcher set Strip Prefix Segments guess return super get Next Page  IWizardPage getNextPage PatchWizard getWizard getPatcher getUseClipboard getControl getDisplay getContents TextTransfer getInstance StringReader PatchMessages getString InputPatchPage patchFilePath getPatchFilePath patchFilePath FileReader patchFilePath FileNotFoundException MessageDialog openError PatchMessages getString InputPatchPage PatchErrorDialog PatchMessages getString InputPatchPage PatchFileNotFound PatchMessages getString InputPatchPage PatchFile BufferedReader IOException MessageDialog openError PatchMessages getString InputPatchPage PatchErrorDialog PatchMessages getString InputPatchPage ParseError IOException getDiffs PatchMessages getString InputPatchPage NoDiffsFound MessageFormat MessageDialog openInformation PatchMessages getString InputPatchPage PatchErrorDialog IResource fPatchWizard getTarget IFile PatchMessages getString InputPatchPage SingleFileError MessageFormat MessageDialog openInformation PatchMessages getString InputPatchPage PatchErrorDialog guessPrefix setStripPrefixSegments getNextPage
public boolean can Flip To Next Page we can t call get Next Page to determine if flipping is allowed since computing the next page is quite expensive So we say yes if the page is complete return is Page Complete  canFlipToNextPage getNextPage isPageComplete
private void set Enable Patch File boolean enable f Patch File Name Field set Enabled enable f Patch File Browse Button set Enabled enable  setEnablePatchFile fPatchFileNameField setEnabled fPatchFileBrowseButton setEnabled
new Selection Adapter public void widget Selected Selection Event e f Show Error true set Enable Patch File get Use Clipboard update Widget Enablements  SelectionAdapter widgetSelected SelectionEvent fShowError setEnablePatchFile getUseClipboard updateWidgetEnablements
f Patch File Name Field add Selection Listener new Selection Adapter public void widget Selected Selection Event e set Source Name f Patch File Name Field get Text update Widget Enablements  fPatchFileNameField addSelectionListener SelectionAdapter widgetSelected SelectionEvent setSourceName fPatchFileNameField getText updateWidgetEnablements
f Patch File Name Field add Modify Listener new Modify Listener public void modify Text Modify Event e f Show Error true update Widget Enablements  fPatchFileNameField addModifyListener ModifyListener modifyText ModifyEvent fShowError updateWidgetEnablements
f Patch File Browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Patch File Browse Button Pressed update Widget Enablements  fPatchFileBrowseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handlePatchFileBrowseButtonPressed updateWidgetEnablements
Create the group for selecting the patch file private void build Patch File Group Composite parent f Patch File Group new Group parent SWT NONE f Patch File Group set Text Patch Messages get String Input Patch Page Select Patch title NON NLS 1 Grid Layout layout new Grid Layout layout num Columns 3 f Patch File Group set Layout layout f Patch File Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL 1st row f Use Patch File Button new Button f Patch File Group SWT RADIO f Use Patch File Button set Text Patch Messages get String Input Patch Page File Button text NON NLS 1 f Patch File Name Field new Combo f Patch File Group SWT BORDER Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Indent 8 gd width Hint SIZING TEXT FIELD WIDTH f Patch File Name Field set Layout Data gd f Patch File Browse Button new Button f Patch File Group SWT PUSH f Patch File Browse Button set Text Patch Messages get String Input Patch Page Choose File Button text NON NLS 1 f Patch File Browse Button set Layout Data new Grid Data 2nd row f Use Clipboard Button new Button f Patch File Group SWT RADIO f Use Clipboard Button set Text Patch Messages get String Input Patch Page Use Clipboard Button text NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 f Use Clipboard Button set Layout Data gd Add listeners f Use Patch File Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Show Error true set Enable Patch File get Use Clipboard update Widget Enablements f Patch File Name Field add Selection Listener new Selection Adapter public void widget Selected Selection Event e set Source Name f Patch File Name Field get Text update Widget Enablements f Patch File Name Field add Modify Listener new Modify Listener public void modify Text Modify Event e f Show Error true update Widget Enablements f Patch File Browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Patch File Browse Button Pressed update Widget Enablements f Patch File Name Field set Focus  buildPatchFileGroup fPatchFileGroup fPatchFileGroup setText PatchMessages getString InputPatchPage SelectPatch GridLayout GridLayout numColumns fPatchFileGroup setLayout fPatchFileGroup setLayoutData GridData GridData FILL_HORIZONTAL fUsePatchFileButton fPatchFileGroup fUsePatchFileButton setText PatchMessages getString InputPatchPage FileButton fPatchFileNameField fPatchFileGroup GridData GridData GridData FILL_HORIZONTAL horizontalIndent widthHint SIZING_TEXT_FIELD_WIDTH fPatchFileNameField setLayoutData fPatchFileBrowseButton fPatchFileGroup fPatchFileBrowseButton setText PatchMessages getString InputPatchPage ChooseFileButton fPatchFileBrowseButton setLayoutData GridData fUseClipboardButton fPatchFileGroup fUseClipboardButton setText PatchMessages getString InputPatchPage UseClipboardButton GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan fUseClipboardButton setLayoutData fUsePatchFileButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fShowError setEnablePatchFile getUseClipboard updateWidgetEnablements fPatchFileNameField addSelectionListener SelectionAdapter widgetSelected SelectionEvent setSourceName fPatchFileNameField getText updateWidgetEnablements fPatchFileNameField addModifyListener ModifyListener modifyText ModifyEvent fShowError updateWidgetEnablements fPatchFileBrowseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handlePatchFileBrowseButtonPressed updateWidgetEnablements fPatchFileNameField setFocus
f Patch Targets add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event f Patch Wizard set Targets Utilities get Resources event get Selection update Widget Enablements  fPatchTargets addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent fPatchWizard setTargets getResources getSelection updateWidgetEnablements
private void build Input Group Composite parent Patch Wizard pw Patch Wizard get Wizard I Resource target pw get Target I Workspace workspace target get Workspace I Workspace Root root workspace get Root Tree tree new Tree parent SWT BORDER Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint 200 tree set Layout Data gd f Patch Targets new Checkbox Tree Viewer tree f Patch Targets set Label Provider new Workbench Label Provider f Patch Targets set Content Provider new Workbench Content Provider f Patch Targets set Sorter new Workbench Viewer Sorter f Patch Targets set Input root if target null f Patch Targets expand To Level target 0 f Patch Targets set Selection new Structured Selection target register listeners f Patch Targets add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event f Patch Wizard set Targets Utilities get Resources event get Selection update Widget Enablements  buildInputGroup PatchWizard PatchWizard getWizard IResource getTarget IWorkspace getWorkspace IWorkspaceRoot getRoot GridData GridData GridData FILL_BOTH heightHint setLayoutData fPatchTargets CheckboxTreeViewer fPatchTargets setLabelProvider WorkbenchLabelProvider fPatchTargets setContentProvider WorkbenchContentProvider fPatchTargets setSorter WorkbenchViewerSorter fPatchTargets setInput fPatchTargets expandToLevel fPatchTargets setSelection StructuredSelection fPatchTargets addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent fPatchWizard setTargets getResources getSelection updateWidgetEnablements
Updates the enable state of this page s controls private void update Widget Enablements String error null I Selection selection f Patch Targets get Selection boolean any Selected selection null selection is Empty if any Selected error Patch Messages get String Input Patch Page Nothing Selected message NON NLS 1 boolean got Patch false if get Use Clipboard Control c get Control if c null Clipboard clipboard new Clipboard c get Display Object o clipboard get Contents Text Transfer get Instance clipboard dispose if o instanceof String String s String o trim if s length 0 got Patch true else error Patch Messages get String Input Patch Page Clipboard Is Empty message NON NLS 1 else error Patch Messages get String Input Patch Page No Text In Clipboard message NON NLS 1 else error Patch Messages get String Input Patch Page Could Not Read Clipboard message NON NLS 1 else String path f Patch File Name Field get Text if path null path length 0 File file new File path got Patch file exists file is File file length 0 if got Patch error Patch Messages get String Input Patch Page Cannot Locate Patch message path NON NLS 1 else error Patch Messages get String Input Patch Page No File Name message NON NLS 1 set Page Complete any Selected got Patch if f Show Error set Error Message error  updateWidgetEnablements ISelection fPatchTargets getSelection anySelected isEmpty anySelected PatchMessages getString InputPatchPage NothingSelected gotPatch getUseClipboard getControl getDisplay getContents TextTransfer getInstance gotPatch PatchMessages getString InputPatchPage ClipboardIsEmpty PatchMessages getString InputPatchPage NoTextInClipboard PatchMessages getString InputPatchPage CouldNotReadClipboard fPatchFileNameField getText gotPatch isFile gotPatch PatchMessages getString InputPatchPage CannotLocatePatch PatchMessages getString InputPatchPage NoFileName setPageComplete anySelected gotPatch fShowError setErrorMessage
protected void handle Patch File Browse Button Pressed File Dialog dialog new File Dialog get Shell SWT NONE dialog set Text Patch Messages get String Input Patch Page Select Patch File Dialog title NON NLS 1 String patch File Path get Patch File Path if patch File Path null int last Segment patch File Path last Index Of SEPARATOR if last Segment 0 patch File Path patch File Path substring 0 last Segment dialog set Filter Path patch File Path String res dialog open if res null return patch File Path dialog get File Name I Path filter Path new Path dialog get Filter Path I Path path filter Path append patch File Path make Absolute patch File Path path toOS String f Dialog Settings put IUI Constants DIALOGSTORE LASTEXTJAR filter Path toOS String f Patch File Name Field set Text patch File Path set Source Name patch File Path  handlePatchFileBrowseButtonPressed FileDialog FileDialog getShell setText PatchMessages getString InputPatchPage SelectPatchFileDialog patchFilePath getPatchFilePath patchFilePath lastSegment patchFilePath lastIndexOf lastSegment patchFilePath patchFilePath lastSegment setFilterPath patchFilePath patchFilePath getFileName IPath filterPath getFilterPath IPath filterPath patchFilePath makeAbsolute patchFilePath toOSString fDialogSettings IUIConstants DIALOGSTORE_LASTEXTJAR filterPath toOSString fPatchFileNameField setText patchFilePath setSourceName patchFilePath
Sets the source name of the import to be the supplied path Adds the name of the path to the list of items in the source combo and selects it param path the path to be added protected void set Source Name String path if path length 0 String current Items f Patch File Name Field get Items int selection Index 1 for int i 0 i current Items length i if current Items i equals path selection Index i if selection Index 0 not found in history int old Length current Items length String new Items new String old Length 1 System arraycopy current Items 0 new Items 0 old Length new Items old Length path f Patch File Name Field set Items new Items selection Index old Length f Patch File Name Field select selection Index reset Selection  setSourceName currentItems fPatchFileNameField getItems selectionIndex currentItems currentItems selectionIndex selectionIndex oldLength currentItems newItems oldLength currentItems newItems oldLength newItems oldLength fPatchFileNameField setItems newItems selectionIndex oldLength fPatchFileNameField selectionIndex resetSelection
The Finish button was pressed Try to do the required work now and answer a boolean indicating success If false is returned then the wizard will not close return boolean public boolean finish if ensure Source Is Valid return false save Widget Values Iterator resources Enum get Selected Resources iterator List file System Objects new Array List while resources Enum has Next file System Objects add File System Element resources Enum next get File System Object if file System Objects size 0 return import Resources file System Objects Message Dialog open Information get Container get Shell Data Transfer Messages get String Data Transfer information NON NLS 1 Data Transfer Messages get String File Import none Selected NON NLS 1 return false return true  ensureSourceIsValid saveWidgetValues resourcesEnum getSelectedResources fileSystemObjects ArrayList resourcesEnum hasNext fileSystemObjects FileSystemElement resourcesEnum getFileSystemObject fileSystemObjects importResources fileSystemObjects MessageDialog openInformation getContainer getShell DataTransferMessages getString DataTransfer DataTransferMessages getString FileImport noneSelected
Use the dialog store to restore widget values to the values that they held last time this wizard was used to completion private void restore Widget Values boolean use Clipboard false I Dialog Settings settings get Dialog Settings if settings null use Clipboard settings get Boolean STORE USE CLIPBOARD ID set filenames history String source Names settings get Array STORE PATCH FILES ID if source Names null for int i 0 i source Names length i if source Names i null source Names i length 0 f Patch File Name Field add source Names i set patch file path String patch File Path settings get STORE PATCH FILES ID if patch File Path null set Source Name patch File Path set Use Clipboard radio buttons set Use Clipboard use Clipboard  restoreWidgetValues useClipboard IDialogSettings getDialogSettings useClipboard getBoolean STORE_USE_CLIPBOARD_ID sourceNames getArray STORE_PATCH_FILES_ID sourceNames sourceNames sourceNames sourceNames fPatchFileNameField sourceNames patchFilePath STORE_PATCH_FILES_ID patchFilePath setSourceName patchFilePath setUseClipboard useClipboard
Since Finish was pressed write widget values to the dialog store so that they will persist into the next invocation of this wizard page void save Widget Values I Dialog Settings settings get Dialog Settings if settings null settings put STORE USE CLIPBOARD ID get Use Clipboard settings put STORE PATCH FILES ID get Patch File Path update source names history String source Names settings get Array STORE PATCH FILES ID if source Names null source Names new String 0 source Names add To History source Names get Patch File Path settings put STORE PATCH FILES ID source Names  saveWidgetValues IDialogSettings getDialogSettings STORE_USE_CLIPBOARD_ID getUseClipboard STORE_PATCH_FILES_ID getPatchFilePath sourceNames getArray STORE_PATCH_FILES_ID sourceNames sourceNames sourceNames addToHistory sourceNames getPatchFilePath STORE_PATCH_FILES_ID sourceNames
private void set Use Clipboard boolean use Clipboard if use Clipboard f Use Clipboard Button set Selection true else f Use Patch File Button set Selection true set Enable Patch File use Clipboard  setUseClipboard useClipboard useClipboard fUseClipboardButton setSelection fUsePatchFileButton setSelection setEnablePatchFile useClipboard
private boolean get Use Clipboard if f Use Clipboard Button null return f Use Clipboard Button get Selection return false  getUseClipboard fUseClipboardButton fUseClipboardButton getSelection
private String get Patch File Path if f Patch File Name Field null return f Patch File Name Field get Text return NON NLS 1  getPatchFilePath fPatchFileNameField fPatchFileNameField getText
Adds an entry to a history while taking care of duplicate history items and excessively long histories The assumption is made that all histories should be of length code COMBO HISTORY LENGTH code param history the current history param new Entry the entry to add to the history protected static String add To History String history String new Entry java util Array List l new java util Array List java util Arrays as List history l remove new Entry l add 0 new Entry since only one new item was added we can be over the limit by at most one item if l size COMBO HISTORY LENGTH l remove COMBO HISTORY LENGTH return String l to Array new String l size  COMBO_HISTORY_LENGTH newEntry addToHistory newEntry ArrayList ArrayList asList newEntry newEntry COMBO_HISTORY_LENGTH COMBO_HISTORY_LENGTH toArray

package Line Reader Buffered Reader reader f Reader reader Assert is Not Null reader  LineReader BufferedReader fReader isNotNull
void ignore SingleCR f Ignore SingleCR true  ignoreSingleCR fIgnoreSingleCR
Reads a line of text A line is considered to be terminated by any one of a line feed n a carriage return r or a carriage return followed immediately by a linefeed return A string containing the contents of the line including the line termination characters or code null code if the end of the stream has been reached exception IO Exception If an I O error occurs package String read Line throws IO Exception String Buffer sb null while f SawEOF int c read Char if c 1 f SawEOF true break if sb null sb new String Buffer sb append char c if c n break if c r c read Char if c 1 f SawEOF true break EOF if c n if f Ignore SingleCR sb append char c continue else f Have Char true f Last Char c else sb append char c break if sb null return sb to String return null  IOException readLine IOException StringBuffer fSawEOF readChar fSawEOF StringBuffer readChar fSawEOF fIgnoreSingleCR fHaveChar fLastChar toString
package void close try f Reader close catch IO Exception ex silently ignored  fReader IOException
package List read Lines try List lines new Array List String line while line read Line null lines add line return lines catch IO Exception ex Need Work System out println error while reading file file Name ex finally close return null  readLines ArrayList readLine IOException NeedWork fileName
Returns the number of characters in the given string without counting a trailing line separator package int line Content Length String line if line null return 0 int length line length for int i length 1 i 0 i char c line char At i if c n c r length else break return length  lineContentLength charAt
private int read Char throws IO Exception if f Have Char f Have Char false return f Last Char return f Reader read  readChar IOException fHaveChar fHaveChar fLastChar fReader

Patcher 
options void set Name String name f Name name  setName fName
String get Name return f Name  getName fName
Returns an array of Diffs after a sucessfull call to code parse code If code parse code hasn t been called returns code null code Diff get Diffs return f Diffs  getDiffs fDiffs
I Path get Path Diff diff I Path path diff get Path if f Strip Prefix Segments 0 f Strip Prefix Segments path segment Count path path remove First Segments f Strip Prefix Segments return path  IPath getPath IPath getPath fStripPrefixSegments fStripPrefixSegments segmentCount removeFirstSegments fStripPrefixSegments
Returns code true code if new value differs from old boolean set Strip Prefix Segments int strip if strip f Strip Prefix Segments f Strip Prefix Segments strip return true return false  setStripPrefixSegments fStripPrefixSegments fStripPrefixSegments
int get Strip Prefix Segments return f Strip Prefix Segments  getStripPrefixSegments fStripPrefixSegments
Returns code true code if new value differs from old boolean set Fuzz int fuzz if fuzz f Fuzz f Fuzz fuzz return true return false  setFuzz fFuzz fFuzz
Returns code true code if new value differs from old boolean set Reversed boolean reverse if f Reverse reverse f Reverse reverse for int i 0 i f Diffs length i f Diffs i reverse return true return false  setReversed fReverse fReverse fDiffs fDiffs
Returns code true code if new value differs from old boolean set Ignore Whitespace boolean ignore Whitespace if ignore Whitespace f Ignore Whitespace f Ignore Whitespace ignore Whitespace return true return false  setIgnoreWhitespace ignoreWhitespace ignoreWhitespace fIgnoreWhitespace fIgnoreWhitespace ignoreWhitespace
package void parse Buffered Reader reader throws IO Exception List diffs new Array List String line null boolean reread false String diff Args null String file Name null Line Reader lr new Line Reader reader if carbon equals SWT get Platform NON NLS 1 lr ignore SingleCR read leading garbage while true if reread line lr read Line reread false if line null break if line length 4 continue too short remember some infos if line starts With Index NON NLS 1 file Name line substring 7 trim continue if line starts With diff NON NLS 1 diff Args line substring 4 trim continue if line starts With NON NLS 1 line read Unified Diff diffs lr line diff Args file Name diff Args file Name null reread true else if line starts With NON NLS 1 line read Context Diff diffs lr line diff Args file Name diff Args file Name null reread true lr close f Diffs Diff diffs to Array new Diff diffs size  BufferedReader IOException ArrayList diffArgs fileName LineReader LineReader getPlatform ignoreSingleCR readLine startsWith fileName startsWith diffArgs startsWith readUnifiedDiff diffArgs fileName diffArgs fileName startsWith readContextDiff diffArgs fileName diffArgs fileName fDiffs toArray
Returns the next line that does not belong to this diff private String read Unified Diff List diffs Line Reader reader String line String args String file Name throws IO Exception String old Args split line substring 4 read info about new file line reader read Line if line null line starts With NON NLS 1 return line String new Args split line substring 4 Diff diff new Diff extract Path old Args 0 file Name extract Date old Args 1 extract Path new Args 0 file Name extract Date new Args 1 diffs add diff int old Range new int 2 int new Range new int 2 List lines new Array List try read lines of hunk while true line reader read Line if line null return null if reader line Content Length line 0 System out println Warning found empty line in hunk ignored lines add line continue char c line char At 0 switch c case if line starts With NON NLS 1 flush old hunk if lines size 0 new Hunk diff old Range new Range lines lines clear format old Start old Length new Start new Length extract Pair line old Range extract Pair line new Range continue break case case case lines add line continue case if line starts With No newline at end of file 2 NON NLS 1 int last Index lines size if last Index 0 line String lines get last Index 1 int end line length 1 char lc line char At end if lc n end if end 0 line char At end 1 r end else if lc r end line line substring 0 end lines set last Index 1 line continue break default if DEBUG int a1 c a2 0 if line length 1 a2 line char At 1 System out println char a1 a2 NON NLS 1 NON NLS 2 break return line finally if lines size 0 new Hunk diff old Range new Range lines diff finish  readUnifiedDiff LineReader fileName IOException oldArgs readLine startsWith newArgs extractPath oldArgs fileName extractDate oldArgs extractPath newArgs fileName extractDate newArgs oldRange newRange ArrayList readLine lineContentLength charAt startsWith oldRange newRange oldStart oldLength newStart newLength extractPair oldRange extractPair newRange startsWith lastIndex lastIndex lastIndex charAt charAt lastIndex charAt oldRange newRange
Returns the next line that does not belong to this diff private String read Context Diff List diffs Line Reader reader String line String args String file Name throws IO Exception String old Args split line substring 4 read info about new file line reader read Line if line null line starts With NON NLS 1 return line String new Args split line substring 4 Diff diff new Diff extract Path old Args 0 file Name extract Date old Args 1 extract Path new Args 0 file Name extract Date new Args 1 diffs add diff int old Range new int 2 int new Range new int 2 List old Lines new Array List List new Lines new Array List List lines old Lines try read lines of hunk while true line reader read Line if line null return line int l line length if l 0 continue if l 1 switch line char At 0 case if line starts With new hunk NON NLS 1 flush old hunk if old Lines size 0 new Lines size 0 new Hunk diff old Range new Range unify Lines old Lines new Lines old Lines clear new Lines clear continue if line starts With old range NON NLS 1 format old Start old End extract Pair line old Range old Range 1 old Range 1 old Range 0 1 lines old Lines continue break case context line case addition case change if line char At 1 lines add line continue break case if line char At 1 deletion lines add line continue if line starts With new range NON NLS 1 format new Start new End extract Pair line new Range new Range 1 new Range 1 new Range 0 1 lines new Lines continue break default break return line finally flush last hunk if old Lines size 0 new Lines size 0 new Hunk diff old Range new Range unify Lines old Lines new Lines diff finish  readContextDiff LineReader fileName IOException oldArgs readLine startsWith newArgs extractPath oldArgs fileName extractDate oldArgs extractPath newArgs fileName extractDate newArgs oldRange newRange oldLines ArrayList newLines ArrayList oldLines readLine charAt startsWith oldLines newLines oldRange newRange unifyLines oldLines newLines oldLines newLines startsWith oldStart oldEnd extractPair oldRange oldRange oldRange oldRange oldLines charAt charAt startsWith newStart newEnd extractPair newRange newRange newRange newRange newLines oldLines newLines oldRange newRange unifyLines oldLines newLines
Creates a List of lines in the unified format from two Lists of lines in the classic format private List unify Lines List old Lines List new Lines List result new Array List String ol String old Lines to Array new String old Lines size String nl String new Lines to Array new String new Lines size int oi 0 ni 0 while true char oc 0 String o null if oi ol length o ol oi oc o char At 0 char nc 0 String n null if ni nl length n nl ni nc n char At 0 EOF if oc 0 nc 0 break deletion in old if oc do result add o substring 2 oi if oi ol length break o ol oi while o char At 0 continue addition in new if nc do result add n substring 2 ni if ni nl length break n nl ni while n char At 0 continue differing lines on both sides if oc nc remove old do result add o substring 2 oi if oi ol length break o ol oi while o char At 0 add new do result add n substring 2 ni if ni nl length break n nl ni while n char At 0 continue context lines if oc nc do Assert is True o equals n non matching context lines NON NLS 1 result add o substring 2 oi ni if oi ol length ni nl length break o ol oi n nl ni while o char At 0 n char At 0 continue if oc do result add o substring 2 oi if oi ol length break o ol oi while o char At 0 continue if nc do result add n substring 2 ni if ni nl length break n nl ni while n char At 0 continue Assert is True false unexpected char oc nc NON NLS 1 NON NLS 2 NON NLS 3 return result  unifyLines oldLines newLines ArrayList oldLines toArray oldLines newLines toArray newLines charAt charAt charAt charAt charAt charAt isTrue charAt charAt charAt charAt isTrue
Breaks the given string into tab separated substrings Leading and trailing whitespace is removed from each token private String split String line List l new Array List String Tokenizer st new String Tokenizer line t NON NLS 1 while st has More Elements String token st next Token trim if token length 0 l add token return String l to Array new String l size  ArrayList StringTokenizer StringTokenizer hasMoreElements nextToken toArray
return the parsed time date in milliseconds or 1 on error private long extract Date String args int n if n args length String line args n for int i 0 i DATE FORMATS length i DATE FORMATS i set Lenient true try Date date DATE FORMATS i parse line return date get Time catch Parse Exception ex silently ignored System err println can t parse date line return 1  extractDate DATE_FORMATS DATE_FORMATS setLenient DATE_FORMATS getTime ParseException
Returns null if file name is dev null private I Path extract Path String args int n String path2 if n args length String path args n if DEV NULL equals path return null int pos path last Index Of if pos 0 path path substring 0 pos if path2 null path2 equals path if DEBUG System out println path mismatch path2 NON NLS 1 path path2 return new Path path return null  IPath extractPath DEV_NULL lastIndexOf
Tries to extract two integers separated by a comma The parsing of the line starts at the position after the first occurrence of the given character start an ends at the first blank or the end of the line If only a single number is found this is assumed to be the length of the range In this case the start of the range is set to 1 If an error occurs the range 1 1 is returned private void extract Pair String line char start int pair pair 0 pair 1 1 int start Pos line index Of start if start Pos 0 if DEBUG System out println parsing error in extract Pair couldn t find start NON NLS 1 NON NLS 2 return line line substring start Pos 1 int end Pos line index Of if end Pos 0 if DEBUG System out println parsing error in extract Pair couldn t find end blank NON NLS 1 return line line substring 0 end Pos int comma line index Of if comma 0 pair 0 Integer parse Int line substring 0 comma pair 1 Integer parse Int line substring comma 1 else pair 0 1 pair 1 Integer parse Int line substring comma 1  extractPair startPos indexOf startPos extractPair startPos endPos indexOf endPos extractPair endPos indexOf parseInt parseInt parseInt
Tries to patch the given lines with the specified Diff Any hunk that couldn t be applied is returned in the list failed Hunks package void patch Diff diff List lines List failed Hunks int shift 0 Iterator iter diff f Hunks iterator while iter has Next Hunk hunk Hunk iter next hunk f Matches false shift patch hunk lines shift failed Hunks  failedHunks failedHunks fHunks hasNext fMatches failedHunks
Tries to apply the specified hunk to the given lines If the hunk cannot be applied at the original position the methods tries Fuzz lines before and after If this fails the Hunk is added to the given list of failed hunks private int patch Hunk hunk List lines int shift List failed Hunks if try Patch hunk lines shift if hunk is Enabled shift do Patch hunk lines shift else boolean found false int old Shift shift for int i 1 i f Fuzz i if try Patch hunk lines shift i if f Adjust Shift shift i found true break if found for int i 1 i f Fuzz i if try Patch hunk lines shift i if f Adjust Shift shift i found true break if found if DEBUG System out println patched hunk at offset shift old Shift NON NLS 1 shift do Patch hunk lines shift else if failed Hunks null if DEBUG System out println failed hunk NON NLS 1 failed Hunks add hunk return shift  failedHunks tryPatch isEnabled doPatch oldShift fFuzz tryPatch fAdjustShift fFuzz tryPatch fAdjustShift oldShift doPatch failedHunks failedHunks
Tries to apply the given hunk on the specified lines The parameter shift is added to the line numbers given in the hunk private boolean try Patch Hunk hunk List lines int shift int pos hunk f Old Start shift int delete Matches 0 for int i 0 i hunk f Lines length i String s hunk f Lines i Assert is True s length 0 String line s substring 1 char control Char s char At 0 if control Char context lines while true if pos 0 pos lines size return false if lines Match line String lines get pos pos break return false else if control Char deleted lines while true if pos 0 pos lines size return false if lines Match line String lines get pos delete Matches pos break if delete Matches 0 return false pos else if control Char added lines we don t have to do anything for a try else Assert is True false try Patch unknown control character control Char NON NLS 1 return true  tryPatch fOldStart deleteMatches fLines fLines isTrue controlChar charAt controlChar linesMatch controlChar linesMatch deleteMatches deleteMatches controlChar isTrue tryPatch controlChar
private int do Patch Hunk hunk List lines int shift int pos hunk f Old Start shift for int i 0 i hunk f Lines length i String s hunk f Lines i Assert is True s length 0 String line s substring 1 char control Char s char At 0 if control Char context lines while true Assert is True pos lines size do Patch inconsistency in context NON NLS 1 if lines Match line String lines get pos pos break pos else if control Char deleted lines while true Assert is True pos lines size do Patch inconsistency in deleted lines NON NLS 1 if lines Match line String lines get pos break pos lines remove pos else if control Char added lines lines add pos line pos else Assert is True false do Patch unknown control character control Char NON NLS 1 hunk f Matches true return hunk f New Length hunk f Old Length  doPatch fOldStart fLines fLines isTrue controlChar charAt controlChar isTrue doPatch linesMatch controlChar isTrue doPatch linesMatch controlChar isTrue doPatch controlChar fMatches fNewLength fOldLength
public void apply All I Resource target I Progress Monitor pm Shell shell String title throws Core Exception final int WORK UNIT 10 int i I File single File null file to be patched I Container container null if target instanceof I Container container I Container target else if target instanceof I File single File I File target container single File get Parent else Assert is True false get all files to be modified in order to call validate Edit List list new Array List if single File null list add single File else for i 0 i f Diffs length i Diff diff f Diffs i if diff is Enabled switch diff get Type case Differencer CHANGE list add create Path container get Path diff break if Utilities validate Resources list shell title return if pm null String message Patch Messages get String Patcher Task message NON NLS 1 pm begin Task message f Diffs length WORK UNIT for i 0 i f Diffs length i int work Ticks WORK UNIT Diff diff f Diffs i if diff is Enabled I Path path get Path diff if pm null pm sub Task path to String I File file single File null single File create Path container path List failed new Array List List result null int type diff get Type switch type case Differencer ADDITION patch it and collect rejected hunks result apply diff file true failed store create String result file new Sub Progress Monitor pm work Ticks work Ticks WORK UNIT break case Differencer DELETION file delete true true new Sub Progress Monitor pm work Ticks work Ticks WORK UNIT break case Differencer CHANGE patch it and collect rejected hunks result apply diff file false failed store create String result file new Sub Progress Monitor pm work Ticks work Ticks WORK UNIT break if failed size 0 I Path pp null if path segment Count 1 pp path remove Last Segments 1 pp pp append path last Segment REJECT FILE EXTENSION else pp new Path path last Segment REJECT FILE EXTENSION file create Path container pp if file null store get Rejected failed file pm try I Marker marker file create Marker MARKER TYPE marker set Attribute I Marker MESSAGE Patch Messages get String Patcher Marker message NON NLS 1 marker set Attribute I Marker PRIORITY I Marker PRIORITY HIGH catch Core Exception ex Need Work if pm null if pm is Canceled break if work Ticks 0 pm worked work Ticks  applyAll IResource IProgressMonitor CoreException WORK_UNIT IFile singleFile IContainer IContainer IContainer IFile singleFile IFile singleFile getParent isTrue validateEdit ArrayList singleFile singleFile fDiffs fDiffs isEnabled getType createPath getPath validateResources PatchMessages getString beginTask fDiffs WORK_UNIT fDiffs workTicks WORK_UNIT fDiffs isEnabled IPath getPath subTask toString IFile singleFile singleFile createPath ArrayList getType createString SubProgressMonitor workTicks workTicks WORK_UNIT SubProgressMonitor workTicks workTicks WORK_UNIT createString SubProgressMonitor workTicks workTicks WORK_UNIT IPath segmentCount removeLastSegments lastSegment REJECT_FILE_EXTENSION lastSegment REJECT_FILE_EXTENSION createPath getRejected IMarker createMarker MARKER_TYPE setAttribute IMarker PatchMessages getString setAttribute IMarker IMarker PRIORITY_HIGH CoreException NeedWork isCanceled workTicks workTicks
Reads the contents from the given file and returns them as a List of lines List load I File file boolean create List lines null if create file null read current contents Input Stream is null try is file get Contents Reader stream Reader null try stream Reader new Input Stream Reader is Utilities get Charset file catch Unsupported Encoding Exception x use default encoding stream Reader new Input Stream Reader is Buffered Reader reader new Buffered Reader stream Reader Line Reader lr new Line Reader reader if carbon equals SWT get Platform NON NLS 1 lr ignore SingleCR lines lr read Lines catch Core Exception ex Need Work finally if is null try is close catch IO Exception ex silently ignored if lines null lines new Array List return lines  IFile InputStream getContents streamReader streamReader InputStreamReader getCharset UnsupportedEncodingException streamReader InputStreamReader BufferedReader BufferedReader streamReader LineReader LineReader getPlatform ignoreSingleCR readLines CoreException NeedWork IOException ArrayList
List apply Diff diff I File file boolean create List failed Hunks List lines load file create patch diff lines failed Hunks return lines  IFile failedHunks failedHunks
Converts the string into bytes and stores them in the given file private void store String contents I File file I Progress Monitor pm throws Core Exception byte bytes try bytes contents get Bytes Utilities get Charset file catch Unsupported Encoding Exception x uses default encoding bytes contents get Bytes Input Stream is new Byte Array Input Stream bytes try if file exists file set Contents is false true pm else file create is false pm finally if is null try is close catch IO Exception ex silently ignored  IFile IProgressMonitor CoreException getBytes getCharset UnsupportedEncodingException getBytes InputStream ByteArrayInputStream setContents IOException
Concatenates all strings found in the given List private String create String List lines String Buffer sb new String Buffer Iterator iter lines iterator if f Preserve Line Delimiters while iter has Next sb append String iter next else String line Separator System get Property line separator NON NLS 1 while iter has Next String line String iter next int l length line if l line length line has delimiter sb append line substring 0 l sb append line Separator else sb append line return sb to String  createString StringBuffer StringBuffer fPreserveLineDelimiters hasNext lineSeparator getProperty hasNext lineSeparator toString
String get Rejected List failed Hunks if failed Hunks size 0 return null String line Separator System get Property line separator NON NLS 1 String Buffer sb new String Buffer Iterator iter failed Hunks iterator while iter has Next Hunk hunk Hunk iter next sb append hunk get Rejected Description sb append line Separator sb append hunk get Content return sb to String  getRejected failedHunks failedHunks lineSeparator getProperty StringBuffer StringBuffer failedHunks hasNext getRejectedDescription lineSeparator getContent toString
Ensures that a file with the given path exists in the given container Folder are created as necessary private I File create Path I Container container I Path path throws Core Exception if path segment Count 1 I Folder f container get Folder path upto Segment 1 if f exists f create false true null return create Path f path remove First Segments 1 a leaf return container get File path  IFile createPath IContainer IPath CoreException segmentCount IFolder getFolder uptoSegment createPath removeFirstSegments getFile
Returns the given string with all whitespace characters removed Whitespace is defined by code Character is Whitespace code private static String strip White Space String s String Buffer sb new String Buffer int l s length for int i 0 i l i char c s char At i if Character is Whitespace c sb append c return sb to String  isWhitespace stripWhiteSpace StringBuffer StringBuffer charAt isWhitespace toString
Compares two strings If f Ignore Whitespace is true whitespace is ignored private boolean lines Match String line1 String line2 if f Ignore Whitespace return strip White Space line1 equals strip White Space line2 if f Ignore Line Delimiter int l1 length line1 int l2 length line2 if l1 l2 return false return line1 region Matches 0 line2 0 l1 return line1 equals line2  fIgnoreWhitespace linesMatch fIgnoreWhitespace stripWhiteSpace stripWhiteSpace fIgnoreLineDelimiter regionMatches
Returns the length exluding a line delimiter CR LF CR LF of the given string package static int length String s int l s length if l 0 char c s char At l 1 if c r return l 1 if c n if l 1 s char At l 2 r return l 2 return l 1 return l  charAt charAt
int calculate Fuzz Hunk hunk List lines int shift I Progress Monitor pm int fuzz hunk f Matches false if try Patch hunk lines shift shift do Patch hunk lines shift fuzz 0 0 else boolean found false int huge Fuzz lines size the maximum we need for this file fuzz 0 2 not found for int i 1 i huge Fuzz i if pm is Canceled fuzz 0 1 return 0 if try Patch hunk lines shift i fuzz 0 i if f Adjust Shift shift i found true break if found for int i 1 i huge Fuzz i if pm is Canceled fuzz 0 1 return 0 if try Patch hunk lines shift i fuzz 0 i if f Adjust Shift shift i found true break if found shift do Patch hunk lines shift return shift  calculateFuzz IProgressMonitor fMatches tryPatch doPatch hugeFuzz hugeFuzz isCanceled tryPatch fAdjustShift hugeFuzz isCanceled tryPatch fAdjustShift doPatch

public class Patch Error Dialog private Patch Error Dialog no instance  PatchErrorDialog PatchErrorDialog

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Patch Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE PatchMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

Creates a wizard for applying a patch file to the workspace package Patch Wizard I Selection selection set Default Page Image Descriptor CompareUI Plugin get Image Descriptor wizban applypatch wizban gif NON NLS 1 set Window Title Patch Messages get String Patch Wizard title NON NLS 1 set Targets Utilities get Resources selection f Patcher new Patcher I Dialog Settings workbench Settings CompareUI Plugin get Default get Dialog Settings I Dialog Settings section workbench Settings get Section DIALOG SETTINGS KEY NON NLS 1 if section null f Has New Dialog Settings true else f Has New Dialog Settings false set Dialog Settings section  PatchWizard ISelection setDefaultPageImageDescriptor CompareUIPlugin getImageDescriptor applypatch_wizban setWindowTitle PatchMessages getString PatchWizard setTargets getResources fPatcher IDialogSettings workbenchSettings CompareUIPlugin getDefault getDialogSettings IDialogSettings workbenchSettings getSection DIALOG_SETTINGS_KEY fHasNewDialogSettings fHasNewDialogSettings setDialogSettings
Patcher get Patcher return f Patcher  getPatcher fPatcher
I Resource get Target return f Target  IResource getTarget fTarget
void set Targets I Resource targets if targets null targets length 0 f Target targets 0 right now we can only deal with a single selection  setTargets IResource fTarget
public void add Pages super add Pages add Page f Patch Wizard Page new Input Patch Page this add Page new Preview Patch Page this  addPages addPages addPage fPatchWizardPage InputPatchPage addPage PreviewPatchPage
Method declared on I Wizard public boolean needs Progress Monitor return true  IWizard needsProgressMonitor
Workspace Modify Operation op new Workspace Modify Operation f Target get Project protected void execute I Progress Monitor monitor throws Invocation Target Exception try f Patcher apply All get Target monitor get Shell Patch Messages get String Patch Wizard title NON NLS 1 catch Core Exception e throw new Invocation Target Exception e  WorkspaceModifyOperation WorkspaceModifyOperation fTarget getProject IProgressMonitor InvocationTargetException fPatcher applyAll getTarget getShell PatchMessages getString PatchWizard CoreException InvocationTargetException
public boolean perform Finish f Patcher set Name f Patch Wizard Page get Patch Name try Workspace Modify Operation op new Workspace Modify Operation f Target get Project protected void execute I Progress Monitor monitor throws Invocation Target Exception try f Patcher apply All get Target monitor get Shell Patch Messages get String Patch Wizard title NON NLS 1 catch Core Exception e throw new Invocation Target Exception e get Container run true false op catch Invocation Target Exception e Exception Handler handle e Patch Messages get String Patch Wizard title NON NLS 1 Patch Messages get String Patch Wizard unexpected Exception message NON NLS 1 catch Interrupted Exception e cannot happen Need Work use assert Save the dialog settings if f Has New Dialog Settings I Dialog Settings workbench Settings CompareUI Plugin get Default get Dialog Settings I Dialog Settings section workbench Settings get Section DIALOG SETTINGS KEY section workbench Settings add New Section DIALOG SETTINGS KEY set Dialog Settings section f Patch Wizard Page save Widget Values f Preview Patch Page save Widget Values return true  performFinish fPatcher setName fPatchWizardPage getPatchName WorkspaceModifyOperation WorkspaceModifyOperation fTarget getProject IProgressMonitor InvocationTargetException fPatcher applyAll getTarget getShell PatchMessages getString PatchWizard CoreException InvocationTargetException getContainer InvocationTargetException ExceptionHandler PatchMessages getString PatchWizard PatchMessages getString PatchWizard unexpectedException InterruptedException NeedWork fHasNewDialogSettings IDialogSettings workbenchSettings CompareUIPlugin getDefault getDialogSettings IDialogSettings workbenchSettings getSection DIALOG_SETTINGS_KEY workbenchSettings addNewSection DIALOG_SETTINGS_KEY setDialogSettings fPatchWizardPage saveWidgetValues fPreviewPatchPage saveWidgetValues

String f Type Hunk Input String type String s f Type type f Content s  fType HunkInput fType fContent
f Content s public Image get Image return null  fContent getImage
return null public String get Name return Patch Messages get String Preview Patch Page No Name text NON NLS 1  getName PatchMessages getString PreviewPatchPage NoName
return Patch Messages get String Preview Patch Page No Name text NON NLS 1 public String get Type return f Type  PatchMessages getString PreviewPatchPage NoName getType fType
return f Type public Input Stream get Contents return new Byte Array Input Stream Utilities get Bytes f Content UTF 16  fType InputStream getContents ByteArrayInputStream getBytes fContent UTF_16
return new Byte Array Input Stream Utilities get Bytes f Content UTF 16 public String get Charset return UTF 16  ByteArrayInputStream getBytes fContent UTF_16 getCharset UTF_16
package Preview Patch Page Patch Wizard pw super Preview Patch Page NON NLS 1 Patch Messages get String Preview Patch Page title null NON NLS 1 set Message Patch Messages get String Preview Patch Page message NON NLS 1 f Patch Wizard pw set Page Complete false int w 16 Image Descriptor add Id CompareUI Plugin get Image Descriptor ovr16 add ov gif NON NLS 1 Image Descriptor del Id CompareUI Plugin get Image Descriptor ovr16 del ov gif NON NLS 1 Image Descriptor err Id CompareUI Plugin get Image Descriptor ovr16 error ov gif NON NLS 1 Image err Im err Id create Image f Images 0 new Diff Image null null w create Image f Images 1 new Diff Image null add Id w create Image f Images 2 new Diff Image null del Id w create Image f Images 3 new Diff Image err Im null w create Image f Images 4 new Diff Image err Im add Id w create Image f Images 5 new Diff Image err Im del Id w create Image f Compare Configuration new Compare Configuration f Compare Configuration set Left Editable false f Compare Configuration set Left Label Patch Messages get String Preview Patch Page Left title NON NLS 1 f Compare Configuration set Right Editable false f Compare Configuration set Right Label Patch Messages get String Preview Patch Page Right title NON NLS 1  PreviewPatchPage PatchWizard PreviewPatchPage PatchMessages getString PreviewPatchPage setMessage PatchMessages getString PreviewPatchPage fPatchWizard setPageComplete ImageDescriptor addId CompareUIPlugin getImageDescriptor add_ov ImageDescriptor delId CompareUIPlugin getImageDescriptor del_ov ImageDescriptor errId CompareUIPlugin getImageDescriptor error_ov errIm errId createImage fImages DiffImage createImage fImages DiffImage addId createImage fImages DiffImage delId createImage fImages DiffImage errIm createImage fImages DiffImage errIm addId createImage fImages DiffImage errIm delId createImage fCompareConfiguration CompareConfiguration fCompareConfiguration setLeftEditable fCompareConfiguration setLeftLabel PatchMessages getString PreviewPatchPage fCompareConfiguration setRightEditable fCompareConfiguration setRightLabel PatchMessages getString PreviewPatchPage
public void set Visible boolean visible if visible build Tree super set Visible visible  setVisible buildTree setVisible
Image get Image Diff diff if diff f Matches switch diff get Type case Differencer ADDITION return f Images 1 case Differencer DELETION return f Images 2 return f Images 0 switch diff get Type case Differencer ADDITION return f Images 4 case Differencer DELETION return f Images 5 return f Images 3  getImage fMatches getType fImages fImages fImages getType fImages fImages fImages
Image get Image Hunk hunk if hunk f Matches return f Images 0 return f Images 3  getImage fMatches fImages fImages
bottom pane showing hunks in compare viewer f Hunk Viewer new Compare Viewer Switching Pane splitter SWT BORDER SWT FLAT protected Viewer get Viewer Viewer old Viewer Object input return CompareUI find Content Viewer old Viewer I Compare Input input this f Compare Configuration  fHunkViewer CompareViewerSwitchingPane getViewer oldViewer findContentViewer oldViewer ICompareInput fCompareConfiguration
new Selection Adapter public void widget Selected Selection Event e Tree Item ti Tree Item e item Object data e item get Data if e detail SWT CHECK boolean checked ti get Checked if data instanceof Hunk Hunk hunk Hunk data checked checked hunk f Matches hunk set Enabled checked ti set Checked checked update Grayed State ti else if data instanceof Diff update Checked State ti else if data instanceof Hunk Preview Patch Page this f Hunk Viewer set Input create Input Hunk data else Preview Patch Page this f Hunk Viewer set Input null  SelectionAdapter widgetSelected SelectionEvent TreeItem TreeItem getData getChecked fMatches setEnabled setChecked updateGrayedState updateCheckedState PreviewPatchPage fHunkViewer setInput createInput PreviewPatchPage fHunkViewer setInput
f Tree add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Images null for int i 0 i f Images length i if f Images i null f Images i dispose f Images null  fTree addDisposeListener DisposeListener widgetDisposed DisposeEvent fImages fImages fImages fImages fImages
public void create Control Composite parent Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL Workbench Help set Help composite I Compare Context Ids PATCH PREVIEW WIZARD PAGE set Control composite build Patch Options Group composite Splitter splitter new Splitter composite SWT VERTICAL splitter set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Grid Data VERTICAL ALIGN FILL Grid Data GRAB VERTICAL top pane showing diffs and hunks in a check box tree f Tree new Tree splitter SWT CHECK SWT BORDER SWT H SCROLL SWT V SCROLL Grid Data gd new Grid Data gd vertical Alignment Grid Data FILL gd horizontal Alignment Grid Data FILL gd grab Excess Horizontal Space true gd grab Excess Vertical Space true f Tree set Layout Data gd bottom pane showing hunks in compare viewer f Hunk Viewer new Compare Viewer Switching Pane splitter SWT BORDER SWT FLAT protected Viewer get Viewer Viewer old Viewer Object input return CompareUI find Content Viewer old Viewer I Compare Input input this f Compare Configuration gd new Grid Data gd vertical Alignment Grid Data FILL gd horizontal Alignment Grid Data FILL gd grab Excess Horizontal Space true gd grab Excess Vertical Space true f Hunk Viewer set Layout Data gd register listeners f Tree add Selection Listener new Selection Adapter public void widget Selected Selection Event e Tree Item ti Tree Item e item Object data e item get Data if e detail SWT CHECK boolean checked ti get Checked if data instanceof Hunk Hunk hunk Hunk data checked checked hunk f Matches hunk set Enabled checked ti set Checked checked update Grayed State ti else if data instanceof Diff update Checked State ti else if data instanceof Hunk Preview Patch Page this f Hunk Viewer set Input create Input Hunk data else Preview Patch Page this f Hunk Viewer set Input null f Tree add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Images null for int i 0 i f Images length i if f Images i null f Images i dispose f Images null creating tree s content build Tree Dialog apply Dialog Font composite  createControl setLayout GridLayout setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL WorkbenchHelp setHelp ICompareContextIds PATCH_PREVIEW_WIZARD_PAGE setControl buildPatchOptionsGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridData VERTICAL_ALIGN_FILL GridData GRAB_VERTICAL fTree H_SCROLL V_SCROLL GridData GridData verticalAlignment GridData horizontalAlignment GridData grabExcessHorizontalSpace grabExcessVerticalSpace fTree setLayoutData fHunkViewer CompareViewerSwitchingPane getViewer oldViewer findContentViewer oldViewer ICompareInput fCompareConfiguration GridData verticalAlignment GridData horizontalAlignment GridData grabExcessHorizontalSpace grabExcessVerticalSpace fHunkViewer setLayoutData fTree addSelectionListener SelectionAdapter widgetSelected SelectionEvent TreeItem TreeItem getData getChecked fMatches setEnabled setChecked updateGrayedState updateCheckedState PreviewPatchPage fHunkViewer setInput createInput PreviewPatchPage fHunkViewer setInput fTree addDisposeListener DisposeListener widgetDisposed DisposeEvent fImages fImages fImages fImages fImages buildTree applyDialogFont
new Selection Adapter public void widget Selected Selection Event e int fuzz guess Fuzz Factor patcher if fuzz 0 f Fuzz Field set Text Integer to String fuzz  SelectionAdapter widgetSelected SelectionEvent guessFuzzFactor fFuzzField setText toString
f Strip Prefix Segments add Selection Listener new Selection Adapter public void widget Selected Selection Event e if patcher set Strip Prefix Segments get Strip Prefix Segments update Tree  fStripPrefixSegments addSelectionListener SelectionAdapter widgetSelected SelectionEvent setStripPrefixSegments getStripPrefixSegments updateTree
f Reverse Patch Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e if patcher set Reversed f Reverse Patch Button get Selection update Tree  fReversePatchButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setReversed fReversePatchButton getSelection updateTree
f Ignore Whitespace Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e if patcher set Ignore Whitespace f Ignore Whitespace Button get Selection update Tree  fIgnoreWhitespaceButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setIgnoreWhitespace fIgnoreWhitespaceButton getSelection updateTree
f Fuzz Field add Modify Listener new Modify Listener public void modify Text Modify Event e if patcher set Fuzz get Fuzz Factor update Tree  fFuzzField addModifyListener ModifyListener modifyText ModifyEvent setFuzz getFuzzFactor updateTree
Create the group for setting various patch options private void build Patch Options Group Composite parent Grid Layout gl Grid Data gd Label l final Patcher patcher f Patch Wizard get Patcher Group group new Group parent SWT NONE group set Text Patch Messages get String Preview Patch Page Patch Options title NON NLS 1 gl new Grid Layout gl num Columns 4 gl margin Height 0 group set Layout gl group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL 1st row Composite pair new Composite group SWT NONE gl new Grid Layout gl num Columns 2 gl margin Height gl margin Width 0 pair set Layout gl gd new Grid Data Grid Data HORIZONTAL ALIGN FILL pair set Layout Data gd l new Label pair SWT NONE l set Text Patch Messages get String Preview Patch Page Ignore Segments text NON NLS 1 gd new Grid Data Grid Data VERTICAL ALIGN CENTER Grid Data HORIZONTAL ALIGN BEGINNING Grid Data GRAB HORIZONTAL l set Layout Data gd f Strip Prefix Segments new Combo pair SWT DROP DOWN SWT READ ONLY SWT SIMPLE int prefix Cnt patcher get Strip Prefix Segments String prefix Integer to String prefix Cnt f Strip Prefix Segments add prefix f Strip Prefix Segments set Text prefix gd new Grid Data Grid Data VERTICAL ALIGN CENTER Grid Data HORIZONTAL ALIGN END f Strip Prefix Segments set Layout Data gd add Spacer group f Reverse Patch Button new Button group SWT CHECK f Reverse Patch Button set Text Patch Messages get String Preview Patch Page Reverse Patch text NON NLS 1 add Spacer group 2nd row pair new Composite group SWT NONE gl new Grid Layout gl num Columns 3 gl margin Height gl margin Width 0 pair set Layout gl gd new Grid Data Grid Data HORIZONTAL ALIGN FILL pair set Layout Data gd l new Label pair SWT NONE l set Text Patch Messages get String Preview Patch Page Fuzz Factor text NON NLS 1 l set Tool Tip Text Patch Messages get String Preview Patch Page Fuzz Factor tooltip NON NLS 1 gd new Grid Data Grid Data VERTICAL ALIGN CENTER Grid Data HORIZONTAL ALIGN BEGINNING Grid Data GRAB HORIZONTAL l set Layout Data gd f Fuzz Field new Text pair SWT BORDER f Fuzz Field set Text 2 NON NLS 1 gd new Grid Data Grid Data VERTICAL ALIGN CENTER Grid Data HORIZONTAL ALIGN END gd width Hint 30 f Fuzz Field set Layout Data gd Button b new Button pair SWT PUSH b set Text Patch Messages get String Preview Patch Page Guess Fuzz text NON NLS 1 b add Selection Listener new Selection Adapter public void widget Selected Selection Event e int fuzz guess Fuzz Factor patcher if fuzz 0 f Fuzz Field set Text Integer to String fuzz gd new Grid Data Grid Data VERTICAL ALIGN CENTER b set Layout Data gd add Spacer group f Ignore Whitespace Button new Button group SWT CHECK f Ignore Whitespace Button set Text Patch Messages get String Preview Patch Page Ignore Whitespace text NON NLS 1 add Spacer group register listeners if f Strip Prefix Segments null f Strip Prefix Segments add Selection Listener new Selection Adapter public void widget Selected Selection Event e if patcher set Strip Prefix Segments get Strip Prefix Segments update Tree f Reverse Patch Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e if patcher set Reversed f Reverse Patch Button get Selection update Tree f Ignore Whitespace Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e if patcher set Ignore Whitespace f Ignore Whitespace Button get Selection update Tree f Fuzz Field add Modify Listener new Modify Listener public void modify Text Modify Event e if patcher set Fuzz get Fuzz Factor update Tree  buildPatchOptionsGroup GridLayout GridData fPatchWizard getPatcher setText PatchMessages getString PreviewPatchPage PatchOptions GridLayout numColumns marginHeight setLayout setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridLayout numColumns marginHeight marginWidth setLayout GridData GridData HORIZONTAL_ALIGN_FILL setLayoutData setText PatchMessages getString PreviewPatchPage IgnoreSegments GridData GridData VERTICAL_ALIGN_CENTER GridData HORIZONTAL_ALIGN_BEGINNING GridData GRAB_HORIZONTAL setLayoutData fStripPrefixSegments DROP_DOWN READ_ONLY prefixCnt getStripPrefixSegments toString prefixCnt fStripPrefixSegments fStripPrefixSegments setText GridData GridData VERTICAL_ALIGN_CENTER GridData HORIZONTAL_ALIGN_END fStripPrefixSegments setLayoutData addSpacer fReversePatchButton fReversePatchButton setText PatchMessages getString PreviewPatchPage ReversePatch addSpacer GridLayout numColumns marginHeight marginWidth setLayout GridData GridData HORIZONTAL_ALIGN_FILL setLayoutData setText PatchMessages getString PreviewPatchPage FuzzFactor setToolTipText PatchMessages getString PreviewPatchPage FuzzFactor GridData GridData VERTICAL_ALIGN_CENTER GridData HORIZONTAL_ALIGN_BEGINNING GridData GRAB_HORIZONTAL setLayoutData fFuzzField fFuzzField setText GridData GridData VERTICAL_ALIGN_CENTER GridData HORIZONTAL_ALIGN_END widthHint fFuzzField setLayoutData setText PatchMessages getString PreviewPatchPage GuessFuzz addSelectionListener SelectionAdapter widgetSelected SelectionEvent guessFuzzFactor fFuzzField setText toString GridData GridData VERTICAL_ALIGN_CENTER setLayoutData addSpacer fIgnoreWhitespaceButton fIgnoreWhitespaceButton setText PatchMessages getString PreviewPatchPage IgnoreWhitespace addSpacer fStripPrefixSegments fStripPrefixSegments addSelectionListener SelectionAdapter widgetSelected SelectionEvent setStripPrefixSegments getStripPrefixSegments updateTree fReversePatchButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setReversed fReversePatchButton getSelection updateTree fIgnoreWhitespaceButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setIgnoreWhitespace fIgnoreWhitespaceButton getSelection updateTree fFuzzField addModifyListener ModifyListener modifyText ModifyEvent setFuzz getFuzzFactor updateTree
Timeout Context run true GUESS TIMEOUT get Control get Shell new I Runnable With Progress public void run I Progress Monitor monitor result 0 guess patcher monitor strip  TimeoutContext GUESS_TIMEOUT getControl getShell IRunnableWithProgress IProgressMonitor
private int guess Fuzz Factor final Patcher patcher final int strip get Strip Prefix Segments final int result new int 1 try PlatformUI get Workbench get Progress Service run true true Timeout Context run true GUESS TIMEOUT get Control get Shell new I Runnable With Progress public void run I Progress Monitor monitor result 0 guess patcher monitor strip return result 0 catch Invocation Target Exception ex Need Work catch Interrupted Exception ex Need Work return 1  guessFuzzFactor getStripPrefixSegments getWorkbench getProgressService TimeoutContext GUESS_TIMEOUT getControl getShell IRunnableWithProgress IProgressMonitor InvocationTargetException NeedWork InterruptedException NeedWork
private int guess Patcher patcher I Progress Monitor pm int strip Diff diffs patcher get Diffs if diffs null diffs length 0 return 1 now collect files and determine work I File files new I File diffs length int work 0 for int i 0 i diffs length i Diff diff diffs i if diff null continue if diff get Type Differencer ADDITION I Path p diff f Old Path if strip 0 strip p segment Count p p remove First Segments strip I File file exists In Selection p if file null files i file work diff f Hunks size do the work int fuzz Ref new int 1 String format Patch Messages get String Preview Patch Page Guess Fuzz Progress format NON NLS 1 pm begin Task Patch Messages get String Preview Patch Page Guess Fuzz Progress text work NON NLS 1 try int fuzz 0 for int i 0 i diffs length i Diff d diffs i I File file files i if d null file null List lines patcher load file false String name d get Path last Segment Iterator iter d f Hunks iterator int shift 0 for int hcnt 1 iter has Next hcnt pm sub Task Message Format format format new String name Integer to String hcnt Hunk h Hunk iter next shift patcher calculate Fuzz h lines shift pm fuzz Ref int f fuzz Ref 0 if f 1 cancel return 1 if f fuzz fuzz f pm worked 1 return fuzz finally pm done  IProgressMonitor getDiffs IFile IFile getType IPath fOldPath segmentCount removeFirstSegments IFile existsInSelection fHunks fuzzRef PatchMessages getString PreviewPatchPage GuessFuzzProgress beginTask PatchMessages getString PreviewPatchPage GuessFuzzProgress IFile getPath lastSegment fHunks hasNext subTask MessageFormat toString calculateFuzz fuzzRef fuzzRef
I Compare Input create Input Hunk hunk String lines hunk f Lines String Buffer left new String Buffer String Buffer right new String Buffer for int i 0 i lines length i String line lines i String rest line substring 1 switch line char At 0 case left append rest right append rest break case left append rest break case right append rest break Diff diff hunk f Parent I Path path diff get Path String type path get File Extension return new Diff Node new Hunk Input type left to String new Hunk Input type right to String  ICompareInput createInput fLines StringBuffer StringBuffer StringBuffer StringBuffer charAt fParent IPath getPath getFileExtension DiffNode HunkInput toString HunkInput toString
Builds a tree from list of Diffs As a side effect it calculates the maximum number of segments in all paths private void build Tree set Page Complete true if f Tree null f Tree is Disposed f Tree remove All f Hunk Viewer set Input null int length 99 Diff diffs f Patch Wizard get Patcher get Diffs if diffs null for int i 0 i diffs length i Diff diff diffs i Tree Item d new Tree Item f Tree SWT NULL d set Data diff d set Image get Image diff if diff f Old Path null length Math min length diff f Old Path segment Count if diff f New Path null length Math min length diff f New Path segment Count java util List hunks diff f Hunks java util Iterator iter hunks iterator while iter has Next Hunk hunk Hunk iter next Tree Item h new Tree Item d SWT NULL h set Data hunk h set Text hunk get Description if f Strip Prefix Segments null length 99 for int i 1 i length i f Strip Prefix Segments add Integer to String i update Tree  buildTree setPageComplete fTree fTree isDisposed fTree removeAll fHunkViewer setInput fPatchWizard getPatcher getDiffs TreeItem TreeItem fTree setData setImage getImage fOldPath fOldPath segmentCount fNewPath fNewPath segmentCount fHunks hasNext TreeItem TreeItem setData setText getDescription fStripPrefixSegments fStripPrefixSegments toString updateTree
private I File exists In Selection I Path path I Resource target f Patch Wizard get Target if target instanceof I File special case I File file I File target if matches file get Full Path path return file else if target instanceof I Container I Container c I Container target if c exists path return c get File path return null  IFile existsInSelection IPath IResource fPatchWizard getTarget IFile IFile IFile getFullPath IContainer IContainer IContainer getFile
Returns true if path completely matches the end of fullpath private boolean matches I Path fullpath I Path path for I Path p fullpath path segment Count p segment Count p p remove First Segments 1 if p equals path return true return false  IPath IPath IPath segmentCount segmentCount removeFirstSegments
Updates label and checked state of tree items private void update Tree if f Tree null f Tree is Disposed return int strip get Strip Prefix Segments Tree Item children f Tree get Items for int i 0 i children length i Tree Item item children i Diff diff Diff item get Data diff f Matches false String error null boolean create false I File file null if diff get Type Differencer ADDITION I Path p diff f New Path if strip 0 strip p segment Count p p remove First Segments strip file exists In Selection p if file null diff f Matches true else file already exists error Patch Messages get String Preview Patch Page File Exists error NON NLS 1 create true else I Path p diff f Old Path if strip 0 strip p segment Count p p remove First Segments strip file exists In Selection p diff f Matches false if file null if file is Read Only file is readonly error Patch Messages get String Preview Patch Page File Is Read Only error NON NLS 1 file null else diff f Matches true else file doesn t exist error Patch Messages get String Preview Patch Page File Does Not Exist error NON NLS 1 Array List failed Hunks new Array List Patcher patcher f Patch Wizard get Patcher patcher set Fuzz get Fuzz Factor patcher apply diff file create failed Hunks if failed Hunks size 0 diff f Rejected f Patch Wizard get Patcher get Rejected failed Hunks int checked Subs 0 counts checked hunk items Tree Item hunk Items item get Items for int h 0 h hunk Items length h Hunk hunk Hunk hunk Items h get Data boolean failed failed Hunks contains hunk String hunk Error null if failed hunk Error Patch Messages get String Preview Patch Page No Match error NON NLS 1 boolean check failed hunk Items h set Checked check if check checked Subs String hunk Label hunk get Description if hunk Error null hunk Label hunk Error NON NLS 1 hunk Items h set Text hunk Label hunk Items h set Image get Image hunk String label diff get Description strip if error null label error NON NLS 1 item set Text label item set Image get Image diff item set Checked checked Subs 0 boolean gray checked Subs 0 checked Subs hunk Items length item set Grayed gray item set Expanded gray set Page Complete update Model  updateTree fTree fTree isDisposed getStripPrefixSegments TreeItem fTree getItems TreeItem getData fMatches IFile getType IPath fNewPath segmentCount removeFirstSegments existsInSelection fMatches PatchMessages getString PreviewPatchPage FileExists IPath fOldPath segmentCount removeFirstSegments existsInSelection fMatches isReadOnly PatchMessages getString PreviewPatchPage FileIsReadOnly fMatches PatchMessages getString PreviewPatchPage FileDoesNotExist ArrayList failedHunks ArrayList fPatchWizard getPatcher setFuzz getFuzzFactor failedHunks failedHunks fRejected fPatchWizard getPatcher getRejected failedHunks checkedSubs TreeItem hunkItems getItems hunkItems hunkItems getData failedHunks hunkError hunkError PatchMessages getString PreviewPatchPage NoMatch hunkItems setChecked checkedSubs hunkLabel getDescription hunkError hunkLabel hunkError hunkItems setText hunkLabel hunkItems setImage getImage getDescription setText setImage getImage setChecked checkedSubs checkedSubs checkedSubs hunkItems setGrayed setExpanded setPageComplete updateModel
Updates the gray state of the given diff and the checked state of its children private void update Checked State Tree Item diff Item boolean checked diff Item get Checked check whether we can enable all hunks Tree Item hunks diff Item get Items int checked Count 0 for int i 0 i hunks length i Hunk hunk Hunk hunks i get Data if checked if hunk f Matches hunks i set Checked true checked Count else hunks i set Checked false diff Item set Grayed checked Count 0 checked Count hunks length diff Item set Checked checked Count 0 set Page Complete update Model  updateCheckedState TreeItem diffItem diffItem getChecked TreeItem diffItem getItems checkedCount getData fMatches setChecked checkedCount setChecked diffItem setGrayed checkedCount checkedCount diffItem setChecked checkedCount setPageComplete updateModel
Updates the gray state of the given items parent private void update Grayed State Tree Item hunk Tree Item diff hunk get Parent Item Tree Item hunks diff get Items int checked 0 for int i 0 i hunks length i if hunks i get Checked checked diff set Checked checked 0 diff set Grayed checked 0 checked hunks length set Page Complete update Model  updateGrayedState TreeItem TreeItem getParentItem TreeItem getItems getChecked setChecked setGrayed setPageComplete updateModel
private void add Spacer Composite parent Label label new Label parent SWT NONE Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 20 label set Layout Data gd  addSpacer GridData GridData GridData FILL_HORIZONTAL widthHint setLayoutData
private int get Strip Prefix Segments int strip Prefix Segments 0 if f Strip Prefix Segments null String s f Strip Prefix Segments get Text try strip Prefix Segments Integer parse Int s catch Number Format Exception ex silently ignored return strip Prefix Segments  getStripPrefixSegments stripPrefixSegments fStripPrefixSegments fStripPrefixSegments getText stripPrefixSegments parseInt NumberFormatException stripPrefixSegments
private int get Fuzz Factor int fuzz Factor 0 if f Fuzz Field null String s f Fuzz Field get Text try fuzz Factor Integer parse Int s catch Number Format Exception ex silently ignored return fuzz Factor  getFuzzFactor fuzzFactor fFuzzField fFuzzField getText fuzzFactor parseInt NumberFormatException fuzzFactor
public boolean update Model boolean at Least One Is Enabled false if f Tree null f Tree is Disposed Tree Item diff Items f Tree get Items for int i 0 i diff Items length i Tree Item diff Item diff Items i Object data diff Item get Data if data instanceof Diff Diff diff Diff data boolean b diff Item get Checked diff set Enabled b if b Tree Item hunk Items diff Item get Items for int j 0 j hunk Items length j Tree Item hunk Item hunk Items j data hunk Item get Data if data instanceof Hunk Hunk hunk Hunk data b hunk Item get Checked hunk set Enabled b if b at Least One Is Enabled true return at Least One Is Enabled  updateModel atLeastOneIsEnabled fTree fTree isDisposed TreeItem diffItems fTree getItems diffItems TreeItem diffItem diffItems diffItem getData diffItem getChecked setEnabled TreeItem hunkItems diffItem getItems hunkItems TreeItem hunkItem hunkItems hunkItem getData hunkItem getChecked setEnabled atLeastOneIsEnabled atLeastOneIsEnabled

public class Replace With Edition Action extends Edition Action public Replace With Edition Action super true org eclipse compare internal Replace With Edition Action NON NLS 1 f Help Context Id I Compare Context Ids REPLACE WITH EDITION DIALOG  ReplaceWithEditionAction EditionAction ReplaceWithEditionAction ReplaceWithEditionAction fHelpContextId ICompareContextIds REPLACE_WITH_EDITION_DIALOG

public Replace With Previous Edition Action super true org eclipse compare internal Replace With Edition Action NON NLS 1 f Previous true  ReplaceWithPreviousEditionAction ReplaceWithEditionAction fPrevious

public Resizable Dialog Shell parent Resource Bundle bundle super parent set Shell Style get Shell Style SWT RESIZE SWT MAX f Bundle bundle f Settings CompareUI Plugin get Default get Dialog Settings  ResizableDialog ResourceBundle setShellStyle getShellStyle fBundle fSettings CompareUIPlugin getDefault getDialogSettings
public void set Help Context Id String context Id f Context Id context Id  setHelpContextId contextId fContextId contextId
protected void configure Shell Shell new Shell super configure Shell new Shell if f Context Id null Workbench Help set Help new Shell f Context Id  configureShell newShell configureShell newShell fContextId WorkbenchHelp setHelp newShell fContextId
s add Control Listener new Control Listener public void control Moved Control Event arg0 f New Bounds s get Bounds  addControlListener ControlListener controlMoved ControlEvent fNewBounds getBounds
f New Bounds s get Bounds public void control Resized Control Event arg0 f New Bounds s get Bounds  fNewBounds getBounds controlResized ControlEvent fNewBounds getBounds
protected Point get Initial Size int width 0 int height 0 final Shell s get Shell if s null s add Control Listener new Control Listener public void control Moved Control Event arg0 f New Bounds s get Bounds public void control Resized Control Event arg0 f New Bounds s get Bounds I Dialog Settings bounds f Settings get Section DIALOG BOUNDS KEY NON NLS 1 if bounds null if f Bundle null width Utilities get Integer f Bundle WIDTH 0 height Utilities get Integer f Bundle HEIGHT 0 Shell shell get Parent Shell if shell null Point parent Size shell get Size if width 0 width parent Size x 300 if height 0 height parent Size y 200 else Shell shell get Parent Shell if shell null Point parent Size shell get Size width parent Size x 100 height parent Size y 100 if width 700 width 700 if height 500 height 500 else try width bounds get Int WIDTH catch Number Format Exception e width 700 try height bounds get Int HEIGHT catch Number Format Exception e height 500 return new Point width height  getInitialSize getShell addControlListener ControlListener controlMoved ControlEvent fNewBounds getBounds controlResized ControlEvent fNewBounds getBounds IDialogSettings fSettings getSection DIALOG_BOUNDS_KEY fBundle getInteger fBundle getInteger fBundle getParentShell parentSize getSize parentSize parentSize getParentShell parentSize getSize parentSize parentSize getInt NumberFormatException getInt NumberFormatException
protected Point get Initial Location Point initial Size Point loc super get Initial Location initial Size I Dialog Settings bounds f Settings get Section DIALOG BOUNDS KEY if bounds null try loc x bounds get Int X catch Number Format Exception e try loc y bounds get Int Y catch Number Format Exception e return loc  getInitialLocation initialSize getInitialLocation initialSize IDialogSettings fSettings getSection DIALOG_BOUNDS_KEY getInt NumberFormatException getInt NumberFormatException
public boolean close boolean closed super close if closed f New Bounds null save Bounds f New Bounds return closed  fNewBounds saveBounds fNewBounds
private void save Bounds Rectangle bounds I Dialog Settings dialog Bounds f Settings get Section DIALOG BOUNDS KEY if dialog Bounds null dialog Bounds new Dialog Settings DIALOG BOUNDS KEY f Settings add Section dialog Bounds dialog Bounds put X bounds x dialog Bounds put Y bounds y dialog Bounds put WIDTH bounds width dialog Bounds put HEIGHT bounds height  saveBounds IDialogSettings dialogBounds fSettings getSection DIALOG_BOUNDS_KEY dialogBounds dialogBounds DialogSettings DIALOG_BOUNDS_KEY fSettings addSection dialogBounds dialogBounds dialogBounds dialogBounds dialogBounds

public My Diff Node I Diff Container parent int description I Typed Element ancestor I Typed Element left I Typed Element right super parent description ancestor left right  MyDiffNode IDiffContainer ITypedElement ITypedElement ITypedElement
public void fire Change super fire Change set Dirty true f Dirty true if f Diff Viewer null f Diff Viewer refresh this  fireChange fireChange setDirty fDirty fDiffViewer fDiffViewer
f Diff Viewer refresh this void clear Dirty f Dirty false  fDiffViewer clearDirty fDirty
public String get Name if f Last Name null f Last Name super get Name if f Dirty return f Last Name return f Last Name  getName fLastName fLastName getName fDirty fLastName fLastName
public I Typed Element get Id I Typed Element id super get Id if id null return f Last Id f Last Id id return id  ITypedElement getId ITypedElement getId fLastId fLastId
static class Filtered Buffered Resource Node extends Buffered Resource Node Filtered Buffered Resource Node I Resource resource super resource  FilteredBufferedResourceNode BufferedResourceNode FilteredBufferedResourceNode IResource
protected I Structure Comparator create Child I Resource child String name child get Name if CompareUI Plugin get Default filter name child instanceof I Container false return null return new Filtered Buffered Resource Node child  IStructureComparator createChild IResource getName CompareUIPlugin getDefault IContainer FilteredBufferedResourceNode
Creates an compare editor input for the given selection Resource Compare Input Compare Configuration config super config  ResourceCompareInput CompareConfiguration
if f Open Action null f Open Action new Action public void run handle Open null  fOpenAction fOpenAction handleOpen
f Diff Viewer new Diff Tree Viewer parent get Compare Configuration protected void fill Context Menu I Menu Manager manager if f Open Action null f Open Action new Action public void run handle Open null Utilities init Action f Open Action get Bundle action Compare Contents NON NLS 1 boolean enable false I Selection selection get Selection if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection if ss size 1 Object element ss get First Element if element instanceof My Diff Node I Typed Element te My Diff Node element get Id if te null enable I Typed Element FOLDER TYPE equals te get Type else enable true f Open Action set Enabled enable manager add f Open Action super fill Context Menu manager  fDiffViewer DiffTreeViewer getCompareConfiguration fillContextMenu IMenuManager fOpenAction fOpenAction handleOpen initAction fOpenAction getBundle CompareContents ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement MyDiffNode ITypedElement MyDiffNode getId ITypedElement FOLDER_TYPE getType fOpenAction setEnabled fOpenAction fillContextMenu
public Viewer create Diff Viewer Composite parent f Diff Viewer new Diff Tree Viewer parent get Compare Configuration protected void fill Context Menu I Menu Manager manager if f Open Action null f Open Action new Action public void run handle Open null Utilities init Action f Open Action get Bundle action Compare Contents NON NLS 1 boolean enable false I Selection selection get Selection if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection if ss size 1 Object element ss get First Element if element instanceof My Diff Node I Typed Element te My Diff Node element get Id if te null enable I Typed Element FOLDER TYPE equals te get Type else enable true f Open Action set Enabled enable manager add f Open Action super fill Context Menu manager return f Diff Viewer  createDiffViewer fDiffViewer DiffTreeViewer getCompareConfiguration fillContextMenu IMenuManager fOpenAction fOpenAction handleOpen initAction fOpenAction getBundle CompareContents ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement MyDiffNode ITypedElement MyDiffNode getId ITypedElement FOLDER_TYPE getType fOpenAction setEnabled fOpenAction fillContextMenu fDiffViewer
void set Selection I Selection s I Resource selection Utilities get Resources s f Three Way selection length 3 f Ancestor Resource null f Left Resource selection 0 f Right Resource selection 1 if f Three Way f Left Resource selection 1 f Right Resource selection 2 f Ancestor null f Left get Structure f Left Resource f Right get Structure f Right Resource if f Three Way f Ancestor Resource selection 0 f Ancestor get Structure f Ancestor Resource  setSelection ISelection IResource getResources fThreeWay fAncestorResource fLeftResource fRightResource fThreeWay fLeftResource fRightResource fAncestor fLeft getStructure fLeftResource fRight getStructure fRightResource fThreeWay fAncestorResource fAncestor getStructure fAncestorResource
Returns true if compare can be executed for the given selection public boolean is Enabled I Selection s I Resource selection Utilities get Resources s if selection length 2 selection length 3 return false f Three Way selection length 3 f Left Resource selection 0 f Right Resource selection 1 if f Three Way f Left Resource selection 1 f Right Resource selection 2 if comparable f Left Resource f Right Resource return false if f Three Way f Ancestor Resource selection 0 if comparable f Left Resource f Right Resource return false return true  isEnabled ISelection IResource getResources fThreeWay fLeftResource fRightResource fThreeWay fLeftResource fRightResource fLeftResource fRightResource fThreeWay fAncestorResource fLeftResource fRightResource
Initializes the images in the compare configuration void initialize Compare Configuration Compare Configuration cc get Compare Configuration if f Left Resource null cc set Left Label build Label f Left Resource cc set Left Image CompareUI Plugin get Image f Left Resource if f Right Resource null cc set Right Label build Label f Right Resource cc set Right Image CompareUI Plugin get Image f Right Resource if f Three Way f Ancestor Resource null cc set Ancestor Label build Label f Ancestor Resource cc set Ancestor Image CompareUI Plugin get Image f Ancestor Resource  initializeCompareConfiguration CompareConfiguration getCompareConfiguration fLeftResource setLeftLabel buildLabel fLeftResource setLeftImage CompareUIPlugin getImage fLeftResource fRightResource setRightLabel buildLabel fRightResource setRightImage CompareUIPlugin getImage fRightResource fThreeWay fAncestorResource setAncestorLabel buildLabel fAncestorResource setAncestorImage CompareUIPlugin getImage fAncestorResource
Returns true if both resources are either structured or unstructured private boolean comparable I Resource c1 I Resource c2 return has Structure c1 has Structure c2  IResource IResource hasStructure hasStructure
Returns true if the given argument has a structure private boolean has Structure I Resource input if input instanceof I Container return true if input instanceof I File I File file I File input String type file get File Extension if type null type normalize Case type return JAR equals type ZIP equals type NON NLS 2 NON NLS 1 return false  hasStructure IResource IContainer IFile IFile IFile getFileExtension normalizeCase
Creates a code I Structure Comparator code for the given input Returns code null code if no code I Structure Comparator code can be found for the code I Resource code private I Structure Comparator get Structure I Resource input if input instanceof I Container return new Filtered Buffered Resource Node input if input instanceof I File I Structure Comparator rn new Filtered Buffered Resource Node input I File file I File input String type normalize Case file get File Extension if JAR equals type ZIP equals type NON NLS 2 NON NLS 1 return new Zip File Structure Creator get Structure rn return rn return null  IStructureComparator IStructureComparator IResource IStructureComparator getStructure IResource IContainer FilteredBufferedResourceNode IFile IStructureComparator FilteredBufferedResourceNode IFile IFile normalizeCase getFileExtension ZipFileStructureCreator getStructure
Differencer d new Differencer protected Object visit Object parent int description Object ancestor Object left Object right return new My Diff Node I Diff Container parent description I Typed Element ancestor I Typed Element left I Typed Element right  MyDiffNode IDiffContainer ITypedElement ITypedElement ITypedElement
Performs a two way or three way diff on the current selection public Object prepare Input I Progress Monitor pm throws Invocation Target Exception try fix for PR 1GFMLFB ITPUI WIN2000 files that are out of sync with the file system appear as empty f Left Resource refresh Local I Resource DEPTH INFINITE pm f Right Resource refresh Local I Resource DEPTH INFINITE pm if f Three Way f Ancestor Resource null f Ancestor Resource refresh Local I Resource DEPTH INFINITE pm end fix pm begin Task Utilities get String Resource Compare task Name I Progress Monitor UNKNOWN NON NLS 1 String left Label f Left Resource get Name String right Label f Right Resource get Name String title if f Three Way String format Utilities get String Resource Compare three Way title NON NLS 1 String ancestor Label f Ancestor Resource get Name title Message Format format format new String ancestor Label left Label right Label else String format Utilities get String Resource Compare two Way title NON NLS 1 title Message Format format format new String left Label right Label set Title title Differencer d new Differencer protected Object visit Object parent int description Object ancestor Object left Object right return new My Diff Node I Diff Container parent description I Typed Element ancestor I Typed Element left I Typed Element right f Root d find Differences f Three Way pm null f Ancestor f Left f Right return f Root catch Core Exception ex throw new Invocation Target Exception ex finally pm done  prepareInput IProgressMonitor InvocationTargetException fLeftResource refreshLocal IResource DEPTH_INFINITE fRightResource refreshLocal IResource DEPTH_INFINITE fThreeWay fAncestorResource fAncestorResource refreshLocal IResource DEPTH_INFINITE beginTask getString ResourceCompare taskName IProgressMonitor leftLabel fLeftResource getName rightLabel fRightResource getName fThreeWay getString ResourceCompare threeWay ancestorLabel fAncestorResource getName MessageFormat ancestorLabel leftLabel rightLabel getString ResourceCompare twoWay MessageFormat leftLabel rightLabel setTitle MyDiffNode IDiffContainer ITypedElement ITypedElement ITypedElement fRoot findDifferences fThreeWay fAncestor fLeft fRight fRoot CoreException InvocationTargetException
public String get Tool Tip Text if f Left Resource null f Right Resource null String left Label f Left Resource get Full Path make Relative to String String right Label f Right Resource get Full Path make Relative to String if f Three Way String format Utilities get String Resource Compare three Way tooltip NON NLS 1 String ancestor Label f Ancestor Resource get Full Path make Relative to String return Message Format format format new String ancestor Label left Label right Label else String format Utilities get String Resource Compare two Way tooltip NON NLS 1 return Message Format format format new String left Label right Label fall back return super get Tool Tip Text  getToolTipText fLeftResource fRightResource leftLabel fLeftResource getFullPath makeRelative toString rightLabel fRightResource getFullPath makeRelative toString fThreeWay getString ResourceCompare threeWay ancestorLabel fAncestorResource getFullPath makeRelative toString MessageFormat ancestorLabel leftLabel rightLabel getString ResourceCompare twoWay MessageFormat leftLabel rightLabel getToolTipText
private String build Label I Resource r String n r get Full Path to String if n char At 0 I Path SEPARATOR return n substring 1 return n  buildLabel IResource getFullPath toString charAt IPath
public void save Changes I Progress Monitor pm throws Core Exception super save Changes pm if f Root instanceof Diff Node try commit pm Diff Node f Root finally if f Diff Viewer null f Diff Viewer refresh set Dirty false  saveChanges IProgressMonitor CoreException saveChanges fRoot DiffNode DiffNode fRoot fDiffViewer fDiffViewer setDirty
private static void commit I Progress Monitor pm Diff Node node throws Core Exception if node instanceof My Diff Node My Diff Node node clear Dirty I Typed Element left node get Left if left instanceof Buffered Resource Node Buffered Resource Node left commit pm I Typed Element right node get Right if right instanceof Buffered Resource Node Buffered Resource Node right commit pm I Diff Element children node get Children if children null for int i 0 i children length i I Diff Element element children i if element instanceof Diff Node commit pm Diff Node element  IProgressMonitor DiffNode CoreException MyDiffNode MyDiffNode clearDirty ITypedElement getLeft BufferedResourceNode BufferedResourceNode ITypedElement getRight BufferedResourceNode BufferedResourceNode IDiffElement getChildren IDiffElement DiffNode DiffNode
public Object get Adapter Class adapter if I File class equals adapter Hash Set collector new Hash Set collect Dirty Resources f Root collector return I File collector to Array new I File collector size return super get Adapter adapter  getAdapter IFile HashSet HashSet collectDirtyResources fRoot IFile toArray IFile getAdapter
private void collect Dirty Resources Object o Set collector if o instanceof Diff Node Diff Node node Diff Node o I Typed Element left node get Left if left instanceof Buffered Resource Node Buffered Resource Node bn Buffered Resource Node left if bn is Dirty I Resource resource bn get Resource if resource instanceof I File collector add resource I Typed Element right node get Right if right instanceof Buffered Resource Node Buffered Resource Node bn Buffered Resource Node right if bn is Dirty I Resource resource bn get Resource if resource instanceof I File collector add resource I Diff Element children node get Children if children null for int i 0 i children length i I Diff Element element children i if element instanceof Diff Node collect Dirty Resources element collector  collectDirtyResources DiffNode DiffNode DiffNode ITypedElement getLeft BufferedResourceNode BufferedResourceNode BufferedResourceNode isDirty IResource getResource IFile ITypedElement getRight BufferedResourceNode BufferedResourceNode BufferedResourceNode isDirty IResource getResource IFile IDiffElement getChildren IDiffElement DiffNode collectDirtyResources
private static String normalize Case String s if NORMALIZE CASE s null return s to Upper Case return s  normalizeCase NORMALIZE_CASE toUpperCase

public class Show Pseudo Conflicts extends Change Property Action public Show Pseudo Conflicts Resource Bundle bundle Compare Configuration cc super bundle cc action Show Pseudo Conflicts Compare Configuration SHOW PSEUDO CONFLICTS NON NLS 1  ShowPseudoConflicts ChangePropertyAction ShowPseudoConflicts ResourceBundle CompareConfiguration ShowPseudoConflicts CompareConfiguration SHOW_PSEUDO_CONFLICTS

Simple Text Viewer Composite parent f Source Viewer new Source Viewer parent null SWT H SCROLL SWT V SCROLL f Source Viewer set Editable false  SimpleTextViewer fSourceViewer SourceViewer H_SCROLL V_SCROLL fSourceViewer setEditable
public Control get Control return f Source Viewer get Text Widget  getControl fSourceViewer getTextWidget
public void set Input Object input if input instanceof I Stream Content Accessor f Source Viewer set Document new Document get String input else if input instanceof I Compare Input f Input I Compare Input input I Typed Element left f Input get Left f Source Viewer set Document new Document get String left  setInput IStreamContentAccessor fSourceViewer setDocument getString ICompareInput fInput ICompareInput ITypedElement fInput getLeft fSourceViewer setDocument getString
public Object get Input return f Input  getInput fInput
private String get String Object input if input instanceof I Stream Content Accessor try return Utilities read String I Stream Content Accessor input catch Core Exception ex Need Work return NON NLS 1  getString IStreamContentAccessor readString IStreamContentAccessor CoreException NeedWork

Creates a new sorter node with the given configuration element public Stream Merger Descriptor I Configuration Element element f Element element  StreamMergerDescriptor IConfigurationElement fElement
Creates a new stream merger from this node public I Stream Merger create Stream Merger try return I Stream Merger f Element create Executable Extension CLASS ATTRIBUTE catch Core Exception ex Exception Handler handle ex Search Messages get String Search Error create Sorter title Search Messages get String Search Error create Sorter message NON NLS 2 NON NLS 1 return null catch Class Cast Exception ex Exception Handler display Message Dialog ex Search Messages get String Search Error create Sorter title Search Messages get String Search Error create Sorter message NON NLS 2 NON NLS 1 return null  IStreamMerger createStreamMerger IStreamMerger fElement createExecutableExtension CLASS_ATTRIBUTE CoreException ExceptionHandler SearchMessages getString createSorter SearchMessages getString createSorter ClassCastException ExceptionHandler displayMessageDialog SearchMessages getString createSorter SearchMessages getString createSorter

Creates a new sorter node with the given configuration element public Structure Creator Descriptor I Configuration Element element f Element element  StructureCreatorDescriptor IConfigurationElement fElement
Creates a new sorter from this node public I Structure Creator create Structure Creator try return I Structure Creator f Element create Executable Extension CLASS ATTRIBUTE catch Core Exception ex CompareUI Plugin log ex get Status Exception Handler handle ex Search Messages get String Search Error create Sorter title Search Messages get String Search Error create Sorter message NON NLS 2 NON NLS 1 return null catch Class Cast Exception ex Exception Handler display Message Dialog ex Search Messages get String Search Error create Sorter title Search Messages get String Search Error create Sorter message NON NLS 2 NON NLS 1 return null  IStructureCreator createStructureCreator IStructureCreator fElement createExecutableExtension CLASS_ATTRIBUTE CoreException CompareUIPlugin getStatus ExceptionHandler SearchMessages getString createSorter SearchMessages getString createSorter ClassCastException ExceptionHandler displayMessageDialog SearchMessages getString createSorter SearchMessages getString createSorter
Returns the structure creator s extensions public String get Extension return f Element get Attribute EXTENSIONS ATTRIBUTE  getExtension fElement getAttribute EXTENSIONS_ATTRIBUTE

protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache if w Hint SWT DEFAULT h Hint SWT DEFAULT return new Point w Hint h Hint Control children composite get Children int count children length int max Width 0 max Height 0 for int i 0 i count i Control child children i Point pt child compute Size SWT DEFAULT SWT DEFAULT flush Cache max Width Math max max Width pt x max Height Math max max Height pt y if w Hint SWT DEFAULT max Width w Hint if h Hint SWT DEFAULT max Height h Hint return new Point max Width max Height  computeSize wHint hHint flushCache wHint hHint wHint hHint getChildren maxWidth maxHeight computeSize flushCache maxWidth maxWidth maxHeight maxHeight wHint maxWidth wHint hHint maxHeight hHint maxWidth maxHeight
protected void layout Composite composite boolean flush Cache Rectangle rect composite get Client Area Control children composite get Children for int i 0 i children length i children i set Bounds rect  flushCache getClientArea getChildren setBounds

public class Text Merge Viewer Creator implements I Viewer Creator public Viewer create Viewer Composite parent Compare Configuration mp return new Text Merge Viewer parent mp  TextMergeViewerCreator IViewerCreator createViewer CompareConfiguration TextMergeViewer

public class Text Viewer Creator implements I Viewer Creator public Viewer create Viewer Composite parent Compare Configuration mp return new Simple Text Viewer parent  TextViewerCreator IViewerCreator createViewer CompareConfiguration SimpleTextViewer

Creates a code Token Comparator code for the given string param string the string that is split into token public Token Comparator String text Assert is Not Null text f Text text int length f Text length f Starts new int length pessimistic assumption f Lengths new int length f Count 0 char last Category 0 0 no category for int i 0 i length i char c f Text char At i char category unspecified category if Character is Whitespace c category white space category else if Character is Digit c category 0 digits else if Character is Letter c category a letters if category last Category start a new token f Starts f Count i last Category category f Lengths f Count 1  TokenComparator TokenComparator isNotNull fText fText fStarts fLengths fCount lastCategory fText charAt isWhitespace isDigit isLetter lastCategory fStarts fCount lastCategory fLengths fCount
Creates a code Token Comparator code for the given string param string the string that is split into token param should Escape public Token Comparator String s boolean should Escape this s f Should Escape should Escape  TokenComparator shouldEscape TokenComparator shouldEscape fShouldEscape shouldEscape
Returns the number of token in the string return number of token in the string public int get Range Count return f Count  getRangeCount fCount
public int get Token Start int index if index f Count return f Starts index return f Text length  getTokenStart fCount fStarts fText
public int get Token Length int index if index f Count return f Lengths index return 0  getTokenLength fCount fLengths
Returns code true code if a token given by the first index matches a token specified by the other code I Range Comparator code and index param this Index the number of the token within this range comparator param other the range comparator to compare this with param other Index the number of the token within the other comparator return code true code if the token are equal public boolean ranges Equal int this Index I Range Comparator other int other Index if other null get Class other get Class Token Comparator tc Token Comparator other int this Len get Token Length this Index int other Len tc get Token Length other Index if this Len other Len return f Text region Matches false get Token Start this Index tc f Text tc get Token Start other Index this Len return false  IRangeComparator thisIndex otherIndex rangesEqual thisIndex IRangeComparator otherIndex getClass getClass TokenComparator TokenComparator thisLen getTokenLength thisIndex otherLen getTokenLength otherIndex thisLen otherLen fText regionMatches getTokenStart thisIndex fText getTokenStart otherIndex thisLen
Aborts the comparison if the number of tokens is too large return code true code to abort a token comparison public boolean skip Range Comparison int length int max I Range Comparator other if f Should Escape return false if get Range Count 50 other get Range Count 50 return false if max 100 return false if length 100 return false if max 800 return true if length max 4 return false return true  skipRangeComparison IRangeComparator fShouldEscape getRangeCount getRangeCount

public static void register Action I Key Binding Service kbs I Action a String id if kbs null a set Action Definition Id id kbs register Action a  registerAction IKeyBindingService IAction setActionDefinitionId registerAction
public static I Workbench Part Site find Site Control c while c null c is Disposed Object data c get Data if data instanceof I Workbench Part return I Workbench Part data get Site c c get Parent return null  IWorkbenchPartSite findSite isDisposed getData IWorkbenchPart IWorkbenchPart getSite getParent
public static I Action Bars find Action Bars Control c while c null c is Disposed Object data c get Data if data instanceof Compare Editor return Compare Editor data get Action Bars PR 1GDVZV7 ITPVCM WIN98 CTRL C does not work in Java source compare if data instanceof I View Part return I View Part data get View Site get Action Bars end PR 1GDVZV7 c c get Parent return null  IActionBars findActionBars isDisposed getData CompareEditor CompareEditor getActionBars IViewPart IViewPart getViewSite getActionBars getParent
public static void set Enable Composite Composite composite boolean enable Control children composite get Children for int i 0 i children length i children i set Enabled enable  setEnableComposite getChildren setEnabled
public static boolean get Boolean Compare Configuration cc String key boolean dflt if cc null Object value cc get Property key if value instanceof Boolean return Boolean value boolean Value return dflt  getBoolean CompareConfiguration getProperty booleanValue
public static void fire Property Change Listener List ll Object source String property Object old Object new Value if ll null Property Change Event event null Object listeners ll get Listeners for int i 0 i listeners length i I Property Change Listener l I Property Change Listener listeners i if event null event new Property Change Event source property old new Value l property Change event  firePropertyChange ListenerList newValue PropertyChangeEvent getListeners IPropertyChangeListener IPropertyChangeListener PropertyChangeEvent newValue propertyChange
public static boolean ok To Use Widget widget return widget null widget is Disposed  okToUse isDisposed
private static Array List internal Get Resources I Selection selection Class type Array List tmp new Array List if selection instanceof I Structured Selection Object s I Structured Selection selection to Array for int i 0 i s length i I Resource resource null Object o s i if type is Instance o resource I Resource o else if o instanceof I Adaptable I Adaptable a I Adaptable o Object adapter a get Adapter I Resource class if type is Instance adapter resource I Resource adapter if resource null resource is Accessible tmp add resource return tmp  ArrayList internalGetResources ISelection ArrayList ArrayList IStructuredSelection IStructuredSelection toArray IResource isInstance IResource IAdaptable IAdaptable IAdaptable getAdapter IResource isInstance IResource isAccessible
Convenience method extract all accessible code I Resources code from given selection Never returns null public static I Resource get Resources I Selection selection Array List tmp internal Get Resources selection I Resource class return I Resource tmp to Array new I Resource tmp size  IResources IResource getResources ISelection ArrayList internalGetResources IResource IResource toArray IResource
Convenience method extract all accessible code I Files code from given selection Never returns null public static I File get Files I Selection selection Array List tmp internal Get Resources selection I File class return I File tmp to Array new I File tmp size  IFiles IFile getFiles ISelection ArrayList internalGetResources IFile IFile toArray IFile
public static byte read Bytes Input Stream in Byte Array Output Stream bos new Byte Array Output Stream try while true int c in read if c 1 break bos write c catch IO Exception ex return null finally Utilities close in try bos close catch IO Exception x silently ignored return bos to Byte Array  readBytes InputStream ByteArrayOutputStream ByteArrayOutputStream IOException IOException toByteArray
public static String get Icon Path Display display return icons full NON NLS 1  getIconPath
Initialize the given Action from a Resource Bundle public static void init Action I Action a Resource Bundle bundle String prefix String label Key label NON NLS 1 String tooltip Key tooltip NON NLS 1 String image Key image NON NLS 1 String description Key description NON NLS 1 if prefix null prefix length 0 label Key prefix label Key tooltip Key prefix tooltip Key image Key prefix image Key description Key prefix description Key a set Text get String bundle label Key label Key a set Tool Tip Text get String bundle tooltip Key null a set Description get String bundle description Key null String rel Path get String bundle image Key null if rel Path null rel Path trim length 0 String d Path String e Path if rel Path index Of 0 NON NLS 1 String path rel Path substring 1 d Path d path e Path e path else d Path dlcl16 rel Path NON NLS 1 e Path elcl16 rel Path NON NLS 1 Image Descriptor id CompareUI Plugin get Image Descriptor d Path we set the disabled image first see PR 1GDDE87 if id null a set Disabled Image Descriptor id id CompareUI Plugin get Image Descriptor e Path if id null a set Image Descriptor id a set Hover Image Descriptor id  ResourceBundle initAction IAction ResourceBundle labelKey tooltipKey imageKey descriptionKey labelKey labelKey tooltipKey tooltipKey imageKey imageKey descriptionKey descriptionKey setText getString labelKey labelKey setToolTipText getString tooltipKey setDescription getString descriptionKey relPath getString imageKey relPath relPath dPath ePath relPath indexOf relPath dPath ePath dPath relPath ePath relPath ImageDescriptor CompareUIPlugin getImageDescriptor dPath setDisabledImageDescriptor CompareUIPlugin getImageDescriptor ePath setImageDescriptor setHoverImageDescriptor
public static void init Toggle Action I Action a Resource Bundle bundle String prefix boolean checked String tooltip null if checked tooltip get String bundle prefix tooltip checked null NON NLS 1 else tooltip get String bundle prefix tooltip unchecked null NON NLS 1 if tooltip null tooltip get String bundle prefix tooltip null NON NLS 1 if tooltip null a set Tool Tip Text tooltip String description null if checked description get String bundle prefix description checked null NON NLS 1 else description get String bundle prefix description unchecked null NON NLS 1 if description null description get String bundle prefix description null NON NLS 1 if description null a set Description description  initToggleAction IAction ResourceBundle getString getString getString setToolTipText getString getString getString setDescription
public static String get String Resource Bundle bundle String key String dflt Value if bundle null try return bundle get String key catch Missing Resource Exception x Need Work return dflt Value  getString ResourceBundle dfltValue getString MissingResourceException NeedWork dfltValue
public static String get Formatted String Resource Bundle bundle String key String arg if bundle null try return Message Format format bundle get String key new String arg catch Missing Resource Exception x Need Work return key NON NLS 2 NON NLS 1  getFormattedString ResourceBundle MessageFormat getString MissingResourceException NeedWork
public static String get String String key try return CompareUI get Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString getResourceBundle getString MissingResourceException
public static String get Formatted String String key String arg try return Message Format format CompareUI get Resource Bundle get String key new String arg catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getFormattedString MessageFormat getResourceBundle getString MissingResourceException
public static String get Formatted String String key String arg0 String arg1 try return Message Format format CompareUI get Resource Bundle get String key new String arg0 arg1 catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getFormattedString MessageFormat getResourceBundle getString MissingResourceException
public static String get String Resource Bundle bundle String key return get String bundle key key  getString ResourceBundle getString
public static int get Integer Resource Bundle bundle String key int dflt Value if bundle null try String s bundle get String key if s null return Integer parse Int s catch Number Format Exception x Need Work catch Missing Resource Exception x Need Work return dflt Value  getInteger ResourceBundle dfltValue getString parseInt NumberFormatException NeedWork MissingResourceException NeedWork dfltValue
Makes the given resources committable Committable means that all resources are writeable and that the content of the resources hasn t changed by calling code validate Edit code for a given file on tt I Workspace tt param resources the resources to be checked param shell the Shell passed to code validate Edit code as a context return returns code true code if all resources are committable code false code otherwise see org eclipse core resources I Workspace validate Edit org eclipse core resources I File java lang Object public static boolean validate Resource I Resource resource Shell shell String title return validate Resources new I Resource resource shell title  validateEdit IWorkspace validateEdit IWorkspace validateEdit IFile validateResource IResource validateResources IResource
Makes the given resources committable Committable means that all resources are writeable and that the content of the resources hasn t changed by calling code validate Edit code for a given file on tt I Workspace tt param resources the resources to be checked param shell the Shell passed to code validate Edit code as a context return returns code true code if all resources are committable code false code otherwise see org eclipse core resources I Workspace validate Edit org eclipse core resources I File java lang Object public static boolean validate Resources List resources Shell shell String title I Resource r I Resource resources to Array new I Resource resources size return validate Resources r shell title  validateEdit IWorkspace validateEdit IWorkspace validateEdit IFile validateResources IResource IResource toArray IResource validateResources
Makes the given resources committable Committable means that all resources are writeable and that the content of the resources hasn t changed by calling code validate Edit code for a given file on tt I Workspace tt param resources the resources to be checked param shell the Shell passed to code validate Edit code as a context return returns code true code if all resources are committable code false code otherwise see org eclipse core resources I Workspace validate Edit org eclipse core resources I File java lang Object public static boolean validate Resources I Resource resources Shell shell String title get all readonly files List read Only Files get Readonly Files resources if read Only Files size 0 return true get timestamps of readonly files before validate Edit Map old Time Stamps create Modification Stamp Map read Only Files I File files I File read Only Files to Array new I File read Only Files size I Status status Resources Plugin get Workspace validate Edit files shell if status isOK String message get String Validate Edit error unable to perform NON NLS 1 Error Dialog open Error shell title message status NON NLS 1 return false I Status modified null Map new Time Stamps create Modification Stamp Map read Only Files for Iterator iter old Time Stamps key Set iterator iter has Next I File file I File iter next if file is Read Only I Status entry new Status I Status ERROR CompareUI Plugin get Plugin Id VALIDATE EDIT PROBLEM get Formatted String Validate Edit error still Readonly file get Full Path to String NON NLS 1 null modified add Status modified entry else if old Time Stamps get file equals new Time Stamps get file I Status entry new Status I Status ERROR CompareUI Plugin get Plugin Id VALIDATE EDIT PROBLEM get Formatted String Validate Edit error file Modified file get Full Path to String NON NLS 1 null modified add Status modified entry if modified null String message get String Validate Edit error unable to perform NON NLS 1 Error Dialog open Error shell title message modified return false return true  validateEdit IWorkspace validateEdit IWorkspace validateEdit IFile validateResources IResource readOnlyFiles getReadonlyFiles readOnlyFiles validateEdit oldTimeStamps createModificationStampMap readOnlyFiles IFile IFile readOnlyFiles toArray IFile readOnlyFiles IStatus ResourcesPlugin getWorkspace validateEdit getString ValidateEdit unable_to_perform ErrorDialog openError IStatus newTimeStamps createModificationStampMap readOnlyFiles oldTimeStamps keySet hasNext IFile IFile isReadOnly IStatus IStatus CompareUIPlugin getPluginId VALIDATE_EDIT_PROBLEM getFormattedString ValidateEdit stillReadonly getFullPath toString addStatus oldTimeStamps newTimeStamps IStatus IStatus CompareUIPlugin getPluginId VALIDATE_EDIT_PROBLEM getFormattedString ValidateEdit fileModified getFullPath toString addStatus getString ValidateEdit unable_to_perform ErrorDialog openError
private static List get Readonly Files I Resource resources List read Only Files new Array List for int i 0 i resources length i I Resource resource resources i if resource get Type I Resource FILE resource is Read Only read Only Files add resource return read Only Files  getReadonlyFiles IResource readOnlyFiles ArrayList IResource getType IResource isReadOnly readOnlyFiles readOnlyFiles
private static Map create Modification Stamp Map List files Map map new Hash Map for Iterator iter files iterator iter has Next I File file I File iter next map put file new Long file get Modification Stamp return map  createModificationStampMap HashMap hasNext IFile IFile getModificationStamp
private static I Status add Status I Status status I Status entry if status null return entry if status is Multi Status Multi Status status add entry return status Multi Status result new Multi Status CompareUI Plugin get Plugin Id VALIDATE EDIT PROBLEM get String Validate Edit error unable to perform null NON NLS 1 result add status result add entry return result  IStatus addStatus IStatus IStatus isMultiStatus MultiStatus MultiStatus MultiStatus CompareUIPlugin getPluginId VALIDATE_EDIT_PROBLEM getString ValidateEdit unable_to_perform
Returns null if an error occurred public static String read String Input Stream is String encoding if is null return null Buffered Reader reader null try String Buffer buffer new String Buffer char part new char 2048 int read 0 reader new Buffered Reader new Input Stream Reader is encoding while read reader read part 1 buffer append part 0 read return buffer to String catch IO Exception ex Need Work finally if reader null try reader close catch IO Exception ex silently ignored return null  readString InputStream BufferedReader StringBuffer StringBuffer BufferedReader InputStreamReader toString IOException NeedWork IOException
public static String get Charset I Resource resource if resource instanceof I Encoded Storage try return I Encoded Storage resource get Charset catch Core Exception ex fall through return Resources Plugin get Encoding  getCharset IResource IEncodedStorage IEncodedStorage getCharset CoreException ResourcesPlugin getEncoding
public static byte get Bytes String s String encoding byte bytes null if s null try bytes s get Bytes encoding NON NLS 1 catch Unsupported Encoding Exception e bytes s get Bytes return bytes  getBytes getBytes UnsupportedEncodingException getBytes
public static String read String I Stream Content Accessor sa throws Core Exception Input Stream is sa get Contents String encoding null if sa instanceof I Encoded Stream Content Accessor encoding I Encoded Stream Content Accessor sa get Charset if encoding null encoding Resources Plugin get Encoding return Utilities read String is encoding  readString IStreamContentAccessor CoreException InputStream getContents IEncodedStreamContentAccessor IEncodedStreamContentAccessor getCharset ResourcesPlugin getEncoding readString
public static void close Input Stream is if is null try is close catch IO Exception ex silently ignored  InputStream IOException

private Class f Viewer Class public Viewer Descriptor I Configuration Element config f Configuration config  fViewerClass ViewerDescriptor IConfigurationElement fConfiguration
public Viewer create Viewer Viewer current Viewer Composite parent Compare Configuration mp if current Viewer null current Viewer get Class f Viewer Class System out println reused viewer current Viewer get Class get Name return current Viewer if f Viewer Creator null try f Viewer Creator I Viewer Creator f Configuration create Executable Extension CLASS ATTRIBUTE catch Core Exception e Need Work if f Viewer Creator null Viewer viewer f Viewer Creator create Viewer parent mp if viewer null f Viewer Class viewer get Class return viewer return null  createViewer currentViewer CompareConfiguration currentViewer currentViewer getClass fViewerClass currentViewer getClass getName currentViewer fViewerCreator fViewerCreator IViewerCreator fConfiguration createExecutableExtension CLASS_ATTRIBUTE CoreException NeedWork fViewerCreator fViewerCreator createViewer fViewerClass getClass
public String get Extension return f Configuration get Attribute EXTENSIONS ATTRIBUTE  getExtension fConfiguration getAttribute EXTENSIONS_ATTRIBUTE

Adds a listener for property changes to this notifier Has no effect if an identical listener is already registered param listener a property change listener 
Removes the given content change listener from this notifier Has no effect if the identical listener is not registered param listener a property change listener 

public interface I Stream Content Accessor Returns an open code Input Stream code for this object which can be used to retrieve the object s content The client is responsible for closing the stream when finished Returns code null code if this object has no streamable contents return an input stream containing the contents of this object exception Core Exception if the contents of this object could not be accessed  IStreamContentAccessor InputStream CoreException

Performs a merge operation on the given input streams and writes the merge result to the output stream On success a status code I Status OK code is returned on error a status code I Status ERROR code If the merge operation cannot deal with conflicts the code of the error status has the value code I Stream Merger CONFLICT code For text oriented mergers the encoding for the input and output streams is honored It is the responsibility of callers to close input and output streams param output the byte stream to which the merge result is written the merger will not close the stream param output Encoding the encoding to use when writing to the output stream param ancestor the byte stream from which the common ancestor is read param ancestor Encoding the encoding of the ancestor input byte stream param target the byte stream containing the target of the merge param target Encoding the encoding of the target input byte stream param other the byte stream containing the target of the merge param other Encoding the encoding of the other input byte stream param monitor reports progress of the merge operation return returns the completion status of the operation I Status merge Output Stream output String output Encoding Input Stream ancestor String ancestor Encoding Input Stream target String target Encoding Input Stream other String other Encoding  IStatus IStatus IStreamMerger outputEncoding ancestorEncoding targetEncoding otherEncoding IStatus OutputStream outputEncoding InputStream ancestorEncoding InputStream targetEncoding InputStream otherEncoding

Returns the name of this object The name is used when displaying this object in the UI return the name of this object 
Returns an image for this object This image is used when displaying this object in the UI return the image of this object or code null code if this type of input has no image 
Returns the type of this object For objects with a file name this is typically the file extension For folders its the constant code FOLDER TYPE code The type is used for determining a suitable viewer for this object return the type of this object  FOLDER_TYPE

Creates a new viewer under the given SWT parent control param parent the SWT parent control under which to create the viewer s SWT control param config a compare configuration the newly created viewer might want to use return a new viewer 

Creates a code Navigation Action code param next if code true code action goes to the next difference otherwise to the previous difference public Navigation Action boolean next this CompareUI get Resource Bundle next  NavigationAction NavigationAction getResourceBundle
Creates a code Navigation Action code that initializes its attributes from the given code Resource Bundle code param bundle is used to initialize the action param next if code true code action goes to the next difference otherwise to the previous difference public Navigation Action Resource Bundle bundle boolean next Utilities init Action this bundle next action Next action Previous NON NLS 2 NON NLS 1 f Next next  NavigationAction ResourceBundle NavigationAction ResourceBundle initAction fNext
public void run if f Compare Editor Input null Object adapter f Compare Editor Input get Adapter I Compare Navigator class if adapter instanceof I Compare Navigator boolean at End I Compare Navigator adapter select Change f Next Shell shell CompareUI Plugin get Shell if at End shell null Display display shell get Display if display null display beep String title String message if f Next title Compare Messages get String Compare Navigator at End title NON NLS 1 message Compare Messages get String Compare Navigator at End message NON NLS 1 else title Compare Messages get String Compare Navigator at Beginning title NON NLS 1 message Compare Messages get String Compare Navigator at Beginning message NON NLS 1 Message Dialog open Information shell title message  fCompareEditorInput fCompareEditorInput getAdapter ICompareNavigator ICompareNavigator atEnd ICompareNavigator selectChange fNext CompareUIPlugin getShell atEnd getDisplay fNext CompareMessages getString CompareNavigator atEnd CompareMessages getString CompareNavigator atEnd CompareMessages getString CompareNavigator atBeginning CompareMessages getString CompareNavigator atBeginning MessageDialog openInformation
Sets the code Compare Editor Input code on which this action operates param input the code Compare Editor Input code on which this action operates if code null code action does nothing public void set Compare Editor Input Compare Editor Input input f Compare Editor Input input  CompareEditorInput CompareEditorInput setCompareEditorInput CompareEditorInput fCompareEditorInput

Creates a differences iterator on an array of code Range Difference code s Differences Iterator Range Difference difference Ranges f Array difference Ranges f Index 0 f Range new Array List if f Index f Array length f Difference f Array f Index else f Difference null  RangeDifference DifferencesIterator RangeDifference differenceRanges fArray differenceRanges fIndex fRange ArrayList fIndex fArray fDifference fArray fIndex fDifference
Returns the number of Range Differences int get Count return f Range size  RangeDifferences getCount fRange
Appends the edit to its list and moves to the next code Range Difference code void next f Range add f Difference if f Difference null if f Index f Array length f Difference f Array f Index else f Difference null  RangeDifference fRange fDifference fDifference fIndex fArray fDifference fArray fIndex fDifference
Difference iterators are used in pairs This method returns the other iterator Differences Iterator other Differences Iterator right Differences Iterator left if this right return left return right  DifferencesIterator DifferencesIterator DifferencesIterator
Removes all code Range Difference code s void remove All f Range clear  RangeDifference removeAll fRange

Returns the number of comparable entities return the number of comparable entities 
Returns whether the comparable entity given by the first index matches an entity specified by the other code I Range Comparator code and index param this Index the index of the comparable entity within this code I Range Comparator code param other the I Range Comparator to compare this with param other Index the index of the comparable entity within the other code I Range Comparator code return code true code if the comparable entities are equal  IRangeComparator thisIndex IRangeComparator IRangeComparator otherIndex IRangeComparator
Returns whether a comparison should be skipped because it would be too costly or lengthy param length a number on which to base the decision whether to return code true code or code false code param max Length another number on which to base the decision whether to return code true code or code false code param other the other code I Range Comparator code to compare with return code true code to avoid a too lengthy range comparison  maxLength IRangeComparator

Creates a Linked Range Difference an initializes it to the error state Linked Range Difference super ERROR f Next null  LinkedRangeDifference LinkedRangeDifference fNext
Constructs and links a Linke Range Difference to another Linked Range Difference Linked Range Difference Linked Range Difference next int operation super operation f Next next  LinkeRangeDifference LinkedRangeDifference LinkedRangeDifference LinkedRangeDifference fNext
Follows the next link Linked Range Difference get Next return f Next  LinkedRangeDifference getNext fNext
boolean is Delete return kind DELETE  isDelete
boolean is Insert return kind INSERT  isInsert
Sets the next link of this Linked Range Difference void set Next Linked Range Difference next f Next next  LinkedRangeDifference setNext LinkedRangeDifference fNext

Creates a new range difference with the given change kind param change Kind the kind of change package Range Difference int change Kind f Kind change Kind  changeKind RangeDifference changeKind fKind changeKind
Creates a new code Range Difference code with the given change kind and left and right ranges param change Kind the kind of change param right Start start index of entity on right side param right Length number of entities on right side param left Start start index of entity on left side param left Length number of entities on left side package Range Difference int kind int right Start int right Length int left Start int left Length f Kind kind f Right Start right Start f Right Length right Length f Left Start left Start f Left Length left Length  RangeDifference changeKind rightStart rightLength leftStart leftLength RangeDifference rightStart rightLength leftStart leftLength fKind fRightStart rightStart fRightLength rightLength fLeftStart leftStart fLeftLength leftLength
Creates a new code Range Difference code with the given change kind and left right and ancestor ranges param change Kind the kind of change param right Start start index of entity on right side param right Length number of entities on right side param left Start start index of entity on left side param left Length number of entities on left side param ancestor Start start index of entity on ancestor side param ancestor Length number of entities on ancestor side package Range Difference int kind int right Start int right Length int left Start int left Length int ancestor Start int ancestor Length this kind right Start right Length left Start left Length l Ancestor Start ancestor Start l Ancestor Length ancestor Length  RangeDifference changeKind rightStart rightLength leftStart leftLength ancestorStart ancestorLength RangeDifference rightStart rightLength leftStart leftLength ancestorStart ancestorLength rightStart rightLength leftStart leftLength lAncestorStart ancestorStart lAncestorLength ancestorLength
Returns the kind of difference return the kind of difference one of code NOCHANGE code code CHANGE code code LEFT code code RIGHT code code ANCESTOR code code CONFLICT code code ERROR code public int kind return f Kind  fKind
Returns the start index of the entity range on the ancestor side return the start index of the entity range on the ancestor side public int ancestor Start return l Ancestor Start  ancestorStart lAncestorStart
Returns the number of entities on the ancestor side return the number of entities on the ancestor side public int ancestor Length return l Ancestor Length  ancestorLength lAncestorLength
Returns the end index of the entity range on the ancestor side return the end index of the entity range on the ancestor side public int ancestor End return l Ancestor Start l Ancestor Length  ancestorEnd lAncestorStart lAncestorLength
Returns the start index of the entity range on the right side return the start index of the entity range on the right side public int right Start return f Right Start  rightStart fRightStart
Returns the number of entities on the right side return the number of entities on the right side public int right Length return f Right Length  rightLength fRightLength
Returns the end index of the entity range on the right side return the end index of the entity range on the right side public int right End return f Right Start f Right Length  rightEnd fRightStart fRightLength
Returns the start index of the entity range on the left side return the start index of the entity range on the left side public int left Start return f Left Start  leftStart fLeftStart
Returns the number of entities on the left side return the number of entities on the left side public int left Length return f Left Length  leftLength fLeftLength
Returns the end index of the entity range on the left side return the end index of the entity range on the left side public int left End return f Left Start f Left Length  leftEnd fLeftStart fLeftLength
Returns the maximum number of entities in the left right and ancestor sides of this range return the maximum number of entities in the left right and ancestor sides of this range public int max Length return Math max f Right Length Math max f Left Length l Ancestor Length  maxLength fRightLength fLeftLength lAncestorLength

Non instantiatiable private Range Differencer  RangeDifferencer
Finds the differences between two code I Range Comparator code s The differences are returned as an array of code Range Difference code s If no differences are detected an empty array is returned param left the left range comparator param right the right range comparator return an array of range differences or an empty array if no differences were found public static Range Difference find Differences I Range Comparator left I Range Comparator right return find Differences I Progress Monitor null left right  IRangeComparator RangeDifference RangeDifference findDifferences IRangeComparator IRangeComparator findDifferences IProgressMonitor
Finds the differences between two code I Range Comparator code s The differences are returned as an array of code Range Difference code s If no differences are detected an empty array is returned param pm if not code null code used to report progress param left the left range comparator param right the right range comparator return an array of range differences or an empty array if no differences were found since 2 0 public static Range Difference find Differences I Progress Monitor pm I Range Comparator left I Range Comparator right assert that both I Range Comparators are of the same class Assert is True right get Class equals left get Class int right Size right get Range Count int left Size left get Range Count Differences matrix only the last d of each diagonal is stored i e last Diagonal k row of d int diag Len 2 Math max right Size left Size bound on the size of edit script int max Diagonal diag Len int last Diagonal new int diag Len 1 the row containing the last d on diagonal k last Diagonal k row int origin diag Len 2 origin of diagonal 0 script corresponding to d k Linked Range Difference script new Linked Range Difference diag Len 1 int row col find common prefix for row 0 row right Size row left Size ranges Equal right row left row true row last Diagonal origin row script origin null int lower row right Size origin 1 origin 1 int upper row left Size origin 1 origin 1 if lower upper return EMPTY RESULT System out println find Differences max Diagonal lower upper for each value of the edit distance for int d 1 d max Diagonal d d is the current edit distance if pm null pm worked 1 if right skip Range Comparison d max Diagonal left return EMPTY RESULT should be something we already found for each relevant diagonal d d 2 d 2 d for int k lower k upper k 2 k is the current diagonal Linked Range Difference edit if pm null pm is Canceled return EMPTY RESULT if k origin d k origin d last Diagonal k 1 last Diagonal k 1 move down row last Diagonal k 1 1 edit new Linked Range Difference script k 1 Linked Range Difference DELETE else move right row last Diagonal k 1 edit new Linked Range Difference script k 1 Linked Range Difference INSERT col row k origin edit f Right Start row edit f Left Start col Assert is True k 0 k max Diagonal script k edit slide down the diagonal as far as possible while row right Size col left Size ranges Equal right row left col true row col Assert is True k 0 k max Diagonal Unreasonable value for diagonal index last Diagonal k row if row right Size col left Size show Script script k right left return create Differences Ranges script k if row right Size lower k 2 if col left Size upper k 2 lower upper too many differences Assert is True false return null  IRangeComparator RangeDifference RangeDifference findDifferences IProgressMonitor IRangeComparator IRangeComparator IRangeComparators isTrue getClass getClass rightSize getRangeCount leftSize getRangeCount lastDiagonal diagLen rightSize leftSize maxDiagonal diagLen lastDiagonal diagLen lastDiagonal diagLen LinkedRangeDifference LinkedRangeDifference diagLen rightSize leftSize rangesEqual lastDiagonal rightSize leftSize EMPTY_RESULT findDifferences maxDiagonal maxDiagonal skipRangeComparison maxDiagonal EMPTY_RESULT LinkedRangeDifference isCanceled EMPTY_RESULT lastDiagonal lastDiagonal lastDiagonal LinkedRangeDifference LinkedRangeDifference lastDiagonal LinkedRangeDifference LinkedRangeDifference fRightStart fLeftStart isTrue maxDiagonal rightSize leftSize rangesEqual isTrue maxDiagonal lastDiagonal rightSize leftSize showScript createDifferencesRanges rightSize leftSize isTrue
Finds the differences among three code I Range Comparator code s The differences are returned as a list of code Range Difference code s If no differences are detected an empty list is returned If the ancestor range comparator is code null code a two way comparison is performed param ancestor the ancestor range comparator or code null code param left the left range comparator param right the right range comparator return an array of range differences or an empty array if no differences were found public static Range Difference find Differences I Range Comparator ancestor I Range Comparator left I Range Comparator right return find Differences null ancestor left right  IRangeComparator RangeDifference RangeDifference findDifferences IRangeComparator IRangeComparator IRangeComparator findDifferences
Finds the differences among three code I Range Comparator code s The differences are returned as a list of code Range Difference code s If no differences are detected an empty list is returned If the ancestor range comparator is code null code a two way comparison is performed param pm if not code null code used to report progress param ancestor the ancestor range comparator or code null code param left the left range comparator param right the right range comparator return an array of range differences or an empty array if no differences were found since 2 0 public static Range Difference find Differences I Progress Monitor pm I Range Comparator ancestor I Range Comparator left I Range Comparator right if ancestor null return find Differences pm left right Range Difference left Ancestor Script null Range Difference right Ancestor Script find Differences pm ancestor right if right Ancestor Script null left Ancestor Script find Differences pm ancestor left if right Ancestor Script null left Ancestor Script null return null Differences Iterator my Iter new Differences Iterator right Ancestor Script Differences Iterator your Iter new Differences Iterator left Ancestor Script List diff3 new Array List diff3 add new Range Difference Range Difference ERROR add a sentinel int change Range Start 0 int change Range End 0 Combine the two two way edit scripts into one while my Iter f Difference null your Iter f Difference null Differences Iterator start Thread my Iter remove All your Iter remove All take the next diff that is closer to the start if my Iter f Difference null start Thread your Iter else if your Iter f Difference null start Thread my Iter else not at end of both scripts take the lowest range if my Iter f Difference f Left Start your Iter f Difference f Left Start 2 common Ancestor change range start Thread my Iter else start Thread your Iter change Range Start start Thread f Difference f Left Start change Range End start Thread f Difference left End start Thread next check for overlapping changes with other thread merge overlapping changes with this range Differences Iterator other start Thread other my Iter your Iter while other f Difference null other f Difference f Left Start change Range End int new Max other f Difference left End other next if new Max change Range End change Range End new Max other other other my Iter your Iter diff3 add create Range Difference3 my Iter your Iter diff3 right left change Range Start change Range End remove sentinel diff3 remove 0 return Range Difference diff3 to Array EMPTY RESULT  IRangeComparator RangeDifference RangeDifference findDifferences IProgressMonitor IRangeComparator IRangeComparator IRangeComparator findDifferences RangeDifference leftAncestorScript RangeDifference rightAncestorScript findDifferences rightAncestorScript leftAncestorScript findDifferences rightAncestorScript leftAncestorScript DifferencesIterator myIter DifferencesIterator rightAncestorScript DifferencesIterator yourIter DifferencesIterator leftAncestorScript ArrayList RangeDifference RangeDifference changeRangeStart changeRangeEnd myIter fDifference yourIter fDifference DifferencesIterator startThread myIter removeAll yourIter removeAll myIter fDifference startThread yourIter yourIter fDifference startThread myIter myIter fDifference fLeftStart yourIter fDifference fLeftStart startThread myIter startThread yourIter changeRangeStart startThread fDifference fLeftStart changeRangeEnd startThread fDifference leftEnd startThread DifferencesIterator startThread myIter yourIter fDifference fDifference fLeftStart changeRangeEnd newMax fDifference leftEnd newMax changeRangeEnd changeRangeEnd newMax myIter yourIter createRangeDifference3 myIter yourIter changeRangeStart changeRangeEnd RangeDifference toArray EMPTY_RESULT
Finds the differences among two code I Range Comparator code s In contrast to code find Differences code the result contains code Range Difference code elements for non differing ranges too param left the left range comparator param right the right range comparator return an array of range differences public static Range Difference find Ranges I Range Comparator left I Range Comparator right return find Ranges I Progress Monitor null left right  IRangeComparator findDifferences RangeDifference RangeDifference findRanges IRangeComparator IRangeComparator findRanges IProgressMonitor
Finds the differences among two code I Range Comparator code s In contrast to code find Differences code the result contains code Range Difference code elements for non differing ranges too param pm if not code null code used to report progress param left the left range comparator param right the right range comparator return an array of range differences since 2 0 public static Range Difference find Ranges I Progress Monitor pm I Range Comparator left I Range Comparator right Range Difference in find Differences pm left right List out new Array List Range Difference rd int mstart 0 int ystart 0 for int i 0 i in length i Range Difference es in i rd new Range Difference Range Difference NOCHANGE mstart es right Start mstart ystart es left Start ystart if rd max Length 0 out add rd out add es mstart es right End ystart es left End rd new Range Difference Range Difference NOCHANGE mstart right get Range Count mstart ystart left get Range Count ystart if rd max Length 0 out add rd return Range Difference out to Array EMPTY RESULT  IRangeComparator findDifferences RangeDifference RangeDifference findRanges IProgressMonitor IRangeComparator IRangeComparator RangeDifference findDifferences ArrayList RangeDifference RangeDifference RangeDifference RangeDifference rightStart leftStart maxLength rightEnd leftEnd RangeDifference RangeDifference getRangeCount getRangeCount maxLength RangeDifference toArray EMPTY_RESULT
Finds the differences among three code I Range Comparator code s In contrast to code find Differences code the result contains code Range Difference code elements for non differing ranges too If the ancestor range comparator is code null code a two way comparison is performed param ancestor the ancestor range comparator or code null code param left the left range comparator param right the right range comparator return an array of range differences public static Range Difference find Ranges I Range Comparator ancestor I Range Comparator left I Range Comparator right return find Ranges null ancestor left right  IRangeComparator findDifferences RangeDifference RangeDifference findRanges IRangeComparator IRangeComparator IRangeComparator findRanges
Finds the differences among three code I Range Comparator code s In contrast to code find Differences code the result contains code Range Difference code elements for non differing ranges too If the ancestor range comparator is code null code a two way comparison is performed param pm if not code null code used to report progress param ancestor the ancestor range comparator or code null code param left the left range comparator param right the right range comparator return an array of range differences since 2 0 public static Range Difference find Ranges I Progress Monitor pm I Range Comparator ancestor I Range Comparator left I Range Comparator right if ancestor null return find Ranges pm left right Range Difference in find Differences pm ancestor left right List out new Array List Range Difference rd int mstart 0 int ystart 0 int astart 0 for int i 0 i in length i Range Difference es in i rd new Range Difference Range Difference NOCHANGE mstart es right Start mstart ystart es left Start ystart astart es ancestor Start astart if rd max Length 0 out add rd out add es mstart es right End ystart es left End astart es ancestor End rd new Range Difference Range Difference NOCHANGE mstart right get Range Count mstart ystart left get Range Count ystart astart ancestor get Range Count astart if rd max Length 0 out add rd return Range Difference out to Array EMPTY RESULT  IRangeComparator findDifferences RangeDifference RangeDifference findRanges IProgressMonitor IRangeComparator IRangeComparator IRangeComparator findRanges RangeDifference findDifferences ArrayList RangeDifference RangeDifference RangeDifference RangeDifference rightStart leftStart ancestorStart maxLength rightEnd leftEnd ancestorEnd RangeDifference RangeDifference getRangeCount getRangeCount getRangeCount maxLength RangeDifference toArray EMPTY_RESULT
Creates a Vector of Differences Ranges out of the Linked Range Difference It coalesces adjacent changes In addition indices are changed such that the ranges are 1 open i e the end of the range is not included and 2 are zero based private static Range Difference create Differences Ranges Linked Range Difference start Linked Range Difference ep reverse Differences start Array List result new Array List Range Difference es null while ep null es new Range Difference Range Difference CHANGE if ep is Insert es f Right Start ep f Right Start 1 es f Left Start ep f Left Start Range Difference b ep do ep ep get Next es f Left Length while ep null ep is Insert ep f Right Start b f Right Start else es f Right Start ep f Right Start es f Left Start ep f Left Start Range Difference a ep deleted lines do a ep ep ep get Next es f Right Length while ep null ep is Delete ep f Right Start a f Right Start 1 boolean change ep null ep is Insert ep f Right Start a f Right Start if change Range Difference b ep replacement lines do ep ep get Next es f Left Length while ep null ep is Insert ep f Right Start b f Right Start else es f Left Length 0 es f Left Start meaning of range changes from insert after to replace with the script commands are 1 based subtract one to make them zero based es f Right Start es f Left Start result add es return Range Difference result to Array EMPTY RESULT  DifferencesRanges LinkedRangeDifference RangeDifference createDifferencesRanges LinkedRangeDifference LinkedRangeDifference reverseDifferences ArrayList ArrayList RangeDifference RangeDifference RangeDifference isInsert fRightStart fRightStart fLeftStart fLeftStart RangeDifference getNext fLeftLength isInsert fRightStart fRightStart fRightStart fRightStart fLeftStart fLeftStart RangeDifference getNext fRightLength isDelete fRightStart fRightStart isInsert fRightStart fRightStart RangeDifference getNext fLeftLength isInsert fRightStart fRightStart fLeftLength fLeftStart fRightStart fLeftStart RangeDifference toArray EMPTY_RESULT
Creates a code Range Difference3 code given the state of two Difference Iterators private static Range Difference create Range Difference3 Differences Iterator my Iter Differences Iterator your Iter List diff3 I Range Comparator right I Range Comparator left int change Range Start int change Range End int right Start right End int left Start left End int kind Range Difference ERROR Range Difference last Range Difference diff3 get diff3 size 1 Assert is True my Iter get Count 0 your Iter get Count 0 At least one range array must be non empty find corresponding lines to f Change Range Start End in right and left if my Iter get Count 0 only left changed right Start change Range Start last ancestor End last right End right End change Range End last ancestor End last right End kind Range Difference LEFT else Range Difference f Range Difference my Iter f Range get 0 Range Difference l Range Difference my Iter f Range get my Iter f Range size 1 right Start change Range Start f f Left Start f f Right Start right End change Range End l left End l right End if your Iter get Count 0 only right changed left Start change Range Start last ancestor End last left End left End change Range End last ancestor End last left End kind Range Difference RIGHT else Range Difference f Range Difference your Iter f Range get 0 Range Difference l Range Difference your Iter f Range get your Iter f Range size 1 left Start change Range Start f f Left Start f f Right Start left End change Range End l left End l right End if kind Range Difference ERROR overlapping change conflict compare the changed ranges if range Spans Equal right right Start right End right Start left left Start left End left Start kind Range Difference ANCESTOR else kind Range Difference CONFLICT return new Range Difference kind right Start right End right Start left Start left End left Start change Range Start change Range End change Range Start  RangeDifference3 DifferenceIterators RangeDifference createRangeDifference3 DifferencesIterator myIter DifferencesIterator yourIter IRangeComparator IRangeComparator changeRangeStart changeRangeEnd rightStart rightEnd leftStart leftEnd RangeDifference RangeDifference RangeDifference isTrue myIter getCount yourIter getCount fChangeRangeStart myIter getCount rightStart changeRangeStart ancestorEnd rightEnd rightEnd changeRangeEnd ancestorEnd rightEnd RangeDifference RangeDifference RangeDifference myIter fRange RangeDifference RangeDifference myIter fRange myIter fRange rightStart changeRangeStart fLeftStart fRightStart rightEnd changeRangeEnd leftEnd rightEnd yourIter getCount leftStart changeRangeStart ancestorEnd leftEnd leftEnd changeRangeEnd ancestorEnd leftEnd RangeDifference RangeDifference RangeDifference yourIter fRange RangeDifference RangeDifference yourIter fRange yourIter fRange leftStart changeRangeStart fLeftStart fRightStart leftEnd changeRangeEnd leftEnd rightEnd RangeDifference rangeSpansEqual rightStart rightEnd rightStart leftStart leftEnd leftStart RangeDifference RangeDifference RangeDifference rightStart rightEnd rightStart leftStart leftEnd leftStart changeRangeStart changeRangeEnd changeRangeStart
Tests if two ranges are equal private static boolean ranges Equal I Range Comparator a int ai I Range Comparator b int bi return a ranges Equal ai b bi  rangesEqual IRangeComparator IRangeComparator rangesEqual
Tests whether code right code and code left left changed in the same way private static boolean range Spans Equal I Range Comparator right int right Start int right Len I Range Comparator left int left Start int left Len if right Len left Len int i 0 for i 0 i right Len i if ranges Equal right right Start i left left Start i break if i right Len return true return false  rangeSpansEqual IRangeComparator rightStart rightLen IRangeComparator leftStart leftLen rightLen leftLen rightLen rangesEqual rightStart leftStart rightLen
Reverses the range differences private static Linked Range Difference reverse Differences Linked Range Difference start Linked Range Difference ep behind ahead ahead start ep null while ahead null behind ep ep ahead ahead ahead get Next ep set Next behind return ep  LinkedRangeDifference reverseDifferences LinkedRangeDifference LinkedRangeDifference getNext setNext

Creates a code Resource Node code for the given resource param resource the resource public Resource Node I Resource resource f Resource resource Assert is Not Null resource  ResourceNode ResourceNode IResource fResource isNotNull
Returns the corresponding resource for this object return the corresponding resource public I Resource get Resource return f Resource  IResource getResource fResource
public Input Stream get Contents throws Core Exception if f Resource instanceof I Storage return super get Contents return null  InputStream getContents CoreException fResource IStorage getContents
public long get Modification Date I Path path f Resource get Location File file path to File return file last Modified  getModificationDate IPath fResource getLocation toFile lastModified
public String get Name if f Resource null return f Resource get Name return null  getName fResource fResource getName
public String get Type if f Resource instanceof I Container return I Typed Element FOLDER TYPE if f Resource null String s f Resource get File Extension if s null return s return I Typed Element UNKNOWN TYPE  getType fResource IContainer ITypedElement FOLDER_TYPE fResource fResource getFileExtension ITypedElement UNKNOWN_TYPE
see I Typed Element get Image public Image get Image return CompareUI get Image f Resource  ITypedElement getImage getImage getImage fResource
Returns code true code if the other object is of type code I Typed Element code and their names are identical The content is not considered non Javadoc see I Structure Comparator equals public boolean equals Object other if other instanceof I Typed Element String other Name I Typed Element other get Name return get Name equals other Name return super equals other  ITypedElement IStructureComparator ITypedElement otherName ITypedElement getName getName otherName
Returns the hash code of the name non Javadoc see I Structure Comparator hash Code public int hash Code return get Name hash Code  IStructureComparator hashCode hashCode getName hashCode
public Object get Children if f Children null f Children new Array List if f Resource instanceof I Container try I Resource members I Container f Resource members for int i 0 i members length i I Structure Comparator child create Child members i if child null f Children add child catch Core Exception ex Need Work return f Children to Array  getChildren fChildren fChildren ArrayList fResource IContainer IResource IContainer fResource IStructureComparator createChild fChildren CoreException NeedWork fChildren toArray
This hook method is called from code get Children code once for every member of a container resource This implementation creates a new code Resource Node code for the given child resource Clients may override this method to create a different type of code I Structure Comparator code or to filter children by returning code null code param child the child resource for which a code I Structure Comparator code must be returned return a code Resource Node code for the given child or code null code protected I Structure Comparator create Child I Resource child return new Resource Node child  getChildren ResourceNode IStructureComparator IStructureComparator ResourceNode IStructureComparator createChild IResource ResourceNode
Returns an open stream if the corresponding resource implements the code I Storage code interface Otherwise the value code null code is returned return a buffered input stream containing the contents of this storage exception Core Exception if the contents of this storage could not be accessed protected Input Stream create Stream throws Core Exception if f Resource instanceof I Storage Input Stream is null I Storage storage I Storage f Resource try is storage get Contents catch Core Exception e if e get Status get Code I Resource Status OUT OF SYNC LOCAL f Resource refresh Local I Resource DEPTH INFINITE null is storage get Contents else throw e if is null return new Buffered Input Stream is return null  IStorage CoreException InputStream createStream CoreException fResource IStorage InputStream IStorage IStorage fResource getContents CoreException getStatus getCode IResourceStatus OUT_OF_SYNC_LOCAL fResource refreshLocal IResource DEPTH_INFINITE getContents BufferedInputStream
see I Editable Content is Editable public boolean is Editable return true  IEditableContent isEditable isEditable
see I Editable Content replace public I Typed Element replace I Typed Element child I Typed Element other return child  IEditableContent ITypedElement ITypedElement ITypedElement
see org eclipse compare I Encoded Stream Content Accessor get Charset public String get Charset return Utilities get Charset f Resource  IEncodedStreamContentAccessor getCharset getCharset getCharset fResource

Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul public Splitter Composite parent int style super parent style  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS
Sets the visibility of the given child in this Splitter If this change affects the visibility state of the whole Splitter and if the Splitter is directly nested in one or more Splitters this method recursively propagates the new state upward param child the child control for which the visibility is changed param visible the new visibility state public void set Visible Control child boolean visible boolean was Empty is Empty child set Visible visible child set Data VISIBILITY new Boolean visible if was Empty is Empty recursively walk up Composite parent get Parent if parent instanceof Splitter Splitter sp Splitter parent sp set Visible this visible sp layout else layout  setVisible wasEmpty isEmpty setVisible setData wasEmpty isEmpty getParent setVisible
public void set Maximized Control Control control if control null control get Maximized Control super set Maximized Control null else super set Maximized Control control recursively walk upward Composite parent get Parent if parent instanceof Splitter Splitter parent set Maximized Control this else layout true  setMaximizedControl getMaximizedControl setMaximizedControl setMaximizedControl getParent setMaximizedControl
private boolean is Empty Control controls get Children for int i 0 i controls length i if is Visible controls i return false return true  isEmpty getChildren isVisible
private boolean is Visible Control child if child instanceof Sash return false Object data child get Data VISIBILITY if data instanceof Boolean return Boolean data boolean Value return true  isVisible getData booleanValue

Creates a new container with the specified kind under the given parent param parent under which the new container is added as a child or code null code param kind of difference defined in code Differencer code public Diff Container I Diff Container parent int kind super parent kind  DiffContainer IDiffContainer
Tries to find the child with the given name Returns code null code if no such child exists param name of the child to find return the first element with a matching name public I Diff Element find Child String name Object children get Children for int i 0 i children length i I Diff Element child I Diff Element children i if name equals child get Name return child return null  IDiffElement findChild getChildren IDiffElement IDiffElement getName
public void add I Diff Element diff if f Children null f Children new Array List f Children add diff diff set Parent this  IDiffElement fChildren fChildren ArrayList fChildren setParent
Removes the given child from this container If the container becomes empty it is removed from its container non Javadoc see I Diff Container remove To Root public void remove To Root I Diff Element child if f Children null f Children remove child child set Parent null if f Children size 0 I Diff Container p get Parent if p null p remove To Root this  IDiffContainer removeToRoot removeToRoot IDiffElement fChildren fChildren setParent fChildren IDiffContainer getParent removeToRoot
Removes the given child non recursively from this container param child to remove public void remove I Diff Element child if f Children null f Children remove child child set Parent null  IDiffElement fChildren fChildren setParent
see I Diff Container has Children public boolean has Children return f Children null f Children size 0  IDiffContainer hasChildren hasChildren fChildren fChildren
public I Diff Element get Children if f Children null return I Diff Element f Children to Array fg Empty Array return fg Empty Array  IDiffElement getChildren fChildren IDiffElement fChildren toArray fgEmptyArray fgEmptyArray

Creates a new code Diff Element code as a child of the given parent If parent is not code null code the new element is added to the parent param parent the parent of this child if not code null code this element is automatically added as a child param kind the kind of change public Diff Element I Diff Container parent int kind f Parent parent f Kind kind if parent null parent add this  DiffElement DiffElement IDiffContainer fParent fKind
The code Diff Element code implementation of this code I Typed Input code method returns code null code Subclasses may re implement to provide an image for this element public Image get Image return null  DiffElement ITypedInput getImage
The code Diff Element code implementation of this code I Typed Element code method returns code I Typed Element UNKNOWN TYPE code Subclasses may re implement to provide a type for this element public String get Type return I Typed Element UNKNOWN TYPE  DiffElement ITypedElement ITypedElement UNKNOWN_TYPE getType ITypedElement UNKNOWN_TYPE
Sets the kind of difference for this element param kind set the kind of difference this element represents see Differencer public void set Kind int kind f Kind kind  setKind fKind
see I Diff Element get Kind public int get Kind return f Kind  IDiffElement getKind getKind fKind
see I Diff Element get Parent public I Diff Container get Parent return f Parent  IDiffElement getParent IDiffContainer getParent fParent
see I Diff Element set Parent public void set Parent I Diff Container parent f Parent parent  IDiffElement setParent setParent IDiffContainer fParent

Object f Right Node  fRight
Node Node parent Object ancestor Object left Object right parent add this f Ancestor ancestor f Left left f Right right  fAncestor fLeft fRight
void add Node child if f Children null f Children new Array List f Children add child  fChildren fChildren ArrayList fChildren
Object visit Differencer d Object parent int level if f Code NO CHANGE return null dump level Object data d visit parent f Code f Ancestor f Left f Right if f Children null Iterator i f Children iterator while i has Next Node n Node i next n visit d data level 1 return data  fCode NO_CHANGE fCode fAncestor fLeft fRight fChildren fChildren hasNext
Creates a new differencing engine public Differencer 
Starts the differencing engine on the three input objects If three Way is code true code a three way comparison is performed otherwise a two way compare in the latter case the ancestor argument is ignored The progress monitor is passed to the method code update Progress code which is called for every node or leaf compare The method returns the object that was returned from the top most call to method code visit code At most two of the ancestor left and right parameters are allowed to be code null code param three Way if code true code a three way comparison is performed otherwise a two way compare param pm a progress monitor which is passed to method code update Progress code param data a client data that is passed to the top level call to code visit code param ancestor the ancestor object of the compare may be code null code param left the left object of the compare param right the right object of the compare return the object returned from the top most call to method code visit code possibly code null code public Object find Differences boolean three Way I Progress Monitor pm Object data Object ancestor Object left Object right Node root new Node int code traverse three Way root pm three Way ancestor null left right if code NO CHANGE List l root f Children if l size 0 Node first Node l get 0 return first visit this data 0 return null  threeWay updateProgress threeWay updateProgress findDifferences threeWay IProgressMonitor threeWay threeWay NO_CHANGE fChildren
Traverse tree in postorder private int traverse boolean three Way Node parent I Progress Monitor pm Object ancestor Object left Object right Object ancestor Children get Children ancestor Object right Children get Children right Object left Children get Children left int code NO CHANGE Node node new Node parent ancestor left right boolean content true we reset this if we have at least one child if three Way ancestor Children null three Way right Children null left Children null we only recurse down if no leg is null a node Set all Set new Hash Set 20 Map ancestor Set null Map right Set null Map left Set null if ancestor Children null ancestor Set new Hash Map 10 for int i 0 i ancestor Children length i Object ancestor Child ancestor Children i ancestor Set put ancestor Child ancestor Child all Set add ancestor Child if right Children null right Set new Hash Map 10 for int i 0 i right Children length i Object right Child right Children i right Set put right Child right Child all Set add right Child if left Children null left Set new Hash Map 10 for int i 0 i left Children length i Object left Child left Children i left Set put left Child left Child all Set add left Child Iterator e all Set iterator while e has Next Object key Child e next content false if pm null if pm is Canceled throw new Operation Canceled Exception update Progress pm key Child Object ancestor Child ancestor Set null ancestor Set get key Child null Object left Child left Set null left Set get key Child null Object right Child right Set null right Set get key Child null int c traverse three Way node pm ancestor Child left Child right Child if c CHANGE TYPE MASK NO CHANGE code CHANGE deletions and additions of child result in a change of the container code c DIRECTION MASK incoming outgoing are just ored if content a leaf code compare three Way ancestor left right node f Code code return code  threeWay IProgressMonitor ancestorChildren getChildren rightChildren getChildren leftChildren getChildren NO_CHANGE threeWay ancestorChildren threeWay rightChildren leftChildren allSet HashSet ancestorSet rightSet leftSet ancestorChildren ancestorSet HashMap ancestorChildren ancestorChild ancestorChildren ancestorSet ancestorChild ancestorChild allSet ancestorChild rightChildren rightSet HashMap rightChildren rightChild rightChildren rightSet rightChild rightChild allSet rightChild leftChildren leftSet HashMap leftChildren leftChild leftChildren leftSet leftChild leftChild allSet leftChild allSet hasNext keyChild isCanceled OperationCanceledException updateProgress keyChild ancestorChild ancestorSet ancestorSet keyChild leftChild leftSet leftSet keyChild rightChild rightSet rightSet keyChild threeWay ancestorChild leftChild rightChild CHANGE_TYPE_MASK NO_CHANGE DIRECTION_MASK threeWay fCode
Called for every node or leaf comparison The differencing engine passes in the input objects of the compare and the result of the compare The data object is the value returned from a call to the code visit code method on the parent input It can be considered the parent reference and is useful when building a tree p The code Differencer code implementation returns a new code Diff Node code which is initialized with the corresponding values Subclasses may override param data object returned from parent call to code visit code possibly code null code param result the result of the compare operation performed on the three inputs param ancestor the compare ancestor of the left and right inputs param left the left input to the compare param right the right input to the compare return the result possibly code null code protected Object visit Object data int result Object ancestor Object left Object right return new Diff Node I Diff Container data result I Typed Element ancestor I Typed Element left I Typed Element right  DiffNode DiffNode IDiffContainer ITypedElement ITypedElement ITypedElement
Performs a 2 way or 3 way compare of the given leaf elements and returns an integer describing the kind of difference private int compare boolean threeway Object ancestor Object left Object right int description NO CHANGE if threeway if ancestor null if left null if right null Assert is True false shouldn t happen else description RIGHT ADDITION else if right null description LEFT ADDITION else description CONFLICTING ADDITION if contents Equal left right description PSEUDO CONFLICT else if left null if right null description CONFLICTING DELETION PSEUDO CONFLICT else if contents Equal ancestor right description LEFT DELETION else description CONFLICTING CHANGE else if right null if contents Equal ancestor left description RIGHT DELETION else description CONFLICTING CHANGE else boolean ay contents Equal ancestor left boolean am contents Equal ancestor right if ay am else if ay am description RIGHT CHANGE else if ay am description LEFT CHANGE else description CONFLICTING CHANGE if contents Equal left right description PSEUDO CONFLICT else two way compare ignores ancestor if left null if right null Assert is True false shouldn t happen else description ADDITION else if right null description DELETION else if contents Equal left right description CHANGE return description  NO_CHANGE isTrue contentsEqual PSEUDO_CONFLICT PSEUDO_CONFLICT contentsEqual contentsEqual contentsEqual contentsEqual contentsEqual PSEUDO_CONFLICT isTrue contentsEqual
Performs a content compare on the two given inputs p The code Differencer code implementation returns code true code if both inputs implement code I Stream Content Accessor code and their byte contents is identical Subclasses may override to implement a different content compare on the given inputs p param input1 first input to contents compare param input2 second input to contents compare return code true code if content is equal protected boolean contents Equal Object input1 Object input2 if input1 input2 return true Input Stream is1 get Stream input1 Input Stream is2 get Stream input2 if is1 null is2 null no byte contents return true try if is1 null is2 null only one has contents return false while true int c1 is1 read int c2 is2 read if c1 1 c2 1 return true if c1 c2 break catch IO Exception ex Need Work finally if is1 null try is1 close catch IO Exception ex silently ignored if is2 null try is2 close catch IO Exception ex silently ignored return false  IStreamContentAccessor contentsEqual InputStream getStream InputStream getStream IOException NeedWork IOException IOException
Tries to return an Input Stream for the given object Returns code null code if the object not an I Stream Content Accessor or an error occured private Input Stream get Stream Object o if o instanceof I Stream Content Accessor try return I Stream Content Accessor o get Contents catch Core Exception ex Need Work return null  InputStream IStreamContentAccessor InputStream getStream IStreamContentAccessor IStreamContentAccessor getContents CoreException NeedWork
Returns the children of the given input or code null code if there are no children p The code Differencer code implementation checks whether the input implements the code I Structure Comparator code interface If yes it is used to return an array containing all children Otherwise code null code is returned Subclasses may override to implement a different strategy to enumerate children p param input the object for which to return children protected Object get Children Object input if input instanceof I Structure Comparator return I Structure Comparator input get Children return null  IStructureComparator getChildren IStructureComparator IStructureComparator getChildren
Called for every leaf or node compare to update progress information p The code Differencer code implementation shows the name of the input object as a subtask Subclasses may override p param progress Monitor the progress monitor for reporting progress param node the currently processed non code null code node protected void update Progress I Progress Monitor progress Monitor Object node if node instanceof I Typed Element String name I Typed Element node get Name String fmt Utilities get String Differencer progress Format NON NLS 1 String msg Message Format format fmt new String name progress Monitor sub Task msg progress Monitor worked 1  progressMonitor updateProgress IProgressMonitor progressMonitor ITypedElement ITypedElement getName getString progressFormat MessageFormat progressMonitor subTask progressMonitor

Creates a new code Diff Node code and initializes with the given values param parent under which the new container is added as a child or code null code param kind of difference defined in code Differencer code param ancestor the common ancestor input to a compare param left the left input to a compare param right the right input to a compare public Diff Node I Diff Container parent int kind I Typed Element ancestor I Typed Element left I Typed Element right this parent kind f Ancestor ancestor f Left left f Right right  DiffNode DiffNode IDiffContainer ITypedElement ITypedElement ITypedElement fAncestor fLeft fRight
Creates a new code Diff Node code with diff kind code Differencer CHANGE code and initializes with the given values param left the left input to a compare param right the right input to a compare public Diff Node I Typed Element left I Typed Element right this null Differencer CHANGE null left right  DiffNode DiffNode ITypedElement ITypedElement
Creates a new code Diff Node code and initializes with the given values param kind of difference defined in code Differencer code param ancestor the common ancestor input to a compare param left the left input to a compare param right the right input to a compare public Diff Node int kind I Typed Element ancestor I Typed Element left I Typed Element right this null kind ancestor left right  DiffNode DiffNode ITypedElement ITypedElement ITypedElement
Creates a new code Diff Node code with the given diff kind param kind of difference defined in code Differencer code public Diff Node int kind super null kind  DiffNode DiffNode
Creates a new code Diff Node code and initializes with the given values param parent under which the new container is added as a child or code null code param kind of difference defined in code Differencer code public Diff Node I Diff Container parent int kind super parent kind  DiffNode DiffNode IDiffContainer
Registers a listener for changes of this code I Compare Input code Has no effect if an identical listener is already registered param listener the listener to add public void add Compare Input Change Listener I Compare Input Change Listener listener if f Listener null f Listener new Listener List f Listener add listener  ICompareInput addCompareInputChangeListener ICompareInputChangeListener fListener fListener ListenerList fListener
Unregisters a code I Compare Input code listener Has no effect if listener is not registered param listener the listener to remove public void remove Compare Input Change Listener I Compare Input Change Listener listener if f Listener null f Listener remove listener if f Listener is Empty f Listener null  ICompareInput removeCompareInputChangeListener ICompareInputChangeListener fListener fListener fListener isEmpty fListener
Sends out notification that a change has occured on the code I Compare Input code protected void fire Change if f Listener null Object listeners f Listener get Listeners for int i 0 i listeners length i I Compare Input Change Listener listeners i compare Input Changed this  ICompareInput fireChange fListener fListener getListeners ICompareInputChangeListener compareInputChanged
Returns code true code if this node shouldn t automatically be expanded in a code Diff Tree Viewer code return code true code if node shouldn t automatically be expanded public boolean dont Expand return f Dont Expand  DiffTreeViewer dontExpand fDontExpand
Controls whether this node is not automatically expanded when displayed in a code Diff Tree Viewer code param dont Expand if code true code this node is not automatically expanded in code Diff Tree Viewer code public void set Dont Expand boolean dont Expand f Dont Expand dont Expand  DiffTreeViewer dontExpand DiffTreeViewer setDontExpand dontExpand fDontExpand dontExpand
Returns the first not code null code input of this node Method checks the three inputs in the order ancestor right left return the first not code null code input of this node public I Typed Element get Id if f Ancestor null return f Ancestor if f Right null return f Right return f Left  ITypedElement getId fAncestor fAncestor fRight fRight fLeft
Returns the non code null code name of the left or right side if they are identical Otherwise both names are concatenated separated with a slash p Subclasses may re implement to provide a different name for this node non Javadoc see I Typed Element get Name public String get Name String right null if f Right null right f Right get Name String left null if f Left null left f Left get Name if right null left null if f Ancestor null return f Ancestor get Name return Utilities get String Diff Node no Name NON NLS 1 if right null return left if left null return right if right equals left return right String s1 String s2 if f Swap Sides s1 left s2 right else s1 right s2 left String fmt Utilities get String Diff Node name Format NON NLS 1 return Message Format format fmt new String s1 s2  ITypedElement getName getName fRight fRight getName fLeft fLeft getName fAncestor fAncestor getName getString DiffNode noName fSwapSides getString DiffNode nameFormat MessageFormat
void swap Sides boolean swap f Swap Sides swap  swapSides fSwapSides
public Image get Image I Typed Element id get Id if id null return id get Image return null  getImage ITypedElement getId getImage
public String get Type I Typed Element id get Id if id null return id get Type return I Typed Element UNKNOWN TYPE  getType ITypedElement getId getType ITypedElement UNKNOWN_TYPE
Sets the ancestor input to the given value param ancestor the new value for the ancestor input since 3 0 public void set Ancestor I Typed Element ancestor f Ancestor ancestor  setAncestor ITypedElement fAncestor
see I Compare Input get Ancestor public I Typed Element get Ancestor return f Ancestor  ICompareInput getAncestor ITypedElement getAncestor fAncestor
Sets the left input to the given value param left the new value for the left input public void set Left I Typed Element left f Left left  setLeft ITypedElement fLeft
see I Compare Input get Left public I Typed Element get Left return f Left  ICompareInput getLeft ITypedElement getLeft fLeft
Sets the right input to the given value param right the new value for the right input public void set Right I Typed Element right f Right right  setRight ITypedElement fRight
see I Compare Input get Right public I Typed Element get Right return f Right  ICompareInput getRight ITypedElement getRight fRight
public void copy boolean left To Right System out println Diff Node copy left To Right I Diff Container pa get Parent if pa instanceof I Compare Input I Compare Input parent I Compare Input pa Object dst Parent left To Right parent get Right parent get Left if dst Parent instanceof I Editable Content I Typed Element dst left To Right get Right get Left I Typed Element src left To Right get Left get Right dst I Editable Content dst Parent replace dst src if left To Right set Right dst else set Left dst set Kind Differencer NO CHANGE fire Change  leftToRight DiffNode leftToRight IDiffContainer getParent ICompareInput ICompareInput ICompareInput dstParent leftToRight getRight getLeft dstParent IEditableContent ITypedElement leftToRight getRight getLeft ITypedElement leftToRight getLeft getRight IEditableContent dstParent leftToRight setRight setLeft setKind NO_CHANGE fireChange
public int hash Code String path get Path this 0 int hash Code 1 for int i 0 i path length i String s path i hash Code 31 hash Code s null s hash Code 0 return hash Code  hashCode getPath hashCode hashCode hashCode hashCode hashCode
public boolean equals Object other if other null get Class other get Class String path1 get Path this 0 String path2 get Path Diff Node other 0 if path1 length path2 length return false for int i 0 i path1 length i if path1 i equals path2 i return false return true return super equals other  getClass getClass getPath getPath DiffNode
private static String get Path I Typed Element el int level String path null if el instanceof I Diff Container I Diff Container parent I Diff Container el get Parent if parent instanceof I Typed Element path get Path parent level 1 if path null path new String level 1 path path length 1 level el get Name return path  getPath ITypedElement IDiffContainer IDiffContainer IDiffContainer getParent ITypedElement getPath getName

static class Diff Viewer Sorter extends Viewer Sorter public boolean is Sorter Property Object element Object property return false  DiffViewerSorter ViewerSorter isSorterProperty
public int category Object node if node instanceof Diff Node Object o Diff Node node get Id if o instanceof Document Range Node return Document Range Node o get Type Code return 0  DiffNode DiffNode getId DocumentRangeNode DocumentRangeNode getTypeCode
class Diff Viewer Content Provider implements I Tree Content Provider public void input Changed Viewer viewer Object old Input Object new Input  DiffViewerContentProvider ITreeContentProvider inputChanged oldInput newInput
public boolean is Deleted Object element return false  isDeleted
public void dispose input Changed Diff Tree Viewer this get Input null  inputChanged DiffTreeViewer getInput
public Object get Parent Object element if element instanceof I Diff Element return I Diff Element element get Parent return null  getParent IDiffElement IDiffElement getParent
public final boolean has Children Object element if element instanceof I Diff Container return I Diff Container element has Children return false  hasChildren IDiffContainer IDiffContainer hasChildren
public final Object get Children Object element if element instanceof I Diff Container return I Diff Container element get Children return new Object 0  getChildren IDiffContainer IDiffContainer getChildren
public Object get Elements Object element return get Children element  getElements getChildren
public String get Text Object element if element instanceof I Diff Element return I Diff Element element get Name return Utilities get String f Bundle default Label NON NLS 1  getText IDiffElement IDiffElement getName getString fBundle defaultLabel
public Image get Image Object element if element instanceof I Diff Element I Diff Element input I Diff Element element int kind input get Kind if f Left Is Local switch kind Differencer DIRECTION MASK case Differencer LEFT kind kind Differencer LEFT Differencer RIGHT break case Differencer RIGHT kind kind Differencer RIGHT Differencer LEFT break return f Compare Configuration get Image input get Image kind return null  getImage IDiffElement IDiffElement IDiffElement getKind fLeftIsLocal DIRECTION_MASK fCompareConfiguration getImage getImage
static class Filter Same extends Viewer Filter public boolean select Viewer viewer Object parent Element Object element if element instanceof I Diff Element return I Diff Element element get Kind Differencer PSEUDO CONFLICT 0 return true  FilterSame ViewerFilter parentElement IDiffElement IDiffElement getKind PSEUDO_CONFLICT
return true public boolean is Filter Property Object element Object property return false  isFilterProperty
Creates a new viewer for the given SWT tree control with the specified configuration param tree the tree control param configuration the configuration for this viewer public Diff Tree Viewer Tree tree Compare Configuration configuration super tree initialize configuration  DiffTreeViewer CompareConfiguration
Creates a new viewer under the given SWT parent and with the specified configuration param parent the SWT control under which to create the viewer param configuration the configuration for this viewer public Diff Tree Viewer Composite parent Compare Configuration configuration super new Tree parent SWT MULTI initialize configuration  DiffTreeViewer CompareConfiguration
I Navigatable nav new I Navigatable public boolean goto Difference boolean next Fix for http dev eclipse org bugs show bug cgi id 20106 return internal Navigate next true  INavigatable INavigatable gotoDifference show_bug internalNavigate
Fix for http dev eclipse org bugs show bug cgi id 20106 I Openable openable new I Openable public void open Selected internal Open  show_bug IOpenable IOpenable openSelected internalOpen
if f Compare Configuration null f Property Change Listener new I Property Change Listener public void property Change Property Change Event event Diff Tree Viewer this property Change event  fCompareConfiguration fPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent DiffTreeViewer propertyChange
add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event se update Actions  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateActions
new I Menu Listener public void menu About To Show I Menu Manager mm2 fill Context Menu mm2 if mm2 is Empty if f Empty Menu Action null f Empty Menu Action new Action Utilities get String f Bundle empty Menu Item NON NLS 1 f Empty Menu Action set Enabled false mm2 add f Empty Menu Action  IMenuListener menuAboutToShow IMenuManager fillContextMenu isEmpty fEmptyMenuAction fEmptyMenuAction getString fBundle emptyMenuItem fEmptyMenuAction setEnabled fEmptyMenuAction
private void initialize Compare Configuration configuration Control tree get Control I Navigatable nav new I Navigatable public boolean goto Difference boolean next Fix for http dev eclipse org bugs show bug cgi id 20106 return internal Navigate next true tree set Data I Navigatable NAVIGATOR PROPERTY nav Fix for http dev eclipse org bugs show bug cgi id 20106 I Openable openable new I Openable public void open Selected internal Open tree set Data I Openable OPENABLE PROPERTY openable f Left Is Local Utilities get Boolean configuration LEFT IS LOCAL false NON NLS 1 tree set Data CompareUI COMPARE VIEWER TITLE get Title Composite parent tree get Parent f Bundle Resource Bundle get Bundle org eclipse compare structuremergeviewer Diff Tree Viewer Resources NON NLS 1 register for notification with the Compare Configuration f Compare Configuration configuration if f Compare Configuration null f Property Change Listener new I Property Change Listener public void property Change Property Change Event event Diff Tree Viewer this property Change event f Compare Configuration add Property Change Listener f Property Change Listener set Content Provider new Diff Viewer Content Provider set Label Provider new Diff Viewer Label Provider add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event se update Actions set Sorter new Diff Viewer Sorter Tool Bar Manager tbm Compare Viewer Pane get Tool Bar Manager parent if tbm null tbm remove All tbm add new Separator merge NON NLS 1 tbm add new Separator modes NON NLS 1 tbm add new Separator navigation NON NLS 1 create Tool Items tbm update Actions tbm update true Menu Manager mm new Menu Manager mm set Remove All When Shown true mm add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mm2 fill Context Menu mm2 if mm2 is Empty if f Empty Menu Action null f Empty Menu Action new Action Utilities get String f Bundle empty Menu Item NON NLS 1 f Empty Menu Action set Enabled false mm2 add f Empty Menu Action tree set Menu mm create Context Menu tree  CompareConfiguration getControl INavigatable INavigatable gotoDifference show_bug internalNavigate setData INavigatable NAVIGATOR_PROPERTY show_bug IOpenable IOpenable openSelected internalOpen setData IOpenable OPENABLE_PROPERTY fLeftIsLocal getBoolean LEFT_IS_LOCAL setData COMPARE_VIEWER_TITLE getTitle getParent fBundle ResourceBundle getBundle DiffTreeViewerResources CompareConfiguration fCompareConfiguration fCompareConfiguration fPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent DiffTreeViewer propertyChange fCompareConfiguration addPropertyChangeListener fPropertyChangeListener setContentProvider DiffViewerContentProvider setLabelProvider DiffViewerLabelProvider addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateActions setSorter DiffViewerSorter ToolBarManager CompareViewerPane getToolBarManager removeAll createToolItems updateActions MenuManager MenuManager setRemoveAllWhenShown addMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu isEmpty fEmptyMenuAction fEmptyMenuAction getString fBundle emptyMenuItem fEmptyMenuAction setEnabled fEmptyMenuAction setMenu createContextMenu
Returns the viewer s name return the viewer s name public String get Title String title Utilities get String f Bundle title null NON NLS 1 if title null title Utilities get String Diff Tree Viewer title NON NLS 1 return title  getTitle getString fBundle getString DiffTreeViewer
Returns the resource bundle return the viewer s resource bundle protected Resource Bundle get Bundle return f Bundle  ResourceBundle getBundle fBundle
Returns the compare configuration of this viewer return the compare configuration of this viewer public Compare Configuration get Compare Configuration return f Compare Configuration  CompareConfiguration getCompareConfiguration fCompareConfiguration
Called on the viewer disposal Unregisters from the compare configuration Clients may extend if they have to do additional cleanup protected void handle Dispose Dispose Event event if f Compare Configuration null if f Property Change Listener null f Compare Configuration remove Property Change Listener f Property Change Listener f Compare Configuration null f Property Change Listener null super handle Dispose event  handleDispose DisposeEvent fCompareConfiguration fPropertyChangeListener fCompareConfiguration removePropertyChangeListener fPropertyChangeListener fCompareConfiguration fPropertyChangeListener handleDispose
Tracks property changes of the configuration object Clients may extend to track their own property changes protected void property Change Property Change Event event  propertyChange PropertyChangeEvent
protected void input Changed Object in Object old Input super input Changed in old Input if in old Input initial Selection update Actions  inputChanged oldInput inputChanged oldInput oldInput initialSelection updateActions
This hook method is called from within code input Changed code after a new input has been set but before any controls are updated This default implementation calls code navigate true code to select and expand the first leaf node Clients can override this method and are free to decide whether they want to call the inherited method since 2 0 protected void initial Selection navigate true  inputChanged initialSelection
Overridden to avoid expanding code Diff Node code s that shouldn t expand protected void internal Expand To Level Widget node int level Object data node get Data if dont Expand data return super internal Expand To Level node level  DiffNode internalExpandToLevel getData dontExpand internalExpandToLevel
This hook method is called from within code internal Expand To Level code to control whether a given model node should be expanded or not This default implementation checks whether the object is a code Diff Node code and calls code dont Expand code on it Clients can override this method and are free to decide whether they want to call the inherited method param o the model object to be expanded return code false code if a node should be expanded code true code to prevent expanding since 2 0 protected boolean dont Expand Object o return o instanceof Diff Node Diff Node o dont Expand  internalExpandToLevel DiffNode dontExpand dontExpand DiffNode DiffNode dontExpand
This factory method is called after the viewer s controls have been created It installs four actions in the given code Tool Bar Manager code Two actions allow for copying one side of a code Diff Node code to the other side Two other actions are for navigating from one node to the next previous p Clients can override this method and are free to decide whether they want to call the inherited method param toolbar Manager the toolbar manager for which to add the actions protected void create Tool Items Tool Bar Manager toolbar Manager f Copy Left To Right Action new Action public void run copy Selected true Utilities init Action f Copy Left To Right Action f Bundle action Take Left toolbar Manager append To Group merge f Copy Left To Right Action f Copy Right To Left Action new Action public void run copy Selected false Utilities init Action f Copy Right To Left Action f Bundle action Take Right toolbar Manager append To Group merge f Copy Right To Left Action f Next Action new Action public void run navigate true Utilities init Action f Next Action f Bundle action Next Diff NON NLS 1 toolbar Manager append To Group navigation f Next Action NON NLS 1 f Previous Action new Action public void run navigate false Utilities init Action f Previous Action f Bundle action Prev Diff NON NLS 1 toolbar Manager append To Group navigation f Previous Action NON NLS 1  ToolBarManager DiffNode toolbarManager createToolItems ToolBarManager toolbarManager fCopyLeftToRightAction copySelected initAction fCopyLeftToRightAction fBundle TakeLeft toolbarManager appendToGroup fCopyLeftToRightAction fCopyRightToLeftAction copySelected initAction fCopyRightToLeftAction fBundle TakeRight toolbarManager appendToGroup fCopyRightToLeftAction fNextAction initAction fNextAction fBundle NextDiff toolbarManager appendToGroup fNextAction fPreviousAction initAction fPreviousAction fBundle PrevDiff toolbarManager appendToGroup fPreviousAction
if f Expand All Action null f Expand All Action new Action public void run expand Selection  fExpandAllAction fExpandAllAction expandSelection
This method is called to add actions to the viewer s context menu It installs actions for expanding tree nodes copying one side of a code Diff Node code to the other side Clients can override this method and are free to decide whether they want to call the inherited method param manager the menu manager for which to add the actions protected void fill Context Menu I Menu Manager manager if f Expand All Action null f Expand All Action new Action public void run expand Selection Utilities init Action f Expand All Action f Bundle action Expand All NON NLS 1 boolean enable false I Selection selection get Selection if selection instanceof I Structured Selection Iterator elements I Structured Selection selection iterator while elements has Next Object element elements next if element instanceof I Diff Container if I Diff Container element has Children enable true break f Expand All Action set Enabled enable manager add f Expand All Action if f Copy Left To Right Action null manager add f Copy Left To Right Action if f Copy Right To Left Action null manager add f Copy Right To Left Action  DiffNode fillContextMenu IMenuManager fExpandAllAction fExpandAllAction expandSelection initAction fExpandAllAction fBundle ExpandAll ISelection getSelection IStructuredSelection IStructuredSelection hasNext IDiffContainer IDiffContainer hasChildren fExpandAllAction setEnabled fExpandAllAction fCopyLeftToRightAction fCopyLeftToRightAction fCopyRightToLeftAction fCopyRightToLeftAction
Expands to infinity all items in the selection since 2 0 protected void expand Selection I Selection selection get Selection if selection instanceof I Structured Selection Iterator elements I Structured Selection selection iterator while elements has Next Object next elements next expand To Level next ALL LEVELS  expandSelection ISelection getSelection IStructuredSelection IStructuredSelection hasNext expandToLevel ALL_LEVELS
Copies one side of all code Diff Node code s in the current selection to the other side Called from the internal actions for copying the sides of a code Diff Node code Clients may override param left To Right if code true code the left side is copied to the right side If code false code the right side is copied to the left side protected void copy Selected boolean left To Right I Selection selection get Selection if selection instanceof I Structured Selection Iterator e I Structured Selection selection iterator while e has Next Object element e next if element instanceof I Compare Input copy One I Compare Input element left To Right  DiffNode DiffNode leftToRight copySelected leftToRight ISelection getSelection IStructuredSelection IStructuredSelection hasNext ICompareInput copyOne ICompareInput leftToRight
Called to copy one side of the given node to the other This default implementation delegates the call to code I Compare Input copy code Clients may override param left To Right if code true code the left side is copied to the right side If code false code the right side is copied to the left side protected void copy One I Compare Input node boolean left To Right node copy left To Right update node s image update new Object node null  ICompareInput leftToRight copyOne ICompareInput leftToRight leftToRight
Selects the next or previous node of the current selection If there is no current selection the first last node in the tree is selected Wraps around at end or beginning Clients may override param next if code true code the next node is selected otherwise the previous node protected void navigate boolean next Fix for http dev eclipse org bugs show bug cgi id 20106 internal Navigate next false  show_bug internalNavigate
Selects the next or previous node of the current selection If there is no current selection the first last node in the tree is selected Wraps around at end or beginning Clients may override param next if code true code the next node is selected otherwise the previous node return code true code if at end or beginning private boolean internal Navigate boolean next boolean fire Open Control c get Control if c instanceof Tree return false Tree tree Tree c Tree Item item null Tree Item children tree get Selection if children null children length 0 item children 0 if item null children tree get Items if children null children length 0 item children 0 if item null item get Item Count 0 internal Set Selection item fire Open Fix for http dev eclipse org bugs show bug cgi id 20106 return false while true item find Next Prev item next if item null break if item get Item Count 0 break if item null internal Set Selection item fire Open Fix for http dev eclipse org bugs show bug cgi id 20106 return false return true  internalNavigate fireOpen getControl TreeItem TreeItem getSelection getItems getItemCount internalSetSelection fireOpen show_bug findNextPrev getItemCount internalSetSelection fireOpen show_bug
private Tree Item find Next Prev Tree Item item boolean next if item null return null Tree Item children null if next Tree Item parent item get Parent Item if parent null children parent get Items else children item get Parent get Items if children null children length 0 goto previous child int index 0 for index children length index if children index item break if index 0 item children index 1 while true create Children item int n item get Item Count if n 0 break item set Expanded true item item get Items n 1 previous return item go up return parent else item set Expanded true create Children item if item get Item Count 0 has children go down children item get Items return children 0 while item null children null Tree Item parent item get Parent Item if parent null children parent get Items else children item get Parent get Items if children null children length 0 goto next child int index 0 for index children length index if children index item break if index children length 1 next return children index 1 go up item parent return item  TreeItem findNextPrev TreeItem TreeItem TreeItem getParentItem getItems getParent getItems createChildren getItemCount setExpanded getItems setExpanded createChildren getItemCount getItems TreeItem getParentItem getItems getParent getItems
private void internal Set Selection Tree Item ti boolean fire Open if ti null Object data ti get Data if data null Fix for http dev eclipse org bugs show bug cgi id 20106 I Selection selection new Structured Selection data set Selection selection true I Selection current Selection get Selection if fire Open current Selection null selection equals current Selection fire Open new Open Event this selection  internalSetSelection TreeItem fireOpen getData show_bug ISelection StructuredSelection setSelection ISelection currentSelection getSelection fireOpen currentSelection currentSelection fireOpen OpenEvent
private final boolean is Editable Object element boolean left if element instanceof I Compare Input I Compare Input diff I Compare Input element Object side left diff get Left diff get Right if side null diff instanceof I Diff Element I Diff Container container I Diff Element diff get Parent if container instanceof I Compare Input I Compare Input parent I Compare Input container side left parent get Left parent get Right if side instanceof I Editable Content return I Editable Content side is Editable return false  isEditable ICompareInput ICompareInput ICompareInput getLeft getRight IDiffElement IDiffContainer IDiffElement getParent ICompareInput ICompareInput ICompareInput getLeft getRight IEditableContent IEditableContent isEditable
private void update Actions int left To Right 0 int right To Left 0 I Selection selection get Selection if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection Iterator e ss iterator while e has Next Object element e next if element instanceof I Compare Input if is Editable element false left To Right if is Editable element true right To Left if left To Right 0 right To Left 0 break if f Expand All Action null f Expand All Action set Enabled selection is Empty if f Copy Left To Right Action null f Copy Left To Right Action set Enabled left To Right 0 if f Copy Right To Left Action null f Copy Right To Left Action set Enabled right To Left 0  updateActions leftToRight rightToLeft ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection hasNext ICompareInput isEditable leftToRight isEditable rightToLeft leftToRight rightToLeft fExpandAllAction fExpandAllAction setEnabled isEmpty fCopyLeftToRightAction fCopyLeftToRightAction setEnabled leftToRight fCopyRightToLeftAction fCopyRightToLeftAction setEnabled rightToLeft
private void internal Open I Selection selection get Selection if selection null selection is Empty fire Open new Open Event this selection  internalOpen ISelection getSelection isEmpty fireOpen OpenEvent

Creates a new code Document Range Node code for the given range within the specified document The code type Code code is uninterpreted client data The ID is used when comparing two nodes with each other i e the differencing engine performs a content compare on two nodes if their I Ds are equal param type Code a type code for this node param id an identifier for this node param document document on which this node is based on param start start position of range within document param length length of range public Document Range Node int type Code String id I Document document int start int length f Type Code type Code fID id f Base Document document f Base Document add Position Category RANGE CATEGORY f Range new Position start length if POS UPDATE try document add Position RANGE CATEGORY f Range catch Bad Position Category Exception ex silently ignored catch Bad Location Exception ex silently ignored  DocumentRangeNode typeCode IDs typeCode DocumentRangeNode typeCode IDocument fTypeCode typeCode fBaseDocument fBaseDocument addPositionCategory RANGE_CATEGORY fRange POS_UPDATE addPosition RANGE_CATEGORY fRange BadPositionCategoryException BadLocationException
see I Document Range get Document public I Document get Document return f Base Document  IDocumentRange getDocument IDocument getDocument fBaseDocument
see I Document Range get Range public Position get Range return f Range  IDocumentRange getRange getRange fRange
Returns the type code of this node The type code is uninterpreted client data which can be set in the constructor return the type code of this node public int get Type Code return f Type Code  getTypeCode fTypeCode
Returns this node s id It is used in code equals code and code hashcode code return the node s id public String get Id return fID  getId
Sets this node s id It is used in code equals code and code hashcode code param id the new id for this node public void set Id String id fID id  setId
Adds the given node as a child param node the node to add as a child public void add Child Document Range Node node if f Children null f Children new Array List f Children add node  addChild DocumentRangeNode fChildren fChildren ArrayList fChildren
public Object get Children if f Children null return f Children to Array return new Object 0  getChildren fChildren fChildren toArray
Sets the length of the range of this node param length the length of the range public void set Length int length get Range set Length length  setLength getRange setLength
Sets a position within the document range that can be used to legally insert text without breaking the syntax of the document p E g when parsing a Java document the append position of a code Document Range Node code representating a Java class could be the character position just before the closing bracket Inserting the text of a new method there would not disturb the syntax of the class param pos the character position within the underlying document where text can be legally inserted public void set Append Position int pos if POS UPDATE f Base Document remove Position f Append Position try Position p new Position pos f Base Document add Position RANGE CATEGORY p f Append Position p catch Bad Position Category Exception ex silently ignored catch Bad Location Exception ex silently ignored else f Append Position new Position pos  DocumentRangeNode setAppendPosition POS_UPDATE fBaseDocument removePosition fAppendPosition fBaseDocument addPosition RANGE_CATEGORY fAppendPosition BadPositionCategoryException BadLocationException fAppendPosition
Returns the position that has been set with code set Append Position code If code set Append Position code hasn t been called the position after the last character of this range is returned return a position where text can be legally inserted public Position get Append Position if f Append Position null if POS UPDATE try Position p new Position f Base Document get Length f Base Document add Position RANGE CATEGORY p f Append Position p catch Bad Position Category Exception ex silently ignored catch Bad Location Exception ex silently ignored else f Append Position new Position f Base Document get Length return f Append Position  setAppendPosition setAppendPosition getAppendPosition fAppendPosition POS_UPDATE fBaseDocument getLength fBaseDocument addPosition RANGE_CATEGORY fAppendPosition BadPositionCategoryException BadLocationException fAppendPosition fBaseDocument getLength fAppendPosition
Implementation based on code getID code public boolean equals Object other if other null other get Class get Class Document Range Node tn Document Range Node other return f Type Code tn f Type Code fID equals tn fID return super equals other  getClass getClass DocumentRangeNode DocumentRangeNode fTypeCode fTypeCode
Implementation based on code getID code public int hash Code return fID hash Code  hashCode hashCode
Find corresponding position private Position find Corresponding Position Document Range Node other Parent Document Range Node child we try to find a predecessor of left Node which exists on the right side if child null f Children null int ix other Parent f Children index Of child if ix 0 for int i ix 1 i 0 i Document Range Node c1 Document Range Node other Parent f Children get i int i2 f Children index Of c1 if i2 0 Document Range Node c Document Range Node f Children get i2 System out println found corresponding i2 c Position p c f Range try Position po new Position p get Offset p get Length 1 0 c f Base Document add Position RANGE CATEGORY po return po catch Bad Location Exception ex break for int i ix i other Parent f Children size i Document Range Node c1 Document Range Node other Parent f Children get i int i2 f Children index Of c1 if i2 0 Document Range Node c Document Range Node f Children get i2 System out println found corresponding i2 c Position p c f Range try Position po new Position p get Offset 0 c f Base Document add Position RANGE CATEGORY po return po catch Bad Location Exception ex break return get Append Position  findCorrespondingPosition DocumentRangeNode otherParent DocumentRangeNode fChildren otherParent fChildren indexOf DocumentRangeNode DocumentRangeNode otherParent fChildren fChildren indexOf DocumentRangeNode DocumentRangeNode fChildren fRange getOffset getLength fBaseDocument addPosition RANGE_CATEGORY BadLocationException otherParent fChildren DocumentRangeNode DocumentRangeNode otherParent fChildren fChildren indexOf DocumentRangeNode DocumentRangeNode fChildren fRange getOffset fBaseDocument addPosition RANGE_CATEGORY BadLocationException getAppendPosition
private void add String s Document Range Node parent Document Range Node child Position p find Corresponding Position parent child if p null try f Base Document replace p get Offset p get Length s catch Bad Location Exception ex silently ignored  DocumentRangeNode DocumentRangeNode findCorrespondingPosition fBaseDocument getOffset getLength BadLocationException
public Input Stream get Contents String s try s f Base Document get f Range get Offset f Range get Length catch Bad Location Exception ex s NON NLS 1 return new Byte Array Input Stream Utilities get Bytes s UTF 16  InputStream getContents fBaseDocument fRange getOffset fRange getLength BadLocationException ByteArrayInputStream getBytes UTF_16
see I Editable Content is Editable public boolean is Editable return true  IEditableContent isEditable isEditable
public I Typed Element replace I Typed Element child I Typed Element other Document Range Node src null String src Contents NON NLS 1 if other null src Document Range Node child if other instanceof I Stream Content Accessor try src Contents Utilities read String I Stream Content Accessor other catch Core Exception ex Need Work if child null no destination we have to add the contents into the parent add src Contents null src return child  ITypedElement ITypedElement ITypedElement DocumentRangeNode srcContents DocumentRangeNode IStreamContentAccessor srcContents readString IStreamContentAccessor CoreException NeedWork srcContents
see I Editable Content set Content public void set Content byte content  IEditableContent setContent setContent
see org eclipse compare I Stream Content Accessor get Encoding public String get Charset return UTF 16  IStreamContentAccessor getEncoding getCharset UTF_16

Returns name of input This name is displayed when this input is shown in a viewer In many cases this name is the name of one of the non code null code sides or a combination thereof return name of input 
Returns an image representing this input This image is typically displayed when this input is shown in a viewer In many cases this image is the image of one of the non code null code sides return image representing this input or code null code if no icon should be shown 
Returns the kind of difference between the three sides ancestor left and right This field is only meaningful if the code I Compare Input code is the result of another compare In this case it is used together with code get Image code to compose a icon which reflects the kind of difference between the two or three elements return kind of difference see code Differencer code  ICompareInput getImage
Returns the ancestor side of this input Returns code null code if this input has no ancestor or in the two way compare case return the ancestor of this input or code null code 
Returns the left side of this input Returns code null code if there is no left side deletion or addition return the left side of this input or code null code 
Returns the right side of this input Returns code null code if there is no right side deletion or addition return the right side of this input or code null code 
Registers the given listener for notification If the identical listener is already registered the method has no effect param listener the listener to register for changes of this input 
Unregisters the given listener If the identical listener is not registered the method has no effect param listener the listener to unregister 
Copy one side source to the other side destination depending on the value of code left To Right code This method is called from a merge viewer if a corresponding action take left or take right has been pressed p The implementation should handle the following cases UL LI if the source side is code null code the destination must be deleted LI if the destination is code null code the destination must be created and filled with the contents from the source LI if both sides are non code null code the contents of source must be copied to destination UL In addition the implementation should send out notification to the registered code I Compare Input Change Listener code param left To Right if code true code the left side is copied to the right side If code false code the right side is copied to the left side  leftToRight ICompareInputChangeListener leftToRight

Called whenever the value not the content of one or more of the three sides of a code I Compare Input code has changed param source the code I Compare Input code that has changed  ICompareInput ICompareInput

Returns whether this container has at least one child In some cases this methods avoids having to call the potential more costly code get Children code method return code true code if this container has at least one child  getChildren
Returns the children of this container If this container has no children an empty array is returned not code null code return the children of this container as an array 
Adds the given child to this container If the child is already contained in this container this method has no effect param child the child to be added to this container 
Removes the given child from this container If the container becomes empty it is removed from its container If the child is not contained in this container this method has no effect param child the child to be removed from this container 

Returns the kind of difference as defined in code Differencer code return the kind of difference as defined in code Differencer code 
Returns the parent of this element If the object is the root of a hierarchy code null code is returned return the parent of this element or code null code if the element has no parent 
Sets the parent of this element param parent the new parent of this element or code null code if this element is to have no parent 

Returns an iterator for all children of this object or code null code if there are no children return an array with all children of this object or an empty array if there are no children 
Returns whether some other object is equal to this one with respect to a structural comparison For example when comparing Java class methods code equals code would return code true code if two methods have the same signature the argument names and the method body might differ param other the reference object with which to compare return code true code if this object is the same as the other argument code false code otherwise see java lang Object equals 

Returns a descriptive name which can be used in the UI of the code Structure Diff Viewer code return a descriptive name for this code I Structure Creator code  StructureDiffViewer IStructureCreator
Creates a tree structure consisting of code I Structure Comparator code s from the given object and returns its root object Implementing this method typically involves parsing the input object In case of an error e g a parsing error the value code null code is returned param input the object from which to create the tree of code I Structure Comparator code return the root node of the structure or code null code in case of error  IStructureComparator IStructureComparator
Creates the single node specified by path from the given input object In case of an error e g a parsing error the value code null code is returned This method is similar to code get Structure code but in contrast to code get Structure code only a single node without any children must be returned This method is used in the code Replace With Edition Dialog code to locate a sub element e g a method within an input object e g a file containing source code p One not optimized approach to implement this method is calling code get Structure input code to build the full tree and then finding that node within the tree that is specified by code path code p The syntax of code path code is not specified because it is treated by the compare subsystem as an opaque entity and is not further interpreted Clients using this functionality will pass a value of code path code to the code select Edition code method of code Replace With Edition Dialog code and will receive this value unchanged as an argument to code locate code param path specifies a sub object within the input object param input the object from which to create the code I Structure Comparator code return the single node specified by code path code or code null code see org eclipse compare Edition Selection Dialog select Edition  getStructure getStructure ReplaceWithEditionDialog getStructure selectEdition ReplaceWithEditionDialog IStructureComparator EditionSelectionDialog selectEdition
Returns the contents of the given node as a string for the purpose of performing a content comparison only that is the string will not be visible in the UI If code ignore Whitespace code is code true code all character sequences considered whitespace should be removed from the returned string param node the node for which to return a string representation param ignore Whitespace if code true code the returned string should not contain whitespace return the string contents of the given node  ignoreWhitespace ignoreWhitespace
Called whenever a copy operation has been performed on a tree node param node the node for which to save the new content param input the object from which the structure tree was created in code get Structure code  getStructure

Creates a new viewer for the given SWT tree control with the specified configuration param tree the tree control param configuration the configuration for this viewer public Structure Diff Viewer Tree tree Compare Configuration configuration super tree configuration Composite c tree get Parent if c instanceof Compare Viewer Switching Pane f Parent Compare Viewer Switching Pane c initialize  StructureDiffViewer CompareConfiguration getParent CompareViewerSwitchingPane fParent CompareViewerSwitchingPane
Creates a new viewer under the given SWT parent with the specified configuration param parent the SWT control under which to create the viewer param configuration the configuration for this viewer public Structure Diff Viewer Composite parent Compare Configuration configuration super parent configuration if parent instanceof Compare Viewer Switching Pane f Parent Compare Viewer Switching Pane parent initialize  StructureDiffViewer CompareConfiguration CompareViewerSwitchingPane fParent CompareViewerSwitchingPane
f Content Changed Listener new I Content Change Listener public void content Changed I Content Change Notifier changed Structure Diff Viewer this content Changed changed  fContentChangedListener IContentChangeListener contentChanged IContentChangeNotifier StructureDiffViewer contentChanged
new I Compare Input Change Listener public void compare Input Changed I Compare Input input Structure Diff Viewer this compare Input Changed input  ICompareInputChangeListener compareInputChanged ICompareInput StructureDiffViewer compareInputChanged
private void initialize set Auto Expand Level 3 f Content Changed Listener new I Content Change Listener public void content Changed I Content Change Notifier changed Structure Diff Viewer this content Changed changed new I Compare Input Change Listener public void compare Input Changed I Compare Input input Structure Diff Viewer this compare Input Changed input  setAutoExpandLevel fContentChangedListener IContentChangeListener contentChanged IContentChangeNotifier StructureDiffViewer contentChanged ICompareInputChangeListener compareInputChanged ICompareInput StructureDiffViewer compareInputChanged
Configures the code Structure Diff Viewer code with a structure creator The structure creator is used to create a hierarchical structure for each side of the viewer s input element of type code I Compare Input code param structure Creator the new structure creator public void set Structure Creator I Structure Creator structure Creator if f Structure Creator structure Creator f Structure Creator structure Creator Control tree get Control if tree null tree is Disposed tree set Data CompareUI COMPARE VIEWER TITLE get Title  StructureDiffViewer ICompareInput structureCreator setStructureCreator IStructureCreator structureCreator fStructureCreator structureCreator fStructureCreator structureCreator getControl isDisposed setData COMPARE_VIEWER_TITLE getTitle
Returns the structure creator or code null code if no structure creator has been set with code set Structure Creator code return the structure creator or code null code public I Structure Creator get Structure Creator return f Structure Creator  setStructureCreator IStructureCreator getStructureCreator fStructureCreator
Reimplemented to get the descriptive title for this viewer from the code I Structure Creator code public String get Title if f Structure Creator null return f Structure Creator get Name return super get Title  IStructureCreator getTitle fStructureCreator fStructureCreator getName getTitle
Overridden because the input of this viewer is not identical to the root of the tree The tree s root is a I Diff Container that was returned from the method code diff code return the root of the diff tree produced by method code diff code protected Object get Root return f Root  IDiffContainer getRoot fRoot
Overridden to create the comparable structures from the input object and to feed them through the differencing engine Note for this viewer the value from code get Input code is not identical to code get Root code protected void input Changed Object input Object old Input if input instanceof I Compare Input compare Input Changed I Compare Input input if input old Input initial Selection  getInput getRoot inputChanged oldInput ICompareInput compareInputChanged ICompareInput oldInput initialSelection
protected void initial Selection expand To Level 2  initialSelection expandToLevel
protected void handle Dispose Dispose Event event compare Input Changed null f Content Changed Listener null super handle Dispose event  handleDispose DisposeEvent compareInputChanged fContentChangedListener handleDispose
Recreates the comparable structures for the input sides protected void compare Input Changed I Compare Input input I Typed Element t null boolean changed false if input null t input get Ancestor f Three Way t null if t f Ancestor Input if f Ancestor Input instanceof I Content Change Notifier I Content Change Notifier f Ancestor Input remove Content Change Listener f Content Changed Listener f Ancestor Input t if f Ancestor Input null f Ancestor Structure f Structure Creator get Structure f Ancestor Input changed true else f Ancestor Structure null if f Ancestor Input instanceof I Content Change Notifier I Content Change Notifier f Ancestor Input add Content Change Listener f Content Changed Listener if input null t input get Left if t f Left Input if f Left Input instanceof I Content Change Notifier I Content Change Notifier f Left Input remove Content Change Listener f Content Changed Listener f Left Input t if f Left Input null f Left Structure f Structure Creator get Structure f Left Input changed true else f Left Structure null if f Left Input instanceof I Content Change Notifier I Content Change Notifier f Left Input add Content Change Listener f Content Changed Listener if input null t input get Right if t f Right Input if f Right Input instanceof I Content Change Notifier I Content Change Notifier f Right Input remove Content Change Listener f Content Changed Listener f Right Input t if f Right Input null f Right Structure f Structure Creator get Structure f Right Input changed true else f Right Structure null if f Right Input instanceof I Content Change Notifier I Content Change Notifier f Right Input add Content Change Listener f Content Changed Listener if changed diff  compareInputChanged ICompareInput ITypedElement getAncestor fThreeWay fAncestorInput fAncestorInput IContentChangeNotifier IContentChangeNotifier fAncestorInput removeContentChangeListener fContentChangedListener fAncestorInput fAncestorInput fAncestorStructure fStructureCreator getStructure fAncestorInput fAncestorStructure fAncestorInput IContentChangeNotifier IContentChangeNotifier fAncestorInput addContentChangeListener fContentChangedListener getLeft fLeftInput fLeftInput IContentChangeNotifier IContentChangeNotifier fLeftInput removeContentChangeListener fContentChangedListener fLeftInput fLeftInput fLeftStructure fStructureCreator getStructure fLeftInput fLeftStructure fLeftInput IContentChangeNotifier IContentChangeNotifier fLeftInput addContentChangeListener fContentChangedListener getRight fRightInput fRightInput IContentChangeNotifier IContentChangeNotifier fRightInput removeContentChangeListener fContentChangedListener fRightInput fRightInput fRightStructure fStructureCreator getStructure fRightInput fRightStructure fRightInput IContentChangeNotifier IContentChangeNotifier fRightInput addContentChangeListener fContentChangedListener
Calls code diff code whenever the byte contents changes protected void content Changed I Content Change Notifier changed if f Structure Creator null return if changed null if changed f Ancestor Input f Ancestor Structure f Structure Creator get Structure f Ancestor Input else if changed f Left Input f Left Structure f Structure Creator get Structure f Left Input else if changed f Right Input f Right Structure f Structure Creator get Structure f Right Input else return else f Ancestor Structure f Structure Creator get Structure f Ancestor Input f Left Structure f Structure Creator get Structure f Left Input f Right Structure f Structure Creator get Structure f Right Input diff  contentChanged IContentChangeNotifier fStructureCreator fAncestorInput fAncestorStructure fStructureCreator getStructure fAncestorInput fLeftInput fLeftStructure fStructureCreator getStructure fLeftInput fRightInput fRightStructure fStructureCreator getStructure fRightInput fAncestorStructure fStructureCreator getStructure fAncestorInput fLeftStructure fStructureCreator getStructure fLeftInput fRightStructure fStructureCreator getStructure fRightInput
This method is called from within code diff code before the difference tree is being built Clients may override this method to perform their own pre processing This default implementation does nothing param ancestor the ancestor input to the differencing operation param left the left input to the differencing operation param right the right input to the differencing operation since 2 0 protected void pre Diff Hook I Structure Comparator ancestor I Structure Comparator left I Structure Comparator right we do nothing here  preDiffHook IStructureComparator IStructureComparator IStructureComparator
if f Differencer null f Differencer new Differencer protected boolean contents Equal Object o1 Object o2 return Structure Diff Viewer this contents Equal o1 o2  fDifferencer fDifferencer contentsEqual StructureDiffViewer contentsEqual
protected Object visit Object data int result Object ancestor Object left Object right Object o super visit data result ancestor left right if f Left Is Local o instanceof Diff Node Diff Node o swap Sides f Left Is Local return o  fLeftIsLocal DiffNode DiffNode swapSides fLeftIsLocal
Runs the difference engine and refreshes the tree protected void diff pre Diff Hook f Ancestor Structure f Left Structure f Right Structure String message null if f Three Way f Ancestor Structure null f Left Structure null f Right Structure null could not get structure of one or more of the legs f Root null message Compare Messages get String Structure Diff Viewer Structure Error NON NLS 1 else calculate difference of the two or three structures if f Differencer null f Differencer new Differencer protected boolean contents Equal Object o1 Object o2 return Structure Diff Viewer this contents Equal o1 o2 protected Object visit Object data int result Object ancestor Object left Object right Object o super visit data result ancestor left right if f Left Is Local o instanceof Diff Node Diff Node o swap Sides f Left Is Local return o f Root I Diff Container f Differencer find Differences f Three Way null null f Ancestor Structure f Left Structure f Right Structure if f Root null f Root get Children length 0 message Compare Messages get String Structure Diff Viewer No Structural Differences NON NLS 1 else post Diff Hook f Differencer f Root if f Parent null f Parent set Title Argument message refresh get Root  preDiffHook fAncestorStructure fLeftStructure fRightStructure fThreeWay fAncestorStructure fLeftStructure fRightStructure fRoot CompareMessages getString StructureDiffViewer StructureError fDifferencer fDifferencer contentsEqual StructureDiffViewer contentsEqual fLeftIsLocal DiffNode DiffNode swapSides fLeftIsLocal fRoot IDiffContainer fDifferencer findDifferences fThreeWay fAncestorStructure fLeftStructure fRightStructure fRoot fRoot getChildren CompareMessages getString StructureDiffViewer NoStructuralDifferences postDiffHook fDifferencer fRoot fParent fParent setTitleArgument getRoot
This method is called from within code diff code after the difference tree has been built Clients may override this method to perform their own post processing This default implementation does nothing param differencer the differencer used to perform the differencing param root the non code null code root node of the difference tree since 2 0 protected void post Diff Hook Differencer differencer I Diff Container root we do nothing here  postDiffHook IDiffContainer
Performs a byte compare on the given objects Called from the difference engine Returns code null code if no structure creator has been set private boolean contents Equal Object o1 Object o2 if f Structure Creator null boolean ignore White Space Utilities get Boolean get Compare Configuration Compare Configuration IGNORE WHITESPACE false String s1 f Structure Creator get Contents o1 ignore White Space String s2 f Structure Creator get Contents o2 ignore White Space if s1 null s2 null return false return s1 equals s2 return false  contentsEqual fStructureCreator ignoreWhiteSpace getBoolean getCompareConfiguration CompareConfiguration IGNORE_WHITESPACE fStructureCreator getContents ignoreWhiteSpace fStructureCreator getContents ignoreWhiteSpace
Tracks property changes of the configuration object Clients may override to track their own property changes In this case they must call the inherited method protected void property Change Property Change Event event String key event get Property if key equals Compare Configuration IGNORE WHITESPACE diff else super property Change event  propertyChange PropertyChangeEvent getProperty CompareConfiguration IGNORE_WHITESPACE propertyChange
Overridden to call the code save code method on the structure creator after nodes have been copied from one side to the other side of an input object param left To Right if code true code the left side is copied to the right side If code false code the right side is copied to the left side protected void copy Selected boolean left To Right super copy Selected left To Right if f Structure Creator null f Structure Creator save left To Right f Right Structure f Left Structure left To Right f Right Input f Left Input  leftToRight copySelected leftToRight copySelected leftToRight fStructureCreator fStructureCreator leftToRight fRightStructure fLeftStructure leftToRight fRightInput fLeftInput

private String f Name Zip Resource String name f Name name  fName ZipResource fName
public String get Name return f Name  getName fName
public Image get Image return CompareUI get Image get Type  getImage getImage getType
Returns true if other is I Typed Element and names are equal see I Comparator equals public boolean equals Object other if other instanceof I Typed Element return f Name equals I Typed Element other get Name return super equals other  ITypedElement IComparator ITypedElement fName ITypedElement getName
public int hash Code return f Name hash Code  hashCode fName hashCode
private Hash Map f Children new Hash Map 10 Zip Folder String name super name  HashMap fChildren HashMap ZipFolder
public String get Type return I Typed Element FOLDER TYPE  getType ITypedElement FOLDER_TYPE
public Object get Children Object children new Object f Children size Iterator iter f Children values iterator for int i 0 iter has Next i children i iter next return children  getChildren fChildren fChildren hasNext
Zip File create Container String path String entry path int pos path index Of if pos 0 pos path index Of if pos 0 entry path substring 0 pos path path substring pos 1 else if entry length 0 if CompareUI Plugin get Default filter path false true return null Zip File ze new Zip File entry f Children put entry ze return ze else return null Zip Folder folder null if f Children null Object o f Children get entry if o instanceof Zip Folder folder Zip Folder o if folder null if path length 0 CompareUI Plugin get Default filter path true true return null folder new Zip Folder entry f Children put entry folder return folder create Container path  ZipFile createContainer indexOf indexOf CompareUIPlugin getDefault ZipFile ZipFile fChildren ZipFolder fChildren fChildren ZipFolder ZipFolder CompareUIPlugin getDefault ZipFolder fChildren createContainer
private byte f Contents Zip File String name super name  fContents ZipFile
public String get Type String s this get Name int pos s last Index Of if pos 0 return s substring pos 1 return I Typed Element UNKNOWN TYPE  getType getName lastIndexOf ITypedElement UNKNOWN_TYPE
public Object get Children return null  getChildren
public Input Stream get Contents if f Contents null f Contents new byte 0 return new Byte Array Input Stream f Contents  InputStream getContents fContents fContents ByteArrayInputStream fContents
byte get Bytes return f Contents  getBytes fContents
void set Bytes byte buffer f Contents buffer  setBytes fContents
void append Bytes byte buffer int length if length 0 int old Len 0 if f Contents null old Len f Contents length byte new Buf new byte old Len length if old Len 0 System arraycopy f Contents 0 new Buf 0 old Len System arraycopy buffer 0 new Buf old Len length f Contents new Buf  appendBytes oldLen fContents oldLen fContents newBuf oldLen oldLen fContents newBuf oldLen newBuf oldLen fContents newBuf
Create a new Zip File Structure Creator public Zip File Structure Creator this Utilities get String Zip Structure Creator name NON NLS 1  ZipFileStructureCreator ZipFileStructureCreator getString ZipStructureCreator
Create a new Zip File Structure Creator with the given title The title is returned by the method code get Name code param title the title of this strcuture creator public Zip File Structure Creator String title f Title title  ZipFileStructureCreator getName ZipFileStructureCreator fTitle
public String get Name return f Title  getName fTitle
public I Structure Comparator get Structure Object input Input Stream is null if input instanceof I Stream Content Accessor I Stream Content Accessor sca I Stream Content Accessor input try is sca get Contents catch Core Exception ex Need Work if is null return null Zip Input Stream zip new Zip Input Stream is Zip Folder root new Zip Folder NON NLS 1 try for Zip Entry entry zip get Next Entry if entry null break Zip File ze root create Container entry get Name if ze null int length int entry get Size if length 0 byte buffer new byte length int offset 0 do int n zip read buffer offset length offset n length n while length 0 ze set Bytes buffer else byte buffer new byte 1024 int n do n zip read buffer 0 1024 ze append Bytes buffer n while n 0 zip close Entry catch IO Exception ex return null finally try zip close catch IO Exception ex silently ignored if root f Children size 1 Iterator iter root f Children values iterator return I Structure Comparator iter next return root  IStructureComparator getStructure InputStream IStreamContentAccessor IStreamContentAccessor IStreamContentAccessor getContents CoreException NeedWork ZipInputStream ZipInputStream ZipFolder ZipFolder ZipEntry getNextEntry ZipFile createContainer getName getSize setBytes appendBytes closeEntry IOException IOException fChildren fChildren IStructureComparator
public String get Contents Object o boolean ignore Whitespace if o instanceof Zip File byte bytes Zip File o get Bytes if bytes null return new String bytes return NON NLS 1 return null  getContents ignoreWhitespace ZipFile ZipFile getBytes
Returns code false code since we cannot update a zip archive return code false code public boolean can Save return false  canSave
Called whenever a copy operation has been performed on a tree node This implementation throws an code Assertion Failed Exception code since we cannot update a zip archive param structure the node for which to save the new content param input the object from which the structure tree was created in code get Structure code public void save I Structure Comparator structure Object input Assert is True false Cannot update zip archive  AssertionFailedException getStructure IStructureComparator isTrue
public I Structure Comparator locate Object path Object source return null  IStructureComparator
Returns code false code since this code I Structure Creator code cannot rewrite the diff tree in order to fold certain combinations of additons and deletions p Note this method is for internal use only Clients should not call this method return code false code public boolean can Rewrite Tree return false  IStructureCreator canRewriteTree
Empty implementation since this code I Structure Creator code cannot rewrite the diff tree in order to fold certain combinations of additons and deletions p Note this method is for internal use only Clients should not call this method public void rewrite Tree Differencer diff I Diff Container root  IStructureCreator rewriteTree IDiffContainer

Private constructor to block instance creation private Boot Loader not allowed  BootLoader
Returns the command line args provided to the platform when it was first run 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 deprecated Replaced by link Platform get Command Line Args public static String get Command Line Args return Internal Platform get Default get Application Args  getCommandLineArgs getCommandLineArgs InternalPlatform getDefault getApplicationArgs
Returns the current platform configuration return platform configuration used in current instance of platform since 2 0 deprecated This functionality has moved to the Eclipse Update manager plug in public static org eclipse core boot I Platform Configuration get Current Platform Configuration Bundle Context context Internal Platform get Default get Bundle Context acquire factory service first Service Reference config FactorySR context get Service Reference I Platform Configuration Factory class get Name if config FactorySR null throw new Illegal State Exception I Platform Configuration Factory config Factory I Platform Configuration Factory context get Service config FactorySR if config Factory null throw new Illegal State Exception get the configuration using the factory I Platform Configuration current Config config Factory get Current Platform Configuration context unget Service config FactorySR return new Platform Configuration current Config  IPlatformConfiguration getCurrentPlatformConfiguration BundleContext InternalPlatform getDefault getBundleContext ServiceReference configFactorySR getServiceReference IPlatformConfigurationFactory getName configFactorySR IllegalStateException IPlatformConfigurationFactory configFactory IPlatformConfigurationFactory getService configFactorySR configFactory IllegalStateException IPlatformConfiguration currentConfig configFactory getCurrentPlatformConfiguration ungetService configFactorySR PlatformConfiguration currentConfig
Returns URL at which the Platform runtime executables and libraries are installed The returned value is distinct from the location of any given platform s data return the URL indicating where the platform runtime is installed deprecated Use code Platform get Install Location getURL code public static URL get InstallURL return Internal Platform get Default get InstallURL  getInstallLocation getInstallURL InternalPlatform getDefault getInstallURL
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 deprecated Replaced by link Platform getNL 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 see knownOS Values deprecated Replaced by link Platform getOS public static String getOS return Internal Platform get Default getOS  OS_UNKNOWN knownOSValues knownOSValues InternalPlatform getDefault
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 2 0 deprecated Replaced by link Platform getOS Arch public static String getOS Arch return Internal Platform get Default getOS Arch  getProperty getOSArch getOSArch InternalPlatform getDefault getOSArch
Returns a platform configuration object optionally initialized with previously saved configuration information param url location of previously save configuration information If code null code is specified an empty configuration object is returned return platform configuration used in current instance of platform exception IO Exception if the configuration cannot be read since 2 0 deprecated This functionality has moved to the Eclipse Update manager plug in public static org eclipse core boot I Platform Configuration get Platform Configuration URL url throws IO Exception Bundle Context context Internal Platform get Default get Bundle Context acquire factory service first Service Reference config FactorySR context get Service Reference I Platform Configuration Factory class get Name if config FactorySR null throw new Illegal State Exception I Platform Configuration Factory config Factory I Platform Configuration Factory context get Service config FactorySR if config Factory null throw new Illegal State Exception get the configuration using the factory I Platform Configuration config config Factory get Platform Configuration url context unget Service config FactorySR return new Platform Configuration config  IOException IPlatformConfiguration getPlatformConfiguration IOException BundleContext InternalPlatform getDefault getBundleContext ServiceReference configFactorySR getServiceReference IPlatformConfigurationFactory getName configFactorySR IllegalStateException IPlatformConfigurationFactory configFactory IPlatformConfigurationFactory getService configFactorySR configFactory IllegalStateException IPlatformConfiguration configFactory getPlatformConfiguration ungetService configFactorySR PlatformConfiguration
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 deprecated Replaced by link Platform getWS public static String getWS return Internal Platform get Default getWS  InternalPlatform getDefault
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 2 0 deprecated Replaced by link Platform knownOS Arch Values public static String knownOS Arch Values return Platform knownOS Arch Values  getOSArch getOSArch knownOSArchValues knownOSArchValues 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 2 0 deprecated Replaced by link Platform knownOS Values public static String knownOS Values return Platform knownOS Values  knownOSValues knownOSValues knownOSValues
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 2 0 deprecated Replaced by link Platform knownWS Values public static String knownWS Values return Platform knownWS Values  knownWSValues knownWSValues knownWSValues
Returns code true code if the platform is currently running in debug mode The platform is run in debug mode using the debug command line argument return whether or not the platform is running in debug mode deprecated Replaced by link Platform in Debug Mode public static boolean in Debug Mode return Platform in Debug Mode  inDebugMode inDebugMode inDebugMode
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 run in development mode using the dev command line argument return whether or not the platform is running in development mode deprecated Replaced by link Platform in Development Mode public static boolean in Development Mode return Platform in Development Mode  inDevelopmentMode inDevelopmentMode inDevelopmentMode
Returns whether the platform is running return code true code if the platform is running and code false code otherwise deprecated Replaced by link Platform is Running public static boolean is Running return Internal Platform get Default is Running  isRunning isRunning InternalPlatform getDefault isRunning
Returns the complete plugin path defined by the file at the given location If the given location is code null code or does not indicate a valid plug in path definition file code null code is returned param plugin Path Location the location of the plug in path to load return the complete set of UR Ls which locate plug ins deprecated This functionality has moved to the Eclipse Update manager plug in public static URL get Plugin Path URL plugin Path Location return Internal Platform get Default get Plugin Path plugin Path Location  pluginPathLocation URLs getPluginPath pluginPathLocation InternalPlatform getDefault getPluginPath pluginPathLocation
Returns whether the given location typically a directory in the local file system contains the saved data for a platform The saved data for the platform is recognizable by the presence of a special platform metadata subdirectory however this metadata directory is not usually created unless there is some reason to do so for example so that an active plug in can save its state return code true code if the location contains the saved data for a platform and code false code otherwise deprecated In Eclipse 3 0 this method is no longer supported The implementation always returns code true code public static boolean contains Saved Platform String location return true  containsSavedPlatform
Instantiates and returns an instance of the named application s runnable entry point code null code is returned if the runnable cannot be found param application Name the fully qualified name of an extension installed in the platform s code applications code extension point i e code org eclipse core applications code return a platform runnable exception Exception if there is a problem instantiating the specified runnable deprecated In Eclipse 3 0 this method is no longer supported The implementation always returns code null code See the related but non API methods on code org eclipse core runtime adaptor Eclipse Starter code in the org eclipse osgi plug in public static I Platform Runnable get Runnable String application Name throws Exception return null  applicationName EclipseStarter IPlatformRunnable getRunnable applicationName
Instantiates and returns an instance of the named class The class must implement code I Platform Runnable code If the class implements code I Executable Extension code the created instance is initialized with the given arguments code null code is returned if the runnable cannot be found param plugin Id the unique identifier of the plug in containing the given class param class Name the fully qualified name of the class to instantiate param args the initialization arguments passed to the new instance return a platform runnable or code null code if the runnable cannot be found exception Exception if there is a problem instantiating the specified runnable deprecated In Eclipse 3 0 this method is no longer supported The implementation always returns code null code See the related but non API methods on code org eclipse core runtime adaptor Eclipse Starter code in the org eclipse osgi plug in public static I Platform Runnable get Runnable String plugin Id String class Name Object args throws Exception return null  IPlatformRunnable IExecutableExtension pluginId className EclipseStarter IPlatformRunnable getRunnable pluginId className
Launches the Platform to run a single application This convenince method starts up the Platform runs the indicated application and then shuts down the Platform The Platform must not be running already param application Name The fully qualified name of an extension installed in the Platform plug in s code applications code extension point i e code org eclipse core runtime applications code param plugin Path Location the URL of the plug in path this is where the Platform is to find the code for plug ins param location the location usually a string path in the local file file system for the saved platform state param args the array of command line style argments which are passed to the Platform on initialization The arguments which are consumed by the Platform s initialization are removed from the arg list This modified arg list is the return value of this method return the list of code args code which were supplied but not consumed by this method return the result or code null code if none exception Exception if anything goes wrong see startup deprecated In Eclipse 3 0 this method is no longer supported The implementation always returns code null code See the related but non API methods on code org eclipse core runtime adaptor Eclipse Starter code in the org eclipse osgi plug in public static Object run String application Name URL plugin Path Location String location String args throws Exception return null  applicationName pluginPathLocation EclipseStarter applicationName pluginPathLocation
Launches the Platform to run a single application This convenince method starts up the Platform runs the indicated application and then shuts down the Platform The Platform must not be running already param application Name The fully qualified name of an extension installed in the Platform plug in s code applications code extension point i e code org eclipse core runtime applications code param plugin Path Location the URL of the plug in path this is where the Platform is to find the code for plug ins param location the location usually a string path in the local file file system for the saved platform state param args the array of command line style argments which are passed to the Platform on initialization The arguments which are consumed by the Platform s initialization are removed from the arg list This modified arg list is the return value of this method param handler an optional handler invoked by the launched application at the point the application considers itself initialized A typical use for the handler would be to take down any splash screen that was displayed by the caller of this method return the list of code args code which were supplied but not consumed by this method return the result or code null code if none exception Exception if anything goes wrong see startup deprecated In Eclipse 3 0 this method is no longer supported The implementation always returns code null code See the related but non API methods on code org eclipse core runtime adaptor Eclipse Starter code in the org eclipse osgi plug in public static Object run String application Name URL plugin Path Location String location String args Runnable handler throws Exception return null  applicationName pluginPathLocation EclipseStarter applicationName pluginPathLocation
Shuts down the Platform The Platform must be running In the process each active plug in is told to shutdown via code Plugin shutdown code p Note that the state of the Platform is not automatically saved before shutting down p p On return the Platform will no longer be running but could be re launched with another call to code startup code Any objects handed out by running Platform including Platform runnables obtained via code get Runnable code will be permanently invalid The effects of attempting to invoke methods on invalid objects is undefined p exception Exception if there were problems shutting down deprecated In Eclipse 3 0 this method is no longer supported The implementation does nothing See the related but non API methods on code org eclipse core runtime adaptor Eclipse Starter code in the org eclipse osgi plug in public static void shutdown throws Exception  getRunnable EclipseStarter
Launches the Eclipse Platform The Platform must not be running p The location of the started Platform is defined as follows ul li If the code location code argument is specified that value is used li If code location code is code null code but code args code contains a code data ltlocation gt code pair then the given value is used li If neither is specified code System get Property user dir code is used ul The plug in path of the started Platform is defined as follows ul li If the code plugin Path Location code argument is specified that value is tried li If code plugin Path Location code is code null code but code args code contains a code plugins ltlocation gt code pair then the given value is tried li If neither value is specified or a given location does not exist the Platform s location is searched li Finally the default plug in path is used This value identifies the plug ins in the Platform s install location ul param plugin Path Location the URL of the plug in path this is where the Platform is to find the code for plug ins param location the location usually a string path in the local file file system for the saved Platform state param args the array of command line style argments which are passed to the platform on initialization The arguments which are consumed by the Platform s initialization are removed from the arg list This modified arg list is the return value of this method return the list of code args code which were supplied but not consumed by this method exception Exception if there are problems starting the platform deprecated In Eclipse 3 0 this method is no longer supported The implementation always returns code null code See the related but non API methods on code org eclipse core runtime adaptor Eclipse Starter code in the org eclipse osgi plug in public static String startup URL plugin Path Location String location String args throws Exception return null  getProperty pluginPathLocation pluginPathLocation pluginPathLocation EclipseStarter pluginPathLocation
Launches the Eclipse Platform The Platform must not be running p The location of the started Platform is defined as follows ul li If the code location code argument is specified that value is used li If code location code is code null code but code args code contains a code data ltlocation gt code pair then the given value is used li If neither is specified code System get Property user dir code is used ul The plug in path of the started Platform is defined as follows ul li If the code plugin Path Location code argument is specified that value is tried li If code plugin Path Location code is code null code but code args code contains a code plugins ltlocation gt code pair then the given value is tried li If neither value is specified or a given location does not exist the Platform s location is searched li Finally the default plug in path is used This value identifies the plug ins in the Platform s install location ul param plugin Path Location the URL of the plug in path this is where the Platform is to find the code for plug ins param location the location usually a string path in the local file file system for the saved Platform state param args the array of command line style argments which are passed to the platform on initialization The arguments which are consumed by the Platform s initialization are removed from the arg list This modified arg list is the return value of this method param handler an optional handler invoked by the launched application at the point the application considers itself initialized A typical use for the handler would be to take down any splash screen that was displayed by the caller of this method return the list of code args code which were supplied but not consumed by this method exception Exception if there are problems starting the platform deprecated In Eclipse 3 0 this method is no longer supported The implementation always returns code null code See the related but non API methods on code org eclipse core runtime adaptor Eclipse Starter code in the org eclipse osgi plug in public static String startup URL plugin Path Location String location String args Runnable handler throws Exception return null  getProperty pluginPathLocation pluginPathLocation pluginPathLocation EclipseStarter pluginPathLocation

Returns the URL for this site return site url since 2 0 
Returns the policy for this site return site policy since 2 0 
Sets the site policy param policy site policy since 2 0 
Returns a list of features visible on the site Note that this is simply a reflection of the site content The features may or may not be actually configured return an array of feature entries or an empty array if no features are found A feature entry is returned as a path relative to the site URL since 2 0 
Returns a list of plug ins visible on the site Note that this is simply a reflection of the site content and the current policy for the site The plug ins may or may not end up being used by Eclipse depends on which plug in are actually bound by the platform return an array of plug in entries or an empty array if no plug ins are found A plug in entry is returned as a path relative to the site URL since 2 0 
Returns a stamp reflecting the current state of the site If called repeatedly returns the same value as long as no changes were made to the site changes to features or plugins return site change stamp since 2 0 
Returns a stamp reflecting the current state of the features on the site If called repeatedly returns the same value as long as no changes were made to features on the site return site features change stamp since 2 0 
Returns a stamp reflecting the current state of the plug ins on the site If called repeatedly returns the same value as long as no changes were made to plug ins on the site return site plug ins change stamp since 2 0 
Returns an indication whether the site can be updated return code true code if site can be updated code false code otherwise since 2 0 
Returns an indication whether the site represents an install site that has been linked via a native installer using the links linkfile mechanism return code true code if the site is linked code false code otherwise since 2 0 
Return policy type return policy type since 2 0 
Return policy inclusion exclusion list return the list as an array since 2 0 
Set new policy list The list entries are interpreted based on the policy type See description of the policy type constants for details param list policy inclusion exclusion list as an array Returns an empty array if there are no entries see USER INCLUDE see USER EXCLUDE since 2 0  USER_INCLUDE USER_EXCLUDE
Returns feature identifier return feature identifier since 2 0 
Returns the currently configured version for the feature return feature version as string or code null code since 2 0 
Returns the identifier of the feature plug in for this feature entry Note that there is no guarantee that a feature in fact supplies a corresponding feature plugin so the result can be code null code Also if supplied there is no guarantee that the plugin will in fact be loaded into the plug in registry at runtime due to rules and constraint checking performed by the registry loading support Consequently code making use of this method must handle these conditions return feature identifier as string or code null code since 2 1 
Returns the version of the feature plug in for this feature entry Note that there is no guarantee that a feature in fact supplies a corresponding feature plugin so the result can be code null code Also if supplied there is no guarantee that the plugin will in fact be loaded into the plug in registry at runtime due to rules and constraint checking performed by the registry loading support Consequently code making use of this method must handle these conditions return feature version as string or code null code since 2 0 
Returns the application to run when this feature is the primary feature return application identifier or code null code since 2 0 
Returns UR Ls to the feature root locations The root UR Ls are install locations of the feature plugin and its fragments return array of UR Ls or an empty array since 2 0  URLs URLs URLs
Returns an indication whether this feature has been defined to act as a primary feature return code true code if the feature can be primary code false code otherwise since 2 0 
Create a site entry param url site URL param policy site policy return created site entry since 2 0 
Create a site policy The policy determines the way the site plug in are processed at startpu param type policy type param list an array of site relative paths representing the inclusion exclusion list return created site policy entry since 2 0 
Create a feature entry param id feature identifier Must not be code null code param version feature version as String Can be code null code param plugin Version version of the feature plugin as String Can be code null code param primary code true code if the feature is defined as a primary feature otherwise code false code param application identifier of the application to run when this feature is the primary feature Can be code null code If specified the identifier must represent a valid extension registered in the code org eclipse core runtime applications code extension point param an array of UR Ls to feature root directories These are UR Ls to install locations for the feature plugin and its fragments Can be code null code return create feature entry since 2 0  pluginVersion URLs URLs
Create a feature entry param id feature identifier Must not be code null code param version feature version as String Can be code null code param plugin Identifier identifier of the feature plugin as String Can be code null code param plugin Version version of the feature plugin as String Can be code null code param primary code true code if the feature is defined as a primary feature otherwise code false code param application identifier of the application to run when this feature is the primary feature Can be code null code If specified the identifier must represent a valid extension registered in the code org eclipse core runtime applications code extension point param an array of UR Ls to feature root directories These are UR Ls to install locations for the feature plugin and its fragments Can be code null code return create feature entry since 2 1  pluginIdentifier pluginVersion URLs URLs
Configures the specified site entry If a site entry with the same site URL is already configured the entry is b not b replaced param entry site entry since 2 0 
Configures the specified site entry If a site entry with the same site URL is already configured the replacement behavior for the entry can be specified param entry site entry param flag indicating whether an existing configured entry with the same URL should be replaced code true code or not code false code since 2 0 
Unconfigures the specified entry Does not do anything if the entry is not configured param entry site entry since 2 0 
Returns configured site entries return array of site entries Returns an empty array if no sites are configured since 2 0 
Returns a site entry matching the specified URL param url site url return matching site entry or code null code if no match found since 2 0 
Configures the feature entry If another feature entry with the same feature identifier already exists it is replaced param entry feature entry since 2 0 
Unconfigures the specified feature entry if it exists param entry feature entry since 2 0 
Returns a list of configured feature entries return array or entries or an empty array if no entries are configured since 2 0 
Locates the specified feature entry param id feature identifier return ferature entry or code null code since 2 0 
Returns the URL location of the configuration information return configuration location URL or code null code if the configuration location could not be determined since 2 0 
Returns a stamp reflecting the current state of the configuration If called repeatedly returns the same value as long as no changes were made to the configuration changes to sites features or plugins return configuration change stamp since 2 0 
Returns a stamp reflecting the current state of the features in the configuration If called repeatedly returns the same value as long as no changes were made to features in the configuration return configuration features change stamp since 2 0 
Returns a stamp reflecting the current state of the plug ins in the configuration If called repeatedly returns the same value as long as no changes were made to plug ins in the configuration return configuration plug ins change stamp since 2 0 
Returns the identifier of the configured primary feature A primary feature is used to specify product customization information for a running instance of Eclipse return primary feature identifier or code null code if none configured since 2 0 
Computes the plug in path for this configuration The result includes all plug ins visible on each of the configured sites based on each site policy return an array of plug in path elements full URL entries or an empty array since 2 0 
Returns an array of bootstrap plugin identifiers whose location needs to be explicitly identified in the configuration return an array of identifiers or empty array otherwise since 2 0 
Sets the location of a bootstrap plugin see I Platform Configuration get Bootstrap Plugin Identifiers param id plugin identifier Must match one of the entries returned by get Bootstrap Plugin Identifiers param location since 2 0  IPlatformConfiguration getBootstrapPluginIdentifiers getBootstrapPluginIdentifiers
Returns an indication whether the configuration can be updated return code true code if configuration can be updated code false code otherwise since 2 0 
Returns an indication whether the configuration is transient A transient configuration typically represents a scenario where the configuration was computed for a single instantiation of the platform and is not guaranteed to be valid on subsequent instantiations return code true code if configuration is transient code false code otherwise since 2 0 
Indicates whether the configuration is transient or not A transient configuration typically represents a scenario where the configuration was computed for a single instantiation of the platform and is not guaranteed to be valid on subsequent instantiations This method has no effect if called on the current platform configuration see Boot Loader get Current Platform Configuration param value code true code if configuration is transient code false code otherwise since 2 0  BootLoader getCurrentPlatformConfiguration
Called to refresh the configuration information In particular causes change stamps to be recomputed based on the current configuration state and updates the lists of available plug ins since 2 0 
Called to save the configuration information since 2 0 
Called to save the configuration information in the specified location param url save location since 2 0 

The default element handler which can cope with all XML expression elements defined by the common expression language return the default element handler public static Element Handler get Default return INSTANCE  ElementHandler getDefault
Creates the corresponding expression for the given configuration element param converter the expression converter used to initiate the conversion process param config the configuration element to convert return the corresponding expression throws Core Exception if the conversion failed  CoreException
Converts the children of the given configuration element and adds them to the given composite expression p Note this is an internal method and should not be called by clients p param converter the converter used to do the actual conversion param element the configuration element for which the children are to be processed param expression the composite expression representing the result of the conversion throws Core Exception if the conversion failed protected void process Children Expression Converter converter I Configuration Element element Composite Expression expression throws Core Exception converter process Children element expression  CoreException processChildren ExpressionConverter IConfigurationElement CompositeExpression CoreException processChildren

Create a new evaluation context with the given parent and default variable param parent the parent context Can be code null code param default Variable the default variable public Evaluation Context I Evaluation Context parent Object default Variable Assert is Not Null default Variable f Parent parent f Default Variable default Variable  defaultVariable EvaluationContext IEvaluationContext defaultVariable isNotNull defaultVariable fParent fDefaultVariable defaultVariable
Create a new evaluation context with the given parent and default variable param parent the parent context Can be code null code param default Variable the default variable param resolvers an array of code I Variable Resolvers code to resolve additional variables see resolve Variable String Object public Evaluation Context I Evaluation Context parent Object default Variable I Variable Resolver resolvers Assert is Not Null default Variable Assert is Not Null resolvers f Parent parent f Default Variable default Variable f Variable Resolvers resolvers  defaultVariable IVariableResolvers resolveVariable EvaluationContext IEvaluationContext defaultVariable IVariableResolver isNotNull defaultVariable isNotNull fParent fDefaultVariable defaultVariable fVariableResolvers
inherit Doc public I Evaluation Context get Parent return f Parent  inheritDoc IEvaluationContext getParent fParent
inherit Doc public I Evaluation Context get Root if f Parent null return this return f Parent get Root  inheritDoc IEvaluationContext getRoot fParent fParent getRoot
inherit Doc public Object get Default Variable return f Default Variable  inheritDoc getDefaultVariable fDefaultVariable
inherit Doc public void add Variable String name Object value Assert is Not Null name Assert is Not Null value if f Variables null f Variables new Hash Map f Variables put name value  inheritDoc addVariable isNotNull isNotNull fVariables fVariables HashMap fVariables
inherit Doc public Object remove Variable String name Assert is Not Null name if f Variables null return null return f Variables remove name  inheritDoc removeVariable isNotNull fVariables fVariables
inherit Doc public Object get Variable String name Assert is Not Null name Object result null if f Variables null result f Variables get name if result null return result if f Parent null return f Parent get Variable name return null  inheritDoc getVariable isNotNull fVariables fVariables fParent fParent getVariable
inherit Doc public Object resolve Variable String name Object args throws Core Exception if f Variable Resolvers null f Variable Resolvers length 0 for int i 0 i f Variable Resolvers length i I Variable Resolver resolver f Variable Resolvers i Object variable resolver resolve name args if variable null return variable if f Parent null return f Parent resolve Variable name args return null  inheritDoc resolveVariable CoreException fVariableResolvers fVariableResolvers fVariableResolvers IVariableResolver fVariableResolvers fParent fParent resolveVariable

No instances outside of code Evaluation Result code private Evaluation Result int value f Value value  EvaluationResult EvaluationResult fValue
Returns an code Evaluation Result code whose value is code this amp amp other code param other the right hand side of the and operation return code this amp amp other code as defined by the evaluation result public Evaluation Result and Evaluation Result other return AND f Value other f Value  EvaluationResult EvaluationResult EvaluationResult fValue fValue
Returns an code Evaluation Result code whose value is code this other code param other the right hand side of the or operation return code this other code as defined by the evaluation result public Evaluation Result or Evaluation Result other return OR f Value other f Value  EvaluationResult EvaluationResult EvaluationResult fValue fValue
Returns the inverted value of this evaluation result return the inverted value of this evaluation result public Evaluation Result not return NOT f Value  EvaluationResult fValue
Returns an evaluation result instance representing the given boolean value If the given boolean value is code true code then code Expression Result TRUE code is returned If the value is code false code then code Expression Result FALSE code is returned param b a boolean value return the expression result representing the boolean value public static Evaluation Result value Of boolean b return b TRUE FALSE  ExpressionResult ExpressionResult EvaluationResult valueOf
Returns a evaluation result instance representing the given code Boolean code value If the given code Boolean code value is code true code then code Expression Result TRUE code is returned If the value is code false code then code Expression Result FALSE code is returned param b a code Boolean code value return the expression result representing the code Boolean code value public static Evaluation Result value Of Boolean b return b boolean Value TRUE FALSE  ExpressionResult ExpressionResult EvaluationResult valueOf booleanValue
For debugging purpose only return a string representing this object The result is not human readable public String to String switch f Value case 0 return false NON NLS 1 case 1 return true NON NLS 1 case 2 return not loaded NON NLS 1 Assert is True false return null  toString fValue not_loaded isTrue

public static final Expression TRUE new Expression public Evaluation Result evaluate I Evaluation Context context return Evaluation Result TRUE  EvaluationResult IEvaluationContext EvaluationResult
public static final Expression FALSE new Expression public Evaluation Result evaluate I Evaluation Context context return Evaluation Result FALSE  EvaluationResult IEvaluationContext EvaluationResult
Evaluates this expression param context an evaluation context providing information like variable name spaces etc necessary to evaluate this expression return the result of the expression evaluation throws Core Exception if the evaluation failed The concrete reason is defined by the subclass implementing this method  CoreException

Returns the default expression converter The default expression converter can cope with all expression elements defined by the common expression language return the default expression converter public static Expression Converter get Default return INSTANCE  ExpressionConverter getDefault
Creates a new expression converter with the given list of element handlers The element handlers build a chain of responsibility meaning that the first handler in the list is first used to convert the configuration element If this handler isn t able to convert the configuration element the next handler in the array is used param handlers the array of element handlers public Expression Converter Element Handler handlers Assert is Not Null handlers f Handlers handlers  ExpressionConverter ElementHandler isNotNull fHandlers
Converts the tree of configuration elements represented by the given root element and returns a corresponding expression tree param root the configuration element to be converted return the corresponding expression tree or code null code if the configuration element cannot be converted throws Core Exception if the configuration element can t be converted Reasons include a no handler is available to cope with a certain configuration element or b the XML expression tree is malformed public Expression perform I Configuration Element root throws Core Exception for int i 0 i f Handlers length i Element Handler handler f Handlers i Expression result handler create this root if result null return result return null  CoreException IConfigurationElement CoreException fHandlers ElementHandler fHandlers
package void process Children I Configuration Element element Composite Expression result throws Core Exception I Configuration Element children element get Children if children null for int i 0 i children length i Expression child perform children i if child null throw new Core Exception new Status I Status ERROR Expression Plugin get Plugin Id I Status ERROR Expression Messages get Formatted String Expression unknown element NON NLS 1 children i get Name null result add child  processChildren IConfigurationElement CompositeExpression CoreException IConfigurationElement getChildren CoreException IStatus ExpressionPlugin getPluginId IStatus ExpressionMessages getFormattedString unknown_element getName

Returns the parent context or code null code if this is the root of the evaluation context hierarchy return the parent evaluation context or code null code 
Returns the root evaluation context return the root evaluation context 
Returns the default variable return the default variable or code null code if no default variable is managed 
Adds a new named variable to this context If a variable with the name already exists the new one overrides the existing one param name the variable s name param value the variable s value 
Removes the variable managed under the given name from this evaluation context param name the variable s name return the currently stored value or code null code if the variable doesn t exist 
Returns the variable managed under the given name param name the variable s name return the variable s value or code null code if the content doesn t manage a variable with the given name 
Resolves a variable for the given name and arguments This method can be used to dynamically resolve variable such as plug in descriptors resources etc The method is used by the code resolve code expression param name the variable to resolve param args an object array of arguments used to resolve the variable return the variable s value or code null code if no variable can be resolved for the given name and arguments exception Core Exception if an errors occurs while resolving the variable  CoreException

Returns whether the property tester can handle the given property or not param namespace the name space to be considered param property the property to test return code true code if the tester provides an implementation for the given property otherwise code false code is returned 
Returns whether the implementation class for this property tester is loaded or not return code true code if the implementation class is loaded code false code otherwise 
Returns code true code if the implementation class of this property tester can be loaded This is the case if the plug in providing the implementation class is active Returns code false code otherwise return whether the implementation class can be loaded or not 
Loads the implementation class for this property tester and returns an instance of this class return an instance of the implementation class for this property tester throws Core Exception if the implementation class cannot be loaded  CoreException
Executes the property test determined by the parameter code property code param receiver the receiver of the property test param property the property to test param args additional arguments to evaluate the property If no arguments are specified in the code test code expression an array of length 0 is passed param expected Value the expected value of the property The value is either of type code java lang String code or a boxed base type If no value was specified in the code test code expressions then code null code is passed return returns code true code if the property is equal to the expected value otherwise code false code is returned  expectedValue

Resolves a variable for the given name and arguments The handler is allowed to return code null code to indicate that it is not able to resolve the requested variable param name the variable to resolve param args an object array of arguments used to resolve the variable return the variable s value or code null code if no variable could be resolved exception Core Exception if an errors occurs while resolving the variable  CoreException

Initialize the property tester with the given name space and property p Note this method is for internal use only Clients must not call this method p param descriptor the descriptor object for this tester public final void internal Initialize Property Tester Descriptor descriptor f Properties descriptor get Properties f Namespace descriptor get Namespace f Config Element descriptor get Configuration Element  internalInitialize PropertyTesterDescriptor fProperties getProperties fNamespace getNamespace fConfigElement getConfigurationElement
Note this method is for internal use only Clients must not call this method return the property tester descriptor public final Property Tester Descriptor internal Create Descriptor return new Property Tester Descriptor f Config Element f Namespace f Properties  PropertyTesterDescriptor internalCreateDescriptor PropertyTesterDescriptor fConfigElement fNamespace fProperties
inherit Doc public final boolean handles String namespace String property return f Namespace equals namespace f Properties index Of property 1 NON NLS 1 NON NLS 2  inheritDoc fNamespace fProperties indexOf
inherit Doc public final boolean is Instantiated return true  inheritDoc isInstantiated
inherit Doc public boolean is Declaring Plugin Active Bundle f Bundle Platform get Bundle f Config Element get Declaring Extension get Namespace return f Bundle get State Bundle ACTIVE  inheritDoc isDeclaringPluginActive fBundle getBundle fConfigElement getDeclaringExtension getNamespace fBundle getState
inherit Doc public final I Property Tester instantiate return this  inheritDoc IPropertyTester

Cannot be instantiated private File Buffers  FileBuffers
Returns the text file buffer manager May return code null code if the file buffers plug in may no be activated This is for example the case when the method is called on plug in shutdown return the text file buffer manager or code null code public static I Text File Buffer Manager get Text File Buffer Manager File Buffers Plugin plugin File Buffers Plugin get Default return plugin null plugin get File Buffer Manager null  ITextFileBufferManager getTextFileBufferManager FileBuffersPlugin FileBuffersPlugin getDefault getFileBufferManager
Returns the workspace file at the given location or code null code if the location is not a valid location in the workspace param location the location return the workspace file at the location or code null code public static I File get Workspace File At Location I Path location I Path normalized normalize Location location if normalized segment Count 2 see I Container get File for the required number of segments I Workspace Root workspace Root Resources Plugin get Workspace get Root I File file workspace Root get File normalized if file null file exists return file return null  IFile getWorkspaceFileAtLocation IPath IPath normalizeLocation segmentCount IContainer getFile IWorkspaceRoot workspaceRoot ResourcesPlugin getWorkspace getRoot IFile workspaceRoot getFile
Returns a copy of the given location in a normalized form param location the location to be normalized return normalized copy of location public static I Path normalize Location I Path location I Workspace Root workspace Root Resources Plugin get Workspace get Root I Project projects workspace Root get Projects for int i 0 length projects length i length i I Path path projects i get Location if path null path is Prefix Of location I Path file Path location remove First Segments path segment Count file Path projects i get Full Path append file Path return file Path make Absolute return location make Absolute  IPath normalizeLocation IPath IWorkspaceRoot workspaceRoot ResourcesPlugin getWorkspace getRoot IProject workspaceRoot getProjects IPath getLocation isPrefixOf IPath filePath removeFirstSegments segmentCount filePath getFullPath filePath filePath makeAbsolute makeAbsolute
Returns the file in the local file system for the given location p The location is either a full path of a workspace resource or an absolute path in the local file system p param location the location return the link File in the local file system for the given location public static File get System File At Location I Path location if location null return null I File file get Workspace File At Location location if file null I Path path file get Location return path to File return location to File  getSystemFileAtLocation IPath IFile getWorkspaceFileAtLocation IPath getLocation toFile toFile

Creates and returns a new annotation model param location the normalized location return a new annotation model 

Creates and returns a new empty document return a new empty document 

Sets up the document to be ready for use by a text file buffer param document the document to be set up 

Returns the location of this file buffer p The location is either a full path of a workspace resource or an absolute path in the local file system p return the location of this file buffer 
Returns whether this file buffer is synchronized with the file system This is when the file buffer s underlying file is in synchronization with the file system and the file buffer has been initialized after the underlying files has been modified the last time return code true code if the file buffer is synchronized with the file system 
Reverts the contents of this file buffer to the content of its underlying file After that call successfully returned code is Dirty code returns code false code and code is Synchronized code returns code true code param monitor the progress monitor throws Core Exception if reading or accessing the underlying file fails  isDirty isSynchronized CoreException
Commits this file buffer by changing the contents of the underlying file to the contents of this file buffer After that call code is Dirty code returns code false code and code is Synchronized code returns code true code param monitor the progress monitor param overwrite indicates whether the underlying file should be overwritten if it is not synchronized with the file system throws Core Exception if writing or accessing the underlying file fails  isDirty isSynchronized CoreException
Returns whether changes have been applied to this file buffer since initialization or the most recent code revert code or code commit code call return code true code if changes have been applied to this buffer 
Returns whether this file buffer is shared by more than one client return code true code if this file buffer is shared by more than one client 
Validates the state of this file buffer and tries to bring the buffer s underlying file into a state in which it can be modified If state validation is not supported this operation does nothing param monitor the progress monitor param computation Context the context in which the validation is performed e g a SWT shell exception Core Exception if the underlying file can not be accessed to it s state cannot be changed  computationContext CoreException
Returns whether the state of this file buffer has been validated If state validation is not supported this method always returns code true code return code true code if the state has been validated code false code otherwise 
Resets state validation If state validation is supported code is State Validated code afterwards returns code false code until the state is revalidated  isStateValidated
Returns the status of this file buffer This is the result of the last operation performed on this file buffer or internally initiated by this file buffer return the status of this file buffer 
Returns the modification stamp of the file underlying this file buffer return the modification stamp of the file underlying this file buffer 

Informs the listener about the creation of the given buffer param buffer the created file buffer 
Informs the listener about the disposal of the given buffer param buffer the disposed file buffer 
Informs the listener about an upcoming replace of the contents of the given buffer param buffer the effected file buffer 
Informs the listener that the buffer of the given buffer has been replaced param buffer the effected file buffer 
Informs the listener about the start of a state changing operation on the given buffer param buffer the effected file buffer 
Informs the listener that the dirty state of the given buffer changed to the specified value param buffer the effected file buffer param is Dirty code true code if the buffer is dirty code false code otherwise  isDirty
Informs the listener that the state validation changed to the specified value param buffer the effected file buffer param is State Validated code true code if the buffer state is validated code false code otherwise  isStateValidated
Informs the listener that the file underlying the given file buffer has been moved to the given location param buffer the effected file buffer param path the new location not just the container 
Informs the listener that the file underlying the given file buffer has been deleted param buffer the effected file buffer 
Informs the listener that a state changing operation on the given file buffer failed param buffer the effected file buffer 

Connects the file at the given location to this manager After that call successfully completed it is guaranteed that each call to code get File Buffer code returns the same file buffer until code disconnect code is called p The provided location is either a full path of a workspace resource or an absolute path in the local file system The file buffer manager does not resolve the location of workspace resources in the case of linked resources p param location the location of the file to be connected param monitor the progress monitor throws Core Exception if the file could not successfully be connected  getFileBuffer CoreException
Disconnects the file at the given location from this manager After that call successfully completed there is no guarantee that code get File Buffer code will return a valid file buffer p The provided location is either a full path of a workspace resource or an absolute path in the local file system The file buffer manager does not resolve the location of workspace resources in the case of linked resources p param location the location of the file to be disconnected param monitor the progress monitor throws Core Exception if the file could not successfully be disconnected  getFileBuffer CoreException
Returns the file buffer managed for the given location or code null code if there is no such file buffer p The provided location is either a full path of a workspace resource or an absolute path in the local file system The file buffer manager does not resolve the location of workspace resources in the case of linked resources p param location the location return the file buffer managed for that location or code null code 
Sets the synchronization context for this file buffer manager i e for all file buffers this manager manages param context the synchronization context managed by this file buffer manager 
The caller requests that the synchronization context is used to synchronize the given location with its file buffer This call as no effect if there is no file buffer managed for the given location p The provided location is either a full path of a workspace resource or an absolute path in the local file system The file buffer manager does not resolve the location of workspace resources in the case of linked resources p param location the location 
The caller no longer requests the synchronization context for the file buffer managed for the given location This method has no effect if there is no file buffer managed for this location p The provided location is either a full path of a workspace resource or an absolute path in the local file system The file buffer manager does not resolve the location of workspace resources in the case of linked resources p param location the location 
Adds the given listener to the list of file buffer listeners After that call the listener is informed about changes related to this file buffer manager If the listener is already registered with the file buffer this call has no effect param listener the listener to be added 
Removes the given listener from the list of file buffer listeners If the listener is not registered with this file buffer this call has no effect param listener the listener to be removed 

Transforms the current transient state of the annotation model into a persistent state param document the document the annotation model is connected to throws Core Exception in case the transformation fails  CoreException
Changes the current transient state of the annotation model to match the last persisted state param document the document the annotation model is connected to throws Core Exception in case accessing the persisted state  CoreException
Forces this annotation model to re initialize from the persistent state The persistent state must not be the same as the last persisted state I e external modification may have caused changes to the persistent state since the last code commit code or code revert code operation param document the document the annotation model is connected to throws Core Exception in case accessing the persistent state fails  CoreException

Executes the given runnable according to the specified synchronization execution policy param runnable the runnable to be executed 

Returns the document of this text file buffer return the document of this text file buffer 
Returns the character encoding to be used for reading and writing the buffer s underlying file return the character encoding 
Sets the character encoding to be used for reading and writing the buffer s underlying file param encoding the encoding 
Returns the annotation model of this text file buffer return the annotation model of this text file buffer 

Returns the text file buffer managed for the file at the given location or code null code if either there is no such text file buffer p The provided location is either a full path of a workspace resource or an absolute path in the local file system The file buffer manager does not resolve the location of workspace resources in the case of linked resources p param location the location return the text file buffer managed for that location or code null code 
Returns the default encoding that is used to read the contents of text files if no other encoding is specified return the default text file encoding 
Creates a new empty document The document is set up in the same way as it would be used in a text file buffer for a file at the given location p The provided location is either a full path of a workspace resource or an absolute path in the local file system The file buffer manager does not resolve the location of workspace resources in the case of linked resources p param location the location used to set up the newly created document return a new empty document 
Creates a new annotation for the given location param location the location return the newly created annotation model 

private I Platform Configuration I Feature Entry new Feature Entry public Feature Entry I Platform Configuration I Feature Entry fe new Feature Entry fe  IPlatformConfiguration IFeatureEntry newFeatureEntry FeatureEntry IPlatformConfiguration IFeatureEntry newFeatureEntry
public String get Feature Identifier return new Feature Entry get Feature Identifier  getFeatureIdentifier newFeatureEntry getFeatureIdentifier
public String get Feature Version return new Feature Entry get Feature Version  getFeatureVersion newFeatureEntry getFeatureVersion
public String get Feature Plugin Identifier return new Feature Entry get Feature Plugin Identifier  getFeaturePluginIdentifier newFeatureEntry getFeaturePluginIdentifier
public String get Feature Plugin Version return new Feature Entry get Feature Plugin Version  getFeaturePluginVersion newFeatureEntry getFeaturePluginVersion
public String get Feature Application return new Feature Entry get Feature Application  getFeatureApplication newFeatureEntry getFeatureApplication
public URL get Feature RootUR Ls return new Feature Entry get Feature RootUR Ls  getFeatureRootURLs newFeatureEntry getFeatureRootURLs
public boolean can Be Primary return new Feature Entry can Be Primary  canBePrimary newFeatureEntry canBePrimary
public I Platform Configuration I Feature Entry get New Feature Entry return new Feature Entry  IPlatformConfiguration IFeatureEntry getNewFeatureEntry newFeatureEntry
public boolean equals Object o if o instanceof Feature Entry return new Feature Entry equals Feature Entry o new Feature Entry return false  FeatureEntry newFeatureEntry FeatureEntry newFeatureEntry
public int hash Code return new Feature Entry hash Code  hashCode newFeatureEntry hashCode

private org eclipse update configurator I Platform Configuration new Config public Platform Configuration org eclipse update configurator I Platform Configuration config new Config config  IPlatformConfiguration newConfig PlatformConfiguration IPlatformConfiguration newConfig
public I Site Entry create Site Entry URL url I Site Policy policy return new Site Entry new Config create Site Entry url Site Policy policy get New Policy  ISiteEntry createSiteEntry ISitePolicy SiteEntry newConfig createSiteEntry SitePolicy getNewPolicy
public I Site Policy create Site Policy int type String list return new Site Policy new Config create Site Policy type list  ISitePolicy createSitePolicy SitePolicy newConfig createSitePolicy
public I Feature Entry create Feature Entry String id String version String plugin Version boolean primary String application URL root return new Feature Entry new Config create Feature Entry id version plugin Version primary application root  IFeatureEntry createFeatureEntry pluginVersion FeatureEntry newConfig createFeatureEntry pluginVersion
public I Feature Entry create Feature Entry String id String version String plugin Identifier String plugin Version boolean primary String application URL root return new Feature Entry new Config create Feature Entry id version plugin Identifier plugin Version primary application root  IFeatureEntry createFeatureEntry pluginIdentifier pluginVersion FeatureEntry newConfig createFeatureEntry pluginIdentifier pluginVersion
public void configure Site I Site Entry entry new Config configure Site Site Entry entry get New Site Entry  configureSite ISiteEntry newConfig configureSite SiteEntry getNewSiteEntry
public void configure Site I Site Entry entry boolean replace new Config configure Site Site Entry entry get New Site Entry replace  configureSite ISiteEntry newConfig configureSite SiteEntry getNewSiteEntry
public void unconfigure Site I Site Entry entry new Config unconfigure Site Site Entry entry get New Site Entry  unconfigureSite ISiteEntry newConfig unconfigureSite SiteEntry getNewSiteEntry
public I Site Entry get Configured Sites org eclipse update configurator I Platform Configuration I Site Entry sites new Config get Configured Sites Site Entry old Sites new Site Entry sites length for int i 0 i sites length i old Sites i new Site Entry sites i return old Sites  ISiteEntry getConfiguredSites IPlatformConfiguration ISiteEntry newConfig getConfiguredSites SiteEntry oldSites SiteEntry oldSites SiteEntry oldSites
public I Site Entry find Configured Site URL url org eclipse update configurator I Platform Configuration I Site Entry site Entry new Config find Configured Site url if site Entry null return null return new Site Entry site Entry  ISiteEntry findConfiguredSite IPlatformConfiguration ISiteEntry siteEntry newConfig findConfiguredSite siteEntry SiteEntry siteEntry
public void configure Feature Entry I Feature Entry entry new Config configure Feature Entry Feature Entry entry get New Feature Entry  configureFeatureEntry IFeatureEntry newConfig configureFeatureEntry FeatureEntry getNewFeatureEntry
public void unconfigure Feature Entry I Feature Entry entry new Config unconfigure Feature Entry Feature Entry entry get New Feature Entry  unconfigureFeatureEntry IFeatureEntry newConfig unconfigureFeatureEntry FeatureEntry getNewFeatureEntry
public I Feature Entry get Configured Feature Entries org eclipse update configurator I Platform Configuration I Feature Entry entries new Config get Configured Feature Entries Feature Entry old Entries new Feature Entry entries length for int i 0 i entries length i old Entries i new Feature Entry entries i return old Entries  IFeatureEntry getConfiguredFeatureEntries IPlatformConfiguration IFeatureEntry newConfig getConfiguredFeatureEntries FeatureEntry oldEntries FeatureEntry oldEntries FeatureEntry oldEntries
public I Feature Entry find Configured Feature Entry String id return new Feature Entry new Config find Configured Feature Entry id  IFeatureEntry findConfiguredFeatureEntry FeatureEntry newConfig findConfiguredFeatureEntry
public URL get Configuration Location return new Config get Configuration Location  getConfigurationLocation newConfig getConfigurationLocation
public long get Change Stamp return new Config get Change Stamp  getChangeStamp newConfig getChangeStamp
public long get Features Change Stamp return new Config get Features Change Stamp  getFeaturesChangeStamp newConfig getFeaturesChangeStamp
public long get Plugins Change Stamp return new Config get Plugins Change Stamp  getPluginsChangeStamp newConfig getPluginsChangeStamp
public String get Primary Feature Identifier return new Config get Primary Feature Identifier  getPrimaryFeatureIdentifier newConfig getPrimaryFeatureIdentifier
public URL get Plugin Path return new Config get Plugin Path  getPluginPath newConfig getPluginPath
public String get Bootstrap Plugin Identifiers return new Config get Bootstrap Plugin Identifiers  getBootstrapPluginIdentifiers newConfig getBootstrapPluginIdentifiers
public void set Bootstrap Plugin Location String id URL location new Config set Bootstrap Plugin Location id location  setBootstrapPluginLocation newConfig setBootstrapPluginLocation
public boolean is Updateable return new Config is Updateable  isUpdateable newConfig isUpdateable
public boolean is Transient return new Config is Transient  isTransient newConfig isTransient
public void is Transient boolean value new Config is Transient value  isTransient newConfig isTransient
public void refresh new Config refresh  newConfig
public void save throws IO Exception new Config save  IOException newConfig
public void save URL url throws IO Exception new Config save url  IOException newConfig
public boolean equals Object o if o instanceof Platform Configuration return new Config equals Platform Configuration o new Config return false  PlatformConfiguration newConfig PlatformConfiguration newConfig
public int hash Code return new Config hash Code  hashCode newConfig hashCode

private static URL installURL public PlatformURL Base Connection URL url super url  PlatformURLBaseConnection
protected boolean allow Caching return true  allowCaching
protected URL resolve throws IO Exception String spec url get File trim if spec starts With NON NLS 1 spec spec substring 1 if spec starts With PLATFORM NON NLS 1 String message Policy bind url bad Variant url to String NON NLS 1 throw new IO Exception message return spec length PLATFORM length 1 installURL new URL installURL spec substring PLATFORM length 1  IOException getFile startsWith startsWith badVariant toString IOException
public static void startup URL url register connection type for platform base handling if installURL null return installURL url PlatformURL Handler register PLATFORM PlatformURL Base Connection class  PlatformURLHandler PlatformURLBaseConnection

public static boolean DEBUG CACHE COPY true protected PlatformURL Connection URL url super url  DEBUG_CACHE_COPY PlatformURLConnection
protected boolean allow Caching return false  allowCaching
public void connect throws IO Exception connect false  IOException
private synchronized void connect boolean as Local throws IO Exception if connected return if should Cache as Local try URL in Cache getURL In Cache if in Cache null connection in Cache open Connection catch IO Exception e failed to cache will use resolved URL instead use resolved URL if connection null connection resolvedURL open Connection connected true if DEBUG DEBUG CONNECT debug Connected as connection getURL NON NLS 1  asLocal IOException shouldCache asLocal inCache getURLInCache inCache inCache openConnection IOException openConnection DEBUG_CONNECT
TODO avoid cryptic identifiers such as ix tgt tmp srcis tgtos private void copy To Cache throws IO Exception if is In Cache cachedURL null return String tmp int ix cache entry key String key if is Jar tmp url get File ix tmp last Index Of PlatformURL Handler JAR SEPARATOR if ix 1 tmp tmp substring 0 ix key tmp else key url get File source url URL src if is Jar tmp resolvedURL get File ix tmp last Index Of PlatformURL Handler JAR SEPARATOR if ix 1 tmp tmp substring 0 ix src new URL tmp else src resolvedURL Input Stream srcis null cache target String tgt if is Jar tmp cachedURL get File ix tmp index Of PlatformURL Handler PROTOCOL SEPARATOR if ix 1 tmp tmp substring ix 1 ix tmp last Index Of PlatformURL Handler JAR SEPARATOR if ix 1 tmp tmp substring 0 ix tgt tmp else tgt cachedURL get File File tgt File null File Output Stream tgtos null boolean error false long total 0 try if DEBUG DEBUG CACHE COPY if is Jar debug Caching jar as tgt NON NLS 1 else debug Caching as tgt NON NLS 1 srcis src open Stream byte buf new byte BUF SIZE int count srcis read buf tgt File new File tgt tgtos new File Output Stream tgt File while count 1 total count tgtos write buf 0 count count srcis read buf srcis close srcis null tgtos close tgtos null add cache entry cache Index put key tgt is In Cache true catch IO Exception e error true cache Index put key NOT FOUND mark cache entry for this execution if DEBUG DEBUG CACHE COPY debug Failed to cache due to e NON NLS 1 throw e finally if error DEBUG DEBUG CACHE COPY debug total bytes copied NON NLS 1 if srcis null srcis close if tgtos null tgtos close  copyToCache IOException isInCache isJar getFile lastIndexOf PlatformURLHandler JAR_SEPARATOR getFile isJar getFile lastIndexOf PlatformURLHandler JAR_SEPARATOR InputStream isJar getFile indexOf PlatformURLHandler PROTOCOL_SEPARATOR lastIndexOf PlatformURLHandler JAR_SEPARATOR getFile tgtFile FileOutputStream DEBUG_CACHE_COPY isJar openStream BUF_SIZE tgtFile FileOutputStream tgtFile cacheIndex isInCache IOException cacheIndex NOT_FOUND DEBUG_CACHE_COPY DEBUG_CACHE_COPY
protected void debug String s System out println URL getURL to String Integer to Hex String Thread current Thread hash Code s NON NLS 1 NON NLS 2 NON NLS 3  toString toHexString currentThread hashCode
private static void debug Startup String s System out println URL s NON NLS 1  debugStartup
public URL get AuxillaryUR Ls throws IO Exception return null  getAuxillaryURLs IOException
public synchronized Input Stream get Input Stream throws IO Exception if connected connect return connection get Input Stream  InputStream getInputStream IOException getInputStream
public URL get ResolvedURL return resolvedURL  getResolvedURL
public URL getURL As Local throws IO Exception connect true connect and force caching if necessary URL u connection getURL String up u get Protocol if up equals PlatformURL Handler FILE up equals PlatformURL Handler JAR up starts With PlatformURL Handler BUNDLE throw new IO Exception Policy bind url noaccess up NON NLS 1 return u  getURLAsLocal IOException getProtocol PlatformURLHandler PlatformURLHandler startsWith PlatformURLHandler IOException
TODO consider refactoring this method it is too long private URL getURL In Cache throws IO Exception if allow Caching return null target should not be cached if is In Cache return cachedURL if cache Location null cache Index null return null not caching check if we are dealing with a jar zip String file NON NLS 1 String jar Entry null if is Jar file url get File int ix file last Index Of PlatformURL Handler JAR SEPARATOR if ix 1 jar Entry file substring ix PlatformURL Handler JAR SEPARATOR length file file substring 0 ix else file url get File jar Entry null check for cached entry String tmp String cache Index get file check for not found marker if tmp null tmp NOT FOUND throw new IO Exception validate cache entry if tmp null new File tmp exists tmp null cache Index remove url get File found in cache if tmp null if is Jar if DEBUG DEBUG CACHE LOOKUP debug Jar located in cache as tmp NON NLS 1 tmp PlatformURL Handler FILE PlatformURL Handler PROTOCOL SEPARATOR tmp PlatformURL Handler JAR SEPARATOR jar Entry cachedURL new URL PlatformURL Handler JAR null 1 tmp else if DEBUG DEBUG CACHE LOOKUP debug Located in cache as tmp NON NLS 1 cachedURL new URL PlatformURL Handler FILE null 1 tmp is In Cache true else attemp to cache int ix file last Index Of NON NLS 1 tmp file substring ix 1 tmp cache Location file Prefix Long to String new java util Date get Time   tmp NON NLS 1 tmp tmp replace File separator Char if is Jar tmp PlatformURL Handler FILE PlatformURL Handler PROTOCOL SEPARATOR tmp PlatformURL Handler JAR SEPARATOR jar Entry cachedURL new URL PlatformURL Handler JAR null 1 tmp else cachedURL new URL PlatformURL Handler FILE null 1 tmp copy To Cache return cachedURL  getURLInCache IOException allowCaching isInCache cacheLocation cacheIndex jarEntry isJar getFile lastIndexOf PlatformURLHandler JAR_SEPARATOR jarEntry PlatformURLHandler JAR_SEPARATOR getFile jarEntry cacheIndex NOT_FOUND IOException cacheIndex getFile isJar DEBUG_CACHE_LOOKUP PlatformURLHandler PlatformURLHandler PROTOCOL_SEPARATOR PlatformURLHandler JAR_SEPARATOR jarEntry PlatformURLHandler DEBUG_CACHE_LOOKUP PlatformURLHandler isInCache lastIndexOf cacheLocation filePrefix toString getTime _ separatorChar isJar PlatformURLHandler PlatformURLHandler PROTOCOL_SEPARATOR PlatformURLHandler JAR_SEPARATOR jarEntry PlatformURLHandler PlatformURLHandler copyToCache
return URL resolved URL protected URL resolve throws IO Exception TODO throw Unsupported Operation Exception instead this is a bug in subclass not an actual failure throw new IO Exception  IOException UnsupportedOperationException IOException
private String resolve Path String spec if spec length 0 spec char At 0 return spec int i spec index Of 1 String first NON NLS 1 String rest NON NLS 1 if i 1 first spec else first spec substring 0 i rest spec substring i if first equals Ignore Case ws NON NLS 1 return ws PlatformURL Connection ws rest NON NLS 1 if first equals Ignore Case os NON NLS 1 return os PlatformURL Connection os rest NON NLS 1 if first equals Ignore Case nl NON NLS 1 String nl PlatformURL Connection nl nl nl replace   return nl nl rest NON NLS 1 return spec  resolvePath charAt indexOf equalsIgnoreCase PlatformURLConnection equalsIgnoreCase PlatformURLConnection equalsIgnoreCase PlatformURLConnection _
protected String get Id String spec int i spec last Index Of   return i 0 spec substring 0 i spec  getId lastIndexOf _
protected String get Version String spec int i spec last Index Of   return i 0 spec substring i 1 spec length NON NLS 1  getVersion lastIndexOf _
void set ResolvedURL URL url throws IO Exception if url null throw new IO Exception if resolvedURL null return int ix url get File last Index Of PlatformURL Handler JAR SEPARATOR is Jar 1 ix Resolved UR Ls containing separator are assumed to be jar UR Ls If the resolved protocol is not jar new jar URL is created if is Jar url get Protocol equals PlatformURL Handler JAR url new URL PlatformURL Handler JAR 1 url to External Form NON NLS 1 resolvedURL url  setResolvedURL IOException IOException getFile lastIndexOf PlatformURLHandler JAR_SEPARATOR isJar URLs URLs isJar getProtocol PlatformURLHandler PlatformURLHandler toExternalForm
private boolean should Cache boolean as Local don t cache files that are known to be local String rp resolvedURL get Protocol String rf resolvedURL get File if rp equals PlatformURL Handler FILE return false if rp equals PlatformURL Handler JAR rf starts With PlatformURL Handler FILE return false for other files force caching if local connection was requested if as Local return true for now cache all files XXX add cache policy support return true  shouldCache asLocal getProtocol getFile PlatformURLHandler PlatformURLHandler startsWith PlatformURLHandler asLocal
static void shutdown if index Name null cache Location null weed out not found entries Enumeration keys cache Index keys String key Object value while keys has More Elements key String keys next Element value cache Index get key if value NOT FOUND cache Index remove key if the cache index is empty we don t need to save it if cache Index size 0 return try try to save cache index File Output Stream fos null fos new File Output Stream cache Location index Name try cache Index store fos null finally fos close catch IO Exception e failed to store cache index ignore  indexName cacheLocation cacheIndex hasMoreElements nextElement cacheIndex NOT_FOUND cacheIndex cacheIndex FileOutputStream FileOutputStream cacheLocation indexName cacheIndex IOException
TODO consider splitting this method into two or more steps it is too long static void startup String location String os String ws String nl PlatformURL Connection os os PlatformURL Connection ws ws PlatformURL Connection nl nl verify Location location check for platform location ignore errors String cache Props location trim if cache Props ends With File separator cache Props File separator cache Props CACHE PROP File cache Prop File new File cache Props Properties props null File Input Stream fis if cache Prop File exists load existing properties try props new Properties fis new File Input Stream cache Prop File try props load fis finally fis close catch IO Exception e props null if props null first time up or failed to load previous settings props new Properties String tmp System get Property user home NON NLS 1 if tmp ends With File separator tmp File separator tmp CACHE DIR props put CACHE LOCATION PROP tmp tmp Long to String new java util Date get Time props put CACHE PREFIX PROP tmp tmp CACHE INDEX props put CACHE INDEX PROP tmp save for next time around File Output Stream fos null try fos new File Output Stream cache Prop File try props store fos null finally fos close catch IO Exception e failed to store cache location metadata ignore remember settings for shutdown processing file Prefix String props get CACHE PREFIX PROP index Name String props get CACHE INDEX PROP cache Location String props get CACHE LOCATION PROP if DEBUG debug Startup Cache location cache Location NON NLS 1 debug Startup Cache index index Name NON NLS 1 debug Startup Cache file prefix file Prefix NON NLS 1 create cache directory structure if needed if verify Location cache Location index Name null cache Location null if DEBUG debug Startup Failed to create cache directory structure Caching suspended NON NLS 1 return attempt to initialize cache index if cache Location null index Name null try fis new File Input Stream cache Location index Name try cache Index load fis finally fis close catch IO Exception e if DEBUG debug Startup Failed to initialize cache NON NLS 1  PlatformURLConnection PlatformURLConnection PlatformURLConnection verifyLocation cacheProps cacheProps endsWith cacheProps cacheProps CACHE_PROP cachePropFile cacheProps FileInputStream cachePropFile FileInputStream cachePropFile IOException getProperty endsWith CACHE_DIR CACHE_LOCATION_PROP toString getTime CACHE_PREFIX_PROP CACHE_INDEX CACHE_INDEX_PROP FileOutputStream FileOutputStream cachePropFile IOException filePrefix CACHE_PREFIX_PROP indexName CACHE_INDEX_PROP cacheLocation CACHE_LOCATION_PROP debugStartup cacheLocation debugStartup indexName debugStartup filePrefix verifyLocation cacheLocation indexName cacheLocation debugStartup cacheLocation indexName FileInputStream cacheLocation indexName cacheIndex IOException debugStartup
private static boolean verify Location String location verify cache directory exists Create if needed File cache Dir new File location if cache Dir exists return true return cache Dir mkdirs  verifyLocation cacheDir cacheDir cacheDir

public static final String PROTOCOL SEPARATOR NON NLS 1 public PlatformURL Handler super  PROTOCOL_SEPARATOR PlatformURLHandler
public URL Connection open Connection URL url throws IO Exception Note open Connection method is made public rather than protected to enable request delegation from proxy handlers String spec url get File trim if spec starts With NON NLS 1 spec spec substring 1 int ix spec index Of NON NLS 1 if ix 1 throw new MalformedURL Exception Policy bind url invalidURL url to External Form NON NLS 1 String type spec substring 0 ix Constructor construct Constructor connection Type get type if construct null throw new MalformedURL Exception Policy bind url bad Variant type NON NLS 1 PlatformURL Connection connection null try connection PlatformURL Connection construct new Instance new Object url catch Exception e throw new IO Exception Policy bind url create Connection e get Message NON NLS 1 connection set ResolvedURL connection resolve return connection  URLConnection openConnection IOException openConnection getFile startsWith indexOf MalformedURLException toExternalForm connectionType MalformedURLException badVariant PlatformURLConnection PlatformURLConnection newInstance IOException createConnection getMessage setResolvedURL
public static void register String type Class connection Class try Constructor c connection Class get Constructor new Class URL class connection Type put type c catch No Such Method Exception e don t register connection classes that don t conform to the spec  connectionClass connectionClass getConstructor connectionType NoSuchMethodException

private org eclipse update configurator I Platform Configuration I Site Entry new Site Entry public Site Entry I Platform Configuration I Site Entry entry new Site Entry entry  IPlatformConfiguration ISiteEntry newSiteEntry SiteEntry IPlatformConfiguration ISiteEntry newSiteEntry
public URL getURL return new Site Entry getURL  newSiteEntry
public I Site Policy get Site Policy return new Site Policy new Site Entry get Site Policy  ISitePolicy getSitePolicy SitePolicy newSiteEntry getSitePolicy
public void set Site Policy I Site Policy policy new Site Entry set Site Policy Site Policy policy get New Policy  setSitePolicy ISitePolicy newSiteEntry setSitePolicy SitePolicy getNewPolicy
public String get Features return new Site Entry get Features  getFeatures newSiteEntry getFeatures
public String get Plugins return new Site Entry get Plugins  getPlugins newSiteEntry getPlugins
public long get Change Stamp return new Site Entry get Change Stamp  getChangeStamp newSiteEntry getChangeStamp
public long get Features Change Stamp return new Site Entry get Features Change Stamp  getFeaturesChangeStamp newSiteEntry getFeaturesChangeStamp
public long get Plugins Change Stamp return new Site Entry get Plugins Change Stamp  getPluginsChangeStamp newSiteEntry getPluginsChangeStamp
public boolean is Updateable return new Site Entry is Updateable  isUpdateable newSiteEntry isUpdateable
public boolean is Natively Linked return new Site Entry is Natively Linked  isNativelyLinked newSiteEntry isNativelyLinked
public org eclipse update configurator I Platform Configuration I Site Entry get New Site Entry return new Site Entry  IPlatformConfiguration ISiteEntry getNewSiteEntry newSiteEntry
public boolean equals Object o if o instanceof Site Entry return new Site Entry equals Site Entry o new Site Entry return false  SiteEntry newSiteEntry SiteEntry newSiteEntry
public int hash Code return new Site Entry hash Code  hashCode newSiteEntry hashCode

private I Platform Configuration I Site Policy new Policy public Site Policy I Platform Configuration I Site Policy policy new Policy policy  IPlatformConfiguration ISitePolicy newPolicy SitePolicy IPlatformConfiguration ISitePolicy newPolicy
public int get Type return new Policy get Type  getType newPolicy getType
public String get List return new Policy get List  getList newPolicy getList
public void set List String list new Policy set List list  setList newPolicy setList
public I Platform Configuration I Site Policy get New Policy return new Policy  IPlatformConfiguration ISitePolicy getNewPolicy newPolicy
public boolean equals Object o if o instanceof Site Policy return new Policy equals Site Policy o new Policy return false  SitePolicy newPolicy SitePolicy newPolicy
public int hash Code return new Policy hash Code  hashCode newPolicy hashCode

public static Start Level get Start Level Bundle Context context if start Level Tracker null start Level Tracker new Service Tracker context Start Level class get Name null start Level Tracker open return Start Level start Level Tracker get Service  StartLevel getStartLevel BundleContext startLevelTracker startLevelTracker ServiceTracker StartLevel getName startLevelTracker StartLevel startLevelTracker getService
public Bundle Context get Bundle Context return context  BundleContext getBundleContext
public Plugin Activator super  PluginActivator
public void start Bundle Context context throws Exception will bail if it is not time to start ensure Normal Startup context this context context Plugin Descriptor pd Plugin Descriptor Platform get Plugin Registry get Plugin Descriptor context get Bundle get Symbolic Name plugin pd get Plugin try plugin start context plugin startup catch Exception e plugin shutdown plugin stop context pd mark As Deactivated throw e  BundleContext ensureNormalStartup PluginDescriptor PluginDescriptor getPluginRegistry getPluginDescriptor getBundle getSymbolicName getPlugin markAsDeactivated
private void ensure Normal Startup Bundle Context context throws Bundle Exception TODO look at other ways of doing this to make it faster get Service is not as fast as we might like but it is not horrible Also we never close the tracker Start Level start Level get Start Level context if start Level null return if start Level get Start Level start Level get Bundle Start Level context get Bundle I Status status new Status I Status WARNING Platform PI RUNTIME 0 org eclipse core internal plugins Policy bind activator application Not Started context get Bundle get Symbolic Name null NON NLS 1 Internal Platform get Default log status throw new Bundle Exception status get Message  ensureNormalStartup BundleContext BundleException getService StartLevel startLevel getStartLevel startLevel startLevel getStartLevel startLevel getBundleStartLevel getBundle IStatus IStatus PI_RUNTIME applicationNotStarted getBundle getSymbolicName InternalPlatform getDefault BundleException getMessage
public void stop Bundle Context context throws Exception try plugin shutdown plugin stop context Plugin Descriptor plugin get Descriptor do Plugin Deactivation finally this context null  BundleContext PluginDescriptor getDescriptor doPluginDeactivation

public Content Description Qualified Name requested if requested I Content Description ALL flags FLAG ALL OPTIONS return if requested length 1 keys requested values new Object requested length else if requested length 1 keys requested 0 if requested length 0 then keys null no options to describe  ContentDescription QualifiedName IContentDescription FLAG_ALL_OPTIONS
private void assert Mutable if flags FLAG IMMUTABLE 0 throw new Illegal State Exception Content description is immutable NON NLS 1  assertMutable FLAG_IMMUTABLE IllegalStateException
see I Content Description public String get Charset byte bom byte get Property BYTE ORDER MARK if bom BOM UTF 8 return CHARSET UTF 8 NON NLS 1 else if bom BOM UTF 16BE bom BOM UTF 16LE UTF 16 will properly recognize the BOM return CHARSET UTF 16 NON NLS 1 return String get Property CHARSET  IContentDescription getCharset getProperty BYTE_ORDER_MARK BOM_UTF_8 CHARSET_UTF_8 BOM_UTF_16BE BOM_UTF_16LE CHARSET_UTF_16 getProperty
see I Content Description public I Content Type get Content Type return content Type  IContentDescription IContentType getContentType contentType
see I Content Description public Object get Property Qualified Name key no values have been set if values null return null a single property may have been set if keys instanceof Qualified Name return keys equals key values null multiple properties may have been set Qualified Name tmp Keys Qualified Name this keys for int i 0 i tmp Keys length i if tmp Keys i equals key return Object values i return null  IContentDescription getProperty QualifiedName QualifiedName QualifiedName tmpKeys QualifiedName tmpKeys tmpKeys
see I Content Description public boolean is Requested Qualified Name property Key all options requested if flags FLAG ALL OPTIONS 0 return true no options requested if keys null return false a single option requested if keys instanceof Qualified Name return keys equals property Key some but not all options requested Qualified Name tmp Keys Qualified Name this keys for int i 0 i tmp Keys length i if tmp Keys i equals property Key return true return false  IContentDescription isRequested QualifiedName propertyKey FLAG_ALL_OPTIONS QualifiedName propertyKey QualifiedName tmpKeys QualifiedName tmpKeys tmpKeys propertyKey
boolean is Set if keys null values null return false if keys instanceof Qualified Name return true Object tmp Values Object this values for int i 0 i tmp Values length i if tmp Values i null return true return false  isSet QualifiedName tmpValues tmpValues tmpValues
public void mark Immutable assert Mutable flags FLAG IMMUTABLE  markImmutable assertMutable FLAG_IMMUTABLE
void set Content Type I Content Type content Type mark Immutable this content Type content Type  setContentType IContentType contentType markImmutable contentType contentType
see I Content Description public void set Property Qualified Name new Key Object new Value assert Mutable if keys null if flags FLAG ALL OPTIONS 0 keys new Key values new Value return if keys equals new Key values new Value return if keys instanceof Qualified Name if flags FLAG ALL OPTIONS 0 keys new Qualified Name Qualified Name keys new Key values new Object values new Value return Qualified Name tmp Keys Qualified Name this keys for int i 0 i tmp Keys length i if tmp Keys i equals new Key Object values i new Value return if flags FLAG ALL OPTIONS 0 return need to resize arrays int current Size tmp Keys length tmp Keys new Qualified Name current Size 1 System arraycopy keys 0 tmp Keys 0 current Size Object tmp Values new Object current Size 1 System arraycopy values 0 tmp Values 0 current Size tmp Keys tmp Keys length 1 new Key tmp Values tmp Values length 1 new Value keys tmp Keys values tmp Values  IContentDescription setProperty QualifiedName newKey newValue assertMutable FLAG_ALL_OPTIONS newKey newValue newKey newValue QualifiedName FLAG_ALL_OPTIONS QualifiedName QualifiedName newKey newValue QualifiedName tmpKeys QualifiedName tmpKeys tmpKeys newKey newValue FLAG_ALL_OPTIONS currentSize tmpKeys tmpKeys QualifiedName currentSize tmpKeys currentSize tmpValues currentSize tmpValues currentSize tmpKeys tmpKeys newKey tmpValues tmpValues newValue tmpKeys tmpValues
public String to String String Buffer result new String Buffer NON NLS 1 if keys null if keys instanceof Qualified Name if values null result append keys values NON NLS 1 else Qualified Name tmp Keys Qualified Name keys Object tmp Values Object values boolean any false for int i 0 i tmp Keys length i if tmp Values i null result append tmp Keys i tmp Values i NON NLS 1 NON NLS 2 any true if any result delete Char At result length 1 result append NON NLS 1 result append content Type return result to String  toString StringBuffer StringBuffer QualifiedName QualifiedName tmpKeys QualifiedName tmpValues tmpKeys tmpValues tmpKeys tmpValues deleteCharAt contentType toString

A placeholder for missing invalid binary text describers private class Invalid Describer implements I Content Describer I Text Content Describer public int describe Input Stream contents I Content Description description throws IO Exception return INVALID  InvalidDescriber IContentDescriber ITextContentDescriber InputStream IContentDescription IOException
public int describe Reader contents I Content Description description throws IO Exception return INVALID  IContentDescription IOException
public Qualified Name get Supported Options return new Qualified Name 0  QualifiedName getSupportedOptions QualifiedName
public static Content Type create Content Type Content Type Manager manager String namespace String simple Id String name byte priority String file Extensions String file Names String base Type Id String default Charset I Configuration Element content Type Element Content Type content Type new Content Type manager content Type default Description new Default Description content Type content Type simple Id simple Id content Type namespace namespace content Type name name content Type priority priority if file Extensions null file Extensions length 0 file Names null file Names length 0 content Type file Specs new Array List file Extensions length file Names length for int i 0 i file Names length i content Type file Specs add create File Spec file Names i FILE NAME SPEC SPEC PRE DEFINED for int i 0 i file Extensions length i content Type file Specs add create File Spec file Extensions i FILE EXTENSION SPEC SPEC PRE DEFINED content Type default Charset default Charset content Type content Type Element content Type Element content Type base Type Id base Type Id return content Type  ContentType createContentType ContentTypeManager simpleId fileExtensions fileNames baseTypeId defaultCharset IConfigurationElement contentTypeElement ContentType contentType ContentType contentType defaultDescription DefaultDescription contentType contentType simpleId simpleId contentType contentType contentType fileExtensions fileExtensions fileNames fileNames contentType fileSpecs ArrayList fileExtensions fileNames fileNames contentType fileSpecs createFileSpec fileNames FILE_NAME_SPEC SPEC_PRE_DEFINED fileExtensions contentType fileSpecs createFileSpec fileExtensions FILE_EXTENSION_SPEC SPEC_PRE_DEFINED contentType defaultCharset defaultCharset contentType contentTypeElement contentTypeElement contentType baseTypeId baseTypeId contentType
static File Spec create File Spec String file Spec int type return new File Spec file Spec type  FileSpec createFileSpec fileSpec FileSpec fileSpec
private static String get Preference Key int flags if flags FILE EXTENSION SPEC 0 return PREF FILE EXTENSIONS if flags FILE NAME SPEC 0 return PREF FILE NAMES throw new Illegal Argument Exception Unknown type flags NON NLS 1  getPreferenceKey FILE_EXTENSION_SPEC PREF_FILE_EXTENSIONS FILE_NAME_SPEC PREF_FILE_NAMES IllegalArgumentException
static String parse Items String string if string null return new String 0 String Tokenizer tokenizer new String Tokenizer string NON NLS 1 if tokenizer has More Tokens return new String 0 String first tokenizer next Token if tokenizer has More Tokens return new String first Array List items new Array List items add first do items add tokenizer next Token while tokenizer has More Tokens return String items to Array new String items size  parseItems StringTokenizer StringTokenizer hasMoreTokens nextToken hasMoreTokens ArrayList ArrayList nextToken hasMoreTokens toArray
static String to List String List list if list is Empty return NON NLS 1 String Buffer result new String Buffer for Iterator i list iterator i has Next result append i next result append ignore last comma return result substring 0 result length 1  toListString isEmpty StringBuffer StringBuffer hasNext
static String to List String Object list if list length 0 return NON NLS 1 String Buffer result new String Buffer for int i 0 i list length i result append list result append ignore last comma return result substring 0 result length 1  toListString StringBuffer StringBuffer
public Content Type Content Type Manager manager this manager manager  ContentType ContentTypeManager
public synchronized void add File Spec String file Spec int type throws Core Exception if alias Target null get Target add File Spec file Spec type return if type FILE EXTENSION SPEC type FILE NAME SPEC throw new Illegal Argument Exception Unknown type type NON NLS 1 if internal Add File Spec file Spec type SPEC USER DEFINED return persist using preferences String key get Preference Key type Preferences content Type Node manager get Preferences node get Id TODO are we including user and plug in provided file specs here content Type Node put key to List String file Specs try content Type Node flush catch Backing Store Exception bse String message Policy bind content error Saving Settings get Id NON NLS 1 I Status status new Status I Status ERROR Platform PI RUNTIME 0 message bse throw new Core Exception status  addFileSpec fileSpec CoreException aliasTarget getTarget addFileSpec fileSpec FILE_EXTENSION_SPEC FILE_NAME_SPEC IllegalArgumentException internalAddFileSpec fileSpec SPEC_USER_DEFINED getPreferenceKey contentTypeNode getPreferences getId contentTypeNode toListString fileSpecs contentTypeNode BackingStoreException errorSavingSettings getId IStatus IStatus PI_RUNTIME CoreException
int describe I Content Describer selected Describer Input Stream contents Content Description description try return selected Describer describe contents description catch IO Exception ioe if Content Type Manager DEBUGGING String message Policy bind content error Reading Contents get Id NON NLS 1 log message ioe return I Content Describer INVALID catch Runtime Exception re describer seems to be buggy just disable it logging the reason invalidate Describer re return I Content Describer INVALID catch Error e describer got some serious problem disable it logging the reason and throw the error again invalidate Describer e throw e finally Lazy Input Stream contents reset  IContentDescriber selectedDescriber InputStream ContentDescription selectedDescriber IOException ContentTypeManager errorReadingContents getId IContentDescriber RuntimeException invalidateDescriber IContentDescriber invalidateDescriber LazyInputStream
int describe I Text Content Describer selected Describer Reader contents Content Description description try return selected Describer describe contents description catch IO Exception ioe if Content Type Manager DEBUGGING String message Policy bind content error Reading Contents get Id NON NLS 1 log message ioe return I Content Describer INVALID catch Runtime Exception re describer seems to be buggy just disable it logging the reason invalidate Describer re return I Content Describer INVALID catch Error e describer got some serious problem disable it logging the reason and throw the error again invalidate Describer e throw e finally try contents reset catch IO Exception ioe this should only happen if the describer closed the reader it should not String message Policy bind content error Reading Contents get Id NON NLS 1 log message ioe  ITextContentDescriber selectedDescriber ContentDescription selectedDescriber IOException ContentTypeManager errorReadingContents getId IContentDescriber RuntimeException invalidateDescriber IContentDescriber invalidateDescriber IOException errorReadingContents getId
public I Content Type get Base Type if alias Target null return get Target get Base Type if base Type Id null return null Content Type original Base Type manager internal Get Content Type base Type Id return original Base Type null original Base Type get Target null  IContentType getBaseType aliasTarget getTarget getBaseType baseTypeId ContentType originalBaseType internalGetContentType baseTypeId originalBaseType originalBaseType getTarget
String get Base Type Id return base Type Id  getBaseTypeId baseTypeId
I Content Type get Children if children null children manager get Children this return children  IContentType getChildren getChildren
see I Content Type public String get Default Charset if alias Target null return get Target get Default Charset Preferences content Type Node manager get Preferences node get Id String current Charset content Type Node get PREF DEFAULT CHARSET internal Get Default Charset an empty string as charset means no default charset return equals current Charset null current Charset NON NLS 1  IContentType getDefaultCharset aliasTarget getTarget getDefaultCharset contentTypeNode getPreferences getId currentCharset contentTypeNode PREF_DEFAULT_CHARSET internalGetDefaultCharset currentCharset currentCharset
public I Content Description get Default Description if alias Target null return get Target get Default Description return default Description  IContentDescription getDefaultDescription aliasTarget getTarget getDefaultDescription defaultDescription
public int get Depth Content Type base Type Content Type get Base Type if base Type null return 0 return 1 base Type get Depth  getDepth ContentType baseType ContentType getBaseType baseType baseType getDepth
public I Content Describer get Describer if alias Target null return get Target get Describer if is specified no describer should be created if equals content Type Element get Attribute As Is DESCRIBER ELEMENT NON NLS 1 return null synchronized this if describer null return describer if content Type Element get Children DESCRIBER ELEMENT length 0 content Type Element get Attribute As Is DESCRIBER ELEMENT null try return describer I Content Describer content Type Element create Executable Extension DESCRIBER ELEMENT catch Core Exception ce the content type definition was invalid Ensure we don t try again and this content type does not accept any contents return invalidate Describer ce Content Type base Type Content Type get Base Type return base Type null null base Type get Describer  IContentDescriber getDescriber aliasTarget getTarget getDescriber contentTypeElement getAttributeAsIs DESCRIBER_ELEMENT contentTypeElement getChildren DESCRIBER_ELEMENT contentTypeElement getAttributeAsIs DESCRIBER_ELEMENT IContentDescriber contentTypeElement createExecutableExtension DESCRIBER_ELEMENT CoreException invalidateDescriber ContentType baseType ContentType getBaseType baseType baseType getDescriber
see I Content Type public I Content Description get Description For Input Stream contents Qualified Name options throws IO Exception Input Stream buffer Content Type Manager read Buffer contents if buffer null return default Description return internal Get Description For buffer options  IContentType IContentDescription getDescriptionFor InputStream QualifiedName IOException InputStream ContentTypeManager readBuffer defaultDescription internalGetDescriptionFor
see I Content Type public I Content Description get Description For Reader contents Qualified Name options throws IO Exception Reader buffer Content Type Manager read Buffer contents if buffer null return default Description return internal Get Description For buffer options  IContentType IContentDescription getDescriptionFor QualifiedName IOException ContentTypeManager readBuffer defaultDescription internalGetDescriptionFor
public String get File Specs int type Mask if alias Target null return get Target get File Specs type Mask if file Specs null return new String 0 invert the last two bits so it is easier to compare type Mask IGNORE PRE DEFINED IGNORE USER DEFINED List result new Array List file Specs size for Iterator i file Specs iterator i has Next File Spec spec File Spec i next if spec get Type type Mask spec get Type result add spec get Text return String result to Array new String result size  getFileSpecs typeMask aliasTarget getTarget getFileSpecs typeMask fileSpecs typeMask IGNORE_PRE_DEFINED IGNORE_USER_DEFINED ArrayList fileSpecs fileSpecs hasNext FileSpec FileSpec getType typeMask getType getText toArray
public String get Id return namespace simple Id  getId simpleId
public String get Name return name  getName
byte get Priority return priority  getPriority
String get Simple Id return simple Id  getSimpleId simpleId
Content Type get Target if alias Target null return this return alias Target get Target  ContentType getTarget aliasTarget aliasTarget getTarget
byte get Validation return validation  getValidation
boolean has Any File Spec return file Specs null file Specs is Empty  hasAnyFileSpec fileSpecs fileSpecs isEmpty
param text the file spec string param type Mask FILE NAME SPEC or FILE EXTENSION SPEC return true if this file spec has already been added false otherwise private boolean has File Spec String text int type Mask if file Specs null return false for Iterator i file Specs iterator i has Next File Spec spec File Spec i next if spec equals text type Mask return true return false  typeMask FILE_NAME_SPEC FILE_EXTENSION_SPEC hasFileSpec typeMask fileSpecs fileSpecs hasNext FileSpec FileSpec typeMask
boolean internal Add File Spec String file Spec int type Mask if has File Spec file Spec type Mask return false if alias Target null return alias Target internal Add File Spec file Spec type Mask if file Specs null file Specs new Array List 3 file Specs add create File Spec file Spec type Mask return true  internalAddFileSpec fileSpec typeMask hasFileSpec fileSpec typeMask aliasTarget aliasTarget internalAddFileSpec fileSpec typeMask fileSpecs fileSpecs ArrayList fileSpecs createFileSpec fileSpec typeMask
private String internal Get Default Charset if default Charset null Content Type base Type Content Type get Base Type return base Type null null base Type get Default Charset return default Charset  internalGetDefaultCharset defaultCharset ContentType baseType ContentType getBaseType baseType baseType getDefaultCharset defaultCharset
I Content Description internal Get Description For Input Stream buffer Qualified Name options if alias Target null return get Target internal Get Description For buffer options if buffer null return default Description I Content Describer describer this get Describer no describer just return the default description if describer null return default Description Content Description description new Content Description options describe describer buffer description if the describer didn t add any details just return the default description if description is Set return default Description check if any of the defaults need to be applied if description is Requested I Content Description CHARSET description get Property I Content Description CHARSET null description set Property I Content Description CHARSET get Default Charset description set Content Type this return description  IContentDescription internalGetDescriptionFor InputStream QualifiedName aliasTarget getTarget internalGetDescriptionFor defaultDescription IContentDescriber getDescriber defaultDescription ContentDescription ContentDescription isSet defaultDescription isRequested IContentDescription getProperty IContentDescription setProperty IContentDescription getDefaultCharset setContentType
I Content Description internal Get Description For Reader buffer Qualified Name options if alias Target null return get Target internal Get Description For buffer options if buffer null return default Description I Content Describer describer this get Describer no describer just return the default description if describer null return default Description Content Description description new Content Description options if describer instanceof I Text Content Describer throw new Unsupported Operation Exception describe I Text Content Describer describer buffer description if the describer didn t add any details just return the default description if description is Set return default Description check if any of the defaults need to be applied if description is Requested I Content Description CHARSET description get Property I Content Description CHARSET null description set Property I Content Description CHARSET get Default Charset description set Content Type this return description  IContentDescription internalGetDescriptionFor QualifiedName aliasTarget getTarget internalGetDescriptionFor defaultDescription IContentDescriber getDescriber defaultDescription ContentDescription ContentDescription ITextContentDescriber UnsupportedOperationException ITextContentDescriber isSet defaultDescription isRequested IContentDescription getProperty IContentDescription setProperty IContentDescription getDefaultCharset setContentType
public byte internal Is Associated With String file Name if alias Target null return get Target internal Is Associated With file Name if file Specs null I Content Type base Type get Base Type return base Type null NOT ASSOCIATED Content Type base Type internal Is Associated With file Name if has File Spec file Name FILE NAME SPEC return ASSOCIATED BY NAME String file Extension Content Type Manager get File Extension file Name return file Extension null has File Spec file Extension FILE EXTENSION SPEC NOT ASSOCIATED ASSOCIATED BY EXTENSION  internalIsAssociatedWith fileName aliasTarget getTarget internalIsAssociatedWith fileName fileSpecs IContentType baseType getBaseType baseType NOT_ASSOCIATED ContentType baseType internalIsAssociatedWith fileName hasFileSpec fileName FILE_NAME_SPEC ASSOCIATED_BY_NAME fileExtension ContentTypeManager getFileExtension fileName fileExtension hasFileSpec fileExtension FILE_EXTENSION_SPEC NOT_ASSOCIATED ASSOCIATED_BY_EXTENSION
void internal Remove File Spec String file Spec int type Mask if alias Target null alias Target internal Remove File Spec file Spec type Mask return if file Specs null return for Iterator i file Specs iterator i has Next File Spec spec File Spec i next if spec get Type type Mask file Spec equals spec get Text i remove return  internalRemoveFileSpec fileSpec typeMask aliasTarget aliasTarget internalRemoveFileSpec fileSpec typeMask fileSpecs fileSpecs hasNext FileSpec FileSpec getType typeMask fileSpec getText
private I Content Describer invalidate Describer Throwable reason set Validation STATUS INVALID String message Policy bind content invalid Content Describer get Id NON NLS 1 log message reason return describer new Invalid Describer  IContentDescriber invalidateDescriber setValidation STATUS_INVALID invalidContentDescriber getId InvalidDescriber
public boolean is Associated With String file Name return internal Is Associated With file Name NOT ASSOCIATED  isAssociatedWith fileName internalIsAssociatedWith fileName NOT_ASSOCIATED
public boolean is Kind Of I Content Type another if another null return false if alias Target null return get Target is Kind Of another if this another return true if get Depth Content Type another get Depth return false I Content Type base Type get Base Type return base Type null base Type is Kind Of another  isKindOf IContentType aliasTarget getTarget isKindOf getDepth ContentType getDepth IContentType baseType getBaseType baseType baseType isKindOf
public boolean is Text return is Kind Of manager get Content Type I Content Type Manager CT TEXT  isText isKindOf getContentType IContentTypeManager CT_TEXT
boolean is Valid return validation STATUS VALID  isValid STATUS_VALID
private void log String message Throwable reason don t log Core Exceptions again I Status status new Status I Status ERROR Platform PI RUNTIME 0 message reason instanceof Core Exception null reason Internal Platform get Default log status  CoreExceptions IStatus IStatus PI_RUNTIME CoreException InternalPlatform getDefault
public synchronized void remove File Spec String file Spec int type throws Core Exception if alias Target null get Target remove File Spec file Spec type return if type FILE EXTENSION SPEC type FILE NAME SPEC throw new Illegal Argument Exception Unknown type type NON NLS 1 internal Remove File Spec file Spec type SPEC USER DEFINED persist using preferences String key get Preference Key type Preferences content Type Node manager get Preferences node get Id content Type Node put key to List String file Specs try content Type Node flush catch Backing Store Exception bse String message Policy bind content error Saving Settings get Id NON NLS 1 I Status status new Status I Status ERROR Platform PI RUNTIME 0 message bse throw new Core Exception status  removeFileSpec fileSpec CoreException aliasTarget getTarget removeFileSpec fileSpec FILE_EXTENSION_SPEC FILE_NAME_SPEC IllegalArgumentException internalRemoveFileSpec fileSpec SPEC_USER_DEFINED getPreferenceKey contentTypeNode getPreferences getId contentTypeNode toListString fileSpecs contentTypeNode BackingStoreException errorSavingSettings getId IStatus IStatus PI_RUNTIME CoreException
void set Alias Target Content Type new Target when changing the target it must be cleared first if alias Target null new Target null return don t allow a sub type to be made into an alias to the base type if alias Target null is Kind Of new Target return if Content Type Manager DEBUGGING Policy debug Setting alias target for this new Target NON NLS 1 NON NLS 2 alias Target new Target  setAliasTarget ContentType newTarget aliasTarget newTarget aliasTarget isKindOf newTarget ContentTypeManager newTarget aliasTarget newTarget
public void set Default Charset String user Charset throws Core Exception Preferences content Type Node manager get Preferences node get Id if user Charset null content Type Node remove PREF DEFAULT CHARSET else content Type Node put PREF DEFAULT CHARSET user Charset try content Type Node flush catch Backing Store Exception bse String message Policy bind content error Saving Settings get Id NON NLS 1 I Status status new Status I Status ERROR Platform PI RUNTIME 0 message bse throw new Core Exception status  setDefaultCharset userCharset CoreException contentTypeNode getPreferences getId userCharset contentTypeNode PREF_DEFAULT_CHARSET contentTypeNode PREF_DEFAULT_CHARSET userCharset contentTypeNode BackingStoreException errorSavingSettings getId IStatus IStatus PI_RUNTIME CoreException
void set Validation byte validation this validation validation if Content Type Manager DEBUGGING Policy debug Validating this get Validation String validation NON NLS 1 NON NLS 2  setValidation ContentTypeManager getValidationString
private static String get Validation String byte validation return validation STATUS VALID VALID validation STATUS INVALID INVALID UNKNOWN NON NLS 1 NON NLS 2 NON NLS 3  getValidationString STATUS_VALID STATUS_INVALID
public String to String return get Id  toString getId
public boolean is Alias return alias Target null  isAlias aliasTarget

private Map orphan Associations new Hash Map public Content Type Builder Content Type Manager catalog this catalog catalog  orphanAssociations HashMap ContentTypeBuilder ContentTypeManager
private void add File Association I Configuration Element file Association Element Content Type target String file Names Content Type parse Items file Association Element get Attribute As Is file names NON NLS 1 for int i 0 i file Names length i target internal Add File Spec file Names i I Content Type FILE NAME SPEC Content Type SPEC PRE DEFINED String file Extensions Content Type parse Items file Association Element get Attribute As Is file extensions NON NLS 1 for int i 0 i file Extensions length i target internal Add File Spec file Extensions i I Content Type FILE EXTENSION SPEC Content Type SPEC PRE DEFINED  addFileAssociation IConfigurationElement fileAssociationElement ContentType fileNames ContentType parseItems fileAssociationElement getAttributeAsIs fileNames internalAddFileSpec fileNames IContentType FILE_NAME_SPEC ContentType SPEC_PRE_DEFINED fileExtensions ContentType parseItems fileAssociationElement getAttributeAsIs fileExtensions internalAddFileSpec fileExtensions IContentType FILE_EXTENSION_SPEC ContentType SPEC_PRE_DEFINED
Builds all content types found in the extension registry public void build Content Types I Configuration Element all Content TypeC Es get Configuration Elements for int i 0 i all Content TypeC Es length i if all Content TypeC Es i get Name equals content type NON NLS 1 register Content Type all Content TypeC Es i for int i 0 i all Content TypeC Es length i if all Content TypeC Es i get Name equals file association NON NLS 1 register File Association all Content TypeC Es i validate Catalog  buildContentTypes IConfigurationElement allContentTypeCEs getConfigurationElements allContentTypeCEs allContentTypeCEs getName registerContentType allContentTypeCEs allContentTypeCEs allContentTypeCEs getName registerFileAssociation allContentTypeCEs validateCatalog
public Content Type create Content Type I Configuration Element content TypeCE TODO need to ensure the config element is valid String simple Id content TypeCE get Attribute As Is id NON NLS 1 byte priority parse Priority content TypeCE get Attribute As Is priority NON NLS 1 String namespace content TypeCE get Declaring Extension get Namespace String name content TypeCE get Attribute name NON NLS 1 String file Names Content Type parse Items content TypeCE get Attribute As Is file names NON NLS 1 String file Extensions Content Type parse Items content TypeCE get Attribute As Is file extensions NON NLS 1 String base Type Id get Unique Id namespace content TypeCE get Attribute As Is base type NON NLS 1 String default Charset content TypeCE get Attribute As Is default charset NON NLS 1 return Content Type create Content Type catalog namespace simple Id name priority file Extensions file Names base Type Id default Charset content TypeCE  ContentType createContentType IConfigurationElement contentTypeCE simpleId contentTypeCE getAttributeAsIs parsePriority contentTypeCE getAttributeAsIs contentTypeCE getDeclaringExtension getNamespace contentTypeCE getAttribute fileNames ContentType parseItems contentTypeCE getAttributeAsIs fileExtensions ContentType parseItems contentTypeCE getAttributeAsIs baseTypeId getUniqueId contentTypeCE getAttributeAsIs defaultCharset contentTypeCE getAttributeAsIs ContentType createContentType simpleId fileExtensions fileNames baseTypeId defaultCharset contentTypeCE
protected I Configuration Element get Configuration Elements I Extension Registry registry Internal Platform get Default get Registry I Extension Point content TypesXP registry get Extension Point Platform PI RUNTIME PT CONTENTTYPES I Configuration Element all Content TypeC Es content TypesXP get Configuration Elements return all Content TypeC Es  IConfigurationElement getConfigurationElements IExtensionRegistry InternalPlatform getDefault getRegistry IExtensionPoint contentTypesXP getExtensionPoint PI_RUNTIME PT_CONTENTTYPES IConfigurationElement allContentTypeCEs contentTypesXP getConfigurationElements allContentTypeCEs
private byte parse Priority String priority if priority null return Content Type PRIORITY NORMAL if priority equals high NON NLS 1 return Content Type PRIORITY HIGH if priority equals low NON NLS 1 return Content Type PRIORITY LOW if priority equals normal NON NLS 1 return Content Type PRIORITY NORMAL TODO should log INVALID PRIORITY return Content Type PRIORITY NORMAL  parsePriority ContentType PRIORITY_NORMAL ContentType PRIORITY_HIGH ContentType PRIORITY_LOW ContentType PRIORITY_NORMAL ContentType PRIORITY_NORMAL
protected void register Content Type I Configuration Element content TypeCE TODO need to ensure the config element is valid Content Type content Type create Content Type content TypeCE if is Complete content Type return catalog add Content Type content Type ensure orphan associations are added Set orphans Set orphan Associations remove content Type get Id if orphans null return for Iterator iter orphans iterator iter has Next add File Association I Configuration Element iter next content Type  registerContentType IConfigurationElement contentTypeCE ContentType contentType createContentType contentTypeCE isComplete contentType addContentType contentType orphanAssociations contentType getId hasNext addFileAssociation IConfigurationElement contentType
Checks whether the content type has all required pieces private boolean is Complete Content Type content Type String message null if content Type get Simple Id null message Policy bind content missing Identifier content Type get Id NON NLS 1 else if content Type get Name null message Policy bind content missing Name content Type get Id NON NLS 1 if message null return true I Status status new Status I Status ERROR Platform PI RUNTIME 0 message null Internal Platform get Default log status return false  isComplete ContentType contentType contentType getSimpleId missingIdentifier contentType getId contentType getName missingName contentType getId IStatus IStatus PI_RUNTIME InternalPlatform getDefault
private void register File Association I Configuration Element file Association Element TODO need to ensure the config element is valid String content Type Id get Unique Id file Association Element get Declaring Extension get Namespace file Association Element get Attribute content type NON NLS 1 Content Type target catalog internal Get Content Type content Type Id if target null the content type is not available yet remember it as orphan Set orphans Set orphan Associations get content Type Id if orphans null orphan Associations put content Type Id orphans new Hash Set 3 orphans add file Association Element return add File Association file Association Element target  registerFileAssociation IConfigurationElement fileAssociationElement contentTypeId getUniqueId fileAssociationElement getDeclaringExtension getNamespace fileAssociationElement getAttribute ContentType internalGetContentType contentTypeId orphanAssociations contentTypeId orphanAssociations contentTypeId HashSet fileAssociationElement addFileAssociation fileAssociationElement
private static String get Unique Id String namespace String base Type Id if base Type Id null return null int separator Position base Type Id last Index Of base type is defined in the same namespace if separator Position 1 base Type Id namespace base Type Id return base Type Id  getUniqueId baseTypeId baseTypeId separatorPosition baseTypeId lastIndexOf separatorPosition baseTypeId baseTypeId baseTypeId
public void registry Changed I Registry Change Event event I Extension Delta deltas event get Extension Deltas Platform PI RUNTIME PT CONTENTTYPES for int i 0 i deltas length i I Configuration Element config Elements deltas i get Extension get Configuration Elements if deltas i get Kind I Extension Delta ADDED for int j 0 i config Elements length i if config Elements j get Name equals content type NON NLS 1 register Content Type config Elements j for int j 0 i config Elements length i if config Elements j get Name equals file association NON NLS 1 register File Association config Elements j else TODO should unregister removed types TODO remove any involved orphans as well ensure there are no orphan types cycles validate Catalog  registryChanged IRegistryChangeEvent IExtensionDelta getExtensionDeltas PI_RUNTIME PT_CONTENTTYPES IConfigurationElement configElements getExtension getConfigurationElements getKind IExtensionDelta configElements configElements getName registerContentType configElements configElements configElements getName registerFileAssociation configElements validateCatalog
public void startup Internal Platform get Default get Registry add Registry Change Listener this Platform PI RUNTIME  InternalPlatform getDefault getRegistry addRegistryChangeListener PI_RUNTIME
protected void validate Catalog catalog reorganize  validateCatalog

private Comparator conflict Comparator new Comparator public int compare Object o1 Object o2 Content Type type1 Content Type o1 Content Type type2 Content Type o2 first criteria depth the lower the better int depth Criteria type1 get Depth type2 get Depth if depth Criteria 0 return depth Criteria second criteria priority the higher the better int priority Criteria type1 get Priority type2 get Priority if priority Criteria 0 return priority Criteria to ensure stability return type1 get Id compare To type2 get Id  conflictComparator ContentType ContentType ContentType ContentType depthCriteria getDepth getDepth depthCriteria depthCriteria priorityCriteria getPriority getPriority priorityCriteria priorityCriteria getId compareTo getId
private Comparator depth Comparator new Comparator public int compare Object o1 Object o2 return Content Type o2 get Depth Content Type o1 get Depth  depthComparator ContentType getDepth ContentType getDepth
Returns the extension for a file name omiting the leading static String get File Extension String file Name int dot Position file Name last Index Of return dot Position 1 dot Position file Name length 1 null file Name substring dot Position 1  getFileExtension fileName dotPosition fileName lastIndexOf dotPosition dotPosition fileName fileName dotPosition
public synchronized static Content Type Manager get Instance if instance null return instance instance new Content Type Manager instance startup return instance  ContentTypeManager getInstance ContentTypeManager
Returns null if no bytes can be read protected static Lazy Input Stream read Buffer Input Stream contents return new Lazy Input Stream contents MARK LIMIT  LazyInputStream readBuffer InputStream LazyInputStream MARK_LIMIT
protected static Lazy Reader read Buffer Reader contents return new Lazy Reader contents MARK LIMIT  LazyReader readBuffer LazyReader MARK_LIMIT
Constructs a new content type manager protected Content Type Manager just to set visibility  ContentTypeManager
protected void add Content Type I Content Type content Type catalog put content Type get Id content Type  addContentType IContentType contentType contentType getId contentType
private void add File Spec Contributor I Content Type content Type int file Spec Type Map file Specs Map String file Specs content Type get File Specs file Spec Type for int i 0 i file Specs length i String mapping Key File Spec get Mapping Key For file Specs i Set existing Set file Specs Map get mapping Key if existing null file Specs Map put mapping Key existing new Tree Set conflict Comparator existing add content Type  addFileSpecContributor IContentType contentType fileSpecType fileSpecsMap fileSpecs contentType getFileSpecs fileSpecType fileSpecs mappingKey FileSpec getMappingKeyFor fileSpecs fileSpecsMap mappingKey fileSpecsMap mappingKey TreeSet conflictComparator contentType
protected Content Type Builder create Builder return new Content Type Builder this  ContentTypeBuilder createBuilder ContentTypeBuilder
A content type will be valid if ol li it does not designate a base type or li li it designates a base type that exists and is valid li ol private boolean ensure Valid Content Type type if type get Validation Content Type STATUS UNKNOWN return type is Valid if type get Base Type Id null type set Validation Content Type STATUS VALID return true Content Type base Type Content Type catalog get type get Base Type Id if base Type null type set Validation Content Type STATUS INVALID return false set this type temporarily as invalid to prevent cycles all types in a cycle would stay as invalid type set Validation Content Type STATUS INVALID ensure Valid base Type base type is either valid or invalid type will have the same status type set Validation base Type get Validation return type is Valid  ensureValid ContentType getValidation ContentType STATUS_UNKNOWN isValid getBaseTypeId setValidation ContentType STATUS_VALID ContentType baseType ContentType getBaseTypeId baseType setValidation ContentType STATUS_INVALID setValidation ContentType STATUS_INVALID ensureValid baseType setValidation baseType getValidation isValid
see I Content Type Manager public I Content Type find Content Type For Input Stream contents String file Name throws IO Exception I Content Type all find Content Types For contents file Name return all length 0 all 0 null  IContentTypeManager IContentType findContentTypeFor InputStream fileName IOException IContentType findContentTypesFor fileName
see I Content Type Manager public I Content Type find Content Type For String file Name basic implementation just gets all content types I Content Type associated find Content Types For file Name return associated length 0 null associated 0  IContentTypeManager IContentType findContentTypeFor fileName IContentType findContentTypesFor fileName
see I Content Type Manager public I Content Type find Content Types For Input Stream contents String file Name throws IO Exception I Content Type subset file Name null find Content Types For file Name get All Content Types Input Stream buffer read Buffer contents return internal Find Content Types For buffer subset  IContentTypeManager IContentType findContentTypesFor InputStream fileName IOException IContentType fileName findContentTypesFor fileName getAllContentTypes InputStream readBuffer internalFindContentTypesFor
see I Content Type Manager public I Content Type find Content Types For String file Name List result new Array List 5 int count 0 files associated by name should appear before those associated by extension Sorted Set all By File Name Sorted Set file Names get File Spec get Mapping Key For file Name if all By File Name null all By File Name is Empty Content Type main Content Type all By File Name first get Target result add count main I Content Type children main get Children for int i 0 i children length i Content Type child Content Type children i must avoid duplicates and ensure children do not override filespecs if child internal Is Associated With file Name Content Type ASSOCIATED BY NAME result contains child result add count child String file Extension get File Extension file Name if file Extension null Sorted Set all By File Extension Sorted Set file Extensions get File Spec get Mapping Key For file Extension if all By File Extension null all By File Extension is Empty Content Type main Content Type all By File Extension first get Target if result contains main result add count main I Content Type children main get Children for int i 0 i children length i Content Type child Content Type children i if child internal Is Associated With file Name Content Type ASSOCIATED BY EXTENSION result contains children i result add count children i return I Content Type result to Array new I Content Type result size  IContentTypeManager IContentType findContentTypesFor fileName ArrayList SortedSet allByFileName SortedSet fileNames FileSpec getMappingKeyFor fileName allByFileName allByFileName isEmpty ContentType ContentType allByFileName getTarget IContentType getChildren ContentType ContentType internalIsAssociatedWith fileName ContentType ASSOCIATED_BY_NAME fileExtension getFileExtension fileName fileExtension SortedSet allByFileExtension SortedSet fileExtensions FileSpec getMappingKeyFor fileExtension allByFileExtension allByFileExtension isEmpty ContentType ContentType allByFileExtension getTarget IContentType getChildren ContentType ContentType internalIsAssociatedWith fileName ContentType ASSOCIATED_BY_EXTENSION IContentType toArray IContentType
see I Content Type Manager public I Content Type get All Content Types List result new Array List catalog size for Iterator i catalog values iterator i has Next Content Type type Content Type i next if type is Valid type is Alias result add type return I Content Type result to Array new I Content Type result size  IContentTypeManager IContentType getAllContentTypes ArrayList hasNext ContentType ContentType isValid isAlias IContentType toArray IContentType
TODO need better performance here public I Content Type get Children I Content Type parent List result new Array List 5 for Iterator i this catalog values iterator i has Next I Content Type next I Content Type i next if next parent next is Kind Of parent result add next return I Content Type result to Array new I Content Type result size  IContentType getChildren IContentType ArrayList hasNext IContentType IContentType isKindOf IContentType toArray IContentType
see I Content Type Manager public I Content Type get Content Type String content Type Identifier Content Type type internal Get Content Type content Type Identifier return type null type is Valid type is Alias type null  IContentTypeManager IContentType getContentType contentTypeIdentifier ContentType internalGetContentType contentTypeIdentifier isValid isAlias
see I Content Type Manager public I Content Description get Description For Input Stream contents String file Name Qualified Name options throws IO Exception naive implementation for now Input Stream buffer read Buffer contents I Content Type subset file Name null find Content Types For file Name get All Content Types I Content Type selected internal Find Content Types For buffer subset if selected length 0 return null return Content Type selected 0 internal Get Description For buffer options  IContentTypeManager IContentDescription getDescriptionFor InputStream fileName QualifiedName IOException InputStream readBuffer IContentType fileName findContentTypesFor fileName getAllContentTypes IContentType internalFindContentTypesFor ContentType internalGetDescriptionFor
see I Content Type Manager public I Content Description get Description For Reader contents String file Name Qualified Name options throws IO Exception Reader buffer read Buffer contents I Content Type subset file Name null find Content Types For file Name get All Content Types I Content Type selected internal Find Content Types For buffer subset if selected length 0 return null return Content Type selected 0 internal Get Description For buffer options  IContentTypeManager IContentDescription getDescriptionFor fileName QualifiedName IOException readBuffer IContentType fileName findContentTypesFor fileName getAllContentTypes IContentType internalFindContentTypesFor ContentType internalGetDescriptionFor
Preferences get Preferences return Internal Platform get Default get Preferences Service get Root Node node CONTENT TYPE PREF NODE  getPreferences InternalPlatform getDefault getPreferencesService getRootNode CONTENT_TYPE_PREF_NODE
protected I Content Type internal Find Content Types For Input Stream buffer I Content Type subset if buffer null Arrays sort subset depth Comparator return subset List appropriate new Array List int valid 0 for int i 0 i subset length i Content Type current Content Type subset i I Content Describer describer current get Describer int status I Content Describer INDETERMINATE if describer null status current describe describer buffer null if status I Content Describer INVALID continue if status I Content Describer VALID appropriate add valid current else appropriate add current I Content Type result I Content Type appropriate to Array new I Content Type appropriate size if valid 1 Arrays sort result 0 valid depth Comparator if result length valid 1 Arrays sort result valid result length depth Comparator return result  IContentType internalFindContentTypesFor InputStream IContentType depthComparator ArrayList ContentType ContentType IContentDescriber getDescriber IContentDescriber IContentDescriber IContentDescriber IContentType IContentType toArray IContentType depthComparator depthComparator
private I Content Type internal Find Content Types For Reader buffer I Content Type subset if buffer null Arrays sort subset depth Comparator return subset List appropriate new Array List int valid 0 for int i 0 i subset length i Content Type current Content Type subset i I Content Describer describer current get Describer int status I Content Describer INDETERMINATE if describer instanceof I Text Content Describer status current describe I Text Content Describer describer buffer null if status I Content Describer INVALID continue if status I Content Describer VALID appropriate add valid current else appropriate add current I Content Type result I Content Type appropriate to Array new I Content Type appropriate size if valid 1 Arrays sort result 0 valid depth Comparator if result length valid 1 Arrays sort result valid result length depth Comparator return result  IContentType internalFindContentTypesFor IContentType depthComparator ArrayList ContentType ContentType IContentDescriber getDescriber IContentDescriber ITextContentDescriber ITextContentDescriber IContentDescriber IContentDescriber IContentType IContentType toArray IContentType depthComparator depthComparator
Content Type internal Get Content Type String content Type Identifier return Content Type catalog get content Type Identifier  ContentType internalGetContentType contentTypeIdentifier ContentType contentTypeIdentifier
private void make Aliases Map file Specs process all content types per file specs marking conflicting content types as aliases for the higher priority content type for Iterator i file Specs values iterator i has Next Set associated Set i next if associated size 2 no conflicts here continue Iterator j associated iterator Content Type ellected Content Type j next while j has Next Content Type j next set Alias Target ellected  makeAliases fileSpecs fileSpecs hasNext ContentType ContentType hasNext ContentType setAliasTarget
protected void reorganize file Extensions clear file Names clear forget the validation status and aliases for all content types for Iterator i catalog values iterator i has Next Content Type type Content Type i next type set Validation Content Type STATUS UNKNOWN type set Alias Target null do the validation for Iterator i catalog values iterator i has Next Content Type type Content Type i next if ensure Valid type continue add File Spec Contributor type I Content Type FILE EXTENSION SPEC file Extensions add File Spec Contributor type I Content Type FILE NAME SPEC file Names make Aliases file Names make Aliases file Extensions  fileExtensions fileNames hasNext ContentType ContentType setValidation ContentType STATUS_UNKNOWN setAliasTarget hasNext ContentType ContentType ensureValid addFileSpecContributor IContentType FILE_EXTENSION_SPEC fileExtensions addFileSpecContributor IContentType FILE_NAME_SPEC fileNames makeAliases fileNames makeAliases fileExtensions
protected void startup builder create Builder catalog new Hash Map builder startup builder build Content Types  createBuilder HashMap buildContentTypes
see I Content Type Manager add Content Type Change Listener I Content Type Change Listener public void add Content Type Change Listener I Content Type Change Listener listener TODO https bugs eclipse org bugs show bug cgi id 67884 Content type change events not reported  IContentTypeManager addContentTypeChangeListener IContentTypeChangeListener addContentTypeChangeListener IContentTypeChangeListener show_bug
see I Content Type Manager remove Content Type Change Listener I Content Type Change Listener public void remove Content Type Change Listener I Content Type Change Listener listener TODO https bugs eclipse org bugs show bug cgi id 67884 Content type change events not reported  IContentTypeManager removeContentTypeChangeListener IContentTypeChangeListener removeContentTypeChangeListener IContentTypeChangeListener show_bug

private I Content Type content Type public Default Description Content Type content Type this content Type content Type  IContentType contentType DefaultDescription ContentType contentType contentType contentType
public String get Charset return content Type get Default Charset  getCharset contentType getDefaultCharset
public I Content Type get Content Type return content Type  IContentType getContentType contentType
public Object get Property Qualified Name key if key I Content Description CHARSET return content Type get Default Charset return null  getProperty QualifiedName IContentDescription contentType getDefaultCharset
public boolean is Default return true  isDefault
public boolean is Requested Qualified Name key return true  isRequested QualifiedName
public void set Property Qualified Name key Object value throw new Illegal State Exception  setProperty QualifiedName IllegalStateException
public String to String return default content Type NON NLS 1 NON NLS 2  toString contentType

private int type public File Spec String text int type this text text this type type  FileSpec
public String get Text return text  getText
public int get Type return type  getType
public int get Basic Type return BASIC TYPE type  getBasicType BASIC_TYPE
public boolean equals Object other if other instanceof File Spec return false File Spec other File Spec File Spec other return get Basic Type other File Spec get Basic Type text equals Ignore Case other File Spec text  FileSpec FileSpec otherFileSpec FileSpec getBasicType otherFileSpec getBasicType equalsIgnoreCase otherFileSpec
public boolean equals String text int basic Type return get Basic Type basic Type this text equals Ignore Case text  basicType getBasicType basicType equalsIgnoreCase
public int hash Code return text hash Code  hashCode hashCode
public static String get Mapping Key For String file Spec Text return file Spec Text to Lower Case  getMappingKeyFor fileSpecText fileSpecText toLowerCase

private int offset public Lazy Input Stream Input Stream in int block Capacity this in in this block Capacity block Capacity  LazyInputStream InputStream blockCapacity blockCapacity blockCapacity
public int available throws IO Exception return buffer Size offset in available  IOException bufferSize
private int copy From Buffer byte user Buffer int user Offset int needed int copied 0 int current offset block Capacity while needed copied 0 current blocks length int block Size compute Block Size current int offset In Block offset block Capacity int available In Block block Size offset In Block int to Copy Math min available In Block needed copied System arraycopy blocks current offset In Block user Buffer user Offset copied to Copy copied to Copy current offset to Copy return copied  copyFromBuffer userBuffer userOffset blockCapacity blockSize computeBlockSize offsetInBlock blockCapacity availableInBlock blockSize offsetInBlock toCopy availableInBlock offsetInBlock userBuffer userOffset toCopy toCopy toCopy
private void ensure Available long bytes To Read throws IO Exception int loaded Block Size block Capacity while buffer Size offset bytes To Read loaded Block Size block Capacity loaded Block Size load Block buffer Size loaded Block Size  ensureAvailable bytesToRead IOException loadedBlockSize blockCapacity bufferSize bytesToRead loadedBlockSize blockCapacity loadedBlockSize loadBlock bufferSize loadedBlockSize
for testing purposes protected int get Block Count return blocks length  getBlockCount
private int compute Block Size int block Index if block Index blocks length 1 return block Capacity int block Size buffer Size block Capacity return block Size 0 block Capacity block Size  computeBlockSize blockIndex blockIndex blockCapacity blockSize bufferSize blockCapacity blockSize blockCapacity blockSize
for testing purposes protected int get Buffer Size return buffer Size  getBufferSize bufferSize
for testing purposes protected int get Mark return mark  getMark
for testing purposes protected int get Offset return offset  getOffset
private int load Block throws IO Exception read a block from the underlying stream byte new Block new byte block Capacity int read Count in read new Block if read Count 1 return 0 expand blocks array byte tmp Blocks new byte blocks length 1 System arraycopy blocks 0 tmp Blocks 0 blocks length blocks tmp Blocks blocks blocks length 1 new Block return read Count  loadBlock IOException newBlock blockCapacity readCount newBlock readCount tmpBlocks tmpBlocks tmpBlocks newBlock readCount
public void mark int readlimit mark offset 
public boolean mark Supported return true  markSupported
public int read throws IO Exception ensure Available 1 if buffer Size offset return 1 int next Byte 0xFF blocks offset block Capacity offset block Capacity offset return next Byte  IOException ensureAvailable bufferSize nextByte blockCapacity blockCapacity nextByte
public int read byte b throws IO Exception return read b 0 b length  IOException
public int read byte b int off int len throws IO Exception ensure Available len int copied copy From Buffer b off len return copied 0 1 copied  IOException ensureAvailable copyFromBuffer
public void reset offset mark mark 0 
public long skip long to Skip throws IO Exception if to Skip 0 return 0 ensure Available to Skip long skipped Math min to Skip buffer Size offset offset skipped return skipped  toSkip IOException toSkip ensureAvailable toSkip toSkip bufferSize

private int offset public Lazy Reader Reader in int block Capacity this in in this block Capacity block Capacity  LazyReader blockCapacity blockCapacity blockCapacity
public boolean ready throws IO Exception return buffer Size offset 0 in ready  IOException bufferSize
private int copy From Buffer char user Buffer int user Offset int needed int copied 0 int current offset block Capacity while needed copied 0 current blocks length int block Size compute Block Size current int offset In Block offset block Capacity int available In Block block Size offset In Block int to Copy Math min available In Block needed copied System arraycopy blocks current offset In Block user Buffer user Offset copied to Copy copied to Copy current offset to Copy return copied  copyFromBuffer userBuffer userOffset blockCapacity blockSize computeBlockSize offsetInBlock blockCapacity availableInBlock blockSize offsetInBlock toCopy availableInBlock offsetInBlock userBuffer userOffset toCopy toCopy toCopy
private void ensure Available long chars To Read throws IO Exception int loaded Block Size block Capacity while buffer Size offset chars To Read loaded Block Size block Capacity loaded Block Size load Block buffer Size loaded Block Size  ensureAvailable charsToRead IOException loadedBlockSize blockCapacity bufferSize charsToRead loadedBlockSize blockCapacity loadedBlockSize loadBlock bufferSize loadedBlockSize
for testing purposes protected int get Block Count return blocks length  getBlockCount
private int compute Block Size int block Index if block Index blocks length 1 return block Capacity int block Size buffer Size block Capacity return block Size 0 block Capacity block Size  computeBlockSize blockIndex blockIndex blockCapacity blockSize bufferSize blockCapacity blockSize blockCapacity blockSize
for testing purposes protected int get Buffer Size return buffer Size  getBufferSize bufferSize
for testing purposes protected int get Mark return mark  getMark
for testing purposes protected int get Offset return offset  getOffset
private int load Block throws IO Exception read a block from the underlying stream char new Block new char block Capacity int read Count in read new Block if read Count 1 return 0 expand blocks array char tmp Blocks new char blocks length 1 System arraycopy blocks 0 tmp Blocks 0 blocks length blocks tmp Blocks blocks blocks length 1 new Block return read Count  loadBlock IOException newBlock blockCapacity readCount newBlock readCount tmpBlocks tmpBlocks tmpBlocks newBlock readCount
public void mark int readlimit mark offset 
public boolean mark Supported return true  markSupported
public int read throws IO Exception ensure Available 1 if buffer Size offset return 1 char next Char blocks offset block Capacity offset block Capacity offset return next Char  IOException ensureAvailable bufferSize nextChar blockCapacity blockCapacity nextChar
public int read char c throws IO Exception return read c 0 c length  IOException
public int read char c int off int len throws IO Exception ensure Available len int copied copy From Buffer c off len return copied 0 1 copied  IOException ensureAvailable copyFromBuffer
public void reset offset mark mark 0 
public long skip long to Skip throws IO Exception if to Skip 0 return 0 ensure Available to Skip long skipped Math min to Skip buffer Size offset offset skipped return skipped  toSkip IOException toSkip ensureAvailable toSkip toSkip bufferSize
public void close we don t close the underlying stream 

see org eclipse core runtime content I Text Content Describer describe java io Reader org eclipse core runtime content I Content Description public int describe Reader contents I Content Description description throws IO Exception we want to be pretty loose on detecting the text content type return INDETERMINATE  ITextContentDescriber IContentDescription IContentDescription IOException
public int describe Input Stream contents I Content Description description throws IO Exception if description null description is Requested I Content Description BYTE ORDER MARK return INDETERMINATE byte bom get Byte Order Mark contents if bom null description set Property I Content Description BYTE ORDER MARK bom we want to be pretty loose on detecting the text content type return INDETERMINATE  InputStream IContentDescription IOException isRequested IContentDescription BYTE_ORDER_MARK getByteOrderMark setProperty IContentDescription BYTE_ORDER_MARK
see org eclipse core runtime content I Content Describer get Supported Options public Qualified Name get Supported Options return SUPPORTED OPTIONS  IContentDescriber getSupportedOptions QualifiedName getSupportedOptions SUPPORTED_OPTIONS
byte get Byte Order Mark Input Stream input throws IO Exception int first input read 0xFF converts unsigned byte to int int second input read 0xFF if first 1 second 1 return null look for the UTF 16 Byte Order Mark BOM if first 0xFE second 0xFF return I Content Description BOM UTF 16BE if first 0xFF second 0xFE return I Content Description BOM UTF 16LE int third input read 0xFF if third 1 return null look for the UTF 8 BOM if first 0xEF second 0xBB third 0xBF return I Content Description BOM UTF 8 return null  getByteOrderMark InputStream IOException IContentDescription BOM_UTF_16BE IContentDescription BOM_UTF_16LE IContentDescription BOM_UTF_8

public int describe Input Stream input I Content Description description throws IO Exception byte bom get Byte Order Mark input String xml Decl Encoding UTF 8 NON NLS 1 input reset if bom null if bom I Content Description BOM UTF 16BE xml Decl Encoding UTF 16BE NON NLS 1 else if bom I Content Description BOM UTF 16LE xml Decl Encoding UTF 16LE NON NLS 1 skip BOM to make comparison simpler input skip bom length set the BOM in the description if requested if description null description is Requested I Content Description BYTE ORDER MARK description set Property I Content Description BYTE ORDER MARK bom byte xml Prefix Bytes XML PREFIX get Bytes xml Decl Encoding byte prefix new byte xml Prefix Bytes length if input read prefix prefix length there is not enough info to say anything return INDETERMINATE for int i 0 i prefix length i if prefix i xml Prefix Bytes i we don t have a XML Decl there is not enough info to say anything return INDETERMINATE if description null return VALID describe charset if requested if description is Requested I Content Description CHARSET String fullXML Decl read FullXML Decl input xml Decl Encoding if fullXML Decl null description set Property I Content Description CHARSET get Charset fullXML Decl return VALID  InputStream IContentDescription IOException getByteOrderMark xmlDeclEncoding IContentDescription BOM_UTF_16BE xmlDeclEncoding IContentDescription BOM_UTF_16LE xmlDeclEncoding isRequested IContentDescription BYTE_ORDER_MARK setProperty IContentDescription BYTE_ORDER_MARK xmlPrefixBytes XML_PREFIX getBytes xmlDeclEncoding xmlPrefixBytes xmlPrefixBytes XMLDecl isRequested IContentDescription fullXMLDecl readFullXMLDecl xmlDeclEncoding fullXMLDecl setProperty IContentDescription getCharset fullXMLDecl
private String read FullXML Decl Input Stream input String unicode Encoding throws IO Exception byte xml Decl new byte 100 int c 0 looks for XML Decl ending char int read 0 while read xml Decl length c input read 1 c xml Decl read byte c return c new String xml Decl 0 read unicode Encoding null  readFullXMLDecl InputStream unicodeEncoding IOException xmlDecl XMLDecl xmlDecl xmlDecl xmlDecl unicodeEncoding
public int describe Reader input I Content Description description throws IO Exception Buffered Reader reader new Buffered Reader input String line reader read Line end of stream if line null return INDETERMINATE XML Decl should be the first string no blanks allowed if line starts With XML PREFIX return INDETERMINATE if description null return VALID describe charset if requested if description is Requested I Content Description CHARSET description set Property I Content Description CHARSET get Charset line return VALID  IContentDescription IOException BufferedReader BufferedReader readLine XMLDecl startsWith XML_PREFIX isRequested IContentDescription setProperty IContentDescription getCharset
private String get Charset String first Line int encoding Pos first Line index Of ENCODING if encoding Pos 1 return null char quote Char int first Quote first Line index Of quote Char encoding Pos if first Quote 1 quote Char first Quote first Line index Of quote Char encoding Pos if first Quote 1 first Line length first Quote 1 return null int second Quote first Line index Of quote Char first Quote 1 if second Quote 1 return null return first Line substring first Quote 1 second Quote  getCharset firstLine encodingPos firstLine indexOf encodingPos quoteChar firstQuote firstLine indexOf quoteChar encodingPos firstQuote quoteChar firstQuote firstLine indexOf quoteChar encodingPos firstQuote firstLine firstQuote secondQuote firstLine indexOf quoteChar firstQuote secondQuote firstLine firstQuote secondQuote
public Qualified Name get Supported Options return SUPPORTED OPTIONS  QualifiedName getSupportedOptions SUPPORTED_OPTIONS

private class Stop Parsing Exception extends SAX Exception Constructs an instance of code Stop Parsing Exception code with a code null code detail message public Stop Parsing Exception super String null  StopParsingException SAXException StopParsingException StopParsingException
private boolean factory Failed false public XML Root Handler boolean check Root this check Root check Root  factoryFailed XMLRootHandler checkRoot checkRoot checkRoot
see org xml sax ext Lexical Handler comment char int int public final void comment final char ch final int start final int length Not interested  LexicalHandler
Creates a new SAX parser for use within this instance return The newly created parser throws Parser Configuration Exception If a parser of the given configuration cannot be created throws SAX Exception If something in general goes wrong when creating the parser throws SAX Not Recognized Exception If the code XML Reader code does not recognize the lexical handler configuration option throws SAX Not Supported Exception If the code XML Reader code does not support the lexical handler configuration option private final SAX Parser create Parser SAX Parser Factory parser Factory throws Parser Configuration Exception SAX Exception SAX Not Recognized Exception SAX Not Supported Exception Initialize the parser final SAX Parser parser parser Factory newSAX Parser final XML Reader reader parser getXML Reader reader set Property http xml org sax properties lexical handler this NON NLS 1 disable DTD validation bug 63625 try be sure validation is off or the feature to ignore DTD s will not apply reader set Feature http xml org sax features validation false NON NLS 1 reader set Feature http apache org xml features nonvalidating load external dtd false NON NLS 1 catch SAX Not Recognized Exception e not a big deal if the parser does not recognize the features catch SAX Not Supported Exception e not a big deal if the parser does not support the features return parser  ParserConfigurationException SAXException SAXNotRecognizedException XMLReader SAXNotSupportedException XMLReader SAXParser createParser SAXParserFactory parserFactory ParserConfigurationException SAXException SAXNotRecognizedException SAXNotSupportedException SAXParser parserFactory newSAXParser XMLReader getXMLReader setProperty setFeature setFeature SAXNotRecognizedException SAXNotSupportedException
see org xml sax ext Lexical Handler endCDATA public final void endCDATA Not interested  LexicalHandler
see org xml sax ext Lexical Handler endDTD public final void endDTD Not interested  LexicalHandler
see org xml sax ext Lexical Handler end Entity java lang String public final void end Entity final String name Not interested  LexicalHandler endEntity endEntity
public String getDTD return dtd Found  dtdFound
private SAX Parser Factory get Factory synchronized this if factory Failed return null if factory null return factory Service Reference parser Reference Internal Platform get Default get Bundle Context get Service Reference javax xml parsers SAX Parser Factory NON NLS 1 if parser Reference null return null factory SAX Parser Factory Internal Platform get Default get Bundle Context get Service parser Reference if factory null return null factory set Namespace Aware true return factory  SAXParserFactory getFactory factoryFailed ServiceReference parserReference InternalPlatform getDefault getBundleContext getServiceReference SAXParserFactory parserReference SAXParserFactory InternalPlatform getDefault getBundleContext getService parserReference setNamespaceAware
public String get Root Name return element Found  getRootName elementFound
public boolean parse Contents Input Source contents throws IO Exception Parser Configuration Exception SAX Exception Parse the file into we have what we need or an error occurs try factory get Factory if factory null return false final SAX Parser parser create Parser factory to support external entities specified as relative UR Is see bug 63298 contents set System Id NON NLS 1 parser parse contents this catch Stop Parsing Exception e Abort the parsing normally Fall through return true  parseContents InputSource IOException ParserConfigurationException SAXException getFactory SAXParser createParser URIs setSystemId StopParsingException
see org xml sax helpers Default Handler resolve Entity java lang String java lang String public Input Source resolve Entity String public Id String system Id throws SAX Exception return new Input Source new String Reader NON NLS 1  DefaultHandler resolveEntity InputSource resolveEntity publicId systemId SAXException InputSource StringReader
see org xml sax ext Lexical Handler startCDATA public final void startCDATA Not interested  LexicalHandler
public final void startDTD final String name final String public Id final String system Id throws SAX Exception dtd Found system Id If we don t care about the top level element we can stop here if check Root throw new Stop Parsing Exception  publicId systemId SAXException dtdFound systemId checkRoot StopParsingException
java lang String java lang String org xml sax Attributes public final void start Element final String uri final String element Name final String qualified Name final Attributes attributes throws SAX Exception element Found element Name throw new Stop Parsing Exception  startElement elementName qualifiedName SAXException elementFound elementName StopParsingException
see org xml sax ext Lexical Handler start Entity java lang String public final void start Entity final String name Not interested  LexicalHandler startEntity startEntity

public final class Assert private Assert This class is not intended to be instantiated 
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown param object the value to test exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object is Not Null object NON NLS 1  IllegalArgumentException isNotNull isNotNull
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param object the value to test param message the message to include in the exception exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object String message if object null throw new Null Pointer Exception null argument message NON NLS 1  IllegalArgumentException isNotNull NullPointerException

class Assertion Failed Exception extends Runtime Exception Constructs a new exception public Assertion Failed Exception super  AssertionFailedException RuntimeException AssertionFailedException
Constructs a new exception with the given message public Assertion Failed Exception String detail super detail  AssertionFailedException

Creates a new vertex with the given id param id the vertex id public Vertex Object id this id id 
Creates a new empty directed graph object p After this graph s vertexes and edges are defined with code add Vertex code and code add Edge code call code freeze code to indicate that the graph is all there and then call code ids ByDFS Finish Time code to read off the vertexes ordered by DFS finish time p public Digraph no action during construction  addVertex addEdge idsByDFSFinishTime
Adds a new directed edge between the vertexes with the given ids Vertexes for the given ids must be defined beforehand with code add Vertex code The depth first search is performed in the relative order in which adjacent to vertexes were added to a given from index param from Id the id of the from vertex param to Id the id of the to vertex exception Illegal Argument Exception if either vertex is undefined or if the graph is frozen public void add Edge Object from Id Object to Id throws Illegal Argument Exception if initialized throw new Illegal Argument Exception Vertex from Vertex Vertex vertex Map get from Id Vertex to Vertex Vertex vertex Map get to Id nip problems with bogus vertexes in the bud if from Vertex null throw new Illegal Argument Exception if to Vertex null throw new Illegal Argument Exception from Vertex adjacent add to Vertex  addVertex fromId toId IllegalArgumentException addEdge fromId toId IllegalArgumentException IllegalArgumentException fromVertex vertexMap fromId toVertex vertexMap toId fromVertex IllegalArgumentException toVertex IllegalArgumentException fromVertex toVertex
Defines a new vertex with the given id The depth first search is performed in the relative order in which vertexes were added to the graph param id the id of the vertex exception Illegal Argument Exception if the vertex id is already defined or if the graph is frozen public void add Vertex Object id throws Illegal Argument Exception if initialized throw new Illegal Argument Exception Vertex vertex new Vertex id Object existing vertex Map put id vertex nip problems with duplicate vertexes in the bud if existing null throw new Illegal Argument Exception vertex List add vertex  IllegalArgumentException addVertex IllegalArgumentException IllegalArgumentException vertexMap IllegalArgumentException vertexList
Returns whether the graph contains cycles The graph must be frozen return code true code if this graph contains at least one cycle and code false code if this graph is cycle free exception Illegal Argument Exception if the graph is not frozen public boolean contains Cycles if initialized throw new Illegal Argument Exception return cycles  IllegalArgumentException containsCycles IllegalArgumentException
Performs a depth first search of this graph and records interesting info with each vertex including DFS finish time Does not employ recursion private void DFS state machine rendition of the standard recursive DFS algorithm int state final int NEXT VERTEX 1 final int START DFS VISIT 2 final int NEXT ADJACENT 3 final int AFTER NEXTED DFS VISIT 4 use precomputed objects to avoid garbage final Integer NEXT VERTEX OBJECT new Integer NEXT VERTEX final Integer AFTER NEXTED DFS VISIT OBJECT new Integer AFTER NEXTED DFS VISIT initialize all vertex color initially Vertex WHITE all vertex predecessor initially null time 0 for a stack append to the end of an array based list List stack new Array List Math max 1 vertex List size Iterator all Adjacent null Vertex vertex null Iterator allV vertex List iterator state NEXT VERTEX next State Loop while true switch state case NEXT VERTEX on entry allV contains vertexes yet to be visited if allV has Next all done break next State Loop Vertex next Vertex Vertex allV next if next Vertex color Vertex WHITE stack add NEXT VERTEX OBJECT vertex next Vertex state START DFS VISIT continue next State Loop else state NEXT VERTEX continue next State Loop case START DFS VISIT on entry vertex contains the vertex to be visited top of stack is return code mark the vertex as discovered vertex color Vertex GREY all Adjacent vertex adjacent iterator state NEXT ADJACENT continue next State Loop case NEXT ADJACENT on entry all Adjacent contains adjacent vertexes to be visited vertex contains vertex being visited if all Adjacent has Next Vertex adj Vertex Vertex all Adjacent next if adj Vertex color Vertex WHITE explore edge from vertex to adj Vertex adj Vertex predecessor vertex stack add all Adjacent stack add vertex stack add AFTER NEXTED DFS VISIT OBJECT vertex adj Vertex state START DFS VISIT continue next State Loop if adj Vertex color Vertex GREY back edge grey means visit in progress cycles true state NEXT ADJACENT continue next State Loop else done exploring vertex vertex color Vertex BLACK time vertex finish Time time state Integer stack remove stack size 1 int Value continue next State Loop case AFTER NEXTED DFS VISIT on entry stack contains vertex and all Ajacent vertex Vertex stack remove stack size 1 all Adjacent Iterator stack remove stack size 1 state NEXT ADJACENT continue next State Loop  NEXT_VERTEX START_DFS_VISIT NEXT_ADJACENT AFTER_NEXTED_DFS_VISIT NEXT_VERTEX_OBJECT NEXT_VERTEX AFTER_NEXTED_DFS_VISIT_OBJECT AFTER_NEXTED_DFS_VISIT ArrayList vertexList allAdjacent vertexList NEXT_VERTEX nextStateLoop NEXT_VERTEX hasNext nextStateLoop nextVertex nextVertex NEXT_VERTEX_OBJECT nextVertex START_DFS_VISIT nextStateLoop NEXT_VERTEX nextStateLoop START_DFS_VISIT allAdjacent NEXT_ADJACENT nextStateLoop NEXT_ADJACENT allAdjacent allAdjacent hasNext adjVertex allAdjacent adjVertex adjVertex adjVertex allAdjacent AFTER_NEXTED_DFS_VISIT_OBJECT adjVertex START_DFS_VISIT nextStateLoop adjVertex NEXT_ADJACENT nextStateLoop finishTime intValue nextStateLoop AFTER_NEXTED_DFS_VISIT allAjacent allAdjacent NEXT_ADJACENT nextStateLoop
Freezes this graph No more vertexes or edges can be added to this graph after this method is called Has no effect if the graph is already frozen public void freeze if initialized initialized true only perform depth first search once DFS 
Returns the ids of the vertexes in this graph ordered by depth first search finish time The graph must be frozen param increasing code true code if objects are to be arranged into increasing order of depth first search finish time and code false code if objects are to be arranged into decreasing order of depth first search finish time return the list of ids ordered by depth first search finish time element type code Object code exception Illegal Argument Exception if the graph is not frozen public List ids ByDFS Finish Time boolean increasing if initialized throw new Illegal Argument Exception int len vertex List size Object r new Object len for Iterator allV vertex List iterator allV has Next Vertex vertex Vertex allV next int f vertex finish Time note that finish times start at 1 not 0 if increasing r f 1 vertex id else r len f vertex id return Arrays as List r  IllegalArgumentException idsByDFSFinishTime IllegalArgumentException vertexList vertexList hasNext finishTime asList
Returns the non trivial components of this graph A non trivial component is a set of 2 or more vertexes that were traversed together The graph must be frozen return the possibly empty list of non trivial components where each component is an array of ids element type code Object code exception Illegal Argument Exception if the graph is not frozen public List non Trivial Components if initialized throw new Illegal Argument Exception find the roots of each component Map Vertex List Object components Map components new Hash Map for Iterator it vertex List iterator it has Next Vertex vertex Vertex it next if vertex predecessor null this vertex is the root of a component if component is non trivial we will hit a child else find the root ancestor of this vertex Vertex root vertex while root predecessor null root root predecessor List component List components get root if component null component new Array List 2 component add root id components put root component component add vertex id List result new Array List components size for Iterator it components values iterator it has Next List component List it next if component size 1 result add component to Array return result  IllegalArgumentException nonTrivialComponents IllegalArgumentException HashMap vertexList hasNext ArrayList ArrayList hasNext toArray
Sorts the given list of probject in a manner that honors the given project reference relationships That is if project A references project B then the resulting order will list B before A if possible For graphs that do not contain cycles the result is the same as a conventional topological sort For graphs containing cycles the order is based on ordering the strongly connected components of the graph This has the effect of keeping each knot of projects together without otherwise affecting the order of projects not involved in a cycle For a graph G the algorithm performs in O G space and time p When there is an arbitrary choice vertexes are ordered as supplied Arranged projects in descending alphabetical order generally results in an order that builds A before Z when there are no other constraints p p Ref Cormen Leiserson and Rivest it Introduction to Algorithms it Mc Graw Hill 1990 The strongly connected components algorithm is in section 23 5 p param projects a list of projects element type code I Project code param references a list of project references A B meaning that A references B element type code I Project code return an object describing the resulting project order public static Object compute Node Order Object objects Object references Step 1 Create the graph object final Digraph g1 new Digraph add vertexes for int i 0 i objects length i g1 add Vertex objects i add edges for int i 0 i references length i create an edge from q to p to cause q to come before p in eventual result g1 add Edge references i 1 references i 0 g1 freeze Step 2 Create the transposed graph This time define the vertexes in decreasing order of depth first finish time in g1 interchange to and from to reverse edges from g1 final Digraph g2 new Digraph add vertexes List resorted Vertexes g1 ids ByDFS Finish Time false for Iterator it resorted Vertexes iterator it has Next g2 add Vertex it next add edges for int i 0 i references length i g2 add Edge references i 0 references i 1 g2 freeze Step 3 Return the vertexes in increasing order of depth first finish time in g2 List sorted Project List g2 ids ByDFS Finish Time true Object ordered Nodes new Object sorted Project List size sorted Project List to Array ordered Nodes Object knots boolean has Cycles g2 contains Cycles if has Cycles List knot List g2 non Trivial Components knots Object knot List to Array new Object knot List size else knots new Object 0 for int i 0 i ordered Nodes length i objects i ordered Nodes i return knots  McGraw IProject IProject computeNodeOrder addVertex addEdge resortedVertexes idsByDFSFinishTime resortedVertexes hasNext addVertex addEdge sortedProjectList idsByDFSFinishTime orderedNodes sortedProjectList sortedProjectList toArray orderedNodes hasCycles containsCycles hasCycles knotList nonTrivialComponents knotList toArray knotList orderedNodes orderedNodes
private Compute Node Order Prevent class from being instantiated  ComputeNodeOrder

public Dependency Object required Object Id I Match Rule match Rule boolean optional Object user Object Assert is Not Null required Object Id Assert is Not Null match Rule this required Object Id required Object Id this match Rule match Rule this optional optional this user Object user Object  requiredObjectId IMatchRule matchRule userObject isNotNull requiredObjectId isNotNull matchRule requiredObjectId requiredObjectId matchRule matchRule userObject userObject
see I Dependency get Match Rule public I Match Rule get Match Rule return this match Rule  IDependency getMatchRule IMatchRule getMatchRule matchRule
see I Dependency get Required Object Id public Object get Required Object Id return this required Object Id  IDependency getRequiredObjectId getRequiredObjectId requiredObjectId
see I Dependency is Optional public boolean is Optional return this optional  IDependency isOptional isOptional
see I Dependency get Resolved Version Id public Object get Resolved Version Id return resolved Version Id  IDependency getResolvedVersionId getResolvedVersionId resolvedVersionId
public void resolve Object resolved Version Id int changed Mark if resolved Version Id null this resolved Version Id null resolved Version Id null resolved Version Id equals this resolved Version Id return this resolved Version Id resolved Version Id this changed Mark changed Mark  resolvedVersionId changedMark resolvedVersionId resolvedVersionId resolvedVersionId resolvedVersionId resolvedVersionId resolvedVersionId resolvedVersionId changedMark changedMark
public int get Changed Mark return changed Mark  getChangedMark changedMark
public String to String return get User Object get Match Rule NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4  toString getUserObject getMatchRule
public Object get User Object return user Object  getUserObject userObject

private Object cycles public Cyclic System Exception Object cycles this cycles cycles  CyclicSystemException
public Object get Cycles return cycles  getCycles
public String get Message String Buffer result new String Buffer for int i 0 i cycles length i result append NON NLS 1 for int j 0 j cycles i length j result append Element Set cycles i j get Id result append NON NLS 1 result delete Char At result length 1 result append NON NLS 1 if result length 0 result delete Char At result length 1 return result to String  getMessage StringBuffer StringBuffer ElementSet getId deleteCharAt deleteCharAt toString
Uses a user provided comparator for comparing versions public Dependency System Comparator comparator I Selection Policy selection Policy boolean debug this comparator comparator this selection Policy selection Policy this debug debug  DependencySystem ISelectionPolicy selectionPolicy selectionPolicy selectionPolicy
public Dependency System Comparator comparator I Selection Policy selection Policy this comparator selection Policy false  DependencySystem ISelectionPolicy selectionPolicy selectionPolicy
public Element Set get Element Set Object id Element Set element Set Element Set this element Sets get id create an element set for the given id if one does not exist yet if element Set null this element Sets put id element Set new Element Set id this return element Set  ElementSet getElementSet ElementSet elementSet ElementSet elementSets elementSet elementSets elementSet ElementSet elementSet
public Collection discover Roots Collection roots new Linked List for Iterator element Sets Iter element Sets values iterator element Sets Iter has Next Element Set element Set Element Set element Sets Iter next if element Set is Root roots add element Set return roots  discoverRoots LinkedList elementSetsIter elementSets elementSetsIter hasNext ElementSet elementSet ElementSet elementSetsIter elementSet isRoot elementSet
Determines which versions of each element set are resolved public Resolution Delta resolve throws Cyclic System Exception Collection roots discover Roots traverse from roots to leaves returns leaves Collection satisfied visit roots new Satisfaction Visitor SATISFACTION traverse from leaves to roots returns roots Collection selected visit satisfied new Selection Visitor SELECTION this selection Policy traverse from roots to leaves returns leaves result is ignored visit selected new Resolution Visitor RESOLUTION this last Delta this delta this delta new Resolution Delta prune Empty Sets return this last Delta  ResolutionDelta CyclicSystemException discoverRoots SatisfactionVisitor SelectionVisitor selectionPolicy ResolutionVisitor lastDelta ResolutionDelta pruneEmptySets lastDelta
clean up any dangling element sets that were removed and are not required by anybody private void prune Empty Sets for Iterator element Sets Iter element Sets values iterator element Sets Iter has Next Element Set element Set Element Set element Sets Iter next if element Set get Element Count 0 element Set get Requiring Count 0 element Sets Iter remove  pruneEmptySets elementSetsIter elementSets elementSetsIter hasNext ElementSet elementSet ElementSet elementSetsIter elementSet getElementCount elementSet getRequiringCount elementSetsIter
Traverses a graph starting from the given element sets Returns a set containing all leaf element sets that satisfied the visitor public Collection visit Collection element Sets I Element Set Visitor visitor throws Cyclic System Exception int visit Counter 0 int mark get New Mark visitor get Order if element Sets is Empty return Collections EMPTY SET Collection leaves new Linked List while element Sets is Empty Collection next Level new Linked List first visit all element sets in the given set for Iterator element Sets Iter element Sets iterator element Sets Iter has Next Element Set element Set Element Set element Sets Iter next skip if already visited if mark element Set get Visited Mark continue last time was visited it has been changed need to recompute only a change in a previous phase causes the next phase to need to recompute if element Set get Visited Mark element Set get Changed Mark visitor get Order get Visitor Order element Set get Changed Mark element Set mark Needing Update visitor get Order boolean should Visit true for Iterator ancestor Iter visitor get Ancestors element Set iterator ancestor Iter has Next Element Set ancestor Node Element Set ancestor Iter next if ancestor Node get Visited Mark mark one ancestor element set has not been visited yet bail out should Visit false break if ancestor Node get Changed Mark mark ancestor has changed we need to recompute element Set mark Needing Update visitor get Order if should Visit continue element Set set Visited Mark mark only update if necessary if element Set is Needing Update visitor get Order visitor update element Set visit Counter if visitor get Descendants element Set is Empty leaves add element Set else next Level add All visitor get Descendants element Set element Sets next Level if visited more nodes than exist in the graph a cycle has been found XXX is this condition enough for detecting a cycle if visit Counter this element Sets size throw new Cyclic System Exception get Cycles return leaves  elementSets IElementSetVisitor CyclicSystemException visitCounter getNewMark getOrder elementSets isEmpty EMPTY_SET LinkedList elementSets isEmpty nextLevel LinkedList elementSetsIter elementSets elementSetsIter hasNext ElementSet elementSet ElementSet elementSetsIter elementSet getVisitedMark elementSet getVisitedMark elementSet getChangedMark getOrder getVisitorOrder elementSet getChangedMark elementSet markNeedingUpdate getOrder shouldVisit ancestorIter getAncestors elementSet ancestorIter hasNext ElementSet ancestorNode ElementSet ancestorIter ancestorNode getVisitedMark shouldVisit ancestorNode getChangedMark elementSet markNeedingUpdate getOrder shouldVisit elementSet setVisitedMark elementSet isNeedingUpdate getOrder elementSet visitCounter getDescendants elementSet isEmpty elementSet nextLevel addAll getDescendants elementSet elementSets nextLevel visitCounter elementSets CyclicSystemException getCycles
temporary hack using Compute Node Order to find out what the cycles are public Object get Cycles find cycles Element Set nodes Element Set element Sets values to Array new Element Set element Sets size Array List dependencies new Array List for int i 0 i nodes length i for Iterator required nodes i get Required iterator required has Next dependencies add new Object nodes i required next return Compute Node Order compute Node Order nodes Object dependencies to Array new Object dependencies size  ComputeNodeOrder getCycles ElementSet ElementSet elementSets toArray ElementSet elementSets ArrayList ArrayList getRequired hasNext ComputeNodeOrder computeNodeOrder toArray
private int get Visitor Order int mark return mark 0xFF  getVisitorOrder
private int get New Mark int order mark mark 0xFF 1 return mark 8 order 0xFF  getNewMark
public void add Elements Element elements To Add for int i 0 i elements To Add length i add Element elements To Add i  addElements elementsToAdd elementsToAdd addElement elementsToAdd
public void add Element Element element this get Element Set element get Id add Element element this element Count  addElement getElementSet getId addElement elementCount
public void remove Elements Element elements To Remove for int i 0 i elements To Remove length i remove Element elements To Remove i  removeElements elementsToRemove elementsToRemove removeElement elementsToRemove
public void remove Element Object id Object version Id Element Set element Set Element Set element Sets get id if element Set null return element Set remove Element version Id  removeElement versionId ElementSet elementSet ElementSet elementSets elementSet elementSet removeElement versionId
public void remove Element Element element Element Set element Set Element Set element Sets get element get Id if element Set null return element Set remove Element element  removeElement ElementSet elementSet ElementSet elementSets getId elementSet elementSet removeElement
public long get Element Count return element Count  getElementCount elementCount
public Map get Nodes return this element Sets  getNodes elementSets
returns all resolved elements ordered by pre requisites public List get Resolved int mark get New Mark RESOLUTION Collection element Sets discover Roots if element Sets is Empty return Collections EMPTY LIST final List resolved new Linked List while element Sets is Empty Collection next Level new Linked List for Iterator element Sets Iter element Sets iterator element Sets Iter has Next Element Set element Set Element Set element Sets Iter next skip if already visited if mark element Set get Visited Mark continue Collection resolved In Set element Set get Resolved ignore node and requiring nodes if none of its elements are resolved if resolved In Set is Empty continue boolean should Visit true for Iterator ancestor Iter element Set get Required iterator ancestor Iter has Next Element Set ancestor Node Element Set ancestor Iter next if ancestor Node get Visited Mark mark one ancestor element set has not been visited yet bail out should Visit false break if should Visit continue element Set set Visited Mark mark resolved add All resolved In Set next Level add All element Set get Requiring element Sets next Level return resolved  getResolved getNewMark elementSets discoverRoots elementSets isEmpty EMPTY_LIST LinkedList elementSets isEmpty nextLevel LinkedList elementSetsIter elementSets elementSetsIter hasNext ElementSet elementSet ElementSet elementSetsIter elementSet getVisitedMark resolvedInSet elementSet getResolved resolvedInSet isEmpty shouldVisit ancestorIter elementSet getRequired ancestorIter hasNext ElementSet ancestorNode ElementSet ancestorIter ancestorNode getVisitedMark shouldVisit shouldVisit elementSet setVisitedMark addAll resolvedInSet nextLevel addAll elementSet getRequiring elementSets nextLevel
public String to String String Buffer result new String Buffer for Iterator element Sets Iter element Sets values iterator element Sets Iter has Next Element Set element Set Element Set element Sets Iter next for Iterator elements Iter element Set get Available iterator elements Iter has Next Element element Element elements Iter next result append element Arrays as List element get Dependencies NON NLS 1 result append result delete Char At result length 1 result append n return result to String  toString StringBuffer StringBuffer elementSetsIter elementSets elementSetsIter hasNext ElementSet elementSet ElementSet elementSetsIter elementsIter elementSet getAvailable elementsIter hasNext elementsIter asList getDependencies deleteCharAt toString
void record Element Status Changed Element element int kind this delta record Change element kind  recordElementStatusChanged recordChange
void record Dependency Changed Collection old Resolved Collection new Resolved for Iterator old Resolved Iter old Resolved iterator old Resolved Iter has Next Element element Element old Resolved Iter next if new Resolved contains element this delta record Change element Element Change UNRESOLVED for Iterator new Resolved Iter new Resolved iterator new Resolved Iter has Next Element element Element new Resolved Iter next if old Resolved contains element this delta record Change element Element Change RESOLVED  recordDependencyChanged oldResolved newResolved oldResolvedIter oldResolved oldResolvedIter hasNext oldResolvedIter newResolved recordChange ElementChange newResolvedIter newResolved newResolvedIter hasNext newResolvedIter oldResolved recordChange ElementChange
public Element get Element Object id Object version Id Element Set element Set Element Set element Sets get id if element Set null return null return element Set get Element version Id  getElement versionId ElementSet elementSet ElementSet elementSets elementSet elementSet getElement versionId
factory method public Element create Element Object id Object version Id Dependency dependencies boolean singleton Object user Object return new Element id version Id dependencies singleton user Object  createElement versionId userObject versionId userObject
factory method public Dependency create Dependency Object required Object Id I Match Rule satisfaction Rule boolean optional Object user Object return new Dependency required Object Id satisfaction Rule optional user Object  createDependency requiredObjectId IMatchRule satisfactionRule userObject requiredObjectId satisfactionRule userObject
global access to system version comparator public int compare Object obj1 Object obj2 return comparator compare obj1 obj2 
Returns the delta for the last resolution operation code null code if never resolved or if last resolved with delta production disabled public Resolution Delta get Last Delta return last Delta  ResolutionDelta getLastDelta lastDelta
boolean in Debug Mode return debug  inDebugMode
public Collection get Requiring Elements Element required Element Set containing get Element Set required get Id return containing get Requiring Elements required get Version Id  getRequiringElements ElementSet getElementSet getId getRequiringElements getVersionId
Forces a set of elements to be unresolved All dependencies the elements may have as resolved are also unresolved Also any elements currently depending on the given elements will NOT be automatically unresolved No delta is generated These changes are only temporary and do not affect the outcome of the next resolution besides the generated delta public void unresolve Element elements int mark get New Mark RESOLUTION for int i 0 i elements length i Element Set set get Element Set elements i get Id if set null return set unresolve elements i mark  getNewMark ElementSet getElementSet getId

public Element Object id Object version Id Dependency dependencies boolean singleton Object user Object Assert is Not Null id Assert is Not Null version Id Assert is Not Null dependencies this id id this version Id version Id this dependencies dependencies this singleton singleton this user Object user Object  versionId userObject isNotNull isNotNull versionId isNotNull versionId versionId userObject userObject
public Object get Id return id  getId
public Object get Version Id return version Id  getVersionId versionId
return a non null reference public Dependency get Dependencies return dependencies  getDependencies
may return null public Dependency get Dependency Object id for int i 0 i dependencies length i if dependencies i get Required Object Id equals id return dependencies i return null  getDependency getRequiredObjectId
public boolean is Singleton return singleton  isSingleton
public Object get User Object return user Object  getUserObject userObject
public String to String return this id   this version Id NON NLS 1  toString _ versionId
public boolean equals Object obj if obj instanceof Element return false Element other Element obj return other user Object null other user Object equals this user Object this id equals other id this version Id equals other version Id other user Object null this user Object null  userObject userObject userObject versionId versionId userObject userObject
public int hash Code return id hash Code 16 version Id hash Code 0xFFFF  hashCode hashCode versionId hashCode
public void remove From Cycle dependencies new Dependency new Dependency UNRESOLVABLE PREREQUISITE new Unsatisfiable Rule false null  removeFromCycle UNRESOLVABLE_PREREQUISITE UnsatisfiableRule
private final static class Unsatisfiable Rule implements I Match Rule public boolean is Satisfied Object required Object available return false  UnsatisfiableRule IMatchRule isSatisfied
public String to String return unsatisfiable NON NLS 1  toString

private int kind Element Change Element element int kind this element element this kind kind  ElementChange
Returns the affected element public Element get Element return element  getElement
Returns the kind of the transition public int get Kind return kind  getKind
private String get Status Name int status String Buffer status Str new String Buffer if status ADDED 0 status Str append ADDED NON NLS 1 if status REMOVED 0 status Str append REMOVED NON NLS 1 if status RESOLVED 0 status Str append RESOLVED NON NLS 1 if status UNRESOLVED 0 status Str append UNRESOLVED NON NLS 1 if status LINKAGE CHANGED 0 status Str append LINKAGE CHANGED NON NLS 1 if status Str length 0 status Str append UNKNOWN NON NLS 1 else status Str delete Char At status Str length 1 return status Str to String  getStatusName StringBuffer statusStr StringBuffer statusStr statusStr statusStr statusStr LINKAGE_CHANGED statusStr LINKAGE_CHANGED statusStr statusStr statusStr deleteCharAt statusStr statusStr toString
public Object get Version Id return element get Version Id  getVersionId getVersionId
void set Kind int kind this kind kind  setKind
public String to String String Buffer result new String Buffer result append element get Id result append   result append get Version Id result append NON NLS 1 result append get Status Name get Kind result append return result to String  toString StringBuffer StringBuffer getId _ getVersionId getStatusName getKind toString

public Element Set Object id Dependency System system this id id this system system this set Needing Update Dependency System SATISFACTION this available new Hash Map this satisfied Collections EMPTY SET this selected Collections EMPTY SET this resolved Collections EMPTY SET this required new Linked List this requiring new Linked List this dependency Counters new Hash Map  ElementSet DependencySystem setNeedingUpdate DependencySystem HashMap EMPTY_SET EMPTY_SET EMPTY_SET LinkedList LinkedList dependencyCounters HashMap
public Dependency System get System return system  DependencySystem getSystem
return false if there is at least one version that does not allow concurrency public boolean allows Concurrency return singletons Count 0  allowsConcurrency singletonsCount
void add Element Element element if this available contains Key element get Version Id return this set Needing Update Dependency System SATISFACTION this available put element get Version Id element Dependency dependencies element get Dependencies for int i 0 i dependencies length i this add Required dependencies i get Required Object Id if element is Singleton this singletons Count system record Element Status Changed element Element Change ADDED  addElement containsKey getVersionId setNeedingUpdate DependencySystem getVersionId getDependencies addRequired getRequiredObjectId isSingleton singletonsCount recordElementStatusChanged ElementChange
void remove Element Element element remove Element element get Version Id  removeElement removeElement getVersionId
void remove Element Object version Id Element to Remove Element this available remove version Id if to Remove null return this mark Needing Update Dependency System SATISFACTION Dependency dependencies to Remove get Dependencies for int i 0 i dependencies length i remove Required dependencies i get Required Object Id if does not allow concurrency decrement preventing Concurrency Count if to Remove is Singleton this singletons Count int change Element Change REMOVED if resolved contains to Remove change Element Change UNRESOLVED system record Element Status Changed to Remove change  removeElement versionId toRemove versionId toRemove markNeedingUpdate DependencySystem toRemove getDependencies removeRequired getRequiredObjectId preventingConcurrencyCount toRemove isSingleton singletonsCount ElementChange toRemove ElementChange recordElementStatusChanged toRemove
Returns the unique id for this element set public Object get Id return id  getId
Is this a root element set public boolean is Root return get Required is Empty  isRoot getRequired isEmpty
Returns all elements available in this element set public Set get Available return new Hash Set available values  getAvailable HashSet
Returns all elements sets required this element set public Collection get Required return required  getRequired
Returns all elements sets requiring this element set public Collection get Requiring return requiring  getRequiring
Returns all elements currently resolved in this element set public Set get Resolved return resolved  getResolved
public void resolve Dependency Dependency dependency Object resolved Version Id dependency resolve resolved Version Id this visited Mark  resolveDependency resolvedVersionId resolvedVersionId visitedMark
public void set Resolved Set new Resolved this set Needing Update Dependency System UP TO DATE TODO this may well be optimized maybe just a pre requisite changed for Iterator resolved Iter this resolved iterator resolved Iter has Next Element resolved Element Element resolved Iter next Dependency dependencies resolved Element get Dependencies for int i 0 i dependencies length i if dependencies i get Changed Mark this get Visited Mark system record Element Status Changed resolved Element Element Change LINKAGE CHANGED break if new Resolved equals this resolved return this set Changed Mark visited Mark Collection old Resolved this resolved this resolved Collections unmodifiable Set new Resolved system record Dependency Changed old Resolved new Resolved  setResolved newResolved setNeedingUpdate DependencySystem UP_TO_DATE resolvedIter resolvedIter hasNext resolvedElement resolvedIter resolvedElement getDependencies getChangedMark getVisitedMark recordElementStatusChanged resolvedElement ElementChange LINKAGE_CHANGED newResolved setChangedMark visitedMark oldResolved unmodifiableSet newResolved recordDependencyChanged oldResolved newResolved
Returns all elements currently selected in this element set public Set get Selected return selected  getSelected
public void set Selected Set selected this set Needing Update Dependency System RESOLUTION if selected equals this selected return this set Changed Mark visited Mark this selected Collections unmodifiable Set selected  setSelected setNeedingUpdate DependencySystem setChangedMark visitedMark unmodifiableSet
Returns all elements currently satisfied in this element set public Set get Satisfied return satisfied  getSatisfied
public void set Satisfied Set satisfied this set Needing Update Dependency System SELECTION if satisfied equals this satisfied return this set Changed Mark visited Mark this satisfied Collections unmodifiable Set satisfied  setSatisfied setNeedingUpdate DependencySystem setChangedMark visitedMark unmodifiableSet
public String to String return this id available NON NLS 1  toString
public boolean equals Object element Set return Element Set element Set get Id equals this id  elementSet ElementSet elementSet getId
public int hash Code return this id hash Code  hashCode hashCode
private void add Required Object required Id this set Needing Update Dependency System SATISFACTION Element Set required Node system get Element Set required Id Dependency Counter counter Dependency Counter this dependency Counters get required Id if counter null this dependency Counters put required Id counter new Dependency Counter links requiring and required element sets in both directions this required add required Node required Node requiring add this required Node set Needing Update Math min required Node get Needing Update Dependency System SELECTION counter value  addRequired requiredId setNeedingUpdate DependencySystem ElementSet requiredNode getElementSet requiredId DependencyCounter DependencyCounter dependencyCounters requiredId dependencyCounters requiredId DependencyCounter requiredNode requiredNode requiredNode setNeedingUpdate requiredNode getNeedingUpdate DependencySystem
private void remove Required Object required Id Element Set required Node system get Element Set required Id Dependency Counter counter Dependency Counter this dependency Counters get required Id if counter null if system in Debug Mode System err println Trying to remove non existent dependency this id required Id NON NLS 1 NON NLS 2 return counter value if counter value 0 this dependency Counters remove required Id removes links between requiring and required element sets this required remove required Node required Node requiring remove this required Node set Needing Update Dependency System SELECTION  removeRequired requiredId ElementSet requiredNode getElementSet requiredId DependencyCounter DependencyCounter dependencyCounters requiredId inDebugMode requiredId dependencyCounters requiredId requiredNode requiredNode requiredNode setNeedingUpdate DependencySystem
public void remove From Cycle Element available Elements Element this available values to Array new Element this available size for int i 0 i available Elements length i remove Element available Elements i available Elements i remove From Cycle add Element available Elements i  removeFromCycle availableElements toArray availableElements removeElement availableElements availableElements removeFromCycle addElement availableElements
int get Requiring Count return requiring size  getRequiringCount
int get Element Count return available size  getElementCount
int get Visited Mark return visited Mark  getVisitedMark visitedMark
void set Visited Mark int mark this visited Mark mark  setVisitedMark visitedMark
int get Changed Mark return changed Mark  getChangedMark changedMark
private void set Changed Mark int mark this changed Mark mark  setChangedMark changedMark
void mark Needing Update int order set Needing Update order  markNeedingUpdate setNeedingUpdate
boolean is Needing Update int order return get Needing Update order  isNeedingUpdate getNeedingUpdate
Element get Element Object version Id return Element this available get version Id  getElement versionId versionId
Assumes resolved system returns all elements whose dependencies were resolved to point to the specified element public Collection get Requiring Elements Object version Id Collection result new Linked List for Iterator requiring Sets Iter requiring iterator requiring Sets Iter has Next Element Set requiring Set Element Set requiring Sets Iter next for Iterator iter requiring Set get Resolved iterator iter has Next Element element Element iter next Dependency requisite element get Dependency this id if requisite null version Id equals requisite get Resolved Version Id result add element return result  getRequiringElements versionId LinkedList requiringSetsIter requiringSetsIter hasNext ElementSet requiringSet ElementSet requiringSetsIter requiringSet getResolved hasNext getDependency versionId getResolvedVersionId
public void unresolve Element element int mark set Visited Mark mark if resolved contains element return Set new Resolved new Hash Set resolved new Resolved remove element resolved Collections unmodifiable Set new Resolved Dependency dependencies element get Dependencies unresolved dependencies for int i 0 i dependencies length i resolve Dependency dependencies i null set Changed Mark mark set Needing Update Dependency System SATISFACTION  setVisitedMark newResolved HashSet newResolved unmodifiableSet newResolved getDependencies resolveDependency setChangedMark setNeedingUpdate DependencySystem
private void set Needing Update int needing Update this needing Update needing Update  setNeedingUpdate needingUpdate needingUpdate needingUpdate
private int get Needing Update return needing Update  getNeedingUpdate needingUpdate

public interface I Element Set Visitor public abstract Collection get Ancestors Element Set node  IElementSetVisitor getAncestors ElementSet
public abstract Collection get Ancestors Element Set node public abstract Collection get Descendants Element Set node  getAncestors ElementSet getDescendants ElementSet
public abstract Collection get Descendants Element Set node public int get Order  getDescendants ElementSet getOrder
public int get Order public abstract void update Element Set node  getOrder ElementSet

public interface I Match Rule public boolean is Satisfied Object constraint Object available  IMatchRule isSatisfied

public interface I Selection Policy Returns a set containing the selected elements for the given element set public Set select Multiple Element Set element Set  ISelectionPolicy selectMultiple ElementSet elementSet
public Set select Multiple Element Set element Set Returns the selected element for the given element set public Element select Single Element Set element Set  selectMultiple ElementSet elementSet selectSingle ElementSet elementSet

Element Identifier Object id Object version Id Object user Object this id id this version Id version Id this user Object user Object  ElementIdentifier versionId userObject versionId versionId userObject userObject
public boolean equals Object an Object if an Object instanceof Element Identifier return false Element Identifier change Element Identifier an Object return change user Object null change user Object equals this user Object this id equals change id this version Id equals change version Id change user Object null this user Object null  anObject anObject ElementIdentifier ElementIdentifier ElementIdentifier anObject userObject userObject userObject versionId versionId userObject userObject
public int hash Code return id hash Code 16 version Id hash Code 0xFFFF  hashCode hashCode versionId hashCode
private Map changes Resolution Delta this changes new Hash Map  ResolutionDelta HashMap
public Element Change get All Changes return Element Change changes values to Array new Element Change changes size  ElementChange getAllChanges ElementChange toArray ElementChange
public Element Change get Change Object id Object version Id Object user Object return Element Change changes get new Element Identifier id version Id user Object  ElementChange getChange versionId userObject ElementChange ElementIdentifier versionId userObject
Record a new status change void record Change Element element int kind check if a change has already been recorded for the element Element Change existing Change this get Change element get Id element get Version Id element get User Object if not just record it and we are done if existing Change null this changes put new Element Identifier element get Id element get Version Id element get User Object new Element Change element kind return a removal cancels any existing addition if kind Element Change REMOVED if existing Change get Kind Element Change ADDED if it was just an addition just forget the change this changes remove new Element Identifier element get Id element get Version Id element get User Object return else if existing Change get Kind Element Change ADDED 0 if it was an addition among other things forget the addition bit and ensure the removal bit is set existing Change set Kind existing Change get Kind Element Change ADDED Element Change REMOVED return otherwise just update the new status for the existing change object existing Change set Kind existing Change get Kind kind  recordChange ElementChange existingChange getChange getId getVersionId getUserObject existingChange ElementIdentifier getId getVersionId getUserObject ElementChange ElementChange existingChange getKind ElementChange ElementIdentifier getId getVersionId getUserObject existingChange getKind ElementChange existingChange setKind existingChange getKind ElementChange ElementChange existingChange setKind existingChange getKind
public String to String return changes values to String  toString toString

private int order public Resolution Visitor int order this order order  ResolutionVisitor
public Collection get Ancestors Element Set element Set return element Set get Required  getAncestors ElementSet elementSet elementSet getRequired
public Collection get Descendants Element Set element Set return element Set get Requiring  getDescendants ElementSet elementSet elementSet getRequiring
public int get Order return order  getOrder
public void update Element Set element Set if there are no pre requisites all selected versions are resolved if element Set get Required is Empty element Set set Resolved element Set get Selected return Set resolved new Hash Set for Iterator elements Iter element Set get Selected iterator elements Iter has Next Element element Element elements Iter next Dependency dependencies element get Dependencies boolean version Resolved true for int i 0 i dependencies length i Element Set required Node element Set get System get Element Set dependencies i get Required Object Id List required Node Resolved Versions new Array List required Node get Resolved Object highest Required Version Id null for Iterator required Node Resolved Versions Iter required Node Resolved Versions iterator required Node Resolved Versions Iter has Next Element required Resolved Version Element required Node Resolved Versions Iter next if dependencies i get Match Rule is Satisfied dependencies i get User Object required Resolved Version get Version Id if highest Required Version Id null element Set get System compare required Resolved Version get Version Id highest Required Version Id 0 highest Required Version Id required Resolved Version get Version Id if highest Required Version Id null dependencies i is Optional version Resolved false break new version id will be null if dependency cannot be satisfied but is optional element Set resolve Dependency dependencies i highest Required Version Id if version Resolved resolved add element element Set set Resolved resolved  ElementSet elementSet elementSet getRequired isEmpty elementSet setResolved elementSet getSelected HashSet elementsIter elementSet getSelected elementsIter hasNext elementsIter getDependencies versionResolved ElementSet requiredNode elementSet getSystem getElementSet getRequiredObjectId requiredNodeResolvedVersions ArrayList requiredNode getResolved highestRequiredVersionId requiredNodeResolvedVersionsIter requiredNodeResolvedVersions requiredNodeResolvedVersionsIter hasNext requiredResolvedVersion requiredNodeResolvedVersionsIter getMatchRule isSatisfied getUserObject requiredResolvedVersion getVersionId highestRequiredVersionId elementSet getSystem requiredResolvedVersion getVersionId highestRequiredVersionId highestRequiredVersionId requiredResolvedVersion getVersionId highestRequiredVersionId isOptional versionResolved elementSet resolveDependency highestRequiredVersionId versionResolved elementSet setResolved

private int order public Satisfaction Visitor int order this order order  SatisfactionVisitor
public Collection get Ancestors Element Set element Set return element Set get Required  getAncestors ElementSet elementSet elementSet getRequired
public Collection get Descendants Element Set element Set return element Set get Requiring  getDescendants ElementSet elementSet elementSet getRequiring
public int get Order return order  getOrder
public void update Element Set element Set if there are no pre requisites all available versions are satisfied if element Set get Required is Empty element Set set Satisfied element Set get Available return Set satisfied new Hash Set for Iterator elements Iter element Set get Available iterator elements Iter has Next Element element Element elements Iter next Dependency dependencies element get Dependencies boolean version Satisfied true for int i 0 i dependencies length i optional pre requisites are not relevant for satisfaction if dependencies i is Optional continue Element Set required Node element Set get System get Element Set dependencies i get Required Object Id Collection required Node Satisfied Versions required Node get Satisfied boolean dep Satisfied false for Iterator required Node Satisfied Versions Iter required Node Satisfied Versions iterator required Node Satisfied Versions Iter has Next Element required Satisfied Version Element required Node Satisfied Versions Iter next if dependencies i get Match Rule is Satisfied dependencies i get User Object required Satisfied Version get Version Id dep Satisfied true break if dep Satisfied version Satisfied false break if version Satisfied satisfied add element element Set set Satisfied satisfied  ElementSet elementSet elementSet getRequired isEmpty elementSet setSatisfied elementSet getAvailable HashSet elementsIter elementSet getAvailable elementsIter hasNext elementsIter getDependencies versionSatisfied isOptional ElementSet requiredNode elementSet getSystem getElementSet getRequiredObjectId requiredNodeSatisfiedVersions requiredNode getSatisfied depSatisfied requiredNodeSatisfiedVersionsIter requiredNodeSatisfiedVersions requiredNodeSatisfiedVersionsIter hasNext requiredSatisfiedVersion requiredNodeSatisfiedVersionsIter getMatchRule isSatisfied getUserObject requiredSatisfiedVersion getVersionId depSatisfied depSatisfied versionSatisfied versionSatisfied elementSet setSatisfied

private I Selection Policy selection Policy public Selection Visitor int order I Selection Policy selection Policy this order order this selection Policy selection Policy  ISelectionPolicy selectionPolicy SelectionVisitor ISelectionPolicy selectionPolicy selectionPolicy selectionPolicy
public final Collection get Ancestors Element Set element Set return element Set get Requiring  getAncestors ElementSet elementSet elementSet getRequiring
public final Collection get Descendants Element Set element Set return element Set get Required  getDescendants ElementSet elementSet elementSet getRequired
public int get Order return order  getOrder
public void update Element Set element Set no versions satisfied so no versions selected if element Set get Satisfied is Empty element Set set Selected Collections EMPTY SET return all versions allow concurrency select only those which are required or the highest if element Set allows Concurrency element Set set Selected this selection Policy select Multiple element Set return otherwise we must pick a single one if any Element selected this selection Policy select Single element Set element Set set Selected selected null Collections EMPTY SET Collections singleton selected  ElementSet elementSet elementSet getSatisfied isEmpty elementSet setSelected EMPTY_SET elementSet allowsConcurrency elementSet setSelected selectionPolicy selectMultiple elementSet selectionPolicy selectSingle elementSet elementSet setSelected EMPTY_SET

public class Simple Selection Policy implements I Selection Policy public Set select Multiple Element Set element Set all satisfied are selected return new Hash Set element Set get Satisfied  SimpleSelectionPolicy ISelectionPolicy selectMultiple ElementSet elementSet HashSet elementSet getSatisfied
public Element select Single Element Set element Set just pick the satisfied element with the highest version Element highest null for Iterator satisfied Iter element Set get Satisfied iterator satisfied Iter has Next Element satisfied Version Element satisfied Iter next if highest null element Set get System compare satisfied Version get Version Id highest get Version Id 0 highest satisfied Version return highest  selectSingle ElementSet elementSet satisfiedIter elementSet getSatisfied satisfiedIter hasNext satisfiedVersion satisfiedIter elementSet getSystem satisfiedVersion getVersionId getVersionId satisfiedVersion

Creates a new empty tree public Abstract Data Tree this empty  AbstractDataTree
Returns a copy of the the receiver which shares the receiver s instance variables protected Abstract Data Tree copy Abstract Data Tree new Tree this create Instance new Tree set Immutable this is Immutable new Tree set Root Node this get Root Node return new Tree  AbstractDataTree AbstractDataTree newTree createInstance newTree setImmutable isImmutable newTree setRootNode getRootNode newTree
Returns a copy of the node subtree rooted at the given key 
Creates a new child in the tree If a child with such a name exists it is replaced with the new child param parent Key key of parent for new child param local Name name for new child exception Object Not Found Exception parent Key does not exist in the receiver exception Invalid Parameter Exception receiver is immutable  parentKey localName ObjectNotFoundException parentKey InvalidParameterException
Creates a new child in the tree If a child with such a name exists it is replaced with the new child param parent Key key of parent for new child param local Name name for new child param object the data for the new child exception Object Not Found Exception parent Key does not exist in the receiver exception Invalid Parameter Exception receiver is immutable  parentKey localName ObjectNotFoundException parentKey InvalidParameterException
Creates and returns a new instance of the tree This is an implementation of the factory method creational pattern for allowing abstract methods to create instances return the new tree 
Creates or replaces a subtree in the tree The parent node must exist param key key of parent of subtree to create replace param subtree new subtree to add to tree exception Invalid Parameter Exception receiver is immutable  InvalidParameterException
Deletes a child from the tree p Note this method requires both parent Key and local Name making it impossible to delete the root node param parent Key parent of node to delete param local Name name of node to delete exception Object Not Found Exception a child of parent Key with name local Name does not exist in the receiver exception Invalid Parameter Exception receiver is immutable  parentKey localName parentKey localName ObjectNotFoundException parentKey localName InvalidParameterException
Initializes the receiver so that it is a complete empty tree The result does not represent a delta on another tree An empty tree is defined to have a root node with null data and no children 
Returns the key of a node in the tree param parent Key parent of child to retrieve param index index of the child to retrieve in it s parent exception Object Not Found Exception parent Key does not exist in the receiver exception Array Index Out Of Bounds Exception if no child with the given index runtime exception public I Path get Child I Path parent Key int index Get name of given child of the parent String child get Name Of Child parent Key index return parent Key append child  parentKey ObjectNotFoundException parentKey ArrayIndexOutOfBoundsException IPath getChild IPath parentKey getNameOfChild parentKey parentKey
Returns the number of children of a node param parent Key key of the node for which we want to retreive the number of children exception Object Not Found Exception parent Key does not exist in the receiver public int get Child Count I Path parent Key return get Names Of Children parent Key length  parentKey ObjectNotFoundException parentKey getChildCount IPath parentKey getNamesOfChildren parentKey
Returns the keys of all children of a node param parent Key key of parent whose children we want to retrieve exception Object Not Found Exception parent Key does not exist in the receiver public I Path get Children I Path parent Key String names get Names Of Children parent Key int len names length if len 0 return NO CHILDREN I Path answer new I Path len for int i 0 i len i answer i parent Key append names i return answer  parentKey ObjectNotFoundException parentKey IPath getChildren IPath parentKey getNamesOfChildren parentKey NO_CHILDREN IPath IPath parentKey
Returns the data of a node param key key of node for which we want to retrieve data exception Object Not Found Exception key does not exist in the receiver  ObjectNotFoundException
Returns the local name of a node in the tree param parent Key parent of node whose name we want to retrieve param index index of node in its parent exception Object Not Found Exception parent Key does not exist in the receiver exception Array Index Out Of Bounds Exception if no child with the given index public String get Name Of Child I Path parent Key int index String child Names get Names Of Children parent Key Return the requested child as long as its in range return child Names index  parentKey ObjectNotFoundException parentKey ArrayIndexOutOfBoundsException getNameOfChild IPath parentKey childNames getNamesOfChildren parentKey childNames
Returns the local names for the children of a node param parent Key key of node whose children we want to retrieve exception Object Not Found Exception parent Key does not exist in the receiver  parentKey ObjectNotFoundException parentKey
Returns the root node of the tree p Both subclasses must be able to return their root node However subclasses can have different types of root nodes so this is not enforced as an abstract method Abstract Data Tree Node get Root Node throw new Abstract Method Error Policy bind dtree subclass Implement NON NLS 1  AbstractDataTreeNode getRootNode AbstractMethodError subclassImplement
Handles the case where an attempt was made to modify the tree when it was in an immutable state Throws an unchecked exception static void handle Immutable Tree throw new Runtime Exception Policy bind dtree immutable NON NLS 1  handleImmutableTree RuntimeException
Handles the case where an attempt was made to manipulate an element in the tree that does not exist Throws an unchecked exception static void handle Not Found I Path key throw new Object Not Found Exception Policy bind dtree not Found key to String NON NLS 1  handleNotFound IPath ObjectNotFoundException notFound toString
Makes the tree immutable public void immutable immutable true 
Returns true if the receiver includes a node with the given key false otherwise param key key of node to find 
Returns true if the tree is immutable and false otherwise public boolean is Immutable return immutable  isImmutable
Returns an object containing a flag indicating whether the specified node was found the data for the node if it was found param key key of node for which we want to retrieve data 
Returns the key of the root node public I Path root Key return Path ROOT  IPath rootKey
Sets the data of a node param key key of node for which to set data param data new data value for node exception Object Not Found Exception the node Key does not exist in the receiver exception Illegal Argument Exception receiver is immutable  ObjectNotFoundException nodeKey IllegalArgumentException
Sets the immutable field void set Immutable boolean bool immutable bool  setImmutable
Sets the root node of the tree p Both subclasses must be able to set their root node However subclasses can have different types of root nodes so this is not enforced as an abstract method void set Root Node Abstract Data Tree Node node throw new Error Policy bind dtree subclass Implement NON NLS 1  setRootNode AbstractDataTreeNode subclassImplement
public String to Debug String String Buffer buffer new String Buffer to Debug String get Root Node buffer 0 return buffer to String  toDebugString StringBuffer StringBuffer toDebugString getRootNode toString
private void to Debug String Abstract Data Tree Node node String Buffer buffer int depth for int i 0 i depth i buffer append t buffer append node to String buffer append n Abstract Data Tree Node child Nodes node get Children for int i 0 i child Nodes length i to Debug String child Nodes i buffer depth 1  toDebugString AbstractDataTreeNode StringBuffer toString AbstractDataTreeNode childNodes getChildren childNodes toDebugString childNodes

Creates a new data tree node param name name of new node param children children of the new node Abstract Data Tree Node String name Abstract Data Tree Node children this name name if children null children length 0 this children Abstract Data Tree Node NO CHILDREN else this children children  AbstractDataTreeNode AbstractDataTreeNode AbstractDataTreeNode NO_CHILDREN
Returns a node which if applied to the receiver will produce the corresponding node in the given parent tree param my Tree tree to which the node belongs param parent Tree parent tree on which to base backward delta param key key of node in its tree  myTree parentTree
If this node is a node in a comparison tree this method reverses the comparison for this node and all children Abstract Data Tree Node as Reverse Comparison Node I Comparator comparator return this  AbstractDataTreeNode asReverseComparisonNode IComparator
Returns the result of assembling nodes with the given forward delta nodes Both arrays must be sorted by name The result is sorted by name If keep Deleted is true explicit representations of deletions are kept otherwise nodes to be deleted are removed in the result static Abstract Data Tree Node assemble With Abstract Data Tree Node old Nodes Abstract Data Tree Node new Nodes boolean keep Deleted Optimize the common case where the new list is empty if new Nodes length 0 return old Nodes Can t just return new Nodes if old Nodes has length 0 because new Nodes may contain deleted nodes Abstract Data Tree Node result Nodes new Abstract Data Tree Node old Nodes length new Nodes length do a merge int old Index 0 int new Index 0 int result Index 0 while old Index old Nodes length new Index new Nodes length int compare old Nodes old Index name compare To new Nodes new Index name if compare 0 Abstract Data Tree Node node old Nodes old Index assemble With new Nodes new Index if node null node is Deleted keep Deleted result Nodes result Index node else if compare 0 result Nodes result Index old Nodes old Index else if compare 0 Abstract Data Tree Node node new Nodes new Index if node is Deleted keep Deleted result Nodes result Index node while old Index old Nodes length result Nodes result Index old Nodes old Index while new Index new Nodes length Abstract Data Tree Node result Node new Nodes new Index if result Node is Deleted keep Deleted result Nodes result Index result Node trim size of result if result Index result Nodes length System arraycopy result Nodes 0 result Nodes new Abstract Data Tree Node result Index 0 result Index return result Nodes  keepDeleted AbstractDataTreeNode assembleWith AbstractDataTreeNode oldNodes AbstractDataTreeNode newNodes keepDeleted newNodes oldNodes newNodes oldNodes newNodes AbstractDataTreeNode resultNodes AbstractDataTreeNode oldNodes newNodes oldIndex newIndex resultIndex oldIndex oldNodes newIndex newNodes oldNodes oldIndex compareTo newNodes newIndex AbstractDataTreeNode oldNodes oldIndex assembleWith newNodes newIndex isDeleted keepDeleted resultNodes resultIndex resultNodes resultIndex oldNodes oldIndex AbstractDataTreeNode newNodes newIndex isDeleted keepDeleted resultNodes resultIndex oldIndex oldNodes resultNodes resultIndex oldNodes oldIndex newIndex newNodes AbstractDataTreeNode resultNode newNodes newIndex resultNode isDeleted keepDeleted resultNodes resultIndex resultNode resultIndex resultNodes resultNodes resultNodes AbstractDataTreeNode resultIndex resultIndex resultNodes
Returns the result of assembling this node with the given forward delta node Abstract Data Tree Node assemble With Abstract Data Tree Node node If not a delta or if the old node was deleted then the new node represents the complete picture if node is Delta this is Deleted return node node must be either a Data Delta Node or a No Data Delta Node if node has Data if this is Delta keep deletions because they still need to hide child nodes in the parent Abstract Data Tree Node assembled Children assemble With children node children true return new Data Delta Node name node get Data assembled Children else This is a complete picture so deletions wipe out the child and are no longer useful Abstract Data Tree Node assembled Children assemble With children node children false return new Data Tree Node name node get Data assembled Children else if this is Delta Abstract Data Tree Node assembled Children assemble With children node children true if this has Data return new Data Delta Node name this get Data assembled Children else return new No Data Delta Node name assembled Children else Abstract Data Tree Node assembled Children assemble With children node children false return new Data Tree Node name this get Data assembled Children  AbstractDataTreeNode assembleWith AbstractDataTreeNode isDelta isDeleted DataDeltaNode NoDataDeltaNode hasData isDelta AbstractDataTreeNode assembledChildren assembleWith DataDeltaNode getData assembledChildren AbstractDataTreeNode assembledChildren assembleWith DataTreeNode getData assembledChildren isDelta AbstractDataTreeNode assembledChildren assembleWith hasData DataDeltaNode getData assembledChildren NoDataDeltaNode assembledChildren AbstractDataTreeNode assembledChildren assembleWith DataTreeNode getData assembledChildren
Returns the result of assembling this node with the given forward delta node Abstract Data Tree Node assemble With Abstract Data Tree Node node I Path key int key Index leaf case int key Len key segment Count if key Index key Len return assemble With node non leaf case int child Index index Of Child key segment key Index if child Index 0 Abstract Data Tree Node copy copy copy children child Index children child Index assemble With node key key Index 1 return copy Child not found Build up No Data Delta Node hierarchy for rest of key and assemble with that for int i key Len 2 i key Index i node new No Data Delta Node key segment i node node new No Data Delta Node name node return assemble With node  AbstractDataTreeNode assembleWith AbstractDataTreeNode IPath keyIndex keyLen segmentCount keyIndex keyLen assembleWith childIndex indexOfChild keyIndex childIndex AbstractDataTreeNode childIndex childIndex assembleWith keyIndex NoDataDeltaNode keyLen keyIndex NoDataDeltaNode NoDataDeltaNode assembleWith
Returns the child with the given local name The child must exist Abstract Data Tree Node child At String local Name Abstract Data Tree Node node child At Or Null local Name if node null return node throw new Object Not Found Exception Policy bind dtree missing Child local Name NON NLS 1  AbstractDataTreeNode childAt localName AbstractDataTreeNode childAtOrNull localName ObjectNotFoundException missingChild localName
Returns the child with the given local name Returns null if the child does not exist param local Name name of child to retrieve Abstract Data Tree Node child At Or Null String local Name int index index Of Child local Name return index 0 children index null  localName AbstractDataTreeNode childAtOrNull localName indexOfChild localName
Returns the child with the given local name ignoring case Returns null if the child does not exist param local Name name of child to retrieve Abstract Data Tree Node child At Ignore Case String local Name Abstract Data Tree Node children this children for int i 0 i children length i if children i get Name equals Ignore Case local Name return children i return null  localName AbstractDataTreeNode childAtIgnoreCase localName AbstractDataTreeNode getName equalsIgnoreCase localName
protected static Abstract Data Tree Node compare With Abstract Data Tree Node old Nodes Abstract Data Tree Node new Nodes I Comparator comparator int old Len old Nodes length int new Len new Nodes length int old Index 0 int new Index 0 Abstract Data Tree Node compared Nodes new Abstract Data Tree Node old Len new Len int count 0 while old Index old Len new Index new Len Data Tree Node old Node Data Tree Node old Nodes old Index Data Tree Node new Node Data Tree Node new Nodes new Index int compare old Node name compare To new Node name if compare 0 give the client a chance to say whether it should be in the delta int user Comparison comparator compare old Node get Data null if user Comparison 0 compared Nodes count convert To Removed Comparison Node old Node user Comparison old Index else if compare 0 give the client a chance to say whether it should be in the delta int user Comparison comparator compare null new Node get Data if user Comparison 0 compared Nodes count convert To Added Comparison Node new Node user Comparison new Index else Abstract Data Tree Node compared Node old Node compare With new Node comparator Node Comparison comparison Node Comparison compared Node get Data skip empty comparisions if comparison is Unchanged compared Node size 0 compared Nodes count compared Node old Index new Index while old Index old Len Data Tree Node old Node Data Tree Node old Nodes old Index give the client a chance to say whether it should be in the delta int user Comparison comparator compare old Node get Data null if user Comparison 0 compared Nodes count convert To Removed Comparison Node old Node user Comparison while new Index new Len Data Tree Node new Node Data Tree Node new Nodes new Index give the client a chance to say whether it should be in the delta int user Comparison comparator compare null new Node get Data if user Comparison 0 compared Nodes count convert To Added Comparison Node new Node user Comparison if count 0 return NO CHILDREN if count compared Nodes length System arraycopy compared Nodes 0 compared Nodes new Abstract Data Tree Node count 0 count return compared Nodes  AbstractDataTreeNode compareWith AbstractDataTreeNode oldNodes AbstractDataTreeNode newNodes IComparator oldLen oldNodes newLen newNodes oldIndex newIndex AbstractDataTreeNode comparedNodes AbstractDataTreeNode oldLen newLen oldIndex oldLen newIndex newLen DataTreeNode oldNode DataTreeNode oldNodes oldIndex DataTreeNode newNode DataTreeNode newNodes newIndex oldNode compareTo newNode userComparison oldNode getData userComparison comparedNodes convertToRemovedComparisonNode oldNode userComparison oldIndex userComparison newNode getData userComparison comparedNodes convertToAddedComparisonNode newNode userComparison newIndex AbstractDataTreeNode comparedNode oldNode compareWith newNode NodeComparison NodeComparison comparedNode getData isUnchanged comparedNode comparedNodes comparedNode oldIndex newIndex oldIndex oldLen DataTreeNode oldNode DataTreeNode oldNodes oldIndex userComparison oldNode getData userComparison comparedNodes convertToRemovedComparisonNode oldNode userComparison newIndex newLen DataTreeNode newNode DataTreeNode newNodes newIndex userComparison newNode getData userComparison comparedNodes convertToAddedComparisonNode newNode userComparison NO_CHILDREN comparedNodes comparedNodes comparedNodes AbstractDataTreeNode comparedNodes
protected static Abstract Data Tree Node compare With Parent Abstract Data Tree Node nodes I Path key Delta Data Tree parent I Comparator comparator Abstract Data Tree Node compared Nodes new Abstract Data Tree Node nodes length int count 0 for int i 0 i nodes length i Abstract Data Tree Node node nodes i Abstract Data Tree Node compared Node node compare With Parent key append node get Name parent comparator Node Comparison comparison Node Comparison compared Node get Data Skip it if it s an empty comparison and no children if comparison is Unchanged compared Node size 0 compared Nodes count compared Node if count 0 return NO CHILDREN if count compared Nodes length System arraycopy compared Nodes 0 compared Nodes new Abstract Data Tree Node count 0 count return compared Nodes  AbstractDataTreeNode compareWithParent AbstractDataTreeNode IPath DeltaDataTree IComparator AbstractDataTreeNode comparedNodes AbstractDataTreeNode AbstractDataTreeNode AbstractDataTreeNode comparedNode compareWithParent getName NodeComparison NodeComparison comparedNode getData isUnchanged comparedNode comparedNodes comparedNode NO_CHILDREN comparedNodes comparedNodes comparedNodes AbstractDataTreeNode comparedNodes
abstract Abstract Data Tree Node compare With Parent I Path key Delta Data Tree parent I Comparator comparator  AbstractDataTreeNode compareWithParent IPath DeltaDataTree IComparator
static Abstract Data Tree Node convert To Added Comparison Node Abstract Data Tree Node new Node int user Comparison Abstract Data Tree Node children new Node get Children int n children length Abstract Data Tree Node converted Children if n 0 converted Children NO CHILDREN else converted Children new Abstract Data Tree Node n for int i 0 i n i converted Children i convert To Added Comparison Node children i user Comparison return new Data Tree Node new Node name new Node Comparison null new Node get Data Node Comparison K ADDED user Comparison converted Children  AbstractDataTreeNode convertToAddedComparisonNode AbstractDataTreeNode newNode userComparison AbstractDataTreeNode newNode getChildren AbstractDataTreeNode convertedChildren convertedChildren NO_CHILDREN convertedChildren AbstractDataTreeNode convertedChildren convertToAddedComparisonNode userComparison DataTreeNode newNode NodeComparison newNode getData NodeComparison K_ADDED userComparison convertedChildren
static Abstract Data Tree Node convert To Removed Comparison Node Abstract Data Tree Node old Node int user Comparison Abstract Data Tree Node children old Node get Children int n children length Abstract Data Tree Node converted Children if n 0 converted Children NO CHILDREN else converted Children new Abstract Data Tree Node n for int i 0 i n i converted Children i convert To Removed Comparison Node children i user Comparison return new Data Tree Node old Node name new Node Comparison old Node get Data null Node Comparison K REMOVED user Comparison converted Children  AbstractDataTreeNode convertToRemovedComparisonNode AbstractDataTreeNode oldNode userComparison AbstractDataTreeNode oldNode getChildren AbstractDataTreeNode convertedChildren convertedChildren NO_CHILDREN convertedChildren AbstractDataTreeNode convertedChildren convertToRemovedComparisonNode userComparison DataTreeNode oldNode NodeComparison oldNode getData NodeComparison K_REMOVED userComparison convertedChildren
Returns a copy of the receiver which shares the receiver elements abstract Abstract Data Tree Node copy  AbstractDataTreeNode
Replaces the receiver s children between from and to with the children in other Node starting at start This method replaces the Smalltalk replace From to with starting At method for copying children in data nodes protected void copy Children int from int to Abstract Data Tree Node other Node int start int other start for int i from i to i other this children i other Node children other  otherNode replaceFrom startingAt copyChildren AbstractDataTreeNode otherNode otherNode
Returns an array of the node s children public Abstract Data Tree Node get Children return children  AbstractDataTreeNode getChildren
Returns the node s data Object get Data throw new Abstract Method Error Policy bind dtree subclass Implement NON NLS 1  getData AbstractMethodError subclassImplement
return the name of the node public String get Name return name  getName
Returns true if the receiver can carry data false otherwise boolean has Data return false  hasData
Returns true if the receiver has a child with the given local name false otherwise boolean includes Child String local Name return index Of Child local Name 1  includesChild localName indexOfChild localName
Returns the index of the specified child s name in the receiver protected int index Of Child String local Name Abstract Data Tree Node children this children int left 0 int right children length 1 while left right int mid left right 2 int compare local Name compare To children mid name if compare 0 right mid 1 else if compare 0 left mid 1 else return mid return 1  indexOfChild localName AbstractDataTreeNode localName compareTo
Returns true if the receiver represents a deleted node false otherwise boolean is Deleted return false  isDeleted
Returns true if the receiver represents delta information false if it represents the complete information boolean is Delta return false  isDelta
Returns true if the receiver is an empty delta node false otherwise boolean is Empty Delta return false  isEmptyDelta
Returns the local names of the receiver s children String names Of Children String names new String children length copy child names Reverse loop optimized for int i children length i 0 names i children i get Name return names  namesOfChildren getName
Returns an object describing the receiver which is a node at the given key in the given tree Node Info node Info At Abstract Data Tree tree int num Children 0 num Deleted 0 String children deleted Abstract Data Tree Node child Node Object data null do for each of the children of the receiver for int i this size i 0 if this children i is Deleted num Deleted else num Children allocate arrays children new String num Children deleted new String num Deleted num Children num Deleted 0 do for each child of the receiver for int i 0 i this size i child Node this children i if child Node is Deleted deleted num Deleted child Node get Name else children num Children child Node get Name if this has Data data this get Data create and return the info object return new Node Info this type data children deleted  NodeInfo nodeInfoAt AbstractDataTree numChildren numDeleted AbstractDataTreeNode childNode isDeleted numDeleted numChildren numChildren numDeleted numChildren numDeleted childNode childNode isDeleted numDeleted childNode getName numChildren childNode getName hasData getData NodeInfo
Sort the nodes in the given array static void quick Sort Abstract Data Tree Node list int left int right int original left left int original right right Abstract Data Tree Node mid list left right 2 do while list left name compare To mid name 0 left while mid name compare To list right name 0 right if left right Abstract Data Tree Node tmp list left list left list right list right tmp left right while left right if original left right quick Sort list original left right if left original right quick Sort list left original right  quickSort AbstractDataTreeNode original_left original_right AbstractDataTreeNode compareTo compareTo AbstractDataTreeNode original_left quickSort original_left original_right quickSort original_right
Replaces the child with the given local name void replace Child String local Name Data Tree Node node int i index Of Child local Name if i 0 children i node else throw new Object Not Found Exception Policy bind dtree missing Child local Name NON NLS 1  replaceChild localName DataTreeNode indexOfChild localName ObjectNotFoundException missingChild localName
Set the node s children protected void set Children Abstract Data Tree Node new Children children new Children  setChildren AbstractDataTreeNode newChildren newChildren
Set the node s name void set Name String s name s  setName
Simplifies the given nodes and answers their replacements protected static Abstract Data Tree Node simplify With Parent Abstract Data Tree Node nodes I Path key Delta Data Tree parent I Comparator comparer Abstract Data Tree Node simplified Nodes new Abstract Data Tree Node nodes length int simplified Count 0 for int i 0 i nodes length i Abstract Data Tree Node node nodes i Abstract Data Tree Node simplified Node node simplify With Parent key append node get Name parent comparer if simplified Node is Empty Delta simplified Nodes simplified Count simplified Node if simplified Count 0 return NO CHILDREN if simplified Count simplified Nodes length System arraycopy simplified Nodes 0 simplified Nodes new Abstract Data Tree Node simplified Count 0 simplified Count return simplified Nodes  AbstractDataTreeNode simplifyWithParent AbstractDataTreeNode IPath DeltaDataTree IComparator AbstractDataTreeNode simplifiedNodes AbstractDataTreeNode simplifiedCount AbstractDataTreeNode AbstractDataTreeNode simplifiedNode simplifyWithParent getName simplifiedNode isEmptyDelta simplifiedNodes simplifiedCount simplifiedNode simplifiedCount NO_CHILDREN simplifiedCount simplifiedNodes simplifiedNodes simplifiedNodes AbstractDataTreeNode simplifiedCount simplifiedCount simplifiedNodes
Simplifies the given node and answers its replacement abstract Abstract Data Tree Node simplify With Parent I Path key Delta Data Tree parent I Comparator comparer  AbstractDataTreeNode simplifyWithParent IPath DeltaDataTree IComparator
Returns the number of children of the receiver int size return children length 
Sort the nodes in the given array public static void sort Abstract Data Tree Node list if list length 1 quick Sort list 0 list length 1  AbstractDataTreeNode quickSort
Returns a unicode representation of the node This method is used for debugging purposes only no NLS support needed public String to String return an Abstract Data Tree Node this get Name with get Children length children NON NLS 1 NON NLS 2 NON NLS 3  toString AbstractDataTreeNode getName getChildren
Returns a constant describing the type of node abstract int type 

public class Data Delta Node extends Data Tree Node Returns a new node with the given name and children Data Delta Node String name Abstract Data Tree Node children super name null children  DataDeltaNode DataTreeNode DataDeltaNode AbstractDataTreeNode
Creates a node with the given name and data but with no children Data Delta Node String name Object data super name data  DataDeltaNode
Creates a node with the given name data and children Data Delta Node String name Object data Abstract Data Tree Node children super name data children  DataDeltaNode AbstractDataTreeNode
see Abstract Data Tree Node as Backward Delta Delta Data Tree Delta Data Tree I Path Abstract Data Tree Node as Backward Delta Delta Data Tree my Tree Delta Data Tree parent Tree I Path key Abstract Data Tree Node new Children if children length 0 new Children NO CHILDREN else new Children new Abstract Data Tree Node children length for int i children length i 0 new Children i children i as Backward Delta my Tree parent Tree key append children i get Name return new Data Delta Node name parent Tree get Data key new Children  AbstractDataTreeNode asBackwardDelta DeltaDataTree DeltaDataTree IPath AbstractDataTreeNode asBackwardDelta DeltaDataTree myTree DeltaDataTree parentTree IPath AbstractDataTreeNode newChildren newChildren NO_CHILDREN newChildren AbstractDataTreeNode newChildren asBackwardDelta myTree parentTree getName DataDeltaNode parentTree getData newChildren
Abstract Data Tree Node compare With Parent I Path key Delta Data Tree parent I Comparator comparator Abstract Data Tree Node compared Children compare With Parent children key parent comparator Object old Data parent get Data key Object new Data data don t compare data of root int user Comparison 0 if key parent root Key allow client to specify user comparison bits user Comparison comparator compare old Data new Data return new Data Tree Node key last Segment new Node Comparison old Data new Data Node Comparison K CHANGED user Comparison compared Children  AbstractDataTreeNode compareWithParent IPath DeltaDataTree IComparator AbstractDataTreeNode comparedChildren compareWithParent oldData getData newData userComparison rootKey userComparison oldData newData DataTreeNode lastSegment NodeComparison oldData newData NodeComparison K_CHANGED userComparison comparedChildren
Creates and returns a new copy of the receiver Makes a deep copy of children but a shallow copy of name and data Abstract Data Tree Node copy Abstract Data Tree Node children Copy if children length 0 children Copy NO CHILDREN else children Copy new Abstract Data Tree Node children length System arraycopy children 0 children Copy 0 children length return new Data Delta Node name data children Copy  AbstractDataTreeNode AbstractDataTreeNode childrenCopy childrenCopy NO_CHILDREN childrenCopy AbstractDataTreeNode childrenCopy DataDeltaNode childrenCopy
Returns true if the receiver represents delta information false if it represents the complete information boolean is Delta return true  isDelta
Simplifies the given node and answers its replacement Abstract Data Tree Node simplify With Parent I Path key Delta Data Tree parent I Comparator comparer Abstract Data Tree Node simplified Children simplify With Parent children key parent comparer don t compare root nodes if key is Root comparer compare parent get Data key data 0 return new No Data Delta Node name simplified Children else return new Data Delta Node name data simplified Children  AbstractDataTreeNode simplifyWithParent IPath DeltaDataTree IComparator AbstractDataTreeNode simplifiedChildren simplifyWithParent isRoot getData NoDataDeltaNode simplifiedChildren DataDeltaNode simplifiedChildren
Returns a unicode representation of the node This method is used for debugging purposes only no NLS support needed public String to String return a Data Delta Node this get Name with get Children length children NON NLS 1 NON NLS 2 NON NLS 3  toString DataDeltaNode getName getChildren
Returns a constant describing the type of node int type return T DELTA NODE  T_DELTA_NODE

Creates a new empty tree public Data Tree this empty  DataTree
Creates a new tree param root Node Root node for new tree public Data Tree Data Tree Node root Node this root Node root Node  rootNode DataTree DataTreeNode rootNode rootNode rootNode
Returns a copy of the node subtree rooted at the given key param key Key of subtree to copy public Abstract Data Tree Node copy Complete Subtree I Path key Data Tree Node node find Node At key if node null handle Not Found key return copy Hierarchy node  AbstractDataTreeNode copyCompleteSubtree IPath DataTreeNode findNodeAt handleNotFound copyHierarchy
Returns a deep copy of a node and all its children param node Node to be copied Data Tree Node copy Hierarchy Data Tree Node node Data Tree Node new Node int size node size if size 0 new Node new Data Tree Node node get Name node get Data else Abstract Data Tree Node children node get Children Data Tree Node new Children new Data Tree Node size for int i size i 0 new Children i this copy Hierarchy Data Tree Node children i new Node new Data Tree Node node get Name node get Data new Children return new Node  DataTreeNode copyHierarchy DataTreeNode DataTreeNode newNode newNode DataTreeNode getName getData AbstractDataTreeNode getChildren DataTreeNode newChildren DataTreeNode newChildren copyHierarchy DataTreeNode newNode DataTreeNode getName getData newChildren newNode
Creates a new child in the tree see Abstract Data Tree create Child I Path String public void create Child I Path parent Key String local Name create Child parent Key local Name null  AbstractDataTree createChild IPath createChild IPath parentKey localName createChild parentKey localName
Creates a new child in the tree see Abstract Data Tree create Child I Path String Object public void create Child I Path parent Key String local Name Object data Data Tree Node node find Node At parent Key if node null handle Not Found parent Key if this is Immutable handle Immutable Tree If node already exists replace if node includes Child local Name node replace Child local Name new Data Tree Node local Name data else this replace Node parent Key node copy With New Child local Name new Data Tree Node local Name data  AbstractDataTree createChild IPath createChild IPath parentKey localName DataTreeNode findNodeAt parentKey handleNotFound parentKey isImmutable handleImmutableTree includesChild localName replaceChild localName DataTreeNode localName replaceNode parentKey copyWithNewChild localName DataTreeNode localName
Creates and returns an instance of the receiver This is an implementation of the factory method creational pattern for allowing abstract methods to create instances protected Abstract Data Tree create Instance return new Data Tree  AbstractDataTree createInstance DataTree
Creates or replaces a subtree in the tree The parent node must exist param key Key of parent node whose subtree we want to create replace param subtree New node to insert into tree public void create Subtree I Path key Abstract Data Tree Node subtree Copy it since destructive mods are allowed on the original and shouldn t affect this tree Data Tree Node new Node copy Hierarchy Data Tree Node subtree if this is Immutable handle Immutable Tree if key is Root set Root Node new Node else String local Name key last Segment new Node set Name local Name Another mod but it s OK we ve already copied I Path parent Key key remove Last Segments 1 Data Tree Node node find Node At parent Key if node null handle Not Found parent Key If node already exists replace if node includes Child local Name node replace Child local Name new Node this replace Node parent Key node copy With New Child local Name new Node  createSubtree IPath AbstractDataTreeNode DataTreeNode newNode copyHierarchy DataTreeNode isImmutable handleImmutableTree isRoot setRootNode newNode localName lastSegment newNode setName localName IPath parentKey removeLastSegments DataTreeNode findNodeAt parentKey handleNotFound parentKey includesChild localName replaceChild localName newNode replaceNode parentKey copyWithNewChild localName newNode
Deletes a child of the tree see Abstract Data Tree delete Child I Path String public void delete Child I Path parent Key String local Name if this is Immutable handle Immutable Tree Data Tree Node node find Node At parent Key if node null node includes Child local Name handle Not Found node null parent Key parent Key append local Name else this replace Node parent Key node copy Without Child local Name  AbstractDataTree deleteChild IPath deleteChild IPath parentKey localName isImmutable handleImmutableTree DataTreeNode findNodeAt parentKey includesChild localName handleNotFound parentKey parentKey localName replaceNode parentKey copyWithoutChild localName
Initializes the receiver see Abstract Data Tree empty public void empty this set Root Node new Data Tree Node null null  AbstractDataTree setRootNode DataTreeNode
Returns the specified node if it is present otherwise returns null param key Key of node to return public Data Tree Node find Node At I Path key Abstract Data Tree Node node this get Root Node int key Length key segment Count for int i 0 i key Length i try node node child At key segment i catch Object Not Found Exception not Found return null return Data Tree Node node  DataTreeNode findNodeAt IPath AbstractDataTreeNode getRootNode keyLength segmentCount keyLength childAt ObjectNotFoundException notFound DataTreeNode
Returns the data at the specified node param key Node whose data to return public Object get Data I Path key Data Tree Node node find Node At key if node null handle Not Found key return null else return node get Data  getData IPath DataTreeNode findNodeAt handleNotFound getData
Returns the names of the children of a node see Abstract Data Tree get Names Of Children I Path public String get Names Of Children I Path parent Key Data Tree Node parent Node parent Node find Node At parent Key if parent Node null handle Not Found parent Key return null else return parent Node names Of Children  AbstractDataTree getNamesOfChildren IPath getNamesOfChildren IPath parentKey DataTreeNode parentNode parentNode findNodeAt parentKey parentNode handleNotFound parentKey parentNode namesOfChildren
Returns the root node of the tree Abstract Data Tree Node get Root Node return root Node  AbstractDataTreeNode getRootNode rootNode
Returns true if the receiver includes a node with the given key false otherwise public boolean includes I Path key return find Node At key null  IPath findNodeAt
Returns an object containing a flag indicating whether the specified node was found the data for the node if it was found param key key of node for which we want to retrieve data public Data Tree Lookup lookup I Path key Data Tree Node node this find Node At key if node null return Data Tree Lookup new Lookup key false null else return Data Tree Lookup new Lookup key true node get Data  DataTreeLookup IPath DataTreeNode findNodeAt DataTreeLookup newLookup DataTreeLookup newLookup getData
Replaces the node at the specified key with the given node protected void replace Node I Path key Data Tree Node node Data Tree Node found if key is Root this set Root Node node else found this find Node At key remove Last Segments 1 found replace Child key last Segment node  replaceNode IPath DataTreeNode DataTreeNode isRoot setRootNode findNodeAt removeLastSegments replaceChild lastSegment
Sets the data at the specified node see Abstract Data Tree set Data I Path Object public void set Data I Path key Object data Data Tree Node node this find Node At key if this is Immutable handle Immutable Tree if node null handle Not Found key else node set Data data  AbstractDataTree setData IPath setData IPath DataTreeNode findNodeAt isImmutable handleImmutableTree handleNotFound setData
Sets the root node of the tree see Abstract Data Tree set Root Node Abstract Data Tree Node void set Root Node Data Tree Node a Node root Node a Node  AbstractDataTree setRootNode AbstractDataTreeNode setRootNode DataTreeNode aNode rootNode aNode

Constructors for internal use only Use factory methods private Data Tree Lookup super  DataTreeLookup
Factory method for creating a new lookup object public static Data Tree Lookup new Lookup I Path node Key boolean is Present Object data Data Tree Lookup instance synchronized instance Pool instance instance Pool next Free next Free next Free POOL SIZE instance key node Key instance is Present is Present instance data data instance found In First Delta false return instance  DataTreeLookup newLookup IPath nodeKey isPresent DataTreeLookup instancePool instancePool nextFree nextFree nextFree POOL_SIZE nodeKey isPresent isPresent foundInFirstDelta
Factory method for creating a new lookup object public static Data Tree Lookup new Lookup I Path node Key boolean is Present Object data boolean found In First Delta Data Tree Lookup instance synchronized instance Pool instance instance Pool next Free next Free next Free POOL SIZE instance key node Key instance is Present is Present instance data data instance found In First Delta found In First Delta return instance  DataTreeLookup newLookup IPath nodeKey isPresent foundInFirstDelta DataTreeLookup instancePool instancePool nextFree nextFree nextFree POOL_SIZE nodeKey isPresent isPresent foundInFirstDelta foundInFirstDelta

Creates a new node param name name of node param data data for node public Data Tree Node String name Object data super name Abstract Data Tree Node NO CHILDREN this data data  DataTreeNode AbstractDataTreeNode NO_CHILDREN
Creates a new node param name name of node param data data for node param children children for new node public Data Tree Node String name Object data Abstract Data Tree Node children super name children this data data  DataTreeNode AbstractDataTreeNode
see Abstract Data Tree Node as Backward Delta Delta Data Tree Delta Data Tree I Path Abstract Data Tree Node as Backward Delta Delta Data Tree my Tree Delta Data Tree parent Tree I Path key if parent Tree includes key return parent Tree copy Complete Subtree key else return new Deleted Node name  AbstractDataTreeNode asBackwardDelta DeltaDataTree DeltaDataTree IPath AbstractDataTreeNode asBackwardDelta DeltaDataTree myTree DeltaDataTree parentTree IPath parentTree parentTree copyCompleteSubtree DeletedNode
If this node is a node in a comparison tree this method reverses the comparison for this node and all children Returns null if this node should no longer be included in the comparison tree Abstract Data Tree Node as Reverse Comparison Node I Comparator comparator Node Comparison comparison null try comparison Node Comparison data as Reverse Comparison comparator catch Class Cast Exception e Assert is True false Policy bind dtree reverse NON NLS 1 int next Child 0 for int i 0 i children length i Abstract Data Tree Node child children i as Reverse Comparison Node comparator if child null children next Child child if next Child 0 comparison get User Comparison 0 no children and no change return null set the new data data comparison shrink child array as necessary if next Child children length Abstract Data Tree Node new Children new Abstract Data Tree Node next Child System arraycopy children 0 new Children 0 next Child children new Children return this  AbstractDataTreeNode asReverseComparisonNode IComparator NodeComparison NodeComparison asReverseComparison ClassCastException isTrue nextChild AbstractDataTreeNode asReverseComparisonNode nextChild nextChild getUserComparison nextChild AbstractDataTreeNode newChildren AbstractDataTreeNode nextChild newChildren nextChild newChildren
Abstract Data Tree Node compare With Data Tree Node other I Comparator comparator Abstract Data Tree Node compared Children compare With children other children comparator Object old Data data Object new Data other data don t allow comparison of implicit root node int user Comparison 0 if name null user Comparison comparator compare old Data new Data return new Data Tree Node name new Node Comparison old Data new Data Node Comparison K CHANGED user Comparison compared Children  AbstractDataTreeNode compareWith DataTreeNode IComparator AbstractDataTreeNode comparedChildren compareWith oldData newData userComparison userComparison oldData newData DataTreeNode NodeComparison oldData newData NodeComparison K_CHANGED userComparison comparedChildren
Abstract Data Tree Node compare With Parent I Path key Delta Data Tree parent I Comparator comparator if parent includes key return convert To Added Comparison Node this Node Comparison K ADDED Data Tree Node in Parent Data Tree Node parent copy Complete Subtree key return in Parent compare With this comparator  AbstractDataTreeNode compareWithParent IPath DeltaDataTree IComparator convertToAddedComparisonNode NodeComparison K_ADDED DataTreeNode inParent DataTreeNode copyCompleteSubtree inParent compareWith
Creates and returns a new copy of the receiver Abstract Data Tree Node copy if children length 0 Abstract Data Tree Node children Copy new Abstract Data Tree Node children length System arraycopy children 0 children Copy 0 children length return new Data Tree Node name data children Copy else return new Data Tree Node name data children  AbstractDataTreeNode AbstractDataTreeNode childrenCopy AbstractDataTreeNode childrenCopy DataTreeNode childrenCopy DataTreeNode
Returns a new node containing a child with the given local name in addition to the receiver s current children and data param local Name name of new child param child Node new child node Data Tree Node copy With New Child String local Name Data Tree Node child Node Abstract Data Tree Node children this children int left 0 int right children length 1 while left right int mid left right 2 int compare local Name compare To children mid name if compare 0 right mid 1 else if compare 0 left mid 1 else throw new Error it shouldn t have been here yet Abstract Data Tree Node new Children new Abstract Data Tree Node children length 1 System arraycopy children 0 new Children 0 left child Node set Name local Name new Children left child Node System arraycopy children left new Children left 1 children length left return new Data Tree Node this get Name this get Data new Children  localName childNode DataTreeNode copyWithNewChild localName DataTreeNode childNode AbstractDataTreeNode localName compareTo AbstractDataTreeNode newChildren AbstractDataTreeNode newChildren childNode setName localName newChildren childNode newChildren DataTreeNode getName getData newChildren
Returns a new node without the specified child but with the rest of the receiver s current children and its data param local Name name of child to exclude Data Tree Node copy Without Child String local Name int index new Size Data Tree Node new Node Abstract Data Tree Node children index this index Of Child local Name if index 1 new Node Data Tree Node this copy else new Size this size 1 children new Abstract Data Tree Node new Size new Node new Data Tree Node this get Name this get Data children new Node copy Children 0 index 1 this 0 from to with starting At new Node copy Children index new Size 1 this index 1 return new Node  localName DataTreeNode copyWithoutChild localName newSize DataTreeNode newNode AbstractDataTreeNode indexOfChild localName newNode DataTreeNode newSize AbstractDataTreeNode newSize newNode DataTreeNode getName getData newNode copyChildren startingAt newNode copyChildren newSize newNode
Returns an array of delta nodes representing the forward delta between the given two lists of nodes The given nodes must all be complete nodes protected static Abstract Data Tree Node forward Delta With Abstract Data Tree Node old Nodes Abstract Data Tree Node new Nodes I Comparator comparer if old Nodes length 0 new Nodes length 0 return NO CHILDREN Abstract Data Tree Node child Deltas null int num Child Deltas 0 int child Delta Max 0 do a merge int old Index 0 int new Index 0 while old Index old Nodes length new Index new Nodes length String old Name old Nodes old Index name String new Name new Nodes new Index name int compare old Name compare To new Name if compare 0 Abstract Data Tree Node delta Node forward Delta With Or Null If Equal old Nodes old Index new Nodes new Index comparer if delta Node null if num Child Deltas child Delta Max if child Deltas null child Deltas new Abstract Data Tree Node child Delta Max 5 else System arraycopy child Deltas 0 child Deltas new Abstract Data Tree Node child Delta Max child Delta Max 2 1 0 num Child Deltas child Deltas num Child Deltas delta Node else if compare 0 if num Child Deltas child Delta Max if child Deltas null child Deltas new Abstract Data Tree Node child Delta Max 5 else System arraycopy child Deltas 0 child Deltas new Abstract Data Tree Node child Delta Max child Delta Max 2 1 0 num Child Deltas child Deltas num Child Deltas new Deleted Node old Name old Index else if num Child Deltas child Delta Max if child Deltas null child Deltas new Abstract Data Tree Node child Delta Max 5 else System arraycopy child Deltas 0 child Deltas new Abstract Data Tree Node child Delta Max child Delta Max 2 1 0 num Child Deltas child Deltas num Child Deltas new Nodes new Index while old Index old Nodes length if num Child Deltas child Delta Max if child Deltas null child Deltas new Abstract Data Tree Node child Delta Max 5 else System arraycopy child Deltas 0 child Deltas new Abstract Data Tree Node child Delta Max child Delta Max 2 1 0 num Child Deltas child Deltas num Child Deltas new Deleted Node old Nodes old Index name while new Index new Nodes length if num Child Deltas child Delta Max if child Deltas null child Deltas new Abstract Data Tree Node child Delta Max 5 else System arraycopy child Deltas 0 child Deltas new Abstract Data Tree Node child Delta Max child Delta Max 2 1 0 num Child Deltas child Deltas num Child Deltas new Nodes new Index trim size of result if num Child Deltas 0 return NO CHILDREN if num Child Deltas child Delta Max System arraycopy child Deltas 0 child Deltas new Abstract Data Tree Node num Child Deltas 0 num Child Deltas return child Deltas  AbstractDataTreeNode forwardDeltaWith AbstractDataTreeNode oldNodes AbstractDataTreeNode newNodes IComparator oldNodes newNodes NO_CHILDREN AbstractDataTreeNode childDeltas numChildDeltas childDeltaMax oldIndex newIndex oldIndex oldNodes newIndex newNodes oldName oldNodes oldIndex newName newNodes newIndex oldName compareTo newName AbstractDataTreeNode deltaNode forwardDeltaWithOrNullIfEqual oldNodes oldIndex newNodes newIndex deltaNode numChildDeltas childDeltaMax childDeltas childDeltas AbstractDataTreeNode childDeltaMax childDeltas childDeltas AbstractDataTreeNode childDeltaMax childDeltaMax numChildDeltas childDeltas numChildDeltas deltaNode numChildDeltas childDeltaMax childDeltas childDeltas AbstractDataTreeNode childDeltaMax childDeltas childDeltas AbstractDataTreeNode childDeltaMax childDeltaMax numChildDeltas childDeltas numChildDeltas DeletedNode oldName oldIndex numChildDeltas childDeltaMax childDeltas childDeltas AbstractDataTreeNode childDeltaMax childDeltas childDeltas AbstractDataTreeNode childDeltaMax childDeltaMax numChildDeltas childDeltas numChildDeltas newNodes newIndex oldIndex oldNodes numChildDeltas childDeltaMax childDeltas childDeltas AbstractDataTreeNode childDeltaMax childDeltas childDeltas AbstractDataTreeNode childDeltaMax childDeltaMax numChildDeltas childDeltas numChildDeltas DeletedNode oldNodes oldIndex newIndex newNodes numChildDeltas childDeltaMax childDeltas childDeltas AbstractDataTreeNode childDeltaMax childDeltas childDeltas AbstractDataTreeNode childDeltaMax childDeltaMax numChildDeltas childDeltas numChildDeltas newNodes newIndex numChildDeltas NO_CHILDREN numChildDeltas childDeltaMax childDeltas childDeltas AbstractDataTreeNode numChildDeltas numChildDeltas childDeltas
Returns a node representing the forward delta between the given two complete nodes protected Abstract Data Tree Node forward Delta With Data Tree Node other I Comparator comparer Abstract Data Tree Node delta Node forward Delta With Or Null If Equal this other comparer if delta Node null return new No Data Delta Node name NO CHILDREN else return delta Node  AbstractDataTreeNode forwardDeltaWith DataTreeNode IComparator AbstractDataTreeNode deltaNode forwardDeltaWithOrNullIfEqual deltaNode NoDataDeltaNode NO_CHILDREN deltaNode
Returns a node representing the forward delta between the given two complete nodes or null if the two nodes are equal Although typed as abstract nodes the given nodes must be complete protected static Abstract Data Tree Node forward Delta With Or Null If Equal Abstract Data Tree Node old Node Abstract Data Tree Node new Node I Comparator comparer Abstract Data Tree Node child Deltas forward Delta With old Node children new Node children comparer Object new Data new Node get Data if comparer compare old Node get Data new Data 0 if child Deltas length 0 return null return new No Data Delta Node new Node name child Deltas else return new Data Delta Node new Node name new Data child Deltas  AbstractDataTreeNode forwardDeltaWithOrNullIfEqual AbstractDataTreeNode oldNode AbstractDataTreeNode newNode IComparator AbstractDataTreeNode childDeltas forwardDeltaWith oldNode newNode newData newNode getData oldNode getData newData childDeltas NoDataDeltaNode newNode childDeltas DataDeltaNode newNode newData childDeltas
Returns the data for the node public Object get Data return data  getData
Returns true if the receiver can carry data false otherwise boolean has Data return true  hasData
Sets the data for the node void set Data Object o data o  setData
Simplifies the given node and answers its replacement Abstract Data Tree Node simplify With Parent I Path key Delta Data Tree parent I Comparator comparer If not in parent can t be simplified if parent includes key return this Can t just call simplify on children since this will miss the case where a child exists in the parent but does not in this See PR 1FH5RYA Data Tree Node parents Node Data Tree Node parent copy Complete Subtree key return parents Node forward Delta With this comparer  AbstractDataTreeNode simplifyWithParent IPath DeltaDataTree IComparator DataTreeNode parentsNode DataTreeNode copyCompleteSubtree parentsNode forwardDeltaWith
Returns a unicode representation of the node This method is used for debugging purposes only no NLS support needed public String to String return a Data Tree Node this get Name with get Children length children NON NLS 1 NON NLS 2 NON NLS 3  toString DataTreeNode getName getChildren
Returns a constant describing the type of node int type return T COMPLETE NODE  T_COMPLETE_NODE

Creates a new Delta Tree Reader public Data Tree Reader I Data Flattener f flatener f  DeltaTreeReader DataTreeReader IDataFlattener
Returns true if the given node type has data protected boolean has Data int node Type switch node Type case Abstract Data Tree Node T COMPLETE NODE case Abstract Data Tree Node T DELTA NODE return true case Abstract Data Tree Node T DELETED NODE case Abstract Data Tree Node T NO DATA DELTA NODE default return false  hasData nodeType nodeType AbstractDataTreeNode T_COMPLETE_NODE AbstractDataTreeNode T_DELTA_NODE AbstractDataTreeNode T_DELETED_NODE AbstractDataTreeNode T_NO_DATA_DELTA_NODE
Reads a node from the given input stream protected Abstract Data Tree Node read Node I Path parent Path throws IO Exception read the node name String name input readUTF read the node type int node Type read Number maybe read the data I Path path if not the root node if parent Path null path parent Path append name else path Path ROOT Object data null if has Data node Type read flag indicating if the data is null int data Flag read Number if data Flag 0 data flatener read Data path input read the number of children int child Count read Number read the children Abstract Data Tree Node children if child Count 0 children Abstract Data Tree Node NO CHILDREN else children new Abstract Data Tree Node child Count for int i 0 i child Count i children i read Node path create the appropriate node switch node Type case Abstract Data Tree Node T COMPLETE NODE return new Data Tree Node name data children case Abstract Data Tree Node T DELTA NODE return new Data Delta Node name data children case Abstract Data Tree Node T DELETED NODE return new Deleted Node name case Abstract Data Tree Node T NO DATA DELTA NODE return new No Data Delta Node name children default Assert is True false Policy bind dtree switch Error NON NLS 1 return null  AbstractDataTreeNode readNode IPath parentPath IOException nodeType readNumber IPath parentPath parentPath hasData nodeType dataFlag readNumber dataFlag readData childCount readNumber AbstractDataTreeNode childCount AbstractDataTreeNode NO_CHILDREN AbstractDataTreeNode childCount childCount readNode nodeType AbstractDataTreeNode T_COMPLETE_NODE DataTreeNode AbstractDataTreeNode T_DELTA_NODE DataDeltaNode AbstractDataTreeNode T_DELETED_NODE DeletedNode AbstractDataTreeNode T_NO_DATA_DELTA_NODE NoDataDeltaNode isTrue switchError
Reads an integer stored in compact format Numbers between 0 and 254 inclusive occupy 1 byte other numbers occupy 5 bytes the first byte being 0xff and the next 4 bytes being the standard representation of an int protected int read Number throws IO Exception byte b input read Byte int number b 0xff not a no op converts unsigned byte to int if number 0xff magic escape value number input read Int return number  readNumber IOException readByte readInt
Reads a Delta Data Tree from the given input stream public Delta Data Tree read Tree Delta Data Tree parent Data Input input throws IO Exception this input input Abstract Data Tree Node root read Node Path ROOT return new Delta Data Tree root parent  DeltaDataTree DeltaDataTree readTree DeltaDataTree DataInput IOException AbstractDataTreeNode readNode DeltaDataTree

Creates a new Delta Tree Writer public Data Tree Writer I Data Flattener f flatener f  DeltaTreeWriter DataTreeWriter IDataFlattener
Writes the subtree rooted at the given node param node The subtree to write param path The path of the current node param depth The depth of the subtree to write protected void write Node Abstract Data Tree Node node I Path path int depth throws IO Exception int type node type write the node name String name node get Name if name null name NON NLS 1 output writeUTF name write the node type write Number type maybe write the data if node has Data Object data node get Data Write a flag indicating whether or not the data field is null Zero means data is null non zero means data is present if data null write Number 0 else write Number 1 flatener write Data path node get Data output maybe write the children if depth 0 depth D INFINITE Abstract Data Tree Node children node get Children write the number of children write Number children length write the children int new Depth depth D INFINITE D INFINITE depth 1 for int i 0 imax children length i imax i write Node children i path append children i get Name new Depth else write the number of children write Number 0  writeNode AbstractDataTreeNode IPath IOException getName writeNumber hasData getData writeNumber writeNumber writeData getData D_INFINITE AbstractDataTreeNode getChildren writeNumber newDepth D_INFINITE D_INFINITE writeNode getName newDepth writeNumber
Writes an integer in a compact format biased towards small non negative numbers Numbers between 0 and 254 inclusive occupy 1 byte other numbers occupy 5 bytes protected void write Number int number throws IO Exception if number 0 number 0xff output write Byte number else output write Byte 0xff output write Int number  writeNumber IOException writeByte writeByte writeInt
Writes a single node to the output Does not recurse on child nodes and does not write the number of children protected void write Single Node Abstract Data Tree Node node I Path path throws IO Exception write the node name String name node get Name if name null name NON NLS 1 output writeUTF name write the node type write Number node type maybe write the data if node has Data Object data node get Data Write a flag indicating whether or not the data field is null Zero means data is null non zero means data is present if data null write Number 0 else write Number 1 flatener write Data path node get Data output  writeSingleNode AbstractDataTreeNode IPath IOException getName writeNumber hasData getData writeNumber writeNumber writeData getData
Writes the given Abstract Data Tree to the given stream This writes a single Data Tree or Delta Data Tree ignoring parent trees param path Only writes data for the subtree rooted at the given path and for all nodes directly between the root and the subtree param depth In the subtree rooted at the given path only write up to this depth A depth of infinity is given by the constant D INFINITE public void write Tree Abstract Data Tree tree I Path path int depth Data Output output throws IO Exception this output output tunnel down relevant path Abstract Data Tree Node node tree get Root Node I Path current Path Path ROOT String segments path segments for int i 0 i segments length i String next Segment segments i write this node to the output write Single Node node current Path current Path current Path append next Segment node node child At Or Null next Segment write the number of children for this node if node null write Number 1 else can t navigate down the path just give up with what we have so far write Number 0 return Assert is True current Path equals path dtree navigation Error NON NLS 1 recursively write the subtree we re interested in write Node node path depth  AbstractDataTree DataTree DeltaDataTree D_INFINITE writeTree AbstractDataTree IPath DataOutput IOException AbstractDataTreeNode getRootNode IPath currentPath nextSegment writeSingleNode currentPath currentPath currentPath nextSegment childAtOrNull nextSegment writeNumber writeNumber isTrue currentPath navigationError writeNode

Creates a new tree with the given name Deleted Node String local Name super local Name NO CHILDREN  DeletedNode localName localName NO_CHILDREN
see Abstract Data Tree Node as Backward Delta Delta Data Tree Delta Data Tree I Path Abstract Data Tree Node as Backward Delta Delta Data Tree my Tree Delta Data Tree parent Tree I Path key if parent Tree includes key return parent Tree copy Complete Subtree key else return this  AbstractDataTreeNode asBackwardDelta DeltaDataTree DeltaDataTree IPath AbstractDataTreeNode asBackwardDelta DeltaDataTree myTree DeltaDataTree parentTree IPath parentTree parentTree copyCompleteSubtree
Returns the child with the given local name Abstract Data Tree Node child At String local Name deleted nodes do not have children throw new Object Not Found Exception Policy bind dtree missing Child local Name NON NLS 1  AbstractDataTreeNode childAt localName ObjectNotFoundException missingChild localName
Returns the child with the given local name Abstract Data Tree Node child At Or Null String local Name deleted nodes do not have children return null  AbstractDataTreeNode childAtOrNull localName
Replaces the child with the given local name Abstract Data Tree Node child At Put String local Name deleted nodes do not have children return null  AbstractDataTreeNode childAtPut localName
Abstract Data Tree Node compare With Parent I Path key Delta Data Tree parent I Comparator comparator Just because there is a deleted node it doesn t mean there must be a corresponding node in the parent Deleted nodes can live in isolation if parent includes key return convert To Removed Comparison Node parent copy Complete Subtree key Node Comparison K REMOVED else Node doesn t exist in either tree Return an empty comparison Empty comparisons are omitted from the delta return new Data Tree Node key last Segment new Node Comparison null null 0 0  AbstractDataTreeNode compareWithParent IPath DeltaDataTree IComparator convertToRemovedComparisonNode copyCompleteSubtree NodeComparison K_REMOVED DataTreeNode lastSegment NodeComparison
Creates and returns a new copy of the receiver Makes a deep copy of children but a shallow copy of name and data Abstract Data Tree Node copy return new Deleted Node name  AbstractDataTreeNode DeletedNode
Returns true if the receiver represents a deleted node false otherwise boolean is Deleted return true  isDeleted
Simplifies the given node and returns its replacement Abstract Data Tree Node simplify With Parent I Path key Delta Data Tree parent I Comparator comparer if parent includes key return this else return new No Data Delta Node name  AbstractDataTreeNode simplifyWithParent IPath DeltaDataTree IComparator NoDataDeltaNode
Returns the number of children of the receiver int size deleted nodes have no children return 0 
Return a unicode representation of the node This method is used for debugging purposes only no NLS please public String to String return a Deleted Node this get Name NON NLS 1 NON NLS 2  toString DeletedNode getName
Returns a string describing the type of node int type return T DELETED NODE  T_DELETED_NODE
Abstract Data Tree Node child At Ignore Case String local Name deleted nodes do not have children return null  AbstractDataTreeNode childAtIgnoreCase localName

Creates a new empty tree public Delta Data Tree this empty  DeltaDataTree
Creates a new tree param root Node root node of new tree public Delta Data Tree Abstract Data Tree Node root Node this root Node root Node this parent null  rootNode DeltaDataTree AbstractDataTreeNode rootNode rootNode rootNode
protected Delta Data Tree Abstract Data Tree Node root Node Delta Data Tree parent this root Node root Node this parent parent  DeltaDataTree AbstractDataTreeNode rootNode DeltaDataTree rootNode rootNode
Adds a child to the tree param parent Key parent for new child param local Name name of child param child Node child node protected void add Child I Path parent Key String local Name Abstract Data Tree Node child Node if includes parent Key handle Not Found parent Key child Node set Name local Name this assemble Node parent Key new No Data Delta Node parent Key last Segment child Node  parentKey localName childNode addChild IPath parentKey localName AbstractDataTreeNode childNode parentKey handleNotFound parentKey childNode setName localName assembleNode parentKey NoDataDeltaNode parentKey lastSegment childNode
Returns the tree as a backward delta If the delta is applied to the tree it will produce its parent The receiver must have a forward delta representation I e Call the receiver s parent A and the receiver B The receiver s representation is A B Returns the delta A B The result is equivalent to A but has B as its parent Delta Data Tree as Backward Delta if get Parent null return new Empty Delta Tree return new Delta Data Tree get Root Node as Backward Delta this get Parent root Key this  DeltaDataTree asBackwardDelta getParent newEmptyDeltaTree DeltaDataTree getRootNode asBackwardDelta getParent rootKey
This method can only be called on a comparison tree created using Delta Data Tree compare With This method flips the orientation of the given comparison tree so that additions become removals and vice versa This method destructively changes the tree as opposed to making a copy public Delta Data Tree as Reverse Comparison Tree I Comparator comparator don t reverse the root node if it s the absolute root name null if root Node get Name null Abstract Data Tree Node children root Node get Children int next Child 0 for int i 0 i children length i Abstract Data Tree Node new Child children i as Reverse Comparison Node comparator if new Child null children next Child new Child if next Child children length Abstract Data Tree Node new Children new Abstract Data Tree Node next Child System arraycopy children 0 new Children 0 next Child root Node set Children new Children else root Node as Reverse Comparison Node comparator return this  DeltaDataTree compareWith DeltaDataTree asReverseComparisonTree IComparator rootNode getName AbstractDataTreeNode rootNode getChildren nextChild AbstractDataTreeNode newChild asReverseComparisonNode newChild nextChild newChild nextChild AbstractDataTreeNode newChildren AbstractDataTreeNode nextChild newChildren nextChild rootNode setChildren newChildren rootNode asReverseComparisonNode
Replaces a node in the tree with the result of assembling the node with the given delta node which represents a forward delta on the existing node param key key of the node to replace param delta Node delta node to use to assemble the new node protected void assemble Node I Path key Abstract Data Tree Node delta Node root Node root Node assemble With delta Node key 0  deltaNode assembleNode IPath AbstractDataTreeNode deltaNode rootNode rootNode assembleWith deltaNode
Assembles the receiver with the given delta tree and answer the resulting mutable source tree The given delta tree must be a forward delta based on the receiver i e missing information is taken from the receiver This operation is used to coalesce delta trees p In detail suppose that c is a forward delta over source tree a Let d a assemble With Forward Delta c d has the same content as c and is represented as a delta tree whose parent is the same as a s parent p In general if c is represented as a chain of deltas of length n then d is represented as a chain of length n 1 p So if a is a complete tree i e has no parent length 0 then d will be a complete tree too p Corollary a assemble With Forward Delta a forward Delta With b b public Delta Data Tree assemble With Forward Delta Delta Data Tree delta Tree return new Delta Data Tree get Root Node assemble With delta Tree get Root Node this  assembleWithForwardDelta assembleWithForwardDelta forwardDeltaWith DeltaDataTree assembleWithForwardDelta DeltaDataTree deltaTree DeltaDataTree getRootNode assembleWith deltaTree getRootNode
Compares this tree with another tree starting from the given path The given path will be the root node of the returned tree Both this tree and other tree must contain the given path protected Delta Data Tree basic Compare Delta Data Tree other I Comparator comparator I Path path Delta Data Tree new Tree if this other new Tree new Delta Data Tree new Tree set Data Path ROOT new Node Comparison null null 0 0 else if other has Ancestor this Abstract Data Tree Node assembled other search Node At path Delta Data Tree tree other Iterate through the receiver s ancestors until the receiver is reached while tree tree get Parent this ancestor may not contain the given path Abstract Data Tree Node tree Node tree search Node At path if tree Node null assembled tree Node assemble With assembled Abstract Data Tree Node compared Root assembled compare With Parent path this comparator new Tree new Delta Data Tree compared Root else if this has Ancestor other Abstract Data Tree Node assembled this as Backward Delta search Node At path Delta Data Tree tree this Iterate through the receiver s ancestors until the other tree is reached while tree tree get Parent other assembled assembled assemble With tree as Backward Delta search Node At path Abstract Data Tree Node compared Root assembled compare With Parent path this comparator new Tree new Delta Data Tree compared Root else revert to naive comparison Data Tree Node this Complete Root Data Tree Node this copy Complete Subtree path Data Tree Node other Complete Root Data Tree Node other copy Complete Subtree path Abstract Data Tree Node compared Root this Complete Root compare With other Complete Root comparator new Tree new Delta Data Tree compared Root new Tree immutable return new Tree  DeltaDataTree basicCompare DeltaDataTree IComparator IPath DeltaDataTree newTree newTree DeltaDataTree newTree setData NodeComparison hasAncestor AbstractDataTreeNode searchNodeAt DeltaDataTree getParent AbstractDataTreeNode treeNode searchNodeAt treeNode treeNode assembleWith AbstractDataTreeNode comparedRoot compareWithParent newTree DeltaDataTree comparedRoot hasAncestor AbstractDataTreeNode asBackwardDelta searchNodeAt DeltaDataTree getParent assembleWith asBackwardDelta searchNodeAt AbstractDataTreeNode comparedRoot compareWithParent newTree DeltaDataTree comparedRoot DataTreeNode thisCompleteRoot DataTreeNode copyCompleteSubtree DataTreeNode otherCompleteRoot DataTreeNode copyCompleteSubtree AbstractDataTreeNode comparedRoot thisCompleteRoot compareWith otherCompleteRoot newTree DeltaDataTree comparedRoot newTree newTree
Collapses this tree so that the given ancestor becomes its immediate parent Afterwards this tree will still have exactly the same contents but its internal stucture will be compressed p This operation should be used to collapse chains of delta trees that don t contain interesting intermediate states p This is a destructive operation since it modifies the structure of this tree instance This tree must be immutable at the start of this operation and will be immutable afterwards return this tree public Delta Data Tree collapse To Delta Data Tree parent I Comparator comparator if this parent get Parent parent already collapsed return this collapse my tree to be a forward delta of the parent s tree c will have the same content as this tree but its parent will be parent Delta Data Tree c parent forward Delta With this comparator update my internal root node and parent pointers this parent parent this root Node c root Node return this  DeltaDataTree collapseTo DeltaDataTree IComparator getParent DeltaDataTree forwardDeltaWith rootNode rootNode
Returns a Delta Data Tree that describes the differences between this tree and other tree Each node of the returned tree will contain a Node Comparison object that describes the differences between the two trees public Delta Data Tree compare With Delta Data Tree other I Comparator comparator Delta Data Tree new Tree if this other new Tree new Delta Data Tree new Tree set Data Path ROOT new Node Comparison null null 0 0 else if other has Ancestor this Abstract Data Tree Node assembled other get Root Node Delta Data Tree tree other Iterate through the receiver s ancestors until the receiver is reached while tree tree get Parent this assembled tree get Root Node assemble With assembled Abstract Data Tree Node compared Root assembled compare With Parent root Key this comparator new Tree new Delta Data Tree compared Root else if this has Ancestor other Abstract Data Tree Node assembled this as Backward Delta get Root Node Delta Data Tree tree this Iterate through the receiver s ancestors until the other tree is reached while tree tree get Parent other assembled assembled assemble With tree as Backward Delta get Root Node Abstract Data Tree Node compared Root assembled compare With Parent root Key this comparator new Tree new Delta Data Tree compared Root else revert to naive comparison if trees have no common ancestry Data Tree Node this Complete Root Data Tree Node this copy Complete Subtree root Key Data Tree Node other Complete Root Data Tree Node other copy Complete Subtree root Key Abstract Data Tree Node compared Root this Complete Root compare With other Complete Root comparator new Tree new Delta Data Tree compared Root new Tree immutable return new Tree  DeltaDataTree NodeComparison DeltaDataTree compareWith DeltaDataTree IComparator DeltaDataTree newTree newTree DeltaDataTree newTree setData NodeComparison hasAncestor AbstractDataTreeNode getRootNode DeltaDataTree getParent getRootNode assembleWith AbstractDataTreeNode comparedRoot compareWithParent rootKey newTree DeltaDataTree comparedRoot hasAncestor AbstractDataTreeNode asBackwardDelta getRootNode DeltaDataTree getParent assembleWith asBackwardDelta getRootNode AbstractDataTreeNode comparedRoot compareWithParent rootKey newTree DeltaDataTree comparedRoot DataTreeNode thisCompleteRoot DataTreeNode copyCompleteSubtree rootKey DataTreeNode otherCompleteRoot DataTreeNode copyCompleteSubtree rootKey AbstractDataTreeNode comparedRoot thisCompleteRoot compareWith otherCompleteRoot newTree DeltaDataTree comparedRoot newTree newTree
Compares this tree with another tree starting from the given path The given path will be the root node of the returned tree public Delta Data Tree compare With Delta Data Tree other I Comparator comparator I Path path need to figure out if trees really contain the given path if this includes path if other includes path return basic Compare other comparator path else only exists in this tree return new Delta Data Tree Abstract Data Tree Node convert To Removed Comparison Node this copy Complete Subtree path comparator compare this get Data path null else if other includes path only exists in other tree return new Delta Data Tree Abstract Data Tree Node convert To Added Comparison Node other copy Complete Subtree path comparator compare null other get Data path else doesn t exist in either tree return Delta Data Tree create Empty Delta  DeltaDataTree compareWith DeltaDataTree IComparator IPath basicCompare DeltaDataTree AbstractDataTreeNode convertToRemovedComparisonNode copyCompleteSubtree getData DeltaDataTree AbstractDataTreeNode convertToAddedComparisonNode copyCompleteSubtree getData DeltaDataTree createEmptyDelta
Returns a copy of the tree which shares its instance variables protected Abstract Data Tree copy return new Delta Data Tree root Node parent  AbstractDataTree DeltaDataTree rootNode
Returns a complete node containing the contents of a subtree of the tree param key key of subtree to copy public Abstract Data Tree Node copy Complete Subtree I Path key Abstract Data Tree Node node search Node At key if node null not found handle Not Found key if node is Delta return naive Copy Complete Subtree key else copy the node in case the user wants to hammer the subtree name return node copy  AbstractDataTreeNode copyCompleteSubtree IPath AbstractDataTreeNode searchNodeAt handleNotFound isDelta naiveCopyCompleteSubtree
see Abstract Data Tree create Child I Path String public void create Child I Path parent Key String local Name create Child parent Key local Name null  AbstractDataTree createChild IPath createChild IPath parentKey localName createChild parentKey localName
see Abstract Data Tree create Child I Path String Object public void create Child I Path parent Key String local Name Object data if is Immutable handle Immutable Tree add Child parent Key local Name new Data Tree Node local Name data  AbstractDataTree createChild IPath createChild IPath parentKey localName isImmutable handleImmutableTree addChild parentKey localName DataTreeNode localName
Returns a delta data tree that represents an empty delta i e it represents a delta on another unspecified tree but introduces no changes static Delta Data Tree create Empty Delta Delta Data Tree new Tree new Delta Data Tree new Tree empty Delta return new Tree  DeltaDataTree createEmptyDelta DeltaDataTree newTree DeltaDataTree newTree emptyDelta newTree
Creates and returns an instance of the receiver see Abstract Data Tree create Instance protected Abstract Data Tree create Instance return new Delta Data Tree  AbstractDataTree createInstance AbstractDataTree createInstance DeltaDataTree
see Abstract Data Tree create Subtree I Path Abstract Data Tree Node public void create Subtree I Path key Abstract Data Tree Node node if is Immutable handle Immutable Tree if key is Root set Parent null set Root Node node else add Child key remove Last Segments 1 key last Segment node  AbstractDataTree createSubtree IPath AbstractDataTreeNode createSubtree IPath AbstractDataTreeNode isImmutable handleImmutableTree isRoot setParent setRootNode addChild removeLastSegments lastSegment
see Abstract Data Tree delete Child I Path String public void delete Child I Path parent Key String local Name if is Immutable handle Immutable Tree If the child does not exist I Path child Key parent Key append local Name if includes child Key handle Not Found child Key assemble Node parent Key new No Data Delta Node parent Key last Segment new Deleted Node local Name  AbstractDataTree deleteChild IPath deleteChild IPath parentKey localName isImmutable handleImmutableTree IPath childKey parentKey localName childKey handleNotFound childKey assembleNode parentKey NoDataDeltaNode parentKey lastSegment DeletedNode localName
Initializes the receiver so that it is a complete empty tree see Abstract Data Tree empty public void empty root Node new Data Tree Node null null parent null  AbstractDataTree rootNode DataTreeNode
Initializes the receiver so that it represents an empty delta i e it represents a delta on another unspecified tree ut introduces no changes The parent is left unchanged void empty Delta root Node new No Data Delta Node null  emptyDelta rootNode NoDataDeltaNode
Returns a node of the tree if it is present otherwise returns null param key key of node to find public Abstract Data Tree Node find Node At I Path key Abstract Data Tree Node node root Node int segment Count key segment Count for int i 0 i segment Count i node node child At Or Null key segment i if node null return null return node  AbstractDataTreeNode findNodeAt IPath AbstractDataTreeNode rootNode segmentCount segmentCount segmentCount childAtOrNull
Returns a forward delta between the receiver and the given source tree using the given comparer to compare data objects The result describes the changes which if assembled with the receiver will produce the given source tree In more detail let c a forward Delta With b c has the same content as b but is represented as a delta tree with a as the parent Also c is immutable There is no requirement that a and b be related although it is usually more efficient if they are The node keys are used as the basis of correlation between trees Note that if b is already represented as a delta over a then c will have the same internal structure as b Thus the very common case of previous forward Delta With current is actually very fast when current is a modification of previous param source Tree second delta tree to create a delta between param comparer the comparer used to compare data objects return the new delta public Delta Data Tree forward Delta With Delta Data Tree source Tree I Comparator comparer Delta Data Tree new Tree if this source Tree new Tree this new Empty Delta Tree else if source Tree has Ancestor this Abstract Data Tree Node assembled source Tree get Root Node Delta Data Tree tree Parent source Tree Iterate through the source Tree s ancestors until the receiver is reached while tree Parent tree Parent get Parent this assembled tree Parent get Root Node assemble With assembled new Tree new Delta Data Tree assembled this new Tree simplify comparer else if this has Ancestor source Tree create the delta backwards and then reverse it new Tree source Tree forward Delta With this comparer new Tree new Tree as Backward Delta else Data Tree Node this Complete Root Data Tree Node this copy Complete Subtree root Key Data Tree Node source Tree Complete Root Data Tree Node source Tree copy Complete Subtree root Key Abstract Data Tree Node delta Root this Complete Root forward Delta With source Tree Complete Root comparer new Tree new Delta Data Tree delta Root this new Tree immutable return new Tree  forwardDeltaWith forwardDeltaWith sourceTree DeltaDataTree forwardDeltaWith DeltaDataTree sourceTree IComparator DeltaDataTree newTree sourceTree newTree newEmptyDeltaTree sourceTree hasAncestor AbstractDataTreeNode sourceTree getRootNode DeltaDataTree treeParent sourceTree sourceTree treeParent treeParent getParent treeParent getRootNode assembleWith newTree DeltaDataTree newTree hasAncestor sourceTree newTree sourceTree forwardDeltaWith newTree newTree asBackwardDelta DataTreeNode thisCompleteRoot DataTreeNode copyCompleteSubtree rootKey DataTreeNode sourceTreeCompleteRoot DataTreeNode sourceTree copyCompleteSubtree rootKey AbstractDataTreeNode deltaRoot thisCompleteRoot forwardDeltaWith sourceTreeCompleteRoot newTree DeltaDataTree deltaRoot newTree newTree
see Abstract Data Tree get Child Count I Path public int get Child Count I Path parent Key return get Child Nodes parent Key length  AbstractDataTree getChildCount IPath getChildCount IPath parentKey getChildNodes parentKey
Returns the child nodes of a node in the tree protected Abstract Data Tree Node get Child Nodes I Path parent Key Algorithm for each delta in chain going backwards get list of child nodes if any in delta assemble with previously seen list if any break when complete tree found report error if parent is missing or has been deleted Abstract Data Tree Node child Nodes null int key Length parent Key segment Count for Delta Data Tree tree this tree null tree tree parent Abstract Data Tree Node node tree root Node boolean complete node is Delta for int i 0 i key Length i node node child At Or Null parent Key segment i if node null break if node is Delta complete true if node null if node is Deleted break if child Nodes null child Nodes node children else Be sure to assemble old new rather than new old Keep deleted nodes if we haven t encountered the complete node yet child Nodes Abstract Data Tree Node assemble With node children child Nodes complete if complete if child Nodes null return child Nodes Not found but complete node encountered so should not check parent tree break if child Nodes null Some deltas carry info about children but there is no complete node against which they describe deltas Assert is True false Policy bind dtree malformed Tree NON NLS 1 Node is missing or has been deleted handle Not Found parent Key return null should not get here  AbstractDataTreeNode getChildNodes IPath parentKey AbstractDataTreeNode childNodes keyLength parentKey segmentCount DeltaDataTree AbstractDataTreeNode rootNode isDelta keyLength childAtOrNull parentKey isDelta isDeleted childNodes childNodes childNodes AbstractDataTreeNode assembleWith childNodes childNodes childNodes childNodes isTrue malformedTree handleNotFound parentKey
see Abstract Data Tree get Children I Path public I Path get Children I Path parent Key Abstract Data Tree Node child Nodes get Child Nodes parent Key int len child Nodes length if len 0 return NO CHILDREN I Path answer new I Path len for int i 0 i len i answer i parent Key append child Nodes i name return answer  AbstractDataTree getChildren IPath IPath getChildren IPath parentKey AbstractDataTreeNode childNodes getChildNodes parentKey childNodes NO_CHILDREN IPath IPath parentKey childNodes
Returns the data at a node of the tree param key key of node for which to return data public Object get Data I Path key Algorithm for each delta in chain going backwards get node if any in delta if it carries data return it break when complete tree found report error if node is missing or has been deleted int key Length key segment Count for Delta Data Tree tree this tree null tree tree parent Abstract Data Tree Node node tree root Node boolean complete node is Delta for int i 0 i key Length i node node child At Or Null key segment i if node null break if node is Delta complete true if node null if node has Data return node get Data else if node is Deleted break if complete Not found but complete node encountered so should not check parent tree break handle Not Found key return null can t get here  getData IPath keyLength segmentCount DeltaDataTree AbstractDataTreeNode rootNode isDelta keyLength childAtOrNull isDelta hasData getData isDeleted handleNotFound
see Abstract Data Tree get Name Of Child I Path int public String get Name Of Child I Path parent Key int index Abstract Data Tree Node child Nodes get Child Nodes parent Key return child Nodes index name  AbstractDataTree getNameOfChild IPath getNameOfChild IPath parentKey AbstractDataTreeNode childNodes getChildNodes parentKey childNodes
Returns the local names for the children of a node of the tree see Abstract Data Tree get Names Of Children I Path public String get Names Of Children I Path parent Key Abstract Data Tree Node child Nodes get Child Nodes parent Key int len child Nodes length String names Of Children new String len for int i 0 i len i names Of Children i child Nodes i name return names Of Children  AbstractDataTree getNamesOfChildren IPath getNamesOfChildren IPath parentKey AbstractDataTreeNode childNodes getChildNodes parentKey childNodes namesOfChildren namesOfChildren childNodes namesOfChildren
Returns a node info object describing the specified node of the receiver Only the receiver s representation is accessed If the receiver is a delta representation and the specified node has not been modified in the delta the node info describes the node as missing the parent tree is not consulted public Node Info get Node Info I Path key Abstract Data Tree Node found find Node At key if found null return Node Info missing return found node Info At this  NodeInfo getNodeInfo IPath AbstractDataTreeNode findNodeAt NodeInfo nodeInfoAt
Returns the parent of the tree public Delta Data Tree get Parent return parent  DeltaDataTree getParent
Returns the root node of the tree protected Abstract Data Tree Node get Root Node return root Node  AbstractDataTreeNode getRootNode rootNode
Returns true if the receiver s parent has the specified ancestor param ancestor the ancestor in question protected boolean has Ancestor Delta Data Tree ancestor Delta Data Tree parent this while parent parent get Parent null if parent ancestor return true return false  hasAncestor DeltaDataTree DeltaDataTree getParent
Returns true if the receiver includes a node with the given key false otherwise public boolean includes I Path key return search Node At key null  IPath searchNodeAt
public boolean is Empty Delta return root Node get Children length 0  isEmptyDelta rootNode getChildren
Returns an object containing the node key a flag indicating whether the specified node was found the data for the node if it was found param key key of node for which we want to retrieve data public Data Tree Lookup lookup I Path key int key Length key segment Count for Delta Data Tree tree this tree null tree tree parent Abstract Data Tree Node node tree root Node boolean complete node is Delta for int i 0 i key Length i node node child At Or Null key segment i if node null break complete node is Delta if node null if node has Data return Data Tree Lookup new Lookup key true node get Data tree this else if node is Deleted break if complete Not found but complete node encountered so should not check parent tree break return Data Tree Lookup new Lookup key false null  DataTreeLookup IPath keyLength segmentCount DeltaDataTree AbstractDataTreeNode rootNode isDelta keyLength childAtOrNull isDelta hasData DataTreeLookup newLookup getData isDeleted DataTreeLookup newLookup
Returns an object containing the node key a flag indicating whether the specified node was found the data for the node if it was found This is a case insensitive variant of the code lookup code method param key key of node for which we want to retrieve data public Data Tree Lookup lookup Ignore Case I Path key int key Length key segment Count for Delta Data Tree tree this tree null tree tree parent Abstract Data Tree Node node tree root Node boolean complete node is Delta for int i 0 i key Length i node node child At Ignore Case key segment i if node null break complete node is Delta if node null if node has Data return Data Tree Lookup new Lookup key true node get Data tree this else if node is Deleted break if complete Not found but complete node encountered so should not check parent tree break return Data Tree Lookup new Lookup key false null  DataTreeLookup lookupIgnoreCase IPath keyLength segmentCount DeltaDataTree AbstractDataTreeNode rootNode isDelta keyLength childAtIgnoreCase isDelta hasData DataTreeLookup newLookup getData isDeleted DataTreeLookup newLookup
Converts this tree s representation to be a complete tree not a delta This disconnects this tree from its parents The parent trees are unaffected public void make Complete Abstract Data Tree Node assembled get Root Node Delta Data Tree parent get Parent while parent null assembled parent get Root Node assemble With assembled parent parent get Parent set Root Node assembled set Parent null  makeComplete AbstractDataTreeNode getRootNode DeltaDataTree getParent getRootNode assembleWith getParent setRootNode setParent
Returns a complete node containing the contents of the subtree rooted at key in the receiver Uses the public API param key key of subtree whose contents we want to copy protected Abstract Data Tree Node naive Copy Complete Subtree I Path key String child Names get Names Of Children key int num Children child Names length Abstract Data Tree Node child Nodes if num Children 0 child Nodes Abstract Data Tree Node NO CHILDREN else child Nodes new Abstract Data Tree Node num Children do for each child for int i num Children i 0 child Nodes i copy Complete Subtree key append child Names i return new Data Tree Node key last Segment get Data key child Nodes  AbstractDataTreeNode naiveCopyCompleteSubtree IPath childNames getNamesOfChildren numChildren childNames AbstractDataTreeNode childNodes numChildren childNodes AbstractDataTreeNode NO_CHILDREN childNodes AbstractDataTreeNode numChildren numChildren childNodes copyCompleteSubtree childNames DataTreeNode lastSegment getData childNodes
Returns a new tree which represents an empty mutable delta on the receiver It is not possible to obtain a new delta tree if the receiver is not immutable as subsequent changes to the receiver would affect the resulting delta public Delta Data Tree new Empty Delta Tree if is Immutable throw new Illegal Argument Exception Policy bind dtree not Immutable NON NLS 1 Delta Data Tree new Tree Delta Data Tree this copy new Tree set Parent this new Tree empty Delta return new Tree  DeltaDataTree newEmptyDeltaTree isImmutable IllegalArgumentException notImmutable DeltaDataTree newTree DeltaDataTree newTree setParent newTree emptyDelta newTree
Makes the receiver the root tree in the list of trees on which it is based The receiver s representation becomes a complete tree while its parents representations become backward deltas based on the receiver It is not possible to reroot a source tree that is not immutable as this would require that its parents be expressed as deltas on a source tree which could still change exception Invalid Parameter Exception receiver is not immutable public Delta Data Tree reroot self mutex critical region reroot this return this  InvalidParameterException DeltaDataTree
Makes the given source tree the root tree in the list of trees on which it is based The source tree s representation becomes a complete tree while its parents representations become backward deltas based on the source tree It is not possible to reroot a source tree that is not immutable as this would require that its parents be expressed as deltas on a source tree which could still change param source Tree source tree to set as the new root exception Invalid Parameter Exception source Tree is not immutable protected void reroot Delta Data Tree source Tree if source Tree is Immutable throw new Illegal Argument Exception Policy bind dtree parents Not Immutable NON NLS 1 Delta Data Tree parent source Tree get Parent if parent null return this reroot parent Delta Data Tree backward Delta source Tree as Backward Delta Delta Data Tree complete parent assemble With Forward Delta source Tree source Tree set Root Node complete get Root Node source Tree set Parent null parent set Root Node backward Delta get Root Node parent set Parent source Tree  sourceTree InvalidParameterException sourceTree DeltaDataTree sourceTree sourceTree isImmutable IllegalArgumentException parentsNotImmutable DeltaDataTree sourceTree getParent DeltaDataTree backwardDelta sourceTree asBackwardDelta DeltaDataTree assembleWithForwardDelta sourceTree sourceTree setRootNode getRootNode sourceTree setParent setRootNode backwardDelta getRootNode setParent sourceTree
Returns a complete node containing the contents of a subtree of the tree Returns null if the node at this key does not exist This is a thread safe version of copy Complete Subtree param key key of subtree to copy public Abstract Data Tree Node safe Copy Complete Subtree I Path key Abstract Data Tree Node node search Node At key if node null return null if node is Delta return safe Naive Copy Complete Subtree key else copy the node in case the user wants to hammer the subtree name return node copy  copyCompleteSubtree AbstractDataTreeNode safeCopyCompleteSubtree IPath AbstractDataTreeNode searchNodeAt isDelta safeNaiveCopyCompleteSubtree
Returns a complete node containing the contents of the subtree rooted at key in the receiver Returns null if this node does not exist in the tree This is a thread safe version of naive Copy Complete Subtree param key key of subtree whose contents we want to copy protected Abstract Data Tree Node safe Naive Copy Complete Subtree I Path key try String child Names get Names Of Children key int num Children child Names length Abstract Data Tree Node child Nodes if num Children 0 child Nodes Abstract Data Tree Node NO CHILDREN else child Nodes new Abstract Data Tree Node num Children do for each child int actual Child Count 0 for int i num Children i 0 child Nodes i safe Copy Complete Subtree key append child Names i if child Nodes i null actual Child Count if there are less actual children due to concurrent deletion shrink the child array if actual Child Count num Children Abstract Data Tree Node actual Child Nodes new Abstract Data Tree Node actual Child Count for int i Old 0 i New 0 i Old num Children i Old if child Nodes i Old null actual Child Nodes i New child Nodes i Old child Nodes actual Child Nodes return new Data Tree Node key last Segment get Data key child Nodes catch Object Not Found Exception e return null  naiveCopyCompleteSubtree AbstractDataTreeNode safeNaiveCopyCompleteSubtree IPath childNames getNamesOfChildren numChildren childNames AbstractDataTreeNode childNodes numChildren childNodes AbstractDataTreeNode NO_CHILDREN childNodes AbstractDataTreeNode numChildren actualChildCount numChildren childNodes safeCopyCompleteSubtree childNames childNodes actualChildCount actualChildCount numChildren AbstractDataTreeNode actualChildNodes AbstractDataTreeNode actualChildCount iOld iNew iOld numChildren iOld childNodes iOld actualChildNodes iNew childNodes iOld childNodes actualChildNodes DataTreeNode lastSegment getData childNodes ObjectNotFoundException
Returns the specified node Search in the parent if necessary Return null if the node is not found or if it has been deleted protected Abstract Data Tree Node search Node At I Path key int key Length key segment Count for Delta Data Tree tree this tree null tree tree parent Abstract Data Tree Node node tree root Node boolean complete node is Delta for int i 0 i key Length i node node child At Or Null key segment i if node null break if node is Delta complete true if node null if node is Deleted break else return node if complete Not found but complete node encountered so should not check parent tree break return null  AbstractDataTreeNode searchNodeAt IPath keyLength segmentCount DeltaDataTree AbstractDataTreeNode rootNode isDelta keyLength childAtOrNull isDelta isDeleted
see Abstract Data Tree set Data I Path Object public void set Data I Path key Object data if is Immutable handle Immutable Tree if includes key handle Not Found key assemble Node key new Data Delta Node key last Segment data  AbstractDataTree setData IPath setData IPath isImmutable handleImmutableTree handleNotFound assembleNode DataDeltaNode lastSegment
Sets the parent of the tree protected void set Parent Delta Data Tree a Tree parent a Tree  setParent DeltaDataTree aTree aTree
Sets the root node of the tree void set Root Node Abstract Data Tree Node a Node root Node a Node  setRootNode AbstractDataTreeNode aNode rootNode aNode
Simplifies the receiver replaces any Data Delta nodes with the same data as the parent with a No Data Delta node removes any empty leaf No Data Delta nodes protected void simplify I Comparator comparer if parent null return set Root Node root Node simplify With Parent root Key parent comparer  DataDelta NoDataDelta NoDataDelta IComparator setRootNode rootNode simplifyWithParent rootKey

public interface I Comparator Returns an integer describing the changes between two data objects in a data tree The first three bits of the returned integer are used during calculation of delta trees The remaining bits can be assigned any meaning that is useful to the client If there is no change in the two data objects this method must return 0 see Node Comparison  IComparator NodeComparison

public interface I Data Flattener Reads a data object from the given input stream param path the path of the element to be read param input the stream from which the element info should be read return the object associated with the given path which may be code null code  IDataFlattener
Writes the given data to the output stream p N B The bytes written must be sufficient for the purposes of reading the object back in param path the element s path in the tree param data the object associated with the given path which may be code null code 

public class No Data Delta Node extends Abstract Data Tree Node Creates a new empty delta public No Data Delta Node String name this name NO CHILDREN  NoDataDeltaNode AbstractDataTreeNode NoDataDeltaNode NO_CHILDREN
Creates a new data tree node param name name of new node param children children of the new node public No Data Delta Node String name Abstract Data Tree Node children super name children  NoDataDeltaNode AbstractDataTreeNode
Creates a new data tree node param local Name name of new node param child Node single child for new node No Data Delta Node String local Name Abstract Data Tree Node child Node super local Name new Abstract Data Tree Node child Node  localName childNode NoDataDeltaNode localName AbstractDataTreeNode childNode localName AbstractDataTreeNode childNode
see Abstract Data Tree Node as Backward Delta Delta Data Tree Delta Data Tree I Path Abstract Data Tree Node as Backward Delta Delta Data Tree my Tree Delta Data Tree parent Tree I Path key int num Children children length if num Children 0 return new No Data Delta Node name NO CHILDREN Abstract Data Tree Node new Children new Abstract Data Tree Node num Children for int i num Children i 0 new Children i children i as Backward Delta my Tree parent Tree key append children i get Name return new No Data Delta Node name new Children  AbstractDataTreeNode asBackwardDelta DeltaDataTree DeltaDataTree IPath AbstractDataTreeNode asBackwardDelta DeltaDataTree myTree DeltaDataTree parentTree IPath numChildren numChildren NoDataDeltaNode NO_CHILDREN AbstractDataTreeNode newChildren AbstractDataTreeNode numChildren numChildren newChildren asBackwardDelta myTree parentTree getName NoDataDeltaNode newChildren
see Abstract Data Tree Node compare With Parent I Path Delta Data Tree I Comparator Abstract Data Tree Node compare With Parent I Path key Delta Data Tree parent I Comparator comparator Abstract Data Tree Node compared Children compare With Parent children key parent comparator Object old Data parent get Data key return new Data Tree Node key last Segment new Node Comparison old Data old Data Node Comparison K CHANGED 0 compared Children  AbstractDataTreeNode compareWithParent IPath DeltaDataTree IComparator AbstractDataTreeNode compareWithParent IPath DeltaDataTree IComparator AbstractDataTreeNode comparedChildren compareWithParent oldData getData DataTreeNode lastSegment NodeComparison oldData oldData NodeComparison K_CHANGED comparedChildren
Creates and returns a new copy of the receiver Makes a deep copy of children but a shallow copy of name and data Abstract Data Tree Node copy Abstract Data Tree Node children Copy if children length 0 children Copy NO CHILDREN else children Copy new Abstract Data Tree Node children length System arraycopy children 0 children Copy 0 children length return new No Data Delta Node name children Copy  AbstractDataTreeNode AbstractDataTreeNode childrenCopy childrenCopy NO_CHILDREN childrenCopy AbstractDataTreeNode childrenCopy NoDataDeltaNode childrenCopy
Returns true if the receiver represents delta information false if it represents the complete information boolean is Delta return true  isDelta
Returns true if the receiver is an empty delta node false otherwise boolean is Empty Delta return this size 0  isEmptyDelta
Simplifies the given node and returns its replacement Abstract Data Tree Node simplify With Parent I Path key Delta Data Tree parent I Comparator comparer Abstract Data Tree Node simplified Children simplify With Parent children key parent comparer return new No Data Delta Node name simplified Children  AbstractDataTreeNode simplifyWithParent IPath DeltaDataTree IComparator AbstractDataTreeNode simplifiedChildren simplifyWithParent NoDataDeltaNode simplifiedChildren
Returns a unicode representation of the node This method is used for debugging purposes only no NLS support needed public String to String return a No Data Delta Node this get Name with get Children length children NON NLS 1 NON NLS 2 NON NLS 3  toString NoDataDeltaNode getName getChildren
Return a constant describing the type of node int type return T NO DATA DELTA NODE  T_NO_DATA_DELTA_NODE

Node Comparison Object old Data Object new Data int real Comparison int user Comparison this old Data old Data this new Data new Data this comparison real Comparison this user Int user Comparison  NodeComparison oldData newData realComparison userComparison oldData oldData newData newData realComparison userInt userComparison
Reverse the nature of the comparison Node Comparison as Reverse Comparison I Comparator comparator switch the data Object temp Data old Data old Data new Data new Data temp Data re calculate user comparison user Int comparator compare old Data new Data if comparison K ADDED comparison K REMOVED else if comparison K REMOVED comparison K ADDED return this  NodeComparison asReverseComparison IComparator tempData oldData oldData newData newData tempData userInt oldData newData K_ADDED K_REMOVED K_REMOVED K_ADDED
Returns an integer describing the changes between the two data objects The four possible values are K ADDED K REMOVED K CHANGED or 0 representing no change public int get Comparison return comparison  K_ADDED K_REMOVED K_CHANGED getComparison
Returns the data of the new node public Object get New Data return new Data  getNewData newData
Returns the data of the old node public Object get Old Data return old Data  getOldData oldData
Returns the client specified integer public int get User Comparison return user Int  getUserComparison userInt
Returns true if this comparison has no change and false otherwise boolean is Unchanged return user Int 0  isUnchanged userInt
For debugging public String to String String Buffer buf new String Buffer Node Comparison NON NLS 1 switch comparison case K ADDED buf append Added NON NLS 1 break case K REMOVED buf append Removed NON NLS 1 break case K CHANGED buf append Changed NON NLS 1 break case 0 buf append No change NON NLS 1 break default buf append Corrupt comparison NON NLS 1 NON NLS 2 buf append user Int buf append NON NLS 1 return buf to String  toString StringBuffer StringBuffer NodeComparison K_ADDED K_REMOVED K_CHANGED userInt toString

Creates a new Node Info object param type type of node param data node s data param children array of child names param deleted array of deleted child names public Node Info int type Object data String children String deleted this type type this data data this names Of Children children this names Of Deleted Children deleted  NodeInfo NodeInfo namesOfChildren namesOfDeletedChildren
Get node s data public Object get Data return data  getData
Returns an array of names of children of the node public String get Names Of Children return names Of Children  getNamesOfChildren namesOfChildren
Returns an array of names of deleted children of the node public String get Names Of Deleted Children return names Of Deleted Children  getNamesOfDeletedChildren namesOfDeletedChildren
public int get Type return type  getType
Returns true if the type of node carries data false otherwise public boolean has Data return type Abstract Data Tree Node T COMPLETE NODE type Abstract Data Tree Node T DELTA NODE  hasData AbstractDataTreeNode T_COMPLETE_NODE AbstractDataTreeNode T_DELTA_NODE
Returns true if the receiver represents a complete node public boolean is Complete return this get Type Abstract Data Tree Node T COMPLETE NODE  isComplete getType AbstractDataTreeNode T_COMPLETE_NODE
Returns true if the receiver represents a node that has been deleted from the tree false otherwise public boolean is Deleted return this get Type Abstract Data Tree Node T DELETED NODE  isDeleted getType AbstractDataTreeNode T_DELETED_NODE
Returns true if the node carries delta information false otherwise public boolean is Delta int type this get Type return type Abstract Data Tree Node T DELTA NODE type Abstract Data Tree Node T NO DATA DELTA NODE  isDelta getType AbstractDataTreeNode T_DELTA_NODE AbstractDataTreeNode T_NO_DATA_DELTA_NODE
Returns whether the node represents an empty delta The node represents an empty delta if has no data and no children public boolean is Empty Delta return this get Type Abstract Data Tree Node T NO DATA DELTA NODE this get Names Of Children length 0 this get Names Of Deleted Children length 0  isEmptyDelta getType AbstractDataTreeNode T_NO_DATA_DELTA_NODE getNamesOfChildren getNamesOfDeletedChildren
Returns true if the node is present in the tree whether it be a complete node delta node deleted node or virtual node public boolean is Present return this get Type Abstract Data Tree Node T MISSING NODE  isPresent getType AbstractDataTreeNode T_MISSING_NODE
Returns a node info object describing a missing or deleted node static Node Info missing return new Node Info Abstract Data Tree Node T MISSING NODE null no data new String 0 no children new String 0 no deleted children  NodeInfo NodeInfo AbstractDataTreeNode T_MISSING_NODE
public void set Data Object o data o  setData
public void set Names Of Children String names names Of Children names  setNamesOfChildren namesOfChildren
public void set Names Of Deleted Children String names names Of Deleted Children names  setNamesOfDeletedChildren namesOfDeletedChildren
public void set Type int type this type type  setType

public class Object Not Found Exception extends Runtime Exception Object Not Found Exception constructor comment public Object Not Found Exception super  ObjectNotFoundException RuntimeException ObjectNotFoundException ObjectNotFoundException
Object Not Found Exception constructor comment param s java lang String public Object Not Found Exception String s super s  ObjectNotFoundException ObjectNotFoundException

public class Test Helper Returns the root node of a tree public static Abstract Data Tree Node get Root Node Abstract Data Tree tree return tree get Root Node  TestHelper AbstractDataTreeNode getRootNode AbstractDataTree getRootNode

Auto Build Job Workspace workspace super I Core Constants MSG EVENTS BUILDING 0 set Rule workspace get Root is Auto Building workspace is Auto Building this workspace workspace Resources Plugin get Plugin get Plugin Preferences add Property Change Listener this  AutoBuildJob ICoreConstants MSG_EVENTS_BUILDING_0 setRule getRoot isAutoBuilding isAutoBuilding ResourcesPlugin getPlugin getPluginPreferences addPropertyChangeListener
The workspace description has changed Update autobuild state param was Auto Building the old autobuild state param is Auto Building the new autobuild state private void auto Build Changed boolean was Auto Building boolean is Auto Building this is Auto Building is Auto Building force a build if autobuild has been turned on if force Build was Auto Building is Auto Building force Build true build false  wasAutoBuilding isAutoBuilding autoBuildChanged wasAutoBuilding isAutoBuilding isAutoBuilding isAutoBuilding forceBuild wasAutoBuilding isAutoBuilding forceBuild
Used to prevent auto builds at the end of operations that contain explicit builds synchronized void avoid Build avoid Build true  avoidBuild avoidBuild
public boolean belongs To Object family return family Resources Plugin FAMILY AUTO BUILD  belongsTo ResourcesPlugin FAMILY_AUTO_BUILD
private void broadcast Changes int type throws Core Exception workspace get Notification Manager broadcast Changes workspace get Element Tree type false  broadcastChanges CoreException getNotificationManager broadcastChanges getElementTree
Instructs the build job that a build is required Ensure the build job is scheduled to run param needs Build Whether a build is required either due to workspace change or other factor that invalidates the built state synchronized void build boolean needs Build build Needed needs Build interrupted false long delay Math max Policy MIN BUILD DELAY Policy MAX BUILD DELAY last Build System current Time Millis int state get State if Policy DEBUG NEEDS BUILD Policy debug Build requested needs Build needs Build state Job Manager print State state delay delay NON NLS 1 NON NLS 2 NON NLS 3 switch state case Job SLEEPING wake Up delay break case NONE set System is Auto Building schedule delay break  needsBuild needsBuild buildNeeded needsBuild MIN_BUILD_DELAY MAX_BUILD_DELAY lastBuild currentTimeMillis getState DEBUG_NEEDS_BUILD needsBuild needsBuild JobManager printState wakeUp setSystem isAutoBuilding
The autobuild job has been canceled There are two flavours of cancel explicit user cancelation and implicit interruption due to another thread trying to modify the workspace In the latter case we must make sure the build is immediately rescheduled if it was interrupted by another thread so that clients waiting to join autobuild will properly continue waiting return a status with severity code CANCEL code private synchronized I Status canceled regardless of the form of cancelation the build state is not happy build Needed true return Status CANCEL STATUS  IStatus buildNeeded CANCEL_STATUS
Another thread is attempting to modify the workspace Flag the auto build as interrupted so that it will cancel and reschedule itself synchronized void interrupt if already interrupted do nothing if interrupted return switch get State case NONE return case WAITING put the job to sleep if it is waiting to run interrupted sleep break case RUNNING make sure autobuild doesn t interrupt itself interrupted job Manager current Job this break clear the autobuild avoidance flag if we were interrupted if interrupted avoid Build false  getState jobManager currentJob avoidBuild
private void do Build I Progress Monitor monitor throws Core Exception Operation Canceled Exception monitor Policy monitor For monitor try monitor begin Task null Policy op Work final I Scheduling Rule rule workspace get Rule Factory build Rule try workspace prepare Operation rule monitor workspace begin Operation true broadcast Changes I Resource Change Event PRE BUILD if should Build workspace get Build Manager build Incremental Project Builder AUTO BUILD Policy sub Monitor For monitor Policy op Work broadcast Changes I Resource Change Event POST BUILD build Needed false finally building may close the tree but we are still inside an operation so open it if workspace get Element Tree is Immutable workspace new Working Tree workspace end Operation rule false Policy sub Monitor For monitor Policy build Work finally monitor done  doBuild IProgressMonitor CoreException OperationCanceledException monitorFor beginTask opWork ISchedulingRule getRuleFactory buildRule prepareOperation beginOperation broadcastChanges IResourceChangeEvent PRE_BUILD shouldBuild getBuildManager IncrementalProjectBuilder AUTO_BUILD subMonitorFor opWork broadcastChanges IResourceChangeEvent POST_BUILD buildNeeded getElementTree isImmutable newWorkingTree endOperation subMonitorFor buildWork
Forces an autobuild to occur even if nothing has changed since the last build This is used to force a build after a clean public void force Build force Build true  forceBuild forceBuild
synchronized boolean is Interrupted if interrupted return true check if another job is blocked by the build job if is Blocking interrupted true return interrupted  isInterrupted isBlocking
public void property Change Property Change Event event if event get Property equals Resources Plugin PREF AUTO BUILDING return Object old Value event get Old Value Object new Value event get New Value if old Value instanceof Boolean new Value instanceof Boolean auto Build Changed Boolean old Value boolean Value Boolean new Value boolean Value  propertyChange PropertyChangeEvent getProperty ResourcesPlugin PREF_AUTO_BUILDING oldValue getOldValue newValue getNewValue oldValue newValue autoBuildChanged oldValue booleanValue newValue booleanValue
public I Status run I Progress Monitor monitor synchronized in case build starts during check Cancel synchronized this if monitor is Canceled return canceled if the system is shutting down don t build if system Bundle get State Bundle STOPPING NON NLS 1 return Status OK STATUS try do Build monitor last Build System current Time Millis if the build was successful then it should not be recorded as interrupted interrupted false return Status OK STATUS catch Operation Canceled Exception e return canceled catch Core Exception sig return sig get Status  IStatus IProgressMonitor checkCancel isCanceled systemBundle getState OK_STATUS doBuild lastBuild currentTimeMillis OK_STATUS OperationCanceledException CoreException getStatus
Returns true if a build is actually needed and false otherwise private synchronized boolean should Build try if auto build is off then we never run if workspace is Auto Building return false build if the workspace requires a build description changes if force Build return true if avoid Build return false return whether there have been any changes to the workspace tree return build Needed finally regardless of the result clear the build flags for next time force Build avoid Build build Needed false  shouldBuild isAutoBuilding forceBuild avoidBuild buildNeeded forceBuild avoidBuild buildNeeded

protected Hash Map arguments public Build Command super NON NLS 1 this arguments new Hash Map 0  HashMap BuildCommand HashMap
public Object clone Build Command result null result Build Command super clone if result null return null result set Arguments get Arguments return result  BuildCommand BuildCommand setArguments getArguments
public boolean equals Object object if this object return true if object instanceof Build Command return false Build Command command Build Command object equal if same builder name and equal argument tables return get Builder Name equals command get Builder Name get Arguments false equals command get Arguments false  BuildCommand BuildCommand BuildCommand getBuilderName getBuilderName getArguments getArguments
see I Command get Arguments public Map get Arguments return get Arguments true  ICommand getArguments getArguments getArguments
public Map get Arguments boolean make Copy return arguments null null make Copy Map arguments clone arguments  getArguments makeCopy makeCopy
see I Command get Builder Name public String get Builder Name return get Name  ICommand getBuilderName getBuilderName getName
public int hash Code hash on name alone return get Name hash Code  hashCode getName hashCode
see I Command set Arguments Map public void set Arguments Map value copy parameter for safety s sake arguments value null null new Hash Map value  ICommand setArguments setArguments HashMap
see I Command set Builder Name String public void set Builder Name String value don t allow builder name to be null set Name value null value NON NLS 1  ICommand setBuilderName setBuilderName setName
For debugging purposes only public String to String return Build Command get Name NON NLS 1 NON NLS 2  toString BuildCommand getName

protected I Project interesting Projects I Core Constants EMPTY PROJECT ARRAY public void set Project Name String name project Name name  IProject interestingProjects ICoreConstants EMPTY_PROJECT_ARRAY setProjectName projectName
public void set Builder Name String name builder Name name  setBuilderName builderName
public void set Last Build Tree Element Tree tree last Build Tree tree  setLastBuildTree ElementTree lastBuildTree
public void set Interesting Projects I Project projects interesting Projects projects  setInterestingProjects IProject interestingProjects
public String get Project Name return project Name  getProjectName projectName
public String get Builder Name return builder Name  getBuilderName builderName
public Element Tree get Last Built Tree return last Build Tree  ElementTree getLastBuiltTree lastBuildTree
public I Project get Interesting Projects return interesting Projects  IProject getInterestingProjects interestingProjects

public void cache I Path project Element Tree old Tree Element Tree new Tree Object delta this project Path project this old Tree old Tree this new Tree new Tree this delta delta  IPath ElementTree oldTree ElementTree newTree projectPath oldTree oldTree newTree newTree
public void flush this project Path null this old Tree null this new Tree null this delta null  projectPath oldTree newTree
Returns the cached resource delta for the given project and trees or null if there is no matching delta in the cache public Object get Delta I Path project Element Tree old Tree Element Tree new Tree if delta null return null boolean paths Equal project Path null project null project Path equals project if paths Equal this old Tree old Tree this new Tree new Tree return delta return null  getDelta IPath ElementTree oldTree ElementTree newTree pathsEqual projectPath projectPath pathsEqual oldTree oldTree newTree newTree
private String name Missing Builder String name this name name  MissingBuilder
Log an exception on the first build and silently do nothing on subsequent builds protected I Project build int kind Map args I Progress Monitor monitor throws Core Exception if has Been Built has Been Built true String msg Policy bind events skipping Builder new String name get Project get Name NON NLS 1 I Status status new Status I Status WARNING Resources Plugin PI RESOURCES 1 msg null Resources Plugin get Plugin get Log log status return null  IProject IProgressMonitor CoreException hasBeenBuilt hasBeenBuilt skippingBuilder getProject getName IStatus IStatus ResourcesPlugin PI_RESOURCES ResourcesPlugin getPlugin getLog
public Build Manager Workspace workspace I Lock workspace Lock this workspace workspace this auto Build Job new Auto Build Job workspace this lock workspace Lock  BuildManager ILock workspaceLock autoBuildJob AutoBuildJob workspaceLock
protected void basic Build int trigger Incremental Project Builder builder Map args Multi Status status I Progress Monitor monitor try current Builder builder clear any old requests to forget built state current Builder clear Forget Last Built State Figure out want kind of build is needed boolean clean trigger Incremental Project Builder CLEAN BUILD last Built Tree current Builder get Last Built Tree If no tree is available we have to do a full build if clean last Built Tree null trigger Incremental Project Builder FULL BUILD boolean full Build trigger Incremental Project Builder FULL BUILD Grab a pointer to the current state before computing the delta current Tree full Build null workspace get Element Tree int depth 1 try short circuit if none of the projects this builder cares about have changed if clean full Build needs Build current Builder return String name current Builder get Label String message if name null message Policy bind events invoking 2 name builder get Project get Full Path to String NON NLS 1 else message Policy bind events invoking 1 builder get Project get Full Path to String NON NLS 1 monitor sub Task message hook Start Build builder trigger release workspace lock while calling builders depth get Work Manager begin Unprotected do the build Platform run get Safe Runnable trigger args status monitor finally if depth 0 get Work Manager end Unprotected depth Be sure to clean up after ourselves if clean current Builder was Forget State Requested current Builder set Last Built Tree null else remember the current state as the last built state Element Tree last Tree workspace get Element Tree last Tree immutable current Builder set Last Built Tree last Tree hook End Build builder finally current Builder null current Tree null last Built Tree null current Delta null  basicBuild IncrementalProjectBuilder MultiStatus IProgressMonitor currentBuilder currentBuilder clearForgetLastBuiltState IncrementalProjectBuilder CLEAN_BUILD lastBuiltTree currentBuilder getLastBuiltTree lastBuiltTree IncrementalProjectBuilder FULL_BUILD fullBuild IncrementalProjectBuilder FULL_BUILD currentTree fullBuild getElementTree fullBuild needsBuild currentBuilder currentBuilder getLabel getProject getFullPath toString getProject getFullPath toString subTask hookStartBuild getWorkManager beginUnprotected getSafeRunnable getWorkManager endUnprotected currentBuilder wasForgetStateRequested currentBuilder setLastBuiltTree ElementTree lastTree getElementTree lastTree currentBuilder setLastBuiltTree lastTree hookEndBuild currentBuilder currentTree lastBuiltTree currentDelta
We know the work manager is always available in the middle of a build private Work Manager get Work Manager try return workspace get Work Manager catch Core Exception e cannot happen avoid compile error return null  WorkManager getWorkManager getWorkManager CoreException
protected void basic Build I Project project int trigger I Command commands Multi Status status I Progress Monitor monitor monitor Policy monitor For monitor try String message Policy bind events building 1 project get Full Path to String NON NLS 1 monitor begin Task message Math max 1 commands length for int i 0 i commands length i check Canceled trigger monitor I Progress Monitor sub Policy sub Monitor For monitor 1 Build Command command Build Command commands i basic Build project trigger command get Builder Name command get Arguments false status sub finally monitor done  basicBuild IProject ICommand MultiStatus IProgressMonitor monitorFor getFullPath toString beginTask checkCanceled IProgressMonitor subMonitorFor BuildCommand BuildCommand basicBuild getBuilderName getArguments
I Safe Runnable code new I Safe Runnable public void handle Exception Throwable e if e instanceof Operation Canceled Exception throw Operation Canceled Exception e don t log the exception it is already being logged in Workspace run should never get here because the lower level build code wrappers builder exceptions in core exceptions if required String message e get Message if message null message Policy bind events unknown e get Class get Name current Builder get Class get Name NON NLS 1 status add new Status I Status WARNING Resources Plugin PI RESOURCES I Resource Status INTERNAL ERROR message e  ISafeRunnable ISafeRunnable handleException OperationCanceledException OperationCanceledException getMessage getClass getName currentBuilder getClass getName IStatus ResourcesPlugin PI_RESOURCES IResourceStatus INTERNAL_ERROR
public void run throws Exception basic Build project trigger commands status monitor  basicBuild
protected void basic Build final I Project project final int trigger final Multi Status status final I Progress Monitor monitor if project is Accessible return final I Command commands Project project internal Get Description get Build Spec false if commands length 0 return I Safe Runnable code new I Safe Runnable public void handle Exception Throwable e if e instanceof Operation Canceled Exception throw Operation Canceled Exception e don t log the exception it is already being logged in Workspace run should never get here because the lower level build code wrappers builder exceptions in core exceptions if required String message e get Message if message null message Policy bind events unknown e get Class get Name current Builder get Class get Name NON NLS 1 status add new Status I Status WARNING Resources Plugin PI RESOURCES I Resource Status INTERNAL ERROR message e public void run throws Exception basic Build project trigger commands status monitor Platform run code  basicBuild IProject MultiStatus IProgressMonitor isAccessible ICommand internalGetDescription getBuildSpec ISafeRunnable ISafeRunnable handleException OperationCanceledException OperationCanceledException getMessage getClass getName currentBuilder getClass getName IStatus ResourcesPlugin PI_RESOURCES IResourceStatus INTERNAL_ERROR basicBuild
protected void basic Build I Project project int trigger String builder Name Map args Multi Status status I Progress Monitor monitor Incremental Project Builder builder null try builder get Builder builder Name project status if validate Nature builder builder Name skip this builder and null its last built tree because it is invalid if the nature gets added or re enabled a full build will be triggered Internal Builder builder set Last Built Tree null return catch Core Exception e status add e get Status return basic Build trigger builder args status monitor  basicBuild IProject builderName MultiStatus IProgressMonitor IncrementalProjectBuilder getBuilder builderName validateNature builderName InternalBuilder setLastBuiltTree CoreException getStatus basicBuild
Loop the workspace build until no more builders request a rebuild protected void basic Build Loop I Project ordered I Project unordered int trigger Multi Status status I Progress Monitor monitor int project Work ordered length unordered length if project Work 0 project Work Policy total Work project Work int max Iterations workspace get Description get Max Build Iterations if max Iterations 0 max Iterations 1 rebuild Requested true for int iter 0 rebuild Requested iter max Iterations iter rebuild Requested false built Projects clear for int i 0 i ordered length i if ordered i is Accessible basic Build ordered i trigger status Policy sub Monitor For monitor project Work built Projects add ordered i for int i 0 i unordered length i if unordered i is Accessible basic Build unordered i trigger status Policy sub Monitor For monitor project Work built Projects add unordered i subsequent builds should always be incremental trigger Incremental Project Builder INCREMENTAL BUILD  basicBuildLoop IProject IProject MultiStatus IProgressMonitor projectWork projectWork projectWork totalWork projectWork maxIterations getDescription getMaxBuildIterations maxIterations maxIterations rebuildRequested rebuildRequested maxIterations rebuildRequested builtProjects isAccessible basicBuild subMonitorFor projectWork builtProjects isAccessible basicBuild subMonitorFor projectWork builtProjects IncrementalProjectBuilder INCREMENTAL_BUILD
public void build int trigger I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try monitor begin Task I Core Constants MSG EVENTS BUILDING 0 Policy total Work if can Run trigger return try building true I Project ordered workspace get Build Order Hash Set leftover new Hash Set Arrays as List workspace get Root get Projects leftover remove All Arrays as List ordered I Project unordered I Project leftover to Array new I Project leftover size Multi Status status new Multi Status Resources Plugin PI RESOURCES I Resource Status BUILD FAILED I Core Constants MSG EVENTS ERRORS null basic Build Loop ordered unordered trigger status monitor if the status is not ok throw an exception if status isOK throw new Resource Exception status finally cleanup trigger finally monitor done if trigger Incremental Project Builder INCREMENTAL BUILD trigger Incremental Project Builder FULL BUILD auto Build Job avoid Build  IProgressMonitor CoreException monitorFor beginTask ICoreConstants MSG_EVENTS_BUILDING_0 totalWork canRun IProject getBuildOrder HashSet HashSet asList getRoot getProjects removeAll asList IProject IProject toArray IProject MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus BUILD_FAILED ICoreConstants MSG_EVENTS_ERRORS basicBuildLoop ResourceException IncrementalProjectBuilder INCREMENTAL_BUILD IncrementalProjectBuilder FULL_BUILD autoBuildJob avoidBuild
private void cleanup int trigger building false built Projects clear delta Cache flush delta Tree Cache flush ensure autobuild runs after a clean if trigger Incremental Project Builder CLEAN BUILD auto Build Job force Build  builtProjects deltaCache deltaTreeCache IncrementalProjectBuilder CLEAN_BUILD autoBuildJob forceBuild
public void build I Project project int trigger I Progress Monitor monitor throws Core Exception if can Run trigger return try building true Multi Status status new Multi Status Resources Plugin PI RESOURCES I Resource Status INTERNAL ERROR I Core Constants MSG EVENTS ERRORS null basic Build project trigger status monitor if status isOK throw new Resource Exception status finally cleanup trigger  IProject IProgressMonitor CoreException canRun MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus INTERNAL_ERROR ICoreConstants MSG_EVENTS_ERRORS basicBuild ResourceException
public void build I Project project int trigger String builder Name Map args I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String message Policy bind events building 1 project get Full Path to String NON NLS 1 monitor begin Task message 1 if can Run trigger return try building true Multi Status status new Multi Status Resources Plugin PI RESOURCES I Resource Status INTERNAL ERROR I Core Constants MSG EVENTS ERRORS null basic Build project trigger builder Name args status Policy sub Monitor For monitor 1 if status isOK throw new Resource Exception status finally cleanup trigger finally monitor done  IProject builderName IProgressMonitor CoreException monitorFor getFullPath toString beginTask canRun MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus INTERNAL_ERROR ICoreConstants MSG_EVENTS_ERRORS basicBuild builderName subMonitorFor ResourceException
protected boolean can Run int trigger return building  canRun
Another thread is attempting to modify the workspace Cancel the autobuild and wait until it completes public void interrupt auto Build Job interrupt  autoBuildJob
Cancel the build if the user has canceled or if an auto build has been interrupted private void check Canceled int trigger I Progress Monitor monitor if the system is shutting down don t build if system Bundle get State Bundle STOPPING throw new Operation Canceled Exception Policy check Canceled monitor check for auto cancel only if we are auto building if trigger Incremental Project Builder AUTO BUILD return check for request to interrupt the auto build if auto Build Job is Interrupted throw new Operation Canceled Exception  checkCanceled IProgressMonitor systemBundle getState OperationCanceledException checkCanceled IncrementalProjectBuilder AUTO_BUILD autoBuildJob isInterrupted OperationCanceledException
protected I Project compute Unordered Projects I Project ordered I Project unordered Hash Set leftover new Hash Set Arrays as List workspace get Root get Projects leftover remove All Arrays as List ordered unordered I Project leftover to Array new I Project leftover size return unordered  IProject computeUnorderedProjects IProject IProject HashSet HashSet asList getRoot getProjects removeAll asList IProject toArray IProject
Creates and returns a Map mapping String builder name Builder Persistent Info The table includes entries for all builders that are in the builder spec and that have a last built state even if they have not been instantiated this session public Map create Builders Persistent Info I Project project throws Core Exception get the old builder map Map old Infos get Builders Persistent Info project I Command build Commands Project project internal Get Description get Build Spec false if build Commands length 0 return null build the new map Map new Infos new Hash Map build Commands length 2 Hashtable instantiated Builders get Builders project for int i 0 i build Commands length i String builder Name build Commands i get Builder Name Builder Persistent Info info null Incremental Project Builder builder Incremental Project Builder instantiated Builders get builder Name if builder null if the builder was not instantiated use the old info if any if old Infos null info Builder Persistent Info old Infos get builder Name else if builder instanceof Missing Builder Element Tree old Tree Internal Builder builder get Last Built Tree don t persist build state for builders that have no last built state if old Tree null if the builder was instantiated construct a memento with the important info info new Builder Persistent Info info set Project Name project get Name info set Builder Name builder Name info set Last Build Tree old Tree info set Interesting Projects Internal Builder builder get Interesting Projects if info null new Infos put builder Name info return new Infos  BuilderPersistentInfo createBuildersPersistentInfo IProject CoreException oldInfos getBuildersPersistentInfo ICommand buildCommands internalGetDescription getBuildSpec buildCommands newInfos HashMap buildCommands instantiatedBuilders getBuilders buildCommands builderName buildCommands getBuilderName BuilderPersistentInfo IncrementalProjectBuilder IncrementalProjectBuilder instantiatedBuilders builderName oldInfos BuilderPersistentInfo oldInfos builderName MissingBuilder ElementTree oldTree InternalBuilder getLastBuiltTree oldTree BuilderPersistentInfo setProjectName getName setBuilderName builderName setLastBuildTree oldTree setInterestingProjects InternalBuilder getInterestingProjects newInfos builderName newInfos
protected String debug Builder return current Builder null no builder current Builder get Class get Name NON NLS 1  debugBuilder currentBuilder currentBuilder getClass getName
protected String debug Project if current Builder null return no project NON NLS 1 return current Builder get Project get Full Path to String  debugProject currentBuilder currentBuilder getProject getFullPath toString
The outermost workspace operation has finished Do an autobuild if necessary public void end Top Level boolean needs Build auto Build Job build needs Build  endTopLevel needsBuild autoBuildJob needsBuild
protected Incremental Project Builder get Builder String builder Name I Project project Multi Status status throws Core Exception Hashtable builders get Builders project Incremental Project Builder result Incremental Project Builder builders get builder Name if result null return result result initialize Builder builder Name project status builders put builder Name result Internal Builder result set Project project Internal Builder result startup On Initialize return result  IncrementalProjectBuilder getBuilder builderName IProject MultiStatus CoreException getBuilders IncrementalProjectBuilder IncrementalProjectBuilder builderName initializeBuilder builderName builderName InternalBuilder setProject InternalBuilder startupOnInitialize
Returns a hashtable of all instantiated builders for the given project This hashtable maps String builder name Builder protected Hashtable get Builders I Project project Project Info info Project Info workspace get Resource Info project get Full Path false false if info null Assert is Not Null info Policy bind events no Project project get Name NON NLS 1 return info get Builders  getBuilders IProject ProjectInfo ProjectInfo getResourceInfo getFullPath isNotNull noProject getName getBuilders
Returns a Map mapping String builder name Builder Persistent Info The map includes entries for all builders that are in the builder spec and that have a last built state even if they have not been instantiated this session public Map get Builders Persistent Info I Project project throws Core Exception return Map project get Session Property K BUILD MAP  BuilderPersistentInfo getBuildersPersistentInfo IProject CoreException getSessionProperty K_BUILD_MAP
protected I Resource Delta get Delta I Project project try lock acquire if current Tree null if Policy DEBUG BUILD FAILURE Policy debug Build no tree for delta debug Builder debug Project NON NLS 1 NON NLS 2 NON NLS 3 return null check if this builder has indicated it cares about this project if is Interesting Project project if Policy DEBUG BUILD FAILURE Policy debug Build project not interesting for this builder debug Builder debug Project project get Full Path NON NLS 1 NON NLS 2 NON NLS 3 return null check if this project has changed if current Delta null current Delta find Node At project get Full Path null if the project never existed not in delta and not in current tree return null if project exists return null just return an empty delta rooted at this project return Resource Delta Factory new Empty Delta project now check against the cache I Resource Delta result I Resource Delta delta Cache get Delta project get Full Path last Built Tree current Tree if result null return result long start Time 0L if Policy DEBUG BUILD DELTA start Time System current Time Millis Policy debug Computing delta for project project get Name NON NLS 1 result Resource Delta Factory compute Delta workspace last Built Tree current Tree project get Full Path 1 delta Cache cache project get Full Path last Built Tree current Tree result if Policy DEBUG BUILD FAILURE result null Policy debug Build no delta debug Builder debug Project project get Full Path NON NLS 1 NON NLS 2 NON NLS 3 if Policy DEBUG BUILD DELTA Policy debug Finished computing delta time System current Time Millis start Time ms NON NLS 1 NON NLS 2 return result finally lock release  IResourceDelta getDelta IProject currentTree DEBUG_BUILD_FAILURE debugBuilder debugProject isInterestingProject DEBUG_BUILD_FAILURE debugBuilder debugProject getFullPath currentDelta currentDelta findNodeAt getFullPath ResourceDeltaFactory newEmptyDelta IResourceDelta IResourceDelta deltaCache getDelta getFullPath lastBuiltTree currentTree startTime DEBUG_BUILD_DELTA startTime currentTimeMillis getName ResourceDeltaFactory computeDelta lastBuiltTree currentTree getFullPath deltaCache getFullPath lastBuiltTree currentTree DEBUG_BUILD_FAILURE debugBuilder debugProject getFullPath DEBUG_BUILD_DELTA currentTimeMillis startTime
return new I Safe Runnable public void handle Exception Throwable e if e instanceof Operation Canceled Exception throw Operation Canceled Exception e Resource Stats build Exception e don t log the exception it is already being logged in Platform run add a generic message to the Multi Status String builder Name current Builder get Label if builder Name null builder Name length 0 builder Name current Builder get Class get Name String plugin Id current Builder get Plugin Descriptor get Unique Identifier String message Policy bind events builder Error builder Name current Builder get Project get Name NON NLS 1 status add new Status I Status WARNING plugin Id I Resource Status BUILD FAILED message null add the exception status to the Multi Status if e instanceof Core Exception status add Core Exception e get Status else message e get Message if message null message Policy bind events unknown e get Class get Name builder Name NON NLS 1 status add new Status I Status WARNING plugin Id I Resource Status BUILD FAILED message e  ISafeRunnable handleException OperationCanceledException OperationCanceledException ResourceStats buildException MultiStatus builderName currentBuilder getLabel builderName builderName builderName currentBuilder getClass getName pluginId currentBuilder getPluginDescriptor getUniqueIdentifier builderError builderName currentBuilder getProject getName IStatus pluginId IResourceStatus BUILD_FAILED MultiStatus CoreException CoreException getStatus getMessage getClass getName builderName IStatus pluginId IResourceStatus BUILD_FAILED
public void run throws Exception I Project prereqs null invoke the appropriate build method depending on the trigger if trigger Incremental Project Builder CLEAN BUILD prereqs current Builder build trigger args monitor else current Builder clean monitor if prereqs null prereqs new I Project 0 current Builder set Interesting Projects I Project prereqs clone  IProject IncrementalProjectBuilder CLEAN_BUILD currentBuilder currentBuilder IProject currentBuilder setInterestingProjects IProject
Returns the safe runnable instance for invoking a builder protected I Safe Runnable get Safe Runnable final int trigger final Map args final Multi Status status final I Progress Monitor monitor return new I Safe Runnable public void handle Exception Throwable e if e instanceof Operation Canceled Exception throw Operation Canceled Exception e Resource Stats build Exception e don t log the exception it is already being logged in Platform run add a generic message to the Multi Status String builder Name current Builder get Label if builder Name null builder Name length 0 builder Name current Builder get Class get Name String plugin Id current Builder get Plugin Descriptor get Unique Identifier String message Policy bind events builder Error builder Name current Builder get Project get Name NON NLS 1 status add new Status I Status WARNING plugin Id I Resource Status BUILD FAILED message null add the exception status to the Multi Status if e instanceof Core Exception status add Core Exception e get Status else message e get Message if message null message Policy bind events unknown e get Class get Name builder Name NON NLS 1 status add new Status I Status WARNING plugin Id I Resource Status BUILD FAILED message e public void run throws Exception I Project prereqs null invoke the appropriate build method depending on the trigger if trigger Incremental Project Builder CLEAN BUILD prereqs current Builder build trigger args monitor else current Builder clean monitor if prereqs null prereqs new I Project 0 current Builder set Interesting Projects I Project prereqs clone  ISafeRunnable getSafeRunnable MultiStatus IProgressMonitor ISafeRunnable handleException OperationCanceledException OperationCanceledException ResourceStats buildException MultiStatus builderName currentBuilder getLabel builderName builderName builderName currentBuilder getClass getName pluginId currentBuilder getPluginDescriptor getUniqueIdentifier builderError builderName currentBuilder getProject getName IStatus pluginId IResourceStatus BUILD_FAILED MultiStatus CoreException CoreException getStatus getMessage getClass getName builderName IStatus pluginId IResourceStatus BUILD_FAILED IProject IncrementalProjectBuilder CLEAN_BUILD currentBuilder currentBuilder IProject currentBuilder setInterestingProjects IProject
public void handle Event Lifecycle Event event I Project project null switch event kind case Lifecycle Event PRE PROJECT DELETE case Lifecycle Event PRE PROJECT MOVE project I Project event resource make sure the builder persistent info is deleted for the project move case if project is Accessible set Builders Persistent Info project null  handleEvent LifecycleEvent IProject LifecycleEvent PRE_PROJECT_DELETE LifecycleEvent PRE_PROJECT_MOVE IProject isAccessible setBuildersPersistentInfo
Returns true if the given project has been built during this build cycle and false otherwise public boolean has Been Built I Project project return built Projects contains project  hasBeenBuilt IProject builtProjects
Hook for adding trace options and debug information at the end of a build private void hook End Build Incremental Project Builder builder if Policy MONITOR BUILDERS Event Stats end Build if Policy DEBUG BUILD INVOKING time Stamp 1 return builder wasn t called or we are not debugging Policy debug Builder finished to String builder time System current Time Millis time Stamp ms NON NLS 1 NON NLS 2 NON NLS 3 time Stamp 1  hookEndBuild IncrementalProjectBuilder MONITOR_BUILDERS EventStats endBuild DEBUG_BUILD_INVOKING timeStamp toString currentTimeMillis timeStamp timeStamp
Hook for adding trace options and debug information at the start of a build private void hook Start Build Incremental Project Builder builder int trigger if Policy MONITOR BUILDERS Event Stats start Build builder if Policy DEBUG BUILD INVOKING time Stamp System current Time Millis String type switch trigger case Incremental Project Builder FULL BUILD type FULL BUILD NON NLS 1 break case Incremental Project Builder INCREMENTAL BUILD default type INCREMENTAL BUILD NON NLS 1 Policy debug Invoking type on builder to String builder NON NLS 1 NON NLS 2  hookStartBuild IncrementalProjectBuilder MONITOR_BUILDERS EventStats startBuild DEBUG_BUILD_INVOKING timeStamp currentTimeMillis IncrementalProjectBuilder FULL_BUILD FULL_BUILD IncrementalProjectBuilder INCREMENTAL_BUILD INCREMENTAL_BUILD toString
Instantiates the builder with the given name If the builder its plugin or its nature is missing create a placeholder builder to takes its place This is needed to generate appropriate exceptions when somebody tries to invoke the builder and to prevent trying to instantiate it every time a build is run This method NEVER returns null protected Incremental Project Builder initialize Builder String builder Name I Project project Multi Status status throws Core Exception Incremental Project Builder builder null try builder instantiate Builder builder Name catch Core Exception e status add new Resource Status I Resource Status BUILD FAILED project get Full Path Policy bind events instantiate 1 builder Name e NON NLS 1 status add e get Status if builder null unable to create the builder so create a placeholder to fill in for it builder new Missing Builder builder Name get the map of builders to get the last built tree Map infos get Builders Persistent Info project if infos null Builder Persistent Info info Builder Persistent Info infos remove builder Name if info null Element Tree tree info get Last Built Tree if tree null Internal Builder builder set Last Built Tree tree Internal Builder builder set Interesting Projects info get Interesting Projects delete the build map if it s now empty if infos size 0 set Builders Persistent Info project null return builder  IncrementalProjectBuilder initializeBuilder builderName IProject MultiStatus CoreException IncrementalProjectBuilder instantiateBuilder builderName CoreException ResourceStatus IResourceStatus BUILD_FAILED getFullPath builderName getStatus MissingBuilder builderName getBuildersPersistentInfo BuilderPersistentInfo BuilderPersistentInfo builderName ElementTree getLastBuiltTree InternalBuilder setLastBuiltTree InternalBuilder setInterestingProjects getInterestingProjects setBuildersPersistentInfo
Instantiates and returns the builder with the given name If the builder its plugin or its nature is missing returns null protected Incremental Project Builder instantiate Builder String builder Name throws Core Exception I Extension extension Platform get Extension Registry get Extension Resources Plugin PI RESOURCES Resources Plugin PT BUILDERS builder Name if extension null return null I Configuration Element configs extension get Configuration Elements if configs length 0 return null String has Nature configs 0 get Attribute has Nature NON NLS 1 String nature Id null if has Nature null has Nature equals Ignore Case Boolean TRUE to String find the nature that owns this builder String builder Id extension get Unique Identifier nature Id workspace get Nature Manager find Nature For Builder builder Id if nature Id null return null The nature exists or this builder doesn t specify a nature Internal Builder builder Internal Builder configs 0 create Executable Extension run NON NLS 1 builder set Plugin Descriptor extension get Declaring Plugin Descriptor builder set Label extension get Label builder set Nature Id nature Id return Incremental Project Builder builder  IncrementalProjectBuilder instantiateBuilder builderName CoreException IExtension getExtensionRegistry getExtension ResourcesPlugin PI_RESOURCES ResourcesPlugin PT_BUILDERS builderName IConfigurationElement getConfigurationElements hasNature getAttribute hasNature natureId hasNature hasNature equalsIgnoreCase toString builderId getUniqueIdentifier natureId getNatureManager findNatureForBuilder builderId natureId InternalBuilder InternalBuilder createExecutableExtension setPluginDescriptor getDeclaringPluginDescriptor setLabel getLabel setNatureId natureId IncrementalProjectBuilder
Returns true if the current builder is interested in changes to the given project and false otherwise protected boolean is Interesting Project I Project project if project equals current Builder get Project return true I Project interesting Projects current Builder get Interesting Projects for int i 0 i interesting Projects length i if interesting Projects i equals project return true return false  isInterestingProject IProject currentBuilder getProject IProject interestingProjects currentBuilder getInterestingProjects interestingProjects interestingProjects
Returns true if the given builder needs to be invoked and false otherwise The algorithm is to compute the intersection of the set of projects that have changed since the last build and the set of projects this builder cares about This is an optimization under the assumption that computing the forward delta once not the resource delta is more efficient than computing project deltas and invoking builders for projects that haven t changed protected boolean needs Build Internal Builder builder compute the delta since the last built state Element Tree old Tree builder get Last Built Tree Element Tree new Tree workspace get Element Tree long start System current Time Millis current Delta Delta Data Tree delta Tree Cache get Delta null old Tree new Tree if current Delta null if Policy DEBUG NEEDS BUILD String message Checking if need to build Starting delta computation between old Tree to String and new Tree to String NON NLS 1 NON NLS 2 Policy debug message current Delta new Tree get Data Tree forward Delta With old Tree get Data Tree Resource Comparator get Comparator false if Policy DEBUG NEEDS BUILD Policy debug End delta computation System current Time Millis start ms NON NLS 1 NON NLS 2 delta Tree Cache cache null old Tree new Tree current Delta search for the builder s project if current Delta find Node At builder get Project get Full Path null if Policy DEBUG NEEDS BUILD Policy debug to String builder needs building because of changes in builder get Project get Name NON NLS 1 return true search for builder s interesting projects I Project projects builder get Interesting Projects for int i 0 i projects length i if current Delta find Node At projects i get Full Path null if Policy DEBUG NEEDS BUILD Policy debug to String builder needs building because of changes in projects i get Name NON NLS 1 return true return false  needsBuild InternalBuilder ElementTree oldTree getLastBuiltTree ElementTree newTree getElementTree currentTimeMillis currentDelta DeltaDataTree deltaTreeCache getDelta oldTree newTree currentDelta DEBUG_NEEDS_BUILD oldTree toString newTree toString currentDelta newTree getDataTree forwardDeltaWith oldTree getDataTree ResourceComparator getComparator DEBUG_NEEDS_BUILD currentTimeMillis deltaTreeCache oldTree newTree currentDelta currentDelta findNodeAt getProject getFullPath DEBUG_NEEDS_BUILD toString getProject getName IProject getInterestingProjects currentDelta findNodeAt getFullPath DEBUG_NEEDS_BUILD toString getName
Removes all builders with the given ID from the build spec Does nothing if there were no such builders in the spec protected void remove Builders I Project project String builder Id throws Core Exception I Project Description desc project get Description I Command old Spec desc get Build Spec int old Length old Spec length if old Length 0 return int remaining 0 null out all commands that match the builder to remove for int i 0 i old Spec length i if old Spec i get Builder Name equals builder Id old Spec i null else remaining check if any were actually removed if remaining old Spec length return I Command new Spec new I Command remaining for int i 0 new Index 0 i old Length i if old Spec i null new Spec new Index old Spec i desc set Build Spec new Spec project set Description desc I Resource NONE null  removeBuilders IProject builderId CoreException IProjectDescription getDescription ICommand oldSpec getBuildSpec oldLength oldSpec oldLength oldSpec oldSpec getBuilderName builderId oldSpec oldSpec ICommand newSpec ICommand newIndex oldLength oldSpec newSpec newIndex oldSpec setBuildSpec newSpec setDescription IResource
Hook for builders to request a rebuild public void request Rebuild rebuild Requested true  requestRebuild rebuildRequested
Sets the builder map for the given project The builder map is a Map mapping String builder name Builder Persistent Info The map includes entries for all builders that are in the builder spec and that have a last built state even if they have not been instantiated this session public void set Builders Persistent Info I Project project Map map try project set Session Property K BUILD MAP map catch Core Exception e project is missing build state will be lost can t throw an exception because this happens on startup I Status error new Resource Status I Status ERROR 1 project get Full Path Project missing in set Builders Persistent Info null NON NLS 1 Resources Plugin get Plugin get Log log error  BuilderPersistentInfo setBuildersPersistentInfo IProject setSessionProperty K_BUILD_MAP CoreException IStatus ResourceStatus IStatus getFullPath setBuildersPersistentInfo ResourcesPlugin getPlugin getLog
public void shutdown I Progress Monitor monitor auto Build Job cancel  IProgressMonitor autoBuildJob
public void startup I Progress Monitor monitor workspace add Lifecycle Listener this  IProgressMonitor addLifecycleListener
Returns a string representation of the given builder For debugging purposes only protected String to String Internal Builder builder String name builder get Class get Name name name substring name last Index Of 1 return name builder get Project get Name NON NLS 1 NON NLS 2  toString InternalBuilder getClass getName lastIndexOf getProject getName
Returns true if the nature membership rules are satisifed for the given builder extension on the given project and false otherwise A builder that does not specify that it belongs to a nature is always valid A builder extension that belongs to a nature can be invalid for the following reasons ul li The nature that owns the builder does not exist on the given project li li The nature that owns the builder is disabled on the given project li ul Furthermore if the nature that owns the builder does not exist on the project that builder will be removed from the build spec Note This method only validates nature constraints that can vary at runtime Additional checks are done in the instantiate Builder method for constraints that cannot vary once the plugin registry is initialized protected boolean validate Nature Internal Builder builder String builder Id throws Core Exception String nature builder get Nature Id if nature null return true I Project project builder get Project if project has Nature nature remove this builder from the build spec remove Builders project builder Id return false return project is Nature Enabled nature  instantiateBuilder validateNature InternalBuilder builderId CoreException getNatureId IProject getProject hasNature removeBuilders builderId isNatureEnabled

protected int mask public Delta Filter int mask super this mask mask  DeltaFilter
public boolean include Element int flags There are two conditions for accepting a flag 1 The flags and the mask have at least one bit in common 2 The flags is zero and the mask specifies to include changed children The only reason the flags can be zero is if there are changed children in which case we want to treat it as a change if flags 0 flags I Resource Delta CHANGED return flags mask 0  includeElement IResourceDelta

private constructor to prevent instantiation private Event Stats String id I Project project this id id this project project  EventStats IProject
public static void build Exception Exception e if current Stats null if DEBUG System out println Policy bind utils build Exception NON NLS 1 else current Stats add Exception e  buildException currentStats buildException currentStats addException
public static void dump Stats dump Stats System out  dumpStats dumpStats
public static void dump Stats Print Stream out Print Writer writer new Print Writer out dump Stats writer writer flush writer close  dumpStats PrintStream PrintWriter PrintWriter dumpStats
public static void dump Stats Print Writer out gather totals long total Build Time 0 long total Notify Time 0 int total Exceptions 0 int total Builds 0 int total Notifications 0 Event Stats all Stats get All Stats for int i 0 i all Stats length i Event Stats stats all Stats i total Build Time stats get Build Running Time total Notify Time stats get Notify Running Time total Exceptions stats get Exception Count total Builds stats get Build Count total Notifications stats get Notify Count dump stats out println NON NLS 1 out println Policy bind utils snapshots Integer to String snapshot Count Long to String snapshot Time NON NLS 1 for int i 0 i all Stats length i Event Stats stats all Stats i out println Policy bind utils stats stats get Name NON NLS 1 int notify Count stats get Notify Count if notify Count 0 out println Policy bind utils notifications Integer to String notify Count Integer to String int notify Count 100 0 total Notifications NON NLS 1 long notify Time stats get Notify Running Time if notify Time 0 out println Policy bind utils notify Time Long to String notify Time Integer to String int notify Time 100 0 total Notify Time NON NLS 1 int build Count stats get Build Count if build Count 0 out println Policy bind utils builds Integer to String build Count Integer to String int build Count 100 0 total Builds NON NLS 1 long build Time stats get Build Running Time if build Time 0 out println Policy bind utils build Time Long to String build Time Integer to String int build Time 100 0 total Build Time NON NLS 1 int exceptions stats get Exception Count if exceptions 0 out println Policy bind utils exceptions Integer to String exceptions Integer to String int exceptions 100 0 total Exceptions NON NLS 1 out println NON NLS 1  dumpStats PrintWriter totalBuildTime totalNotifyTime totalExceptions totalBuilds totalNotifications EventStats allStats getAllStats allStats EventStats allStats totalBuildTime getBuildRunningTime totalNotifyTime getNotifyRunningTime totalExceptions getExceptionCount totalBuilds getBuildCount totalNotifications getNotifyCount toString snapshotCount toString snapshotTime allStats EventStats allStats getName notifyCount getNotifyCount notifyCount toString notifyCount toString notifyCount totalNotifications notifyTime getNotifyRunningTime notifyTime notifyTime toString notifyTime toString notifyTime totalNotifyTime buildCount getBuildCount buildCount toString buildCount toString buildCount totalBuilds buildTime getBuildRunningTime buildTime buildTime toString buildTime toString buildTime totalBuildTime getExceptionCount toString toString totalExceptions
public static void end Build long end System current Time Millis if current Stats null current Start 1 if DEBUG System err println Policy bind utils end Build NON NLS 1 return current Stats add Build end current Start current Stats null current Start 1  endBuild currentTimeMillis currentStats currentStart endBuild currentStats addBuild currentStart currentStats currentStart
public static void end Notify long end System current Time Millis if current Stats null current Start 1 if DEBUG System err println Policy bind utils end Notify NON NLS 1 return current Stats add Notify end current Start current Start 1  endNotify currentTimeMillis currentStats currentStart endNotify currentStats addNotify currentStart currentStart
public static void end Snapshot snapshot Time System current Time Millis current Start snapshot Count current Start 1  endSnapshot snapshotTime currentTimeMillis currentStart snapshotCount currentStart
public static int get Snap Count return snapshot Count  getSnapCount snapshotCount
private static I Plugin Descriptor get Plugin For Object target Class Loader loader target get Class get Class Loader if loader instanceof Plugin Class Loader return Plugin Class Loader loader get Plugin Descriptor return null  IPluginDescriptor getPluginFor ClassLoader getClass getClassLoader PluginClassLoader PluginClassLoader getPluginDescriptor
Returns the stats object for the given ID private static Event Stats get Stats String id I Project project Object origin Event Stats result null if project null result Event Stats notification Stats get id if result null result new Event Stats id project result set Plugin get Plugin For origin notification Stats put id result else try Map stats Map project get Session Property STATS PROPERTY if stats null stats new Hash Map 5 project set Session Property STATS PROPERTY stats result Event Stats stats get id if result null result new Event Stats id project result set Plugin get Plugin For origin stats put id result catch Core Exception e return result  EventStats getStats IProject EventStats EventStats notificationStats EventStats setPlugin getPluginFor notificationStats getSessionProperty STATS_PROPERTY HashMap setSessionProperty STATS_PROPERTY EventStats EventStats setPlugin getPluginFor CoreException
Returns stats objects for all plugins that are registered for statistics either notification listeners or builders public static Event Stats get All Stats Array List result new Array List notification Stats values try I Resource projects Resources Plugin get Workspace get Root members for int i 0 i projects length i I Project project I Project projects i try Map stats Map project get Session Property STATS PROPERTY if stats null result add All stats values catch Core Exception e catch Core Exception e return Event Stats result to Array new Event Stats result size  EventStats getAllStats ArrayList ArrayList notificationStats IResource ResourcesPlugin getWorkspace getRoot IProject IProject getSessionProperty STATS_PROPERTY addAll CoreException CoreException EventStats toArray EventStats
Resets all known statistics public static void reset Stats for Iterator iter notification Stats values iterator iter has Next Event Stats iter next reset try I Resource projects Resources Plugin get Workspace get Root members for int i 0 i projects length i I Project project I Project projects i try Map stats Map project get Session Property STATS PROPERTY if stats null for Iterator iter stats values iterator iter has Next Event Stats iter next reset catch Core Exception e catch Core Exception e  resetStats notificationStats hasNext EventStats IResource ResourcesPlugin getWorkspace getRoot IProject IProject getSessionProperty STATS_PROPERTY hasNext EventStats CoreException CoreException
Notifies the stats tool that a resource change listener has been removed public static void listener Removed I Resource Change Listener listener if listener null notification Stats remove listener to String  listenerRemoved IResourceChangeListener notificationStats toString
Notifies the stats tool that a resource change listener has been added public static void listener Added I Resource Change Listener listener if listener null get Stats listener to String null listener  listenerAdded IResourceChangeListener getStats toString
public static void notify Exception Exception e if current Stats null if DEBUG System out println Policy bind utils build Exception NON NLS 1 return current Stats add Exception e  notifyException currentStats buildException currentStats addException
public static void start Build Incremental Project Builder builder String key Internal Builder builder get Label current Stats get Stats key builder get Project builder current Start System current Time Millis  startBuild IncrementalProjectBuilder InternalBuilder getLabel currentStats getStats getProject currentStart currentTimeMillis
public static void start Notify I Resource Change Listener listener current Stats get Stats listener to String null listener current Start System current Time Millis  startNotify IResourceChangeListener currentStats getStats toString currentStart currentTimeMillis
public static void start Snapshot current Start System current Time Millis  startSnapshot currentStart currentTimeMillis
void add Build long elapsed build Count build Running Time elapsed  addBuild buildCount buildRunningTime
void add Exception Exception e exceptions add Element e  addException addElement
void add Notify long elapsed notification Count notification Running Time elapsed  addNotify notificationCount notificationRunningTime
public int get Build Count return build Count  getBuildCount buildCount
public long get Build Running Time return build Running Time  getBuildRunningTime buildRunningTime
public Enumeration get Core Exceptions Vector runtime new Vector for Enumeration e exceptions elements e has More Elements Exception next Exception e next Element if next instanceof Core Exception runtime add Element next return runtime elements  getCoreExceptions hasMoreElements nextElement CoreException addElement
public int get Exception Count return exceptions size  getExceptionCount
public String get Name return id  getName
public int get Notify Count return notification Count  getNotifyCount notificationCount
public long get Notify Running Time return notification Running Time  getNotifyRunningTime notificationRunningTime
public I Plugin Descriptor get Plugin return plugin  IPluginDescriptor getPlugin
public I Project get Project return project  IProject getProject
public Enumeration get Runtime Exceptions Vector runtime new Vector for Enumeration e exceptions elements e has More Elements Exception next Exception e next Element if next instanceof Runtime Exception runtime add Element next return runtime elements  getRuntimeExceptions hasMoreElements nextElement RuntimeException addElement
public long get Total Running Time return notification Running Time build Running Time  getTotalRunningTime notificationRunningTime buildRunningTime
public void reset notification Running Time 0 build Running Time 0 notification Count 0 build Count 0 exceptions new Vector  notificationRunningTime buildRunningTime notificationCount buildCount
public void set Plugin I Plugin Descriptor value plugin value  setPlugin IPluginDescriptor

public interface I Lifecycle Listener public void handle Event Lifecycle Event event throws Core Exception  ILifecycleListener handleEvent LifecycleEvent CoreException

see Incremental Project Builder build protected abstract I Project build int kind Map args I Progress Monitor monitor throws Core Exception  IncrementalProjectBuilder IProject IProgressMonitor CoreException
see Incremental Project Builder protected abstract void clean I Progress Monitor monitor throws Core Exception  IncrementalProjectBuilder IProgressMonitor CoreException
Clears the request to forget last built states final void clear Forget Last Built State forget State Requested false  clearForgetLastBuiltState forgetStateRequested
see Incremental Project Builder forget Last Built State protected void forget Last Built State old State null forget State Requested true  IncrementalProjectBuilder forgetLastBuiltState forgetLastBuiltState oldState forgetStateRequested
see Incremental Project Builder forget Last Built State protected I Resource Delta get Delta I Project project return build Manager get Delta project  IncrementalProjectBuilder forgetLastBuiltState IResourceDelta getDelta IProject buildManager getDelta
final I Project get Interesting Projects return interesting Projects  IProject getInterestingProjects interestingProjects
final String get Label return label  getLabel
final Element Tree get Last Built Tree return old State  ElementTree getLastBuiltTree oldState
Returns the ID of the nature that owns this builder Returns null if the builder does not belong to a nature final String get Nature Id return nature Id  getNatureId natureId
final I Plugin Descriptor get Plugin Descriptor return plugin Descriptor  IPluginDescriptor getPluginDescriptor pluginDescriptor
Returns the project for this builder protected I Project get Project return project  IProject getProject
see Incremental Project Builder has Been Built protected boolean has Been Built I Project project return build Manager has Been Built project  IncrementalProjectBuilder hasBeenBuilt hasBeenBuilt IProject buildManager hasBeenBuilt
see Incremental Project Builder is Interrupted public boolean is Interrupted return build Manager auto Build Job is Interrupted  IncrementalProjectBuilder isInterrupted isInterrupted buildManager autoBuildJob isInterrupted
see Incremental Project Builder need Rebuild protected void need Rebuild build Manager request Rebuild  IncrementalProjectBuilder needRebuild needRebuild buildManager requestRebuild
final void set Interesting Projects I Project value interesting Projects value  setInterestingProjects IProject interestingProjects
final void set Label String value this label value  setLabel
final void set Last Built Tree Element Tree value old State value  setLastBuiltTree ElementTree oldState
final void set Nature Id String id this nature Id id  setNatureId natureId
final void set Plugin Descriptor I Plugin Descriptor value plugin Descriptor value  setPluginDescriptor IPluginDescriptor pluginDescriptor
Sets the project for which this builder operates see get Project final void set Project I Project value Assert is True project null project value  getProject setProject IProject isTrue
see Incremental Project Builder startup On Initialize protected abstract void startup On Initialize  IncrementalProjectBuilder startupOnInitialize startupOnInitialize
Returns true if the builder requested that its last built state be forgetten and false otherwise final boolean was Forget State Requested return forget State Requested  wasForgetStateRequested forgetStateRequested

private static final Lifecycle Event instance new Lifecycle Event private Lifecycle Event super  LifecycleEvent LifecycleEvent LifecycleEvent
public static Lifecycle Event new Event int kind I Resource resource instance kind kind instance resource resource instance new Resource null instance update Flags 0 return instance  LifecycleEvent newEvent IResource newResource updateFlags
public static Lifecycle Event new Event int kind I Resource old Resource I Resource new Resource int update Flags instance kind kind instance resource old Resource instance new Resource new Resource instance update Flags update Flags return instance  LifecycleEvent newEvent IResource oldResource IResource newResource updateFlags oldResource newResource newResource updateFlags updateFlags

Creates a new node ID map of default capacity public NodeID Map this size Offset 0 this ids new long SIZES size Offset this old Paths new I Path SIZES size Offset this new Paths new I Path SIZES size Offset  NodeIDMap sizeOffset sizeOffset oldPaths IPath sizeOffset newPaths IPath sizeOffset
Returns true if the given element is contained in the map and false otherwise public boolean contains long id return get Index id 0  getIndex
The array isn t large enough so double its size and rehash all its current values protected void expand int new Length try new Length SIZES size Offset catch Array Index Out Of Bounds Exception e will only occur if there are 1 million elements in delta new Length ids length 2 long grown Ids new long new Length I Path grown Old Paths new I Path new Length I Path grown New Paths new I Path new Length int max Array Index new Length 1 for int i 0 i ids length i long id ids i if id 0 int hash hash For id new Length while grown Ids hash 0 hash if hash max Array Index hash 0 grown Ids hash id grown Old Paths hash old Paths i grown New Paths hash new Paths i ids grown Ids old Paths grown Old Paths new Paths grown New Paths  newLength newLength sizeOffset ArrayIndexOutOfBoundsException newLength grownIds newLength IPath grownOldPaths IPath newLength IPath grownNewPaths IPath newLength maxArrayIndex newLength hashFor newLength grownIds maxArrayIndex grownIds grownOldPaths oldPaths grownNewPaths newPaths grownIds oldPaths grownOldPaths newPaths grownNewPaths
Returns the index of the given element in the map If not found returns 1 private int get Index long searchID final int len ids length int hash hash For searchID len search the last half of the array for int i hash i len i if ids i searchID return i marker info not found so return 1 if ids i 0 return 1 search the beginning of the array for int i 0 i hash 1 i if ids i searchID return i marker info not found so return 1 if ids i 0 return 1 marker info not found so return 1 return 1  getIndex hashFor
Returns the new path location for the given ID or null if no new path is available public I Path get New Path long nodeID int index get Index nodeID if index 1 return null return new Paths index  IPath getNewPath getIndex newPaths
Returns the old path location for the given ID or null if no old path is available public I Path get Old Path long nodeID int index get Index nodeID if index 1 return null return old Paths index  IPath getOldPath getIndex oldPaths
private int hash For long id int size Knuth s hash function from Art of Computer Programming section 6 4 return int Math abs id LARGE NUMBER size  hashFor LARGE_NUMBER
Returns true if there are no elements in the map and false otherwise public boolean is Empty return element Count 0  isEmpty elementCount
Adds the given path mappings to the map If either old Path or new Path is null they are ignored old map values are not overwritten private void put long id I Path old Path I Path new Path if old Path null new Path null return int hash hash For id ids length search for an empty slot at the end of the array for int i hash i ids length i if ids i id replace value for existing entry if old Path null old Paths i old Path if new Path null new Paths i new Path return if ids i 0 add a new entry to the map ids i id if old Path null old Paths i old Path if new Path null new Paths i new Path element Count grow if necessary if should Grow expand return search for an empty slot at the beginning of the array for int i 0 i hash 1 i if ids i id replace value for existing entry if old Path null old Paths i old Path if new Path null new Paths i new Path return if ids i 0 add a new entry to the map ids i id if old Path null old Paths i old Path if new Path null new Paths i new Path element Count grow if necessary if should Grow expand return if we didn t find a free slot then try again with the expanded set expand put id old Path new Path  oldPath newPath IPath oldPath IPath newPath oldPath newPath hashFor oldPath oldPaths oldPath newPath newPaths newPath oldPath oldPaths oldPath newPath newPaths newPath elementCount shouldGrow oldPath oldPaths oldPath newPath newPaths newPath oldPath oldPaths oldPath newPath newPaths newPath elementCount shouldGrow oldPath newPath
Adds an entry for a node s old path public void put Old Path long id I Path path put id path null  putOldPath IPath
Adds an entry for a node s old path public void put New Path long id I Path path put id null path  putNewPath IPath
The element at the given index has been removed so move elements to keep the set properly hashed protected void rehash To int an Index int target an Index int index an Index 1 if index ids length index 0 long id ids index I Path old Path old Paths index I Path new Path new Paths index while id 0 int hash Index hash For id ids length boolean match if index target match hash Index target hash Index index else match hash Index target hash Index index if match ids target id old Paths target old Path new Paths target new Path target index index if index ids length index 0 id ids index old Path old Paths index new Path new Paths index ids target 0 old Paths target null new Paths target null  rehashTo anIndex anIndex anIndex IPath oldPath oldPaths IPath newPath newPaths hashIndex hashFor hashIndex hashIndex hashIndex hashIndex oldPaths oldPath newPaths newPath oldPath oldPaths newPath newPaths oldPaths newPaths
Removes the entry from the map with the given node ID Does nothing if no such node exists in the map public void remove long id To Remove int index To Remove get Index id To Remove if index To Remove 0 return rehash To index To Remove element Count  idToRemove indexToRemove getIndex idToRemove indexToRemove rehashTo indexToRemove elementCount
private boolean should Grow return element Count ids length LOAD FACTOR  shouldGrow elementCount LOAD_FACTOR
Returns the number of elements currently stored in the map public int size return element Count  elementCount

class Notify Job extends Job private final I Workspace Runnable noop new I Workspace Runnable public void run I Progress Monitor monitor  NotifyJob IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor
public Notify Job super I Core Constants MSG RESOURCES UPDATING set System true  NotifyJob ICoreConstants MSG_RESOURCES_UPDATING setSystem
public I Status run I Progress Monitor monitor if monitor is Canceled return Status CANCEL STATUS notification Requested true try workspace run noop null I Resource NONE null catch Core Exception e return e get Status return Status OK STATUS  IStatus IProgressMonitor isCanceled CANCEL_STATUS notificationRequested IResource CoreException getStatus OK_STATUS
public Notification Manager Workspace workspace this workspace workspace listeners new Resource Change Listener List notify Job new Notify Job  NotificationManager ResourceChangeListenerList notifyJob NotifyJob
public void add Listener I Resource Change Listener listener int event Mask listeners add listener event Mask Event Stats listener Added listener  addListener IResourceChangeListener eventMask eventMask EventStats listenerAdded
Indicates the beginning of a block where periodic notifications should be avoided Returns true if notification avoidance really started and false for nested operations public boolean begin Avoid Notify return avoid Notify add Thread current Thread  beginAvoidNotify avoidNotify currentThread
Signals the beginning of the notification phase at the end of a top level operation public void begin Notify notify Job cancel notification Requested false  beginNotify notifyJob notificationRequested
The main broadcast point for notification deltas public void broadcast Changes Element Tree last State int type boolean lock Tree throws Core Exception try Do the notification if there are listeners for events of the given type if listeners has Listener For type return is Notifying true Resource Delta delta get Delta last State type if the delta is empty the root s change is undefined there is nothing to do if delta null delta get Kind 0 return long start System current Time Millis notify get Listeners new Resource Change Event workspace type delta lock Tree last Notify Duration System current Time Millis start finally Update the state regardless of whether people are listening is Notifying false clean Up last State type  broadcastChanges ElementTree lastState lockTree CoreException hasListenerFor isNotifying ResourceDelta getDelta lastState getKind currentTimeMillis getListeners ResourceChangeEvent lockTree lastNotifyDuration currentTimeMillis isNotifying cleanUp lastState
Performs cleanup at the end of a resource change notification private void clean Up Element Tree last State int type Remember the current state as the last notified state if requested Be sure to clear out the old delta boolean post Change type I Resource Change Event POST CHANGE if post Change type I Resource Change Event POST BUILD long id workspace get Marker Manager get Change Id last State immutable if post Change last Post Change Tree last State last Post Change Id id else last Post Build Tree last State last Post Build Id id workspace get Marker Manager reset Marker Deltas Math min last Post Build Id last Post Change Id last Delta null last Delta State last State  cleanUp ElementTree lastState postChange IResourceChangeEvent POST_CHANGE postChange IResourceChangeEvent POST_BUILD getMarkerManager getChangeId lastState postChange lastPostChangeTree lastState lastPostChangeId lastPostBuildTree lastState lastPostBuildId getMarkerManager resetMarkerDeltas lastPostBuildId lastPostChangeId lastDelta lastDeltaState lastState
Helper method for the save participant lifecycle computation public void broadcast Changes I Resource Change Listener listener int type I Resource Delta delta Resource Change Listener List Listener Entry entries entries new Resource Change Listener List Listener Entry new Resource Change Listener List Listener Entry listener type notify entries new Resource Change Event workspace type delta false  broadcastChanges IResourceChangeListener IResourceDelta ResourceChangeListenerList ListenerEntry ResourceChangeListenerList ListenerEntry ResourceChangeListenerList ListenerEntry ResourceChangeEvent
Indicates the end of a block where periodic notifications should be avoided public void end Avoid Notify avoid Notify remove Thread current Thread  endAvoidNotify avoidNotify currentThread
Requests that a periodic notification be scheduled public void request Notify don t do intermediate notifications if the current thread doesn t want them if is Notifying avoid Notify contains Thread current Thread return notifications must never take more than one tenth of operation time long delay Math max NOTIFICATION DELAY last Notify Duration 10 if notify Job get State Job NONE notify Job schedule delay  requestNotify isNotifying avoidNotify currentThread NOTIFICATION_DELAY lastNotifyDuration notifyJob getState notifyJob
Computes and returns the resource delta for the given event type and the given current tree state protected Resource Delta get Delta Element Tree tree int type long id workspace get Marker Manager get Change Id if we have a delta from last time and no resources have changed since then we can reuse the delta structure boolean post Change type I Resource Change Event POST CHANGE if last Delta null Element Tree has Changes tree last Delta State Resource Comparator get Comparator true true Markers may have changed since the delta was generated If so get the new marker state and insert it in to the delta which is being reused if id last Delta Id Map marker Deltas workspace get Marker Manager get Marker Deltas last Post Build Id last Delta update Markers marker Deltas else We don t have a delta or something changed so recompute the whole deal Element Tree old Tree post Change last Post Change Tree last Post Build Tree long marker Id post Change last Post Change Id last Post Build Id last Delta Resource Delta Factory compute Delta workspace old Tree tree Path ROOT marker Id 1 remember the state of the world when this delta was consistent last Delta State tree last Delta Id id return last Delta  ResourceDelta getDelta ElementTree getMarkerManager getChangeId postChange IResourceChangeEvent POST_CHANGE lastDelta ElementTree hasChanges lastDeltaState ResourceComparator getComparator lastDeltaId markerDeltas getMarkerManager getMarkerDeltas lastPostBuildId lastDelta updateMarkers markerDeltas ElementTree oldTree postChange lastPostChangeTree lastPostBuildTree markerId postChange lastPostChangeId lastPostBuildId lastDelta ResourceDeltaFactory computeDelta oldTree markerId lastDeltaState lastDeltaId lastDelta
protected Resource Change Listener List Listener Entry get Listeners return listeners get Listeners  ResourceChangeListenerList ListenerEntry getListeners getListeners
public void handle Event Lifecycle Event event switch event kind case Lifecycle Event PRE PROJECT CLOSE if listeners has Listener For I Resource Change Event PRE CLOSE return I Project project I Project event resource notify get Listeners new Resource Change Event workspace I Resource Change Event PRE CLOSE project true break case Lifecycle Event PRE PROJECT MOVE only notify deletion on move if old project handle is going away if event resource equals event new Resource return fall through case Lifecycle Event PRE PROJECT DELETE if listeners has Listener For I Resource Change Event PRE DELETE return project I Project event resource notify get Listeners new Resource Change Event workspace I Resource Change Event PRE DELETE project true break  handleEvent LifecycleEvent LifecycleEvent PRE_PROJECT_CLOSE hasListenerFor IResourceChangeEvent PRE_CLOSE IProject IProject getListeners ResourceChangeEvent IResourceChangeEvent PRE_CLOSE LifecycleEvent PRE_PROJECT_MOVE newResource LifecycleEvent PRE_PROJECT_DELETE hasListenerFor IResourceChangeEvent PRE_DELETE IProject getListeners ResourceChangeEvent IResourceChangeEvent PRE_DELETE
Event Stats start Notify listener Platform run new I Safe Runnable public void handle Exception Throwable e exception logged in Platform run  EventStats startNotify ISafeRunnable handleException
public void run throws Exception listener resource Changed event  resourceChanged
private void notify Resource Change Listener List Listener Entry resource Listeners final I Resource Change Event event final boolean lock Tree int type event get Type boolean old Lock workspace is Tree Locked if lock Tree workspace set Tree Locked true try for int i 0 i resource Listeners length i if type resource Listeners i event Mask 0 final I Resource Change Listener listener resource Listeners i listener if Policy MONITOR LISTENERS Event Stats start Notify listener Platform run new I Safe Runnable public void handle Exception Throwable e exception logged in Platform run public void run throws Exception listener resource Changed event if Policy MONITOR LISTENERS Event Stats end Notify finally if lock Tree workspace set Tree Locked old Lock  ResourceChangeListenerList ListenerEntry resourceListeners IResourceChangeEvent lockTree getType oldLock isTreeLocked lockTree setTreeLocked resourceListeners resourceListeners eventMask IResourceChangeListener resourceListeners MONITOR_LISTENERS EventStats startNotify ISafeRunnable handleException resourceChanged MONITOR_LISTENERS EventStats endNotify lockTree setTreeLocked oldLock
public void remove Listener I Resource Change Listener listener listeners remove listener Event Stats listener Removed listener  removeListener IResourceChangeListener EventStats listenerRemoved
Returns true if a notification is needed This happens if s ufficient time has elapsed since the last notification return true if a notification is needed and false otherwise public boolean should Notify return is Notifying notification Requested  shouldNotify isNotifying notificationRequested
public void shutdown I Progress Monitor monitor wipe out any existing listeners listeners new Resource Change Listener List  IProgressMonitor ResourceChangeListenerList
public void startup I Progress Monitor monitor get the current state of the workspace as the starting point and tell the workspace to track changes from there This gives the notification manager an initial basis for comparison last Post Build Tree last Post Change Tree workspace get Element Tree workspace add Lifecycle Listener this  IProgressMonitor lastPostBuildTree lastPostChangeTree getElementTree addLifecycleListener
Build delta listeners need to receive marker deltas that are accumulated over several post change notifications This method keeps the set of marker deltas for auto build deltas up to date param new Deltas the most recently computed marker deltas param change Id the generation id of this new set of marker deltas protected void update Marker Deltas Map new Deltas long change Id just return if we have already seen these changes if change Id build Marker Change Id return build Marker Change Id change Id build Marker Deltas Marker Delta merge build Marker Deltas last Delta get Delta Info get Marker Deltas  newDeltas changeId updateMarkerDeltas newDeltas changeId changeId buildMarkerChangeId buildMarkerChangeId changeId buildMarkerDeltas MarkerDelta buildMarkerDeltas lastDelta getDeltaInfo getMarkerDeltas

Constructor for this class public Path Variable Change Event I Path Variable Manager source String variable Name I Path value int type super source if type VARIABLE CHANGED type VARIABLE DELETED throw new Illegal Argument Exception Invalid event type type NON NLS 1 this variable Name variable Name this value value this type type  PathVariableChangeEvent IPathVariableManager variableName IPath VARIABLE_CHANGED VARIABLE_DELETED IllegalArgumentException variableName variableName
see org eclipse core resources I Path Variable Change Event get Value public I Path get Value return value  IPathVariableChangeEvent getValue IPath getValue
see org eclipse core resources I Path Variable Change Event get Variable Name public String get Variable Name return variable Name  IPathVariableChangeEvent getVariableName getVariableName variableName
see org eclipse core resources I Path Variable Change Event get Type public int get Type return type  IPathVariableChangeEvent getType getType
Return a string representation of this object public String to String String type Strings VARIABLE CHANGED VARIABLE CREATED VARIABLE DELETED NON NLS 1 NON NLS 2 NON NLS 3 String Buffer sb new String Buffer get Class get Name sb append variable NON NLS 1 sb append variable Name sb append type NON NLS 1 sb append type Strings type 1 if type VARIABLE DELETED sb append value NON NLS 1 sb append value sb append NON NLS 1 return sb to String  toString typeStrings VARIABLE_CHANGED VARIABLE_CREATED VARIABLE_DELETED StringBuffer StringBuffer getClass getName variableName typeStrings VARIABLE_DELETED toString

protected Resource Change Event Object source int type I Resource resource super source this resource resource this type type  ResourceChangeEvent IResource
protected Resource Change Event Object source int type I Resource Delta delta super source this delta delta this type type  ResourceChangeEvent IResourceDelta
see I Resource Change Event find Marker Deltas String boolean public I Marker Delta find Marker Deltas String type boolean include Subtypes if delta null return NO MARKER DELTAS Resource Delta Info info Resource Delta delta get Delta Info if info null return NO MARKER DELTAS Map of I Path Marker Set containing Marker Delta objects Map marker Deltas info get Marker Deltas if marker Deltas null marker Deltas size 0 return NO MARKER DELTAS Array List matching new Array List Iterator delta Sets marker Deltas values iterator while delta Sets has Next Marker Set deltas Marker Set delta Sets next I Marker Set Element elements deltas elements for int i 0 i elements length i Marker Delta delta Marker Delta elements i our inclusion test depends on whether we are considering subtypes if type null include Subtypes delta is Subtype Of type delta get Type equals type matching add delta return I Marker Delta matching to Array new I Marker Delta matching size  IResourceChangeEvent findMarkerDeltas IMarkerDelta findMarkerDeltas includeSubtypes NO_MARKER_DELTAS ResourceDeltaInfo ResourceDelta getDeltaInfo NO_MARKER_DELTAS IPath MarkerSet MarkerDelta markerDeltas getMarkerDeltas markerDeltas markerDeltas NO_MARKER_DELTAS ArrayList ArrayList deltaSets markerDeltas deltaSets hasNext MarkerSet MarkerSet deltaSets IMarkerSetElement MarkerDelta MarkerDelta includeSubtypes isSubtypeOf getType IMarkerDelta toArray IMarkerDelta
see I Resource Change Event get Delta public I Resource Delta get Delta return delta  IResourceChangeEvent getDelta IResourceDelta getDelta
see I Resource Change Event get Resource public I Resource get Resource return resource  IResourceChangeEvent getResource IResource getResource
see I Resource Change Event get Type public int get Type return type  IResourceChangeEvent getType getType
public void set Delta I Resource Delta value delta value  setDelta IResourceDelta

I Resource Change Listener listener Listener Entry I Resource Change Listener listener int event Mask this listener listener this event Mask event Mask  IResourceChangeListener ListenerEntry IResourceChangeListener eventMask eventMask eventMask
Adds the given listener to this list Has no effect if an identical listener is already registered param listener the listener param mask event types public synchronized void add I Resource Change Listener listener int mask Assert is Not Null listener if mask 0 remove listener return Resource Change Listener List Listener Entry entry new Resource Change Listener List Listener Entry listener mask final int old Size listeners length check for duplicates using identity for int i 0 i old Size i if listeners i listener listener removing listeners i event Mask adding mask listeners i entry return adding mask Thread safety copy on write to protect concurrent readers Listener Entry new Listeners new Listener Entry old Size 1 System arraycopy listeners 0 new Listeners 0 old Size new Listeners old Size entry atomic assignment this listeners new Listeners  IResourceChangeListener isNotNull ResourceChangeListenerList ListenerEntry ResourceChangeListenerList ListenerEntry oldSize oldSize eventMask ListenerEntry newListeners ListenerEntry oldSize newListeners oldSize newListeners oldSize newListeners
private void adding int mask if mask 1 0 count1 if mask 2 0 count2 if mask 4 0 count4 if mask 8 0 count8 if mask 16 0 count16 
Returns an array containing all the registered listeners The resulting array is unaffected by subsequent adds or removes If there are no listeners registered the result is an empty array singleton instance no garbage is created Use this method when notifying listeners so that any modifications to the listener list during the notification will have no effect on the notification itself p Note Clients must not modify the returned list return the list of registered listeners that must not be modified public Listener Entry get Listeners return listeners  ListenerEntry getListeners
public boolean has Listener For int event if event 1 return count1 0 if event 2 return count2 0 if event 4 return count4 0 if event 8 return count8 0 if event 16 return count16 0 return false  hasListenerFor
Removes the given listener from this list Has no effect if an identical listener was not already registered param listener the listener to remove public synchronized void remove I Resource Change Listener listener Assert is Not Null listener final int old Size listeners length for int i 0 i old Size i if listeners i listener listener removing listeners i event Mask if old Size 1 listeners EMPTY ARRAY else Thread safety create new array to avoid affecting concurrent readers Listener Entry new Listeners new Listener Entry old Size 1 System arraycopy listeners 0 new Listeners 0 i System arraycopy listeners i 1 new Listeners i old Size i 1 atomic assignment to field this listeners new Listeners return  IResourceChangeListener isNotNull oldSize oldSize eventMask oldSize EMPTY_ARRAY ListenerEntry newListeners ListenerEntry oldSize newListeners newListeners oldSize newListeners
private void removing int mask if mask 1 0 count1 if mask 2 0 count2 if mask 4 0 count4 if mask 8 0 count8 if mask 16 0 count16 

Create a comparator which compares resource infos If include Marker Deltas is true check for marker deltas private Resource Comparator boolean notification this notification notification  includeMarkerDeltas ResourceComparator
Compare the Element Infos for two resources public int compare Object o1 Object o2 handles null null if o1 o2 return I Resource Delta NO CHANGE int result 0 if o1 null return Resource Info o2 is Set M PHANTOM I Resource Delta ADDED PHANTOM I Resource Delta ADDED if o2 null return Resource Info o1 is Set M PHANTOM I Resource Delta REMOVED PHANTOM I Resource Delta REMOVED if o1 instanceof Resource Info o2 instanceof Resource Info return I Resource Delta NO CHANGE Resource Info old Element Resource Info o1 Resource Info new Element Resource Info o2 if old Element is Set M PHANTOM new Element is Set M PHANTOM return I Resource Delta REMOVED if old Element is Set M PHANTOM new Element is Set M PHANTOM return I Resource Delta ADDED if compare Open old Element new Element result I Resource Delta OPEN if compare Contents old Element new Element if old Element get Type I Resource PROJECT result I Resource Delta DESCRIPTION else result I Resource Delta CONTENT if compare Type old Element new Element result I Resource Delta TYPE if compare NodeI Ds old Element new Element result I Resource Delta REPLACED if the node was replaced and the old and new were files this is also a content change if old Element get Type I Resource FILE new Element get Type I Resource FILE result I Resource Delta CONTENT if notification compare Sync old Element new Element result I Resource Delta SYNC if notification compare Markers old Element new Element result I Resource Delta MARKERS return result 0 0 result I Resource Delta CHANGED  ElementInfos IResourceDelta NO_CHANGE ResourceInfo isSet M_PHANTOM IResourceDelta ADDED_PHANTOM IResourceDelta ResourceInfo isSet M_PHANTOM IResourceDelta REMOVED_PHANTOM IResourceDelta ResourceInfo ResourceInfo IResourceDelta NO_CHANGE ResourceInfo oldElement ResourceInfo ResourceInfo newElement ResourceInfo oldElement isSet M_PHANTOM newElement isSet M_PHANTOM IResourceDelta oldElement isSet M_PHANTOM newElement isSet M_PHANTOM IResourceDelta compareOpen oldElement newElement IResourceDelta compareContents oldElement newElement oldElement getType IResource IResourceDelta IResourceDelta compareType oldElement newElement IResourceDelta compareNodeIDs oldElement newElement IResourceDelta oldElement getType IResource newElement getType IResource IResourceDelta compareSync oldElement newElement IResourceDelta compareMarkers oldElement newElement IResourceDelta IResourceDelta
Compares the contents of the Resource Info private boolean compare Contents Resource Info old Element Resource Info new Element return old Element get Content Id new Element get Content Id  ResourceInfo compareContents ResourceInfo oldElement ResourceInfo newElement oldElement getContentId newElement getContentId
private boolean compare Markers Resource Info old Element Resource Info new Element If both sets of markers are null then prehaps we added some markers but then deleted them right away before notification In that case don t signify a marker change in the delta boolean both Null old Element get Markers false null new Element get Markers false null return both Null old Element get Marker Generation Count new Element get Marker Generation Count  compareMarkers ResourceInfo oldElement ResourceInfo newElement bothNull oldElement getMarkers newElement getMarkers bothNull oldElement getMarkerGenerationCount newElement getMarkerGenerationCount
Compares the node I Ds of the Element Infos for two resources private boolean compare NodeI Ds Resource Info old Element Resource Info new Element return old Element get Node Id new Element get Node Id  IDs ElementInfos compareNodeIDs ResourceInfo oldElement ResourceInfo newElement oldElement getNodeId newElement getNodeId
Compares the open state of the Element Infos for two resources private boolean compare Open Resource Info old Element Resource Info new Element return old Element is Set M OPEN new Element is Set M OPEN  ElementInfos compareOpen ResourceInfo oldElement ResourceInfo newElement oldElement isSet M_OPEN newElement isSet M_OPEN
private boolean compare Sync Resource Info old Element Resource Info new Element return old Element get Sync Info Generation Count new Element get Sync Info Generation Count  compareSync ResourceInfo oldElement ResourceInfo newElement oldElement getSyncInfoGenerationCount newElement getSyncInfoGenerationCount
Compares the type of the Resource Info private boolean compare Type Resource Info old Element Resource Info new Element return old Element get Type new Element get Type  ResourceInfo compareType ResourceInfo oldElement ResourceInfo newElement oldElement getType newElement getType
Returns a comparator which compares resource infos Does not check for marker deltas public static Resource Comparator get Comparator return get Comparator false  ResourceComparator getComparator getComparator
Returns a comparator which compares resource infos If include Marker Deltas is true check for marker deltas public static Resource Comparator get Comparator boolean include Marker Deltas if include Marker Deltas if marker Singleton null marker Singleton new Resource Comparator include Marker Deltas return marker Singleton if no Marker Singleton null no Marker Singleton new Resource Comparator include Marker Deltas return no Marker Singleton  includeMarkerDeltas ResourceComparator getComparator includeMarkerDeltas includeMarkerDeltas markerSingleton markerSingleton ResourceComparator includeMarkerDeltas markerSingleton noMarkerSingleton noMarkerSingleton ResourceComparator includeMarkerDeltas noMarkerSingleton

private static I Marker Delta EMPTY MARKER DELTAS new I Marker Delta 0 protected Resource Delta I Path path Resource Delta Info delta Info this path path this delta Info delta Info  IMarkerDelta EMPTY_MARKER_DELTAS IMarkerDelta ResourceDelta IPath ResourceDeltaInfo deltaInfo deltaInfo deltaInfo
see I Resource Delta accept I Resource Delta Visitor public void accept I Resource Delta Visitor visitor throws Core Exception accept visitor 0  IResourceDelta IResourceDeltaVisitor IResourceDeltaVisitor CoreException
see I Resource Delta accept I Resource Delta Visitor boolean public void accept I Resource Delta Visitor visitor boolean include Phantoms throws Core Exception accept visitor include Phantoms I Container INCLUDE PHANTOMS 0  IResourceDelta IResourceDeltaVisitor IResourceDeltaVisitor includePhantoms CoreException includePhantoms IContainer INCLUDE_PHANTOMS
public void accept I Resource Delta Visitor visitor int member Flags throws Core Exception final boolean include Phantoms member Flags I Container INCLUDE PHANTOMS 0 final boolean include Team Private member Flags I Container INCLUDE TEAM PRIVATE MEMBERS 0 int mask include Phantoms ALL WITH PHANTOMS REMOVED ADDED CHANGED if get Kind mask 0 return if visitor visit this return for int i 0 i children length i Resource Delta child Delta children i quietly exclude team private and phantom members unless explicitly included if include Team Private child Delta is Team Private continue if include Phantoms child Delta is Phantom continue child Delta accept visitor member Flags  IResourceDeltaVisitor memberFlags CoreException includePhantoms memberFlags IContainer INCLUDE_PHANTOMS includeTeamPrivate memberFlags IContainer INCLUDE_TEAM_PRIVATE_MEMBERS includePhantoms ALL_WITH_PHANTOMS getKind ResourceDelta childDelta includeTeamPrivate childDelta isTeamPrivate includePhantoms childDelta isPhantom childDelta memberFlags
Check for marker deltas and set the appropriate change flag if there are any protected void check For Marker Deltas if delta Info get Marker Deltas null return int kind get Kind Only need to check for added and removed or for changes on the workspace For changed the bit is set in the comparator if path is Root kind ADDED kind REMOVED Marker Set changes Marker Set delta Info get Marker Deltas get path if changes null changes size 0 status MARKERS If there have been marker changes then ensure kind is CHANGED if not ADDED or REMOVED See 1FV9K20 ITPUI WINNT severe task list add or delete not working if kind 0 status CHANGED  checkForMarkerDeltas deltaInfo getMarkerDeltas getKind isRoot MarkerSet MarkerSet deltaInfo getMarkerDeltas
see I Resource Delta find Member I Path public I Resource Delta find Member I Path path int segment Count path segment Count if segment Count 0 return this iterate over the path and find matching child delta Resource Delta current this segments for int i 0 i segment Count i I Resource Delta current Children current children for int j 0 jmax current Children length j jmax j if current Children j get Full Path last Segment equals path segment i current Resource Delta current Children j continue segments matching child not found return return null return current  IResourceDelta findMember IPath IResourceDelta findMember IPath segmentCount segmentCount segmentCount ResourceDelta segmentCount IResourceDelta currentChildren currentChildren currentChildren getFullPath lastSegment ResourceDelta currentChildren
Delta information on moves and on marker deltas can only be computed after the delta has been built This method fixes up the delta to accurately reflect moves setting MOVED FROM and MOVED TO and marker changes on added and removed resources protected void fix Moves And Markers Element Tree old Tree NodeID Map nodeID Map delta Info get NodeID Map if path is Root nodeID Map is Empty int kind get Kind switch kind case CHANGED case ADDED I Path old Path nodeID Map get Old Path new Info get Node Id if old Path null old Path equals path get the old info from the old tree Resource Info actual Old Info Resource Info old Tree get Element Data old Path Replace change flags by comparing old info with new info Note that we want to retain the kind flag but replace all other flags This is done only for MOVED FROM not MOVED TO since a resource may be both status status KIND MASK delta Info get Comparator compare actual Old Info new Info KIND MASK status MOVED FROM our API states that MOVED FROM must be in conjunction with ADDED CHANGED REPLACED if kind CHANGED status status REPLACED CONTENT check for gender change if old Info null new Info null old Info get Type new Info get Type status TYPE switch kind case REMOVED case CHANGED I Path new Path nodeID Map get New Path old Info get Node Id if new Path null new Path equals path status MOVED TO our API states that MOVED TO must be in conjunction with REMOVED CHANGED REPLACED if kind CHANGED status status REPLACED CONTENT check for marker deltas this is affected by move computation so must happen afterwards check For Marker Deltas recurse on children for int i 0 i children length i children i fix Moves And Markers old Tree  MOVED_FROM MOVED_TO fixMovesAndMarkers ElementTree oldTree NodeIDMap nodeIDMap deltaInfo getNodeIDMap isRoot nodeIDMap isEmpty getKind IPath oldPath nodeIDMap getOldPath newInfo getNodeId oldPath oldPath ResourceInfo actualOldInfo ResourceInfo oldTree getElementData oldPath MOVED_FROM MOVED_TO KIND_MASK deltaInfo getComparator actualOldInfo newInfo KIND_MASK MOVED_FROM MOVED_FROM oldInfo newInfo oldInfo getType newInfo getType IPath newPath nodeIDMap getNewPath oldInfo getNodeId newPath newPath MOVED_TO MOVED_TO checkForMarkerDeltas fixMovesAndMarkers oldTree
see I Resource Delta get Affected Children public I Resource Delta get Affected Children return get Affected Children ADDED REMOVED CHANGED I Resource NONE  IResourceDelta getAffectedChildren IResourceDelta getAffectedChildren getAffectedChildren IResource
see I Resource Delta get Affected Children int public I Resource Delta get Affected Children int kind Mask return get Affected Children kind Mask I Resource NONE  IResourceDelta getAffectedChildren IResourceDelta getAffectedChildren kindMask getAffectedChildren kindMask IResource
public I Resource Delta get Affected Children int kind Mask int member Flags int num Children children length if there are no children they all match if num Children 0 return children boolean include Phantoms member Flags I Container INCLUDE PHANTOMS 0 boolean include Team Private member Flags I Container INCLUDE TEAM PRIVATE MEMBERS 0 reduce INCLUDE PHANTOMS member flag to kind mask if include Phantoms kind Mask ADDED PHANTOM REMOVED PHANTOM first count the number of matches so we can allocate the exact array size int matching 0 for int i 0 i num Children i if children i get Kind kind Mask 0 continue child has wrong kind if include Phantoms children i is Phantom continue if include Team Private children i is Team Private continue child has is a team private member which are not included matching use arraycopy if all match if matching num Children I Resource Delta result new I Resource Delta children length System arraycopy children 0 result 0 children length return result create the appropriate sized array and fill it I Resource Delta result new I Resource Delta matching int next Position 0 for int i 0 i num Children i if children i get Kind kind Mask 0 continue child has wrong kind if include Phantoms children i is Phantom continue if include Team Private children i is Team Private continue child has is a team private member which are not included result next Position children i return result  IResourceDelta getAffectedChildren kindMask memberFlags numChildren numChildren includePhantoms memberFlags IContainer INCLUDE_PHANTOMS includeTeamPrivate memberFlags IContainer INCLUDE_TEAM_PRIVATE_MEMBERS INCLUDE_PHANTOMS includePhantoms kindMask ADDED_PHANTOM REMOVED_PHANTOM numChildren getKind kindMask includePhantoms isPhantom includeTeamPrivate isTeamPrivate numChildren IResourceDelta IResourceDelta IResourceDelta IResourceDelta nextPosition numChildren getKind kindMask includePhantoms isPhantom includeTeamPrivate isTeamPrivate nextPosition
protected Resource Delta Info get Delta Info return delta Info  ResourceDeltaInfo getDeltaInfo deltaInfo
see I Resource Delta get Flags public int get Flags return status KIND MASK  IResourceDelta getFlags getFlags KIND_MASK
see I Resource Delta get Full Path public I Path get Full Path return path  IResourceDelta getFullPath IPath getFullPath
see I Resource Delta get Kind public int get Kind return status KIND MASK  IResourceDelta getKind getKind KIND_MASK
see I Resource Delta get Marker Deltas public I Marker Delta get Marker Deltas Map marker Deltas delta Info get Marker Deltas if marker Deltas null return EMPTY MARKER DELTAS if path null path Path ROOT Marker Set changes Marker Set marker Deltas get path if changes null return EMPTY MARKER DELTAS I Marker Set Element elements changes elements I Marker Delta result new I Marker Delta elements length for int i 0 i elements length i result i I Marker Delta elements i return result  IResourceDelta getMarkerDeltas IMarkerDelta getMarkerDeltas markerDeltas deltaInfo getMarkerDeltas markerDeltas EMPTY_MARKER_DELTAS MarkerSet MarkerSet markerDeltas EMPTY_MARKER_DELTAS IMarkerSetElement IMarkerDelta IMarkerDelta IMarkerDelta
see I Resource Delta get Moved From Path public I Path get Moved From Path if status MOVED FROM 0 return delta Info get NodeID Map get Old Path new Info get Node Id return null  IResourceDelta getMovedFromPath IPath getMovedFromPath MOVED_FROM deltaInfo getNodeIDMap getOldPath newInfo getNodeId
see I Resource Delta get Moved To Path public I Path get Moved To Path if status MOVED TO 0 return delta Info get NodeID Map get New Path old Info get Node Id return null  IResourceDelta getMovedToPath IPath getMovedToPath MOVED_TO deltaInfo getNodeIDMap getNewPath oldInfo getNodeId
see I Resource Delta get Project Relative Path public I Path get Project Relative Path I Path full get Full Path int count full segment Count if count 0 return null if count 1 0 or 1 return Path EMPTY return full remove First Segments 1  IResourceDelta getProjectRelativePath IPath getProjectRelativePath IPath getFullPath segmentCount removeFirstSegments
see I Resource Delta get Resource public I Resource get Resource return a cached copy if we have one if cached Resource null return cached Resource if this is a delta for the root then return the root resource if path segment Count 0 return delta Info get Workspace get Root if the delta is a remove then we have to look for the old info to find the type of resource to create Resource Info info null if get Kind REMOVED REMOVED PHANTOM 0 info old Info else info new Info if info null Assert is Not Null null Do not have resource info for resource in delta path NON NLS 1 cached Resource delta Info get Workspace new Resource path info get Type return cached Resource  IResourceDelta getResource IResource getResource cachedResource cachedResource segmentCount deltaInfo getWorkspace getRoot ResourceInfo getKind REMOVED_PHANTOM oldInfo newInfo isNotNull cachedResource deltaInfo getWorkspace newResource getType cachedResource
public boolean has Affected Children return children length 0  hasAffectedChildren
Returns true if this delta represents a phantom member and false otherwise protected boolean is Phantom use old info for removals and new info for added or changed if status REMOVED REMOVED PHANTOM 0 return Resource Info is Set old Info get Flags I Core Constants M PHANTOM return Resource Info is Set new Info get Flags I Core Constants M PHANTOM  isPhantom REMOVED_PHANTOM ResourceInfo isSet oldInfo getFlags ICoreConstants M_PHANTOM ResourceInfo isSet newInfo getFlags ICoreConstants M_PHANTOM
Returns true if this delta represents a team private member and false otherwise protected boolean is Team Private use old info for removals and new info for added or changed if status REMOVED REMOVED PHANTOM 0 return Resource Info is Set old Info get Flags I Core Constants M TEAM PRIVATE MEMBER return Resource Info is Set new Info get Flags I Core Constants M TEAM PRIVATE MEMBER  isTeamPrivate REMOVED_PHANTOM ResourceInfo isSet oldInfo getFlags ICoreConstants M_TEAM_PRIVATE_MEMBER ResourceInfo isSet newInfo getFlags ICoreConstants M_TEAM_PRIVATE_MEMBER
protected void set Children Resource Delta children this children children  setChildren ResourceDelta
protected void set New Info Resource Info new Info this new Info new Info  setNewInfo ResourceInfo newInfo newInfo newInfo
protected void set Old Info Resource Info old Info this old Info old Info  setOldInfo ResourceInfo oldInfo oldInfo oldInfo
protected void set Status int status this status status  setStatus
Returns a string representation of this delta s immediate structure suitable for debug purposes public String to Debug String final String Buffer buffer new String Buffer write Debug String buffer return buffer to String  toDebugString StringBuffer StringBuffer writeDebugString toString
Returns a string representation of this delta s deep structure suitable for debug purposes public String to Deep Debug String final String Buffer buffer new String Buffer n NON NLS 1 write Debug String buffer for int i 0 i children length i buffer append children i to Deep Debug String return buffer to String  toDeepDebugString StringBuffer StringBuffer writeDebugString toDeepDebugString toString
For debugging only public String to String return Resource Delta path NON NLS 1 NON NLS 2  toString ResourceDelta
Provides a new set of markers for the delta This is used when the delta is reused in cases where the only changes are marker changes public void update Markers Map markers delta Info set Marker Deltas markers  updateMarkers deltaInfo setMarkerDeltas
Writes a string representation of this delta s immediate structure on the given string buffer public void write Debug String String Buffer buffer buffer append get Full Path buffer append switch get Kind case ADDED buffer append break case ADDED PHANTOM buffer append break case REMOVED buffer append break case REMOVED PHANTOM buffer append break case CHANGED buffer append break case NO CHANGE buffer append break default buffer append break buffer append NON NLS 1 int change Flags get Flags boolean prev false if change Flags CONTENT 0 if prev buffer append NON NLS 1 buffer append CONTENT NON NLS 1 prev true if change Flags MOVED FROM 0 if prev buffer append NON NLS 1 buffer append MOVED FROM get Moved From Path NON NLS 1 NON NLS 2 prev true if change Flags MOVED TO 0 if prev buffer append NON NLS 1 buffer append MOVED TO get Moved To Path NON NLS 1 NON NLS 2 prev true if change Flags OPEN 0 if prev buffer append NON NLS 1 buffer append OPEN NON NLS 1 prev true if change Flags TYPE 0 if prev buffer append NON NLS 1 buffer append TYPE NON NLS 1 prev true if change Flags SYNC 0 if prev buffer append NON NLS 1 buffer append SYNC NON NLS 1 prev true if change Flags MARKERS 0 if prev buffer append NON NLS 1 buffer append MARKERS NON NLS 1 write Marker Debug String buffer prev true if change Flags REPLACED 0 if prev buffer append NON NLS 1 buffer append REPLACED NON NLS 1 prev true if change Flags DESCRIPTION 0 if prev buffer append NON NLS 1 buffer append DESCRIPTION NON NLS 1 prev true buffer append NON NLS 1 if is Team Private buffer append team private NON NLS 1  writeDebugString StringBuffer getFullPath getKind ADDED_PHANTOM REMOVED_PHANTOM NO_CHANGE changeFlags getFlags changeFlags changeFlags MOVED_FROM MOVED_FROM getMovedFromPath changeFlags MOVED_TO MOVED_TO getMovedToPath changeFlags changeFlags changeFlags changeFlags writeMarkerDebugString changeFlags changeFlags isTeamPrivate
public void write Marker Debug String String Buffer buffer buffer append for Iterator e delta Info get Marker Deltas key Set iterator e has Next I Path key I Path e next if get Resource get Full Path equals key I Marker Set Element deltas Marker Set delta Info get Marker Deltas get key elements boolean add Comma false for int i 0 i deltas length i I Marker Delta delta I Marker Delta deltas i if add Comma buffer append switch delta get Kind case I Resource Delta ADDED buffer append break case I Resource Delta REMOVED buffer append break case I Resource Delta CHANGED buffer append break buffer append delta get Id add Comma true buffer append  writeMarkerDebugString StringBuffer deltaInfo getMarkerDeltas keySet hasNext IPath IPath getResource getFullPath IMarkerSetElement MarkerSet deltaInfo getMarkerDeltas addComma IMarkerDelta IMarkerDelta addComma getKind IResourceDelta IResourceDelta IResourceDelta getId addComma

Returns the resource delta representing the changes made between the given old and new trees starting from the given root element param marker Generation the start generation for which deltas should be computed or 1 if marker deltas should not be provided public static Resource Delta compute Delta Workspace workspace Element Tree old Tree Element Tree new Tree I Path root long marker Generation compute the underlying delta tree Resource Comparator comparator Resource Comparator get Comparator marker Generation 0 new Tree immutable Delta Data Tree delta null if Path ROOT equals root delta new Tree get Data Tree compare With old Tree get Data Tree comparator else delta new Tree get Data Tree compare With old Tree get Data Tree comparator root delta delta as Reverse Comparison Tree comparator I Path path In Tree root is Root Path ROOT root I Path path In Delta Path ROOT get the marker deltas for the delta info object if needed Map all Marker Deltas null if marker Generation 0 all Marker Deltas workspace get Marker Manager get Marker Deltas marker Generation recursively walk the delta and create a tree of Resource Delta objects Resource Delta Info delta Info new Resource Delta Info workspace all Marker Deltas comparator Resource Delta result create Delta workspace delta delta Info path In Tree path In Delta compute node ID map and fix up moves delta Info set NodeID Map compute NodeID Map result new NodeID Map result fix Moves And Markers old Tree check all the projects and if they were added and opened then tweek the flags so the delta reports both int segment Count result get Full Path segment Count if segment Count 1 check For Open result segment Count return result  markerGeneration ResourceDelta computeDelta ElementTree oldTree ElementTree newTree IPath markerGeneration ResourceComparator ResourceComparator getComparator markerGeneration newTree DeltaDataTree newTree getDataTree compareWith oldTree getDataTree newTree getDataTree compareWith oldTree getDataTree asReverseComparisonTree IPath pathInTree isRoot IPath pathInDelta allMarkerDeltas markerGeneration allMarkerDeltas getMarkerManager getMarkerDeltas markerGeneration ResourceDelta ResourceDeltaInfo deltaInfo ResourceDeltaInfo allMarkerDeltas ResourceDelta createDelta deltaInfo pathInTree pathInDelta deltaInfo setNodeIDMap computeNodeIDMap NodeIDMap fixMovesAndMarkers oldTree segmentCount getFullPath segmentCount segmentCount checkForOpen segmentCount
Checks to see if added projects were also opens and tweaks the flags accordingly Should only be called for root and projects Pass the segment count in since we ve already calculated it before protected static void check For Open Resource Delta delta int segment Count if delta get Kind I Resource Delta ADDED if delta new Info is Set I Core Constants M OPEN delta status I Resource Delta OPEN return for PROJECT if segment Count 1 return recurse for ROOT I Resource Delta children delta children for int i 0 i children length i check For Open Resource Delta children i 1  checkForOpen ResourceDelta segmentCount getKind IResourceDelta newInfo isSet ICoreConstants M_OPEN IResourceDelta segmentCount IResourceDelta checkForOpen ResourceDelta
Creates the map from node id to element id for the old and new states Used for recognizing moves Returns the map protected static NodeID Map compute NodeID Map Resource Delta delta NodeID Map nodeID Map I Resource Delta children delta children for int i 0 i children length i Resource Delta child Resource Delta children i I Path path child get Full Path switch child get Kind case I Resource Delta ADDED nodeID Map put New Path child new Info get Node Id path break case I Resource Delta REMOVED nodeID Map put Old Path child old Info get Node Id path break case I Resource Delta CHANGED long oldID child old Info get Node Id long newID child new Info get Node Id don t add entries to the map if nothing has changed if oldID newID nodeID Map put Old Path oldID path nodeID Map put New Path newID path break recurse compute NodeID Map child nodeID Map return nodeID Map  NodeIDMap computeNodeIDMap ResourceDelta NodeIDMap nodeIDMap IResourceDelta ResourceDelta ResourceDelta IPath getFullPath getKind IResourceDelta nodeIDMap putNewPath newInfo getNodeId IResourceDelta nodeIDMap putOldPath oldInfo getNodeId IResourceDelta oldInfo getNodeId newInfo getNodeId nodeIDMap putOldPath nodeIDMap putNewPath computeNodeIDMap nodeIDMap nodeIDMap
Recursively creates the tree of Resource Delta objects rooted at the given path protected static Resource Delta create Delta Workspace workspace Delta Data Tree delta Resource Delta Info delta Info I Path path In Tree I Path path In Delta create the delta and fill it with information Resource Delta result new Resource Delta path In Tree delta Info fill the result with information Node Comparison compare Node Comparison delta get Data path In Delta int comparison compare get User Comparison result set Status comparison if comparison I Resource Delta NO CHANGE Path ROOT equals path In Tree Resource Info info workspace get Resource Info path In Tree true false result set Old Info info result set New Info info else result set Old Info Resource Info compare get Old Data result set New Info Resource Info compare get New Data recurse over the children I Path child Keys delta get Children path In Delta int num Children child Keys length if num Children 0 result set Children NO CHILDREN else Resource Delta children new Resource Delta num Children for int i 0 i num Children i reuse the delta path if tree relative and delta relative are the same I Path new Tree Path path In Tree path In Delta child Keys i path In Tree append child Keys i last Segment children i create Delta workspace delta delta Info new Tree Path child Keys i result set Children children if this delta has children but no other changes mark it as changed int status result status if status I Resource Delta ALL WITH PHANTOMS 0 num Children 0 result set Status status I Resource Delta CHANGED return the delta return result  ResourceDelta ResourceDelta createDelta DeltaDataTree ResourceDeltaInfo deltaInfo IPath pathInTree IPath pathInDelta ResourceDelta ResourceDelta pathInTree deltaInfo NodeComparison NodeComparison getData pathInDelta getUserComparison setStatus IResourceDelta NO_CHANGE pathInTree ResourceInfo getResourceInfo pathInTree setOldInfo setNewInfo setOldInfo ResourceInfo getOldData setNewInfo ResourceInfo getNewData IPath childKeys getChildren pathInDelta numChildren childKeys numChildren setChildren NO_CHILDREN ResourceDelta ResourceDelta numChildren numChildren IPath newTreePath pathInTree pathInDelta childKeys pathInTree childKeys lastSegment createDelta deltaInfo newTreePath childKeys setChildren IResourceDelta ALL_WITH_PHANTOMS numChildren setStatus IResourceDelta
Returns an empty build delta describing the fact that no changes occurred in the given project The returned delta is not appropriate for use as a notification delta because it is rooted at a project and does not contain marker deltas public static I Resource Delta new Empty Delta I Project project Resource Delta result new Resource Delta project get Full Path new Resource Delta Info Workspace project get Workspace null Resource Comparator get Comparator false result set Status 0 result set Children NO CHILDREN Resource Info info Project project get Resource Info true false result set Old Info info result set New Info info return result  IResourceDelta newEmptyDelta IProject ResourceDelta ResourceDelta getFullPath ResourceDeltaInfo getWorkspace ResourceComparator getComparator setStatus setChildren NO_CHILDREN ResourceInfo getResourceInfo setOldInfo setNewInfo

public Resource Delta Info Workspace workspace Map marker Deltas Resource Comparator comparator super this workspace workspace this all Marker Deltas marker Deltas this comparator comparator  ResourceDeltaInfo markerDeltas ResourceComparator allMarkerDeltas markerDeltas
public void destroy workspace null all Marker Deltas null comparator null  allMarkerDeltas
public Resource Comparator get Comparator return comparator  ResourceComparator getComparator
Table of all marker deltas I Path Marker Set public Map get Marker Deltas return all Marker Deltas  IPath MarkerSet getMarkerDeltas allMarkerDeltas
public NodeID Map get NodeID Map return nodeID Map  NodeIDMap getNodeIDMap nodeIDMap
public Workspace get Workspace return workspace  getWorkspace
public void set Marker Deltas Map value all Marker Deltas value  setMarkerDeltas allMarkerDeltas
public void set NodeID Map NodeID Map map nodeID Map map  setNodeIDMap NodeIDMap nodeIDMap

private String f Type Name public Adapt Expression I Configuration Element config Element throws Core Exception f Type Name config Element get Attribute ATT TYPE Expressions check Attribute ATT TYPE f Type Name  fTypeName AdaptExpression IConfigurationElement configElement CoreException fTypeName configElement getAttribute ATT_TYPE checkAttribute ATT_TYPE fTypeName
public Adapt Expression String type Name Assert is Not Null type Name f Type Name type Name  AdaptExpression typeName isNotNull typeName fTypeName typeName
public Evaluation Result evaluate I Evaluation Context context throws Core Exception if f Type Name null return Evaluation Result FALSE Object var context get Default Variable Object adapted null if Expressions is Instance Of var f Type Name adapted var else I Adapter Manager manager Platform get Adapter Manager if manager has Adapter var f Type Name return Evaluation Result FALSE adapted manager get Adapter var f Type Name the adapted result is null but has Adapter returned true This means that there is an adapter but the adapter isn t loaded yet if adapted null return Evaluation Result NOT LOADED return evaluate And new Default Variable context adapted  EvaluationResult IEvaluationContext CoreException fTypeName EvaluationResult getDefaultVariable isInstanceOf fTypeName IAdapterManager getAdapterManager hasAdapter fTypeName EvaluationResult getAdapter fTypeName hasAdapter EvaluationResult NOT_LOADED evaluateAnd DefaultVariable

public class And Expression extends Composite Expression public Evaluation Result evaluate I Evaluation Context context throws Core Exception return evaluate And context  AndExpression CompositeExpression EvaluationResult IEvaluationContext CoreException evaluateAnd

This class is not intended to be instantiated private Assert not allowed 
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression return is Legal expression NON NLS 1  IllegalArgumentException IllegalArgumentException isLegal isLegal
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression String message if expression throw new Illegal Argument Exception message return expression  IllegalArgumentException IllegalArgumentException isLegal IllegalArgumentException
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown param object the value to test exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object is Not Null object NON NLS 1  IllegalArgumentException isNotNull isNotNull
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param object the value to test param message the message to include in the exception exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object String message if object null throw new Assertion Failed Exception null argument message NON NLS 1  IllegalArgumentException isNotNull AssertionFailedException
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails public static boolean is True boolean expression return is True expression NON NLS 1  isTrue isTrue
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails public static boolean is True boolean expression String message if expression throw new Assertion Failed Exception assertion failed message NON NLS 1 return expression  isTrue AssertionFailedException

class Assertion Failed Exception extends Runtime Exception Constructs a new exception public Assertion Failed Exception super  AssertionFailedException RuntimeException AssertionFailedException
Constructs a new exception with the given message param detail the detail message public Assertion Failed Exception String detail super detail  AssertionFailedException

protected List f Expressions public Composite Expression  fExpressions CompositeExpression
public void add Expression expression if f Expressions null f Expressions new Array List 2 f Expressions add expression  fExpressions fExpressions ArrayList fExpressions
public Expression get Children if f Expressions null return EMPTY ARRAY return Expression f Expressions to Array new Expression f Expressions size  getChildren fExpressions EMPTY_ARRAY fExpressions toArray fExpressions
protected Evaluation Result evaluate And I Evaluation Context scope throws Core Exception if f Expressions null return Evaluation Result TRUE Evaluation Result result Evaluation Result TRUE for Iterator iter f Expressions iterator iter has Next Expression expression Expression iter next result result and expression evaluate scope keep iterating even if we have a not loaded found It can be that we find a false which will result in a better result if result Evaluation Result FALSE return result return result  EvaluationResult evaluateAnd IEvaluationContext CoreException fExpressions EvaluationResult EvaluationResult EvaluationResult fExpressions hasNext EvaluationResult
protected Evaluation Result evaluate Or I Evaluation Context scope throws Core Exception if f Expressions null return Evaluation Result TRUE Evaluation Result result Evaluation Result FALSE for Iterator iter f Expressions iterator iter has Next Expression expression Expression iter next result result or expression evaluate scope if result Evaluation Result TRUE return result return result  EvaluationResult evaluateOr IEvaluationContext CoreException fExpressions EvaluationResult EvaluationResult EvaluationResult fExpressions hasNext EvaluationResult

private int f Size public Count Expression I Configuration Element config Element String size config Element get Attribute ATT VALUE initialize Size size  fSize CountExpression IConfigurationElement configElement configElement getAttribute ATT_VALUE initializeSize
public Count Expression String size initialize Size size  CountExpression initializeSize
private void initialize Size String size if size null size NON NLS 1 if size equals NON NLS 1 f Mode ANY NUMBER else if size equals NON NLS 1 f Mode NONE OR ONE else if size equals NON NLS 1 f Mode NONE else if size equals NON NLS 1 f Mode ONE OR MORE else try f Size Integer parse Int size f Mode EXACT catch Number Format Exception e f Mode UNKNOWN  initializeSize fMode ANY_NUMBER fMode NONE_OR_ONE fMode fMode ONE_OR_MORE fSize parseInt fMode NumberFormatException fMode
public Evaluation Result evaluate I Evaluation Context context throws Core Exception Object var context get Default Variable Expressions check Collection var this Collection collection Collection var int size collection size switch f Mode case UNKNOWN return Evaluation Result FALSE case NONE return Evaluation Result value Of size 0 case NONE OR ONE return Evaluation Result value Of size 0 size 1 case ONE OR MORE return Evaluation Result value Of size 1 case EXACT return Evaluation Result value Of f Size size case ANY NUMBER return Evaluation Result TRUE return Evaluation Result FALSE  EvaluationResult IEvaluationContext CoreException getDefaultVariable checkCollection fMode EvaluationResult EvaluationResult valueOf NONE_OR_ONE EvaluationResult valueOf ONE_OR_MORE EvaluationResult valueOf EvaluationResult valueOf fSize ANY_NUMBER EvaluationResult EvaluationResult

Constructs a new variable pool for a single default variable param parent the parent context for the default variable Must not be code null code param default Variable the default variable public Default Variable I Evaluation Context parent Object default Variable Assert is Not Null parent Assert is Not Null default Variable f Parent parent while parent instanceof Default Variable parent parent get Parent f Managed Pool parent f Default Variable default Variable  defaultVariable DefaultVariable IEvaluationContext defaultVariable isNotNull isNotNull defaultVariable fParent DefaultVariable getParent fManagedPool fDefaultVariable defaultVariable
inherit Doc public I Evaluation Context get Parent return f Parent  inheritDoc IEvaluationContext getParent fParent
inherit Doc public I Evaluation Context get Root return f Parent get Root  inheritDoc IEvaluationContext getRoot fParent getRoot
inherit Doc public Object get Default Variable return f Default Variable  inheritDoc getDefaultVariable fDefaultVariable
inherit Doc public void add Variable String name Object value f Managed Pool add Variable name value  inheritDoc addVariable fManagedPool addVariable
inherit Doc public Object remove Variable String name return f Managed Pool remove Variable name  inheritDoc removeVariable fManagedPool removeVariable
inherit Doc public Object get Variable String name return f Managed Pool get Variable name  inheritDoc getVariable fManagedPool getVariable
inherit Doc public Object resolve Variable String name Object args throws Core Exception return f Managed Pool resolve Variable name args  inheritDoc resolveVariable CoreException fManagedPool resolveVariable

public class Enablement Expression extends Composite Expression public Enablement Expression I Configuration Element config Element  EnablementExpression CompositeExpression EnablementExpression IConfigurationElement configElement
public Evaluation Result evaluate I Evaluation Context context throws Core Exception long start 0 if Expressions TRACING start System current Time Millis Evaluation Result result evaluate And context if Expressions TRACING System out println Enablement Expression evaluation time NON NLS 1 System current Time Millis start ms NON NLS 1 return result  EvaluationResult IEvaluationContext CoreException currentTimeMillis EvaluationResult evaluateAnd currentTimeMillis

private Object f Expected Value public Equals Expression Object expected Value Assert is Not Null expected Value f Expected Value expected Value  fExpectedValue EqualsExpression expectedValue isNotNull expectedValue fExpectedValue expectedValue
public Equals Expression I Configuration Element element throws Core Exception String value element get Attribute ATT VALUE Expressions check Attribute ATT VALUE value f Expected Value Expressions convert Argument value  EqualsExpression IConfigurationElement CoreException getAttribute ATT_VALUE checkAttribute ATT_VALUE fExpectedValue convertArgument
public Evaluation Result evaluate I Evaluation Context context throws Core Exception Object element context get Default Variable return Evaluation Result value Of element equals f Expected Value  EvaluationResult IEvaluationContext CoreException getDefaultVariable EvaluationResult valueOf fExpectedValue

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Expression Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME ExpressionMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException
public static String get Formatted String String key String arg try return Message Format format RESOURCE BUNDLE get String key new String arg catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getFormattedString MessageFormat RESOURCE_BUNDLE getString MissingResourceException
public static String get Formatted String String key Object arg try return Message Format format RESOURCE BUNDLE get String key new Object arg catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getFormattedString MessageFormat RESOURCE_BUNDLE getString MissingResourceException
public static String get Formatted String String key String args try return Message Format format RESOURCE BUNDLE get String key args catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getFormattedString MessageFormat RESOURCE_BUNDLE getString MissingResourceException
public static String get Formatted String String key Object args try return Message Format format RESOURCE BUNDLE get String key args catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getFormattedString MessageFormat RESOURCE_BUNDLE getString MissingResourceException

private Bundle Context f Bundle Context public Expression Plugin fg Default this  BundleContext fBundleContext ExpressionPlugin fgDefault
public static Expression Plugin get Default return fg Default  ExpressionPlugin getDefault fgDefault
public static String get Plugin Id return org eclipse core expressions NON NLS 1  getPluginId
inherit Doc public void start Bundle Context context throws Exception super start context f Bundle Context context  inheritDoc BundleContext fBundleContext
inherit Doc public void stop Bundle Context context throws Exception super stop context  inheritDoc BundleContext
public Bundle Context get Bundle Context return f Bundle Context  BundleContext getBundleContext fBundleContext

private Expressions no instance 
public static boolean is Instance Of Object element String type null isn t an instanceof of anything if element null return false return is Subtype element get Class type  isInstanceOf isSubtype getClass
private static boolean is Subtype Class clazz String type if clazz get Name equals type return true Class super Class clazz get Superclass if super Class null is Subtype super Class type return true Class interfaces clazz get Interfaces for int i 0 i interfaces length i if is Subtype interfaces i type return true return false  isSubtype getName superClass getSuperclass superClass isSubtype superClass getInterfaces isSubtype
public static void check Attribute String name String value throws Core Exception if value null throw new Core Exception new Expression Status Expression Status MISSING ATTRIBUTE Expression Messages get Formatted String Expression attribute missing name NON NLS 1  checkAttribute CoreException CoreException ExpressionStatus ExpressionStatus MISSING_ATTRIBUTE ExpressionMessages getFormattedString
public static void check Attribute String name String value String valid Values throws Core Exception check Attribute name value for int i 0 i valid Values length i if value equals valid Values i return throw new Core Exception new Expression Status Expression Status WRONG ATTRIBUTE VALUE Expression Messages get Formatted String Expression attribute invalid value value NON NLS 1  checkAttribute validValues CoreException checkAttribute validValues validValues CoreException ExpressionStatus ExpressionStatus WRONG_ATTRIBUTE_VALUE ExpressionMessages getFormattedString invalid_value
public static void check Collection Object var Expression expression throws Core Exception if var instanceof Collection return throw new Core Exception new Expression Status Expression Status VARIABLE IS NOT A COLLECTION Expression Messages get Formatted String Expression variable not a collection expression to String NON NLS 1  checkCollection CoreException CoreException ExpressionStatus ExpressionStatus VARIABLE_IS_NOT_A_COLLECTION ExpressionMessages getFormattedString not_a_collection toString
public static void check List Object var Expression expression throws Core Exception if var instanceof List return throw new Core Exception new Expression Status Expression Status VARIABLE IS NOT A LIST Expression Messages get Formatted String Expression variable not a list expression to String NON NLS 1  checkList CoreException CoreException ExpressionStatus ExpressionStatus VARIABLE_IS_NOT_A_LIST ExpressionMessages getFormattedString not_a_list toString
public static Object get Arguments I Configuration Element element String attribute Name throws Core Exception String args element get Attribute attribute Name if args null return parse Arguments args else return EMPTY ARGS  getArguments IConfigurationElement attributeName CoreException getAttribute attributeName parseArguments EMPTY_ARGS
public static Object parse Arguments String args throws Core Exception List result new Array List int start 0 int comma while comma find Next Comma args start 1 result add convert Argument args substring start comma trim start comma 1 result add convert Argument args substring start trim return result to Array  parseArguments CoreException ArrayList findNextComma convertArgument convertArgument toArray
private static int find Next Comma String str int start throws Core Exception boolean in String false for int i start i str length i char ch str char At i if ch in String return i if ch if in String in String true else if i 1 str length str char At i 1 i else in String false else if ch in String return i if in String throw new Core Exception new Expression Status Expression Status STRING NOT TERMINATED Expression Messages get Formatted String Expression string not terminated str NON NLS 1 return 1  findNextComma CoreException inString charAt inString inString inString charAt inString inString inString CoreException ExpressionStatus ExpressionStatus STRING_NOT_TERMINATED ExpressionMessages getFormattedString string_not_terminated
public static Object convert Argument String arg throws Core Exception if arg null return null else if arg length 0 return arg else if arg char At 0 arg char At arg length 1 return un Escape String arg substring 1 arg length 1 else if true equals arg NON NLS 1 return Boolean TRUE else if false equals arg NON NLS 1 return Boolean FALSE else if arg index Of 1 try return Float value Of arg catch Number Format Exception e return arg else try return Integer value Of arg catch Number Format Exception e return arg  convertArgument CoreException charAt charAt unEscapeString indexOf valueOf NumberFormatException valueOf NumberFormatException
public static String un Escape String String str throws Core Exception String Buffer result new String Buffer for int i 0 i str length i char ch str char At i if ch if i str length 1 str char At i 1 throw new Core Exception new Expression Status Expression Status STRING NOT CORRECT ESCAPED Expression Messages get Formatted String Expression string not correctly escaped str NON NLS 1 result append i else result append ch return result to String  unEscapeString CoreException StringBuffer StringBuffer charAt charAt CoreException ExpressionStatus ExpressionStatus STRING_NOT_CORRECT_ESCAPED ExpressionMessages getFormattedString string_not_correctly_escaped toString

Creates a new expression status param error Code the error code of the status param message a human readable message localized to the current locale public Expression Status int error Code String message this error Code message null  errorCode ExpressionStatus errorCode errorCode
Creates a new expression status param error Code the error code of the status param message a human readable message localized to the current locale param exception a low level exception or code null code if not applicable public Expression Status int error Code String message Throwable exception super I Status ERROR Expression Plugin get Plugin Id error Code message exception  errorCode ExpressionStatus errorCode IStatus ExpressionPlugin getPluginId errorCode

private String f Type Name public Instanceof Expression I Configuration Element element throws Core Exception f Type Name element get Attribute ATT VALUE Expressions check Attribute ATT VALUE f Type Name  fTypeName InstanceofExpression IConfigurationElement CoreException fTypeName getAttribute ATT_VALUE checkAttribute ATT_VALUE fTypeName
public Instanceof Expression String type Name Assert is Not Null type Name f Type Name type Name  InstanceofExpression typeName isNotNull typeName fTypeName typeName
see org eclipse jdt internal corext refactoring participants Expression evaluate java lang Object public Evaluation Result evaluate I Evaluation Context context Object element context get Default Variable return Evaluation Result value Of Expressions is Instance Of element f Type Name  EvaluationResult IEvaluationContext getDefaultVariable EvaluationResult valueOf isInstanceOf fTypeName
see java lang Object to String public String to String return instanceof value f Type Name NON NLS 1 NON NLS 2  toString toString fTypeName

public Iterate Pool I Evaluation Context parent Iterator iterator Assert is Not Null parent Assert is Not Null iterator f Parent parent f Iterator iterator  IteratePool IEvaluationContext isNotNull isNotNull fParent fIterator
f Iterator iterator public I Evaluation Context get Parent return f Parent  fIterator IEvaluationContext getParent fParent
return f Parent public I Evaluation Context get Root return f Parent get Root  fParent IEvaluationContext getRoot fParent getRoot
return f Parent get Root public Object get Default Variable return f Default Variable  fParent getRoot getDefaultVariable fDefaultVariable
return f Default Variable public void add Variable String name Object value f Parent add Variable name value  fDefaultVariable addVariable fParent addVariable
f Parent add Variable name value public Object remove Variable String name return f Parent remove Variable name  fParent addVariable removeVariable fParent removeVariable
return f Parent remove Variable name public Object get Variable String name return f Parent get Variable name  fParent removeVariable getVariable fParent getVariable
return f Parent get Variable name public Object resolve Variable String name Object args throws Core Exception return f Parent resolve Variable name args  fParent getVariable resolveVariable CoreException fParent resolveVariable
return f Parent resolve Variable name args public Object next f Default Variable f Iterator next return f Default Variable  fParent resolveVariable fDefaultVariable fIterator fDefaultVariable
return f Default Variable public boolean has Next return f Iterator has Next  fDefaultVariable hasNext fIterator hasNext
private int f Operator public Iterate Expression I Configuration Element config Element throws Core Exception String op Value config Element get Attribute ATT OPERATOR initialize Operator Value op Value  fOperator IterateExpression IConfigurationElement configElement CoreException opValue configElement getAttribute ATT_OPERATOR initializeOperatorValue opValue
public Iterate Expression String op Value throws Core Exception initialize Operator Value op Value  IterateExpression opValue CoreException initializeOperatorValue opValue
private void initialize Operator Value String op Value throws Core Exception if op Value null f Operator AND else Expressions check Attribute ATT OPERATOR op Value new String and or NON NLS 1 NON NLS 2 if and equals op Value NON NLS 1 f Operator AND else f Operator OR  initializeOperatorValue opValue CoreException opValue fOperator checkAttribute ATT_OPERATOR opValue opValue fOperator fOperator
public Evaluation Result evaluate I Evaluation Context context throws Core Exception Object var context get Default Variable Expressions check Collection var this Collection col Collection var switch col size case 0 return f Operator AND Evaluation Result TRUE Evaluation Result FALSE case 1 if col instanceof List return evaluate And new Default Variable context List col get 0 fall through default Iterate Pool iter new Iterate Pool context col iterator Evaluation Result result f Operator AND Evaluation Result TRUE Evaluation Result FALSE while iter has Next iter next switch f Operator case OR result result or evaluate And iter if result Evaluation Result TRUE return result break case AND result result and evaluate And iter if result Evaluation Result TRUE return result break return result  EvaluationResult IEvaluationContext CoreException getDefaultVariable checkCollection fOperator EvaluationResult EvaluationResult evaluateAnd DefaultVariable IteratePool IteratePool EvaluationResult fOperator EvaluationResult EvaluationResult hasNext fOperator evaluateAnd EvaluationResult evaluateAnd EvaluationResult

private Expression f Expression public Not Expression Expression expression Assert is Not Null expression f Expression expression  fExpression NotExpression isNotNull fExpression
public Evaluation Result evaluate I Evaluation Context context throws Core Exception return f Expression evaluate context not  EvaluationResult IEvaluationContext CoreException fExpression

public class Or Expression extends Composite Expression public Evaluation Result evaluate I Evaluation Context context throws Core Exception return evaluate Or context  OrExpression CompositeExpression EvaluationResult IEvaluationContext CoreException evaluateOr

package Property Class type String namespace String name Assert is Not Null type Assert is Not Null namespace Assert is Not Null name f Type type f Namespace namespace f Name name  isNotNull isNotNull isNotNull fType fNamespace fName
package void set Property Tester I Property Tester tester Assert is Not Null tester f Tester tester  setPropertyTester IPropertyTester isNotNull fTester
public boolean is Instantiated return f Tester is Instantiated  isInstantiated fTester isInstantiated
public boolean is Declaring Plugin Active return f Tester is Declaring Plugin Active  isDeclaringPluginActive fTester isDeclaringPluginActive
public boolean is Valid Cache Entry return is Instantiated is Declaring Plugin Active is Instantiated is Declaring Plugin Active  isValidCacheEntry isInstantiated isDeclaringPluginActive isInstantiated isDeclaringPluginActive
public boolean test Object receiver Object args Object expected Value return f Tester test receiver f Name args expected Value  expectedValue fTester fName expectedValue
public boolean equals Object obj if obj instanceof Property return false Property other Property obj return f Type equals other f Type f Namespace equals other f Namespace f Name equals other f Name  fType fType fNamespace fNamespace fName fName
public int hash Code return f Type hash Code 16 f Namespace hash Code 8 f Name hash Code  hashCode fType hashCode fNamespace hashCode fName hashCode

start with 100 elements but be able to grow until cache Size f Cache new Linked Hash Map 100 0 75f true protected boolean remove Eldest Entry Entry eldest return size cache Size  cacheSize fCache LinkedHashMap removeEldestEntry cacheSize
public Property Cache final int cache Size start with 100 elements but be able to grow until cache Size f Cache new Linked Hash Map 100 0 75f true protected boolean remove Eldest Entry Entry eldest return size cache Size  PropertyCache cacheSize cacheSize fCache LinkedHashMap removeEldestEntry cacheSize
public Property get Property key return Property f Cache get key  fCache
public void put Property method f Cache put method method  fCache
public void remove Property method f Cache remove method  fCache

public Property Tester Descriptor I Configuration Element element throws Core Exception f Config Element element f Namespace f Config Element get Attribute NAMESPACE if f Namespace null throw new Core Exception new Status I Status ERROR Expression Plugin get Plugin Id I Status ERROR Expression Messages get String Property Tester Descriptor no namespace NON NLS 1 null String Buffer buffer new String Buffer NON NLS 1 String properties element get Attribute PROPERTIES if properties null throw new Core Exception new Status I Status ERROR Expression Plugin get Plugin Id I Status ERROR Expression Messages get String Property Tester Descritpri no properties NON NLS 1 null for int i 0 i properties length i char ch properties char At i if Character is Whitespace ch buffer append ch buffer append f Properties buffer to String  PropertyTesterDescriptor IConfigurationElement CoreException fConfigElement fNamespace fConfigElement getAttribute fNamespace CoreException IStatus ExpressionPlugin getPluginId IStatus ExpressionMessages getString PropertyTesterDescriptor no_namespace StringBuffer StringBuffer getAttribute CoreException IStatus ExpressionPlugin getPluginId IStatus ExpressionMessages getString PropertyTesterDescritpri no_properties charAt isWhitespace fProperties toString
public Property Tester Descriptor I Configuration Element element String namespace String properties f Config Element element f Namespace namespace f Properties properties  PropertyTesterDescriptor IConfigurationElement fConfigElement fNamespace fProperties
public String get Properties return f Properties  getProperties fProperties
public String get Namespace return f Namespace  getNamespace fNamespace
public I Configuration Element get Configuration Element return f Config Element  IConfigurationElement getConfigurationElement fConfigElement
public boolean handles String namespace String property return f Namespace equals namespace f Properties index Of property 1 NON NLS 1 NON NLS 2  fNamespace fProperties indexOf
public boolean is Instantiated return false  isInstantiated
public boolean is Declaring Plugin Active Bundle f Bundle Platform get Bundle f Config Element get Declaring Extension get Namespace return f Bundle get State Bundle ACTIVE  isDeclaringPluginActive fBundle getBundle fConfigElement getDeclaringExtension getNamespace fBundle getState
public I Property Tester instantiate throws Core Exception return I Property Tester f Config Element create Executable Extension CLASS  IPropertyTester CoreException IPropertyTester fConfigElement createExecutableExtension
public boolean test Object receiver String method Object args Object expected Value Assert is True false Method should never be called NON NLS 1 return false  expectedValue isTrue

public Resolve Expression I Configuration Element config Element throws Core Exception f Variable config Element get Attribute ATT VARIABLE Expressions check Attribute ATT VARIABLE f Variable f Args Expressions get Arguments config Element ATT ARGS  ResolveExpression IConfigurationElement configElement CoreException fVariable configElement getAttribute ATT_VARIABLE checkAttribute ATT_VARIABLE fVariable fArgs getArguments configElement ATT_ARGS
public Evaluation Result evaluate I Evaluation Context context throws Core Exception Object variable context resolve Variable f Variable f Args if variable null throw new Core Exception new Expression Status Expression Status VARIABLE NOT DEFINED Expression Messages get Formatted String Resolve Expression variable not defined f Variable NON NLS 1 return evaluate And new Evaluation Context context variable  EvaluationResult IEvaluationContext CoreException resolveVariable fVariable fArgs CoreException ExpressionStatus ExpressionStatus VARIABLE_NOT_DEFINED ExpressionMessages getFormattedString ResolveExpression variable_not_defined fVariable evaluateAnd EvaluationContext

public class Standard Element Handler extends Element Handler public Standard Element Handler  StandardElementHandler ElementHandler StandardElementHandler
public Expression create Expression Converter converter I Configuration Element element throws Core Exception String name element get Name if Expression Tag Names INSTANCEOF equals name return new Instanceof Expression element else if Expression Tag Names TEST equals name return new Test Expression element else if Expression Tag Names OR equals name Or Expression result new Or Expression process Children converter element result return result else if Expression Tag Names AND equals name And Expression result new And Expression process Children converter element result return result else if Expression Tag Names NOT equals name return new Not Expression converter perform element get Children 0 else if Expression Tag Names WITH equals name With Expression result new With Expression element process Children converter element result return result else if Expression Tag Names ADAPT equals name Adapt Expression result new Adapt Expression element process Children converter element result return result else if Expression Tag Names ITERATE equals name Iterate Expression result new Iterate Expression element process Children converter element result return result else if Expression Tag Names COUNT equals name return new Count Expression element else if Expression Tag Names SYSTEM TEST equals name return new System Test Expression element else if Expression Tag Names RESOLVE equals name Resolve Expression result new Resolve Expression element process Children converter element result return result else if Expression Tag Names ENABLEMENT equals name Enablement Expression result new Enablement Expression element process Children converter element result return result else if Expression Tag Names EQUALS equals name return new Equals Expression element return null  ExpressionConverter IConfigurationElement CoreException getName ExpressionTagNames InstanceofExpression ExpressionTagNames TestExpression ExpressionTagNames OrExpression OrExpression processChildren ExpressionTagNames AndExpression AndExpression processChildren ExpressionTagNames NotExpression getChildren ExpressionTagNames WithExpression WithExpression processChildren ExpressionTagNames AdaptExpression AdaptExpression processChildren ExpressionTagNames IterateExpression IterateExpression processChildren ExpressionTagNames CountExpression ExpressionTagNames SYSTEM_TEST SystemTestExpression ExpressionTagNames ResolveExpression ResolveExpression processChildren ExpressionTagNames EnablementExpression EnablementExpression processChildren ExpressionTagNames EqualsExpression

public System Test Expression I Configuration Element element throws Core Exception f Property element get Attribute ATT PROPERTY Expressions check Attribute ATT PROPERTY f Property f Expected Value element get Attribute ATT VALUE Expressions check Attribute ATT VALUE f Expected Value  SystemTestExpression IConfigurationElement CoreException fProperty getAttribute ATT_PROPERTY checkAttribute ATT_PROPERTY fProperty fExpectedValue getAttribute ATT_VALUE checkAttribute ATT_VALUE fExpectedValue
public System Test Expression String property String expected Value f Property property f Expected Value expected Value  SystemTestExpression expectedValue fProperty fExpectedValue expectedValue
public Evaluation Result evaluate I Evaluation Context context throws Core Exception String str System get Property f Property if str null return Evaluation Result FALSE return Evaluation Result value Of str equals f Expected Value  EvaluationResult IEvaluationContext CoreException getProperty fProperty EvaluationResult EvaluationResult valueOf fExpectedValue
see java lang Object to String public String to String return system Test property f Property NON NLS 1 value f Expected Value NON NLS 1 NON NLS 2  toString toString systemTest fProperty fExpectedValue

public Test Expression I Configuration Element element throws Core Exception String property element get Attribute ATT PROPERTY int pos property last Index Of if pos 1 throw new Core Exception new Expression Status Expression Status NO NAMESPACE PROVIDED Expression Messages get String Test Expression no name space NON NLS 1 f Namespace property substring 0 pos f Property property substring pos 1 f Args Expressions get Arguments element ATT ARGS f Expected Value Expressions convert Argument element get Attribute ATT VALUE  TestExpression IConfigurationElement CoreException getAttribute ATT_PROPERTY lastIndexOf CoreException ExpressionStatus ExpressionStatus NO_NAMESPACE_PROVIDED ExpressionMessages getString TestExpression no_name_space fNamespace fProperty fArgs getArguments ATT_ARGS fExpectedValue convertArgument getAttribute ATT_VALUE
public Evaluation Result evaluate I Evaluation Context context throws Core Exception Object element context get Default Variable if System class equals element String str System get Property f Property if str null return Evaluation Result FALSE return Evaluation Result value Of str equals f Args 0 Property property fg Type Extension Manager get Property element f Namespace f Property if property is Instantiated return Evaluation Result NOT LOADED return Evaluation Result value Of property test element f Args f Expected Value  EvaluationResult IEvaluationContext CoreException getDefaultVariable getProperty fProperty EvaluationResult EvaluationResult valueOf fArgs fgTypeExtensionManager getProperty fNamespace fProperty isInstantiated EvaluationResult NOT_LOADED EvaluationResult valueOf fArgs fExpectedValue
public String to String String Buffer args new String Buffer for int i 0 i f Args length i Object arg f Args i if arg instanceof String args append args append arg args append else args append arg to String if i f Args length 1 args append NON NLS 1 return test property f Property NON NLS 1 f Args length 0 args args NON NLS 1 NON NLS 2 NON NLS 3 f Expected Value null value f Expected Value NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 1  toString StringBuffer StringBuffer fArgs fArgs toString fArgs fProperty fArgs fExpectedValue fExpectedValue

a special property tester instance that used to signal that method searching has to continue package static final I Property Tester CONTINUE new I Property Tester public boolean handles String namespace String method return false  IPropertyTester IPropertyTester
return false public boolean is Instantiated return true  isInstantiated
return true public boolean is Declaring Plugin Active return true  isDeclaringPluginActive
return true public I Property Tester instantiate return this  IPropertyTester
return this public boolean test Object receiver String method Object args Object expected Value return false  expectedValue
a special type extension instance that marks the end of an evaluation chain private static final Type Extension END POINT new Type Extension package I Property Tester find Type Extender Type Extension Manager manager String namespace String name boolean static Method throws Core Exception return CONTINUE  TypeExtension END_POINT TypeExtension IPropertyTester findTypeExtender TypeExtensionManager staticMethod CoreException
private Type Extension f Implements private Type Extension special constructor to create the CONTINUE instance  TypeExtension fImplements TypeExtension
package Type Extension Class type Assert is Not Null type f Type type  TypeExtension isNotNull fType
package I Property Tester find Type Extender Type Extension Manager manager String namespace String method boolean static Method throws Core Exception if f Extenders null f Extenders manager load Testers f Type I Property Tester result handle extenders associated with this type extender for int i 0 i f Extenders length i I Property Tester extender f Extenders i if extender null extender handles namespace method continue if extender is Instantiated if extender is Declaring Plugin Active return extender else Property Tester tester Property Tester extender f Extenders i extender tester internal Create Descriptor return extender else if extender is Declaring Plugin Active try Property Tester Descriptor descriptor Property Tester Descriptor extender I Property Tester inst descriptor instantiate Property Tester inst internal Initialize descriptor f Extenders i extender inst return extender catch Core Exception e f Extenders i null throw e catch Class Cast Exception e f Extenders i null throw new Core Exception new Expression Status Expression Status TYPE EXTENDER INCORRECT TYPE Expression Messages get String Type Extender incorrect Type NON NLS 1 e else return extender there is no inheritance for static methods if static Method return CONTINUE handle extends chain if f Extends null Class super Class f Type get Superclass if super Class null f Extends manager get super Class else f Extends END POINT result f Extends find Type Extender manager namespace method static Method if result CONTINUE return result handle implements chain if f Implements null Class interfaces f Type get Interfaces if interfaces length 0 f Implements EMPTY TYPE EXTENSION ARRAY else f Implements new Type Extension interfaces length for int i 0 i interfaces length i f Implements i manager get interfaces i for int i 0 i f Implements length i result f Implements i find Type Extender manager namespace method static Method if result CONTINUE return result return CONTINUE  IPropertyTester findTypeExtender TypeExtensionManager staticMethod CoreException fExtenders fExtenders loadTesters fType IPropertyTester fExtenders IPropertyTester fExtenders isInstantiated isDeclaringPluginActive PropertyTester PropertyTester fExtenders internalCreateDescriptor isDeclaringPluginActive PropertyTesterDescriptor PropertyTesterDescriptor IPropertyTester PropertyTester internalInitialize fExtenders CoreException fExtenders ClassCastException fExtenders CoreException ExpressionStatus ExpressionStatus TYPE_EXTENDER_INCORRECT_TYPE ExpressionMessages getString TypeExtender incorrectType staticMethod fExtends superClass fType getSuperclass superClass fExtends superClass fExtends END_POINT fExtends findTypeExtender staticMethod fImplements fType getInterfaces fImplements EMPTY_TYPE_EXTENSION_ARRAY fImplements TypeExtension fImplements fImplements fImplements findTypeExtender staticMethod

private static final I Property Tester NULL PROPERTY TESTER new I Property Tester public boolean handles String namespace String property return false  IPropertyTester NULL_PROPERTY_TESTER IPropertyTester
return false public boolean is Instantiated return true  isInstantiated
return true public boolean is Declaring Plugin Active return true  isDeclaringPluginActive
return true public I Property Tester instantiate throws Core Exception return this  IPropertyTester CoreException
return this public boolean test Object receiver String property Object args Object expected Value return false  expectedValue
public Type Extension Manager String extension Point Assert is Not Null extension Point f Extension Point extension Point Platform get Extension Registry add Registry Change Listener this initialize Caches  TypeExtensionManager extensionPoint isNotNull extensionPoint fExtensionPoint extensionPoint getExtensionRegistry addRegistryChangeListener initializeCaches
public synchronized Property get Property Object receiver String namespace String method throws Core Exception long start 0 if Expressions TRACING start System current Time Millis if we call a static method than the receiver is the class object Class clazz receiver instanceof Class Class receiver receiver get Class Property result new Property clazz namespace method Property cached f Property Cache get result if cached null if cached is Valid Cache Entry if Expressions TRACING System out println Type Extension method NON NLS 1 clazz get Name method NON NLS 1 found in cache NON NLS 1 System current Time Millis start ms NON NLS 1 return cached The type extender isn t loaded in the cached method but can be loaded now So remove method from cache and do the normal look up so that the implementation class gets loaded f Property Cache remove cached Type Extension extension get clazz I Property Tester extender extension find Type Extender this namespace method receiver instanceof Class if extender Type Extension CONTINUE extender null throw new Core Exception new Expression Status Expression Status TYPE EXTENDER UNKOWN METHOD Expression Messages get Formatted String Type Extender unknown Method NON NLS 1 new Object method clazz to String result set Property Tester extender f Property Cache put result if Expressions TRACING System out println Type Extension method NON NLS 1 clazz get Name method NON NLS 1 not found in cache NON NLS 1 System current Time Millis start ms NON NLS 1 return result  getProperty CoreException currentTimeMillis getClass fPropertyCache isValidCacheEntry getName currentTimeMillis fPropertyCache TypeExtension IPropertyTester findTypeExtender TypeExtension CoreException ExpressionStatus ExpressionStatus TYPE_EXTENDER_UNKOWN_METHOD ExpressionMessages getFormattedString TypeExtender unknownMethod toString setPropertyTester fPropertyCache getName currentTimeMillis
package Type Extension get Class clazz Type Extension result Type Extension f Type Extension Map get clazz if result null result new Type Extension clazz f Type Extension Map put clazz result return result  TypeExtension TypeExtension TypeExtension fTypeExtensionMap TypeExtension fTypeExtensionMap
package I Property Tester load Testers Class type if f Configuration Element Map null f Configuration Element Map new Hash Map I Extension Registry registry Platform get Extension Registry I Configuration Element ces registry get Configuration Elements For Expression Plugin get Plugin Id f Extension Point for int i 0 i ces length i I Configuration Element config ces i String type Attr config get Attribute TYPE List type Configs List f Configuration Element Map get type Attr if type Configs null type Configs new Array List f Configuration Element Map put type Attr type Configs type Configs add config String type Name type get Name List type Configs List f Configuration Element Map get type Name if type Configs null return EMPTY PROPERTY TESTER ARRAY else I Property Tester result new I Property Tester type Configs size for int i 0 i result length i I Configuration Element config I Configuration Element type Configs get i try result i new Property Tester Descriptor config catch Core Exception e Expression Plugin get Default get Log log e get Status result i NULL PROPERTY TESTER f Configuration Element Map remove type Name return result  IPropertyTester loadTesters fConfigurationElementMap fConfigurationElementMap HashMap IExtensionRegistry getExtensionRegistry IConfigurationElement getConfigurationElementsFor ExpressionPlugin getPluginId fExtensionPoint IConfigurationElement typeAttr getAttribute typeConfigs fConfigurationElementMap typeAttr typeConfigs typeConfigs ArrayList fConfigurationElementMap typeAttr typeConfigs typeConfigs typeName getName typeConfigs fConfigurationElementMap typeName typeConfigs EMPTY_PROPERTY_TESTER_ARRAY IPropertyTester IPropertyTester typeConfigs IConfigurationElement IConfigurationElement typeConfigs PropertyTesterDescriptor CoreException ExpressionPlugin getDefault getLog getStatus NULL_PROPERTY_TESTER fConfigurationElementMap typeName
public void registry Changed I Registry Change Event event I Extension Delta deltas event get Extension Deltas Expression Plugin get Plugin Id f Extension Point if deltas length 0 initialize Caches  registryChanged IRegistryChangeEvent IExtensionDelta getExtensionDeltas ExpressionPlugin getPluginId fExtensionPoint initializeCaches
private synchronized void initialize Caches f Type Extension Map new Hash Map f Configuration Element Map null f Property Cache new Property Cache 1000  initializeCaches fTypeExtensionMap HashMap fConfigurationElementMap fPropertyCache PropertyCache

private static final String ATT VARIABLE variable NON NLS 1 public With Expression I Configuration Element config Element throws Core Exception f Variable config Element get Attribute ATT VARIABLE Expressions check Attribute ATT VARIABLE f Variable  ATT_VARIABLE WithExpression IConfigurationElement configElement CoreException fVariable configElement getAttribute ATT_VARIABLE checkAttribute ATT_VARIABLE fVariable
public Evaluation Result evaluate I Evaluation Context context throws Core Exception Object variable context get Variable f Variable if variable null throw new Core Exception new Expression Status Expression Status VARIABLE NOT DEFINED Expression Messages get Formatted String With Expression variable not defined f Variable NON NLS 1 return evaluate And new Evaluation Context context variable  EvaluationResult IEvaluationContext CoreException getVariable fVariable CoreException ExpressionStatus ExpressionStatus VARIABLE_NOT_DEFINED ExpressionMessages getFormattedString WithExpression variable_not_defined fVariable evaluateAnd EvaluationContext

public abstract void create I Path location I Progress Monitor monitor throws Core Exception  IPath IProgressMonitor CoreException
public abstract void create I Path location I Progress Monitor monitor throws Core Exception public abstract void connect  IPath IProgressMonitor CoreException
public abstract void connect public abstract void disconnect throws Core Exception  CoreException
public abstract void disconnect throws Core Exception public abstract boolean is Disposed  CoreException isDisposed
public abstract boolean is Disposed public abstract void request Synchronization Context  isDisposed requestSynchronizationContext
public abstract void request Synchronization Context public abstract void release Synchronization Context  requestSynchronizationContext releaseSynchronizationContext

private I Workspace f Workspace public Container Generator I Workspace workspace I Path container Path f Workspace workspace f Container Full Path container Path  IWorkspace fWorkspace ContainerGenerator IWorkspace IPath containerPath fWorkspace fContainerFullPath containerPath
private I Folder create Folder I Folder folder Handle I Progress Monitor monitor throws Core Exception folder Handle create false true monitor if monitor is Canceled throw new Operation Canceled Exception return folder Handle  IFolder createFolder IFolder folderHandle IProgressMonitor CoreException folderHandle isCanceled OperationCanceledException folderHandle
private I Folder create Folder Handle I Container container String folder Name return container get Folder new Path folder Name  IFolder createFolderHandle IContainer folderName getFolder folderName
private I Project create Project I Project project Handle I Progress Monitor monitor throws Core Exception try monitor begin Task 2000 NON NLS 1 project Handle create new Sub Progress Monitor monitor 1000 if monitor is Canceled throw new Operation Canceled Exception project Handle open new Sub Progress Monitor monitor 1000 if monitor is Canceled throw new Operation Canceled Exception finally monitor done return project Handle  IProject createProject IProject projectHandle IProgressMonitor CoreException beginTask projectHandle SubProgressMonitor isCanceled OperationCanceledException projectHandle SubProgressMonitor isCanceled OperationCanceledException projectHandle
private I Project create Project Handle I Workspace Root root String project Name return root get Project project Name  IProject createProjectHandle IWorkspaceRoot projectName getProject projectName
I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception monitor begin Task File Buffers Messages get String Container Generator task creating Container 1000 f Container Full Path segment Count NON NLS 1 if f Container null return Does the container exist already I Workspace Root root f Workspace get Root I Resource found root find Member f Container Full Path if found instanceof I Container f Container I Container found return else if found null f Container Full Path specifies a file as directory throw new Core Exception new Status I Status ERROR File Buffers Plugin PLUGIN ID I Status OK File Buffers Messages get Formatted String Container Generator destination Must BeA Container f Container Full Path null NON NLS 1 Create the container for the given path f Container root for int i 0 i f Container Full Path segment Count i String current Segment f Container Full Path segment i I Resource resource f Container find Member current Segment if resource null if resource instanceof I Container f Container I Container resource monitor worked 1000 else f Container Full Path specifies a file as directory throw new Core Exception new Status I Status ERROR File Buffers Plugin PLUGIN ID I Status OK File Buffers Messages get Formatted String Container Generator destination Must BeA Container resource get Full Path null NON NLS 1 else if i 0 I Project project Handle create Project Handle root current Segment f Container create Project project Handle new Sub Progress Monitor monitor 1000 else I Folder folder Handle create Folder Handle f Container current Segment f Container create Folder folder Handle new Sub Progress Monitor monitor 1000  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException beginTask FileBuffersMessages getString ContainerGenerator creatingContainer fContainerFullPath segmentCount fContainer IWorkspaceRoot fWorkspace getRoot IResource findMember fContainerFullPath IContainer fContainer IContainer fContainerFullPath CoreException IStatus FileBuffersPlugin PLUGIN_ID IStatus FileBuffersMessages getFormattedString ContainerGenerator destinationMustBeAContainer fContainerFullPath fContainer fContainerFullPath segmentCount currentSegment fContainerFullPath IResource fContainer findMember currentSegment IContainer fContainer IContainer fContainerFullPath CoreException IStatus FileBuffersPlugin PLUGIN_ID IStatus FileBuffersMessages getFormattedString ContainerGenerator destinationMustBeAContainer getFullPath IProject projectHandle createProjectHandle currentSegment fContainer createProject projectHandle SubProgressMonitor IFolder folderHandle createFolderHandle fContainer currentSegment fContainer createFolder folderHandle SubProgressMonitor
public I Container generate Container I Progress Monitor monitor throws Core Exception I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception monitor begin Task File Buffers Messages get String Container Generator task creating Container 1000 f Container Full Path segment Count NON NLS 1 if f Container null return Does the container exist already I Workspace Root root f Workspace get Root I Resource found root find Member f Container Full Path if found instanceof I Container f Container I Container found return else if found null f Container Full Path specifies a file as directory throw new Core Exception new Status I Status ERROR File Buffers Plugin PLUGIN ID I Status OK File Buffers Messages get Formatted String Container Generator destination Must BeA Container f Container Full Path null NON NLS 1 Create the container for the given path f Container root for int i 0 i f Container Full Path segment Count i String current Segment f Container Full Path segment i I Resource resource f Container find Member current Segment if resource null if resource instanceof I Container f Container I Container resource monitor worked 1000 else f Container Full Path specifies a file as directory throw new Core Exception new Status I Status ERROR File Buffers Plugin PLUGIN ID I Status OK File Buffers Messages get Formatted String Container Generator destination Must BeA Container resource get Full Path null NON NLS 1 else if i 0 I Project project Handle create Project Handle root current Segment f Container create Project project Handle new Sub Progress Monitor monitor 1000 else I Folder folder Handle create Folder Handle f Container current Segment f Container create Folder folder Handle new Sub Progress Monitor monitor 1000 Get scheduling rule I Workspace Root root f Workspace get Root I Path existing Parent Path f Container Full Path while root exists existing Parent Path existing Parent Path existing Parent Path remove Last Segments 1 I Resource scheduling Rule root find Member existing Parent Path f Workspace run runnable scheduling Rule I Workspace AVOID UPDATE monitor return f Container  IContainer generateContainer IProgressMonitor CoreException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException beginTask FileBuffersMessages getString ContainerGenerator creatingContainer fContainerFullPath segmentCount fContainer IWorkspaceRoot fWorkspace getRoot IResource findMember fContainerFullPath IContainer fContainer IContainer fContainerFullPath CoreException IStatus FileBuffersPlugin PLUGIN_ID IStatus FileBuffersMessages getFormattedString ContainerGenerator destinationMustBeAContainer fContainerFullPath fContainer fContainerFullPath segmentCount currentSegment fContainerFullPath IResource fContainer findMember currentSegment IContainer fContainer IContainer fContainerFullPath CoreException IStatus FileBuffersPlugin PLUGIN_ID IStatus FileBuffersMessages getFormattedString ContainerGenerator destinationMustBeAContainer getFullPath IProject projectHandle createProjectHandle currentSegment fContainer createProject projectHandle SubProgressMonitor IFolder folderHandle createFolderHandle fContainer currentSegment fContainer createFolder folderHandle SubProgressMonitor IWorkspaceRoot fWorkspace getRoot IPath existingParentPath fContainerFullPath existingParentPath existingParentPath existingParentPath removeLastSegments IResource schedulingRule findMember existingParentPath fWorkspace schedulingRule IWorkspace AVOID_UPDATE fContainer

public class Default Document Factory implements I Document Factory public Default Document Factory  DefaultDocumentFactory IDocumentFactory DefaultDocumentFactory
see org eclipse core filebuffers I Document Factory create Document public I Document create Document return new Document  IDocumentFactory createDocument IDocument createDocument

Creates a new content type adapter for the given content type param content Type the content type to be adapted public Content Type Adapter I Content Type content Type Assert is Not Null content Type f Content Type content Type  contentType ContentTypeAdapter IContentType contentType isNotNull contentType fContentType contentType
Return the adapted content type return the content type public I Content Type get Content Type return f Content Type  IContentType getContentType fContentType
Return the Id of the adapted content type return the Id public String get Id return f Content Type get Id  getId fContentType getId
see java lang Object equals java lang Object public boolean equals Object obj return obj instanceof Content Type Adapter f Content Type get Id equals Content Type Adapter obj get Id  ContentTypeAdapter fContentType getId ContentTypeAdapter getId
see java lang Object hash Code public int hash Code return f Content Type get Id hash Code  hashCode hashCode fContentType getId hashCode
Creates a new document factory registry and initializes it with the information found in the plug in registry public Extensions Registry initialize document Creation content Type Id true f Factory Descriptors NON NLS 1 NON NLS 2 initialize document Creation file Names false f Factory Descriptors NON NLS 1 NON NLS 2 initialize document Creation extensions false f Factory Descriptors NON NLS 1 NON NLS 2 initialize document Setup content Type Id true f Setup Participant Descriptors NON NLS 1 NON NLS 2 initialize document Setup file Names false f Setup Participant Descriptors NON NLS 1 NON NLS 2 initialize document Setup extensions false f Setup Participant Descriptors NON NLS 1 NON NLS 2 initialize annotation Model Creation content Type Id true f Annotation Model Factory Descriptors NON NLS 1 NON NLS 2 initialize annotation Model Creation file Names false f Annotation Model Factory Descriptors NON NLS 1 NON NLS 2 initialize annotation Model Creation extensions false f Annotation Model Factory Descriptors NON NLS 1 NON NLS 2  ExtensionsRegistry documentCreation contentTypeId fFactoryDescriptors documentCreation fileNames fFactoryDescriptors documentCreation fFactoryDescriptors documentSetup contentTypeId fSetupParticipantDescriptors documentSetup fileNames fSetupParticipantDescriptors documentSetup fSetupParticipantDescriptors annotationModelCreation contentTypeId fAnnotationModelFactoryDescriptors annotationModelCreation fileNames fAnnotationModelFactoryDescriptors annotationModelCreation fAnnotationModelFactoryDescriptors
Reads the comma separated value from the given configuration element for the given attribute name and remembers the configuration element in the given map under the individual tokens of the attribute value param attribute Name the name of the attribute param element the configuration element param map the map which remembers the configuration element private void read String attribute Name I Configuration Element element Map map String value element get Attribute attribute Name if value null String Tokenizer tokenizer new String Tokenizer value NON NLS 1 while tokenizer has More Tokens String token tokenizer next Token trim Set s Set map get token if s null s new Hash Set map put token s s add element  attributeName attributeName IConfigurationElement getAttribute attributeName StringTokenizer StringTokenizer hasMoreTokens nextToken HashSet
Reads the value from the given configuration element for the given attribute name and remembers the configuration element in the given map under the individual content type of the attribute value param attribute Name the name of the attribute param element the configuration element param map the map which remembers the configuration element private void read Content Type String attribute Name I Configuration Element element Map map String value element get Attribute attribute Name if value null I Content Type content Type f Content Type Manager get Content Type value if content Type null log new Status I Status ERROR File Buffers Plugin PLUGIN ID 0 File Buffers Messages get Formatted String Extensions Registry error content Type Does Not Exist new Object value null NON NLS 1 return Content Type Adapter adapter new Content Type Adapter content Type Set s Set map get adapter if s null s new Hash Set map put adapter s s add element  attributeName readContentType attributeName IConfigurationElement getAttribute attributeName IContentType contentType fContentTypeManager getContentType contentType IStatus FileBuffersPlugin PLUGIN_ID FileBuffersMessages getFormattedString ExtensionsRegistry contentTypeDoesNotExist ContentTypeAdapter ContentTypeAdapter contentType HashSet
Adds an entry to the log of this plug in for the given status param status the status to log private void log I Status status I Log log File Buffers Plugin get Default get Log log log status  IStatus ILog FileBuffersPlugin getDefault getLog
Initializes this registry It retrieves all implementers of the given extension point and remembers those implementers based on the file name extensions in the given map param extension Point Name the name of the extension point param child Element Name the name of the child elements param is Content Type Id the child element is a content type id param descriptors the map to be filled private void initialize String extension Point Name String child Element Name boolean is Content Type Id Map descriptors I Extension Point extension Point Platform get Extension Registry get Extension Point File Buffers Plugin PLUGIN ID extension Point Name if extension Point null log new Status I Status ERROR File Buffers Plugin PLUGIN ID 0 File Buffers Messages get Formatted String Extensions Registry error extension Point Not Found new Object extension Point Name null NON NLS 1 return I Configuration Element elements extension Point get Configuration Elements for int i 0 i elements length i if is Content Type Id read Content Type child Element Name elements i descriptors else read child Element Name elements i descriptors  extensionPointName childElementName isContentTypeId extensionPointName childElementName isContentTypeId IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint FileBuffersPlugin PLUGIN_ID extensionPointName extensionPoint IStatus FileBuffersPlugin PLUGIN_ID FileBuffersMessages getFormattedString ExtensionsRegistry extensionPointNotFound extensionPointName IConfigurationElement extensionPoint getConfigurationElements isContentTypeId readContentType childElementName childElementName
Returns the executable extension for the given configuration element If there is no instantiated extension remembered for this element a new extension is created and put into the cache if it is of the requested type param entry the configuration element param extensions the map of instantiated extensions param extension Type the requested result type return the executable extension for the given configuration element private Object get Extension I Configuration Element entry Map extensions Class extension Type Object extension extensions get entry if extension null return extension try extension entry create Executable Extension class NON NLS 1 catch Core Exception x log x get Status if extension Type is Instance extension extensions put entry extension return extension return null  extensionType getExtension IConfigurationElement extensionType createExecutableExtension CoreException getStatus extensionType isInstance
Returns the first enumerated element of the given set param set the set from which to choose return the selected configuration element private I Configuration Element select Configuration Element Set set if set null set is Empty Iterator e set iterator return I Configuration Element e next return null  IConfigurationElement selectConfigurationElement isEmpty IConfigurationElement
Returns a sharable document factory for the given file name or file extension param name Or Extension the name or extension to be used for lookup return the sharable document factory or code null code private I Document Factory get Document Factory String name Or Extension Set set Set f Factory Descriptors get name Or Extension if set null I Configuration Element entry select Configuration Element set return I Document Factory get Extension entry f Factories I Document Factory class return null  nameOrExtension IDocumentFactory getDocumentFactory nameOrExtension fFactoryDescriptors nameOrExtension IConfigurationElement selectConfigurationElement IDocumentFactory getExtension fFactories IDocumentFactory
Returns a sharable document factory for the given content types param content Types the content types used to find the factory return the sharable document factory or code null code private I Document Factory do Get Document Factory I Content Type content Types Set set null int i 0 while i content Types length set null set Set f Factory Descriptors get new Content Type Adapter content Types i if set null I Configuration Element entry select Configuration Element set return I Document Factory get Extension entry f Factories I Document Factory class return null  contentTypes IDocumentFactory doGetDocumentFactory IContentType contentTypes contentTypes fFactoryDescriptors ContentTypeAdapter contentTypes IConfigurationElement selectConfigurationElement IDocumentFactory getExtension fFactories IDocumentFactory
Returns a sharable document factory for the given content types This method considers the base content types of the given set of content types param content Types the content types used to find the factory return the sharable document factory or code null code private I Document Factory get Document Factory I Content Type content Types I Document Factory factory do Get Document Factory content Types while factory null content Types compute Base Content Types content Types if content Types null break factory do Get Document Factory content Types return factory  contentTypes IDocumentFactory getDocumentFactory IContentType contentTypes IDocumentFactory doGetDocumentFactory contentTypes contentTypes computeBaseContentTypes contentTypes contentTypes doGetDocumentFactory contentTypes
Returns the set of setup participants for the given file name or extension param name Or Extension the name or extension to be used for lookup return the sharable set of document setup participants private List get Document Setup Participants String name Or Extension Set set Set f Setup Participant Descriptors get name Or Extension if set null return null List participants new Array List Iterator e set iterator while e has Next I Configuration Element entry I Configuration Element e next Object participant get Extension entry f Setup Participants I Document Setup Participant class if participant null participants add participant return participants  nameOrExtension getDocumentSetupParticipants nameOrExtension fSetupParticipantDescriptors nameOrExtension ArrayList hasNext IConfigurationElement IConfigurationElement getExtension fSetupParticipants IDocumentSetupParticipant
Returns the set of setup participants for the given content types param content Types the content Types to be used for lookup return the sharable set of document setup participants private List do Get Document Setup Participants I Content Type content Types Set result Set new Hash Set int i 0 while i content Types length Set set Set f Setup Participant Descriptors get new Content Type Adapter content Types i if set null result Set add All set List participants new Array List Iterator e result Set iterator while e has Next I Configuration Element entry I Configuration Element e next Object participant get Extension entry f Setup Participants I Document Setup Participant class if participant null participants add participant return participants is Empty null participants  contentTypes contentTypes doGetDocumentSetupParticipants IContentType contentTypes resultSet HashSet contentTypes fSetupParticipantDescriptors ContentTypeAdapter contentTypes resultSet addAll ArrayList resultSet hasNext IConfigurationElement IConfigurationElement getExtension fSetupParticipants IDocumentSetupParticipant isEmpty
Returns the set of setup participants for the given content types This method considers the base content types of the given set of content types param content Types the content Types to be used for lookup return the sharable set of document setup participants private List get Document Setup Participants I Content Type content Types List participants do Get Document Setup Participants content Types while participants null content Types compute Base Content Types content Types if content Types null break participants do Get Document Setup Participants content Types return participants  contentTypes contentTypes getDocumentSetupParticipants IContentType contentTypes doGetDocumentSetupParticipants contentTypes contentTypes computeBaseContentTypes contentTypes contentTypes doGetDocumentSetupParticipants contentTypes
Returns a sharable annotation model factory for the given content types param content Types the content types used to find the factory return the sharable annotation model factory or code null code private I Annotation Model Factory do Get Annotation Model Factory I Content Type content Types Set set null int i 0 while i content Types length set null set Set f Annotation Model Factory Descriptors get new Content Type Adapter content Types i if set null I Configuration Element entry select Configuration Element set return I Annotation Model Factory get Extension entry f Annotation Model Factories I Annotation Model Factory class return null  contentTypes IAnnotationModelFactory doGetAnnotationModelFactory IContentType contentTypes contentTypes fAnnotationModelFactoryDescriptors ContentTypeAdapter contentTypes IConfigurationElement selectConfigurationElement IAnnotationModelFactory getExtension fAnnotationModelFactories IAnnotationModelFactory
Returns a sharable annotation model factory for the given content types This method considers the base content types of the given set of content types param content Types the content types used to find the factory return the sharable annotation model factory or code null code private I Annotation Model Factory get Annotation Model Factory I Content Type content Types I Annotation Model Factory factory do Get Annotation Model Factory content Types while factory null content Types compute Base Content Types content Types if content Types null break factory do Get Annotation Model Factory content Types return factory  contentTypes IAnnotationModelFactory getAnnotationModelFactory IContentType contentTypes IAnnotationModelFactory doGetAnnotationModelFactory contentTypes contentTypes computeBaseContentTypes contentTypes contentTypes doGetAnnotationModelFactory contentTypes
Returns a sharable annotation model factory for the given file name or file extension param extension the name or extension to be used for lookup return the sharable document factory or code null code private I Annotation Model Factory get Annotation Model Factory String extension Set set Set f Annotation Model Factory Descriptors get extension if set null I Configuration Element entry select Configuration Element set return I Annotation Model Factory get Extension entry f Annotation Model Factories I Annotation Model Factory class return null  IAnnotationModelFactory getAnnotationModelFactory fAnnotationModelFactoryDescriptors IConfigurationElement selectConfigurationElement IAnnotationModelFactory getExtension fAnnotationModelFactories IAnnotationModelFactory
Returns the set of content types for the given location param location the location for which to look up the content types return the set of content types for the location private I Content Type find Content Types I Path location I File file File Buffers get Workspace File At Location location if file null try I Content Description content Description file get Content Description if content Description null I Content Type content Type content Description get Content Type if content Type null return new I Content Type content Type catch Core Exception x go for the default return f Content Type Manager find Content Types For location last Segment  IContentType findContentTypes IPath IFile FileBuffers getWorkspaceFileAtLocation IContentDescription contentDescription getContentDescription contentDescription IContentType contentType contentDescription getContentType contentType IContentType contentType CoreException fContentTypeManager findContentTypesFor lastSegment
Returns the set of direct base content types for the given set of content types Returns code null code if non of the given content types has a direct base content type param content Types the content types return the set of direct base content types private I Content Type compute Base Content Types I Content Type content Types List base Types new Array List for int i 0 i content Types length i I Content Type base Type content Types i get Base Type if base Type null base Types add base Type I Content Type result null int size base Types size if size 0 result new I Content Type size base Types to Array result return result  contentTypes IContentType computeBaseContentTypes IContentType contentTypes baseTypes ArrayList contentTypes IContentType baseType contentTypes getBaseType baseType baseTypes baseType IContentType baseTypes IContentType baseTypes toArray
Returns the sharable document factory for the given location param location the location for which to looked up the factory return the sharable document factory public I Document Factory get Document Factory I Path location I Document Factory factory get Document Factory find Content Types location if factory null factory get Document Factory location last Segment if factory null factory get Document Factory location get File Extension if factory null factory get Document Factory WILDCARD return factory  IDocumentFactory getDocumentFactory IPath IDocumentFactory getDocumentFactory findContentTypes getDocumentFactory lastSegment getDocumentFactory getFileExtension getDocumentFactory
Returns the sharable set of document setup participants for the given location param location the location for which to look up the setup participants return the sharable set of document setup participants public I Document Setup Participant get Document Setup Participants I Path location List participants new Array List List p get Document Setup Participants find Content Types location if p null participants add All p p get Document Setup Participants location last Segment if p null participants add All p p get Document Setup Participants location get File Extension if p null participants add All p p get Document Setup Participants WILDCARD if p null participants add All p I Document Setup Participant result new I Document Setup Participant participants size participants to Array result return result  IDocumentSetupParticipant getDocumentSetupParticipants IPath ArrayList getDocumentSetupParticipants findContentTypes addAll getDocumentSetupParticipants lastSegment addAll getDocumentSetupParticipants getFileExtension addAll getDocumentSetupParticipants addAll IDocumentSetupParticipant IDocumentSetupParticipant toArray
Returns the sharable annotation model factory for the given location param location the location for which to look up the factory return the sharable annotation model factory public I Annotation Model Factory get Annotation Model Factory I Path location I Annotation Model Factory factory get Annotation Model Factory find Content Types location if factory null factory get Annotation Model Factory location last Segment if factory null factory get Annotation Model Factory location get File Extension if factory null factory get Annotation Model Factory WILDCARD return factory  IAnnotationModelFactory getAnnotationModelFactory IPath IAnnotationModelFactory getAnnotationModelFactory findContentTypes getAnnotationModelFactory lastSegment getAnnotationModelFactory getFileExtension getAnnotationModelFactory

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private File Buffers Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE FileBuffersMessages
Gets a string from the resource bundle param key the string used to get the bundle value must not be code null code return the string from the resource bundle public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException
Gets a string from the resource bundle and formats it with the given arguments param key the string used to get the bundle value must not be code null code param args the arguments used to format the string return the formatted string public static String get Formatted String String key Object args String format null try format fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1 return Message Format format format args  getFormattedString fgResourceBundle getString MissingResourceException MessageFormat
Gets a string from the resource bundle and formats it with the given argument param key the string used to get the bundle value must not be code null code param arg the argument used to format the string return the formatted string public static String get Formatted String String key Object arg String format null try format fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1 if arg null arg NON NLS 1 return Message Format format format new Object arg  getFormattedString fgResourceBundle getString MissingResourceException MessageFormat

Creates a plug in instance public File Buffers Plugin Assert is True fg Plugin null fg Plugin this try f Resource Bundle Resource Bundle get Bundle org eclipse core internal filebuffers File Buffers Plugin NON NLS 1 catch Missing Resource Exception x f Resource Bundle null  FileBuffersPlugin isTrue fgPlugin fgPlugin fResourceBundle ResourceBundle getBundle FileBuffersPlugin MissingResourceException fResourceBundle
Returns the shared instance return the default plug in instance public static File Buffers Plugin get Default return fg Plugin  FileBuffersPlugin getDefault fgPlugin
Returns the string from the plugin s resource bundle or key if not found param key the resource string key return the resource string for the given key public static String get Resource String String key Resource Bundle bundle File Buffers Plugin get Default get Resource Bundle try return bundle null bundle get String key key catch Missing Resource Exception e return key  getResourceString ResourceBundle FileBuffersPlugin getDefault getResourceBundle getString MissingResourceException
Returns the plugin s resource bundle return the resource bundle private Resource Bundle get Resource Bundle return f Resource Bundle  ResourceBundle getResourceBundle fResourceBundle
Returns the text file buffer manager of this plug in return the text file buffer manager of this plug in public I Text File Buffer Manager get File Buffer Manager if f Text File Buffer Manager null f Text File Buffer Manager new Text File Buffer Manager return f Text File Buffer Manager  ITextFileBufferManager getFileBufferManager fTextFileBufferManager fTextFileBufferManager TextFileBufferManager fTextFileBufferManager

public Java File Buffer Text File Buffer Manager manager super f Manager manager  JavaFileBuffer TextFileBufferManager fManager
abstract protected void add File Buffer Content Listeners  addFileBufferContentListeners
abstract protected void add File Buffer Content Listeners abstract protected void remove File Buffer Content Listeners  addFileBufferContentListeners removeFileBufferContentListeners
abstract protected void remove File Buffer Content Listeners abstract protected void initialize File Buffer Content I Progress Monitor monitor throws Core Exception  removeFileBufferContentListeners initializeFileBufferContent IProgressMonitor CoreException
abstract protected void initialize File Buffer Content I Progress Monitor monitor throws Core Exception abstract protected void commit File Buffer Content I Progress Monitor monitor boolean overwrite throws Core Exception  initializeFileBufferContent IProgressMonitor CoreException commitFileBufferContent IProgressMonitor CoreException
Returns the file at the given location or code null code if there is no such file param location the location return the file at the given location private File get File At Location I Path location File file File Buffers get System File At Location location return file exists file null  getFileAtLocation IPath FileBuffers getSystemFileAtLocation
public void create I Path location I Progress Monitor monitor throws Core Exception File file get File At Location location if file null throw new Core Exception new Status I Status ERROR File Buffers Plugin PLUGIN ID I Status OK File Buffers Messages get String File Buffer error file Does Not Exist null NON NLS 1 f Location location f File file initialize File Buffer Content monitor f Synchronization Stamp f File last Modified add File Buffer Content Listeners  IPath IProgressMonitor CoreException getFileAtLocation CoreException IStatus FileBuffersPlugin PLUGIN_ID IStatus FileBuffersMessages getString FileBuffer fileDoesNotExist fLocation fFile initializeFileBufferContent fSynchronizationStamp fFile lastModified addFileBufferContentListeners
public void connect f Reference Count  fReferenceCount
public void disconnect throws Core Exception f Reference Count  CoreException fReferenceCount
Returns whether this file buffer has already been disposed return code true code if already disposed code false code otherwise public boolean is Disposed return f Reference Count 0  isDisposed fReferenceCount
see org eclipse core filebuffers I File Buffer get Location public I Path get Location return f Location  IFileBuffer getLocation IPath getLocation fLocation
public void commit I Progress Monitor monitor boolean overwrite throws Core Exception if is Disposed f Can Be Saved f Manager fire State Changing this try commit File Buffer Content monitor overwrite catch Core Exception x f Manager fire State Change Failed this throw x catch Runtime Exception x f Manager fire State Change Failed this throw x f Can Be Saved false add File Buffer Content Listeners f Manager fire Dirty State Changed this f Can Be Saved  IProgressMonitor CoreException isDisposed fCanBeSaved fManager fireStateChanging commitFileBufferContent CoreException fManager fireStateChangeFailed RuntimeException fManager fireStateChangeFailed fCanBeSaved addFileBufferContentListeners fManager fireDirtyStateChanged fCanBeSaved
see org eclipse core filebuffers I File Buffer is Dirty public boolean is Dirty return f Can Be Saved  IFileBuffer isDirty isDirty fCanBeSaved
see org eclipse core filebuffers I File Buffer is Shared public boolean is Shared return f Reference Count 1  IFileBuffer isShared isShared fReferenceCount
see org eclipse core filebuffers I File Buffer validate State org eclipse core runtime I Progress Monitor java lang Object public void validate State I Progress Monitor monitor Object computation Context throws Core Exception nop  IFileBuffer validateState IProgressMonitor validateState IProgressMonitor computationContext CoreException
see org eclipse core filebuffers I File Buffer is State Validated public boolean is State Validated return true  IFileBuffer isStateValidated isStateValidated
see org eclipse core filebuffers I File Buffer reset State Validation public void reset State Validation nop  IFileBuffer resetStateValidation resetStateValidation
Sends out the notification that the file serving as document input has been moved param new Location the path of the new location of the file protected void handle File Moved I Path new Location f Manager fire Underlying File Moved this new Location  newLocation handleFileMoved IPath newLocation fManager fireUnderlyingFileMoved newLocation
Defines the standard procedure to handle code Core Exceptions code Exceptions are written to the plug in log param exception the exception to be logged param message the message to be logged protected void handle Core Exception Core Exception exception I Log log File Buffers Plugin get Default get Log log log exception get Status  CoreExceptions handleCoreException CoreException ILog FileBuffersPlugin getDefault getLog getStatus
see org eclipse core filebuffers I File Buffer is Synchronized public boolean is Synchronized return f Synchronization Stamp f File last Modified  IFileBuffer isSynchronized isSynchronized fSynchronizationStamp fFile lastModified
see org eclipse core filebuffers I File Buffer get Modification Stamp public long get Modification Stamp return f File last Modified  IFileBuffer getModificationStamp getModificationStamp fFile lastModified
Requests the file buffer manager s synchronization context for this file buffer public void request Synchronization Context f Synchronization Context Count  requestSynchronizationContext fSynchronizationContextCount
Releases the file buffer manager s synchronization context for this file buffer public void release Synchronization Context f Synchronization Context Count  releaseSynchronizationContext fSynchronizationContextCount

see org eclipse jface text I Document Listener document About To Be Changed org eclipse jface text Document Event public void document About To Be Changed Document Event event  IDocumentListener documentAboutToBeChanged DocumentEvent documentAboutToBeChanged DocumentEvent
public void document Changed Document Event event f Can Be Saved true remove File Buffer Content Listeners f Manager fire Dirty State Changed Java Text File Buffer this f Can Be Saved  documentChanged DocumentEvent fCanBeSaved removeFileBufferContentListeners fManager fireDirtyStateChanged JavaTextFileBuffer fCanBeSaved
public Java Text File Buffer Text File Buffer Manager manager super manager  JavaTextFileBuffer TextFileBufferManager
see org eclipse core buffer text I Buffered Text File get Document public I Document get Document return f Document  IBufferedTextFile getDocument IDocument getDocument fDocument
see org eclipse core filebuffers I Text File Buffer get Annotation Model public I Annotation Model get Annotation Model return null  ITextFileBuffer getAnnotationModel IAnnotationModel getAnnotationModel
see org eclipse core buffer text I Buffered Text File get Encoding public String get Encoding return f Encoding  IBufferedTextFile getEncoding getEncoding fEncoding
see org eclipse core buffer text I Buffered Text File set Encoding java lang String public void set Encoding String encoding f Encoding encoding  IBufferedTextFile setEncoding setEncoding fEncoding
public I Status get Status if is Disposed if f Status null return f Status return f Document null STATUS ERROR STATUS OK return STATUS ERROR  IStatus getStatus isDisposed fStatus fStatus fDocument STATUS_ERROR STATUS_OK STATUS_ERROR
private Input Stream get File Contents I Progress Monitor monitor try return new File Input Stream f File catch File Not Found Exception e return null  InputStream getFileContents IProgressMonitor FileInputStream fFile FileNotFoundException
private void set File Contents Input Stream stream boolean overwrite I Progress Monitor monitor try Output Stream out new File Output Stream f File false try byte buffer new byte 8192 while true int bytes Read 1 try bytes Read stream read buffer catch IO Exception e if bytes Read 1 break try out write buffer 0 bytes Read catch IO Exception e monitor worked 1 finally try stream close catch IO Exception e finally try out close catch IO Exception e catch File Not Found Exception e  setFileContents InputStream IProgressMonitor OutputStream FileOutputStream fFile bytesRead bytesRead IOException bytesRead bytesRead IOException IOException IOException FileNotFoundException
public void revert I Progress Monitor monitor throws Core Exception if is Disposed return I Document original null I Status status null try original f Manager create Empty Document get Location set Document Content original get File Contents monitor f Encoding catch Core Exception x status x get Status f Status status if original null String original Contents original get boolean replace Contents original Contents equals f Document get if replace Contents f Manager fire Buffer Content About To Be Replaced this f Document set original get if f Can Be Saved f Can Be Saved false add File Buffer Content Listeners if replace Contents f Manager fire Buffer Content Replaced this f Manager fire Dirty State Changed this f Can Be Saved  IProgressMonitor CoreException isDisposed IDocument IStatus fManager createEmptyDocument getLocation setDocumentContent getFileContents fEncoding CoreException getStatus fStatus originalContents replaceContents originalContents fDocument replaceContents fManager fireBufferContentAboutToBeReplaced fDocument fCanBeSaved fCanBeSaved addFileBufferContentListeners replaceContents fManager fireBufferContentReplaced fManager fireDirtyStateChanged fCanBeSaved
see org eclipse core internal filebuffers File Buffer add File Buffer Content Listeners protected void add File Buffer Content Listeners if f Document null f Document add Document Listener f Document Listener  FileBuffer addFileBufferContentListeners addFileBufferContentListeners fDocument fDocument addDocumentListener fDocumentListener
see org eclipse core internal filebuffers File Buffer remove File Buffer Content Listeners protected void remove File Buffer Content Listeners if f Document null f Document remove Document Listener f Document Listener  FileBuffer removeFileBufferContentListeners removeFileBufferContentListeners fDocument fDocument removeDocumentListener fDocumentListener
protected void initialize File Buffer Content I Progress Monitor monitor throws Core Exception try f Document f Manager create Empty Document get Location f Encoding null f HasBOM false Input Stream stream get File Contents monitor try Qualified Name options new Qualified Name I Content Description CHARSET I Content Description BYTE ORDER MARK I Content Description description Platform get Content Type Manager get Description For stream f File get Name options if description null f Encoding description get Charset f HasBOM description get Property I Content Description BYTE ORDER MARK null catch IO Exception e do nothing finally try stream close catch IO Exception ex File Buffers Plugin get Default get Log log new Status I Status ERROR File Buffers Plugin PLUGIN ID I Status OK File Buffers Messages get String Java Text File Buffer error close Stream ex NON NLS 1 set Document Content f Document get File Contents monitor f Encoding catch Core Exception x f Document f Manager create Empty Document get Location f Status x get Status  initializeFileBufferContent IProgressMonitor CoreException fDocument fManager createEmptyDocument getLocation fEncoding fHasBOM InputStream getFileContents QualifiedName QualifiedName IContentDescription IContentDescription BYTE_ORDER_MARK IContentDescription getContentTypeManager getDescriptionFor fFile getName fEncoding getCharset fHasBOM getProperty IContentDescription BYTE_ORDER_MARK IOException IOException FileBuffersPlugin getDefault getLog IStatus FileBuffersPlugin PLUGIN_ID IStatus FileBuffersMessages getString JavaTextFileBuffer closeStream setDocumentContent fDocument getFileContents fEncoding CoreException fDocument fManager createEmptyDocument getLocation fStatus getStatus
protected void commit File Buffer Content I Progress Monitor monitor boolean overwrite throws Core Exception String encoding compute Encoding try byte bytes f Document get get Bytes encoding XXX This is a workaround for a corresponding bug in Java readers and writer see http developer java sun com developer bug Parade bugs 4508058 html if f HasBOM CHARSET UTF 8 equals encoding int bom Length I Content Description BOM UTF 8 length byte bytes WithBOM new byte bytes length bom Length System arraycopy I Content Description BOM UTF 8 0 bytes WithBOM 0 bom Length System arraycopy bytes 0 bytes WithBOM bom Length bytes length bytes bytes WithBOM Input Stream stream new Byte Array Input Stream bytes if f File exists if overwrite check Synchronization State here the file synchronizer should actually be removed and afterwards added again However we are already inside an operation so the delta is sent AFTER we have added the listener set File Contents stream overwrite monitor set synchronization stamp to know whether the file synchronizer must become active f Synchronization Stamp f File last Modified TODO if there is an annotation model update it here else try monitor begin Task Saving 2000 NON NLS 1 Container Generator generator new Container Generator f File get Workspace f File get Parent get Full Path generator generate Container new Sub Progress Monitor monitor 1000 f File create stream false new Sub Progress Monitor monitor 1000 finally monitor done catch Unsupported Encoding Exception x String message File Buffers Messages get Formatted String Resource Text File Buffer error unsupported encoding message arg encoding NON NLS 1 I Status s new Status I Status ERROR File Buffers Plugin PLUGIN ID I Status OK message x throw new Core Exception s  commitFileBufferContent IProgressMonitor CoreException computeEncoding fDocument getBytes bugParade fHasBOM CHARSET_UTF_8 bomLength IContentDescription BOM_UTF_8 bytesWithBOM bomLength IContentDescription BOM_UTF_8 bytesWithBOM bomLength bytesWithBOM bomLength bytesWithBOM InputStream ByteArrayInputStream fFile checkSynchronizationState setFileContents fSynchronizationStamp fFile lastModified beginTask ContainerGenerator ContainerGenerator fFile getWorkspace fFile getParent getFullPath generateContainer SubProgressMonitor fFile SubProgressMonitor UnsupportedEncodingException FileBuffersMessages getFormattedString ResourceTextFileBuffer unsupported_encoding message_arg IStatus IStatus FileBuffersPlugin PLUGIN_ID IStatus CoreException
private String compute Encoding User defined encoding has first priority if f Explicit Encoding null return f Explicit Encoding Probe content Reader reader new Buffered Reader new String Reader f Document get try Qualified Name options new Qualified Name I Content Description CHARSET I Content Description BYTE ORDER MARK I Content Description description Platform get Content Type Manager get Description For reader f File get Name options if description null String encoding description get Charset if encoding null return encoding catch IO Exception ex try next strategy finally try reader close catch IO Exception ex File Buffers Plugin get Default get Log log new Status I Status ERROR File Buffers Plugin PLUGIN ID I Status OK File Buffers Messages get String Resource Text File Buffer error close Reader ex NON NLS 1 Use file s encoding if the file has a BOM if f HasBOM return f Encoding Use global default return f Manager get Default Encoding  computeEncoding fExplicitEncoding fExplicitEncoding BufferedReader StringReader fDocument QualifiedName QualifiedName IContentDescription IContentDescription BYTE_ORDER_MARK IContentDescription getContentTypeManager getDescriptionFor fFile getName getCharset IOException IOException FileBuffersPlugin getDefault getLog IStatus FileBuffersPlugin PLUGIN_ID IStatus FileBuffersMessages getString ResourceTextFileBuffer closeReader fHasBOM fEncoding fManager getDefaultEncoding
Intitializes the given document with the given stream using the given encoding param document the document to be initialized param content Stream the stream which delivers the document content param encoding the character encoding for reading the given stream exception Core Exception if the given stream can not be read private void set Document Content I Document document Input Stream content Stream String encoding throws Core Exception Reader in null try if encoding null encoding f Manager get Default Encoding XXX This is a workaround for a corresponding bug in Java readers and writer see http developer java sun com developer bug Parade bugs 4508058 html p if f HasBOM CHARSET UTF 8 equals encoding content Stream read new byte I Content Description BOM UTF 8 length in new Buffered Reader new Input Stream Reader content Stream encoding BUFFER SIZE String Buffer buffer new String Buffer BUFFER SIZE char read Buffer new char READER CHUNK SIZE int n in read read Buffer while n 0 buffer append read Buffer 0 n n in read read Buffer document set buffer to String catch IO Exception x String msg x get Message null x get Message NON NLS 1 I Status s new Status I Status ERROR File Buffers Plugin PLUGIN ID I Status OK msg x throw new Core Exception s finally if in null try in close catch IO Exception x  contentStream CoreException setDocumentContent IDocument InputStream contentStream CoreException fManager getDefaultEncoding bugParade fHasBOM CHARSET_UTF_8 contentStream IContentDescription BOM_UTF_8 BufferedReader InputStreamReader contentStream BUFFER_SIZE StringBuffer StringBuffer BUFFER_SIZE readBuffer READER_CHUNK_SIZE readBuffer readBuffer readBuffer toString IOException getMessage getMessage IStatus IStatus FileBuffersPlugin PLUGIN_ID IStatus CoreException IOException
Checks whether the given file is synchronized with the the local file system If the file has been changed a code Core Exception code is thrown param file the file to check exception Core Exception if file has been changed on the file system private void check Synchronization State throws Core Exception if is Synchronized Status status new Status I Status ERROR File Buffers Plugin PLUGIN ID I Resource Status OUT OF SYNC LOCAL File Buffers Messages get String File Buffer error out Of Sync null NON NLS 1 throw new Core Exception status  CoreException CoreException checkSynchronizationState CoreException isSynchronized IStatus FileBuffersPlugin PLUGIN_ID IResourceStatus OUT_OF_SYNC_LOCAL FileBuffersMessages getString FileBuffer outOfSync CoreException

Creates a new safe runnable for the given file public Safe File Change  SafeFileChange
Execute the change Subclass responsibility exception an exception in case of error protected void execute throws Exception 
Does everything necessary prior to execution public void pre Run f Manager fire State Changing Resource File Buffer this  preRun fManager fireStateChanging ResourceFileBuffer
public void run if is Disposed f Manager fire State Change Failed Resource File Buffer this return try execute catch Exception x File Buffers Plugin get Default get Log log new Status I Status ERROR File Buffers Plugin PLUGIN ID I Status OK Exception when synchronizing x NON NLS 1 f Manager fire State Change Failed Resource File Buffer this  isDisposed fManager fireStateChangeFailed ResourceFileBuffer FileBuffersPlugin getDefault getLog IStatus FileBuffersPlugin PLUGIN_ID IStatus fManager fireStateChangeFailed ResourceFileBuffer
Creates a new file synchronizer Is not yet installed on a file public File Synchronizer  FileSynchronizer
Installs the synchronizer on the file public void install f File get Workspace add Resource Change Listener this f Is Installed true  fFile getWorkspace addResourceChangeListener fIsInstalled
Uninstalls the synchronizer from the file public void uninstall f File get Workspace remove Resource Change Listener this f Is Installed false  fFile getWorkspace removeResourceChangeListener fIsInstalled
public void resource Changed I Resource Change Event e I Resource Delta delta e get Delta try if delta null f Is Installed delta accept this catch Core Exception x handle Core Exception x  resourceChanged IResourceChangeEvent IResourceDelta getDelta fIsInstalled CoreException handleCoreException
if is Disposed f Can Be Saved is Synchronized file Change new Safe File Change protected void execute throws Exception handle File Content Changed  isDisposed fCanBeSaved isSynchronized fileChange SafeFileChange handleFileContentChanged
final I Path path delta get Moved To Path file Change new Safe File Change protected void execute throws Exception handle File Moved path  IPath getMovedToPath fileChange SafeFileChange handleFileMoved
if is Disposed f Can Be Saved file Change new Safe File Change protected void execute throws Exception handle File Deleted  isDisposed fCanBeSaved fileChange SafeFileChange handleFileDeleted
public boolean visit I Resource Delta delta throws Core Exception if delta null f File equals delta get Resource Safe File Change file Change null switch delta get Kind case I Resource Delta CHANGED if I Resource Delta CONTENT delta get Flags 0 if is Disposed f Can Be Saved is Synchronized file Change new Safe File Change protected void execute throws Exception handle File Content Changed break case I Resource Delta REMOVED if I Resource Delta MOVED TO delta get Flags 0 final I Path path delta get Moved To Path file Change new Safe File Change protected void execute throws Exception handle File Moved path else if is Disposed f Can Be Saved file Change new Safe File Change protected void execute throws Exception handle File Deleted break if file Change null file Change pre Run f Manager execute file Change f Synchronization Context Count 0 return true because we are sitting on files anyway  IResourceDelta CoreException fFile getResource SafeFileChange fileChange getKind IResourceDelta IResourceDelta getFlags isDisposed fCanBeSaved isSynchronized fileChange SafeFileChange handleFileContentChanged IResourceDelta IResourceDelta MOVED_TO getFlags IPath getMovedToPath fileChange SafeFileChange handleFileMoved isDisposed fCanBeSaved fileChange SafeFileChange handleFileDeleted fileChange fileChange preRun fManager fileChange fSynchronizationContextCount
public Resource File Buffer Text File Buffer Manager manager super f Manager manager  ResourceFileBuffer TextFileBufferManager fManager
abstract protected void handle File Content Changed  handleFileContentChanged
abstract protected void handle File Content Changed abstract protected void add File Buffer Content Listeners  handleFileContentChanged addFileBufferContentListeners
abstract protected void add File Buffer Content Listeners abstract protected void remove File Buffer Content Listeners  addFileBufferContentListeners removeFileBufferContentListeners
abstract protected void remove File Buffer Content Listeners abstract protected void initialize File Buffer Content I Progress Monitor monitor throws Core Exception  removeFileBufferContentListeners initializeFileBufferContent IProgressMonitor CoreException
abstract protected void initialize File Buffer Content I Progress Monitor monitor throws Core Exception abstract protected void commit File Buffer Content I Progress Monitor monitor boolean overwrite throws Core Exception  initializeFileBufferContent IProgressMonitor CoreException commitFileBufferContent IProgressMonitor CoreException
public void create I Path location I Progress Monitor monitor throws Core Exception I File file File Buffers get Workspace File At Location location if file null file exists throw new Core Exception new Status I Status ERROR File Buffers Plugin PLUGIN ID I Status OK File Buffers Messages get String File Buffer error file Does Not Exist null NON NLS 1 f Location location f File file f File Synchronizer new File Synchronizer refresh File monitor initialize File Buffer Content monitor f Synchronization Stamp f File get Modification Stamp add File Buffer Content Listeners  IPath IProgressMonitor CoreException IFile FileBuffers getWorkspaceFileAtLocation CoreException IStatus FileBuffersPlugin PLUGIN_ID IStatus FileBuffersMessages getString FileBuffer fileDoesNotExist fLocation fFile fFileSynchronizer FileSynchronizer refreshFile initializeFileBufferContent fSynchronizationStamp fFile getModificationStamp addFileBufferContentListeners
public void connect f Reference Count if f Reference Count 1 connected  fReferenceCount fReferenceCount
Called when this file buffer has been connected This is the case when there is exactly one connection p Clients may extend this method protected void connected f File Synchronizer install  fFileSynchronizer
public void disconnect throws Core Exception f Reference Count if f Reference Count 0 disconnected  CoreException fReferenceCount fReferenceCount
Called when this file buffer has been disconnected This is the case when the number of connections drops to code 0 code p Clients may extend this method protected void disconnected if f File Synchronizer null f File Synchronizer uninstall f File Synchronizer null  fFileSynchronizer fFileSynchronizer fFileSynchronizer
Returns whether this file buffer has already been disposed return code true code if already disposed code false code otherwise public boolean is Disposed return f File Synchronizer null  isDisposed fFileSynchronizer
see org eclipse core filebuffers I File Buffer get Location public I Path get Location return f Location  IFileBuffer getLocation IPath getLocation fLocation
public void commit I Progress Monitor monitor boolean overwrite throws Core Exception if is Disposed f Can Be Saved f Manager fire State Changing this try commit File Buffer Content monitor overwrite catch Core Exception x f Manager fire State Change Failed this throw x catch Runtime Exception x f Manager fire State Change Failed this throw x f Can Be Saved false add File Buffer Content Listeners f Manager fire Dirty State Changed this f Can Be Saved  IProgressMonitor CoreException isDisposed fCanBeSaved fManager fireStateChanging commitFileBufferContent CoreException fManager fireStateChangeFailed RuntimeException fManager fireStateChangeFailed fCanBeSaved addFileBufferContentListeners fManager fireDirtyStateChanged fCanBeSaved
see org eclipse core filebuffers I File Buffer is Dirty public boolean is Dirty return f Can Be Saved  IFileBuffer isDirty isDirty fCanBeSaved
see org eclipse core filebuffers I File Buffer is Shared public boolean is Shared return f Reference Count 1  IFileBuffer isShared isShared fReferenceCount
public void validate State I Progress Monitor monitor Object computation Context throws Core Exception if is Disposed f Is State Validated if f File is Read Only I Workspace workspace f File get Workspace f Status workspace validate Edit new I File f File computation Context if f Status isOK handle File Content Changed f Is State Validated true f Manager fire State Validation Changed this f Is State Validated  validateState IProgressMonitor computationContext CoreException isDisposed fIsStateValidated fFile isReadOnly IWorkspace fFile getWorkspace fStatus validateEdit IFile fFile computationContext fStatus handleFileContentChanged fIsStateValidated fManager fireStateValidationChanged fIsStateValidated
see org eclipse core filebuffers I File Buffer is State Validated public boolean is State Validated return f Is State Validated  IFileBuffer isStateValidated isStateValidated fIsStateValidated
public void reset State Validation if f Is State Validated f Is State Validated false f Manager fire State Validation Changed this f Is State Validated  resetStateValidation fIsStateValidated fIsStateValidated fManager fireStateValidationChanged fIsStateValidated
Sends out the notification that the file serving as document input has been moved param new Location the path of the new location of the file protected void handle File Moved I Path new Location f Manager fire Underlying File Moved this new Location  newLocation handleFileMoved IPath newLocation fManager fireUnderlyingFileMoved newLocation
Sends out the notification that the file serving as document input has been deleted protected void handle File Deleted f Manager fire Underlying File Deleted this  handleFileDeleted fManager fireUnderlyingFileDeleted
Refreshes the given file protected void refresh File I Progress Monitor monitor try f File refresh Local I File DEPTH INFINITE monitor catch Operation Canceled Exception x catch Core Exception x handle Core Exception x  refreshFile IProgressMonitor fFile refreshLocal IFile DEPTH_INFINITE OperationCanceledException CoreException handleCoreException
Defines the standard procedure to handle code Core Exceptions code Exceptions are written to the plug in log param exception the exception to be logged param message the message to be logged protected void handle Core Exception Core Exception exception I Log log File Buffers Plugin get Default get Log log log exception get Status  CoreExceptions handleCoreException CoreException ILog FileBuffersPlugin getDefault getLog getStatus
see org eclipse core filebuffers I File Buffer is Synchronized public boolean is Synchronized return f Synchronization Stamp f File get Modification Stamp f File is Synchronized I Resource DEPTH ZERO  IFileBuffer isSynchronized isSynchronized fSynchronizationStamp fFile getModificationStamp fFile isSynchronized IResource DEPTH_ZERO
public long get Modification Stamp File file File Buffers get System File At Location get Location if file null return file last Modified return I Resource NULL STAMP  getModificationStamp FileBuffers getSystemFileAtLocation getLocation lastModified IResource NULL_STAMP
Requests the file buffer manager s synchronization context for this file buffer public void request Synchronization Context f Synchronization Context Count  requestSynchronizationContext fSynchronizationContextCount
Releases the file buffer manager s synchronization context for this file buffer public void release Synchronization Context f Synchronization Context Count  releaseSynchronizationContext fSynchronizationContextCount

see org eclipse jface text I Document Listener document About To Be Changed org eclipse jface text Document Event public void document About To Be Changed Document Event event  IDocumentListener documentAboutToBeChanged DocumentEvent documentAboutToBeChanged DocumentEvent
public void document Changed Document Event event f Can Be Saved true remove File Buffer Content Listeners f Manager fire Dirty State Changed Resource Text File Buffer this f Can Be Saved  documentChanged DocumentEvent fCanBeSaved removeFileBufferContentListeners fManager fireDirtyStateChanged ResourceTextFileBuffer fCanBeSaved
public Resource Text File Buffer Text File Buffer Manager manager super manager  ResourceTextFileBuffer TextFileBufferManager
see org eclipse core buffer text I Buffered Text File get Document public I Document get Document return f Document  IBufferedTextFile getDocument IDocument getDocument fDocument
see org eclipse core filebuffers I Text File Buffer get Annotation Model public I Annotation Model get Annotation Model return f Annotation Model  ITextFileBuffer getAnnotationModel IAnnotationModel getAnnotationModel fAnnotationModel
see org eclipse core buffer text I Buffered Text File get Encoding public String get Encoding return f Encoding  IBufferedTextFile getEncoding getEncoding fEncoding
public void set Encoding String encoding f Encoding encoding f Explicit Encoding encoding f HasBOM false try f File set Charset encoding if encoding null f Encoding f File get Charset set HasBOM catch Core Exception x handle Core Exception x  setEncoding fEncoding fExplicitEncoding fHasBOM fFile setCharset fEncoding fFile getCharset setHasBOM CoreException handleCoreException
public I Status get Status if is Disposed if f Status null return f Status return f Document null STATUS ERROR STATUS OK return STATUS ERROR  IStatus getStatus isDisposed fStatus fStatus fDocument STATUS_ERROR STATUS_OK STATUS_ERROR
public void revert I Progress Monitor monitor throws Core Exception if is Disposed return refresh File monitor I Document original null I Status status null try original f Manager create Empty Document f File get Location set Document Content original f File get Contents f Encoding catch Core Exception x status x get Status f Status status if original null String original Contents original get boolean replace Contents original Contents equals f Document get if replace Contents f Manager fire Buffer Content About To Be Replaced this f Document set original get if f Can Be Saved f Can Be Saved false add File Buffer Content Listeners if replace Contents f Manager fire Buffer Content Replaced this if f Annotation Model instanceof I Persistable Annotation Model I Persistable Annotation Model persistable Model I Persistable Annotation Model f Annotation Model persistable Model revert f Document f Manager fire Dirty State Changed this f Can Be Saved  IProgressMonitor CoreException isDisposed refreshFile IDocument IStatus fManager createEmptyDocument fFile getLocation setDocumentContent fFile getContents fEncoding CoreException getStatus fStatus originalContents replaceContents originalContents fDocument replaceContents fManager fireBufferContentAboutToBeReplaced fDocument fCanBeSaved fCanBeSaved addFileBufferContentListeners replaceContents fManager fireBufferContentReplaced fAnnotationModel IPersistableAnnotationModel IPersistableAnnotationModel persistableModel IPersistableAnnotationModel fAnnotationModel persistableModel fDocument fManager fireDirtyStateChanged fCanBeSaved
see org eclipse core internal filebuffers File Buffer add File Buffer Content Listeners protected void add File Buffer Content Listeners if f Document null f Document add Document Listener f Document Listener  FileBuffer addFileBufferContentListeners addFileBufferContentListeners fDocument fDocument addDocumentListener fDocumentListener
see org eclipse core internal filebuffers File Buffer remove File Buffer Content Listeners protected void remove File Buffer Content Listeners if f Document null f Document remove Document Listener f Document Listener  FileBuffer removeFileBufferContentListeners removeFileBufferContentListeners fDocument fDocument removeDocumentListener fDocumentListener
protected void initialize File Buffer Content I Progress Monitor monitor throws Core Exception try f Encoding null f Explicit Encoding null try f Encoding f File get Persistent Property ENCODING KEY catch Core Exception x we ignore exceptions here because we support the ENCODING KEY property only for compatibility reasons if f Encoding null if we found an old encoding property we try to migrate it to the new core resources encoding support try f Explicit Encoding f Encoding f File set Charset f Encoding if successful delete old property f File set Persistent Property ENCODING KEY null catch Core Exception ex log problem because we could not migrate the property successfully handle Core Exception ex else f Explicit Encoding f File get Charset false if f Explicit Encoding null f Encoding f Explicit Encoding else f Encoding f File get Charset set HasBOM f Document f Manager create Empty Document f File get Location set Document Content f Document f File get Contents f Encoding f Annotation Model f Manager create Annotation Model f File get Location catch Core Exception x f Document f Manager create Empty Document f File get Location f Status x get Status  initializeFileBufferContent IProgressMonitor CoreException fEncoding fExplicitEncoding fEncoding fFile getPersistentProperty ENCODING_KEY CoreException ENCODING_KEY fEncoding fExplicitEncoding fEncoding fFile setCharset fEncoding fFile setPersistentProperty ENCODING_KEY CoreException handleCoreException fExplicitEncoding fFile getCharset fExplicitEncoding fEncoding fExplicitEncoding fEncoding fFile getCharset setHasBOM fDocument fManager createEmptyDocument fFile getLocation setDocumentContent fDocument fFile getContents fEncoding fAnnotationModel fManager createAnnotationModel fFile getLocation CoreException fDocument fManager createEmptyDocument fFile getLocation fStatus getStatus
Sets whether the underlying file has a BOM throws Core Exception if reading of file s content description fails protected void set HasBOM throws Core Exception f HasBOM false I Content Description description f File get Content Description f HasBOM description null description get Property I Content Description BYTE ORDER MARK null  CoreException setHasBOM CoreException fHasBOM IContentDescription fFile getContentDescription fHasBOM getProperty IContentDescription BYTE_ORDER_MARK
protected void connected super connected if f Annotation Model null f Annotation Model connect f Document  fAnnotationModel fAnnotationModel fDocument
protected void disconnected if f Annotation Model null f Annotation Model disconnect f Document super disconnected  fAnnotationModel fAnnotationModel fDocument
protected void commit File Buffer Content I Progress Monitor monitor boolean overwrite throws Core Exception String encoding compute Encoding try byte bytes f Document get get Bytes encoding XXX This is a workaround for a corresponding bug in Java readers and writer see http developer java sun com developer bug Parade bugs 4508058 html if f HasBOM CHARSET UTF 8 equals encoding int bom Length I Content Description BOM UTF 8 length byte bytes WithBOM new byte bytes length bom Length System arraycopy I Content Description BOM UTF 8 0 bytes WithBOM 0 bom Length System arraycopy bytes 0 bytes WithBOM bom Length bytes length bytes bytes WithBOM Input Stream stream new Byte Array Input Stream bytes if f File exists if overwrite check Synchronization State here the file synchronizer should actually be removed and afterwards added again However we are already inside an operation so the delta is sent AFTER we have added the listener f File set Contents stream overwrite true monitor set synchronization stamp to know whether the file synchronizer must become active f Synchronization Stamp f File get Modification Stamp if f Annotation Model instanceof I Persistable Annotation Model I Persistable Annotation Model persistable Model I Persistable Annotation Model f Annotation Model persistable Model commit f Document else try monitor begin Task Saving 2000 NON NLS 1 Container Generator generator new Container Generator f File get Workspace f File get Parent get Full Path generator generate Container new Sub Progress Monitor monitor 1000 f File create stream false new Sub Progress Monitor monitor 1000 finally monitor done catch Unsupported Encoding Exception x String message File Buffers Messages get Formatted String Resource Text File Buffer error unsupported encoding message arg encoding NON NLS 1 I Status s new Status I Status ERROR File Buffers Plugin PLUGIN ID I Status OK message x throw new Core Exception s  commitFileBufferContent IProgressMonitor CoreException computeEncoding fDocument getBytes bugParade fHasBOM CHARSET_UTF_8 bomLength IContentDescription BOM_UTF_8 bytesWithBOM bomLength IContentDescription BOM_UTF_8 bytesWithBOM bomLength bytesWithBOM bomLength bytesWithBOM InputStream ByteArrayInputStream fFile checkSynchronizationState fFile setContents fSynchronizationStamp fFile getModificationStamp fAnnotationModel IPersistableAnnotationModel IPersistableAnnotationModel persistableModel IPersistableAnnotationModel fAnnotationModel persistableModel fDocument beginTask ContainerGenerator ContainerGenerator fFile getWorkspace fFile getParent getFullPath generateContainer SubProgressMonitor fFile SubProgressMonitor UnsupportedEncodingException FileBuffersMessages getFormattedString ResourceTextFileBuffer unsupported_encoding message_arg IStatus IStatus FileBuffersPlugin PLUGIN_ID IStatus CoreException
private String compute Encoding User defined encoding has first priority if f Explicit Encoding null return f Explicit Encoding try FIXME Check whether explicit encoding has been set via properties dialog This is needed because no notification is sent when this property changes see https bugs eclipse org bugs show bug cgi id 64077 f Explicit Encoding f File get Charset false if f Explicit Encoding null return f Explicit Encoding catch Core Exception e Probe content Reader reader new Buffered Reader new String Reader f Document get try Qualified Name options new Qualified Name I Content Description CHARSET I Content Description BYTE ORDER MARK I Content Description description Platform get Content Type Manager get Description For reader f File get Name options if description null String encoding description get Charset if encoding null return encoding catch IO Exception ex try next strategy finally try reader close catch IO Exception ex File Buffers Plugin get Default get Log log new Status I Status ERROR File Buffers Plugin PLUGIN ID I Status OK File Buffers Messages get String Resource Text File Buffer error close Reader ex NON NLS 1 Use file s encoding if the file has a BOM if f HasBOM return f Encoding Use parent chain try return f File get Parent get Default Charset catch Core Exception ex Use global default return f Manager get Default Encoding  computeEncoding fExplicitEncoding fExplicitEncoding show_bug fExplicitEncoding fFile getCharset fExplicitEncoding fExplicitEncoding CoreException BufferedReader StringReader fDocument QualifiedName QualifiedName IContentDescription IContentDescription BYTE_ORDER_MARK IContentDescription getContentTypeManager getDescriptionFor fFile getName getCharset IOException IOException FileBuffersPlugin getDefault getLog IStatus FileBuffersPlugin PLUGIN_ID IStatus FileBuffersMessages getString ResourceTextFileBuffer closeReader fHasBOM fEncoding fFile getParent getDefaultCharset CoreException fManager getDefaultEncoding
Updates the element info to a change of the file content and sends out appropriate notifications protected void handle File Content Changed if is Disposed return I Document document f Manager create Empty Document f File get Location I Status status null try set Document Content document f File get Contents false f Encoding catch Core Exception x status x get Status String new Content document get if new Content equals f Document get f Manager fire Buffer Content About To Be Replaced this remove File Buffer Content Listeners f Document set new Content f Can Be Saved false f Synchronization Stamp f File get Modification Stamp f Status status add File Buffer Content Listeners f Manager fire Buffer Content Replaced this if f Annotation Model instanceof I Persistable Annotation Model I Persistable Annotation Model persistable Model I Persistable Annotation Model f Annotation Model try persistable Model reinitialize f Document catch Core Exception x f Status status else remove File Buffer Content Listeners f Can Be Saved false f Synchronization Stamp f File get Modification Stamp f Status status add File Buffer Content Listeners f Manager fire Dirty State Changed this f Can Be Saved  handleFileContentChanged isDisposed IDocument fManager createEmptyDocument fFile getLocation IStatus setDocumentContent fFile getContents fEncoding CoreException getStatus newContent newContent fDocument fManager fireBufferContentAboutToBeReplaced removeFileBufferContentListeners fDocument newContent fCanBeSaved fSynchronizationStamp fFile getModificationStamp fStatus addFileBufferContentListeners fManager fireBufferContentReplaced fAnnotationModel IPersistableAnnotationModel IPersistableAnnotationModel persistableModel IPersistableAnnotationModel fAnnotationModel persistableModel fDocument CoreException fStatus removeFileBufferContentListeners fCanBeSaved fSynchronizationStamp fFile getModificationStamp fStatus addFileBufferContentListeners fManager fireDirtyStateChanged fCanBeSaved
Intitializes the given document with the given stream using the given encoding param document the document to be initialized param content Stream the stream which delivers the document content param encoding the character encoding for reading the given stream exception Core Exception if the given stream can not be read private void set Document Content I Document document Input Stream content Stream String encoding throws Core Exception Reader in null try if encoding null encoding f Manager get Default Encoding XXX This is a workaround for a corresponding bug in Java readers and writer see http developer java sun com developer bug Parade bugs 4508058 html if f HasBOM CHARSET UTF 8 equals encoding content Stream read new byte I Content Description BOM UTF 8 length in new Buffered Reader new Input Stream Reader content Stream encoding BUFFER SIZE String Buffer buffer new String Buffer BUFFER SIZE char read Buffer new char READER CHUNK SIZE int n in read read Buffer while n 0 buffer append read Buffer 0 n n in read read Buffer document set buffer to String catch IO Exception x String message x get Message null x get Message NON NLS 1 I Status s new Status I Status ERROR File Buffers Plugin PLUGIN ID I Status OK message x throw new Core Exception s finally if in null try in close catch IO Exception x  contentStream CoreException setDocumentContent IDocument InputStream contentStream CoreException fManager getDefaultEncoding bugParade fHasBOM CHARSET_UTF_8 contentStream IContentDescription BOM_UTF_8 BufferedReader InputStreamReader contentStream BUFFER_SIZE StringBuffer StringBuffer BUFFER_SIZE readBuffer READER_CHUNK_SIZE readBuffer readBuffer readBuffer toString IOException getMessage getMessage IStatus IStatus FileBuffersPlugin PLUGIN_ID IStatus CoreException IOException
Checks whether the given file is synchronized with the the local file system If the file has been changed a code Core Exception code is thrown param file the file to check exception Core Exception if file has been changed on the file system private void check Synchronization State throws Core Exception if f File is Synchronized I File DEPTH ZERO Status status new Status I Status ERROR File Buffers Plugin PLUGIN ID I Resource Status OUT OF SYNC LOCAL File Buffers Messages get String File Buffer error out Of Sync null NON NLS 1 throw new Core Exception status  CoreException CoreException checkSynchronizationState CoreException fFile isSynchronized IFile DEPTH_ZERO IStatus FileBuffersPlugin PLUGIN_ID IResourceStatus OUT_OF_SYNC_LOCAL FileBuffersMessages getString FileBuffer outOfSync CoreException

public Text File Buffer Manager f Registry new Extensions Registry  TextFileBufferManager fRegistry ExtensionsRegistry
public void connect I Path location I Progress Monitor monitor throws Core Exception Assert is Not Null location location File Buffers normalize Location location Abstract File Buffer file Buffer Abstract File Buffer f Files Buffers get location if file Buffer null file Buffer create File Buffer location if file Buffer null throw new Core Exception new Status I Status ERROR File Buffers Plugin PLUGIN ID 0 File Buffers Messages get String File Buffer Manager error can Not Create Filebuffer null NON NLS 1 file Buffer create location monitor file Buffer connect f Files Buffers put location file Buffer fire Buffer Created file Buffer else file Buffer connect  IPath IProgressMonitor CoreException isNotNull FileBuffers normalizeLocation AbstractFileBuffer fileBuffer AbstractFileBuffer fFilesBuffers fileBuffer fileBuffer createFileBuffer fileBuffer CoreException IStatus FileBuffersPlugin PLUGIN_ID FileBuffersMessages getString FileBufferManager canNotCreateFilebuffer fileBuffer fileBuffer fFilesBuffers fileBuffer fireBufferCreated fileBuffer fileBuffer
public void disconnect I Path location I Progress Monitor monitor throws Core Exception Assert is Not Null location location File Buffers normalize Location location Abstract File Buffer file Buffer Abstract File Buffer f Files Buffers get location if file Buffer null file Buffer disconnect if file Buffer is Disposed f Files Buffers remove location fire Buffer Disposed file Buffer  IPath IProgressMonitor CoreException isNotNull FileBuffers normalizeLocation AbstractFileBuffer fileBuffer AbstractFileBuffer fFilesBuffers fileBuffer fileBuffer fileBuffer isDisposed fFilesBuffers fireBufferDisposed fileBuffer
private Abstract File Buffer create File Buffer I Path location if is Text File location return null if is Workspace Resource location return new Resource Text File Buffer this return new Java Text File Buffer this  AbstractFileBuffer createFileBuffer IPath isTextFile isWorkspaceResource ResourceTextFileBuffer JavaTextFileBuffer
private boolean is Workspace Resource I Path location return File Buffers get Workspace File At Location location null  isWorkspaceResource IPath FileBuffers getWorkspaceFileAtLocation
private boolean is Text File I Path location return true  isTextFile IPath
see org eclipse core filebuffers I File Buffer Manager get File Buffer org eclipse core runtime I Path public I File Buffer get File Buffer I Path location location File Buffers normalize Location location return I File Buffer f Files Buffers get location  IFileBufferManager getFileBuffer IPath IFileBuffer getFileBuffer IPath FileBuffers normalizeLocation IFileBuffer fFilesBuffers
see org eclipse core filebuffers I Text File Buffer Manager get Text File Buffer org eclipse core runtime I Path public I Text File Buffer get Text File Buffer I Path location location File Buffers normalize Location location return I Text File Buffer f Files Buffers get location  ITextFileBufferManager getTextFileBuffer IPath ITextFileBuffer getTextFileBuffer IPath FileBuffers normalizeLocation ITextFileBuffer fFilesBuffers
see org eclipse core buffer text I Buffered File Manager get Default Encoding public String get Default Encoding return Resources Plugin get Encoding  IBufferedFileManager getDefaultEncoding getDefaultEncoding ResourcesPlugin getEncoding
public I Document create Empty Document I Path location Assert is Not Null location location File Buffers normalize Location location I Document Factory factory f Registry get Document Factory location I Document document null if factory null document factory create Document else document new Document I Document Setup Participant participants f Registry get Document Setup Participants location if participants null for int i 0 i participants length i participants i setup document return document  IDocument createEmptyDocument IPath isNotNull FileBuffers normalizeLocation IDocumentFactory fRegistry getDocumentFactory IDocument createDocument IDocumentSetupParticipant fRegistry getDocumentSetupParticipants
public I Annotation Model create Annotation Model I Path location Assert is Not Null location location File Buffers normalize Location location I Annotation Model Factory factory f Registry get Annotation Model Factory location if factory null return factory create Annotation Model location return null  IAnnotationModel createAnnotationModel IPath isNotNull FileBuffers normalizeLocation IAnnotationModelFactory fRegistry getAnnotationModelFactory createAnnotationModel
public void add File Buffer Listener I File Buffer Listener listener Assert is Not Null listener if f File Buffer Listeners contains listener f File Buffer Listeners add listener  addFileBufferListener IFileBufferListener isNotNull fFileBufferListeners fFileBufferListeners
see org eclipse core filebuffers I File Buffer Manager remove File Buffer Listener org eclipse core filebuffers I File Buffer Listener public void remove File Buffer Listener I File Buffer Listener listener Assert is Not Null listener f File Buffer Listeners remove listener  IFileBufferManager removeFileBufferListener IFileBufferListener removeFileBufferListener IFileBufferListener isNotNull fFileBufferListeners
see org eclipse core filebuffers I File Buffer Manager set Synchronization Context org eclipse core filebuffers I Synchronization Context public void set Synchronization Context I Synchronization Context context f Synchronization Context context  IFileBufferManager setSynchronizationContext ISynchronizationContext setSynchronizationContext ISynchronizationContext fSynchronizationContext
public void request Synchronization Context I Path location Assert is Not Null location location File Buffers normalize Location location Abstract File Buffer file Buffer Abstract File Buffer f Files Buffers get location if file Buffer null file Buffer request Synchronization Context  requestSynchronizationContext IPath isNotNull FileBuffers normalizeLocation AbstractFileBuffer fileBuffer AbstractFileBuffer fFilesBuffers fileBuffer fileBuffer requestSynchronizationContext
public void release Synchronization Context I Path location Assert is Not Null location location File Buffers normalize Location location Abstract File Buffer file Buffer Abstract File Buffer f Files Buffers get location if file Buffer null file Buffer release Synchronization Context  releaseSynchronizationContext IPath isNotNull FileBuffers normalizeLocation AbstractFileBuffer fileBuffer AbstractFileBuffer fFilesBuffers fileBuffer fileBuffer releaseSynchronizationContext
Executes the given runnable in the synchronization context of this file buffer manager If there is no synchronization context connected with this manager the runnable is directly executed param runnable the runnable to be executed public void execute Runnable runnable boolean request Synchronization Context if request Synchronization Context f Synchronization Context null f Synchronization Context run runnable else runnable run  requestSynchronizationContext requestSynchronizationContext fSynchronizationContext fSynchronizationContext
protected void fire Dirty State Changed I File Buffer buffer boolean is Dirty Iterator e new Array List f File Buffer Listeners iterator while e has Next I File Buffer Listener l I File Buffer Listener e next l dirty State Changed buffer is Dirty  fireDirtyStateChanged IFileBuffer isDirty ArrayList fFileBufferListeners hasNext IFileBufferListener IFileBufferListener dirtyStateChanged isDirty
protected void fire Buffer Content About To Be Replaced I File Buffer buffer Iterator e new Array List f File Buffer Listeners iterator while e has Next I File Buffer Listener l I File Buffer Listener e next l buffer Content About To Be Replaced buffer  fireBufferContentAboutToBeReplaced IFileBuffer ArrayList fFileBufferListeners hasNext IFileBufferListener IFileBufferListener bufferContentAboutToBeReplaced
protected void fire Buffer Content Replaced I File Buffer buffer Iterator e new Array List f File Buffer Listeners iterator while e has Next I File Buffer Listener l I File Buffer Listener e next l buffer Content Replaced buffer  fireBufferContentReplaced IFileBuffer ArrayList fFileBufferListeners hasNext IFileBufferListener IFileBufferListener bufferContentReplaced
protected void fire Underlying File Moved I File Buffer buffer I Path target Iterator e new Array List f File Buffer Listeners iterator while e has Next I File Buffer Listener l I File Buffer Listener e next l underlying File Moved buffer target  fireUnderlyingFileMoved IFileBuffer IPath ArrayList fFileBufferListeners hasNext IFileBufferListener IFileBufferListener underlyingFileMoved
protected void fire Underlying File Deleted I File Buffer buffer Iterator e new Array List f File Buffer Listeners iterator while e has Next I File Buffer Listener l I File Buffer Listener e next l underlying File Deleted buffer  fireUnderlyingFileDeleted IFileBuffer ArrayList fFileBufferListeners hasNext IFileBufferListener IFileBufferListener underlyingFileDeleted
protected void fire State Validation Changed I File Buffer buffer boolean is State Validated Iterator e new Array List f File Buffer Listeners iterator while e has Next I File Buffer Listener l I File Buffer Listener e next l state Validation Changed buffer is State Validated  fireStateValidationChanged IFileBuffer isStateValidated ArrayList fFileBufferListeners hasNext IFileBufferListener IFileBufferListener stateValidationChanged isStateValidated
protected void fire State Changing I File Buffer buffer Iterator e new Array List f File Buffer Listeners iterator while e has Next I File Buffer Listener l I File Buffer Listener e next l state Changing buffer  fireStateChanging IFileBuffer ArrayList fFileBufferListeners hasNext IFileBufferListener IFileBufferListener stateChanging
protected void fire State Change Failed I File Buffer buffer Iterator e new Array List f File Buffer Listeners iterator while e has Next I File Buffer Listener l I File Buffer Listener e next l state Change Failed buffer  fireStateChangeFailed IFileBuffer ArrayList fFileBufferListeners hasNext IFileBufferListener IFileBufferListener stateChangeFailed
protected void fire Buffer Created I File Buffer buffer Iterator e new Array List f File Buffer Listeners iterator while e has Next I File Buffer Listener l I File Buffer Listener e next l buffer Created buffer  fireBufferCreated IFileBuffer ArrayList fFileBufferListeners hasNext IFileBufferListener IFileBufferListener bufferCreated
protected void fire Buffer Disposed I File Buffer buffer Iterator e new Array List f File Buffer Listeners iterator while e has Next I File Buffer Listener l I File Buffer Listener e next l buffer Disposed buffer  fireBufferDisposed IFileBuffer ArrayList fFileBufferListeners hasNext IFileBufferListener IFileBufferListener bufferDisposed

Creates a new instance of an object for this object store Uses the contents of the field to decide what type of object to create 

Returns a page given a page number a buffer and the page store The buffer should be copied in the implementations as it may be reused later The buffer is extended or truncated to the page size during this copy Both the buffer contents and the page number can be used to determine the type of page to create 

Constructs a new object that will be inserted into a store public Binary Small Object byte value super this value new Buffer value get  BinarySmallObject
Constructs an object from bytes that came from the store public Binary Small Object Field f Object Store store Object Address address throws Object Store Exception super f store address  BinarySmallObject ObjectStore ObjectAddress ObjectStoreException
Places the contents of the fields into the buffer Subclasses should implement and call super The value field is maintained in the contents directly and does not need to be copied there by this method protected void insert Values Field f super insert Values f f subfield VALUE OFFSET put value  insertValues insertValues VALUE_OFFSET
Extracts the values from a field into the members of this object protected void extract Values Field f throws Object Store Exception super extract Values f value f subfield VALUE OFFSET get  extractValues ObjectStoreException extractValues VALUE_OFFSET
Returns the maximum size of this object s instance including its type field Subclasses should override protected int get Maximum Size return 6000 VALUE OFFSET  getMaximumSize VALUE_OFFSET
protected int length return value length VALUE OFFSET  VALUE_OFFSET
Returns the minimum size of this object s instance including its type field Subclasses should override protected int get Minimum Size return VALUE OFFSET  getMinimumSize VALUE_OFFSET
Returns the required type of this class of object Subclasses must override protected int get Required Type return TYPE  getRequiredType
Returns the value of the object public byte get Value return new Field value get  getValue
Provides a printable representation of this object public String to String int n 10 String Buffer b new String Buffer b append BSOB NON NLS 1 b append value length b append NON NLS 1 for int i 0 i value length i if i 0 b append NON NLS 1 if i n break b append value i if value length n b append NON NLS 1 b append NON NLS 1 return b to String  toString StringBuffer StringBuffer toString

Default constructor protected Buffer super 
Create a new buffer using the given byte array as contents Note that this has the potential for aliasing side effects public Buffer byte contents this contents contents 
Create a new buffer of size n public Buffer int n contents new byte n 
Constructor for a new Buffer from an Insertable public Buffer Insertable an Object this contents an Object to Byte Array  anObject anObject toByteArray
public void clear clear contents 0 contents length 
private static void clear byte buffer int offset int length int n length int p offset while n 0 int m Math min ZEROES length n System arraycopy ZEROES 0 buffer p m p m n m 
private static void clear byte buffer int offset int length byte value for int i offset i offset length i buffer i value 
public void clear int offset int length clear contents offset length 
public void clear int offset int length byte value clear contents offset length value 
private static int compare byte buffer1 int offset1 int length1 byte buffer2 int offset2 int length2 if length1 length2 return compare buffer2 offset2 length2 buffer1 offset1 length1 for int i 0 i length2 i int j1 buffer1 offset1 i 255 int j2 buffer2 offset2 i 255 if j1 j2 return 1 if j1 j2 return 1 if length1 length2 return 1 return 0 
public static int compare Buffer buffer1 int offset1 int length1 Buffer buffer2 int offset2 int length2 return compare buffer1 contents offset1 length1 buffer2 contents offset2 length2 
public static int compare Buffer buffer1 Buffer buffer2 return compare buffer1 contents 0 buffer1 contents length buffer2 contents 0 buffer2 contents length 
public void copy Internal int from Offset int to Offset int length System arraycopy contents from Offset contents to Offset length  copyInternal fromOffset toOffset fromOffset toOffset
public void copy To byte buffer int n Math min buffer length contents length System arraycopy contents 0 buffer 0 n  copyTo
public void copy From byte buffer int n Math min buffer length contents length System arraycopy buffer 0 contents 0 n  copyFrom
public byte get return get 0 contents length 
public byte get int offset int length byte result new byte length System arraycopy contents offset result 0 length return result 
public byte get Field Def d return get d offset d length  FieldDef
public Field get Field int offset int length return new Field this offset length  getField
public Field get Field Field Def d return new Field this d offset d length  getField FieldDef
public byte get Byte int offset return contents offset  getByte
public int get Int int offset int length return int get Long offset length  getInt getLong
public int get Int Field Def d return int get Long d offset d length  getInt FieldDef getLong
public int getU Int int offset int length int shift Math max 0 32 length 8 int mask 1 shift Integer MAX VALUE return get Int offset length mask  getUInt MAX_VALUE getInt
public int getU Int Field Def d return getU Int d offset d length  getUInt FieldDef getUInt
public long get Long int offset int length if length 0 return 0 long v contents offset for int i offset 1 i offset length i v v 8 contents i 255 return v  getLong
public long get Long Field Def d return get Long d offset d length  getLong FieldDef getLong
public byte get Byte Array return contents  getByteArray
public int length return contents length 
public Pointer point To int offset return new Pointer this offset  pointTo
public void put int offset byte value contents offset value 
public void put int offset byte source System arraycopy source 0 contents offset source length 
public void put int offset int length byte source int n Math min length source length System arraycopy source 0 contents offset n 
public void put Field Def d byte source put d offset d length source  FieldDef
public void put int offset int length long n long v n int i offset length while i offset i contents i byte v v v 8 
public void put Field Def d long n put d offset d length n  FieldDef
public void put int offset int length int n put offset length long n 
public void put Field Def d int n put d offset d length long n  FieldDef
public void put int offset Insertable source put offset source to Byte Array  toByteArray

Converts the string argument to a byte array static String fromUTF8 byte b String result try result new String b UTF8 NON NLS 1 catch Unsupported Encoding Exception e result new String b return result  UnsupportedEncodingException
Converts the string argument to a byte array static byte toUTF8 String s byte result try result s get Bytes UTF8 NON NLS 1 catch Unsupported Encoding Exception e result s get Bytes return result  getBytes UnsupportedEncodingException getBytes

Constructor for a new Field public Field byte bytes this buffer new Buffer bytes this offset 0 this length bytes length 
Constructor for a new Field public Field byte bytes int offset int length this buffer new Buffer bytes this offset offset this length Math min bytes length length 
Constructor for a new Field public Field byte bytes Field Def d this buffer new Buffer bytes this offset d offset this length Math min bytes length d length  FieldDef
Constructor for a new Field public Field int n this buffer new Buffer n this offset 0 this length n 
Constructor for a new Field public Field Buffer buffer int offset int length this buffer buffer this offset offset this length length 
Constructor for a new Field public Field Buffer buffer Field Def d this buffer buffer this offset d offset this length d length  FieldDef
Constructor for a new Field public Field Insertable an Object buffer new Buffer an Object offset 0 length buffer length  anObject anObject
public Field clear buffer clear offset length return this 
public Field clear byte value buffer clear offset length value return this 
public int compare To Field that return Buffer compare this buffer this offset this length that buffer that offset that length  compareTo
public Field subfield int offset int length if offset length this length throw new Illegal Argument Exception return buffer get Field this offset offset length  IllegalArgumentException getField
public Field subfield Field Def d if d offset d length this length throw new Illegal Argument Exception return buffer get Field this offset d offset d length  FieldDef IllegalArgumentException getField
public Field subfield int offset return subfield offset this length offset 
public byte get return buffer get offset length 
public int get Int return buffer get Int offset length  getInt getInt
public long get Long return buffer get Long offset length  getLong getLong
public int getU Int return buffer getU Int offset length  getUInt getUInt
public byte get Field Def d return subfield d get  FieldDef
public int get Int Field Def d return subfield d get Int  getInt FieldDef getInt
public long get Long Field Def d return subfield d get Long  getLong FieldDef getLong
public int getU Int Field Def d return subfield d getU Int  getUInt FieldDef getUInt
public int length return length 
public int offset return offset 
public Pointer point To int offset return new Pointer buffer this offset offset  pointTo
public Field put byte b buffer put offset length b return this 
public Field put int n buffer put offset length n return this 
public Field put long n buffer put offset length n return this 
public Field put Insertable an Object put an Object to Byte Array return this  anObject anObject toByteArray
public Field put Field Def d byte b subfield d put b return this  FieldDef
public Field put Field Def d int n subfield d put n return this  FieldDef
public Field put Field Def d long n subfield d put n return this  FieldDef
public Field put Field Def d Insertable an Object subfield d put an Object to Byte Array return this  FieldDef anObject anObject toByteArray
Implementation of the Insertable interface public byte to Byte Array return get  toByteArray

Constructor buffer is the underlying Buffer object offset is the offset within that buffer length is the length of each field in the array stride the the number of bytes from the beginning of one element to the beginning of the next count is the number of elements in the array public Field Array Buffer buffer int offset int length int stride int count this buffer buffer this offset offset this length length this stride stride this count count  FieldArray
Returns the number of fields in the array public int count return count 
Returns the ith field of the array public Field field At int i if i count throw new Array Index Out Of Bounds Exception return new Field buffer offset i stride length  fieldAt ArrayIndexOutOfBoundsException
Inserts a new empty field before index i public Field insert int i count if i count throw new Array Index Out Of Bounds Exception int s offset i stride source offset int t s stride target offset int n count i 1 stride number of bytes to move buffer copy Internal s t n return field At i clear  ArrayIndexOutOfBoundsException copyInternal fieldAt
Removes the entry at index i and squeezes the space up Clears the last entry public void remove int i if i count throw new Array Index Out Of Bounds Exception int s offset i 1 stride source offset int t s stride target offset int n count i 1 stride number of bytes to move buffer copy Internal s t n field At count 1 clear count  ArrayIndexOutOfBoundsException copyInternal fieldAt

public Field Def int type int offset int length this type type this offset offset this length length  FieldDef

Default Index constructor private Index super 
Index constructor Index Indexed Store store Object Address anchor Address this store store this anchor Address anchor Address  IndexedStore ObjectAddress anchorAddress anchorAddress anchorAddress
Returns the number of entries in the index public synchronized int get Number Of Entries throws Indexed Store Exception Index Anchor anchor store acquire Anchor anchor Address int n anchor get Number Of Entries anchor release return n  getNumberOfEntries IndexedStoreException IndexAnchor acquireAnchor anchorAddress getNumberOfEntries
Returns the number of nodes in the index public synchronized int get Number Of Nodes throws Indexed Store Exception Index Anchor anchor store acquire Anchor anchor Address int n anchor get Number Of Nodes anchor release return n  getNumberOfNodes IndexedStoreException IndexAnchor acquireAnchor anchorAddress getNumberOfNodes
Returns a vector of ObjectI Ds whose keys match the key given in the index This assumes that the underlying index has values that can be converted to ObjectI Ds public synchronized Vector get Object Identifiers Matching byte key throws Indexed Store Exception Index Cursor cursor open cursor find key Vector vector new Vector 20 while cursor key Matches key vector add Element cursor get Value As ObjectID cursor next cursor close return vector  ObjectIDs ObjectIDs getObjectIdentifiersMatching IndexedStoreException IndexCursor keyMatches addElement getValueAsObjectID
Returns a vector of ObjectI Ds whose keys match the key given in the index This assumes that the underlying index has values that can be converted to ObjectI Ds public synchronized Vector get Object Identifiers Matching String key throws Indexed Store Exception return get Object Identifiers Matching Convert toUTF8 key  ObjectIDs ObjectIDs getObjectIdentifiersMatching IndexedStoreException getObjectIdentifiersMatching
Returns a vector of ObjectI Ds whose keys match the key given in the index This assumes that the underlying index has values that can be converted to ObjectI Ds public synchronized Vector get Object Identifiers Matching Insertable key throws Indexed Store Exception return get Object Identifiers Matching key to Byte Array  ObjectIDs ObjectIDs getObjectIdentifiersMatching IndexedStoreException getObjectIdentifiersMatching toByteArray
Inserts an entry into an index The key and the value are byte arrays Keys cannot be more than 1024 bytes in length Values must not be greater than 2048 bytes in length The other insert methods are convenience methods that use this for their implementation public synchronized void insert byte key byte value throws Indexed Store Exception if key length 1024 throw new Indexed Store Exception Indexed Store Exception Entry Key Length Error if value length 2048 throw new Indexed Store Exception Indexed Store Exception Entry Value Length Error Index Anchor anchor store acquire Anchor anchor Address anchor insert key value anchor release  IndexedStoreException IndexedStoreException IndexedStoreException EntryKeyLengthError IndexedStoreException IndexedStoreException EntryValueLengthError IndexAnchor acquireAnchor anchorAddress
public synchronized void insert byte key String value throws Indexed Store Exception insert key Convert toUTF8 value  IndexedStoreException
public synchronized void insert byte key Insertable value throws Indexed Store Exception insert key value to Byte Array  IndexedStoreException toByteArray
public synchronized void insert String key byte value throws Indexed Store Exception insert Convert toUTF8 key value  IndexedStoreException
public synchronized void insert String key String value throws Indexed Store Exception insert Convert toUTF8 key Convert toUTF8 value  IndexedStoreException
public synchronized void insert String key Insertable value throws Indexed Store Exception insert Convert toUTF8 key value to Byte Array  IndexedStoreException toByteArray
public synchronized void insert Insertable key byte value throws Indexed Store Exception insert key to Byte Array value  IndexedStoreException toByteArray
public synchronized void insert Insertable key String value throws Indexed Store Exception insert key to Byte Array Convert toUTF8 value  IndexedStoreException toByteArray
public synchronized void insert Insertable key Insertable value throws Indexed Store Exception insert key to Byte Array value to Byte Array  IndexedStoreException toByteArray toByteArray
Returns a cursor for this index The cursor is initially in the unset state and should be positioned using find before being used public synchronized Index Cursor open throws Indexed Store Exception Index Cursor c new Index Cursor store anchor Address return c  IndexCursor IndexedStoreException IndexCursor IndexCursor anchorAddress
Removes all entries that have a key that is equal to the supplied key public synchronized void remove All Equal byte key throws Indexed Store Exception Index Cursor c open c find key while c key Equals key c remove Entry c close  removeAllEqual IndexedStoreException IndexCursor keyEquals removeEntry
Removes all entries that have a key that begins with the supplied prefix public synchronized void remove All Matching byte key Prefix throws Indexed Store Exception Index Cursor c open c find key Prefix while c key Matches key Prefix c remove Entry c close  removeAllMatching keyPrefix IndexedStoreException IndexCursor keyPrefix keyMatches keyPrefix removeEntry

Constructs a new index anchor from nothing public Index Anchor super number Of Entries 0 root Node Address Object Address Null  IndexAnchor numberOfEntries rootNodeAddress ObjectAddress
Constructs a new index anchor from a field read from the store Used by the factory public Index Anchor Field f Object Store store Object Address address throws Object Store Exception super f store address  IndexAnchor ObjectStore ObjectAddress ObjectStoreException
Sets the fields definitions Done after the contents are set private void set Fields Field f root Node Address Field f subfield Root Node Address Offset Root Node Address Length number Of Entries Field f subfield Number Of Entries Offset Number Of Entries Length  setFields rootNodeAddressField RootNodeAddressOffset RootNodeAddressLength numberOfEntriesField NumberOfEntriesOffset NumberOfEntriesLength
Places the contents of the fields into the buffer Subclasses should implement and call super protected void insert Values Field f super insert Values f set Fields f number Of Entries Field put number Of Entries root Node Address Field put root Node Address  insertValues insertValues setFields numberOfEntriesField numberOfEntries rootNodeAddressField rootNodeAddress
Places the contents of the buffer into the fields Subclasses should implement and call super protected void extract Values Field f throws Object Store Exception super extract Values f set Fields f number Of Entries number Of Entries Field get Int root Node Address new Object Address root Node Address Field get  extractValues ObjectStoreException extractValues setFields numberOfEntries numberOfEntriesField getInt rootNodeAddress ObjectAddress rootNodeAddressField
Returns the minimum size of this object s instance including its type field Subclasses should override protected int get Minimum Size return SIZE  getMinimumSize
Returns the required type of this class of object Subclasses must override protected int get Required Type return TYPE  getRequiredType
Returns a printable representation of this object public String to String String Buffer b new String Buffer b append Anchor NON NLS 1 b append number Of Entries b append NON NLS 1 b append root Node Address b append NON NLS 1 return b to String  toString StringBuffer StringBuffer numberOfEntries rootNodeAddress toString
Processes the notification that an entry was inserted void entry Inserted Index Node node if node is Leaf number Of Entries set Changed  entryInserted IndexNode isLeaf numberOfEntries setChanged
Processes the notification by a leaf node that an entry was removed void entry Removed Index Node node if node is Leaf number Of Entries set Changed  entryRemoved IndexNode isLeaf numberOfEntries setChanged
Sets the root node address Set when root node is initialized or split void set Root Node Address Object Address root Node Address this root Node Address root Node Address set Changed  setRootNodeAddress ObjectAddress rootNodeAddress rootNodeAddress rootNodeAddress setChanged
This method requests the anchor to destroy its children void destroy Children throws Indexed Store Exception Index Node root Node acquire Node root Node Address root Node destroy Children root Node release remove Object root Node Address  destroyChildren IndexedStoreException IndexNode rootNode acquireNode rootNodeAddress rootNode destroyChildren rootNode removeObject rootNodeAddress
This method returns a cursor set to the first entry in the index whose key is greater than or equal to the key provided To set a cursor to the beginning of the index use a key of zero length void find byte key Index Cursor cursor throws Indexed Store Exception if root Node Address is Null cursor reset else Index Node root Node acquire Node root Node Address root Node find key cursor root Node release  IndexCursor IndexedStoreException rootNodeAddress isNull IndexNode rootNode acquireNode rootNodeAddress rootNode rootNode
This method returns a cursor set to the first entry in the index void find First Entry Index Cursor cursor throws Indexed Store Exception if root Node Address is Null cursor reset else Index Node root Node acquire Node root Node Address root Node find First Entry cursor root Node release  findFirstEntry IndexCursor IndexedStoreException rootNodeAddress isNull IndexNode rootNode acquireNode rootNodeAddress rootNode findFirstEntry rootNode
This method returns a cursor set to the last entry in the index void find Last Entry Index Cursor cursor throws Indexed Store Exception if root Node Address is Null cursor reset else Index Node root Node acquire Node root Node Address root Node find Last Entry cursor root Node release  findLastEntry IndexCursor IndexedStoreException rootNodeAddress isNull IndexNode rootNode acquireNode rootNodeAddress rootNode findLastEntry rootNode
Insert an entry into an index void insert byte key byte value throws Indexed Store Exception if root Node Address is Null Index Node root Node new Index Node this address try store insert Object root Node catch Object Store Exception e throw new Indexed Store Exception Indexed Store Exception Index Node Not Created e root Node Address root Node get Address Index Node root Node acquire Node root Node Address root Node insert Entry key value root Node release  IndexedStoreException rootNodeAddress isNull IndexNode rootNode IndexNode insertObject rootNode ObjectStoreException IndexedStoreException IndexedStoreException IndexNodeNotCreated rootNodeAddress rootNode getAddress IndexNode rootNode acquireNode rootNodeAddress rootNode insertEntry rootNode
Returns the number of entries in the index int get Number Of Entries return number Of Entries  getNumberOfEntries numberOfEntries
Returns the number of nodes in the index int get Number Of Nodes throws Indexed Store Exception if root Node Address is Null return 0 Index Node node acquire Node root Node Address int n node get Number Of Nodes node release return n  getNumberOfNodes IndexedStoreException rootNodeAddress isNull IndexNode acquireNode rootNodeAddress getNumberOfNodes
Returns the root node address Object Address get Root Node Address return root Node Address  ObjectAddress getRootNodeAddress rootNodeAddress

Default constructor for an Index Cursor private Index Cursor super  IndexCursor IndexCursor
Constructor for an Index Cursor Cursors should only be constructed by the index during an open operation Index Cursor Indexed Store store Object Address anchor Address this anchor Address anchor Address this store store this leaf Node null this entry Number 1  IndexCursor IndexCursor IndexedStore ObjectAddress anchorAddress anchorAddress anchorAddress leafNode entryNumber
Adjusts the position of a cursor to point to a real entry entry if it is pointing outside of the entries of a node If there are no more entries then unset the cursor private void adjust throws Indexed Store Exception if leaf Node null return if entry Number leaf Node get Number Of Entries Object Address next leaf Node get Next Address int n entry Number leaf Node get Number Of Entries set next n else if entry Number 0 Object Address previous leaf Node get Previous Address int n entry Number set previous n else  IndexedStoreException leafNode entryNumber leafNode getNumberOfEntries ObjectAddress leafNode getNextAddress entryNumber leafNode getNumberOfEntries entryNumber ObjectAddress leafNode getPreviousAddress entryNumber
Closes the cursor This unsets the cursor and deregisters it from all the interested parties public void close throws Indexed Store Exception reset  IndexedStoreException
Adjusts a cursor if there is a need after an entry is inserted If not it just returns void entry Inserted int i throws Indexed Store Exception if entry Number i entry Number adjust  entryInserted IndexedStoreException entryNumber entryNumber
Adjusts a cursor if there is a need after an entry is removed void entry Removed int i throws Indexed Store Exception entry Removed entry Number i if entry Number i entry Number adjust  entryRemoved IndexedStoreException entryRemoved entryNumber entryNumber entryNumber
Sets the cursor at the first entry of an index whose key is greater than or equal to that of the argument Returns the cursor itself for convenience in chaining method invocations public synchronized Index Cursor find byte b throws Indexed Store Exception Index Anchor anchor store acquire Anchor anchor Address anchor find b this anchor release entry Removed false return this  IndexCursor IndexedStoreException IndexAnchor acquireAnchor anchorAddress entryRemoved
Sets the cursor at the first entry of an index whose key is greater than or equal to that of the argument Returns the cursor itself for convenience in chaining method invocations public synchronized Index Cursor find String s throws Indexed Store Exception return find Convert toUTF8 s  IndexCursor IndexedStoreException
Sets the cursor at the first entry of an index whose key is greater than or equal to that of the argument Returns the cursor itself for convenience in chaining method invocations public synchronized Index Cursor find Insertable i throws Indexed Store Exception return find i to Byte Array  IndexCursor IndexedStoreException toByteArray
Sets the cursor at the first entry of an index public synchronized Index Cursor find First Entry throws Indexed Store Exception Index Anchor anchor store acquire Anchor anchor Address anchor find First Entry this anchor release entry Removed false return this  IndexCursor findFirstEntry IndexedStoreException IndexAnchor acquireAnchor anchorAddress findFirstEntry entryRemoved
Sets the cursor at the last entry of an index public synchronized Index Cursor find Last Entry throws Indexed Store Exception Index Anchor anchor store acquire Anchor anchor Address anchor find Last Entry this anchor release entry Removed false return this  IndexCursor findLastEntry IndexedStoreException IndexAnchor acquireAnchor anchorAddress findLastEntry entryRemoved
Returns the byte array holding the key for the current cursor location If the cursor is at the beginning or end of the index then return null Throws an Entry Removed condition if the entry at which it has been pointing has been removed by another cursor public synchronized byte get Key throws Indexed Store Exception if entry Removed throw new Indexed Store Exception Indexed Store Exception Entry Removed if leaf Node null return null byte key leaf Node get Key entry Number return key  EntryRemoved getKey IndexedStoreException entryRemoved IndexedStoreException IndexedStoreException EntryRemoved leafNode leafNode getKey entryNumber
Returns the key at the cursor as a string If the cursor is at the beginning or end of the index then return null public synchronized String get Key As String throws Indexed Store Exception byte key get Key if key null return null String s Convert fromUTF8 key int i s index Of 0 if i 1 return s return s substring 0 i  getKeyAsString IndexedStoreException getKey indexOf
Returns the byte array holding the value for the current cursor location If the cursor is at the beginning or end of the index then return null Throws an Entry Removed condition if the entry at which it has been pointing has been removed by another cursor public synchronized byte get Value throws Indexed Store Exception if entry Removed throw new Indexed Store Exception Indexed Store Exception Entry Removed if leaf Node null return null byte value leaf Node get Value entry Number return value  EntryRemoved getValue IndexedStoreException entryRemoved IndexedStoreException IndexedStoreException EntryRemoved leafNode leafNode getValue entryNumber
Returns the value as an object address May return null if the cursor is at the beginning or end of the index Object Address get Value As Object Address throws Indexed Store Exception byte value get Value if value null return null return new Object Address value  ObjectAddress getValueAsObjectAddress IndexedStoreException getValue ObjectAddress
Returns the ObjectID from the value for the current cursor location If the cursor is at the beginning or end of the index then return null public synchronized ObjectID get Value As ObjectID throws Indexed Store Exception byte value get Value if value null return null return new ObjectID value  getValueAsObjectID IndexedStoreException getValue
Returns the String from the value for the current cursor location If the cursor is at the beginning or end of the index then return null public synchronized String get Value As String throws Indexed Store Exception byte value get Value if value null return null return Convert fromUTF8 value  getValueAsString IndexedStoreException getValue
This method returns true if the current cursor location before the first entry in the index public synchronized boolean is At Beginning throws Indexed Store Exception if entry Removed throw new Indexed Store Exception Indexed Store Exception Entry Removed return leaf Node null  isAtBeginning IndexedStoreException entryRemoved IndexedStoreException IndexedStoreException EntryRemoved leafNode
This method returns true if the current cursor location after the last entry in the index public synchronized boolean is At End throws Indexed Store Exception if entry Removed throw new Indexed Store Exception Indexed Store Exception Entry Removed return leaf Node null  isAtEnd IndexedStoreException entryRemoved IndexedStoreException IndexedStoreException EntryRemoved leafNode
Returns true if the cursor is set to an entry Returns false otherwise public synchronized boolean is Set throws Indexed Store Exception if entry Removed throw new Indexed Store Exception Indexed Store Exception Entry Removed return leaf Node null  isSet IndexedStoreException entryRemoved IndexedStoreException IndexedStoreException EntryRemoved leafNode
Compares a byte array to the key in the cursor and returns true if the byte array is equal to the key at the entry in the cursor Throws an Entry Removed condition if the entry at which it has been pointing has been removed by another cursor public synchronized boolean key Equals byte b throws Indexed Store Exception if entry Removed throw new Indexed Store Exception Indexed Store Exception Entry Removed if leaf Node null return false byte key leaf Node get Key entry Number if b length key length return false for int i 0 i b length i if key i b i return false return true  EntryRemoved keyEquals IndexedStoreException entryRemoved IndexedStoreException IndexedStoreException EntryRemoved leafNode leafNode getKey entryNumber
Compares a String to the key in the cursor and returns true if the String is equal to the key at the entry in the cursor public synchronized boolean key Equals String s throws Indexed Store Exception return key Equals Convert toUTF8 s  keyEquals IndexedStoreException keyEquals
Compares an Insertable to the key in the cursor and returns true if the String is equal to the key at the entry in the cursor public synchronized boolean key Equals Insertable an Object throws Indexed Store Exception return key Equals an Object to Byte Array  keyEquals anObject IndexedStoreException keyEquals anObject toByteArray
Compares a byte array to the key in the cursor and returns true if the byte array is a prefix of the key at the entry in the cursor Throws an Entry Removed condition if the entry at which it has been pointing has been removed by another cursor public synchronized boolean key Matches byte b throws Indexed Store Exception if entry Removed throw new Indexed Store Exception Indexed Store Exception Entry Removed if leaf Node null return false byte key leaf Node get Key entry Number if key length b length return false for int i 0 i b length i if key i b i return false return true  EntryRemoved keyMatches IndexedStoreException entryRemoved IndexedStoreException IndexedStoreException EntryRemoved leafNode leafNode getKey entryNumber
Compares a String to the key in the cursor and returns true if the byte array is a prefix of the key at the entry in the cursor public synchronized boolean key Matches String s throws Indexed Store Exception return key Matches Convert toUTF8 s  keyMatches IndexedStoreException keyMatches
Compares an Insertable to the key in the cursor and returns true if the byte array is a prefix of the key at the entry in the cursor public synchronized boolean key Matches Insertable an Object throws Indexed Store Exception return key Matches an Object to Byte Array  keyMatches anObject IndexedStoreException keyMatches anObject toByteArray
Moves the cursor to the next index entry If the cursor is at the last entry it becomes unset If the cursor is unset then it is set to the first entry The cursor itself is returned Throws an Entry Removed condition if the entry at which it has been pointing has been removed by another cursor public synchronized Index Cursor next throws Indexed Store Exception if is At Beginning find First Entry else entry Number adjust return this  EntryRemoved IndexCursor IndexedStoreException isAtBeginning findFirstEntry entryNumber
Adjusts a cursor if there is a need after a node has been split If not it just returns void node Split throws Indexed Store Exception adjust  nodeSplit IndexedStoreException
Moves the cursor to the previous index entry If the cursor is at the first entry it becomes unset If the cursor is unset then it is set to the last entry The cursor itself is returned Throws an Entry Removed condition if the entry at which it has been pointing has been removed by another cursor public synchronized Index Cursor previous throws Indexed Store Exception if is At End find Last Entry else entry Number adjust return this  EntryRemoved IndexCursor IndexedStoreException isAtEnd findLastEntry entryNumber
Removes the entry at the current cursor location If the cursor is not set then no operation is done If an element is removed the cursor automatically advances to the next element Removing an element adjusts all cursors including this one pointing into this node If there is no next element the cursor is unset Throws an Entry Removed condition if the entry at which it has been pointing has been removed by another cursor public synchronized void remove throws Indexed Store Exception remove Entry  EntryRemoved IndexedStoreException removeEntry
Removes the entry at the current cursor location If the cursor is not set then no operation is done If an element is removed the cursor automatically advances to the next element Removing an element adjusts all cursors including this one pointing into this node If there is no next element the cursor is unset Throws an Entry Removed condition if the entry at which it has been pointing has been removed by another cursor void remove Entry throws Indexed Store Exception if entry Removed throw new Indexed Store Exception Indexed Store Exception Entry Removed if leaf Node null return Object Address address leaf Node get Address leaf Node remove Entry entry Number entry Removed false Clear the flag This cursor is positioned to the next entry and remains valid remove empty nodes from the tree while address is Null Index Node node store acquire Node address if node get Number Of Entries 0 node release break Object Address parent Address node get Parent Address node unlink node release store remove Object address address parent Address  EntryRemoved removeEntry IndexedStoreException entryRemoved IndexedStoreException IndexedStoreException EntryRemoved leafNode ObjectAddress leafNode getAddress leafNode removeEntry entryNumber entryRemoved isNull IndexNode acquireNode getNumberOfEntries ObjectAddress parentAddress getParentAddress removeObject parentAddress
Places the cursor in the unset state public synchronized void reset throws Indexed Store Exception unset entry Removed false  IndexedStoreException entryRemoved
Sets the cursor to a particular entry of an index node void set Object Address leaf Node Address int entry Number throws Indexed Store Exception unset if leaf Node Address is Null return leaf Node store acquire Node leaf Node Address leaf Node add Cursor this if entry Number 0 this entry Number entry Number else this entry Number leaf Node get Number Of Entries entry Number adjust  ObjectAddress leafNodeAddress entryNumber IndexedStoreException leafNodeAddress isNull leafNode acquireNode leafNodeAddress leafNode addCursor entryNumber entryNumber entryNumber entryNumber leafNode getNumberOfEntries entryNumber
Places the cursor in the unset state private void unset throws Indexed Store Exception if leaf Node null leaf Node remove Cursor this leaf Node release entry Number 1 leaf Node null entry Removed false  IndexedStoreException leafNode leafNode removeCursor leafNode entryNumber leafNode entryRemoved
Updates the value of the index entry at the cursor If the cursor is at the beginning or end of the index then do nothing Returns true if the value is set false otherwise void update Entry byte b throws Indexed Store Exception if entry Removed throw new Indexed Store Exception Indexed Store Exception Entry Removed if b length 2048 throw new Indexed Store Exception Indexed Store Exception Entry Value Length Error if leaf Node null return leaf Node update Value At entry Number b  updateEntry IndexedStoreException entryRemoved IndexedStoreException IndexedStoreException EntryRemoved IndexedStoreException IndexedStoreException EntryValueLengthError leafNode leafNode updateValueAt entryNumber
Updates the value of the index entry at the cursor If the cursor is at the beginning or end of the index then do nothing Returns true if the value is set false otherwise Throws an Entry Removed condition if the entry at which it has been pointing has been removed by another cursor public synchronized void update Value byte b throws Indexed Store Exception update Entry b  EntryRemoved updateValue IndexedStoreException updateEntry
Updates the value of the index entry at the cursor If the cursor is at the beginning or end of the index then do nothing public synchronized void update Value String s throws Indexed Store Exception update Value Convert toUTF8 s  updateValue IndexedStoreException updateValue
Updates the value of the index entry at the cursor If the cursor is at the beginning or end of the index then do nothing public synchronized void update Value Insertable an Object throws Indexed Store Exception update Value an Object to Byte Array  updateValue anObject IndexedStoreException updateValue anObject toByteArray

Acquires an anchor Index Anchor acquire Anchor Object Address address throws Indexed Store Exception return Index Anchor acquire Object address  IndexAnchor acquireAnchor ObjectAddress IndexedStoreException IndexAnchor acquireObject
Acquires a context Returns null if the context could not be acquired Indexed Store Context acquire Context Object Address address try return Indexed Store Context acquire Object address catch Indexed Store Exception e context couldn t be acquired return null return null  IndexedStoreContext acquireContext ObjectAddress IndexedStoreContext acquireObject IndexedStoreException
Acquire an index node Index Node acquire Node Object Address address throws Indexed Store Exception return Index Node acquire Object address  IndexNode acquireNode ObjectAddress IndexedStoreException IndexNode acquireObject
Acquires an object private Stored Object acquire Object Object Address address throws Indexed Store Exception Stored Object object try object object Store acquire Object address catch Object Store Exception e throw new Indexed Store Exception Indexed Store Exception Object Not Acquired e return object  StoredObject acquireObject ObjectAddress IndexedStoreException StoredObject objectStore acquireObject ObjectStoreException IndexedStoreException IndexedStoreException ObjectNotAcquired
Acquires a Binary Object Binary Small Object acquire Binary Small Object Object Address address throws Indexed Store Exception return Binary Small Object acquire Object address  BinarySmallObject acquireBinarySmallObject ObjectAddress IndexedStoreException BinarySmallObject acquireObject
Checks to see if the metadata stored in the object store matches that expected by this code If not a conversion is necessary private void check Metadata throws Indexed Store Exception Buffer metadata get Metadata Area MetadataID Field version Field metadata get Field 0 4 int version version Field get Int if version 0 0 indicates that the store is new version Field put Current Version put Metadata Area MetadataID metadata return if version Current Version return convert version  checkMetadata IndexedStoreException getMetadataArea versionField getField versionField getInt versionField CurrentVersion putMetadataArea CurrentVersion
Closes the store This is required to free the underlying file public synchronized void close throws Indexed Store Exception if name null return already closed try commit if object Directory Cursor null object Directory Cursor close if index Directory Cursor null index Directory Cursor close catch Indexed Store Exception e make sure the file gets closed no matter what try object Store close catch Object Store Exception e2 ignore this and rethrow the underlying exception throw e try object Store close catch Object Store Exception e throw new Indexed Store Exception Indexed Store Exception Store Not Closed e registry remove name name null object Directory null object Directory Address null object Directory Cursor null index Directory null index Directory Address null index Directory Cursor null  IndexedStoreException objectDirectoryCursor objectDirectoryCursor indexDirectoryCursor indexDirectoryCursor IndexedStoreException objectStore ObjectStoreException objectStore ObjectStoreException IndexedStoreException IndexedStoreException StoreNotClosed objectDirectory objectDirectoryAddress objectDirectoryCursor indexDirectory indexDirectoryAddress indexDirectoryCursor
public synchronized void commit throws Indexed Store Exception try object Store commit catch Exception e throw new Indexed Store Exception Indexed Store Exception Store Not Committed e  IndexedStoreException objectStore IndexedStoreException IndexedStoreException StoreNotCommitted
Converts the store from a previous to the current version No conversions are yet defined private void convert int from Version throws Indexed Store Exception throw new Indexed Store Exception Indexed Store Exception Store Not Converted  fromVersion IndexedStoreException IndexedStoreException IndexedStoreException StoreNotConverted
Creates and initializes an Indexed Store public static synchronized void create String name throws Indexed Store Exception Object Store store new Object Store new Indexed Store Object Policy try Object Store create name store open name Object Address context Address store insert Object new Indexed Store Context Indexed Store Context context Indexed Store Context store acquire Object context Address Index Anchor anchor new Index Anchor Object Address address store insert Object anchor context set Index Directory Address address anchor new Index Anchor address store insert Object anchor context set Object Directory Address address context release store commit store close catch Exception e1 try store close catch Object Store Exception e2 real exception thrown below Object Store delete name throw new Indexed Store Exception Indexed Store Exception Store Not Created e1  IndexedStore IndexedStoreException ObjectStore ObjectStore IndexedStoreObjectPolicy ObjectStore ObjectAddress contextAddress insertObject IndexedStoreContext IndexedStoreContext IndexedStoreContext acquireObject contextAddress IndexAnchor IndexAnchor ObjectAddress insertObject setIndexDirectoryAddress IndexAnchor insertObject setObjectDirectoryAddress ObjectStoreException ObjectStore IndexedStoreException IndexedStoreException StoreNotCreated
Creates an Index with the given name public synchronized Index create Index String index Name throws Indexed Store Exception Index index null index Directory Cursor find index Name if index Directory Cursor key Matches index Name throw new Indexed Store Exception Indexed Store Exception Index Exists Object Address address insert Object new Index Anchor index Directory insert index Name address to Byte Array index new Index this address return index  createIndex indexName IndexedStoreException indexDirectoryCursor indexName indexDirectoryCursor keyMatches indexName IndexedStoreException IndexedStoreException IndexExists ObjectAddress insertObject IndexAnchor indexDirectory indexName toByteArray
Places a byte array into the store return a new object identifier public synchronized ObjectID create Object byte b throws Indexed Store Exception Object Address address insert Object new Binary Small Object b ObjectID id get Next ObjectID object Directory insert id to Byte Array address to Byte Array return id  createObject IndexedStoreException ObjectAddress insertObject BinarySmallObject getNextObjectID objectDirectory toByteArray toByteArray
Places a String into the store public synchronized ObjectID create Object String s throws Indexed Store Exception return create Object Convert toUTF8 s  createObject IndexedStoreException createObject
Places an Insertable into the store public synchronized ObjectID create Object Insertable an Object throws Indexed Store Exception return create Object an Object to Byte Array  createObject anObject IndexedStoreException createObject anObject toByteArray
Deletes the store if it exists Does nothing if it does not exist public static synchronized void delete String filename Object Store delete filename  ObjectStore
Tests to see if the file acting as the store exists public static synchronized boolean exists String filename return Object Store exists filename  ObjectStore
If a store disappears unexpectedly make sure it gets closed protected void finalize try close catch Exception e unsafe to throw exceptions from a finalize 
Finds the handle of an open store for a given its name The store may continue with the current transaction or may abort the current transaction Used to initiate recovery if the reference to the store should be lost for some reason Will return null if the store has not been opened The name of the store to be found must compare equal to the name the store was opened under public synchronized static Indexed Store find String name return Indexed Store registry get name  IndexedStore IndexedStore
deprecated use commit public synchronized void flush throws Indexed Store Exception try object Store commit catch Exception e throw new Indexed Store Exception Indexed Store Exception Store Not Flushed e  IndexedStoreException objectStore IndexedStoreException IndexedStoreException StoreNotFlushed
Returns an index given its name public synchronized Index get Index String index Name throws Indexed Store Exception Index index byte key Convert toUTF8 index Name index Directory Cursor find key if index Directory Cursor key Matches key throw new Indexed Store Exception Indexed Store Exception Index Not Found Object Address address index Directory Cursor get Value As Object Address index new Index this address return index  getIndex indexName IndexedStoreException indexName indexDirectoryCursor indexDirectoryCursor keyMatches IndexedStoreException IndexedStoreException IndexNotFound ObjectAddress indexDirectoryCursor getValueAsObjectAddress
private Buffer get Metadata Area int i throws Indexed Store Exception try return object Store get Metadata Area i catch Object Store Exception e throw new Indexed Store Exception Indexed Store Exception Metadata Request Error e  getMetadataArea IndexedStoreException objectStore getMetadataArea ObjectStoreException IndexedStoreException IndexedStoreException MetadataRequestError
Returns the name of the store public synchronized String get Name return name  getName
Returns the next ObjectID private ObjectID get Next ObjectID throws Indexed Store Exception Indexed Store Context context acquire Context context Address if context null throw new Indexed Store Exception Indexed Store Exception Context Not Available long object Number context get Next Object Number context release return new ObjectID object Number  getNextObjectID IndexedStoreException IndexedStoreContext acquireContext contextAddress IndexedStoreException IndexedStoreException ContextNotAvailable objectNumber getNextObjectNumber objectNumber
Returns a byte array given its object identifier public synchronized byte get Object ObjectID id throws Indexed Store Exception object Directory Cursor find id to Byte Array Object Address address object Directory Cursor get Value As Object Address Binary Small Object object acquire Binary Small Object address byte b object get Value object release return b  getObject IndexedStoreException objectDirectoryCursor toByteArray ObjectAddress objectDirectoryCursor getValueAsObjectAddress BinarySmallObject acquireBinarySmallObject getValue
Returns an object as a string truncated at the first null public synchronized String get Object As String ObjectID id throws Indexed Store Exception String s s Convert fromUTF8 get Object id int i s index Of 0 if i 1 return s return s substring 0 i  getObjectAsString IndexedStoreException getObject indexOf
Returns the object store public synchronized Object Store get Object Store return object Store  ObjectStore getObjectStore objectStore
Inserts a new object into my store Object Address insert Object Stored Object object throws Indexed Store Exception try Object Address address object Store insert Object object return address catch Object Store Exception e throw new Indexed Store Exception Indexed Store Exception Object Not Stored e  ObjectAddress insertObject StoredObject IndexedStoreException ObjectAddress objectStore insertObject ObjectStoreException IndexedStoreException IndexedStoreException ObjectNotStored
Opens the store public synchronized void open String name throws Indexed Store Exception if registry get name null throw new Indexed Store Exception Indexed Store Exception Store Is Open if exists name create name try object Store new Object Store new Indexed Store Object Policy object Store open name check Metadata context Address Context Address10 Indexed Store Context context acquire Context context Address if context null context Address Context Address11 context acquire Context context Address if context null throw new Indexed Store Exception Indexed Store Exception Store Format Error index Directory Address context get Index Directory Address object Directory Address context get Object Directory Address context release index Directory new Index this index Directory Address index Directory Cursor index Directory open object Directory new Index this object Directory Address object Directory Cursor object Directory open this name name registry put name this catch Indexed Store Exception e throw e catch Exception e throw new Indexed Store Exception Indexed Store Exception Generic Error e  IndexedStoreException IndexedStoreException IndexedStoreException StoreIsOpen objectStore ObjectStore IndexedStoreObjectPolicy objectStore checkMetadata contextAddress ContextAddress10 IndexedStoreContext acquireContext contextAddress contextAddress ContextAddress11 acquireContext contextAddress IndexedStoreException IndexedStoreException StoreFormatError indexDirectoryAddress getIndexDirectoryAddress objectDirectoryAddress getObjectDirectoryAddress indexDirectory indexDirectoryAddress indexDirectoryCursor indexDirectory objectDirectory objectDirectoryAddress objectDirectoryCursor objectDirectory IndexedStoreException IndexedStoreException IndexedStoreException GenericError
private void put Metadata Area int i Buffer b throws Indexed Store Exception try object Store put Metadata Area i b catch Object Store Exception e throw new Indexed Store Exception Indexed Store Exception Metadata Request Error e  putMetadataArea IndexedStoreException objectStore putMetadataArea ObjectStoreException IndexedStoreException IndexedStoreException MetadataRequestError
Destroys an Index given its name public synchronized void remove Index String index Name throws Indexed Store Exception byte key Convert toUTF8 index Name index Directory Cursor find key if index Directory Cursor key Matches key throw new Indexed Store Exception Indexed Store Exception Index Not Found Object Address address index Directory Cursor get Value As Object Address Index Anchor anchor acquire Anchor address anchor destroy Children anchor release remove Object address index Directory Cursor remove  removeIndex indexName IndexedStoreException indexName indexDirectoryCursor indexDirectoryCursor keyMatches IndexedStoreException IndexedStoreException IndexNotFound ObjectAddress indexDirectoryCursor getValueAsObjectAddress IndexAnchor acquireAnchor destroyChildren removeObject indexDirectoryCursor
Removes an object from my store void remove Object Object Address address throws Indexed Store Exception try object Store remove Object address catch Object Store Exception e throw new Indexed Store Exception Indexed Store Exception Object Not Removed e  removeObject ObjectAddress IndexedStoreException objectStore removeObject ObjectStoreException IndexedStoreException IndexedStoreException ObjectNotRemoved
Removes the object identified by id from the store public synchronized void remove Object ObjectID id throws Indexed Store Exception byte key id to Byte Array object Directory Cursor find key if object Directory Cursor key Matches key throw new Indexed Store Exception Indexed Store Exception Object Not Found Object Address address object Directory Cursor get Value As Object Address object Directory Cursor remove remove Object address  removeObject IndexedStoreException toByteArray objectDirectoryCursor objectDirectoryCursor keyMatches IndexedStoreException IndexedStoreException ObjectNotFound ObjectAddress objectDirectoryCursor getValueAsObjectAddress objectDirectoryCursor removeObject
public synchronized void rollback throws Indexed Store Exception try object Store rollback catch Object Store Exception e throw new Indexed Store Exception Indexed Store Exception Store Not Rolled Back e  IndexedStoreException objectStore ObjectStoreException IndexedStoreException IndexedStoreException StoreNotRolledBack
Replaces the contents of the object identified by id with the byte array b public synchronized void update Object ObjectID id byte b throws Indexed Store Exception byte key id to Byte Array object Directory Cursor find key if object Directory Cursor key Matches key throw new Indexed Store Exception Indexed Store Exception Object Not Found Object Address old Address object Directory Cursor get Value As Object Address Object Address new Address insert Object new Binary Small Object b object Directory Cursor update Value new Address to Byte Array remove Object old Address  updateObject IndexedStoreException toByteArray objectDirectoryCursor objectDirectoryCursor keyMatches IndexedStoreException IndexedStoreException ObjectNotFound ObjectAddress oldAddress objectDirectoryCursor getValueAsObjectAddress ObjectAddress newAddress insertObject BinarySmallObject objectDirectoryCursor updateValue newAddress toByteArray removeObject oldAddress
Updates an object with a String public synchronized void update Object ObjectID id String s throws Indexed Store Exception update Object id Convert toUTF8 s  updateObject IndexedStoreException updateObject
Updates an object with an Insertable public synchronized void update Object ObjectID id Insertable an Object throws Indexed Store Exception update Object id an Object to Byte Array  updateObject anObject IndexedStoreException updateObject anObject toByteArray

Constructs a new context Indexed Store Context super index Directory Address Object Address Null object Directory Address Object Address Null open Number 0 object Number 0  IndexedStoreContext indexDirectoryAddress ObjectAddress objectDirectoryAddress ObjectAddress openNumber objectNumber
Constructs a context from a field read from the store Indexed Store Context Field f Object Store store Object Address address throws Object Store Exception super f store address  IndexedStoreContext ObjectStore ObjectAddress ObjectStoreException
Sets the fields definitions as subfields of a contents field protected void set Fields Field contents open Number Field contents subfield Open Number Offset Open Number Length object Directory Address Field contents subfield Object Directory Address Offset Object Directory Address Length index Directory Address Field contents subfield Index Directory Address Offset Index Directory Address Length object Number Field contents subfield Object Number Offset Object Number Length  setFields openNumberField OpenNumberOffset OpenNumberLength objectDirectoryAddressField ObjectDirectoryAddressOffset ObjectDirectoryAddressLength indexDirectoryAddressField IndexDirectoryAddressOffset IndexDirectoryAddressLength objectNumberField ObjectNumberOffset ObjectNumberLength
Places the contents of the buffer into the fields Subclasses should implement and call super protected void extract Values Field contents throws Object Store Exception super extract Values contents set Fields contents open Number open Number Field get Int object Directory Address new Object Address object Directory Address Field get index Directory Address new Object Address index Directory Address Field get object Number object Number Field get Long here is where we transition to using object numbers upward compatible change if open Number 0 object Number long open Number 32 open Number 0 set Changed  extractValues ObjectStoreException extractValues setFields openNumber openNumberField getInt objectDirectoryAddress ObjectAddress objectDirectoryAddressField indexDirectoryAddress ObjectAddress indexDirectoryAddressField objectNumber objectNumberField getLong openNumber objectNumber openNumber openNumber setChanged
Places the contents of the fields into the buffer Subclasses should implement and call super protected void insert Values Field contents super insert Values contents set Fields contents open Number Field put open Number object Directory Address Field put object Directory Address index Directory Address Field put index Directory Address object Number Field put object Number  insertValues insertValues setFields openNumberField openNumber objectDirectoryAddressField objectDirectoryAddress indexDirectoryAddressField indexDirectoryAddress objectNumberField objectNumber
Returns the index directory address from the buffer Object Address get Index Directory Address return index Directory Address  ObjectAddress getIndexDirectoryAddress indexDirectoryAddress
Returns the minimum size of this object s instance including its type field Subclasses should override protected int get Minimum Size return SIZE  getMinimumSize
Returns the object directory address from the buffer Object Address get Object Directory Address return object Directory Address  ObjectAddress getObjectDirectoryAddress objectDirectoryAddress
Returns the required type of this class of object Subclasses must override protected int get Required Type return TYPE  getRequiredType
Generates and returns the next object number This is essentially the count of the number of user defined objects generated in this store long get Next Object Number object Number set Changed return object Number  getNextObjectNumber objectNumber setChanged objectNumber
Sets the index directory address void set Index Directory Address Object Address address this index Directory Address address set Changed  setIndexDirectoryAddress ObjectAddress indexDirectoryAddress setChanged
Sets the object directory address void set Object Directory Address Object Address address this object Directory Address address set Changed  setObjectDirectoryAddress ObjectAddress objectDirectoryAddress setChanged
Provides a printable representation of this object public String to String String Buffer b new String Buffer b append Context NON NLS 1 b append object Number b append NON NLS 1 b append index Directory Address b append NON NLS 1 b append object Directory Address b append NON NLS 1 return b to String  toString StringBuffer StringBuffer objectNumber indexDirectoryAddress objectDirectoryAddress toString

Indexed Store Exception constructor comment public Indexed Store Exception int id super messages id this id id  IndexedStoreException IndexedStoreException
Indexed Store Exception constructor comment public Indexed Store Exception int id Throwable e super messages id e this id id  IndexedStoreException IndexedStoreException
Indexed Store Exception constructor comment public Indexed Store Exception String s super s id Generic Error  IndexedStoreException IndexedStoreException GenericError
Initializes the messages at class load time private static void initialize Messages messages Generic Error bind indexed Store generic Error NON NLS 1 messages Entry Key Length Error bind indexed Store entry Key Length Error NON NLS 1 messages Entry Not Removed bind indexed Store entry Not Removed NON NLS 1 messages Entry Value Length Error bind indexed Store entry Value Length Error NON NLS 1 messages Entry Value Not Updated bind indexed Store entry Value Not Updated NON NLS 1 messages Index Node Not Retrieved bind indexed Store index Node Not Retrieved NON NLS 1 messages Index Node Not Stored bind indexed Store index Node Not Stored NON NLS 1 messages Index Node Not Split bind indexed Store index Node Not Split NON NLS 1 messages Index Node Not Created bind indexed Store index Node Not Created NON NLS 1 messages Index Exists bind indexed Store index Exists NON NLS 1 messages Index Not Created bind indexed Store index Not Created NON NLS 1 messages Index Not Found bind indexed Store index Not Found NON NLS 1 messages Index Not Removed bind indexed Store index Not Removed NON NLS 1 messages Object Exists bind indexed Store object Exists NON NLS 1 messages Object Not Acquired bind indexed Store object Not Acquired NON NLS 1 messages Object Not Created bind indexed Store object Not Created NON NLS 1 messages Object Not Found bind indexed Store object Not Found NON NLS 1 messages Object Not Released bind indexed Store object Not Released NON NLS 1 messages Object Not Removed bind indexed Store object Not Removed NON NLS 1 messages Object Not Updated bind indexed Store object Not Updated NON NLS 1 messages Object Not Stored bind indexed Store object Not Stored NON NLS 1 messages Object Type Error bind indexed Store object Type Error NON NLS 1 messages Store Empty bind indexed Store store Empty NON NLS 1 messages Store Format Error bind indexed Store store Format Error NON NLS 1 messages Store Not Created bind indexed Store store Not Created NON NLS 1 messages Store Not Open bind indexed Store store Not Open NON NLS 1 messages Store Not Closed bind indexed Store store Not Closed NON NLS 1 messages Store Not Flushed bind indexed Store store Not Flushed NON NLS 1 messages Store Not Opened bind indexed Store store Not Opened NON NLS 1 messages Store Not Read Write bind indexed Store store Not Read Write NON NLS 1 messages Context Not Available bind indexed Store context Not Available NON NLS 1 messages ObjectID Invalid bind indexed Store objectID Invalid NON NLS 1 messages Metadata Request Error bind indexed Store metadata Request Error NON NLS 1 messages Entry Removed bind indexed Store entry Removed NON NLS 1 messages Store Not Converted bind indexed Store store Not Converted NON NLS 1 messages Store Is Open bind indexed Store store Is Open NON NLS 1 messages Store Not Committed bind indexed Store store Not Committed NON NLS 1 messages Store Not Rolled Back bind indexed Store store Not Rolled Back NON NLS 1  initializeMessages GenericError indexedStore genericError EntryKeyLengthError indexedStore entryKeyLengthError EntryNotRemoved indexedStore entryNotRemoved EntryValueLengthError indexedStore entryValueLengthError EntryValueNotUpdated indexedStore entryValueNotUpdated IndexNodeNotRetrieved indexedStore indexNodeNotRetrieved IndexNodeNotStored indexedStore indexNodeNotStored IndexNodeNotSplit indexedStore indexNodeNotSplit IndexNodeNotCreated indexedStore indexNodeNotCreated IndexExists indexedStore indexExists IndexNotCreated indexedStore indexNotCreated IndexNotFound indexedStore indexNotFound IndexNotRemoved indexedStore indexNotRemoved ObjectExists indexedStore objectExists ObjectNotAcquired indexedStore objectNotAcquired ObjectNotCreated indexedStore objectNotCreated ObjectNotFound indexedStore objectNotFound ObjectNotReleased indexedStore objectNotReleased ObjectNotRemoved indexedStore objectNotRemoved ObjectNotUpdated indexedStore objectNotUpdated ObjectNotStored indexedStore objectNotStored ObjectTypeError indexedStore objectTypeError StoreEmpty indexedStore storeEmpty StoreFormatError indexedStore storeFormatError StoreNotCreated indexedStore storeNotCreated StoreNotOpen indexedStore storeNotOpen StoreNotClosed indexedStore storeNotClosed StoreNotFlushed indexedStore storeNotFlushed StoreNotOpened indexedStore storeNotOpened StoreNotReadWrite indexedStore storeNotReadWrite ContextNotAvailable indexedStore contextNotAvailable ObjectIDInvalid indexedStore objectIDInvalid MetadataRequestError indexedStore metadataRequestError EntryRemoved indexedStore entryRemoved StoreNotConverted indexedStore storeNotConverted StoreIsOpen indexedStore storeIsOpen StoreNotCommitted indexedStore storeNotCommitted StoreNotRolledBack indexedStore storeNotRolledBack
private static String bind String name return Policy bind name 
Creates a printable representation of this exception public String to String String Buffer buffer new String Buffer 50 buffer append Indexed Store Exception NON NLS 1 buffer append get Message if wrapped Exception null buffer append n NON NLS 1 buffer append wrapped Exception to String return buffer to String  toString StringBuffer StringBuffer IndexedStoreException getMessage wrappedException wrappedException toString toString

abstract class Indexed Store Object extends Stored Object public Indexed Store Object super  IndexedStoreObject StoredObject IndexedStoreObject
Constructs an object from bytes that came from the store These bytes include the 2 byte type field public Indexed Store Object Field f Object Store store Object Address address throws Object Store Exception super f store address  IndexedStoreObject ObjectStore ObjectAddress ObjectStoreException
Acquires an anchor protected final Index Anchor acquire Anchor Object Address address throws Indexed Store Exception return Index Anchor acquire Object address  IndexAnchor acquireAnchor ObjectAddress IndexedStoreException IndexAnchor acquireObject
Acquires a node protected final Index Node acquire Node Object Address address throws Indexed Store Exception return Index Node acquire Object address  IndexNode acquireNode ObjectAddress IndexedStoreException IndexNode acquireObject
Acquires an object protected final Stored Object acquire Object Object Address address throws Indexed Store Exception Stored Object object try object store acquire Object address catch Object Store Exception e throw new Indexed Store Exception Indexed Store Exception Object Not Acquired e return object  StoredObject acquireObject ObjectAddress IndexedStoreException StoredObject acquireObject ObjectStoreException IndexedStoreException IndexedStoreException ObjectNotAcquired
Inserts a new object into my store Subclasses must not override protected final Object Address insert Object Stored Object object throws Indexed Store Exception try Object Address address store insert Object object return address catch Object Store Exception e throw new Indexed Store Exception Indexed Store Exception Object Not Stored e  ObjectAddress insertObject StoredObject IndexedStoreException ObjectAddress insertObject ObjectStoreException IndexedStoreException IndexedStoreException ObjectNotStored
Releases this object Subclasses must not override protected final void release throws Indexed Store Exception try store release Object this catch Object Store Exception e throw new Indexed Store Exception Indexed Store Exception Object Not Released e  IndexedStoreException releaseObject ObjectStoreException IndexedStoreException IndexedStoreException ObjectNotReleased
Removes an object from my store Subclasses must not override protected final void remove Object Object Address address throws Indexed Store Exception try store remove Object address catch Object Store Exception e throw new Indexed Store Exception Indexed Store Exception Object Not Removed e  removeObject ObjectAddress IndexedStoreException removeObject ObjectStoreException IndexedStoreException IndexedStoreException ObjectNotRemoved

Default constructor public Indexed Store Object Policy super  IndexedStoreObjectPolicy
Creates an Indexed Store Object from a field The contents of the field are used to create the internal structure of the object The field begins with a two byte type code that is used to determine the type of object to create public Stored Object create Object Field field Object Store store Object Address address throws Object Store Exception int offset Stored Object TYPE OFFSET int length Stored Object TYPE LENGTH int type field subfield offset length get Int Stored Object object null switch type case Index Anchor TYPE object new Index Anchor field store address break case Index Node TYPE object new Index Node field store address break case Indexed Store Context TYPE object new Indexed Store Context field store address break case Binary Small Object TYPE object new Binary Small Object field store address break default throw new Object Store Exception Object Store Exception Object Type Failure return object  IndexedStoreObject StoredObject createObject ObjectStore ObjectAddress ObjectStoreException StoredObject TYPE_OFFSET StoredObject TYPE_LENGTH getInt StoredObject IndexAnchor IndexAnchor IndexNode IndexNode IndexedStoreContext IndexedStoreContext BinarySmallObject BinarySmallObject ObjectStoreException ObjectStoreException ObjectTypeFailure

Reconstructs a node from a field Index Node Field f Object Store store Object Address address throws Object Store Exception super f store address  IndexNode ObjectStore ObjectAddress ObjectStoreException
Constructor that creates a root node Index Node Object Address anchor Address super this anchor Address anchor Address this parent Address Object Address Null this previous Address Object Address Null this next Address Object Address Null this used Space 0 this used Space Max 0 this number Of Entries 0 this node Type Root Node this entries Field new Field SIZE Entries Field Offset  IndexNode ObjectAddress anchorAddress anchorAddress anchorAddress parentAddress ObjectAddress previousAddress ObjectAddress nextAddress ObjectAddress usedSpace usedSpaceMax numberOfEntries nodeType RootNode entriesField EntriesFieldOffset
Constructor that creates an interior node Index Node Object Address anchor Address Object Address parent Address this anchor Address this parent Address parent Address this node Type Interior Node  IndexNode ObjectAddress anchorAddress ObjectAddress parentAddress anchorAddress parentAddress parentAddress nodeType InteriorNode
Constructor that creates a leaf node Index Node Object Address anchor Address Object Address parent Address Object Address previous Address Object Address next Address this anchor Address parent Address this previous Address previous Address this next Address next Address this node Type Leaf Node  IndexNode ObjectAddress anchorAddress ObjectAddress parentAddress ObjectAddress previousAddress ObjectAddress nextAddress anchorAddress parentAddress previousAddress previousAddress nextAddress nextAddress nodeType LeafNode
Registers a cursor with this node void add Cursor Index Cursor cursor cursors add cursor  addCursor IndexCursor
Compares the key at a particular entry to a byte array private int compare Entry To Key int entry Number byte key throws Indexed Store Exception Field key Field new Field key Field entry Key Field get Key Field entry Number return entry Key Field compare To key Field  compareEntryToKey entryNumber IndexedStoreException keyField entryKeyField getKeyField entryNumber entryKeyField compareTo keyField
Compresses the space in the entries area of the node private void compress throws Indexed Store Exception some preliminaries int entries Length entries Field length int descriptor Block Size number Of Entries Descriptor Length need to make a copy of the entries in the area this will compress it Field f2 new Field entries Field length copy Entries entries Field 0 number Of Entries f2 copy the entries area back to the node and modify the used Space Max to reflect the compression entries Field put f2 get used Space Max used Space clear the space in the between the descriptor array and the entries heap int free Block Size entries Length descriptor Block Size used Space Max Field f3 entries Field subfield descriptor Block Size free Block Size f3 clear set Changed  IndexedStoreException entriesLength entriesField descriptorBlockSize numberOfEntries DescriptorLength entriesField copyEntries entriesField numberOfEntries usedSpaceMax entriesField usedSpaceMax usedSpace freeBlockSize entriesLength descriptorBlockSize usedSpaceMax entriesField descriptorBlockSize freeBlockSize setChanged
Compresses the space in the entries area of the node if the free space block is smaller than the given threshold private void compress int threshold throws Indexed Store Exception int entries Length entries Field length int descriptor Block Size number Of Entries Descriptor Length int free Block Size entries Length descriptor Block Size used Space Max if free Block Size threshold return compress  IndexedStoreException entriesLength entriesField descriptorBlockSize numberOfEntries DescriptorLength freeBlockSize entriesLength descriptorBlockSize usedSpaceMax freeBlockSize
Copies entries from one Field to another Fields are assumed to contain an array of descriptors at the low end and a heap of key value pairs at the high end private static int copy Entries Field source Field int source Index int number Of Entries Field target Field Pointer t Descriptor target Field point To 0 Pointer s Descriptor source Field point To source Index Descriptor Length int t Entry Offset target Field length for each descriptor make a new one in the new area and copy its key value entry for int i 0 i number Of Entries i extract information from old descriptor int s Entry Offset s Descriptor get Field 0 2 getU Int int key Length s Descriptor get Field 2 2 getU Int int value Length s Descriptor get Field 4 2 getU Int int entry Length key Length value Length Field s Entry source Field subfield s Entry Offset entry Length copy the key value entry from the old to the new space t Entry Offset entry Length Field t Entry target Field subfield t Entry Offset entry Length t Entry put s Entry get create a new descriptor t Descriptor get Field 0 2 put t Entry Offset t Descriptor get Field 2 2 put key Length t Descriptor get Field 4 2 put value Length on to the next one t Descriptor inc Descriptor Length s Descriptor inc Descriptor Length return target Field length t Entry Offset  copyEntries sourceField sourceIndex numberOfEntries targetField tDescriptor targetField pointTo sDescriptor sourceField pointTo sourceIndex DescriptorLength tEntryOffset targetField numberOfEntries sEntryOffset sDescriptor getField getUInt keyLength sDescriptor getField getUInt valueLength sDescriptor getField getUInt entryLength keyLength valueLength sEntry sourceField sEntryOffset entryLength tEntryOffset entryLength tEntry targetField tEntryOffset entryLength tEntry sEntry tDescriptor getField tEntryOffset tDescriptor getField keyLength tDescriptor getField valueLength tDescriptor DescriptorLength sDescriptor DescriptorLength targetField tEntryOffset
Places the contents of the fields into the buffer Subclasses should implement and call super protected void insert Values Field f super insert Values f f put Anchor Address anchor Address f put Parent Address parent Address f put Next Address next Address f put Previous Address previous Address f put Node Type node Type f put Number Of Entries number Of Entries f put Used Space used Space f put Used Space Max used Space Max f put Entries Field entries Field  insertValues insertValues AnchorAddress anchorAddress ParentAddress parentAddress NextAddress nextAddress PreviousAddress previousAddress NodeType nodeType NumberOfEntries numberOfEntries UsedSpace usedSpace UsedSpaceMax usedSpaceMax EntriesField entriesField
Causes the node to remove its children from the store void destroy Children throws Indexed Store Exception if is Leaf for int i 0 i number Of Entries i Object Address child Node Address new Object Address get Value i Index Node child Node acquire Node child Node Address child Node destroy Children child Node release remove Object child Node Address  destroyChildren IndexedStoreException isLeaf numberOfEntries ObjectAddress childNodeAddress ObjectAddress getValue IndexNode childNode acquireNode childNodeAddress childNode destroyChildren childNode removeObject childNodeAddress
Places a cursor and the first entry greater than or equal to a key void find byte key Index Cursor cursor throws Indexed Store Exception int i i find Last EntryLT key if is Leaf cursor set address i 1 else if i 0 Index Node child Node acquire Node new Object Address get Value i child Node find key cursor child Node release else if number Of Entries 0 Index Node child Node acquire Node new Object Address get Value 0 child Node find key cursor child Node release else cursor reset  IndexCursor IndexedStoreException findLastEntryLT isLeaf IndexNode childNode acquireNode ObjectAddress getValue childNode childNode numberOfEntries IndexNode childNode acquireNode ObjectAddress getValue childNode childNode
Places a cursor at the first entry of a node void find First Entry Index Cursor cursor throws Indexed Store Exception if number Of Entries 0 cursor reset else if is Leaf Index Node child Node acquire Node new Object Address get Value 0 child Node find First Entry cursor child Node release else cursor set address 0  findFirstEntry IndexCursor IndexedStoreException numberOfEntries isLeaf IndexNode childNode acquireNode ObjectAddress getValue childNode findFirstEntry childNode
Returns the index of the first entry greater than a key private int find First EntryGT byte key throws Indexed Store Exception int lo 0 int hi number Of Entries 1 while lo hi int i lo hi 2 int c compare Entry To Key i key if c 0 lo i 1 else hi i 1 return lo  findFirstEntryGT IndexedStoreException numberOfEntries compareEntryToKey
Places a cursor at the last entry of a node void find Last Entry Index Cursor cursor throws Indexed Store Exception if number Of Entries 0 cursor reset return int i number Of Entries 1 if is Leaf Index Node child Node acquire Node new Object Address get Value i child Node find Last Entry cursor child Node release else cursor set address i  findLastEntry IndexCursor IndexedStoreException numberOfEntries numberOfEntries isLeaf IndexNode childNode acquireNode ObjectAddress getValue childNode findLastEntry childNode
Returns the index of the last entry less than a key private int find Last EntryLT byte key throws Indexed Store Exception int lo 0 int hi number Of Entries 1 Field key Field new Field key while lo hi int i lo hi 2 int c get Key Field i compare To key Field if c 0 lo i 1 else hi i 1 return hi  findLastEntryLT IndexedStoreException numberOfEntries keyField getKeyField compareTo keyField
Object Address get Anchor Address return anchor Address  ObjectAddress getAnchorAddress anchorAddress
Returns the descriptor field for the node entry at a given index private Field get Descriptor int i return entries Field subfield i Descriptor Length Descriptor Length  getDescriptor entriesField DescriptorLength DescriptorLength
Returns the entire array of entry descriptors private Field Array get Descriptor Array return entries Field point To 0 get Array Descriptor Length Descriptor Length number Of Entries  FieldArray getDescriptorArray entriesField pointTo getArray DescriptorLength DescriptorLength numberOfEntries
private Field get Entries Field return entries Field  getEntriesField entriesField
Returns the value of the key for an entry at a given index byte get Key int i return get Key Field i get  getKey getKeyField
Returns a Field covering the key for an entry at a given index private Field get Key Field int i Field descriptor get Descriptor i int key Offset descriptor subfield 0 2 getU Int int key Length descriptor subfield 2 2 getU Int return entries Field subfield key Offset key Length above is the original code that created three garbage field objects below is the optimized code that only creates one field object int descriptor Off i Descriptor Length Buffer buffer entries Field buffer return entries Field subfield buffer getU Int descriptor Off 2 these bytes hold the key offset buffer getU Int descriptor Off 2 2 these bytes hold the key length  getKeyField getDescriptor keyOffset getUInt keyLength getUInt entriesField keyOffset keyLength descriptorOff DescriptorLength entriesField entriesField getUInt descriptorOff getUInt descriptorOff
Returns a Field covering the key value pair for an entry at a given index private Field get Key Value Field int i Field descriptor get Descriptor i int offset descriptor subfield 0 2 getU Int int key Length descriptor subfield 2 2 getU Int int value Length descriptor subfield 4 2 getU Int return entries Field subfield offset key Length value Length  getKeyValueField getDescriptor getUInt keyLength getUInt valueLength getUInt entriesField keyLength valueLength
Returns the lowest key in the node If none returns an empty byte arrray private byte get Low Key if number Of Entries 0 return new byte 0 return get Key 0  getLowKey numberOfEntries getKey
Returns the minimum size of this object s instance including its type field Subclasses should override protected int get Minimum Size return SIZE  getMinimumSize
Object Address get Next Address return next Address  ObjectAddress getNextAddress nextAddress
int get Number Of Entries return number Of Entries  getNumberOfEntries numberOfEntries
Returns the number of nodes in this subtree this one plus all descendants int get Number Of Nodes throws Indexed Store Exception if is Leaf return 1 int sum 0 for int i 0 i number Of Entries i Object Address child Address new Object Address get Value i Index Node child Node acquire Node child Address sum child Node get Number Of Nodes child Node release return sum 1  getNumberOfNodes IndexedStoreException isLeaf numberOfEntries ObjectAddress childAddress ObjectAddress getValue IndexNode childNode acquireNode childAddress childNode getNumberOfNodes childNode
Object Address get Parent Address return parent Address  ObjectAddress getParentAddress parentAddress
Object Address get Previous Address return previous Address  ObjectAddress getPreviousAddress previousAddress
Returns the required type of this class of object Subclasses must override protected int get Required Type return TYPE  getRequiredType
private int get Used Space return used Space  getUsedSpace usedSpace
Returns the value for an entry at a given index byte get Value int i return get Value Field i get  getValue getValueField
Returns a Field covering the value for an entry at a given index private Field get Value Field int i Field descriptor get Descriptor i int key Offset descriptor subfield 0 2 getU Int int key Length descriptor subfield 2 2 getU Int int value Length descriptor subfield 4 2 getU Int int value Offset key Offset key Length return entries Field subfield value Offset value Length  getValueField getDescriptor keyOffset getUInt keyLength getUInt valueLength getUInt valueOffset keyOffset keyLength entriesField valueOffset valueLength
Inserts an entry into the node If this was inserted in slot 0 then we must update the parent node s low key If this was a leaf node then we must update the anchor ss number of entries and adjust any cursors for this node This may also cause a split Implementation Note Cannot use an iterator over the cursor set because notification of an insert may remove the cursor being notified from the cursor set void insert Entry byte key byte value throws Indexed Store Exception int i find First EntryGT key if is Leaf insert Entry Before i key value Object cursor Array cursors to Array for int j 0 j cursor Array length j Index Cursor cursor Index Cursor cursor Array j cursor entry Inserted i Index Anchor anchor acquire Anchor anchor Address anchor entry Inserted this anchor release else Object Address child Node Address null if get Number Of Entries 0 Index Node child Node new Index Node anchor Address address Object Address Null Object Address Null child Node Address insert Object child Node else child Node Address new Object Address get Value Math max 0 i 1 Index Node child Node acquire Node child Node Address child Node insert Entry key value child Node release  insertEntry IndexedStoreException findFirstEntryGT isLeaf insertEntryBefore cursorArray toArray cursorArray IndexCursor IndexCursor cursorArray entryInserted IndexAnchor acquireAnchor anchorAddress entryInserted ObjectAddress childNodeAddress getNumberOfEntries IndexNode childNode IndexNode anchorAddress ObjectAddress ObjectAddress childNodeAddress insertObject childNode childNodeAddress ObjectAddress getValue IndexNode childNode acquireNode childNodeAddress childNode insertEntry childNode
Inserts a new key value pair in front of the entry at the given index If the node needs to be split split it and then attempt the insert again If this is a non leaf node then the value is the address of a child That child s parent address will be updated if that key value is to be inserted into a new node private void insert Entry Before int i byte key byte value throws Indexed Store Exception Field entries entries Field int entries Length entries length int key Value Length key length value length int needed Space key Value Length Descriptor Length int free Space entries Length number Of Entries Descriptor Length used Space if free Space needed Space Object Address new Node Address split if i number Of Entries if is Leaf Object Address child Address new Object Address value Index Node child acquire Node child Address child set Parent Address new Node Address child release Index Node new Node acquire Node new Node Address new Node insert Entry Before i get Number Of Entries key value new Node release else insert Entry Before i key value return place the value and key fields into the space compress needed Space Pointer p entries point To entries Length used Space Max p dec value length put value p dec key length put key used Space Max key Value Length used Space key Value Length create a hole in the descriptor area for a new descriptor Field new Descriptor get Descriptor Array insert i number Of Entries create a new descriptor new Descriptor subfield 0 2 put entries Length used Space Max new Descriptor subfield 2 2 put key length new Descriptor subfield 4 2 put value length update the parent key for this node if this was the 0th entry if i 0 parent Address is Null Index Node parent acquire Node parent Address if number Of Entries 1 parent insert Key For Child address key else parent update Key For Child get Key 1 address key parent release set Changed  insertEntryBefore IndexedStoreException entriesField entriesLength keyValueLength neededSpace keyValueLength DescriptorLength freeSpace entriesLength numberOfEntries DescriptorLength usedSpace freeSpace neededSpace ObjectAddress newNodeAddress numberOfEntries isLeaf ObjectAddress childAddress ObjectAddress IndexNode acquireNode childAddress setParentAddress newNodeAddress IndexNode newNode acquireNode newNodeAddress newNode insertEntryBefore getNumberOfEntries newNode insertEntryBefore neededSpace pointTo entriesLength usedSpaceMax usedSpaceMax keyValueLength usedSpace keyValueLength newDescriptor getDescriptorArray numberOfEntries newDescriptor entriesLength usedSpaceMax newDescriptor newDescriptor parentAddress isNull IndexNode acquireNode parentAddress numberOfEntries insertKeyForChild updateKeyForChild getKey setChanged
Inserts a child address into a non leaf node This may result in this node splitting private void insert Key For Child Object Address child Address byte key throws Indexed Store Exception int i find First EntryGT key insert Entry Before i key child Address to Byte Array if i 0 parent Address is Null Index Node parent acquire Node parent Address parent update Key For Child get Key 1 address key parent release  insertKeyForChild ObjectAddress childAddress IndexedStoreException findFirstEntryGT insertEntryBefore childAddress toByteArray parentAddress isNull IndexNode acquireNode parentAddress updateKeyForChild getKey
boolean is Interior return node Type Interior Node  isInterior nodeType InteriorNode
boolean is Leaf return node Type Leaf Node  isLeaf nodeType LeafNode
boolean is Root return node Type Root Node  isRoot nodeType RootNode
Places the contents of the buffer into the fields Subclasses should implement and call super protected void extract Values Field f throws Object Store Exception super extract Values f anchor Address new Object Address f get Anchor Address parent Address new Object Address f get Parent Address next Address new Object Address f get Next Address previous Address new Object Address f get Previous Address node Type f get Int Node Type number Of Entries f get Int Number Of Entries used Space f get Int Used Space used Space Max f get Int Used Space Max entries Field new Field f get Entries Field  extractValues ObjectStoreException extractValues anchorAddress ObjectAddress AnchorAddress parentAddress ObjectAddress ParentAddress nextAddress ObjectAddress NextAddress previousAddress ObjectAddress PreviousAddress nodeType getInt NodeType numberOfEntries getInt NumberOfEntries usedSpace getInt UsedSpace usedSpaceMax getInt UsedSpaceMax entriesField EntriesField
Removes a cursor that is registered with this node void remove Cursor Index Cursor cursor cursors remove cursor  removeCursor IndexCursor
Removes the descriptor and key value pair at the entry number given This may result in the node becoming empty The caller will need to take steps to plan for this void remove Entry int i throws Indexed Store Exception remove the key value entry byte key get Key i Field f get Key Value Field i f clear used Space f length remove the descriptor get Descriptor Array remove i number Of Entries if the 0th entry was removed need to update the parent node with the new low key if i 0 parent Address is Null Index Node parent acquire Node parent Address if number Of Entries 0 parent update Key For Child key address get Key 0 else parent remove Key For Child address parent release Notify any cursors and the anchor Object cursor Array cursors to Array for int j 0 j cursor Array length j Index Cursor cursor Index Cursor cursor Array j cursor entry Removed i Index Anchor anchor acquire Anchor anchor Address anchor entry Removed this anchor release set Changed  removeEntry IndexedStoreException getKey getKeyValueField usedSpace getDescriptorArray numberOfEntries parentAddress isNull IndexNode acquireNode parentAddress numberOfEntries updateKeyForChild getKey removeKeyForChild cursorArray toArray cursorArray IndexCursor IndexCursor cursorArray entryRemoved IndexAnchor acquireAnchor anchorAddress entryRemoved setChanged
Removes a child node address reference from a non leaf node private void remove Key For Child Object Address child Address throws Indexed Store Exception Field child Address Field new Field child Address int i 0 while i number Of Entries if get Value Field i compare To child Address Field 0 break i if i number Of Entries remove Entry i  removeKeyForChild ObjectAddress childAddress IndexedStoreException childAddressField childAddress numberOfEntries getValueField compareTo childAddressField numberOfEntries removeEntry
private void set Next Address Object Address address next Address address set Changed  setNextAddress ObjectAddress nextAddress setChanged
private void set Node Type int node Type this node Type node Type set Changed  setNodeType nodeType nodeType nodeType setChanged
private void set Number Of Entries int number Of Entries this number Of Entries number Of Entries set Changed  setNumberOfEntries numberOfEntries numberOfEntries numberOfEntries setChanged
private void set Parent Address Object Address address parent Address address set Changed  setParentAddress ObjectAddress parentAddress setChanged
private void set Previous Address Object Address address previous Address address set Changed  setPreviousAddress ObjectAddress previousAddress setChanged
private void set Used Space int used Space this used Space used Space set Changed  setUsedSpace usedSpace usedSpace usedSpace setChanged
private void set Used Space Max int used Space Max this used Space Max used Space Max set Changed  setUsedSpaceMax usedSpaceMax usedSpaceMax usedSpaceMax setChanged
Splits an index node This split results in a new low key being placed in the parent This may cause a parent node to split as well Splits eventually propagate to the root node cause it to split and a new root node to be created private Object Address split throws Indexed Store Exception Nodes can only be split if there are at least 2 entries int n number Of Entries if n 2 throw new Indexed Store Exception Indexed Store Exception Index Node Not Split If this is a root node need to make it an interior node and create a new parent root node Also need to modify the index anchor to indicate the new root node and place this node the old root node into the new root node The new root node can always accept its first entry without splitting if is Root Object Address new Root Node Address insert Object new Index Node anchor Address parent Address new Root Node Address node Type Interior Node Index Node new Root Node acquire Node new Root Node Address new Root Node insert Key For Child address get Low Key new Root Node release Index Anchor anchor acquire Anchor anchor Address anchor set Root Node Address new Root Node Address anchor release Get a new node fill it with half the entries from this node then compress this node The new node is created with current parent However the node at the current parent Address may split when the key is added to it for the new node Non leaf nodes compensate for this by updating the new Node s parent Address during the insertion Object Address new Node Address insert Object new Index Node anchor Address parent Address Index Node new Node acquire Node new Node Address Field f1 entries Field Field f2 new Node get Entries Field int k n 2 new Node set Used Space copy Entries f1 n k k f2 new Node set Used Space Max new Node get Used Space new Node set Number Of Entries k used Space used Space new Node get Used Space number Of Entries n k compress If this was a leaf node need to set the previous and next pointers of the this node the new node and the old next node if is Leaf new Node set Node Type Leaf Node new Node set Next Address next Address new Node set Previous Address address if next Address is Null Index Node next Node acquire Node next Address next Node set Previous Address new Node Address next Node release next Address new Node Address If this is a non leaf node need to update the parent addresses of any child nodes of the new node k is the number of entries in the new node if is Leaf for int i 0 i k i Object Address child Address new Object Address new Node get Value i Index Node child Node acquire Node child Address child Node set Parent Address new Node Address child Node release Need to insert the new node s low key and address into the parent This may result in the parent splitting and having to update the parent address of this node Index Node parent Node acquire Node parent Address parent Node insert Key For Child new Node Address new Node get Low Key parent Node release Clean up new Node release Notify any cursors and the anchor Object cursor Array cursors to Array for int j 0 j cursor Array length j Index Cursor cursor Index Cursor cursor Array j cursor node Split set Changed return new Node Address  ObjectAddress IndexedStoreException numberOfEntries IndexedStoreException IndexedStoreException IndexNodeNotSplit isRoot ObjectAddress newRootNodeAddress insertObject IndexNode anchorAddress parentAddress newRootNodeAddress nodeType InteriorNode IndexNode newRootNode acquireNode newRootNodeAddress newRootNode insertKeyForChild getLowKey newRootNode IndexAnchor acquireAnchor anchorAddress setRootNodeAddress newRootNodeAddress parentAddress newNode parentAddress ObjectAddress newNodeAddress insertObject IndexNode anchorAddress parentAddress IndexNode newNode acquireNode newNodeAddress entriesField newNode getEntriesField newNode setUsedSpace copyEntries newNode setUsedSpaceMax newNode getUsedSpace newNode setNumberOfEntries usedSpace usedSpace newNode getUsedSpace numberOfEntries isLeaf newNode setNodeType LeafNode newNode setNextAddress nextAddress newNode setPreviousAddress nextAddress isNull IndexNode nextNode acquireNode nextAddress nextNode setPreviousAddress newNodeAddress nextNode nextAddress newNodeAddress isLeaf ObjectAddress childAddress ObjectAddress newNode getValue IndexNode childNode acquireNode childAddress childNode setParentAddress newNodeAddress childNode IndexNode parentNode acquireNode parentAddress parentNode insertKeyForChild newNodeAddress newNode getLowKey parentNode newNode cursorArray toArray cursorArray IndexCursor IndexCursor cursorArray nodeSplit setChanged newNodeAddress
Unlinks a node from its parent and siblings This does not modify the current node but does modify all the nodes and anchors pointing to it void unlink throws Indexed Store Exception if is Root Index Anchor anchor acquire Anchor anchor Address anchor set Root Node Address Object Address Null anchor release if parent Address is Null Index Node parent acquire Node parent Address parent remove Key For Child address parent release if next Address is Null Index Node next acquire Node next Address next set Previous Address previous Address next release if previous Address is Null Index Node previous acquire Node previous Address previous set Next Address next Address previous release  IndexedStoreException isRoot IndexAnchor acquireAnchor anchorAddress setRootNodeAddress ObjectAddress parentAddress isNull IndexNode acquireNode parentAddress removeKeyForChild nextAddress isNull IndexNode acquireNode nextAddress setPreviousAddress previousAddress previousAddress isNull IndexNode acquireNode previousAddress setNextAddress nextAddress
Update the key and value at this entry to a new key and value This may result in a node split The caller must be able to recognize that the node has split and compensate for that private void update Entry int i byte key byte value throws Indexed Store Exception If the node needs to be split split it and then attempt the update again Note that if this is a non leaf node the value is a child address Unlike the insert of a key value pair the child is already in the node thus a split will update its parent address properly and there is no need to handle that special case Field entries entries Field int entries Length entries length int new Key Value Length key length value length int old Key Value Length get Key Value Field i length int needed Space new Key Value Length old Key Value Length int free Space entries Length number Of Entries Descriptor Length used Space if free Space needed Space Object Address new Node Address split if i number Of Entries Index Node new Node acquire Node new Node Address new Node update Entry i get Number Of Entries key value new Node release else update Entry i key value return The node has enough free space to do the update Remove the old value and key fields from the space Clear the space used by the old value We can do this just by modifying the descriptor Field key Value Field get Key Value Field i key Value Field clear Field descriptor get Descriptor i descriptor clear used Space old Key Value Length compress new Key Value Length place the value and key fields into the space Pointer p entries point To entries Length used Space Max p dec value length put value p dec key length put key used Space Max new Key Value Length used Space new Key Value Length update the descriptor descriptor subfield 0 2 put entries Length used Space Max descriptor subfield 2 2 put key length descriptor subfield 4 2 put value length set Changed  updateEntry IndexedStoreException entriesField entriesLength newKeyValueLength oldKeyValueLength getKeyValueField neededSpace newKeyValueLength oldKeyValueLength freeSpace entriesLength numberOfEntries DescriptorLength usedSpace freeSpace neededSpace ObjectAddress newNodeAddress numberOfEntries IndexNode newNode acquireNode newNodeAddress newNode updateEntry getNumberOfEntries newNode updateEntry keyValueField getKeyValueField keyValueField getDescriptor usedSpace oldKeyValueLength newKeyValueLength pointTo entriesLength usedSpaceMax usedSpaceMax newKeyValueLength usedSpace newKeyValueLength entriesLength usedSpaceMax setChanged
Sets the key at this entry to a new key This may result in a node split The caller must be able to recognize that the node has split and compensate for that if necessary private void update Key At int i byte key throws Indexed Store Exception update Entry i key get Value i  updateKeyAt IndexedStoreException updateEntry getValue
Updates the key of an key address entry in a non leaf node The key must still be in order with respect to the other keys of the node private void update Key For Child byte key Object Address child Address byte new Key throws Indexed Store Exception Field child Address Field new Field child Address to Byte Array int i find Last EntryLT key 1 while i number Of Entries if get Value Field i compare To child Address Field 0 break i if i number Of Entries update Key At i new Key if i 0 parent Address is Null Index Node parent acquire Node parent Address parent update Key For Child key address new Key parent release  updateKeyForChild ObjectAddress childAddress newKey IndexedStoreException childAddressField childAddress toByteArray findLastEntryLT numberOfEntries getValueField compareTo childAddressField numberOfEntries updateKeyAt newKey parentAddress isNull IndexNode acquireNode parentAddress updateKeyForChild newKey
Sets the value at this entry to a new value This may result in a node split The caller must be able to recognize that the node has split and compensate for that void update Value At int i byte value throws Indexed Store Exception update Entry i get Key i value  updateValueAt IndexedStoreException updateEntry getKey
public String to String String Buffer b new String Buffer if is Leaf b append Leaf Node NON NLS 1 if is Root b append Root Node NON NLS 1 if is Interior b append Interior Node NON NLS 1 b append n Address NON NLS 1 b append address b append n Anchor Address NON NLS 1 b append anchor Address b append n Parent Address NON NLS 1 b append parent Address b append n Previous Address NON NLS 1 b append previous Address b append n Next Address NON NLS 1 b append next Address b append n Number Of Entries NON NLS 1 b append number Of Entries b append n Used Space NON NLS 1 b append used Space b append n Used Space Max NON NLS 1 b append used Space Max return b to String  toString StringBuffer StringBuffer isLeaf LeafNode isRoot RootNode isInterior InteriorNode AnchorAddress anchorAddress ParentAddress parentAddress PreviousAddress previousAddress NextAddress nextAddress NumberOfEntries numberOfEntries UsedSpace usedSpace UsedSpaceMax usedSpaceMax toString

public interface Insertable Creates a byte array from this object byte to Byte Array  toByteArray

Creates the log file in the file system The string argument is the name of the page store for which this log will be created static void create String store Name throws Page Store Exception try new Random Access File name store Name rw close NON NLS 1 catch IO Exception e throw new Page Store Exception Page Store Exception Log Create Failure e  storeName PageStoreException RandomAccessFile storeName IOException PageStoreException PageStoreException LogCreateFailure
Deletes the transaction log from the file system static void delete String store Name new File name store Name delete  storeName storeName
Returns true iff the transaction log exists in the file system static boolean exists String store Name return new File name store Name exists  storeName storeName
Returns the name of the log file given the store name static String name String store Name return store Name log NON NLS 1  storeName storeName

Returns the Hashmap of the modified pages public static Map get Modified Pages Page Store store throws Page Store Exception Log Reader reader new Log Reader store Map modified Pages null try reader open store modified Pages reader get Modified Pages finally reader close return modified Pages  getModifiedPages PageStore PageStoreException LogReader LogReader modifiedPages modifiedPages getModifiedPages modifiedPages
public Log Reader Page Store store this store store this page Buffer new byte Page SIZE this b4 new byte 4  LogReader PageStore pageBuffer
Open a log for reading protected void open Page Store page Store throws Page Store Exception String name page Store get Name if Log exists name return try in new File Input Stream Log name name catch IO Exception e throw new Page Store Exception Page Store Exception Log Open Failure e  PageStore pageStore PageStoreException pageStore getName FileInputStream IOException PageStoreException PageStoreException LogOpenFailure
Closes the log protected void close try if in null in close catch IO Exception e ignore in null  IOException
Returns the Hashmap of modified pages read from the log protected Map get Modified Pages throws Page Store Exception Map modified Pages new Tree Map if in null return modified Pages Field f4 new Field b4 read Buffer b4 int number Of Pages f4 get Int int record Size 4 Page SIZE if bytes Available number Of Pages record Size return modified Pages for int i 0 i number Of Pages i read Buffer b4 read Buffer page Buffer int page Number f4 get Int Page page store get Policy create Page page Number page Buffer store Integer key new Integer page Number modified Pages put key page return modified Pages  getModifiedPages PageStoreException modifiedPages TreeMap modifiedPages readBuffer numberOfPages getInt recordSize bytesAvailable numberOfPages recordSize modifiedPages numberOfPages readBuffer readBuffer pageBuffer pageNumber getInt getPolicy createPage pageNumber pageBuffer pageNumber modifiedPages modifiedPages
public void read Buffer byte buffer throws Page Store Exception try in read buffer catch IO Exception e throw new Page Store Exception Page Store Exception Log Read Failure e  readBuffer PageStoreException IOException PageStoreException PageStoreException LogReadFailure
protected int bytes Available throws Page Store Exception try return in available catch IO Exception e throw new Page Store Exception Page Store Exception Log Read Failure e  bytesAvailable PageStoreException IOException PageStoreException PageStoreException LogReadFailure

Puts the modified pages to the log file public static void put Modified Pages Page Store page Store Map modified Pages throws Page Store Exception Log Writer writer new Log Writer try writer open page Store writer put Modified Pages modified Pages finally writer close  putModifiedPages PageStore pageStore modifiedPages PageStoreException LogWriter LogWriter pageStore putModifiedPages modifiedPages
Opens the log protected void open Page Store store throws Page Store Exception this page Store store try out new File Output Stream Log name store get Name catch IO Exception e throw new Page Store Exception Page Store Exception Log Open Failure e  PageStore PageStoreException pageStore FileOutputStream getName IOException PageStoreException PageStoreException LogOpenFailure
Closes the log protected void close try if out null out close catch IO Exception e ignore out null  IOException
Puts the modified pages into the log protected void put Modified Pages Map modified Pages throws Page Store Exception Buffer b4 new Buffer 4 byte page Buffer new byte Page SIZE int number Of Pages modified Pages size b4 put 0 4 number Of Pages try write b4 get Byte Array Iterator page Stream modified Pages values iterator while page Stream has Next Page page Page page Stream next int page Number page get Page Number b4 put 0 4 page Number write b4 get Byte Array page to Buffer page Buffer write page Buffer catch IO Exception e throw new Page Store Exception Page Store Exception Log Write Failure e  putModifiedPages modifiedPages PageStoreException pageBuffer numberOfPages modifiedPages numberOfPages getByteArray pageStream modifiedPages pageStream hasNext pageStream pageNumber getPageNumber pageNumber getByteArray toBuffer pageBuffer pageBuffer IOException PageStoreException PageStoreException LogWriteFailure
public void write byte buffer throws IO Exception out write buffer  IOException

Constructor for an address from a four byte field public Object Address byte b throws Illegal Argument Exception if b length Size throw new Illegal Argument Exception Buffer buf new Buffer b page Number buf getU Int Page Number Offset 3 object Number buf getU Int Object Number Offset 1  ObjectAddress IllegalArgumentException IllegalArgumentException pageNumber getUInt PageNumberOffset objectNumber getUInt ObjectNumberOffset
Constructs an address from its constituent page and object numbers public Object Address int page Number int object Number throws Illegal Argument Exception if page Number 0 object Number 0 this page Number 0 this object Number 0 return if page Number 0 page Number 0xFFFFFF throw new Illegal Argument Exception if page Number Object Store Page SIZE 0 throw new Illegal Argument Exception if object Number 0 object Number 0xFF throw new Illegal Argument Exception this page Number page Number this object Number object Number  ObjectAddress pageNumber objectNumber IllegalArgumentException pageNumber objectNumber pageNumber objectNumber pageNumber pageNumber IllegalArgumentException pageNumber ObjectStorePage IllegalArgumentException objectNumber objectNumber IllegalArgumentException pageNumber pageNumber objectNumber objectNumber
Returns true if and only if the addresses are equal public boolean equals Object an Object if an Object instanceof Object Address return false Object Address address Object Address an Object if page Number address page Number return false if object Number address object Number return false return true  anObject anObject ObjectAddress ObjectAddress ObjectAddress anObject pageNumber pageNumber objectNumber objectNumber
Returns the object number from the address public int get Object Number return object Number  getObjectNumber objectNumber
Returns the page number from the address public int get Page Number return page Number  getPageNumber pageNumber
Returns an int representing the hash code for the address public int hash Code return page Number 8 object Number  hashCode pageNumber objectNumber
Tests the address for the null address value public boolean is Null return page Number 0 object Number 0  isNull pageNumber objectNumber
Returns a byte array form of the address public byte to Byte Array Buffer buf new Buffer Size buf put Page Number Offset 3 page Number buf put Object Number Offset 1 object Number return buf get  toByteArray PageNumberOffset pageNumber ObjectNumberOffset objectNumber
Returns a string representation of the address suitable for printing public String to String String Buffer b new String Buffer 10 b append NON NLS 1 b append get Page Number b append NON NLS 1 b append get Object Number b append NON NLS 1 return b to String  toString StringBuffer StringBuffer getPageNumber getObjectNumber toString

Object Header constructor comment public Object Header byte buffer throws Object Store Exception if buffer length SIZE throw new Illegal Argument Exception Buffer buf new Buffer buffer if buf getU Int Header Tag Offset 2 Header Tag Value throw new Object Store Exception Object Store Exception Object Header Failure this object Length buf getU Int Object Length Offset 2  ObjectHeader ObjectHeader ObjectStoreException IllegalArgumentException getUInt HeaderTagOffset HeaderTagValue ObjectStoreException ObjectStoreException ObjectHeaderFailure objectLength getUInt ObjectLengthOffset
Object Header constructor comment public Object Header int object Length this object Length object Length  ObjectHeader ObjectHeader objectLength objectLength objectLength
Object Header constructor comment public Object Header Field f throws Object Store Exception this f get  ObjectHeader ObjectHeader ObjectStoreException
public int get Object Length return object Length  getObjectLength objectLength
public byte to Byte Array Buffer buf new Buffer SIZE buf put Header Tag Offset 2 Header Tag Value buf put Object Length Offset 2 object Length return buf get  toByteArray HeaderTagOffset HeaderTagValue ObjectLengthOffset objectLength

public ObjectID byte b throws Indexed Store Exception if b length Size throw new Indexed Store Exception Indexed Store Exception ObjectID Invalid Buffer buf new Buffer b object Number buf get Long Object Number Offset 8  IndexedStoreException IndexedStoreException IndexedStoreException ObjectIDInvalid objectNumber getLong ObjectNumberOffset
public ObjectID long object Number this object Number object Number  objectNumber objectNumber objectNumber
public boolean equals Object an Object if an Object instanceof ObjectID return false ObjectID id ObjectID an Object if this object Number id object Number return false return true  anObject anObject anObject objectNumber objectNumber
public int hash Code return int object Number  hashCode objectNumber
public byte to Byte Array Buffer buf new Buffer Size buf put Object Number Offset 8 object Number return buf get  toByteArray ObjectNumberOffset objectNumber
public String to String String Buffer b new String Buffer b append id NON NLS 1 b append object Number b append NON NLS 1 return b to String  toString StringBuffer StringBuffer objectNumber toString

Creates a new page from a buffer public Object Page int page Number byte buffer Page Store page Store super page Number buffer page Store  ObjectPage pageNumber PageStore pageStore pageNumber pageStore
Writes the contents of the page to a buffer public void to Buffer byte buffer dematerialize page Buffer copy To buffer  toBuffer pageBuffer copyTo
Updates the page fields from its bytes This is used when the page has just been mutated from a its superclass protected void materialize int initialized page Buffer getU Int Flag Offset 2 if initialized 0xEEEE used Space page Buffer getU Int Used Space Offset 2 used Entries page Buffer getU Int Used Entries Offset 2 initial Entry page Buffer getU Int Initial Entry Offset 2 free Space Offset page Buffer getU Int Free Space Offset 2 else used Space 0 used Entries 0 initial Entry 0 free Space Offset Object Space Offset  pageBuffer getUInt FlagOffset usedSpace pageBuffer getUInt UsedSpaceOffset usedEntries pageBuffer getUInt UsedEntriesOffset initialEntry pageBuffer getUInt InitialEntryOffset freeSpaceOffset pageBuffer getUInt FreeSpaceOffset usedSpace usedEntries initialEntry freeSpaceOffset ObjectSpaceOffset
Writes the object page header and from the header instance variables This is used just before the page is to be written to the page store protected void dematerialize page Buffer put Flag Offset 2 0xEEEE page Buffer put Used Space Offset 2 used Space page Buffer put Used Entries Offset 2 used Entries page Buffer put Initial Entry Offset 2 initial Entry page Buffer put Free Space Offset 2 free Space Offset  pageBuffer FlagOffset pageBuffer UsedSpaceOffset usedSpace pageBuffer UsedEntriesOffset usedEntries pageBuffer InitialEntryOffset initialEntry pageBuffer FreeSpaceOffset freeSpaceOffset
This method returns the Field mapped over the object for a given object number public Field get Object Field int object Number throws Object Store Exception int entry Offset Object Directory Offset 2 object Number int block Offset page Buffer getU Int entry Offset 2 if block Offset 0 return null Object Header header new Object Header page Buffer get block Offset Object Header SIZE Field f page Buffer get Field block Offset Object Header SIZE header get Object Length return f  getObjectField objectNumber ObjectStoreException entryOffset ObjectDirectoryOffset objectNumber blockOffset pageBuffer getUInt entryOffset blockOffset ObjectHeader ObjectHeader pageBuffer blockOffset ObjectHeader pageBuffer getField blockOffset ObjectHeader getObjectLength
Places an object into a page The object must have a reservation public void insert Object Stored Object object throws Object Store Exception ensure that there is space for this object int block Length object length Object Header SIZE if get Free Space block Length throw new Object Store Exception Object Store Exception Object Size Failure make sure the slot is still empty int object Number object get Address get Object Number int entry Offset Object Directory Offset object Number 2 int block Offset page Buffer getU Int entry Offset 2 if block Offset 0 throw new Object Store Exception Object Store Exception Page Vacancy Failure place the object into the object space portion of the page if block Length SIZE free Space Offset compress compress the space if necessary block Offset free Space Offset place the object at the beginning of the free space Object Header header new Object Header object length page Buffer put block Offset header page Buffer put block Offset Object Header SIZE object to Byte Array page Buffer put entry Offset 2 block Offset free Space Offset block Length update where the new free space is used Space block Length indicate that space is used up used Entries indicate that an entry is used up initial Entry object Number 1 Max Entries set where to begin the next search set Changed notify Observers  insertObject StoredObject ObjectStoreException blockLength ObjectHeader getFreeSpace blockLength ObjectStoreException ObjectStoreException ObjectSizeFailure objectNumber getAddress getObjectNumber entryOffset ObjectDirectoryOffset objectNumber blockOffset pageBuffer getUInt entryOffset blockOffset ObjectStoreException ObjectStoreException PageVacancyFailure blockLength freeSpaceOffset blockOffset freeSpaceOffset ObjectHeader ObjectHeader pageBuffer blockOffset pageBuffer blockOffset ObjectHeader toByteArray pageBuffer entryOffset blockOffset freeSpaceOffset blockLength usedSpace blockLength usedEntries initialEntry objectNumber MaxEntries setChanged notifyObservers
Reserves space for an object on the page Records the reservation in the reservation table public int reserve Object Stored Object object Reservation Table reservations throws Object Store Exception ensure that there is space for this object there should be since we check beforehand int block Length object length Object Header SIZE if get Free Space block Length throw new Object Store Exception Object Store Exception Object Size Failure get the reservation for this page from the table create a new one if necessary Reservation r reservations get page Number if r null r new Reservation get Free Space Max Entries used Entries initial Entry reservations put page Number r find an empty slot that is not already reserved int object Number r get Initial Entry int block Offset 0 int entry Offset 0 for int i 0 i Max Entries i if r contains object Number entry Offset Object Directory Offset object Number 2 block Offset page Buffer getU Int entry Offset 2 if block Offset 0 break object Number object Number 1 Max Entries if block Offset 0 throw new Object Store Exception Object Store Exception Page Vacancy Failure begin the next search just after where we left off r set Initial Entry object Number 1 Max Entries update the reservation for this page r add object Number block Length return object Number  reserveObject StoredObject ReservationTable ObjectStoreException blockLength ObjectHeader getFreeSpace blockLength ObjectStoreException ObjectStoreException ObjectSizeFailure pageNumber getFreeSpace MaxEntries usedEntries initialEntry pageNumber objectNumber getInitialEntry blockOffset entryOffset MaxEntries objectNumber entryOffset ObjectDirectoryOffset objectNumber blockOffset pageBuffer getUInt entryOffset blockOffset objectNumber objectNumber MaxEntries blockOffset ObjectStoreException ObjectStoreException PageVacancyFailure setInitialEntry objectNumber MaxEntries objectNumber blockLength objectNumber
public void remove Object int object Number throws Object Store Exception check for existence of the object to be removed int entry Offset Object Directory Offset 2 object Number int block Offset page Buffer getU Int entry Offset 2 if block Offset 0 throw new Object Store Exception Object Store Exception Object Existence Failure remove the object page Buffer put entry Offset 2 0 remove its offset from the object table Object Header h new Object Header page Buffer get block Offset Object Header SIZE int object Length h get Object Length int block Length object Length Object Header SIZE find the length of it in the object space page Buffer clear block Offset block Length clear its spot in the object space used Space block Length space has been freed used Entries an entry has been freed set Changed notify Observers  removeObject objectNumber ObjectStoreException entryOffset ObjectDirectoryOffset objectNumber blockOffset pageBuffer getUInt entryOffset blockOffset ObjectStoreException ObjectStoreException ObjectExistenceFailure pageBuffer entryOffset ObjectHeader ObjectHeader pageBuffer blockOffset ObjectHeader objectLength getObjectLength blockLength objectLength ObjectHeader pageBuffer blockOffset blockLength usedSpace blockLength usedEntries setChanged notifyObservers
Updates an object value on the page An object may not change its size public void update Object Stored Object object throws Object Store Exception int object Number object get Address get Object Number check for existence of the object to be updated int entry Offset Object Directory Offset 2 object Number int block Offset page Buffer getU Int entry Offset 2 if block Offset 0 throw new Object Store Exception Object Store Exception Object Existence Failure retrieve the header and check the size Object Header header new Object Header page Buffer get block Offset Object Header SIZE if header get Object Length object length throw new Object Store Exception Object Store Exception Object Size Failure update in place int object Offset block Offset Object Header SIZE page Buffer put object Offset object to Byte Array set Changed notify Observers  updateObject StoredObject ObjectStoreException objectNumber getAddress getObjectNumber entryOffset ObjectDirectoryOffset objectNumber blockOffset pageBuffer getUInt entryOffset blockOffset ObjectStoreException ObjectStoreException ObjectExistenceFailure ObjectHeader ObjectHeader pageBuffer blockOffset ObjectHeader getObjectLength ObjectStoreException ObjectStoreException ObjectSizeFailure objectOffset blockOffset ObjectHeader pageBuffer objectOffset toByteArray setChanged notifyObservers
Compresses the space in the page putting all the free space at the end of the page This will adjust the free space offset and the offsets of the individual objects All of the other parameters of the page remain the same Resets the number of used entries to fix an old bug private void compress throws Object Store Exception Buffer temp new Buffer SIZE int new Block Offset Object Space Offset int entry Offset Object Directory Offset used Entries 0 for int i 0 i Max Entries i int old Block Offset page Buffer getU Int entry Offset 2 if old Block Offset 0 Object Header h new Object Header page Buffer get old Block Offset Object Header SIZE int block Length h get Object Length Object Header SIZE temp put new Block Offset page Buffer get old Block Offset block Length page Buffer put entry Offset 2 new Block Offset new Block Offset block Length used Entries entry Offset 2 page Buffer put Object Space Offset temp get Object Space Offset SIZE Object Space Offset free Space Offset new Block Offset  ObjectStoreException newBlockOffset ObjectSpaceOffset entryOffset ObjectDirectoryOffset usedEntries MaxEntries oldBlockOffset pageBuffer getUInt entryOffset oldBlockOffset ObjectHeader ObjectHeader pageBuffer oldBlockOffset ObjectHeader blockLength getObjectLength ObjectHeader newBlockOffset pageBuffer oldBlockOffset blockLength pageBuffer entryOffset newBlockOffset newBlockOffset blockLength usedEntries entryOffset pageBuffer ObjectSpaceOffset ObjectSpaceOffset ObjectSpaceOffset freeSpaceOffset newBlockOffset
Returns the amount of free space on this page public int get Free Space if used Entries Max Entries return 0 return SIZE Object Space Offset used Space  getFreeSpace usedEntries MaxEntries ObjectSpaceOffset usedSpace
public boolean is Object Page return true  isObjectPage

Creates a repository for the pathname public static void create String path throws Object Store Exception try Page Store create path catch Page Store Exception e throw new Object Store Exception Object Store Exception Store Create Failure e  ObjectStoreException PageStore PageStoreException ObjectStoreException ObjectStoreException StoreCreateFailure
Deletes the underlying page store public static void delete String path Page Store delete path  PageStore
Checks for existence of an object store file public static boolean exists String path return Page Store exists path  PageStore
Creates an object store This store is unusable until opened public Object Store Abstract Object Policy object Policy this page Policy new Object Store Page Policy this object Policy object Policy  ObjectStore AbstractObjectPolicy objectPolicy pagePolicy ObjectStorePagePolicy objectPolicy objectPolicy
Opens an object store public void open String name throws Object Store Exception try page Store new Page Store page Policy page Store open name catch Page Store Exception e throw new Object Store Exception Object Store Exception Store Open Failure e check Metadata acquired Objects new Hash Map modified Objects new Hash Map cached Objects new Linked List phantoms new Hash Set reservations new Reservation Table  ObjectStoreException pageStore PageStore pagePolicy pageStore PageStoreException ObjectStoreException ObjectStoreException StoreOpenFailure checkMetadata acquiredObjects HashMap modifiedObjects HashMap cachedObjects LinkedList HashSet ReservationTable
Closes the object store public void close throws Object Store Exception try commit catch Object Store Exception e make sure the page store file gets closed no matter what page Store close false throw e try page Store close catch Exception e ignore failure to close acquired Objects null modified Objects null cached Objects null phantoms null reservations null  ObjectStoreException ObjectStoreException pageStore pageStore acquiredObjects modifiedObjects cachedObjects
public Buffer get Metadata Area int i throws Object Store Exception try return new Buffer page Store read Metadata Area i catch Page Store Exception e throw new Object Store Exception Object Store Exception Metadata Request Failure e  getMetadataArea ObjectStoreException pageStore readMetadataArea PageStoreException ObjectStoreException ObjectStoreException MetadataRequestFailure
public void put Metadata Area int i Buffer buffer throws Object Store Exception try page Store write Metadata Area i buffer get Byte Array catch Page Store Exception e throw new Object Store Exception Object Store Exception Metadata Request Failure e  putMetadataArea ObjectStoreException pageStore writeMetadataArea getByteArray PageStoreException ObjectStoreException ObjectStoreException MetadataRequestFailure
Checks to see if the metadata stored in the object store matches that expected by this code If not a conversion is necessary protected void check Metadata throws Object Store Exception Buffer metadata get Metadata Area Object Store Metadata AreaID Field version Field metadata get Field 0 4 int object Store Version version Field get Int if object Store Version 0 0 indicates that the store is new and opened for read write version Field put Current Object Store Version put Metadata Area Object Store Metadata AreaID metadata return if object Store Version Current Object Store Version return convert object Store Version  checkMetadata ObjectStoreException getMetadataArea ObjectStoreMetadataAreaID versionField getField objectStoreVersion versionField getInt objectStoreVersion versionField CurrentObjectStoreVersion putMetadataArea ObjectStoreMetadataAreaID objectStoreVersion CurrentObjectStoreVersion objectStoreVersion
Converts the object store from a previous to the current version No conversions are yet defined protected void convert int from Version throws Object Store Exception throw new Object Store Exception Object Store Exception Store Conversion Failure  fromVersion ObjectStoreException ObjectStoreException ObjectStoreException StoreConversionFailure
Commits the modified object collection to the underlying page store public void commit throws Object Store Exception for Iterator z acquired Objects values iterator z has Next Stored Object object Stored Object z next object notify Observers for Iterator z phantoms iterator z has Next Object Address address Object Address z next int page Number address get Page Number Object Page page acquire Object Page page Number page remove Object address get Object Number update Space Map Page page get Page Number page get Free Space page release phantoms clear for Iterator z modified Objects values iterator z has Next Stored Object object Stored Object z next z remove add To Cache object Object Address address object get Address int page Number address get Page Number Object Page page acquire Object Page page Number if reservations contains address page insert Object object update Space Map Page page Number page get Free Space else page update Object object page release reservations clear try page Store commit catch Page Store Exception e throw new Object Store Exception Object Store Exception Page Write Failure e  ObjectStoreException acquiredObjects hasNext StoredObject StoredObject notifyObservers hasNext ObjectAddress ObjectAddress pageNumber getPageNumber ObjectPage acquireObjectPage pageNumber removeObject getObjectNumber updateSpaceMapPage getPageNumber getFreeSpace modifiedObjects hasNext StoredObject StoredObject addToCache ObjectAddress getAddress pageNumber getPageNumber ObjectPage acquireObjectPage pageNumber insertObject updateSpaceMapPage pageNumber getFreeSpace updateObject pageStore PageStoreException ObjectStoreException ObjectStoreException PageWriteFailure
Rollback the modified objects collection public void rollback throws Object Store Exception modified Objects clear reservations clear phantoms clear  ObjectStoreException modifiedObjects
Returns the name of the store public String get Name return page Store get Name  getName pageStore getName
Returns the policy used to create objects public Abstract Object Policy get Policy return object Policy  AbstractObjectPolicy getPolicy objectPolicy
Returns the Stored Object at a given address This registers the store as an observer of changes to this object public Stored Object acquire Object Object Address address throws Object Store Exception if phantoms contains address throw new Object Store Exception Object Store Exception Object Existence Failure Stored Object object Stored Object acquired Objects get address if object null object Stored Object modified Objects get address if object null object remove From Cache address if object null int page Number address get Page Number Object Page page acquire Object Page page Number try Field f page get Object Field address get Object Number if f null throw new Object Store Exception Object Store Exception Object Existence Failure object object Policy create Object f this address catch Object Store Exception e page release throw e page release acquired Objects put address object object add Observer this object add Reference return object  StoredObject StoredObject acquireObject ObjectAddress ObjectStoreException ObjectStoreException ObjectStoreException ObjectExistenceFailure StoredObject StoredObject acquiredObjects StoredObject modifiedObjects removeFromCache pageNumber getPageNumber ObjectPage acquireObjectPage pageNumber getObjectField getObjectNumber ObjectStoreException ObjectStoreException ObjectExistenceFailure objectPolicy createObject ObjectStoreException acquiredObjects addObserver addReference
Releases an object If there are no more references and the object is not in the modified cache return the object to the standard cache Objects in the standard cache always maintain a reference count of 0 public void release Object Stored Object object throws Object Store Exception object remove Reference if object has References return object notify Observers one last chance to collect changed objects object delete Observer this acquired Objects remove object get Address add To Cache object  releaseObject StoredObject ObjectStoreException removeReference hasReferences notifyObservers deleteObserver acquiredObjects getAddress addToCache
Updates the store when receiving an object change notification Required by Observer This places the object in the modified objects cache This will be cleared during commit rollback processing An object may reside simultaneously in the modified and acquired object caches public void update Observable object Object arg Stored Object stored Object Stored Object object modified Objects put stored Object get Address stored Object  StoredObject storedObject StoredObject modifiedObjects storedObject getAddress storedObject
Adds an object to the backing cache Objects in this cache are neither in the modified set or the acquired set protected void add To Cache Stored Object object synchronized cached Objects if acquired Objects contains Key object get Address return if modified Objects contains Key object get Address return cached Objects add First object if cached Objects size 50 return cached Objects remove Last  addToCache StoredObject cachedObjects acquiredObjects containsKey getAddress modifiedObjects containsKey getAddress cachedObjects addFirst cachedObjects cachedObjects removeLast
Removes an object from the backing cache given its address protected Stored Object remove From Cache Object Address address synchronized cached Objects Stored Object object null for Iterator z cached Objects iterator z has Next Stored Object o Stored Object z next if o get Address equals address z remove object o break return object  StoredObject removeFromCache ObjectAddress cachedObjects StoredObject cachedObjects hasNext StoredObject StoredObject getAddress
Inserts an object into the store by reserving a place for the object This assigns it an address and places it in the modified objects map A reservation is created that records the address and the amount of space used The object is not actually added to the underlying store until a commit operation is executed public Object Address insert Object Stored Object object throws Object Store Exception int bytes Needed object length Object Header SIZE Object Page page acquire Object Page For Size bytes Needed int page Number page get Page Number int object Number page reserve Object object reservations page release Object Address address new Object Address page Number object Number object set Address address object set Store this modified Objects put address object return address  ObjectAddress insertObject StoredObject ObjectStoreException bytesNeeded ObjectHeader ObjectPage acquireObjectPageForSize bytesNeeded pageNumber getPageNumber objectNumber reserveObject ObjectAddress ObjectAddress pageNumber objectNumber setAddress setStore modifiedObjects
Removes an object from the object store In doing so it must remove it from the cache as well public void remove Object Object Address address throws Object Store Exception if phantoms contains address throw new Object Store Exception Object Store Exception Object Existence Failure if acquired Objects contains Key address throw new Object Store Exception Object Store Exception Object Is Locked Stored Object object Stored Object modified Objects get address boolean in Store reservations contains address if object null reservations remove address modified Objects remove address remove From Cache address if in Store phantoms add address  removeObject ObjectAddress ObjectStoreException ObjectStoreException ObjectStoreException ObjectExistenceFailure acquiredObjects containsKey ObjectStoreException ObjectStoreException ObjectIsLocked StoredObject StoredObject modifiedObjects inStore modifiedObjects removeFromCache inStore
Places the object in the modified objects cache and marks it as in use The modified objects cache is flushed at commit or rollback time At that point the reference to the object is dropped public void update Object Stored Object object Object Address address object get Address if modified Objects get address null modified Objects put address object try acquire Object address catch Object Store Exception e protected void update Space Map Page int object Page Number int free Space throws Object Store Exception Space Map Page p acquire Space Map Page object Page Number p set Free Space object Page Number free Space p release  updateObject StoredObject ObjectAddress getAddress modifiedObjects modifiedObjects acquireObject ObjectStoreException updateSpaceMapPage objectPageNumber freeSpace ObjectStoreException SpaceMapPage acquireSpaceMapPage objectPageNumber setFreeSpace objectPageNumber freeSpace
Acquires an object page This is a convenience method to translate exceptions protected Object Page acquire Object Page int page Number throws Object Store Exception Object Page page try page Object Page page Store acquire page Number catch Page Store Exception e throw new Object Store Exception Object Store Exception Page Read Failure e return page  ObjectPage acquireObjectPage pageNumber ObjectStoreException ObjectPage ObjectPage pageStore pageNumber PageStoreException ObjectStoreException ObjectStoreException PageReadFailure
Looks for the first page that guarantees enough space to meet the criteria This is the first fit algorithm and will get slow as the page file grows since it is O n 2 Each addition of a new page is preceded by a search of all pages We reduce the overhead by maintaining Space Map Pages that tell us how full each page is A space map page is the first page of a span of 8K pages 64M total Each byte in a space map page indicates the fullness of each page in the span Since databases are expected to be quite small 200 Mb we might be able to live with this simple algorithm protected Object Page acquire Object Page For Size int bytes Needed throws Object Store Exception int o Page Number 0 int number Of Spans page Store number Of Pages 1 Object Store Page SIZE 1 for int i 0 i number Of Spans i try int s Page Number i Object Store Page SIZE Space Map Page s Page Space Map Page page Store acquire s Page Number for int j 1 j Object Store Page SIZE j int n s Page Number j Reservation r reservations get n int bytes Available r null s Page get Free Space n r get Free Space if bytes Needed bytes Available o Page Number n break s Page release catch Page Store Exception e throw new Object Store Exception Object Store Exception Page Read Failure e if o Page Number 0 break if o Page Number 0 throw new Object Store Exception Object Store Exception Page Read Failure try Object Page o Page Object Page page Store acquire o Page Number return o Page catch Page Store Exception e throw new Object Store Exception Object Store Exception Page Read Failure e  SpaceMapPages 200Mb ObjectPage acquireObjectPageForSize bytesNeeded ObjectStoreException oPageNumber numberOfSpans pageStore numberOfPages ObjectStorePage numberOfSpans sPageNumber ObjectStorePage SpaceMapPage sPage SpaceMapPage pageStore sPageNumber ObjectStorePage sPageNumber bytesAvailable sPage getFreeSpace getFreeSpace bytesNeeded bytesAvailable oPageNumber sPage PageStoreException ObjectStoreException ObjectStoreException PageReadFailure oPageNumber oPageNumber ObjectStoreException ObjectStoreException PageReadFailure ObjectPage oPage ObjectPage pageStore oPageNumber oPage PageStoreException ObjectStoreException ObjectStoreException PageReadFailure
Acquires a space map page This is a convenience method to translate exceptions protected Space Map Page acquire Space Map Page int object Page Number throws Object Store Exception int page Number object Page Number 0xFFFFE000 Space Map Page p null try p Space Map Page page Store acquire page Number catch Page Store Exception e throw new Object Store Exception Object Store Exception Page Read Failure e return p  SpaceMapPage acquireSpaceMapPage objectPageNumber ObjectStoreException pageNumber objectPageNumber SpaceMapPage SpaceMapPage pageStore pageNumber PageStoreException ObjectStoreException ObjectStoreException PageReadFailure

public int id 0 exception id public Object Store Exception int id this id null  ObjectStoreException
public Object Store Exception int id Throwable exception super message id exception this id id  ObjectStoreException
public Object Store Exception String s this s null  ObjectStoreException
public Object Store Exception String s Throwable exception super s exception this id Generic Failure  ObjectStoreException GenericFailure
Initializes the messages at class load time private static void initialize Messages message Generic Failure bind object Store generic Failure NON NLS 1 message Internal Failure bind object Store internal Failure NON NLS 1 message Store Create Failure bind object Store store Create Failure NON NLS 1 message Store Conversion Failure bind object Store store Conversion Failure NON NLS 1 message Store Open Failure bind object Store store Open Failure NON NLS 1 message Store Close Failure bind object Store store Close Failure NON NLS 1 message Page Read Failure bind object Store page Read Failure NON NLS 1 message Page Write Failure bind object Store page Write Failure NON NLS 1 message Page Vacancy Failure bind object Store page Vacancy Failure NON NLS 1 message Object Type Failure bind object Store object Type Failure NON NLS 1 message Object Size Failure bind object Store object Size Failure NON NLS 1 message Object Existence Failure bind object Store object Existence Failure NON NLS 1 message Object Header Failure bind object Store object Header Failure NON NLS 1 message Object Insert Failure bind object Store object Insert Failure NON NLS 1 message Object Remove Failure bind object Store object Remove Failure NON NLS 1 message Object Update Failure bind object Store object Update Failure NON NLS 1 message Object Is Locked bind object Store object Is Locked NON NLS 1 message Metadata Request Failure bind object Store metadata Request Failure NON NLS 1  initializeMessages GenericFailure objectStore genericFailure InternalFailure objectStore internalFailure StoreCreateFailure objectStore storeCreateFailure StoreConversionFailure objectStore storeConversionFailure StoreOpenFailure objectStore storeOpenFailure StoreCloseFailure objectStore storeCloseFailure PageReadFailure objectStore pageReadFailure PageWriteFailure objectStore pageWriteFailure PageVacancyFailure objectStore pageVacancyFailure ObjectTypeFailure objectStore objectTypeFailure ObjectSizeFailure objectStore objectSizeFailure ObjectExistenceFailure objectStore objectExistenceFailure ObjectHeaderFailure objectStore objectHeaderFailure ObjectInsertFailure objectStore objectInsertFailure ObjectRemoveFailure objectStore objectRemoveFailure ObjectUpdateFailure objectStore objectUpdateFailure ObjectIsLocked objectStore objectIsLocked MetadataRequestFailure objectStore metadataRequestFailure
private static String bind String name return Policy bind name 

public Object Store Page int page Number byte buffer Page Store page Store super page Number page Store page Buffer new Buffer SIZE page Buffer copy From buffer materialize  ObjectStorePage pageNumber PageStore pageStore pageNumber pageStore pageBuffer pageBuffer copyFrom
public boolean is Object Page return false  isObjectPage
public boolean is Space Map Page return false  isSpaceMapPage
protected abstract void materialize 

see Abstract Page Policy create Page int byte Page Store public final Page create Page int page Number byte buffer Page Store page Store if page Number Page SIZE 0 return new Space Map Page page Number buffer page Store else return new Object Page page Number buffer page Store  AbstractPagePolicy createPage PageStore createPage pageNumber PageStore pageStore pageNumber SpaceMapPage pageNumber pageStore ObjectPage pageNumber pageStore

Default constructor protected Page super 
Constructs a new page of the given size public Page int page Number Page Store page Store this page Number page Number this page Store page Store this reference Count 0  pageNumber PageStore pageStore pageNumber pageNumber pageStore pageStore referenceCount
Adds a reference for this entity to track public int add Reference reference Count return reference Count  addReference referenceCount referenceCount
Returns the page number of the page public int get Page Number return page Number  getPageNumber pageNumber
Tests for existing references public boolean has References return reference Count 0  hasReferences referenceCount
Releases a page back to the store public void release page Store release this  pageStore
Removes a reference public int remove Reference if reference Count 0 reference Count return reference Count  removeReference referenceCount referenceCount referenceCount
Writes the contents of the page to a buffer public abstract void to Buffer byte buffer  toBuffer

Creates the page file on the file system Creates a file of zero length public static void create String file Name throws Page Store Exception try File Output Stream out new File Output Stream file Name out close catch IO Exception e throw new Page Store Exception Page Store Exception Create Failure e  fileName PageStoreException FileOutputStream FileOutputStream fileName IOException PageStoreException PageStoreException CreateFailure
Deletes the page file from the file system public static void delete String file Name new File file Name delete  fileName fileName
Returns true if the file exists in the file system public static boolean exists String file Name return new File file Name exists  fileName fileName
Creates a new Page Store with a given policy public Page Store Abstract Page Policy policy this policy policy this store Offset Number Of Metadata Areas Size Of Metadata Area  PageStore PageStore AbstractPagePolicy storeOffset NumberOfMetadataAreas SizeOfMetadataArea
Opens the Page Store The file is created if necessary This will raise an exception if the media on which the file is located is read only or not authorized to the user public void open String name throws Page Store Exception this name name page Buffer new byte Page SIZE metadata Buffer new byte Size Of Metadata Area if exists name create name try this file new Random Access File name rw NON NLS 1 catch IO Exception e throw new Page Store Exception Page Store Exception Open Failure e check Metadata number Of Pages number Of Pages In File number Of File Reads 0 number Of File Writes 0 number Of Reads 0 number Of Writes 0 number Of Cache Hits 0 apply any outstanding transaction by reading the log file and applying it modified Pages Log Reader get Modified Pages this flush Log delete name prepare for normal operation acquired Pages new Hash Map  PageStore PageStoreException pageBuffer metadataBuffer SizeOfMetadataArea RandomAccessFile IOException PageStoreException PageStoreException OpenFailure checkMetadata numberOfPages numberOfPagesInFile numberOfFileReads numberOfFileWrites numberOfReads numberOfWrites numberOfCacheHits modifiedPages LogReader getModifiedPages acquiredPages HashMap
Checks to see if the metadata stored in the page store matches that expected by this code If not a conversion is necessary private void check Metadata throws Page Store Exception byte md read Metadata Area 0 Buffer metadata new Buffer md Field version Field metadata get Field 0 4 int page Store Version version Field get Int if page Store Version 0 version Field put Current Page Store Version write Metadata Area 0 md return if page Store Version Current Page Store Version return convert Page Store page Store Version  checkMetadata PageStoreException readMetadataArea versionField getField pageStoreVersion versionField getInt pageStoreVersion versionField CurrentPageStoreVersion writeMetadataArea pageStoreVersion CurrentPageStoreVersion convertPageStore pageStoreVersion
Converts the page store file from a previous to the current version No conversions are yet defined private void convert Page Store int from Version throws Page Store Exception throw new Page Store Exception Page Store Exception Conversion Failure  convertPageStore fromVersion PageStoreException PageStoreException PageStoreException ConversionFailure
Commits all changes and closes the page store public void close close true 
Closes the page store public void close boolean commit if commit try commit catch Page Store Exception e ignore try file close catch IO Exception e ignore file null  PageStoreException IOException
Commits all modified pages to the file public void commit throws Page Store Exception if modified Pages size 0 return Log Writer put Modified Pages this modified Pages flush Log delete name  PageStoreException modifiedPages LogWriter putModifiedPages modifiedPages
Throws out the modified pages public void rollback modified Pages clear  modifiedPages
Writes the modified pages to the page file private void flush throws Page Store Exception if modified Pages size 0 return Iterator page Stream modified Pages values iterator while page Stream has Next Page page Page page Stream next write Page page modified Pages clear  PageStoreException modifiedPages pageStream modifiedPages pageStream hasNext pageStream writePage modifiedPages
Acquires the page that has the given page number from the page store public Page acquire int page Number throws Page Store Exception number Of Reads Integer key new Integer page Number Page page Page acquired Pages get key if page null page Page modified Pages get key if page null number Of Pages Math max page Number 1 number Of Pages page read Page page Number else number Of Cache Hits acquired Pages put key page page add Observer this else number Of Cache Hits page add Reference return page  pageNumber PageStoreException numberOfReads pageNumber acquiredPages modifiedPages numberOfPages pageNumber numberOfPages readPage pageNumber numberOfCacheHits acquiredPages addObserver numberOfCacheHits addReference
Releases a page and decrements its reference count public void release Page page Integer key new Integer page get Page Number page remove Reference if page has References return page delete Observer this acquired Pages remove key  getPageNumber removeReference hasReferences deleteObserver acquiredPages
Processes a page update public void update Observable object Object arg Page page Page object Integer key new Integer page get Page Number modified Pages put key page  getPageNumber modifiedPages
Returns the file seek offset for a given page number protected long offset Of Page int page Number return long page Number Page SIZE store Offset  offsetOfPage pageNumber pageNumber storeOffset
protected Page read Page int page Number throws Page Store Exception if read Buffer offset Of Page page Number page Buffer throw new Page Store Exception Page Store Exception Read Failure number Of File Reads Page p policy create Page page Number page Buffer this p add Observer this return p  readPage pageNumber PageStoreException readBuffer offsetOfPage pageNumber pageBuffer PageStoreException PageStoreException ReadFailure numberOfFileReads createPage pageNumber pageBuffer addObserver
protected void write Page Page page throws Page Store Exception page to Buffer page Buffer long file Offset offset Of Page page get Page Number if write Buffer file Offset page Buffer 0 page Buffer length throw new Page Store Exception Page Store Exception Write Failure number Of File Writes  writePage PageStoreException toBuffer pageBuffer fileOffset offsetOfPage getPageNumber writeBuffer fileOffset pageBuffer pageBuffer PageStoreException PageStoreException WriteFailure numberOfFileWrites
Returns the file seek offset for a given metadata area protected long offset Of Metadata Area int i return long i Size Of Metadata Area  offsetOfMetadataArea SizeOfMetadataArea
public byte read Metadata Area int i throws Page Store Exception if read Buffer offset Of Metadata Area i metadata Buffer throw new Page Store Exception Page Store Exception Metadata Request Failure return new Buffer metadata Buffer get 0 metadata Buffer length  readMetadataArea PageStoreException readBuffer offsetOfMetadataArea metadataBuffer PageStoreException PageStoreException MetadataRequestFailure metadataBuffer metadataBuffer
public void write Metadata Area int i byte buffer throws Page Store Exception if i 0 i Number Of Metadata Areas throw new Page Store Exception Page Store Exception Metadata Request Failure if buffer length Size Of Metadata Area throw new Page Store Exception Page Store Exception Metadata Request Failure if write Buffer offset Of Metadata Area i buffer 0 buffer length throw new Page Store Exception Page Store Exception Metadata Request Failure return  writeMetadataArea PageStoreException NumberOfMetadataAreas PageStoreException PageStoreException MetadataRequestFailure SizeOfMetadataArea PageStoreException PageStoreException MetadataRequestFailure writeBuffer offsetOfMetadataArea PageStoreException PageStoreException MetadataRequestFailure
protected boolean read Buffer long file Offset byte buffer new Buffer buffer clear long file Length get File Length if file Offset file Length return true int bytes To Read int Math min buffer length file Length file Offset try file seek file Offset file read Fully buffer 0 bytes To Read catch IO Exception e return false return true  readBuffer fileOffset fileLength getFileLength fileOffset fileLength bytesToRead fileLength fileOffset fileOffset readFully bytesToRead IOException
protected boolean write Buffer long file Offset byte buffer int offset int length clear File To Offset file Offset try file seek file Offset file write buffer offset length catch IO Exception e return false return true  writeBuffer fileOffset clearFileToOffset fileOffset fileOffset IOException
protected long get File Length long n 0 try n file length catch IO Exception e return 0 return n  getFileLength IOException
protected void clear File To Offset long file Offset long file Length get File Length while file Length file Offset int m int Math min ZEROES length file Offset file Length write Buffer file Length ZEROES 0 m file Length m  clearFileToOffset fileOffset fileLength getFileLength fileLength fileOffset fileOffset fileLength writeBuffer fileLength fileLength
Returns the number of pages actually in the underlying file protected int number Of Pages In File return int get File Length offset Of Page 0 Page SIZE  numberOfPagesInFile getFileLength offsetOfPage
Returns the name of the page store public String get Name return name  getName
public Abstract Page Policy get Policy return policy  AbstractPagePolicy getPolicy
Returns the number of read cache hits that have been made on the cache public int number Of Cache Hits return number Of Cache Hits  numberOfCacheHits numberOfCacheHits
Returns the number of read operations that have been done to the underlying file public int number Of File Reads return number Of File Reads  numberOfFileReads numberOfFileReads
Returns the number of write operations that have been done to the underlying file public int number Of File Writes return number Of File Writes  numberOfFileWrites numberOfFileWrites
Returns the number of pages known about in the Page File This can be greater than the number of pages actually in the underlying file in the file system if new ones have been manufactured and not yet written to the underlying file public int number Of Pages return number Of Pages  PageFile numberOfPages numberOfPages
Returns the number of read operations that have been done public int number Of Reads return number Of Reads  numberOfReads numberOfReads
Returns the number of write operations that have been done public int number Of Writes return number Of Writes  numberOfWrites numberOfWrites
Internal test for page log consistency Throws an exception if a problem is detected public void test Logging1 throws Page Store Exception Log Writer put Modified Pages this modified Pages Map test Pages Log Reader get Modified Pages this int m test Pages size int n modified Pages size if m n throw new Page Store Exception Page set sizes do not match NON NLS 1 m n NON NLS 1 Iterator test Pages Stream test Pages values iterator Iterator modified Pages Stream modified Pages values iterator while test Pages Stream has Next Page test Page Page test Pages Stream next Page modified Page Page modified Pages Stream next if test Page get Page Number modified Page get Page Number throw new Page Store Exception Page number mismatch at NON NLS 1 test Page get Page Number modified Page get Page Number NON NLS 1 if Buffer compare test Page page Buffer modified Page page Buffer 0 throw new Page Store Exception Page buffer mismatch at NON NLS 1 test Page get Page Number Log delete name  testLogging1 PageStoreException LogWriter putModifiedPages modifiedPages testPages LogReader getModifiedPages testPages modifiedPages PageStoreException testPagesStream testPages modifiedPagesStream modifiedPages testPagesStream hasNext testPage testPagesStream modifiedPage modifiedPagesStream testPage getPageNumber modifiedPage getPageNumber PageStoreException testPage getPageNumber modifiedPage getPageNumber testPage pageBuffer modifiedPage pageBuffer PageStoreException testPage getPageNumber
Internal test for applying a page log to the file Does the equivalent of a flush public void test Logging2 throws Page Store Exception Log Writer put Modified Pages this modified Pages modified Pages Log Reader get Modified Pages this flush  testLogging2 PageStoreException LogWriter putModifiedPages modifiedPages modifiedPages LogReader getModifiedPages
Internal test for simulating failure after the log is written but before the log is applied Tests the open sequence Does the equivalent of a close and open Pages must have been put to the store in order for this test to make sense This should look like it does a flush since the modified pages are written to the file public void test Logging3 throws Page Store Exception Log Writer put Modified Pages this modified Pages close false open name  testLogging3 PageStoreException LogWriter putModifiedPages modifiedPages

public int id 0 exception id public Page Store Exception int id this id null  PageStoreException
public Page Store Exception int id Throwable exception super message id exception this id id  PageStoreException
public Page Store Exception String s this s null  PageStoreException
public Page Store Exception String s Throwable exception super s exception this id Generic Failure  PageStoreException GenericFailure
Initialize the messages at class load time private static void initialize Messages message Generic Failure bind page Store generic Failure NON NLS 1 message Create Failure bind page Store create Failure NON NLS 1 message Open Failure bind page Store open Failure NON NLS 1 message Length Failure bind page Store length Failure NON NLS 1 message Write Failure bind page Store write Failure NON NLS 1 message Read Failure bind page Store read Failure NON NLS 1 message Commit Failure bind page Store commit Failure NON NLS 1 message Integrity Failure bind page Store integrity Failure NON NLS 1 message Metadata Request Failure bind page Store metadata Request Failure NON NLS 1 message Conversion Failure bind page Store conversion Failure NON NLS 1 message Log Create Failure bind page Store log Create Failure NON NLS 1 message Log Open Failure bind page Store log Open Failure NON NLS 1 message Log Read Failure bind page Store log Read Failure NON NLS 1 message Log Write Failure bind page Store log Write Failure NON NLS 1  initializeMessages GenericFailure pageStore genericFailure CreateFailure pageStore createFailure OpenFailure pageStore openFailure LengthFailure pageStore lengthFailure WriteFailure pageStore writeFailure ReadFailure pageStore readFailure CommitFailure pageStore commitFailure IntegrityFailure pageStore integrityFailure MetadataRequestFailure pageStore metadataRequestFailure ConversionFailure pageStore conversionFailure LogCreateFailure pageStore logCreateFailure LogOpenFailure pageStore logOpenFailure LogReadFailure pageStore logReadFailure LogWriteFailure pageStore logWriteFailure
private static String bind String name return Policy bind name 

Default constructor for a new Field do not use protected Pointer super 
Constructor for a new Pointer public Pointer Buffer buffer int offset this buffer buffer this offset offset 
public void clear int length buffer clear offset length 
public Pointer dec int n offset n return this 
public byte get int length return buffer get offset length 
public Field Array get Array int length int stride int count return new Field Array buffer offset length stride count  FieldArray getArray FieldArray
public Field get Field int length return new Field buffer offset length  getField
public Field get Field int offset int length return new Field buffer this offset offset length  getField
public int get Int int length return buffer get Int offset length  getInt getInt
public int getU Int int length return buffer getU Int offset length  getUInt getUInt
public Pointer inc int n offset n return this 
public int offset return offset 
public Pointer put byte bytes buffer put offset bytes return this 
public Pointer put int length int n buffer put offset length n return this 
public Pointer put int length long n buffer put offset length n return this 
public Pointer put Insertable an Object return put an Object to Byte Array  anObject anObject toByteArray

interface Referable Adds a reference for this entity to track Returns the current count int add Reference  addReference
int add Reference Tests for existing references boolean has References  addReference hasReferences
boolean has References Removes a reference Returns the current count int remove Reference  hasReferences removeReference

public Reservation int free Space int free Slots int initial Entry this free Slots free Slots this free Space free Space this initial Entry initial Entry  freeSpace freeSlots initialEntry freeSlots freeSlots freeSpace freeSpace initialEntry initialEntry
public void add int slot int bytes reserved Space bytes reserved Items put new Integer slot new Integer bytes  reservedSpace reservedItems
public void remove int slot Integer bytes Integer reserved Items remove new Integer slot if bytes null return reserved Space bytes int Value  reservedItems reservedSpace intValue
boolean contains int slot return reserved Items contains Key new Integer slot  reservedItems containsKey
int get Free Space if reserved Items size free Slots return 0 return Math max 0 free Space reserved Space  getFreeSpace reservedItems freeSlots freeSpace reservedSpace
public int get Initial Entry return initial Entry  getInitialEntry initialEntry
public void set Initial Entry int n initial Entry n  setInitialEntry initialEntry

protected Map table new Hash Map public Reservation Table super  HashMap ReservationTable
public Reservation get int page Number return Reservation table get new Integer page Number  pageNumber pageNumber
public void put int page Number Reservation r table put new Integer page Number r  pageNumber pageNumber
public boolean contains int page Number return table contains Key new Integer page Number  pageNumber containsKey pageNumber
public boolean contains Object Address address int page Number address get Page Number int object Number address get Object Number if contains page Number if get page Number contains object Number return true return false  ObjectAddress pageNumber getPageNumber objectNumber getObjectNumber pageNumber pageNumber objectNumber
public void remove Object Address address int page Number address get Page Number int object Number address get Object Number Reservation r Reservation table get new Integer page Number if r null return r remove object Number  ObjectAddress pageNumber getPageNumber objectNumber getObjectNumber pageNumber objectNumber
public void clear table clear 

Returns the guaranteed amount of free space available for a given space class public static int free Space For Class int space Class return Space Class Size space Class  freeSpaceForClass spaceClass SpaceClassSize spaceClass
Determines the initial values for the static field Space Class Size It is run at development time and the results used for the initializer It is not used at run time There are 16 space classes numbered 0 15 A space class of 0 indicates the page is empty and can hold an object of maximum size Classes 1 to 10 decrease in size in equal steps The classes 11 to 14 decrease in size in steps of decreasing size Class 15 indicates the page is full This is not run as a static initialization block because the values MUST be absolutely inviolable for a given version of an object store public static int generate Space Class Size int result new int 16 int n Object Page Object Space Size 512 10 for int i 0 i 11 i result i Object Page Object Space Size i n for int i 11 i 15 i result i result i 1 2 result 15 0 return result  SpaceClassSize generateSpaceClassSize ObjectPage ObjectSpaceSize ObjectPage ObjectSpaceSize
Creates a new page from a buffer public Space Map Page int page Number byte buffer Page Store page Store super page Number buffer page Store  SpaceMapPage pageNumber PageStore pageStore pageNumber pageStore
Writes the contents of the page to a buffer public void to Buffer byte buffer int n Math min buffer length page Buffer length System arraycopy page Buffer get Byte Array 0 buffer 0 n  toBuffer pageBuffer pageBuffer getByteArray
Returns the guaranteed amount of free space on a page If the page number is a space map page number 0 is returned public int get Free Space int page Number int slot page Number this page Number if slot 1 slot SIZE return 0 int space Class page Buffer get Byte slot int free Space free Space For Class space Class return free Space  getFreeSpace pageNumber pageNumber pageNumber spaceClass pageBuffer getByte freeSpace freeSpaceForClass spaceClass freeSpace
Sets the space Class for a given object page public void set Free Space int page Number int free Space int slot page Number this page Number if slot 1 slot SIZE return byte space Class 0 while Space Class Size space Class free Space space Class page Buffer put slot space Class set Changed notify Observers  spaceClass setFreeSpace pageNumber freeSpace pageNumber pageNumber spaceClass SpaceClassSize spaceClass freeSpace spaceClass pageBuffer spaceClass setChanged notifyObservers
public boolean is Space Map Page return true  isSpaceMapPage
protected void materialize 

Constructs a new object so that it can be stored protected Stored Object type get Required Type  StoredObject getRequiredType
Constructs a new instance from a field protected Stored Object Field f Object Store store Object Address address throws Object Store Exception if f length get Minimum Size throw new Object Store Exception Object Store Exception Object Size Failure if f length get Maximum Size throw new Object Store Exception Object Store Exception Object Size Failure extract Values f set Store store set Address address  StoredObject ObjectStore ObjectAddress ObjectStoreException getMinimumSize ObjectStoreException ObjectStoreException ObjectSizeFailure getMaximumSize ObjectStoreException ObjectStoreException ObjectSizeFailure extractValues setStore setAddress
Provides a printable representation of this object Subclasses must implement public abstract String to String  toString
Returns the required type of this class of object Subclasses must override 
Returns a byte array value of the object public final byte to Byte Array Field f new Field length insert Values f return f get  toByteArray insertValues
Adds a reference public final int add Reference reference Count return reference Count  addReference referenceCount referenceCount
Removes a reference public final int remove Reference if reference Count 0 reference Count return reference Count  removeReference referenceCount referenceCount referenceCount
Tests for existing references public final boolean has References return reference Count 0  hasReferences referenceCount
Returns the store of the object Subclasses must not override public final Object Store get Store return store  ObjectStore getStore
Returns the address of the object Subclasses must not override public final Object Address get Address return address  ObjectAddress getAddress
public final void set Store Object Store store this store store  setStore ObjectStore
public final void set Address Object Address address this address address  setAddress ObjectAddress
Places the contents of the buffer into the members Subclasses should implement and call super protected void extract Values Field f throws Object Store Exception type f subfield TYPE OFFSET TYPE LENGTH get Int if type get Required Type throw new Object Store Exception Object Store Exception Object Type Failure  extractValues ObjectStoreException TYPE_OFFSET TYPE_LENGTH getInt getRequiredType ObjectStoreException ObjectStoreException ObjectTypeFailure
Places the contents of the fields into the buffer Subclasses should implement and call super protected void insert Values Field f f subfield TYPE OFFSET TYPE LENGTH put type  insertValues TYPE_OFFSET TYPE_LENGTH
Returns the maximum size of this object s instance including its type field Subclasses can override The default is to have the this be equal to the minimum size forcing a fixed size object protected int get Maximum Size return get Minimum Size  getMaximumSize getMinimumSize
Returns the minimum size of this object s instance including its type field Subclasses should override protected int get Minimum Size return 2  getMinimumSize
Returns the actual size of this object s instance including its type field Subclasses should override protected int length return get Minimum Size  getMinimumSize

protected Throwable wrapped Exception public Store Exception String message super message  wrappedException StoreException
public Store Exception String message Throwable wrapped Exception super message this wrapped Exception wrapped Exception  StoreException wrappedException wrappedException wrappedException
Prints a stack trace out for the exception public void print Stack Trace print Stack Trace System err  printStackTrace printStackTrace
Prints a stack trace out for the exception public void print Stack Trace Print Stream output synchronized output super print Stack Trace output if wrapped Exception null wrapped Exception print Stack Trace output  printStackTrace PrintStream printStackTrace wrappedException wrappedException printStackTrace
Prints a stack trace out for the exception public void print Stack Trace Print Writer output synchronized output super print Stack Trace output if wrapped Exception null wrapped Exception print Stack Trace output  printStackTrace PrintWriter printStackTrace wrappedException wrappedException printStackTrace

public Deadlock Thread threads I Scheduling Rule locks Thread candidate this threads threads this locks locks this candidate candidate  ISchedulingRule
public I Scheduling Rule get Locks return locks  ISchedulingRule getLocks
public Thread get Candidate return candidate  getCandidate
public Thread get Threads return threads  getThreads

Recursively check if any of the threads that prevent the current thread from running are actually deadlocked with the current thread Add the threads that form deadlock to the deadlocked Threads list private boolean add Cycle Threads Array List deadlocked Threads Thread next get the thread that block the given thread from running Thread blocking blocking Threads next if the thread is not blocked by other threads then it is not part of a deadlock if blocking length 0 return false boolean in Cycle false for int i 0 i blocking length i if we have already visited the given thread then we found a cycle if deadlocked Threads contains blocking i in Cycle true else otherwise add the thread to our list and recurse deeper deadlocked Threads add blocking i if the thread is not part of a cycle remove it from the list if add Cycle Threads deadlocked Threads blocking i in Cycle true else deadlocked Threads remove blocking i return in Cycle  deadlockedThreads addCycleThreads ArrayList deadlockedThreads blockingThreads inCycle deadlockedThreads inCycle deadlockedThreads addCycleThreads deadlockedThreads inCycle deadlockedThreads inCycle
Get the thread s that own the lock this thread is waiting for private Thread blocking Threads Thread current find the lock this thread is waiting for I Scheduling Rule lock I Scheduling Rule get Waiting Lock current return get Threads Owning Lock lock  blockingThreads ISchedulingRule ISchedulingRule getWaitingLock getThreadsOwningLock
Check that the addition of a waiting thread did not produce deadlock If deadlock is detected return true else return false private boolean check Wait Cycles int waiting Threads int lock Index find the lock that this thread is waiting for recursively check if this is a cylce ie a thread waiting on itself for int i 0 i graph length i if graph i lock Index NO STATE if waiting Threads i NO STATE return true keep track that we already visited this thread waiting Threads i for int j 0 j graph i length j if graph i j WAITING FOR LOCK if check Wait Cycles waiting Threads j return true this thread is not involved in a cycle yet so remove the visited flag waiting Threads i return false  checkWaitCycles waitingThreads lockIndex lockIndex NO_STATE waitingThreads NO_STATE waitingThreads WAITING_FOR_LOCK checkWaitCycles waitingThreads waitingThreads
Returns true IFF the matrix contains a row for the given thread meaning the given thread either owns locks or is waiting for locks boolean contains Thread t return lock Threads contains t  lockThreads
A new rule was just added to the graph Find a rule it conflicts with and update the new rule with the number of times it was acquired implicitly when threads acquired conflicting rule private void fill Present Entries I Scheduling Rule new Lock int lock Index fill in the entries for the new rule from rules it conflicts with for int j 0 j locks size j if j lock Index new Lock is Conflicting I Scheduling Rule locks get j for int i 0 i graph length i if graph i j NO STATE graph i lock Index NO STATE graph i lock Index graph i j now back fill the entries for rules the current rule conflicts with for int j 0 j locks size j if j lock Index new Lock is Conflicting I Scheduling Rule locks get j for int i 0 i graph length i if graph i lock Index NO STATE graph i j NO STATE graph i j graph i lock Index  fillPresentEntries ISchedulingRule newLock lockIndex lockIndex newLock isConflicting ISchedulingRule NO_STATE lockIndex NO_STATE lockIndex lockIndex newLock isConflicting ISchedulingRule lockIndex NO_STATE NO_STATE lockIndex
Returns all the locks owned by the given thread private Object get Owned Locks Thread current Array List owned Locks new Array List 1 int index index Of current false for int j 0 j graph index length j if graph index j NO STATE owned Locks add locks get j if owned Locks size 0 Assert is Legal false A thread with no locks is part of a deadlock NON NLS 1 return owned Locks to Array  getOwnedLocks ArrayList ownedLocks ArrayList indexOf NO_STATE ownedLocks ownedLocks isLegal ownedLocks toArray
Returns an array of threads that form the deadlock usually 2 private Thread get Threads In Deadlock Thread cause Array List deadlocked Threads new Array List 2 if the thread that caused deadlock doesn t own any locks then it is not part of the deadlock it just caused it because of a rule it tried to acquire if owns Locks cause deadlocked Threads add cause add Cycle Threads deadlocked Threads cause return Thread deadlocked Threads to Array new Thread deadlocked Threads size  getThreadsInDeadlock ArrayList deadlockedThreads ArrayList ownsLocks deadlockedThreads addCycleThreads deadlockedThreads deadlockedThreads toArray deadlockedThreads
Returns the thread s that own the given lock private Thread get Threads Owning Lock I Scheduling Rule rule if rule null return new Thread 0 int lock Index index Of rule false Array List blocking new Array List 1 for int i 0 i graph length i if graph i lock Index NO STATE blocking add lock Threads get i if blocking size 0 Job Manager DEBUG LOCKS System out println Lock rule is involved in deadlock but is not owned by any thread NON NLS 1 NON NLS 2 if blocking size 1 rule instanceof I Lock Job Manager DEBUG LOCKS System out println Lock rule is owned by more than 1 thread but it is not a rule NON NLS 1 NON NLS 2 return Thread blocking to Array new Thread blocking size  getThreadsOwningLock ISchedulingRule lockIndex indexOf ArrayList ArrayList lockIndex NO_STATE lockThreads JobManager DEBUG_LOCKS ILock JobManager DEBUG_LOCKS toArray
Returns the lock the given thread is waiting for private Object get Waiting Lock Thread current int index index Of current false find the lock that this thread is waiting for for int j 0 j graph index length j if graph index j WAITING FOR LOCK return locks get j it can happen that a thread is not waiting for any lock it is not really part of the deadlock return null  getWaitingLock indexOf WAITING_FOR_LOCK
Returns the index of the given lock in the lock array If the lock is not present in the array it is added to the end private int index Of I Scheduling Rule lock boolean add int index locks index Of lock if index 0 add locks add lock resize true index locks size 1 return index  indexOf ISchedulingRule indexOf
Returns the index of the given thread in the thread array If the thread is not present in the array it is added to the end private int index Of Thread owner boolean add int index lock Threads index Of owner if index 0 add lock Threads add owner resize true index lock Threads size 1 return index  indexOf lockThreads indexOf lockThreads lockThreads
Returns true IFF the adjacency matrix is empty boolean is Empty return locks size 0 lock Threads size 0 graph length 0  isEmpty lockThreads
The given lock was aquired by the given thread void lock Acquired Thread owner I Scheduling Rule lock int lock Index index Of lock true int thread Index index Of owner true if resize resize Graph if graph thread Index lock Index WAITING FOR LOCK graph thread Index lock Index NO STATE acquire all locks that conflict with the given lock or conflict with a lock the given lock will acquire implicitly locks are acquired implicitly when a conflicting lock is acquired Array List conflicting new Array List 1 only need two passes through all the locks to pick up all conflicting rules int NUM PASSES 2 conflicting add lock graph thread Index lock Index for int i 0 i NUM PASSES i for int k 0 k conflicting size k I Scheduling Rule current I Scheduling Rule conflicting get k for int j 0 j locks size j I Scheduling Rule possible I Scheduling Rule locks get j if current is Conflicting possible conflicting contains possible conflicting add possible graph thread Index j  lockAcquired ISchedulingRule lockIndex indexOf threadIndex indexOf resizeGraph threadIndex lockIndex WAITING_FOR_LOCK threadIndex lockIndex NO_STATE ArrayList ArrayList NUM_PASSES threadIndex lockIndex NUM_PASSES ISchedulingRule ISchedulingRule ISchedulingRule ISchedulingRule isConflicting threadIndex
The given lock was released by the given thread Update the graph void lock Released Thread owner I Scheduling Rule lock int lock Index index Of lock false int thread Index index Of owner false make sure the lock and thread exist in the graph if thread Index 0 if Job Manager DEBUG LOCKS System out println lock Released Lock lock was already released by thread owner get Name NON NLS 1 NON NLS 2 return if lock Index 0 if Job Manager DEBUG LOCKS System out println lock Released Thread owner get Name already released lock lock NON NLS 1 NON NLS 2 return if this lock was suspended set it to NO STATE if lock instanceof I Lock graph thread Index lock Index WAITING FOR LOCK graph thread Index lock Index NO STATE return release all locks that conflict with the given lock or release all rules that are owned by the given thread if we are releasing a rule for int j 0 j graph thread Index length j if lock is Conflicting I Scheduling Rule locks get j lock instanceof I Lock locks get j instanceof I Lock graph thread Index j NO STATE if graph thread Index j NO STATE if Job Manager DEBUG LOCKS System out println lock Released More releases than acquires for thread owner get Name and lock lock NON NLS 1 NON NLS 2 else graph thread Index j if this thread just released the given lock try to simplify the graph if graph thread Index lock Index NO STATE reduce Graph thread Index lock  lockReleased ISchedulingRule lockIndex indexOf threadIndex indexOf threadIndex JobManager DEBUG_LOCKS lockReleased getName lockIndex JobManager DEBUG_LOCKS lockReleased getName NO_STATE ILock threadIndex lockIndex WAITING_FOR_LOCK threadIndex lockIndex NO_STATE threadIndex isConflicting ISchedulingRule ILock ILock threadIndex NO_STATE threadIndex NO_STATE JobManager DEBUG_LOCKS lockReleased getName threadIndex threadIndex lockIndex NO_STATE reduceGraph threadIndex
The given scheduling rule is no longer used because the job that invoked it is done Release this rule regardless of how many times it was acquired void lock Released Completely Thread owner I Scheduling Rule rule int rule Index index Of rule false int thread Index index Of owner false need to make sure that the given thread and rule were not already removed from the graph if thread Index 0 if Job Manager DEBUG LOCKS System out println lock Released Completely Lock rule was already released by thread owner get Name NON NLS 1 NON NLS 2 return if rule Index 0 if Job Manager DEBUG LOCKS System out println lock Released Completely Thread owner get Name already released lock rule NON NLS 1 NON NLS 2 return set all rules that are owned by the given thread to NO STATE not just rules that conflict with the rule we are releasing if we are releasing a lock then only update the one entry for the lock for int j 0 j graph thread Index length j if locks get j instanceof I Lock graph thread Index j NO STATE graph thread Index j NO STATE reduce Graph thread Index rule  lockReleasedCompletely ISchedulingRule ruleIndex indexOf threadIndex indexOf threadIndex JobManager DEBUG_LOCKS lockReleasedCompletely getName ruleIndex JobManager DEBUG_LOCKS lockReleasedCompletely getName NO_STATE threadIndex ILock threadIndex NO_STATE threadIndex NO_STATE reduceGraph threadIndex
The given thread could not get the given lock and is waiting for it Update the graph Deadlock lock Wait Start Thread client I Scheduling Rule lock set To Wait client lock false int lock Index index Of lock false int temp new int lock Threads size check if the addition of the waiting thread caused deadlock if check Wait Cycles temp lock Index return null there is a deadlock in the graph Thread threads get Threads In Deadlock client Thread candidate resolution Candidate threads I Scheduling Rule locks real Locks For Thread candidate Deadlock deadlock new Deadlock threads locks candidate find a thread whose locks can be suspended to resolve the deadlock if Job Manager DEBUG LOCKS report Deadlock deadlock if Job Manager DEBUG DEADLOCK throw new Illegal State Exception Deadlock detected Caused by thread client get Name NON NLS 1 update the graph to indicate that the locks will now be suspended to indicate that the lock will be suspended we set the thread to wait for the lock when the lock is forced to be released the entry will be cleared for int i 0 i locks length i set To Wait deadlock get Candidate locks i true return deadlock  lockWaitStart ISchedulingRule setToWait lockIndex indexOf lockThreads checkWaitCycles lockIndex getThreadsInDeadlock resolutionCandidate ISchedulingRule realLocksForThread JobManager DEBUG_LOCKS reportDeadlock JobManager DEBUG_DEADLOCK IllegalStateException getName setToWait getCandidate
The given thread has stopped waiting for the given lock Update the graph void lock Wait Stop Thread owner I Scheduling Rule lock int lock Index index Of lock false int thread Index index Of owner false make sure the thread and lock exist in the graph if thread Index 0 if Job Manager DEBUG LOCKS System out println Thread owner get Name was already removed NON NLS 1 NON NLS 2 return if lock Index 0 if Job Manager DEBUG LOCKS System out println Lock lock was already removed NON NLS 1 NON NLS 2 return if graph thread Index lock Index WAITING FOR LOCK Assert is True false Thread owner get Name was not waiting for lock lock to String so it could not time out NON NLS 1 NON NLS 2 NON NLS 3 graph thread Index lock Index NO STATE reduce Graph thread Index lock  lockWaitStop ISchedulingRule lockIndex indexOf threadIndex indexOf threadIndex JobManager DEBUG_LOCKS getName lockIndex JobManager DEBUG_LOCKS threadIndex lockIndex WAITING_FOR_LOCK isTrue getName toString threadIndex lockIndex NO_STATE reduceGraph threadIndex
Returns true IFF the given thread owns a single lock private boolean owns Locks Thread cause int thread Index index Of cause false for int j 0 j graph thread Index length j if graph thread Index j NO STATE return true return false  ownsLocks threadIndex indexOf threadIndex threadIndex NO_STATE
Returns true IFF the given thread owns a single real lock A real lock is a lock that can be suspended private boolean owns Real Locks Thread owner int thread Index index Of owner false for int j 0 j graph thread Index length j if graph thread Index j NO STATE Object lock locks get j if lock instanceof I Lock return true return false  ownsRealLocks threadIndex indexOf threadIndex threadIndex NO_STATE ILock
Return true IFF this thread owns rule locks ie implicit locks which cannot be suspended private boolean owns Rule Locks Thread owner int thread Index index Of owner false for int j 0 j graph thread Index length j if graph thread Index j NO STATE Object lock locks get j if lock instanceof I Lock return true return false  ownsRuleLocks threadIndex indexOf threadIndex threadIndex NO_STATE ILock
Returns an array of real locks that are owned by the given thread Real locks are locks that implement the I Lock interface and can be suspended private I Scheduling Rule real Locks For Thread Thread owner int thread Index index Of owner false Array List owned Locks new Array List 1 for int j 0 j graph thread Index length j if graph thread Index j NO STATE locks get j instanceof I Lock owned Locks add locks get j if owned Locks size 0 Assert is Legal false A thread with no real locks was chosen to resolve deadlock NON NLS 1 return I Scheduling Rule owned Locks to Array new I Scheduling Rule owned Locks size  ILock ISchedulingRule realLocksForThread threadIndex indexOf ArrayList ownedLocks ArrayList threadIndex threadIndex NO_STATE ILock ownedLocks ownedLocks isLegal ISchedulingRule ownedLocks toArray ISchedulingRule ownedLocks
The matrix has been simplified Check if any unnecessary rows or columns can be removed private void reduce Graph int row I Scheduling Rule lock int num Locks locks size boolean empty Columns new boolean num Locks find all columns that could possibly be empty consist of locks which conflict with the given lock or of locks which are rules for int j 0 j num Locks j if lock is Conflicting I Scheduling Rule locks get j locks get j instanceof I Lock empty Columns j true boolean row Empty true int num Empty 0 check if the given row is empty for int j 0 j graph row length j if graph row j NO STATE row Empty false break Check if the possibly empty columns are actually empty If a column is actually empty remove the corresponding lock from the list of locks Start at the last column so that when locks are removed from the list the index of the remaining locks is unchanged Store the number of empty columns for int j empty Columns length 1 j 0 j for int i 0 i graph length i if empty Columns j graph i j NO STATE empty Columns j false break if empty Columns j locks remove j num Empty if no columns or rows are empty return right away if num Empty 0 row Empty return if row Empty lock Threads remove row new graph the list of locks and the list of threads are already updated final int num Threads lock Threads size num Locks locks size optimize empty graph case if num Threads 0 num Locks 0 graph EMPTY MATRIX return int temp Graph new int num Threads num Locks the number of rows we need to skip to get the correct entry from the old graph int num Rows Skipped 0 for int i 0 i graph length num Rows Skipped i if i row row Empty num Rows Skipped check if we need to skip the last row if i graph length num Rows Skipped break the nuber of columns we need to skip to get the correct entry from the old graph needs to be reset for every new row int num Cols Skipped 0 for int j 0 j graph i length num Cols Skipped j while empty Columns j num Cols Skipped num Cols Skipped check if we need to skip the last column if j graph i length num Cols Skipped break need to break out of the outer loop if j graph i length num Cols Skipped break temp Graph i j graph i num Rows Skipped j num Cols Skipped graph temp Graph Assert is True num Threads graph length Rows and threads don t match NON NLS 1 Assert is True num Locks graph length 0 graph 0 length 0 Columns and locks don t match NON NLS 1  reduceGraph ISchedulingRule numLocks emptyColumns numLocks numLocks isConflicting ISchedulingRule ILock emptyColumns rowEmpty numEmpty NO_STATE rowEmpty emptyColumns emptyColumns NO_STATE emptyColumns emptyColumns numEmpty numEmpty rowEmpty rowEmpty lockThreads numThreads lockThreads numLocks numThreads numLocks EMPTY_MATRIX tempGraph numThreads numLocks numRowsSkipped numRowsSkipped rowEmpty numRowsSkipped numRowsSkipped numColsSkipped numColsSkipped emptyColumns numColsSkipped numColsSkipped numColsSkipped numColsSkipped tempGraph numRowsSkipped numColsSkipped tempGraph isTrue numThreads isTrue numLocks
Adds a deadlock detected message to the log with a stack trace private void report Deadlock Deadlock deadlock String msg Deadlock detected All locks owned by thread deadlock get Candidate get Name will be suspended NON NLS 1 NON NLS 2 Multi Status main new Multi Status Platform PI RUNTIME Platform PLUGIN ERROR msg new Illegal State Exception Thread threads deadlock get Threads for int i 0 i threads length i Object owned Locks get Owned Locks threads i Object wait Lock get Waiting Lock threads i String Buffer buf new String Buffer Thread NON NLS 1 buf append threads i get Name buf append has locks NON NLS 1 for int j 0 j owned Locks length j buf append owned Locks j buf append j owned Locks length 1 NON NLS 1 NON NLS 2 buf append and is waiting for lock NON NLS 1 buf append wait Lock Status child new Status I Status ERROR Platform PI RUNTIME Platform PLUGIN ERROR buf to String null main add child Internal Platform get Default log main  reportDeadlock getCandidate getName MultiStatus MultiStatus PI_RUNTIME PLUGIN_ERROR IllegalStateException getThreads ownedLocks getOwnedLocks waitLock getWaitingLock StringBuffer StringBuffer getName ownedLocks ownedLocks ownedLocks waitLock IStatus PI_RUNTIME PLUGIN_ERROR toString InternalPlatform getDefault
The number of threads locks in the graph has changed Update the underlying matrix private void resize Graph a new row and or a new column was added to the graph since new rows columns are always added to the end just transfer old entries to the new graph with the same indices final int new Rows lock Threads size final int new Cols locks size optimize 0x0 and 1x1 matrices if new Rows 0 new Cols 0 graph EMPTY MATRIX return int temp Graph new int new Rows new Cols for int i 0 i graph length i System arraycopy graph i 0 temp Graph i 0 graph i length graph temp Graph resize false  resizeGraph newRows lockThreads newCols newRows newCols EMPTY_MATRIX tempGraph newRows newCols tempGraph tempGraph
Get the thread whose locks can be suspended ie all locks it owns are actual locks and not rules Return the first thread in the array by default private Thread resolution Candidate Thread candidates first look for a candidate that has no scheduling rules for int i 0 i candidates length i if owns Rule Locks candidates i return candidates i next look for any candidate with a real lock a lock that can be suspended for int i 0 i candidates length i if owns Real Locks candidates i return candidates i unnecessary return the first entry in the array by default return candidates 0  resolutionCandidate ownsRuleLocks ownsRealLocks
The given thread is waiting for the given lock Update the graph private void set To Wait Thread owner I Scheduling Rule lock boolean suspend boolean need Transfer false if we are adding an entry where a thread is waiting on a scheduling rule then we need to transfer all positive entries for a conflicting rule to the newly added rule in order to synchronize the graph if suspend lock instanceof I Lock need Transfer true int lock Index index Of lock suspend int thread Index index Of owner suspend if resize resize Graph graph thread Index lock Index WAITING FOR LOCK if need Transfer fill Present Entries lock lock Index  setToWait ISchedulingRule needTransfer ILock needTransfer lockIndex indexOf threadIndex indexOf resizeGraph threadIndex lockIndex WAITING_FOR_LOCK needTransfer fillPresentEntries lockIndex
Prints out the current matrix to standard output Only used for debugging public void to Debug String System out println NON NLS 1 for int j 0 j locks size j System out print locks get j NON NLS 1 System out println for int i 0 i graph length i System out print Thread lock Threads get i get Name NON NLS 1 NON NLS 2 for int j 0 j graph i length j System out print graph i j NON NLS 1 System out println System out println NON NLS 1  toDebugString lockThreads getName

private final Map thread Jobs new Hash Map 20 Implicit Jobs Job Manager manager this manager manager  threadJobs HashMap ImplicitJobs JobManager
void begin I Scheduling Rule rule I Progress Monitor monitor boolean suspend if Job Manager DEBUG BEGIN END Job Manager debug Begin rule rule NON NLS 1 final Thread current Thread Thread current Thread Thread Job thread Job synchronized this thread Job Thread Job thread Jobs get current Thread if thread Job null nested rule just push on stack and return thread Job push rule return no need to schedule a thread job for a null rule if rule null return create a thread job for this thread use the rule from the real job if it has one Job real Job manager current Job if real Job null real Job get Rule null thread Job new Thread Job real Job get Rule else thread Job new Thread Job rule thread Job acquire Rule true don t acquire rule if it is a suspended rule if rule null is Suspended rule thread Job acquire Rule false indicate if it is a system job to ensure is Blocking works correctly thread Job set Real Job real Job thread Job set Thread current Thread try thread Job push rule join the thread job outside sync block if thread Job acquire Rule no need to reaquire any locks because the thread did not wait to get this lock if manager run Now thread Job manager get Lock Manager add Lock Thread Thread current Thread rule else thread Job join Run monitor finally remember this thread job only do this after the rule is acquired because it is ok for this thread to acquire and release other rules while waiting synchronized this thread Jobs put current Thread thread Job if suspend rule null suspended Rules add rule  ISchedulingRule IProgressMonitor JobManager DEBUG_BEGIN_END JobManager currentThread currentThread ThreadJob threadJob threadJob ThreadJob threadJobs currentThread threadJob threadJob realJob currentJob realJob realJob getRule threadJob newThreadJob realJob getRule threadJob newThreadJob threadJob acquireRule isSuspended threadJob acquireRule isBlocking threadJob setRealJob realJob threadJob setThread currentThread threadJob threadJob acquireRule runNow threadJob getLockManager addLockThread currentThread threadJob joinRun threadJobs currentThread threadJob suspendedRules
Returns true if this rule has been suspended and false otherwise private boolean is Suspended I Scheduling Rule rule if suspended Rules size 0 return false for Iterator it suspended Rules iterator it has Next if I Scheduling Rule it next contains rule return true return false  isSuspended ISchedulingRule suspendedRules suspendedRules hasNext ISchedulingRule
synchronized void end I Scheduling Rule rule boolean resume if Job Manager DEBUG BEGIN END Job Manager debug End rule rule NON NLS 1 final Thread current Thread Thread current Thread Thread Job thread Job Thread Job thread Jobs get current Thread if thread Job null Assert is Legal rule null end Rule without matching begin Rule rule NON NLS 1 else if thread Job pop rule clean up when last rule scope exits thread Jobs remove current Thread if resume rule null suspended Rules remove rule if this job had a rule then we are essentially releasing a lock note it is safe to do this even if the acquire was aborted if thread Job acquire Rule manager get Lock Manager remove Lock Thread Thread current Thread thread Job get Rule if the job was started we need to notify job manager to end it if thread Job is Running manager end Job thread Job Status OK STATUS false recycle thread Job  ISchedulingRule JobManager DEBUG_BEGIN_END JobManager currentThread currentThread ThreadJob threadJob ThreadJob threadJobs currentThread threadJob isLegal endRule beginRule threadJob threadJobs currentThread suspendedRules threadJob acquireRule getLockManager removeLockThread currentThread threadJob getRule threadJob isRunning endJob threadJob OK_STATUS threadJob
Returns the currently running implicit job for the given thread or null if there currently isn t one Job job For Thread Thread thread return Job thread Jobs get thread  jobForThread threadJobs
Returns a new or reused Thread Job instance private Thread Job new Thread Job I Scheduling Rule rule if job Cache null Thread Job job job Cache job set Rule rule job acquire Rule job running false job real Job null job Cache null return job return new Thread Job manager rule  ThreadJob ThreadJob newThreadJob ISchedulingRule jobCache ThreadJob jobCache setRule acquireRule realJob jobCache ThreadJob
Indicates that a thread job is no longer in use and can be reused private void recycle Thread Job job if job Cache null job recycle job Cache job  ThreadJob jobCache jobCache
Implements I Job Manager resume I Scheduling Rule param rule void resume I Scheduling Rule rule resume happens as a consequence of freeing the last rule in the stack end rule true if Job Manager DEBUG BEGIN END Job Manager debug Resume rule rule NON NLS 1  IJobManager ISchedulingRule ISchedulingRule JobManager DEBUG_BEGIN_END JobManager
Implements I Job Manager suspend I Scheduling Rule I Progress Monitor param rule param monitor void suspend I Scheduling Rule rule I Progress Monitor monitor if Job Manager DEBUG BEGIN END Job Manager debug Suspend rule rule NON NLS 1 the suspend job will be remembered once the rule is acquired begin rule monitor true  IJobManager ISchedulingRule IProgressMonitor ISchedulingRule IProgressMonitor JobManager DEBUG_BEGIN_END JobManager

private volatile Thread thread null protected Internal Job String name Assert is Not Null name this name name  InternalJob isNotNull
protected void add Job Change Listener I Job Change Listener listener check for duplicate I Job Change Listener temp Listeners listeners int old Count temp Listeners length for int i 0 i old Count i if temp Listeners i listener return create a new array I Job Change Listener new Listeners new I Job Change Listener temp Listeners length 1 System arraycopy temp Listeners 0 new Listeners 0 old Count new Listeners old Count listener atomic assignment listeners new Listeners  addJobChangeListener IJobChangeListener IJobChangeListener tempListeners oldCount tempListeners oldCount tempListeners IJobChangeListener newListeners IJobChangeListener tempListeners tempListeners newListeners oldCount newListeners oldCount newListeners
Adds an entry at the end of the list of which this item is the head final void add Last Internal Job entry if previous null previous entry entry next this entry previous null else Assert is True previous next this previous add Last entry  addLast InternalJob isTrue addLast
see Job belongs To Object protected boolean belongs To Object family return false  belongsTo belongsTo
see Job cancel protected boolean cancel return manager cancel this 
see java lang Comparable compare To java lang Object public final int compare To Object other Job return Internal Job other Job start Time start Time 1 1  compareTo compareTo otherJob InternalJob otherJob startTime startTime
see Job done I Status protected void done I Status result manager end Job this result true  IStatus IStatus endJob
Returns the job listeners that are only listening to this job Returns null if this job has no listeners final I Job Change Listener get Listeners return listeners  IJobChangeListener getListeners
see Job get Name protected String get Name return name  getName getName
see Job get Priority protected int get Priority return priority  getPriority getPriority
Returns the job s progress monitor or null if it is not running final I Progress Monitor get Progress Monitor return monitor  IProgressMonitor getProgressMonitor
protected Object get Property Qualified Name key thread safety Concurrency001 copy on write Map temp properties if temp null return null return temp get key  getProperty QualifiedName
see Job get Result protected I Status get Result return result  getResult IStatus getResult
see Job get Rule protected I Scheduling Rule get Rule return scheduling Rule  getRule ISchedulingRule getRule schedulingRule
Returns the time that this job should be started awakened or rescheduled depending on the current state return time in milliseconds final long get Start Time return start Time  getStartTime startTime
protected int get State int state flags M STATE switch state blocked state is equivalent to waiting state for clients case BLOCKED return Job WAITING case ABOUT TO RUN return Job RUNNING case ABOUT TO SCHEDULE return Job NONE default return state  getState M_STATE ABOUT_TO_RUN ABOUT_TO_SCHEDULE
see Job get Thread protected Thread get Thread return thread  getThread getThread
Returns the raw job state including internal states no exposed as API final int internal Get State return flags M STATE  internalGetState M_STATE
Must be called from Job Manager set Priority final void internal Set Priority int new Priority this priority new Priority  JobManager setPriority internalSetPriority newPriority newPriority
Must be called from Job Manager set Rule final void internal Set Rule I Scheduling Rule rule this scheduling Rule rule  JobManager setRule internalSetRule ISchedulingRule schedulingRule
Must be called from Job Manager change State final void internal Set State int i flags flags M STATE i  JobManager changeState internalSetState M_STATE
see Job is Blocking protected boolean is Blocking return manager is Blocking this  isBlocking isBlocking isBlocking
Returns true if this job conflicts with the given job and false otherwise final boolean is Conflicting Internal Job other Job I Scheduling Rule other Rule other Job get Rule if scheduling Rule null other Rule null return false if one of the rules is a compound rule it must be asked the question if scheduling Rule get Class Multi Rule class return scheduling Rule is Conflicting other Rule return other Rule is Conflicting scheduling Rule  isConflicting InternalJob otherJob ISchedulingRule otherRule otherJob getRule schedulingRule otherRule schedulingRule getClass MultiRule schedulingRule isConflicting otherRule otherRule isConflicting schedulingRule
see Job is System protected boolean is System return flags M SYSTEM 0  isSystem isSystem M_SYSTEM
see Job is User protected boolean is User return flags M USER 0  isUser isUser M_USER
see Job join protected void join throws Interrupted Exception manager join this  InterruptedException
Returns the next entry ahead of this one in the list or null if there is no next entry final Internal Job next return next  InternalJob
Returns the previous entry behind this one in the list or null if there is no previous entry final Internal Job previous return previous  InternalJob
Removes this entry from any list it belongs to Returns the receivelar final Internal Job remove if next null next set Previous previous if previous null previous set Next next next previous null return this  InternalJob setPrevious setNext
protected void remove Job Change Listener I Job Change Listener listener I Job Change Listener temp Listeners listeners int old Count temp Listeners length if old Count 0 old Count 1 temp Listeners 0 listener listeners Job Listeners EMPTY LISTENERS return find listener to remove for int i 0 i old Count i if temp Listeners i listener I Job Change Listener new Listeners new I Job Change Listener old Count 1 System arraycopy temp Listeners 0 new Listeners 0 i System arraycopy temp Listeners i 1 new Listeners i old Count i 1 listeners new Listeners return  removeJobChangeListener IJobChangeListener IJobChangeListener tempListeners oldCount tempListeners oldCount oldCount tempListeners JobListeners EMPTY_LISTENERS oldCount tempListeners IJobChangeListener newListeners IJobChangeListener oldCount tempListeners newListeners tempListeners newListeners oldCount newListeners
see Job run I Progress Monitor protected abstract I Status run I Progress Monitor monitor  IProgressMonitor IStatus IProgressMonitor
see Job schedule long protected void schedule long delay manager schedule this delay false 
see Job set Name String protected void set Name String name Assert is Not Null name this name name  setName setName isNotNull
Sets the next entry in this linked list of jobs param entry final void set Next Internal Job entry this next entry  setNext InternalJob
Sets the previous entry in this linked list of jobs param entry final void set Previous Internal Job entry this previous entry  setPrevious InternalJob
protected void set Priority int new Priority switch new Priority case Job INTERACTIVE case Job SHORT case Job LONG case Job BUILD case Job DECORATE manager set Priority this new Priority break default throw new Illegal Argument Exception String value Of new Priority  setPriority newPriority newPriority setPriority newPriority IllegalArgumentException valueOf newPriority
protected void set Progress Group I Progress Monitor group int ticks Assert is Not Null group I Progress Monitor result manager create Monitor this group ticks if result null set Progress Monitor result  setProgressGroup IProgressMonitor isNotNull IProgressMonitor createMonitor setProgressMonitor
Sets the progress monitor to use for the next execution of this job or for clearing the monitor when a job completes param monitor a progress monitor final void set Progress Monitor I Progress Monitor monitor this monitor monitor  setProgressMonitor IProgressMonitor
protected void set Property Qualified Name key Object value thread safety Concurrency001 copy on write if value null if properties null return Object Map temp Object Map properties clone temp remove key if temp is Empty properties null else properties temp else Object Map temp properties if temp null temp new Object Map 5 else temp Object Map properties clone temp put key value properties temp  setProperty QualifiedName ObjectMap ObjectMap isEmpty ObjectMap ObjectMap ObjectMap
Sets or clears the result of an execution of this job param result a result status or code null code final void set Result I Status result this result result  setResult IStatus
see Job set Rule I Scheduling Rule protected void set Rule I Scheduling Rule rule manager set Rule this rule  setRule ISchedulingRule setRule ISchedulingRule setRule
Sets a time to start wake up or schedule this job depending on the current state param time a time in milliseconds final void set Start Time long time start Time time  setStartTime startTime
protected void set System boolean value if get State Job NONE throw new Illegal State Exception flags value flags M SYSTEM flags M SYSTEM  setSystem getState IllegalStateException M_SYSTEM M_SYSTEM
see Job set Thread protected void set Thread Thread thread this thread thread  setThread setThread
protected void set User boolean value if get State Job NONE throw new Illegal State Exception flags value flags M USER flags M USER  setUser getState IllegalStateException M_USER M_USER
see Job should Schedule protected boolean should Schedule return true  shouldSchedule shouldSchedule
see Job sleep protected boolean sleep return manager sleep this 
For debugging purposes only public String to String return get Name job Number NON NLS 1 NON NLS 2  toString getName jobNumber
see Job wake Up long protected void wake Up long delay manager wake Up this delay  wakeUp wakeUp wakeUp

return public long get Delay return delay  getDelay
return the job for this event public Job get Job return job  getJob
return public I Status get Result return result  IStatus getResult

interface I Listener Doit public void notify I Job Change Listener listener I Job Change Event event  IListenerDoit IJobChangeListener IJobChangeEvent
private final I Listener Doit about To Run new I Listener Doit public void notify I Job Change Listener listener I Job Change Event event listener about To Run event  IListenerDoit aboutToRun IListenerDoit IJobChangeListener IJobChangeEvent aboutToRun
private final I Listener Doit awake new I Listener Doit public void notify I Job Change Listener listener I Job Change Event event listener awake event  IListenerDoit IListenerDoit IJobChangeListener IJobChangeEvent
private final I Listener Doit done new I Listener Doit public void notify I Job Change Listener listener I Job Change Event event listener done event  IListenerDoit IListenerDoit IJobChangeListener IJobChangeEvent
private final I Listener Doit running new I Listener Doit public void notify I Job Change Listener listener I Job Change Event event listener running event  IListenerDoit IListenerDoit IJobChangeListener IJobChangeEvent
private final I Listener Doit scheduled new I Listener Doit public void notify I Job Change Listener listener I Job Change Event event listener scheduled event  IListenerDoit IListenerDoit IJobChangeListener IJobChangeEvent
private final I Listener Doit sleeping new I Listener Doit public void notify I Job Change Listener listener I Job Change Event event listener sleeping event  IListenerDoit IListenerDoit IJobChangeListener IJobChangeEvent
TODO Could use an instance pool to re use old event objects static Job Change Event new Event Job job Job Change Event instance new Job Change Event instance job job return instance  JobChangeEvent newEvent JobChangeEvent JobChangeEvent
static Job Change Event new Event Job job I Status result Job Change Event instance new Job Change Event instance job job instance result result return instance  JobChangeEvent newEvent IStatus JobChangeEvent JobChangeEvent
static Job Change Event new Event Job job long delay Job Change Event instance new Job Change Event instance job job instance delay delay return instance  JobChangeEvent newEvent JobChangeEvent JobChangeEvent
Process the given doit for all global listeners and all local listeners on the given job private void do Notify final I Listener Doit doit final I Job Change Event event notify all global listeners I Job Change Listener listeners global int size listeners length for int i 0 i size i try if listeners i null doit notify listeners i event catch Exception e handle Exception e catch Linkage Error e handle Exception e notify all local listeners listeners Internal Job event get Job get Listeners if listeners null return size listeners length for int i 0 i size i try if listeners i null doit notify listeners i event catch Exception e handle Exception e catch Linkage Error e handle Exception e  doNotify IListenerDoit IJobChangeEvent IJobChangeListener handleException LinkageError handleException InternalJob getJob getListeners handleException LinkageError handleException
private void handle Exception Throwable e this code is roughly copied from Internal Platform run I Safe Runnable but inlined here for performance reasons if e instanceof Operation Canceled Exception return String plugin Id Platform PI RUNTIME String message Policy bind meta plugin Problems plugin Id NON NLS 1 I Status status new Status I Status ERROR plugin Id Platform PLUGIN ERROR message e we have to be safe so don t try to log if the platform is not running since it will fail last resort is to print the stack trace on stderr if Internal Platform get Default is Running Internal Platform get Default log status else e print Stack Trace  handleException InternalPlatform ISafeRunnable OperationCanceledException pluginId PI_RUNTIME pluginProblems pluginId IStatus IStatus pluginId PLUGIN_ERROR InternalPlatform getDefault isRunning InternalPlatform getDefault printStackTrace
public synchronized void add I Job Change Listener listener check for duplicate I Job Change Listener temp Listeners global int old Count temp Listeners length for int i 0 i old Count i if temp Listeners i listener return create a new array I Job Change Listener new Listeners new I Job Change Listener temp Listeners length 1 System arraycopy temp Listeners 0 new Listeners 0 old Count new Listeners old Count listener atomic assignment global new Listeners  IJobChangeListener IJobChangeListener tempListeners oldCount tempListeners oldCount tempListeners IJobChangeListener newListeners IJobChangeListener tempListeners tempListeners newListeners oldCount newListeners oldCount newListeners
public synchronized void remove I Job Change Listener listener I Job Change Listener temp Listeners global int old Count temp Listeners length if old Count 0 old Count 1 temp Listeners 0 listener global EMPTY LISTENERS return find listener to remove for int i 0 i old Count i if temp Listeners i listener I Job Change Listener new Listeners new I Job Change Listener old Count 1 System arraycopy temp Listeners 0 new Listeners 0 i System arraycopy temp Listeners i 1 new Listeners i old Count i 1 global new Listeners return  IJobChangeListener IJobChangeListener tempListeners oldCount tempListeners oldCount oldCount tempListeners EMPTY_LISTENERS oldCount tempListeners IJobChangeListener newListeners IJobChangeListener oldCount tempListeners newListeners tempListeners newListeners oldCount newListeners
public void about To Run Job job do Notify about To Run new Event job  aboutToRun doNotify aboutToRun newEvent
public void awake Job job do Notify awake new Event job  doNotify newEvent
public void done Job job I Status result boolean reschedule Job Change Event event new Event job result event reschedule reschedule do Notify done event  IStatus JobChangeEvent newEvent doNotify
public void running Job job do Notify running new Event job  doNotify newEvent
public void scheduled Job job long delay boolean reschedule Job Change Event event new Event job delay event reschedule reschedule do Notify scheduled event  JobChangeEvent newEvent doNotify
public void sleeping Job job do Notify sleeping new Event job  doNotify newEvent

public static void debug String msg String Buffer msg Buf new String Buffer msg length 40 if DEBUG TIMING lazy init to avoid overhead when not debugging if DEBUG FORMAT null DEBUG FORMAT new Simple Date Format HH mm ss SSS NON NLS 1 DEBUG FORMAT format new Date msg Buf new Field Position 0 msg Buf append msg Buf append append Thread current Thread append append msg System out println msg Buf to String  StringBuffer msgBuf StringBuffer DEBUG_TIMING DEBUG_FORMAT DEBUG_FORMAT SimpleDateFormat DEBUG_FORMAT msgBuf FieldPosition msgBuf msgBuf currentThread msgBuf toString
Returns the job manager singleton For internal use only public static synchronized Job Manager get Instance if instance null new Job Manager return instance  JobManager getInstance JobManager
public static void shutdown if instance null instance do Shutdown instance null  doShutdown
For debugging purposes only public static String print State int state switch state case Job NONE return NONE NON NLS 1 case Job WAITING return WAITING NON NLS 1 case Job SLEEPING return SLEEPING NON NLS 1 case Job RUNNING return RUNNING NON NLS 1 case Internal Job BLOCKED return BLOCKED NON NLS 1 case Internal Job ABOUT TO RUN return ABOUT TO RUN NON NLS 1 return UNKNOWN NON NLS 1  printState InternalJob InternalJob ABOUT_TO_RUN ABOUT_TO_RUN
private Job Manager instance this synchronized lock waiting new Job Queue false sleeping new Job Queue true running new Hash Set 10 pool new Worker Pool this  JobManager JobQueue JobQueue HashSet WorkerPool
see org eclipse core runtime jobs I Job Manager add Job Listener org eclipse core runtime jobs I Job Change Listener public void add Job Change Listener I Job Change Listener listener job Listeners add listener  IJobManager addJobListener IJobChangeListener addJobChangeListener IJobChangeListener jobListeners
see org eclipse core runtime jobs I Job Manager begin Rule org eclipse core runtime jobs I Scheduling Rule org eclipse core runtime I Progress Monitor public void begin Rule I Scheduling Rule rule I Progress Monitor monitor implicit Jobs begin rule monitor For monitor false  IJobManager beginRule ISchedulingRule IProgressMonitor beginRule ISchedulingRule IProgressMonitor implicitJobs monitorFor
Cancels a job protected boolean cancel Internal Job job I Progress Monitor monitor null synchronized lock switch job get State case Job NONE return true case Job RUNNING cannot cancel a job that has already started as opposed to ABOUT TO RUN if job internal Get State Job RUNNING monitor job get Progress Monitor break default change State job Job NONE call monitor outside sync block if monitor null monitor set Canceled true return false only notify listeners if the job was waiting or sleeping job Listeners done Job job Status CANCEL STATUS false return true  InternalJob IProgressMonitor getState ABOUT_TO_RUN internalGetState getProgressMonitor changeState setCanceled jobListeners CANCEL_STATUS
public void cancel Object family don t synchronize because cancel calls listeners for Iterator it select family iterator it has Next cancel Job it next  hasNext
Atomically updates the state of a job adding or removing from the necessary queues or sets private void change State Internal Job job int new State synchronized lock int old State job internal Get State System out println change State job print State old State print State new State switch old State case Job NONE case Internal Job ABOUT TO SCHEDULE break case Internal Job BLOCKED remove this job from the linked list of blocked jobs job remove break case Job WAITING try waiting remove job catch Runtime Exception e Assert is Legal false Tried to remove a job that wasn t in the queue NON NLS 1 break case Job SLEEPING try sleeping remove job catch Runtime Exception e Assert is Legal false Tried to remove a job that wasn t in the queue NON NLS 1 break case Job RUNNING case Internal Job ABOUT TO RUN running remove job break default Assert is Legal false Invalid job state job state old State NON NLS 1 NON NLS 2 job internal Set State new State switch new State case Job NONE job set Start Time Internal Job T NONE case Internal Job BLOCKED break case Job WAITING waiting enqueue job break case Job SLEEPING sleeping enqueue job break case Job RUNNING case Internal Job ABOUT TO RUN job set Start Time Internal Job T NONE running add job break case Internal Job ABOUT TO SCHEDULE break default Assert is Legal false Invalid job state job state new State NON NLS 1 NON NLS 2  changeState InternalJob newState oldState internalGetState changeState printState oldState printState newState oldState InternalJob ABOUT_TO_SCHEDULE InternalJob RuntimeException isLegal RuntimeException isLegal InternalJob ABOUT_TO_RUN isLegal oldState internalSetState newState newState setStartTime InternalJob T_NONE InternalJob InternalJob ABOUT_TO_RUN setStartTime InternalJob T_NONE InternalJob ABOUT_TO_SCHEDULE isLegal newState
Returns a new progress monitor for this job Never returns null private I Progress Monitor create Monitor Job job I Progress Monitor monitor null if progress Provider null monitor progress Provider create Monitor job if monitor null monitor new Null Progress Monitor return monitor  IProgressMonitor createMonitor IProgressMonitor progressProvider progressProvider createMonitor NullProgressMonitor
Returns a new progress monitor for this job belonging to the given progress group Returns null if it is not a valid time to set the job s group protected I Progress Monitor create Monitor Internal Job job I Progress Monitor group int ticks synchronized lock group must be set before the job is scheduled this includes the ABOUT TO SCHEDULE state during which it is still valid to set the progress monitor if job get State Job NONE return null I Progress Monitor monitor null if progress Provider null monitor progress Provider create Monitor Job job group ticks if monitor null monitor new Null Progress Monitor return monitor  IProgressMonitor createMonitor InternalJob IProgressMonitor ABOUT_TO_SCHEDULE getState IProgressMonitor progressProvider progressProvider createMonitor NullProgressMonitor
public I Progress Monitor create Progress Group if progress Provider null return progress Provider create Progress Group return new Null Progress Monitor  IProgressMonitor createProgressGroup progressProvider progressProvider createProgressGroup NullProgressMonitor
public Job current Job Thread current Thread current Thread if current instanceof Worker return Worker current current Job return implicit Jobs job For Thread current  currentJob currentThread currentJob implicitJobs jobForThread
Returns the delay in milliseconds that a job with a given priority can tolerate waiting private long delay For int priority these values may need to be tweaked based on machine speed switch priority case Job INTERACTIVE return 0L case Job SHORT return 50L case Job LONG return 100L case Job BUILD return 500L case Job DECORATE return 1000L default Assert is True false Job has invalid priority priority NON NLS 1 return 0  delayFor isTrue
Performs the scheduling of a job Does not perform any notifications private void do Schedule Internal Job job long delay synchronized lock if it s a decoration job don t run it right now if the system is busy if job get Priority Job DECORATE long min Delay running size 100 delay Math max delay min Delay if delay 0 job set Start Time System current Time Millis delay change State job Job SLEEPING else job set Start Time System current Time Millis delay For job get Priority change State job Job WAITING  doSchedule InternalJob getPriority minDelay minDelay setStartTime currentTimeMillis changeState setStartTime currentTimeMillis delayFor getPriority changeState
Shuts down the job manager Currently running jobs will be told to stop but worker threads may still continue processing note This implemented I Job Manager shutdown which was removed due to problems caused by premature shutdown private void do Shutdown Job to Cancel null synchronized lock if active active false cancel all running jobs to Cancel Job running to Array new Job running size clean up sleeping clear waiting clear running clear if to Cancel null cancel jobs outside sync block to avoid deadlock for int i 0 i to Cancel length i cancel to Cancel i pool shutdown  IJobManager doShutdown toCancel toCancel toArray toCancel toCancel toCancel
Indicates that a job was running and has now finished Note that this method can be called under Out Of Memory Error conditions and thus must be paranoid about allocating objects protected void end Job Internal Job job I Status result boolean notify Internal Job blocked null int blocked Job Count 0 long reschedule Delay Internal Job T NONE synchronized lock if the job is finishing asynchronously there is nothing more to do for now if result Job ASYNC FINISH return if job is not known then it cannot be done if job get State Job NONE return if Job Manager DEBUG notify Job Manager debug Ending job job NON NLS 1 job set Result result job set Progress Monitor null job set Thread null reschedule Delay job get Start Time change State job Job NONE blocked job previous job set Previous null add any blocked jobs back to the wait queue while blocked null Internal Job previous blocked previous change State blocked Job WAITING blocked Job Count blocked previous notify queue outside sync block for int i 0 i blocked Job Count i pool job Queued blocked notify listeners outside sync block final boolean reschedule active reschedule Delay Internal Job T NONE if notify job Listeners done Job job result reschedule finally reschedule the job if requested and we are still active if reschedule schedule job reschedule Delay reschedule  OutOfMemoryError endJob InternalJob IStatus InternalJob blockedJobCount rescheduleDelay InternalJob T_NONE ASYNC_FINISH getState JobManager JobManager setResult setProgressMonitor setThread rescheduleDelay getStartTime changeState setPrevious InternalJob changeState blockedJobCount blockedJobCount jobQueued rescheduleDelay InternalJob T_NONE jobListeners rescheduleDelay
see org eclipse core runtime jobs I Job Manager end Rule org eclipse core runtime jobs I Scheduling Rule public void end Rule I Scheduling Rule rule implicit Jobs end rule false  IJobManager endRule ISchedulingRule endRule ISchedulingRule implicitJobs
see org eclipse core runtime jobs I Job Manager find java lang String public Job find Object family List members select family return Job members to Array new Job members size  IJobManager toArray
Returns a running or blocked job whose scheduling rule conflicts with the scheduling rule of the given waiting job Returns null if there are no conflicting jobs A job can only run if there are no running jobs and no blocked jobs whose scheduling rule conflicts with its rule protected Internal Job find Blocking Job Internal Job waiting Job if waiting Job get Rule null return null synchronized lock if running is Empty return null check the running jobs boolean has Blocked Jobs false for Iterator it running iterator it has Next Internal Job job Internal Job it next if waiting Job is Conflicting job return job if has Blocked Jobs has Blocked Jobs job previous null there are no blocked jobs so we are done if has Blocked Jobs return null check all jobs blocked by running jobs for Iterator it running iterator it has Next Internal Job job Internal Job it next while true job job previous if job null break if waiting Job is Conflicting job return job return null  InternalJob findBlockingJob InternalJob waitingJob waitingJob getRule isEmpty hasBlockedJobs hasNext InternalJob InternalJob waitingJob isConflicting hasBlockedJobs hasBlockedJobs hasBlockedJobs hasNext InternalJob InternalJob waitingJob isConflicting
public Lock Manager get Lock Manager return lock Manager  LockManager getLockManager lockManager
Returns whether the job manager is active has been started more recently than it has not been shutdown protected boolean is Active return active  isActive
barrier new Semaphore null listener new Job Change Adapter public void done I Job Change Event event barrier release  JobChangeAdapter IJobChangeEvent
protected void join Internal Job job final I Job Change Listener listener final Semaphore barrier synchronized lock int state job get State if state Job NONE return don t join a waiting or sleeping job when suspended deadlock risk if suspended state Job RUNNING return the semaphore will be released when the job is done barrier new Semaphore null listener new Job Change Adapter public void done I Job Change Event event barrier release job add Job Change Listener listener compute set of all jobs that must run before this one add a listener that removes jobs from the blocking set when they finish wait until listener notifies this thread try while true notify hook to service pending sync Execs before falling asleep lock Manager about To Wait job get Thread try if barrier acquire Long MAX VALUE break catch Interrupted Exception e loop and keep trying finally lock Manager about To Release job remove Job Change Listener listener  InternalJob IJobChangeListener getState JobChangeAdapter IJobChangeEvent addJobChangeListener syncExecs lockManager aboutToWait getThread MAX_VALUE InterruptedException lockManager aboutToRelease removeJobChangeListener
Returns true if the given job is blocking the execution of a non system job protected boolean is Blocking Internal Job running Job synchronized lock if this job isn t running it can t be blocking anyone if running Job get State Job RUNNING return false if any job is queued behind this one it is blocked by it Internal Job previous running Job previous while previous null if previous is System return true implicit jobs should interrupt unless they act on behalf of system jobs if previous instanceof Thread Job Thread Job previous should Interrupt return true previous previous previous none found return false  isBlocking InternalJob runningJob runningJob getState InternalJob runningJob isSystem ThreadJob ThreadJob shouldInterrupt
update the list of jobs if new ones are added during the join public void scheduled I Job Change Event event don t add to list if job is being rescheduled if Job Change Event event reschedule return Job job event get Job if job belongs To family jobs add job  IJobChangeEvent JobChangeEvent getJob belongsTo
public void done I Job Change Event event don t remove from list if job is being rescheduled if Job Change Event event reschedule jobs remove event get Job  IJobChangeEvent JobChangeEvent getJob
public void join final Object family I Progress Monitor monitor throws Interrupted Exception Operation Canceled Exception monitor monitor For monitor I Job Change Listener listener null final List jobs int job Count Job blocking null synchronized lock don t join a waiting or sleeping job when suspended deadlock risk int states suspended Job RUNNING Job RUNNING Job WAITING Job SLEEPING jobs Collections synchronized List select family states job Count jobs size if job Count 0 return if there is only one blocking job use it in the blockage callback below if job Count 1 blocking Job jobs get 0 listener new Job Change Adapter update the list of jobs if new ones are added during the join public void scheduled I Job Change Event event don t add to list if job is being rescheduled if Job Change Event event reschedule return Job job event get Job if job belongs To family jobs add job public void done I Job Change Event event don t remove from list if job is being rescheduled if Job Change Event event reschedule jobs remove event get Job add Job Change Listener listener spin until all jobs are completed try monitor begin Task Policy bind jobs blocked0 job Count NON NLS 1 monitor sub Task Policy bind jobs wait Fam Sub Integer to String job Count NON NLS 1 report Blocked monitor blocking int jobs Left int reported Work Done 0 while jobs Left jobs size 0 don t let there be negative work done if new jobs have been added since the join began int actual Work Done Math max 0 job Count jobs Left if reported Work Done actual Work Done monitor worked actual Work Done reported Work Done reported Work Done actual Work Done monitor sub Task Policy bind jobs wait Fam Sub Integer to String jobs Left NON NLS 1 if Thread interrupted throw new Interrupted Exception if monitor is Canceled throw new Operation Canceled Exception notify hook to service pending sync Execs before falling asleep lock Manager about To Wait null Thread sleep 100 finally report Unblocked monitor monitor done remove Job Change Listener listener  IProgressMonitor InterruptedException OperationCanceledException monitorFor IJobChangeListener jobCount synchronizedList jobCount jobCount jobCount JobChangeAdapter IJobChangeEvent JobChangeEvent getJob belongsTo IJobChangeEvent JobChangeEvent getJob addJobChangeListener beginTask jobCount subTask waitFamSub toString jobCount reportBlocked jobsLeft reportedWorkDone jobsLeft actualWorkDone jobCount jobsLeft reportedWorkDone actualWorkDone actualWorkDone reportedWorkDone reportedWorkDone actualWorkDone subTask waitFamSub toString jobsLeft InterruptedException isCanceled OperationCanceledException syncExecs lockManager aboutToWait reportUnblocked removeJobChangeListener
Returns a non null progress monitor instance If the monitor is null returns the default monitor supplied by the progress provider or a Null Progress Monitor if no default monitor is available private I Progress Monitor monitor For I Progress Monitor monitor if monitor null monitor instanceof Null Progress Monitor if progress Provider null try monitor progress Provider get Default Monitor catch Exception e String msg Policy bind meta plugin Problems Platform PI RUNTIME NON NLS 1 Internal Platform get Default log new Status I Status ERROR Platform PI RUNTIME Platform PLUGIN ERROR msg e return Policy monitor For monitor  NullProgressMonitor IProgressMonitor monitorFor IProgressMonitor NullProgressMonitor progressProvider progressProvider getDefaultMonitor pluginProblems PI_RUNTIME InternalPlatform getDefault IStatus PI_RUNTIME PLUGIN_ERROR monitorFor
see I Job Manager new Lock java lang String public I Lock new Lock return lock Manager new Lock  IJobManager newLock ILock newLock lockManager newLock
Removes and returns the first waiting job in the queue Returns null if there are no items waiting in the queue If an item is removed from the queue it is moved to the running jobs list private Job next Job synchronized lock do nothing if the job manager is suspended if suspended return null tickle the sleep queue to see if anyone wakes up long now System current Time Millis Internal Job job sleeping peek while job null job get Start Time now job set Start Time now delay For job get Priority change State job Job WAITING job sleeping peek process the wait queue until we find a job whose rules are satisfied while job waiting peek null Internal Job blocker find Blocking Job job if blocker null break queue this job after the job that s blocking it change State job Internal Job BLOCKED assert job does not already belong to some other data structure Assert is True job next null Assert is True job previous null blocker add Last job the job to run must be in the running list before we exit the sync block otherwise two jobs with conflicting rules could start at once if job null change State job Internal Job ABOUT TO RUN if Job Manager DEBUG Job Manager debug Starting job job NON NLS 1 return Job job  nextJob currentTimeMillis InternalJob getStartTime setStartTime delayFor getPriority changeState InternalJob findBlockingJob changeState InternalJob isTrue isTrue addLast changeState InternalJob ABOUT_TO_RUN JobManager JobManager
see org eclipse core runtime jobs I Job Manager remove Job Listener org eclipse core runtime jobs I Job Change Listener public void remove Job Change Listener I Job Change Listener listener job Listeners remove listener  IJobManager removeJobListener IJobChangeListener removeJobChangeListener IJobChangeListener jobListeners
Report to the progress monitor that this thread is blocked supplying an information message and if possible the job that is causing the blockage Important An invocation of this method MUST be followed eventually be an invocation of report Unblocked param monitor The monitor to report blocking to param blocking Job The job that is blocking this thread or code null code see report Unblocked final void report Blocked I Progress Monitor monitor Internal Job blocking Job if monitor instanceof I Progress Monitor With Blocking return I Status reason if blocking Job null blocking Job instanceof Thread Job blocking Job is System reason new Status I Status INFO Platform PI RUNTIME 1 Policy bind jobs blocked0 null NON NLS 1 else String msg Policy bind jobs blocked1 blocking Job get Name NON NLS 1 reason new Job Status I Status INFO Job blocking Job msg I Progress Monitor With Blocking monitor set Blocked reason  reportUnblocked blockingJob reportUnblocked reportBlocked IProgressMonitor InternalJob blockingJob IProgressMonitorWithBlocking IStatus blockingJob blockingJob ThreadJob blockingJob isSystem IStatus PI_RUNTIME blockingJob getName JobStatus IStatus blockingJob IProgressMonitorWithBlocking setBlocked
Reports that this thread was blocked but is no longer blocked and is able to proceed param monitor The monitor to report unblocking to see report Blocked final void report Unblocked I Progress Monitor monitor if monitor instanceof I Progress Monitor With Blocking I Progress Monitor With Blocking monitor clear Blocked  reportBlocked reportUnblocked IProgressMonitor IProgressMonitorWithBlocking IProgressMonitorWithBlocking clearBlocked
public final void resume synchronized lock suspended false poke the job pool pool job Queued null  jobQueued
see org eclipse core runtime jobs I Job Manager resume org eclipse core runtime jobs I Scheduling Rule public final void resume I Scheduling Rule rule implicit Jobs resume rule  IJobManager ISchedulingRule ISchedulingRule implicitJobs
Attempts to immediately start a given job Returns true if the job was successfully started and false if it could not be started immediately due to a currently running job with a conflicting rule Listeners will never be notified of jobs that are run in this way protected boolean run Now Internal Job job synchronized lock cannot start if there is a conflicting job if find Blocking Job job null return false change State job Job RUNNING job set Progress Monitor new Null Progress Monitor job run null return true  runNow InternalJob findBlockingJob changeState setProgressMonitor NullProgressMonitor
protected void schedule Internal Job job long delay boolean reschedule if active throw new Illegal State Exception Job manager has been shut down NON NLS 1 Assert is Not Null job Job is null NON NLS 1 Assert is Legal delay 0 Scheduling delay is negative NON NLS 1 call hook method outside sync block to avoid deadlock if job should Schedule return synchronized lock if the job is already running set it to be rescheduled when done if job get State Job RUNNING job set Start Time delay return can t schedule a job that is waiting or sleeping if job internal Get State Job NONE return remember that we are about to schedule the job to prevent multiple schedule attempts from succeeding bug 68452 change State job Internal Job ABOUT TO SCHEDULE notify listeners outside sync block job Listeners scheduled Job job delay reschedule schedule the job do Schedule job delay call the pool outside sync block to avoid deadlock pool job Queued job  InternalJob IllegalStateException isNotNull isLegal shouldSchedule getState setStartTime internalGetState changeState InternalJob ABOUT_TO_SCHEDULE jobListeners doSchedule jobQueued
Adds all family members in the list of jobs to the collection private void select List members Object family Internal Job first Job int state Mask if first Job null return Internal Job job first Job do note that job state cannot be NONE at this point if family null job belongs To family job get State state Mask 0 members add job job job previous while job null job first Job  InternalJob firstJob stateMask firstJob InternalJob firstJob belongsTo getState stateMask firstJob
Returns a list of all jobs known to the job manager that belong to the given family private List select Object family return select family Job WAITING Job SLEEPING Job RUNNING 
Returns a list of all jobs known to the job manager that belong to the given family and are in one of the provided states private List select Object family int state Mask List members new Array List synchronized lock if state Mask Job RUNNING 0 for Iterator it running iterator it has Next select members family Internal Job it next state Mask if state Mask Job WAITING 0 select members family waiting peek state Mask if state Mask Job SLEEPING 0 select members family sleeping peek state Mask return members  stateMask ArrayList stateMask hasNext InternalJob stateMask stateMask stateMask stateMask stateMask
see I Job Manager set Lock Listener Lock Listener public void set Lock Listener Lock Listener listener lock Manager set Lock Listener listener  IJobManager setLockListener LockListener setLockListener LockListener lockManager setLockListener
Changes a job priority protected void set Priority Internal Job job int new Priority synchronized lock int old Priority job get Priority if old Priority new Priority return job internal Set Priority new Priority if the job is waiting to run reshuffle the queue if job get State Job WAITING long old Start job get Start Time job set Start Time old Start delay For new Priority delay For old Priority waiting resort job  setPriority InternalJob newPriority oldPriority getPriority oldPriority newPriority internalSetPriority newPriority getState oldStart getStartTime setStartTime oldStart delayFor newPriority delayFor oldPriority
see I Job Manager set Progress Provider I Progress Provider public void set Progress Provider Progress Provider provider progress Provider provider  IJobManager setProgressProvider IProgressProvider setProgressProvider ProgressProvider progressProvider
public void set Rule Internal Job job I Scheduling Rule rule synchronized lock cannot change the rule of a job that is already running Assert is Legal job get State Job NONE job internal Set Rule rule  setRule InternalJob ISchedulingRule isLegal getState internalSetRule
Puts a job to sleep Returns true if the job was successfully put to sleep protected boolean sleep Internal Job job synchronized lock switch job get State case Job RUNNING cannot be paused if it is already running as opposed to ABOUT TO RUN if job internal Get State Job RUNNING return false job hasn t started running yet about To Run listener break case Job SLEEPING update the job wake time job set Start Time Internal Job T INFINITE change state again to reshuffle the sleep queue change State job Job SLEEPING return true case Job NONE return true case Job WAITING put the job to sleep break job set Start Time Internal Job T INFINITE change State job Job SLEEPING job Listeners sleeping Job job return true  InternalJob getState ABOUT_TO_RUN internalGetState aboutToRun setStartTime InternalJob T_INFINITE changeState setStartTime InternalJob T_INFINITE changeState jobListeners
public void sleep Object family don t synchronize because sleep calls listeners for Iterator it select family iterator it has Next sleep Internal Job it next  hasNext InternalJob
Returns the estimated time in milliseconds before the next job is scheduled to wake up The result may be negative Returns Job Manager NEVER if there are no sleeping or waiting jobs protected long sleep Hint synchronized lock wait forever if job manager is suspended if suspended return Internal Job T INFINITE if waiting is Empty return 0L return the anticipated time that the next sleeping job will wake Internal Job next sleeping peek if next null return Internal Job T INFINITE return next get Start Time System current Time Millis  JobManager sleepHint InternalJob T_INFINITE isEmpty InternalJob InternalJob T_INFINITE getStartTime currentTimeMillis
Returns the next job to be run or null if no jobs are waiting to run The worker must call end Job when the job is finished running protected Job start Job Job job null while true job next Job if job null return null must perform this outside sync block because it is third party code if job should Run check for listener veto job Listeners about To Run job listeners may have canceled or put the job to sleep synchronized lock if job get State Job RUNNING Internal Job internal job if internal get Progress Monitor null internal set Progress Monitor create Monitor job change from ABOUT TO RUN to RUNNING internal internal Set State Job RUNNING break if job get State Job SLEEPING job has been vetoed or canceled so mark it as done end Job job Status CANCEL STATUS true continue job Listeners running job return job  endJob startJob nextJob shouldRun jobListeners aboutToRun getState InternalJob getProgressMonitor setProgressMonitor createMonitor ABOUT_TO_RUN internalSetState getState endJob CANCEL_STATUS jobListeners
public final void suspend synchronized lock suspended true 
see org eclipse core runtime jobs I Job Manager suspend org eclipse core runtime jobs I Scheduling Rule org eclipse core runtime I Progress Monitor public final void suspend I Scheduling Rule rule I Progress Monitor monitor Assert is Not Null rule implicit Jobs suspend rule monitor For monitor  IJobManager ISchedulingRule IProgressMonitor ISchedulingRule IProgressMonitor isNotNull implicitJobs monitorFor
protected void wake Up Internal Job job long delay Assert is Legal delay 0 Scheduling delay is negative NON NLS 1 synchronized lock cannot wake up if it is not sleeping if job get State Job SLEEPING return do Schedule job delay call the pool outside sync block to avoid deadlock pool job Queued job job Listeners awake Job job  wakeUp InternalJob isLegal getState doSchedule jobQueued jobListeners
public void wake Up Object family don t synchronize because wake Up calls listeners for Iterator it select family iterator it has Next wake Up Internal Job it next 0L  wakeUp wakeUp hasNext wakeUp InternalJob

compare To on dummy is never called dummy new Internal Job Queue Head NON NLS 1 public I Status run I Progress Monitor m return Status OK STATUS  compareTo InternalJob IStatus IProgressMonitor OK_STATUS
Create a new job queue public Job Queue boolean allow Conflict Overtaking compare To on dummy is never called dummy new Internal Job Queue Head NON NLS 1 public I Status run I Progress Monitor m return Status OK STATUS dummy set Next dummy dummy set Previous dummy this allow Conflict Overtaking allow Conflict Overtaking  JobQueue allowConflictOvertaking compareTo InternalJob IStatus IProgressMonitor OK_STATUS setNext setPrevious allowConflictOvertaking allowConflictOvertaking
remove all elements public void clear dummy set Next dummy dummy set Previous dummy  setNext setPrevious
Returns true if the given element is in the queue and false otherwise NOTE Containment is based on identity not equality public boolean contains Object object Internal Job entry dummy next while entry dummy entry object entry entry next return entry object  InternalJob
Return and remove the element with highest priority or null if empty public Internal Job dequeue Internal Job to Remove dummy previous if to Remove dummy return null return to Remove remove  InternalJob InternalJob toRemove toRemove toRemove
Adds an item to the queue public void enqueue Internal Job new Entry assert new entry is does not already belong to some other data structure Assert is True new Entry next null Assert is True new Entry previous null Internal Job tail dummy next overtake lower priority jobs Only overtake conflicting jobs if allowed to while tail dummy tail compare To new Entry 0 allow Conflict Overtaking new Entry is Conflicting tail tail tail next new entry is smaller than tail new Entry set Next tail new Entry set Previous tail previous tail previous set Next new Entry tail set Previous new Entry  InternalJob newEntry isTrue newEntry isTrue newEntry InternalJob compareTo newEntry allowConflictOvertaking newEntry isConflicting newEntry setNext newEntry setPrevious setNext newEntry setPrevious newEntry
Removes the given element from the queue public void remove Internal Job to Remove to Remove remove previous of to Remove might now bubble up  InternalJob toRemove toRemove toRemove
The given object has changed priority Reshuffle the heap until it is valid public void resort Internal Job entry remove entry enqueue entry  InternalJob
Returns true if the queue is empty and false otherwise public boolean is Empty return dummy next dummy  isEmpty
Return greatest element without removing it or null if empty public Internal Job peek return dummy previous dummy null dummy previous  InternalJob

private Job job Creates a new job status param severity param code param job param message param exception public Job Status int severity int code Job job String message Throwable exception super severity Platform PI RUNTIME code message exception this job job  JobStatus PI_RUNTIME
Creates a new job status with no interesting error code or exception param severity param job param message public Job Status int severity Job job String message super severity Platform PI RUNTIME 1 message null this job job  JobStatus PI_RUNTIME
see org eclipse core runtime jobs I Job Status get Job public Job get Job return job  IJobStatus getJob getJob

Suspends ownership of the given lock and returns the saved state protected static Lock State suspend Ordered Lock lock Lock State state new Lock State state lock lock state depth lock force Release return state  LockState OrderedLock LockState LockState forceRelease
Re acquires a suspended lock and reverts to the correct lock depth public void resume spin until the lock is successfully acquired NOTE spinning here allows the UI thread to service pending sync Execs if the UI thread is waiting to acquire a lock while true try if lock acquire Long MAX VALUE break catch Interrupted Exception e ignore and loop lock set Depth depth  syncExecs MAX_VALUE InterruptedException setDepth
private Hash Map suspended Locks new Hash Map public Lock Manager super  HashMap suspendedLocks HashMap LockManager
public void about To Release if lock Listener null return try lock Listener about To Release catch Exception e handle Exception e catch Linkage Error e handle Exception e  aboutToRelease lockListener lockListener aboutToRelease handleException LinkageError handleException
public boolean about To Wait Thread lock Owner if lock Listener null return false try return lock Listener about To Wait lock Owner catch Exception e handle Exception e catch Linkage Error e handle Exception e return false  aboutToWait lockOwner lockListener lockListener aboutToWait lockOwner handleException LinkageError handleException
This thread has just acquired a lock Update graph void add Lock Thread Thread thread I Scheduling Rule lock if locks null return try synchronized locks locks lock Acquired thread lock catch Exception e handle Internal Error e  addLockThread ISchedulingRule lockAcquired handleInternalError
This thread has just been refused a lock Update graph and check for deadlock void add Lock Wait Thread Thread thread I Scheduling Rule lock if locks null return try Deadlock found null synchronized locks found locks lock Wait Start thread lock if found null return if deadlock was detected the found variable will contain all the information about it including which locks to suspend for which thread to resolve the deadlock I Scheduling Rule to Suspend found get Locks Lock State suspended new Lock State to Suspend length for int i 0 i to Suspend length i suspended i Lock State suspend Ordered Lock to Suspend i synchronized suspended Locks Stack prev Locks Stack suspended Locks get found get Candidate if prev Locks null prev Locks new Stack prev Locks push suspended suspended Locks put found get Candidate prev Locks catch Exception e handle Internal Error e  addLockWaitThread ISchedulingRule lockWaitStart ISchedulingRule toSuspend getLocks LockState LockState toSuspend toSuspend LockState OrderedLock toSuspend suspendedLocks prevLocks suspendedLocks getCandidate prevLocks prevLocks prevLocks suspendedLocks getCandidate prevLocks handleInternalError
Handles exceptions that occur while calling third party code from within the Lock Manager This is essentially an inlined version of Platform run I Safe Runnable private static void handle Exception Throwable e String message Policy bind jobs internal Error NON NLS 1 I Status status if e instanceof Core Exception status new Multi Status Platform PI RUNTIME Platform PLUGIN ERROR message e Multi Status status merge Core Exception e get Status else status new Status I Status ERROR Platform PI RUNTIME Platform PLUGIN ERROR message e Internal Platform get Default log status  LockManager ISafeRunnable handleException internalError IStatus CoreException MultiStatus PI_RUNTIME PLUGIN_ERROR MultiStatus CoreException getStatus IStatus PI_RUNTIME PLUGIN_ERROR InternalPlatform getDefault
There was an internal error in the deadlock detection code Shut the entire thing down to prevent further errors Recovery is too complex as it requires freezing all threads and inferring the present lock state private void handle Internal Error Throwable t try handle Exception t locks to Debug String catch Exception e2 ignore failure to log or to create the debug string discard the deadlock detector for good locks null  handleInternalError handleException toDebugString
Returns true IFF the underlying graph is empty For debugging purposes only public boolean is Empty return locks is Empty  isEmpty isEmpty
Returns true IFF this thread either owns or is waiting for any locks or rules public boolean is Lock Owner all job threads have to be treated as lock owners because UI thread may try to join a job Thread current Thread current Thread if current instanceof Worker return true if locks null return false synchronized locks return locks contains Thread current Thread  isLockOwner currentThread currentThread
Creates and returns a new lock public synchronized Ordered Lock new Lock return new Ordered Lock this  OrderedLock newLock OrderedLock
Releases all the acquires that were called on the given rule Needs to be called only once void remove Lock Completely Thread thread I Scheduling Rule rule if locks null return try synchronized locks locks lock Released Completely thread rule catch Exception e handle Internal Error e  removeLockCompletely ISchedulingRule lockReleasedCompletely handleInternalError
This thread has just released a lock Update graph void remove Lock Thread Thread thread I Scheduling Rule lock try synchronized locks locks lock Released thread lock catch Exception e handle Internal Error e  removeLockThread ISchedulingRule lockReleased handleInternalError
This thread has just stopped waiting for a lock Update graph void remove Lock Wait Thread Thread thread I Scheduling Rule lock try synchronized locks locks lock Wait Stop thread lock catch Exception e handle Internal Error e  removeLockWaitThread ISchedulingRule lockWaitStop handleInternalError
Resumes all the locks that were suspended while this thread was waiting to acquire another lock void resume Suspended Locks Thread owner Lock State to Resume synchronized suspended Locks Stack prev Locks Stack suspended Locks get owner if prev Locks null return to Resume Lock State prev Locks pop if prev Locks empty suspended Locks remove owner for int i 0 i to Resume length i to Resume i resume  resumeSuspendedLocks LockState toResume suspendedLocks prevLocks suspendedLocks prevLocks toResume LockState prevLocks prevLocks suspendedLocks toResume toResume
public void set Lock Listener Lock Listener listener this lock Listener listener  setLockListener LockListener lockListener

Creates a new object map of default size public Object Map this DEFAULT SIZE  ObjectMap DEFAULT_SIZE
Creates a new object map param initial Capacity The initial number of elements that will fit in the map public Object Map int initial Capacity elements new Object Math max initial Capacity 2 0  initialCapacity ObjectMap initialCapacity initialCapacity
Creates a new object map of the same size as the given map and populate it with the key attribute pairs found in the map param map The entries in the given map will be added to the new map public Object Map Map map this map size put All map  ObjectMap putAll
see Map clear public void clear elements null count 0 
see java lang Object clone public Object clone return new Object Map this  ObjectMap
see Map contains Key java lang Object public boolean contains Key Object key if elements null count 0 return false for int i 0 i elements length i i 2 if elements i null elements i equals key return true return false  containsKey containsKey
see Map contains Value java lang Object public boolean contains Value Object value if elements null count 0 return false for int i 1 i elements length i i 2 if elements i null elements i equals value return true return false  containsValue containsValue
see Map entry Set Note This implementation does not conform properly to the specification in the Map interface The returned collection will not be bound to this map and will not remain in sync with this map public Set entry Set return to Hash Map entry Set  entrySet entrySet toHashMap entrySet
see Object equals java lang Object public boolean equals Object o if o instanceof Map return false Map other Map o must be same size if count other size return false keysets must be equal if key Set equals other key Set return false values for each key must be equal for int i 0 i elements length i i 2 if elements i null elements i 1 equals other get elements i return false return true  keySet keySet
see Map get java lang Object public Object get Object key if elements null count 0 return null for int i 0 i elements length i i 2 if elements i null elements i equals key return elements i 1 return null 
The capacity of the map has been exceeded grow the array by GROW SIZE to accomodate more entries protected void grow Object expanded new Object elements length GROW SIZE System arraycopy elements 0 expanded 0 elements length elements expanded  GROW_SIZE GROW_SIZE
see Object hash Code public int hash Code int hash 0 for int i 0 i elements length i i 2 if elements i null hash elements i hash Code return hash  hashCode hashCode hashCode
see Map is Empty public boolean is Empty return count 0  isEmpty isEmpty
see Map key Set Note This implementation does not conform properly to the specification in the Map interface The returned collection will not be bound to this map and will not remain in sync with this map public Set key Set Set result new Hash Set size for int i 0 i elements length i i 2 if elements i null result add elements i return result  keySet keySet HashSet
see Map put java lang Object java lang Object public Object put Object key Object value if key null throw new Null Pointer Exception if value null return remove key handle the case where we don t have any attributes yet if elements null elements new Object DEFAULT SIZE if count 0 elements 0 key elements 1 value count return null replace existing value if it exists for int i 0 i elements length i i 2 if elements i null elements i equals key Object old Value elements i 1 elements i 1 value return old Value otherwise add it to the list of elements grow if necessary if elements length count 2 grow for int i 0 i elements length i i 2 if elements i null elements i key elements i 1 value count return null return null  NullPointerException DEFAULT_SIZE oldValue oldValue
see Map put All java util Map public void put All Map map for Iterator i map key Set iterator i has Next Object key i next Object value map get key put key value  putAll putAll keySet hasNext
see Map remove java lang Object public Object remove Object key if elements null count 0 return null for int i 0 i elements length i i 2 if elements i null elements i equals key elements i null Object result elements i 1 elements i 1 null count return result return null 
see Map size public int size return count 
Creates a new hash map with the same contents as this map private Hash Map to Hash Map Hash Map result new Hash Map size for int i 0 i elements length i i 2 if elements i null result put elements i elements i 1 return result  HashMap toHashMap HashMap HashMap
see Map values Note This implementation does not conform properly to the specification in the Map interface The returned collection will not be bound to this map and will not remain in sync with this map public Collection values Set result new Hash Set size for int i 1 i elements length i i 2 if elements i null result add elements i return result  HashSet

Creates a new workspace lock Ordered Lock Lock Manager manager this manager manager this number next Lock Number  OrderedLock LockManager nextLockNumber
public void acquire spin until the lock is successfully acquired NOTE spinning here allows the UI thread to service pending sync Execs if the UI thread is waiting to acquire a lock while true try if acquire Long MAX VALUE return catch Interrupted Exception e ignore and loop  syncExecs MAX_VALUE InterruptedException
public boolean acquire long delay throws Interrupted Exception if Thread interrupted throw new Interrupted Exception boolean success false if delay 0 return attempt Semaphore semaphore create Semaphore if semaphore null return true if DEBUG System out println Thread current Thread Operation waiting to be executed this NON NLS 1 NON NLS 2 success do Acquire semaphore delay manager resume Suspended Locks Thread current Thread if DEBUG success System out println Thread current Thread Operation started this NON NLS 1 NON NLS 2 else if DEBUG System out println Thread current Thread Operation timed out this NON NLS 1 NON NLS 2 return success  InterruptedException InterruptedException createSemaphore currentThread doAcquire resumeSuspendedLocks currentThread currentThread currentThread
Attempts to acquire the lock Returns false if the lock is not available and true if the lock has been successfully acquired private synchronized boolean attempt return true if we already own the lock also if nobody is waiting grant the lock immediately if current Operation Thread Thread current Thread current Operation Thread null operations is Empty depth set Current Operation Thread Thread current Thread return true return false  currentOperationThread currentThread currentOperationThread isEmpty setCurrentOperationThread currentThread
see org eclipse core runtime jobs I Scheduling Rule contains org eclipse core runtime jobs I Scheduling Rule public boolean contains I Scheduling Rule rule return false  ISchedulingRule ISchedulingRule ISchedulingRule
Returns null if acquired and a Semaphore object otherwise If a waiting semaphore already exists for this thread it will be returned otherwise a new semaphore will be created enqueued and returned private synchronized Semaphore create Semaphore return attempt null enqueue new Semaphore Thread current Thread  createSemaphore currentThread
Attempts to acquire this lock Callers will block until this lock comes available to them or until the specified delay has elapsed private boolean do Acquire Semaphore semaphore long delay throws Interrupted Exception boolean success false notify hook to service pending sync Execs before falling asleep if manager about To Wait this current Operation Thread hook granted immediate access remove semaphore for the lock request from the queue do not log in graph because this thread did not really get the lock operations remove semaphore depth manager add Lock Thread current Operation Thread this return true Make sure the semaphore is in the queue before we start waiting It might have been removed from the queue while servicing sync Execs This is will return our existing semaphore if it is still in the queue semaphore create Semaphore if semaphore null return true manager add Lock Wait Thread Thread current Thread this try success semaphore acquire delay catch Interrupted Exception e if DEBUG System out println Thread current Thread Operation interrupted while waiting NON NLS 1 NON NLS 2 throw e if success depth update Current Operation else operation timed out remove request semaphore from queue and update graph operations remove semaphore manager remove Lock Wait Thread Thread current Thread this return success  doAcquire InterruptedException syncExecs aboutToWait currentOperationThread addLockThread currentOperationThread syncExecs createSemaphore addLockWaitThread currentThread InterruptedException currentThread updateCurrentOperation removeLockWaitThread currentThread
Releases this lock from the thread that used to own it Grants this lock to the next thread in the queue private synchronized void do Release notify hook manager about To Release depth 0 Semaphore next Semaphore operations peek set Current Operation Thread null if next null next release  doRelease aboutToRelease setCurrentOperationThread
If there is another semaphore with the same runnable in the queue the other is returned and the new one is not added private synchronized Semaphore enqueue Semaphore new Semaphore Semaphore semaphore Semaphore operations get new Semaphore if semaphore null operations enqueue new Semaphore return new Semaphore return semaphore  newSemaphore newSemaphore newSemaphore newSemaphore
Suspend this lock by granting the lock to the next lock in the queue Return the depth of the suspended lock protected int force Release int old Depth depth do Release return old Depth  forceRelease oldDepth doRelease oldDepth
see Locks I Lock get Depth public int get Depth return depth  ILock getDepth getDepth
see org eclipse core runtime jobs I Scheduling Rule is Conflicting org eclipse core runtime jobs I Scheduling Rule public boolean is Conflicting I Scheduling Rule rule return rule this  ISchedulingRule isConflicting ISchedulingRule isConflicting ISchedulingRule
public void release if depth 0 return only release the lock when the depth reaches zero Assert is True depth 0 Lock released too many times NON NLS 1 if depth 0 do Release else manager remove Lock Thread current Operation Thread this  isTrue doRelease removeLockThread currentOperationThread
If new Thread is null release this lock from its previous owner If new Thread is not null grant this lock to new Thread private void set Current Operation Thread Thread new Thread if current Operation Thread null new Thread null manager remove Lock Thread current Operation Thread this this current Operation Thread new Thread if current Operation Thread null manager add Lock Thread current Operation Thread this  newThread newThread newThread setCurrentOperationThread newThread currentOperationThread newThread removeLockThread currentOperationThread currentOperationThread newThread currentOperationThread addLockThread currentOperationThread
Forces the lock to be at the given depth Used when re acquiring a suspended lock protected void set Depth int new Depth for int i depth i new Depth i manager add Lock Thread current Operation Thread this this depth new Depth  setDepth newDepth newDepth addLockThread currentOperationThread newDepth
For debugging purposes only public String to String return Ordered Lock number NON NLS 1 NON NLS 2  toString OrderedLock
This lock has just been granted to a new thread the thread waited for it Remove the request from the queue and update both the graph and the lock private synchronized void update Current Operation operations dequeue set Current Operation Thread Thread current Thread  updateCurrentOperation setCurrentOperationThread currentThread

protected int tail public Queue this 20 false 
The parameter reuse indicates what do you want to happen with the object reference when you remove it from the queue If reuse is false the queue no longer holds a reference to the object when it is removed If reuse is true you can use the method get Next Available Object to get an used object set its new values and add it again to the queue public Queue int size boolean reuse elements new Object size head tail 0 this reuse reuse  getNextAvailableObject
Adds an object to the tail of the queue public void enqueue Object element int new Tail increment tail if new Tail head grow new Tail tail 1 elements tail element tail new Tail  newTail newTail newTail newTail
public void clear if tail head for int i head i tail i elements i null else for int i head i elements length i elements i null for int i 0 i tail i elements i null tail head 0 
public boolean contains Object o return get o null 
This method does not affect the queue itself It is only a helper to decrement an index in the queue public int decrement int index return index 0 elements length 1 index 1 
public Object element At int index return elements index  elementAt
public Iterator elements if is Empty return new Array List 0 iterator if head tail we can use the same array if head tail return Arrays as List elements iterator otherwise we need to create a new array Object new Elements new Object size int end elements length head System arraycopy elements head new Elements 0 end System arraycopy elements 0 new Elements end tail return Arrays as List new Elements iterator  isEmpty ArrayList asList newElements newElements newElements asList newElements
public Object get Object o int index head while index tail if elements index equals o return elements index index increment index return null 
Removes the given object from the queue Shifts the underlying array public boolean remove Object o int index head find the object to remove while index tail if elements index equals o break index increment index if element wasn t found return if index tail return false store a reference to it needed for reuse of objects Object to Remove elements index int next Index 1 while index tail next Index increment index if next Index tail elements index elements next Index index next Index decrement tail tail decrement tail if objects are reused transfer the reference that is removed to the end of the queue otherwise set the element after the last one to null to avoid duplicate references elements tail reuse to Remove null return true  toRemove nextIndex nextIndex nextIndex nextIndex nextIndex toRemove
Returns an object that has been removed from the queue if any The intention is to support reuse of objects that have already been processed and removed from the queue Returns null if there are no available objects public Object get Next Available Object int index tail while index head if elements index null Object result elements index elements index null return result index increment index return null  getNextAvailableObject
protected void grow int new Size int elements length 1 5 Object new Elements new Object new Size if tail head System arraycopy elements head new Elements head size else int new Head new Size elements length head System arraycopy elements 0 new Elements 0 tail 1 System arraycopy elements head new Elements new Head new Size new Head head new Head elements new Elements  newSize newElements newSize newElements newHead newSize newElements newElements newHead newSize newHead newHead newElements
This method does not affect the queue itself It is only a helper to increment an index in the queue public int increment int index return index elements length 1 0 index 1 
public int index Of Object target if tail head for int i head i tail i if target equals elements i return i else for int i head i elements length i if target equals elements i return i for int i 0 i tail i if target equals elements i return i return 1  indexOf
public boolean is Empty return tail head  isEmpty
public Object peek return elements head 
public Object peek Tail return elements decrement tail  peekTail
Removes an returns the item at the head of the queue return public Object dequeue if is Empty return null Object result peek if reuse elements head null head increment head return result  isEmpty
public Object remove Tail Object result peek Tail tail decrement tail if reuse elements tail null return result  removeTail peekTail
public void reset tail head 0 
public int size return tail head tail head elements length head tail 
public String to String String Buffer sb new String Buffer sb append NON NLS 1 if is Empty Iterator it elements while true sb append it next if it has Next sb append NON NLS 1 else break sb append NON NLS 1 return sb to String  toString StringBuffer StringBuffer isEmpty hasNext toString

protected Runnable runnable public Semaphore Runnable runnable this runnable runnable notifications 0 
Attempts to acquire this semaphore Returns true if it was successfully acquired and false otherwise public synchronized boolean acquire long delay throws Interrupted Exception if Thread interrupted throw new Interrupted Exception long start System current Time Millis long time Left delay while true if notifications 0 notifications return true if time Left 0 return false wait time Left time Left start delay System current Time Millis  InterruptedException InterruptedException currentTimeMillis timeLeft timeLeft timeLeft timeLeft currentTimeMillis
public boolean equals Object obj return runnable Semaphore obj runnable 
public Runnable get Runnable return runnable  getRunnable
public int hash Code return runnable null 0 runnable hash Code  hashCode hashCode
public synchronized void release notifications notify All  notifyAll
for debug only public String to String return Semaphore runnable NON NLS 1 NON NLS 2  toString

Thread Job Job Manager manager I Scheduling Rule rule super Implicit Job NON NLS 1 this manager manager set System true set Priority Job INTERACTIVE rule Stack new I Scheduling Rule 2 top 1 set Rule rule  ThreadJob JobManager ISchedulingRule setSystem setPriority ruleStack ISchedulingRule setRule
An end Rule was called that did not match the last begin Rule in the stack Report and log a detailed informational message param rule The rule that was popped private void illegal Pop I Scheduling Rule rule String Buffer buf new String Buffer Attempted to end Rule NON NLS 1 buf append rule if top 0 top rule Stack length buf append does not match most recent begin NON NLS 1 buf append rule Stack top else if top 0 buf append but there was no matching begin Rule NON NLS 1 else buf append but the rule stack was out of bounds top NON NLS 1 buf append See log for trace information if rule tracing is enabled NON NLS 1 String msg buf to String if Job Manager DEBUG Job Manager DEBUG BEGIN END System out println msg Throwable t last Push null new Illegal Argument Exception last Push I Status error new Status I Status ERROR Platform PI RUNTIME 1 msg t Internal Platform get Default log error Assert is Legal false msg  endRule beginRule illegalPop ISchedulingRule StringBuffer StringBuffer endRule ruleStack ruleStack beginRule toString JobManager JobManager DEBUG_BEGIN_END lastPush IllegalArgumentException lastPush IStatus IStatus PI_RUNTIME InternalPlatform getDefault isLegal
Client has attempted to begin a rule that is not contained within the outer rule private void illegal Push I Scheduling Rule push Rule I Scheduling Rule base Rule String Buffer buf new String Buffer Attempted to begin Rule NON NLS 1 buf append push Rule buf append does not match outer scope rule NON NLS 1 buf append base Rule String msg buf to String if Job Manager DEBUG System out println msg I Status error new Status I Status ERROR Platform PI RUNTIME 1 msg new Illegal Argument Exception Internal Platform get Default log error Assert is Legal false msg  illegalPush ISchedulingRule pushRule ISchedulingRule baseRule StringBuffer StringBuffer beginRule pushRule baseRule toString JobManager IStatus IStatus PI_RUNTIME IllegalArgumentException InternalPlatform getDefault isLegal
Returns true if the monitor is canceled and false otherwise Protects the caller from exception in the monitor implementation private boolean is Canceled I Progress Monitor monitor try return monitor is Canceled catch Runtime Exception e String msg Policy bind jobs internal Error NON NLS 1 I Status status new Status I Status ERROR Platform PI RUNTIME Platform PLUGIN ERROR msg e Internal Platform get Default log status return false  isCanceled IProgressMonitor isCanceled RuntimeException internalError IStatus IStatus PI_RUNTIME PLUGIN_ERROR InternalPlatform getDefault
Returns true if this thread job was scheduled and actually started running synchronized boolean is Running return running  isRunning
Schedule the job and block the calling thread until the job starts running void join Run I Progress Monitor monitor if is Canceled monitor throw new Operation Canceled Exception check if there is a blocking thread before waiting Internal Job blocking Job manager find Blocking Job this Thread blocker blocking Job null null blocking Job get Thread lock listener decided to grant immediate access if manager get Lock Manager about To Wait blocker try wait Start monitor blocking Job while true if is Canceled monitor throw new Operation Canceled Exception try to run the job if manager run Now this break update blocking job blocking Job manager find Blocking Job this blocker blocking Job null null blocking Job get Thread if manager get Lock Manager about To Wait blocker break must lock instance before calling wait synchronized this try wait 250 catch Interrupted Exception e ignore finally wait End monitor manager get Lock Manager about To Release  joinRun IProgressMonitor isCanceled OperationCanceledException InternalJob blockingJob findBlockingJob blockingJob blockingJob getThread getLockManager aboutToWait waitStart blockingJob isCanceled OperationCanceledException runNow blockingJob findBlockingJob blockingJob blockingJob getThread getLockManager aboutToWait InterruptedException waitEnd getLockManager aboutToRelease
Pops a rule Returns true if it was the last rule for this thread job and false otherwise boolean pop I Scheduling Rule rule if top 0 rule Stack top rule illegal Pop rule rule Stack top null return top 0  ISchedulingRule ruleStack illegalPop ruleStack
Adds a new scheduling rule to the stack of rules for this thread Throws a runtime exception if the new rule is not compatible with the base scheduling rule for this thread void push final I Scheduling Rule rule final I Scheduling Rule base Rule get Rule if top rule Stack length I Scheduling Rule new Stack new I Scheduling Rule rule Stack length 2 System arraycopy rule Stack 0 new Stack 0 rule Stack length rule Stack new Stack rule Stack top rule if Job Manager DEBUG BEGIN END last Push Runtime Exception new Runtime Exception fill In Stack Trace check for containment last because we don t want to fail again on end Rule if base Rule null rule null base Rule contains rule illegal Push rule base Rule  ISchedulingRule ISchedulingRule baseRule getRule ruleStack ISchedulingRule newStack ISchedulingRule ruleStack ruleStack newStack ruleStack ruleStack newStack ruleStack JobManager DEBUG_BEGIN_END lastPush RuntimeException RuntimeException fillInStackTrace endRule baseRule baseRule illegalPush baseRule
Reset all of this job s fields so it can be reused Returns false if reuse is not possible boolean recycle don t recycle if still running for any reason if get State Job NONE return false clear and reset all fields acquire Rule running false real Job null set Rule null set Thread null if rule Stack length 2 rule Stack new I Scheduling Rule 2 else rule Stack 0 rule Stack 1 null top 1 return true  getState acquireRule realJob setRule setThread ruleStack ruleStack ISchedulingRule ruleStack ruleStack
non Javadoc see org eclipse core runtime jobs Job run org eclipse core runtime I Progress Monitor public I Status run I Progress Monitor monitor synchronized this running true return ASYNC FINISH  IProgressMonitor IStatus IProgressMonitor ASYNC_FINISH
Records the job that is actually running in this thread if any param real Job The running job void set Real Job Job real Job this real Job real Job  realJob setRealJob realJob realJob realJob
Returns true if this job should cause a self canceling job to cancel itself and false otherwise boolean should Interrupt return real Job null true real Job is System  shouldInterrupt realJob realJob isSystem
Reports that this thread was blocked but is no longer blocked and is able to proceed param monitor The monitor to report unblocking to private void wait End I Progress Monitor monitor if is Running manager get Lock Manager add Lock Thread Thread current Thread get Rule need to reaquire any locks that were suspended while this thread was blocked on the rule manager get Lock Manager resume Suspended Locks Thread current Thread else tell lock manager that this thread gave up waiting manager get Lock Manager remove Lock Wait Thread Thread current Thread get Rule manager report Unblocked monitor  waitEnd IProgressMonitor isRunning getLockManager addLockThread currentThread getRule getLockManager resumeSuspendedLocks currentThread getLockManager removeLockWaitThread currentThread getRule reportUnblocked
Indicates the start of a wait on a scheduling rule Report the blockage to the progress manager and update the lock manager param monitor The monitor to report blocking to param blocking Job The job that is blocking this thread or code null code private void wait Start I Progress Monitor monitor Internal Job blocking Job manager get Lock Manager add Lock Wait Thread Thread current Thread get Rule manager report Blocked monitor blocking Job  blockingJob waitStart IProgressMonitor InternalJob blockingJob getLockManager addLockWaitThread currentThread getRule reportBlocked blockingJob

private final Worker Pool pool public Worker Worker Pool pool super Worker next Worker Number NON NLS 1 this pool pool  WorkerPool WorkerPool nextWorkerNumber
Returns the currently running job or null if none public Job current Job return Job current Job  currentJob currentJob
private I Status handle Exception Internal Job job Throwable t String message Policy bind jobs internal Error job get Name NON NLS 1 return new Status I Status ERROR Platform PI RUNTIME Platform PLUGIN ERROR message t  IStatus handleException InternalJob internalError getName IStatus PI_RUNTIME PLUGIN_ERROR
private void log I Status result try Internal Platform get Default log result catch Runtime Exception e failed to log so print to console instead Throwable t result get Exception if t null t print Stack Trace  IStatus InternalPlatform getDefault RuntimeException getException printStackTrace
public void run set Priority Thread NORM PRIORITY try while current Job pool start Job this null if job is null we ve been shutdown if current Job null return current Job set Thread this I Status result Status OK STATUS try result current Job run current Job get Progress Monitor catch Operation Canceled Exception e result Status CANCEL STATUS catch Exception e result handle Exception current Job e catch Error e result handle Exception current Job e finally clear interrupted state for this thread Thread interrupted result must not be null if result null result handle Exception current Job new Null Pointer Exception pool end Job current Job result if result get Severity I Status ERROR I Status WARNING 0 log result current Job null catch Throwable t t print Stack Trace finally current Job null pool end Worker this  setPriority NORM_PRIORITY currentJob startJob currentJob currentJob setThread IStatus OK_STATUS currentJob currentJob getProgressMonitor OperationCanceledException CANCEL_STATUS handleException currentJob handleException currentJob handleException currentJob NullPointerException endJob currentJob getSeverity IStatus IStatus currentJob printStackTrace currentJob endWorker

private Worker threads new Worker 10 protected Worker Pool Job Manager manager this manager manager  WorkerPool JobManager
Adds a worker to the list of workers private synchronized void add Worker worker int size threads length if num Threads 1 size Worker new Threads new Worker 2 size System arraycopy threads 0 new Threads 0 size threads new Threads threads num Threads worker  numThreads newThreads newThreads newThreads numThreads
private synchronized void decrement Busy Threads impossible to have less than zero busy threads if busy Threads 0 if Job Manager DEBUG Assert is True false Integer to String busy Threads busy Threads 0  decrementBusyThreads busyThreads JobManager isTrue toString busyThreads busyThreads
Signals the end of a job Note that this method can be called under Out Of Memory Error conditions and thus must be paranoid about allocating objects protected void end Job Internal Job job I Status result decrement Busy Threads need to end rule in graph before ending job so that 2 threads do not become the owners of the same rule in the graph if job get Rule null job instanceof Thread Job remove any locks this thread may be owning on that rule manager get Lock Manager remove Lock Completely Thread current Thread job get Rule manager end Job job result true  OutOfMemoryError endJob InternalJob IStatus decrementBusyThreads getRule ThreadJob getLockManager removeLockCompletely currentThread getRule endJob
Signals the death of a worker thread Note that this method can be called under Out Of Memory Error conditions and thus must be paranoid about allocating objects protected synchronized void end Worker Worker worker if remove worker Job Manager DEBUG Job Manager debug worker removed from pool worker NON NLS 1  OutOfMemoryError endWorker JobManager JobManager
private synchronized void increment Busy Threads impossible to have more busy threads than there are threads if busy Threads num Threads if Job Manager DEBUG Assert is True false Integer to String busy Threads num Threads busy Threads num Threads  incrementBusyThreads busyThreads numThreads JobManager isTrue toString busyThreads numThreads busyThreads numThreads
Notfication that a job has been added to the queue Wake a worker creating a new worker if necessary The provided job may be null protected synchronized void job Queued Internal Job job if there is a sleeping thread wake it up if sleeping Threads 0 if Job Manager DEBUG Job Manager debug notifiying a worker NON NLS 1 notify return int thread Count num Threads create a thread if all threads are busy and we re under the max size if the job is high priority we start a thread no matter what if busy Threads thread Count Worker worker new Worker this add worker if Job Manager DEBUG Job Manager debug worker added to pool worker NON NLS 1 worker start return  jobQueued InternalJob sleepingThreads JobManager JobManager threadCount numThreads busyThreads threadCount JobManager JobManager
Remove a worker thread from our list return true if a worker was removed and false otherwise private boolean remove Worker worker for int i 0 i threads length i if threads i worker System arraycopy threads i 1 threads i num Threads i 1 threads num Threads null return true return false  numThreads numThreads
protected synchronized void shutdown notify All  notifyAll
Sleep for the given duration or until woken private synchronized void sleep long duration sleeping Threads if Job Manager DEBUG Job Manager debug worker sleeping for duration ms NON NLS 1 NON NLS 2 try wait duration catch Interrupted Exception e if Job Manager DEBUG Job Manager debug worker interrupted while waiting NON NLS 1 finally sleeping Threads  sleepingThreads JobManager JobManager InterruptedException JobManager JobManager sleepingThreads
Returns a new job to run Returns null if the thread should die protected Internal Job start Job Worker worker if we re above capacity kill the thread synchronized this if manager is Active must remove the worker immediately to prevent all threads from expiring end Worker worker return null Job job manager start Job spin until a job is found or until we have been idle for too long long idle Start System current Time Millis while manager is Active job null long hint manager sleep Hint if hint 0 sleep Math min hint BEST BEFORE job manager start Job if we were already idle and there are still no new jobs then the thread can expire synchronized this if job null System current Time Millis idle Start BEST BEFORE num Threads busy Threads MIN THREADS must remove the worker immediately to prevent all threads from expiring end Worker worker return null if job null increment Busy Threads if this job has a rule then we are essentially acquiring a lock if job get Rule null job instanceof Thread Job don t need to reaquire locks because it was not recorded in the graph that this thread waited to get this rule manager get Lock Manager add Lock Thread Thread current Thread job get Rule see if we need to wake another worker if manager sleep Hint 0 job Queued null return job  InternalJob startJob isActive endWorker startJob idleStart currentTimeMillis isActive sleepHint BEST_BEFORE startJob currentTimeMillis idleStart BEST_BEFORE numThreads busyThreads MIN_THREADS endWorker incrementBusyThreads getRule ThreadJob getLockManager addLockThread currentThread getRule sleepHint jobQueued

The limit is the maximum number of directories managed by this store This number must be power of 2 and do not exceed 256 The location should be an existing valid directory public Blob Store I Path location int limit Assert is Not Null location Assert is True location equals Path EMPTY store Location location to File Assert is True store Location is Directory Assert is True limit 256 limit 128 limit 64 limit 32 limit 16 limit 8 limit 4 limit 2 limit 1 mask byte limit 1 local Store new File System Store  BlobStore IPath isNotNull isTrue storeLocation toFile isTrue storeLocation isDirectory isTrue localStore FileSystemStore
public Universal Unique Identifier add Blob File target boolean move Contents throws Core Exception Universal Unique Identifier uuid new Universal Unique Identifier File dir folder For uuid if dir exists if dir mkdirs String message Policy bind localstore could Not Create Folder dir get Absolute Path NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE LOCAL new Path dir get Absolute Path message null File destination file For uuid if move Contents local Store move target destination true null else local Store copy target destination I Resource DEPTH ZERO null return uuid  UniversalUniqueIdentifier addBlob moveContents CoreException UniversalUniqueIdentifier UniversalUniqueIdentifier folderFor couldNotCreateFolder getAbsolutePath ResourceException IResourceStatus FAILED_WRITE_LOCAL getAbsolutePath fileFor moveContents localStore localStore IResource DEPTH_ZERO
private void append Byte String String Buffer buffer byte value String hex String if value 0 hex String Integer to Hex String 256 value else hex String Integer to Hex String value if hex String length 1 buffer append 0 NON NLS 1 buffer append hex String  appendByteString StringBuffer hexString hexString toHexString hexString toHexString hexString hexString
private String bytes To Hex String byte b String Buffer buffer new String Buffer for int i 0 i b length i append Byte String buffer b i return buffer to String  bytesToHexString StringBuffer StringBuffer appendByteString toString
Deletes a blob File If the file does not exist do nothing Note This method used to delete empty dirs but this part was removed for performance reasons protected boolean delete File blob File Core File System Library set Read Only blob File get Absolute Path false return blob File delete  blobFile blobFile CoreFileSystemLibrary setReadOnly blobFile getAbsolutePath blobFile
public void delete All delete All store Location  deleteAll deleteAll storeLocation
public void delete All File root if root is Directory String list root list if list null for int i 0 i list length i delete All new File root list i root delete  deleteAll isDirectory deleteAll
public boolean delete Blob String uuid return delete Blob new Universal Unique Identifier uuid  deleteBlob deleteBlob UniversalUniqueIdentifier
Deletes a blob File Returns true if the blob was deleted public boolean delete Blob Universal Unique Identifier uuid Assert is Not Null uuid return delete file For uuid  blobFile deleteBlob UniversalUniqueIdentifier isNotNull fileFor
Delete all of the blobs in the given set public void delete Blobs Set set for Iterator i set iterator i has Next delete Blob Universal Unique Identifier i next  deleteBlobs hasNext deleteBlob UniversalUniqueIdentifier
public File file For Universal Unique Identifier uuid File root folder For uuid return new File root bytes To Hex String uuid to Bytes  fileFor UniversalUniqueIdentifier folderFor bytesToHexString toBytes
Find out the name of the directory that fits better to this UUID public File folder For Universal Unique Identifier uuid byte hash hashUUI Dbytes uuid hash mask limit the range of the directory String dir Name Integer to Hex String hash 128 mask 128 mask makes sure 00h is the lower value File dir new File store Location dir Name return dir  folderFor UniversalUniqueIdentifier hashUUIDbytes dirName toHexString storeLocation dirName
public Input Stream get Blob Universal Unique Identifier uuid throws Core Exception File blob File file For uuid return local Store read blob File  InputStream getBlob UniversalUniqueIdentifier CoreException blobFile fileFor localStore blobFile
public Set get Blob Names Set result new Hash Set 50 String folders store Location list if folders null for int i 0 i folders length i File folder new File store Location folders i String blobs folder list if blobs null for int j 0 j blobs length j result add blobs j return result  getBlobNames HashSet storeLocation storeLocation
Converts a byte array into a byte hash representation It is used to get a directory name protected byte hashUUI Dbytes Universal Unique Identifier uuid byte bytes uuid to Bytes byte hash 0 for int i 0 i bytes length i hash random Array bytes i 128 128 makes sure the index is 0 return hash  hashUUIDbytes UniversalUniqueIdentifier toBytes randomArray

Creates a new visitor whose sync status will have the given title public Collect Sync Status Visitor String multi Status Title I Progress Monitor monitor super monitor status new Multi Status Resources Plugin PI RESOURCES I Status INFO multi Status Title null affected Resources new Array List 20  CollectSyncStatusVisitor multiStatusTitle IProgressMonitor MultiStatus ResourcesPlugin PI_RESOURCES IStatus multiStatusTitle affectedResources ArrayList
protected void changed Resource target String message Policy bind localstore resource Is Out Of Sync target get Full Path to String NON NLS 1 status add new Resource Status I Resource Status OUT OF SYNC LOCAL target get Full Path message affected Resources add target resource Changed true  resourceIsOutOfSync getFullPath toString ResourceStatus IResourceStatus OUT_OF_SYNC_LOCAL getFullPath affectedResources resourceChanged
Returns the list of resources that were not synchronized with the local filesystem public List get Affected Resources return affected Resources  getAffectedResources affectedResources
Returns the sync status that has been collected as a result of this visit public Multi Status get Sync Status return status  MultiStatus getSyncStatus
protected void refresh Container parent throws Core Exception changed parent  CoreException
protected void create Resource Unified Tree Node node Resource target throws Core Exception changed target  createResource UnifiedTreeNode CoreException
protected void delete Resource Unified Tree Node node Resource target throws Core Exception changed target  deleteResource UnifiedTreeNode CoreException
protected void file To Folder Unified Tree Node node Resource target throws Core Exception changed target  fileToFolder UnifiedTreeNode CoreException
protected void folder To File Unified Tree Node node Resource target throws Core Exception changed target  folderToFile UnifiedTreeNode CoreException
protected void resource Changed Unified Tree Node node Resource target throws Core Exception changed target  resourceChanged UnifiedTreeNode CoreException

public Copy Visitor I Resource root Source I Resource destination int update Flags I Progress Monitor monitor this root Destination destination this root Destination Local Location destination get Location this update Flags update Flags this is Deep update Flags I Resource SHALLOW 0 this force update Flags I Resource FORCE 0 this monitor monitor this segments To Drop root Source get Full Path segment Count this status new Multi Status Resources Plugin PI RESOURCES I Status INFO Policy bind localstore copy Problem null NON NLS 1  CopyVisitor IResource rootSource IResource updateFlags IProgressMonitor rootDestination rootDestinationLocalLocation getLocation updateFlags updateFlags isDeep updateFlags IResource updateFlags IResource segmentsToDrop rootSource getFullPath segmentCount MultiStatus ResourcesPlugin PI_RESOURCES IStatus copyProblem
protected boolean copy Unified Tree Node node Resource source Resource node get Resource I Path sufix source get Full Path remove First Segments segments To Drop Resource destination get Destination Resource source sufix if copy Properties source destination return false return copy Contents node source destination  UnifiedTreeNode getResource IPath getFullPath removeFirstSegments segmentsToDrop getDestinationResource copyProperties copyContents
protected boolean copy Contents Unified Tree Node node Resource source Resource destination try if is Deep source is Linked destination create Link source get Raw Location update Flags I Resource ALLOW MISSING LOCAL null return false if destination get Type I Resource FOLDER I Folder destination create update Flags true null Core File System Library copy Attributes node get Local Location destination get Location toOS String false return true XXX should use transfer streams in order to report better progress I File destination create I File source get Contents false update Flags null update the destination timestamp on disk long last Modified node get Last Modified Resource Info destination Info destination get Resource Info false true destination Info set Local Sync Info last Modified if it s a deep copy of a link need to clear the linked flag destination Info clear I Core Constants M LINK I Path destination Location destination get Location destination Location to File set Last Modified last Modified update timestamps on aliases XXX this will update aliases twice because set Contents above will also do it Workspace root Destination get Workspace get Alias Manager update Aliases destination destination Location I Resource DEPTH ZERO monitor update file attributes Core File System Library copy Attributes node get Local Location destination Location toOS String false destination get Local Manager get History Store copy History source get Full Path destination get Full Path catch Core Exception e status add e get Status return false  copyContents UnifiedTreeNode isDeep isLinked createLink getRawLocation updateFlags IResource ALLOW_MISSING_LOCAL getType IResource IFolder updateFlags CoreFileSystemLibrary copyAttributes getLocalLocation getLocation toOSString IFile IFile getContents updateFlags lastModified getLastModified ResourceInfo destinationInfo getResourceInfo destinationInfo setLocalSyncInfo lastModified destinationInfo ICoreConstants M_LINK IPath destinationLocation getLocation destinationLocation toFile setLastModified lastModified setContents rootDestination getWorkspace getAliasManager updateAliases destinationLocation IResource DEPTH_ZERO CoreFileSystemLibrary copyAttributes getLocalLocation destinationLocation toOSString getLocalManager getHistoryStore copyHistory getFullPath getFullPath CoreException getStatus
protected boolean copy Properties Resource target Resource destination try target get Property Manager copy target destination I Resource DEPTH ZERO return true catch Core Exception e status add e get Status return false  copyProperties getPropertyManager IResource DEPTH_ZERO CoreException getStatus
protected Resource get Destination Resource Resource source I Path sufix I Path destination Path root Destination get Full Path append sufix return get Workspace new Resource destination Path source get Type  getDestinationResource IPath IPath destinationPath rootDestination getFullPath getWorkspace newResource destinationPath getType
This is done in order to generate less garbage protected Refresh Local Visitor get Refresh Local Visitor if refresh Local Visitor null refresh Local Visitor new Refresh Local Visitor Policy monitor For null return refresh Local Visitor  RefreshLocalVisitor getRefreshLocalVisitor refreshLocalVisitor refreshLocalVisitor RefreshLocalVisitor monitorFor refreshLocalVisitor
public I Status get Status return status  IStatus getStatus
protected File System Store get Store if local Store null local Store new File System Store return local Store  FileSystemStore getStore localStore localStore FileSystemStore localStore
protected Workspace get Workspace return Workspace root Destination get Workspace  getWorkspace rootDestination getWorkspace
protected boolean is Synchronized Unified Tree Node node does the resource exist in workspace and file system if node exists In Workspace node exists In File System return false we don t care about folder last modified if node is Folder node get Resource get Type I Resource FOLDER return true is last Modified different Resource target Resource node get Resource long last Modifed target get Resource Info false false get Local Sync Info if last Modifed node get Last Modified return false return true  isSynchronized UnifiedTreeNode existsInWorkspace existsInFileSystem isFolder getResource getType IResource lastModified getResource lastModifed getResourceInfo getLocalSyncInfo lastModifed getLastModified
protected void synchronize Unified Tree Node node throws Core Exception get Refresh Local Visitor visit node  UnifiedTreeNode CoreException getRefreshLocalVisitor
public boolean visit Unified Tree Node node throws Core Exception Policy check Canceled monitor int work 1 try location can be null if based on an undefined variable if node get Local Location null should still be a best effort copy I Path path node get Resource get Full Path String message Policy bind localstore location Undefined path to String NON NLS 1 status add new Resource Status I Resource Status FAILED READ LOCAL path message null return false boolean was Synchronized is Synchronized node if force was Synchronized synchronize node If not synchronized the monitor did not take this resource into account So do not report work on it work 0 if source still doesn t exist then fail because we can t copy a missing resource if node exists In File System I Path path node get Resource get Full Path String message Policy bind resources must Exist path to String NON NLS 1 status add new Resource Status I Resource Status RESOURCE NOT FOUND path message null return false if force was Synchronized I Path path node get Resource get Full Path String message Policy bind localstore resource Is Out Of Sync path to String NON NLS 1 status add new Resource Status I Resource Status OUT OF SYNC LOCAL path message null return true return copy node finally monitor worked work  UnifiedTreeNode CoreException checkCanceled getLocalLocation IPath getResource getFullPath locationUndefined toString ResourceStatus IResourceStatus FAILED_READ_LOCAL wasSynchronized isSynchronized wasSynchronized existsInFileSystem IPath getResource getFullPath mustExist toString ResourceStatus IResourceStatus RESOURCE_NOT_FOUND wasSynchronized IPath getResource getFullPath resourceIsOutOfSync toString ResourceStatus IResourceStatus OUT_OF_SYNC_LOCAL

public static long get Last Modified long stat return stat STAT LASTMODIFIED  getLastModified STAT_LASTMODIFIED
public static long get Last Modified String file Name if has Natives return get Last Modified get Stat file Name inlined no native implementation return new File file Name last Modified  getLastModified fileName hasNatives getLastModified getStat fileName fileName lastModified
public static long get Stat String file Name if has Natives return is Unicode internal Get StatW file Name to Char Array internal Get Stat Convert to Platform Bytes file Name inlined no native implementation File target new File file Name long result target last Modified if result 0 non existing return result result STAT VALID if target is Directory result STAT FOLDER if new File file Name can Write result STAT READ ONLY return result  getStat fileName hasNatives isUnicode internalGetStatW fileName toCharArray internalGetStat toPlatformBytes fileName fileName lastModified STAT_VALID isDirectory STAT_FOLDER fileName canWrite STAT_READ_ONLY
private static void log Missing Native Library Unsatisfied Link Error e String lib Name System map Library Name LIBRARY NAME String message Policy bind localstore could Not Load Library lib Name NON NLS 1 Resource Status status new Resource Status I Status INFO null message null Resources Plugin get Plugin get Log log status  logMissingNativeLibrary UnsatisfiedLinkError libName mapLibraryName LIBRARY_NAME couldNotLoadLibrary libName ResourceStatus ResourceStatus IStatus ResourcesPlugin getPlugin getLog
Returns the stat information for the specified filename in a long 64 bits We just retrieve the stat information we consider necessary and store everything in one long to save some JNI calls standard version 
Returns the stat information for the specified filename in a long 64 bits We just retrieve the stat information we consider necessary and store everything in one long to save some JNI calls Unicode version should not be called if code is Unicode code is code false code  isUnicode
Returns code true code if the underlying file system API supports Unicode code false code otherwise 
private static final native boolean internal Is Unicode Set unset the given file as read only Unicode version should not be called if code is Unicode code is code false code private static final native boolean internal Set Read OnlyW char file Name boolean read Only  internalIsUnicode isUnicode internalSetReadOnlyW fileName readOnly
private static final native boolean internal Set Read OnlyW char file Name boolean read Only Set unset the given file as read only private static final native boolean internal Set Read Only byte file Name boolean read Only  internalSetReadOnlyW fileName readOnly internalSetReadOnly fileName readOnly
private static final native boolean internal Set Read Only byte file Name boolean read Only public static boolean is File long stat return is Set stat STAT VALID is Set stat STAT FOLDER  internalSetReadOnly fileName readOnly isFile isSet STAT_VALID isSet STAT_FOLDER
public static boolean is Folder long stat return is Set stat STAT VALID is Set stat STAT FOLDER  isFolder isSet STAT_VALID isSet STAT_FOLDER
public static boolean is Read Only String file Name Use the same implementation whether or not we are using the natives If the file doesn t exist then get Stat will return 0 and this method will return false return is Set get Stat file Name STAT READ ONLY  isReadOnly fileName getStat isSet getStat fileName STAT_READ_ONLY
public static boolean is Read Only long stat return is Set stat STAT READ ONLY  isReadOnly isSet STAT_READ_ONLY
private static boolean is Set long stat long mask return stat mask 0  isSet
public static boolean set Read Only String file Name boolean read Only if has Natives return is Unicode internal Set Read OnlyW file Name to Char Array read Only internal Set Read Only Convert to Platform Bytes file Name read Only inlined no native implementation if read Only return false not supported return new File file Name set Read Only  setReadOnly fileName readOnly hasNatives isUnicode internalSetReadOnlyW fileName toCharArray readOnly internalSetReadOnly toPlatformBytes fileName readOnly readOnly fileName setReadOnly
public static boolean is Case Sensitive return case Sensitive  isCaseSensitive caseSensitive
Copies file attributes from source to destination The copy Last Modified attribute indicates whether the last Modified attribute should be copied public static boolean copy Attributes String source String destination boolean copy Last Modified if has Natives Note that support for copying last modified info is not implemented on Windows return is Unicode internal Copy AttributesW source to Char Array destination to Char Array copy Last Modified internal Copy Attributes Convert to Platform Bytes source Convert to Platform Bytes destination copy Last Modified return false not supported  copyLastModified lastModified copyAttributes copyLastModified hasNatives isUnicode internalCopyAttributesW toCharArray toCharArray copyLastModified internalCopyAttributes toPlatformBytes toPlatformBytes copyLastModified
Return code true code if we have found the core library and are using it for our file system calls and code false code otherwise public static boolean using Natives return has Natives  usingNatives hasNatives
Copies file attributes from source to destination The copy Last Modified attribute indicates whether the last Modified attribute should be copied  copyLastModified lastModified
Copies file attributes from source to destination The copy Last Modified attribute indicates whether the last Modified attribute should be copied Unicode version should not be called if code is Unicode code is code false code  copyLastModified lastModified isUnicode

public Delete Visitor List skip List boolean force boolean convert To Phantom boolean keep History I Progress Monitor monitor this skip List skip List this force force this convert To Phantom convert To Phantom this keep History keep History this monitor monitor status new Multi Status Resources Plugin PI RESOURCES I Resource Status FAILED DELETE LOCAL Policy bind localstore delete Problem null NON NLS 1  DeleteVisitor skipList convertToPhantom keepHistory IProgressMonitor skipList skipList convertToPhantom convertToPhantom keepHistory keepHistory MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus FAILED_DELETE_LOCAL deleteProblem
Deletes a file from both the workspace resource tree and the file system protected void delete Unified Tree Node node boolean delete Local File boolean should Keep History Resource target Resource node get Resource try delete Local File delete Local File target is Linked node exists In File System java io File local File delete Local File new java io File node get Local Location null if it is a folder in the file system delete its children first if target get Type I Resource FOLDER if this file is a POSIX symbolic link then deleting the local file before the recursion will keep its contents from being deleted on the filesystem if local File null local File delete for Enumeration children node get Children children has More Elements delete Unified Tree Node children next Element delete Local File should Keep History node remove Children From Tree delete node exists In Workspace target null local File return if should Keep History History Store store target get Local Manager get History Store store add State target get Full Path local File node get Last Modified true delete node exists In Workspace target null local File catch Core Exception e status add e get Status  UnifiedTreeNode deleteLocalFile shouldKeepHistory getResource deleteLocalFile deleteLocalFile isLinked existsInFileSystem localFile deleteLocalFile getLocalLocation getType IResource localFile localFile getChildren hasMoreElements UnifiedTreeNode nextElement deleteLocalFile shouldKeepHistory removeChildrenFromTree existsInWorkspace localFile shouldKeepHistory HistoryStore getLocalManager getHistoryStore addState getFullPath localFile getLastModified existsInWorkspace localFile CoreException getStatus
XXX in which situation would delete be called with null null It happens see bug 29445 but why protected void delete Resource target java io File local File if target null try if local File null target is Linked target get Local Manager get Store delete local File target delete Resource convert To Phantom status catch Core Exception e status add e get Status else if local File null local File delete  localFile localFile isLinked getLocalManager getStore localFile deleteResource convertToPhantom CoreException getStatus localFile localFile
protected boolean equals I Resource one I Resource another throws Core Exception return one get Full Path equals another get Full Path  IResource IResource CoreException getFullPath getFullPath
public Multi Status get Status return status  MultiStatus getStatus
protected boolean is Ancestor I Resource one I Resource another throws Core Exception return one get Full Path is Prefix Of another get Full Path equals one another  isAncestor IResource IResource CoreException getFullPath isPrefixOf getFullPath
protected boolean is Ancestor Of Resource To Skip I Resource resource throws Core Exception if skip List null return false for int i 0 i skip List size i I Resource target I Resource skip List get i if is Ancestor resource target return true return false  isAncestorOfResourceToSkip IResource CoreException skipList skipList IResource IResource skipList isAncestor
protected void remove From Skip List I Resource resource if skip List null skip List remove resource  removeFromSkipList IResource skipList skipList
protected boolean should Skip I Resource resource throws Core Exception if skip List null return false for int i 0 i skip List size i if equals resource I Resource skip List get i return true return false  shouldSkip IResource CoreException skipList skipList IResource skipList
public boolean visit Unified Tree Node node throws Core Exception Policy check Canceled monitor Resource target Resource node get Resource try if target get Type I Resource PROJECT return true if should Skip target remove From Skip List target int ticks target count Resources I Resource DEPTH INFINITE false monitor worked ticks return false if is Ancestor Of Resource To Skip target return true delete node true keep History return false finally monitor worked 1  UnifiedTreeNode CoreException checkCanceled getResource getType IResource shouldSkip removeFromSkipList countResources IResource DEPTH_INFINITE isAncestorOfResourceToSkip keepHistory

protected File System Store local Store public File System Resource Manager Workspace workspace this workspace workspace local Store new File System Store  FileSystemStore localStore FileSystemResourceManager localStore FileSystemStore
Returns the workspace paths of all resources that may correspond to the given file system location Returns an empty Array List if there are no such paths This method does not consider whether resources actually exist at the given locations protected Array List all Paths For Location I Path location I Project projects get Workspace get Root get Projects final Array List results new Array List for int i 0 i projects length i I Project project projects i check the project location I Path test Location project get Location I Path suffix if test Location null test Location is Prefix Of location suffix location remove First Segments test Location segment Count results add project get Full Path append suffix if project is Accessible continue I Resource children null try children project members catch Core Exception e ignore projects that cannot be accessed if children null continue for int j 0 j children length j I Resource child children j if child is Linked test Location child get Location if test Location null test Location is Prefix Of location add the full workspace path of the corresponding child of the linked resource suffix location remove First Segments test Location segment Count results add child get Full Path append suffix return results  ArrayList ArrayList allPathsForLocation IPath IProject getWorkspace getRoot getProjects ArrayList ArrayList IProject IPath testLocation getLocation IPath testLocation testLocation isPrefixOf removeFirstSegments testLocation segmentCount getFullPath isAccessible IResource CoreException IResource isLinked testLocation getLocation testLocation testLocation isPrefixOf removeFirstSegments testLocation segmentCount getFullPath
Returns all resources that correspond to the given file system location including resources under linked resources Returns an empty array if there are no corresponding resources param location the file system location param files resources that may exist below the project level can be either files or folders If this parameter is true files will be returned otherwise containers will be returned public I Resource all Resources For I Path location boolean files Array List result all Paths For Location location int count 0 for int i 0 imax result size i imax i replace the path in the list with the appropriate resource type I Resource resource resource For I Path result get i files result set i resource count actual resources some paths won t have a corresponding resource if resource null count convert to array and remove null elements I Resource to Return files I Resource new I File count I Resource new I Container count count 0 for Iterator it result iterator it has Next I Resource resource I Resource it next if resource null to Return count resource return to Return  IResource allResourcesFor IPath ArrayList allPathsForLocation IResource resourceFor IPath IResource toReturn IResource IFile IResource IContainer hasNext IResource IResource toReturn toReturn
Returns a container for the given file system location or null if there is no mapping for this path If the path has only one segment then an code I Project code is returned Otherwise the returned object is a code I Folder code This method does NOT check the existence of a folder in the given location Location cannot be null public I Container container For Location I Path location I Path path path For Location location return path null null I Container resource For path false  IProject IFolder IContainer containerForLocation IPath IPath pathForLocation IContainer resourceFor
public void copy I Resource target I Resource destination int update Flags I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try int total Work Resource target count Resources I Resource DEPTH INFINITE false String title Policy bind localstore copying target get Full Path to String NON NLS 1 monitor begin Task title total Work use location For instead of get Location to avoid null I Path location location For destination if location null String message Policy bind localstore location Undefined target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL target get Full Path message null if location to File exists String message Policy bind localstore resource Exists destination get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE LOCAL destination get Full Path message null Copy Visitor visitor new Copy Visitor target destination update Flags monitor Unified Tree tree new Unified Tree target tree accept visitor I Resource DEPTH INFINITE I Status status visitor get Status if status isOK throw new Resource Exception status finally monitor done  IResource IResource updateFlags IProgressMonitor CoreException monitorFor totalWork countResources IResource DEPTH_INFINITE getFullPath toString beginTask totalWork locationFor getLocation IPath locationFor locationUndefined getFullPath toString ResourceException IResourceStatus FAILED_READ_LOCAL getFullPath toFile resourceExists getFullPath toString ResourceException IResourceStatus FAILED_WRITE_LOCAL getFullPath CopyVisitor CopyVisitor updateFlags UnifiedTree UnifiedTree IResource DEPTH_INFINITE IStatus getStatus ResourceException
public void delete I Resource target boolean force boolean convert To Phantom boolean keep History I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try Resource resource Resource target int total Work resource count Resources I Resource DEPTH INFINITE false total Work 2 String title Policy bind localstore deleting resource get Full Path to String NON NLS 1 monitor begin Task title total Work Multi Status status new Multi Status Resources Plugin PI RESOURCES I Resource Status FAILED DELETE LOCAL Policy bind localstore delete Problem null NON NLS 1 List skip List null Unified Tree tree new Unified Tree target if force I Progress Monitor sub Policy sub Monitor For monitor total Work 2 sub begin Task 10000 NON NLS 1 Collect Sync Status Visitor refresh Visitor new Collect Sync Status Visitor Policy bind localstore delete Problem sub NON NLS 1 tree accept refresh Visitor I Resource DEPTH INFINITE status merge refresh Visitor get Sync Status skip List refresh Visitor get Affected Resources Delete Visitor delete Visitor new Delete Visitor skip List force convert To Phantom keep History Policy sub Monitor For monitor force total Work total Work 2 tree accept delete Visitor I Resource DEPTH INFINITE status merge delete Visitor get Status if status isOK throw new Resource Exception status finally monitor done  IResource convertToPhantom keepHistory IProgressMonitor CoreException monitorFor totalWork countResources IResource DEPTH_INFINITE totalWork getFullPath toString beginTask totalWork MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus FAILED_DELETE_LOCAL deleteProblem skipList UnifiedTree UnifiedTree IProgressMonitor subMonitorFor totalWork beginTask CollectSyncStatusVisitor refreshVisitor CollectSyncStatusVisitor deleteProblem refreshVisitor IResource DEPTH_INFINITE refreshVisitor getSyncStatus skipList refreshVisitor getAffectedResources DeleteVisitor deleteVisitor DeleteVisitor skipList convertToPhantom keepHistory subMonitorFor totalWork totalWork deleteVisitor IResource DEPTH_INFINITE deleteVisitor getStatus ResourceException
Returns an I File for the given file system location or null if there is no mapping for this path This method does NOT check the existence of a file in the given location Location cannot be null public I File file For Location I Path location I Path path path For Location location return path null null I File resource For path true  IFile IFile fileForLocation IPath IPath pathForLocation IFile resourceFor
The project description file is the only metadata file stored outside the metadata area It is stored as a file directly under the project location Returns null if the project location could not be resolved public I Path get Description Location For I Project target I Path project Location location For target return project Location null null project Location append I Project Description DESCRIPTION FILE NAME  IPath getDescriptionLocationFor IProject IPath projectLocation locationFor projectLocation projectLocation IProjectDescription DESCRIPTION_FILE_NAME
deprecated public int get Encoding File target throws Core Exception thread safety the location can be null if the project for this file does not exist I Path location location For target if location null Project target get Project check Exists NULL FLAG true location can be null if based on an undefined variable if location null String message Policy bind localstore location Undefined target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL target get Full Path message null java io File local File location to File if local File exists String message Policy bind localstore file Not Found local File get Absolute Path NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL target get Full Path message null return get Store get Encoding local File  getEncoding CoreException IPath locationFor getProject checkExists NULL_FLAG locationUndefined getFullPath toString ResourceException IResourceStatus FAILED_READ_LOCAL getFullPath localFile toFile localFile fileNotFound localFile getAbsolutePath ResourceException IResourceStatus FAILED_READ_LOCAL getFullPath getStore getEncoding localFile
public History Store get History Store return history Store  HistoryStore getHistoryStore historyStore
protected I Path get Project Default Location I Project project return Platform get Location append project get Full Path  IPath getProjectDefaultLocation IProject getLocation getFullPath
public File System Store get Store return local Store  FileSystemStore getStore localStore
protected Workspace get Workspace return workspace  getWorkspace
public boolean has Saved Project I Project project I Path location get Description Location For project return location null false location to File exists  hasSavedProject IProject IPath getDescriptionLocationFor toFile
The target must exist in the workspace This method must only ever be called from Project write Description because that method ensures that the description isn t then immediately discovered as a new change return true if a new description was written and false if it wasn t written because it was unchanged public boolean internal Write I Project target I Project Description description int update Flags boolean has Public Changes boolean has Private Changes throws Core Exception I Path location location For target if location null String message Policy bind localstore location Undefined target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE LOCAL target get Full Path message null get Store write Folder location to File write the project s private description to the metadata area if has Private Changes get Workspace get Meta Area write Private Description target if has Public Changes return false can t do anything if there s no description if description null return false write the model to a byte array Byte Array Output Stream out new Byte Array Output Stream try new Model Object Writer write description out catch IO Exception e String msg Policy bind resources write Meta target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE METADATA target get Full Path msg e byte new Contents out to Byte Array write the contents to the I File that represents the description I File description File target get File I Project Description DESCRIPTION FILE NAME if description File exists workspace create Resource description File false else if the description has not changed don t write anything if description Changed description File new Contents return false Byte Array Input Stream in new Byte Array Input Stream new Contents if description File is Read Only I Status result get Workspace validate Edit new I File description File null if result isOK throw new Resource Exception result description File set Contents in update Flags null update the timestamp on the project as well so we know when it has been changed from the outside long last Modified Resource description File get Resource Info false false get Local Sync Info Resource Info info Resource target get Resource Info false true update Local Sync info last Modified for backwards compatibility ensure the old prj file is deleted get Workspace get Meta Area clear Old Description target return true  writeDescription internalWrite IProject IProjectDescription updateFlags hasPublicChanges hasPrivateChanges CoreException IPath locationFor locationUndefined getFullPath toString ResourceException IResourceStatus FAILED_WRITE_LOCAL getFullPath getStore writeFolder toFile hasPrivateChanges getWorkspace getMetaArea writePrivateDescription hasPublicChanges ByteArrayOutputStream ByteArrayOutputStream ModelObjectWriter IOException writeMeta getFullPath toString ResourceException IResourceStatus FAILED_WRITE_METADATA getFullPath newContents toByteArray IFile IFile descriptionFile getFile IProjectDescription DESCRIPTION_FILE_NAME descriptionFile createResource descriptionFile descriptionChanged descriptionFile newContents ByteArrayInputStream ByteArrayInputStream newContents descriptionFile isReadOnly IStatus getWorkspace validateEdit IFile descriptionFile ResourceException descriptionFile setContents updateFlags lastModified descriptionFile getResourceInfo getLocalSyncInfo ResourceInfo getResourceInfo updateLocalSync lastModified getWorkspace getMetaArea clearOldDescription
Returns true if the description on disk is different from the given byte array and false otherwise private boolean description Changed I File description File byte new Contents Input Stream stream null try stream new Buffered Input Stream description File get Contents int new Length new Contents length byte old Contents new byte new Length int read stream read old Contents if read new Length return true if the stream still has bytes available then the description is changed if stream read 0 return true return Arrays equals new Contents old Contents catch Exception e if we failed to compare just write the new contents finally try if stream null stream close catch IO Exception e1 ignore failure to close the file return true  descriptionChanged IFile descriptionFile newContents InputStream BufferedInputStream descriptionFile getContents newLength newContents oldContents newLength oldContents newLength newContents oldContents IOException
Returns true if the given project s description is synchronized with the project description file on disk and false otherwise public boolean is Description Synchronized I Project target sync info is stored on the description file and on project info when the file is changed by someone else the project info modification stamp will be out of date I File description File target get File I Project Description DESCRIPTION FILE NAME Resource Info project Info Resource target get Resource Info false false if project Info null return false return project Info get Local Sync Info Core File System Library get Last Modified description File get Location toOS String  isDescriptionSynchronized IProject IFile descriptionFile getFile IProjectDescription DESCRIPTION_FILE_NAME ResourceInfo projectInfo getResourceInfo projectInfo projectInfo getLocalSyncInfo CoreFileSystemLibrary getLastModified descriptionFile getLocation toOSString
public boolean is Synchronized I Resource target int depth switch target get Type case I Resource ROOT if depth I Resource DEPTH ZERO return true check sync on child projects depth depth I Resource DEPTH ONE I Resource DEPTH ZERO depth I Project projects I Workspace Root target get Projects for int i 0 i projects length i if is Synchronized projects i depth return false return true case I Resource PROJECT if target is Accessible return true break case I Resource FILE if fast Is Synchronized File target return true break Is Synchronized Visitor visitor new Is Synchronized Visitor Policy monitor For null Unified Tree tree new Unified Tree target try tree accept visitor depth catch Core Exception e Resources Plugin get Plugin get Log log e get Status return false catch Is Synchronized Visitor Resource Changed Exception e visitor throws an exception if out of sync return false return true  isSynchronized IResource getType IResource IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_ZERO IProject IWorkspaceRoot getProjects isSynchronized IResource isAccessible IResource fastIsSynchronized IsSynchronizedVisitor IsSynchronizedVisitor monitorFor UnifiedTree UnifiedTree CoreException ResourcesPlugin getPlugin getLog getStatus IsSynchronizedVisitor ResourceChangedException
public void link Resource target I Path local Location resource already exists when linking just need to update sync info long last Modified 0 a relative path means location is relative to an undefined variable if local Location is Absolute last Modified Core File System Library get Last Modified local Location to File get Absolute Path Resource Info info target get Resource Info false true update Local Sync info last Modified  IPath localLocation lastModified localLocation isAbsolute lastModified CoreFileSystemLibrary getLastModified localLocation toFile getAbsolutePath ResourceInfo getResourceInfo updateLocalSync lastModified
Returns the resolved absolute file system location of the given resource Returns null if the location could not be resolved public I Path location For I Resource target note this method is a critical performance path code may be inlined to prevent method calls switch target get Type case I Resource ROOT return Platform get Location case I Resource PROJECT Project project Project target Project Description description project internal Get Description if description null description get Location null I Path resolved workspace get Path Variable Manager resolve Path description get Location if path is still relative then path variable could not be resolved return resolved null resolved is Absolute resolved null return get Project Default Location project default check if the resource is a linked resource I Path target Path target get Full Path int num Segments target Path segment Count I Resource linked target if num Segments 2 parent could be a linked resource linked workspace get Root get Folder target Path remove Last Segments num Segments 2 description Project target get Project internal Get Description if linked is Linked I Path location description get Link Location linked get Name location may have been deleted from the project description between sessions if location null location workspace get Path Variable Manager resolve Path location if path is still relative then path variable could not be resolved if location is Absolute return null return location append target Path remove First Segments 2 not a linked resource get location of project if description null description get Location null I Path resolved workspace get Path Variable Manager resolve Path description get Location if path is still relative then path variable could not be resolved if resolved is Absolute return null return resolved append target get Project Relative Path return Platform get Location append target get Full Path  IPath locationFor IResource getType IResource getLocation IResource ProjectDescription internalGetDescription getLocation IPath getPathVariableManager resolvePath getLocation isAbsolute getProjectDefaultLocation IPath targetPath getFullPath numSegments targetPath segmentCount IResource numSegments getRoot getFolder targetPath removeLastSegments numSegments getProject internalGetDescription isLinked IPath getLinkLocation getName getPathVariableManager resolvePath isAbsolute targetPath removeFirstSegments getLocation IPath getPathVariableManager resolvePath getLocation isAbsolute getProjectRelativePath getLocation getFullPath
Returns a resource path to the given local location Returns null if it is not under a project s location protected I Path path For Location I Path location if Platform get Location equals location return Path ROOT I Project projects get Workspace get Root get Projects for int i 0 i projects length i I Project project projects i I Path project Location project get Location if project Location null project Location is Prefix Of location int segments To Remove project Location segment Count return project get Full Path append location remove First Segments segments To Remove return null  IPath pathForLocation IPath getLocation IProject getWorkspace getRoot getProjects IProject IPath projectLocation getLocation projectLocation projectLocation isPrefixOf segmentsToRemove projectLocation segmentCount getFullPath removeFirstSegments segmentsToRemove
Optimized sync check for files Returns true if the file exists and is in sync and false otherwise The intent is to let the default implementation handle the complex cases like gender change case variants etc public boolean fast Is Synchronized File target Resource Info info target get Resource Info false false if target exists target get Flags info true I Path location target get Location if location null long stat Core File System Library get Stat location to String if Core File System Library is File stat info get Local Sync Info Core File System Library get Last Modified stat return true return false  fastIsSynchronized ResourceInfo getResourceInfo getFlags IPath getLocation CoreFileSystemLibrary getStat toString CoreFileSystemLibrary isFile getLocalSyncInfo CoreFileSystemLibrary getLastModified
public Input Stream read I File target boolean force I Progress Monitor monitor throws Core Exception thread safety the location can be null if the project for this file does not exist I Path location location For target if location null Project target get Project check Exists NULL FLAG true location can be null if based on an undefined variable if location null String message Policy bind localstore location Undefined target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL target get Full Path message null java io File local File location to File if local File exists String message Policy bind localstore file Not Found local File get Absolute Path NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL target get Full Path message null if force Resource Info info Resource target get Resource Info true false int flags Resource target get Flags info Resource target check Exists flags true if Core File System Library get Last Modified local File get Absolute Path info get Local Sync Info String message Policy bind localstore resource Is Out Of Sync target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status OUT OF SYNC LOCAL target get Full Path message null return get Store read local File  InputStream IFile IProgressMonitor CoreException IPath locationFor getProject checkExists NULL_FLAG locationUndefined getFullPath toString ResourceException IResourceStatus FAILED_READ_LOCAL getFullPath localFile toFile localFile fileNotFound localFile getAbsolutePath ResourceException IResourceStatus FAILED_READ_LOCAL getFullPath ResourceInfo getResourceInfo getFlags checkExists CoreFileSystemLibrary getLastModified localFile getAbsolutePath getLocalSyncInfo resourceIsOutOfSync getFullPath toString ResourceException IResourceStatus OUT_OF_SYNC_LOCAL getFullPath getStore localFile
Reads and returns the project description for the given project Never returns null param target the project whose description should be read param creation true if this project is just being created in which case the private project information including the location needs to be read from disk as well exception Core Exception if there was any failure to read the project description or if the description was missing public Project Description read I Project target boolean creation throws Core Exception read the project location if this project is being created I Path project Location null Project Description private Description null if creation private Description new Project Description get Workspace get Meta Area read Private Description target private Description project Location private Description get Location else I Project Description description Project target internal Get Description if description null description get Location null project Location description get Location final boolean is Default Location project Location null if is Default Location project Location get Project Default Location target I Path description Path workspace get Path Variable Manager resolve Path project Location append I Project Description DESCRIPTION FILE NAME Project Description description null if description Path to File exists try the legacy location in the meta area description get Workspace get Meta Area read Old Description target if description null String msg Policy bind resources missing Project Meta target get Name NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA target get Full Path msg null return description hold onto any exceptions until after sync info is updated then throw it Resource Exception error null try description new Project Description Reader read description Path catch IO Exception e String msg Policy bind resources read Project Meta target get Name NON NLS 1 error new Resource Exception I Resource Status FAILED READ METADATA target get Full Path msg e if error null description null String msg Policy bind resources read Project Meta target get Name NON NLS 1 error new Resource Exception I Resource Status FAILED READ METADATA target get Full Path msg null if description null don t trust the project name in the description file description set Name target get Name if is Default Location description set Location project Location if creation private Description null description set Dynamic References private Description get Dynamic References false long last Modified Core File System Library get Last Modified description Path toOS String I File description File target get File I Project Description DESCRIPTION FILE NAME don t get a mutable copy because we might be in restore which isn t an operation it doesn t matter anyway because local sync info is not included in deltas Resource Info info Resource description File get Resource Info false false if info null create a new resource on the sly don t want to start an operation info get Workspace create Resource description File false update Local Sync info last Modified if the project description has changed between sessions let it remain out of sync that way link changes will be reconciled on next refresh if creation update Local Sync info last Modified update the timestamp on the project as well so we know when it has been changed from the outside info Resource target get Resource Info false true update Local Sync info last Modified if error null throw error return description  CoreException ProjectDescription IProject CoreException IPath projectLocation ProjectDescription privateDescription privateDescription ProjectDescription getWorkspace getMetaArea readPrivateDescription privateDescription projectLocation privateDescription getLocation IProjectDescription internalGetDescription getLocation projectLocation getLocation isDefaultLocation projectLocation isDefaultLocation projectLocation getProjectDefaultLocation IPath descriptionPath getPathVariableManager resolvePath projectLocation IProjectDescription DESCRIPTION_FILE_NAME ProjectDescription descriptionPath toFile getWorkspace getMetaArea readOldDescription missingProjectMeta getName ResourceException IResourceStatus FAILED_READ_METADATA getFullPath ResourceException ProjectDescriptionReader descriptionPath IOException readProjectMeta getName ResourceException IResourceStatus FAILED_READ_METADATA getFullPath readProjectMeta getName ResourceException IResourceStatus FAILED_READ_METADATA getFullPath setName getName isDefaultLocation setLocation projectLocation privateDescription setDynamicReferences privateDescription getDynamicReferences lastModified CoreFileSystemLibrary getLastModified descriptionPath toOSString IFile descriptionFile getFile IProjectDescription DESCRIPTION_FILE_NAME ResourceInfo descriptionFile getResourceInfo getWorkspace createResource descriptionFile updateLocalSync lastModified updateLocalSync lastModified getResourceInfo updateLocalSync lastModified
public boolean refresh I Resource target int depth boolean update Aliases I Progress Monitor monitor throws Core Exception switch target get Type case I Resource ROOT return refresh Root I Workspace Root target depth update Aliases monitor case I Resource PROJECT if target is Accessible return false fall through case I Resource FOLDER case I Resource FILE return refresh Resource target depth update Aliases monitor return false  IResource updateAliases IProgressMonitor CoreException getType IResource refreshRoot IWorkspaceRoot updateAliases IResource isAccessible IResource IResource refreshResource updateAliases
protected boolean refresh Resource I Resource target int depth boolean update Aliases I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor int total Work Refresh Local Visitor TOTAL WORK String title Policy bind localstore refreshing target get Full Path to String NON NLS 1 try monitor begin Task title total Work Refresh Local Visitor visitor update Aliases new Refresh Local Alias Visitor monitor new Refresh Local Visitor monitor Unified Tree tree new Unified Tree target tree accept visitor depth I Status result visitor get Error Status if result isOK throw new Resource Exception result return visitor resources Changed finally monitor done  refreshResource IResource updateAliases IProgressMonitor CoreException monitorFor totalWork RefreshLocalVisitor TOTAL_WORK getFullPath toString beginTask totalWork RefreshLocalVisitor updateAliases RefreshLocalAliasVisitor RefreshLocalVisitor UnifiedTree UnifiedTree IStatus getErrorStatus ResourceException resourcesChanged
Synchronizes the entire workspace with the local filesystem The current implementation does this by synchronizing each of the projects currently in the workspace A better implementation may be possible protected boolean refresh Root I Workspace Root target int depth boolean update Aliases I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor I Project projects target get Projects int total Work projects length String title Policy bind localstore refreshing Root NON NLS 1 try monitor begin Task title total Work if doing depth zero there is nothing to do can t refresh the root Note that we still need to do the begin Task done pair if depth I Resource DEPTH ZERO return false boolean changed false drop the depth by one level since processing the root counts as one level depth depth I Resource DEPTH ONE I Resource DEPTH ZERO depth for int i 0 i projects length i changed refresh projects i depth update Aliases Policy sub Monitor For monitor 1 return changed finally monitor done  refreshRoot IWorkspaceRoot updateAliases IProgressMonitor CoreException monitorFor IProject getProjects totalWork refreshingRoot beginTask totalWork beginTask IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_ZERO updateAliases subMonitorFor
Returns the resource corresponding to the given workspace path The files parameter is used for paths of two or more segments If true a file is returned otherwise a folder is returned Returns null if files is true and the path is not of sufficient length protected I Resource resource For I Path path boolean files int num Segments path segment Count if files num Segments I Core Constants MINIMUM FILE SEGMENT LENGTH return null I Workspace Root root get Workspace get Root if path is Root return root if num Segments 1 return root get Project path segment 0 return files I Resource root get File path I Resource root get Folder path  IResource resourceFor IPath numSegments segmentCount numSegments ICoreConstants MINIMUM_FILE_SEGMENT_LENGTH IWorkspaceRoot getWorkspace getRoot isRoot numSegments getProject IResource getFile IResource getFolder
public long set Local Time Stamp I Resource target Resource Info info long value throws Core Exception I Path location target get Location if location null String message Policy bind localstore location Undefined target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE LOCAL target get Full Path message null java io File local File location to File local File set Last Modified value long actual Value Core File System Library get Last Modified local File get Absolute Path update Local Sync info actual Value return actual Value  setLocalTimeStamp IResource ResourceInfo CoreException IPath getLocation locationUndefined getFullPath toString ResourceException IResourceStatus FAILED_WRITE_LOCAL getFullPath localFile toFile localFile setLastModified actualValue CoreFileSystemLibrary getLastModified localFile getAbsolutePath updateLocalSync actualValue actualValue
public void shutdown I Progress Monitor monitor throws Core Exception history Store shutdown monitor  IProgressMonitor CoreException historyStore
public void startup I Progress Monitor monitor throws Core Exception I Path location get Workspace get Meta Area get History Store Location location to File mkdirs history Store new History Store get Workspace location 256 history Store startup monitor  IProgressMonitor CoreException IPath getWorkspace getMetaArea getHistoryStoreLocation toFile historyStore HistoryStore getWorkspace historyStore
The Resource Info must be mutable public void update Local Sync Resource Info info long local Sync Info info set Local Sync Info local Sync Info if local Sync Info I NULL SYNC INFO info clear M LOCAL EXISTS else info set M LOCAL EXISTS  ResourceInfo updateLocalSync ResourceInfo localSyncInfo setLocalSyncInfo localSyncInfo localSyncInfo I_NULL_SYNC_INFO M_LOCAL_EXISTS M_LOCAL_EXISTS
The target must exist in the workspace The content Input Stream is closed even if the method fails If the force flag is false we only write the file if it does not exist or if it is already local and the timestamp has NOT changed since last synchronization otherwise a Core Exception is thrown public void write I File target I Path location Input Stream content boolean force boolean keep History boolean append I Progress Monitor monitor throws Core Exception monitor Policy monitor For null try location can be null if based on an undefined variable if location null String message Policy bind localstore location Undefined target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE LOCAL target get Full Path message null final String location String location toOS String long stat Core File System Library get Stat location String if Core File System Library is Read Only stat String message Policy bind localstore could Not Write Read Only target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE LOCAL target get Full Path message null long last Modified Core File System Library get Last Modified stat final java io File local File new java io File location String if force if append target is Local I Resource DEPTH ZERO local File exists force true local false exists In File System false String message Policy bind resources must Be Local target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status RESOURCE NOT LOCAL target get Full Path message null else if target is Local I Resource DEPTH ZERO test if timestamp is the same since last synchronization Resource Info info Resource target get Resource Info true false if last Modified info get Local Sync Info String message Policy bind localstore resource Is Out Of Sync target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status OUT OF SYNC LOCAL target get Full Path message null else if local File exists String message Policy bind localstore resource Exists target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status EXISTS LOCAL target get Full Path message null if append String message Policy bind resources must Be Local target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status RESOURCE NOT LOCAL target get Full Path message null add entry to History Store Universal Unique Identifier uuid null uuid to locate the file on history if keep History local File exists never move to the history store because then the file is missing if write fails uuid history Store add State target get Full Path location last Modified false get Store write local File content append monitor get the new last modified time and stash in the info last Modified Core File System Library get Last Modified location String Resource Info info Resource target get Resource Info false true update Local Sync info last Modified if uuid null Core File System Library copy Attributes history Store get File For uuid get Absolute Path location String false finally try content close catch IO Exception e ignore  InputStream CoreException IFile IPath InputStream keepHistory IProgressMonitor CoreException monitorFor locationUndefined getFullPath toString ResourceException IResourceStatus FAILED_WRITE_LOCAL getFullPath locationString toOSString CoreFileSystemLibrary getStat locationString CoreFileSystemLibrary isReadOnly couldNotWriteReadOnly getFullPath toString ResourceException IResourceStatus FAILED_WRITE_LOCAL getFullPath lastModified CoreFileSystemLibrary getLastModified localFile locationString isLocal IResource DEPTH_ZERO localFile existsInFileSystem mustBeLocal getFullPath toString ResourceException IResourceStatus RESOURCE_NOT_LOCAL getFullPath isLocal IResource DEPTH_ZERO ResourceInfo getResourceInfo lastModified getLocalSyncInfo resourceIsOutOfSync getFullPath toString ResourceException IResourceStatus OUT_OF_SYNC_LOCAL getFullPath localFile resourceExists getFullPath toString ResourceException IResourceStatus EXISTS_LOCAL getFullPath mustBeLocal getFullPath toString ResourceException IResourceStatus RESOURCE_NOT_LOCAL getFullPath UniversalUniqueIdentifier keepHistory localFile historyStore addState getFullPath lastModified getStore localFile lastModified CoreFileSystemLibrary getLastModified locationString ResourceInfo getResourceInfo updateLocalSync lastModified CoreFileSystemLibrary copyAttributes historyStore getFileFor getAbsolutePath locationString IOException
If force is false this method fails if there is already a resource in target s location public void write I Folder target boolean force I Progress Monitor monitor throws Core Exception I Path location location For target location can be null if based on an undefined variable if location null String message Policy bind localstore location Undefined target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE LOCAL target get Full Path message null java io File file location to File if force if file is Directory String message Policy bind localstore resource Exists target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status EXISTS LOCAL target get Full Path message null if file exists String message Policy bind localstore file Exists target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status OUT OF SYNC LOCAL target get Full Path message null get Store write Folder file long last Modified Core File System Library get Last Modified file get Absolute Path Resource Info info Resource target get Resource Info false true update Local Sync info last Modified  IFolder IProgressMonitor CoreException IPath locationFor locationUndefined getFullPath toString ResourceException IResourceStatus FAILED_WRITE_LOCAL getFullPath toFile isDirectory resourceExists getFullPath toString ResourceException IResourceStatus EXISTS_LOCAL getFullPath fileExists getFullPath toString ResourceException IResourceStatus OUT_OF_SYNC_LOCAL getFullPath getStore writeFolder lastModified CoreFileSystemLibrary getLastModified getAbsolutePath ResourceInfo getResourceInfo updateLocalSync lastModified
Write the project file without modifying the resource tree This is called during save when it is discovered that the project file is missing The tree cannot be modified during save public void write Silently I Project target throws Core Exception I Path location location For target if the project location cannot be resolved we don t know if a description file exists or not if location null return get Store write Folder location to File can t do anything if there s no description I Project Description desc Project target internal Get Description if desc null return write the project s private description to the meta data area get Workspace get Meta Area write Private Description target write the file that represents the project description java io File file location append I Project Description DESCRIPTION FILE NAME to File File Output Stream fout null try fout new File Output Stream file new Model Object Writer write desc fout catch IO Exception e String msg Policy bind resources write Meta target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE METADATA target get Full Path msg e finally if fout null try fout close catch IO Exception e ignore failure to close stream for backwards compatibility ensure the old prj file is deleted get Workspace get Meta Area clear Old Description target  writeSilently IProject CoreException IPath locationFor getStore writeFolder toFile IProjectDescription internalGetDescription getWorkspace getMetaArea writePrivateDescription IProjectDescription DESCRIPTION_FILE_NAME toFile FileOutputStream FileOutputStream ModelObjectWriter IOException writeMeta getFullPath toString ResourceException IResourceStatus FAILED_WRITE_METADATA getFullPath IOException getWorkspace getMetaArea clearOldDescription
Returns the real name of the resource on disk Returns null if no local file exists by that name This is useful when dealing with case insensitive file systems public String get Local Name java io File target java io File root target get Parent File String list root list if list null return null String target Name target get Name for int i 0 i list length i if target Name equals Ignore Case list i return list i return null  getLocalName getParentFile targetName getName targetName equalsIgnoreCase

private final byte buffer new byte 8192 public File System Store super  FileSystemStore
public void copy File source File destination int depth I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try monitor begin Task Policy bind localstore copying source get Absolute Path 1 NON NLS 1 Policy check Canceled monitor if source is Directory copy Directory source destination depth Policy sub Monitor For monitor 1 else copy File source destination Policy sub Monitor For monitor 1 finally monitor done  IProgressMonitor CoreException monitorFor beginTask getAbsolutePath checkCanceled isDirectory copyDirectory subMonitorFor copyFile subMonitorFor
protected void copy Directory File source File destination int depth I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String children source list if children null children new String 0 monitor begin Task Policy bind localstore copying source get Absolute Path children length NON NLS 1 create directory write Folder destination depth if depth I Resource DEPTH ZERO return if depth I Resource DEPTH ONE depth I Resource DEPTH ZERO copy children for int i 0 i children length i copy new File source children i new File destination children i depth Policy sub Monitor For monitor 1 finally monitor done  copyDirectory IProgressMonitor CoreException monitorFor beginTask getAbsolutePath writeFolder IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_ZERO subMonitorFor
protected void copy File File target File destination I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try int total Work 1 int target length 8192 monitor begin Task Policy bind localstore copying target get Absolute Path total Work NON NLS 1 try write destination read target false monitor catch Core Exception e if we failed to write try to cleanup the half written file if destination is Directory destination delete throw e update the destination timestamp on disk long stat Core File System Library get Stat target get Absolute Path long last Modified Core File System Library get Last Modified stat destination set Last Modified last Modified update file attributes Core File System Library copy Attributes target get Absolute Path destination get Absolute Path false finally monitor done  copyFile IProgressMonitor CoreException monitorFor totalWork beginTask getAbsolutePath totalWork CoreException isDirectory CoreFileSystemLibrary getStat getAbsolutePath lastModified CoreFileSystemLibrary getLastModified setLastModified lastModified CoreFileSystemLibrary copyAttributes getAbsolutePath getAbsolutePath
Returns an output stream on the given file The user of the returned stream is responsible for closing the stream when finished protected Output Stream create Stream File target boolean append throws Core Exception String path target get Absolute Path try return new File Output Stream path append catch File Not Found Exception e String message int code I Resource Status FAILED WRITE LOCAL Check to see if the parent is a read only folder and if so then throw an exception with a more specific message and error code String parent target get Parent if parent null Core File System Library is Read Only parent message Policy bind localstore read Only Parent path NON NLS 1 code I Resource Status PARENT READ ONLY else if target is Directory message Policy bind localstore notA File path NON NLS 1 else message Policy bind localstore could Not Write path NON NLS 1 throw new Resource Exception code new Path path message e  OutputStream createStream CoreException getAbsolutePath FileOutputStream FileNotFoundException IResourceStatus FAILED_WRITE_LOCAL getParent CoreFileSystemLibrary isReadOnly readOnlyParent IResourceStatus PARENT_READ_ONLY isDirectory notAFile couldNotWrite ResourceException
public void delete File target throws Core Exception if Workspace clear target String message Policy bind localstore couldnot Delete target get Absolute Path NON NLS 1 throw new Resource Exception I Resource Status FAILED DELETE LOCAL new Path target get Absolute Path message null  CoreException couldnotDelete getAbsolutePath ResourceException IResourceStatus FAILED_DELETE_LOCAL getAbsolutePath
Deletes the given file recursively adding failure info to the provided status object public boolean delete File root Multi Status status return delete root root get Absolute Path status  MultiStatus getAbsolutePath
Deletes the given file recursively adding failure info to the provided status object The file Path is passed as a parameter to optimize java io File object creation protected boolean delete File root String file Path Multi Status status boolean failed Recursive false if root is Directory String list root list if list null int parent Length file Path length for int i 0 imax list length i imax i optimized creation of child path object String Buffer child Buffer new String Buffer parent Length list i length 1 child Buffer append file Path child Buffer append File separator Char child Buffer append list i String child Name child Buffer to String try best effort on all children so put logical OR at end failed Recursive delete new java io File child Name child Name status failed Recursive boolean failed This false try don t try to delete the root if one of the children failed if failed Recursive root exists failed This root delete catch Exception e we caught a runtime exception so log it String message Policy bind localstore couldnot Delete root get Absolute Path NON NLS 1 status add new Resource Status I Resource Status FAILED DELETE LOCAL new Path root get Absolute Path message e return false if failed This String message null if Core File System Library is Read Only root get Absolute Path message Policy bind localstore couldnot Delete Read Only root get Absolute Path NON NLS 1 else message Policy bind localstore couldnot Delete root get Absolute Path NON NLS 1 status add new Resource Status I Resource Status FAILED DELETE LOCAL new Path root get Absolute Path message null return failed Recursive failed This  filePath filePath MultiStatus failedRecursive isDirectory parentLength filePath StringBuffer childBuffer StringBuffer parentLength childBuffer filePath childBuffer separatorChar childBuffer childName childBuffer toString failedRecursive childName childName failedRecursive failedThis failedRecursive failedThis couldnotDelete getAbsolutePath ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getAbsolutePath failedThis CoreFileSystemLibrary isReadOnly getAbsolutePath couldnotDeleteReadOnly getAbsolutePath couldnotDelete getAbsolutePath ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getAbsolutePath failedRecursive failedThis
deprecated public int get Encoding File target throws Core Exception Input Stream input null try input read target int first input read 0xFF converts unsigned byte to int int second input read 0xFF if first 1 second 1 return I File ENCODING UNKNOWN look for the UTF 16 Byte Order Mark BOM if first 0xFE second 0xFF return I File ENCODING UTF 16BE if first 0xFF second 0xFE return I File ENCODING UTF 16LE int third input read 0xFF if third 1 return I File ENCODING UNKNOWN look for the UTF 8 BOM if first 0xEF second 0xBB third 0xBF return I File ENCODING UTF 8 return I File ENCODING UNKNOWN catch IO Exception e String message Policy bind localstore could Not Read target get Absolute Path NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL new Path target get Absolute Path message e finally if input null try input close catch IO Exception e ignore exceptions on close  getEncoding CoreException InputStream IFile ENCODING_UNKNOWN IFile ENCODING_UTF_16BE IFile ENCODING_UTF_16LE IFile ENCODING_UNKNOWN IFile ENCODING_UTF_8 IFile ENCODING_UNKNOWN IOException couldNotRead getAbsolutePath ResourceException IResourceStatus FAILED_READ_LOCAL getAbsolutePath IOException
public void move File source File destination boolean force I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try monitor begin Task Policy bind localstore moving source get Absolute Path 2 NON NLS 1 this flag captures case renaming on a case insensitive OS or moving two equivalent files in an environment that supports symbolic links in these cases we NEVER want to delete anything boolean source Equals Dest false try source Equals Dest source get Canonical File equals destination get Canonical File catch IO Exception e String message Policy bind localstore could Not Move source get Absolute Path NON NLS 1 throw new Resource Exception new Resource Status I Resource Status FAILED WRITE LOCAL new Path source get Absolute Path message e if source Equals Dest force destination exists String message Policy bind localstore resource Exists destination get Absolute Path NON NLS 1 throw new Resource Exception I Resource Status EXISTS LOCAL new Path destination get Absolute Path message null if source rename To destination double check to ensure we really did move since java io File rename To sometimes lies if source Equals Dest source exists XXX document when this occurs if destination exists couldn t delete the source so remove the destination and throw an error XXX if we fail deleting the destination the destination root may still exist Workspace clear destination String message Policy bind localstore couldnot Delete source get Absolute Path NON NLS 1 throw new Resource Exception new Resource Status I Resource Status FAILED DELETE LOCAL new Path source get Absolute Path message null else source exists but destination doesn t so try to copy below else if destination exists success case return else neither the source nor the destination exist this is REALLY bad String message Policy bind localstore failed Move source get Absolute Path destination get Absolute Path NON NLS 1 throw new Resource Exception new Resource Status I Resource Status FAILED WRITE LOCAL new Path source get Absolute Path message null for some reason we couldn t move workaround copy and delete the source but if just case renaming on a case insensitive FS there is no workaround if source Equals Dest String message Policy bind localstore could Not Move source get Absolute Path NON NLS 1 throw new Resource Exception new Resource Status I Resource Status FAILED WRITE LOCAL new Path source get Absolute Path message null boolean success false boolean canceled false try copy source destination I Resource DEPTH INFINITE Policy sub Monitor For monitor 1 success true catch Operation Canceled Exception e canceled true throw e finally if success fail if source cannot be successfully deleted String message Policy bind localstore delete Problem During Move NON NLS 1 Multi Status result new Multi Status Resources Plugin PI RESOURCES I Resource Status FAILED DELETE LOCAL message null if delete source result throw new Resource Exception result else if canceled We do not want to delete the destination in case of failure It might the case where we already had contents in the destination so we would be deleting resources we don t know about and the user might lose data String message Policy bind localstore could Not Move source get Absolute Path NON NLS 1 throw new Resource Exception new Resource Status I Resource Status FAILED WRITE LOCAL new Path source get Absolute Path message null monitor worked 1 finally monitor done  IProgressMonitor CoreException monitorFor beginTask getAbsolutePath sourceEqualsDest sourceEqualsDest getCanonicalFile getCanonicalFile IOException couldNotMove getAbsolutePath ResourceException ResourceStatus IResourceStatus FAILED_WRITE_LOCAL getAbsolutePath sourceEqualsDest resourceExists getAbsolutePath ResourceException IResourceStatus EXISTS_LOCAL getAbsolutePath renameTo renameTo sourceEqualsDest couldnotDelete getAbsolutePath ResourceException ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getAbsolutePath failedMove getAbsolutePath getAbsolutePath ResourceException ResourceStatus IResourceStatus FAILED_WRITE_LOCAL getAbsolutePath sourceEqualsDest couldNotMove getAbsolutePath ResourceException ResourceStatus IResourceStatus FAILED_WRITE_LOCAL getAbsolutePath IResource DEPTH_INFINITE subMonitorFor OperationCanceledException deleteProblemDuringMove MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus FAILED_DELETE_LOCAL ResourceException couldNotMove getAbsolutePath ResourceException ResourceStatus IResourceStatus FAILED_WRITE_LOCAL getAbsolutePath
Returns an input stream containing the contents of the given file as maintained by this store The user of the returned stream is responsible for closing the stream when finished exception Core Exception if the content of the resource cannot be accessed public Input Stream read File target throws Core Exception try return new File Input Stream target catch File Not Found Exception e String message if target exists message Policy bind localstore file Not Found target get Absolute Path NON NLS 1 else if target is Directory message Policy bind localstore notA File target get Absolute Path NON NLS 1 else message Policy bind localstore could Not Read target get Absolute Path NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL new Path target get Absolute Path message e  CoreException InputStream CoreException FileInputStream FileNotFoundException fileNotFound getAbsolutePath isDirectory notAFile getAbsolutePath couldNotRead getAbsolutePath ResourceException IResourceStatus FAILED_READ_LOCAL getAbsolutePath
Transfers all available bytes from the given input stream to the given output stream Regardless of failure this method closes both streams param path The path of the object being copied may be null public void transfer Streams Input Stream source Output Stream destination String path I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try Note although synchronizing on the buffer is thread safe it may result in slower performance in the future if we want to allow concurrent writes synchronized buffer while true int bytes Read 1 try bytes Read source read buffer catch IO Exception e String msg Policy bind localstore failed Read During Write new String path NON NLS 1 I Path p path null null new Path path throw new Resource Exception I Resource Status FAILED READ LOCAL p msg e if bytes Read 1 break try destination write buffer 0 bytes Read catch IO Exception e String msg Policy bind localstore could Not Write new String path NON NLS 1 I Path p path null null new Path path throw new Resource Exception I Resource Status FAILED WRITE LOCAL p msg e monitor worked 1 finally try source close catch IO Exception e ignore finally close destination in finally in case source close fails try destination close catch IO Exception e ignore  transferStreams InputStream OutputStream IProgressMonitor CoreException monitorFor bytesRead bytesRead IOException failedReadDuringWrite IPath ResourceException IResourceStatus FAILED_READ_LOCAL bytesRead bytesRead IOException couldNotWrite IPath ResourceException IResourceStatus FAILED_WRITE_LOCAL IOException IOException
Content cannot be null and it is closed even if the operation is not completed successfully It is assumed that the caller has ensured the destination is not read only public void write File target Input Stream content boolean append I Progress Monitor monitor throws Core Exception try String path target get Absolute Path write Folder target get Parent File transfer Streams content create Stream target append path monitor finally try content close catch IO Exception e ignore  InputStream IProgressMonitor CoreException getAbsolutePath writeFolder getParentFile transferStreams createStream IOException
public void write Folder File target throws Core Exception if target exists target mkdirs if target is Directory String path target get Absolute Path int code I Resource Status FAILED WRITE LOCAL String message Policy bind localstore could Not Create Folder path NON NLS 1 Check to see if the parent is a read only folder and if so then throw an exception with a more specific message and error code String parent target get Parent if parent null Core File System Library is Read Only parent message Policy bind localstore read Only Parent path NON NLS 1 code I Resource Status PARENT READ ONLY throw new Resource Exception code new Path path message null  writeFolder CoreException isDirectory getAbsolutePath IResourceStatus FAILED_WRITE_LOCAL couldNotCreateFolder getParent CoreFileSystemLibrary isReadOnly readOnlyParent IResourceStatus PARENT_READ_ONLY ResourceException

public History Store Workspace workspace I Path location int limit this workspace workspace this blob Store new Blob Store location limit this store new Indexed Store Wrapper location append INDEX FILE  HistoryStore IPath blobStore BlobStore IndexedStoreWrapper INDEX_FILE
Searches indexed store for key and invokes visitor s defined behaviour on key matches param key key prefix on which to perform search This is assumed to be a path only unless the flag include Last Mod Time is true param visit On Partial Match indicates whether visitor s definined behavior is to be invoked on partial or full key matches Partial key matches are not supported on keys which contain a last modified time param include Last Mod Time indicates if the key includes a last modified time If set to false the key is assumed to have only a path protected void accept byte key I History Store Visitor visitor boolean visit On Partial Match boolean include Last Mod Time try Index Cursor cursor store get Cursor cursor find key Check for a prefix match while cursor key Matches key byte stored Key cursor get Key int bytes To Omit include Last Mod Time I Local Store Constants SIZE COUNTER I Local Store Constants SIZE KEY SUFFIX visit if we have an exact match if stored Key length bytes To Omit key length History Store Entry stored Entry History Store Entry create store cursor if visitor visit stored Entry break cursor next continue return if we aren t checking partial matches if visit On Partial Match cursor next continue if the last character of the key is a path separator or if the next character in the match is a path separater then visit since it is a child based on path segment matching byte b stored Key key length if key key length 1 47 b 47 History Store Entry stored Entry History Store Entry create store cursor if visitor visit stored Entry break cursor next cursor close catch Exception e String message Policy bind history problems Accessing NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED READ LOCAL null message e Resources Plugin get Plugin get Log log status  includeLastModTime visitOnPartialMatch includeLastModTime IHistoryStoreVisitor visitOnPartialMatch includeLastModTime IndexCursor getCursor keyMatches storedKey getKey bytesToOmit includeLastModTime ILocalStoreConstants SIZE_COUNTER ILocalStoreConstants SIZE_KEY_SUFFIX storedKey bytesToOmit HistoryStoreEntry storedEntry HistoryStoreEntry storedEntry visitOnPartialMatch storedKey HistoryStoreEntry storedEntry HistoryStoreEntry storedEntry problemsAccessing ResourceStatus ResourceStatus IResourceStatus FAILED_READ_LOCAL ResourcesPlugin getPlugin getLog
protected void accept I Path path I History Store Visitor visitor boolean visit On Partial Match accept Convert toUTF8 path to String visitor visit On Partial Match false  IPath IHistoryStoreVisitor visitOnPartialMatch toString visitOnPartialMatch
Bit Set bits new Bit Set public boolean visit History Store Entry entry bits set entry get Count return true  BitSet BitSet HistoryStoreEntry getCount
public byte use Next Clear Bit byte key Don t use an empty slot as this will put this state out of order relative to the other states with the same path and last modified time So find the first clear bit after the last set bit int next Bit bits length This value must fit in a byte If we are running off the end of the byte check to see if there are any empty bits in the middle If so reorganize the counters so we maintain the ordering of the states but use up the least number of bits i e de fragment the bitset if next Bit Byte MAX VALUE if bits cardinality Byte MAX VALUE We know we have some clear bits try Index Cursor cursor store get Cursor dest Count will always be the count value of the next key we want to assign a state to byte dest Count byte bits next Clear Bit 0 if dest Count 0 There are no clear bits return byte 1 source Count will always be the count value of the next key we want to move to dest Count When source Count is 1 there are no more source states to move so we are done byte source Count byte bits next Set Bit dest Count if source Count 0 There are no more states to move return dest Count byte complete Key new byte key length 1 System arraycopy key 0 complete Key 0 key length for source Count 0 dest Count 0 dest Count complete Key complete Key length 1 source Count cursor find complete Key if cursor key Matches complete Key History Store Entry stored Entry History Store Entry create store cursor History Store Entry entry To Insert new History Store Entry stored Entry get Path stored Entry getUUID stored Entry get Last Modified dest Count remove stored Entry ObjectID valueID store create Object entry To Insert value To Bytes store get Index insert entry To Insert get Key valueID source Count byte bits next Set Bit source Count 1 cursor close return dest Count catch Exception e String message Policy bind history problems Accessing NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED READ LOCAL null message e Resources Plugin get Plugin get Log log status else Every count is being used Too many states return byte 1 return byte next Bit  useNextClearBit nextBit nextBit MAX_VALUE MAX_VALUE IndexCursor getCursor destCount destCount nextClearBit destCount sourceCount destCount sourceCount sourceCount nextSetBit destCount sourceCount destCount completeKey completeKey sourceCount destCount destCount completeKey completeKey sourceCount completeKey keyMatches completeKey HistoryStoreEntry storedEntry HistoryStoreEntry HistoryStoreEntry entryToInsert HistoryStoreEntry storedEntry getPath storedEntry storedEntry getLastModified destCount storedEntry createObject entryToInsert valueToBytes getIndex entryToInsert getKey sourceCount nextSetBit sourceCount destCount problemsAccessing ResourceStatus ResourceStatus IResourceStatus FAILED_READ_LOCAL ResourcesPlugin getPlugin getLog nextBit
Adds state into history log param path Full workspace path to the resource being logged param uuid UUID for stored file contents param last Modified Timestamp for resource being logged protected void add State I Path path Universal Unique Identifier uuid long last Modified Determine how many states already exist for this path and timestamp class Bit Visitor implements I History Store Visitor Bit Set bits new Bit Set public boolean visit History Store Entry entry bits set entry get Count return true public byte use Next Clear Bit byte key Don t use an empty slot as this will put this state out of order relative to the other states with the same path and last modified time So find the first clear bit after the last set bit int next Bit bits length This value must fit in a byte If we are running off the end of the byte check to see if there are any empty bits in the middle If so reorganize the counters so we maintain the ordering of the states but use up the least number of bits i e de fragment the bitset if next Bit Byte MAX VALUE if bits cardinality Byte MAX VALUE We know we have some clear bits try Index Cursor cursor store get Cursor dest Count will always be the count value of the next key we want to assign a state to byte dest Count byte bits next Clear Bit 0 if dest Count 0 There are no clear bits return byte 1 source Count will always be the count value of the next key we want to move to dest Count When source Count is 1 there are no more source states to move so we are done byte source Count byte bits next Set Bit dest Count if source Count 0 There are no more states to move return dest Count byte complete Key new byte key length 1 System arraycopy key 0 complete Key 0 key length for source Count 0 dest Count 0 dest Count complete Key complete Key length 1 source Count cursor find complete Key if cursor key Matches complete Key History Store Entry stored Entry History Store Entry create store cursor History Store Entry entry To Insert new History Store Entry stored Entry get Path stored Entry getUUID stored Entry get Last Modified dest Count remove stored Entry ObjectID valueID store create Object entry To Insert value To Bytes store get Index insert entry To Insert get Key valueID source Count byte bits next Set Bit source Count 1 cursor close return dest Count catch Exception e String message Policy bind history problems Accessing NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED READ LOCAL null message e Resources Plugin get Plugin get Log log status else Every count is being used Too many states return byte 1 return byte next Bit Build partial key for which matches will be found byte key Prefix History Store Entry key Prefix To Bytes path last Modified Bit Visitor visitor new Bit Visitor accept key Prefix visitor false true byte index visitor use Next Clear Bit key Prefix try if index 0 String message Policy bind history too Many Sim Updates path to String new Date last Modified to String NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED WRITE LOCAL path message null Resources Plugin get Plugin get Log log status return History Store Entry entry To Insert new History Store Entry path uuid last Modified index value To Bytes just converts the uuid to byte form ObjectID valueID store create Object entry To Insert value To Bytes store get Index insert entry To Insert get Key valueID catch Exception e reset Indexed Store String message Policy bind history could Not Add path to String NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED WRITE LOCAL path message e Resources Plugin get Plugin get Log log status  lastModified addState IPath UniversalUniqueIdentifier lastModified BitVisitor IHistoryStoreVisitor BitSet BitSet HistoryStoreEntry getCount useNextClearBit nextBit nextBit MAX_VALUE MAX_VALUE IndexCursor getCursor destCount destCount nextClearBit destCount sourceCount destCount sourceCount sourceCount nextSetBit destCount sourceCount destCount completeKey completeKey sourceCount destCount destCount completeKey completeKey sourceCount completeKey keyMatches completeKey HistoryStoreEntry storedEntry HistoryStoreEntry HistoryStoreEntry entryToInsert HistoryStoreEntry storedEntry getPath storedEntry storedEntry getLastModified destCount storedEntry createObject entryToInsert valueToBytes getIndex entryToInsert getKey sourceCount nextSetBit sourceCount destCount problemsAccessing ResourceStatus ResourceStatus IResourceStatus FAILED_READ_LOCAL ResourcesPlugin getPlugin getLog nextBit keyPrefix HistoryStoreEntry keyPrefixToBytes lastModified BitVisitor BitVisitor keyPrefix useNextClearBit keyPrefix tooManySimUpdates toString lastModified toString ResourceStatus ResourceStatus IResourceStatus FAILED_WRITE_LOCAL ResourcesPlugin getPlugin getLog HistoryStoreEntry entryToInsert HistoryStoreEntry lastModified valueToBytes createObject entryToInsert valueToBytes getIndex entryToInsert getKey resetIndexedStore couldNotAdd toString ResourceStatus ResourceStatus IResourceStatus FAILED_WRITE_LOCAL ResourcesPlugin getPlugin getLog
Add an entry to the history store for the specified resource Return the UUID of the blob if it was successfully added and code null code otherwise param key Full workspace path to resource being logged param local File Local file system file handle param last Modified Timestamp for resource return the uuid of the blob or code null code otherwise public Universal Unique Identifier add State I Path key java io File local File long last Modified boolean move Contents if Policy DEBUG HISTORY System out println History Adding state for key key file local File timestamp last Modified size local File length NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 if is Valid local File return null Universal Unique Identifier uuid null try uuid blob Store add Blob local File move Contents add State key uuid last Modified store commit catch Core Exception e Resources Plugin get Plugin get Log log e get Status return uuid  localFile lastModified UniversalUniqueIdentifier addState IPath localFile lastModified moveContents DEBUG_HISTORY localFile lastModified localFile isValid localFile UniversalUniqueIdentifier blobStore addBlob localFile moveContents addState lastModified CoreException ResourcesPlugin getPlugin getLog getStatus
Add an entry to the history store for the specified resource param key Full workspace path to resource being logged param local Location Local file system path to resource param last Modified Timestamp for resource return true if state added to history store and false otherwise public Universal Unique Identifier add State I Path key I Path local Location long last Modified boolean move Contents return add State key local Location to File last Modified move Contents  localLocation lastModified UniversalUniqueIdentifier addState IPath IPath localLocation lastModified moveContents addState localLocation toFile lastModified moveContents
Clean this store applying the current policies public void clean long start System current Time Millis int entry Count 0 I Workspace Description description workspace internal Get Description long minimum Timestamp System current Time Millis description get File State Longevity int max description get Max File States I Path current null List result new Array List Math min max 1000 try Index Cursor cursor store get Cursor cursor find First Entry while cursor is Set entry Count History Store Entry entry History Store Entry create store cursor is it old if entry get Last Modified minimum Timestamp remove entry continue if entry get Path equals current remove Oldest Entries result max result clear current entry get Path result add entry cursor next remove Oldest Entries result max cursor close store commit if Policy DEBUG HISTORY Policy debug Time to apply history store policies System current Time Millis start ms NON NLS 1 NON NLS 2 Policy debug Total number of history store entries entry Count NON NLS 1 start System current Time Millis remove unreferenced blobs blob Store delete Blobs blobs To Remove if Policy DEBUG HISTORY Policy debug Time to remove blobs To Remove size unreferenced blobs System current Time Millis start ms NON NLS 1 NON NLS 2 NON NLS 3 blobs To Remove new Hash Set catch Exception e String message Policy bind history problems Cleaning NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED DELETE LOCAL null message e Resources Plugin get Plugin get Log log status  currentTimeMillis entryCount IWorkspaceDescription internalGetDescription minimumTimestamp currentTimeMillis getFileStateLongevity getMaxFileStates IPath ArrayList IndexCursor getCursor findFirstEntry isSet entryCount HistoryStoreEntry HistoryStoreEntry getLastModified minimumTimestamp getPath removeOldestEntries getPath removeOldestEntries DEBUG_HISTORY currentTimeMillis entryCount currentTimeMillis blobStore deleteBlobs blobsToRemove DEBUG_HISTORY blobsToRemove currentTimeMillis blobsToRemove HashSet problemsCleaning ResourceStatus ResourceStatus IResourceStatus FAILED_DELETE_LOCAL ResourcesPlugin getPlugin getLog
I History Store Visitor visitor new I History Store Visitor public boolean visit History Store Entry entry if rc 0 uuid equals entry getUUID rc 0 true return false return true  IHistoryStoreVisitor IHistoryStoreVisitor HistoryStoreEntry
boolean state Already Exists I Path path final Universal Unique Identifier uuid final boolean rc new boolean false I History Store Visitor visitor new I History Store Visitor public boolean visit History Store Entry entry if rc 0 uuid equals entry getUUID rc 0 true return false return true accept path visitor false return rc 0  stateAlreadyExists IPath UniversalUniqueIdentifier IHistoryStoreVisitor IHistoryStoreVisitor HistoryStoreEntry
I History Store Visitor visitor new I History Store Visitor public boolean visit History Store Entry entry I Path path entry get Path int prefix Segments source matching First Segments path if there are no matching segments then we have an internal error something is wrong with the visitor if prefix Segments 0 String message Policy bind history interal Path Errors source to String path to String NON NLS 1 Resource Status status new Resource Status I Resource Status INTERNAL ERROR source message null Resources Plugin get Plugin get Log log status return false path destination append path remove First Segments prefix Segments if state Already Exists path entry getUUID matches add path add State path entry getUUID entry get Last Modified return true  IHistoryStoreVisitor IHistoryStoreVisitor HistoryStoreEntry IPath getPath prefixSegments matchingFirstSegments prefixSegments interalPathErrors toString toString ResourceStatus ResourceStatus IResourceStatus INTERNAL_ERROR ResourcesPlugin getPlugin getLog removeFirstSegments prefixSegments stateAlreadyExists addState getLastModified
Copies the history store information from the source path given destination path Note that destination may already have some history store information Also note that this is a DEPTH INFINITY operation That is history will be copied for partial matches of the source path param source the path containing the original copy of the history store information param destination the target path for the copy since 2 1 public void copy History final I Path source final I Path destination Note that if any states in the local history for destination have the same timestamp as a state for the local history for source the local history for destination will appear as an older state than the one for source return early if either of the paths are null or if the source and destination are the same if source null destination null String message Policy bind history copy To Null NON NLS 1 Resource Status status new Resource Status I Resource Status INTERNAL ERROR source message null Resources Plugin get Plugin get Log log status return if source equals destination String message Policy bind history copy To Self NON NLS 1 Resource Status status new Resource Status I Resource Status INTERNAL ERROR source message null Resources Plugin get Plugin get Log log status return matches will be a list of all the places we add local history without any duplicates final Set matches new Hash Set I History Store Visitor visitor new I History Store Visitor public boolean visit History Store Entry entry I Path path entry get Path int prefix Segments source matching First Segments path if there are no matching segments then we have an internal error something is wrong with the visitor if prefix Segments 0 String message Policy bind history interal Path Errors source to String path to String NON NLS 1 Resource Status status new Resource Status I Resource Status INTERNAL ERROR source message null Resources Plugin get Plugin get Log log status return false path destination append path remove First Segments prefix Segments if state Already Exists path entry getUUID matches add path add State path entry getUUID entry get Last Modified return true Visit all the entries Visit partial matches too since this is a depth infinity operation and we want to copy history for children accept source visitor true For each match make sure we haven t exceeded the maximum number of states allowed I Workspace Description description workspace internal Get Description int max File States description get Max File States try for Iterator i matches iterator i has Next List remove Entries new Linked List Index Cursor cursor store get Cursor I Path path I Path i next byte key Convert toUTF8 path to String cursor find key If this key is a match grab the history store entry for it Don t need to worry about whether or not this is a full path match as we know we used this path to add new state information to the local history while cursor key Matches key remove Entries add History Store Entry create store cursor cursor next cursor close remove Oldest Entries remove Entries max File States catch Indexed Store Exception e String message Policy bind history problems Purging source to String destination to String NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED WRITE METADATA source message e Resources Plugin get Plugin get Log log status catch Core Exception e String message Policy bind history problems Purging source to String destination to String NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED WRITE METADATA source message e Resources Plugin get Plugin get Log log status We need to do a commit here The add State method we are using won t commit store The public ones will try store commit catch Core Exception e String message Policy bind history problems Copying source to String destination to String NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED WRITE METADATA source message e Resources Plugin get Plugin get Log log status  DEPTH_INFINITY copyHistory IPath IPath copyToNull ResourceStatus ResourceStatus IResourceStatus INTERNAL_ERROR ResourcesPlugin getPlugin getLog copyToSelf ResourceStatus ResourceStatus IResourceStatus INTERNAL_ERROR ResourcesPlugin getPlugin getLog HashSet IHistoryStoreVisitor IHistoryStoreVisitor HistoryStoreEntry IPath getPath prefixSegments matchingFirstSegments prefixSegments interalPathErrors toString toString ResourceStatus ResourceStatus IResourceStatus INTERNAL_ERROR ResourcesPlugin getPlugin getLog removeFirstSegments prefixSegments stateAlreadyExists addState getLastModified IWorkspaceDescription internalGetDescription maxFileStates getMaxFileStates hasNext removeEntries LinkedList IndexCursor getCursor IPath IPath toString keyMatches removeEntries HistoryStoreEntry removeOldestEntries removeEntries maxFileStates IndexedStoreException problemsPurging toString toString ResourceStatus ResourceStatus IResourceStatus FAILED_WRITE_METADATA ResourcesPlugin getPlugin getLog CoreException problemsPurging toString toString ResourceStatus ResourceStatus IResourceStatus FAILED_WRITE_METADATA ResourcesPlugin getPlugin getLog addState CoreException problemsCopying toString toString ResourceStatus ResourceStatus IResourceStatus FAILED_WRITE_METADATA ResourcesPlugin getPlugin getLog
Verifies existence of specified resource in the history store param target File state to be verified return True if file state exists public boolean exists I File State target return blob Store file For File State target getUUID exists  IFileState blobStore fileFor FileState
Returns an input stream containing the file contents of the specified state The user is responsible for closing the returned stream param target File state for which an input stream is requested return Input stream for requested file state public Input Stream get Contents I File State target throws Core Exception if exists target String message Policy bind history not Valid NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL target get Full Path message null return blob Store get Blob File State target getUUID  InputStream getContents IFileState CoreException notValid ResourceException IResourceStatus FAILED_READ_LOCAL getFullPath blobStore getBlob FileState
final List result new Array List max I History Store Visitor visitor new I History Store Visitor public boolean visit History Store Entry entry result add new File State History Store this key entry get Last Modified entry getUUID return true  ArrayList IHistoryStoreVisitor IHistoryStoreVisitor HistoryStoreEntry FileState HistoryStore getLastModified
Returns an array of all states available for the specified resource path or an empty array if none public I File State get States final I Path key final int max workspace internal Get Description get Max File States final List result new Array List max I History Store Visitor visitor new I History Store Visitor public boolean visit History Store Entry entry result add new File State History Store this key entry get Last Modified entry getUUID return true accept key visitor false if result is Empty return I Core Constants EMPTY FILE STATES put in the order of newer first I File State states new I File State result size for int i 0 i states length i states i I File State result get result size i 1 return states  IFileState getStates IPath internalGetDescription getMaxFileStates ArrayList IHistoryStoreVisitor IHistoryStoreVisitor HistoryStoreEntry FileState HistoryStore getLastModified isEmpty ICoreConstants EMPTY_FILE_STATES IFileState IFileState IFileState
Verifies whether the specified file at the specified file system location meets current size policies public boolean is Valid java io File local File Workspace Description description workspace internal Get Description boolean result local File length description get Max File State Size if Policy DEBUG HISTORY result System out println History Ignoring file too large File local File get Absolute Path NON NLS 1 size local File length NON NLS 1 max description get Max File State Size NON NLS 1 return result  isValid localFile WorkspaceDescription internalGetDescription localFile getMaxFileStateSize DEBUG_HISTORY localFile getAbsolutePath localFile getMaxFileStateSize
protected void remove History Store Entry entry throws Indexed Store Exception try Vector object Ids store get Index get Object Identifiers Matching entry get Key if object Ids size 1 store remove Object ObjectID object Ids get 0 else if object Ids size 1 There is a problem with more than one entry having the same key String message Policy bind history too Many Sim Updates entry get Path to String new Date entry get Last Modified to String NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED DELETE LOCAL entry get Path message null Resources Plugin get Plugin get Log log status catch Exception e String message Args entry get Path to String new Date entry get Last Modified to String entry getUUID to String String message Policy bind history specific Problems Cleaning message Args NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED DELETE LOCAL null message e Resources Plugin get Plugin get Log log status Do not remove the blob yet It may be referenced by another history store entry blobs To Remove add entry getUUID entry remove  HistoryStoreEntry IndexedStoreException objectIds getIndex getObjectIdentifiersMatching getKey objectIds removeObject objectIds objectIds tooManySimUpdates getPath toString getLastModified toString ResourceStatus ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getPath ResourcesPlugin getPlugin getLog messageArgs getPath toString getLastModified toString toString specificProblemsCleaning messageArgs ResourceStatus ResourceStatus IResourceStatus FAILED_DELETE_LOCAL ResourcesPlugin getPlugin getLog blobsToRemove
Removes all file states from this store public void remove All TODO should implement a method with a better performance try Index Cursor cursor store get Cursor cursor find First Entry while cursor is Set History Store Entry entry History Store Entry create store cursor remove entry cursor close store commit catch Exception e String message Policy bind history problems Removing workspace get Root get Full Path to String NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED DELETE LOCAL workspace get Root get Full Path message e Resources Plugin get Plugin get Log log status  removeAll IndexCursor getCursor findFirstEntry isSet HistoryStoreEntry HistoryStoreEntry problemsRemoving getRoot getFullPath toString ResourceStatus ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getRoot getFullPath ResourcesPlugin getPlugin getLog
public void remove All I Resource resource try Index Cursor cursor store get Cursor byte key Convert toUTF8 resource get Full Path to String cursor find key while cursor key Matches key History Store Entry entry History Store Entry create store cursor remove entry cursor close store commit catch Exception e String message Policy bind history problems Removing resource get Full Path to String NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED DELETE LOCAL resource get Full Path message e Resources Plugin get Plugin get Log log status  removeAll IResource IndexCursor getCursor getFullPath toString keyMatches HistoryStoreEntry HistoryStoreEntry problemsRemoving getFullPath toString ResourceStatus ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getFullPath ResourcesPlugin getPlugin getLog
Go through the history store and remove all of the unreferenced blobs Check the instance variable which holds onto a set of UUI Ds of potential candidates to be removed As of 3 0 this method is used for testing purposes only Otherwise the history store is garbage collected during the clean method void remove Garbage try Index Cursor cursor store get Cursor cursor find First Entry while blobs To Remove is Empty cursor is Set History Store Entry entry History Store Entry create store cursor blobs To Remove remove entry getUUID cursor next cursor close blob Store delete Blobs blobs To Remove blobs To Remove new Hash Set catch Exception e String message Policy bind history problems Cleaning NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED DELETE LOCAL null message e Resources Plugin get Plugin get Log log status  UUIDs removeGarbage IndexCursor getCursor findFirstEntry blobsToRemove isEmpty isSet HistoryStoreEntry HistoryStoreEntry blobsToRemove blobStore deleteBlobs blobsToRemove blobsToRemove HashSet problemsCleaning ResourceStatus ResourceStatus IResourceStatus FAILED_DELETE_LOCAL ResourcesPlugin getPlugin getLog
protected void remove Oldest Entries List entries int max Entries throws Indexed Store Exception do we have more states than necessary if entries size max Entries return int limit entries size max Entries for int i 0 i limit i remove History Store Entry entries get i  removeOldestEntries maxEntries IndexedStoreException maxEntries maxEntries HistoryStoreEntry
public void shutdown I Progress Monitor monitor if store null return store close  IProgressMonitor
public void startup I Progress Monitor monitor do nothing  IProgressMonitor
protected void reset Indexed Store store reset java io File target workspace get Meta Area get History Store Location to File Workspace clear target target mkdirs String message Policy bind history corrupt NON NLS 1 Resource Status status new Resource Status I Resource Status INTERNAL ERROR null message null Resources Plugin get Plugin get Log log status  resetIndexedStore getMetaArea getHistoryStoreLocation toFile ResourceStatus ResourceStatus IResourceStatus INTERNAL_ERROR ResourcesPlugin getPlugin getLog
public File get File For Universal Unique Identifier uuid return blob Store file For uuid  getFileFor UniversalUniqueIdentifier blobStore fileFor
class Path Collector implements I History Store Visitor public boolean visit History Store Entry state I Path member Path state get Path boolean within Depth Range false switch depth case I Resource DEPTH ZERO within Depth Range member Path segment Count path Length break case I Resource DEPTH ONE within Depth Range member Path segment Count path Length 1 break case I Resource DEPTH INFINITE within Depth Range true break if within Depth Range all Files add member Path traverse children as long as we re still within depth range return within Depth Range  PathCollector IHistoryStoreVisitor HistoryStoreEntry IPath memberPath getPath withinDepthRange IResource DEPTH_ZERO withinDepthRange memberPath segmentCount pathLength IResource DEPTH_ONE withinDepthRange memberPath segmentCount pathLength IResource DEPTH_INFINITE withinDepthRange withinDepthRange allFiles memberPath withinDepthRange
Returns the paths of all files with entries in this history store at or below the given workspace resource path to the given depth param path full workspace path to resource param depth depth limit one of code DEPTH ZERO code code DEPTH ONE code or code DEPTH INFINITE code return the set of paths for files that have at least one history entry element type code I Path code public Set all Files I Path path final int depth final Set all Files new Hash Set final int path Length path segment Count class Path Collector implements I History Store Visitor public boolean visit History Store Entry state I Path member Path state get Path boolean within Depth Range false switch depth case I Resource DEPTH ZERO within Depth Range member Path segment Count path Length break case I Resource DEPTH ONE within Depth Range member Path segment Count path Length 1 break case I Resource DEPTH INFINITE within Depth Range true break if within Depth Range all Files add member Path traverse children as long as we re still within depth range return within Depth Range accept path new Path Collector true return all Files  DEPTH_ZERO DEPTH_ONE DEPTH_INFINITE IPath allFiles IPath allFiles HashSet pathLength segmentCount PathCollector IHistoryStoreVisitor HistoryStoreEntry IPath memberPath getPath withinDepthRange IResource DEPTH_ZERO withinDepthRange memberPath segmentCount pathLength IResource DEPTH_ONE withinDepthRange memberPath segmentCount pathLength IResource DEPTH_INFINITE withinDepthRange withinDepthRange allFiles memberPath withinDepthRange PathCollector allFiles

Constructs an entry object for retrieval from the history store private History Store Entry byte key byte value Index Cursor cursor this cursor cursor this key key this uuid new Universal Unique Identifier value  HistoryStoreEntry IndexCursor UniversalUniqueIdentifier
Constructs an entry object to perform insertion to the history store public History Store Entry I Path path Universal Unique Identifier uuid long last Modified byte count this key key To Bytes path last Modified count this uuid uuid  HistoryStoreEntry IPath UniversalUniqueIdentifier lastModified keyToBytes lastModified
protected boolean compare byte one byte another if one length another length return false for int i 0 i one length i if one i another i return false return true 
Returns an entry object containing the information retrieved from the history store param store Indexed history store from which data is to be read param cursor Position from which data is to be read public static History Store Entry create Indexed Store Wrapper store Index Cursor cursor throws Core Exception Indexed Store Exception byte key cursor get Key ObjectID valueID cursor get Value As ObjectID byte value store get Object valueID return new History Store Entry key value cursor  HistoryStoreEntry IndexedStoreWrapper IndexCursor CoreException IndexedStoreException getKey getValueAsObjectID getObject HistoryStoreEntry
public byte get Count return key key length 1  getCount
public byte get Key return key  getKey
public long get Last Modified byte last Modified Bytes new byte SIZE LASTMODIFIED int position key length SIZE KEY SUFFIX System arraycopy key position last Modified Bytes 0 SIZE LASTMODIFIED return Convert bytes To Long last Modified Bytes  getLastModified lastModifiedBytes SIZE_LASTMODIFIED SIZE_KEY_SUFFIX lastModifiedBytes SIZE_LASTMODIFIED bytesToLong lastModifiedBytes
public I Path get Path byte path Bytes new byte key length SIZE KEY SUFFIX System arraycopy key 0 path Bytes 0 path Bytes length return new Path Convert fromUTF8 path Bytes  IPath getPath pathBytes SIZE_KEY_SUFFIX pathBytes pathBytes pathBytes
public Universal Unique Identifier getUUID return uuid  UniversalUniqueIdentifier
Converts the provided parameters into a single byte array representation Format path last Modified return Converted byte array public static byte key Prefix To Bytes I Path path long last Modified Retrieve byte array representations of values byte path Bytes Convert toUTF8 path to String byte last Modified Bytes Convert long To Bytes last Modified Byte array to hold key prefix byte key Prefix Bytes new byte path Bytes length last Modified Bytes length Copy values System arraycopy path Bytes 0 key Prefix Bytes 0 path Bytes length System arraycopy last Modified Bytes 0 key Prefix Bytes path Bytes length last Modified Bytes length return key Prefix Bytes  lastModified keyPrefixToBytes IPath lastModified pathBytes toString lastModifiedBytes longToBytes lastModified keyPrefixBytes pathBytes lastModifiedBytes pathBytes keyPrefixBytes pathBytes lastModifiedBytes keyPrefixBytes pathBytes lastModifiedBytes keyPrefixBytes
Converts the key for this entry object into byte array representation Format path last Modified count Note that the count variable consists of a single byte All other portions of the entry consist of multiple bytes return Key as a byte array protected byte key To Bytes I Path path long last Modified byte count Get beginning portion of key byte key Prefix key Prefix To Bytes path last Modified Byte array to hold full key The count value is 1 byte in length byte key new byte key Prefix length 1 Copy all values into full key int dest Position 0 System arraycopy key Prefix 0 key dest Position key Prefix length dest Position key Prefix length key dest Position count return key  lastModified keyToBytes IPath lastModified keyPrefix keyPrefixToBytes lastModified keyPrefix destPosition keyPrefix destPosition keyPrefix destPosition keyPrefix destPosition
Removes this entry from the store public void remove throws Indexed Store Exception if cursor null return reposition if cursor is Set return cursor remove  IndexedStoreException isSet
protected void reposition throws Indexed Store Exception if cursor is Set if compare cursor get Key key return cursor find key  IndexedStoreException isSet getKey
Used for debug public String to String String Buffer s new String Buffer s append Path append get Path append n NON NLS 1 NON NLS 2 s append Last Modified append get Last Modified append n NON NLS 1 NON NLS 2 s append Count append get Count append n NON NLS 1 NON NLS 2 s append UUID append uuid to String As Bytes append n NON NLS 1 NON NLS 2 return s to String  toString StringBuffer StringBuffer getPath getLastModified getCount toStringAsBytes toString
Converts the value for this entry object into byte array representation Format uuid return Value as a byte array public byte value To Bytes return uuid to Bytes  valueToBytes toBytes

public interface I History Store Visitor Performs required behaviour whenever a match is found in the history store query param state State to be visited in Indexed Store  IHistoryStoreVisitor IndexedStore

Creates a new Is Synchronized Visitor public Is Synchronized Visitor I Progress Monitor monitor super monitor NON NLS 1  IsSynchronizedVisitor IsSynchronizedVisitor IProgressMonitor
see Collect Sync Status Visitor changed Resource protected void changed Resource target throw exception  CollectSyncStatusVisitor

public interface I Unified Tree Visitor Returns true to visit the members of this node and false otherwise public boolean visit Unified Tree Node node throws Core Exception  IUnifiedTreeVisitor UnifiedTreeNode CoreException

public class Refresh Local Alias Visitor extends Refresh Local Visitor public Refresh Local Alias Visitor I Progress Monitor monitor super monitor  RefreshLocalAliasVisitor RefreshLocalVisitor RefreshLocalAliasVisitor IProgressMonitor
protected void create Resource Unified Tree Node node Resource target throws Core Exception super create Resource node target if node get Local Location null return I Resource aliases workspace get Alias Manager compute Aliases target new Path node get Local Location if aliases null for int i 0 i aliases length i super create Resource node Resource aliases i  createResource UnifiedTreeNode CoreException createResource getLocalLocation IResource getAliasManager computeAliases getLocalLocation createResource
protected void delete Resource Unified Tree Node node Resource target throws Core Exception super delete Resource node target if node get Local Location null return I Resource aliases workspace get Alias Manager compute Aliases target new Path node get Local Location if aliases null for int i 0 i aliases length i super delete Resource node Resource aliases i  deleteResource UnifiedTreeNode CoreException deleteResource getLocalLocation IResource getAliasManager computeAliases getLocalLocation deleteResource
protected void resource Changed Unified Tree Node node Resource target throws Core Exception super resource Changed node target if node get Local Location null return I Resource aliases workspace get Alias Manager compute Aliases target new Path node get Local Location if aliases null for int i 0 i aliases length i super resource Changed node Resource aliases i  resourceChanged UnifiedTreeNode CoreException resourceChanged getLocalLocation IResource getAliasManager computeAliases getLocalLocation resourceChanged
protected void file To Folder Unified Tree Node node Resource target throws Core Exception super file To Folder node target if node get Local Location null return I Resource aliases workspace get Alias Manager compute Aliases target new Path node get Local Location if aliases null for int i 0 i aliases length i super file To Folder node Resource aliases i  fileToFolder UnifiedTreeNode CoreException fileToFolder getLocalLocation IResource getAliasManager computeAliases getLocalLocation fileToFolder
protected void folder To File Unified Tree Node node Resource target throws Core Exception super folder To File node target if node get Local Location null return I Resource aliases workspace get Alias Manager compute Aliases target new Path node get Local Location if aliases null for int i 0 i aliases length i super folder To File node Resource aliases i  folderToFile UnifiedTreeNode CoreException folderToFile getLocalLocation IResource getAliasManager computeAliases getLocalLocation folderToFile
protected void refresh Container parent throws Core Exception parent get Local Manager refresh parent I Resource DEPTH ZERO true null  CoreException getLocalManager IResource DEPTH_ZERO

public Refresh Local Visitor I Progress Monitor monitor this monitor monitor workspace Workspace Resources Plugin get Workspace resource Changed false String msg Policy bind resources error Multi Refresh NON NLS 1 errors new Multi Status Resources Plugin PI RESOURCES I Resource Status FAILED READ LOCAL msg null  RefreshLocalVisitor IProgressMonitor ResourcesPlugin getWorkspace resourceChanged errorMultiRefresh MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus FAILED_READ_LOCAL
This method has the same implementation as resource Changed but as they are different cases we prefer to use different methods protected void content Added Unified Tree Node node Resource target throws Core Exception resource Changed node target  resourceChanged contentAdded UnifiedTreeNode CoreException resourceChanged
protected void create Resource Unified Tree Node node Resource target throws Core Exception Resource Info info target get Resource Info false false int flags target get Flags info if target exists flags false return make sure target s parent exists if node get Level 0 I Container parent target get Parent if parent get Type I Resource FOLDER Folder target get Parent ensure Exists monitor Use the basic file creation protocol since we don t want to create any content on disk info workspace create Resource target false target get Local Manager update Local Sync info node get Last Modified  createResource UnifiedTreeNode CoreException ResourceInfo getResourceInfo getFlags getLevel IContainer getParent getType IResource getParent ensureExists createResource getLocalManager updateLocalSync getLastModified
protected void delete Resource Unified Tree Node node Resource target throws Core Exception Resource Info info target get Resource Info false false int flags target get Flags info don t delete linked resources if Resource Info is Set flags I Core Constants M LINK return if target exists flags false target delete Resource true null node set Exists Workspace false  deleteResource UnifiedTreeNode CoreException ResourceInfo getResourceInfo getFlags ResourceInfo isSet ICoreConstants M_LINK deleteResource setExistsWorkspace
protected void file To Folder Unified Tree Node node Resource target throws Core Exception Resource Info info target get Resource Info false false int flags target get Flags info if target exists flags true target Folder File target change To Folder else if target exists flags false target Resource workspace get Root get Folder target get Full Path Use the basic file creation protocol since we don t want to create any content on disk workspace create Resource target false node set Resource target info target get Resource Info false true target get Local Manager update Local Sync info node get Last Modified  fileToFolder UnifiedTreeNode CoreException ResourceInfo getResourceInfo getFlags changeToFolder getRoot getFolder getFullPath createResource setResource getResourceInfo getLocalManager updateLocalSync getLastModified
protected void folder To File Unified Tree Node node Resource target throws Core Exception Resource Info info target get Resource Info false false int flags target get Flags info if target exists flags true target File Folder target change To File else if target exists flags false target Resource workspace get Root get File target get Full Path Use the basic file creation protocol since we don t want to create any content on disk workspace create Resource target false node set Resource target info target get Resource Info false true target get Local Manager update Local Sync info node get Last Modified  folderToFile UnifiedTreeNode CoreException ResourceInfo getResourceInfo getFlags changeToFile getRoot getFile getFullPath createResource setResource getResourceInfo getLocalManager updateLocalSync getLastModified
Returns the status of the nodes visited so far This will be a multi status that describes all problems that have occurred or an OK status if everything went smoothly public I Status get Error Status return errors  IStatus getErrorStatus
Refreshes the parent of a resource currently being synchronized protected void refresh Container parent throws Core Exception parent get Local Manager refresh parent I Resource DEPTH ZERO false null  CoreException getLocalManager IResource DEPTH_ZERO
protected void resource Changed Unified Tree Node node Resource target throws Core Exception Resource Info info target get Resource Info false true if info null return target get Local Manager update Local Sync info node get Last Modified info increment Content Id forget content related caching flags info clear Resource Info M CONTENT CACHE workspace update Modification Stamp info  resourceChanged UnifiedTreeNode CoreException ResourceInfo getResourceInfo getLocalManager updateLocalSync getLastModified incrementContentId ResourceInfo M_CONTENT_CACHE updateModificationStamp
public boolean resources Changed return resource Changed  resourcesChanged resourceChanged
deletion or creation Returns RL IN SYNC the resource is in sync with the file system RL NOT IN SYNC the resource is not in sync with file system RL UNKNOWN couldn t determine the sync status for this resource protected int synchronize Existence Unified Tree Node node Resource target int level throws Core Exception boolean exists In Workspace node exists In Workspace if exists In Workspace if Core File System Library is Case Sensitive level 0 do we have any alphabetic variants on the workspace I Resource variant target find Existing Resource Variant target get Full Path if variant null return RL UNKNOWN do we have a gender variant in the workspace I Resource gender Variant workspace get Root find Member target get Full Path if gender Variant null return RL UNKNOWN if exists In Workspace if node exists In File System non local files are always in sync if target is Local I Resource DEPTH ZERO delete Resource node target resource Changed true return RL NOT IN SYNC else return RL IN SYNC else if node exists In File System if Core File System Library is Case Sensitive Container parent Container target get Parent if parent exists refresh parent if parent exists return RL NOT IN SYNC if target get Name equals node get Local Name return RL IN SYNC create Resource node target resource Changed true return RL NOT IN SYNC return RL UNKNOWN  RL_IN_SYNC RL_NOT_IN_SYNC RL_UNKNOWN synchronizeExistence UnifiedTreeNode CoreException existsInWorkspace existsInWorkspace existsInWorkspace CoreFileSystemLibrary isCaseSensitive IResource findExistingResourceVariant getFullPath RL_UNKNOWN IResource genderVariant getRoot findMember getFullPath genderVariant RL_UNKNOWN existsInWorkspace existsInFileSystem isLocal IResource DEPTH_ZERO deleteResource resourceChanged RL_NOT_IN_SYNC RL_IN_SYNC existsInFileSystem CoreFileSystemLibrary isCaseSensitive getParent RL_NOT_IN_SYNC getName getLocalName RL_IN_SYNC createResource resourceChanged RL_NOT_IN_SYNC RL_UNKNOWN
gender change Returns true if gender was in sync protected boolean synchronize Gender Unified Tree Node node Resource target throws Core Exception if node exists In Workspace may be an existing resource in the workspace of different gender I Resource gender Variant workspace get Root find Member target get Full Path if gender Variant null target Resource gender Variant if target get Type I Resource FILE if node is File file To Folder node target resource Changed true return false else if node is Folder folder To File node target resource Changed true return false return true  synchronizeGender UnifiedTreeNode CoreException existsInWorkspace IResource genderVariant getRoot findMember getFullPath genderVariant genderVariant getType IResource isFile fileToFolder resourceChanged isFolder folderToFile resourceChanged
last Modified protected void synchronize Last Modified Unified Tree Node node Resource target throws Core Exception if target is Local I Resource DEPTH ZERO resource Changed node target else content Added node target resource Changed true  lastModified synchronizeLastModified UnifiedTreeNode CoreException isLocal IResource DEPTH_ZERO resourceChanged contentAdded resourceChanged
public boolean visit Unified Tree Node node throws Core Exception Policy check Canceled monitor try Resource target Resource node get Resource int target Type target get Type if target Type I Resource PROJECT return true if node exists In Workspace node exists In File System for folders we only care about updating local status if target Type I Resource FOLDER node is Folder if not local mark as local if target is Local I Resource DEPTH ZERO Resource Info info target get Resource Info false true if info null return true target get Local Manager update Local Sync info node get Last Modified return true compare file last modified if target Type I Resource FILE node is File Resource Info info target get Resource Info false false if info null info get Local Sync Info node get Last Modified return true else if node exists In File System Path EMPTY is Valid Segment node get Local Name String message Policy bind resources invalid Resource Name node get Local Name NON NLS 1 errors merge new Resource Status I Resource Status INVALID RESOURCE NAME message return false int state synchronize Existence node target node get Level if state RL IN SYNC state RL NOT IN SYNC if target Type I Resource FILE try File target update Project Description catch Core Exception e errors merge e get Status return true if synchronize Gender node target synchronize Last Modified node target if target Type I Resource FILE try File target update Project Description catch Core Exception e errors merge e get Status return true finally if next Progress 0 we have exhausted the current increment so report progress monitor worked 1 worked if worked half Way we have passed the current halfway point so double the increment and reset the halfway point current Increment 2 half Way TOTAL WORK half Way 2 reset the progress counter to another full increment next Progress current Increment  UnifiedTreeNode CoreException checkCanceled getResource targetType getType targetType IResource existsInWorkspace existsInFileSystem targetType IResource isFolder isLocal IResource DEPTH_ZERO ResourceInfo getResourceInfo getLocalManager updateLocalSync getLastModified targetType IResource isFile ResourceInfo getResourceInfo getLocalSyncInfo getLastModified existsInFileSystem isValidSegment getLocalName invalidResourceName getLocalName ResourceStatus IResourceStatus INVALID_RESOURCE_NAME synchronizeExistence getLevel RL_IN_SYNC RL_NOT_IN_SYNC targetType IResource updateProjectDescription CoreException getStatus synchronizeGender synchronizeLastModified targetType IResource updateProjectDescription CoreException getStatus nextProgress halfWay currentIncrement halfWay TOTAL_WORK halfWay nextProgress currentIncrement

protected int next Byte In Chunk 0 public Safe Chunky Input Stream File target throws IO Exception this target BUFFER SIZE  nextByteInChunk SafeChunkyInputStream IOException BUFFER_SIZE
public Safe Chunky Input Stream File target int buffer Size throws IO Exception input new File Input Stream target buffer new byte buffer Size  SafeChunkyInputStream bufferSize IOException FileInputStream bufferSize
protected void accumulate byte data int start int end byte result new byte chunk length end start System arraycopy chunk 0 result 0 chunk length System arraycopy data start result chunk length end start chunk result chunk Length chunk Length end start  chunkLength chunkLength
public int available throws IO Exception return chunk Length next Byte In Chunk  IOException chunkLength nextByteInChunk
protected void build Chunk throws IO Exception if next Byte In Buffer I Local Store Constants CHUNK DELIMITER SIZE buffer Length shift And Fill Buffer int end find I Local Store Constants END CHUNK next Byte In Buffer buffer Length true if end 1 accumulate buffer next Byte In Buffer end next Byte In Buffer end I Local Store Constants CHUNK DELIMITER SIZE return accumulate buffer next Byte In Buffer buffer Length buffer Length input read buffer next Byte In Buffer 0 if buffer Length 1 end Of File true return build Chunk  buildChunk IOException nextByteInBuffer ILocalStoreConstants CHUNK_DELIMITER_SIZE bufferLength shiftAndFillBuffer ILocalStoreConstants END_CHUNK nextByteInBuffer bufferLength nextByteInBuffer nextByteInBuffer ILocalStoreConstants CHUNK_DELIMITER_SIZE nextByteInBuffer bufferLength bufferLength nextByteInBuffer bufferLength endOfFile buildChunk
public void close throws IO Exception input close  IOException
protected boolean compare byte source byte target int start Index for int i 0 i target length i if source start Index target i return false start Index return true  startIndex startIndex startIndex
protected int find byte pattern int start Index int end Index boolean accumulate throws IO Exception int pos find Byte pattern 0 start Index end Index if pos 1 return 1 if pos I Local Store Constants CHUNK DELIMITER SIZE buffer Length if accumulate accumulate buffer next Byte In Buffer pos next Byte In Buffer pos pos 0 shift And Fill Buffer if compare buffer pattern pos return pos return find pattern pos 1 end Index accumulate  startIndex endIndex IOException findByte startIndex endIndex ILocalStoreConstants CHUNK_DELIMITER_SIZE bufferLength nextByteInBuffer nextByteInBuffer shiftAndFillBuffer endIndex
protected int find Byte byte target int start Index int end Index while start Index end Index if buffer start Index target return start Index start Index return 1  findByte startIndex endIndex startIndex endIndex startIndex startIndex startIndex
protected void find Chunk Start throws IO Exception if next Byte In Buffer I Local Store Constants CHUNK DELIMITER SIZE buffer Length shift And Fill Buffer int begin find I Local Store Constants BEGIN CHUNK next Byte In Buffer buffer Length false if begin 1 next Byte In Buffer begin I Local Store Constants CHUNK DELIMITER SIZE return buffer Length input read buffer next Byte In Buffer 0 if buffer Length 1 reset Chunk end Of File true return find Chunk Start  findChunkStart IOException nextByteInBuffer ILocalStoreConstants CHUNK_DELIMITER_SIZE bufferLength shiftAndFillBuffer ILocalStoreConstants BEGIN_CHUNK nextByteInBuffer bufferLength nextByteInBuffer ILocalStoreConstants CHUNK_DELIMITER_SIZE bufferLength nextByteInBuffer bufferLength resetChunk endOfFile findChunkStart
public int read throws IO Exception if end Of File return 1 if there are bytes left in the chunk return the first available if next Byte In Chunk chunk Length return chunk next Byte In Chunk 0xFF Otherwise the chunk is empty so clear the current one get the next one and recursively call read Need to recur as the chunk may be real but empty reset Chunk find Chunk Start if end Of File return 1 build Chunk refine Chunk return read  IOException endOfFile nextByteInChunk chunkLength nextByteInChunk resetChunk findChunkStart endOfFile buildChunk refineChunk
Skip over any begin chunks in the current chunk This could be optimized to skip at the same time as we are scanning the buffer protected void refine Chunk int start chunk Length I Local Store Constants CHUNK DELIMITER SIZE if start 0 return for int i start i 0 i if compare chunk I Local Store Constants BEGIN CHUNK i next Byte In Chunk i I Local Store Constants CHUNK DELIMITER SIZE return  refineChunk chunkLength ILocalStoreConstants CHUNK_DELIMITER_SIZE ILocalStoreConstants BEGIN_CHUNK nextByteInChunk ILocalStoreConstants CHUNK_DELIMITER_SIZE
protected void reset Chunk chunk new byte 0 chunk Length 0 next Byte In Chunk 0  resetChunk chunkLength nextByteInChunk
protected void shift And Fill Buffer throws IO Exception int length buffer Length next Byte In Buffer System arraycopy buffer next Byte In Buffer buffer 0 length next Byte In Buffer 0 buffer Length length int read input read buffer buffer Length buffer length buffer Length if read 1 buffer Length read else reset Chunk end Of File true  shiftAndFillBuffer IOException bufferLength nextByteInBuffer nextByteInBuffer nextByteInBuffer bufferLength bufferLength bufferLength bufferLength resetChunk endOfFile

protected boolean is Open public Safe Chunky Output Stream File target throws IO Exception this target get Absolute Path  isOpen SafeChunkyOutputStream IOException getAbsolutePath
public Safe Chunky Output Stream String file Path throws IO Exception super new Buffered Output Stream new File Output Stream file Path true this file Path file Path is Open true begin Chunk  SafeChunkyOutputStream filePath IOException BufferedOutputStream FileOutputStream filePath filePath filePath isOpen beginChunk
protected void begin Chunk throws IO Exception write I Local Store Constants BEGIN CHUNK  beginChunk IOException ILocalStoreConstants BEGIN_CHUNK
protected void end Chunk throws IO Exception write I Local Store Constants END CHUNK  endChunk IOException ILocalStoreConstants END_CHUNK
protected void open throws IO Exception out new Buffered Output Stream new File Output Stream file Path true is Open true begin Chunk  IOException BufferedOutputStream FileOutputStream filePath isOpen beginChunk
public void succeed throws IO Exception try end Chunk finally is Open false close  IOException endChunk isOpen
public void write int b throws IO Exception if is Open open super write b  IOException isOpen

protected static final String EXTENSION bak NON NLS 1 public Safe File Input Stream File file throws IO Exception this file get Absolute Path null  SafeFileInputStream IOException getAbsolutePath
public Safe File Input Stream String target Name throws IO Exception this target Name null  SafeFileInputStream targetName IOException targetName
If target Path is null the file will be created in the default temporary directory public Safe File Input Stream String target Path String temp Path throws IO Exception super get Input Stream target Path temp Path  targetPath SafeFileInputStream targetPath tempPath IOException getInputStream targetPath tempPath
private static Input Stream get Input Stream String target Path String temp Path throws IO Exception File target new File target Path if target exists if temp Path null temp Path target get Absolute Path EXTENSION target new File temp Path return new Buffered Input Stream new File Input Stream target  InputStream getInputStream targetPath tempPath IOException targetPath tempPath tempPath getAbsolutePath tempPath BufferedInputStream FileInputStream

protected static final String EXTENSION bak NON NLS 1 public Safe File Output Stream File file throws IO Exception this file get Absolute Path null  SafeFileOutputStream IOException getAbsolutePath
public Safe File Output Stream String target Name throws IO Exception this target Name null  SafeFileOutputStream targetName IOException targetName
If target Path is null the file will be created in the default temporary directory public Safe File Output Stream String target Path String temp Path throws IO Exception failed false target new File target Path create Temp File temp Path if target exists if temp exists output new Buffered Output Stream new File Output Stream target return If we do not have a file at target location but we do have at temp location it probably means something wrong happened the last time we tried to write it So try to recover the backup file And if successful write the new one copy temp target output new Buffered Output Stream new File Output Stream temp  targetPath SafeFileOutputStream targetPath tempPath IOException targetPath createTempFile tempPath BufferedOutputStream FileOutputStream BufferedOutputStream FileOutputStream
public void close throws IO Exception try output close catch IO Exception e failed true throw e rethrow if failed temp delete else commit  IOException IOException
protected void commit throws IO Exception if temp exists return target delete copy temp target temp delete  IOException
protected void copy File source File File destination File throws IO Exception if source File exists return if source File rename To destination File return Input Stream source new Buffered Input Stream new File Input Stream source File Output Stream destination new Buffered Output Stream new File Output Stream destination File transfer Streams source destination  sourceFile destinationFile IOException sourceFile sourceFile renameTo destinationFile InputStream BufferedInputStream FileInputStream sourceFile OutputStream BufferedOutputStream FileOutputStream destinationFile transferStreams
protected void create Temp File String temp Path throws IO Exception if temp Path null temp Path target get Absolute Path EXTENSION temp new File temp Path  createTempFile tempPath IOException tempPath tempPath getAbsolutePath tempPath
public void flush throws IO Exception try output flush catch IO Exception e failed true throw e rethrow  IOException IOException
public String get Temp File Path return temp get Absolute Path  getTempFilePath getAbsolutePath
protected void transfer Streams Input Stream source Output Stream destination throws IO Exception try byte buffer new byte 8192 while true int bytes Read source read buffer if bytes Read 1 break destination write buffer 0 bytes Read finally try source close catch IO Exception e ignore try destination close catch IO Exception e ignore  transferStreams InputStream OutputStream IOException bytesRead bytesRead bytesRead IOException IOException
public void write int b throws IO Exception try output write b catch IO Exception e failed true throw e rethrow  IOException IOException

Class cannot be instantiated private Testing Support not allowed  TestingSupport
Call History Store accept public static void accept History Store store I Path path I History Store Visitor visitor boolean partial Match store accept path visitor partial Match  HistoryStore HistoryStore IPath IHistoryStoreVisitor partialMatch partialMatch
Call History Store remove Garbage since 3 0 public static void remove Garbage History Store store store remove Garbage  HistoryStore removeGarbage removeGarbage HistoryStore removeGarbage

protected static final Unified Tree Node children Marker new Unified Tree Node null null 0 null null false public Unified Tree super  UnifiedTreeNode childrenMarker UnifiedTreeNode UnifiedTree
The root must only be a file or a folder public Unified Tree I Resource root set Root root  UnifiedTree IResource setRoot
public void accept I Unified Tree Visitor visitor throws Core Exception accept visitor I Resource DEPTH INFINITE  IUnifiedTreeVisitor CoreException IResource DEPTH_INFINITE
public void accept I Unified Tree Visitor visitor int depth throws Core Exception Assert is Not Null root initialize Queue level 0 while is Valid Level level depth queue is Empty Unified Tree Node node Unified Tree Node queue remove if is Children Marker node continue if is Level Marker node level continue if visitor visit node add Node Children To Queue node else remove Node Children From Queue node allow reuse of the node free Nodes add node  IUnifiedTreeVisitor CoreException isNotNull initializeQueue isValidLevel isEmpty UnifiedTreeNode UnifiedTreeNode isChildrenMarker isLevelMarker addNodeChildrenToQueue removeNodeChildrenFromQueue freeNodes
protected void add Children Unified Tree Node node throws Core Exception I Resource parent node get Resource is there a possibility to have children int parent Type parent get Type if parent Type I Resource FILE node is File return get the list of resources in the file system String parent Local Location node get Local Location Object list get Local List node parent Local Location int local Index 0 get the list of resources in the workspace if parent exists parent Type I Resource FOLDER parent Type I Resource PROJECT I Resource target null Unified Tree Node child null I Resource members I Container parent members I Container INCLUDE TEAM PRIVATE MEMBERS int workspace Index 0 iterate simultaneously over file system and workspace members while workspace Index members length target members workspace Index String name target get Name String local Name list null local Index list length String list local Index null int comp local Name null name compare To local Name 1 special handling for linked resources if parent Type I Resource PROJECT target is Linked child will be null if location is undefined child create Child For Linked Resource target workspace Index if there is a matching local file skip it it will be blocked by the linked resource if comp 0 local Index else if comp 0 resource exists in workspace and file system String local Location create Child Location parent Local Location local Name long stat Core File System Library get Stat local Location child create Node target stat local Location local Name true local Index workspace Index else if comp 0 resource exists only in file system child create Child Node From File System node parent Local Location local Name local Index else resource exists only in the workspace child create Node target 0 null null true workspace Index if child null add Child To Tree node child process any remaining resource from the file system add Children From File System node parent Local Location list local Index if we added children add the child Marker separator if node get First Child null add Children Marker  addChildren UnifiedTreeNode CoreException IResource getResource parentType getType parentType IResource isFile parentLocalLocation getLocalLocation getLocalList parentLocalLocation localIndex parentType IResource parentType IResource IResource UnifiedTreeNode IResource IContainer IContainer INCLUDE_TEAM_PRIVATE_MEMBERS workspaceIndex workspaceIndex workspaceIndex getName localName localIndex localIndex localName compareTo localName parentType IResource isLinked createChildForLinkedResource workspaceIndex localIndex localLocation createChildLocation parentLocalLocation localName CoreFileSystemLibrary getStat localLocation createNode localLocation localName localIndex workspaceIndex createChildNodeFromFileSystem parentLocalLocation localName localIndex createNode workspaceIndex addChildToTree addChildrenFromFileSystem parentLocalLocation localIndex childMarker getFirstChild addChildrenMarker
Creates a tree node for a resource that is linked in a different file system location protected Unified Tree Node create Child For Linked Resource I Resource target I Path location target get Location long stat 0 String location String null String name null if location null location String location toOS String name location last Segment stat Core File System Library get Stat location String return create Node target stat location String name true  UnifiedTreeNode createChildForLinkedResource IResource IPath getLocation locationString locationString toOSString lastSegment CoreFileSystemLibrary getStat locationString createNode locationString
protected void add Children From File System Unified Tree Node node String parent Local Location Object list int index throws Core Exception if list null return for int i index i list length i String local Name String list i Unified Tree Node child create Child Node From File System node parent Local Location local Name if child null add Child To Tree node child  addChildrenFromFileSystem UnifiedTreeNode parentLocalLocation CoreException localName UnifiedTreeNode createChildNodeFromFileSystem parentLocalLocation localName addChildToTree
protected void add Children Marker add Element To Queue children Marker  addChildrenMarker addElementToQueue childrenMarker
protected void add Child To Tree Unified Tree Node node Unified Tree Node child if node get First Child null node set First Child child add Element To Queue child  addChildToTree UnifiedTreeNode UnifiedTreeNode getFirstChild setFirstChild addElementToQueue
protected void add Element To Queue Unified Tree Node target queue add target  addElementToQueue UnifiedTreeNode
Creates a string representing the OS path for the given parent and child name protected String create Child Location String parent Location String child Location if parent Location null return null String Buffer buffer new String Buffer parent Location length child Location length 1 buffer append parent Location buffer append java io File separator Char buffer append child Location return buffer to String  createChildLocation parentLocation childLocation parentLocation StringBuffer StringBuffer parentLocation childLocation parentLocation separatorChar childLocation toString
protected void add Node Children To Queue Unified Tree Node node throws Core Exception if the first child is not null we already added the children if node get First Child null return add Children node if queue is Empty return if we re about to change levels then the children just added are the last nodes for their level so add a level marker to the queue Unified Tree Node next Node Unified Tree Node queue peek if is Level Marker next Node add Element To Queue level Marker  addNodeChildrenToQueue UnifiedTreeNode CoreException getFirstChild addChildren isEmpty UnifiedTreeNode nextNode UnifiedTreeNode isLevelMarker nextNode addElementToQueue levelMarker
protected void add Root To Queue throws Core Exception long stat 0 String root Location String null String name null if root Local Location null root Location String root Local Location toOS String name root Local Location last Segment stat Core File System Library get Stat root Location String Unified Tree Node node create Node root stat root Location String name root exists if node exists In File System node exists In Workspace return add Element To Queue node  addRootToQueue CoreException rootLocationString rootLocalLocation rootLocationString rootLocalLocation toOSString rootLocalLocation lastSegment CoreFileSystemLibrary getStat rootLocationString UnifiedTreeNode createNode rootLocationString existsInFileSystem existsInWorkspace addElementToQueue
Creates a child node for a location in the file system Does nothing and returns null if the location does not correspond to a valid file folder protected Unified Tree Node create Child Node From File System Unified Tree Node parent String parent Local Location String child Name throws Core Exception I Path child Path parent get Resource get Full Path append child Name String location create Child Location parent Local Location child Name long stat Core File System Library get Stat location int type Core File System Library is File stat I Resource FILE Core File System Library is Folder stat I Resource FOLDER 0 if it is not a valid file or folder if type 0 return null I Resource target get Workspace new Resource child Path type return create Node target stat location child Name false  UnifiedTreeNode createChildNodeFromFileSystem UnifiedTreeNode parentLocalLocation childName CoreException IPath childPath getResource getFullPath childName createChildLocation parentLocalLocation childName CoreFileSystemLibrary getStat CoreFileSystemLibrary isFile IResource CoreFileSystemLibrary isFolder IResource IResource getWorkspace newResource childPath createNode childName
see create Child Node From File System protected Unified Tree Node create Node From File System I Path path String location String local Name throws Core Exception long stat Core File System Library get Stat location Unified Tree Node node create Node null stat location local Name false int type node is File I Resource FILE I Resource FOLDER I Resource target get Workspace new Resource path type node set Resource target return node  createChildNodeFromFileSystem UnifiedTreeNode createNodeFromFileSystem IPath localName CoreException CoreFileSystemLibrary getStat UnifiedTreeNode createNode localName isFile IResource IResource IResource getWorkspace newResource setResource
Factory method for creating a node for this tree protected Unified Tree Node create Node I Resource resource long stat String local Location String local Name boolean exists Workspace first check for reusable objects Unified Tree Node node null int size free Nodes size if size 0 node Unified Tree Node free Nodes remove size 1 node reuse this resource stat local Location local Name exists Workspace return node none available so create a new one return new Unified Tree Node this resource stat local Location local Name exists Workspace  UnifiedTreeNode createNode IResource localLocation localName existsWorkspace UnifiedTreeNode freeNodes UnifiedTreeNode freeNodes localLocation localName existsWorkspace UnifiedTreeNode localLocation localName existsWorkspace
protected Enumeration get Children Unified Tree Node node throws Core Exception if first child is null we need to add node s children to queue if node get First Child null add Node Children To Queue node if the first child is still null the node does not have any children if node get First Child null return Empty Enumeration get Enumeration get the index of the first child int index queue index Of node get First Child if we do not have children just return an empty enumeration if index 1 return Empty Enumeration get Enumeration create an enumeration with node s children List result new Array List 10 while true Unified Tree Node child Unified Tree Node queue element At index if is Children Marker child break result add child index queue increment index return Collections enumeration result  getChildren UnifiedTreeNode CoreException getFirstChild addNodeChildrenToQueue getFirstChild EmptyEnumeration getEnumeration indexOf getFirstChild EmptyEnumeration getEnumeration ArrayList UnifiedTreeNode UnifiedTreeNode elementAt isChildrenMarker
protected String get Local Location I Resource target if root Local Location null return null int segments target get Full Path matching First Segments root get Full Path return root Local Location append target get Full Path remove First Segments segments toOS String  getLocalLocation IResource rootLocalLocation getFullPath matchingFirstSegments getFullPath rootLocalLocation getFullPath removeFirstSegments toOSString
protected int get Level return level  getLevel
protected Object get Local List Unified Tree Node node String location if node is File location null return null String list new java io File location list if list null return list int size list length if size 1 quick Sort list 0 size 1 return list  getLocalList UnifiedTreeNode isFile quickSort
protected Workspace get Workspace return Workspace root get Workspace  getWorkspace getWorkspace
protected void initialize Queue throws Core Exception init the queue if queue null queue new Queue 100 false else queue reset init the free nodes list if free Nodes null free Nodes new Array List 100 else free Nodes clear add Root To Queue add Element To Queue level Marker  initializeQueue CoreException freeNodes freeNodes ArrayList freeNodes addRootToQueue addElementToQueue levelMarker
protected boolean is Children Marker Unified Tree Node node return node children Marker  isChildrenMarker UnifiedTreeNode childrenMarker
protected boolean is Level Marker Unified Tree Node node return node level Marker  isLevelMarker UnifiedTreeNode levelMarker
protected boolean is Valid Level int level int depth switch depth case I Resource DEPTH INFINITE return true case I Resource DEPTH ONE return level 1 case I Resource DEPTH ZERO return level 0 default return false  isValidLevel IResource DEPTH_INFINITE IResource DEPTH_ONE IResource DEPTH_ZERO
Remove from the last element of the queue to the first child of the given node protected void remove Node Children From Queue Unified Tree Node node throws Core Exception Unified Tree Node first node get First Child if first null return while true if first equals queue remove Tail break node set First Child null  removeNodeChildrenFromQueue UnifiedTreeNode CoreException UnifiedTreeNode getFirstChild removeTail setFirstChild
public void set Root I Resource root this root root this root Local Location root get Location  setRoot IResource rootLocalLocation getLocation
Sorts the given array of strings in place This is not using the sorting framework to avoid casting overhead protected void quick Sort String strings int left int right int original Left left int original Right right String mid strings left right 2 do while mid compare To strings left 0 left while strings right compare To mid 0 right if left right String tmp strings left strings left strings right strings right tmp left right while left right if original Left right quick Sort strings original Left right if left original Right quick Sort strings left original Right return  quickSort originalLeft originalRight compareTo compareTo originalLeft quickSort originalLeft originalRight quickSort originalRight

public Unified Tree Node Unified Tree tree I Resource resource long stat String local Location String local Name boolean exists Workspace this tree tree this resource resource this stat stat this exists Workspace exists Workspace this local Location local Location this local Name local Name  UnifiedTreeNode UnifiedTree IResource localLocation localName existsWorkspace existsWorkspace existsWorkspace localLocation localLocation localName localName
public boolean exists In File System return is File is Folder  existsInFileSystem isFile isFolder
public boolean exists In Workspace return exists Workspace  existsInWorkspace existsWorkspace
Returns an Enumeration of Unified Resource Node public Enumeration get Children throws Core Exception return tree get Children this  UnifiedResourceNode getChildren CoreException getChildren
protected Unified Tree Node get First Child return child  UnifiedTreeNode getFirstChild
public long get Last Modified return Core File System Library get Last Modified stat  getLastModified CoreFileSystemLibrary getLastModified
public int get Level return tree get Level  getLevel getLevel
Returns the local location of this resource May be null public String get Local Location return local Location null local Location tree get Local Location resource  getLocalLocation localLocation localLocation getLocalLocation
Gets the name of this node in the local filesystem return Returns a String public String get Local Name return local Name  getLocalName localName
public I Resource get Resource return resource  IResource getResource
public boolean is File return Core File System Library is File stat  isFile CoreFileSystemLibrary isFile
public boolean is Folder return Core File System Library is Folder stat  isFolder CoreFileSystemLibrary isFolder
public boolean is Read Only return Core File System Library is Read Only stat  isReadOnly CoreFileSystemLibrary isReadOnly
public void set Exists Workspace boolean exists this exists Workspace exists  setExistsWorkspace existsWorkspace
protected void set First Child Unified Tree Node child this child child  setFirstChild UnifiedTreeNode
public void set Resource I Resource resource this resource resource  setResource IResource
public String to String String s resource null null resource get Full Path to String NON NLS 1 return Node s NON NLS 1  toString getFullPath toString
public void remove Children From Tree throws Core Exception tree remove Node Children From Queue this  removeChildrenFromTree CoreException removeNodeChildrenFromQueue
Reuses this object by assigning all new values for the fields public void reuse Unified Tree tree I Resource resource long stat String local Location String local Name boolean exists Workspace this tree tree this child null this resource resource this stat stat this exists Workspace exists Workspace this local Location local Location this local Name local Name  UnifiedTree IResource localLocation localName existsWorkspace existsWorkspace existsWorkspace localLocation localLocation localName localName

private boolean replace Duplicates public Plugin Map Map plugin Models this plugin Models true false  replaceDuplicates PluginMap pluginModels pluginModels
public Plugin Map Map plugin Models boolean preserve Order boolean replace Duplicates this map plugin Models this preserve Order preserve Order this replace Duplicates replace Duplicates  PluginMap pluginModels preserveOrder replaceDuplicates pluginModels preserveOrder preserveOrder replaceDuplicates replaceDuplicates
public void add Plugin Model plugin Model String key plugin Model get Id List ver List List map get key create new index entry if one does not exist for plugin if ver List null ver List new Linked List map put key ver List int i 0 insert plugin into list maintaining version order if preserve Order for i ver List size i Plugin Model element Plugin Model ver List get i if get Version Identifier plugin Model equals get Version Identifier element if replace Duplicates ver List set i plugin Model return ignore duplicates if get Version Identifier plugin Model is Greater Than get Version Identifier element break ver List add i plugin Model size  PluginModel pluginModel pluginModel getId verList verList verList LinkedList verList preserveOrder verList PluginModel PluginModel verList getVersionIdentifier pluginModel getVersionIdentifier replaceDuplicates verList pluginModel getVersionIdentifier pluginModel isGreaterThan getVersionIdentifier verList pluginModel
public Plugin Model get String id String version List versions List map get id if versions null versions is Empty return null if version null Just return the first one in the list random return Plugin Model versions get 0 int version Count versions size for int i 0 i version Count i Plugin Model plugin Model Plugin Model versions get i if plugin Model get Version equals version return plugin Model return null  PluginModel isEmpty PluginModel versionCount versionCount PluginModel pluginModel PluginModel pluginModel getVersion pluginModel
public List get Versions String id return List map get id  getVersions
public Plugin Model get Any String id List versions List map get id if versions null versions is Empty return null return Plugin Model versions get 0  PluginModel getAny isEmpty PluginModel
private Plugin Version Identifier get Version Identifier Plugin Model model if Plugin Version Identifier validate Version model get Version get Severity I Status OK return new Plugin Version Identifier 0 0 0 NON NLS 1 return new Plugin Version Identifier model get Version  PluginVersionIdentifier getVersionIdentifier PluginModel PluginVersionIdentifier validateVersion getVersion getSeverity IStatus PluginVersionIdentifier PluginVersionIdentifier getVersion
public int size return size 
public void mark Read Only for Iterator it map values iterator it has Next List list List it next int count list size for int i 0 i count i Plugin Model list get i mark Read Only  markReadOnly hasNext PluginModel markReadOnly
public Plugin Model remove String plugin Id String version List versions List map get plugin Id if versions null return null for Iterator iter versions iterator iter has Next Plugin Model plugin Model Plugin Model iter next if plugin Model get Id equals plugin Id plugin Model get Version equals version if versions size 1 map remove plugin Id else iter remove size return plugin Model return null  PluginModel pluginId pluginId hasNext PluginModel pluginModel PluginModel pluginModel getId pluginId pluginModel getVersion pluginId pluginModel
public void remove Versions String plugin Id List versions List map remove plugin Id if versions null size versions size  removeVersions pluginId pluginId
public void copy To Array Object array int index 0 for Iterator map Iter map values iterator map Iter has Next List versions List map Iter next for Iterator list Iiter versions iterator list Iiter has Next array index list Iiter next  copyToArray mapIter mapIter hasNext mapIter listIiter listIiter hasNext listIiter

private Service Reference parser Reference public Plugin Parser Factory factory super this factory factory  ServiceReference parserReference PluginParser
Receive a Locator object for document events p By default do nothing Application writers may override this method in a subclass if they wish to store the locator for use with other document events p param locator A locator for all SAX document events see org xml sax Content Handler set Document Locator see org xml sax Locator public void set Document Locator Locator locator this locator locator  ContentHandler setDocumentLocator setDocumentLocator
public void characters char ch int start int length int state Integer state Stack peek int Value if state CONFIGURATION ELEMENT STATE return if state CONFIGURATION ELEMENT STATE Accept character data within an element is when it is part of a configuration element i e an element within an EXTENSION element Configuration Element Model current Config Element Configuration Element Model object Stack peek String value new String ch start length String old Value current Config Element get Value As Is if old Value null if value trim length 0 current Config Element set Value value else current Config Element set Value old Value value  stateStack intValue CONFIGURATION_ELEMENT_STATE CONFIGURATION_ELEMENT_STATE ConfigurationElementModel currentConfigElement ConfigurationElementModel objectStack oldValue currentConfigElement getValueAsIs oldValue currentConfigElement setValue currentConfigElement setValue oldValue
public void end Document  endDocument
public void end Element String uri String element Name String q Name switch Integer state Stack peek int Value case IGNORED ELEMENT STATE state Stack pop break case INITIAL STATE shouldn t get here internal Error Policy bind parse internal Stack element Name NON NLS 1 break case PLUGIN STATE case FRAGMENT STATE if element Name equals PLUGIN element Name equals FRAGMENT state Stack pop Plugin Model root Plugin Model object Stack peek Put the extension points into this plugin Vector ext Point Vector scratch Vectors EXTENSION POINT INDEX if ext Point Vector size 0 root set Declared Extension Points Extension Point Model ext Point Vector to Array new Extension Point Model ext Point Vector size scratch Vectors EXTENSION POINT INDEX remove All Elements Put the extensions into this plugin too Vector ext Vector scratch Vectors EXTENSION INDEX if ext Vector size 0 root set Declared Extensions Extension Model ext Vector to Array new Extension Model ext Vector size scratch Vectors EXTENSION INDEX remove All Elements break case PLUGIN RUNTIME STATE if element Name equals RUNTIME state Stack pop take the vector of library entries and put them into the plugin descriptor Vector lib Vector Vector object Stack pop if lib Vector size 0 Plugin Model model Plugin Model object Stack peek model set Runtime Library Model lib Vector to Array new Library Model lib Vector size break case PLUGIN REQUIRES STATE if element Name equals PLUGIN REQUIRES state Stack pop take the vector of prerequisites and put them into the plugin descriptor Vector import Vector Vector object Stack pop if import Vector size 0 Plugin Model parent Descriptor Plugin Model object Stack peek parent Descriptor set Requires Plugin Prerequisite Model import Vector to Array new Plugin Prerequisite Model import Vector size break case PLUGIN EXTENSION POINT STATE if element Name equals EXTENSION POINT state Stack pop break case PLUGIN EXTENSION STATE if element Name equals EXTENSION state Stack pop Finish up extension object Extension Model current Extension Extension Model object Stack pop Plugin Model parent Plugin Model object Stack peek current Extension set Parent parent scratch Vectors EXTENSION INDEX add Element current Extension break case RUNTIME LIBRARY STATE if element Name equals LIBRARY Library Model cur Library Library Model object Stack pop Clean up the exports for this library entry Vector exports Vector Vector object Stack pop if exports Vector size 0 cur Library set Exports String exports Vector to Array new String exports Vector size Add this library element to the vector runtime on the stack Vector library Vector Vector object Stack peek library Vector add Element cur Library state Stack pop break case LIBRARY EXPORT STATE if element Name equals LIBRARY EXPORT state Stack pop break case PLUGIN REQUIRES IMPORT STATE if element Name equals PLUGIN REQUIRES IMPORT state Stack pop break case CONFIGURATION ELEMENT STATE We don t care what the element name was state Stack pop Now finish up the configuration element object Configuration Element Model current Config Element Configuration Element Model object Stack pop String value current Config Element get Value As Is if value null current Config Element set Value value trim Object parent object Stack peek current Config Element set Parent parent if Integer state Stack peek int Value PLUGIN EXTENSION STATE Want to add this configuration element to the subelements of an extension Configuration Element Model old Values Configuration Element Model Extension Model parent get Sub Elements int size old Values null 0 old Values length Configuration Element Model new Values new Configuration Element Model size 1 for int i 0 i size i new Values i old Values i new Values size current Config Element Extension Model parent set Sub Elements new Values else Configuration Element Model old Values Configuration Element Model Configuration Element Model parent get Sub Elements int size old Values null 0 old Values length Configuration Element Model new Values new Configuration Element Model size 1 for int i 0 i size i new Values i old Values i new Values size current Config Element Configuration Element Model parent set Sub Elements new Values break  endElement elementName qName stateStack intValue IGNORED_ELEMENT_STATE stateStack INITIAL_STATE internalError internalStack elementName PLUGIN_STATE FRAGMENT_STATE elementName elementName stateStack PluginModel PluginModel objectStack extPointVector scratchVectors EXTENSION_POINT_INDEX extPointVector setDeclaredExtensionPoints ExtensionPointModel extPointVector toArray ExtensionPointModel extPointVector scratchVectors EXTENSION_POINT_INDEX removeAllElements extVector scratchVectors EXTENSION_INDEX extVector setDeclaredExtensions ExtensionModel extVector toArray ExtensionModel extVector scratchVectors EXTENSION_INDEX removeAllElements PLUGIN_RUNTIME_STATE elementName stateStack libVector objectStack libVector PluginModel PluginModel objectStack setRuntime LibraryModel libVector toArray LibraryModel libVector PLUGIN_REQUIRES_STATE elementName PLUGIN_REQUIRES stateStack importVector objectStack importVector PluginModel parentDescriptor PluginModel objectStack parentDescriptor setRequires PluginPrerequisiteModel importVector toArray PluginPrerequisiteModel importVector PLUGIN_EXTENSION_POINT_STATE elementName EXTENSION_POINT stateStack PLUGIN_EXTENSION_STATE elementName stateStack ExtensionModel currentExtension ExtensionModel objectStack PluginModel PluginModel objectStack currentExtension setParent scratchVectors EXTENSION_INDEX addElement currentExtension RUNTIME_LIBRARY_STATE elementName LibraryModel curLibrary LibraryModel objectStack exportsVector objectStack exportsVector curLibrary setExports exportsVector toArray exportsVector libraryVector objectStack libraryVector addElement curLibrary stateStack LIBRARY_EXPORT_STATE elementName LIBRARY_EXPORT stateStack PLUGIN_REQUIRES_IMPORT_STATE elementName PLUGIN_REQUIRES_IMPORT stateStack CONFIGURATION_ELEMENT_STATE stateStack ConfigurationElementModel currentConfigElement ConfigurationElementModel objectStack currentConfigElement getValueAsIs currentConfigElement setValue objectStack currentConfigElement setParent stateStack intValue PLUGIN_EXTENSION_STATE ConfigurationElementModel oldValues ConfigurationElementModel ExtensionModel getSubElements oldValues oldValues ConfigurationElementModel newValues ConfigurationElementModel newValues oldValues newValues currentConfigElement ExtensionModel setSubElements newValues ConfigurationElementModel oldValues ConfigurationElementModel ConfigurationElementModel getSubElements oldValues oldValues ConfigurationElementModel newValues ConfigurationElementModel newValues oldValues newValues currentConfigElement ConfigurationElementModel setSubElements newValues
public void error SAX Parse Exception ex log Status ex  SAXParseException logStatus
public void fatal Error SAX Parse Exception ex throws SAX Exception log Status ex throw ex  fatalError SAXParseException SAXException logStatus
public void handle Extension Point State String element Name Attributes attributes We ignore all elements under extension points if there are any state Stack push new Integer IGNORED ELEMENT STATE internal Error Policy bind parse unknown Element EXTENSION POINT element Name NON NLS 1  handleExtensionPointState elementName stateStack IGNORED_ELEMENT_STATE internalError unknownElement EXTENSION_POINT elementName
public void handle Extension State String element Name Attributes attributes You need to change the state here even though we will be executing the same code for Extension State and Configuration Element State We ignore the name of the element for Configuration Elements When we are wrapping up we will want to add each configuration element object to the sub Elements vector of its parent configuration element object However the first configuration element object we created the last one we pop off the stack will need to be added to a vector in the extension object called  configuration state Stack push new Integer CONFIGURATION ELEMENT STATE create a new Configuration Element and push it onto the object stack Configuration Element Model current Configuration Element factory create Configuration Element object Stack push current Configuration Element current Configuration Element set Name element Name Processing the attributes of a configuration element involves creating a new configuration property for each attribute and populating the configuration property with the name value pair of the attribute Note there will be one configuration property for each attribute parse Configuration Element Attributes attributes  handleExtensionState elementName ExtensionState ConfigurationElementState ConfigurationElements subElements _configuration stateStack CONFIGURATION_ELEMENT_STATE ConfigurationElementModel currentConfigurationElement createConfigurationElement objectStack currentConfigurationElement currentConfigurationElement setName elementName parseConfigurationElementAttributes
public void handle Initial State String element Name Attributes attributes if element Name equals PLUGIN state Stack push new Integer PLUGIN STATE parse Plugin Attributes attributes else if element Name equals FRAGMENT state Stack push new Integer FRAGMENT STATE parse Fragment Attributes attributes else state Stack push new Integer IGNORED ELEMENT STATE internal Error Policy bind parse unknown Top Element element Name NON NLS 1  handleInitialState elementName elementName stateStack PLUGIN_STATE parsePluginAttributes elementName stateStack FRAGMENT_STATE parseFragmentAttributes stateStack IGNORED_ELEMENT_STATE internalError unknownTopElement elementName
public void handle Library Export State String element Name Attributes attributes All elements ignored state Stack push new Integer IGNORED ELEMENT STATE internal Error Policy bind parse unknown Element LIBRARY EXPORT element Name NON NLS 1  handleLibraryExportState elementName stateStack IGNORED_ELEMENT_STATE internalError unknownElement LIBRARY_EXPORT elementName
public void handle Library State String element Name Attributes attributes if element Name equals LIBRARY EXPORT Change State state Stack push new Integer LIBRARY EXPORT STATE The top element on the stack much be a library element Library Model current Lib Library Model object Stack peek if attributes null return String mask Value null Process Attributes int len attributes get Length for int i 0 i len i String attr Name attributes get Local Name i String attr Value attributes get Value i trim if attr Name equals LIBRARY EXPORT MASK mask Value attr Value else internal Error Policy bind parse unknown Attribute LIBRARY attr Name NON NLS 1 set up mask tables pop off the library already in current Lib object Stack pop Vector export Mask Vector object Stack peek push library back on object Stack push current Lib if mask Value null export Mask contains mask Value export Mask add Element mask Value return if element Name equals LIBRARY PACKAGES Library Model current Lib Library Model object Stack peek if attributes null return for int i 0 i attributes get Length i if LIBRARY PACKAGES PREFIXES equals attributes get Local Name i String line attributes get Value i String prefixes get Array From List line current Lib set Package Prefixes prefixes return Any other element is invalid state Stack push new Integer IGNORED ELEMENT STATE internal Error Policy bind parse unknown Element LIBRARY element Name NON NLS 1 return  handleLibraryState elementName elementName LIBRARY_EXPORT stateStack LIBRARY_EXPORT_STATE LibraryModel currentLib LibraryModel objectStack maskValue getLength attrName getLocalName attrValue getValue attrName LIBRARY_EXPORT_MASK maskValue attrValue internalError unknownAttribute attrName currentLib objectStack exportMask objectStack objectStack currentLib maskValue exportMask maskValue exportMask addElement maskValue elementName LIBRARY_PACKAGES LibraryModel currentLib LibraryModel objectStack getLength LIBRARY_PACKAGES_PREFIXES getLocalName getValue getArrayFromList currentLib setPackagePrefixes stateStack IGNORED_ELEMENT_STATE internalError unknownElement elementName
convert a list of comma separated tokens into an array protected static String get Array From List String line if line null line trim length 0 return null Vector list new Vector String Tokenizer tokens new String Tokenizer line NON NLS 1 while tokens has More Tokens String token tokens next Token trim if token length 0 list add Element token return list is Empty null String list to Array new String 0  getArrayFromList StringTokenizer StringTokenizer hasMoreTokens nextToken addElement isEmpty toArray
public void handle Plugin State String element Name Attributes attributes if element Name equals RUNTIME We should only have one Runtime element in a plugin or fragment Object what Is It object Stack peek if what Is It instanceof Plugin Descriptor Model Plugin Descriptor Model object Stack peek get Runtime null what Is It instanceof Plugin Fragment Model Plugin Fragment Model object Stack peek get Runtime null This is at least the 2nd Runtime element we have hit Ignore it and give an error state Stack push new Integer IGNORED ELEMENT STATE return state Stack push new Integer PLUGIN RUNTIME STATE Push a new vector to hold all the library entries object Stack push new Vector return if element Name equals PLUGIN REQUIRES state Stack push new Integer PLUGIN REQUIRES STATE Push a new vector to hold all the prerequisites object Stack push new Vector parse Requires Attributes attributes return if element Name equals EXTENSION POINT state Stack push new Integer PLUGIN EXTENSION POINT STATE parse Extension Point Attributes attributes return if element Name equals EXTENSION state Stack push new Integer PLUGIN EXTENSION STATE parse Extension Attributes attributes return If we get to this point the element name is one we don t currently accept Set the state to indicate that this element will be ignored state Stack push new Integer IGNORED ELEMENT STATE internal Error Policy bind parse unknown Element PLUGIN FRAGMENT element Name NON NLS 1 NON NLS 2  handlePluginState elementName elementName whatIsIt objectStack whatIsIt PluginDescriptorModel PluginDescriptorModel objectStack getRuntime whatIsIt PluginFragmentModel PluginFragmentModel objectStack getRuntime stateStack IGNORED_ELEMENT_STATE stateStack PLUGIN_RUNTIME_STATE objectStack elementName PLUGIN_REQUIRES stateStack PLUGIN_REQUIRES_STATE objectStack parseRequiresAttributes elementName EXTENSION_POINT stateStack PLUGIN_EXTENSION_POINT_STATE parseExtensionPointAttributes elementName stateStack PLUGIN_EXTENSION_STATE parseExtensionAttributes stateStack IGNORED_ELEMENT_STATE internalError unknownElement elementName
public void handle Requires Import State String element Name Attributes attributes All elements ignored state Stack push new Integer IGNORED ELEMENT STATE internal Error Policy bind parse unknown Element PLUGIN REQUIRES IMPORT element Name NON NLS 1  handleRequiresImportState elementName stateStack IGNORED_ELEMENT_STATE internalError unknownElement PLUGIN_REQUIRES_IMPORT elementName
public void handle Requires State String element Name Attributes attributes if element Name equals PLUGIN REQUIRES IMPORT parse Plugin Requires Import attributes return If we get to this point the element name is one we don t currently accept Set the state to indicate that this element will be ignored state Stack push new Integer IGNORED ELEMENT STATE internal Error Policy bind parse unknown Element PLUGIN REQUIRES element Name NON NLS 1  handleRequiresState elementName elementName PLUGIN_REQUIRES_IMPORT parsePluginRequiresImport stateStack IGNORED_ELEMENT_STATE internalError unknownElement PLUGIN_REQUIRES elementName
public void handle Runtime State String element Name Attributes attributes if element Name equals LIBRARY Change State state Stack push new Integer RUNTIME LIBRARY STATE Process library attributes parse Library Attributes attributes return If we get to this point the element name is one we don t currently accept Set the state to indicate that this element will be ignored state Stack push new Integer IGNORED ELEMENT STATE internal Error Policy bind parse unknown Element RUNTIME element Name NON NLS 1  handleRuntimeState elementName elementName stateStack RUNTIME_LIBRARY_STATE parseLibraryAttributes stateStack IGNORED_ELEMENT_STATE internalError unknownElement elementName
public void ignoreable Whitespace char ch int start int length  ignoreableWhitespace
private void log Status SAX Parse Exception ex String name ex get System Id if name null name location Name if name null name NON NLS 1 else name name substring 1 name last Index Of NON NLS 1 String msg if name equals NON NLS 1 msg Policy bind parse error ex get Message NON NLS 1 else msg Policy bind parse error Name Line Column NON NLS 1 new String name Integer to String ex get Line Number Integer to String ex get Column Number ex get Message factory error new Status I Status WARNING Platform PI RUNTIME Platform PARSE PROBLEM msg ex  logStatus SAXParseException getSystemId locationName lastIndexOf getMessage errorNameLineColumn toString getLineNumber toString getColumnNumber getMessage IStatus PI_RUNTIME PARSE_PROBLEM
synchronized public Plugin Model parse Plugin Input Source in throws Exception SAX Parser Factory factory acquireXML Parsing if factory null return null TODO we log an error try location Name in get System Id factory set Namespace Aware true factory set Namespace Aware true try factory set Feature http xml org sax features string interning true NON NLS 1 catch SAX Exception se ignore we can still operate without string interning factory set Validating false factory newSAX Parser parse in this return Plugin Model object Stack pop finally releaseXML Parsing  PluginModel parsePlugin InputSource SAXParserFactory acquireXMLParsing locationName getSystemId setNamespaceAware setNamespaceAware setFeature SAXException setValidating newSAXParser PluginModel objectStack releaseXMLParsing
private SAX Parser Factory acquireXML Parsing parser Reference Internal Platform get Default get Bundle Context get Service Reference javax xml parsers SAX Parser Factory NON NLS 1 if parser Reference null return null return SAX Parser Factory Internal Platform get Default get Bundle Context get Service parser Reference  SAXParserFactory acquireXMLParsing parserReference InternalPlatform getDefault getBundleContext getServiceReference SAXParserFactory parserReference SAXParserFactory InternalPlatform getDefault getBundleContext getService parserReference
private void releaseXML Parsing if parser Reference null Internal Platform get Default get Bundle Context unget Service parser Reference  releaseXMLParsing parserReference InternalPlatform getDefault getBundleContext ungetService parserReference
public void parse Configuration Element Attributes Attributes attributes Configuration Element Model parent Configuration Element Configuration Element Model object Stack peek parent Configuration Element set Start Line locator get Line Number Vector prop Vector null process attributes int len attributes null attributes get Length 0 if len 0 return prop Vector new Vector for int i 0 i len i String attr Name attributes get Local Name i String attr Value attributes get Value i Configuration Property Model current Configuration Property factory create Configuration Property current Configuration Property set Name attr Name current Configuration Property set Value attr Value prop Vector add Element current Configuration Property parent Configuration Element set Properties Configuration Property Model prop Vector to Array new Configuration Property Model prop Vector size prop Vector null  parseConfigurationElementAttributes ConfigurationElementModel parentConfigurationElement ConfigurationElementModel objectStack parentConfigurationElement setStartLine getLineNumber propVector getLength propVector attrName getLocalName attrValue getValue ConfigurationPropertyModel currentConfigurationProperty createConfigurationProperty currentConfigurationProperty setName attrName currentConfigurationProperty setValue attrValue propVector addElement currentConfigurationProperty parentConfigurationElement setProperties ConfigurationPropertyModel propVector toArray ConfigurationPropertyModel propVector propVector
public void parse Extension Attributes Attributes attributes Plugin Model parent Plugin Model object Stack peek Extension Model current Extension factory create Extension current Extension set Start Line locator get Line Number object Stack push current Extension Process Attributes int len attributes null attributes get Length 0 for int i 0 i len i String attr Name attributes get Local Name i String attr Value attributes get Value i trim if attr Name equals EXTENSION NAME current Extension set Name attr Value else if attr Name equals EXTENSION ID current Extension set Id attr Value else if attr Name equals EXTENSION TARGET check if point is specified as a simple or qualified name String target Name if attr Value last Index Of 1 String base Id parent instanceof Plugin Descriptor Model parent get Id Plugin Fragment Model parent get Plugin target Name base Id attr Value NON NLS 1 else target Name attr Value current Extension set Extension Point target Name else internal Error Policy bind parse unknown Attribute EXTENSION attr Name NON NLS 1  parseExtensionAttributes PluginModel PluginModel objectStack ExtensionModel currentExtension createExtension currentExtension setStartLine getLineNumber objectStack currentExtension getLength attrName getLocalName attrValue getValue attrName EXTENSION_NAME currentExtension setName attrValue attrName EXTENSION_ID currentExtension setId attrValue attrName EXTENSION_TARGET targetName attrValue lastIndexOf baseId PluginDescriptorModel getId PluginFragmentModel getPlugin targetName baseId attrValue targetName attrValue currentExtension setExtensionPoint targetName internalError unknownAttribute attrName
public void parse Extension Point Attributes Attributes attributes Extension Point Model current Ext Point factory create Extension Point current Ext Point set Start Line locator get Line Number Process Attributes int len attributes null attributes get Length 0 for int i 0 i len i String attr Name attributes get Local Name i String attr Value attributes get Value i trim if attr Name equals EXTENSION POINT NAME current Ext Point set Name attr Value else if attr Name equals EXTENSION POINT ID current Ext Point set Id attr Value else if attr Name equals EXTENSION POINT SCHEMA current Ext Point set Schema attr Value else internal Error Policy bind parse unknown Attribute EXTENSION POINT attr Name NON NLS 1 current Ext Point contains a pointer to the parent plugin descriptor Plugin Model root Plugin Model object Stack peek current Ext Point set Parent root Now populate the the vector just below us on the object Stack with this extension point scratch Vectors EXTENSION POINT INDEX add Element current Ext Point  parseExtensionPointAttributes ExtensionPointModel currentExtPoint createExtensionPoint currentExtPoint setStartLine getLineNumber getLength attrName getLocalName attrValue getValue attrName EXTENSION_POINT_NAME currentExtPoint setName attrValue attrName EXTENSION_POINT_ID currentExtPoint setId attrValue attrName EXTENSION_POINT_SCHEMA currentExtPoint setSchema attrValue internalError unknownAttribute EXTENSION_POINT attrName currentExtPoint PluginModel PluginModel objectStack currentExtPoint setParent objectStack scratchVectors EXTENSION_POINT_INDEX addElement currentExtPoint
public void parse Fragment Attributes Attributes attributes Plugin Fragment Model current factory create Plugin Fragment current set Start Line locator get Line Number object Stack push current process attributes int len attributes get Length for int i 0 i len i String attr Name attributes get Local Name i String attr Value attributes get Value i trim if attr Name equals FRAGMENT ID current set Id attr Value else if attr Name equals FRAGMENT NAME current set Name attr Value else if attr Name equals FRAGMENT VERSION current set Version attr Value else if attr Name equals FRAGMENT PROVIDER current set Provider Name attr Value else if attr Name equals FRAGMENT PLUGIN ID current set Plugin attr Value else if attr Name equals FRAGMENT PLUGIN VERSION current set Plugin Version attr Value else if attr Name equals FRAGMENT PLUGIN MATCH if FRAGMENT PLUGIN MATCH PERFECT equals attr Value current set Match Plugin Fragment Model FRAGMENT MATCH PERFECT else if FRAGMENT PLUGIN MATCH EQUIVALENT equals attr Value current set Match Plugin Fragment Model FRAGMENT MATCH EQUIVALENT else if FRAGMENT PLUGIN MATCH COMPATIBLE equals attr Value current set Match Plugin Fragment Model FRAGMENT MATCH COMPATIBLE else if FRAGMENT PLUGIN MATCH GREATER OR EQUAL equals attr Value current set Match Plugin Fragment Model FRAGMENT MATCH GREATER OR EQUAL else internal Error Policy bind parse valid Match attr Value NON NLS 1 else internal Error Policy bind parse unknown Attribute FRAGMENT attr Name NON NLS 1  parseFragmentAttributes PluginFragmentModel createPluginFragment setStartLine getLineNumber objectStack getLength attrName getLocalName attrValue getValue attrName FRAGMENT_ID setId attrValue attrName FRAGMENT_NAME setName attrValue attrName FRAGMENT_VERSION setVersion attrValue attrName FRAGMENT_PROVIDER setProviderName attrValue attrName FRAGMENT_PLUGIN_ID setPlugin attrValue attrName FRAGMENT_PLUGIN_VERSION setPluginVersion attrValue attrName FRAGMENT_PLUGIN_MATCH FRAGMENT_PLUGIN_MATCH_PERFECT attrValue setMatch PluginFragmentModel FRAGMENT_MATCH_PERFECT FRAGMENT_PLUGIN_MATCH_EQUIVALENT attrValue setMatch PluginFragmentModel FRAGMENT_MATCH_EQUIVALENT FRAGMENT_PLUGIN_MATCH_COMPATIBLE attrValue setMatch PluginFragmentModel FRAGMENT_MATCH_COMPATIBLE FRAGMENT_PLUGIN_MATCH_GREATER_OR_EQUAL attrValue setMatch PluginFragmentModel FRAGMENT_MATCH_GREATER_OR_EQUAL internalError validMatch attrValue internalError unknownAttribute attrName
public void parse Library Attributes Attributes attributes Push a vector to hold the export mask object Stack push new Vector Library Model current factory create Library current set Start Line locator get Line Number object Stack push current Now the object Stack should contain the following plugin descriptor or fragment bottom of the stack vector to hold all the library entries vector to hold the export mask for this library entry this library entry top of the stack process attributes int len attributes null attributes get Length 0 for int i 0 i len i String attr Name attributes get Local Name i String attr Value attributes get Value i trim if attr Name equals LIBRARY NAME current set Name attr Value else if attr Name equals LIBRARY TYPE attr Value attr Value to Lower Case if attr Value equals Library Model CODE attr Value equals Library Model RESOURCE current set Type attr Value to Lower Case else internal Error Policy bind parse unknown Library Type attr Value current get Name NON NLS 1 else internal Error Policy bind parse unknown Attribute LIBRARY attr Name NON NLS 1  parseLibraryAttributes objectStack LibraryModel createLibrary setStartLine getLineNumber objectStack objectStack getLength attrName getLocalName attrValue getValue attrName LIBRARY_NAME setName attrValue attrName LIBRARY_TYPE attrValue attrValue toLowerCase attrValue LibraryModel attrValue LibraryModel setType attrValue toLowerCase internalError unknownLibraryType attrValue getName internalError unknownAttribute attrName
public void parse Plugin Attributes Attributes attributes Plugin Descriptor Model current factory create Plugin Descriptor current set Start Line locator get Line Number object Stack push current process attributes int len attributes get Length for int i 0 i len i String attr Name attributes get Local Name i String attr Value attributes get Value i trim if attr Name equals PLUGIN ID current set Id attr Value else if attr Name equals PLUGIN NAME current set Name attr Value else if attr Name equals PLUGIN VERSION current set Version attr Value else if attr Name equals PLUGIN VENDOR attr Name equals PLUGIN PROVIDER current set Provider Name attr Value else if attr Name equals PLUGIN CLASS current set Plugin Class attr Value else internal Error Policy bind parse unknown Attribute PLUGIN attr Name NON NLS 1  parsePluginAttributes PluginDescriptorModel createPluginDescriptor setStartLine getLineNumber objectStack getLength attrName getLocalName attrValue getValue attrName PLUGIN_ID setId attrValue attrName PLUGIN_NAME setName attrValue attrName PLUGIN_VERSION setVersion attrValue attrName PLUGIN_VENDOR attrName PLUGIN_PROVIDER setProviderName attrValue attrName PLUGIN_CLASS setPluginClass attrValue internalError unknownAttribute attrName
public void parse Plugin Requires Import Attributes attributes Plugin Prerequisite Model current factory create Plugin Prerequisite current set Start Line locator get Line Number process attributes int len attributes null attributes get Length 0 for int i 0 i len i String attr Name attributes get Local Name i String attr Value attributes get Value i trim if attr Name equals PLUGIN REQUIRES PLUGIN current set Plugin attr Value else if attr Name equals PLUGIN REQUIRES PLUGIN VERSION current set Version attr Value else if attr Name equals PLUGIN REQUIRES OPTIONAL current set Optional TRUE equals Ignore Case attr Value else if attr Name equals PLUGIN REQUIRES MATCH if PLUGIN REQUIRES MATCH PERFECT equals attr Value current set Match Byte Plugin Prerequisite Model PREREQ MATCH PERFECT else if PLUGIN REQUIRES MATCH EQUIVALENT equals attr Value PLUGIN REQUIRES MATCH EXACT equals attr Value current set Match Byte Plugin Prerequisite Model PREREQ MATCH EQUIVALENT else if PLUGIN REQUIRES MATCH COMPATIBLE equals attr Value current set Match Byte Plugin Prerequisite Model PREREQ MATCH COMPATIBLE else if PLUGIN REQUIRES MATCH GREATER OR EQUAL equals attr Value current set Match Byte Plugin Prerequisite Model PREREQ MATCH GREATER OR EQUAL else internal Error Policy bind parse valid Match attr Value NON NLS 1 else if attr Name equals PLUGIN REQUIRES EXPORT if TRUE equals attr Value current set Export true else if FALSE equals attr Value current set Export false else internal Error Policy bind parse valid Export attr Value NON NLS 1 else internal Error Policy bind parse unknown Attribute PLUGIN REQUIRES IMPORT attr Name NON NLS 1 Populate the vector of prerequisites with this new element Vector object Stack peek add Element current  parsePluginRequiresImport PluginPrerequisiteModel createPluginPrerequisite setStartLine getLineNumber getLength attrName getLocalName attrValue getValue attrName PLUGIN_REQUIRES_PLUGIN setPlugin attrValue attrName PLUGIN_REQUIRES_PLUGIN_VERSION setVersion attrValue attrName PLUGIN_REQUIRES_OPTIONAL setOptional equalsIgnoreCase attrValue attrName PLUGIN_REQUIRES_MATCH PLUGIN_REQUIRES_MATCH_PERFECT attrValue setMatchByte PluginPrerequisiteModel PREREQ_MATCH_PERFECT PLUGIN_REQUIRES_MATCH_EQUIVALENT attrValue PLUGIN_REQUIRES_MATCH_EXACT attrValue setMatchByte PluginPrerequisiteModel PREREQ_MATCH_EQUIVALENT PLUGIN_REQUIRES_MATCH_COMPATIBLE attrValue setMatchByte PluginPrerequisiteModel PREREQ_MATCH_COMPATIBLE PLUGIN_REQUIRES_MATCH_GREATER_OR_EQUAL attrValue setMatchByte PluginPrerequisiteModel PREREQ_MATCH_GREATER_OR_EQUAL internalError validMatch attrValue attrName PLUGIN_REQUIRES_EXPORT attrValue setExport attrValue setExport internalError validExport attrValue internalError unknownAttribute PLUGIN_REQUIRES_IMPORT attrName objectStack addElement
public void parse Requires Attributes Attributes attributes  parseRequiresAttributes
static String replace String s String from String to String str s int from Len from length int to Len to length int ix str index Of from while ix 1 str str substring 0 ix to str substring ix from Len ix str index Of from ix to Len return str  fromLen toLen indexOf fromLen indexOf toLen
public void start Document state Stack push new Integer INITIAL STATE for int i 0 i LAST INDEX i scratch Vectors i new Vector  startDocument stateStack INITIAL_STATE LAST_INDEX scratchVectors
public void start Element String uri String element Name String q Name Attributes attributes switch Integer state Stack peek int Value case INITIAL STATE handle Initial State element Name attributes break case FRAGMENT STATE handle Plugin State element Name attributes break case PLUGIN STATE handle Plugin State element Name attributes break case PLUGIN RUNTIME STATE handle Runtime State element Name attributes break case PLUGIN REQUIRES STATE handle Requires State element Name attributes break case PLUGIN EXTENSION POINT STATE handle Extension Point State element Name attributes break case PLUGIN EXTENSION STATE case CONFIGURATION ELEMENT STATE handle Extension State element Name attributes break case RUNTIME LIBRARY STATE handle Library State element Name attributes break case LIBRARY EXPORT STATE handle Library Export State element Name attributes break case PLUGIN REQUIRES IMPORT STATE handle Requires Import State element Name attributes break default state Stack push new Integer IGNORED ELEMENT STATE internal Error Policy bind parse unknown Top Element element Name NON NLS 1  startElement elementName qName stateStack intValue INITIAL_STATE handleInitialState elementName FRAGMENT_STATE handlePluginState elementName PLUGIN_STATE handlePluginState elementName PLUGIN_RUNTIME_STATE handleRuntimeState elementName PLUGIN_REQUIRES_STATE handleRequiresState elementName PLUGIN_EXTENSION_POINT_STATE handleExtensionPointState elementName PLUGIN_EXTENSION_STATE CONFIGURATION_ELEMENT_STATE handleExtensionState elementName RUNTIME_LIBRARY_STATE handleLibraryState elementName LIBRARY_EXPORT_STATE handleLibraryExportState elementName PLUGIN_REQUIRES_IMPORT_STATE handleRequiresImportState elementName stateStack IGNORED_ELEMENT_STATE internalError unknownTopElement elementName
public void warning SAX Parse Exception ex log Status ex  SAXParseException logStatus
private void internal Error String message if location Name null factory error new Status I Status WARNING Platform PI RUNTIME Platform PARSE PROBLEM location Name message null NON NLS 1 else factory error new Status I Status WARNING Platform PI RUNTIME Platform PARSE PROBLEM message null  internalError locationName IStatus PI_RUNTIME PARSE_PROBLEM locationName IStatus PI_RUNTIME PARSE_PROBLEM

private Registry Loader Factory factory boolean debug super this debug debug this factory factory  RegistryLoader
private void debug String msg long this Tick System current Time Millis System out println Registry Loader msg this Tick last Tick ms NON NLS 1 NON NLS 2 NON NLS 3 last Tick this Tick  thisTick currentTimeMillis RegistryLoader thisTick lastTick lastTick thisTick
private String get Path Members URL path String list null String protocol path get Protocol if protocol equals file NON NLS 1 list new File path get File list else XXX attempt to read URL and see if we got html dir page return list null new String 0 list  getPathMembers getProtocol getFile
Reports an error and returns true private boolean parse Problem String message factory error new Status I Status WARNING Platform PI RUNTIME Platform PARSE PROBLEM message null return true  parseProblem IStatus PI_RUNTIME PARSE_PROBLEM
private Plugin Registry Model parse Registry URL plugin Path long start Tick System current Time Millis Plugin Registry Model result process Manifest Files plugin Path if Internal Platform DEBUG long end Tick System current Time Millis debug Parsed Registry end Tick start Tick ms NON NLS 1 NON NLS 2 return result  PluginRegistryModel parseRegistry pluginPath startTick currentTimeMillis PluginRegistryModel processManifestFiles pluginPath InternalPlatform endTick currentTimeMillis endTick startTick
public static Plugin Registry Model parse Registry URL plugin Path Factory factory boolean debug return new Registry Loader factory debug parse Registry plugin Path  PluginRegistryModel parseRegistry pluginPath RegistryLoader parseRegistry pluginPath
private Plugin Model process Manifest File URL manifest Input Stream is null try is manifest open Stream catch IO Exception e if debug debug No plugin found for manifest NON NLS 1 return null Plugin Model result null try try Input Source in new Input Source is Give the system id a value in case we want it for error reporting within the parser in set System Id manifest get File result new Plugin Parser Factory factory parse Plugin in finally is close catch SAX Parse Exception se exception details logged by parser factory error new Status I Status WARNING Platform PI RUNTIME Platform PARSE PROBLEM Policy bind parse error Processing manifest to String null NON NLS 1 catch Exception e factory error new Status I Status WARNING Platform PI RUNTIME Platform PARSE PROBLEM Policy bind parse error Processing manifest to String e get Message null NON NLS 1 NON NLS 2 return result  PluginModel processManifestFile InputStream openStream IOException PluginModel InputSource InputSource setSystemId getFile PluginParser parsePlugin SAXParseException IStatus PI_RUNTIME PARSE_PROBLEM errorProcessing toString IStatus PI_RUNTIME PARSE_PROBLEM errorProcessing toString getMessage
private Plugin Registry Model process Manifest Files URL plugin Path Plugin Registry Model result factory create Plugin Registry for int i 0 i plugin Path length i process Plugin Path Entry result plugin Path i return result  PluginRegistryModel processManifestFiles pluginPath PluginRegistryModel createPluginRegistry pluginPath processPluginPathEntry pluginPath
private void process Plugin Path Entry Plugin Registry Model registry URL location if debug debug Path location NON NLS 1 if location get File ends With NON NLS 1 directory entry search for plugins String members get Path Members location for int j 0 j members length j boolean found false try found process Plugin Path File registry new URL location members j plugin xml NON NLS 1 if found found process Plugin Path File registry new URL location members j fragment xml NON NLS 1 catch MalformedURL Exception e Skip bad UR Ls if debug debug found Processed Processed not found members j NON NLS 1 NON NLS 2 else specific file entry load the given file boolean found process Plugin Path File registry location if debug debug found Processed Processed not found location NON NLS 1 NON NLS 2  processPluginPathEntry PluginRegistryModel getFile endsWith getPathMembers processPluginPathFile processPluginPathFile MalformedURLException URLs processPluginPathFile
return true if a file was found at the given location and false otherwise private boolean process Plugin Path File Plugin Registry Model registry URL location Plugin Model entry process Manifest File location if entry null return false Make sure all the required fields are here This prevents us from things like Null Pointer Exceptions when we are assuming a field exists if required Plugin Model entry location entry null return false entry set Version get Qualified Version entry location check for version qualifier if entry instanceof Plugin Descriptor Model if entry get Id null entry get Version null return parse Problem Policy bind parse null Plugin Identifier location to String NON NLS 1 skip duplicate entries if registry get Plugin entry get Id entry get Version null return parse Problem Policy bind parse duplicate Plugin entry get Id location to String NON NLS 1 registry add Plugin Plugin Descriptor Model entry else if entry get Id null entry get Version null return parse Problem Policy bind parse null Fragment Identifier location to String NON NLS 1 if entry instanceof Plugin Fragment Model registry add Fragment Plugin Fragment Model entry else return parse Problem Policy bind parse unknown Entry location to String NON NLS 1 String url location to String url url substring 0 1 url last Index Of entry set Registry registry entry set Location url this is for the registry cache Internal Platform add Last Modified Time location get File new File location get File last Modified return true  processPluginPathFile PluginRegistryModel PluginModel processManifestFile NullPointerExceptions requiredPluginModel setVersion getQualifiedVersion PluginDescriptorModel getId getVersion parseProblem nullPluginIdentifier toString getPlugin getId getVersion parseProblem duplicatePlugin getId toString addPlugin PluginDescriptorModel getId getVersion parseProblem nullFragmentIdentifier toString PluginFragmentModel addFragment PluginFragmentModel parseProblem unknownEntry toString toString lastIndexOf setRegistry setLocation InternalPlatform addLastModifiedTime getFile getFile lastModified
private String get Qualified Version Plugin Model entry URL base if entry null entry get Version null entry get Id null return null Input Stream is null try check to see if we have buildmanifest properties for this plugin URL manifest null manifest new URL base buildmanifest properties NON NLS 1 Properties props new Properties is manifest open Stream props load is lookup qualifier for this plugin and morph the identifier if needed String key plugin entry get Id NON NLS 1 String qualifier props get Property key if qualifier null return entry get Version Plugin Version Identifier v new Plugin Version Identifier entry get Version if v get Qualifier Component equals NON NLS 1 return entry get Version else return new Plugin Version Identifier v get Major Component v get Minor Component v get Service Component qualifier to String catch Exception e return entry get Version finally if is null try is close catch IO Exception e Don t throw anything back if the close fails  getQualifiedVersion PluginModel getVersion getId InputStream openStream getId getProperty getVersion PluginVersionIdentifier PluginVersionIdentifier getVersion getQualifierComponent getVersion PluginVersionIdentifier getMajorComponent getMinorComponent getServiceComponent toString getVersion IOException
private boolean required Plugin Model Plugin Model plugin URL location String name plugin get Name String id plugin get Id String version plugin get Version int name Length name null 0 name length int id Length id null 0 id length int version Length version null 0 version length if name Length 0 parse Problem Policy bind parse missing Plugin Name location to String NON NLS 1 return false if id Length 0 parse Problem Policy bind parse missing Plugin Id location to String NON NLS 1 return false if version Length 0 parse Problem Policy bind parse missing Plugin Version location to String NON NLS 1 return false if plugin instanceof Plugin Fragment Model String plugin Name Plugin Fragment Model plugin get Plugin String plugin Version Plugin Fragment Model plugin get Plugin Version int p Name Length plugin Name null 0 plugin Name length int p Name Version plugin Version null 0 plugin Version length if p Name Length 0 parse Problem Policy bind parse missingFP Name location to String NON NLS 1 return false if p Name Version 0 parse Problem Policy bind parse missingFP Version location to String NON NLS 1 return false return true  requiredPluginModel PluginModel getName getId getVersion nameLength idLength versionLength nameLength parseProblem missingPluginName toString idLength parseProblem missingPluginId toString versionLength parseProblem missingPluginVersion toString PluginFragmentModel pluginName PluginFragmentModel getPlugin pluginVersion PluginFragmentModel getPluginVersion pNameLength pluginName pluginName pNameVersion pluginVersion pluginVersion pNameLength parseProblem missingFPName toString pNameVersion parseProblem missingFPVersion toString

private Constraint Plugin Descriptor Model parent Plugin Prerequisite Model prq this parent parent this prq prq if prq null ver Registry Resolver this get Version Identifier prq type prq get Match Byte if ver null type Plugin Prerequisite Model PREREQ MATCH UNSPECIFIED type Plugin Prerequisite Model PREREQ MATCH COMPATIBLE  PluginDescriptorModel PluginPrerequisiteModel RegistryResolver getVersionIdentifier getMatchByte PluginPrerequisiteModel PREREQ_MATCH_UNSPECIFIED PluginPrerequisiteModel PREREQ_MATCH_COMPATIBLE
private int get Match Type return type  getMatchType
private Constraints Entry get Constraints Entry return c Entry  ConstraintsEntry getConstraintsEntry cEntry
private void set Constraints Entry Constraints Entry entry c Entry entry  setConstraintsEntry ConstraintsEntry cEntry
private Plugin Descriptor Model get Parent return parent  PluginDescriptorModel getParent
private Plugin Prerequisite Model get Prerequisite return prq  PluginPrerequisiteModel getPrerequisite
private Plugin Version Identifier get Version Identifier return ver  PluginVersionIdentifier getVersionIdentifier
public String to String if prq null return null NON NLS 1 String s parent to String prq get Plugin NON NLS 1 switch prq get Match Byte case Plugin Prerequisite Model PREREQ MATCH UNSPECIFIED s any NON NLS 1 break case Plugin Prerequisite Model PREREQ MATCH PERFECT s I Model PLUGIN REQUIRES MATCH PERFECT break case Plugin Prerequisite Model PREREQ MATCH EQUIVALENT s I Model PLUGIN REQUIRES MATCH EQUIVALENT break case Plugin Prerequisite Model PREREQ MATCH COMPATIBLE s I Model PLUGIN REQUIRES MATCH COMPATIBLE break case Plugin Prerequisite Model PREREQ MATCH GREATER OR EQUAL s I Model PLUGIN REQUIRES MATCH GREATER OR EQUAL break return s  toString toString getPlugin getMatchByte PluginPrerequisiteModel PREREQ_MATCH_UNSPECIFIED PluginPrerequisiteModel PREREQ_MATCH_PERFECT IModel PLUGIN_REQUIRES_MATCH_PERFECT PluginPrerequisiteModel PREREQ_MATCH_EQUIVALENT IModel PLUGIN_REQUIRES_MATCH_EQUIVALENT PluginPrerequisiteModel PREREQ_MATCH_COMPATIBLE IModel PLUGIN_REQUIRES_MATCH_COMPATIBLE PluginPrerequisiteModel PREREQ_MATCH_GREATER_OR_EQUAL IModel PLUGIN_REQUIRES_MATCH_GREATER_OR_EQUAL
private Constraints Entry Index Entry parent Create a new Constraints Entry and point parent back to the associated Index Entry this parent parent  ConstraintsEntry IndexEntry ConstraintsEntry IndexEntry
private int constraint Count Returns the number of Constraint entries in constraint List Initially this will be 0 return constraint List size  constraintCount constraintList constraintList
private Plugin Descriptor Model add Constraint Constraint c Add this Constraint to the list of constraints for this Constraints Entry Note that while a given Constraints Entry can have many Constraints any Constraint can have only one Constraints Entry This method will return a single plugin descriptor which is the most recent descriptor which satisfies this constraint constraint List add c c set Constraints Entry this get all of the plugin descriptors which satisfy this constraint and all other constraints in this Constraints Entry List constrained get Matching Descriptors if constrained size 0 looks like we have a conflict constraint List remove c c set Constraints Entry null return null else match will be only the latest version plugin which satisfies these constraints Plugin Descriptor Model match Plugin Descriptor Model constrained get 0 if match equals last Resolved last Resolved match is Resolved false return match  PluginDescriptorModel addConstraint ConstraintsEntry ConstraintsEntry ConstraintsEntry constraintList setConstraintsEntry ConstraintsEntry getMatchingDescriptors constraintList setConstraintsEntry PluginDescriptorModel PluginDescriptorModel lastResolved lastResolved isResolved
private void remove Constraint Constraint c if DEBUG RESOLVE debug removing constraint c to String NON NLS 1 constraint List remove c c set Constraints Entry null last Resolved null is Resolved false  removeConstraint DEBUG_RESOLVE toString constraintList setConstraintsEntry lastResolved isResolved
private void remove Constraint For Plugin Prerequisite Model prereq List remove new Array List for Iterator list constraint List iterator list has Next Constraint c Constraint list next if c get Prerequisite prereq remove add c for Iterator list remove iterator list has Next remove Constraint Constraint list next  removeConstraintFor PluginPrerequisiteModel ArrayList constraintList hasNext getPrerequisite hasNext removeConstraint
private Plugin Descriptor Model get Matching Descriptor We do this a lot Can we use some mechanism to hold the last matching descriptor and discard it if the constraints change List constrained get Matching Descriptors if constrained size 0 return null else return Plugin Descriptor Model constrained get 0  PluginDescriptorModel getMatchingDescriptor getMatchingDescriptors PluginDescriptorModel
private List get Matching Descriptors The object of the game here is to return a list of plugin descriptors that match the list of Constraint elements hanging off this Constraints Entry constrained will be a list of matching plugin descriptors List constrained new Linked List for Iterator list parent versions iterator list has Next parent is an Index Entry and versions is a list of all the plugin descriptors in version order biggest to smallest that have this plugin id Plugin Descriptor Model pd Plugin Descriptor Model list next if pd get Enabled constrained add pd constrained now contains all of the enabled plugin descriptors for this Index Entry The next step is to remove any that don t fit for Iterator list constraint List iterator list has Next For each Constraint go through all of the versions of this plugin and remove any from constrained which don t match the criteria for this Constraint constraint List is all the Constraint entries for this Constraints Entry Constraint c Constraint list next if c get Match Type Plugin Prerequisite Model PREREQ MATCH UNSPECIFIED continue for Iterator list2 parent versions iterator list2 has Next Plugin Descriptor Model pd Plugin Descriptor Model list2 next if pd get Enabled ignore disabled plugins continue switch c get Match Type case Plugin Prerequisite Model PREREQ MATCH PERFECT if get Version Identifier pd is Perfect c get Version Identifier constrained remove pd break case Plugin Prerequisite Model PREREQ MATCH EQUIVALENT if get Version Identifier pd is Equivalent To c get Version Identifier constrained remove pd break case Plugin Prerequisite Model PREREQ MATCH COMPATIBLE if get Version Identifier pd is Compatible With c get Version Identifier constrained remove pd break case Plugin Prerequisite Model PREREQ MATCH GREATER OR EQUAL if get Version Identifier pd is Greater Or Equal To c get Version Identifier constrained remove pd break At this point constrained will contain only those plugin descriptors which satisfy ALL of the Constraint entries return constrained  getMatchingDescriptors ConstraintsEntry LinkedList hasNext IndexEntry PluginDescriptorModel PluginDescriptorModel getEnabled IndexEntry constraintList hasNext constraintList ConstraintsEntry getMatchType PluginPrerequisiteModel PREREQ_MATCH_UNSPECIFIED hasNext PluginDescriptorModel PluginDescriptorModel getEnabled getMatchType PluginPrerequisiteModel PREREQ_MATCH_PERFECT getVersionIdentifier isPerfect getVersionIdentifier PluginPrerequisiteModel PREREQ_MATCH_EQUIVALENT getVersionIdentifier isEquivalentTo getVersionIdentifier PluginPrerequisiteModel PREREQ_MATCH_COMPATIBLE getVersionIdentifier isCompatibleWith getVersionIdentifier PluginPrerequisiteModel PREREQ_MATCH_GREATER_OR_EQUAL getVersionIdentifier isGreaterOrEqualTo getVersionIdentifier
private void preresolve List roots All of the constraints that need to be added have been Now just pick the plugin descriptor that is a best fit for all of these constraints Root nodes will not have any constraints since nothing requires this plugin as a prerequisite by definition For root node just pick up the latest version if constraint List size 0 This should be a root descriptor So just pick up the latest version of the root if roots contains parent get Id best Match Plugin Descriptor Model parent versions get 0 if best Match null if DEBUG RESOLVE debug ERROR no resolved descriptor for parent get Id NON NLS 1 else best Match Enabled best Match get Enabled else If this isn t a root descriptor get the latest version of the plugin descriptor which matches all the constraints we have Pick the plugin that best matches all the constraints Any allowable conflicts will be in another Constraints Entry best Match get Matching Descriptor if best Match null if DEBUG RESOLVE debug ERROR no resolved descriptor for parent get Id NON NLS 1 else best Match Enabled true  constraintList getId bestMatch PluginDescriptorModel bestMatch DEBUG_RESOLVE getId bestMatchEnabled bestMatch getEnabled ConstraintsEntry bestMatch getMatchingDescriptor bestMatch DEBUG_RESOLVE getId bestMatchEnabled
private void resolve Assumptions All constraints that need to be added have been preresolve above has been called and a best Match if it exists has been identified all versions of this plugin have been disabled so it is up to this method to enable the plugin that is a best Match for all of the constraints in this Constraints Entry if best Match null All of the versions of this plugin will have been disabled Enable only the one which is the best match best Match Enabled will be set to false if this particular plugin caused an unresolvable conflict Therefore set Enabled best Match Enabled will leave this delinquent plugin disabled best Match set Enabled best Match Enabled if best Match Enabled if DEBUG RESOLVE debug configured best Match to String NON NLS 1 if constraint List size 0 for int i 0 i constraint List size i Put which actual version this prerequisite resolved to in the relevant prerequisite in the registry Plugin Prerequisite Model prq Plugin Prerequisite Model Constraint constraint List get i get Prerequisite prq set Resolved Version get Version Identifier best Match to String  bestMatch bestMatch ConstraintsEntry bestMatch bestMatchEnabled setEnabled bestMatchEnabled bestMatch setEnabled bestMatchEnabled bestMatchEnabled DEBUG_RESOLVE bestMatch toString constraintList constraintList PluginPrerequisiteModel PluginPrerequisiteModel constraintList getPrerequisite setResolvedVersion getVersionIdentifier bestMatch toString
private boolean is Resolved return this is Resolved  isResolved isResolved
private void is Resolved boolean is Resolved this is Resolved is Resolved  isResolved isResolved isResolved isResolved
private Index Entry String id this id id Create the first Constraints Entry with no constraints concurrent List add new Constraints Entry this  IndexEntry ConstraintsEntry concurrentList ConstraintsEntry
private String get Id return id  getId
private Constraints Entry get Constraints Entry For Constraint c Each Constraint must have exactly one Constraints Entry but a Constraints Entry may have many non conflicting Constraints Constraints Entry ce c get Constraints Entry if ce null return ce ce Constraints Entry concurrent List get 0 if c get Prerequisite null c set Constraints Entry ce return ce  ConstraintsEntry getConstraintsEntryFor ConstraintsEntry ConstraintsEntry ConstraintsEntry getConstraintsEntry ConstraintsEntry concurrentList getPrerequisite setConstraintsEntry
private Plugin Descriptor Model add Constraint Constraint c int concurrent Count concurrent List size try to find constraits entry that can accommodate new constraint for Iterator list concurrent List iterator list has Next Constraints Entry cie Constraints Entry list next Plugin Descriptor Model pd cie add Constraint c If pd comes back null adding this constraint to the Constraints Entry cie will cause a conflict no plugin descriptor can satisfy all the constraints if pd null constraint added OK and no concurrency if concurrent Count 1 return pd constraint added OK but have concurrency if allow Concurrency For pd return pd else cie remove Constraint c cannot be concurrent return null If we get to this point the constraint we are trying to add gave us no matching plugins when used in conjunction with the other constraints in a particular Constraints Entry Add a new Constraints Entry and put this constraint in it only if concurrency is allowed Concurrency is allowed only if the plugin we find which matches this constraint has no extensions or extension points attempt to create new constraints entry Constraints Entry cie Plugin Descriptor Model pd if concurrent List size 1 ensure base entry allows concurrency cie Constraints Entry concurrent List get 0 pd cie get Matching Descriptor if allow Concurrency For pd return null cie new Constraints Entry this pd cie add Constraint c if pd null cie remove Constraint c no matching target return null if allow Concurrency For pd cie remove Constraint c cannot be concurrent return null if DEBUG RESOLVE debug creating new constraints list in id for c to String NON NLS 1 NON NLS 2 concurrent List add cie return pd  PluginDescriptorModel addConstraint concurrentCount concurrentList concurrentList hasNext ConstraintsEntry ConstraintsEntry PluginDescriptorModel addConstraint ConstraintsEntry concurrentCount allowConcurrencyFor removeConstraint ConstraintsEntry ConstraintsEntry ConstraintsEntry PluginDescriptorModel concurrentList ConstraintsEntry concurrentList getMatchingDescriptor allowConcurrencyFor ConstraintsEntry addConstraint removeConstraint allowConcurrencyFor removeConstraint DEBUG_RESOLVE toString concurrentList
private boolean allow Concurrency For Plugin Descriptor Model pd if pd null return false if pd get Declared Extensions null pd get Declared Extensions length 0 return false if pd get Declared Extension Points null pd get Declared Extension Points length 0 return false return true  allowConcurrencyFor PluginDescriptorModel getDeclaredExtensions getDeclaredExtensions getDeclaredExtensionPoints getDeclaredExtensionPoints
private void remove Constraint Constraint c Constraints Entry cie get Constraints Entry For c cie remove Constraint c if concurrent List get 0 cie cie constraint Count 0 concurrent List remove cie  removeConstraint ConstraintsEntry getConstraintsEntryFor removeConstraint concurrentList constraintCount concurrentList
private void remove Constraint For Plugin Prerequisite Model prereq for Iterator list concurrent List iterator list has Next Constraints Entry list next remove Constraint For prereq  removeConstraintFor PluginPrerequisiteModel concurrentList hasNext ConstraintsEntry removeConstraintFor
private Plugin Descriptor Model get Matching Descriptor For Constraint c Constraints Entry cie get Constraints Entry For c return cie get Matching Descriptor  PluginDescriptorModel getMatchingDescriptorFor ConstraintsEntry getConstraintsEntryFor getMatchingDescriptor
private void disable All Descriptors for Iterator list ver List iterator list has Next Plugin Descriptor Model pd Plugin Descriptor Model list next pd set Enabled false  disableAllDescriptors verList hasNext PluginDescriptorModel PluginDescriptorModel setEnabled
private void resolve Dependencies List roots preresolved will pick out the plugin which has the highest version number and satisfies all the constraints This is then put in best Match field of the Constraints Entry for Iterator list concurrent List iterator list has Next Constraints Entry list next preresolve roots Now all versions of this plugin are disabled disable All Descriptors Now find the best match from preresolve above and enable it Be sure to update any prerequisite entries with the version number of the plugin we are actually using for Iterator list concurrent List iterator list has Next Constraints Entry list next resolve  resolveDependencies bestMatch ConstraintsEntry concurrentList hasNext ConstraintsEntry disableAllDescriptors concurrentList hasNext ConstraintsEntry
A root plug in does not have any constraints attached to it private boolean is Root if concurrent List size 1 return false Constraints Entry constraints Entry Constraints Entry concurrent List get 0 return constraints Entry constraint Count 0  isRoot concurrentList ConstraintsEntry constraintsEntry ConstraintsEntry concurrentList constraintsEntry constraintCount
private List versions return ver List  verList
private boolean is Resolved For Constraint c Constraints Entry cie get Constraints Entry For c return cie is Resolved  isResolvedFor ConstraintsEntry getConstraintsEntryFor isResolved
private void is Resolved For Constraint c boolean value Constraints Entry cie get Constraints Entry For c cie is Resolved value  isResolvedFor ConstraintsEntry getConstraintsEntryFor isResolved
private List changes new Array List a list of Constraints private Cookie  ArrayList
private boolean add Change Constraint c Keep a list of all constraints so that we can spot circular dependencies we can clean up if there is an unresolvable conflict Plugin Prerequisite Model prereq c get Prerequisite for Iterator list changes iterator list has Next if prereq Constraint list next get Prerequisite We have a circular dependency return false changes add c return true  addChange PluginPrerequisiteModel getPrerequisite hasNext getPrerequisite
private List get Changes return changes  getChanges
private void clear Changes if changes size 0 changes new Array List  clearChanges ArrayList
private boolean is Ok return ok  isOk
private void is Ok boolean value ok value  isOk
public Registry Resolver String debug Platform get Debug Option OPTION DEBUG RESOLVE DEBUG RESOLVE debug null false debug equals Ignore Case true true false NON NLS 1  RegistryResolver getDebugOption OPTION_DEBUG_RESOLVE DEBUG_RESOLVE equalsIgnoreCase
private void add Plugin Descriptor Model pd String key pd get Id List ver List Index Entry ix Index Entry idmap get key create new index entry if one does not exist for plugin if ix null ix new Index Entry key idmap put key ix insert plugin into list maintaining version order ver List ix versions int i 0 for i 0 i ver List size i Plugin Descriptor Model element Plugin Descriptor Model ver List get i if get Version Identifier pd equals get Version Identifier element return ignore duplicates if get Version Identifier pd is Greater Than get Version Identifier element break ver List add i pd  PluginDescriptorModel getId verList IndexEntry IndexEntry IndexEntry verList verList PluginDescriptorModel PluginDescriptorModel verList getVersionIdentifier getVersionIdentifier getVersionIdentifier isGreaterThan getVersionIdentifier verList
private void add Extensions Extension Model extensions Plugin Descriptor Model plugin Add all the extensions presumably from a fragment to plugin int ext Length extensions length for int i 0 i ext Length i extensions i set Parent Plugin Descriptor plugin Extension Model list plugin get Declared Extensions int list Length list null 0 list length Extension Model result null if list null result new Extension Model ext Length else result new Extension Model list length ext Length System arraycopy list 0 result 0 list length System arraycopy extensions 0 result list Length ext Length plugin set Declared Extensions result  addExtensions ExtensionModel PluginDescriptorModel extLength extLength setParentPluginDescriptor ExtensionModel getDeclaredExtensions listLength ExtensionModel ExtensionModel extLength ExtensionModel extLength listLength extLength setDeclaredExtensions
private void add Extension Points Extension Point Model extension Points Plugin Descriptor Model plugin Add all the extension points presumably from a fragment to plugin int ext Pt Length extension Points length for int i 0 i ext Pt Length i extension Points i set Parent Plugin Descriptor plugin Extension Point Model list plugin get Declared Extension Points int list Length list null 0 list length Extension Point Model result null if list null result new Extension Point Model ext Pt Length else result new Extension Point Model list length ext Pt Length System arraycopy list 0 result 0 list length System arraycopy extension Points 0 result list Length ext Pt Length plugin set Declared Extension Points result  addExtensionPoints ExtensionPointModel extensionPoints PluginDescriptorModel extPtLength extensionPoints extPtLength extensionPoints setParentPluginDescriptor ExtensionPointModel getDeclaredExtensionPoints listLength ExtensionPointModel ExtensionPointModel extPtLength ExtensionPointModel extPtLength extensionPoints listLength extPtLength setDeclaredExtensionPoints
private void add Libraries Library Model libraries Plugin Descriptor Model plugin Add all the libraries presumably from a fragment to plugin int lib Length libraries length Library Model list plugin get Runtime Library Model result null int list Length list null 0 list length if list null result new Library Model lib Length else result new Library Model list length lib Length System arraycopy list 0 result 0 list length System arraycopy libraries 0 result list Length lib Length plugin set Runtime result  addLibraries LibraryModel PluginDescriptorModel libLength LibraryModel getRuntime LibraryModel listLength LibraryModel libLength LibraryModel libLength listLength libLength setRuntime
private void add Prerequisites Plugin Prerequisite Model prerequisites Plugin Descriptor Model plugin Add all the prerequisites presumably from a fragment to plugin int req Length prerequisites length Plugin Prerequisite Model list plugin get Requires Plugin Prerequisite Model result null int list Length list null 0 list length if list null result new Plugin Prerequisite Model req Length else result new Plugin Prerequisite Model list length req Length System arraycopy list 0 result 0 list length System arraycopy prerequisites 0 result list Length req Length plugin set Requires result  addPrerequisites PluginPrerequisiteModel PluginDescriptorModel reqLength PluginPrerequisiteModel getRequires PluginPrerequisiteModel listLength PluginPrerequisiteModel reqLength PluginPrerequisiteModel reqLength listLength reqLength setRequires
private void debug String s System out println Registry Resolve s NON NLS 1 
private void error String message Status error new Status I Status WARNING Platform PI RUNTIME Platform PARSE PROBLEM message null status add error if Internal Platform DEBUG DEBUG RESOLVE System out println error to String  IStatus PI_RUNTIME PARSE_PROBLEM InternalPlatform DEBUG_RESOLVE toString
private void information String message if Internal Platform DEBUG DEBUG RESOLVE System out println message  InternalPlatform DEBUG_RESOLVE
public I Extension Point get Extension Point Plugin Descriptor Model plugin String extension Point Id if extension Point Id null return null Extension Point Model list plugin get Declared Extension Points if list null return null for int i 0 i list length i if extension Point Id equals list i get Id return I Extension Point list i return null  IExtensionPoint getExtensionPoint PluginDescriptorModel extensionPointId extensionPointId ExtensionPointModel getDeclaredExtensionPoints extensionPointId getId IExtensionPoint
private Plugin Version Identifier get Version Identifier Plugin Model model try return new Plugin Version Identifier model get Version catch Runtime Exception e if the version is invalid an Assertion Failed Exception not visible here will be thrown if this DEBUG RESOLVE only show if we are debugging e print Stack Trace System out Hopefully we will never get here The version number has already been successfully converted from a string to a Plugin Version Identifier and back to a string But keep this catch around in case something does go wrong return new Plugin Version Identifier 0 0 0 NON NLS 1  PluginVersionIdentifier getVersionIdentifier PluginModel PluginVersionIdentifier getVersion RuntimeException AssertionFailedException DEBUG_RESOLVE printStackTrace PluginVersionIdentifier PluginVersionIdentifier
private Plugin Version Identifier get Version Identifier Plugin Prerequisite Model prereq String version prereq get Version return version null null new Plugin Version Identifier version  PluginVersionIdentifier getVersionIdentifier PluginPrerequisiteModel getVersion PluginVersionIdentifier
private boolean fragment Has Prerequisites Plugin Fragment Model fragment Plugin Prerequisite Model requires fragment get Requires if requires null requires length 0 return true for int i 0 i requires length i Use the idmap to determine if a plugin exists We know that all plugins in this registry already have an entry in the idmap If the right idmap entry doesn t exist this plugin is not in the registry if idmap get requires i get Plugin null We know this plugin doesn t exist error Policy bind parse bad Prereq On Frag fragment get Name requires i get Plugin NON NLS 1 return false return true  fragmentHasPrerequisites PluginFragmentModel PluginPrerequisiteModel getRequires getPlugin badPrereqOnFrag getName getPlugin
private void link Fragments For each fragment find out which plugin descriptor it belongs to and add it to the list of fragments in this plugin Plugin Fragment Model fragments reg get Fragments for int i 0 i fragments length i Plugin Fragment Model fragment fragments i if required Fragment fragment There is a required field missing on this fragment so ignore it String id name if id fragment get Id null error Policy bind parse fragment Missing Attr id NON NLS 1 else if name fragment get Name null error Policy bind parse fragment Missing Attr name NON NLS 1 else error Policy bind parse fragment Missing Id Name NON NLS 1 continue if fragment Has Prerequisites fragment This fragment requires a plugin that does not exist Ignore the fragment continue Now find a plugin that fits the matching criteria specified for this fragment and its related plugin Plugin Descriptor Model plugin null Index Entry ix Index Entry idmap get fragment get Plugin Id byte match Type fragment get Match if ix null for Iterator list ix versions iterator list has Next plugin null Plugin Descriptor Model pd Plugin Descriptor Model list next if pd get Enabled return the highest version that fits the matching criteria switch match Type case Plugin Fragment Model FRAGMENT MATCH PERFECT if get Version Identifier pd is Perfect new Plugin Version Identifier fragment get Plugin Version plugin pd break case Plugin Fragment Model FRAGMENT MATCH EQUIVALENT if get Version Identifier pd is Equivalent To new Plugin Version Identifier fragment get Plugin Version plugin pd break case Plugin Fragment Model FRAGMENT MATCH COMPATIBLE case Plugin Fragment Model FRAGMENT MATCH UNSPECIFIED if get Version Identifier pd is Compatible With new Plugin Version Identifier fragment get Plugin Version plugin pd break case Plugin Fragment Model FRAGMENT MATCH GREATER OR EQUAL if get Version Identifier pd is Greater Or Equal To new Plugin Version Identifier fragment get Plugin Version plugin pd break if plugin null We couldn t find this fragment s plugin error Policy bind parse missing Fragment Pd fragment get Plugin Id fragment get Id NON NLS 1 continue Add this fragment to the list of fragments for this plugin descriptor Plugin Fragment Model list plugin get Fragments Plugin Fragment Model new List if list null new List new Plugin Fragment Model 1 new List 0 fragment else new List new Plugin Fragment Model list length 1 System arraycopy list 0 new List 0 list length new List list length fragment plugin set Fragments new List  linkFragments PluginFragmentModel getFragments PluginFragmentModel requiredFragment getId fragmentMissingAttr getName fragmentMissingAttr fragmentMissingIdName fragmentHasPrerequisites PluginDescriptorModel IndexEntry IndexEntry getPluginId matchType getMatch hasNext PluginDescriptorModel PluginDescriptorModel getEnabled matchType PluginFragmentModel FRAGMENT_MATCH_PERFECT getVersionIdentifier isPerfect PluginVersionIdentifier getPluginVersion PluginFragmentModel FRAGMENT_MATCH_EQUIVALENT getVersionIdentifier isEquivalentTo PluginVersionIdentifier getPluginVersion PluginFragmentModel FRAGMENT_MATCH_COMPATIBLE PluginFragmentModel FRAGMENT_MATCH_UNSPECIFIED getVersionIdentifier isCompatibleWith PluginVersionIdentifier getPluginVersion PluginFragmentModel FRAGMENT_MATCH_GREATER_OR_EQUAL getVersionIdentifier isGreaterOrEqualTo PluginVersionIdentifier getPluginVersion missingFragmentPd getPluginId getId PluginFragmentModel getFragments PluginFragmentModel newList newList PluginFragmentModel newList newList PluginFragmentModel newList newList setFragments newList
private void remove Constraint For Plugin Prerequisite Model prereq String id prereq get Plugin Index Entry ix Index Entry idmap get id if ix null if DEBUG RESOLVE debug unable to locate index entry for id NON NLS 1 return ix remove Constraint For prereq  removeConstraintFor PluginPrerequisiteModel getPlugin IndexEntry IndexEntry DEBUG_RESOLVE removeConstraintFor
private void resolve Start by putting each plugin in the idmap We are going to need this for the call to link Fragments Plugin Descriptor Model plugin List reg get Plugins idmap new Hash Map for int i 0 i plugin List length i Check to see if all the required fields exist now For example if we have a null plugin version identifier the add plugin List i will give a null pointer exception if required Plugin Descriptor plugin List i plugin List i set Enabled false String id name if id plugin List i get Id null error Policy bind parse plugin Missing Attr id NON NLS 1 else if name plugin List i get Name null error Policy bind parse plugin Missing Attr name NON NLS 1 else error Policy bind parse plugin Missing Id Name NON NLS 1 continue add plugin List i Add all the fragments to their associated plugin Note that this will check for all the required fields in the fragment link Fragments Now we have to cycle through the plugin list again to assimilate all the fragment information and check for required fields for int i 0 i plugin List length i if plugin List i get Fragments null Take all the information in each fragment and embed it in the plugin descriptor resolve Plugin Fragments plugin List i resolve root descriptors List roots resolve Root Descriptors if roots size 0 No roots likely due to a circular dependency or multiple circular dependencies Disable all plugins before returning Remember to trim the registry if needed Plugin Descriptor Model plugins reg get Plugins for int i 0 i plugins length i plugins i set Enabled false resolve Plugin Registry idmap null reg null error Policy bind plugin unable To Resolve NON NLS 1 return roots is a list of those plugin ids that are not a prerequisite for any other plugin Note that roots contains ids only process all root nodes first those previously on roots list then those on the orphans set The orphans of an iteration will become the roots of the next one for Set orphans roots Set new Hash Set roots roots Set is Empty roots Set orphans orphans new Hash Set walk the dependencies and setup constraints for Iterator roots Iter roots Set iterator roots Iter has Next String rootID String roots Iter next resolve Node rootID null null null orphans At this point we have set up all the Constraint and Constraints Entry components But we may not have found which plugin is the best match for a given set of constraints build the roots set for the next iteration for Iterator orphans Iter orphans iterator orphans Iter has Next Index Entry orphan Index Entry idmap get orphans Iter next only after a complete iteration over the roots set we can decide if a potential orphan is a real orphan Now we need to resolve for these new roots they may not have been resolved before especially if the parent was looking for an older version and not the latest version which is what we pick up for the roots if orphan is Root if DEBUG RESOLVE debug orphan orphan get Id NON NLS 1 roots add orphan get Id else orphans Iter remove resolve dependencies Iterator plugins idmap entry Set iterator while plugins has Next Index Entry ix Index Entry Map Entry plugins next get Value Now go off and find the plugin that matches the constraints Note that root plugins will always use the latest version ix resolve Dependencies roots walk down the registry structure and resolve links between extensions and extension points resolve Plugin Registry unhook registry and index idmap null reg null  linkFragments PluginDescriptorModel pluginList getPlugins HashMap pluginList pluginList requiredPluginDescriptor pluginList pluginList setEnabled pluginList getId pluginMissingAttr pluginList getName pluginMissingAttr pluginMissingIdName pluginList linkFragments pluginList pluginList getFragments resolvePluginFragments pluginList resolveRootDescriptors PluginDescriptorModel getPlugins setEnabled resolvePluginRegistry unableToResolve rootsSet HashSet rootsSet isEmpty rootsSet HashSet rootsIter rootsSet rootsIter hasNext rootsIter resolveNode ConstraintsEntry orphansIter orphansIter hasNext IndexEntry IndexEntry orphansIter isRoot DEBUG_RESOLVE getId getId orphansIter entrySet hasNext IndexEntry IndexEntry getValue resolveDependencies resolvePluginRegistry
public I Status resolve Plugin Registry Model registry This is the entry point to the registry resolver Calling this method with a valid registry will cause this registry to be resolved status new Multi Status Platform PI RUNTIME I Status OK null NON NLS 1 if registry is Resolved don t bother doing anything if it s already resolved return status reg registry resolve registry mark Resolved return status  IStatus PluginRegistryModel MultiStatus PI_RUNTIME IStatus isResolved markResolved
private void resolve Extension Extension Model ext String target ext get Extension Point int ix target last Index Of NON NLS 1 String plugin Id target substring 0 ix String ext Pt Id target substring ix 1 String message Plugin Descriptor Model plugin Plugin Descriptor Model reg get Plugin plugin Id if plugin null message Policy bind parse ext Point Unknown target ext get Parent Plugin Descriptor get Id NON NLS 1 error message return if plugin get Enabled message Policy bind parse ext Point Disabled target ext get Parent Plugin Descriptor get Id NON NLS 1 error message return Extension Point Model ext Pt Extension Point Model get Extension Point plugin ext Pt Id if ext Pt null message Policy bind parse ext Point Unknown target ext get Parent Plugin Descriptor get Id NON NLS 1 error message return Extension Model old Values ext Pt get Declared Extensions Extension Model new Values null if old Values null new Values new Extension Model 1 else new Values new Extension Model old Values length 1 System arraycopy old Values 0 new Values 0 old Values length new Values new Values length 1 ext ext Pt set Declared Extensions new Values  resolveExtension ExtensionModel getExtensionPoint lastIndexOf pluginId extPtId PluginDescriptorModel PluginDescriptorModel getPlugin pluginId extPointUnknown getParentPluginDescriptor getId getEnabled extPointDisabled getParentPluginDescriptor getId ExtensionPointModel extPt ExtensionPointModel getExtensionPoint extPtId extPt extPointUnknown getParentPluginDescriptor getId ExtensionModel oldValues extPt getDeclaredExtensions ExtensionModel newValues oldValues newValues ExtensionModel newValues ExtensionModel oldValues oldValues newValues oldValues newValues newValues extPt setDeclaredExtensions newValues
private void resolve Fragments Plugin Fragment Model fragments reg get Fragments Hash Set seen new Hash Set 5 for int i 0 i fragments length i Plugin Fragment Model fragment fragments i if required Fragment fragment continue if seen contains fragment get Id continue seen add fragment get Id Plugin Descriptor Model plugin reg get Plugin fragment get Plugin Id fragment get Plugin Version if plugin null XXX log something here continue resolve Plugin Fragments plugin  resolveFragments PluginFragmentModel getFragments HashSet HashSet PluginFragmentModel requiredFragment getId getId PluginDescriptorModel getPlugin getPluginId getPluginVersion resolvePluginFragments
private Cookie resolve Node String child Plugin Descriptor Model parent Plugin Prerequisite Model prq Cookie cookie Set orphans This method is called recursively to setup dependency constraints Top invocation is passed null parent and null prerequisite We are trying to resolve for the plugin descriptor with id child if DEBUG RESOLVE debug PUSH child NON NLS 1 if cookie null cookie new Cookie lookup child entry Index Entry ix Index Entry idmap get child We should now have the Index Entry for the plugin we wish to resolve if ix null If this is an optional prerequisite and not a root node we can just ignore this prerequisite if there is no Index Entry as there is no corresponding plugin and continue processing if prq get Optional parent null child null return cookie if parent null error Policy bind parse prereq Disabled new String parent get Id child NON NLS 1 if DEBUG RESOLVE debug POP child not found NON NLS 1 NON NLS 2 cookie is Ok false return cookie try to add new dependency constraint Constraint current Constraint new Constraint parent prq A constraint will be added for each parent which requires us Plugin Descriptor Model child Pd null if parent null child Pd ix add Constraint current Constraint if child Pd null if prq get Optional This is an optional prerequisite Ignore the conflict and this prerequisite orphans add ix get Id information Policy bind parse unsatisfied Opt Prereq parent get Id child NON NLS 1 return cookie else This prerequisite is mandatory String message Policy bind parse unsatisfied Prereq parent get Id child NON NLS 1 error message if DEBUG RESOLVE debug POP child unable to satisfy constraint NON NLS 1 NON NLS 2 cookie is Ok false return cookie else if cookie add Change current Constraint if prq get Optional This is an optional prerequisite Ignore the loop and the prerequisite information Policy bind parse prereq Opt Loop parent get Id child NON NLS 1 return cookie else String message Policy bind parse prereq Loop parent get Id child NON NLS 1 error message if DEBUG RESOLVE debug POP child prerequisite loop NON NLS 1 NON NLS 2 cookie is Ok false return cookie else This is a root node There is no prerequisite so this Index Entry must exist child Pd ix get Matching Descriptor For current Constraint if child Pd null if DEBUG RESOLVE debug POP child not found missing descriptor entry NON NLS 1 NON NLS 2 cookie is Ok false return cookie check to see if subtree is already resolved if ix is Resolved For current Constraint if DEBUG RESOLVE debug POP child already resolved NON NLS 1 NON NLS 2 return cookie select the subtree to resolve Plugin Prerequisite Model prereqs child Pd get Requires Plugin Prerequisite Model prereq prereqs prereqs null new Plugin Prerequisite Model 0 prereqs for int i 0 cookie is Ok i prereqs length i prereq Plugin Prerequisite Model prereqs i cookie resolve Node prereq get Plugin child Pd prereq cookie orphans if we failed remove any constraints we added if cookie is Ok Constraint cookie Constraint for Iterator change cookie get Changes iterator change has Next cookie Constraint Constraint change next prereq cookie Constraint get Prerequisite if child Pd cookie Constraint get Parent keep track of orphaned subtrees if orphans contains prereq get Plugin idmap get prereq get Plugin null orphans add prereq get Plugin remove Constraint For prereq Make sure you picked up all the orphaned subtrees for this child Pd for int i 0 i prereqs length i if orphans contains prereqs i get Plugin idmap get prereqs i get Plugin null orphans add prereqs i get Plugin if parent null error Policy bind parse prereq Disabled parent get Id child NON NLS 1 child Pd set Enabled false if DEBUG RESOLVE debug POP child failed to resolve subtree NON NLS 1 NON NLS 2 return cookie else we re done ix is Resolved For current Constraint true if DEBUG RESOLVE debug POP child get Version Identifier child Pd NON NLS 1 NON NLS 2 return cookie  resolveNode PluginDescriptorModel PluginPrerequisiteModel DEBUG_RESOLVE IndexEntry IndexEntry IndexEntry IndexEntry getOptional prereqDisabled getId DEBUG_RESOLVE isOk currentConstraint PluginDescriptorModel childPd childPd addConstraint currentConstraint childPd getOptional getId unsatisfiedOptPrereq getId unsatisfiedPrereq getId DEBUG_RESOLVE isOk addChange currentConstraint getOptional prereqOptLoop getId prereqLoop getId DEBUG_RESOLVE isOk IndexEntry childPd getMatchingDescriptorFor currentConstraint childPd DEBUG_RESOLVE isOk isResolvedFor currentConstraint DEBUG_RESOLVE PluginPrerequisiteModel childPd getRequires PluginPrerequisiteModel PluginPrerequisiteModel isOk PluginPrerequisiteModel resolveNode getPlugin childPd isOk cookieConstraint getChanges hasNext cookieConstraint cookieConstraint getPrerequisite childPd cookieConstraint getParent getPlugin getPlugin getPlugin removeConstraintFor childPd getPlugin getPlugin getPlugin prereqDisabled getId childPd setEnabled DEBUG_RESOLVE isResolvedFor currentConstraint DEBUG_RESOLVE getVersionIdentifier childPd
private void resolve Plugin Descriptor Plugin Descriptor Model pd Extension Model list pd get Declared Extensions if list null list length 0 pd get Enabled Can be disabled if all required attributes not present return for int i 0 i list length i resolve Extension Extension Model list i  resolvePluginDescriptor PluginDescriptorModel ExtensionModel getDeclaredExtensions getEnabled resolveExtension ExtensionModel
private void resolve Plugin Fragment Plugin Fragment Model fragment Plugin Descriptor Model plugin Extension Model extensions fragment get Declared Extensions if extensions null Add all the fragment extensions to the plugin add Extensions extensions plugin Extension Point Model points fragment get Declared Extension Points if points null Add all the fragment extension points to the plugin add Extension Points points plugin Library Model libraries fragment get Runtime if libraries null Add all the fragment library entries to the plugin add Libraries libraries plugin Plugin Prerequisite Model prerequisites fragment get Requires if prerequisites null Add all the fragment prerequisites to the plugin add Prerequisites prerequisites plugin  resolvePluginFragment PluginFragmentModel PluginDescriptorModel ExtensionModel getDeclaredExtensions addExtensions ExtensionPointModel getDeclaredExtensionPoints addExtensionPoints LibraryModel getRuntime addLibraries PluginPrerequisiteModel getRequires addPrerequisites
private void resolve Plugin Fragments Plugin Descriptor Model plugin For each fragment contained in the fragment list of this plugin apply all the fragment bits to the plugin e g all of the fragment s extensions are added to the list of extensions in the plugin Be sure to use only the latest version of any given fragment in case there are multiple versions of a given fragment id So note that if there are multiple versions of a given fragment id all but the latest version will be discarded The boolean dirty will remain false if there is only one version of every fragment id associated with this plugin boolean dirty false Plugin Fragment Model fragment List plugin get Fragments Hash Map latest Fragments new Hash Map 30 for int i 0 i fragment List length i String fragment Id fragment List i get Id Plugin Fragment Model latest Version Plugin Fragment Model latest Fragments get fragment Id if latest Version null We don t have any fragments with this id yet latest Fragments put fragment Id fragment List i else dirty true if get Version Identifier fragment List i equals get Version Identifier latest Version ignore duplicates error Policy bind parse duplicate Fragment fragment Id fragment List i get Version NON NLS 1 if get Version Identifier fragment List i is Greater Than get Version Identifier latest Version latest Fragments put fragment Id fragment List i latest Fragments now contains the latest version of each fragment id for this plugin Now add the latest version of each fragment to the plugin Set latest Only new Hash Set for Iterator list latest Fragments values iterator list has Next Plugin Fragment Model latest Fragment Plugin Fragment Model list next if dirty latest Only add latest Fragment int num Libraries latest Fragment get Runtime null 0 latest Fragment get Runtime length resolve Plugin Fragment latest Fragment plugin If this fragment added library entries check to see if it added a duplicate library entry if num Libraries 0 Something got added Library Model libraries plugin get Runtime Put all the library names into a set as we know the set will not have any duplicates Set lib Names new Hash Set int set Size lib Names size for int i 0 i libraries length i lib Names add libraries i get Name if lib Names size set Size We know this library name didn t get added to the set Ignore the duplicate but indicate an error String bindings latest Fragment get Id plugin get Id libraries i get Name error Policy bind parse duplicate Lib bindings NON NLS 1 else set Size lib Names size Currently the fragments on the plugin include all fragment versions Now strip off all but the latest version of each fragment id only if necessary if dirty plugin set Fragments Plugin Fragment Model latest Only to Array new Plugin Fragment Model latest Only size  resolvePluginFragments PluginDescriptorModel PluginFragmentModel fragmentList getFragments HashMap latestFragments HashMap fragmentList fragmentId fragmentList getId PluginFragmentModel latestVersion PluginFragmentModel latestFragments fragmentId latestVersion latestFragments fragmentId fragmentList getVersionIdentifier fragmentList getVersionIdentifier latestVersion duplicateFragment fragmentId fragmentList getVersion getVersionIdentifier fragmentList isGreaterThan getVersionIdentifier latestVersion latestFragments fragmentId fragmentList latestFragments latestOnly HashSet latestFragments hasNext PluginFragmentModel latestFragment PluginFragmentModel latestOnly latestFragment numLibraries latestFragment getRuntime latestFragment getRuntime resolvePluginFragment latestFragment numLibraries LibraryModel getRuntime libNames HashSet setSize libNames libNames getName libNames setSize latestFragment getId getId getName duplicateLib setSize libNames setFragments PluginFragmentModel latestOnly toArray PluginFragmentModel latestOnly
private void resolve Plugin Registry filter out disabled plugins from live registry if trim Plugins trim Registry resolve relationships if cross Link cross link all of the extensions and extension points Plugin Descriptor Model plugins reg get Plugins for int i 0 i plugins length i resolve Plugin Descriptor plugins i  resolvePluginRegistry trimPlugins trimRegistry crossLink PluginDescriptorModel getPlugins resolvePluginDescriptor
private boolean required Plugin Descriptor Plugin Descriptor Model plugin boolean ret Value true ret Value plugin get Name null plugin get Id null plugin get Version null if ret Value return ret Value Plugin Prerequisite Model requires List plugin get Requires Extension Model extensions plugin get Declared Extensions Extension Point Model extension Points plugin get Declared Extension Points Library Model library List plugin get Runtime Plugin Fragment Model fragments plugin get Fragments if requires List null for int i 0 i requires List length ret Value i ret Value ret Value required Prerequisite requires List i if extensions null for int i 0 i extensions length ret Value i ret Value ret Value required Extension extensions i if extension Points null for int i 0 i extension Points length ret Value i ret Value ret Value required Extension Point extension Points i if library List null for int i 0 i library List length ret Value i ret Value ret Value required Library library List i if fragments null for int i 0 i fragments length ret Value i ret Value ret Value required Fragment fragments i return ret Value  requiredPluginDescriptor PluginDescriptorModel retValue retValue getName getId getVersion retValue retValue PluginPrerequisiteModel requiresList getRequires ExtensionModel getDeclaredExtensions ExtensionPointModel extensionPoints getDeclaredExtensionPoints LibraryModel libraryList getRuntime PluginFragmentModel getFragments requiresList requiresList retValue retValue retValue requiredPrerequisite requiresList retValue retValue retValue requiredExtension extensionPoints extensionPoints retValue retValue retValue requiredExtensionPoint extensionPoints libraryList libraryList retValue retValue retValue requiredLibrary libraryList retValue retValue retValue requiredFragment retValue
private boolean required Prerequisite Plugin Prerequisite Model prerequisite return prerequisite get Plugin null  requiredPrerequisite PluginPrerequisiteModel getPlugin
private boolean required Extension Extension Model extension return extension get Extension Point null  requiredExtension ExtensionModel getExtensionPoint
private boolean required Extension Point Extension Point Model extension Point return extension Point get Name null extension Point get Id null  requiredExtensionPoint ExtensionPointModel extensionPoint extensionPoint getName extensionPoint getId
private boolean required Library Library Model library return library get Name null  requiredLibrary LibraryModel getName
private boolean required Fragment Plugin Fragment Model fragment return fragment get Name null fragment get Id null fragment get Plugin null fragment get Plugin Version null fragment get Version null  requiredFragment PluginFragmentModel getName getId getPlugin getPluginVersion getVersion
private List resolve Root Descriptors Determine the roots of the dependency tree Disable all but one versions of the root descriptors get list of all plugin identifiers in the registry List ids new Array List ids add All idmap key Set ids is just a list of all the plugin id s The following while loop will remove all id s that appear in any prerequisite list iterate over the list eliminating targets of requires entries Iterator p idmap entry Set iterator while p has Next Index Entry ix Index Entry Map Entry p next get Value if ix null List list ix versions int ix Size list size if ix Size 0 Remove any prerequisite mentioned in any version of this plugin for int i 0 i ix Size i Plugin Descriptor Model pd Plugin Descriptor Model list get i Plugin Prerequisite Model prereqs pd get Requires for int j 0 prereqs null j prereqs length j ids remove prereqs j get Plugin if ids size 0 disable all but the most recent version of root descriptors String id p ids iterator while p has Next id String p next Index Entry ix Index Entry idmap get id if ix null List list ix versions for int i 0 i list size i Plugin Descriptor Model pd Plugin Descriptor Model list get i if i 0 Don t disable this one It is the one with the highest version number if DEBUG RESOLVE debug root pd NON NLS 1 else Disable all versions except the one with the highest version number if DEBUG RESOLVE debug pd disabled NON NLS 1 NON NLS 2 pd set Enabled false else if DEBUG RESOLVE debug NO ROOTS NON NLS 1 return ids  resolveRootDescriptors ArrayList addAll keySet entrySet hasNext IndexEntry IndexEntry getValue ixSize ixSize ixSize PluginDescriptorModel PluginDescriptorModel PluginPrerequisiteModel getRequires getPlugin hasNext IndexEntry IndexEntry PluginDescriptorModel PluginDescriptorModel DEBUG_RESOLVE DEBUG_RESOLVE setEnabled DEBUG_RESOLVE
Specifies whether extensions and extension points should be cross linked during the resolve process public void set Cross Link boolean value cross Link value  setCrossLink crossLink
Specified whether disabled plugins should to be removed when the resolve is completed public void set Trim Plugins boolean value trim Plugins value  setTrimPlugins trimPlugins
private void trim Registry Plugin Descriptor Model list reg get Plugins for int i 0 i list length i Plugin Descriptor Model pd Plugin Descriptor Model list i if pd get Enabled if DEBUG RESOLVE debug removing pd to String NON NLS 1 reg remove Plugin pd get Id pd get Version  trimRegistry PluginDescriptorModel getPlugins PluginDescriptorModel PluginDescriptorModel getEnabled DEBUG_RESOLVE toString removePlugin getId getVersion

public class Compatibility Activator implements Bundle Activator public void start Bundle Context context throws Exception I Plugin Descriptor descriptor Compatibility Helper get Plugin Descriptor Platform PI RUNTIME Compatibility Helper set Plugin descriptor Internal Platform get Default get Runtime Instance  CompatibilityActivator BundleActivator BundleContext IPluginDescriptor CompatibilityHelper getPluginDescriptor PI_RUNTIME CompatibilityHelper setPlugin InternalPlatform getDefault getRuntimeInstance
public void stop Bundle Context context throws Exception Nothing to do  BundleContext

public class Default Plugin extends Plugin public Default Plugin I Plugin Descriptor descriptor super descriptor  DefaultPlugin DefaultPlugin IPluginDescriptor

public static String get Dev Class Path String id String result null if id null dev Properties null String entry dev Properties get Property id if entry null result get Array From List entry if result null result dev Default Classpath return result  getDevClassPath devProperties devProperties getProperty getArrayFromList devDefaultClasspath
Returns the result of converting a list of comma separated tokens into an array return the array of string tokens param prop the initial comma separated string public static String get Array From List String prop if prop null prop trim equals NON NLS 1 return new String 0 Vector list new Vector String Tokenizer tokens new String Tokenizer prop NON NLS 1 while tokens has More Tokens String token tokens next Token trim if token equals NON NLS 1 list add Element token return list is Empty new String 0 String list to Array new String list size  getArrayFromList StringTokenizer StringTokenizer hasMoreTokens nextToken addElement isEmpty toArray
public static boolean in Development Mode return in Development Mode  inDevelopmentMode inDevelopmentMode
private static Properties load URL url Properties props new Properties try Input Stream is null try is url open Stream props load is finally is close catch IO Exception e TODO consider logging here return props  InputStream openStream IOException

public static I Plugin Registry get Plugin Registry if registry null registry new Plugin Registry return registry  IPluginRegistry getPluginRegistry PluginRegistry
public static I Plugin Descriptor get Plugin Descriptor String plugin Id return get Plugin Registry get Plugin Descriptor plugin Id  IPluginDescriptor getPluginDescriptor pluginId getPluginRegistry getPluginDescriptor pluginId
public static void install Plugins URL installUR Ls throws Core Exception String message Policy bind platform error Installing NON NLS 1 Multi Status result new Multi Status Platform PI RUNTIME 0 message null NON NLS 1 Bundle Context context org eclipse core internal runtime Internal Platform get Default get Bundle Context for int i 0 i installUR Ls length i try context install Bundle installUR Ls i to External Form catch Bundle Exception e I Status status new Status I Status ERROR Platform PI RUNTIME 0 org eclipse core internal plugins Policy bind platform cannot Install Plugin installUR Ls i to External Form e NON NLS 1 result merge status if result isOK throw new Core Exception result  installPlugins installURLs CoreException errorInstalling MultiStatus MultiStatus PI_RUNTIME BundleContext InternalPlatform getDefault getBundleContext installURLs installBundle installURLs toExternalForm BundleException IStatus IStatus PI_RUNTIME cannotInstallPlugin installURLs toExternalForm CoreException
see Platform parse Plugins public static Plugin Registry Model parse Plugins URL plugin Path Factory factory return parse Plugins plugin Path factory false  parsePlugins PluginRegistryModel parsePlugins pluginPath parsePlugins pluginPath
see Platform parse Plugins public synchronized static Plugin Registry Model parse Plugins URL plugin Path Factory factory boolean debug return Registry Loader parse Registry plugin Path factory debug  parsePlugins PluginRegistryModel parsePlugins pluginPath RegistryLoader parseRegistry pluginPath

public String path public Library String path this path path 
public String get Content Filters return null  getContentFilters
public I Path get Path return new Path path  IPath getPath
public String get Type return I Library CODE  getType ILibrary
public boolean is Exported return true  isExported
public boolean is Fully Exported return true  isFullyExported
public String get Package Prefixes return null  getPackagePrefixes

Plugin Class Loader Plugin Descriptor descriptor super computeUR Ls descriptor this descriptor descriptor this bundle Internal Platform get Default get Bundle descriptor get Unique Identifier if bundle null throw new Illegal Argument Exception  PluginClassLoader PluginDescriptor computeURLs InternalPlatform getDefault getBundle getUniqueIdentifier IllegalArgumentException
private static URL computeUR Ls Plugin Descriptor descriptor Bundle bundle Internal Platform get Default get Bundle descriptor get Unique Identifier if bundle null throw new Illegal Argument Exception I Library libs descriptor get Runtime Libraries String dev Path compute Dev Path bundle URL plugin Base descriptor get InstallURL try plugin Base Platform resolve descriptor get InstallURL catch IO Exception e1 Ignore URL urls new URL dev Path length libs length int j 0 for int i 0 i dev Path length i try urls j new URL plugin Base dev Path i catch MalformedURL Exception e Ignore the exception for int i 0 i libs length i try urls j new URL plugin Base libs i get Path toOS String catch MalformedURL Exception e Ignore the exception return urls  computeURLs PluginDescriptor InternalPlatform getDefault getBundle getUniqueIdentifier IllegalArgumentException ILibrary getRuntimeLibraries devPath computeDevPath pluginBase getInstallURL pluginBase getInstallURL IOException devPath devPath pluginBase devPath MalformedURLException pluginBase getPath toOSString MalformedURLException
private static String compute Dev Path Bundle bundle if Dev Class Path Helper in Development Mode return new String 0 String plugin Id bundle get Symbolic Name if plugin Id null return new String 0 return Dev Class Path Helper get Dev Class Path plugin Id  computeDevPath DevClassPathHelper inDevelopmentMode pluginId getSymbolicName pluginId DevClassPathHelper getDevClassPath pluginId
protected Class find Class String name throws Class Not Found Exception return bundle load Class name if no CNFE is thrown activate the bundle if needed  findClass ClassNotFoundException loadClass
public URL find Resource String name return bundle get Resource name  findResource getResource
public Plugin Descriptor get Plugin Descriptor return descriptor  PluginDescriptor getPluginDescriptor

synchronized public void do Plugin Deactivation plugin Object null active false active Pending false deactivated false  doPluginDeactivation pluginObject activePending
see I Plugin Descriptor public I Extension get Extension String id I Extension exts get Extensions for int i 0 i exts length i if exts i get Simple Identifier equals id return exts i return null  IPluginDescriptor IExtension getExtension IExtension getExtensions getSimpleIdentifier
see I Plugin Descriptor public I Extension Point get Extension Point String extension Point Id return Internal Platform get Default get Registry get Extension Point get Id extension Point Id  IPluginDescriptor IExtensionPoint getExtensionPoint extensionPointId InternalPlatform getDefault getRegistry getExtensionPoint getId extensionPointId
see I Plugin Descriptor public I Extension Point get Extension Points return Internal Platform get Default get Registry get Extension Points get Id  IPluginDescriptor IExtensionPoint getExtensionPoints InternalPlatform getDefault getRegistry getExtensionPoints getId
see I Plugin Descriptor public I Extension get Extensions return org eclipse core internal runtime Internal Platform get Default get Registry get Extensions get Id  IPluginDescriptor IExtension getExtensions InternalPlatform getDefault getRegistry getExtensions getId
see I Plugin Descriptor public URL get InstallURL try return new URL PLUGIN URL to String catch IO Exception e throw new Illegal State Exception unchecked  IPluginDescriptor getInstallURL PLUGIN_URL toString IOException IllegalStateException
see I Plugin Descriptor public String get Label return String bundle Osgi get Headers get Constants BUNDLE NAME  IPluginDescriptor getLabel bundleOsgi getHeaders BUNDLE_NAME
see I Plugin Descriptor public Class Loader get Plugin Class Loader synchronized this if class Loader null class Loader new Plugin Class Loader this return class Loader  IPluginDescriptor ClassLoader getPluginClassLoader classLoader classLoader PluginClassLoader classLoader
public Plugin Registry get Plugin Registry return Plugin Registry org eclipse core internal plugins Internal Platform get Plugin Registry  PluginRegistry getPluginRegistry PluginRegistry InternalPlatform getPluginRegistry
see I Plugin Descriptor public String get Provider Name return String bundle Osgi get Headers get Constants BUNDLE VENDOR  IPluginDescriptor getProviderName bundleOsgi getHeaders BUNDLE_VENDOR
see I Plugin Descriptor public Resource Bundle get Resource Bundle throws Missing Resource Exception if resources null resources Resource Translator get Resource Bundle bundle Osgi return resources  IPluginDescriptor ResourceBundle getResourceBundle MissingResourceException ResourceTranslator getResourceBundle bundleOsgi
see I Plugin Descriptor public String get Resource String String value return Resource Translator get Resource String bundle Osgi value  IPluginDescriptor getResourceString ResourceTranslator getResourceString bundleOsgi
see I Plugin Descriptor public String get Resource String String value Resource Bundle b return Resource Translator get Resource String bundle Osgi value b  IPluginDescriptor getResourceString ResourceBundle ResourceTranslator getResourceString bundleOsgi
see I Plugin Descriptor public I Library get Runtime Libraries Bundle all Bundles Bundle fragments Internal Platform get Default get Fragments bundle Osgi if fragments null all Bundles new Bundle fragments length 1 all Bundles 0 bundle Osgi System arraycopy fragments 0 all Bundles 1 fragments length else all Bundles new Bundle bundle Osgi Array List all Libraries new Array List for int i 0 i all Bundles length i try Manifest Element classpath Elements Manifest Element parse Header Constants BUNDLE CLASSPATH String all Bundles i get Headers get Constants BUNDLE CLASSPATH NON NLS 1 if classpath Elements null continue for int j 0 j classpath Elements length j all Libraries add new Library classpath Elements j get Value catch Bundle Exception e Ignore because by the time we get here the errors will have already been logged return I Library all Libraries to Array new I Library all Libraries size  IPluginDescriptor ILibrary getRuntimeLibraries allBundles InternalPlatform getDefault getFragments bundleOsgi allBundles allBundles bundleOsgi allBundles allBundles bundleOsgi ArrayList allLibraries ArrayList allBundles ManifestElement classpathElements ManifestElement parseHeader BUNDLE_CLASSPATH allBundles getHeaders BUNDLE_CLASSPATH classpathElements classpathElements allLibraries classpathElements getValue BundleException ILibrary allLibraries toArray ILibrary allLibraries
see I Plugin Descriptor public String get Unique Identifier return get Id  IPluginDescriptor getUniqueIdentifier getId
see to String public static String get Unique Identifier From String String plugin String int ix plugin String index Of VERSION SEPARATOR return ix 1 plugin String plugin String substring 0 ix  toString getUniqueIdentifierFromString pluginString pluginString indexOf VERSION_SEPARATOR pluginString pluginString
see I Plugin Descriptor public Plugin Version Identifier get Version Identifier String version String bundle Osgi get Headers get Constants BUNDLE VERSION NON NLS 1 try return new Plugin Version Identifier version catch Exception e return new Plugin Version Identifier 1 0 0 NON NLS 1  IPluginDescriptor PluginVersionIdentifier getVersionIdentifier bundleOsgi getHeaders BUNDLE_VERSION PluginVersionIdentifier PluginVersionIdentifier
see to String public static Plugin Version Identifier get Version Identifier From String String plugin String return new Plugin Version Identifier plugin String  toString PluginVersionIdentifier getVersionIdentifierFromString pluginString PluginVersionIdentifier pluginString
public I Plugin Prerequisite get Plugin Prerequisites Bundle Description description Platform get Platform Admin get State false get Bundle bundle Osgi get Bundle Id Bundle Specification specs description get Required Bundles I Plugin Prerequisite resolved Prerequisites new I Plugin Prerequisite specs length for int j 0 j specs length j resolved Prerequisites j new Plugin Prerequisite specs j return resolved Prerequisites  IPluginPrerequisite getPluginPrerequisites BundleDescription getPlatformAdmin getState getBundle bundleOsgi getBundleId BundleSpecification getRequiredBundles IPluginPrerequisite resolvedPrerequisites IPluginPrerequisite resolvedPrerequisites PluginPrerequisite resolvedPrerequisites
Returns true if the plugin is active or is currently in the process of being activated and false otherwse NOTE This method is not synchronized because it is called from within a sync block in Plugin Class Loader boolean has Activation Started return active Pending active  PluginClassLoader hasActivationStarted activePending
see I Plugin Descriptor public synchronized boolean is Plugin Activated note that this method is synchronized for good reason During plugin activation neither true nor false would be valid return values for this method so it must block until activation completes For example returning false during activation would break the registry shutdown procedure because a plugin being activated during shutdown would never be shut down return bundle Osgi get State Bundle ACTIVE  IPluginDescriptor isPluginActivated bundleOsgi getState
sync block in Plugin Class Loader public boolean is Plugin Deactivated return deactivated  PluginClassLoader isPluginDeactivated
private void log Error I Status status Internal Platform get Default get Log org eclipse core internal runtime Internal Platform get Default get Bundle Context get Bundle log status  logError IStatus InternalPlatform getDefault getLog InternalPlatform getDefault getBundleContext getBundle
Returns code true code if we should continue with the plugin activation private boolean plugin Activation Enter throws Core Exception if deactivated had permanent error on startup String error Msg Policy bind plugin plugin Disabled get Id NON NLS 1 throw Exception error Msg null if active active Pending already up and running return false active Pending true go ahead and try to activate return true  pluginActivationEnter CoreException errorMsg pluginDisabled getId throwException errorMsg activePending activePending
private void plugin Activation Exit boolean error Exit if error Exit active false deactivated true else active true we are done with the activation active Pending false  pluginActivationExit errorExit errorExit activePending
private void throw Exception String message Throwable exception throws Core Exception I Status status new Status I Status ERROR Platform PI RUNTIME Platform PLUGIN ERROR message exception log Error status throw new Core Exception status  throwException CoreException IStatus IStatus PI_RUNTIME PLUGIN_ERROR logError CoreException
see get Unique Identifier From String String see get Version Identifier From String String public String to String return get Unique Identifier VERSION SEPARATOR get Version Identifier to String  getUniqueIdentifierFromString getVersionIdentifierFromString toString getUniqueIdentifier VERSION_SEPARATOR getVersionIdentifier toString
see I Plugin Descriptor public final URL find I Path path URL result Find Support find bundle Osgi path if result null try result Platform resolve result catch IO Exception e if the URL cannot be resolved for some reason return the original result return result  IPluginDescriptor IPath FindSupport bundleOsgi IOException
see I Plugin Descriptor public final URL find I Path path Map override URL result Find Support find bundle Osgi path override if result null try result Platform resolve result catch IO Exception e if the URL cannot be resolved for some reason return the original result return result  IPluginDescriptor IPath FindSupport bundleOsgi IOException
see I Plugin Descriptor public Plugin get Plugin throws Core Exception if plugin Object null do Plugin Activation return plugin Object  IPluginDescriptor getPlugin CoreException pluginObject doPluginActivation pluginObject
synchronized void do Plugin Activation throws Core Exception This class is only called when get Plugin is invoked It needs to handle the case where it is called multiple times during the activation processing itself as a result of other classes from this plugin being directly referenced by the plugin class NOTE there is a remote scenario where the plugin class can deadlock if it starts separate thread s within its constructor or startup method and waits on those threads before returning ie calls join sanity checking if bundle Osgi get State Bundle RESOLVED Bundle STARTING Bundle ACTIVE 0 throw new Illegal Argument Exception plug in hasn t been activated yet start bundle if bundle Osgi get State Bundle RESOLVED try bundle Osgi start catch Bundle Exception e throw Exception Policy bind plugin startup Problems e to String e NON NLS 1 if plugin Object null return boolean error Exit true check if already activated or pending if plugin Activation Enter try internal Do Plugin Activation error Exit false finally plugin Activation Exit error Exit else Create a fake plugin object for all new bundles that do not use the Plugin class in their activator hierarchy if active plugin Object null active false plugin Object new Default Plugin this active true  doPluginActivation CoreException getPlugin bundleOsgi getState IllegalArgumentException bundleOsgi getState bundleOsgi BundleException throwException startupProblems toString pluginObject errorExit pluginActivationEnter internalDoPluginActivation errorExit pluginActivationExit errorExit pluginObject pluginObject DefaultPlugin
private String get Plugin Class return String bundle Osgi get Headers get PLUGIN CLASS NON NLS 1  getPluginClass bundleOsgi getHeaders PLUGIN_CLASS
private String get Id return bundle Osgi get Symbolic Name  getId bundleOsgi getSymbolicName
private void internal Do Plugin Activation throws Core Exception String error Msg load the runtime class String plugin Class Name get Plugin Class Class runtime Class null try if plugin Class Name null plugin Class Name equals NON NLS 1 runtime Class Default Plugin class plugin Class Name Default Plugin class get Name else runtime Class bundle Osgi load Class plugin Class Name catch Class Not Found Exception e error Msg Policy bind plugin load Class Error get Id plugin Class Name NON NLS 1 throw Exception error Msg e find the correct constructor Constructor construct null try construct runtime Class get Constructor new Class I Plugin Descriptor class catch No Such Method Exception e No Constructor error Msg Policy bind plugin instantiate Class Error get Id plugin Class Name NON NLS 1 throw Exception error Msg e No Constructor create a new instance try plugin Object Plugin construct new Instance new Object this catch Class Cast Exception e error Msg Policy bind plugin not Plugin Class plugin Class Name NON NLS 1 throw Exception error Msg e catch Exception e error Msg Policy bind plugin instantiate Class Error get Id plugin Class Name NON NLS 1 throw Exception error Msg e  internalDoPluginActivation CoreException errorMsg pluginClassName getPluginClass runtimeClass pluginClassName pluginClassName runtimeClass DefaultPlugin pluginClassName DefaultPlugin getName runtimeClass bundleOsgi loadClass pluginClassName ClassNotFoundException errorMsg loadClassError getId pluginClassName throwException errorMsg runtimeClass getConstructor IPluginDescriptor NoSuchMethodException eNoConstructor errorMsg instantiateClassError getId pluginClassName throwException errorMsg eNoConstructor pluginObject newInstance ClassCastException errorMsg notPluginClass pluginClassName throwException errorMsg errorMsg instantiateClassError getId pluginClassName throwException errorMsg
public Plugin Descriptor org osgi framework Bundle b bundle Osgi b if b get State Bundle ACTIVE 0 active true  PluginDescriptor bundleOsgi getState
public Bundle get Bundle return bundle Osgi  getBundle bundleOsgi
public void set Plugin Plugin object plugin Object object  setPlugin pluginObject
public synchronized void set Active this active true  setActive
public boolean has Plugin Object return plugin Object null  hasPluginObject pluginObject
public void mark As Deactivated deactivated true  markAsDeactivated

private Bundle Specification prereq null public Plugin Prerequisite Bundle Specification b prereq b  BundleSpecification PluginPrerequisite BundleSpecification
public Plugin Version Identifier get Resolved Version Identifier Version actual Version prereq get Actual Version if actual Version null return null return new Plugin Version Identifier actual Version to String  PluginVersionIdentifier getResolvedVersionIdentifier actualVersion getActualVersion actualVersion PluginVersionIdentifier actualVersion toString
public String get Unique Identifier return prereq get Name  getUniqueIdentifier getName
public Plugin Version Identifier get Version Identifier Version specified Version prereq get Version Range null null prereq get Version Range get Minimum if specified Version null return null return new Plugin Version Identifier specified Version to String  PluginVersionIdentifier getVersionIdentifier specifiedVersion getVersionRange getVersionRange getMinimum specifiedVersion PluginVersionIdentifier specifiedVersion toString
public boolean is Exported return prereq is Exported  isExported isExported
public boolean is Matched As Greater Or Equal return is Matched As Greater Or Equal prereq get Version Range  isMatchedAsGreaterOrEqual isMatchedAsGreaterOrEqual getVersionRange
public boolean is Matched As Compatible return is Matched As Compatible prereq get Version Range  isMatchedAsCompatible isMatchedAsCompatible getVersionRange
public boolean is Matched As Equivalent return is Matched As Equivalent prereq get Version Range  isMatchedAsEquivalent isMatchedAsEquivalent getVersionRange
public boolean is Matched As Perfect return is Matched As Perfect prereq get Version Range  isMatchedAsPerfect isMatchedAsPerfect getVersionRange
public boolean is Matched As Exact return is Matched As Equivalent  isMatchedAsExact isMatchedAsEquivalent
public boolean is Optional return prereq is Optional  isOptional isOptional
private static boolean is Matched As Greater Or Equal Version Range version Range if version Range null version Range get Minimum null return false Version minimum version Range get Minimum Version maximum version Range get Maximum null Version max Version version Range get Maximum if maximum equals Version max Version return true return false  isMatchedAsGreaterOrEqual VersionRange versionRange versionRange versionRange getMinimum versionRange getMinimum versionRange getMaximum maxVersion versionRange getMaximum maxVersion
private static boolean is Matched As Perfect Version Range version Range if version Range null version Range get Minimum null return false Version minimum version Range get Minimum Version maximum version Range get Maximum null Version max Version version Range get Maximum if minimum equals maximum return true return false  isMatchedAsPerfect VersionRange versionRange versionRange versionRange getMinimum versionRange getMinimum versionRange getMaximum maxVersion versionRange getMaximum
private static boolean is Matched As Equivalent Version Range version Range if version Range null version Range get Minimum null return false Version minimum version Range get Minimum Version maximum version Range get Maximum null Version max Version version Range get Maximum if minimum is Inclusive maximum is Inclusive return false else if minimum get Major Component maximum get Major Component 1 return false else if minimum get Major Component maximum get Major Component return false else if minimum get Minor Component maximum get Minor Component 1 return true return false  isMatchedAsEquivalent VersionRange versionRange versionRange versionRange getMinimum versionRange getMinimum versionRange getMaximum maxVersion versionRange getMaximum isInclusive isInclusive getMajorComponent getMajorComponent getMajorComponent getMajorComponent getMinorComponent getMinorComponent
private static boolean is Matched As Compatible Version Range version Range if version Range null version Range get Minimum null return false Version minimum version Range get Minimum Version maximum version Range get Maximum null Version max Version version Range get Maximum if minimum is Inclusive maximum is Inclusive return false else if minimum get Major Component maximum get Major Component 1 return true return false  isMatchedAsCompatible VersionRange versionRange versionRange versionRange getMinimum versionRange getMinimum versionRange getMaximum maxVersion versionRange getMaximum isInclusive isInclusive getMajorComponent getMajorComponent

private Hash Map descriptors new Hash Map key is a bundle object value is a plugin Descriptor The synchornization is required public Plugin Registry ext Registry Internal Platform get Default get Registry Internal Platform get Default get Bundle Context add Bundle Listener new Registry Listener  HashMap HashMap pluginDescriptor PluginRegistry extRegistry InternalPlatform getDefault getRegistry InternalPlatform getDefault getBundleContext addBundleListener RegistryListener
public I Configuration Element get Configuration Elements For String unique Id return ext Registry get Configuration Elements For unique Id  IConfigurationElement getConfigurationElementsFor uniqueId extRegistry getConfigurationElementsFor uniqueId
public I Configuration Element get Configuration Elements For String plugin Id String point Id return ext Registry get Configuration Elements For plugin Id point Id  IConfigurationElement getConfigurationElementsFor pluginId pointId extRegistry getConfigurationElementsFor pluginId pointId
public I Configuration Element get Configuration Elements For String plugin Id String point Id String extension Id return ext Registry get Configuration Elements For plugin Id point Id extension Id  IConfigurationElement getConfigurationElementsFor pluginId pointId extensionId extRegistry getConfigurationElementsFor pluginId pointId extensionId
public I Extension get Extension String xpt Unique Id String ext Unique Id return ext Registry get Extension xpt Unique Id ext Unique Id  IExtension getExtension xptUniqueId extUniqueId extRegistry getExtension xptUniqueId extUniqueId
public I Extension get Extension String plugin Id String xpt Simple Id String ext Id return ext Registry get Extension plugin Id xpt Simple Id ext Id  IExtension getExtension pluginId xptSimpleId extId extRegistry getExtension pluginId xptSimpleId extId
public I Extension Point get Extension Point String xpt Unique Id return ext Registry get Extension Point xpt Unique Id  IExtensionPoint getExtensionPoint xptUniqueId extRegistry getExtensionPoint xptUniqueId
public I Extension Point get Extension Point String plugin String xpt return ext Registry get Extension Point plugin xpt  IExtensionPoint getExtensionPoint extRegistry getExtensionPoint
public I Extension Point get Extension Points return ext Registry get Extension Points  IExtensionPoint getExtensionPoints extRegistry getExtensionPoints
public I Plugin Descriptor get Plugin Descriptor String plugin Bundle corresponding Bundle Internal Platform get Default get Bundle plugin if corresponding Bundle null return null return get Plugin Descriptor corresponding Bundle  IPluginDescriptor getPluginDescriptor correspondingBundle InternalPlatform getDefault getBundle correspondingBundle getPluginDescriptor correspondingBundle
private Plugin Descriptor get Plugin Descriptor Bundle bundle if Internal Platform get Default is Fragment bundle return null synchronized descriptors Plugin Descriptor corresponding Descriptor Plugin Descriptor descriptors get bundle if bundle null we haven t created a plugin descriptor yet or it was for a different bundle if corresponding Descriptor null corresponding Descriptor get Bundle bundle create a new plugin descriptor and save it for the next time corresponding Descriptor new Plugin Descriptor bundle descriptors put bundle corresponding Descriptor return corresponding Descriptor if a bundle does not exist ensure we don t keep a plugin descriptor for it if corresponding Descriptor null descriptors remove bundle return null  PluginDescriptor getPluginDescriptor InternalPlatform getDefault isFragment PluginDescriptor correspondingDescriptor PluginDescriptor correspondingDescriptor correspondingDescriptor getBundle correspondingDescriptor PluginDescriptor correspondingDescriptor correspondingDescriptor correspondingDescriptor
public I Plugin Descriptor get Plugin Descriptors String plugin Bundle bundles Internal Platform get Default get Bundles plugin null I Plugin Descriptor results new I Plugin Descriptor bundles length int added 0 for int i 0 i bundles length i Plugin Descriptor desc get Plugin Descriptor bundles i if desc null results added desc if added bundles length return results if added 0 return new I Plugin Descriptor 0 I Plugin Descriptor to Return new I Plugin Descriptor added System arraycopy results 0 to Return 0 added return to Return  IPluginDescriptor getPluginDescriptors InternalPlatform getDefault getBundles IPluginDescriptor IPluginDescriptor PluginDescriptor getPluginDescriptor IPluginDescriptor IPluginDescriptor toReturn IPluginDescriptor toReturn toReturn
public I Plugin Descriptor get Plugin Descriptor String plugin Id Plugin Version Identifier version Bundle bundles Internal Platform get Default get Bundles plugin Id version to String if bundles null return null return get Plugin Descriptor bundles 0  IPluginDescriptor getPluginDescriptor pluginId PluginVersionIdentifier InternalPlatform getDefault getBundles pluginId toString getPluginDescriptor
public I Plugin Descriptor get Plugin Descriptors Bundle bundles Internal Platform get Default get Bundle Context get Bundles Array List pds new Array List bundles length for int i 0 i bundles length i boolean is Fragment Internal Platform get Default is Fragment bundles i if is Fragment bundles i get Symbolic Name null bundles i get State Bundle RESOLVED bundles i get State Bundle STARTING bundles i get State Bundle ACTIVE pds add get Plugin Descriptor bundles i I Plugin Descriptor result new I Plugin Descriptor pds size return I Plugin Descriptor pds to Array result  IPluginDescriptor getPluginDescriptors InternalPlatform getDefault getBundleContext getBundles ArrayList ArrayList isFragment InternalPlatform getDefault isFragment isFragment getSymbolicName getState getState getState getPluginDescriptor IPluginDescriptor IPluginDescriptor IPluginDescriptor toArray
void log Error I Status status Internal Platform get Default log status if Internal Platform DEBUG System out println status get Message  logError IStatus InternalPlatform getDefault InternalPlatform getMessage
public class Registry Listener implements Bundle Listener public void bundle Changed Bundle Event event synchronized descriptors if event get Type Bundle Event UNINSTALLED event get Type Bundle Event UNRESOLVED descriptors remove event get Bundle  RegistryListener BundleListener bundleChanged BundleEvent getType BundleEvent getType BundleEvent getBundle

Lookup the message with the given ID in this catalog public static String bind String id return bind id String null 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string public static String bind String id String binding return bind id new String binding 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings public static String bind String id String binding1 String binding2 return bind id new String binding1 binding2 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string values public static String bind String id String bindings if id null return No message available NON NLS 1 String message null try message bundle get String id catch Missing Resource Exception e If we got an exception looking for the message fail gracefully by just returning the id we were looking for In most cases this is semi informative so is not too bad return Missing message id in bundle Name NON NLS 1 NON NLS 2 if bindings null return message return Message Format format message bindings  getString MissingResourceException bundleName MessageFormat
public static I Progress Monitor monitor For I Progress Monitor monitor if monitor null return new Null Progress Monitor return monitor  IProgressMonitor monitorFor IProgressMonitor NullProgressMonitor
public static I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks  IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor
public static I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks int style if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks style  IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor
Print a debug message to the console If the given boolean is code true code then pre pend the message with the current date public static void debug boolean include Date String message if include Date message new Date System current Time Millis message NON NLS 1 System out println message  includeDate includeDate currentTimeMillis

see org eclipse core runtime preferences I Scope Context get Name public abstract String get Name  IScopeContext getName getName
public I Eclipse Preferences get Node String qualifier if qualifier null throw new Illegal Argument Exception return I Eclipse Preferences Platform get Preferences Service get Root Node node get Name node qualifier  IEclipsePreferences getNode IllegalArgumentException IEclipsePreferences getPreferencesService getRootNode getName
see org eclipse core runtime preferences I Scope Context get Location public abstract I Path get Location  IScopeContext getLocation IPath getLocation

This method decodes the byte array in base 64 encoding into a char array Base 64 encoding has to be according to the specification given by the RFC 1521 5 2 param data the encoded byte array return the decoded byte array public static byte decode byte data if data length 0 return data int last Real Data Index data length 1 while data last Real Data Index equal Sign last Real Data Index original data digit is 8 bits long but base64 digit is 6 bits long int pad Bytes data length 1 last Real Data Index int byte Length data length 6 8 pad Bytes byte result new byte byte Length Each 4 bytes of input encoded we end up with 3 bytes of output int data Index 0 int result Index 0 int all Bits 0 how many result chunks we can process before getting to pad bytes int result Chunks last Real Data Index 1 4 for int i 0 i result Chunks i all Bits 0 Loop 4 times gathering input bits 4 6 24 for int j 0 j 4 j all Bits all Bits 6 decode Digit data data Index Loop 3 times generating output bits 3 8 24 for int j result Index 2 j result Index j result j byte all Bits 0xff Bottom 8 bits all Bits all Bits 8 result Index 3 processed 3 result bytes Now we do the extra bytes in case the original non encoded data was not multiple of 3 bytes switch pad Bytes case 1 1 pad byte means 3 4 1 extra Base64 bytes of input 18 bits of which only 16 are meaningful Or 2 bytes of result data all Bits 0 Loop 3 times gathering input bits for int j 0 j 3 j all Bits all Bits 6 decode Digit data data Index NOTE The code below ends up being equivalent to all Bits all Bits 2 But we code it in a non optimized way for clarity The 4th missing 6 bits are all 0 all Bits all Bits 6 The 3rd missing 8 bits are all 0 all Bits all Bits 8 Loop 2 times generating output bits for int j result Index 1 j result Index j result j byte all Bits 0xff Bottom 8 bits all Bits all Bits 8 break case 2 2 pad bytes mean 2 4 2 extra Base64 bytes of input 12 bits of data of which only 8 are meaningful Or 1 byte of result data all Bits 0 Loop 2 times gathering input bits for int j 0 j 2 j all Bits all Bits 6 decode Digit data data Index NOTE The code below ends up being equivalent to all Bits all Bits 4 But we code it in a non optimized way for clarity The 3rd and 4th missing 6 bits are all 0 all Bits all Bits 6 all Bits all Bits 6 The 3rd and 4th missing 8 bits are all 0 all Bits all Bits 8 all Bits all Bits 8 result result Index byte all Bits 0xff Bottom 8 bits break return result  lastRealDataIndex lastRealDataIndex equalSign lastRealDataIndex padBytes lastRealDataIndex byteLength padBytes byteLength dataIndex resultIndex allBits resultChunks lastRealDataIndex resultChunks allBits allBits allBits decodeDigit dataIndex resultIndex resultIndex allBits allBits allBits resultIndex padBytes allBits allBits allBits decodeDigit dataIndex allBits allBits allBits allBits allBits allBits resultIndex resultIndex allBits allBits allBits allBits allBits allBits decodeDigit dataIndex allBits allBits allBits allBits allBits allBits allBits allBits allBits allBits resultIndex allBits
This method converts a Base 64 digit to its numeric value param data digit character to convert return value for the digit static int decode Digit byte data char char Data char data if char Data Z char Data A return char Data A if char Data z char Data a return char Data a 26 if char Data 9 char Data 0 return char Data 0 52 switch char Data case return 62 case return 63 default throw new Illegal Argument Exception Invalid char to decode data NON NLS 1  decodeDigit charData charData charData charData charData charData charData charData charData charData charData IllegalArgumentException
This method encodes the byte array into a char array in base 64 according to the specification given by the RFC 1521 5 2 param data the encoded char array return the byte array that needs to be encoded public static byte encode byte data int source Chunks data length 3 int len data length 2 3 4 byte result new byte len int extra Bytes data length source Chunks 3 Each 4 bytes of input encoded we end up with 3 bytes of output int data Index 0 int result Index 0 int all Bits 0 for int i 0 i source Chunks i all Bits 0 Loop 3 times gathering input bits 3 8 24 for int j 0 j 3 j all Bits all Bits 8 data data Index 0xff Loop 4 times generating output bits 4 6 24 for int j result Index 3 j result Index j result j byte digits all Bits 0x3f Bottom 6 bits all Bits all Bits 6 result Index 4 processed 4 result bytes Now we do the extra bytes in case the original non encoded data is not multiple of 4 bytes switch extra Bytes case 1 all Bits data data Index actual byte all Bits all Bits 8 8 bits of zeroes all Bits all Bits 8 8 bits of zeroes Loop 4 times generating output bits 4 6 24 for int j result Index 3 j result Index j result j byte digits all Bits 0x3f Bottom 6 bits all Bits all Bits 6 2 pad tags result result length 1 byte result result length 2 byte break case 2 all Bits data data Index actual byte all Bits all Bits 8 data data Index 0xff actual byte all Bits all Bits 8 8 bits of zeroes Loop 4 times generating output bits 4 6 24 for int j result Index 3 j result Index j result j byte digits all Bits 0x3f Bottom 6 bits all Bits all Bits 6 1 pad tag result result length 1 byte break return result  sourceChunks extraBytes sourceChunks dataIndex resultIndex allBits sourceChunks allBits allBits allBits dataIndex resultIndex resultIndex allBits allBits allBits resultIndex extraBytes allBits dataIndex allBits allBits allBits allBits resultIndex resultIndex allBits allBits allBits allBits dataIndex allBits allBits dataIndex allBits allBits resultIndex resultIndex allBits allBits allBits

Default constructor Should only be called by create Executable Extension public Configuration Preferences this null null  createExecutableExtension ConfigurationPreferences
private Configuration Preferences I Eclipse Preferences parent String name super parent name initialize Children cache the segment count String path absolute Path segment Count get Segment Count path if segment Count 2 return cache the qualifier qualifier get Segment path 1 cache the location if qualifier null return if base Location null location compute Location base Location qualifier  ConfigurationPreferences IEclipsePreferences initializeChildren absolutePath segmentCount getSegmentCount segmentCount getSegment baseLocation computeLocation baseLocation
protected I Path get Location return location  IPath getLocation
protected boolean is Already Loaded I Eclipse Preferences node return loaded Nodes contains node name  isAlreadyLoaded IEclipsePreferences loadedNodes
protected void loaded loaded Nodes add name  loadedNodes
protected I Eclipse Preferences get Load Level if load Level null if qualifier null return null Make it relative to this node rather than navigating to it from the root Walk backwards up the tree starting at this node This is important to avoid a chicken egg thing on startup I Eclipse Preferences node this for int i 2 i segment Count i node Eclipse Preferences node parent load Level node return load Level  IEclipsePreferences getLoadLevel loadLevel IEclipsePreferences segmentCount EclipsePreferences loadLevel loadLevel
protected void initialize Children if initialized parent null return try synchronized this if base Location null return String names compute Children base Location for int i 0 i names length i add Child names i null finally initialized true  initializeChildren baseLocation computeChildren baseLocation addChild
protected Eclipse Preferences internal Create I Eclipse Preferences node Parent String node Name Plugin context return new Configuration Preferences node Parent node Name  EclipsePreferences internalCreate IEclipsePreferences nodeParent nodeName ConfigurationPreferences nodeParent nodeName

Default constructor for this class public Default Preferences this null null  DefaultPreferences
private Default Preferences I Eclipse Preferences parent String name Plugin context this parent name this plugin context  DefaultPreferences IEclipsePreferences
private Default Preferences I Eclipse Preferences parent String name super parent name if parent instanceof Default Preferences this plugin Default Preferences parent plugin get the children initialize Children cache the segment count String path absolute Path segment Count get Segment Count path if segment Count 2 return cache the qualifier qualifier get Segment path 1  DefaultPreferences IEclipsePreferences DefaultPreferences DefaultPreferences initializeChildren absolutePath segmentCount getSegmentCount segmentCount getSegment
private void apply Bundle Defaults Bundle bundle Platform get Bundle name if bundle null return URL url Platform find bundle new Path Plugin PREFERENCES DEFAULT OVERRIDE FILE NAME if url null if Internal Platform DEBUG PREFERENCES Policy debug Preference default override file not found for bundle bundle get Symbolic Name NON NLS 1 return URL transURL Platform find bundle NL DIR append Plugin PREFERENCES DEFAULT OVERRIDE BASE NAME add File Extension PROPERTIES FILE EXTENSION if transURL null Internal Platform DEBUG PREFERENCES Policy debug Preference translation file not found for bundle bundle get Symbolic Name NON NLS 1 apply Defaults name load Properties url load Properties transURL  applyBundleDefaults getBundle PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME InternalPlatform DEBUG_PREFERENCES getSymbolicName NL_DIR PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME addFileExtension PROPERTIES_FILE_EXTENSION InternalPlatform DEBUG_PREFERENCES getSymbolicName applyDefaults loadProperties loadProperties
private void apply Command Line Defaults String filename Internal Platform plugin Customization File if filename null if Internal Platform DEBUG PREFERENCES Policy debug Command line preferences customization file not specified NON NLS 1 return if Internal Platform DEBUG PREFERENCES Policy debug Using command line preference customization file filename NON NLS 1 apply Defaults null load Properties filename null  applyCommandLineDefaults InternalPlatform pluginCustomizationFile InternalPlatform DEBUG_PREFERENCES InternalPlatform DEBUG_PREFERENCES applyDefaults loadProperties
private void apply Defaults String id Properties default Values Properties translations for Enumeration e default Values keys e has More Elements String full Key String e next Element String value default Values get Property full Key if value null continue I Path child Path new Path full Key String key child Path last Segment child Path child Path remove Last Segments 1 String local Qualifier id if id null local Qualifier child Path segment 0 child Path child Path remove First Segments 1 if name equals local Qualifier value translate Preference value translations if Internal Platform DEBUG PREFERENCES Policy debug Setting default preference new Path absolute Path append child Path append key value NON NLS 1 Eclipse Preferences internal Node child Path to String false null internal Put key value  applyDefaults defaultValues defaultValues hasMoreElements fullKey nextElement defaultValues getProperty fullKey IPath childPath fullKey childPath lastSegment childPath childPath removeLastSegments localQualifier localQualifier childPath childPath childPath removeFirstSegments localQualifier translatePreference InternalPlatform DEBUG_PREFERENCES absolutePath childPath EclipsePreferences internalNode childPath toString internalPut
private void run Initializer I Configuration Element element Abstract Preference Initializer initializer null try initializer Abstract Preference Initializer element create Executable Extension ATTRIBUTE CLASS catch Class Cast Exception e String message Policy bind preferences invalid Extension Superclass NON NLS 1 I Status status new Status I Status ERROR Platform PI RUNTIME I Status ERROR message e log status catch Core Exception e log e get Status initializer initialize Default Preferences  runInitializer IConfigurationElement AbstractPreferenceInitializer AbstractPreferenceInitializer createExecutableExtension ATTRIBUTE_CLASS ClassCastException invalidExtensionSuperclass IStatus IStatus PI_RUNTIME IStatus CoreException getStatus initializeDefaultPreferences
public I Eclipse Preferences node String child Name Plugin context return internal Node child Name true context  IEclipsePreferences childName internalNode childName
private void apply Runtime Defaults access the extension point I Extension Point point Platform get Extension Registry get Extension Point Platform PI RUNTIME Platform PT PREFERENCES if point null if Internal Platform DEBUG PREFERENCES Policy debug No extensions for Platform PI RUNTIME Platform PT PREFERENCES extension point Skipping runtime default preference customization NON NLS 1 NON NLS 2 return I Extension extensions point get Extensions for int i 0 i extensions length i I Configuration Element elements extensions i get Configuration Elements for int j 0 j elements length j if ELEMENT INITIALIZER equals elements j get Name if name equals elements j get Declaring Extension get Namespace if Internal Platform DEBUG PREFERENCES Policy debug Running default preference customization as defined by elements j get Declaring Extension get Declaring Plugin Descriptor NON NLS 1 run Initializer elements j return No extension exists Get the plug in object and call initialize Default Plugin Preferences if plugin null plugin Platform get Plugin name if plugin null if Internal Platform DEBUG PREFERENCES Policy debug No plug in object available to set plug in default preference overrides for name NON NLS 1 return if Internal Platform DEBUG PREFERENCES Policy debug Applying plug in default preference overrides for plug in plugin get Descriptor get Unique Identifier NON NLS 1 plugin internal Initialize Default Plugin Preferences  applyRuntimeDefaults IExtensionPoint getExtensionRegistry getExtensionPoint PI_RUNTIME PT_PREFERENCES InternalPlatform DEBUG_PREFERENCES PI_RUNTIME PT_PREFERENCES IExtension getExtensions IConfigurationElement getConfigurationElements ELEMENT_INITIALIZER getName getDeclaringExtension getNamespace InternalPlatform DEBUG_PREFERENCES getDeclaringExtension getDeclaringPluginDescriptor runInitializer initializeDefaultPluginPreferences getPlugin InternalPlatform DEBUG_PREFERENCES InternalPlatform DEBUG_PREFERENCES getDescriptor getUniqueIdentifier internalInitializeDefaultPluginPreferences
private void apply Product Defaults I Product product Platform get Product if product null if Internal Platform DEBUG PREFERENCES Policy debug Product not available to set product default preference overrides NON NLS 1 return String id product get Id if id null if Internal Platform DEBUG PREFERENCES Policy debug Product ID not available to apply product level preference defaults NON NLS 1 return Bundle bundle product get Defining Bundle if bundle null if Internal Platform DEBUG PREFERENCES Policy debug Bundle not available to apply product level preference defaults for product id id NON NLS 1 return String value product get Property PRODUCT KEY URL url null URL transURL null if value null if Internal Platform DEBUG PREFERENCES Policy debug Product id does not define preference customization file Using legacy file plugin customization ini NON NLS 1 NON NLS 2 value LEGACY PRODUCT CUSTOMIZATION FILENAME url Platform find bundle new Path LEGACY PRODUCT CUSTOMIZATION FILENAME transURL Platform find bundle NL DIR append value remove File Extension add File Extension PROPERTIES FILE EXTENSION else try to convert the key to a URL try url new URL value catch MalformedURL Exception e didn t work so treat it as a filename url Platform find bundle new Path value if url null transURL Platform find bundle NL DIR append value remove File Extension add File Extension PROPERTIES FILE EXTENSION if url null if Internal Platform DEBUG PREFERENCES Policy debug Product preference customization file value not found for bundle id NON NLS 1 NON NLS 2 return if transURL null Internal Platform DEBUG PREFERENCES Policy debug No preference translations found for product file bundle get Symbolic Name value NON NLS 1 apply Defaults null load Properties url load Properties transURL  applyProductDefaults IProduct getProduct InternalPlatform DEBUG_PREFERENCES getId InternalPlatform DEBUG_PREFERENCES getDefiningBundle InternalPlatform DEBUG_PREFERENCES getProperty PRODUCT_KEY InternalPlatform DEBUG_PREFERENCES plugin_customization LEGACY_PRODUCT_CUSTOMIZATION_FILENAME LEGACY_PRODUCT_CUSTOMIZATION_FILENAME NL_DIR removeFileExtension addFileExtension PROPERTIES_FILE_EXTENSION MalformedURLException NL_DIR removeFileExtension addFileExtension PROPERTIES_FILE_EXTENSION InternalPlatform DEBUG_PREFERENCES InternalPlatform DEBUG_PREFERENCES getSymbolicName applyDefaults loadProperties loadProperties
see org osgi service prefs Preferences flush public void flush default values are not persisted 
protected I Eclipse Preferences get Load Level if load Level null if qualifier null return null Make it relative to this node rather than navigating to it from the root Walk backwards up the tree starting at this node This is important to avoid a chicken egg thing on startup Eclipse Preferences node this for int i 2 i segment Count i node Eclipse Preferences node parent load Level node return load Level  IEclipsePreferences getLoadLevel loadLevel EclipsePreferences segmentCount EclipsePreferences loadLevel loadLevel
protected void initialize Children if initialized parent null return try synchronized this Bundle Context context Internal Platform get Default get Bundle Context Bundle bundles context get Bundles for int i 0 i bundles length i String child Name bundles i get Symbolic Name if child Name null add Child child Name null finally initialized true  initializeChildren BundleContext InternalPlatform getDefault getBundleContext getBundles childName getSymbolicName childName addChild childName
protected Eclipse Preferences internal Create I Eclipse Preferences node Parent String node Name Plugin context return new Default Preferences node Parent node Name context  EclipsePreferences internalCreate IEclipsePreferences nodeParent nodeName DefaultPreferences nodeParent nodeName
protected boolean is Already Loaded I Eclipse Preferences node return loaded Nodes contains node name  isAlreadyLoaded IEclipsePreferences loadedNodes
see org eclipse core internal preferences Eclipse Preferences load protected void load load Defaults  EclipsePreferences loadDefaults
private void load Defaults apply Runtime Defaults apply Bundle Defaults apply Product Defaults apply Command Line Defaults  loadDefaults applyRuntimeDefaults applyBundleDefaults applyProductDefaults applyCommandLineDefaults
private Properties load Properties URL url Properties result new Properties if url null return result Input Stream input null try input Platform resolve url open Stream result load input catch IO Exception e if Internal Platform DEBUG PREFERENCES Policy debug Problem opening stream to preference customization file url NON NLS 1 e print Stack Trace finally if input null try input close catch IO Exception e ignore return result  loadProperties InputStream openStream IOException InternalPlatform DEBUG_PREFERENCES printStackTrace IOException
private Properties load Properties String filename Properties result new Properties Input Stream input null try input new Buffered Input Stream new File Input Stream filename result load input catch File Not Found Exception e if Internal Platform DEBUG PREFERENCES Policy debug Preference customization file not found filename NON NLS 1 catch IO Exception e String message Policy bind preferences load Exception filename NON NLS 1 I Status status new Status I Status ERROR Platform PI RUNTIME I Status ERROR message e Internal Platform get Default log status finally if input null try input close catch IO Exception e ignore return result  loadProperties InputStream BufferedInputStream FileInputStream FileNotFoundException InternalPlatform DEBUG_PREFERENCES IOException loadException IStatus IStatus PI_RUNTIME IStatus InternalPlatform getDefault IOException
protected void loaded loaded Nodes add name  loadedNodes
see org osgi service prefs Preferences sync public void sync default values are not persisted 
Takes a preference value and a related resource bundle and returns the translated version of this value if one exists private String translate Preference String value Properties props value value trim if props null value starts With KEY DOUBLE PREFIX return value if value starts With KEY PREFIX int ix value index Of NON NLS 1 String key ix 1 value substring 1 value substring 1 ix String dflt ix 1 value value substring ix 1 return props get Property key dflt return value  translatePreference startsWith KEY_DOUBLE_PREFIX startsWith KEY_PREFIX indexOf getProperty

protected boolean removed false public Eclipse Preferences this null null  EclipsePreferences
protected Eclipse Preferences I Eclipse Preferences parent String name super this parent parent this name name  EclipsePreferences IEclipsePreferences
public String absolute Path if cached Path null if parent null cached Path PATH SEPARATOR else String parent Path parent absolute Path if the parent is the root then we don t have to add a separator between the parent path and our path if parent Path length 1 cached Path parent Path name else cached Path parent Path PATH SEPARATOR name return cached Path  absolutePath cachedPath cachedPath PATH_SEPARATOR parentPath absolutePath parentPath cachedPath parentPath cachedPath parentPath PATH_SEPARATOR cachedPath
public void accept I Preference Node Visitor visitor throws Backing Store Exception if visitor visit this return I Eclipse Preferences to Visit get Children for int i 0 i to Visit length i to Visit i accept visitor  IPreferenceNodeVisitor BackingStoreException IEclipsePreferences toVisit getChildren toVisit toVisit
protected synchronized void add Child String child Name I Eclipse Preferences child Thread safety synchronize method to protect modification of children field if children null children Collections synchronized Map new Hash Map children put child Name child null Object child Name child  addChild childName IEclipsePreferences synchronizedMap HashMap childName childName
public void add Node Change Listener I Node Change Listener listener check Removed if node Listeners null node Listeners new Listener List node Listeners add listener if Internal Platform DEBUG PREFERENCES Policy debug Added preference node change listener listener to absolute Path NON NLS 1 NON NLS 2  addNodeChangeListener INodeChangeListener checkRemoved nodeListeners nodeListeners ListenerList nodeListeners InternalPlatform DEBUG_PREFERENCES absolutePath
public void add Preference Change Listener I Preference Change Listener listener check Removed if preference Listeners null preference Listeners new Listener List preference Listeners add listener if Internal Platform DEBUG PREFERENCES Policy debug Added preference property change listener listener to absolute Path NON NLS 1 NON NLS 2  addPreferenceChangeListener IPreferenceChangeListener checkRemoved preferenceListeners preferenceListeners ListenerList preferenceListeners InternalPlatform DEBUG_PREFERENCES absolutePath
private I Eclipse Preferences calculate Root I Eclipse Preferences result this while result parent null result I Eclipse Preferences result parent return result  IEclipsePreferences calculateRoot IEclipsePreferences IEclipsePreferences
protected void check Removed if removed String message Policy bind preferences removed Node name NON NLS 1 throw new Illegal State Exception message  checkRemoved removedNode IllegalStateException
public String children Names illegal state if this node has been removed check Removed return internal Child Names  childrenNames checkRemoved internalChildNames
protected String internal Child Names Map temp children if temp null temp size 0 return EMPTY STRING ARRAY return String temp key Set to Array EMPTY STRING ARRAY  internalChildNames EMPTY_STRING_ARRAY keySet toArray EMPTY_STRING_ARRAY
public void clear illegal state if this node has been removed check Removed Properties temp properties if temp null return call each one separately instead of Properties clear so clients get change notification String keys String temp key Set to Array EMPTY STRING ARRAY for int i 0 i keys length i remove keys i Thread safety protect against concurrent modification synchronized this properties null make Dirty  checkRemoved keySet toArray EMPTY_STRING_ARRAY makeDirty
Filename Filter filter new Filename Filter public boolean accept File directory String child if new File directory child is Directory return false if child ends With extension String short Name child substring 0 child length extension length result add short Name return false  FilenameFilter FilenameFilter isDirectory endsWith shortName shortName
protected String compute Children I Path root if root null return EMPTY STRING ARRAY I Path dir root append DEFAULT PREFERENCES DIRNAME final Array List result new Array List final String extension PREFS FILE EXTENSION File file dir to File Filename Filter filter new Filename Filter public boolean accept File directory String child if new File directory child is Directory return false if child ends With extension String short Name child substring 0 child length extension length result add short Name return false file list filter return String result to Array EMPTY STRING ARRAY  computeChildren IPath EMPTY_STRING_ARRAY IPath DEFAULT_PREFERENCES_DIRNAME ArrayList ArrayList PREFS_FILE_EXTENSION toFile FilenameFilter FilenameFilter isDirectory endsWith shortName shortName toArray EMPTY_STRING_ARRAY
protected I Path compute Location I Path root String qualifier return root null null root append DEFAULT PREFERENCES DIRNAME append qualifier add File Extension PREFS FILE EXTENSION  IPath computeLocation IPath DEFAULT_PREFERENCES_DIRNAME addFileExtension PREFS_FILE_EXTENSION
protected void convert From Properties Properties table String version table get Property VERSION KEY if version null VERSION VALUE equals version ignore for now table remove VERSION KEY for Iterator i table key Set iterator i has Next String full Key String i next String value table get Property full Key if value null String split Path decode Path full Key String path split Path 0 path make Relative path String key split Path 1 use internal methods to avoid notifying listeners Eclipse Preferences child Node Eclipse Preferences internal Node path false null if Internal Platform DEBUG PREFERENCES Policy debug Setting preference child Node absolute Path key value NON NLS 1 child Node internal Put key value  convertFromProperties getProperty VERSION_KEY VERSION_VALUE VERSION_KEY keySet hasNext fullKey getProperty fullKey splitPath decodePath fullKey splitPath makeRelative splitPath EclipsePreferences childNode EclipsePreferences internalNode InternalPlatform DEBUG_PREFERENCES childNode absolutePath childNode internalPut
protected Properties convert To Properties Properties result String prefix throws Backing Store Exception add the key value pairs from this node Properties temp properties boolean add Separator prefix length 0 if temp null synchronized temp String keys String temp key Set to Array EMPTY STRING ARRAY for int i 0 i keys length i String value temp get Property keys i null if value null result put encode Path prefix keys i value recursively add the child information I Eclipse Preferences child Nodes get Children for int i 0 i child Nodes length i Eclipse Preferences child Eclipse Preferences child Nodes i String full Path add Separator prefix PATH SEPARATOR child name child name child convert To Properties result full Path return result  convertToProperties BackingStoreException addSeparator keySet toArray EMPTY_STRING_ARRAY getProperty encodePath IEclipsePreferences childNodes getChildren childNodes EclipsePreferences EclipsePreferences childNodes fullPath addSeparator PATH_SEPARATOR convertToProperties fullPath
see org eclipse core runtime preferences I Scope create org eclipse core runtime preferences I Eclipse Preferences public I Eclipse Preferences create I Eclipse Preferences node Parent String node Name return create node Parent node Name null  IScope IEclipsePreferences IEclipsePreferences IEclipsePreferences nodeParent nodeName nodeParent nodeName
public I Eclipse Preferences create I Eclipse Preferences node Parent String node Name Plugin context Eclipse Preferences result internal Create node Parent node Name context Eclipse Preferences node Parent add Child node Name result I Eclipse Preferences load Level result get Load Level if this node or a parent node is not the load level then return if load Level null return result if the result node is not a load level then a child must be if result load Level return result the result node is a load level if is Already Loaded result return result if loading return result try loading true result load Legacy result load result loaded result flush catch Backing Store Exception e I Path location result get Location String message Policy bind preferences load Exception location null EMPTY STRING location to String NON NLS 1 I Status status new Status I Status ERROR Platform PI RUNTIME I Status ERROR message e Internal Platform get Default log status finally loading false return result  IEclipsePreferences IEclipsePreferences nodeParent nodeName EclipsePreferences internalCreate nodeParent nodeName EclipsePreferences nodeParent addChild nodeName IEclipsePreferences loadLevel getLoadLevel loadLevel loadLevel isAlreadyLoaded loadLegacy BackingStoreException IPath getLocation loadException EMPTY_STRING toString IStatus IStatus PI_RUNTIME IStatus InternalPlatform getDefault
public void flush throws Backing Store Exception illegal state if this node has been removed check Removed I Eclipse Preferences load Level get Load Level if this node or a parent is not the load level then flush the children if load Level null String children Names children Names for int i 0 i children Names length i node children Names i flush return a parent is the load level for this node if this load Level load Level flush return this node is a load level any work to do if dirty return remove dirty bit before saving to ensure that concurrent changes during save mark the store as dirty dirty false try save catch Backing Store Exception e mark it dirty again because the save failed dirty true throw e  BackingStoreException checkRemoved IEclipsePreferences loadLevel getLoadLevel loadLevel childrenNames childrenNames childrenNames childrenNames loadLevel loadLevel BackingStoreException
see org osgi service prefs Preferences get java lang String java lang String public String get String key String default Value String value internal Get key return value null default Value value  defaultValue internalGet defaultValue
see org osgi service prefs Preferences get Boolean java lang String boolean public boolean get Boolean String key boolean default Value String value internal Get key return value null default Value TRUE equals Ignore Case value  getBoolean getBoolean defaultValue internalGet defaultValue equalsIgnoreCase
see org osgi service prefs Preferences get Byte Array java lang String byte public byte get Byte Array String key byte default Value String value internal Get key return value null default Value Base64 decode value get Bytes  getByteArray getByteArray defaultValue internalGet defaultValue getBytes
Thread safe way to obtain a child for a given key Returns the child that matches the given key or null if there is no matching child protected synchronized I Eclipse Preferences get Child String key Plugin context if children null return null Object value children get key if value null return null if value instanceof I Eclipse Preferences return I Eclipse Preferences value value create this key context add Child key I Eclipse Preferences value return I Eclipse Preferences value  IEclipsePreferences getChild IEclipsePreferences IEclipsePreferences addChild IEclipsePreferences IEclipsePreferences
Thread safe way to obtain all children of this node Never returns null protected synchronized I Eclipse Preferences get Children Array List result new Array List String names internal Child Names for int i 0 i names length i result add get Child names i null return I Eclipse Preferences result to Array EMPTY NODE ARRAY  IEclipsePreferences getChildren ArrayList ArrayList internalChildNames getChild IEclipsePreferences toArray EMPTY_NODE_ARRAY
public double get Double String key double default Value String value internal Get key double result default Value if value null try result Double parse Double value catch Number Format Exception e use default return result  getDouble defaultValue internalGet defaultValue parseDouble NumberFormatException
public float get Float String key float default Value String value internal Get key float result default Value if value null try result Float parse Float value catch Number Format Exception e use default return result  getFloat defaultValue internalGet defaultValue parseFloat NumberFormatException
public int get Int String key int default Value String value internal Get key int result default Value if value null try result Integer parse Int value catch Number Format Exception e use default return result  getInt defaultValue internalGet defaultValue parseInt NumberFormatException
protected I Eclipse Preferences get Load Level return null  IEclipsePreferences getLoadLevel
Subclasses to over ride protected I Path get Location return null  IPath getLocation
public long get Long String key long default Value String value internal Get key long result default Value if value null try result Long parse Long value catch Number Format Exception e use default return result  getLong defaultValue internalGet defaultValue parseLong NumberFormatException
protected Eclipse Preferences internal Create I Eclipse Preferences node Parent String node Name Plugin context return new Eclipse Preferences node Parent node Name  EclipsePreferences internalCreate IEclipsePreferences nodeParent nodeName EclipsePreferences nodeParent nodeName
Returns the existing value at the given key or null if no such value exists protected String internal Get String key throw NPE if key is null if key null throw new Null Pointer Exception illegal state if this node has been removed check Removed Thread safety copy field reference in case of concurrent modification Properties temp properties if temp null if Internal Platform DEBUG PREFERENCES Policy debug Getting preference value absolute Path key null NON NLS 1 NON NLS 2 return null String result temp get Property key if Internal Platform DEBUG PREFERENCES Policy debug Getting preference value absolute Path key result NON NLS 1 NON NLS 2 return result  internalGet NullPointerException checkRemoved InternalPlatform DEBUG_PREFERENCES absolutePath getProperty InternalPlatform DEBUG_PREFERENCES absolutePath
Implements the node String method and optionally notifies listeners protected I Eclipse Preferences internal Node String path boolean notify Plugin context illegal state if this node has been removed check Removed short circuit this node if path length 0 return this if we have an absolute path use the root relative to this node instead of the global root in case we have a different hierarchy e g export if path char At 0 I Path SEPARATOR return I Eclipse Preferences calculate Root node path substring 1 int index path index Of I Path SEPARATOR String key index 1 path path substring 0 index boolean added false I Eclipse Preferences child synchronized this child get Child key context if child null child create this key context added true notify listeners if a child was added if added notify node Added child return I Eclipse Preferences child node index 1 EMPTY STRING path substring index 1  IEclipsePreferences internalNode checkRemoved charAt IPath IEclipsePreferences calculateRoot indexOf IPath IEclipsePreferences getChild nodeAdded IEclipsePreferences EMPTY_STRING
Stores the given key value pair performing lazy initialization of the properties field if necessary Returns the old value for the given key or null if no value existed protected synchronized String internal Put String key String new Value illegal state if this node has been removed check Removed if properties null properties new Properties String old Value properties get Property key if Internal Platform DEBUG PREFERENCES Policy debug Setting preference absolute Path key new Value NON NLS 1 properties set Property key new Value return old Value  internalPut newValue checkRemoved oldValue getProperty InternalPlatform DEBUG_PREFERENCES absolutePath newValue setProperty newValue oldValue
private void internal Remove String key Object old Value boolean was Removed false Thread safety synchronize when modifying the properties field synchronized this if properties null return was Removed properties remove key null if properties size 0 properties null if was Removed make Dirty if was Removed preference Changed key old Value null  internalRemove oldValue wasRemoved wasRemoved wasRemoved makeDirty wasRemoved preferenceChanged oldValue
Subclasses to over ride protected boolean is Already Loaded I Eclipse Preferences node return true  isAlreadyLoaded IEclipsePreferences
public String keys illegal state if this node has been removed check Removed Properties temp properties if temp null temp size 0 return EMPTY STRING ARRAY return String temp key Set to Array EMPTY STRING ARRAY  checkRemoved EMPTY_STRING_ARRAY keySet toArray EMPTY_STRING_ARRAY
protected void load throws Backing Store Exception load get Location  BackingStoreException getLocation
protected void load I Path location throws Backing Store Exception if location null if Internal Platform DEBUG PREFERENCES Policy debug Unable to determine location of preference file for node absolute Path NON NLS 1 return if Internal Platform DEBUG PREFERENCES Policy debug Loading preferences from file location NON NLS 1 Input Stream input null Properties from Disk new Properties try input new Buffered Input Stream new File Input Stream location to File from Disk load input catch File Not Found Exception e file doesn t exist but that s ok if Internal Platform DEBUG PREFERENCES Policy debug Preference file does not exist location NON NLS 1 return catch IO Exception e String message Policy bind preferences load Exception location to String NON NLS 1 log new Status I Status INFO Platform PI RUNTIME I Status INFO message e throw new Backing Store Exception message finally if input null try input close catch IO Exception e ignore convert From Properties from Disk  IPath BackingStoreException InternalPlatform DEBUG_PREFERENCES absolutePath InternalPlatform DEBUG_PREFERENCES InputStream fromDisk BufferedInputStream FileInputStream toFile fromDisk FileNotFoundException InternalPlatform DEBUG_PREFERENCES IOException loadException toString IStatus PI_RUNTIME IStatus BackingStoreException IOException convertFromProperties fromDisk
protected void loaded do nothing 
protected void load Legacy sub classes to over ride if necessary  loadLegacy
protected void log I Status status Internal Platform get Default log status  IStatus InternalPlatform getDefault
protected void make Dirty Eclipse Preferences node this while node null node removed node dirty true node Eclipse Preferences node parent  makeDirty EclipsePreferences EclipsePreferences
see org osgi service prefs Preferences name public String name return name 
see org osgi service prefs Preferences node java lang String public Preferences node String path Name return internal Node path Name true null  pathName internalNode pathName
final I Node Change Listener listener I Node Change Listener listeners i I Safe Runnable job new I Safe Runnable public void handle Exception Throwable exception already logged in Platform run  INodeChangeListener INodeChangeListener ISafeRunnable ISafeRunnable handleException
public void run throws Exception listener added event 
protected void node Added I Eclipse Preferences child if node Listeners null return Object listeners node Listeners get Listeners for int i 0 i listeners length i final Node Change Event event new Node Change Event this child final I Node Change Listener listener I Node Change Listener listeners i I Safe Runnable job new I Safe Runnable public void handle Exception Throwable exception already logged in Platform run public void run throws Exception listener added event Platform run job  nodeAdded IEclipsePreferences nodeListeners nodeListeners getListeners NodeChangeEvent NodeChangeEvent INodeChangeListener INodeChangeListener ISafeRunnable ISafeRunnable handleException
public boolean node Exists String path throws Backing Store Exception short circuit for checking this node if path length 0 return removed illegal state if this node has been removed do this AFTER checking for the empty string check Removed use the root relative to this node instead of the global root in case we have a different hierarchy e g export if path char At 0 I Path SEPARATOR return calculate Root node Exists path substring 1 int index path index Of I Path SEPARATOR String child Name index 1 path path substring 0 index I Eclipse Preferences child get Child child Name null if child null return false return child node Exists index 1 EMPTY STRING path substring index 1  nodeExists BackingStoreException checkRemoved charAt IPath calculateRoot nodeExists indexOf IPath childName IEclipsePreferences getChild childName nodeExists EMPTY_STRING
final I Node Change Listener listener I Node Change Listener listeners i I Safe Runnable job new I Safe Runnable public void handle Exception Throwable exception already being logged in Platform run  INodeChangeListener INodeChangeListener ISafeRunnable ISafeRunnable handleException
public void run throws Exception listener removed event 
protected void node Removed I Eclipse Preferences child if node Listeners null return final Object listeners node Listeners get Listeners for int i 0 i listeners length i final Node Change Event event new Node Change Event this child final I Node Change Listener listener I Node Change Listener 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 listener removed event Platform run job  nodeRemoved IEclipsePreferences nodeListeners nodeListeners getListeners NodeChangeEvent NodeChangeEvent INodeChangeListener INodeChangeListener ISafeRunnable ISafeRunnable handleException
public Preferences parent illegal state if this node has been removed check Removed return parent  checkRemoved
final I Preference Change Listener listener I Preference Change Listener listeners i I Safe Runnable job new I Safe Runnable public void handle Exception Throwable exception already logged in Platform run  IPreferenceChangeListener IPreferenceChangeListener ISafeRunnable ISafeRunnable handleException
public void run throws Exception listener preference Change event  preferenceChange
protected void preference Changed String key Object old Value Object new Value if preference Listeners null return Object listeners preference Listeners get Listeners for int i 0 i listeners length i final Preference Change Event event new Preference Change Event this key old Value new Value final I Preference Change Listener listener I Preference Change Listener listeners i I Safe Runnable job new I Safe Runnable public void handle Exception Throwable exception already logged in Platform run public void run throws Exception listener preference Change event Platform run job  preferenceChanged oldValue newValue preferenceListeners preferenceListeners getListeners PreferenceChangeEvent PreferenceChangeEvent oldValue newValue IPreferenceChangeListener IPreferenceChangeListener ISafeRunnable ISafeRunnable handleException preferenceChange
public void put String key String new Value String old Value internal Put key new Value if new Value equals old Value make Dirty preference Changed key old Value new Value  newValue oldValue internalPut newValue newValue oldValue makeDirty preferenceChanged oldValue newValue
public void put Boolean String key boolean value String new Value value TRUE FALSE String old Value internal Put key new Value if new Value equals old Value make Dirty preference Changed key old Value null null new Boolean old Value value Boolean TRUE Boolean FALSE  putBoolean newValue oldValue internalPut newValue newValue oldValue makeDirty preferenceChanged oldValue oldValue
public void put Byte Array String key byte value String new Value new String Base64 encode value String old Value internal Put key new Value if new Value equals old Value make Dirty preference Changed key old Value null null Base64 decode old Value get Bytes value  putByteArray newValue oldValue internalPut newValue newValue oldValue makeDirty preferenceChanged oldValue oldValue getBytes
public void put Double String key double value String new Value Double to String value Object old Value internal Put key new Value if new Value equals old Value make Dirty if old Value null try old Value new Double String old Value catch Number Format Exception e ignore and let old Value be a String preference Changed key old Value new Double value  putDouble newValue toString oldValue internalPut newValue newValue oldValue makeDirty oldValue oldValue oldValue NumberFormatException oldValue preferenceChanged oldValue
public void put Float String key float value String new Value Float to String value Object old Value internal Put key new Value if new Value equals old Value make Dirty if old Value null try old Value new Float String old Value catch Number Format Exception e ignore and let old Value be a String preference Changed key old Value new Float value  putFloat newValue toString oldValue internalPut newValue newValue oldValue makeDirty oldValue oldValue oldValue NumberFormatException oldValue preferenceChanged oldValue
public void put Int String key int value String new Value Integer to String value Object old Value internal Put key new Value if new Value equals old Value make Dirty if old Value null try old Value new Integer String old Value catch Number Format Exception e ignore and let old Value be a String preference Changed key old Value new Integer value  putInt newValue toString oldValue internalPut newValue newValue oldValue makeDirty oldValue oldValue oldValue NumberFormatException oldValue preferenceChanged oldValue
public void put Long String key long value String new Value Long to String value Object old Value internal Put key new Value if new Value equals old Value make Dirty if old Value null try old Value new Long String old Value catch Number Format Exception e ignore and let old Value be a String preference Changed key old Value new Long value  putLong newValue toString oldValue internalPut newValue newValue oldValue makeDirty oldValue oldValue oldValue NumberFormatException oldValue preferenceChanged oldValue
public void remove String key String old Value internal Get key if old Value null internal Remove key old Value  oldValue internalGet oldValue internalRemove oldValue
void remove Boolean String key String old Value internal Get key if old Value null internal Remove key Boolean value Of old Value  removeBoolean oldValue internalGet oldValue internalRemove valueOf oldValue
void remove Double String key Object old Value internal Get key if old Value null try old Value Double value Of String old Value catch Number Format Exception e ignore old Value will be null internal Remove key old Value  removeDouble oldValue internalGet oldValue oldValue valueOf oldValue NumberFormatException oldValue internalRemove oldValue
void remove Float String key Object old Value internal Get key if old Value null try old Value Float value Of String old Value catch Number Format Exception e ignore old Value will be null internal Remove key old Value  removeFloat oldValue internalGet oldValue oldValue valueOf oldValue NumberFormatException oldValue internalRemove oldValue
void remove Int String key Object old Value internal Get key if old Value null try old Value Integer value Of String old Value catch Number Format Exception e ignore old Value will be null internal Remove key old Value  removeInt oldValue internalGet oldValue oldValue valueOf oldValue NumberFormatException oldValue internalRemove oldValue
void remove Long String key Object old Value internal Get key if old Value null try old Value Long value Of String old Value catch Number Format Exception e ignore old Value will be null internal Remove key old Value  removeLong oldValue internalGet oldValue oldValue valueOf oldValue NumberFormatException oldValue internalRemove oldValue
public void remove Node throws Backing Store Exception illegal state if this node has been removed check Removed clear all the property values do it the long way so everyone gets notification String keys keys for int i 0 i keys length i remove keys i don t remove the scope root from the parent but remove all its children if parent instanceof Root Preferences remove the node from the parent s collection and notify listeners if parent instanceof Eclipse Preferences removed true Eclipse Preferences parent remove Node this else String message Policy bind preferences invalid Parent Class absolute Path parent get Class get Name NON NLS 1 throw new Backing Store Exception message I Eclipse Preferences child Nodes get Children for int i 0 i child Nodes length i try child Nodes i remove Node catch Illegal State Exception e ignore since we only get this exception if we have already been removed no work to do  removeNode BackingStoreException checkRemoved RootPreferences EclipsePreferences EclipsePreferences removeNode invalidParentClass absolutePath getClass getName BackingStoreException IEclipsePreferences childNodes getChildren childNodes childNodes removeNode IllegalStateException
protected void remove Node I Eclipse Preferences child boolean was Removed false synchronized this if children null was Removed children remove child name null if was Removed make Dirty if children is Empty children null if was Removed node Removed child  removeNode IEclipsePreferences wasRemoved wasRemoved wasRemoved makeDirty isEmpty wasRemoved nodeRemoved
public void remove Node Change Listener I Node Change Listener listener check Removed if node Listeners null return node Listeners remove listener if node Listeners size 0 node Listeners null if Internal Platform DEBUG PREFERENCES Policy debug Removed preference node change listener listener from absolute Path NON NLS 1 NON NLS 2  removeNodeChangeListener INodeChangeListener checkRemoved nodeListeners nodeListeners nodeListeners nodeListeners InternalPlatform DEBUG_PREFERENCES absolutePath
public void remove Preference Change Listener I Preference Change Listener listener check Removed if preference Listeners null return preference Listeners remove listener if preference Listeners size 0 preference Listeners null if Internal Platform DEBUG PREFERENCES Policy debug Removed preference property change listener listener from absolute Path NON NLS 1 NON NLS 2  removePreferenceChangeListener IPreferenceChangeListener checkRemoved preferenceListeners preferenceListeners preferenceListeners preferenceListeners InternalPlatform DEBUG_PREFERENCES absolutePath
protected void save throws Backing Store Exception save get Location  BackingStoreException getLocation
protected void save I Path location throws Backing Store Exception if location null if Internal Platform DEBUG PREFERENCES Policy debug Unable to determine location of preference file for node absolute Path NON NLS 1 return if Internal Platform DEBUG PREFERENCES Policy debug Saving preferences to file location NON NLS 1 Properties table convert To Properties new Properties EMPTY STRING if table is Empty nothing to save delete existing file if one exists if location to File exists location to File delete String message Policy bind preferences failed Delete location to String NON NLS 1 log new Status I Status WARNING Platform PI RUNTIME I Status WARNING message null return table put VERSION KEY VERSION VALUE Output Stream output null try create the parent dirs if they don t exist File parent File location to File get Parent File if parent File null return parent File mkdirs set append to be false so we overwrite current settings output new Buffered Output Stream new File Output Stream location toOS String false table store output null catch IO Exception e String message Policy bind preferences save Exception location to String NON NLS 1 log new Status I Status ERROR Platform PI RUNTIME I Status ERROR message e throw new Backing Store Exception message finally if output null try output close catch IO Exception e ignore  IPath BackingStoreException InternalPlatform DEBUG_PREFERENCES absolutePath InternalPlatform DEBUG_PREFERENCES convertToProperties EMPTY_STRING isEmpty toFile toFile failedDelete toString IStatus PI_RUNTIME IStatus VERSION_KEY VERSION_VALUE OutputStream parentFile toFile getParentFile parentFile parentFile BufferedOutputStream FileOutputStream toOSString IOException saveException toString IStatus PI_RUNTIME IStatus BackingStoreException IOException
public static String encode Path String path String key String result int path Length path null 0 path length if key index Of I Path SEPARATOR 1 if path Length 0 result key else result path I Path SEPARATOR key else if path Length 0 result DOUBLE SLASH key else result path DOUBLE SLASH key return result  encodePath pathLength indexOf IPath pathLength IPath pathLength DOUBLE_SLASH DOUBLE_SLASH
public static String get Segment String path int segment int start path index Of I Path SEPARATOR 0 1 0 int end path index Of I Path SEPARATOR start if end path length 1 end 1 for int i 0 i segment i if end 1 return null start end 1 end path index Of I Path SEPARATOR start if end 1 end path length return path substring start end  getSegment indexOf IPath indexOf IPath indexOf IPath
public static int get Segment Count String path String Tokenizer tokenizer new String Tokenizer path String value Of I Path SEPARATOR return tokenizer count Tokens  getSegmentCount StringTokenizer StringTokenizer valueOf IPath countTokens
public static String make Relative String path String result path if path null return EMPTY STRING if path length 0 path char At 0 I Path SEPARATOR result path length 0 EMPTY STRING path substring 1 return result  makeRelative EMPTY_STRING charAt IPath EMPTY_STRING
public static String decode Path String full Path String key null String path null check to see if we have an indicator which tells us where the path ends int index full Path index Of DOUBLE SLASH if index 1 we don t have a double slash telling us where the path ends so the path is up to the last slash character int last Index full Path last Index Of I Path SEPARATOR if last Index 1 key full Path else path full Path substring 0 last Index key full Path substring last Index 1 else the child path is up to the double slash and the key is the string after it path full Path substring 0 index key full Path substring index 2 adjust if we have an absolute path if path null if path length 0 path null else if path char At 0 I Path SEPARATOR path path substring 1 return new String path key  decodePath fullPath fullPath indexOf DOUBLE_SLASH lastIndex fullPath lastIndexOf IPath lastIndex fullPath fullPath lastIndex fullPath lastIndex fullPath fullPath charAt IPath
public void sync throws Backing Store Exception illegal state if this node has been removed check Removed I Eclipse Preferences node get Load Level if node null if Internal Platform DEBUG PREFERENCES Policy debug Preference node is not a load root absolute Path NON NLS 1 return if node instanceof Eclipse Preferences Eclipse Preferences node load node flush  BackingStoreException checkRemoved IEclipsePreferences getLoadLevel InternalPlatform DEBUG_PREFERENCES absolutePath EclipsePreferences EclipsePreferences
I Preference Node Visitor visitor new I Preference Node Visitor public boolean visit I Eclipse Preferences node throws Backing Store Exception buffer append node buffer append n String keys node keys for int i 0 i keys length i buffer append node absolute Path buffer append PATH SEPARATOR buffer append keys i buffer append buffer append node get keys i default NON NLS 1 buffer append n return true  IPreferenceNodeVisitor IPreferenceNodeVisitor IEclipsePreferences BackingStoreException absolutePath PATH_SEPARATOR
public String to Deep Debug String final String Buffer buffer new String Buffer I Preference Node Visitor visitor new I Preference Node Visitor public boolean visit I Eclipse Preferences node throws Backing Store Exception buffer append node buffer append n String keys node keys for int i 0 i keys length i buffer append node absolute Path buffer append PATH SEPARATOR buffer append keys i buffer append buffer append node get keys i default NON NLS 1 buffer append n return true try accept visitor catch Backing Store Exception e System out println Exception while calling to Deep Debug String NON NLS 1 e print Stack Trace return buffer to String  toDeepDebugString StringBuffer StringBuffer IPreferenceNodeVisitor IPreferenceNodeVisitor IEclipsePreferences BackingStoreException absolutePath PATH_SEPARATOR BackingStoreException toDeepDebugString printStackTrace toString
public String to String return absolute Path  toString absolutePath

private String version Exported Preferences I Eclipse Preferences parent String name super parent name  ExportedPreferences IEclipsePreferences
see org eclipse core runtime preferences I Exported Preferences is Export Root public boolean is Export Root return is Export Root  IExportedPreferences isExportRoot isExportRoot isExportRoot
Internal method called only by the import export mechanism public void set Export Root is Export Root true  setExportRoot isExportRoot
validate bundle versions public String get Version return version  getVersion
validate bundle versions public void set Version String version this version version  setVersion
public I Eclipse Preferences create I Eclipse Preferences node Parent String node Name Plugin context I Eclipse Preferences result new Exported Preferences node Parent node Name add Child node Name result return result  IEclipsePreferences IEclipsePreferences nodeParent nodeName IEclipsePreferences ExportedPreferences nodeParent nodeName addChild nodeName
public void remove String key super remove key if properties null try remove Node catch Backing Store Exception e String message Policy bind preferences remove Exported absolute Path NON NLS 1 I Status status new Status I Status ERROR Platform PI RUNTIME I Status ERROR message e log status  removeNode BackingStoreException removeExported absolutePath IStatus IStatus PI_RUNTIME IStatus
public String to String String Buffer buffer new String Buffer if is Export Root buffer append NON NLS 1 buffer append absolute Path if version null buffer append version NON NLS 1 return buffer to String  toString StringBuffer StringBuffer isExportRoot absolutePath toString

Default constructor Should only be called by create Executable Extension public Instance Preferences this null null  createExecutableExtension InstancePreferences
private Instance Preferences I Eclipse Preferences parent String name super parent name initialize Children cache the segment count String path absolute Path segment Count get Segment Count path if segment Count 2 return cache the qualifier qualifier get Segment path 1 cache the location if qualifier null return get the base location from the platform location compute Location base Location qualifier  InstancePreferences IEclipsePreferences initializeChildren absolutePath segmentCount getSegmentCount segmentCount getSegment computeLocation baseLocation
protected boolean is Already Loaded I Eclipse Preferences node return loaded Nodes contains node name  isAlreadyLoaded IEclipsePreferences loadedNodes
protected void loaded loaded Nodes add name  loadedNodes
Load the Eclipse 2 1 preferences for the given bundle If a file doesn t exist then assume that conversion has already occurred and do nothing protected void load Legacy I Path path new Path absolute Path if path segment Count 2 return String bundle Name path segment 1 the preferences file is located in the plug in s state area at a well known name don t need to create the directory if there are no preferences to load File pref File Internal Platform get Default get Meta Area get Preference Location bundle Name false to File if pref File exists no preference file that s fine if Internal Platform DEBUG PREFERENCES Policy debug Legacy plug in preference file not found pref File NON NLS 1 NON NLS 2 return if Internal Platform DEBUG PREFERENCES Policy debug Loading legacy preferences from pref File NON NLS 1 load preferences from file Input Stream input null Properties values new Properties try input new Buffered Input Stream new File Input Stream pref File values load input catch IO Exception e problems loading preference store quietly ignore if Internal Platform DEBUG PREFERENCES Policy debug IO Exception encountered loading legacy preference file pref File NON NLS 1 return finally if input null try input close catch IO Exception e ignore problems with close if Internal Platform DEBUG PREFERENCES Policy debug IO Exception encountered closing legacy preference file pref File NON NLS 1 e print Stack Trace Store values in the preferences object for Iterator i values key Set iterator i has Next String key String i next String value values get Property key value shouldn t be null but check just in case if value null if Internal Platform DEBUG PREFERENCES Policy debug Loaded legacy preference key value NON NLS 1 NON NLS 2 call these 2 methods rather than put so we don t send out unnecessary notification Object old Value internal Put key value if value equals old Value make Dirty Delete the old file so we don t try and load it next time if pref File delete Only print out message in failure case if we are debugging if Internal Platform DEBUG PREFERENCES Policy debug Unable to delete legacy preferences file pref File NON NLS 1  loadLegacy IPath absolutePath segmentCount bundleName prefFile InternalPlatform getDefault getMetaArea getPreferenceLocation bundleName toFile prefFile InternalPlatform DEBUG_PREFERENCES prefFile InternalPlatform DEBUG_PREFERENCES prefFile InputStream BufferedInputStream FileInputStream prefFile IOException InternalPlatform DEBUG_PREFERENCES IOException prefFile IOException InternalPlatform DEBUG_PREFERENCES IOException prefFile printStackTrace keySet hasNext getProperty InternalPlatform DEBUG_PREFERENCES oldValue internalPut oldValue makeDirty prefFile InternalPlatform DEBUG_PREFERENCES prefFile
protected I Path get Location return location  IPath getLocation
protected I Eclipse Preferences get Load Level if load Level null if qualifier null return null Make it relative to this node rather than navigating to it from the root Walk backwards up the tree starting at this node This is important to avoid a chicken egg thing on startup I Eclipse Preferences node this for int i 2 i segment Count i node I Eclipse Preferences node parent load Level node return load Level  IEclipsePreferences getLoadLevel loadLevel IEclipsePreferences segmentCount IEclipsePreferences loadLevel loadLevel
protected void initialize Children if initialized parent null return try synchronized this String names compute Children base Location for int i 0 i names length i add Child names i null finally initialized true  initializeChildren computeChildren baseLocation addChild
protected Eclipse Preferences internal Create I Eclipse Preferences node Parent String node Name Plugin context return new Instance Preferences node Parent node Name  EclipsePreferences internalCreate IEclipsePreferences nodeParent nodeName InstancePreferences nodeParent nodeName

Lookup Order String qualifier String key String order super if qualifier null order null throw new Illegal Argument Exception for int i 0 i order length i if order i null throw new Illegal Argument Exception this qualifier qualifier this key key this order order  LookupOrder IllegalArgumentException IllegalArgumentException
public String get Qualifier return qualifier  getQualifier
public String get Key return key  getKey
public String get Order return order  getOrder

class Property Change Event Wrapper extends Preferences Property Change Event Property Change Event Wrapper Object source String property Object old Value Object new Value super source property old Value new Value  PropertyChangeEventWrapper PropertyChangeEvent PropertyChangeEventWrapper oldValue newValue oldValue newValue
Used for test suites only public Preference Forwarder String pluginID this null pluginID  PreferenceForwarder
public Preference Forwarder Plugin plugin String pluginID super this plugin plugin this pluginID pluginID get Plugin Preferences add Preference Change Listener this TODO see bug 59975 access the default pluginID node which primes it with the default values get Default Preferences plugin Root add Node Change Listener this  PreferenceForwarder getPluginPreferences addPreferenceChangeListener getDefaultPreferences pluginRoot addNodeChangeListener
see org eclipse core runtime preferences I Eclipse Preferences I Node Change Listener added org eclipse core runtime preferences I Eclipse Preferences Node Change Event public void added I Eclipse Preferences Node Change Event event if pluginID equals event get Child name get Plugin Preferences add Preference Change Listener this  IEclipsePreferences INodeChangeListener IEclipsePreferences NodeChangeEvent IEclipsePreferences NodeChangeEvent getChild getPluginPreferences addPreferenceChangeListener
see org eclipse core runtime preferences I Eclipse Preferences I Node Change Listener removed org eclipse core runtime preferences I Eclipse Preferences Node Change Event public void removed I Eclipse Preferences Node Change Event event don t worry about removing the preference change listener since we won t get any notification from a removed node anyways  IEclipsePreferences INodeChangeListener IEclipsePreferences NodeChangeEvent IEclipsePreferences NodeChangeEvent
Adds a property change listener to this preference object Has no affect if the identical listener is already registered param listener a property change listener public void add Property Change Listener I Property Change Listener listener if listeners null listeners new Listener List listeners add listener  addPropertyChangeListener IPropertyChangeListener ListenerList
public void preference Change I Eclipse Preferences Preference Change Event event dirty true if listeners null return Object old Value event get Old Value Object new Value event get New Value String key event get Key if new Value null new Value get Default key old Value else if old Value null old Value get Default key new Value Property Change Event property Change Event new Property Change Event Wrapper this key old Value new Value Object clients listeners get Listeners for int i 0 i clients length i I Property Change Listener clients i property Change property Change Event  preferenceChange IEclipsePreferences PreferenceChangeEvent oldValue getOldValue newValue getNewValue getKey newValue newValue getDefault oldValue oldValue oldValue getDefault newValue PropertyChangeEvent propertyChangeEvent PropertyChangeEventWrapper oldValue newValue getListeners IPropertyChangeListener propertyChange propertyChangeEvent
private Eclipse Preferences get Plugin Preferences try return Eclipse Preferences plugin Root node pluginID catch Class Cast Exception e throw new Runtime Exception Plug in preferences must be instances of Eclipse Preferences e get Message NON NLS 1  EclipsePreferences getPluginPreferences EclipsePreferences pluginRoot ClassCastException RuntimeException EclipsePreferences getMessage
private I Eclipse Preferences get Default Preferences return defaults Root node pluginID plugin  IEclipsePreferences getDefaultPreferences defaultsRoot
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 if listeners null return listeners remove listener if listeners size 0 listeners null  removePropertyChangeListener IPropertyChangeListener
Does its best at determining the default value for the given key Checks the given object s type and then looks in the list of defaults to see if a value exists If not or if there is a problem converting the value the default default value for that type is returned private Object get Default String key Object obj I Eclipse Preferences defaults get Default Preferences if obj instanceof String return defaults get key STRING DEFAULT DEFAULT else if obj instanceof Integer return new Integer defaults get Int key INT DEFAULT DEFAULT else if obj instanceof Double return new Double defaults get Double key DOUBLE DEFAULT DEFAULT else if obj instanceof Float return new Float defaults get Float key FLOAT DEFAULT DEFAULT else if obj instanceof Long return new Long defaults get Long key LONG DEFAULT DEFAULT else if obj instanceof byte return defaults get Byte Array key BYTE ARRAY DEFAULT DEFAULT else if obj instanceof Boolean return new Boolean defaults get Boolean key BOOLEAN DEFAULT DEFAULT else return null  getDefault IEclipsePreferences getDefaultPreferences STRING_DEFAULT_DEFAULT getInt INT_DEFAULT_DEFAULT getDouble DOUBLE_DEFAULT_DEFAULT getFloat FLOAT_DEFAULT_DEFAULT getLong LONG_DEFAULT_DEFAULT getByteArray BYTE_ARRAY_DEFAULT_DEFAULT getBoolean BOOLEAN_DEFAULT_DEFAULT
Returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting param name the name of the property 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 if name null return false String value get Plugin Preferences get name null if value null return true return get Default Preferences get name null null  getPluginPreferences getDefaultPreferences
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 param name the name of the property return the boolean valued property public boolean get Boolean String name return get Plugin Preferences get Boolean name get Default Preferences get Boolean name BOOLEAN DEFAULT DEFAULT  getBoolean getPluginPreferences getBoolean getDefaultPreferences getBoolean BOOLEAN_DEFAULT_DEFAULT
Sets the current value of the boolean valued property with the given name 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 if get Default Boolean name value get Plugin Preferences remove Boolean name else get Plugin Preferences put Boolean name value  setToDefault setValue getDefaultBoolean getPluginPreferences removeBoolean getPluginPreferences putBoolean
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 param name the name of the property return the default value of the named property public boolean get Default Boolean String name return get Default Preferences get Boolean name BOOLEAN DEFAULT DEFAULT  getDefaultBoolean getDefaultPreferences getBoolean BOOLEAN_DEFAULT_DEFAULT
Sets the default value for the boolean valued property with the given name 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 get Default Preferences put Boolean name value  setDefault getDefaultPreferences putBoolean
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 param name the name of the property return the double valued property public double get Double String name return get Plugin Preferences get Double name get Default Preferences get Double name DOUBLE DEFAULT DEFAULT  getDouble getPluginPreferences getDouble getDefaultPreferences getDouble DOUBLE_DEFAULT_DEFAULT
Sets the current value of the double valued property with the given name 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 if get Default Double name value get Plugin Preferences remove Double name else get Plugin Preferences put Double name value  setToDefault setValue isNaN IllegalArgumentException getDefaultDouble getPluginPreferences removeDouble getPluginPreferences putDouble
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 param name the name of the property return the default value of the named property public double get Default Double String name return get Default Preferences get Double name DOUBLE DEFAULT DEFAULT  getDefaultDouble getDefaultPreferences getDouble DOUBLE_DEFAULT_DEFAULT
Sets the default value for the double valued property with the given name 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 get Default Preferences put Double name value  setDefault isNaN IllegalArgumentException getDefaultPreferences putDouble
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 param name the name of the property return the float valued property public float get Float String name return get Plugin Preferences get Float name get Default Preferences get Float name FLOAT DEFAULT DEFAULT  getFloat getPluginPreferences getFloat getDefaultPreferences getFloat FLOAT_DEFAULT_DEFAULT
Sets the current value of the float valued property with the given name 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 if get Default Float name value get Plugin Preferences remove Float name else get Plugin Preferences put Float name value  setToDefault setValue isNaN IllegalArgumentException getDefaultFloat getPluginPreferences removeFloat getPluginPreferences putFloat
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 param name the name of the property return the default value of the named property public float get Default Float String name return get Default Preferences get Float name FLOAT DEFAULT DEFAULT  getDefaultFloat getDefaultPreferences getFloat FLOAT_DEFAULT_DEFAULT
Sets the default value for the float valued property with the given name 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 get Default Preferences put Float name value  setDefault isNaN IllegalArgumentException getDefaultPreferences putFloat
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 integter param name the name of the property return the int valued property public int get Int String name return get Plugin Preferences get Int name get Default Preferences get Int name INT DEFAULT DEFAULT  getInt getPluginPreferences getInt getDefaultPreferences getInt INT_DEFAULT_DEFAULT
Sets the current value of the integer valued property with the given name 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 if get Default Int name value get Plugin Preferences remove Int name else get Plugin Preferences put Int name value  setToDefault setValue getDefaultInt getPluginPreferences removeInt getPluginPreferences putInt
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 param name the name of the property return the default value of the named property public int get Default Int String name return get Default Preferences get Int name INT DEFAULT DEFAULT  getDefaultInt getDefaultPreferences getInt INT_DEFAULT_DEFAULT
Sets the default value for the integer valued property with the given name 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 get Default Preferences put Int name value  setDefault getDefaultPreferences putInt
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 param name the name of the property return the long valued property public long get Long String name return get Plugin Preferences get Long name get Default Preferences get Long name LONG DEFAULT DEFAULT  getLong getPluginPreferences getLong getDefaultPreferences getLong LONG_DEFAULT_DEFAULT
Sets the current value of the long valued property with the given name 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 if get Default Long name value get Plugin Preferences remove Long name else get Plugin Preferences put Long name value  setToDefault setValue getDefaultLong getPluginPreferences removeLong getPluginPreferences putLong
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 param name the name of the property return the default value of the named property public long get Default Long String name return get Default Preferences get Long name LONG DEFAULT DEFAULT  getDefaultLong getDefaultPreferences getLong LONG_DEFAULT_DEFAULT
Sets the default value for the long valued property with the given name 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 get Default Preferences put Long name value  setDefault getDefaultPreferences putLong
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 param name the name of the property return the string valued property public String get String String name return get Plugin Preferences get name get Default Preferences get name STRING DEFAULT DEFAULT  getString getPluginPreferences getDefaultPreferences STRING_DEFAULT_DEFAULT
Sets the current value of the string valued property with the given name 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 if get Default String name equals value get Plugin Preferences remove name else get Plugin Preferences put name value  setToDefault setValue IllegalArgumentException getDefaultString getPluginPreferences getPluginPreferences
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 param name the name of the property return the default value of the named property public String get Default String String name return get Default Preferences get name STRING DEFAULT DEFAULT  getDefaultString getDefaultPreferences STRING_DEFAULT_DEFAULT
Sets the default value for the string valued property with the given name 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 get Default Preferences put name value  setDefault IllegalArgumentException getDefaultPreferences
Returns whether the property with the given name has the default value in virtue of having no explicitly set value param name the name of the property 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 if name null return false return get Plugin Preferences get name null null  isDefault getPluginPreferences
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 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 I Eclipse Preferences preferences get Plugin Preferences Object old Value preferences get name null if old Value null preferences remove name  setToDefault setToDefault IEclipsePreferences getPluginPreferences oldValue oldValue
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 get Plugin Preferences keys  propertyNames getPluginPreferences
Returns a list of all properties known to this preference object which have default values other than their default default value return an array of property names public String default Property Names try return get Default Preferences keys catch Backing Store Exception e log Error e get Message e return new String 0  defaultPropertyNames getDefaultPreferences BackingStoreException logError getMessage
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
Flush the values of these plug in preferences to disk throws Backing Store Exception public void flush throws Backing Store Exception if dirty get Plugin Preferences flush dirty false  BackingStoreException BackingStoreException getPluginPreferences
Sync the values in memory with those which are persisted throws Backing Store Exception public void sync throws Backing Store Exception don t check the dirty flag first because there could be changes on disk that we want get Plugin Preferences sync dirty false  BackingStoreException BackingStoreException getPluginPreferences
Something bad happened so log it private void log Error String message Exception e I Status status new Status I Status ERROR Platform PI RUNTIME I Status ERROR message e Internal Platform get Default log status  logError IStatus IStatus PI_RUNTIME IStatus InternalPlatform getDefault
public void load Input Stream in throws IO Exception Properties result new Properties result load in convert From Properties result dirty false  InputStream IOException convertFromProperties
public void store Output Stream out String header throws IO Exception Properties result convert To Properties result store out header dirty false  OutputStream IOException convertToProperties
private void convert From Properties Properties props I Eclipse Preferences preferences get Plugin Preferences for Iterator i props key Set iterator i has Next String key String i next String value props get Property key if value null preferences put key value  convertFromProperties IEclipsePreferences getPluginPreferences keySet hasNext getProperty
public String to String return Preference Forwarder pluginID NON NLS 1 NON NLS 2  toString PreferenceForwarder
private Properties convert To Properties Properties result new Properties String keys property Names for int i 0 i keys length i String key keys i String value get String key if Preferences STRING DEFAULT DEFAULT equals value result put key value return result  convertToProperties propertyNames getString STRING_DEFAULT_DEFAULT

given message and exception private static I Status create Status Error String message Exception e return new Status I Status ERROR Platform PI RUNTIME I Status ERROR message e  IStatus createStatusError IStatus PI_RUNTIME IStatus
given message and exception private static I Status create Status Warning String message Exception e return new Status I Status WARNING Platform PI RUNTIME I Status WARNING message e  IStatus createStatusWarning IStatus PI_RUNTIME IStatus
public static I Preferences Service get Default if instance null instance new Preferences Service return instance  IPreferencesService getDefault PreferencesService
See who is plugged into the extension point private void initialize Scopes I Extension Point point Platform get Extension Registry get Extension Point Platform PI RUNTIME Platform PT PREFERENCES if point null return I Extension extensions point get Extensions for int i 0 i extensions length i I Configuration Element elements extensions i get Configuration Elements for int j 0 j elements length j if ELEMENT SCOPE equals Ignore Case elements j get Name scope Added elements j Platform get Extension Registry add Registry Change Listener this Platform PI RUNTIME  initializeScopes IExtensionPoint getExtensionRegistry getExtensionPoint PI_RUNTIME PT_PREFERENCES IExtension getExtensions IConfigurationElement getConfigurationElements ELEMENT_SCOPE equalsIgnoreCase getName scopeAdded getExtensionRegistry addRegistryChangeListener PI_RUNTIME
static void log I Status status Internal Platform get Default log status  IStatus InternalPlatform getDefault
static void scope Added I Configuration Element element String key element get Attribute ATTRIBUTE NAME if key null String message Policy bind preferences missing Scope Attribute element get Declaring Extension get Unique Identifier NON NLS 1 log create Status Warning message null return scope Registry put key element root add Child key null  scopeAdded IConfigurationElement getAttribute ATTRIBUTE_NAME missingScopeAttribute getDeclaringExtension getUniqueIdentifier createStatusWarning scopeRegistry addChild
static void scope Removed String key I Eclipse Preferences node I Eclipse Preferences root node key root remove Node node scope Registry remove key  scopeRemoved IEclipsePreferences IEclipsePreferences removeNode scopeRegistry
private Preferences Service super initialize Scopes  PreferencesService initializeScopes
I Preference Node Visitor visitor new I Preference Node Visitor public boolean visit I Eclipse Preferences node throws Backing Store Exception I Eclipse Preferences global Node if node parent null global Node root else global Node I Eclipse Preferences root node node absolute Path Exported Preferences ep Node Exported Preferences node if this node is an export root then we need to remove it from the global preferences before continuing boolean removed false if ep Node is Export Root if Internal Platform DEBUG PREFERENCES Policy debug Found export root ep Node absolute Path NON NLS 1 TODO should only have to do this if any of my children have properties to set global Node remove Node removed true iterate over the preferences in this node and set them in the global space if ep Node properties null ep Node properties is Empty if this node was removed then we need to create a new one if removed global Node I Eclipse Preferences root node node absolute Path for Iterator i ep Node properties key Set iterator i has Next String key String i next intern strings we import because some people in their property change listeners use identity instead of equals See bug 20193 and 20534 key key intern String value node get key null if value null if Internal Platform DEBUG PREFERENCES Policy debug Setting global Node absolute Path key value NON NLS 1 global Node put key value keep visiting children return true  IPreferenceNodeVisitor IPreferenceNodeVisitor IEclipsePreferences BackingStoreException IEclipsePreferences globalNode globalNode globalNode IEclipsePreferences absolutePath ExportedPreferences epNode ExportedPreferences epNode isExportRoot InternalPlatform DEBUG_PREFERENCES epNode absolutePath globalNode removeNode epNode epNode isEmpty globalNode IEclipsePreferences absolutePath epNode keySet hasNext InternalPlatform DEBUG_PREFERENCES globalNode absolutePath globalNode
public I Status apply Preferences I Exported Preferences preferences throws Core Exception if preferences null throw new Illegal Argument Exception if Internal Platform DEBUG PREFERENCES Policy debug Applying exported preferences Exported Preferences preferences to Deep Debug String NON NLS 1 final Multi Status result new Multi Status Platform PI RUNTIME I Status OK Policy bind preferences apply Problems null NON NLS 1 create a visitor to apply the given set of preferences I Preference Node Visitor visitor new I Preference Node Visitor public boolean visit I Eclipse Preferences node throws Backing Store Exception I Eclipse Preferences global Node if node parent null global Node root else global Node I Eclipse Preferences root node node absolute Path Exported Preferences ep Node Exported Preferences node if this node is an export root then we need to remove it from the global preferences before continuing boolean removed false if ep Node is Export Root if Internal Platform DEBUG PREFERENCES Policy debug Found export root ep Node absolute Path NON NLS 1 TODO should only have to do this if any of my children have properties to set global Node remove Node removed true iterate over the preferences in this node and set them in the global space if ep Node properties null ep Node properties is Empty if this node was removed then we need to create a new one if removed global Node I Eclipse Preferences root node node absolute Path for Iterator i ep Node properties key Set iterator i has Next String key String i next intern strings we import because some people in their property change listeners use identity instead of equals See bug 20193 and 20534 key key intern String value node get key null if value null if Internal Platform DEBUG PREFERENCES Policy debug Setting global Node absolute Path key value NON NLS 1 global Node put key value keep visiting children return true try start by visiting the root preferences accept visitor catch Backing Store Exception e String message Policy bind preferences apply Problems NON NLS 1 throw new Core Exception create Status Error message e save the prefs try get Root Node node preferences absolute Path flush catch Backing Store Exception e String message Policy bind preferences save Problems NON NLS 1 throw new Core Exception create Status Error message e if Internal Platform DEBUG PREFERENCES Policy debug Current list of all settings Eclipse Preferences get Root Node to Deep Debug String NON NLS 1 return result  IStatus applyPreferences IExportedPreferences CoreException IllegalArgumentException InternalPlatform DEBUG_PREFERENCES ExportedPreferences toDeepDebugString MultiStatus MultiStatus PI_RUNTIME IStatus applyProblems IPreferenceNodeVisitor IPreferenceNodeVisitor IEclipsePreferences BackingStoreException IEclipsePreferences globalNode globalNode globalNode IEclipsePreferences absolutePath ExportedPreferences epNode ExportedPreferences epNode isExportRoot InternalPlatform DEBUG_PREFERENCES epNode absolutePath globalNode removeNode epNode epNode isEmpty globalNode IEclipsePreferences absolutePath epNode keySet hasNext InternalPlatform DEBUG_PREFERENCES globalNode absolutePath globalNode BackingStoreException applyProblems CoreException createStatusError getRootNode absolutePath BackingStoreException saveProblems CoreException createStatusError InternalPlatform DEBUG_PREFERENCES EclipsePreferences getRootNode toDeepDebugString
private Properties convert From Legacy Properties properties Properties result new Properties String prefix I Path SEPARATOR Plugin PLUGIN PREFERENCE SCOPE I Path SEPARATOR for Iterator i properties key Set iterator i has Next String key String i next String value properties get Property key if value null int index key index Of I Path SEPARATOR if index 1 result put BUNDLE VERSION PREFIX key value result put EXPORT ROOT PREFIX prefix key EMPTY STRING else String path key substring 0 index key key substring index 1 result put Eclipse Preferences encode Path prefix path key value return result  convertFromLegacy IPath PLUGIN_PREFERENCE_SCOPE IPath keySet hasNext getProperty indexOf IPath BUNDLE_VERSION_PREFIX EXPORT_ROOT_PREFIX EMPTY_STRING EclipsePreferences encodePath
private I Exported Preferences convert From Properties Properties properties I Exported Preferences result new Exported Preferences null EMPTY STRING for Iterator i properties key Set iterator i has Next String path String i next String value properties get Property path if path char At 0 EXPORT ROOT PREFIX Exported Preferences current Exported Preferences result node path substring 1 current set Export Root else if path char At 0 BUNDLE VERSION PREFIX Exported Preferences current Exported Preferences result node Instance Scope SCOPE node path substring 1 current set Version value else String decoded Eclipse Preferences decode Path path path decoded 0 null EMPTY STRING decoded 0 Exported Preferences current Exported Preferences result node path String key decoded 1 current put key value if Internal Platform DEBUG PREFERENCES Policy debug Converted preferences file to I Exported Preferences tree Exported Preferences result to Deep Debug String NON NLS 1 return result  IExportedPreferences convertFromProperties IExportedPreferences ExportedPreferences EMPTY_STRING keySet hasNext getProperty charAt EXPORT_ROOT_PREFIX ExportedPreferences ExportedPreferences setExportRoot charAt BUNDLE_VERSION_PREFIX ExportedPreferences ExportedPreferences InstanceScope setVersion EclipsePreferences decodePath EMPTY_STRING ExportedPreferences ExportedPreferences InternalPlatform DEBUG_PREFERENCES IExportedPreferences ExportedPreferences toDeepDebugString
String get Scope String path if path null path length 0 return EMPTY STRING int start Index path index Of I Path SEPARATOR if start Index 1 return path if path length 1 return EMPTY STRING int end Index path index Of I Path SEPARATOR start Index 1 if end Index 1 end Index path length return path substring start Index 1 end Index  getScope EMPTY_STRING startIndex indexOf IPath startIndex EMPTY_STRING endIndex indexOf IPath startIndex endIndex endIndex startIndex endIndex
I Preference Node Visitor visitor new I Preference Node Visitor public boolean visit I Eclipse Preferences node throws Backing Store Exception don t store defaults String absolute Path node absolute Path String scope get Scope absolute Path if Default Scope SCOPE equals scope return false String path absolute Path length base Length EMPTY STRING Eclipse Preferences make Relative absolute Path substring base Length check the excludes list to see if this node should be considered for int i 0 i excludes List length i String exclusion Eclipse Preferences make Relative excludes List i if path starts With exclusion return false boolean need To Add Version Instance Scope SCOPE equals scope check the excludes list for each preference String keys node keys for int i 0 i keys length i String key keys i boolean ignore false for int j 0 ignore j excludes List length j if Eclipse Preferences encode Path path key starts With Eclipse Preferences make Relative excludes List j ignore true if ignore String value node get key null if value null if need To Add Version String bundle get Bundle Name absolute Path if bundle null String version get Bundle Version bundle if version null result put BUNDLE VERSION PREFIX bundle version need To Add Version false result put Eclipse Preferences encode Path absolute Path key value return true  IPreferenceNodeVisitor IPreferenceNodeVisitor IEclipsePreferences BackingStoreException absolutePath absolutePath getScope absolutePath DefaultScope absolutePath baseLength EMPTY_STRING EclipsePreferences makeRelative absolutePath baseLength excludesList EclipsePreferences makeRelative excludesList startsWith needToAddVersion InstanceScope excludesList EclipsePreferences encodePath startsWith EclipsePreferences makeRelative excludesList needToAddVersion getBundleName absolutePath getBundleVersion BUNDLE_VERSION_PREFIX needToAddVersion EclipsePreferences encodePath absolutePath
private Properties convert To Properties I Eclipse Preferences preferences final String excludes List throws Backing Store Exception final Properties result new Properties final int base Length preferences absolute Path length create a visitor to do the export I Preference Node Visitor visitor new I Preference Node Visitor public boolean visit I Eclipse Preferences node throws Backing Store Exception don t store defaults String absolute Path node absolute Path String scope get Scope absolute Path if Default Scope SCOPE equals scope return false String path absolute Path length base Length EMPTY STRING Eclipse Preferences make Relative absolute Path substring base Length check the excludes list to see if this node should be considered for int i 0 i excludes List length i String exclusion Eclipse Preferences make Relative excludes List i if path starts With exclusion return false boolean need To Add Version Instance Scope SCOPE equals scope check the excludes list for each preference String keys node keys for int i 0 i keys length i String key keys i boolean ignore false for int j 0 ignore j excludes List length j if Eclipse Preferences encode Path path key starts With Eclipse Preferences make Relative excludes List j ignore true if ignore String value node get key null if value null if need To Add Version String bundle get Bundle Name absolute Path if bundle null String version get Bundle Version bundle if version null result put BUNDLE VERSION PREFIX bundle version need To Add Version false result put Eclipse Preferences encode Path absolute Path key value return true start by visiting the root that we were passed in preferences accept visitor return the properties object return result  convertToProperties IEclipsePreferences excludesList BackingStoreException baseLength absolutePath IPreferenceNodeVisitor IPreferenceNodeVisitor IEclipsePreferences BackingStoreException absolutePath absolutePath getScope absolutePath DefaultScope absolutePath baseLength EMPTY_STRING EclipsePreferences makeRelative absolutePath baseLength excludesList EclipsePreferences makeRelative excludesList startsWith needToAddVersion InstanceScope excludesList EclipsePreferences encodePath startsWith EclipsePreferences makeRelative excludesList needToAddVersion getBundleName absolutePath getBundleVersion BUNDLE_VERSION_PREFIX needToAddVersion EclipsePreferences encodePath absolutePath
protected I Eclipse Preferences create Node String name I Scope scope null Object value scope Registry get name if value instanceof I Configuration Element try scope I Scope I Configuration Element value create Executable Extension ATTRIBUTE CLASS scope Registry put name scope catch Class Cast Exception e String message Policy bind preferences class Cast NON NLS 1 log create Status Error message e return new Eclipse Preferences root name catch Core Exception e log e get Status return new Eclipse Preferences root name else scope I Scope value return scope create root name  IEclipsePreferences createNode IScope scopeRegistry IConfigurationElement IScope IConfigurationElement createExecutableExtension ATTRIBUTE_CLASS scopeRegistry ClassCastException classCast createStatusError EclipsePreferences CoreException getStatus EclipsePreferences IScope
public I Status export Preferences I Eclipse Preferences node Output Stream output String excludes List throws Core Exception if node null output null throw new Illegal Argument Exception Properties properties null if excludes List null excludes List new String 0 try properties convert To Properties node excludes List if properties is Empty return Status OK STATUS properties put VERSION KEY Float to String EXPORT VERSION properties put EXPORT ROOT PREFIX node absolute Path EMPTY STRING catch Backing Store Exception e throw new Core Exception create Status Error e get Message e try properties store output null catch IO Exception e String message Policy bind preferences export Problems NON NLS 1 throw new Core Exception create Status Error message e return Status OK STATUS  IStatus exportPreferences IEclipsePreferences OutputStream excludesList CoreException IllegalArgumentException excludesList excludesList convertToProperties excludesList isEmpty OK_STATUS VERSION_KEY toString EXPORT_VERSION EXPORT_ROOT_PREFIX absolutePath EMPTY_STRING BackingStoreException CoreException createStatusError getMessage IOException exportProblems CoreException createStatusError OK_STATUS
public String get String key String default Value Preferences nodes if nodes null return default Value for int i 0 i nodes length i Preferences node nodes i if node null String result node get key null if result null return result return default Value  defaultValue defaultValue defaultValue
see org eclipse core runtime preferences I Preferences Service get Boolean java lang String java lang String boolean org eclipse core runtime preferences I Scope public boolean get Boolean String qualifier String key boolean default Value I Scope Context scopes String result get Eclipse Preferences decode Path key 1 null get Nodes qualifier key scopes return result null default Value Boolean value Of result boolean Value  IPreferencesService getBoolean IScope getBoolean defaultValue IScopeContext EclipsePreferences decodePath getNodes defaultValue valueOf booleanValue
String get Bundle Version String bundle Name Bundle bundle Platform get Bundle bundle Name if bundle null Object version bundle get Headers EMPTY STRING get Constants BUNDLE VERSION if version null version instanceof String return String version return null  getBundleVersion bundleName getBundle bundleName getHeaders EMPTY_STRING BUNDLE_VERSION
String get Bundle Name String path if path length 0 path char At 0 I Path SEPARATOR return null int first path index Of I Path SEPARATOR 1 if first 1 return null int second path index Of I Path SEPARATOR first 1 return second 1 path substring first 1 path substring first 1 second  getBundleName charAt IPath indexOf IPath indexOf IPath
see org eclipse core runtime preferences I Preferences Service get Byte Array java lang String java lang String byte org eclipse core runtime preferences I Scope public byte get Byte Array String qualifier String key byte default Value I Scope Context scopes String result get Eclipse Preferences decode Path key 1 null get Nodes qualifier key scopes return result null default Value result get Bytes  IPreferencesService getByteArray IScope getByteArray defaultValue IScopeContext EclipsePreferences decodePath getNodes defaultValue getBytes
see org eclipse core runtime preferences I Preferences Service get Default Lookup Order java lang String java lang String public String get Default Lookup Order String qualifier String key Lookup Order order Lookup Order defaults Registry get get Registry Key qualifier key return order null null order get Order  IPreferencesService getDefaultLookupOrder getDefaultLookupOrder LookupOrder LookupOrder defaultsRegistry getRegistryKey getOrder
public double get Double String qualifier String key double default Value I Scope Context scopes String value get Eclipse Preferences decode Path key 1 null get Nodes qualifier key scopes if value null return default Value try return Double parse Double value catch Number Format Exception e return default Value  getDouble defaultValue IScopeContext EclipsePreferences decodePath getNodes defaultValue parseDouble NumberFormatException defaultValue
public float get Float String qualifier String key float default Value I Scope Context scopes String value get Eclipse Preferences decode Path key 1 null get Nodes qualifier key scopes if value null return default Value try return Float parse Float value catch Number Format Exception e return default Value  getFloat defaultValue IScopeContext EclipsePreferences decodePath getNodes defaultValue parseFloat NumberFormatException defaultValue
public int get Int String qualifier String key int default Value I Scope Context scopes String value get Eclipse Preferences decode Path key 1 null get Nodes qualifier key scopes if value null return default Value try return Integer parse Int value catch Number Format Exception e return default Value  getInt defaultValue IScopeContext EclipsePreferences decodePath getNodes defaultValue parseInt NumberFormatException defaultValue
public long get Long String qualifier String key long default Value I Scope Context scopes String value get Eclipse Preferences decode Path key 1 null get Nodes qualifier key scopes if value null return default Value try return Long parse Long value catch Number Format Exception e return default Value  getLong defaultValue IScopeContext EclipsePreferences decodePath getNodes defaultValue parseLong NumberFormatException defaultValue
public String get Lookup Order String qualifier String key String order get Default Lookup Order qualifier key if there wasn t an exact match based on both qualifier and simple name then do a lookup based only on the qualifier if order null key null order get Default Lookup Order qualifier null if order null order DEFAULT DEFAULT LOOKUP ORDER return order  getLookupOrder getDefaultLookupOrder getDefaultLookupOrder DEFAULT_DEFAULT_LOOKUP_ORDER
private Preferences get Nodes String qualifier String key I Scope Context contexts String order get Lookup Order qualifier key String child Path Eclipse Preferences make Relative Eclipse Preferences decode Path key 0 Array List result new Array List for int i 0 i order length i String scope String order i boolean found false for int j 0 contexts null j contexts length j I Scope Context context contexts j if context null context get Name equals scope String Preferences node context get Node qualifier if node null found true if child Path null node node node child Path result add node if found Preferences node get Root Node node scope String node qualifier if child Path null node node node child Path result add node found false return Preferences result to Array new Preferences result size  getNodes IScopeContext getLookupOrder childPath EclipsePreferences makeRelative EclipsePreferences decodePath ArrayList ArrayList scopeString IScopeContext getName scopeString getNode childPath childPath getRootNode scopeString childPath childPath toArray
private String get Registry Key String qualifier String key if qualifier null throw new Illegal Argument Exception if key null return qualifier return qualifier key  getRegistryKey IllegalArgumentException
public I Eclipse Preferences get Root Node return root  IEclipsePreferences getRootNode
see org eclipse core runtime preferences I Preferences Service get String java lang String java lang String java lang String org eclipse core runtime preferences I Scope public String get String String qualifier String key String default Value I Scope Context scopes return get Eclipse Preferences decode Path key 1 default Value get Nodes qualifier key scopes  IPreferencesService getString IScope getString defaultValue IScopeContext EclipsePreferences decodePath defaultValue getNodes
public I Status import Preferences Input Stream input throws Core Exception if Internal Platform DEBUG PREFERENCES Policy debug Importing preferences NON NLS 1 return apply Preferences read Preferences input  IStatus importPreferences InputStream CoreException InternalPlatform DEBUG_PREFERENCES applyPreferences readPreferences
version key private boolean is Legacy Properties properties return properties get Property VERSION KEY null  isLegacy getProperty VERSION_KEY
public I Exported Preferences read Preferences Input Stream input throws Core Exception if input null throw new Illegal Argument Exception if Internal Platform DEBUG PREFERENCES Policy debug Reading preferences from stream NON NLS 1 read the file into a properties object Properties properties new Properties try properties load input catch IO Exception e String message Policy bind preferences import Problems NON NLS 1 throw new Core Exception create Status Error message e finally try input close catch IO Exception e ignore manipulate the file if it from a legacy preference export if is Legacy properties if Internal Platform DEBUG PREFERENCES Policy debug Read legacy preferences file converting to 3 0 format NON NLS 1 properties convert From Legacy properties else if Internal Platform DEBUG PREFERENCES Policy debug Read preferences file NON NLS 1 properties remove VERSION KEY convert the Properties object into an object to return return convert From Properties properties  IExportedPreferences readPreferences InputStream CoreException IllegalArgumentException InternalPlatform DEBUG_PREFERENCES IOException importProblems CoreException createStatusError IOException isLegacy InternalPlatform DEBUG_PREFERENCES convertFromLegacy InternalPlatform DEBUG_PREFERENCES VERSION_KEY convertFromProperties
public void registry Changed I Registry Change Event event I Extension Delta deltas event get Extension Deltas Platform PI RUNTIME Platform PT PREFERENCES for int i 0 i deltas length i I Configuration Element elements deltas i get Extension get Configuration Elements for int j 0 j elements length j switch deltas i get Kind case I Extension Delta ADDED scope Added elements j break case I Extension Delta REMOVED String scope elements j get Attribute ATTRIBUTE NAME if scope null scope Removed scope break  registryChanged IRegistryChangeEvent IExtensionDelta getExtensionDeltas PI_RUNTIME PT_PREFERENCES IConfigurationElement getExtension getConfigurationElements getKind IExtensionDelta scopeAdded IExtensionDelta getAttribute ATTRIBUTE_NAME scopeRemoved
public void set Default Lookup Order String qualifier String key String order String registry Key get Registry Key qualifier key if order null defaults Registry remove registry Key else Lookup Order obj new Lookup Order qualifier key order defaults Registry put registry Key obj  setDefaultLookupOrder registryKey getRegistryKey defaultsRegistry registryKey LookupOrder LookupOrder defaultsRegistry registryKey
I Preference Node Visitor visitor new I Preference Node Visitor public boolean visit I Eclipse Preferences node if node instanceof Exported Preferences return false calculate the version in the file Exported Preferences real Node Exported Preferences node String version real Node get Version if version null Plugin Version Identifier validate Version version isOK return true Plugin Version Identifier version In File new Plugin Version Identifier version calculate the version of the installed bundle String bundle Name get Bundle Name node absolute Path if bundle Name null return true String string Version get Bundle Version bundle Name if string Version null Plugin Version Identifier validate Version string Version isOK return true Plugin Version Identifier version In Memory new Plugin Version Identifier string Version verify the versions based on the matching rules I Status verification validate Plugin Versions bundle Name version In File version In Memory if verification null result add verification return true  IPreferenceNodeVisitor IPreferenceNodeVisitor IEclipsePreferences ExportedPreferences ExportedPreferences realNode ExportedPreferences realNode getVersion PluginVersionIdentifier validateVersion PluginVersionIdentifier versionInFile PluginVersionIdentifier bundleName getBundleName absolutePath bundleName stringVersion getBundleVersion bundleName stringVersion PluginVersionIdentifier validateVersion stringVersion PluginVersionIdentifier versionInMemory PluginVersionIdentifier stringVersion IStatus validatePluginVersions bundleName versionInFile versionInMemory
public I Status validate Versions I Path path String message Policy bind preferences validate NON NLS 1 final Multi Status result new Multi Status Platform PI RUNTIME I Status INFO message null I Preference Node Visitor visitor new I Preference Node Visitor public boolean visit I Eclipse Preferences node if node instanceof Exported Preferences return false calculate the version in the file Exported Preferences real Node Exported Preferences node String version real Node get Version if version null Plugin Version Identifier validate Version version isOK return true Plugin Version Identifier version In File new Plugin Version Identifier version calculate the version of the installed bundle String bundle Name get Bundle Name node absolute Path if bundle Name null return true String string Version get Bundle Version bundle Name if string Version null Plugin Version Identifier validate Version string Version isOK return true Plugin Version Identifier version In Memory new Plugin Version Identifier string Version verify the versions based on the matching rules I Status verification validate Plugin Versions bundle Name version In File version In Memory if verification null result add verification return true Input Stream input null try input new Buffered Input Stream new File Input Stream path to File I Exported Preferences prefs read Preferences input prefs accept visitor catch File Not Found Exception e ignore if the file does not exist then all is OK catch Core Exception e message Policy bind preferences validation Exception NON NLS 1 result add create Status Error message e catch Backing Store Exception e message Policy bind preferences validation Exception NON NLS 1 result add create Status Error message e return result  IStatus validateVersions IPath MultiStatus MultiStatus PI_RUNTIME IStatus IPreferenceNodeVisitor IPreferenceNodeVisitor IEclipsePreferences ExportedPreferences ExportedPreferences realNode ExportedPreferences realNode getVersion PluginVersionIdentifier validateVersion PluginVersionIdentifier versionInFile PluginVersionIdentifier bundleName getBundleName absolutePath bundleName stringVersion getBundleVersion bundleName stringVersion PluginVersionIdentifier validateVersion stringVersion PluginVersionIdentifier versionInMemory PluginVersionIdentifier stringVersion IStatus validatePluginVersions bundleName versionInFile versionInMemory InputStream BufferedInputStream FileInputStream toFile IExportedPreferences readPreferences FileNotFoundException CoreException validationException createStatusError BackingStoreException validationException createStatusError
Compares two plugin version identifiers to see if their preferences are compatible If they are not compatible a warning message is added to the given multistatus according to the following rules plugins that differ in service number no status plugins that differ in minor version WARNING status plugins that differ in major version where installed plugin is newer WARNING status where installed plugin is older ERROR status param bundle the name of the bundle param pref The version identifer of the preferences to be loaded param installed The version identifier of the installed plugin I Status validate Plugin Versions String bundle Plugin Version Identifier pref Plugin Version Identifier installed if installed get Major Component pref get Major Component installed get Minor Component pref get Minor Component return null int severity if installed get Major Component pref get Major Component severity I Status ERROR else severity I Status WARNING String msg Policy bind preferences incompatible new String pref to String bundle installed to String NON NLS 1 return new Status severity Platform PI RUNTIME 1 msg null  IStatus validatePluginVersions PluginVersionIdentifier PluginVersionIdentifier getMajorComponent getMajorComponent getMinorComponent getMinorComponent getMajorComponent getMajorComponent IStatus IStatus toString toString PI_RUNTIME

Default constructor public Root Preferences super null NON NLS 1  RootPreferences
public void flush throws Backing Store Exception flush all children Backing Store Exception exception null String names children Names for int i 0 i names length i try node names i flush catch Backing Store Exception e store the first exception we get and still try and flush the rest of the children if exception null exception e if exception null throw exception  BackingStoreException BackingStoreException childrenNames BackingStoreException
protected synchronized I Eclipse Preferences get Child String key Plugin context Object value null I Eclipse Preferences child null if children null value children get key if value null if value instanceof I Eclipse Preferences return I Eclipse Preferences value lazy initialization child Preferences Service Platform get Preferences Service create Node key add Child key child return child  IEclipsePreferences getChild IEclipsePreferences IEclipsePreferences IEclipsePreferences PreferencesService getPreferencesService createNode addChild
protected synchronized I Eclipse Preferences get Children must perform lazy initialization of child nodes String child Names children Names I Eclipse Preferences child Nodes new I Eclipse Preferences child Names length for int i 0 i child Names length i child Nodes i get Child child Names i null return child Nodes  IEclipsePreferences getChildren childNames childrenNames IEclipsePreferences childNodes IEclipsePreferences childNames childNames childNodes getChild childNames childNodes
public Preferences node String path if path length 0 path length 1 path char At 0 I Path SEPARATOR return this int start Index path char At 0 I Path SEPARATOR 1 0 int end Index path index Of I Path SEPARATOR start Index 1 String scope path substring start Index end Index 1 path length end Index I Eclipse Preferences child get Child scope null if child null child new Eclipse Preferences this scope add Child scope child return child node end Index 1 path substring end Index 1 NON NLS 1  charAt IPath startIndex charAt IPath endIndex indexOf IPath startIndex startIndex endIndex endIndex IEclipsePreferences getChild EclipsePreferences addChild endIndex endIndex
public void sync throws Backing Store Exception sync all children Backing Store Exception exception null String names children Names for int i 0 i names length i try node names i sync catch Backing Store Exception e store the first exception we get and still try and sync the rest of the children if exception null exception e if exception null throw exception  BackingStoreException BackingStoreException childrenNames BackingStoreException

private static final String INDEX NAME index NON NLS 1 public Indexed Store Wrapper I Path location this location location  INDEX_NAME IndexedStoreWrapper IPath
private void open throws Core Exception try String name location toOS String store Indexed Store find name if store null store new Indexed Store store open name catch Exception e String message Policy bind indexed could Not Open location toOS String NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED WRITE LOCAL location message e throw new Core Exception status  CoreException toOSString IndexedStore IndexedStore couldNotOpen toOSString ResourceStatus ResourceStatus IResourceStatus FAILED_WRITE_LOCAL CoreException
private void recreate throws Core Exception close Rename the problematic store for future analysis java io File file location to File file rename To location add File Extension 001 to File NON NLS 1 file delete if file exists try open catch Core Exception e failed again null the store to make sure we don t attempt to access an invalid store store null throw e  CoreException toFile renameTo addFileExtension toFile CoreException
public synchronized void close if store null return try store close catch Exception e String message Policy bind indexed could Not Close location toOS String NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED WRITE LOCAL location message e Resources Plugin get Plugin get Log log status finally store null  couldNotClose toOSString ResourceStatus ResourceStatus IResourceStatus FAILED_WRITE_LOCAL ResourcesPlugin getPlugin getLog
public synchronized void commit throws Core Exception if store null return try store commit catch Exception e String message Policy bind indexed could Not Commit location toOS String NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED WRITE LOCAL location message e throw new Resource Exception status  CoreException couldNotCommit toOSString ResourceStatus ResourceStatus IResourceStatus FAILED_WRITE_LOCAL ResourceException
private void create throws Core Exception try open catch Core Exception e Resources Plugin get Plugin get Log log e get Status failed to open copy store elsewhere and create a new one recreate if store null String message Policy bind indexed could Not Create location toOS String NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED WRITE LOCAL location message null throw new Resource Exception status  CoreException CoreException ResourcesPlugin getPlugin getLog getStatus couldNotCreate toOSString ResourceStatus ResourceStatus IResourceStatus FAILED_WRITE_LOCAL ResourceException
private Index create Index throws Core Exception try return get Store create Index INDEX NAME catch Exception e String message Policy bind indexed could Not Create Index location toOS String NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED WRITE LOCAL location message e throw new Resource Exception status  createIndex CoreException getStore createIndex INDEX_NAME couldNotCreateIndex toOSString ResourceStatus ResourceStatus IResourceStatus FAILED_WRITE_LOCAL ResourceException
public synchronized Index get Index throws Core Exception Exception problem null try return get Store get Index INDEX NAME catch Indexed Store Exception e if e id Indexed Store Exception Index Not Found return create Index problem e return null catch Core Exception e just rethrow throw e catch Exception e problem e return null finally if problem null String message Policy bind indexed could Not Get Index location toOS String NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED READ LOCAL location message problem throw new Resource Exception status  getIndex CoreException getStore getIndex INDEX_NAME IndexedStoreException IndexedStoreException IndexNotFound createIndex CoreException couldNotGetIndex toOSString ResourceStatus ResourceStatus IResourceStatus FAILED_READ_LOCAL ResourceException
public synchronized void rollback if store null return try store rollback catch Exception e String message Policy bind indexed could Not Commit location toOS String NON NLS 1 Resource Status status new Resource Status I Resource Status FAILED WRITE LOCAL location message e Resources Plugin get Plugin get Log log status  couldNotCommit toOSString ResourceStatus ResourceStatus IResourceStatus FAILED_WRITE_LOCAL ResourcesPlugin getPlugin getLog
public synchronized String get Object As String ObjectID id throws Core Exception try return get Store get Object As String id catch Exception e String message Policy bind indexed could Not Read location toOS String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL location message e  getObjectAsString CoreException getStore getObjectAsString couldNotRead toOSString ResourceException IResourceStatus FAILED_READ_LOCAL
private Indexed Store get Store throws Core Exception if store null create return store  IndexedStore getStore CoreException
public synchronized Index Cursor get Cursor throws Core Exception try return get Index open catch Exception e String message Policy bind indexed could Not Create Cursor location toOS String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL location message e  IndexCursor getCursor CoreException getIndex couldNotCreateCursor toOSString ResourceException IResourceStatus FAILED_READ_LOCAL
public synchronized ObjectID create Object String s throws Core Exception try return get Store create Object s catch Exception e String message Policy bind indexed could Not Write location toOS String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE LOCAL location message e  createObject CoreException getStore createObject couldNotWrite toOSString ResourceException IResourceStatus FAILED_WRITE_LOCAL
public synchronized ObjectID create Object byte b throws Core Exception try return get Store create Object b catch Exception e String message Policy bind indexed could Not Write location toOS String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE LOCAL location message e  createObject CoreException getStore createObject couldNotWrite toOSString ResourceException IResourceStatus FAILED_WRITE_LOCAL
public synchronized void remove Object ObjectID id throws Core Exception try get Store remove Object id catch Exception e String message Policy bind indexed could Not Delete location toOS String NON NLS 1 throw new Resource Exception I Resource Status FAILED DELETE LOCAL location message e  removeObject CoreException getStore removeObject couldNotDelete toOSString ResourceException IResourceStatus FAILED_DELETE_LOCAL
public synchronized byte get Object ObjectID id throws Core Exception try return get Store get Object id catch Exception e String message Policy bind indexed could Not Read location toOS String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL location message e  getObject CoreException getStore getObject couldNotRead toOSString ResourceException IResourceStatus FAILED_READ_LOCAL
Something has gone wrong Make a best effort at copying the file elsewhere and creating a new one Log exceptions public synchronized void reset try recreate catch Core Exception e Resources Plugin get Plugin get Log log e get Status  CoreException ResourcesPlugin getPlugin getLog getStatus

package interface I Visitor Answers whether the visitor requires that the code I Stored Property code has it s value filled when matched from the store p Retrieving the property value may be expensive in time and memory usage dependent upon the size of the property value p p If the visitor answers true the code visit code method will be invoked with a complete property if the visitor answers false the property value will be code null code param resource Name the name of the matching resource param property Name the name of the matching property return whether the visit method requires a value  IVisitor IStoredProperty resourceName propertyName
Performs whatever actions are appropriate to the visitor when a match is made to the property store query p This method is invoked each time a matching entry is found in the store p p Note that the property will have a code null code value if the code requires Value code method returned code false code for this property see Index Cursor param resource Name the matching resource param property the matching property param cursor the cursor positioned at this property in the code Index Store code  requiresValue IndexCursor resourceName IndexStore

protected Workspace workspace public Property Manager Workspace workspace this workspace workspace  PropertyManager
public void close Property Store I Resource target throws Core Exception Property Store store get Property Store Or Null target if store null return synchronized store store shutdown null set Property Store target null  closePropertyStore IResource CoreException PropertyStore getPropertyStoreOrNull setPropertyStore
Copy all the properties of one resource to another Both resources must have a property store available public void copy I Resource source I Resource destination int depth throws Core Exception cache stores to avoid problems in concurrency Property Store source Store get Property Store source Property Store destination Store get Property Store destination synchronized source Store assert Running source source Store synchronized destination Store assert Running destination destination Store copy Properties source destination depth source Store commit destination Store commit  IResource IResource CoreException PropertyStore sourceStore getPropertyStore PropertyStore destinationStore getPropertyStore sourceStore assertRunning sourceStore destinationStore assertRunning destinationStore copyProperties sourceStore destinationStore
Throws an exception if the store has been shut down private void assert Running I Resource target Property Store store throws Core Exception if store is Running if the store is not running then the resource is in the process of being deleted so report the error as if the resource was not found String message Policy bind resources must Exist target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status RESOURCE NOT FOUND target get Full Path message null  assertRunning IResource PropertyStore CoreException isRunning mustExist getFullPath toString ResourceException IResourceStatus RESOURCE_NOT_FOUND getFullPath
protected void copy Properties I Resource source I Resource destination int depth throws Core Exception Property Store source Store get Property Store source Property Store dest Store get Property Store destination Resource Name source Name get Property Key source Resource Name dest Name get Property Key destination Query Results results source Store get All source Name depth for Enumeration resources results get Resource Names resources has More Elements Resource Name resource Name Resource Name resources next Element List properties results get Results resource Name if properties is Empty continue Stored Property props Array new Stored Property properties size props Array Stored Property properties to Array props Array int segments To Drop source get Project Relative Path matching First Segments resource Name get Path I Path path dest Name get Path append resource Name get Path remove First Segments segments To Drop resource Name new Resource Name resource Name get Qualifier path dest Store set resource Name props Array I Resource DEPTH ZERO Property Store SET UPDATE  copyProperties IResource IResource CoreException PropertyStore sourceStore getPropertyStore PropertyStore destStore getPropertyStore ResourceName sourceName getPropertyKey ResourceName destName getPropertyKey QueryResults sourceStore getAll sourceName getResourceNames hasMoreElements ResourceName resourceName ResourceName nextElement getResults resourceName isEmpty StoredProperty propsArray StoredProperty propsArray StoredProperty toArray propsArray segmentsToDrop getProjectRelativePath matchingFirstSegments resourceName getPath IPath destName getPath resourceName getPath removeFirstSegments segmentsToDrop resourceName ResourceName resourceName getQualifier destStore resourceName propsArray IResource DEPTH_ZERO PropertyStore SET_UPDATE
public void delete Properties I Resource target int depth throws Core Exception switch target get Type case I Resource FILE case I Resource FOLDER Property Store store get Property Store target synchronized store assert Running target store store remove All get Property Key target depth store commit break case I Resource PROJECT case I Resource ROOT delete Property Store target true  deleteProperties IResource CoreException getType IResource IResource PropertyStore getPropertyStore assertRunning removeAll getPropertyKey IResource IResource deletePropertyStore
The resource is being deleted so permanently erase its properties In the case of projects this means the property store will not be accessible again public void delete Resource I Resource target throws Core Exception switch target get Type case I Resource FILE case I Resource FOLDER case I Resource ROOT delete Properties target I Resource DEPTH INFINITE break case I Resource PROJECT permanently delete the store delete Property Store target false  deleteResource IResource CoreException getType IResource IResource IResource deleteProperties IResource DEPTH_INFINITE IResource deletePropertyStore
protected void delete Property Store I Resource target boolean restart throws Core Exception Property Store store get Property Store Or Null target if store null return synchronized store store shutdown null workspace get Meta Area get Property Store Location target to File delete if we want to allow restart null the store and it will be recreated lazily if restart Resource Info info get Property Host target get Resource Info false false if info null info set Property Store null  deletePropertyStore IResource CoreException PropertyStore getPropertyStoreOrNull getMetaArea getPropertyStoreLocation toFile ResourceInfo getPropertyHost getResourceInfo setPropertyStore
Returns the value of the identified property on the given resource as maintained by this store public String get Property I Resource target Qualified Name name throws Core Exception Property Store store get Property Store target synchronized store assert Running target store Stored Property result store get get Property Key target name return result null null result get String Value  getProperty IResource QualifiedName CoreException PropertyStore getPropertyStore assertRunning StoredProperty getPropertyKey getStringValue
Returns the resource which hosts the property store for the given resource protected Resource get Property Host I Resource target return Resource target get Type I Resource ROOT target target get Project  getPropertyHost IResource getType IResource getProject
Returns the key to use in the property store when accessing the properties of the given resource protected Resource Name get Property Key I Resource target return new Resource Name target get Project Relative Path NON NLS 1  ResourceName getPropertyKey IResource ResourceName getProjectRelativePath
Returns the property store to use when storing a property for the given resource throws Core Exception if the store could not be obtained for any reason protected Property Store get Property Store I Resource target throws Core Exception try Resource host get Property Host target Resource Info info host get Resource Info false false if info null String message Policy bind properties store Not Available target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL target get Full Path message null Property Store store info get Property Store if store null store open Property Store host return store catch Exception e if e instanceof Core Exception throw Core Exception e String message Policy bind properties store Not Available target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL target get Full Path message e  CoreException PropertyStore getPropertyStore IResource CoreException getPropertyHost ResourceInfo getResourceInfo storeNotAvailable getFullPath toString ResourceException IResourceStatus FAILED_READ_LOCAL getFullPath PropertyStore getPropertyStore openPropertyStore CoreException CoreException storeNotAvailable getFullPath toString ResourceException IResourceStatus FAILED_READ_LOCAL getFullPath
Returns the property store to use when storing a property for the given resource or null if the store is not available protected Property Store get Property Store Or Null I Resource target Resource host get Property Host target Resource Info info host get Resource Info false false if info null Property Store store info get Property Store if store null sync on the store in case of concurrent deletion synchronized store if store is Running return store return null  PropertyStore getPropertyStoreOrNull IResource getPropertyHost ResourceInfo getResourceInfo PropertyStore getPropertyStore isRunning
public void handle Event Lifecycle Event event throws Core Exception if event kind Lifecycle Event PRE PROJECT CLOSE close Property Store event resource  handleEvent LifecycleEvent CoreException LifecycleEvent PRE_PROJECT_CLOSE closePropertyStore
protected Property Store open Property Store I Resource target int type target get Type Assert is True type I Resource FILE type I Resource FOLDER I Path location workspace get Meta Area get Property Store Location target java io File store File location to File store File get Parent File mkdirs Property Store store new Property Store location set Property Store target store return store  PropertyStore openPropertyStore IResource getType isTrue IResource IResource IPath getMetaArea getPropertyStoreLocation storeFile toFile storeFile getParentFile PropertyStore PropertyStore setPropertyStore
public void set Property I Resource target Qualified Name key String value throws Core Exception Property Store store get Property Store target synchronized store assert Running target store if value null store remove get Property Key target key else Stored Property prop new Stored Property key value store set get Property Key target prop store commit  setProperty IResource QualifiedName CoreException PropertyStore getPropertyStore assertRunning getPropertyKey StoredProperty StoredProperty getPropertyKey
protected void set Property Store I Resource target Property Store value fetch the info but don t bother making it mutable even though we are going to modify it We don t know whether or not the tree is open and it really doesn t matter as the change we are doing does not show up in deltas Resource Info info get Property Host target get Resource Info false false if info get Type I Resource PROJECT Project Info info set Property Store value else Root Info info set Property Store value  setPropertyStore IResource PropertyStore ResourceInfo getPropertyHost getResourceInfo getType IResource ProjectInfo setPropertyStore RootInfo setPropertyStore
public void shutdown I Progress Monitor monitor throws Core Exception close Property Store workspace get Root  IProgressMonitor CoreException closePropertyStore getRoot
public void startup I Progress Monitor monitor throws Core Exception workspace add Lifecycle Listener this  IProgressMonitor CoreException addLifecycleListener

public static final int FAIL MISSING 1 public Property Store I Path location store new Indexed Store Wrapper location  FAIL_MISSING PropertyStore IPath IndexedStoreWrapper
protected boolean basic Exists Store Key search Key throws Core Exception byte search Bytes search Key to Bytes Index Cursor cursor store get Cursor try cursor find search Bytes boolean exists cursor key Equals search Bytes cursor close return exists catch Exception e String message Policy bind properties could Not Read Prop search Key get Qualifier search Key get Local Name NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL search Key get Resource Name get Path message e  basicExists StoreKey searchKey CoreException searchBytes searchKey toBytes IndexCursor getCursor searchBytes keyEquals searchBytes couldNotReadProp searchKey getQualifier searchKey getLocalName ResourceException IResourceStatus FAILED_READ_LOCAL searchKey getResourceName getPath
The caller is responsible for ensuring that this will not produce duplicate keys in the index protected void basic Insert Store Key key String value throws Core Exception try ObjectID valueID store create Object value store get Index insert key to Bytes valueID catch Exception e String message Policy bind properties could Not Write Prop key get Qualifier key get Local Name NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE LOCAL key get Resource Name get Path message e  basicInsert StoreKey CoreException createObject getIndex toBytes couldNotWriteProp getQualifier getLocalName ResourceException IResourceStatus FAILED_WRITE_LOCAL getResourceName getPath
protected boolean basic Remove Resource Name resource Name Qualified Name property Name throws Core Exception Store Key key new Store Key resource Name property Name byte key Bytes key to Bytes boolean was Found false Index Cursor cursor store get Cursor try cursor find key Bytes if cursor key Equals key Bytes was Found true ObjectID valueID cursor get Value As ObjectID store remove Object valueID cursor remove cursor close catch Exception e String message Policy bind properties could Not Delete Prop key get Qualifier key get Local Name NON NLS 1 throw new Resource Exception I Resource Status FAILED DELETE LOCAL resource Name get Path message e return was Found  basicRemove ResourceName resourceName QualifiedName propertyName CoreException StoreKey StoreKey resourceName propertyName keyBytes toBytes wasFound IndexCursor getCursor keyBytes keyEquals keyBytes wasFound getValueAsObjectID removeObject couldNotDeleteProp getQualifier getLocalName ResourceException IResourceStatus FAILED_DELETE_LOCAL resourceName getPath wasFound
protected void basic Update Store Key key String value throws Core Exception byte key Bytes key to Bytes Index Cursor cursor store get Cursor try cursor find key Bytes if cursor key Equals key Bytes ObjectID oldID cursor get Value As ObjectID store remove Object oldID ObjectID new Value Id store create Object value cursor update Value new Value Id cursor close catch Exception e String message Policy bind properties could Not Write Prop key get Qualifier key get Local Name NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE LOCAL key get Resource Name get Path message e  basicUpdate StoreKey CoreException keyBytes toBytes IndexCursor getCursor keyBytes keyEquals keyBytes getValueAsObjectID removeObject newValueId createObject updateValue newValueId couldNotWriteProp getQualifier getLocalName ResourceException IResourceStatus FAILED_WRITE_LOCAL getResourceName getPath
protected synchronized void common Set Resource Name resource Name Stored Property properties int depth int set Mode Query Results failures throws Core Exception if depth I Resource DEPTH ZERO for int i 0 i properties length i Stored Property property properties i Store Key key new Store Key resource Name property get Name boolean exists basic Exists key if exists set Mode CREATE exists set Mode UPDATE failures add resource Name property else if exists set Mode SET SKIP basic Update key property get String Value else basic Insert key property get String Value else Enumeration resource Names Enum deep Resource Names resource Name while resource Names Enum has More Elements common Set Resource Name resource Names Enum next Element properties I Resource DEPTH ZERO set Mode failures  commonSet ResourceName resourceName StoredProperty setMode QueryResults CoreException IResource DEPTH_ZERO StoredProperty StoreKey StoreKey resourceName getName basicExists setMode setMode resourceName setMode SET_SKIP basicUpdate getStringValue basicInsert getStringValue resourceNamesEnum deepResourceNames resourceName resourceNamesEnum hasMoreElements commonSet ResourceName resourceNamesEnum nextElement IResource DEPTH_ZERO setMode
final Set result Holder new Hash Set 10 I Visitor visitor new I Visitor public void visit Resource Name resource Name Stored Property property Index Cursor cursor result Holder add resource Name  resultHolder HashSet IVisitor IVisitor ResourceName resourceName StoredProperty IndexCursor resultHolder resourceName
public boolean requires Value Resource Name resource Name Qualified Name property Name return false  requiresValue ResourceName resourceName QualifiedName propertyName
Returns the names of all resources that are rooted at the given resource p Answers an code Enumeration code of code I Resource Name code The enumerator will include at least code resource Name code if it exists If code resource Name code does not exist returns an empty enumerator see Resource Name param resource Name the name of the top most resource to match return an enumeration of matching resource names public Enumeration deep Resource Names Resource Name resource Name throws Core Exception final Set result Holder new Hash Set 10 I Visitor visitor new I Visitor public void visit Resource Name resource Name Stored Property property Index Cursor cursor result Holder add resource Name public boolean requires Value Resource Name resource Name Qualified Name property Name return false records Deep Matching resource Name visitor return Collections enumeration result Holder  IResourceName resourceName resourceName ResourceName resourceName deepResourceNames ResourceName resourceName CoreException resultHolder HashSet IVisitor IVisitor ResourceName resourceName StoredProperty IndexCursor resultHolder resourceName requiresValue ResourceName resourceName QualifiedName propertyName recordsDeepMatching resourceName resultHolder
final Object result Holder new Object 1 I Visitor simple Visitor new I Visitor public void visit Resource Name resource Name Stored Property property Index Cursor cursor result Holder 0 property  resultHolder IVisitor simpleVisitor IVisitor ResourceName resourceName StoredProperty IndexCursor resultHolder
public boolean requires Value Resource Name resource Name Qualified Name property Name return true  requiresValue ResourceName resourceName QualifiedName propertyName
Returns the named property for the given resource p The retieval is performed to depth zero Returns code null code if there is no such property defined on the resource param resource Name the resource name to match param property Name the property name to match return the matching property or code null code if no such property public Stored Property get Resource Name resource Name final Qualified Name property Name throws Core Exception final Object result Holder new Object 1 I Visitor simple Visitor new I Visitor public void visit Resource Name resource Name Stored Property property Index Cursor cursor result Holder 0 property public boolean requires Value Resource Name resource Name Qualified Name property Name return true records Matching resource Name property Name simple Visitor return Stored Property result Holder 0  resourceName propertyName StoredProperty ResourceName resourceName QualifiedName propertyName CoreException resultHolder IVisitor simpleVisitor IVisitor ResourceName resourceName StoredProperty IndexCursor resultHolder requiresValue ResourceName resourceName QualifiedName propertyName recordsMatching resourceName propertyName simpleVisitor StoredProperty resultHolder
final Query Results result new Query Results I Visitor visitor new I Visitor public void visit Resource Name resource Name Stored Property property Index Cursor cursor result add resource Name property  QueryResults QueryResults IVisitor IVisitor ResourceName resourceName StoredProperty IndexCursor resourceName
public boolean requires Value Resource Name resource Name Qualified Name property Name return true  requiresValue ResourceName resourceName QualifiedName propertyName
Returns all the properties for a given resource p Answer a code Query Results code containing code Stored Property code If there are no matches returns an empty code Query Results code p p The depth parameter allows searching based on resource name path prefix p see Query Results param resource Name the resource name to match param depth the scope of the query return a code Query Results code with the matching properties public Query Results get All Resource Name resource Name int depth throws Core Exception final Query Results result new Query Results I Visitor visitor new I Visitor public void visit Resource Name resource Name Stored Property property Index Cursor cursor result add resource Name property public boolean requires Value Resource Name resource Name Qualified Name property Name return true if depth I Resource DEPTH ZERO records Matching resource Name visitor else records Deep Matching resource Name visitor return result  QueryResults StoredProperty QueryResults QueryResults resourceName QueryResults QueryResults getAll ResourceName resourceName CoreException QueryResults QueryResults IVisitor IVisitor ResourceName resourceName StoredProperty IndexCursor resourceName requiresValue ResourceName resourceName QualifiedName propertyName IResource DEPTH_ZERO recordsMatching resourceName recordsDeepMatching resourceName
Returns all the property names for a given resource p The result is a code Query Results code containing code Qualified Name code If the resource has no defined properties the method returns an empty code Query Results code p p The depth parameter allows searching based on resource name path prefix p param resource Name the resource name to match param depth the depth to which the query runs return a code Query Results code containing the property names public Query Results get Names Resource Name resource Name int depth throws Core Exception Query Results results new Query Results if depth I Resource DEPTH ZERO records Matching resource Name property Name Visitor results else records Deep Matching resource Name property Name Visitor results return results  QueryResults QualifiedName QueryResults resourceName QueryResults QueryResults getNames ResourceName resourceName CoreException QueryResults QueryResults IResource DEPTH_ZERO recordsMatching resourceName propertyNameVisitor recordsDeepMatching resourceName propertyNameVisitor
Returns true if the property store is up and running Returns false if the store has been shutdown public boolean is Running return store null  isRunning
protected I Visitor property Name Visitor final Query Results results return new I Visitor public void visit Resource Name resource Name Stored Property property Index Cursor cursor results add resource Name property get Name  IVisitor propertyNameVisitor QueryResults IVisitor ResourceName resourceName StoredProperty IndexCursor resourceName getName
public boolean requires Value Resource Name resource Name Qualified Name property Name return false  requiresValue ResourceName resourceName QualifiedName propertyName
protected I Visitor property Name Visitor final Query Results results return new I Visitor public void visit Resource Name resource Name Stored Property property Index Cursor cursor results add resource Name property get Name public boolean requires Value Resource Name resource Name Qualified Name property Name return false  IVisitor propertyNameVisitor QueryResults IVisitor ResourceName resourceName StoredProperty IndexCursor resourceName getName requiresValue ResourceName resourceName QualifiedName propertyName
Matches all properties for a given resource protected void records Deep Matching Resource Name resource Name I Visitor visitor throws Core Exception Build the partial search key Store Key search Key new Store Key resource Name true byte search Bytes search Key to Bytes int probe search Bytes length Position a cursor over the first matching key Index Cursor cursor store get Cursor try cursor find search Bytes While we have a prefix match while cursor key Matches search Bytes Must check that the prefix is up to a valid path segment note that the matching bytes length is search key length since properties MUST have a local name byte matching Bytes cursor get Key if probe 1 empty path is a valid prefix for all paths matching Bytes probe 0 a full path match matching Bytes probe 47 I Path SEPARATOR a segment boundary match visit Property At cursor visitor else the match is intra segment and therefore invalid cursor next cursor close catch Exception e throw new Resource Exception I Resource Status FAILED READ LOCAL resource Name get Path Policy bind properties store Problem e NON NLS 1  recordsDeepMatching ResourceName resourceName IVisitor CoreException StoreKey searchKey StoreKey resourceName searchBytes searchKey toBytes searchBytes IndexCursor getCursor searchBytes keyMatches searchBytes matchingBytes getKey matchingBytes matchingBytes IPath visitPropertyAt ResourceException IResourceStatus FAILED_READ_LOCAL resourceName getPath storeProblem
Matches all properties for a given resource protected void records Matching Resource Name resource Name I Visitor visitor throws Core Exception Build the partial search key Store Key search Key new Store Key resource Name false byte search Bytes search Key to Bytes Position a cursor over the first matching key Index Cursor cursor store get Cursor try cursor find search Bytes While we have a prefix match evaluate the visitor while cursor key Matches search Bytes visit Property At cursor visitor cursor next cursor close catch Exception e store reset throw new Resource Exception I Resource Status FAILED READ LOCAL resource Name get Path Policy bind properties store Problem e NON NLS 1  recordsMatching ResourceName resourceName IVisitor CoreException StoreKey searchKey StoreKey resourceName searchBytes searchKey toBytes IndexCursor getCursor searchBytes keyMatches searchBytes visitPropertyAt ResourceException IResourceStatus FAILED_READ_LOCAL resourceName getPath storeProblem
Matches the given property for a given resource Note that there should be only one protected void records Matching Resource Name resource Name Qualified Name property Name I Visitor visitor throws Core Exception Build the full search key Store Key search Key new Store Key resource Name property Name byte search Bytes search Key to Bytes Position a cursor over the first matching key Index Cursor cursor store get Cursor try cursor find search Bytes If we have an exact match evaluate the visitor if cursor key Equals search Bytes visit Property At cursor visitor cursor close catch Exception e store reset throw new Resource Exception I Resource Status FAILED READ LOCAL resource Name get Path Policy bind properties store Problem e NON NLS 1  recordsMatching ResourceName resourceName QualifiedName propertyName IVisitor CoreException StoreKey searchKey StoreKey resourceName propertyName searchBytes searchKey toBytes IndexCursor getCursor searchBytes keyEquals searchBytes visitPropertyAt ResourceException IResourceStatus FAILED_READ_LOCAL resourceName getPath storeProblem
Remove the given collection of named properties from the given resource p All of the properties being removed must exist already on the resource based on the remove Rule parameter If the rule is MISSING IGNORE then attempts to remove properties that do not exist are ignored if the rule is MISSING FAIL the method will throw a code Property Not Found Exception code if the property does not exist p If an exception is thrown all properties that did previously exist will have been removed from the resource To determine which properties caused the exception see the offenders result in the exception p p The depth parameter allows matching based on resource name path prefix p param resource Name the resource containing the properties param property Names the property names to remove param depth the scope for matching the resource name param remove Rule the behavior when removing non existant properties exception Core Exception public Query Results remove Resource Name resource Name Qualified Name property Names int depth int remove Rule throws Core Exception Query Results failures new Query Results if depth I Resource DEPTH ZERO for int i 0 i property Names length i boolean found basic Remove resource Name property Names i if found remove Rule FAIL MISSING failures add resource Name property Names i else Enumeration resource Names Enum deep Resource Names resource Name while resource Names Enum has More Elements Resource Name res Name Resource Name resource Names Enum next Element for int i 0 i property Names length i boolean found basic Remove res Name property Names i if found remove Rule FAIL MISSING failures add res Name property Names i return failures  removeRule MISSING_IGNORE MISSING_FAIL PropertyNotFoundException resourceName propertyNames removeRule CoreException QueryResults ResourceName resourceName QualifiedName propertyNames removeRule CoreException QueryResults QueryResults IResource DEPTH_ZERO propertyNames basicRemove resourceName propertyNames removeRule FAIL_MISSING resourceName propertyNames resourceNamesEnum deepResourceNames resourceName resourceNamesEnum hasMoreElements ResourceName resName ResourceName resourceNamesEnum nextElement propertyNames basicRemove resName propertyNames removeRule FAIL_MISSING resName propertyNames
Remove the named property from the given resource p If a matching property does not exist on this resource the method has no affect on the store Removal is performed to depth zero p p param resource Name the resource containing the property param property Name the property to remove public void remove Resource Name resource Name Qualified Name property Name throws Core Exception remove resource Name new Qualified Name property Name I Resource DEPTH ZERO IGNORE MISSING  resourceName propertyName ResourceName resourceName QualifiedName propertyName CoreException resourceName QualifiedName propertyName IResource DEPTH_ZERO IGNORE_MISSING
Remove all the properties from a given resource p The depth parameter allows matching based on resource name path prefix p param resource Name the resource containing the properties param depth the scope for matching the resource name public void remove All Resource Name resource Name int depth throws Core Exception Query Results names Search get Names resource Name depth Enumeration resource Names Enum names Search get Resource Names while resource Names Enum has More Elements Resource Name res Name Resource Name resource Names Enum next Element Enumeration property Names Enum Collections enumeration names Search get Results res Name while property Names Enum has More Elements Qualified Name property Name Qualified Name property Names Enum next Element basic Remove res Name property Name  resourceName removeAll ResourceName resourceName CoreException QueryResults namesSearch getNames resourceName resourceNamesEnum namesSearch getResourceNames resourceNamesEnum hasMoreElements ResourceName resName ResourceName resourceNamesEnum nextElement propertyNamesEnum namesSearch getResults resName propertyNamesEnum hasMoreElements QualifiedName propertyName QualifiedName propertyNamesEnum nextElement basicRemove resName propertyName
Sets the given collection of properties on the given resource p The add Rule determines whether the properties must already exist or not and if they do whether they are updated by subsequent addition Valid add Rule values are defined in code I Property Collection Constants code p The depth parameter allows matching based on resource name path prefix p p The code Property Exists Exception code is thrown if the matching resource already has a property of the same name and the rule requires that it must not If the exception is thrown all successfull properties will have been set and the failures are listed in the exception p param resource Name the resource to receive the properties param properties the properties to add param depth the depth at which to apply the add opertion param mode the behavior of the add operation exception Core Exception public Query Results set Resource Name resource Name Stored Property properties int depth int mode throws Core Exception Query Results failures new Query Results common Set resource Name properties depth mode failures return failures  addRule addRule IPropertyCollectionConstants PropertyExistsException resourceName CoreException QueryResults ResourceName resourceName StoredProperty CoreException QueryResults QueryResults commonSet resourceName
Sets the given property to the given resource p The property is added to depth zero If the resource already has a proprety with the same name it s value is updated to the given value i e SET UPDATE add rule equivalent p param resource Name the resource to receive the property param property the property to add public void set Resource Name resource Name Stored Property property throws Core Exception common Set resource Name new Stored Property property I Resource DEPTH ZERO SET UPDATE null  SET_UPDATE resourceName ResourceName resourceName StoredProperty CoreException commonSet resourceName StoredProperty IResource DEPTH_ZERO SET_UPDATE
public void shutdown I Progress Monitor monitor if store null return try store close finally null the store so other threads with a handle on it cannot use it store null  IProgressMonitor
public void startup I Progress Monitor monitor  IProgressMonitor
protected void visit Property At Index Cursor cursor I Visitor visitor throws Core Exception try Store Key key new Store Key cursor get Key Resource Name resource Name key get Resource Name Qualified Name property Name key get Property Name String property Value null if visitor requires Value resource Name property Name property Value store get Object As String cursor get Value As ObjectID visitor visit resource Name new Stored Property property Name property Value cursor catch Exception e throw new Resource Exception I Resource Status FAILED READ LOCAL null Policy bind properties store Problem e NON NLS 1  visitPropertyAt IndexCursor IVisitor CoreException StoreKey StoreKey getKey ResourceName resourceName getResourceName QualifiedName propertyName getPropertyName propertyValue requiresValue resourceName propertyName propertyValue getObjectAsString getValueAsObjectID resourceName StoredProperty propertyName propertyValue ResourceException IResourceStatus FAILED_READ_LOCAL storeProblem
public void commit throws Core Exception store commit  CoreException

protected Hash Map table new Hash Map 10 public Query Results super  HashMap HashMap QueryResults
protected void add Resource Name resource Name Object value List properties get Results resource Name if properties is Empty table put resource Name properties if properties index Of value 1 properties add value  ResourceName resourceName getResults resourceName isEmpty resourceName indexOf
Answers with an code Enumeration code of resources that comprise the result return an code Enumeration code of code Resource Name code or an empty enumerator if there were no matching resources public Enumeration get Resource Names return Collections enumeration table key Set  ResourceName getResourceNames keySet
Returns all the results for a given resource param resource Name the resource for which the results are sought return a code List code of the matching results The code List code will be empty if there are no matching results public List get Results Resource Name resource Name List results List table get resource Name if results null results new Array List 10 return results  resourceName getResults ResourceName resourceName resourceName ArrayList

public Resource Name String qualifier I Path path super this qualifier qualifier this path path  ResourceName IPath
public boolean equals Object other if this other return true if other instanceof Resource Name return false Resource Name other Name Resource Name other if qualifier null if other Name get Qualifier null return false else if qualifier equals other Name get Qualifier return false return path equals other Name get Path  ResourceName ResourceName otherName ResourceName otherName getQualifier otherName getQualifier otherName getPath
public I Path get Path return path  IPath getPath
public String get Qualifier return qualifier  getQualifier
public int hash Code return path hash Code  hashCode hashCode
public String to String return get Qualifier get Path to String NON NLS 1  toString getQualifier getPath toString

public Stored Property Qualified Name name String value super this name name this value value  StoredProperty QualifiedName
public Qualified Name get Name return name  QualifiedName getName
public String get String Value return value  getStringValue

public Store Key byte bytes throws Core Exception super value bytes initialize Objects  StoreKey CoreException initializeObjects
public Store Key Resource Name resource Name String qualifier throws Core Exception super this resource Name resource Name this qualifier qualifier initialize Bytes  StoreKey ResourceName resourceName CoreException resourceName resourceName initializeBytes
public Store Key Resource Name resource Name Qualified Name property Name throws Core Exception super this resource Name resource Name qualifier property Name get Qualifier local Name property Name get Local Name initialize Bytes  StoreKey ResourceName resourceName QualifiedName propertyName CoreException resourceName resourceName propertyName getQualifier localName propertyName getLocalName initializeBytes
public Store Key Resource Name resource Name boolean match Prefix throws Core Exception super this resource Name resource Name this match Prefix match Prefix initialize Bytes  StoreKey ResourceName resourceName matchPrefix CoreException resourceName resourceName matchPrefix matchPrefix initializeBytes
public String get Local Name return local Name  getLocalName localName
public Qualified Name get Property Name return new Qualified Name qualifier local Name  QualifiedName getPropertyName QualifiedName localName
public String get Qualifier return qualifier  getQualifier
public Resource Name get Resource Name return resource Name  ResourceName getResourceName resourceName
private void initialize Bytes throws Core Exception try Byte Array Output Stream buffer new Byte Array Output Stream Step 0 the resource name prefix always considered in full write Null Terminated buffer resource Name get Qualifier String path resource Name get Path to String Step 1 the resource path if match Prefix don t null terminate resource name write Bytes buffer path If prefix matching cannot allow other fields to be specified if qualifier null local Name null String message Policy bind properties invalid Prop Name qualifier local Name NON NLS 1 throw new Resource Exception I Resource Status INVALID VALUE null message null else Zero depth requires full path matching including null write Null Terminated buffer path Step 2 the name space no prefix matching if qualifier null write Null Terminated buffer qualifier Step 3 the local name no prefix matching if local Name null write Null Terminated buffer local Name else if local Name null Specifying a local name without a qualifier is illegal String message Policy bind properties invalid Prop Name qualifier local Name NON NLS 1 throw new Resource Exception I Resource Status INVALID VALUE null message null value buffer to Byte Array catch IO Exception e should never happen throw new Resource Exception I Resource Status INTERNAL ERROR null Policy bind properties store Problem e NON NLS 1  initializeBytes CoreException ByteArrayOutputStream ByteArrayOutputStream writeNullTerminated resourceName getQualifier resourceName getPath toString matchPrefix writeBytes localName invalidPropName localName ResourceException IResourceStatus INVALID_VALUE writeNullTerminated writeNullTerminated localName writeNullTerminated localName localName invalidPropName localName ResourceException IResourceStatus INVALID_VALUE toByteArray IOException ResourceException IResourceStatus INTERNAL_ERROR storeProblem
Assumes value bytes are fully defined i e initializing from a stored key protected void initialize Objects throws Core Exception try Byte Array Input Stream stream new Byte Array Input Stream value String prefix read Null Terminated stream String path read Null Terminated stream resource Name new Resource Name prefix new Path path qualifier read Null Terminated stream local Name read Null Terminated stream catch IO Exception e should never happen throw new Resource Exception I Resource Status INTERNAL ERROR null Policy bind properties store Problem e NON NLS 1  initializeObjects CoreException ByteArrayInputStream ByteArrayInputStream readNullTerminated readNullTerminated resourceName ResourceName readNullTerminated localName readNullTerminated IOException ResourceException IResourceStatus INTERNAL_ERROR storeProblem
public boolean is Fully Defined return resource Name null qualifier null local Name null  isFullyDefined resourceName localName
public boolean match Prefix return match Prefix  matchPrefix matchPrefix
private String read Null Terminated Byte Array Input Stream stream throws IO Exception Byte Array Output Stream buffer new Byte Array Output Stream int b while b stream read 0 buffer write b should not reach end of stream without first hitting null 0 byte if b 1 throw new EOF Exception return Convert fromUTF8 buffer to Byte Array  readNullTerminated ByteArrayInputStream IOException ByteArrayOutputStream ByteArrayOutputStream EOFException toByteArray
public byte to Bytes return value  toBytes
For debugging public String to String return new String to Bytes  toString toBytes
private void write Bytes Byte Array Output Stream stream String value throws IO Exception byte bytes Convert toUTF8 value stream write bytes  writeBytes ByteArrayOutputStream IOException
private void write Null Terminated Byte Array Output Stream stream String value throws IO Exception write Bytes stream value stream write 0  writeNullTerminated ByteArrayOutputStream IOException writeBytes

Return the property store which is associated with the given resource param resource the resource whose property store is being accessed return the resource s property store throws Core Exception if there was a problem accessing the resource s property store since 2 1 public static Property Store get Property Store I Resource resource throws Core Exception return Resource resource get Property Manager get Property Store resource  CoreException PropertyStore getPropertyStore IResource CoreException getPropertyManager getPropertyStore

protected I Refresh Monitor create Polling Monitor I Resource resource Polling Monitor monitor Workspace resource get Workspace get Refresh Manager monitors poll Monitor monitor monitor resource return monitor  IRefreshMonitor createPollingMonitor IResource PollingMonitor getWorkspace getRefreshManager pollMonitor
public void reset Monitors I Resource resource Monitor Manager manager Workspace resource get Workspace get Refresh Manager monitors manager unmonitor resource manager monitor resource  resetMonitors IResource MonitorManager getWorkspace getRefreshManager

public Monitor Manager I Workspace workspace Refresh Manager refresh Manager this workspace workspace this refresh Manager refresh Manager registered Monitors Collections synchronized Map new Hash Map 10 poll Monitor new Polling Monitor refresh Manager  MonitorManager IWorkspace RefreshManager refreshManager refreshManager refreshManager registeredMonitors synchronizedMap HashMap pollMonitor PollingMonitor refreshManager
Queries extensions of the refresh Providers extension point and creates the provider classes Will never return code null code return Refresh Provider The array of registered code Refresh Provider code objects or an empty array private Refresh Provider get Refresh Providers if providers null return providers I Plugin Descriptor descriptor Resources Plugin get Plugin get Descriptor I Extension Point extension Point descriptor get Extension Point Resources Plugin PT REFRESH PROVIDERS I Configuration Element infos extension Point get Configuration Elements List provider List new Array List infos length for int i 0 i infos length i I Configuration Element configuration Element infos i Refresh Provider provider null try provider Refresh Provider configuration Element create Executable Extension class NON NLS 1 catch Core Exception e Resources Plugin get Plugin get Log log e get Status if provider null provider List add provider providers Refresh Provider provider List to Array new Refresh Provider provider List size return providers  refreshProviders RefreshProvider RefreshProvider RefreshProvider getRefreshProviders IPluginDescriptor ResourcesPlugin getPlugin getDescriptor IExtensionPoint extensionPoint getExtensionPoint ResourcesPlugin PT_REFRESH_PROVIDERS IConfigurationElement extensionPoint getConfigurationElements providerList ArrayList IConfigurationElement configurationElement RefreshProvider RefreshProvider configurationElement createExecutableExtension CoreException ResourcesPlugin getPlugin getLog getStatus providerList RefreshProvider providerList toArray RefreshProvider providerList
Collects the set of root resources that required monitoring This includes projects and all linked resources private List get Resources To Monitor final List resources To Monitor new Array List 10 I Project projects workspace get Root get Projects for int i 0 i projects length i resources To Monitor add projects i try I Resource members projects i members for int j 0 j members length j if members j is Linked resources To Monitor add members j catch Core Exception e Resources Plugin get Plugin get Log log e get Status return resources To Monitor  getResourcesToMonitor resourcesToMonitor ArrayList IProject getRoot getProjects resourcesToMonitor IResource isLinked resourcesToMonitor CoreException ResourcesPlugin getPlugin getLog getStatus resourcesToMonitor
private boolean is Monitoring I Resource resource synchronized registered Monitors for Iterator i registered Monitors key Set iterator i has Next List resources List registered Monitors get i next if resources null resources contains resource return true return false  isMonitoring IResource registeredMonitors registeredMonitors keySet hasNext registeredMonitors
Installs a monitor on the given resource Returns true if the polling monitor was installed and false if a refresh provider was installed boolean monitor I Resource resource if is Monitoring resource return false boolean polling Monitor Needed true Refresh Provider providers get Refresh Providers for int i 0 i providers length i I Refresh Monitor monitor safe Install Monitor providers i resource if monitor null register Monitor monitor resource polling Monitor Needed false if polling Monitor Needed poll Monitor monitor resource register Monitor poll Monitor resource return polling Monitor Needed  IResource isMonitoring pollingMonitorNeeded RefreshProvider getRefreshProviders IRefreshMonitor safeInstallMonitor registerMonitor pollingMonitorNeeded pollingMonitorNeeded pollMonitor registerMonitor pollMonitor pollingMonitorNeeded
private I Refresh Monitor safe Install Monitor Refresh Provider provider I Resource resource Throwable t null try return provider install Monitor resource refresh Manager catch Exception e t e catch Linkage Error e t e if t null I Status error new Status I Status ERROR Resources Plugin PI RESOURCES 1 Policy bind refresh install Error t NON NLS 1 Resources Plugin get Plugin get Log log error return null  IRefreshMonitor safeInstallMonitor RefreshProvider IResource installMonitor refreshManager LinkageError IStatus IStatus ResourcesPlugin PI_RESOURCES installError ResourcesPlugin getPlugin getLog
public void monitor Failed I Refresh Monitor monitor I Resource resource if Refresh Manager DEBUG System err println Refresh Manager DEBUG PREFIX monitor monitor failed to monitor resource resource NON NLS 1 NON NLS 2 if registered Monitors null monitor null return if resource null List resources List registered Monitors get monitor if resources null resources is Empty registered Monitors remove monitor return synchronized protect the collection during iteration synchronized registered Monitors for Iterator i resources iterator i has Next resource I Resource i next poll Monitor monitor resource register Monitor poll Monitor resource registered Monitors remove monitor else remove Monitor monitor resource poll Monitor monitor resource register Monitor poll Monitor resource  monitorFailed IRefreshMonitor IResource RefreshManager RefreshManager DEBUG_PREFIX registeredMonitors registeredMonitors isEmpty registeredMonitors registeredMonitors hasNext IResource pollMonitor registerMonitor pollMonitor registeredMonitors removeMonitor pollMonitor registerMonitor pollMonitor
see org eclipse core resources I Path Variable Change Listener path Variable Changed org eclipse core resources I Path Variable Change Event public void path Variable Changed I Path Variable Change Event event if registered Monitors is Empty return String variable Name event get Variable Name Set invalid Resources new Hash Set for Iterator i registered Monitors values iterator i has Next for Iterator j List i next iterator j has Next I Resource resource I Resource j next I Path raw Location resource get Raw Location if raw Location null if raw Location segment Count 0 variable Name equals raw Location segment 0 invalid Resources contains resource invalid Resources add resource if invalid Resources is Empty for Iterator i invalid Resources iterator i has Next I Resource resource I Resource i next unmonitor resource monitor resource  IPathVariableChangeListener pathVariableChanged IPathVariableChangeEvent pathVariableChanged IPathVariableChangeEvent registeredMonitors isEmpty variableName getVariableName invalidResources HashSet registeredMonitors hasNext hasNext IResource IResource IPath rawLocation getRawLocation rawLocation rawLocation segmentCount variableName rawLocation invalidResources invalidResources invalidResources isEmpty invalidResources hasNext IResource IResource
private void register Monitor I Refresh Monitor monitor I Resource resource synchronized protect the collection during add synchronized registered Monitors List resources List registered Monitors get monitor if resources null resources new Array List 1 registered Monitors put monitor resources if resources contains resource resources add resource if Refresh Manager DEBUG System out println Refresh Manager DEBUG PREFIX added monitor monitor on resource resource NON NLS 1 NON NLS 2  registerMonitor IRefreshMonitor IResource registeredMonitors registeredMonitors ArrayList registeredMonitors RefreshManager RefreshManager DEBUG_PREFIX
private void remove Monitor I Refresh Monitor monitor I Resource resource synchronized protect the collection during remove synchronized registered Monitors List resources List registered Monitors get monitor if resources null resources is Empty resources remove resource else registered Monitors remove monitor if Refresh Manager DEBUG System out println Refresh Manager DEBUG PREFIX removing monitor monitor on resource resource NON NLS 1 NON NLS 2  removeMonitor IRefreshMonitor IResource registeredMonitors registeredMonitors isEmpty registeredMonitors RefreshManager RefreshManager DEBUG_PREFIX
public void resource Changed I Resource Change Event event switch event get Type case I Resource Change Event PRE DELETE case I Resource Change Event PRE CLOSE Additions and project open handled in visitor I Project project I Project event get Resource unmonitor project break default try event get Delta accept this catch Core Exception e Resources Plugin get Plugin get Log log e get Status  resourceChanged IResourceChangeEvent getType IResourceChangeEvent PRE_DELETE IResourceChangeEvent PRE_CLOSE IProject IProject getResource getDelta CoreException ResourcesPlugin getPlugin getLog getStatus
Start the monitoring of resources by all monitors public void start boolean refresh Needed false for Iterator i get Resources To Monitor iterator i has Next refresh Needed monitor I Resource i next workspace add Resource Change Listener this workspace get Path Variable Manager add Change Listener this if Refresh Manager DEBUG System out println Refresh Manager DEBUG PREFIX starting monitor manager NON NLS 1 If not exclusively using polling create a polling monitor and run it once to catch changes that occurred while the native monitor was turned off if refresh Needed new Polling Monitor refresh Manager run Once  refreshNeeded getResourcesToMonitor hasNext refreshNeeded IResource addResourceChangeListener getPathVariableManager addChangeListener RefreshManager RefreshManager DEBUG_PREFIX refreshNeeded PollingMonitor refreshManager runOnce
Stop the monitoring of resources by all monitors public void stop workspace remove Resource Change Listener this workspace get Path Variable Manager remove Change Listener this synchronized protect the collection during iteration synchronized registered Monitors for Iterator i registered Monitors key Set iterator i has Next I Refresh Monitor monitor I Refresh Monitor i next monitor unmonitor null registered Monitors clear if Refresh Manager DEBUG System out println Refresh Manager DEBUG PREFIX stopping monitor manager NON NLS 1  removeResourceChangeListener getPathVariableManager removeChangeListener registeredMonitors registeredMonitors keySet hasNext IRefreshMonitor IRefreshMonitor registeredMonitors RefreshManager RefreshManager DEBUG_PREFIX
void unmonitor I Resource resource if resource null is Monitoring resource return synchronized registered Monitors for Iterator i registered Monitors entry Set iterator i has Next Map Entry current Map Entry i next List resources List current get Value if resources null resources is Empty resources contains resource I Refresh Monitor current get Key unmonitor resource resources remove resource if resource get Type I Resource PROJECT unmonitor Linked Contents I Project resource  IResource isMonitoring registeredMonitors registeredMonitors entrySet hasNext getValue isEmpty IRefreshMonitor getKey getType IResource unmonitorLinkedContents IProject
private void unmonitor Linked Contents I Project project I Resource children null try children project members catch Core Exception e Resources Plugin get Plugin get Log log e get Status if children null children length 0 for int i 0 i children length i if children i is Linked unmonitor children i  unmonitorLinkedContents IProject IResource CoreException ResourcesPlugin getPlugin getLog getStatus isLinked
public boolean visit I Resource Delta delta I Resource resource delta get Resource switch resource get Type case I Resource FILE case I Resource FOLDER if resource is Linked switch delta get Kind case I Resource Delta ADDED monitor resource break case I Resource Delta REMOVED unmonitor resource break default break return false case I Resource ROOT return true case I Resource PROJECT I Project project I Project resource switch delta get Kind case I Resource Delta ADDED Project deletion is handled in resource Changed I Resource Event if project is Open monitor project break case I Resource Delta CHANGED Project closure is handled in resource Changed I Resource Event if delta get Flags I Resource Delta OPEN 0 if project is Open monitor project break default break return true default break return false  IResourceDelta IResource getResource getType IResource IResource isLinked getKind IResourceDelta IResourceDelta IResource IResource IProject IProject getKind IResourceDelta resourceChanged IResourceEvent isOpen IResourceDelta resourceChanged IResourceEvent getFlags IResourceDelta isOpen

Creates a new polling monitor public Polling Monitor Refresh Manager manager super Policy bind refresh poll Job NON NLS 1 this manager manager set Priority Job DECORATE set System true resource Roots new Array List to Refresh new Array List  PollingMonitor RefreshManager pollJob setPriority setSystem resourceRoots ArrayList toRefresh ArrayList
Add the given root to the list of roots that need to be polled public synchronized void monitor I Resource root resource Roots add root schedule MIN FREQUENCY  IResource resourceRoots MIN_FREQUENCY
Polls the filesystem under the root containers for changes protected I Status run I Progress Monitor monitor sleep on the first run to avoid colliding with the startup process if first Run first Run false try Thread sleep 10000 catch Interrupted Exception e ignore long time System current Time Millis check to see if we need to start an iteration if to Refresh is Empty begin Iteration if Refresh Manager DEBUG System out println Refresh Manager DEBUG PREFIX New polling iteration on to Refresh size roots NON NLS 1 NON NLS 2 final int old Size to Refresh size if Refresh Manager DEBUG System out println Refresh Manager DEBUG PREFIX started polling NON NLS 1 refresh the hot root if applicable if time hot Root Time HOT ROOT DECAY hot Root null else if hot Root null poll hot Root process roots that have not yet been refreshed this iteration final long loop Start System current Time Millis while to Refresh is Empty if monitor is Canceled break poll I Resource to Refresh remove to Refresh size 1 stop the iteration if we have exceed maximum duration if System current Time Millis loop Start MAX DURATION break time System current Time Millis time if Refresh Manager DEBUG System out println Refresh Manager DEBUG PREFIX polled old Size to Refresh size roots in time ms NON NLS 1 NON NLS 2 NON NLS 3 reschedule automatically should Run will cancel if not needed make sure it doesn t run more than 5 of the time long delay Math max MIN FREQUENCY time 20 if Refresh Manager DEBUG System out println Refresh Manager DEBUG PREFIX rescheduling polling job in delay 1000 seconds NON NLS 1 NON NLS 2 don t reschedule the job if the resources plugin has been shut down if Platform get Bundle Resources Plugin PI RESOURCES get State Bundle ACTIVE schedule delay return Status OK STATUS  IStatus IProgressMonitor firstRun firstRun InterruptedException currentTimeMillis toRefresh isEmpty beginIteration RefreshManager RefreshManager DEBUG_PREFIX toRefresh oldSize toRefresh RefreshManager RefreshManager DEBUG_PREFIX hotRootTime HOT_ROOT_DECAY hotRoot hotRoot hotRoot loopStart currentTimeMillis toRefresh isEmpty isCanceled IResource toRefresh toRefresh currentTimeMillis loopStart MAX_DURATION currentTimeMillis RefreshManager RefreshManager DEBUG_PREFIX oldSize toRefresh shouldRun MIN_FREQUENCY RefreshManager RefreshManager DEBUG_PREFIX getBundle ResourcesPlugin PI_RESOURCES getState OK_STATUS
Instructs the polling job to do one complete iteration of all workspace roots and then discard itself This is used when the refresh manager is first turned on if there is a native monitor installed which don t handle changes that occurred while the monitor was turned off void run Once synchronized this add all roots to the refresh list but not to the real set of roots this will cause the job to never run again once it has exhaused the set of roots to refresh I Project projects Resources Plugin get Workspace get Root get Projects for int i 0 i projects length i to Refresh add projects i schedule MIN FREQUENCY  runOnce IProject ResourcesPlugin getWorkspace getRoot getProjects toRefresh MIN_FREQUENCY
private void poll I Resource resource if resource is Synchronized I Resource DEPTH INFINITE return submit refresh request manager refresh resource hot Root resource hot Root Time System current Time Millis if Refresh Manager DEBUG System out println Refresh Manager DEBUG PREFIX new hot root resource NON NLS 1  IResource isSynchronized IResource DEPTH_INFINITE hotRoot hotRootTime currentTimeMillis RefreshManager RefreshManager DEBUG_PREFIX
see Job should Run public boolean should Run only run if there is something to refresh return resource Roots is Empty to Refresh is Empty  shouldRun shouldRun resourceRoots isEmpty toRefresh isEmpty
Copies the resources to be polled into the list of resources to refresh this iteration This method is synchronized to guard against concurrent access to the resource Roots field private synchronized void begin Iteration to Refresh add All resource Roots if hot Root null to Refresh remove hot Root  resourceRoots beginIteration toRefresh addAll resourceRoots hotRoot toRefresh hotRoot
public synchronized void unmonitor I Resource resource if resource null resource Roots clear else resource Roots remove resource if resource Roots is Empty cancel  IResource resourceRoots resourceRoots resourceRoots isEmpty

public Refresh Job super Policy bind refresh job Name NON NLS 1 set Priority Job LONG set System true set Rule Resources Plugin get Workspace get Root f Requests new Array List 1  RefreshJob jobName setPriority setSystem setRule ResourcesPlugin getWorkspace getRoot fRequests ArrayList
Adds the given resource to the set of resources that need refreshing Synchronized in order to protect the collection during add param resource private synchronized void add Request I Resource resource discard if the resource to be added is a sibling or child of an existing request I Path to Add resource get Full Path int size f Requests size for int i 0 i size i if I Resource f Requests get i get Full Path is Prefix Of to Add return discard any existing requests below the resource to be added for Iterator it f Requests iterator it has Next if to Add is Prefix Of I Resource it next get Full Path it remove finally add the new request f Requests add resource  addRequest IResource IPath toAdd getFullPath fRequests IResource fRequests getFullPath isPrefixOf toAdd fRequests hasNext toAdd isPrefixOf IResource getFullPath fRequests
private synchronized I Resource get Requests synchronized in order to atomically obtain and clear requests I Resource to Refresh I Resource f Requests to Array new I Resource f Requests size f Requests clear return to Refresh  IResource getRequests IResource toRefresh IResource fRequests toArray IResource fRequests fRequests toRefresh
public void refresh I Resource resource if resource null return add Request resource if active schedule UPDATE DELAY  IResource addRequest UPDATE_DELAY
public I Status run In Workspace I Progress Monitor monitor long start System current Time Millis String msg Policy bind refresh refresh Err NON NLS 1 Multi Status errors new Multi Status Resources Plugin PI RESOURCES 1 msg null try if Refresh Manager DEBUG System out println Refresh Manager DEBUG PREFIX starting refresh job NON NLS 1 I Resource to Refresh get Requests monitor begin Task Policy bind refresh task to Refresh length NON NLS 1 for int i 0 i to Refresh length i if monitor is Canceled throw new Operation Canceled Exception try to Refresh i refresh Local I Resource DEPTH INFINITE new Sub Progress Monitor monitor 1 catch Core Exception e errors merge e get Status finally monitor done if Refresh Manager DEBUG System out println Refresh Manager DEBUG PREFIX finished refresh job in System current Time Millis start ms NON NLS 1 NON NLS 2 if errors isOK return errors return Status OK STATUS  IStatus runInWorkspace IProgressMonitor currentTimeMillis refreshErr MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES RefreshManager RefreshManager DEBUG_PREFIX IResource toRefresh getRequests beginTask toRefresh toRefresh isCanceled OperationCanceledException toRefresh refreshLocal IResource DEPTH_INFINITE SubProgressMonitor CoreException getStatus RefreshManager RefreshManager DEBUG_PREFIX currentTimeMillis OK_STATUS
Starts the refresh job public void start if Refresh Manager DEBUG System out println Refresh Manager DEBUG PREFIX enabling auto refresh NON NLS 1 active true  RefreshManager RefreshManager DEBUG_PREFIX
Stops the refresh job public void stop if active Refresh Manager DEBUG System out println Refresh Manager DEBUG PREFIX disabling auto refresh NON NLS 1 active false cancel  RefreshManager RefreshManager DEBUG_PREFIX

private I Workspace workspace public Refresh Manager I Workspace workspace this workspace workspace  IWorkspace RefreshManager IWorkspace
protected void manage Auto Refresh boolean enabled do nothing if we have already shutdown if refresh Job null return if enabled refresh Job start monitors start else refresh Job stop monitors stop  manageAutoRefresh refreshJob refreshJob refreshJob
see org eclipse core resources refresh I Refresh Result monitor Failed org eclipse core resources refresh I Refresh Monitor org eclipse core resources I Resource public void monitor Failed I Refresh Monitor monitor I Resource resource should install polling monitor in this case  IRefreshResult monitorFailed IRefreshMonitor IResource monitorFailed IRefreshMonitor IResource
Checks for changes to the the PREF AUTO UPDATE property see I Property Change Listener property Change Property Change Event public void property Change Property Change Event event String property event get Property if Resources Plugin PREF AUTO REFRESH equals property Preferences preferences Resources Plugin get Plugin get Plugin Preferences boolean auto Refresh preferences get Boolean Resources Plugin PREF AUTO REFRESH manage Auto Refresh auto Refresh  PREF_AUTO_UPDATE IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent getProperty ResourcesPlugin PREF_AUTO_REFRESH ResourcesPlugin getPlugin getPluginPreferences autoRefresh getBoolean ResourcesPlugin PREF_AUTO_REFRESH manageAutoRefresh autoRefresh
public void refresh I Resource resources do nothing if we have already shutdown if refresh Job null refresh Job refresh resources  IResource refreshJob refreshJob
Shuts down the refresh manager This only happens when the resources plugin is going away public void shutdown I Progress Monitor monitor Resources Plugin get Plugin get Plugin Preferences remove Property Change Listener this if monitors null monitors stop monitors null if refresh Job null refresh Job stop refresh Job null  IProgressMonitor ResourcesPlugin getPlugin getPluginPreferences removePropertyChangeListener refreshJob refreshJob refreshJob
Initializes the refresh manager This does a minimal amount of work if autobuild is turned off public void startup I Progress Monitor monitor Preferences preferences Resources Plugin get Plugin get Plugin Preferences preferences set Default Resources Plugin PREF AUTO REFRESH false preferences add Property Change Listener this refresh Job new Refresh Job monitors new Monitor Manager workspace this boolean auto Refresh preferences get Boolean Resources Plugin PREF AUTO REFRESH if auto Refresh manage Auto Refresh auto Refresh  IProgressMonitor ResourcesPlugin getPlugin getPluginPreferences setDefault ResourcesPlugin PREF_AUTO_REFRESH addPropertyChangeListener refreshJob RefreshJob MonitorManager autoRefresh getBoolean ResourcesPlugin PREF_AUTO_REFRESH autoRefresh manageAutoRefresh autoRefresh

public Object create Executable Extension String attribute Name throws Core Exception String prop null String executable String plugin Name null String class Name null Object init Data null int i if attribute Name null prop get Attribute attribute Name else property not specified try as element value prop get Value if prop null prop prop trim if prop equals NON NLS 1 prop null if prop null property not defined try as a child element I Configuration Element exec I Configuration Element parms I Configuration Element element Hashtable init Parms String pname exec get Children attribute Name if exec length 0 element exec 0 assumes single definition plugin Name element get Attribute plugin NON NLS 1 class Name element get Attribute class NON NLS 1 parms element get Children parameter NON NLS 1 if parms null init Parms new Hashtable parms length 1 for i 0 i parms length i pname parms i get Attribute name NON NLS 1 if pname null init Parms put pname parms i get Attribute value NON NLS 1 if init Parms is Empty init Data init Parms specified name is not a simple attribute nor child element else String message Policy bind plugin ext Def Not Found attribute Name NON NLS 1 I Status status new Status I Status ERROR Platform PI RUNTIME PLUGIN ERROR message null NON NLS 1 Internal Platform get Default get Log Internal Platform get Default get Bundle Context get Bundle log status NON NLS 1 throw new Core Exception status else simple property or element value parse it into its components i prop index Of if i 1 executable prop substring 0 i trim init Data prop substring i 1 trim else executable prop i executable index Of if i 1 plugin Name executable substring 0 i trim class Name executable substring i 1 trim else class Name executable if class Name null class Name equals NON NLS 1 String message Policy bind plugin ext Def No Class attribute Name NON NLS 1 I Status status new Status I Status ERROR Platform PI RUNTIME PLUGIN ERROR message null NON NLS 1 Internal Platform get Default get Log Internal Platform get Default get Bundle Context get Bundle log status NON NLS 1 throw new Core Exception status return create Executable Extension Internal Platform get Default get Bundle get Declaring Extension get Namespace plugin Name class Name init Data this attribute Name  createExecutableExtension attributeName CoreException pluginName className initData attributeName getAttribute attributeName getValue IConfigurationElement IConfigurationElement IConfigurationElement initParms getChildren attributeName pluginName getAttribute className getAttribute getChildren initParms getAttribute initParms getAttribute initParms isEmpty initData initParms extDefNotFound attributeName IStatus IStatus PI_RUNTIME PLUGIN_ERROR InternalPlatform getDefault getLog InternalPlatform getDefault getBundleContext getBundle CoreException indexOf initData indexOf pluginName className className className className extDefNoClass attributeName IStatus IStatus PI_RUNTIME PLUGIN_ERROR InternalPlatform getDefault getLog InternalPlatform getDefault getBundleContext getBundle CoreException createExecutableExtension InternalPlatform getDefault getBundle getDeclaringExtension getNamespace pluginName className initData attributeName
Object create Executable Extension Bundle bundle String plugin Name String class Name Object init Data I Configuration Element cfig String property Name throws Core Exception String id bundle get Symbolic Name this plugin id check if we need to delegate to some other plugin if plugin Name null plugin Name equals plugin Name equals id NON NLS 1 Bundle other Bundle null other Bundle Internal Platform get Default get Bundle plugin Name return create Executable Extension other Bundle class Name init Data cfig property Name return create Executable Extension bundle class Name init Data cfig property Name  createExecutableExtension pluginName className initData IConfigurationElement propertyName CoreException getSymbolicName pluginName pluginName pluginName otherBundle otherBundle InternalPlatform getDefault getBundle pluginName createExecutableExtension otherBundle className initData propertyName createExecutableExtension className initData propertyName
public Object create Executable Extension Bundle bundle String class Name Object init Data I Configuration Element cfig String property Name throws Core Exception load the requested class from this plugin Class class Instance null try class Instance bundle load Class class Name catch Exception e1 throw Exception Policy bind plugin load Class Error bundle get Symbolic Name class Name e1 NON NLS 1 catch Linkage Error e throw Exception Policy bind plugin load Class Error bundle get Symbolic Name class Name e NON NLS 1 create a new instance Object result null try result class Instance new Instance catch Exception e throw Exception Policy bind plugin instantiate Class Error bundle get Symbolic Name class Name e NON NLS 1 check if we have extension adapter and initialize if result instanceof I Executable Extension try make the call even if the initialization string is null I Executable Extension result set Initialization Data cfig property Name init Data catch Core Exception ce user code threw exception Internal Platform get Default get Log Internal Platform get Default get Bundle Context get Bundle log ce get Status throw new Core Exception ce get Status catch Exception te user code caused exception throw Exception Policy bind policy init Object Error bundle get Symbolic Name class Name te NON NLS 1 return result  createExecutableExtension className initData IConfigurationElement propertyName CoreException classInstance classInstance loadClass className throwException loadClassError getSymbolicName className LinkageError throwException loadClassError getSymbolicName className classInstance newInstance throwException instantiateClassError getSymbolicName className IExecutableExtension IExecutableExtension setInitializationData propertyName initData CoreException InternalPlatform getDefault getLog InternalPlatform getDefault getBundleContext getBundle getStatus CoreException getStatus throwException initObjectError getSymbolicName className
private void throw Exception String message Throwable exception throws Core Exception I Status status new Status I Status ERROR Platform PI RUNTIME PLUGIN ERROR message exception Internal Platform get Default get Log Internal Platform get Default get Bundle Context get Bundle log status throw new Core Exception status  throwException CoreException IStatus IStatus PI_RUNTIME PLUGIN_ERROR InternalPlatform getDefault getLog InternalPlatform getDefault getBundleContext getBundle CoreException
Returns the extension in which this configuration element is declared If this element is a top level child of an extension the returned value is equivalent to code get Parent code return the extension in which this configuration element is declared or code null code public Extension get Parent Extension Object p get Parent while p null p instanceof Configuration Element p Configuration Element p get Parent return Extension p  getParent getParentExtension getParent ConfigurationElement ConfigurationElement getParent
public I Extension get Declaring Extension return get Parent Extension  IExtension getDeclaringExtension getParentExtension
Returns the properties associated with this element return the properties associated with this element or code null code public Configuration Property get Properties return properties  ConfigurationProperty getProperties
Returns the value of this element return the value of this element or code null code public String get Value String s get Value As Is if s null return null return s  getValue getValueAsIs
public String get Value As Is return value  getValueAsIs
Returns this element s sub elements return the sub elements of this element or code null code public I Configuration Element get Children return children null new I Configuration Element 0 children  IConfigurationElement getChildren IConfigurationElement
public I Configuration Element get Children String name I Configuration Element list get Children if list null return new I Configuration Element 0 List children new Array List for int i 0 i list length i I Configuration Element element list i if name equals element get Name children add list i return I Configuration Element children to Array new I Configuration Element children size  IConfigurationElement getChildren IConfigurationElement getChildren IConfigurationElement ArrayList IConfigurationElement getName IConfigurationElement toArray IConfigurationElement
public String get Attribute String name Configuration Property list get Properties if list null return null Configuration Property found null for int i 0 i list length i if name equals list i get Name found list i break return found null null found get Value  getAttribute ConfigurationProperty getProperties ConfigurationProperty getName getValue
public String get Attribute As Is String name Configuration Property list get Properties if list null return null for int i 0 i list length i if name equals list i get Name return list i get Value return null  getAttributeAsIs ConfigurationProperty getProperties getName getValue
public String get Attribute Names Configuration Property list get Properties if list null return new String 0 String result new String list length for int i 0 i list length i result i list i get Name return result  getAttributeNames ConfigurationProperty getProperties getName
Sets the properties associated with this element param value the properties to associate with this element May be code null code public void set Properties Configuration Property value properties value  setProperties ConfigurationProperty
Sets configuration elements contained by this element param value the configuration elements to be associated with this element May be code null code public void set Children I Configuration Element value children value  setChildren IConfigurationElement
Sets the value of this element param value the new value of this element May be code null code public void set Value String value this value value  setValue
Optimization to replace a non localized key with its localized value Avoids having to access resource bundles for further lookups public void set Localized Value String value this value value Extension Registry Internal Platform get Default get Registry set Dirty true  setLocalizedValue ExtensionRegistry InternalPlatform getDefault getRegistry setDirty

Creates a new configuration property model in which all fields are code null code public Configuration Property super  ConfigurationProperty
Returns the value of this property return the value of this property or code null code public String get Value return value  getValue
Sets the value of this property param value the new value of this property May be code null code public void set Value String value this value value  setValue
Optimization to replace a non localized key with its localized value Avoids having to access resource bundles for further lookups public void set Localized Value String value this value value Extension Registry Internal Platform get Default get Registry set Dirty true  setLocalizedValue ExtensionRegistry InternalPlatform getDefault getRegistry setDirty

public Eclipse Bundle Listener Extension Registry registry this registry registry xml Tracker new Service Tracker Internal Platform get Default get Bundle Context SAX Parser Factory class get Name null xml Tracker open  EclipseBundleListener ExtensionRegistry xmlTracker ServiceTracker InternalPlatform getDefault getBundleContext SAXParserFactory getName xmlTracker
public void bundle Changed Bundle Event event Only should listen for RESOLVED and UNRESOLVED events When a bundle is updated the Framework will publish an UNRESOLVED and then a RESOLVED event which should cause the bundle to be removed and then added back into the registry When a bundle is uninstalled the Framework should publish an UNRESOLVED event and then an UNINSTALLED event so the bundle will have been removed by the UNRESOLVED event before the UNINSTALLED event is published When a bundle is refreshed from Package Admin an UNRESOLVED event will be published which will remove the bundle from the registry If the bundle can be RESOLVED after a refresh then a RESOLVED event will be published which will add the bundle back This is required because the classloader will have been refreshed for the bundle so all extensions and extension points for the bundle must be refreshed Bundle bundle event get Bundle switch event get Type case Bundle Event RESOLVED add Bundle bundle break case Bundle Event UNRESOLVED remove Bundle bundle break  bundleChanged BundleEvent PackageAdmin getBundle getType BundleEvent addBundle BundleEvent removeBundle
public void process Bundles Bundle bundles for int i 0 i bundles length i if is Bundle Resolved bundles i add Bundle bundles i else remove Bundle bundles i  processBundles isBundleResolved addBundle removeBundle
private boolean is Bundle Resolved Bundle bundle return bundle get State Bundle RESOLVED Bundle ACTIVE Bundle STARTING Bundle STOPPING 0  isBundleResolved getState
private void remove Bundle Bundle bundle registry remove bundle get Symbolic Name bundle get Bundle Id  removeBundle getSymbolicName getBundleId
private void add Bundle Bundle bundle if the given bundle already exists in the registry then return note that this does not work for update cases if registry get Namespace bundle get Symbolic Name null return Namespace bundle Model get Bundle Model bundle if bundle Model null return Do not synchronize on registry here because the registry handles the synchronization for us in registry add registry add bundle Model  addBundle getNamespace getSymbolicName bundleModel getBundleModel bundleModel bundleModel
Tries to create a bundle model from a plugin fragment manifest in the bundle private Namespace get Bundle Model Bundle bundle bail out if system bundle if bundle get Bundle Id 0 return null bail out if the bundle does not have a symbolic name if bundle get Symbolic Name null return null Input Stream is null String manifest Type null boolean is Fragment Internal Platform get Default is Fragment bundle String manifest Name is Fragment FRAGMENT MANIFEST PLUGIN MANIFEST try URL url bundle get Entry manifest Name if url null is url open Stream manifest Type is Fragment Extensions Parser FRAGMENT Extensions Parser PLUGIN catch IO Exception ex is null if is null return null try String message Policy bind parse problems bundle get Location NON NLS 1 Multi Status problems new Multi Status Platform PI RUNTIME Extensions Parser PARSE PROBLEM message null NON NLS 1 Resource Bundle b null try b Resource Translator get Resource Bundle bundle catch Missing Resource Exception e Ignore the exception Extensions Parser parser new Extensions Parser problems Namespace bundle Model parser parse Manifest xml Tracker new Input Source is manifest Type manifest Name b bundle Model set Unique Identifier bundle get Symbolic Name bundle Model set Bundle bundle if is Fragment Bundle hosts Internal Platform get Default get Hosts bundle if hosts null hosts length 0 bundle Model set Host Identifier hosts 0 get Symbolic Name if problems get Severity I Status OK Internal Platform get Default log problems return bundle Model catch Parser Configuration Exception e log Parsing Error bundle e return null catch SAX Exception e log Parsing Error bundle e return null catch IO Exception e log Parsing Error bundle e return null finally try is close catch IO Exception ioe nothing to do  getBundleModel getBundleId getSymbolicName InputStream manifestType isFragment InternalPlatform getDefault isFragment manifestName isFragment FRAGMENT_MANIFEST PLUGIN_MANIFEST getEntry manifestName openStream manifestType isFragment ExtensionsParser ExtensionsParser IOException getLocation MultiStatus MultiStatus PI_RUNTIME ExtensionsParser PARSE_PROBLEM ResourceBundle ResourceTranslator getResourceBundle MissingResourceException ExtensionsParser ExtensionsParser bundleModel parseManifest xmlTracker InputSource manifestType manifestName bundleModel setUniqueIdentifier getSymbolicName bundleModel setBundle isFragment InternalPlatform getDefault getHosts bundleModel setHostIdentifier getSymbolicName getSeverity IStatus InternalPlatform getDefault bundleModel ParserConfigurationException logParsingError SAXException logParsingError IOException logParsingError IOException
private void log Parsing Error Bundle bundle Exception e String message Policy bind parse failed Parsing Manifest bundle get Location NON NLS 1 Internal Platform get Default log new Status I Status ERROR Platform PI RUNTIME 0 message e  logParsingError failedParsingManifest getLocation InternalPlatform getDefault IStatus PI_RUNTIME

Two Extensions are equal if they have the same Id and target the same extension point public boolean equals Object object if object instanceof Extension Extension em Extension object return id em id extension Point em extension Point return false  extensionPoint extensionPoint
Returns the extension point with which this extension is associated return the extension point with which this extension is associated or code null code public String get Extension Point Identifier return extension Point  getExtensionPointIdentifier extensionPoint
Returns the simple identifier of this extension or code null code if this extension does not have an identifier This identifier is specified in the plug in manifest as a non empty string containing no period characters code code and must be unique within the defining plug in return the simple identifier of the extension e g code main code or code null code public String get Simple Identifier return id  getSimpleIdentifier
public String get Unique Identifier return id null null this get Parent Identifier id NON NLS 1  getUniqueIdentifier getParentIdentifier
public String get Parent Identifier return get Namespace  getParentIdentifier getNamespace
public String get Namespace Namespace parent Namespace this get Parent return parent is Fragment parent get Host Identifier parent get Name  getNamespace getParent isFragment getHostIdentifier getName
public I Configuration Element get Configuration Elements synchronization is needed to avoid two threads trying to load the same extension at the same time see bug 36659 synchronized this maybe it was lazily loaded if fully Loaded fully Loaded true Registry Cache Reader reader get Registry get Cache Reader if reader null elements reader load Configuration Elements this sub Elements Cache Offset if elements null elements new I Configuration Element 0 return I Configuration Element elements  IConfigurationElement getConfigurationElements fullyLoaded fullyLoaded RegistryCacheReader getRegistry getCacheReader loadConfigurationElements subElementsCacheOffset IConfigurationElement IConfigurationElement
Set the extension point with which this extension is associated May be code null code public void set Extension Point Identifier String value extension Point value  setExtensionPointIdentifier extensionPoint
Sets the simple identifier of this extension or code null code if this extension does not have an identifier This identifier is specified in the plug in manifest as a non empty string containing no period characters code code and must be unique within the defining plug in param value the simple identifier of the extension e g code main code May be code null code public void set Simple Identifier String value id value  setSimpleIdentifier
Sets the configuration element children of this extension param value the configuration elements in this extension May be code null code public void set Sub Elements I Configuration Element value elements value  setSubElements IConfigurationElement
public String get Label String s get Name if s null return NON NLS 1 return s  getLabel getName
public String to String return get Unique Identifier get Extension Point Identifier NON NLS 1  toString getUniqueIdentifier getExtensionPointIdentifier
void set Sub Elements Cache Offset int value sub Elements Cache Offset value  setSubElementsCacheOffset subElementsCacheOffset
public boolean is Fully Loaded return fully Loaded  isFullyLoaded fullyLoaded
public void set Fully Loaded boolean value fully Loaded value  setFullyLoaded fullyLoaded
deprecated public I Plugin Descriptor get Declaring Plugin Descriptor I Plugin Descriptor result Compatibility Helper get Plugin Descriptor Namespace get Parent get Name if result null Bundle underlying Bundle Platform get Bundle Namespace get Parent get Name if underlying Bundle null Bundle hosts Platform get Hosts underlying Bundle if hosts null result Compatibility Helper get Plugin Descriptor hosts 0 get Symbolic Name return result  IPluginDescriptor getDeclaringPluginDescriptor IPluginDescriptor CompatibilityHelper getPluginDescriptor getParent getName underlyingBundle getBundle getParent getName underlyingBundle getHosts underlyingBundle CompatibilityHelper getPluginDescriptor getSymbolicName
public String get Extension Point Unique Identifier return get Extension Point Identifier  getExtensionPointUniqueIdentifier getExtensionPointIdentifier
Optimization to replace a non localized key with its localized value Avoids having to access resource bundles for further lookups public void set Localized Name String value name value Extension Registry Internal Platform get Default get Registry set Dirty true  setLocalizedName ExtensionRegistry InternalPlatform getDefault getRegistry setDirty

private I Extension Point extension Point public I Extension Point get Extension Point return extension Point  IExtensionPoint extensionPoint IExtensionPoint getExtensionPoint extensionPoint
public void set Extension Point I Extension Point extension Point this extension Point extension Point  setExtensionPoint IExtensionPoint extensionPoint extensionPoint extensionPoint
public int get Kind return kind  getKind
public I Extension get Extension return extension  IExtension getExtension
public void set Extension I Extension extension this extension extension  setExtension IExtension
public void set Kind int kind this kind kind  setKind
public String to String return n t t this extension get Extension Point Unique Identifier this extension get Namespace extension get Simple Identifier get Kind String this get Kind NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4  toString getExtensionPointUniqueIdentifier getNamespace getSimpleIdentifier getKindString getKind
public static String get Kind String int kind switch kind case ADDED return ADDED NON NLS 1 case REMOVED return REMOVED NON NLS 1 return UNKNOWN NON NLS 1  getKindString

public I Extension get Extensions I Extension tmp Extensions extensions if tmp Extensions null return new I Extension 0 return tmp Extensions  IExtension getExtensions IExtension tmpExtensions tmpExtensions IExtension tmpExtensions
public String get Schema Reference return schema Reference null schema Reference replace File separator Char NON NLS 1  getSchemaReference schemaReference schemaReference separatorChar
public String get Schema return schema Reference  getSchema schemaReference
public String get Simple Identifier return id  getSimpleIdentifier
public I Extension get Extension String id if id null return null I Extension tmp Extensions extensions if tmp Extensions null return null for int i 0 i tmp Extensions length i if id equals tmp Extensions i get Unique Identifier return tmp Extensions i return null  IExtension getExtension IExtension tmpExtensions tmpExtensions tmpExtensions tmpExtensions getUniqueIdentifier tmpExtensions
public String get Unique Identifier return get Namespace get Simple Identifier NON NLS 1  getUniqueIdentifier getNamespace getSimpleIdentifier
public void set Extensions I Extension value extensions value  setExtensions IExtension
public void set Schema String value schema Reference value  setSchema schemaReference
public void set Simple Identifier String value id value  setSimpleIdentifier
public String get Namespace Namespace parent Namespace get Parent return parent is Fragment parent get Host Identifier parent get Name  getNamespace getParent isFragment getHostIdentifier getName
public String get Label String s get Name if s null return NON NLS 1 return s  getLabel getName
public String to String return get Unique Identifier  toString getUniqueIdentifier
public I Configuration Element get Configuration Elements I Extension tmp Extensions extensions if tmp Extensions null tmp Extensions length 0 return new I Configuration Element 0 Collection result new Array List for int i 0 i tmp Extensions length i I Configuration Element to Add tmp Extensions i get Configuration Elements for int j 0 j to Add length j result add to Add j return I Configuration Element result to Array new I Configuration Element result size  IConfigurationElement getConfigurationElements IExtension tmpExtensions tmpExtensions tmpExtensions IConfigurationElement ArrayList tmpExtensions IConfigurationElement toAdd tmpExtensions getConfigurationElements toAdd toAdd IConfigurationElement toArray IConfigurationElement
deprecated public I Plugin Descriptor get Declaring Plugin Descriptor return Compatibility Helper get Plugin Descriptor get Namespace  IPluginDescriptor getDeclaringPluginDescriptor CompatibilityHelper getPluginDescriptor getNamespace

an identy rule that forces extension events to be queued private final static I Scheduling Rule EXTENSION EVENT RULE new I Scheduling Rule public boolean contains I Scheduling Rule rule return rule this  ISchedulingRule EXTENSION_EVENT_RULE ISchedulingRule ISchedulingRule
public boolean is Conflicting I Scheduling Rule rule return rule this  isConflicting ISchedulingRule
public Extension Event Dispatcher Job Object listener Infos Map deltas super Registry Change Event Dispatcher Job NON NLS 1 this listener Infos listener Infos this deltas deltas all extension event dispatching jobs use this rule set Rule EXTENSION EVENT RULE  ExtensionEventDispatcherJob listenerInfos RegistryChangeEventDispatcherJob listenerInfos listenerInfos setRule EXTENSION_EVENT_RULE
public I Status run I Progress Monitor monitor Multi Status result new Multi Status Platform PI RUNTIME I Status OK Policy bind plugin event Listener Error null NON NLS 1 for int i 0 i listener Infos length i Listener Info listener Info Listener Info listener Infos i if listener Info filter null deltas contains Key listener Info filter continue try listener Info listener registry Changed new Registry Change Event deltas listener Info filter catch Runtime Exception re String message re get Message null re get Message NON NLS 1 result add new Status I Status ERROR Platform PI RUNTIME I Status OK message re return result  IStatus IProgressMonitor MultiStatus MultiStatus PI_RUNTIME IStatus eventListenerError listenerInfos ListenerInfo listenerInfo ListenerInfo listenerInfos listenerInfo containsKey listenerInfo listenerInfo registryChanged RegistryChangeEvent listenerInfo RuntimeException getMessage getMessage IStatus PI_RUNTIME IStatus
I Registry Change Listener listener public Listener Info I Registry Change Listener listener String filter this listener listener this filter filter  IRegistryChangeListener ListenerInfo IRegistryChangeListener
Used by Listener List to ensure uniqueness public boolean equals Object another return another instanceof Listener Info Listener Info another listener this listener  ListenerList ListenerInfo ListenerInfo
if DEBUG add Registry Change Listener new I Registry Change Listener public void registry Changed I Registry Change Event event System out println event  addRegistryChangeListener IRegistryChangeListener registryChanged IRegistryChangeEvent
public Extension Registry String debug Option Internal Platform get Default get Option OPTION DEBUG EVENTS EXTENSION DEBUG debug Option null false debug Option equals Ignore Case true NON NLS 1 if DEBUG add Registry Change Listener new I Registry Change Listener public void registry Changed I Registry Change Event event System out println event  ExtensionRegistry debugOption InternalPlatform getDefault getOption OPTION_DEBUG_EVENTS_EXTENSION debugOption debugOption equalsIgnoreCase addRegistryChangeListener IRegistryChangeListener registryChanged IRegistryChangeEvent
Adds and resolves all extensions and extension points provided by the plug in p A corresponding I Registry Change Event will be broadcast to all listeners interested on changes in the given plug in p public void add Namespace element access enter Write try is Dirty true basic Add element true fire Registry Change Event finally access exit Write  IRegistryChangeEvent enterWrite isDirty basicAdd fireRegistryChangeEvent exitWrite
public void add Namespace elements access enter Write try is Dirty true for int i 0 i elements length i basic Add elements i true fire Registry Change Event finally access exit Write  enterWrite isDirty basicAdd fireRegistryChangeEvent exitWrite
Utility method to help with array concatenations private Object add Arrays Object a Object b Object result Object Array new Instance a get Class get Component Type Array get Length a Array get Length b System arraycopy a 0 result 0 Array get Length a System arraycopy b 0 result Array get Length a Array get Length b return result  addArrays newInstance getClass getComponentType getLength getLength getLength getLength getLength
private void add Extension I Extension extension I Extension Point ext Point basic Get Extension Point extension get Extension Point Unique Identifier orphan extension if ext Point null are there any other orphan extensions I Extension existing Orphan Extensions I Extension orphan Extensions get extension get Extension Point Unique Identifier if existing Orphan Extensions null just add I Extension new Orphan Extensions new I Extension existing Orphan Extensions length 1 System arraycopy existing Orphan Extensions 0 new Orphan Extensions 0 existing Orphan Extensions length new Orphan Extensions new Orphan Extensions length 1 extension orphan Extensions put extension get Extension Point Unique Identifier new Orphan Extensions else otherwise this is the first one orphan Extensions put extension get Extension Point Unique Identifier new I Extension extension return otherwise link them I Extension new Extensions I Extension existing Extensions ext Point get Extensions if existing Extensions length 0 new Extensions new I Extension extension else new Extensions new I Extension existing Extensions length 1 System arraycopy existing Extensions 0 new Extensions 0 existing Extensions length new Extensions new Extensions length 1 extension link ext Point new Extensions record Change ext Point extension I Extension Delta ADDED  addExtension IExtension IExtensionPoint extPoint basicGetExtensionPoint getExtensionPointUniqueIdentifier extPoint IExtension existingOrphanExtensions IExtension orphanExtensions getExtensionPointUniqueIdentifier existingOrphanExtensions IExtension newOrphanExtensions IExtension existingOrphanExtensions existingOrphanExtensions newOrphanExtensions existingOrphanExtensions newOrphanExtensions newOrphanExtensions orphanExtensions getExtensionPointUniqueIdentifier newOrphanExtensions orphanExtensions getExtensionPointUniqueIdentifier IExtension IExtension newExtensions IExtension existingExtensions extPoint getExtensions existingExtensions newExtensions IExtension newExtensions IExtension existingExtensions existingExtensions newExtensions existingExtensions newExtensions newExtensions extPoint newExtensions recordChange extPoint IExtensionDelta
Looks for existing orphan extensions to connect to the given extension point If none is found there is nothing to do Otherwise link them private void add Extension Point I Extension Point ext Point I Extension existing Extensions I Extension orphan Extensions remove ext Point get Unique Identifier if existing Extensions null return otherwise link them link ext Point existing Extensions record Change ext Point existing Extensions I Extension Delta ADDED  addExtensionPoint IExtensionPoint extPoint IExtension existingExtensions IExtension orphanExtensions extPoint getUniqueIdentifier existingExtensions extPoint existingExtensions recordChange extPoint existingExtensions IExtensionDelta
private void add Extensions And Extension Points Namespace element now add and resolve extensions and extension points I Extension Point ext Points element get Extension Points for int i 0 i ext Points length i this add Extension Point ext Points i I Extension extensions element get Extensions for int i 0 i extensions length i this add Extension extensions i  addExtensionsAndExtensionPoints IExtensionPoint extPoints getExtensionPoints extPoints addExtensionPoint extPoints IExtension getExtensions addExtension
private void add Fragment To String fragment Name String master Name Set fragment Names Set this all Fragment Names get master Name if fragment Names null all Fragment Names put master Name fragment Names new Hash Set fragment Names add fragment Name  addFragmentTo fragmentName masterName fragmentNames allFragmentNames masterName fragmentNames allFragmentNames masterName fragmentNames HashSet fragmentNames fragmentName
see org eclipse core runtime I Extension Registry add Registry Change Listener org eclipse core runtime I Registry Change Listener public void add Registry Change Listener I Registry Change Listener listener this is just a convenience API no need to do any sync ing here add Registry Change Listener listener null  IExtensionRegistry addRegistryChangeListener IRegistryChangeListener addRegistryChangeListener IRegistryChangeListener addRegistryChangeListener
public void add Registry Change Listener I Registry Change Listener listener String filter synchronized listeners listeners add new Listener Info listener filter  addRegistryChangeListener IRegistryChangeListener ListenerInfo
void basic Add Namespace element boolean link ignore anonymous namespaces if element get Unique Identifier null return if elements contains Key element get Unique Identifier this could be caused by a bug on removal throw new Illegal Argument Exception Element already added element get Unique Identifier NON NLS 1 elements put element get Unique Identifier element element set Parent this if link return if element is Fragment add Fragment To element get Unique Identifier element get Host Identifier if the master is not present yet don t add anything if elements contains Key element get Host Identifier return else Collection fragment Names get Fragment Names element get Unique Identifier for Iterator iter fragment Names iterator iter has Next Namespace fragment Namespace elements get iter next add Extensions And Extension Points fragment add Extensions And Extension Points element  basicAdd getUniqueIdentifier containsKey getUniqueIdentifier IllegalArgumentException getUniqueIdentifier getUniqueIdentifier setParent isFragment addFragmentTo getUniqueIdentifier getHostIdentifier containsKey getHostIdentifier fragmentNames getFragmentNames getUniqueIdentifier fragmentNames hasNext addExtensionsAndExtensionPoints addExtensionsAndExtensionPoints
private I Extension Point basic Get Extension Point String xpt Unique Id int lastdot xpt Unique Id last Index Of if lastdot 1 return null return basic Get Extension Point xpt Unique Id substring 0 lastdot xpt Unique Id substring lastdot 1  IExtensionPoint basicGetExtensionPoint xptUniqueId xptUniqueId lastIndexOf basicGetExtensionPoint xptUniqueId xptUniqueId
private I Extension Point basic Get Extension Point String element Name String xpt Namespace element Namespace elements get element Name if element null return null I Extension Point ext Point element get Extension Point xpt if ext Point null return ext Point could not find it try orphan fragments Collection fragment Names get Fragment Names element Name for Iterator iter fragment Names iterator iter has Next ext Point Namespace elements get iter next get Extension Point xpt if ext Point null return ext Point return null  IExtensionPoint basicGetExtensionPoint elementName elementName IExtensionPoint extPoint getExtensionPoint extPoint extPoint fragmentNames getFragmentNames elementName fragmentNames hasNext extPoint getExtensionPoint extPoint extPoint
private I Extension Point basic Get Extension Points Array List extension Points new Array List for Iterator iter elements values iterator iter has Next Namespace model Namespace iter next I Extension Point to Add model get Extension Points for int i 0 i to Add length i extension Points add to Add i return I Extension Point extension Points to Array new I Extension Point extension Points size  IExtensionPoint basicGetExtensionPoints ArrayList extensionPoints ArrayList hasNext IExtensionPoint toAdd getExtensionPoints toAdd extensionPoints toAdd IExtensionPoint extensionPoints toArray IExtensionPoint extensionPoints
private I Extension Point basic Get Extension Points String element Name Namespace element Namespace elements get element Name if element null return new I Extension Point 0 Collection fragment Names get Fragment Names element Name I Extension Point all Extension Points element get Extension Points for Iterator iter fragment Names iterator iter has Next Namespace fragment Namespace elements get iter next all Extension Points I Extension Point add Arrays all Extension Points fragment get Extension Points return all Extension Points  IExtensionPoint basicGetExtensionPoints elementName elementName IExtensionPoint fragmentNames getFragmentNames elementName IExtensionPoint allExtensionPoints getExtensionPoints fragmentNames hasNext allExtensionPoints IExtensionPoint addArrays allExtensionPoints getExtensionPoints allExtensionPoints
private I Extension basic Get Extensions String element Name Namespace element Namespace elements get element Name if element null return new I Extension 0 Collection fragment Names get Fragment Names element Name I Extension all Extensions element get Extensions for Iterator iter fragment Names iterator iter has Next Namespace fragment Namespace elements get iter next all Extensions I Extension add Arrays all Extensions fragment get Extensions return all Extensions  IExtension basicGetExtensions elementName elementName IExtension fragmentNames getFragmentNames elementName IExtension allExtensions getExtensions fragmentNames hasNext allExtensions IExtension addArrays allExtensions getExtensions allExtensions
Namespace basic Get Namespace String element Id return Namespace elements get element Id  basicGetNamespace elementId elementId
String basic Get Namespaces return String elements key Set to Array new String elements size  basicGetNamespaces keySet toArray
private boolean basic Remove String element Name long bundle Id ignore anonymous bundles if element Name null return false Namespace element Namespace elements get element Name if element null if DEBUG System out println Element unknown element Name not removed NON NLS 1 NON NLS 2 return false if element get Id bundle Id return false is Dirty true if element is Fragment if the master is not present yet bail out if elements contains Key element get Host Identifier remove Fragment From element Name element get Host Identifier elements remove element Name return true else Collection fragment Names get Fragment Names element get Unique Identifier for Iterator iter fragment Names iterator iter has Next Namespace fragment Namespace elements get iter next remove Extensions And Extension Points fragment remove Extensions And Extension Points element remove link between master and fragment remove Fragment From element Name element get Host Identifier remove it in the end elements remove element Name ensure we free the removed namespace from the registry element set Parent null return true  basicRemove elementName bundleId elementName elementName elementName getId bundleId isDirty isFragment containsKey getHostIdentifier removeFragmentFrom elementName getHostIdentifier elementName fragmentNames getFragmentNames getUniqueIdentifier fragmentNames hasNext removeExtensionsAndExtensionPoints removeExtensionsAndExtensionPoints removeFragmentFrom elementName getHostIdentifier elementName setParent
allow other objects in the registry to use the same lock void enter Read access enter Read  enterRead enterRead
allow other objects in the registry to use the same lock void exit Read access exit Read  exitRead exitRead
Broadcasts asynchronously the event to all interested parties private void fire Registry Change Event if there is nothing to say just bail out if deltas is Empty listeners is Empty return for thread safety create tmp collections Object tmp Listeners listeners get Listeners Map tmp Deltas new Hash Map this deltas the deltas have been saved for notification we can clear them now deltas clear do the notification asynchronously new Extension Event Dispatcher Job tmp Listeners tmp Deltas schedule  fireRegistryChangeEvent isEmpty isEmpty tmpListeners getListeners tmpDeltas HashMap ExtensionEventDispatcherJob tmpListeners tmpDeltas
Registry Cache Reader get Cache Reader return reader  RegistryCacheReader getCacheReader
public I Configuration Element get Configuration Elements For String extension Point Id this is just a convenience API no need to do any sync ing here int lastdot extension Point Id last Index Of if lastdot 1 return new I Configuration Element 0 return get Configuration Elements For extension Point Id substring 0 lastdot extension Point Id substring lastdot 1  IConfigurationElement getConfigurationElementsFor extensionPointId extensionPointId lastIndexOf IConfigurationElement getConfigurationElementsFor extensionPointId extensionPointId
public I Configuration Element get Configuration Elements For String plugin Id String extension Point Simple Id this is just a convenience API no need to do any sync ing here I Extension Point ext Point this get Extension Point plugin Id extension Point Simple Id if ext Point null return new I Configuration Element 0 return ext Point get Configuration Elements  IConfigurationElement getConfigurationElementsFor pluginId extensionPointSimpleId IExtensionPoint extPoint getExtensionPoint pluginId extensionPointSimpleId extPoint IConfigurationElement extPoint getConfigurationElements
public I Configuration Element get Configuration Elements For String plugin Id String extension Point Name String extension Id this is just a convenience API no need to do any sync ing here I Extension extension this get Extension plugin Id extension Point Name extension Id if extension null return new I Configuration Element 0 return extension get Configuration Elements  IConfigurationElement getConfigurationElementsFor pluginId extensionPointName extensionId IExtension getExtension pluginId extensionPointName extensionId IConfigurationElement getConfigurationElements
private Registry Delta get Delta String element Name is there a delta for the plug in Registry Delta existing Delta Registry Delta deltas get element Name if existing Delta null return existing Delta if not create one Registry Delta delta new Registry Delta element Name deltas put element Name delta return delta  RegistryDelta getDelta elementName RegistryDelta existingDelta RegistryDelta elementName existingDelta existingDelta RegistryDelta RegistryDelta elementName elementName
public I Extension get Extension String extension Id int lastdot extension Id last Index Of if lastdot 1 return null String namespace extension Id substring 0 lastdot sync ing while retrieving namespace is enough Namespace element get Namespace namespace return element get Extension extension Id substring lastdot 1  IExtension getExtension extensionId extensionId lastIndexOf extensionId getNamespace getExtension extensionId
public I Extension get Extension String extension Point Id String extension Id this is just a convenience API no need to do any sync ing here int lastdot extension Point Id last Index Of if lastdot 1 return null return get Extension extension Point Id substring 0 lastdot extension Point Id substring lastdot 1 extension Id  IExtension getExtension extensionPointId extensionId extensionPointId lastIndexOf getExtension extensionPointId extensionPointId extensionId
public I Extension get Extension String plugin Id String extension Point Name String extension Id this is just a convenience API no need to do any sync ing here I Extension Point ext Point get Extension Point plugin Id extension Point Name if ext Point null return ext Point get Extension extension Id return null  IExtension getExtension pluginId extensionPointName extensionId IExtensionPoint extPoint getExtensionPoint pluginId extensionPointName extPoint extPoint getExtension extensionId
public I Extension Point get Extension Point String xpt Unique Id this is just a convenience API no need to do any sync ing here int lastdot xpt Unique Id last Index Of if lastdot 1 return null return get Extension Point xpt Unique Id substring 0 lastdot xpt Unique Id substring lastdot 1  IExtensionPoint getExtensionPoint xptUniqueId xptUniqueId lastIndexOf getExtensionPoint xptUniqueId xptUniqueId
public I Extension Point get Extension Point String element Name String xpt access enter Read try return basic Get Extension Point element Name xpt finally access exit Read  IExtensionPoint getExtensionPoint elementName enterRead basicGetExtensionPoint elementName exitRead
public I Extension Point get Extension Points access enter Read try return basic Get Extension Points finally access exit Read  IExtensionPoint getExtensionPoints enterRead basicGetExtensionPoints exitRead
public I Extension Point get Extension Points String element Name access enter Read try return basic Get Extension Points element Name finally access exit Read  IExtensionPoint getExtensionPoints elementName enterRead basicGetExtensionPoints elementName exitRead
public I Extension get Extensions String element Name access enter Read try return basic Get Extensions element Name finally access exit Read  IExtension getExtensions elementName enterRead basicGetExtensions elementName exitRead
Returns a collection of fragments for a master element private Collection get Fragment Names String master Name Collection fragment Names Collection all Fragment Names get master Name return fragment Names null Collections EMPTY SET fragment Names  getFragmentNames masterName fragmentNames allFragmentNames masterName fragmentNames EMPTY_SET fragmentNames
public to allow access from tests public Namespace get Namespace String element Id access enter Read try return basic Get Namespace element Id finally access exit Read  getNamespace elementId enterRead basicGetNamespace elementId exitRead
public String get Namespaces access enter Read try return basic Get Namespaces finally access exit Read  getNamespaces enterRead basicGetNamespaces exitRead
Extension Registry get Registry return this  ExtensionRegistry getRegistry
public boolean is Dirty return is Dirty  isDirty isDirty
private void link I Extension Point ext Point I Extension extensions Extension Point xpm Extension Point ext Point if extensions null extensions length 0 xpm set Extensions null return xpm set Extensions extensions  IExtensionPoint extPoint IExtension ExtensionPoint ExtensionPoint extPoint setExtensions setExtensions
private void record Change I Extension Point ext Point I Extension extension int kind avoid computing deltas when there are no listeners if listeners is Empty return Extension Delta extension Delta new Extension Delta extension Delta set Extension extension extension Delta set Extension Point ext Point extension Delta set Kind kind get Delta ext Point get Namespace add Extension Delta extension Delta  recordChange IExtensionPoint extPoint IExtension isEmpty ExtensionDelta extensionDelta ExtensionDelta extensionDelta setExtension extensionDelta setExtensionPoint extPoint extensionDelta setKind getDelta extPoint getNamespace addExtensionDelta extensionDelta
private void record Change I Extension Point ext Point I Extension extensions int kind if listeners is Empty return if extensions length 0 return Registry Delta plugin Delta get Delta ext Point get Namespace for int i 0 i extensions length i Extension Delta extension Delta new Extension Delta extension Delta set Extension extensions i extension Delta set Extension Point ext Point extension Delta set Kind kind plugin Delta add Extension Delta extension Delta  recordChange IExtensionPoint extPoint IExtension isEmpty RegistryDelta pluginDelta getDelta extPoint getNamespace ExtensionDelta extensionDelta ExtensionDelta extensionDelta setExtension extensionDelta setExtensionPoint extPoint extensionDelta setKind pluginDelta addExtensionDelta extensionDelta
Unresolves and removes all extensions and extension points provided by the plug in p A corresponding I Registry Change Event will be broadcast to all listeners interested on changes in the given plug in p public boolean remove String element Name long bundle Id access enter Write try if basic Remove element Name bundle Id return false fire Registry Change Event return true finally access exit Write  IRegistryChangeEvent elementName bundleId enterWrite basicRemove elementName bundleId fireRegistryChangeEvent exitWrite
private void remove Extension I Extension extension I Extension Point ext Point basic Get Extension Point extension get Extension Point Unique Identifier if ext Point null not found maybe it was an orphan extension I Extension existing Orphan Extensions I Extension orphan Extensions get extension get Extension Point Unique Identifier if existing Orphan Extensions null nope this extension is unknown return yes so just remove it from the orphans list I Extension new Orphan Extensions new I Extension existing Orphan Extensions length 1 for int i 0 j 0 i existing Orphan Extensions length i if extension existing Orphan Extensions i new Orphan Extensions j existing Orphan Extensions i orphan Extensions put extension get Extension Point Unique Identifier new Orphan Extensions return otherwise unlink the extension from the extension point I Extension existing Extensions ext Point get Extensions I Extension new Extensions null if existing Extensions length 1 new Extensions new I Extension existing Extensions length 1 for int i 0 j 0 i existing Extensions length i if existing Extensions i extension new Extensions j existing Extensions i link ext Point new Extensions record Change ext Point extension I Extension Delta REMOVED  removeExtension IExtension IExtensionPoint extPoint basicGetExtensionPoint getExtensionPointUniqueIdentifier extPoint IExtension existingOrphanExtensions IExtension orphanExtensions getExtensionPointUniqueIdentifier existingOrphanExtensions IExtension newOrphanExtensions IExtension existingOrphanExtensions existingOrphanExtensions existingOrphanExtensions newOrphanExtensions existingOrphanExtensions orphanExtensions getExtensionPointUniqueIdentifier newOrphanExtensions IExtension existingExtensions extPoint getExtensions IExtension newExtensions existingExtensions newExtensions IExtension existingExtensions existingExtensions existingExtensions newExtensions existingExtensions extPoint newExtensions recordChange extPoint IExtensionDelta
private void remove Extension Point I Extension Point ext Point I Extension existing Extensions ext Point get Extensions if existing Extensions length 0 return orphan Extensions put ext Point get Unique Identifier existing Extensions link ext Point null record Change ext Point existing Extensions I Extension Delta REMOVED  removeExtensionPoint IExtensionPoint extPoint IExtension existingExtensions extPoint getExtensions existingExtensions orphanExtensions extPoint getUniqueIdentifier existingExtensions extPoint recordChange extPoint existingExtensions IExtensionDelta
private void remove Extensions And Extension Points Namespace element remove extensions I Extension extensions element get Extensions for int i 0 i extensions length i this remove Extension extensions i remove extension points I Extension Point ext Points element get Extension Points for int i 0 i ext Points length i this remove Extension Point ext Points i  removeExtensionsAndExtensionPoints IExtension getExtensions removeExtension IExtensionPoint extPoints getExtensionPoints extPoints removeExtensionPoint extPoints
private void remove Fragment From String fragment Name String master Name Set fragment Names Set this all Fragment Names get master Name if fragment Names null return fragment Names remove fragment Name if fragment Names is Empty all Fragment Names remove master Name  removeFragmentFrom fragmentName masterName fragmentNames allFragmentNames masterName fragmentNames fragmentNames fragmentName fragmentNames isEmpty allFragmentNames masterName
public void remove Registry Change Listener I Registry Change Listener listener synchronized listeners listeners remove new Listener Info listener null  removeRegistryChangeListener IRegistryChangeListener ListenerInfo
void set Cache Reader Registry Cache Reader value reader value  setCacheReader RegistryCacheReader
void set Dirty boolean value is Dirty value  setDirty isDirty

Initialize the list of renamed extension point ids private static void initialize Extension Point Map Map map new Hash Map 13 TODO should this be hard coded can we use a properties file map put org eclipse ui marker Image Provider org eclipse ui ide marker Image Provider NON NLS 1 NON NLS 2 map put org eclipse ui marker Help org eclipse ui ide marker Help NON NLS 1 NON NLS 2 map put org eclipse ui marker Image Providers org eclipse ui ide marker Image Providers NON NLS 1 NON NLS 2 map put org eclipse ui marker Resolution org eclipse ui ide marker Resolution NON NLS 1 NON NLS 2 map put org eclipse ui project Nature Images org eclipse ui ide project Nature Images NON NLS 1 NON NLS 2 map put org eclipse ui resource Filters org eclipse ui ide resource Filters NON NLS 1 NON NLS 2 map put org eclipse ui marker Updaters org eclipse ui editors marker Updaters NON NLS 1 NON NLS 2 map put org eclipse ui document Providers org eclipse ui editors document Providers NON NLS 1 NON NLS 2 map put org eclipse ui workbench texteditor marker Annotation Specification org eclipse ui editors marker Annotation Specification NON NLS 1 NON NLS 2 map put org eclipse help browser org eclipse help base browser NON NLS 1 NON NLS 2 map put org eclipse help lucene Analyzer org eclipse help base lucene Analyzer NON NLS 1 NON NLS 2 map put org eclipse help webapp org eclipse help base webapp NON NLS 1 NON NLS 2 map put org eclipse help support org eclipse ui help Support NON NLS 1 NON NLS 2 extension Point Map map  initializeExtensionPointMap HashMap markerImageProvider markerImageProvider markerHelp markerHelp markerImageProviders markerImageProviders markerResolution markerResolution projectNatureImages projectNatureImages resourceFilters resourceFilters markerUpdaters markerUpdaters documentProviders documentProviders markerAnnotationSpecification markerAnnotationSpecification luceneAnalyzer luceneAnalyzer helpSupport extensionPointMap
private Locator locator null public Extensions Parser Multi Status status super this status status  ExtensionsParser MultiStatus
see Content Handler set Document Locator public void set Document Locator Locator locator this locator locator  ContentHandler setDocumentLocator setDocumentLocator
public void characters char ch int start int length int state Integer state Stack peek int Value if state CONFIGURATION ELEMENT STATE return if state CONFIGURATION ELEMENT STATE Accept character data within an element is when it is part of a configuration element i e an element within an EXTENSION element Configuration Element current Config Element Configuration Element object Stack peek String value new String ch start length String old Value current Config Element get Value As Is if old Value null if value trim length 0 current Config Element set Value translate value else current Config Element set Value old Value value  stateStack intValue CONFIGURATION_ELEMENT_STATE CONFIGURATION_ELEMENT_STATE ConfigurationElement currentConfigElement ConfigurationElement objectStack oldValue currentConfigElement getValueAsIs oldValue currentConfigElement setValue currentConfigElement setValue oldValue
public void end Document do nothing  endDocument
public void end Element String uri String element Name String q Name switch Integer state Stack peek int Value case IGNORED ELEMENT STATE state Stack pop break case INITIAL STATE shouldn t get here internal Error Policy bind parse internal Stack element Name NON NLS 1 break case BUNDLE STATE if element Name equals manifest Type state Stack pop Namespace root Namespace object Stack peek Put the extension points into this bundle model Array List extension Points scratch Vectors EXTENSION POINT INDEX if extension Points size 0 root set Extension Points Extension Point extension Points to Array new Extension Point extension Points size scratch Vectors EXTENSION POINT INDEX clear Put the extensions into this bundle model too Array List extensions scratch Vectors EXTENSION INDEX if extensions size 0 root set Extensions fix Renamed Extension Points Extension extensions to Array new Extension extensions size scratch Vectors EXTENSION INDEX clear break case BUNDLE EXTENSION POINT STATE if element Name equals EXTENSION POINT state Stack pop break case BUNDLE EXTENSION STATE if element Name equals EXTENSION state Stack pop Finish up extension object Extension current Extension Extension object Stack pop Namespace parent Namespace object Stack peek current Extension set Parent parent scratch Vectors EXTENSION INDEX add current Extension break case CONFIGURATION ELEMENT STATE We don t care what the element name was state Stack pop Now finish up the configuration element object Configuration Element current Config Element Configuration Element object Stack pop String value current Config Element get Value As Is if value null current Config Element set Value value trim Object parent object Stack peek current Config Element set Parent Registry Model Object parent if Integer state Stack peek int Value BUNDLE EXTENSION STATE Want to add this configuration element to the subelements of an extension I Configuration Element old Values Extension parent get Configuration Elements int size old Values null 0 old Values length I Configuration Element new Values new I Configuration Element size 1 for int i 0 i size i new Values i old Values i new Values size current Config Element Extension parent set Sub Elements new Values else I Configuration Element old Values Configuration Element parent get Children int size old Values null 0 old Values length I Configuration Element new Values new I Configuration Element size 1 for int i 0 i size i new Values i old Values i new Values size current Config Element Configuration Element parent set Children new Values break  endElement elementName qName stateStack intValue IGNORED_ELEMENT_STATE stateStack INITIAL_STATE internalError internalStack elementName BUNDLE_STATE elementName manifestType stateStack objectStack ArrayList extensionPoints scratchVectors EXTENSION_POINT_INDEX extensionPoints setExtensionPoints ExtensionPoint extensionPoints toArray ExtensionPoint extensionPoints scratchVectors EXTENSION_POINT_INDEX ArrayList scratchVectors EXTENSION_INDEX setExtensions fixRenamedExtensionPoints toArray scratchVectors EXTENSION_INDEX BUNDLE_EXTENSION_POINT_STATE elementName EXTENSION_POINT stateStack BUNDLE_EXTENSION_STATE elementName stateStack currentExtension objectStack objectStack currentExtension setParent scratchVectors EXTENSION_INDEX currentExtension CONFIGURATION_ELEMENT_STATE stateStack ConfigurationElement currentConfigElement ConfigurationElement objectStack currentConfigElement getValueAsIs currentConfigElement setValue objectStack currentConfigElement setParent RegistryModelObject stateStack intValue BUNDLE_EXTENSION_STATE IConfigurationElement oldValues getConfigurationElements oldValues oldValues IConfigurationElement newValues IConfigurationElement newValues oldValues newValues currentConfigElement setSubElements newValues IConfigurationElement oldValues ConfigurationElement getChildren oldValues oldValues IConfigurationElement newValues IConfigurationElement newValues oldValues newValues currentConfigElement ConfigurationElement setChildren newValues
public void error SAX Parse Exception ex log Status ex  SAXParseException logStatus
public void fatal Error SAX Parse Exception ex throws SAX Exception log Status ex throw ex  fatalError SAXParseException SAXException logStatus
private void handle Extension Point State String element Name We ignore all elements under extension points if there are any state Stack push new Integer IGNORED ELEMENT STATE unknown Element EXTENSION POINT element Name  handleExtensionPointState elementName stateStack IGNORED_ELEMENT_STATE unknownElement EXTENSION_POINT elementName
private void handle Extension State String element Name Attributes attributes You need to change the state here even though we will be executing the same code for Extension State and Configuration Element State We ignore the name of the element for Configuration Elements When we are wrapping up we will want to add each configuration element object to the sub Elements vector of its parent configuration element object However the first configuration element object we created the last one we pop off the stack will need to be added to a vector in the extension object called  configuration state Stack push new Integer CONFIGURATION ELEMENT STATE create a new Configuration Element and push it onto the object stack Configuration Element current Configuration Element new Configuration Element object Stack push current Configuration Element current Configuration Element set Name element Name Processing the attributes of a configuration element involves creating a new configuration property for each attribute and populating the configuration property with the name value pair of the attribute Note there will be one configuration property for each attribute parse Configuration Element Attributes attributes  handleExtensionState elementName ExtensionState ConfigurationElementState ConfigurationElements subElements _configuration stateStack CONFIGURATION_ELEMENT_STATE ConfigurationElement currentConfigurationElement ConfigurationElement objectStack currentConfigurationElement currentConfigurationElement setName elementName parseConfigurationElementAttributes
private void handle Initial State String element Name Attributes attributes if element Name equals manifest Type state Stack push new Integer IGNORED ELEMENT STATE internal Error Policy bind parse unknown Top Element element Name NON NLS 1 return new manifests should have the plugin not fragment element empty in compatibility mode any extraneous elements will be silently ignored compatibility Mode element Name equals PLUGIN attributes get Length 0 state Stack push new Integer BUNDLE STATE Namespace current new Namespace object Stack push current  handleInitialState elementName elementName manifestType stateStack IGNORED_ELEMENT_STATE internalError unknownTopElement elementName compatibilityMode elementName getLength stateStack BUNDLE_STATE objectStack
convert a list of comma separated tokens into an array protected static String get Array From List String line if line null line trim length 0 return null Vector list new Vector String Tokenizer tokens new String Tokenizer line NON NLS 1 while tokens has More Tokens String token tokens next Token trim if token length 0 list add Element token return list is Empty null String list to Array new String 0  getArrayFromList StringTokenizer StringTokenizer hasMoreTokens nextToken addElement isEmpty toArray
private void handle Bundle State String element Name Attributes attributes if element Name equals EXTENSION POINT state Stack push new Integer BUNDLE EXTENSION POINT STATE parse Extension Point Attributes attributes return if element Name equals EXTENSION state Stack push new Integer BUNDLE EXTENSION STATE parse Extension Attributes attributes return If we get to this point the element name is one we don t currently accept Set the state to indicate that this element will be ignored state Stack push new Integer IGNORED ELEMENT STATE if compatibility Mode unknown Element manifest Type element Name  handleBundleState elementName elementName EXTENSION_POINT stateStack BUNDLE_EXTENSION_POINT_STATE parseExtensionPointAttributes elementName stateStack BUNDLE_EXTENSION_STATE parseExtensionAttributes stateStack IGNORED_ELEMENT_STATE compatibilityMode unknownElement manifestType elementName
private void log Status SAX Parse Exception ex String name ex get System Id if name null name location Name if name null name NON NLS 1 else name name substring 1 name last Index Of NON NLS 1 String msg if name equals NON NLS 1 msg Policy bind parse error ex get Message NON NLS 1 else msg Policy bind parse error Name Line Column NON NLS 1 new String name Integer to String ex get Line Number Integer to String ex get Column Number ex get Message error new Status I Status WARNING Platform PI RUNTIME PARSE PROBLEM msg ex  logStatus SAXParseException getSystemId locationName lastIndexOf getMessage errorNameLineColumn toString getLineNumber toString getColumnNumber getMessage IStatus PI_RUNTIME PARSE_PROBLEM
public Namespace parse Manifest Service Tracker factory Tracker Input Source in String manifest Type String manifest Name Resource Bundle bundle throws Parser Configuration Exception SAX Exception IO Exception long start 0 this resources bundle if Internal Platform DEBUG start System current Time Millis SAX Parser Factory factory SAX Parser Factory factory Tracker get Service if factory null throw new SAX Exception Policy bind parse xml Parser Not Available NON NLS 1 try if manifest Type null throw new Null Pointer Exception if manifest Type equals PLUGIN manifest Type equals FRAGMENT throw new Illegal Argument Exception Invalid manifest type manifest Type NON NLS 1 this manifest Type manifest Type location Name in get System Id if location Name null location Name manifest Name factory set Namespace Aware true try factory set Feature http xml org sax features string interning true NON NLS 1 catch SAX Exception se ignore we can still operate without string interning factory set Validating false factory newSAX Parser parse in this return Namespace object Stack pop finally if Internal Platform DEBUG cumulative Time cumulative Time System current Time Millis start Internal Platform get Default set Option org eclipse core runtime registry parsing timing value Long to String cumulative Time NON NLS 1  parseManifest ServiceTracker factoryTracker InputSource manifestType manifestName ResourceBundle ParserConfigurationException SAXException IOException InternalPlatform currentTimeMillis SAXParserFactory SAXParserFactory factoryTracker getService SAXException xmlParserNotAvailable manifestType NullPointerException manifestType manifestType IllegalArgumentException manifestType manifestType manifestType locationName getSystemId locationName locationName manifestName setNamespaceAware setFeature SAXException setValidating newSAXParser objectStack InternalPlatform cumulativeTime cumulativeTime currentTimeMillis InternalPlatform getDefault setOption toString cumulativeTime
private void parse Configuration Element Attributes Attributes attributes Configuration Element parent Configuration Element Configuration Element object Stack peek Vector prop Vector null process attributes int len attributes null attributes get Length 0 if len 0 return prop Vector new Vector for int i 0 i len i String attr Name attributes get Local Name i String attr Value attributes get Value i Configuration Property current Configuration Property new Configuration Property current Configuration Property set Name attr Name current Configuration Property set Value translate attr Value prop Vector add Element current Configuration Property parent Configuration Element set Properties Configuration Property prop Vector to Array new Configuration Property prop Vector size prop Vector null  parseConfigurationElementAttributes ConfigurationElement parentConfigurationElement ConfigurationElement objectStack propVector getLength propVector attrName getLocalName attrValue getValue ConfigurationProperty currentConfigurationProperty ConfigurationProperty currentConfigurationProperty setName attrName currentConfigurationProperty setValue attrValue propVector addElement currentConfigurationProperty parentConfigurationElement setProperties ConfigurationProperty propVector toArray ConfigurationProperty propVector propVector
private void parse Extension Attributes Attributes attributes Namespace parent Namespace object Stack peek Extension current Extension new Extension object Stack push current Extension Process Attributes int len attributes null attributes get Length 0 for int i 0 i len i String attr Name attributes get Local Name i String attr Value attributes get Value i trim if attr Name equals EXTENSION NAME current Extension set Name translate attr Value else if attr Name equals EXTENSION ID current Extension set Simple Identifier attr Value else if attr Name equals EXTENSION TARGET check if point is specified as a simple or qualified name String target Name if attr Value last Index Of 1 String base Id parent get Name target Name base Id attr Value NON NLS 1 else target Name attr Value current Extension set Extension Point Identifier target Name else unknown Attribute EXTENSION attr Name NON NLS 1 if current Extension get Extension Point Unique Identifier null missing Attribute EXTENSION TARGET EXTENSION state Stack pop state Stack push new Integer IGNORED ELEMENT STATE object Stack pop return  parseExtensionAttributes objectStack currentExtension objectStack currentExtension getLength attrName getLocalName attrValue getValue attrName EXTENSION_NAME currentExtension setName attrValue attrName EXTENSION_ID currentExtension setSimpleIdentifier attrValue attrName EXTENSION_TARGET targetName attrValue lastIndexOf baseId getName targetName baseId attrValue targetName attrValue currentExtension setExtensionPointIdentifier targetName unknownAttribute attrName currentExtension getExtensionPointUniqueIdentifier missingAttribute EXTENSION_TARGET stateStack stateStack IGNORED_ELEMENT_STATE objectStack
private void missing Attribute String attribute String element if locator null internal Error Policy bind parse missing Attribute new String attribute element NON NLS 1 else internal Error Policy bind parse missing Attribute Line new String attribute element Integer to String locator get Line Number NON NLS 1  missingAttribute internalError missingAttribute internalError missingAttributeLine toString getLineNumber
private void unknown Attribute String attribute String element if locator null internal Error Policy bind parse unknown Attribute new String attribute element NON NLS 1 else internal Error Policy bind parse unknown Attribute Line new String attribute element Integer to String locator get Line Number NON NLS 1  unknownAttribute internalError unknownAttribute internalError unknownAttributeLine toString getLineNumber
private void unknown Element String element String parent if locator null internal Error Policy bind parse unknown Attribute new String parent element NON NLS 1 else internal Error Policy bind parse unknown Attribute Line new String parent element Integer to String locator get Line Number NON NLS 1  unknownElement internalError unknownAttribute internalError unknownAttributeLine toString getLineNumber
private void parse Extension Point Attributes Attributes attributes Extension Point current Ext Point new Extension Point Process Attributes int len attributes null attributes get Length 0 for int i 0 i len i String attr Name attributes get Local Name i String attr Value attributes get Value i trim if attr Name equals EXTENSION POINT NAME current Ext Point set Name translate attr Value else if attr Name equals EXTENSION POINT ID current Ext Point set Simple Identifier attr Value else if attr Name equals EXTENSION POINT SCHEMA current Ext Point set Schema attr Value else unknown Attribute EXTENSION POINT attr Name NON NLS 1 if current Ext Point get Simple Identifier null current Ext Point get Name null String attribute current Ext Point get Simple Identifier null EXTENSION POINT ID EXTENSION POINT NAME missing Attribute attribute EXTENSION POINT state Stack pop state Stack push new Integer IGNORED ELEMENT STATE return current Ext Point contains a pointer to the parent bundle model Namespace root Namespace object Stack peek current Ext Point set Parent root Now populate the the vector just below us on the object Stack with this extension point scratch Vectors EXTENSION POINT INDEX add current Ext Point  parseExtensionPointAttributes ExtensionPoint currentExtPoint ExtensionPoint getLength attrName getLocalName attrValue getValue attrName EXTENSION_POINT_NAME currentExtPoint setName attrValue attrName EXTENSION_POINT_ID currentExtPoint setSimpleIdentifier attrValue attrName EXTENSION_POINT_SCHEMA currentExtPoint setSchema attrValue unknownAttribute EXTENSION_POINT attrName currentExtPoint getSimpleIdentifier currentExtPoint getName currentExtPoint getSimpleIdentifier EXTENSION_POINT_ID EXTENSION_POINT_NAME missingAttribute EXTENSION_POINT stateStack stateStack IGNORED_ELEMENT_STATE currentExtPoint objectStack currentExtPoint setParent objectStack scratchVectors EXTENSION_POINT_INDEX currentExtPoint
public void start Document state Stack push new Integer INITIAL STATE for int i 0 i LAST INDEX i scratch Vectors i new Array List  startDocument stateStack INITIAL_STATE LAST_INDEX scratchVectors ArrayList
public void start Element String uri String element Name String q Name Attributes attributes switch Integer state Stack peek int Value case INITIAL STATE handle Initial State element Name attributes break case BUNDLE STATE handle Bundle State element Name attributes break case BUNDLE EXTENSION POINT STATE handle Extension Point State element Name break case BUNDLE EXTENSION STATE case CONFIGURATION ELEMENT STATE handle Extension State element Name attributes break default state Stack push new Integer IGNORED ELEMENT STATE if compatibility Mode internal Error Policy bind parse unknown Top Element element Name NON NLS 1  startElement elementName qName stateStack intValue INITIAL_STATE handleInitialState elementName BUNDLE_STATE handleBundleState elementName BUNDLE_EXTENSION_POINT_STATE handleExtensionPointState elementName BUNDLE_EXTENSION_STATE CONFIGURATION_ELEMENT_STATE handleExtensionState elementName stateStack IGNORED_ELEMENT_STATE compatibilityMode internalError unknownTopElement elementName
public void warning SAX Parse Exception ex log Status ex  SAXParseException logStatus
private void internal Error String message error new Status I Status WARNING Platform PI RUNTIME PARSE PROBLEM message null  internalError IStatus PI_RUNTIME PARSE_PROBLEM
public void processing Instruction String target String data throws SAX Exception Since 3 0 a processing instruction of the form eclipse version 3 0 at the start of the manifest file is used to indicate the plug in manifest schema version in effect Pre 3 0 i e 2 1 plug in manifest files do not have one of these and this is how we can distinguish the manifest of a pre 3 0 plug in from a post 3 0 one for compatibility tranformations if target equals Ignore Case eclipse NON NLS 1 just the presence of this processing instruction indicates that this plug in is at least 3 0 schema Version 3 0 NON NLS 1 String Tokenizer tokenizer new String Tokenizer data NON NLS 1 while tokenizer has More Tokens String token tokenizer next Token if token equals Ignore Case version NON NLS 1 if tokenizer has More Tokens break schema Version tokenizer next Token break  processingInstruction SAXException equalsIgnoreCase schemaVersion StringTokenizer StringTokenizer hasMoreTokens nextToken equalsIgnoreCase hasMoreTokens schemaVersion nextToken
Handles an error state specified by the status The collection of all logged status objects can be accessed using code get Status code param error a status detailing the error condition public void error I Status error status add error  getStatus IStatus
private String translate String key return Resource Translator get Resource String null key resources  ResourceTranslator getResourceString
Fixes up the extension declarations in the given pre 3 0 plug in or fragment to compensate for extension points that were renamed between release 2 1 and 3 0 private Extension fix Renamed Extension Points Extension extensions if extensions null schema Version null schema Version equals 3 0 System get Properties get NO EXTENSION MUNGING null NON NLS 1 return extensions for int i 0 i extensions length i Extension extension extensions i String old Point Id extension get Extension Point Identifier String new Point Id String extension Point Map get old Point Id if new Point Id null extension set Extension Point Identifier new Point Id return extensions  fixRenamedExtensionPoints schemaVersion schemaVersion getProperties NO_EXTENSION_MUNGING oldPointId getExtensionPointIdentifier newPointId extensionPointMap oldPointId newPointId setExtensionPointIdentifier newPointId

public class Flushable Extension extends Extension public Flushable Extension super  FlushableExtension FlushableExtension
public I Configuration Element get Configuration Elements synchronized this if fully Loaded fully Loaded true Registry Cache Reader reader get Registry get Cache Reader if reader null elements new Soft Reference reader load Configuration Elements this sub Elements Cache Offset if elements null elements new I Configuration Element 0 if Soft Reference elements get null Registry Cache Reader reader get Registry get Cache Reader if reader null elements new Soft Reference reader load Configuration Elements this sub Elements Cache Offset return I Configuration Element Soft Reference elements get  IConfigurationElement getConfigurationElements fullyLoaded fullyLoaded RegistryCacheReader getRegistry getCacheReader SoftReference loadConfigurationElements subElementsCacheOffset IConfigurationElement SoftReference RegistryCacheReader getRegistry getCacheReader SoftReference loadConfigurationElements subElementsCacheOffset IConfigurationElement SoftReference
public void set Sub Elements I Configuration Element value elements new Soft Reference value  setSubElements IConfigurationElement SoftReference

private Bundle bundle Introduced to fix 46308 public String get Unique Identifier return get Name  getUniqueIdentifier getName
public void set Unique Identifier String value set Name value  setUniqueIdentifier setName
public void set Extensions I Extension value extensions value  setExtensions IExtension
public I Extension get Extension String id if id null return null I Extension list get Extensions if list null return null for int i 0 i list length i if id equals list i get Simple Identifier return list i return null  IExtension getExtension IExtension getExtensions getSimpleIdentifier
public I Extension get Extensions return extensions null new I Extension 0 extensions  IExtension getExtensions IExtension
public void set Extension Points I Extension Point value extension Points value  setExtensionPoints IExtensionPoint extensionPoints
public I Extension Point get Extension Point String xpt if xpt null return null I Extension Point list get Extension Points if list null return null for int i 0 i list length i if xpt equals list i get Simple Identifier return list i return null  IExtensionPoint getExtensionPoint IExtensionPoint getExtensionPoints getSimpleIdentifier
public I Extension Point get Extension Points return extension Points null new I Extension Point 0 extension Points  IExtensionPoint getExtensionPoints extensionPoints IExtensionPoint extensionPoints
public void set Host Identifier String value host Id value  setHostIdentifier hostId
public String get Host Identifier return host Id  getHostIdentifier hostId
public boolean is Fragment return host Id null  isFragment hostId
public String to String return Namespace get Name NON NLS 1  toString getName
public long get Id returns an invalid id but avoids NPE return bundle null 1 bundle get Bundle Id  getId getBundleId
public Bundle get Bundle return bundle  getBundle
public void set Bundle Bundle value bundle value  setBundle
public String get Resource String String value if resource Bundle null return Resource Translator get Resource String null value resource Bundle if missing Resource Bundle return value if resource Bundle null try resource Bundle Resource Translator get Resource Bundle bundle catch Missing Resource Exception e resource Bundle null if resource Bundle null missing Resource Bundle true return value return Resource Translator get Resource String null value resource Bundle  getResourceString resourceBundle ResourceTranslator getResourceString resourceBundle missingResourceBundle resourceBundle resourceBundle ResourceTranslator getResourceBundle MissingResourceException resourceBundle resourceBundle missingResourceBundle ResourceTranslator getResourceString resourceBundle

Returns the plug in model descriptor or fragment in which this extension is declared return the plug in model in which this extension is declared or code null code public Object get Parent return parent  getParent
Sets the plug in model in which this extension is declared param value the plug in model in which this extension is declared May be code null code public void set Parent Registry Model Object value parent value  setParent RegistryModelObject
Extension Registry get Registry return parent null null parent get Registry  ExtensionRegistry getRegistry getRegistry

Concurrent reading is allowed Blocking only when already writing public synchronized void enter Read if write Lockowner Thread current Thread return while status 0 try wait catch Interrupted Exception e ignore status  enterRead writeLockowner currentThread InterruptedException
Only one writer at a time is allowed to perform Blocking only when already writing or reading public synchronized void enter Write if write Lockowner Thread current Thread while status 0 try wait catch Interrupted Exception e ignore write Lockowner Thread current Thread status  enterWrite writeLockowner currentThread InterruptedException writeLockowner currentThread
Only notify waiting writer s if last reader public synchronized void exit Read if write Lockowner Thread current Thread return if status 0 notify All  exitRead writeLockowner currentThread notifyAll
When writing is over all readers and possible writers are granted permission to restart concurrently public synchronized void exit Write if write Lockowner Thread current Thread throw new Illegal State Exception Current owner is write Lockowner NON NLS 1 if status 0 write Lockowner null notify All  exitWrite writeLockowner currentThread IllegalStateException writeLockowner writeLockowner notifyAll
public String to String String Buffer buffer new String Buffer if status 0 buffer append Monitor idle NON NLS 1 else if status 0 buffer append Monitor writing NON NLS 1 else if status 0 buffer append Monitor reading NON NLS 1 buffer append status NON NLS 1 buffer append this status buffer append NON NLS 1 return buffer to String  toString StringBuffer StringBuffer toString

public Registry Cache Reader File cache File Multi Status problems boolean lazily Load Extensions boolean flushable super this cache File cache File this problems problems this lazily Load Extensions lazily Load Extensions this flushable Extensions flushable object Table new Array List  RegistryCacheReader cacheFile MultiStatus lazilyLoadExtensions cacheFile cacheFile lazilyLoadExtensions lazilyLoadExtensions flushableExtensions objectTable ArrayList
public Registry Cache Reader File cache File Multi Status problems this cache File problems false true  RegistryCacheReader cacheFile MultiStatus cacheFile
private int add To Object Table Object object object Table add object return the index of the object just added i e size 1 return object Table size 1  addToObjectTable objectTable objectTable
private void debug String msg System out println Registry Cache Reader msg NON NLS 1  RegistryCacheReader
private boolean read Header Information Data Input Stream in long expected Timestamp throws Invalid Registry Cache Exception try if in read Int REGISTRY CACHE VERSION return false long install Stamp in read Long long registry Stamp in read Long String os Stamp in readUTF String windows Stamp in readUTF String locale Stamp in readUTF Internal Platform info Internal Platform get Default return expected Timestamp 0 expected Timestamp registry Stamp install Stamp info get State Time Stamp os Stamp equals info getOS windows Stamp equals info getWS locale Stamp equals info getNL catch IO Exception e throw new Invalid Registry Cache Exception Policy bind meta reg CacheIO Exception Reading Header Information e NON NLS 1 NON NLS 2  readHeaderInformation DataInputStream expectedTimestamp InvalidRegistryCacheException readInt REGISTRY_CACHE_VERSION installStamp readLong registryStamp readLong osStamp windowsStamp localeStamp InternalPlatform InternalPlatform getDefault expectedTimestamp expectedTimestamp registryStamp installStamp getStateTimeStamp osStamp windowsStamp localeStamp IOException InvalidRegistryCacheException regCacheIOExceptionReading HeaderInformation
private void skip Configuration Element Registry Model Object parent Data Input Stream in throws IO Exception read Cached String in false read name skip String in skip value int length in read Int for int i 0 i length i skip Configuration Property in length in read Int for int i 0 i length i skip Configuration Element null in  skipConfigurationElement RegistryModelObject DataInputStream IOException readCachedString skipString readInt skipConfigurationProperty readInt skipConfigurationElement
private Configuration Element read Configuration Element Registry Model Object parent Data Input Stream in throws IO Exception Configuration Element result new Configuration Element result set Parent parent result set Name read Cached String in false result set Value read String in false int length in read Int Configuration Property properties new Configuration Property length for int i 0 i length i properties i read Configuration Property in result set Properties properties length in read Int I Configuration Element elements new Configuration Element length for int i 0 i length i elements i read Configuration Element result in result set Children elements return result  ConfigurationElement readConfigurationElement RegistryModelObject DataInputStream IOException ConfigurationElement ConfigurationElement setParent setName readCachedString setValue readString readInt ConfigurationProperty ConfigurationProperty readConfigurationProperty setProperties readInt IConfigurationElement ConfigurationElement readConfigurationElement setChildren
private void skip Configuration Property Data Input Stream in throws IO Exception read Cached String in false Read the name skip String in skip the value  skipConfigurationProperty DataInputStream IOException readCachedString skipString
private Configuration Property read Configuration Property Data Input Stream in throws IO Exception String name read Cached String in false Configuration Property result new Configuration Property result set Name name result set Value read String in false return result  ConfigurationProperty readConfigurationProperty DataInputStream IOException readCachedString ConfigurationProperty ConfigurationProperty setName setValue readString
private Extension read Extension Data Input Stream in throws Invalid Registry Cache Exception Extension result null try result Extension read Index in if result null return result result flushable Extensions new Flushable Extension new Extension add To Object Table result result set Simple Identifier read String in false result set Parent read Bundle Model in result set Name read String in false result set Extension Point Identifier read Cached String in false result set Sub Elements read Sub Elements result in return result catch IO Exception e String extension Id null if result null result get Parent null extension Id result get Parent Identifier result get Simple Identifier NON NLS 1 throw new Invalid Registry Cache Exception Policy bind meta reg CacheIO Exception Reading extension extension Id e NON NLS 1 NON NLS 2  readExtension DataInputStream InvalidRegistryCacheException readIndex flushableExtensions FlushableExtension addToObjectTable setSimpleIdentifier readString setParent readBundleModel setName readString setExtensionPointIdentifier readCachedString setSubElements readSubElements IOException extensionId getParent extensionId getParentIdentifier getSimpleIdentifier InvalidRegistryCacheException regCacheIOExceptionReading extensionId
private Extension Point read Extension Point Namespace bundle Data Input Stream in throws Invalid Registry Cache Exception Extension Point result null try result Extension Point read Index in if result null return result result new Extension Point add To Object Table result result set Parent bundle result set Simple Identifier read String in true result set Name read String in false result set Schema read String in false Now do the extensions int length in read Int I Extension extensions new Extension length for int i 0 i length i extensions i read Extension in result set Extensions extensions return result catch IO Exception e String extension Point Id null if result null result get Parent null extension Point Id result get Unique Identifier throw new Invalid Registry Cache Exception Policy bind meta reg CacheIO Exception Reading extension point extension Point Id e NON NLS 1 NON NLS 2  ExtensionPoint readExtensionPoint DataInputStream InvalidRegistryCacheException ExtensionPoint ExtensionPoint readIndex ExtensionPoint addToObjectTable setParent setSimpleIdentifier readString setName readString setSchema readString readInt IExtension readExtension setExtensions IOException extensionPointId getParent extensionPointId getUniqueIdentifier InvalidRegistryCacheException regCacheIOExceptionReading extensionPointId
private Namespace read Bundle Model Data Input Stream in throws Invalid Registry Cache Exception Namespace result null try result Namespace read Index in if result null return result result new Namespace add To Object Table result result set Unique Identifier read Cached String in true result set Bundle Internal Platform get Default get Bundle Context get Bundle in read Long result set Parent read Registry in result set Host Identifier read Cached String in false now do extension points int length in read Int I Extension Point extension Points new Extension Point length for int i 0 i length i extension Points i read Extension Point result in result set Extension Points extension Points and then extensions length in read Int I Extension extensions flushable Extensions new Flushable Extension length new Extension length for int i 0 i length i extensions i read Extension in result set Extensions extensions return result catch IO Exception e String bundle Id result null result get Unique Identifier null not available result get Unique Identifier NON NLS 1 throw new Invalid Registry Cache Exception Policy bind meta reg CacheIO Exception Reading plugin bundle Id e NON NLS 1 NON NLS 2  readBundleModel DataInputStream InvalidRegistryCacheException readIndex addToObjectTable setUniqueIdentifier readCachedString setBundle InternalPlatform getDefault getBundleContext getBundle readLong setParent readRegistry setHostIdentifier readCachedString readInt IExtensionPoint extensionPoints ExtensionPoint extensionPoints readExtensionPoint setExtensionPoints extensionPoints readInt IExtension flushableExtensions FlushableExtension readExtension setExtensions IOException bundleId getUniqueIdentifier getUniqueIdentifier InvalidRegistryCacheException regCacheIOExceptionReading bundleId
private Extension Registry read Cache Data Input Stream in long expected Timestamps throws Invalid Registry Cache Exception if read Header Information in expected Timestamps if Internal Platform DEBUG REGISTRY debug Cache header information out of date ignoring cache NON NLS 1 return null return read Registry in  ExtensionRegistry readCache DataInputStream expectedTimestamps InvalidRegistryCacheException readHeaderInformation expectedTimestamps InternalPlatform DEBUG_REGISTRY readRegistry
private Extension Registry read Registry Data Input Stream in throws Invalid Registry Cache Exception try Extension Registry result Extension Registry read Index in if result null return result result new Extension Registry if lazily Load Extensions result set Cache Reader this add To Object Table result if there are no plugins in the registry return null instead of an empty registry int length in read Int if length 0 return null for int i 0 i length i result basic Add read Bundle Model in false if lazily Load Extensions result set Cache Reader this return result catch IO Exception e throw new Invalid Registry Cache Exception Policy bind meta reg CacheIO Exception Reading Extension Registry e NON NLS 1 NON NLS 2  ExtensionRegistry readRegistry DataInputStream InvalidRegistryCacheException ExtensionRegistry ExtensionRegistry readIndex ExtensionRegistry lazilyLoadExtensions setCacheReader addToObjectTable readInt basicAdd readBundleModel lazilyLoadExtensions setCacheReader IOException InvalidRegistryCacheException regCacheIOExceptionReading ExtensionRegistry
private Configuration Element read Sub Elements Extension parent Data Input Stream in throws IO Exception int type in read Byte if type NULL return null Here type is OBJECT the first field is extension sub elements data offset int offset in read Int if lazily Load Extensions Extension extension parent extension set Sub Elements Cache Offset offset skip Basic Sub Elements parent in extension set Fully Loaded false return null return read Basic Sub Elements parent in  ConfigurationElement readSubElements DataInputStream IOException readByte readInt lazilyLoadExtensions setSubElementsCacheOffset skipBasicSubElements setFullyLoaded readBasicSubElements
private void skip Basic Sub Elements Extension parent Data Input Stream in throws IO Exception int length in read Int for int i 0 i length i skip Configuration Element parent in  skipBasicSubElements DataInputStream IOException readInt skipConfigurationElement
private Configuration Element read Basic Sub Elements Extension parent Data Input Stream in throws IO Exception read the number of sub elements to load int length in read Int Configuration Element result new Configuration Element length for int i 0 i length i result i read Configuration Element parent in return result  ConfigurationElement readBasicSubElements DataInputStream IOException readInt ConfigurationElement ConfigurationElement readConfigurationElement
private String read String Data Input Stream in boolean intern throws IO Exception byte type in read Byte if type NULL return null if intern return in readUTF intern else return in readUTF  readString DataInputStream IOException readByte
private void skip String Data Input Stream in throws IO Exception byte type in read Byte if type NULL return int utf Length in read Unsigned Short byte bytearr new byte utf Length in read Fully bytearr 0 utf Length  skipString DataInputStream IOException readByte utfLength readUnsignedShort utfLength readFully utfLength
private String read Cached String Data Input Stream in boolean intern throws IO Exception byte type in read Byte if type NULL return null if type INDEX return String object Table get in read Int String string Read null if intern string Read in readUTF intern else string Read in readUTF add To Object Table string Read return string Read  readCachedString DataInputStream IOException readByte objectTable readInt stringRead stringRead stringRead addToObjectTable stringRead stringRead
private Object read Index Data Input Stream in throws IO Exception byte type in read Byte return type INDEX object Table get in read Int null  readIndex DataInputStream IOException readByte objectTable readInt
private Data Input Stream open Cache File throws IO Exception return new Data Input Stream new Buffered Input Stream new File Input Stream cache File 2048  DataInputStream openCacheFile IOException DataInputStream BufferedInputStream FileInputStream cacheFile
Lazily loads an extension model s sub elements public final Configuration Element load Configuration Elements Extension parent int offset Data Input Stream in null try in open Cache File in skip Bytes offset in read Int skip the offset itself return read Basic Sub Elements parent in catch IO Exception e Throwable exception Internal Platform DEBUG REGISTRY e null String message Policy bind meta unable To Read Cache NON NLS 1 Internal Platform get Default log new Status I Status WARNING Platform PI RUNTIME 0 message exception catch Out Of Memory Error oome catch any Out Of Memory Errors that may have been caused by corrupted data log Error oome catch Runtime Exception re catch any Array Index Out Of Bounds Null Pointer Negative Array Size exceptions that may have been caused by corrupted data log Error re finally try if in null in close catch IO Exception e ignore we only get here when we have problems failed true return new Configuration Element 0  ConfigurationElement loadConfigurationElements DataInputStream openCacheFile skipBytes readInt readBasicSubElements IOException InternalPlatform DEBUG_REGISTRY unableToReadCache InternalPlatform getDefault IStatus PI_RUNTIME OutOfMemoryError OutOfMemoryErrors logError RuntimeException ArrayIndexOutOfBounds NullPointer NegativeArraySize logError IOException ConfigurationElement
boolean has Failed return failed  hasFailed
private void log Error Throwable t log general message String message Policy bind meta registry Cache Read Problems NON NLS 1 Internal Platform get Default log new Status I Status WARNING Platform PI RUNTIME 0 message null log actual error Throwable exception To Log Internal Platform DEBUG REGISTRY t null Internal Platform get Default log new Status I Status WARNING Platform PI RUNTIME 0 t to String exception To Log  logError registryCacheReadProblems InternalPlatform getDefault IStatus PI_RUNTIME exceptionToLog InternalPlatform DEBUG_REGISTRY InternalPlatform getDefault IStatus PI_RUNTIME toString exceptionToLog
public final Extension Registry load Cache return this load Cache 0  ExtensionRegistry loadCache loadCache
public final Extension Registry load Cache long expected Timestamp Data Input Stream in null try in open Cache File catch IO Exception e Throwable exception Internal Platform DEBUG REGISTRY e null String message Policy bind meta unable To Read Cache NON NLS 1 Internal Platform get Default log new Status I Status WARNING Platform PI RUNTIME 0 message exception return null try return read Cache in expected Timestamp catch Invalid Registry Cache Exception e Throwable exception Internal Platform DEBUG REGISTRY e get Cause null Internal Platform get Default log new Status I Status WARNING Platform PI RUNTIME 0 e get Message exception catch Out Of Memory Error oome catch any Out Of Memory Errors that may have been caused by corrupted data log Error oome catch Runtime Exception re catch any Array Index Out Of Bounds Null Pointer Negative Array Size exceptions that may have been caused by corrupted data log Error re finally try if in null in close catch IO Exception e ignore return null  ExtensionRegistry loadCache expectedTimestamp DataInputStream openCacheFile IOException InternalPlatform DEBUG_REGISTRY unableToReadCache InternalPlatform getDefault IStatus PI_RUNTIME readCache expectedTimestamp InvalidRegistryCacheException InternalPlatform DEBUG_REGISTRY getCause InternalPlatform getDefault IStatus PI_RUNTIME getMessage OutOfMemoryError OutOfMemoryErrors logError RuntimeException ArrayIndexOutOfBounds NullPointer NegativeArraySize logError IOException
Throwable cause null public Invalid Registry Cache Exception String msg Throwable cause super msg this cause cause  InvalidRegistryCacheException
public Invalid Registry Cache Exception String string super string  InvalidRegistryCacheException
public Throwable get Cause return cause  getCause

protected File cache File public Registry Cache Writer File cache File super this cache File cache File  cacheFile RegistryCacheWriter cacheFile cacheFile cacheFile
private int add To Object Table Object object if object Table null object Table new Hash Map object Table put object new Integer object Table size return the index of the object just added i e size 1 return object Table size 1  addToObjectTable objectTable objectTable HashMap objectTable objectTable objectTable
private int get From Object Table Object object if object Table null Object object Result object Table get object if object Result null return Integer object Result int Value return 1  getFromObjectTable objectTable objectResult objectTable objectResult objectResult intValue
public void write Configuration Element Configuration Element object Data Output Stream out try write Cached String Or Null object get Name out write String Or Null object get Value out Configuration Property properties object get Properties int length properties null 0 properties length out write Int length for int i 0 i length i write Configuration Property properties i out I Configuration Element elements object get Children length elements null 0 elements length out write Int length for int i 0 i length i write Configuration Element Configuration Element elements i out catch IO Exception ioe problems add new Status I Status WARNING Platform PI RUNTIME Platform PARSE PROBLEM Policy bind meta reg CacheIO Exception Writing Configruation Element ioe NON NLS 1 NON NLS 2  writeConfigurationElement ConfigurationElement DataOutputStream writeCachedStringOrNull getName writeStringOrNull getValue ConfigurationProperty getProperties writeInt writeConfigurationProperty IConfigurationElement getChildren writeInt writeConfigurationElement ConfigurationElement IOException IStatus PI_RUNTIME PARSE_PROBLEM regCacheIOExceptionWriting ConfigruationElement
public void write Configuration Property Configuration Property object Data Output Stream out try write Cached String Or Null object get Name out write String Or Null object get Value out catch IO Exception ioe problems add new Status I Status WARNING Platform PI RUNTIME Platform PARSE PROBLEM Policy bind meta reg CacheIO Exception Writing Configuration Property ioe NON NLS 1 NON NLS 2  writeConfigurationProperty ConfigurationProperty DataOutputStream writeCachedStringOrNull getName writeStringOrNull getValue IOException IStatus PI_RUNTIME PARSE_PROBLEM regCacheIOExceptionWriting ConfigurationProperty
public void write Extension Extension object Data Output Stream out try if write Index object out return add this object to the object table first add To Object Table object out write Byte Registry Cache Reader OBJECT write String Or Null object get Simple Identifier out write Bundle Model Namespace object get Parent out write String Or Null object get Name out write Cached String Or Null object get Extension Point Identifier out write Sub Elements object out catch IO Exception ioe problems add new Status I Status WARNING Platform PI RUNTIME Platform PARSE PROBLEM Policy bind meta reg CacheIO Exception Writing Extension ioe NON NLS 1 NON NLS 2  writeExtension DataOutputStream writeIndex addToObjectTable writeByte RegistryCacheReader writeStringOrNull getSimpleIdentifier writeBundleModel getParent writeStringOrNull getName writeCachedStringOrNull getExtensionPointIdentifier writeSubElements IOException IStatus PI_RUNTIME PARSE_PROBLEM regCacheIOExceptionWriting
private void write Cached String Or Null String string Data Output Stream out throws IO Exception if string null out write Byte Registry Cache Reader NULL else int index get From Object Table string if index 1 add To Object Table string out write Byte Registry Cache Reader OBJECT out writeUTF string else out write Byte Registry Cache Reader INDEX out write Int index  writeCachedStringOrNull DataOutputStream IOException writeByte RegistryCacheReader getFromObjectTable addToObjectTable writeByte RegistryCacheReader writeByte RegistryCacheReader writeInt
public void write Sub Elements Extension object Data Output Stream out throws IO Exception I Configuration Element sub Elements object get Configuration Elements if sub Elements null out write Byte Registry Cache Reader NULL return out write Byte Registry Cache Reader OBJECT write the offset for sub elements data out write Int out size out write Int sub Elements length for int i 0 i sub Elements length i write Configuration Element Configuration Element sub Elements i out  writeSubElements DataOutputStream IOException IConfigurationElement subElements getConfigurationElements subElements writeByte RegistryCacheReader writeByte RegistryCacheReader writeInt writeInt subElements subElements writeConfigurationElement ConfigurationElement subElements
public void write Extension Point Extension Point object Data Output Stream out try if write Index object out return add this object to the object table first add To Object Table object out write Byte Registry Cache Reader OBJECT write String Or Null object get Simple Identifier out write String Or Null object get Name out write String Or Null object get Schema out Now do the extensions I Extension extensions object get Extensions int length extensions null 0 extensions length out write Int length for int i 0 i length i write Extension Extension extensions i out catch IO Exception ioe problems add new Status I Status WARNING Platform PI RUNTIME Platform PARSE PROBLEM Policy bind meta reg CacheIO Exception Writing Extension Point ioe NON NLS 1 NON NLS 2  writeExtensionPoint ExtensionPoint DataOutputStream writeIndex addToObjectTable writeByte RegistryCacheReader writeStringOrNull getSimpleIdentifier writeStringOrNull getName writeStringOrNull getSchema IExtension getExtensions writeInt writeExtension IOException IStatus PI_RUNTIME PARSE_PROBLEM regCacheIOExceptionWriting ExtensionPoint
public void write Header Information long registry Stamp Data Output Stream out try out write Int Registry Cache Reader REGISTRY CACHE VERSION out write Long Internal Platform get Default get State Time Stamp out write Long registry Stamp Internal Platform info Internal Platform get Default out writeUTF info getOS out writeUTF info getWS out writeUTF info getNL catch IO Exception ioe problems add new Status I Status WARNING Platform PI RUNTIME Platform PARSE PROBLEM Policy bind meta reg CacheIO Exception Writing Header Information ioe NON NLS 1 NON NLS 2  writeHeaderInformation registryStamp DataOutputStream writeInt RegistryCacheReader REGISTRY_CACHE_VERSION writeLong InternalPlatform getDefault getStateTimeStamp writeLong registryStamp InternalPlatform InternalPlatform getDefault IOException IStatus PI_RUNTIME PARSE_PROBLEM regCacheIOExceptionWriting HeaderInformation
public void write Bundle Model Namespace object Data Output Stream out try if write Index object out return add this object to the object table first add To Object Table object out write Byte Registry Cache Reader OBJECT write Cached String Or Null object get Unique Identifier out out write Long object get Id write Registry Extension Registry object get Parent out write Cached String Or Null object get Host Identifier out need to worry about cross links here now do extension points I Extension Point extension Points object get Extension Points int length extension Points null 0 extension Points length out write Int length for int i 0 i length i write Extension Point Extension Point extension Points i out and then extensions I Extension extensions object get Extensions length extensions null 0 extensions length out write Int length for int i 0 i length i write Extension Extension extensions i out catch IO Exception ioe problems add new Status I Status WARNING Platform PI RUNTIME Platform PARSE PROBLEM Policy bind meta reg CacheIO Exception Writing Bundle ioe NON NLS 1 NON NLS 2  writeBundleModel DataOutputStream writeIndex addToObjectTable writeByte RegistryCacheReader writeCachedStringOrNull getUniqueIdentifier writeLong getId writeRegistry ExtensionRegistry getParent writeCachedStringOrNull getHostIdentifier IExtensionPoint extensionPoints getExtensionPoints extensionPoints extensionPoints writeInt writeExtensionPoint ExtensionPoint extensionPoints IExtension getExtensions writeInt writeExtension IOException IStatus PI_RUNTIME PARSE_PROBLEM regCacheIOExceptionWriting
public void write Cache Extension Registry object long registry Stamp Data Output Stream out if problems null problems new Multi Status Platform PI RUNTIME Platform PARSE PROBLEM Policy bind meta registry Cache Write Problems null NON NLS 1 write Header Information registry Stamp out write Registry object out  writeCache ExtensionRegistry registryStamp DataOutputStream MultiStatus PI_RUNTIME PARSE_PROBLEM registryCacheWriteProblems writeHeaderInformation registryStamp writeRegistry
public void write Registry Extension Registry object Data Output Stream out try if write Index object out return add this object to the object table first add To Object Table object out write Byte Registry Cache Reader OBJECT String ids object basic Get Namespaces out write Int ids length for int i 0 i ids length i write Bundle Model object basic Get Namespace ids i out catch IO Exception ioe problems add new Status I Status WARNING Platform PI RUNTIME Platform PARSE PROBLEM Policy bind meta reg CacheIO Exception Writing Extension Regisry ioe NON NLS 1 NON NLS 2  writeRegistry ExtensionRegistry DataOutputStream writeIndex addToObjectTable writeByte RegistryCacheReader basicGetNamespaces writeInt writeBundleModel basicGetNamespace IOException IStatus PI_RUNTIME PARSE_PROBLEM regCacheIOExceptionWriting ExtensionRegisry
private void write String Or Null String string Data Output Stream out throws IO Exception if string null out write Byte Registry Cache Reader NULL else out write Byte Registry Cache Reader OBJECT out writeUTF string  writeStringOrNull DataOutputStream IOException writeByte RegistryCacheReader writeByte RegistryCacheReader
private boolean write Index Object object Data Output Stream out throws IO Exception if object null out write Byte Registry Cache Reader NULL return true int index get From Object Table object if index 1 return false out write Byte Registry Cache Reader INDEX out write Int index return true  writeIndex DataOutputStream IOException writeByte RegistryCacheReader getFromObjectTable writeByte RegistryCacheReader writeInt
public void save Cache Extension Registry registry long registry Stamp registry enter Read Safe File Output Stream safe Out null try safe Out new Safe File Output Stream cache File Data Output Stream out new Data Output Stream safe Out try write Cache registry registry Stamp out finally at this point we have traversed the whole registry if we failed lazily loading configuration elements just discard the temporary file we have created to avoid overwriting the existing one with bogus data Registry Cache Reader reader registry get Cache Reader if reader null reader has Failed safe Out close true else close the Data Output Stream normally out close catch IO Exception e an I O failure would keep the extension elements unloaded TODO log this exception if Internal Platform DEBUG REGISTRY e print Stack Trace finally registry exit Read  saveCache ExtensionRegistry registryStamp enterRead SafeFileOutputStream safeOut safeOut SafeFileOutputStream cacheFile DataOutputStream DataOutputStream safeOut writeCache registryStamp RegistryCacheReader getCacheReader hasFailed safeOut DataOutputStream IOException InternalPlatform DEBUG_REGISTRY printStackTrace exitRead
public void save Cache Extension Registry registry this save Cache registry 0  saveCache ExtensionRegistry saveCache

private Map deltas Registry Change Event Map deltas String filter this deltas deltas this filter filter  RegistryChangeEvent
private Registry Delta get Host Deltas if there is a filter return only the delta for the selected plug in if filter null Registry Delta single Delta get Host Delta filter return single Delta null new Registry Delta 0 new Registry Delta single Delta there is no filter return all deltas return Registry Delta deltas values to Array new Registry Delta deltas size  RegistryDelta getHostDeltas RegistryDelta singleDelta getHostDelta singleDelta RegistryDelta RegistryDelta singleDelta RegistryDelta toArray RegistryDelta
private Registry Delta get Host Delta String plugin Id if filter null plugin Id equals filter return null return Registry Delta deltas get plugin Id  RegistryDelta getHostDelta pluginId pluginId RegistryDelta pluginId
public I Extension Delta get Extension Deltas Registry Delta host Deltas get Host Deltas if host Deltas length 0 return new I Extension Delta 0 int extension Deltas Size 0 for int i 0 i host Deltas length i extension Deltas Size host Deltas i get Extension Deltas Count I Extension Delta extension Deltas new I Extension Delta extension Deltas Size for int i 0 offset 0 i host Deltas length i I Extension Delta host Ext Deltas host Deltas i get Extension Deltas System arraycopy host Ext Deltas 0 extension Deltas offset host Ext Deltas length offset host Ext Deltas length return extension Deltas  IExtensionDelta getExtensionDeltas RegistryDelta hostDeltas getHostDeltas hostDeltas IExtensionDelta extensionDeltasSize hostDeltas extensionDeltasSize hostDeltas getExtensionDeltasCount IExtensionDelta extensionDeltas IExtensionDelta extensionDeltasSize hostDeltas IExtensionDelta hostExtDeltas hostDeltas getExtensionDeltas hostExtDeltas extensionDeltas hostExtDeltas hostExtDeltas extensionDeltas
public I Extension Delta get Extension Deltas String host Name Registry Delta host Delta get Host Delta host Name if host Delta null return new I Extension Delta 0 return host Delta get Extension Deltas  IExtensionDelta getExtensionDeltas hostName RegistryDelta hostDelta getHostDelta hostName hostDelta IExtensionDelta hostDelta getExtensionDeltas
public I Extension Delta get Extension Deltas String host Name String extension Point Registry Delta host Delta get Host Delta host Name if host Delta null return new I Extension Delta 0 return host Delta get Extension Deltas host Name extension Point  IExtensionDelta getExtensionDeltas hostName extensionPoint RegistryDelta hostDelta getHostDelta hostName hostDelta IExtensionDelta hostDelta getExtensionDeltas hostName extensionPoint
public I Extension Delta get Extension Delta String host Name String extension Point String extension Registry Delta host Delta get Host Delta host Name if host Delta null return null return host Delta get Extension Delta host Name extension Point extension  IExtensionDelta getExtensionDelta hostName extensionPoint RegistryDelta hostDelta getHostDelta hostName hostDelta hostDelta getExtensionDelta hostName extensionPoint
public String to String return Registry Change Event Arrays as List get Host Deltas NON NLS 1  toString RegistryChangeEvent asList getHostDeltas

private String host Name Registry Delta String host Name this host Name host Name  hostName RegistryDelta hostName hostName hostName
public int get Extension Deltas Count return extension Deltas size  getExtensionDeltasCount extensionDeltas
public I Extension Delta get Extension Deltas return I Extension Delta extension Deltas to Array new I Extension Delta extension Deltas size  IExtensionDelta getExtensionDeltas IExtensionDelta extensionDeltas toArray IExtensionDelta extensionDeltas
public I Extension Delta get Extension Deltas String extension Point Collection selected Ext Deltas new Linked List for Iterator ext Deltas Iter extension Deltas iterator ext Deltas Iter has Next I Extension Delta extension Delta I Extension Delta ext Deltas Iter next if extension Delta get Extension get Extension Point Unique Identifier equals extension Point selected Ext Deltas add extension Delta return I Extension Delta selected Ext Deltas to Array new I Extension Delta selected Ext Deltas size  IExtensionDelta getExtensionDeltas extensionPoint selectedExtDeltas LinkedList extDeltasIter extensionDeltas extDeltasIter hasNext IExtensionDelta extensionDelta IExtensionDelta extDeltasIter extensionDelta getExtension getExtensionPointUniqueIdentifier extensionPoint selectedExtDeltas extensionDelta IExtensionDelta selectedExtDeltas toArray IExtensionDelta selectedExtDeltas
param extension Point Id param extension Id must not be null public I Extension Delta get Extension Delta String extension Point Id String extension Id for Iterator ext Deltas Iter extension Deltas iterator ext Deltas Iter has Next I Extension Delta extension Delta I Extension Delta ext Deltas Iter next I Extension extension extension Delta get Extension if extension get Extension Point Unique Identifier equals extension Point Id extension get Unique Identifier null extension get Unique Identifier equals extension Id return extension Delta return null  extensionPointId extensionId IExtensionDelta getExtensionDelta extensionPointId extensionId extDeltasIter extensionDeltas extDeltasIter hasNext IExtensionDelta extensionDelta IExtensionDelta extDeltasIter IExtension extensionDelta getExtension getExtensionPointUniqueIdentifier extensionPointId getUniqueIdentifier getUniqueIdentifier extensionId extensionDelta
void add Extension Delta I Extension Delta extension Delta this extension Deltas add extension Delta  addExtensionDelta IExtensionDelta extensionDelta extensionDeltas extensionDelta
public String to String return n t Host host Name extension Deltas NON NLS 1 NON NLS 2  toString tHost hostName extensionDeltas

Returns the name of this element return the name of this element or code null code public String get Name return name  getName
Sets the name of this element param value the new name of this element May be code null code public void set Name String value name value  setName
Return a string representation of this object This value is not to be relied on and can change at any time To be used for debugging purposes only see java lang Object to String public String to String return this get Class get Name super to String NON NLS 1 NON NLS 2 NON NLS 3  toString toString getClass getName toString
public Object get Adapter Class type return Internal Platform get Default get Adapter Manager get Adapter this type  getAdapter InternalPlatform getDefault getAdapterManager getAdapter
Return null for the default case Extension Registry get Registry return null  ExtensionRegistry getRegistry
Optimization to replace a non localized key with its localized value Avoids having to access resource bundles for further lookups public void set Localized Name String value name value Extension Registry Internal Platform get Default get Registry set Dirty true  setLocalizedName ExtensionRegistry InternalPlatform getDefault getRegistry setDirty

public static final String REGISTRY plugin registry NON NLS 1 public Registry Writer super  RegistryWriter
public void write Configuration Element Configuration Element config Element Print Writer w int indent String element config Element get Name if element null return String gap1 NON NLS 1 for int i 0 i indent i gap1 NON NLS 1 String gap2 gap1 for int i 0 i INDENT i gap2 NON NLS 1 w print gap1 element NON NLS 1 Configuration Property prop List config Element get Properties int prop Size prop List null 0 prop List length for int i 0 i prop Size i write Configuration Property prop List i w I Configuration Element sub Element List config Element get Children int sub Element Size sub Element List null 0 sub Element List length if config Element get Value null sub Element Size 0 w println NON NLS 1 return w println NON NLS 1 if config Element get Value null w println gap2 xml Safe config Element get Value for int i 0 i sub Element Size i write Configuration Element Configuration Element sub Element List i w indent INDENT w println gap1 element NON NLS 1 NON NLS 2  writeConfigurationElement ConfigurationElement configElement PrintWriter configElement getName ConfigurationProperty propList configElement getProperties propSize propList propList propSize writeConfigurationProperty propList IConfigurationElement subElementList configElement getChildren subElementSize subElementList subElementList configElement getValue subElementSize configElement getValue xmlSafe configElement getValue subElementSize writeConfigurationElement ConfigurationElement subElementList
public void write Configuration Property Configuration Property config Prop Print Writer w if config Prop get Name null return w print xml Safe config Prop get Name NON NLS 1 NON NLS 2 if config Prop get Value null w print xml Safe config Prop get Value w print NON NLS 1  writeConfigurationProperty ConfigurationProperty configProp PrintWriter configProp getName xmlSafe configProp getName configProp getValue xmlSafe configProp getValue
public void write Extension Extension extension Print Writer w int indent String gap1 NON NLS 1 for int i 0 i indent i gap1 NON NLS 1 w print gap1 Extensions Parser EXTENSION NON NLS 1 if extension get Extension Point Identifier null w print Extensions Parser EXTENSION TARGET xml Safe extension get Extension Point Identifier NON NLS 1 NON NLS 2 NON NLS 3 if extension get Unique Identifier null w print Extensions Parser EXTENSION ID xml Safe extension get Unique Identifier NON NLS 1 NON NLS 2 NON NLS 3 if extension get Name null w print Extensions Parser EXTENSION NAME xml Safe extension get Name NON NLS 1 NON NLS 2 NON NLS 3 I Configuration Element sub Elements extension get Configuration Elements int size sub Elements null 0 sub Elements length if size 0 w println NON NLS 1 return w println NON NLS 1 for int i 0 i size i write Configuration Element Configuration Element sub Elements i w indent INDENT w println gap1 Extensions Parser EXTENSION NON NLS 1 NON NLS 2  writeExtension PrintWriter ExtensionsParser getExtensionPointIdentifier ExtensionsParser EXTENSION_TARGET xmlSafe getExtensionPointIdentifier getUniqueIdentifier ExtensionsParser EXTENSION_ID xmlSafe getUniqueIdentifier getName ExtensionsParser EXTENSION_NAME xmlSafe getName IConfigurationElement subElements getConfigurationElements subElements subElements writeConfigurationElement ConfigurationElement subElements ExtensionsParser
public void write Extension Point Extension Point ext Pt Print Writer w int indent String gap1 NON NLS 1 for int i 0 i indent i gap1 NON NLS 1 w print gap1 Extensions Parser EXTENSION POINT NON NLS 1 if ext Pt get Unique Identifier null w print Extensions Parser EXTENSION POINT ID xml Safe ext Pt get Unique Identifier NON NLS 1 NON NLS 2 NON NLS 3 if ext Pt get Name null w print Extensions Parser EXTENSION POINT NAME xml Safe ext Pt get Name NON NLS 1 NON NLS 2 NON NLS 3 w println NON NLS 1  writeExtensionPoint ExtensionPoint extPt PrintWriter ExtensionsParser EXTENSION_POINT extPt getUniqueIdentifier ExtensionsParser EXTENSION_POINT_ID xmlSafe extPt getUniqueIdentifier extPt getName ExtensionsParser EXTENSION_POINT_NAME xmlSafe extPt getName
public void write Bundle Model Namespace plugin Print Writer w int indent String gap1 NON NLS 1 for int i 0 i indent i gap1 NON NLS 1 String gap2 gap1 for int i 0 i INDENT i gap2 NON NLS 1 w println NON NLS 1 w print gap1 Extensions Parser PLUGIN NON NLS 1 if plugin get Unique Identifier null w print Extensions Parser PLUGIN ID xml Safe plugin get Unique Identifier NON NLS 1 NON NLS 2 NON NLS 3 if plugin get Name null w print Extensions Parser PLUGIN NAME xml Safe plugin get Name NON NLS 1 NON NLS 2 NON NLS 3 w println NON NLS 1 I Extension Point extension Points plugin get Extension Points int ext Points Size extension Points null 0 extension Points length if ext Points Size 0 w println NON NLS 1 for int i 0 i ext Points Size i write Extension Point Extension Point extension Points i w indent INDENT I Extension extensions plugin get Extensions int ext Size extensions null 0 extensions length if ext Size 0 for int i 0 i ext Size i w println NON NLS 1 write Extension Extension extensions i w indent INDENT Don t write fragments here If we do XML won t be able to parse what we write out Fragments must be entities separate from plugins w println gap1 Extensions Parser PLUGIN NON NLS 1 NON NLS 2  writeBundleModel PrintWriter ExtensionsParser getUniqueIdentifier ExtensionsParser PLUGIN_ID xmlSafe getUniqueIdentifier getName ExtensionsParser PLUGIN_NAME xmlSafe getName IExtensionPoint extensionPoints getExtensionPoints extPointsSize extensionPoints extensionPoints extPointsSize extPointsSize writeExtensionPoint ExtensionPoint extensionPoints IExtension getExtensions extSize extSize extSize writeExtension ExtensionsParser
public void write Registry Extension Registry registry Print Writer w int indent String gap1 NON NLS 1 for int i 0 i indent i gap1 NON NLS 1 w println gap1 REGISTRY NON NLS 1 NON NLS 2 String list registry get Namespaces for int i 0 i list length i write Bundle Model registry get Namespace list i w indent INDENT w println gap1 REGISTRY NON NLS 1 NON NLS 2 w flush  writeRegistry ExtensionRegistry PrintWriter getNamespaces writeBundleModel getNamespace
private static void append Escaped Char String Buffer buffer char c String replacement get Replacement c if replacement null buffer append buffer append replacement buffer append else if c c 0x7E c n c r c t buffer append c else buffer append NON NLS 1 buffer append Integer to String c buffer append  appendEscapedChar StringBuffer getReplacement toString
public static String xml Safe String s String Buffer result new String Buffer s length 10 for int i 0 i s length i append Escaped Char result s char At i return result to String  xmlSafe StringBuffer StringBuffer appendEscapedChar charAt toString
private static String get Replacement char c Encode special XML characters into the equivalent character references These five are defined by default for all XML documents switch c case return lt NON NLS 1 case return gt NON NLS 1 case return quot NON NLS 1 case return apos NON NLS 1 case return amp NON NLS 1 return null  getReplacement

Adds the given resource to the map keyed by the given location Returns true if a new entry was added and false otherwise public boolean add I Path location I Resource resource Object old Value map get location if old Value null map put location resource return true if old Value instanceof I Resource if resource equals old Value return false duplicate Array List new Value new Array List 2 new Value add old Value new Value add resource map put location new Value return true Array List list Array List old Value if list contains resource return false duplicate list add resource return true  IPath IResource oldValue oldValue oldValue IResource oldValue ArrayList newValue ArrayList newValue oldValue newValue newValue ArrayList ArrayList oldValue
Method clear public void clear map clear 
Invoke the given doit for every resource whose location has the given location as a prefix public void matching Prefix Do I Path prefix Doit doit Sorted Map matching if prefix segment Count 0 end Point is the smallest possible path greater than the prefix that doesn t match the prefix I Path end Point new Path prefix remove Trailing Separator to String 0 NON NLS 1 matching map sub Map prefix end Point else matching map for Iterator it matching values iterator it has Next Object value it next if value null return if value instanceof List Iterator duplicates List value iterator while duplicates has Next doit doit I Resource duplicates next else doit doit I Resource value  matchingPrefixDo IPath SortedMap segmentCount endPoint IPath endPoint removeTrailingSeparator toString subMap endPoint hasNext hasNext IResource IResource
Invoke the given doit for every resource that matches the given location public void matching Resources Do I Path location Doit doit Object value map get location if value null return if value instanceof List Iterator duplicates List value iterator while duplicates has Next doit doit I Resource duplicates next else doit doit I Resource value  matchingResourcesDo IPath hasNext IResource IResource
Calls the given doit with the project of every resource in the map whose location overlaps another resource in the map public void over Lapping Resources Do Doit doit Iterator entries map entry Set iterator I Path previous Path null I Resource previous Resource null while entries has Next Map Entry current Map Entry entries next value is either single resource or List of resources I Path current Path I Path current get Key I Resource current Resource null Object value current get Value if value instanceof List if there are several then they re all overlapping Iterator duplicates List value iterator while duplicates has Next doit doit I Resource duplicates next get Project else value is a single resource current Resource I Resource value if previous Path null check for overlap with previous Note previous is always shorter due to map sorting rules if previous Path is Prefix Of current Path resources will be null if they were in a list in which case they ve already been passed to the doit if previous Resource null doit doit previous Resource get Project if current Resource null doit doit current Resource get Project previous Path current Path previous Resource current Resource  overLappingResourcesDo entrySet IPath previousPath IResource previousResource hasNext IPath currentPath IPath getKey IResource currentResource getValue hasNext IResource getProject currentResource IResource previousPath previousPath isPrefixOf currentPath previousResource previousResource getProject currentResource currentResource getProject previousPath currentPath previousResource currentResource
Removes the given location from the map Returns true if anything was actually removed and false otherwise public boolean remove I Path location I Resource resource Object old Value map get location if old Value null return false if old Value instanceof I Resource if resource equals old Value map remove location return true return false Array List list Array List old Value boolean was Removed list remove resource if list size 0 map remove location return was Removed  IPath IResource oldValue oldValue oldValue IResource oldValue ArrayList ArrayList oldValue wasRemoved wasRemoved
interface Doit public void doit I Resource resource  IResource
public void doit I Resource match don t record the resource we re computing aliases against as a match if match get Full Path is Prefix Of search Path return I Path alias Path null switch match get Type case I Resource PROJECT first check if there is a linked resource that blocks the project location if suffix segment Count 0 I Resource test Resource I Project match find Member suffix segment 0 if test Resource null test Resource is Linked return there is an alias under this project alias Path match get Full Path append suffix break case I Resource FOLDER alias Path match get Full Path append suffix break case I Resource FILE if suffix segment Count 0 alias Path match get Full Path break if alias Path null if alias Type I Resource FILE aliases add workspace get Root get File alias Path else if alias Path segment Count 1 aliases add workspace get Root get Project alias Path last Segment else aliases add workspace get Root get Folder alias Path  IResource getFullPath isPrefixOf searchPath IPath aliasPath getType IResource segmentCount IResource testResource IProject findMember testResource testResource isLinked aliasPath getFullPath IResource aliasPath getFullPath IResource segmentCount aliasPath getFullPath aliasPath aliasType IResource getRoot getFile aliasPath aliasPath segmentCount getRoot getProject aliasPath lastSegment getRoot getFolder aliasPath
Sets the resource that we are searching for aliases for public void set Search Alias I Resource alias Resource this alias Type alias Resource get Type this search Path alias Resource get Full Path  setSearchAlias IResource aliasResource aliasType aliasResource getType searchPath aliasResource getFullPath
Collection collection public void set Collection Collection collection this collection collection  setCollection
public void doit I Resource resource collection add resource  IResource
protected final Workspace workspace public Alias Manager Workspace workspace this workspace workspace  AliasManager
private void add To Locations Map I Project project I Path location project get Location if location null locations Map add location project try I Resource members project members if members null look for linked resources for int i 0 i members length i if members i is Linked add To Locations Map members i catch Core Exception e skip inaccessible projects  addToLocationsMap IProject IPath getLocation locationsMap IResource isLinked addToLocationsMap CoreException
private void add To Locations Map I Resource linked Resource I Path location linked Resource get Location if location null if locations Map add location linked Resource linked Resource Count  addToLocationsMap IResource linkedResource IPath linkedResource getLocation locationsMap linkedResource linkedResourceCount
Builds the table of aliased projects from scratch private void build Aliased Projects Set aliased Projects clear if there are no linked resources then there can t be any aliased projects if linked Resource Count 0 paranoid check count should never be below zero Assert is True linked Resource Count 0 Linked resource count below zero NON NLS 1 return for every resource that overlaps another marked its project as aliased add To Collection set Collection aliased Projects locations Map over Lapping Resources Do add To Collection  buildAliasedProjectsSet aliasedProjects linkedResourceCount isTrue linkedResourceCount addToCollection setCollection aliasedProjects locationsMap overLappingResourcesDo addToCollection
Builds the table of resource locations from scratch Also computes an initial value for the linked resource counter private void build Locations Map locations Map clear linked Resource Count 0 build table of I Path file system location I Resource project or linked resource I Project projects workspace get Root get Projects for int i 0 i projects length i add To Locations Map projects i  buildLocationsMap locationsMap linkedResourceCount IPath IResource IProject getRoot getProjects addToLocationsMap
Returns all aliases of the given resource or null if there are none public I Resource compute Aliases final I Resource resource I Path location nothing to do if we are or were in an alias free workspace or project if has No Aliases resource return null aliases clear internal Compute Aliases resource location int size aliases size if size 0 return null return I Resource aliases to Array new I Resource size  IResource computeAliases IResource IPath hasNoAliases internalComputeAliases IResource toArray IResource
Computes the aliases of the given resource at the given location and adds them to the aliases collection private void internal Compute Aliases I Resource resource I Path location I Path search Location location null resource get Location location if the location is invalid then there won t be any aliases to update if search Location null return suffix Path EMPTY int segment Count search Location segment Count find Aliases set Search Alias resource Walk up the location segments for this resource looking for a resource with a matching location All matches are then added to the aliases set for locations Map matching Resources Do search Location find Aliases if segment Count 0 break suffix new Path search Location last Segment append suffix search Location search Location remove Last Segments 1  internalComputeAliases IResource IPath IPath searchLocation getLocation searchLocation segmentCount searchLocation segmentCount findAliases setSearchAlias locationsMap matchingResourcesDo searchLocation findAliases segmentCount searchLocation lastSegment searchLocation searchLocation removeLastSegments
Returns true if this resource is guaranteed to have no aliases and false otherwise private boolean has No Aliases final I Resource resource check if we re in an aliased project or workspace before updating structure changes In the deletion case we need to know if the resource was in an aliased project before deletion I Project project resource get Project boolean no Aliases linked Resource Count 0 aliased Projects contains project now update any structure changes and check again if an update is needed if structure Changes is Empty update Structure Changes no Aliases linked Resource Count 0 aliased Projects contains project return no Aliases  hasNoAliases IResource IProject getProject noAliases linkedResourceCount aliasedProjects structureChanges isEmpty updateStructureChanges noAliases linkedResourceCount aliasedProjects noAliases
Returns all aliases of this resource and any aliases of subtrees of this resource Returns null if no aliases are found private void compute Deep Aliases I Resource resource I Path location if the location is invalid then there won t be any aliases to update if location null return get the normal aliases resources rooted in parent locations internal Compute Aliases resource location get all resources rooted below this resource s location add To Collection set Collection aliases locations Map matching Prefix Do location add To Collection if this is a project get all resources rooted below links in this project if resource get Type I Resource PROJECT try I Resource members I Project resource members for int i 0 i members length i if members i is Linked I Path link Location members i get Location if link Location null locations Map matching Prefix Do link Location add To Collection catch Core Exception e skip inaccessible projects  computeDeepAliases IResource IPath internalComputeAliases addToCollection setCollection locationsMap matchingPrefixDo addToCollection getType IResource IResource IProject isLinked IPath linkLocation getLocation linkLocation locationsMap matchingPrefixDo linkLocation addToCollection CoreException
return new Comparator public int compare Object o1 Object o2 I Path path1 I Path o1 I Path path2 I Path o2 int segment Count1 path1 segment Count int segment Count2 path2 segment Count for int i 0 i segment Count1 i segment Count2 i String segment1 path1 segment i String segment2 path2 segment i int compare segment1 compare To segment2 if compare 0 return compare all segments are equal so they are the same if they have the same number of segments return segment Count1 segment Count2  IPath IPath IPath IPath segmentCount1 segmentCount segmentCount2 segmentCount segmentCount1 segmentCount2 compareTo segmentCount1 segmentCount2
Returns the comparator to use when sorting the locations map Comparison is based on segments so that paths with the most segments in common will always be adjacent This is equivalent to the natural order on the path strings with the extra condition that the path separator is ordered before all other characters Ex foo foo zzz fooaaa protected Comparator get Comparator return new Comparator public int compare Object o1 Object o2 I Path path1 I Path o1 I Path path2 I Path o2 int segment Count1 path1 segment Count int segment Count2 path2 segment Count for int i 0 i segment Count1 i segment Count2 i String segment1 path1 segment i String segment2 path2 segment i int compare segment1 compare To segment2 if compare 0 return compare all segments are equal so they are the same if they have the same number of segments return segment Count1 segment Count2  getComparator IPath IPath IPath IPath segmentCount1 segmentCount segmentCount2 segmentCount segmentCount1 segmentCount2 compareTo segmentCount1 segmentCount2
public void handle Event Lifecycle Event event throws Core Exception We can t determine the end state for most operations because they may fail after we receive pre notification In these cases we remember the invalidated resources and recompute their state lazily on the next alias request switch event kind case Lifecycle Event PRE PROJECT CLOSE case Lifecycle Event PRE PROJECT DELETE remove From Locations Map I Project event resource fall through case Lifecycle Event PRE PROJECT CREATE case Lifecycle Event PRE PROJECT OPEN structure Changes add event resource break case Lifecycle Event PRE LINK DELETE remove From Locations Map event resource fall through case Lifecycle Event PRE LINK CREATE structure Changes add event resource break case Lifecycle Event PRE PROJECT COPY case Lifecycle Event PRE LINK COPY structure Changes add event new Resource break case Lifecycle Event PRE PROJECT MOVE remove From Locations Map I Project event resource structure Changes add event new Resource break case Lifecycle Event PRE LINK MOVE remove From Locations Map event resource structure Changes add event new Resource break  handleEvent LifecycleEvent CoreException LifecycleEvent PRE_PROJECT_CLOSE LifecycleEvent PRE_PROJECT_DELETE removeFromLocationsMap IProject LifecycleEvent PRE_PROJECT_CREATE LifecycleEvent PRE_PROJECT_OPEN structureChanges LifecycleEvent PRE_LINK_DELETE removeFromLocationsMap LifecycleEvent PRE_LINK_CREATE structureChanges LifecycleEvent PRE_PROJECT_COPY LifecycleEvent PRE_LINK_COPY structureChanges newResource LifecycleEvent PRE_PROJECT_MOVE removeFromLocationsMap IProject structureChanges newResource LifecycleEvent PRE_LINK_MOVE removeFromLocationsMap structureChanges newResource
private void remove From Locations Map I Project project remove this project and all linked children from the location table I Path location project get Location if location null locations Map remove location project try I Resource children project members if children null for int i 0 i children length i if children i is Linked remove From Locations Map children i catch Core Exception e ignore inaccessible projects  removeFromLocationsMap IProject IPath getLocation locationsMap IResource isLinked removeFromLocationsMap CoreException
private void remove From Locations Map I Resource linked Resource this linked resource is being deleted I Path location linked Resource get Location if location null if locations Map remove location linked Resource linked Resource Count  removeFromLocationsMap IResource linkedResource IPath linkedResource getLocation locationsMap linkedResource linkedResourceCount
see I Manager shutdown I Progress Monitor public void shutdown I Progress Monitor monitor throws Core Exception do nothing  IManager IProgressMonitor IProgressMonitor CoreException
public void startup I Progress Monitor monitor throws Core Exception workspace add Lifecycle Listener this build Locations Map build Aliased Projects Set  IProgressMonitor CoreException addLifecycleListener buildLocationsMap buildAliasedProjectsSet
The file underlying the given resource has changed on disk Compute all aliases for this resource and update them This method will not attempt to incur any units of work on the given progress monitor but it may update the subtask to reflect what aliases are being updated param resource the resource to compute aliases for param location the file system location of the resource passed as a parameter because in the project deletion case the resource is no longer accessible at time of update param depth whether to search for aliases on all children of the given resource Only depth ZERO and INFINITE are used public void update Aliases I Resource resource I Path location int depth I Progress Monitor monitor throws Core Exception if has No Aliases resource return aliases clear if depth I Resource DEPTH ZERO internal Compute Aliases resource location else compute Deep Aliases resource location if aliases size 0 return File System Resource Manager local Manager workspace get File System Manager for Iterator it aliases iterator it has Next I Resource alias I Resource it next monitor sub Task Policy bind links updating Duplicate alias get Full Path to String NON NLS 1 local Manager refresh alias I Resource DEPTH INFINITE false null  updateAliases IResource IPath IProgressMonitor CoreException hasNoAliases IResource DEPTH_ZERO internalComputeAliases computeDeepAliases FileSystemResourceManager localManager getFileSystemManager hasNext IResource IResource subTask updatingDuplicate getFullPath toString localManager IResource DEPTH_INFINITE
Process any structural changes that have occurred since the last alias request private void update Structure Changes boolean had Changes false for Iterator it structure Changes iterator it has Next I Resource resource I Resource it next if resource exists continue had Changes true if resource get Type I Resource PROJECT add To Locations Map I Project resource else add To Locations Map resource structure Changes clear if had Changes build Aliased Projects Set  updateStructureChanges hadChanges structureChanges hasNext IResource IResource hadChanges getType IResource addToLocationsMap IProject addToLocationsMap structureChanges hadChanges buildAliasedProjectsSet

public Charset Manager Job super Charset Updater NON NLS 1 set System true set Priority Job INTERACTIVE  CharsetManagerJob setSystem setPriority
public void add Changes Set new Changes if new Changes is Empty return synchronized async Changes async Changes add All new Changes async Changes notify schedule  addChanges newChanges newChanges isEmpty asyncChanges asyncChanges addAll newChanges asyncChanges
public I Project get Next Change synchronized async Changes return async Changes is Empty null I Project async Changes remove async Changes size 1  IProject getNextChange asyncChanges asyncChanges isEmpty IProject asyncChanges asyncChanges
protected I Status run I Progress Monitor monitor I Project next Multi Status result new Multi Status Resources Plugin PI RESOURCES I Resource Status FAILED SETTING CHARSET Policy bind resources updating Encoding null NON NLS 1 while next get Next Change null just exit if the system is shutting down or has been shut down it is too late to change the workspace at this point anyway if system Bundle get State Bundle ACTIVE return Status OK STATUS try get Preferences next flush catch Backing Store Exception e we got an error saving String message Policy bind resources saving Encoding NON NLS 1 result add new Resource Status I Resource Status FAILED SETTING CHARSET next get Full Path message e return result NON NLS 1  IStatus IProgressMonitor IProject MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus FAILED_SETTING_CHARSET updatingEncoding getNextChange systemBundle getState OK_STATUS getPreferences BackingStoreException savingEncoding ResourceStatus IResourceStatus FAILED_SETTING_CHARSET getFullPath
public boolean should Run synchronized async Changes return async Changes is Empty  shouldRun asyncChanges asyncChanges isEmpty
private void process Entry Changes I Resource Delta project Delta Set projects To Save check each resource with user set encoding to see if it has been moved deleted boolean resource Changes false I Project current Project I Project project Delta get Resource Preferences project Prefs get Preferences current Project String affected Resources try affected Resources project Prefs keys catch Backing Store Exception e problems with the project scope we gonna miss the changes but will log String message Policy bind resources reading Encoding NON NLS 1 Resources Plugin get Plugin get Log log new Resource Status I Resource Status FAILED GETTING CHARSET current Project get Full Path message e return for int i 0 i affected Resources length i I Resource Delta member Delta project Delta find Member new Path affected Resources i no changes for the given resource if member Delta null continue if member Delta get Kind I Resource Delta REMOVED resource Changes true remove the setting for the original location save its value though String current Value project Prefs get affected Resources i null project Prefs remove affected Resources i if member Delta get Flags I Resource Delta MOVED TO 0 if moving copy the setting for the new location I Project target Project workspace get Root get Project member Delta get Moved To Path segment 0 Preferences target Prefs get Preferences target Project target Prefs put get Key For member Delta get Moved To Path current Value if target Project current Project projects To Save add target Project if resource Changes projects To Save add current Project  processEntryChanges IResourceDelta projectDelta projectsToSave resourceChanges IProject currentProject IProject projectDelta getResource projectPrefs getPreferences currentProject affectedResources affectedResources projectPrefs BackingStoreException readingEncoding ResourcesPlugin getPlugin getLog ResourceStatus IResourceStatus FAILED_GETTING_CHARSET currentProject getFullPath affectedResources IResourceDelta memberDelta projectDelta findMember affectedResources memberDelta memberDelta getKind IResourceDelta resourceChanges currentValue projectPrefs affectedResources projectPrefs affectedResources memberDelta getFlags IResourceDelta MOVED_TO IProject targetProject getRoot getProject memberDelta getMovedToPath targetPrefs getPreferences targetProject targetPrefs getKeyFor memberDelta getMovedToPath currentValue targetProject currentProject projectsToSave targetProject resourceChanges projectsToSave currentProject
For any change to the encoding file or any resource with encoding set just discard the cache for the corresponding project public void resource Changed I Resource Change Event event I Resource Delta delta event get Delta if delta null return I Resource Delta project Deltas delta get Affected Children process each project in the delta Set projects To Save new Hash Set for int i 0 i project Deltas length i nothing to do if a project has been added removed moved if project Deltas i get Kind I Resource Delta CHANGED project Deltas i get Flags I Resource Delta OPEN 0 process Entry Changes project Deltas i projects To Save job add Changes projects To Save  resourceChanged IResourceChangeEvent IResourceDelta getDelta IResourceDelta projectDeltas getAffectedChildren projectsToSave HashSet projectDeltas projectDeltas getKind IResourceDelta projectDeltas getFlags IResourceDelta processEntryChanges projectDeltas projectsToSave addChanges projectsToSave
Workspace workspace public Charset Manager Workspace workspace this workspace workspace  CharsetManager
public String get Charset For I Path resource Path return get Charset For resource Path false  getCharsetFor IPath resourcePath getCharsetFor resourcePath
public String get Charset For I Path resource Path boolean recurse Assert is Legal resource Path segment Count 1 I Project project workspace get Root get Project resource Path segment 0 Preferences encoding Settings get Preferences project return internal Get Charset For resource Path encoding Settings recurse  getCharsetFor IPath resourcePath isLegal resourcePath segmentCount IProject getRoot getProject resourcePath encodingSettings getPreferences internalGetCharsetFor resourcePath encodingSettings
private String internal Get Charset For I Path resource Path Preferences encoding Settings boolean recurse String charset encoding Settings get get Key For resource Path null if recurse return charset while charset null resource Path segment Count 1 resource Path resource Path remove Last Segments 1 charset encoding Settings get get Key For resource Path null ensure we default to the workspace encoding if none is found return charset null Resources Plugin get Encoding charset  internalGetCharsetFor IPath resourcePath encodingSettings encodingSettings getKeyFor resourcePath resourcePath segmentCount resourcePath resourcePath removeLastSegments encodingSettings getKeyFor resourcePath ResourcesPlugin getEncoding
String get Key For I Path resource Path return resource Path segment Count 1 resource Path remove First Segments 1 to String PROJECT KEY  getKeyFor IPath resourcePath resourcePath segmentCount resourcePath removeFirstSegments toString PROJECT_KEY
Preferences get Preferences I Project project return new Project Scope project get Node Resources Plugin PI RESOURCES node ENCODING PREF NODE  getPreferences IProject ProjectScope getNode ResourcesPlugin PI_RESOURCES ENCODING_PREF_NODE
public void set Charset For I Path resource Path String new Charset throws Core Exception Assert is Legal resource Path segment Count 1 I Project project workspace get Root get Project resource Path segment 0 Preferences encoding Settings get Preferences project if new Charset null new Charset trim length 0 encoding Settings remove get Key For resource Path else encoding Settings put get Key For resource Path new Charset try save changes encoding Settings flush catch Backing Store Exception e String message Policy bind resources saving Encoding NON NLS 1 throw new Resource Exception I Resource Status FAILED SETTING CHARSET project get Full Path message e  setCharsetFor IPath resourcePath newCharset CoreException isLegal resourcePath segmentCount IProject getRoot getProject resourcePath encodingSettings getPreferences newCharset newCharset encodingSettings getKeyFor resourcePath encodingSettings getKeyFor resourcePath newCharset encodingSettings BackingStoreException savingEncoding ResourceException IResourceStatus FAILED_SETTING_CHARSET getFullPath
public void shutdown I Progress Monitor monitor workspace remove Resource Change Listener listener  IProgressMonitor removeResourceChangeListener
public void startup I Progress Monitor monitor throws Core Exception job new Charset Manager Job listener new Listener workspace add Resource Change Listener listener I Resource Change Event POST CHANGE  IProgressMonitor CoreException CharsetManagerJob addResourceChangeListener IResourceChangeEvent POST_CHANGE

Prevent class from being instantiated private Compute Project Order not allowed  ComputeProjectOrder
Creates a new vertex with the given id param id the vertex id public Vertex Object id this id id 
Creates a new empty directed graph object p After this graph s vertexes and edges are defined with code add Vertex code and code add Edge code call code freeze code to indicate that the graph is all there and then call code ids ByDFS Finish Time code to read off the vertexes ordered by DFS finish time p public Digraph super  addVertex addEdge idsByDFSFinishTime
Freezes this graph No more vertexes or edges can be added to this graph after this method is called Has no effect if the graph is already frozen public void freeze if initialized initialized true only perform depth first search once DFS 
Defines a new vertex with the given id The depth first search is performed in the relative order in which vertexes were added to the graph param id the id of the vertex exception Illegal Argument Exception if the vertex id is already defined or if the graph is frozen public void add Vertex Object id throws Illegal Argument Exception if initialized throw new Illegal Argument Exception Vertex vertex new Vertex id Object existing vertex Map put id vertex nip problems with duplicate vertexes in the bud if existing null throw new Illegal Argument Exception vertex List add vertex  IllegalArgumentException addVertex IllegalArgumentException IllegalArgumentException vertexMap IllegalArgumentException vertexList
Adds a new directed edge between the vertexes with the given ids Vertexes for the given ids must be defined beforehand with code add Vertex code The depth first search is performed in the relative order in which adjacent to vertexes were added to a given from index param from Id the id of the from vertex param to Id the id of the to vertex exception Illegal Argument Exception if either vertex is undefined or if the graph is frozen public void add Edge Object from Id Object to Id throws Illegal Argument Exception if initialized throw new Illegal Argument Exception Vertex from Vertex Vertex vertex Map get from Id Vertex to Vertex Vertex vertex Map get to Id nip problems with bogus vertexes in the bud if from Vertex null throw new Illegal Argument Exception if to Vertex null throw new Illegal Argument Exception from Vertex adjacent add to Vertex  addVertex fromId toId IllegalArgumentException addEdge fromId toId IllegalArgumentException IllegalArgumentException fromVertex vertexMap fromId toVertex vertexMap toId fromVertex IllegalArgumentException toVertex IllegalArgumentException fromVertex toVertex
Returns the ids of the vertexes in this graph ordered by depth first search finish time The graph must be frozen param increasing code true code if objects are to be arranged into increasing order of depth first search finish time and code false code if objects are to be arranged into decreasing order of depth first search finish time return the list of ids ordered by depth first search finish time element type code Object code exception Illegal Argument Exception if the graph is not frozen public List ids ByDFS Finish Time boolean increasing if initialized throw new Illegal Argument Exception int len vertex List size Object r new Object len for Iterator allV vertex List iterator allV has Next Vertex vertex Vertex allV next int f vertex finish Time note that finish times start at 1 not 0 if increasing r f 1 vertex id else r len f vertex id return Arrays as List r  IllegalArgumentException idsByDFSFinishTime IllegalArgumentException vertexList vertexList hasNext finishTime asList
Returns whether the graph contains cycles The graph must be frozen return code true code if this graph contains at least one cycle and code false code if this graph is cycle free exception Illegal Argument Exception if the graph is not frozen public boolean contains Cycles if initialized throw new Illegal Argument Exception return cycles  IllegalArgumentException containsCycles IllegalArgumentException
Returns the non trivial components of this graph A non trivial component is a set of 2 or more vertexes that were traversed together The graph must be frozen return the possibly empty list of non trivial components where each component is an array of ids element type code Object code exception Illegal Argument Exception if the graph is not frozen public List non Trivial Components if initialized throw new Illegal Argument Exception find the roots of each component Map Vertex List Object components Map components new Hash Map for Iterator it vertex List iterator it has Next Vertex vertex Vertex it next if vertex predecessor null this vertex is the root of a component if component is non trivial we will hit a child else find the root ancestor of this vertex Vertex root vertex while root predecessor null root root predecessor List component List components get root if component null component new Array List 2 component add root id components put root component component add vertex id List result new Array List components size for Iterator it components values iterator it has Next List component List it next if component size 1 result add component to Array return result  IllegalArgumentException nonTrivialComponents IllegalArgumentException HashMap vertexList hasNext ArrayList ArrayList hasNext toArray
Performs a depth first search of this graph and records interesting info with each vertex including DFS finish time Does not employ recursion private void DFS state machine rendition of the standard recursive DFS algorithm int state final int NEXT VERTEX 1 final int START DFS VISIT 2 final int NEXT ADJACENT 3 final int AFTER NEXTED DFS VISIT 4 use precomputed objects to avoid garbage final Integer NEXT VERTEX OBJECT new Integer NEXT VERTEX final Integer AFTER NEXTED DFS VISIT OBJECT new Integer AFTER NEXTED DFS VISIT initialize all vertex color initially Vertex WHITE all vertex predecessor initially null time 0 for a stack append to the end of an array based list List stack new Array List Math max 1 vertex List size Iterator all Adjacent null Vertex vertex null Iterator allV vertex List iterator state NEXT VERTEX next State Loop while true switch state case NEXT VERTEX on entry allV contains vertexes yet to be visited if allV has Next all done break next State Loop Vertex next Vertex Vertex allV next if next Vertex color Vertex WHITE stack add NEXT VERTEX OBJECT vertex next Vertex state START DFS VISIT continue next State Loop else state NEXT VERTEX continue next State Loop case START DFS VISIT on entry vertex contains the vertex to be visited top of stack is return code mark the vertex as discovered vertex color Vertex GREY all Adjacent vertex adjacent iterator state NEXT ADJACENT continue next State Loop case NEXT ADJACENT on entry all Adjacent contains adjacent vertexes to be visited vertex contains vertex being visited if all Adjacent has Next Vertex adj Vertex Vertex all Adjacent next if adj Vertex color Vertex WHITE explore edge from vertex to adj Vertex adj Vertex predecessor vertex stack add all Adjacent stack add vertex stack add AFTER NEXTED DFS VISIT OBJECT vertex adj Vertex state START DFS VISIT continue next State Loop if adj Vertex color Vertex GREY back edge grey means visit in progress cycles true state NEXT ADJACENT continue next State Loop else done exploring vertex vertex color Vertex BLACK time vertex finish Time time state Integer stack remove stack size 1 int Value continue next State Loop case AFTER NEXTED DFS VISIT on entry stack contains vertex and all Ajacent vertex Vertex stack remove stack size 1 all Adjacent Iterator stack remove stack size 1 state NEXT ADJACENT continue next State Loop  NEXT_VERTEX START_DFS_VISIT NEXT_ADJACENT AFTER_NEXTED_DFS_VISIT NEXT_VERTEX_OBJECT NEXT_VERTEX AFTER_NEXTED_DFS_VISIT_OBJECT AFTER_NEXTED_DFS_VISIT ArrayList vertexList allAdjacent vertexList NEXT_VERTEX nextStateLoop NEXT_VERTEX hasNext nextStateLoop nextVertex nextVertex NEXT_VERTEX_OBJECT nextVertex START_DFS_VISIT nextStateLoop NEXT_VERTEX nextStateLoop START_DFS_VISIT allAdjacent NEXT_ADJACENT nextStateLoop NEXT_ADJACENT allAdjacent allAdjacent hasNext adjVertex allAdjacent adjVertex adjVertex adjVertex allAdjacent AFTER_NEXTED_DFS_VISIT_OBJECT adjVertex START_DFS_VISIT nextStateLoop adjVertex NEXT_ADJACENT nextStateLoop finishTime intValue nextStateLoop AFTER_NEXTED_DFS_VISIT allAjacent allAdjacent NEXT_ADJACENT nextStateLoop
Sorts the given list of probject in a manner that honors the given project reference relationships That is if project A references project B then the resulting order will list B before A if possible For graphs that do not contain cycles the result is the same as a conventional topological sort For graphs containing cycles the order is based on ordering the strongly connected components of the graph This has the effect of keeping each knot of projects together without otherwise affecting the order of projects not involved in a cycle For a graph G the algorithm performs in O G space and time p When there is an arbitrary choice vertexes are ordered as supplied Arranged projects in descending alphabetical order generally results in an order that builds A before Z when there are no other constraints p p Ref Cormen Leiserson and Rivest it Introduction to Algorithms it Mc Graw Hill 1990 The strongly connected components algorithm is in section 23 5 p param projects a list of projects element type code I Project code param references a list of project references A B meaning that A references B element type code I Project code return an object describing the resulting project order static I Workspace Project Order compute Project Order Sorted Set projects List references Step 1 Create the graph object final Digraph g1 new Digraph add vertexes for Iterator it projects iterator it has Next I Project project I Project it next g1 add Vertex project add edges for Iterator it references iterator it has Next I Project ref I Project it next I Project p ref 0 I Project q ref 1 p has a project reference to q therefore create an edge from q to p to cause q to come before p in eventual result g1 add Edge q p g1 freeze Step 2 Create the transposed graph This time define the vertexes in decreasing order of depth first finish time in g1 interchange to and from to reverse edges from g1 final Digraph g2 new Digraph add vertexes List resorted Vertexes g1 ids ByDFS Finish Time false for Iterator it resorted Vertexes iterator it has Next final I Project project I Project it next g2 add Vertex project add edges for Iterator it references iterator it has Next I Project ref I Project it next I Project p ref 0 I Project q ref 1 p has a project reference to q therefore create an edge from p to q N B this is the reverse of step 1 g2 add Edge p q g2 freeze Step 3 Return the vertexes in increasing order of depth first finish time in g2 List sorted Project List g2 ids ByDFS Finish Time true I Project ordered Projects new I Project sorted Project List size sorted Project List to Array ordered Projects I Project knots boolean has Cycles g2 contains Cycles if has Cycles List knot List g2 non Trivial Components knots new I Project knot List size cannot use knot List to Array knots because each knot is Object and we need each to be an I Project int k 0 for Iterator it knot List iterator it has Next Object knot Object it next I Project knot Copy new I Project knot length for int i 0 i knot length i knot Copy i I Project knot i knots k knot Copy k else knots new I Project return new I Workspace Project Order ordered Projects has Cycles knots  McGraw IProject IProject IWorkspace ProjectOrder computeProjectOrder SortedSet hasNext IProject IProject addVertex hasNext IProject IProject IProject IProject addEdge resortedVertexes idsByDFSFinishTime resortedVertexes hasNext IProject IProject addVertex hasNext IProject IProject IProject IProject addEdge sortedProjectList idsByDFSFinishTime IProject orderedProjects IProject sortedProjectList sortedProjectList toArray orderedProjects IProject hasCycles containsCycles hasCycles knotList nonTrivialComponents IProject knotList knotList toArray IProject knotList hasNext IProject knotCopy IProject knotCopy IProject knotCopy IProject IWorkspace ProjectOrder orderedProjects hasCycles

public abstract class Container extends Resource implements I Container protected Container I Path path Workspace container super path container  IContainer IPath
Converts this resource and all its children into phantoms by modifying their resource infos in place public void convert To Phantom throws Core Exception if is Phantom return super convert To Phantom I Resource members members I Container INCLUDE PHANTOMS I Container INCLUDE TEAM PRIVATE MEMBERS for int i 0 i members length i Resource members i convert To Phantom  convertToPhantom CoreException isPhantom convertToPhantom IResource IContainer INCLUDE_PHANTOMS IContainer INCLUDE_TEAM_PRIVATE_MEMBERS convertToPhantom
see I Container exists I Path public boolean exists I Path child Path return workspace get Resource Info get Full Path append child Path false false null  IContainer IPath IPath childPath getResourceInfo getFullPath childPath
see I Container find Member String public I Resource find Member String name return find Member name false  IContainer findMember IResource findMember findMember
public I Resource find Member String name boolean phantom I Path child Path get Full Path append name Resource Info info workspace get Resource Info child Path phantom false return info null null workspace new Resource child Path info get Type  IResource findMember IPath childPath getFullPath ResourceInfo getResourceInfo childPath newResource childPath getType
see I Container find Member I Path public I Resource find Member I Path child Path return find Member child Path false  IContainer findMember IPath IResource findMember IPath childPath findMember childPath
public I Resource find Member I Path child Path boolean phantom child Path get Full Path append child Path Resource Info info workspace get Resource Info child Path phantom false return info null null workspace new Resource child Path info get Type  IResource findMember IPath childPath childPath getFullPath childPath ResourceInfo getResourceInfo childPath newResource childPath getType
protected void fixup After Move Source throws Core Exception super fixup After Move Source if synchronizing get Resource Info true false return I Resource members members I Container INCLUDE PHANTOMS I Container INCLUDE TEAM PRIVATE MEMBERS for int i 0 i members length i Resource members i fixup After Move Source  fixupAfterMoveSource CoreException fixupAfterMoveSource getResourceInfo IResource IContainer INCLUDE_PHANTOMS IContainer INCLUDE_TEAM_PRIVATE_MEMBERS fixupAfterMoveSource
protected I Resource get Children Container parent boolean phantom return get Children parent get Full Path phantom  IResource getChildren getChildren getFullPath
protected I Resource get Children I Path parent Path boolean phantom I Path children null try children workspace tree get Children parent Path catch Illegal Argument Exception e concurrency problem the container has been deleted by another thread during this call Just return empty children set if children null children length 0 return I Core Constants EMPTY RESOURCE ARRAY Resource result new Resource children length int j 0 for int i 0 i children length i Resource Info info workspace get Resource Info children i phantom false if info null result j workspace new Resource children i info get Type if j result length return result Resource trimmed Result new Resource j System arraycopy result 0 trimmed Result 0 j return trimmed Result  IResource getChildren IPath parentPath IPath getChildren parentPath IllegalArgumentException ICoreConstants EMPTY_RESOURCE_ARRAY ResourceInfo getResourceInfo newResource getType trimmedResult trimmedResult trimmedResult
public I File get File String name return I File workspace new Resource get Full Path append name FILE  IFile getFile IFile newResource getFullPath
see I Container get File I Path public I File get File I Path child Path return I File workspace new Resource get Full Path append child Path FILE  IContainer getFile IPath IFile getFile IPath childPath IFile newResource getFullPath childPath
public I Folder get Folder String name return I Folder workspace new Resource get Full Path append name FOLDER  IFolder getFolder IFolder newResource getFullPath
see I Container get Folder I Path public I Folder get Folder I Path child Path return I Folder workspace new Resource get Full Path append child Path FOLDER  IContainer getFolder IPath IFolder getFolder IPath childPath IFolder newResource getFullPath childPath
public boolean is Local int flags int depth if super is Local flags depth return false if depth DEPTH ZERO return true if depth DEPTH ONE depth DEPTH ZERO get the children via the workspace since we know that this resource exists it is local I Resource children get Children this false for int i 0 i children length i if children i is Local depth return false return true  isLocal isLocal DEPTH_ZERO DEPTH_ONE DEPTH_ZERO IResource getChildren isLocal
see I Container members public I Resource members throws Core Exception forward to central method return members I Resource NONE  IContainer IResource CoreException IResource
see I Container members boolean public I Resource members boolean phantom throws Core Exception forward to central method return members phantom INCLUDE PHANTOMS I Resource NONE  IContainer IResource CoreException INCLUDE_PHANTOMS IResource
public I Resource members int member Flags throws Core Exception final boolean phantom member Flags INCLUDE PHANTOMS 0 Resource Info info get Resource Info phantom false check Exists get Flags info true I Resource all Members get Children this phantom if team private members are wanted return the whole list if member Flags INCLUDE TEAM PRIVATE MEMBERS 0 return all Members filter out team private members if any int team Private Member Count 0 make a quick first pass to see if there is anything to exclude for int i 0 i all Members length i Resource child Resource all Members i Resource Info child Info child get Resource Info phantom false if is Team Private Member get Flags child Info team Private Member Count all Members i null null array entry so we know not to include it common case nothing to exclude if team Private Member Count 0 return all Members make a second pass to copy the ones we want I Resource reduced Members new I Resource all Members length team Private Member Count int next Position 0 for int i 0 i all Members length i Resource child Resource all Members i if child null reduced Members next Position child return reduced Members  IResource memberFlags CoreException memberFlags INCLUDE_PHANTOMS ResourceInfo getResourceInfo checkExists getFlags IResource allMembers getChildren memberFlags INCLUDE_TEAM_PRIVATE_MEMBERS allMembers teamPrivateMemberCount allMembers allMembers ResourceInfo childInfo getResourceInfo isTeamPrivateMember getFlags childInfo teamPrivateMemberCount allMembers teamPrivateMemberCount allMembers IResource reducedMembers IResource allMembers teamPrivateMemberCount nextPosition allMembers allMembers reducedMembers nextPosition reducedMembers
see I Container get Default Charset public String get Default Charset throws Core Exception return get Default Charset true  IContainer getDefaultCharset getDefaultCharset CoreException getDefaultCharset
public I File find Deleted Members With History int depth I Progress Monitor monitor throws Core Exception History Store history Store get Local Manager get History Store I Path base Path get Full Path I Workspace Root root get Workspace get Root Set deleted Files new Hash Set if depth I Resource DEPTH ZERO this folder might have been a file in a past life if history Store get States base Path length 0 I File file root get File base Path if file exists deleted Files add file else Set all File Paths history Store all Files base Path depth convert I Paths to I Files keeping only files that no longer exist for Iterator it all File Paths iterator it has Next I Path file Path I Path it next I File file root get File file Path if file exists deleted Files add file return I File deleted Files to Array new I File deleted Files size  IFile findDeletedMembersWithHistory IProgressMonitor CoreException HistoryStore historyStore getLocalManager getHistoryStore IPath basePath getFullPath IWorkspaceRoot getWorkspace getRoot deletedFiles HashSet IResource DEPTH_ZERO historyStore getStates basePath IFile getFile basePath deletedFiles allFilePaths historyStore allFiles basePath IPaths IFiles allFilePaths hasNext IPath filePath IPath IFile getFile filePath deletedFiles IFile deletedFiles toArray IFile deletedFiles
public void set Default Charset String charset throws Core Exception Resource Info info get Resource Info false false check Accessible get Flags info workspace get Charset Manager set Charset For get Full Path charset  setDefaultCharset CoreException ResourceInfo getResourceInfo checkAccessible getFlags getCharsetManager setCharsetFor getFullPath
public void set Default Charset String charset I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String message Policy bind resources setting Default Charset Container get Full Path to String NON NLS 1 monitor begin Task message Policy total Work need to get the project as a scheduling rule because we might be creating a new folder file to hold the project settings final I Scheduling Rule rule workspace get Rule Factory modify Rule get Project try workspace prepare Operation rule monitor Resource Info info get Resource Info false false check Accessible get Flags info workspace begin Operation true TODO https bugs eclipse org bugs show bug cgi id 59899 Changing the encoding needs to notify clients workspace get Charset Manager set Charset For get Full Path charset monitor worked Policy op Work catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  setDefaultCharset IProgressMonitor CoreException monitorFor settingDefaultCharsetContainer getFullPath toString beginTask totalWork ISchedulingRule getRuleFactory modifyRule getProject prepareOperation ResourceInfo getResourceInfo checkAccessible getFlags beginOperation show_bug getCharsetManager setCharsetFor getFullPath opWork OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork

private Cache cache Cache get Cache return cache  getCache
public I Content Description get Description For File file Resource Info info throws Core Exception first look for cached description information to avoid looking in the cache don t need to copy the info because the modified bits are not in the deltas if info null return null int flags info get Flags if flags I Core Constants M NO CONTENT DESCRIPTION 0 return null if flags I Core Constants M DEFAULT CONTENT DESCRIPTION 0 I Content Type Manager content Type Manager Platform get Content Type Manager I Content Type type content Type Manager find Content Type For file get Name if type null return Content Type type get Default Description make sure no cached information is set on the info info clear I Core Constants M CONTENT CACHE tries to get a description from the cache synchronized to prevent concurrent modification in the cache synchronized this Cache Entry entry cache get Entry file get Full Path if entry null entry get Timestamp info get Content Id there was a description in the cache and it was up to date return I Content Description entry get Cached either we didn t find a description in the cache or it was not up to date has to be read again I Content Description new Description read Description file if new Description null no content type exists for this file name contents info set I Core Constants M NO CONTENT DESCRIPTION return null if it is a default description for the default type we don t have to cache if Content Type new Description get Content Type get Default Description new Description I Content Type default For Name Platform get Content Type Manager find Content Type For file get Name if new Description get Content Type default For Name the default content description is enough for this file info set I Core Constants M DEFAULT CONTENT DESCRIPTION return new Description we actually got a description filled by a describer or a default description for a non obvious type if entry null there was none creates one entry cache add Entry file get Full Path new Description info get Content Id else entry set Timestamp info get Content Id entry set Cached new Description return new Description  IContentDescription getDescriptionFor ResourceInfo CoreException getFlags ICoreConstants M_NO_CONTENT_DESCRIPTION ICoreConstants M_DEFAULT_CONTENT_DESCRIPTION IContentTypeManager contentTypeManager getContentTypeManager IContentType contentTypeManager findContentTypeFor getName ContentType getDefaultDescription ICoreConstants M_CONTENT_CACHE getEntry getFullPath getTimestamp getContentId IContentDescription getCached IContentDescription newDescription readDescription newDescription ICoreConstants M_NO_CONTENT_DESCRIPTION ContentType newDescription getContentType getDefaultDescription newDescription IContentType defaultForName getContentTypeManager findContentTypeFor getName newDescription getContentType defaultForName ICoreConstants M_DEFAULT_CONTENT_DESCRIPTION newDescription addEntry getFullPath newDescription getContentId setTimestamp getContentId setCached newDescription newDescription
Tries to obtain a content description for the given file private I Content Description read Description File file throws Core Exception tries to obtain a description for this file contents I Content Type Manager content Type Manager Platform get Content Type Manager Input Stream contents file get Contents true try I Content Description new Description content Type Manager get Description For contents file get Name I Content Description ALL update or initialize description and modification stamp return new Description catch IO Exception e String message Policy bind resources error Content Description file get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED DESCRIBING CONTENTS file get Full Path message e finally file ensure Closed contents  IContentDescription readDescription CoreException IContentTypeManager contentTypeManager getContentTypeManager InputStream getContents IContentDescription newDescription contentTypeManager getDescriptionFor getName IContentDescription newDescription IOException errorContentDescription getFullPath toString ResourceException IResourceStatus FAILED_DESCRIBING_CONTENTS getFullPath ensureClosed
public void shutdown I Progress Monitor monitor throws Core Exception cache discard All cache null  IProgressMonitor CoreException discardAll
public void startup I Progress Monitor monitor throws Core Exception cache new Cache 100 1000 0 1  IProgressMonitor CoreException

public Delayed Snapshot Job Save Manager manager super MSG SNAPSHOT this save Manager manager set Rule Resources Plugin get Workspace get Root set System true  DelayedSnapshotJob SaveManager MSG_SNAPSHOT saveManager setRule ResourcesPlugin getWorkspace getRoot setSystem
public I Status run I Progress Monitor monitor if monitor is Canceled return Status CANCEL STATUS if Resources Plugin get Workspace null return Status OK STATUS I Status result Status OK STATUS try Event Stats start Snapshot result save Manager save I Save Context SNAPSHOT null Policy monitor For null catch Core Exception e result e get Status finally save Manager operation Count 0 save Manager snapshot Requested false Event Stats end Snapshot return result  IStatus IProgressMonitor isCanceled CANCEL_STATUS ResourcesPlugin getWorkspace OK_STATUS IStatus OK_STATUS EventStats startSnapshot saveManager ISaveContext monitorFor CoreException getStatus saveManager operationCount saveManager snapshotRequested EventStats endSnapshot

public class File extends Resource implements I File protected File I Path path Workspace container super path container  IFile IPath
public void append Contents Input Stream content int update Flags I Progress Monitor monitor throws Core Exception final boolean force update Flags I Resource FORCE 0 final boolean keep History update Flags I Resource KEEP HISTORY 0 monitor Policy monitor For monitor try String message Policy bind resources setting Contents get Full Path to String NON NLS 1 monitor begin Task message Policy total Work Assert is Not Null content Content cannot be null NON NLS 1 if workspace should Validate workspace validate Save this final I Scheduling Rule rule workspace get Rule Factory modify Rule this try workspace prepare Operation rule monitor Resource Info info get Resource Info false false check Accessible get Flags info workspace begin Operation true internal Set Contents content get Local Manager location For this force keep History true Policy sub Monitor For monitor Policy op Work catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  appendContents InputStream updateFlags IProgressMonitor CoreException updateFlags IResource keepHistory updateFlags IResource KEEP_HISTORY monitorFor settingContents getFullPath toString beginTask totalWork isNotNull shouldValidate validateSave ISchedulingRule getRuleFactory modifyRule prepareOperation ResourceInfo getResourceInfo checkAccessible getFlags beginOperation internalSetContents getLocalManager locationFor keepHistory subMonitorFor opWork OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
public void append Contents Input Stream content boolean force boolean keep History I Progress Monitor monitor throws Core Exception funnel all operations to central method int update Flags force I Resource FORCE I Resource NONE update Flags keep History I Resource KEEP HISTORY I Resource NONE append Contents content update Flags monitor  appendContents InputStream keepHistory IProgressMonitor CoreException updateFlags IResource IResource updateFlags keepHistory IResource KEEP_HISTORY IResource appendContents updateFlags
Changes this file to be a folder in the resource tree and returns the newly created folder All related properties are deleted It is assumed that on disk the resource is already a folder directory so no action is taken to delete the disk contents p b This method is for the exclusive use of the local resource manager b public I Folder change To Folder throws Core Exception get Property Manager delete Properties this I Resource DEPTH ZERO I Folder result workspace get Root get Folder path if is Linked I Path location get Raw Location delete I Resource NONE null result create Link location I Resource ALLOW MISSING LOCAL null else workspace delete Resource this workspace create Resource result false return result  IFolder changeToFolder CoreException getPropertyManager deleteProperties IResource DEPTH_ZERO IFolder getRoot getFolder isLinked IPath getRawLocation IResource createLink IResource ALLOW_MISSING_LOCAL deleteResource createResource
public void create Input Stream content int update Flags I Progress Monitor monitor throws Core Exception final boolean force update Flags I Resource FORCE 0 final boolean monitor Null monitor null monitor Policy monitor For monitor try String message monitor Null Policy bind resources creating get Full Path to String NON NLS 1 NON NLS 2 monitor begin Task message Policy total Work check Valid Path path FILE true final I Scheduling Rule rule workspace get Rule Factory create Rule this try workspace prepare Operation rule monitor check Does Not Exist Container parent Container get Parent Resource Info info parent get Resource Info false false parent check Accessible get Flags info workspace begin Operation true I Path location get Local Manager location For this location can be null if based on an undefined variable if location null message Policy bind localstore location Undefined get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL get Full Path message null java io File local File location to File if force if Core File System Library is Case Sensitive if local File exists String name get Local Manager get Local Name local File if name null local File get Name equals name delete true null else The file system is not case sensitive and there is already a file under this location message Policy bind resources exists Local Different Case location remove Last Segments 1 append name toOS String NON NLS 1 throw new Resource Exception I Resource Status CASE VARIANT EXISTS get Full Path message null else if local File exists return an appropriate error message for case variant collisions if Core File System Library is Case Sensitive String name get Local Manager get Local Name local File if name null local File get Name equals name message Policy bind resources exists Local Different Case location remove Last Segments 1 append name toOS String NON NLS 1 throw new Resource Exception I Resource Status CASE VARIANT EXISTS get Full Path message null message Policy bind resources file Exists local File get Absolute Path NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE LOCAL get Full Path message null monitor worked Policy op Work 40 100 workspace create Resource this false boolean local content null if local try internal Set Contents content location force false false Policy sub Monitor For monitor Policy op Work 60 100 catch Core Exception e a problem happened creating the file on disk so delete from the workspace and disk workspace delete Resource this local File delete throw e rethrow internal Set Local local DEPTH ZERO if local get Resource Info true true set Modification Stamp I Resource NULL STAMP catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done ensure Closed content  InputStream updateFlags IProgressMonitor CoreException updateFlags IResource monitorNull monitorFor monitorNull getFullPath toString beginTask totalWork checkValidPath ISchedulingRule getRuleFactory createRule prepareOperation checkDoesNotExist getParent ResourceInfo getResourceInfo checkAccessible getFlags beginOperation IPath getLocalManager locationFor locationUndefined getFullPath toString ResourceException IResourceStatus FAILED_READ_LOCAL getFullPath localFile toFile CoreFileSystemLibrary isCaseSensitive localFile getLocalManager getLocalName localFile localFile getName existsLocalDifferentCase removeLastSegments toOSString ResourceException IResourceStatus CASE_VARIANT_EXISTS getFullPath localFile CoreFileSystemLibrary isCaseSensitive getLocalManager getLocalName localFile localFile getName existsLocalDifferentCase removeLastSegments toOSString ResourceException IResourceStatus CASE_VARIANT_EXISTS getFullPath fileExists localFile getAbsolutePath ResourceException IResourceStatus FAILED_WRITE_LOCAL getFullPath opWork createResource internalSetContents subMonitorFor opWork CoreException deleteResource localFile internalSetLocal DEPTH_ZERO getResourceInfo setModificationStamp IResource NULL_STAMP OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork ensureClosed
see I File create Input Stream boolean I Progress Monitor public void create Input Stream content boolean force I Progress Monitor monitor throws Core Exception funnel all operations to central method create content force I Resource FORCE I Resource NONE monitor  IFile InputStream IProgressMonitor InputStream IProgressMonitor CoreException IResource IResource
I File API methods require that the stream be closed regardless of the success of the method This method makes a best effort at closing the stream and ignores any resulting IO Exception protected void ensure Closed Input Stream stream if stream null try stream close catch IO Exception e ignore  IFile IOException ensureClosed InputStream IOException
see I File get Charset public String get Charset throws Core Exception return get Charset true  IFile getCharset getCharset CoreException getCharset
public String get Charset boolean check Implicit throws Core Exception non existing resources default to parent s charset Resource Info info get Resource Info false false int flags get Flags info if exists flags false return check Implicit workspace get Charset Manager get Charset For get Full Path remove Last Segments 1 true null if there is a file specific user setting use it String charset workspace get Charset Manager get Charset For get Full Path false if charset null check Implicit return charset tries to obtain a description for the file contents I Content Description description workspace get Content Description Manager get Description For this info if description null String content Charset description get Charset if content Charset null return content Charset could not find out the encoding based on the contents default to parent s return workspace get Charset Manager get Charset For get Full Path remove Last Segments 1 true  getCharset checkImplicit CoreException ResourceInfo getResourceInfo getFlags checkImplicit getCharsetManager getCharsetFor getFullPath removeLastSegments getCharsetManager getCharsetFor getFullPath checkImplicit IContentDescription getContentDescriptionManager getDescriptionFor contentCharset getCharset contentCharset contentCharset getCharsetManager getCharsetFor getFullPath removeLastSegments
public I Content Description get Content Description throws Core Exception Resource Info info get Resource Info false false int flags get Flags info check Accessible flags check Local flags DEPTH ZERO return workspace get Content Description Manager get Description For this info  IContentDescription getContentDescription CoreException ResourceInfo getResourceInfo getFlags checkAccessible checkLocal DEPTH_ZERO getContentDescriptionManager getDescriptionFor
see I File get Contents public Input Stream get Contents throws Core Exception return get Contents false  IFile getContents InputStream getContents CoreException getContents
public Input Stream get Contents boolean force throws Core Exception Resource Info info get Resource Info false false int flags get Flags info check Accessible flags check Local flags DEPTH ZERO return get Local Manager read this force null  InputStream getContents CoreException ResourceInfo getResourceInfo getFlags checkAccessible checkLocal DEPTH_ZERO getLocalManager
see I File get Encoding deprecated public int get Encoding throws Core Exception Resource Info info get Resource Info false false int flags get Flags info check Accessible flags check Local flags DEPTH ZERO return get Local Manager get Encoding this  IFile getEncoding getEncoding CoreException ResourceInfo getResourceInfo getFlags checkAccessible checkLocal DEPTH_ZERO getLocalManager getEncoding
see I File get History I Progress Monitor public I File State get History I Progress Monitor monitor throws Core Exception FIXME monitor is not used return get Local Manager get History Store get States get Full Path  IFile getHistory IProgressMonitor IFileState getHistory IProgressMonitor CoreException getLocalManager getHistoryStore getStates getFullPath
see I Resource get Type public int get Type return FILE  IResource getType getType
protected void internal Set Contents Input Stream content I Path location boolean force boolean keep History boolean append I Progress Monitor monitor throws Core Exception if content null content new Byte Array Input Stream new byte 0 get Local Manager write this location content force keep History append monitor Resource Info info get Resource Info false true info increment Content Id info clear M CONTENT CACHE workspace update Modification Stamp info update Project Description workspace get Alias Manager update Aliases this location I Resource DEPTH ZERO monitor  internalSetContents InputStream IPath keepHistory IProgressMonitor CoreException ByteArrayInputStream getLocalManager keepHistory ResourceInfo getResourceInfo incrementContentId M_CONTENT_CACHE updateModificationStamp updateProjectDescription getAliasManager updateAliases IResource DEPTH_ZERO
Optimized refresh Local for files This implementation does not block the workspace for the common case where the file exists both locally and on the file system and is in sync For all other cases it defers to the super implementation public void refresh Local int depth I Progress Monitor monitor throws Core Exception if get Local Manager fast Is Synchronized this super refresh Local I Resource DEPTH ZERO monitor  refreshLocal refreshLocal IProgressMonitor CoreException getLocalManager fastIsSynchronized refreshLocal IResource DEPTH_ZERO
see I File set Contents I File State int I Progress Monitor public void set Contents I File State content int update Flags I Progress Monitor monitor throws Core Exception set Contents content get Contents update Flags monitor  IFile setContents IFileState IProgressMonitor setContents IFileState updateFlags IProgressMonitor CoreException setContents getContents updateFlags
public void set Contents Input Stream content int update Flags I Progress Monitor monitor throws Core Exception final boolean force update Flags I Resource FORCE 0 final boolean keep History update Flags I Resource KEEP HISTORY 0 monitor Policy monitor For monitor try String message Policy bind resources setting Contents get Full Path to String NON NLS 1 monitor begin Task message Policy total Work if workspace should Validate workspace validate Save this final I Scheduling Rule rule workspace get Rule Factory modify Rule this try workspace prepare Operation rule monitor Resource Info info get Resource Info false false check Accessible get Flags info workspace begin Operation true internal Set Contents content get Local Manager location For this force keep History false Policy sub Monitor For monitor Policy op Work catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done ensure Closed content  setContents InputStream updateFlags IProgressMonitor CoreException updateFlags IResource keepHistory updateFlags IResource KEEP_HISTORY monitorFor settingContents getFullPath toString beginTask totalWork shouldValidate validateSave ISchedulingRule getRuleFactory modifyRule prepareOperation ResourceInfo getResourceInfo checkAccessible getFlags beginOperation internalSetContents getLocalManager locationFor keepHistory subMonitorFor opWork OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork ensureClosed
public long set Local Time Stamp long value throws Core Exception override to handle changing timestamp on project description file long result super set Local Time Stamp value if path segment Count 2 path segment 1 equals I Project Description DESCRIPTION FILE NAME handle concurrent project deletion Resource Info project Info Project get Project get Resource Info false false if project Info null get Local Manager update Local Sync project Info result return result  setLocalTimeStamp CoreException setLocalTimeStamp segmentCount IProjectDescription DESCRIPTION_FILE_NAME ResourceInfo projectInfo getProject getResourceInfo projectInfo getLocalManager updateLocalSync projectInfo
If this file represents a project description file project then force an update on the project s description This method is called whenever it is discovered that a file has been modified added removed or changed public void update Project Description throws Core Exception if path segment Count 2 path segment 1 equals I Project Description DESCRIPTION FILE NAME Project get Project update Description  updateProjectDescription CoreException segmentCount IProjectDescription DESCRIPTION_FILE_NAME getProject updateDescription
public void set Charset String new Charset throws Core Exception Resource Info info get Resource Info false false check Accessible get Flags info workspace get Charset Manager set Charset For get Full Path new Charset  setCharset newCharset CoreException ResourceInfo getResourceInfo checkAccessible getFlags getCharsetManager setCharsetFor getFullPath newCharset
public void set Charset String new Charset I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String message Policy bind resources setting Charset get Full Path to String NON NLS 1 monitor begin Task message Policy total Work need to get the project as a scheduling rule because we might be creating a new folder file to hold the project settings final I Scheduling Rule rule workspace get Rule Factory modify Rule get Project try workspace prepare Operation rule monitor Resource Info info get Resource Info false false check Accessible get Flags info workspace begin Operation true TODO https bugs eclipse org bugs show bug cgi id 59899 Changing the encoding needs to notify clients workspace get Charset Manager set Charset For get Full Path new Charset monitor worked Policy op Work catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  setCharset newCharset IProgressMonitor CoreException monitorFor settingCharset getFullPath toString beginTask totalWork ISchedulingRule getRuleFactory modifyRule getProject prepareOperation ResourceInfo getResourceInfo checkAccessible getFlags beginOperation show_bug getCharsetManager setCharsetFor getFullPath newCharset opWork OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
public void set Contents Input Stream content boolean force boolean keep History I Progress Monitor monitor throws Core Exception funnel all operations to central method int update Flags force I Resource FORCE I Resource NONE update Flags keep History I Resource KEEP HISTORY I Resource NONE set Contents content update Flags monitor  setContents InputStream keepHistory IProgressMonitor CoreException updateFlags IResource IResource updateFlags keepHistory IResource KEEP_HISTORY IResource setContents updateFlags
public void set Contents I File State source boolean force boolean keep History I Progress Monitor monitor throws Core Exception funnel all operations to central method int update Flags force I Resource FORCE I Resource NONE update Flags keep History I Resource KEEP HISTORY I Resource NONE set Contents source get Contents update Flags monitor  setContents IFileState keepHistory IProgressMonitor CoreException updateFlags IResource IResource updateFlags keepHistory IResource KEEP_HISTORY IResource setContents getContents updateFlags

public File State History Store store I Path full Path long last Modified Universal Unique Identifier uuid this store store this last Modified last Modified this uuid uuid this full Path full Path  FileState HistoryStore IPath fullPath lastModified UniversalUniqueIdentifier lastModified lastModified fullPath fullPath
see I File State exists public boolean exists return store exists this  IFileState
public String get Charset throws Core Exception tries to obtain a description for the file contents I Content Type Manager content Type Manager Platform get Content Type Manager Input Stream contents new Buffered Input Stream get Contents boolean failed false try I Content Description description content Type Manager get Description For contents get Name new Qualified Name I Content Description CHARSET return description null null description get Charset catch IO Exception e failed true String message Policy bind history error Content Description get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED DESCRIBING CONTENTS get Full Path message e finally if contents null try contents close catch IO Exception e if failed String message Policy bind history error Content Description get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED DESCRIBING CONTENTS get Full Path message e  getCharset CoreException IContentTypeManager contentTypeManager getContentTypeManager InputStream BufferedInputStream getContents IContentDescription contentTypeManager getDescriptionFor getName QualifiedName IContentDescription getCharset IOException errorContentDescription getFullPath toString ResourceException IResourceStatus FAILED_DESCRIBING_CONTENTS getFullPath IOException errorContentDescription getFullPath toString ResourceException IResourceStatus FAILED_DESCRIBING_CONTENTS getFullPath
see I File State get Contents public Input Stream get Contents throws Core Exception return store get Contents this  IFileState getContents InputStream getContents CoreException getContents
see I File State get Full Path public I Path get Full Path return full Path  IFileState getFullPath IPath getFullPath fullPath
see I File State get Modification Time public long get Modification Time return last Modified  IFileState getModificationTime getModificationTime lastModified
see I File State get Name public String get Name return full Path last Segment  IFileState getName getName fullPath lastSegment
public Universal Unique Identifier getUUID return uuid  UniversalUniqueIdentifier
see I File State is Read Only public boolean is Read Only return true  IFileState isReadOnly isReadOnly
Returns a string representation of this object Used for debug only public String to String String Buffer s new String Buffer s append File State uuid NON NLS 1 s append uuid to String s append last Modified NON NLS 1 s append last Modified s append return s to String  toString StringBuffer StringBuffer FileState toString lastModified lastModified toString

public class Folder extends Container implements I Folder protected Folder I Path path Workspace container super path container  IFolder IPath
protected void assert Create Requirements I Path location int update Flags throws Core Exception check Does Not Exist Container parent Container get Parent Resource Info info parent get Resource Info false false parent check Accessible get Flags info if location null String message Policy bind localstore location Undefined get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE LOCAL get Full Path message null java io File local File location to File final boolean force update Flags I Resource FORCE 0 if force local File exists return an appropriate error message for case variant collisions if Core File System Library is Case Sensitive String name get Local Manager get Local Name local File if name null local File get Name equals name String msg Policy bind resources exists Local Different Case location remove Last Segments 1 append name toOS String NON NLS 1 throw new Resource Exception I Resource Status CASE VARIANT EXISTS get Full Path msg null String msg Policy bind resources file Exists local File get Absolute Path NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE LOCAL get Full Path msg null  assertCreateRequirements IPath updateFlags CoreException checkDoesNotExist getParent ResourceInfo getResourceInfo checkAccessible getFlags locationUndefined getFullPath toString ResourceException IResourceStatus FAILED_WRITE_LOCAL getFullPath localFile toFile updateFlags IResource localFile CoreFileSystemLibrary isCaseSensitive getLocalManager getLocalName localFile localFile getName existsLocalDifferentCase removeLastSegments toOSString ResourceException IResourceStatus CASE_VARIANT_EXISTS getFullPath fileExists localFile getAbsolutePath ResourceException IResourceStatus FAILED_WRITE_LOCAL getFullPath
public I File change To File throws Core Exception get Property Manager delete Properties this I Resource DEPTH INFINITE I File result workspace get Root get File path if is Linked I Path location get Raw Location delete I Resource NONE null result create Link location I Resource ALLOW MISSING LOCAL null else workspace delete Resource this workspace create Resource result false return result  IFile changeToFile CoreException getPropertyManager deleteProperties IResource DEPTH_INFINITE IFile getRoot getFile isLinked IPath getRawLocation IResource createLink IResource ALLOW_MISSING_LOCAL deleteResource createResource
public void create int update Flags boolean local I Progress Monitor monitor throws Core Exception final boolean force update Flags I Resource FORCE 0 monitor Policy monitor For monitor try String message Policy bind resources creating get Full Path to String NON NLS 1 monitor begin Task message Policy total Work check Valid Path path FOLDER true final I Scheduling Rule rule workspace get Rule Factory create Rule this try workspace prepare Operation rule monitor I Path location get Local Manager location For this assert Create Requirements location update Flags workspace begin Operation true java io File local File location to File if force Core File System Library is Case Sensitive local File exists String name get Local Manager get Local Name local File if name null local File get Name equals name delete true null else The file system is not case sensitive and a case variant exists at this location String msg Policy bind resources exists Local Different Case location remove Last Segments 1 append name toOS String NON NLS 1 throw new Resource Exception I Resource Status CASE VARIANT EXISTS get Full Path msg null internal Create force local Policy sub Monitor For monitor Policy op Work workspace get Alias Manager update Aliases this get Location I Resource DEPTH ZERO monitor catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  updateFlags IProgressMonitor CoreException updateFlags IResource monitorFor getFullPath toString beginTask totalWork checkValidPath ISchedulingRule getRuleFactory createRule prepareOperation IPath getLocalManager locationFor assertCreateRequirements updateFlags beginOperation localFile toFile CoreFileSystemLibrary isCaseSensitive localFile getLocalManager getLocalName localFile localFile getName existsLocalDifferentCase removeLastSegments toOSString ResourceException IResourceStatus CASE_VARIANT_EXISTS getFullPath internalCreate subMonitorFor opWork getAliasManager updateAliases getLocation IResource DEPTH_ZERO OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
see I Folder create boolean boolean I Progress Monitor public void create boolean force boolean local I Progress Monitor monitor throws Core Exception funnel all operations to central method create force I Resource FORCE I Resource NONE local monitor  IFolder IProgressMonitor IProgressMonitor CoreException IResource IResource
Ensures that this folder exists in the workspace This is similar in concept to mkdirs but it does not work on projects If this folder is created it will be marked as being local public void ensure Exists I Progress Monitor monitor throws Core Exception Resource Info info get Resource Info false false int flags get Flags info if exists flags true return if exists flags false String message Policy bind resources folder Over File get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status RESOURCE WRONG TYPE get Full Path message null Container parent Container get Parent if parent get Type PROJECT info parent get Resource Info false false parent check Exists get Flags info true else Folder parent ensure Exists monitor internal Create true true monitor  ensureExists IProgressMonitor CoreException ResourceInfo getResourceInfo getFlags folderOverFile getFullPath toString ResourceException IResourceStatus RESOURCE_WRONG_TYPE getFullPath getParent getType getResourceInfo checkExists getFlags ensureExists internalCreate
public String get Default Charset boolean check Implicit throws Core Exception non existing resources default to parent s charset if exists return check Implicit workspace get Charset Manager get Charset For get Full Path remove Last Segments 1 true null return workspace get Charset Manager get Charset For get Full Path check Implicit  getDefaultCharset checkImplicit CoreException checkImplicit getCharsetManager getCharsetFor getFullPath removeLastSegments getCharsetManager getCharsetFor getFullPath checkImplicit
see I Resource get Type public int get Type return FOLDER  IResource getType getType
public void internal Create boolean force boolean local I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String message Policy bind resources creating get Full Path to String NON NLS 1 monitor begin Task message Policy total Work workspace create Resource this false if local try get Local Manager write this force Policy sub Monitor For monitor Policy total Work 75 100 catch Core Exception e a problem happened creating the folder on disk so delete from the workspace workspace delete Resource this throw e rethrow set Local local DEPTH ZERO Policy sub Monitor For monitor Policy total Work 25 100 if local get Resource Info true true set Modification Stamp I Resource NULL STAMP finally monitor done  internalCreate IProgressMonitor CoreException monitorFor getFullPath toString beginTask totalWork createResource getLocalManager subMonitorFor totalWork CoreException deleteResource setLocal DEPTH_ZERO subMonitorFor totalWork getResourceInfo setModificationStamp IResource NULL_STAMP

public interface I Manager public void shutdown I Progress Monitor monitor throws Core Exception  IManager IProgressMonitor CoreException
public void shutdown I Progress Monitor monitor throws Core Exception public void startup I Progress Monitor monitor throws Core Exception  IProgressMonitor CoreException IProgressMonitor CoreException

public interface I Marker Set Element public long get Id  IMarkerSetElement getId

Internal implementation of Team Hook set Rules For I Project I Resource Rule Factory protected void set Rule Factory I Project project I Resource Rule Factory factory Workspace workspace Workspace project get Workspace Rules workspace get Rule Factory set Rule Factory project factory  TeamHook setRulesFor IProject IResourceRuleFactory setRuleFactory IProject IResourceRuleFactory getWorkspace getRuleFactory setRuleFactory

private Workspace workspace public Internal Workspace Job String name super name this workspace Workspace Resources Plugin get Workspace  InternalWorkspaceJob ResourcesPlugin getWorkspace
public final I Status run I Progress Monitor monitor monitor Policy monitor For monitor try monitor begin Task null Policy total Work int depth 1 try workspace prepare Operation null monitor workspace begin Operation true depth workspace get Work Manager begin Unprotected return run In Workspace Policy sub Monitor For monitor Policy op Work Sub Progress Monitor PREPEND MAIN LABEL TO SUBTASK catch Operation Canceled Exception e workspace get Work Manager operation Canceled return Status CANCEL STATUS finally if depth 0 workspace get Work Manager end Unprotected depth workspace end Operation null false Policy sub Monitor For monitor Policy build Work catch Core Exception e return e get Status finally monitor done  IStatus IProgressMonitor monitorFor beginTask totalWork prepareOperation beginOperation getWorkManager beginUnprotected runInWorkspace subMonitorFor opWork SubProgressMonitor PREPEND_MAIN_LABEL_TO_SUBTASK OperationCanceledException getWorkManager operationCanceled CANCEL_STATUS getWorkManager endUnprotected endOperation subMonitorFor buildWork CoreException getStatus
protected abstract I Status run In Workspace I Progress Monitor monitor throws Core Exception  IStatus runInWorkspace IProgressMonitor CoreException

public Link Description I Resource linked Resource I Path location super Assert is Not Null linked Resource Assert is Not Null location this type linked Resource get Type this name linked Resource get Name this local Location location  LinkDescription IResource linkedResource IPath isNotNull linkedResource isNotNull linkedResource getType linkedResource getName localLocation
public Link Description String name int type I Path local Location this name name this type type this local Location local Location  LinkDescription IPath localLocation localLocation localLocation
public Link Description this name NON NLS 1 this type 1 this local Location Path EMPTY  LinkDescription localLocation
public boolean equals Object o if o get Class Link Description class return false Link Description other Link Description o return local Location equals other local Location type other type  getClass LinkDescription LinkDescription LinkDescription localLocation localLocation
public I Path get Location return local Location  IPath getLocation localLocation
public String get Name return name  getName
public int get Type return type  getType
public int hash Code return type local Location hash Code  hashCode localLocation hashCode
public void set Name String name this name name  setName
public void set Type int type this type type  setType
public void set Location I Path location this local Location location  setLocation IPath localLocation

package static final String F TREE tree NON NLS 1 public Local Meta Area super  F_TREE LocalMetaArea
For backwards compatibility if there is a project at the old project description location delete it public void clear Old Description I Project target Workspace clear get Old Description Location For target to File  clearOldDescription IProject getOldDescriptionLocationFor toFile
public void create I Project target java io File file location For target to File make sure area is empty Workspace clear file file mkdirs  IProject locationFor toFile
Creates the meta area root directory public synchronized void create Meta Area throws Core Exception java io File workspace Location get Location to File Workspace clear workspace Location if workspace Location mkdirs String message Policy bind resources write Workspace Meta workspace Location to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE METADATA null message null  createMetaArea CoreException workspaceLocation getLocation toFile workspaceLocation workspaceLocation writeWorkspaceMeta workspaceLocation toString ResourceException IResourceStatus FAILED_WRITE_METADATA
The project is being deleted Delete all meta data associated with the project public void delete I Project target throws Core Exception I Path path location For target if Workspace clear path to File path to File exists String message Policy bind resources delete Meta target get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED DELETE METADATA target get Full Path message null  IProject CoreException IPath locationFor toFile toFile deleteMeta getFullPath toString ResourceException IResourceStatus FAILED_DELETE_METADATA getFullPath
public I Path get Backup Location For I Path file return file remove Last Segments 1 append file last Segment F BACKUP FILE EXTENSION  IPath getBackupLocationFor IPath removeLastSegments lastSegment F_BACKUP_FILE_EXTENSION
The project description file is the only metadata file stored outside the metadata area It is stored as a file directly under the project location For backwards compatibility we also have to check for a project file at the old location in the metadata area public I Path get Old Description Location For I Project target return location For target append F OLD PROJECT  IPath getOldDescriptionLocationFor IProject locationFor F_OLD_PROJECT
public I Path get History Store Location return get Location append F HISTORY STORE  IPath getHistoryStoreLocation getLocation F_HISTORY_STORE
Returns the local filesystem location which contains the META data for the resources plugin i e the entire workspace public I Path get Location if meta Area Location null meta Area Location Resources Plugin get Plugin get State Location return meta Area Location  IPath getLocation metaAreaLocation metaAreaLocation ResourcesPlugin getPlugin getStateLocation metaAreaLocation
Returns the path of the file in which to save markers for the given resource Should only be called for the workspace root and projects public I Path get Markers Location For I Resource resource Assert is Not Null resource Assert is Legal resource get Type I Resource ROOT resource get Type I Resource PROJECT return location For resource append F MARKERS  IPath getMarkersLocationFor IResource isNotNull isLegal getType IResource getType IResource locationFor F_MARKERS
Returns the path of the file in which to snapshot markers for the given resource Should only be called for the workspace root and projects public I Path get Markers Snapshot Location For I Resource resource return get Markers Location For resource add File Extension F SNAP EXTENSION  IPath getMarkersSnapshotLocationFor IResource getMarkersLocationFor addFileExtension F_SNAP_EXTENSION
public I Path get Property Store Location I Resource resource int type resource get Type Assert is True type I Resource FILE type I Resource FOLDER return location For resource append F PROPERTIES  IPath getPropertyStoreLocation IResource getType isTrue IResource IResource locationFor F_PROPERTIES
public I Path get Safe Table Location For String plugin Id I Path prefix get Location append F SAFE TABLE if the plugin is the resources plugin we return the master table location if plugin Id equals Resources Plugin PI RESOURCES return prefix append plugin Id master table int save Number get Workspace get Save Manager get Save Number plugin Id return prefix append plugin Id save Number NON NLS 1  IPath getSafeTableLocationFor pluginId IPath getLocation F_SAFE_TABLE pluginId ResourcesPlugin PI_RESOURCES pluginId saveNumber getWorkspace getSaveManager getSaveNumber pluginId pluginId saveNumber
public I Path get Snapshot Location For I Resource resource return get Location append F SNAP  IPath getSnapshotLocationFor IResource getLocation F_SNAP
Returns the path of the file in which to save the sync information for the given resource Should only be called for the workspace root and projects public I Path get Sync Info Location For I Resource resource Assert is Not Null resource Assert is Legal resource get Type I Resource ROOT resource get Type I Resource PROJECT return location For resource append F SYNCINFO  IPath getSyncInfoLocationFor IResource isNotNull isLegal getType IResource getType IResource locationFor F_SYNCINFO
Returns the path of the file in which to snapshot the sync information for the given resource Should only be called for the workspace root and projects public I Path get Sync Info Snapshot Location For I Resource resource return get Sync Info Location For resource add File Extension F SNAP EXTENSION  IPath getSyncInfoSnapshotLocationFor IResource getSyncInfoLocationFor addFileExtension F_SNAP_EXTENSION
Returns the local file system location of the tree file for the given resource This file does not follow the same save number as its plug in So the number here is called sequence number and not save number to avoid confusion public I Path get Tree Location For I Resource target boolean update Sequence Number I Path key target get Full Path append F TREE String sequence Number get Workspace get Save Manager get Master Table get Property key to String if sequence Number null sequence Number 0 NON NLS 1 if update Sequence Number int n new Integer sequence Number int Value 1 n n 0 1 n sequence Number new Integer n to String get Workspace get Save Manager get Master Table set Property key to String new Integer sequence Number to String return location For target append sequence Number F TREE  IPath getTreeLocationFor IResource updateSequenceNumber IPath getFullPath F_TREE sequenceNumber getWorkspace getSaveManager getMasterTable getProperty toString sequenceNumber sequenceNumber updateSequenceNumber sequenceNumber intValue sequenceNumber toString getWorkspace getSaveManager getMasterTable setProperty toString sequenceNumber toString locationFor sequenceNumber F_TREE
public I Path get Working Location I Resource resource String id return location For resource append id  IPath getWorkingLocation IResource locationFor
protected Workspace get Workspace return Workspace Resources Plugin get Workspace  getWorkspace ResourcesPlugin getWorkspace
public I Path get Old Workspace Description Location return get Location append F DESCRIPTION  IPath getOldWorkspaceDescriptionLocation getLocation F_DESCRIPTION
public boolean has Saved Project I Project project if there is a location file then the project exists return get Old Description Location For project to File exists location For project append F PROJECT LOCATION to File exists  hasSavedProject IProject getOldDescriptionLocationFor toFile locationFor F_PROJECT_LOCATION toFile
public boolean has Saved Workspace throws Core Exception return get Location to File exists get Backup Location For get Location to File exists  hasSavedWorkspace CoreException getLocation toFile getBackupLocationFor getLocation toFile
Returns the local filesystem location in which the meta data for the given resource is stored public I Path location For I Resource resource if resource get Type I Resource ROOT return get Location append F ROOT else return get Location append F PROJECTS append resource get Project get Name  IPath locationFor IResource getType IResource getLocation F_ROOT getLocation F_PROJECTS getProject getName
Returns the portions of the project description that are private and adds them to the supplied project description In particular the project location and the project s dynamic references are stored here The project location will be set to code null code if the default location should be used In the case of failure log the exception and return silently thus reverting to using the default location and no dynamic references The format of the location file for 3 0 is UTF project location int number of dynamic project references UTF project reference 1 repeat for remaining references public void read Private Description I Project target I Project Description description I Path location File location For target append F PROJECT LOCATION java io File file location File to File if file exists location File get Backup Location For location File file location File to File if file exists return try Safe Chunky Input Stream input new Safe Chunky Input Stream file 500 Data Input Stream data In new Data Input Stream input try try String location data In readUTF if location length 0 description set Location new Path location catch IO Exception e String msg Policy bind resources ex Read Project Location target get Name NON NLS 1 Resources Plugin get Plugin get Log log new Resource Status I Status ERROR I Resource Status FAILED READ METADATA target get Full Path msg e try to read the dynamic references will fail for old location files int num Refs data In read Int I Project references new I Project num Refs I Workspace Root root get Workspace get Root for int i 0 i num Refs i references i root get Project data In readUTF description set Dynamic References references finally data In close catch IO Exception e ignore this is an old location file or an exception occurred closing the stream  readPrivateDescription IProject IProjectDescription IPath locationFile locationFor F_PROJECT_LOCATION locationFile toFile locationFile getBackupLocationFor locationFile locationFile toFile SafeChunkyInputStream SafeChunkyInputStream DataInputStream dataIn DataInputStream dataIn setLocation IOException exReadProjectLocation getName ResourcesPlugin getPlugin getLog ResourceStatus IStatus IResourceStatus FAILED_READ_METADATA getFullPath numRefs dataIn readInt IProject IProject numRefs IWorkspaceRoot getWorkspace getRoot numRefs getProject dataIn setDynamicReferences dataIn IOException
Reads and returns the project description for the given project Returns null if there was no project description file on disk Throws an exception if there was any failure to read the project public Project Description read Old Description I Project project throws Core Exception I Path path get Old Description Location For project if path to File exists return null I Path temp Path get Backup Location For path Project Description description null try description new Project Description Reader read path temp Path catch IO Exception e String msg Policy bind resources read Meta project get Name NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA project get Full Path msg e if description null String msg Policy bind resources read Meta project get Name NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA project get Full Path msg null return description  ProjectDescription readOldDescription IProject CoreException IPath getOldDescriptionLocationFor toFile IPath tempPath getBackupLocationFor ProjectDescription ProjectDescriptionReader tempPath IOException readMeta getName ResourceException IResourceStatus FAILED_READ_METADATA getFullPath readMeta getName ResourceException IResourceStatus FAILED_READ_METADATA getFullPath
Provides backward compatibility with existing workspaces based on descriptions public Workspace Description read Old Workspace I Path path get Old Workspace Description Location I Path temp Path get Backup Location For path try Workspace Description old Description Workspace Description new Workspace Description Reader read path temp Path if one of those files exist get rid of them Workspace clear path to File Workspace clear temp Path to File return old Description catch IO Exception e return null  WorkspaceDescription readOldWorkspace IPath getOldWorkspaceDescriptionLocation IPath tempPath getBackupLocationFor WorkspaceDescription oldDescription WorkspaceDescription WorkspaceDescriptionReader tempPath toFile tempPath toFile oldDescription IOException
Write the private project description information including the location and the dynamic project references See tt read Private Description tt for details on the file format public void write Private Description I Project target throws Core Exception I Path location location For target append F PROJECT LOCATION java io File file location to File delete any old location file Workspace clear file don t write anything if there is no interesting private metadata Project Description desc Project target internal Get Description if desc null return final I Path project Location desc get Location final I Project references desc get Dynamic References false final int num Refs references length if project Location null num Refs 0 return write the private metadata file try Safe Chunky Output Stream output new Safe Chunky Output Stream file Data Output Stream data Out new Data Output Stream output try String location String project Location null project Location toOS String NON NLS 1 data Out writeUTF location String data Out write Int num Refs for int i 0 i num Refs i data Out writeUTF references i get Name output succeed finally data Out close catch IO Exception e String message Policy bind resources ex Save Project Location target get Name NON NLS 1 throw new Resource Exception I Resource Status INTERNAL ERROR null message e  readPrivateDescription writePrivateDescription IProject CoreException IPath locationFor F_PROJECT_LOCATION toFile ProjectDescription internalGetDescription IPath projectLocation getLocation IProject getDynamicReferences numRefs projectLocation numRefs SafeChunkyOutputStream SafeChunkyOutputStream DataOutputStream dataOut DataOutputStream locationString projectLocation projectLocation toOSString dataOut locationString dataOut writeInt numRefs numRefs dataOut getName dataOut IOException exSaveProjectLocation getName ResourceException IResourceStatus INTERNAL_ERROR
Writes the workspace description to the local meta area This method is synchronized to prevent multiple current write attempts deprecated should not be called any more workspace preferences are now maintained in the plug in s preferences public synchronized void write Workspace Description description throws Core Exception I Path path get Old Workspace Description Location path to File get Parent File mkdirs I Path temp Path get Backup Location For path try new Model Object Writer write description path temp Path catch IO Exception e String message Policy bind resources write Workspace Meta path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE METADATA null message e  WorkspaceDescription CoreException IPath getOldWorkspaceDescriptionLocation toFile getParentFile IPath tempPath getBackupLocationFor ModelObjectWriter tempPath IOException writeWorkspaceMeta toString ResourceException IResourceStatus FAILED_WRITE_METADATA

Constructs a new marker object Marker I Resource resource long id Assert is Legal resource null this resource resource this id id  IResource isLegal
Checks the given marker info to ensure that it is not null Throws an exception if it is private void check Info Marker Info info throws Core Exception if info null String message Policy bind resources marker Not Found Long to String id NON NLS 1 throw new Resource Exception new Resource Status I Resource Status MARKER NOT FOUND resource get Full Path message  checkInfo MarkerInfo CoreException markerNotFound toString ResourceException ResourceStatus IResourceStatus MARKER_NOT_FOUND getFullPath
see I Marker delete public void delete throws Core Exception final I Scheduling Rule rule get Workspace get Rule Factory marker Rule resource try get Workspace prepare Operation rule null get Workspace begin Operation true get Workspace get Marker Manager remove Marker get Resource get Id finally get Workspace end Operation rule false null  IMarker CoreException ISchedulingRule getWorkspace getRuleFactory markerRule getWorkspace prepareOperation getWorkspace beginOperation getWorkspace getMarkerManager removeMarker getResource getId getWorkspace endOperation
see I Marker equals Object public boolean equals Object object if object instanceof I Marker return false I Marker other I Marker object return id other get Id resource equals other get Resource  IMarker IMarker IMarker IMarker getId getResource
see I Marker exists public boolean exists return get Info null  IMarker getInfo
see I Marker get Attribute String public Object get Attribute String attribute Name throws Core Exception Assert is Not Null attribute Name Marker Info info get Info check Info info return info get Attribute attribute Name  IMarker getAttribute getAttribute attributeName CoreException isNotNull attributeName MarkerInfo getInfo checkInfo getAttribute attributeName
see I Marker get Attribute String int public int get Attribute String attribute Name int default Value Assert is Not Null attribute Name Marker Info info get Info if info null return default Value Object value info get Attribute attribute Name if value instanceof Integer return Integer value int Value return default Value  IMarker getAttribute getAttribute attributeName defaultValue isNotNull attributeName MarkerInfo getInfo defaultValue getAttribute attributeName intValue defaultValue
see I Marker get Attribute String String public String get Attribute String attribute Name String default Value Assert is Not Null attribute Name Marker Info info get Info if info null return default Value Object value info get Attribute attribute Name if value instanceof String return String value return default Value  IMarker getAttribute getAttribute attributeName defaultValue isNotNull attributeName MarkerInfo getInfo defaultValue getAttribute attributeName defaultValue
see I Marker get Attribute String boolean public boolean get Attribute String attribute Name boolean default Value Assert is Not Null attribute Name Marker Info info get Info if info null return default Value Object value info get Attribute attribute Name if value instanceof Boolean return Boolean value boolean Value return default Value  IMarker getAttribute getAttribute attributeName defaultValue isNotNull attributeName MarkerInfo getInfo defaultValue getAttribute attributeName booleanValue defaultValue
see I Marker get Attributes public Map get Attributes throws Core Exception Marker Info info get Info check Info info return info get Attributes  IMarker getAttributes getAttributes CoreException MarkerInfo getInfo checkInfo getAttributes
see I Marker get Attributes String public Object get Attributes String attribute Names throws Core Exception Assert is Not Null attribute Names Marker Info info get Info check Info info return info get Attributes attribute Names  IMarker getAttributes getAttributes attributeNames CoreException isNotNull attributeNames MarkerInfo getInfo checkInfo getAttributes attributeNames
see I Marker get Creation Time public long get Creation Time throws Core Exception Marker Info info get Info check Info info return info get Creation Time  IMarker getCreationTime getCreationTime CoreException MarkerInfo getInfo checkInfo getCreationTime
see I Marker get Id public long get Id return id  IMarker getId getId
protected Marker Info get Info return get Workspace get Marker Manager find Marker Info resource id  MarkerInfo getInfo getWorkspace getMarkerManager findMarkerInfo
see I Marker get Resource public I Resource get Resource return resource  IMarker getResource IResource getResource
see I Marker get Type public String get Type throws Core Exception Marker Info info get Info check Info info return info get Type  IMarker getType getType CoreException MarkerInfo getInfo checkInfo getType
Returns the workspace which manages this marker Returns code null code if this resource does not have an associated resource private Workspace get Workspace return resource null null Workspace resource get Workspace  getWorkspace getWorkspace
public int hash Code return int id resource hash Code  hashCode hashCode
see I Marker is Subtype Of String public boolean is Subtype Of String type throws Core Exception return get Workspace get Marker Manager is Subtype get Type type  IMarker isSubtypeOf isSubtypeOf CoreException getWorkspace getMarkerManager isSubtype getType
see I Marker set Attribute String int public void set Attribute String attribute Name int value throws Core Exception set Attribute attribute Name new Integer value  IMarker setAttribute setAttribute attributeName CoreException setAttribute attributeName
see I Marker set Attribute String Object public void set Attribute String attribute Name Object value throws Core Exception Assert is Not Null attribute Name Workspace workspace get Workspace Marker Manager manager workspace get Marker Manager try workspace prepare Operation null null workspace begin Operation true Marker Info marker Info get Info check Info marker Info only need to generate delta info if none already boolean need Delta manager has Delta resource get Full Path id Marker Info old Info need Delta Marker Info marker Info clone null marker Info set Attribute attribute Name value if manager is Persistent marker Info Resource resource get Resource Info false true set I Core Constants M MARKERS SNAP DIRTY if need Delta Marker Delta delta new Marker Delta I Resource Delta CHANGED resource old Info manager changed Markers resource new Marker Delta delta finally workspace end Operation null false null  IMarker setAttribute setAttribute attributeName CoreException isNotNull attributeName getWorkspace MarkerManager getMarkerManager prepareOperation beginOperation MarkerInfo markerInfo getInfo checkInfo markerInfo needDelta hasDelta getFullPath MarkerInfo oldInfo needDelta MarkerInfo markerInfo markerInfo setAttribute attributeName isPersistent markerInfo getResourceInfo ICoreConstants M_MARKERS_SNAP_DIRTY needDelta MarkerDelta MarkerDelta IResourceDelta oldInfo changedMarkers MarkerDelta endOperation
see I Marker set Attribute String boolean public void set Attribute String attribute Name boolean value throws Core Exception set Attribute attribute Name value Boolean TRUE Boolean FALSE  IMarker setAttribute setAttribute attributeName CoreException setAttribute attributeName
see I Marker set Attributes String Object public void set Attributes String attribute Names Object values throws Core Exception Assert is Not Null attribute Names Assert is Not Null values Workspace workspace get Workspace Marker Manager manager workspace get Marker Manager try workspace prepare Operation null null workspace begin Operation true Marker Info marker Info get Info check Info marker Info only need to generate delta info if none already boolean need Delta manager has Delta resource get Full Path id Marker Info old Info need Delta Marker Info marker Info clone null marker Info set Attributes attribute Names values if manager is Persistent marker Info Resource resource get Resource Info false true set I Core Constants M MARKERS SNAP DIRTY if need Delta Marker Delta delta new Marker Delta I Resource Delta CHANGED resource old Info manager changed Markers resource new Marker Delta delta finally workspace end Operation null false null  IMarker setAttributes setAttributes attributeNames CoreException isNotNull attributeNames isNotNull getWorkspace MarkerManager getMarkerManager prepareOperation beginOperation MarkerInfo markerInfo getInfo checkInfo markerInfo needDelta hasDelta getFullPath MarkerInfo oldInfo needDelta MarkerInfo markerInfo markerInfo setAttributes attributeNames isPersistent markerInfo getResourceInfo ICoreConstants M_MARKERS_SNAP_DIRTY needDelta MarkerDelta MarkerDelta IResourceDelta oldInfo changedMarkers MarkerDelta endOperation
see I Marker set Attributes Map public void set Attributes Map values throws Core Exception Workspace workspace get Workspace Marker Manager manager workspace get Marker Manager try workspace prepare Operation null null workspace begin Operation true Marker Info marker Info get Info check Info marker Info only need to generate delta info if none already boolean need Delta manager has Delta resource get Full Path id Marker Info old Info need Delta Marker Info marker Info clone null marker Info set Attributes values if manager is Persistent marker Info Resource resource get Resource Info false true set I Core Constants M MARKERS SNAP DIRTY if need Delta Marker Delta delta new Marker Delta I Resource Delta CHANGED resource old Info manager changed Markers resource new Marker Delta delta finally workspace end Operation null false null  IMarker setAttributes setAttributes CoreException getWorkspace MarkerManager getMarkerManager prepareOperation beginOperation MarkerInfo markerInfo getInfo checkInfo markerInfo needDelta hasDelta getFullPath MarkerInfo oldInfo needDelta MarkerInfo markerInfo markerInfo setAttributes isPersistent markerInfo getResourceInfo ICoreConstants M_MARKERS_SNAP_DIRTY needDelta MarkerDelta MarkerDelta IResourceDelta oldInfo changedMarkers MarkerDelta endOperation
void set Id int value id value  setId

Creates a new marker attribute map of default size public Marker Attribute Map super  MarkerAttributeMap
Creates a new marker attribute map param initial Capacity The initial number of elements that will fit in the map public Marker Attribute Map int initial Capacity elements new Object Math max initial Capacity 2 0  initialCapacity MarkerAttributeMap initialCapacity initialCapacity
Creates a new marker attribute map of default size param map The entries in the given map will be added to the new map public Marker Attribute Map Map map this map size put All map  MarkerAttributeMap putAll
see Map clear public void clear elements null count 0 
public boolean contains Key Object key key String key intern if elements null count 0 return false for int i 0 i elements length i i 2 if elements i key return true return false  containsKey
public boolean contains Value Object value if elements null count 0 return false for int i 1 i elements length i i 2 if elements i null elements i equals value return true return false  containsValue
this map and will not remain in sync with this map public Set entry Set return to Hash Map entry Set  entrySet toHashMap entrySet
public boolean equals Object o if o instanceof Map return false Map other Map o must be same size if count other size return false keysets must be equal if key Set equals other key Set return false values for each key must be equal for int i 0 i elements length i i 2 if elements i null elements i 1 equals other get elements i return false return true  keySet keySet
public Object get Object key key String key intern if elements null count 0 return null for int i 0 i elements length i i 2 if elements i key return elements i 1 return null 
The capacity of the map has been exceeded grow the array by GROW SIZE to accomodate more entries protected void grow Object expanded new Object elements length GROW SIZE System arraycopy elements 0 expanded 0 elements length elements expanded  GROW_SIZE GROW_SIZE
public int hash Code int hash 0 for int i 0 i elements length i i 2 if elements i null hash elements i hash Code return hash  hashCode hashCode
see Map is Empty public boolean is Empty return count 0  isEmpty isEmpty
public Set key Set Set result new Hash Set size for int i 0 i elements length i i 2 if elements i null result add elements i return result  keySet HashSet
public Object put Object key Object value if key null throw new Null Pointer Exception if value null return remove key key String key intern handle the case where we don t have any attributes yet if elements null elements new Object DEFAULT SIZE if count 0 elements 0 key elements 1 value count return null replace existing value if it exists for int i 0 i elements length i i 2 if elements i key Object old Value elements i 1 elements i 1 value return old Value otherwise add it to the list of elements grow if necessary if elements length count 2 grow for int i 0 i elements length i i 2 if elements i null elements i key elements i 1 value count return null return null  NullPointerException DEFAULT_SIZE oldValue oldValue
public void put All Map map for Iterator i map key Set iterator i has Next Object key i next Object value map get key put key value  putAll keySet hasNext
public Object remove Object key key String key intern if elements null count 0 return null for int i 0 i elements length i i 2 if elements i key elements i null Object result elements i 1 elements i 1 null count return result return null 
see Map size public int size return count 
Creates a new hash map with the same contents as this map private Hash Map to Hash Map Hash Map result new Hash Map size for int i 0 i elements length i i 2 if elements i null result put elements i elements i 1 return result  HashMap toHashMap HashMap HashMap
public Collection values Set result new Hash Set size for int i 1 i elements length i i 2 if elements i null result add elements i return result  HashSet

Creates a new marker delta public Marker Delta int kind I Resource resource Marker Info info this kind kind this resource resource this info info  MarkerDelta IResource MarkerInfo
see I Marker Delta get Attribute String public Object get Attribute String attribute Name return info get Attribute attribute Name  IMarkerDelta getAttribute getAttribute attributeName getAttribute attributeName
public int get Attribute String attribute Name int default Value Object value info get Attribute attribute Name if value instanceof Integer return Integer value int Value return default Value  getAttribute attributeName defaultValue getAttribute attributeName intValue defaultValue
public String get Attribute String attribute Name String default Value Object value info get Attribute attribute Name if value instanceof String return String value return default Value  getAttribute attributeName defaultValue getAttribute attributeName defaultValue
public boolean get Attribute String attribute Name boolean default Value Object value info get Attribute attribute Name if value instanceof Boolean return Boolean value boolean Value return default Value  getAttribute attributeName defaultValue getAttribute attributeName booleanValue defaultValue
see I Marker Delta get Attributes public Map get Attributes return info get Attributes  IMarkerDelta getAttributes getAttributes getAttributes
see I Marker Delta get Attributes String public Object get Attributes String attribute Names return info get Attributes attribute Names  IMarkerDelta getAttributes getAttributes attributeNames getAttributes attributeNames
see I Marker Delta get Id public long get Id return info get Id  IMarkerDelta getId getId getId
see I Marker Delta get Kind public int get Kind return kind  IMarkerDelta getKind getKind
see I Marker Delta get Marker public I Marker get Marker return new Marker resource get Id  IMarkerDelta getMarker IMarker getMarker getId
see I Marker Delta get Resource public I Resource get Resource return resource  IMarkerDelta getResource IResource getResource
see I Marker Delta get Type public String get Type return info get Type  IMarkerDelta getType getType getType
see I Marker Delta is Subtype Of String public boolean is Subtype Of String super Type return Workspace get Resource get Workspace get Marker Manager is Subtype get Type super Type  IMarkerDelta isSubtypeOf isSubtypeOf superType getResource getWorkspace getMarkerManager isSubtype getType superType
Merge two Maps of I Path Marker Set representing changes Use the old map to store the result so we don t have to build a new map to return public static Map merge Map old Changes Map new Changes if old Changes null don t worry about copying since the new changes are no longer used return new Changes if new Changes null return old Changes for Iterator it new Changes key Set iterator it has Next I Path key I Path it next Marker Set old Set Marker Set old Changes get key Marker Set new Set Marker Set new Changes get key if old Set null old Changes put key new Set else merge old Set new Set elements return old Changes  IPath MarkerSet oldChanges newChanges oldChanges newChanges newChanges oldChanges newChanges keySet hasNext IPath IPath MarkerSet oldSet MarkerSet oldChanges MarkerSet newSet MarkerSet newChanges oldSet oldChanges newSet oldSet newSet oldChanges
Merge two sets of marker changes Both sets must be on the same resource Use the original set of changes to store the result so we don t have to build a completely different set to return add add N A add remove nothing no delta add change add remove add N A remove remove N A remove change N A change add N A change change change note info held onto by the marker delta should be that of the oldest change and not replaced when composed change remove remove note info held onto by the marker delta should be that of the oldest change and not replaced when changed to a remove protected static Marker Set merge Marker Set old Changes I Marker Set Element new Changes if old Changes null Marker Set result new Marker Set new Changes length for int i 0 i new Changes length i result add new Changes i return result if new Changes null return old Changes for int i 0 i new Changes length i Marker Delta new Delta Marker Delta new Changes i Marker Delta old Delta Marker Delta old Changes get new Delta get Id if old Delta null old Changes add new Delta continue switch old Delta get Kind case I Resource Delta ADDED switch new Delta get Kind case I Resource Delta ADDED add add N A break case I Resource Delta REMOVED add remove nothing Remove the original ADD delta old Changes remove old Delta break case I Resource Delta CHANGED add change add break break case I Resource Delta REMOVED switch new Delta get Kind case I Resource Delta ADDED remove add N A break case I Resource Delta REMOVED remove remove N A break case I Resource Delta CHANGED remove change N A break break case I Resource Delta CHANGED switch new Delta get Kind case I Resource Delta ADDED change add N A break case I Resource Delta REMOVED change remove remove Change the delta kind old Delta set Kind I Resource Delta REMOVED break case I Resource Delta CHANGED change change change break break return old Changes  MarkerSet MarkerSet oldChanges IMarkerSetElement newChanges oldChanges MarkerSet MarkerSet newChanges newChanges newChanges newChanges oldChanges newChanges MarkerDelta newDelta MarkerDelta newChanges MarkerDelta oldDelta MarkerDelta oldChanges newDelta getId oldDelta oldChanges newDelta oldDelta getKind IResourceDelta newDelta getKind IResourceDelta IResourceDelta oldChanges oldDelta IResourceDelta IResourceDelta newDelta getKind IResourceDelta IResourceDelta IResourceDelta IResourceDelta newDelta getKind IResourceDelta IResourceDelta oldDelta setKind IResourceDelta IResourceDelta oldChanges
private void set Kind int kind this kind kind  setKind

Returns the deltas from the given start id up until the present Returns null if there are no deltas for that interval protected Map assemble Deltas long start Map result null for int i 0 i next Free i if start Ids i start result Marker Delta merge result batches i return result  assembleDeltas nextFree startIds MarkerDelta
Flushes all delta batches up to but not including the given start Id protected void reset Deltas long start Id find offset of first batch to keep int start Offset 0 for start Offset next Free start Offset if start Ids start Offset start Id break if start Offset 0 return long new Ids start Ids Map new Batches batches shrink the arrays if it has grown too large if start Ids length DEFAULT SIZE next Free start Offset DEFAULT SIZE new Ids new long DEFAULT SIZE new Batches new Map DEFAULT SIZE copy and compact into the new array int remaining next Free start Offset System arraycopy start Ids start Offset new Ids 0 remaining System arraycopy batches start Offset new Batches 0 remaining clear the end of the array Arrays fill start Ids remaining start Ids length 0 Arrays fill batches remaining start Ids length null start Ids new Ids batches new Batches next Free remaining  resetDeltas startId startOffset startOffset nextFree startOffset startIds startOffset startId startOffset newIds startIds newBatches startIds DEFAULT_SIZE nextFree startOffset DEFAULT_SIZE newIds DEFAULT_SIZE newBatches DEFAULT_SIZE nextFree startOffset startIds startOffset newIds startOffset newBatches startIds startIds startIds startIds newIds newBatches nextFree
protected Map new Generation long start int len start Ids length if next Free len long new Ids new long len 2 Map new Batches new Map len 2 System arraycopy start Ids 0 new Ids 0 len System arraycopy batches 0 new Batches 0 len start Ids new Ids batches new Batches start Ids next Free start batches next Free new Hash Map 11 return batches next Free  newGeneration startIds nextFree newIds newBatches startIds newIds newBatches startIds newIds newBatches startIds nextFree nextFree HashMap nextFree

protected long creation Time 0 public Marker Info super  creationTime MarkerInfo
public Object get Attribute String attribute Name return attributes null null attributes get attribute Name  getAttribute attributeName attributeName
public Map get Attributes return get Attributes true  getAttributes getAttributes
See Object clone public Object clone try Marker Info copy Marker Info super clone copy the attribute table contents copy attributes get Attributes true return copy catch Clone Not Supported Exception e cannot happen because this class implements Cloneable return null  MarkerInfo MarkerInfo getAttributes CloneNotSupportedException
public Object get Attributes String attribute Names Object result new Object attribute Names length for int i 0 i attribute Names length i result i get Attribute attribute Names i return result  getAttributes attributeNames attributeNames attributeNames getAttribute attributeNames
public Map get Attributes boolean make Copy if attributes null return null return make Copy new Marker Attribute Map attributes attributes  getAttributes makeCopy makeCopy MarkerAttributeMap
public long get Creation Time return creation Time  getCreationTime creationTime
public long get Id return id  getId
public String get Type return type  getType
public void internal Set Attributes Map map the cast effectively acts as an assertion to make sure the right kind of map is being used attributes Marker Attribute Map map  internalSetAttributes MarkerAttributeMap
Returns whether the given object is a valid attribute value protected static boolean is Valid Attribute Value Object value return value null value instanceof String value instanceof Integer value instanceof Boolean  isValidAttributeValue
public void set Attribute String attribute Name Object value Assert is True is Valid Attribute Value value if attributes null if value null return else attributes new Marker Attribute Map attributes put attribute Name value else if value null attributes remove attribute Name if attributes is Empty attributes null else attributes put attribute Name value  setAttribute attributeName isTrue isValidAttributeValue MarkerAttributeMap attributeName attributeName isEmpty attributeName
public void set Attributes String attribute Names Object values Assert is True attribute Names length values length for int i 0 i attribute Names length i set Attribute attribute Names i values i  setAttributes attributeNames isTrue attributeNames attributeNames setAttribute attributeNames
public void set Attributes Map map if map null attributes null else attributes new Marker Attribute Map map  setAttributes MarkerAttributeMap
public void set Creation Time long value creation Time value  setCreationTime creationTime
public void set Id long value id value  setId
public void set Type String value type value  setType

Creates a new marker manager public Marker Manager Workspace workspace this workspace workspace  MarkerManager
public void add I Resource resource Marker Info new Marker throws Core Exception Resource target Resource resource Resource Info info workspace get Resource Info target get Full Path false false target check Exists target get Flags info false info workspace get Resource Info resource get Full Path false true resource may have been deleted concurrently just bail out if this happens if info null return set the M MARKERS SNAP DIRTY flag to indicate that this resource s markers have changed since the last snapshot if is Persistent new Marker info set I Core Constants M MARKERS SNAP DIRTY Concurrency copy the marker set on modify Marker Set markers info get Markers true if markers null markers new Marker Set 1 basic Add resource markers new Marker if markers is Empty info set Markers markers  IResource MarkerInfo newMarker CoreException ResourceInfo getResourceInfo getFullPath checkExists getFlags getResourceInfo getFullPath M_MARKERS_SNAP_DIRTY isPersistent newMarker ICoreConstants M_MARKERS_SNAP_DIRTY MarkerSet getMarkers MarkerSet basicAdd newMarker isEmpty setMarkers
Adds the new markers to the given set of markers If added the markers are associated with the specified resource I Marker Deltas for Added markers are generated private void basic Add I Resource resource Marker Set markers Marker Info new Marker throws Core Exception should always be a new marker if new Marker get Id Marker Info UNDEFINED ID String message Policy bind resources change In Add NON NLS 1 throw new Resource Exception new Resource Status I Resource Status INTERNAL ERROR resource get Full Path message new Marker set Id workspace next Marker Id markers add new Marker I Marker Set Element changes new I Marker Set Element 1 changes 0 new Marker Delta I Resource Delta ADDED resource new Marker changed Markers resource changes  IMarkerDeltas basicAdd IResource MarkerSet MarkerInfo newMarker CoreException newMarker getId MarkerInfo UNDEFINED_ID changeInAdd ResourceException ResourceStatus IResourceStatus INTERNAL_ERROR getFullPath newMarker setId nextMarkerId newMarker IMarkerSetElement IMarkerSetElement MarkerDelta IResourceDelta newMarker changedMarkers
Returns the markers in the given set of markers which match the given type protected Marker Info basic Find Matching Marker Set markers String type boolean include Subtypes int size markers size if size 0 return NO MARKER INFO List result new Array List size I Marker Set Element elements markers elements for int i 0 i elements length i Marker Info marker Marker Info elements i if the type is null then we are looking for all types of markers if type null result add marker else if include Subtypes if cache is Subtype marker get Type type result add marker else if marker get Type equals type result add marker size result size if size 0 return NO MARKER INFO return Marker Info result to Array new Marker Info size  MarkerInfo basicFindMatching MarkerSet includeSubtypes NO_MARKER_INFO ArrayList IMarkerSetElement MarkerInfo MarkerInfo includeSubtypes isSubtype getType getType NO_MARKER_INFO MarkerInfo toArray MarkerInfo
Removes markers of the specified type from the given resource Note this method is protected to avoid creation of a synthetic accessor it is called from an anonymous inner class protected void basic Remove Markers Resource Info info I Path Requestor requestor String type boolean include Subtypes Marker Set markers info get Markers false if markers null return I Marker Set Element matching I Path path if type null if the type is null all markers are to be removed now we need to crack open the tree path requestor request Path info workspace get Resource Info path false true info set Markers null matching markers elements else matching basic Find Matching markers type include Subtypes if none match there is nothing to remove if matching length 0 return now we need to crack open the tree path requestor request Path info workspace get Resource Info path false true Concurrency copy the marker set on modify markers info get Markers true remove all the matching markers and also the whole set if there are no remaining markers markers remove All matching info set Markers markers size 0 null markers info set I Core Constants M MARKERS SNAP DIRTY I Marker Set Element changes new I Marker Set Element matching length I Resource resource workspace get Root find Member path for int i 0 i matching length i changes i new Marker Delta I Resource Delta REMOVED resource Marker Info matching i changed Markers resource changes return  basicRemoveMarkers ResourceInfo IPathRequestor includeSubtypes MarkerSet getMarkers IMarkerSetElement IPath requestPath getResourceInfo setMarkers basicFindMatching includeSubtypes requestPath getResourceInfo getMarkers removeAll setMarkers ICoreConstants M_MARKERS_SNAP_DIRTY IMarkerSetElement IMarkerSetElement IResource getRoot findMember MarkerDelta IResourceDelta MarkerInfo changedMarkers
Adds the markers on the given target which match the specified type to the list protected void build Markers I Marker Set Element markers I Path path int type Array List list if markers length 0 return I Resource resource workspace new Resource path type list ensure Capacity list size markers length for int i 0 i markers length i list add new Marker resource Marker Info markers i get Id  buildMarkers IMarkerSetElement IPath ArrayList IResource newResource ensureCapacity MarkerInfo getId
Markers have changed on the given resource Remember the changes for subsequent notification protected void changed Markers I Resource resource I Marker Set Element changes if changes null changes length 0 return change Id if current Deltas null current Deltas delta Manager new Generation change Id I Path path resource get Full Path Marker Set previous Changes Marker Set current Deltas get path Marker Set result Marker Delta merge previous Changes changes if result size 0 current Deltas remove path else current Deltas put path result Resource Info info workspace get Resource Info path false true if info null info increment Marker Generation Count  changedMarkers IResource IMarkerSetElement changeId currentDeltas currentDeltas deltaManager newGeneration changeId IPath getFullPath MarkerSet previousChanges MarkerSet currentDeltas MarkerSet MarkerDelta previousChanges currentDeltas currentDeltas ResourceInfo getResourceInfo incrementMarkerGenerationCount
Returns the marker with the given id or code null code if none is found public I Marker find Marker I Resource resource long id Marker Info info find Marker Info resource id return info null null new Marker resource info get Id  IMarker findMarker IResource MarkerInfo findMarkerInfo getId
Returns the marker with the given id or code null code if none is found public Marker Info find Marker Info I Resource resource long id Resource Info info workspace get Resource Info resource get Full Path false false if info null return null Marker Set markers info get Markers false if markers null return null return Marker Info markers get id  MarkerInfo findMarkerInfo IResource ResourceInfo getResourceInfo getFullPath MarkerSet getMarkers MarkerInfo
Returns all markers of the specified type on the given target with option to search the target s children Passing code null code for the type specifies a match for all types i e code null code is a wildcard public I Marker find Markers I Resource target final String type final boolean include Subtypes int depth throws Core Exception Array List result new Array List optimize the deep searches with an element tree visitor if depth I Resource DEPTH INFINITE target get Type I Resource FILE visitor Find Markers target get Full Path result type include Subtypes else recursive Find Markers target get Full Path result type include Subtypes depth if result size 0 return NO MARKERS return I Marker result to Array new I Marker result size  IMarker findMarkers IResource includeSubtypes CoreException ArrayList ArrayList IResource DEPTH_INFINITE getType IResource visitorFindMarkers getFullPath includeSubtypes recursiveFindMarkers getFullPath includeSubtypes NO_MARKERS IMarker toArray IMarker
public long get Change Id return change Id  getChangeId changeId
Returns the map of all marker deltas since the given change Id public Map get Marker Deltas long start Change Id return delta Manager assemble Deltas start Change Id  getMarkerDeltas startChangeId deltaManager assembleDeltas startChangeId
Returns true if this manager has a marker delta record for the given marker id and false otherwise boolean has Delta I Path path long id if current Deltas null return false Marker Set set Marker Set current Deltas get path if set null return false return set get id null  hasDelta IPath currentDeltas MarkerSet MarkerSet currentDeltas
Returns true if the given marker is persistent and false otherwise public boolean is Persistent Marker Info info if cache is Persistent info get Type return false Object is Transient info get Attribute I Marker TRANSIENT return is Transient null is Transient instanceof Boolean Boolean is Transient boolean Value  isPersistent MarkerInfo isPersistent getType isTransient getAttribute IMarker isTransient isTransient isTransient booleanValue
Returns true if any of the given markers are persistent and false if all are transient public boolean is Persistent Marker Info infos for int i 0 i infos length i if is Persistent infos i return true return false  isPersistent MarkerInfo isPersistent
Returns true if code type code is a sub type of code super Type code public boolean is Subtype String type String super Type return cache is Subtype type super Type  superType isSubtype superType isSubtype superType
I Resource Visitor visitor new I Resource Visitor public boolean visit I Resource resource throws Core Exception Resource r Resource resource Resource Info info r get Resource Info false true Marker Set markers info get Markers false if markers null return true info set I Core Constants M MARKERS SNAP DIRTY I Marker Set Element removed new I Marker Set Element markers size I Marker Set Element added new I Marker Set Element markers size I Path path resource get Full Path remove First Segments count path source get Full Path append path I Resource source Child workspace new Resource path resource get Type I Marker Set Element elements markers elements for int i 0 i elements length i calculate the ADDED delta Marker Info marker Info Marker Info elements i Marker Delta delta new Marker Delta I Resource Delta ADDED resource marker Info added i delta calculate the REMOVED delta delta new Marker Delta I Resource Delta REMOVED source Child marker Info removed i delta changed Markers resource added changed Markers source Child removed return true  IResourceVisitor IResourceVisitor IResource CoreException ResourceInfo getResourceInfo MarkerSet getMarkers ICoreConstants M_MARKERS_SNAP_DIRTY IMarkerSetElement IMarkerSetElement IMarkerSetElement IMarkerSetElement IPath getFullPath removeFirstSegments getFullPath IResource sourceChild newResource getType IMarkerSetElement MarkerInfo markerInfo MarkerInfo MarkerDelta MarkerDelta IResourceDelta markerInfo MarkerDelta IResourceDelta sourceChild markerInfo changedMarkers changedMarkers sourceChild
public void moved final I Resource source final I Resource destination int depth throws Core Exception final int count destination get Full Path segment Count we removed from the source and added to the destination I Resource Visitor visitor new I Resource Visitor public boolean visit I Resource resource throws Core Exception Resource r Resource resource Resource Info info r get Resource Info false true Marker Set markers info get Markers false if markers null return true info set I Core Constants M MARKERS SNAP DIRTY I Marker Set Element removed new I Marker Set Element markers size I Marker Set Element added new I Marker Set Element markers size I Path path resource get Full Path remove First Segments count path source get Full Path append path I Resource source Child workspace new Resource path resource get Type I Marker Set Element elements markers elements for int i 0 i elements length i calculate the ADDED delta Marker Info marker Info Marker Info elements i Marker Delta delta new Marker Delta I Resource Delta ADDED resource marker Info added i delta calculate the REMOVED delta delta new Marker Delta I Resource Delta REMOVED source Child marker Info removed i delta changed Markers resource added changed Markers source Child removed return true destination accept visitor depth I Container INCLUDE TEAM PRIVATE MEMBERS  IResource IResource CoreException getFullPath segmentCount IResourceVisitor IResourceVisitor IResource CoreException ResourceInfo getResourceInfo MarkerSet getMarkers ICoreConstants M_MARKERS_SNAP_DIRTY IMarkerSetElement IMarkerSetElement IMarkerSetElement IMarkerSetElement IPath getFullPath removeFirstSegments getFullPath IResource sourceChild newResource getType IMarkerSetElement MarkerInfo markerInfo MarkerInfo MarkerDelta MarkerDelta IResourceDelta markerInfo MarkerDelta IResourceDelta sourceChild markerInfo changedMarkers changedMarkers sourceChild IContainer INCLUDE_TEAM_PRIVATE_MEMBERS
Adds the markers for a subtree of resources to the list private void recursive Find Markers I Path path Array List list String type boolean include Subtypes int depth Resource Info info workspace get Resource Info path false false if info null return Marker Set markers info get Markers false add the matching markers for this resource if markers null I Marker Set Element matching if type null matching markers elements else matching basic Find Matching markers type include Subtypes build Markers matching path info get Type list recurse if depth I Resource DEPTH ZERO info get Type I Resource FILE return if depth I Resource DEPTH ONE depth I Resource DEPTH ZERO I Path children workspace get Element Tree get Children path for int i 0 i children length i recursive Find Markers children i list type include Subtypes depth  recursiveFindMarkers IPath ArrayList includeSubtypes ResourceInfo getResourceInfo MarkerSet getMarkers IMarkerSetElement basicFindMatching includeSubtypes buildMarkers getType IResource DEPTH_ZERO getType IResource IResource DEPTH_ONE IResource DEPTH_ZERO IPath getElementTree getChildren recursiveFindMarkers includeSubtypes
return I Path Requestor requestor new I Path Requestor public String request Name return path last Segment  IPathRequestor IPathRequestor requestName lastSegment
public I Path request Path return path  IPath requestPath
Adds the markers for a subtree of resources to the list private void recursive Remove Markers final I Path path String type boolean include Subtypes int depth Resource Info info workspace get Resource Info path false false if info null phantoms don t have markers return I Path Requestor requestor new I Path Requestor public String request Name return path last Segment public I Path request Path return path basic Remove Markers info requestor type include Subtypes recurse if depth I Resource DEPTH ZERO info get Type I Resource FILE return if depth I Resource DEPTH ONE depth I Resource DEPTH ZERO I Path children workspace get Element Tree get Children path for int i 0 i children length i recursive Remove Markers children i type include Subtypes depth  recursiveRemoveMarkers IPath includeSubtypes ResourceInfo getResourceInfo IPathRequestor IPathRequestor requestName lastSegment IPath requestPath basicRemoveMarkers includeSubtypes IResource DEPTH_ZERO getType IResource IResource DEPTH_ONE IResource DEPTH_ZERO IPath getElementTree getChildren recursiveRemoveMarkers includeSubtypes
Removes the specified marker public void remove Marker I Resource resource long id Marker Info marker Info find Marker Info resource id if marker Info null return Resource Info info Workspace resource get Workspace get Resource Info resource get Full Path false true Concurrency copy the marker set on modify Marker Set markers info get Markers true int size markers size markers remove marker Info if that was the last marker remove the set to save space info set Markers markers size 0 null markers if we actually did remove a marker post a delta for the change if markers size size if is Persistent marker Info info set I Core Constants M MARKERS SNAP DIRTY I Marker Set Element change new I Marker Set Element new Marker Delta I Resource Delta REMOVED resource marker Info changed Markers resource change  removeMarker IResource MarkerInfo markerInfo findMarkerInfo markerInfo ResourceInfo getWorkspace getResourceInfo getFullPath MarkerSet getMarkers markerInfo setMarkers isPersistent markerInfo ICoreConstants M_MARKERS_SNAP_DIRTY IMarkerSetElement IMarkerSetElement MarkerDelta IResourceDelta markerInfo changedMarkers
Remove all markers for the given resource to the specified depth public void remove Markers I Resource resource int depth throws Core Exception remove Markers resource null false depth  removeMarkers IResource CoreException removeMarkers
Remove all markers with the given type from the node at the given path Passing code null code for the type specifies a match for all types i e code null code is a wildcard public void remove Markers I Resource target final String type final boolean include Subtypes int depth throws Core Exception if depth I Resource DEPTH INFINITE target get Type I Resource FILE visitor Remove Markers target get Full Path type include Subtypes else recursive Remove Markers target get Full Path type include Subtypes depth  removeMarkers IResource includeSubtypes CoreException IResource DEPTH_INFINITE getType IResource visitorRemoveMarkers getFullPath includeSubtypes recursiveRemoveMarkers getFullPath includeSubtypes
Reset the marker deltas up to but not including the given start Id public void reset Marker Deltas long start Id current Deltas null delta Manager reset Deltas start Id  resetMarkerDeltas startId currentDeltas deltaManager resetDeltas startId
public void restore I Resource resource boolean generate Deltas I Progress Monitor monitor throws Core Exception first try and load the last saved file then apply the snapshots restore From Save resource generate Deltas restore From Snap resource  IResource generateDeltas IProgressMonitor CoreException restoreFromSave generateDeltas restoreFromSnap
protected void restore From Save I Resource resource boolean generate Deltas throws Core Exception I Path source Location workspace get Meta Area get Markers Location For resource I Path temp Location workspace get Meta Area get Backup Location For source Location java io File source File new java io File source Location toOS String java io File temp File new java io File temp Location toOS String if source File exists temp File exists return try Data Input Stream input new Data Input Stream new Safe File Input Stream source Location toOS String temp Location toOS String try Marker Reader reader new Marker Reader workspace reader read input generate Deltas finally input close catch IO Exception e String msg Policy bind resources read Meta source Location to String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA source Location msg e  restoreFromSave IResource generateDeltas CoreException IPath sourceLocation getMetaArea getMarkersLocationFor IPath tempLocation getMetaArea getBackupLocationFor sourceLocation sourceFile sourceLocation toOSString tempFile tempLocation toOSString sourceFile tempFile DataInputStream DataInputStream SafeFileInputStream sourceLocation toOSString tempLocation toOSString MarkerReader MarkerReader generateDeltas IOException readMeta sourceLocation toString ResourceException IResourceStatus FAILED_READ_METADATA sourceLocation
protected void restore From Snap I Resource resource I Path source Location workspace get Meta Area get Markers Snapshot Location For resource if source Location to File exists return try Data Input Stream input new Data Input Stream new Safe Chunky Input Stream source Location to File try Marker Snapshot Reader reader new Marker Snapshot Reader workspace while true reader read input catch EOF Exception eof ignore end of file finally input close catch Exception e only log the exception we should not fail restoring the snapshot String msg Policy bind resources read Meta source Location to String NON NLS 1 Resources Plugin get Plugin get Log log new Resource Status I Resource Status FAILED READ METADATA source Location msg e  restoreFromSnap IResource IPath sourceLocation getMetaArea getMarkersSnapshotLocationFor sourceLocation toFile DataInputStream DataInputStream SafeChunkyInputStream sourceLocation toFile MarkerSnapshotReader MarkerSnapshotReader EOFException readMeta sourceLocation toString ResourcesPlugin getPlugin getLog ResourceStatus IResourceStatus FAILED_READ_METADATA sourceLocation
public void save Resource Info info I Path Requestor requestor Data Output Stream output List list throws IO Exception writer save info requestor output list  ResourceInfo IPathRequestor DataOutputStream IOException
see I Manager shutdown I Progress Monitor public void shutdown I Progress Monitor monitor do nothing  IManager IProgressMonitor IProgressMonitor
public void snap Resource Info info I Path Requestor requestor Data Output Stream output throws IO Exception writer snap info requestor output  ResourceInfo IPathRequestor DataOutputStream IOException
see I Manager startup I Progress Monitor public void startup I Progress Monitor monitor throws Core Exception do nothing  IManager IProgressMonitor IProgressMonitor CoreException
I Element Content Visitor visitor new I Element Content Visitor public boolean visit Element Element Tree tree I Path Requestor requestor Object element Contents Resource Info info Resource Info element Contents if info null return false Marker Set markers info get Markers false add the matching markers for this resource if markers null I Marker Set Element matching if type null matching markers elements else matching basic Find Matching markers type include Subtypes build Markers matching requestor request Path info get Type list return true  IElementContentVisitor IElementContentVisitor visitElement ElementTree IPathRequestor elementContents ResourceInfo ResourceInfo elementContents MarkerSet getMarkers IMarkerSetElement basicFindMatching includeSubtypes buildMarkers requestPath getType
Adds the markers for a subtree of resources to the list private void visitor Find Markers I Path path final Array List list final String type final boolean include Subtypes I Element Content Visitor visitor new I Element Content Visitor public boolean visit Element Element Tree tree I Path Requestor requestor Object element Contents Resource Info info Resource Info element Contents if info null return false Marker Set markers info get Markers false add the matching markers for this resource if markers null I Marker Set Element matching if type null matching markers elements else matching basic Find Matching markers type include Subtypes build Markers matching requestor request Path info get Type list return true new Element Tree Iterator workspace get Element Tree path iterate visitor  visitorFindMarkers IPath ArrayList includeSubtypes IElementContentVisitor IElementContentVisitor visitElement ElementTree IPathRequestor elementContents ResourceInfo ResourceInfo elementContents MarkerSet getMarkers IMarkerSetElement basicFindMatching includeSubtypes buildMarkers requestPath getType ElementTreeIterator getElementTree
I Element Content Visitor visitor new I Element Content Visitor public boolean visit Element Element Tree tree I Path Requestor requestor Object element Contents Resource Info info Resource Info element Contents if info null return false basic Remove Markers info requestor type include Subtypes return true  IElementContentVisitor IElementContentVisitor visitElement ElementTree IPathRequestor elementContents ResourceInfo ResourceInfo elementContents basicRemoveMarkers includeSubtypes
Adds the markers for a subtree of resources to the list private void visitor Remove Markers I Path path final String type final boolean include Subtypes I Element Content Visitor visitor new I Element Content Visitor public boolean visit Element Element Tree tree I Path Requestor requestor Object element Contents Resource Info info Resource Info element Contents if info null return false basic Remove Markers info requestor type include Subtypes return true new Element Tree Iterator workspace get Element Tree path iterate visitor  visitorRemoveMarkers IPath includeSubtypes IElementContentVisitor IElementContentVisitor visitElement ElementTree IPathRequestor elementContents ResourceInfo ResourceInfo elementContents basicRemoveMarkers includeSubtypes ElementTreeIterator getElementTree

protected Workspace workspace public Marker Reader Workspace workspace super this workspace workspace  MarkerReader
Returns the appropriate reader for the given version protected Marker Reader get Reader int format Version throws IO Exception switch format Version case 1 return new MarkerReader 1 workspace case 2 return new MarkerReader 2 workspace case 3 return new MarkerReader 3 workspace default throw new IO Exception Policy bind resources format NON NLS 1  MarkerReader getReader formatVersion IOException formatVersion MarkerReader_1 MarkerReader_2 MarkerReader_3 IOException
public void read Data Input Stream input boolean generate Deltas throws IO Exception Core Exception int format Version read Version Number input Marker Reader reader get Reader format Version reader read input generate Deltas  DataInputStream generateDeltas IOException CoreException formatVersion readVersionNumber MarkerReader getReader formatVersion generateDeltas
protected static int read Version Number Data Input Stream input throws IO Exception return input read Int  readVersionNumber DataInputStream IOException readInt

public static final int ATTRIBUTE STRING 2 public MarkerReader 1 Workspace workspace super workspace  ATTRIBUTE_STRING MarkerReader_1
SAVE FILE VERSION ID RESOURCE VERSION ID RESOURCE RESOURCE PATH MARKERS SIZE MARKER RESOURCE PATH String MARKERS SIZE int MARKER MARKER ID TYPE ATTRIBUTES SIZE ATTRIBUTE MARKER ID long TYPE INDEX QNAME INDEX int int QNAME int String ATTRIBUTES SIZE int ATTRIBUTE ATTRIBUTE KEY ATTRIBUTE VALUE ATTRIBUTE KEY String ATTRIBUTE VALUE INTEGER VALUE BOOLEAN VALUE STRING VALUE NULL VALUE INTEGER VALUE int int BOOLEAN VALUE int boolean STRING VALUE int String NULL VALUE int public void read Data Input Stream input boolean generate Deltas throws IO Exception Core Exception try List read Types new Array List 5 while true I Path path new Path input readUTF int markers Size input read Int Marker Set markers new Marker Set markers Size for int i 0 i markers Size i markers add read Marker Info input read Types if the resource doesn t exist then return ensure we do this after reading the markers from the file so we don t get into an inconsistent state Resource Info info workspace get Resource Info path false false if info null continue info set Markers markers if generate Deltas Resource resource workspace new Resource path info get Type Iterate over all elements and add not null ones This saves us from copying and shrinking the array I Marker Set Element infos markers elements Array List deltas new Array List infos length for int i 0 i infos length i if infos i null deltas add new Marker Delta I Resource Delta ADDED resource Marker Info infos i workspace get Marker Manager changed Markers resource I Marker Set Element deltas to Array new I Marker Set Element deltas size catch EOF Exception e ignore end of file  SAVE_FILE VERSION_ID VERSION_ID RESOURCE_PATH MARKERS_SIZE RESOURCE_PATH MARKERS_SIZE MARKER_ID ATTRIBUTES_SIZE MARKER_ID ATTRIBUTES_SIZE ATTRIBUTE_KEY ATTRIBUTE_VALUE ATTRIBUTE_KEY ATTRIBUTE_VALUE INTEGER_VALUE BOOLEAN_VALUE STRING_VALUE NULL_VALUE INTEGER_VALUE BOOLEAN_VALUE STRING_VALUE NULL_VALUE DataInputStream generateDeltas IOException CoreException readTypes ArrayList IPath markersSize readInt MarkerSet MarkerSet markersSize markersSize readMarkerInfo readTypes ResourceInfo getResourceInfo setMarkers generateDeltas newResource getType IMarkerSetElement ArrayList ArrayList MarkerDelta IResourceDelta MarkerInfo getMarkerManager changedMarkers IMarkerSetElement toArray IMarkerSetElement EOFException
private Map read Attributes Data Input Stream input throws IO Exception int attributes Size input read Int if attributes Size 0 return null Map result new Marker Attribute Map attributes Size for int j 0 j attributes Size j String key input readUTF int type input read Int Object value null switch type case ATTRIBUTE INTEGER value new Integer input read Int break case ATTRIBUTE BOOLEAN value input read Boolean Boolean TRUE Boolean FALSE break case ATTRIBUTE STRING value input readUTF break case ATTRIBUTE NULL do nothing break if value null result put key value return result is Empty null result  readAttributes DataInputStream IOException attributesSize readInt attributesSize MarkerAttributeMap attributesSize attributesSize readInt ATTRIBUTE_INTEGER readInt ATTRIBUTE_BOOLEAN readBoolean ATTRIBUTE_STRING ATTRIBUTE_NULL isEmpty
private Marker Info read Marker Info Data Input Stream input List read Types throws IO Exception Core Exception Marker Info info new Marker Info info set Id input read Long int constant input read Int switch constant case QNAME String type input readUTF info set Type type read Types add type break case INDEX info set Type String read Types get input read Int break default if we get here the marker file is corrupt String msg Policy bind resources read Markers NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA null msg null info internal Set Attributes read Attributes input return info  MarkerInfo readMarkerInfo DataInputStream readTypes IOException CoreException MarkerInfo MarkerInfo setId readLong readInt setType readTypes setType readTypes readInt readMarkers ResourceException IResourceStatus FAILED_READ_METADATA internalSetAttributes readAttributes

public static final byte ATTRIBUTE STRING 3 public MarkerReader 2 Workspace workspace super workspace  ATTRIBUTE_STRING MarkerReader_2
SAVE FILE VERSION ID RESOURCE VERSION ID int RESOURCE RESOURCE PATH MARKERS SIZE MARKER RESOURCE PATH String MARKERS SIZE int MARKER MARKER ID TYPE ATTRIBUTES SIZE ATTRIBUTE MARKER ID long TYPE INDEX QNAME INDEX byte int QNAME byte String ATTRIBUTES SIZE short ATTRIBUTE ATTRIBUTE KEY ATTRIBUTE VALUE ATTRIBUTE KEY String ATTRIBUTE VALUE INTEGER VALUE BOOLEAN VALUE STRING VALUE NULL VALUE INTEGER VALUE byte int BOOLEAN VALUE byte boolean STRING VALUE byte String NULL VALUE byte public void read Data Input Stream input boolean generate Deltas throws IO Exception Core Exception try List read Types new Array List 5 while true I Path path new Path input readUTF int markers Size input read Int Marker Set markers new Marker Set markers Size for int i 0 i markers Size i markers add read Marker Info input read Types if the resource doesn t exist then return ensure we do this after reading the markers from the file so we don t get into an inconsistent state Resource Info info workspace get Resource Info path false false if info null continue info set Markers markers if generate Deltas Iterate over all elements and add not null ones This saves us from copying and shrinking the array Resource resource workspace new Resource path info get Type I Marker Set Element infos markers elements Array List deltas new Array List infos length for int i 0 i infos length i if infos i null deltas add new Marker Delta I Resource Delta ADDED resource Marker Info infos i workspace get Marker Manager changed Markers resource I Marker Set Element deltas to Array new I Marker Set Element deltas size catch EOF Exception e ignore end of file  SAVE_FILE VERSION_ID VERSION_ID RESOURCE_PATH MARKERS_SIZE RESOURCE_PATH MARKERS_SIZE MARKER_ID ATTRIBUTES_SIZE MARKER_ID ATTRIBUTES_SIZE ATTRIBUTE_KEY ATTRIBUTE_VALUE ATTRIBUTE_KEY ATTRIBUTE_VALUE INTEGER_VALUE BOOLEAN_VALUE STRING_VALUE NULL_VALUE INTEGER_VALUE BOOLEAN_VALUE STRING_VALUE NULL_VALUE DataInputStream generateDeltas IOException CoreException readTypes ArrayList IPath markersSize readInt MarkerSet MarkerSet markersSize markersSize readMarkerInfo readTypes ResourceInfo getResourceInfo setMarkers generateDeltas newResource getType IMarkerSetElement ArrayList ArrayList MarkerDelta IResourceDelta MarkerInfo getMarkerManager changedMarkers IMarkerSetElement toArray IMarkerSetElement EOFException
private Map read Attributes Data Input Stream input throws IO Exception int attributes Size input read Short if attributes Size 0 return null Map result new Marker Attribute Map attributes Size for int j 0 j attributes Size j String key input readUTF byte type input read Byte Object value null switch type case ATTRIBUTE INTEGER value new Integer input read Int break case ATTRIBUTE BOOLEAN value input read Boolean Boolean TRUE Boolean FALSE break case ATTRIBUTE STRING value input readUTF break case ATTRIBUTE NULL do nothing break if value null result put key value return result is Empty null result  readAttributes DataInputStream IOException attributesSize readShort attributesSize MarkerAttributeMap attributesSize attributesSize readByte ATTRIBUTE_INTEGER readInt ATTRIBUTE_BOOLEAN readBoolean ATTRIBUTE_STRING ATTRIBUTE_NULL isEmpty
private Marker Info read Marker Info Data Input Stream input List read Types throws IO Exception Core Exception Marker Info info new Marker Info info set Id input read Long byte constant input read Byte switch constant case QNAME String type input readUTF info set Type type read Types add type break case INDEX info set Type String read Types get input read Int break default if we get here the marker file is corrupt String msg Policy bind resources read Markers NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA null msg null info internal Set Attributes read Attributes input return info  MarkerInfo readMarkerInfo DataInputStream readTypes IOException CoreException MarkerInfo MarkerInfo setId readLong readByte setType readTypes setType readTypes readInt readMarkers ResourceException IResourceStatus FAILED_READ_METADATA internalSetAttributes readAttributes

public static final byte ATTRIBUTE STRING 3 public MarkerReader 3 Workspace workspace super workspace  ATTRIBUTE_STRING MarkerReader_3
SAVE FILE VERSION ID RESOURCE VERSION ID int RESOURCE RESOURCE PATH MARKERS SIZE MARKER RESOURCE PATH String MARKERS SIZE int MARKER MARKER ID TYPE ATTRIBUTES SIZE ATTRIBUTE CREATION TIME MARKER ID long TYPE INDEX QNAME INDEX byte int QNAME byte String ATTRIBUTES SIZE short ATTRIBUTE ATTRIBUTE KEY ATTRIBUTE VALUE ATTRIBUTE KEY String ATTRIBUTE VALUE INTEGER VALUE BOOLEAN VALUE STRING VALUE NULL VALUE INTEGER VALUE byte int BOOLEAN VALUE byte boolean STRING VALUE byte String NULL VALUE byte CREATION TIME long public void read Data Input Stream input boolean generate Deltas throws IO Exception Core Exception try List read Types new Array List 5 while true I Path path new Path input readUTF int markers Size input read Int Marker Set markers new Marker Set markers Size for int i 0 i markers Size i markers add read Marker Info input read Types if the resource doesn t exist then return ensure we do this after reading the markers from the file so we don t get into an inconsistent state Resource Info info workspace get Resource Info path false false if info null continue info set Markers markers if generate Deltas Iterate over all elements and add not null ones This saves us from copying and shrinking the array Resource resource workspace new Resource path info get Type I Marker Set Element infos markers elements Array List deltas new Array List infos length for int i 0 i infos length i if infos i null deltas add new Marker Delta I Resource Delta ADDED resource Marker Info infos i workspace get Marker Manager changed Markers resource I Marker Set Element deltas to Array new I Marker Set Element deltas size catch EOF Exception e ignore end of file  SAVE_FILE VERSION_ID VERSION_ID RESOURCE_PATH MARKERS_SIZE RESOURCE_PATH MARKERS_SIZE MARKER_ID ATTRIBUTES_SIZE CREATION_TIME MARKER_ID ATTRIBUTES_SIZE ATTRIBUTE_KEY ATTRIBUTE_VALUE ATTRIBUTE_KEY ATTRIBUTE_VALUE INTEGER_VALUE BOOLEAN_VALUE STRING_VALUE NULL_VALUE INTEGER_VALUE BOOLEAN_VALUE STRING_VALUE NULL_VALUE CREATION_TIME DataInputStream generateDeltas IOException CoreException readTypes ArrayList IPath markersSize readInt MarkerSet MarkerSet markersSize markersSize readMarkerInfo readTypes ResourceInfo getResourceInfo setMarkers generateDeltas newResource getType IMarkerSetElement ArrayList ArrayList MarkerDelta IResourceDelta MarkerInfo getMarkerManager changedMarkers IMarkerSetElement toArray IMarkerSetElement EOFException
private Map read Attributes Data Input Stream input throws IO Exception int attributes Size input read Short if attributes Size 0 return null Map result new Marker Attribute Map attributes Size for int j 0 j attributes Size j String key input readUTF byte type input read Byte Object value null switch type case ATTRIBUTE INTEGER value new Integer input read Int break case ATTRIBUTE BOOLEAN value input read Boolean Boolean TRUE Boolean FALSE break case ATTRIBUTE STRING value input readUTF break case ATTRIBUTE NULL do nothing break if value null result put key value return result is Empty null result  readAttributes DataInputStream IOException attributesSize readShort attributesSize MarkerAttributeMap attributesSize attributesSize readByte ATTRIBUTE_INTEGER readInt ATTRIBUTE_BOOLEAN readBoolean ATTRIBUTE_STRING ATTRIBUTE_NULL isEmpty
private Marker Info read Marker Info Data Input Stream input List read Types throws IO Exception Core Exception Marker Info info new Marker Info info set Id input read Long byte constant input read Byte switch constant case QNAME String type input readUTF info set Type type read Types add type break case INDEX info set Type String read Types get input read Int break default if we get here the marker file is corrupt String msg Policy bind resources read Markers NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA null msg null info internal Set Attributes read Attributes input info set Creation Time input read Long return info  MarkerInfo readMarkerInfo DataInputStream readTypes IOException CoreException MarkerInfo MarkerInfo setId readLong readByte setType readTypes setType readTypes readInt readMarkers ResourceException IResourceStatus FAILED_READ_METADATA internalSetAttributes readAttributes setCreationTime readLong

protected I Marker Set Element elements public Marker Set this MINIMUM SIZE  IMarkerSetElement MarkerSet MINIMUM_SIZE
public Marker Set int capacity super this elements new I Marker Set Element Math max MINIMUM SIZE capacity 2  MarkerSet IMarkerSetElement MINIMUM_SIZE
public void add I Marker Set Element element if element null return int hash hash For element get Id elements length search for an empty slot at the end of the array for int i hash i elements length i if elements i null elements i element element Count grow if necessary if should Grow expand return search for an empty slot at the beginning of the array for int i 0 i hash 1 i if elements i null elements i element element Count grow if necessary if should Grow expand return if we didn t find a free slot then try again with the expanded set expand add element  IMarkerSetElement hashFor getId elementCount shouldGrow elementCount shouldGrow
public void add All I Marker Set Element elements for int i 0 i elements length i add elements i  addAll IMarkerSetElement
protected Object clone try Marker Set copy Marker Set super clone copy the attribute array copy elements I Marker Set Element elements clone return copy catch Clone Not Supported Exception e cannot happen because this class implements Cloneable return null  MarkerSet MarkerSet IMarkerSetElement CloneNotSupportedException
public boolean contains long id return get id null 
public I Marker Set Element elements I Marker Set Element result new I Marker Set Element element Count int j 0 for int i 0 i elements length i I Marker Set Element element elements i if element null result j element return result  IMarkerSetElement IMarkerSetElement IMarkerSetElement elementCount IMarkerSetElement
The array isn t large enough so double its size and rehash all its current values protected void expand I Marker Set Element array new I Marker Set Element elements length 2 int max Array Index array length 1 for int i 0 i elements length i I Marker Set Element element elements i if element null int hash hash For element get Id array length while array hash null hash if hash max Array Index hash 0 array hash element elements array  IMarkerSetElement IMarkerSetElement maxArrayIndex IMarkerSetElement hashFor getId maxArrayIndex
Returns the set element with the given id or null if not found public I Marker Set Element get long id if element Count 0 return null int hash hash For id elements length search the last half of the array for int i hash i elements length i I Marker Set Element element elements i if element null return null if element get Id id return element search the beginning of the array for int i 0 i hash 1 i I Marker Set Element element elements i if element null return null if element get Id id return element marker info not found so return null return null  IMarkerSetElement elementCount hashFor IMarkerSetElement getId IMarkerSetElement getId
private int hash For long id return Math abs int id  hashFor
public boolean is Empty return element Count 0  isEmpty elementCount
The element at the given index has been removed so move elements to keep the set properly hashed protected void rehash To int an Index int target an Index int index an Index 1 if index elements length index 0 I Marker Set Element element elements index while element null int hash Index hash For element get Id elements length boolean match if index target match hash Index target hash Index index else match hash Index target hash Index index if match elements target element target index index if index elements length index 0 element elements index elements target null  rehashTo anIndex anIndex anIndex IMarkerSetElement hashIndex hashFor getId hashIndex hashIndex hashIndex hashIndex
public void remove long id int hash hash For id elements length for int i hash i elements length i I Marker Set Element element elements i if element null return if element get Id id rehash To i element Count for int i 0 i hash 1 i I Marker Set Element element elements i if element null return if element get Id id rehash To i element Count  hashFor IMarkerSetElement getId rehashTo elementCount IMarkerSetElement getId rehashTo elementCount
public void remove I Marker Set Element element remove element get Id  IMarkerSetElement getId
public void remove All I Marker Set Element elements for int i 0 i elements length i remove elements i  removeAll IMarkerSetElement
private boolean should Grow return element Count elements length 0 75  shouldGrow elementCount
public int size return element Count  elementCount

protected Workspace workspace public Marker Snapshot Reader Workspace workspace super this workspace workspace  MarkerSnapshotReader
Returns the appropriate reader for the given version protected Marker Snapshot Reader get Reader int format Version throws IO Exception switch format Version case 1 return new MarkerSnapshotReader 1 workspace case 2 return new MarkerSnapshotReader 2 workspace default throw new IO Exception Policy bind resources format NON NLS 1  MarkerSnapshotReader getReader formatVersion IOException formatVersion MarkerSnapshotReader_1 MarkerSnapshotReader_2 IOException
public void read Data Input Stream input throws IO Exception Core Exception int format Version read Version Number input Marker Snapshot Reader reader get Reader format Version reader read input  DataInputStream IOException CoreException formatVersion readVersionNumber MarkerSnapshotReader getReader formatVersion
protected static int read Version Number Data Input Stream input throws IO Exception return input read Int  readVersionNumber DataInputStream IOException readInt

public static final byte ATTRIBUTE STRING 3 public MarkerSnapshotReader 1 Workspace workspace super workspace  ATTRIBUTE_STRING MarkerSnapshotReader_1
SNAP FILE VERSION ID RESOURCE VERSION ID int used for backwards compatibiliy RESOURCE RESOURCE PATH MARKER SIZE MARKER RESOURCE PATH String MARKER SIZE int MARKER MARKER ID TYPE ATTRIBUTES SIZE ATTRIBUTE MARKER ID long TYPE INDEX QNAME INDEX byte int QNAME byte String ATTRIBUTES SIZE short ATTRIBUTE ATTRIBUTE KEY ATTRIBUTE VALUE ATTRIBUTE KEY String ATTRIBUTE VALUE BOOLEAN VALUE INTEGER VALUE STRING VALUE NULL VALUE BOOLEAN VALUE byte boolean INTEGER VALUE byte int STRING VALUE byte String NULL VALUE byte public void read Data Input Stream input throws IO Exception Core Exception I Path path new Path input readUTF int markers Size input read Int Marker Set markers new Marker Set markers Size Array List read Types new Array List for int i 0 i markers Size i markers add read Marker Info input read Types we ve read all the markers from the file for this snap if the resource doesn t exist in the workspace then consider this a delete and return Resource Info info workspace get Resource Info path false false if info null return info set Markers markers info clear I Core Constants M MARKERS SNAP DIRTY  SNAP_FILE VERSION_ID VERSION_ID RESOURCE_PATH MARKER_SIZE RESOURCE_PATH MARKER_SIZE MARKER_ID ATTRIBUTES_SIZE MARKER_ID ATTRIBUTES_SIZE ATTRIBUTE_KEY ATTRIBUTE_VALUE ATTRIBUTE_KEY ATTRIBUTE_VALUE BOOLEAN_VALUE INTEGER_VALUE STRING_VALUE NULL_VALUE BOOLEAN_VALUE INTEGER_VALUE STRING_VALUE NULL_VALUE DataInputStream IOException CoreException IPath markersSize readInt MarkerSet MarkerSet markersSize ArrayList readTypes ArrayList markersSize readMarkerInfo readTypes ResourceInfo getResourceInfo setMarkers ICoreConstants M_MARKERS_SNAP_DIRTY
private Map read Attributes Data Input Stream input throws IO Exception short attributes Size input read Short if attributes Size 0 return null Map result new Marker Attribute Map attributes Size for int j 0 j attributes Size j String key input readUTF byte type input read Byte Object value null switch type case ATTRIBUTE INTEGER value new Integer input read Int break case ATTRIBUTE BOOLEAN value input read Boolean Boolean TRUE Boolean FALSE break case ATTRIBUTE STRING value input readUTF break case ATTRIBUTE NULL do nothing break if value null result put key value return result is Empty null result  readAttributes DataInputStream IOException attributesSize readShort attributesSize MarkerAttributeMap attributesSize attributesSize readByte ATTRIBUTE_INTEGER readInt ATTRIBUTE_BOOLEAN readBoolean ATTRIBUTE_STRING ATTRIBUTE_NULL isEmpty
private Marker Info read Marker Info Data Input Stream input List read Types throws IO Exception Core Exception Marker Info info new Marker Info info set Id input read Long byte constant input read Byte switch constant case QNAME String type input readUTF info set Type type read Types add type break case INDEX info set Type String read Types get input read Int break default if we get here the marker file is corrupt String msg Policy bind resources read Markers NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA null msg null info internal Set Attributes read Attributes input return info  MarkerInfo readMarkerInfo DataInputStream readTypes IOException CoreException MarkerInfo MarkerInfo setId readLong readByte setType readTypes setType readTypes readInt readMarkers ResourceException IResourceStatus FAILED_READ_METADATA internalSetAttributes readAttributes

public static final byte ATTRIBUTE STRING 3 public MarkerSnapshotReader 2 Workspace workspace super workspace  ATTRIBUTE_STRING MarkerSnapshotReader_2
SNAP FILE VERSION ID RESOURCE VERSION ID int used for backwards compatibiliy RESOURCE RESOURCE PATH MARKER SIZE MARKER RESOURCE PATH String MARKER SIZE int MARKER MARKER ID TYPE ATTRIBUTES SIZE ATTRIBUTE CREATION TIME MARKER ID long TYPE INDEX QNAME INDEX byte int QNAME byte String ATTRIBUTES SIZE short ATTRIBUTE ATTRIBUTE KEY ATTRIBUTE VALUE ATTRIBUTE KEY String ATTRIBUTE VALUE BOOLEAN VALUE INTEGER VALUE STRING VALUE NULL VALUE BOOLEAN VALUE byte boolean INTEGER VALUE byte int STRING VALUE byte String NULL VALUE byte CREATION TIME long public void read Data Input Stream input throws IO Exception Core Exception I Path path new Path input readUTF int markers Size input read Int Marker Set markers new Marker Set markers Size Array List read Types new Array List for int i 0 i markers Size i markers add read Marker Info input read Types we ve read all the markers from the file for this snap if the resource doesn t exist in the workspace then consider this a delete and return Resource Info info workspace get Resource Info path false false if info null return info set Markers markers info clear I Core Constants M MARKERS SNAP DIRTY  SNAP_FILE VERSION_ID VERSION_ID RESOURCE_PATH MARKER_SIZE RESOURCE_PATH MARKER_SIZE MARKER_ID ATTRIBUTES_SIZE CREATION_TIME MARKER_ID ATTRIBUTES_SIZE ATTRIBUTE_KEY ATTRIBUTE_VALUE ATTRIBUTE_KEY ATTRIBUTE_VALUE BOOLEAN_VALUE INTEGER_VALUE STRING_VALUE NULL_VALUE BOOLEAN_VALUE INTEGER_VALUE STRING_VALUE NULL_VALUE CREATION_TIME DataInputStream IOException CoreException IPath markersSize readInt MarkerSet MarkerSet markersSize ArrayList readTypes ArrayList markersSize readMarkerInfo readTypes ResourceInfo getResourceInfo setMarkers ICoreConstants M_MARKERS_SNAP_DIRTY
private Map read Attributes Data Input Stream input throws IO Exception short attributes Size input read Short if attributes Size 0 return null Map result new Marker Attribute Map attributes Size for int j 0 j attributes Size j String key input readUTF byte type input read Byte Object value null switch type case ATTRIBUTE INTEGER value new Integer input read Int break case ATTRIBUTE BOOLEAN value input read Boolean Boolean TRUE Boolean FALSE break case ATTRIBUTE STRING value input readUTF break case ATTRIBUTE NULL do nothing break if value null result put key value return result is Empty null result  readAttributes DataInputStream IOException attributesSize readShort attributesSize MarkerAttributeMap attributesSize attributesSize readByte ATTRIBUTE_INTEGER readInt ATTRIBUTE_BOOLEAN readBoolean ATTRIBUTE_STRING ATTRIBUTE_NULL isEmpty
private Marker Info read Marker Info Data Input Stream input List read Types throws IO Exception Core Exception Marker Info info new Marker Info info set Id input read Long byte constant input read Byte switch constant case QNAME String type input readUTF info set Type type read Types add type break case INDEX info set Type String read Types get input read Int break default if we get here the marker file is corrupt String msg Policy bind resources read Markers NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA null msg null info internal Set Attributes read Attributes input info set Creation Time input read Long return info  MarkerInfo readMarkerInfo DataInputStream readTypes IOException CoreException MarkerInfo MarkerInfo setId readLong readByte setType readTypes setType readTypes readInt readMarkers ResourceException IResourceStatus FAILED_READ_METADATA internalSetAttributes readAttributes setCreationTime readLong

public Marker Type Definition I Extension ext super this type ext get Unique Identifier this name ext get Label I Configuration Element elements ext get Configuration Elements Set types null Set attributes null for int i 0 i elements length i I Configuration Element element elements i supertype final String element Name element get Name if element Name equals Ignore Case super NON NLS 1 String type element get Attribute type NON NLS 1 if type null if types null types new Hash Set 3 types add type attribute name if element Name equals Ignore Case attribute NON NLS 1 String name element get Attribute name NON NLS 1 if name null if attributes null attributes new Hash Set 3 attributes add name persistent if element Name equals Ignore Case persistent NON NLS 1 String bool element get Attribute value NON NLS 1 if bool null this persistent Boolean value Of bool boolean Value XXX legacy code for support of transient tag remove later if element Name equals Ignore Case transient NON NLS 1 String bool element get Attribute value NON NLS 1 if bool null this persistent Boolean value Of bool boolean Value this super Types types this attribute Names attributes  MarkerTypeDefinition IExtension getUniqueIdentifier getLabel IConfigurationElement getConfigurationElements IConfigurationElement elementName getName elementName equalsIgnoreCase getAttribute HashSet elementName equalsIgnoreCase getAttribute HashSet elementName equalsIgnoreCase getAttribute valueOf booleanValue elementName equalsIgnoreCase getAttribute valueOf booleanValue superTypes attributeNames
public Set get Attribute Names return attribute Names  getAttributeNames attributeNames
public String get Name return name  getName
public Set get Super Types return super Types  getSuperTypes superTypes
public String get Type return type  getType
public boolean persistent return persistent 
public String to String String Buffer buffer new String Buffer 40 buffer append this get Class get Name buffer append n ttype type NON NLS 1 buffer append n tname name NON NLS 1 buffer append n tsupertypes super Types NON NLS 1 buffer append n tattributenames attribute Names NON NLS 1 buffer append n tpersistent persistent NON NLS 1 return buffer to String  toString StringBuffer StringBuffer getClass getName superTypes attributeNames toString

Constructs a new type cache public Marker Type Definition Cache initialize Cache  MarkerTypeDefinitionCache initializeCache
private void compute Super Types String id Set entry new Hash Set 5 List queue new Array List 5 queue add id while queue is Empty String type String queue remove 0 entry add type Marker Type Definition def Marker Type Definition definitions get type if def null Set new Entries def get Super Types if new Entries null queue add All new Entries lookup put id entry  computeSuperTypes HashSet ArrayList isEmpty MarkerTypeDefinition MarkerTypeDefinition newEntries getSuperTypes newEntries addAll newEntries
private void initialize Cache load Definitions lookup new Hash Map definitions size for Iterator i definitions key Set iterator i has Next compute Super Types String i next  initializeCache loadDefinitions HashMap keySet hasNext computeSuperTypes
Returns true if the given marker type is defined to be persistent public boolean is Persistent String type Marker Type Definition def Marker Type Definition definitions get type return def null def persistent  isPersistent MarkerTypeDefinition MarkerTypeDefinition
Returns true if the given target class has the specified type as a super type public boolean is Subtype String type String super Type Set entry Set lookup get type return entry null entry contains super Type  isSubtype superType superType
private void load Definitions I Extension Point point Platform get Extension Registry get Extension Point Resources Plugin PI RESOURCES Resources Plugin PT MARKERS I Extension types point get Extensions definitions new Hash Map types length for int i 0 i types length i definitions put types i get Unique Identifier new Marker Type Definition types i  loadDefinitions IExtensionPoint getExtensionRegistry getExtensionPoint ResourcesPlugin PI_RESOURCES ResourcesPlugin PT_MARKERS IExtension getExtensions HashMap getUniqueIdentifier MarkerTypeDefinition

public static final byte ATTRIBUTE STRING 3 public Marker Writer Marker Manager manager super this manager manager  ATTRIBUTE_STRING MarkerWriter MarkerManager
Returns an Object array of length 2 The first element is an Integer which is the number of persistent markers found The second element is an array of boolean values with a value of true meaning that the marker at that index is to be persisted private Object filter Markers I Marker Set Element markers Object result new Object 2 boolean is Persistent new boolean markers length int count 0 for int i 0 i markers length i Marker Info info Marker Info markers i if manager is Persistent info is Persistent i true count result 0 new Integer count result 1 is Persistent return result  filterMarkers IMarkerSetElement isPersistent MarkerInfo MarkerInfo isPersistent isPersistent isPersistent
SAVE FILE VERSION ID RESOURCE VERSION ID int RESOURCE RESOURCE PATH MARKERS SIZE MARKER RESOURCE PATH String MARKERS SIZE int MARKER MARKER ID TYPE ATTRIBUTES SIZE ATTRIBUTE CREATION TIME MARKER ID long TYPE INDEX QNAME INDEX byte int QNAME byte String ATTRIBUTES SIZE short ATTRIBUTE ATTRIBUTE KEY ATTRIBUTE VALUE ATTRIBUTE KEY String ATTRIBUTE VALUE INTEGER VALUE BOOLEAN VALUE STRING VALUE NULL VALUE INTEGER VALUE byte int BOOLEAN VALUE byte boolean STRING VALUE byte String NULL VALUE byte CREATION TIME long public void save Resource Info info I Path Requestor requestor Data Output Stream output List written Types throws IO Exception phantom resources don t have markers if info is Set I Core Constants M PHANTOM return Marker Set markers info get Markers false if markers null return I Marker Set Element elements markers elements filter out the markers determine if there are any persistent ones Object result filter Markers elements int count Integer result 0 int Value if count 0 return if this is the first set of markers that we have written then write the version id for the file if output size 0 output write Int MARKERS SAVE VERSION boolean is Persistent boolean result 1 output writeUTF requestor request Path to String output write Int count for int i 0 i elements length i if is Persistent i write Marker Info elements i output written Types  SAVE_FILE VERSION_ID VERSION_ID RESOURCE_PATH MARKERS_SIZE RESOURCE_PATH MARKERS_SIZE MARKER_ID ATTRIBUTES_SIZE CREATION_TIME MARKER_ID ATTRIBUTES_SIZE ATTRIBUTE_KEY ATTRIBUTE_VALUE ATTRIBUTE_KEY ATTRIBUTE_VALUE INTEGER_VALUE BOOLEAN_VALUE STRING_VALUE NULL_VALUE INTEGER_VALUE BOOLEAN_VALUE STRING_VALUE NULL_VALUE CREATION_TIME ResourceInfo IPathRequestor DataOutputStream writtenTypes IOException isSet ICoreConstants M_PHANTOM MarkerSet getMarkers IMarkerSetElement filterMarkers intValue writeInt MARKERS_SAVE_VERSION isPersistent requestPath toString writeInt isPersistent MarkerInfo writtenTypes
Snapshot the markers for the specified resource to the given output stream SNAP FILE VERSION ID RESOURCE VERSION ID int used for backwards compatibiliy RESOURCE RESOURCE PATH MARKER SIZE MARKER RESOURCE PATH String MARKER SIZE int MARKER MARKER ID TYPE ATTRIBUTES SIZE ATTRIBUTE CREATION TIME MARKER ID long TYPE INDEX QNAME INDEX byte int QNAME byte String ATTRIBUTES SIZE short ATTRIBUTE ATTRIBUTE KEY ATTRIBUTE VALUE ATTRIBUTE KEY String ATTRIBUTE VALUE BOOLEAN VALUE INTEGER VALUE STRING VALUE NULL VALUE BOOLEAN VALUE byte boolean INTEGER VALUE byte int STRING VALUE byte String NULL VALUE byte CREATION TIME long public void snap Resource Info info I Path Requestor requestor Data Output Stream output throws IO Exception phantom resources don t have markers if info is Set I Core Constants M PHANTOM return if info is Set I Core Constants M MARKERS SNAP DIRTY return Marker Set markers info get Markers false if markers null return I Marker Set Element elements markers elements filter out the markers determine if there are any persistent ones Object result filter Markers elements int count Integer result 0 int Value write the version id for the snapshot output write Int MARKERS SNAP VERSION boolean is Persistent boolean result 1 output writeUTF requestor request Path to String always write out the count even if its zero this will help use pick up marker deletions from our snapshot output write Int count List written Types new Array List for int i 0 i elements length i if is Persistent i write Marker Info elements i output written Types info clear I Core Constants M MARKERS SNAP DIRTY  SNAP_FILE VERSION_ID VERSION_ID RESOURCE_PATH MARKER_SIZE RESOURCE_PATH MARKER_SIZE MARKER_ID ATTRIBUTES_SIZE CREATION_TIME MARKER_ID ATTRIBUTES_SIZE ATTRIBUTE_KEY ATTRIBUTE_VALUE ATTRIBUTE_KEY ATTRIBUTE_VALUE BOOLEAN_VALUE INTEGER_VALUE STRING_VALUE NULL_VALUE BOOLEAN_VALUE INTEGER_VALUE STRING_VALUE NULL_VALUE CREATION_TIME ResourceInfo IPathRequestor DataOutputStream IOException isSet ICoreConstants M_PHANTOM isSet ICoreConstants M_MARKERS_SNAP_DIRTY MarkerSet getMarkers IMarkerSetElement filterMarkers intValue writeInt MARKERS_SNAP_VERSION isPersistent requestPath toString writeInt writtenTypes ArrayList isPersistent MarkerInfo writtenTypes ICoreConstants M_MARKERS_SNAP_DIRTY
private void write Map attributes Data Output Stream output throws IO Exception output write Short attributes size for Iterator i attributes key Set iterator i has Next String key String i next output writeUTF key Object value attributes get key if value instanceof Integer output write Byte ATTRIBUTE INTEGER output write Int Integer value int Value continue if value instanceof Boolean output write Byte ATTRIBUTE BOOLEAN output write Boolean Boolean value boolean Value continue if value instanceof String output write Byte ATTRIBUTE STRING output writeUTF String value continue otherwise we came across an attribute of an unknown type so just write out null since we don t know how to marshal it output write Byte ATTRIBUTE NULL  DataOutputStream IOException writeShort keySet hasNext writeByte ATTRIBUTE_INTEGER writeInt intValue writeByte ATTRIBUTE_BOOLEAN writeBoolean booleanValue writeByte ATTRIBUTE_STRING writeByte ATTRIBUTE_NULL
private void write Marker Info info Data Output Stream output List written Types throws IO Exception output write Long info get Id if we have already written the type once then write an integer constant to represent it instead to remove duplication String type info get Type int index written Types index Of type if index 1 output write Byte QNAME output writeUTF type written Types add type else output write Byte INDEX output write Int index write out the size of the attribute table and then each attribute if info get Attributes false null output write Short 0 else write info get Attributes false output write out the creation time output write Long info get Creation Time  MarkerInfo DataOutputStream writtenTypes IOException writeLong getId getType writtenTypes indexOf writeByte writtenTypes writeByte writeInt getAttributes writeShort getAttributes writeLong getCreationTime

protected String name public Model Object super  ModelObject
public Model Object String name set Name name  ModelObject setName
public Object clone try return super clone catch Clone Not Supported Exception e return null won t happen  CloneNotSupportedException
public String get Name return name  getName
public void set Name String value name value  setName

public class Model Object Writer implements I Model Object Constants public Model Object Writer super  ModelObjectWriter IModelObjectConstants ModelObjectWriter
protected String get Referenced Projects Project Description description I Project projects description get Referenced Projects String result new String projects length for int i 0 i projects length i result i projects i get Name return result  getReferencedProjects ProjectDescription IProject getReferencedProjects getName
The Output Stream is closed in this method public void write Object object Output Stream output throws IO Exception try XML Writer writer new XML Writer output write object writer writer flush writer close finally output close  OutputStream OutputStream IOException XMLWriter XMLWriter
protected void write Object obj XML Writer writer throws IO Exception if obj instanceof Build Command write Build Command obj writer return if obj instanceof Project Description write Project Description obj writer return if obj instanceof Workspace Description write Workspace Description obj writer return if obj instanceof Link Description write Link Description obj writer return writer print Tabulation writer println obj to String  XMLWriter IOException BuildCommand BuildCommand ProjectDescription ProjectDescription WorkspaceDescription WorkspaceDescription LinkDescription LinkDescription printTabulation toString
The parameter temp Location is a location to place our temp file copy of the target one to be used in case we could not successfully write the new file public void write Object object I Path location I Path temp Location throws IO Exception Safe File Output Stream file null String temp Path temp Location null null temp Location toOS String try file new Safe File Output Stream location toOS String temp Path write object file finally if file null file close  tempLocation IPath IPath tempLocation IOException SafeFileOutputStream tempPath tempLocation tempLocation toOSString SafeFileOutputStream toOSString tempPath
protected void write String name String element Tag Name String array XML Writer writer throws IO Exception writer start Tag name null for int i 0 i array length i writer print Simple Tag element Tag Name array i writer end Tag name  elementTagName XMLWriter IOException startTag printSimpleTag elementTagName endTag
protected void write String name Collection collection XML Writer writer throws IO Exception writer start Tag name null for Iterator it collection iterator it has Next write it next writer writer end Tag name  XMLWriter IOException startTag hasNext endTag
Write maps of String String protected void write String name Map table XML Writer writer throws IO Exception writer start Tag name null for Iterator it table entry Set iterator it has Next Map Entry entry Map Entry it next String key String entry get Key Object value entry get Value writer start Tag DICTIONARY null writer print Simple Tag KEY key writer print Simple Tag VALUE value writer end Tag DICTIONARY writer end Tag name  XMLWriter IOException startTag entrySet hasNext getKey getValue startTag printSimpleTag printSimpleTag endTag endTag
protected void write Build Command command XML Writer writer throws IO Exception writer start Tag BUILD COMMAND null if command null writer print Simple Tag NAME command get Name write ARGUMENTS command get Arguments false writer writer end Tag BUILD COMMAND  BuildCommand XMLWriter IOException startTag BUILD_COMMAND printSimpleTag getName getArguments endTag BUILD_COMMAND
protected void write Link Description description XML Writer writer throws IO Exception writer start Tag LINK null if description null writer print Simple Tag NAME description get Name writer print Simple Tag TYPE Integer to String description get Type writer print Simple Tag LOCATION description get Location writer end Tag LINK  LinkDescription XMLWriter IOException startTag printSimpleTag getName printSimpleTag toString getType printSimpleTag getLocation endTag
protected void write Project Description description XML Writer writer throws IO Exception writer start Tag PROJECT DESCRIPTION null if description null writer print Simple Tag NAME description get Name String comment description get Comment writer print Simple Tag COMMENT comment null comment NON NLS 1 write PROJECTS PROJECT get Referenced Projects description writer write BUILD SPEC Arrays as List description get Build Spec false writer write NATURES NATURE description get Nature Ids false writer Hash Map links description get Links if links null write LINKED RESOURCES links values writer writer end Tag PROJECT DESCRIPTION  ProjectDescription XMLWriter IOException startTag PROJECT_DESCRIPTION printSimpleTag getName getComment printSimpleTag getReferencedProjects BUILD_SPEC asList getBuildSpec getNatureIds HashMap getLinks LINKED_RESOURCES endTag PROJECT_DESCRIPTION
protected void write Workspace Description description XML Writer writer throws IO Exception writer start Tag WORKSPACE DESCRIPTION null if description null writer print Simple Tag NAME description get Name writer print Simple Tag AUTOBUILD description is Auto Building 1 0 NON NLS 1 NON NLS 2 writer print Simple Tag SNAPSHOT INTERVAL new Long description get Snapshot Interval writer print Simple Tag FILE STATE LONGEVITY new Long description get File State Longevity writer print Simple Tag MAX FILE STATE SIZE new Long description get Max File State Size writer print Simple Tag MAX FILE STATES new Integer description get Max File States String order description get Build Order false if order null write BUILD ORDER PROJECT order writer writer end Tag WORKSPACE DESCRIPTION  WorkspaceDescription XMLWriter IOException startTag WORKSPACE_DESCRIPTION printSimpleTag getName printSimpleTag isAutoBuilding printSimpleTag SNAPSHOT_INTERVAL getSnapshotInterval printSimpleTag FILE_STATE_LONGEVITY getFileStateLongevity printSimpleTag MAX_FILE_STATE_SIZE getMaxFileStateSize printSimpleTag MAX_FILE_STATES getMaxFileStates getBuildOrder BUILD_ORDER endTag WORKSPACE_DESCRIPTION

see I Move Delete Hook delete File I Resource Tree I File int I Progress Monitor public boolean delete File I Resource Tree tree I File file int update Flags I Progress Monitor monitor Let someone else do the work return false  IMoveDeleteHook deleteFile IResourceTree IFile IProgressMonitor deleteFile IResourceTree IFile updateFlags IProgressMonitor
see I Move Delete Hook delete Folder I Resource Tree I Folder int I Progress Monitor public boolean delete Folder I Resource Tree tree I Folder folder int update Flags I Progress Monitor monitor Let someone else do the work return false  IMoveDeleteHook deleteFolder IResourceTree IFolder IProgressMonitor deleteFolder IResourceTree IFolder updateFlags IProgressMonitor
see I Move Delete Hook delete Project I Resource Tree I Project int I Progress Monitor public boolean delete Project I Resource Tree tree I Project project int update Flags I Progress Monitor monitor Let someone else do the work return false  IMoveDeleteHook deleteProject IResourceTree IProject IProgressMonitor deleteProject IResourceTree IProject updateFlags IProgressMonitor
see I Move Delete Hook move File I Resource Tree I File I File int I Progress Monitor public boolean move File I Resource Tree tree I File source I File destination int update Flags I Progress Monitor monitor Let someone else do the work return false  IMoveDeleteHook moveFile IResourceTree IFile IFile IProgressMonitor moveFile IResourceTree IFile IFile updateFlags IProgressMonitor
see I Move Delete Hook move Folder I Resource Tree I Folder I Folder int I Progress Monitor public boolean move Folder final I Resource Tree tree I Folder source I Folder destination int update Flags I Progress Monitor monitor Let someone else do the work return false  IMoveDeleteHook moveFolder IResourceTree IFolder IFolder IProgressMonitor moveFolder IResourceTree IFolder IFolder updateFlags IProgressMonitor
see I Move Delete Hook move Project I Resource Tree I Project I Project Description int I Progress Monitor public boolean move Project I Resource Tree tree I Project source I Project Description description int update Flags I Progress Monitor monitor Let someone else do the work return false  IMoveDeleteHook moveProject IResourceTree IProject IProjectDescription IProgressMonitor moveProject IResourceTree IProject IProjectDescription updateFlags IProgressMonitor

private static final byte BLACK 2 protected Nature Manager super  NatureManager
Computes the list of natures that are enabled for the given project Enablement computation is subtlely different from nature set validation because it must find and remove all inconsistencies protected String compute Nature Enablements Project project String nature Ids project internal Get Description get Nature Ids int count nature Ids length if count 0 return nature Ids set of the nature ids being validated String id Hash Set candidates new Hash Set count 2 table of String set ID Array List nature I Ds that belong to that set Hash Map sets To Natures new Hash Map count for int i 0 i count i String id nature Ids i Project Nature Descriptor desc Project Nature Descriptor get Nature Descriptor id if desc null continue if desc has Cycle candidates add id build set to nature map String set Ids desc get Nature Set Ids for int j 0 j set Ids length j String set set Ids j Array List current Array List sets To Natures get set if current null current new Array List 5 sets To Natures put set current current add id now remove all natures that belong to sets with more than one member for Iterator it sets To Natures values iterator it has Next Array List set Members Array List it next if set Members size 1 candidates remove All set Members now walk over the set and ensure all pre requisite natures are present need to walk in prereq order because if A requires B and B requires C and C is disabled for some other reason we must ensure both A and B are disabled String ordered Candidates String candidates to Array new String candidates size ordered Candidates sort Nature Set ordered Candidates for int i 0 i ordered Candidates length i String id ordered Candidates i I Project Nature Descriptor desc get Nature Descriptor id String required desc get Required Nature Ids for int j 0 j required length j if candidates contains required j candidates remove id break remaining candidates are enabled return String candidates to Array new String candidates size  computeNatureEnablements natureIds internalGetDescription getNatureIds natureIds natureIds HashSet HashSet ArrayList IDs HashMap setsToNatures HashMap natureIds ProjectNatureDescriptor ProjectNatureDescriptor getNatureDescriptor hasCycle setIds getNatureSetIds setIds setIds ArrayList ArrayList setsToNatures ArrayList setsToNatures setsToNatures hasNext ArrayList setMembers ArrayList setMembers removeAll setMembers orderedCandidates toArray orderedCandidates sortNatureSet orderedCandidates orderedCandidates orderedCandidates IProjectNatureDescriptor getNatureDescriptor getRequiredNatureIds toArray
see I Workspace get Nature Descriptor String public I Project Nature Descriptor get Nature Descriptor String nature Id lazy Initialize return I Project Nature Descriptor descriptors get nature Id  IWorkspace getNatureDescriptor IProjectNatureDescriptor getNatureDescriptor natureId lazyInitialize IProjectNatureDescriptor natureId
public I Project Nature Descriptor get Nature Descriptors lazy Initialize Collection values descriptors values return I Project Nature Descriptor values to Array new I Project Nature Descriptor values size  IProjectNatureDescriptor getNatureDescriptors lazyInitialize IProjectNatureDescriptor toArray IProjectNatureDescriptor
public void handle Event Lifecycle Event event switch event kind case Lifecycle Event PRE PROJECT CHANGE case Lifecycle Event PRE PROJECT CLOSE case Lifecycle Event PRE PROJECT DELETE case Lifecycle Event PRE PROJECT MOVE case Lifecycle Event PRE PROJECT OPEN flush Enablements I Project event resource  handleEvent LifecycleEvent LifecycleEvent PRE_PROJECT_CHANGE LifecycleEvent PRE_PROJECT_CLOSE LifecycleEvent PRE_PROJECT_DELETE LifecycleEvent PRE_PROJECT_MOVE LifecycleEvent PRE_PROJECT_OPEN flushEnablements IProject
I Safe Runnable code new I Safe Runnable public void run throws Exception I Project Nature nature create Nature project natureID nature configure Project Info info Project Info project get Resource Info false true info set Nature natureID nature  ISafeRunnable ISafeRunnable IProjectNature createNature ProjectInfo ProjectInfo getResourceInfo setNature
public void handle Exception Throwable exception if exception instanceof Core Exception errors add Core Exception exception get Status else errors add new Resource Status I Resource Status INTERNAL ERROR project get Full Path Policy bind resources error Nature natureID exception NON NLS 1  handleException CoreException CoreException getStatus ResourceStatus IResourceStatus INTERNAL_ERROR getFullPath errorNature
Configures the nature with the given ID for the given project protected void configure Nature final Project project final String natureID final Multi Status errors I Safe Runnable code new I Safe Runnable public void run throws Exception I Project Nature nature create Nature project natureID nature configure Project Info info Project Info project get Resource Info false true info set Nature natureID nature public void handle Exception Throwable exception if exception instanceof Core Exception errors add Core Exception exception get Status else errors add new Resource Status I Resource Status INTERNAL ERROR project get Full Path Policy bind resources error Nature natureID exception NON NLS 1 if Policy DEBUG NATURES System out println Configuring nature natureID on project project get Name NON NLS 1 NON NLS 2 Platform run code  configureNature MultiStatus ISafeRunnable ISafeRunnable IProjectNature createNature ProjectInfo ProjectInfo getResourceInfo setNature handleException CoreException CoreException getStatus ResourceStatus IResourceStatus INTERNAL_ERROR getFullPath errorNature DEBUG_NATURES getName
Configures the natures for the given project Natures found in the new description that weren t present in the old description are added and natures missing from the new description are removed Updates the old description so that it reflects the new set of the natures Errors are added to the given multistatus public void configure Natures Project project Project Description old Description Project Description new Description Multi Status status Be careful not to rely on much state because de configuring a nature may well result in recursive calls to this method Hash Set old Natures new Hash Set Arrays as List old Description get Nature Ids false Hash Set new Natures new Hash Set Arrays as List new Description get Nature Ids false if old Natures equals new Natures return Hash Set deletions Hash Set old Natures clone Hash Set additions Hash Set new Natures clone additions remove All old Natures deletions remove All new Natures do validation of the changes If any single change is invalid fail the whole operation I Status result validate Additions new Natures additions project if result isOK status merge result return result validate Removals new Natures deletions if result isOK status merge result return set the list of nature ids BEFORE de configuration so recursive calls will not try to do the same work old Description set Nature Ids new Description get Nature Ids true flush Enablements project de configure in topological order to maintain consistency of configured set String ordered null if deletions size 0 ordered sort Nature Set String deletions to Array new String deletions size for int i ordered length i 0 deconfigure Nature project ordered i status if additions size 0 ordered sort Nature Set String additions to Array new String additions size for int i 0 i ordered length i configure Nature project ordered i status  configureNatures ProjectDescription oldDescription ProjectDescription newDescription MultiStatus HashSet oldNatures HashSet asList oldDescription getNatureIds HashSet newNatures HashSet asList newDescription getNatureIds oldNatures newNatures HashSet HashSet oldNatures HashSet HashSet newNatures removeAll oldNatures removeAll newNatures IStatus validateAdditions newNatures validateRemovals newNatures oldDescription setNatureIds newDescription getNatureIds flushEnablements sortNatureSet toArray deconfigureNature sortNatureSet toArray configureNature
Finds the nature extension and initializes and returns an instance protected I Project Nature create Nature Project project String natureID throws Core Exception I Extension extension Platform get Extension Registry get Extension Resources Plugin PI RESOURCES Resources Plugin PT NATURES natureID if extension null String message Policy bind resources nature Extension natureID NON NLS 1 throw new Resource Exception Platform PLUGIN ERROR project get Full Path message null I Configuration Element configs extension get Configuration Elements if configs length 1 String message Policy bind resources nature Class natureID NON NLS 1 throw new Resource Exception Platform PLUGIN ERROR project get Full Path message null find the runtime configuration element I Configuration Element config null for int i 0 config null i configs length i if runtime equals Ignore Case configs i get Name NON NLS 1 config configs i if config null String message Policy bind resources nature Format natureID NON NLS 1 throw new Resource Exception Platform PLUGIN ERROR project get Full Path message null try I Project Nature nature I Project Nature config create Executable Extension run NON NLS 1 nature set Project project return nature catch Class Cast Exception e String message Policy bind resources nature Implement natureID NON NLS 1 throw new Resource Exception Platform PLUGIN ERROR project get Full Path message e  IProjectNature createNature CoreException IExtension getExtensionRegistry getExtension ResourcesPlugin PI_RESOURCES ResourcesPlugin PT_NATURES natureExtension ResourceException PLUGIN_ERROR getFullPath IConfigurationElement getConfigurationElements natureClass ResourceException PLUGIN_ERROR getFullPath IConfigurationElement equalsIgnoreCase getName natureFormat ResourceException PLUGIN_ERROR getFullPath IProjectNature IProjectNature createExecutableExtension setProject ClassCastException natureImplement ResourceException PLUGIN_ERROR getFullPath
final I Project Nature nature existing Nature I Safe Runnable code new I Safe Runnable public void run throws Exception nature deconfigure info set Nature natureID null  IProjectNature existingNature ISafeRunnable ISafeRunnable setNature
public void handle Exception Throwable exception if exception instanceof Core Exception status add Core Exception exception get Status else status add new Resource Status I Resource Status INTERNAL ERROR project get Full Path Policy bind resources nature Deconfig natureID exception NON NLS 1  handleException CoreException CoreException getStatus ResourceStatus IResourceStatus INTERNAL_ERROR getFullPath natureDeconfig
Deconfigures the nature with the given ID for the given project protected void deconfigure Nature final Project project final String natureID final Multi Status status final Project Info info Project Info project get Resource Info false true I Project Nature existing Nature info get Nature natureID if existing Nature null if there isn t a nature then create one so we can deconfig it try existing Nature create Nature project natureID catch Core Exception e have to swallow the exception because it must be possible to remove a nature that no longer exists in the install Resources Plugin get Plugin get Log log e get Status return final I Project Nature nature existing Nature I Safe Runnable code new I Safe Runnable public void run throws Exception nature deconfigure info set Nature natureID null public void handle Exception Throwable exception if exception instanceof Core Exception status add Core Exception exception get Status else status add new Resource Status I Resource Status INTERNAL ERROR project get Full Path Policy bind resources nature Deconfig natureID exception NON NLS 1 if Policy DEBUG NATURES System out println Deconfiguring nature natureID on project project get Name NON NLS 1 NON NLS 2 Platform run code  deconfigureNature MultiStatus ProjectInfo ProjectInfo getResourceInfo IProjectNature existingNature getNature existingNature existingNature createNature CoreException ResourcesPlugin getPlugin getLog getStatus IProjectNature existingNature ISafeRunnable ISafeRunnable setNature handleException CoreException CoreException getStatus ResourceStatus IResourceStatus INTERNAL_ERROR getFullPath natureDeconfig DEBUG_NATURES getName
Marks all nature descriptors that are involved in cycles protected void detect Cycles Collection values descriptors values Project Nature Descriptor natures Project Nature Descriptor values to Array new Project Nature Descriptor values size for int i 0 i natures length i if natures i colour WHITE has Cycles natures i  detectCycles ProjectNatureDescriptor ProjectNatureDescriptor toArray ProjectNatureDescriptor hasCycles
Returns a status indicating failure to configure natures protected I Status failure String reason return new Resource Status I Resource Status INVALID NATURE SET reason  IStatus ResourceStatus IResourceStatus INVALID_NATURE_SET
Returns the ID of the project nature that claims ownership of the builder with the given ID Returns null if no nature owns that builder public String find Nature For Builder String builderID if builders To Natures null builders To Natures new Hash Map 10 I Project Nature Descriptor descriptors get Nature Descriptors for int i 0 i descriptors length i String nature Id descriptors i get Nature Id String builders Project Nature Descriptor descriptors i get Builder Ids for int j 0 j builders length j FIXME how to handle multiple natures specifying same builder builders To Natures put builders j nature Id return String builders To Natures get builderID  findNatureForBuilder buildersToNatures buildersToNatures HashMap IProjectNatureDescriptor getNatureDescriptors natureId getNatureId ProjectNatureDescriptor getBuilderIds buildersToNatures natureId buildersToNatures
protected void flush Enablements I Project project if nature Enablements null nature Enablements remove project if nature Enablements size 0 nature Enablements null  flushEnablements IProject natureEnablements natureEnablements natureEnablements natureEnablements
Returns the cached array of enabled natures for this project or null if there is nothing in the cache protected String get Enabled Natures I Project project if nature Enablements null return String nature Enablements get project return null  getEnabledNatures IProject natureEnablements natureEnablements
Returns true if there are cycles in the graph of nature dependencies starting at root i Returns false otherwise Marks all descriptors that are involved in the cycle as invalid protected boolean has Cycles Project Nature Descriptor desc if desc colour BLACK this subgraph has already been traversed so we know the answer return desc has Cycle if we are already grey then we have found a cycle if desc colour GREY desc has Cycle true desc colour BLACK return true colour current descriptor GREY to indicate it is being visited desc colour GREY visit all dependents of nature i String required desc get Required Nature Ids for int i 0 i required length i Project Nature Descriptor dependency Project Nature Descriptor get Nature Descriptor required i missing dependencies cannot create cycles if dependency null has Cycles dependency desc has Cycle true desc colour BLACK return true desc has Cycle false desc colour BLACK return false  hasCycles ProjectNatureDescriptor hasCycle hasCycle getRequiredNatureIds ProjectNatureDescriptor ProjectNatureDescriptor getNatureDescriptor hasCycles hasCycle hasCycle
Returns true if the given project has linked resources and false otherwise protected boolean has Links I Project project try I Resource children project members for int i 0 i children length i if children i is Linked return true catch Core Exception e not possible for project to be inaccessible Resources Plugin get Plugin get Log log e get Status return false  hasLinks IProject IResource isLinked CoreException ResourcesPlugin getPlugin getLog getStatus
Checks if the two natures have overlapping one of nature set memberships Returns the name of one such overlap or null if there is no set overlap protected String has Set Overlap I Project Nature Descriptor one I Project Nature Descriptor two if one null two null return null efficiency not so important because these sets are very small String sets One one get Nature Set Ids String sets Two two get Nature Set Ids for int i One 0 i One sets One length i One for int i Two 0 i Two sets Two length i Two if sets One i One equals sets Two i Two return sets One i One return null  hasSetOverlap IProjectNatureDescriptor IProjectNatureDescriptor setsOne getNatureSetIds setsTwo getNatureSetIds iOne iOne setsOne iOne iTwo iTwo setsTwo iTwo setsOne iOne setsTwo iTwo setsOne iOne
Perform depth first insertion of the given nature ID into the result list protected void insert Array List list Set seen String id if seen contains id return seen add id insert prerequisite natures I Project Nature Descriptor desc get Nature Descriptor id if desc null String prereqs desc get Required Nature Ids for int i 0 i prereqs length i insert list seen prereqs i list add id  ArrayList IProjectNatureDescriptor getNatureDescriptor getRequiredNatureIds
public boolean is Nature Enabled Project project String id String enabled get Enabled Natures project if enabled null enabled compute Nature Enablements project set Enabled Natures project enabled for int i 0 i enabled length i if enabled i equals id return true return false  isNatureEnabled getEnabledNatures computeNatureEnablements setEnabledNatures
Only initialize the descriptor cache when we know it is actually needed Running programs may never need to refer to this cache protected void lazy Initialize if descriptors null return I Extension Point point Platform get Extension Registry get Extension Point Resources Plugin PI RESOURCES Resources Plugin PT NATURES I Extension extensions point get Extensions descriptors new Hash Map extensions length 2 1 for int i 0 imax extensions length i imax i I Project Nature Descriptor desc null try desc new Project Nature Descriptor extensions i catch Core Exception e Resources Plugin get Plugin get Log log e get Status if desc null descriptors put desc get Nature Id desc do cycle detection now so it only has to be done once cycle detection on a graph subset is a pain detect Cycles  lazyInitialize IExtensionPoint getExtensionRegistry getExtensionPoint ResourcesPlugin PI_RESOURCES ResourcesPlugin PT_NATURES IExtension getExtensions HashMap IProjectNatureDescriptor ProjectNatureDescriptor CoreException ResourcesPlugin getPlugin getLog getStatus getNatureId detectCycles
Sets the cached array of enabled natures for this project protected void set Enabled Natures I Project project String enablements if nature Enablements null nature Enablements new Hash Map 20 nature Enablements put project enablements  setEnabledNatures IProject natureEnablements natureEnablements HashMap natureEnablements
public void shutdown I Progress Monitor monitor throws Core Exception do nothing  IProgressMonitor CoreException
public String sort Nature Set String nature Ids int count nature Ids length if count 0 return nature Ids Array List result new Array List count Hash Set seen new Hash Set count for cycle and duplicate detection for int i 0 i count i insert result seen nature Ids i remove added prerequisites that didn t exist in original list seen clear seen add All Arrays as List nature Ids for Iterator it result iterator it has Next Object id it next if seen contains id it remove return String result to Array new String result size  sortNatureSet natureIds natureIds natureIds ArrayList ArrayList HashSet HashSet natureIds addAll asList natureIds hasNext toArray
public void startup I Progress Monitor monitor throws Core Exception Workspace Resources Plugin get Workspace add Lifecycle Listener this  IProgressMonitor CoreException ResourcesPlugin getWorkspace addLifecycleListener
Validates the given nature additions in the nature set for this project Tolerates existing inconsistencies in the nature set param new Natures the complete new set of nature I Ds for the project including additions param additions the subset of new Natures that represents natures being added return An OK status if all additions are valid and an error status if any of the additions introduce new inconsistencies protected I Status validate Additions Hash Set new Natures Hash Set additions I Project project Boolean has Links null three states true false null not yet computed perform checks in order from least expensive to most expensive for Iterator added additions iterator added has Next String id String added next check for adding a nature that is not available I Project Nature Descriptor desc get Nature Descriptor id if desc null return failure Policy bind natures missing Nature id NON NLS 1 check for adding a nature that creates a circular dependency if Project Nature Descriptor desc has Cycle return failure Policy bind natures has Cycle id NON NLS 1 check for adding a nature that has a missing prerequisite String required desc get Required Nature Ids for int i 0 i required length i if new Natures contains required i return failure Policy bind natures missing Prerequisite id required i NON NLS 1 check for adding a nature that creates a duplicated set member for Iterator all new Natures iterator all has Next String current String all next if current equals id String overlap has Set Overlap desc get Nature Descriptor current if overlap null return failure Policy bind natures multiple Set Members overlap NON NLS 1 check for adding a nature that has linked resource veto if desc is Linking Allowed if has Links null has Links has Links project Boolean TRUE Boolean FALSE if has Links boolean Value return failure Policy bind links veto Nature project get Name id NON NLS 1 return Status OK STATUS  newNatures IDs newNatures IStatus validateAdditions HashSet newNatures HashSet IProject hasLinks hasNext IProjectNatureDescriptor getNatureDescriptor missingNature ProjectNatureDescriptor hasCycle hasCycle getRequiredNatureIds newNatures missingPrerequisite newNatures hasNext hasSetOverlap getNatureDescriptor multipleSetMembers isLinkingAllowed hasLinks hasLinks hasLinks hasLinks booleanValue vetoNature getName OK_STATUS
Validates whether a project with the given set of natures should allow linked resources Returns an OK status if linking is allowed otherwise a non OK status indicating why linking is not allowed Linking is allowed if there is no project nature that explicitly disallows it No validation is done on the nature ids themselves ids that don t have a corresponding nature definition will be ignored public I Status validate Link Creation String nature Ids for int i 0 i nature Ids length i I Project Nature Descriptor desc get Nature Descriptor nature Ids i if desc null desc is Linking Allowed String msg Policy bind links nature Veto desc get Label NON NLS 1 return new Resource Status I Resource Status LINKING NOT ALLOWED msg return Status OK STATUS  IStatus validateLinkCreation natureIds natureIds IProjectNatureDescriptor getNatureDescriptor natureIds isLinkingAllowed natureVeto getLabel ResourceStatus IResourceStatus LINKING_NOT_ALLOWED OK_STATUS
Validates the given nature removals in the nature set for this project Tolerates existing inconsistencies in the nature set param new Natures the complete new set of nature I Ds for the project excluding deletions param deletions the nature I Ds that are being removed from the set return An OK status if all removals are valid and a not OK status if any of the deletions introduce new inconsistencies protected I Status validate Removals Hash Set new Natures Hash Set deletions iterate over new nature set and ensure that none of their prerequisites are being deleted for Iterator it new Natures iterator it has Next String currentID String it next I Project Nature Descriptor desc get Nature Descriptor currentID if desc null String required desc get Required Nature Ids for int i 0 i required length i if deletions contains required i return failure Policy bind natures invalid Removal required i currentID NON NLS 1 return Status OK STATUS  newNatures IDs IDs IStatus validateRemovals HashSet newNatures HashSet newNatures hasNext IProjectNatureDescriptor getNatureDescriptor getRequiredNatureIds invalidRemoval OK_STATUS
public I Status validate Nature Set String nature Ids int count nature Ids length if count 0 return Status OK STATUS String msg Policy bind natures invalid Set NON NLS 1 Multi Status result new Multi Status Resources Plugin PI RESOURCES I Resource Status INVALID NATURE SET msg null set of the nature ids being validated String id Hash Set natures new Hash Set count 2 set of nature sets for which a member nature has been found String id Hash Set sets new Hash Set count for int i 0 i count i String id nature Ids i Project Nature Descriptor desc Project Nature Descriptor get Nature Descriptor id if desc null result add failure Policy bind natures missing Nature id NON NLS 1 continue if desc has Cycle result add failure Policy bind natures has Cycle id NON NLS 1 if natures add id result add failure Policy bind natures duplicate Nature id NON NLS 1 validate nature set one of constraint String set Ids desc get Nature Set Ids for int j 0 j set Ids length j if sets add set Ids j result add failure Policy bind natures multiple Set Members set Ids j NON NLS 1 now walk over the set and ensure all pre requisite natures are present for int i 0 i count i I Project Nature Descriptor desc get Nature Descriptor nature Ids i if desc null continue String required desc get Required Nature Ids for int j 0 j required length j if natures contains required j result add failure Policy bind natures missing Prerequisite nature Ids i required j NON NLS 1 if there are no problems we must return a status whose code is OK return result isOK Status OK STATUS I Status result  IStatus validateNatureSet natureIds natureIds OK_STATUS invalidSet MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus INVALID_NATURE_SET HashSet HashSet HashSet HashSet natureIds ProjectNatureDescriptor ProjectNatureDescriptor getNatureDescriptor missingNature hasCycle hasCycle duplicateNature setIds getNatureSetIds setIds setIds multipleSetMembers setIds IProjectNatureDescriptor getNatureDescriptor natureIds getRequiredNatureIds missingPrerequisite natureIds OK_STATUS IStatus

Returns true if the given name is a valid resource name on this operating system and false otherwise public static boolean is Name Valid String name if INSTALLED PLATFORM equals Constants OS WIN32 on windows filename suffixes are not relevant to name validity int dot name index Of name dot 1 name name substring 0 dot return Arrays binary Search INVALID RESOURCE NAMES name to Lower Case 0 return true  isNameValid INSTALLED_PLATFORM OS_WIN32 indexOf binarySearch INVALID_RESOURCE_NAMES toLowerCase

Constructor for the class public Path Variable Manager this listeners Collections synchronized Set new Hash Set this preferences Resources Plugin get Plugin get Plugin Preferences  PathVariableManager synchronizedSet HashSet ResourcesPlugin getPlugin getPluginPreferences
Note that if a user changes the key in the preferences file to be invalid and then calls get Value using that key they will get the value back for that But then if they try and call set Value using the same key it will throw an exception We may want to revisit this behaviour in the future see org eclipse core resources I Path Variable Manager get Value String public I Path get Value String var Name String key get Key For Name var Name String value preferences get String key return value length 0 null new Path value  getValue setValue IPathVariableManager getValue IPath getValue varName getKeyForName varName getString
see org eclipse core resources I Path Variable Manager set Value String I Path public void set Value String var Name I Path new Value throws Core Exception check Is Valid Name var Name if the location doesn t have a device see if the OS will assign one if new Value null new Value is Absolute new Value get Device null new Value new Path new Value to File get Absolute Path check Is Valid Value new Value int event Type read previous value and set new value atomically in order to generate the right event synchronized this I Path current Value get Value var Name boolean variable Exists current Value null if variable Exists new Value null return if variable Exists current Value equals new Value return if new Value null preferences set To Default get Key For Name var Name event Type I Path Variable Change Event VARIABLE DELETED else preferences set Value get Key For Name var Name new Value to String event Type variable Exists I Path Variable Change Event VARIABLE CHANGED I Path Variable Change Event VARIABLE CREATED notify listeners from outside the synchronized block to avoid deadlocks fire Variable Change Event var Name new Value event Type  IPathVariableManager setValue IPath setValue varName IPath newValue CoreException checkIsValidName varName newValue newValue isAbsolute newValue getDevice newValue newValue toFile getAbsolutePath checkIsValidValue newValue eventType IPath currentValue getValue varName variableExists currentValue variableExists newValue variableExists currentValue newValue newValue setToDefault getKeyForName varName eventType IPathVariableChangeEvent VARIABLE_DELETED setValue getKeyForName varName newValue toString eventType variableExists IPathVariableChangeEvent VARIABLE_CHANGED IPathVariableChangeEvent VARIABLE_CREATED fireVariableChangeEvent varName newValue eventType
Throws an exception if the given path is not valid as a path variable value private void check Is Valid Value I Path new Value throws Core Exception I Status status validate Value new Value if status isOK throw new Core Exception status  checkIsValidValue IPath newValue CoreException IStatus validateValue newValue CoreException
Return a key to use in the Preferences private String get Key For Name String var Name return VARIABLE PREFIX var Name  getKeyForName varName VARIABLE_PREFIX varName
see org eclipse core resources I Path Variable Manager resolve Path I Path public I Path resolve Path I Path path if path null path segment Count 0 path is Absolute path get Device null return path I Path value get Value path segment 0 return value null path value append path remove First Segments 1  IPathVariableManager resolvePath IPath IPath resolvePath IPath segmentCount isAbsolute getDevice IPath getValue removeFirstSegments
final I Path Variable Change Listener l I Path Variable Change Listener listener Array i I Safe Runnable job new I Safe Runnable public void handle Exception Throwable exception already being logged in Platform run  IPathVariableChangeListener IPathVariableChangeListener listenerArray ISafeRunnable ISafeRunnable handleException
public void run throws Exception l path Variable Changed pve  pathVariableChanged
Fires a property change event corresponding to a change to the current value of the variable with the given name param name the name of the variable to be used as the variable in the event object param value the current value of the path variable or code null code if the variable was deleted param type one of code I Path Variable Change Event VARIABLE CREATED code code I Path Variable Change Event VARIABLE CHANGED code or code I Path Variable Change Event VARIABLE DELETED code see I Path Variable Change Event see I Path Variable Change Event VARIABLE CREATED see I Path Variable Change Event VARIABLE CHANGED see I Path Variable Change Event VARIABLE DELETED private void fire Variable Change Event String name I Path value int type if this listeners size 0 return use a separate collection to avoid interference of simultaneous additions removals Object listener Array this listeners to Array final Path Variable Change Event pve new Path Variable Change Event this name value type for int i 0 i listener Array length i final I Path Variable Change Listener l I Path Variable Change Listener listener Array 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 path Variable Changed pve Platform run job  IPathVariableChangeEvent VARIABLE_CREATED IPathVariableChangeEvent VARIABLE_CHANGED IPathVariableChangeEvent VARIABLE_DELETED IPathVariableChangeEvent IPathVariableChangeEvent VARIABLE_CREATED IPathVariableChangeEvent VARIABLE_CHANGED IPathVariableChangeEvent VARIABLE_DELETED fireVariableChangeEvent IPath listenerArray toArray PathVariableChangeEvent PathVariableChangeEvent listenerArray IPathVariableChangeListener IPathVariableChangeListener listenerArray ISafeRunnable ISafeRunnable handleException pathVariableChanged
see org eclipse core resources I Path Variable Manager get Path Variable Names public String get Path Variable Names List result new Linked List String names preferences property Names for int i 0 i names length i if names i starts With VARIABLE PREFIX String key names i substring VARIABLE PREFIX length filter out names for preferences which might be valid in the preference store but does not have valid path variable names and or values We can get in this state if the user has edited the file on disk or set a preference using the prefix reserved to path variables VARIABLE PREFIX TODO we may want to look at removing these keys from the preference store as a garbage collection means if validate Name key isOK validate Value get Value key isOK result add key return String result to Array new String result size  IPathVariableManager getPathVariableNames getPathVariableNames LinkedList propertyNames startsWith VARIABLE_PREFIX VARIABLE_PREFIX VARIABLE_PREFIX validateName validateValue getValue toArray
see org eclipse core resources I Path Variable Manager add Change Listener I Path Variable Change Listener public void add Change Listener I Path Variable Change Listener listener listeners add listener  IPathVariableManager addChangeListener IPathVariableChangeListener addChangeListener IPathVariableChangeListener
see org eclipse core resources I Path Variable Manager remove Change Listener I Path Variable Change Listener public void remove Change Listener I Path Variable Change Listener listener listeners remove listener  IPathVariableManager removeChangeListener IPathVariableChangeListener removeChangeListener IPathVariableChangeListener
see org eclipse core resources I Path Variable Manager is Defined String public boolean is Defined String var Name return get Value var Name null  IPathVariableManager isDefined isDefined varName getValue varName
see org eclipse core resources I Path Variable Manager validate Name String public I Status validate Name String name String message null if name length 0 message Policy bind pathvar length NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message char first name char At 0 if Character is Letter first first   message Policy bind pathvar begin Letter String value Of first NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message for int i 1 i name length i char following name char At i if Character is Letter following Character is Digit following following   message Policy bind pathvar invalid Char String value Of following NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message return Status OK STATUS  IPathVariableManager validateName IStatus validateName ResourceStatus IResourceStatus INVALID_VALUE charAt isLetter _ beginLetter valueOf ResourceStatus IResourceStatus INVALID_VALUE charAt isLetter isDigit _ invalidChar valueOf ResourceStatus IResourceStatus INVALID_VALUE OK_STATUS
see I Path Variable Manager validate Value I Path public I Status validate Value I Path value if value null value is Valid Path value to String value is Absolute String message Policy bind pathvar invalid Value NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message return Status OK STATUS  IPathVariableManager validateValue IPath IStatus validateValue IPath isValidPath toString isAbsolute invalidValue ResourceStatus IResourceStatus INVALID_VALUE OK_STATUS
Throws a runtime exception if the given name is not valid as a path variable name private void check Is Valid Name String name throws Core Exception I Status status validate Name name if status isOK throw new Core Exception status  checkIsValidName CoreException IStatus validateName CoreException
see org eclipse core internal resources I Manager startup I Progress Monitor public void startup I Progress Monitor monitor throws Core Exception since we are accessing the preference store directly we don t need to do any setup here  IManager IProgressMonitor IProgressMonitor CoreException
see org eclipse core internal resources I Manager shutdown I Progress Monitor public void shutdown I Progress Monitor monitor throws Core Exception The preferences for this plug in are saved in the Plugin shutdown method so we don t have to do it here  IManager IProgressMonitor IProgressMonitor CoreException

private static URL rootURL public PlatformURL Resource Connection URL url super url  PlatformURLResourceConnection
protected boolean allow Caching return false don t cache workspace is local  allowCaching
protected URL resolve throws IO Exception I Path spec new Path url get File trim make Relative if spec segment 0 equals RESOURCE throw new IO Exception Policy bind url bad Variant url to String NON NLS 1 int count spec segment Count if there is only one segment then we are talking about the workspace root if count 1 return rootURL if there are two segments then the second is a project name I Project project Resources Plugin get Workspace get Root get Project spec segment 1 if project exists String message Policy bind url could Not Resolve project get Name url to External Form NON NLS 1 throw new IO Exception message I Path result null if count 2 result project get Location else spec spec remove First Segments 2 result project get File spec get Location return new URL file result to String NON NLS 1 NON NLS 2  IOException IPath getFile makeRelative IOException badVariant toString segmentCount IProject ResourcesPlugin getWorkspace getRoot getProject couldNotResolve getName toExternalForm IOException IPath getLocation removeFirstSegments getFile getLocation toString
This method is called during resource plugin startup initialization param root URL to the root of the current workspace public static void startup I Path root register connection type for platform resource handling if rootURL null return try rootURL new URL file root to String NON NLS 1 catch MalformedURL Exception e should never happen but if it does the resource URL cannot be supported return PlatformURL Handler register RESOURCE PlatformURL Resource Connection class  IPath toString MalformedURLException PlatformURLHandler PlatformURLResourceConnection

public class Project extends Container implements I Project protected Project I Path path Workspace container super path container  IProject IPath
protected Multi Status basic Set Description Project Description description int update Flags String message Policy bind resources project Desc NON NLS 1 Multi Status result new Multi Status Resources Plugin PI RESOURCES I Resource Status FAILED WRITE METADATA message null Project Description current internal Get Description current set Comment description get Comment set the build order before setting the references or the natures current set Build Spec description get Build Spec true set the references before the natures boolean flush Order false I Project old References current get Referenced Projects I Project new References description get Referenced Projects if Arrays equals old References new References current set Referenced Projects new References flush Order true old References current get Dynamic References new References description get Dynamic References if Arrays equals old References new References current set Dynamic References new References flush Order true if flush Order workspace flush Build Order the natures last as this may cause recursive calls to set Description if update Flags I Resource AVOID NATURE CONFIG 0 workspace get Nature Manager configure Natures this current description result else current set Nature Ids description get Nature Ids false return result  MultiStatus basicSetDescription ProjectDescription updateFlags projectDesc MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus FAILED_WRITE_METADATA ProjectDescription internalGetDescription setComment getComment setBuildSpec getBuildSpec flushOrder IProject oldReferences getReferencedProjects IProject newReferences getReferencedProjects oldReferences newReferences setReferencedProjects newReferences flushOrder oldReferences getDynamicReferences newReferences getDynamicReferences oldReferences newReferences setDynamicReferences newReferences flushOrder flushOrder flushBuildOrder setDescription updateFlags IResource AVOID_NATURE_CONFIG getNatureManager configureNatures setNatureIds getNatureIds
public void build int kind String builder Name Map args I Progress Monitor monitor throws Core Exception final I Scheduling Rule rule workspace get Rule Factory build Rule try workspace prepare Operation rule monitor Resource Info info get Resource Info false false int flags get Flags info if exists flags true is Open flags return workspace begin Operation true workspace about To Build workspace get Build Manager build this kind builder Name args monitor workspace broadcast Changes I Resource Change Event POST BUILD false finally building may close the tree but we are still inside an operation so open it if workspace get Element Tree is Immutable workspace new Working Tree workspace end Operation rule false null  builderName IProgressMonitor CoreException ISchedulingRule getRuleFactory buildRule prepareOperation ResourceInfo getResourceInfo getFlags isOpen beginOperation aboutToBuild getBuildManager builderName broadcastChanges IResourceChangeEvent POST_BUILD getElementTree isImmutable newWorkingTree endOperation
public void build int trigger I Progress Monitor monitor throws Core Exception final I Scheduling Rule rule workspace get Rule Factory build Rule try workspace prepare Operation rule monitor Resource Info info get Resource Info false false int flags get Flags info if exists flags true is Open flags return workspace begin Operation true workspace about To Build workspace get Build Manager build this trigger monitor workspace broadcast Changes I Resource Change Event POST BUILD false finally building may close the tree but we are still inside an operation so open it if workspace get Element Tree is Immutable workspace new Working Tree workspace end Operation rule false null  IProgressMonitor CoreException ISchedulingRule getRuleFactory buildRule prepareOperation ResourceInfo getResourceInfo getFlags isOpen beginOperation aboutToBuild getBuildManager broadcastChanges IResourceChangeEvent POST_BUILD getElementTree isImmutable newWorkingTree endOperation
Checks that this resource is accessible Typically this means that it exists In the case of projects they must also be open If phantom is true phantom resources are considered exception Core Exception if this resource is not accessible public void check Accessible int flags throws Core Exception super check Accessible flags if is Open flags String message Policy bind resources must Be Open get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status PROJECT NOT OPEN get Full Path message null  CoreException checkAccessible CoreException checkAccessible isOpen mustBeOpen getFullPath toString ResourceException IResourceStatus PROJECT_NOT_OPEN getFullPath
Checks validity of the given project description protected void check Description I Project project I Project Description desc boolean moving throws Core Exception I Path location desc get Location if location null return String message Policy bind resources invalid Proj Desc NON NLS 1 Multi Status status new Multi Status Resources Plugin PI RESOURCES I Resource Status INVALID VALUE message null status merge workspace validate Name desc get Name I Resource PROJECT if moving if we got here from a move call then we should check the location in the description since its possible that we want to do a rename without moving the contents and we shouldn t throw an Overlapping mapping exception in this case So if the source description s location is null we are using the default or if the locations aren t equal then validate the location of the new description Otherwise both locations aren t null and they are equal so ignore validation I Path source Location internal Get Description get Location if source Location null source Location equals location status merge workspace validate Project Location project location else otherwise continue on like before status merge workspace validate Project Location project location if status isOK throw new Resource Exception status try infer the device if there isn t one windows desc set Location new Path location to File get Absolute Path  checkDescription IProject IProjectDescription CoreException IPath getLocation invalidProjDesc MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus INVALID_VALUE validateName getName IResource IPath sourceLocation internalGetDescription getLocation sourceLocation sourceLocation validateProjectLocation validateProjectLocation ResourceException setLocation toFile getAbsolutePath
public void close I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String msg Policy bind resources closing 1 get Full Path to String NON NLS 1 monitor begin Task msg Policy total Work final I Scheduling Rule rule workspace get Rule Factory modify Rule this try Do this before the prepare to allow lifecycle participants to change the tree workspace broadcast Event Lifecycle Event new Event Lifecycle Event PRE PROJECT CLOSE this workspace prepare Operation rule monitor Resource Info info get Resource Info false false int flags get Flags info check Exists flags true monitor sub Task msg if is Open flags return Signal that this resource is about to be closed Do this at the very beginning so that infrastructure pieces have a chance to do clean up while the resources still exist workspace begin Operation true flush the build order early in case there is a problem workspace flush Build Order I Progress Monitor sub Policy sub Monitor For monitor Policy op Work 2 Sub Progress Monitor SUPPRESS SUBTASK LABEL I Status save Status workspace get Save Manager save I Save Context PROJECT SAVE this sub internal Close monitor worked Policy op Work 2 if save Status null save Status isOK throw new Resource Exception save Status catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  IProgressMonitor CoreException monitorFor getFullPath toString beginTask totalWork ISchedulingRule getRuleFactory modifyRule broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_PROJECT_CLOSE prepareOperation ResourceInfo getResourceInfo getFlags checkExists subTask isOpen beginOperation flushBuildOrder IProgressMonitor subMonitorFor opWork SubProgressMonitor SUPPRESS_SUBTASK_LABEL IStatus saveStatus getSaveManager ISaveContext PROJECT_SAVE internalClose opWork saveStatus saveStatus ResourceException saveStatus OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
public void copy I Project Description destination int update Flags I Progress Monitor monitor throws Core Exception FIXME the logic here for copying projects needs to be moved to Resource copy so that I Resource copy I Project Description int I Progress Monitor works properly for projects and honours all update flags Assert is Not Null destination internal Copy destination update Flags monitor  IProjectDescription updateFlags IProgressMonitor CoreException IResource IProjectDescription IProgressMonitor isNotNull internalCopy updateFlags
public void copy I Path destination int update Flags I Progress Monitor monitor throws Core Exception FIXME the logic here for copying projects needs to be moved to Resource copy so that I Resource copy I Path int I Progress Monitor works properly for projects and honours all update flags monitor Policy monitor For monitor if destination segment Count 1 copy project to project String project Name destination segment 0 I Project Description desc get Description desc set Name project Name desc set Location null internal Copy desc update Flags monitor else will fail since we re trying to copy a project to a non project check Copy Requirements destination I Resource PROJECT update Flags  IPath updateFlags IProgressMonitor CoreException IResource IPath IProgressMonitor monitorFor segmentCount projectName IProjectDescription getDescription setName projectName setLocation internalCopy updateFlags checkCopyRequirements IResource updateFlags
protected void copy Meta Area I Project source I Project destination I Progress Monitor monitor throws Core Exception java io File old Meta Area workspace get Meta Area location For source to File java io File new Meta Area workspace get Meta Area location For destination to File get Local Manager get Store copy old Meta Area new Meta Area I Resource DEPTH INFINITE monitor  copyMetaArea IProject IProject IProgressMonitor CoreException oldMetaArea getMetaArea locationFor toFile newMetaArea getMetaArea locationFor toFile getLocalManager getStore oldMetaArea newMetaArea IResource DEPTH_INFINITE
public void create I Project Description description I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try monitor begin Task Policy bind resources create Policy total Work NON NLS 1 check Valid Path path PROJECT false final I Scheduling Rule rule workspace get Rule Factory create Rule this try workspace prepare Operation rule monitor check Does Not Exist if description null check Description this description false workspace broadcast Event Lifecycle Event new Event Lifecycle Event PRE PROJECT CREATE this workspace begin Operation true workspace create Resource this false workspace get Meta Area create this Project Info info Project Info get Resource Info false true setup description to obtain project location Project Description desc if description null desc new Project Description else desc Project Description Project Description description clone desc set Name get Name info set Description desc look for a description on disk try if get Local Manager has Saved Project this update Description make sure the location file is written workspace get Meta Area write Private Description this else write out the project write Description I Resource FORCE catch Core Exception e workspace delete Resource this throw e inaccessible projects have a null modification stamp set this after setting the description as set Description updates the stamp info set Modification Stamp I Resource NULL STAMP workspace get Save Manager request Snapshot catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  IProjectDescription IProgressMonitor CoreException monitorFor beginTask totalWork checkValidPath ISchedulingRule getRuleFactory createRule prepareOperation checkDoesNotExist checkDescription broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_PROJECT_CREATE beginOperation createResource getMetaArea ProjectInfo ProjectInfo getResourceInfo ProjectDescription ProjectDescription ProjectDescription ProjectDescription setName getName setDescription getLocalManager hasSavedProject updateDescription getMetaArea writePrivateDescription writeDescription IResource CoreException deleteResource setDescription setModificationStamp IResource NULL_STAMP getSaveManager requestSnapshot OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
see I Project create I Progress Monitor public void create I Progress Monitor monitor throws Core Exception create null monitor  IProject IProgressMonitor IProgressMonitor CoreException
see I Resource delete boolean I Progress Monitor public void delete boolean force I Progress Monitor monitor throws Core Exception int update Flags force I Resource FORCE I Resource NONE delete update Flags monitor  IResource IProgressMonitor IProgressMonitor CoreException updateFlags IResource IResource updateFlags
protected void fixup After Move Source throws Core Exception workspace delete Resource this  fixupAfterMoveSource CoreException deleteResource
public void delete boolean delete Content boolean force I Progress Monitor monitor throws Core Exception int update Flags force I Resource FORCE I Resource NONE update Flags delete Content I Resource ALWAYS DELETE PROJECT CONTENT I Resource NEVER DELETE PROJECT CONTENT delete update Flags monitor  deleteContent IProgressMonitor CoreException updateFlags IResource IResource updateFlags deleteContent IResource ALWAYS_DELETE_PROJECT_CONTENT IResource NEVER_DELETE_PROJECT_CONTENT updateFlags
public String get Default Charset boolean check Implicit throws Core Exception non existing resources default to parent s charset if exists return check Implicit Resources Plugin get Encoding null return workspace get Charset Manager get Charset For get Full Path check Implicit  getDefaultCharset checkImplicit CoreException checkImplicit ResourcesPlugin getEncoding getCharsetManager getCharsetFor getFullPath checkImplicit
public I Project Description get Description throws Core Exception Resource Info info get Resource Info false false check Accessible get Flags info return I Project Description Project Info info get Description clone  IProjectDescription getDescription CoreException ResourceInfo getResourceInfo checkAccessible getFlags IProjectDescription ProjectInfo getDescription
public I Project Nature get Nature String natureID throws Core Exception Has it already been initialized Project Info info Project Info get Resource Info false false check Accessible get Flags info I Project Nature nature info get Nature natureID if nature null Not initialized yet Does this project have the nature if has Nature natureID return null nature workspace get Nature Manager create Nature this natureID info set Nature natureID nature return nature  IProjectNature getNature CoreException ProjectInfo ProjectInfo getResourceInfo checkAccessible getFlags IProjectNature getNature hasNature getNatureManager createNature setNature
see I Resource get Parent public I Container get Parent return workspace get Root  IResource getParent IContainer getParent getRoot
non Javadoc see I Project get Plugin Working Location I Plugin Descriptor deprecated public I Path get Plugin Working Location I Plugin Descriptor plugin if plugin null return null return get Working Location plugin get Unique Identifier  IProject getPluginWorkingLocation IPluginDescriptor IPath getPluginWorkingLocation IPluginDescriptor getWorkingLocation getUniqueIdentifier
public I Path get Working Location String id if id null exists return null I Path result workspace get Meta Area get Working Location this id result to File mkdirs return result  IPath getWorkingLocation IPath getMetaArea getWorkingLocation toFile
see I Resource get Project public I Project get Project return this  IResource getProject IProject getProject
see I Resource get Project Relative Path public I Path get Project Relative Path return Path EMPTY  IResource getProjectRelativePath IPath getProjectRelativePath
see I Resource get Raw Location public I Path get Raw Location Project Description description internal Get Description return description null null description get Location  IResource getRawLocation IPath getRawLocation ProjectDescription internalGetDescription getLocation
public I Project get Referenced Projects throws Core Exception Resource Info info get Resource Info false false check Accessible get Flags info return Project Info info get Description get All References true  IProject getReferencedProjects CoreException ResourceInfo getResourceInfo checkAccessible getFlags ProjectInfo getDescription getAllReferences
public I Project get Referencing Projects I Project projects workspace get Root get Projects List result new Array List projects length for int i 0 i projects length i Project project Project projects i if project is Accessible continue Project Description description project internal Get Description if description null continue I Project references description get All References false for int j 0 j references length j if references j equals this result add projects i break return I Project result to Array new I Project result size  IProject getReferencingProjects IProject getRoot getProjects ArrayList isAccessible ProjectDescription internalGetDescription IProject getAllReferences IProject toArray IProject
see I Resource get Type public int get Type return PROJECT  IResource getType getType
public boolean has Nature String natureID throws Core Exception check Accessible get Flags get Resource Info false false use internal method to avoid copy but still throw an exception if the resource doesn t exist I Project Description desc internal Get Description if desc null check Accessible NULL FLAG return desc has Nature natureID  hasNature CoreException checkAccessible getFlags getResourceInfo IProjectDescription internalGetDescription checkAccessible NULL_FLAG hasNature
Closes the project This is called during restore when there is a failure to read the project description Since it is called during workspace restore it cannot start any operations protected void internal Close throws Core Exception workspace flush Build Order get Marker Manager remove Markers this I Resource DEPTH INFINITE remove each member from the resource tree DO NOT use resource delete as this will delete it from disk as well I Resource members members I Container INCLUDE PHANTOMS I Container INCLUDE TEAM PRIVATE MEMBERS for int i 0 i members length i Resource member Resource members i workspace delete Resource member finally mark the project as closed Resource Info info get Resource Info false true info clear M OPEN info clear Session Properties info set Modification Stamp I Resource NULL STAMP info set Sync Info null  internalClose CoreException flushBuildOrder getMarkerManager removeMarkers IResource DEPTH_INFINITE IResource IContainer INCLUDE_PHANTOMS IContainer INCLUDE_TEAM_PRIVATE_MEMBERS deleteResource ResourceInfo getResourceInfo M_OPEN clearSessionProperties setModificationStamp IResource NULL_STAMP setSyncInfo
protected void internal Copy I Project Description dest Desc int update Flags I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String message Policy bind resources copying get Full Path to String NON NLS 1 monitor begin Task message Policy total Work String dest Name dest Desc get Name I Path dest Path new Path dest Name make Absolute Project destination Project workspace get Root get Project dest Name final I Scheduling Rule rule workspace get Rule Factory copy Rule this destination try workspace prepare Operation rule monitor The following assert method throws Core Exceptions as stated in the I Project copy API and assert for programming errors See check Copy Requirements for more information assert Copy Requirements dest Path I Resource PROJECT update Flags check Description destination dest Desc false workspace broadcast Event Lifecycle Event new Event Lifecycle Event PRE PROJECT COPY this destination update Flags workspace begin Operation true get Local Manager refresh this DEPTH INFINITE true Policy sub Monitor For monitor Policy op Work 20 100 close the property store so incorrect info is not copied to the destination get Property Manager close Property Store this copy the meta area for the project copy Meta Area this destination Policy sub Monitor For monitor Policy op Work 5 100 copy just the project and not its children yet tree node properties internal Copy Project Only destination Policy sub Monitor For monitor Policy op Work 5 100 set the description destination internal Set Description dest Desc false call super copy for each child excluding project description file make it a best effort copy message Policy bind resources copy Problem NON NLS 1 Multi Status problems new Multi Status Resources Plugin PI RESOURCES I Resource Status INTERNAL ERROR message null I Resource children members I Container INCLUDE TEAM PRIVATE MEMBERS final int child Count children length final int child Work child Count 1 Policy op Work 50 100 child Count 1 0 for int i 0 i child Count i I Resource child children i if is Project Description File child try child copy dest Path append child get Name update Flags Policy sub Monitor For monitor child Work catch Core Exception e problems merge e get Status write out the new project description to the meta area try destination write Description I Resource FORCE catch Core Exception e try destination delete update Flags I Resource FORCE 0 null catch Core Exception e2 ignore and rethrow the exception that got us here throw e monitor worked Policy op Work 10 100 refresh local monitor sub Task Policy bind resources updating NON NLS 1 get Local Manager refresh destination DEPTH INFINITE true Policy sub Monitor For monitor Policy op Work 10 100 if problems isOK throw new Resource Exception problems catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  internalCopy IProjectDescription destDesc updateFlags IProgressMonitor CoreException monitorFor getFullPath toString beginTask totalWork destName destDesc getName IPath destPath destName makeAbsolute getRoot getProject destName ISchedulingRule getRuleFactory copyRule prepareOperation CoreExceptions IProject checkCopyRequirements assertCopyRequirements destPath IResource updateFlags checkDescription destDesc broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_PROJECT_COPY updateFlags beginOperation getLocalManager DEPTH_INFINITE subMonitorFor opWork getPropertyManager closePropertyStore copyMetaArea subMonitorFor opWork internalCopyProjectOnly subMonitorFor opWork internalSetDescription destDesc copyProblem MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus INTERNAL_ERROR IResource IContainer INCLUDE_TEAM_PRIVATE_MEMBERS childCount childWork childCount opWork childCount childCount IResource isProjectDescriptionFile destPath getName updateFlags subMonitorFor childWork CoreException getStatus writeDescription IResource CoreException updateFlags IResource CoreException opWork subTask getLocalManager DEPTH_INFINITE subMonitorFor opWork ResourceException OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
protected void internal Copy Project Only I Resource destination I Progress Monitor monitor throws Core Exception close the property store so bogus values aren t copied to the destination get Property Manager close Property Store this copy the tree and properties workspace copy Tree this destination get Full Path I Resource DEPTH ZERO I Resource NONE false get Property Manager copy this destination I Resource DEPTH ZERO clear instantiated builders and natures because they reference the project handle Project Info info Project Info Resource destination get Resource Info false true info set Builders null info clear Natures clear session properties and markers for the new project because they shouldn t be copied info set Markers null info clear Session Properties  internalCopyProjectOnly IResource IProgressMonitor CoreException getPropertyManager closePropertyStore copyTree getFullPath IResource DEPTH_ZERO IResource getPropertyManager IResource DEPTH_ZERO ProjectInfo ProjectInfo getResourceInfo setBuilders clearNatures setMarkers clearSessionProperties
This is an internal helper method This implementation is different from the API method get Description This one does not check the project accessibility It exists in order to prevent chicken and egg problems in places like the project creation It may return null public Project Description internal Get Description Project Info info Project Info get Resource Info false false if info null return null return info get Description  getDescription ProjectDescription internalGetDescription ProjectInfo ProjectInfo getResourceInfo getDescription
Sets this project s description to the given value This is the body of the corresponding API method but is needed separately since it is used during workspace restore i e when you cannot do an operation void internal Set Description I Project Description value boolean increment Content Id Resource Info info get Resource Info false true Project Info info set Description Project Description value if increment Content Id info increment Content Id if the project is not accessible stamp will be null and should remain null if info get Modification Stamp NULL STAMP workspace update Modification Stamp info  internalSetDescription IProjectDescription incrementContentId ResourceInfo getResourceInfo ProjectInfo setDescription ProjectDescription incrementContentId incrementContentId getModificationStamp NULL_STAMP updateModificationStamp
public void internal Set Local boolean flag int depth throws Core Exception do nothing for projects but call for its children if depth I Resource DEPTH ZERO return if depth I Resource DEPTH ONE depth I Resource DEPTH ZERO get the children via the workspace since we know that this resource exists it is local I Resource children get Children this false for int i 0 i children length i Resource children i internal Set Local flag depth  internalSetLocal CoreException IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_ZERO IResource getChildren internalSetLocal
see I Resource is Accessible public boolean is Accessible return is Open  IResource isAccessible isAccessible isOpen
see I Resource is Local int public boolean is Local int depth the flags parm is ignored for projects so pass anything return is Local 1 depth  IResource isLocal isLocal isLocal
public boolean is Local int flags int depth don t check the flags projects are always local if depth DEPTH ZERO return true if depth DEPTH ONE depth DEPTH ZERO get the children via the workspace since we know that this resource exists it is local I Resource children get Children this false for int i 0 i children length i if children i is Local depth return false return true  isLocal DEPTH_ZERO DEPTH_ONE DEPTH_ZERO IResource getChildren isLocal
see I Project is Nature Enabled String public boolean is Nature Enabled String nature Id throws Core Exception check Accessible get Flags get Resource Info false false return workspace get Nature Manager is Nature Enabled this nature Id  IProject isNatureEnabled isNatureEnabled natureId CoreException checkAccessible getFlags getResourceInfo getNatureManager isNatureEnabled natureId
see I Project is Open public boolean is Open Resource Info info get Resource Info false false return is Open get Flags info  IProject isOpen isOpen ResourceInfo getResourceInfo isOpen getFlags
see I Project is Open public boolean is Open int flags return flags NULL FLAG Resource Info is Set flags M OPEN  IProject isOpen isOpen NULL_FLAG ResourceInfo isSet M_OPEN
Returns true if this resource represents the project description file and false otherwise protected boolean is Project Description File I Resource resource return resource get Type I Resource FILE resource get Full Path segment Count 2 resource get Name equals I Project Description DESCRIPTION FILE NAME  isProjectDescriptionFile IResource getType IResource getFullPath segmentCount getName IProjectDescription DESCRIPTION_FILE_NAME
see I Project move I Project Description boolean I Progress Monitor public void move I Project Description destination boolean force I Progress Monitor monitor throws Core Exception Assert is Not Null destination move destination force I Resource FORCE I Resource NONE monitor  IProject IProjectDescription IProgressMonitor IProjectDescription IProgressMonitor CoreException isNotNull IResource IResource
public void move I Project Description description int update Flags I Progress Monitor monitor throws Core Exception Assert is Not Null description monitor Policy monitor For monitor try String message Policy bind resources moving get Full Path to String NON NLS 1 monitor begin Task message Policy total Work I Project destination workspace get Root get Project description get Name final I Scheduling Rule rule workspace get Rule Factory move Rule this destination try workspace prepare Operation rule monitor The following assert method throws Core Exceptions as stated in the I Resource move API and assert for programming errors See check Move Requirements for more information if get Name equals description get Name I Path dest Path Path ROOT append description get Name assert Move Requirements dest Path I Resource PROJECT update Flags check Description destination description true workspace begin Operation true message Policy bind resources move Problem NON NLS 1 Multi Status status new Multi Status Resources Plugin PI RESOURCES I Status ERROR message null Work Manager work Manager workspace get Work Manager Resource Tree tree new Resource Tree work Manager get Lock status update Flags I Move Delete Hook hook workspace get Move Delete Hook workspace broadcast Event Lifecycle Event new Event Lifecycle Event PRE PROJECT MOVE this destination update Flags int depth 0 try depth work Manager begin Unprotected if hook move Project tree this description update Flags Policy sub Monitor For monitor Policy op Work 2 tree standard Move Project this description update Flags Policy sub Monitor For monitor Policy op Work 2 finally work Manager end Unprotected depth Invalidate the tree for further use by clients tree make Invalid if tree get Status isOK throw new Resource Exception tree get Status catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  IProjectDescription updateFlags IProgressMonitor CoreException isNotNull monitorFor getFullPath toString beginTask totalWork IProject getRoot getProject getName ISchedulingRule getRuleFactory moveRule prepareOperation CoreExceptions IResource checkMoveRequirements getName getName IPath destPath getName assertMoveRequirements destPath IResource updateFlags checkDescription beginOperation moveProblem MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IStatus WorkManager workManager getWorkManager ResourceTree ResourceTree workManager getLock updateFlags IMoveDeleteHook getMoveDeleteHook broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_PROJECT_MOVE updateFlags workManager beginUnprotected moveProject updateFlags subMonitorFor opWork standardMoveProject updateFlags subMonitorFor opWork workManager endUnprotected makeInvalid getStatus ResourceException getStatus OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
public void open I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String msg Policy bind resources opening 1 get Full Path to String NON NLS 1 monitor begin Task msg Policy total Work monitor sub Task msg final I Scheduling Rule rule workspace get Rule Factory modify Rule this try workspace prepare Operation rule monitor Project Info info Project Info get Resource Info false false int flags get Flags info check Exists flags true if is Open flags return workspace begin Operation true flush the build order early in case there is a problem workspace flush Build Order info Project Info get Resource Info false true info set M OPEN the M USED flag is used to indicate the difference between opening a project for the first time and opening it from a previous close restoring it from disk if info is Set M USED workspace get Save Manager restore this Policy sub Monitor For monitor Policy op Work 30 100 else info set M USED reconcile any links in the project description reconcile Links info get Description workspace update Modification Stamp info startup monitor worked Policy op Work 20 100 refresh Local DEPTH INFINITE Policy sub Monitor For monitor Policy op Work 50 100 catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  IProgressMonitor CoreException monitorFor getFullPath toString beginTask totalWork subTask ISchedulingRule getRuleFactory modifyRule prepareOperation ProjectInfo ProjectInfo getResourceInfo getFlags checkExists isOpen beginOperation flushBuildOrder ProjectInfo getResourceInfo M_OPEN M_USED isSet M_USED getSaveManager subMonitorFor opWork M_USED reconcileLinks getDescription updateModificationStamp opWork refreshLocal DEPTH_INFINITE subMonitorFor opWork OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
The project description file has changed on disk resulting in a changed set of linked resources Perform the necessary creations and deletions of links to bring the links in sync with those described in the project description param new Description the new project description that may have changed link descriptions return status ok if everything went well otherwise an ERROR multistatus describing the problems encountered public I Status reconcile Links Project Description new Description Hash Map new Links new Description get Links I Resource children null try children members catch Core Exception e return e get Status String msg Policy bind links error Link Reconcile NON NLS 1 Multi Status status new Multi Status Resources Plugin PI RESOURCES I Resource Status OPERATION FAILED msg null walk over old linked resources and remove those that are no longer defined for int i 0 i children length i Resource old Link Resource children i if old Link is Linked continue Link Description new Link null if new Links null new Link Link Description new Links get old Link get Name if the new link is missing or has different location or gender then remove old link if new Link null new Link get Location equals old Link get Location new Link get Type old Link get Type try old Link delete I Resource NONE null catch Core Exception e status merge e get Status walk over new links and create if necessary if new Links null return status for Iterator it new Links values iterator it has Next Link Description new Link Link Description it next I Resource existing find Member new Link get Name if existing null if existing is Linked cannot create a link if a normal resource is blocking it status add new Resource Status I Resource Status RESOURCE EXISTS existing get Full Path msg else no conflicting old resource just create the new link try Resource to Link new Link get Type I Resource FILE Resource get File new Link get Name Resource get Folder new Link get Name to Link create Link new Link get Location I Resource ALLOW MISSING LOCAL null catch Core Exception e status merge e get Status return status  newDescription IStatus reconcileLinks ProjectDescription newDescription HashMap newLinks newDescription getLinks IResource CoreException getStatus errorLinkReconcile MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus OPERATION_FAILED oldLink oldLink isLinked LinkDescription newLink newLinks newLink LinkDescription newLinks oldLink getName newLink newLink getLocation oldLink getLocation newLink getType oldLink getType oldLink IResource CoreException getStatus newLinks newLinks hasNext LinkDescription newLink LinkDescription IResource findMember newLink getName isLinked ResourceStatus IResourceStatus RESOURCE_EXISTS getFullPath toLink newLink getType IResource getFile newLink getName getFolder newLink getName toLink createLink newLink getLocation IResource ALLOW_MISSING_LOCAL CoreException getStatus
protected void rename Meta Area I Project source I Project destination I Progress Monitor monitor throws Core Exception java io File old Meta Area workspace get Meta Area location For source to File java io File new Meta Area workspace get Meta Area location For destination to File get Local Manager get Store move old Meta Area new Meta Area false monitor  renameMetaArea IProject IProject IProgressMonitor CoreException oldMetaArea getMetaArea locationFor toFile newMetaArea getMetaArea locationFor toFile getLocalManager getStore oldMetaArea newMetaArea
public void set Description I Project Description description int update Flags I Progress Monitor monitor throws Core Exception FIXME update flags should be honoured KEEP HISTORY means capture project file in local history FORCE means overwrite any existing project file monitor Policy monitor For monitor try monitor begin Task Policy bind resources set Desc Policy total Work NON NLS 1 final I Scheduling Rule rule workspace get Root try need to use root rule because nature configuration calls third party code workspace prepare Operation rule monitor Resource Info info get Resource Info false false check Accessible get Flags info if nothing has changed we don t need to do anything Project Description old Description internal Get Description Project Description new Description Project Description description boolean has Public Changes old Description has Public Changes new Description boolean has Private Changes old Description has Private Changes new Description if has Public Changes has Private Changes return check Description this new Description false If we re out of sync and FORCE then fail If the file is missing we want to write the new description then throw an exception boolean had Saved Description true if update Flags I Resource FORCE 0 had Saved Description get Local Manager has Saved Project this if had Saved Description get Local Manager is Description Synchronized this String message Policy bind resources project Desc Sync get Name NON NLS 1 throw new Resource Exception I Resource Status OUT OF SYNC LOCAL get Full Path message null see if we have an old prj file if had Saved Description had Saved Description workspace get Meta Area has Saved Project this workspace broadcast Event Lifecycle Event new Event Lifecycle Event PRE PROJECT CHANGE this workspace begin Operation true Multi Status status basic Set Description new Description update Flags if had Saved Description status isOK throw new Core Exception status write the new description to the project file write Description old Description update Flags has Public Changes has Private Changes increment the content id even for private changes info get Resource Info false true info increment Content Id workspace update Modification Stamp info if had Saved Description String msg Policy bind resources missing Project Meta Repaired get Name NON NLS 1 status merge new Resource Status I Resource Status MISSING DESCRIPTION REPAIRED get Full Path msg if status isOK throw new Core Exception status finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  setDescription IProjectDescription updateFlags IProgressMonitor CoreException KEEP_HISTORY monitorFor beginTask setDesc totalWork ISchedulingRule getRoot prepareOperation ResourceInfo getResourceInfo checkAccessible getFlags ProjectDescription oldDescription internalGetDescription ProjectDescription newDescription ProjectDescription hasPublicChanges oldDescription hasPublicChanges newDescription hasPrivateChanges oldDescription hasPrivateChanges newDescription hasPublicChanges hasPrivateChanges checkDescription newDescription hadSavedDescription updateFlags IResource hadSavedDescription getLocalManager hasSavedProject hadSavedDescription getLocalManager isDescriptionSynchronized projectDescSync getName ResourceException IResourceStatus OUT_OF_SYNC_LOCAL getFullPath hadSavedDescription hadSavedDescription getMetaArea hasSavedProject broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_PROJECT_CHANGE beginOperation MultiStatus basicSetDescription newDescription updateFlags hadSavedDescription CoreException writeDescription oldDescription updateFlags hasPublicChanges hasPrivateChanges getResourceInfo incrementContentId updateModificationStamp hadSavedDescription missingProjectMetaRepaired getName ResourceStatus IResourceStatus MISSING_DESCRIPTION_REPAIRED getFullPath CoreException endOperation subMonitorFor buildWork
see I Project set Description I Project Description I Progress Monitor public void set Description I Project Description description I Progress Monitor monitor throws Core Exception funnel all operations to central method set Description description I Resource KEEP HISTORY monitor  IProject setDescription IProjectDescription IProgressMonitor setDescription IProjectDescription IProgressMonitor CoreException setDescription IResource KEEP_HISTORY
Restore the non persisted state for the project For example read and set the description from the local meta area Also open the property store etc This method is used when an open project is restored and so emulates the behaviour of open protected void startup throws Core Exception if is Open return workspace broadcast Event Lifecycle Event new Event Lifecycle Event PRE PROJECT OPEN this  CoreException isOpen broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_PROJECT_OPEN
public void touch I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String message Policy bind resource touch get Full Path to String NON NLS 1 monitor begin Task message Policy total Work final I Scheduling Rule rule workspace get Rule Factory modify Rule this try workspace prepare Operation rule monitor workspace broadcast Event Lifecycle Event new Event Lifecycle Event PRE PROJECT CHANGE this workspace begin Operation true super touch Policy sub Monitor For monitor Policy op Work catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  IProgressMonitor CoreException monitorFor getFullPath toString beginTask totalWork ISchedulingRule getRuleFactory modifyRule prepareOperation broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_PROJECT_CHANGE beginOperation subMonitorFor opWork OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
The project description file on disk is better than the description in memory Make sure the project description in memory is synchronized with the description file contents protected void update Description throws Core Exception if Project Description is Writing return Project Description is Reading true try workspace broadcast Event Lifecycle Event new Event Lifecycle Event PRE PROJECT CHANGE this Project Description description get Local Manager read this false links can only be created if the project is open if is Open reconcile Links description internal Set Description description true finally Project Description is Reading false  updateDescription CoreException ProjectDescription isWriting ProjectDescription isReading broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_PROJECT_CHANGE ProjectDescription getLocalManager isOpen reconcileLinks internalSetDescription ProjectDescription isReading
Writes the project s current description file to disk public void write Description int update Flags throws Core Exception write Description internal Get Description update Flags true true  writeDescription updateFlags CoreException writeDescription internalGetDescription updateFlags
Writes the project description file to disk This is the only method that should ever be writing the description because it ensures that the description isn t then immediately discovered as an incoming change and read back from disk param description The description to write param update Flags The write operation update flags param has Public Changes Whether the public sections of the description have changed param has Private Changes Whether the private sections of the description have changed throws Core Exception On failure to write the description public void write Description I Project Description description int update Flags boolean has Public Changes boolean has Private Changes throws Core Exception if Project Description is Reading return Project Description is Writing true try get Local Manager internal Write this description update Flags has Public Changes has Private Changes finally Project Description is Writing false  updateFlags hasPublicChanges hasPrivateChanges CoreException writeDescription IProjectDescription updateFlags hasPublicChanges hasPrivateChanges CoreException ProjectDescription isReading ProjectDescription isWriting getLocalManager internalWrite updateFlags hasPublicChanges hasPrivateChanges ProjectDescription isWriting

protected I Project static Refs EMPTY PROJECT ARRAY public Project Description super  IProject staticRefs EMPTY_PROJECT_ARRAY ProjectDescription
public Object clone Project Description clone Project Description super clone don t want the clone to have access to our internal link locations table clone link Descriptions null return clone  ProjectDescription ProjectDescription linkDescriptions
Returns a copy of the given array with all duplicates removed private I Project copy And Remove Duplicates I Project projects I Project result new I Project projects length int count 0 for int i 0 i projects length i I Project project projects i boolean found false scan to see if there are any other projects by the same name for int j 0 j count j if project equals result j found true if found result count project if count projects length shrink array I Project reduced new I Project count System arraycopy result 0 reduced 0 count return reduced return result  IProject copyAndRemoveDuplicates IProject IProject IProject IProject IProject IProject
Returns the union of the description s static and dyamic project references with duplicates omitted The calculation is optimized by caching the result public I Project get All References boolean make Copy if cached Refs null I Project statik get Referenced Projects false I Project dynamic get Dynamic References false if dynamic length 0 cached Refs statik else if statik length 0 cached Refs dynamic else combine all references I Project result new I Project dynamic length statik length System arraycopy statik 0 result 0 statik length System arraycopy dynamic 0 result statik length dynamic length cached Refs copy And Remove Duplicates result still need to copy the result to prevent tampering with the cache return make Copy I Project cached Refs clone cached Refs  IProject getAllReferences makeCopy cachedRefs IProject getReferencedProjects IProject getDynamicReferences cachedRefs cachedRefs IProject IProject cachedRefs copyAndRemoveDuplicates makeCopy IProject cachedRefs cachedRefs
see I Project Description get Build Spec public I Command get Build Spec return get Build Spec true  IProjectDescription getBuildSpec ICommand getBuildSpec getBuildSpec
public I Command get Build Spec boolean make Copy thread safety copy reference in case of concurrent write I Command old Commands this build Spec if old Commands null return EMPTY COMMAND ARRAY if make Copy return old Commands I Command result new I Command old Commands length for int i 0 i result length i result i I Command Build Command old Commands i clone return result  ICommand getBuildSpec makeCopy ICommand oldCommands buildSpec oldCommands EMPTY_COMMAND_ARRAY makeCopy oldCommands ICommand ICommand oldCommands ICommand BuildCommand oldCommands
see I Project Description get Comment public String get Comment return comment  IProjectDescription getComment getComment
see I Project Description get Dynamic References public I Project get Dynamic References return get Dynamic References true  IProjectDescription getDynamicReferences IProject getDynamicReferences getDynamicReferences
public I Project get Dynamic References boolean make Copy if dynamic Refs null return EMPTY PROJECT ARRAY return make Copy I Project dynamic Refs clone dynamic Refs  IProject getDynamicReferences makeCopy dynamicRefs EMPTY_PROJECT_ARRAY makeCopy IProject dynamicRefs dynamicRefs
Returns the link location for the given resource name Returns null if no such link exists public I Path get Link Location String name if link Descriptions null return null Link Description desc Link Description link Descriptions get name return desc null null desc get Location  IPath getLinkLocation linkDescriptions LinkDescription LinkDescription linkDescriptions getLocation
Returns the map of link descriptions String name Link Description Since this method is only used internally it never creates a copy Returns null if the project does not have any linked resources public Hash Map get Links return link Descriptions  LinkDescription HashMap getLinks linkDescriptions
see I Project Description get Location public I Path get Location return location  IProjectDescription getLocation IPath getLocation
see I Project Description get Nature Ids public String get Nature Ids return get Nature Ids true  IProjectDescription getNatureIds getNatureIds getNatureIds
public String get Nature Ids boolean make Copy if natures null return EMPTY STRING ARRAY return make Copy String natures clone natures  getNatureIds makeCopy EMPTY_STRING_ARRAY makeCopy
see I Project Description get Referenced Projects public I Project get Referenced Projects return get Referenced Projects true  IProjectDescription getReferencedProjects IProject getReferencedProjects getReferencedProjects
public I Project get Referenced Projects boolean make Copy if static Refs null return EMPTY PROJECT ARRAY return make Copy I Project static Refs clone static Refs  IProject getReferencedProjects makeCopy staticRefs EMPTY_PROJECT_ARRAY makeCopy IProject staticRefs staticRefs
public boolean has Nature String natureID String natureI Ds get Nature Ids false for int i 0 i natureI Ds length i if natureI Ds i equals natureID return true return false  hasNature natureIDs getNatureIds natureIDs natureIDs
Returns true if any private attributes of the description have changed Private attributes are those that are not stored in the project description file project public boolean has Private Changes Project Description description if Arrays equals dynamic Refs description get Dynamic References false return true I Path other Location description get Location if location null return other Location null return location equals other Location  hasPrivateChanges ProjectDescription dynamicRefs getDynamicReferences IPath otherLocation getLocation otherLocation otherLocation
Returns true if any public attributes of the description have changed Public attributes are those that are stored in the project description file project public boolean has Public Changes Project Description description if get Name equals description get Name return true if comment equals description get Comment return true don t bother optimizing if the order has changed if Arrays equals build Spec description get Build Spec false return true if Arrays equals static Refs description get Referenced Projects false return true if Arrays equals natures description get Nature Ids false return true Hash Map other Links description get Links if link Descriptions null return other Links null return link Descriptions equals other Links  hasPublicChanges ProjectDescription getName getName getComment buildSpec getBuildSpec staticRefs getReferencedProjects getNatureIds HashMap otherLinks getLinks linkDescriptions otherLinks linkDescriptions otherLinks
see I Project Description new Command public I Command new Command return new Build Command  IProjectDescription newCommand ICommand newCommand BuildCommand
public void set Build Spec I Command value Assert is Legal value null perform a deep copy in case clients perform further changes to the command I Command result new I Command value length for int i 0 i result length i result i I Command Build Command value i clone build Spec result  setBuildSpec ICommand isLegal ICommand ICommand ICommand BuildCommand buildSpec
see I Project Description set Comment String public void set Comment String value comment value  IProjectDescription setComment setComment
public void set Dynamic References I Project value Assert is Legal value null dynamic Refs copy And Remove Duplicates value cached Refs null  setDynamicReferences IProject isLegal dynamicRefs copyAndRemoveDuplicates cachedRefs
Sets the map of link descriptions String name Link Description Since this method is only used internally it never creates a copy May pass null if this project does not have any linked resources public void set Link Descriptions Hash Map link Descriptions this link Descriptions link Descriptions  LinkDescription setLinkDescriptions HashMap linkDescriptions linkDescriptions linkDescriptions
Sets the description of a link Setting to a description of null will remove the link from the project description public void set Link Location String name Link Description description if description null addition or modification if link Descriptions null link Descriptions new Hash Map 10 link Descriptions put name description else removal if link Descriptions null link Descriptions remove name if link Descriptions size 0 link Descriptions null  setLinkLocation LinkDescription linkDescriptions linkDescriptions HashMap linkDescriptions linkDescriptions linkDescriptions linkDescriptions linkDescriptions
see I Project Description set Location I Path public void set Location I Path location this location location  IProjectDescription setLocation IPath setLocation IPath
see I Project Description set Name String public void set Name String value super set Name value  IProjectDescription setName setName setName
see I Project Description set Nature Ids String public void set Nature Ids String value natures String value clone  IProjectDescription setNatureIds setNatureIds
public void set Referenced Projects I Project value Assert is Legal value null static Refs copy And Remove Duplicates value cached Refs null  setReferencedProjects IProject isLegal staticRefs copyAndRemoveDuplicates cachedRefs

see Content Handler characters char int int public void characters char chars int offset int length throws SAX Exception accumulate characters and process them when end Element is reached char Buffer append chars offset length  ContentHandler SAXException endElement charBuffer
End of an element that is part of a build command private void end Build Command Element String element Name if element Name equals BUILD COMMAND Pop this Build Command off the stack Build Command command Build Command object Stack pop Add this Build Command to a array list of Build Commands Array List command List Array List object Stack peek command List add command state S BUILD SPEC  endBuildCommandElement elementName elementName BUILD_COMMAND BuildCommand BuildCommand BuildCommand objectStack BuildCommand BuildCommands ArrayList commandList ArrayList objectStack commandList S_BUILD_SPEC
End of an element that is part of a build spec private void end Build Spec Element String element Name if element Name equals BUILD SPEC Pop off the array list of Build Commands and add them to the Project Description which is the next thing on the stack Array List commands Array List object Stack pop state S PROJECT DESC if commands is Empty return I Command command Array I Command commands to Array new I Command commands size project Description set Build Spec command Array  endBuildSpecElement elementName elementName BUILD_SPEC BuildCommands ProjectDescription ArrayList ArrayList objectStack S_PROJECT_DESC isEmpty ICommand commandArray ICommand toArray ICommand projectDescription setBuildSpec commandArray
End of a dictionary element private void end Dictionary String element Name if element Name equals DICTIONARY Pick up the value and then key off the stack and add them to the Hash Map which is just below them on the stack Leave the Hash Map on the stack to pick up more key value pairs if they exist String value String object Stack pop String key String object Stack pop Hash Map object Stack peek put key value state S BUILD COMMAND ARGUMENTS  endDictionary elementName elementName HashMap HashMap objectStack objectStack HashMap objectStack S_BUILD_COMMAND_ARGUMENTS
private void end Dictionary Key String element Name if element Name equals KEY There is a value place holder on the top of the stack and a key place holder just below it String value String object Stack pop String old Key String object Stack pop String new Key char Buffer to String if old Key null old Key length 0 parse Problem Policy bind project Description Reader which Key old Key new Key NON NLS 1 object Stack push old Key else object Stack push new Key push back the dictionary value object Stack push value state S DICTIONARY  endDictionaryKey elementName elementName objectStack oldKey objectStack newKey charBuffer toString oldKey oldKey parseProblem projectDescriptionReader whichKey oldKey newKey objectStack oldKey objectStack newKey objectStack S_DICTIONARY
private void end Dictionary Value String element Name if element Name equals VALUE String new Value char Buffer to String There is a value place holder on the top of the stack String old Value String object Stack pop if old Value null old Value length 0 parse Problem Policy bind project Description Reader which Value old Value new Value NON NLS 1 object Stack push old Value else object Stack push new Value state S DICTIONARY  endDictionaryValue elementName elementName newValue charBuffer toString oldValue objectStack oldValue oldValue parseProblem projectDescriptionReader whichValue oldValue newValue objectStack oldValue objectStack newValue S_DICTIONARY
see Content Handler end Element String String String public void end Element String uri String element Name String qname throws SAX Exception switch state case S PROJECT DESC Don t think we need to do anything here break case S PROJECT NAME if element Name equals NAME Project names cannot have leading trailing whitespace as they are I Resource names project Description set Name char Buffer to String trim state S PROJECT DESC break case S PROJECTS if element Name equals PROJECTS end Projects Element element Name state S PROJECT DESC break case S DICTIONARY end Dictionary element Name break case S BUILD COMMAND ARGUMENTS if element Name equals ARGUMENTS There is a hashmap on the top of the stack with the arguments if any Hash Map dictionary Args Hash Map object Stack pop state S BUILD COMMAND if dictionary Args is Empty break Below the hash Map on the stack there is a Build Command Build Command object Stack peek set Arguments dictionary Args break case S BUILD COMMAND end Build Command Element element Name break case S BUILD SPEC end Build Spec Element element Name break case S NATURES end Natures Element element Name break case S LINK end Link Element element Name break case S LINKED RESOURCES end Linked Resources Element element Name return case S PROJECT COMMENT if element Name equals COMMENT project Description set Comment char Buffer to String state S PROJECT DESC break case S REFERENCED PROJECT NAME if element Name equals PROJECT top of stack is list of project references Referenced projects are just project names and therefore are also I Resource names and cannot have leading trailing whitespace Array List object Stack peek add char Buffer to String trim state S PROJECTS break case S BUILD COMMAND NAME if element Name equals NAME top of stack is the build command A build command name is an extension id and cannot have leading trailing whitespace Build Command object Stack peek set Name char Buffer to String trim state S BUILD COMMAND break case S DICTIONARY KEY end Dictionary Key element Name break case S DICTIONARY VALUE end Dictionary Value element Name break case S NATURE NAME if element Name equals NATURE top of stack is list of nature names A nature name is an extension id and cannot have leading trailing whitespace Array List object Stack peek add char Buffer to String trim state S NATURES break case S LINK NAME end Link Name element Name break case S LINK TYPE end Link Type element Name break case S LINK LOCATION end Link Location element Name break char Buffer set Length 0  ContentHandler endElement endElement elementName SAXException S_PROJECT_DESC S_PROJECT_NAME elementName IResource projectDescription setName charBuffer toString S_PROJECT_DESC S_PROJECTS elementName endProjectsElement elementName S_PROJECT_DESC S_DICTIONARY endDictionary elementName S_BUILD_COMMAND_ARGUMENTS elementName HashMap dictionaryArgs HashMap objectStack S_BUILD_COMMAND dictionaryArgs isEmpty hashMap BuildCommand BuildCommand objectStack setArguments dictionaryArgs S_BUILD_COMMAND endBuildCommandElement elementName S_BUILD_SPEC endBuildSpecElement elementName S_NATURES endNaturesElement elementName S_LINK endLinkElement elementName S_LINKED_RESOURCES endLinkedResourcesElement elementName S_PROJECT_COMMENT elementName projectDescription setComment charBuffer toString S_PROJECT_DESC S_REFERENCED_PROJECT_NAME elementName IResource ArrayList objectStack charBuffer toString S_PROJECTS S_BUILD_COMMAND_NAME elementName BuildCommand objectStack setName charBuffer toString S_BUILD_COMMAND S_DICTIONARY_KEY endDictionaryKey elementName S_DICTIONARY_VALUE endDictionaryValue elementName S_NATURE_NAME elementName ArrayList objectStack charBuffer toString S_NATURES S_LINK_NAME endLinkName elementName S_LINK_TYPE endLinkType elementName S_LINK_LOCATION endLinkLocation elementName charBuffer setLength
End this group of linked resources and add them to the project description private void end Linked Resources Element String element Name if element Name equals LINKED RESOURCES Hash Map linked Resources Hash Map object Stack pop state S PROJECT DESC if linked Resources is Empty return project Description set Link Descriptions linked Resources  endLinkedResourcesElement elementName elementName LINKED_RESOURCES HashMap linkedResources HashMap objectStack S_PROJECT_DESC linkedResources isEmpty projectDescription setLinkDescriptions linkedResources
End a single linked resource and add it to the Hash Map private void end Link Element String element Name if element Name equals LINK state S LINKED RESOURCES Pop off the link description Link Description link Link Description object Stack pop Make sure that you have something reasonable String name link get Name int type link get Type I Path location link get Location if name null name length 0 parse Problem Policy bind project Description Reader empty Link Name Integer to String type location to String NON NLS 1 return if type 1 parse Problem Policy bind project Description Reader bad Link Type name location to String NON NLS 1 return if location is Empty parse Problem Policy bind project Description Reader bad Link Location name Integer to String type NON NLS 1 return The Hash Map of linked resources is the next thing on the stack Hash Map object Stack peek put link get Name link  HashMap endLinkElement elementName elementName S_LINKED_RESOURCES LinkDescription LinkDescription objectStack getName getType IPath getLocation parseProblem projectDescriptionReader emptyLinkName toString toString parseProblem projectDescriptionReader badLinkType toString isEmpty parseProblem projectDescriptionReader badLinkLocation toString HashMap HashMap objectStack getName
private void end Link Location String element Name if element Name equals LOCATION A link location is an I Path I Path segments cannot have leading trailing whitespace String new Location char Buffer to String trim object Stack has a Link Description on it Set the type on this Link Description I Path old Location Link Description object Stack peek get Location if old Location is Empty parse Problem Policy bind project Description Reader bad Location old Location to String new Location NON NLS 1 else Link Description object Stack peek set Location new Path new Location state S LINK  endLinkLocation elementName elementName IPath IPath newLocation charBuffer toString objectStack LinkDescription LinkDescription IPath oldLocation LinkDescription objectStack getLocation oldLocation isEmpty parseProblem projectDescriptionReader badLocation oldLocation toString newLocation LinkDescription objectStack setLocation newLocation S_LINK
private void end Link Name String element Name if element Name equals NAME A link name is an I Resource name I Resource names cannot have leading trailing whitespace String new Name char Buffer to String trim object Stack has a Link Description on it Set the name on this Link Description String old Name Link Description object Stack peek get Name if old Name length 0 parse Problem Policy bind project Description Reader bad Link Name old Name new Name NON NLS 1 else Link Description object Stack peek set Name new Name state S LINK  endLinkName elementName elementName IResource IResource newName charBuffer toString objectStack LinkDescription LinkDescription oldName LinkDescription objectStack getName oldName parseProblem projectDescriptionReader badLinkName oldName newName LinkDescription objectStack setName newName S_LINK
private void end Link Type String element Name if element Name equals TYPE FIXME we should handle this case by removing the entire link for now we default to a file link int new Type I Resource FILE try parse Int expects a string containing only numerics or a leading Ensure there is no leading trailing whitespace new Type Integer parse Int char Buffer to String trim catch Number Format Exception e log e object Stack has a Link Description on it Set the type on this Link Description int old Type Link Description object Stack peek get Type if old Type 1 parse Problem Policy bind project Description Reader bad Link Type Integer to String old Type Integer to String new Type NON NLS 1 else Link Description object Stack peek set Type new Type state S LINK  endLinkType elementName elementName newType IResource parseInt newType parseInt charBuffer toString NumberFormatException objectStack LinkDescription LinkDescription oldType LinkDescription objectStack getType oldType parseProblem projectDescriptionReader badLinkType toString oldType toString newType LinkDescription objectStack setType newType S_LINK
End of an element that is part of a nature list private void end Natures Element String element Name if element Name equals NATURES Pop the array list of natures off the stack Array List natures Array List object Stack pop state S PROJECT DESC if natures size 0 return String nature Names String natures to Array new String natures size project Description set Nature Ids nature Names  endNaturesElement elementName elementName ArrayList ArrayList objectStack S_PROJECT_DESC natureNames toArray projectDescription setNatureIds natureNames
End of an element that is part of a project references list private void end Projects Element String element Name Pop the array list that contains all the referenced project names Array List referenced Projects Array List object Stack pop if referenced Projects size 0 Don t bother adding an empty group of referenced projects to the project descriptor return I Workspace Root root Resources Plugin get Workspace get Root I Project projects new I Project referenced Projects size for int i 0 i projects length i projects i root get Project String referenced Projects get i project Description set Referenced Projects projects  endProjectsElement elementName ArrayList referencedProjects ArrayList objectStack referencedProjects IWorkspaceRoot ResourcesPlugin getWorkspace getRoot IProject IProject referencedProjects getProject referencedProjects projectDescription setReferencedProjects
see Error Handler error SAX Parse Exception public void error SAX Parse Exception error throws SAX Exception log error  ErrorHandler SAXParseException SAXParseException SAXException
see Error Handler fatal Error SAX Parse Exception public void fatal Error SAX Parse Exception error throws SAX Exception ensure a null value is not passed as message to Status constructor bug 42782 String message error get Message problems add new Status I Status ERROR Resources Plugin PI RESOURCES I Resource Status FAILED READ METADATA message null message error NON NLS 1 throw error  ErrorHandler fatalError SAXParseException fatalError SAXParseException SAXException getMessage IStatus ResourcesPlugin PI_RESOURCES IResourceStatus FAILED_READ_METADATA
protected void log Exception ex ensure a null value is not passed as message to Status constructor bug 42782 String message ex get Message problems add new Status I Status WARNING Resources Plugin PI RESOURCES I Resource Status FAILED READ METADATA message null message ex NON NLS 1  getMessage IStatus ResourcesPlugin PI_RESOURCES IResourceStatus FAILED_READ_METADATA
private void parse Problem String error Message problems add new Status I Status WARNING Resources Plugin PI RESOURCES I Resource Status FAILED READ METADATA error Message null  parseProblem errorMessage IStatus ResourcesPlugin PI_RESOURCES IResourceStatus FAILED_READ_METADATA errorMessage
private void parse Project Description String element Name if element Name equals NAME state S PROJECT NAME return if element Name equals COMMENT state S PROJECT COMMENT return if element Name equals PROJECTS state S PROJECTS Push an array list on the object stack to hold the name of all the referenced projects This array list will be popped off the stack massaged into the right format and added to the project description when we hit the end element for PROJECTS object Stack push new Array List return if element Name equals BUILD SPEC state S BUILD SPEC Push an array list on the object stack to hold the build commands for this build spec This array list will be popped off the stack massaged into the right format and added to the project s build spec when we hit the end element for BUILD SPEC object Stack push new Array List return if element Name equals NATURES state S NATURES Push an array list to hold all the nature names object Stack push new Array List return if element Name equals LINKED RESOURCES Push a Hash Map to collect all the links object Stack push new Hash Map state S LINKED RESOURCES return  parseProjectDescription elementName elementName S_PROJECT_NAME elementName S_PROJECT_COMMENT elementName S_PROJECTS objectStack ArrayList elementName BUILD_SPEC S_BUILD_SPEC BUILD_SPEC objectStack ArrayList elementName S_NATURES objectStack ArrayList elementName LINKED_RESOURCES HashMap objectStack HashMap S_LINKED_RESOURCES
public Project Description read Input Source input problems new Multi Status Resources Plugin PI RESOURCES I Resource Status FAILED READ METADATA Policy bind project Description Reader failure Reading Project Desc null NON NLS 1 object Stack new Stack state S INITIAL try SAX Parser Factory factory SAX Parser Factory new Instance factory set Namespace Aware true try factory set Feature http xml org sax features string interning true NON NLS 1 catch SAX Exception e In case support for this feature is removed SAX Parser parser factory newSAX Parser parser parse input this catch Parser Configuration Exception e log e catch IO Exception e log e catch SAX Exception e log e switch problems get Severity case I Status ERROR Resources Plugin get Plugin get Log log problems return null case I Status WARNING case I Status INFO Resources Plugin get Plugin get Log log problems case I Status OK default return project Description  ProjectDescription InputSource MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus FAILED_READ_METADATA projectDescriptionReader failureReadingProjectDesc objectStack S_INITIAL SAXParserFactory SAXParserFactory newInstance setNamespaceAware setFeature SAXException SAXParser newSAXParser ParserConfigurationException IOException SAXException getSeverity IStatus ResourcesPlugin getPlugin getLog IStatus IStatus ResourcesPlugin getPlugin getLog IStatus projectDescription
Reads and returns a project description stored at the given location public Project Description read I Path location throws IO Exception Buffered Input Stream file null try file new Buffered Input Stream new File Input Stream location to File return read new Input Source file finally if file null file close  ProjectDescription IPath IOException BufferedInputStream BufferedInputStream FileInputStream toFile InputSource
Reads and returns a project description stored at the given location or temporary location public Project Description read I Path location I Path temp Location throws IO Exception Safe File Input Stream file new Safe File Input Stream location toOS String temp Location toOS String try return read new Input Source file finally file close  ProjectDescription IPath IPath tempLocation IOException SafeFileInputStream SafeFileInputStream toOSString tempLocation toOSString InputSource
see Content Handler start Element String String String Attributes public void start Element String uri String element Name String qname Attributes attributes throws SAX Exception clear the character buffer at the start of every element char Buffer set Length 0 switch state case S INITIAL if element Name equals PROJECT DESCRIPTION state S PROJECT DESC project Description new Project Description else throw new SAX Exception Policy bind project Description Reader not Project Description element Name NON NLS 1 break case S PROJECT DESC parse Project Description element Name break case S PROJECTS if element Name equals PROJECT state S REFERENCED PROJECT NAME break case S BUILD SPEC if element Name equals BUILD COMMAND state S BUILD COMMAND object Stack push new Build Command break case S BUILD COMMAND if element Name equals NAME state S BUILD COMMAND NAME else if element Name equals ARGUMENTS state S BUILD COMMAND ARGUMENTS Push a Hash Map to hold all the key value pairs which will become the argument list object Stack push new Hash Map break case S BUILD COMMAND ARGUMENTS if element Name equals DICTIONARY state S DICTIONARY Push 2 strings for the key value pair to be read object Stack push new String key object Stack push new String value break case S DICTIONARY if element Name equals KEY state S DICTIONARY KEY else if element Name equals VALUE state S DICTIONARY VALUE break case S NATURES if element Name equals NATURE state S NATURE NAME break case S LINKED RESOURCES if element Name equals LINK state S LINK Push place holders for the name type and location of this link object Stack push new Link Description break case S LINK if element Name equals NAME state S LINK NAME else if element Name equals TYPE state S LINK TYPE else if element Name equals LOCATION state S LINK LOCATION break  ContentHandler startElement startElement elementName SAXException charBuffer setLength S_INITIAL elementName PROJECT_DESCRIPTION S_PROJECT_DESC projectDescription ProjectDescription SAXException projectDescriptionReader notProjectDescription elementName S_PROJECT_DESC parseProjectDescription elementName S_PROJECTS elementName S_REFERENCED_PROJECT_NAME S_BUILD_SPEC elementName BUILD_COMMAND S_BUILD_COMMAND objectStack BuildCommand S_BUILD_COMMAND elementName S_BUILD_COMMAND_NAME elementName S_BUILD_COMMAND_ARGUMENTS HashMap objectStack HashMap S_BUILD_COMMAND_ARGUMENTS elementName S_DICTIONARY objectStack objectStack S_DICTIONARY elementName S_DICTIONARY_KEY elementName S_DICTIONARY_VALUE S_NATURES elementName S_NATURE_NAME S_LINKED_RESOURCES elementName S_LINK objectStack LinkDescription S_LINK elementName S_LINK_NAME elementName S_LINK_TYPE elementName S_LINK_LOCATION
see Error Handler warning SAX Parse Exception public void warning SAX Parse Exception error throws SAX Exception log error  ErrorHandler SAXParseException SAXParseException SAXException

protected Hash Map natures null public synchronized void clear Natures natures null  HashMap clearNatures
public Hashtable get Builders if builders null builders new Hashtable 5 return builders  getBuilders
Returns the description associated with this info The return value may be null public Project Description get Description return description  ProjectDescription getDescription
public I Project Nature get Nature String nature Id thread safety Concurrency001 Hash Map temp natures if temp null return null return I Project Nature temp get nature Id  IProjectNature getNature natureId HashMap IProjectNature natureId
Returns the property store associated with this info The return value may be null public Property Store get Property Store return property Store  PropertyStore getPropertyStore propertyStore
public void set Builders Hashtable value builders value  setBuilders
Sets the description associated with this info The value may be null public void set Description Project Description value description value  setDescription ProjectDescription
public synchronized void set Nature String nature Id I Project Nature value thread safety Concurrency001 if value null if natures null return Hash Map temp Hash Map natures clone temp remove nature Id if temp is Empty natures null else natures temp else Hash Map temp natures if temp null temp new Hash Map 5 else temp Hash Map natures clone temp put nature Id value natures temp  setNature natureId IProjectNature HashMap HashMap natureId isEmpty HashMap HashMap HashMap natureId
Sets the property store associated with this info The value may be null public void set Property Store Property Store value property Store value  setPropertyStore PropertyStore propertyStore

Creates a new descriptor based on the given extension markup exception Core Exception if the given nature extension is not correctly formed protected Project Nature Descriptor I Extension nature Extension throws Core Exception read Extension nature Extension  CoreException ProjectNatureDescriptor IExtension natureExtension CoreException readExtension natureExtension
protected void fail throws Core Exception fail Policy bind natures invalid Definition id NON NLS 1  CoreException invalidDefinition
protected void fail String reason throws Core Exception throw new Resource Exception new Status I Status ERROR Resources Plugin PI RESOURCES 1 reason null  CoreException ResourceException IStatus ResourcesPlugin PI_RESOURCES
Returns the I Ds of the incremental builders that this nature claims to own These builders do not necessarily exist in the registry public String get Builder Ids return builder Ids  IDs getBuilderIds builderIds
see I Project Nature Descriptor get Nature Id public String get Nature Id return id  IProjectNatureDescriptor getNatureId getNatureId
see I Project Nature Descriptor get Label public String get Label return label  IProjectNatureDescriptor getLabel getLabel
see I Project Nature Descriptor get Required Nature Ids public String get Required Nature Ids return required Natures  IProjectNatureDescriptor getRequiredNatureIds getRequiredNatureIds requiredNatures
see I Project Nature Descriptor get Nature Set Ids public String get Nature Set Ids return nature Sets  IProjectNatureDescriptor getNatureSetIds getNatureSetIds natureSets
see I Project Nature Descriptor is Linking Allowed public boolean is Linking Allowed return allow Linking  IProjectNatureDescriptor isLinkingAllowed isLinkingAllowed allowLinking
Initialize this nature descriptor based on the provided extension point protected void read Extension I Extension nature Extension throws Core Exception read the extension id nature Extension get Unique Identifier if id null fail Policy bind natures missing Identifier NON NLS 1 label nature Extension get Label I Configuration Element elements nature Extension get Configuration Elements int count elements length Array List required List new Array List count Array List set List new Array List count Array List builder List new Array List count for int i 0 i count i I Configuration Element element elements i String name element get Name if name equals Ignore Case requires nature NON NLS 1 String attribute element get Attribute id NON NLS 1 if attribute null fail required List add attribute else if name equals Ignore Case one of nature NON NLS 1 String attribute element get Attribute id NON NLS 1 if attribute null fail set List add attribute else if name equals Ignore Case builder NON NLS 1 String attribute element get Attribute id NON NLS 1 if attribute null fail builder List add attribute else if name equals Ignore Case options NON NLS 1 String attribute element get Attribute allow Linking NON NLS 1 when in doubt missing attribute wrong value default to allow linking allow Linking Boolean FALSE to String equals Ignore Case attribute required Natures String required List to Array new String required List size nature Sets String set List to Array new String set List size builder Ids String builder List to Array new String builder List size  readExtension IExtension natureExtension CoreException natureExtension getUniqueIdentifier missingIdentifier natureExtension getLabel IConfigurationElement natureExtension getConfigurationElements ArrayList requiredList ArrayList ArrayList setList ArrayList ArrayList builderList ArrayList IConfigurationElement getName equalsIgnoreCase getAttribute requiredList equalsIgnoreCase getAttribute setList equalsIgnoreCase getAttribute builderList equalsIgnoreCase getAttribute allowLinking allowLinking toString equalsIgnoreCase requiredNatures requiredList toArray requiredList natureSets setList toArray setList builderIds builderList toArray builderList
Prints out a string representation for debugging purposes only public String to String return Project Nature Descriptor id NON NLS 1 NON NLS 2  toString ProjectNatureDescriptor

Default constructor Should only be called by create Executable Extension public Project Preferences super null null  createExecutableExtension ProjectPreferences
private Project Preferences I Eclipse Preferences parent String name super parent name cache the segment count String path absolute Path segment Count get Segment Count path if segment Count 2 return cache the project name String project Name get Segment path 1 if project Name null project Resources Plugin get Workspace get Root get Project project Name cache the qualifier if segment Count 2 qualifier get Segment path 2  ProjectPreferences IEclipsePreferences absolutePath segmentCount getSegmentCount segmentCount projectName getSegment projectName ResourcesPlugin getWorkspace getRoot getProject projectName segmentCount getSegment
protected I Path get Location if project null qualifier null return null I Path path project get Location return compute Location path qualifier  IPath getLocation IPath getLocation computeLocation
final I Resource Delta Visitor visitor new I Resource Delta Visitor public boolean visit I Resource Delta delta throws Core Exception I Path path delta get Full Path int count path segment Count we only want to deal with changes in our specific subdir if count 2 return true check to see if we are the settings directory if count 2 String name path segment 1 return DEFAULT PREFERENCES DIRNAME equals name shouldn t have to check this but do it just in case if count 3 return false if we made it this far we are inside project settings and might have a change to a preference file if PREFS FILE EXTENSION equals path get File Extension return false String project path segment 0 String qualifier path remove File Extension last Segment Preferences root Platform get Preferences Service get Root Node Preferences node root node Project Scope SCOPE node project node qualifier String message null try switch delta get Kind case I Resource Delta REMOVED message Policy bind preferences remove Node Exception node absolute Path NON NLS 1 node remove Node loaded Nodes remove node absolute Path break case I Resource Delta CHANGED message Policy bind preferences sync Exception node absolute Path NON NLS 1 if node instanceof Project Preferences Project Preferences node load break catch Backing Store Exception e I Status status new Status I Status ERROR Resources Plugin PI RESOURCES I Status ERROR message e throw new Core Exception status no more work to do return false  IResourceDeltaVisitor IResourceDeltaVisitor IResourceDelta CoreException IPath getFullPath segmentCount DEFAULT_PREFERENCES_DIRNAME PREFS_FILE_EXTENSION getFileExtension removeFileExtension lastSegment getPreferencesService getRootNode ProjectScope getKind IResourceDelta removeNodeException absolutePath removeNode loadedNodes absolutePath IResourceDelta syncException absolutePath ProjectPreferences ProjectPreferences BackingStoreException IStatus IStatus ResourcesPlugin PI_RESOURCES IStatus CoreException
I Resource Change Listener result new I Resource Change Listener public void resource Changed I Resource Change Event event switch event get Type case I Resource Change Event POST CHANGE handle Delta event break case I Resource Change Event PRE DELETE handle Project Delete event break  IResourceChangeListener IResourceChangeListener resourceChanged IResourceChangeEvent getType IResourceChangeEvent POST_CHANGE handleDelta IResourceChangeEvent PRE_DELETE handleProjectDelete
private void handle Delta I Resource Change Event event I Resource Delta delta event get Delta if delta null return try delta accept visitor catch Core Exception e String message Policy bind preferences visit Exception NON NLS 1 I Status status new Status I Status ERROR Resources Plugin PI RESOURCES I Status ERROR message e Resources Plugin get Plugin get Log log status  handleDelta IResourceChangeEvent IResourceDelta getDelta CoreException visitException IStatus IStatus ResourcesPlugin PI_RESOURCES IStatus ResourcesPlugin getPlugin getLog
private void handle Project Delete I Resource Change Event event I Resource resource event get Resource if resource null return Preferences scope Root Platform get Preferences Service get Root Node node Project Scope SCOPE try if scope Root node Exists resource get Name return delete the prefs scope Root node resource get Name remove Node catch Backing Store Exception e String message Policy bind preferences project Delete Exception resource get Name NON NLS 1 I Status status new Status I Status ERROR Resources Plugin PI RESOURCES I Status ERROR message e Resources Plugin get Plugin get Log log status  handleProjectDelete IResourceChangeEvent IResource getResource scopeRoot getPreferencesService getRootNode ProjectScope scopeRoot nodeExists getName scopeRoot getName removeNode BackingStoreException projectDeleteException getName IStatus IStatus ResourcesPlugin PI_RESOURCES IStatus ResourcesPlugin getPlugin getLog
private static I Resource Change Listener create Listener final I Resource Delta Visitor visitor new I Resource Delta Visitor public boolean visit I Resource Delta delta throws Core Exception I Path path delta get Full Path int count path segment Count we only want to deal with changes in our specific subdir if count 2 return true check to see if we are the settings directory if count 2 String name path segment 1 return DEFAULT PREFERENCES DIRNAME equals name shouldn t have to check this but do it just in case if count 3 return false if we made it this far we are inside project settings and might have a change to a preference file if PREFS FILE EXTENSION equals path get File Extension return false String project path segment 0 String qualifier path remove File Extension last Segment Preferences root Platform get Preferences Service get Root Node Preferences node root node Project Scope SCOPE node project node qualifier String message null try switch delta get Kind case I Resource Delta REMOVED message Policy bind preferences remove Node Exception node absolute Path NON NLS 1 node remove Node loaded Nodes remove node absolute Path break case I Resource Delta CHANGED message Policy bind preferences sync Exception node absolute Path NON NLS 1 if node instanceof Project Preferences Project Preferences node load break catch Backing Store Exception e I Status status new Status I Status ERROR Resources Plugin PI RESOURCES I Status ERROR message e throw new Core Exception status no more work to do return false I Resource Change Listener result new I Resource Change Listener public void resource Changed I Resource Change Event event switch event get Type case I Resource Change Event POST CHANGE handle Delta event break case I Resource Change Event PRE DELETE handle Project Delete event break private void handle Delta I Resource Change Event event I Resource Delta delta event get Delta if delta null return try delta accept visitor catch Core Exception e String message Policy bind preferences visit Exception NON NLS 1 I Status status new Status I Status ERROR Resources Plugin PI RESOURCES I Status ERROR message e Resources Plugin get Plugin get Log log status private void handle Project Delete I Resource Change Event event I Resource resource event get Resource if resource null return Preferences scope Root Platform get Preferences Service get Root Node node Project Scope SCOPE try if scope Root node Exists resource get Name return delete the prefs scope Root node resource get Name remove Node catch Backing Store Exception e String message Policy bind preferences project Delete Exception resource get Name NON NLS 1 I Status status new Status I Status ERROR Resources Plugin PI RESOURCES I Status ERROR message e Resources Plugin get Plugin get Log log status return result  IResourceChangeListener createListener IResourceDeltaVisitor IResourceDeltaVisitor IResourceDelta CoreException IPath getFullPath segmentCount DEFAULT_PREFERENCES_DIRNAME PREFS_FILE_EXTENSION getFileExtension removeFileExtension lastSegment getPreferencesService getRootNode ProjectScope getKind IResourceDelta removeNodeException absolutePath removeNode loadedNodes absolutePath IResourceDelta syncException absolutePath ProjectPreferences ProjectPreferences BackingStoreException IStatus IStatus ResourcesPlugin PI_RESOURCES IStatus CoreException IResourceChangeListener IResourceChangeListener resourceChanged IResourceChangeEvent getType IResourceChangeEvent POST_CHANGE handleDelta IResourceChangeEvent PRE_DELETE handleProjectDelete handleDelta IResourceChangeEvent IResourceDelta getDelta CoreException visitException IStatus IStatus ResourcesPlugin PI_RESOURCES IStatus ResourcesPlugin getPlugin getLog handleProjectDelete IResourceChangeEvent IResource getResource scopeRoot getPreferencesService getRootNode ProjectScope scopeRoot nodeExists getName scopeRoot getName removeNode BackingStoreException projectDeleteException getName IStatus IStatus ResourcesPlugin PI_RESOURCES IStatus ResourcesPlugin getPlugin getLog
private static void add Listener Resources Plugin get Workspace add Resource Change Listener listener I Resource Change Event PRE DELETE I Resource Change Event POST CHANGE  addListener ResourcesPlugin getWorkspace addResourceChangeListener IResourceChangeEvent PRE_DELETE IResourceChangeEvent POST_CHANGE
protected boolean is Already Loaded I Eclipse Preferences node return loaded Nodes contains node absolute Path  isAlreadyLoaded IEclipsePreferences loadedNodes absolutePath
protected void loaded loaded Nodes add absolute Path  loadedNodes absolutePath
protected I Eclipse Preferences get Load Level if load Level null if project null qualifier null return null Make it relative to this node rather than navigating to it from the root Walk backwards up the tree starting at this node This is important to avoid a chicken egg thing on startup Eclipse Preferences node this for int i 3 i segment Count i node Eclipse Preferences node parent load Level node return load Level  IEclipsePreferences getLoadLevel loadLevel EclipsePreferences segmentCount EclipsePreferences loadLevel loadLevel
protected Eclipse Preferences internal Create I Eclipse Preferences node Parent String node Name Plugin context return new Project Preferences node Parent node Name  EclipsePreferences internalCreate IEclipsePreferences nodeParent nodeName ProjectPreferences nodeParent nodeName
private I File get File if file null if project null qualifier null return null file project get File new Path DEFAULT PREFERENCES DIRNAME append qualifier add File Extension PREFS FILE EXTENSION return file  IFile getFile getFile DEFAULT_PREFERENCES_DIRNAME addFileExtension PREFS_FILE_EXTENSION
protected void save throws Backing Store Exception I File file In Workspace get File if file In Workspace null if Policy DEBUG PREFERENCES Policy debug Not saving preferences since there is no file for node absolute Path NON NLS 1 return Properties table convert To Properties new Properties NON NLS 1 try if table is Empty nothing to save delete existing file if one exists if file In Workspace exists if Policy DEBUG PREFERENCES Policy debug Deleting preference file file In Workspace get Full Path NON NLS 1 if file In Workspace is Read Only I Status status file In Workspace get Workspace validate Edit new I File file In Workspace null if status isOK throw new Core Exception status try file In Workspace delete true null catch Core Exception e String message Policy bind preferences delete Exception file In Workspace get Full Path to String NON NLS 1 log new Status I Status WARNING Resources Plugin PI RESOURCES I Status WARNING message null return table put VERSION KEY VERSION VALUE Byte Array Output Stream output new Byte Array Output Stream try table store output null catch IO Exception e String message Policy bind preferences save Problems absolute Path NON NLS 1 log new Status I Status ERROR Platform PI RUNTIME I Status ERROR message e throw new Backing Store Exception message finally try output close catch IO Exception e ignore Input Stream input new Buffered Input Stream new Byte Array Input Stream output to Byte Array if file In Workspace exists if Policy DEBUG PREFERENCES Policy debug Setting preference file contents for file In Workspace get Full Path NON NLS 1 if file In Workspace is Read Only I Status status file In Workspace get Workspace validate Edit new I File file In Workspace null if status isOK throw new Core Exception status set the contents file In Workspace set Contents input I Resource KEEP HISTORY null else create the file I Folder folder I Folder file In Workspace get Parent if folder exists if Policy DEBUG PREFERENCES Policy debug Creating parent preference directory folder get Full Path NON NLS 1 folder create I Resource NONE true null if Policy DEBUG PREFERENCES Policy debug Creating preference file file In Workspace get Location NON NLS 1 file In Workspace create input I Resource NONE null catch Core Exception e String message Policy bind preferences save Problems file In Workspace get Full Path to String NON NLS 1 log new Status I Status ERROR Resources Plugin PI RESOURCES I Status ERROR message e throw new Backing Store Exception message  BackingStoreException IFile fileInWorkspace getFile fileInWorkspace DEBUG_PREFERENCES absolutePath convertToProperties isEmpty fileInWorkspace DEBUG_PREFERENCES fileInWorkspace getFullPath fileInWorkspace isReadOnly IStatus fileInWorkspace getWorkspace validateEdit IFile fileInWorkspace CoreException fileInWorkspace CoreException deleteException fileInWorkspace getFullPath toString IStatus ResourcesPlugin PI_RESOURCES IStatus VERSION_KEY VERSION_VALUE ByteArrayOutputStream ByteArrayOutputStream IOException saveProblems absolutePath IStatus PI_RUNTIME IStatus BackingStoreException IOException InputStream BufferedInputStream ByteArrayInputStream toByteArray fileInWorkspace DEBUG_PREFERENCES fileInWorkspace getFullPath fileInWorkspace isReadOnly IStatus fileInWorkspace getWorkspace validateEdit IFile fileInWorkspace CoreException fileInWorkspace setContents IResource KEEP_HISTORY IFolder IFolder fileInWorkspace getParent DEBUG_PREFERENCES getFullPath IResource DEBUG_PREFERENCES fileInWorkspace getLocation fileInWorkspace IResource CoreException saveProblems fileInWorkspace getFullPath toString IStatus ResourcesPlugin PI_RESOURCES IStatus BackingStoreException
protected void load throws Backing Store Exception I File local File get File if local File null local File exists if Policy DEBUG PREFERENCES Policy debug Unable to determine preference file or file does not exist for node absolute Path NON NLS 1 return if Policy DEBUG PREFERENCES Policy debug Loading preferences from file local File get Full Path NON NLS 1 Properties from Disk new Properties Input Stream input null try input new Buffered Input Stream local File get Contents true from Disk load input catch Core Exception e String message Policy bind preferences load Exception local File get Full Path to String NON NLS 1 log new Status I Status ERROR Resources Plugin PI RESOURCES I Status ERROR message e throw new Backing Store Exception message catch IO Exception e String message Policy bind preferences load Exception local File get Full Path to String NON NLS 1 log new Status I Status ERROR Resources Plugin PI RESOURCES I Status ERROR message e throw new Backing Store Exception message finally if input null try input close catch IO Exception e ignore convert From Properties from Disk  BackingStoreException IFile localFile getFile localFile localFile DEBUG_PREFERENCES absolutePath DEBUG_PREFERENCES localFile getFullPath fromDisk InputStream BufferedInputStream localFile getContents fromDisk CoreException loadException localFile getFullPath toString IStatus ResourcesPlugin PI_RESOURCES IStatus BackingStoreException IOException loadException localFile getFullPath toString IStatus ResourcesPlugin PI_RESOURCES IStatus BackingStoreException IOException convertFromProperties fromDisk

Calling String get Bytes creates a new encoding object and other garbage This can be avoided by calling String get Bytes String encoding instead public static byte to Platform Bytes String target if default Encoding null return target get Bytes try to use the default encoding try return target get Bytes default Encoding catch Unsupported Encoding Exception e null the default encoding so we don t try it again default Encoding null return target get Bytes  getBytes getBytes toPlatformBytes defaultEncoding getBytes getBytes defaultEncoding UnsupportedEncodingException defaultEncoding getBytes

private Chained Handle previous public abstract boolean exists  ChainedHandle
public abstract boolean exists public Chained Handle get Next return next  ChainedHandle getNext
public Chained Handle get Previous return previous  ChainedHandle getPrevious
public void set Next Chained Handle next this next next  setNext ChainedHandle
public void set Previous Chained Handle previous this previous previous  setPrevious ChainedHandle
private File file public File Handle File file this file file  FileHandle
public boolean exists return file exists 
public File get File return file  getFile
public void handle Notification if is Open return Chained Handle next get Next if next null if next is Open if next exists if next instanceof Linked Resource Handle next close Linked Resource Handle linked Resource Handle Linked Resource Handle next linked Resource Handle post Refresh Request else next close Chained Handle previous get Previous if previous null previous open else next open if next is Open Handle previous get Previous previous close if next instanceof Linked Resource Handle Linked Resource Handle next post Refresh Request find Next Change  handleNotification isOpen ChainedHandle getNext isOpen LinkedResourceHandle LinkedResourceHandle linkedResourceHandle LinkedResourceHandle linkedResourceHandle postRefreshRequest ChainedHandle getPrevious isOpen getPrevious LinkedResourceHandle LinkedResourceHandle postRefreshRequest findNextChange
public void open if is Open Handle next get Next if next null next is Open open Handle On file else if exists open Handle On file Handle previous get Previous if previous null previous open  isOpen getNext isOpen openHandleOn openHandleOn getPrevious
protected long handle Value public Handle handle Value Win32 Natives INVALID HANDLE VALUE  handleValue handleValue Win32Natives INVALID_HANDLE_VALUE
public void close if is Open if Win32 Natives Find Close Change Notification handle Value int error Win32 Natives Get Last Error if error Win32 Natives ERROR INVALID HANDLE add Exception Policy bind WM err Close Handle Integer to String error NON NLS 1 if Refresh Manager DEBUG System out println DEBUG PREFIX removed handle handle Value NON NLS 1 handle Value Win32 Natives INVALID HANDLE VALUE  isOpen Win32Natives FindCloseChangeNotification handleValue Win32Natives GetLastError Win32Natives ERROR_INVALID_HANDLE addException errCloseHandle toString RefreshManager DEBUG_PREFIX handleValue handleValue Win32Natives INVALID_HANDLE_VALUE
private long create Handle Value String path boolean monitor Subtree int flags long handle Win32 Natives Find First Change Notification path monitor Subtree flags if handle Win32 Natives INVALID HANDLE VALUE int error Win32 Natives Get Last Error add Exception Policy bind WM err Create Handle path Integer to String error NON NLS 1 return handle  createHandleValue monitorSubtree Win32Natives FindFirstChangeNotification monitorSubtree Win32Natives INVALID_HANDLE_VALUE Win32Natives GetLastError addException errCreateHandle toString
public void destroy close 
protected void find Next Change if Win32 Natives Find Next Change Notification handle Value int error Win32 Natives Get Last Error if error Win32 Natives ERROR INVALID HANDLE error Win32 Natives ERROR SUCCESS add Exception Policy bind WM err Find Change Integer to String error NON NLS 1 remove Handle this  findNextChange Win32Natives FindNextChangeNotification handleValue Win32Natives GetLastError Win32Natives ERROR_INVALID_HANDLE Win32Natives ERROR_SUCCESS addException errFindChange toString removeHandle
public long get Handle Value return handle Value  getHandleValue handleValue
public abstract void handle Notification  handleNotification
public abstract void handle Notification public boolean is Open return handle Value Win32 Natives INVALID HANDLE VALUE  handleNotification isOpen handleValue Win32Natives INVALID_HANDLE_VALUE
public abstract void open 
public abstract void open protected void open Handle On File file open Handle On file get Absolute Path false  openHandleOn openHandleOn getAbsolutePath
protected void open Handle On I Resource resource open Handle On resource get Location toOS String true  openHandleOn IResource openHandleOn getLocation toOSString
private void open Handle On String path boolean subtree set Handle Value create Handle Value path subtree Win32 Natives FILE NOTIFY CHANGE FILE NAME Win32 Natives FILE NOTIFY CHANGE DIR NAME Win32 Natives FILE NOTIFY CHANGE LAST WRITE Win32 Natives FILE NOTIFY CHANGE SIZE if is Open f Handle Value To Handle put new Long get Handle Value this set Handle Value Arrays create Handle Arrays else close  openHandleOn setHandleValue createHandleValue Win32Natives FILE_NOTIFY_CHANGE_FILE_NAME Win32Natives FILE_NOTIFY_CHANGE_DIR_NAME Win32Natives FILE_NOTIFY_CHANGE_LAST_WRITE Win32Natives FILE_NOTIFY_CHANGE_SIZE isOpen fHandleValueToHandle getHandleValue setHandleValueArrays createHandleArrays
protected void post Refresh Request I Resource resource result refresh resource  postRefreshRequest IResource
public void set Handle Value long handle Value this handle Value handle Value  setHandleValue handleValue handleValue handleValue
param resource public Linked Resource Handle I Resource resource this resource resource create File Handle Chain  LinkedResourceHandle IResource createFileHandleChain
protected void create File Handle Chain file Handle Chain new Array List 1 File file new File resource get Location toOS String file file get Parent File while file null file Handle Chain add 0 new File Handle file file file get Parent File int size file Handle Chain size for int i 0 i size i Chained Handle handle Chained Handle file Handle Chain get i handle set Previous i 0 Chained Handle file Handle Chain get i 1 null handle set Next i 1 size Chained Handle file Handle Chain get i 1 this set Previous Chained Handle file Handle Chain get size 1  createFileHandleChain fileHandleChain ArrayList getLocation toOSString getParentFile fileHandleChain FileHandle getParentFile fileHandleChain ChainedHandle ChainedHandle fileHandleChain setPrevious ChainedHandle fileHandleChain setNext ChainedHandle fileHandleChain setPrevious ChainedHandle fileHandleChain
public void destroy super destroy for Iterator i file Handle Chain iterator i has Next Handle handle Handle i next handle destroy  fileHandleChain hasNext
public boolean exists I Path location resource get Location return location null false location to File exists  IPath getLocation toFile
public void handle Notification if is Open post Refresh Request resource find Next Change  handleNotification isOpen postRefreshRequest findNextChange
public void open if is Open if exists open Handle On resource File Handle handle File Handle get Previous if handle null handle is Open handle open  isOpen openHandleOn FileHandle FileHandle getPrevious isOpen
public void post Refresh Request post Refresh Request resource  postRefreshRequest postRefreshRequest
private I Resource resource public Resource Handle I Resource resource super this resource resource  IResource ResourceHandle IResource
public I Resource get Resource return resource  IResource getResource
public void handle Notification if is Open post Refresh Request resource find Next Change  handleNotification isOpen postRefreshRequest findNextChange
public void open if is Open open Handle On resource  isOpen openHandleOn
public Win32 Monitor I Refresh Result result super Policy bind WM job Name NON NLS 1 this result result set Priority Job DECORATE set System true f Handle Value To Handle new Hash Map 1 set Handle Value Arrays create Handle Arrays  Win32Monitor IRefreshResult jobName setPriority setSystem fHandleValueToHandle HashMap setHandleValueArrays createHandleArrays
Logs an exception protected synchronized void add Exception String message if errors null String msg Policy bind WM errors NON NLS 1 errors new Multi Status Resources Plugin PI RESOURCES 1 msg null errors add new Status I Status ERROR Resources Plugin PI RESOURCES 1 message null  addException MultiStatus ResourcesPlugin PI_RESOURCES IStatus ResourcesPlugin PI_RESOURCES
private long balanced Split final long array final int max int element Count array length want to handle 1 max rather than 0 max int sub Array Count element Count 1 max 1 int sub Array Base Length element Count sub Array Count int overflow element Count sub Array Count long result new long sub Array Count int count 0 for int i 0 i sub Array Count i int sub Array Length sub Array Base Length overflow 0 1 0 long sub Array new long sub Array Length for int j 0 j sub Array Length j sub Array j array count result i sub Array return result  balancedSplit elementCount subArrayCount elementCount subArrayBaseLength elementCount subArrayCount elementCount subArrayCount subArrayCount subArrayCount subArrayLength subArrayBaseLength subArray subArrayLength subArrayLength subArray subArray
private Handle create Handle I Resource resource if resource is Linked return new Linked Resource Handle resource else return new Resource Handle resource  createHandle IResource isLinked LinkedResourceHandle ResourceHandle
protected long create Handle Arrays long handles synchronized in order to protect the map during iteration synchronized f Handle Value To Handle Set keys f Handle Value To Handle key Set int size keys size if size 0 return new long 0 0 handles new long size int count 0 for Iterator i keys iterator i has Next handles count Long i next long Value return balanced Split handles Win32 Natives MAXIMUM WAIT OBJECTS  createHandleArrays fHandleValueToHandle fHandleValueToHandle keySet hasNext longValue balancedSplit Win32Natives MAXIMUM_WAIT_OBJECTS
private Handle get Handle I Resource resource if resource null return null synchronized in order to protect the map during iteration synchronized f Handle Value To Handle for Iterator i f Handle Value To Handle values iterator i has Next Handle handle Handle i next if handle instanceof Resource Handle Resource Handle resource Handle Resource Handle handle if resource Handle get Resource equals resource return handle return null  getHandle IResource fHandleValueToHandle fHandleValueToHandle hasNext ResourceHandle ResourceHandle resourceHandle ResourceHandle resourceHandle getResource
return long private long get Handle Value Arrays return f Handle Value Arrays  getHandleValueArrays fHandleValueArrays
Adds a resource to be monitored by this native monitor public boolean monitor I Resource resource I Path location resource get Location if location null cannot monitor remotely managed containers return false Handle handle create Handle resource synchronized handle creation must be atomic synchronized this handle open make sure the job is running schedule RESCHEDULE DELAY if Refresh Manager DEBUG System out println DEBUG PREFIX added monitor for resource NON NLS 1 return true  IResource IPath getLocation createHandle RESCHEDULE_DELAY RefreshManager DEBUG_PREFIX
Removes the handle from the code f Handle Value To Handle code map param handle a handle not code null code protected void remove Handle Handle handle List handles new Array List 1 handles add handle remove Handles handles  fHandleValueToHandle removeHandle ArrayList removeHandles
Removes all of the handles in the given collection from the code f Handle Value To Handle code map If collections from the code f Handle Value To Handle code map are used copy them before passing them in as this method modifies the code f Handle Value To Handle code map param handles a collection of handles not code null code private void remove Handles Collection handles synchronized protect the array removal must be atomic synchronized this for Iterator i handles iterator i has Next Handle handle Handle i next f Handle Value To Handle remove new Long handle get Handle Value handle destroy set Handle Value Arrays create Handle Arrays  fHandleValueToHandle fHandleValueToHandle fHandleValueToHandle removeHandles hasNext fHandleValueToHandle getHandleValue setHandleValueArrays createHandleArrays
protected I Status run I Progress Monitor monitor long start System current Time Millis if Refresh Manager DEBUG System out println DEBUG PREFIX job started NON NLS 1 try long handle Arrays get Handle Value Arrays monitor begin Task Policy bind WM begin Task handle Arrays length NON NLS 1 If changes occur to the list of handles ignore them until the next time through the loop for int i 0 length handle Arrays length i length i if monitor is Canceled return Status CANCEL STATUS wait For Notification handle Arrays i monitor worked 1 finally monitor done start System current Time Millis if Refresh Manager DEBUG System out println DEBUG PREFIX job finished in start ms NON NLS 1 NON NLS 2 always reschedule the job so it will come back after errors or cancelation make sure it doesn t hog more that 5 of CPU long delay Math max RESCHEDULE DELAY start 30 if Refresh Manager DEBUG System out println DEBUG PREFIX rescheduling in delay 1000 seconds NON NLS 1 NON NLS 2 don t reschedule the job if the resources plugin has been shut down if Platform get Bundle Resources Plugin PI RESOURCES get State Bundle ACTIVE schedule delay Multi Status result errors errors null just log native refresh failures if result null result isOK Resources Plugin get Plugin get Log log result return Status OK STATUS  IStatus IProgressMonitor currentTimeMillis RefreshManager DEBUG_PREFIX handleArrays getHandleValueArrays beginTask beginTask handleArrays handleArrays isCanceled CANCEL_STATUS waitForNotification handleArrays currentTimeMillis RefreshManager DEBUG_PREFIX RESCHEDULE_DELAY RefreshManager DEBUG_PREFIX getBundle ResourcesPlugin PI_RESOURCES getState MultiStatus ResourcesPlugin getPlugin getLog OK_STATUS
protected void set Handle Value Arrays long arrays f Handle Value Arrays arrays  setHandleValueArrays fHandleValueArrays
see org eclipse core runtime jobs Job should Run public boolean should Run return f Handle Value To Handle is Empty  shouldRun shouldRun fHandleValueToHandle isEmpty
public void unmonitor I Resource resource if resource null resource null means stop monitoring all resources synchronized f Handle Value To Handle remove Handles new Array List f Handle Value To Handle values else Handle handle get Handle resource if handle null remove Handle handle stop the job if there are no more handles if f Handle Value To Handle is Empty cancel  IResource fHandleValueToHandle removeHandles ArrayList fHandleValueToHandle getHandle removeHandle fHandleValueToHandle isEmpty
Performs the native call to wait for notification on one of the given handles param handle Values an array of handles it must contain no duplicates private void wait For Notification long handle Values int handle Count handle Values length int index Win32 Natives Wait For Multiple Objects handle Count handle Values false WAIT FOR MULTIPLE OBJECTS TIMEOUT if index Win32 Natives WAIT TIMEOUT nothing happened return if index Win32 Natives WAIT FAILED we ran into a problem int error Win32 Natives Get Last Error if error Win32 Natives ERROR INVALID HANDLE error Win32 Natives ERROR SUCCESS add Exception Policy bind WM native Err Integer to String error NON NLS 1 result monitor Failed this null return a change occurred Wait For Multiple Objects returns WAIT OBJECT 0 index index Win32 Natives WAIT OBJECT 0 Handle handle Handle f Handle Value To Handle get new Long handle Values index if handle null handle handle Notification  handleValues waitForNotification handleValues handleCount handleValues Win32Natives WaitForMultipleObjects handleCount handleValues WAIT_FOR_MULTIPLE_OBJECTS_TIMEOUT Win32Natives WAIT_TIMEOUT Win32Natives WAIT_FAILED Win32Natives GetLastError Win32Natives ERROR_INVALID_HANDLE Win32Natives ERROR_SUCCESS addException nativeErr toString monitorFailed WaitForMultipleObjects WAIT_OBJECT_0 Win32Natives WAIT_OBJECT_0 fHandleValueToHandle handleValues handleNotification

Creates a change notification object for the given path The notification object allows the client to monitor changes to the directory and the subtree under the directory using Find Next Change Notification or Wait For Multiple Objects p If the OS supports unicode the path must be no longer than 2 15 1 characters Otherwise the path cannot be longer than MAX PATH In either case if the given path is too long ERROR INVALID HANDLE is returned param lp Path Name The path of the file param b Watch Subtree If code true code specifies that the entire tree under the given path should be monitored If code false code specifies that just the named path should be monitored param dw Notify Filter Any combination of FILE NOTIFY CHANGE FILE NAME FILE NOTIFY CHANGE DIR NAME FILE NOTIFY CHANGE ATTRIBUTES FILE NOTIFY CHANGE SIZE FILE NOTIFY CHANGE LAST WRITE or FILE NOTIFY CHANGE SECURITY return long The handle to the find change notification object or ERROR INVALID HANDLE if the attempt fails public static long Find First Change Notification String lp Path Name boolean b Watch Subtree int dw Notify Filter if UNICODE return Find First Change NotificationW lp Path Name b Watch Subtree dw Notify Filter else return Find First Change NotificationA Convert to Platform Bytes lp Path Name b Watch Subtree dw Notify Filter  FindNextChangeNotification WaitForMultipleObjects MAX_PATH ERROR_INVALID_HANDLE lpPathName bWatchSubtree dwNotifyFilter FILE_NOTIFY_CHANGE_FILE_NAME FILE_NOTIFY_CHANGE_DIR_NAME FILE_NOTIFY_CHANGE_ATTRIBUTES FILE_NOTIFY_CHANGE_SIZE FILE_NOTIFY_CHANGE_LAST_WRITE FILE_NOTIFY_CHANGE_SECURITY ERROR_INVALID_HANDLE FindFirstChangeNotification lpPathName bWatchSubtree dwNotifyFilter FindFirstChangeNotificationW lpPathName bWatchSubtree dwNotifyFilter FindFirstChangeNotificationA toPlatformBytes lpPathName bWatchSubtree dwNotifyFilter
Creates a change notification object for the given path This notification object allows the client to monitor changes to the directory and the subtree under the directory using Find Next Change Notification or Wait For Multiple Objects param lp Path Name The path to the directory to be monitored Cannot be code null code or longer than 2 15 1 characters param b Watch Subtree If code true code specifies that the entire tree under the given path should be monitored If code false code specifies that just the named path should be monitored param dw Notify Filter Any combination of FILE NOTIFY CHANGE FILE NAME FILE NOTIFY CHANGE DIR NAME FILE NOTIFY CHANGE ATTRIBUTES FILE NOTIFY CHANGE SIZE FILE NOTIFY CHANGE LAST WRITE or FILE NOTIFY CHANGE SECURITY return long The handle to the find change notification object or ERROR INVALID HANDLE if the attempt fails  FindNextChangeNotification WaitForMultipleObjects lpPathName bWatchSubtree dwNotifyFilter FILE_NOTIFY_CHANGE_FILE_NAME FILE_NOTIFY_CHANGE_DIR_NAME FILE_NOTIFY_CHANGE_ATTRIBUTES FILE_NOTIFY_CHANGE_SIZE FILE_NOTIFY_CHANGE_LAST_WRITE FILE_NOTIFY_CHANGE_SECURITY ERROR_INVALID_HANDLE
Creates a change notification object for the given path This notification object allows the client to monitor changes to the directory and the subtree under the directory using Find Next Change Notification or Wait For Multiple Objects param lp Path Name The path to the directory to be monitored cannot be code null code or be longer than MAX PATH This path must be in platform bytes converted param b Watch Subtree If code true code specifies that the entire tree under the given path should be monitored If code false code specifies that just the named path should be monitored param dw Notify Filter Any combination of FILE NOTIFY CHANGE FILE NAME FILE NOTIFY CHANGE DIR NAME FILE NOTIFY CHANGE ATTRIBUTES FILE NOTIFY CHANGE SIZE FILE NOTIFY CHANGE LAST WRITE or FILE NOTIFY CHANGE SECURITY return long The handle to the find change notification object or ERROR INVALID HANDLE if the attempt fails  FindNextChangeNotification WaitForMultipleObjects lpPathName MAX_PATH bWatchSubtree dwNotifyFilter FILE_NOTIFY_CHANGE_FILE_NAME FILE_NOTIFY_CHANGE_DIR_NAME FILE_NOTIFY_CHANGE_ATTRIBUTES FILE_NOTIFY_CHANGE_SIZE FILE_NOTIFY_CHANGE_LAST_WRITE FILE_NOTIFY_CHANGE_SECURITY ERROR_INVALID_HANDLE
Stops and disposes of the change notification object that corresponds to the given handle The handle cannot be used in future calls to Find Next Change Notification or Wait For Multiple Objects param h Change Handle a handle which was created with Find First Change Notification return boolean code true code if the method succeeds code false code otherwise  FindNextChangeNotification WaitForMultipleObjects hChangeHandle FindFirstChangeNotification
Requests that the next change detected be signaled This method should only be called after Find First Change Notification or Wait For Multiple Objects Once this method has been called on a given handle further notification requests can be made through the Wait For Multiple Objects call param h Change Handle a handle which was created with Find First Change Notification return boolean code true code if the method succeeds code false code otherwise  FindFirstChangeNotification WaitForMultipleObjects WaitForMultipleObjects hChangeHandle FindFirstChangeNotification
Returns when one of the following occurs ul li One of the objects is signaled when b Wait All is code false code li li All of the objects are signaled when b Wait All is code true code li li The timeout interval of dw Milliseconds elapses li ul param n Count The number of handles cannot be greater than MAXIMUM WAIT OBJECTS param lp Handles The array of handles to objects to be waited upon cannot contain deuplicate handles param b Wait All If code true code requires all objects to be signaled before this method returns If code false code indicates that only one object need be signaled for this method to return param dw Milliseconds A timeout value in milliseconds If zero the function tests the objects and returns immediately If INFINITE the function will only return when the objects have been signaled return int WAIT TIMEOUT when the function times out before recieving a signal WAIT OBJECT 0 n when a signal for the handle at index n WAIT FAILED when this function fails  bWaitAll bWaitAll dwMilliseconds nCount MAXIMUM_WAIT_OBJECTS lpHandles bWaitAll dwMilliseconds WAIT_TIMEOUT WAIT_OBJECT_0 WAIT_FAILED
Answers code true code if the operating system supports long filenames return boolean code true code if the operating system supports long filenames code false code otherwise 
Answers the last error set in the current thread return int the last error 
Returns the constant FILE NOTIFY CHANGE LAST WRITE return int  FILE_NOTIFY_CHANGE_LAST_WRITE
Returns the constant FILE NOTIFY CHANGE DIR NAME return int  FILE_NOTIFY_CHANGE_DIR_NAME
Returns the constant FILE NOTIFY CHANGE ATTRIBUTES return int  FILE_NOTIFY_CHANGE_ATTRIBUTES
Returns the constant FILE NOTIFY CHANGE SIZE return int  FILE_NOTIFY_CHANGE_SIZE
Returns the constant FILE NOTIFY CHANGE FILE NAME return int  FILE_NOTIFY_CHANGE_FILE_NAME
Returns the constant FILE NOTIFY CHANGE SECURITY return int  FILE_NOTIFY_CHANGE_SECURITY
Returns the constant MAXIMUM WAIT OBJECTS return int  MAXIMUM_WAIT_OBJECTS
Returns the constant MAX PATH return int  MAX_PATH
Returns the constant INFINITE return int 
Returns the constant WAIT OBJECT 0 return int  WAIT_OBJECT_0
Returns the constant WAIT FAILED return int  WAIT_FAILED
Returns the constant WAIT TIMEOUT return int  WAIT_TIMEOUT
Returns the constant ERROR INVALID HANDLE return int  ERROR_INVALID_HANDLE
Returns the constant ERROR SUCCESS return int  ERROR_SUCCESS
Returns the constant INVALID HANDLE VALUE return long  INVALID_HANDLE_VALUE

Creates a standard Win32 monitor if the given resource is local see org eclipse core resources refresh Refresh Provider install Monitor I Resource I Refresh Result public I Refresh Monitor install Monitor I Resource resource I Refresh Result result if resource get Location null resource exists resource get Type I Resource FILE return null if monitor null monitor new Win32 Monitor result if monitor monitor resource return monitor else return null  RefreshProvider installMonitor IResource IRefreshResult IRefreshMonitor installMonitor IResource IRefreshResult getLocation getType IResource Win32Monitor

package Workspace workspace protected Resource I Path path Workspace workspace this path path remove Trailing Separator this workspace workspace  IPath removeTrailingSeparator
I Element Content Visitor element Visitor new I Element Content Visitor public boolean visit Element Element Tree tree I Path Requestor requestor Object contents Resource Info info Resource Info contents if include Phantoms info is Set M PHANTOM return false if include Team Private info is Set M TEAM PRIVATE MEMBER return false proxy requestor requestor proxy info info try return visitor visit proxy catch Core Exception e throw an exception to bail out of the traversal throw new Wrapped Runtime Exception e finally proxy reset  IElementContentVisitor elementVisitor IElementContentVisitor visitElement ElementTree IPathRequestor ResourceInfo ResourceInfo includePhantoms isSet M_PHANTOM includeTeamPrivate isSet M_TEAM_PRIVATE_MEMBER CoreException WrappedRuntimeException
public void accept final I Resource Proxy Visitor visitor int member Flags throws Core Exception final Resource Proxy proxy new Resource Proxy final boolean include Phantoms member Flags I Container INCLUDE PHANTOMS 0 final boolean include Team Private member Flags I Container INCLUDE TEAM PRIVATE MEMBERS 0 I Element Content Visitor element Visitor new I Element Content Visitor public boolean visit Element Element Tree tree I Path Requestor requestor Object contents Resource Info info Resource Info contents if include Phantoms info is Set M PHANTOM return false if include Team Private info is Set M TEAM PRIVATE MEMBER return false proxy requestor requestor proxy info info try return visitor visit proxy catch Core Exception e throw an exception to bail out of the traversal throw new Wrapped Runtime Exception e finally proxy reset try new Element Tree Iterator workspace get Element Tree get Full Path iterate element Visitor catch Wrapped Runtime Exception e throw Core Exception e get Target Exception catch Operation Canceled Exception e throw e catch Runtime Exception e String msg Policy bind resources error Visiting NON NLS 1 I Resource Status error Status new Resource Status I Resource Status INTERNAL ERROR get Full Path msg e Resources Plugin get Plugin get Log log error Status throw new Resource Exception error Status finally proxy requestor null proxy info null  IResourceProxyVisitor memberFlags CoreException ResourceProxy ResourceProxy includePhantoms memberFlags IContainer INCLUDE_PHANTOMS includeTeamPrivate memberFlags IContainer INCLUDE_TEAM_PRIVATE_MEMBERS IElementContentVisitor elementVisitor IElementContentVisitor visitElement ElementTree IPathRequestor ResourceInfo ResourceInfo includePhantoms isSet M_PHANTOM includeTeamPrivate isSet M_TEAM_PRIVATE_MEMBER CoreException WrappedRuntimeException ElementTreeIterator getElementTree getFullPath elementVisitor WrappedRuntimeException CoreException getTargetException OperationCanceledException RuntimeException errorVisiting IResourceStatus errorStatus ResourceStatus IResourceStatus INTERNAL_ERROR getFullPath ResourcesPlugin getPlugin getLog errorStatus ResourceException errorStatus
see I Resource accept I Resource Visitor public void accept I Resource Visitor visitor throws Core Exception accept visitor I Resource DEPTH INFINITE 0  IResource IResourceVisitor IResourceVisitor CoreException IResource DEPTH_INFINITE
see I Resource accept I Resource Visitor int boolean public void accept I Resource Visitor visitor int depth boolean include Phantoms throws Core Exception accept visitor depth include Phantoms I Container INCLUDE PHANTOMS 0  IResource IResourceVisitor IResourceVisitor includePhantoms CoreException includePhantoms IContainer INCLUDE_PHANTOMS
if depth I Resource DEPTH INFINITE accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception return visitor visit proxy request Resource  IResource DEPTH_INFINITE IResourceProxyVisitor IResourceProxy CoreException requestResource
public void accept final I Resource Visitor visitor int depth int member Flags throws Core Exception it is invalid to call accept on a phantom when INCLUDE PHANTOMS is not specified final boolean include Phantoms member Flags I Container INCLUDE PHANTOMS 0 Resource Info info get Resource Info include Phantoms false int flags get Flags info check Exists flags true use the fast visitor if visiting to infinite depth if depth I Resource DEPTH INFINITE accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception return visitor visit proxy request Resource member Flags return ignore team private member entry point when INCLUDE TEAM PRIVATE MEMBERS is not specified final boolean include Team Private Members member Flags I Container INCLUDE TEAM PRIVATE MEMBERS 0 if include Team Private Members is Team Private Member flags return visit this resource if visitor visit this depth DEPTH ZERO return get the info again because it might have been changed by the visitor info get Resource Info include Phantoms false if info null return thread safety cache the type to avoid changes we might not be inside an operation int type info get Type if type FILE return if we had a gender change we need to fix up the resource before asking for its members I Container resource get Type type I Container workspace new Resource get Full Path type I Container this I Resource members resource members member Flags for int i 0 i members length i members i accept visitor DEPTH ZERO member Flags  IResourceVisitor memberFlags CoreException INCLUDE_PHANTOMS includePhantoms memberFlags IContainer INCLUDE_PHANTOMS ResourceInfo getResourceInfo includePhantoms getFlags checkExists IResource DEPTH_INFINITE IResourceProxyVisitor IResourceProxy CoreException requestResource memberFlags INCLUDE_TEAM_PRIVATE_MEMBERS includeTeamPrivateMembers memberFlags IContainer INCLUDE_TEAM_PRIVATE_MEMBERS includeTeamPrivateMembers isTeamPrivateMember DEPTH_ZERO getResourceInfo includePhantoms getType IContainer getType IContainer newResource getFullPath IContainer IResource memberFlags DEPTH_ZERO memberFlags
protected void assert Copy Requirements I Path destination int destination Type int update Flags throws Core Exception I Status status check Copy Requirements destination destination Type update Flags if status isOK this assert is ok because the error cases generated by the check method above indicate assertion conditions Assert is True false status get Children 0 get Message  assertCopyRequirements IPath destinationType updateFlags CoreException IStatus checkCopyRequirements destinationType updateFlags isTrue getChildren getMessage
protected void assert Link Requirements I Path local Location int update Flags throws Core Exception check Does Not Exist get Flags get Resource Info false false true boolean allow Missing Local update Flags I Resource ALLOW MISSING LOCAL 0 I Status location Status workspace validate Link Location this local Location we only tolerate an undefined path variable in the allow missing local case if location Status get Severity I Status ERROR location Status get Code I Resource Status VARIABLE NOT DEFINED WARNING allow Missing Local throw new Resource Exception location Status check that the parent exists and is open Container parent Container get Parent parent check Accessible get Flags parent get Resource Info false false check if the file exists java io File local File workspace get Path Variable Manager resolve Path local Location to File boolean local Exists local File exists if allow Missing Local local Exists String msg Policy bind links local Does Not Exist local File to String NON NLS 1 throw new Resource Exception I Resource Status NOT FOUND LOCAL get Full Path msg null resource type and file system type must match if local Exists get Type I Resource FOLDER local File is Directory String msg Policy bind links wrong Local Type get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status WRONG TYPE LOCAL get Full Path msg null  assertLinkRequirements IPath localLocation updateFlags CoreException checkDoesNotExist getFlags getResourceInfo allowMissingLocal updateFlags IResource ALLOW_MISSING_LOCAL IStatus locationStatus validateLinkLocation localLocation locationStatus getSeverity IStatus locationStatus getCode IResourceStatus VARIABLE_NOT_DEFINED_WARNING allowMissingLocal ResourceException locationStatus getParent checkAccessible getFlags getResourceInfo localFile getPathVariableManager resolvePath localLocation toFile localExists localFile allowMissingLocal localExists localDoesNotExist localFile toString ResourceException IResourceStatus NOT_FOUND_LOCAL getFullPath localExists getType IResource localFile isDirectory wrongLocalType getFullPath toString ResourceException IResourceStatus WRONG_TYPE_LOCAL getFullPath
protected void assert Move Requirements I Path destination int destination Type int update Flags throws Core Exception I Status status check Move Requirements destination destination Type update Flags if status isOK this assert is ok because the error cases generated by the check method above indicate assertion conditions Assert is True false status get Children 0 get Message  assertMoveRequirements IPath destinationType updateFlags CoreException IStatus checkMoveRequirements destinationType updateFlags isTrue getChildren getMessage
public void check Accessible int flags throws Core Exception check Exists flags true  checkAccessible CoreException checkExists
This method reports errors in two different ways It can throw a Core Exception or return a status Core Exceptions are used according to the specification of the copy method Programming errors that would usually be prevented by using an Assert code are reported as an I Status We re doing this way because we have two different methods to copy resources I Resource copy and I Workspace copy The first one gets the error and throws its message in an Assertion Failure Exception The second one just throws a Core Exception using the status returned by this method see I Resource copy I Path int I Progress Monitor public I Status check Copy Requirements I Path destination int destination Type int update Flags throws Core Exception String message Policy bind resources copy Not Met NON NLS 1 Multi Status status new Multi Status Resources Plugin PI RESOURCES I Resource Status INVALID VALUE message null if destination null message Policy bind resources dest Not Null NON NLS 1 return new Resource Status I Resource Status INVALID VALUE get Full Path message destination make Path Absolute destination if get Full Path is Prefix Of destination message Policy bind resources copy Dest Not Sub get Full Path to String NON NLS 1 status add new Resource Status I Resource Status INVALID VALUE get Full Path message check Valid Path destination destination Type false Resource Info info get Resource Info false false int flags get Flags info check Accessible flags check Local flags DEPTH INFINITE Resource dest workspace new Resource destination destination Type dest check Does Not Exist ensure we aren t trying to copy a file to a project if get Type I Resource FILE destination Type I Resource PROJECT message Policy bind resources file To Proj NON NLS 1 throw new Resource Exception I Resource Status INVALID VALUE get Full Path message null ensure we aren t trying to copy a linked resource into a folder Container parent Container dest get Parent boolean is Deep Copy update Flags I Resource SHALLOW 0 if is Linked is Deep Copy parent null parent get Type I Resource PROJECT message Policy bind links copy Not Project get Full Path to String destination to String NON NLS 1 throw new Resource Exception I Resource Status INVALID VALUE get Full Path message null we can t copy into a closed project if destination Type I Resource PROJECT Project project Project dest get Project info project get Resource Info false false project check Accessible get Flags info if parent equals project info parent get Resource Info false false parent check Exists get Flags info true if is Under Link dest is Under Link make sure location is not null This can occur with linked resources relative to undefined path variables I Path source Location get Location if source Location null message Policy bind localstore location Undefined get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL get Full Path message null I Path dest Location dest get Location if dest Location null message Policy bind localstore location Undefined dest get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL dest get Full Path message null make sure location of source is not a prefix of the location of the destination this can occur if the source or destination is a linked resource if source Location is Prefix Of dest Location message Policy bind resources copy Dest Not Sub get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status INVALID VALUE get Full Path message null return status isOK Status OK STATUS I Status status  CoreException CoreExceptions IStatus IResource IWorkspace AssertionFailureException CoreException IResource IPath IProgressMonitor IStatus checkCopyRequirements IPath destinationType updateFlags CoreException copyNotMet MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus INVALID_VALUE destNotNull ResourceStatus IResourceStatus INVALID_VALUE getFullPath makePathAbsolute getFullPath isPrefixOf copyDestNotSub getFullPath toString ResourceStatus IResourceStatus INVALID_VALUE getFullPath checkValidPath destinationType ResourceInfo getResourceInfo getFlags checkAccessible checkLocal DEPTH_INFINITE newResource destinationType checkDoesNotExist getType IResource destinationType IResource fileToProj ResourceException IResourceStatus INVALID_VALUE getFullPath getParent isDeepCopy updateFlags IResource isLinked isDeepCopy getType IResource copyNotProject getFullPath toString toString ResourceException IResourceStatus INVALID_VALUE getFullPath destinationType IResource getProject getResourceInfo checkAccessible getFlags getResourceInfo checkExists getFlags isUnderLink isUnderLink IPath sourceLocation getLocation sourceLocation locationUndefined getFullPath toString ResourceException IResourceStatus FAILED_READ_LOCAL getFullPath IPath destLocation getLocation destLocation locationUndefined getFullPath toString ResourceException IResourceStatus FAILED_READ_LOCAL getFullPath sourceLocation isPrefixOf destLocation copyDestNotSub getFullPath toString ResourceException IResourceStatus INVALID_VALUE getFullPath OK_STATUS IStatus
Helper method that considers case insensitive file systems protected void check Does Not Exist throws Core Exception should consider getting the Resource Info as a paramenter to reduce tree lookups first check the tree for an exact case match check Does Not Exist get Flags get Resource Info false false false if Core File System Library is Case Sensitive return now look for a matching case variant in the tree I Resource variant find Existing Resource Variant get Full Path if variant null return String msg Policy bind resources exists Different Case variant get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status CASE VARIANT EXISTS variant get Full Path msg null  checkDoesNotExist CoreException ResourceInfo checkDoesNotExist getFlags getResourceInfo CoreFileSystemLibrary isCaseSensitive IResource findExistingResourceVariant getFullPath existsDifferentCase getFullPath toString ResourceException IResourceStatus CASE_VARIANT_EXISTS getFullPath
Checks that this resource does not exist exception Core Exception if this resource exists public void check Does Not Exist int flags boolean check Type throws Core Exception See if there is any resource at all If none then we are happy if exists flags false return We know there is something in the tree at this path If we are checking type then go ahead and check the type If there is nothing there of this resource s type then return if check Type exists flags check Type return String message Policy bind resources must Not Exist get Full Path to String NON NLS 1 throw new Resource Exception check Type I Resource Status RESOURCE EXISTS I Resource Status PATH OCCUPIED get Full Path message null  CoreException checkDoesNotExist checkType CoreException checkType checkType mustNotExist getFullPath toString ResourceException checkType IResourceStatus RESOURCE_EXISTS IResourceStatus PATH_OCCUPIED getFullPath
Checks that this resource exists If check Type is true the type of this resource and the one in the tree must match exception Core Exception if this resource does not exist public void check Exists int flags boolean check Type throws Core Exception if exists flags check Type String message Policy bind resources must Exist get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status RESOURCE NOT FOUND get Full Path message null  checkType CoreException checkExists checkType CoreException checkType mustExist getFullPath toString ResourceException IResourceStatus RESOURCE_NOT_FOUND getFullPath
Checks that this resource is local to the given depth exception Core Exception if this resource is not local public void check Local int flags int depth throws Core Exception if is Local flags depth String message Policy bind resources must Be Local get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status RESOURCE NOT LOCAL get Full Path message null  CoreException checkLocal CoreException isLocal mustBeLocal getFullPath toString ResourceException IResourceStatus RESOURCE_NOT_LOCAL getFullPath
This method reports errors in two different ways It can throw a Core Exception or log a status Core Exceptions are used according to the specification of the move method Programming errors that would usually be prevented by using an Assert code are reported as an I Status We re doing this way because we have two different methods to move resources I Resource move and I Workspace move The first one gets the error and throws its message in an Assertion Failure Exception The second one just throws a Core Exception using the status returned by this method see I Resource move I Path int I Progress Monitor protected I Status check Move Requirements I Path destination int destination Type int update Flags throws Core Exception String message Policy bind resources move Not Met NON NLS 1 Multi Status status new Multi Status Resources Plugin PI RESOURCES I Resource Status INVALID VALUE message null if destination null message Policy bind resources dest Not Null NON NLS 1 return new Resource Status I Resource Status INVALID VALUE get Full Path message destination make Path Absolute destination if get Full Path is Prefix Of destination message Policy bind resources move Dest Not Sub get Full Path to String NON NLS 1 status add new Resource Status I Resource Status INVALID VALUE get Full Path message check Valid Path destination destination Type false Resource Info info get Resource Info false false int flags get Flags info check Accessible flags check Local flags DEPTH INFINITE Resource dest workspace new Resource destination destination Type check if we are only changing case I Resource variant Core File System Library is Case Sensitive null find Existing Resource Variant destination if variant null this equals variant dest check Does Not Exist ensure we aren t trying to move a file to a project if get Type I Resource FILE dest get Type I Resource PROJECT message Policy bind resources file To Proj NON NLS 1 throw new Resource Exception new Resource Status I Resource Status INVALID VALUE get Full Path message ensure we aren t trying to shallow move a linked resource into a folder Container parent Container dest get Parent boolean is Deep Move update Flags I Resource SHALLOW 0 if is Deep Move is Linked parent null parent get Type I Resource PROJECT message Policy bind links move Not Project get Full Path to String destination to String NON NLS 1 throw new Resource Exception new Resource Status I Resource Status INVALID VALUE get Full Path message we can t move into a closed project if destination Type I Resource PROJECT Project project Project dest get Project info project get Resource Info false false project check Accessible get Flags info if parent equals project info parent get Resource Info false false parent check Exists get Flags info true if is Under Link dest is Under Link make sure location is not null This can occur with linked resources relative to undefined path variables I Path source Location get Location if source Location null message Policy bind localstore location Undefined get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL get Full Path message null I Path dest Location dest get Location if dest Location null message Policy bind localstore location Undefined dest get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ LOCAL dest get Full Path message null make sure location of source is not a prefix of the location of the destination this can occur if the source or destination is a linked resource if source Location is Prefix Of dest Location message Policy bind resources move Dest Not Sub get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status INVALID VALUE get Full Path message null return status isOK Status OK STATUS I Status status  CoreException CoreExceptions IStatus IResource IWorkspace AssertionFailureException CoreException IResource IPath IProgressMonitor IStatus checkMoveRequirements IPath destinationType updateFlags CoreException moveNotMet MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus INVALID_VALUE destNotNull ResourceStatus IResourceStatus INVALID_VALUE getFullPath makePathAbsolute getFullPath isPrefixOf moveDestNotSub getFullPath toString ResourceStatus IResourceStatus INVALID_VALUE getFullPath checkValidPath destinationType ResourceInfo getResourceInfo getFlags checkAccessible checkLocal DEPTH_INFINITE newResource destinationType IResource CoreFileSystemLibrary isCaseSensitive findExistingResourceVariant checkDoesNotExist getType IResource getType IResource fileToProj ResourceException ResourceStatus IResourceStatus INVALID_VALUE getFullPath getParent isDeepMove updateFlags IResource isDeepMove isLinked getType IResource moveNotProject getFullPath toString toString ResourceException ResourceStatus IResourceStatus INVALID_VALUE getFullPath destinationType IResource getProject getResourceInfo checkAccessible getFlags getResourceInfo checkExists getFlags isUnderLink isUnderLink IPath sourceLocation getLocation sourceLocation locationUndefined getFullPath toString ResourceException IResourceStatus FAILED_READ_LOCAL getFullPath IPath destLocation getLocation destLocation locationUndefined getFullPath toString ResourceException IResourceStatus FAILED_READ_LOCAL getFullPath sourceLocation isPrefixOf destLocation moveDestNotSub getFullPath toString ResourceException IResourceStatus INVALID_VALUE getFullPath OK_STATUS IStatus
Checks that the supplied path is valid according to Workspace validate Path exception Core Exception if the path is not valid public void check Valid Path I Path to Validate int type boolean last Segment Only throws Core Exception I Status result workspace validate Path to Validate type last Segment Only if result isOK throw new Resource Exception result  validatePath CoreException checkValidPath IPath toValidate lastSegmentOnly CoreException IStatus validatePath toValidate lastSegmentOnly ResourceException
see I Resource clear History I Progress Monitor public void clear History I Progress Monitor monitor throws Core Exception get Local Manager get History Store remove All this  IResource clearHistory IProgressMonitor clearHistory IProgressMonitor CoreException getLocalManager getHistoryStore removeAll
public boolean contains I Scheduling Rule rule if this rule return true must allow notifications to nest in all resource rules if rule get Class equals Work Manager Notify Rule class return true if rule instanceof Multi Rule Multi Rule multi Multi Rule rule I Scheduling Rule children multi get Children for int i 0 i children length i if contains children i return false return true if rule instanceof I Resource return false return path is Prefix Of I Resource rule get Full Path  ISchedulingRule getClass WorkManager NotifyRule MultiRule MultiRule MultiRule ISchedulingRule getChildren IResource isPrefixOf IResource getFullPath
public void convert To Phantom throws Core Exception Resource Info info get Resource Info false true if info null is Phantom get Flags info return info clear Session Properties info set M PHANTOM get Local Manager update Local Sync info I NULL SYNC INFO info set Modification Stamp I Resource NULL STAMP should already be done by the delete Resource call but left in just to be safe and for code clarity info set Markers null  convertToPhantom CoreException ResourceInfo getResourceInfo isPhantom getFlags clearSessionProperties M_PHANTOM getLocalManager updateLocalSync I_NULL_SYNC_INFO setModificationStamp IResource NULL_STAMP deleteResource setMarkers
public void copy I Project Description dest Desc int update Flags I Progress Monitor monitor throws Core Exception Assert is Not Null dest Desc monitor Policy monitor For monitor try String message Policy bind resources copying get Full Path to String NON NLS 1 monitor begin Task message Policy total Work try workspace prepare Operation workspace get Root monitor The following assert method throws Core Exceptions as stated in the I Resource copy API and assert for programming errors See check Copy Requirements for more information I Path dest Path new Path dest Desc get Name make Absolute assert Copy Requirements dest Path get Type update Flags Project dest Project Project workspace get Root get Project dest Path last Segment workspace begin Operation true create and open the new project dest Project create dest Desc Policy sub Monitor For monitor Policy op Work 5 100 dest Project open Policy sub Monitor For monitor Policy op Work 5 100 copy the children FIXME fix the progress monitor here create a sub monitor and do a worked 1 after each child instead I Resource children I Container this members I Container INCLUDE TEAM PRIVATE MEMBERS for int i 0 i children length i Resource child Resource children i child copy dest Path append child get Name update Flags Policy sub Monitor For monitor Policy op Work 60 100 children length copy over the properties get Property Manager copy this dest Project DEPTH ZERO monitor worked Policy op Work 15 100 catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation workspace get Root true Policy sub Monitor For monitor Policy build Work finally monitor done  IProjectDescription destDesc updateFlags IProgressMonitor CoreException isNotNull destDesc monitorFor getFullPath toString beginTask totalWork prepareOperation getRoot CoreExceptions IResource checkCopyRequirements IPath destPath destDesc getName makeAbsolute assertCopyRequirements destPath getType updateFlags destProject getRoot getProject destPath lastSegment beginOperation destProject destDesc subMonitorFor opWork destProject subMonitorFor opWork IResource IContainer IContainer INCLUDE_TEAM_PRIVATE_MEMBERS destPath getName updateFlags subMonitorFor opWork getPropertyManager destProject DEPTH_ZERO opWork OperationCanceledException getWorkManager operationCanceled endOperation getRoot subMonitorFor buildWork
see I Resource copy I Project Description boolean I Progress Monitor public void copy I Project Description dest Desc boolean force I Progress Monitor monitor throws Core Exception int update Flags force I Resource FORCE I Resource NONE copy dest Desc update Flags monitor  IResource IProjectDescription IProgressMonitor IProjectDescription destDesc IProgressMonitor CoreException updateFlags IResource IResource destDesc updateFlags
public void copy I Path destination int update Flags I Progress Monitor monitor throws Core Exception try monitor Policy monitor For monitor String message Policy bind resources copying get Full Path to String NON NLS 1 monitor begin Task message Policy total Work Policy check Canceled monitor destination make Path Absolute destination check Valid Path destination get Type false Resource dest Resource workspace new Resource destination get Type final I Scheduling Rule rule workspace get Rule Factory copy Rule this dest Resource try workspace prepare Operation rule monitor The following assert method throws Core Exceptions as stated in the I Resource copy API and assert for programming errors See check Copy Requirements for more information assert Copy Requirements destination get Type update Flags workspace begin Operation true get Local Manager copy this dest Resource update Flags Policy sub Monitor For monitor Policy op Work catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  IPath updateFlags IProgressMonitor CoreException monitorFor getFullPath toString beginTask totalWork checkCanceled makePathAbsolute checkValidPath getType destResource newResource getType ISchedulingRule getRuleFactory copyRule destResource prepareOperation CoreExceptions IResource checkCopyRequirements assertCopyRequirements getType updateFlags beginOperation getLocalManager destResource updateFlags subMonitorFor opWork OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
see I Resource copy I Path boolean I Progress Monitor public void copy I Path destination boolean force I Progress Monitor monitor throws Core Exception int update Flags force I Resource FORCE I Resource NONE copy destination update Flags monitor  IResource IPath IProgressMonitor IPath IProgressMonitor CoreException updateFlags IResource IResource updateFlags
Count the number of resources in the tree from this container to the specified depth Include this resource Include phantoms if the phantom boolean is true public int count Resources int depth boolean phantom return workspace count Resources path depth phantom  countResources countResources
public void create Link I Path local Location int update Flags I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String message Policy bind resources creating Link get Full Path to String NON NLS 1 monitor begin Task message Policy total Work Policy check Canceled monitor check Valid Path path FOLDER true final I Scheduling Rule rule workspace get Rule Factory create Rule this try workspace prepare Operation rule monitor if the location doesn t have a device see if the OS will assign one if local Location is Absolute local Location get Device null local Location new Path local Location to File get Absolute Path assert Link Requirements local Location update Flags workspace broadcast Event Lifecycle Event new Event Lifecycle Event PRE LINK CREATE this workspace begin Operation true resolve any variables used in the location path I Path resolved Location workspace get Path Variable Manager resolve Path local Location Resource Info info workspace create Resource this false info set M LINK get Local Manager link this resolved Location monitor worked Policy op Work 5 100 save the location in the project description Project project Project get Project project internal Get Description set Link Location get Name new Link Description this local Location project write Description I Resource NONE monitor worked Policy op Work 5 100 refresh to discover any new resources below this linked location if get Type I Resource FILE refresh Local DEPTH INFINITE Policy sub Monitor For monitor Policy op Work 90 100 else monitor worked Policy op Work 90 100 catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  createLink IPath localLocation updateFlags IProgressMonitor CoreException monitorFor creatingLink getFullPath toString beginTask totalWork checkCanceled checkValidPath ISchedulingRule getRuleFactory createRule prepareOperation localLocation isAbsolute localLocation getDevice localLocation localLocation toFile getAbsolutePath assertLinkRequirements localLocation updateFlags broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_LINK_CREATE beginOperation IPath resolvedLocation getPathVariableManager resolvePath localLocation ResourceInfo createResource M_LINK getLocalManager resolvedLocation opWork getProject internalGetDescription setLinkLocation getName LinkDescription localLocation writeDescription IResource opWork getType IResource refreshLocal DEPTH_INFINITE subMonitorFor opWork opWork OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
public I Marker create Marker String type throws Core Exception Assert is Not Null type final I Scheduling Rule rule workspace get Rule Factory marker Rule this try workspace prepare Operation rule null check Accessible get Flags get Resource Info false false workspace begin Operation true Marker Info info new Marker Info info set Type type info set Creation Time System current Time Millis workspace get Marker Manager add this info return new Marker this info get Id finally workspace end Operation rule false null  IMarker createMarker CoreException isNotNull ISchedulingRule getRuleFactory markerRule prepareOperation checkAccessible getFlags getResourceInfo beginOperation MarkerInfo MarkerInfo setType setCreationTime currentTimeMillis getMarkerManager getId endOperation
see I Resource delete boolean I Progress Monitor public void delete boolean force I Progress Monitor monitor throws Core Exception delete force I Resource FORCE I Resource NONE monitor  IResource IProgressMonitor IProgressMonitor CoreException IResource IResource
public void delete int update Flags I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String message Policy bind resources deleting get Full Path to String NON NLS 1 monitor begin Task message Policy total Work 1000 final I Scheduling Rule rule workspace get Rule Factory delete Rule this try workspace prepare Operation rule monitor if there is no resource then there is nothing to delete so just return if exists return workspace begin Operation true I Path original Location get Location boolean was Linked is Linked message Policy bind resources delete Problem NON NLS 1 Multi Status status new Multi Status Resources Plugin PI RESOURCES I Status ERROR message null Work Manager work Manager workspace get Work Manager Resource Tree tree new Resource Tree work Manager get Lock status update Flags int depth 0 try depth work Manager begin Unprotected unprotected Delete tree update Flags monitor finally work Manager end Unprotected depth if get Type ROOT need to clear out the root info workspace get Marker Manager remove Markers this I Resource DEPTH ZERO get Property Manager delete Properties this I Resource DEPTH ZERO get Resource Info false false clear Session Properties Invalidate the tree for further use by clients tree make Invalid if tree get Status isOK throw new Resource Exception tree get Status update any aliases of this resource note that deletion of a linked resource cannot affect other resources if was Linked workspace get Alias Manager update Aliases this original Location I Resource DEPTH INFINITE monitor make sure the rule factory is cleared on project deletion if get Type PROJECT Rules workspace get Rule Factory set Rule Factory I Project this null catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work 1000 finally monitor done  updateFlags IProgressMonitor CoreException monitorFor getFullPath toString beginTask totalWork ISchedulingRule getRuleFactory deleteRule prepareOperation beginOperation IPath originalLocation getLocation wasLinked isLinked deleteProblem MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IStatus WorkManager workManager getWorkManager ResourceTree ResourceTree workManager getLock updateFlags workManager beginUnprotected unprotectedDelete updateFlags workManager endUnprotected getType getMarkerManager removeMarkers IResource DEPTH_ZERO getPropertyManager deleteProperties IResource DEPTH_ZERO getResourceInfo clearSessionProperties makeInvalid getStatus ResourceException getStatus wasLinked getAliasManager updateAliases originalLocation IResource DEPTH_INFINITE getType getRuleFactory setRuleFactory IProject OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
public void delete boolean force boolean keep History I Progress Monitor monitor throws Core Exception int update Flags force I Resource FORCE I Resource NONE update Flags keep History I Resource KEEP HISTORY I Resource NONE delete update Flags monitor  keepHistory IProgressMonitor CoreException updateFlags IResource IResource updateFlags keepHistory IResource KEEP_HISTORY IResource updateFlags
public void delete Markers String type boolean include Subtypes int depth throws Core Exception final I Scheduling Rule rule workspace get Rule Factory marker Rule this try workspace prepare Operation rule null Resource Info info get Resource Info false false check Accessible get Flags info workspace begin Operation true workspace get Marker Manager remove Markers this type include Subtypes depth finally workspace end Operation rule false null  deleteMarkers includeSubtypes CoreException ISchedulingRule getRuleFactory markerRule prepareOperation ResourceInfo getResourceInfo checkAccessible getFlags beginOperation getMarkerManager removeMarkers includeSubtypes endOperation
This method should be called to delete a resource from the tree because it will also delete its properties and markers If a status object is provided minor exceptions are added otherwise they are thrown If major exceptions occur they are always thrown public void delete Resource boolean convert To Phantom Multi Status status throws Core Exception delete properties Core Exception err null try get Property Manager delete Resource this catch Core Exception e if status null status add e get Status else err e remove markers on this resource and its descendents if exists get Marker Manager remove Markers this I Resource DEPTH INFINITE if this is a linked resource remove the entry from the project description if is Linked pre delete notification to internal infrastructure workspace broadcast Event Lifecycle Event new Event Lifecycle Event PRE LINK DELETE this Project project Project get Project Project Description description project internal Get Description description set Link Location get Name null project internal Set Description description true project write Description I Resource FORCE if we are synchronizing do not delete the resource Convert it into a phantom Actual deletion will happen when we refresh or push if convert To Phantom get Type PROJECT synchronizing get Resource Info true false convert To Phantom else workspace delete Resource this if err null throw err  deleteResource convertToPhantom MultiStatus CoreException CoreException getPropertyManager deleteResource CoreException getStatus getMarkerManager removeMarkers IResource DEPTH_INFINITE isLinked broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_LINK_DELETE getProject ProjectDescription internalGetDescription setLinkLocation getName internalSetDescription writeDescription IResource convertToPhantom getType getResourceInfo convertToPhantom deleteResource
public boolean equals Object target if this target return true if target instanceof Resource return false Resource resource Resource target return get Type resource get Type path equals resource path workspace equals resource workspace  getType getType
see I Resource exists public boolean exists Resource Info info get Resource Info false false return exists get Flags info true  IResource ResourceInfo getResourceInfo getFlags
public boolean exists int flags boolean check Type return flags NULL FLAG check Type Resource Info get Type flags get Type  checkType NULL_FLAG checkType ResourceInfo getType getType
see I Resource find Marker long public I Marker find Marker long id throws Core Exception return workspace get Marker Manager find Marker this id  IResource findMarker IMarker findMarker CoreException getMarkerManager findMarker
public I Marker find Markers String type boolean include Subtypes int depth throws Core Exception Resource Info info get Resource Info false false check Accessible get Flags info It might happen that from this point the resource is not accessible anymore But markers have the exists method that callers can use to check if it is still valid return workspace get Marker Manager find Markers this type include Subtypes depth  IMarker findMarkers includeSubtypes CoreException ResourceInfo getResourceInfo checkAccessible getFlags getMarkerManager findMarkers includeSubtypes
protected void fixup After Move Source throws Core Exception Resource Info info get Resource Info true true if a linked resource is moved we need to remove the location info from the project if is Linked Project project Project get Project project internal Get Description set Link Location get Name null project write Description I Resource NONE if synchronizing info workspace delete Resource this return info clear Session Properties info clear M LOCAL EXISTS info set Local Sync Info I NULL SYNC INFO info set M PHANTOM info set Modification Stamp I Resource NULL STAMP info set Markers null  fixupAfterMoveSource CoreException ResourceInfo getResourceInfo isLinked getProject internalGetDescription setLinkLocation getName writeDescription IResource deleteResource clearSessionProperties M_LOCAL_EXISTS setLocalSyncInfo I_NULL_SYNC_INFO M_PHANTOM setModificationStamp IResource NULL_STAMP setMarkers
public String get File Extension String name get Name int index name last Index Of if index 1 return null if index name length 1 return NON NLS 1 return name substring index 1  getFileExtension getName lastIndexOf
public int get Flags Resource Info info return info null NULL FLAG info get Flags  getFlags ResourceInfo NULL_FLAG getFlags
see I Resource get Full Path public I Path get Full Path return path  IResource getFullPath IPath getFullPath
public File System Resource Manager get Local Manager return workspace get File System Manager  FileSystemResourceManager getLocalManager getFileSystemManager
see I Resource get Local Time Stamp public long get Local Time Stamp Resource Info info get Resource Info false false return info null I Resource NULL STAMP info get Local Sync Info  IResource getLocalTimeStamp getLocalTimeStamp ResourceInfo getResourceInfo IResource NULL_STAMP getLocalSyncInfo
public I Path get Location I Project project get Project if project null project exists return null return get Local Manager location For this  IPath getLocation IProject getProject getLocalManager locationFor
public URL get LocationURL I Project project get Project if project null project exists return null try return new URL platform resource get Full Path NON NLS 1 catch MalformedURL Exception e return null  getLocationURL IProject getProject getFullPath MalformedURLException
see I Resource get Marker long public I Marker get Marker long id return new Marker this id  IResource getMarker IMarker getMarker
protected Marker Manager get Marker Manager return workspace get Marker Manager  MarkerManager getMarkerManager getMarkerManager
see I Resource get Modification Stamp public long get Modification Stamp Resource Info info get Resource Info false false return info null I Resource NULL STAMP info get Modification Stamp  IResource getModificationStamp getModificationStamp ResourceInfo getResourceInfo IResource NULL_STAMP getModificationStamp
see I Resource get Name public String get Name return path last Segment  IResource getName getName lastSegment
public I Container get Parent int segments path segment Count zero and one segments handled by subclasses Assert is Legal segments 1 path to String if segments 2 return workspace get Root get Project path segment 0 return I Folder workspace new Resource path remove Last Segments 1 I Resource FOLDER  IContainer getParent segmentCount isLegal toString getRoot getProject IFolder newResource removeLastSegments IResource
public String get Persistent Property Qualified Name key throws Core Exception Resource Info info get Resource Info false false int flags get Flags info check Accessible flags check Local flags DEPTH ZERO return get Property Manager get Property this key  getPersistentProperty QualifiedName CoreException ResourceInfo getResourceInfo getFlags checkAccessible checkLocal DEPTH_ZERO getPropertyManager getProperty
see I Resource get Project public I Project get Project return workspace get Root get Project path segment 0  IResource getProject IProject getProject getRoot getProject
see I Resource get Project Relative Path public I Path get Project Relative Path return get Full Path remove First Segments I Core Constants PROJECT SEGMENT LENGTH  IResource getProjectRelativePath IPath getProjectRelativePath getFullPath removeFirstSegments ICoreConstants PROJECT_SEGMENT_LENGTH
public Property Manager get Property Manager return workspace get Property Manager  PropertyManager getPropertyManager getPropertyManager
public I Path get Raw Location if is Linked return Project get Project internal Get Description get Link Location get Name return get Location  IPath getRawLocation isLinked getProject internalGetDescription getLinkLocation getName getLocation
Returns the resource info Returns null if the resource doesn t exist If the phantom flag is true phantom resources are considered If the mutable flag is true a mutable info is returned public Resource Info get Resource Info boolean phantom boolean mutable return workspace get Resource Info get Full Path phantom mutable  ResourceInfo getResourceInfo getResourceInfo getFullPath
public Object get Session Property Qualified Name key throws Core Exception Resource Info info get Resource Info false false int flags get Flags info check Accessible flags check Local flags DEPTH ZERO return info get Session Property key  getSessionProperty QualifiedName CoreException ResourceInfo getResourceInfo getFlags checkAccessible checkLocal DEPTH_ZERO getSessionProperty
see I Resource get Type public abstract int get Type  IResource getType getType
public String get Type String switch get Type case FILE return L NON NLS 1 case FOLDER return F NON NLS 1 case PROJECT return P NON NLS 1 case ROOT return R NON NLS 1 return NON NLS 1  getTypeString getType
see I Resource get Workspace public I Workspace get Workspace return workspace  IResource getWorkspace IWorkspace getWorkspace
public int hash Code the container may be null if the identified resource does not exist so don t bother with it in the hash return get Full Path hash Code  hashCode getFullPath hashCode
Sets the M LOCAL EXISTS flag Is internal so we don t have to begin an operation protected void internal Set Local boolean flag int depth throws Core Exception Resource Info info get Resource Info true true only make the change if it s not already in desired state if info is Set M LOCAL EXISTS flag if flag is Phantom get Flags info info set M LOCAL EXISTS workspace update Modification Stamp info else info clear M LOCAL EXISTS info set Modification Stamp I Resource NULL STAMP if get Type I Resource FILE depth I Resource DEPTH ZERO return if depth I Resource DEPTH ONE depth I Resource DEPTH ZERO I Resource children I Container this members for int i 0 i children length i Resource children i internal Set Local flag depth  M_LOCAL_EXISTS internalSetLocal CoreException ResourceInfo getResourceInfo isSet M_LOCAL_EXISTS isPhantom getFlags M_LOCAL_EXISTS updateModificationStamp M_LOCAL_EXISTS setModificationStamp IResource NULL_STAMP getType IResource IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_ZERO IResource IContainer internalSetLocal
see I Resource is Accessible public boolean is Accessible return exists  IResource isAccessible isAccessible
public boolean is Conflicting I Scheduling Rule rule must not schedule at same time as notification if rule get Class equals Work Manager Notify Rule class return true if rule instanceof I Resource return false I Path other Path I Resource rule get Full Path return path is Prefix Of other Path other Path is Prefix Of path  isConflicting ISchedulingRule getClass WorkManager NotifyRule IResource IPath otherPath IResource getFullPath isPrefixOf otherPath otherPath isPrefixOf
see I Resource is Local int public boolean is Local int depth Resource Info info get Resource Info false false return is Local get Flags info depth  IResource isLocal isLocal ResourceInfo getResourceInfo isLocal getFlags
Note the depth parameter is intentionally ignored because this method is over ridden by Container is Local public boolean is Local int flags int depth if get Type PROJECT return flags NULL FLAG exists return flags NULL FLAG Resource Info is Set flags M LOCAL EXISTS  isLocal isLocal getType NULL_FLAG NULL_FLAG ResourceInfo isSet M_LOCAL_EXISTS
see I Resource is Phantom public boolean is Phantom Resource Info info get Resource Info true false return is Phantom get Flags info  IResource isPhantom isPhantom ResourceInfo getResourceInfo isPhantom getFlags
public boolean is Phantom int flags return flags NULL FLAG Resource Info is Set flags M PHANTOM  isPhantom NULL_FLAG ResourceInfo isSet M_PHANTOM
public boolean is Read Only I Path location get Location if location null return false return Core File System Library is Read Only location toOS String  isReadOnly IPath getLocation CoreFileSystemLibrary isReadOnly toOSString
see I Resource is Synchronized int public boolean is Synchronized int depth return get Local Manager is Synchronized this depth  IResource isSynchronized isSynchronized getLocalManager isSynchronized
protected I Path make Path Absolute I Path target if target is Absolute return target return get Parent get Full Path append target  IPath makePathAbsolute IPath isAbsolute getParent getFullPath
public void move I Project Description description boolean force boolean keep History I Progress Monitor monitor throws Core Exception int update Flags force I Resource FORCE I Resource NONE update Flags keep History I Resource KEEP HISTORY I Resource NONE move description update Flags monitor  IProjectDescription keepHistory IProgressMonitor CoreException updateFlags IResource IResource updateFlags keepHistory IResource KEEP_HISTORY IResource updateFlags
public void move I Project Description description int update Flags I Progress Monitor monitor throws Core Exception Assert is Not Null description if get Type I Resource PROJECT String message Policy bind resources move Not Project get Full Path to String description get Name NON NLS 1 throw new Resource Exception I Resource Status INVALID VALUE get Full Path message null Project this move description update Flags monitor  IProjectDescription updateFlags IProgressMonitor CoreException isNotNull getType IResource moveNotProject getFullPath toString getName ResourceException IResourceStatus INVALID_VALUE getFullPath updateFlags
see I Resource move I Path boolean I Progress Monitor public void move I Path destination boolean force I Progress Monitor monitor throws Core Exception move destination force I Resource FORCE I Resource NONE monitor  IResource IPath IProgressMonitor IPath IProgressMonitor CoreException IResource IResource
public void move I Path destination boolean force boolean keep History I Progress Monitor monitor throws Core Exception int update Flags force I Resource FORCE I Resource NONE update Flags keep History I Resource KEEP HISTORY I Resource NONE move destination update Flags monitor  IPath keepHistory IProgressMonitor CoreException updateFlags IResource IResource updateFlags keepHistory IResource KEEP_HISTORY IResource updateFlags
public void move I Path destination int update Flags I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String message Policy bind resources moving get Full Path to String NON NLS 1 monitor begin Task message Policy total Work Policy check Canceled monitor destination make Path Absolute destination check Valid Path destination get Type false Resource dest Resource workspace new Resource destination get Type final I Scheduling Rule rule workspace get Rule Factory move Rule this dest Resource try workspace prepare Operation rule monitor The following assert method throws Core Exceptions as stated in the I Resource move API and assert for programming errors See check Move Requirements for more information assert Move Requirements destination get Type update Flags workspace begin Operation true I Path original Location get Location message Policy bind resources move Problem NON NLS 1 Multi Status status new Multi Status Resources Plugin PI RESOURCES I Status ERROR message null Work Manager work Manager workspace get Work Manager Resource Tree tree new Resource Tree work Manager get Lock status update Flags boolean success false int depth 0 try depth work Manager begin Unprotected success unprotected Move tree dest Resource update Flags monitor finally work Manager end Unprotected depth Invalidate the tree for further use by clients tree make Invalid update any aliases of this resource and the destination if success workspace get Alias Manager update Aliases this original Location I Resource DEPTH INFINITE monitor workspace get Alias Manager update Aliases dest Resource dest Resource get Location I Resource DEPTH INFINITE monitor if tree get Status isOK throw new Resource Exception tree get Status catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  IPath updateFlags IProgressMonitor CoreException monitorFor getFullPath toString beginTask totalWork checkCanceled makePathAbsolute checkValidPath getType destResource newResource getType ISchedulingRule getRuleFactory moveRule destResource prepareOperation CoreExceptions IResource checkMoveRequirements assertMoveRequirements getType updateFlags beginOperation IPath originalLocation getLocation moveProblem MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IStatus WorkManager workManager getWorkManager ResourceTree ResourceTree workManager getLock updateFlags workManager beginUnprotected unprotectedMove destResource updateFlags workManager endUnprotected makeInvalid getAliasManager updateAliases originalLocation IResource DEPTH_INFINITE getAliasManager updateAliases destResource destResource getLocation IResource DEPTH_INFINITE getStatus ResourceException getStatus OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
public void refresh Local int depth I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try boolean is Root get Type ROOT String message is Root Policy bind resources refreshing Root Policy bind resources refreshing get Full Path to String NON NLS 1 NON NLS 2 monitor begin Task message Policy total Work boolean build false final I Scheduling Rule rule workspace get Rule Factory refresh Rule this try workspace prepare Operation rule monitor if is Root get Project is Accessible return workspace begin Operation true build get Local Manager refresh this depth true Policy sub Monitor For monitor Policy op Work catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule build Policy sub Monitor For monitor Policy build Work finally monitor done  refreshLocal IProgressMonitor CoreException monitorFor isRoot getType isRoot refreshingRoot getFullPath toString beginTask totalWork ISchedulingRule getRuleFactory refreshRule prepareOperation isRoot getProject isAccessible beginOperation getLocalManager subMonitorFor opWork OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
public void set Local boolean flag int depth I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String message Policy bind resources set Local NON NLS 1 monitor begin Task message Policy total Work try workspace prepare Operation null monitor workspace begin Operation true internal Set Local flag depth monitor worked Policy op Work finally workspace end Operation null true Policy sub Monitor For monitor Policy build Work finally monitor done  setLocal IProgressMonitor CoreException monitorFor setLocal beginTask totalWork prepareOperation beginOperation internalSetLocal opWork endOperation subMonitorFor buildWork
public long set Local Time Stamp long value throws Core Exception if value 0 throw new Illegal Argument Exception Illegal time stamp value NON NLS 1 fetch the info but don t bother making it mutable even though we are going to modify it It really doesn t matter as the change we are doing does not show up in deltas Resource Info info get Resource Info false false int flags get Flags info check Accessible flags check Local flags DEPTH ZERO return get Local Manager set Local Time Stamp this info value  setLocalTimeStamp CoreException IllegalArgumentException ResourceInfo getResourceInfo getFlags checkAccessible checkLocal DEPTH_ZERO getLocalManager setLocalTimeStamp
public void set Persistent Property Qualified Name key String value throws Core Exception Resource Info info get Resource Info false false int flags get Flags info check Accessible flags check Local flags DEPTH ZERO get Property Manager set Property this key value  setPersistentProperty QualifiedName CoreException ResourceInfo getResourceInfo getFlags checkAccessible checkLocal DEPTH_ZERO getPropertyManager setProperty
public void set Read Only boolean readonly I Path location get Location if location null return if Core File System Library set Read Only location toOS String readonly return The call to set Read Only failed Log a message but only the first time this happens if logged Failed Read Only return try String message Policy bind resources read Only Failed get Full Path to String NON NLS 1 Resource Status status new Resource Status I Status INFO get Full Path message Resources Plugin get Plugin get Log log status finally logged Failed Read Only true  setReadOnly IPath getLocation CoreFileSystemLibrary setReadOnly toOSString setReadOnly loggedFailedReadOnly readOnlyFailed getFullPath toString ResourceStatus ResourceStatus IStatus getFullPath ResourcesPlugin getPlugin getLog loggedFailedReadOnly
public void set Session Property Qualified Name key Object value throws Core Exception fetch the info but don t bother making it mutable even though we are going to modify it We don t know whether or not the tree is open and it really doesn t matter as the change we are doing does not show up in deltas Resource Info info get Resource Info false false int flags get Flags info check Accessible flags check Local flags DEPTH ZERO info set Session Property key value  setSessionProperty QualifiedName CoreException ResourceInfo getResourceInfo getFlags checkAccessible checkLocal DEPTH_ZERO setSessionProperty
Returns true if this resource has the potential to be or have been synchronized public boolean synchronizing Resource Info info return info null info get Sync Info false null  ResourceInfo getSyncInfo
see Object to String public String to String return get Type String get Full Path to String  toString toString getTypeString getFullPath toString
public void touch I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String message Policy bind resources touch get Full Path to String NON NLS 1 monitor begin Task message Policy total Work final I Scheduling Rule rule workspace get Rule Factory modify Rule this try workspace prepare Operation rule monitor Resource Info info get Resource Info false false int flags get Flags info check Accessible flags check Local flags DEPTH ZERO workspace begin Operation true fake a change by incrementing the content ID info get Resource Info false true info increment Content Id forget content related caching flags info clear M CONTENT CACHE workspace update Modification Stamp info monitor worked Policy op Work catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  IProgressMonitor CoreException monitorFor getFullPath toString beginTask totalWork ISchedulingRule getRuleFactory modifyRule prepareOperation ResourceInfo getResourceInfo getFlags checkAccessible checkLocal DEPTH_ZERO beginOperation getResourceInfo incrementContentId M_CONTENT_CACHE updateModificationStamp opWork OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
Helper method for case insensitive file systems Returns an existing resource whose path differs only in case from the given path or null if no such resource exists public I Resource find Existing Resource Variant I Path target if workspace tree includes Ignore Case target return null I Path result Path ROOT int segment Count target segment Count for int i 0 i segment Count i String child Names workspace tree get Names Of Children result String name find Variant target segment i child Names if name null return null result result append name return workspace get Root find Member result  IResource findExistingResourceVariant IPath includesIgnoreCase IPath segmentCount segmentCount segmentCount childNames getNamesOfChildren findVariant childNames getRoot findMember
Searches for a variant of the given target in the list that differs only in case Returns the variant from the list if one is found otherwise returns null private String find Variant String target String list for int i 0 i list length i if target equals Ignore Case list i return list i return null  findVariant equalsIgnoreCase
see I Resource is Derived public boolean is Derived Resource Info info get Resource Info false false return is Derived get Flags info  IResource isDerived isDerived ResourceInfo getResourceInfo isDerived getFlags
Returns whether the derived flag is set in the given resource info flags param flags resource info flags bitwuise or of M  constants return code true code if the derived flag is set and code false code if the derived flag is not set or if the flags are code NULL FLAG code public boolean is Derived int flags return flags NULL FLAG Resource Info is Set flags I Core Constants M DERIVED  M_ NULL_FLAG isDerived NULL_FLAG ResourceInfo isSet ICoreConstants M_DERIVED
public boolean is Linked only resources at depth two can be linked if path segment Count 2 return false Resource Info info get Resource Info false false return info null info is Set M LINK  isLinked segmentCount ResourceInfo getResourceInfo isSet M_LINK
public void set Derived boolean is Derived throws Core Exception fetch the info but don t bother making it mutable even though we are going to modify it We don t know whether or not the tree is open and it really doesn t matter as the change we are doing does not show up in deltas Resource Info info get Resource Info false false int flags get Flags info check Accessible flags ignore attempts to set derived flag on anything except files and folders if info get Type FILE info get Type FOLDER if is Derived info set I Core Constants M DERIVED else info clear I Core Constants M DERIVED  setDerived isDerived CoreException ResourceInfo getResourceInfo getFlags checkAccessible getType getType isDerived ICoreConstants M_DERIVED ICoreConstants M_DERIVED
see I Resource is Team Private Member public boolean is Team Private Member Resource Info info get Resource Info false false return is Team Private Member get Flags info  IResource isTeamPrivateMember isTeamPrivateMember ResourceInfo getResourceInfo isTeamPrivateMember getFlags
Returns whether the team private member flag is set in the given resource info flags param flags resource info flags bitwise or of M  constants return code true code if the team private member flag is set and code false code if the flag is not set or if the flags are code NULL FLAG code public boolean is Team Private Member int flags return flags NULL FLAG Resource Info is Set flags I Core Constants M TEAM PRIVATE MEMBER  M_ NULL_FLAG isTeamPrivateMember NULL_FLAG ResourceInfo isSet ICoreConstants M_TEAM_PRIVATE_MEMBER
Returns true if this resource is a linked resource or a child of a linked resource and false otherwise public boolean is Under Link int depth path segment Count if depth 2 return false if depth 2 return is Linked check if parent at depth two is a link I Path link Parent path remove Last Segments depth 2 return workspace get Resource Info link Parent false false is Set I Core Constants M LINK  isUnderLink segmentCount isLinked IPath linkParent removeLastSegments getResourceInfo linkParent isSet ICoreConstants M_LINK
public void set Team Private Member boolean is Team Private throws Core Exception fetch the info but don t bother making it mutable even though we are going to modify it We don t know whether or not the tree is open and it really doesn t matter as the change we are doing does not show up in deltas Resource Info info get Resource Info false false int flags get Flags info check Accessible flags ignore attempts to set team private member flag on anything except files and folders if info get Type FILE info get Type FOLDER if is Team Private info set I Core Constants M TEAM PRIVATE MEMBER else info clear I Core Constants M TEAM PRIVATE MEMBER  setTeamPrivateMember isTeamPrivate CoreException ResourceInfo getResourceInfo getFlags checkAccessible getType getType isTeamPrivate ICoreConstants M_TEAM_PRIVATE_MEMBER ICoreConstants M_TEAM_PRIVATE_MEMBER
Calls the move delete hook to perform the deletion Since this method calls client code it is run unprotected so the workspace lock is not held private void unprotected Delete Resource Tree tree int update Flags I Progress Monitor monitor throws Core Exception I Move Delete Hook hook workspace get Move Delete Hook switch get Type case I Resource FILE if hook delete File tree I File this update Flags Policy sub Monitor For monitor Policy op Work 1000 2 tree standard Delete File I File this update Flags Policy sub Monitor For monitor Policy op Work 1000 2 break case I Resource FOLDER if hook delete Folder tree I Folder this update Flags Policy sub Monitor For monitor Policy op Work 1000 2 tree standard Delete Folder I Folder this update Flags Policy sub Monitor For monitor Policy op Work 1000 2 break case I Resource PROJECT workspace broadcast Event Lifecycle Event new Event Lifecycle Event PRE PROJECT DELETE this if hook delete Project tree I Project this update Flags Policy sub Monitor For monitor Policy op Work 1000 2 tree standard Delete Project I Project this update Flags Policy sub Monitor For monitor Policy op Work 1000 2 break case I Resource ROOT I Project projects I Workspace Root this get Projects for int i 0 i projects length i workspace broadcast Event Lifecycle Event new Event Lifecycle Event PRE PROJECT DELETE projects i if hook delete Project tree projects i update Flags Policy sub Monitor For monitor Policy op Work 1000 projects length 2 tree standard Delete Project projects i update Flags Policy sub Monitor For monitor Policy op Work 1000 projects length 2  unprotectedDelete ResourceTree updateFlags IProgressMonitor CoreException IMoveDeleteHook getMoveDeleteHook getType IResource deleteFile IFile updateFlags subMonitorFor opWork standardDeleteFile IFile updateFlags subMonitorFor opWork IResource deleteFolder IFolder updateFlags subMonitorFor opWork standardDeleteFolder IFolder updateFlags subMonitorFor opWork IResource broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_PROJECT_DELETE deleteProject IProject updateFlags subMonitorFor opWork standardDeleteProject IProject updateFlags subMonitorFor opWork IResource IProject IWorkspaceRoot getProjects broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_PROJECT_DELETE deleteProject updateFlags subMonitorFor opWork standardDeleteProject updateFlags subMonitorFor opWork
Calls the move delete hook to perform the move Since this method calls client code it is run unprotected so the workspace lock is not held Returns true if resources were actually moved and false otherwise private boolean unprotected Move Resource Tree tree final I Resource destination int update Flags I Progress Monitor monitor throws Core Exception Resource Exception I Move Delete Hook hook workspace get Move Delete Hook switch get Type case I Resource FILE if is Linked workspace broadcast Event Lifecycle Event new Event Lifecycle Event PRE LINK MOVE this destination update Flags if hook move File tree I File this I File destination update Flags Policy sub Monitor For monitor Policy op Work 2 tree standard Move File I File this I File destination update Flags Policy sub Monitor For monitor Policy op Work 2 break case I Resource FOLDER if is Linked workspace broadcast Event Lifecycle Event new Event Lifecycle Event PRE LINK MOVE this destination update Flags if hook move Folder tree I Folder this I Folder destination update Flags Policy sub Monitor For monitor Policy op Work 2 tree standard Move Folder I Folder this I Folder destination update Flags Policy sub Monitor For monitor Policy op Work 2 break case I Resource PROJECT I Project project I Project this if there is no change in name there is nothing to do so return if get Name equals destination get Name return false we are deleting the source project so notify workspace broadcast Event Lifecycle Event new Event Lifecycle Event PRE PROJECT MOVE this destination update Flags I Project Description description project get Description description set Name destination get Name if hook move Project tree project description update Flags Policy sub Monitor For monitor Policy op Work 2 tree standard Move Project project description update Flags Policy sub Monitor For monitor Policy op Work 2 break case I Resource ROOT String msg Policy bind resources move Root NON NLS 1 throw new Resource Exception new Resource Status I Resource Status INVALID VALUE get Full Path msg return true  unprotectedMove ResourceTree IResource updateFlags IProgressMonitor CoreException ResourceException IMoveDeleteHook getMoveDeleteHook getType IResource isLinked broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_LINK_MOVE updateFlags moveFile IFile IFile updateFlags subMonitorFor opWork standardMoveFile IFile IFile updateFlags subMonitorFor opWork IResource isLinked broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_LINK_MOVE updateFlags moveFolder IFolder IFolder updateFlags subMonitorFor opWork standardMoveFolder IFolder IFolder updateFlags subMonitorFor opWork IResource IProject IProject getName getName broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_PROJECT_MOVE updateFlags IProjectDescription getDescription setName getName moveProject updateFlags subMonitorFor opWork standardMoveProject updateFlags subMonitorFor opWork IResource moveRoot ResourceException ResourceStatus IResourceStatus INVALID_VALUE getFullPath

public class Resource Exception extends Core Exception public Resource Exception int code I Path path String message Throwable exception super new Resource Status code path message exception  ResourceException CoreException ResourceException IPath ResourceStatus
Constructs a new exception with the given status object param status the status object to be associated with this exception see I Status public Resource Exception I Status status super status  IStatus ResourceException IStatus
Prints a stack trace out for the exception and any nested exception that it may have embedded in its Status object public void print Stack Trace print Stack Trace System err  printStackTrace printStackTrace
Prints a stack trace out for the exception and any nested exception that it may have embedded in its Status object public void print Stack Trace Print Stream output synchronized output I Status status get Status if status get Exception null String path NON NLS 1 if status instanceof I Resource Status path I Resource Status status get Path NON NLS 1 NON NLS 2 output print get Class get Name path status get Code NON NLS 1 NON NLS 2 status get Exception print Stack Trace output else super print Stack Trace output  printStackTrace PrintStream IStatus getStatus getException IResourceStatus IResourceStatus getPath getClass getName getCode getException printStackTrace printStackTrace
Prints a stack trace out for the exception and any nested exception that it may have embedded in its Status object public void print Stack Trace Print Writer output synchronized output I Status status get Status if status get Exception null String path NON NLS 1 if status instanceof I Resource Status path I Resource Status status get Path NON NLS 1 NON NLS 2 output print get Class get Name path status get Code NON NLS 1 NON NLS 2 status get Exception print Stack Trace output else super print Stack Trace output  printStackTrace PrintWriter IStatus getStatus getException IResourceStatus IResourceStatus getPath getClass getName getCode getException printStackTrace printStackTrace

Clears all of the bits indicated by the mask public void clear int mask flags mask 
public synchronized void clear Session Properties session Properties null  clearSessionProperties sessionProperties
public Object clone try return super clone catch Clone Not Supported Exception e return null never gets here  CloneNotSupportedException
Returns the integer value stored in the indicated part of this info s flags protected static int get Bits int flags int mask int start return flags mask start  getBits
public int get Content Id return content Id  getContentId contentId
Returns the set of flags for this info public int get Flags return flags  getFlags
Gets the local relative sync information public long get Local Sync Info return local Info  getLocalSyncInfo localInfo
Returns the marker generation count The count is incremented whenever markers on the resource change public int get Marker Generation Count return marker Generation Count  getMarkerGenerationCount markerGenerationCount
Returns a copy of the collection of makers on this resource code null code is returned if there are none public Marker Set get Markers return get Markers true  MarkerSet getMarkers getMarkers
Returns the collection of makers on this resource code null code is returned if there are none public Marker Set get Markers boolean make Copy if markers null return null return make Copy Marker Set markers clone markers  MarkerSet getMarkers makeCopy makeCopy MarkerSet
public long get Modification Stamp return modification Stamp  getModificationStamp modificationStamp
public long get Node Id return node Id  getNodeId nodeId
Returns the property store associated with this info The return value may be null public Property Store get Property Store return null  PropertyStore getPropertyStore
Returns the value of the identified session property public Object get Session Property Qualified Name name thread safety Concurrency001 Map temp session Properties if temp null return null return temp get name  getSessionProperty QualifiedName sessionProperties
public synchronized byte get Sync Info Qualified Name id boolean make Copy thread safety Concurrency001 byte b if sync Info null return null b byte sync Info get id return b null null make Copy byte b clone b  getSyncInfo QualifiedName makeCopy syncInfo syncInfo makeCopy
The parameter to this method is the implementing class rather than the interface so we ensure that we get it right since we are making certain assumptions about the object type w r t casting public synchronized Object Map get Sync Info boolean make Copy if sync Info null return null return make Copy Object Map sync Info clone sync Info  ObjectMap getSyncInfo makeCopy syncInfo makeCopy ObjectMap syncInfo syncInfo
Returns the sync information generation count The count is incremented whenever sync info on the resource changes public int get Sync Info Generation Count return sync Info Generation Count  getSyncInfoGenerationCount syncInfoGenerationCount
Returns the type setting for this info Valid values are FILE FOLDER PROJECT public int get Type return get Type flags  getType getType
Returns the type setting for this info Valid values are FILE FOLDER PROJECT public static int get Type int flags return get Bits flags M TYPE M TYPE START  getType getBits M_TYPE M_TYPE_START
Mark this resource info as having changed content public void increment Content Id content Id 1  incrementContentId contentId
Increments the marker generation count The count is incremented whenever markers on the resource change public void increment Marker Generation Count marker Generation Count  incrementMarkerGenerationCount markerGenerationCount
Increments the sync information generation count The count is incremented whenever sync info on the resource changes public void increment Sync Info Generation Count sync Info Generation Count  incrementSyncInfoGenerationCount syncInfoGenerationCount
Returns true if all of the bits indicated by the mask are set public boolean is Set int mask return is Set flags mask  isSet isSet
Returns true if all of the bits indicated by the mask are set public static boolean is Set int flags int mask return flags mask 0  isSet
public void read From int flags Data Input input throws IO Exception The flags for this info are read by the visitor flattener See Workspace read Element This allows the reader to look ahead and see what type of info is being loaded this flags flags local Info input read Long node Id input read Long content Id input read Int modification Stamp input read Long  readFrom DataInput IOException readElement localInfo readLong nodeId readLong contentId readInt modificationStamp readLong
Sets all of the bits indicated by the mask public void set int mask flags mask 
Sets the value of the indicated bits to be the given value protected void set Bits int mask int start int value int base Mask mask start int new Value value base Mask start thread safety guarantee atomicity int temp flags temp mask temp new Value flags temp  setBits baseMask newValue baseMask newValue
Sets the flags for this info protected void set Flags int value flags value  setFlags
Sets the local relative sync information public void set Local Sync Info long info local Info info  setLocalSyncInfo localInfo
Sets the collection of makers for this resource code null code is passed in if there are no markers public void set Markers Marker Set value markers value  setMarkers MarkerSet
public void set Modification Stamp long stamp modification Stamp stamp  setModificationStamp modificationStamp
public void set Node Id long id node Id id  setNodeId nodeId
Sets the property store associated with this info The value may be null public void set Property Store Property Store value needs to be implemented on subclasses  setPropertyStore PropertyStore
Sets the identified session property to the given value If the value is null the property is removed public synchronized void set Session Property Qualified Name name Object value thread safety Concurrency001 if value null if session Properties null return Object Map temp Object Map session Properties clone temp remove name if temp is Empty session Properties null else session Properties temp else Object Map temp session Properties if temp null temp new Object Map 5 else temp Object Map session Properties clone temp put name value session Properties temp  setSessionProperty QualifiedName sessionProperties ObjectMap ObjectMap sessionProperties isEmpty sessionProperties sessionProperties ObjectMap sessionProperties ObjectMap ObjectMap sessionProperties sessionProperties
The parameter to this method is the implementing class rather than the interface so we ensure that we get it right since we are making certain assumptions about the object type w r t casting protected void set Sync Info Object Map sync Info this sync Info sync Info  setSyncInfo ObjectMap syncInfo syncInfo syncInfo
public synchronized void set Sync Info Qualified Name id byte value if value null delete sync info if sync Info null return sync Info remove id if sync Info is Empty sync Info null else add sync info if sync Info null sync Info new Object Map 5 sync Info put id value clone  setSyncInfo QualifiedName syncInfo syncInfo syncInfo isEmpty syncInfo syncInfo syncInfo ObjectMap syncInfo
Sets the type for this info to the given value Valid values are FILE FOLDER PROJECT public void set Type int value set Bits M TYPE M TYPE START value  setType setBits M_TYPE M_TYPE_START
public void write To Data Output output throws IO Exception The flags for this info are written by the visitor flattener See Save Manager write Element This allows the reader to look ahead and see what type of info is being loaded output write Long local Info output write Long node Id output write Int content Id output write Long modification Stamp  writeTo DataOutput IOException SaveManager writeElement writeLong localInfo writeLong nodeId writeInt contentId writeLong modificationStamp

see org eclipse core resources I Resource Proxy get Modification Stamp public long get Modification Stamp return info get Modification Stamp  IResourceProxy getModificationStamp getModificationStamp getModificationStamp
public String get Name return requestor request Name  getName requestName
public Object get Session Property Qualified Name key return info get Session Property key  getSessionProperty QualifiedName getSessionProperty
public int get Type return info get Type  getType getType
see org eclipse core resources I Resource Proxy is Accessible public boolean is Accessible int flags info get Flags if info get Type I Resource PROJECT return flags NULL FLAG Resource Info is Set flags M OPEN return flags NULL FLAG  IResourceProxy isAccessible isAccessible getFlags getType IResource NULL_FLAG ResourceInfo isSet M_OPEN NULL_FLAG
see org eclipse core resources I Resource Proxy is Derived public boolean is Derived int flags info get Flags return flags NULL FLAG Resource Info is Set flags M DERIVED  IResourceProxy isDerived isDerived getFlags NULL_FLAG ResourceInfo isSet M_DERIVED
see org eclipse core resources I Resource Proxy is Linked public boolean is Linked int flags info get Flags return flags NULL FLAG Resource Info is Set flags M LINK  IResourceProxy isLinked isLinked getFlags NULL_FLAG ResourceInfo isSet M_LINK
see org eclipse core resources I Resource Proxy is Phantom public boolean is Phantom int flags info get Flags return flags NULL FLAG Resource Info is Set flags M PHANTOM  IResourceProxy isPhantom isPhantom getFlags NULL_FLAG ResourceInfo isSet M_PHANTOM
see org eclipse core resources I Resource Proxy is Team Private Member public boolean is Team Private Member int flags info get Flags return flags NULL FLAG Resource Info is Set flags M TEAM PRIVATE MEMBER  IResourceProxy isTeamPrivateMember isTeamPrivateMember getFlags NULL_FLAG ResourceInfo isSet M_TEAM_PRIVATE_MEMBER
see org eclipse core resources I Resource Proxy request Full Path public I Path request Full Path if full Path null full Path requestor request Path return full Path  IResourceProxy requestFullPath IPath requestFullPath fullPath fullPath requestPath fullPath
see org eclipse core resources I Resource Proxy request Resource public I Resource request Resource if resource null resource workspace new Resource request Full Path info get Type return resource  IResourceProxy requestResource IResource requestResource newResource requestFullPath getType
protected void reset full Path null resource null  fullPath

I Path path public Resource Status int type int code I Path path String message Throwable exception super type Resources Plugin PI RESOURCES code message exception this path path  IPath ResourceStatus IPath ResourcesPlugin PI_RESOURCES
public Resource Status int code String message this get Severity code code null message null  ResourceStatus getSeverity
public Resource Status int code I Path path String message this get Severity code code path message null  ResourceStatus IPath getSeverity
public Resource Status int code I Path path String message Throwable exception this get Severity code code path message exception  ResourceStatus IPath getSeverity
see I Resource Status get Path public I Path get Path return path  IResourceStatus getPath IPath getPath
protected static int get Severity int code return code 0 0 1 code 100 33  getSeverity
for debug only private String get Type Name switch get Severity case I Status OK return OK NON NLS 1 case I Status ERROR return ERROR NON NLS 1 case I Status INFO return INFO NON NLS 1 case I Status WARNING return WARNING NON NLS 1 default return String value Of get Severity  getTypeName getSeverity IStatus IStatus IStatus IStatus valueOf getSeverity
for debug only public String to String String Buffer sb new String Buffer sb append type NON NLS 1 sb append get Type Name sb append path NON NLS 1 sb append get Path sb append message NON NLS 1 sb append get Message sb append plugin NON NLS 1 sb append get Plugin sb append exception NON NLS 1 sb append get Exception sb append n NON NLS 1 return sb to String  toString StringBuffer StringBuffer getTypeName getPath getMessage getPlugin getException toString

Constructor for this class public Resource Tree I Lock lock Multi Status status int update Flags super this lock lock this multistatus status this update Flags update Flags  ResourceTree ILock MultiStatus updateFlags updateFlags updateFlags
The specific operation for which this tree was created has completed and this tree should not be used anymore Ensure that this is the case by making it invalid This is checked by all API methods void make Invalid this is Valid false  makeInvalid isValid
see I Resource Tree add To Local History I File public void add To Local History I File file Assert is Legal is Valid try lock acquire if file exists return I Path path file get Location if path null path to File exists return long last Modified internal Compute Timestamp path toOS String Resource file get Local Manager get History Store add State file get Full Path path last Modified false finally lock release  IResourceTree addToLocalHistory IFile addToLocalHistory IFile isLegal isValid IPath getLocation toFile lastModified internalComputeTimestamp toOSString getLocalManager getHistoryStore addState getFullPath lastModified
Copies the local history of source to destination Note that if source is an I Folder it is assumed that the same structure exists under destination and the local history of any I File under source will be copied to the associated I File under destination private void copy Local History I Resource source I Resource destination Resource destination get Local Manager get History Store copy History source get Full Path destination get Full Path  IFolder IFile IFile copyLocalHistory IResource IResource getLocalManager getHistoryStore copyHistory getFullPath getFullPath
see I Resource Tree moved File I File I File public void moved File I File source I File destination Assert is Legal is Valid try lock acquire Do nothing if the resource doesn t exist if source exists return If the destination already exists then we have a problem if destination exists String message Policy bind resources must Not Exist destination get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR destination get Full Path message log the status but don t return until we try and move the rest of the resource information failed status Move the resource s persistent properties Property Manager property Manager Resource source get Property Manager try property Manager copy source destination I Resource DEPTH ZERO property Manager delete Properties source I Resource DEPTH ZERO catch Core Exception e String message Policy bind resources error Properties Move source get Full Path to String destination get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR source get Full Path message e log the status but don t return until we try and move the rest of the resource information failed status Move the node in the workspace tree Workspace workspace Workspace source get Workspace try workspace move Resource source destination get Full Path I Resource DEPTH ZERO update Flags false catch Core Exception e String message Policy bind resources error Moving source get Full Path to String destination get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR source get Full Path message e log the status but don t return until we try and move the rest of the resource information failed status Generate the marker deltas try workspace get Marker Manager moved source destination I Resource DEPTH ZERO catch Core Exception e String message Policy bind resources error Markers Delete source get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR source get Full Path message e failed status Copy the local history information copy Local History source destination finally lock release  IResourceTree movedFile IFile IFile movedFile IFile IFile isLegal isValid mustNotExist getFullPath toString IStatus ResourceStatus IStatus getFullPath PropertyManager propertyManager getPropertyManager propertyManager IResource DEPTH_ZERO propertyManager deleteProperties IResource DEPTH_ZERO CoreException errorPropertiesMove getFullPath toString getFullPath toString IStatus ResourceStatus IStatus getFullPath getWorkspace getFullPath IResource DEPTH_ZERO updateFlags CoreException errorMoving getFullPath toString getFullPath toString IStatus ResourceStatus IStatus getFullPath getMarkerManager IResource DEPTH_ZERO CoreException errorMarkersDelete getFullPath toString IStatus ResourceStatus IStatus getFullPath copyLocalHistory
see I Resource Tree moved Folder Subtree I Folder I Folder public void moved Folder Subtree I Folder source I Folder destination Assert is Legal is Valid try lock acquire Do nothing if the source resource doesn t exist if source exists return If the destination already exists then we have an error if destination exists String message Policy bind resources must Not Exist destination get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR destination get Full Path message failed status return Move the folder properties int depth I Resource DEPTH INFINITE Property Manager property Manager Resource source get Property Manager try property Manager copy source destination depth property Manager delete Properties source depth catch Core Exception e String message Policy bind resources error Properties Move source get Full Path to String destination get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR source get Full Path message e log the status but don t return until we try and move the rest of the resource info failed status Create the destination node in the tree Workspace workspace Workspace source get Workspace try workspace move Resource source destination get Full Path depth update Flags false catch Core Exception e String message Policy bind resources error Moving source get Full Path to String destination get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR source get Full Path message e log the status but don t return until we try and move the rest of the resource info failed status Generate the marker deltas try workspace get Marker Manager moved source destination depth catch Core Exception e String message Policy bind resources error Markers Delete source get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR source get Full Path message e failed status Copy the local history for this folder copy Local History source destination finally lock release  IResourceTree movedFolderSubtree IFolder IFolder movedFolderSubtree IFolder IFolder isLegal isValid mustNotExist getFullPath toString IStatus ResourceStatus IStatus getFullPath IResource DEPTH_INFINITE PropertyManager propertyManager getPropertyManager propertyManager propertyManager deleteProperties CoreException errorPropertiesMove getFullPath toString getFullPath toString IStatus ResourceStatus IStatus getFullPath getWorkspace getFullPath updateFlags CoreException errorMoving getFullPath toString getFullPath toString IStatus ResourceStatus IStatus getFullPath getMarkerManager CoreException errorMarkersDelete getFullPath toString IStatus ResourceStatus IStatus getFullPath copyLocalHistory
see I Resource Tree moved Project Subtree I Project I Project Description public boolean moved Project Subtree I Project project I Project Description dest Description Assert is Legal is Valid try lock acquire Do nothing if the source resource doesn t exist if project exists return true Project source Project project Project destination Project source get Workspace get Root get Project dest Description get Name Workspace workspace Workspace source get Workspace int depth I Resource DEPTH INFINITE If the name of the source and destination projects are not the same then rename the meta area and make changes in the tree if is Name Change source dest Description if destination exists String message Policy bind resources must Not Exist destination get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR destination get Full Path message failed status return false Rename the project metadata area Close the property store to flush everything to disk try source get Property Manager close Property Store source catch Core Exception e String message Policy bind properties could Not Close source get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR source get Full Path message e log the status but don t return until we try and move the rest of the resource info failed status java io File old Meta Area workspace get Meta Area location For source to File java io File new Meta Area workspace get Meta Area location For destination to File try source get Local Manager get Store move old Meta Area new Meta Area false new Null Progress Monitor catch Core Exception e String message Policy bind resources move Meta old Meta Area to String new Meta Area to String NON NLS 1 I Status status new Resource Status I Resource Status FAILED WRITE METADATA destination get Full Path message e log the status but don t return until we try and move the rest of the resource info failed status Move the workspace tree try workspace move source destination get Full Path depth update Flags true catch Core Exception e String message Policy bind resources error Moving source get Full Path to String destination get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR source get Full Path message e log the status but don t return until we try and move the rest of the resource info failed status Clear stale state on the destination project Project Info info Project Info destination get Resource Info false true info clear Natures info set Builders null note that the property store instance will be recreated lazily info set Property Store null Generate marker deltas try workspace get Marker Manager moved source destination depth catch Core Exception e String message Policy bind resources error Markers Move source get Full Path to String destination get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR source get Full Path message e log the status but don t return until we try and move the rest of the resource info failed status Copy the local history copy Local History source destination Write the new project description on the destination project try moving linked resources may have modified the description in memory Project Description dest Description set Link Descriptions destination internal Get Description get Links destination internal Set Description dest Description true destination write Description I Resource FORCE catch Core Exception e String message Policy bind resources project Desc NON NLS 1 I Status status new Resource Status I Status ERROR destination get Full Path message e failed status write the private project description including the project location try workspace get Meta Area write Private Description destination catch Core Exception e failed e get Status Do a refresh on the destination project to pick up any newly discovered resources try destination refresh Local I Resource DEPTH INFINITE new Null Progress Monitor catch Core Exception e String message Policy bind resources error Refresh destination get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR destination get Full Path message e failed status return false return true finally lock release  IResourceTree movedProjectSubtree IProject IProjectDescription movedProjectSubtree IProject IProjectDescription destDescription isLegal isValid getWorkspace getRoot getProject destDescription getName getWorkspace IResource DEPTH_INFINITE isNameChange destDescription mustNotExist getFullPath toString IStatus ResourceStatus IStatus getFullPath getPropertyManager closePropertyStore CoreException couldNotClose getFullPath toString IStatus ResourceStatus IStatus getFullPath oldMetaArea getMetaArea locationFor toFile newMetaArea getMetaArea locationFor toFile getLocalManager getStore oldMetaArea newMetaArea NullProgressMonitor CoreException moveMeta oldMetaArea toString newMetaArea toString IStatus ResourceStatus IResourceStatus FAILED_WRITE_METADATA getFullPath getFullPath updateFlags CoreException errorMoving getFullPath toString getFullPath toString IStatus ResourceStatus IStatus getFullPath ProjectInfo ProjectInfo getResourceInfo clearNatures setBuilders setPropertyStore getMarkerManager CoreException errorMarkersMove getFullPath toString getFullPath toString IStatus ResourceStatus IStatus getFullPath copyLocalHistory ProjectDescription destDescription setLinkDescriptions internalGetDescription getLinks internalSetDescription destDescription writeDescription IResource CoreException projectDesc IStatus ResourceStatus IStatus getFullPath getMetaArea writePrivateDescription CoreException getStatus refreshLocal IResource DEPTH_INFINITE NullProgressMonitor CoreException errorRefresh getFullPath toString IStatus ResourceStatus IStatus getFullPath
Returns the status object held onto by this resource tree protected I Status get Status return multistatus  IStatus getStatus
see I Resource Tree get Timestamp I File public long get Timestamp I File file Assert is Legal is Valid try lock acquire if file exists return NULL TIMESTAMP Resource Info info File file get Resource Info false false return info null NULL TIMESTAMP info get Local Sync Info finally lock release  IResourceTree getTimestamp IFile getTimestamp IFile isLegal isValid NULL_TIMESTAMP ResourceInfo getResourceInfo NULL_TIMESTAMP getLocalSyncInfo
see I Resource Tree deleted File I File public void deleted File I File file Assert is Legal is Valid try lock acquire Do nothing if the resource doesn t exist if file exists return try Delete properties generate marker deltas and remove the node from the workspace tree Resource file delete Resource true null catch Core Exception e String message Policy bind resources error Deleting file get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR file get Full Path message e failed status finally lock release  IResourceTree deletedFile IFile deletedFile IFile isLegal isValid deleteResource CoreException errorDeleting getFullPath toString IStatus ResourceStatus IStatus getFullPath
see I Resource Tree deleted Folder I Folder public void deleted Folder I Folder folder Assert is Legal is Valid try lock acquire Do nothing if the resource doesn t exist if folder exists return try Delete properties generate marker deltas and remove the node from the workspace tree Resource folder delete Resource true null catch Core Exception e String message Policy bind resources error Deleting folder get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR folder get Full Path message e failed status finally lock release  IResourceTree deletedFolder IFolder deletedFolder IFolder isLegal isValid deleteResource CoreException errorDeleting getFullPath toString IStatus ResourceStatus IStatus getFullPath
see I Resource Tree deleted Project I Project public void deleted Project I Project target Assert is Legal is Valid try lock acquire Do nothing if the resource doesn t exist if target exists return Project project Project target Workspace workspace Workspace project get Workspace Delete properties generate marker deltas and remove the node from the workspace tree try project delete Resource false null catch Core Exception e String message Policy bind resources error Deleting project get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR project get Full Path message e log the status but don t return until we try and delete the rest of the project info failed status Delete the project metadata try workspace get Meta Area delete project catch Core Exception e String message Policy bind resources delete Meta project get Full Path to String NON NLS 1 I Status status new Resource Status I Resource Status FAILED DELETE METADATA project get Full Path message e log the status but don t return until we try and delete the rest of the project info failed status Clear the history store try project clear History null catch Core Exception e String message Policy bind history problems Removing project get Full Path to String NON NLS 1 I Status status new Resource Status I Resource Status FAILED DELETE LOCAL project get Full Path message e failed status finally lock release  IResourceTree deletedProject IProject deletedProject IProject isLegal isValid getWorkspace deleteResource CoreException errorDeleting getFullPath toString IStatus ResourceStatus IStatus getFullPath getMetaArea CoreException deleteMeta getFullPath toString IStatus ResourceStatus IResourceStatus FAILED_DELETE_METADATA getFullPath clearHistory CoreException problemsRemoving getFullPath toString IStatus ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getFullPath
This operation has failed for the given reason Add it to this resource tree s status public void failed I Status reason Assert is Legal is Valid multistatus add reason  IStatus isLegal isValid
Return code true code if there is a change in the name of the project private boolean is Name Change I Project project I Project Description description return project get Name equals description get Name  isNameChange IProject IProjectDescription getName getName
Return code true code if there is a change in the content area for the project private boolean is Content Change I Project project I Project Description destination Description I Project Description source Description Project project internal Get Description if source Description get Location null destination Description get Location null return true return source Description get Location equals destination Description get Location  isContentChange IProject IProjectDescription destinationDescription IProjectDescription sourceDescription internalGetDescription sourceDescription getLocation destinationDescription getLocation sourceDescription getLocation destinationDescription getLocation
see I Resource Tree is Synchronized I Resource int public boolean is Synchronized I Resource resource int depth try lock acquire return Resource resource get Local Manager is Synchronized resource depth finally lock release  IResourceTree isSynchronized IResource isSynchronized IResource getLocalManager isSynchronized
see I Resource Tree compute Timestamp I File public long compute Timestamp I File file Assert is Legal is Valid try lock acquire if file get Project exists return NULL TIMESTAMP return internal Compute Timestamp file get Location toOS String finally lock release  IResourceTree computeTimestamp IFile computeTimestamp IFile isLegal isValid getProject NULL_TIMESTAMP internalComputeTimestamp getLocation toOSString
Return the timestamp of the file at the given location protected long internal Compute Timestamp String location return Core File System Library get Last Modified location  internalComputeTimestamp CoreFileSystemLibrary getLastModified
see I Resource Tree standard Delete File I File int I Progress Monitor public void standard Delete File I File file int update Flags I Progress Monitor monitor Assert is Legal is Valid try lock acquire internal Delete File file update Flags monitor finally lock release  IResourceTree standardDeleteFile IFile IProgressMonitor standardDeleteFile IFile updateFlags IProgressMonitor isLegal isValid internalDeleteFile updateFlags
Helper method for standard Delete File Returns a boolean indicating whether or not the delete was successful private boolean internal Delete File I File file int update Flags I Progress Monitor monitor try String message Policy bind resources deleting file get Full Path to String NON NLS 1 monitor begin Task message Policy total Work Do nothing if the file doesn t exist in the workspace if file exists Indicate that the delete was successful return true Don t delete contents if this is a linked resource if file is Linked deleted File file return true If the file doesn t exist on disk then signal to the workspace to delete the file and return java io File file On Disk file get Location to File if file On Disk exists deleted File file Indicate that the delete was successful return true boolean keep History update Flags I Resource KEEP HISTORY 0 boolean force update Flags I Resource FORCE 0 Add the file to the local history if requested by the user if keep History add To Local History file monitor worked Policy total Work 4 We want to fail if force is false and the file is not synchronized with the local file system if force boolean in Sync is Synchronized file I Resource DEPTH ZERO only want to fail if the file still exists if in Sync file get Location to File exists message Policy bind localstore resource Is Out Of Sync file get Full Path to String NON NLS 1 I Status status new Resource Status I Resource Status OUT OF SYNC LOCAL file get Full Path message failed status Indicate that the delete was unsuccessful return false monitor worked Policy total Work 4 Try to delete the file from the file system boolean success file On Disk delete monitor worked Policy total Work 4 If the file was successfully deleted from the file system the workspace tree should be updated accordingly Otherwise we need to signal that a problem occurred if success deleted File file Indicate that the delete was successful return true message Policy bind resources couldnot Delete file get Location toOS String NON NLS 1 I Status status new Resource Status I Resource Status FAILED DELETE LOCAL file get Full Path message failed status Indicate that the delete was unsuccessful return false finally monitor done  standardDeleteFile internalDeleteFile IFile updateFlags IProgressMonitor getFullPath toString beginTask totalWork isLinked deletedFile fileOnDisk getLocation toFile fileOnDisk deletedFile keepHistory updateFlags IResource KEEP_HISTORY updateFlags IResource keepHistory addToLocalHistory totalWork inSync isSynchronized IResource DEPTH_ZERO inSync getLocation toFile resourceIsOutOfSync getFullPath toString IStatus ResourceStatus IResourceStatus OUT_OF_SYNC_LOCAL getFullPath totalWork fileOnDisk totalWork deletedFile couldnotDelete getLocation toOSString IStatus ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getFullPath
see I Resource Tree standard Delete Folder I Folder int I Progress Monitor public void standard Delete Folder I Folder folder int update Flags I Progress Monitor monitor Assert is Legal is Valid try lock acquire String message Policy bind resources deleting folder get Full Path to String NON NLS 1 monitor begin Task message Policy total Work Do nothing if the folder doesn t exist in the workspace if folder exists return Don t delete contents if this is a linked resource if folder is Linked deleted Folder folder return If the folder doesn t exist on disk then update the tree and return java io File folder On Disk folder get Location to File if folder On Disk exists deleted Folder folder return Check to see if we are synchronized with the local file system If we are in sync then we can short circuit this operation and delete all the files on disk otherwise we have to recursively try and delete them doing best effort thus leaving only the ones which were out of sync boolean force update Flags I Resource FORCE 0 if force is Synchronized folder I Resource DEPTH INFINITE we are not in sync and force is false so delete via best effort internal Delete Folder folder update Flags monitor return Add the contents of the files to the local history if so requested by the user boolean keep History update Flags I Resource KEEP HISTORY 0 if keep History add To Local History folder I Resource DEPTH INFINITE boolean success try File System Resource Manager local Manager Folder folder get Local Manager local Manager delete folder force true false monitor java io File folder Location folder get Location to File success Workspace clear folder Location catch Core Exception ce message Policy bind localstore couldnot Delete folder get Full Path to String NON NLS 1 Multi Status status new Multi Status Resources Plugin PI RESOURCES I Resource Status FAILED DELETE LOCAL message ce if ce get Status null status merge ce get Status failed status return If the folder was successfully deleted from the file system the workspace tree should be updated accordingly Otherwise we need to signal that a problem occurred if success deleted Folder folder else message Policy bind resources couldnot Delete folder get Location toOS String NON NLS 1 I Status status new Resource Status I Resource Status FAILED DELETE LOCAL folder get Full Path message failed status finally lock release monitor done  IResourceTree standardDeleteFolder IFolder IProgressMonitor standardDeleteFolder IFolder updateFlags IProgressMonitor isLegal isValid getFullPath toString beginTask totalWork isLinked deletedFolder folderOnDisk getLocation toFile folderOnDisk deletedFolder updateFlags IResource isSynchronized IResource DEPTH_INFINITE internalDeleteFolder updateFlags keepHistory updateFlags IResource KEEP_HISTORY keepHistory addToLocalHistory IResource DEPTH_INFINITE FileSystemResourceManager localManager getLocalManager localManager folderLocation getLocation toFile folderLocation CoreException couldnotDelete getFullPath toString MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus FAILED_DELETE_LOCAL getStatus getStatus deletedFolder couldnotDelete getLocation toOSString IStatus ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getFullPath
I Resource Visitor visitor new I Resource Visitor public boolean visit I Resource resource if resource get Type I Resource FILE add To Local History I File resource return true  IResourceVisitor IResourceVisitor IResource getType IResource addToLocalHistory IFile
Add this resource and all child files to the local history Only adds content for resources of type code I Resource FILE code private void add To Local History I Resource root int depth I Resource Visitor visitor new I Resource Visitor public boolean visit I Resource resource if resource get Type I Resource FILE add To Local History I File resource return true try root accept visitor depth false catch Core Exception e We want to ignore any exceptions thrown by the history store because they aren t enough to fail the operation as a whole  IResource addToLocalHistory IResource IResourceVisitor IResourceVisitor IResource getType IResource addToLocalHistory IFile CoreException
Helper method for standard Delete Folder Returns a boolean indicating whether or not the deletion of this folder was successful Does a best effort delete of this resource and its children private boolean internal Delete Folder I Folder folder int update Flags I Progress Monitor monitor Recursively delete each member of the folder I Resource members null try members folder members I Container INCLUDE TEAM PRIVATE MEMBERS catch Core Exception e String message Policy bind resources error Members folder get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR folder get Full Path message e failed status Indicate that the delete was unsuccessful return false boolean deleted Children true for int i 0 i members length i I Resource child members i switch child get Type case I Resource FILE deleted Children internal Delete File I File child update Flags Policy sub Monitor For monitor Policy total Work members length break case I Resource FOLDER deleted Children internal Delete Folder I Folder child update Flags Policy sub Monitor For monitor Policy total Work members length break Check to see if the children were deleted ok If there was a problem just return as the problem should have been logged by the recursive call to the child if deleted Children Indicate that the delete was unsuccessful return false Try to delete the folder from the local file system This will fail if the folder is not empty No need to check the force flag since this is an internal method and force is always false when we are here java io File folder On Disk folder get Location to File boolean success folder On Disk delete if success folder On Disk exists Indicate that the delete was successful success true if success deleted Folder folder Indicate that the delete was successful return true String message Policy bind resources couldnot Delete folder get Location toOS String NON NLS 1 I Status status new Resource Status I Resource Status FAILED DELETE LOCAL folder get Full Path message failed status Indicate that the delete was unsuccessful return false  standardDeleteFolder internalDeleteFolder IFolder updateFlags IProgressMonitor IResource IContainer INCLUDE_TEAM_PRIVATE_MEMBERS CoreException errorMembers getFullPath toString IStatus ResourceStatus IStatus getFullPath deletedChildren IResource getType IResource deletedChildren internalDeleteFile IFile updateFlags subMonitorFor totalWork IResource deletedChildren internalDeleteFolder IFolder updateFlags subMonitorFor totalWork deletedChildren folderOnDisk getLocation toFile folderOnDisk folderOnDisk deletedFolder couldnotDelete getLocation toOSString IStatus ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getFullPath
see I Resource Tree standard Delete Project I Project int I Progress Monitor public void standard Delete Project I Project project int update Flags I Progress Monitor monitor Assert is Legal is Valid try lock acquire String message Policy bind resources deleting project get Full Path to String NON NLS 1 monitor begin Task message Policy total Work Do nothing if the project doesn t exist in the workspace tree if project exists return boolean always Delete Content update Flags I Resource ALWAYS DELETE PROJECT CONTENT 0 don t take force into account if we are always deleting the content boolean force always Delete Content true update Flags I Resource FORCE 0 boolean never Delete Content update Flags I Resource NEVER DELETE PROJECT CONTENT 0 boolean success true Delete project content Don t do anything if the user specified explicitly asked not to delete the project content or if the project is closed and ALWAYS DELETE PROJECT CONTENT was not specified if always Delete Content project is Open never Delete Content Check to see if we are synchronized with the local file system If we are in sync then we can short circuit this operation and delete all the files on disk otherwise we have to recursively try and delete them doing best effort thus leaving only the ones which were out of sync if force is Synchronized project I Resource DEPTH INFINITE we are not in sync and force is false so delete via best effort success internal Delete Project project update Flags monitor if success deleted Project project else message Policy bind resources couldnot Delete project get Location toOS String NON NLS 1 I Status status new Resource Status I Resource Status FAILED DELETE LOCAL project get Full Path message failed status return If the content area is in the default location then delete the directory and all its children If it is specified by the user then leave the directory itself but delete the children I Project Description description Project project internal Get Description boolean default Location description null description get Location null java io File project Location project get Location to File if the project is open we must perform a best effort deletion if project is Open try File System Resource Manager local Manager Project project get Local Manager local Manager delete project force false false Policy sub Monitor For monitor Policy total Work 3 4 if the project location is not the default we want to keep the root directory it is empty now if default Location success Workspace clear project Location catch Core Exception ce message Policy bind localstore couldnot Delete project get Full Path to String NON NLS 1 Multi Status status new Multi Status Resources Plugin PI RESOURCES I Resource Status FAILED DELETE LOCAL message ce if ce get Status null status merge ce get Status failed status return else success default Location Workspace clear project Location Workspace clear Children project Location monitor worked Policy total Work 3 4 Signal that the workspace tree should be updated that the project has been deleted if success deleted Project project else message Policy bind localstore couldnot Delete project get Full Path to String NON NLS 1 I Status status new Resource Status I Resource Status FAILED DELETE LOCAL project get Full Path message failed status finally lock release monitor done  IResourceTree standardDeleteProject IProject IProgressMonitor standardDeleteProject IProject updateFlags IProgressMonitor isLegal isValid getFullPath toString beginTask totalWork alwaysDeleteContent updateFlags IResource ALWAYS_DELETE_PROJECT_CONTENT alwaysDeleteContent updateFlags IResource neverDeleteContent updateFlags IResource NEVER_DELETE_PROJECT_CONTENT ALWAYS_DELETE_PROJECT_CONTENT alwaysDeleteContent isOpen neverDeleteContent isSynchronized IResource DEPTH_INFINITE internalDeleteProject updateFlags deletedProject couldnotDelete getLocation toOSString IStatus ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getFullPath IProjectDescription internalGetDescription defaultLocation getLocation projectLocation getLocation toFile isOpen FileSystemResourceManager localManager getLocalManager localManager subMonitorFor totalWork defaultLocation projectLocation CoreException couldnotDelete getFullPath toString MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus FAILED_DELETE_LOCAL getStatus getStatus defaultLocation projectLocation clearChildren projectLocation totalWork deletedProject couldnotDelete getFullPath toString IStatus ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getFullPath
Helper method for moving the project content Determines the content location based on the project description default location or user defined private void move Project Content I Project source I Project Description dest Description int update Flags I Progress Monitor monitor throws Core Exception try String message Policy bind resources moving source get Full Path to String NON NLS 1 monitor begin Task message 10 I Project Description src Description source get Description If the locations are the same and non default then there is nothing to do if src Description get Location null src Description get Location equals dest Description return I Path src Location source get Location I Path dest Location dest Description get Location Use the default area if necessary for the destination The source project should already have a location assigned to it if dest Location null dest Location Platform get Location append dest Description get Name java io File destination File dest Location to File Move the contents on disk try move In File System src Location to File destination File update Flags monitor catch Core Exception ce did the fail occur after copying to the destination boolean failed Deleting Source ce instanceof Resource Exception ce get Status get Code I Resource Status FAILED DELETE LOCAL destination File exists if not then rethrow the exception to abort the move operation if failed Deleting Source throw ce if so we should log the failure and proceed with moving the tree failed ce get Status monitor worked 9 if this is a deep move move the contents of any linked resources if update Flags I Resource SHALLOW 0 I Resource children source members for int i 0 i children length i if children i is Linked message Policy bind resources moving children i get Full Path to String NON NLS 1 monitor sub Task message java io File source File children i get Location to File java io File dest File dest Location append children i get Name to File try move In File System source File dest File update Flags Policy monitor For null catch Core Exception ce log the failure but keep trying on remaining links failed ce get Status monitor worked 1 finally monitor done  moveProjectContent IProject IProjectDescription destDescription updateFlags IProgressMonitor CoreException getFullPath toString beginTask IProjectDescription srcDescription getDescription srcDescription getLocation srcDescription getLocation destDescription IPath srcLocation getLocation IPath destLocation destDescription getLocation destLocation destLocation getLocation destDescription getName destinationFile destLocation toFile moveInFileSystem srcLocation toFile destinationFile updateFlags CoreException failedDeletingSource ResourceException getStatus getCode IResourceStatus FAILED_DELETE_LOCAL destinationFile failedDeletingSource getStatus updateFlags IResource IResource isLinked getFullPath toString subTask sourceFile getLocation toFile destFile destLocation getName toFile moveInFileSystem sourceFile destFile updateFlags monitorFor CoreException getStatus
see I Resource Tree standard Move File I File I File int I Progress Monitor public void standard Move File I File source I File destination int update Flags I Progress Monitor monitor Assert is Legal is Valid try lock acquire String message Policy bind resources moving source get Full Path to String NON NLS 1 monitor sub Task message These pre conditions should all be ok but just in case if source exists destination exists destination get Parent is Accessible throw new Illegal Argument Exception boolean force update Flags I Resource FORCE 0 boolean keep History update Flags I Resource KEEP HISTORY 0 boolean is Deep update Flags I Resource SHALLOW 0 If the file is not in sync with the local file system and force is false then signal that we have an error if force is Synchronized source I Resource DEPTH INFINITE message Policy bind localstore resource Is Out Of Sync source get Full Path to String NON NLS 1 I Status status new Resource Status I Resource Status OUT OF SYNC LOCAL source get Full Path message failed status return monitor worked Policy total Work 4 Add the file contents to the local history if requested by the user if keep History add To Local History source monitor worked Policy total Work 4 for shallow move of linked resources nothing needs to be moved in the file system if is Deep source is Linked moved File source destination return java io File source File source get Location to File java io File dest File destination get Location to File If the file was successfully moved in the file system then the workspace tree needs to be updated accordingly Otherwise signal that we have an error try move In File System source File dest File update Flags monitor catch Core Exception e failed e get Status did the fail occur after copying to the destination boolean failed Deleting Source e instanceof Resource Exception e get Status get Code I Resource Status FAILED DELETE LOCAL dest File exists if so we should proceed if failed Deleting Source return moved File source destination update Moved File Timestamp destination compute Timestamp destination monitor worked Policy total Work 4 return finally lock release monitor done  IResourceTree standardMoveFile IFile IFile IProgressMonitor standardMoveFile IFile IFile updateFlags IProgressMonitor isLegal isValid getFullPath toString subTask getParent isAccessible IllegalArgumentException updateFlags IResource keepHistory updateFlags IResource KEEP_HISTORY isDeep updateFlags IResource isSynchronized IResource DEPTH_INFINITE resourceIsOutOfSync getFullPath toString IStatus ResourceStatus IResourceStatus OUT_OF_SYNC_LOCAL getFullPath totalWork keepHistory addToLocalHistory totalWork isDeep isLinked movedFile sourceFile getLocation toFile destFile getLocation toFile moveInFileSystem sourceFile destFile updateFlags CoreException getStatus failedDeletingSource ResourceException getStatus getCode IResourceStatus FAILED_DELETE_LOCAL destFile failedDeletingSource movedFile updateMovedFileTimestamp computeTimestamp totalWork
see I Resource Tree standard Move Folder I Folder I Folder int I Progress Monitor public void standard Move Folder I Folder source I Folder destination int update Flags I Progress Monitor monitor Assert is Legal is Valid try lock acquire String message Policy bind resources moving source get Full Path to String NON NLS 1 monitor sub Task message These pre conditions should all be ok but just in case if source exists destination exists destination get Parent is Accessible throw new Illegal Argument Exception Check to see if we are synchronized with the local file system If we are in sync then we can short circuit this method and do a file system only move Otherwise we have to recursively try and move all resources doing it in a best effort manner boolean force update Flags I Resource FORCE 0 if force is Synchronized source I Resource DEPTH INFINITE message Policy bind localstore resource Is Out Of Sync source get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR source get Full Path message failed status return keep history boolean keep History update Flags I Resource KEEP HISTORY 0 if keep History add To Local History source I Resource DEPTH INFINITE for linked resources nothing needs to be moved in the file system boolean is Deep update Flags I Resource SHALLOW 0 if is Deep source is Linked moved Folder Subtree source destination return Move the resources in the file system Only the FORCE flag is valid here so don t have to worry about clearing the KEEP HISTORY flag java io File source File source get Location to File java io File destination File destination get Location to File try move In File System source File destination File update Flags monitor catch Core Exception e failed e get Status did the fail occur after copying to the destination boolean failed Deleting Source e instanceof Resource Exception e get Status get Code I Resource Status FAILED DELETE LOCAL destination File exists if so we should proceed if failed Deleting Source return boolean success destination File exists if success moved Folder Subtree source destination update Timestamps destination is Deep else message Policy bind localstore could Not Create Folder destination get Location toOS String NON NLS 1 I Status status new Resource Status I Resource Status FAILED WRITE LOCAL destination get Full Path message failed status finally lock release monitor done  IResourceTree standardMoveFolder IFolder IFolder IProgressMonitor standardMoveFolder IFolder IFolder updateFlags IProgressMonitor isLegal isValid getFullPath toString subTask getParent isAccessible IllegalArgumentException updateFlags IResource isSynchronized IResource DEPTH_INFINITE resourceIsOutOfSync getFullPath toString IStatus ResourceStatus IStatus getFullPath keepHistory updateFlags IResource KEEP_HISTORY keepHistory addToLocalHistory IResource DEPTH_INFINITE isDeep updateFlags IResource isDeep isLinked movedFolderSubtree KEEP_HISTORY sourceFile getLocation toFile destinationFile getLocation toFile moveInFileSystem sourceFile destinationFile updateFlags CoreException getStatus failedDeletingSource ResourceException getStatus getCode IResourceStatus FAILED_DELETE_LOCAL destinationFile failedDeletingSource destinationFile movedFolderSubtree updateTimestamps isDeep couldNotCreateFolder getLocation toOSString IStatus ResourceStatus IResourceStatus FAILED_WRITE_LOCAL getFullPath
I Resource Visitor visitor new I Resource Visitor public boolean visit I Resource resource boolean is Linked resource is Linked if is Linked is Deep don t need to visit children because they didn t move return false if resource get Type I Resource FILE I File file I File resource update Moved File Timestamp file compute Timestamp file else if is Linked clear the linked resource bit if any Resource Info info Resource resource get Resource Info false true info clear I Core Constants M LINK return true  IResourceVisitor IResourceVisitor IResource isLinked isLinked isLinked isDeep getType IResource IFile IFile updateMovedFileTimestamp computeTimestamp isLinked ResourceInfo getResourceInfo ICoreConstants M_LINK
Helper method to update all the timestamps in the tree to match those in the file system Used after a move private void update Timestamps I Resource root final boolean is Deep I Resource Visitor visitor new I Resource Visitor public boolean visit I Resource resource boolean is Linked resource is Linked if is Linked is Deep don t need to visit children because they didn t move return false if resource get Type I Resource FILE I File file I File resource update Moved File Timestamp file compute Timestamp file else if is Linked clear the linked resource bit if any Resource Info info Resource resource get Resource Info false true info clear I Core Constants M LINK return true try root accept visitor I Resource DEPTH INFINITE I Container INCLUDE TEAM PRIVATE MEMBERS catch Core Exception e No exception should be thrown  updateTimestamps IResource isDeep IResourceVisitor IResourceVisitor IResource isLinked isLinked isLinked isDeep getType IResource IFile IFile updateMovedFileTimestamp computeTimestamp isLinked ResourceInfo getResourceInfo ICoreConstants M_LINK IResource DEPTH_INFINITE IContainer INCLUDE_TEAM_PRIVATE_MEMBERS CoreException
Does a best effort delete on this resource and all its children private boolean internal Delete Project I Project project int update Flags I Progress Monitor monitor Recursively delete each member of the project I Resource members null try members project members I Container INCLUDE TEAM PRIVATE MEMBERS catch Core Exception e String message Policy bind resources error Members project get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR project get Full Path message e failed status Indicate that the delete was unsuccessful return false boolean deleted Children true for int i 0 i members length i I Resource child members i switch child get Type case I Resource FILE if child get Name equals I Project Description DESCRIPTION FILE NAME ignore the project file for now and delete it last else deleted Children internal Delete File I File child update Flags Policy sub Monitor For monitor Policy total Work members length break case I Resource FOLDER deleted Children internal Delete Folder I Folder child update Flags Policy sub Monitor For monitor Policy total Work members length break Check to see if the children were deleted ok If there was a problem just return as the problem should have been logged by the recursive call to the child if deleted Children I Resource file project find Member I Project Description DESCRIPTION FILE NAME if file null the project have may have been recreated on disk automatically by snapshot I Path location project get File I Project Description DESCRIPTION FILE NAME get Location if location null location to File delete else if file get Type I Resource FILE We should never get here since the only reason we skipped it above was because it was a file named project String message Policy bind resources couldnot Delete file get Full Path to String NON NLS 1 I Status status new Resource Status I Resource Status FAILED DELETE LOCAL file get Full Path message failed status Indicate that the delete was unsuccessful return false boolean deleted Project File internal Delete File I File file update Flags Policy monitor For null if deleted Project File String message Policy bind resources couldnot Delete file get Full Path to String NON NLS 1 I Status status new Resource Status I Resource Status FAILED DELETE LOCAL file get Full Path message failed status Indicate that the delete was unsuccessful return false else Indicate that the delete was unsuccessful return false If the content area is in the default location then delete the directory and all its children If it is specified by the user then leave the directory itself but delete the children No need to check the force flag since this is an internal method and by the time we get here we know that force is false java io File root project get Location to File I Project Description description Project project internal Get Description If we have a user defined location delete the directory otherwise just see if its empty boolean success if description null description get Location null success root delete if success root exists success true else String children root list success children null children length 0 if success deleted Project project Indicate that the delete was successful return true String message Policy bind resources couldnot Delete project get Location toOS String NON NLS 1 I Status status new Resource Status I Resource Status FAILED DELETE LOCAL project get Full Path message failed status Indicate that the delete was unsuccessful return false  internalDeleteProject IProject updateFlags IProgressMonitor IResource IContainer INCLUDE_TEAM_PRIVATE_MEMBERS CoreException errorMembers getFullPath toString IStatus ResourceStatus IStatus getFullPath deletedChildren IResource getType IResource getName IProjectDescription DESCRIPTION_FILE_NAME deletedChildren internalDeleteFile IFile updateFlags subMonitorFor totalWork IResource deletedChildren internalDeleteFolder IFolder updateFlags subMonitorFor totalWork deletedChildren IResource findMember IProjectDescription DESCRIPTION_FILE_NAME IPath getFile IProjectDescription DESCRIPTION_FILE_NAME getLocation toFile getType IResource couldnotDelete getFullPath toString IStatus ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getFullPath deletedProjectFile internalDeleteFile IFile updateFlags monitorFor deletedProjectFile couldnotDelete getFullPath toString IStatus ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getFullPath getLocation toFile IProjectDescription internalGetDescription getLocation deletedProject couldnotDelete getLocation toOSString IStatus ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getFullPath
see I Resource Tree standard Move Project I Project I Project Description int I Progress Monitor public void standard Move Project I Project source I Project Description description int update Flags I Progress Monitor monitor Assert is Legal is Valid try lock acquire String message Policy bind resources moving source get Full Path to String NON NLS 1 monitor begin Task message Policy total Work Double check this pre condition if source is Accessible throw new Illegal Argument Exception If there is nothing to do on disk then signal to make the workspace tree changes if is Content Change source description moved Project Subtree source description return Check to see if we are synchronized with the local file system boolean force update Flags I Resource FORCE 0 if force is Synchronized source I Resource DEPTH INFINITE FIXME make this a best effort move message Policy bind localstore resource Is Out Of Sync source get Full Path to String NON NLS 1 I Status status new Resource Status I Resource Status OUT OF SYNC LOCAL source get Full Path message failed status return Move the project content in the local file system try move Project Content source description update Flags Policy sub Monitor For monitor Policy total Work 3 4 catch Core Exception e message Policy bind localstore could Not Move source get Full Path to String NON NLS 1 I Status status new Resource Status I Status ERROR source get Full Path message e failed status return If we got this far the project content has been moved on disk if necessary and we need to update the workspace tree moved Project Subtree source description monitor worked Policy total Work 1 8 boolean is Deep update Flags I Resource SHALLOW 0 update Timestamps source get Workspace get Root get Project description get Name is Deep monitor worked Policy total Work 1 8 finally lock release monitor done  IResourceTree standardMoveProject IProject IProjectDescription IProgressMonitor standardMoveProject IProject IProjectDescription updateFlags IProgressMonitor isLegal isValid getFullPath toString beginTask totalWork isAccessible IllegalArgumentException isContentChange movedProjectSubtree updateFlags IResource isSynchronized IResource DEPTH_INFINITE resourceIsOutOfSync getFullPath toString IStatus ResourceStatus IResourceStatus OUT_OF_SYNC_LOCAL getFullPath moveProjectContent updateFlags subMonitorFor totalWork CoreException couldNotMove getFullPath toString IStatus ResourceStatus IStatus getFullPath movedProjectSubtree totalWork isDeep updateFlags IResource updateTimestamps getWorkspace getRoot getProject getName isDeep totalWork
Move the contents of the specified file from the source location to the destination location If the source points to a directory then move that directory and all its contents code I Resource FORCE code is the only valid flag private void move In File System java io File source java io File destination int update Flags I Progress Monitor monitor throws Core Exception Assert is Legal is Valid File System Store store Resource Resources Plugin get Workspace get Root get Local Manager get Store boolean force update Flags I Resource FORCE 0 store move source destination force monitor  IResource moveInFileSystem updateFlags IProgressMonitor CoreException isLegal isValid FileSystemStore ResourcesPlugin getWorkspace getRoot getLocalManager getStore updateFlags IResource
see I Resource Tree update Moved File Timestamp I File long public void update Moved File Timestamp I File file long timestamp Assert is Legal is Valid try lock acquire Do nothing if the file doesn t exist in the workspace tree if file exists return Update the timestamp in the tree Resource Info info Resource file get Resource Info false true The info should never be null since we just checked that the resource exists in the tree Resource file get Local Manager update Local Sync info timestamp remove the linked bit since this resource has been moved in the file system info clear I Core Constants M LINK finally lock release  IResourceTree updateMovedFileTimestamp IFile updateMovedFileTimestamp IFile isLegal isValid ResourceInfo getResourceInfo getLocalManager updateLocalSync ICoreConstants M_LINK

Returns the property store associated with this info The return value may be null public Property Store get Property Store return property Store  PropertyStore getPropertyStore propertyStore
Override parent s behaviour and do nothing Sync information cannot be stored on the workspace root so we don t need to update this counter which is used for deltas public void increment Sync Info Generation Count do nothing  incrementSyncInfoGenerationCount
Sets the property store associated with this info The value may be null public void set Property Store Property Store value property Store value  setPropertyStore PropertyStore propertyStore
Overrides parent s behaviour since sync information is not stored on the workspace root public void set Sync Info Qualified Name id byte value do nothing  setSyncInfo QualifiedName

Creates a new scheduling rule factory for the given workspace param workspace Rules Workspace workspace this root workspace get Root this team Hook workspace get Team Hook workspace add Lifecycle Listener this  getRoot teamHook getTeamHook addLifecycleListener
Obtains the scheduling rule from the appropriate factory for a build operation public I Scheduling Rule build Rule team hook currently cannot change this rule return root  ISchedulingRule buildRule
Obtains the scheduling rule from the appropriate factories for a copy operation public I Scheduling Rule copy Rule I Resource source I Resource destination if source get Type I Resource ROOT destination get Type I Resource ROOT return root source is not modified destination is created return factory For destination copy Rule source destination  ISchedulingRule copyRule IResource IResource getType IResource getType IResource factoryFor copyRule
Obtains the scheduling rule from the appropriate factory for a create operation public I Scheduling Rule create Rule I Resource resource if resource get Type I Resource ROOT return root return factory For resource create Rule resource  ISchedulingRule createRule IResource getType IResource factoryFor createRule
Obtains the scheduling rule from the appropriate factory for a delete operation public I Scheduling Rule delete Rule I Resource resource if resource get Type I Resource ROOT return root return factory For resource delete Rule resource  ISchedulingRule deleteRule IResource getType IResource factoryFor deleteRule
Returns the scheduling rule factory for the given resource private I Resource Rule Factory factory For I Resource destination I Resource Rule Factory fac I Resource Rule Factory projects To Rules get destination get Full Path segment 0 if fac null ask the team hook to supply one fac team Hook get Rule Factory destination get Project projects To Rules put destination get Full Path segment 0 fac return fac  IResourceRuleFactory factoryFor IResource IResourceRuleFactory IResourceRuleFactory projectsToRules getFullPath teamHook getRuleFactory getProject projectsToRules getFullPath
public void handle Event Lifecycle Event event clear resource rule factory for projects that are about to be closed or deleted It is ok to do this during a PRE event because the rule has already been obtained at this point switch event kind case Lifecycle Event PRE PROJECT CLOSE case Lifecycle Event PRE PROJECT DELETE case Lifecycle Event PRE PROJECT MOVE set Rule Factory I Project event resource null  handleEvent LifecycleEvent LifecycleEvent PRE_PROJECT_CLOSE LifecycleEvent PRE_PROJECT_DELETE LifecycleEvent PRE_PROJECT_MOVE setRuleFactory IProject
Obtains the scheduling rule from the appropriate factory for a marker change operation public I Scheduling Rule marker Rule I Resource resource team hook currently cannot change this rule return null  ISchedulingRule markerRule IResource
Obtains the scheduling rule from the appropriate factory for a modify operation public I Scheduling Rule modify Rule I Resource resource if resource get Type I Resource ROOT return root return factory For resource modify Rule resource  ISchedulingRule modifyRule IResource getType IResource factoryFor modifyRule
Obtains the scheduling rule from the appropriate factories for a move operation public I Scheduling Rule move Rule I Resource source I Resource destination if source get Type I Resource ROOT destination get Type I Resource ROOT return root treat a move across projects as a create on the destination and a delete on the source if source get Full Path segment 0 equals destination get Full Path segment 0 return Multi Rule combine delete Rule source create Rule destination return factory For source move Rule source destination  ISchedulingRule moveRule IResource IResource getType IResource getType IResource getFullPath getFullPath MultiRule deleteRule createRule factoryFor moveRule
Obtains the scheduling rule from the appropriate factory for a refresh operation public I Scheduling Rule refresh Rule I Resource resource if resource get Type I Resource ROOT return root return factory For resource refresh Rule resource  ISchedulingRule refreshRule IResource getType IResource factoryFor refreshRule
void set Rule Factory I Project project I Resource Rule Factory factory if factory null projects To Rules remove project get Name else projects To Rules put project get Name factory  setRuleFactory IProject IResourceRuleFactory projectsToRules getName projectsToRules getName
Combines rules for each parameter to validate Edit from the corresponding rule factories public I Scheduling Rule validate Edit Rule I Resource resources if resources length 0 return null optimize rule for single file if resources length 1 if resources 0 get Type I Resource ROOT return root return factory For resources 0 validate Edit Rule resources gather rules for each resource from appropriate factory Hash Set rules new Hash Set I Resource one Resource new I Resource 1 for int i 0 i resources length i if resources i get Type I Resource ROOT return root one Resource 0 resources i I Scheduling Rule rule factory For resources i validate Edit Rule one Resource if rule null rules add rule if rules is Empty return null if rules size 1 return I Scheduling Rule rules iterator next I Scheduling Rule rule Array I Scheduling Rule rules to Array new I Scheduling Rule rules size return new Multi Rule rule Array  validateEdit ISchedulingRule validateEditRule IResource getType IResource factoryFor validateEditRule HashSet HashSet IResource oneResource IResource getType IResource oneResource ISchedulingRule factoryFor validateEditRule oneResource isEmpty ISchedulingRule ISchedulingRule ruleArray ISchedulingRule toArray ISchedulingRule MultiRule ruleArray

protected Properties table public Safe File Table String plugin Id throws Core Exception location get Workspace get Meta Area get Safe Table Location For plugin Id restore  SafeFileTable pluginId CoreException getWorkspace getMetaArea getSafeTableLocationFor pluginId
public I Path get Files Set set table key Set String keys String set to Array new String set size I Path files new I Path keys length for int i 0 i keys length i files i new Path keys i return files  IPath getFiles keySet toArray IPath IPath
protected Workspace get Workspace return Workspace Resources Plugin get Workspace  getWorkspace ResourcesPlugin getWorkspace
public I Path lookup I Path file String result table get Property file toOS String return result null null new Path result  IPath IPath getProperty toOSString
public void map I Path file I Path location if location null table remove file else table set Property file toOS String location toOS String  IPath IPath setProperty toOSString toOSString
public void restore throws Core Exception java io File target location to File table new Properties if target exists return try File Input Stream input new File Input Stream target try table load input finally input close catch IO Exception e String message Policy bind resources ex Safe Read NON NLS 1 throw new Resource Exception I Resource Status INTERNAL ERROR null message e  CoreException toFile FileInputStream FileInputStream IOException exSafeRead ResourceException IResourceStatus INTERNAL_ERROR
public void save throws Core Exception java io File target location to File try File Output Stream output new File Output Stream target try table store output safe table NON NLS 1 finally output close catch IO Exception e String message Policy bind resources ex Safe Save NON NLS 1 throw new Resource Exception I Resource Status INTERNAL ERROR null message e  CoreException toFile FileOutputStream FileOutputStream IOException exSafeSave ResourceException IResourceStatus INTERNAL_ERROR
public void set Location I Path location if location null this location location  setLocation IPath

protected Save Context Plugin plugin int kind I Project project throws Core Exception this plugin plugin this kind kind this project project need Delta false need Save Number false String plugin Id plugin get Descriptor get Unique Identifier file Table new Safe File Table plugin Id previous Save Number get Workspace get Save Manager get Save Number plugin Id  SaveContext IProject CoreException needDelta needSaveNumber pluginId getDescriptor getUniqueIdentifier fileTable SafeFileTable pluginId previousSaveNumber getWorkspace getSaveManager getSaveNumber pluginId
public void commit throws Core Exception if need Save Number String plugin Id plugin get Descriptor get Unique Identifier I Path old Location get Workspace get Meta Area get Safe Table Location For plugin Id get Workspace get Save Manager set Save Number plugin Id get Save Number file Table set Location get Workspace get Meta Area get Safe Table Location For plugin Id file Table save old Location to File delete  CoreException needSaveNumber pluginId getDescriptor getUniqueIdentifier IPath oldLocation getWorkspace getMetaArea getSafeTableLocationFor pluginId getWorkspace getSaveManager setSaveNumber pluginId getSaveNumber fileTable setLocation getWorkspace getMetaArea getSafeTableLocationFor pluginId fileTable oldLocation toFile
see I Save Context public I Path get Files return get File Table get Files  ISaveContext IPath getFiles getFileTable getFiles
protected Safe File Table get File Table return file Table  SafeFileTable getFileTable fileTable
see I Save Context public int get Kind return kind  ISaveContext getKind
see I Save Context public Plugin get Plugin return plugin  ISaveContext getPlugin
see I Save Context public int get Previous Save Number return previous Save Number  ISaveContext getPreviousSaveNumber previousSaveNumber
see I Save Context public I Project get Project return project  ISaveContext IProject getProject
see I Save Context public int get Save Number int result get Previous Save Number 1 return result 0 result 1  ISaveContext getSaveNumber getPreviousSaveNumber
protected Workspace get Workspace return Workspace Resources Plugin get Workspace  getWorkspace ResourcesPlugin getWorkspace
public boolean is Delta Needed return need Delta  isDeltaNeeded needDelta
public boolean is Save Number Needed return need Save Number  isSaveNumberNeeded needSaveNumber
see I Save Context public I Path lookup I Path file return get File Table lookup file  ISaveContext IPath IPath getFileTable
see I Save Context public void map I Path file I Path location get File Table map file location  ISaveContext IPath IPath getFileTable
see I Save Context public void need Delta need Delta true  ISaveContext needDelta needDelta
see I Save Context public void need Save Number need Save Number true  ISaveContext needSaveNumber needSaveNumber

Saved State Workspace workspace String plugin Id Element Tree old Tree Element Tree new Tree throws Core Exception this workspace workspace this plugin Id plugin Id this new Tree new Tree this old Tree old Tree this file Table restore File Table  SavedState pluginId ElementTree oldTree ElementTree newTree CoreException pluginId pluginId newTree newTree oldTree oldTree fileTable restoreFileTable
void forget Trees new Tree null old Tree null  forgetTrees newTree oldTree
public int get Save Number return workspace get Save Manager get Save Number plugin Id  getSaveNumber getSaveManager getSaveNumber pluginId
protected Safe File Table get File Table return file Table  SafeFileTable getFileTable fileTable
protected Safe File Table restore File Table throws Core Exception if file Table null file Table new Safe File Table plugin Id return file Table  SafeFileTable restoreFileTable CoreException fileTable fileTable SafeFileTable pluginId fileTable
public I Path lookup I Path file return get File Table lookup file  IPath IPath getFileTable
public I Path get Files return get File Table get Files  IPath getFiles getFileTable getFiles
public void process Resource Change Events I Resource Change Listener listener try final I Scheduling Rule rule workspace get Root try workspace prepare Operation rule null if old Tree null new Tree null return workspace begin Operation true Resource Delta delta Resource Delta Factory compute Delta workspace old Tree new Tree Path ROOT 1 forget Trees free trees to prevent memory leak workspace get Notification Manager broadcast Changes listener I Resource Change Event POST BUILD delta finally workspace end Operation rule false null catch Core Exception e this is unlikelly to happen so just log it Resource Status status new Resource Status I Status WARNING null e get Message e Resources Plugin get Plugin get Log log status  processResourceChangeEvents IResourceChangeListener ISchedulingRule getRoot prepareOperation oldTree newTree beginOperation ResourceDelta ResourceDeltaFactory computeDelta oldTree newTree forgetTrees getNotificationManager broadcastChanges IResourceChangeEvent POST_BUILD endOperation CoreException ResourceStatus ResourceStatus IStatus getMessage ResourcesPlugin getPlugin getLog

public Save Manager Workspace workspace this workspace workspace this snapshot Job new Delayed Snapshot Job this snapshot Requested false save Participants new Hash Map 10  SaveManager snapshotJob DelayedSnapshotJob snapshotRequested saveParticipants HashMap
public I Saved State add Participant Plugin plugin I Save Participant participant throws Core Exception synchronized save Participants If the plugin was already registered as a save participant we return null if save Participants put plugin participant null return null String id plugin get Descriptor get Unique Identifier Saved State state Saved State saved States get id if state null if is Delta Cleared id this plugin was marked not to receive deltas state forget Trees remove Clear Delta Marks id else try thread safety we need to guarantee that the tree is imutable when computing deltas so the tree inside the saved state needs to be immutable workspace prepare Operation workspace get Root null workspace begin Operation true state new Tree workspace get Element Tree finally workspace end Operation workspace get Root false null return state if the plug in has a previous save number we return a state otherwise we return null if get Save Number id 0 return new Saved State workspace id null null return null  ISavedState addParticipant ISaveParticipant CoreException saveParticipants saveParticipants getDescriptor getUniqueIdentifier SavedState SavedState savedStates isDeltaCleared forgetTrees removeClearDeltaMarks prepareOperation getRoot beginOperation newTree getElementTree endOperation getRoot getSaveNumber SavedState
Be extra careful when calling lifecycle method on arbitary plugin I Safe Runnable code new I Safe Runnable public void run throws Exception execute Lifecycle lifecycle participant context  ISafeRunnable ISafeRunnable executeLifecycle
public void handle Exception Throwable e String message Policy bind resources save Problem NON NLS 1 I Status status new Status I Status WARNING Resources Plugin PI RESOURCES I Resource Status INTERNAL ERROR message e warnings add status Remove entry for defective plug in from this save operation it remove  handleException saveProblem IStatus IStatus ResourcesPlugin PI_RESOURCES IResourceStatus INTERNAL_ERROR
protected void broadcast Lifecycle final int lifecycle Map contexts final Multi Status warnings I Progress Monitor monitor monitor Policy monitor For monitor try monitor begin Task null contexts size for final Iterator it contexts entry Set iterator it has Next Map Entry entry Map Entry it next Plugin plugin Plugin entry get Key final I Save Participant participant I Save Participant save Participants get plugin save participants can be removed concurrently if participant null monitor worked 1 continue final Save Context context Save Context entry get Value Be extra careful when calling lifecycle method on arbitary plugin I Safe Runnable code new I Safe Runnable public void run throws Exception execute Lifecycle lifecycle participant context public void handle Exception Throwable e String message Policy bind resources save Problem NON NLS 1 I Status status new Status I Status WARNING Resources Plugin PI RESOURCES I Resource Status INTERNAL ERROR message e warnings add status Remove entry for defective plug in from this save operation it remove Platform run code monitor worked 1 finally monitor done  broadcastLifecycle MultiStatus IProgressMonitor monitorFor beginTask entrySet hasNext getKey ISaveParticipant ISaveParticipant saveParticipants SaveContext SaveContext getValue ISafeRunnable ISafeRunnable executeLifecycle handleException saveProblem IStatus IStatus ResourcesPlugin PI_RESOURCES IResourceStatus INTERNAL_ERROR
protected void clean Master Table remove tree file entries for everything except closed projects for Iterator it master Table key Set iterator it has Next String key String it next if key ends With Local Meta Area F TREE continue String prefix key substring 0 key length Local Meta Area F TREE length always save the root tree entry if prefix equals Path ROOT to String continue I Project project workspace get Root get Project prefix if project exists project is Open it remove I Path location workspace get Meta Area get Safe Table Location For Resources Plugin PI RESOURCES I Path backup workspace get Meta Area get Backup Location For location try save Master Table backup catch Core Exception e Resources Plugin get Plugin get Log log e get Status backup to File delete return if location to File exists location to File delete return try save Master Table location catch Core Exception e Resources Plugin get Plugin get Log log e get Status location to File delete return backup to File delete  cleanMasterTable masterTable keySet hasNext endsWith LocalMetaArea F_TREE LocalMetaArea F_TREE toString IProject getRoot getProject isOpen IPath getMetaArea getSafeTableLocationFor ResourcesPlugin PI_RESOURCES IPath getMetaArea getBackupLocationFor saveMasterTable CoreException ResourcesPlugin getPlugin getLog getStatus toFile toFile toFile saveMasterTable CoreException ResourcesPlugin getPlugin getLog getStatus toFile toFile
Marks the current participants to not receive deltas next time they are registered as save participants This is done in order to maintain consistency if we crash after a snapshot It would force plug ins to rebuild their state protected void clear Saved Delta synchronized save Participants for Iterator i save Participants key Set iterator i has Next String plugin Id Plugin i next get Descriptor get Unique Identifier master Table set Property CLEAR DELTA PREFIX plugin Id true NON NLS 1  clearSavedDelta saveParticipants saveParticipants keySet hasNext pluginId getDescriptor getUniqueIdentifier masterTable setProperty CLEAR_DELTA_PREFIX pluginId
Collects the set of Element Trees we are still interested in and removes references to any other trees protected void collapse Trees throws Core Exception collect trees we re interested in trees for plugin saved states Array List trees new Array List for Iterator i saved States values iterator i has Next Saved State state Saved State i next if state old Tree null trees add state old Tree trees for builders I Project projects workspace get Root get Projects for int i 0 i projects length i I Project project projects i if project is Open Map builder Infos workspace get Build Manager create Builders Persistent Info project if builder Infos null for Iterator it builder Infos values iterator it has Next Builder Persistent Info info Builder Persistent Info it next trees add info get Last Built Tree no need to collapse if there s no trees at this point if trees is Empty return the complete tree trees add workspace get Element Tree collapse the trees sort trees in topological order and set the parent of each tree to its parent in the topological ordering Element Tree tree Array new Element Tree trees size trees to Array tree Array Element Tree sorted sort Trees tree Array if there was a problem sorting the tree bail on trying to collapse We will be able to GC the layers at a later time if sorted null return for int i 1 i sorted length i sorted i collapse To sorted i 1  ElementTrees collapseTrees CoreException ArrayList ArrayList savedStates hasNext SavedState SavedState oldTree oldTree IProject getRoot getProjects IProject isOpen builderInfos getBuildManager createBuildersPersistentInfo builderInfos builderInfos hasNext BuilderPersistentInfo BuilderPersistentInfo getLastBuiltTree isEmpty getElementTree ElementTree treeArray ElementTree toArray treeArray ElementTree sortTrees treeArray collapseTo
protected void commit Map contexts throws Core Exception for Iterator i contexts values iterator i has Next Save Context i next commit  CoreException hasNext SaveContext
Given a collection of save participants compute the collection of code Save Contexts code to use during the save lifecycle The keys are plugins and values are Save Context objects protected Map compute Save Contexts Plugin plugins int kind I Project project Hash Map result new Hash Map plugins length for int i 0 i plugins length i Plugin plugin plugins i try Save Context context new Save Context plugin kind project result put plugin context catch Core Exception e FIXME should return a status to the user and not just log it Resources Plugin get Plugin get Log log e get Status return result  SaveContexts SaveContext computeSaveContexts IProject HashMap HashMap SaveContext SaveContext CoreException ResourcesPlugin getPlugin getLog getStatus
Returns a table mapping having the plug in id as the key and the old tree as the value This table is based on the union of the current saved States code and the given table of contexts The specified tree is used as the tree for any newly created saved states This method is used to compute the set of saved states to be written out protected Map compute States To Save Map contexts Element Tree current Hash Map result new Hash Map saved States size for Iterator i saved States values iterator i has Next Saved State state Saved State i next if state old Tree null result put state plugin Id state old Tree for Iterator i contexts values iterator i has Next Save Context context Save Context i next if context is Delta Needed continue String plugin Id context get Plugin get Descriptor get Unique Identifier result put plugin Id current return result  savedStates computeStatesToSave ElementTree HashMap HashMap savedStates savedStates hasNext SavedState SavedState oldTree pluginId oldTree hasNext SaveContext SaveContext isDeltaNeeded pluginId getPlugin getDescriptor getUniqueIdentifier pluginId
protected void execute Lifecycle int lifecycle I Save Participant participant Save Context context throws Core Exception switch lifecycle case PREPARE TO SAVE participant prepare To Save context break case SAVING participant saving context break case DONE SAVING participant done Saving context break case ROLLBACK participant rollback context break default Assert is True false Invalid save lifecycle code NON NLS 1  executeLifecycle ISaveParticipant SaveContext CoreException PREPARE_TO_SAVE prepareToSave DONE_SAVING doneSaving isTrue
public void forget Saved Tree String plugin Id if plugin Id null for Iterator i saved States values iterator i has Next Saved State i next forget Trees else Saved State state Saved State saved States get plugin Id if state null state forget Trees  forgetSavedTree pluginId pluginId savedStates hasNext SavedState forgetTrees SavedState SavedState savedStates pluginId forgetTrees
Used in the policy for cleaning up tree s of plug ins that are not often activated protected long get Delta Expiration String plugin Id String result master Table get Property DELTA EXPIRATION PREFIX plugin Id return result null System current Time Millis new Long result long Value  getDeltaExpiration pluginId masterTable getProperty DELTA_EXPIRATION_PREFIX pluginId currentTimeMillis longValue
protected Properties get Master Table return master Table  getMasterTable masterTable
public int get Save Number String plugin Id String value master Table get Property SAVE NUMBER PREFIX plugin Id return value null 0 new Integer value int Value  getSaveNumber pluginId masterTable getProperty SAVE_NUMBER_PREFIX pluginId intValue
protected Plugin get Save Participant Plugins synchronized save Participants return Plugin save Participants key Set to Array new Plugin save Participants size  getSaveParticipantPlugins saveParticipants saveParticipants keySet toArray saveParticipants
Initializes the snapshot mechanism for this workspace protected void init Snap I Progress Monitor monitor throws Core Exception the last Snap tree must be frozen as the exact tree obtained from startup otherwise ensuing snapshot deltas may be based on an incorrect tree see bug 12575 last Snap workspace get Element Tree last Snap immutable workspace new Working Tree operation Count 0 delete the snapshot file if any I Path snap Path workspace get Meta Area get Snapshot Location For workspace get Root java io File file snap Path to File if file exists file delete if file exists String message Policy bind resources snap Init NON NLS 1 throw new Resource Exception I Resource Status FAILED DELETE METADATA null message null  initSnap IProgressMonitor CoreException lastSnap lastSnap getElementTree lastSnap newWorkingTree operationCount IPath snapPath getMetaArea getSnapshotLocationFor getRoot snapPath toFile snapInit ResourceException IResourceStatus FAILED_DELETE_METADATA
protected boolean is Delta Cleared String plugin Id String clear Delta master Table get Property CLEAR DELTA PREFIX plugin Id return clear Delta null clear Delta equals true NON NLS 1  isDeltaCleared pluginId clearDelta masterTable getProperty CLEAR_DELTA_PREFIX pluginId clearDelta clearDelta
protected boolean is Old Plugin Tree String plugin Id first check if this plug ins was marked not to receive a delta if is Delta Cleared plugin Id return false long delta Age System current Time Millis get Delta Expiration plugin Id return delta Age workspace internal Get Description get Delta Expiration  isOldPluginTree pluginId isDeltaCleared pluginId deltaAge currentTimeMillis getDeltaExpiration pluginId deltaAge internalGetDescription getDeltaExpiration
Remove marks from current save participants This marks prevent them to receive their deltas when they register themselves as save participants protected void remove Clear Delta Marks synchronized save Participants for Iterator i save Participants key Set iterator i has Next String plugin Id Plugin i next get Descriptor get Unique Identifier remove Clear Delta Marks plugin Id  removeClearDeltaMarks saveParticipants saveParticipants keySet hasNext pluginId getDescriptor getUniqueIdentifier removeClearDeltaMarks pluginId
protected void remove Clear Delta Marks String plugin Id master Table set Property CLEAR DELTA PREFIX plugin Id false NON NLS 1  removeClearDeltaMarks pluginId masterTable setProperty CLEAR_DELTA_PREFIX pluginId
protected void remove Files java io File root String candidates List exclude for int i 0 i candidates length i boolean delete true for List Iterator it exclude list Iterator it has Next String s String it next if s equals candidates i it remove delete false break if delete new java io File root candidates i delete  removeFiles ListIterator listIterator hasNext
private void remove Garbage Data Output Stream output I Path location I Path temp Location throws IO Exception if output size 0 output close location to File delete temp Location to File delete  removeGarbage DataOutputStream IPath IPath tempLocation IOException toFile tempLocation toFile
public void remove Participant Plugin plugin synchronized save Participants save Participants remove plugin  removeParticipant saveParticipants saveParticipants
protected void remove Unused Safe Tables List valuables new Array List 10 I Path location workspace get Meta Area get Safe Table Location For Resources Plugin PI RESOURCES valuables add location last Segment add master table for Enumeration enum master Table keys enum has More Elements String key String enum next Element if key starts With SAVE NUMBER PREFIX String plugin Id key substring SAVE NUMBER PREFIX length valuables add workspace get Meta Area get Safe Table Location For plugin Id last Segment java io File target location to File get Parent File String candidates target list if candidates null return remove Files target candidates valuables  removeUnusedSafeTables ArrayList IPath getMetaArea getSafeTableLocationFor ResourcesPlugin PI_RESOURCES lastSegment masterTable hasMoreElements nextElement startsWith SAVE_NUMBER_PREFIX pluginId SAVE_NUMBER_PREFIX getMetaArea getSafeTableLocationFor pluginId lastSegment toFile getParentFile removeFiles
java io File target location to File get Parent File Filename Filter filter new Filename Filter public boolean accept java io File dir String name return name ends With Local Meta Area F TREE  toFile getParentFile FilenameFilter FilenameFilter endsWith LocalMetaArea F_TREE
protected void remove Unused Tree Files root resource List valuables new Array List 10 I Path location workspace get Meta Area get Tree Location For workspace get Root false valuables add location last Segment java io File target location to File get Parent File Filename Filter filter new Filename Filter public boolean accept java io File dir String name return name ends With Local Meta Area F TREE String candidates target list filter if candidates null remove Files target candidates valuables projects I Project projects workspace get Root get Projects for int i 0 i projects length i location workspace get Meta Area get Tree Location For projects i false valuables add location last Segment target location to File get Parent File candidates target list filter if candidates null remove Files target candidates valuables  removeUnusedTreeFiles ArrayList IPath getMetaArea getTreeLocationFor getRoot lastSegment toFile getParentFile FilenameFilter FilenameFilter endsWith LocalMetaArea F_TREE removeFiles IProject getRoot getProjects getMetaArea getTreeLocationFor lastSegment toFile getParentFile removeFiles
public void request Snapshot snapshot Requested true  requestSnapshot snapshotRequested
Restores the contents of this project Throw an exception if the project could not be restored protected void restore Project project I Progress Monitor monitor throws Core Exception if Policy DEBUG RESTORE System out println Restore project project get Full Path starting NON NLS 1 NON NLS 2 long start System current Time Millis monitor Policy monitor For monitor try monitor begin Task null 40 if project is Open restore Tree project Policy sub Monitor For monitor 10 else monitor worked 10 restore Markers project true Policy sub Monitor For monitor 10 restore Sync Info project Policy sub Monitor For monitor 10 restore meta info last because it might close a project if its description is not found restore Meta Info project Policy sub Monitor For monitor 10 finally monitor done if Policy DEBUG RESTORE System out println Restore project project get Full Path System current Time Millis start ms NON NLS 1 NON NLS 2 NON NLS 3  IProgressMonitor CoreException DEBUG_RESTORE getFullPath currentTimeMillis monitorFor beginTask isOpen restoreTree subMonitorFor restoreMarkers subMonitorFor restoreSyncInfo subMonitorFor restoreMetaInfo subMonitorFor DEBUG_RESTORE getFullPath currentTimeMillis
Restores the state of this workspace by opening the projects which were open when it was last saved protected void restore I Progress Monitor monitor throws Core Exception if Policy DEBUG RESTORE System out println Restore workspace starting NON NLS 1 long start System current Time Millis monitor Policy monitor For monitor try monitor begin Task null 50 need to open the tree to restore but since we re not inside an operation be sure to close it afterwards workspace new Working Tree try String msg Policy bind resources startup Problems NON NLS 1 Multi Status problems new Multi Status Resources Plugin PI RESOURCES I Resource Status FAILED READ METADATA msg null restore Master Table restore the saved tree and overlay the snapshots if any restore Tree workspace Policy sub Monitor For monitor 10 restore Snapshots Policy sub Monitor For monitor 10 tolerate failure for non critical information if startup fails the entire workspace is shot try restore Markers workspace get Root false Policy sub Monitor For monitor 10 catch Core Exception e problems merge e get Status try restore Sync Info workspace get Root Policy sub Monitor For monitor 10 catch Core Exception e problems merge e get Status restore meta info last because it might close a project if its description is not readable restore Meta Info workspace problems Policy sub Monitor For monitor 10 I Project roots workspace get Root get Projects for int i 0 i roots length i Project roots i startup if problems isOK Resources Plugin get Plugin get Log log problems finally workspace get Element Tree immutable finally monitor done if Policy DEBUG RESTORE System out println Restore workspace System current Time Millis start ms NON NLS 1 NON NLS 2  IProgressMonitor CoreException DEBUG_RESTORE currentTimeMillis monitorFor beginTask newWorkingTree startupProblems MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus FAILED_READ_METADATA restoreMasterTable restoreTree subMonitorFor restoreSnapshots subMonitorFor restoreMarkers getRoot subMonitorFor CoreException getStatus restoreSyncInfo getRoot subMonitorFor CoreException getStatus restoreMetaInfo subMonitorFor IProject getRoot getProjects ResourcesPlugin getPlugin getLog getElementTree DEBUG_RESTORE currentTimeMillis
Reads the markers which were originally saved for the tree rooted by the given resource protected void restore Markers I Resource resource boolean generate Deltas I Progress Monitor monitor throws Core Exception Assert is Legal resource get Type I Resource ROOT resource get Type I Resource PROJECT long start System current Time Millis Marker Manager marker Manager workspace get Marker Manager when restoring a project only load markers if it is open if resource is Accessible marker Manager restore resource generate Deltas monitor if we have the workspace root then restore markers for its projects if resource get Type I Resource PROJECT if Policy DEBUG RESTORE MARKERS System out println Restore Markers for resource get Full Path System current Time Millis start ms NON NLS 1 NON NLS 2 NON NLS 3 return I Project projects I Workspace Root resource get Projects for int i 0 i projects length i if projects i is Accessible marker Manager restore projects i generate Deltas monitor if Policy DEBUG RESTORE MARKERS System out println Restore Markers for workspace System current Time Millis start ms NON NLS 1 NON NLS 2 NON NLS 3  restoreMarkers IResource generateDeltas IProgressMonitor CoreException isLegal getType IResource getType IResource currentTimeMillis MarkerManager markerManager getMarkerManager isAccessible markerManager generateDeltas getType IResource DEBUG_RESTORE_MARKERS getFullPath currentTimeMillis IProject IWorkspaceRoot getProjects isAccessible markerManager generateDeltas DEBUG_RESTORE_MARKERS currentTimeMillis
protected void restore Master Table throws Core Exception long start System current Time Millis master Table new Properties I Path location workspace get Meta Area get Safe Table Location For Resources Plugin PI RESOURCES java io File target location to File if target exists location workspace get Meta Area get Backup Location For location target location to File if target exists return try Safe Chunky Input Stream input new Safe Chunky Input Stream target try master Table load input finally input close catch IO Exception e String message Policy bind resources ex Master Table NON NLS 1 throw new Resource Exception I Resource Status INTERNAL ERROR null message e if Policy DEBUG RESTORE MASTERTABLE System out println Restore master table for location System current Time Millis start ms NON NLS 1 NON NLS 2 NON NLS 3  restoreMasterTable CoreException currentTimeMillis masterTable IPath getMetaArea getSafeTableLocationFor ResourcesPlugin PI_RESOURCES toFile getMetaArea getBackupLocationFor toFile SafeChunkyInputStream SafeChunkyInputStream masterTable IOException exMasterTable ResourceException IResourceStatus INTERNAL_ERROR DEBUG_RESTORE_MASTERTABLE currentTimeMillis
Restores the contents of this project Throw an exception if the project description could not be restored protected void restore Meta Info Project project I Progress Monitor monitor throws Core Exception long start System current Time Millis Project Description description null Core Exception failure null try if project is Open description workspace get File System Manager read project true else for closed projects just try to read the legacy prj file because the project location is stored there description workspace get Meta Area read Old Description project catch Core Exception e failure e If we had an open project and there was an error reading the description from disk close the project and give it a default description If the project was already closed then just set a default description if description null description new Project Description description set Name project get Name try to read private metadata and add to the description workspace get Meta Area read Private Description project description project internal Set Description description false if failure null close the project project internal Close throw failure if Policy DEBUG RESTORE METAINFO System out println Restore metainfo for project get Full Path System current Time Millis start ms NON NLS 1 NON NLS 2 NON NLS 3  restoreMetaInfo IProgressMonitor CoreException currentTimeMillis ProjectDescription CoreException isOpen getFileSystemManager getMetaArea readOldDescription CoreException ProjectDescription setName getName getMetaArea readPrivateDescription internalSetDescription internalClose DEBUG_RESTORE_METAINFO getFullPath currentTimeMillis
Restores the state of this workspace by opening the projects which were open when it was last saved protected void restore Meta Info Workspace workspace Multi Status problems I Progress Monitor monitor if Policy DEBUG RESTORE METAINFO System out println Restore workspace metainfo starting NON NLS 1 FIXME read the meta info for the workspace long start System current Time Millis I Project roots workspace get Root get Projects for int i 0 i roots length i fatal to throw exceptions during startup try restore Meta Info Project roots i monitor catch Core Exception e problems merge e get Status if Policy DEBUG RESTORE METAINFO System out println Restore workspace metainfo System current Time Millis start ms NON NLS 1 NON NLS 2  restoreMetaInfo MultiStatus IProgressMonitor DEBUG_RESTORE_METAINFO currentTimeMillis IProject getRoot getProjects restoreMetaInfo CoreException getStatus DEBUG_RESTORE_METAINFO currentTimeMillis
Restores the workspace tree from snapshot files in the event of a crash The workspace tree must be open when this method is called and will be open at the end of this method In the event of a crash recovery the snapshot file is not deleted until the next successful save protected void restore Snapshots I Progress Monitor monitor throws Core Exception long start System current Time Millis monitor Policy monitor For monitor String message try monitor begin Task null Policy total Work I Path snap Location workspace get Meta Area get Snapshot Location For workspace get Root java io File local File snap Location to File If the snapshot file doesn t exist there was no crash Just initialize the snapshot file and return if local File exists init Snap Policy sub Monitor For monitor Policy total Work 2 return If we have a snapshot file the workspace was shutdown without being saved or crashed workspace set Crashed true try Read each of the snapshots and lay them on top of the current tree Element Tree complete workspace get Element Tree complete immutable Data Input Stream input new Data Input Stream new Safe Chunky Input Stream local File try Workspace Tree Reader reader Workspace Tree Reader get Reader workspace input read Int complete reader read Snapshot Tree input complete monitor finally input close reader returned an immutable tree but since we re inside an operation we must return an open tree last Snap complete complete complete new Empty Delta workspace tree complete catch Exception e only log the exception we should not fail restoring the snapshot message Policy bind resources snap Read NON NLS 1 Resources Plugin get Plugin get Log log new Resource Status I Resource Status FAILED READ METADATA null message e finally monitor done if Policy DEBUG RESTORE SNAPSHOTS System out println Restore snapshots for workspace System current Time Millis start ms NON NLS 1 NON NLS 2  restoreSnapshots IProgressMonitor CoreException currentTimeMillis monitorFor beginTask totalWork IPath snapLocation getMetaArea getSnapshotLocationFor getRoot localFile snapLocation toFile localFile initSnap subMonitorFor totalWork setCrashed ElementTree getElementTree DataInputStream DataInputStream SafeChunkyInputStream localFile WorkspaceTreeReader WorkspaceTreeReader getReader readInt readSnapshotTree lastSnap newEmptyDelta snapRead ResourcesPlugin getPlugin getLog ResourceStatus IResourceStatus FAILED_READ_METADATA DEBUG_RESTORE_SNAPSHOTS currentTimeMillis
Reads the sync info which was originally saved for the tree rooted by the given resource protected void restore Sync Info I Resource resource I Progress Monitor monitor throws Core Exception Assert is Legal resource get Type I Resource ROOT resource get Type I Resource PROJECT long start System current Time Millis Synchronizer synchronizer Synchronizer workspace get Synchronizer when restoring a project only load sync info if it is open if resource is Accessible synchronizer restore resource monitor restore sync info for all projects if we were given the workspace root if resource get Type I Resource PROJECT if Policy DEBUG RESTORE SYNCINFO System out println Restore Sync Info for resource get Full Path System current Time Millis start ms NON NLS 1 NON NLS 2 NON NLS 3 return I Project projects I Workspace Root resource get Projects for int i 0 i projects length i if projects i is Accessible synchronizer restore projects i monitor if Policy DEBUG RESTORE SYNCINFO System out println Restore Sync Info for workspace System current Time Millis start ms NON NLS 1 NON NLS 2 NON NLS 3  restoreSyncInfo IResource IProgressMonitor CoreException isLegal getType IResource getType IResource currentTimeMillis getSynchronizer isAccessible getType IResource DEBUG_RESTORE_SYNCINFO SyncInfo getFullPath currentTimeMillis IProject IWorkspaceRoot getProjects isAccessible DEBUG_RESTORE_SYNCINFO SyncInfo currentTimeMillis
Restores the trees for the builders of this project from the local disk Does nothing if the tree file does not exist this means the project has never been saved This method is used when restoring a saved closed project restore Tree Workspace is used when restoring a complete workspace after workspace save shutdown exception Core Exception if the project could not be restored protected void restore Tree Project project I Progress Monitor monitor throws Core Exception long start System current Time Millis monitor Policy monitor For monitor String message try monitor begin Task null Policy total Work I Path tree Location workspace get Meta Area get Tree Location For project false I Path temp Location workspace get Meta Area get Backup Location For tree Location if tree Location to File exists temp Location to File exists return Data Input Stream input new Data Input Stream new Safe File Input Stream tree Location toOS String temp Location toOS String try Workspace Tree Reader reader Workspace Tree Reader get Reader workspace input read Int FIXME In the future this code should be removed See comments in WorkspaceTreeReader 0 if reader instanceof WorkspaceTreeReader 0 reset the stream input close input new Data Input Stream new Safe File Input Stream tree Location toOS String temp Location toOS String reader read Tree project input Policy sub Monitor For monitor Policy total Work finally input close catch IO Exception e message Policy bind resources read Meta project get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA project get Full Path message e finally monitor done if Policy DEBUG RESTORE TREE System out println Restore Tree for project get Full Path System current Time Millis start ms NON NLS 1 NON NLS 2 NON NLS 3  restoreTree CoreException restoreTree IProgressMonitor CoreException currentTimeMillis monitorFor beginTask totalWork IPath treeLocation getMetaArea getTreeLocationFor IPath tempLocation getMetaArea getBackupLocationFor treeLocation treeLocation toFile tempLocation toFile DataInputStream DataInputStream SafeFileInputStream treeLocation toOSString tempLocation toOSString WorkspaceTreeReader WorkspaceTreeReader getReader readInt WorkspaceTreeReader_0 WorkspaceTreeReader_0 DataInputStream SafeFileInputStream treeLocation toOSString tempLocation toOSString readTree subMonitorFor totalWork IOException readMeta getFullPath toString ResourceException IResourceStatus FAILED_READ_METADATA getFullPath DEBUG_RESTORE_TREE getFullPath currentTimeMillis
Reads the contents of the tree rooted by the given resource from the file system This method is used when restoring a complete workspace after workspace save shutdown exception Core Exception if the workspace could not be restored protected void restore Tree Workspace workspace I Progress Monitor monitor throws Core Exception long start System current Time Millis I Path tree Location workspace get Meta Area get Tree Location For workspace get Root false I Path temp Location workspace get Meta Area get Backup Location For tree Location if tree Location to File exists temp Location to File exists saved States new Hash Map 10 return try Data Input Stream input new Data Input Stream new Safe File Input Stream tree Location toOS String temp Location toOS String try Workspace Tree Reader reader Workspace Tree Reader get Reader workspace input read Int FIXME In the future this code should be removed See comments in WorkspaceTreeReader 0 if reader instanceof WorkspaceTreeReader 0 reset the stream input close input new Data Input Stream new Safe File Input Stream tree Location toOS String temp Location toOS String reader read Tree input monitor finally input close catch IO Exception e String msg Policy bind resources read Meta tree Location toOS String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA tree Location msg e if Policy DEBUG RESTORE TREE System out println Restore Tree for workspace System current Time Millis start ms NON NLS 1 NON NLS 2  CoreException restoreTree IProgressMonitor CoreException currentTimeMillis IPath treeLocation getMetaArea getTreeLocationFor getRoot IPath tempLocation getMetaArea getBackupLocationFor treeLocation treeLocation toFile tempLocation toFile savedStates HashMap DataInputStream DataInputStream SafeFileInputStream treeLocation toOSString tempLocation toOSString WorkspaceTreeReader WorkspaceTreeReader getReader readInt WorkspaceTreeReader_0 WorkspaceTreeReader_0 DataInputStream SafeFileInputStream treeLocation toOSString tempLocation toOSString readTree IOException readMeta treeLocation toOSString ResourceException IResourceStatus FAILED_READ_METADATA treeLocation DEBUG_RESTORE_TREE currentTimeMillis
protected void save Master Table throws Core Exception save Master Table workspace get Meta Area get Safe Table Location For Resources Plugin PI RESOURCES  saveMasterTable CoreException saveMasterTable getMetaArea getSafeTableLocationFor ResourcesPlugin PI_RESOURCES
protected void save Master Table I Path location throws Core Exception long start System current Time Millis java io File target location to File try Safe Chunky Output Stream output new Safe Chunky Output Stream target try master Table store output master table NON NLS 1 output succeed finally output close catch IO Exception e String message Policy bind resources ex Save Master NON NLS 1 throw new Resource Exception I Resource Status INTERNAL ERROR null message e if Policy DEBUG SAVE MASTERTABLE System out println Save master table for location System current Time Millis start ms NON NLS 1 NON NLS 2 NON NLS 3  saveMasterTable IPath CoreException currentTimeMillis toFile SafeChunkyOutputStream SafeChunkyOutputStream masterTable IOException exSaveMaster ResourceException IResourceStatus INTERNAL_ERROR DEBUG_SAVE_MASTERTABLE currentTimeMillis
Ensures that the project meta info is saved The project meta info is usually saved as soon as it changes so this is just a sanity check to make sure there is something on disk before we shutdown return Status object containing non critical warnings or an OK status protected I Status save Meta Info Project project I Progress Monitor monitor throws Core Exception long start System current Time Millis if there is nothing on disk write the description if workspace get File System Manager has Saved Project project workspace get File System Manager write Silently project String msg Policy bind resources missing Project Meta Repaired project get Name NON NLS 1 return new Resource Status I Resource Status MISSING DESCRIPTION REPAIRED project get Full Path msg if Policy DEBUG SAVE METAINFO System out println Save metainfo for project get Full Path System current Time Millis start ms NON NLS 1 NON NLS 2 NON NLS 3 return Status OK STATUS  IStatus saveMetaInfo IProgressMonitor CoreException currentTimeMillis getFileSystemManager hasSavedProject getFileSystemManager writeSilently missingProjectMetaRepaired getName ResourceStatus IResourceStatus MISSING_DESCRIPTION_REPAIRED getFullPath DEBUG_SAVE_METAINFO getFullPath currentTimeMillis OK_STATUS
Writes the metainfo e g descriptions of the given workspace and all projects to the local disk protected void save Meta Info Workspace workspace Multi Status problems I Progress Monitor monitor throws Core Exception if Policy DEBUG SAVE METAINFO System out println Save workspace metainfo starting NON NLS 1 long start System current Time Millis save preferences workspace description path variables etc Resources Plugin get Plugin save Plugin Preferences save projects meta info I Project roots workspace get Root get Projects for int i 0 i roots length i if roots i is Accessible I Status result save Meta Info Project roots i null if result isOK problems merge result if Policy DEBUG SAVE METAINFO System out println Save workspace metainfo System current Time Millis start ms NON NLS 1 NON NLS 2  saveMetaInfo MultiStatus IProgressMonitor CoreException DEBUG_SAVE_METAINFO currentTimeMillis ResourcesPlugin getPlugin savePluginPreferences IProject getRoot getProjects isAccessible IStatus saveMetaInfo DEBUG_SAVE_METAINFO currentTimeMillis
Writes the current state of the entire workspace tree to disk This is used during workspace save save Tree Project is used to save the state of an individual project exception Core Exception if there is a problem writing the tree to disk protected void save Tree Map contexts I Progress Monitor monitor throws Core Exception long start System current Time Millis I Path tree Location workspace get Meta Area get Tree Location For workspace get Root true try I Path temp Location workspace get Meta Area get Backup Location For tree Location Data Output Stream output new Data Output Stream new Safe File Output Stream tree Location toOS String temp Location toOS String try output write Int I Core Constants WORKSPACE TREE VERSION 2 write Tree compute States To Save contexts workspace get Element Tree output monitor finally output close catch Exception e String msg Policy bind resources write Workspace Meta tree Location to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE METADATA Path ROOT msg e if Policy DEBUG SAVE TREE System out println Save Workspace Tree System current Time Millis start ms NON NLS 1 NON NLS 2  saveTree CoreException saveTree IProgressMonitor CoreException currentTimeMillis IPath treeLocation getMetaArea getTreeLocationFor getRoot IPath tempLocation getMetaArea getBackupLocationFor treeLocation DataOutputStream DataOutputStream SafeFileOutputStream treeLocation toOSString tempLocation toOSString writeInt ICoreConstants WORKSPACE_TREE_VERSION_2 writeTree computeStatesToSave getElementTree writeWorkspaceMeta treeLocation toString ResourceException IResourceStatus FAILED_WRITE_METADATA DEBUG_SAVE_TREE currentTimeMillis
Used in the policy for cleaning up tree s of plug ins that are not often activated protected void set Delta Expiration String plugin Id long timestamp master Table set Property DELTA EXPIRATION PREFIX plugin Id new Long timestamp to String  setDeltaExpiration pluginId masterTable setProperty DELTA_EXPIRATION_PREFIX pluginId toString
protected void set Save Number String plugin Id int number master Table set Property SAVE NUMBER PREFIX plugin Id new Integer number to String  setSaveNumber pluginId masterTable setProperty SAVE_NUMBER_PREFIX pluginId toString
Should only be used for read purposes void set Plugins Saved State Hash Map saved States this saved States saved States  setPluginsSavedState HashMap savedStates savedStates savedStates
public void shutdown I Progress Monitor monitor snapshot Job cancel  IProgressMonitor snapshotJob
Performs a snapshot if one is deemed necessary Encapsulates rules for determining when a snapshot is needed This should be called at the end of every top level operation public void snapshot If Needed boolean has Tree Changes throws Core Exception if workspace internal Get Description is Snapshot Enabled snapshot Requested return if snapshot Requested operation Count workspace internal Get Description get Operations Per Snapshot if snapshot Job get State Job NONE snapshot Job schedule else snapshot Job wake Up else if has Tree Changes operation Count if snapshot Job get State Job NONE if Policy DEBUG SAVE System out println Scheduling workspace snapshot NON NLS 1 long interval workspace internal Get Description get Snapshot Interval snapshot Job schedule Math max interval MIN SNAPSHOT DELAY else increment the operation count if we ve had a sufficient number of no ops if noop Count NO OP THRESHOLD operation Count noop Count 0  snapshotIfNeeded hasTreeChanges CoreException internalGetDescription isSnapshotEnabled snapshotRequested snapshotRequested operationCount internalGetDescription getOperationsPerSnapshot snapshotJob getState snapshotJob snapshotJob wakeUp hasTreeChanges operationCount snapshotJob getState DEBUG_SAVE internalGetDescription getSnapshotInterval snapshotJob MIN_SNAPSHOT_DELAY noopCount NO_OP_THRESHOLD operationCount noopCount
Performs a snapshot of the workspace tree protected void snap Tree Element Tree tree I Progress Monitor monitor throws Core Exception long start System current Time Millis monitor Policy monitor For monitor String message try monitor begin Task null Policy total Work the tree must be immutable tree immutable don t need to snapshot if there are no changes if tree last Snap return operation Count 0 I Path snap Path workspace get Meta Area get Snapshot Location For workspace get Root Element Tree Writer writer new Element Tree Writer this java io File local File snap Path to File try Safe Chunky Output Stream safe Stream new Safe Chunky Output Stream local File Data Output Stream out new Data Output Stream safe Stream try out write Int I Core Constants WORKSPACE TREE VERSION 2 write Workspace Fields out monitor writer write Delta tree last Snap Path ROOT Element Tree Writer D INFINITE out Resource Comparator get Comparator safe Stream succeed finally out close catch IO Exception e message Policy bind resources write Workspace Meta local File get Absolute Path NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE METADATA Path ROOT message e last Snap tree finally monitor done if Policy DEBUG SAVE TREE System out println Snapshot Workspace Tree System current Time Millis start ms NON NLS 1 NON NLS 2  snapTree ElementTree IProgressMonitor CoreException currentTimeMillis monitorFor beginTask totalWork lastSnap operationCount IPath snapPath getMetaArea getSnapshotLocationFor getRoot ElementTreeWriter ElementTreeWriter localFile snapPath toFile SafeChunkyOutputStream safeStream SafeChunkyOutputStream localFile DataOutputStream DataOutputStream safeStream writeInt ICoreConstants WORKSPACE_TREE_VERSION_2 writeWorkspaceFields writeDelta lastSnap ElementTreeWriter D_INFINITE ResourceComparator getComparator safeStream IOException writeWorkspaceMeta localFile getAbsolutePath ResourceException IResourceStatus FAILED_WRITE_METADATA lastSnap DEBUG_SAVE_TREE currentTimeMillis
Sorts the given array of trees so that the following rules are true The first tree has no parent No tree has an ancestor with a greater index in the array If there are no missing parents in the given trees array this means that in the resulting array the i th tree s parent will be tree i 1 The input tree array may contain duplicate trees protected Element Tree sort Trees Element Tree trees the sorted list int num Trees trees length Element Tree sorted new Element Tree num Trees first build a table of Element Tree List of Integers indices in trees array Map table new Hash Map num Trees 2 1 for int i 0 i trees length i List indices List table get trees i if indices null indices new Array List 10 table put trees i indices indices add new Integer i find the oldest tree a descendent of all other trees Element Tree oldest trees Element Tree find Oldest trees Walk through the chain of trees from oldest to newest adding them to the sorted list as we go int i num Trees 1 while i 0 add all instances of the current oldest tree to the sorted list List indices List table remove oldest for Enumeration e Collections enumeration indices e has More Elements e next Element sorted i oldest i if i 0 find the next tree in the list Element Tree parent oldest get Parent while parent null table get parent null parent parent get Parent if parent null I Status status new Status I Status WARNING Resources Plugin PI RESOURCES I Resource Status INTERNAL ERROR null parent found while collapsing trees null NON NLS 1 Resources Plugin get Plugin get Log log status return null oldest parent return sorted  ElementTree sortTrees ElementTree numTrees ElementTree ElementTree numTrees ElementTree HashMap numTrees ArrayList ElementTree ElementTree findOldest numTrees hasMoreElements nextElement ElementTree getParent getParent IStatus IStatus ResourcesPlugin PI_RESOURCES IResourceStatus INTERNAL_ERROR ResourcesPlugin getPlugin getLog
public void startup I Progress Monitor monitor throws Core Exception restore monitor java io File table workspace get Meta Area get Safe Table Location For Resources Plugin PI RESOURCES to File if table exists table get Parent File mkdirs  IProgressMonitor CoreException getMetaArea getSafeTableLocationFor ResourcesPlugin PI_RESOURCES toFile getParentFile
protected void write Tree Map states To Save Data Output Stream output I Progress Monitor monitor throws IO Exception Core Exception monitor Policy monitor For monitor try monitor begin Task null Policy total Work boolean was Immutable false try Create an array of trees to save Ensure that the current one is in the list Element Tree current workspace get Element Tree was Immutable current is Immutable current immutable Array List trees new Array List states To Save size 2 pick a number monitor worked Policy total Work 10 100 write out the workspace fields write Workspace Fields output Policy sub Monitor For monitor Policy op Work 20 100 save plugin info long last Tree Timestamp System current Time Millis output write Int states To Save size write the number of plugins we are saving for Iterator i states To Save entry Set iterator i has Next Map Entry entry Map Entry i next String plugin Id String entry get Key output writeUTF plugin Id trees add entry get Value tree set Delta Expiration plugin Id last Tree Timestamp monitor worked Policy total Work 10 100 add builders trees I Project projects workspace get Root get Projects List builders new Array List projects length 2 for int i 0 i projects length i I Project project projects i if project is Open Map infos workspace get Build Manager create Builders Persistent Info project if infos null builders add All infos values write Builder Persistent Info output builders trees Policy sub Monitor For monitor Policy total Work 10 100 add the current tree in the list as the last element trees add current save the forest Element Tree Writer writer new Element Tree Writer this Element Tree trees To Save Element Tree trees to Array new Element Tree trees size writer write Delta Chain trees To Save Path ROOT Element Tree Writer D INFINITE output Resource Comparator get Comparator monitor worked Policy total Work 50 100 finally if was Immutable workspace new Working Tree finally monitor done  writeTree statesToSave DataOutputStream IProgressMonitor IOException CoreException monitorFor beginTask totalWork wasImmutable ElementTree getElementTree wasImmutable isImmutable ArrayList ArrayList statesToSave totalWork writeWorkspaceFields subMonitorFor opWork lastTreeTimestamp currentTimeMillis writeInt statesToSave statesToSave entrySet hasNext pluginId getKey pluginId getValue setDeltaExpiration pluginId lastTreeTimestamp totalWork IProject getRoot getProjects ArrayList IProject isOpen getBuildManager createBuildersPersistentInfo addAll writeBuilderPersistentInfo subMonitorFor totalWork ElementTreeWriter ElementTreeWriter ElementTree treesToSave ElementTree toArray ElementTree writeDeltaChain treesToSave ElementTreeWriter D_INFINITE ResourceComparator getComparator totalWork wasImmutable newWorkingTree
protected void write Tree Project project int depth throws Core Exception long start System current Time Millis I Path tree Location workspace get Meta Area get Tree Location For project true I Path temp Location workspace get Meta Area get Backup Location For tree Location try Safe File Output Stream safe new Safe File Output Stream tree Location toOS String temp Location toOS String try Data Output Stream output new Data Output Stream safe output write Int I Core Constants WORKSPACE TREE VERSION 2 write Tree project output null finally safe close catch IO Exception e String msg Policy bind resources write Meta project get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE METADATA tree Location msg e if Policy DEBUG SAVE TREE System out println Save tree for project get Full Path System current Time Millis start ms NON NLS 1 NON NLS 2 NON NLS 3  writeTree CoreException currentTimeMillis IPath treeLocation getMetaArea getTreeLocationFor IPath tempLocation getMetaArea getBackupLocationFor treeLocation SafeFileOutputStream SafeFileOutputStream treeLocation toOSString tempLocation toOSString DataOutputStream DataOutputStream writeInt ICoreConstants WORKSPACE_TREE_VERSION_2 writeTree IOException writeMeta getFullPath toString ResourceException IResourceStatus FAILED_WRITE_METADATA treeLocation DEBUG_SAVE_TREE getFullPath currentTimeMillis
Attempts to save all the trees for this project the current tree plus a tree for each builder with a previously built state Throws an IO Exception if anything went wrong during save Attempts to close the provided stream at all costs protected void write Tree Project project Data Output Stream output I Progress Monitor monitor throws IO Exception Core Exception monitor Policy monitor For monitor try monitor begin Task null 10 boolean was Immutable false try Obtain a table of String builder name Builder Persistent Info This includes builders that have never been instantiated but already had a last built state Map builder Infos workspace get Build Manager create Builders Persistent Info project List builders builder Infos null new Array List 5 new Array List builder Infos values List trees new Array List builders size 1 monitor worked 1 Make sure the most recent tree is in the array Element Tree current workspace get Element Tree was Immutable current is Immutable current immutable add the tree for each builder to the array write Builder Persistent Info output builders trees Policy sub Monitor For monitor 1 trees add current save the forest Element Tree Writer writer new Element Tree Writer this Element Tree trees To Save Element Tree trees to Array new Element Tree trees size writer write Delta Chain trees To Save project get Full Path Element Tree Writer D INFINITE output Resource Comparator get Comparator monitor worked 8 finally if output null output close if was Immutable workspace new Working Tree finally monitor done  IOException writeTree DataOutputStream IProgressMonitor IOException CoreException monitorFor beginTask wasImmutable BuilderPersistentInfo builderInfos getBuildManager createBuildersPersistentInfo builderInfos ArrayList ArrayList builderInfos ArrayList ElementTree getElementTree wasImmutable isImmutable writeBuilderPersistentInfo subMonitorFor ElementTreeWriter ElementTreeWriter ElementTree treesToSave ElementTree toArray ElementTree writeDeltaChain treesToSave getFullPath ElementTreeWriter D_INFINITE ResourceComparator getComparator wasImmutable newWorkingTree
protected void write Workspace Fields Data Output Stream output I Progress Monitor monitor throws IO Exception Core Exception monitor Policy monitor For monitor try save the next node id output write Long workspace next Node Id save the modification stamp output write Long workspace next Modification Stamp save the marker id counter output write Long workspace next Marker Id save the registered sync partners in the synchronizer Synchronizer workspace get Synchronizer save Partners output finally monitor done  writeWorkspaceFields DataOutputStream IProgressMonitor IOException CoreException monitorFor writeLong nextNodeId writeLong nextModificationStamp writeLong nextMarkerId getSynchronizer savePartners
see I Element Info Flattener read Element I Path Data Input public Object read Element I Path path Data Input input throws IO Exception Assert is Not Null path Assert is Not Null input read the flags and pull out the type int flags input read Int int type flags I Core Constants M TYPE I Core Constants M TYPE START Resource Info info workspace new Element type info read From flags input return info  IElementInfoFlattener readElement IPath DataInput readElement IPath DataInput IOException isNotNull isNotNull readInt ICoreConstants M_TYPE ICoreConstants M_TYPE_START ResourceInfo newElement readFrom
see I Element Info Flattener write Element I Path Object Data Output public void write Element I Path path Object element Data Output output throws IO Exception Assert is Not Null path Assert is Not Null element Assert is Not Null output Resource Info info Resource Info element output write Int info get Flags info write To output  IElementInfoFlattener writeElement IPath DataOutput writeElement IPath DataOutput IOException isNotNull isNotNull isNotNull ResourceInfo ResourceInfo writeInt getFlags writeTo
Reset the snapshot mechanism for the non workspace files This includes the markers and sync info protected void reset Snapshots I Resource resource throws Core Exception Assert is Legal resource get Type I Resource ROOT resource get Type I Resource PROJECT String message delete the snapshot file if any java io File file workspace get Meta Area get Markers Snapshot Location For resource to File if file exists file delete if file exists message Policy bind resources reset Markers NON NLS 1 throw new Resource Exception I Resource Status FAILED DELETE METADATA resource get Full Path message null delete the snapshot file if any file workspace get Meta Area get Sync Info Snapshot Location For resource to File if file exists file delete if file exists message Policy bind resources reset Sync NON NLS 1 throw new Resource Exception I Resource Status FAILED DELETE METADATA resource get Full Path message null if we have the workspace root then recursive over the projects only do open projects since closed ones are saved elsewhere if resource get Type I Resource PROJECT return I Project projects I Workspace Root resource get Projects for int i 0 i projects length i reset Snapshots projects i  resetSnapshots IResource CoreException isLegal getType IResource getType IResource getMetaArea getMarkersSnapshotLocationFor toFile resetMarkers ResourceException IResourceStatus FAILED_DELETE_METADATA getFullPath getMetaArea getSyncInfoSnapshotLocationFor toFile resetSync ResourceException IResourceStatus FAILED_DELETE_METADATA getFullPath getType IResource IProject IWorkspaceRoot getProjects resetSnapshots
public I Status save int kind Project project I Progress Monitor monitor throws Core Exception String end Message null if Policy DEBUG SAVE switch kind case I Save Context FULL SAVE System out println Full save on workspace starting NON NLS 1 end Message Full save on workspace NON NLS 1 break case I Save Context SNAPSHOT System out println Snapshot starting NON NLS 1 end Message Snapshot NON NLS 1 break case I Save Context PROJECT SAVE System out println Save on project project get Full Path starting NON NLS 1 NON NLS 2 end Message Save on project project get Full Path NON NLS 1 NON NLS 2 break long start System current Time Millis monitor Policy monitor For monitor try String message Policy bind resources saving 0 NON NLS 1 monitor begin Task message 6 message Policy bind resources save Warnings NON NLS 1 Multi Status warnings new Multi Status Resources Plugin PI RESOURCES I Status WARNING message null I Scheduling Rule rule project null I Resource project workspace get Root try workspace prepare Operation rule monitor workspace begin Operation false Map contexts compute Save Contexts get Save Participant Plugins kind project broadcast Lifecycle PREPARE TO SAVE contexts warnings Policy sub Monitor For monitor 1 try broadcast Lifecycle SAVING contexts warnings Policy sub Monitor For monitor 1 switch kind case I Save Context FULL SAVE save the complete tree and remember all of the required saved states save Tree contexts Policy sub Monitor For monitor 1 reset the snapshot state init Snap null save master table right after saving tree to ensure correct tree number is saved clean Master Table save all of the markers and all sync info in the workspace persist Markers 0l persist Sync Info 0l visit And Save workspace get Root monitor worked 1 if Policy DEBUG SAVE Policy debug Total Save Markers persist Markers ms NON NLS 1 NON NLS 2 Policy debug Total Save Sync Info persist Sync Info ms NON NLS 1 NON NLS 2 reset the snap shot files reset Snapshots workspace get Root remove unused files remove Unused Safe Tables remove Unused Tree Files workspace get File System Manager get History Store clean write out all metainfo e g workspace project descriptions save Meta Info workspace warnings Policy sub Monitor For monitor 1 break case I Save Context SNAPSHOT snap Tree workspace get Element Tree Policy sub Monitor For monitor 1 snapshot the markers and sync info for the workspace persist Markers 0l persist Sync Info 0l visit And Snap workspace get Root monitor worked 1 if Policy DEBUG SAVE Policy debug Total Snap Markers persist Markers ms NON NLS 1 NON NLS 2 Policy debug Total Snap Sync Info persist Sync Info ms NON NLS 1 NON NLS 2 collapse Trees clear Saved Delta write out all metainfo e g workspace project descriptions save Meta Info workspace warnings Policy sub Monitor For monitor 1 break case I Save Context PROJECT SAVE write Tree project I Resource DEPTH INFINITE monitor worked 1 save markers and sync info visit And Save project monitor worked 1 reset the snapshot file reset Snapshots project I Status result save Meta Info project null if result isOK warnings merge result monitor worked 1 break save contexts commit contexts if kind I Save Context FULL SAVE remove Clear Delta Marks this must be done after commiting save contexts to update participant save numbers save Master Table broadcast Lifecycle DONE SAVING contexts warnings Policy sub Monitor For monitor 1 if Policy DEBUG SAVE end Message null System out println end Message System current Time Millis start ms NON NLS 1 return warnings catch Core Exception e broadcast Lifecycle ROLLBACK contexts warnings Policy sub Monitor For monitor 1 rollback Resources Plugin master table restore Master Table throw e re throw catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule false Policy monitor For null finally monitor done  IStatus IProgressMonitor CoreException endMessage DEBUG_SAVE ISaveContext FULL_SAVE endMessage ISaveContext endMessage ISaveContext PROJECT_SAVE getFullPath endMessage getFullPath currentTimeMillis monitorFor beginTask saveWarnings MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IStatus ISchedulingRule IResource getRoot prepareOperation beginOperation computeSaveContexts getSaveParticipantPlugins broadcastLifecycle PREPARE_TO_SAVE subMonitorFor broadcastLifecycle subMonitorFor ISaveContext FULL_SAVE saveTree subMonitorFor initSnap cleanMasterTable persistMarkers persistSyncInfo visitAndSave getRoot DEBUG_SAVE persistMarkers persistSyncInfo resetSnapshots getRoot removeUnusedSafeTables removeUnusedTreeFiles getFileSystemManager getHistoryStore saveMetaInfo subMonitorFor ISaveContext snapTree getElementTree subMonitorFor persistMarkers persistSyncInfo visitAndSnap getRoot DEBUG_SAVE persistMarkers persistSyncInfo collapseTrees clearSavedDelta saveMetaInfo subMonitorFor ISaveContext PROJECT_SAVE writeTree IResource DEPTH_INFINITE visitAndSave resetSnapshots IStatus saveMetaInfo ISaveContext FULL_SAVE removeClearDeltaMarks saveMasterTable broadcastLifecycle DONE_SAVING subMonitorFor DEBUG_SAVE endMessage endMessage currentTimeMillis CoreException broadcastLifecycle subMonitorFor ResourcesPlugin restoreMasterTable OperationCanceledException getWorkManager operationCanceled endOperation monitorFor
I Element Content Visitor visitor new I Element Content Visitor public boolean visit Element Element Tree tree I Path Requestor requestor Object element Contents Resource Info info Resource Info element Contents if info null try save the markers long start System current Time Millis marker Manager save info requestor markers Output written Types long marker Save Time System current Time Millis start save Times 0 marker Save Time persist Markers marker Save Time save the sync info if we have the workspace root then the output stream will be null if sync Info Output null start System current Time Millis synchronizer save Sync Info info requestor sync Info Output written Partners long sync Info Save Time System current Time Millis start save Times 1 sync Info Save Time persist Sync Info sync Info Save Time catch IO Exception e throw new Wrapped Runtime Exception e don t continue if the current resource is the workspace root only continue for projects return root get Type I Resource ROOT  IElementContentVisitor IElementContentVisitor visitElement ElementTree IPathRequestor elementContents ResourceInfo ResourceInfo elementContents currentTimeMillis markerManager markersOutput writtenTypes markerSaveTime currentTimeMillis saveTimes markerSaveTime persistMarkers markerSaveTime syncInfoOutput currentTimeMillis saveSyncInfo syncInfoOutput writtenPartners syncInfoSaveTime currentTimeMillis saveTimes syncInfoSaveTime persistSyncInfo syncInfoSaveTime IOException WrappedRuntimeException getType IResource
Visit the given resource to depth infinite and write out extra information like markers and sync info To be called during a full save and project save FIXME This method is ugly Fix it up and look at merging with visit And Snap public void visit And Save final I Resource root throws Core Exception Ensure we have either a project or the workspace root Assert is Legal root get Type I Resource ROOT root get Type I Resource PROJECT only write out info for accessible resources if root is Accessible return Setup vars final Synchronizer synchronizer Synchronizer workspace get Synchronizer final Marker Manager marker Manager workspace get Marker Manager I Path markers Location workspace get Meta Area get Markers Location For root I Path markers Temp Location workspace get Meta Area get Backup Location For markers Location I Path sync Info Location workspace get Meta Area get Sync Info Location For root I Path sync Info Temp Location workspace get Meta Area get Backup Location For sync Info Location final List written Types new Array List 5 final List written Partners new Array List synchronizer registry size Data Output Stream o1 null Data Output Stream o2 null String message Create the output streams try o1 new Data Output Stream new Safe File Output Stream markers Location toOS String markers Temp Location toOS String we don t store the sync info for the workspace root so don t create an empty file if root get Type I Resource ROOT o2 new Data Output Stream new Safe File Output Stream sync Info Location toOS String sync Info Temp Location toOS String catch IO Exception e if o1 null try o1 close catch IO Exception e2 ignore message Policy bind resources write Meta root get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE METADATA root get Full Path message e final Data Output Stream markers Output o1 final Data Output Stream sync Info Output o2 The following 2 piece array will hold a running total of the times taken to save markers and sync Info respectively This will cut down on the number of statements printed out as we would get 2 statements for each resource otherwise final long save Times new long 2 Create the visitor I Element Content Visitor visitor new I Element Content Visitor public boolean visit Element Element Tree tree I Path Requestor requestor Object element Contents Resource Info info Resource Info element Contents if info null try save the markers long start System current Time Millis marker Manager save info requestor markers Output written Types long marker Save Time System current Time Millis start save Times 0 marker Save Time persist Markers marker Save Time save the sync info if we have the workspace root then the output stream will be null if sync Info Output null start System current Time Millis synchronizer save Sync Info info requestor sync Info Output written Partners long sync Info Save Time System current Time Millis start save Times 1 sync Info Save Time persist Sync Info sync Info Save Time catch IO Exception e throw new Wrapped Runtime Exception e don t continue if the current resource is the workspace root only continue for projects return root get Type I Resource ROOT Call the visitor try try new Element Tree Iterator workspace get Element Tree root get Full Path iterate visitor catch Wrapped Runtime Exception e throw IO Exception e get Target Exception if Policy DEBUG SAVE MARKERS System out println Save Markers for root get Full Path save Times 0 ms NON NLS 1 NON NLS 2 NON NLS 3 if Policy DEBUG SAVE SYNCINFO System out println Save Sync Info for root get Full Path save Times 1 ms NON NLS 1 NON NLS 2 NON NLS 3 remove Garbage markers Output markers Location markers Temp Location if we have the workspace root the output stream will be null and we don t have to perform cleanup code if sync Info Output null remove Garbage sync Info Output sync Info Location sync Info Temp Location catch IO Exception e message Policy bind resources write Meta root get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE METADATA root get Full Path message e finally if markers Output null try markers Output close catch IO Exception e ignore if sync Info Output null try sync Info Output close catch IO Exception e ignore recurse over the projects in the workspace if we were given the workspace root if root get Type I Resource PROJECT return I Project projects I Workspace Root root get Projects for int i 0 i projects length i visit And Save projects i  visitAndSnap visitAndSave IResource CoreException isLegal getType IResource getType IResource isAccessible getSynchronizer MarkerManager markerManager getMarkerManager IPath markersLocation getMetaArea getMarkersLocationFor IPath markersTempLocation getMetaArea getBackupLocationFor markersLocation IPath syncInfoLocation getMetaArea getSyncInfoLocationFor IPath syncInfoTempLocation getMetaArea getBackupLocationFor syncInfoLocation writtenTypes ArrayList writtenPartners ArrayList DataOutputStream DataOutputStream DataOutputStream SafeFileOutputStream markersLocation toOSString markersTempLocation toOSString getType IResource DataOutputStream SafeFileOutputStream syncInfoLocation toOSString syncInfoTempLocation toOSString IOException IOException writeMeta getFullPath toString ResourceException IResourceStatus FAILED_WRITE_METADATA getFullPath DataOutputStream markersOutput DataOutputStream syncInfoOutput syncInfo saveTimes IElementContentVisitor IElementContentVisitor visitElement ElementTree IPathRequestor elementContents ResourceInfo ResourceInfo elementContents currentTimeMillis markerManager markersOutput writtenTypes markerSaveTime currentTimeMillis saveTimes markerSaveTime persistMarkers markerSaveTime syncInfoOutput currentTimeMillis saveSyncInfo syncInfoOutput writtenPartners syncInfoSaveTime currentTimeMillis saveTimes syncInfoSaveTime persistSyncInfo syncInfoSaveTime IOException WrappedRuntimeException getType IResource ElementTreeIterator getElementTree getFullPath WrappedRuntimeException IOException getTargetException DEBUG_SAVE_MARKERS getFullPath saveTimes DEBUG_SAVE_SYNCINFO SyncInfo getFullPath saveTimes removeGarbage markersOutput markersLocation markersTempLocation syncInfoOutput removeGarbage syncInfoOutput syncInfoLocation syncInfoTempLocation IOException writeMeta getFullPath toString ResourceException IResourceStatus FAILED_WRITE_METADATA getFullPath markersOutput markersOutput IOException syncInfoOutput syncInfoOutput IOException getType IResource IProject IWorkspaceRoot getProjects visitAndSave
I Element Content Visitor visitor new I Element Content Visitor public boolean visit Element Element Tree tree I Path Requestor requestor Object element Contents Resource Info info Resource Info element Contents if info null try save the markers long start System current Time Millis marker Manager snap info requestor markers Output long marker Snap Time System current Time Millis start snap Times 0 marker Snap Time persist Markers marker Snap Time save the sync info if we have the workspace root then the output stream will be null if sync Info Output null start System current Time Millis synchronizer snap Sync Info info requestor sync Info Output long sync Info Snap Time System current Time Millis start snap Times 1 sync Info Snap Time persist Sync Info sync Info Snap Time catch IO Exception e throw new Wrapped Runtime Exception e don t continue if the current resource is the workspace root only continue for projects return root get Type I Resource ROOT  IElementContentVisitor IElementContentVisitor visitElement ElementTree IPathRequestor elementContents ResourceInfo ResourceInfo elementContents currentTimeMillis markerManager markersOutput markerSnapTime currentTimeMillis snapTimes markerSnapTime persistMarkers markerSnapTime syncInfoOutput currentTimeMillis snapSyncInfo syncInfoOutput syncInfoSnapTime currentTimeMillis snapTimes syncInfoSnapTime persistSyncInfo syncInfoSnapTime IOException WrappedRuntimeException getType IResource
Visit the given resource to depth infinite and write out extra information like markers and sync info To be called during a snapshot FIXME This method is ugly Fix it up and look at merging with visit And Snap public void visit And Snap final I Resource root throws Core Exception Ensure we have either a project or the workspace root Assert is Legal root get Type I Resource ROOT root get Type I Resource PROJECT only write out info for accessible resources if root is Accessible return Setup vars final Synchronizer synchronizer Synchronizer workspace get Synchronizer final Marker Manager marker Manager workspace get Marker Manager I Path markers Location workspace get Meta Area get Markers Snapshot Location For root I Path sync Info Location workspace get Meta Area get Sync Info Snapshot Location For root Safe Chunky Output Stream safe Marker Stream null Safe Chunky Output Stream safe Sync Info Stream null Data Output Stream o1 null Data Output Stream o2 null String message Create the output streams try safe Marker Stream new Safe Chunky Output Stream markers Location to File o1 new Data Output Stream safe Marker Stream we don t store the sync info for the workspace root so don t create an empty file if root get Type I Resource ROOT safe Sync Info Stream new Safe Chunky Output Stream sync Info Location to File o2 new Data Output Stream safe Sync Info Stream catch IO Exception e if o1 null try o1 close catch IO Exception e2 ignore message Policy bind resources write Meta root get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE METADATA root get Full Path message e final Data Output Stream markers Output o1 final Data Output Stream sync Info Output o2 int marker File Size markers Output size int sync Info File Size safe Sync Info Stream null 1 sync Info Output size The following 2 piece array will hold a running total of the times taken to save markers and sync Info respectively This will cut down on the number of statements printed out as we would get 2 statements for each resource otherwise final long snap Times new long 2 I Element Content Visitor visitor new I Element Content Visitor public boolean visit Element Element Tree tree I Path Requestor requestor Object element Contents Resource Info info Resource Info element Contents if info null try save the markers long start System current Time Millis marker Manager snap info requestor markers Output long marker Snap Time System current Time Millis start snap Times 0 marker Snap Time persist Markers marker Snap Time save the sync info if we have the workspace root then the output stream will be null if sync Info Output null start System current Time Millis synchronizer snap Sync Info info requestor sync Info Output long sync Info Snap Time System current Time Millis start snap Times 1 sync Info Snap Time persist Sync Info sync Info Snap Time catch IO Exception e throw new Wrapped Runtime Exception e don t continue if the current resource is the workspace root only continue for projects return root get Type I Resource ROOT try Call the visitor try new Element Tree Iterator workspace get Element Tree root get Full Path iterate visitor catch Wrapped Runtime Exception e throw IO Exception e get Target Exception if Policy DEBUG SAVE MARKERS System out println Snap Markers for root get Full Path snap Times 0 ms NON NLS 1 NON NLS 2 NON NLS 3 if Policy DEBUG SAVE SYNCINFO System out println Snap Sync Info for root get Full Path snap Times 1 ms NON NLS 1 NON NLS 2 NON NLS 3 if safe Marker Stream null marker File Size markers Output size safe Marker Stream succeed if safe Sync Info Stream null sync Info File Size sync Info Output size safe Sync Info Stream succeed catch IO Exception e message Policy bind resources write Meta root get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status FAILED WRITE METADATA root get Full Path message e finally if markers Output null try markers Output close catch IO Exception e ignore if sync Info Output null try sync Info Output close catch IO Exception e ignore recurse over the projects in the workspace if we were given the workspace root if root get Type I Resource PROJECT return I Project projects I Workspace Root root get Projects for int i 0 i projects length i visit And Snap projects i  visitAndSnap visitAndSnap IResource CoreException isLegal getType IResource getType IResource isAccessible getSynchronizer MarkerManager markerManager getMarkerManager IPath markersLocation getMetaArea getMarkersSnapshotLocationFor IPath syncInfoLocation getMetaArea getSyncInfoSnapshotLocationFor SafeChunkyOutputStream safeMarkerStream SafeChunkyOutputStream safeSyncInfoStream DataOutputStream DataOutputStream safeMarkerStream SafeChunkyOutputStream markersLocation toFile DataOutputStream safeMarkerStream getType IResource safeSyncInfoStream SafeChunkyOutputStream syncInfoLocation toFile DataOutputStream safeSyncInfoStream IOException IOException writeMeta getFullPath toString ResourceException IResourceStatus FAILED_WRITE_METADATA getFullPath DataOutputStream markersOutput DataOutputStream syncInfoOutput markerFileSize markersOutput syncInfoFileSize safeSyncInfoStream syncInfoOutput syncInfo snapTimes IElementContentVisitor IElementContentVisitor visitElement ElementTree IPathRequestor elementContents ResourceInfo ResourceInfo elementContents currentTimeMillis markerManager markersOutput markerSnapTime currentTimeMillis snapTimes markerSnapTime persistMarkers markerSnapTime syncInfoOutput currentTimeMillis snapSyncInfo syncInfoOutput syncInfoSnapTime currentTimeMillis snapTimes syncInfoSnapTime persistSyncInfo syncInfoSnapTime IOException WrappedRuntimeException getType IResource ElementTreeIterator getElementTree getFullPath WrappedRuntimeException IOException getTargetException DEBUG_SAVE_MARKERS getFullPath snapTimes DEBUG_SAVE_SYNCINFO SyncInfo getFullPath snapTimes safeMarkerStream markerFileSize markersOutput safeMarkerStream safeSyncInfoStream syncInfoFileSize syncInfoOutput safeSyncInfoStream IOException writeMeta getFullPath toString ResourceException IResourceStatus FAILED_WRITE_METADATA getFullPath markersOutput markersOutput IOException syncInfoOutput syncInfoOutput IOException getType IResource IProject IWorkspaceRoot getProjects visitAndSnap
protected void write Builder Persistent Info Data Output Stream output List builders List trees I Progress Monitor monitor throws IO Exception monitor Policy monitor For monitor try write the number of builders we are saving output write Int builders size for int i 0 i builders size i Builder Persistent Info info Builder Persistent Info builders get i output writeUTF info get Project Name output writeUTF info get Builder Name write interesting projects I Project interesting Projects info get Interesting Projects output write Int interesting Projects length for int j 0 j interesting Projects length j output writeUTF interesting Projects j get Name Element Tree last info get Last Built Tree if last null try to be resilient if a builder has no last built tree this shouldn t happen but save must be robust Resources Plugin get Plugin get Log log new Status I Status ERROR Resources Plugin PI RESOURCES 1 Internal Error builder had null tree info get Builder Name NON NLS 1 this is an internal error new Runtime Exception last workspace get Element Tree trees add last finally monitor done  writeBuilderPersistentInfo DataOutputStream IProgressMonitor IOException monitorFor writeInt BuilderPersistentInfo BuilderPersistentInfo getProjectName getBuilderName IProject interestingProjects getInterestingProjects writeInt interestingProjects interestingProjects interestingProjects getName ElementTree getLastBuiltTree ResourcesPlugin getPlugin getLog IStatus ResourcesPlugin PI_RESOURCES getBuilderName RuntimeException getElementTree

public Synchronizer Workspace workspace super this workspace workspace this writer new Sync Info Writer workspace this  SyncInfoWriter
see I Synchronizer accept Qualified Name I Resource I Resource Visitor int public void accept Qualified Name partner I Resource resource I Resource Visitor visitor int depth throws Core Exception Assert is Legal partner null Assert is Legal resource null Assert is Legal visitor null if we don t have sync info for the given identifier then skip it if get Sync Info partner resource null visit the resource and if the visitor says to stop the recursion then return if visitor visit resource return adjust depth if necessary if depth I Resource DEPTH ZERO resource get Type I Resource FILE return if depth I Resource DEPTH ONE depth I Resource DEPTH ZERO otherwise recurse over the children I Resource children I Container resource members for int i 0 i children length i accept partner children i visitor depth  ISynchronizer QualifiedName IResource IResourceVisitor QualifiedName IResource IResourceVisitor CoreException isLegal isLegal isLegal getSyncInfo IResource DEPTH_ZERO getType IResource IResource DEPTH_ONE IResource DEPTH_ZERO IResource IContainer
see I Synchronizer add Qualified Name public void add Qualified Name partner Assert is Legal partner null registry add partner  ISynchronizer QualifiedName QualifiedName isLegal
I Resource Visitor visitor new I Resource Visitor public boolean visit I Resource resource throws Core Exception only need to flush sync info if there is sync info if get Sync Info partner resource null set Sync Info partner resource null return true  IResourceVisitor IResourceVisitor IResource CoreException getSyncInfo setSyncInfo
I Workspace Runnable body new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception I Resource Visitor visitor new I Resource Visitor public boolean visit I Resource resource throws Core Exception only need to flush sync info if there is sync info if get Sync Info partner resource null set Sync Info partner resource null return true root accept visitor depth true  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException IResourceVisitor IResourceVisitor IResource CoreException getSyncInfo setSyncInfo
see I Synchronizer flush Sync Info Qualified Name I Resource int public void flush Sync Info final Qualified Name partner final I Resource root final int depth throws Core Exception Assert is Legal partner null Assert is Legal root null I Workspace Runnable body new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception I Resource Visitor visitor new I Resource Visitor public boolean visit I Resource resource throws Core Exception only need to flush sync info if there is sync info if get Sync Info partner resource null set Sync Info partner resource null return true root accept visitor depth true workspace run body root I Resource NONE null  ISynchronizer flushSyncInfo QualifiedName IResource flushSyncInfo QualifiedName IResource CoreException isLegal isLegal IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException IResourceVisitor IResourceVisitor IResource CoreException getSyncInfo setSyncInfo IResource
see I Synchronizer get Partners public Qualified Name get Partners return Qualified Name registry to Array new Qualified Name registry size  ISynchronizer getPartners QualifiedName getPartners QualifiedName toArray QualifiedName
For use by the serialization code protected Set get Registry return registry  getRegistry
see I Synchronizer get Sync Info Qualified Name I Resource public byte get Sync Info Qualified Name partner I Resource resource throws Core Exception Assert is Legal partner null Assert is Legal resource null if is Registered partner String message Policy bind synchronizer partner Not Registered partner to String NON NLS 1 throw new Resource Exception new Resource Status I Resource Status PARTNER NOT REGISTERED message namespace check if the resource doesn t exist then return null Resource Info info workspace get Resource Info resource get Full Path true false return info null null info get Sync Info partner true  ISynchronizer getSyncInfo QualifiedName IResource getSyncInfo QualifiedName IResource CoreException isLegal isLegal isRegistered partnerNotRegistered toString ResourceException ResourceStatus IResourceStatus PARTNER_NOT_REGISTERED ResourceInfo getResourceInfo getFullPath getSyncInfo
protected boolean is Registered Qualified Name partner Assert is Legal partner null return registry contains partner  isRegistered QualifiedName isLegal
see save Partners Data Output Stream public void read Partners Data Input Stream input throws Core Exception Sync Info Reader reader new Sync Info Reader workspace this reader read Partners input  savePartners DataOutputStream readPartners DataInputStream CoreException SyncInfoReader SyncInfoReader readPartners
public void restore I Resource resource I Progress Monitor monitor throws Core Exception first restore from the last save and then apply any snapshots restore From Save resource restore From Snap resource  IResource IProgressMonitor CoreException restoreFromSave restoreFromSnap
protected void restore From Save I Resource resource throws Core Exception I Path source Location workspace get Meta Area get Sync Info Location For resource I Path temp Location workspace get Meta Area get Backup Location For source Location if source Location to File exists temp Location to File exists return try Data Input Stream input new Data Input Stream new Safe File Input Stream source Location toOS String temp Location toOS String try Sync Info Reader reader new Sync Info Reader workspace this reader read Sync Info input finally input close catch IO Exception e String msg Policy bind resources read Meta source Location to String NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA source Location msg e  restoreFromSave IResource CoreException IPath sourceLocation getMetaArea getSyncInfoLocationFor IPath tempLocation getMetaArea getBackupLocationFor sourceLocation sourceLocation toFile tempLocation toFile DataInputStream DataInputStream SafeFileInputStream sourceLocation toOSString tempLocation toOSString SyncInfoReader SyncInfoReader readSyncInfo IOException readMeta sourceLocation toString ResourceException IResourceStatus FAILED_READ_METADATA sourceLocation
protected void restore From Snap I Resource resource I Path source Location workspace get Meta Area get Sync Info Snapshot Location For resource if source Location to File exists return try Data Input Stream input new Data Input Stream new Safe Chunky Input Stream source Location to File try Sync Info Snap Reader reader new Sync Info Snap Reader workspace this while true reader read Sync Info input catch EOF Exception eof ignore end of file proceed with what we successfully read finally input close catch Exception e only log the exception we should not fail restoring the snapshot String msg Policy bind resources read Meta source Location to String NON NLS 1 Resources Plugin get Plugin get Log log new Resource Status I Resource Status FAILED READ METADATA source Location msg e  restoreFromSnap IResource IPath sourceLocation getMetaArea getSyncInfoSnapshotLocationFor sourceLocation toFile DataInputStream DataInputStream SafeChunkyInputStream sourceLocation toFile SyncInfoSnapReader SyncInfoSnapReader readSyncInfo EOFException readMeta sourceLocation toString ResourcesPlugin getPlugin getLog ResourceStatus IResourceStatus FAILED_READ_METADATA sourceLocation
see I Synchronizer remove Qualified Name public void remove Qualified Name partner Assert is Legal partner null if is Registered partner remove all sync info for this partner try flush Sync Info partner workspace get Root I Resource DEPTH INFINITE registry remove partner catch Core Exception e XXX flush needs to be more resilient and not throw exceptions all the time Resources Plugin get Plugin get Log log e get Status  ISynchronizer QualifiedName QualifiedName isLegal isRegistered flushSyncInfo getRoot IResource DEPTH_INFINITE CoreException ResourcesPlugin getPlugin getLog getStatus
public void save Partners Data Output Stream output throws IO Exception writer save Partners output  savePartners DataOutputStream IOException savePartners
public void save Sync Info Resource Info info I Path Requestor requestor Data Output Stream output List written Partners throws IO Exception writer save Sync Info info requestor output written Partners  saveSyncInfo ResourceInfo IPathRequestor DataOutputStream writtenPartners IOException saveSyncInfo writtenPartners
protected void set Registry Set registry this registry registry  setRegistry
see I Synchronizer set Sync Info Qualified Name I Resource byte public void set Sync Info Qualified Name partner I Resource resource byte info throws Core Exception Assert is Legal partner null Assert is Legal resource null try workspace prepare Operation resource null workspace begin Operation true if is Registered partner String message Policy bind synchronizer partner Not Registered partner to String NON NLS 1 throw new Resource Exception new Resource Status I Resource Status PARTNER NOT REGISTERED message we do not store sync info on the workspace root if resource get Type I Resource ROOT return if the resource doesn t yet exist then create a phantom so we can set the sync info on it Resource target Resource resource Resource Info resource Info workspace get Resource Info target get Full Path true false int flags target get Flags resource Info if target exists flags false if info null return else workspace create Resource resource true resource Info target get Resource Info true true resource Info set Sync Info partner info resource Info increment Sync Info Generation Count resource Info set I Core Constants M SYNCINFO SNAP DIRTY flags target get Flags resource Info if target is Phantom flags resource Info get Sync Info false null Multi Status status new Multi Status Resources Plugin PI RESOURCES I Resource Status INTERNAL ERROR Policy bind resources delete Problem null NON NLS 1 Resource resource delete Resource false status if status isOK throw new Resource Exception status finally workspace end Operation resource false null  ISynchronizer setSyncInfo QualifiedName IResource setSyncInfo QualifiedName IResource CoreException isLegal isLegal prepareOperation beginOperation isRegistered partnerNotRegistered toString ResourceException ResourceStatus IResourceStatus PARTNER_NOT_REGISTERED getType IResource ResourceInfo resourceInfo getResourceInfo getFullPath getFlags resourceInfo createResource resourceInfo getResourceInfo resourceInfo setSyncInfo resourceInfo incrementSyncInfoGenerationCount resourceInfo ICoreConstants M_SYNCINFO_SNAP_DIRTY getFlags resourceInfo isPhantom resourceInfo getSyncInfo MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus INTERNAL_ERROR deleteProblem deleteResource ResourceException endOperation
public void snap Sync Info Resource Info info I Path Requestor requestor Data Output Stream output throws IO Exception writer snap Sync Info info requestor output  snapSyncInfo ResourceInfo IPathRequestor DataOutputStream IOException snapSyncInfo

public Sync Info Reader Workspace workspace Synchronizer synchronizer super this workspace workspace this synchronizer synchronizer  SyncInfoReader
Returns the appropriate reader for the given version protected Sync Info Reader get Reader int format Version throws IO Exception switch format Version case 2 return new SyncInfoReader 2 workspace synchronizer case 3 return new SyncInfoReader 3 workspace synchronizer default throw new IO Exception Policy bind resources format NON NLS 1  SyncInfoReader getReader formatVersion IOException formatVersion SyncInfoReader_2 SyncInfoReader_3 IOException
public void read Partners Data Input Stream input throws Core Exception try int size input read Int Set registry new Hash Set size for int i 0 i size i String qualifier input readUTF String local input readUTF registry add new Qualified Name qualifier local synchronizer set Registry registry catch IO Exception e String message Policy bind resources read Sync e to String NON NLS 1 throw new Resource Exception new Resource Status I Resource Status INTERNAL ERROR message  readPartners DataInputStream CoreException readInt HashSet QualifiedName setRegistry IOException readSync toString ResourceException ResourceStatus IResourceStatus INTERNAL_ERROR
public void read Sync Info Data Input Stream input throws IO Exception Core Exception dispatch to the appropriate reader depending on the version of the file int format Version read Version Number input Sync Info Reader reader get Reader format Version reader read Sync Info input  readSyncInfo DataInputStream IOException CoreException formatVersion readVersionNumber SyncInfoReader getReader formatVersion readSyncInfo
protected static int read Version Number Data Input Stream input throws IO Exception return input read Int  readVersionNumber DataInputStream IOException readInt

public static final int QNAME 2 public SyncInfoReader 2 Workspace workspace Synchronizer synchronizer super workspace synchronizer  SyncInfoReader_2
SAVE FILE VERSION ID RESOURCE VERSION ID int RESOURCE RESOURCE PATH SIZE SYNCINFO RESOURCE PATH String SIZE int SYNCINFO TYPE BYTES TYPE INDEX QNAME INDEX int int QNAME int String BYTES byte public void read Sync Info Data Input Stream input throws IO Exception Core Exception try List read Partners new Array List 5 while true I Path path new Path input readUTF read Sync Info path input read Partners catch EOF Exception e ignore end of file  SAVE_FILE VERSION_ID VERSION_ID RESOURCE_PATH RESOURCE_PATH readSyncInfo DataInputStream IOException CoreException readPartners ArrayList IPath readSyncInfo readPartners EOFException
private void read Sync Info I Path path Data Input Stream input List read Partners throws IO Exception Core Exception int size input read Int Object Map table new Object Map size for int i 0 i size i Qualified Name name null int type input read Int switch type case QNAME String qualifier input readUTF String local input readUTF name new Qualified Name qualifier local read Partners add name break case INDEX name Qualified Name read Partners get input read Int break default if we get here then the sync info file is corrupt String msg Policy bind resources read Sync path null path to String NON NLS 1 NON NLS 2 throw new Resource Exception I Resource Status FAILED READ METADATA path msg null read the bytes int length input read Int byte bytes new byte length input read Fully bytes put them in the table table put name bytes set the table on the resource info Resource Info info workspace get Resource Info path true false if info null return info set Sync Info table info clear I Core Constants M SYNCINFO SNAP DIRTY  readSyncInfo IPath DataInputStream readPartners IOException CoreException readInt ObjectMap ObjectMap QualifiedName readInt QualifiedName readPartners QualifiedName readPartners readInt readSync toString ResourceException IResourceStatus FAILED_READ_METADATA readInt readFully ResourceInfo getResourceInfo setSyncInfo ICoreConstants M_SYNCINFO_SNAP_DIRTY

public static final byte QNAME 2 public SyncInfoReader 3 Workspace workspace Synchronizer synchronizer super workspace synchronizer  SyncInfoReader_3
SAVE FILE VERSION ID RESOURCE VERSION ID int RESOURCE RESOURCE PATH SIZE SYNCINFO RESOURCE PATH String SIZE int SYNCINFO TYPE BYTES TYPE INDEX QNAME INDEX byte int QNAME byte String BYTES byte public void read Sync Info Data Input Stream input throws IO Exception Core Exception try List read Partners new Array List 5 while true I Path path new Path input readUTF read Sync Info path input read Partners catch EOF Exception e ignore end of file  SAVE_FILE VERSION_ID VERSION_ID RESOURCE_PATH RESOURCE_PATH readSyncInfo DataInputStream IOException CoreException readPartners ArrayList IPath readSyncInfo readPartners EOFException
private void read Sync Info I Path path Data Input Stream input List read Partners throws IO Exception Core Exception int size input read Int Object Map table new Object Map size for int i 0 i size i Qualified Name name null byte type input read Byte switch type case QNAME String qualifier input readUTF String local input readUTF name new Qualified Name qualifier local read Partners add name break case INDEX name Qualified Name read Partners get input read Int break default if we get here then the sync info file is corrupt String msg Policy bind resources read Sync path null path to String NON NLS 1 NON NLS 2 throw new Resource Exception I Resource Status FAILED READ METADATA path msg null read the bytes int length input read Int byte bytes new byte length input read Fully bytes put them in the table table put name bytes set the table on the resource info Resource Info info workspace get Resource Info path true false if info null return info set Sync Info table info clear I Core Constants M SYNCINFO SNAP DIRTY  readSyncInfo IPath DataInputStream readPartners IOException CoreException readInt ObjectMap ObjectMap QualifiedName readByte QualifiedName readPartners QualifiedName readPartners readInt readSync toString ResourceException IResourceStatus FAILED_READ_METADATA readInt readFully ResourceInfo getResourceInfo setSyncInfo ICoreConstants M_SYNCINFO_SNAP_DIRTY

public Sync Info Snap Reader Workspace workspace Synchronizer synchronizer super this workspace workspace this synchronizer synchronizer  SyncInfoSnapReader
Returns the appropriate reader for the given version protected Sync Info Snap Reader get Reader int format Version throws IO Exception switch format Version case 3 return new SyncInfoSnapReader 3 workspace synchronizer default throw new IO Exception Policy bind resources format NON NLS 1  SyncInfoSnapReader getReader formatVersion IOException formatVersion SyncInfoSnapReader_3 IOException
public void read Partners Data Input Stream input throws Core Exception try int size input read Int Set registry new Hash Set size for int i 0 i size i String qualifier input readUTF String local input readUTF registry add new Qualified Name qualifier local synchronizer set Registry registry catch IO Exception e String message Policy bind resources read Sync e to String NON NLS 1 throw new Resource Exception new Resource Status I Resource Status INTERNAL ERROR message  readPartners DataInputStream CoreException readInt HashSet QualifiedName setRegistry IOException readSync toString ResourceException ResourceStatus IResourceStatus INTERNAL_ERROR
public void read Sync Info Data Input Stream input throws IO Exception dispatch to the appropriate reader depending on the version of the file int format Version read Version Number input Sync Info Snap Reader reader get Reader format Version reader read Sync Info input  readSyncInfo DataInputStream IOException formatVersion readVersionNumber SyncInfoSnapReader getReader formatVersion readSyncInfo
protected static int read Version Number Data Input Stream input throws IO Exception return input read Int  readVersionNumber DataInputStream IOException readInt

public class SyncInfoSnapReader 3 extends Sync Info Snap Reader public SyncInfoSnapReader 3 Workspace workspace Synchronizer synchronizer super workspace synchronizer  SyncInfoSnapReader_3 SyncInfoSnapReader SyncInfoSnapReader_3
private Object Map internal Read Sync Info Data Input Stream input throws IO Exception int size input read Int Object Map map new Object Map size for int i 0 i size i read the qualified name String qualifier input readUTF String local input readUTF Qualified Name name new Qualified Name qualifier local read the bytes int length input read Int byte bytes new byte length input read Fully bytes put them in the table map put name bytes return map  ObjectMap internalReadSyncInfo DataInputStream IOException readInt ObjectMap ObjectMap QualifiedName QualifiedName readInt readFully
SNAP FILE VERSION ID RESOURCE VERSION ID int RESOURCE RESOURCE PATH SIZE SYNCINFO RESOURCE PATH String SIZE int SYNCINFO QNAME BYTES QNAME String String BYTES byte public void read Sync Info Data Input Stream input throws IO Exception I Path path new Path input readUTF Object Map map internal Read Sync Info input set the table on the resource info Resource Info info workspace get Resource Info path true false if info null return info set Sync Info map info clear I Core Constants M SYNCINFO SNAP DIRTY  SNAP_FILE VERSION_ID VERSION_ID RESOURCE_PATH RESOURCE_PATH readSyncInfo DataInputStream IOException IPath ObjectMap internalReadSyncInfo ResourceInfo getResourceInfo setSyncInfo ICoreConstants M_SYNCINFO_SNAP_DIRTY

public Sync Info Writer Workspace workspace Synchronizer synchronizer super this workspace workspace this synchronizer synchronizer  SyncInfoWriter
public void save Partners Data Output Stream output throws IO Exception Set registry synchronizer get Registry output write Int registry size for Iterator i registry iterator i has Next Qualified Name qname Qualified Name i next output writeUTF qname get Qualifier output writeUTF qname get Local Name  savePartners DataOutputStream IOException getRegistry writeInt hasNext QualifiedName QualifiedName getQualifier getLocalName
SAVE FILE VERSION ID RESOURCE VERSION ID int RESOURCE RESOURCE PATH SIZE SYNCINFO RESOURCE PATH String SIZE int SYNCINFO TYPE BYTES TYPE INDEX QNAME INDEX byte int QNAME byte String BYTES byte public void save Sync Info Resource Info info I Path Requestor requestor Data Output Stream output List written Partners throws IO Exception Map table info get Sync Info false if table null return if this is the first sync info that we have written then write the version id for the file if output size 0 output write Int SYNCINFO SAVE VERSION output writeUTF requestor request Path to String output write Int table size for Iterator i table entry Set iterator i has Next Map Entry entry Map Entry i next Qualified Name name Qualified Name entry get Key if we have already written the partner name once then write an integer constant to represent it instead to remove duplication int index written Partners index Of name if index 1 FIXME what to do about null qualifier output write Byte QNAME output writeUTF name get Qualifier output writeUTF name get Local Name written Partners add name else output write Byte INDEX output write Int index byte bytes byte entry get Value output write Int bytes length output write bytes  SAVE_FILE VERSION_ID VERSION_ID RESOURCE_PATH RESOURCE_PATH saveSyncInfo ResourceInfo IPathRequestor DataOutputStream writtenPartners IOException getSyncInfo writeInt SYNCINFO_SAVE_VERSION requestPath toString writeInt entrySet hasNext QualifiedName QualifiedName getKey writtenPartners indexOf writeByte getQualifier getLocalName writtenPartners writeByte writeInt getValue writeInt
SNAP FILE VERSION ID RESOURCE VERSION ID int RESOURCE RESOURCE PATH SIZE SYNCINFO RESOURCE PATH String SIZE int SYNCINFO QNAME BYTES QNAME String String BYTES byte public void snap Sync Info Resource Info info I Path Requestor requestor Data Output Stream output throws IO Exception if info is Set I Core Constants M SYNCINFO SNAP DIRTY return Map table info get Sync Info false if table null return write the version id for the snapshot output write Int SYNCINFO SNAP VERSION output writeUTF requestor request Path to String output write Int table size for Iterator i table entry Set iterator i has Next Map Entry entry Map Entry i next Qualified Name name Qualified Name entry get Key output writeUTF name get Qualifier output writeUTF name get Local Name byte bytes byte entry get Value output write Int bytes length output write bytes info clear I Core Constants M SYNCINFO SNAP DIRTY  SNAP_FILE VERSION_ID VERSION_ID RESOURCE_PATH RESOURCE_PATH snapSyncInfo ResourceInfo IPathRequestor DataOutputStream IOException isSet ICoreConstants M_SYNCINFO_SNAP_DIRTY getSyncInfo writeInt SYNCINFO_SNAP_VERSION requestPath toString writeInt entrySet hasNext QualifiedName QualifiedName getKey getQualifier getLocalName getValue writeInt ICoreConstants M_SYNCINFO_SNAP_DIRTY

public class Testing Support Returns the save manager s master table public static Properties get Master Table return Workspace Resources Plugin get Workspace get Save Manager get Master Table  TestingSupport getMasterTable ResourcesPlugin getWorkspace getSaveManager getMasterTable
Returns a copy of the session properties for the given resource If the resource is not accessible or any problems occur accessing it then code null code is returned param resource the resource to get the properties from return the resource s session properties or code null code since 2 1 public static Map get Session Properties I Resource resource Resource Info info Resource resource get Resource Info true false if info null return null return info session Properties null null Map info session Properties clone  getSessionProperties IResource ResourceInfo getResourceInfo sessionProperties sessionProperties
Installs the given move delete hook implementation in the given workspace This overrides the normal workspace behavior Subsequent calls to code I Resource delete code and code move code will call the given hook instead of the one contributed to the extension point Use code null code to restore the default workspace behavior param workspace the workspace param hook the hook implementation or code null code to restore the default workspace behavior public static void install Move Delete Hook I Workspace workspace I Move Delete Hook hook Workspace ws Workspace workspace if hook null ws move Delete Hook hook else ws move Delete Hook null ws initialize Move Delete Hook  IResource installMoveDeleteHook IWorkspace IMoveDeleteHook moveDeleteHook moveDeleteHook initializeMoveDeleteHook
Blocks the calling thread until auto build completes deprecated to be removed before release 3 0 since 3 0 public static void wait For Auto Build try org eclipse core runtime Platform get Job Manager join Resources Plugin FAMILY AUTO BUILD null catch Interrupted Exception e e print Stack Trace throw new Runtime Exception Interrupted while waiting for build NON NLS 1  waitForAutoBuild getJobManager ResourcesPlugin FAMILY_AUTO_BUILD InterruptedException printStackTrace RuntimeException
Blocks the calling thread until background snapshot completes since 3 0 public static void wait For Snapshot try Workspace Resources Plugin get Workspace get Save Manager snapshot Job join catch Interrupted Exception e e print Stack Trace throw new Runtime Exception Interrupted while waiting for snapshot NON NLS 1  waitForSnapshot ResourcesPlugin getWorkspace getSaveManager snapshotJob InterruptedException printStackTrace RuntimeException
Class cannot be instantiated private Testing Support not allowed  TestingSupport

class Notify Rule implements I Scheduling Rule public boolean contains I Scheduling Rule rule return rule instanceof I Resource rule get Class equals Notify Rule class  NotifyRule ISchedulingRule ISchedulingRule IResource getClass NotifyRule
public boolean is Conflicting I Scheduling Rule rule return contains rule  isConflicting ISchedulingRule
public Work Manager Workspace workspace this workspace workspace this job Manager Platform get Job Manager this lock job Manager new Lock  WorkManager jobManager getJobManager jobManager newLock
Releases the workspace lock without changing the nested operation depth Must be followed eventually by end Unprotected Any begin Unprotected end Unprotected pair must be done entirely within the scope of a check In check Out pair Returns the old lock depth see end Unprotected int public int begin Unprotected int depth lock get Depth for int i 0 i depth i lock release return depth  endUnprotected beginUnprotected endUnprotected checkIn checkOut endUnprotected beginUnprotected getDepth
An operation calls this method and it only returns when the operation is free to run public void check In I Scheduling Rule rule I Progress Monitor monitor throws Core Exception boolean success false try if workspace is Tree Locked String msg Policy bind resources cannot Modify NON NLS 1 throw new Resource Exception I Resource Status WORKSPACE LOCKED null msg null job Manager begin Rule rule monitor lock acquire increment Prepared Operations success true finally remember if we failed to check in so we can avoid check out if success check In Failed set Boolean TRUE  checkIn ISchedulingRule IProgressMonitor CoreException isTreeLocked cannotModify ResourceException IResourceStatus WORKSPACE_LOCKED jobManager beginRule incrementPreparedOperations checkInFailed
Inform that an operation has finished public synchronized void check Out I Scheduling Rule rule decrement Prepared Operations rebalance Nested Operations reset state if this is the end of a top level operation if prepared Operations 0 operation Canceled has Build Changes false try lock release finally end rule in finally in case lock release throws an exception job Manager end Rule rule  checkOut ISchedulingRule decrementPreparedOperations rebalanceNestedOperations preparedOperations operationCanceled hasBuildChanges jobManager endRule
Returns true if the check in for this thread failed in which case the check out and other end of operation code should not run p The failure flag is reset immediately after calling this method Subsequent calls to this method will indicate no failure unless a new failure has occurred return code true code if the check In failed and code false code otherwise public boolean check In Failed I Scheduling Rule rule if check In Failed get null clear the failure flag for this thread check In Failed set null must still end the rule even in the case of failure if workspace is Tree Locked job Manager end Rule rule return true return false  checkIn checkInFailed ISchedulingRule checkInFailed checkInFailed isTreeLocked jobManager endRule
This method can only be safelly called from inside a workspace operation Should NOT be called from outside a prepare Operation end Operation block private void decrement Prepared Operations prepared Operations  prepareOperation endOperation decrementPreparedOperations preparedOperations
Re acquires the workspace lock that was temporarily released during an operation and restores the old lock depth see begin Unprotected public void end Unprotected int depth for int i 0 i depth i lock acquire  beginUnprotected endUnprotected
Returns the work manager s lock I Lock get Lock return lock  ILock getLock
This method can only be safelly called from inside a workspace operation Should NOT be called from outside a prepare Operation end Operation block public synchronized int get Prepared Operation Depth return prepared Operations  prepareOperation endOperation getPreparedOperationDepth preparedOperations
This method can only be safelly called from inside a workspace operation Should NOT be called from outside a prepare Operation end Operation block void increment Nested Operations nested Operations  prepareOperation endOperation incrementNestedOperations nestedOperations
This method can only be safelly called from inside a workspace operation Should NOT be called from outside a prepare Operation end Operation block private void increment Prepared Operations prepared Operations  prepareOperation endOperation incrementPreparedOperations preparedOperations
Returns true if the nested operation depth is the same as the prepared operation depth and false otherwise This method can only be safelly called from inside a workspace operation Should NOT be called from outside a prepare Operation end Operation block boolean is Balanced return nested Operations prepared Operations  prepareOperation endOperation isBalanced nestedOperations preparedOperations
This method can only be safelly called from inside a workspace operation Should NOT be called from outside a prepare Operation end Operation block public void operation Canceled operation Canceled true  prepareOperation endOperation operationCanceled operationCanceled
Used to make things stable again after an operation has failed between a workspace prepare Operation and workspace begin Operation This method can only be safelly called from inside a workspace operation Should NOT be called from outside a prepare Operation end Operation block public void rebalance Nested Operations nested Operations prepared Operations  prepareOperation beginOperation prepareOperation endOperation rebalanceNestedOperations nestedOperations preparedOperations
Indicates if the operation that has just completed may potentially require a build public void set Build boolean has Changes has Build Changes has Build Changes has Changes  setBuild hasChanges hasBuildChanges hasBuildChanges hasChanges
This method can only be safely called from inside a workspace operation Should NOT be called from outside a prepare Operation end Operation block public boolean should Build if has Build Changes if operation Canceled return Policy build On Cancel return true return false  prepareOperation endOperation shouldBuild hasBuildChanges operationCanceled buildOnCancel
public void shutdown I Progress Monitor monitor do nothing  IProgressMonitor
public void startup I Progress Monitor monitor do nothing  IProgressMonitor
Returns true if the workspace lock has already been acquired by this thread and false otherwise public boolean is Lock Already Acquired boolean result false try boolean success lock acquire 0L if success if lock depth is greater than one then we already owned it before result lock get Depth 1 lock release catch Interrupted Exception e ignore return result  isLockAlreadyAcquired getDepth InterruptedException
Returns the scheduling rule used during resource change notifications public I Scheduling Rule get Notify Rule return notify Rule  ISchedulingRule getNotifyRule notifyRule

public Workspace super local Meta Area new Local Meta Area tree new Element Tree tree should only be modified during operations tree immutable tree Locked Thread current Thread tree set Tree Data new Element I Resource ROOT  localMetaArea LocalMetaArea ElementTree treeLocked currentThread setTreeData newElement IResource
Indicates that a build is about to occur Broadcasts the necessary deltas before the build starts Note that this will cause POST BUILD to be automatically done at the end of the operation in which the build occurs protected void about To Build throws Core Exception fire a POST CHANGE first to ensure everyone is up to date before firing PRE BUILD broadcast Changes I Resource Change Event POST CHANGE true broadcast Changes I Resource Change Event PRE BUILD false  POST_BUILD aboutToBuild CoreException POST_CHANGE PRE_BUILD broadcastChanges IResourceChangeEvent POST_CHANGE broadcastChanges IResourceChangeEvent PRE_BUILD
Adds a listener for internal workspace lifecycle events There is no way to remove lifecycle listeners public void add Lifecycle Listener I Lifecycle Listener listener lifecycle Listeners add listener  addLifecycleListener ILifecycleListener lifecycleListeners
see I Workspace add Resource Change Listener I Resource Change Listener public void add Resource Change Listener I Resource Change Listener listener notification Manager add Listener listener I Resource Change Event PRE CLOSE I Resource Change Event PRE DELETE I Resource Change Event POST CHANGE  IWorkspace addResourceChangeListener IResourceChangeListener addResourceChangeListener IResourceChangeListener notificationManager addListener IResourceChangeEvent PRE_CLOSE IResourceChangeEvent PRE_DELETE IResourceChangeEvent POST_CHANGE
see I Workspace add Resource Change Listener I Resource Change Listener int public void add Resource Change Listener I Resource Change Listener listener int event Mask notification Manager add Listener listener event Mask  IWorkspace addResourceChangeListener IResourceChangeListener addResourceChangeListener IResourceChangeListener eventMask notificationManager addListener eventMask
public I Saved State add Save Participant Plugin plugin I Save Participant participant throws Core Exception Assert is Not Null plugin Plugin must not be null NON NLS 1 Assert is Not Null participant Participant must not be null NON NLS 1 return save Manager add Participant plugin participant  ISavedState addSaveParticipant ISaveParticipant CoreException isNotNull isNotNull saveManager addParticipant
public void begin Operation boolean create New Tree throws Core Exception Work Manager work Manager get Work Manager work Manager increment Nested Operations if work Manager is Balanced Assert is True false Operation was not prepared NON NLS 1 if work Manager get Prepared Operation Depth 1 if create New Tree tree is Immutable new Working Tree return stash the current tree as the basis for this operation operation Tree tree if create New Tree tree is Immutable new Working Tree  beginOperation createNewTree CoreException WorkManager workManager getWorkManager workManager incrementNestedOperations workManager isBalanced isTrue workManager getPreparedOperationDepth createNewTree isImmutable newWorkingTree operationTree createNewTree isImmutable newWorkingTree
protected void broadcast Changes int type boolean lock Tree throws Core Exception notification Manager broadcast Changes tree type lock Tree  broadcastChanges lockTree CoreException notificationManager broadcastChanges lockTree
Broadcasts an internal workspace lifecycle event to interested internal listeners protected void broadcast Event Lifecycle Event event throws Core Exception for Iterator it lifecycle Listeners iterator it has Next I Lifecycle Listener listener I Lifecycle Listener it next listener handle Event event  broadcastEvent LifecycleEvent CoreException lifecycleListeners hasNext ILifecycleListener ILifecycleListener handleEvent
public void build int trigger I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor final I Scheduling Rule rule get Rule Factory build Rule try monitor begin Task null Policy op Work try prepare Operation rule monitor begin Operation true about To Build get Build Manager build trigger Policy sub Monitor For monitor Policy op Work broadcast Changes I Resource Change Event POST BUILD false finally building may close the tree but we are still inside an operation so open it if tree is Immutable new Working Tree end Operation rule false Policy sub Monitor For monitor Policy build Work finally monitor done  IProgressMonitor CoreException monitorFor ISchedulingRule getRuleFactory buildRule beginTask opWork prepareOperation beginOperation aboutToBuild getBuildManager subMonitorFor opWork broadcastChanges IResourceChangeEvent POST_BUILD isImmutable newWorkingTree endOperation subMonitorFor buildWork
public void checkpoint boolean build try final I Scheduling Rule rule get Work Manager get Notify Rule try prepare Operation rule null begin Operation true broadcast Changes I Resource Change Event POST CHANGE true finally end Operation rule build null catch Core Exception e Resources Plugin get Plugin get Log log e get Status  ISchedulingRule getWorkManager getNotifyRule prepareOperation beginOperation broadcastChanges IResourceChangeEvent POST_CHANGE endOperation CoreException ResourcesPlugin getPlugin getLog getStatus
Deletes all the files and directories from the given root down inclusive Returns false if we could not delete some file or an exception occurred at any point in the deletion Even if an exception occurs a best effort is made to continue deleting public static boolean clear java io File root boolean result clear Children root try if root exists result root delete catch Exception e result false return result  clearChildren
Deletes all the files and directories from the given root down except for the root itself Returns false if we could not delete some file or an exception occurred at any point in the deletion Even if an exception occurs a best effort is made to continue deleting public static boolean clear Children java io File root boolean result true if root is Directory String list root list for some unknown reason list can return null Just skip the children If it does if list null for int i 0 i list length i result clear new java io File root list i return result  clearChildren isDirectory
Closes this workspace ignored if this workspace is not open The state of this workspace is not saved before the workspace is shut down p If the workspace was saved immediately prior to closing it will have the same set of projects open or closed when reopened for a subsequent session Otherwise closing a workspace may lose some or all of the changes made since the last save or snapshot p p Note that session properties are discarded when a workspace is closed p p This method is long running progress and cancellation are provided by the given progress monitor p param monitor a progress monitor or code null code if progress reporting and cancellation are not desired exception Core Exception if the workspace could not be shutdown public void close I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String msg Policy bind resources closing 0 NON NLS 1 int root Count tree get Child Count Path ROOT monitor begin Task msg root Count 2 monitor sub Task msg this operation will never end because the world is going away try prepare Operation get Root monitor shutdown notification first to avoid calling third parties during shutdown notification Manager shutdown null if is Open begin Operation true I Project projects get Root get Projects for int i 0 i projects length i notify managers of closing so they can cleanup broadcast Event Lifecycle Event new Event Lifecycle Event PRE PROJECT CLOSE projects i monitor worked 1 empty the workspace tree so we leave in a clean state delete Resource get Root open Flag false end Operation not needed here finally Shutdown needs to be executed anyway Doesn t matter if the workspace was not open shutdown Policy sub Monitor For monitor 2 Sub Progress Monitor SUPPRESS SUBTASK LABEL finally monitor done  CoreException IProgressMonitor CoreException monitorFor rootCount getChildCount beginTask rootCount subTask prepareOperation getRoot notificationManager isOpen beginOperation IProject getRoot getProjects broadcastEvent LifecycleEvent newEvent LifecycleEvent PRE_PROJECT_CLOSE deleteResource getRoot openFlag endOperation subMonitorFor SubProgressMonitor SUPPRESS_SUBTASK_LABEL
Implementation of API method declared on I Workspace see I Workspace compute Prerequisite Order I Project deprecated Replaced by code I Workspace compute Project Order code which produces a more usable result when there are cycles in project reference graph public I Project compute Prerequisite Order I Project targets return compute Prerequisite Order1 targets  IWorkspace IWorkspace computePrerequisiteOrder IProject IWorkspace computeProjectOrder IProject computePrerequisiteOrder IProject computePrerequisiteOrder1
private I Project compute Prerequisite Order1 I Project projects I Workspace Project Order r compute Project Order projects if r has Cycles return new I Project r projects new I Project 0 when there are cycles we need to remove all knotted projects from r projects to form result 0 and merge all knots to form result 1 Set I Project bad Set bad new Hash Set Set I Project bad Set keepers new Hash Set Arrays as List r projects for int i 0 i r knots length i I Project knot r knots i for int j 0 j knot length j I Project project knot j keep only selected projects in knot if keepers contains project bad add project I Project result2 new I Project bad size bad to Array result2 List I Project p List p new Linked List p add All Arrays as List r projects for Iterator it p list Iterator it has Next I Project project I Project it next if bad contains project remove knotted projects from the main answer it remove I Project result1 new I Project p size p to Array result1 return new I Project result1 result2  IProject computePrerequisiteOrder1 IProject IWorkspace ProjectOrder computeProjectOrder hasCycles IProject IProject IProject HashSet IProject HashSet asList IProject IProject IProject IProject toArray IProject LinkedList addAll asList listIterator hasNext IProject IProject IProject IProject toArray IProject
public Project Order compute Project Order I Project projects compute the full project order for all accessible projects Project Order full Project Order compute Full Project Order full Project Order projects contains no inaccessible projects but might contain accessible projects omitted from projects optimize common case where projects includes everything int accessible Count 0 for int i 0 i projects length i if projects i is Accessible accessible Count no filtering required if the subset accounts for the full list if accessible Count full Project Order projects length return full Project Order otherwise we need to eliminate mention of other projects from full Project Order projects Set I Project keepers Set keepers new Hash Set Arrays as List projects List I Project p List reduced Projects new Array List full Project Order projects length for int i 0 i full Project Order projects length i I Project project full Project Order projects i if keepers contains project remove projects not in the initial subset reduced Projects add project I Project p1 new I Project reduced Projects size reduced Projects to Array p1 and from full Project Order knots List I Project k List reduced Knots new Array List full Project Order knots length for int i 0 i full Project Order knots length i I Project knot full Project Order knots i List x new Array List knot length for int j 0 j knot length j I Project project knot j if keepers contains project x add project keep knots containing 2 or more projects in the specified subset if x size 1 reduced Knots add x to Array new I Project x size I Project k1 new I Project reduced Knots size okay to use to Array here because reduced Knots elements are I Project reduced Knots to Array k1 return new Project Order p1 k1 length 0 k1  ProjectOrder computeProjectOrder IProject ProjectOrder fullProjectOrder computeFullProjectOrder fullProjectOrder accessibleCount isAccessible accessibleCount accessibleCount fullProjectOrder fullProjectOrder fullProjectOrder IProject HashSet asList IProject reducedProjects ArrayList fullProjectOrder fullProjectOrder IProject fullProjectOrder reducedProjects IProject IProject reducedProjects reducedProjects toArray fullProjectOrder IProject reducedKnots ArrayList fullProjectOrder fullProjectOrder IProject fullProjectOrder ArrayList IProject reducedKnots toArray IProject IProject IProject reducedKnots toArray reducedKnots IProject reducedKnots toArray ProjectOrder
Sorted Set all Accessible Projects new Tree Set new Comparator public int compare Object x Object y I Project px I Project x I Project py I Project y return py get Name compare To px get Name  SortedSet allAccessibleProjects TreeSet IProject IProject IProject IProject getName compareTo getName
Computes the global total ordering of all open projects in the workspace based on project references If an existing and open project P references another existing and open project Q also included in the list then Q should come before P in the resulting ordering Closed and non existent projects are ignored and will not appear in the result References to non existent or closed projects are also ignored as are any self references p When there are choices the choice is made in a reasonably stable way For example given an arbitrary choice between two projects the one with the lower collating project name is usually selected p p When the project reference graph contains cyclic references it is impossible to honor all of the relationships In this case the result ignores as few relationships as possible For example if P2 references P1 P4 references P3 and P2 and P3 reference each other then exactly one of the relationships between P2 and P3 will have to be ignored The outcome will be either P1 P2 P3 P4 or P1 P3 P2 P4 The result also contains complete details of any cycles present p return result describing the global project order since 2 1 private Project Order compute Full Project Order determine the full set of accessible projects in the workspace order the set in descending alphabetical order of project name Sorted Set all Accessible Projects new Tree Set new Comparator public int compare Object x Object y I Project px I Project x I Project py I Project y return py get Name compare To px get Name I Project all Projects get Root get Projects List I Project edges List edges new Array List all Projects length for int i 0 i all Projects length i Project project Project all Projects i ignore projects that are not accessible if project is Accessible continue Project Description description project internal Get Description if description null continue obtain both static and dynamic project references I Project refs description get All References false all Accessible Projects add project for int j 0 j refs length j I Project ref refs j ignore self references and references to projects that are not accessible if ref is Accessible ref equals project edges add new I Project project ref Project Order full Project Order Compute Project Order compute Project Order all Accessible Projects edges return full Project Order  ProjectOrder computeFullProjectOrder SortedSet allAccessibleProjects TreeSet IProject IProject IProject IProject getName compareTo getName IProject allProjects getRoot getProjects IProject ArrayList allProjects allProjects allProjects isAccessible ProjectDescription internalGetDescription IProject getAllReferences allAccessibleProjects IProject isAccessible IProject ProjectOrder fullProjectOrder ComputeProjectOrder computeProjectOrder allAccessibleProjects fullProjectOrder
public I Status copy I Resource resources I Path destination int update Flags I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try int op Work Math max resources length 1 int total Work Policy total Work op Work Policy op Work String message Policy bind resources copying 0 NON NLS 1 monitor begin Task message total Work Assert is Legal resources null if resources length 0 return Status OK STATUS to avoid concurrent changes to this array resources I Resource resources clone I Path parent Path null message Policy bind resources copy Problem NON NLS 1 Multi Status status new Multi Status Resources Plugin PI RESOURCES I Resource Status INTERNAL ERROR message null try prepare Operation get Root monitor begin Operation true for int i 0 i resources length i Policy check Canceled monitor I Resource resource resources i if resource null is Duplicate resources i monitor worked 1 continue test siblings if parent Path null parent Path resource get Full Path remove Last Segments 1 if parent Path equals resource get Full Path remove Last Segments 1 test copy requirements try I Path destination Path destination append resource get Name I Status requirements Resource resource check Copy Requirements destination Path resource get Type update Flags if requirements isOK try resource copy destination Path update Flags Policy sub Monitor For monitor 1 catch Core Exception e status merge e get Status else monitor worked 1 status merge requirements catch Core Exception e monitor worked 1 status merge e get Status else monitor worked 1 message Policy bind resources not Child resources i get Full Path to String parent Path to String NON NLS 1 status merge new Resource Status I Resource Status OPERATION FAILED resources i get Full Path message catch Operation Canceled Exception e get Work Manager operation Canceled throw e finally end Operation get Root true Policy sub Monitor For monitor total Work op Work if status matches I Status ERROR throw new Resource Exception status return status isOK Status OK STATUS I Status status finally monitor done  IStatus IResource IPath updateFlags IProgressMonitor CoreException monitorFor opWork totalWork totalWork opWork opWork beginTask totalWork isLegal OK_STATUS IResource IPath parentPath copyProblem MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus INTERNAL_ERROR prepareOperation getRoot beginOperation checkCanceled IResource isDuplicate parentPath parentPath getFullPath removeLastSegments parentPath getFullPath removeLastSegments IPath destinationPath getName IStatus checkCopyRequirements destinationPath getType updateFlags destinationPath updateFlags subMonitorFor CoreException getStatus CoreException getStatus notChild getFullPath toString parentPath toString ResourceStatus IResourceStatus OPERATION_FAILED getFullPath OperationCanceledException getWorkManager operationCanceled endOperation getRoot subMonitorFor totalWork opWork IStatus ResourceException OK_STATUS IStatus
see I Workspace copy I Resource I Path boolean I Progress Monitor public I Status copy I Resource resources I Path destination boolean force I Progress Monitor monitor throws Core Exception int update Flags force I Resource FORCE I Resource NONE return copy resources destination update Flags monitor  IWorkspace IResource IPath IProgressMonitor IStatus IResource IPath IProgressMonitor CoreException updateFlags IResource IResource updateFlags
protected void copy Tree I Resource source I Path destination int depth int update Flags boolean keep Sync Info throws Core Exception retrieve the resource at the destination if there is one phantoms included if there isn t one then create a new handle based on the type that we are trying to copy I Resource destination Resource get Root find Member destination true if destination Resource null int destination Type if source get Type I Resource FILE destination Type I Resource FILE else if destination segment Count 1 destination Type I Resource PROJECT else destination Type I Resource FOLDER destination Resource new Resource destination destination Type create the resource at the destination Resource Info source Info Resource source get Resource Info true false if destination Resource get Type source get Type source Info Resource Info source Info clone source Info set Type destination Resource get Type Resource Info new Info create Resource destination Resource source Info false false keep Sync Info get set the node id from the source s resource info so we can later put it in the info for the destination resource This will help us generate the proper deltas indicating a move rather than a add delete long nodeid Resource source get Resource Info true false get Node Id new Info set Node Id nodeid preserve local sync info Resource Info old Info Resource source get Resource Info true false new Info set Flags new Info get Flags old Info get Flags M LOCAL EXISTS forget content related caching flags new Info clear M CONTENT CACHE update link locations in project descriptions if source is Linked Link Description link Description if update Flags I Resource SHALLOW 0 for shallow move the destination is also a linked resource new Info set I Core Constants M LINK link Description new Link Description destination Resource source get Raw Location else for deep move the destination is not a linked resource new Info clear I Core Constants M LINK link Description null Project project Project destination Resource get Project project internal Get Description set Link Location destination Resource get Name link Description project write Description update Flags do the recursion if we have a file then it has no members so return otherwise recursively call this method on the container s members if the depth tells us to if depth I Resource DEPTH ZERO source get Type I Resource FILE return if depth I Resource DEPTH ONE depth I Resource DEPTH ZERO I Resource children I Container source members I Container INCLUDE TEAM PRIVATE MEMBERS for int i 0 i children length i I Resource child children i I Path child Path destination append child get Name copy Tree child child Path depth update Flags keep Sync Info  copyTree IResource IPath updateFlags keepSyncInfo CoreException IResource destinationResource getRoot findMember destinationResource destinationType getType IResource destinationType IResource segmentCount destinationType IResource destinationType IResource destinationResource newResource destinationType ResourceInfo sourceInfo getResourceInfo destinationResource getType getType sourceInfo ResourceInfo sourceInfo sourceInfo setType destinationResource getType ResourceInfo newInfo createResource destinationResource sourceInfo keepSyncInfo getResourceInfo getNodeId newInfo setNodeId ResourceInfo oldInfo getResourceInfo newInfo setFlags newInfo getFlags oldInfo getFlags M_LOCAL_EXISTS newInfo M_CONTENT_CACHE isLinked LinkDescription linkDescription updateFlags IResource newInfo ICoreConstants M_LINK linkDescription LinkDescription destinationResource getRawLocation newInfo ICoreConstants M_LINK linkDescription destinationResource getProject internalGetDescription setLinkLocation destinationResource getName linkDescription writeDescription updateFlags IResource DEPTH_ZERO getType IResource IResource DEPTH_ONE IResource DEPTH_ZERO IResource IContainer IContainer INCLUDE_TEAM_PRIVATE_MEMBERS IResource IPath childPath getName copyTree childPath updateFlags keepSyncInfo
I Element Content Visitor visitor new I Element Content Visitor public boolean visit Element Element Tree a Tree I Path Requestor requestor Object element Contents if phantom Resource Info element Contents is Set M PHANTOM count 0 return true  IElementContentVisitor IElementContentVisitor visitElement ElementTree aTree IPathRequestor elementContents ResourceInfo elementContents isSet M_PHANTOM
Returns the number of resources in a subtree of the resource tree param root The subtree to count resources for param depth The depth of the subtree to count param phantom If true phantoms are included otherwise they are ignored public int count Resources I Path root int depth final boolean phantom if tree includes root return 0 switch depth case I Resource DEPTH ZERO return 1 case I Resource DEPTH ONE return 1 tree get Child Count root case I Resource DEPTH INFINITE final int count new int 1 I Element Content Visitor visitor new I Element Content Visitor public boolean visit Element Element Tree a Tree I Path Requestor requestor Object element Contents if phantom Resource Info element Contents is Set M PHANTOM count 0 return true new Element Tree Iterator tree root iterate visitor return count 0 return 0  countResources IPath IResource DEPTH_ZERO IResource DEPTH_ONE getChildCount IResource DEPTH_INFINITE IElementContentVisitor IElementContentVisitor visitElement ElementTree aTree IPathRequestor elementContents ResourceInfo elementContents isSet M_PHANTOM ElementTreeIterator
public Resource Info create Resource I Resource resource Resource Info info boolean phantom boolean overwrite throws Core Exception return create Resource resource info phantom overwrite false  ResourceInfo createResource IResource ResourceInfo CoreException createResource
public Resource Info create Resource I Resource resource Resource Info info boolean phantom boolean overwrite boolean keep Sync Info throws Core Exception info info null new Element resource get Type Resource Info info clone Resource Info original get Resource Info resource get Full Path true false if phantom info set M PHANTOM info set Modification Stamp I Resource NULL STAMP if nothing existed at the destination then just create the resource in the tree if original null we got here from a copy move we don t want to copy over any sync info from the source so clear it if keep Sync Info info set Sync Info null tree create Element resource get Full Path info else if overwrite true then slam the new info into the tree even if one existed before if overwrite phantom original is Set M PHANTOM copy over the sync info and flags from the old resource info since we are replacing a phantom with a real resource DO NOT set the sync info dirty flag because we want to preserve the old sync info so its not dirty XXX must copy over the generic sync info from the old info to the new XXX do we really need to clone the sync info here if keep Sync Info info set Sync Info original get Sync Info true mark the markers bit as dirty so we snapshot an empty marker set for the new resource info set I Core Constants M MARKERS SNAP DIRTY tree set Element Data resource get Full Path info else String message Policy bind resources must Not Exist resource get Full Path to String NON NLS 1 throw new Resource Exception I Resource Status RESOURCE EXISTS resource get Full Path message null return info  ResourceInfo createResource IResource ResourceInfo keepSyncInfo CoreException newElement getType ResourceInfo ResourceInfo getResourceInfo getFullPath M_PHANTOM setModificationStamp IResource NULL_STAMP keepSyncInfo setSyncInfo createElement getFullPath isSet M_PHANTOM keepSyncInfo setSyncInfo getSyncInfo ICoreConstants M_MARKERS_SNAP_DIRTY setElementData getFullPath mustNotExist getFullPath toString ResourceException IResourceStatus RESOURCE_EXISTS getFullPath
information is preserved public Resource Info create Resource I Resource resource boolean phantom throws Core Exception return create Resource resource null phantom false  ResourceInfo createResource IResource CoreException createResource
public Resource Info create Resource I Resource resource boolean phantom boolean overwrite throws Core Exception return create Resource resource null phantom overwrite  ResourceInfo createResource IResource CoreException createResource
public static Workspace Description default Workspace Description return new Workspace Description Workspace NON NLS 1  WorkspaceDescription defaultWorkspaceDescription WorkspaceDescription
public I Status delete I Resource resources int update Flags I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try int op Work Math max resources length 1 int total Work Policy total Work op Work Policy op Work String message Policy bind resources deleting 0 NON NLS 1 monitor begin Task message total Work message Policy bind resources delete Problem NON NLS 1 Multi Status result new Multi Status Resources Plugin PI RESOURCES I Resource Status INTERNAL ERROR message null if resources length 0 return result resources I Resource resources clone to avoid concurrent changes to this array try prepare Operation get Root monitor begin Operation true for int i 0 i resources length i Policy check Canceled monitor Resource resource Resource resources i if resource null monitor worked 1 continue try resource delete update Flags Policy sub Monitor For monitor 1 catch Core Exception e Don t really care about the exception unless the resource is still around Resource Info info resource get Resource Info false false if resource exists resource get Flags info false message Policy bind resources couldnot Delete resource get Full Path to String NON NLS 1 result merge new Resource Status I Resource Status FAILED DELETE LOCAL resource get Full Path message result merge e get Status if result matches I Status ERROR throw new Resource Exception result return result catch Operation Canceled Exception e get Work Manager operation Canceled throw e finally end Operation get Root true Policy sub Monitor For monitor total Work op Work finally monitor done  IStatus IResource updateFlags IProgressMonitor CoreException monitorFor opWork totalWork totalWork opWork opWork beginTask totalWork deleteProblem MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus INTERNAL_ERROR IResource prepareOperation getRoot beginOperation checkCanceled updateFlags subMonitorFor CoreException ResourceInfo getResourceInfo getFlags couldnotDelete getFullPath toString ResourceStatus IResourceStatus FAILED_DELETE_LOCAL getFullPath getStatus IStatus ResourceException OperationCanceledException getWorkManager operationCanceled endOperation getRoot subMonitorFor totalWork opWork
public I Status delete I Resource resources boolean force I Progress Monitor monitor throws Core Exception int update Flags force I Resource FORCE I Resource NONE update Flags I Resource KEEP HISTORY return delete resources update Flags monitor  IStatus IResource IProgressMonitor CoreException updateFlags IResource IResource updateFlags IResource KEEP_HISTORY updateFlags
public void delete Markers I Marker markers throws Core Exception Assert is Not Null markers if markers length 0 return clone to avoid outside changes markers I Marker markers clone try prepare Operation null null begin Operation true for int i 0 i markers length i if markers i null markers i get Resource null marker Manager remove Marker markers i get Resource markers i get Id finally end Operation null false null  deleteMarkers IMarker CoreException isNotNull IMarker prepareOperation beginOperation getResource markerManager removeMarker getResource getId endOperation
Delete the given resource from the current tree of the receiver This method simply removes the resource from the tree No cleanup or other management is done Use I Resource delete for proper deletion If the given resource is the root all of its children i e all projects are deleted but the root is left void delete Resource I Resource resource I Path path resource get Full Path if path equals Path ROOT I Project children get Root get Projects for int i 0 i children length i tree delete Element children i get Full Path else tree delete Element path  IResource deleteResource IResource IPath getFullPath IProject getRoot getProjects deleteElement getFullPath deleteElement
For debugging purposes only Dumps plugin stats to console public void dump Stats Event Stats dump Stats  dumpStats EventStats dumpStats
End an operation group of resource changes Notify interested parties that resource changes have taken place All registered resource change listeners are notified If autobuilding is enabled a build is run public void end Operation I Scheduling Rule rule boolean build I Progress Monitor monitor throws Core Exception Work Manager work Manager get Work Manager don t do any end operation work if we failed to check in if work Manager check In Failed rule return This is done in a try finally to ensure that we always decrement the operation count and release the workspace lock This must be done at the end because snapshot and has Changes comparison have to happen without interference from other threads boolean has Tree Changes false boolean depth One false try work Manager set Build build if we are not exiting a top level operation then just decrement the count and return depth One work Manager get Prepared Operation Depth 1 if notification Manager should Notify depth One notification Manager request Notify return do the following in a try finally to ensure that the operation tree is nulled at the end as we are completing a top level operation try notification Manager begin Notify check for a programming error on using begin Operation end Operation Assert is True work Manager get Prepared Operation Depth 0 Mismatched begin end Operation NON NLS 1 At this time we need to rebalance the nested operations It is necessary because build and snapshot should not fail if they are called work Manager rebalance Nested Operations find out if any operation has potentially modified the tree has Tree Changes work Manager should Build double check if the tree has actually changed if has Tree Changes has Tree Changes operation Tree null Element Tree has Changes tree operation Tree Resource Comparator get Comparator false true broadcast Changes I Resource Change Event POST CHANGE true Request a snapshot if we are sufficiently out of date save Manager snapshot If Needed has Tree Changes finally make sure the tree is immutable if we are ending a top level operation if depth One tree immutable operation Tree null else new Working Tree finally work Manager check Out rule if depth One build Manager end Top Level has Tree Changes  endOperation ISchedulingRule IProgressMonitor CoreException WorkManager workManager getWorkManager workManager checkInFailed hasChanges hasTreeChanges depthOne workManager setBuild depthOne workManager getPreparedOperationDepth notificationManager shouldNotify depthOne notificationManager requestNotify notificationManager beginNotify beginOperation endOperation isTrue workManager getPreparedOperationDepth endOperation workManager rebalanceNestedOperations hasTreeChanges workManager shouldBuild hasTreeChanges hasTreeChanges operationTree ElementTree hasChanges operationTree ResourceComparator getComparator broadcastChanges IResourceChangeEvent POST_CHANGE saveManager snapshotIfNeeded hasTreeChanges depthOne operationTree newWorkingTree workManager checkOut depthOne buildManager endTopLevel hasTreeChanges
Flush the build order cache for the workspace Only needed if the description does not already have a build order That is if this is really a cache protected void flush Build Order if description get Build Order false null build Order null  flushBuildOrder getBuildOrder buildOrder
see I Workspace forget Saved Tree String public void forget Saved Tree String plugin Id Assert is Not Null plugin Id Plugin Id must not be null NON NLS 1 save Manager forget Saved Tree plugin Id  IWorkspace forgetSavedTree forgetSavedTree pluginId isNotNull pluginId PluginId saveManager forgetSavedTree pluginId
public Alias Manager get Alias Manager return alias Manager  AliasManager getAliasManager aliasManager
Returns this workspace s build manager public Build Manager get Build Manager return build Manager  BuildManager getBuildManager buildManager
Returns the order in which open projects in this workspace will be built p The project build order is based on information specified in the workspace description The projects are built in the order specified by code I Workspace Description get Build Order code closed or non existent projects are ignored and not included in the result If code I Workspace Description get Build Order code is non null the default build order is used again only open projects are included in the result p p The returned value is cached in the code build Order code field p return the list of currently open projects in the workspace in the order in which they would be built by code I Workspace build code see I Workspace build int I Progress Monitor see I Workspace Description get Build Order since 2 1 public I Project get Build Order if build Order null return previously computed and cached project build order return build Order see if a particular build order is specified String order description get Build Order false if order null convert from project names to project handles and eliminate non existent and closed projects List project List new Array List order length for int i 0 i order length i I Project project get Root get Project order i if project is Accessible project List add project build Order new I Project project List size project List to Array build Order else use default project build order computed for all accessible projects in workspace build Order compute Full Project Order projects return build Order  IWorkspaceDescription getBuildOrder IWorkspaceDescription getBuildOrder buildOrder IWorkspace IWorkspace IProgressMonitor IWorkspaceDescription getBuildOrder IProject getBuildOrder buildOrder buildOrder getBuildOrder projectList ArrayList IProject getRoot getProject isAccessible projectList buildOrder IProject projectList projectList toArray buildOrder buildOrder computeFullProjectOrder buildOrder
public Charset Manager get Charset Manager return charset Manager  CharsetManager getCharsetManager charsetManager
public Content Description Manager get Content Description Manager return content Description Manager  ContentDescriptionManager getContentDescriptionManager contentDescriptionManager
public Map get Dangling References I Project projects get Root get Projects Map result new Hash Map projects length for int i 0 i projects length i Project project Project projects i if project is Accessible continue I Project refs project internal Get Description get Referenced Projects false List dangling new Array List refs length for int j 0 j refs length j if refs i exists dangling add refs i if dangling is Empty result put projects i dangling to Array new I Project dangling size return result  getDanglingReferences IProject getRoot getProjects HashMap isAccessible IProject internalGetDescription getReferencedProjects ArrayList isEmpty toArray IProject
public I Workspace Description get Description Workspace Description working Copy default Workspace Description description copy To working Copy return working Copy  IWorkspaceDescription getDescription WorkspaceDescription workingCopy defaultWorkspaceDescription copyTo workingCopy workingCopy
Returns the current element tree for this workspace public Element Tree get Element Tree return tree  ElementTree getElementTree
public File System Resource Manager get File System Manager return file System Manager  FileSystemResourceManager getFileSystemManager fileSystemManager
Returns the marker manager for this workspace public Marker Manager get Marker Manager return marker Manager  MarkerManager getMarkerManager markerManager
public Local Meta Area get Meta Area return local Meta Area  LocalMetaArea getMetaArea localMetaArea
protected I Move Delete Hook get Move Delete Hook if move Delete Hook null initialize Move Delete Hook return move Delete Hook  IMoveDeleteHook getMoveDeleteHook moveDeleteHook initializeMoveDeleteHook moveDeleteHook
see I Workspace get Nature Descriptor String public I Project Nature Descriptor get Nature Descriptor String nature Id return nature Manager get Nature Descriptor nature Id  IWorkspace getNatureDescriptor IProjectNatureDescriptor getNatureDescriptor natureId natureManager getNatureDescriptor natureId
see I Workspace get Nature Descriptors public I Project Nature Descriptor get Nature Descriptors return nature Manager get Nature Descriptors  IWorkspace getNatureDescriptors IProjectNatureDescriptor getNatureDescriptors natureManager getNatureDescriptors
Returns the nature manager for this workspace public Nature Manager get Nature Manager return nature Manager  NatureManager getNatureManager natureManager
public Notification Manager get Notification Manager return notification Manager  NotificationManager getNotificationManager notificationManager
see I Workspace get Path Variable Manager public I Path Variable Manager get Path Variable Manager return path Variable Manager  IWorkspace getPathVariableManager IPathVariableManager getPathVariableManager pathVariableManager
public Property Manager get Property Manager return property Manager  PropertyManager getPropertyManager propertyManager
Returns the refresh manager for this workspace public Refresh Manager get Refresh Manager return refresh Manager  RefreshManager getRefreshManager refreshManager
Returns the resource info for the identified resource null is returned if no such resource can be found If the phantom flag is true phantom resources are considered If the mutable flag is true the info is opened for change This method DOES NOT throw an exception if the resource is not found public Resource Info get Resource Info I Path path boolean phantom boolean mutable try if path segment Count 0 Resource Info info Resource Info tree get Tree Data Assert is Not Null info Tree root info must never be null NON NLS 1 return info Resource Info result null if tree includes path return null if mutable result Resource Info tree open Element Data path else result Resource Info tree get Element Data path if result null phantom result is Set M PHANTOM return null return result catch Illegal Argument Exception e return null  ResourceInfo getResourceInfo IPath segmentCount ResourceInfo ResourceInfo getTreeData isNotNull ResourceInfo ResourceInfo openElementData ResourceInfo getElementData isSet M_PHANTOM IllegalArgumentException
see I Workspace get Root public I Workspace Root get Root return default Root  IWorkspace getRoot IWorkspaceRoot getRoot defaultRoot
public I Resource Rule Factory get Rule Factory note that the rule factory is created lazily because it requires loading the team Hook extension if rule Factory null rule Factory new Rules this return rule Factory  IResourceRuleFactory getRuleFactory teamHook ruleFactory ruleFactory ruleFactory
public Save Manager get Save Manager return save Manager  SaveManager getSaveManager saveManager
see I Workspace get Synchronizer public I Synchronizer get Synchronizer return synchronizer  IWorkspace getSynchronizer ISynchronizer getSynchronizer
Returns the installed team hook Never returns null protected Team Hook get Team Hook if team Hook null initialize Team Hook return team Hook  TeamHook getTeamHook teamHook initializeTeamHook teamHook
We should not have direct references to this field All references should go through this method public Work Manager get Work Manager throws Core Exception if  workManager null String message Policy bind resources shutdown NON NLS 1 throw new Resource Exception new Resource Status I Resource Status INTERNAL ERROR null message return  workManager  WorkManager getWorkManager CoreException _workManager ResourceException ResourceStatus IResourceStatus INTERNAL_ERROR _workManager
A file modification validator hasn t been initialized Check the extension point and try to create a new validator if a user has one defined as an extension protected void initialize Validator should Validate false I Configuration Element configs Platform get Extension Registry get Configuration Elements For Resources Plugin PI RESOURCES Resources Plugin PT FILE MODIFICATION VALIDATOR no one is plugged into the extension point so disable validation if configs null configs length 0 return can only have one defined at a time log a warning disable validation but continue with the set Contents e g don t throw an exception if configs length 1 XXX shoud provide a meaningful status code I Status status new Resource Status I Status ERROR 1 null Policy bind resources one Validator null NON NLS 1 Resources Plugin get Plugin get Log log status return otherwise we have exactly one validator extension Try to create a new instance from the user specified class try I Configuration Element config configs 0 validator I File Modification Validator config create Executable Extension class NON NLS 1 should Validate true catch Core Exception e XXX shoud provide a meaningful status code I Status status new Resource Status I Status ERROR 1 null Policy bind resources init Validator e NON NLS 1 Resources Plugin get Plugin get Log log status  initializeValidator shouldValidate IConfigurationElement getExtensionRegistry getConfigurationElementsFor ResourcesPlugin PI_RESOURCES ResourcesPlugin PT_FILE_MODIFICATION_VALIDATOR setContents IStatus ResourceStatus IStatus oneValidator ResourcesPlugin getPlugin getLog IConfigurationElement IFileModificationValidator createExecutableExtension shouldValidate CoreException IStatus ResourceStatus IStatus initValidator ResourcesPlugin getPlugin getLog
A move delete hook hasn t been initialized Check the extension point and try to create a new hook if a user has one defined as an extension Otherwise use the Core s implementation as the default protected void initialize Move Delete Hook try I Configuration Element configs Platform get Extension Registry get Configuration Elements For Resources Plugin PI RESOURCES Resources Plugin PT MOVE DELETE HOOK no one is plugged into the extension point so disable validation if configs null configs length 0 return can only have one defined at a time log a warning if configs length 1 XXX shoud provide a meaningful status code I Status status new Resource Status I Status ERROR 1 null Policy bind resources one Hook null NON NLS 1 Resources Plugin get Plugin get Log log status return otherwise we have exactly one hook extension Try to create a new instance from the user specified class try I Configuration Element config configs 0 move Delete Hook I Move Delete Hook config create Executable Extension class NON NLS 1 catch Core Exception e XXX shoud provide a meaningful status code I Status status new Resource Status I Status ERROR 1 null Policy bind resources init Hook e NON NLS 1 Resources Plugin get Plugin get Log log status finally for now just use Core s implementation if move Delete Hook null move Delete Hook new Move Delete Hook  initializeMoveDeleteHook IConfigurationElement getExtensionRegistry getConfigurationElementsFor ResourcesPlugin PI_RESOURCES ResourcesPlugin PT_MOVE_DELETE_HOOK IStatus ResourceStatus IStatus oneHook ResourcesPlugin getPlugin getLog IConfigurationElement moveDeleteHook IMoveDeleteHook createExecutableExtension CoreException IStatus ResourceStatus IStatus initHook ResourcesPlugin getPlugin getLog moveDeleteHook moveDeleteHook MoveDeleteHook
A team hook hasn t been initialized Check the extension point and try to create a new hook if a user has one defined as an extension Otherwise use the Core s implementation as the default protected void initialize Team Hook try I Configuration Element configs Platform get Extension Registry get Configuration Elements For Resources Plugin PI RESOURCES Resources Plugin PT TEAM HOOK no one is plugged into the extension point so disable validation if configs null configs length 0 return can only have one defined at a time log a warning if configs length 1 XXX shoud provide a meaningful status code I Status status new Resource Status I Status ERROR 1 null Policy bind resources one Team Hook null NON NLS 1 Resources Plugin get Plugin get Log log status return otherwise we have exactly one hook extension Try to create a new instance from the user specified class try I Configuration Element config configs 0 team Hook Team Hook config create Executable Extension class NON NLS 1 catch Core Exception e XXX shoud provide a meaningful status code I Status status new Resource Status I Status ERROR 1 null Policy bind resources init Team Hook e NON NLS 1 Resources Plugin get Plugin get Log log status finally default to use Core s implementation create anonymous subclass because Team Hook is abstract if team Hook null team Hook new Team Hook empty  initializeTeamHook IConfigurationElement getExtensionRegistry getConfigurationElementsFor ResourcesPlugin PI_RESOURCES ResourcesPlugin PT_TEAM_HOOK IStatus ResourceStatus IStatus oneTeamHook ResourcesPlugin getPlugin getLog IConfigurationElement teamHook TeamHook createExecutableExtension CoreException IStatus ResourceStatus IStatus initTeamHook ResourcesPlugin getPlugin getLog TeamHook teamHook teamHook TeamHook
public Workspace Description internal Get Description return description  WorkspaceDescription internalGetDescription
see I Workspace is Auto Building public boolean is Auto Building return description is Auto Building  IWorkspace isAutoBuilding isAutoBuilding isAutoBuilding
Returns true if the object at the specified position has any other copy in the given array private static boolean is Duplicate Object array int position if array null position array length return false for int j position 1 j 0 j if array j equals array position return true return false  isDuplicate
public boolean is Open return open Flag  isOpen openFlag
Returns true if the given file system locations overlap If both Directions is true this means they are the same or one is a proper prefix of the other If both Directions is false this method only returns true if the locations are the same or the first location is a prefix of the second Returns false if the locations do not overlap Does the right thing with respect to case insensitive platforms protected boolean is Overlapping I Path location1 I Path location2 boolean both Directions I Path one location1 I Path two location2 If we are on a case insensitive file system then convert to all lowercase if Core File System Library is Case Sensitive one new Path location1 toOS String to Lower Case two new Path location2 toOS String to Lower Case return one is Prefix Of two both Directions two is Prefix Of one  bothDirections bothDirections isOverlapping IPath IPath bothDirections IPath IPath CoreFileSystemLibrary isCaseSensitive toOSString toLowerCase toOSString toLowerCase isPrefixOf bothDirections isPrefixOf
see I Workspace is Tree Locked public boolean is Tree Locked return tree Locked Thread current Thread  IWorkspace isTreeLocked isTreeLocked treeLocked currentThread
Link the given tree into the receiver s tree at the specified resource protected void link Trees I Path path Element Tree new Trees tree tree merge Delta Chain path new Trees  linkTrees IPath ElementTree newTrees mergeDeltaChain newTrees
public I Project Description load Project Description I Path path throws Core Exception I Project Description result null IO Exception e null try result new Project Description Reader read path if result null check to see if we are using in the default area or not use java io File for testing equality because it knows better w r t drives and case sensitivity I Path user path remove Last Segments 1 I Path platform Platform get Location append result get Name if user to File equals platform to File result set Location user catch IO Exception ex e ex if result null e null String message Policy bind resources error Read Project path toOS String NON NLS1 NON NLS 1 I Status status new Status I Status ERROR Resources Plugin PI RESOURCES I Resource Status FAILED READ METADATA message e throw new Resource Exception status return result  IProjectDescription loadProjectDescription IPath CoreException IProjectDescription IOException ProjectDescriptionReader IPath removeLastSegments IPath getLocation getName toFile toFile setLocation IOException errorReadProject toOSString IStatus IStatus ResourcesPlugin PI_RESOURCES IResourceStatus FAILED_READ_METADATA ResourceException
public I Status move I Resource resources I Path destination int update Flags I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try int op Work Math max resources length 1 int total Work Policy total Work op Work Policy op Work String message Policy bind resources moving 0 NON NLS 1 monitor begin Task message total Work Assert is Legal resources null if resources length 0 return Status OK STATUS resources I Resource resources clone to avoid concurrent changes to this array I Path parent Path null message Policy bind resources move Problem NON NLS 1 Multi Status status new Multi Status Resources Plugin PI RESOURCES I Resource Status INTERNAL ERROR message null try prepare Operation get Root monitor begin Operation true for int i 0 i resources length i Policy check Canceled monitor Resource resource Resource resources i if resource null is Duplicate resources i monitor worked 1 continue test siblings if parent Path null parent Path resource get Full Path remove Last Segments 1 if parent Path equals resource get Full Path remove Last Segments 1 test move requirements try I Status requirements resource check Move Requirements destination append resource get Name resource get Type update Flags if requirements isOK try resource move destination append resource get Name update Flags Policy sub Monitor For monitor 1 catch Core Exception e status merge e get Status else monitor worked 1 status merge requirements catch Core Exception e monitor worked 1 status merge e get Status else monitor worked 1 message Policy bind resources not Child resource get Full Path to String parent Path to String NON NLS 1 status merge new Resource Status I Resource Status OPERATION FAILED resource get Full Path message catch Operation Canceled Exception e get Work Manager operation Canceled throw e finally end Operation get Root true Policy sub Monitor For monitor total Work op Work if status matches I Status ERROR throw new Resource Exception status return status isOK I Status Status OK STATUS I Status status finally monitor done  IStatus IResource IPath updateFlags IProgressMonitor CoreException monitorFor opWork totalWork totalWork opWork opWork beginTask totalWork isLegal OK_STATUS IResource IPath parentPath moveProblem MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus INTERNAL_ERROR prepareOperation getRoot beginOperation checkCanceled isDuplicate parentPath parentPath getFullPath removeLastSegments parentPath getFullPath removeLastSegments IStatus checkMoveRequirements getName getType updateFlags getName updateFlags subMonitorFor CoreException getStatus CoreException getStatus notChild getFullPath toString parentPath toString ResourceStatus IResourceStatus OPERATION_FAILED getFullPath OperationCanceledException getWorkManager operationCanceled endOperation getRoot subMonitorFor totalWork opWork IStatus ResourceException IStatus OK_STATUS IStatus
public I Status move I Resource resources I Path destination boolean force I Progress Monitor monitor throws Core Exception int update Flags force I Resource FORCE I Resource NONE update Flags I Resource KEEP HISTORY return move resources destination update Flags monitor  IStatus IResource IPath IProgressMonitor CoreException updateFlags IResource IResource updateFlags IResource KEEP_HISTORY updateFlags
Moves this resource s subtree to the destination This operation should only be used by move methods Destination must be a valid destination for this resource The keep Sync Info boolean is used to indicated whether or not the sync info should be moved from the source to the destination package void move Resource source I Path destination int depth int update Flags boolean keep Sync Info throws Core Exception overlay the tree at the destination path preserving any important info in any already existing resource infos copy Tree source destination depth update Flags keep Sync Info source fixup After Move Source  keepSyncInfo IPath updateFlags keepSyncInfo CoreException copyTree updateFlags keepSyncInfo fixupAfterMoveSource
Create and return a new tree element of the given type protected Resource Info new Element int type Resource Info result null switch type case I Resource FILE case I Resource FOLDER result new Resource Info break case I Resource PROJECT result new Project Info break case I Resource ROOT result new Root Info break result set Node Id next Node Id result set Modification Stamp next Modification Stamp result set Type type return result  ResourceInfo newElement ResourceInfo IResource IResource ResourceInfo IResource ProjectInfo IResource RootInfo setNodeId nextNodeId setModificationStamp nextModificationStamp setType
public I Project Description new Project Description String project Name I Project Description result new Project Description result set Name project Name return result  IProjectDescription newProjectDescription projectName IProjectDescription ProjectDescription setName projectName
public Resource new Resource I Path path int type String message switch type case I Resource FOLDER if path segment Count I Core Constants MINIMUM FOLDER SEGMENT LENGTH message Path must include project and resource name path to String NON NLS 1 Assert is Legal false message return new Folder path make Absolute this case I Resource FILE if path segment Count I Core Constants MINIMUM FILE SEGMENT LENGTH message Path must include project and resource name path to String NON NLS 1 Assert is Legal false message return new File path make Absolute this case I Resource PROJECT return Resource get Root get Project path last Segment case I Resource ROOT return Resource get Root Assert is Legal false will never get here because of assertion return null  newResource IPath IResource segmentCount ICoreConstants MINIMUM_FOLDER_SEGMENT_LENGTH toString isLegal makeAbsolute IResource segmentCount ICoreConstants MINIMUM_FILE_SEGMENT_LENGTH toString isLegal makeAbsolute IResource getRoot getProject lastSegment IResource getRoot isLegal
Opens a new mutable element tree layer thus allowing modifications to the tree public Element Tree new Working Tree tree tree new Empty Delta return tree  ElementTree newWorkingTree newEmptyDelta
Returns the next previously unassigned marker id protected long next Marker Id return next Marker Id  nextMarkerId nextMarkerId
public long next Modification Stamp return next Modification Stamp  nextModificationStamp nextModificationStamp
public long next Node Id return next Node Id  nextNodeId nextNodeId
Opens this workspace using the data at its location in the local file system This workspace must not be open If the operation succeeds the result will detail any serious but non fatal problems encountered while opening the workspace The status code will be code OK code if there were no problems An exception is thrown if there are fatal problems opening the workspace in which case the workspace is left closed p This method is long running progress and cancellation are provided by the given progress monitor p param monitor a progress monitor or code null code if progress reporting and cancellation are not desired return status with code code OK code if no problems otherwise status describing any serious but non fatal problems exception Core Exception if the workspace could not be opened Reasons include ul li There is no valid workspace structure at the given location in the local file system li li The workspace structure on disk appears to be hopelessly corrupt li ul see Resources Plugin get Workspace public I Status open I Progress Monitor monitor throws Core Exception This method is not inside an operation because it is the one responsible for creating the Work Manager object who takes care of operations String message Policy bind resources workspace Open NON NLS 1 Assert is True is Open message if get Meta Area has Saved Workspace message Policy bind resources read Workspace Meta NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA Platform get Location message null description new Workspace Preferences description set Defaults Workspace default Workspace Description if we have an old description file read it getting rid of it Workspace Description old Description get Meta Area read Old Workspace if old Description null description copy From old Description Resources Plugin get Plugin save Plugin Preferences create root location local Meta Area location For get Root to File mkdirs I Progress Monitor null Monitor Policy monitor For null startup null Monitor restart the notification manager so it is initialized with the right tree notification Manager startup null open Flag true if crashed refresh Requested try get Root refresh Local I Resource DEPTH INFINITE null catch Core Exception e don t fail entire open if refresh failed just report as minor warning return e get Status return Status OK STATUS  CoreException ResourcesPlugin getWorkspace IStatus IProgressMonitor CoreException WorkManager workspaceOpen isTrue isOpen getMetaArea hasSavedWorkspace readWorkspaceMeta ResourceException IResourceStatus FAILED_READ_METADATA getLocation WorkspacePreferences setDefaults defaultWorkspaceDescription WorkspaceDescription oldDescription getMetaArea readOldWorkspace oldDescription copyFrom oldDescription ResourcesPlugin getPlugin savePluginPreferences localMetaArea locationFor getRoot toFile IProgressMonitor nullMonitor monitorFor nullMonitor notificationManager openFlag refreshRequested getRoot refreshLocal IResource DEPTH_INFINITE CoreException getStatus OK_STATUS
Called before checking the pre conditions of an operation Optionally supply a scheduling rule to determine when the operation is safe to run If a scheduling rule is supplied this method will block until it is safe to run param rule the scheduling rule that describes what this operation intends to modify public void prepare Operation I Scheduling Rule rule I Progress Monitor monitor throws Core Exception make sure autobuild is not running if rule null build Manager interrupt get Work Manager check In rule monitor if is Open String message Policy bind resources workspace Closed NON NLS 1 throw new Resource Exception I Resource Status OPERATION FAILED null message null  prepareOperation ISchedulingRule IProgressMonitor CoreException buildManager getWorkManager checkIn isOpen workspaceClosed ResourceException IResourceStatus OPERATION_FAILED
protected boolean refresh Requested String args Platform get Command Line Args for int i 0 i args length i if args i equals Ignore Case REFRESH ON STARTUP return true return false  refreshRequested getCommandLineArgs equalsIgnoreCase REFRESH_ON_STARTUP
see I Workspace remove Resource Change Listener I Resource Change Listener public void remove Resource Change Listener I Resource Change Listener listener notification Manager remove Listener listener  IWorkspace removeResourceChangeListener IResourceChangeListener removeResourceChangeListener IResourceChangeListener notificationManager removeListener
see I Workspace remove Save Participant Plugin public void remove Save Participant Plugin plugin Assert is Not Null plugin Plugin must not be null NON NLS 1 save Manager remove Participant plugin  IWorkspace removeSaveParticipant removeSaveParticipant isNotNull saveManager removeParticipant
public void run I Workspace Runnable action I Scheduling Rule rule int options I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try monitor begin Task null Policy total Work int depth 1 boolean avoid Notification options I Workspace AVOID UPDATE 0 try prepare Operation rule monitor begin Operation true if avoid Notification avoid Notification notification Manager begin Avoid Notify depth get Work Manager begin Unprotected action run Policy sub Monitor For monitor Policy op Work Sub Progress Monitor PREPEND MAIN LABEL TO SUBTASK catch Operation Canceled Exception e get Work Manager operation Canceled throw e finally if avoid Notification notification Manager end Avoid Notify if depth 0 get Work Manager end Unprotected depth end Operation rule false Policy sub Monitor For monitor Policy build Work finally monitor done  IWorkspaceRunnable ISchedulingRule IProgressMonitor CoreException monitorFor beginTask totalWork avoidNotification IWorkspace AVOID_UPDATE prepareOperation beginOperation avoidNotification avoidNotification notificationManager beginAvoidNotify getWorkManager beginUnprotected subMonitorFor opWork SubProgressMonitor PREPEND_MAIN_LABEL_TO_SUBTASK OperationCanceledException getWorkManager operationCanceled avoidNotification notificationManager endAvoidNotify getWorkManager endUnprotected endOperation subMonitorFor buildWork
see I Workspace run I Workspace Runnable I Progress Monitor public void run I Workspace Runnable action I Progress Monitor monitor throws Core Exception run action default Root I Workspace AVOID UPDATE monitor  IWorkspace IWorkspaceRunnable IProgressMonitor IWorkspaceRunnable IProgressMonitor CoreException defaultRoot IWorkspace AVOID_UPDATE
public I Status save boolean full I Progress Monitor monitor throws Core Exception String message if full according to spec it is illegal to start a full save inside another operation if get Work Manager is Lock Already Acquired message Policy bind resources save Op NON NLS 1 throw new Resource Exception I Resource Status OPERATION FAILED null message new Illegal State Exception return save Manager save I Save Context FULL SAVE null monitor A snapshot was requested Start an operation if not already started and signal that a snapshot should be done at the end try prepare Operation get Root monitor begin Operation false save Manager request Snapshot message Policy bind resources snap Request NON NLS 1 return new Resource Status I Status OK message finally end Operation get Root false null  IStatus IProgressMonitor CoreException getWorkManager isLockAlreadyAcquired saveOp ResourceException IResourceStatus OPERATION_FAILED IllegalStateException saveManager ISaveContext FULL_SAVE prepareOperation getRoot beginOperation saveManager requestSnapshot snapRequest ResourceStatus IStatus endOperation getRoot
public void set Crashed boolean value crashed value  setCrashed
public void set Description I Workspace Description value throws Core Exception if both the old and new description s build orders are null leave the workspace s build order slot because it is caching the computed order Otherwise set the slot to null to force recomputation or building from the description Workspace Description new Description Workspace Description value String new Order new Description get Build Order false if description get Build Order false null new Order null build Order null description copy From new Description Policy setup Auto Build Progress description is Auto Building Resources Plugin get Plugin save Plugin Preferences  setDescription IWorkspaceDescription CoreException WorkspaceDescription newDescription WorkspaceDescription newOrder newDescription getBuildOrder getBuildOrder newOrder buildOrder copyFrom newDescription setupAutoBuildProgress isAutoBuilding ResourcesPlugin getPlugin savePluginPreferences
public void set Tree Locked boolean locked tree Locked locked Thread current Thread null  setTreeLocked treeLocked currentThread
deprecated public void set Workspace Lock Workspace Lock lock do nothing  setWorkspaceLock WorkspaceLock
protected void shutdown I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try I Manager managers build Manager property Manager path Variable Manager charset Manager file System Manager marker Manager save Manager  workManager alias Manager refresh Manager content Description Manager monitor begin Task null managers length String message Policy bind resources shutdown Problems NON NLS 1 Multi Status status new Multi Status Resources Plugin PI RESOURCES I Resource Status INTERNAL ERROR message null best effort to shutdown every object and free resources for int i 0 i managers length i I Manager manager managers i if manager null monitor worked 1 else try manager shutdown Policy sub Monitor For monitor 1 catch Exception e message Policy bind resources shutdown Problems NON NLS 1 status add new Status I Status ERROR Resources Plugin PI RESOURCES I Resource Status INTERNAL ERROR message e build Manager null notification Manager null property Manager null path Variable Manager null file System Manager null marker Manager null synchronizer null save Manager null  workManager null alias Manager null refresh Manager null charset Manager null content Description Manager null if status isOK throw new Core Exception status finally monitor done  IProgressMonitor CoreException monitorFor IManager buildManager propertyManager pathVariableManager charsetManager fileSystemManager markerManager saveManager _workManager aliasManager refreshManager contentDescriptionManager beginTask shutdownProblems MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus INTERNAL_ERROR IManager subMonitorFor shutdownProblems IStatus ResourcesPlugin PI_RESOURCES IResourceStatus INTERNAL_ERROR buildManager notificationManager propertyManager pathVariableManager fileSystemManager markerManager saveManager _workManager aliasManager refreshManager charsetManager contentDescriptionManager CoreException
see I Workspace sort Nature Set String public String sort Nature Set String nature Ids return nature Manager sort Nature Set nature Ids  IWorkspace sortNatureSet sortNatureSet natureIds natureManager sortNatureSet natureIds
protected void startup I Progress Monitor monitor throws Core Exception ensure the tree is locked during the startup notification  workManager new Work Manager this  workManager startup null file System Manager new File System Resource Manager this file System Manager startup monitor property Manager new Property Manager this property Manager startup monitor path Variable Manager new Path Variable Manager path Variable Manager startup null nature Manager new Nature Manager nature Manager startup null build Manager new Build Manager this get Work Manager get Lock build Manager startup null notification Manager new Notification Manager this notification Manager startup null marker Manager new Marker Manager this marker Manager startup null synchronizer new Synchronizer this save Manager new Save Manager this save Manager startup null must start after save manager because read access to tree is needed alias Manager new Alias Manager this alias Manager startup null refresh Manager new Refresh Manager this refresh Manager startup null charset Manager new Charset Manager this charset Manager startup null content Description Manager new Content Description Manager content Description Manager startup null tree Locked null unlock the tree  IProgressMonitor CoreException _workManager WorkManager _workManager fileSystemManager FileSystemResourceManager fileSystemManager propertyManager PropertyManager propertyManager pathVariableManager PathVariableManager pathVariableManager natureManager NatureManager natureManager buildManager BuildManager getWorkManager getLock buildManager notificationManager NotificationManager notificationManager markerManager MarkerManager markerManager saveManager SaveManager saveManager aliasManager AliasManager aliasManager refreshManager RefreshManager refreshManager charsetManager CharsetManager charsetManager contentDescriptionManager ContentDescriptionManager contentDescriptionManager treeLocked
buffer append parent tree get Parent NON NLS 1 I Element Content Visitor visitor new I Element Content Visitor public boolean visit Element Element Tree a Tree I Path Requestor requestor Object element Contents buffer append n requestor request Path element Contents NON NLS 1 NON NLS 2 return true  getParent IElementContentVisitor IElementContentVisitor visitElement ElementTree aTree IPathRequestor elementContents requestPath elementContents
Returns a string representation of this working state s structure suitable for debug purposes public String to Debug String final String Buffer buffer new String Buffer n Dump of to String n NON NLS 1 NON NLS 2 buffer append parent tree get Parent NON NLS 1 I Element Content Visitor visitor new I Element Content Visitor public boolean visit Element Element Tree a Tree I Path Requestor requestor Object element Contents buffer append n requestor request Path element Contents NON NLS 1 NON NLS 2 return true new Element Tree Iterator tree Path ROOT iterate visitor return buffer to String  toDebugString StringBuffer StringBuffer nDump toString getParent IElementContentVisitor IElementContentVisitor visitElement ElementTree aTree IPathRequestor elementContents requestPath elementContents ElementTreeIterator toString
public void update Modification Stamp Resource Info info info set Modification Stamp next Modification Stamp  updateModificationStamp ResourceInfo setModificationStamp nextModificationStamp
final I Status status new I Status 1 I Safe Runnable body new I Safe Runnable public void run throws Exception status 0 validator validate Edit files context  IStatus IStatus ISafeRunnable ISafeRunnable validateEdit
public void handle Exception Throwable exception status 0 new Resource Status I Status ERROR null Policy bind resources error Validator exception NON NLS 1  handleException ResourceStatus IStatus errorValidator
public I Status validate Edit final I File files final Object context if validation is turned off then just return if should Validate String message Policy bind resources read Only2 NON NLS 1 Multi Status result new Multi Status Resources Plugin PI RESOURCES I Resource Status READ ONLY LOCAL message null for int i 0 i files length i if files i is Read Only I Path file Path files i get Full Path message Policy bind resources read Only file Path to String NON NLS 1 result add new Resource Status I Resource Status READ ONLY LOCAL file Path message return result get Children length 0 Status OK STATUS I Status result first time through the validator hasn t been initialized so try and create it if validator null initialize Validator we were unable to initialize the validator Validation has been turned off and a warning has already been logged so just return if validator null return Status OK STATUS otherwise call the API and throw an exception if appropriate final I Status status new I Status 1 I Safe Runnable body new I Safe Runnable public void run throws Exception status 0 validator validate Edit files context public void handle Exception Throwable exception status 0 new Resource Status I Status ERROR null Policy bind resources error Validator exception NON NLS 1 Platform run body return status 0  IStatus validateEdit IFile shouldValidate readOnly2 MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus READ_ONLY_LOCAL isReadOnly IPath filePath getFullPath readOnly filePath toString ResourceStatus IResourceStatus READ_ONLY_LOCAL filePath getChildren OK_STATUS IStatus initializeValidator OK_STATUS IStatus IStatus ISafeRunnable ISafeRunnable validateEdit handleException ResourceStatus IStatus errorValidator
public I Status validate Link Location I Resource resource I Path unresolved Location String message check if resource linking is disabled if Resources Plugin get Plugin get Plugin Preferences get Boolean Resources Plugin PREF DISABLE LINKING message Policy bind links workspace Veto resource get Name NON NLS 1 return new Resource Status I Resource Status INVALID VALUE resource get Full Path message check that the resource has a project as its parent I Container parent resource get Parent if parent null parent get Type I Resource PROJECT message Policy bind links parent Not Project resource get Name NON NLS 1 return new Resource Status I Resource Status INVALID VALUE resource get Full Path message if parent is Accessible message Policy bind links parent Not Accessible resource get Full Path to String NON NLS 1 return new Resource Status I Resource Status INVALID VALUE resource get Full Path message I Path location get Path Variable Manager resolve Path unresolved Location check nature veto String nature Ids Project parent internal Get Description get Nature Ids I Status result get Nature Manager validate Link Creation nature Ids if result isOK return result check team provider veto if resource get Type I Resource FILE result get Team Hook validate Create Link I File resource I Resource NONE location else result get Team Hook validate Create Link I Folder resource I Resource NONE location if result isOK return result if location is Empty message Policy bind links no Path NON NLS 1 return new Resource Status I Resource Status INVALID VALUE resource get Full Path message check the standard path name restrictions int segment Count location segment Count for int i 0 i segment Count i result validate Name location segment i resource get Type if result isOK return result if the location doesn t have a device see if the OS will assign one if location is Absolute location get Device null location new Path location to File get Absolute Path test if the given location overlaps the platform metadata location I Path test Location get Meta Area get Location if is Overlapping location test Location true message Policy bind links invalid Location location toOS String NON NLS 1 return new Resource Status I Resource Status INVALID VALUE resource get Full Path message test if the given path overlaps the location of the given project test Location resource get Project get Location if test Location null is Overlapping location test Location false message Policy bind links location Overlaps Project location toOS String NON NLS 1 return new Resource Status I Resource Status INVALID VALUE resource get Full Path message warnings all errors must be checked before all warnings check that the location is absolute if location is Absolute we know there is at least one segment because of previous is Empty check message Policy bind pathvar undefined location toOS String location segment 0 NON NLS 1 return new Resource Status I Resource Status VARIABLE NOT DEFINED WARNING resource get Full Path message Iterate over each known project and ensure that the location does not conflict with any project locations or linked resource locations I Project projects get Root get Projects for int i 0 i projects length i I Project project projects i since we are iterating over the project in the workspace we know that they have been created before and must have a description I Project Description desc Project project internal Get Description test Location desc get Location if test Location null is Overlapping location test Location true message Policy bind links overlapping Resource location toOS String NON NLS 1 return new Resource Status I Resource Status OVERLAPPING LOCATION resource get Full Path message iterate over linked resources and check for overlap if project is Open continue I Resource children null try children project members catch Core Exception e ignore projects that cannot be accessed if children null continue for int j 0 j children length j if children j is Linked test Location children j get Location if test Location null is Overlapping location test Location true message Policy bind links overlapping Resource location toOS String NON NLS 1 return new Resource Status I Resource Status OVERLAPPING LOCATION resource get Full Path message return Status OK STATUS  IStatus validateLinkLocation IResource IPath unresolvedLocation ResourcesPlugin getPlugin getPluginPreferences getBoolean ResourcesPlugin PREF_DISABLE_LINKING workspaceVeto getName ResourceStatus IResourceStatus INVALID_VALUE getFullPath IContainer getParent getType IResource parentNotProject getName ResourceStatus IResourceStatus INVALID_VALUE getFullPath isAccessible parentNotAccessible getFullPath toString ResourceStatus IResourceStatus INVALID_VALUE getFullPath IPath getPathVariableManager resolvePath unresolvedLocation natureIds internalGetDescription getNatureIds IStatus getNatureManager validateLinkCreation natureIds getType IResource getTeamHook validateCreateLink IFile IResource getTeamHook validateCreateLink IFolder IResource isEmpty noPath ResourceStatus IResourceStatus INVALID_VALUE getFullPath segmentCount segmentCount segmentCount validateName getType isAbsolute getDevice toFile getAbsolutePath IPath testLocation getMetaArea getLocation isOverlapping testLocation invalidLocation toOSString ResourceStatus IResourceStatus INVALID_VALUE getFullPath testLocation getProject getLocation testLocation isOverlapping testLocation locationOverlapsProject toOSString ResourceStatus IResourceStatus INVALID_VALUE getFullPath isAbsolute isEmpty toOSString ResourceStatus IResourceStatus VARIABLE_NOT_DEFINED_WARNING getFullPath IProject getRoot getProjects IProject IProjectDescription internalGetDescription testLocation getLocation testLocation isOverlapping testLocation overlappingResource toOSString ResourceStatus IResourceStatus OVERLAPPING_LOCATION getFullPath isOpen IResource CoreException isLinked testLocation getLocation testLocation isOverlapping testLocation overlappingResource toOSString ResourceStatus IResourceStatus OVERLAPPING_LOCATION getFullPath OK_STATUS
public I Status validate Name String segment int type String message segment must not be null if segment null message Policy bind resources name Null NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message cannot be an empty string if segment length 0 message Policy bind resources name Empty NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message segment must not begin or end with a whitespace if Character is Whitespace segment char At 0 Character is Whitespace segment char At segment length 1 message Policy bind resources invalid Whitespace segment NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message segment must not end with a dot if segment ends With NON NLS 1 message Policy bind resources invalid Dot segment NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message test invalid characters char chars OS INVALID RESOURCE CHARACTERS for int i 0 i chars length i if segment index Of chars i 1 message Policy bind resources invalid Char In Name String value Of chars i segment NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message test invalid OS names if OS is Name Valid segment message Policy bind resources invalid Name segment NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message return Status OK STATUS  IStatus validateName nameNull ResourceStatus IResourceStatus INVALID_VALUE nameEmpty ResourceStatus IResourceStatus INVALID_VALUE isWhitespace charAt isWhitespace charAt invalidWhitespace ResourceStatus IResourceStatus INVALID_VALUE endsWith invalidDot ResourceStatus IResourceStatus INVALID_VALUE INVALID_RESOURCE_CHARACTERS indexOf invalidCharInName valueOf ResourceStatus IResourceStatus INVALID_VALUE isNameValid invalidName ResourceStatus IResourceStatus INVALID_VALUE OK_STATUS
see I Workspace validate Nature Set String public I Status validate Nature Set String nature Ids return nature Manager validate Nature Set nature Ids  IWorkspace validateNatureSet IStatus validateNatureSet natureIds natureManager validateNatureSet natureIds
public I Status validate Path String path int type path must not be null if path null String message Policy bind resources path Null NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message return validate Path new Path path type false  IStatus validatePath pathNull ResourceStatus IResourceStatus INVALID_VALUE validatePath
Validates that the given workspace path is valid for the given type If code last Segment Only code is true it is assumed that all segments except the last one have previously been validated This is an optimization for validating a leaf resource when it is known that the parent exists and thus its parent path must already be valid public I Status validate Path I Path path int type boolean last Segment Only String message path must not be null if path null message Policy bind resources path Null NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message path must not have a device separator if path get Device null message Policy bind resources invalid Char In Path String value Of I Path DEVICE SEPARATOR path to String NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message path must not be the root path if path is Root message Policy bind resources invalid Root NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message path must be absolute if path is Absolute message Policy bind resources must Be Absolute path to String NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message validate segments int number Of Segments path segment Count if type I Resource PROJECT 0 if number Of Segments I Core Constants PROJECT SEGMENT LENGTH return validate Name path segment 0 I Resource PROJECT else if type I Resource PROJECT message Policy bind resources project Path path to String NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message if type I Resource FILE I Resource FOLDER 0 if number Of Segments I Core Constants MINIMUM FILE SEGMENT LENGTH message Policy bind resources resource Path path to String NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message int file Folder Type type I Resource PROJECT int segment Count path segment Count if last Segment Only return validate Name path segment segment Count 1 file Folder Type I Status status validate Name path segment 0 I Resource PROJECT if status isOK return status ignore first segment the project for int i 1 i segment Count i status validate Name path segment i file Folder Type if status isOK return status return Status OK STATUS message Policy bind resources invalid Path path to String NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message  lastSegmentOnly IStatus validatePath IPath lastSegmentOnly pathNull ResourceStatus IResourceStatus INVALID_VALUE getDevice invalidCharInPath valueOf IPath DEVICE_SEPARATOR toString ResourceStatus IResourceStatus INVALID_VALUE isRoot invalidRoot ResourceStatus IResourceStatus INVALID_VALUE isAbsolute mustBeAbsolute toString ResourceStatus IResourceStatus INVALID_VALUE numberOfSegments segmentCount IResource numberOfSegments ICoreConstants PROJECT_SEGMENT_LENGTH validateName IResource IResource projectPath toString ResourceStatus IResourceStatus INVALID_VALUE IResource IResource numberOfSegments ICoreConstants MINIMUM_FILE_SEGMENT_LENGTH resourcePath toString ResourceStatus IResourceStatus INVALID_VALUE fileFolderType IResource segmentCount segmentCount lastSegmentOnly validateName segmentCount fileFolderType IStatus validateName IResource segmentCount validateName fileFolderType OK_STATUS invalidPath toString ResourceStatus IResourceStatus INVALID_VALUE
public I Status validate Project Location I Project context I Path unresolved Location String message the default default is ok for all projects if unresolved Location null return Status OK STATUS check the standard path name restrictions I Path location get Path Variable Manager resolve Path unresolved Location int segment Count location segment Count for int i 0 i segment Count i I Status result validate Name location segment i I Resource PROJECT if result isOK return result check that the location is absolute if location is Absolute if location segment Count 0 message Policy bind pathvar undefined location toOS String location segment 0 NON NLS 1 else message Policy bind links no Path NON NLS 1 return new Resource Status I Resource Status VARIABLE NOT DEFINED null message if the location doesn t have a device see if the OS will assign one if location get Device null location new Path location to File get Absolute Path test if the given location overlaps the default default location I Path default Default Location Platform get Location if is Overlapping location default Default Location true message Policy bind resources overlap Local location to String default Default Location to String NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message Iterate over each known project and ensure that the location does not conflict with any of their already defined locations I Project projects get Root get Projects for int j 0 j projects length j I Project project projects j since we are iterating over the project in the workspace we know that they have been created before and must have a description I Project Description desc Project project internal Get Description I Path defined Local Location desc get Location if the project uses the default location then continue if defined Local Location null continue tolerate locations being the same if this is the project being tested if project equals context defined Local Location equals location continue if is Overlapping location defined Local Location true message Policy bind resources overlap Local location to String defined Local Location to String NON NLS 1 return new Resource Status I Resource Status INVALID VALUE null message if this project exists and has linked resources the project location cannot overlap the locations of any linked resources in that project if context exists context is Open I Resource children null try children context members catch Core Exception e ignore projects that cannot be accessed if children null for int i 0 i children length i if children i is Linked I Path test Location children i get Location if test Location null is Overlapping test Location location false message Policy bind links location Overlaps Link location toOS String NON NLS 1 return new Resource Status I Resource Status OVERLAPPING LOCATION context get Full Path message return Status OK STATUS  IStatus validateProjectLocation IProject IPath unresolvedLocation unresolvedLocation OK_STATUS IPath getPathVariableManager resolvePath unresolvedLocation segmentCount segmentCount segmentCount IStatus validateName IResource isAbsolute segmentCount toOSString noPath ResourceStatus IResourceStatus VARIABLE_NOT_DEFINED getDevice toFile getAbsolutePath IPath defaultDefaultLocation getLocation isOverlapping defaultDefaultLocation overlapLocal toString defaultDefaultLocation toString ResourceStatus IResourceStatus INVALID_VALUE IProject getRoot getProjects IProject IProjectDescription internalGetDescription IPath definedLocalLocation getLocation definedLocalLocation definedLocalLocation isOverlapping definedLocalLocation overlapLocal toString definedLocalLocation toString ResourceStatus IResourceStatus INVALID_VALUE isOpen IResource CoreException isLinked IPath testLocation getLocation testLocation isOverlapping testLocation locationOverlapsLink toOSString ResourceStatus IResourceStatus OVERLAPPING_LOCATION getFullPath OK_STATUS
final I Status status new I Status 1 I Safe Runnable body new I Safe Runnable public void run throws Exception status 0 validator validate Save file  IStatus IStatus ISafeRunnable ISafeRunnable validateSave
public void handle Exception Throwable exception status 0 new Resource Status I Status ERROR null Policy bind resources error Validator exception NON NLS 1  handleException ResourceStatus IStatus errorValidator
Internal method To be called only from the following methods ul li code I File append Contents code li li code I File set Contents Input Stream boolean boolean I Progress Monitor code li li code I File set Contents I File State boolean boolean I Progress Monitor code li ul see I File Modification Validator validate Save I File protected void validate Save final I File file throws Core Exception if validation is turned off then just return if should Validate return first time through the validator hasn t been initialized so try and create it if validator null initialize Validator we were unable to initialize the validator Validation has been turned off and a warning has already been logged so just return if validator null return otherwise call the API and throw an exception if appropriate final I Status status new I Status 1 I Safe Runnable body new I Safe Runnable public void run throws Exception status 0 validator validate Save file public void handle Exception Throwable exception status 0 new Resource Status I Status ERROR null Policy bind resources error Validator exception NON NLS 1 Platform run body if status 0 isOK throw new Resource Exception status 0  IFile appendContents IFile setContents InputStream IProgressMonitor IFile setContents IFileState IProgressMonitor IFileModificationValidator validateSave IFile validateSave IFile CoreException shouldValidate initializeValidator IStatus IStatus ISafeRunnable ISafeRunnable validateSave handleException ResourceStatus IStatus errorValidator ResourceException

protected Workspace workspace public Workspace Description String name super name  WorkspaceDescription
see I Workspace Description public String get Build Order return get Build Order true  IWorkspaceDescription getBuildOrder getBuildOrder
public String get Build Order boolean make Copy if build Order null return null return make Copy String build Order clone build Order  getBuildOrder makeCopy buildOrder makeCopy buildOrder buildOrder
public long get Delta Expiration return Policy default Delta Expiration  getDeltaExpiration defaultDeltaExpiration
see I Workspace Description public long get File State Longevity return file State Longevity  IWorkspaceDescription getFileStateLongevity fileStateLongevity
see I Workspace Description public int get Max Build Iterations return max Build Iterations  IWorkspaceDescription getMaxBuildIterations maxBuildIterations
see I Workspace Description public int get Max File States return max File States  IWorkspaceDescription getMaxFileStates maxFileStates
see I Workspace Description public long get Max File State Size return max File State Size  IWorkspaceDescription getMaxFileStateSize maxFileStateSize
public long get Max Notify Delay return max Notify Delay  getMaxNotifyDelay maxNotifyDelay
public int get Operations Per Snapshot return Policy default Operations Per Snapshot  getOperationsPerSnapshot defaultOperationsPerSnapshot
see I Workspace Description public long get Snapshot Interval return snapshot Interval  IWorkspaceDescription getSnapshotInterval snapshotInterval
public void internal Set Build Order String value build Order value  internalSetBuildOrder buildOrder
see I Workspace Description public boolean is Auto Building return auto Building  IWorkspaceDescription isAutoBuilding autoBuilding
public boolean is Snapshot Enabled return Policy default Snapshots  isSnapshotEnabled defaultSnapshots
see I Workspace Description public void set Auto Building boolean value auto Building value  IWorkspaceDescription setAutoBuilding autoBuilding
see I Workspace Description public void set Build Order String value build Order value null null String value clone  IWorkspaceDescription setBuildOrder buildOrder
see I Workspace Description public void set File State Longevity long time file State Longevity time  IWorkspaceDescription setFileStateLongevity fileStateLongevity
see I Workspace Description public void set Max Build Iterations int number max Build Iterations number  IWorkspaceDescription setMaxBuildIterations maxBuildIterations
see I Workspace Description public void set Max File States int number max File States number  IWorkspaceDescription setMaxFileStates maxFileStates
see I Workspace Description public void set Max File State Size long size max File State Size size  IWorkspaceDescription setMaxFileStateSize maxFileStateSize
public void set Max Notify Delay long max Notify Delay this max Notify Delay max Notify Delay  setMaxNotifyDelay maxNotifyDelay maxNotifyDelay maxNotifyDelay
see I Workspace Description public void set Snapshot Interval long snapshot Interval this snapshot Interval snapshot Interval  IWorkspaceDescription setSnapshotInterval snapshotInterval snapshotInterval snapshotInterval

protected static final String EMPTY STRING ARRAY new String 0 public Workspace Description Reader super  EMPTY_STRING_ARRAY WorkspaceDescriptionReader
protected String get String Node target String tag Name Node node search Node target tag Name return node null node get First Child null null node get First Child get Node Value null  getString tagName searchNode tagName getFirstChild getFirstChild getNodeValue
protected String get Strings Node target if target null return null Node List list target get Child Nodes if list get Length 0 return EMPTY STRING ARRAY List result new Array List list get Length for int i 0 i list get Length i Node node list item i if node get Node Type Node ELEMENT NODE result add read node get Child Nodes item 0 return String result to Array new String result size  getStrings NodeList getChildNodes getLength EMPTY_STRING_ARRAY ArrayList getLength getLength getNodeType ELEMENT_NODE getChildNodes toArray
A value was discovered in the workspace description file that was not a number Log the exception private void log Number Format Exception String value Number Format Exception e String msg Policy bind resources read Workspace Meta Value value NON NLS 1 I Status status new Resource Status I Resource Status FAILED READ METADATA null msg e Resources Plugin get Plugin get Log log status  logNumberFormatException NumberFormatException readWorkspaceMetaValue IStatus ResourceStatus IResourceStatus FAILED_READ_METADATA ResourcesPlugin getPlugin getLog
public Object read Input Stream input try Document Builder parser Document Builder Factory new Instance new Document Builder Document document parser parse input return read document get First Child catch IO Exception e ignore catch SAX Exception e ignore catch Parser Configuration Exception e ignore return null  InputStream DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder getFirstChild IOException SAXException ParserConfigurationException
public Object read I Path location throws IO Exception Input Stream file null try file new Buffered Input Stream new File Input Stream location to File return read file finally if file null file close  IPath IOException InputStream BufferedInputStream FileInputStream toFile
public Object read I Path location I Path temp Location throws IO Exception Safe File Input Stream file new Safe File Input Stream location toOS String temp Location toOS String try return read file finally file close  IPath IPath tempLocation IOException SafeFileInputStream SafeFileInputStream toOSString tempLocation toOSString
protected Object read Node node if node null return null switch node get Node Type case Node ELEMENT NODE if node get Node Name equals WORKSPACE DESCRIPTION return read Workspace Description node case Node TEXT NODE String value node get Node Value return value null null value trim default return node to String  getNodeType ELEMENT_NODE getNodeName WORKSPACE_DESCRIPTION readWorkspaceDescription TEXT_NODE getNodeValue toString
read String String hashtables protected Workspace Description read Workspace Description Node node get values String name get String node NAME String autobuild get String node AUTOBUILD String snapshot Interval get String node SNAPSHOT INTERVAL String file State Longevity get String node FILE STATE LONGEVITY String max File State Size get String node MAX FILE STATE SIZE String max File States get String node MAX FILE STATES String build Order get Strings search Node node BUILD ORDER build instance invalid values are skipped and defaults are used instead Workspace Description description new Workspace Description name if autobuild null if in doubt value is corrupt we want autobuild on description set Auto Building autobuild equals Integer to String 0 try if file State Longevity null description set File State Longevity Long parse Long file State Longevity catch Number Format Exception e log Number Format Exception file State Longevity e try if max File State Size null description set Max File State Size Long parse Long max File State Size catch Number Format Exception e log Number Format Exception max File State Size e try if max File States null description set Max File States Integer parse Int max File States catch Number Format Exception e log Number Format Exception max File States e if build Order null description internal Set Build Order build Order try if snapshot Interval null description set Snapshot Interval Long parse Long snapshot Interval catch Number Format Exception e log Number Format Exception snapshot Interval e return description  WorkspaceDescription readWorkspaceDescription getString getString snapshotInterval getString SNAPSHOT_INTERVAL fileStateLongevity getString FILE_STATE_LONGEVITY maxFileStateSize getString MAX_FILE_STATE_SIZE maxFileStates getString MAX_FILE_STATES buildOrder getStrings searchNode BUILD_ORDER WorkspaceDescription WorkspaceDescription setAutoBuilding toString fileStateLongevity setFileStateLongevity parseLong fileStateLongevity NumberFormatException logNumberFormatException fileStateLongevity maxFileStateSize setMaxFileStateSize parseLong maxFileStateSize NumberFormatException logNumberFormatException maxFileStateSize maxFileStates setMaxFileStates parseInt maxFileStates NumberFormatException logNumberFormatException maxFileStates buildOrder internalSetBuildOrder buildOrder snapshotInterval setSnapshotInterval parseLong snapshotInterval NumberFormatException logNumberFormatException snapshotInterval
protected Node search Node Node target String tag Name Node List list target get Child Nodes for int i 0 i list get Length i if list item i get Node Name equals tag Name return list item i return null  searchNode tagName NodeList getChildNodes getLength getNodeName tagName

are done directly to the preference store preferences add Property Change Listener new Preferences I Property Change Listener public void property Change Property Change Event event synchronize With Preferences event get Property  addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent synchronizeWithPreferences getProperty
public Workspace Preferences super Workspace NON NLS 1 this preferences Resources Plugin get Plugin get Plugin Preferences initialize cached preferences for better performance if preferences contains Resources Plugin PREF AUTO BUILDING super set Auto Building preferences get Boolean Resources Plugin PREF AUTO BUILDING if preferences contains Resources Plugin PREF SNAPSHOT INTERVAL super set Snapshot Interval preferences get Int Resources Plugin PREF SNAPSHOT INTERVAL if preferences contains Resources Plugin PREF MAX BUILD ITERATIONS super set Max Build Iterations preferences get Int Resources Plugin PREF MAX BUILD ITERATIONS if preferences contains Resources Plugin PREF MAX BUILD ITERATIONS super set Max Notify Delay preferences get Int Resources Plugin PREF MAX NOTIFICATION DELAY This property listener ensures we are being updated properly when changes are done directly to the preference store preferences add Property Change Listener new Preferences I Property Change Listener public void property Change Property Change Event event synchronize With Preferences event get Property  WorkspacePreferences ResourcesPlugin getPlugin getPluginPreferences ResourcesPlugin PREF_AUTO_BUILDING setAutoBuilding getBoolean ResourcesPlugin PREF_AUTO_BUILDING ResourcesPlugin PREF_SNAPSHOT_INTERVAL setSnapshotInterval getInt ResourcesPlugin PREF_SNAPSHOT_INTERVAL ResourcesPlugin PREF_MAX_BUILD_ITERATIONS setMaxBuildIterations getInt ResourcesPlugin PREF_MAX_BUILD_ITERATIONS ResourcesPlugin PREF_MAX_BUILD_ITERATIONS setMaxNotifyDelay getInt ResourcesPlugin PREF_MAX_NOTIFICATION_DELAY addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent synchronizeWithPreferences getProperty
see org eclipse core resources I Workspace Description get Build Order public String get Build Order boolean default Build Order preferences get Boolean Resources Plugin PREF DEFAULT BUILD ORDER if default Build Order return null return convert String To String Array preferences get String Resources Plugin PREF BUILD ORDER  IWorkspaceDescription getBuildOrder getBuildOrder defaultBuildOrder getBoolean ResourcesPlugin PREF_DEFAULT_BUILD_ORDER defaultBuildOrder convertStringToStringArray getString ResourcesPlugin PREF_BUILD_ORDER
see org eclipse core internal resources Workspace Description get Build Order boolean public String get Build Order boolean make Copy String result get Build Order if result null return null return make Copy String result clone result  WorkspaceDescription getBuildOrder getBuildOrder makeCopy getBuildOrder makeCopy
see org eclipse core resources I Workspace Description get File State Longevity public long get File State Longevity return preferences get Long Resources Plugin PREF FILE STATE LONGEVITY  IWorkspaceDescription getFileStateLongevity getFileStateLongevity getLong ResourcesPlugin PREF_FILE_STATE_LONGEVITY
see org eclipse core resources I Workspace Description get Max File States public int get Max File States return preferences get Int Resources Plugin PREF MAX FILE STATES  IWorkspaceDescription getMaxFileStates getMaxFileStates getInt ResourcesPlugin PREF_MAX_FILE_STATES
see org eclipse core resources I Workspace Description get Max File State Size public long get Max File State Size return preferences get Long Resources Plugin PREF MAX FILE STATE SIZE  IWorkspaceDescription getMaxFileStateSize getMaxFileStateSize getLong ResourcesPlugin PREF_MAX_FILE_STATE_SIZE
see org eclipse core resources I Workspace Description set Auto Building boolean public void set Auto Building boolean value preferences set Value Resources Plugin PREF AUTO BUILDING value  IWorkspaceDescription setAutoBuilding setAutoBuilding setValue ResourcesPlugin PREF_AUTO_BUILDING
see org eclipse core resources I Workspace Description set Build Order String public void set Build Order String value preferences set Value Resources Plugin PREF DEFAULT BUILD ORDER value null preferences set Value Resources Plugin PREF BUILD ORDER convert String Arrayto String value  IWorkspaceDescription setBuildOrder setBuildOrder setValue ResourcesPlugin PREF_DEFAULT_BUILD_ORDER setValue ResourcesPlugin PREF_BUILD_ORDER convertStringArraytoString
see org eclipse core resources I Workspace Description set File State Longevity long public void set File State Longevity long time preferences set Value Resources Plugin PREF FILE STATE LONGEVITY time  IWorkspaceDescription setFileStateLongevity setFileStateLongevity setValue ResourcesPlugin PREF_FILE_STATE_LONGEVITY
see I Workspace Description set Max Build Iterations int public void set Max Build Iterations int number preferences set Value Resources Plugin PREF MAX BUILD ITERATIONS number  IWorkspaceDescription setMaxBuildIterations setMaxBuildIterations setValue ResourcesPlugin PREF_MAX_BUILD_ITERATIONS
see org eclipse core resources I Workspace Description set Max File States int public void set Max File States int number preferences set Value Resources Plugin PREF MAX FILE STATES number  IWorkspaceDescription setMaxFileStates setMaxFileStates setValue ResourcesPlugin PREF_MAX_FILE_STATES
see org eclipse core resources I Workspace Description set Max File State Size long public void set Max File State Size long size preferences set Value Resources Plugin PREF MAX FILE STATE SIZE size  IWorkspaceDescription setMaxFileStateSize setMaxFileStateSize setValue ResourcesPlugin PREF_MAX_FILE_STATE_SIZE
see org eclipse core resources I Workspace Description set Snapshot Interval long public void set Snapshot Interval long delay preferences set Value Resources Plugin PREF SNAPSHOT INTERVAL delay  IWorkspaceDescription setSnapshotInterval setSnapshotInterval setValue ResourcesPlugin PREF_SNAPSHOT_INTERVAL
Helper method that converts a string string array string1 string2 stringN to a string in the form string1 string2 stringN public static String convert String Arrayto String String array if array null array length 0 return NON NLS 1 String Buffer sb new String Buffer for int i 0 i array length i sb append array i sb append PROJECT SEPARATOR sb delete Char At sb length 1 return sb to String  convertStringArraytoString StringBuffer StringBuffer PROJECT_SEPARATOR deleteCharAt toString
Helper method that converts a string in the form string1 string2 stringN to a string array string1 string2 stringN public static String convert String To String Array String string List list new Linked List for String Tokenizer tokenizer new String Tokenizer string PROJECT SEPARATOR tokenizer has More Tokens list add tokenizer next Token return String list to Array new String list size  convertStringToStringArray LinkedList StringTokenizer StringTokenizer PROJECT_SEPARATOR hasMoreTokens nextToken toArray
Helper method that copies all attributes from a workspace description object to another private static void copy From To Workspace Description source Workspace Description target target set Auto Building source is Auto Building target set Build Order source get Build Order target set File State Longevity source get File State Longevity target set Max Build Iterations source get Max Build Iterations target set Max File States source get Max File States target set Max File State Size source get Max File State Size target set Snapshot Interval source get Snapshot Interval  copyFromTo WorkspaceDescription WorkspaceDescription setAutoBuilding isAutoBuilding setBuildOrder getBuildOrder setFileStateLongevity getFileStateLongevity setMaxBuildIterations getMaxBuildIterations setMaxFileStates getMaxFileStates setMaxFileStateSize getMaxFileStateSize setSnapshotInterval getSnapshotInterval
public void copy From Workspace Description source copy From To source this  copyFrom WorkspaceDescription copyFromTo
public void copy To Workspace Description target copy From To this target  copyTo WorkspaceDescription copyFromTo
public void set Defaults I Workspace Description defaults preferences set Default Resources Plugin PREF AUTO BUILDING defaults is Auto Building preferences set Default Resources Plugin PREF BUILD ORDER convert String Arrayto String defaults get Build Order preferences set Default Resources Plugin PREF DEFAULT BUILD ORDER defaults get Build Order null preferences set Default Resources Plugin PREF FILE STATE LONGEVITY defaults get File State Longevity preferences set Default Resources Plugin PREF MAX BUILD ITERATIONS defaults get Max Build Iterations preferences set Default Resources Plugin PREF MAX FILE STATE SIZE defaults get Max File State Size preferences set Default Resources Plugin PREF MAX FILE STATES defaults get Max File States preferences set Default Resources Plugin PREF SNAPSHOT INTERVAL defaults get Snapshot Interval  setDefaults IWorkspaceDescription setDefault ResourcesPlugin PREF_AUTO_BUILDING isAutoBuilding setDefault ResourcesPlugin PREF_BUILD_ORDER convertStringArraytoString getBuildOrder setDefault ResourcesPlugin PREF_DEFAULT_BUILD_ORDER getBuildOrder setDefault ResourcesPlugin PREF_FILE_STATE_LONGEVITY getFileStateLongevity setDefault ResourcesPlugin PREF_MAX_BUILD_ITERATIONS getMaxBuildIterations setDefault ResourcesPlugin PREF_MAX_FILE_STATE_SIZE getMaxFileStateSize setDefault ResourcesPlugin PREF_MAX_FILE_STATES getMaxFileStates setDefault ResourcesPlugin PREF_SNAPSHOT_INTERVAL getSnapshotInterval
public Object clone should never be called throws an exception to avoid using a Workspace Preferences when using Workspace Description was the real intention this class offers a different protocol for copying state throw new Unsupported Operation Exception clone is not supported in get Class get Name NON NLS 1  WorkspacePreferences WorkspaceDescription UnsupportedOperationException getClass getName
protected void synchronize With Preferences String property do not use the value in the event may be a string instead of the expected type Retrieve it from the preferences store using the type specific method if property equals Resources Plugin PREF AUTO BUILDING super set Auto Building preferences get Boolean Resources Plugin PREF AUTO BUILDING else if property equals Resources Plugin PREF SNAPSHOT INTERVAL super set Snapshot Interval preferences get Long Resources Plugin PREF SNAPSHOT INTERVAL else if property equals Resources Plugin PREF MAX BUILD ITERATIONS super set Max Build Iterations preferences get Int Resources Plugin PREF MAX BUILD ITERATIONS else if property equals Resources Plugin PREF MAX NOTIFICATION DELAY super set Max Notify Delay preferences get Long Resources Plugin PREF MAX NOTIFICATION DELAY  synchronizeWithPreferences ResourcesPlugin PREF_AUTO_BUILDING setAutoBuilding getBoolean ResourcesPlugin PREF_AUTO_BUILDING ResourcesPlugin PREF_SNAPSHOT_INTERVAL setSnapshotInterval getLong ResourcesPlugin PREF_SNAPSHOT_INTERVAL ResourcesPlugin PREF_MAX_BUILD_ITERATIONS setMaxBuildIterations getInt ResourcesPlugin PREF_MAX_BUILD_ITERATIONS ResourcesPlugin PREF_MAX_NOTIFICATION_DELAY setMaxNotifyDelay getLong ResourcesPlugin PREF_MAX_NOTIFICATION_DELAY

private Hash Map project Table new Hash Map 10 protected Workspace Root I Path path Workspace container super path container Assert is True path equals Path ROOT  HashMap projectTable HashMap WorkspaceRoot IPath isTrue
see I Resource clear History I Progress Monitor public void clear History I Progress Monitor monitor throws Core Exception get Local Manager get History Store remove All  IResource clearHistory IProgressMonitor clearHistory IProgressMonitor CoreException getLocalManager getHistoryStore removeAll
see I Resource delete boolean I Progress Monitor public void delete boolean force I Progress Monitor monitor throws Core Exception int update Flags force I Resource FORCE I Resource NONE delete update Flags monitor  IResource IProgressMonitor IProgressMonitor CoreException updateFlags IResource IResource updateFlags
see I Workspace Root delete boolean boolean I Progress Monitor public void delete boolean delete Content boolean force I Progress Monitor monitor throws Core Exception int update Flags force I Resource FORCE I Resource NONE update Flags delete Content I Resource ALWAYS DELETE PROJECT CONTENT I Resource NEVER DELETE PROJECT CONTENT delete update Flags monitor  IWorkspaceRoot IProgressMonitor deleteContent IProgressMonitor CoreException updateFlags IResource IResource updateFlags deleteContent IResource ALWAYS_DELETE_PROJECT_CONTENT IResource NEVER_DELETE_PROJECT_CONTENT updateFlags
public boolean exists int flags boolean check Type return true  checkType
see I Workspace Root find Containers For Location I Path public I Container find Containers For Location I Path location return I Container get Local Manager all Resources For location false  IWorkspaceRoot findContainersForLocation IPath IContainer findContainersForLocation IPath IContainer getLocalManager allResourcesFor
see I Workspace Root find Files For Location I Path public I File find Files For Location I Path location return I File get Local Manager all Resources For location true  IWorkspaceRoot findFilesForLocation IPath IFile findFilesForLocation IPath IFile getLocalManager allResourcesFor
see I Workspace Root get Container For Location I Path public I Container get Container For Location I Path location return get Local Manager container For Location location  IWorkspaceRoot getContainerForLocation IPath IContainer getContainerForLocation IPath getLocalManager containerForLocation
see I Container get Default Charset boolean public String get Default Charset boolean check Implicit if check Implicit return Resources Plugin get Encoding return Resources Plugin get Plugin get Plugin Preferences get String Resources Plugin PREF ENCODING  IContainer getDefaultCharset getDefaultCharset checkImplicit checkImplicit ResourcesPlugin getEncoding ResourcesPlugin getPlugin getPluginPreferences getString ResourcesPlugin PREF_ENCODING
see I Workspace Root get File For Location I Path public I File get File For Location I Path location return get Local Manager file For Location location  IWorkspaceRoot getFileForLocation IPath IFile getFileForLocation IPath getLocalManager fileForLocation
see I Resource get Local Time Stamp public long get Local Time Stamp return I Resource NULL STAMP  IResource getLocalTimeStamp getLocalTimeStamp IResource NULL_STAMP
see I Resource get Location public I Path get Location return Platform get Location  IResource getLocation IPath getLocation getLocation
see I Resource get Name public String get Name return NON NLS 1  IResource getName getName
see I Resource get Parent public I Container get Parent return null  IResource getParent IContainer getParent
see I Resource get Project public I Project get Project return null  IResource getProject IProject getProject
see I Workspace Root get Project String public I Project get Project String name first check our project cache Project result Project project Table get name if result null I Path path Path ROOT append name String message Path for project must have only one segment NON NLS 1 Assert is Legal path segment Count I Core Constants PROJECT SEGMENT LENGTH message result new Project path workspace project Table put name result return result  IWorkspaceRoot getProject IProject getProject projectTable IPath isLegal segmentCount ICoreConstants PROJECT_SEGMENT_LENGTH projectTable
see I Resource get Project Relative Path public I Path get Project Relative Path return Path EMPTY  IResource getProjectRelativePath IPath getProjectRelativePath
see I Workspace Root get Projects public I Project get Projects I Resource roots get Children Path ROOT false I Project result new I Project roots length System arraycopy roots 0 result 0 roots length return result  IWorkspaceRoot getProjects IProject getProjects IResource getChildren IProject IProject
see I Resource get Type public int get Type return I Resource ROOT  IResource getType getType IResource
public void internal Set Local boolean flag int depth throws Core Exception do nothing for the root but call for its children if depth I Resource DEPTH ZERO return if depth I Resource DEPTH ONE depth I Resource DEPTH ZERO get the children via the workspace since we know that this resource exists it is local I Resource children get Children this false for int i 0 i children length i Resource children i internal Set Local flag depth  internalSetLocal CoreException IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_ZERO IResource getChildren internalSetLocal
see I Resource is Local int public boolean is Local int depth the flags parm is ignored for the workspace root so pass anything return is Local 1 depth  IResource isLocal isLocal isLocal
see I Resource is Local int public boolean is Local int flags int depth don t check the flags workspace root is always local if depth DEPTH ZERO return true if depth DEPTH ONE depth DEPTH ZERO get the children via the workspace since we know that this resource exists it is local I Resource children get Children this false for int i 0 i children length i if children i is Local depth return false return true  IResource isLocal isLocal DEPTH_ZERO DEPTH_ONE DEPTH_ZERO IResource getChildren isLocal
see I Resource is Phantom public boolean is Phantom return false  IResource isPhantom isPhantom
see I Container set Default Charset String deprecated Replaced by link set Default Charset String I Progress Monitor which is a workspace operation and reports changes in resource deltas public void set Default Charset String charset throws Core Exception directly change the Resource plugin s preference for encoding Preferences resources Preferences Resources Plugin get Plugin get Plugin Preferences if charset null resources Preferences set Value Resources Plugin PREF ENCODING charset else resources Preferences set To Default Resources Plugin PREF ENCODING  IContainer setDefaultCharset setDefaultCharset IProgressMonitor setDefaultCharset CoreException resourcesPreferences ResourcesPlugin getPlugin getPluginPreferences resourcesPreferences setValue ResourcesPlugin PREF_ENCODING resourcesPreferences setToDefault ResourcesPlugin PREF_ENCODING
see I Container set Default Charset String I Progress Monitor public void set Default Charset String charset I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try String message Policy bind resources setting Default Charset Workspace NON NLS 1 monitor begin Task message Policy total Work final I Scheduling Rule rule workspace get Rule Factory modify Rule this try workspace prepare Operation rule monitor Resource Info info get Resource Info false false check Accessible get Flags info workspace begin Operation true TODO https bugs eclipse org bugs show bug cgi id 59899 Changing the encoding needs to notify clients directly change the Resource plugin s preference for encoding Preferences resources Preferences Resources Plugin get Plugin get Plugin Preferences if charset null resources Preferences set Value Resources Plugin PREF ENCODING charset else resources Preferences set To Default Resources Plugin PREF ENCODING monitor worked Policy op Work catch Operation Canceled Exception e workspace get Work Manager operation Canceled throw e finally workspace end Operation rule true Policy sub Monitor For monitor Policy build Work finally monitor done  IContainer setDefaultCharset IProgressMonitor setDefaultCharset IProgressMonitor CoreException monitorFor settingDefaultCharsetWorkspace beginTask totalWork ISchedulingRule getRuleFactory modifyRule prepareOperation ResourceInfo getResourceInfo checkAccessible getFlags beginOperation show_bug resourcesPreferences ResourcesPlugin getPlugin getPluginPreferences resourcesPreferences setValue ResourcesPlugin PREF_ENCODING resourcesPreferences setToDefault ResourcesPlugin PREF_ENCODING opWork OperationCanceledException getWorkManager operationCanceled endOperation subMonitorFor buildWork
see I Resource set Local Time Stamp long public long set Local Time Stamp long value throws Core Exception if value 0 throw new Illegal Argument Exception Illegal time stamp value NON NLS 1 can t set local time for root return value  IResource setLocalTimeStamp setLocalTimeStamp CoreException IllegalArgumentException
see I Resource set Read Only boolean public void set Read Only boolean readonly can t set the root read only  IResource setReadOnly setReadOnly
Returns true if this resource has the potential to be or have been synchronized public boolean synchronizing return false 
see I Resource touch I Progress Monitor public void touch I Progress Monitor monitor throws Core Exception do nothing for the workspace root  IResource IProgressMonitor IProgressMonitor CoreException

protected Workspace workspace public Workspace Tree Reader Workspace workspace this workspace workspace  WorkspaceTreeReader
public void read Tree Data Input Stream input I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor String message try message Policy bind resources reading NON NLS 1 monitor begin Task message Policy total Work read Workspace Fields input Policy sub Monitor For monitor Policy op Work 20 100 Hash Map saved States new Hash Map 20 List plugins To Be Linked new Array List 20 read Plugins Saved States input saved States plugins To Be Linked Policy sub Monitor For monitor Policy op Work 10 100 workspace get Save Manager set Plugins Saved State saved States List builders To Be Linked new Array List 20 read Builders Persistent Info input builders To Be Linked Policy sub Monitor For monitor Policy op Work 10 100 Element Tree trees read Trees Path ROOT input Policy sub Monitor For monitor Policy op Work 40 100 link Plugins Saved State To Trees plugins To Be Linked trees Policy sub Monitor For monitor Policy op Work 10 100 link Builders To Trees builders To Be Linked trees plugins To Be Linked size Policy sub Monitor For monitor Policy op Work 10 100 catch IO Exception e message Policy bind resources read Workspace Tree NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA null message e finally monitor done  readTree DataInputStream IProgressMonitor CoreException monitorFor beginTask totalWork readWorkspaceFields subMonitorFor opWork HashMap savedStates HashMap pluginsToBeLinked ArrayList readPluginsSavedStates savedStates pluginsToBeLinked subMonitorFor opWork getSaveManager setPluginsSavedState savedStates buildersToBeLinked ArrayList readBuildersPersistentInfo buildersToBeLinked subMonitorFor opWork ElementTree readTrees subMonitorFor opWork linkPluginsSavedStateToTrees pluginsToBeLinked subMonitorFor opWork linkBuildersToTrees buildersToBeLinked pluginsToBeLinked subMonitorFor opWork IOException readWorkspaceTree ResourceException IResourceStatus FAILED_READ_METADATA
protected void read Workspace Fields Data Input Stream input I Progress Monitor monitor throws IO Exception Core Exception monitor Policy monitor For monitor try read the node id workspace next Node Id input read Long read the modification stamp workspace next Modification Stamp input read Long read the next marker id workspace next Marker Id input read Long read the synchronizer s registered sync partners Synchronizer workspace get Synchronizer read Partners input finally monitor done  readWorkspaceFields DataInputStream IProgressMonitor IOException CoreException monitorFor nextNodeId readLong nextModificationStamp readLong nextMarkerId readLong getSynchronizer readPartners
protected void read Plugins Saved States Data Input Stream input Hash Map saved States List plugins I Progress Monitor monitor throws IO Exception Core Exception monitor Policy monitor For monitor try int state Count input read Int for int i 0 i state Count i String plugin Id input readUTF Saved State state new Saved State workspace plugin Id null null saved States put plugin Id state plugins add state finally monitor done  readPluginsSavedStates DataInputStream HashMap savedStates IProgressMonitor IOException CoreException monitorFor stateCount readInt stateCount pluginId SavedState SavedState pluginId savedStates pluginId
protected void read Builders Persistent Info Data Input Stream input List builders I Progress Monitor monitor throws IO Exception Core Exception monitor Policy monitor For monitor try int builder Count input read Int for int i 0 i builder Count i Builder Persistent Info info new Builder Persistent Info info set Project Name input readUTF info set Builder Name input readUTF builders add info finally monitor done  readBuildersPersistentInfo DataInputStream IProgressMonitor IOException CoreException monitorFor builderCount readInt builderCount BuilderPersistentInfo BuilderPersistentInfo setProjectName setBuilderName
Read trees from disk and link them to the workspace tree protected Element Tree read Trees I Path root Data Input Stream input I Progress Monitor monitor throws IO Exception Core Exception monitor Policy monitor For monitor try String message Policy bind resources reading NON NLS 1 monitor begin Task message 4 Element Tree Reader tree Reader new Element Tree Reader workspace get Save Manager Element Tree trees tree Reader read Delta Chain input monitor worked 3 if root is Root Don t need to link because we re reading the whole workspace The last tree in the chain is the complete tree Element Tree new Tree trees trees length 1 new Tree set Tree Data workspace tree get Tree Data workspace tree new Tree else splice the restored tree into the current set of trees workspace link Trees root trees monitor worked 1 return trees finally monitor done  ElementTree readTrees IPath DataInputStream IProgressMonitor IOException CoreException monitorFor beginTask ElementTreeReader treeReader ElementTreeReader getSaveManager ElementTree treeReader readDeltaChain isRoot ElementTree newTree newTree setTreeData getTreeData newTree linkTrees
protected void link Plugins Saved State To Trees List states Element Tree trees I Progress Monitor monitor monitor Policy monitor For monitor try for int i 0 i states size i Saved State state Saved State states get i If the tree is too old depends on the policy the plug in should not get it back as a delta It is expensive to maintain this information too long if workspace get Save Manager is Old Plugin Tree state plugin Id state old Tree trees i finally monitor done  linkPluginsSavedStateToTrees ElementTree IProgressMonitor monitorFor SavedState SavedState getSaveManager isOldPluginTree pluginId oldTree
protected void link Builders To Trees List builders To Be Linked Element Tree trees int index I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor try Hash Map infos null String project Name null for int i 0 i builders To Be Linked size i Builder Persistent Info info Builder Persistent Info builders To Be Linked get i if info get Project Name equals project Name if infos null if it is not the first iteration I Project project workspace get Root get Project project Name workspace get Build Manager set Builders Persistent Info project infos project Name info get Project Name infos new Hash Map 5 info set Last Build Tree trees index infos put info get Builder Name info if infos null I Project project workspace get Root get Project project Name workspace get Build Manager set Builders Persistent Info project infos finally monitor done  linkBuildersToTrees buildersToBeLinked ElementTree IProgressMonitor CoreException monitorFor HashMap projectName buildersToBeLinked BuilderPersistentInfo BuilderPersistentInfo buildersToBeLinked getProjectName projectName IProject getRoot getProject projectName getBuildManager setBuildersPersistentInfo projectName getProjectName HashMap setLastBuildTree getBuilderName IProject getRoot getProject projectName getBuildManager setBuildersPersistentInfo
public Element Tree read Snapshot Tree Data Input Stream input Element Tree complete I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor String message try message Policy bind resources reading Snap NON NLS 1 monitor begin Task message Policy total Work Element Tree Reader reader new Element Tree Reader workspace get Save Manager while input available 0 read Workspace Fields input Policy sub Monitor For monitor Policy total Work 2 complete reader read Delta complete input try make sure each snapshot is read by the correct reader int version input read Int if version get Version return get Reader workspace version read Snapshot Tree input complete monitor catch EOF Exception e break return complete catch IO Exception e message Policy bind resources read Workspace Snap NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA null message e finally monitor done  ElementTree readSnapshotTree DataInputStream ElementTree IProgressMonitor CoreException monitorFor readingSnap beginTask totalWork ElementTreeReader ElementTreeReader getSaveManager readWorkspaceFields subMonitorFor totalWork readDelta readInt getVersion getReader readSnapshotTree EOFException IOException readWorkspaceSnap ResourceException IResourceStatus FAILED_READ_METADATA
public static Workspace Tree Reader get Reader Workspace workspace int version switch version case I Core Constants WORKSPACE TREE VERSION 1 return new Workspace Tree Reader workspace case I Core Constants WORKSPACE TREE VERSION 2 return new WorkspaceTreeReader 2 workspace default The following class should be removed soon See comments in WorkspaceTreeReader 0 return new WorkspaceTreeReader 0 workspace  WorkspaceTreeReader getReader ICoreConstants WORKSPACE_TREE_VERSION_1 WorkspaceTreeReader ICoreConstants WORKSPACE_TREE_VERSION_2 WorkspaceTreeReader_2 WorkspaceTreeReader_0 WorkspaceTreeReader_0
protected int get Version return I Core Constants WORKSPACE TREE VERSION 1  getVersion ICoreConstants WORKSPACE_TREE_VERSION_1
public void read Tree I Project project Data Input Stream input I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor String message try message Policy bind resources reading NON NLS 1 monitor begin Task message 10 read the number of builders int num Builders input read Int read in the list of builder names String builder Names new String num Builders for int i 0 i num Builders i String builder Name input readUTF builder Names i builder Name monitor worked 1 read and link the trees Element Tree trees read Trees project get Full Path input Policy sub Monitor For monitor 8 map builder names to trees if num Builders 0 Map infos new Hash Map trees length 2 1 for int i 0 i num Builders i Builder Persistent Info info new Builder Persistent Info info set Builder Name builder Names i info set Project Name project get Name info set Last Build Tree trees i infos put builder Names i info workspace get Build Manager set Builders Persistent Info project infos monitor worked 1 catch IO Exception e message Policy bind read Project Tree NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA null message e finally monitor done  readTree IProject DataInputStream IProgressMonitor CoreException monitorFor beginTask numBuilders readInt builderNames numBuilders numBuilders builderName builderNames builderName ElementTree readTrees getFullPath subMonitorFor numBuilders HashMap numBuilders BuilderPersistentInfo BuilderPersistentInfo setBuilderName builderNames setProjectName getName setLastBuildTree builderNames getBuildManager setBuildersPersistentInfo IOException readProjectTree ResourceException IResourceStatus FAILED_READ_METADATA

public class WorkspaceTreeReader 0 extends Workspace Tree Reader public WorkspaceTreeReader 0 Workspace workspace super workspace  WorkspaceTreeReader_0 WorkspaceTreeReader WorkspaceTreeReader_0

public class WorkspaceTreeReader 2 extends Workspace Tree Reader public WorkspaceTreeReader 2 Workspace workspace super workspace  WorkspaceTreeReader_2 WorkspaceTreeReader WorkspaceTreeReader_2
protected int get Version return I Core Constants WORKSPACE TREE VERSION 2  getVersion ICoreConstants WORKSPACE_TREE_VERSION_2
protected void read Builders Persistent Info Data Input Stream input List builders I Progress Monitor monitor throws IO Exception monitor Policy monitor For monitor try int builder Count input read Int for int i 0 i builder Count i Builder Persistent Info info new Builder Persistent Info info set Project Name input readUTF info set Builder Name input readUTF read interesting projects int n input read Int I Project projects new I Project n for int j 0 j n j projects j workspace get Root get Project input readUTF info set Interesting Projects projects builders add info finally monitor done  readBuildersPersistentInfo DataInputStream IProgressMonitor IOException monitorFor builderCount readInt builderCount BuilderPersistentInfo BuilderPersistentInfo setProjectName setBuilderName readInt IProject IProject getRoot getProject setInterestingProjects
public void read Tree I Project project Data Input Stream input I Progress Monitor monitor throws Core Exception monitor Policy monitor For monitor String message try message Policy bind resources reading NON NLS 1 monitor begin Task message 10 read in the list of builder names List infos new Array List 5 read Builders Persistent Info input infos Policy sub Monitor For monitor 1 for Iterator it infos iterator it has Next Slam project name in It might happen that the project was moved and we have the wrong name in the file Builder Persistent Info info Builder Persistent Info it next info set Project Name project get Name read and link the trees Element Tree trees read Trees project get Full Path input Policy sub Monitor For monitor 8 map builder names to trees link Builders To Trees infos trees 0 Policy sub Monitor For monitor 1 catch IO Exception e message Policy bind resources read Project Tree NON NLS 1 throw new Resource Exception I Resource Status FAILED READ METADATA null message e finally monitor done  readTree IProject DataInputStream IProgressMonitor CoreException monitorFor beginTask ArrayList readBuildersPersistentInfo subMonitorFor hasNext BuilderPersistentInfo BuilderPersistentInfo setProjectName getName ElementTree readTrees getFullPath subMonitorFor linkBuildersToTrees subMonitorFor IOException readProjectTree ResourceException IResourceStatus FAILED_READ_METADATA

public XML Writer Output Stream output throws Unsupported Encoding Exception super new Output Stream Writer output UTF8 NON NLS 1 tab 0 println XML VERSION  XMLWriter OutputStream UnsupportedEncodingException OutputStreamWriter XML_VERSION
public void end Tag String name tab print Tag name null  endTag printTag
public void print Simple Tag String name Object value if value null print Tag name null true false print get Escaped String value Of value print Tag name null false true  printSimpleTag printTag getEscaped valueOf printTag
public void print Tabulation for int i 0 i tab i super print t  printTabulation
public void print Tag String name Hash Map parameters print Tag name parameters true true  printTag HashMap printTag
public void print Tag String name Hash Map parameters boolean should Tab boolean new Line String Buffer sb new String Buffer sb append NON NLS 1 sb append name if parameters null for Enumeration enum Collections enumeration parameters key Set enum has More Elements sb append NON NLS 1 String key String enum next Element sb append key sb append NON NLS 1 sb append get Escaped String value Of parameters get key sb append NON NLS 1 sb append NON NLS 1 if should Tab print Tabulation if new Line println sb to String else print sb to String  printTag HashMap shouldTab newLine StringBuffer StringBuffer keySet hasMoreElements nextElement getEscaped valueOf shouldTab printTabulation newLine toString toString
public void start Tag String name Hash Map parameters start Tag name parameters true  startTag HashMap startTag
public void start Tag String name Hash Map parameters boolean new Line print Tag name parameters true new Line tab  startTag HashMap newLine printTag newLine
private static void append Escaped Char String Buffer buffer char c String replacement get Replacement c if replacement null buffer append buffer append replacement buffer append else buffer append c  appendEscapedChar StringBuffer getReplacement
public static String get Escaped String s String Buffer result new String Buffer s length 10 for int i 0 i s length i append Escaped Char result s char At i return result to String  getEscaped StringBuffer StringBuffer appendEscapedChar charAt toString
private static String get Replacement char c Encode special XML characters into the equivalent character references These five are defined by default for all XML documents switch c case return lt NON NLS 1 case return gt NON NLS 1 case return quot NON NLS 1 case return apos NON NLS 1 case return amp NON NLS 1 return null  getReplacement

Creates a new factory proxy based on the given configuration element Returns the new proxy or null if the element could not be created public static Adapter Factory Proxy create Proxy I Configuration Element element Adapter Factory Proxy result new Adapter Factory Proxy result element element if factory equals element get Name NON NLS 1 return result result log Error return null  AdapterFactoryProxy createProxy IConfigurationElement AdapterFactoryProxy AdapterFactoryProxy getName logError
String get Adaptable Type cannot return null because it can cause startup failure String result element get Attribute adaptable Type NON NLS 1 if result null return result log Error return NON NLS 1  getAdaptableType getAttribute adaptableType logError
public Object get Adapter Object adaptable Object Class adapter Type if factory Loaded load Factory false return factory null null factory get Adapter adaptable Object adapter Type  getAdapter adaptableObject adapterType factoryLoaded loadFactory getAdapter adaptableObject adapterType
public Class get Adapter List if factory Loaded load Factory false return factory null null factory get Adapter List  getAdapterList factoryLoaded loadFactory getAdapterList
String get Adapter Names I Configuration Element children element get Children Array List adapters new Array List children length for int i 0 i children length i ignore unknown children for forward compatibility if adapter equals children i get Name NON NLS 1 String type children i get Attribute type NON NLS 1 if type null adapters add type if adapters is Empty log Error return String adapters to Array new String adapters size  getAdapterNames IConfigurationElement getChildren ArrayList ArrayList getName getAttribute isEmpty logError toArray
I Extension get Extension return element get Declaring Extension  IExtension getExtension getDeclaringExtension
Loads the real adapter factory but only if its associated plug in is already loaded Returns the real factory if it was successfully loaded param force if code true code the plugin providing the factory will be loaded if necessary otherwise no plugin activations will occur I Adapter Factory load Factory boolean force synchronized this if factory null factory Loaded return factory String bundle Id element get Declaring Extension get Namespace if force Platform get Bundle bundle Id get State Bundle ACTIVE return null set to true to prevent repeated attempts to load a broken factory factory Loaded true try factory I Adapter Factory element create Executable Extension class NON NLS 1 catch Core Exception e Internal Platform get Default log e get Status return factory  IAdapterFactory loadFactory factoryLoaded bundleId getDeclaringExtension getNamespace getBundle bundleId getState factoryLoaded IAdapterFactory createExecutableExtension CoreException InternalPlatform getDefault getStatus
The factory extension was malformed Log an appropriate exception private void log Error String msg Policy bind adapters bad Adapter Factory element get Declaring Extension get Namespace NON NLS 1 Internal Platform get Default log new Status I Status ERROR Platform PI RUNTIME 1 msg null  logError badAdapterFactory getDeclaringExtension getNamespace InternalPlatform getDefault IStatus PI_RUNTIME

Constructs a new adapter manager public Adapter Manager factories new Hash Map 5 lookup null register Factory Proxies Platform get Extension Registry add Registry Change Listener this  AdapterManager HashMap registerFactoryProxies getExtensionRegistry addRegistryChangeListener
Given a type name add all of the factories that respond to those types into the given table Each entry will be keyed by the adapter class name supplied in I Adapter Factory get Adapter List private void add Factories For String type Name Map table List factory List List factories get type Name if factory List null return for int i 0 imax factory List size i imax i I Adapter Factory factory I Adapter Factory factory List get i if factory instanceof Adapter Factory Proxy String adapters Adapter Factory Proxy factory get Adapter Names for int j 0 j adapters length j if table get adapters j null table put adapters j factory else Class adapters factory get Adapter List for int j 0 j adapters length j String adapter Name adapters j get Name if table get adapter Name null table put adapter Name factory  IAdapterFactory getAdapterList addFactoriesFor typeName factoryList typeName factoryList factoryList IAdapterFactory IAdapterFactory factoryList AdapterFactoryProxy AdapterFactoryProxy getAdapterNames getAdapterList adapterName getName adapterName adapterName
Returns the class with the given fully qualified name or null if that class does not exist or belongs to a plug in that has not yet been loaded private Class class For Name I Adapter Factory factory String type Name try if factory instanceof Adapter Factory Proxy factory Adapter Factory Proxy factory load Factory false if factory null return factory get Class get Class Loader load Class type Name catch Class Not Found Exception e class not yet loaded return null  classForName IAdapterFactory typeName AdapterFactoryProxy AdapterFactoryProxy loadFactory getClass getClassLoader loadClass typeName ClassNotFoundException
Builds and returns a table of adapters for the given adaptable type The table is keyed by adapter class name The value is the b sole b factory that defines that adapter Note that if multiple adapters technically define the same property only the first found in the search order is considered Note that it is important to maintain a consistent class and interface lookup order See the class comment for more details private Map compute Class Order Class adaptable Hash Map table new Hash Map 4 Class clazz adaptable Set seen new Hash Set 4 while clazz null add Factories For clazz get Name table compute Interface Order clazz get Interfaces table seen clazz clazz get Superclass return table  computeClassOrder HashMap HashMap HashSet addFactoriesFor getName computeInterfaceOrder getInterfaces getSuperclass
private void compute Interface Order Class interfaces Map table Set seen List new Interfaces new Array List interfaces length for int i 0 i interfaces length i Class interfac interfaces i if seen add interfac add Factories For interfac get Name table note we cannot recurse here without changing the resulting interface order new Interfaces add interfac for Iterator it new Interfaces iterator it has Next compute Interface Order Class it next get Interfaces table seen  computeInterfaceOrder newInterfaces ArrayList addFactoriesFor getName newInterfaces newInterfaces hasNext computeInterfaceOrder getInterfaces
Flushes the cache of adapter search paths This is generally required whenever an adapter is added or removed p It is likely easier to just toss the whole cache rather than trying to be smart and remove only those entries affected p public synchronized void flush Lookup lookup null  flushLookup
public Object get Adapter Object adaptable Class adapter Type I Adapter Factory factory get Factory adaptable get Class adapter Type get Name Object result null if factory null result factory get Adapter adaptable adapter Type if result null adapter Type is Instance adaptable return adaptable return result  getAdapter adapterType IAdapterFactory getFactory getClass adapterType getName getAdapter adapterType adapterType isInstance
see org eclipse core runtime I Adapter Manager get Adapter java lang Object java lang Class public Object get Adapter Object adaptable String adapter Type return get Adapter adaptable adapter Type false  IAdapterManager getAdapter getAdapter adapterType getAdapter adapterType
Returns an adapter of the given type for the provided adapter param adaptable the object to adapt param adapter Type the type to adapt the object to param force code true code if the plug in providing the factory should be activated if necessary code false code if no plugin activations are desired private Object get Adapter Object adaptable String adapter Type boolean force I Adapter Factory factory get Factory adaptable get Class adapter Type if force factory instanceof Adapter Factory Proxy factory Adapter Factory Proxy factory load Factory true Object result null if factory null Class clazz class For Name factory adapter Type if clazz null result factory get Adapter adaptable clazz if result null adaptable get Class get Name equals adapter Type return adaptable return result  adapterType getAdapter adapterType IAdapterFactory getFactory getClass adapterType AdapterFactoryProxy AdapterFactoryProxy loadFactory classForName adapterType getAdapter getClass getName adapterType
Gets the adapter factory installed for objects of class code extensible Class code which defines adapters of type code adapter code If no such factories exists returns null private synchronized I Adapter Factory get Factory Class adaptable String adapter Name Map table check the cache first if lookup null table Map lookup get adaptable get Name if table null return I Adapter Factory table get adapter Name Its not in the cache so we have to build the adapter table for this class table compute Class Order adaptable cache the table and do the lookup again if lookup null lookup new Hash Map 30 lookup put adaptable get Name table return I Adapter Factory table get adapter Name  extensibleClass IAdapterFactory getFactory adapterName getName IAdapterFactory adapterName computeClassOrder HashMap getName IAdapterFactory adapterName
public boolean has Adapter Object adaptable String adapter Type Name return get Factory adaptable get Class adapter Type Name null  hasAdapter adapterTypeName getFactory getClass adapterTypeName
see org eclipse core runtime I Adapter Manager load Adapter java lang Object java lang String public Object load Adapter Object adaptable String adapter Type Name return get Adapter adaptable adapter Type Name true  IAdapterManager loadAdapter loadAdapter adapterTypeName getAdapter adapterTypeName
see I Adapter Manager register Adapters public synchronized void register Adapters I Adapter Factory factory Class adaptable register Factory factory adaptable get Name flush Lookup  IAdapterManager registerAdapters registerAdapters IAdapterFactory registerFactory getName flushLookup
private void register Extension I Extension extension I Configuration Element elements extension get Configuration Elements for int j 0 j elements length j Adapter Factory Proxy proxy Adapter Factory Proxy create Proxy elements j if proxy null register Factory proxy proxy get Adaptable Type  registerExtension IExtension IConfigurationElement getConfigurationElements AdapterFactoryProxy AdapterFactoryProxy createProxy registerFactory getAdaptableType
private void register Factory I Adapter Factory factory String adaptable Type List list List factories get adaptable Type if list null list new Array List 5 factories put adaptable Type list list add factory  registerFactory IAdapterFactory adaptableType adaptableType ArrayList adaptableType
Loads adapters registered with the adapters extension point from the plug in registry Note that the actual factory implementations are loaded lazily as they are needed private void register Factory Proxies I Extension Registry registry Platform get Extension Registry I Extension Point point registry get Extension Point Platform PI RUNTIME Platform PT ADAPTERS if point null return I Extension extensions point get Extensions for int i 0 i extensions length i register Extension extensions i  registerFactoryProxies IExtensionRegistry getExtensionRegistry IExtensionPoint getExtensionPoint PI_RUNTIME PT_ADAPTERS IExtension getExtensions registerExtension
public synchronized void registry Changed I Registry Change Event event find the set of changed adapter extensions Hash Set to Remove null I Extension Delta deltas event get Extension Deltas String adapter Id Platform PI RUNTIME Platform PT ADAPTERS boolean found false for int i 0 i deltas length i we only care about extensions to the adapters extension point if adapter Id equals deltas i get Extension Point get Unique Identifier continue found true if deltas i get Kind I Extension Delta ADDED register Extension deltas i get Extension else create the hash set lazily if to Remove null to Remove new Hash Set to Remove add deltas i get Extension need to discard cached state for the changed extensions if found flush Lookup if to Remove null return remove any factories belonging to extensions that are going away for Iterator it factories values iterator it has Next for Iterator it2 List it next iterator it2 has Next I Adapter Factory factory I Adapter Factory it2 next if factory instanceof Adapter Factory Proxy I Extension ext Adapter Factory Proxy factory get Extension if to Remove contains ext it2 remove  registryChanged IRegistryChangeEvent HashSet toRemove IExtensionDelta getExtensionDeltas adapterId PI_RUNTIME PT_ADAPTERS adapterId getExtensionPoint getUniqueIdentifier getKind IExtensionDelta registerExtension getExtension toRemove toRemove HashSet toRemove getExtension flushLookup toRemove hasNext hasNext IAdapterFactory IAdapterFactory AdapterFactoryProxy IExtension AdapterFactoryProxy getExtension toRemove
public synchronized void unregister Adapters I Adapter Factory factory for Iterator it factories values iterator it has Next List it next remove factory flush Lookup  unregisterAdapters IAdapterFactory hasNext flushLookup
public synchronized void unregister Adapters I Adapter Factory factory Class adaptable List factory List List factories get adaptable get Name if factory List null return factory List remove factory flush Lookup  unregisterAdapters IAdapterFactory factoryList getName factoryList factoryList flushLookup
public synchronized void unregister All Adapters factories clear flush Lookup Platform get Extension Registry remove Registry Change Listener this  unregisterAllAdapters flushLookup getExtensionRegistry removeRegistryChangeListener

public final class Assert This class is not intended to be instantiated private Assert not allowed 
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression return is Legal expression NON NLS 1  IllegalArgumentException IllegalArgumentException isLegal isLegal
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression String message if expression throw new Illegal Argument Exception message return expression  IllegalArgumentException IllegalArgumentException isLegal IllegalArgumentException
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown param object the value to test exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object is Not Null object NON NLS 1  IllegalArgumentException isNotNull isNotNull
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param object the value to test param message the message to include in the exception exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object String message if object null throw new Assertion Failed Exception null argument message NON NLS 1  IllegalArgumentException isNotNull AssertionFailedException
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails public static boolean is True boolean expression return is True expression NON NLS 1  isTrue isTrue
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails public static boolean is True boolean expression String message if expression throw new Assertion Failed Exception assertion failed message NON NLS 1 return expression  isTrue AssertionFailedException

class Assertion Failed Exception extends Runtime Exception Constructs a new exception public Assertion Failed Exception super  AssertionFailedException RuntimeException AssertionFailedException
Constructs a new exception with the given message public Assertion Failed Exception String detail super detail  AssertionFailedException

Creates a new authorization database whose data cannot be saved to disk public Authorization Database super  AuthorizationDatabase
Creates a new authorization database or opens an existing one whose data is or can be saved to a file with the given filename A password must be given to create a new database and an existing database is opened by supplying the password that was given to create it param filename the location of the database on disk For example c temp database param password the password to access the database For example secret exception Core Exception if there are problems creating the database Reasons include ul li The database could not be opened because the wrong password was given li The database could not be opened because the specified file is corrupt ul public Authorization Database String filename String password throws Core Exception Assert is Not Null filename Assert is Not Null password this password password file new File filename load  CoreException AuthorizationDatabase CoreException isNotNull isNotNull
Adds the given authorization information to the database 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 contain information such as usernames and passwords param server Url the URL identifying the server for this authorization information For example http www hostname com param realm the subsection of the given server to which this authorization information applies For example realm1 hostname 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 usernames and passwords public void add Authorization Info URL server Url String realm String auth Scheme Map info Assert is Not Null server Url Assert is Not Null realm Assert is Not Null auth Scheme Assert is Not Null info String url server Url to String Hashtable realm To Auth Scheme Hashtable authorization Info get url if realm To Auth Scheme null realm To Auth Scheme new Hashtable 5 authorization Info put url realm To Auth Scheme Hashtable auth Scheme To Info Hashtable realm To Auth Scheme get realm if auth Scheme To Info null auth Scheme To Info new Hashtable 5 realm To Auth Scheme put realm auth Scheme To Info auth Scheme To Info put auth Scheme to Lower Case info needs Saving true  serverUrl authScheme addAuthorizationInfo serverUrl authScheme isNotNull serverUrl isNotNull isNotNull authScheme isNotNull serverUrl toString realmToAuthScheme authorizationInfo realmToAuthScheme realmToAuthScheme authorizationInfo realmToAuthScheme authSchemeToInfo realmToAuthScheme authSchemeToInfo authSchemeToInfo realmToAuthScheme authSchemeToInfo authSchemeToInfo authScheme toLowerCase needsSaving
Adds the specified resource to the protection space specified by the given realm All resources 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 hostname com folder param realm the name of the protection space For example realm1 hostname com public void add Protection Space URL resource Url String realm Assert is Not Null resource Url Assert is Not Null realm if resource Url get File ends With NON NLS 1 resource Url URL Tool get Parent resource Url String old Realm get Protection Space resource Url if old Realm null old Realm equals realm return String url1 resource Url to String Enumeration urls protection Space keys while urls has More Elements String url2 String urls next Element if url1 starts With url2 url2 starts With url1 protection Space remove url2 break protection Space put url1 realm needs Saving true  resourceUrl addProtectionSpace resourceUrl isNotNull resourceUrl isNotNull resourceUrl getFile endsWith resourceUrl URLTool getParent resourceUrl oldRealm getProtectionSpace resourceUrl oldRealm oldRealm resourceUrl toString protectionSpace hasMoreElements nextElement startsWith startsWith protectionSpace protectionSpace needsSaving
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 hostname com param realm the subsection of the given server to remove the authorization information for For example realm1 hostname 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 public void flush Authorization Info URL server Url String realm String auth Scheme Hashtable realm To Auth Scheme Hashtable authorization Info get server Url to String if realm To Auth Scheme null return Hashtable auth Scheme To Info Hashtable realm To Auth Scheme get realm if auth Scheme To Info null return auth Scheme To Info remove auth Scheme to Lower Case needs Saving true  serverUrl authScheme flushAuthorizationInfo serverUrl authScheme realmToAuthScheme authorizationInfo serverUrl toString realmToAuthScheme authSchemeToInfo realmToAuthScheme authSchemeToInfo authSchemeToInfo authScheme toLowerCase needsSaving
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 hostname com param realm the subsection of the given server to which the authorization information applies For example realm1 hostname 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 Map get Authorization Info URL server Url String realm String auth Scheme Hashtable realm To Auth Scheme Hashtable authorization Info get server Url to String if realm To Auth Scheme null return null Hashtable auth Scheme To Info Hashtable realm To Auth Scheme get realm if auth Scheme To Info null return null return Map auth Scheme To Info get auth Scheme to Lower Case  serverUrl authScheme getAuthorizationInfo serverUrl authScheme realmToAuthScheme authorizationInfo serverUrl toString realmToAuthScheme authSchemeToInfo realmToAuthScheme authSchemeToInfo authSchemeToInfo authScheme toLowerCase
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 hostname com folder return the protection space realm for the specified resource or code null code if the realm is unknown public String get Protection Space URL resource Url while resource Url null String realm String protection Space get resource Url to String if realm null return realm resource Url URL Tool get Parent resource Url return null  resourceUrl getProtectionSpace resourceUrl resourceUrl protectionSpace resourceUrl toString resourceUrl URLTool getParent resourceUrl
private void load throws Core Exception if file null return if file exists save return try Input Stream input new File Input Stream file try load input finally input close catch IO Exception e throw new Core Exception new Status I Status ERROR Platform PI RUNTIME Platform FAILED READ METADATA Policy bind meta unable To Read Authorization file to String e NON NLS 1 catch Class Not Found Exception e throw new Core Exception new Status I Status ERROR Platform PI RUNTIME Platform FAILED READ METADATA Policy bind meta unable To Read Authorization file to String e NON NLS 1  CoreException InputStream FileInputStream IOException CoreException IStatus PI_RUNTIME FAILED_READ_METADATA unableToReadAuthorization toString ClassNotFoundException CoreException IStatus PI_RUNTIME FAILED_READ_METADATA unableToReadAuthorization toString
private void load Input Stream is throws IO Exception Class Not Found Exception Core Exception try to read the file version number Pre 2 0 versions had no number int version is read if version KEYRING FILE VERSION read the authorization data Cipher Input Stream cis new Cipher Input Stream is password Object Input Stream ois new Object Input Stream cis try authorization Info Hashtable ois read Object protection Space Hashtable ois read Object finally ois close else the format has changed just log a warning Internal Platform get Default log new Status I Status WARNING Platform PI RUNTIME Platform FAILED READ METADATA Policy bind meta auth Format Changed null NON NLS 1 close the stream and save a new file in the correct format try is close catch IO Exception e ignore failure to close needs Saving true save  InputStream IOException ClassNotFoundException CoreException KEYRING_FILE_VERSION CipherInputStream CipherInputStream ObjectInputStream ObjectInputStream authorizationInfo readObject protectionSpace readObject InternalPlatform getDefault IStatus PI_RUNTIME FAILED_READ_METADATA authFormatChanged IOException needsSaving
Saves the authorization database to disk public void save throws Core Exception if needs Saving file null return try file delete file create New File File Output Stream out new File Output Stream file try save out finally out close catch IO Exception e throw new Core Exception new Status I Status ERROR Platform PI RUNTIME Platform FAILED WRITE METADATA Policy bind meta unable To Write Authorization file to String e NON NLS 1 needs Saving false  CoreException needsSaving createNewFile FileOutputStream FileOutputStream IOException CoreException IStatus PI_RUNTIME FAILED_WRITE_METADATA unableToWriteAuthorization toString needsSaving
private void save Output Stream os throws IO Exception write the version number os write KEYRING FILE VERSION Cipher Output Stream cos new Cipher Output Stream os password Object Output Stream oos new Object Output Stream cos write the data try oos write Object authorization Info oos write Object protection Space finally oos close  OutputStream IOException KEYRING_FILE_VERSION CipherOutputStream CipherOutputStream ObjectOutputStream ObjectOutputStream writeObject authorizationInfo writeObject protectionSpace
Sets the password to use for accessing this database If the database is subsequently saved this new password is used public boolean set Password String old Value String new Value if old Value equals password return false password new Value needs Saving true return true  setPassword oldValue newValue oldValue newValue needsSaving

Opens the password database if any initally provided to the platform at startup private static void load Keyring if keyring null new File keyring File last Modified keyring Time Stamp return if keyring File null File file new File Internal Platform get Default get Configuration Location getURL get Path Platform PI RUNTIME file new File file F KEYRING keyring File file get Absolute Path try keyring new Authorization Database keyring File password catch Core Exception e Internal Platform get Default log e get Status if keyring null try deleting the file and loading again format may have changed new java io File keyring File delete try keyring new Authorization Database keyring File password catch Core Exception e don t bother logging a second failure keyring Time Stamp new File keyring File last Modified  loadKeyring keyringFile lastModified keyringTimeStamp keyringFile InternalPlatform getDefault getConfigurationLocation getPath PI_RUNTIME F_KEYRING keyringFile getAbsolutePath AuthorizationDatabase keyringFile CoreException InternalPlatform getDefault getStatus keyringFile AuthorizationDatabase keyringFile CoreException keyringTimeStamp keyringFile lastModified
see org eclipse core runtime Platform public static void add Authorization Info URL server Url String realm String auth Scheme Map info throws Core Exception load Keyring keyring add Authorization Info server Url realm auth Scheme new Hash Map info keyring save  addAuthorizationInfo serverUrl authScheme CoreException loadKeyring addAuthorizationInfo serverUrl authScheme HashMap
see org eclipse core runtime Platform public static void add Protection Space URL resource Url String realm throws Core Exception load Keyring keyring add Protection Space resource Url realm keyring save  addProtectionSpace resourceUrl CoreException loadKeyring addProtectionSpace resourceUrl
see org eclipse core runtime Platform public static void flush Authorization Info URL server Url String realm String auth Scheme throws Core Exception load Keyring keyring flush Authorization Info server Url realm auth Scheme keyring save  flushAuthorizationInfo serverUrl authScheme CoreException loadKeyring flushAuthorizationInfo serverUrl authScheme
see org eclipse core runtime Platform public static Map get Authorization Info URL server Url String realm String auth Scheme load Keyring Map info keyring get Authorization Info server Url realm auth Scheme return info null null new Hash Map info  getAuthorizationInfo serverUrl authScheme loadKeyring getAuthorizationInfo serverUrl authScheme HashMap
see org eclipse core runtime Platform public static String get Protection Space URL resource Url load Keyring return keyring get Protection Space resource Url  getProtectionSpace resourceUrl loadKeyring getProtectionSpace resourceUrl
public static void set Keyring File String file if keyring File null throw new Illegal State Exception Policy bind meta keyring File Already Specified keyring File NON NLS 1 keyring File file  setKeyringFile keyringFile IllegalStateException keyringFileAlreadySpecified keyringFile keyringFile
public static void set Password String keyring Password password keyring Password  setPassword keyringPassword keyringPassword

Initializes the cipher with the given mode and password This method must be called first before any encryption of decryption takes place to specify whether the cipher should be in encrypt or decrypt mode and to set the password param mode param password String public Cipher int mode String password String this mode mode try this password password String get Bytes UTF8 NON NLS 1 catch Unsupported Encoding Exception e this password password String get Bytes to Digest new byte password length RANDOM SIZE  passwordString passwordString passwordString getBytes UnsupportedEncodingException passwordString getBytes toDigest RANDOM_SIZE
Encrypts or decrypts depending on which mode the cipher is in the given data and returns the result param data return the result of encrypting or decrypting the given data public byte cipher byte data throws Exception return transform data 0 data length mode 
Encrypts or decrypts depending on which mode the cipher is in the given data and returns the result param data the byte array containg the given data param off the index of the first byte in the given byte array to be transformed param len the number of bytes to be transformed return the result of encrypting or decrypting the given data public byte cipher byte data int off int len throws Exception return transform data off len mode 
Encrypts or decrypts depending on which mode the cipher is in the given byte and returns the result param datum the given byte return the result of encrypting or decrypting the given byte public byte cipher byte datum throws Exception byte data datum return cipher data 0 
Generates a secure stream of bytes based on the input seed This routine works by combining the input seed with random bytes generated by a random number generator and then computing the SHA 1 hash of those bytes private byte generate Bytes throws Exception if digest null digest Message Digest get Instance SHA NON NLS 1 also seed random number generator based on password long seed 0 for int i 0 i password length i this function is known to give good hash distribution for character data seed seed 37 password i random new Random seed add random bytes to digest array random next Bytes to Digest overlay password onto digest array System arraycopy password 0 to Digest 0 password length compute and return SHA 1 hash of digest array return digest digest to Digest  generateBytes MessageDigest getInstance nextBytes toDigest toDigest toDigest
Returns a stream of cryptographically secure bytes of the given length The result is deterministically based on the input seed password private byte next Random int length throws Exception byte next Random new byte length int next Random Offset 0 while next Random Offset length if byte Stream null byte Stream Offset byte Stream length byte Stream generate Bytes byte Stream Offset 0 next Random next Random Offset byte Stream byte Stream Offset return next Random  nextRandom nextRandom nextRandomOffset nextRandomOffset byteStream byteStreamOffset byteStream byteStream generateBytes byteStreamOffset nextRandom nextRandomOffset byteStream byteStreamOffset nextRandom
private byte transform byte data int off int len int mod throws Exception byte result next Random len for int i 0 i len i result i byte data i off mod result i return result  nextRandom

Constructs a new code Cipher Input Stream code that decrypts the data in the given code Input Stream code The data can only be decrypted if the given password is the same as that which was used to encrypt it param is param password public Cipher Input Stream Input Stream is String password super is cipher new Cipher Cipher DECRYPT MODE password  CipherInputStream InputStream CipherInputStream InputStream DECRYPT_MODE
see Input Stream mark Supported public boolean mark Supported return false  InputStream markSupported markSupported
see Input Stream read public int read throws IO Exception int b super read if b 1 return 1 try return cipher cipher byte b 0x00ff catch Exception e throw new IO Exception e get Message  InputStream IOException IOException getMessage
see Input Stream read byte int int public int read byte b int off int len throws IO Exception int bytes Read in read b off len if bytes Read 1 return 1 try byte result cipher cipher b off bytes Read for int i 0 i result length i b i off result i return bytes Read catch Exception e throw new IO Exception e get Message  InputStream IOException bytesRead bytesRead bytesRead bytesRead IOException getMessage
see Input Stream skip long public long skip long n throws IO Exception byte buffer new byte SKIP BUFFER SIZE int bytes Read 0 long bytes Remaining n while bytes Read 1 bytes Remaining 0 bytes Read read buffer 0 int Math min SKIP BUFFER SIZE bytes Remaining if bytes Read 0 bytes Remaining bytes Read return n bytes Remaining  InputStream IOException SKIP_BUFFER_SIZE bytesRead bytesRemaining bytesRead bytesRemaining bytesRead SKIP_BUFFER_SIZE bytesRemaining bytesRead bytesRemaining bytesRead bytesRemaining

Constructs a new code Cipher Output Stream code that encrypts the data in the given code Output Stream code Once the data is encrypted it can be decrypted by suppying the encrupted data and given password to a code Cipher code or code Cipher Input Stream code param os param password public Cipher Output Stream Output Stream os String password super os cipher new Cipher Cipher ENCRYPT MODE password  CipherOutputStream OutputStream CipherInputStream CipherOutputStream OutputStream ENCRYPT_MODE
see Output Stream write int public void write int b throws IO Exception try out write cipher cipher byte b catch Exception e throw new IO Exception e get Message  OutputStream IOException IOException getMessage

public static Bundle get Compatibility if compatibility null compatibility org eclipse core internal runtime Internal Platform get Default get Bundle PI RUNTIME COMPATIBILITY return compatibility  getCompatibility InternalPlatform getDefault getBundle PI_RUNTIME_COMPATIBILITY
public static void set Plugin I Plugin Descriptor descriptor Plugin plugin Here we use reflection so the runtime code can run without the compatibility plugin if get Compatibility null throw new Illegal State Exception try Method set Plugin descriptor get Class get Method set Plugin new Class Plugin class NON NLS 1 set Plugin invoke descriptor new Object plugin catch Exception e Ignore the exceptions  setPlugin IPluginDescriptor getCompatibility IllegalStateException setPlugin getClass getMethod setPlugin setPlugin
public static I Plugin Descriptor get Plugin Descriptor String plugin Id Here we use reflection so the runtime code can run without the compatibility Bundle compatibility get 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 Descriptor old Internal Platform get Method get Plugin Descriptor new Class String class NON NLS 1 return I Plugin Descriptor get Plugin Descriptor invoke old Internal Platform new Object plugin Id catch Exception e Ignore the exceptions return false return null  IPluginDescriptor getPluginDescriptor pluginId getCompatibility IllegalStateException oldInternalPlatform oldInternalPlatform loadClass InternalPlatform getPluginDescriptor oldInternalPlatform getMethod getPluginDescriptor IPluginDescriptor getPluginDescriptor oldInternalPlatform pluginId
public static void set Active I Plugin Descriptor descriptor Bundle compatibility get Compatibility if compatibility null throw new Illegal State Exception try Method set Plugin descriptor get Class get Method set Active null NON NLS 1 set Plugin invoke descriptor null catch Exception e Ignore the exceptions  setActive IPluginDescriptor getCompatibility IllegalStateException setPlugin getClass getMethod setActive setPlugin
public static boolean has Plugin Object I Plugin Descriptor descriptor Bundle compatibility get Compatibility if compatibility null throw new Illegal State Exception Boolean result new Boolean false try Method set Plugin descriptor get Class get Method has Plugin Object null NON NLS 1 result Boolean set Plugin invoke descriptor null catch Exception e Ignore the exceptions return result boolean Value  hasPluginObject IPluginDescriptor getCompatibility IllegalStateException setPlugin getClass getMethod hasPluginObject setPlugin booleanValue

protected void assert Location Initialized throws Illegal State Exception if location null initialized return Location service Internal Platform get Default get Instance Location if service null throw new Illegal State Exception Policy bind meta no Data Mode Specified NON NLS 1 try URL url service getURL if url null throw new Illegal State Exception Policy bind meta instance Data Unspecified NON NLS 1 TODO assume the URL is a file Use the new File technique to ensure that the resultant string is in the right format e g leading removed from c foo etc location new Path new File url get File to String initialize Location catch Core Exception e throw new Illegal State Exception e get Message  assertLocationInitialized IllegalStateException InternalPlatform getDefault getInstanceLocation IllegalStateException noDataModeSpecified IllegalStateException instanceDataUnspecified getFile toString initializeLocation CoreException IllegalStateException getMessage
public I Path get Backup File Path For I Path file throws Illegal State Exception TODO Does not seems to be used assert Location Initialized return file remove Last Segments 1 append file last Segment F BACKUP  IPath getBackupFilePathFor IPath IllegalStateException assertLocationInitialized removeLastSegments lastSegment F_BACKUP
public I Path get Metadata Location throws Illegal State Exception assert Location Initialized return location append F META AREA  IPath getMetadataLocation IllegalStateException assertLocationInitialized F_META_AREA
public I Path get Instance Data Location throws Illegal State Exception assert Location Initialized return location  IPath getInstanceDataLocation IllegalStateException assertLocationInitialized
public I Path get Log Location throws Illegal State Exception return new Path Internal Platform get Default get Framework Log get File get Absolute Path  IPath getLogLocation IllegalStateException InternalPlatform getDefault getFrameworkLog getFile getAbsolutePath
Returns the read write location in which the given bundle can manage private state public I Path get State Location Bundle bundle throws Illegal State Exception assert Location Initialized return get State Location bundle get Symbolic Name  IPath getStateLocation IllegalStateException assertLocationInitialized getStateLocation getSymbolicName
public I Path get State Location String bundle Name throws Illegal State Exception assert Location Initialized return get Metadata Location append F PLUGIN DATA append bundle Name  IPath getStateLocation bundleName IllegalStateException assertLocationInitialized getMetadataLocation F_PLUGIN_DATA bundleName
Returns the read write location of the file for storing plugin preferences public I Path get Preference Location Bundle bundle boolean create throws Illegal State Exception assert Location Initialized return get Preference Location bundle get Symbolic Name create  IPath getPreferenceLocation IllegalStateException assertLocationInitialized getPreferenceLocation getSymbolicName
public I Path get Preference Location String bundle Name boolean create throws Illegal State Exception I Path result get State Location bundle Name if create result to File mkdirs return result append PREFERENCES FILE NAME  IPath getPreferenceLocation bundleName IllegalStateException IPath getStateLocation bundleName toFile PREFERENCES_FILE_NAME
private void initialize Location throws Core Exception check if the location can be created if location to File exists if location to File is Directory String message Policy bind meta not Dir location to String NON NLS 1 throw new Core Exception new Status I Status ERROR Platform PI RUNTIME Platform FAILED WRITE METADATA message null try infer the device if there isn t one windows if location get Device null location new Path location to File get Absolute Path create Location initialized true  initializeLocation CoreException toFile toFile isDirectory notDir toString CoreException IStatus PI_RUNTIME FAILED_WRITE_METADATA getDevice toFile getAbsolutePath createLocation
private void create Location throws Core Exception append on the metadata location so that the whole structure is created File file location append F META AREA to File try file mkdirs catch Exception e String message Policy bind meta could Not Create file get Absolute Path NON NLS 1 throw new Core Exception new Status I Status ERROR Platform PI RUNTIME Platform FAILED WRITE METADATA message e if file can Write String message Policy bind meta readonly file get Absolute Path NON NLS 1 throw new Core Exception new Status I Status ERROR Platform PI RUNTIME Platform FAILED WRITE METADATA message null set the log file location now that we created the data area I Path path location append F META AREA append F LOG try Internal Platform get Default get Framework Log set File path to File true catch IO Exception e e print Stack Trace  createLocation CoreException F_META_AREA toFile couldNotCreate getAbsolutePath CoreException IStatus PI_RUNTIME FAILED_WRITE_METADATA canWrite getAbsolutePath CoreException IStatus PI_RUNTIME FAILED_WRITE_METADATA IPath F_META_AREA F_LOG InternalPlatform getDefault getFrameworkLog setFile toFile IOException printStackTrace

public static String get Dev Class Path String id String result null if id null dev Properties null String entry dev Properties get Property id if entry null result get Array From List entry if result null result dev Default Classpath return result  getDevClassPath devProperties devProperties getProperty getArrayFromList devDefaultClasspath
Returns the result of converting a list of comma separated tokens into an array return the array of string tokens param prop the initial comma separated string public static String get Array From List String prop if prop null prop trim equals NON NLS 1 return new String 0 Vector list new Vector String Tokenizer tokens new String Tokenizer prop NON NLS 1 while tokens has More Tokens String token tokens next Token trim if token equals NON NLS 1 list add Element token return list is Empty new String 0 String list to Array new String list size  getArrayFromList StringTokenizer StringTokenizer hasMoreTokens nextToken addElement isEmpty toArray
public static boolean in Development Mode return in Development Mode  inDevelopmentMode inDevelopmentMode
private static Properties load URL url Properties props new Properties try Input Stream is null try is url open Stream props load is finally is close catch IO Exception e TODO consider logging here return props  InputStream openStream IOException

private static String buildNL Variants String nl Array List result new Array List I Path base new Path nl NON NLS 1 I Path path new Path nl replace   while path segment Count 0 result add base append path to String for backwards compatibility only don t replace the slashes if path segment Count 1 result add base append path to String replace   to String path path remove Last Segments 1 return String result to Array new String result size  buildNLVariants ArrayList ArrayList IPath IPath _ segmentCount toString segmentCount toString _ toString removeLastSegments toArray
See doc on link Platform find Bundle I Path Platform find Bundle I Path public static URL find Bundle bundle I Path path return find bundle path null  IPath IPath IPath
See doc on link Platform find Bundle I Path Map Platform find Bundle I Path Map public static URL find Bundle b I Path path Map override if path null return null URL result null Check for the empty or root case first if path is Empty path is Root Watch for the root case It will produce a new URL which is only the root directory and not the root of this plugin result find In Plugin b Path EMPTY if result null result find In Fragments b Path EMPTY return result Now check for paths without variable substitution String first path segment 0 if first char At 0 result find In Plugin b path if result null result find In Fragments b path return result Worry about variable substitution I Path rest path remove First Segments 1 if first equals Ignore Case nl NON NLS 1 return findNL b rest override if first equals Ignore Case os NON NLS 1 return findOS b rest override if first equals Ignore Case ws NON NLS 1 return findWS b rest override if first equals Ignore Case files NON NLS 1 return null return null  IPath IPath IPath isEmpty isRoot findInPlugin findInFragments charAt findInPlugin findInFragments IPath removeFirstSegments equalsIgnoreCase equalsIgnoreCase equalsIgnoreCase equalsIgnoreCase
private static URL findOS Bundle b I Path path Map override String os null if override null try check for override os String override get os NON NLS 1 catch Class Cast Exception e just in case if os null use default os Internal Platform get Default getOS if os length 0 return null Now do the same for osarch String os Arch null if override null try check for override os Arch String override get arch NON NLS 1 catch Class Cast Exception e just in case if os Arch null use default os Arch Internal Platform get Default getOS Arch if os Arch length 0 return null URL result null I Path base new Path os append os append os Arch NON NLS 1 Keep doing this until all you have left is os as a path while base segment Count 1 I Path file Path base append path result find In Plugin b file Path if result null return result result find In Fragments b file Path if result null return result base base remove Last Segments 1 If we get to this point we haven t found it yet Look in the plugin and fragment root directories result find In Plugin b path if result null return result return find In Fragments b path  IPath ClassCastException InternalPlatform getDefault osArch osArch ClassCastException osArch osArch InternalPlatform getDefault getOSArch osArch IPath osArch segmentCount IPath filePath findInPlugin filePath findInFragments filePath removeLastSegments findInPlugin findInFragments
private static URL findWS Bundle b I Path path Map override String ws null if override null try check for override ws String override get ws NON NLS 1 catch Class Cast Exception e just in case if ws null use default ws Internal Platform get Default getWS I Path file Path new Path ws append ws append path NON NLS 1 We know that there is only one segment to the ws path e g ws win32 URL result find In Plugin b file Path if result null return result result find In Fragments b file Path if result null return result If we get to this point we haven t found it yet Look in the plugin and fragment root directories result find In Plugin b path if result null return result return find In Fragments b path  IPath ClassCastException InternalPlatform getDefault IPath filePath findInPlugin filePath findInFragments filePath findInPlugin findInFragments
private static URL findNL Bundle b I Path path Map override String nl null String nl Variants null if override null try check for override nl String override get nl NON NLS 1 catch Class Cast Exception e just in case nl Variants nl null NL JAR VARIANTS buildNL Variants nl if nl null nl length 0 return null URL result null for int i 0 i nl Variants length i I Path file Path new Path nl Variants i append path result find In Plugin b file Path if result null return result result find In Fragments b file Path if result null return result If we get to this point we haven t found it yet Look in the plugin and fragment root directories result find In Plugin b path if result null return result return find In Fragments b path  IPath nlVariants ClassCastException nlVariants NL_JAR_VARIANTS buildNLVariants nlVariants IPath filePath nlVariants findInPlugin filePath findInFragments filePath findInPlugin findInFragments
private static URL find In Plugin Bundle b I Path file Path return b get Entry file Path to String  findInPlugin IPath filePath getEntry filePath toString
private static URL find In Fragments Bundle b I Path file Path Bundle fragments Internal Platform get Default get Fragments b if fragments null return null URL fileURL null int i 0 while i fragments length fileURL null fileURL fragments i get Entry file Path to String i return fileURL  findInFragments IPath filePath InternalPlatform getDefault getFragments getEntry filePath toString
See doc on link Platform open Stream Bundle I Path boolean Platform Platform open Stream Bundle I Path boolean public static final Input Stream open Stream Bundle bundle I Path file boolean localized throws IO Exception URL url null if localized url find In Plugin bundle file if url null url find In Fragments bundle file else url Find Support find bundle file if url null return url open Stream throw new IO Exception Cannot find file to String NON NLS 1  openStream IPath openStream IPath InputStream openStream IPath IOException findInPlugin findInFragments FindSupport openStream IOException toString

Private constructor to block instance creation private Internal Platform super  InternalPlatform
public static Internal Platform get Default return singleton  InternalPlatform getDefault
see Platform add Log Listener I Log Listener public void add Log Listener I Log Listener listener assert Initialized synchronized log Listeners replace if already exists Set behaviour but we use an array since we want to retain order log Listeners remove listener log Listeners add listener  addLogListener ILogListener addLogListener ILogListener assertInitialized logListeners logListeners logListeners
see Platform public URL as LocalURL URL url throws IO Exception URL result url If this is a platform URL get the local URL from the PlatformURL Connection if result get Protocol equals PlatformURL Handler PROTOCOL result as ActualURL url If the result is a bundleentry or bundleresouce URL then convert it to a file URL This will end up extracting the bundle entry to cache if the bundle is packaged as a jar if result get Protocol starts With PlatformURL Handler BUNDLE if url Converter null throw new IO Exception url noaccess NON NLS 1 result url Converter convert To FileURL result return result  asLocalURL IOException PlatformURLConnection getProtocol PlatformURLHandler asActualURL getProtocol startsWith PlatformURLHandler urlConverter IOException urlConverter convertToFileURL
private URL as ActualURL URL url throws IO Exception if url get Protocol equals PlatformURL Handler PROTOCOL return url URL Connection connection url open Connection if connection instanceof PlatformURL Connection return PlatformURL Connection connection get ResolvedURL else return url  asActualURL IOException getProtocol PlatformURLHandler URLConnection openConnection PlatformURLConnection PlatformURLConnection getResolvedURL
private void assert Initialized avoid the Policy bind if assertion is true if initialized Assert is True false Policy bind meta app Not Init NON NLS 1  assertInitialized isTrue appNotInit
see Platform public void end Splash if DEBUG This value is only relevant if the workspace chooser is not used String start String System get Property eclipse start Time NON NLS 1 if start String null try long start Long parse Long start String long end System current Time Millis System out println Startup complete end start ms NON NLS 1 NON NLS 2 catch Number Format Exception e this is just debugging code ok to swallow exception if splash Down return splash Down true run end Of Initialization Handler  endSplash startString getProperty startTime startString parseLong startString currentTimeMillis NumberFormatException splashDown splashDown endOfInitializationHandler
see Platform get Adapter Manager public I Adapter Manager get Adapter Manager assert Initialized if adapter Manager null adapter Manager new Adapter Manager return adapter Manager  getAdapterManager IAdapterManager getAdapterManager assertInitialized adapterManager adapterManager AdapterManager adapterManager
public boolean get Boolean Option String option boolean default Value String value get Option option return value null value equals Ignore Case true default Value NON NLS 1  getBooleanOption defaultValue getOption equalsIgnoreCase defaultValue
public int get Integer Option String option int default Value String value get Option option if value null return default Value try return Integer parse Int value catch Number Format Exception e return default Value  getIntegerOption defaultValue getOption defaultValue parseInt NumberFormatException defaultValue
public String get Command Line Args return all Args  getCommandLineArgs allArgs
see Platform public String get Option String option if options null return options get Option option return null  getOption getOption
public I Job Manager get Job Manager return Job Manager get Instance  IJobManager getJobManager JobManager getInstance
public I Path get Log File Location return get Meta Area get Log Location  IPath getLogFileLocation getMetaArea getLogLocation
see Platform get Location public I Path get Location throws Illegal State Exception if cached Instance Location null Location location get Instance Location if location null return null This makes the assumption that the instance location is a file URL File file new File location getURL get File cached Instance Location new Path file to String return cached Instance Location  getLocation IPath getLocation IllegalStateException cachedInstanceLocation getInstanceLocation getFile cachedInstanceLocation toString cachedInstanceLocation
Returns a log for the given plugin Creates a new one if needed public I Log get Log Bundle bundle I Log result I Log logs get bundle if result null return result result new Log bundle logs put bundle result return result  ILog getLog ILog ILog
private void initialize Authorization Handler Authorization Handler set Keyring File keyring File Authorization Handler set Password password  initializeAuthorizationHandler AuthorizationHandler setKeyringFile keyringFile AuthorizationHandler setPassword
Returns the object which defines the location and organization of the platform s meta area public Data Area get Meta Area if meta Area null return meta Area meta Area new Data Area return meta Area  DataArea getMetaArea metaArea metaArea metaArea DataArea metaArea
private void handle Exception I Safe Runnable code Throwable e if e instanceof Operation Canceled Exception String plugin Id Platform PI RUNTIME String message Policy bind meta plugin Problems plugin Id NON NLS 1 I Status status if e instanceof Core Exception status new Multi Status plugin Id Platform PLUGIN ERROR message e Multi Status status merge Core Exception e get Status else status new Status I Status ERROR plugin Id Platform PLUGIN ERROR message e we have to be safe so don t try to log if the platform is not running since it will fail last resort is to print the stack trace on stderr if initialized log status else e print Stack Trace code handle Exception e  handleException ISafeRunnable OperationCanceledException pluginId PI_RUNTIME pluginProblems pluginId IStatus CoreException MultiStatus pluginId PLUGIN_ERROR MultiStatus CoreException getStatus IStatus pluginId PLUGIN_ERROR printStackTrace handleException
return whether platform log writer has already been registered public boolean has Log Writer return platform Log null log Listeners contains platform Log  hasLogWriter platformLog logListeners platformLog
public I Extension Registry get Registry return registry  IExtensionRegistry getRegistry
Internal method for starting up the platform The platform is not started with any location and should not try to access the instance data area public void start Bundle Context runtime Context throws IO Exception this context runtime Context initialize Location Trackers Resource Translator start end Of Initialization Handler get Splash Handler process Command Line info Service get Non Framework Args debug Tracker new Service Tracker context Debug Options class get Name null debug Tracker open options Debug Options debug Tracker get Service initialize Debug Flags initialized true get Meta Area initialize Authorization Handler platform Log new Platform Log Writer add Log Listener platform Log initialize Runtime File Manager  BundleContext runtimeContext IOException runtimeContext initializeLocationTrackers ResourceTranslator endOfInitializationHandler getSplashHandler processCommandLine infoService getNonFrameworkArgs debugTracker ServiceTracker DebugOptions getName debugTracker DebugOptions debugTracker getService initializeDebugFlags getMetaArea initializeAuthorizationHandler platformLog PlatformLogWriter addLogListener platformLog initializeRuntimeFileManager
private void initialize Runtime File Manager throws IO Exception File controlled Dir new File Internal Platform get Default get Configuration Location getURL get Path Platform PI RUNTIME controlled Dir mkdirs runtime File Manager new File Manager controlled Dir Internal Platform get Default get Configuration Location is Read Only none null NON NLS 1 runtime File Manager open true  initializeRuntimeFileManager IOException controlledDir InternalPlatform getDefault getConfigurationLocation getPath PI_RUNTIME controlledDir runtimeFileManager FileManager controlledDir InternalPlatform getDefault getConfigurationLocation isReadOnly runtimeFileManager
private Runnable get Splash Handler Service Reference ref try ref context get Service References Runnable class get Name null catch Invalid Syntax Exception e return null assumes the end Initialization Handler is available as a service see Eclipse Starter publish Splash Screen for int i 0 i ref length i String name String ref i get Property name NON NLS 1 if name null name equals splashscreen NON NLS 1 Runnable result Runnable context get Service ref i context unget Service ref i return result return null  getSplashHandler ServiceReference getServiceReferences getName InvalidSyntaxException endInitializationHandler EclipseStarter publishSplashScreen getProperty getService ungetService
TODO what else must be done during the platform shutdown See loader Shutdown public void stop Bundle Context bundle Context assert Initialized shutdown all running jobs Job Manager shutdown debug Tracker close Resource Translator stop initialized false context null  loaderShutdown BundleContext bundleContext assertInitialized JobManager debugTracker ResourceTranslator
void initialize Debug Flags load runtime options DEBUG get Boolean Option OPTION DEBUG false if DEBUG DEBUG CONTEXT get Boolean Option OPTION DEBUG SYSTEM CONTEXT false DEBUG SHUTDOWN get Boolean Option OPTION DEBUG SHUTDOWN false DEBUG REGISTRY get Boolean Option OPTION DEBUG REGISTRY false DEBUG REGISTRY DUMP get Option OPTION DEBUG REGISTRY DUMP DEBUG PREFERENCES get Boolean Option OPTION DEBUG PREFERENCES false  initializeDebugFlags getBooleanOption OPTION_DEBUG DEBUG_CONTEXT getBooleanOption OPTION_DEBUG_SYSTEM_CONTEXT DEBUG_SHUTDOWN getBooleanOption OPTION_DEBUG_SHUTDOWN DEBUG_REGISTRY getBooleanOption OPTION_DEBUG_REGISTRY DEBUG_REGISTRY_DUMP getOption OPTION_DEBUG_REGISTRY_DUMP DEBUG_PREFERENCES getBooleanOption OPTION_DEBUG_PREFERENCES
final I Log Listener listener listeners i I Safe Runnable code new I Safe Runnable public void run throws Exception listener logging status Platform PI RUNTIME  ILogListener ISafeRunnable ISafeRunnable PI_RUNTIME
public void handle Exception Throwable e Ignore  handleException
Notifies all listeners of the platform log This includes the console log if used and the platform log file All Plugin log messages get funnelled through here as well public void log final I Status status assert Initialized create array to avoid concurrent access I Log Listener listeners synchronized log Listeners listeners I Log Listener log Listeners to Array new I Log Listener log Listeners size for int i 0 i listeners length i final I Log Listener listener listeners i I Safe Runnable code new I Safe Runnable public void run throws Exception listener logging status Platform PI RUNTIME public void handle Exception Throwable e Ignore run code  IStatus assertInitialized ILogListener logListeners ILogListener logListeners toArray ILogListener logListeners ILogListener ISafeRunnable ISafeRunnable PI_RUNTIME handleException
private String process Command Line String args final String TRUE true NON NLS 1 if args null return args all Args args if args length 0 return args int config Args new int args length need to initialize the first element to something that could not be an index config Args 0 1 int config Arg Index 0 for int i 0 i args length i boolean found false check for args without parameters i e a flag arg look for the no registry cache flag if args i equals Ignore Case NO REGISTRY CACHE System set Property PROP NO REGISTRY CACHE TRUE found true check to see if we should NOT be lazily loading plug in definitions from the registry cache file This will be processed below if args i equals Ignore Case NO LAZY REGISTRY CACHE LOADING System set Property PROP NO LAZY CACHE LOADING TRUE found true consume obsolete args if args i equals Ignore Case CLASSLOADER PROPERTIES found true ignored if args i equals Ignore Case NO PACKAGE PREFIXES found true ignored if args i equals Ignore Case PLUGINS found true ignored if args i equals Ignore Case FIRST USE found true ignored if args i equals Ignore Case NO UPDATE found true ignored if args i equals Ignore Case NEW UPDATES found true ignored if args i equals Ignore Case UPDATE found true ignored done checking for args Remember where an arg was found if found config Args config Arg Index i continue check for args with parameters if i args length 1 args i 1 starts With NON NLS 1 continue String arg args i look for the keyring file if args i 1 equals Ignore Case KEYRING keyring File arg found true look for the user password if args i 1 equals Ignore Case PASSWORD password arg found true look for the product to run treat feature as a synonym for product for compatibility if args i 1 equals Ignore Case PRODUCT args i 1 equals Ignore Case FEATURE System set Property PROP PRODUCT arg found true look for the application to run if args i 1 equals Ignore Case APPLICATION System set Property PROP APPLICATION arg found true look for the plug in customization file if args i 1 equals Ignore Case PLUGIN CUSTOMIZATION plugin Customization File arg found true consume obsolete args for compatibilty if args i 1 equals Ignore Case CLASSLOADER PROPERTIES found true ignore if args i 1 equals Ignore Case BOOT found true ignore done checking for args Remember where an arg was found if found config Args config Arg Index i 1 config Args config Arg Index i remove all the arguments consumed by this argument parsing if config Arg Index 0 app Args args return args app Args new String args length config Arg Index framework Args new String config Arg Index config Arg Index 0 int j 0 int k 0 for int i 0 i args length i if i config Args config Arg Index framework Args k args i config Arg Index else app Args j args i return app Args  processCommandLine allArgs configArgs configArgs configArgIndex equalsIgnoreCase NO_REGISTRY_CACHE setProperty PROP_NO_REGISTRY_CACHE equalsIgnoreCase NO_LAZY_REGISTRY_CACHE_LOADING setProperty PROP_NO_LAZY_CACHE_LOADING equalsIgnoreCase CLASSLOADER_PROPERTIES equalsIgnoreCase NO_PACKAGE_PREFIXES equalsIgnoreCase equalsIgnoreCase FIRST_USE equalsIgnoreCase NO_UPDATE equalsIgnoreCase NEW_UPDATES equalsIgnoreCase configArgs configArgIndex startsWith equalsIgnoreCase keyringFile equalsIgnoreCase equalsIgnoreCase equalsIgnoreCase setProperty PROP_PRODUCT equalsIgnoreCase setProperty PROP_APPLICATION equalsIgnoreCase PLUGIN_CUSTOMIZATION pluginCustomizationFile equalsIgnoreCase CLASSLOADER_PROPERTIES equalsIgnoreCase configArgs configArgIndex configArgs configArgIndex configArgIndex appArgs appArgs configArgIndex frameworkArgs configArgIndex configArgIndex configArgs configArgIndex frameworkArgs configArgIndex appArgs appArgs
see Platform remove Log Listener I Log Listener public void remove Log Listener I Log Listener listener assert Initialized synchronized log Listeners log Listeners remove listener  removeLogListener ILogListener removeLogListener ILogListener assertInitialized logListeners logListeners
see Platform public URL resolve URL url throws IO Exception URL result as ActualURL url if result get Protocol starts With PlatformURL Handler BUNDLE return result if url Converter null throw new IO Exception url noaccess NON NLS 1 result url Converter convert To LocalURL result return result  IOException asActualURL getProtocol startsWith PlatformURLHandler urlConverter IOException urlConverter convertToLocalURL
public void run I Safe Runnable code Assert is Not Null code try code run catch Exception e handle Exception code e catch Linkage Error e handle Exception code e  ISafeRunnable isNotNull handleException LinkageError handleException
final Runnable final Handler handler I Safe Runnable code new I Safe Runnable public void run throws Exception final Handler run  finalHandler ISafeRunnable ISafeRunnable finalHandler
public void handle Exception Throwable e just continue the exception has already been logged by the platform see handle Exception I Safe Runnable  handleException handleException ISafeRunnable
private void run Runnable handler run end of initialization handler if handler null return final Runnable final Handler handler I Safe Runnable code new I Safe Runnable public void run throws Exception final Handler run public void handle Exception Throwable e just continue the exception has already been logged by the platform see handle Exception I Safe Runnable run code  finalHandler ISafeRunnable ISafeRunnable finalHandler handleException handleException ISafeRunnable
public void set Option String option String value if options null options set Option option value  setOption setOption
Look for the companion preference translation file for a group of preferences This method will attempt to find a companion properties file first This companion file can be in an nl specific directory for this plugin or any of its fragments or it can be in the root of this plugin or the root of any of the plugin s fragments This properties file can be used to translate preference values TODO fix these comments param unique Identifier the descriptor of the plugin who has the preferences param base Pref File Name the base name of the preference file This base will be used to construct the name of the companion translation file Example If base Pref File Name is plugin customization the preferences are in plugin customization ini and the translations are found in plugin customization properties return the properties file since 2 0 public Properties get Preference Translator String unique Identifier String base Pref File Name return new Properties  uniqueIdentifier basePrefFileName basePrefFileName plugin_customization plugin_customization plugin_customization getPreferenceTranslator uniqueIdentifier basePrefFileName
public I Preferences Service get Preferences Service return Preferences Service get Default  IPreferencesService getPreferencesService PreferencesService getDefault
Takes a preference value and a related resource bundle and returns the translated version of this value if one exists TODO fix these comments param value the preference value for potential translation param props the properties containing the translated values since 2 0 public String translate Preference String value Properties props value value trim if props null value starts With KEY DOUBLE PREFIX return value if value starts With KEY PREFIX int ix value index Of NON NLS 1 String key ix 1 value value substring 0 ix String dflt ix 1 value value substring ix 1 return props get Property key substring 1 dflt return value  translatePreference startsWith KEY_DOUBLE_PREFIX startsWith KEY_PREFIX indexOf getProperty
Applies primary feature specific overrides to default preferences for the plug in with the given id p Note that by the time this method is called the default settings for the plug in itself should have already have been filled in p param id the unique identifier of the plug in param preferences the preference store for the specified plug in since 2 0 public void apply Primary Feature Plugin Default Overrides String id Preferences preferences  applyPrimaryFeaturePluginDefaultOverrides
Applies command line supplied overrides to default preferences for the plug in with the given id p Note that by the time this method is called the default settings for the plug in itself should have already have been filled in along with any default overrides supplied by the primary feature p param id the unique identifier of the plug in param preferences the preference store for the specified plug in since 2 0 public void apply Command Line Plugin Default Overrides String id Preferences preferences if plugin Customization File null no command line overrides to process if DEBUG PREFERENCES Policy debug Command line argument plugin Customization not used NON NLS 1 return try URL plugin CustomizationURL new File plugin Customization File toURL if DEBUG PREFERENCES Policy debug Loading preferences from plugin CustomizationURL NON NLS 1 apply Plugin Default Overrides plugin CustomizationURL id preferences null catch MalformedURL Exception e fail silently if DEBUG PREFERENCES Policy debug MalformedURL Exception creating URL for plugin customization file plugin Customization File NON NLS 1 e print Stack Trace return  applyCommandLinePluginDefaultOverrides pluginCustomizationFile DEBUG_PREFERENCES pluginCustomization pluginCustomizationURL pluginCustomizationFile DEBUG_PREFERENCES pluginCustomizationURL applyPluginDefaultOverrides pluginCustomizationURL MalformedURLException DEBUG_PREFERENCES MalformedURLException pluginCustomizationFile printStackTrace
Applies overrides to default preferences for the plug in with the given id The data is contained in the code java io Properties code style file at the given URL The property names consist of separated plug in id and name of preference e g com example myplugin mypref param propertiesURL the URL of a code java io Properties code style file param id the unique identifier of the plug in param preferences the preference store for the specified plug in since 2 0 private void apply Plugin Default Overrides URL propertiesURL String id Preferences preferences Properties props read the java io Properties file at the given URL Properties overrides new Properties Input Stream in null try File in File new File propertiesURL get File if in File exists We don t have a preferences file to worry about if DEBUG PREFERENCES Policy debug Preference file propertiesURL not found NON NLS 1 NON NLS 2 return in new Buffered Input Stream new File Input Stream in File if in null fail quietly if DEBUG PREFERENCES Policy debug Failed to open propertiesURL NON NLS 1 return overrides load in catch IO Exception e cannot read ini file fail silently if DEBUG PREFERENCES Policy debug IO Exception reading preference file propertiesURL NON NLS 1 e print Stack Trace return finally try if in null in close catch IO Exception e ignore problems closing file if DEBUG PREFERENCES Policy debug IO Exception closing preference file propertiesURL NON NLS 1 e print Stack Trace for Iterator it overrides entry Set iterator it has Next Map Entry entry Map Entry it next String qualified Key String entry get Key Keys consist of separated plug in id and name of preference e g com example myplugin mypref int s qualified Key index Of if s 0 s 0 s qualified Key length 1 skip mangled entry continue plug in id is non empty string before String plugin Id qualified Key substring 0 s if plugin Id equals id override property in the given plug in plig in specified property name is non empty string after String property Name qualified Key substring s 1 String value String entry get Value value translate Preference value props preferences set Default property Name value if DEBUG PREFERENCES Policy debug Preferences now set as follows NON NLS 1 String pref Names preferences property Names for int i 0 i pref Names length i String value preferences get String pref Names i Policy debug t pref Names i value NON NLS 1 NON NLS 2 pref Names preferences default Property Names for int i 0 i pref Names length i String value preferences get Default String pref Names i Policy debug t Default values pref Names i value NON NLS 1 NON NLS 2  applyPluginDefaultOverrides InputStream inFile getFile inFile DEBUG_PREFERENCES BufferedInputStream FileInputStream inFile DEBUG_PREFERENCES IOException DEBUG_PREFERENCES IOException printStackTrace IOException DEBUG_PREFERENCES IOException printStackTrace entrySet hasNext qualifiedKey getKey qualifiedKey indexOf qualifiedKey pluginId qualifiedKey pluginId propertyName qualifiedKey getValue translatePreference setDefault propertyName DEBUG_PREFERENCES prefNames propertyNames prefNames getString prefNames prefNames prefNames defaultPropertyNames prefNames getDefaultString prefNames tDefault prefNames
public void set Extension Registry I Extension Registry value registry value  setExtensionRegistry IExtensionRegistry
public Bundle Context get Bundle Context return context  BundleContext getBundleContext
public Bundle get Bundle String symbolic Name Bundle bundles package Admin get Bundles symbolic Name null if bundles null return null Return the first bundle that is not installed or uninstalled for int i 0 i bundles length i if bundles i get State Bundle INSTALLED Bundle UNINSTALLED 0 return bundles i return null  getBundle symbolicName packageAdmin getBundles symbolicName getState
public Bundle get Bundles String symbolic Name String version Bundle bundles package Admin get Bundles symbolic Name version if bundles null return null optimize for common case length 1 if bundles length 1 bundles 0 get State Bundle INSTALLED Bundle UNINSTALLED 0 return bundles Remove all the bundes that are installed or uninstalled Bundle selected Bundles new Bundle bundles length int added 0 for int i 0 i bundles length i if bundles i get State Bundle INSTALLED Bundle UNINSTALLED 0 selected Bundles added bundles i if added 0 return null return an array of the correct size Bundle results new Bundle added System arraycopy selected Bundles 0 results 0 added return results  getBundles symbolicName packageAdmin getBundles symbolicName getState selectedBundles getState selectedBundles selectedBundles
public boolean is Fragment Bundle bundle return package Admin get Bundle Type bundle Package Admin BUNDLE TYPE FRAGMENT 0  isFragment packageAdmin getBundleType PackageAdmin BUNDLE_TYPE_FRAGMENT
public Bundle get Hosts Bundle bundle return package Admin get Hosts bundle  getHosts packageAdmin getHosts
public Bundle get Fragments Bundle bundle return package Admin get Fragments bundle  getFragments packageAdmin getFragments
public URL get InstallURL Location location get Install Location it is pretty much impossible for the install location to be null If it is the system is in a bad way so throw and exception and get the heck outta here if location null throw new Illegal State Exception The installation location must not be null NON NLS 1 return location getURL  getInstallURL getInstallLocation IllegalStateException
public Environment Info get Environment Info Service return info Service  EnvironmentInfo getEnvironmentInfoService infoService
public URL Converter getURL Converter return url Converter  URLConverter getURLConverter urlConverter
public Framework Log get Framework Log return framework Log  FrameworkLog getFrameworkLog frameworkLog
public boolean is Running try return initialized context get Bundle get State Bundle ACTIVE catch Illegal State Exception e return false  isRunning getBundle getState IllegalStateException
public URL get Plugin Path URL plugin Path Location R1 0 compatibility Input Stream input null first try and see if the given plugin path location exists if plugin Path Location null return null try input plugin Path Location open Stream catch IO Exception e fall through if the given path was null or did not exist look for a plugin path definition in the install location if input null try URL url new URL PlatformURL Base Connection PLATFORM URL STRING PLUGIN PATH input url open Stream catch MalformedURL Exception e fall through catch IO Exception e fall through nothing was found at the supplied location or in the install location if input null return null if we found a plugin path definition somewhere so read it and close the location URL result null try try result read Plugin Path input finally input close catch IO Exception e let it return null on failure to read return result  getPluginPath pluginPathLocation InputStream pluginPathLocation pluginPathLocation openStream IOException PlatformURLBaseConnection PLATFORM_URL_STRING PLUGIN_PATH openStream MalformedURLException IOException readPluginPath IOException
private URL read Plugin Path Input Stream input Properties ini new Properties try ini load input catch IO Exception e return null Vector result new Vector 5 for Enumeration groups ini property Names groups has More Elements String group String groups next Element for String Tokenizer entries new String Tokenizer ini get Property group entries has More Elements NON NLS 1 String entry String entries next Element if entry equals NON NLS 1 try result add Element new URL entry catch MalformedURL Exception e intentionally ignore bad UR Ls System err println Policy bind ignore plugin entry NON NLS 1 return URL result to Array new URL result size  readPluginPath InputStream IOException propertyNames hasMoreElements nextElement StringTokenizer StringTokenizer getProperty hasMoreElements nextElement addElement MalformedURLException URLs toArray
public Location get Configuration Location assert Initialized return Location configuration Location get Service  getConfigurationLocation assertInitialized configurationLocation getService
public I Content Type Manager get Content Type Manager return Content Type Manager get Instance  IContentTypeManager getContentTypeManager ContentTypeManager getInstance
private void initialize Location Trackers final String FILTER PREFIX object Class org eclipse osgi service datalocation Location type NON NLS 1 Filter filter null try filter context create Filter FILTER PREFIX PROP CONFIG AREA NON NLS 1 catch Invalid Syntax Exception e ignore this It should never happen as we have tested the above format configuration Location new Service Tracker context filter null configuration Location open try filter context create Filter FILTER PREFIX PROP USER AREA NON NLS 1 catch Invalid Syntax Exception e ignore this It should never happen as we have tested the above format user Location new Service Tracker context filter null user Location open try filter context create Filter FILTER PREFIX PROP INSTANCE AREA NON NLS 1 catch Invalid Syntax Exception e ignore this It should never happen as we have tested the above format instance Location new Service Tracker context filter null instance Location open try filter context create Filter FILTER PREFIX PROP INSTALL AREA NON NLS 1 catch Invalid Syntax Exception e ignore this It should never happen as we have tested the above format install Location new Service Tracker context filter null install Location open  initializeLocationTrackers FILTER_PREFIX objectClass createFilter FILTER_PREFIX PROP_CONFIG_AREA InvalidSyntaxException configurationLocation ServiceTracker configurationLocation createFilter FILTER_PREFIX PROP_USER_AREA InvalidSyntaxException userLocation ServiceTracker userLocation createFilter FILTER_PREFIX PROP_INSTANCE_AREA InvalidSyntaxException instanceLocation ServiceTracker instanceLocation createFilter FILTER_PREFIX PROP_INSTALL_AREA InvalidSyntaxException installLocation ServiceTracker installLocation
public Location get User Location assert Initialized return Location user Location get Service  getUserLocation assertInitialized userLocation getService
public I Path get State Location Bundle bundle boolean create throws Illegal State Exception assert Initialized I Path result get Meta Area get State Location bundle if create result to File mkdirs return result  IPath getStateLocation IllegalStateException assertInitialized IPath getMetaArea getStateLocation toFile
public URL find Bundle b I Path path return Find Support find b path  IPath FindSupport
public URL find Bundle bundle I Path path Map override return Find Support find bundle path override  IPath FindSupport
public I Path get State Location Bundle bundle return get State Location bundle true  IPath getStateLocation getStateLocation
public Resource Bundle get Resource Bundle Bundle bundle return Resource Translator get Resource Bundle bundle  ResourceBundle getResourceBundle ResourceTranslator getResourceBundle
public String get Resource String Bundle bundle String value return Resource Translator get Resource String bundle value  getResourceString ResourceTranslator getResourceString
public String get Resource String Bundle bundle String value Resource Bundle resource Bundle return Resource Translator get Resource String bundle value resource Bundle  getResourceString ResourceBundle resourceBundle ResourceTranslator getResourceString resourceBundle
public String getOS Arch return System get Property PROP ARCH  getOSArch getProperty PROP_ARCH
public String getNL return System get Property PROP NL  getProperty PROP_NL
public String getOS return System get Property PROP OS  getProperty PROP_OS
public String getWS return System get Property PROP WS  getProperty PROP_WS
public String get Application Args return app Args  getApplicationArgs appArgs
Those two methods are only used to register runtime once compatibility has been started public void set Runtime Instance Plugin runtime runtime Instance runtime  setRuntimeInstance runtimeInstance
public Plugin get Runtime Instance return runtime Instance  getRuntimeInstance runtimeInstance
public long get State Time Stamp Service Reference platform Admin Reference context get Service Reference Platform Admin class get Name if platform Admin Reference null return 1 else return Platform Admin context get Service platform Admin Reference get State false get Time Stamp  getStateTimeStamp ServiceReference platformAdminReference getServiceReference PlatformAdmin getName platformAdminReference PlatformAdmin getService platformAdminReference getState getTimeStamp
public Platform Admin get Platform Admin Service Reference platform Admin Reference context get Service Reference Platform Admin class get Name if platform Admin Reference null return null return Platform Admin context get Service platform Admin Reference  PlatformAdmin getPlatformAdmin ServiceReference platformAdminReference getServiceReference PlatformAdmin getName platformAdminReference PlatformAdmin getService platformAdminReference
public void add Authorization Info URL server Url String realm String auth Scheme Map info throws Core Exception Authorization Handler add Authorization Info server Url realm auth Scheme info  addAuthorizationInfo serverUrl authScheme CoreException AuthorizationHandler addAuthorizationInfo serverUrl authScheme
public void add Protection Space URL resource Url String realm throws Core Exception Authorization Handler add Protection Space resource Url realm  addProtectionSpace resourceUrl CoreException AuthorizationHandler addProtectionSpace resourceUrl
public void flush Authorization Info URL server Url String realm String auth Scheme throws Core Exception Authorization Handler flush Authorization Info server Url realm auth Scheme  flushAuthorizationInfo serverUrl authScheme CoreException AuthorizationHandler flushAuthorizationInfo serverUrl authScheme
public Map get Authorization Info URL server Url String realm String auth Scheme return Authorization Handler get Authorization Info server Url realm auth Scheme  getAuthorizationInfo serverUrl authScheme AuthorizationHandler getAuthorizationInfo serverUrl authScheme
public String get Protection Space URL resource Url return Authorization Handler get Protection Space resource Url  getProtectionSpace resourceUrl AuthorizationHandler getProtectionSpace resourceUrl
public Location get Instance Location assert Initialized return Location instance Location get Service  getInstanceLocation assertInitialized instanceLocation getService
public Location get Install Location assert Initialized return Location install Location get Service  getInstallLocation assertInitialized installLocation getService
public I Bundle Group Provider get Bundle Group Providers return I Bundle Group Provider group Providers to Array new I Bundle Group Provider group Providers size  IBundleGroupProvider getBundleGroupProviders IBundleGroupProvider groupProviders toArray IBundleGroupProvider groupProviders
public I Product get Product if product null return product String product Id System get Property PROP PRODUCT if product Id null return null I Configuration Element entries get Registry get Configuration Elements For Platform PI RUNTIME Platform PT PRODUCT product Id if entries length 0 There should only be one product with the given id so just take the first element product new Product product Id entries 0 return product I Configuration Element elements get Registry get Configuration Elements For Platform PI RUNTIME Platform PT PRODUCT List log Entries null for int i 0 i elements length i I Configuration Element element elements i if element get Name equals Ignore Case provider NON NLS 1 try I Product Provider provider I Product Provider element create Executable Extension run NON NLS 1 I Product products provider get Products for int j 0 j products length j I Product provided products j if provided get Id equals Ignore Case product Id product provided return product catch Core Exception e if log Entries null log Entries new Array List 3 log Entries add new Framework Log Entry Platform PI RUNTIME Policy bind provider invalid element get Parent to String 0 e null NON NLS 1 if log Entries null get Framework Log log new Framework Log Entry Platform PI RUNTIME Policy bind provider invalid general 0 null Framework Log Entry log Entries to Array NON NLS 1 return null  IProduct getProduct productId getProperty PROP_PRODUCT productId IConfigurationElement getRegistry getConfigurationElementsFor PI_RUNTIME PT_PRODUCT productId productId IConfigurationElement getRegistry getConfigurationElementsFor PI_RUNTIME PT_PRODUCT logEntries IConfigurationElement getName equalsIgnoreCase IProductProvider IProductProvider createExecutableExtension IProduct getProducts IProduct getId equalsIgnoreCase productId CoreException logEntries logEntries ArrayList logEntries FrameworkLogEntry PI_RUNTIME getParent toString logEntries getFrameworkLog FrameworkLogEntry PI_RUNTIME FrameworkLogEntry logEntries toArray
public void register Bundle Group Provider I Bundle Group Provider provider group Providers add provider  registerBundleGroupProvider IBundleGroupProvider groupProviders
public void unregister Bundle Group Provider I Bundle Group Provider provider group Providers remove provider  unregisterBundleGroupProvider IBundleGroupProvider groupProviders
public File Manager get Runtime File Manager return runtime File Manager  FileManager getRuntimeFileManager runtimeFileManager
Returns a list of known system architectures return the list of system architectures known to the system public String knownOS Arch Values return ARCH LIST  knownOSArchValues ARCH_LIST
Returns a list of known operating system names return the list of operating systems known to the system public String knownOS Values return OS LIST  knownOSValues OS_LIST
Returns a list of known windowing system names return the list of window systems known to the system public String knownWS Values return WS LIST  knownWSValues WS_LIST

Creates a listener list public Listener List super  ListenerList
Adds the given listener to this list Has no effect if an equal listener is already registered p This method is synchronized to protect against multiple threads adding or removing listeners concurrently This does not block concurrent readers param listener the listener to add public synchronized void add Object listener if listener null throw new Illegal Argument Exception check for duplicates using equality final int old Size listeners length for int i 0 i old Size i if listener equals listeners i return Thread safety create new array to avoid affecting concurrent readers Object new Listeners new Object old Size 1 System arraycopy listeners 0 new Listeners 0 old Size new Listeners old Size listener atomic assignment this listeners new Listeners  IllegalArgumentException oldSize oldSize newListeners oldSize newListeners oldSize newListeners oldSize newListeners
Returns an array containing all the registered listeners The resulting array is unaffected by subsequent adds or removes If there are no listeners registered the result is an empty array singleton instance no garbage is created Use this method when notifying listeners so that any modifications to the listener list during the notification will have no effect on the notification itself p Note callers must not modify the returned array return the list of registered listeners public Object get Listeners return listeners  getListeners
Returns whether this listener list is empty return code true code if there are no registered listeners and code false code otherwise public boolean is Empty return listeners length 0  isEmpty
Removes the given listener from this list Has no effect if an identical listener was not already registered p This method is synchronized to protect against multiple threads adding or removing listeners concurrently This does not block concurrent readers param listener the listener public synchronized void remove Object listener if listener null throw new Illegal Argument Exception int old Size listeners length for int i 0 i old Size i if listener equals listeners i if old Size 1 listeners Empty Array else Thread safety create new array to avoid affecting concurrent readers Object new Listeners new Object old Size 1 System arraycopy listeners 0 new Listeners 0 i System arraycopy listeners i 1 new Listeners i old Size i 1 atomic assignment to field this listeners new Listeners return  IllegalArgumentException oldSize oldSize oldSize EmptyArray newListeners oldSize newListeners newListeners oldSize newListeners
Returns the number of registered listeners return the number of registered listeners public int size return listeners length 

Set log Listeners new Hash Set 5 public Log Bundle plugin this bundle plugin  logListeners HashSet
Adds the given log listener to this log Subsequently the log listener will receive notification of all log events passing through this log see Platform add Log Listener I Log Listener public void add Log Listener I Log Listener listener synchronized log Listeners log Listeners add listener  addLogListener ILogListener addLogListener ILogListener logListeners logListeners
Returns the plug in with which this log is associated public Bundle get Bundle return bundle  getBundle
final I Log Listener listener listeners i I Safe Runnable code new I Safe Runnable public void run throws Exception listener logging status bundle get Symbolic Name  ILogListener ISafeRunnable ISafeRunnable getSymbolicName
public void handle Exception Throwable e Ignore  handleException
Logs the given status The status is distributed to the log listeners installed on this log and then to the log listeners installed on the platform see Plugin get Log public void log final I Status status Log to the platform log first in case a listener throws an error Internal Platform get Default log status create array to avoid concurrent access I Log Listener listeners synchronized log Listeners listeners I Log Listener log Listeners to Array new I Log Listener log Listeners size for int i 0 i listeners length i final I Log Listener listener listeners i I Safe Runnable code new I Safe Runnable public void run throws Exception listener logging status bundle get Symbolic Name public void handle Exception Throwable e Ignore Internal Platform get Default run code  getLog IStatus InternalPlatform getDefault ILogListener logListeners ILogListener logListeners toArray ILogListener logListeners ILogListener ISafeRunnable ISafeRunnable getSymbolicName handleException InternalPlatform getDefault
Removes the given log listener to this log Subsequently the log listener will no longer receive notification of log events passing through this log see Platform remove Log Listener I Log Listener public void remove Log Listener I Log Listener listener synchronized log Listeners log Listeners remove listener  removeLogListener ILogListener removeLogListener ILogListener logListeners logListeners

private long registry Stamp public static Bundle Context get Context return context  registryStamp BundleContext getContext
public void start Bundle Context runtime Context throws Exception Platform Activator context runtime Context acquire Info Service acquireURL Converter Service acquire Framework Log Service acquire Package Admin Service register Entry Locator start Internal Platform start Registry runtime Context install PlatformURL Support register Application Service Internal Platform get Default set Runtime Instance this super start runtime Context  BundleContext runtimeContext PlatformActivator runtimeContext acquireInfoService acquireURLConverterService acquireFrameworkLogService acquirePackageAdminService registerEntryLocator startInternalPlatform startRegistry runtimeContext installPlatformURLSupport registerApplicationService InternalPlatform getDefault setRuntimeInstance runtimeContext
Register the platform URL support as a service to the URL Handler service private void install PlatformURL Support PlatformURL Plugin Connection startup PlatformURL Fragment Connection startup PlatformURL Base Connection startup Internal Platform get Default get InstallURL Hashtable properties new Hashtable 1 properties put URL Constants URL HANDLER PROTOCOL new String PlatformURL Handler PROTOCOL context register Service URL Stream Handler Service class get Name new PlatformURL Handler properties  URLHandler installPlatformURLSupport PlatformURLPluginConnection PlatformURLFragmentConnection PlatformURLBaseConnection InternalPlatform getDefault getInstallURL URLConstants URL_HANDLER_PROTOCOL PlatformURLHandler registerService URLStreamHandlerService getName PlatformURLHandler
private void start Registry Bundle Context runtime Context boolean from Cache true Extension Registry registry null if true equals System get Property Internal Platform PROP NO REGISTRY CACHE NON NLS 1 Try to read the registry from the cache first If that fails create a new registry Multi Status problems new Multi Status Platform PI RUNTIME Extensions Parser PARSE PROBLEM Registry cache problems null NON NLS 1 long start 0 if Internal Platform DEBUG start System current Time Millis boolean lazy Loading true equals System get Property Internal Platform PROP NO LAZY CACHE LOADING NON NLS 1 File cache File null try cache File Internal Platform get Default get Runtime File Manager lookup registry false NON NLS 1 catch IO Exception e Ignore the exception The registry will be rebuilt from the xml files if cache File null cache File is File Location current Location Platform get Configuration Location Location parent Location null if current Location null parent Location current Location get Parent Location null try File Manager file Manager Shared new File Manager new File parent Location getURL get File Platform PI RUNTIME none NON NLS 1 file Manager Shared open false cache File file Manager Shared lookup registry false catch IO Exception e Ignore the exception The registry will be rebuilt from the xml files if cache File null cache File is File registry Stamp compute Registry Stamp NON NLS 1 boolean flushable true equals System get Property Internal Platform PROP NO REGISTRY FLUSHING NON NLS 1 registry new Registry Cache Reader cache File problems lazy Loading flushable load Cache registry Stamp if Internal Platform DEBUG registry null System out println Reading registry cache System current Time Millis start NON NLS 1 if Internal Platform DEBUG REGISTRY if registry null System out println Reloading registry from manifest files NON NLS 1 else System out println Using registry cache lazy Loading with without lazy element loading NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 TODO log any problems that occurred in loading the cache if problems isOK System out println problems if registry null from Cache false registry new Extension Registry need to set the registry in Internal Platform before calling any code that may rely on it Internal Platform get Default set Extension Registry registry register a listener to catch new bundle installations resolutions plugin Bundle Listener new Eclipse Bundle Listener registry runtime Context add Bundle Listener plugin Bundle Listener populate the registry with all the currently installed bundles There is a small window here while process Bundles is being called where the plugin Bundle Listener may receive a Bundle Event to add remove a bundle from the registry This is ok since the registry is a synchronized object and will not add the same bundle twice if from Cache plugin Bundle Listener process Bundles runtime Context get Bundles runtime Context register Service I Extension Registry class get Name registry new Hashtable NON NLS 1  startRegistry BundleContext runtimeContext fromCache ExtensionRegistry getProperty InternalPlatform PROP_NO_REGISTRY_CACHE MultiStatus MultiStatus PI_RUNTIME ExtensionsParser PARSE_PROBLEM InternalPlatform currentTimeMillis lazyLoading getProperty InternalPlatform PROP_NO_LAZY_CACHE_LOADING cacheFile cacheFile InternalPlatform getDefault getRuntimeFileManager IOException cacheFile cacheFile isFile currentLocation getConfigurationLocation parentLocation currentLocation parentLocation currentLocation getParentLocation FileManager fileManagerShared FileManager parentLocation getFile PI_RUNTIME fileManagerShared cacheFile fileManagerShared IOException cacheFile cacheFile isFile registryStamp computeRegistryStamp getProperty InternalPlatform PROP_NO_REGISTRY_FLUSHING RegistryCacheReader cacheFile lazyLoading loadCache registryStamp InternalPlatform currentTimeMillis InternalPlatform DEBUG_REGISTRY lazyLoading fromCache ExtensionRegistry InternalPlatform InternalPlatform getDefault setExtensionRegistry pluginBundleListener EclipseBundleListener runtimeContext addBundleListener pluginBundleListener processBundles pluginBundleListener BundleEvent fromCache pluginBundleListener processBundles runtimeContext getBundles runtimeContext registerService IExtensionRegistry getName
private long compute Registry Stamp If the check config prop is false or not set then exit if true equals Ignore Case System get Property Internal Platform PROP CHECK CONFIG NON NLS 1 return 0 Bundle all Bundles context get Bundles long result 0 for int i 0 i all Bundles length i URL plugin Manifest all Bundles i get Entry plugin xml NON NLS 1 if plugin Manifest null plugin Manifest all Bundles i get Entry fragment xml NON NLS 1 if plugin Manifest null continue try URL Connection connection plugin Manifest open Connection result connection get Last Modified all Bundles i get Bundle Id catch IO Exception e return 0 return result  computeRegistryStamp equalsIgnoreCase getProperty InternalPlatform PROP_CHECK_CONFIG allBundles getBundles allBundles pluginManifest allBundles getEntry pluginManifest pluginManifest allBundles getEntry pluginManifest URLConnection pluginManifest openConnection getLastModified allBundles getBundleId IOException
public void stop Bundle Context runtime Context throws IO Exception Stop the registry stop Registry runtime Context unregister the Entry Locator to prevent the Framework from calling it unregister Entry Locator environment Info Service Released environment Service Reference url Service Released url Service Reference log Service Released log Service Reference package Admin Service Released package Admin Reference Stop the platform orderly Internal Platform get Default stop runtime Context Internal Platform get Default set Runtime Instance null Internal Platform get Default get Runtime File Manager close  BundleContext runtimeContext IOException stopRegistry runtimeContext EntryLocator unregisterEntryLocator environmentInfoServiceReleased environmentServiceReference urlServiceReleased urlServiceReference logServiceReleased logServiceReference packageAdminServiceReleased packageAdminReference InternalPlatform getDefault runtimeContext InternalPlatform getDefault setRuntimeInstance InternalPlatform getDefault getRuntimeFileManager
private void stop Registry Bundle Context runtime Context runtime Context remove Bundle Listener this plugin Bundle Listener Extension Registry registry Extension Registry Internal Platform get Default get Registry if registry null return try if registry is Dirty return File Manager manager Internal Platform get Default get Runtime File Manager File cache File null try manager lookup registry true NON NLS 1 cache File File create Temp File registry new manager get Base NON NLS 1 NON NLS 2 catch IO Exception e return Ignore the exception since we can recompute the cache new Registry Cache Writer cache File save Cache registry compute Registry Stamp try manager update new String registry new String cache File get Name NON NLS 1 catch IO Exception e Ignore the exception since we can recompute the cache finally Internal Platform get Default set Extension Registry null  stopRegistry BundleContext runtimeContext runtimeContext removeBundleListener pluginBundleListener ExtensionRegistry ExtensionRegistry InternalPlatform getDefault getRegistry isDirty FileManager InternalPlatform getDefault getRuntimeFileManager cacheFile cacheFile createTempFile getBase IOException RegistryCacheWriter cacheFile saveCache computeRegistryStamp cacheFile getName IOException InternalPlatform getDefault setExtensionRegistry
private void acquire Info Service throws Exception environment Service Reference context get Service Reference Environment Info class get Name if environment Service Reference null return Internal Platform info Service Environment Info context get Service environment Service Reference  acquireInfoService environmentServiceReference getServiceReference EnvironmentInfo getName environmentServiceReference InternalPlatform infoService EnvironmentInfo getService environmentServiceReference
private void acquireURL Converter Service throws Exception url Service Reference context get Service Reference URL Converter class get Name if url Service Reference null return Internal Platform url Converter URL Converter context get Service url Service Reference  acquireURLConverterService urlServiceReference getServiceReference URLConverter getName urlServiceReference InternalPlatform urlConverter URLConverter getService urlServiceReference
private void acquire Framework Log Service throws Exception log Service Reference context get Service Reference Framework Log class get Name if log Service Reference null return Internal Platform framework Log Framework Log context get Service log Service Reference  acquireFrameworkLogService logServiceReference getServiceReference FrameworkLog getName logServiceReference InternalPlatform frameworkLog FrameworkLog getService logServiceReference
private void acquire Package Admin Service throws Exception package Admin Reference context get Service Reference Package Admin class get Name if package Admin Reference null return Internal Platform package Admin Package Admin context get Service package Admin Reference  acquirePackageAdminService packageAdminReference getServiceReference PackageAdmin getName packageAdminReference InternalPlatform packageAdmin PackageAdmin getService packageAdminReference
private void start Internal Platform throws IO Exception Internal Platform get Default start context  startInternalPlatform IOException InternalPlatform getDefault
private void environment Info Service Released Service Reference reference if environment Service Reference null return if environment Service Reference reference return Internal Platform info Service null context unget Service environment Service Reference environment Service Reference null  environmentInfoServiceReleased ServiceReference environmentServiceReference environmentServiceReference InternalPlatform infoService ungetService environmentServiceReference environmentServiceReference
private void url Service Released Service Reference reference if url Service Reference null return if url Service Reference reference return Internal Platform url Converter null context unget Service url Service Reference url Service Reference null  urlServiceReleased ServiceReference urlServiceReference urlServiceReference InternalPlatform urlConverter ungetService urlServiceReference urlServiceReference
private void log Service Released Service Reference reference if log Service Reference null return if log Service Reference reference return Internal Platform framework Log null context unget Service log Service Reference log Service Reference null  logServiceReleased ServiceReference logServiceReference logServiceReference InternalPlatform frameworkLog ungetService logServiceReference logServiceReference
private void package Admin Service Released Service Reference reference if package Admin Reference null return if package Admin Reference reference return Internal Platform package Admin null context unget Service package Admin Reference package Admin Reference null  packageAdminServiceReleased ServiceReference packageAdminReference packageAdminReference InternalPlatform packageAdmin ungetService packageAdminReference packageAdminReference
Parameterized Runnable work new Parameterized Runnable public Object run Object arg throws Exception I Platform Runnable application null String application Id System get Property PROP ECLIPSE APPLICATION if application Id null Derive the application from the product information I Product product Internal Platform get Default get Product if product null application Id product get Application if application Id null System set Property PROP ECLIPSE APPLICATION application Id if application Id null throw new Runtime Exception Policy bind application no Id Found NON NLS 1 I Extension Registry registry Internal Platform get Default get Registry I Extension application Extension registry get Extension Platform PI RUNTIME Platform PT APPLICATIONS application Id if application Extension null I Extension available Apps registry get Extension Point Platform PI RUNTIME Platform PT APPLICATIONS get Extensions String available Apps String NONE NON NLS 1 if available Apps length 0 available Apps String available Apps 0 get Unique Identifier for int i 1 i available Apps length i available Apps String available Apps String available Apps i get Unique Identifier NON NLS 1 throw new Runtime Exception Policy bind application not Found application Id available Apps String NON NLS 1 I Configuration Element configs application Extension get Configuration Elements if configs length 0 throw new Runtime Exception Policy bind application invalid Extension application Id NON NLS 1 I Configuration Element config configs 0 application I Platform Runnable config create Executable Extension run NON NLS 1 if the given arg is null the pass in the left over command line args if arg null arg Internal Platform get Default get Application Args Object result application run arg int exit Code result instanceof Integer Integer result int Value 0 System set Property PROP ECLIPSE EXITCODE Integer to String exit Code if Internal Platform DEBUG System out println Policy bind application returned new String application Id result null null result to String NON NLS 1 NON NLS 2 return result  ParameterizedRunnable ParameterizedRunnable IPlatformRunnable applicationId getProperty PROP_ECLIPSE_APPLICATION applicationId IProduct InternalPlatform getDefault getProduct applicationId getApplication applicationId setProperty PROP_ECLIPSE_APPLICATION applicationId applicationId RuntimeException noIdFound IExtensionRegistry InternalPlatform getDefault getRegistry IExtension applicationExtension getExtension PI_RUNTIME PT_APPLICATIONS applicationId applicationExtension IExtension availableApps getExtensionPoint PI_RUNTIME PT_APPLICATIONS getExtensions availableAppsString availableApps availableAppsString availableApps getUniqueIdentifier availableApps availableAppsString availableAppsString availableApps getUniqueIdentifier RuntimeException notFound applicationId availableAppsString IConfigurationElement applicationExtension getConfigurationElements RuntimeException invalidExtension applicationId IConfigurationElement IPlatformRunnable createExecutableExtension InternalPlatform getDefault getApplicationArgs exitCode intValue setProperty PROP_ECLIPSE_EXITCODE toString exitCode InternalPlatform applicationId toString
private void register Application Service Parameterized Runnable work new Parameterized Runnable public Object run Object arg throws Exception I Platform Runnable application null String application Id System get Property PROP ECLIPSE APPLICATION if application Id null Derive the application from the product information I Product product Internal Platform get Default get Product if product null application Id product get Application if application Id null System set Property PROP ECLIPSE APPLICATION application Id if application Id null throw new Runtime Exception Policy bind application no Id Found NON NLS 1 I Extension Registry registry Internal Platform get Default get Registry I Extension application Extension registry get Extension Platform PI RUNTIME Platform PT APPLICATIONS application Id if application Extension null I Extension available Apps registry get Extension Point Platform PI RUNTIME Platform PT APPLICATIONS get Extensions String available Apps String NONE NON NLS 1 if available Apps length 0 available Apps String available Apps 0 get Unique Identifier for int i 1 i available Apps length i available Apps String available Apps String available Apps i get Unique Identifier NON NLS 1 throw new Runtime Exception Policy bind application not Found application Id available Apps String NON NLS 1 I Configuration Element configs application Extension get Configuration Elements if configs length 0 throw new Runtime Exception Policy bind application invalid Extension application Id NON NLS 1 I Configuration Element config configs 0 application I Platform Runnable config create Executable Extension run NON NLS 1 if the given arg is null the pass in the left over command line args if arg null arg Internal Platform get Default get Application Args Object result application run arg int exit Code result instanceof Integer Integer result int Value 0 System set Property PROP ECLIPSE EXITCODE Integer to String exit Code if Internal Platform DEBUG System out println Policy bind application returned new String application Id result null null result to String NON NLS 1 NON NLS 2 return result Hashtable properties new Hashtable 1 properties put PROP ECLIPSE APPLICATION default NON NLS 1 context register Service Parameterized Runnable class get Name work properties  registerApplicationService ParameterizedRunnable ParameterizedRunnable IPlatformRunnable applicationId getProperty PROP_ECLIPSE_APPLICATION applicationId IProduct InternalPlatform getDefault getProduct applicationId getApplication applicationId setProperty PROP_ECLIPSE_APPLICATION applicationId applicationId RuntimeException noIdFound IExtensionRegistry InternalPlatform getDefault getRegistry IExtension applicationExtension getExtension PI_RUNTIME PT_APPLICATIONS applicationId applicationExtension IExtension availableApps getExtensionPoint PI_RUNTIME PT_APPLICATIONS getExtensions availableAppsString availableApps availableAppsString availableApps getUniqueIdentifier availableApps availableAppsString availableAppsString availableApps getUniqueIdentifier RuntimeException notFound applicationId availableAppsString IConfigurationElement applicationExtension getConfigurationElements RuntimeException invalidExtension applicationId IConfigurationElement IPlatformRunnable createExecutableExtension InternalPlatform getDefault getApplicationArgs exitCode intValue setProperty PROP_ECLIPSE_EXITCODE toString exitCode InternalPlatform applicationId toString PROP_ECLIPSE_APPLICATION registerService ParameterizedRunnable getName
Entry Locator system Resources new Entry Locator public URL get Properties String basename Locale locale basename basename replace I Path properties Path new Path NL SYSTEM BUNDLE basename   locale get Language   locale get Country NL PROP EXT URL result Platform find context get Bundle properties Path if result null return result properties Path new Path NL SYSTEM BUNDLE basename   locale get Language NL PROP EXT return Platform find context get Bundle properties Path  EntryLocator systemResources EntryLocator getProperties IPath propertiesPath NL_SYSTEM_BUNDLE _ getLanguage _ getCountry NL_PROP_EXT getBundle propertiesPath propertiesPath NL_SYSTEM_BUNDLE _ getLanguage NL_PROP_EXT getBundle propertiesPath
private void register Entry Locator Entry Locator system Resources new Entry Locator public URL get Properties String basename Locale locale basename basename replace I Path properties Path new Path NL SYSTEM BUNDLE basename   locale get Language   locale get Country NL PROP EXT URL result Platform find context get Bundle properties Path if result null return result properties Path new Path NL SYSTEM BUNDLE basename   locale get Language NL PROP EXT return Platform find context get Bundle properties Path entry Locator Registration context register Service Entry Locator class get Name system Resources null  registerEntryLocator EntryLocator systemResources EntryLocator getProperties IPath propertiesPath NL_SYSTEM_BUNDLE _ getLanguage _ getCountry NL_PROP_EXT getBundle propertiesPath propertiesPath NL_SYSTEM_BUNDLE _ getLanguage NL_PROP_EXT getBundle propertiesPath entryLocatorRegistration registerService EntryLocator getName systemResources
private void unregister Entry Locator if entry Locator Registration null entry Locator Registration unregister entry Locator Registration null  unregisterEntryLocator entryLocatorRegistration entryLocatorRegistration entryLocatorRegistration

public class Platform Log Writer implements I Log Listener see I Log Listener logging I Status String public synchronized void logging I Status status String plugin Framework Log Entry log Entry get Log status Internal Platform get Default get Framework Log log log Entry  PlatformLogWriter ILogListener ILogListener IStatus IStatus FrameworkLogEntry logEntry getLog InternalPlatform getDefault getFrameworkLog logEntry
protected Framework Log Entry get Log I Status status String Buffer entry new String Buffer entry append status get Plugin append NON NLS 1 entry append Integer to String status get Severity append NON NLS 1 entry append Integer to String status get Code Throwable t status get Exception Array List childlist new Array List int stack Code t instanceof Core Exception 1 0 ensure a substatus inside a Core Exception is properly logged if stack Code 1 I Status core Status Core Exception t get Status if core Status null childlist add get Log core Status if status is Multi Status I Status children status get Children for int i 0 i children length i childlist add get Log children i Framework Log Entry children Framework Log Entry childlist size 0 null childlist to Array new Framework Log Entry childlist size return new Framework Log Entry entry to String status get Message stack Code t children  FrameworkLogEntry getLog IStatus StringBuffer StringBuffer getPlugin toString getSeverity toString getCode getException ArrayList ArrayList stackCode CoreException CoreException stackCode IStatus coreStatus CoreException getStatus coreStatus getLog coreStatus isMultiStatus IStatus getChildren getLog FrameworkLogEntry FrameworkLogEntry toArray FrameworkLogEntry FrameworkLogEntry toString getMessage stackCode

public static final String FRAGMENT fragment NON NLS 1 public PlatformURL Fragment Connection URL url super url  PlatformURLFragmentConnection
protected boolean allow Caching return true  allowCaching
protected URL resolve throws IO Exception String spec url get File trim if spec starts With NON NLS 1 spec spec substring 1 if spec starts With FRAGMENT throw new IO Exception Policy bind url bad Variant url to String NON NLS 1 int ix spec index Of FRAGMENT length 1 NON NLS 1 String ref ix 1 spec substring FRAGMENT length 1 spec substring FRAGMENT length 1 ix String id get Id ref target Internal Platform get Default get Bundle id if target null throw new IO Exception Policy bind url resolve Fragment url to String NON NLS 1 URL result target get Entry NON NLS 1 if ix 1 ix 1 spec length return result else return new URL result spec substring ix 1  IOException getFile startsWith startsWith IOException badVariant toString indexOf getId InternalPlatform getDefault getBundle IOException resolveFragment toString getEntry
public static void startup register connection type for platform fragment handling if is Registered return PlatformURL Handler register FRAGMENT PlatformURL Fragment Connection class is Registered true  isRegistered PlatformURLHandler PlatformURLFragmentConnection isRegistered

public static final String PLUGIN plugin NON NLS 1 public PlatformURL Plugin Connection URL url super url  PlatformURLPluginConnection
protected boolean allow Caching return true  allowCaching
protected URL resolve throws IO Exception String spec url get File trim if spec starts With NON NLS 1 spec spec substring 1 if spec starts With PLUGIN throw new IO Exception Policy bind url bad Variant url to String NON NLS 1 int ix spec index Of PLUGIN length 1 NON NLS 1 String ref ix 1 spec substring PLUGIN length 1 spec substring PLUGIN length 1 ix String id get Id ref target Internal Platform get Default get Bundle id if target null throw new IO Exception Policy bind url resolve Plugin url to String NON NLS 1 URL result target get Entry NON NLS 1 if ix 1 ix 1 spec length return result else return new URL result spec substring ix 1  IOException getFile startsWith startsWith IOException badVariant toString indexOf getId InternalPlatform getDefault getBundle IOException resolvePlugin toString getEntry
public static void startup register connection type for platform plugin handling if is Registered return PlatformURL Handler register PLUGIN PlatformURL Plugin Connection class is Registered true  isRegistered PlatformURLHandler PlatformURLPluginConnection isRegistered
public URL get AuxillaryUR Ls throws IO Exception if target null String spec url get File trim if spec starts With NON NLS 1 spec spec substring 1 if spec starts With PLUGIN throw new IO Exception Policy bind url bad Variant url to String NON NLS 1 int ix spec index Of PLUGIN length 1 NON NLS 1 String ref ix 1 spec substring PLUGIN length 1 spec substring PLUGIN length 1 ix String id get Id ref target Internal Platform get Default get Bundle id if target null throw new IO Exception Policy bind url resolve Plugin url to String NON NLS 1 Bundle fragments Internal Platform get Default get Fragments target int fragment Length fragments null 0 fragments length if fragment Length 0 return null URL result new URL fragment Length for int i 0 i fragment Length i result i fragments i get Entry NON NLS 1 return result  getAuxillaryURLs IOException getFile startsWith startsWith IOException badVariant toString indexOf getId InternalPlatform getDefault getBundle IOException resolvePlugin toString InternalPlatform getDefault getFragments fragmentLength fragmentLength fragmentLength fragmentLength getEntry

Lookup the message with the given ID in this catalog public static String bind String id return bind id String null 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string public static String bind String id String binding return bind id new String binding 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings public static String bind String id String binding1 String binding2 return bind id new String binding1 binding2 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string values public static String bind String id String bindings if id null return No message available NON NLS 1 String message null try message bundle get String id catch Missing Resource Exception e If we got an exception looking for the message fail gracefully by just returning the id we were looking for In most cases this is semi informative so is not too bad return Missing message id in bundle Name NON NLS 1 NON NLS 2 if bindings null return message return Message Format format message bindings  getString MissingResourceException bundleName MessageFormat
public static I Progress Monitor monitor For I Progress Monitor monitor if monitor null return new Null Progress Monitor return monitor  IProgressMonitor monitorFor IProgressMonitor NullProgressMonitor
public static I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks  IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor
public static I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks int style if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks style  IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor
Print a debug message to the console Pre pend the message with the current date and the name of the current thread public static void debug String message String Buffer buffer new String Buffer buffer append new Date System current Time Millis buffer append NON NLS 1 buffer append Thread current Thread get Name buffer append NON NLS 1 buffer append message System out println buffer to String  StringBuffer StringBuffer currentTimeMillis currentThread getName toString

public Product String id I Configuration Element element this id id if element null return application element get Attribute ATTR APPLICATION name element get Attribute ATTR NAME description element get Attribute ATTR DESCRIPTION load Properties element  IConfigurationElement getAttribute ATTR_APPLICATION getAttribute ATTR_NAME getAttribute ATTR_DESCRIPTION loadProperties
private void load Properties I Configuration Element element I Configuration Element children element get Children properties new Hash Map children length for int i 0 i children length i I Configuration Element child children i String key child get Attribute ATTR NAME String value child get Attribute ATTR VALUE if key null value null properties put key value defining Bundle Platform get Bundle element get Declaring Extension get Namespace  loadProperties IConfigurationElement IConfigurationElement getChildren HashMap IConfigurationElement getAttribute ATTR_NAME getAttribute ATTR_VALUE definingBundle getBundle getDeclaringExtension getNamespace
public Bundle get Defining Bundle return defining Bundle  getDefiningBundle definingBundle
public String get Application return application  getApplication
public String get Name return name  getName
public String get Description return description  getDescription
public String get Id return id  getId
public String get Property String key return String properties get key  getProperty

private static Bundle Localization localization Service public static String get Resource String Bundle bundle String value return get Resource String bundle value null  BundleLocalization localizationService getResourceString getResourceString
public static String get Resource String Bundle bundle String value Resource Bundle resource Bundle String s value trim if s starts With KEY PREFIX 0 return s if s starts With KEY DOUBLE PREFIX 0 return s substring 1 int ix s index Of String key ix 1 s s substring 0 ix String dflt ix 1 s s substring ix 1 if resource Bundle null bundle null try resource Bundle get Resource Bundle bundle catch Missing Resource Exception e just return the default dflt if resource Bundle null return dflt try return resource Bundle get String key substring 1 catch Missing Resource Exception e this will avoid requiring a bundle access on the next lookup return dflt  getResourceString ResourceBundle resourceBundle startsWith KEY_PREFIX startsWith KEY_DOUBLE_PREFIX indexOf resourceBundle resourceBundle getResourceBundle MissingResourceException resourceBundle resourceBundle getString MissingResourceException
public static void start Bundle Context context Internal Platform get Default get Bundle Context localization Service Reference Internal Platform get Default get Bundle Context get Service Reference Bundle Localization class get Name if localization Service Reference null return localization Service Bundle Localization context get Service localization Service Reference  BundleContext InternalPlatform getDefault getBundleContext localizationServiceReference InternalPlatform getDefault getBundleContext getServiceReference BundleLocalization getName localizationServiceReference localizationService BundleLocalization getService localizationServiceReference
public static void stop if localization Service Reference null return localization Service null Internal Platform get Default get Bundle Context unget Service localization Service Reference localization Service Reference null  localizationServiceReference localizationService InternalPlatform getDefault getBundleContext ungetService localizationServiceReference localizationServiceReference
public static Resource Bundle get Resource Bundle Bundle bundle throws Missing Resource Exception if has Runtime21 bundle return Resource Bundle get Bundle plugin Locale get Default create Temp Classloader bundle NON NLS 1 return localization Service get Localization bundle null  ResourceBundle getResourceBundle MissingResourceException hasRuntime21 ResourceBundle getBundle getDefault createTempClassloader localizationService getLocalization
private static boolean has Runtime21 Bundle b try Manifest Element prereqs Manifest Element parse Header Constants REQUIRE BUNDLE String b get Headers get Constants REQUIRE BUNDLE NON NLS 1 if prereqs null return false for int i 0 i prereqs length i if 2 1 equals prereqs i get Attribute Constants BUNDLE VERSION ATTRIBUTE org eclipse core runtime equals prereqs i get Value NON NLS 1 NON NLS 2 return true catch Bundle Exception e return false return false  hasRuntime21 ManifestElement ManifestElement parseHeader REQUIRE_BUNDLE getHeaders REQUIRE_BUNDLE getAttribute BUNDLE_VERSION_ATTRIBUTE getValue BundleException
private static Class Loader create Temp Classloader Bundle b Array List classpath new Array List add Classpath Entries b classpath add Bundle Root b classpath add Dev Entries b classpath add Fragments b classpath URL urls new URL classpath size return new URL Class Loader URL classpath to Array urls  ClassLoader createTempClassloader ArrayList ArrayList addClasspathEntries addBundleRoot addDevEntries addFragments URLClassLoader toArray
private static void add Fragments Bundle host Array List classpath Bundle fragments Internal Platform get Default get Fragments host if fragments null return for int i 0 i fragments length i add Classpath Entries fragments i classpath add Dev Entries fragments i classpath  addFragments ArrayList InternalPlatform getDefault getFragments addClasspathEntries addDevEntries
private static void add Classpath Entries Bundle b Array List classpath Manifest Element classpath Elements try classpath Elements Manifest Element parse Header Constants BUNDLE CLASSPATH String b get Headers get Constants BUNDLE CLASSPATH NON NLS 1 if classpath Elements null return for int i 0 i classpath Elements length i URL classpath Entry b get Entry classpath Elements i get Value if classpath Entry null classpath add classpath Entry catch Bundle Exception e ignore  addClasspathEntries ArrayList ManifestElement classpathElements classpathElements ManifestElement parseHeader BUNDLE_CLASSPATH getHeaders BUNDLE_CLASSPATH classpathElements classpathElements classpathEntry getEntry classpathElements getValue classpathEntry classpathEntry BundleException
private static void add Bundle Root Bundle b Array List classpath classpath add b get Entry NON NLS 1  addBundleRoot ArrayList getEntry
private static void add Dev Entries Bundle b Array List classpath if Dev Class Path Helper in Development Mode return String binary Paths Dev Class Path Helper get Dev Class Path b get Symbolic Name for int i 0 i binary Paths length i URL classpath Entry b get Entry binary Paths i if classpath Entry null classpath add classpath Entry  addDevEntries ArrayList DevClassPathHelper inDevelopmentMode binaryPaths DevClassPathHelper getDevClassPath getSymbolicName binaryPaths classpathEntry getEntry binaryPaths classpathEntry classpathEntry

protected static final String EXTENSION bak NON NLS 1 public Safe File Input Stream File file throws IO Exception this file get Absolute Path null  SafeFileInputStream IOException getAbsolutePath
public Safe File Input Stream String target Name throws IO Exception this target Name null  SafeFileInputStream targetName IOException targetName
If target Path is null the file will be created in the default temporary directory public Safe File Input Stream String target Path String temp Path throws IO Exception super get Input Stream target Path temp Path  targetPath SafeFileInputStream targetPath tempPath IOException getInputStream targetPath tempPath
private static Input Stream get Input Stream String target Path String temp Path throws IO Exception File target new File target Path if target exists if temp Path null temp Path target get Absolute Path EXTENSION target new File temp Path return new Buffered Input Stream new File Input Stream target  InputStream getInputStream targetPath tempPath IOException targetPath tempPath tempPath getAbsolutePath tempPath BufferedInputStream FileInputStream

protected static final String EXTENSION bak NON NLS 1 public Safe File Output Stream File file throws IO Exception this file get Absolute Path null  SafeFileOutputStream IOException getAbsolutePath
public Safe File Output Stream String target Name throws IO Exception this target Name null  SafeFileOutputStream targetName IOException targetName
If target Path is null the file will be created in the default temporary directory public Safe File Output Stream String target Path String temp Path throws IO Exception failed false target new File target Path create Temp File temp Path If we do not have a file at target location but we do have at temp location it probably means something wrong happened the last time we tried to write it So try to recover the backup file And if successful write the new one if target exists temp exists output new Buffered Output Stream new File Output Stream target return copy temp target output new Buffered Output Stream new File Output Stream temp  targetPath SafeFileOutputStream targetPath tempPath IOException targetPath createTempFile tempPath BufferedOutputStream FileOutputStream BufferedOutputStream FileOutputStream
public void close throws IO Exception close false  IOException
public void close boolean discard throws IO Exception try output close catch IO Exception e failed true throw e rethrow if discard failed temp delete else commit  IOException IOException
protected void commit throws IO Exception if temp exists return target delete copy temp target temp delete  IOException
protected void copy File source File File destination File throws IO Exception if source File exists return if source File rename To destination File return Input Stream source new Buffered Input Stream new File Input Stream source File Output Stream destination new Buffered Output Stream new File Output Stream destination File transfer Streams source destination  sourceFile destinationFile IOException sourceFile sourceFile renameTo destinationFile InputStream BufferedInputStream FileInputStream sourceFile OutputStream BufferedOutputStream FileOutputStream destinationFile transferStreams
protected void create Temp File String temp Path if temp Path null temp Path target get Absolute Path EXTENSION temp new File temp Path  createTempFile tempPath tempPath tempPath getAbsolutePath tempPath
public void flush throws IO Exception try output flush catch IO Exception e failed true throw e rethrow  IOException IOException
public String get Temp File Path return temp get Absolute Path  getTempFilePath getAbsolutePath
protected void transfer Streams Input Stream source Output Stream destination throws IO Exception try byte buffer new byte 8192 while true int bytes Read source read buffer if bytes Read 1 break destination write buffer 0 bytes Read finally try source close catch IO Exception e do nothing try destination close catch IO Exception e do nothing  transferStreams InputStream OutputStream IOException bytesRead bytesRead bytesRead IOException IOException
public void write int b throws IO Exception try output write b catch IO Exception e failed true throw e rethrow  IOException IOException

public class URL Tool Returns the given URL with a trailing slash appended to it If the URL already has a trailing slash the URL is returned unchanged table caption Example caption tr th Given URL th th Returned URL th tr td http hostname folder td td http hostname folder td tr td http hostname folder td td http hostname folder td table param url a URL return the given URL with a trailing slash throws MalformedURL Exception if the given URL is malformed public static URL append Trailing Slash String url throws MalformedURL Exception return append Trailing Slash new URL url  URLTool MalformedURLException appendTrailingSlash MalformedURLException appendTrailingSlash
Returns the given code URL code with a trailing slash appended to it If the code URL code already has a trailing slash the code URL code is returned unchanged table caption Example caption tr th Given URL th th Returned URL th tr td http hostname folder td td http hostname folder td tr td http hostname folder td td http hostname folder td table param url a URL return the given URL with a trailing slash public static URL append Trailing Slash URL url String file url get File if file ends With NON NLS 1 return url try return new URL url get Protocol url get Host url get Port file NON NLS 1 catch MalformedURL Exception e Assert is True false internal error NON NLS 1 return null  appendTrailingSlash getFile endsWith getProtocol getHost getPort MalformedURLException isTrue
Returns the child URL formed by joining the given member with the given parent URL return a child URL of the given parent throws MalformedURL Exception if the given parent is malformed public static URL get Child String parent String member throws MalformedURL Exception return get Child new URL parent member  MalformedURLException getChild MalformedURLException getChild
Returns the child URL formed by joining the given member with the given parent URL return a child URL of the given parent public static URL get Child URL parent String member String file parent get File if file ends With NON NLS 1 file file NON NLS 1 try return new URL parent get Protocol parent get Host parent get Port file member catch MalformedURL Exception e Assert is True false internal error NON NLS 1 return null  getChild getFile endsWith getProtocol getHost getPort MalformedURLException isTrue
Returns all elements in the given UR Ls path table caption Example caption tr th Given URL th th Element th tr td http hostname td td td tr td http hostname folder td td folder td tr td http hostname folder file td td folder file td table param url a URL return all elements in the given UR Ls path throws MalformedURL Exception if the given URL is malformed public static Vector get Elements String url throws MalformedURL Exception return get Elements new URL url  URLs URLs MalformedURLException getElements MalformedURLException getElements
Returns all elements in the given UR Ls path table caption Example caption tr th Given URL th th Element th tr td http hostname td td td tr td http hostname folder td td folder td tr td http hostname folder file td td folder file td table param url a URL return all elements in the given UR Ls path public static Vector get Elements URL url Vector result new Vector 5 String last Element null while last Element get Last Element url null result insert Element At last Element 0 url get Parent url return result  URLs URLs getElements lastElement lastElement getLastElement insertElementAt lastElement getParent
Returns the last element in the given UR Ls path or code null code if the URL is the root table caption Example caption tr th Given URL th th Last Element th tr td http hostname td td null td tr td http hostname folder td td folder td tr td http hostname folder file td td file td table param url a URL return the last element in the given UR Ls path or code null code if the URL is the root throws MalformedURL Exception if the given URL is malformed public static String get Last Element String url throws MalformedURL Exception return get Last Element new URL url  URLs URLs MalformedURLException getLastElement MalformedURLException getLastElement
Returns the last element in the given UR Ls path or code null code if the URL is the root table caption Example caption tr th Given URL th th Last Element th tr td http hostname td td null td tr td http hostname folder td td folder td tr td http hostname folder file td td file td table param url a URL return the last element in the given UR Ls path or code null code if the URL is the root public static String get Last Element URL url String file url get File int len file length if len 0 len 1 file char At 0 return null int last Slash Index 1 for int i len 2 last Slash Index 1 i 0 i if file char At i last Slash Index i boolean is Directory file char At len 1 if last Slash Index 1 if is Directory return file substring 0 len 1 else return file else if is Directory return file substring last Slash Index 1 len 1 else return file substring last Slash Index 1 len  URLs URLs getLastElement getFile charAt lastSlashIndex lastSlashIndex charAt lastSlashIndex isDirectory charAt lastSlashIndex isDirectory isDirectory lastSlashIndex lastSlashIndex
Returns the parent URL of the given URL or code null code if the given URL is the root table caption Example caption tr th Given URL th th Parent URL th tr td http hostname td td null td tr td http hostname folder file td td http hostname folder td table param url a URL return the parent of the given URL throws MalformedURL Exception if the given URL is malformed public static URL get Parent String url throws MalformedURL Exception return get Parent new URL url  MalformedURLException getParent MalformedURLException getParent
Returns the parent URL of the given URL or code null code if the given URL is the root table caption Example caption tr th Given URL th th Parent URL th tr td http hostname td td null td tr td http hostname folder file td td http hostname folder td table param url a URL return the parent of the given URL public static URL get Parent URL url String file url get File int len file length if len 0 len 1 file char At 0 return null int last Slash Index 1 for int i len 2 last Slash Index 1 i 0 i if file char At i last Slash Index i if last Slash Index 1 file NON NLS 1 else file file substring 0 last Slash Index 1 try url new URL url get Protocol url get Host url get Port file catch MalformedURL Exception e Assert is True false e get Message return url  getParent getFile charAt lastSlashIndex lastSlashIndex charAt lastSlashIndex lastSlashIndex lastSlashIndex getProtocol getHost getPort MalformedURLException isTrue getMessage
Returns the root URL of the given URL table caption Example caption tr th Given URL th th Root URL th tr td http hostname td td http hostname td tr td http hostname folder file td td http hostname td table param url String a URL return the root url of the given URL throws MalformedURL Exception if the given URL is malformed public static URL get Root String url String throws MalformedURL Exception return get Root new URL url String  urlString MalformedURLException getRoot urlString MalformedURLException getRoot urlString
Returns the root URL of the given URL table caption Example caption tr th Given URL th th Root URL th tr td http hostname td td http hostname td tr td http hostname folder file td td http hostname td table param url a URL return the root URL of the given URL public static URL get Root URL url try return new URL url get Protocol url get Host url get Port NON NLS 1 catch MalformedURL Exception e Assert is True false internal error NON NLS 1 return null  getRoot getProtocol getHost getPort MalformedURLException isTrue
Returns the given URL with its trailing slash removed If the URL has no trailing slash the URL is returned unchanged table caption Example caption tr th Given URL th th Returned URL th tr td http hostname folder td td http hostname folder td tr td http hostname folder td td http hostname folder td table param url a URL return the given URL with its last slash removed throws MalformedURL Exception if the given URL is malformed public static URL remove Trailing Slash String url throws MalformedURL Exception return remove Trailing Slash new URL url  MalformedURLException removeTrailingSlash MalformedURLException removeTrailingSlash
Returns the given URL with its trailing slash removed If the URL has no trailing slash the URL is returned unchanged table caption Example caption tr th Given URL th th Returned URL th tr td http hostname folder td td http hostname folder td tr td http hostname folder td td http hostname folder td table param url a URL return the given URL with its last slash removed public static URL remove Trailing Slash URL url String file url get File if file ends With NON NLS 1 file file substring 0 file length 1 try return new URL url get Protocol url get Host url get Port file catch MalformedURL Exception e Assert is True false e get Message else return url return null  removeTrailingSlash getFile endsWith getProtocol getHost getPort MalformedURLException isTrue getMessage
Returns a boolean indicating whether the given UR Ls overlap table caption Example caption tr th First URL th th Second URL th th Do they overlap th tr td http hostname folder td td http hostname folder td td true td tr td http hostname folder td td http hostname folder file td td true td tr td http hostname folder file td td http hostname folder td td true td tr td http hostname folder1 td td http hostname folder2 td td false td table param url1 firt URL param url2 second URL return a boolean indicating whether the given UR Ls overlap public static boolean urls Overlap String url1 String url2 throws MalformedURL Exception return urls Overlap new URL url1 new URL url2  URLs URLs urlsOverlap MalformedURLException urlsOverlap
Returns a boolean indicating whether the given UR Ls overlap table caption Example caption tr th First URL th th Second URL th th Do they overlap th tr td http hostname folder td td http hostname folder td td true td tr td http hostname folder td td http hostname folder file td td true td tr td http hostname folder file td td http hostname folder td td true td tr td http hostname folder1 td td http hostname folder2 td td false td tr td http hostname1 folder td td http hostname2 folder td td false td table param url1 firt URL param url2 second URL return a boolean indicating whether the given UR Ls overlap public static boolean urls Overlap URL url1 URL url2 if get Root url1 equals get Root url2 return false Vector elements1 URL Tool get Elements url1 Vector elements2 URL Tool get Elements url2 for int i 0 i elements1 size i elements2 size i String element1 String elements1 element At i String element2 String elements2 element At i if element1 equals element2 return false return true  URLs URLs urlsOverlap getRoot getRoot URLTool getElements URLTool getElements elementAt elementAt

Returns new array enumeration over the given object array public Array Enumeration Object elements this elements 0 elements length 1  ArrayEnumeration
Returns new array enumeration over the given object array public Array Enumeration Object elements int first Element int last Element super this elements elements index first Element this last Element last Element  ArrayEnumeration firstElement lastElement firstElement lastElement lastElement
Returns true if this enumeration contains more elements public boolean has More Elements return elements null index last Element  hasMoreElements lastElement
Returns the next element of this enumeration exception No Such Element Exception if no more elements exist public Object next Element throws No Such Element Exception if has More Elements throw new No Such Element Exception return elements index  NoSuchElementException nextElement NoSuchElementException hasMoreElements NoSuchElementException

public final class Assert This class is not intended to be instantiated private Assert not allowed 
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression return is Legal expression NON NLS 1  IllegalArgumentException IllegalArgumentException isLegal isLegal
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression String message if expression throw new Illegal Argument Exception message return expression  IllegalArgumentException IllegalArgumentException isLegal IllegalArgumentException
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown param object the value to test exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object is Not Null object NON NLS 1  IllegalArgumentException isNotNull isNotNull
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param object the value to test param message the message to include in the exception exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object String message if object null throw new Assertion Failed Exception Policy bind utils null message NON NLS 1  IllegalArgumentException isNotNull AssertionFailedException
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails public static boolean is True boolean expression return is True expression NON NLS 1  isTrue isTrue
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails public static boolean is True boolean expression String message if expression throw new Assertion Failed Exception Policy bind utils failed message NON NLS 1 return expression  isTrue AssertionFailedException

class Assertion Failed Exception extends Runtime Exception Constructs a new exception public Assertion Failed Exception super  AssertionFailedException RuntimeException AssertionFailedException
Constructs a new exception with the given message public Assertion Failed Exception String detail super detail  AssertionFailedException

public Entry Object key Object cached long timestamp this key key this cached cached this timestamp timestamp 
public boolean compare Keyed Hash Set Keyed Element other if other instanceof Entry return false Entry other Entry Entry other return key equals other Entry key  KeyedHashSet KeyedElement otherEntry otherEntry
Removes this entry from the cache public void discard unchain cached null entries remove this 
public Object get Cached return cached  getCached
public Object get Key return key  getKey
public int get Key Hash Code return key hash Code  getKeyHashCode hashCode
public Entry get Next return next  getNext
public Entry get Previous return previous  getPrevious
public long get Timestamp return timestamp  getTimestamp
public boolean is Head return previous null  isHead
public boolean is Tail return next null  isTail
Inserts into the head of the list void make Head Entry old Head head head this next old Head previous null if old Head null tail this else old Head previous this  makeHead oldHead oldHead oldHead oldHead
public void set Cached Object cached this cached cached  setCached
public void set Timestamp long timestamp this timestamp timestamp  setTimestamp
public String to String return key cached timestamp NON NLS 1 NON NLS 2  toString
Removes from the linked list but not from the entries collection void unchain it may be in the tail if tail this tail previous else next previous previous it may be in the head if head this head next else previous next next 
private double threshold public Cache int maximum Capacity this Math min Keyed Hash Set MINIMUM SIZE maximum Capacity maximum Capacity 0 25  maximumCapacity KeyedHashSet MINIMUM_SIZE maximumCapacity maximumCapacity
public Cache int initial Capacity int maximum Capacity double threshold Assert is True maximum Capacity initial Capacity maximum capacity initial capacity NON NLS 1 Assert is True threshold 0 threshold 1 threshold should be between 0 and 1 NON NLS 1 Assert is True initial Capacity 0 initial capacity must be zero or a positive number NON NLS 1 entries new Keyed Hash Set initial Capacity this maximum Capacity maximum Capacity this threshold threshold  initialCapacity maximumCapacity isTrue maximumCapacity initialCapacity isTrue isTrue initialCapacity KeyedHashSet initialCapacity maximumCapacity maximumCapacity
public void add Entry Object key Object to Cache add Entry key to Cache 0  addEntry toCache addEntry toCache
public Entry add Entry Object key Object to Cache long timestamp Entry new Head Entry entries get By Key key if new Head null entries add new Head new Entry key to Cache timestamp new Head cached to Cache new Head timestamp timestamp new Head make Head int extra Entries entries size maximum Capacity if extra Entries maximum Capacity threshold we have reached our limit ensure we are under the maximum capacity by discarding older entries pack Entries extra Entries return new Head  addEntry toCache newHead getByKey newHead newHead toCache newHead toCache newHead newHead makeHead extraEntries maximumCapacity extraEntries maximumCapacity packEntries extraEntries newHead
public Entry get Entry Object key return get Entry key true  getEntry getEntry
public Entry get Entry Object key boolean update Entry existing Entry entries get By Key key if existing null return null if update return existing existing unchain existing make Head return existing  getEntry getByKey makeHead
public Entry get Head return head  getHead
public Entry get Tail return tail  getTail
private void pack Entries int extra Entries should remove in an ad hoc way to get better performance Entry current tail for current null extra Entries 0 extra Entries current discard current current previous  packEntries extraEntries extraEntries extraEntries
public long size return entries size 
public void discard All entries clear entries null  discardAll

Converts the string argument to a byte array public static String fromUTF8 byte b String result try result new String b UTF8 NON NLS 1 catch Unsupported Encoding Exception e result new String b return result  UnsupportedEncodingException
Converts the string argument to a byte array public static byte toUTF8 String s byte result try result s get Bytes UTF8 NON NLS 1 catch Unsupported Encoding Exception e result s get Bytes return result  getBytes UnsupportedEncodingException getBytes
Performs conversion of a long value to a byte array representation see bytes To Long byte public static byte long To Bytes long value A long value is 8 bytes in length byte bytes new byte 8 Convert and copy value to byte array Cast long to a byte to retrieve least significant byte Left shift long value by 8 bits to isolate next byte to be converted Repeat until all 8 bytes are converted long 64 bits Note In the byte array the least significant byte of the long is held in the highest indexed array bucket for int i 0 i bytes length i bytes bytes length 1 i byte value value 8 return bytes  bytesToLong longToBytes
Performs conversion of a byte array to a long representation see long To Bytes long public static long bytes To Long byte value long long Value 0L See method convert Long To Bytes long for algorithm details for int i 0 i value length i Left shift has no effect thru first iteration of loop long Value 8 long Value value i 0xFF return long Value  longToBytes bytesToLong longValue convertLongToBytes longValue longValue longValue
Calling String get Bytes creates a new encoding object and other garbage This can be avoided by calling String get Bytes String encoding instead public static byte to Platform Bytes String target if default Encoding null return target get Bytes try to use the default encoding try return target get Bytes default Encoding catch Unsupported Encoding Exception e null the default encoding so we don t try it again default Encoding null return target get Bytes  getBytes getBytes toPlatformBytes defaultEncoding getBytes getBytes defaultEncoding UnsupportedEncodingException defaultEncoding getBytes

Empty Enumeration constructor comment public Empty Enumeration super  EmptyEnumeration EmptyEnumeration
Returns the singleton instance public static Enumeration get Enumeration return instance  getEnumeration
Returns true if this enumeration has more elements public boolean has More Elements return false  hasMoreElements
see Enumeration next Element public Object next Element throw new java util No Such Element Exception Policy bind utils no Elements NON NLS 1  nextElement nextElement NoSuchElementException noElements

public interface Keyed Element public boolean compare Keyed Element other  KeyedElement KeyedElement
public boolean compare Keyed Element other public Object get Key  KeyedElement getKey
public Object get Key public int get Key Hash Code  getKey getKeyHashCode
private int found public boolean has Next return found element Count  hasNext elementCount
public Object next if has Next throw new No Such Element Exception while current Index elements length if elements current Index null found return elements current Index this would mean we have less elements than we thought throw new No Such Element Exception  hasNext NoSuchElementException currentIndex currentIndex currentIndex NoSuchElementException
public void remove as allowed by the API throw new Unsupported Operation Exception  UnsupportedOperationException
protected boolean replace public Keyed Hash Set this MINIMUM SIZE true  KeyedHashSet MINIMUM_SIZE
public Keyed Hash Set boolean replace this MINIMUM SIZE replace  KeyedHashSet MINIMUM_SIZE
public Keyed Hash Set int capacity this capacity true  KeyedHashSet
public Keyed Hash Set int capacity boolean replace elements new Keyed Element Math max MINIMUM SIZE capacity 2 this replace replace this capacity capacity  KeyedHashSet KeyedElement MINIMUM_SIZE
public Keyed Hash Set Keyed Hash Set original elements new Keyed Element original elements length System arraycopy original elements 0 elements 0 original elements length element Count original element Count replace original replace capacity original capacity  KeyedHashSet KeyedHashSet KeyedElement elementCount elementCount
Adds an element to this set If an element with the same key already exists replaces it depending on the replace flag return true if the element was added stored false otherwise public boolean add Keyed Element element int hash hash element search for an empty slot at the end of the array for int i hash i elements length i if elements i null elements i element element Count grow if necessary if should Grow expand return true if elements i compare element if replace elements i element return true else return false search for an empty slot at the beginning of the array for int i 0 i hash 1 i if elements i null elements i element element Count grow if necessary if should Grow expand return true if elements i compare element if replace elements i element return true else return false if we didn t find a free slot then try again with the expanded set expand return add element  KeyedElement elementCount shouldGrow elementCount shouldGrow
public void add All Keyed Element elements for int i 0 i elements length i add elements i  addAll KeyedElement
public void clear elements new Keyed Element Math max MINIMUM SIZE capacity 2 element Count 0  KeyedElement MINIMUM_SIZE elementCount
public boolean contains Keyed Element element return get element null  KeyedElement
public boolean contains Key Object key return get By Key key null  containsKey getByKey
public int count Collisions int result 0 int last Hash 0 boolean found false for int i 0 i elements length i Keyed Element element elements i if element null found false else int hash hash element if found if last Hash hash result else found false else last Hash hash found true return result  countCollisions lastHash KeyedElement lastHash lastHash
public Keyed Element elements return Keyed Element elements new Keyed Element element Count  KeyedElement KeyedElement KeyedElement elementCount
public Object elements Object result int j 0 for int i 0 i elements length i Keyed Element element elements i if element null result j element return result  KeyedElement
The array isn t large enough so double its size and rehash all its current values protected void expand Keyed Element old Elements elements elements new Keyed Element elements length 2 int max Array Index elements length 1 for int i 0 i old Elements length i Keyed Element element old Elements i if element null int hash hash element while elements hash null hash if hash max Array Index hash 0 elements hash element  KeyedElement oldElements KeyedElement maxArrayIndex oldElements KeyedElement oldElements maxArrayIndex
Returns the set element with the given id or null if not found public Keyed Element get Keyed Element key if element Count 0 return null int hash hash key search the last half of the array for int i hash i elements length i Keyed Element element elements i if element null return null if element compare key return element search the beginning of the array for int i 0 i hash 1 i Keyed Element element elements i if element null return null if element compare key return element nothing found so return null return null  KeyedElement KeyedElement elementCount KeyedElement KeyedElement
Returns the set element with the given id or null if not found public Keyed Element get By Key Object key if element Count 0 return null int hash key Hash key search the last half of the array for int i hash i elements length i Keyed Element element elements i if element null return null if element get Key equals key return element search the beginning of the array for int i 0 i hash 1 i Keyed Element element elements i if element null return null if element get Key equals key return element nothing found so return null return null  KeyedElement getByKey elementCount keyHash KeyedElement getKey KeyedElement getKey
private int hash Keyed Element key return Math abs key get Key Hash Code elements length  KeyedElement getKeyHashCode
public boolean is Empty return element Count 0  isEmpty elementCount
public Iterator iterator return new Keyed Hash Set Iterator  KeyedHashSetIterator
private int key Hash Object key return Math abs key hash Code elements length  keyHash hashCode
The element at the given index has been removed so move elements to keep the set properly hashed protected void rehash To int an Index int target an Index int index an Index 1 if index elements length index 0 Keyed Element element elements index while element null int hash Index hash element boolean match if index target match hash Index target hash Index index else match hash Index target hash Index index if match elements target element target index index if index elements length index 0 element elements index elements target null  rehashTo anIndex anIndex anIndex KeyedElement hashIndex hashIndex hashIndex hashIndex hashIndex
public boolean remove Keyed Element to Remove if element Count 0 return false int hash hash to Remove for int i hash i elements length i Keyed Element element elements i if element null return false if element compare to Remove rehash To i element Count return true for int i 0 i hash 1 i Keyed Element element elements i if element null return false if element compare to Remove rehash To i element Count return true return false  KeyedElement toRemove elementCount toRemove KeyedElement toRemove rehashTo elementCount KeyedElement toRemove rehashTo elementCount
public void remove All Keyed Element elements for int i 0 i elements length i remove elements i  removeAll KeyedElement
public boolean remove By Key Object key if element Count 0 return false int hash key Hash key for int i hash i elements length i Keyed Element element elements i if element null return false if element get Key equals key rehash To i element Count return true for int i 0 i hash 1 i Keyed Element element elements i if element null return false if element get Key equals key rehash To i element Count return true return true  removeByKey elementCount keyHash KeyedElement getKey rehashTo elementCount KeyedElement getKey rehashTo elementCount
private boolean should Grow return element Count elements length 0 75  shouldGrow elementCount
public int size return element Count  elementCount
public String to String String Buffer result new String Buffer 100 result append boolean first true for int i 0 i elements length i if elements i null if first first false else result append NON NLS 1 result append elements i result append return result to String  toString StringBuffer StringBuffer toString

Creates a new object map of default size public Object Map this DEFAULT SIZE  ObjectMap DEFAULT_SIZE
Creates a new object map param initial Capacity The initial number of elements that will fit in the map public Object Map int initial Capacity elements new Object Math max initial Capacity 2 0  initialCapacity ObjectMap initialCapacity initialCapacity
Creates a new object map of the same size as the given map and populate it with the key attribute pairs found in the map param map The entries in the given map will be added to the new map public Object Map Map map this map size put All map  ObjectMap putAll
see Map clear public void clear elements null count 0 
see Map contains Key java lang Object public boolean contains Key Object key if elements null count 0 return false for int i 0 i elements length i i 2 if elements i null elements i equals key return true return false  containsKey containsKey
see Map contains Value java lang Object public boolean contains Value Object value if elements null count 0 return false for int i 1 i elements length i i 2 if elements i null elements i equals value return true return false  containsValue containsValue
see Map entry Set This implementation does not conform properly to the specification in the Map interface The returned collection will not be bound to this map and will not remain in sync with this map public Set entry Set return to Hash Map entry Set  entrySet entrySet toHashMap entrySet
See Object equals public boolean equals Object o if o instanceof Map return false Map other Map o must be same size if count other size return false keysets must be equal if key Set equals other key Set return false values for each key must be equal for int i 0 i elements length i i 2 if elements i null elements i 1 equals other get elements i return false return true  keySet keySet
see Map get java lang Object public Object get Object key if elements null count 0 return null for int i 0 i elements length i i 2 if elements i null elements i equals key return elements i 1 return null 
The capacity of the map has been exceeded grow the array by GROW SIZE to accomodate more entries protected void grow Object expanded new Object elements length GROW SIZE System arraycopy elements 0 expanded 0 elements length elements expanded  GROW_SIZE GROW_SIZE
See Object hash Code public int hash Code int hash 0 for int i 0 i elements length i i 2 if elements i null hash elements i hash Code return hash  hashCode hashCode hashCode
see Map is Empty public boolean is Empty return count 0  isEmpty isEmpty
see Map key Set This implementation does not conform properly to the specification in the Map interface The returned collection will not be bound to this map and will not remain in sync with this map public Set key Set Set result new Hash Set size for int i 0 i elements length i i 2 if elements i null result add elements i return result  keySet keySet HashSet
see Map put java lang Object java lang Object public Object put Object key Object value if key null throw new Null Pointer Exception if value null return remove key handle the case where we don t have any attributes yet if elements null elements new Object DEFAULT SIZE if count 0 elements 0 key elements 1 value count return null replace existing value if it exists for int i 0 i elements length i i 2 if elements i null elements i equals key Object old Value elements i 1 elements i 1 value return old Value otherwise add it to the list of elements grow if necessary if elements length count 2 grow for int i 0 i elements length i i 2 if elements i null elements i key elements i 1 value count return null return null  NullPointerException DEFAULT_SIZE oldValue oldValue
see Map put All java util Map public void put All Map map for Iterator i map key Set iterator i has Next Object key i next Object value map get key put key value  putAll putAll keySet hasNext
see Map remove java lang Object public Object remove Object key if elements null count 0 return null for int i 0 i elements length i i 2 if elements i null elements i equals key elements i null Object result elements i 1 elements i 1 null count return result return null 
see Map size public int size return count 
Creates a new hash map with the same contents as this map private Hash Map to Hash Map Hash Map result new Hash Map size for int i 0 i elements length i i 2 if elements i null result put elements i elements i 1 return result  HashMap toHashMap HashMap HashMap
see Map values This implementation does not conform properly to the specification in the Map interface The returned collection will not be bound to this map and will not remain in sync with this map public Collection values Set result new Hash Set size for int i 1 i elements length i i 2 if elements i null result add elements i return result  HashSet
see java lang Object clone public Object clone return new Object Map this  ObjectMap

Lookup the message with the given ID in this catalog public static String bind String id return bind id String null 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string public static String bind String id String binding return bind id new String binding 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings public static String bind String id String binding1 String binding2 return bind id new String binding1 binding2 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string values public static String bind String id String bindings if id null return No message available NON NLS 1 String message null try message bundle get String id catch Missing Resource Exception e If we got an exception looking for the message fail gracefully by just returning the id we were looking for In most cases this is semi informative so is not too bad return Missing message id in bundle Name NON NLS 1 NON NLS 2 if bindings null return message return Message Format format message bindings  getString MissingResourceException bundleName MessageFormat
public static void check Canceled I Progress Monitor monitor if monitor is Canceled throw new Operation Canceled Exception  checkCanceled IProgressMonitor isCanceled OperationCanceledException
public static I Progress Monitor monitor For I Progress Monitor monitor if monitor null return new Null Progress Monitor return monitor  IProgressMonitor monitorFor IProgressMonitor NullProgressMonitor
public static void setup Auto Build Progress boolean on op Work on auto Build Op Work manual Build Op Work build Work on auto Build Build Work manual Build Build Work total Work op Work build Work  setupAutoBuildProgress opWork autoBuildOpWork manualBuildOpWork buildWork autoBuildBuildWork manualBuildBuildWork totalWork opWork buildWork
public static I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks  IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor
public static I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks int style if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks style  IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor
Print a debug message to the console Pre pend the message with the current date and the name of the current thread public static void debug String message String Buffer buffer new String Buffer buffer append new Date System current Time Millis buffer append NON NLS 1 buffer append Thread current Thread get Name buffer append NON NLS 1 buffer append message System out println buffer to String  StringBuffer StringBuffer currentTimeMillis currentThread getName toString

protected boolean reuse public Queue this 20 false 
The parameter reuse indicates what do you want to happen with the object reference when you remove it from the queue If reuse is false the queue no longer holds a reference to the object when it is removed If reuse is true you can use the method get Next Available Object to get an used object set its new values and add it again to the queue public Queue int size boolean reuse elements new Object size head tail 0 this reuse reuse  getNextAvailableObject
public void add Object element int new Tail increment tail if new Tail head grow new Tail tail 1 elements tail element tail new Tail  newTail newTail newTail newTail
public void clear if tail head for int i head i tail i elements i null else for int i head i elements length i elements i null for int i 0 i tail i elements i null tail head 0 
public boolean contains Object o return get o null 
This method does not affect the queue itself It is only a helper to decrement an index in the queue public int decrement int index return index 0 elements length 1 index 1 
public Object element At int index return elements index  elementAt
public Enumeration elements if is Empty return Empty Enumeration get Enumeration if head tail we can use the same array if head tail return new Array Enumeration elements head tail 1 otherwise we need to create a new array Object new Elements new Object size int end elements length head System arraycopy elements head new Elements 0 end System arraycopy elements 0 new Elements end tail return new Array Enumeration new Elements  isEmpty EmptyEnumeration getEnumeration ArrayEnumeration newElements newElements newElements ArrayEnumeration newElements
public Object get Object o int index head while index tail if elements index equals o return elements index index increment index return null 
Returns an object that has been removed from the queue if any The intention is to support reuse of objects that have already been processed and removed from the queue Returns null if there are no available objects public Object get Next Available Object int index tail while index head if elements index null Object result elements index elements index null return result index increment index return null  getNextAvailableObject
protected void grow int new Size int elements length 1 5 Object new Elements new Object new Size if tail head System arraycopy elements head new Elements head size else int new Head new Size elements length head System arraycopy elements 0 new Elements 0 tail 1 System arraycopy elements head new Elements new Head new Size new Head head new Head elements new Elements  newSize newElements newSize newElements newHead newSize newElements newElements newHead newSize newHead newHead newElements
This method does not affect the queue itself It is only a helper to increment an index in the queue public int increment int index return index elements length 1 0 index 1 
public int index Of Object target if tail head for int i head i tail i if target equals elements i return i else for int i head i elements length i if target equals elements i return i for int i 0 i tail i if target equals elements i return i return 1  indexOf
public boolean is Empty return tail head  isEmpty
public Object peek return elements head 
public Object peek Tail return elements decrement tail  peekTail
public Object remove if is Empty return null Object result peek if reuse elements head null head increment head return result  isEmpty
public Object remove Tail Object result peek Tail tail decrement tail if reuse elements tail null return result  removeTail peekTail
public void reset tail head 0 
public int size return tail head tail head elements length head tail 
public String to String String Buffer sb new String Buffer sb append NON NLS 1 Enumeration enum elements if is Empty while true sb append enum next Element if enum has More Elements sb append NON NLS 1 else break sb append NON NLS 1 return sb to String  toString StringBuffer StringBuffer isEmpty nextElement hasMoreElements toString

protected Runnable runnable public Semaphore Runnable runnable this runnable runnable notifications 0 
public synchronized void acquire throws Interrupted Exception if Thread interrupted throw new Interrupted Exception while notifications 0 wait notifications  InterruptedException InterruptedException
public boolean equals Object obj return runnable Semaphore obj runnable 
public Runnable get Runnable return runnable  getRunnable
public int hash Code return runnable hash Code  hashCode hashCode
public synchronized void release notifications notify All  notifyAll
for debug only public String to String return String value Of runnable  toString valueOf

Universal Unique Identifier default constructor returns a new instance that has been initialized to a unique value public Universal Unique Identifier this set Version 1 this set Variant 1 this set Time Values this set Node get Node Address  UniversalUniqueIdentifier UniversalUniqueIdentifier setVersion setVariant setTimeValues setNode getNodeAddress
Constructor that accepts the bytes to use for the instance nbsp nbsp The format of the byte array is compatible with the code to Bytes code method p The constructor returns the undefined uuid if the byte array is invalid see to Bytes see BYTES SIZE public Universal Unique Identifier byte byte Value f Bits new byte BYTES SIZE if byte Value length BYTES SIZE System arraycopy byte Value 0 f Bits 0 byte Value length  toBytes toBytes BYTES_SIZE UniversalUniqueIdentifier byteValue fBits BYTES_SIZE byteValue BYTES_SIZE byteValue fBits byteValue
Construct an instance whose internal representation is defined by the given string The format of the string is that of the code to String code instance method p It is useful to compare the code from Hex String code method in the Java class code Hex Converter code see to String public Universal Unique Identifier String string Check to ensure it is a String of the right length Assert is True string length Print String Size Policy bind utils wrong Length string NON NLS 1 char new Chars string to Char Array Convert to uppercase for int i 0 i new Chars length i new Chars i Character to Upper Case new Chars i Load Up a new instance for int i 0 i BYTES SIZE i int character Offset i 2 int hi Character digit new Chars character Offset 16 int lo Character digit new Chars character Offset 1 16 f Bits i new Integer hi 16 lo byte Value  toString fromHex HexConverter toString UniversalUniqueIdentifier isTrue PrintStringSize wrongLength newChars toCharArray newChars newChars toUpperCase newChars LoadUp BYTES_SIZE characterOffset newChars characterOffset newChars characterOffset fBits byteValue
private void append Byte String String Buffer buffer byte value String hex String if value 0 hex String Integer to Hex String 256 value else hex String Integer to Hex String value if hex String length 1 buffer append 0 NON NLS 1 buffer append hex String  appendByteString StringBuffer hexString hexString toHexString hexString toHexString hexString hexString
private static Big Integer clock Value Now Gregorian Calendar now new Gregorian Calendar Big Integer now Millis Big Integer value Of now get Time get Time Big Integer base Millis Big Integer value Of now get Gregorian Change get Time return now Millis subtract base Millis multiply Big Integer value Of 10000L  BigInteger clockValueNow GregorianCalendar GregorianCalendar BigInteger nowMillis BigInteger valueOf getTime getTime BigInteger baseMillis BigInteger valueOf getGregorianChange getTime nowMillis baseMillis BigInteger valueOf
Simply increases the visibility of code Object code s clone Otherwise no new behaviour public Object clone try return super clone catch Clone Not Supported Exception e Assert is True false Policy bind utils clone NON NLS 1 return null  CloneNotSupportedException isTrue
Answers the node address attempting to mask the IP address of this machine return byte the node address private static byte compute Node Address byte node Address new byte NODE ADDRESS BYTE SIZE Seed the secure randomizer with some oft varying inputs int thread Thread current Thread hash Code long time System current Time Millis int object Id System identity Hash Code new String Byte Array Output Stream byte Out new Byte Array Output Stream Data Output Stream out new Data Output Stream byte Out byte ip Address getIP Address try if ip Address null out write ip Address out write thread out write Long time out write object Id out close catch IO Exception exc ignore the failure we re just trying to come up with a random seed byte rand byte Out to Byte Array Secure Random randomizer new Secure Random rand randomizer next Bytes node Address set the MSB of the first octet to 1 to distinguish from IEEE node addresses node Address 0 byte node Address 0 byte 0x80 return node Address  computeNodeAddress nodeAddress NODE_ADDRESS_BYTE_SIZE currentThread hashCode currentTimeMillis objectId identityHashCode ByteArrayOutputStream byteOut ByteArrayOutputStream DataOutputStream DataOutputStream byteOut ipAddress getIPAddress ipAddress ipAddress writeLong objectId IOException byteOut toByteArray SecureRandom SecureRandom nextBytes nodeAddress nodeAddress nodeAddress nodeAddress
public boolean equals Object obj if this obj return true if obj instanceof Universal Unique Identifier return false byte other Universal Unique Identifier obj f Bits if f Bits other return true if f Bits length other length return false for int i 0 i f Bits length i if f Bits i other i return false return true  UniversalUniqueIdentifier UniversalUniqueIdentifier fBits fBits fBits fBits fBits
Answers the IP address of the local machine using the Java API class code Inet Address code return byte the network address in network order see java net Inet Address get Local Host see java net Inet Address get Address protected static byte getIP Address try return Inet Address get Local Host get Address catch Unknown Host Exception e valid for this to be thrown be a machine with no IP connection It is VERY important NOT to throw this exception return null  InetAddress InetAddress getLocalHost InetAddress getAddress getIPAddress InetAddress getLocalHost getAddress UnknownHostException
public byte get Node byte node Value new byte HOST ADDRESS BYTE SIZE System arraycopy f Bits NODE ADDRESS START node Value 0 HOST ADDRESS BYTE SIZE return node Value  getNode nodeValue HOST_ADDRESS_BYTE_SIZE fBits NODE_ADDRESS_START nodeValue HOST_ADDRESS_BYTE_SIZE nodeValue
private static byte get Node Address return node Address  getNodeAddress nodeAddress
public int get Variant byte flags f Bits CLOCK SEQUENCE HIGH AND RESERVED if flags MOST SIGINIFICANT BIT MASK 0 HP Apollo NCS 1 x and DEC RPC Version 1 return 0 if flags MOST SIGNIFICANT TWO BITS MASK MOST SIGINIFICANT BIT MASK HP DEC OSF DEC UID Architecture Functional Specification Version X1 0 4 from NCS 2 0 return 1 if flags MOST SIGNIFICANT THREE BITS MASK MOST SIGNIFICANT TWO BITS MASK Microsoft GUID return 2 if flags MOST SIGNIFICANT THREE BITS MASK MOST SIGNIFICANT THREE BITS MASK reserved return 3 unknown return 1  getVariant fBits CLOCK_SEQUENCE_HIGH_AND_RESERVED MOST_SIGINIFICANT_BIT_MASK MOST_SIGNIFICANT_TWO_BITS_MASK MOST_SIGINIFICANT_BIT_MASK MOST_SIGNIFICANT_THREE_BITS_MASK MOST_SIGNIFICANT_TWO_BITS_MASK MOST_SIGNIFICANT_THREE_BITS_MASK MOST_SIGNIFICANT_THREE_BITS_MASK
public int hash Code return f Bits 0 f Bits 3 f Bits 7 f Bits 11 f Bits 15  hashCode fBits fBits fBits fBits fBits
Tests to see if the receiver is anonymous p If the receiver was constrcted from a string or bytes it may not really be anonymous p return boolean true if the receiver is anonymous public boolean is Anonymous return is Undefined get Node 0 MOST SIGINIFICANT BIT MASK MOST SIGINIFICANT BIT MASK  isAnonymous isUndefined getNode MOST_SIGINIFICANT_BIT_MASK MOST_SIGINIFICANT_BIT_MASK
public boolean is Undefined return this equals Universal Unique Identifier new Undefined  isUndefined UniversalUniqueIdentifier newUndefined
Returns a new instance of code Universal Unique Identifier code that represents the single undefined state p The undefined code Universal Unique Identifier code is used to represent cases where a unique identifier is not required return the undefined instance of code Universal Unique Identifier code public static Universal Unique Identifier new Undefined return new Universal Unique Identifier UNDEFINED UUID BYTES  UniversalUniqueIdentifier UniversalUniqueIdentifier UniversalUniqueIdentifier UniversalUniqueIdentifier newUndefined UniversalUniqueIdentifier UNDEFINED_UUID_BYTES
private static int next Clock Sequence if fg Clock Sequence 1 fg Clock Sequence int fg Random Number Generator next Double MAX CLOCK SEQUENCE fg Clock Sequence fg Clock Sequence 1 MAX CLOCK SEQUENCE return fg Clock Sequence  nextClockSequence fgClockSequence fgClockSequence fgRandomNumberGenerator nextDouble MAX_CLOCK_SEQUENCE fgClockSequence fgClockSequence MAX_CLOCK_SEQUENCE fgClockSequence
private static Big Integer next Timestamp Big Integer timestamp clock Value Now int timestamp Comparison timestamp Comparison timestamp compare To fg Previous Clock Value if timestamp Comparison 0 if fg Clock Adjustment MAX CLOCK ADJUSTMENT while timestamp compare To fg Previous Clock Value 0 timestamp clock Value Now timestamp next Timestamp else fg Clock Adjustment else fg Clock Adjustment 0 if timestamp Comparison 0 next Clock Sequence return timestamp  BigInteger nextTimestamp BigInteger clockValueNow timestampComparison timestampComparison compareTo fgPreviousClockValue timestampComparison fgClockAdjustment MAX_CLOCK_ADJUSTMENT compareTo fgPreviousClockValue clockValueNow nextTimestamp fgClockAdjustment fgClockAdjustment timestampComparison nextClockSequence
Implements the corresponding method in the interface code I Printable code see I Printable print java io Data Output Stream public void print Data Output Stream out Stream try out Stream write Bytes to String catch IO Exception e Assert is True false Policy bind utils print NON NLS 1  IPrintable IPrintable DataOutputStream DataOutputStream outStream outStream writeBytes toString IOException isTrue
private void set Clock Sequence int clock Seq int clock Seq High clock Seq Shift Byte LOW NIBBLE MASK int reserved f Bits CLOCK SEQUENCE HIGH AND RESERVED HIGH NIBBLE MASK f Bits CLOCK SEQUENCE HIGH AND RESERVED byte reserved clock Seq High f Bits CLOCK SEQUENCE LOW byte clock Seq BYTE MASK  setClockSequence clockSeq clockSeqHigh clockSeq ShiftByte LOW_NIBBLE_MASK fBits CLOCK_SEQUENCE_HIGH_AND_RESERVED HIGH_NIBBLE_MASK fBits CLOCK_SEQUENCE_HIGH_AND_RESERVED clockSeqHigh fBits CLOCK_SEQUENCE_LOW clockSeq BYTE_MASK
protected void set Node byte bytes for int index 0 index NODE ADDRESS BYTE SIZE index f Bits index NODE ADDRESS START bytes index  setNode NODE_ADDRESS_BYTE_SIZE fBits NODE_ADDRESS_START
private void set Timestamp Big Integer timestamp Big Integer value timestamp Big Integer big Byte Big Integer value Of 256L Big Integer results int version int time High for int index TIME FIELD START index TIME FIELD STOP index results value divide And Remainder big Byte value results 0 f Bits index byte results 1 int Value version f Bits TIME HIGH AND VERSION HIGH NIBBLE MASK time High value int Value LOW NIBBLE MASK f Bits TIME HIGH AND VERSION byte time High version  setTimestamp BigInteger BigInteger BigInteger bigByte BigInteger valueOf BigInteger timeHigh TIME_FIELD_START TIME_FIELD_STOP divideAndRemainder bigByte fBits intValue fBits TIME_HIGH_AND_VERSION HIGH_NIBBLE_MASK timeHigh intValue LOW_NIBBLE_MASK fBits TIME_HIGH_AND_VERSION timeHigh
protected synchronized void set Time Values this set Timestamp timestamp this set Clock Sequence fg Clock Sequence  setTimeValues setTimestamp setClockSequence fgClockSequence
protected int set Variant int variant Identifier int clock Seq High f Bits CLOCK SEQUENCE HIGH AND RESERVED LOW NIBBLE MASK int variant variant Identifier LOW NIBBLE MASK f Bits CLOCK SEQUENCE HIGH AND RESERVED byte variant SHIFT NIBBLE clock Seq High return variant  setVariant variantIdentifier clockSeqHigh fBits CLOCK_SEQUENCE_HIGH_AND_RESERVED LOW_NIBBLE_MASK variantIdentifier LOW_NIBBLE_MASK fBits CLOCK_SEQUENCE_HIGH_AND_RESERVED SHIFT_NIBBLE clockSeqHigh
protected void set Version int version Identifier int time High f Bits TIME HIGH AND VERSION LOW NIBBLE MASK int version version Identifier LOW NIBBLE MASK f Bits TIME HIGH AND VERSION byte time High version SHIFT NIBBLE  setVersion versionIdentifier timeHigh fBits TIME_HIGH_AND_VERSION LOW_NIBBLE_MASK versionIdentifier LOW_NIBBLE_MASK fBits TIME_HIGH_AND_VERSION timeHigh SHIFT_NIBBLE
private static Big Integer timestamp Big Integer timestamp if fg Previous Clock Value null fg Clock Adjustment 0 next Clock Sequence timestamp clock Value Now else timestamp next Timestamp fg Previous Clock Value timestamp return fg Clock Adjustment 0 timestamp timestamp add Big Integer value Of fg Clock Adjustment  BigInteger BigInteger fgPreviousClockValue fgClockAdjustment nextClockSequence clockValueNow nextTimestamp fgPreviousClockValue fgClockAdjustment BigInteger valueOf fgClockAdjustment
This representation is compatible with the byte constructor see Universal Unique Identifier byte public byte to Bytes byte result new byte f Bits length System arraycopy f Bits 0 result 0 f Bits length return result  UniversalUniqueIdentifier toBytes fBits fBits fBits
public String to String String Buffer buffer new String Buffer for int i 0 i f Bits length i append Byte String buffer f Bits i return buffer to String  toString StringBuffer StringBuffer fBits appendByteString fBits toString
public String to String As Bytes String result NON NLS 1 for int i 0 i f Bits length i result f Bits i if i f Bits length 1 result NON NLS 1 return result NON NLS 1  toStringAsBytes fBits fBits fBits

private Throwable target public Wrapped Runtime Exception Throwable target super this target target  WrappedRuntimeException
public Throwable get Target Exception return this target  getTargetException
public String get Message return target get Message  getMessage getMessage

public String get Value String argument throws Core Exception if supports Argument check for an argument not supported if argument null argument length 0 throw new Core Exception new Status I Status ERROR Variables Plugin get Unique Identifier Variables Plugin INTERNAL ERROR Message Format format Variables Messages get String Dynamic Variable 0 new String argument get Name null NON NLS 1 if f Resolver null String name get Configuration Element get Attribute resolver NON NLS 1 if name null throw new Core Exception new Status I Status ERROR Variables Plugin get Unique Identifier Variables Plugin INTERNAL ERROR Message Format format Contributed context variable 0 must specify a resolver new String get Name null NON NLS 1 Object object get Configuration Element create Executable Extension resolver NON NLS 1 if object instanceof I Dynamic Variable Resolver f Resolver I Dynamic Variable Resolver object else throw new Core Exception new Status I Status ERROR Variables Plugin get Unique Identifier Variables Plugin INTERNAL ERROR Message Format format Contributed context variable resolver for 0 must be an instance of I Context Variable Resolver new String get Name null NON NLS 1 return f Resolver resolve Value this argument  getValue CoreException supportsArgument CoreException IStatus VariablesPlugin getUniqueIdentifier VariablesPlugin INTERNAL_ERROR MessageFormat VariablesMessages getString DynamicVariable getName fResolver getConfigurationElement getAttribute CoreException IStatus VariablesPlugin getUniqueIdentifier VariablesPlugin INTERNAL_ERROR MessageFormat getName getConfigurationElement createExecutableExtension IDynamicVariableResolver fResolver IDynamicVariableResolver CoreException IStatus VariablesPlugin getUniqueIdentifier VariablesPlugin INTERNAL_ERROR MessageFormat IContextVariableResolver getName fResolver resolveValue
Constructs a new context variable param name variable name param description variable description or code null code param configuration Element configuration element public Dynamic Variable String name String description I Configuration Element configuration Element super name description configuration Element  configurationElement DynamicVariable IConfigurationElement configurationElement configurationElement
see org eclipse core variables I Dynamic Variable supports Argument public boolean supports Argument String arg get Configuration Element get Attribute supports Argument NON NLS 1 return arg null Boolean value Of arg boolean Value  IDynamicVariable supportsArgument supportsArgument getConfigurationElement getAttribute supportsArgument valueOf booleanValue

Creates a listener list with the given initial capacity param capacity the number of listeners which this list can initially accept without growing its internal representation must be at least 1 public Listener List int capacity if capacity 1 throw new Illegal Argument Exception f Listeners new Object capacity f Size 0  ListenerList IllegalArgumentException fListeners fSize
Adds a listener to the list Has no effect if an identical listener is already registered param listener a listener public synchronized void add Object listener if listener null throw new Illegal Argument Exception check for duplicates using identity for int i 0 i f Size i if f Listeners i listener return grow array if necessary if f Size f Listeners length Object temp new Object f Size 2 1 System arraycopy f Listeners 0 temp 0 f Size f Listeners temp f Listeners f Size listener  IllegalArgumentException fSize fListeners fSize fListeners fSize fListeners fSize fListeners fListeners fSize
Returns an array containing all the registered listeners The resulting array is unaffected by subsequent adds or removes If there are no listeners registered the result is an empty array singleton instance no garbage is created Use this method when notifying listeners so that any modifications to the listener list during the notification will have no effect on the notification itself public synchronized Object get Listeners if f Size 0 return Empty Array Object result new Object f Size System arraycopy f Listeners 0 result 0 f Size return result  getListeners fSize EmptyArray fSize fListeners fSize
Removes a listener from the list Has no effect if an identical listener was not already registered param listener a listener public synchronized void remove Object listener if listener null throw new Illegal Argument Exception for int i 0 i f Size i if f Listeners i listener if f Size 0 f Listeners new Object 1 else if i f Size f Listeners i f Listeners f Size f Listeners f Size null return  IllegalArgumentException fSize fListeners fSize fListeners fSize fListeners fListeners fSize fListeners fSize
Removes all the listeners from the list public void remove All f Listeners new Object 0 f Size 0  removeAll fListeners fSize
Returns the number of registered listeners return the number of registered listeners public int size return f Size  fSize

private String Buffer f Text public Variable Reference f Text new String Buffer  StringBuffer fText VariableReference fText StringBuffer
public void append String text f Text append text  fText
public String get Text return f Text to String  getText fText toString
Performs recursive string substitution and returns the resulting string param expression expression to resolve param report Undefined Variables whether to report undefined variables as an error param manager registry of variables return the resulting string with all variables recursively substituted exception Core Exception if unable to resolve a referenced variable or if a cycle exists in referenced variables public String perform String Substitution String expression boolean report Undefined Variables boolean resolve Variables I String Variable Manager manager throws Core Exception substitute expression report Undefined Variables resolve Variables manager List resolved Variable Sets new Array List while f Subs Hash Set resolved substitute f Result to String report Undefined Variables true manager for int i resolved Variable Sets size 1 i 0 i Hash Set prev Set Hash Set resolved Variable Sets get i if prev Set equals resolved Hash Set conflicting Set new Hash Set for i resolved Variable Sets size i conflicting Set add All Hash Set resolved Variable Sets get i String Buffer problem Variable List new String Buffer for Iterator it conflicting Set iterator it has Next problem Variable List append it next to String problem Variable List append NON NLS 1 problem Variable List set Length problem Variable List length 2 truncate the last throw new Core Exception new Status I Status ERROR Variables Plugin get Unique Identifier Variables Plugin REFERENCE CYCLE ERROR Message Format format Variables Messages get String String Substitution Engine 4 new String problem Variable List to String null NON NLS 1 resolved Variable Sets add resolved return f Result to String  reportUndefinedVariables CoreException performStringSubstitution reportUndefinedVariables resolveVariables IStringVariableManager CoreException reportUndefinedVariables resolveVariables resolvedVariableSets ArrayList fSubs HashSet fResult toString reportUndefinedVariables resolvedVariableSets HashSet prevSet HashSet resolvedVariableSets prevSet HashSet conflictingSet HashSet resolvedVariableSets conflictingSet addAll HashSet resolvedVariableSets StringBuffer problemVariableList StringBuffer conflictingSet hasNext problemVariableList toString problemVariableList problemVariableList setLength problemVariableList CoreException IStatus VariablesPlugin getUniqueIdentifier VariablesPlugin REFERENCE_CYCLE_ERROR MessageFormat VariablesMessages getString StringSubstitutionEngine problemVariableList toString resolvedVariableSets fResult toString
Performs recursive string validation to ensure that all of the variables contained in the expression exist param expression expression to validate param manager registry of variables exception Core Exception if a referenced variable does not exist or if a cycle exists in referenced variables public void validate String Variables String expression I String Variable Manager manager throws Core Exception perform String Substitution expression true false manager  CoreException validateStringVariables IStringVariableManager CoreException performStringSubstitution
Makes a substitution pass of the given expression returns a Set of the variables that were resolved in this pass param expression source expression param report Undefined Variables whether to report undefined variables as an error param resolve Variables whether to resolve the value of any variables exception Core Exception if unable to resolve a variable private Hash Set substitute String expression boolean report Undefined Variables boolean resolve Variables I String Variable Manager manager throws Core Exception f Result new String Buffer expression length f Stack new Stack f Subs false Hash Set resolved Variables new Hash Set int pos 0 int state SCAN FOR START while pos expression length switch state case SCAN FOR START int start expression index Of VARIABLE START pos if start 0 int length start pos copy non variable text to the result if length 0 f Result append expression substring pos start pos start 2 state SCAN FOR END f Stack push new Variable Reference else done no more variables f Result append expression substring pos pos expression length break case SCAN FOR END be careful of nested variables start expression index Of VARIABLE START pos int end expression index Of VARIABLE END pos if end 0 variables are not completed Variable Reference tos Variable Reference f Stack peek tos append expression substring pos pos expression length else if start 0 start end start of a nested variable int length start pos if length 0 Variable Reference tos Variable Reference f Stack peek tos append expression substring pos start pos start 2 f Stack push new Variable Reference else end of variable reference Variable Reference tos Variable Reference f Stack pop String substring expression substring pos end tos append substring resolved Variables add substring pos end 1 String value resolve tos report Undefined Variables resolve Variables manager if value null value NON NLS 1 if f Stack is Empty append to result f Result append value state SCAN FOR START else append to previous variable tos Variable Reference f Stack peek tos append value break process incomplete variable references while f Stack is Empty Variable Reference tos Variable Reference f Stack pop if f Stack is Empty f Result append VARIABLE START f Result append tos get Text else Variable Reference var Variable Reference f Stack peek var append VARIABLE START var append tos get Text return resolved Variables  reportUndefinedVariables resolveVariables CoreException HashSet reportUndefinedVariables resolveVariables IStringVariableManager CoreException fResult StringBuffer fStack fSubs HashSet resolvedVariables HashSet SCAN_FOR_START SCAN_FOR_START indexOf VARIABLE_START fResult SCAN_FOR_END fStack VariableReference fResult SCAN_FOR_END indexOf VARIABLE_START indexOf VARIABLE_END VariableReference VariableReference fStack VariableReference VariableReference fStack fStack VariableReference VariableReference VariableReference fStack resolvedVariables reportUndefinedVariables resolveVariables fStack isEmpty fResult SCAN_FOR_START VariableReference fStack fStack isEmpty VariableReference VariableReference fStack fStack isEmpty fResult VARIABLE_START fResult getText VariableReference VariableReference fStack VARIABLE_START getText resolvedVariables
Resolve and return the value of the given variable reference possibly code null code param var param report Undefined Variables whether to report undefined variables as an error param resolve Variables whether to resolve the variables value or just to validate that this variable is valid param manager variable registry return variable value possibly code null code exception Core Exception if unable to resolve a value private String resolve Variable Reference var boolean report Undefined Variables boolean resolve Variables I String Variable Manager manager throws Core Exception String text var get Text int pos text index Of VARIABLE ARG String name null String arg null if pos 0 name text substring 0 pos pos if pos text length arg text substring pos else name text I Value Variable value Variable manager get Value Variable name if value Variable null I Dynamic Variable dynamic Variable manager get Dynamic Variable name if dynamic Variable null no variables with the given name if report Undefined Variables throw new Core Exception new Status I Status ERROR Variables Plugin get Unique Identifier Variables Plugin INTERNAL ERROR Message Format format Variables Messages get String String Substitution Engine 3 new String name null NON NLS 1 leave as is return get Original Var Text var if resolve Variables f Subs true return dynamic Variable get Value arg leave as is return get Original Var Text var if arg null if resolve Variables f Subs true return value Variable get Value leave as is return get Original Var Text var error an argument specified for a value variable throw new Core Exception new Status I Status ERROR Variables Plugin get Unique Identifier Variables Plugin INTERNAL ERROR Message Format format Variables Messages get String String Substitution Engine 4 new String value Variable get Name null NON NLS 1  reportUndefinedVariables resolveVariables CoreException VariableReference reportUndefinedVariables resolveVariables IStringVariableManager CoreException getText indexOf VARIABLE_ARG IValueVariable valueVariable getValueVariable valueVariable IDynamicVariable dynamicVariable getDynamicVariable dynamicVariable reportUndefinedVariables CoreException IStatus VariablesPlugin getUniqueIdentifier VariablesPlugin INTERNAL_ERROR MessageFormat VariablesMessages getString StringSubstitutionEngine getOriginalVarText resolveVariables fSubs dynamicVariable getValue getOriginalVarText resolveVariables fSubs valueVariable getValue getOriginalVarText CoreException IStatus VariablesPlugin getUniqueIdentifier VariablesPlugin INTERNAL_ERROR MessageFormat VariablesMessages getString StringSubstitutionEngine valueVariable getName
private String get Original Var Text Variable Reference var String Buffer res new String Buffer var get Text res insert 0 VARIABLE START res append VARIABLE END return res to String  getOriginalVarText VariableReference StringBuffer StringBuffer getText VARIABLE_START VARIABLE_END toString

Constructs a new variable with the given name and description param name variable name param description variable description or code null code public String Variable String name String description I Configuration Element configuration Element f Name name f Description description f Configuration Element configuration Element  StringVariable IConfigurationElement configurationElement fName fDescription fConfigurationElement configurationElement
see org eclipse debug internal core stringsubstitution I String Variable get Name public String get Name return f Name  IStringVariable getName getName fName
see org eclipse debug internal core stringsubstitution I String Variable get Description public String get Description return f Description  IStringVariable getDescription getDescription fDescription
Returns the configuration element associated with this variable or code null code if none return configuration element or code null code protected I Configuration Element get Configuration Element return f Configuration Element  IConfigurationElement getConfigurationElement fConfigurationElement
see I Value Variable set Description String param description public void set Description String description f Description description  IValueVariable setDescription setDescription fDescription

see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception I Status status new Status I Status ERROR Variables Plugin get Unique Identifier Variables Plugin INTERNAL ERROR An exception occurred during string variable change notification exception NON NLS 1 Variables Plugin log status  ISafeRunnable handleException handleException IStatus IStatus VariablesPlugin getUniqueIdentifier VariablesPlugin INTERNAL_ERROR VariablesPlugin
see org eclipse core runtime I Safe Runnable run public void run throws Exception switch f Type case ADDED f Listener variables Added f Variables break case REMOVED f Listener variables Removed f Variables break case CHANGED f Listener variables Changed f Variables break  ISafeRunnable fType fListener variablesAdded fVariables fListener variablesRemoved fVariables fListener variablesChanged fVariables
Notifies the given listener of the add change remove param listener the listener to notify param launch the launch that has changed param update the type of change public void notify I Value Variable variables int update f Variables variables f Type update Object copied Listeners f Listeners get Listeners for int i 0 i copied Listeners length i f Listener I Value Variable Listener copied Listeners i Platform run this f Variables null f Listener null persist variables whenever there is an add change remove store Value Variables  IValueVariable fVariables fType copiedListeners fListeners getListeners copiedListeners fListener IValueVariableListener copiedListeners fVariables fListener storeValueVariables
Returns a new notifier return a new notifier private String Variable Notifier get Notifier return new String Variable Notifier  StringVariableNotifier getNotifier StringVariableNotifier
Returns the default string variable manager return string variable manager public static String Variable Manager get Default if fg Manager null fg Manager new String Variable Manager return fg Manager  StringVariableManager getDefault fgManager fgManager StringVariableManager fgManager
Constructs a new string variable manager private String Variable Manager f Listeners new Listener List 5  StringVariableManager fListeners ListenerList
Load contributed variables and persisted variables private void initialize if f Dynamic Variables null f Initializing true f Dynamic Variables new Hash Map 5 f Value Variables new Hash Map 5 load Persisted Value Variables load Contributed Value Variables load Dynamic Variables f Initializing false  fDynamicVariables fInitializing fDynamicVariables HashMap fValueVariables HashMap loadPersistedValueVariables loadContributedValueVariables loadDynamicVariables fInitializing
Loads contributed dynamic variables private void load Dynamic Variables I Extension Point point Platform get Extension Registry get Extension Point Variables Plugin PI CORE VARIABLES EXTENSION POINT DYNAMIC VARIABLES I Configuration Element elements point get Configuration Elements for int i 0 i elements length i I Configuration Element element elements i String name element get Attribute ATTR NAME if name null Variables Plugin log Message Message Format format Variable extension missing required name attribute 0 new String element get Declaring Extension get Label null NON NLS 1 continue String description element get Attribute ATTR DESCRIPTION Dynamic Variable variable new Dynamic Variable name description element f Dynamic Variables put variable get Name variable  loadDynamicVariables IExtensionPoint getExtensionRegistry getExtensionPoint VariablesPlugin PI_CORE_VARIABLES EXTENSION_POINT_DYNAMIC_VARIABLES IConfigurationElement getConfigurationElements IConfigurationElement getAttribute ATTR_NAME VariablesPlugin logMessage MessageFormat getDeclaringExtension getLabel getAttribute ATTR_DESCRIPTION DynamicVariable DynamicVariable fDynamicVariables getName
Loads any persisted value varialbes from the preference store private void load Persisted Value Variables String variables String Variables Plugin get Default get Plugin Preferences get String PREF VALUE VARIABLES if variables String length 0 return Element root null Throwable ex null try Byte Array Input Stream stream new Byte Array Input Stream variables String get Bytes UTF 8 NON NLS 1 Document Builder parser Document Builder Factory new Instance new Document Builder root parser parse stream get Document Element catch Unsupported Encoding Exception e ex e catch Parser Configuration Exception e ex e catch Factory Configuration Error e ex e catch SAX Exception e ex e catch IO Exception e ex e if ex null Variables Plugin log Message An exception occurred while loading persisted value variables ex NON NLS 1 return if root get Node Name equals VALUE VARIABLES TAG Variables Plugin log Message Invalid format encountered while loading persisted value variables null NON NLS 1 return Node List list root get Child Nodes for int i 0 num Items list get Length i num Items i Node node list item i if node get Node Type Node ELEMENT NODE Element element Element node if element get Node Name equals VALUE VARIABLE TAG Variables Plugin log Message Message Format format Invalid XML element encountered while loading value variables 0 new String node get Node Name null NON NLS 1 continue String name element get Attribute NAME TAG if name length 0 String value element get Attribute VALUE TAG String description element get Attribute DESCRIPTION TAG boolean initialized TRUE VALUE equals element get Attribute INITIALIZED TAG Value Variable variable new Value Variable name description null if initialized variable set Value value f Value Variables put name variable else Variables Plugin log Message Invalid variable entry encountered while loading value variables Variable name is null null NON NLS 1  loadPersistedValueVariables variablesString VariablesPlugin getDefault getPluginPreferences getString PREF_VALUE_VARIABLES variablesString ByteArrayInputStream ByteArrayInputStream variablesString getBytes DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder getDocumentElement UnsupportedEncodingException ParserConfigurationException FactoryConfigurationError SAXException IOException VariablesPlugin logMessage getNodeName VALUE_VARIABLES_TAG VariablesPlugin logMessage NodeList getChildNodes numItems getLength numItems getNodeType ELEMENT_NODE getNodeName VALUE_VARIABLE_TAG VariablesPlugin logMessage MessageFormat getNodeName getAttribute NAME_TAG getAttribute VALUE_TAG getAttribute DESCRIPTION_TAG TRUE_VALUE getAttribute INITIALIZED_TAG ValueVariable ValueVariable setValue fValueVariables VariablesPlugin logMessage
Loads contributed value variables This is done after the persisted value varaibles are restored Any contributed variables with the same name are merged with existing persisted values private void load Contributed Value Variables I Extension Point point Platform get Extension Registry get Extension Point Variables Plugin PI CORE VARIABLES EXTENSION POINT VALUE VARIABLES I Configuration Element elements point get Configuration Elements for int i 0 i elements length i I Configuration Element element elements i String name element get Attribute ATTR NAME if name null Variables Plugin log Message Message Format format Variable extension missing required name attribute 0 new String element get Declaring Extension get Label null NON NLS 1 continue String description element get Attribute ATTR DESCRIPTION Value Variable variable new Value Variable name description element if already present merge with persisted value Value Variable existing Value Variable get Value Variable name if existing null if existing is Initialized variable set Value existing get Value f Value Variables put variable get Name variable  loadContributedValueVariables IExtensionPoint getExtensionRegistry getExtensionPoint VariablesPlugin PI_CORE_VARIABLES EXTENSION_POINT_VALUE_VARIABLES IConfigurationElement getConfigurationElements IConfigurationElement getAttribute ATTR_NAME VariablesPlugin logMessage MessageFormat getDeclaringExtension getLabel getAttribute ATTR_DESCRIPTION ValueVariable ValueVariable ValueVariable ValueVariable getValueVariable isInitialized setValue getValue fValueVariables getName
public I String Variable get Variables initialize List list new Array List f Dynamic Variables size f Value Variables size list add All f Dynamic Variables values list add All f Value Variables values return I String Variable list to Array new I String Variable list size  IStringVariable getVariables ArrayList fDynamicVariables fValueVariables addAll fDynamicVariables addAll fValueVariables IStringVariable toArray IStringVariable
see org eclipse debug internal core stringsubstitution I String Variable Manager get Value Variables public I Value Variable get Value Variables initialize return I Value Variable f Value Variables values to Array new I Value Variable f Value Variables size  IStringVariableManager getValueVariables IValueVariable getValueVariables IValueVariable fValueVariables toArray IValueVariable fValueVariables
see org eclipse debug internal core stringsubstitution I String Variable Manager get Dynamic Variables public I Dynamic Variable get Dynamic Variables initialize return I Dynamic Variable f Dynamic Variables values to Array new I Dynamic Variable f Dynamic Variables size  IStringVariableManager getDynamicVariables IDynamicVariable getDynamicVariables IDynamicVariable fDynamicVariables toArray IDynamicVariable fDynamicVariables
see org eclipse debug internal core stringsubstitution I String Variable Manager perform String Substitution java lang String public String perform String Substitution String expression throws Core Exception return perform String Substitution expression true  IStringVariableManager performStringSubstitution performStringSubstitution CoreException performStringSubstitution
public I Value Variable new Value Variable String name String description I Configuration Element element null Value Variable existing Value Variable get Value Variable name if existing null existing is Contributed element existing get Configuration Element return new Value Variable name description element  IValueVariable newValueVariable IConfigurationElement ValueVariable ValueVariable getValueVariable isContributed getConfigurationElement ValueVariable
public void add Variables I Value Variable variables throws Core Exception initialize Multi Status status new Multi Status Variables Plugin get Unique Identifier Variables Plugin INTERNAL ERROR Variables Messages get String String Variable Manager 26 null NON NLS 1 for int i 0 i variables length i I Value Variable variable variables i if get Value Variable variable get Name null status add new Status I Status ERROR Variables Plugin get Unique Identifier Variables Plugin INTERNAL ERROR Message Format format Variables Messages get String String Variable Manager 27 new String variable get Name null NON NLS 1 if status isOK for int i 0 i variables length i I Value Variable variable variables i f Value Variables put variable get Name variable I Value Variable copy new I Value Variable variables length System arraycopy variables 0 copy 0 variables length get Notifier notify copy ADDED return throw new Core Exception status  addVariables IValueVariable CoreException MultiStatus MultiStatus VariablesPlugin getUniqueIdentifier VariablesPlugin INTERNAL_ERROR VariablesMessages getString StringVariableManager IValueVariable getValueVariable getName IStatus VariablesPlugin getUniqueIdentifier VariablesPlugin INTERNAL_ERROR MessageFormat VariablesMessages getString StringVariableManager getName IValueVariable fValueVariables getName IValueVariable IValueVariable getNotifier CoreException
public void remove Variables I Value Variable variables initialize List removed new Array List variables length for int i 0 i variables length i I Value Variable variable variables i if f Value Variables remove variable get Name null removed add variable if removed size 0 get Notifier notify I Value Variable removed to Array new I Value Variable removed size REMOVED  removeVariables IValueVariable ArrayList IValueVariable fValueVariables getName getNotifier IValueVariable toArray IValueVariable
see org eclipse debug internal core stringsubstitution I String Variable Manager get Dynamic Variable java lang String public I Dynamic Variable get Dynamic Variable String name initialize return I Dynamic Variable f Dynamic Variables get name  IStringVariableManager getDynamicVariable IDynamicVariable getDynamicVariable IDynamicVariable fDynamicVariables
see org eclipse debug internal core stringsubstitution I String Variable Manager get Value Variable java lang String public I Value Variable get Value Variable String name initialize return I Value Variable f Value Variables get name  IStringVariableManager getValueVariable IValueVariable getValueVariable IValueVariable fValueVariables
see org eclipse debug internal core stringsubstitution I String Variable Manager add Value Variable Listener org eclipse debug internal core stringsubstitution I Value Variable Listener public void add Value Variable Listener I Value Variable Listener listener f Listeners add listener  IStringVariableManager addValueVariableListener IValueVariableListener addValueVariableListener IValueVariableListener fListeners
see org eclipse debug internal core stringsubstitution I String Variable Manager remove Value Variable Listener org eclipse debug internal core stringsubstitution I Value Variable Listener public void remove Value Variable Listener I Value Variable Listener listener f Listeners remove listener  IStringVariableManager removeValueVariableListener IValueVariableListener removeValueVariableListener IValueVariableListener fListeners
Returns a memento representing the value variables currently registered return memento representing the value variables currently registered throws IO Exception if an I O exception occurs while creating the XML private String get Value Variables AsXML throws IO Exception Parser Configuration Exception Transformer Exception I Value Variable variables get Value Variables Document document get Document Element root Element document create Element VALUE VARIABLES TAG document append Child root Element for int i 0 i variables length i Value Variable variable Value Variable variables i Element element document create Element VALUE VARIABLE TAG element set Attribute NAME TAG variable get Name String value variable get Value if value null element set Attribute VALUE TAG value String description variable get Description if description null element set Attribute DESCRIPTION TAG description element set Attribute INITIALIZED TAG variable is Initialized TRUE VALUE FALSE VALUE root Element append Child element return serialize Document document  IOException getValueVariablesAsXML IOException ParserConfigurationException TransformerException IValueVariable getValueVariables getDocument rootElement createElement VALUE_VARIABLES_TAG appendChild rootElement ValueVariable ValueVariable createElement VALUE_VARIABLE_TAG setAttribute NAME_TAG getName getValue setAttribute VALUE_TAG getDescription setAttribute DESCRIPTION_TAG setAttribute INITIALIZED_TAG isInitialized TRUE_VALUE FALSE_VALUE rootElement appendChild serializeDocument
private Document get Document throws Parser Configuration Exception Document Builder Factory dfactory Document Builder Factory new Instance Document Builder doc Builder dfactory new Document Builder Document doc doc Builder new Document return doc  getDocument ParserConfigurationException DocumentBuilderFactory DocumentBuilderFactory newInstance DocumentBuilder docBuilder newDocumentBuilder docBuilder newDocument
Serializes a XML document into a string encoded in UTF8 format with platform line separators param doc document to serialize return the document as a string throws Transformer Exception if an unrecoverable error occurs during the serialization throws IO Exception if the encoding attempted to be used is not supported private String serialize Document Document doc throws Transformer Exception Unsupported Encoding Exception Byte Array Output Stream s new Byte Array Output Stream Transformer Factory factory Transformer Factory new Instance Transformer transformer factory new Transformer transformer set Output Property Output Keys METHOD xml NON NLS 1 transformer set Output Property Output Keys INDENT yes NON NLS 1 DOM Source source new DOM Source doc Stream Result output Target new Stream Result s transformer transform source output Target return s to String UTF8 NON NLS 1  TransformerException IOException serializeDocument TransformerException UnsupportedEncodingException ByteArrayOutputStream ByteArrayOutputStream TransformerFactory TransformerFactory newInstance newTransformer setOutputProperty OutputKeys setOutputProperty OutputKeys DOMSource DOMSource StreamResult outputTarget StreamResult outputTarget toString
Saves the value variables currently registered in the preference store private void store Value Variables Preferences prefs Variables Plugin get Default get Plugin Preferences String variable String NON NLS 1 if f Value Variables is Empty try variable String get Value Variables AsXML catch IO Exception e Variables Plugin log new Status I Status ERROR Variables Plugin get Unique Identifier I Status ERROR An exception occurred while storing launch configuration variables e NON NLS 1 return catch Parser Configuration Exception e Variables Plugin log new Status I Status ERROR Variables Plugin get Unique Identifier I Status ERROR An exception occurred while storing launch configuration variables e NON NLS 1 return catch Transformer Exception e Variables Plugin log new Status I Status ERROR Variables Plugin get Unique Identifier I Status ERROR An exception occurred while storing launch configuration variables e NON NLS 1 return prefs set Value PREF VALUE VARIABLES variable String Variables Plugin get Default save Plugin Preferences  storeValueVariables VariablesPlugin getDefault getPluginPreferences variableString fValueVariables isEmpty variableString getValueVariablesAsXML IOException VariablesPlugin IStatus VariablesPlugin getUniqueIdentifier IStatus ParserConfigurationException VariablesPlugin IStatus VariablesPlugin getUniqueIdentifier IStatus TransformerException VariablesPlugin IStatus VariablesPlugin getUniqueIdentifier IStatus setValue PREF_VALUE_VARIABLES variableString VariablesPlugin getDefault savePluginPreferences
Fire a change notification for the given variable param variable the variable that has changed protected void notify Changed Value Variable variable if f Initializing I Value Variable existing get Value Variable variable get Name if variable equals existing do not do change notification for unregistered variables get Notifier notify new I Value Variable variable CHANGED  notifyChanged ValueVariable fInitializing IValueVariable getValueVariable getName getNotifier IValueVariable
public String generate Variable Expression String var Name String arg String Buffer buffer new String Buffer buffer append NON NLS 1 buffer append var Name if arg null buffer append NON NLS 1 buffer append arg buffer append NON NLS 1 return buffer to String  generateVariableExpression varName StringBuffer StringBuffer varName toString
see org eclipse debug internal core stringsubstitution I String Variable Manager perform String Substitution java lang String boolean public String perform String Substitution String expression boolean report Undefined Variables throws Core Exception return new String Substitution Engine perform String Substitution expression report Undefined Variables true this  IStringVariableManager performStringSubstitution performStringSubstitution reportUndefinedVariables CoreException StringSubstitutionEngine performStringSubstitution reportUndefinedVariables
see org eclipse core variables I String Variable Manager validate String Variables java lang String public void validate String Variables String expression throws Core Exception new String Substitution Engine validate String Variables expression this  IStringVariableManager validateStringVariables validateStringVariables CoreException StringSubstitutionEngine validateStringVariables

Constructs a new value variable with the given name description and associated configuration element param name variable name param description variable description or code null code param configuration Element configuration element or code null code public Value Variable String name String description I Configuration Element configuration Element super name description configuration Element  configurationElement ValueVariable IConfigurationElement configurationElement configurationElement
public void set Value String value f Value value set Initialized true String Variable Manager get Default notify Changed this  setValue fValue setInitialized StringVariableManager getDefault notifyChanged
public String get Value if is Initialized initialize return f Value  getValue isInitialized fValue
Initialize this variable s value private void initialize if get Configuration Element null check for a explicit value specified in plug in XML String value get Configuration Element get Attribute initial Value NON NLS 1 if value null check for initializer String class Name get Configuration Element get Attribute initializer Class NON NLS 1 if class Name null try Object object get Configuration Element create Executable Extension initializer Class NON NLS 1 if object instanceof I Value Variable Initializer I Value Variable Initializer initializer I Value Variable Initializer object initializer initialize this else Variables Plugin log Message Message Format format Unable to initialize variable 0 initializer must be an instance of I Value Variable Initializer new String get Name null NON NLS 1 catch Core Exception e Variables Plugin log Message Message Format format Unable to initialize variable 0 new String get Name e NON NLS 1 else set Value value set Initialized true  getConfigurationElement getConfigurationElement getAttribute initialValue className getConfigurationElement getAttribute initializerClass className getConfigurationElement createExecutableExtension initializerClass IValueVariableInitializer IValueVariableInitializer IValueVariableInitializer VariablesPlugin logMessage MessageFormat IValueVariableInitializer getName CoreException VariablesPlugin logMessage MessageFormat getName setValue setInitialized
Returns whether this variable has been initialized with a value by one of ul li code set Value String code li li its configuration element s code initial Value code attribute li li its configuration element s initializer li ul return whether this variable has been initialized with a value protected boolean is Initialized return f Initialized  setValue initialValue isInitialized fInitialized
Sets whether this variable has been initialized with a value param initialized whether this variable has been initialized protected void set Initialized boolean initialized f Initialized initialized  setInitialized fInitialized
see org eclipse debug internal core stringsubstitution I Value Variable is Contributed public boolean is Contributed return get Configuration Element null  IValueVariable isContributed isContributed getConfigurationElement

Resource Bundle get Bundle BUNDLE NAME private Variables Messages  ResourceBundle getBundle BUNDLE_NAME VariablesMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Force clients to use the singleton protected Default Element Comparator super  DefaultElementComparator
Returns the type of change public int compare Object old Info Object new Info if old Info null new Info null return 0 if old Info null new Info null return 1 return test Equality old Info new Info 0 1  oldInfo newInfo oldInfo newInfo oldInfo newInfo testEquality oldInfo newInfo
Returns the singleton instance public static I Element Comparator get Comparator if singleton null singleton new Default Element Comparator return singleton  IElementComparator getComparator DefaultElementComparator
Makes a comparison based on equality protected boolean test Equality Object old Info Object new Info if old Info null new Info null return true if old Info null new Info null return false return old Info equals new Info  testEquality oldInfo newInfo oldInfo newInfo oldInfo newInfo oldInfo newInfo

Creates a new Delta Iterator that traverses the tree in pre order public Delta Iterator order PRE ORDER  DeltaIterator DeltaIterator PRE_ORDER
Creates a new Delta Iterator that traverses the tree in the specified manner public Delta Iterator int order this order order  DeltaIterator DeltaIterator
Initializes the iterator private void initialize Element Tree Delta tree element Tree Delta tree delta Tree tree get Delta Tree old Tree tree get Parent new Tree tree get Element Tree  ElementTreeDelta elementTreeDelta deltaTree getDeltaTree oldTree getParent newTree getElementTree
Iterates through the given element tree delta and visits each element passing in the element s path and element object public void iterate Element Tree Delta tree I Delta Visitor visitor iterate tree visitor Path ROOT  ElementTreeDelta IDeltaVisitor
Iterates through the given element tree delta and visits each element in the subtree rooted at the given path passing in the element s path and element object public void iterate Element Tree Delta tree I Delta Visitor visitor I Path path initialize tree don t visit the root element if path is Root I Path children delta Tree get Children path for int i 0 i children length i iterate visitor children i Node Comparison K CHANGED else iterate visitor path  ElementTreeDelta IDeltaVisitor IPath isRoot IPath deltaTree getChildren NodeComparison K_CHANGED
Starts the iteration at the provided entry point If the entry point is not in the real delta the iteration terminates private void iterate I Delta Visitor visitor I Path path find which tree this element is in Data Tree Node node Data Tree Node delta Tree find Node At path if node null look in old tree if old Tree includes path iterate visitor path Node Comparison K ADDED else look in new tree if new Tree includes path iterate visitor path Node Comparison K REMOVED else look in the delta tree iterate visitor path Node Comparison K CHANGED  IDeltaVisitor IPath DataTreeNode DataTreeNode deltaTree findNodeAt oldTree NodeComparison K_ADDED newTree NodeComparison K_REMOVED NodeComparison K_CHANGED
Iterates from the given node based on the kind of change in the parent private void iterate I Delta Visitor visitor I Path path int parent Change int comparison 0 real Change 0 Object old Data null Object new Data null I Path children null switch parent Change case Node Comparison K ADDED look in the new tree only comparison real Change parent Change new Data new Tree get Element Data path children new Tree get Children path break case Node Comparison K REMOVED look in the old tree only comparison real Change parent Change old Data old Tree get Element Data path children old Tree get Children path break case Node Comparison K CHANGED look in delta tree Node Comparison info Node Comparison delta Tree get Data path comparison info get User Comparison real Change info get Comparison children delta Tree get Children path old Data info get Old Data new Data info get New Data Assert is Not Null children boolean visit Children true if order PRE ORDER visit Children visitor visit Element element Tree Delta path old Data new Data comparison if visit Children for int i 0 i children length i iterate visitor children i real Change if order POST ORDER visitor visit Element element Tree Delta path old Data new Data comparison  IDeltaVisitor IPath parentChange realChange oldData newData IPath parentChange NodeComparison K_ADDED realChange parentChange newData newTree getElementData newTree getChildren NodeComparison K_REMOVED realChange parentChange oldData oldTree getElementData oldTree getChildren NodeComparison K_CHANGED NodeComparison NodeComparison deltaTree getData getUserComparison realChange getComparison deltaTree getChildren oldData getOldData newData getNewData isNotNull visitChildren PRE_ORDER visitChildren visitElement elementTreeDelta oldData newData visitChildren realChange POST_ORDER visitElement elementTreeDelta oldData newData

Constructs an element delta Element Delta Element Tree Delta tree Delta I Path path In Trees I Path path In Delta Node Comparison comparison this tree Delta tree Delta this path In Delta path In Delta this path In Trees path In Trees this comparison comparison  ElementDelta ElementTreeDelta treeDelta IPath pathInTrees IPath pathInDelta NodeComparison treeDelta treeDelta pathInDelta pathInDelta pathInTrees pathInTrees
Destroys this delta and all trees deltas referenced herein public void destroy tree Delta destroy tree Delta null path In Delta null path In Trees null comparison null  treeDelta treeDelta pathInDelta pathInTrees
Returns any elements in the new tree that match the given filter query protected Element Delta get Added Children I Delta Filter filter I Path children tree Delta get Element Tree get Children path In Trees Element Delta deltas new Element Delta children length for int i children length i 0 deltas i new Element Delta tree Delta children i path In Delta append children i last Segment comparison return deltas  ElementDelta getAddedChildren IDeltaFilter IPath treeDelta getElementTree getChildren pathInTrees ElementDelta ElementDelta ElementDelta treeDelta pathInDelta lastSegment
Returns Element Deltas for any elements that match the given filter query public Element Delta get Affected Children I Delta Filter filter switch comparison get Comparison case Node Comparison K CHANGED return tree Delta get Affected Elements path In Delta filter case Node Comparison K ADDED Assume all children have the same user comparison as this node Is this a reasonable assumption if filter include Element comparison get User Comparison return get Added Children filter break case Node Comparison K REMOVED if filter include Element comparison get User Comparison return get Removed Children filter break return new Element Delta 0  ElementDeltas ElementDelta getAffectedChildren IDeltaFilter getComparison NodeComparison K_CHANGED treeDelta getAffectedElements pathInDelta NodeComparison K_ADDED includeElement getUserComparison getAddedChildren NodeComparison K_REMOVED includeElement getUserComparison getRemovedChildren ElementDelta
Returns an integer describing the changes in this element between the old and new trees This integer can be assigned any value by the Element Tree client A comparison value of 0 indicates that there was no change in the data see I Element Comparator public int get Comparison return comparison get User Comparison  ElementTree IElementComparator getComparison getUserComparison
Returns the path of the element described by this delta public I Path get Path return path In Trees  IPath getPath pathInTrees
Returns any elements in the old tree that match the given filter query protected Element Delta get Removed Children I Delta Filter filter I Path children tree Delta get Parent get Children path In Trees Element Delta deltas new Element Delta children length for int i children length i 0 deltas i new Element Delta tree Delta children i path In Delta append children i last Segment comparison return deltas  ElementDelta getRemovedChildren IDeltaFilter IPath treeDelta getParent getChildren pathInTrees ElementDelta ElementDelta ElementDelta treeDelta pathInDelta lastSegment
Returns the element tree delta containing this element delta public Element Tree Delta get Tree Delta return tree Delta  ElementTreeDelta getTreeDelta treeDelta
Return true if there are deltas describing affected children of the receiver including added removed or changed children public boolean has Affected Children I Delta Filter filter int compare comparison get Comparison search delta tree if it s a change if compare Node Comparison K CHANGED return tree Delta has Affected Elements path In Delta filter For added and deleted nodes assume children have same comparison as parent Is this reasonable if filter include Element comparison get User Comparison if compare Node Comparison K ADDED look in new tree return tree Delta get Element Tree get Child Count path In Trees 0 else return tree Delta get Parent get Child Count path In Trees 0 return false  hasAffectedChildren IDeltaFilter getComparison NodeComparison K_CHANGED treeDelta hasAffectedElements pathInDelta includeElement getUserComparison NodeComparison K_ADDED treeDelta getElementTree getChildCount pathInTrees treeDelta getParent getChildCount pathInTrees
Returns a string representation of the receiver Used for debugging purposes only public String to String return Element Delta path In Trees NON NLS 1 NON NLS 2  toString ElementDelta pathInTrees

Creates an code Element Child Subtree code with the given element name and element and child elements organized by type Passing either null or an empty array for child Types indicates no children public Element Subtree String element Name Object element Data Element Subtree children if children null children length 0 children EMPTY ARRAY this element Name element Name this element Data element Data this children children  ElementChildSubtree childTypes ElementSubtree elementName elementData ElementSubtree EMPTY_ARRAY elementName elementName elementData elementData
Creates an code Element Subtree code from a complete element node Element Subtree Data Tree Node child Node Abstract Data Tree Node child Nodes child Node get Children if child Nodes length 0 children EMPTY ARRAY else Element Subtree types new Element Subtree child Nodes length for int i child Nodes length i 0 types i new Element Subtree Data Tree Node child Nodes i children types element Name child Node get Name element Data child Node get Data  ElementSubtree ElementSubtree DataTreeNode childNode AbstractDataTreeNode childNodes childNode getChildren childNodes EMPTY_ARRAY ElementSubtree ElementSubtree childNodes childNodes ElementSubtree DataTreeNode childNodes elementName childNode getName elementData childNode getData
Returns the child subtrees Returns null if there are no children public Element Subtree get Children return children  ElementSubtree getChildren
Returns the element data public Object get Element Data return element Data  getElementData elementData
Returns the element name public String get Element Name return element Name  getElementName elementName
For debugging purposes public String to String return Element Subtree element Name element Data NON NLS 1 NON NLS 2 NON NLS 3  toString ElementSubtree elementName elementData

private class ChildI Ds Cache ChildI Ds Cache I Path path I Path child Paths this path path this child Paths child Paths  ChildIDsCache ChildIDsCache IPath IPath childPaths childPaths childPaths
Creates a new empty element tree public Element Tree initialize new Delta Data Tree  ElementTree DeltaDataTree
Creates a new element tree having as root elements the root elements of the given trees This constructor allows element trees to be built bottom up Note that this is a relatively expensive operation public Element Tree Element Tree children Data Tree Node node node For Element null null children initialize new Delta Data Tree node  ElementTree ElementTree DataTreeNode nodeForElement DeltaDataTree
Creates a new element tree having a single root element with the given name and data public Element Tree String name Object data Data Tree Node node node For Element name data null initialize node  ElementTree DataTreeNode nodeForElement
Creates a new element tree having a root with the given name and element and with the given subtrees as children This constructor allows element trees to be built bottom up Note that this is a relatively expensive operation public Element Tree String name Object data Element Tree children Data Tree Node node node For Element name data children initialize node  ElementTree ElementTree DataTreeNode nodeForElement
Creates an element tree given its internal node representation protected Element Tree Data Tree Node root Node initialize root Node  ElementTree DataTreeNode rootNode rootNode
Creates a new element tree with the given data tree as its representation protected Element Tree Delta Data Tree tree initialize tree  ElementTree DeltaDataTree
Creates an code Element Tree code given an Element Subtree data structure Element Tree Element Subtree subtree Data Tree Node root Node node For null null subtree get Children Delta Data Tree tree new Delta Data Tree root Node initialize tree  ElementTree ElementSubtree ElementTree ElementSubtree DataTreeNode rootNode nodeFor getChildren DeltaDataTree DeltaDataTree rootNode
Creates a new empty delta element tree having the given tree as its parent protected Element Tree Element Tree parent if parent is Immutable parent immutable copy the user data forward I Element Tree Data data parent get Tree Data if data null user Data I Element Tree Data data clone initialize parent tree new Empty Delta Tree  ElementTree ElementTree isImmutable IElementTreeData getTreeData userData IElementTreeData newEmptyDeltaTree
Collapses this tree so that the given ancestor becomes its immediate parent Afterwards this tree will still have exactly the same contents but its internal stucture will be compressed p This operation should be used to collapse chains of element trees created by new Empty Delta immutable p This element tree must be immutable at the start of this operation and will be immutable afterwards return this tree public Element Tree collapse To Element Tree parent Assert is True tree is Immutable if this parent already collapsed return this collapse my tree to be a forward delta of the parent s tree tree collapse To parent tree Default Element Comparator get Comparator return this  newEmptyDelta ElementTree collapseTo ElementTree isTrue isImmutable collapseTo DefaultElementComparator getComparator
Computes a delta between this element tree and the given one using the given comparator to compare elements The result describes the changes applied to the given element tree to yield this one p For each element if it is added or deleted it shows up as such in the delta Otherwise the element in the given tree is compared to the one in this tree using the comparator If it returns non zero the element is included in the delta as a change and the return value of the comparator is remembered in the delta p The result will be created for this tree with its parent set to the given tree The trees need not be related The root element I Ds of both trees must be equal see Element Delta get Comparison public Element Tree Delta compute Delta With Element Tree older Tree I Element Comparator comparator if older Tree null comparator null throw new Illegal Argument Exception Policy bind watson null Arg Element Tree compute Delta With NON NLS 1 NON NLS 2 return new Element Tree Delta older Tree this comparator  IDs ElementDelta getComparison ElementTreeDelta computeDeltaWith ElementTree olderTree IElementComparator olderTree IllegalArgumentException nullArg ElementTree computeDeltaWith ElementTreeDelta olderTree
Computes a delta between this element tree and the given one using the given comparator to compare elements The delta will begin at the given path The result describes the changes applied to the subtree of the given element tree to yield this one p For each element if it is added or deleted it shows up as such in the delta Otherwise the element in the given tree is compared to the one in this tree using the comparator If it returns non zero the element is included in the delta as a change and the return value of the comparator is remembered in the delta p The result will be created for this tree with its parent set to the given tree The trees need not be related The root element I Ds of both trees must be equal see Element Delta get Comparison public Element Tree Delta compute Delta With Element Tree older Tree I Element Comparator comparator I Path path if older Tree null comparator null throw new Illegal Argument Exception Policy bind watson null Arg Element Tree compute Delta With NON NLS 1 NON NLS 2 if path is Root can optimize certain cases when computing deltas on the whole tree return new Element Tree Delta older Tree this comparator else return new Element Tree Delta older Tree this comparator path  IDs ElementDelta getComparison ElementTreeDelta computeDeltaWith ElementTree olderTree IElementComparator IPath olderTree IllegalArgumentException nullArg ElementTree computeDeltaWith isRoot ElementTreeDelta olderTree ElementTreeDelta olderTree
Creates the indicated element and sets its element info The parent element must be present otherwise an Illegal Argument Exception is thrown If the indicated element is already present in the tree its element info is replaced and any existing children are deleted param key element key param data element data or code null code public void create Element I Path key Object data don t allow modification of the implicit root if key is Root return Clear the child I Ds cache in case it s referring to this parent This is conservative childI Ds Cache null I Path parent key remove Last Segments 1 try tree create Child parent key last Segment data catch Object Not Found Exception e element Not Found parent Set the lookup to be this newly created object lookup Cache Data Tree Lookup new Lookup key true data true  IllegalArgumentException createElement IPath isRoot IDs childIDsCache IPath removeLastSegments createChild lastSegment ObjectNotFoundException elementNotFound lookupCache DataTreeLookup newLookup
Creates or replaces the subtree below the given path with the given tree The subtree can only have one child below the root which will become the node specified by the given key in this tree param key The path of the new subtree in this tree see get Subtree I Path public void create Subtree I Path key Element Tree subtree don t allow creating subtrees at the root if key is Root throw new Illegal Argument Exception Policy bind watson no Modify NON NLS 1 Clear the child I Ds cache in case it s referring to this parent This is conservative childI Ds Cache null Clear the lookup cache in case the element being created is the same as for the last lookup lookup Cache null try don t copy the implicit root node of the subtree I Path children subtree get Children subtree get Root if children length 1 throw new Illegal Argument Exception Policy bind watson illegal Subtree NON NLS 1 get the subtree for the specified key Data Tree Node node Data Tree Node subtree tree copy Complete Subtree children 0 insert the subtree in this tree tree create Subtree key node catch Object Not Found Exception e element Not Found key  getSubtree IPath createSubtree IPath ElementTree isRoot IllegalArgumentException noModify IDs childIDsCache lookupCache IPath getChildren getRoot IllegalArgumentException illegalSubtree DataTreeNode DataTreeNode copyCompleteSubtree createSubtree ObjectNotFoundException elementNotFound
Deletes the indicated element and its descendents The element must be present public void delete Element I Path key don t allow modification of the implicit root if key is Root return Clear the child I Ds cache in case it s referring to this parent This is conservative childI Ds Cache null Clear the lookup cache in case the element being deleted is the same as for the last lookup lookup Cache null try tree delete Child key remove Last Segments 1 key last Segment catch Object Not Found Exception e element Not Found key  deleteElement IPath isRoot IDs childIDsCache lookupCache deleteChild removeLastSegments lastSegment ObjectNotFoundException elementNotFound
Returns the delta depth of this element tree A brand new element tree has delta depth 0 code new Empty Delta code on an element tree of delta depth n returns one of depth n 1 p The delta depth of an element tree should be managed If the element tree is allowed to get deep the speed of accesses slows it searches the delta layers sequentially and the memory footprint increases it is still hanging on to all the information in the previous immutable trees public int delta Depth int d 0 for Delta Data Tree t tree t get Parent null t t get Parent d return d  newEmptyDelta deltaDepth DeltaDataTree getParent getParent
Complains that an element was not found protected void element Not Found I Path key throw new Illegal Argument Exception Policy bind watson element Not Found key to String NON NLS 1  elementNotFound IPath IllegalArgumentException elementNotFound toString
Given an array of element trees returns the index of the oldest tree The oldest tree is the tree such that no other tree in the array is a descendent of that tree Note that this counter intuitive concept of oldest is based on the Element Tree orientation such that the complete tree is always the newest tree public static int find Oldest Element Tree trees first put all the trees in a hashtable Hash Map candidates new Hash Map int trees length 1 5 1 for int i 0 i trees length i candidates put trees i trees i keep removing parents until only one tree remains Element Tree oldest So Far null while candidates size 0 get a new candidate Element Tree current Element Tree candidates values iterator next remove this candidate from the table candidates remove current remove all of this element s parents from the list of candidates Element Tree parent current get Parent walk up chain until we hit the root or a tree we have already tested while parent null parent oldest So Far candidates remove parent parent parent get Parent the current candidate is the oldest tree seen so far oldest So Far current if the table is now empty we have a winner Assert is Not Null oldest So Far return the appropriate index for int i 0 i trees length i if trees i oldest So Far return i Assert is True false Should not get here NON NLS 1 return 1  ElementTree findOldest ElementTree HashMap HashMap ElementTree oldestSoFar ElementTree ElementTree ElementTree getParent oldestSoFar getParent oldestSoFar isNotNull oldestSoFar oldestSoFar isTrue
Returns the path of the N th child of the element specified by the given path The given element must be present in this tree and have such a child public I Path get Child I Path key int child Index Assert is Not Null key return get ChildI Ds key child Index  IPath getChild IPath childIndex isNotNull getChildIDs childIndex
Returns the number of children of the element specified by the given path The given element must be present in this tree public int get Child Count I Path key Assert is Not Null key return get ChildI Ds key length  getChildCount IPath isNotNull getChildIDs
Returns the I Ds of the children of the specified element If the specified element is null returns the root element path protected I Path get ChildI Ds I Path key ChildI Ds Cache cache childI Ds Cache Grab it in case it s replaced concurrently if cache null cache path key return cache child Paths try if key null return new I Path tree root Key else I Path children tree get Children key childI Ds Cache new ChildI Ds Cache key children Cache the result return children catch Object Not Found Exception e element Not Found key return null can t get here  IDs IPath getChildIDs IPath ChildIDsCache childIDsCache childPaths IPath rootKey IPath getChildren childIDsCache ChildIDsCache ObjectNotFoundException elementNotFound
Returns the paths of the children of the element specified by the given path The given element must be present in this tree public I Path get Children I Path key Assert is Not Null key return get ChildI Ds key  IPath getChildren IPath isNotNull getChildIDs
Returns the internal data tree public Delta Data Tree get Data Tree return tree  DeltaDataTree getDataTree
Returns the delta representation for this tree Returns code null code if this tree does not have a delta representation public Element Tree Delta get Delta Element Tree parent get Parent if parent null return null return new Element Tree Delta parent this Default Element Comparator get Comparator  ElementTreeDelta getDelta ElementTree getParent ElementTreeDelta DefaultElementComparator getComparator
Returns the element data for the given element identifier The given element must be present in this tree public Object get Element Data I Path key don t allow modification of the implicit root if key is Root return null Data Tree Lookup lookup lookup Cache Grab it in case it s replaced concurrently if lookup null lookup key key lookup Cache lookup tree lookup key if lookup is Present return lookup data else element Not Found key return null can t get here  getElementData IPath isRoot DataTreeLookup lookupCache lookupCache isPresent elementNotFound
Returns the entire tree structure as an Element Subtree see Element Subtree package Element Subtree get Element Subtree Data Tree Node element Node Data Tree Node tree copy Complete Subtree tree root Key return new Element Subtree element Node  ElementSubtree ElementSubtree ElementSubtree getElementSubtree DataTreeNode elementNode DataTreeNode copyCompleteSubtree rootKey ElementSubtree elementNode
Returns the names of the children of the specified element The specified element must exist in the tree If the specified element is null returns the root element path public String get Names Of Children I Path key try if key null return new String NON NLS 1 else return tree get Names Of Children key catch Object Not Found Exception e element Not Found key return null can t get here  getNamesOfChildren IPath getNamesOfChildren ObjectNotFoundException elementNotFound
Returns the parent tree or code null code if there is no parent public Element Tree get Parent Delta Data Tree parent Tree tree get Parent if parent Tree null return null The parent Element Tree is stored as the node data of the parent Delta Data Tree to simplify canonicalization in the presence of rerooting return Element Tree parent Tree get Data tree root Key  ElementTree getParent DeltaDataTree parentTree getParent parentTree ElementTree DeltaDataTree ElementTree parentTree getData rootKey
Returns the root node of this tree public I Path get Root return get ChildI Ds null 0  IPath getRoot getChildIDs
Returns the subtree rooted at the given key In the resulting tree the implicit root node designated by Path ROOT has a single child which is the node specified by the given key in this tree The subtree must be present in this tree see create Subtree I Path Element Tree public Element Tree get Subtree I Path key the subtree of the root of this tree is just this tree if key is Root return this try Data Tree Node element Node Data Tree Node tree copy Complete Subtree key return new Element Tree element Node catch Object Not Found Exception e element Not Found key return null  createSubtree IPath ElementTree ElementTree getSubtree IPath isRoot DataTreeNode elementNode DataTreeNode copyCompleteSubtree ElementTree elementNode ObjectNotFoundException elementNotFound
Returns the user data associated with this tree public I Element Tree Data get Tree Data return user Data  IElementTreeData getTreeData userData
Returns whether this tree has the given tree as a direct or indirect ancestor Returns false if they are the same tree public boolean has Ancestor Element Tree old Tree if this old Tree return false If this tree has been closed the ancestor chain is flipped if this tree is Immutable for Element Tree tree old Tree get Parent tree null tree tree get Parent if tree this return true else for Element Tree tree this get Parent tree null tree tree get Parent if tree old Tree return true return false  hasAncestor ElementTree oldTree oldTree isImmutable ElementTree oldTree getParent getParent ElementTree getParent getParent oldTree
Returns true if there have been changes in the tree between the two given layers The two must be related and new must be newer than old That is new must be an ancestor of old public static boolean has Changes Element Tree new Layer Element Tree old Layer I Element Comparator comparator boolean inclusive if any of the layers are null assume that things have changed if new Layer null old Layer null return true if new Layer old Layer return false if the tree data has changed then the tree has changed if comparator compare new Layer get Tree Data old Layer get Tree Data I Element Comparator K NO CHANGE return true The tree structure has the top layer s i e tree parentage pointing down to a complete layer whose parent is null The bottom layers i e operation Tree point up to the common complete layer whose parent is null The complete layer moves up as changes happen To see if any changes have happened we should consider only layers whose parent is not null That is skip the complete layer as it will clearly not be empty look down from the current layer always inclusive if the top layer is mutable Element Tree stop Layer null if new Layer is Immutable if the new Layer is immutable the tree structure all points up so ensure that when searching up we stop at new Layer inclusive stop Layer new Layer get Parent else Element Tree layer new Layer while layer null layer get Parent null if layer get Data Tree is Empty Delta return true layer layer get Parent look up from the layer at which we started to null or new Layer s parent variably inclusive depending on whether new Layer is mutable Element Tree layer inclusive old Layer old Layer get Parent while layer null layer get Parent stop Layer if layer get Data Tree is Empty Delta return true layer layer get Parent didn t find anything that changed return false  hasChanges ElementTree newLayer ElementTree oldLayer IElementComparator newLayer oldLayer newLayer oldLayer newLayer getTreeData oldLayer getTreeData IElementComparator K_NO_CHANGE operationTree ElementTree stopLayer newLayer isImmutable newLayer newLayer stopLayer newLayer getParent ElementTree newLayer getParent getDataTree isEmptyDelta getParent newLayer newLayer ElementTree oldLayer oldLayer getParent getParent stopLayer getDataTree isEmptyDelta getParent
Makes this tree immutable read only ignored if it is already immutable public void immutable if tree is Immutable tree immutable need to clear the lookup cache since it reports whether results were found in the topmost delta and the order of deltas is changing lookup Cache null reroot the delta chain at this tree tree reroot  isImmutable lookupCache
Returns true if this element tree includes an element with the given key false otherwise public boolean includes I Path key Data Tree Lookup lookup lookup Cache Grab it in case it s replaced concurrently if lookup null lookup key key lookup Cache lookup tree lookup key return lookup is Present  IPath DataTreeLookup lookupCache lookupCache isPresent
Returns true if this element tree includes an element with the given key ignoring the case of the key and false otherwise public boolean includes Ignore Case I Path key don t use cache because it s a different kind of lookup return tree lookup Ignore Case key is Present  includesIgnoreCase IPath lookupIgnoreCase isPresent
protected void initialize Data Tree Node root Node create the implicit root node initialize new Delta Data Tree new Data Tree Node null null new Abstract Data Tree Node root Node  DataTreeNode rootNode DeltaDataTree DataTreeNode AbstractDataTreeNode rootNode
protected void initialize Delta Data Tree tree Keep this element tree as the data of the root node Useful for canonical results for Element Tree get Parent see get Parent tree Stamp tree Counter tree set Data tree root Key this this tree tree  DeltaDataTree ElementTree getParent getParent treeStamp treeCounter setData rootKey
Returns whether this tree is immutable public boolean is Immutable return tree is Immutable  isImmutable isImmutable
Converts this tree s representation to be a complete tree not a delta This disconnects this tree from its parents The parent trees are unaffected public void make Complete need to clear the lookup cache since it reports whether results were found in the topmost delta and the order of deltas is changing lookup Cache null tree make Complete  makeComplete lookupCache makeComplete
Merges a chain of deltas for a certain subtree to this tree If this tree has any data in the specified subtree it will be overwritten The receiver tree must be open and it will be made immutable during the merge operation The trees in the provided array will be replaced by new trees that have been merged into the receiver s delta chain param path The path of the subtree chain to merge param trees The chain of trees to merge The trees can be in any order but they must all form a simple ancestral chain return A new open tree with the delta chain merged in public Element Tree merge Delta Chain I Path path Element Tree trees if path null trees null throw new Illegal Argument Exception Policy bind watson null Arg Element Tree merge Delta Chain NON NLS 1 NON NLS 2 The tree has to be open if is Immutable throw new Illegal Argument Exception Policy bind watson immutable NON NLS 1 Element Tree current this if trees length 0 find the oldest tree to be merged Element Tree to Merge trees find Oldest trees merge the trees from oldest to newest while to Merge null if path is Root copy all the children I Path children to Merge get Children Path ROOT for int i 0 i children length i current create Subtree children i to Merge get Subtree children i else just copy the specified node current create Subtree path to Merge get Subtree path current immutable replace the tree in the array we have to go through all trees because there may be duplicates for int i 0 i trees length i if trees i to Merge trees i current current current new Empty Delta to Merge to Merge get Parent return current  ElementTree mergeDeltaChain IPath ElementTree IllegalArgumentException nullArg ElementTree mergeDeltaChain isImmutable IllegalArgumentException ElementTree ElementTree toMerge findOldest toMerge isRoot IPath toMerge getChildren createSubtree toMerge getSubtree createSubtree toMerge getSubtree toMerge newEmptyDelta toMerge toMerge getParent
Creates a new element tree which is represented as a delta on this one Initially they have the same content Subsequent changes to the new tree will not affect this one public Element Tree new Empty Delta lookup Cache null Don t want old trees hanging onto cached infos return new Element Tree this  ElementTree newEmptyDelta lookupCache ElementTree
Computes the node for an element given its element name element info and a list of Element Type Subtrees private Data Tree Node node For String element Name Object element Info Element Subtree subtrees if subtrees null subtrees length 0 return new Data Tree Node element Name element Info Data Tree Node child Nodes new Data Tree Node subtrees length for int i subtrees length i 0 child Nodes i node For subtrees i Abstract Data Tree Node sort child Nodes return new Data Tree Node element Name element Info child Nodes  ElementTypeSubtrees DataTreeNode nodeFor elementName elementInfo ElementSubtree DataTreeNode elementName elementInfo DataTreeNode childNodes DataTreeNode childNodes nodeFor AbstractDataTreeNode childNodes DataTreeNode elementName elementInfo childNodes
private Data Tree Node node For Element Subtree subtree return node For subtree element Name subtree element Data subtree get Children  DataTreeNode nodeFor ElementSubtree nodeFor elementName elementData getChildren
Returns the node hierarchy corresponding to the given element and any children optional protected Data Tree Node node For Element String element Name Object element Element Tree children if children is null or empty there is nothing to do here if children null children length 0 return new Data Tree Node element Name element null Each of the given child trees has an implicit root node specified by Path ROOT What we are really interested in are the children of these roots find out the number of real children int child Count 0 for int i 0 i children length i child Count children i get Child Count children i get Root if there is no child just go on if child Count 0 return new Data Tree Node element Name element null grab children of roots to create child array Abstract Data Tree Node child Nodes new Abstract Data Tree Node child Count int next 0 for int i 0 i children length i I Path root Children children i get Children children i get Root for int j 0 j root Children length j child Nodes next children i tree copy Complete Subtree root Children j Assert is True next child Count return new Data Tree Node element Name element child Nodes  DataTreeNode nodeForElement elementName ElementTree DataTreeNode elementName childCount childCount getChildCount getRoot childCount DataTreeNode elementName AbstractDataTreeNode childNodes AbstractDataTreeNode childCount IPath rootChildren getChildren getRoot rootChildren childNodes copyCompleteSubtree rootChildren isTrue childCount DataTreeNode elementName childNodes
Returns a mutable copy of the element data for the given path This copy will be held onto in the most recent delta Element Tree data MUST implement the I Element Tree Data interface for this method to work If the data does not define that interface this method will fail public Object open Element Data I Path key Assert is True is Immutable don t allow modification of the implicit root if key is Root return null Data Tree Lookup lookup lookup Cache Grab it in case it s replaced concurrently if lookup null lookup key key lookup Cache lookup tree lookup key if lookup is Present if lookup found In First Delta return lookup data The node has no data in the most recent delta Pull it up to the present delta by setting its data with a clone I Element Tree Data old Data I Element Tree Data lookup data if old Data null try Object new Data old Data clone tree set Data key new Data lookup Cache null return new Data catch Object Not Found Exception e element Not Found key else element Not Found key return null  ElementTree IElementTreeData openElementData IPath isTrue isImmutable isRoot DataTreeLookup lookupCache lookupCache isPresent foundInFirstDelta IElementTreeData oldData IElementTreeData oldData newData oldData setData newData lookupCache newData ObjectNotFoundException elementNotFound elementNotFound
Sets the element for the given element identifier The given element must be present in this tree param key element identifier param data element info or code null code public void set Element Data I Path key Object data don t allow modification of the implicit root if key is Root return Assert is Not Null key Clear the lookup cache in case the element being modified is the same as for the last lookup lookup Cache null try tree set Data key data catch Object Not Found Exception e element Not Found key  setElementData IPath isRoot isNotNull lookupCache setData ObjectNotFoundException elementNotFound
Sets the user data associated with this tree public void set Tree Data I Element Tree Data data user Data data  setTreeData IElementTreeData userData
final String Buffer buffer new String Buffer n NON NLS 1 I Element Content Visitor visitor new I Element Content Visitor public boolean visit Element Element Tree tree I Path Requestor elementID Object element Contents buffer append elementID request Path element Contents n NON NLS 1 NON NLS 2 return true  StringBuffer StringBuffer IElementContentVisitor IElementContentVisitor visitElement ElementTree IPathRequestor elementContents requestPath elementContents
Returns a string representation of this element tree s structure suitable for debug puposes public String to Debug String final String Buffer buffer new String Buffer n NON NLS 1 I Element Content Visitor visitor new I Element Content Visitor public boolean visit Element Element Tree tree I Path Requestor elementID Object element Contents buffer append elementID request Path element Contents n NON NLS 1 NON NLS 2 return true new Element Tree Iterator this Path ROOT iterate visitor return buffer to String  toDebugString StringBuffer StringBuffer IElementContentVisitor IElementContentVisitor visitElement ElementTree IPathRequestor elementContents requestPath elementContents ElementTreeIterator toString
public String to String return Element Tree tree Stamp NON NLS 1 NON NLS 2  toString ElementTree treeStamp

Creates a delta describing the changes between the two given trees Element Tree Delta Element Tree parent Element Tree element Tree I Element Comparator comparator initialize parent element Tree comparator delta Tree element Tree get Data Tree compare With parent get Data Tree comparator as Reverse Comparison Tree comparator root Path Path ROOT  ElementTreeDelta ElementTree ElementTree elementTree IElementComparator elementTree deltaTree elementTree getDataTree compareWith getDataTree asReverseComparisonTree rootPath
Creates a delta describing the changes between the two given trees starting at the given path Element Tree Delta Element Tree parent Element Tree element Tree I Element Comparator comparator I Path path initialize parent element Tree comparator delta Tree parent get Data Tree compare With element Tree get Data Tree comparator path root Path path  ElementTreeDelta ElementTree ElementTree elementTree IElementComparator IPath elementTree deltaTree getDataTree compareWith elementTree getDataTree rootPath
Destroys this delta and drops references to all trees deltas referenced herein public void destroy comparator null delta Tree null element Tree null parent null root Path null  deltaTree elementTree rootPath
Returns deltas describing the children of the specified element that match the given filter query Must be called only when parentID represents a changed element not an added or removed element protected Element Delta get Affected Elements I Path parentID I Delta Filter filter I Path parent Key if parentID null parent Key delta Tree root Key else parent Key parentID Vector v new Vector I Path child Keys delta Tree get Children parent Key for int i 0 i child Keys length i I Path key child Keys i return delta info based on user comparison Node Comparison node Comparison Node Comparison delta Tree get Data key int user Comparison node Comparison get User Comparison if filter include Element user Comparison v add Element new Element Delta this root Path append key key node Comparison Element Delta result new Element Delta v size v copy Into result return result  ElementDelta getAffectedElements IPath IDeltaFilter IPath parentKey parentKey deltaTree rootKey parentKey IPath childKeys deltaTree getChildren parentKey childKeys IPath childKeys NodeComparison nodeComparison NodeComparison deltaTree getData userComparison nodeComparison getUserComparison includeElement userComparison addElement ElementDelta rootPath nodeComparison ElementDelta ElementDelta copyInto
Returns the delta tree package Delta Data Tree get Delta Tree return delta Tree  DeltaDataTree getDeltaTree deltaTree
Returns the delta for the specified element or null if the element is not affected in this delta public Element Delta get Element Delta I Path key if key null throw new Illegal Argument Exception try Node Comparison node Comparison Node Comparison delta Tree get Data key return new Element Delta this root Path append key key node Comparison catch Object Not Found Exception e return null  ElementDelta getElementDelta IPath IllegalArgumentException NodeComparison nodeComparison NodeComparison deltaTree getData ElementDelta rootPath nodeComparison ObjectNotFoundException
Returns the element tree which this delta describes when its changes are applied to the parent tree It is also referred to as the new tree public Element Tree get Element Tree return element Tree  ElementTree getElementTree elementTree
Returns the element tree that this delta is based on It is also referred to as the old tree public Element Tree get Parent return parent  ElementTree getParent
Return true if there are deltas describing affected children of the specified element Must be called only when parentID represents a changed element not an added or removed element protected boolean has Affected Elements I Path parentID I Delta Filter filter I Path parent Key parentID null delta Tree root Key parentID I Path child Keys delta Tree get Children parent Key for int i 0 i child Keys length i Node Comparison node Comparison Node Comparison delta Tree get Data child Keys i if filter include Element node Comparison get User Comparison return true return false  hasAffectedElements IPath IDeltaFilter IPath parentKey deltaTree rootKey IPath childKeys deltaTree getChildren parentKey childKeys NodeComparison nodeComparison NodeComparison deltaTree getData childKeys includeElement nodeComparison getUserComparison
Initializes the tree delta private void initialize Element Tree parent Element Tree element Tree I Element Comparator comparator parent immutable element Tree immutable this parent parent this element Tree element Tree this comparator comparator  ElementTree ElementTree elementTree IElementComparator elementTree elementTree elementTree

Creates a new element tree iterator for visiting the given tree starting at the given path public Element Tree Iterator Element Tree tree I Path path this tree tree this path path tree Root can be null if deleted concurrently tree Root Data Tree Node tree get Data Tree safe Copy Complete Subtree path  ElementTreeIterator ElementTree IPath treeRoot treeRoot DataTreeNode getDataTree safeCopyCompleteSubtree
Iterates through the given element tree and visit each element node passing in the element s ID and element object private void do Iteration Data Tree Node node I Element Content Visitor visitor push the name of this node to the requestor stack if next Free Segment segments length grow segments next Free Segment node get Name do the visit if visitor visit Element tree this node get Data recurse Abstract Data Tree Node children node get Children for int i children length i 0 do Iteration Data Tree Node children i visitor pop the segment from the requestor stack next Free Segment if next Free Segment 0 next Free Segment 0  doIteration DataTreeNode IElementContentVisitor nextFreeSegment nextFreeSegment getName visitElement getData AbstractDataTreeNode getChildren doIteration DataTreeNode nextFreeSegment nextFreeSegment nextFreeSegment
Method grow private void grow grow the segments array int old Len segments length String new Paths new String old Len 2 System arraycopy segments 0 new Paths 0 old Len segments new Paths  oldLen newPaths oldLen newPaths oldLen newPaths
Iterates through this iterator s tree and visits each element in the subtree rooted at the given path The visitor is passed each element s data and a request callback for obtaining the path public void iterate I Element Content Visitor visitor if path is Root special visit for root element to use special tree Data if visitor visit Element tree this tree get Tree Data if tree Root null return Abstract Data Tree Node children tree Root get Children for int i children length i 0 do Iteration Data Tree Node children i visitor else if tree Root null return push path path segment Count 1 do Iteration tree Root visitor  IElementContentVisitor isRoot treeData visitElement getTreeData treeRoot AbstractDataTreeNode treeRoot getChildren doIteration DataTreeNode treeRoot segmentCount doIteration treeRoot
Push the first to Push segments of this path private void push I Path path int to Push if to Push 0 return for int i 0 i to Push i if next Free Segment segments length grow segments next Free Segment path segment i  toPush IPath toPush toPush toPush nextFreeSegment nextFreeSegment
public String request Name if next Free Segment 0 return NON NLS 1 return segments next Free Segment 1  requestName nextFreeSegment nextFreeSegment
public I Path request Path if next Free Segment 0 return Path ROOT int length next Free Segment for int i 0 i next Free Segment i length segments i length String Buffer path Buf new String Buffer length for int i 0 i next Free Segment i path Buf append path Buf append segments i return new Path null path Buf to String  IPath requestPath nextFreeSegment nextFreeSegment nextFreeSegment StringBuffer pathBuf StringBuffer nextFreeSegment pathBuf pathBuf pathBuf toString

wrap the I Element Info Flattener in an I Data Flattener I Data Flattener f new I Data Flattener public void write Data I Path path Object data Data Output output  IElementInfoFlattener IDataFlattener IDataFlattener IDataFlattener writeData IPath DataOutput
public Object read Data I Path path Data Input input throws IO Exception never read the root node of an Element Tree this node is reserved for the parent backpointer if Path ROOT equals path return factory read Element path input else return null  readData IPath DataInput IOException ElementTree readElement
Constructs a new element tree reader that works for the given element info flattener public Element Tree Reader final I Element Info Flattener factory Assert is Not Null factory element Info Flattener factory wrap the I Element Info Flattener in an I Data Flattener I Data Flattener f new I Data Flattener public void write Data I Path path Object data Data Output output public Object read Data I Path path Data Input input throws IO Exception never read the root node of an Element Tree this node is reserved for the parent backpointer if Path ROOT equals path return factory read Element path input else return null data Tree Reader new Data Tree Reader f  ElementTreeReader IElementInfoFlattener isNotNull elementInfoFlattener IElementInfoFlattener IDataFlattener IDataFlattener IDataFlattener writeData IPath DataOutput readData IPath DataInput IOException ElementTree readElement dataTreeReader DataTreeReader
Returns the appropriate reader for the given version public Element Tree Reader get Reader int format Version throws IO Exception switch format Version case 1 return new ElementTreeReaderImpl 1 element Info Flattener default throw new IO Exception Policy bind watson unknown NON NLS 1  ElementTreeReader getReader formatVersion IOException formatVersion ElementTreeReaderImpl_1 elementInfoFlattener IOException
Reads an element tree delta from the input stream and reconstructs it as a delta on the given tree public Element Tree read Delta Element Tree complete Tree Data Input input throws IO Exception Dispatch to the appropriate reader Element Tree Reader real Reader get Reader read Number input return real Reader read Delta complete Tree input  ElementTree readDelta ElementTree completeTree DataInput IOException ElementTreeReader realReader getReader readNumber realReader readDelta completeTree
Reads a chain of Element Trees from the given input stream return A chain of Element Trees where the first tree in the list is complete and all other trees are deltas on the previous tree in the list public Element Tree read Delta Chain Data Input input throws IO Exception Dispatch to the appropriate reader Element Tree Reader real Reader get Reader read Number input return real Reader read Delta Chain input  ElementTrees ElementTrees ElementTree readDeltaChain DataInput IOException ElementTreeReader realReader getReader readNumber realReader readDeltaChain
Reads an integer stored in compact format Numbers between 0 and 254 inclusive occupy 1 byte other numbers occupy 5 bytes the first byte being 0xff and the next 4 bytes being the standard representation of an int protected static int read Number Data Input input throws IO Exception byte b input read Byte int number b 0xff not a no op converts unsigned byte to int if number 0xff magic escape value number input read Int return number  readNumber DataInput IOException readByte readInt
Reads an element tree from the input stream and returns it This method actually just dispatches to the appropriate reader depending on the stream version id public Element Tree read Tree Data Input input throws IO Exception Dispatch to the appropriate reader Element Tree Reader real Reader get Reader read Number input return real Reader read Tree input  ElementTree readTree DataInput IOException ElementTreeReader realReader getReader readNumber realReader readTree

Constructs a new element tree reader that works for the given element info factory ElementTreeReaderImpl 1 I Element Info Flattener factory super factory  ElementTreeReaderImpl_1 IElementInfoFlattener
Reads an element tree delta from the input stream and reconstructs it as a delta on the given tree public Element Tree read Delta Element Tree parent Tree Data Input input throws IO Exception Delta Data Tree complete parent Tree get Data Tree Delta Data Tree delta data Tree Reader read Tree complete input if the delta is empty just return the parent if delta is Empty Delta return parent Tree Element Tree tree new Element Tree delta copy the user data forward I Element Tree Data data parent Tree get Tree Data if data null tree set Tree Data I Element Tree Data data clone make the underlying data tree immutable can t call immutable on the Element Tree because this would attempt to reroot delta immutable return tree  ElementTree readDelta ElementTree parentTree DataInput IOException DeltaDataTree parentTree getDataTree DeltaDataTree dataTreeReader readTree isEmptyDelta parentTree ElementTree ElementTree IElementTreeData parentTree getTreeData setTreeData IElementTreeData ElementTree
Reads a chain of Element Trees from the given input stream return A chain of Element Trees where the first tree in the list is complete and all other trees are deltas on the previous tree in the list public Element Tree read Delta Chain Data Input input throws IO Exception read the number of trees int tree Count read Number input Element Tree results new Element Tree tree Count if tree Count 0 return results read the sort order int order new int tree Count for int i 0 i tree Count i order i read Number input read the complete tree results order 0 super read Tree input reconstitute each of the remaining trees from their written deltas for int i 1 i tree Count i results order i super read Delta results order i 1 input return results  ElementTrees ElementTrees ElementTree readDeltaChain DataInput IOException treeCount readNumber ElementTree ElementTree treeCount treeCount treeCount treeCount readNumber readTree treeCount readDelta
Part of code Element Tree Reader code interface see Element Tree Reader public Element Tree read Tree Data Input input throws IO Exception The format version number has already been consumed by Element Tree Reader read From Element Tree result new Element Tree data Tree Reader read Tree null input return result  ElementTreeReader ElementTreeReader ElementTree readTree DataInput IOException ElementTreeReader readFrom ElementTree ElementTree dataTreeReader readTree

I Data Flattener f new I Data Flattener public void write Data I Path path Object data Data Output output throws IO Exception never write the root node of an Element Tree because it contains the parent backpointer if Path ROOT equals path flattener write Element path data output  IDataFlattener IDataFlattener writeData IPath DataOutput IOException ElementTree writeElement
public Object read Data I Path path Data Input input return null  readData IPath DataInput
Constructs a new element tree writer that works for the given element info flattener public Element Tree Writer final I Element Info Flattener flattener wrap the I Element Info Flattener in an I Data Flattener I Data Flattener f new I Data Flattener public void write Data I Path path Object data Data Output output throws IO Exception never write the root node of an Element Tree because it contains the parent backpointer if Path ROOT equals path flattener write Element path data output public Object read Data I Path path Data Input input return null data Tree Writer new Data Tree Writer f  ElementTreeWriter IElementInfoFlattener IElementInfoFlattener IDataFlattener IDataFlattener IDataFlattener writeData IPath DataOutput IOException ElementTree writeElement readData IPath DataInput dataTreeWriter DataTreeWriter
Sorts the given array of trees so that the following rules are true The first tree has no parent No tree has an ancestor with a greater index in the array If there are no missing parents in the given trees array this means that in the resulting array the i th tree s parent will be tree i 1 The input tree array may contain duplicate trees The sort order is written to the given output stream protected Element Tree sort Trees Element Tree trees Data Output output throws IO Exception the sorted list int num Trees trees length Element Tree sorted new Element Tree num Trees int order new int num Trees first build a table of Element Tree Vector of Integers indices in trees array Hash Map table new Hash Map num Trees 2 1 for int i 0 i trees length i List indices List table get trees i if indices null indices new Array List table put trees i indices indices add new Integer i find the oldest tree a descendent of all other trees Element Tree oldest trees Element Tree find Oldest trees Walk through the chain of trees from oldest to newest adding them to the sorted list as we go int i num Trees 1 while i 0 add all instances of the current oldest tree to the sorted list List indices List table remove oldest for Enumeration e Collections enumeration indices e has More Elements Integer next Integer e next Element sorted i oldest order i next int Value i if i 0 find the next tree in the list Element Tree parent oldest get Parent while table get parent null parent parent get Parent oldest parent write the order array for i 0 i num Trees i write Number order i output return sorted  ElementTree sortTrees ElementTree DataOutput IOException numTrees ElementTree ElementTree numTrees numTrees ElementTree HashMap HashMap numTrees ArrayList ElementTree ElementTree findOldest numTrees hasMoreElements nextElement intValue ElementTree getParent getParent numTrees writeNumber
Writes the delta describing the changes that have to be made to newer Tree to obtain older Tree param path The path of the subtree to write All nodes on the path above the subtree are represented as empty nodes param depth The depth of the subtree to write A depth of zero writes a single node and a depth of D INFINITE writes the whole subtree param output The stream to write the subtree to public void write Delta Element Tree older Tree Element Tree newer Tree I Path path int depth final Data Output output I Element Comparator comparator throws IO Exception write the version number write Number CURRENT FORMAT output Note that in current Element Tree usage the newest tree is the complete tree and older trees are just deltas on the new tree Delta Data Tree complete Tree newer Tree get Data Tree Delta Data Tree derived Tree older Tree get Data Tree Delta Data Tree delta To Write null delta To Write complete Tree forward Delta With derived Tree comparator Assert is True delta To Write is Immutable data Tree Writer write Tree delta To Write path depth output  newerTree olderTree D_INFINITE writeDelta ElementTree olderTree ElementTree newerTree IPath DataOutput IElementComparator IOException writeNumber CURRENT_FORMAT ElementTree DeltaDataTree completeTree newerTree getDataTree DeltaDataTree derivedTree olderTree getDataTree DeltaDataTree deltaToWrite deltaToWrite completeTree forwardDeltaWith derivedTree isTrue deltaToWrite isImmutable dataTreeWriter writeTree deltaToWrite
Writes an array of Element Trees to the given output stream param trees A chain of Element Trees where on tree in the list is complete and all other trees are deltas on the previous tree in the list param path The path of the subtree to write All nodes on the path above the subtree are represented as empty nodes param depth The depth of the subtree to write A depth of zero writes a single node and a depth of D INFINITE writes the whole subtree param output The stream to write the subtree to public void write Delta Chain Element Tree trees I Path path int depth Data Output output I Element Comparator comparator throws IO Exception Write the format version number write Number CURRENT FORMAT output Write the number of trees int tree Count trees length write Number tree Count output if tree Count 0 return Sort the trees in ancestral order which writes the tree order to the output Element Tree sorted Trees sort Trees trees output Write the complete tree write Tree sorted Trees 0 path depth output Write the deltas for each of the remaining trees for int i 1 i tree Count i write Delta sorted Trees i sorted Trees i 1 path depth output comparator  ElementTrees ElementTrees D_INFINITE writeDeltaChain ElementTree IPath DataOutput IElementComparator IOException writeNumber CURRENT_FORMAT treeCount writeNumber treeCount treeCount ElementTree sortedTrees sortTrees writeTree sortedTrees treeCount writeDelta sortedTrees sortedTrees
Writes an integer in a compact format biased towards small non negative numbers Numbers between 0 and 254 inclusive occupy 1 byte other numbers occupy 5 bytes protected void write Number int number Data Output output throws IO Exception if number 0 number 0xff output write Byte number else output write Byte 0xff output write Int number  writeNumber DataOutput IOException writeByte writeByte writeInt
Writes all or some of an element tree to an output stream This always writes the most current version of the element tree file format whereas the reader supports multiple versions param tree The tree to write param path The path of the subtree to write All nodes on the path above the subtree are represented as empty nodes param depth The depth of the subtree to write A depth of zero writes a single node and a depth of D INFINITE writes the whole subtree param output The stream to write the subtree to public void write Tree Element Tree tree I Path path int depth final Data Output output throws IO Exception Write the format version number write Number CURRENT FORMAT output This actually just copies the root node which is what we want Delta Data Tree subtree new Delta Data Tree tree get Data Tree copy Complete Subtree Path ROOT data Tree Writer write Tree subtree path depth output  D_INFINITE writeTree ElementTree IPath DataOutput IOException writeNumber CURRENT_FORMAT DeltaDataTree DeltaDataTree getDataTree copyCompleteSubtree dataTreeWriter writeTree

public interface I Delta Filter Returns true if the delta element with the given flag should be included in the response to an Element Tree Delta query and false otherwise The flag is the integer set by the I Element Comparator see org eclipse core internal dtree I Comparator compare Object Object  IDeltaFilter ElementTreeDelta IElementComparator IComparator

public interface I Delta Visitor Visits an element in an element tree delta Returns true if the element s children should be visited and false otherwise The return value only has signifance for a pre order traversal param tree The Element tree delta being visited param path The path of the current element param old Data The element s data in the old tree param new Data The element s data in the new tree param comparison The comparison value between the old and new tree  IDeltaVisitor oldData newData

public interface I Element Content Visitor Visits a node element p Note that code element Contents code is equal to code tree get Element element Path code but takes no time param tree the element tree being visited param element Contents the object at the node being visited on this call param requestor callback object for requesting the path of the object being visited return true if this element s children should be visited and false otherwise  IElementContentVisitor elementContents getElement elementPath elementContents

public interface I Element Info Flattener Reads an element info from the given input stream param element Path the path of the element to be read param input the stream from which the element info should be read return the object associated with the given element Path which may be code null code  IElementInfoFlattener elementPath elementPath
Writes the given element to the output stream p N B The bytes written must be sufficient for the purposes of reading the object back in param element Path the element s path in the tree param element the object associated with the given path which may be code null code  elementPath

public interface I Element Tree Data extends Cloneable Element Tree Data must define a publicly accessible clone method This method can simply invoke Object s clone method  IElementTreeData ElementTreeData

public interface I Path Requestor public I Path request Path  IPathRequestor IPath requestPath
public I Path request Path public String request Name  IPath requestPath requestName

private boolean splash Down false private final Runnable end Splash Handler new Runnable public void run take Down Splash  splashDown endSplashHandler takeDownSplash
Executes the launch return the result of performing the launch param args command line arguments exception Exception thrown if a problem occurs during the launch protected Object basic Run String args throws Exception System get Properties set Property eclipse start Time Long to String System current Time Millis NON NLS 1 commands args String pass Thru Args process Command Line args setupVM Properties process Configuration need to ensure that get Install Location is called at least once to initialize the value Do this AFTER processing the configuration to allow the configuration to set the install location get Install Location locate boot plugin may return dev mode variations URL boot Path get Boot Path boot Location splash handling is done here because the default case needs to know the location of the boot plugin we are going to use handle Splash boot Path load the Boot Loader and startup the platform URL Class Loader loader new URL Class Loader boot Path null Class clazz loader load Class STARTER Method method clazz get Declared Method run new Class String class Runnable class NON NLS 1 try return method invoke clazz new Object pass Thru Args end Splash Handler catch Invocation Target Exception e if e get Target Exception instanceof Error throw Error e get Target Exception else if e get Target Exception instanceof Exception throw Exception e get Target Exception else could be a subclass of Throwable throw e  basicRun getProperties setProperty startTime toString currentTimeMillis passThruArgs processCommandLine setupVMProperties processConfiguration getInstallLocation getInstallLocation bootPath getBootPath bootLocation handleSplash bootPath BootLoader URLClassLoader URLClassLoader bootPath loadClass getDeclaredMethod passThruArgs endSplashHandler InvocationTargetException getTargetException getTargetException getTargetException getTargetException
Returns a string representation of the given URL String This converts escaped sequences in the URL into the appropriate characters NOTE due to class visibility there is a copy of this method in Internal Boot Loader private String decode String url String try to use Java 1 4 method if available try Class clazz URL Decoder class Method method clazz get Declared Method decode new Class String class String class NON NLS 1 first encode characters because URL Decoder incorrectly converts them to spaces on certain class library implementations if url String index Of 0 int len url String length String Buffer buf new String Buffer len for int i 0 i len i char c url String char At i if c buf append 2B NON NLS 1 else buf append c url String buf to String Object result method invoke null new Object url String UTF 8 NON NLS 1 if result null return String result catch Exception e JDK 1 4 method not found fall through and decode by hand decode URL by hand boolean replaced false byte encoded Bytes url String get Bytes int encoded Length encoded Bytes length byte decoded Bytes new byte encoded Length int decoded Length 0 for int i 0 i encoded Length i byte b encoded Bytes i if b byte enc1 encoded Bytes i byte enc2 encoded Bytes i b byte hex To Byte enc1 4 hex To Byte enc2 replaced true decoded Bytes decoded Length b if replaced return url String try return new String decoded Bytes 0 decoded Length UTF 8 NON NLS 1 catch Unsupported Encoding Exception e use default encoding return new String decoded Bytes 0 decoded Length  InternalBootLoader urlString URLDecoder getDeclaredMethod URLDecoder urlString indexOf urlString StringBuffer StringBuffer urlString charAt urlString toString urlString encodedBytes urlString getBytes encodedLength encodedBytes decodedBytes encodedLength decodedLength encodedLength encodedBytes encodedBytes encodedBytes hexToByte hexToByte decodedBytes decodedLength urlString decodedBytes decodedLength UnsupportedEncodingException decodedBytes decodedLength
Returns the result of converting a list of comma separated tokens into an array return the array of string tokens param prop the initial comma separated string private String get Array From List String prop if prop null prop trim equals NON NLS 1 return new String 0 Vector list new Vector String Tokenizer tokens new String Tokenizer prop NON NLS 1 while tokens has More Tokens String token tokens next Token trim if token equals NON NLS 1 list add Element token return list is Empty new String 0 String list to Array new String list size  getArrayFromList StringTokenizer StringTokenizer hasMoreTokens nextToken addElement isEmpty toArray
Returns the code URL code based class path describing where the boot classes are located when running in development mode return the url based class path param base the base location exception MalformedURL Exception if a problem occurs computing the class path private URL get Dev Path URL base throws IO Exception Array List result new Array List 5 if in Development Mode add Dev Entries base result NON NLS 1 The jars from the base always need to be added even when running in dev mode bug 46772 add Base Jars base result return URL result to Array new URL result size  MalformedURLException getDevPath IOException ArrayList ArrayList inDevelopmentMode addDevEntries addBaseJars toArray
private void add Base Jars URL base Array List result throws IO Exception String base Jar List System get Property PROP CLASSPATH if base Jar List null URL url new URL base ECLIPSE PROPERTIES if debug System out println Loading framework classpath from n url to External Form NON NLS 1 Properties defaults load Properties url base Jar List defaults get Property PROP CLASSPATH if base Jar List null throw new IO Exception Unable to initialize PROP CLASSPATH NON NLS 1 System get Properties put PROP CLASSPATH base Jar List String base Jars get Array From List base Jar List for int i 0 i base Jars length i String string base Jars i try if the string is a file URL then carefully construct the URL Otherwise just try to build a URL In either case if we fail use string as something to tack on the end of the base URL url null if string starts With file NON NLS 1 url new File string substring 5 toURL else url new URL string add Entry url result catch MalformedURL Exception e add Entry new URL base string result  addBaseJars ArrayList IOException baseJarList getProperty PROP_CLASSPATH baseJarList ECLIPSE_PROPERTIES toExternalForm loadProperties baseJarList getProperty PROP_CLASSPATH baseJarList IOException PROP_CLASSPATH getProperties PROP_CLASSPATH baseJarList baseJars getArrayFromList baseJarList baseJars baseJars startsWith addEntry MalformedURLException addEntry
private void add Entry URL url List result if new File url get File exists result add url  addEntry getFile
private void add Dev Entries URL base List result throws MalformedURL Exception String locations get Array From List dev Class Path for int i 0 i locations length i String location locations i char last Char location char At location length 1 URL url if location ends With jar last Char last Char NON NLS 1 url new URL base location else url new URL base location NON NLS 1 add Entry url result  addDevEntries MalformedURLException getArrayFromList devClassPath lastChar charAt endsWith lastChar lastChar addEntry
Returns the code URL code based class path describing where the boot classes are located return the url based class path param base the base location exception MalformedURL Exception if a problem occurs computing the class path private URL get Boot Path String base throws IO Exception URL url null if base null url buildURL base true else search in the root location url get Install Location String path new File url get File plugins to String NON NLS 1 path search For framework path if path null throw new Runtime Exception Could not find framework NON NLS 1 if url get Protocol equals file NON NLS 1 url new File path toURL else url new URL url get Protocol url get Host url get Port path if System get Property PROP FRAMEWORK null System get Properties put PROP FRAMEWORK url to External Form if debug System out println Framework located n url to External Form NON NLS 1 add on any dev path elements URL result get Dev Path url if debug System out println Framework classpath NON NLS 1 for int i 0 i result length i System out println result i to External Form NON NLS 1 return result  MalformedURLException getBootPath IOException getInstallLocation getFile toString searchFor RuntimeException getProtocol getProtocol getHost getPort getProperty PROP_FRAMEWORK getProperties PROP_FRAMEWORK toExternalForm toExternalForm getDevPath toExternalForm
private String search For final String target String start File Filter filter new File Filter public boolean accept File candidate return candidate is Directory candidate get Name equals target candidate get Name starts With target   NON NLS 1  searchFor FileFilter FileFilter isDirectory getName getName startsWith _
Searches for the given target directory starting in the plugins subdirectory of the given location If one is found then this location is returned otherwise an exception is thrown return the location where target directory was found param start the location to begin searching private String search For final String target String start File Filter filter new File Filter public boolean accept File candidate return candidate is Directory candidate get Name equals target candidate get Name starts With target   NON NLS 1 File candidates new File start list Files filter NON NLS 1 if candidates null return null String result null Object max Version null for int i 0 i candidates length i String name candidates i get Name String version NON NLS 1 Note directory with version suffix is always than directory without version suffix int index name index Of   if index 1 version name substring index 1 Object current Version get Version Elements version if max Version null result candidates i get Absolute Path max Version current Version else if compare Version Object max Version Object current Version 0 result candidates i get Absolute Path max Version current Version if result null return null return result replace File separator Char NON NLS 1  searchFor FileFilter FileFilter isDirectory getName getName startsWith _ listFiles maxVersion getName indexOf _ currentVersion getVersionElements maxVersion getAbsolutePath maxVersion currentVersion compareVersion maxVersion currentVersion getAbsolutePath maxVersion currentVersion separatorChar
Compares version strings return result of comparison as integer code 0 code if left right code 0 code if left right code 0 code if left right private int compare Version Object left Object right int result Integer left 0 compare To Integer right 0 compare major if result 0 return result result Integer left 1 compare To Integer right 1 compare minor if result 0 return result result Integer left 2 compare To Integer right 2 compare service if result 0 return result return String left 3 compare To String right 3 compare qualifier  compareVersion compareTo compareTo compareTo compareTo
Do a quick parse of version identifier so its elements can be correctly compared If we are unable to parse the full version remaining elements are initialized with suitable defaults return an array of size 4 first three elements are of type Integer representing major minor and service and the fourth element is of type String representing qualifier Note that returning anything else will cause exceptions in the caller private Object get Version Elements String version Object result new Integer 0 new Integer 0 new Integer 0 NON NLS 1 String Tokenizer t new String Tokenizer version NON NLS 1 String token int i 0 while t has More Tokens i 4 token t next Token if i 3 major minor or service numeric values try result i new Integer token catch Exception e invalid number format use default numbers 0 for the rest break else qualifier string value result i token return result  getVersionElements StringTokenizer StringTokenizer hasMoreTokens nextToken
private static URL buildURL String spec boolean trailing Slash if spec null return null boolean is File spec starts With file NON NLS 1 try if is File return adjust Trailing Slash new File spec substring 5 toURL trailing Slash else return new URL spec catch MalformedURL Exception e if we failed and it is a file spec there is nothing more we can do otherwise try to make the spec into a file URL if is File return null try return adjust Trailing Slash new File spec toURL trailing Slash catch MalformedURL Exception e1 return null  trailingSlash isFile startsWith isFile adjustTrailingSlash trailingSlash MalformedURLException isFile adjustTrailingSlash trailingSlash MalformedURLException
private static URL adjust Trailing Slash URL url boolean trailing Slash throws MalformedURL Exception String file url get File if trailing Slash file ends With NON NLS 1 return url file trailing Slash file file substring 0 file length 1 NON NLS 1 return new URL url get Protocol url get Host file  adjustTrailingSlash trailingSlash MalformedURLException getFile trailingSlash endsWith trailingSlash getProtocol getHost
private URL build Location String property URL default Location String user Default Appendage URL result null String location System get Property property System get Properties remove property if the instance location is not set predict where the workspace will be and put the instance area inside the workspace meta area try if location null result default Location else if location equals Ignore Case NONE return null else if location equals Ignore Case NO DEFAULT result buildURL location true else if location starts With USER HOME String base substitute Var location USER HOME PROP USER HOME location new File base user Default Appendage get Absolute Path else if location starts With USER DIR String base substitute Var location USER DIR PROP USER DIR location new File base user Default Appendage get Absolute Path result buildURL location true finally if result null System get Properties put property result to External Form return result  buildLocation defaultLocation userDefaultAppendage getProperty getProperties defaultLocation equalsIgnoreCase equalsIgnoreCase NO_DEFAULT startsWith USER_HOME substituteVar USER_HOME PROP_USER_HOME userDefaultAppendage getAbsolutePath startsWith USER_DIR substituteVar USER_DIR PROP_USER_DIR userDefaultAppendage getAbsolutePath getProperties toExternalForm
private String substitute Var String source String var String prop String value System get Property prop return value source substring var length  substituteVar getProperty
Retuns the default file system path for the configuration location By default the configuration information is in the installation directory if this is writeable Otherwise it is located somewhere in the user home area relative to the current product return the default file system path for the configuration information private String compute Default Configuration Location 1 We store the config state relative to the eclipse directory if possible 2 If this directory is read only we store the state in user home eclipse application id   version where user home is unique for each local user and application id is the one defined in eclipseproduct marker file If eclipseproduct does not exist use eclipse as the application id URL install get Install Location TODO a little dangerous here Basically we have to assume that it is a file URL if install get Protocol equals file NON NLS 1 File install Dir new File install get File if install Dir can Write return install Dir get Absolute Path File separator CONFIG DIR We can t write in the eclipse install dir so try for some place in the user s home dir return compute Default User Area Location CONFIG DIR  computeDefaultConfigurationLocation _ getInstallLocation getProtocol installDir getFile installDir canWrite installDir getAbsolutePath CONFIG_DIR computeDefaultUserAreaLocation CONFIG_DIR
Returns a files system path for an area in the user home region related to the current product The given appendage is added to this base location param path Appendage the path segments to add to computed base return a file system location in the user home area related the the current product and the given appendage private String compute Default User Area Location String path Appendage we store the state in user home eclipse application id   version where user home is unique for each local user and application id is the one defined in eclipseproduct marker file If eclipseproduct does not exist use eclipse as the application id URL installURL get Install Location if installURL null return null File install Dir new File installURL get File String app Name ECLIPSE NON NLS 1 File eclipse Product new File install Dir PRODUCT SITE MARKER if eclipse Product exists Properties props new Properties try props load new File Input Stream eclipse Product String app Id props get Property PRODUCT SITE ID if app Id null app Id trim length 0 app Id ECLIPSE String app Version props get Property PRODUCT SITE VERSION if app Version null app Version trim length 0 app Version NON NLS 1 app Name File separator app Id   app Version NON NLS 1 catch IO Exception e Do nothing if we get an exception We will default to a standard location in the user s home dir String user Home System get Property PROP USER HOME return new File user Home app Name path Appendage get Absolute Path NON NLS 1  pathAppendage computeDefaultUserAreaLocation pathAppendage _ getInstallLocation installDir getFile appName eclipseProduct installDir PRODUCT_SITE_MARKER eclipseProduct FileInputStream eclipseProduct appId getProperty PRODUCT_SITE_ID appId appId appId appVersion getProperty PRODUCT_SITE_VERSION appVersion appVersion appVersion appName appId _ appVersion IOException userHome getProperty PROP_USER_HOME userHome appName pathAppendage getAbsolutePath
Runs this launcher with the arguments specified in the given string param arg String the arguments string public static void main String arg String Vector list new Vector 5 for String Tokenizer tokens new String Tokenizer arg String tokens has More Elements NON NLS 1 list add Element tokens next Element main String list to Array new String list size  argString argString StringTokenizer StringTokenizer argString hasMoreElements addElement nextElement toArray
Runs the platform with the given arguments The arguments must identify an application to run e g code application com example application code After running the application code System exit N code is executed The value of N is derived from the value returned from running the application If the application s return value is an code Integer code N is this value In all other cases N 0 p Clients wishing to run the platform without a following code System exit code call should use code run code p param args the command line arguments see run String public static void main String args int result new Main run args System exit result 
Runs the platform with the given arguments The arguments must identify an application to run e g code application com example application code Returns the value returned from running the application If the application s return value is an code Integer code N is this value In all other cases N 0 param args the command line arguments public int run String args int result 0 try basic Run args String exit Code System get Property PROP EXITCODE try result exit Code null 0 Integer parse Int exit Code catch Number Format Exception e result 17 catch Throwable e try and take down the splash screen take Down Splash only log the exceptions if they have not been caught by the Eclipse Starter i e if the exit Code is not 13 if 13 equals System get Property PROP EXITCODE NON NLS 1 log Exception launching the Eclipse Platform NON NLS 1 log e String message An error has occurred NON NLS 1 if log File null message and could not be logged n e get Message NON NLS 1 else message See the log file n log File get Absolute Path NON NLS 1 System get Properties put PROP EXITDATA message Return unlucky 13 as the exit code The executable will recognize this constant and display a message to the user telling them that there is information in their log file result 13 Return an int exit code and ensure the system property is set System get Properties put PROP EXITCODE Integer to String result set Exit Data return result  basicRun exitCode getProperty PROP_EXITCODE exitCode parseInt exitCode NumberFormatException takeDownSplash EclipseStarter exitCode getProperty PROP_EXITCODE logFile getMessage logFile getAbsolutePath getProperties PROP_EXITDATA getProperties PROP_EXITCODE toString setExitData
private void set Exit Data String data System get Property PROP EXITDATA if exit Data null data null return sync call to the launcher run Command true exit Data data EXITDATA NON NLS 1  setExitData getProperty PROP_EXITDATA exitData runCommand exitData
Processes the command line arguments The general principle is to NOT consume the arguments and leave them to be processed by Eclipse proper There are a few args which are directed towards main and a few others which we need to know about Very few should actually be consumed here return the arguments to pass through to the launched application param args the command line arguments protected String process Command Line String args if args length 0 return args int config Args new int args length config Args 0 1 need to initialize the first element to something that could not be an index int config Arg Index 0 for int i 0 i args length i boolean found false check for args without parameters i e a flag arg check if debug should be enabled for the entire platform if args i equals Ignore Case DEBUG debug true passed thru this arg i e do not set found true continue look for and consume the nosplash directive This supercedes any showsplash command that might be present if args i equals Ignore Case NOSPLASH splash Down true found true check if this is initialization pass if args i equals Ignore Case INITIALIZE initialize true passed thru this arg i e do not set found true continue check if development mode should be enabled for the entire platform If this is the last arg or there is a following arg i e arg 1 has a leading simply enable development mode Otherwise assume that that the following arg is actually some additional development time class path entries This will be processed below if args i equals Ignore Case DEV i 1 args length i 1 args length args i 1 starts With NON NLS 1 in Development Mode true do not mark the arg as found so it will be passed through continue done checking for args Remember where an arg was found if found config Args config Arg Index i continue look for the VM args arg We have to do that before looking to see if the next element is a arg as the thing following vmargs may in fact be another arg if args i equals Ignore Case VMARGS consume the vmargs arg itself args i null i vmargs new String args length i for int j 0 i args length i vmargs j args i args i null continue check for args with parameters If we are at the last argument or if the next one has a as the first character then we can t have an arg with a parm so continue if i args length 1 args i 1 starts With NON NLS 1 continue String arg args i look for the development mode and class path entries if args i 1 equals Ignore Case DEV in Development Mode true dev Class Path process Dev Arg arg continue look for the framework to run if args i 1 equals Ignore Case FRAMEWORK framework arg found true look for explicitly set install root Consume the arg here to ensure that the launcher and Eclipse get the same value as each other if args i 1 equals Ignore Case INSTALL System get Properties put PROP INSTALL AREA arg found true look for the configuration to use Consume the arg here to ensure that the launcher and Eclipse get the same value as each other if args i 1 equals Ignore Case CONFIGURATION System get Properties put PROP CONFIG AREA arg found true look for the command to use to set exit data in the launcher if args i 1 equals Ignore Case EXITDATA exit Data arg found true look for the command to use to show the splash screen if args i 1 equals Ignore Case SHOWSPLASH show Splash arg found true look for the command to use to end the splash screen if args i 1 equals Ignore Case ENDSPLASH end Splash arg found true look for the VM location arg if args i 1 equals Ignore Case VM vm arg found true done checking for args Remember where an arg was found if found config Args config Arg Index i 1 config Args config Arg Index i remove all the arguments consumed by this argument parsing String pass Thru Args new String args length config Arg Index vmargs null 0 vmargs length 1 config Arg Index 0 int j 0 for int i 0 i args length i if i config Args config Arg Index config Arg Index else if args i null pass Thru Args j args i return pass Thru Args  processCommandLine configArgs configArgs configArgIndex equalsIgnoreCase equalsIgnoreCase splashDown equalsIgnoreCase equalsIgnoreCase startsWith inDevelopmentMode configArgs configArgIndex equalsIgnoreCase startsWith equalsIgnoreCase inDevelopmentMode devClassPath processDevArg equalsIgnoreCase equalsIgnoreCase getProperties PROP_INSTALL_AREA equalsIgnoreCase getProperties PROP_CONFIG_AREA equalsIgnoreCase exitData equalsIgnoreCase showSplash equalsIgnoreCase endSplash equalsIgnoreCase configArgs configArgIndex configArgs configArgIndex passThruArgs configArgIndex configArgIndex configArgs configArgIndex configArgIndex passThruArgs passThruArgs
private String process Dev Arg String arg if arg null return null try URL location new URL arg Properties props load location null String result props get Property OSGI return result null props get Property result NON NLS 1 catch MalformedURL Exception e the arg was not a URL so use it as is return arg catch IO Exception e TODO consider logging here return null  processDevArg getProperty getProperty MalformedURLException IOException
private URL get Configuration Location if configuration Location null return configuration Location configuration Location build Location PROP CONFIG AREA null NON NLS 1 if configuration Location null configuration Location build Location PROP CONFIG AREA DEFAULT null NON NLS 1 if configuration Location null configuration Location buildURL compute Default Configuration Location true if configuration Location null System get Properties put PROP CONFIG AREA configuration Location to External Form if debug System out println Configuration location n configuration Location NON NLS 1 return configuration Location  getConfigurationLocation configurationLocation configurationLocation configurationLocation buildLocation PROP_CONFIG_AREA configurationLocation configurationLocation buildLocation PROP_CONFIG_AREA_DEFAULT configurationLocation configurationLocation computeDefaultConfigurationLocation configurationLocation getProperties PROP_CONFIG_AREA configurationLocation toExternalForm configurationLocation configurationLocation
private void process Configuration if the configuration area is not already defined discover the config area by trying to find a base config area This is either defined in a system property or is computed relative to the install location Note that the config info read here is only used to determine a value for the user configuration area URL base Configuration Location null Properties base Configuration null if System get Property PROP CONFIG AREA null String base Location System get Property PROP BASE CONFIG AREA if base Location null here the base config cannot have any symbolic e g xxx entries It must just point to the config file base Configuration Location buildURL base Location true if base Configuration Location null try here we access the install location but this is very early This case will only happen if the config area is not set and the base config area is not set or is bogus In this case we compute based on the install location base Configuration Location new URL get Install Location CONFIG DIR catch MalformedURL Exception e leave base Configuration Location null base Configuration load Configuration base Configuration Location if base Configuration null if the base sets the install area then use that value if the property We know the property is not already set String location base Configuration get Property PROP CONFIG AREA if location null System get Properties put PROP CONFIG AREA location if the base sets the install area then use that value if the property is not already set This helps in selfhosting cases where you cannot easily compute the install location from the code base location base Configuration get Property PROP INSTALL AREA if location null System get Property PROP INSTALL AREA null System get Properties put PROP INSTALL AREA location Now we know where the base configuration is supposed to be Go ahead and load it and merge into the System properties Then if cascaded read the parent configuration Note that the parent may or may not be the same parent as we read above since the base can define its parent The first parent we read was either defined by the user on the command line or was the one in the install dir if the config or parent we are about to read is the same as the base config we read above just reuse the base Properties configuration base Configuration if configuration null get Configuration Location equals base Configuration Location to External Form configuration load Configuration get Configuration Location merge Properties System get Properties configuration if false equals Ignore Case System get Property PROP CONFIG CASCADED NON NLS 1 if we are not cascaded then remove the parent property even if it was set System get Properties remove PROP SHARED CONFIG AREA else URL shared ConfigURL build Location PROP SHARED CONFIG AREA null if shared ConfigURL null try there is no shared config value so compute one shared ConfigURL new URL get Install Location CONFIG DIR catch MalformedURL Exception e leave shared Configuration Location null if the parent location is different from the config location read it too if shared ConfigURL null if shared ConfigURL equals get Configuration Location remove the property to show that we do not have a parent System get Properties remove PROP SHARED CONFIG AREA else if the parent we are about to read is the same as the base config we read above just reuse the base configuration base Configuration if shared ConfigURL equals base Configuration Location configuration load Configuration shared ConfigURL merge Properties System get Properties configuration System get Properties put PROP SHARED CONFIG AREA shared ConfigURL to External Form if debug System out println Shared configuration location n shared ConfigURL to External Form NON NLS 1 setup the path to the framework String url String System get Property PROP FRAMEWORK null if url String null URL url buildURL url String true System get Properties put PROP FRAMEWORK url to External Form boot Location resolve url String  processConfiguration baseConfigurationLocation baseConfiguration getProperty PROP_CONFIG_AREA baseLocation getProperty PROP_BASE_CONFIG_AREA baseLocation baseConfigurationLocation baseLocation baseConfigurationLocation baseConfigurationLocation getInstallLocation CONFIG_DIR MalformedURLException baseConfigurationLocation baseConfiguration loadConfiguration baseConfigurationLocation baseConfiguration baseConfiguration getProperty PROP_CONFIG_AREA getProperties PROP_CONFIG_AREA baseConfiguration getProperty PROP_INSTALL_AREA getProperty PROP_INSTALL_AREA getProperties PROP_INSTALL_AREA baseConfiguration getConfigurationLocation baseConfigurationLocation toExternalForm loadConfiguration getConfigurationLocation mergeProperties getProperties equalsIgnoreCase getProperty PROP_CONFIG_CASCADED getProperties PROP_SHARED_CONFIG_AREA sharedConfigURL buildLocation PROP_SHARED_CONFIG_AREA sharedConfigURL sharedConfigURL getInstallLocation CONFIG_DIR MalformedURLException sharedConfigurationLocation sharedConfigURL sharedConfigURL getConfigurationLocation getProperties PROP_SHARED_CONFIG_AREA baseConfiguration sharedConfigURL baseConfigurationLocation loadConfiguration sharedConfigURL mergeProperties getProperties getProperties PROP_SHARED_CONFIG_AREA sharedConfigURL toExternalForm sharedConfigURL toExternalForm urlString getProperty PROP_FRAMEWORK urlString urlString getProperties PROP_FRAMEWORK toExternalForm bootLocation urlString
Returns url of the location this class was loaded from private URL get Install Location if install Location null return install Location value is not set so compute the default and set the value String install Area System get Property PROP INSTALL AREA if install Area null install Location buildURL install Area true if install Location null throw new Illegal State Exception Install location is invalid install Area NON NLS 1 System get Properties put PROP INSTALL AREA install Location to External Form if debug System out println Install location n install Location NON NLS 1 return install Location URL result Main class get Protection Domain get Code Source get Location String path decode result get File normalize to not have leading so we can check the form File file new File path path file to String replace TODO need a better test for windows If on Windows then canonicalize the drive letter to be lowercase remember that there may be UNC paths if File separator Char if Character is Upper Case path char At 0 char chars path to Char Array chars 0 Character to Lower Case chars 0 path new String chars if path ends With jar NON NLS 1 path path substring 0 path last Index Of 1 NON NLS 1 try try create a file URL via File to normalize the form e g put the leading on if necessary path new File path toURL get File catch MalformedURL Exception e1 will never happen The path is straight from a URL install Location new URL result get Protocol result get Host result get Port path System get Properties put PROP INSTALL AREA install Location to External Form catch MalformedURL Exception e TODO Very unlikely case log here if debug System out println Install location n install Location NON NLS 1 return install Location  getInstallLocation installLocation installLocation installArea getProperty PROP_INSTALL_AREA installArea installLocation installArea installLocation IllegalStateException installArea getProperties PROP_INSTALL_AREA installLocation toExternalForm installLocation installLocation getProtectionDomain getCodeSource getLocation getFile toString separatorChar isUpperCase charAt toCharArray toLowerCase endsWith lastIndexOf getFile MalformedURLException installLocation getProtocol getHost getPort getProperties PROP_INSTALL_AREA installLocation toExternalForm MalformedURLException installLocation installLocation
private Properties load Configuration URL url Properties result null try url new URL url CONFIG FILE catch MalformedURL Exception e return null try if debug System out print Configuration file n url to String NON NLS 1 result load Properties url if debug System out println loaded NON NLS 1 catch IO Exception e if debug System out println not found or not read NON NLS 1 return result  loadConfiguration CONFIG_FILE MalformedURLException toString loadProperties IOException
private Properties load Properties URL url throws IO Exception try to load saved configuration file watch for failed prior save if url null return null Properties result null IO Exception original Exception null try result load url null try to load config file catch IO Exception e1 original Exception e1 try result load url CONFIG FILE TEMP SUFFIX check for failures on save catch IO Exception e2 try result load url CONFIG FILE BAK SUFFIX check for failures on save catch IO Exception e3 throw original Exception we tried but no config here return result  loadProperties IOException IOException originalException IOException originalException CONFIG_FILE_TEMP_SUFFIX IOException CONFIG_FILE_BAK_SUFFIX IOException originalException
private Properties load URL url String suffix throws IO Exception figure out what we will be loading if suffix null suffix equals NON NLS 1 url new URL url get Protocol url get Host url get Port url get File suffix try to load saved configuration file Properties props new Properties Input Stream is null try is url open Stream props load is finally if is null try is close catch IO Exception e ignore failure to close return props  IOException getProtocol getHost getPort getFile InputStream openStream IOException
private void handle Splash URL default Path run without splash if we are initializing or nosplash was specified splashdown true if initialize splash Down show Splash null end Splash null return if endsplash is specified use it and ignore any showsplash command if end Splash null show Splash null return check if we are running without a splash screen if show Splash null return determine the splash location String location get Splash Location default Path if debug System out println Splash location n location NON NLS 1 if location null return async call to the launcher show Process run Command false show Splash location SHOWSPLASH NON NLS 1  handleSplash defaultPath splashDown showSplash endSplash endSplash showSplash showSplash getSplashLocation defaultPath showProcess runCommand showSplash
private Process run Command boolean block String command String data String separator Parse the showsplash command into its separate arguments The command format is executable show magic Arg splash Path If either the executable or the splash Path arguments contain a space Runtime get Runtime exec String will not work even if both arguments are enclosed in double quotes The solution is to use the Runtime get Runtime exec String method String args new String data null 4 3 get the executable part int s Index 0 int e Index command index Of separator if e Index 1 return null invalid command args 0 command substring s Index e Index get the command part s Index e Index 1 e Index command index Of s Index NON NLS 1 if e Index 1 return null invalid command args 1 command substring s Index e Index get the magic arg part args 2 command substring e Index 1 add on our data if data null args 3 data Process result null try result Runtime get Runtime exec args if block result wait For catch Exception e log Exception running command command NON NLS 1 log e return result  runCommand magicArg splashPath splashPath getRuntime getRuntime sIndex eIndex indexOf eIndex sIndex eIndex sIndex eIndex eIndex indexOf sIndex eIndex sIndex eIndex eIndex getRuntime waitFor
protected void take Down Splash if splash Down splash is already down return check if endsplash was specified if end Splash null try Runtime get Runtime exec end Splash catch Exception e ignore failure to end splash check if showsplash was specified and executed if show Process null show Process destroy show Process null splash Down true  takeDownSplash splashDown endSplash getRuntime endSplash showProcess showProcess showProcess splashDown
private String get Splash Location URL boot Path String result System get Property PROP SPLASHLOCATION if result null return result String splash Path System get Property PROP SPLASHPATH if splash Path null String entries get Array From List splash Path Array List path new Array List entries length for int i 0 i entries length i String entry resolve entries i if entry null entry starts With FILE SCHEME File entry File new File entry substring 5 replace File separator Char entry search For entry File get Name entry File get Parent if entry null path add entry else log Invalid splash path entry entries i NON NLS 1 see if we can get a splash given the splash path result search For Splash String path to Array new String path size if result null System get Properties put PROP SPLASHLOCATION result return result can t find it on the splash Path so look for a default splash String temp boot Path 0 get File take the first path element temp temp replace File separator Char int ix temp last Index Of plugins File separator NON NLS 1 if ix 1 int pix temp index Of File separator ix 8 if pix 1 temp temp substring 0 pix result search For Splash new String temp if result null System get Properties put PROP SPLASHLOCATION result return result  getSplashLocation bootPath getProperty PROP_SPLASHLOCATION splashPath getProperty PROP_SPLASHPATH splashPath getArrayFromList splashPath ArrayList ArrayList startsWith FILE_SCHEME entryFile separatorChar searchFor entryFile getName entryFile getParent searchForSplash toArray getProperties PROP_SPLASHLOCATION splashPath bootPath getFile separatorChar lastIndexOf indexOf searchForSplash getProperties PROP_SPLASHLOCATION
private String search For Splash String search Path if search Path null return null get current locale information String locale Path Locale get Default to String replace   File separator Char search the specified path while locale Path null String suffix if locale Path equals NON NLS 1 look for nl ed splash image suffix SPLASH IMAGE else look for default splash image suffix nl File separator locale Path File separator SPLASH IMAGE NON NLS 1 check for file in search Path for int i 0 i search Path length i String path search Path i if path ends With File separator path File separator path suffix File result new File path if result exists return result get Absolute Path return the first match found 20063 try the next variant if locale Path equals NON NLS 1 locale Path null else int ix locale Path last Index Of File separator if ix 1 locale Path NON NLS 1 else locale Path locale Path substring 0 ix sorry could not find splash image return null  searchForSplash searchPath searchPath localePath getDefault toString _ separatorChar localePath localePath SPLASH_IMAGE localePath SPLASH_IMAGE searchPath searchPath searchPath endsWith getAbsolutePath localePath localePath localePath lastIndexOf localePath localePath localePath
private String resolve String url String handle the case where people mistakenly spec a refererence url if url String starts With reference NON NLS 1 url String url String substring 10 System get Properties put PROP FRAMEWORK url String if url String starts With PLATFORM URL String path url String substring PLATFORM URL length return get Install Location path else return url String  urlString urlString startsWith urlString urlString getProperties PROP_FRAMEWORK urlString urlString startsWith PLATFORM_URL urlString PLATFORM_URL getInstallLocation urlString
private synchronized void log Object obj if obj null return try open Log File try if new Session log write SESSION log write String timestamp new Date to String log write timestamp log write for int i SESSION length timestamp length i 78 i log write log new Line new Session false write obj finally if log File null if log null log flush else close Log File catch Exception e System err println An exception occurred while writing to the platform log NON NLS 1 e print Stack Trace System err System err println Logging to the console instead NON NLS 1 we failed to write so dump log entry to console instead try log log For Stream System err write obj log flush catch Exception e2 System err println An exception occurred while logging to the console NON NLS 1 e2 print Stack Trace System err finally log null  openLogFile newSession toString newLine newSession logFile closeLogFile printStackTrace logForStream printStackTrace
private void write Object obj throws IO Exception if obj null return if obj instanceof Throwable log write STACK log new Line Throwable obj print Stack Trace new Print Writer log else log write ENTRY log write log write PLUGIN ID log write log write String value Of ERROR log write log write String value Of 0 log write try Date Format formatter new Simple Date Format MMM dd yyyy kk mm ss SS NON NLS 1 log write formatter format new Date catch Exception e continue if we can t write out the date log write Long to String System current Time Millis log new Line log write MESSAGE log write log write String value Of obj log new Line  IOException newLine printStackTrace PrintWriter PLUGIN_ID valueOf valueOf DateFormat SimpleDateFormat toString currentTimeMillis newLine valueOf newLine
private void compute Log File Location String log File Prop System get Property PROP LOGFILE if log File Prop null if log File null log File Prop equals log File get Absolute Path log File new File log File Prop log File get Parent File mkdirs return compute the base location and then append the name of the log file URL base buildURL System get Property PROP CONFIG AREA false if base null return log File new File base get Path Long to String System current Time Millis log NON NLS 1 log File get Parent File mkdirs System set Property PROP LOGFILE log File get Absolute Path  computeLogFileLocation logFileProp getProperty PROP_LOGFILE logFileProp logFile logFileProp logFile getAbsolutePath logFile logFileProp logFile getParentFile getProperty PROP_CONFIG_AREA logFile getPath toString currentTimeMillis logFile getParentFile setProperty PROP_LOGFILE logFile getAbsolutePath
Converts an ASCII character representing a hexadecimal value into its integer equivalent private int hex To Byte byte b switch b case 0 return 0 case 1 return 1 case 2 return 2 case 3 return 3 case 4 return 4 case 5 return 5 case 6 return 6 case 7 return 7 case 8 return 8 case 9 return 9 case A case a return 10 case B case b return 11 case C case c return 12 case D case d return 13 case E case e return 14 case F case f return 15 default throw new Illegal Argument Exception Switch error decoding URL NON NLS 1  hexToByte IllegalArgumentException
private void open Log File throws IO Exception compute Log File Location try log new Buffered Writer new Output Stream Writer new File Output Stream log File get Absolute Path true UTF 8 NON NLS 1 catch IO Exception e log File null throw e  openLogFile IOException computeLogFileLocation BufferedWriter OutputStreamWriter FileOutputStream logFile getAbsolutePath IOException logFile
private Buffered Writer log For Stream Output Stream output try return new Buffered Writer new Output Stream Writer output UTF 8 NON NLS 1 catch Unsupported Encoding Exception e return new Buffered Writer new Output Stream Writer output  BufferedWriter logForStream OutputStream BufferedWriter OutputStreamWriter UnsupportedEncodingException BufferedWriter OutputStreamWriter
private void close Log File throws IO Exception try if log null log flush log close finally log null  closeLogFile IOException
private void merge Properties Properties destination Properties source if destination null source null return for Enumeration e source keys e has More Elements String key String e next Element if key equals PROP EOF String value source get Property key if destination get Property key null destination put key value  mergeProperties hasMoreElements nextElement PROP_EOF getProperty getProperty
private void setupVM Properties if vm null System get Properties put PROP VM vm set Multi Value Property PROP VMARGS vmargs set Multi Value Property PROP COMMANDS commands  setupVMProperties getProperties PROP_VM setMultiValueProperty PROP_VMARGS setMultiValueProperty PROP_COMMANDS
private void set Multi Value Property String property String value if value null String Buffer result new String Buffer 300 for int i 0 i value length i if value i null result append value i result append n System get Properties put property result to String  setMultiValueProperty StringBuffer StringBuffer getProperties toString

Constructs a new code Convert Path code instance public Convert Path super  ConvertPath ConvertPath
Performs the path conversion operation exception Build Exception thrown if a problem occurs during execution public void execute throws Build Exception validate Attributes if file System Path null here resource Path is not null convert Resource Path To File System Path resource Path else convert File System Path To Resource Path file System Path  BuildException BuildException validateAttributes fileSystemPath resourcePath convertResourcePathToFileSystemPath resourcePath convertFileSystemPathToResourcePath fileSystemPath
protected void convert File System Path To Resource Path I Path path I Resource resource if Platform get Location equals path resource Resources Plugin get Workspace get Root else resource Resources Plugin get Workspace get Root get Container For Location path if resource null throw new Build Exception Policy bind exception no Project Match The Path file System Path toOS String NON NLS 1 if property null project set User Property property resource get Full Path to String if pathID null Path new Path new Path project resource get Full Path to String project add Reference pathID new Path  convertFileSystemPathToResourcePath IPath IResource getLocation ResourcesPlugin getWorkspace getRoot ResourcesPlugin getWorkspace getRoot getContainerForLocation BuildException noProjectMatchThePath fileSystemPath toOSString setUserProperty getFullPath toString newPath getFullPath toString addReference newPath
protected void convert Resource Path To File System Path I Path path I Resource resource null switch path segment Count case 0 resource Resources Plugin get Workspace get Root break case 1 resource Resources Plugin get Workspace get Root get Project path last Segment break default resource Resources Plugin get Workspace get Root get File path if resource get Location null can occur if the first segment is not a project throw new Build Exception Policy bind exception path Not Valid path to String NON NLS 1 if property null project set User Property property resource get Location toOS String if pathID null Path new Path new Path project resource get Location toOS String project add Reference pathID new Path  convertResourcePathToFileSystemPath IPath IResource segmentCount ResourcesPlugin getWorkspace getRoot ResourcesPlugin getWorkspace getRoot getProject lastSegment ResourcesPlugin getWorkspace getRoot getFile getLocation BuildException pathNotValid toString setUserProperty getLocation toOSString newPath getLocation toOSString addReference newPath
Sets the file system path param value the file corresponding to the path supplied by the user public void set File System Path File value if resource Path null throw new Build Exception Policy bind exception cant Use Both NON NLS 1 file System Path new org eclipse core runtime Path value to String  setFileSystemPath resourcePath BuildException cantUseBoth fileSystemPath toString
Sets the resource path param value the path public void set Resource Path String value if file System Path null throw new Build Exception Policy bind exception cant Use Both NON NLS 1 resource Path new org eclipse core runtime Path value  setResourcePath fileSystemPath BuildException cantUseBoth resourcePath
Sets the name of the property where the result may stored param value the name of the property public void set Property String value property value  setProperty
Sets the id for the path where the result may be stored param value the id of the path public void set Path Id String value pathID value  setPathId
Performs a validation of the receiver exception Build Exception thrown if a problem occurs during validation protected void validate Attributes throws Build Exception if property null pathID null throw new Build Exception Policy bind exception property And Path Id Not Specified NON NLS 1 if resource Path null resource Path is Valid Path resource Path to String resource Path is Empty throw new Build Exception Policy bind exception invalid Path resource Path toOS String NON NLS 1 else if file System Path null file System Path is Valid Path file System Path toOS String throw new Build Exception Policy bind exception invalid Path file System Path toOS String NON NLS 1 if resource Path null file System Path null throw new Build Exception Policy bind exception must Have One Attribute NON NLS 1  BuildException validateAttributes BuildException BuildException propertyAndPathIdNotSpecified resourcePath resourcePath isValidPath resourcePath toString resourcePath isEmpty BuildException invalidPath resourcePath toOSString fileSystemPath fileSystemPath isValidPath fileSystemPath toOSString BuildException invalidPath fileSystemPath toOSString resourcePath fileSystemPath BuildException mustHaveOneAttribute

Constructs an code Incremental Build code instance public Incremental Build super  IncrementalBuild IncrementalBuild
Executes this task exception Build Exception thrown if a problem occurs during execution public void execute throws Build Exception try I Progress Monitor monitor null Hashtable references get Project get References if references null monitor I Progress Monitor references get Ant Core Plugin ECLIPSE PROGRESS MONITOR if project null Resources Plugin get Workspace build kind monitor else I Project target Project Resources Plugin get Workspace get Root get Project project if builder null target Project build kind monitor else target Project build kind builder null monitor catch Core Exception e throw new Build Exception e  BuildException BuildException IProgressMonitor getProject getReferences IProgressMonitor AntCorePlugin ECLIPSE_PROGRESS_MONITOR ResourcesPlugin getWorkspace IProject targetProject ResourcesPlugin getWorkspace getRoot getProject targetProject targetProject CoreException BuildException
Sets the name of the receiver s builder param value the name of the receiver s builder public void set Builder String value builder value  setBuilder
Sets the receiver s kind attribute This value must be one of code Incremental Build KIND FULL code code Incremental Build KIND AUTO code code Incremental Build KIND INCR code param value the receiver s kind attribute public void set Kind String value if Incremental Build KIND FULL equals Ignore Case value kind Incremental Project Builder FULL BUILD else if Incremental Build KIND AUTO equals Ignore Case value kind Incremental Project Builder AUTO BUILD else if Incremental Build KIND INCREMENTAL equals Ignore Case value kind Incremental Project Builder INCREMENTAL BUILD  IncrementalBuild KIND_FULL IncrementalBuild KIND_AUTO IncrementalBuild KIND_INCR setKind IncrementalBuild KIND_FULL equalsIgnoreCase IncrementalProjectBuilder FULL_BUILD IncrementalBuild KIND_AUTO equalsIgnoreCase IncrementalProjectBuilder AUTO_BUILD IncrementalBuild KIND_INCREMENTAL equalsIgnoreCase IncrementalProjectBuilder INCREMENTAL_BUILD
Sets the receiver s target project param value the receiver s target project public void set Project String value project value  setProject

Lookup the message with the given ID in this catalog public static String bind String id return bind id String null 
public static I Progress Monitor monitor For I Progress Monitor monitor if monitor null return new Null Progress Monitor return monitor  IProgressMonitor monitorFor IProgressMonitor NullProgressMonitor
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string public static String bind String id String binding return bind id new String binding 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings public static String bind String id String binding1 String binding2 return bind id new String binding1 binding2 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string values public static String bind String id String bindings if id null return No message available NON NLS 1 String message null try message bundle get String id catch Missing Resource Exception e If we got an exception looking for the message fail gracefully by just returning the id we were looking for In most cases this is semi informative so is not too bad return Missing message id in bundle Name NON NLS 1 NON NLS 2 if bindings null return message return Message Format format message bindings  getString MissingResourceException bundleName MessageFormat

Constructs a new code Refresh Local code instance public Refresh Local Task super  RefreshLocal RefreshLocalTask
Performs the refresh operation exception Build Exception thrown if a problem occurs during execution public void execute throws Build Exception if resource null throw new Build Exception Policy bind exception resource Not Specified NON NLS 1 try I Progress Monitor monitor null Hashtable references get Project get References if references null monitor I Progress Monitor references get Ant Core Plugin ECLIPSE PROGRESS MONITOR resource refresh Local depth monitor catch Core Exception e throw new Build Exception e  BuildException BuildException BuildException resourceNotSpecified IProgressMonitor getProject getReferences IProgressMonitor AntCorePlugin ECLIPSE_PROGRESS_MONITOR refreshLocal CoreException BuildException
Sets the depth of this task appropriately The specified argument must by one of code Refresh Local DEPTH ZERO code code Refresh Local DEPTH ONE code or code Refresh Local DEPTH INFINITE code param value the depth to refresh to public void set Depth String value if DEPTH ZERO equals Ignore Case value depth I Resource DEPTH ZERO else if DEPTH ONE equals Ignore Case value depth I Resource DEPTH ONE else if DEPTH INFINITE equals Ignore Case value depth I Resource DEPTH INFINITE  RefreshLocal DEPTH_ZERO RefreshLocal DEPTH_ONE RefreshLocal DEPTH_INFINITE setDepth DEPTH_ZERO equalsIgnoreCase IResource DEPTH_ZERO DEPTH_ONE equalsIgnoreCase IResource DEPTH_ONE DEPTH_INFINITE equalsIgnoreCase IResource DEPTH_INFINITE
Sets the root of the workspace resource tree to refresh param value the root value public void set Resource String value I Path path new Path value resource Resources Plugin get Workspace get Root find Member path if resource null if it does not exist we guess it is a folder or a project if path segment Count 1 resource Resources Plugin get Workspace get Root get Folder path else resource Resources Plugin get Workspace get Root get Project value if resource exists log Policy bind warning project Does Not Exist value Project MSG WARN NON NLS 1  setResource IPath ResourcesPlugin getWorkspace getRoot findMember segmentCount ResourcesPlugin getWorkspace getRoot getFolder ResourcesPlugin getWorkspace getRoot getProject projectDoesNotExist MSG_WARN

public interface I Command Returns a table of the arguments for this command or code null code if there are no arguments The argument names and values are both strings return a table of command arguments key type code String code value type code String code or code null code see set Arguments Map  ICommand setArguments
Returns the name of the builder to run for this command or code null code if the name has not been set return the name of the builder or code null code if not set see set Builder Name String  setBuilderName
Sets this command s arguments to be the given table of name values pairs or to code null code if there are no arguments The argument names and values are both strings p Individual builders specify their argument expectations p p Note that modifications to the arguments of a command being used in a running builder may affect the run of that builder but will not affect any subsequent runs To change a command permanently you must install the command into the relevant project build spec using code I Project Description set Build Spec code p param args a table of command arguments keys and values must both be of type code String code or code null code see get Arguments  IProjectDescription setBuildSpec getArguments
Sets the name of the builder to run for this command p The builder name comes from the extension that plugs in to the standard code org eclipse core resources builders code extension point p param builder Name the name of the builder see get Builder Name  builderName getBuilderName

Returns whether a resource of some type with the given path exists relative to this resource The supplied path may be absolute or relative in either case it is interpreted as relative to this resource Trailing separators are ignored If the path is empty this container is checked for existence param path the path of the resource return code true code if a resource of some type with the given path exists relative to this resource and code false code otherwise see I Resource exists  IResource
Finds and returns the member resource project folder or file with the given name in this container or code null code if no such resource exists p N B Unlike the methods which traffic strictly in resource handles this method infers the resulting resource s type from the resource existing at the calculated path in the workspace p param name the string name of the member resource return the member resource or code null code if no such resource exists 
Finds and returns the member resource project folder or file with the given name in this container or code null code if there is no such resource p If the code include Phantoms code argument is code false code only a member resource with the given name that exists will be returned If the code include Phantoms code argument is code true code the method also returns a resource if the workspace is keeping track of a phantom with that name p p Note that no attempt is made to exclude team private member resources as with code members code p p N B Unlike the methods which traffic strictly in resource handles this method infers the resulting resource s type from the existing resource or phantom in the workspace p param name the string name of the member resource param include Phantoms code true code if phantom resources are of interest code false code if phantom resources are not of interest return the member resource or code null code if no such resource exists see members see I Resource is Phantom  includePhantoms includePhantoms includePhantoms IResource isPhantom
Finds and returns the member resource identified by the given path in this container or code null code if no such resource exists The supplied path may be absolute or relative in either case it is interpreted as relative to this resource Trailing separators and the path s device are ignored If the path is empty this container is returned p Note that no attempt is made to exclude team private member resources as with code members code p p N B Unlike the methods which traffic strictly in resource handles this method infers the resulting resource s type from the resource existing at the calculated path in the workspace p param path the path of the desired resource return the member resource or code null code if no such resource exists 
Finds and returns the member resource identified by the given path in this container or code null code if there is no such resource The supplied path may be absolute or relative in either case it is interpreted as relative to this resource Trailing separators and the path s device are ignored If the path is empty this container is returned p If the code include Phantoms code argument is code false code only a resource that exists at the given path will be returned If the code include Phantoms code argument is code true code the method also returns a resource if the workspace is keeping track of a phantom member resource at the given path p p Note that no attempt is made to exclude team private member resources as with code members code p p N B Unlike the methods which traffic strictly in resource handles this method infers the resulting resource s type from the existing resource or phantom at the calculated path in the workspace p param path the path of the desired resource param include Phantoms code true code if phantom resources are of interest code false code if phantom resources are not of interest return the member resource or code null code if no such resource exists see members boolean see I Resource is Phantom  includePhantoms includePhantoms includePhantoms IResource isPhantom
Returns the default charset for resources in this container p This is a convenience method fully equivalent to pre get Default Charset true pre p p Note that this method does not check whether the result is a supported charset name Callers should be prepared to handle code Unsupported Encoding Exception code where this charset is used p return the name of the default charset encoding for this container throws Core Exception if this method fails see I Container get Default Charset boolean see I File get Charset since 3 0  getDefaultCharset UnsupportedEncodingException CoreException IContainer getDefaultCharset IFile getCharset
Returns the default charset for resources in this container p If check Implicit is code false code this method will return the charset defined by calling set Default Charset provided this container exists or code null code otherwise p p If check Implicit is code true code this method uses the following algorithm to determine the charset to be returned ol li the one explicitly set by calling set Default Charset with a non null argument on this container if any and this container exists or li li the parent s default charset if this container has a parent is not the workspace root or li li the charset returned by Resources Plugin get Encoding li ol p p Note that this method does not check whether the result is a supported charset name Callers should be prepared to handle code Unsupported Encoding Exception code where this charset is used p return the name of the default charset encoding for this container or code null code throws Core Exception if this method fails see I File get Charset since 3 0  checkImplicit setDefaultCharset checkImplicit setDefaultCharset ResourcesPlugin getEncoding UnsupportedEncodingException CoreException IFile getCharset
Returns a handle to the file identified by the given path in this container p This is a resource handle operation neither the resource nor the result need exist in the workspace The validation check on the resource name path is not done when the resource handle is constructed rather it is done automatically as the resource is created p The supplied path may be absolute or relative in either case it is interpreted as relative to this resource and is appended to this container s full path to form the full path of the resultant resource A trailing separator is ignored The path of the resulting resource must have at least two segments p param path the path of the member file return the handle of the member file see get Folder I Path  getFolder IPath
Returns a handle to the folder identified by the given path in this container p This is a resource handle operation neither the resource nor the result need exist in the workspace The validation check on the resource name path is not done when the resource handle is constructed rather it is done automatically as the resource is created p The supplied path may be absolute or relative in either case it is interpreted as relative to this resource and is appended to this container s full path to form the full path of the resultant resource A trailing separator is ignored The path of the resulting resource must have at least two segments p param path the path of the member folder return the handle of the member folder see get File I Path  getFile IPath
Returns a list of existing member resources projects folders and files in this resource in no particular order p This is a convenience method fully equivalent to code members I Resource NONE code Team private member resources are b not b included in the result p p Note that the members of a project or folder are the files and folders immediately contained within it The members of the workspace root are the projects in the workspace p return an array of members of this resource exception Core Exception if this request fails Reasons include ul li This resource does not exist li li This resource is a project that is not open li ul see find Member I Path see I Resource is Accessible  IResource CoreException findMember IPath IResource isAccessible
Returns a list of all member resources projects folders and files in this resource in no particular order p This is a convenience method fully equivalent to pre members include Phantoms INCLUDE PHANTOMS I Resource NONE pre Team private member resources are b not b included in the result p param include Phantoms code true code if phantom resources are of interest code false code if phantom resources are not of interest return an array of members of this resource exception Core Exception if this request fails Reasons include ul li This resource does not exist li li code include Phantoms code is code false code and this resource does not exist li li code include Phantoms code is code false code and this resource is a project that is not open li ul see members int see I Resource exists see I Resource is Phantom  includePhantoms INCLUDE_PHANTOMS IResource includePhantoms CoreException includePhantoms includePhantoms IResource IResource isPhantom
Returns a list of all member resources projects folders and files in this resource in no particular order p If the code INCLUDE PHANTOMS code flag is not specified in the member flags recommended only member resources that exist will be returned If the code INCLUDE PHANTOMS code flag is specified the result will also include any phantom member resources the workspace is keeping track of p p If the code INCLUDE TEAM PRIVATE MEMBERS code flag is specified in the member flags team private members will be included along with the others If the code INCLUDE TEAM PRIVATE MEMBERS code flag is not specified recommended the result will omit any team private member resources p param member Flags bit wise or of member flag constants code INCLUDE PHANTOMS code and code INCLUDE TEAM PRIVATE MEMBERS code indicating which members are of interest return an array of members of this resource exception Core Exception if this request fails Reasons include ul li This resource does not exist li li the code INCLUDE PHANTOMS code flag is not specified and this resource does not exist li li the code INCLUDE PHANTOMS code flag is not specified and this resource is a project that is not open li ul see I Resource exists since 2 0  INCLUDE_PHANTOMS INCLUDE_PHANTOMS INCLUDE_TEAM_PRIVATE_MEMBERS INCLUDE_TEAM_PRIVATE_MEMBERS memberFlags INCLUDE_PHANTOMS INCLUDE_TEAM_PRIVATE_MEMBERS CoreException INCLUDE_PHANTOMS INCLUDE_PHANTOMS IResource
Returns a list of recently deleted files inside this container that have one or more saved states in the local history The depth parameter determines how deep inside the container to look This resource may or may not exist in the workspace p When applied to an existing project resource this method returns recently deleted files with saved states in that project Note that local history is maintained with each individual project and gets discarded when a project is deleted from the workspace If applied to a deleted project this method returns the empty list p p When applied to the workspace root resource depth infinity this method returns all recently deleted files with saved states in all existing projects p p When applied to a folder or project resource depth one this method returns all recently deleted member files with saved states p p When applied to a folder resource depth zero this method returns an empty list unless there was a recently deleted file with saved states at the same path as the folder p p This method is long running progress and cancellation are provided by the given progress monitor p param depth depth limit one of code DEPTH ZERO code code DEPTH ONE code or code DEPTH INFINITE code param monitor a progress monitor or code null code if progress reporting and cancellation are not desired return an array of recently deleted files exception Core Exception if this method fails see I File get History I Progress Monitor since 2 0  DEPTH_ZERO DEPTH_ONE DEPTH_INFINITE CoreException IFile getHistory IProgressMonitor
Sets the default charset for this container Passing a value of code null code will remove the default charset setting for this resource param charset a charset string or code null code exception Core Exception if this method fails Reasons include ul li This resource does not exist li li An error happened while persisting this setting li ul see I Container get Default Charset since 3 0 deprecated Replaced by link set Default Charset String I Progress Monitor which is a workspace operation and reports changes in resource deltas  CoreException IContainer getDefaultCharset setDefaultCharset IProgressMonitor
Sets the default charset for this container Passing a value of code null code will remove the default charset setting for this resource p This method changes resources these changes will be reported in a subsequent resource change event including an indication that the encoding of affected resources has been changed p p This method is long running progress and cancellation are provided by the given progress monitor p param charset a charset string or code null code param monitor a progress monitor or code null code if progress reporting is not desired exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided exception Core Exception if this method fails Reasons include ul li This resource is not accessible li li An error happened while persisting this setting li li Resource changes are disallowed during certain types of resource change event notification See link I Resource Change Event for more details li ul see I Container get Default Charset since 3 0  OperationCanceledException CoreException IResourceChangeEvent IContainer getDefaultCharset

public interface I Encoded Storage extends I Storage Returns the name of a charset encoding to be used when decoding this storage s contents into characters Returns code null code if a proper encoding cannot be determined p Note that this method does not check whether the result is a supported charset name Callers should be prepared to handle code Unsupported Encoding Exception code where this charset is used p return the name of a charset or code null code exception Core Exception if an error happens while determining the charset See any refinements for more information see I Storage get Contents  IEncodedStorage IStorage UnsupportedEncodingException CoreException IStorage getContents

Appends the entire contents of the given stream to this file p This is a convenience method fully equivalent to pre append Contents source keep History KEEP HISTORY I Resource NONE force FORCE I Resource NONE monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this file s content have been changed p p This method is long running progress and cancelation are provided by the given progress monitor p param source an input stream containing the new contents of the file param force a flag controlling how to deal with resources that are not in sync with the local file system param keep History a flag indicating whether or not to store the current contents in the local history param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource does not exist li li The corresponding location in the local file system is occupied by a directory li li The workspace is not in sync with the corresponding location in the local file system and code force code is code false code li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li li The file modification validator disallowed the change li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see append Contents java io Input Stream int I Progress Monitor  appendContents keepHistory KEEP_HISTORY IResource IResource keepHistory CoreException IResourceChangeEvent OperationCanceledException appendContents InputStream IProgressMonitor
Appends the entire contents of the given stream to this file The stream which must not be code null code will get closed whether this method succeeds or fails p The code FORCE code update flag controls how this method deals with cases where the workspace is not completely in sync with the local file system If code FORCE code is not specified the method will only attempt to overwrite a corresponding file in the local file system provided it is in sync with the workspace This option ensures there is no unintended data loss it is the recommended setting However if code FORCE code is specified an attempt will be made to write a corresponding file in the local file system overwriting any existing one if need be In either case if this method succeeds the resource will be marked as being local even if it wasn t before p p If this file is non local then this method will always fail The only exception is when code FORCE code is specified and the file exists in the local file system In this case the file is made local and the given contents are appended p p The code KEEP HISTORY code update flag controls whether or not a copy of current contents of this file should be captured in the workspace s local history properties are not recorded in the local history The local history mechanism serves as a safety net to help the user recover from mistakes that might otherwise result in data loss Specifying code KEEP HISTORY code is recommended except in circumstances where past states of the files are of no conceivable interest to the user Note that local history is maintained with each individual project and gets discarded when a project is deleted from the workspace This flag is ignored if the file was not previously local p p Update flags other than code FORCE code and code KEEP HISTORY code are ignored p p Prior to modifying the contents of this file the file modification validator if provided by the VCM plug in will be given a chance to perform any last minute preparations Validation is performed by calling code I File Modification Validator validate Save code on this file If the validation fails then this operation will fail p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this file s content have been changed p p This method is long running progress and cancelation are provided by the given progress monitor p param source an input stream containing the new contents of the file param update Flags bit wise or of update flag constants code FORCE code and code KEEP HISTORY code param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource does not exist li li The corresponding location in the local file system is occupied by a directory li li The workspace is not in sync with the corresponding location in the local file system and code FORCE code is not specified li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li li The file modification validator disallowed the change li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource Rule Factory modify Rule I Resource since 2 0  KEEP_HISTORY KEEP_HISTORY KEEP_HISTORY IFileModificationValidator validateSave updateFlags KEEP_HISTORY CoreException IResourceChangeEvent OperationCanceledException IResourceRuleFactory modifyRule IResource
Creates a new file resource as a member of this handle s parent resource p This is a convenience method fully equivalent to pre create source force FORCE I Resource NONE monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that the file has been added to its parent p p This method is long running progress and cancellation are provided by the given progress monitor p param source an input stream containing the initial contents of the file or code null code if the file should be marked as not local param force a flag controlling how to deal with resources that are not in sync with the local file system param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource already exists in the workspace li li The parent of this resource does not exist li li The project of this resource is not accessible li li The parent contains a resource of a different type at the same path as this resource li li The name of this resource is not valid according to code I Workspace validate Name code li li The corresponding location in the local file system is occupied by a directory li li The corresponding location in the local file system is occupied by a file and code force code is code false code li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided  IResource CoreException IWorkspace validateName IResourceChangeEvent OperationCanceledException
Creates a new file resource as a member of this handle s parent resource The resource s contents are supplied by the data in the given stream This method closes the stream whether it succeeds or fails If the stream is code null code then a file is not created in the local file system and the created file is marked as being non local p The code FORCE code update flag controls how this method deals with cases where the workspace is not completely in sync with the local file system If code FORCE code is not specified the method will only attempt to write a file in the local file system if it does not already exist This option ensures there is no unintended data loss it is the recommended setting However if code FORCE code is specified this method will attempt to write a corresponding file in the local file system overwriting any existing one if need be p p Update flags other than code FORCE code are ignored p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that the file has been added to its parent p p This method is long running progress and cancellation are provided by the given progress monitor p param source an input stream containing the initial contents of the file or code null code if the file should be marked as not local param update Flags bit wise or of update flag constants only code FORCE code is relevant here param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource already exists in the workspace li li The parent of this resource does not exist li li The project of this resource is not accessible li li The parent contains a resource of a different type at the same path as this resource li li The name of this resource is not valid according to code I Workspace validate Name code li li The corresponding location in the local file system is occupied by a directory li li The corresponding location in the local file system is occupied by a file and code FORCE code is not specified li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource Rule Factory create Rule I Resource since 2 0  updateFlags CoreException IWorkspace validateName IResourceChangeEvent OperationCanceledException IResourceRuleFactory createRule IResource
Creates a new file resource as a member of this handle s parent resource The file s contents will be located in the file specified by the given file system path The given path must be either an absolute file system path or a relative path whose first segment is the name of a workspace path variable p The code ALLOW MISSING LOCAL code update flag controls how this method deals with cases where the local file system file to be linked does not exist or is relative to a workspace path variable that is not defined If code ALLOW MISSING LOCAL code is specified the operation will suceed even if the local file is missing or the path is relative to an undefined variable If code ALLOW MISSING LOCAL code is not specified the operation will fail in the case where the local file system file does not exist or the path is relative to an undefined variable p p Update flags other than code ALLOW MISSING LOCAL code are ignored p p This method synchronizes this resource with the local file system at the given location p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that the file has been added to its parent p p This method is long running progress and cancellation are provided by the given progress monitor p param local Location a file system path where the file should be linked param update Flags bit wise or of update flag constants only ALLOW MISSING LOCAL is relevant here param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource already exists in the workspace li li The workspace contains a resource of a different type at the same path as this resource li li The parent of this resource does not exist li li The parent of this resource is not an open project li li The name of this resource is not valid according to code I Workspace validate Name code li li The corresponding location in the local file system does not exist or is relative to an undefined variable and code ALLOW MISSING LOCAL code is not specified li li The corresponding location in the local file system is occupied by a directory as opposed to a file li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li li The team provider for the project which contains this folder does not permit linked resources li li This folder s project contains a nature which does not permit linked resources li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource is Linked see I Resource ALLOW MISSING LOCAL since 2 1  ALLOW_MISSING_LOCAL ALLOW_MISSING_LOCAL ALLOW_MISSING_LOCAL ALLOW_MISSING_LOCAL localLocation updateFlags ALLOW_MISSING_LOCAL CoreException IWorkspace validateName ALLOW_MISSING_LOCAL IResourceChangeEvent OperationCanceledException IResource isLinked IResource ALLOW_MISSING_LOCAL
Deletes this file from the workspace p This is a convenience method fully equivalent to pre delete keep History KEEP HISTORY I Resource NONE force FORCE I Resource NONE monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this folder has been removed from its parent p p This method is long running progress and cancellation are provided by the given progress monitor p param force a flag controlling whether resources that are not in sync with the local file system will be tolerated param keep History a flag controlling whether files under this folder should be stored in the workspace s local history param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource could not be deleted for some reason li li This resource is out of sync with the local file system and code force code is code false code li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource delete int I Progress Monitor see I Resource Rule Factory delete Rule I Resource  keepHistory KEEP_HISTORY IResource IResource keepHistory CoreException IResourceChangeEvent OperationCanceledException IResource IProgressMonitor IResourceRuleFactory deleteRule IResource
Returns the name of a charset to be used when decoding the contents of this file into characters p This refinement of the corresponding code I Encoding Storage code method is a convenience method fully equivalent to pre get Charset true pre p p b Note b this method does not check whether the result is a supported charset name Callers should be prepared to handle code Unsupported Encoding Exception code where this charset is used p return the name of a charset exception Core Exception if this method fails Reasons include ul li This resource could not be read li li This resource is not local li li The corresponding location in the local file system is occupied by a directory li ul see I File get Charset boolean see I Encoded Storage get Charset see I Container get Default Charset since 3 0  IEncodingStorage getCharset UnsupportedEncodingException CoreException IFile getCharset IEncodedStorage getCharset IContainer getDefaultCharset
Returns the name of a charset to be used when decoding the contents of this file into characters p If check Implicit is code false code this method will return the charset defined by calling code set Charset code provided this file exists or code null code otherwise p p If check Implicit is code true code this method uses the following algorithm to determine the charset to be returned ol li the charset defined by calling set Charset if any and this file exists or li li the charset automatically discovered based on this file s contents if one can be determined or li li the default encoding for this file s parent as defined by code I Container get Default Charset code li ol p p b Note b this method does not check whether the result is a supported charset name Callers should be prepared to handle code Unsupported Encoding Exception code where this charset is used p return the name of a charset or code null code exception Core Exception if this method fails Reasons include ul li This resource could not be read li li This resource is not local li li The corresponding location in the local file system is occupied by a directory li ul see I Encoded Storage get Charset see I Container get Default Charset since 3 0  checkImplicit setCharset checkImplicit setCharset IContainer getDefaultCharset UnsupportedEncodingException CoreException IEncodedStorage getCharset IContainer getDefaultCharset
Returns a description for this file s current contents Returns code null code if a description cannot be obtained p Calling this method produces a similar effect as calling code get Description For get Contents get Name I Content Description ALL code on code I Content Type Manager code but provides better opportunities for improved performance Therefore when manipulating code I File code s clients should call this method instead of code I Content Type Manager get Description For code p return a description for this file s current contents or code null code throws Core Exception if this method fails Reasons include ul li This resource does not exist li li This resource could not be read li li This resource is not local li li The corresponding location in the local file system is occupied by a directory li ul see I Content Description see I Content Type Manager get Description For Input Stream String Qualified Name since 3 0  getDescriptionFor getContents getName IContentDescription IContentTypeManager IFile IContentTypeManager getDescriptionFor CoreException IContentDescription IContentTypeManager getDescriptionFor InputStream QualifiedName
Returns an open input stream on the contents of this file This refinement of the corresponding code I Storage code method returns an open input stream on the contents of this file The client is responsible for closing the stream when finished return an input stream containing the contents of the file exception Core Exception if this method fails Reasons include ul li This resource does not exist li li This resource is not local li li The workspace is not in sync with the corresponding location in the local file system li ul  IStorage CoreException
This refinement of the corresponding code I Storage code method returns an open input stream on the contents of this file The client is responsible for closing the stream when finished If force is code true code the file is opened and an input stream returned regardless of the sync state of the file The file is not synchronized with the workspace If force is code false code the method fails if not in sync param force a flag controlling how to deal with resources that are not in sync with the local file system return an input stream containing the contents of the file exception Core Exception if this method fails Reasons include ul li This resource does not exist li li This resource is not local li li The workspace is not in sync with the corresponding location in the local file system and force is code false code li ul  IStorage CoreException
Returns a constant identifying the character encoding of this file or ENCODING UNKNOWN if it could not be determined The returned constant will be one of the ENCODING  constants defined on I File This method attempts to guess the file s character encoding by analyzing the first few bytes of the file If no identifying pattern is found at the beginning of the file ENC UNKNOWN will be returned This method will not attempt any complex analysis of the file to make a guess at the encoding that is used return The character encoding of this file exception Core Exception if this method fails Reasons include ul li This resource does not exist li li This resource could not be read li li This resource is not local li li The corresponding location in the local file system is occupied by a directory li ul deprecated use I File get Charset instead  ENCODING_UNKNOWN ENCODING_ IFile ENC_UNKNOWN CoreException IFile getCharset
Returns the full path of this file This refinement of the corresponding code I Storage code and code I Resource code methods links the semantics of resource and storage object paths such that code I File code s always have a path and that path is relative to the containing workspace see I Resource get Full Path see I Storage get Full Path  IStorage IResource IFile IResource getFullPath IStorage getFullPath
Returns a list of past states of this file known to this workspace Recently added states first p This method is long running progress and cancellation are provided by the given progress monitor p param monitor a progress monitor or code null code if progress reporting is not desired return an array of states of this file exception Core Exception if this method fails exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided  CoreException OperationCanceledException
Returns the name of this file This refinement of the corresponding code I Storage code and code I Resource code methods links the semantics of resource and storage object names such that code I File code s always have a name and that name equivalent to the last segment of its full path see I Resource get Name see I Storage get Name  IStorage IResource IFile IResource getName IStorage getName
Returns whether this file is read only This refinement of the corresponding code I Storage code and code I Resource code methods links the semantics of read only resources and read only storage objects see I Resource is Read Only see I Storage is Read Only  IStorage IResource IResource isReadOnly IStorage isReadOnly
Moves this resource to be at the given location p This is a convenience method fully equivalent to pre move destination keep History KEEP HISTORY I Resource NONE force FORCE I Resource NONE monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this file has been removed from its parent and a new file has been added to the parent of the destination p p This method is long running progress and cancellation are provided by the given progress monitor p param destination the destination path param force a flag controlling whether resources that are not in sync with the local file system will be tolerated param keep History a flag controlling whether files under this folder should be stored in the workspace s local history param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this resource could not be moved Reasons include ul li This resource does not exist li li This resource is not local li li The resource corresponding to the parent destination path does not exist li li The resource corresponding to the parent destination path is a closed project li li A resource at destination path does exist li li A resource of a different type exists at the destination path li li This resource is out of sync with the local file system and code force code is code false code li li The workspace and the local file system are out of sync at the destination resource or one of its descendents li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource move I Path int I Progress Monitor see I Resource Rule Factory move Rule I Resource I Resource  keepHistory KEEP_HISTORY IResource IResource keepHistory CoreException IResourceChangeEvent OperationCanceledException IResource IPath IProgressMonitor IResourceRuleFactory moveRule IResource IResource
Sets the charset for this file Passing a value of code null code will remove the charset setting for this resource param new Charset a charset name or code null code exception Core Exception if this method fails Reasons include ul li This resource does not exist li li An error happened while persisting this setting li ul see get Charset since 3 0 deprecated Replaced by link set Charset String I Progress Monitor which is a workspace operation and reports changes in resource deltas  newCharset CoreException getCharset setCharset IProgressMonitor
Sets the charset for this file Passing a value of code null code will remove the charset setting for this resource p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this file s encoding has changed p p This method is long running progress and cancellation are provided by the given progress monitor p param new Charset a charset name or code null code param monitor a progress monitor or code null code if progress reporting is not desired exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided exception Core Exception if this method fails Reasons include ul li This resource does not exist li li An error happened while persisting this setting li li Resource changes are disallowed during certain types of resource change event notification See link I Resource Change Event for more details li ul see get Charset since 3 0  newCharset OperationCanceledException CoreException IResourceChangeEvent getCharset
Sets the contents of this file to the bytes in the given input stream p This is a convenience method fully equivalent to pre set Contents source keep History KEEP HISTORY I Resource NONE force FORCE I Resource NONE monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this file s contents have been changed p p This method is long running progress and cancellation are provided by the given progress monitor p param source an input stream containing the new contents of the file param force a flag controlling how to deal with resources that are not in sync with the local file system param keep History a flag indicating whether or not store the current contents in the local history param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource does not exist li li The corresponding location in the local file system is occupied by a directory li li The workspace is not in sync with the corresponding location in the local file system and code force code is code false code li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li li The file modification validator disallowed the change li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see set Contents java io Input Stream int I Progress Monitor  setContents keepHistory KEEP_HISTORY IResource IResource keepHistory CoreException IResourceChangeEvent OperationCanceledException setContents InputStream IProgressMonitor
Sets the contents of this file to the bytes in the given file state p This is a convenience method fully equivalent to pre set Contents source keep History KEEP HISTORY I Resource NONE force FORCE I Resource NONE monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this file s content have been changed p p This method is long running progress and cancellation are provided by the given progress monitor p param source a previous state of this resource param force a flag controlling how to deal with resources that are not in sync with the local file system param keep History a flag indicating whether or not store the current contents in the local history param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource does not exist li li The state does not exist li li The corresponding location in the local file system is occupied by a directory li li The workspace is not in sync with the corresponding location in the local file system and code force code is code false code li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li li The file modification validator disallowed the change li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see set Contents I File State int I Progress Monitor  setContents keepHistory KEEP_HISTORY IResource IResource keepHistory CoreException IResourceChangeEvent OperationCanceledException setContents IFileState IProgressMonitor
Sets the contents of this file to the bytes in the given input stream The stream will get closed whether this method succeeds or fails If the stream is code null code then the content is set to be the empty sequence of bytes p The code FORCE code update flag controls how this method deals with cases where the workspace is not completely in sync with the local file system If code FORCE code is not specified the method will only attempt to overwrite a corresponding file in the local file system provided it is in sync with the workspace This option ensures there is no unintended data loss it is the recommended setting However if code FORCE code is specified an attempt will be made to write a corresponding file in the local file system overwriting any existing one if need be In either case if this method succeeds the resource will be marked as being local even if it wasn t before p p The code KEEP HISTORY code update flag controls whether or not a copy of current contents of this file should be captured in the workspace s local history properties are not recorded in the local history The local history mechanism serves as a safety net to help the user recover from mistakes that might otherwise result in data loss Specifying code KEEP HISTORY code is recommended except in circumstances where past states of the files are of no conceivable interest to the user Note that local history is maintained with each individual project and gets discarded when a project is deleted from the workspace This flag is ignored if the file was not previously local p p Update flags other than code FORCE code and code KEEP HISTORY code are ignored p p Prior to modifying the contents of this file the file modification validator if provided by the VCM plug in will be given a chance to perform any last minute preparations Validation is performed by calling code I File Modification Validator validate Save code on this file If the validation fails then this operation will fail p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this file s content have been changed p p This method is long running progress and cancellation are provided by the given progress monitor p param source an input stream containing the new contents of the file param update Flags bit wise or of update flag constants code FORCE code and code KEEP HISTORY code param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource does not exist li li The corresponding location in the local file system is occupied by a directory li li The workspace is not in sync with the corresponding location in the local file system and code FORCE code is not specified li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li li The file modification validator disallowed the change li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource Rule Factory modify Rule I Resource since 2 0  KEEP_HISTORY KEEP_HISTORY KEEP_HISTORY IFileModificationValidator validateSave updateFlags KEEP_HISTORY CoreException IResourceChangeEvent OperationCanceledException IResourceRuleFactory modifyRule IResource
Sets the contents of this file to the bytes in the given file state p The code FORCE code update flag controls how this method deals with cases where the workspace is not completely in sync with the local file system If code FORCE code is not specified the method will only attempt to overwrite a corresponding file in the local file system provided it is in sync with the workspace This option ensures there is no unintended data loss it is the recommended setting However if code FORCE code is specified an attempt will be made to write a corresponding file in the local file system overwriting any existing one if need be In either case if this method succeeds the resource will be marked as being local even if it wasn t before p p The code KEEP HISTORY code update flag controls whether or not a copy of current contents of this file should be captured in the workspace s local history properties are not recorded in the local history The local history mechanism serves as a safety net to help the user recover from mistakes that might otherwise result in data loss Specifying code KEEP HISTORY code is recommended except in circumstances where past states of the files are of no conceivable interest to the user Note that local history is maintained with each individual project and gets discarded when a project is deleted from the workspace This flag is ignored if the file was not previously local p p Update flags other than code FORCE code and code KEEP HISTORY code are ignored p p Prior to modifying the contents of this file the file modification validator if provided by the VCM plug in will be given a chance to perform any last minute preparations Validation is performed by calling code I File Modification Validator validate Save code on this file If the validation fails then this operation will fail p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this file s content have been changed p p This method is long running progress and cancellation are provided by the given progress monitor p param source a previous state of this resource param update Flags bit wise or of update flag constants code FORCE code and code KEEP HISTORY code param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource does not exist li li The state does not exist li li The corresponding location in the local file system is occupied by a directory li li The workspace is not in sync with the corresponding location in the local file system and code FORCE code is not specified li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li li The file modification validator disallowed the change li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource Rule Factory modify Rule I Resource since 2 0  KEEP_HISTORY KEEP_HISTORY KEEP_HISTORY IFileModificationValidator validateSave updateFlags KEEP_HISTORY CoreException IResourceChangeEvent OperationCanceledException IResourceRuleFactory modifyRule IResource

public interface I File Modification Validator Validates that the given files can be modified The files must all exist in the workspace The optional context object may be supplied if UI based validation is required If the context is code null code the validator must attempt to perform the validation in a headless manner The returned status is code I Status OK code if this validator believes the given file can be modified Other return statuses indicate the reason why the individual files cannot be modified param files the files that are to be modified these files must all exist in the workspace param context the code org eclipse swt widgets Shell code that is to be used to parent any dialogs with the user or code null code if there is no UI context declared as an code Object code to avoid any direct references on the SWT component return a status object that is OK if things are fine otherwise a status describing reasons why modifying the given files is not reasonable see I Workspace validate Edit I File Object  IFileModificationValidator IStatus IWorkspace validateEdit IFile
Validates that the given file can be saved This method is called from code I File set Contents code and code I File append Contents code before any attempt to write data to disk The returned status is code I Status OK code if this validator believes the given file can be successfully saved In all other cases the return value is a non OK status Note that a return value of code I Status OK code does not guarantee that the save will succeed param file the file that is to be modified this file must exist in the workspace return a status indicating whether or not it is reasonable to try writing to the given file code I Status OK code indicates a save should be attempted see I File set Contents java io Input Stream int org eclipse core runtime I Progress Monitor see I File append Contents java io Input Stream int org eclipse core runtime I Progress Monitor  IFile setContents IFile appendContents IStatus IStatus IStatus IFile setContents InputStream IProgressMonitor IFile appendContents InputStream IProgressMonitor

public interface I File State extends I Encoded Storage I Adaptable Returns whether this file state still exists in the local history return code true code if this state exists and code false code if it does not  IFileState IEncodedStorage IAdaptable
Returns an open input stream on the contents of this file state This refinement of the corresponding code I Storage code method returns an open input stream on the contents this file state represents The client is responsible for closing the stream when finished return an input stream containing the contents of the file exception Core Exception if this method fails Reasons include ul li This state does not exist li ul  IStorage CoreException
Returns the full path of this file state This refinement of the corresponding code I Storage code method specifies that code I File State code s always have a path and that path is the full workspace path of the file represented by this state see I Resource get Full Path see I Storage get Full Path  IStorage IFileState IResource getFullPath IStorage getFullPath
Returns the modification time of the file If you create a file at 9 00 and modify it at 11 00 the file state added to the history at 11 00 will have 9 00 as its modification time p Note that is used only to give the user a general idea of how old this file state is return the time of last modification in milliseconds since January 1 1970 00 00 00 GMT 
Returns the name of this file state This refinement of the corresponding code I Storage code method specifies that code I File State code s always have a name and that name is equivalent to the last segment of the full path of the resource represented by this state see I Resource get Name see I Storage get Name  IStorage IFileState IResource getName IStorage getName
Returns whether this file state is read only This refinement of the corresponding code I Storage code method restricts code I File State code s to always be read only see I Storage  IStorage IFileState IStorage

Creates a new folder resource as a member of this handle s parent resource p This is a convenience method fully equivalent to pre create force FORCE I Resource NONE local monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that the folder has been added to its parent p p This method is long running progress and cancellation are provided by the given progress monitor p param force a flag controlling how to deal with resources that are not in sync with the local file system param local a flag controlling whether or not the folder will be local after the creation param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource already exists in the workspace li li The workspace contains a resource of a different type at the same path as this resource li li The parent of this resource does not exist li li The parent of this resource is a project that is not open li li The parent contains a resource of a different type at the same path as this resource li li The name of this resource is not valid according to code I Workspace validate Name code li li The corresponding location in the local file system is occupied by a file as opposed to a directory li li The corresponding location in the local file system is occupied by a folder and code force code is code false code li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Folder create int boolean I Progress Monitor  IResource CoreException IWorkspace validateName IResourceChangeEvent OperationCanceledException IFolder IProgressMonitor
Creates a new folder resource as a member of this handle s parent resource p The code FORCE code update flag controls how this method deals with cases where the workspace is not completely in sync with the local file system If code FORCE code is not specified the method will only attempt to create a directory in the local file system if there isn t one already This option ensures there is no unintended data loss it is the recommended setting However if code FORCE code is specified this method will be deemed a success even if there already is a corresponding directory p p Update flags other than code FORCE code are ignored p p This method synchronizes this resource with the local file system p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that the folder has been added to its parent p p This method is long running progress and cancellation are provided by the given progress monitor p param update Flags bit wise or of update flag constants only code FORCE code is relevant here param local a flag controlling whether or not the folder will be local after the creation param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource already exists in the workspace li li The workspace contains a resource of a different type at the same path as this resource li li The parent of this resource does not exist li li The parent of this resource is a project that is not open li li The parent contains a resource of a different type at the same path as this resource li li The name of this resource is not valid according to code I Workspace validate Name code li li The corresponding location in the local file system is occupied by a file as opposed to a directory li li The corresponding location in the local file system is occupied by a folder and code FORCE code is not specified li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource Rule Factory create Rule I Resource since 2 0  updateFlags CoreException IWorkspace validateName IResourceChangeEvent OperationCanceledException IResourceRuleFactory createRule IResource
Creates a new folder resource as a member of this handle s parent resource The folder s contents will be located in the directory specified by the given file system path The given path must be either an absolute file system path or a relative path whose first segment is the name of a workspace path variable p The code ALLOW MISSING LOCAL code update flag controls how this method deals with cases where the local file system directory to be linked does not exist or is relative to a workspace path variable that is not defined If code ALLOW MISSING LOCAL code is specified the operation will suceed even if the local directory is missing or the path is relative to an undefined variable If code ALLOW MISSING LOCAL code is not specified the operation will fail in the case where the local file system directory does not exist or the path is relative to an undefined variable p p Update flags other than code ALLOW MISSING LOCAL code are ignored p p This method synchronizes this resource with the local file system at the given location p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that the folder has been added to its parent p p This method is long running progress and cancellation are provided by the given progress monitor p param local Location a file system path where the folder should be linked param update Flags bit wise or of update flag constants only ALLOW MISSING LOCAL is relevant here param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource already exists in the workspace li li The workspace contains a resource of a different type at the same path as this resource li li The parent of this resource does not exist li li The parent of this resource is not an open project li li The name of this resource is not valid according to code I Workspace validate Name code li li The corresponding location in the local file system does not exist or is relative to an undefined variable and code ALLOW MISSING LOCAL code is not specified li li The corresponding location in the local file system is occupied by a file as opposed to a directory li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li li The team provider for the project which contains this folder does not permit linked resources li li This folder s project contains a nature which does not permit linked resources li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource is Linked see I Resource ALLOW MISSING LOCAL since 2 1  ALLOW_MISSING_LOCAL ALLOW_MISSING_LOCAL ALLOW_MISSING_LOCAL ALLOW_MISSING_LOCAL localLocation updateFlags ALLOW_MISSING_LOCAL CoreException IWorkspace validateName ALLOW_MISSING_LOCAL IResourceChangeEvent OperationCanceledException IResource isLinked IResource ALLOW_MISSING_LOCAL
Deletes this resource from the workspace p This is a convenience method fully equivalent to pre delete keep History KEEP HISTORY I Resource NONE force FORCE I Resource NONE monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this folder has been removed from its parent p p This method is long running progress and cancellation are provided by the given progress monitor p param force a flag controlling whether resources that are not in sync with the local file system will be tolerated param keep History a flag controlling whether files under this folder should be stored in the workspace s local history param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource could not be deleted for some reason li li This resource is out of sync with the local file system and code force code is code false code li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource Rule Factory delete Rule I Resource see I Resource delete int I Progress Monitor  keepHistory KEEP_HISTORY IResource IResource keepHistory CoreException IResourceChangeEvent OperationCanceledException IResourceRuleFactory deleteRule IResource IResource IProgressMonitor
Returns a handle to the file with the given name in this folder p This is a resource handle operation neither the resource nor the result need exist in the workspace The validation check on the resource name path is not done when the resource handle is constructed rather it is done automatically as the resource is created p param name the string name of the member file return the handle of the member file see get Folder String  getFolder
Returns a handle to the folder with the given name in this folder p This is a resource handle operation neither the container nor the result need exist in the workspace The validation check on the resource name path is not done when the resource handle is constructed rather it is done automatically as the resource is created p param name the string name of the member folder return the handle of the member folder see get File String  getFile
Moves this resource so that it is located at the given path p This is a convenience method fully equivalent to pre move destination keep History KEEP HISTORY I Resource NONE force FORCE I Resource NONE monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this folder has been removed from its parent and a new folder has been added to the parent of the destination p p This method is long running progress and cancellation are provided by the given progress monitor p param destination the destination path param force a flag controlling whether resources that are not in sync with the local file system will be tolerated param keep History a flag controlling whether files under this folder should be stored in the workspace s local history param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this resource could not be moved Reasons include ul li This resource does not exist li li This resource or one of its descendents is not local li li The resource corresponding to the parent destination path does not exist li li The resource corresponding to the parent destination path is a closed project li li A resource at destination path does exist li li A resource of a different type exists at the destination path li li This resource or one of its descendents is out of sync with the local file system and code force code is code false code li li The workspace and the local file system are out of sync at the destination resource or one of its descendents li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource Rule Factory move Rule I Resource I Resource see I Resource move I Path int I Progress Monitor  keepHistory KEEP_HISTORY IResource IResource keepHistory CoreException IResourceChangeEvent OperationCanceledException IResourceRuleFactory moveRule IResource IResource IResource IPath IProgressMonitor

Deletes this marker from its associated resource This method has no effect if this marker does not exist exception Core Exception if this marker could not be deleted Reasons include ul li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul see I Resource Rule Factory marker Rule I Resource  CoreException IResourceChangeEvent IResourceRuleFactory markerRule IResource
Tests this marker for equality with the given object Two markers are equal if their id and resource are both equal param object the other object return an indication of whether the objects are equal 
Returns whether this marker exists in the workspace A marker exists if its resource exists and has a marker with the marker s id return code true code if this marker exists otherwise code false code 
Returns the attribute with the given name The result is an instance of one of the following classes code String code code Integer code or code Boolean code Returns code null code if the attribute is undefined param attribute Name the name of the attribute return the value or code null code if the attribute is undefined exception Core Exception if this method fails Reasons include ul li This marker does not exist li ul  attributeName CoreException
Returns the integer valued attribute with the given name Returns the given default value if the attribute is undefined or the marker does not exist or is not an integer value param attribute Name the name of the attribute param default Value the value to use if no value is found return the value or the default value if no value was found  attributeName defaultValue
Returns the string valued attribute with the given name Returns the given default value if the attribute is undefined or the marker does not exist or is not a string value param attribute Name the name of the attribute param default Value the value to use if no value is found return the value or the default value if no value was found  attributeName defaultValue
Returns the boolean valued attribute with the given name Returns the given default value if the attribute is undefined or the marker does not exist or is not a boolean value param attribute Name the name of the attribute param default Value the value to use if no value is found return the value or the default value if no value was found  attributeName defaultValue
Returns a map with all the attributes for the marker If the marker has no attributes then code null code is returned return a map of attribute keys and values key type code String code value type code String code code Integer code or code Boolean code or code null code exception Core Exception if this method fails Reasons include ul li This marker does not exist li ul  CoreException
Returns the attributes with the given names The result is an an array whose elements correspond to the elements of the given attribute name array Each element is code null code or an instance of one of the following classes code String code code Integer code or code Boolean code param attribute Names the names of the attributes return the values of the given attributes exception Core Exception if this method fails Reasons include ul li This marker does not exist li ul  attributeNames CoreException
Returns the time at which this marker was created return the difference measured in milliseconds between the time at which this marker was created and midnight January 1 1970 UTC or code 0L code if the creation time is not known this can occur in workspaces created using v2 0 or earlier exception Core Exception if this method fails Reasons include ul li This marker does not exist li ul since 2 1  CoreException
Returns the id of the marker The id of a marker is unique relative to the resource with which the marker is associated Marker ids are not globally unique return the id of the marker see I Resource find Marker long  IResource findMarker
Returns the resource with which this marker is associated return the resource with which this marker is associated 
Returns the type of this marker The returned marker type will not be code null code return the type of this marker exception Core Exception if this method fails Reasons include ul li This marker does not exist li ul  CoreException
Returns whether the type of this marker is considered to be a subtype of the given marker type return boolean code true code if the marker s type is the same as or a subtype of the given type exception Core Exception if this method fails Reasons include ul li This marker does not exist li ul  CoreException
Sets the integer valued attribute with the given name p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this marker has been modified p param attribute Name the name of the attribute param value the value exception Core Exception if this method fails Reasons include ul li This marker does not exist li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul see I Resource Rule Factory marker Rule I Resource  attributeName CoreException IResourceChangeEvent IResourceRuleFactory markerRule IResource
Sets the attribute with the given name The value must be code null code or an instance of one of the following classes code String code code Integer code or code Boolean code If the value is code null code the attribute is considered to be undefined p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this marker has been modified p param attribute Name the name of the attribute param value the value or code null code if the attribute is to be undefined exception Core Exception if this method fails Reasons include ul li This marker does not exist li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul see I Resource Rule Factory marker Rule I Resource  attributeName CoreException IResourceChangeEvent IResourceRuleFactory markerRule IResource
Sets the boolean valued attribute with the given name p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this marker has been modified p param attribute Name the name of the attribute param value the value exception Core Exception if this method fails Reasons include ul li This marker does not exist li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul see I Resource Rule Factory marker Rule I Resource  attributeName CoreException IResourceChangeEvent IResourceRuleFactory markerRule IResource
Sets the given attribute key value pairs on this marker The values must be code null code or an instance of one of the following classes code String code code Integer code or code Boolean code If a value is code null code the new value of the attribute is considered to be undefined p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this marker has been modified p param attribute Names an array of attribute names param values an array of attribute values exception Core Exception if this method fails Reasons include ul li This marker does not exist li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul see I Resource Rule Factory marker Rule I Resource  attributeNames CoreException IResourceChangeEvent IResourceRuleFactory markerRule IResource
Sets the attributes for this marker to be the ones contained in the given table The values must be an instance of one of the following classes code String code code Integer code or code Boolean code Attributes previously set on the marker but not included in the given map are considered to be removals Setting the given map to be code null code is equivalent to removing all marker attributes p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this marker has been modified p param attributes a map of attribute names to attribute values key type code String code value type code String code code Integer code or code Boolean code or code null code exception Core Exception if this method fails Reasons include ul li This marker does not exist li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul see I Resource Rule Factory marker Rule I Resource  CoreException IResourceChangeEvent IResourceRuleFactory markerRule IResource

public interface I Marker Delta Returns the object attribute with the given name The result is an instance of one of the following classes code String code code Integer code or code Boolean code Returns code null code if the attribute is undefined The set of valid attribute names is defined elsewhere p If kind is code I Resource Delta ADDED code then the information is from the new marker otherwise it is from the old marker p param attribute Name the name of the attribute return the value or code null code if the attribute is undefined  IMarkerDelta IResourceDelta attributeName
Returns the integer valued attribute with the given name Returns the given default value if the attribute is undefined or is not an integer value p If kind is code I Resource Delta ADDED code then the information is from the new marker otherwise it is from the old marker p param attribute Name the name of the attribute param default Value the value to use if the attribute does not exist return the value or the default value if the attribute is undefined  IResourceDelta attributeName defaultValue
Returns the string valued attribute with the given name Returns the given default value if the attribute is undefined or is not a string value p If kind is code I Resource Delta ADDED code then the information is from the new marker otherwise it is from the old marker p param attribute Name the name of the attribute param default Value the value to use if the attribute does not exist return the value or the default value if the attribute is undefined  IResourceDelta attributeName defaultValue
Returns the boolean valued attribute with the given name Returns the given default value if the attribute is undefined or is not a boolean value p If kind is code I Resource Delta ADDED code then the information is from the new marker otherwise it is from the old marker p param attribute Name the name of the attribute param default Value the value to use if the attribute does not exist return the value or the default value if the attribute is undefined  IResourceDelta attributeName defaultValue
Returns a Map with all the attributes for the marker The result is a Map whose keys are attributes names and whose values are attribute values Each value an instance of one of the following classes code String code code Integer code or code Boolean code If the marker has no attributes then code null code is returned p If kind is code I Resource Delta ADDED code then the information is from the new marker otherwise it is from the old marker p return a map of attribute keys and values key type code String code value type code String code code Integer code or code Boolean code or code null code  IResourceDelta
Returns the attributes with the given names The result is an array whose elements correspond to the elements of the given attribute name array Each element is code null code or an instance of one of the following classes code String code code Integer code or code Boolean code p If kind is code I Resource Delta ADDED code then the information is from the new marker otherwise it is from the old marker p param attribute Names the names of the attributes return the values of the given attributes  IResourceDelta attributeNames
Returns the id of the marker The id of a marker is unique relative to the resource with which the marker is associated Marker ids are not globally unique return the id of the marker 
Returns the kind of this marker delta one of code I Resource Delta ADDED code code I Resource Delta REMOVED code or code I Resource Delta CHANGED code return the kind of marker delta see I Resource Delta ADDED see I Resource Delta REMOVED see I Resource Delta CHANGED  IResourceDelta IResourceDelta IResourceDelta IResourceDelta IResourceDelta IResourceDelta
Returns the marker described by this change If kind is code I Resource Delta REMOVED code then this is the old marker otherwise this is the new marker Note that if the marker was deleted the value returned cannot be used to access attributes return the marker  IResourceDelta
Returns the resource with which this marker is associated return the resource 
Returns the type of this marker p If kind is code I Resource Delta ADDED code then the information is from the new marker otherwise it is from the old marker p return the type of this marker  IResourceDelta
Returns whether the type of this marker is considered to be a subtype of the given marker type p If kind is code I Resource Delta ADDED code then the information is from the new marker otherwise it is from the old marker p return boolean code true code if the marker s type is the same as or a subtype of the given type  IResourceDelta

Runs this builder in the specified manner Subclasses should implement this method to do the processing they require p If the build kind is code INCREMENTAL BUILD code or code AUTO BUILD code the code get Delta code method can be used during the invocation of this method to obtain information about what changes have occurred since the last invocation of this method Any resource delta acquired is valid only for the duration of the invocation of this method p p After completing a build this builder may return a list of projects for which it requires a resource delta the next time it is run This builder s project is implicitly included and need not be specified The build mechanism will attempt to maintain and compute deltas relative to the identified projects when asked the next time this builder is run Builders must re specify the list of interesting projects every time they are run as this is not carried forward beyond the next build Projects mentioned in return value but which do not exist will be ignored and no delta will be made available for them p p This method is long running progress and cancellation are provided by the given progress monitor All builders should report their progress and honor cancel requests in a timely manner Cancelation requests should be propagated to the caller by throwing code Operation Canceled Exception code p p All builders should try to be robust in the face of trouble In situations where failing the build by throwing code Core Exception code is the only option a builder has a choice of how best to communicate the problem back to the caller One option is to use the code BUILD FAILED code status code along with a suitable message another is to use a multi status containing finer grained problem diagnoses p param kind the kind of build being requested Valid values are ul li code FULL BUILD code indicates a full build li li code INCREMENTAL BUILD code indicates an incremental build li li code AUTO BUILD code indicates an automatically triggered incremental build auto building on li ul param args a table of builder specific arguments keyed by argument name key type code String code value type code String code code null code is equivalent to an empty map param monitor a progress monitor or code null code if progress reporting and cancellation are not desired return the list of projects for which this builder would like deltas the next time it is run or code null code if none exception Core Exception if this build fails see I Project build int String Map I Progress Monitor  INCREMENTAL_BUILD AUTO_BUILD getDelta OperationCanceledException CoreException BUILD_FAILED FULL_BUILD INCREMENTAL_BUILD AUTO_BUILD CoreException IProject IProgressMonitor
Clean is an opportunity for a builder to discard any additional state that has been computed as a result of previous builds It is recommended that builders override this method to delete all derived resources created by previous builds and to remove all markers of type code I Marker PROBLEM code that were created by previous invocations of the builder The platform will take care of discarding the builder s last built state there is no need to call code forget Last Built State code p p This method is called as a result of invocations of code I Workspace build code or code I Project build code where the build kind is code CLEAN BUILD code p This default implementation does nothing Subclasses may override p This method is long running progress and cancellation are provided by the given progress monitor All builders should report their progress and honor cancel requests in a timely manner Cancelation requests should be propagated to the caller by throwing code Operation Canceled Exception code p param monitor a progress monitor or code null code if progress reporting and cancellation are not desired exception Core Exception if this build fails see I Workspace build int I Progress Monitor see CLEAN BUILD since 3 0 protected void clean I Progress Monitor monitor throws Core Exception default implementation does nothing  IMarker forgetLastBuiltState IWorkspace IProject CLEAN_BUILD OperationCanceledException CoreException IWorkspace IProgressMonitor CLEAN_BUILD IProgressMonitor CoreException
Requests that this builder forget any state it may be retaining regarding previously built states Typically this means that the next time the builder runs it will have to do a full build since it does not have any state upon which to base an incremental build public final void forget Last Built State super forget Last Built State  forgetLastBuiltState forgetLastBuiltState
Returns the resource delta recording the changes in the given project since the last time this builder was run code null code is returned if no such delta is available An empty delta is returned if no changes have occurred If code null code is returned clients should assume that unspecified changes have occurred and take the appropriate action p The system reserves the right to trim old state in an effort to conserve space As such callers should be prepared to receive code null code even if they previously requested a delta for a particular project by returning that project from a code build code call p p A non code null code delta will only be supplied for the given project if either the result returned from the previous code build code included the project or the project is the one associated with this builder p p If the given project was mentioned in the previous code build code and subsequently deleted a non code null code delta containing the deletion will be returned If the given project was mentioned in the previous code build code and was subsequently created the returned value will be code null code p p A valid delta will be returned only when this method is called during a build The delta returned will be valid only for the duration of the enclosing build execution p return the resource delta for the project or code null code public final I Resource Delta get Delta I Project project return super get Delta project  IResourceDelta getDelta IProject getDelta
Returns the project for which this builder is defined return the project public final I Project get Project return super get Project  IProject getProject getProject
Returns whether the given project has already been built during this build iteration p When the entire workspace is being built the projects are built in linear sequence This method can be used to determine if another project preceeds this builder s project in that build sequence If only a single project is being built then there is no build order and this method will always return code false code p param project the project to check against in the current build order return code true code if the given project has been built in this iteration and code false code otherwise see need Rebuild since 2 1 public final boolean has Been Built I Project project return super has Been Built project  needRebuild hasBeenBuilt IProject hasBeenBuilt
Returns whether an interrupt request has been made for this build Background autobuild is interrupted when another thread tries to modify the workspace concurrently with the build thread When this occurs the build cycle is flagged as interrupted and the build will be terminated at the earliest opportunity This method allows long running builders to respond to this interruption in a timely manner Builders are not required to respond to interruption requests p return code true code if the build cycle has been interrupted and code false code otherwise since 3 0 public final boolean is Interrupted return super is Interrupted  isInterrupted isInterrupted
Indicates that this builder made changes that affect a project that preceeds this project in the currently executing build order and thus a rebuild will be necessary p This is an advanced feature that builders should use with caution This can cause workspace builds to iterate until no more builders require rebuilds p see has Been Built I Project since 2 1 public final void need Rebuild super need Rebuild  hasBeenBuilt IProject needRebuild needRebuild
Sets initialization data for this builder p This method is part of the code I Executable Extension code interface p p Subclasses are free to extend this method to pick up initialization parameters from the plug in plug in manifest code plugin xml code file but should be sure to invoke this method on their superclass p For example the following method looks for a boolean valued parameter named trace pre public void set Initialization Data I Configuration Element cfig String property Name Object data throws Core Exception super set Initialization Data cfig property Name data if data instanceof Hashtable Hashtable args Hashtable data String trace Value String args get quot trace quot TRACING trace Value null amp amp trace Value equals quot true quot pre p public void set Initialization Data I Configuration Element config String property Name Object data throws Core Exception do nothing  IExecutableExtension setInitializationData IConfigurationElement propertyName CoreException setInitializationData propertyName traceValue traceValue traceValue setInitializationData IConfigurationElement propertyName CoreException
Informs this builder that it is being started by the build management infrastructure By the time this method is run the builder s project is available and code set Initialization Data code has been called The default implementation should be called by all overriding methods see set Initialization Data I Configuration Element String Object protected void startup On Initialize reserved for future use  setInitializationData setInitializationData IConfigurationElement startupOnInitialize

Returns the variable s current value If the event type is code VARIABLE CHANGED code then it is the new value if the event type is code VARIABLE CREATED code then it is the new value or if the event type is code VARIABLE DELETED code then it will be code null code return the variable s current value or code null code  VARIABLE_CHANGED VARIABLE_CREATED VARIABLE_DELETED
Returns the affected variable s name return the affected variable s name 
Returns an object identifying the source of this event return an object identifying the source of this event see java util Event Object  EventObject
Returns the type of event being reported return one of the event type constants see VARIABLE CHANGED see VARIABLE CREATED see VARIABLE DELETED  VARIABLE_CHANGED VARIABLE_CREATED VARIABLE_DELETED

public interface I Path Variable Change Listener extends Event Listener Notification that a path variable has changed p This method is called when a path variable is added removed or has its value changed in the observed code I Path Variable Manager code object p param event the path variable change event object describing which variable changed and how see I Path Variable Manager add Change Listener I Path Variable Change Listener see I Path Variable Manager remove Change Listener I Path Variable Change Listener see I Path Variable Change Event  IPathVariableChangeListener EventListener IPathVariableManager IPathVariableManager addChangeListener IPathVariableChangeListener IPathVariableManager removeChangeListener IPathVariableChangeListener IPathVariableChangeEvent

Sets the path variable with the given name to be the specified value Depending on the value given and if the variable is currently defined or not there are several possible outcomes for this operation p ul li A new variable will be created if there is no variable defined with the given name and the given value is not code null code li li The referred variable s value will be changed if it already exists and the given value is not code null code li li The referred variable will be removed if a variable with the given name is currently defined and the given value is code null code li li The call will be ignored if a variable with the given name is not currently defined and the given value is code null code or if it is defined but the given value is equal to its current value li ul p If a variable is effectively changed created or removed by a call to this method notification will be sent to all registered listeners p param name the name of the variable param value the value for the variable may be code null code exception Core Exception if this method fails Reasons include ul li The variable name is not valid li li The variable value is relative li ul  CoreException
Returns the value of the path variable with the given name If there is no variable defined with the given name returns code null code param name the name of the variable to return the value for return the value for the variable or code null code if there is no variable defined with the given name 
Returns an array containing all defined path variable names return an array containing all defined path variable names 
Registers the given listener to receive notification of changes to path variables The listener will be notified whenever a variable has been added removed or had its value changed Has no effect if an identical path variable change listener is already registered param listener the listener see I Path Variable Change Listener  IPathVariableChangeListener
Removes the given path variable change listener from the listeners list Has no effect if an identical listener is not registered param listener the listener see I Path Variable Change Listener  IPathVariableChangeListener
Resolves a relative code I Path code object potentially containing a variable reference as its first segment replacing the variable reference if any with the variable s value which is a concrete absolute path If the given path is absolute or has a non code null code device then no variable substitution is done and that path is returned as is If the given path is relative and has a code null code device but the first segment does not correspond to a defined variable then the path is returned as is p If the given path is code null code then code null code will be returned In all other cases the result will be non code null code p p For example consider the following collection of path variables p ul li TEMP c temp li li BACKUP tmp backup li ul p The following paths would be resolved as p c bin c bin p p c TEMP c TEMP p p TEMP TEMP p p TEMP c temp p p TEMP foo c temp foo p p BACKUP tmp backup p p BACKUP bar txt tmp backup bar txt p p SOMEPATH foo SOMEPATH foo p p param path the path to be resolved return the resolved path or code null code  IPath
Returns code true code if the given variable is defined and code false code otherwise Returns code false code if the given name is not a valid path variable name param name the variable s name return code true code if the variable exists code false code otherwise 
Validates the given name as the name for a path variable A valid path variable name is made exclusively of letters digits and the underscore character and does not start with a digit param name a possibly valid path variable name return a status object with code code I Status OK code if the given name is a valid path variable name otherwise a status object indicating what is wrong with the string see I Status OK  IStatus IStatus
Validates the given path as the value for a path variable A path variable value must be a valid path that is absolute param path a possibly valid path variable value return a status object with code code I Status OK code if the given path is a valid path variable value otherwise a status object indicating what is wrong with the value see I Path is Valid Path String see I Status OK  IStatus IPath isValidPath IStatus

public interface I Project extends I Container I Adaptable Invokes the code build code method of the specified builder for this project Does nothing if this project is closed p The builder name is declared in the extension that plugs in to the standard code org eclipse core resources builders code extension point The arguments are builder specific p p This method may change resources these changes will be reported in a subsequent resource change event p p This method is long running progress and cancellation are provided by the given progress monitor p param kind the kind of build being requested Valid values are ul li code FULL BUILD code indicates a full build li li code INCREMENTAL BUILD code indicates a incremental build li code CLEAN BUILD code indicates a clean request Clean does not actually build anything but rather discards all problems and build states ul param builder Name the name of the builder param args a table of builder specific arguments keyed by argument name key type code String code value type code String code code null code is equivalent to an empty map param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if the build fails The status contained in the exception may be a generic code BUILD FAILED code code but it could also be any other status code it might also be a multi status exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Project Description see Incremental Project Builder build int Map I Progress Monitor see Incremental Project Builder FULL BUILD see Incremental Project Builder INCREMENTAL BUILD see Incremental Project Builder CLEAN BUILD see I Resource Rule Factory build Rule  IProject IContainer IAdaptable FULL_BUILD INCREMENTAL_BUILD CLEAN_BUILD builderName CoreException BUILD_FAILED OperationCanceledException IProjectDescription IncrementalProjectBuilder IProgressMonitor IncrementalProjectBuilder FULL_BUILD IncrementalProjectBuilder INCREMENTAL_BUILD IncrementalProjectBuilder CLEAN_BUILD IResourceRuleFactory buildRule
Builds this project Does nothing if the project is closed p Building a project involves executing the commands found in this project s build spec p p This method may change resources these changes will be reported in a subsequent resource change event p p This method is long running progress and cancellation are provided by the given progress monitor p param kind the kind of build being requested Valid values are ul li code Incremental Project Builder FULL BUILD code indicates a full build li li code Incremental Project Builder INCREMENTAL BUILD code indicates an incremental build li ul param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if the build fails The status contained in the exception may be a generic code BUILD FAILED code code but it could also be any other status code it might also be a multi status exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Project Description see Incremental Project Builder FULL BUILD see Incremental Project Builder INCREMENTAL BUILD see I Resource Rule Factory build Rule  IncrementalProjectBuilder FULL_BUILD IncrementalProjectBuilder INCREMENTAL_BUILD CoreException BUILD_FAILED OperationCanceledException IProjectDescription IncrementalProjectBuilder FULL_BUILD IncrementalProjectBuilder INCREMENTAL_BUILD IResourceRuleFactory buildRule
Closes this project The project need not be open Closing a closed project does nothing p Closing a project involves ensuring that all important project related state is safely stored on disk and then discarding the in memory representation of its resources and other volatile state including session properties After this method the project continues to exist in the workspace but its member resources and their members etc do not A closed project can later be re opened p p This method changes resources these changes will be reported in a subsequent resource change event that includes an indication that this project has been closed and its members have been removed p p This method is long running progress and cancellation are provided by the given progress monitor p param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource does not exist li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see open I Progress Monitor see is Open see I Resource Rule Factory modify Rule I Resource  CoreException IResourceChangeEvent OperationCanceledException IProgressMonitor isOpen IResourceRuleFactory modifyRule IResource
Creates a new project resource in the workspace using the given project description Upon successful completion the project will exist but be closed p Newly created projects have no session or persistent properties p p If the project content area given in the project description does not contain a project description file a project description file is written in the project content area with the natures build spec comment and referenced projects as specified in the given project description If there is an existing project description file it is not overwritten In either case this method does not cause natures to be configured p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that the project has been added to the workspace p p This method is long running progress and cancellation are provided by the given progress monitor p param description the project description param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This project already exists in the workspace li li The name of this resource is not valid according to code I Workspace validate Name code li li The project location is not valid according to code I Workspace validate Project Location code li li The project description file could not be created in the project content area li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Workspace validate Project Location I Project I Path see I Resource Rule Factory create Rule I Resource  CoreException IWorkspace validateName IWorkspace validateProjectLocation IResourceChangeEvent OperationCanceledException IWorkspace validateProjectLocation IProject IPath IResourceRuleFactory createRule IResource
Creates a new project resource in the workspace with files in the default location in the local file system Upon successful completion the project will exist but be closed p Newly created projects have no session or persistent properties p p If the project content area does not contain a project description file an initial project description file is written in the project content area with the following information ul li no references to other projects li li no natures li li an empty build spec li li an empty comment li ul If there is an existing project description file it is not overwritten p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that this project has been added to the workspace p p This method is long running progress and cancellation are provided by the given progress monitor p param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This project already exists in the workspace li li The name of this resource is not valid according to code I Workspace validate Name code li li The project location is not valid according to code I Workspace validate Project Location code li li The project description file could not be created in the project content area li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Workspace validate Project Location I Project I Path see I Resource Rule Factory create Rule I Resource  CoreException IWorkspace validateName IWorkspace validateProjectLocation IResourceChangeEvent OperationCanceledException IWorkspace validateProjectLocation IProject IPath IResourceRuleFactory createRule IResource
Deletes this project from the workspace No action is taken if this project does not exist p This is a convenience method fully equivalent to pre delete delete Content I Resource ALWAYS DELETE PROJECT CONTENT I Resource NEVER DELETE PROJECT CONTENT force FORCE I Resource NONE monitor pre p p This method is long running progress and cancellation are provided by the given progress monitor p param delete Content a flag controlling how whether content is aggressively deleted param force a flag controlling whether resources that are not in sync with the local file system will be tolerated param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This project could not be deleted li li This project s contents could not be deleted li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource delete int I Progress Monitor see open I Progress Monitor see close I Progress Monitor see I Resource delete int I Progress Monitor see I Resource Rule Factory delete Rule I Resource  deleteContent IResource ALWAYS_DELETE_PROJECT_CONTENT IResource NEVER_DELETE_PROJECT_CONTENT IResource deleteContent CoreException IResourceChangeEvent OperationCanceledException IResource IProgressMonitor IProgressMonitor IProgressMonitor IResource IProgressMonitor IResourceRuleFactory deleteRule IResource
Returns the description for this project The returned value is a copy and cannot be used to modify this project The returned value is suitable for use in creating copying and moving other projects return the description for this project exception Core Exception if this method fails Reasons include ul li This project does not exist li li This project is not open li ul see create I Progress Monitor see create I Project Description I Progress Monitor see I Resource copy I Project Description int I Progress Monitor see move I Project Description boolean I Progress Monitor  CoreException IProgressMonitor IProjectDescription IProgressMonitor IResource IProjectDescription IProgressMonitor IProjectDescription IProgressMonitor
Returns a handle to the file with the given name in this project p This is a resource handle operation neither the resource nor the result need exist in the workspace The validation check on the resource name path is not done when the resource handle is constructed rather it is done automatically as the resource is created p param name the string name of the member file return the handle of the member file see get Folder String  getFolder
Returns a handle to the folder with the given name in this project p This is a resource handle operation neither the container nor the result need exist in the workspace The validation check on the resource name path is not done when the resource handle is constructed rather it is done automatically as the resource is created p param name the string name of the member folder return the handle of the member folder see get File String  getFile
Returns the specified project nature for this project or code null code if the project nature has not been added to this project Clients may downcast to a more concrete type for more nature specific methods The documentation for a project nature specifies any such additional protocol p This may cause the plug in that provides the given nature to be activated p param nature Id the nature extension identifier return the project nature object exception Core Exception if this method fails Reasons include ul li This project does not exist li li This project is not open li li The project nature extension could not be found li ul  natureId CoreException
Returns the location in the local file system of the project specific working data area for use by the given plug in or code null code if the project does not exist p The content structure and management of this area is the responsibility of the plug in This area is deleted when the project is deleted p p This project needs to exist but does not need to be open p param plugin the plug in return a local file system path deprecated Use code I Project get Working Location plugin get Unique Identifier code  IProject getWorkingLocation getUniqueIdentifier
Returns the location in the local file system of the project specific working data area for use by the bundle plug in with the given identifier or code null code if the project does not exist p The content structure and management of this area is the responsibility of the bundle plug in This area is deleted when the project is deleted p p This project needs to exist but does not need to be open p param id the bundle or plug in s identifier return a local file system path since 3 0 
Returns the projects referenced by this project This includes both the static and dynamic references of this project The returned projects need not exist in the workspace The result will not contain duplicates Returns an empty array if there are no referenced projects return a list of projects exception Core Exception if this method fails Reasons include ul li This project does not exist li li This project is not open li ul see I Project Description get Referenced Projects see I Project Description get Dynamic References  CoreException IProjectDescription getReferencedProjects IProjectDescription getDynamicReferences
Returns the list of all open projects which reference this project This project may or may not exist Returns an empty array if there are no referencing projects return a list of open projects referencing this project 
Returns whether the project nature specified by the given nature extension id has been added to this project param nature Id the nature extension identifier return code true code if the project has the given nature exception Core Exception if this method fails Reasons include ul li This project does not exist li li This project is not open li ul  natureId CoreException
Returns true if the project nature specified by the given nature extension id is enabled for this project and false otherwise p ul Reasons for a nature not to be enabled include li The nature is not available in the install li li The nature has not been added to this project li li The nature has a prerequisite that is not enabled for this project li li The nature specifies one of nature membership in a set and there is another nature on this project belonging to that set li li The prerequisites for the nature form a cycle li ul p param nature Id the nature extension identifier return code true code if the given nature is enabled for this project exception Core Exception if this method fails Reasons include ul li This project does not exist li li This project is not open li ul since 2 0 see I Workspace validate Nature Set String  natureId CoreException IWorkspace validateNatureSet
Returns whether this project is open p A project must be opened before it can be manipulated A closed project is passive and has a minimal memory footprint a closed project has no members p return code true code if this project is open code false code if this project is closed or does not exist see open I Progress Monitor see close I Progress Monitor  IProgressMonitor IProgressMonitor
Renames this project so that it is located at the name in the given description p This is a convenience method fully equivalent to pre move description force FORCE I Resource NONE monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event that will include an indication that the resource has been removed from its parent and that a corresponding resource has been added to its new parent Additional information provided with resource delta shows that these additions and removals are related p p This method is long running progress and cancellation are provided by the given progress monitor p param description the description for the destination project param force a flag controlling whether resources that are not in sync with the local file system will be tolerated param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this resource could not be moved Reasons include ul li This resource is not accessible li li This resource or one of its descendents is not local li li This resource or one of its descendents is out of sync with the local file system and code force code is code false code li li The workspace and the local file system are out of sync at the destination resource or one of its descendents li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource Delta get Flags see I Resource move I Project Description int I Progress Monitor see I Resource Rule Factory move Rule I Resource I Resource  IResource CoreException IResourceChangeEvent OperationCanceledException IResourceDelta getFlags IResource IProjectDescription IProgressMonitor IResourceRuleFactory moveRule IResource IResource
Opens this project No action is taken if the project is already open p Opening a project constructs an in memory representation of its resources from information stored on disk p p This method changes resources these changes will be reported in a subsequent resource change event that includes an indication that the project has been opened and its resources have been added to the tree p p This method is long running progress and cancellation are provided by the given progress monitor p param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see close I Progress Monitor see I Resource Rule Factory move Rule I Resource I Resource  CoreException IResourceChangeEvent OperationCanceledException IProgressMonitor IResourceRuleFactory moveRule IResource IResource
Changes this project resource to match the given project description This project should exist and be open p This is a convenience method fully equivalent to pre set Description description KEEP HISTORY monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that the project s content has changed p p This method is long running progress and cancellation are provided by the given progress monitor p param description the project description param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This project does not exist in the workspace li li This project is not open li li The location in the local file system corresponding to the project description file is occupied by a directory li li The workspace is out of sync with the project description file in the local file system li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li li The file modification validator disallowed the change li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see get Description see I Project Nature configure see I Project Nature deconfigure see set Description I Project Description int I Progress Monitor see I Resource Rule Factory modify Rule I Resource  setDescription KEEP_HISTORY CoreException IResourceChangeEvent OperationCanceledException getDescription IProjectNature IProjectNature setDescription IProjectDescription IProgressMonitor IResourceRuleFactory modifyRule IResource
Changes this project resource to match the given project description This project should exist and be open p The given project description is used to change the project s natures build spec comment and referenced projects The name and location of a project cannot be changed these settings in the project description are ignored The project s session and persistent properties are not affected p p If the new description includes nature ids of natures that the project did not have before these natures will be configured in automatically which involves instantiating the project nature and calling code I Project Nature configure code on it An internal reference to the nature object is retained and will be returned on subsequent calls to code get Nature code for the specified nature id Similarly any natures the project had which are no longer required will be automatically deconfigured by calling code I Project Nature deconfigure code on the nature object and letting go of the internal reference to it p p The code FORCE code update flag controls how this method deals with cases where the workspace is not completely in sync with the local file system If code FORCE code is not specified the method will only attempt to overwrite the project s description file in the local file system provided it is in sync with the workspace This option ensures there is no unintended data loss it is the recommended setting However if code FORCE code is specified an attempt will be made to write the project description file in the local file system overwriting any existing one if need be p p The code KEEP HISTORY code update flag controls whether or not a copy of current contents of the project description file should be captured in the workspace s local history The local history mechanism serves as a safety net to help the user recover from mistakes that might otherwise result in data loss Specifying code KEEP HISTORY code is recommended Note that local history is maintained with each individual project and gets discarded when a project is deleted from the workspace p p The code AVOID NATURE CONFIG code update flag controls whether or not added and removed natures should be configured or deconfigured If this flag is not specified then added natures will be configurd and removed natures will be deconfigured If this flag is specified natures can still be added or removed but they will not be configured or deconfigured p p Update flags other than code FORCE code code KEEP HISTORY code and code AVOID NATURE CONFIG code are ignored p p Prior to modifying the the project description file the file modification validator if provided by the Team plug in will be given a chance to perform any last minute preparations Validation is performed by calling code I File Modification Validator validate Save code on the project description file If the validation fails then this operation will fail p p This method changes resources these changes will be reported in a subsequent resource change event including an indication that the project s content has changed p p This method is long running progress and cancellation are provided by the given progress monitor p param description the project description param update Flags bit wise or of update flag constants code FORCE code code KEEP HISTORY code and code AVOID NATURE CONFIG code param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This project does not exist in the workspace li li This project is not open li li The location in the local file system corresponding to the project description file is occupied by a directory li li The workspace is not in sync with the project description file in the local file system and code FORCE code is not specified li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li li The file modification validator disallowed the change li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see get Description see I Project Nature configure see I Project Nature deconfigure see I Resource FORCE see I Resource KEEP HISTORY see I Resource AVOID NATURE CONFIG see I Resource Rule Factory modify Rule I Resource since 2 0  IProjectNature getNature IProjectNature KEEP_HISTORY KEEP_HISTORY AVOID_NATURE_CONFIG KEEP_HISTORY AVOID_NATURE_CONFIG IFileModificationValidator validateSave updateFlags KEEP_HISTORY AVOID_NATURE_CONFIG CoreException IResourceChangeEvent OperationCanceledException getDescription IProjectNature IProjectNature IResource IResource KEEP_HISTORY IResource AVOID_NATURE_CONFIG IResourceRuleFactory modifyRule IResource

Returns the list of build commands to run when building the described project The commands are listed in the order in which they are to be run return the list of build commands for the described project 
Returns the descriptive comment for the described project return the comment for the described project 
Returns the dynamic project references for the described project Dynamic project references can be used instead of simple project references in cases where the reference information is computed dynamically be a third party These references are persisted by the workspace in a private location outside the project description file and as such will not be shared when a project is exported or persisted in a repository A client using project references is always reponsible for setting these references when a project is created or recreated p The returned projects need not exist in the workspace The result will not contain duplicates Returns an empty array if there are no dynamic project references on this description see get Referenced Projects see set Dynamic References I Project return a list of projects since 3 0  getReferencedProjects setDynamicReferences IProject
Returns the local file system location for the described project The path will be either an absolute file system path or a relative path whose first segment is the name of a workspace path variable code null code is returned if the default location should be used return the location for the described project or code null code 
Returns the name of the described project return the name of the described project 
Returns the list of natures associated with the described project Returns an empty array if there are no natures on this description return the list of natures for the described project see set Nature Ids String  setNatureIds
Returns the projects referenced by the described project These references are persisted in the project description file quot project quot and as such will be shared whenever the project is exported to another workspace For references that are likely to change from one workspace to another dynamic references should be used instead p The projects need not exist in the workspace The result will not contain duplicates Returns an empty array if there are no referenced projects on this description see get Dynamic References return a list of projects  getDynamicReferences
Returns whether the project nature specified by the given nature extension id has been added to the described project param nature Id the nature extension identifier return code true code if the described project has the given nature  natureId
Returns a new build command p Note that the new command does not become part of this project description s build spec until it is installed via the code set Build Spec code method p return a new command see set Build Spec I Command  setBuildSpec setBuildSpec ICommand
Sets the list of build command to run when building the described project p Users must call code I Project set Description code before changes made to this description take effect p param build Spec the array of build commands to run see I Project set Description I Project Description int I Progress Monitor see get Build Spec see new Command  IProject setDescription buildSpec IProject setDescription IProjectDescription IProgressMonitor getBuildSpec newCommand
Sets the comment for the described project p Users must call code I Project set Description code before changes made to this description take effect p param comment the comment for the described project see I Project set Description I Project Description int I Progress Monitor see get Comment  IProject setDescription IProject setDescription IProjectDescription IProgressMonitor getComment
Sets the dynamic project references for the described project The projects need not exist in the workspace Duplicates will be removed p Users must call code I Project set Description code before changes made to this description take effect p see get Dynamic References see I Project set Description I Project Description int I Progress Monitor param projects list of projects since 3 0  IProject setDescription getDynamicReferences IProject setDescription IProjectDescription IProgressMonitor
Sets the local file system location for the described project The path must be either an absolute file system path or a relative path whose first segment is the name of a defined workspace path variable If code null code is specified the default location is used p Setting the location on a description for a project which already exists has no effect the new project location is ignored when the description is set on the already existing project This method is intended for use on descriptions for new projects or for destination projects for code copy code and code move code p p This operation maps the root folder of the project to the exact location provided For example if the location for project named P is set to the path c my plugins Project1 the file resource at workspace path P index html would be stored in the local file system at c my plugins Project1 index html p param location the location for the described project or code null code see get Location  my_plugins my_plugins getLocation
Sets the name of the described project p Setting the name on a description and then setting the description on the project has no effect the new name is ignored p p Creating a new project with a description name which doesn t match the project handle name results in the description name being ignored the project will be created using the name in the handle p param project Name the name of the described project see I Project set Description I Project Description int I Progress Monitor see get Name  projectName IProject setDescription IProjectDescription IProgressMonitor getName
Sets the list of natures associated with the described project A project created with this description will have these natures added to it in the given order p Users must call code I Project set Description code before changes made to this description take effect p param natures the list of natures see I Project set Description I Project Description int I Progress Monitor see get Nature Ids  IProject setDescription IProject setDescription IProjectDescription IProgressMonitor getNatureIds
Sets the referenced projects ignoring any duplicates The order of projects is preserved The projects need not exist in the workspace p Users must call code I Project set Description code before changes made to this description take effect p param projects a list of projects see I Project set Description I Project Description int I Progress Monitor see get Referenced Projects  IProject setDescription IProject setDescription IProjectDescription IProgressMonitor getReferencedProjects

public interface I Project Nature Configures this nature for its project This is called by the workspace when natures are added to the project using code I Project set Description code and should not be called directly by clients The nature extension id is added to the list of natures before this method is called and need not be added here Exceptions thrown by this method will be propagated back to the caller of code I Project set Description code but the nature will remain in the project description exception Core Exception if this method fails  IProjectNature IProject setDescription IProject setDescription CoreException
Deconfigures this nature for its project This is called by the workspace when natures are removed from the project using code I Project set Description code and should not be called directly by clients The nature extension id is removed from the list of natures before this method is called and need not be removed here Exceptions thrown by this method will be propagated back to the caller of code I Project set Description code but the nature will still be removed from the project description exception Core Exception if this method fails  IProject setDescription IProject setDescription CoreException
Returns the project to which this project nature applies return the project handle 
Sets the project to which this nature applies Used when instantiating this project nature runtime This is called by code I Project create code or code I Project set Description code and should not be called directly by clients param project the project to which this nature applies  IProject IProject setDescription

public interface I Project Nature Descriptor Returns the unique identifer of this nature p The nature identifier is composed of the nature s plug in id and the simple id of the nature extension For example if plug in code com xyz code defines a nature extension with id code my Nature code the unique nature identifer will be code com xyz my Nature code p return the unique nature identifier  IProjectNatureDescriptor myNature myNature
Returns a displayable label for this nature Returns the empty string if no label for this nature is specified in the plug in manifest file p Note that any translation specified in the plug in manifest file is automatically applied p return a displayable string label for this nature possibly the empty string 
Returns the unique identifiers of the natures required by this nature Nature requirements are specified by the code requires nature code element on a nature extension Returns an empty array if no natures are required by this nature return an array of nature ids that this nature requires possibly an empty array 
Returns the identifiers of the nature sets that this nature belongs to Nature set inclusion is specified by the code one of nature code element on a nature extension Returns an empty array if no nature sets are specified for this nature return an array of nature set ids that this nature belongs to possibly an empty array 
Returns whether this project nature allows linked resources to be created in projects where this nature is installed return boolean code true code if creating links is allowed and code false code otherwise see I Folder create Link org eclipse core runtime I Path int org eclipse core runtime I Progress Monitor see I File create Link org eclipse core runtime I Path int org eclipse core runtime I Progress Monitor since 2 1  IFolder createLink IPath IProgressMonitor IFile createLink IPath IProgressMonitor

Accepts the given visitor for an optimized traversal The visitor s code visit code method is called and is provided with a proxy to this resource The proxy is a transient object that can be queried very quickly for information about the resource If the actual resource handle is needed it can be obtained from the proxy Requesting the resource handle or the full path of the resource will degrade performance of the visit p The entire subtree under the given resource is traversed to infinite depth unless the visitor ignores a subtree by returning code false code from its code visit code method p p No guarantees are made about the behavior of this method if resources are deleted or added during the traversal of this resource hierarchy If resources are deleted during the traversal they may still be passed to the visitor if resources are created they may not be passed to the visitor If resources other than the one being visited are modified during the traversal the resource proxy may contain stale information when that resource is visited p p If the code INCLUDE PHANTOMS code flag is not specified in the member flags recommended only member resources that exist will be visited If the code INCLUDE PHANTOMS code flag is specified the visit will also include any phantom member resource that the workspace is keeping track of p p If the code INCLUDE TEAM PRIVATE MEMBERS code flag is not specified recommended team private members will not be visited If the code INCLUDE TEAM PRIVATE MEMBERS code flag is specified in the member flags team private member resources are visited as well p param visitor the visitor param member Flags bit wise or of member flag constants code I Container INCLUDE PHANTOMS code and code INCLUDE TEAM PRIVATE MEMBERS code indicating which members are of interest exception Core Exception if this request fails Reasons include ul li the code INCLUDE PHANTOMS code flag is not specified and this resource does not exist li li the code INCLUDE PHANTOMS code flag is not specified and this resource is a project that is not open li li The visitor failed with this exception li ul see I Container INCLUDE PHANTOMS see I Container INCLUDE TEAM PRIVATE MEMBERS see I Resource is Phantom see I Resource is Team Private Member see I Resource Proxy Visitor visit I Resource Proxy since 2 1  INCLUDE_PHANTOMS INCLUDE_PHANTOMS INCLUDE_TEAM_PRIVATE_MEMBERS INCLUDE_TEAM_PRIVATE_MEMBERS memberFlags IContainer INCLUDE_PHANTOMS INCLUDE_TEAM_PRIVATE_MEMBERS CoreException INCLUDE_PHANTOMS INCLUDE_PHANTOMS IContainer INCLUDE_PHANTOMS IContainer INCLUDE_TEAM_PRIVATE_MEMBERS IResource isPhantom IResource isTeamPrivateMember IResourceProxyVisitor IResourceProxy
Accepts the given visitor The visitor s code visit code method is called with this resource If the visitor returns code true code this method visits this resource s members p This is a convenience method fully equivalent to code accept visitor I Resource DEPTH INFINITE I Resource NONE code p param visitor the visitor exception Core Exception if this method fails Reasons include ul li This resource does not exist li li The visitor failed with this exception li ul see I Resource Visitor visit I Resource see accept I Resource Visitor int int  IResource DEPTH_INFINITE IResource CoreException IResourceVisitor IResource IResourceVisitor
Accepts the given visitor The visitor s code visit code method is called with this resource If the visitor returns code false code this resource s members are not visited p The subtree under the given resource is traversed to the supplied depth p p This is a convenience method fully equivalent to pre accept visitor depth include Phantoms INCLUDE PHANTOMS I Resource NONE pre p param visitor the visitor param depth the depth to which members of this resource should be visited One of code DEPTH ZERO code code DEPTH ONE code or code DEPTH INFINITE code param include Phantoms code true code if phantom resources are of interest code false code if phantom resources are not of interest exception Core Exception if this request fails Reasons include ul li code include Phantoms code is code false code and this resource does not exist li li code include Phantoms code is code true code and this resource does not exist and is not a phantom li li The visitor failed with this exception li ul see I Resource is Phantom see I Resource Visitor visit I Resource see I Resource DEPTH ZERO see I Resource DEPTH ONE see I Resource DEPTH INFINITE see I Resource accept I Resource Visitor int int  includePhantoms INCLUDE_PHANTOMS IResource DEPTH_ZERO DEPTH_ONE DEPTH_INFINITE includePhantoms CoreException includePhantoms includePhantoms IResource isPhantom IResourceVisitor IResource IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE IResource IResourceVisitor
Accepts the given visitor The visitor s code visit code method is called with this resource If the visitor returns code false code this resource s members are not visited p The subtree under the given resource is traversed to the supplied depth p p No guarantees are made about the behavior of this method if resources are deleted or added during the traversal of this resource hierarchy If resources are deleted during the traversal they may still be passed to the visitor if resources are created they may not be passed to the visitor p p If the code INCLUDE PHANTOMS code flag is not specified in the member flags recommended only member resources that exists will be visited If the code INCLUDE PHANTOMS code flag is specified the visit will also include any phantom member resource that the workspace is keeping track of p p If the code INCLUDE TEAM PRIVATE MEMBERS code flag is not specified recommended team private members will not be visited If the code INCLUDE TEAM PRIVATE MEMBERS code flag is specified in the member flags team private member resources are visited as well p param visitor the visitor param depth the depth to which members of this resource should be visited One of code DEPTH ZERO code code DEPTH ONE code or code DEPTH INFINITE code param member Flags bit wise or of member flag constants code I Container INCLUDE PHANTOMS code and code INCLUDE TEAM PRIVATE MEMBERS code indicating which members are of interest exception Core Exception if this request fails Reasons include ul li the code INCLUDE PHANTOMS code flag is not specified and this resource does not exist li li the code INCLUDE PHANTOMS code flag is not specified and this resource is a project that is not open li li The visitor failed with this exception li ul see I Container INCLUDE PHANTOMS see I Container INCLUDE TEAM PRIVATE MEMBERS see I Resource is Phantom see I Resource is Team Private Member see I Resource DEPTH ZERO see I Resource DEPTH ONE see I Resource DEPTH INFINITE see I Resource Visitor visit I Resource since 2 0  INCLUDE_PHANTOMS INCLUDE_PHANTOMS INCLUDE_TEAM_PRIVATE_MEMBERS INCLUDE_TEAM_PRIVATE_MEMBERS DEPTH_ZERO DEPTH_ONE DEPTH_INFINITE memberFlags IContainer INCLUDE_PHANTOMS INCLUDE_TEAM_PRIVATE_MEMBERS CoreException INCLUDE_PHANTOMS INCLUDE_PHANTOMS IContainer INCLUDE_PHANTOMS IContainer INCLUDE_TEAM_PRIVATE_MEMBERS IResource isPhantom IResource isTeamPrivateMember IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE IResourceVisitor IResource
Removes the local history of this resource and its descendants p This operation is long running progress and cancellation are provided by the given progress monitor p param monitor a progress monitor or code null code if progress reporting and cancellation are not desired 
Makes a copy of this resource at the given path p This is a convenience method fully equivalent to pre copy destination force FORCE I Resource NONE monitor pre p p This operation changes resources these changes will be reported in a subsequent resource change event that will include an indication that the resource copy has been added to its new parent p p This operation is long running progress and cancellation are provided by the given progress monitor p param destination the destination path param force a flag controlling whether resources that are not in sync with the local file system will be tolerated param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this resource could not be copied Reasons include ul li This resource does not exist li li This resource or one of its descendents is not local li li The source or destination is the workspace root li li The source is a project but the destination is not li li The destination is a project but the source is not li li The resource corresponding to the parent destination path does not exist li li The resource corresponding to the parent destination path is a closed project li li A resource at destination path does exist li li This resource or one of its descendents is out of sync with the local file system and code force code is code false code li li The workspace and the local file system are out of sync at the destination resource or one of its descendents li li The source resource is a file and the destination path specifies a project li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided  IResource CoreException IResourceChangeEvent OperationCanceledException
Makes a copy of this resource at the given path The resource s descendents are copied as well The path of this resource must not be a prefix of the destination path The workspace root may not be the source or destination location of a copy operation and a project can only be copied to another project After successful completion corresponding new resources will exist at the given path their contents and properties will be copies of the originals The original resources are not affected p The supplied path may be absolute or relative Absolute paths fully specify the new location for the resource including its project Relative paths are considered to be relative to the container of the resource being copied A trailing separator is ignored p p Calling this method with a one segment absolute destination path is equivalent to calling pre copy workspace new Project Description folder get Name update Flags monitor pre p p When a resource is copied its persistent properties are copied with it Session properties and markers are not copied p p The code FORCE code update flag controls how this method deals with cases where the workspace is not completely in sync with the local file system If code FORCE code is not specified the method will only attempt to copy resources that are in sync with the corresponding files and directories in the local file system it will fail if it encounters a resource that is out of sync with the file system However if code FORCE code is specified the method copies all corresponding files and directories from the local file system including ones that have been recently updated or created Note that in both settings of the code FORCE code flag the operation fails if the newly created resources in the workspace would be out of sync with the local file system this ensures files in the file system cannot be accidentally overwritten p p The code SHALLOW code update flag controls how this method deals with linked resources If code SHALLOW code is not specified then the underlying contents of the linked resource will always be copied in the file system In this case the destination of the copy will never be a linked resource or contain any linked resources If code SHALLOW code is specified when a linked resource is copied into another project a new linked resource is created in the destination project that points to the same file system location When a project containing linked resources is copied the new project will contain the same linked resources pointing to the same file system locations For both of these shallow cases no files on disk under the linked resource are actually copied With the code SHALLOW code flag copying of linked resources into anything other than a project is not permitted The code SHALLOW code update flag is ignored when copying non linked resources p p Update flags other than code FORCE code and code SHALLOW code are ignored p p This operation changes resources these changes will be reported in a subsequent resource change event that will include an indication that the resource copy has been added to its new parent p p An attempt will be made to copy the local history for this resource and its children to the destination Since local history existence is a safety net mechanism failure of this action will not result in automatic failure of the copy operation p p This operation is long running progress and cancellation are provided by the given progress monitor p param destination the destination path param update Flags bit wise or of update flag constants code FORCE code and code SHALLOW code param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this resource could not be copied Reasons include ul li This resource does not exist li li This resource or one of its descendents is not local li li The source or destination is the workspace root li li The source is a project but the destination is not li li The destination is a project but the source is not li li The resource corresponding to the parent destination path does not exist li li The resource corresponding to the parent destination path is a closed project li li The source is a linked resource but the destination is not a project and code SHALLOW code is specified li li A resource at destination path does exist li li This resource or one of its descendents is out of sync with the local file system and code FORCE code is not specified li li The workspace and the local file system are out of sync at the destination resource or one of its descendents li li The source resource is a file and the destination path specifies a project li li The source is a linked resource and the destination path does not specify a project li li The location of the source resource on disk is the same or a prefix of the location of the destination resource on disk li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see FORCE see SHALLOW see I Resource Rule Factory copy Rule I Resource I Resource since 2 0  newProjectDescription getName updateFlags updateFlags CoreException IResourceChangeEvent OperationCanceledException IResourceRuleFactory copyRule IResource IResource
Makes a copy of this project using the given project description p This is a convenience method fully equivalent to pre copy description force FORCE I Resource NONE monitor pre p p This operation changes resources these changes will be reported in a subsequent resource change event that will include an indication that the resource copy has been added to its new parent p p This operation is long running progress and cancellation are provided by the given progress monitor p param description the destination project description param force a flag controlling whether resources that are not in sync with the local file system will be tolerated param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this resource could not be copied Reasons include ul li This resource does not exist li li This resource or one of its descendents is not local li li This resource is not a project li li The project described by the given description already exists li li This resource or one of its descendents is out of sync with the local file system and code force code is code false code li li The workspace and the local file system are out of sync at the destination resource or one of its descendents li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided  IResource CoreException IResourceChangeEvent OperationCanceledException
Makes a copy of this project using the given project description The project s descendents are copied as well The description specifies the name location and attributes of the new project After successful completion corresponding new resources will exist at the given path their contents and properties will be copies of the originals The original resources are not affected p When a resource is copied its persistent properties are copied with it Session properties and markers are not copied p p The code FORCE code update flag controls how this method deals with cases where the workspace is not completely in sync with the local file system If code FORCE code is not specified the method will only attempt to copy resources that are in sync with the corresponding files and directories in the local file system it will fail if it encounters a resource that is out of sync with the file system However if code FORCE code is specified the method copies all corresponding files and directories from the local file system including ones that have been recently updated or created Note that in both settings of the code FORCE code flag the operation fails if the newly created resources in the workspace would be out of sync with the local file system this ensures files in the file system cannot be accidentally overwritten p p The code SHALLOW code update flag controls how this method deals with linked resources If code SHALLOW code is not specified then the underlying contents of any linked resources in the project will always be copied in the file system In this case the destination of the copy will never contain any linked resources If code SHALLOW code is specified when a project containing linked resources is copied new linked resources are created in the destination project that point to the same file system locations In this case no files on disk under linked resources are actually copied The code SHALLOW code update flag is ignored when copying non linked resources p p Update flags other than code FORCE code or code SHALLOW code are ignored p p An attempt will be made to copy the local history for this resource and its children to the destination Since local history existence is a safety net mechanism failure of this action will not result in automatic failure of the copy operation p p This operation changes resources these changes will be reported in a subsequent resource change event that will include an indication that the resource copy has been added to its new parent p p This operation is long running progress and cancellation are provided by the given progress monitor p param description the destination project description param update Flags bit wise or of update flag constants code FORCE code and code SHALLOW code param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this resource could not be copied Reasons include ul li This resource does not exist li li This resource or one of its descendents is not local li li This resource is not a project li li The project described by the given description already exists li li This resource or one of its descendents is out of sync with the local file system and code FORCE code is not specified li li The workspace and the local file system are out of sync at the destination resource or one of its descendents li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see FORCE see SHALLOW see I Resource Rule Factory copy Rule I Resource I Resource since 2 0  updateFlags CoreException IResourceChangeEvent OperationCanceledException IResourceRuleFactory copyRule IResource IResource
Creates and returns the marker with the specified type on this resource Marker type ids are the id of an extension installed in the code org eclipse core resources markers code extension point The specified type string must not be code null code param type the type of the marker to create return the handle of the new marker exception Core Exception if this method fails Reasons include ul li This resource does not exist li li This resource is a project that is not open li ul see I Resource Rule Factory marker Rule I Resource  CoreException IResourceRuleFactory markerRule IResource
Deletes this resource from the workspace p This is a convenience method fully equivalent to pre delete force FORCE I Resource NONE monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event p p This method is long running progress and cancellation are provided by the given progress monitor p param force a flag controlling whether resources that are not in sync with the local file system will be tolerated param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource could not be deleted for some reason li li This resource or one of its descendents is out of sync with the local file system and code force code is code false code li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource delete int I Progress Monitor  IResource CoreException IResourceChangeEvent OperationCanceledException IResource IProgressMonitor
Deletes this resource from the workspace Deletion applies recursively to all members of this resource in a best effort fashion That is all resources which can be deleted are deleted Resources which could not be deleted are noted in a thrown exception The method does not fail if resources do not exist it fails only if resources could not be deleted p Deleting a non linked resource also deletes its contents from the local file system In the case of a file or folder resource the corresponding file or directory in the local file system is deleted Deleting an open project recursively deletes its members deleting a closed project just gets rid of the project itself closed projects have no members files in the project s local content area are retained referenced projects are unaffected p p Deleting a linked resource does not delete its contents from the file system it just removes that resource and its children from the workspace Deleting children of linked resources does remove the contents from the file system p p Deleting a resource also deletes its session and persistent properties and markers p p Deleting a non project resource which has sync information converts the resource to a phantom and retains the sync information for future use p p Deleting the workspace root resource recursively deletes all projects and removes all markers properties sync info and other data related to the workspace root the root resource itself is not deleted however p p This method changes resources these changes will be reported in a subsequent resource change event p p This method is long running progress and cancellation are provided by the given progress monitor p p The code FORCE code update flag controls how this method deals with cases where the workspace is not completely in sync with the local file system If code FORCE code is not specified the method will only attempt to delete files and directories in the local file system that correspond to and are in sync with resources in the workspace it will fail if it encounters a file or directory in the file system that is out of sync with the workspace This option ensures there is no unintended data loss it is the recommended setting However if code FORCE code is specified the method will ruthlessly attempt to delete corresponding files and directories in the local file system including ones that have been recently updated or created p p The code KEEP HISTORY code update flag controls whether or not files that are about to be deleted from the local file system have their current contents saved in the workspace s local history The local history mechanism serves as a safety net to help the user recover from mistakes that might otherwise result in data loss Specifying code KEEP HISTORY code is recommended except in circumstances where past states of the files are of no conceivable interest to the user Note that local history is maintained with each individual project and gets discarded when a project is deleted from the workspace Hence code KEEP HISTORY code is only really applicable when deleting files and folders but not projects p p The code ALWAYS DELETE PROJECT CONTENTS code update flag controls how project deletions are handled If code ALWAYS DELETE PROJECT CONTENTS code is specified then the files and folders in a project s local content area are deleted regardless of whether the project is open or closed code FORCE code is assumed regardless of whether it is specified If code NEVER DELETE PROJECT CONTENTS code is specified then the files and folders in a project s local content area are retained regardless of whether the project is open or closed the code FORCE code flag is ignored If neither of these flags is specified files and folders in a project s local content area from open projects subject to the code FORCE code flag but never from closed projects p param update Flags bit wise or of update flag constants code FORCE code code KEEP HISTORY code code ALWAYS DELETE PROJECT CONTENTS code and code NEVER DELETE PROJECT CONTENTS code param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource could not be deleted for some reason li li This resource or one of its descendents is out of sync with the local file system and code FORCE code is not specified li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I File delete boolean boolean I Progress Monitor see I Folder delete boolean boolean I Progress Monitor see FORCE see KEEP HISTORY see ALWAYS DELETE PROJECT CONTENT see NEVER DELETE PROJECT CONTENT see I Resource Rule Factory delete Rule I Resource since 2 0  KEEP_HISTORY KEEP_HISTORY KEEP_HISTORY ALWAYS_DELETE_PROJECT_CONTENTS ALWAYS_DELETE_PROJECT_CONTENTS NEVER_DELETE_PROJECT_CONTENTS updateFlags KEEP_HISTORY ALWAYS_DELETE_PROJECT_CONTENTS NEVER_DELETE_PROJECT_CONTENTS CoreException IResourceChangeEvent OperationCanceledException IFile IProgressMonitor IFolder IProgressMonitor KEEP_HISTORY ALWAYS_DELETE_PROJECT_CONTENT NEVER_DELETE_PROJECT_CONTENT IResourceRuleFactory deleteRule IResource
Deletes all markers on this resource of the given type and optionally deletes such markers from its children If code include Subtypes code is code false code only markers whose type exactly matches the given type are deleted p This method changes resources these changes will be reported in a subsequent resource change event p param type the type of marker to consider or code null code to indicate all types param include Subtypes whether or not to consider subtypes of the given type param depth how far to recurse see code I Resource DEPTH  code exception Core Exception if this method fails Reasons include ul li This resource does not exist li li This resource is a project that is not open li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul see I Resource DEPTH ZERO see I Resource DEPTH ONE see I Resource DEPTH INFINITE see I Resource Rule Factory marker Rule I Resource  includeSubtypes includeSubtypes IResource DEPTH_ CoreException IResourceChangeEvent IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE IResourceRuleFactory markerRule IResource
Compares two objects for equality for resources equality is defined in terms of their handles same resource type equal full paths and identical workspaces Resources are not equal to objects other than resources param other the other object return an indication of whether the objects are equals see get Type see get Full Path see get Workspace  getType getFullPath getWorkspace
Returns whether this resource exists in the workspace p code I Resource code objects are lightweight handle objects used to access resources in the workspace However having a handle object does not necessarily mean the workspace really has such a resource When the workspace does have a genuine resource of a matching type the resource is said to em exist em and this method returns code true code in all other cases this method returns code false code In particular it returns code false code if the workspace has no resource at that path or if it has a resource at that path with a type different from the type of this resource handle p p Note that no resources ever exist under a project that is closed opening a project may bring some resources into existence p p The name and path of a resource handle may be invalid However validation checks are done automatically as a resource is created this means that any resource that exists can be safely assumed to have a valid name and path p return code true code if the resource exists otherwise code false code  IResource
Returns the marker with the specified id on this resource Returns code null code if there is no matching marker param id the id of the marker to find return a marker or code null code exception Core Exception if this method fails Reasons include ul li This resource does not exist li li This resource is a project that is not open li ul  CoreException
Returns all markers of the specified type on this resource and optionally on its children If code include Subtypes code is code false code only markers whose type exactly matches the given type are returned Returns an empty array if there are no matching markers param type the type of marker to consider or code null code to indicate all types param include Subtypes whether or not to consider subtypes of the given type param depth how far to recurse see code I Resource DEPTH  code return an array of markers exception Core Exception if this method fails Reasons include ul li This resource does not exist li li This resource is a project that is not open li ul see I Resource DEPTH ZERO see I Resource DEPTH ONE see I Resource DEPTH INFINITE  includeSubtypes includeSubtypes IResource DEPTH_ CoreException IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE
Returns the file extension portion of this resource s name or code null code if it does not have one p The file extension portion is defined as the string following the last period character in the name If there is no period in the name the path has no file extension portion If the name ends in a period the file extension portion is the empty string p p This is a resource handle operation the resource need not exist p return a string file extension see get Name  getName
Returns the full absolute path of this resource relative to the workspace p This is a resource handle operation the resource need not exist If this resource does exist its path can be safely assumed to be valid p p A resource s full path indicates the route from the root of the workspace to the resource Within a workspace there is exactly one such path for any given resource The first segment of these paths name a project remaining segments folders and or files within that project The returned path never has a trailing separator The path of the workspace root is code Path ROOT code p p Since absolute paths contain the name of the project they are vulnerable when the project is renamed For most situations project relative paths are recommended over absolute paths p return the absolute path of this resource see get Project Relative Path see Path ROOT  getProjectRelativePath
Returns a cached value of the local time stamp on disk for this resource or code NULL STAMP code if the resource does not exist or is not local or is not accessible The return value is represented as the number of milliseconds since the epoch 00 00 00 GMT January 1 1970 The returned value may not be the same as the actual time stamp on disk if the file has been modified externally since the last local refresh p Note that due to varying file system timing granularities this value is not guaranteed to change every time the file is modified For a more reliable indication of whether the file has changed use code get Modification Stamp code return a local file system time stamp or code NULL STAMP code since 3 0  NULL_STAMP getModificationStamp NULL_STAMP
Returns the absolute path in the local file system to this resource or code null code if no path can be determined p If this resource is the workspace root this method returns the absolute local file system path of the platform working area p p If this resource is a project that exists in the workspace this method returns the path to the project s local content area This is true regardless of whether the project is open or closed This value will be null in the case where the location is relative to an undefined workspace path variable p p If this resource is a linked resource under a project that is open this method returns the resolved path to the linked resource s local contents This value will be null in the case where the location is relative to an undefined workspace path variable p p If this resource is a file or folder under a project that exists or a linked resource under a closed project this method returns a non code null code path computed from the location of the project s local content area and the project relative path of the file or folder This is true regardless of whether the file or folders exists or whether the project is open or closed In the case of linked resources the location of a linked resource within a closed project is too computed from the location of the project s local content area and the project relative path of the resource If the linked resource resides in an open project then its location is computed according to the link p p If this resource is a project that does not exist in the workspace or a file or folder below such a project this method returns code null code p return the absolute path of this resource in the local file system or code null code if no path can be determined see get Raw Location see I Project Description set Location I Path see Platform get Location  getRawLocation IProjectDescription setLocation IPath getLocation
Returns a marker handle with the given id on this resource This resource is not checked to see if it has such a marker The returned marker need not exist This resource need not exist param id the id of the marker return the specified marker handle see I Marker get Id  IMarker getId
Returns a non negative modification stamp or code NULL STAMP code if the resource does not exist or is not local or is not accessible p A resource s modification stamp gets updated each time a resource is modified If a resource s modification stamp is the same the resource has not changed Conversely if a resource s modification stamp is different some aspect of it other than properties has been modified at least once possibly several times Resource modification stamps are preserved across project close re open and across workspace shutdown restart The magnitude or sign of the numerical difference between two modification stamps is not significant p p The following things affect a resource s modification stamp ul li creating a non project resource changes from code NULL STAMP code li li changing the contents of a file li li code touch code ing a resource li li setting the atttributes of a project presented in a project description li li deleting a resource changes to code NULL STAMP code li li moving a resource source changes to code NULL STAMP code destination changes from code NULL STAMP code li li copying a resource destination changes from code NULL STAMP code li li making a resource local li li closing a project changes to code NULL STAMP code li li opening a project changes from code NULL STAMP code li li adding or removing a project nature changes from code NULL STAMP code li ul The following things do not affect a resource s modification stamp ul li reading a resource li li adding or removing a member of a project or folder li li setting a session property li li setting a persistent property li li saving the workspace li li shutting down and re opening a workspace li ul p return the modification stamp or code NULL STAMP code if this resource either does not exist or exists as a closed project see I Resource NULL STAMP  NULL_STAMP NULL_STAMP NULL_STAMP NULL_STAMP NULL_STAMP NULL_STAMP NULL_STAMP NULL_STAMP NULL_STAMP NULL_STAMP IResource NULL_STAMP
Returns the name of this resource The name of a resource is synonymous with the last segment of its full or project relative path for all resources other than the workspace root The workspace root s name is the empty string p This is a resource handle operation the resource need not exist p p If this resource exists its name can be safely assumed to be valid p return the name of the resource see get Full Path see get Project Relative Path  getFullPath getProjectRelativePath
Returns the resource which is the parent of this resource or code null code if it has no parent that is this resource is the workspace root p The full path of the parent resource is the same as this resource s full path with the last segment removed p p This is a resource handle operation neither the resource nor the resulting resource need exist p return the parent resource of this resource or code null code if it has no parent 
Returns the value of the persistent property of this resource identified by the given key or code null code if this resource has no such property param key the qualified name of the property return the string value of the property or code null code if this resource has no such property exception Core Exception if this method fails Reasons include ul li This resource does not exist li li This resource is not local li li This resource is a project that is not open li ul see set Persistent Property Qualified Name String  CoreException setPersistentProperty QualifiedName
Returns the project which contains this resource Returns itself for projects and code null code for the workspace root p A resource s project is the one named by the first segment of its full path p p This is a resource handle operation neither the resource nor the resulting project need exist p return the project handle 
Returns a relative path of this resource with respect to its project Returns the empty path for projects and the workspace root p This is a resource handle operation the resource need not exist If this resource does exist its path can be safely assumed to be valid p p A resource s project relative path indicates the route from the project to the resource Within a workspace there is exactly one such path for any given resource The returned path never has a trailing slash p p Project relative paths are recommended over absolute paths since the former are not affected if the project is renamed p return the relative path of this resource with respect to its project see get Full Path see get Project see Path EMPTY  getFullPath getProject
Returns the file system location of this resource or code null code if no path can be determined The returned path will either be an absolute file system path or a relative path whose first segment is the name of a workspace path variable p If this resource is an existing project the returned path will be equal to the location path in the project description If this resource is a linked resource in an open project the returned path will be equal to the location path supplied when the linked resource was created In all other cases this method returns the same value as code get Location code p return the raw path of this resource in the local file system or code null code if no path can be determined see get Location see I File create Link I Path int I Progress Monitor see I Folder create Link I Path int I Progress Monitor see I Path Variable Manager see I Project Description get Location since 2 1  getLocation getLocation IFile createLink IPath IProgressMonitor IFolder createLink IPath IProgressMonitor IPathVariableManager IProjectDescription getLocation
Returns the value of the session property of this resource identified by the given key or code null code if this resource has no such property param key the qualified name of the property return the value of the session property or code null code if this resource has no such property exception Core Exception if this method fails Reasons include ul li This resource does not exist li li This resource is not local li li This resource is a project that is not open li ul see set Session Property Qualified Name Object  CoreException setSessionProperty QualifiedName
Returns the type of this resource The returned value will be one of code FILE code code FOLDER code code PROJECT code code ROOT code p ul li All resources of type code FILE code implement code I File code li li All resources of type code FOLDER code implement code I Folder code li li All resources of type code PROJECT code implement code I Project code li li All resources of type code ROOT code implement code I Workspace Root code li ul p p This is a resource handle operation the resource need not exist in the workspace p return the type of this resource see FILE see FOLDER see PROJECT see ROOT  IFile IFolder IProject IWorkspaceRoot
Returns the workspace which manages this resource p This is a resource handle operation the resource need not exist in the workspace p return the workspace 
Returns whether this resource is accessible For files and folders this is equivalent to existing for projects this is equivalent to existing and being open The workspace root is always accessible return code true code if this resource is accessible and code false code otherwise see exists see I Project is Open  IProject isOpen
Returns whether this resource subtree is marked as derived Returns code false code if this resource does not exist return code true code if this resource is marked as derived and code false code otherwise see set Derived boolean since 2 0  setDerived
Returns whether this resource and its members to the specified depth are expected to have their contents and properties available locally Returns code false code in all other cases including the case where this resource does not exist The workspace root and projects are always local p When a resource is not local its content and properties are unavailable for both reading and writing p param depth valid values are code DEPTH ZERO code code DEPTH ONE code or code DEPTH INFINITE code return code true code if this resource is local and code false code otherwise see set Local boolean int I Progress Monitor  DEPTH_ZERO DEPTH_ONE DEPTH_INFINITE setLocal IProgressMonitor
Returns code true code if this resource has been linked to a location other than the default location calculated by the platform This location can be outside the project s content area or another location within the project Returns code false code in all other cases including the case where this resource does not exist The workspace root and projects are never linked p This method returns true only for a resource that has been linked using the code create Link code method This method returns false for children of linked resources p return code true code if this resource is linked and code false code otherwise see I File create Link I Path int I Progress Monitor see I Folder create Link I Path int I Progress Monitor since 2 1  createLink IFile createLink IPath IProgressMonitor IFolder createLink IPath IProgressMonitor
Returns whether this resource is a phantom resource p The workspace uses phantom resources to remember outgoing deletions and incoming additions relative to an external synchronization partner Phantoms appear and disappear automatically as a byproduct of synchronization Since the workspace root cannot be synchronized in this way it is never a phantom Projects are also never phantoms p p The key point is that phantom resources do not exist in the technical sense of code exists code which returns code false code for phantoms are therefore invisible except through a handful of phantom enabled API methods notably code I Container members boolean code p return code true code if this resource is a phantom resource and code false code otherwise see exists see I Container members boolean see I Container find Member String boolean see I Container find Member I Path boolean see I Synchronizer  IContainer IContainer IContainer findMember IContainer findMember IPath ISynchronizer
Returns whether this resource is marked as read only in the file system return code true code if this resource is read only code false code otherwise 
Returns whether this resource and its descendants to the given depth are considered to be in sync with the local file system p A resource is considered to be in sync if all of the following conditions are true ul li The resource exists in both the workspace and the filesystem li li The timestamp in the filesystem has not changed since the last synchronization li li The resource in the workspace is of the same type as the corresponding file in the filesystem they are either both files or both folders li ul A resource is also considered to be in sync if it is missing from both the workspace and the filesystem In all other cases the resource is considered to be out of sync p p This operation interrogates files and folders in the local file system depending on the speed of the local file system and the requested depth this operation may be time consuming p param depth the depth one of code I Resource DEPTH ZERO code code DEPTH ONE code or code DEPTH INFINITE code return code true code if this resource and its descendants to the specified depth are synchronized and code false code in all other cases see I Resource DEPTH ZERO see I Resource DEPTH ONE see I Resource DEPTH INFINITE see refresh Local int I Progress Monitor since 2 0  IResource DEPTH_ZERO DEPTH_ONE DEPTH_INFINITE IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE refreshLocal IProgressMonitor
Returns whether this resource is a team private member of its parent container Returns code false code if this resource does not exist return code true code if this resource is a team private member and code false code otherwise see set Team Private Member boolean since 2 0  setTeamPrivateMember
Moves this resource so that it is located at the given path p This is a convenience method fully equivalent to pre move destination force FORCE I Resource NONE monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event that will include an indication that the resource has been removed from its parent and that a corresponding resource has been added to its new parent Additional information provided with resource delta shows that these additions and removals are related p p This method is long running progress and cancellation are provided by the given progress monitor p param destination the destination path param force a flag controlling whether resources that are not in sync with the local file system will be tolerated param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this resource could not be moved Reasons include ul li This resource does not exist li li This resource or one of its descendents is not local li li The source or destination is the workspace root li li The source is a project but the destination is not li li The destination is a project but the source is not li li The resource corresponding to the parent destination path does not exist li li The resource corresponding to the parent destination path is a closed project li li A resource at destination path does exist li li A resource of a different type exists at the destination path li li This resource or one of its descendents is out of sync with the local file system and code force code is code false code li li The workspace and the local file system are out of sync at the destination resource or one of its descendents li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li li The source resource is a file and the destination path specifies a project li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource Delta get Flags  IResource CoreException IResourceChangeEvent OperationCanceledException IResourceDelta getFlags
Moves this resource so that it is located at the given path The path of the resource must not be a prefix of the destination path The workspace root may not be the source or destination location of a move operation and a project can only be moved to another project After successful completion the resource and any direct or indirect members will no longer exist but corresponding new resources will now exist at the given path p The supplied path may be absolute or relative Absolute paths fully specify the new location for the resource including its project Relative paths are considered to be relative to the container of the resource being moved A trailing slash is ignored p p Calling this method with a one segment absolute destination path is equivalent to calling pre I Project Description description get Description description set Name path last Segment move description update Flags monitor pre p p When a resource moves its session and persistent properties move with it Likewise for all other attributes of the resource including markers p p The code FORCE code update flag controls how this method deals with cases where the workspace is not completely in sync with the local file system If code FORCE code is not specified the method will only attempt to move resources that are in sync with the corresponding files and directories in the local file system it will fail if it encounters a resource that is out of sync with the file system However if code FORCE code is specified the method moves all corresponding files and directories from the local file system including ones that have been recently updated or created Note that in both settings of the code FORCE code flag the operation fails if the newly created resources in the workspace would be out of sync with the local file system this ensures files in the file system cannot be accidentally overwritten p p The code KEEP HISTORY code update flag controls whether or not file that are about to be deleted from the local file system have their current contents saved in the workspace s local history The local history mechanism serves as a safety net to help the user recover from mistakes that might otherwise result in data loss Specifying code KEEP HISTORY code is recommended except in circumstances where past states of the files are of no conceivable interest to the user Note that local history is maintained with each individual project and gets discarded when a project is deleted from the workspace Hence code KEEP HISTORY code is only really applicable when moving files and folders but not whole projects p p If this resource is not a project an attempt will be made to copy the local history for this resource and its children to the destination Since local history existence is a safety net mechanism failure of this action will not result in automatic failure of the move operation p p The code SHALLOW code update flag controls how this method deals with linked resources If code SHALLOW code is not specified then the underlying contents of the linked resource will always be moved in the file system In this case the destination of the move will never be a linked resource or contain any linked resources If code SHALLOW code is specified when a linked resource is moved into another project a new linked resource is created in the destination project that points to the same file system location When a project containing linked resources is moved the new project will contain the same linked resources pointing to the same file system locations For either of these cases no files on disk under the linked resource are actually moved With the code SHALLOW code flag moving of linked resources into anything other than a project is not permitted The code SHALLOW code update flag is ignored when moving non linked resources p p Update flags other than code FORCE code code KEEP HISTORY code and code SHALLOW code are ignored p p This method changes resources these changes will be reported in a subsequent resource change event that will include an indication that the resource has been removed from its parent and that a corresponding resource has been added to its new parent Additional information provided with resource delta shows that these additions and removals are related p p This method is long running progress and cancellation are provided by the given progress monitor p param destination the destination path param update Flags bit wise or of update flag constants code FORCE code code KEEP HISTORY code and code SHALLOW code param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this resource could not be moved Reasons include ul li This resource does not exist li li This resource or one of its descendents is not local li li The source or destination is the workspace root li li The source is a project but the destination is not li li The destination is a project but the source is not li li The resource corresponding to the parent destination path does not exist li li The resource corresponding to the parent destination path is a closed project li li The source is a linked resource but the destination is not a project and code SHALLOW code is specified li li A resource at destination path does exist li li A resource of a different type exists at the destination path li li This resource or one of its descendents is out of sync with the local file system and code force code is code false code li li The workspace and the local file system are out of sync at the destination resource or one of its descendents li li The source resource is a file and the destination path specifies a project li li The location of the source resource on disk is the same or a prefix of the location of the destination resource on disk li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource Delta get Flags see FORCE see KEEP HISTORY see SHALLOW see I Resource Rule Factory move Rule I Resource I Resource since 2 0  IProjectDescription getDescription setName lastSegment updateFlags KEEP_HISTORY KEEP_HISTORY KEEP_HISTORY KEEP_HISTORY updateFlags KEEP_HISTORY CoreException IResourceChangeEvent OperationCanceledException IResourceDelta getFlags KEEP_HISTORY IResourceRuleFactory moveRule IResource IResource
Renames or relocates this project so that it is the project specified by the given project description p This is a convenience method fully equivalent to pre move description keep History KEEP HISTORY I Resource NONE force FORCE I Resource NONE monitor pre p p This operation changes resources these changes will be reported in a subsequent resource change event that will include an indication that the resource has been removed from its parent and that a corresponding resource has been added to its new parent Additional information provided with resource delta shows that these additions and removals are related p p This method is long running progress and cancellation are provided by the given progress monitor p param description the destination project description param force a flag controlling whether resources that are not in sync with the local file system will be tolerated param keep History a flag indicating whether or not to keep local history for files param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this resource could not be moved Reasons include ul li This resource does not exist li li This resource or one of its descendents is not local li li This resource is not a project li li The project at the destination already exists li li This resource or one of its descendents is out of sync with the local file system and code force code is code false code li li The workspace and the local file system are out of sync at the destination resource or one of its descendents li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource Delta get Flags  keepHistory KEEP_HISTORY IResource IResource keepHistory CoreException IResourceChangeEvent OperationCanceledException IResourceDelta getFlags
Renames or relocates this project so that it is the project specified by the given project description The description specifies the name location and attributes of the new project After successful completion the old project and any direct or indirect members will no longer exist but corresponding new resources will now exist at the project p When a resource moves its session and persistent properties move with it Likewise for all the other attributes of the resource including markers p p When this project s location is the default location then the directories and files on disk are moved to be in the location specified by the given description If the given description specifies the default location for the project the directories and files are moved to the default location In all other cases the directories and files on disk are left untouched If the name in the given description is the same as this project s name and the location is different then the project contents will be moved to the new location All other parts of the given description are ignored p p The code FORCE code update flag controls how this method deals with cases where the workspace is not completely in sync with the local file system If code FORCE code is not specified the method will only attempt to move resources that are in sync with the corresponding files and directories in the local file system it will fail if it encounters a resource that is out of sync with the file system However if code FORCE code is specified the method moves all corresponding files and directories from the local file system including ones that have been recently updated or created Note that in both settings of the code FORCE code flag the operation fails if the newly created resources in the workspace would be out of sync with the local file system this ensures files in the file system cannot be accidentally overwritten p p The code KEEP HISTORY code update flag controls whether or not file that are about to be deleted from the local file system have their current contents saved in the workspace s local history The local history mechanism serves as a safety net to help the user recover from mistakes that might otherwise result in data loss Specifying code KEEP HISTORY code is recommended except in circumstances where past states of the files are of no conceivable interest to the user Note that local history is maintained with each individual project and gets discarded when a project is deleted from the workspace Hence code KEEP HISTORY code is only really applicable when moving files and folders but not whole projects p p Local history information for this project and its children will not be moved to the destination p p The code SHALLOW code update flag controls how this method deals with linked resources If code SHALLOW code is not specified then the underlying contents of any linked resource will always be moved in the file system In this case the destination of the move will not contain any linked resources If code SHALLOW code is specified when a project containing linked resources is moved new linked resources are created in the destination project pointing to the same file system locations In this case no files on disk under any linked resource are actually moved The code SHALLOW code update flag is ignored when moving non linked resources p p Update flags other than code FORCE code code KEEP HISTORY code and code SHALLOW code are ignored p p This method changes resources these changes will be reported in a subsequent resource change event that will include an indication that the resource has been removed from its parent and that a corresponding resource has been added to its new parent Additional information provided with resource delta shows that these additions and removals are related p p This method is long running progress and cancellation are provided by the given progress monitor p param description the destination project description param update Flags bit wise or of update flag constants code FORCE code code KEEP HISTORY code and code SHALLOW code param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this resource could not be moved Reasons include ul li This resource does not exist li li This resource or one of its descendents is not local li li This resource is not a project li li The project at the destination already exists li li This resource or one of its descendents is out of sync with the local file system and code FORCE code is not specified li li The workspace and the local file system are out of sync at the destination resource or one of its descendents li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource Delta get Flags see FORCE see KEEP HISTORY see SHALLOW see I Resource Rule Factory move Rule I Resource I Resource since 2 0  KEEP_HISTORY KEEP_HISTORY KEEP_HISTORY KEEP_HISTORY updateFlags KEEP_HISTORY CoreException IResourceChangeEvent OperationCanceledException IResourceDelta getFlags KEEP_HISTORY IResourceRuleFactory moveRule IResource IResource
Refreshes the resource hierarchy from this resource and its children to the specified depth relative to the local file system Creations deletions and changes detected in the local file system will be reflected in the workspace s resource tree This resource need not exist or be local p This method may discover changes to resources any such changes will be reported in a subsequent resource change event p p If a new file or directory is discovered in the local file system at or below the location of this resource any parent folders required to contain the new resource in the workspace will also be created automatically as required p p This method is long running progress and cancellation are provided by the given progress monitor p param depth valid values are code DEPTH ZERO code code DEPTH ONE code or code DEPTH INFINITE code param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource DEPTH ZERO see I Resource DEPTH ONE see I Resource DEPTH INFINITE see I Resource Rule Factory refresh Rule I Resource  DEPTH_ZERO DEPTH_ONE DEPTH_INFINITE CoreException IResourceChangeEvent OperationCanceledException IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE IResourceRuleFactory refreshRule IResource
Sets whether this resource subtree is marked as derived p A b derived b resource is a regular file or folder that is created in the course of translating compiling copying or otherwise processing other files Derived resources are not original data and can be recreated from other resources It is commonplace to exclude derived resources from version and configuration management because they would otherwise clutter the team repository with version of these ever changing files as each user regenerates them p p If a resource or any of its ancestors is marked as derived a team provider should assume that the resource is not under version and configuration management it by default it That is the resource should only be stored in a team repository if the user explicitly indicates that this resource is worth saving p p Newly created resources are not marked as derived rather the mark must be set explicitly using code set Derived true code Derived marks are maintained in the in memory resource tree and are discarded when the resources are deleted Derived marks are saved to disk when a project is closed or when the workspace is saved p p Projects and the workspace root are never considered derived attempts to mark them as derived are ignored p p This operation does b not b result in a resource change event and does not trigger auto builds p param is Derived code true code if this resource is to be marked as derived and code false code otherwise exception Core Exception if this method fails Reasons include ul li This resource does not exist li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul see is Derived since 2 0  setDerived isDerived CoreException IResourceChangeEvent isDerived
Set whether or not this resource and its members to the specified depth are expected to have their contents and properties available locally The workspace root and projects are always local and attempting to set either to non local i e passing code false code has no affect on the resource p When a resource is not local its content and properties are unavailable for both reading and writing p p This method is long running progress and cancellation are provided by the given progress monitor p param flag whether this resource should be considered local param depth valid values are code DEPTH ZERO code code DEPTH ONE code or code DEPTH INFINITE code param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see is Local int  DEPTH_ZERO DEPTH_ONE DEPTH_INFINITE CoreException IResourceChangeEvent OperationCanceledException isLocal
Sets the local time stamp on disk for this resource The time must be represented as the number of milliseconds since the epoch 00 00 00 GMT January 1 1970 Returns the actual time stamp that was recorded Due to varying file system timing granularities the provided value may be rounded or otherwise truncated so the actual recorded time stamp that is returned may not be the same as the supplied value param value a time stamp in millseconds return a local file system time stamp exception Core Exception if this method fails Reasons include ul li This resource does not exist li li This resource is not local li li This resource is not accessible li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul since 3 0  CoreException IResourceChangeEvent
Sets the value of the persistent property of this resource identified by the given key If the supplied value is code null code the persistent property is removed from this resource The change is made immediately on disk p Persistent properties are intended to be used by plug ins to store resource specific information that should be persisted across platform sessions The value of a persistent property is a string which should be short i e under 2KB Unlike session properties persistent properties are stored on disk and maintained across workspace shutdown and restart p p The qualifier part of the property name must be the unique identifier of the declaring plug in e g code com example plugin code p param key the qualified name of the property param value the string value of the property or code null code if the property is to be removed exception Core Exception if this method fails Reasons include ul li This resource does not exist li li This resource is not local li li This resource is a project that is not open li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul see get Persistent Property Qualified Name see is Local int  CoreException IResourceChangeEvent getPersistentProperty QualifiedName isLocal
Sets or unsets this resource as read only in the file system param read Only code true code to set it to read only code false code to unset  readOnly
Sets the value of the session property of this resource identified by the given key If the supplied value is code null code the session property is removed from this resource p Sessions properties are intended to be used as a caching mechanism by ISV plug ins They allow key object associations to be stored with existing resources in the workspace These key value associations are maintained in memory at all times and the information is lost when a resource is deleted from the workspace when the parent project is closed or when the workspace is closed p p The qualifier part of the property name must be the unique identifier of the declaring plug in e g code com example plugin code p param key the qualified name of the property param value the value of the session property or code null code if the property is to be removed exception Core Exception if this method fails Reasons include ul li This resource does not exist li li This resource is not local li li This resource is a project that is not open li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul see get Session Property Qualified Name  CoreException IResourceChangeEvent getSessionProperty QualifiedName
Sets whether this resource subtree is a team private member of its parent container p A b team private member b resource is a special file or folder created by a team provider to hold team provider specific information Resources marked as team private members are invisible to most clients p p Newly created resources are not team private members by default rather the team provider must mark a resource explicitly using code set Team Private Member true code Team private member marks are maintained in the in memory resource tree and are discarded when the resources are deleted Team private member marks are saved to disk when a project is closed or when the workspace is saved p p Projects and the workspace root are never considered team private members attempts to mark them as team private are ignored p p This operation does b not b result in a resource change event and does not trigger auto builds p param is Team Private code true code if this resource is to be marked as team private and code false code otherwise exception Core Exception if this method fails Reasons include ul li This resource does not exist li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul see is Team Private Member since 2 0  setTeamPrivateMember isTeamPrivate CoreException IResourceChangeEvent isTeamPrivateMember
Marks this resource as having changed even though its content may not have changed This method can be used to trigger the rebuilding of resources structures derived from this resource Touching the workspace root has no effect p This method changes resources these changes will be reported in a subsequent resource change event If the resource is a project the change event will indicate a description change p p This method is long running progress and cancellation are provided by the given progress monitor p param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li This resource does not exist li li This resource is not local li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource Rule Factory modify Rule I Resource see I Resource Delta CONTENT see I Resource Delta DESCRIPTION  CoreException IResourceChangeEvent OperationCanceledException IResourceRuleFactory modifyRule IResource IResourceDelta IResourceDelta

Returns all marker deltas of the specified type that are associated with resource deltas for this event If code include Subtypes code is code false code only marker deltas whose type exactly matches the given type are returned Returns an empty array if there are no matching marker deltas p Calling this method is equivalent to walking the entire resource delta for this event and collecting all marker deltas of a given type The speed of this method will be proportional to the number of changed markers regardless of the size of the resource delta tree p param type the type of marker to consider or code null code to indicate all types param include Subtypes whether or not to consider subtypes of the given type return an array of marker deltas since 2 0  includeSubtypes includeSubtypes
Returns a resource delta rooted at the workspace describing the set of changes that happened to resources in the workspace Returns code null code if not applicable to this type of event return the resource delta or code null code if not applicable 
Returns the resource in question Returns code null code if not applicable to this type of event return the resource or code null code if not applicable 
Returns an object identifying the source of this event return an object identifying the source of this event see java util Event Object  EventObject
Returns the type of event being reported return one of the event type constants see POST CHANGE see POST BUILD see PRE BUILD see PRE CLOSE see PRE DELETE  POST_CHANGE POST_BUILD PRE_BUILD PRE_CLOSE PRE_DELETE

public interface I Resource Change Listener extends Event Listener Notifies this listener that some resource changes are happening or have already happened p The supplied event gives details This event object and the resource delta within it is valid only for the duration of the invocation of this method p p Note This method is called by the platform it is not intended to be called directly by clients p Note that during resource change event notification further changes to resources may be disallowed p param event the resource change event see I Resource Delta  IResourceChangeListener EventListener IResourceDelta

Accepts the given visitor The only kinds of resource deltas visited are code ADDED code code REMOVED code and code CHANGED code The visitor s code visit code method is called with this resource delta if applicable If the visitor returns code true code the resource delta s children are also visited p This is a convenience method fully equivalent to code accept visitor I Resource NONE code Although the visitor will be invoked for this resource delta it will not be invoked for any team private member resources p param visitor the visitor exception Core Exception if the visitor failed with this exception see I Resource Delta Visitor visit I Resource Delta  IResource CoreException IResourceDeltaVisitor IResourceDelta
Accepts the given visitor The visitor s code visit code method is called with this resource delta If the visitor returns code true code the resource delta s children are also visited p This is a convenience method fully equivalent to pre accept visitor include Phantoms INCLUDE PHANTOMS I Resource NONE pre Although the visitor will be invoked for this resource delta it will not be invoked for any team private member resources p param visitor the visitor param include Phantoms code true code if phantom resources are of interest code false code if phantom resources are not of interest exception Core Exception if the visitor failed with this exception see accept I Resource Delta Visitor see I Resource is Phantom see I Resource Delta Visitor visit I Resource Delta  includePhantoms INCLUDE_PHANTOMS IResource includePhantoms CoreException IResourceDeltaVisitor IResource isPhantom IResourceDeltaVisitor IResourceDelta
Accepts the given visitor The visitor s code visit code method is called with this resource delta If the visitor returns code true code the resource delta s children are also visited p The member flags determine which child deltas of this resource delta will be visited The visitor will always be invoked for this resource delta p If the code INCLUDE PHANTOMS code member flag is not specified recommended only child resource deltas involving existing resources will be visited kinds code ADDED code code REMOVED code and code CHANGED code If the code INCLUDE PHANTOMS code member flag is specified the result will also include additions and removes of phantom resources kinds code ADDED PHANTOM code and code REMOVED PHANTOM code p p If the code INCLUDE TEAM PRIVATE MEMBERS code member flag is not specified recommended resource deltas involving team private member resources will be excluded from the visit If the code INCLUDE TEAM PRIVATE MEMBERS code member flag is specified the visit will also include additions and removes of team private member resources p param visitor the visitor param member Flags bit wise or of member flag constants code I Container INCLUDE PHANTOMS code and code INCLUDE TEAM PRIVATE MEMBERS code indicating which members are of interest exception Core Exception if the visitor failed with this exception see I Resource is Phantom see I Resource is Team Private Member see I Container INCLUDE PHANTOMS see I Container INCLUDE TEAM PRIVATE MEMBERS see I Resource Delta Visitor visit I Resource Delta since 2 0  INCLUDE_PHANTOMS INCLUDE_PHANTOMS ADDED_PHANTOM REMOVED_PHANTOM INCLUDE_TEAM_PRIVATE_MEMBERS INCLUDE_TEAM_PRIVATE_MEMBERS memberFlags IContainer INCLUDE_PHANTOMS INCLUDE_TEAM_PRIVATE_MEMBERS CoreException IResource isPhantom IResource isTeamPrivateMember IContainer INCLUDE_PHANTOMS IContainer INCLUDE_TEAM_PRIVATE_MEMBERS IResourceDeltaVisitor IResourceDelta
Finds and returns the descendent delta identified by the given path in this delta or code null code if no such descendent exists The supplied path may be absolute or relative in either case it is interpreted as relative to this delta Trailing separators are ignored If the path is empty this delta is returned p This is a convenience method to avoid manual traversal of the delta tree in cases where the listener is only interested in changes to particular resources Calling this method will generally be faster than manually traversing the delta to a particular descendent p param path the path of the desired descendent delta return the descendent delta or code null code if no such descendent exists in the delta since 2 0 
Returns resource deltas for all children of this resource which were added removed or changed Returns an empty array if there are no affected children p This is a convenience method fully equivalent to pre get Affected Children ADDED REMOVED CHANGED I Resource NONE pre Team private member resources are b not b included in the result neither are phantom resources p return the resource deltas for all affected children see I Resource Delta ADDED see I Resource Delta REMOVED see I Resource Delta CHANGED see get Affected Children int int  getAffectedChildren IResource IResourceDelta IResourceDelta IResourceDelta getAffectedChildren
Returns resource deltas for all children of this resource whose kind is included in the given mask Kind masks are formed by the bitwise or of code I Resource Delta code kind constants Returns an empty array if there are no affected children p This is a convenience method fully equivalent to pre get Affected Children kind Mask I Resource NONE pre Team private member resources are b not b included in the result p param kind Mask a mask formed by the bitwise or of code I Resource Delta code delta kind constants return the resource deltas for all affected children see I Resource Delta ADDED see I Resource Delta REMOVED see I Resource Delta CHANGED see I Resource Delta ADDED PHANTOM see I Resource Delta REMOVED PHANTOM see I Resource Delta ALL WITH PHANTOMS see get Affected Children int int  IResourceDelta getAffectedChildren kindMask IResource kindMask IResourceDelta IResourceDelta IResourceDelta IResourceDelta IResourceDelta ADDED_PHANTOM IResourceDelta REMOVED_PHANTOM IResourceDelta ALL_WITH_PHANTOMS getAffectedChildren
Returns resource deltas for all children of this resource whose kind is included in the given mask Masks are formed by the bitwise or of code I Resource Delta code kind constants Returns an empty array if there are no affected children p If the code INCLUDE TEAM PRIVATE MEMBERS code member flag is not specified recommended resource deltas involving team private member resources will be excluded If the code INCLUDE TEAM PRIVATE MEMBERS code member flag is specified the result will also include resource deltas of the specified kinds to team private member resources p p Specifying the code INCLUDE PHANTOMS code member flag is equivalent to including code ADDED PHANTOM code and code REMOVED PHANTOM code in the kind mask p param kind Mask a mask formed by the bitwise or of code I Resource Delta code delta kind constants param member Flags bit wise or of member flag constants code I Container INCLUDE PHANTOMS code and code INCLUDE TEAM PRIVATE MEMBERS code indicating which members are of interest return the resource deltas for all affected children see I Resource Delta ADDED see I Resource Delta REMOVED see I Resource Delta CHANGED see I Resource Delta ADDED PHANTOM see I Resource Delta REMOVED PHANTOM see I Resource Delta ALL WITH PHANTOMS see I Container INCLUDE PHANTOMS see I Container INCLUDE TEAM PRIVATE MEMBERS since 2 0  IResourceDelta INCLUDE_TEAM_PRIVATE_MEMBERS INCLUDE_TEAM_PRIVATE_MEMBERS INCLUDE_PHANTOMS ADDED_PHANTOM REMOVED_PHANTOM kindMask IResourceDelta memberFlags IContainer INCLUDE_PHANTOMS INCLUDE_TEAM_PRIVATE_MEMBERS IResourceDelta IResourceDelta IResourceDelta IResourceDelta ADDED_PHANTOM IResourceDelta REMOVED_PHANTOM IResourceDelta ALL_WITH_PHANTOMS IContainer INCLUDE_PHANTOMS IContainer INCLUDE_TEAM_PRIVATE_MEMBERS
Returns flags which describe in more detail how a resource has been affected p The following codes bit masks are used when kind is code CHANGED code and also when the resource is involved in a move ul li code CONTENT code The bytes contained by the resource have been altered or code I Resource touch code has been called on the resource li li code ENCODING code The encoding of the resource has been altered li li code DESCRIPTION code The description of the project has been altered or code I Resource touch code has been called on the project This flag is only valid for project resources li li code OPEN code The project s open closed state has changed If it is not open it was closed and vice versa This flag is only valid for project resources li li code TYPE code The resource a folder or file has changed its type li li code SYNC code The resource s sync status has changed li li code MARKERS code The resource s markers have changed li li code REPLACED code The resource and all its properties was deleted either by a delete or move and was subsequently re created either by a create move or copy li ul The following code is only used if kind is code REMOVED code or code CHANGED code in conjunction with code REPLACED code ul li code MOVED TO code The resource has moved code get Moved To Path code will return the path of where it was moved to li ul The following code is only used if kind is code ADDED code or code CHANGED code in conjunction with code REPLACED code ul li code MOVED FROM code The resource has moved code get Moved From Path code will return the path of where it was moved from li ul A simple move operation would result in the following delta information If a resource is moved from A to B with no other changes to A or B then A will have kind code REMOVED code with flag code MOVED TO code and code get Moved To Path code on A will return the path for B B will have kind code ADDED code with flag code MOVED FROM code and code get Moved From Path code on B will return the path for A B s other flags will describe any other changes to the resource as compared to its previous location at A p p Note that the move flags only describe the changes to a single resource they don t necessarily imply anything about the parent or children of the resource If the children were moved as a consequence of a subtree move operation they will have corresponding move flags as well p p Note that it is possible for a file resource to be replaced in the workspace by a folder resource or the other way around The resource delta which is actually expressed in terms of paths instead or resources shows this as a change to either the content or children p return the flags see I Resource Delta CONTENT see I Resource Delta DESCRIPTION see I Resource Delta ENCODING see I Resource Delta OPEN see I Resource Delta MOVED TO see I Resource Delta MOVED FROM see I Resource Delta TYPE see I Resource Delta SYNC see I Resource Delta MARKERS see I Resource Delta REPLACED see get Kind see get Moved From Path see get Moved To Path see I Resource move I Path int I Progress Monitor  IResource IResource MOVED_TO getMovedToPath MOVED_FROM getMovedFromPath MOVED_TO getMovedToPath MOVED_FROM getMovedFromPath IResourceDelta IResourceDelta IResourceDelta IResourceDelta IResourceDelta MOVED_TO IResourceDelta MOVED_FROM IResourceDelta IResourceDelta IResourceDelta IResourceDelta getKind getMovedFromPath getMovedToPath IResource IPath IProgressMonitor
Returns the full absolute path of this resource delta p Note the returned path never has a trailing separator p return the full absolute path of this resource delta see I Resource get Full Path see get Project Relative Path  IResource getFullPath getProjectRelativePath
Returns the kind of this resource delta Normally one of code ADDED code code REMOVED code code CHANGED code When phantom resources have been explicitly requested there are two additional kinds code ADDED PHANTOM code and code REMOVED PHANTOM code return the kind of this resource delta see I Resource Delta ADDED see I Resource Delta REMOVED see I Resource Delta CHANGED see I Resource Delta ADDED PHANTOM see I Resource Delta REMOVED PHANTOM  ADDED_PHANTOM REMOVED_PHANTOM IResourceDelta IResourceDelta IResourceDelta IResourceDelta ADDED_PHANTOM IResourceDelta REMOVED_PHANTOM
Returns the changes to markers on the corresponding resource Returns an empty array if no markers changed return the marker deltas 
Returns the full path in the before state from which this resource in the after state was moved This value is only valid if the code MOVED FROM code change flag is set otherwise code null code is returned p Note the returned path never has a trailing separator return a path or code null code see get Moved To Path see get Full Path see get Flags  MOVED_FROM getMovedToPath getFullPath getFlags
Returns the full path in the after state to which this resource in the before state was moved This value is only valid if the code MOVED TO code change flag is set otherwise code null code is returned p Note the returned path never has a trailing separator return a path or code null code see get Moved From Path see get Full Path see get Flags  MOVED_TO getMovedFromPath getFullPath getFlags
Returns the project relative path of this resource delta Returns the empty path for projects and the workspace root p A resource s project relative path indicates the route from the project to the resource Within a workspace there is exactly one such path for any given resource The returned path never has a trailing separator p return the project relative path of this resource delta see I Resource get Project Relative Path see get Full Path see Path EMPTY  IResource getProjectRelativePath getFullPath
Returns a handle for the affected resource p For additions code ADDED code this handle describes the newly added resource i e the one in the after state p For changes code CHANGED code this handle also describes the resource in the after state When a file or folder resource has changed type the former type of the handle can be inferred p For removals code REMOVED code this handle describes the resource in the before state Even though this resource would not normally exist in the current workspace the type of resource that was removed can be determined from the handle p For phantom additions and removals code ADDED PHANTOM code and code REMOVED PHANTOM code this is the handle of the phantom resource return the affected resource handle  ADDED_PHANTOM REMOVED_PHANTOM

public interface I Resource Delta Visitor Visits the given resource delta return code true code if the resource delta s children should be visited code false code if they should be skipped exception Core Exception if the visit fails for some reason  IResourceDeltaVisitor CoreException

public interface I Resource Proxy Returns the modification stamp of the resource being visited return the modification stamp or code NULL STAMP code if the resource either does not exist or exists as a closed project see I Resource get Modification Stamp  IResourceProxy NULL_STAMP IResource getModificationStamp
Returns whether the resource being visited is accessible return code true code if the resource is accessible and code false code otherwise see I Resource is Accessible  IResource isAccessible
Returns whether the resource being visited is derived return code true code if the resource is marked as derived and code false code otherwise see I Resource is Derived  IResource isDerived
Returns whether the resource being visited is a linked resource return code true code if the resource is linked and code false code otherwise see I Resource is Linked  IResource isLinked
Returns whether the resource being visited is a phantom resource return code true code if the resource is a phantom resource and code false code otherwise see I Resource is Phantom  IResource isPhantom
Returns whether the resource being visited is a team private member return code true code if the resource is a team private member and code false code otherwise see I Resource is Team Private Member  IResource isTeamPrivateMember
Returns the simple name of the resource being visited return the name of the resource see I Resource get Name  IResource getName
Returns the value of the session property of the resource being visited identified by the given key Returns code null code if this resource has no such property p Note that this method can return an out of date property value or a value that no longer exists if session properties are being modified concurrently with the resource visit p param key the qualified name of the property return the string value of the session property or code null code if the resource has no such property see I Resource get Session Property Qualified Name  IResource getSessionProperty QualifiedName
Returns the type of the resource being visited return the resource type see I Resource get Type  IResource getType
Returns the full workspace path of the resource being visited p Note that this is not a quot free quot proxy operation This method will generally cause a path object to be created For an optimal visitor only call this method when absolutely necessary Note that the simple resource name can be obtained from the proxy with no cost p return the full path of the resource see I Resource get Full Path  IResource getFullPath
Returns the handle of the resource being visited p Note that this is not a quot free quot proxy operation This method will generally cause both a path object and a resource object to be created For an optimal visitor only call this method when absolutely necessary Note that the simple resource name can be obtained from the proxy with no cost and the full path of the resource can be obtained through the proxy with smaller cost p return the resource handle 

public interface I Resource Proxy Visitor Visits the given resource param proxy for requesting information about the resource being visited this object is only valid for the duration of the invocation of this method and must not be used after this method has completed return code true code if the resource s members should be visited code false code if they should be skipped exception Core Exception if the visit fails for some reason  IResourceProxyVisitor CoreException

public interface I Resource Rule Factory Returns the scheduling rule that is required for creating a project folder or file param resource the resource being created return a scheduling rule or code null code  IResourceRuleFactory
Returns the scheduling rule that is required for building a project or the entire workspace return a scheduling rule or code null code 
Returns the scheduling rule that is required for copying a resource param source the source of the copy param destination the destination of the copy return a scheduling rule or code null code 
Returns the scheduling rule that is required for deleting a resource param resource the resource to be deleted return a scheduling rule or code null code 
Returns the scheduling rule that is required for creating modifying or deleting markers on a resource param resource the resource owning the marker to be modified return a scheduling rule or code null code 
Returns the scheduling rule that is required for modifying a resource For files modification includes setting and appending contents For projects modification includes opening or closing the project For all resources code touch code is considered to be a modification param resource the resource being modified return a scheduling rule or code null code 
Returns the scheduling rule that is required for moving a resource param source the source of the move param destination the destination of the move return a scheduling rule or code null code 
Returns the scheduling rule that is required for performing code refresh Local code on a resource param resource the resource to refresh return a scheduling rule or code null code  refreshLocal
Returns the scheduling rule that is required for a code validate Edit code param resources the resources to be validated return a scheduling rule or code null code  validateEdit

Returns the path of the resource associated with this status return the path of the resource related to this status 

public interface I Resource Visitor Visits the given resource param resource the resource to visit return code true code if the resource s members should be visited code false code if they should be skipped exception Core Exception if the visit fails for some reason  IResourceVisitor CoreException

Returns current files mapped with the code I Save Context map code facility or an empty array if there are no mapped files return the files currently mapped by the participant see map I Path I Path  ISaveContext IPath IPath
Returns the type of this save The types can be ul li code I Save Context FULL SAVE code li li code I Save Context SNAPSHOT code li li code I Save Context PROJECT SAVE code li ul return the type of the current save  ISaveContext FULL_SAVE ISaveContext ISaveContext PROJECT_SAVE
Returns the number for the previous save in which the plug in actively participated or code 0 code if the plug in has never actively participated in a save before p In the event of an unsuccessful save this is the value to code rollback code to p return the previous save number if positive or code 0 code if never saved before see I Save Participant rollback I Save Context  ISaveParticipant ISaveContext
If the current save is a project save this method returns the project being saved return the project being saved or code null code if this is not project save see get Kind  getKind
Returns the number for this save This number is guaranteed to be code 1 code more than the previous save number p This is the value to use when for example creating files in which a participant will save its data p return the save number see I Save Participant saving I Save Context  ISaveParticipant ISaveContext
Returns the current location for the given file or code null code if none return the location of a given file or code null code see map I Path I Path see I Saved State lookup I Path  IPath IPath ISavedState IPath
Maps the given plug in file to its real location This method is intended to be used with code I Save Context get Save Number code to map plug in configuration file names to real locations p For example assume a plug in has a configuration file named config properties The map facility can be used to map that logical name onto a real name which is specific to a particular save e g 10 config properties where 10 is the current save number The paths specified here should always be relative to the plug in state location for the plug in saving the state p p Each save participant must manage the deletion of its old state files Old state files can be discovered using code get Previous Save Number code or by using code get Files code to discover the current files and comparing that to the list of files on disk p param file the logical name of the participant s data file param location the real i e filesystem name by which the file should be known for this save or code null code to remove the entry see lookup I Path see get Save Number see need Save Number see I Saved State lookup I Path  ISaveContext getSaveNumber getPreviousSaveNumber getFiles IPath getSaveNumber needSaveNumber ISavedState IPath
Indicates that the saved workspace tree should be remembered so that a delta will be available in a subsequent session when the plug in re registers to participate in saves If this method is not called no resource delta will be made available This facility is not available for marker deltas Plug ins must assume that all markers may have changed when they are activated p Note that this is orthogonal to code need Save Number code That is one can ask for a delta regardless of whether or not one is an active participant p p Note that deltas are not guaranteed to be saved even if saving is requested Deltas cannot be supplied where the previous state is too old or has become invalid p p This method is only valid for full saves It is ignored during snapshots or project saves p see I Workspace add Save Participant org eclipse core runtime Plugin I Save Participant see I Saved State process Resource Change Events I Resource Change Listener  needSaveNumber IWorkspace addSaveParticipant ISaveParticipant ISavedState processResourceChangeEvents IResourceChangeListener
Indicates that this participant has actively participated in this save If the save is successful the current save number will be remembered this save number will be the previous save number for subsequent saves until the participant again actively participates p If this method is not called the plug in is not deemed to be an active participant in this save p p Note that this is orthogonal to code need Delta code That is one can be an active participant whether or not one asks for a delta p see I Workspace add Save Participant org eclipse core runtime Plugin I Save Participant see I Saved State get Save Number  needDelta IWorkspace addSaveParticipant ISaveParticipant ISavedState getSaveNumber

public interface I Saved State Returns the files mapped with the code I Save Context map code facility Returns an empty array if there are no mapped files return the files currently mapped by the participant see lookup I Path see I Save Context map I Path I Path  ISavedState ISaveContext IPath ISaveContext IPath IPath
Returns the save number for the save participant This is the save number of the last successful save in which the plug in b actively b participated or code 0 code if the plug in has never actively participated in a successful save return the save number 
Returns the mapped location associated with the given path or code null code if none return the mapped location of a given path see get Files see I Save Context map I Path I Path  getFiles ISaveContext IPath IPath
Used to receive notification of changes that might have happened while this plug in was not active The listener receives notifications of changes to the workspace resource tree since the time this state was saved After this method is run the delta is forgotten Subsequent calls to this method will have no effect p No notification is received in the following cases ul li if a saved state was never recorded code I Save Context need Delta code was not called li li a saved state has since been forgotten using code I Workspace forget Saved Tree code li li a saved state has been deemed too old or has become invalid li ul p All clients should have a contingency plan in place in case a changes are not available the case should be very similar to the first time a plug in is activated and only has the current state of the workspace to work from p p The supplied event is of type code I Resource Change Event POST AUTO BUILD code and contains the delta detailing changes since this plug in last participated in a save This event object and the resource delta within it is valid only for the duration of the invocation of this method p param listener the listener see I Save Context need Delta see I Resource Change Listener  ISaveContext needDelta IWorkspace forgetSavedTree IResourceChangeEvent POST_AUTO_BUILD ISaveContext needDelta IResourceChangeListener

public interface I Save Participant extends Event Listener Tells this participant that the workspace save operation is now complete and it is free to go about its normal business Exceptions are not expected to be thrown at this point so they should be handled internally p Note This method is called by the platform it is not intended to be called directly by clients p param context the save context object  ISaveParticipant EventListener
Tells this participant that the workspace is about to be saved In preparation the participant is expected to suspend its normal operation until further notice code saving code will be next followed by either code done Saving code or code rollback code depending on whether the workspace save was successful p Note This method is called by the platform it is not intended to be called directly by clients p param context the save context object exception Core Exception if this method fails to snapshot the state of this workspace  doneSaving CoreException
Tells this participant to rollback its important state The context s previous state number indicates what it was prior to the failed save Exceptions are not expected to be thrown at this point so they should be handled internally p Note This method is called by the platform it is not intended to be called directly by clients p param context the save context object see I Save Context get Previous Save Number  ISaveContext getPreviousSaveNumber
Tells this participant to save its important state because the workspace is being saved as described in the supplied save context p Note This method is called by the platform it is not intended to be called directly by clients p p The basic contract for this method is the same for full saves snapshots and project saves the participant must absolutely guarantee that any important user data it has gathered will not be irrecoverably lost in the event of a crash The only difference is in the space time tradeoffs that the participant should make ul li Full saves the participant is encouraged to save additional non essential information that will aid it in retaining user state and configuration information and quickly getting back in sync with the state of the platform at a later point li li Snapshots the participant is discouraged from saving non essential information that could be recomputed in the unlikely event of a crash This lifecycle event will happen often and participant actions should take an absolute minimum of time li li Project saves the participant should only save project related data It is discouraged from saving non essential information that could be recomputed in the unlikely event of a crash li ul For instance the Java IDE gathers various user preferences and would want to make sure that the current settings are safe and sound after a code save code if not saved immediately The Java IDE would likely save computed image builder state on full saves because this would allow the Java IDE to be restarted later and not have to recompile the world at that time On the other hand the Java IDE would not save the image builder state on a snapshot because that information is non essential in the unlikely event of a crash the image should be rebuilt either from scratch or from the last saved state p p The following snippet shows how a plug in participant would write its important state to a file whose name is based on the save number for this save operation pre Plugin plugin known int save Number context get Save Number String save File Name save Integer to String save Number File f plugin get State Location append save File Name to File plugin write Important State f context map new Path save new Path save File Name context need Save Number context need Delta optional pre When the plug in is reactivated in a subsequent workspace session it needs to re register to participate in workspace saves When it does so it is handed back key information about what state it had last saved If it s interested it can also ask for a resource delta describing all resource changes that have happened since then if this information is still available The following snippet shows what a participant plug in would need to do if and when it is reactivated pre I Workspace ws known Plugin plugin known I Save Participant saver known I Saved State ss ws add Save Participant plugin saver if ss null activate for very first time plugin build State else String save File Name ss lookup new Path save File f plugin get State Location append save File Name to File plugin read Important State f I Resource Change Listener listener new I Resource Change Listener public void resource Changed I Resource Change Event event I Resource Delta delta event get Delta if delta null fast reactivation using delta plugin update State delta else slower reactivation without benefit of delta plugin rebuild State ss process Resource Change Events listener pre p param context the save context object exception Core Exception if this method fails see I Save Context get Save Number  saveNumber getSaveNumber saveFileName toString saveNumber getStateLocation saveFileName toFile writeImportantState saveFileName needSaveNumber needDelta IWorkspace ISaveParticipant ISavedState addSaveParticipant buildState saveFileName getStateLocation saveFileName toFile readImportantState IResourceChangeListener IResourceChangeListener resourceChanged IResourceChangeEvent IResourceDelta getDelta updateState rebuildState processResourceChangeEvents CoreException ISaveContext getSaveNumber

public interface I Storage extends I Adaptable Returns an open input stream on the contents of this storage The caller is responsible for closing the stream when finished return an input stream containing the contents of this storage exception Core Exception if the contents of this storage could not be accessed See any refinements for more information  IStorage IAdaptable CoreException
Returns the full path of this storage The returned value depends on the implementor extender A storage need not have a path return the path related to the data represented by this storage or code null code if none 
Returns the name of this storage The name of a storage is synonymous with the last segment of its full path though if the storage does not have a path it may still have a name return the name of the data represented by this storage or code null code if this storage has no name see get Full Path  getFullPath
Returns whether this storage is read only return code true code if this storage is read only 

public interface I Synchronizer Visits the given resource and its descendents with the specified visitor if sync information for the given sync partner is found on the resource If sync information for the given sync partner is not found on the resource still visit the children of the resource if the depth specifies to do so param partner the sync partner name param start the parent resource to start the visitation param visitor the visitor to use when visiting the resources param depth the depth to which members of this resource should be visited One of code I Resource DEPTH ZERO code code I Resource DEPTH ONE code or code I Resource DEPTH INFINITE code exception Core Exception if this operation fails Reasons include ul li The resource does not exist li li code I Resource Status PARTNER NOT REGISTERED code The sync partner is not registered li ul  ISynchronizer IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE CoreException IResourceStatus PARTNER_NOT_REGISTERED
Adds the named synchronization partner to this synchronizer s registry of partners Once a partner s name has been registered sync information can be set and retrieve on resources relative to the name Adding a sync partner multiple times has no effect param partner the partner name to register see remove Qualified Name  QualifiedName
Discards the named partner s synchronization information associated with the specified resource and its descendents to the specified depth param partner the sync partner name param resource the resource param depth the depth to which members of this resource should be visited One of code I Resource DEPTH ZERO code code I Resource DEPTH ONE code or code I Resource DEPTH INFINITE code exception Core Exception if this operation fails Reasons include ul li The resource does not exist li li code I Resource Status PARTNER NOT REGISTERED code The sync partner is not registered li ul  IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE CoreException IResourceStatus PARTNER_NOT_REGISTERED
Returns a list of synchronization partner names currently registered with this synchronizer Returns an empty array if there are no registered sync partners return a list of sync partner names 
Returns the named sync partner s synchronization information for the given resource Returns code null code if no information is found param partner the sync partner name param resource the resource return the synchronization information or code null code if none exception Core Exception if this operation fails Reasons include ul li code I Resource Status PARTNER NOT REGISTERED code The sync partner is not registered li ul  CoreException IResourceStatus PARTNER_NOT_REGISTERED
Removes the named synchronization partner from this synchronizer s registry Does nothing if the partner is not registered This discards all sync information for the defunct partner After a partner has been unregistered sync infomation for it can no longer be stored on resources param partner the partner name to remove from the registry see add Qualified Name  QualifiedName
Sets the named sync partner s synchronization information for the given resource If the given info is non code null code and the resource neither exists nor is a phantom this method creates a phantom resource to hang on to the info If the given info is code null code any sync info for the resource stored by the given sync partner is discarded in some cases this may result in the deletion of a phantom resource if there is no more sync info to maintain for that resource p Sync information is not stored on the workspace root Attempts to set information on the root will be ignored p param partner the sync partner name param resource the resource param info the synchronization information or code null code exception Core Exception if this operation fails Reasons include ul li code I Resource Status PARTNER NOT REGISTERED code The sync partner is not registered li ul  CoreException IResourceStatus PARTNER_NOT_REGISTERED

Adds the given listener for resource change events to this workspace Has no effect if an identical listener is already registered p This method is equivalent to pre add Resource Change Listener listener I Resource Change Event PRE CLOSE I Resource Change Event PRE DELETE I Resource Change Event POST CHANGE pre p param listener the listener see I Resource Change Listener see I Resource Change Event see add Resource Change Listener I Resource Change Listener int see remove Resource Change Listener I Resource Change Listener  addResourceChangeListener IResourceChangeEvent PRE_CLOSE IResourceChangeEvent PRE_DELETE IResourceChangeEvent POST_CHANGE IResourceChangeListener IResourceChangeEvent addResourceChangeListener IResourceChangeListener removeResourceChangeListener IResourceChangeListener
Adds the given listener for the specified resource change events to this workspace Has no effect if an identical listener is already registered for these events After completion of this method the given listener will be registered for exactly the specified events If they were previously registered for other events they will be deregistered p Once registered a listener starts receiving notification of changes to resources in the workspace The resource deltas in the resource change event are rooted at the workspace root Most resource change notifications occur well after the fact the exception is pre notification of impending project closures and deletions The listener continues to receive notifications until it is replaced or removed p p Listeners can listen for several types of event as defined in code I Resource Change Event code Clients are free to register for any number of event types however if they register for more than one it is their responsibility to ensure they correctly handle the case where the same resource change shows up in multiple notifications Clients are guaranteed to receive only the events for which they are registered p param listener the listener param event Mask the bit wise OR of all event types of interest to the listener see I Resource Change Listener see I Resource Change Event see remove Resource Change Listener I Resource Change Listener  IResourceChangeEvent eventMask IResourceChangeListener IResourceChangeEvent removeResourceChangeListener IResourceChangeListener
Registers the given plug in s workspace save participant and returns an object describing the workspace state at the time of the last save in which the plug in participated p Once registered the workspace save participant will actively participate in the saving of this workspace p param plugin the plug in param participant the participant return the last saved state in which the plug in participated or code null code if the plug in has not participated before exception Core Exception if the method fails to add the participant Reasons include ul li The previous state could not be recovered li ul see I Save Participant see remove Save Participant Plugin  CoreException ISaveParticipant removeSaveParticipant
Builds all projects in this workspace Projects are built in the order specified in this workspace s description Projects not mentioned in the order or for which the order cannot be determined are built in an undefined order after all other projects have been built If no order is specified the workspace computes an order determined by project references p This method may change resources these changes will be reported in a subsequent resource change event p p This method is long running progress and cancellation are provided by the given progress monitor p param kind the kind of build being requested Valid values are ul li code FULL BUILD code indicates a full build li li code INCREMENTAL BUILD code indicates a incremental build li code CLEAN BUILD code indicates a clean request Clean does not actually build anything but rather discards all problems and build states ul param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if some of the builds fail The status contained in the exception is a multi status with entries for the project builds that failed exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Project build int I Progress Monitor see compute Project Order I Project see Incremental Project Builder FULL BUILD see Incremental Project Builder INCREMENTAL BUILD see Incremental Project Builder CLEAN BUILD see I Resource Rule Factory build Rule  FULL_BUILD INCREMENTAL_BUILD CLEAN_BUILD CoreException OperationCanceledException IProject IProgressMonitor computeProjectOrder IProject IncrementalProjectBuilder FULL_BUILD IncrementalProjectBuilder INCREMENTAL_BUILD IncrementalProjectBuilder CLEAN_BUILD IResourceRuleFactory buildRule
Checkpoints the operation currently in progress This method is used in the middle of a group of operations to force a background auto build if the build argument is true and send an interim notification of resource change events p When invoked in the dynamic scope of a call to the code I Workspace run code method this method reports a single resource change event describing the net effect of all changes done to resources since the last round of notifications When the outermost code run code method eventually completes it will do another auto build if enabled and report the resource changes made after this call p p This method has no effect if invoked outside the dynamic scope of a call to the code I Workspace run code method p p This method should be used under controlled circumstance e g to break up extremely long running operations p param build whether or not to run a build see I Workspace run I Workspace Runnable I Scheduling Rule int I Progress Monitor  IWorkspace IWorkspace IWorkspace IWorkspaceRunnable ISchedulingRule IProgressMonitor
Returns the prerequisite ordering of the given projects The computation is done by interpreting project references as dependency relationships For example if A references B and C and C references B this method given the list A B C will return the order B C A That is projects with no dependencies are listed first p The return value is a two element array of project arrays The first project array is the list of projects which could be sorted as outlined above The second element of the return value is an array of the projects which are ambiguously ordered e g they are part of a cycle p p Cycles and ambiguities are handled by elimination Projects involved in cycles are simply cut out of the ordered list and returned in an undefined order Closed and non existent projects are ignored and do not appear in the returned value at all p param projects the projects to order return the projects in sorted order and a list of projects which could not be ordered deprecated Replaced by code I Workspace compute Project Order code which produces a more usable result when there are cycles in project reference graph  IWorkspace computeProjectOrder
public final class Project Order Creates an instance with the given values p This class is not intended to be instantiated by clients p param projects initial value of code projects code field param has Cycles initial value of code has Cycles code field param knots initial value of code knots code field public Project Order I Project projects boolean has Cycles I Project knots this projects projects this has Cycles has Cycles this knots knots  ProjectOrder hasCycles hasCycles ProjectOrder IProject hasCycles IProject hasCycles hasCycles
Computes a total ordering of the given projects based on both static and dynamic project references If an existing and open project P references another existing and open project Q also included in the list then Q should come before P in the resulting ordering Closed and non existent projects are ignored and will not appear in the result References to non existent or closed projects are also ignored as are any self references The total ordering is always consistent with the global total ordering of all open projects in the workspace p When there are choices the choice is made in a reasonably stable way For example given an arbitrary choice between two projects the one with the lower collating project name is usually selected p p When the project reference graph contains cyclic references it is impossible to honor all of the relationships In this case the result ignores as few relationships as possible For example if P2 references P1 P4 references P3 and P2 and P3 reference each other then exactly one of the relationships between P2 and P3 will have to be ignored The outcome will be either P1 P2 P3 P4 or P1 P3 P2 P4 The result also contains complete details of any cycles present p p This method is time consuming and should not be called unnecessarily There are a very limited set of changes to a workspace that could affect the outcome creating renaming or deleting a project opening or closing a project adding or removing a project reference p param projects the projects to order return result describing the project order since 2 1 
Copies the given sibling resources so that they are located as members of the resource at the given path the names of the copies are the same as the corresponding originals p This is a convenience method fully equivalent to pre copy resources destination force I Resource FORCE I Resource NONE monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event that will include an indication that the resources have been added to the new parent p p This method is long running progress and cancellation are provided by the given progress monitor p param resources the resources to copy param destination the destination container path param force a flag controlling whether resources that are not in sync with the local file system will be tolerated param monitor a progress monitor or code null code if progress reporting is not desired return a status object with code code OK code if there were no problems otherwise a description possibly a multi status consisting of low severity warnings or informational messages exception Core Exception if the method fails to copy some resources The status contained in the exception may be a multi status indicating where the individual failures occurred exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see copy I Resource I Path int I Progress Monitor  IResource IResource CoreException OperationCanceledException IResource IPath IProgressMonitor
Copies the given sibling resources so that they are located as members of the resource at the given path the names of the copies are the same as the corresponding originals p This method can be expressed as a series of calls to code I Resource copy I Path int I Progress Monitor code with best effort semantics ul li Resources are copied in the order specified using the given update flags li li Duplicate resources are only copied once li li The method fails if the resources are not all siblings li li The failure of an individual copy does not necessarily prevent the method from attempting to copy other resources li li The method fails if there are projects among the resources li li The method fails if the path of the resources is a prefix of the destination path li li This method also fails if one or more of the individual resource copy steps fails li ul p p After successful completion corresponding new resources will now exist as members of the resource at the given path p p The supplied path may be absolute or relative Absolute paths fully specify the new location for the resource including its project Relative paths are considered to be relative to the container of the resources being copied A trailing separator is ignored p p This method changes resources these changes will be reported in a subsequent resource change event that will include an indication that the resources have been added to the new parent p p This method is long running progress and cancellation are provided by the given progress monitor p param resources the resources to copy param destination the destination container path param update Flags bit wise or of update flag constants param monitor a progress monitor or code null code if progress reporting is not desired return a status object with code code OK code if there were no problems otherwise a description possibly a multi status consisting of low severity warnings or informational messages exception Core Exception if the method fails to copy some resources The status contained in the exception may be a multi status indicating where the individual failures occurred Reasons include ul li One of the resources does not exist li li The resources are not siblings li li One of the resources or one of its descendents is not local li li The resource corresponding to the destination path does not exist li li The resource corresponding to the parent destination path is a closed project li li A corresponding target resource does exist li li A resource of a different type exists at the target path li li One of the resources is a project li li The path of one of the resources is a prefix of the destination path li li One of the resources or one of its descendents is out of sync with the local file system and code FORCE code is not specified li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource copy I Path int I Progress Monitor see I Resource Rule Factory copy Rule I Resource I Resource since 2 0  IResource IPath IProgressMonitor updateFlags CoreException IResourceChangeEvent OperationCanceledException IResource IPath IProgressMonitor IResourceRuleFactory copyRule IResource IResource
Deletes the given resources p This is a convenience method fully equivalent to pre delete resources I Resource KEEP HISTORY force I Resource FORCE I Resource NONE monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event p p This method is long running progress and cancellation are provided by the given progress monitor p param resources the resources to delete param force a flag controlling whether resources that are not in sync with the local file system will be tolerated param monitor a progress monitor or code null code if progress reporting is not desired return status with code code OK code if there were no problems otherwise a description possibly a multi status consisting of low severity warnings or informational messages exception Core Exception if the method fails to delete some resource The status contained in the exception is a multi status indicating where the individual failures occurred exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see delete I Resource int I Progress Monitor  IResource KEEP_HISTORY IResource IResource CoreException OperationCanceledException IResource IProgressMonitor
Deletes the given resources p This method can be expressed as a series of calls to code I Resource delete int I Progress Monitor code p p The semantics of multiple deletion are ul li Resources are deleted in the order presented using the given update flags li li Resources that do not exist are ignored li li An individual deletion fails if the resource still exists afterwards li li The failure of an individual deletion does not prevent the method from attempting to delete other resources li li This method fails if one or more of the individual resource deletions fails that is if at least one of the resources in the list still exists at the end of this method li ul p p This method changes resources these changes will be reported in a subsequent resource change event p p This method is long running progress and cancellation are provided by the given progress monitor p param resources the resources to delete param update Flags bit wise or of update flag constants param monitor a progress monitor or code null code if progress reporting is not desired return status with code code OK code if there were no problems otherwise a description possibly a multi status consisting of low severity warnings or informational messages exception Core Exception if the method fails to delete some resource The status contained in the exception is a multi status indicating where the individual failures occurred exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource delete int I Progress Monitor see I Resource Rule Factory delete Rule I Resource since 2 0  IResource IProgressMonitor updateFlags CoreException OperationCanceledException IResource IProgressMonitor IResourceRuleFactory deleteRule IResource
Removes the given markers from the resources with which they are associated Markers that do not exist are ignored p This method changes resources these changes will be reported in a subsequent resource change event p param markers the markers to remove exception Core Exception if this method fails Reasons include ul li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul see I Resource Rule Factory marker Rule I Resource  CoreException IResourceChangeEvent IResourceRuleFactory markerRule IResource
Forgets any resource tree being saved for the plug in with the given name If the plug in id is code null code all trees are forgotten p Clients should not call this method unless they have a reason to do so A plug in which uses code I Save Context need Delta code in the process of a save indicates that it would like to be fed the resource delta the next time it is reactivated If a plug in never gets reactivated or if it fails to successfully register to participate in workspace saves the workspace nevertheless retains the necessary information to generate the resource delta if asked This method allows such a long term leak to be plugged p param plugin Id the unique identifier of the plug in see I Save Context need Delta  ISaveContext needDelta pluginId ISaveContext needDelta
Returns all nature descriptors known to this workspace Returns an empty array if there are no installed natures return the nature descriptors known to this workspace since 2 0 
Returns the nature descriptor with the given unique identifier or code null code if there is no such nature param nature Id the nature extension identifer e g code com example cool Nature code return the nature descriptor or code null code since 2 0  natureId coolNature
Finds all dangling project references in this workspace Projects which are not open are ignored Returns a map with one entry for each open project in the workspace that has at least one dangling project reference the value of the entry is an array of projects which are referenced by that project but do not exist in the workspace Returns an empty Map if there are no projects in the workspace return a map key type code I Project code value type code I Project code from project to dangling project references  IProject IProject
Returns the workspace description This object is responsible for defining workspace preferences The returned value is a modifiable copy but changes are not automatically applied to the workspace In order to changes take effect code I Workspace set Description code needs to be called The workspace description values are store in the preference store return the workspace description see set Description I Workspace Description  IWorkspace setDescription setDescription IWorkspaceDescription
Returns the root resource of this workspace return the workspace root 
Returns a factory for obtaining scheduling rules prior to modifying resources in the workspace see I Resource Rule Factory return a resource rule factory since 3 0  IResourceRuleFactory
Returns the synchronizer for this workspace return the synchronizer see I Synchronizer  ISynchronizer
Returns whether this workspace performs auto builds return code true code if auto building is on code false code otherwise 
Returns whether the workspace tree is currently locked Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details return boolean code true code if the workspace tree is locked code false code otherwise see I Resource Change Event since 2 1  IResourceChangeEvent IResourceChangeEvent
Reads the project description file project from the given location in the local file system This object is useful for discovering the correct name for a project before importing it into the workspace p The returned value is writeable p param project Description File the path in the local file system of an existing project description file return a new project description exception Core Exception if the operation failed either because the project description file does not exist or cannot be opened or cannot be parsed as a legal project description file see new Project Description String see I Project get Description since 2 0  projectDescriptionFile CoreException newProjectDescription IProject getDescription
Moves the given sibling resources so that they are located as members of the resource at the given path the names of the new members are the same p This is a convenience method fully equivalent to pre move resources destination I Resource KEEP HISTORY force I Resource FORCE I Resource NONE monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event that will include an indication that the resources have been removed from their parent and that corresponding resources have been added to the new parent Additional information provided with resource delta shows that these additions and removals are pairwise related p p This method is long running progress and cancellation are provided by the given progress monitor p param resources the resources to move param destination the destination container path param force a flag controlling whether resources that are not in sync with the local file system will be tolerated param monitor a progress monitor or code null code if progress reporting is not desired return status with code code OK code if there were no problems otherwise a description possibly a multi status consisting of low severity warnings or informational messages exception Core Exception if the method fails to move some resources The status contained in the exception may be a multi status indicating where the individual failures occurred exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see move I Resource I Path int I Progress Monitor  IResource KEEP_HISTORY IResource IResource CoreException OperationCanceledException IResource IPath IProgressMonitor
Moves the given sibling resources so that they are located as members of the resource at the given path the names of the new members are the same p This method can be expressed as a series of calls to code I Resource move code with best effort semantics ul li Resources are moved in the order specified li li Duplicate resources are only moved once li li The code force code flag has the same meaning as it does on the corresponding single resource method li li The method fails if the resources are not all siblings li li The method fails the path of any of the resources is a prefix of the destination path li li The failure of an individual move does not necessarily prevent the method from attempting to move other resources li li This method also fails if one or more of the individual resource moves fails that is if at least one of the resources in the list still exists at the end of this method li li History is kept for moved files When projects are moved no history is kept li ul p p After successful completion the resources and descendents will no longer exist but corresponding new resources will now exist as members of the resource at the given path p p The supplied path may be absolute or relative Absolute paths fully specify the new location for the resource including its project Relative paths are considered to be relative to the container of the resources being moved A trailing separator is ignored p p This method changes resources these changes will be reported in a subsequent resource change event that will include an indication that the resources have been removed from their parent and that corresponding resources have been added to the new parent Additional information provided with resource delta shows that these additions and removals are pairwise related p p This method is long running progress and cancellation are provided by the given progress monitor p param resources the resources to move param destination the destination container path param update Flags bit wise or of update flag constants param monitor a progress monitor or code null code if progress reporting is not desired return status with code code OK code if there were no problems otherwise a description possibly a multi status consisting of low severity warnings or informational messages exception Core Exception if the method fails to move some resources The status contained in the exception may be a multi status indicating where the individual failures occurred Reasons include ul li One of the resources does not exist li li The resources are not siblings li li One of the resources or one of its descendents is not local li li The resource corresponding to the destination path does not exist li li The resource corresponding to the parent destination path is a closed project li li A corresponding target resource does exist li li A resource of a different type exists at the target path li li The path of one of the resources is a prefix of the destination path li li One of the resources or one of its descendents is out of sync with the local file system and code FORCE code is code false code li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource move I Path int I Progress Monitor see I Resource Rule Factory move Rule I Resource I Resource since 2 0  IResource updateFlags CoreException IResourceChangeEvent OperationCanceledException IResource IPath IProgressMonitor IResourceRuleFactory moveRule IResource IResource
Creates and returns a new project description for a project with the given name This object is useful when creating moving or copying projects p The project description is initialized to ul li the given project name li li no references to other projects li li an empty build spec li li an empty comment li ul p p The returned value is writeable p param project Name the name of the project return a new project description see I Project get Description see I Project create I Project Description I Progress Monitor see I Resource copy I Project Description int I Progress Monitor see I Project move I Project Description boolean I Progress Monitor  projectName IProject getDescription IProject IProjectDescription IProgressMonitor IResource IProjectDescription IProgressMonitor IProject IProjectDescription IProgressMonitor
Removes the given resource change listener from this workspace Has no effect if an identical listener is not registered param listener the listener see I Resource Change Listener see add Resource Change Listener I Resource Change Listener  IResourceChangeListener addResourceChangeListener IResourceChangeListener
Removes the workspace save participant for the given plug in from this workspace If no such participant is registered no action is taken p Once removed the workspace save participant no longer actively participates in any future saves of this workspace p param plugin the plug in see I Save Participant see add Save Participant Plugin I Save Participant  ISaveParticipant addSaveParticipant ISaveParticipant
Runs the given action as an atomic workspace operation p After running a method that modifies resources in the workspace registered listeners receive after the fact notification of what just transpired in the form of a resource change event This method allows clients to call a number of methods that modify resources and only have resource change event notifications reported at the end of the entire batch p p If this method is called outside the dynamic scope of another such call this method runs the action and then reports a single resource change event describing the net effect of all changes done to resources by the action p p If this method is called in the dynamic scope of another such call this method simply runs the action p p The supplied scheduling rule is used to determine whether this operation can be run simultaneously with workspace changes in other threads If the scheduling rule conflicts with another workspace change that is currently running the calling thread will be blocked until that change completes If the action attempts to make changes to the workspace that were not specified in the scheduling rule it will fail If no scheduling rule is supplied then any attempt to change resources will fail If a non code null code scheduling rule is supplied this operation must always support cancelation in the case where this operation becomes blocked by a long running background operation p p The AVOID UPDATE flag controls whether periodic resource change notifications should occur during the scope of this call If this flag is specified and no other threads modify the workspace concurrently then all resource change notifications will be deferred until the end of this call If this flag is not specified the platform may decide to broadcast periodic resource change notifications during the scope of this call p p Flags other than code AVOID UPDATE code are ignored p param action the action to perform param rule the scheduling rule to use when running this operation or code null code if there are no scheduling restrictions for this operation param flags bit wise or of flag constants only AVOID UPDATE is relevant here param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if the operation failed exception Operation Canceled Exception if the operation is canceled If a non code null code scheduling rule is supplied cancelation can occur even if no progress monitor is provided see AVOID UPDATE see I Resource Rule Factory since 3 0  AVOID_UPDATE AVOID_UPDATE AVOID_UPDATE CoreException OperationCanceledException AVOID_UPDATE IResourceRuleFactory
Runs the given action as an atomic workspace operation p This is a convenience method fully equivalent to pre workspace run action workspace get Root I Workspace AVOID UPDATE monitor pre p param action the action to perform param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if the operation failed exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided  getRoot IWorkspace AVOID_UPDATE CoreException OperationCanceledException
Saves this workspace s valuable state on disk Consults with all registered plug ins so that they can coordinate the saving of their persistent state as well p The code full code parameter indicates whether a full save or a snapshot is being requested Snapshots save the workspace information that is considered hard to be recomputed in the unlikely event of a crash It includes parts of the workspace tree workspace and projects descriptions markers and sync infos Full saves are heavy weight operations which save the complete workspace state p p To ensure that all outstanding changes to the workspace have been reported to interested parties prior to saving a full save cannot be used within the dynamic scope of an code I Workspace run code invocation Snapshots can be called anytime and are interpreted by the workspace as a hint that a snapshot is required The workspace will perform the snapshot when possible Even as a hint snapshots should only be called when necessary as they impact system performance Although saving does not change the workspace per se its execution is serialized like methods that write the workspace p p The workspace is comprised of several different kinds of data with varying degrees of importance The most important data the resources themselves and their persistent properties are written to disk immediately other data are kept in volatile memory and only written to disk periodically and other data are maintained in memory and never written out The following table summarizes what gets saved when ul li creating or deleting resource immediately li li setting contents of file immediately li li changes to project description immediately li li session properties never li li changes to persistent properties immediately li li markers code save code li li synchronizer info code save code li li shape of the workspace resource tree code save code li li list of active plug ins never li ul Resource based plug in also have data with varying degrees of importance Each plug in gets to decide the policy for protecting its data either immediately never or at code save code time For the latter the plug in coordinates its actions with the workspace see code I Save Participant code for details p p If the platform is shutdown or crashes after saving the workspace any information written to disk by the last successful workspace code save code will be restored the next time the workspace is reopened for the next session Naturally information that is written to disk immediately will be as of the last time it was changed p p The workspace provides a general mechanism for keeping concerned parties apprised of any and all changes to resources in the workspace code I Resource Change Listener code It is even possible for a plug in to find out about changes to resources that happen between workspace sessions see code I Workspace add Save Participant code p p At certain points during this method the entire workspace resource tree must be locked to prevent resources from being changed read access to resources is permitted p p Implementation note The execution sequence is as follows ul li A long term lock on the workspace is taken out to prevent further changes to workspace until the save is done li li The list of saveable resource tree snapshots is initially empty li li A different code I Save Context code object is created for each registered workspace save participant plug in reflecting the kind of save code I Save Context get Kind code the previous save number in which this plug in actively participated and the new save number previous save number plus 1 li li Each registered workspace save participant is sent code prepare To Save context code passing in its own context object ul li Plug in suspends all activities until further notice li ul If code prepare To Save code fails throws an exception the problem is logged and the participant is marked as unstable li li In dependent before prerequisite order each registered workspace save participant is sent code saving context code passing in its own context object ul li Plug in decides whether it wants to actively participate in this save The plug in only needs to actively participate if some of its important state has changed since the last time it actively participated If it does decide to actively participate it writes its important state to a brand new file in its plug in state area under a generated file name based on code context get State Number code and calls code context need State Number code to indicate that it has actively participated If upon reactivation the plug in will want a resource delta covering all changes between now and then the plug in should invoke code context need Delta code to request this now otherwise a resource delta for the intervening period will not be available on reactivation li ul If code saving code fails throws an exception the problem is logged and the participant is marked as unstable li li The plug in save table contains an entry for each plug in that has registered to participate in workspace saves at some time in the past the list of plug ins increases monotonically Each entry records the save number of the last successful save in which that plug in actively participated and optionally a saved resource tree conceptually this is a complete tree in practice it is compressed into a special delta tree representation A copy of the plug in save table is made Entries are created or modified for each registered plug in to record the appropriate save number either the previous save number or the previous save number plus 1 depending on whether the participant was active and asked for a new number li li The workspace tree the modified copy of the plug in save table all markers etc and all saveable resource tree snapshots are written to disk as b one atomic operation b li li The long term lock on the workspace is released li li If the atomic save succeeded ul li The modified copy of the plug in save table becomes the new plug in save table li li In prerequisite before dependent order each registered workspace save participant is sent code done Saving context code passing in its own context object ul li Plug in may perform clean up by deleting obsolete state files in its plug in state area li li Plug in resumes its normal activities li ul If code done Saving code fails throws an exception the problem is logged and the participant is marked as unstable The state number in the save table is not rolled back just because of this instability li li The workspace save operation returns li ul li If it failed ul li The workspace previous state is restored li li In prerequisite before dependent order each registered workspace save participant is sent code rollback context code passing in its own context object ul li Plug in may perform clean up by deleting newly created but obsolete state file in its plug in state area li li Plug in resumes its normal activities li ul If code rollback code fails throws an exception the problem is logged and the participant is marked as unstable The state number in the save table is rolled back anyway li li The workspace save operation fails li ul li ul p p After a full save the platform can be shutdown This will cause the Resources plug in and all the other plug ins to shutdown without disturbing the saved workspace on disk p p When the platform is later restarted activating the Resources plug in opens the saved workspace This reads into memory the workspace s resource tree plug in save table and saved resource tree snapshots everything that was written to disk in the atomic operation above Later when a plug in gets reactivated and registers to participate in workspace saves it is handed back the info from its entry in the plug in save table if it has one It gets back the number of the last save in which it actively participated and possibly a resource delta p p The only source of long term garbage would come from a plug in that never gets reactivated or one that gets reactivated but fails to register for workspace saves There is no such problem with a plug in that gets uninstalled its easy enough to scrub its state areas and delete its entry in the plug in save table p param full code true code if this is a full save and code false code if this is only a snapshot for protecting against crashes param monitor a progress monitor or code null code if progress reporting is not desired return a status that may contain warnings such as the failure of an individual participant exception Core Exception if this method fails to save the state of this workspace Reasons include ul li The operation cannot be batched with others li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if n IWorkspace ISaveParticipant IResourceChangeListener IWorkspace addSaveParticipant ISaveContext ISaveContext getKind prepareToSave prepareToSave getStateNumber needStateNumber needDelta doneSaving doneSaving CoreException OperationCanceledException
Sets the workspace description Its values are stored in the preference store param description the new workspace description see get Description exception Core Exception if the method fails Reasons include ul li There was a problem setting the workspace description li ul  getDescription CoreException
Sets the lock to use for controlling write access to this workspace The lock must only be set once p This method is for internal use by the platform related plug ins Clients should not call this method p param lock the lock to install on this workspace deprecated it is no longer possible to override the workspace lock behavior This functionality is now provided in the platform API by implementing the org eclipse core runtime jobs I Lock Listener interface  ILockListener
Returns a copy of the given set of natures sorted in prerequisite order For each nature it is guaranteed that all of its prerequisites will preceed it in the resulting array p Natures that are missing from the install or are involved in a prerequisite cycle are sorted arbitrarily Duplicate nature I Ds are removed so the returned array may be smaller than the original p param nature Ids a valid set of nature extension identifiers return the set of nature Ids sorted in prerequisite order see validate Nature Set String since 2 0  IDs natureIds validateNatureSet
Advises that the caller intends to modify the contents of the given files in the near future and asks whether modifying all these files would be reasonable The files must all exist This method is used to give the VCM component an opportunity to check out or otherwise prepare the files if required It is provided in this component rather than in the UI so that core i e head less clients can use it Similarly it is located outside the VCM component for the convenience of clients that must also operate in configurations without VCM p p A client such as an editor should perform a code validate Edit code on a file whenever it finds itself in the following position a the file is marked read only and b the client believes it likely not necessarily certain that it will modify the file s contents at some point A case in point is an editor that has a buffer opened on a file When the user starts to dirty the buffer the editor should check to see whether the file is read only If it is it should call code validate Edit code and can reasonably expect this call when successful to cause the file to become read write An editor should also be sensitive to a file becoming read only again even after a successful code validate Edit code e g due to the user checking in the file in a different view the editor should again call code validate Edit code if the file is read only before attempting to save the contents of the file p p By passing a UI context the caller indicates that the VCM component may contact the user to help decide how best to proceed If no UI context is provided the VCM component will make its decision without additional interaction with the user If OK is returned the caller can safely assume that all of the given files haven been prepared for modification and that there is good reason to believe that code I File set Contents code or code append Contents code would be successful on any of them If the result is not OK modifying the given files might not succeed for the reason s indicated p p If a shell is passed in as the context the VCM component may bring up a dialogs to query the user or report difficulties the shell should be used to parent any such dialogs the caller may safely assume that the reasons for failure will have been made clear to the user If code null code is passed the user should not be contacted any failures should be reported via the result the caller may chose to present these to the user however they see fit The ideal implementation of this method is transactional no files would be affected unless the go ahead could be given In practice there may be no feasible way to ensure such changes get done atomically p p The method calls code I File Modification Validator validate Edit code for the file modification validator if provided by the VCM plug in When there is no file modification validator this method returns a status with an code I Resource Status READ ONLY LOCAL code code if one of the files is read only and a status with an code I Status OK code code otherwise p p This method may be called from any thread If the UI context is used it is the responsibility of the implementor of code I File Modification Validator validate Edit code to interact with the UI context in an appropriate thread p param files the files that are to be modified these files must all exist in the workspace param context the code org eclipse swt widgets Shell code that is to be used to parent any dialogs with the user or code null code if there is no UI context declared as an code Object code to avoid any direct references on the SWT component return a status object that is OK if things are fine otherwise a status describing reasons why modifying the given files is not reasonable see I Resource Rule Factory validate Edit Rule I Resource since 2 0  validateEdit validateEdit validateEdit validateEdit IFile setContents appendContents IFileModificationValidator validateEdit IResourceStatus READ_ONLY_LOCAL IStatus IFileModificationValidator validateEdit IResourceRuleFactory validateEditRule IResource
Validates the given path as the location of the given resource on disk The path must be either an absolute file system path or a relative path whose first segment is the name of a defined workspace path variable In addition to the restrictions for paths in general see code I Path is Valid Path code a link location must also obey the following rules ul li must not overlap with the platform s metadata directory li li must not be the same as or a parent of the root directory of the project the linked resource is contained in li ul p This method also checks that the given resource can legally become a linked resource This includes the following restrictions ul li must have a project as its immediate parent li li project natures and the team hook may disallow linked resources on projects they are associated with li li the global workspace preference to disable linking code Resources Plugin PREF DISABLE LINKING code must not be set to quot true quot li ul p p This method will return a status with severity code I Status ERROR code if the location does not obey the above rules Also this method will return a status with severity code I Status WARNING code if the location overlaps the location of any existing resource in the workspace p p Note this method does not consider whether files or directories exist in the filesystem at the specified path param resource the resource to validate the location for param location the location of the linked resource contents on disk return a status object with code code I Status OK code if the given location is valid as the linked resource location otherwise a status object with severity code I Status WARNING code or code I Status ERROR code indicating what is wrong with the location see I Status OK see Resources Plugin PREF DISABLE LINKING since 2 1  IPath isValidPath ResourcesPlugin PREF_DISABLE_LINKING IStatus IStatus IStatus IStatus IStatus IStatus ResourcesPlugin PREF_DISABLE_LINKING
Validates the given string as the name of a resource valid for one of the given types p In addition to the basic restrictions on paths in general see code I Path is Valid Segment code a resource name must also obey the following rules ul li it must not be empty li it must not be a single period character li it must not contain two or more consecutive period characters li it must not end in a period character li it must not contain any characters or substrings that are not valid on the filesystem on which workspace root is located ul p p This validation check is done automatically as a resource is created but not when the resource handle is constructed this means that any resource that exists can be safely assumed to have a valid name and path Note that the name of the workspace root resource is inherently invalid p param segment the name segment to be checked param type Mask bitwise or of the resource type constants code FILE code code FOLDER code code PROJECT code or code ROOT code indicating expected resource type s return a status object with code code I Status OK code if the given string is valid as a resource name otherwise a status object indicating what is wrong with the string see I Resource PROJECT see I Resource FOLDER see I Resource FILE see I Status OK  IPath isValidSegment typeMask IStatus IResource IResource IResource IStatus
Validates that each of the given natures exists and that all nature constraints are satisfied within the given set p The following conditions apply to validation of a set of natures ul li all natures in the set exist in the plug in registry li all prerequisites of each nature are present in the set li there are no cycles in the prerequisite graph of the set li there are no two natures in the set that specify one of nature inclusion in the same group li there are no two natures in the set with the same id ul p p An empty nature set is always valid p param nature Ids an array of nature extension identifiers return a status object with code code I Status OK code if the given set of natures is valid otherwise a status object indicating what is wrong with the set since 2 0  natureIds IStatus
Validates the given string as a path for a resource of the given type s p In addition to the restrictions for paths in general see code I Path is Valid Path code a resource path should also obey the following rules ul li a resource path should be an absolute path with no device id li its segments should be valid names according to code validate Name code li a path for the workspace root must be the canonical root path li a path for a project should have exactly 1 segment li a path for a file or folder should have more than 1 segment li the first segment should be a valid project name li the second through penultimate segments should be valid folder names li the last segment should be a valid name of the given type ul p p Note this method does not consider whether a resource at the specified path exists p p This validation check is done automatically as a resource is created but not when the resource handle is constructed this means that any resource that exists can be safely assumed to have a valid name and path p param path the path string to be checked param type Mask bitwise or of the resource type constants code FILE code code FOLDER code code PROJECT code or code ROOT code indicating expected resource type s return a status object with code code I Status OK code if the given path is valid as a resource path otherwise a status object indicating what is wrong with the string see I Resource PROJECT see I Resource FOLDER see I Resource FILE see I Status OK see I Resource Status get Path  IPath isValidPath validateName typeMask IStatus IResource IResource IResource IStatus IResourceStatus getPath
Validates the given path as the location of the given project on disk The path must be either an absolute file system path or a relative path whose first segment is the name of a defined workspace path variable In addition to the restrictions for paths in general see code I Path is Valid Path code a location path should also obey the following rules ul li must not overlap with another open or closed project li li must not overlap with the platform s working directory li li must not be the same as or a child of the location of any existing linked resource in the given project li ul p p Note this method does not consider whether files or directories exist in the filesystem at the specified path param project the project to validate the location for param location the location of the project contents on disk return a status object with code code I Status OK code if the given location is valid as the project content location otherwise a status object indicating what is wrong with the location see I Project Description get Location see I Project Description set Location I Path see I Status OK  IPath isValidPath IStatus IProjectDescription getLocation IProjectDescription setLocation IPath IStatus
Returns the path variable manager for this workspace return the path variable manager see I Path Variable Manager since 2 1  IPathVariableManager

public interface I Workspace Description Returns the order in which projects in the workspace should be built The returned value is code null code if the workspace s default build order is being used return the names of projects in the order they will be built or code null code if the default build order should be used see set Build Order String see Resources Plugin PREF BUILD ORDER  IWorkspaceDescription setBuildOrder ResourcesPlugin PREF_BUILD_ORDER
Returns the maximum length of time in milliseconds a file state should be kept in the local history return the maximum time a file state should be kept in the local history represented in milliseconds see set File State Longevity long see Resources Plugin PREF FILE STATE LONGEVITY  setFileStateLongevity ResourcesPlugin PREF_FILE_STATE_LONGEVITY
Returns the maximum number of times that the workspace should rebuild when builders affect projects that have already been built return the maximum number of times that the workspace should rebuild when builders affect projects that have already been built see set Max Build Iterations int see Resources Plugin PREF MAX BUILD ITERATIONS since 2 1  setMaxBuildIterations ResourcesPlugin PREF_MAX_BUILD_ITERATIONS
Returns the maximum number of states per file that can be stored in the local history return the maximum number of states per file that can be stored in the local history see set Max File States int see Resources Plugin PREF MAX FILE STATES  setMaxFileStates ResourcesPlugin PREF_MAX_FILE_STATES
Returns the maximum permited size of a file in bytes to be stored in the local history return the maximum permited size of a file to be stored in the local history see set Max File State Size long see Resources Plugin PREF MAX FILE STATE SIZE  setMaxFileStateSize ResourcesPlugin PREF_MAX_FILE_STATE_SIZE
Returns the interval between automatic workspace snapshots return the amount of time in milliseconds between automatic workspace snapshots see set Snapshot Interval long see Resources Plugin PREF SNAPSHOT INTERVAL since 2 0  setSnapshotInterval ResourcesPlugin PREF_SNAPSHOT_INTERVAL
Returns whether this workspace performs auto builds return code true code if auto building is on otherwise code false code see set Auto Building boolean see Resources Plugin PREF AUTO BUILDING  setAutoBuilding ResourcesPlugin PREF_AUTO_BUILDING
Records whether this workspace performs auto builds p When auto build is on any changes made to a project and its resources automatically triggers an incremental build of that project If resources in several projects are changed within the scope of a workspace runnable the affected projects are auto built in no particular order p p Users must call code I Workspace set Description code before changes made to this description take effect p param value code true code to turn on auto building and code false code to turn it off see I Workspace set Description I Workspace Description see is Auto Building see Resources Plugin PREF AUTO BUILDING  IWorkspace setDescription IWorkspace setDescription IWorkspaceDescription isAutoBuilding ResourcesPlugin PREF_AUTO_BUILDING
Sets the order in which projects in the workspace should be built Projects not named in this list are built in a default order defined by the workspace Set this value to code null code to use the default ordering for all projects Projects not named in the list are built in unspecified order after all ordered projects p Users must call code I Workspace set Description code before changes made to this description take effect p param value the names of projects in the order in which they are built or code null code to use the workspace s default order for all projects see I Workspace set Description I Workspace Description see get Build Order see Resources Plugin PREF BUILD ORDER  IWorkspace setDescription IWorkspace setDescription IWorkspaceDescription getBuildOrder ResourcesPlugin PREF_BUILD_ORDER
Sets the maximum time in milliseconds a file state should be kept in the local history p Users must call code I Workspace set Description code before changes made to this description take effect p param time the maximum number of milliseconds a file state should be kept in the local history see I Workspace set Description I Workspace Description see get File State Longevity see Resources Plugin PREF FILE STATE LONGEVITY  IWorkspace setDescription IWorkspace setDescription IWorkspaceDescription getFileStateLongevity ResourcesPlugin PREF_FILE_STATE_LONGEVITY
Sets the maximum number of times that the workspace should rebuild when builders affect projects that have already been built p Users must call code I Workspace set Description code before changes made to this description take effect p param number the maximum number of times that the workspace should rebuild when builders affect projects that have already been built see I Workspace set Description I Workspace Description see get Max Build Iterations see Resources Plugin PREF MAX BUILD ITERATIONS since 2 1  IWorkspace setDescription IWorkspace setDescription IWorkspaceDescription getMaxBuildIterations ResourcesPlugin PREF_MAX_BUILD_ITERATIONS
Sets the maximum number of states per file that can be stored in the local history If the maximum number is reached older states are removed in favor of new ones p Users must call code I Workspace set Description code before changes made to this description take effect p param number the maximum number of states per file that can be stored in the local history see I Workspace set Description I Workspace Description see get Max File States see Resources Plugin PREF MAX FILE STATES  IWorkspace setDescription IWorkspace setDescription IWorkspaceDescription getMaxFileStates ResourcesPlugin PREF_MAX_FILE_STATES
Sets the maximum permited size of a file in bytes to be stored in the local history p Users must call code I Workspace set Description code before changes made to this description take effect p param size the maximum permited size of a file to be stored in the local history see I Workspace set Description I Workspace Description see get Max File State Size see Resources Plugin PREF MAX FILE STATE SIZE  IWorkspace setDescription IWorkspace setDescription IWorkspaceDescription getMaxFileStateSize ResourcesPlugin PREF_MAX_FILE_STATE_SIZE
Sets the interval between automatic workspace snapshots The new interval will only take effect after the next snapshot p Users must call code I Workspace set Description code before changes made to this description take effect p param delay the amount of time in milliseconds between automatic workspace snapshots see I Workspace set Description I Workspace Description see get Snapshot Interval see Resources Plugin PREF SNAPSHOT INTERVAL since 2 0  IWorkspace setDescription IWorkspace setDescription IWorkspaceDescription getSnapshotInterval ResourcesPlugin PREF_SNAPSHOT_INTERVAL

Deletes everything in the workspace except the workspace root resource itself p This is a convenience method fully equivalent to pre delete delete Content I Resource ALWAYS DELETE PROJECT CONTENT I Resource NEVER DELETE PROJECT CONTENT force FORCE I Resource NONE monitor pre p p This method changes resources these changes will be reported in a subsequent resource change event p p This method is long running progress and cancellation are provided by the given progress monitor p param delete Content a flag controlling how whether content is aggressively deleted param force a flag controlling whether resources that are not in sync with the local file system will be tolerated param monitor a progress monitor or code null code if progress reporting is not desired exception Core Exception if this method fails Reasons include ul li A project could not be deleted li li A project s contents could not be deleted li li Resource changes are disallowed during certain types of resource change event notification See code I Resource Change Event code for more details li ul exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see I Resource delete int I Progress Monitor  deleteContent IResource ALWAYS_DELETE_PROJECT_CONTENT IResource NEVER_DELETE_PROJECT_CONTENT IResource deleteContent CoreException IResourceChangeEvent OperationCanceledException IResource IProgressMonitor
Returns the handles to all the resources workspace root project folder in the workspace which are mapped to the given path in the local file system Returns an empty array if there are none p If the path maps to the platform working location the returned object will be a single element array consisting of an object of type code ROOT code p If the path maps to a project the resulting object will be a single element array consisting of an object of type code PROJECT code otherwise the resulting array will contain folders type code FOLDER code p The path must be absolute its segments need not be valid names a trailing separator is ignored The resulting resource s need not exist in the workspace p param location a path in the local file system return the corresponding containers in the workspace or an empty array if none since 2 1 
Returns the handles of all files that are mapped to the given path in the local file system Returns an empty array if there are none The path must be absolute its segments need not be valid names The resulting file s need not exist in the workspace p param location a path in the local file system return the corresponding files in the workspace or an empty array if none since 2 1 
Returns a handle to the workspace root project or folder which is mapped to the given path in the local file system or code null code if none If the path maps to the platform working location the returned object will be of type code ROOT code If the path maps to a project the resulting object will be of type code PROJECT code otherwise the resulting object will be a folder type code FOLDER code The path must be absolute its segments need not be valid names a trailing separator is ignored The resulting resource need not exist in the workspace p This method returns null when the given file system location is not equal to or under the location of any existing project in the workspace or equal to the location of the platform working location p p Warning This method ignores linked resources and their children Since linked resources may overlap other resources a unique mapping from a file system location to a single resource is not guaranteed To find all resources for a given location including linked resources use the method code find Containers For Location code p param location a path in the local file system return the corresponding project or folder in the workspace or code null code if none  findContainersForLocation
Returns a handle to the file which is mapped to the given path in the local file system or code null code if none The path must be absolute its segments need not be valid names The resulting file need not exist in the workspace p This method returns null when the given file system location is not under the location of any existing project in the workspace p p Warning This method ignores linked resources and their children Since linked resources may overlap other resources a unique mapping from a file system location to a single resource is not guaranteed To find all resources for a given location including linked resources use the method code find Files For Location code p param location a path in the local file system return the corresponding file in the workspace or code null code if none  findFilesForLocation
Returns a handle to the project resource with the given name which is a child of this root p Note This method deals exclusively with resource handles independent of whether the resources exist in the workspace The validation check on the project name is not done when the project handle is constructed rather it is done automatically as the project is created p param name the name of the project return a project resource handle see get Projects  getProjects
Returns the collection of projects which exist under this root The projects can be open or closed return an array of projects see get Project String  getProject

public interface I Workspace Runnable Runs the operation reporting progress to and accepting cancellation requests from the given progress monitor p Implementors of this method should check the progress monitor for cancellation when it is safe and appropriate to do so The cancellation request should be propagated to the caller by throwing code Operation Canceled Exception code p param monitor a progress monitor or code null code if progress reporting and cancellation are not desired exception Core Exception if this operation fails  IWorkspaceRunnable OperationCanceledException CoreException

Create and return a new project scope for the given project The given project must not be code null code param context the project throws Illegal Argument Exception if the project is code null code public Project Scope I Project context super if context null throw new Illegal Argument Exception this context context  IllegalArgumentException ProjectScope IProject IllegalArgumentException
public I Eclipse Preferences get Node String qualifier if qualifier null throw new Illegal Argument Exception if context null return null return I Eclipse Preferences Platform get Preferences Service get Root Node node SCOPE node context get Name node qualifier  IEclipsePreferences getNode IllegalArgumentException IEclipsePreferences getPreferencesService getRootNode getName
public I Path get Location if context null return null I Project project I Resource context get Project I Path location project get Location return location null null location append Eclipse Preferences DEFAULT PREFERENCES DIRNAME  IPath getLocation IProject IResource getProject IPath getLocation EclipsePreferences DEFAULT_PREFERENCES_DIRNAME
see org eclipse core runtime preferences I Scope Context get Name public String get Name return SCOPE  IScopeContext getName getName

public interface I Refresh Monitor Informs the monitor that it should stop monitoring the given resource param resource the resource that should no longer be monitored or code null code if this monitor should stop monitoring all resources it is currently monitoring  IRefreshMonitor

public interface I Refresh Result Notifies that the given monitor has encountered a failure from which it cannot recover while monitoring the given resource p If the given resource is code null code it indicates that the monitor has failed completely and the refresh manager will have to take over the monitoring responsibilities for all resources that the monitor was monitoring param monitor a monitor which has encountered a failure that it cannot recover from param resource the resource that the monitor can no longer monitor or code null code to indicate that the monitor can no longer monitor any of the resources it was monitoring  IRefreshResult
Requests that the provided resource be refreshed The refresh will occur in the background during the next scheduled refresh param resource the resource to refresh 

public abstract class Refresh Provider extends Internal Refresh Provider Creates a new refresh monitor that performs naive polling of the resource in the file system to detect changes The returned monitor will immediately begin monitoring the specified resource root and report changes back to the workspace p This default monitor can be returned by subclasses when code install Monitor code is called p If the returned monitor is not immediately returned from the code install Monitor code method then clients are responsible for telling the returned monitor to stop polling when it is no longer needed The returned monitor can be told to stop working by invoking code I Refresh Monitor unmonitor I Resource code param resource The resource to begin monitoring return A refresh monitor instance see install Monitor I Resource I Refresh Result protected I Refresh Monitor create Polling Monitor I Resource resource return super create Polling Monitor resource  RefreshProvider InternalRefreshProvider installMonitor installMonitor IRefreshMonitor IResource installMonitor IResource IRefreshResult IRefreshMonitor createPollingMonitor IResource createPollingMonitor
Returns an code I Refresh Monitor code that will monitor a resource If the resource is an code I Container code the monitor will also monitor the subtree under the container Returns code null code if this provider cannot create a monitor for the given resource The provider may return the same monitor instance that has been provided for other resources p The monitor should send results and failures to the provided refresh result param resource the resource to monitor param result the result callback for notifying of failure or of resources that need refreshing return a monitor on the resource or code null code if the resource cannot be monitored see create Polling Monitor I Resource  IRefreshMonitor IContainer createPollingMonitor IResource
Resets the installed monitors for the given resource This will remove all existing monitors that are installed on the resource and then ask all refresh providers to begin monitoring the resource again p This method is intended to be used by refresh providers that need to change the refresh monitor that they previously used to monitor a resource param resource The resource to reset the monitors for public void reset Monitors I Resource resource super reset Monitors resource  resetMonitors IResource resetMonitors

Constructs an instance of this plug in runtime class p An instance of this plug in runtime class is automatically created when the facilities provided by the Resources plug in are required b Clients must never explicitly instantiate a plug in runtime class b p param plugin Descriptor the plug in descriptor for the Resources plug in public Resources Plugin I Plugin Descriptor plugin Descriptor super plugin Descriptor plugin this  pluginDescriptor ResourcesPlugin IPluginDescriptor pluginDescriptor pluginDescriptor
Constructs a brand new workspace structure at the location in the local file system identified by the given path and returns a new workspace object exception Core Exception if the workspace structure could not be constructed Reasons include ll li There is an existing workspace structure on at the given location in the local file system li A file exists at the given location in the local file system li A directory could not be created at the given location in the local file system ll private static void construct Workspace throws Core Exception new Local Meta Area create Meta Area  CoreException constructWorkspace CoreException LocalMetaArea createMetaArea
Returns the encoding to use when reading text files in the workspace This is the value of the code PREF ENCODING code preference or the file system encoding code System get Property file encoding code if the preference is not set p Note that this method does not check whether the result is a supported encoding Callers should be prepared to handle code Unsupported Encoding Exception code where this encoding is used return the encoding to use when reading text files in the workspace see java io Unsupported Encoding Exception public static String get Encoding String enc get Plugin get Plugin Preferences get String PREF ENCODING if enc null enc length 0 enc System get Property file encoding NON NLS 1 return enc  PREF_ENCODING getProperty UnsupportedEncodingException UnsupportedEncodingException getEncoding getPlugin getPluginPreferences getString PREF_ENCODING getProperty
Returns the Resources plug in return the single instance of this plug in runtime class public static Resources Plugin get Plugin return plugin  ResourcesPlugin getPlugin
Returns the workspace The workspace is not accessible after the resources plug in has shutdown return the workspace that was created by the single instance of this plug in class or code null code if this plug in has been shut down public static I Workspace get Workspace return workspace  IWorkspace getWorkspace
This implementation of the corresponding code Plugin code method closes the workspace without saving see Plugin shutdown public void shutdown throws Core Exception if workspace null return save the preferences for this plug in get Plugin save Plugin Preferences workspace close null Forget workspace only if successfully closed to make it easier to debug cases where close is failing workspace null  CoreException getPlugin savePluginPreferences
This implementation of the corresponding code Plugin code method opens the workspace see Plugin startup public void startup throws Core Exception if new Local Meta Area has Saved Workspace construct Workspace Workspace DEBUG Resources Plugin get Plugin is Debugging Remember workspace before opening to make it easier to debug cases where open is failing workspace new Workspace PlatformURL Resource Connection startup Platform get Location I Status result workspace open null if result isOK get Log log result  CoreException LocalMetaArea hasSavedWorkspace constructWorkspace ResourcesPlugin getPlugin isDebugging PlatformURLResourceConnection getLocation IStatus getLog

Implements code I Resource delete int I Progress Monitor code where the receiver is a file Returns code true code to accept responsibility for implementing this operation as per the API contract p In broad terms a full re implementation should delete the file in the local file system and then call code tree deleted File code to complete the updating of the workspace resource tree to reflect this fact If unsuccessful in deleting the file from the the local file system it should instead call code tree failed code to report the reason for the failure In either case it should return code true code to indicate that the operation was attempted The code FORCE code update flag needs to be honored unless code FORCE code is specified the implementation must use code tree is Synchronized code to determine whether the file is in sync before attempting to delete it The code KEEP HISTORY code update flag needs to be honored as well use code tree add To Local History code to capture the contents of the file before deleting it from the local file system p p An extending implementation should perform whatever pre processing it needs to do and then call code tree standard Delete File code to explicitly invoke the standard file deletion behavior which deletes both the file from the local file system and updates the workspace resource tree It should return code true code to indicate that the operation was attempted p p Returning code false code is the easy way for the implementation to say pass It is equivalent to calling code tree standard Delete File code and returning code true code p p The implementation of this method runs below the resources API and is therefore very restricted in what resource API method it can call The list of useable methods includes most resource operations that read but do not update the resource tree resource operations that modify resources and trigger deltas must not be called from within the dynamic scope of the invocation of this method p param tree the workspace resource tree this object is only valid for the duration of the invocation of this method and must not be used after this method has completed param file the handle of the file to delete the receiver of code I Resource delete int I Progress Monitor code param update Flags bit wise or of update flag constants as per code I Resource delete int I Progress Monitor code param monitor the progress monitor or code null code as per code I Resource delete int I Progress Monitor code return code false code if this method declined to assume responsibility for this operation and code true code if this method attempted to carry out the operation see I Resource delete int I Progress Monitor  IResource IProgressMonitor deletedFile isSynchronized KEEP_HISTORY addToLocalHistory standardDeleteFile standardDeleteFile IResource IProgressMonitor updateFlags IResource IProgressMonitor IResource IProgressMonitor IResource IProgressMonitor
Implements code I Resource delete int I Progress Monitor code where the receiver is a folder Returns code true code to accept responsibility for implementing this operation as per the API contract p In broad terms a full re implementation should delete the directory tree in the local file system and then call code tree deleted Folder code to complete the updating of the workspace resource tree to reflect this fact If unsuccessful in deleting the directory or any of its descendents from the local file system it should instead call code tree failed code to report each reason for failure In either case it should return code true code to indicate that the operation was attempted The code FORCE code update flag needs to be honored unless code FORCE code is specified the implementation must use code tree is Synchronized code to determine whether the folder subtree is in sync before attempting to delete it The code KEEP HISTORY code update flag needs to be honored as well use code tree add To Local History code to capture the contents of any files being deleted p p A partial re implementation should perform whatever pre processing it needs to do and then call code tree standard Delete Folder code to explicitly invoke the standard folder deletion behavior which deletes both the folder and its descendents from the local file system and updates the workspace resource tree It should return code true code to indicate that the operation was attempted p p Returning code false code is the easy way for the implementation to say pass It is equivalent to calling code tree standard Delete Folder code and returning code true code p p The implementation of this method runs below the resources API and is therefore very restricted in what resource API method it can call The list of useable methods includes most resource operations that read but do not update the resource tree resource operations that modify resources and trigger deltas must not be called from within the dynamic scope of the invocation of this method p param tree the workspace resource tree this object is only valid for the duration of the invocation of this method and must not be used after this method has completed param folder the handle of the folder to delete the receiver of code I Resource delete int I Progress Monitor code param update Flags bit wise or of update flag constants as per code I Resource delete int I Progress Monitor code param monitor the progress monitor or code null code as per code I Resource delete int I Progress Monitor code return code false code if this method declined to assume responsibility for this operation and code true code if this method attempted to carry out the operation see I Resource delete int I Progress Monitor  IResource IProgressMonitor deletedFolder isSynchronized KEEP_HISTORY addToLocalHistory standardDeleteFolder standardDeleteFolder IResource IProgressMonitor updateFlags IResource IProgressMonitor IResource IProgressMonitor IResource IProgressMonitor
Implements code I Resource delete int I Progress Monitor code where the receiver is a project Returns code true code to accept responsibility for implementing this operation as per the API contract p In broad terms a full re implementation should delete the project content area in the local file system if required the files of a closed project should be deleted only if the code I Resource ALWAYS DELETE PROJECT CONTENTS code update flag is specified the files of an open project should be deleted unless the the code I Resource NEVER DELETE PROJECT CONTENTS code update flag is specified It should then call code tree deleted Project code to complete the updating of the workspace resource tree to reflect this fact If unsuccessful in deleting the project s files from the local file system it should instead call code tree failed code to report the reason for the failure In either case it should return code true code to indicate that the operation was attempted The code FORCE code update flag may need to be honored if the project is open unless code FORCE code is specified the implementation must use code tree is Synchronized code to determine whether the project subtree is in sync before attempting to delete it Note that local history is not maintained when a project is deleted regardless of the setting of the code KEEP HISTORY code update flag p p A partial re implementation should perform whatever pre processing it needs to do and then call code tree standard Delete Project code to explicitly invoke the standard project deletion behavior It should return code true code to indicate that the operation was attempted p p Returning code false code is the easy way for the implementation to say pass It is equivalent to calling code tree standard Delete Project code and returning code true code p p The implementation of this method runs below the resources API and is therefore very restricted in what resource API method it can call The list of useable methods includes most resource operations that read but do not update the resource tree resource operations that modify resources and trigger deltas must not be called from within the dynamic scope of the invocation of this method p param tree the workspace resource tree this object is only valid for the duration of the invocation of this method and must not be used after this method has completed param project the handle of the project to delete the receiver of code I Resource delete int I Progress Monitor code param update Flags bit wise or of update flag constants as per code I Resource delete int I Progress Monitor code param monitor the progress monitor or code null code as per code I Resource delete int I Progress Monitor code return code false code if this method declined to assume responsibility for this operation and code true code if this method attempted to carry out the operation see I Resource delete int I Progress Monitor  IResource IProgressMonitor IResource ALWAYS_DELETE_PROJECT_CONTENTS IResource NEVER_DELETE_PROJECT_CONTENTS deletedProject isSynchronized KEEP_HISTORY standardDeleteProject standardDeleteProject IResource IProgressMonitor updateFlags IResource IProgressMonitor IResource IProgressMonitor IResource IProgressMonitor
Implements code I Resource move I Path int I Progress Monitor code where the receiver is a file Returns code true code to accept responsibility for implementing this operation as per the API contract p On entry to this hook method the following is guaranteed about the workspace resource tree the source file exists the destination file does not exist the container of the destination file exists and is accessible In broad terms a full re implementation should move the file in the local file system and then call code tree move File code to complete the updating of the workspace resource tree to reflect this fact If unsuccessful in moving the file in the the local file system it should instead call code tree failed code to report the reason for the failure In either case it should return code true code to indicate that the operation was attempted The code FORCE code update flag needs to be honored unless code FORCE code is specified the implementation must use code tree is Synchronized code to determine whether the file is in sync before attempting to move it The code KEEP HISTORY code update flag needs to be honored as well use code tree add To Local History code to capture the contents of the file naturally this must be before moving the file from the local file system p p An extending implementation should perform whatever pre processing it needs to do and then call code tree standard Move File code to explicitly invoke the standard file moving behavior which moves both the file in the local file system and updates the workspace resource tree It should return code true code to indicate that the operation was attempted p p Returning code false code is the easy way for the implementation to say pass It is equivalent to calling code tree standard Move File code and returning code true code p p The implementation of this method runs below the resources API and is therefore very restricted in what resource API method it can call The list of useable methods includes most resource operations that read but do not update the resource tree resource operations that modify resources and trigger deltas must not be called from within the dynamic scope of the invocation of this method p param tree the workspace resource tree this object is only valid for the duration of the invocation of this method and must not be used after this method has completed param source the handle of the file to move the receiver of code I Resource move I Path int I Progress Monitor code param destination the handle of where the file will move to the handle equivalent of the first parameter to code I Resource move I Path int I Progress Monitor code param update Flags bit wise or of update flag constants as per code I Resource move I Path int I Progress Monitor code param monitor the progress monitor or code null code as per code I Resource move I Path int I Progress Monitor code return code false code if this method declined to assume responsibility for this operation and code true code if this method attempted to carry out the operation see I Resource move org eclipse core runtime I Path int I Progress Monitor  IResource IPath IProgressMonitor moveFile isSynchronized KEEP_HISTORY addToLocalHistory standardMoveFile standardMoveFile IResource IPath IProgressMonitor IResource IPath IProgressMonitor updateFlags IResource IPath IProgressMonitor IResource IPath IProgressMonitor IResource IPath IProgressMonitor
Implements code I Resource move I Path int I Progress Monitor code where the receiver is a project Returns code true code to accept responsibility for implementing this operation as per the API contract p On entry to this hook method the following is guaranteed about the workspace resource tree the source folder exists the destination folder does not exist the container of the destination folder exists and is accessible In broad terms a full re implementation should move the directory tree in the local file system and then call code tree moved Folder code to complete the updating of the workspace resource tree to reflect this fact If unsuccessful in moving the directory or any of its descendents in the the local file system call code tree failed code to report each reason for failure In either case return code true code to indicate that the operation was attempted The code FORCE code update flag needs to be honored unless code FORCE code is specified the implementation must use code tree is Synchronized code to determine whether the folder subtree is in sync before attempting to move it The code KEEP HISTORY code update flag needs to be honored as well use code tree add To Local History code to capture the contents of any files being moved p p A partial re implementation should perform whatever pre processing it needs to do and then call code tree standard Move Folder code to explicitly invoke the standard folder move behavior which move both the folder and its descendents in the local file system and updates the workspace resource tree Return code true code to indicate that the operation was attempted p p Returning code false code is the easy way for the implementation to say pass It is equivalent to calling code tree standard Delete Folder code and returning code true code p p The implementation of this method runs below the resources API and is therefore very restricted in what resource API method it can call The list of useable methods includes most resource operations that read but do not update the resource tree resource operations that modify resources and trigger deltas must not be called from within the dynamic scope of the invocation of this method p param tree the workspace resource tree this object is only valid for the duration of the invocation of this method and must not be used after this method has completed param source the handle of the folder to move the receiver of code I Resource move I Path int I Progress Monitor code param destination the handle of where the folder will move to the handle equivalent of the first parameter to code I Resource move I Path int I Progress Monitor code param update Flags bit wise or of update flag constants as per code I Resource move I Path int I Progress Monitor code param monitor the progress monitor or code null code as per code I Resource move I Path int I Progress Monitor code return code false code if this method declined to assume responsibility for this operation and code true code if this method attempted to carry out the operation see I Resource move org eclipse core runtime I Path int I Progress Monitor  IResource IPath IProgressMonitor movedFolder isSynchronized KEEP_HISTORY addToLocalHistory standardMoveFolder standardDeleteFolder IResource IPath IProgressMonitor IResource IPath IProgressMonitor updateFlags IResource IPath IProgressMonitor IResource IPath IProgressMonitor IResource IPath IProgressMonitor
Implements code I Resource move I Path int I Progress Monitor code and code I Resource move I Project Description int I Progress Monitor code where the receiver is a project Returns code true code to accept responsibility for implementing this operation as per the API contracts p On entry to this hook method the source project is guaranteed to exist and be open in the workspace resource tree If the given description contains a different name from that of the given project then the project is being renamed and its content possibly relocated If the given description contains the same name as the given project then the project is being relocated but not renamed When the project is being renamed the destination project is guaranteed not to exist in the workspace resource tree p p Returning code false code is the easy way for the implementation to say pass It is equivalent to calling code tree standard Move Project code and returning code true code p p The implementation of this method runs below the resources API and is therefore very restricted in what resource API method it can call The list of useable methods includes most resource operations that read but do not update the resource tree resource operations that modify resources and trigger deltas must not be called from within the dynamic scope of the invocation of this method p param tree the workspace resource tree this object is only valid for the duration of the invocation of this method and must not be used after this method has completed param source the handle of the open project to move the receiver of code I Resource move I Project Description int I Progress Monitor code or code I Resource move I Path int I Progress Monitor code param description the new description of the project the first parameter to code I Resource move I Project Description int I Progress Monitor code or a copy of the project s description with the location changed to the path given in the first parameter to code I Resource move I Path int I Progress Monitor code param update Flags bit wise or of update flag constants as per code I Resource move I Project Description int I Progress Monitor code or code I Resource move I Path int I Progress Monitor code param monitor the progress monitor or code null code as per code I Resource move I Project Description int I Progress Monitor code or code I Resource move I Path int I Progress Monitor code return code false code if this method declined to assume responsibility for this operation and code true code if this method attempted to carry out the operation see I Resource move org eclipse core runtime I Path int I Progress Monitor see I Resource move I Project Description int I Progress Monitor  IResource IPath IProgressMonitor IResource IProjectDescription IProgressMonitor standardMoveProject IResource IProjectDescription IProgressMonitor IResource IPath IProgressMonitor IResource IProjectDescription IProgressMonitor IResource IPath IProgressMonitor updateFlags IResource IProjectDescription IProgressMonitor IResource IPath IProgressMonitor IResource IProjectDescription IProgressMonitor IResource IPath IProgressMonitor IResource IPath IProgressMonitor IResource IProjectDescription IProgressMonitor

Adds the current state of the given file to the local history Does nothing if the file does not exist in the workspace resource tree or if it exists in the workspace resource tree but not in the local file system p This method is used to capture the state of a file in the workspace local history before it is overwritten or deleted p param file the file to be captured 
Returns whether the given resource and its descendants to the given depth are considered to be in sync with the local file system Returns code false code if the given resource does not exist in the workspace resource tree but exists in the local file system and conversely param resource the resource of interest param depth the depth one of code I Resource DEPTH ZERO code code DEPTH ONE code or code DEPTH INFINITE code return code true code if the resource is synchronized and code false code in all other cases  IResource DEPTH_ZERO DEPTH_ONE DEPTH_INFINITE
Computes the timestamp for the given file in the local file system Returns code NULL TIMESTAMP code if the timestamp of the file in the local file system cannot be determined The file need not exist in the workspace resource tree however if the file s project does not exist in the workspace resource tree this method returns code NULL TIMESTAMP code because the project s local content area is indeterminate p Note that the timestamps used for workspace resource tree file synchronization are not necessarily interchangeable with code java io File code last modification time The ones computed by code compute Timestamp code may have a higher resolution in some operating environments p param file the file of interest return the local file system timestamp for the file or code NULL TIMESTAMP code if it could not be computed  NULL_TIMESTAMP NULL_TIMESTAMP computeTimestamp NULL_TIMESTAMP
Returns the timestamp for the given file as recorded in the workspace resource tree Returns code NULL TIMESTAMP code if the given file does not exist in the workspace resource tree or if the timestamp is not known p Note that the timestamps used for workspace resource tree file synchronization are not necessarily interchangeable with code java io File code last modification time The ones computed by code compute Timestamp code may have a higher resolution in some operating environments p param file the file of interest return the workspace resource tree timestamp for the file or code NULL TIMESTAMP code if the file does not exist in the workspace resource tree or if the timestamp is not known  NULL_TIMESTAMP computeTimestamp NULL_TIMESTAMP
Updates the timestamp for the given file in the workspace resource tree The file is the local file system is not affected Does nothing if the given file does not exist in the workspace resource tree p The given timestamp should be that of the corresponding file in the local file system as computed by code compute Timestamp code A discrepancy between the timestamp of the file in the local file system and the timestamp recorded in the workspace resource tree means that the file is out of sync code is Synchronized code returns code false code p p This operation should be used after code moved File Folder Project code to correct the workspace resource tree record when file timestamps change in the course of a move operation p p Note that the timestamps used for workspace resource tree file synchronization are not necessarily interchangeable with code java io File code last modification time The ones computed by code compute Timestamp code may have a higher resolution in some operating environments p param file the file of interest param timestamp the local file system timestamp for the file or code NULL TIMESTAMP code if unknown see compute Timestamp I File  computeTimestamp isSynchronized movedFile computeTimestamp NULL_TIMESTAMP computeTimestamp IFile
Declares that the operation has failed for the specified reason This method may be called multiple times to report multiple failures All reasons will be accumulated and taken into consideration when deciding the outcome of the hooked operation as a whole param reason the reason the operation or sub operation failed 
Declares that the given file has been successfully deleted from the local file system and requests that the corresponding deletion should now be made to the workspace resource tree No action is taken if the given file does not exist in the workspace resource tree p This method clears out any markers session properties and persistent properties associated with the given file p param file the file that was just deleted from the local file system 
Declares that the given folder and all its descendents have been successfully deleted from the local file system and requests that the corresponding deletion should now be made to the workspace resource tree No action is taken if the given folder does not exist in the workspace resource tree p This method clears out any markers session properties and persistent properties associated with the given folder or its descendents p param folder the folder that was just deleted from the local file system 
Declares that the given project s content area in the local file system has been successfully dealt with in an appropriate manner and requests that the corresponding deletion should now be made to the workspace resource tree No action is taken if the given project does not exist in the workspace resource tree p This method clears out everything associated with this project and any of its descendent resources including markers session properties persistent properties local history and project specific plug ins working data areas The project s content area is not affected p param project the project being deleted 
Declares that the given source file has been successfully moved to the given destination in the local file system and requests that the corresponding changes should now be made to the workspace resource tree No action is taken if the given source file does not exist in the workspace resource tree p The destination file must not already exist in the workspace resource tree p p This operation carries over the file timestamp unchanged Use code update Moved File Timestamp code to update the timestamp of the file if its timestamp changed as a direct consequence of the move p param source the handle of the source file that was moved param destination the handle of where the file moved to see compute Timestamp I File  updateMovedFileTimestamp computeTimestamp IFile
Declares that the given source folder and its descendents have been successfully moved to the given destination in the local file system and requests that the corresponding changes should now be made to the workspace resource tree for the folder and all its descendents No action is taken if the given source folder does not exist in the workspace resource tree p This operation carries over file timestamps unchanged Use code update Moved File Timestamp code to update the timestamp of files whose timestamps changed as a direct consequence of the move p p The destination folder must not already exist in the workspace resource tree p param source the handle of the source folder that was moved param destination the handle of where the folder moved to  updateMovedFileTimestamp
Declares that the given source project and its files and folders have been successfully relocated in the local file system if required and requests that the rename and or relocation should now be made to the workspace resource tree for the project and all its descendents No action is taken if the given project does not exist in the workspace resource tree p This operation carries over file timestamps unchanged Use code update Moved File Timestamp code to update the timestamp of files whose timestamps changed as a direct consequence of the move p p If the project is being renamed the destination project must not already exist in the workspace resource tree p p Local history is not preserved if the project is renamed It is preserved when the project s content area is relocated without renaming the project p param source the handle of the source project that was moved param description the new project description return code true code if the move succeeded and code false code otherwise  updateMovedFileTimestamp
Deletes the given file in the standard manner from both the local file system and from the workspace resource tree p Implementations of code I Move Delete Hook code must invoke this method in lieu of code file delete update Flags monitor code because all regular API operations that modify resources are off limits p p If the operation fails the reason for the failure is automatically collected by an internal call to code failed code p param file the file to delete param update Flags bit wise or of update flag constants as per code I Resource delete int I Progress Monitor code param monitor the progress monitor or code null code as per code I Resource delete int I Progress Monitor code  IMoveDeleteHook updateFlags updateFlags IResource IProgressMonitor IResource IProgressMonitor
Deletes the given folder and its descendents in the standard manner from both the local file system and from the workspace resource tree p Implementations of code I Move Delete Hook code must invoke this method in lieu of code folder delete update Flags monitor code because all regular API operations that modify resources are off limits p p If the operation fails the reason for the failure is automatically collected by an internal call to code failed code p param folder the folder to delete param update Flags bit wise or of update flag constants as per code I Resource delete int I Progress Monitor code param monitor the progress monitor or code null code as per code I Resource delete int I Progress Monitor code  IMoveDeleteHook updateFlags updateFlags IResource IProgressMonitor IResource IProgressMonitor
Deletes the given project and its descendents in the standard manner from both the local file system and from the workspace resource tree p Implementations of code I Move Delete Hook code must invoke this method in lieu of code project delete update Flags monitor code because all regular API operations that modify resources are off limits p p If the operation fails the reason for the failure is automatically collected by an internal call to code failed code p param project the project to delete param update Flags bit wise or of update flag constants as per code I Resource delete int I Progress Monitor code param monitor the progress monitor or code null code as per code I Resource delete int I Progress Monitor code  IMoveDeleteHook updateFlags updateFlags IResource IProgressMonitor IResource IProgressMonitor
Moves the given file in the standard manner from both the local file system and from the workspace resource tree p Implementations of code I Move Delete Hook code must invoke this method in lieu of code source move destination get Project Relative Path update Flags monitor code because all regular API operations that modify resources are off limits p p If the operation fails the reason for the failure is automatically collected by an internal call to code failed code p param source the handle of the source file to move param destination the handle of where the file will move to param update Flags bit wise or of update flag constants as per code I Resource move I Path int I Progress Monitor code param monitor the progress monitor or code null code as per code I Resource move I Path int I Progress Monitor code  IMoveDeleteHook getProjectRelativePath updateFlags updateFlags IResource IPath IProgressMonitor IResource IPath IProgressMonitor
Moves the given folder and its descendents in the standard manner from both the local file system and from the workspace resource tree p Implementations of code I Move Delete Hook code must invoke this method in lieu of code source move destination get Project Relative Path update Flags monitor code because all regular API operations that modify resources are off limits p p If the operation fails the reason for the failure is automatically collected by an internal call to code failed code p param source the handle of the source folder to move param destination the handle of where the folder will move to param update Flags bit wise or of update flag constants as per code I Resource move I Path int I Progress Monitor code param monitor the progress monitor or code null code as per code I Resource move I Path int I Progress Monitor code  IMoveDeleteHook getProjectRelativePath updateFlags updateFlags IResource IPath IProgressMonitor IResource IPath IProgressMonitor
Renames and or relocates the given project in the standard manner p Implementations of code I Move Delete Hook code must invoke this method in lieu of code source move description update Flags monitor code because all regular API operations that modify resources are off limits p p If the operation fails the reason for the failure is automatically collected by an internal call to code failed code p param source the handle of the source folder to move param description the new project description param update Flags bit wise or of update flag constants as per code I Resource move I Path int I Progress Monitor code param monitor the progress monitor or code null code as per code I Resource move I Path int I Progress Monitor code  IMoveDeleteHook updateFlags updateFlags IResource IPath IProgressMonitor IResource IPath IProgressMonitor

Creates a new default resource rule factory This constructor must only be called by subclasses protected Resource Rule Factory super  ResourceRuleFactory
Default implementation of code I Resource Rule Factory build Rule code This default implementation always returns the workspace root p Subclasses may not currently override this method see org eclipse core resources I Resource Rule Factory build Rule public final I Scheduling Rule build Rule return workspace get Root  IResourceRuleFactory buildRule IResourceRuleFactory buildRule ISchedulingRule buildRule getRoot
Default implementation of code I Resource Rule Factory copy Rule code This default implementation always returns the parent of the destination resource p Subclasses may override this method The rule provided by an overriding method must at least contain the rule from this default implementation see org eclipse core runtime jobs I Scheduling Rule contains org eclipse core runtime jobs I Scheduling Rule see org eclipse core resources I Resource Rule Factory copy Rule I Resource I Resource public I Scheduling Rule copy Rule I Resource source I Resource destination source is not modified destination is created return parent destination  IResourceRuleFactory copyRule ISchedulingRule ISchedulingRule IResourceRuleFactory copyRule IResource IResource ISchedulingRule copyRule IResource IResource
Default implementation of code I Resource Rule Factory create Rule code This default implementation always returns the parent of the resource being created p Subclasses may override this method The rule provided by an overriding method must at least contain the rule from this default implementation see org eclipse core runtime jobs I Scheduling Rule contains org eclipse core runtime jobs I Scheduling Rule see org eclipse core resources I Resource Rule Factory create Rule I Resource public I Scheduling Rule create Rule I Resource resource return parent resource  IResourceRuleFactory createRule ISchedulingRule ISchedulingRule IResourceRuleFactory createRule IResource ISchedulingRule createRule IResource
Default implementation of code I Resource Rule Factory delete Rule code This default implementation always returns the parent of the resource being deleted p Subclasses may override this method The rule provided by an overriding method must at least contain the rule from this default implementation see org eclipse core runtime jobs I Scheduling Rule contains org eclipse core runtime jobs I Scheduling Rule see org eclipse core resources I Resource Rule Factory delete Rule I Resource public I Scheduling Rule delete Rule I Resource resource return parent resource  IResourceRuleFactory deleteRule ISchedulingRule ISchedulingRule IResourceRuleFactory deleteRule IResource ISchedulingRule deleteRule IResource
Default implementation of code I Resource Rule Factory marker Rule code This default implementation always returns code null code p Subclasses may not currently override this method see org eclipse core resources I Resource Rule Factory marker Rule I Resource public final I Scheduling Rule marker Rule I Resource resource return null  IResourceRuleFactory markerRule IResourceRuleFactory markerRule IResource ISchedulingRule markerRule IResource
Default implementation of code I Resource Rule Factory modify Rule code This default implementation returns the resource being modified or the parent resource if modifying a project description file Note that this must encompass any rule required by the code validate Save code hook p Subclasses may override this method The rule provided by an overriding method must at least contain the rule from this default implementation see org eclipse core runtime jobs I Scheduling Rule contains org eclipse core runtime jobs I Scheduling Rule see org eclipse core resources I Resource Rule Factory modify Rule I Resource see I File Modification Validator validate Save I File see I Project Description DESCRIPTION FILE NAME public I Scheduling Rule modify Rule I Resource resource I Path path resource get Full Path modifying the project description may cause linked resources to be created or deleted if path segment Count 2 path segment 1 equals I Project Description DESCRIPTION FILE NAME return parent resource return resource  IResourceRuleFactory modifyRule validateSave ISchedulingRule ISchedulingRule IResourceRuleFactory modifyRule IResource IFileModificationValidator validateSave IFile IProjectDescription DESCRIPTION_FILE_NAME ISchedulingRule modifyRule IResource IPath getFullPath segmentCount IProjectDescription DESCRIPTION_FILE_NAME
Default implementation of code I Resource Rule Factory move Rule code This default implementation returns a rule that combines the parent of the source resource and the parent of the destination resource p Subclasses may override this method The rule provided by an overriding method must at least contain the rule from this default implementation see org eclipse core runtime jobs I Scheduling Rule contains org eclipse core runtime jobs I Scheduling Rule see org eclipse core resources I Resource Rule Factory move Rule I Resource I Resource public I Scheduling Rule move Rule I Resource source I Resource destination move needs the parent of both source and destination return Multi Rule combine parent source parent destination  IResourceRuleFactory moveRule ISchedulingRule ISchedulingRule IResourceRuleFactory moveRule IResource IResource ISchedulingRule moveRule IResource IResource MultiRule
Convenience method to return the parent of the given resource or the resource itself for projects and the workspace root param resource the resource to compute the parent of return the parent resource for folders and files and the resource itself for projects and the workspace root protected final I Scheduling Rule parent I Resource resource switch resource get Type case I Resource ROOT case I Resource PROJECT return resource default return resource get Parent  ISchedulingRule IResource getType IResource IResource getParent
Default implementation of code I Resource Rule Factory refresh Rule code This default implementation always returns the parent of the resource being refreshed p Subclasses may override this method The rule provided by an overriding method must at least contain the rule from this default implementation see org eclipse core runtime jobs I Scheduling Rule contains org eclipse core runtime jobs I Scheduling Rule see org eclipse core resources I Resource Rule Factory refresh Rule I Resource public I Scheduling Rule refresh Rule I Resource resource return parent resource  IResourceRuleFactory refreshRule ISchedulingRule ISchedulingRule IResourceRuleFactory refreshRule IResource ISchedulingRule refreshRule IResource
Default implementation of code I Resource Rule Factory validate Edit Rule code This default implementation returns a rule that combines the parents of all read only resources or code null code if there are no read only resources p Subclasses may override this method The rule provided by an overriding method must at least contain the rule from this default implementation see org eclipse core runtime jobs I Scheduling Rule contains org eclipse core runtime jobs I Scheduling Rule see org eclipse core resources I Resource Rule Factory validate Edit Rule I Resource public I Scheduling Rule validate Edit Rule I Resource resources if resources length 0 return null optimize rule for single file if resources length 1 return resources 0 is Read Only parent resources 0 null need a lock on the parents of all read only files Hash Set rules new Hash Set for int i 0 i resources length i if resources i is Read Only rules add parent resources i if rules is Empty return null if rules size 1 return I Scheduling Rule rules iterator next I Scheduling Rule rule Array I Scheduling Rule rules to Array new I Scheduling Rule rules size return new Multi Rule rule Array  IResourceRuleFactory validateEditRule ISchedulingRule ISchedulingRule IResourceRuleFactory validateEditRule IResource ISchedulingRule validateEditRule IResource isReadOnly HashSet HashSet isReadOnly isEmpty ISchedulingRule ISchedulingRule ruleArray ISchedulingRule toArray ISchedulingRule MultiRule ruleArray

Creates a new team hook Default constructor for use by subclasses and the resources plug in only protected Team Hook super  TeamHook
Returns the resource scheduling rule factory that should be used when workspace operations are invoked on resources in that project The workspace will ask the team hook this question only once per project per session The workspace will assume the returned result is valid for the rest of that session unless the rule is changed by calling code set Rule Factory code p This method must not return code null code If no special rules are required by the team hook for the given project the value of the code default Factory code field should be returned p This default implementation always returns the value of the code default Factory code field Subclasses may override param project the project to return scheduling rules for return the resource scheduling rules for a project see set Rule Factory I Project I Resource Rule Factory see I Resource Rule Factory since 3 0 public I Resource Rule Factory get Rule Factory I Project project return default Factory  setRuleFactory defaultFactory defaultFactory setRuleFactory IProject IResourceRuleFactory IResourceRuleFactory IResourceRuleFactory getRuleFactory IProject defaultFactory
Sets the resource scheduling rule factory to use for resource modifications in the given project This method only needs to be called if the factory has changed since the initial call to code get Rule Factory code for the given project p The supplied factory must not be code null code If no special rules are required by the team hook for the given project the value of the code default Factory code field should be used p Note that the new rule factory will only take effect for resource changing operations that begin after this method completes Care should be taken to avoid calling this method during the invocation of any resource changing operation in any thread The best time to change rule factories is during resource change notification when the workspace is locked for modification param project the project to change the resource rule factory for param factory the new resource rule factory see get Rule Factory I Project see I Resource Rule Factory since 3 0 protected final void set Rule Factory I Project project I Resource Rule Factory factory super set Rule Factory project factory  getRuleFactory defaultFactory getRuleFactory IProject IResourceRuleFactory setRuleFactory IProject IResourceRuleFactory setRuleFactory
Validates whether a particular attempt at link creation is allowed This gives team providers an opportunity to hook into the beginning of the implementation of code I File create Link code p The implementation of this method runs below the resources API and is therefore very restricted in what resource API method it can call The list of useable methods includes most resource operations that read but do not update the resource tree resource operations that modify resources and trigger deltas must not be called from within the dynamic scope of the invocation of this method p p This method should be overridden by subclasses that want to control what links are created The default implementation of this method allows all links to be created p param file the file to be linked param update Flags bit wise or of update flag constants only ALLOW MISSING LOCAL is relevant here param location a file system path where the file should be linked return a status object with code code I Status OK code if linking is allowed otherwise a status object with severity code I Status ERROR code indicating why the creation is not allowed see org eclipse core resources I Resource ALLOW MISSING LOCAL public I Status validate Create Link I File file int update Flags I Path location return Status OK STATUS  IFile createLink updateFlags ALLOW_MISSING_LOCAL IStatus IStatus IResource ALLOW_MISSING_LOCAL IStatus validateCreateLink IFile updateFlags IPath OK_STATUS
Validates whether a particular attempt at link creation is allowed This gives team providers an opportunity to hook into the beginning of the implementation of code I Folder create Link code p The implementation of this method runs below the resources API and is therefore very restricted in what resource API method it can call The list of useable methods includes most resource operations that read but do not update the resource tree resource operations that modify resources and trigger deltas must not be called from within the dynamic scope of the invocation of this method p p This method should be overridden by subclasses that want to control what links are created The default implementation of this method allows all links to be created p param folder the file to be linked param update Flags bit wise or of update flag constants only ALLOW MISSING LOCAL is relevant here param location a file system path where the folder should be linked return a status object with code code I Status OK code if linking is allowed otherwise a status object with severity code I Status ERROR code indicating why the creation is not allowed see org eclipse core resources I Resource ALLOW MISSING LOCAL public I Status validate Create Link I Folder folder int update Flags I Path location return Status OK STATUS  IFolder createLink updateFlags ALLOW_MISSING_LOCAL IStatus IStatus IResource ALLOW_MISSING_LOCAL IStatus validateCreateLink IFolder updateFlags IPath OK_STATUS

public abstract class Workspace Job extends Internal Workspace Job Creates a new workspace job param name the name of the job public Workspace Job String name super name  WorkspaceJob InternalWorkspaceJob WorkspaceJob
Runs the operation reporting progress to and accepting cancelation requests from the given progress monitor p Implementors of this method should check the progress monitor for cancelation when it is safe and appropriate to do so The cancelation request should be propagated to the caller by throwing code Operation Canceled Exception code p param monitor a progress monitor or code null code if progress reporting and cancelation are not desired return the result of running the operation exception Core Exception if this operation fails  OperationCanceledException CoreException

Returns a new workspace lock public Workspace Lock I Workspace workspace throws Core Exception  WorkspaceLock IWorkspace CoreException
Attempts to acquire this lock Callers will block indefinitely until this lock comes available to them p Clients may extend this method but should not otherwise call it p see release public boolean acquire throws Interrupted Exception deprecated API return false  InterruptedException
Returns the thread that currently owns the workspace lock protected Thread get Current Operation Thread deprecated API return null  getCurrentOperationThread
Releases this lock allowing others to acquire it p Clients may extend this method but should not otherwise call it p see acquire public void release deprecated API 
Returns whether the workspace tree is locked for resource changes return code true code if the tree is locked otherwise code false code protected boolean is Tree Locked deprecated API return true  isTreeLocked

public class Basic Location implements Location private static class Mock Locker implements Locker public boolean lock throws IO Exception locking always successful return true  BasicLocation MockLocker IOException
return true public void release nothing to release 
private static boolean is Running With Nio try Class for Name java nio channels File Lock NON NLS 1 catch Class Not Found Exception e return false return true  isRunningWithNio forName FileLock ClassNotFoundException
public static Locker create Locker File lock String lock Mode if lock Mode null lock Mode System get Properties get Property PROP OSGI LOCKING if none equals lock Mode NON NLS 1 return new Mock Locker if java io equals lock Mode NON NLS 1 return new Locker JavaIo lock if java nio equals lock Mode NON NLS 1 if is Running With Nio return new Locker JavaNio lock else TODO should we return null here NIO was requested but we could not do it return new Locker JavaIo lock Backup case if an invalid value has been specified if is Running With Nio return new Locker JavaNio lock else return new Locker JavaIo lock  createLocker lockMode lockMode lockMode getProperties getProperty PROP_OSGI_LOCKING lockMode MockLocker lockMode Locker_JavaIo lockMode isRunningWithNio Locker_JavaNio Locker_JavaIo isRunningWithNio Locker_JavaNio Locker_JavaIo
public Basic Location String property URL default Value boolean is Read Only super this property property this default Value default Value this is Read Only is Read Only  BasicLocation defaultValue isReadOnly defaultValue defaultValue isReadOnly isReadOnly
public boolean allows Default return default Value null  allowsDefault defaultValue
public URL get Default return default Value  getDefault defaultValue
public Location get Parent Location return parent  getParentLocation
public synchronized URL getURL if location null default Value null setURL default Value false return location  defaultValue defaultValue
public synchronized boolean is Set return location null  isSet
public boolean is Read Only return is Read Only  isReadOnly isReadOnly
public synchronized boolean setURL URL value boolean lock throws Illegal State Exception if location null throw new Illegal State Exception Eclipse Adaptor Msg formatter get String ECLIPSE CANNOT CHANGE LOCATION NON NLS 1 File file null if value get Protocol equals Ignore Case file NON NLS 1 file new File value get File LOCK FILENAME lock lock is Read Only if lock try if lock file return false catch IO Exception e return false lock File file location Location Manager buildURL value to External Form true if property null System get Properties put property location to External Form return lock  IllegalStateException IllegalStateException EclipseAdaptorMsg getString ECLIPSE_CANNOT_CHANGE_LOCATION getProtocol equalsIgnoreCase getFile LOCK_FILENAME isReadOnly IOException lockFile LocationManager toExternalForm getProperties toExternalForm
public synchronized void set Parent Location value parent value  setParent
public synchronized boolean lock throws IO Exception if is Set return false return lock lock File  IOException isSet lockFile
private boolean lock File lock throws IO Exception if lock null is Read Only return false File parent File new File lock get Parent if parent File exists if parent File mkdirs return false set Locker lock if locker null return true boolean locked false try locked locker lock return locked finally if locked locker null  IOException isReadOnly parentFile getParent parentFile parentFile setLocker
private void set Locker File lock if locker null return String lock Mode System get Properties get Property PROP OSGI LOCKING locker create Locker lock lock Mode  setLocker lockMode getProperties getProperty PROP_OSGI_LOCKING createLocker lockMode
public synchronized void release if locker null locker release 

The get Localization method gets a Resource Bundle object for the given locale and bundle return A code Resource Bundle code object for the given bundle and locale If null is passed for the locale parameter the default locale is used public Resource Bundle get Localization Bundle bundle String locale return org eclipse osgi framework internal core Abstract Bundle bundle get Resource Bundle locale  getLocalization ResourceBundle ResourceBundle ResourceBundle getLocalization AbstractBundle getResourceBundle

private void log Cycles Object cycles log cycles if cycles length 0 String Buffer cycle Text new String Buffer NON NLS 1 for int i 0 i cycles length i cycle Text append for int j 0 j cycles i length j cycle Text append Bundle Description cycles i j get Symbolic Name cycle Text append cycle Text insert cycle Text length 1 cycle Text set Char At cycle Text length 1 String message Eclipse Adaptor Msg formatter get String ECLIPSE BUNDLESTOPPER CYCLES FOUND cycle Text NON NLS 1 Framework Log Entry entry new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME message 0 null null Eclipse Adaptor get Default get Framework Log log entry  logCycles StringBuffer cycleText StringBuffer cycleText cycleText BundleDescription getSymbolicName cycleText cycleText cycleText cycleText setCharAt cycleText EclipseAdaptorMsg getString ECLIPSE_BUNDLESTOPPER_CYCLES_FOUND cycleText FrameworkLogEntry FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME EclipseAdaptor getDefault getFrameworkLog
public void stop Bundles all To Stop Eclipse Adaptor get Default get State get Resolved Bundles State Helper state Helper Eclipse Adaptor get Default get Platform Admin get State Helper Object cycles state Helper sort Bundles all To Stop log Cycles cycles stopped Bundles new Hashtable all To Stop length basic Stop Bundles  stopBundles allToStop EclipseAdaptor getDefault getState getResolvedBundles StateHelper stateHelper EclipseAdaptor getDefault getPlatformAdmin getStateHelper stateHelper sortBundles allToStop logCycles stoppedBundles allToStop basicStopBundles
private void basic Stop Bundles Bundle Context context Eclipse Adaptor get Default get Context stop all active bundles in the reverse order of Require Bundle for int stopping Index all To Stop length 1 stopping Index 0 stopping Index Abstract Bundle to Stop Abstract Bundle context get Bundle all To Stop stopping Index get Bundle Id try if to Stop get State Bundle ACTIVE to Stop instanceof Bundle Host to Stop get Bundle Id 0 continue if Eclipse Bundle Data to Stop get Bundle Data is Auto Startable continue to Stop stop catch Exception e String message Eclipse Adaptor Msg formatter get String ECLIPSE BUNDLESTOPPER ERROR STOPPING BUNDLE all To Stop stopping Index to String NON NLS 1 Framework Log Entry entry new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME message 0 e null Eclipse Adaptor get Default get Framework Log log entry finally stopped Bundles put to Stop to Stop  basicStopBundles BundleContext EclipseAdaptor getDefault getContext stoppingIndex allToStop stoppingIndex stoppingIndex AbstractBundle toStop AbstractBundle getBundle allToStop stoppingIndex getBundleId toStop getState toStop BundleHost toStop getBundleId EclipseBundleData toStop getBundleData isAutoStartable toStop EclipseAdaptorMsg getString ECLIPSE_BUNDLESTOPPER_ERROR_STOPPING_BUNDLE allToStop stoppingIndex toString FrameworkLogEntry FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME EclipseAdaptor getDefault getFrameworkLog stoppedBundles toStop toStop
public boolean is Stopped Bundle bundle if stopped Bundles null return false return stopped Bundles get bundle null  isStopped stoppedBundles stoppedBundles

Eclipse Bundle Data bundledata public Cached Manifest Eclipse Bundle Data bundledata this bundledata bundledata  EclipseBundleData CachedManifest EclipseBundleData
private Dictionary get Manifest if manifest null try manifest bundledata load Manifest catch Bundle Exception e final String message Eclipse Adaptor Msg formatter get String ECLIPSE CACHEDMANIFEST UNEXPECTED EXCEPTION bundledata get Location NON NLS 1 Framework Log Entry entry new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME message 0 e null Eclipse Adaptor get Default get Framework Log log entry return null return manifest  getManifest loadManifest BundleException EclipseAdaptorMsg getString ECLIPSE_CACHEDMANIFEST_UNEXPECTED_EXCEPTION getLocation FrameworkLogEntry FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME EclipseAdaptor getDefault getFrameworkLog
public int size TODO get Manifest may return null return get Manifest size  getManifest getManifest
public boolean is Empty return size 0  isEmpty
public Enumeration elements TODO get Manifest may return null return get Manifest elements  getManifest getManifest
public Enumeration keys TODO get Manifest may return null return get Manifest keys  getManifest getManifest
public Object get Object key String key String String key if Constants BUNDLE VERSION equals Ignore Case key String Version result bundledata get Version return result null null result to String if Eclipse Adaptor PLUGIN CLASS equals Ignore Case key String return bundledata get Plugin Class if Constants BUNDLE SYMBOLICNAME equals Ignore Case key String return bundledata get Symbolic Name Dictionary result get Manifest return result null null result get key  keyString BUNDLE_VERSION equalsIgnoreCase keyString getVersion toString EclipseAdaptor PLUGIN_CLASS equalsIgnoreCase keyString getPluginClass BUNDLE_SYMBOLICNAME equalsIgnoreCase keyString getSymbolicName getManifest
public Object remove Object key TODO get Manifest may return null return get Manifest remove key  getManifest getManifest
public Object put Object key Object value TODO get Manifest may return null return get Manifest put key value  getManifest getManifest

public Eclipse Adaptor String args super args instance this set Debug Options  EclipseAdaptor setDebugOptions
public static Eclipse Adaptor get Default return instance  EclipseAdaptor getDefault
public void initialize Event Publisher event Publisher if Boolean get Boolean Eclipse Adaptor PROP CLEAN cleanOS Gi Cache super initialize event Publisher  EventPublisher eventPublisher getBoolean EclipseAdaptor PROP_CLEAN cleanOSGiCache eventPublisher
public void initialize Metadata do nothing here metadata is already initialized by read Headers  initializeMetadata readHeaders
protected void init Bundle Store Root Dir File configuration Location Location Manager getOS Gi Configuration Dir if configuration Location null bundle Store Root Dir new File configuration Location Location Manager BUNDLES DIR bundle Store bundle Store Root Dir get Absolute Path else last resort just default to bundles bundle Store Location Manager BUNDLES DIR bundle Store Root Dir new File bundle Store store bundle Store back into adaptor properties for others to see properties put BUNDLE STORE bundle Store Root Dir get Absolute Path  initBundleStoreRootDir configurationLocation LocationManager getOSGiConfigurationDir configurationLocation bundleStoreRootDir configurationLocation LocationManager BUNDLES_DIR bundleStore bundleStoreRootDir getAbsolutePath bundleStore LocationManager BUNDLES_DIR bundleStoreRootDir bundleStore bundleStore BUNDLE_STORE bundleStoreRootDir getAbsolutePath
protected Framework Log create Framework Log if framework Log null return framework Log return Eclipse Starter create Framework Log  FrameworkLog createFrameworkLog frameworkLog frameworkLog EclipseStarter createFrameworkLog
protected State Manager create State Manager read Headers check Location And Reinitialize File state Location Location Manager get Configuration File Location Manager STATE FILE if state Location is File NOTE this check is redundant since it is done in State Manager however it is more convenient to have it here Location parent Configuration null if parent Configuration Location Manager get Configuration Location get Parent Location null state Location new File parent Configuration getURL get File Framework Adaptor FRAMEWORK SYMBOLICNAME Location Manager STATE FILE state Manager new State Manager state Location time Stamp state Manager set Installer new Eclipse Bundle Installer State Impl system State state Manager get System State if system State null return state Manager system State state Manager create System State Bundle Data installed Bundles get Installed Bundles if installed Bundles null return state Manager State Object Factory factory state Manager get Factory for int i 0 i installed Bundles length i Bundle Data to Add Bundle Data installed Bundles i try Dictionary manifest to Add get Manifest Bundle Description new Description factory create Bundle Description manifest to Add get Location to Add get BundleID system State add Bundle new Description catch Bundle Exception be just ignore bundle datas with invalid manifests we need the state resolved system State set Time Stamp time Stamp system State resolve return state Manager  StateManager createStateManager readHeaders checkLocationAndReinitialize stateLocation LocationManager getConfigurationFile LocationManager STATE_FILE stateLocation isFile StateManager parentConfiguration parentConfiguration LocationManager getConfigurationLocation getParentLocation stateLocation parentConfiguration getFile FrameworkAdaptor FRAMEWORK_SYMBOLICNAME LocationManager STATE_FILE stateManager StateManager stateLocation timeStamp stateManager setInstaller EclipseBundleInstaller StateImpl systemState stateManager getSystemState systemState stateManager systemState stateManager createSystemState BundleData installedBundles getInstalledBundles installedBundles stateManager StateObjectFactory stateManager getFactory installedBundles BundleData toAdd BundleData installedBundles toAdd getManifest BundleDescription newDescription createBundleDescription toAdd getLocation toAdd getBundleID systemState addBundle newDescription BundleException systemState setTimeStamp timeStamp systemState stateManager
public void shutdown State Manager try File state Location Location Manager get Configuration File Location Manager STATE FILE state Manager shutdown state Location NON NLS 1 catch IO Exception e framework Log log new Framework Event Framework Event ERROR context get Bundle e  shutdownStateManager stateLocation LocationManager getConfigurationFile LocationManager STATE_FILE stateManager stateLocation IOException frameworkLog FrameworkEvent FrameworkEvent getBundle
private void cleanOS Gi Cache File osgi Config Location Manager getOS Gi Configuration Dir if rm osgi Config TODO log error  cleanOSGiCache osgiConfig LocationManager getOSGiConfigurationDir osgiConfig
private void check Location And Reinitialize if installURL null installURL Eclipse Starter get Sys Path TODO This reference to the starter should be avoided return if Eclipse Starter get Sys Path equals installURL delete the metadata file and the framework file when the location of the basic bundles has changed Location Manager get Configuration File Location Manager BUNDLE DATA FILE delete Location Manager get Configuration File Location Manager STATE FILE delete installURL Eclipse Starter get Sys Path  checkLocationAndReinitialize EclipseStarter getSysPath EclipseStarter getSysPath LocationManager getConfigurationFile LocationManager BUNDLE_DATA_FILE LocationManager getConfigurationFile LocationManager STATE_FILE EclipseStarter getSysPath
private void read Headers Input Stream bundle Data Stream find Bundle Data File if bundle Data Stream null return try Data Input Stream in new Data Input Stream new Buffered Input Stream bundle Data Stream try if in read Byte BUNDLEDATA VERSION time Stamp in read Long installURL in readUTF initial Bundle Start Level in read Int next Id in read Long finally in close catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Error reading framework metadata e get Message NON NLS 1 Debug print Stack Trace e  readHeaders InputStream bundleDataStream findBundleDataFile bundleDataStream DataInputStream DataInputStream BufferedInputStream bundleDataStream readByte BUNDLEDATA_VERSION timeStamp readLong initialBundleStartLevel readInt nextId readLong IOException DEBUG_GENERAL getMessage printStackTrace
public Adaptor Element Factory get Element Factory if element Factory null element Factory new Eclipse Element Factory return element Factory  AdaptorElementFactory getElementFactory elementFactory elementFactory EclipseElementFactory elementFactory
public void framework Start Bundle Context context throws Bundle Exception super framework Start context Bundle bundle context get Bundle Location location Less than optimal reference to Eclipse Starter here Not sure how we can make the location objects available They are needed very early in Eclipse Starter but these references tie the adaptor to that starter location Location Manager get User Location Hashtable properties new Hashtable 1 if location null properties put type Location Manager PROP USER AREA NON NLS 1 context register Service Location class get Name location properties location Location Manager get Instance Location if location null properties put type Location Manager PROP INSTANCE AREA NON NLS 1 context register Service Location class get Name location properties location Location Manager get Configuration Location if location null properties put type Location Manager PROP CONFIG AREA NON NLS 1 context register Service Location class get Name location properties location Location Manager get Install Location if location null properties put type Location Manager PROP INSTALL AREA NON NLS 1 context register Service Location class get Name location properties register org eclipse osgi service environment Environment Info class get Name Environment Info get Default bundle register Platform Admin class get Name state Manager bundle register Plugin Converter class get Name new Plugin Converter Impl context bundle register URL Converter class get Name new URL Converter Impl bundle register Command Provider class get Name new Eclipse Command Provider context bundle register Framework Log class get Name get Framework Log bundle register org eclipse osgi service localization Bundle Localization class get Name new Bundle Localization Impl bundle register EndorsedXML Parser  frameworkStart BundleContext BundleException frameworkStart getBundle EclipseStarter EclipseStarter LocationManager getUserLocation LocationManager PROP_USER_AREA registerService getName LocationManager getInstanceLocation LocationManager PROP_INSTANCE_AREA registerService getName LocationManager getConfigurationLocation LocationManager PROP_CONFIG_AREA registerService getName LocationManager getInstallLocation LocationManager PROP_INSTALL_AREA registerService getName EnvironmentInfo getName EnvironmentInfo getDefault PlatformAdmin getName stateManager PluginConverter getName PluginConverterImpl URLConverter getName URLConverterImpl CommandProvider getName EclipseCommandProvider FrameworkLog getName getFrameworkLog BundleLocalization getName BundleLocalizationImpl registerEndorsedXMLParser
private void set Debug Options Debug Options options Debug Options get Default may be null if debugging is not enabled if options null return State Manager DEBUG options null State Manager DEBUG READER options get Boolean Option OPTION RESOLVER READER false State Manager MONITOR PLATFORM ADMIN options get Boolean Option OPTION MONITOR PLATFORM ADMIN false State Manager DEBUG PLATFORM ADMIN options get Boolean Option OPTION PLATFORM ADMIN false State Manager DEBUG PLATFORM ADMIN RESOLVER options get Boolean Option OPTION PLATFORM ADMIN RESOLVER false Plugin Converter Impl DEBUG options get Boolean Option OPTION CONVERTER false Basic Location DEBUG options get Boolean Option OPTION LOCATION false  setDebugOptions DebugOptions DebugOptions getDefault StateManager StateManager DEBUG_READER getBooleanOption OPTION_RESOLVER_READER StateManager MONITOR_PLATFORM_ADMIN getBooleanOption OPTION_MONITOR_PLATFORM_ADMIN StateManager DEBUG_PLATFORM_ADMIN getBooleanOption OPTION_PLATFORM_ADMIN StateManager DEBUG_PLATFORM_ADMIN_RESOLVER getBooleanOption OPTION_PLATFORM_ADMIN_RESOLVER PluginConverterImpl getBooleanOption OPTION_CONVERTER BasicLocation getBooleanOption OPTION_LOCATION
private void register EndorsedXML Parser try Class for Name SAXFACTORYNAME context register Service SAXFACTORYNAME new Sax Parsing Service new Hashtable Class for Name DOMFACTORYNAME context register Service DOMFACTORYNAME new Dom Parsing Service new Hashtable catch Class Not Found Exception e In case the JAXP API is not on the boot classpath String message Eclipse Adaptor Msg formatter get String ECLIPSE ADAPTOR ERROR XML SERVICE NON NLS 1 get Framework Log log new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME message 0 e null  registerEndorsedXMLParser forName registerService SaxParsingService forName registerService DomParsingService ClassNotFoundException EclipseAdaptorMsg getString ECLIPSE_ADAPTOR_ERROR_XML_SERVICE getFrameworkLog FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME
private class Sax Parsing Service implements Service Factory public Object get Service Bundle bundle Service Registration registration return SAX Parser Factory new Instance  SaxParsingService ServiceFactory getService ServiceRegistration SAXParserFactory newInstance
public void unget Service Bundle bundle Service Registration registration Object service Do nothing  ungetService ServiceRegistration
private class Dom Parsing Service implements Service Factory public Object get Service Bundle bundle Service Registration registration return Document Builder Factory new Instance  DomParsingService ServiceFactory getService ServiceRegistration DocumentBuilderFactory newInstance
public void unget Service Bundle bundle Service Registration registration Object service Do nothing  ungetService ServiceRegistration
public void framework Stop Bundle Context context throws Bundle Exception save Meta Data super framework Stop context print Stats Plugin Parser releaseXML Parsing  frameworkStop BundleContext BundleException saveMetaData frameworkStop printStats PluginParser releaseXMLParsing
private void print Stats Debug Options debug Options Debug Options get Default if debug Options null return String registry Parsing debug Options get Option org eclipse core runtime registry parsing timing value NON NLS 1 if registry Parsing null Eclipse Adaptor Msg debug Time spent in registry parsing registry Parsing NON NLS 1 String package Admin Resolution debug Options get Option debug packageadmin timing value NON NLS 1 if package Admin Resolution null System out println Time spent in package admin resolve package Admin Resolution NON NLS 1 String constraint Resolution debug Options get Option org eclipse core runtime adaptor resolver timing value NON NLS 1 if constraint Resolution null System out println Time spent resolving the dependency system constraint Resolution NON NLS 1  printStats DebugOptions debugOptions DebugOptions getDefault debugOptions registryParsing debugOptions getOption registryParsing EclipseAdaptorMsg registryParsing packageAdminResolution debugOptions getOption packageAdminResolution packageAdminResolution constraintResolution debugOptions getOption constraintResolution constraintResolution
private Input Stream find Bundle Data File File metadata Location Manager get Configuration File Location Manager BUNDLE DATA FILE Input Stream bundle Data Stream null if metadata is File try bundle Data Stream new File Input Stream metadata catch File Not Found Exception e1 this can not happen since it is tested before entering here else Location parent Configuration null if parent Configuration Location Manager get Configuration Location get Parent Location null try bundle Data Stream new URL parent Configuration getURL Framework Adaptor FRAMEWORK SYMBOLICNAME Location Manager BUNDLE DATA FILE open Stream catch MalformedURL Exception e1 This will not happen since all the UR Ls are derived by us and we are GODS catch IO Exception e1 That s ok we will regenerate the bundle Data return bundle Data Stream  InputStream findBundleDataFile LocationManager getConfigurationFile LocationManager BUNDLE_DATA_FILE InputStream bundleDataStream isFile bundleDataStream FileInputStream FileNotFoundException parentConfiguration parentConfiguration LocationManager getConfigurationLocation getParentLocation bundleDataStream parentConfiguration FrameworkAdaptor FRAMEWORK_SYMBOLICNAME LocationManager BUNDLE_DATA_FILE openStream MalformedURLException URLs IOException bundleData bundleDataStream
see org eclipse osgi framework adaptor Framework Adaptor get Installed Bundles public Bundle Data get Installed Bundles Input Stream bundle Data Stream find Bundle Data File if bundle Data Stream null return null try Data Input Stream in new Data Input Stream new Buffered Input Stream bundle Data Stream try if in read Byte BUNDLEDATA VERSION return null skip time Stamp was read by read Time Stamp in read Long in readUTF in read Int in read Long int bundle Count in read Int Array List result new Array List bundle Count long id 1 State state state Manager get System State long state Time Stamp state get Time Stamp for int i 0 i bundle Count i try try id in read Long if id 0 Eclipse Bundle Data data Eclipse Bundle Data get Element Factory create Bundle Data this id load Meta Data For data in data initialize Existing Bundle if Debug DEBUG Debug DEBUG GENERAL Debug println Bundle Data created data NON NLS 1 result add data catch Number Format Exception e should never happen catch IO Exception e state remove Bundle id if Debug DEBUG Debug DEBUG GENERAL Debug println Error reading framework metadata e get Message NON NLS 1 Debug print Stack Trace e if state Time Stamp state get Time Stamp state resolve false time stamp changed force a full resolve return Bundle Data result to Array new Bundle Data result size finally in close catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Error reading framework metadata e get Message NON NLS 1 Debug print Stack Trace e return null  FrameworkAdaptor getInstalledBundles BundleData getInstalledBundles InputStream bundleDataStream findBundleDataFile bundleDataStream DataInputStream DataInputStream BufferedInputStream bundleDataStream readByte BUNDLEDATA_VERSION timeStamp readTimeStamp readLong readInt readLong bundleCount readInt ArrayList ArrayList bundleCount stateManager getSystemState stateTimeStamp getTimeStamp bundleCount readLong EclipseBundleData EclipseBundleData getElementFactory createBundleData loadMetaDataFor initializeExistingBundle DEBUG_GENERAL BundleData NumberFormatException IOException removeBundle DEBUG_GENERAL getMessage printStackTrace stateTimeStamp getTimeStamp BundleData toArray BundleData IOException DEBUG_GENERAL getMessage printStackTrace
protected void load Meta Data For Eclipse Bundle Data data Data Input Stream in throws IO Exception byte flag in read Byte if flag NULL return data set Location read String in false data set File Name read String in false data set Symbolic Name read String in false data set Version new Version read String in false data set Activator read String in false data set Auto Start in read Boolean int exceptions Count in read Int String auto Start Exceptions exceptions Count 0 new String exceptions Count null for int i 0 i exceptions Count i auto Start Exceptions i in readUTF data set Auto Start Exceptions auto Start Exceptions data set Plugin Class read String in false data set Class Path read String in false data set Native Paths read String in false data set Execution Environment read String in false data set Dynamic Imports read String in false data set Generation in read Int data set Start Level in read Int data set Status in read Int data set Reference in read Boolean data set Fragment in read Boolean data set Manifest Time Stamp in read Long data set Manifest Type in read Byte  loadMetaDataFor EclipseBundleData DataInputStream IOException readByte setLocation readString setFileName readString setSymbolicName readString setVersion readString setActivator readString setAutoStart readBoolean exceptionsCount readInt autoStartExceptions exceptionsCount exceptionsCount exceptionsCount autoStartExceptions setAutoStartExceptions autoStartExceptions setPluginClass readString setClassPath readString setNativePaths readString setExecutionEnvironment readString setDynamicImports readString setGeneration readInt setStartLevel readInt setStatus readInt setReference readBoolean setFragment readBoolean setManifestTimeStamp readLong setManifestType readByte
public void save Meta Data For Default Bundle Data data throws IO Exception if Eclipse Bundle Data data is Auto Startable time Stamp Change the value of the time Stamp as a marker that something changed  saveMetaDataFor DefaultBundleData IOException EclipseBundleData isAutoStartable timeStamp timeStamp
public void persist Initial Bundle Start Level int value Change the value of the time Stamp as a marker that something changed time Stamp  persistInitialBundleStartLevel timeStamp timeStamp
public void persist Next BundleID long value Do nothing the time Stamp will have changed because the state will be updated  persistNextBundleID timeStamp
protected void save Meta Data For Bundle Data data Data Output Stream out throws IO Exception if data get BundleID 0 data instanceof Default Bundle Data out write Byte NULL return Eclipse Bundle Data bundle Data Eclipse Bundle Data data out write Byte OBJECT write String Or Null out bundle Data get Location write String Or Null out bundle Data get File Name write String Or Null out bundle Data get Symbolic Name write String Or Null out bundle Data get Version to String write String Or Null out bundle Data get Activator out write Boolean bundle Data is Auto Start String auto Start Exceptions bundle Data get Auto Start Exceptions if auto Start Exceptions null out write Int 0 else out write Int auto Start Exceptions length for int i 0 i auto Start Exceptions length i out writeUTF auto Start Exceptions i write String Or Null out bundle Data get Plugin Class write String Or Null out bundle Data get Class Path write String Or Null out bundle Data get Native Paths String write String Or Null out bundle Data get Execution Environment write String Or Null out bundle Data get Dynamic Imports out write Int bundle Data get Generation out write Int bundle Data get Start Level out write Int bundle Data get Persistent Status out write Boolean bundle Data is Reference out write Boolean bundle Data is Fragment out write Long bundle Data get Manifest Time Stamp out write Byte bundle Data get Manifest Type  saveMetaDataFor BundleData DataOutputStream IOException getBundleID DefaultBundleData writeByte EclipseBundleData bundleData EclipseBundleData writeByte writeStringOrNull bundleData getLocation writeStringOrNull bundleData getFileName writeStringOrNull bundleData getSymbolicName writeStringOrNull bundleData getVersion toString writeStringOrNull bundleData getActivator writeBoolean bundleData isAutoStart autoStartExceptions bundleData getAutoStartExceptions autoStartExceptions writeInt writeInt autoStartExceptions autoStartExceptions autoStartExceptions writeStringOrNull bundleData getPluginClass writeStringOrNull bundleData getClassPath writeStringOrNull bundleData getNativePathsString writeStringOrNull bundleData getExecutionEnvironment writeStringOrNull bundleData getDynamicImports writeInt bundleData getGeneration writeInt bundleData getStartLevel writeInt bundleData getPersistentStatus writeBoolean bundleData isReference writeBoolean bundleData isFragment writeLong bundleData getManifestTimeStamp writeByte bundleData getManifestType
private String read String Data Input Stream in boolean intern throws IO Exception byte type in read Byte if type NULL return null if intern return in readUTF intern else return in readUTF  readString DataInputStream IOException readByte
private void write String Or Null Data Output Stream out String string throws IO Exception if string null out write Byte NULL else out write Byte OBJECT out writeUTF string  writeStringOrNull DataOutputStream IOException writeByte writeByte
public void save Meta Data File metadata Location Manager get Configuration File Location Manager BUNDLE DATA FILE the cache and the state match if time Stamp state Manager get System State get Time Stamp return try Data Output Stream out new Data Output Stream new Buffered Output Stream new File Output Stream metadata try out write Byte BUNDLEDATA VERSION out write Long state Manager get System State get Time Stamp out writeUTF installURL out write Int initial Bundle Start Level out write Long next Id Bundle bundles context get Bundles out write Int bundles length for int i 0 i bundles length i long id bundles i get Bundle Id out write Long id if id 0 Bundle Data data org eclipse osgi framework internal core Abstract Bundle bundles i get Bundle Data save Meta Data For data out finally out close catch IO Exception e framework Log log new Framework Event Framework Event ERROR context get Bundle e  saveMetaData LocationManager getConfigurationFile LocationManager BUNDLE_DATA_FILE timeStamp stateManager getSystemState getTimeStamp DataOutputStream DataOutputStream BufferedOutputStream FileOutputStream writeByte BUNDLEDATA_VERSION writeLong stateManager getSystemState getTimeStamp writeInt initialBundleStartLevel writeLong nextId getBundles writeInt getBundleId writeLong BundleData AbstractBundle getBundleData saveMetaDataFor IOException frameworkLog FrameworkEvent FrameworkEvent getBundle
public Bundle Watcher get Bundle Watcher return Stats Manager get Default  BundleWatcher getBundleWatcher StatsManager getDefault
protected Bundle Context get Context return context  BundleContext getContext
public void framework Stopping Bundle Context context super framework Stopping context stopper new Bundle Stopper stopper stop Bundles  frameworkStopping BundleContext frameworkStopping BundleStopper stopBundles
public void handle Runtime Error Throwable error try check the prop each time this happens should NEVER happen exit On Error Boolean value Of System get Property PROP EXITONERROR true boolean Value NON NLS 1 String message Eclipse Adaptor Msg formatter get String ECLIPSE ADAPTOR RUNTIME ERROR NON NLS 1 Framework Log Entry log Entry new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME message 0 error null framework Log log log Entry catch Throwable t we may be in a currupted state and must be able to handle any errors ie Out Of Memory Error that may occur when handling the first error this is REALLY the last resort try error print Stack Trace t print Stack Trace catch Throwable t1 if we fail that then we are beyond help finally do the exit outside the try block just incase another runtime error was thrown while logging if exit On Error System exit 13  handleRuntimeError exitOnError valueOf getProperty PROP_EXITONERROR booleanValue EclipseAdaptorMsg getString ECLIPSE_ADAPTOR_RUNTIME_ERROR FrameworkLogEntry logEntry FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME frameworkLog logEntry OutOfMemoryError printStackTrace printStackTrace exitOnError
protected void set Log Framework Log log framework Log log  setLog FrameworkLog frameworkLog
public Bundle Stopper get Bundle Stopper return stopper  BundleStopper getBundleStopper

public static String get Resolution Failure Message Version Constraint unsatisfied if unsatisfied is Resolved throw new Illegal Argument Exception if unsatisfied instanceof Package Specification return Eclipse Adaptor Msg formatter get String ECLIPSE MISSING IMPORTED PACKAGE to String unsatisfied NON NLS 1 else if unsatisfied instanceof Bundle Specification if Bundle Specification unsatisfied is Optional return Eclipse Adaptor Msg formatter get String ECLIPSE MISSING OPTIONAL REQUIRED BUNDLE to String unsatisfied NON NLS 1 else return Eclipse Adaptor Msg formatter get String ECLIPSE MISSING REQUIRED BUNDLE to String unsatisfied NON NLS 1 else return Eclipse Adaptor Msg formatter get String ECLIPSE MISSING HOST to String unsatisfied NON NLS 1  getResolutionFailureMessage VersionConstraint isResolved IllegalArgumentException PackageSpecification EclipseAdaptorMsg getString ECLIPSE_MISSING_IMPORTED_PACKAGE toString BundleSpecification BundleSpecification isOptional EclipseAdaptorMsg getString ECLIPSE_MISSING_OPTIONAL_REQUIRED_BUNDLE toString EclipseAdaptorMsg getString ECLIPSE_MISSING_REQUIRED_BUNDLE toString EclipseAdaptorMsg getString ECLIPSE_MISSING_HOST toString
Print a debug message to the console Pre pend the message with the current date and the name of the current thread public static void debug String message String Buffer buffer new String Buffer buffer append new Date System current Time Millis buffer append NON NLS 1 buffer append Thread current Thread get Name buffer append NON NLS 1 buffer append message System out println buffer to String  StringBuffer StringBuffer currentTimeMillis currentThread getName toString
private static String to String Version Constraint constraint org eclipse osgi service resolver Version Range version Range constraint get Version Range if version Range null return constraint get Name return constraint get Name   version Range  toString VersionConstraint VersionRange versionRange getVersionRange versionRange getName getName _ versionRange

private static String build Library Variants Array List result new Array List Environment Info info Environment Info get Default result add ws info getWS NON NLS 1 NON NLS 2 result add os info getOS info getOS Arch NON NLS 1 NON NLS 2 NON NLS 3 result add os info getOS NON NLS 1 NON NLS 2 String nl info getNL nl nl replace   while nl length 0 result add nl nl NON NLS 1 NON NLS 2 int i nl last Index Of nl i 0 nl substring 0 i NON NLS 1 result add NON NLS 1 return String result to Array new String result size  buildLibraryVariants ArrayList ArrayList EnvironmentInfo EnvironmentInfo getDefault getOSArch _ lastIndexOf toArray
public Eclipse Bundle Data Default Adaptor adaptor long id throws IO Exception super adaptor id  EclipseBundleData DefaultAdaptor IOException
public void initialize Existing Bundle throws IO Exception File delete new File get Bundle Store Dir delete NON NLS 1 and the directory is not marked for delete if delete exists throw new IO Exception create Base Bundle File if check Manifest Time Stamp throw new IO Exception  initializeExistingBundle IOException getBundleStoreDir IOException createBaseBundleFile checkManifestTimeStamp IOException
private boolean check Manifest Time Stamp if true equals Ignore Case System get Property PROP CHECK CONFIG NON NLS 1 return true return Plugin Converter Impl get Time Stamp get Base File get Manifest Type get Manifest Time Stamp  checkManifestTimeStamp equalsIgnoreCase getProperty PROP_CHECK_CONFIG PluginConverterImpl getTimeStamp getBaseFile getManifestType getManifestTimeStamp
Returns the absolute path name of a native library The VM invokes this method to locate the native libraries that belong to classes loaded with this class loader If this method returns code null code the VM searches the library along the path specified as the code java library path code property param lib Name the library name return the absolute path of the native library public String find Library String lib Name first do the standard OS Gi lookup using the native clauses in the manifest If that fails do the legacy Eclipse lookup String result super find Library lib Name if result null return result if library Variants null library Variants build Library Variants if lib Name length 0 return null if lib Name char At 0 lib Name char At 0 lib Name lib Name substring 1 lib Name System map Library Name lib Name if DEBUG DEBUG SHOW ACTIONS debug Native lib Name debug find Library lib Name NON NLS 1 NON NLS 2 return search Variants library Variants lib Name  libName findLibrary libName OSGi findLibrary libName libraryVariants libraryVariants buildLibraryVariants libName libName charAt libName charAt libName libName libName mapLibraryName libName DEBUG_SHOW_ACTIONS debugNative libName findLibrary libName searchVariants libraryVariants libName
private String search Variants String variants String path for int i 0 i variants length i Bundle Entry lib Entry base Bundle File get Entry variants i path if lib Entry null if DEBUG DEBUG SHOW FAILURE debug not found variants i path NON NLS 1 else if DEBUG DEBUG SHOW SUCCESS debug found path as variants i path NON NLS 1 NON NLS 2 File lib File base Bundle File get File variants i path return lib File get Absolute Path return null  searchVariants BundleEntry libEntry baseBundleFile getEntry libEntry DEBUG_SHOW_FAILURE DEBUG_SHOW_SUCCESS libFile baseBundleFile getFile libFile getAbsolutePath
TODO Unused method private URL get SearchUR Ls URL target return new URL target  getSearchURLs
public synchronized Dictionary get Manifest throws Bundle Exception return get Manifest false  getManifest BundleException getManifest
public synchronized Dictionary get Manifest boolean first throws Bundle Exception if manifest null manifest first load Manifest new Cached Manifest this if manifest get org osgi framework Constants BUNDLE SYMBOLICNAME null if get Entry Plugin Converter Impl PLUGIN MANIFEST null get Entry Plugin Converter Impl FRAGMENT MANIFEST null Dictionary generated Manifest generate Manifest manifest if generated Manifest null manifest generated Manifest return manifest  getManifest BundleException loadManifest CachedManifest BUNDLE_SYMBOLICNAME getEntry PluginConverterImpl PLUGIN_MANIFEST getEntry PluginConverterImpl FRAGMENT_MANIFEST generatedManifest generateManifest generatedManifest generatedManifest
public synchronized Dictionary load Manifest throws Bundle Exception URL url get Entry Constants OSGI BUNDLE MANIFEST if url null manifest Time Stamp get Base Bundle File get Entry Constants OSGI BUNDLE MANIFEST get Time manifest Type MANIFEST TYPE BUNDLE return load Manifest From url Dictionary result generate Manifest null if result null throw new Bundle Exception Eclipse Adaptor Msg formatter get String ECLIPSE DATA MANIFEST NOT FOUND get Location NON NLS 1 return result  loadManifest BundleException getEntry OSGI_BUNDLE_MANIFEST manifestTimeStamp getBaseBundleFile getEntry OSGI_BUNDLE_MANIFEST getTime manifestType MANIFEST_TYPE_BUNDLE loadManifestFrom generateManifest BundleException EclipseAdaptorMsg getString ECLIPSE_DATA_MANIFEST_NOT_FOUND getLocation
private Headers basic Check Manifest String cache Location String symbolic Name String version byte input Type throws Bundle Exception File current File new File cache Location symbolic Name   version MF NON NLS 1 if Plugin Converter Impl up To Date current File get Base File input Type try return Headers parse Manifest new File Input Stream current File catch File Not Found Exception e do nothing return null  basicCheckManifest cacheLocation symbolicName inputType BundleException currentFile cacheLocation symbolicName _ PluginConverterImpl upToDate currentFile getBaseFile inputType parseManifest FileInputStream currentFile FileNotFoundException
private Headers check Manifest And Parent String cache Location String symbolic Name String version byte input Type throws Bundle Exception Headers result basic Check Manifest cache Location symbolic Name version input Type if result null return result Location parent Configuration null if parent Configuration Location Manager get Configuration Location get Parent Location null result basic Check Manifest new File parent Configuration getURL get File Framework Adaptor FRAMEWORK SYMBOLICNAME Location Manager MANIFESTS DIR to String symbolic Name version input Type return result  checkManifestAndParent cacheLocation symbolicName inputType BundleException basicCheckManifest cacheLocation symbolicName inputType parentConfiguration parentConfiguration LocationManager getConfigurationLocation getParentLocation basicCheckManifest parentConfiguration getFile FrameworkAdaptor FRAMEWORK_SYMBOLICNAME LocationManager MANIFESTS_DIR toString symbolicName inputType
private Dictionary generate Manifest Dictionary original Manifest throws Bundle Exception String cache Location System get Property Location Manager PROP MANIFEST CACHE if get Symbolic Name null Headers existing Headers check Manifest And Parent cache Location get Symbolic Name get Version to String manifest Type if existing Headers null return existing Headers Plugin Converter Impl converter Plugin Converter Impl get Default Dictionary generated Manifest try generated Manifest converter convert Manifest get Base File true null true catch Plugin Conversion Exception pce String message Eclipse Adaptor Msg formatter get String ECLIPSE CONVERTER ERROR CONVERTING get Base File NON NLS 1 throw new Bundle Exception message pce NON NLS 1 Now we know the symbolic Id and the version of the bundle we check to see if don t have a manifest for it already Version version new Version String generated Manifest get Constants BUNDLE VERSION String symbolic Name Manifest Element parse Header org osgi framework Constants BUNDLE SYMBOLICNAME String generated Manifest get org osgi framework Constants BUNDLE SYMBOLICNAME 0 get Value Manifest Element generated From Manifest Element parse Header Plugin Converter Impl GENERATED FROM String generated Manifest get Plugin Converter Impl GENERATED FROM 0 Headers existing Headers check Manifest And Parent cache Location symbolic Name version to String Byte parse Byte generated From get Attribute Plugin Converter Impl MANIFEST TYPE ATTRIBUTE if existing Headers null return existing Headers We don t have a manifest set Manifest Time Stamp Long parse Long generated From get Value set Manifest Type Byte parse Byte generated From get Attribute Plugin Converter Impl MANIFEST TYPE ATTRIBUTE merge the original manifest with the generated one if original Manifest null Enumeration enum original Manifest keys while enum has More Elements Object key enum next Element generated Manifest put key original Manifest get key write the generated manifest File bundle Manifest Location new File cache Location symbolic Name   version to String MF NON NLS 1 try converter write Manifest bundle Manifest Location generated Manifest true catch Exception e TODO Need to log return generated Manifest  generateManifest originalManifest BundleException cacheLocation getProperty LocationManager PROP_MANIFEST_CACHE getSymbolicName existingHeaders checkManifestAndParent cacheLocation getSymbolicName getVersion toString manifestType existingHeaders existingHeaders PluginConverterImpl PluginConverterImpl getDefault generatedManifest generatedManifest convertManifest getBaseFile PluginConversionException EclipseAdaptorMsg getString ECLIPSE_CONVERTER_ERROR_CONVERTING getBaseFile BundleException symbolicId generatedManifest BUNDLE_VERSION symbolicName ManifestElement parseHeader BUNDLE_SYMBOLICNAME generatedManifest BUNDLE_SYMBOLICNAME getValue ManifestElement generatedFrom ManifestElement parseHeader PluginConverterImpl GENERATED_FROM generatedManifest PluginConverterImpl GENERATED_FROM existingHeaders checkManifestAndParent cacheLocation symbolicName toString parseByte generatedFrom getAttribute PluginConverterImpl MANIFEST_TYPE_ATTRIBUTE existingHeaders existingHeaders setManifestTimeStamp parseLong generatedFrom getValue setManifestType parseByte generatedFrom getAttribute PluginConverterImpl MANIFEST_TYPE_ATTRIBUTE originalManifest originalManifest hasMoreElements nextElement generatedManifest originalManifest bundleManifestLocation cacheLocation symbolicName _ toString writeManifest bundleManifestLocation generatedManifest generatedManifest
private Dictionary load Manifest From URL manifestURL throws Bundle Exception try return Headers parse Manifest manifestURL open Stream catch IO Exception e throw new Bundle Exception Eclipse Adaptor Msg formatter get String ECLIPSE DATA ERROR READING MANIFEST get Location e NON NLS 1  loadManifestFrom BundleException parseManifest openStream IOException BundleException EclipseAdaptorMsg getString ECLIPSE_DATA_ERROR_READING_MANIFEST getLocation
protected void load From Manifest throws IO Exception Bundle Exception get Manifest true super load From Manifest manifest cannot ever be a cached one otherwise the lines below are bogus if manifest instanceof Cached Manifest throw new Illegal State Exception plugin Class String manifest get Eclipse Adaptor PLUGIN CLASS parse Auto Start String manifest get Eclipse Adaptor ECLIPSE AUTOSTART  loadFromManifest IOException BundleException getManifest loadFromManifest CachedManifest IllegalStateException pluginClass EclipseAdaptor PLUGIN_CLASS parseAutoStart EclipseAdaptor ECLIPSE_AUTOSTART
public String get Plugin Class return plugin Class  getPluginClass pluginClass
public void set Plugin Class String value plugin Class value  setPluginClass pluginClass
public long get Manifest Time Stamp return manifest Time Stamp  getManifestTimeStamp manifestTimeStamp
public void set Manifest Time Stamp long stamp manifest Time Stamp stamp  setManifestTimeStamp manifestTimeStamp
public byte get Manifest Type return manifest Type  getManifestType manifestType
public void set Manifest Type byte manifest Type this manifest Type manifest Type  setManifestType manifestType manifestType manifestType
public void set Auto Start boolean value auto Start value  setAutoStart autoStart
public boolean is Auto Start return auto Start  isAutoStart autoStart
public int get Persistent Status omit the active state if necessary return is Auto Startable Constants BUNDLE STARTED get Status get Status  getPersistentStatus isAutoStartable BUNDLE_STARTED getStatus getStatus
public void set Auto Start Exceptions String auto Start Exceptions this auto Start Exceptions auto Start Exceptions  setAutoStartExceptions autoStartExceptions autoStartExceptions autoStartExceptions
public String get Auto Start Exceptions return auto Start Exceptions  getAutoStartExceptions autoStartExceptions
private void parse Auto Start String header Value auto Start false auto Start Exceptions null Manifest Element all Elements null try all Elements Manifest Element parse Header Eclipse Adaptor ECLIPSE AUTOSTART header Value catch Bundle Exception e just use the default settings no auto activation String message Eclipse Adaptor Msg formatter get String ECLIPSE CLASSLOADER CANNOT GET HEADERS get Location NON NLS 1 Eclipse Adaptor get Default get Framework Log log new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME message 0 e null Eclipse Auto Start not found if all Elements null return the single value for this element should be true false auto Start true equals Ignore Case all Elements 0 get Value NON NLS 1 look for any exceptions the attribute to the auto Activate setting String exceptions Value all Elements 0 get Attribute Eclipse Adaptor ECLIPSE AUTOSTART EXCEPTIONS if exceptions Value null return String Tokenizer tokenizer new String Tokenizer exceptions Value NON NLS 1 int number Of Tokens tokenizer count Tokens auto Start Exceptions new String number Of Tokens for int i 0 i number Of Tokens i auto Start Exceptions i tokenizer next Token trim  parseAutoStart headerValue autoStart autoStartExceptions ManifestElement allElements allElements ManifestElement parseHeader EclipseAdaptor ECLIPSE_AUTOSTART headerValue BundleException EclipseAdaptorMsg getString ECLIPSE_CLASSLOADER_CANNOT_GET_HEADERS getLocation EclipseAdaptor getDefault getFrameworkLog FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME AutoStart allElements autoStart equalsIgnoreCase allElements getValue autoActivate exceptionsValue allElements getAttribute EclipseAdaptor ECLIPSE_AUTOSTART_EXCEPTIONS exceptionsValue StringTokenizer StringTokenizer exceptionsValue numberOfTokens countTokens autoStartExceptions numberOfTokens numberOfTokens autoStartExceptions nextToken
public boolean is Auto Startable return auto Start auto Start Exceptions null auto Start Exceptions length 0  isAutoStartable autoStart autoStartExceptions autoStartExceptions

TODO minimal implementation for now This could be smarter public class Eclipse Bundle Installer implements Bundle Installer public void install Bundle Bundle Description to Install throws Bundle Exception Eclipse Adaptor get Default get Context install Bundle to Install get Location  EclipseBundleInstaller BundleInstaller installBundle BundleDescription toInstall BundleException EclipseAdaptor getDefault getContext installBundle toInstall getLocation
public void uninstall Bundle Bundle Description to Uninstall Id throws Bundle Exception Bundle to Uninstall Eclipse Adaptor get Default get Context get Bundle to Uninstall Id get Bundle Id if to Uninstall null to Uninstall uninstall  uninstallBundle BundleDescription toUninstallId BundleException toUninstall EclipseAdaptor getDefault getContext getBundle toUninstallId getBundleId toUninstall toUninstall
public void update Bundle Bundle Description to Update Id throws Bundle Exception Bundle to Update Eclipse Adaptor get Default get Context get Bundle to Update Id get Bundle Id if to Update null to Update update  updateBundle BundleDescription toUpdateId BundleException toUpdate EclipseAdaptor getDefault getContext getBundle toUpdateId getBundleId toUpdate toUpdate

public Eclipse Class Loader Class Loader Delegate delegate Protection Domain domain String classpath Class Loader parent Bundle Data bundle Data super delegate domain classpath parent org eclipse osgi framework internal defaultadaptor Default Bundle Data bundle Data  EclipseClassLoader ClassLoaderDelegate ProtectionDomain ClassLoader BundleData bundleData DefaultBundleData bundleData
public Class find Local Class String class Name throws Class Not Found Exception if Stats Manager MONITOR CLASSES Suport for performance analysis Classloader Stats start Loading Class get Classloader Id class Name boolean found true try Abstract Bundle bundle Abstract Bundle hostdata get Bundle If the bundle is active uninstalled or stopping then the bundle has already been initialized though it may have been destroyed so just return the class if bundle get State Abstract Bundle ACTIVE Abstract Bundle UNINSTALLED Abstract Bundle STOPPING 0 return basic Find Local Class class Name The bundle is not active and does not require activation just return the class if should Activate For class Name return basic Find Local Class class Name The bundle is starting Note that if the state changed between the tests above and this test e g it was not ACTIVE but now is that s ok we will just try to start it again else case TODO need an explanation here of why we duplicated the mechanism from the framework rather than just calling start and letting it sort it out if bundle get State Abstract Bundle STARTING If the thread trying to load the class is the one trying to activate the bundle then return the class if bundle test State Changing Thread current Thread bundle test State Changing null return basic Find Local Class class Name If it s another thread we wait and try again In any case the class is returned The difference is that an exception can be logged TODO do we really need this test We just did it on the previous line if bundle test State Changing Thread current Thread Thread thread Changing State bundle get State Changing if Stats Manager TRACE BUNDLES thread Changing State null System out println Concurrent startup of bundle bundle get Symbolic Name by Thread current Thread and thread Changing State get Name Waiting up to 5000ms for thread Changing State to finish the initialization NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 Object lock bundle get State Change Lock long start System current Time Millis long delay 5000 long time Left delay while true if bundle test State Changing null time Left 0 break try synchronized lock lock wait time Left catch Interrupted Exception e Ignore and keep waiting time Left start delay System current Time Millis if time Left 0 bundle get State Bundle ACTIVE String bundle Name bundle get Symbolic Name null Long to String bundle get Bundle Id bundle get Symbolic Name String message Eclipse Adaptor Msg formatter get String ECLIPSE CLASSLOADER CONCURRENT STARTUP new Object Thread current Thread get Name class Name thread Changing State get Name bundle Name Long to String delay NON NLS 1 Eclipse Adaptor get Default get Framework Log log new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME message 0 new Exception Eclipse Adaptor Msg formatter get String ECLIPSE CLASSLOADER GENERATED EXCEPTION null NON NLS 1 return basic Find Local Class class Name The bundle must be started try hostdata get Bundle start catch Bundle Exception e String message Eclipse Adaptor Msg formatter get String ECLIPSE CLASSLOADER ACTIVATION bundle get Symbolic Name Long to String bundle get Bundle Id NON NLS 1 Eclipse Adaptor get Default get Framework Log log new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME message 0 e null throw new Class Not Found Exception class Name e return basic Find Local Class class Name catch Class Not Found Exception e found false throw e finally if Stats Manager MONITOR CLASSES Classloader Stats end Loading Class get Classloader Id class Name found  findLocalClass className ClassNotFoundException StatsManager MONITOR_CLASSES ClassloaderStats startLoadingClass getClassloaderId className AbstractBundle AbstractBundle getBundle getState AbstractBundle AbstractBundle AbstractBundle basicFindLocalClass className shouldActivateFor className basicFindLocalClass className getState AbstractBundle testStateChanging currentThread testStateChanging basicFindLocalClass className testStateChanging currentThread threadChangingState getStateChanging StatsManager TRACE_BUNDLES threadChangingState getSymbolicName currentThread threadChangingState getName threadChangingState getStateChangeLock currentTimeMillis timeLeft testStateChanging timeLeft timeLeft InterruptedException timeLeft currentTimeMillis timeLeft getState bundleName getSymbolicName toString getBundleId getSymbolicName EclipseAdaptorMsg getString ECLIPSE_CLASSLOADER_CONCURRENT_STARTUP currentThread getName className threadChangingState getName bundleName toString EclipseAdaptor getDefault getFrameworkLog FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME EclipseAdaptorMsg getString ECLIPSE_CLASSLOADER_GENERATED_EXCEPTION basicFindLocalClass className getBundle BundleException EclipseAdaptorMsg getString ECLIPSE_CLASSLOADER_ACTIVATION getSymbolicName toString getBundleId EclipseAdaptor getDefault getFrameworkLog FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME ClassNotFoundException className basicFindLocalClass className ClassNotFoundException StatsManager MONITOR_CLASSES ClassloaderStats endLoadingClass getClassloaderId className
Do the basic work for finding a class This avoids the activation detection etc and can be used by subclasses to override the default from the superclass way of finding classes param name the class to look for return the found class throws Class Not Found Exception if the requested class cannot be found protected Class basic Find Local Class String name throws Class Not Found Exception return super find Local Class name  ClassNotFoundException basicFindLocalClass ClassNotFoundException findLocalClass
Determines if for loading the given class we should activate the bundle private boolean should Activate For String class Name throws Class Not Found Exception Don t reactivate on shut down if hostdata get Adaptor is Stopping Bundle Stopper stopper Eclipse Adaptor get Default get Bundle Stopper if stopper null stopper is Stopped hostdata get Bundle String message Eclipse Adaptor Msg formatter get String ECLIPSE CLASSLOADER ALREADY STOPPED class Name hostdata get Symbolic Name NON NLS 1 Class Not Found Exception exception new Class Not Found Exception message Eclipse Adaptor get Default get Framework Log log new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME message 0 exception null NON NLS 1 throw exception boolean auto Start Eclipse Bundle Data hostdata is Auto Start String auto Start Exceptions Eclipse Bundle Data hostdata get Auto Start Exceptions no exceptions it is easy to figure it out if auto Start Exceptions null return auto Start otherwise we need to check if the package is in the exceptions list int dot Position class Name last Index Of the class has no package name no exceptions apply if dot Position 1 return auto Start String package Name class Name substring 0 dot Position should activate if auto Start and package is not an exception or if auto Start and package is exception return auto Start contains auto Start Exceptions package Name  shouldActivateFor className ClassNotFoundException getAdaptor isStopping BundleStopper EclipseAdaptor getDefault getBundleStopper isStopped getBundle EclipseAdaptorMsg getString ECLIPSE_CLASSLOADER_ALREADY_STOPPED className getSymbolicName ClassNotFoundException ClassNotFoundException EclipseAdaptor getDefault getFrameworkLog FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME autoStart EclipseBundleData isAutoStart autoStartExceptions EclipseBundleData getAutoStartExceptions autoStartExceptions autoStart dotPosition className lastIndexOf dotPosition autoStart packageName className dotPosition autoStart autoStart autoStart autoStartExceptions packageName
private boolean contains String array String element for int i 0 i array length i if array i equals element return true return false 
Override define Class to allow for package defining protected Class define Class String name byte classbytes int off int len Classpath Entry classpath Entry throws Class Format Error if DEFINE PACKAGES return super define Class name classbytes off len classpath Entry Define the package if it is not the default package int last Index name last Index Of if last Index 1 String package Name name substring 0 last Index Package pkg get Package package Name if pkg null get info about the package from the classpath entry s manifest String spec Title null spec Version null spec Vendor null impl Title null impl Version null impl Vendor null Manifest mf Eclipse Classpath Entry classpath Entry get Manifest if mf null Attributes main Attributes mf get Main Attributes String dir Name package Name replace Attributes package Attributes mf get Attributes dir Name boolean no Entry false if package Attributes null no Entry true package Attributes main Attributes spec Title package Attributes get Value Attributes Name SPECIFICATION TITLE if spec Title null no Entry spec Title main Attributes get Value Attributes Name SPECIFICATION TITLE spec Version package Attributes get Value Attributes Name SPECIFICATION VERSION if spec Version null no Entry spec Version main Attributes get Value Attributes Name SPECIFICATION VERSION spec Vendor package Attributes get Value Attributes Name SPECIFICATION VENDOR if spec Vendor null no Entry spec Vendor main Attributes get Value Attributes Name SPECIFICATION VENDOR impl Title package Attributes get Value Attributes Name IMPLEMENTATION TITLE if impl Title null no Entry impl Title main Attributes get Value Attributes Name IMPLEMENTATION TITLE impl Version package Attributes get Value Attributes Name IMPLEMENTATION VERSION if impl Version null no Entry impl Version main Attributes get Value Attributes Name IMPLEMENTATION VERSION impl Vendor package Attributes get Value Attributes Name IMPLEMENTATION VENDOR if impl Vendor null no Entry impl Vendor main Attributes get Value Attributes Name IMPLEMENTATION VENDOR The package is not defined yet define it before we define the class TODO still need to seal packages define Package package Name spec Title spec Version spec Vendor impl Title impl Version impl Vendor null return super define Class name classbytes off len classpath Entry  defineClass defineClass ClasspathEntry classpathEntry ClassFormatError DEFINE_PACKAGES defineClass classpathEntry lastIndex lastIndexOf lastIndex packageName lastIndex getPackage packageName specTitle specVersion specVendor implTitle implVersion implVendor EclipseClasspathEntry classpathEntry getManifest mainAttributes getMainAttributes dirName packageName packageAttributes getAttributes dirName noEntry packageAttributes noEntry packageAttributes mainAttributes specTitle packageAttributes getValue SPECIFICATION_TITLE specTitle noEntry specTitle mainAttributes getValue SPECIFICATION_TITLE specVersion packageAttributes getValue SPECIFICATION_VERSION specVersion noEntry specVersion mainAttributes getValue SPECIFICATION_VERSION specVendor packageAttributes getValue SPECIFICATION_VENDOR specVendor noEntry specVendor mainAttributes getValue SPECIFICATION_VENDOR implTitle packageAttributes getValue IMPLEMENTATION_TITLE implTitle noEntry implTitle mainAttributes getValue IMPLEMENTATION_TITLE implVersion packageAttributes getValue IMPLEMENTATION_VERSION implVersion noEntry implVersion mainAttributes getValue IMPLEMENTATION_VERSION implVendor packageAttributes getValue IMPLEMENTATION_VENDOR implVendor noEntry implVendor mainAttributes getValue IMPLEMENTATION_VENDOR definePackage packageName specTitle specVersion specVendor implTitle implVersion implVendor defineClass classpathEntry
private String get Classloader Id return hostdata get Bundle get Symbolic Name  getClassloaderId getBundle getSymbolicName
public URL get Resource String name URL result super get Resource name if Stats Manager MONITOR RESOURCES if result null name ends With properties NON NLS 1 Classloader Stats loaded Bundle get Classloader Id new Resource Bundle Stats get Classloader Id name result return result  getResource getResource StatsManager MONITOR_RESOURCES endsWith ClassloaderStats loadedBundle getClassloaderId ResourceBundleStats getClassloaderId
protected void find Class Path Entry Array List result String entry Abstract Bundle Data bundledata Protection Domain domain String var has Prefix entry if var null super find Class Path Entry result entry bundledata domain return if var equals ws NON NLS 1 super find Class Path Entry result ws Environment Info get Default getWS entry substring 4 bundledata domain NON NLS 1 return if var equals os NON NLS 1 super find Class Path Entry result os Environment Info get Default getOS entry substring 4 bundledata domain NON NLS 1 return if var equals nl NON NLS 1 entry entry substring 4 for int i 0 i NL JAR VARIANTS length i if add Class Path Entry result nl NL JAR VARIANTS i entry bundledata domain NON NLS 1 NON NLS 2 return is we are not in development mode post some framework errors if Dev Class Path Helper in Development Mode Bundle Exception be new Bundle Exception Msg formatter get String BUNDLE CLASSPATH ENTRY NOT FOUND EXCEPTION entry hostdata get Location NON NLS 1 bundledata get Adaptor get Event Publisher publish Framework Event Framework Event ERROR bundledata get Bundle be  findClassPathEntry ArrayList AbstractBundleData ProtectionDomain hasPrefix findClassPathEntry findClassPathEntry EnvironmentInfo getDefault findClassPathEntry EnvironmentInfo getDefault NL_JAR_VARIANTS addClassPathEntry NL_JAR_VARIANTS DevClassPathHelper inDevelopmentMode BundleException BundleException getString BUNDLE_CLASSPATH_ENTRY_NOT_FOUND_EXCEPTION getLocation getAdaptor getEventPublisher publishFrameworkEvent FrameworkEvent getBundle
private static String buildNL Jar Variants String nl Array List result new Array List nl nl replace   while nl length 0 result add nl nl NON NLS 1 NON NLS 2 int i nl last Index Of NON NLS 1 nl i 0 nl substring 0 i NON NLS 1 result add NON NLS 1 return String result to Array new String result size  buildNLJarVariants ArrayList ArrayList _ lastIndexOf toArray
return a String representing the string found between the s private String has Prefix String lib Path if lib Path starts With ws NON NLS 1 return ws NON NLS 1 if lib Path starts With os NON NLS 1 return os NON NLS 1 if lib Path starts With nl NON NLS 1 return nl NON NLS 1 return null  hasPrefix libPath libPath startsWith libPath startsWith libPath startsWith
Override to create Eclipse Classpath Entry objects Eclipse Classpath Entry allows access to the manifest file for the classpath entry protected Classpath Entry create Class Path Entry Bundle File bundlefile Protection Domain domain return new Eclipse Classpath Entry bundlefile domain  EclipseClasspathEntry EclipseClasspathEntry ClasspathEntry createClassPathEntry BundleFile ProtectionDomain EclipseClasspathEntry
boolean initMF false protected Eclipse Classpath Entry Bundle File bundlefile Protection Domain domain super bundlefile domain  EclipseClasspathEntry BundleFile ProtectionDomain
public Manifest get Manifest if initMF return mf Bundle Entry mf Entry get Bundle File get Entry org eclipse osgi framework internal core Constants OSGI BUNDLE MANIFEST if mf Entry null try Input Stream man In mf Entry get Input Stream mf new Manifest man In man In close catch IO Exception e do nothing initMF true return mf  getManifest BundleEntry mfEntry getBundleFile getEntry OSGI_BUNDLE_MANIFEST mfEntry InputStream manIn mfEntry getInputStream manIn manIn IOException

private Bundle Context context public Eclipse Command Provider Bundle Context context this context context  BundleContext EclipseCommandProvider BundleContext
public String get Help String Buffer help new String Buffer 512 help append Eclipse Adaptor Msg NEW LINE help append NON NLS 1 help append Eclipse Adaptor Msg formatter get String ECLIPSE CONSOLE COMMANDS HEADER NON NLS 1 help append NON NLS 1 help append Eclipse Adaptor Msg NEW LINE help append tdiag Eclipse Adaptor Msg formatter get String ECLIPSE CONSOLE HELP DIAG COMMAND DESCRIPTION NON NLS 1 NON NLS 2 help append Eclipse Adaptor Msg NEW LINE help append tactive Eclipse Adaptor Msg formatter get String ECLIPSE CONSOLE HELP ACTIVE COMMAND DESCRIPTION NON NLS 1 NON NLS 2 return help to String  getHelp StringBuffer StringBuffer EclipseAdaptorMsg NEW_LINE EclipseAdaptorMsg getString ECLIPSE_CONSOLE_COMMANDS_HEADER EclipseAdaptorMsg NEW_LINE EclipseAdaptorMsg getString ECLIPSE_CONSOLE_HELP_DIAG_COMMAND_DESCRIPTION EclipseAdaptorMsg NEW_LINE EclipseAdaptorMsg getString ECLIPSE_CONSOLE_HELP_ACTIVE_COMMAND_DESCRIPTION toString
private Bundle Description get Bundle Description From Token State state String token try long id Long parse Long token return state get Bundle id catch Number Format Exception nfe Bundle Description all Bundles state get Bundles token if all Bundles length 0 return all Bundles 0 return null  BundleDescription getBundleDescriptionFromToken parseLong getBundle NumberFormatException BundleDescription allBundles getBundles allBundles allBundles
public void  diag Command Interpreter ci throws Exception String next Arg ci next Argument if next Arg null ci println Eclipse Adaptor Msg formatter get String ECLIPSE CONSOLE NO BUNDLE SPECIFIED ERROR NON NLS 1 return Service Reference platform Admin Ref context get Service Reference Platform Admin class get Name if platform Admin Ref null ci print NON NLS 1 ci println Eclipse Adaptor Msg formatter get String ECLIPSE CONSOLE NO CONSTRAINTS NO PLATFORM ADMIN MESSAGE NON NLS 1 return try Platform Admin platform Admin Platform Admin context get Service platform Admin Ref if platform Admin null return State system State platform Admin get State false while next Arg null Bundle Description bundle get Bundle Description From Token system State next Arg if bundle null ci println Eclipse Adaptor Msg formatter get String ECLIPSE CONSOLE CANNOT FIND BUNDLE ERROR next Arg NON NLS 1 next Arg ci next Argument continue ci println bundle get Location bundle get Bundle Id NON NLS 1 NON NLS 2 Version Constraint unsatisfied platform Admin get State Helper get Unsatisfied Constraints bundle if unsatisfied length 0 init default message String message Eclipse Adaptor Msg formatter get String ECLIPSE CONSOLE NO CONSTRAINTS NON NLS 1 if bundle is Resolved another version might have been picked String symbolic Name bundle get Symbolic Name Bundle Description resolved symbolic Name null null get Resolved Bundle system State symbolic Name if resolved null message Eclipse Adaptor Msg formatter get String ECLIPSE CONSOLE OTHER VERSION resolved get Location NON NLS 1 ci print NON NLS 1 ci println message NON NLS 1 for int i 0 i unsatisfied length i ci print NON NLS 1 ci println Eclipse Adaptor Msg get Resolution Failure Message unsatisfied i next Arg ci next Argument finally context unget Service platform Admin Ref  _diag CommandInterpreter nextArg nextArgument nextArg EclipseAdaptorMsg getString ECLIPSE_CONSOLE_NO_BUNDLE_SPECIFIED_ERROR ServiceReference platformAdminRef getServiceReference PlatformAdmin getName platformAdminRef EclipseAdaptorMsg getString ECLIPSE_CONSOLE_NO_CONSTRAINTS_NO_PLATFORM_ADMIN_MESSAGE PlatformAdmin platformAdmin PlatformAdmin getService platformAdminRef platformAdmin systemState platformAdmin getState nextArg BundleDescription getBundleDescriptionFromToken systemState nextArg EclipseAdaptorMsg getString ECLIPSE_CONSOLE_CANNOT_FIND_BUNDLE_ERROR nextArg nextArg nextArgument getLocation getBundleId VersionConstraint platformAdmin getStateHelper getUnsatisfiedConstraints EclipseAdaptorMsg getString ECLIPSE_CONSOLE_NO_CONSTRAINTS isResolved symbolicName getSymbolicName BundleDescription symbolicName getResolvedBundle systemState symbolicName EclipseAdaptorMsg getString ECLIPSE_CONSOLE_OTHER_VERSION getLocation EclipseAdaptorMsg getResolutionFailureMessage nextArg nextArgument ungetService platformAdminRef
private Bundle Description get Resolved Bundle State state String symbolic Name Bundle Description homonyms state get Bundles symbolic Name for int i 0 i homonyms length i if homonyms i is Resolved return homonyms i return null  BundleDescription getResolvedBundle symbolicName BundleDescription getBundles symbolicName isResolved
public void  active Command Interpreter ci throws Exception Bundle all Bundles context get Bundles int active Count 0 for int i 0 i all Bundles length i if all Bundles i get State Bundle ACTIVE ci println all Bundles i active Count ci print NON NLS 1 ci println Eclipse Adaptor Msg formatter get String ECLIPSE CONSOLE BUNDLES ACTIVE active Count NON NLS 1  _active CommandInterpreter allBundles getBundles activeCount allBundles allBundles getState allBundles activeCount EclipseAdaptorMsg getString ECLIPSE_CONSOLE_BUNDLES_ACTIVE activeCount

public class Eclipse Element Factory implements Adaptor Element Factory public Abstract Bundle Data create Bundle Data Abstract Framework Adaptor adaptor long id throws IO Exception return new Eclipse Bundle Data Default Adaptor adaptor id  EclipseElementFactory AdaptorElementFactory AbstractBundleData createBundleData AbstractFrameworkAdaptor IOException EclipseBundleData DefaultAdaptor
public org eclipse osgi framework adaptor Bundle Class Loader create Class Loader Class Loader Delegate delegate Protection Domain domain String bundleclasspath Abstract Bundle Data data return new Eclipse Class Loader delegate domain bundleclasspath data get Adaptor get Bundle Class Loader Parent data  BundleClassLoader createClassLoader ClassLoaderDelegate ProtectionDomain AbstractBundleData EclipseClassLoader getAdaptor getBundleClassLoaderParent

protected Writer writer public Eclipse Log File out File this out File out File this writer null  EclipseLog outFile outFile outFile
public Eclipse Log Writer writer if writer null log to System err by default this writer log For Stream System err else this writer writer  EclipseLog logForStream
public Eclipse Log this Writer null  EclipseLog
private Throwable get Root Throwable t Throwable root null if t instanceof Bundle Exception root Bundle Exception t get Nested Exception if t instanceof Invocation Target Exception root Invocation Target Exception t get Target Exception skip inner Invocation Target Exceptions and Bundle Exceptions if root instanceof Invocation Target Exception root instanceof Bundle Exception Throwable deeply Nested get Root root if deeply Nested null if we have something more specific use it otherwise keep what we have root deeply Nested return root  getRoot BundleException BundleException getNestedException InvocationTargetException InvocationTargetException getTargetException InvocationTargetExceptions BundleExceptions InvocationTargetException BundleException deeplyNested getRoot deeplyNested deeplyNested
protected void write Session throws IO Exception write SESSION write Space TODO timestamp is a more correct name String date get Date write date write Space for int i SESSION length date length i 78 i write NON NLS 1 writeln Write out certain values found in System get Properties try String key eclipse build Id NON NLS 1 String value System get Property key unknown NON NLS 1 writeln key value NON NLS 1 key java fullversion NON NLS 1 value System get Property key if value null key java version NON NLS 1 value System get Property key writeln key value NON NLS 1 key java vendor NON NLS 1 value System get Property key writeln key value NON NLS 1 else writeln key value NON NLS 1 catch Exception e If we re not allowed to get the values of these properties then just skip over them The Bootloader has some information that we might be interested in write Boot Loader constants OS Environment Info get Default getOS NON NLS 1 write ARCH Environment Info get Default getOS Arch NON NLS 1 write WS Environment Info get Default getWS NON NLS 1 writeln NL Environment Info get Default getNL NON NLS 1 Add the command line arguments used to invoke the platform XXX this includes runtime private arguments should we do that String args Environment Info get Default get Non Framework Args if args null args length 0 write Command line arguments NON NLS 1 for int i 0 i args length i mask out the password argument for security if i 0 PASSWORD equals args i 1 write omitted NON NLS 1 else write args i NON NLS 1 writeln  writeSession IOException writeSpace getDate writeSpace getProperties buildId getProperty getProperty getProperty getProperty BootLoader EnvironmentInfo getDefault EnvironmentInfo getDefault getOSArch EnvironmentInfo getDefault EnvironmentInfo getDefault EnvironmentInfo getDefault getNonFrameworkArgs
Closes the Framework Log public void close try if writer null Writer tmp Writer writer writer null tmp Writer close catch IO Exception e e print Stack Trace  FrameworkLog tmpWriter tmpWriter IOException printStackTrace
protected void open File if writer null if out File null try writer log For Stream Secure Action get File Output Stream out File true catch IO Exception e writer log For Stream System err else writer log For Stream System err  openFile outFile logForStream SecureAction getFileOutputStream outFile IOException logForStream logForStream
protected void close File if out File null if writer null try writer close catch IO Exception e we cannot log here just print the stacktrace e print Stack Trace writer null  closeFile outFile IOException printStackTrace
public void log Framework Event framework Event Bundle b framework Event get Bundle Throwable t framework Event get Throwable Framework Log Entry log Entry new Framework Log Entry b get Location 0 0 Framework Event ERROR 0 t null NON NLS 1 NON NLS 2 log log Entry  FrameworkEvent frameworkEvent frameworkEvent getBundle frameworkEvent getThrowable FrameworkLogEntry logEntry FrameworkLogEntry getLocation FrameworkEvent logEntry
public synchronized void log Framework Log Entry log Entry if log Entry null return try open File if new Session write Session new Session false write Log 0 log Entry writer flush catch Exception e any exceptions during logging should be caught System err println An exception occurred while writing to the platform log NON NLS 1 e print Stack Trace System err System err println Logging to the console instead NON NLS 1 we failed to write so dump log entry to console instead try writer log For Stream System err write Log 0 log Entry writer flush catch Exception e2 System err println An exception occurred while logging to the console NON NLS 1 e2 print Stack Trace System err finally close File  FrameworkLogEntry logEntry logEntry openFile newSession writeSession newSession writeLog logEntry printStackTrace logForStream writeLog logEntry printStackTrace closeFile
public synchronized void set Writer Writer new Writer boolean append set Output null new Writer append  setWriter newWriter setOutput newWriter
public synchronized void set File File new File boolean append throws IO Exception set Output new File null append System get Properties put Eclipse Starter PROP LOGFILE new File get Absolute Path  setFile newFile IOException setOutput newFile getProperties EclipseStarter PROP_LOGFILE newFile getAbsolutePath
public synchronized File get File return out File  getFile outFile
public void set Console Log boolean console Log this console Log console Log  setConsoleLog consoleLog consoleLog consoleLog
private void set Output File new Out File Writer new Writer boolean append if new Out File null new Out File equals this out File if this writer null try this writer close catch IO Exception e e print Stack Trace this writer null Append old out File to new Writer We only attempt to do this if the current Writer is backed by a File and this is not a new session File old Out File this out File this out File new Out File this writer new Writer boolean copy Failed false if append old Out File null old Out File is File Reader file In null try open File file In new Input Stream Reader Secure Action get File Input Stream old Out File UTF 8 NON NLS 1 copy Reader file In this writer catch IO Exception e copy Failed true e print Stack Trace finally if file In null try file In close catch IO Exception e e print Stack Trace delete the old file if copying didn t fail if copy Failed old Out File delete close File  setOutput newOutFile newWriter newOutFile newOutFile outFile IOException printStackTrace outFile newWriter oldOutFile outFile outFile newOutFile newWriter copyFailed oldOutFile oldOutFile isFile fileIn openFile fileIn InputStreamReader SecureAction getFileInputStream oldOutFile copyReader fileIn IOException copyFailed printStackTrace fileIn fileIn IOException printStackTrace copyFailed oldOutFile closeFile
private void copy Reader Reader reader Writer writer throws IO Exception char buffer new char 1024 int count while count reader read buffer 0 buffer length 0 writer write buffer 0 count  copyReader IOException
protected String get Date try Date Format formatter new Simple Date Format MMM dd yyyy HH mm ss SS NON NLS 1 return formatter format new Date catch Exception e If there were problems writing out the date ignore and continue since that shouldn t stop us from logging the rest of the information return Long to String System current Time Millis  getDate DateFormat SimpleDateFormat toString currentTimeMillis
protected String get Stack Trace Throwable t if t null return null String Writer sw new String Writer Print Writer pw new Print Writer sw t print Stack Trace pw ensure the root exception is fully logged Throwable root get Root t if root null pw println Root exception NON NLS 1 root print Stack Trace pw return sw to String  getStackTrace StringWriter StringWriter PrintWriter PrintWriter printStackTrace getRoot printStackTrace toString
protected Writer log For Stream Output Stream output try return new Buffered Writer new Output Stream Writer output UTF 8 NON NLS 1 catch Unsupported Encoding Exception e return new Buffered Writer new Output Stream Writer output  logForStream OutputStream BufferedWriter OutputStreamWriter UnsupportedEncodingException BufferedWriter OutputStreamWriter
protected void write Log int depth Framework Log Entry entry throws IO Exception write Entry depth entry write Message entry write Stack entry Framework Log Entry children entry get Children if children null for int i 0 i children length i write Log depth 1 children i  writeLog FrameworkLogEntry IOException writeEntry writeMessage writeStack FrameworkLogEntry getChildren writeLog
protected void write Entry int depth Framework Log Entry entry throws IO Exception if depth 0 writeln write a blank line before all ENTRY tags bug 64406 write ENTRY else write SUBENTRY write Space write Integer to String depth write Space write entry get Entry write Space write get Date writeln  writeEntry FrameworkLogEntry IOException writeSpace toString writeSpace getEntry writeSpace getDate
protected void write Message Framework Log Entry entry throws IO Exception write MESSAGE write Space writeln entry get Message  writeMessage FrameworkLogEntry IOException writeSpace getMessage
protected void write Stack Framework Log Entry entry throws IO Exception Throwable t entry get Throwable if t null String stack get Stack Trace t write STACK write Space write Integer to String entry get Stack Code writeln write stack  writeStack FrameworkLogEntry IOException getThrowable getStackTrace writeSpace toString getStackCode
protected void write String message throws IO Exception if message null writer write message if console Log System out print message  IOException consoleLog
protected void writeln String s throws IO Exception write s writeln  IOException
protected void writeln throws IO Exception write LINE SEPARATOR  IOException LINE_SEPARATOR
protected void write Space throws IO Exception write NON NLS 1  writeSpace IOException

Launches the platform and runs a single application The application is either identified in the given arguments e g application ltapp id gt or in the code eclipse application code System property This convenience method starts up the platform runs the indicated application and then shuts down the platform The platform must not be running already param args the command line style arguments used to configure the platform param end Splash Handler the block of code to run to tear down the splash screen or code null code if no tear down is required return the result of running the application throws Exception if anything goes wrong public static Object run String args Runnable end Splash Handler throws Exception if running throw new Illegal State Exception Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP ALREADY RUNNING NON NLS 1 boolean startup Failed true try startup args end Splash Handler startup Failed false return run null catch Throwable e ensure the splash screen is down if end Splash Handler null end Splash Handler run may use startup Failed to understand where the error happened Framework Log Entry log Entry new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME startup Failed Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP STARTUP ERROR Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP APP ERROR 1 e null NON NLS 1 NON NLS 2 if log null log log log Entry log Unresolved Bundles context get Bundles else TODO desperate measure ideally we should write this to disk a la Main log e print Stack Trace finally try shutdown catch Throwable e Framework Log Entry log Entry new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP SHUTDOWN ERROR 1 e null NON NLS 1 if log null log log log Entry else TODO desperate measure ideally we should write this to disk a la Main log e print Stack Trace we only get here if an error happened System get Properties put PROP EXITCODE 13 NON NLS 1 System get Properties put PROP EXITDATA Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP ERROR CHECK LOG log get File get Path NON NLS 1 return null  endSplashHandler endSplashHandler IllegalStateException EclipseAdaptorMsg getString ECLIPSE_STARTUP_ALREADY_RUNNING startupFailed endSplashHandler startupFailed endSplashHandler endSplashHandler startupFailed FrameworkLogEntry logEntry FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME startupFailed EclipseAdaptorMsg getString ECLIPSE_STARTUP_STARTUP_ERROR EclipseAdaptorMsg getString ECLIPSE_STARTUP_APP_ERROR logEntry logUnresolvedBundles getBundles printStackTrace FrameworkLogEntry logEntry FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME EclipseAdaptorMsg getString ECLIPSE_STARTUP_SHUTDOWN_ERROR logEntry printStackTrace getProperties PROP_EXITCODE getProperties PROP_EXITDATA EclipseAdaptorMsg getString ECLIPSE_STARTUP_ERROR_CHECK_LOG getFile getPath
Returns true if the platform is already running false otherwise return whether or not the platform is already running public static boolean is Running return running  isRunning
protected static Framework Log create Framework Log Framework Log framework Log String log File Prop System get Property Eclipse Starter PROP LOGFILE if log File Prop null framework Log new Eclipse Log new File log File Prop else Location location Location Manager get Configuration Location File config Area Directory null if location null TODO assumes the URL is a file url config Area Directory new File location getURL get File if config Area Directory null String log File Name Long to String System current Time Millis Eclipse Adaptor F LOG File log File new File config Area Directory log File Name System get Properties put Eclipse Starter PROP LOGFILE log File get Absolute Path framework Log new Eclipse Log log File else framework Log new Eclipse Log if true equals System get Property Eclipse Starter PROP CONSOLE LOG NON NLS 1 framework Log set Console Log true return framework Log  FrameworkLog createFrameworkLog FrameworkLog frameworkLog logFileProp getProperty EclipseStarter PROP_LOGFILE logFileProp frameworkLog EclipseLog logFileProp LocationManager getConfigurationLocation configAreaDirectory configAreaDirectory getFile configAreaDirectory logFileName toString currentTimeMillis EclipseAdaptor F_LOG logFile configAreaDirectory logFileName getProperties EclipseStarter PROP_LOGFILE logFile getAbsolutePath frameworkLog EclipseLog logFile frameworkLog EclipseLog getProperty EclipseStarter PROP_CONSOLE_LOG frameworkLog setConsoleLog frameworkLog
Starts the platform and sets it up to run a single application The application is either identified in the given arguments e g application ltapp id gt or in the code eclipse application code System property The platform must not be running already p The given runnable if not code null code is used to tear down the splash screen if required p param args the arguments passed to the application throws Exception if anything goes wrong public static void startup String args Runnable end Splash Handler throws Exception if running throw new Illegal State Exception Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP ALREADY RUNNING NON NLS 1 long start 0 process Command Line args Location Manager initialize Locations log create Framework Log load Configuration Info load Default Properties finalize Properties adaptor create Adaptor Eclipse Adaptor adaptor set Log log OS Gi osgi new OS Gi adaptor osgi launch String console System get Property PROP CONSOLE if console null start Console osgi new String 0 console context osgi get Bundle Context publish Splash Screen end Splash Handler Bundle start Bundles load Basic Bundles set the framework start level to the ultimate value This will actually start things running if they are persistently active set Start Level get Start Level they should all be active by this time ensure Bundles Active start Bundles if debug log Unresolved Bundles context get Bundles running true  endSplashHandler IllegalStateException EclipseAdaptorMsg getString ECLIPSE_STARTUP_ALREADY_RUNNING processCommandLine LocationManager initializeLocations createFrameworkLog loadConfigurationInfo loadDefaultProperties finalizeProperties createAdaptor EclipseAdaptor setLog OSGi OSGi getProperty PROP_CONSOLE startConsole getBundleContext publishSplashScreen endSplashHandler startBundles loadBasicBundles setStartLevel getStartLevel ensureBundlesActive startBundles logUnresolvedBundles getBundles
private static int get Start Level String level System get Property PROP INITIAL STARTLEVEL if level null try return Integer parse Int level catch Number Format Exception e if debug System out println Start level level parsed Using hardcoded default 6 NON NLS 1 NON NLS 2 return 6 hard coded default value for legacy purposes  getStartLevel getProperty PROP_INITIAL_STARTLEVEL parseInt NumberFormatException
Runs the applicaiton for which the platform was started The platform must be running p The given argument is passed to the application being run If it is code null code then the command line arguments used in starting the platform and not consumed by the platform code are passed to the application as a code String code p param argument the argument passed to the application May be code null code return the result of running the application throws Exception if anything goes wrong public static Object run Object argument throws Exception if running throw new Illegal State Exception Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP NOT RUNNING NON NLS 1 if we are just initializing do not run the application just return if initialize return new Integer 0 initialize Application Tracker Parameterized Runnable application Parameterized Runnable application Tracker get Service application Tracker close if application null throw new Illegal State Exception Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP ERROR NO APPLICATION NON NLS 1 if debug String time String System get Property eclipse start Time NON NLS 1 long time time String null 0L Long parse Long time String System out println Starting application System current Time Millis time NON NLS 1 return application run argument  IllegalStateException EclipseAdaptorMsg getString ECLIPSE_STARTUP_NOT_RUNNING initializeApplicationTracker ParameterizedRunnable ParameterizedRunnable applicationTracker getService applicationTracker IllegalStateException EclipseAdaptorMsg getString ECLIPSE_STARTUP_ERROR_NO_APPLICATION timeString getProperty startTime timeString parseLong timeString currentTimeMillis
Shuts down the Platform The state of the Platform is not automatically saved before shutting down p On return the Platform will no longer be running but could be re launched with another call to startup If relaunching care must be taken to reinitialize any System properties which the platform uses e g osgi instance area as some policies in the platform do not allow resetting of such properties on subsequent runs p p Any objects handed out by running Platform including Platform runnables obtained via get Runnable will be permanently invalid The effects of attempting to invoke methods on invalid objects is undefined p throws Exception if anything goes wrong public static void shutdown throws Exception if running return stop System Bundle  getRunnable stopSystemBundle
private static void ensure Bundles Active Bundle bundles for int i 0 i bundles length i if bundles i get State Bundle ACTIVE String message Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP ERROR BUNDLE NOT ACTIVE bundles i NON NLS 1 throw new Illegal State Exception message  ensureBundlesActive getState EclipseAdaptorMsg getString ECLIPSE_STARTUP_ERROR_BUNDLE_NOT_ACTIVE IllegalStateException
private static void log Unresolved Bundles Bundle bundles State state adaptor get State Framework Log log Service adaptor get Framework Log State Helper state Helper adaptor get Platform Admin get State Helper for int i 0 i bundles length i if bundles i get State Bundle INSTALLED String general Message Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP ERROR BUNDLE NOT RESOLVED bundles i NON NLS 1 Bundle Description description state get Bundle bundles i get Bundle Id for some reason the state does not know about that bundle if description null continue Framework Log Entry log Children null Version Constraint unsatisfied state Helper get Unsatisfied Constraints description if unsatisfied length 0 the bundle wasn t resolved due to some of its constraints were unsatisfiable log Children new Framework Log Entry unsatisfied length for int j 0 j unsatisfied length j log Children j new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME Eclipse Adaptor Msg get Resolution Failure Message unsatisfied j 0 null null else if description get Symbolic Name null Bundle Description homonyms state get Bundles description get Symbolic Name for int j 0 j homonyms length j if homonyms j is Resolved log Children new Framework Log Entry 1 log Children 0 new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME Eclipse Adaptor Msg formatter get String ECLIPSE CONSOLE OTHER VERSION homonyms j get Location 0 null null NON NLS 1 log Service log new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME general Message 0 null log Children  logUnresolvedBundles getState FrameworkLog logService getFrameworkLog StateHelper stateHelper getPlatformAdmin getStateHelper getState generalMessage EclipseAdaptorMsg getString ECLIPSE_STARTUP_ERROR_BUNDLE_NOT_RESOLVED BundleDescription getBundle getBundleId FrameworkLogEntry logChildren VersionConstraint stateHelper getUnsatisfiedConstraints logChildren FrameworkLogEntry logChildren FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME EclipseAdaptorMsg getResolutionFailureMessage getSymbolicName BundleDescription getBundles getSymbolicName isResolved logChildren FrameworkLogEntry logChildren FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME EclipseAdaptorMsg getString ECLIPSE_CONSOLE_OTHER_VERSION getLocation logService FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME generalMessage logChildren
properties put name splashscreen NON NLS 1 NON NLS 2 Runnable handler new Runnable public void run Stats Manager done Booting end Splash Handler run  StatsManager doneBooting endSplashHandler
private static void publish Splash Screen final Runnable end Splash Handler Internal Platform now how to retrieve this later Dictionary properties new Hashtable properties put name splashscreen NON NLS 1 NON NLS 2 Runnable handler new Runnable public void run Stats Manager done Booting end Splash Handler run context register Service Runnable class get Name handler properties  publishSplashScreen endSplashHandler InternalPlatform StatsManager doneBooting endSplashHandler registerService getName
private static URL search For Bundle String name String parent throws MalformedURL Exception URL url null File file Location null boolean reference false try URL child new URL name url new URL new File parent toURL name catch MalformedURL Exception e TODO this is legacy support for non URL names It should be removed eventually if name was not a URL then construct one Assume it should be a reference and htat it is relative This support need not be robust as it is temporary File child new File name file Location child is Absolute child new File parent name url new URL REFERENCE PROTOCOL null file Location toURL to External Form reference true if the name was a URL then see if it is relative If so insert syspath if reference URL baseURL url if it is a reference URL then strip off the reference and set base to the file if url get Protocol equals REFERENCE PROTOCOL reference true String base Spec url get File if base Spec starts With FILE SCHEME File child new File base Spec substring 5 baseURL child is Absolute child toURL new File parent child get Path toURL else baseURL new URL base Spec file Location new File baseURL get File if the location is relative prefix it with the parent if file Location is Absolute file Location new File parent file Location to String If the result is a reference then search for the real result and reconstruct the answer if reference String result search For file Location get Name new File file Location get Parent get Absolute Path if result null url new URL REFERENCE PROTOCOL null FILE SCHEME result else return null finally we have something worth trying try URL Connection result url open Connection result connect return url catch IO Exception e int i location last Index Of   return i 1 location location substring 0 i return null  searchForBundle MalformedURLException fileLocation MalformedURLException fileLocation isAbsolute REFERENCE_PROTOCOL fileLocation toExternalForm getProtocol REFERENCE_PROTOCOL baseSpec getFile baseSpec startsWith FILE_SCHEME baseSpec isAbsolute getPath baseSpec fileLocation getFile fileLocation isAbsolute fileLocation fileLocation toString searchFor fileLocation getName fileLocation getParent getAbsolutePath REFERENCE_PROTOCOL FILE_SCHEME URLConnection openConnection IOException lastIndexOf _
private static Bundle load Basic Bundles throws IO Exception long start Time System current Time Millis String install Entries get Array From List System get Property PROP BUNDLES NON NLS 1 get the initial bundle list from the install Entries Initial Bundle initial Bundles get Initial Bundles install Entries get the list of currently installed initial bundles from the framework Bundle cur Init Bundles get Current Initial Bundles uninstall any of the currently installed bundles that do not exist in the initial bundle list from install Entries boolean refresh uninstall Bundles cur Init Bundles initial Bundles install the initial Bundles that are not already installed Array List new Init Bundles new Array List install Entries length Array List start Bundles new Array List install Entries length refresh install Bundles initial Bundles cur Init Bundles start Bundles new Init Bundles If we installed uninstalled something force a refresh of all installed bundles if refresh Bundle installed Bundles Bundle new Init Bundles to Array new Bundle new Init Bundles size refresh Packages installed Bundles schedule all basic bundles to be started Bundle start Init Bundles Bundle start Bundles to Array new Bundle start Bundles size start Bundles start Init Bundles if debug System out println Time to load bundles System current Time Millis start Time NON NLS 1 return start Init Bundles  loadBasicBundles IOException startTime currentTimeMillis installEntries getArrayFromList getProperty PROP_BUNDLES installEntries InitialBundle initialBundles getInitialBundles installEntries curInitBundles getCurrentInitialBundles installEntries uninstallBundles curInitBundles initialBundles initialBundles ArrayList newInitBundles ArrayList installEntries ArrayList startBundles ArrayList installEntries installBundles initialBundles curInitBundles startBundles newInitBundles installedBundles newInitBundles toArray newInitBundles refreshPackages installedBundles startInitBundles startBundles toArray startBundles startBundles startInitBundles currentTimeMillis startTime startInitBundles
private static Initial Bundle get Initial Bundles String install Entries throws MalformedURL Exception Array List result new Array List install Entries length int default Start Level Integer parse Int System get Property PROP BUNDLES STARTLEVEL String syspath get Sys Path for int i 0 i install Entries length i String name install Entries i int level default Start Level boolean start false int index name index Of if index 0 String attributes get Array From List name substring index 1 name length NON NLS 1 name name substring 0 index for int j 0 j attributes length j String attribute attributes j if attribute equals start NON NLS 1 start true else level Integer parse Int attribute URL location search For Bundle name syspath if location null Framework Log Entry entry new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP BUNDLE NOT FOUND install Entries i 0 null null NON NLS 1 log log entry skip this entry continue String location String INITIAL LOCATION location to External Form result add new Initial Bundle location String location level start return Initial Bundle result to Array new Initial Bundle result size  InitialBundle getInitialBundles installEntries MalformedURLException ArrayList ArrayList installEntries defaultStartLevel parseInt getProperty PROP_BUNDLES_STARTLEVEL getSysPath installEntries installEntries defaultStartLevel indexOf getArrayFromList parseInt searchForBundle FrameworkLogEntry FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME EclipseAdaptorMsg getString ECLIPSE_STARTUP_BUNDLE_NOT_FOUND installEntries locationString INITIAL_LOCATION toExternalForm InitialBundle locationString InitialBundle toArray InitialBundle
final Semaphore semaphore new Semaphore 0 Framework Listener listener new Framework Listener public void framework Event Framework Event event if event get Type Framework Event PACKAGES REFRESHED semaphore release  FrameworkListener FrameworkListener frameworkEvent FrameworkEvent getType FrameworkEvent PACKAGES_REFRESHED
private static void refresh Packages Bundle bundles if bundles length 0 return Service Reference package Admin Ref context get Service Reference Package Admin class get Name Package Admin package Admin null if package Admin Ref null package Admin Package Admin context get Service package Admin Ref if package Admin null return TODO this is such a hack it is silly There are still cases for race conditions etc but this should allow for some progress final Semaphore semaphore new Semaphore 0 Framework Listener listener new Framework Listener public void framework Event Framework Event event if event get Type Framework Event PACKAGES REFRESHED semaphore release context add Framework Listener listener package Admin refresh Packages bundles semaphore acquire context remove Framework Listener listener context unget Service package Admin Ref  refreshPackages ServiceReference packageAdminRef getServiceReference PackageAdmin getName PackageAdmin packageAdmin packageAdminRef packageAdmin PackageAdmin getService packageAdminRef packageAdmin FrameworkListener FrameworkListener frameworkEvent FrameworkEvent getType FrameworkEvent PACKAGES_REFRESHED addFrameworkListener packageAdmin refreshPackages removeFrameworkListener ungetService packageAdminRef
Invokes the OS Gi Console on another thread param osgi The current OS Gi instance for the console to attach to param console Args An String array containing commands from the command line for the console to execute param console Port the port on which to run the console Empty string implies the default port private static void start Console OS Gi osgi String console Args String console Port try String console Class Name System get Property PROP CONSOLE CLASS DEFAULT CONSOLE CLASS Class console Class Class for Name console Class Name Class parameter Types Object parameters if console Port length 0 parameter Types new Class OS Gi class String class parameters new Object osgi console Args else parameter Types new Class OS Gi class int class String class parameters new Object osgi new Integer console Port console Args Constructor constructor console Class get Constructor parameter Types Object console constructor new Instance parameters Thread t new Thread Runnable console CONSOLE NAME t start catch Number Format Exception nfe TODO log or something other than write on System err System err println Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP INVALID PORT console Port NON NLS 1 catch Exception ex System out println Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP FAILED FIND CONSOLE NAME NON NLS 1  OSGi OSGi consoleArgs consolePort startConsole OSGi consoleArgs consolePort consoleClassName getProperty PROP_CONSOLE_CLASS DEFAULT_CONSOLE_CLASS consoleClass forName consoleClassName parameterTypes consolePort parameterTypes OSGi consoleArgs parameterTypes OSGi consolePort consoleArgs consoleClass getConstructor parameterTypes newInstance CONSOLE_NAME NumberFormatException EclipseAdaptorMsg getString ECLIPSE_STARTUP_INVALID_PORT consolePort EclipseAdaptorMsg getString ECLIPSE_STARTUP_FAILED_FIND CONSOLE_NAME
Creates and returns the adaptor return a Framework Adaptor object private static Framework Adaptor create Adaptor throws Exception String adaptor Class Name System get Property PROP ADAPTOR DEFAULT ADAPTOR CLASS Class adaptor Class Class for Name adaptor Class Name Class constructor Args new Class String class Constructor constructor adaptor Class get Constructor constructor Args return Framework Adaptor constructor new Instance new Object new String 0  FrameworkAdaptor FrameworkAdaptor createAdaptor adaptorClassName getProperty PROP_ADAPTOR DEFAULT_ADAPTOR_CLASS adaptorClass forName adaptorClassName constructorArgs adaptorClass getConstructor constructorArgs FrameworkAdaptor newInstance
private static String process Command Line String args throws Exception Environment Info all Args args if args length 0 Environment Info framework Args args Environment Info app Args args return args int config Args new int args length config Args 0 1 need to initialize the first element to something that could not be an index int config Arg Index 0 for int i 0 i args length i boolean found false check for args without parameters i e a flag arg check if debug should be enabled for the entire platform If this is the last arg or there is a following arg i e arg 1 has a leading simply enable debug Otherwise assume that that the following arg is actually the filename of an options file This will be processed below if args i equals Ignore Case DEBUG i 1 args length i 1 args length args i 1 starts With NON NLS 1 System get Properties put PROP DEBUG NON NLS 1 debug true found true check if development mode should be enabled for the entire platform If this is the last arg or there is a following arg i e arg 1 has a leading simply enable development mode Otherwise assume that that the following arg is actually some additional development time class path entries This will be processed below if args i equals Ignore Case DEV i 1 args length i 1 args length args i 1 starts With NON NLS 1 System get Properties put PROP DEV NON NLS 1 found true look for the initialization arg if args i equals Ignore Case INITIALIZE initialize true found true look for the clean flag if args i equals Ignore Case CLEAN System get Properties put PROP CLEAN true NON NLS 1 found true look for the console Log flag if args i equals Ignore Case CONSOLE LOG System get Properties put PROP CONSOLE LOG true NON NLS 1 found true look for the console with no port if args i equals Ignore Case CONSOLE i 1 args length i 1 args length args i 1 starts With NON NLS 1 System get Properties put PROP CONSOLE NON NLS 1 found true if found config Args config Arg Index i continue check for args with parameters If we are at the last argument or if the next one has a as the first character then we can t have an arg with a parm so continue if i args length 1 args i 1 starts With NON NLS 1 continue String arg args i look for the console and port if args i 1 equals Ignore Case CONSOLE System get Properties put PROP CONSOLE arg found true look for the configuration location if args i 1 equals Ignore Case CONFIGURATION System get Properties put Location Manager PROP CONFIG AREA arg found true look for the data location for this instance if args i 1 equals Ignore Case DATA System get Properties put Location Manager PROP INSTANCE AREA arg found true look for the user location for this instance if args i 1 equals Ignore Case USER System get Properties put Location Manager PROP USER AREA arg found true look for the development mode and class path entries if args i 1 equals Ignore Case DEV System get Properties put PROP DEV arg found true look for the debug mode and option file location if args i 1 equals Ignore Case DEBUG System get Properties put PROP DEBUG arg debug true found true look for the window system if args i 1 equals Ignore Case WS System get Properties put PROP WS arg found true look for the operating system if args i 1 equals Ignore Case OS System get Properties put PROP OS arg found true look for the system architecture if args i 1 equals Ignore Case ARCH System get Properties put PROP ARCH arg found true look for the nationality language if args i 1 equals Ignore Case NL System get Properties put PROP NL arg found true done checking for args Remember where an arg was found if found config Args config Arg Index i 1 config Args config Arg Index i remove all the arguments consumed by this argument parsing if config Arg Index 0 Environment Info framework Args new String 0 Environment Info app Args args return args Environment Info app Args new String args length config Arg Index Environment Info framework Args new String config Arg Index config Arg Index 0 int j 0 int k 0 for int i 0 i args length i if i config Args config Arg Index Environment Info framework Args k args i config Arg Index else Environment Info app Args j args i return Environment Info app Args  processCommandLine EnvironmentInfo allArgs EnvironmentInfo frameworkArgs EnvironmentInfo appArgs configArgs configArgs configArgIndex equalsIgnoreCase startsWith getProperties PROP_DEBUG equalsIgnoreCase startsWith getProperties PROP_DEV equalsIgnoreCase equalsIgnoreCase getProperties PROP_CLEAN consoleLog equalsIgnoreCase CONSOLE_LOG getProperties PROP_CONSOLE_LOG equalsIgnoreCase startsWith getProperties PROP_CONSOLE configArgs configArgIndex startsWith equalsIgnoreCase getProperties PROP_CONSOLE equalsIgnoreCase getProperties LocationManager PROP_CONFIG_AREA equalsIgnoreCase getProperties LocationManager PROP_INSTANCE_AREA equalsIgnoreCase getProperties LocationManager PROP_USER_AREA equalsIgnoreCase getProperties PROP_DEV equalsIgnoreCase getProperties PROP_DEBUG equalsIgnoreCase getProperties PROP_WS equalsIgnoreCase getProperties PROP_OS equalsIgnoreCase getProperties PROP_ARCH equalsIgnoreCase getProperties PROP_NL configArgs configArgIndex configArgs configArgIndex configArgIndex EnvironmentInfo frameworkArgs EnvironmentInfo appArgs EnvironmentInfo appArgs configArgIndex EnvironmentInfo frameworkArgs configArgIndex configArgIndex configArgs configArgIndex EnvironmentInfo frameworkArgs configArgIndex EnvironmentInfo appArgs EnvironmentInfo appArgs
Returns the result of converting a list of comma separated tokens into an array return the array of string tokens param prop the initial comma separated string private static String get Array From List String prop String separator if prop null prop trim equals NON NLS 1 return new String 0 Vector list new Vector String Tokenizer tokens new String Tokenizer prop separator NON NLS 1 while tokens has More Tokens String token tokens next Token trim if token equals NON NLS 1 list add Element token return list is Empty new String 0 String list to Array new String list size  getArrayFromList StringTokenizer StringTokenizer hasMoreTokens nextToken addElement isEmpty toArray
protected static String get Sys Path String result System get Property PROP SYSPATH if result null return result URL url Eclipse Starter class get Protection Domain get Code Source get Location result url get File if result ends With NON NLS 1 result result substring 0 result length 1 result result substring 0 result last Index Of result result substring 0 result last Index Of if Character is Upper Case result char At 0 char chars result to Char Array chars 0 Character to Lower Case chars 0 result new String chars return result  getSysPath getProperty PROP_SYSPATH EclipseStarter getProtectionDomain getCodeSource getLocation getFile endsWith lastIndexOf lastIndexOf isUpperCase charAt toCharArray toLowerCase
private static Bundle get Current Initial Bundles Bundle installed context get Bundles Array List initial new Array List for int i 0 i installed length i Bundle bundle installed i if bundle get Location starts With INITIAL LOCATION initial add bundle return Bundle initial to Array new Bundle initial size  getCurrentInitialBundles getBundles ArrayList ArrayList getLocation startsWith INITIAL_LOCATION toArray
private static Bundle get Bundle By Location String location Bundle bundles for int i 0 i bundles length i Bundle bundle bundles i if location equals Ignore Case bundle get Location return bundle return null  getBundleByLocation equalsIgnoreCase getLocation
private static boolean uninstall Bundles Bundle cur Init Bundles Initial Bundle new Init Bundles boolean uninstalled Bundle false for int i 0 i cur Init Bundles length i boolean found false for int j 0 j new Init Bundles length j if cur Init Bundles i get Location equals Ignore Case new Init Bundles j location String found true break if found try cur Init Bundles i uninstall uninstalled Bundle true catch Bundle Exception e Framework Log Entry entry new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP FAILED UNINSTALL cur Init Bundles i get Location 0 e null NON NLS 1 log log entry return uninstalled Bundle  uninstallBundles curInitBundles InitialBundle newInitBundles uninstalledBundle curInitBundles newInitBundles curInitBundles getLocation equalsIgnoreCase newInitBundles locationString curInitBundles uninstalledBundle BundleException FrameworkLogEntry FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME EclipseAdaptorMsg getString ECLIPSE_STARTUP_FAILED_UNINSTALL curInitBundles getLocation uninstalledBundle
private static boolean install Bundles Initial Bundle initial Bundles Bundle cur Init Bundles Array List start Bundles Array List new Init Bundles boolean installed false Service Reference reference context get Service Reference Start Level class get Name Start Level start Service null if reference null start Service Start Level context get Service reference for int i 0 i initial Bundles length i Bundle osgi Bundle get Bundle By Location initial Bundles i location String cur Init Bundles try don t need to install if it is already installed if osgi Bundle null Input Stream in initial Bundles i location open Stream osgi Bundle context install Bundle initial Bundles i location String in installed true if initial Bundles i level 0 start Service null start Service set Bundle Start Level osgi Bundle initial Bundles i level if initial Bundles i start start Bundles add osgi Bundle new Init Bundles add osgi Bundle catch Bundle Exception e Framework Log Entry entry new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP FAILED INSTALL initial Bundles i location 0 e null NON NLS 1 log log entry catch IO Exception e Framework Log Entry entry new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP FAILED INSTALL initial Bundles i location 0 e null NON NLS 1 log log entry context unget Service reference return installed  installBundles InitialBundle initialBundles curInitBundles ArrayList startBundles ArrayList newInitBundles ServiceReference getServiceReference StartLevel getName StartLevel startService startService StartLevel getService initialBundles osgiBundle getBundleByLocation initialBundles locationString curInitBundles osgiBundle InputStream initialBundles openStream osgiBundle installBundle initialBundles locationString initialBundles startService startService setBundleStartLevel osgiBundle initialBundles initialBundles startBundles osgiBundle newInitBundles osgiBundle BundleException FrameworkLogEntry FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME EclipseAdaptorMsg getString ECLIPSE_STARTUP_FAILED_INSTALL initialBundles IOException FrameworkLogEntry FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME EclipseAdaptorMsg getString ECLIPSE_STARTUP_FAILED_INSTALL initialBundles ungetService
private static void start Bundles Bundle bundles for int i 0 i bundles length i Bundle bundle bundles i if bundle get State Bundle INSTALLED throw new Illegal State Exception Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP ERROR BUNDLE NOT RESOLVED bundle get Location NON NLS 1 try bundle start catch Bundle Exception e Framework Log Entry entry new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME Eclipse Adaptor Msg formatter get String ECLIPSE STARTUP FAILED START bundle get Location 0 e null NON NLS 1 log log entry  startBundles getState IllegalStateException EclipseAdaptorMsg getString ECLIPSE_STARTUP_ERROR_BUNDLE_NOT_RESOLVED getLocation BundleException FrameworkLogEntry FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME EclipseAdaptorMsg getString ECLIPSE_STARTUP_FAILED_START getLocation
private static void initialize Application Tracker Filter filter null try String app Class Parameterized Runnable class get Name filter context create Filter object Class app Class eclipse application NON NLS 1 NON NLS 2 catch Invalid Syntax Exception e ignore this It should never happen as we have tested the above format application Tracker new Service Tracker context filter null application Tracker open  initializeApplicationTracker appClass ParameterizedRunnable getName createFilter objectClass appClass InvalidSyntaxException applicationTracker ServiceTracker applicationTracker
private static void load Configuration Info Location config Area Location Manager get Configuration Location if config Area null return URL location null try location new URL config Area getURL to External Form Location Manager CONFIG FILE catch MalformedURL Exception e its ok Thie should never happen merge Properties System get Properties load Properties location  loadConfigurationInfo configArea LocationManager getConfigurationLocation configArea configArea toExternalForm LocationManager CONFIG_FILE MalformedURLException mergeProperties getProperties loadProperties
private static void load Default Properties URL code Location Eclipse Starter class get Protection Domain get Code Source get Location if code Location null return String location code Location get File if location ends With NON NLS 1 location location substring 0 location length 1 int i location last Index Of location location substring 0 i 1 Location Manager ECLIPSE PROPERTIES URL result null try result new File location toURL catch MalformedURL Exception e its ok Thie should never happen merge Properties System get Properties load Properties result  loadDefaultProperties codeLocation EclipseStarter getProtectionDomain getCodeSource getLocation codeLocation codeLocation getFile endsWith lastIndexOf LocationManager ECLIPSE_PROPERTIES MalformedURLException mergeProperties getProperties loadProperties
private static Properties load Properties URL location Properties result new Properties if location null return result try Input Stream in location open Stream try result load in finally in close catch IO Exception e its ok if there is no file We ll just use the defaults for everything TODO but it might be nice to log something with gentle wording i e it is not an error return result  loadProperties InputStream openStream IOException
private static void merge Properties Properties destination Properties source for Enumeration e source keys e has More Elements String key String e next Element String value source get Property key if destination get Property key null destination put key value  mergeProperties hasMoreElements nextElement getProperty getProperty
final Semaphore semaphore new Semaphore 0 Framework Listener listener new Framework Listener public void framework Event Framework Event event if event get Type Framework Event STARTLEVEL CHANGED semaphore release  FrameworkListener FrameworkListener frameworkEvent FrameworkEvent getType FrameworkEvent STARTLEVEL_CHANGED
private static void stop System Bundle throws Bundle Exception if context null running return Bundle system Bundle context get Bundle 0 if system Bundle get State Bundle ACTIVE final Semaphore semaphore new Semaphore 0 Framework Listener listener new Framework Listener public void framework Event Framework Event event if event get Type Framework Event STARTLEVEL CHANGED semaphore release context add Framework Listener listener system Bundle stop semaphore acquire context remove Framework Listener listener context null application Tracker null running false  stopSystemBundle BundleException systemBundle getBundle systemBundle getState FrameworkListener FrameworkListener frameworkEvent FrameworkEvent getType FrameworkEvent STARTLEVEL_CHANGED addFrameworkListener systemBundle removeFrameworkListener applicationTracker
final Semaphore semaphore new Semaphore 0 Framework Listener listener new Framework Listener public void framework Event Framework Event event if event get Type Framework Event STARTLEVEL CHANGED start Level get Start Level value semaphore release  FrameworkListener FrameworkListener frameworkEvent FrameworkEvent getType FrameworkEvent STARTLEVEL_CHANGED startLevel getStartLevel
private static void set Start Level final int value Service Tracker tracker new Service Tracker context Start Level class get Name null tracker open final Start Level start Level Start Level tracker get Service final Semaphore semaphore new Semaphore 0 Framework Listener listener new Framework Listener public void framework Event Framework Event event if event get Type Framework Event STARTLEVEL CHANGED start Level get Start Level value semaphore release context add Framework Listener listener start Level set Start Level value semaphore acquire context remove Framework Listener listener tracker close  setStartLevel ServiceTracker ServiceTracker StartLevel getName StartLevel startLevel StartLevel getService FrameworkListener FrameworkListener frameworkEvent FrameworkEvent getType FrameworkEvent STARTLEVEL_CHANGED startLevel getStartLevel addFrameworkListener startLevel setStartLevel removeFrameworkListener
Searches for the given target directory starting in the plugins subdirectory of the given location If one is found then this location is returned otherwise an exception is thrown return the location where target directory was found param start the location to begin searching private static String search For final String target String start String candidates new File start list if candidates null return null String result null Object max Version null for int i 0 i candidates length i File candidate new File start candidates i if candidate get Name equals target candidate get Name starts With target   NON NLS 1 continue String name candidate get Name String version NON NLS 1 Note directory with version suffix is always than directory without version suffix int index name index Of   if index 1 version name substring index 1 Object current Version get Version Elements version if max Version null result candidate get Absolute Path max Version current Version else if compare Version Object max Version Object current Version 0 result candidate get Absolute Path max Version current Version if result null return null return result replace File separator Char NON NLS 1  searchFor maxVersion getName getName startsWith _ getName indexOf _ currentVersion getVersionElements maxVersion getAbsolutePath maxVersion currentVersion compareVersion maxVersion currentVersion getAbsolutePath maxVersion currentVersion separatorChar
Do a quick parse of version identifier so its elements can be correctly compared If we are unable to parse the full version remaining elements are initialized with suitable defaults return an array of size 4 first three elements are of type Integer representing major minor and service and the fourth element is of type String representing qualifier Note that returning anything else will cause exceptions in the caller private static Object get Version Elements String version Object result new Integer 0 new Integer 0 new Integer 0 NON NLS 1 String Tokenizer t new String Tokenizer version NON NLS 1 String token int i 0 while t has More Tokens i 4 token t next Token if i 3 major minor or service numeric values try result i new Integer token catch Exception e invalid number format use default numbers 0 for the rest break else qualifier string value result i token return result  getVersionElements StringTokenizer StringTokenizer hasMoreTokens nextToken
Compares version strings return result of comparison as integer code 0 code if left right code 0 code if left right code 0 code if left right private static int compare Version Object left Object right int result Integer left 0 compare To Integer right 0 compare major if result 0 return result result Integer left 1 compare To Integer right 1 compare minor if result 0 return result result Integer left 2 compare To Integer right 2 compare service if result 0 return result return String left 3 compare To String right 3 compare qualifier  compareVersion compareTo compareTo compareTo compareTo
private static String build Command Line String arg String value String Buffer result new String Buffer 300 String entry System get Property PROP VM if entry null return null result append entry result append n append the vmargs and commands Assume that these already end in n entry System get Property PROP VMARGS if entry null result append entry entry System get Property PROP COMMANDS if entry null result append entry String command Line result to String int i command Line index Of arg n NON NLS 1 if i 0 command Line arg n value n NON NLS 1 NON NLS 2 else i arg length 1 String left command Line substring 0 i int j command Line index Of n i String right command Line substring j command Line left value right return command Line  buildCommandLine StringBuffer StringBuffer getProperty PROP_VM getProperty PROP_VMARGS getProperty PROP_COMMANDS commandLine toString commandLine indexOf commandLine commandLine commandLine indexOf commandLine commandLine commandLine
private static void finalize Properties if check config is unknown and we are in dev mode if System get Property PROP DEV null System get Property PROP CHECK CONFIG null System get Properties put PROP CHECK CONFIG true NON NLS 1  finalizeProperties getProperty PROP_DEV getProperty PROP_CHECK_CONFIG getProperties PROP_CHECK_CONFIG
Initial Bundle String location String URL location int level boolean start this location String location String this location location this level level this start start  InitialBundle locationString locationString locationString

private static final String INTERNAL ARCH I386 i386 NON NLS 1 private Environment Info super setup System Context  INTERNAL_ARCH_I386 EnvironmentInfo setupSystemContext
public static Environment Info get Default if singleton null singleton new Environment Info return singleton  EnvironmentInfo getDefault EnvironmentInfo
public boolean in Development Mode return System get Property osgi dev null NON NLS 1  inDevelopmentMode getProperty
public boolean in Debug Mode return System get Property osgi debug null NON NLS 1  inDebugMode getProperty
public String get Command Line Args return all Args  getCommandLineArgs allArgs
public String get Framework Args return framework Args  getFrameworkArgs frameworkArgs
public String get Non Framework Args return app Args  getNonFrameworkArgs appArgs
public String getOS Arch return arch  getOSArch
public String getNL return nl 
public String getOS return os 
public String getWS return ws 
Initializes the execution context for this run of the platform The context includes information about the locale operating system and window system NOTE The OS WS and ARCH values should never be null The executable should be setting these values and therefore this code path is obsolete for Eclipse when run from the executable private void setup System Context if the user didn t set the locale with a command line argument then use the default nl System get Property osgi nl NON NLS 1 if nl null String Tokenizer tokenizer new String Tokenizer nl   NON NLS 1 int segments tokenizer count Tokens try Locale user Locale null switch segments case 1 use the 2 arg constructor to maintain compatibility with 1 3 1 user Locale new Locale tokenizer next Token NON NLS 1 break case 2 user Locale new Locale tokenizer next Token tokenizer next Token break case 3 user Locale new Locale tokenizer next Token tokenizer next Token tokenizer next Token break default if the user passed us in a bogus value then log a message and use the default System err println Eclipse Adaptor Msg formatter get String error badNL nl NON NLS 1 user Locale Locale get Default break Locale set Default user Locale catch No Such Element Exception e fall through and use the default nl Locale get Default to String System get Properties put osgi nl nl NON NLS 1 if the user didn t set the operating system with a command line argument then use the default os System get Property osgi os NON NLS 1 if os null String name System get Property os name NON NLS 1 check to see if the VM returned Windows 98 or some other flavour which should be converted to win32 if name region Matches true 0 Constants OS WIN32 0 3 os Constants OS WIN32 EXCEPTION All mappings of SunOS convert to Solaris if os null os name equals Ignore Case INTERNAL OS SUNOS Constants OS SOLARIS Constants OS UNKNOWN System get Properties put osgi os os NON NLS 1 if the user didn t set the window system with a command line argument then use the default ws System get Property osgi ws NON NLS 1 if ws null setup default values for known O Ses if nothing was specified if os equals Constants OS WIN32 ws Constants WS WIN32 else if os equals Constants OS LINUX ws Constants WS MOTIF else if os equals Constants OS MACOSX ws Constants WS CARBON else if os equals Constants OS HPUX ws Constants WS MOTIF else if os equals Constants OS AIX ws Constants WS MOTIF else if os equals Constants OS SOLARIS ws Constants WS MOTIF else ws Constants WS UNKNOWN System get Properties put osgi ws ws NON NLS 1 if the user didn t set the system architecture with a command line argument then use the default arch System get Property osgi arch NON NLS 1 if arch null String name System get Property os arch NON NLS 1 Map i386 architecture to x86 arch name equals Ignore Case INTERNAL ARCH I386 Constants ARCH X86 name System get Properties put osgi arch arch NON NLS 1  setupSystemContext getProperty StringTokenizer StringTokenizer _ countTokens userLocale userLocale nextToken userLocale nextToken nextToken userLocale nextToken nextToken nextToken EclipseAdaptorMsg getString userLocale getDefault setDefault userLocale NoSuchElementException getDefault toString getProperties getProperty getProperty regionMatches OS_WIN32 OS_WIN32 equalsIgnoreCase INTERNAL_OS_SUNOS OS_SOLARIS OS_UNKNOWN getProperties getProperty OSes OS_WIN32 WS_WIN32 OS_LINUX WS_MOTIF OS_MACOSX WS_CARBON OS_HPUX WS_MOTIF OS_AIX WS_MOTIF OS_SOLARIS WS_MOTIF WS_UNKNOWN getProperties getProperty getProperty equalsIgnoreCase INTERNAL_ARCH_I386 ARCH_X86 getProperties

public interface I Plugin Info public Map get Libraries  IPluginInfo getLibraries
public Map get Libraries public String get Libraries Name  getLibraries getLibrariesName
public String get Libraries Name public Array List get Requires  getLibrariesName ArrayList getRequires
public Array List get Requires public String get Master Id  ArrayList getRequires getMasterId
public String get Master Id public String get Master Version  getMasterId getMasterVersion
public String get Master Version public String get Master Match  getMasterVersion getMasterMatch
public String get Master Match public String get Plugin Class  getMasterMatch getPluginClass
public String get Plugin Class public String get Unique Id  getPluginClass getUniqueId
public String get Unique Id public String get Version  getUniqueId getVersion
public String get Version public boolean is Fragment  getVersion isFragment
public boolean is Fragment public Set get Package Filters  isFragment getPackageFilters
public Set get Package Filters public String get Plugin Name  getPackageFilters getPluginName
public String get Plugin Name public String get Provider Name  getPluginName getProviderName
public String get Provider Name public boolean is Singleton  getProviderName isSingleton
public boolean is Singleton String validate Form  isSingleton validateForm

public static URL buildURL String spec boolean trailing Slash if spec null return null boolean is File spec starts With file NON NLS 1 try if is File return adjust Trailing Slash new File spec substring 5 toURL trailing Slash else return new URL spec catch MalformedURL Exception e if we failed and it is a file spec there is nothing more we can do otherwise try to make the spec into a file URL if is File return null try return adjust Trailing Slash new File spec toURL trailing Slash catch MalformedURL Exception e1 return null  trailingSlash isFile startsWith isFile adjustTrailingSlash trailingSlash MalformedURLException isFile adjustTrailingSlash trailingSlash MalformedURLException
private static URL adjust Trailing Slash URL url boolean trailing Slash throws MalformedURL Exception String file url get File if trailing Slash file ends With NON NLS 1 return url file trailing Slash file file substring 0 file length 1 NON NLS 1 return new URL url get Protocol url get Host file  adjustTrailingSlash trailingSlash MalformedURLException getFile trailingSlash endsWith trailingSlash getProtocol getHost
private static void munge Configuration Location if the config property was set munge it for backwards compatibility String location System get Property PROP CONFIG AREA if location null location buildURL location false to External Form if location ends With cfg NON NLS 1 int index location last Index Of location location substring 0 index 1 if location ends With NON NLS 1 location NON NLS 1 System get Properties put PROP CONFIG AREA location  mungeConfigurationLocation getProperty PROP_CONFIG_AREA toExternalForm endsWith lastIndexOf endsWith getProperties PROP_CONFIG_AREA
public static void initialize Locations Location temp build Location PROP USER AREA DEFAULT null false NON NLS 1 URL default Location temp null null temp getURL if default Location null default Location buildURL new File System get Property PROP USER HOME user get Absolute Path true NON NLS 1 user Location build Location PROP USER AREA default Location false NON NLS 1 temp build Location PROP INSTANCE AREA DEFAULT null false NON NLS 1 default Location temp null null temp getURL if default Location null default Location buildURL new File System get Property PROP USER DIR workspace get Absolute Path true NON NLS 1 instance Location build Location PROP INSTANCE AREA default Location false NON NLS 1 munge Configuration Location compute a default but it is very unlikely to be used since main will have computed everything temp build Location PROP CONFIG AREA DEFAULT null false NON NLS 1 default Location temp null null temp getURL if default Location null default Location buildURL compute Default Configuration Location true configuration Location build Location PROP CONFIG AREA default Location false NON NLS 1 get the parent location based on the system property This will have been set on the way in either by the caller user or by main There will be no parent location if we are not cascaded URL parent Location compute Shared Configuration Location if parent Location null parent Location equals configuration Location getURL Location parent new Basic Location null parent Location true Basic Location configuration Location set Parent parent initialize Derived Configuration Locations assumes that the property is already set install Location build Location PROP INSTALL AREA null null true  initializeLocations buildLocation PROP_USER_AREA_DEFAULT defaultLocation defaultLocation defaultLocation getProperty PROP_USER_HOME getAbsolutePath userLocation buildLocation PROP_USER_AREA defaultLocation buildLocation PROP_INSTANCE_AREA_DEFAULT defaultLocation defaultLocation defaultLocation getProperty PROP_USER_DIR getAbsolutePath instanceLocation buildLocation PROP_INSTANCE_AREA defaultLocation mungeConfigurationLocation buildLocation PROP_CONFIG_AREA_DEFAULT defaultLocation defaultLocation defaultLocation computeDefaultConfigurationLocation configurationLocation buildLocation PROP_CONFIG_AREA defaultLocation parentLocation computeSharedConfigurationLocation parentLocation parentLocation configurationLocation BasicLocation parentLocation BasicLocation configurationLocation setParent initializeDerivedConfigurationLocations installLocation buildLocation PROP_INSTALL_AREA
private static Location build Location String property URL default Location String user Default Appendage boolean read Only Basic Location result null String location System get Property property System get Properties remove property if the instance location is not set predict where the workspace will be and put the instance area inside the workspace meta area if location null result new Basic Location property default Location read Only else if location equals Ignore Case NONE return null else if location equals Ignore Case NO DEFAULT result new Basic Location property null read Only else if location starts With USER HOME String base substitute Var location USER HOME PROP USER HOME location new File base user Default Appendage get Absolute Path else if location starts With USER DIR String base substitute Var location USER DIR PROP USER DIR location new File base user Default Appendage get Absolute Path URL url buildURL location true if url null result new Basic Location property null read Only result setURL url false return result  buildLocation defaultLocation userDefaultAppendage readOnly BasicLocation getProperty getProperties BasicLocation defaultLocation readOnly equalsIgnoreCase equalsIgnoreCase NO_DEFAULT BasicLocation readOnly startsWith USER_HOME substituteVar USER_HOME PROP_USER_HOME userDefaultAppendage getAbsolutePath startsWith USER_DIR substituteVar USER_DIR PROP_USER_DIR userDefaultAppendage getAbsolutePath BasicLocation readOnly
private static String substitute Var String source String var String prop String value System get Property prop return value source substring var length  substituteVar getProperty
private static void initialize Derived Configuration Locations if System get Property PROP MANIFEST CACHE null System get Properties put PROP MANIFEST CACHE get Configuration File MANIFESTS DIR get Absolute Path  initializeDerivedConfigurationLocations getProperty PROP_MANIFEST_CACHE getProperties PROP_MANIFEST_CACHE getConfigurationFile MANIFESTS_DIR getAbsolutePath
private static URL compute Install Configuration Location String property System get Property PROP INSTALL AREA try return new URL property catch MalformedURL Exception e do nothing here since it is basically impossible to get a bogus url return null  computeInstallConfigurationLocation getProperty PROP_INSTALL_AREA MalformedURLException
private static URL compute Shared Configuration Location String property System get Property PROP SHARED CONFIG AREA if property null return null try return new URL property catch MalformedURL Exception e do nothing here since it is basically impossible to get a bogus url return null  computeSharedConfigurationLocation getProperty PROP_SHARED_CONFIG_AREA MalformedURLException
private static String compute Default Configuration Location 1 We store the config state relative to the eclipse directory if possible 2 If this directory is read only we store the state in user home eclipse application id   version where user home is unique for each local user and application id is the one defined in eclipseproduct marker file If eclipseproduct does not exist use eclipse as the application id URL installURL compute Install Configuration Location File install Dir new File installURL get File if file equals installURL get Protocol install Dir can Write NON NLS 1 return new File install Dir CONFIG DIR get Absolute Path We can t write in the eclipse install dir so try for some place in the user s home dir return compute Default User Area Location CONFIG DIR  computeDefaultConfigurationLocation _ computeInstallConfigurationLocation installDir getFile getProtocol installDir canWrite installDir CONFIG_DIR getAbsolutePath computeDefaultUserAreaLocation CONFIG_DIR
private static String compute Default User Area Location String path Appendage we store the state in user home eclipse application id   version where user home is unique for each local user and application id is the one defined in eclipseproduct marker file If eclipseproduct does not exist use eclipse as the application id String install Property System get Property PROP INSTALL AREA URL installURL buildURL install Property true if installURL null return null File install Dir new File installURL get File String app Name ECLIPSE NON NLS 1 File eclipse Product new File install Dir PRODUCT SITE MARKER if eclipse Product exists Properties props new Properties try props load new File Input Stream eclipse Product String app Id props get Property PRODUCT SITE ID if app Id null app Id trim length 0 app Id ECLIPSE String app Version props get Property PRODUCT SITE VERSION if app Version null app Version trim length 0 app Version NON NLS 1 app Name File separator app Id   app Version NON NLS 1 catch IO Exception e Do nothing if we get an exception We will default to a standard location in the user s home dir String user Home System get Property PROP USER HOME return new File user Home app Name path Appendage get Absolute Path NON NLS 1  computeDefaultUserAreaLocation pathAppendage _ installProperty getProperty PROP_INSTALL_AREA installProperty installDir getFile appName eclipseProduct installDir PRODUCT_SITE_MARKER eclipseProduct FileInputStream eclipseProduct appId getProperty PRODUCT_SITE_ID appId appId appId appVersion getProperty PRODUCT_SITE_VERSION appVersion appVersion appVersion appName appId _ appVersion IOException userHome getProperty PROP_USER_HOME userHome appName pathAppendage getAbsolutePath
public static Location get User Location return user Location  getUserLocation userLocation
public static Location get Configuration Location return configuration Location  getConfigurationLocation configurationLocation
public static Location get Install Location return install Location  getInstallLocation installLocation
public static Location get Instance Location return instance Location  getInstanceLocation instanceLocation
public static File getOS Gi Configuration Dir TODO assumes the URL is a file url return new File configuration Location getURL get File Framework Adaptor FRAMEWORK SYMBOLICNAME  getOSGiConfigurationDir configurationLocation getFile FrameworkAdaptor FRAMEWORK_SYMBOLICNAME
public static File get Configuration File String filename File dir getOS Gi Configuration Dir if dir exists dir mkdirs return new File dir filename  getConfigurationFile getOSGiConfigurationDir

public interface Locker public boolean lock throws IO Exception  IOException
public boolean lock throws IO Exception public void release  IOException

private Random Access File lockRAF public Locker JavaIo File lock File this lock File lock File  RandomAccessFile Locker_JavaIo lockFile lockFile lockFile
public synchronized boolean lock throws IO Exception if the lock file already exists try to delete assume failure means another eclipse has it open if lock File exists lock File delete if lock File exists return false open the lock file so other instances can t co exist lockRAF new Random Access File lock File rw NON NLS 1 lockRAF write Byte 0 return true  IOException lockFile lockFile lockFile RandomAccessFile lockFile writeByte
public synchronized void release try if lockRAF null lockRAF close lockRAF null catch IO Exception e don t complain we re making a best effort to clean up if lock File null lock File delete  IOException lockFile lockFile

private File Output Stream file Stream public Locker JavaNio File lock File this lock File lock File  FileOutputStream fileStream Locker_JavaNio lockFile lockFile lockFile
public synchronized boolean lock throws IO Exception file Stream new File Output Stream lock File true try file Lock file Stream get Channel try Lock catch IO Exception ioe log the original exception if debugging if Basic Location DEBUG String basic Message Eclipse Adaptor Msg formatter get String location cannot Lock lock File NON NLS 1 Framework Log Entry basic Entry new Framework Log Entry Eclipse Adaptor FRAMEWORK SYMBOLICNAME basic Message 0 ioe null Eclipse Adaptor get Default get Framework Log log basic Entry produce a more specific message for clients String specific Message Eclipse Adaptor Msg formatter get String location cannot LockNIO new Object lock File ioe get Message Basic Location PROP OSGI LOCKING NON NLS 1 throw new IO Exception specific Message if file Lock null return true file Stream close file Stream null return false  IOException fileStream FileOutputStream lockFile fileLock fileStream getChannel tryLock IOException BasicLocation basicMessage EclipseAdaptorMsg getString cannotLock lockFile FrameworkLogEntry basicEntry FrameworkLogEntry EclipseAdaptor FRAMEWORK_SYMBOLICNAME basicMessage EclipseAdaptor getDefault getFrameworkLog basicEntry specificMessage EclipseAdaptorMsg getString cannotLockNIO lockFile getMessage BasicLocation PROP_OSGI_LOCKING IOException specificMessage fileLock fileStream fileStream
public synchronized void release if file Lock null try file Lock release catch IO Exception e don t complain we re making a best effort to clean up file Lock null if file Stream null try file Stream close catch IO Exception e don t complain we re making a best effort to clean up file Stream null  fileLock fileLock IOException fileLock fileStream fileStream IOException fileStream

private static final String WS LIST org eclipse osgi service environment Constants WS CARBON org eclipse osgi service environment Constants WS GTK org eclipse osgi service environment Constants WS MOTIF org eclipse osgi service environment Constants WS PHOTON org eclipse osgi service environment Constants WS WIN32 public static Plugin Converter Impl get Default return instance  WS_LIST WS_CARBON WS_GTK WS_MOTIF WS_PHOTON WS_WIN32 PluginConverterImpl getDefault
public Plugin Converter Impl this null  PluginConverterImpl
Plugin Converter Impl Bundle Context context this context context instance this  PluginConverterImpl BundleContext
private void init need to make sure these fields are cleared out for each conversion out null plugin Info null plugin Manifest Location null generated Manifest new Hashtable 10 manifest Type Eclipse Bundle Data MANIFEST TYPE UNKNOWN target null  pluginInfo pluginManifestLocation generatedManifest manifestType EclipseBundleData MANIFEST_TYPE_UNKNOWN
private void fill Plugin Info File plugin Base Location throws Plugin Conversion Exception plugin Manifest Location plugin Base Location if plugin Manifest Location null throw new Illegal Argument Exception URL plugin File find Plugin Manifest plugin Base Location if plugin File null throw new Plugin Conversion Exception Eclipse Adaptor Msg formatter get String ECLIPSE CONVERTER FILENOTFOUND plugin Base Location get Absolute Path NON NLS 1 plugin Info parse Plugin Info plugin File String validation plugin Info validate Form if validation null throw new Plugin Conversion Exception validation  fillPluginInfo pluginBaseLocation PluginConversionException pluginManifestLocation pluginBaseLocation pluginManifestLocation IllegalArgumentException pluginFile findPluginManifest pluginBaseLocation pluginFile PluginConversionException EclipseAdaptorMsg getString ECLIPSE_CONVERTER_FILENOTFOUND pluginBaseLocation getAbsolutePath pluginInfo parsePluginInfo pluginFile pluginInfo validateForm PluginConversionException
private Set filter Export Collection export To Filter Collection filter if filter null filter contains NON NLS 1 return Set export To Filter Set filtered Export new Hash Set export To Filter size for Iterator iter export To Filter iterator iter has Next String an Export String iter next for Iterator iter2 filter iterator iter2 has Next String a Filter String iter2 next int dot Star a Filter index Of NON NLS 1 if dot Star 1 a Filter a Filter substring 0 dot Star if an Export equals a Filter filtered Export add an Export break return filtered Export  filterExport exportToFilter exportToFilter filteredExport HashSet exportToFilter exportToFilter hasNext anExport hasNext aFilter dotStar aFilter indexOf dotStar aFilter aFilter dotStar anExport aFilter filteredExport anExport filteredExport
private Array List findOS Jars File plugin Root String path boolean filter path path substring 4 Array List found new Array List 0 for int i 0 i OS LIST length i look for os osname path String searched Path os OS LIST i path NON NLS 1 NON NLS 2 if new File plugin Root searched Path exists found add searched Path filter os WS LIST i NON NLS 1 NON NLS 2 NON NLS 3 look for os osname archname path for int j 0 j ARCH LIST length j searched Path os OS LIST i ARCH LIST j path NON NLS 1 NON NLS 2 NON NLS 3 if new File plugin Root searched Path exists found add searched Path filter os WS LIST i arch ARCH LIST j NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 return found  ArrayList findOSJars pluginRoot ArrayList ArrayList OS_LIST searchedPath OS_LIST pluginRoot searchedPath searchedPath WS_LIST ARCH_LIST searchedPath OS_LIST ARCH_LIST pluginRoot searchedPath searchedPath WS_LIST ARCH_LIST
private URL find Plugin Manifest File base Location Here we can not use the bundlefile because it may explode the jar and returns a location from which we will not be able to derive the jars location URL xml File Location Input Stream stream null URL baseURL null try if base Location get Name ends With jar NON NLS 1 baseURL new URL jar file base Location to String NON NLS 1 NON NLS 2 manifest Type Eclipse Bundle Data MANIFEST TYPE JAR else baseURL base Location toURL catch MalformedURL Exception e1 this can t happen since we are building the urls ourselves from a file try xml File Location new URL baseURL PLUGIN MANIFEST stream xml File Location open Stream manifest Type Eclipse Bundle Data MANIFEST TYPE PLUGIN return xml File Location catch MalformedURL Exception e Framework Log Entry entry new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME e get Message 0 e null Eclipse Adaptor get Default get Framework Log log entry return null catch IO Exception ioe ignore finally try if stream null stream close catch IO Exception e ignore try xml File Location new URL baseURL FRAGMENT MANIFEST xml File Location open Stream manifest Type Eclipse Bundle Data MANIFEST TYPE FRAGMENT return xml File Location catch MalformedURL Exception e Framework Log Entry entry new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME e get Message 0 e null Eclipse Adaptor get Default get Framework Log log entry return null catch IO Exception ioe Ignore finally try if stream null stream close catch IO Exception e ignore return null  findPluginManifest baseLocation xmlFileLocation InputStream baseLocation getName endsWith baseLocation toString manifestType EclipseBundleData MANIFEST_TYPE_JAR baseLocation MalformedURLException xmlFileLocation PLUGIN_MANIFEST xmlFileLocation openStream manifestType EclipseBundleData MANIFEST_TYPE_PLUGIN xmlFileLocation MalformedURLException FrameworkLogEntry FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME getMessage EclipseAdaptor getDefault getFrameworkLog IOException IOException xmlFileLocation FRAGMENT_MANIFEST xmlFileLocation openStream manifestType EclipseBundleData MANIFEST_TYPE_FRAGMENT xmlFileLocation MalformedURLException FrameworkLogEntry FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME getMessage EclipseAdaptor getDefault getFrameworkLog IOException IOException
private Array List findWS Jars File plugin Root String path boolean filter path path substring 4 Array List found new Array List 0 for int i 0 i WS LIST length i String searched Path ws WS LIST i path NON NLS 1 if new File plugin Root searched Path exists found add searched Path filter ws WS LIST i NON NLS 1 NON NLS 2 NON NLS 3 return found  ArrayList findWSJars pluginRoot ArrayList ArrayList WS_LIST searchedPath WS_LIST pluginRoot searchedPath searchedPath WS_LIST
protected void fill Manifest boolean compatibility Manifest boolean analyse Jars generate Manifest Version generate Headers generate Classpath generate Activator generate Plugin Class if analyse Jars generate Provide Package generate Require Bundle generate Localization Entry generate Eclipse Headers if compatibility Manifest generate Timestamp  fillManifest compatibilityManifest analyseJars generateManifestVersion generateHeaders generateClasspath generateActivator generatePluginClass analyseJars generateProvidePackage generateRequireBundle generateLocalizationEntry generateEclipseHeaders compatibilityManifest generateTimestamp
public void write Manifest File generation Location Dictionary manifest To Write boolean compatibility Manifest throws Plugin Conversion Exception try File parent File new File generation Location get Parent parent File mkdirs generation Location create New File if generation Location is File String message Eclipse Adaptor Msg formatter get String ECLIPSE CONVERTER ERROR CREATING BUNDLE MANIFEST this plugin Info get Unique Id generation Location NON NLS 1 throw new Plugin Conversion Exception message replaces any eventual existing file manifest To Write new Hashtable Map manifest To Write MANIFEST MF files must be written using UTF 8 out new Buffered Writer new Output Stream Writer new File Output Stream generation Location UTF 8 write Entry MANIFEST VERSION String manifest To Write remove MANIFEST VERSION write Entry GENERATED FROM String manifest To Write remove GENERATED FROM Need to do this first upto Date check expect the generated from tag to be in the first line write Entry Constants BUNDLE NAME String manifest To Write remove Constants BUNDLE NAME write Entry Constants BUNDLE SYMBOLICNAME String manifest To Write remove Constants BUNDLE SYMBOLICNAME write Entry Constants BUNDLE VERSION String manifest To Write remove Constants BUNDLE VERSION write Entry Constants BUNDLE CLASSPATH String manifest To Write remove Constants BUNDLE CLASSPATH write Entry Constants BUNDLE ACTIVATOR String manifest To Write remove Constants BUNDLE ACTIVATOR write Entry Constants BUNDLE VENDOR String manifest To Write remove Constants BUNDLE VENDOR write Entry Constants FRAGMENT HOST String manifest To Write remove Constants FRAGMENT HOST write Entry Constants BUNDLE LOCALIZATION String manifest To Write remove Constants BUNDLE LOCALIZATION write Entry Constants PROVIDE PACKAGE String manifest To Write remove Constants PROVIDE PACKAGE write Entry Constants REQUIRE BUNDLE String manifest To Write remove Constants REQUIRE BUNDLE Enumeration keys manifest To Write keys while keys has More Elements String key String keys next Element write Entry key String manifest To Write get key out flush catch IO Exception e String message Eclipse Adaptor Msg formatter get String ECLIPSE CONVERTER ERROR CREATING BUNDLE MANIFEST this plugin Info get Unique Id generation Location NON NLS 1 throw new Plugin Conversion Exception message e finally if out null try out close catch IO Exception e only report problems writing to flushing the file  writeManifest generationLocation manifestToWrite compatibilityManifest PluginConversionException parentFile generationLocation getParent parentFile generationLocation createNewFile generationLocation isFile EclipseAdaptorMsg getString ECLIPSE_CONVERTER_ERROR_CREATING_BUNDLE_MANIFEST pluginInfo getUniqueId generationLocation PluginConversionException manifestToWrite manifestToWrite BufferedWriter OutputStreamWriter FileOutputStream generationLocation UTF_8 writeEntry MANIFEST_VERSION manifestToWrite MANIFEST_VERSION writeEntry GENERATED_FROM manifestToWrite GENERATED_FROM uptoDate writeEntry BUNDLE_NAME manifestToWrite BUNDLE_NAME writeEntry BUNDLE_SYMBOLICNAME manifestToWrite BUNDLE_SYMBOLICNAME writeEntry BUNDLE_VERSION manifestToWrite BUNDLE_VERSION writeEntry BUNDLE_CLASSPATH manifestToWrite BUNDLE_CLASSPATH writeEntry BUNDLE_ACTIVATOR manifestToWrite BUNDLE_ACTIVATOR writeEntry BUNDLE_VENDOR manifestToWrite BUNDLE_VENDOR writeEntry FRAGMENT_HOST manifestToWrite FRAGMENT_HOST writeEntry BUNDLE_LOCALIZATION manifestToWrite BUNDLE_LOCALIZATION writeEntry PROVIDE_PACKAGE manifestToWrite PROVIDE_PACKAGE writeEntry REQUIRE_BUNDLE manifestToWrite REQUIRE_BUNDLE manifestToWrite hasMoreElements nextElement writeEntry manifestToWrite IOException EclipseAdaptorMsg getString ECLIPSE_CONVERTER_ERROR_CREATING_BUNDLE_MANIFEST pluginInfo getUniqueId generationLocation PluginConversionException IOException
private void generate Localization Entry generated Manifest put Constants BUNDLE LOCALIZATION PLUGIN PROPERTIES FILENAME  generateLocalizationEntry generatedManifest BUNDLE_LOCALIZATION PLUGIN_PROPERTIES_FILENAME
private void generate Manifest Version generated Manifest put MANIFEST VERSION 1 0 NON NLS 1 NON NLS 2  generateManifestVersion generatedManifest MANIFEST_VERSION
private boolean require Runtime Compatibility Array List require List plugin Info get Requires for Iterator iter require List iterator iter has Next if Plugin Parser Prerequisite iter next get Name equals Ignore Case PI RUNTIME COMPATIBILITY return true return false  requireRuntimeCompatibility ArrayList requireList pluginInfo getRequires requireList hasNext PluginParser getName equalsIgnoreCase PI_RUNTIME_COMPATIBILITY
private void generate Activator if plugin Info is Fragment if require Runtime Compatibility String plugin Class plugin Info get Plugin Class if plugin Class null plugin Class trim equals NON NLS 1 generated Manifest put Constants BUNDLE ACTIVATOR plugin Class else generated Manifest put Constants BUNDLE ACTIVATOR COMPATIBILITY ACTIVATOR  generateActivator pluginInfo isFragment requireRuntimeCompatibility pluginClass pluginInfo getPluginClass pluginClass pluginClass generatedManifest BUNDLE_ACTIVATOR pluginClass generatedManifest BUNDLE_ACTIVATOR COMPATIBILITY_ACTIVATOR
private void generate Classpath String classpath plugin Info get Libraries Name if classpath length 0 generated Manifest put Constants BUNDLE CLASSPATH get String From Array classpath LIST SEPARATOR  generateClasspath pluginInfo getLibrariesName generatedManifest BUNDLE_CLASSPATH getStringFromArray LIST_SEPARATOR
private void generate Headers generated Manifest put Constants BUNDLE NAME plugin Info get Plugin Name generated Manifest put Constants BUNDLE VERSION plugin Info get Version generated Manifest put Constants BUNDLE SYMBOLICNAME get Symbolic Name Entry String provider plugin Info get Provider Name if provider null generated Manifest put Constants BUNDLE VENDOR provider if plugin Info is Fragment String Buffer host Bundle new String Buffer host Bundle append plugin Info get Master Id String version Range get Version Range plugin Info get Master Version plugin Info get Master Match TODO need to get match rule here if version Range null host Bundle append version Range generated Manifest put Constants FRAGMENT HOST host Bundle to String  generateHeaders generatedManifest BUNDLE_NAME pluginInfo getPluginName generatedManifest BUNDLE_VERSION pluginInfo getVersion generatedManifest BUNDLE_SYMBOLICNAME getSymbolicNameEntry pluginInfo getProviderName generatedManifest BUNDLE_VENDOR pluginInfo isFragment StringBuffer hostBundle StringBuffer hostBundle pluginInfo getMasterId versionRange getVersionRange pluginInfo getMasterVersion pluginInfo getMasterMatch versionRange hostBundle versionRange generatedManifest FRAGMENT_HOST hostBundle toString
private String get Symbolic Name Entry false is the default so don t bother adding anything if plugin Info is Singleton return plugin Info get Unique Id String Buffer result new String Buffer plugin Info get Unique Id result append SEMICOLON NON NLS 1 result append Constants SINGLETON ATTRIBUTE result append true NON NLS 1 return result to String  getSymbolicNameEntry pluginInfo isSingleton pluginInfo getUniqueId StringBuffer StringBuffer pluginInfo getUniqueId SINGLETON_ATTRIBUTE toString
private void generate Plugin Class if require Runtime Compatibility String plugin Class plugin Info get Plugin Class if plugin Class null generated Manifest put Eclipse Adaptor PLUGIN CLASS plugin Class  generatePluginClass requireRuntimeCompatibility pluginClass pluginInfo getPluginClass pluginClass generatedManifest EclipseAdaptor PLUGIN_CLASS pluginClass
private void generate Provide Package Set exports get Exports if exports null exports size 0 generated Manifest put Constants PROVIDE PACKAGE get String From Collection exports LIST SEPARATOR  generateProvidePackage getExports generatedManifest PROVIDE_PACKAGE getStringFromCollection LIST_SEPARATOR
private void generate Require Bundle Array List required Bundles plugin Info get Requires if required Bundles size 0 return String Buffer bundle Require new String Buffer for Iterator iter required Bundles iterator iter has Next Plugin Parser Prerequisite element Plugin Parser Prerequisite iter next String Buffer mod Import new String Buffer element get Name String version Range get Version Range element get Version element get Match if version Range null mod Import append version Range if element is Exported mod Import append append Constants REPROVIDE ATTRIBUTE append true NON NLS 1 if element is Optional mod Import append append Constants OPTIONAL ATTRIBUTE append true NON NLS 1 bundle Require append mod Import to String if iter has Next bundle Require append LIST SEPARATOR generated Manifest put Constants REQUIRE BUNDLE bundle Require to String  generateRequireBundle ArrayList requiredBundles pluginInfo getRequires requiredBundles StringBuffer bundleRequire StringBuffer requiredBundles hasNext PluginParser PluginParser StringBuffer modImport StringBuffer getName versionRange getVersionRange getVersion getMatch versionRange modImport versionRange isExported modImport REPROVIDE_ATTRIBUTE isOptional modImport OPTIONAL_ATTRIBUTE bundleRequire modImport toString hasNext bundleRequire LIST_SEPARATOR generatedManifest REQUIRE_BUNDLE bundleRequire toString
private void generate Timestamp so it is easy to tell which ones are generated generated Manifest put GENERATED FROM Long to String get Time Stamp plugin Manifest Location manifest Type MANIFEST TYPE ATTRIBUTE manifest Type NON NLS 1 NON NLS 2  generateTimestamp generatedManifest GENERATED_FROM toString getTimeStamp pluginManifestLocation manifestType MANIFEST_TYPE_ATTRIBUTE manifestType
private void generate Eclipse Headers if plugin Info is Fragment generated Manifest put Eclipse Adaptor ECLIPSE AUTOSTART true NON NLS 1  generateEclipseHeaders pluginInfo isFragment generatedManifest EclipseAdaptor ECLIPSE_AUTOSTART
private Set get Exports Map libs plugin Info get Libraries if libs null return null If we are in dev mode then add the binary folders on the list libs with the export clause set to be the cumulation of the export clause of the real libs if Dev Class Path Helper in Development Mode String dev Class Path Dev Class Path Helper get Dev Class Path plugin Info get Unique Id collect export clauses List all Export Clauses new Array List libs size Set lib Entries libs entry Set for Iterator iter lib Entries iterator iter has Next Map Entry element Map Entry iter next all Export Clauses add All List element get Value if dev Class Path null for int i 0 i dev Class Path length i libs put dev Class Path i all Export Clauses Set result new Hash Set 7 Set lib Entries libs entry Set for Iterator iter lib Entries iterator iter has Next Map Entry element Map Entry iter next List filter List element get Value if filter size 0 If the library is not exported then ignore it continue File library Location new File plugin Manifest Location String element get Key Set exports null if library Location exists if library Location is File exports filter Export get Exports FromJAR library Location filter TODO Need to handle xx variables else if library Location is Directory exports filter Export get Exports From Dir library Location filter else Array List expanded Libs get Libraries Expanding Variables String element get Key false exports new Hash Set for Iterator iterator expanded Libs iterator iterator has Next String lib Name String iterator next File lib File new File plugin Manifest Location lib Name if lib File is File exports add All filter Export get Exports FromJAR lib File filter if exports null result add All exports return result  getExports pluginInfo getLibraries DevClassPathHelper inDevelopmentMode devClassPath DevClassPathHelper getDevClassPath pluginInfo getUniqueId allExportClauses ArrayList libEntries entrySet libEntries hasNext allExportClauses addAll getValue devClassPath devClassPath devClassPath allExportClauses HashSet libEntries entrySet libEntries hasNext getValue libraryLocation pluginManifestLocation getKey libraryLocation libraryLocation isFile filterExport getExportsFromJAR libraryLocation libraryLocation isDirectory filterExport getExportsFromDir libraryLocation ArrayList expandedLibs getLibrariesExpandingVariables getKey HashSet expandedLibs hasNext libName libFile pluginManifestLocation libName libFile isFile addAll filterExport getExportsFromJAR libFile addAll
private Set get Exports From Dir File location return get Exports From Dir location NON NLS 1  getExportsFromDir getExportsFromDir
private Set get Exports From Dir File location String package Name String prefix package Name length 0 package Name NON NLS 1 String files location list Set exported Paths new Hash Set boolean contains File false for int i 0 i files length i if is Valid Package Name files i continue File pkg File new File location files i if pkg File is Directory exported Paths add All get Exports From Dir pkg File prefix files i else contains File true if contains File Allow the default package to be provided If the default package contains a File then use as the package name to provide for default if package Name length 0 exported Paths add package Name else exported Paths add DOT return exported Paths  getExportsFromDir packageName packageName packageName exportedPaths HashSet containsFile isValidPackageName pkgFile pkgFile isDirectory exportedPaths addAll getExportsFromDir pkgFile containsFile containsFile packageName exportedPaths packageName exportedPaths exportedPaths
private Set get Exports FromJAR File jar File Set names new Hash Set Jar File file null try file new Jar File jar File catch IO Exception e String message Eclipse Adaptor Msg formatter get String ECLIPSE CONVERTER PLUGIN LIBRARY IGNORED jar File plugin Info get Unique Id NON NLS 1 Eclipse Adaptor get Default get Framework Log log new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME message 0 e null return names Run through the entries for Enumeration enum file entries enum has More Elements Jar Entry entry Jar Entry enum next Element String name entry get Name if is Valid Package Name name continue int last Slash name last Index Of NON NLS 1 Ignore folders that do not contain files if last Slash 1 if last Slash name length 1 name last Index Of 1 names add name substring 0 last Slash replace else Allow the default package to be provided If the default package contains a File then use as the package name to provide for default names add DOT return names  getExportsFromJAR jarFile HashSet JarFile JarFile jarFile IOException EclipseAdaptorMsg getString ECLIPSE_CONVERTER_PLUGIN_LIBRARY_IGNORED jarFile pluginInfo getUniqueId EclipseAdaptor getDefault getFrameworkLog FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME hasMoreElements JarEntry JarEntry nextElement getName isValidPackageName lastSlash lastIndexOf lastSlash lastSlash lastIndexOf lastSlash
private Array List get Libraries Expanding Variables String library Path boolean filter String var has Prefix library Path if var null Array List return Value new Array List 1 return Value add library Path return return Value if var equals ws NON NLS 1 return findWS Jars plugin Manifest Location library Path filter if var equals os NON NLS 1 return findOS Jars plugin Manifest Location library Path filter return new Array List 0  ArrayList getLibrariesExpandingVariables libraryPath hasPrefix libraryPath ArrayList returnValue ArrayList returnValue libraryPath returnValue findWSJars pluginManifestLocation libraryPath findOSJars pluginManifestLocation libraryPath ArrayList
return a String representing the string found between the s private String has Prefix String lib Path if lib Path starts With ws NON NLS 1 return ws NON NLS 1 if lib Path starts With os NON NLS 1 return os NON NLS 1 if lib Path starts With nl NON NLS 1 return nl NON NLS 1 return null  hasPrefix libPath libPath startsWith libPath startsWith libPath startsWith
private boolean is Valid Package Name String name if name index Of 0 name equals Ignore Case META INF name starts With META INF NON NLS 1 NON NLS 2 return false return true  isValidPackageName indexOf equalsIgnoreCase startsWith
Parses the plugin manifest to find out the plug in unique identifier the plug in version runtime libraries entries the plug in class the master plugin for a fragment private I Plugin Info parse Plugin Info URL plugin Location throws Plugin Conversion Exception Input Stream input null try input new Buffered Input Stream plugin Location open Stream return new Plugin Parser context target parse Plugin input catch Exception e String message Eclipse Adaptor Msg formatter get String ECLIPSE CONVERTER ERROR PARSING PLUGIN MANIFEST plugin Manifest Location NON NLS 1 throw new Plugin Conversion Exception message e finally if input null try input close catch IO Exception e ignore exception  IPluginInfo parsePluginInfo pluginLocation PluginConversionException InputStream BufferedInputStream pluginLocation openStream PluginParser parsePlugin EclipseAdaptorMsg getString ECLIPSE_CONVERTER_ERROR_PARSING_PLUGIN_MANIFEST pluginManifestLocation PluginConversionException IOException
public static boolean up To Date File generation Location File plugin Location byte manifest Type if generation Location is File return false String second Line null Buffered Reader reader null try reader new Buffered Reader new Input Stream Reader new File Input Stream generation Location reader read Line second Line reader read Line catch IO Exception e not a big deal we could not read an existing manifest return false finally if reader null try reader close catch IO Exception e ignore String tag GENERATED FROM NON NLS 1 if second Line null second Line starts With tag return false second Line second Line substring tag length Manifest Element generated From try generated From Manifest Element parse Header Plugin Converter Impl GENERATED FROM second Line 0 catch Bundle Exception be return false String timestamp Str generated From get Value try return Long parse Long timestamp Str trim get Time Stamp plugin Location manifest Type catch Number Format Exception nfe not a big deal just a bogus existing manifest that will be ignored return false  upToDate generationLocation pluginLocation manifestType generationLocation isFile secondLine BufferedReader BufferedReader InputStreamReader FileInputStream generationLocation readLine secondLine readLine IOException IOException GENERATED_FROM secondLine secondLine startsWith secondLine secondLine ManifestElement generatedFrom generatedFrom ManifestElement parseHeader PluginConverterImpl GENERATED_FROM secondLine BundleException timestampStr generatedFrom getValue parseLong timestampStr getTimeStamp pluginLocation manifestType NumberFormatException
public static long get Time Stamp File plugin Location byte manifest Type if manifest Type Eclipse Bundle Data MANIFEST TYPE JAR 0 return plugin Location last Modified else if manifest Type Eclipse Bundle Data MANIFEST TYPE PLUGIN 0 return new File plugin Location PLUGIN MANIFEST last Modified else if manifest Type Eclipse Bundle Data MANIFEST TYPE FRAGMENT 0 return new File plugin Location FRAGMENT MANIFEST last Modified else if manifest Type Eclipse Bundle Data MANIFEST TYPE BUNDLE 0 return new File plugin Location Constants OSGI BUNDLE MANIFEST last Modified return 1  getTimeStamp pluginLocation manifestType manifestType EclipseBundleData MANIFEST_TYPE_JAR pluginLocation lastModified manifestType EclipseBundleData MANIFEST_TYPE_PLUGIN pluginLocation PLUGIN_MANIFEST lastModified manifestType EclipseBundleData MANIFEST_TYPE_FRAGMENT pluginLocation FRAGMENT_MANIFEST lastModified manifestType EclipseBundleData MANIFEST_TYPE_BUNDLE pluginLocation OSGI_BUNDLE_MANIFEST lastModified
private void write Entry String key String value throws IO Exception if value null value length 0 out write key value NON NLS 1 out new Line  writeEntry IOException newLine
private String get String From Array String values String separator if values null return NON NLS 1 String Buffer result new String Buffer for int i 0 i values length i if i 0 result append separator result append values i return result to String  getStringFromArray StringBuffer StringBuffer toString
private String get String From Collection Collection collection String separator String Buffer result new String Buffer boolean first true for Iterator i collection iterator i has Next if first first false else result append separator result append i next return result to String  getStringFromCollection StringBuffer StringBuffer hasNext toString
public synchronized Dictionary convert Manifest File plugin Base Location boolean compatibility String target boolean analyse Jars throws Plugin Conversion Exception if DEBUG System out println Convert plugin Base Location NON NLS 1 init this target target fill Plugin Info plugin Base Location fill Manifest compatibility analyse Jars return generated Manifest  convertManifest pluginBaseLocation analyseJars PluginConversionException pluginBaseLocation fillPluginInfo pluginBaseLocation fillManifest analyseJars generatedManifest
public synchronized File convert Manifest File plugin Base Location File bundle Manifest Location boolean compatibility Manifest String target boolean analyse Jars throws Plugin Conversion Exception if DEBUG System out println Convert plugin Base Location NON NLS 1 init this target target fill Plugin Info plugin Base Location if bundle Manifest Location null String cache Location String System get Properties get Location Manager PROP MANIFEST CACHE bundle Manifest Location new File cache Location plugin Info get Unique Id   plugin Info get Version MF NON NLS 1 fill Manifest compatibility Manifest analyse Jars if up To Date bundle Manifest Location plugin Manifest Location manifest Type return bundle Manifest Location write Manifest bundle Manifest Location generated Manifest compatibility Manifest return bundle Manifest Location  convertManifest pluginBaseLocation bundleManifestLocation compatibilityManifest analyseJars PluginConversionException pluginBaseLocation fillPluginInfo pluginBaseLocation bundleManifestLocation cacheLocation getProperties LocationManager PROP_MANIFEST_CACHE bundleManifestLocation cacheLocation pluginInfo getUniqueId _ pluginInfo getVersion fillManifest compatibilityManifest analyseJars upToDate bundleManifestLocation pluginManifestLocation manifestType bundleManifestLocation writeManifest bundleManifestLocation generatedManifest compatibilityManifest bundleManifestLocation
private String get Version Range String req Version String match Rule if req Version null return null Version min Version new Version req Version String version Range if match Rule null if match Rule equals Ignore Case I Model PLUGIN REQUIRES MATCH PERFECT version Range new Version Range min Version min Version to String else if match Rule equals Ignore Case I Model PLUGIN REQUIRES MATCH EQUIVALENT version Range new Version Range min Version new Version min Version get Major Component min Version get Minor Component 1 0 false to String NON NLS 1 else if match Rule equals Ignore Case I Model PLUGIN REQUIRES MATCH COMPATIBLE version Range new Version Range min Version new Version min Version get Major Component 1 0 0 false to String NON NLS 1 else if match Rule equals Ignore Case I Model PLUGIN REQUIRES MATCH GREATER OR EQUAL just return the req Version here without any version range version Range req Version else version Range new Version Range min Version new Version min Version get Major Component 1 0 0 false to String NON NLS 1 else version Range new Version Range min Version new Version min Version get Major Component 1 0 0 false to String NON NLS 1 String Buffer result new String Buffer result append append Constants BUNDLE VERSION ATTRIBUTE append result append append version Range append return result to String  getVersionRange reqVersion matchRule reqVersion minVersion reqVersion versionRange matchRule matchRule equalsIgnoreCase IModel PLUGIN_REQUIRES_MATCH_PERFECT versionRange VersionRange minVersion minVersion toString matchRule equalsIgnoreCase IModel PLUGIN_REQUIRES_MATCH_EQUIVALENT versionRange VersionRange minVersion minVersion getMajorComponent minVersion getMinorComponent toString matchRule equalsIgnoreCase IModel PLUGIN_REQUIRES_MATCH_COMPATIBLE versionRange VersionRange minVersion minVersion getMajorComponent toString matchRule equalsIgnoreCase IModel PLUGIN_REQUIRES_MATCH_GREATER_OR_EQUAL reqVersion versionRange reqVersion versionRange VersionRange minVersion minVersion getMajorComponent toString versionRange VersionRange minVersion minVersion getMajorComponent toString StringBuffer StringBuffer BUNDLE_VERSION_ATTRIBUTE versionRange toString

private static final String TARGET21 2 1 NON NLS 1 public boolean is Fragment return fragment  isFragment
public String to String return plugin id plugin Id version version libraries libraries class plugin Class master master Plugin Id master version master Version requires requires singleton singleton NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 NON NLS 6 NON NLS 7 NON NLS 8  toString pluginId pluginClass masterPluginId masterVersion
public Map get Libraries if libraries null return new Hash Map 0 return libraries  getLibraries HashMap
public Array List get Requires if TARGET21 equals target schema Version null requires Expanded requires Expanded true if requires null requires new Array List 1 requires add new Prerequisite Plugin Converter Impl PI RUNTIME TARGET21 false false I Model PLUGIN REQUIRES MATCH GREATER OR EQUAL requires add new Prerequisite Plugin Converter Impl PI RUNTIME COMPATIBILITY null false false null else Add elements on the requirement list of ui and help for int i 0 i requires size i Prerequisite analyzed Prerequisite requires get i if org eclipse ui equals analyzed get Name NON NLS 1 requires add i 1 new Prerequisite org eclipse ui workbench texteditor null true analyzed is Exported null NON NLS 1 requires add i 1 new Prerequisite org eclipse jface text null true analyzed is Exported null NON NLS 1 requires add i 1 new Prerequisite org eclipse ui editors null true analyzed is Exported null NON NLS 1 requires add i 1 new Prerequisite org eclipse ui views null true analyzed is Exported null NON NLS 1 requires add i 1 new Prerequisite org eclipse ui ide null true analyzed is Exported null NON NLS 1 else if org eclipse help equals analyzed get Name NON NLS 1 requires add i 1 new Prerequisite org eclipse help base null true analyzed is Exported null NON NLS 1 else if Plugin Converter Impl PI RUNTIME equals analyzed get Name compatibility Found requires add i 1 new Prerequisite Plugin Converter Impl PI RUNTIME COMPATIBILITY null false analyzed is Exported null if requires contains new Prerequisite Plugin Converter Impl PI RUNTIME COMPATIBILITY null false false null requires add new Prerequisite Plugin Converter Impl PI RUNTIME COMPATIBILITY null false false null Remove any prereq on runtime and add a prereq on runtime 2 1 This is used to recognize the version for which the given plugin was initially targeted Prerequisite runtime Prereq new Prerequisite Plugin Converter Impl PI RUNTIME null false false null requires remove runtime Prereq requires add new Prerequisite Plugin Converter Impl PI RUNTIME TARGET21 false false I Model PLUGIN REQUIRES MATCH GREATER OR EQUAL if requires null return requires new Array List 0 return requires  ArrayList getRequires schemaVersion requiresExpanded requiresExpanded ArrayList PluginConverterImpl PI_RUNTIME IModel PLUGIN_REQUIRES_MATCH_GREATER_OR_EQUAL PluginConverterImpl PI_RUNTIME_COMPATIBILITY getName isExported isExported isExported isExported isExported getName isExported PluginConverterImpl PI_RUNTIME getName compatibilityFound PluginConverterImpl PI_RUNTIME_COMPATIBILITY isExported PluginConverterImpl PI_RUNTIME_COMPATIBILITY PluginConverterImpl PI_RUNTIME_COMPATIBILITY runtimePrereq PluginConverterImpl PI_RUNTIME runtimePrereq PluginConverterImpl PI_RUNTIME IModel PLUGIN_REQUIRES_MATCH_GREATER_OR_EQUAL ArrayList
public String get Master Id return master Plugin Id  getMasterId masterPluginId
public String get Master Version return master Version  getMasterVersion masterVersion
public String get Master Match return master Match  getMasterMatch masterMatch
public String get Plugin Class return plugin Class  getPluginClass pluginClass
public String get Unique Id return plugin Id  getUniqueId pluginId
public String get Version return version  getVersion
public Set get Package Filters return filters  getPackageFilters
public String get Libraries Name if library Paths null return new String 0 return String library Paths to Array new String library Paths size  getLibrariesName libraryPaths libraryPaths toArray libraryPaths
public String get Plugin Name return plugin Name  getPluginName pluginName
public String get Provider Name return vendor  getProviderName
public boolean is Singleton return singleton  isSingleton
public String get Root return is Fragment FRAGMENT PLUGIN  getRoot isFragment
public String validate Form if this plugin Id null return Eclipse Adaptor Msg formatter get String ECLIPSE CONVERTER MISSING ATTRIBUTE new String get Root PLUGIN ID get Root NON NLS 1 if this plugin Name null return Eclipse Adaptor Msg formatter get String ECLIPSE CONVERTER MISSING ATTRIBUTE new String get Root PLUGIN NAME get Root NON NLS 1 if this version null return Eclipse Adaptor Msg formatter get String ECLIPSE CONVERTER MISSING ATTRIBUTE new String get Root PLUGIN VERSION get Root NON NLS 1 if is Fragment this master Plugin Id null return Eclipse Adaptor Msg formatter get String ECLIPSE CONVERTER MISSING ATTRIBUTE new String get Root FRAGMENT PLUGIN ID get Root NON NLS 1 if is Fragment this master Version null return Eclipse Adaptor Msg formatter get String ECLIPSE CONVERTER MISSING ATTRIBUTE new String get Root FRAGMENT PLUGIN VERSION get Root NON NLS 1 return null  validateForm pluginId EclipseAdaptorMsg getString ECLIPSE_CONVERTER_MISSING_ATTRIBUTE getRoot PLUGIN_ID getRoot pluginName EclipseAdaptorMsg getString ECLIPSE_CONVERTER_MISSING_ATTRIBUTE getRoot PLUGIN_NAME getRoot EclipseAdaptorMsg getString ECLIPSE_CONVERTER_MISSING_ATTRIBUTE getRoot PLUGIN_VERSION getRoot isFragment masterPluginId EclipseAdaptorMsg getString ECLIPSE_CONVERTER_MISSING_ATTRIBUTE getRoot FRAGMENT_PLUGIN_ID getRoot isFragment masterVersion EclipseAdaptorMsg getString ECLIPSE_CONVERTER_MISSING_ATTRIBUTE getRoot FRAGMENT_PLUGIN_VERSION getRoot
public Plugin Parser Bundle Context context String target super this context context this target target  PluginParser BundleContext
Receive a Locator object for document events p By default do nothing Application writers may override this method in a subclass if they wish to store the locator for use with other document events p param locator A locator for all SAX document events see org xml sax Content Handler set Document Locator org xml sax Locator see org xml sax Locator public void set Document Locator Locator locator this locator locator  ContentHandler setDocumentLocator setDocumentLocator
public void end Document  endDocument
public void end Element String uri String element Name String q Name switch Integer state Stack peek int Value case IGNORED ELEMENT STATE state Stack pop break case INITIAL STATE shouldn t get here internal Error Policy bind parse internal Stack element Name NON NLS 1 break case PLUGIN STATE case FRAGMENT STATE break case PLUGIN RUNTIME STATE if element Name equals RUNTIME state Stack pop break case PLUGIN REQUIRES STATE if element Name equals PLUGIN REQUIRES state Stack pop object Stack pop break case PLUGIN EXTENSION POINT STATE if element Name equals EXTENSION POINT state Stack pop break case PLUGIN EXTENSION STATE if element Name equals EXTENSION state Stack pop break case RUNTIME LIBRARY STATE if element Name equals LIBRARY String cur Library String object Stack pop if cur Library trim equals NON NLS 1 Vector exports Vector Vector object Stack pop if manifest Info libraries null manifest Info libraries new Hash Map 3 manifest Info library Paths new Array List 3 manifest Info libraries put cur Library exports Vector manifest Info library Paths add cur Library replace state Stack pop break case LIBRARY EXPORT STATE if element Name equals LIBRARY EXPORT state Stack pop break case PLUGIN REQUIRES IMPORT STATE if element Name equals PLUGIN REQUIRES IMPORT state Stack pop break  endElement elementName qName stateStack intValue IGNORED_ELEMENT_STATE stateStack INITIAL_STATE internalError internalStack elementName PLUGIN_STATE FRAGMENT_STATE PLUGIN_RUNTIME_STATE elementName stateStack PLUGIN_REQUIRES_STATE elementName PLUGIN_REQUIRES stateStack objectStack PLUGIN_EXTENSION_POINT_STATE elementName EXTENSION_POINT stateStack PLUGIN_EXTENSION_STATE elementName stateStack RUNTIME_LIBRARY_STATE elementName curLibrary objectStack curLibrary exportsVector objectStack manifestInfo manifestInfo HashMap manifestInfo libraryPaths ArrayList manifestInfo curLibrary exportsVector manifestInfo libraryPaths curLibrary stateStack LIBRARY_EXPORT_STATE elementName LIBRARY_EXPORT stateStack PLUGIN_REQUIRES_IMPORT_STATE elementName PLUGIN_REQUIRES_IMPORT stateStack
public void error SAX Parse Exception ex log Status ex  SAXParseException logStatus
public void fatal Error SAX Parse Exception ex throws SAX Exception log Status ex throw ex  fatalError SAXParseException SAXException logStatus
public void handle Extension Point State String element Name Attributes attributes nothing to do for extension points children state Stack push new Integer IGNORED ELEMENT STATE  handleExtensionPointState elementName stateStack IGNORED_ELEMENT_STATE
public void handle Extension State String element Name Attributes attributes nothing to do for extensions children state Stack push new Integer IGNORED ELEMENT STATE  handleExtensionState elementName stateStack IGNORED_ELEMENT_STATE
public void handle Initial State String element Name Attributes attributes if element Name equals PLUGIN state Stack push new Integer PLUGIN STATE parse Plugin Attributes attributes else if element Name equals FRAGMENT manifest Info fragment true state Stack push new Integer FRAGMENT STATE parse Fragment Attributes attributes else state Stack push new Integer IGNORED ELEMENT STATE internal Error element Name  handleInitialState elementName elementName stateStack PLUGIN_STATE parsePluginAttributes elementName manifestInfo stateStack FRAGMENT_STATE parseFragmentAttributes stateStack IGNORED_ELEMENT_STATE internalError elementName
public void handle Library Export State String element Name Attributes attributes All elements ignored state Stack push new Integer IGNORED ELEMENT STATE  handleLibraryExportState elementName stateStack IGNORED_ELEMENT_STATE
public void handle Library State String element Name Attributes attributes if element Name equals LIBRARY EXPORT Change State state Stack push new Integer LIBRARY EXPORT STATE The top element on the stack much be a library element String current Lib String object Stack peek if attributes null return String mask Value attributes get Value LIBRARY EXPORT MASK NON NLS 1 pop off the library already in current Lib object Stack pop Vector export Mask Vector object Stack peek push library back on object Stack push current Lib Split the export upfront if mask Value null String Tokenizer tok new String Tokenizer mask Value NON NLS 1 while tok has More Tokens String value tok next Token if export Mask contains mask Value export Mask add Element value trim return if element Name equals LIBRARY PACKAGES state Stack push new Integer IGNORED ELEMENT STATE return state Stack push new Integer IGNORED ELEMENT STATE internal Error element Name return  handleLibraryState elementName elementName LIBRARY_EXPORT stateStack LIBRARY_EXPORT_STATE currentLib objectStack maskValue getValue LIBRARY_EXPORT_MASK currentLib objectStack exportMask objectStack objectStack currentLib maskValue StringTokenizer StringTokenizer maskValue hasMoreTokens nextToken exportMask maskValue exportMask addElement elementName LIBRARY_PACKAGES stateStack IGNORED_ELEMENT_STATE stateStack IGNORED_ELEMENT_STATE internalError elementName
public void handle Plugin State String element Name Attributes attributes if element Name equals RUNTIME We should only have one Runtime element in a plugin or fragment Object what Is It object Stack peek if what Is It instanceof Plugin Info Plugin Info object Stack peek libraries null This is at least the 2nd Runtime element we have hit Ignore it state Stack push new Integer IGNORED ELEMENT STATE return state Stack push new Integer PLUGIN RUNTIME STATE Push a new vector to hold all the library entries object Stack push new Vector return if element Name equals PLUGIN REQUIRES state Stack push new Integer PLUGIN REQUIRES STATE Push a new vector to hold all the prerequisites object Stack push new Vector parse Requires Attributes attributes return if element Name equals EXTENSION POINT mark the plugin as singleton and ignore all elements under extension if there are any manifest Info singleton true state Stack push new Integer PLUGIN EXTENSION POINT STATE return if element Name equals EXTENSION mark the plugin as singleton and ignore all elements under extension if there are any manifest Info singleton true state Stack push new Integer PLUGIN EXTENSION STATE return If we get to this point the element name is one we don t currently accept Set the state to indicate that this element will be ignored state Stack push new Integer IGNORED ELEMENT STATE internal Error element Name  handlePluginState elementName elementName whatIsIt objectStack whatIsIt PluginInfo PluginInfo objectStack stateStack IGNORED_ELEMENT_STATE stateStack PLUGIN_RUNTIME_STATE objectStack elementName PLUGIN_REQUIRES stateStack PLUGIN_REQUIRES_STATE objectStack parseRequiresAttributes elementName EXTENSION_POINT manifestInfo stateStack PLUGIN_EXTENSION_POINT_STATE elementName manifestInfo stateStack PLUGIN_EXTENSION_STATE stateStack IGNORED_ELEMENT_STATE internalError elementName
public void handle Requires Import State String element Name Attributes attributes All elements ignored state Stack push new Integer IGNORED ELEMENT STATE  handleRequiresImportState elementName stateStack IGNORED_ELEMENT_STATE
public void handle Requires State String element Name Attributes attributes if element Name equals PLUGIN REQUIRES IMPORT parse Plugin Requires Import attributes return If we get to this point the element name is one we don t currently accept Set the state to indicate that this element will be ignored state Stack push new Integer IGNORED ELEMENT STATE internal Error element Name  handleRequiresState elementName elementName PLUGIN_REQUIRES_IMPORT parsePluginRequiresImport stateStack IGNORED_ELEMENT_STATE internalError elementName
public void handle Runtime State String element Name Attributes attributes if element Name equals LIBRARY Change State state Stack push new Integer RUNTIME LIBRARY STATE Process library attributes parse Library Attributes attributes return If we get to this point the element name is one we don t currently accept Set the state to indicate that this element will be ignored state Stack push new Integer IGNORED ELEMENT STATE internal Error element Name  handleRuntimeState elementName elementName stateStack RUNTIME_LIBRARY_STATE parseLibraryAttributes stateStack IGNORED_ELEMENT_STATE internalError elementName
private void log Status SAX Parse Exception ex String name ex get System Id if name null name NON NLS 1 else name name substring 1 name last Index Of NON NLS 1 String msg if name equals NON NLS 1 msg Eclipse Adaptor Msg formatter get String parse error ex get Message NON NLS 1 else msg Eclipse Adaptor Msg formatter get String parse error Name Line Column new String name Integer to String ex get Line Number Integer to String ex get Column Number ex get Message NON NLS 1 Framework Log Entry entry new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME msg 0 ex null Eclipse Adaptor get Default get Framework Log log entry  logStatus SAXParseException getSystemId lastIndexOf EclipseAdaptorMsg getString getMessage EclipseAdaptorMsg getString errorNameLineColumn toString getLineNumber toString getColumnNumber getMessage FrameworkLogEntry FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME EclipseAdaptor getDefault getFrameworkLog
synchronized public Plugin Info parse Plugin Input Stream in throws Exception SAX Parser Factory factory acquireXML Parsing context if factory null Framework Log Entry entry new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME Eclipse Adaptor Msg formatter get String ECLIPSE CONVERTER NO SAX FACTORY 0 null null NON NLS 1 Eclipse Adaptor get Default get Framework Log log entry return null factory set Namespace Aware true factory set Namespace Aware true try factory set Feature http xml org sax features string interning true NON NLS 1 catch SAX Exception se ignore we can still operate without string interning factory set Validating false factory newSAX Parser parse in this return manifest Info  PluginInfo parsePlugin InputStream SAXParserFactory acquireXMLParsing FrameworkLogEntry FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME EclipseAdaptorMsg getString ECLIPSE_CONVERTER_NO_SAX_FACTORY EclipseAdaptor getDefault getFrameworkLog setNamespaceAware setNamespaceAware setFeature SAXException setValidating newSAXParser manifestInfo
public static SAX Parser Factory acquireXML Parsing Bundle Context context if xml Tracker null xml Tracker new Service Tracker context javax xml parsers SAX Parser Factory null xml Tracker open return SAX Parser Factory xml Tracker get Service  SAXParserFactory acquireXMLParsing BundleContext xmlTracker xmlTracker ServiceTracker SAXParserFactory xmlTracker SAXParserFactory xmlTracker getService
public static void releaseXML Parsing if xml Tracker null xml Tracker close  releaseXMLParsing xmlTracker xmlTracker
public void parse Fragment Attributes Attributes attributes process attributes object Stack push manifest Info int len attributes get Length for int i 0 i len i String attr Name attributes get Local Name i String attr Value attributes get Value i trim if attr Name equals FRAGMENT ID manifest Info plugin Id attr Value else if attr Name equals FRAGMENT NAME manifest Info plugin Name attr Value else if attr Name equals FRAGMENT VERSION manifest Info version attr Value else if attr Name equals FRAGMENT PROVIDER manifest Info vendor attr Value else if attr Name equals FRAGMENT PLUGIN ID manifest Info master Plugin Id attr Value else if attr Name equals FRAGMENT PLUGIN VERSION manifest Info master Version attr Value else if attr Name equals FRAGMENT PLUGIN MATCH manifest Info master Match attr Value  parseFragmentAttributes objectStack manifestInfo getLength attrName getLocalName attrValue getValue attrName FRAGMENT_ID manifestInfo pluginId attrValue attrName FRAGMENT_NAME manifestInfo pluginName attrValue attrName FRAGMENT_VERSION manifestInfo attrValue attrName FRAGMENT_PROVIDER manifestInfo attrValue attrName FRAGMENT_PLUGIN_ID manifestInfo masterPluginId attrValue attrName FRAGMENT_PLUGIN_VERSION manifestInfo masterVersion attrValue attrName FRAGMENT_PLUGIN_MATCH manifestInfo masterMatch attrValue
public void parse Library Attributes Attributes attributes Push a vector to hold the export mask object Stack push new Vector String current attributes get Value LIBRARY NAME NON NLS 1 object Stack push current  parseLibraryAttributes objectStack getValue LIBRARY_NAME objectStack
public void parse Plugin Attributes Attributes attributes process attributes object Stack push manifest Info int len attributes get Length for int i 0 i len i String attr Name attributes get Local Name i String attr Value attributes get Value i trim if attr Name equals PLUGIN ID manifest Info plugin Id attr Value else if attr Name equals PLUGIN NAME manifest Info plugin Name attr Value else if attr Name equals PLUGIN VERSION manifest Info version attr Value else if attr Name equals PLUGIN VENDOR attr Name equals PLUGIN PROVIDER manifest Info vendor attr Value else if attr Name equals PLUGIN CLASS manifest Info plugin Class attr Value  parsePluginAttributes objectStack manifestInfo getLength attrName getLocalName attrValue getValue attrName PLUGIN_ID manifestInfo pluginId attrValue attrName PLUGIN_NAME manifestInfo pluginName attrValue attrName PLUGIN_VERSION manifestInfo attrValue attrName PLUGIN_VENDOR attrName PLUGIN_PROVIDER manifestInfo attrValue attrName PLUGIN_CLASS manifestInfo pluginClass attrValue
String match public boolean is Exported return export  isExported
public String get Match return match  getMatch
public String get Name return name  getName
public boolean is Optional return optional  isOptional
public String get Version return version  getVersion
public Prerequisite String preq Name String prereq Version boolean is Otional boolean is Exported String prereq Match name preq Name version prereq Version optional is Otional export is Exported match prereq Match  preqName prereqVersion isOtional isExported prereqMatch preqName prereqVersion isOtional isExported prereqMatch
public String to String return name  toString
public boolean equals Object prereq if prereq instanceof Prerequisite return false return name equals Prerequisite prereq name 
public void parse Plugin Requires Import Attributes attributes if manifest Info requires null manifest Info requires new Array List to avoid cycles if manifest Info plugin Id equals Plugin Converter Impl PI RUNTIME NON NLS 1 manifest Info requires add new Prerequisite Plugin Converter Impl PI RUNTIME null false false null NON NLS 1 process attributes String plugin attributes get Value PLUGIN REQUIRES PLUGIN NON NLS 1 if plugin null return if plugin equals Plugin Converter Impl PI BOOT NON NLS 1 NON NLS 2 return if plugin equals Plugin Converter Impl PI RUNTIME COMPATIBILITY manifest Info compatibility Found true String version attributes get Value PLUGIN REQUIRES PLUGIN VERSION NON NLS 1 String optional attributes get Value PLUGIN REQUIRES OPTIONAL NON NLS 1 String export attributes get Value PLUGIN REQUIRES EXPORT NON NLS 1 String match attributes get Value PLUGIN REQUIRES MATCH NON NLS 1 manifest Info requires add new Prerequisite plugin version true equals Ignore Case optional true false true equals Ignore Case export true false match NON NLS 1 NON NLS 2  parsePluginRequiresImport manifestInfo manifestInfo ArrayList manifestInfo pluginId PluginConverterImpl PI_RUNTIME manifestInfo PluginConverterImpl PI_RUNTIME getValue PLUGIN_REQUIRES_PLUGIN PluginConverterImpl PI_BOOT PluginConverterImpl PI_RUNTIME_COMPATIBILITY manifestInfo compatibilityFound getValue PLUGIN_REQUIRES_PLUGIN_VERSION getValue PLUGIN_REQUIRES_OPTIONAL getValue PLUGIN_REQUIRES_EXPORT getValue PLUGIN_REQUIRES_MATCH manifestInfo equalsIgnoreCase equalsIgnoreCase
public void parse Requires Attributes Attributes attributes Nothing to do  parseRequiresAttributes
static String replace String s String from String to String str s int from Len from length int to Len to length int ix str index Of from while ix 1 str str substring 0 ix to str substring ix from Len ix str index Of from ix to Len return str  fromLen toLen indexOf fromLen indexOf toLen
public void start Document state Stack push new Integer INITIAL STATE  startDocument stateStack INITIAL_STATE
public void start Element String uri String element Name String q Name Attributes attributes switch Integer state Stack peek int Value case INITIAL STATE handle Initial State element Name attributes break case FRAGMENT STATE case PLUGIN STATE handle Plugin State element Name attributes break case PLUGIN RUNTIME STATE handle Runtime State element Name attributes break case PLUGIN REQUIRES STATE handle Requires State element Name attributes break case PLUGIN EXTENSION POINT STATE handle Extension Point State element Name attributes break case PLUGIN EXTENSION STATE handle Extension State element Name attributes break case RUNTIME LIBRARY STATE handle Library State element Name attributes break case LIBRARY EXPORT STATE handle Library Export State element Name attributes break case PLUGIN REQUIRES IMPORT STATE handle Requires Import State element Name attributes break default state Stack push new Integer IGNORED ELEMENT STATE  startElement elementName qName stateStack intValue INITIAL_STATE handleInitialState elementName FRAGMENT_STATE PLUGIN_STATE handlePluginState elementName PLUGIN_RUNTIME_STATE handleRuntimeState elementName PLUGIN_REQUIRES_STATE handleRequiresState elementName PLUGIN_EXTENSION_POINT_STATE handleExtensionPointState elementName PLUGIN_EXTENSION_STATE handleExtensionState elementName RUNTIME_LIBRARY_STATE handleLibraryState elementName LIBRARY_EXPORT_STATE handleLibraryExportState elementName PLUGIN_REQUIRES_IMPORT_STATE handleRequiresImportState elementName stateStack IGNORED_ELEMENT_STATE
public void warning SAX Parse Exception ex log Status ex  SAXParseException logStatus
private void internal Error String element Name Framework Log Entry error String message Eclipse Adaptor Msg formatter get String ECLIPSE CONVERTER PARSE UNKNOWNTOP ELEMENT element Name NON NLS 1 error new Framework Log Entry Framework Adaptor FRAMEWORK SYMBOLICNAME manifest Info plugin Id null message Plug in manifest Info plugin Id message 0 null null NON NLS 1 NON NLS 2 Eclipse Adaptor get Default get Framework Log log error  internalError elementName FrameworkLogEntry EclipseAdaptorMsg getString ECLIPSE_CONVERTER_PARSE_UNKNOWNTOP_ELEMENT elementName FrameworkLogEntry FrameworkAdaptor FRAMEWORK_SYMBOLICNAME manifestInfo pluginId manifestInfo pluginId EclipseAdaptor getDefault getFrameworkLog
public void processing Instruction String target String data throws SAX Exception Since 3 0 a processing instruction of the form eclipse version 3 0 at the start of the manifest file is used to indicate the plug in manifest schema version in effect Pre 3 0 i e 2 1 plug in manifest files do not have one of these and this is how we can distinguish the manifest of a pre 3 0 plug in from a post 3 0 one for compatibility tranformations if target equals Ignore Case eclipse NON NLS 1 just the presence of this processing instruction indicates that this plug in is at least 3 0 manifest Info schema Version 3 0 NON NLS 1 String Tokenizer tokenizer new String Tokenizer data NON NLS 1 while tokenizer has More Tokens String token tokenizer next Token if token equals Ignore Case version NON NLS 1 if tokenizer has More Tokens break manifest Info schema Version tokenizer next Token break  processingInstruction SAXException equalsIgnoreCase manifestInfo schemaVersion StringTokenizer StringTokenizer hasMoreTokens nextToken equalsIgnoreCase hasMoreTokens manifestInfo schemaVersion nextToken

protected long notifications public Semaphore int count notifications count 
Attempts to acquire this semaphore Returns only when the semaphore has been acquired public synchronized void acquire while true if notifications 0 notifications return try wait catch Interrupted Exception e Ignore  InterruptedException
Attempts to acquire this semaphore Returns true if it was successfully acquired and false otherwise public synchronized boolean acquire long delay long start System current Time Millis long time Left delay while true if notifications 0 notifications return true if time Left 0 return false try wait time Left catch Interrupted Exception e Ignore time Left start delay System current Time Millis  currentTimeMillis timeLeft timeLeft timeLeft InterruptedException timeLeft currentTimeMillis
public synchronized void release notifications notify All  notifyAll
for debug only public String to String return Semaphore notifications NON NLS 1 NON NLS 2  toString

private State state public Simple Bundle Installer State state this state state  SimpleBundleInstaller
public void install Bundle Bundle Description to Install throws Bundle Exception state add Bundle to Install  installBundle BundleDescription toInstall BundleException addBundle toInstall
public void uninstall Bundle Bundle Description to Uninstall throws Bundle Exception state remove Bundle to Uninstall  uninstallBundle BundleDescription toUninstall BundleException removeBundle toUninstall
public void update Bundle Bundle Description to Update throws Bundle Exception TODO  updateBundle BundleDescription toUpdate BundleException

public class Simple Platform Admin extends State Manager public Simple Platform Admin File bundle Root Dir super bundle Root Dir create System State set Installer new Simple Bundle Installer get System State  SimplePlatformAdmin StateManager SimplePlatformAdmin bundleRootDir bundleRootDir createSystemState setInstaller SimpleBundleInstaller getSystemState

public URL convert To FileURL URL url throws IO Exception TODO should close connection at all times URL Connection connection url open Connection if connection instanceof BundleURL Connection return BundleURL Connection connection get FileURL else return url  convertToFileURL IOException URLConnection openConnection BundleURLConnection BundleURLConnection getFileURL
public URL convert To LocalURL URL url throws IO Exception TODO should close connection at all times URL Connection connection url open Connection if connection instanceof BundleURL Connection return BundleURL Connection connection get LocalURL else return url  convertToLocalURL IOException URLConnection openConnection BundleURLConnection BundleURLConnection getLocalURL

public int describe Input Stream contents I Content Description description throws IO Exception byte buffer new byte signature length int not Valid required INVALID INDETERMINATE if contents skip offset offset return not Valid if contents read buffer buffer length return not Valid for int i 0 i signature length i if signature i buffer i return not Valid return VALID  InputStream IContentDescription IOException notValid notValid notValid notValid
see I Content Describer get Supported Options public Qualified Name get Supported Options return new Qualified Name 0  IContentDescriber getSupportedOptions QualifiedName getSupportedOptions QualifiedName
public void set Initialization Data I Configuration Element config String property Name Object data throws Core Exception try if data instanceof String signature parse Signature String data else if data instanceof Hashtable Hashtable parameters Hashtable data if parameters contains Key SIGNATURE String message Policy bind content bad Initialization Data XML Root Element Content Describer class get Name NON NLS 1 throw new Core Exception new Status I Status ERROR Platform PI RUNTIME 0 message null signature parse Signature String parameters get SIGNATURE if parameters contains Key OFFSET offset Integer parse Int String parameters get OFFSET if parameters contains Key REQUIRED required Boolean value Of String parameters get REQUIRED boolean Value catch Number Format Exception nfe String message Policy bind content bad Initialization Data Binary Signature Describer class get Name NON NLS 1 throw new Core Exception new Status I Status ERROR Platform PI RUNTIME 0 message nfe  setInitializationData IConfigurationElement propertyName CoreException parseSignature containsKey badInitializationData XMLRootElementContentDescriber getName CoreException IStatus PI_RUNTIME parseSignature containsKey parseInt containsKey valueOf booleanValue NumberFormatException badInitializationData BinarySignatureDescriber getName CoreException IStatus PI_RUNTIME
private byte parse Signature String data List bytes new Array List String Tokenizer tokenizer new String Tokenizer data t n r f NON NLS 1 while tokenizer has More Tokens bytes add new Byte byte Integer parse Int tokenizer next Token trim 16 byte signature new byte bytes size for int i 0 i signature length i signature i Byte bytes get i byte Value return signature  parseSignature ArrayList StringTokenizer StringTokenizer hasMoreTokens parseInt nextToken byteValue

Tries to fill a description for the given contents Returns an code int code indicating whether the given stream of bytes represents a valid sample for its corresponding content type If no content description is provided this method should perform content type validation p The input stream must be kept open and any IO Exceptions while reading the stream should flow to the caller p param contents the contents to be examined param description a description to be filled in or code null code if only content type validation is to be performed return one of the following ul li code VALID code li li code INVALID code li li code INDETERMINATE code li ul throws IO Exception if an I O error occurs see I Content Description see VALID see INVALID see INDETERMINATE  IOExceptions IOException IContentDescription
Returns the properties supported by this describer return the supported properties see describe 

Returns whether the given property is requested to be described This method is intended to allow content describers to determine which properties should be described param key a key for the property to be verified return code true code if the property is to be described code false code otherwise 
Returns the charset name to be used when reading the contents described by this object p If a Unicode byte order mark has been found the code BYTE ORDER MARK code property has been set a corresponding charset name will be returned e g UTF 8 UTF 16 Otherwise the value of the code CHARSET code property will be returned p return a charset name or code null code  BYTE_ORDER_MARK
Returns the content type detected Returns code null code if the content type could not be determined return the corresponding content type or code null code 
Returns the value of custom property set by the content interpreter used p The qualifier part of the property name must be the unique identifier of the declaring plug in e g code com example plugin code p param key the property key return the property value or code null code if the property is not found 
Sets the given property to the given value p The qualifier part of the property name must be the unique identifier of the declaring plug in e g code com example plugin code p p This method should not be called by clients other than content describers An attempt to set a property from other contexts will cause an code Illegal State Exception code to be thrown p param key the qualified name of the property param value the property value or code null code if the property is to be removed throws Illegal State Exception if called after this description has been filled in  IllegalStateException IllegalStateException

Adds a user defined file specification to this content type Has no effect if the given file specification has already been added by either user or provider param file Spec the file specification param type the type of the file specification One of code FILE NAME SPEC code code FILE EXTENSION SPEC code throws Illegal Argument Exception if the type bit mask is incorrect throws Core Exception if this method fails Reasons include ul li An error occurred persisting this setting li ul see FILE NAME SPEC see FILE EXTENSION SPEC  fileSpec FILE_NAME_SPEC FILE_EXTENSION_SPEC IllegalArgumentException CoreException FILE_NAME_SPEC FILE_EXTENSION_SPEC
Removes a user defined file specification from this content type Has no effect if the given file specification does not exist or was not defined by the user param file Spec the file specification param type the type of the file specification One of code FILE NAME SPEC code code FILE EXTENSION SPEC code throws Illegal Argument Exception if the type bit mask is incorrect throws Core Exception if this method fails Reasons include ul li An error occurred persisting this setting li ul see FILE NAME SPEC see FILE EXTENSION SPEC  fileSpec FILE_NAME_SPEC FILE_EXTENSION_SPEC IllegalArgumentException CoreException FILE_NAME_SPEC FILE_EXTENSION_SPEC
Returns a reference to this content type s base type If this content type does not have a base type it is a root type returns code null code return this content type s base type or code null code 
Tries to obtain a description for the given contents p Any IO Exceptions that may occur while reading the given input stream will flow to the caller The input stream will not be closed by this operation p param contents the contents to be interpreted param options an array of keys for all properties that should be described return a content description if one could be obtained or code null code throws IO Exception if an error occurs while reading the contents see I Content Description  IOExceptions IOException IContentDescription
Tries to obtain a description for the given contents p Any IO Exceptions that may occur while reading the given reader will flow to the caller The reader will not be closed by this operation p param contents the contents to be interpreted param options an array of keys for all properties that should be described return a content description if one could be obtained or code null code throws Unsupported Operation Exception if this content type has a describer that does not implement code I Text Content Describer code throws IO Exception if an error occurs while reading the contents see I Content Description  IOExceptions UnsupportedOperationException ITextContentDescriber IOException IContentDescription
Returns the default charset for this content type if one has been defined code null code otherwise return the default charset or code null code 
Returns file specifications from this content type The type mask is a bit wise or of file specification type constants indicating the file specification types of interest param type a bit wise or of file specification type constants Valid flags are ul li one of code FILE EXTENSION SPEC code or code FILE NAME SPEC code li li and optionally one of code IGNORE PRE DEFINED code or code IGNORE USER DEFINED code li ul return the file specification see FILE NAME SPEC see FILE EXTENSION SPEC see IGNORE PRE DEFINED see IGNORE USER DEFINED  FILE_EXTENSION_SPEC FILE_NAME_SPEC IGNORE_PRE_DEFINED IGNORE_USER_DEFINED FILE_NAME_SPEC FILE_EXTENSION_SPEC IGNORE_PRE_DEFINED IGNORE_USER_DEFINED
Returns this content type s unique identifier Each content type has an identifier by which they can be retrieved from the content type catalog return this content type s unique identifier 
Returns a user friendly name for this content type return this content type s name 
Returns whether this content type is associated with the given file name param file Name the file name return code true code if this content type is associated with the given file name code false code otherwise  fileName
Returns whether this content type is a kind of the given content type A content type A is a kind of a content type B if ol li A and B are the same content type or li li A s base type is B or li li A s base type is a kind of B li ol param another a content type return code true code if this content type is a kind of the given content type code false code otherwise 
Sets the default charset for this content type If code null code is provided restores the pre defined default charset param user Charset the new charset for this content type or code null code throws Core Exception if this method fails Reasons include ul li An error occurred persisting this setting li ul  userCharset CoreException

Notification that a content type has changed in the content type manager The given event object contains the content type which changed and must not be code null code param event the content type change event 
Constructor for a new content type change event param source the content type that changed public Content Type Change Event I Content Type source super source  ContentTypeChangeEvent IContentType
Return the content type object associated with this change event return the content type public I Content Type get Content Type return I Content Type source  IContentType getContentType IContentType
Register the given listener for notification of content type changes Calling this method multiple times with the same listener has no effect The given listener argument must not be code null code param listener the content type change listener to register see remove Content Type Change Listener I Content Type Manager I Content Type Change Listener see I Content Type Manager I Content Type Change Listener  removeContentTypeChangeListener IContentTypeManager IContentTypeChangeListener IContentTypeManager IContentTypeChangeListener
Returns the preferred content type for the given contents and file name p Returns code null code if no associated content types are found p p If a file name is not provided the entire content type registry will be queried For performance reasons it is highly recomended to provide a file name if available p p Any IO Exceptions that may occur while reading the given input stream will flow to the caller The input stream will not be closed by this operation p param contents an input stream param file Name the file name associated to the contents or code null code return the preferred content type associated to the given file name or code null code throws IO Exception if an error occurs while reading the contents  IOExceptions fileName IOException
Returns the preferred content type for the given file name If multiple content types are associated with the given file name the one considered the most appropriated will be returned If there are no content types associated code null code is returned param file Name the name of the file return the preferred content type associated to the given file name or code null code  fileName
Returns the content types associated to the given contents and file name p Returns an empty array if no associated content types are found p p If a file name is not provided the entire content type registry will be queried For performance reasons it is highly recomended to provide a file name if available p p Any IO Exceptions that may occur while reading the given input stream will flow to the caller The input stream will not be closed by this operation p param contents an input stream param file Name the file name associated to the contents or code null code return all content types associated to the given contents and file name throws IO Exception if an error occurs while reading the contents  IOExceptions fileName IOException
Returns all content types known by the platform that are associated to the given file name p Returns an empty array if there are no content types associated p param file Name the name of the file return all content types associated to the given file spec  fileName
Returns all content types known by the platform p Returns an empty array if there are no content types available p return all content types known by the platform 
Returns the content type with the given identifier or code null code if no such content type is known by the platform param content Type Identifier the identifier for the content type return the content type or code null code  contentTypeIdentifier
Tries to obtain a description for the given contents and file name p Any IO Exceptions that may occur while reading the given input stream will flow to the caller The input stream will not be closed by this operation p p If a file name is not provided the entire content type registry will be queried For performance reasons it is highly recomended to provide a file name if available p param contents the contents to be interpreted param file Name the file name associated to the contents or code null code param options an array of keys for all properties that should be described or code I Content Description ALL code for all of them return a content description if one could be obtained or code null code throws IO Exception if an error occurs while reading the contents see I Content Description  IOExceptions fileName IContentDescription IOException IContentDescription
Tries to obtain a description for the given contents and file name p Any IO Exceptions that may occur while reading the given input stream will flow to the caller The reader will not be closed by this operation p p If a file name is not provided the entire content type registry will be queried For performance reasons it is highly recomended to provide a file name if available p param contents the contents to be interpreted param file Name the file name associated to the contents or code null code param options an array of keys for all properties that should be described or code I Content Description ALL code for all of them return a content description if one could be obtained or code null code throws IO Exception if an error occurs while reading the contents see I Content Description  IOExceptions fileName IContentDescription IOException IContentDescription
De register the given listener from receiving notification of content type changes Calling this method multiple times with the same listener has no effect The given listener argument must not be code null code param listener the content type change listener to remove see add Content Type Change Listener I Content Type Manager I Content Type Change Listener see I Content Type Manager I Content Type Change Listener  addContentTypeChangeListener IContentTypeManager IContentTypeChangeListener IContentTypeManager IContentTypeChangeListener

public interface I Text Content Describer extends I Content Describer Tries to fill a description for the given contents Returns an code int code indicating whether the given stream of characters represents a valid sample for this describer s corresponding content type If no content description is provided this method should only perform content type validation p The stream provided must be kept open and any IO Exceptions while reading it should flow to the caller p param contents the contents to be examined param description a description to be filled in or code null code if only content type validation is to be performed return one of the following ul li code VALID code li li code INVALID code li li code INDETERMINATE code li ul throws IO Exception if an I O error occurs see I Content Description see VALID see INVALID see INDETERMINATE  ITextContentDescriber IContentDescriber IOExceptions IOException IContentDescription

private int check Criteria Input Source contents throws IO Exception XML Root Handler xml Handler new XML Root Handler element To Find null try if xml Handler parse Contents contents return INVALID catch SAX Exception e we may be handed any kind of contents it is normal we fail to parse return INVALID catch Parser Configuration Exception e some bad thing happened force this describer to be disabled String message Policy bind content parser Configuration NON NLS 1 Internal Platform get Default log new Status I Status ERROR Platform PI RUNTIME 0 message e throw new Runtime Exception message Check to see if we matched our criteria if element To Find null element To Find equals xml Handler get Root Name return INVALID if dtd To Find null dtd To Find equals xml Handler getDTD return INVALID We must be okay then return VALID  checkCriteria InputSource IOException XMLRootHandler xmlHandler XMLRootHandler elementToFind xmlHandler parseContents SAXException ParserConfigurationException parserConfiguration InternalPlatform getDefault IStatus PI_RUNTIME RuntimeException elementToFind elementToFind xmlHandler getRootName dtdToFind dtdToFind xmlHandler
public int describe Input Stream contents I Content Description description throws IO Exception call the basic XML describer to do basic recognition if super describe contents description INVALID return INVALID super describe will have consumed some chars need to rewind contents reset Check to see if we matched our criteria return check Criteria new Input Source contents  InputStream IContentDescription IOException checkCriteria InputSource
public int describe Reader contents I Content Description description throws IO Exception call the basic XML describer to do basic recognition if super describe contents description INVALID return INVALID super describe will have consumed some chars need to rewind contents reset Check to see if we matched our criteria return check Criteria new Input Source contents  IContentDescription IOException checkCriteria InputSource
public void set Initialization Data final I Configuration Element config final String property Name final Object data throws Core Exception if data instanceof String element To Find String data else if data instanceof Hashtable Hashtable parameters Hashtable data dtd To Find String parameters get DTD TO FIND element To Find String parameters get ELEMENT TO FIND if dtd To Find null element To Find null String message Policy bind content bad Initialization Data XML Root Element Content Describer class get Name NON NLS 1 throw new Core Exception new Status I Status ERROR Platform PI RUNTIME 0 message null  setInitializationData IConfigurationElement propertyName CoreException elementToFind dtdToFind DTD_TO_FIND elementToFind ELEMENT_TO_FIND dtdToFind elementToFind badInitializationData XMLRootElementContentDescriber getName CoreException IStatus PI_RUNTIME

Creates a new exception with the given status object The message of the given status is used as the exception message param status the status object to be associated with this exception public Core Exception I Status status super status get Message this status status  CoreException IStatus getMessage
Returns the status object for this exception return a status object public final I Status get Status return status  IStatus getStatus
Prints a stack trace out for the exception and any nested exception that it may have embedded in its Status object public void print Stack Trace print Stack Trace System err  printStackTrace printStackTrace
Prints a stack trace out for the exception and any nested exception that it may have embedded in its Status object param output the stream to write to public void print Stack Trace Print Stream output synchronized output if status get Exception null output print get Class get Name status get Code NON NLS 1 NON NLS 2 status get Exception print Stack Trace output else super print Stack Trace output  printStackTrace PrintStream getException getClass getName getCode getException printStackTrace printStackTrace
Prints a stack trace out for the exception and any nested exception that it may have embedded in its Status object param output the stream to write to public void print Stack Trace Print Writer output synchronized output if status get Exception null output print get Class get Name status get Code NON NLS 1 NON NLS 2 status get Exception print Stack Trace output else super print Stack Trace output  printStackTrace PrintWriter getException getClass getName getCode getException printStackTrace printStackTrace

public interface I Adaptable Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found param adapter the adapter class to look up return a object castable to the given class or code null code if this object does not have an adapter for the given class  IAdaptable

public interface I Adapter Factory Returns an object which is an instance of the given class associated with the given object Returns code null code if no such object can be found param adaptable Object the adaptable object being queried usually an instance of code I Adaptable code param adapter Type the type of adapter to look up return a object castable to the given adapter type or code null code if this adapter factory does not have an adapter of the given type for the given object  IAdapterFactory adaptableObject IAdaptable adapterType
Returns the collection of adapter types handled by this factory p This method is generally used by an adapter manager to discover which adapter types are supported in advance of dispatching any actual code get Adapter code requests p return the collection of adapter types  getAdapter

public interface I Adapter Manager Returns an object which is an instance of the given class associated with the given object Returns code null code if no such object can be found p Note that this method will never cause plug ins to be loaded If the only suitable factory is not yet loaded this method will return code null code param adaptable the adaptable object being queried usually an instance of code I Adaptable code param adapter Type the type of adapter to look up return an object castable to the given adapter type or code null code if the given adaptable object does not have an available adapter of the given type  IAdapterManager IAdaptable adapterType
Returns an object which is an instance of the given class name associated with the given object Returns code null code if no such object can be found p Note that this method will never cause plug ins to be loaded If the only suitable factory is not yet loaded this method will return code null code If activation of the plug in providing the factory is required use the code load Adapter code method instead param adaptable the adaptable object being queried usually an instance of code I Adaptable code param adapter Type Name the fully qualified name of the type of adapter to look up return an object castable to the given adapter type or code null code if the given adaptable object does not have an available adapter of the given type since 3 0  loadAdapter IAdaptable adapterTypeName
Returns whether there is an adapter factory registered that may be able to convert code adaptable code to an object of type code adapter Type Name code p Note that a return value of code true code does not guarantee that a subsequent call to code get Adapter code with the same arguments will return a non null result If the factory s plug in has not yet been loaded or if the factory itself returns code null code then code get Adapter code will still return code null code param adaptable the adaptable object being queried usually an instance of code I Adaptable code param adapter Type Name the fully qualified class name of an adapter to look up return code true code if there is an adapter factory that claims it can convert code adaptable code to an object of type code adapter Type code and code false code otherwise since 3 0  adapterTypeName getAdapter getAdapter IAdaptable adapterTypeName adapterType
Returns an object that is an instance of the given class name associated with the given object Returns code null code if no such object can be found p Note that unlike the code get Adapter code methods this method will cause the plug in that contributes the adapter factory to be loaded if necessary As such this method should be used judiciously in order to avoid unnecessary plug in activations Most clients should avoid activation by using code get Adapter code instead param adaptable the adaptable object being queried usually an instance of code I Adaptable code param adapter Type Name the fully qualified name of the type of adapter to look up return an object castable to the given adapter type or code null code if the given adaptable object does not have an available adapter of the given type since 3 0  getAdapter getAdapter IAdaptable adapterTypeName
Registers the given adapter factory as extending objects of the given type p If the type being extended is a class the given factory s adapters are available on instances of that class and any of its subclasses If it is an interface the adapters are available to all classes that directly or indirectly implement that interface p param factory the adapter factory param adaptable the type being extended see unregister Adapters I Adapter Factory see unregister Adapters I Adapter Factory Class  unregisterAdapters IAdapterFactory unregisterAdapters IAdapterFactory
Removes the given adapter factory completely from the list of registered factories Equivalent to calling code unregister Adapters I Adapter Factory Class code on all classes against which it had been explicitly registered Does nothing if the given factory is not currently registered param factory the adapter factory to remove see register Adapters I Adapter Factory Class  unregisterAdapters IAdapterFactory registerAdapters IAdapterFactory
Removes the given adapter factory from the list of factories registered as extending the given class Does nothing if the given factory and type combination is not registered param factory the adapter factory to remove param adaptable one of the types against which the given factory is registered see register Adapters I Adapter Factory Class  registerAdapters IAdapterFactory

Returns the identifier of this bundle group Bundle groups are uniquely identified by the combination of their identifier and their version see get Version return the identifier for this bundle group  getVersion
Returns the human readable name of this bundle group return the human readable name 
Returns the version of this bundle group Bundle group version strings have the same format as bundle versions i e major minor service qualifier Bundle groups are uniquely identified by the combination of their identifier and their version see get Identifier return the string form of this bundle group s version  getIdentifier
Returns a text description of this bundle group return text description of this bundle group 
Returns the name of the provider of this bundle group return the name of the provider or code null code if none 
Returns a list of all bundles supplied by this bundle group return the bundles supplied by this bundle group 
Returns the property of this bundle group with the given key code null code is returned if there is no such key value pair param key the name of the property to return return the value associated with the given key or code null code if none 

public interface I Bundle Group Provider Returns the human readable name of this bundle group provider return the name of this bundle group provider  IBundleGroupProvider
Returns the bundle groups provided by this provider return the bundle groups provided by this provider 

public interface I Configuration Element Creates and returns a new instance of the executable extension identified by the named attribute of this configuration element The named attribute value must contain a fully qualified name of a Java class implementing the executable extension p The specified class is instantiated using its 0 argument public constructor If the specified class implements the code I Executable Extension code interface the method code set Initialization Data code is called passing to the object the configuration information that was used to create it p p Unlike other methods on this object invoking this method may activate the plug in p param property Name the name of the property return the executable instance exception Core Exception if an instance of the executable extension could not be created for any reason see I Executable Extension set Initialization Data I Configuration Element String Object  IConfigurationElement IExecutableExtension setInitializationData propertyName CoreException IExecutableExtension setInitializationData IConfigurationElement
Returns the named attribute of this configuration element or code null code if none p The names of configuration element attributes are the same as the attribute names of the corresponding XML element For example the configuration markup pre lt bg pattern stripes gt pre corresponds to a configuration element named code bg code with an attribute named code pattern code with attribute value code stripes code p p Note that any translation specified in the plug in manifest file is automatically applied p param name the name of the attribute return attribute value or code null code if none 
Returns the named attribute of this configuration element or code null code if none p The names of configuration element attributes are the same as the attribute names of the corresponding XML element For example the configuration markup pre lt bg pattern stripes gt pre corresponds to a configuration element named code bg code with an attribute named code pattern code with attribute value code stripes code p p Note that any translation specified in the plug in manifest file for this attribute is b not b automatically applied p param name the name of the attribute return attribute value or code null code if none 
Returns the names of the attributes of this configuration element Returns an empty array if this configuration element has no attributes p The names of configuration element attributes are the same as the attribute names of the corresponding XML element For example the configuration markup pre lt bg color blue pattern stripes gt pre corresponds to a configuration element named code bg code with attributes named code color code and code pattern code p return the names of the attributes 
Returns all configuration elements that are children of this configuration element Returns an empty array if this configuration element has no children p Each child corresponds to a nested XML element in the configuration markup For example the configuration markup pre lt view gt nbsp nbsp nbsp nbsp lt vertical Hint gt top lt vertical Hint gt nbsp nbsp nbsp nbsp lt horizontal Hint gt left lt horizontal Hint gt lt view gt pre corresponds to a configuration element named code view code with two children p return the child configuration elements see get Children String  verticalHint verticalHint horizontalHint horizontalHint getChildren
Returns all child configuration elements with the given name Returns an empty array if this configuration element has no children with the given name param name the name of the child configuration element return the child configuration elements with that name see get Children  getChildren
Returns the extension that declares this configuration element return the extension 
Returns the name of this configuration element The name of a configuration element is the same as the XML tag of the corresponding XML element For example the configuration markup pre lt wizard name Create Project gt pre corresponds to a configuration element named code wizard code return the name of this configuration element 
Returns the element which contains this element If this element is an immediate child of an extension the returned value can be downcast to code I Extension code Otherwise the returned value can be downcast to code I Configuration Element code return the parent of this configuration element or code null code since 3 0  IExtension IConfigurationElement
Returns the text value of this configuration element For example the configuration markup pre lt script lang javascript gt scripts cp js lt script gt pre corresponds to a configuration element code script code with value code scripts cp js code p Values may span multiple lines i e contain carriage returns and or line feeds p Note that any translation specified in the plug in manifest file is automatically applied p return the text value of this configuration element or code null code 
Returns the untranslated text value of this configuration element For example the configuration markup pre lt script lang javascript gt scripts cp js lt script gt pre corresponds to a configuration element code script code with value code scripts cp js code p Values may span multiple lines i e contain carriage returns and or line feeds p Note that translation specified in the plug in manifest file is b not b automatically applied For example the configuration markup pre lt tooltip gt hattip lt tooltip gt pre corresponds to a configuration element named code tooltip code with value code hattip code p return the untranslated text value of this configuration element or code null code 

public interface I Executable Extension This method is called by the implementation of the method code I Configuration Element create Executable Extension code on a newly constructed extension passing it its relevant configuration information Most executable extensions only make use of the first two call arguments p Regular executable extensions specify their Java implementation class name as an attribute of the configuration element for the extension For example pre lt action run com example Base Action gt pre In the above example this method would be called with a reference to the code lt action gt code element first argument and code run code as the name of the attribute that defined this executable extension second argument p p The last parameter is for the specific use of extension adapters and is typically not used by regular executable extensions p p There are two supported ways of associating additional adapter specific data with the configuration in a way that is transparent to the extension point implementor p p 1 by specifying adapter data as part of the implementation class attribute value The Java class name can be followed by a separator followed by any adapter data in string form For example if the extension point specifies an attribute code run code to contain the name of the extension implementation an adapter can be configured as pre lt action run com example External Adapter cmds util exe opt 3 gt pre p p 2 by converting the attribute used to specify the executable extension to a child element of the original configuration element and specifying the adapter data in the form of xml markup Using this form the example above would become pre lt action gt lt it run it class com xyz External Adapter gt lt parameter name exec value cmds util exe gt lt parameter name opt value 3 gt lt it run it gt lt action gt pre p p Form 2 will typically only be used for extension points that anticipate the majority of extensions configured into it will in fact be in the form of adapters p p In either case the specified adapter class is instantiated using its 0 argument public constructor The adapter data is passed as the last argument of this method The data argument is defined as Object It can have the following values ul li code null code if no adapter data was supplied li li in case 1 the initialization data string is passed as a code String code li li in case 2 the initialization data is passed as a code Hashtable code containing the actual parameter names and values both code String code s li ul p param config the configuration element used to trigger this execution It can be queried by the executable extension for specific configuration properties param property Name the name of an attribute of the configuration element used on the code create Executable Extension String code call This argument can be used in the cases where a single configuration element is used to define multiple executable extensions param data adapter data in the form of a code String code a code Hashtable code or code null code exception Core Exception if error s detected during initialization processing see I Configuration Element create Executable Extension String  IExecutableExtension IConfigurationElement createExecutableExtension BaseAction ExternalAdapter ExternalAdapter propertyName createExecutableExtension CoreException IConfigurationElement createExecutableExtension

public interface I Extension Returns all configuration elements declared by this extension These elements are a direct reflection of the configuration markup supplied in the manifest code plugin xml code file for the plug in that declares this extension Returns an empty array if this extension does not declare any configuration elements return the configuration elements declared by this extension  IExtension
Returns the descriptor of the plug in that declares this extension return the plug in that declares this extension deprecated I Plugin Descriptor is not part of the new runtime and its function has been split over several parts of the new runtime This method is not available returns tt null tt if the compatibility layer is not installed Use get Namespace to get the symbolic id of the declaring plugin See link I Plugin Descriptor to see how to update your usecases  IPluginDescriptor getNamespace IPluginDescriptor
Returns the namespace for this extension This value can be used in various global facilities to discover this extension s provider p b Note b This is an early access API to the new OSGI based Eclipse 3 0 Platform Runtime Because the AP Is for the new runtime have not yet been fully stabilized they should only be used by clients needing to take particular advantage of new OSGI specific functionality and only then with the understanding that these AP Is may well change in incompatible ways until they reach their finished stable form post 3 0 p return the namespace for this extension see Platform get Bundle String see I Extension Registry since 3 0  APIs APIs getBundle IExtensionRegistry
Returns the unique identifier of the extension point to which this extension should be contributed return the unique identifier of the relevant extension point 
Returns a displayable label for this extension Returns the empty string if no label for this extension is specified in the plug in manifest file p Note that any translation specified in the plug in manifest file is automatically applied p return a displayable string label for this extension possibly the empty string 
Returns the simple identifier of this extension or code null code if this extension does not have an identifier This identifier is specified in the plug in manifest code plugin xml code file as a non empty string containing no period characters code code and must be unique within the defining plug in return the simple identifier of the extension e g code main code or code null code 
Returns the unique identifier of this extension or code null code if this extension does not have an identifier If available this identifier is unique within the plug in registry and is composed of the namespace where this extension was declared and this extension s simple identifier return the unique identifier of the extension e g code com example acme main code or code null code 

The kind of this extension delta return the kind of change this delta represents see ADDED see REMOVED 
Returns the affected extension return the affected extension 
Returns the affected extension point return the affected extension point 

public interface I Extension Point Returns all configuration elements from all extensions configured into this extension point Returns an empty array if this extension point has no extensions configured or none of the extensions contain configuration elements return the configuration elements for all extension configured into this extension point  IExtensionPoint
Returns the descriptor of the plug in that declares this extension point return the plug in that declares this extension point deprecated I Plugin Descriptor is not part of the new runtime and its function has been split over several parts of the new runtime This method is not available returns null if the compatibility layer is not installed Use get Namespace to get the symbolic id of the declaring plugin See link I Plugin Descriptor to see how to update your usecases  IPluginDescriptor getNamespace IPluginDescriptor
Returns the namespace for this extension point This value can be used in various global facilities to discover this extension point s provider p b Note b This is an early access API to the new OSGI based Eclipse 3 0 Platform Runtime Because the AP Is for the new runtime have not yet been fully stabilized they should only be used by clients needing to take particular advantage of new OSGI specific functionality and only then with the understanding that these AP Is may well change in incompatible ways until they reach their finished stable form post 3 0 p return the namespace for this extension point see Platform get Bundle String see I Extension Registry since 3 0  APIs APIs getBundle IExtensionRegistry
Returns the extension with the given unique identifier configured into this extension point or code null code if there is no such extension Since an extension might not have an identifier some extensions can only be found via the code get Extensions code method param extension Id the unique identifier of an extension e g code com example acme main code return an extension or code null code  getExtensions extensionId
Returns all extensions configured into this extension point Returns an empty array if this extension point has no extensions return the extensions configured into this extension point 
Returns a displayable label for this extension point Returns the empty string if no label for this extension point is specified in the plug in manifest file p Note that any translation specified in the plug in manifest file is automatically applied p return a displayable string label for this extension point possibly the empty string 
Returns reference to the extension point schema The schema reference is returned as a URL path relative to the plug in installation URL Returns the empty string if no schema for this extension point is specified in the plug in manifest file return a relative URL path or an empty string 
Returns the simple identifier of this extension point This identifier is a non empty string containing no period characters code code and is guaranteed to be unique within the defining plug in return the simple identifier of the extension point e g code builders code 
Returns the unique identifier of this extension point This identifier is unique within the plug in registry and is composed of the namespace for this extension point and this extension point s simple identifier return the unique identifier of the extension point e g code org eclipse core resources builders code 

public interface I Extension Registry Adds the given listener for registry change events related to extension points in the given namespace Has no effect if an identical listener is already registered After completion of this method the given listener will be registered for events related to extension points in the specified namespace If no namespace is specified the listener will receive notifications for changes to extension points in any namespace p Once registered a listener starts receiving notification of changes to the registry Registry change notifications are sent asynchronously The listener continues to receive notifications until it is removed p param listener the listener param namespace the namespace in which to listen for changes see I Registry Change Listener see I Registry Change Event see remove Registry Change Listener I Registry Change Listener  IExtensionRegistry IRegistryChangeListener IRegistryChangeEvent removeRegistryChangeListener IRegistryChangeListener
Adds the given listener for registry change events Has no effect if an identical listener is already registered p This method is equivalent to pre add Registry Change Listener listener null pre p param listener the listener see I Registry Change Listener see I Registry Change Event see add Registry Change Listener I Registry Change Listener String see remove Registry Change Listener I Registry Change Listener  addRegistryChangeListener IRegistryChangeListener IRegistryChangeEvent addRegistryChangeListener IRegistryChangeListener removeRegistryChangeListener IRegistryChangeListener
Returns all configuration elements from all extensions configured into the identified extension point Returns an empty array if the extension point does not exist has no extensions configured or none of the extensions contain configuration elements param extension Point Id the unique identifier of the extension point e g code org eclipse core resources builders code return the configuration elements  extensionPointId
Returns all configuration elements from all extensions configured into the identified extension point Returns an empty array if the extension point does not exist has no extensions configured or none of the extensions contain configuration elements param namespace the namespace for the extension point e g code org eclipse core resources code param extension Point Name the simple identifier of the extension point e g code builders code return the configuration elements  extensionPointName
Returns all configuration elements from the identified extension Returns an empty array if the extension does not exist or contains no configuration elements param namespace the namespace for the extension point e g code org eclipse core resources code param extension Point Name the simple identifier of the extension point e g code builders code param extension Id the unique identifier of the extension e g code com example acme coolbuilder code return the configuration elements  extensionPointName extensionId
Returns the specified extension in this extension registry or code null code if there is no such extension param extension Id the unique identifier of the extension e g code com example acme coolbuilder code return the extension or code null code  extensionId
Returns the specified extension in this extension registry or code null code if there is no such extension The first parameter identifies the extension point and the second parameter identifies an extension plugged in to that extension point param extension Point Id the unique identifier of the extension point e g code org eclipse core resources builders code param extension Id the unique identifier of the extension e g code com example acme coolbuilder code return the extension or code null code  extensionPointId extensionId
Returns the specified extension in this extension registry or code null code if there is no such extension The first two parameters identify the extension point and the third parameter identifies an extension plugged in to that extension point param namespace the namespace for the extension point e g code org eclipse core resources code param extension Point Name the simple identifier of the extension point e g code builders code param extension Id the unique identifier of the extension e g code com example acme coolbuilder code return the extension or code null code  extensionPointName extensionId
Returns the extension point with the given extension point identifier in this extension registry or code null code if there is no such extension point param extension Point Id the unique identifier of the extension point e g code org eclipse core resources builders code return the extension point or code null code  extensionPointId
Returns the extension point in this extension registry with the given namespace and extension point simple identifier or code null code if there is no such extension point param namespace the namespace for the given extension point e g code org eclipse core resources code param extension Point Name the simple identifier of the extension point e g code builders code return the extension point or code null code  extensionPointName
Returns all extension points known to this extension registry Returns an empty array if there are no extension points return the extension points known to this extension registry 
Returns all extension points declared in the given namespace Returns an empty array if there are no extension points declared in the namespace param namespace the namespace for the extension points e g code org eclipse core resources code return the extension points in this registry declared in the given namespace 
Returns all extensions declared in the given namespace Returns an empty array if no extensions are declared in the namespace param namespace the namespace for the extensions e g code org eclipse core resources code return the extensions in this registry declared in the given namespace 
Returns all namespaces where extensions and or extension points Returns an empty array if there are no known extensions extension points in this registry return all namespaces known to this registry since 3 0 
Removes the given registry change listener from this registry Has no effect if an identical listener is not registered param listener the listener see I Registry Change Listener see add Registry Change Listener I Registry Change Listener see add Registry Change Listener I Registry Change Listener String  IRegistryChangeListener addRegistryChangeListener IRegistryChangeListener addRegistryChangeListener IRegistryChangeListener

Returns the content filters or code null code Each content filter identifies a specific class or a group of classes using a notation and matching rules equivalent to Java code import code declarations e g java io File or java io Returns code null code if the library is not exported or it is fully exported no filtering return the content filters or code null codel if none deprecated As of Eclipse 3 0 content filters are obsolete There is no replacement 
Returns the path of this runtime library relative to the installation location return the path of the library see I Plugin Descriptor get InstallURL deprecated Given a manifest element corresponding to a classpath entry the path for the entry can be accessed by getting the value of the manifest element For example pre element get Value the jar dir containing the code pre  IPluginDescriptor getInstallURL getValue
Returns this library s type return the type of this library The valid types are code CODE code and code RESOURCE code see CODE see RESOURCE deprecated As of Eclipse 3 0 library types are obsolete There is no replacement 
Returns whether the library is exported The contents of an exported library may be visible to other plug ins that declare a dependency on the plug in containing this library subject to content filtering Libraries that are not exported are entirely private to the declaring plug in return code true code if the library is exported code false code if it is private deprecated As of Eclipse 3 0 exporting an individual library is obsolete There is no replacement 
Returns whether this library is fully exported A library is considered fully exported iff it is exported and has no content filters return code true code if the library is fully exported and code false code if it is private or has filtered content deprecated As of Eclipse 3 0 exporting an individual library is obsolete There is no replacement 
Returns the array of package prefixes that this library declares This is used in classloader enhancements and is an optional entry in the plugin xml return the array of package prefixes or code null code since 2 1 deprecated As of Eclipse 3 0 package prefix filtering is obsolete There is no replacement 

public interface I Log Adds the given log listener to this log Subsequently the log listener will receive notification of all log events passing through this log This method has no affect if the identical listener is already registered on this log param listener the listener to add to this log see Platform add Log Listener I Log Listener  ILog addLogListener ILogListener
Returns the plug in with which this log is associated p b Note b This is an early access API to the new OSGI based Eclipse 3 0 Platform Runtime Because the AP Is for the new runtime have not yet been fully stabilized they should only be used by clients needing to take particular advantage of new OSGI specific functionality and only then with the understanding that these AP Is may well change in incompatible ways until they reach their finished stable form post 3 0 p return the plug in with which this log is associated since 3 0  APIs APIs
Logs the given status The status is distributed to the log listeners installed on this log and then to the log listeners installed on the platform param status the status to log 
Removes the given log listener to this log Subsequently the log listener will no longer receive notification of log events passing through this log This method has no affect if the identical listener is not registered on this log param listener the listener to remove see Platform remove Log Listener I Log Listener  removeLogListener ILogListener

public interface I Log Listener extends Event Listener Notifies this listener that given status has been logged by a plug in The listener is free to retain or ignore this status param status the status being logged param plugin the plugin of the log which generated this event  ILogListener EventListener

Returns a new path which is the same as this path but with the given file extension added If this path is empty root or has a trailing separator this path is returned If this path already has an extension the existing extension is left and the given extension simply appended Clients wishing to replace the current extension should first remove the extension and then add the desired one p The file extension portion is defined as the string following the last period character in the last segment The given extension should not include a leading p param extension the file extension to append return the new path 
Returns a path with the same segments as this path but with a trailing separator added This path must have at least one segment p If this path already has a trailing separator this path is returned p return the new path see has Trailing Separator see remove Trailing Separator  hasTrailingSeparator removeTrailingSeparator
Returns the canonicalized path obtained from the concatenation of the given string path to the end of this path The given string path must be a valid path If it has a trailing separator the result will have a trailing separator The device id of this path is preserved the one of the given string is ignored Duplicate slashes are removed from the path except at the beginning where the path is considered to be UNC param path the string path to concatenate return the new path see is Valid Path String  isValidPath
Returns the canonicalized path obtained from the concatenation of the given path s segments to the end of this path If the given path has a trailing separator the result will have a trailing separator The device id of this path is preserved the one of the given path is ignored Duplicate slashes are removed from the path except at the beginning where the path is considered to be UNC param path the path to concatenate return the new path 
Returns a copy of this path return the cloned path 
Returns whether this path equals the given object p Equality for paths is defined to be same sequence of segments same absolute relative status and same device Trailing separators are disregarded Paths are not generally considered equal to objects other than paths p param obj the other object return code true code if the paths are equivalent and code false code if they are not 
Returns the device id for this path or code null code if this path has no device id Note that the result will end in return the device id or code null code see set Device String  setDevice
Returns the file extension portion of this path or code null code if there is none p The file extension portion is defined as the string following the last period character in the last segment If there is no period in the last segment the path has no file extension portion If the last segment ends in a period the file extension portion is the empty string p return the file extension or code null code 
Returns whether this path has a trailing separator p Note In the root path the separator is considered to be leading rather than trailing p return code true code if this path has a trailing separator and code false code otherwise see add Trailing Separator see remove Trailing Separator  addTrailingSeparator removeTrailingSeparator
Returns whether this path is an absolute path ignoring any device id p Absolute paths start with a path separator A root path like code code or code C code is considered absolute UNC paths are always absolute p return code true code if this path is an absolute path and code false code otherwise 
Returns whether this path has no segments and is not a root path return code true code if this path is empty and code false code otherwise 
Returns whether this path is a prefix of the given path To be a prefix this path s segments must appear in the argument path in the same order and their device ids must match p An empty path is a prefix of all paths with the same device a root path is a prefix of all absolute paths with the same device p param another Path the other path return code true code if this path is a prefix of the given path and code false code otherwise  anotherPath
Returns whether this path is a root path p The root path is the absolute non UNC path with zero segments e g code code or code C code The separator is considered a leading separator not a trailing one p return code true code if this path is a root path and code false code otherwise 
Returns a boolean value indicating whether or not this path is considered to be in UNC form Return false if this path has a device set or if the first 2 characters of the path string are not code Path SEPARATOR code return boolean indicating if this path is UNC 
Returns whether the given string is syntactically correct as a path The device id is the prefix up to and including the first the path proper is everything to the right of it or the entire string if there is no The device id is not checked for validity the path proper is correct if each of the segments in its canonicalized form is valid param path the path to check return code true code if the given string is a valid path and code false code otherwise see is Valid Segment String  isValidSegment
Returns whether the given string is valid as a segment in a path The rules for valid segments are as follows ul li the empty string is not valid li any string containing the colon character is not valid li any string containing the slash character is not valid li any string containing the backslash character is not valid li any string starting or ending with a whitespace character is not valid li all other strings are valid ul param segment the path segment to check return code true code if the given path segment is valid and code false code otherwise see java lang Character is Whitespace char  isWhitespace
Returns the last segment of this path or code null code if it does not have any segments return the last segment of this path or code null code 
Returns an absolute path with the segments and device id of this path Absolute paths start with a path separator If this path is absolute it is simply returned return the new path 
Returns a relative path with the segments and device id of this path Absolute paths start with a path separator and relative paths do not If this path is relative it is simply returned return the new path 
Return a new path which is the equivalent of this path converted to UNC form if the given boolean is true or this path not as a UNC path if the given boolean is false If UNC the returned path will not have a device and the first 2 characters of the path string will be code Path SEPARATOR code If not UNC the first 2 characters of the returned path string will not be code Path SEPARATOR code param toUNC true if converting to UNC false otherwise return the new path either in UNC form or not depending on the boolean parm 
Returns a count of the number of segments which match in this path and the given path device ids are ignored comparing in increasing segment number order param another Path the other path return the number of matching segments  anotherPath
Returns a new path which is the same as this path but with the file extension removed If this path does not have an extension this path is returned p The file extension portion is defined as the string following the last period character in the last segment If there is no period in the last segment the path has no file extension portion If the last segment ends in a period the file extension portion is the empty string p return the new path 
Returns a copy of this path with the given number of segments removed from the beginning The device id is preserved The number must be greater or equal zero If the count is zero this path is returned The resulting path will always be a relative path with respect to this path If the number equals or exceeds the number of segments in this path an empty relative path is returned param count the number of segments to remove return the new path 
Returns a copy of this path with the given number of segments removed from the end The device id is preserved The number must be greater or equal zero If the count is zero this path is returned p If this path has a trailing separator it will still have a trailing separator after the last segments are removed assuming there are some segments left If there is no trailing separator the result will not have a trailing separator If the number equals or exceeds the number of segments in this path an empty path is returned p param count the number of segments to remove return the new path 
Returns a path with the same segments as this path but with a trailing separator removed Does nothing if this path does not have at least one segment The device id is preserved p If this path does not have a trailing separator this path is returned p return the new path see add Trailing Separator see has Trailing Separator  addTrailingSeparator hasTrailingSeparator
Returns the specified segment of this path or code null code if the path does not have such a segment param index the 0 based segment index return the specified segment or code null code 
Returns the number of segments in this path p Note that both root and empty paths have 0 segments p return the number of segments 
Returns the segments in this path in order return an array of string segments 
Returns a new path which is the same as this path but with the given device id The device id must end with a A device independent path is obtained by passing code null code p For example C and Server Volume are typical device ids p param device the device id or code null code return a new path see get Device  getDevice
Returns a code java io File code corresponding to this path return the file corresponding to this path 
Returns a string representation of this path which uses the platform dependent path separator defined by code java io File code This method is like code to String code except that the latter always uses the same separator code code regardless of platform p This string is suitable for passing to code java io File String code p return a platform dependent string representation of this path  toString
Returns a string representation of this path including its device id The same separator is used on all platforms p Example result strings without and with device id pre foo bar txt bar txt foo foo C foo bar txt C bar txt C foo C foo C C pre This string is suitable for passing to code Path String code p return a string representation of this path see Path 
Returns a copy of this path truncated after the given number of segments The number must not be negative The device id is preserved p If this path has a trailing separator the result will too assuming there are some segments left If there is no trailing separator the result will not have a trailing separator Copying up to segment zero simply means making an copy with no path segments p param count the segment number at which to truncate the path return the new path 

Runs this runnable with the given args and returns a result The content of the args is unchecked and should conform to the expectations of the runnable being invoked Typically this is a code String code array Applications can return any object they like If an code Integer code is returned it is treated as the program exit code if Eclipse is exiting param args the argument s to pass to the application return the return value of the application exception Exception if there is a problem running this runnable see EXIT OK see EXIT RESTART see EXIT RELAUNCH  EXIT_OK EXIT_RESTART EXIT_RELAUNCH

public interface I Plugin Descriptor Returns the extension with the given simple identifier declared in this plug in or code null code if there is no such extension Since an extension might not have an identifier some extensions can only be found via the code get Extensions code method param extension Name the simple identifier of the extension e g code main code return the extension or code null code deprecated Use pre Platform get Extension Registry get Extension id extension Name pre where code id code is the plug in id  IPluginDescriptor getExtensions extensionName getExtensionRegistry getExtension extensionName
Returns the extension point with the given simple identifier declared in this plug in or code null code if there is no such extension point param extension Point Id the simple identifier of the extension point e g code wizard code return the extension point or code null code deprecated Use pre Platform get Extension Registry get Extension Point id extension Point Id pre where code id code is the plug in id  extensionPointId getExtensionRegistry getExtensionPoint extensionPointId
Returns all extension points declared by this plug in Returns an empty array if this plug in does not declare any extension points return the extension points declared by this plug in deprecated Use pre Platform get Extension Registry get Extension Points id pre where code id code is the plug in id  getExtensionRegistry getExtensionPoints
Returns all extensions declared by this plug in Returns an empty array if this plug in does not declare any extensions return the extensions declared by this plug in deprecated Use pre Platform get Extension Registry get Extensions id pre where code id code is the plug in id  getExtensionRegistry getExtensions
Returns the URL of this plug in s install directory This is the directory containing the plug in manifest file resource bundle runtime libraries and any other files supplied with this plug in This directory is usually read only Plug in relative information should be written to the location provided by code Plugin get State Location code return the URL of this plug in s install directory see get Plugin see Plugin get State Location deprecated Use pre bundle get Entry pre where code bundle code is the bundle associated with the relevant plug in or simply use the code get Entry code API to construct the desired URL  getStateLocation getPlugin getStateLocation getEntry getEntry
Returns a displayable label for this plug in Returns the empty string if no label for this plug in is specified in the plug in manifest file p Note that any translation specified in the plug in manifest file is automatically applied p return a displayable string label for this plug in possibly the empty string see get Resource String String deprecated Use pre bundle get Headers get org osgi framework Constants BUNDLE NAME pre where code bundle code is the bundle associated with the relevant plug in  getResourceString getHeaders BUNDLE_NAME
Returns the plug in runtime object corresponding to this plug in descriptor Unlike other methods on this object invoking this method may activate the plug in The returned object is an instance of the plug in runtime class specified in the plug in s manifest file if a class is not specified there the returned object is an internally supplied one that does not react to life cycle requests return the plug in runtime object exception Core Exception if this plug in s runtime object could not be created see is Plugin Activated deprecated In Eclipse 3 0 plug in runtime objects are not globally managed and so are not generically accessible Rather each plug in is free to declare API which exposes the plug in runtime object e g code My Plugin get Instance code If this method is being used to activate a plug in then the following code is equivalent pre bundle start pre where code bundle code is the bundle associated with the relevant plug in  CoreException isPluginActivated MyPlugin getInstance
Returns the plug in class loader used to load classes and resources for this plug in The class loader can be used to directly access plug in resources and classes Note that accessing a resource will b not activate b the corresponding plug in Successfully loading a class will b always activate b the corresponding plug in p The following examples illustrate the direct use of the plug in class loader and its effect on plug in activation example ignores error handling pre Class Loader loader descriptor get Plugin Class Loader Load resource by name Will not activate the plug in URL res loader get Resource com example Foo button gif Input Stream is loader get Resource As Stream splash jpg Load resource for class Will activate the plug in because the referenced class is loaded first and triggers activation URL u com example Foo class get Resource button gif Load class by name Will activate the plug in Class c loader load Class com example Bar Load a resource bundle May or may not activate the plug in depending on the bundle implementation If implemented as a class the plug in will be activated If implemented as a properties file the plug in will not be activated Resource Bundle b Resource Bundle get Bundle bundle Locale get Default loader pre return the plug in class loader see I Configuration Element create Executable Extension String see is Plugin Activated see get Resource Bundle deprecated Use pre bundle load Class class Name pre where code bundle code is the bundle associated with the relevant plug in  ClassLoader getPluginClassLoader getResource InputStream getResourceAsStream getResource loadClass ResourceBundle ResourceBundle getBundle getDefault IConfigurationElement createExecutableExtension isPluginActivated getResourceBundle loadClass className
Returns a list of plug in prerequisites required for correct execution of this plug in return an array of plug in prerequisites or an empty array if no prerequisites were specified deprecated Use pre import org eclipse osgi util Manifest Element import org osgi framework Constants String requires bundle get Headers get Constants REQUIRE BUNDLE Manifest Element elements Manifest Element parse Header Constants REQUIRE BUNDLE requires pre where code bundle code is the bundle associated with the relevant plug in The resultant elements array contains one entry for each required plug in  ManifestElement getHeaders REQUIRE_BUNDLE ManifestElement ManifestElement parseHeader REQUIRE_BUNDLE
Returns the name of the provider of this plug in Returns the empty string if no provider name is specified in the plug in manifest file p Note that any translation specified in the plug in manifest file is automatically applied p return the name of the provider possibly the empty string see get Resource String String deprecated Use pre bundle get Headers get org osgi framework Constants BUNDLE VENDOR pre where code bundle code is the bundle associated with the relevant plug in  getResourceString getHeaders BUNDLE_VENDOR
Returns this plug in s resource bundle for the current locale p The bundle is stored as the code plugin properties code file in the plug in install directory and contains any translatable strings used in the plug in manifest file code plugin xml code along with other resource strings used by the plug in implementation p return the resource bundle exception Missing Resource Exception if the resource bundle was not found deprecated Use pre Platform get Resource Bundle bundle pre where code bundle code is the bundle associated with the relevant plug in  MissingResourceException 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 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 plugin properties 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 begining with the character Note that the character is stripped off prior to lookup in the resource bundle p Equivalent to code get Resource String value get Resource Bundle code p param value the value return the resource string see get Resource Bundle deprecated Use pre Platform get Resource String bundle value pre where code bundle code is the bundle associated with the relevant plug in  getResourceString getResourceBundle getResourceBundle getResourceString
Returns a resource string corresponding to the given argument value and 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 begining 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 value the value param resource Bundle the resource bundle return the resource string see get Resource Bundle deprecated Use pre Platform get Resource String bundle value resource Bundle pre where code bundle code is the bundle associated with the relevant plug in  getResourceString getResourceString getResourceString getResourceString getResourceString getResourceString resourceBundle getResourceBundle getResourceString resourceBundle
Returns all runtime libraries declared by this plug in Returns an empty array if this plug in has no runtime libraries return the runtime libraries declared by this plug in deprecated Use pre import org eclipse osgi util Manifest Element import org osgi framework Constants String requires bundle get Headers get Constants BUNDLE CLASSPATH Manifest Element elements Manifest Element parse Header Constants BUNDLE CLASSPATH requires pre where code bundle code is the bundle associated with the relevant plug in The resultant elements array contains one entry for each entry on the bundle s classpath  ManifestElement getHeaders BUNDLE_CLASSPATH ManifestElement ManifestElement parseHeader BUNDLE_CLASSPATH
Returns the unique identifier of this plug in This identifier is a non empty string and is unique within the plug in registry return the unique identifier of the plug in e g code org eclipse core runtime code deprecated Use pre bundle get Symbolic Name pre where code bundle code is the bundle associated with the relevant plug in  getSymbolicName
Returns the version identifier of this plug in return the plug in version identifier deprecated Use pre String version String bundle get Headers get org osgi framework Constants BUNDLE VERSION new Plugin Version Identifier version pre where code bundle code is the bundle associated with the relevant plug in  getHeaders BUNDLE_VERSION PluginVersionIdentifier
Returns whether the plug in described by this descriptor has been activated Invoking this method will not cause the plug in to be activated return code true code if this plug in is activated and code false code otherwise see get Plugin deprecated Use pre bundle get State org osgi framework Bundle ACTIVE pre where code bundle code is the bundle associated with the relevant plug in  getPlugin getState
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 It is not necessary to perform a resolve on this URL since 2 0 deprecated Use pre Platform find bundle file pre where code bundle code is the bundle associated with the relevant plug in 
Returns a URL for the given path Returns code null code if the URL could not be computed or created find will look for this path under the directory structure for this plugin and any of its fragments If this path will yield a result outside the scope of this plugin code null code will be returned Note that there is no specific order to the fragments The following arguments may also be used nl for language specific information os for operating system specific information ws for windowing system specific information 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 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 If a locale other than the default locale is desired use an override map 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 It is not necessary to perform a resolve on this URL since 2 0 deprecated Use pre Platform find bundle path override pre where code bundle code is the bundle associated with the relevant plug in  en_CA

public interface I Plugin Prerequisite Returns the actual version identifier that is used at runtime to resolve this prerequisite dependency or null if the dependency is not resolved return the plug in version identifier or null deprecated Callers of this method should interrogate the current link State of the platform For example pre State state Platform get Platform Admin get State Bundle Description bundle state get Bundle my plug in id my plug in version Bundle Specification spec bundle get Required Bundle required plug in id Bundle Description prereq spec get Supplier pre  IPluginPrerequisite getPlatformAdmin getState BundleDescription getBundle BundleSpecification getRequiredBundle BundleDescription getSupplier
Returns the plug in identifier of the prerequisite plug in return the plug in identifier deprecated Given a manifest element equivalent of a plug in prerequisite see the class comment this method is replaced by pre element get Value pre  getValue
Returns the version identifier of the prerequisite plug in or code null code if none return the plug in version identifier or code null code if none was specified deprecated Callers of this method should interrogate the current link State of the platform For example pre State state Platform get Platform Admin get State Bundle Description bundle state get Bundle my plug in id my plug in version Bundle Specification spec bundle get Required Bundle required plug in id Version req Min Version spec get Version Range get Minimum pre  getPlatformAdmin getState BundleDescription getBundle BundleSpecification getRequiredBundle reqMinVersion getVersionRange getMinimum
Indicates whether this prerequisite plug in is further exposed to any plug ins that declare a dependency on this plug in This allows for chaining of dependencies For example if plug in A depends on plug in B which depends on plug in C the classes from C are typically visible to B but not to A A can get around this if either B explicitly exports its dependency on C or A explicitly declares C as a prerequisite in addition to B return code true code if this prerequisite plug in is exposed code false code otherwise deprecated Given a manifest element equivalent of a plug in prerequisite see the class comment this method is replaced by pre element get Attribute Constants REPROVIDE ATTRIBUTE pre  getAttribute REPROVIDE_ATTRIBUTE
Indicates that this plug in prerequisite can be resolved against a configured plug in with an identifier that is greater than or equal to it return code true code if greater or equal match is allowed code false code otherwise since 2 0 deprecated Callers of this method should interrogate the current link State of the platform For example pre State state Platform get Platform Admin get State Bundle Description bundle state get Bundle my plug in id my plug in version Bundle Specification spec bundle get Required Bundle required plug in id Version Range version Range spec get Version Range if version Range null version Range get Minimum null return false Version minimum version Range get Minimum Version maximum version Range get Maximum null Version max Version version Range get Maximum if maximum equals Version max Version return true return false pre  getPlatformAdmin getState BundleDescription getBundle BundleSpecification getRequiredBundle VersionRange versionRange getVersionRange versionRange versionRange getMinimum versionRange getMinimum versionRange getMaximum maxVersion versionRange getMaximum maxVersion
Indicates that this plug in prerequisite can be resolved against a configured plug in with a compatible identifier return code true code if compatible match is allowed code false code if exact match is required deprecated Callers of this method should interrogate the current link State of the platform For example pre State state Platform get Platform Admin get State Bundle Description bundle state get Bundle my plug in id my plug in version Bundle Specification spec bundle get Required Bundle required plug in id Version Range version Range spec get Version Range if version Range null version Range get Minimum null return false Version minimum version Range get Minimum Version maximum version Range get Maximum null Version max Version version Range get Maximum if minimum is Inclusive maximum is Inclusive return false else if minimum get Major Component maximum get Major Component 1 return true return false pre  getPlatformAdmin getState BundleDescription getBundle BundleSpecification getRequiredBundle VersionRange versionRange getVersionRange versionRange versionRange getMinimum versionRange getMinimum versionRange getMaximum maxVersion versionRange getMaximum isInclusive isInclusive getMajorComponent getMajorComponent
Indicates that this plug in prerequisite can only be resolved against a configured plug in with an equivalent plug in identifier return code true code if only equivalent identifier match satisfies this dependency code false code otherwise since 2 0 deprecated Callers of this method should interrogate the current link State of the platform For example pre State state Platform get Platform Admin get State Bundle Description bundle state get Bundle my plug in id my plug in version Bundle Specification spec bundle get Required Bundle required plug in id Version Range version Range spec get Version Range if version Range null version Range get Minimum null return false Version minimum version Range get Minimum Version maximum version Range get Maximum null Version max Version version Range get Maximum if minimum is Inclusive maximum is Inclusive return false else if minimum get Major Component maximum get Major Component 1 return false else if minimum get Major Component maximum get Major Component return false else if minimum get Minor Component maximum get Minor Component 1 return true return false pre  getPlatformAdmin getState BundleDescription getBundle BundleSpecification getRequiredBundle VersionRange versionRange getVersionRange versionRange versionRange getMinimum versionRange getMinimum versionRange getMaximum maxVersion versionRange getMaximum isInclusive isInclusive getMajorComponent getMajorComponent getMajorComponent getMajorComponent getMinorComponent getMinorComponent
Indicates that this plug in prerequisite can only be resolved against a configured plug in with a plug in identifier that is perfectly equal return code true code if only perfectly equal identifier match satisfies this dependency code false code otherwise since 2 0 deprecated Callers of this method should interrogate the current link State of the platform For example pre State state Platform get Platform Admin get State Bundle Description bundle state get Bundle my plug in id my plug in version Bundle Specification spec bundle get Required Bundle required plug in id Version Range version Range spec get Version Range if version Range null version Range get Minimum null return false Version minimum version Range get Minimum Version maximum version Range get Maximum null Version max Version version Range get Maximum if minimum equals maximum return true return false pre  getPlatformAdmin getState BundleDescription getBundle BundleSpecification getRequiredBundle VersionRange versionRange getVersionRange versionRange versionRange getMinimum versionRange getMinimum versionRange getMaximum maxVersion versionRange getMaximum
Indicates that this plug in prerequisite can only be resolved against a configured plug in with exactly the same plug in identifier return code true code if only exact identifier match satisfies this dependency code false code if compatible plug in will satisfy this dependency deprecated Callers of this method should interrogate the current link State of the platform For example pre State state Platform get Platform Admin get State Bundle Description bundle state get Bundle my plug in id my plug in version Bundle Specification spec bundle get Required Bundle required plug in id Version Range version Range spec get Version Range if version Range null version Range get Minimum null return false Version minimum version Range get Minimum Version maximum version Range get Maximum null Version max Version version Range get Maximum if minimum is Inclusive maximum is Inclusive return false else if minimum get Major Component maximum get Major Component 1 return false else if minimum get Major Component maximum get Major Component return false else if minimum get Minor Component maximum get Minor Component 1 return true return false pre  getPlatformAdmin getState BundleDescription getBundle BundleSpecification getRequiredBundle VersionRange versionRange getVersionRange versionRange versionRange getMinimum versionRange getMinimum versionRange getMaximum maxVersion versionRange getMaximum isInclusive isInclusive getMajorComponent getMajorComponent getMajorComponent getMajorComponent getMinorComponent getMinorComponent
Indicates whether this plug in prerequisite is optional If a required i e non optional prerequisite is missing this plugin is disabled return code true code if this prerequisite is optional code false code otherwise deprecated Given a manifest element equivalent of a plug in prerequisite see the class comment this method is replaced by pre true equals element get Attribute Constants OPTIONAL ATTRIBUTE pre  getAttribute OPTIONAL_ATTRIBUTE

public interface I Plugin Registry Returns all configuration elements from all extensions configured into the identified extension point Returns an empty array if the extension point does not exist has no extensions configured or none of the extensions contain configuration elements param extension Point Id the unique identifier of the extension point e g code org eclipse core resources builders code return the configuration elements deprecated Replaced by link I Extension Registry get Configuration Elements For String  IPluginRegistry extensionPointId IExtensionRegistry getConfigurationElementsFor
Returns all configuration elements from all extensions configured into the identified extension point Returns an empty array if the extension point does not exist has no extensions configured or none of the extensions contain configuration elements param plugin Id the unique identifier of the plug in e g code org eclipse core resources code param extension Point Name the simple identifier of the extension point e g code builders code return the configuration elements deprecated Replaced by link I Extension Registry get Configuration Elements For String String  pluginId extensionPointName IExtensionRegistry getConfigurationElementsFor
Returns all configuration elements from the identified extension Returns an empty array if the extension does not exist or contains no configuration elements param plugin Id the unique identifier of the plug in e g code org eclipse core resources code param extension Point Name the simple identifier of the extension point e g code builders code param extension Id the unique identifier of the extension e g code com example acme coolbuilder code return the configuration elements deprecated Replaced by link I Extension Registry get Configuration Elements For String String String  pluginId extensionPointName extensionId IExtensionRegistry getConfigurationElementsFor
Returns the specified extension in this plug in registry or code null code if there is no such extension The first parameter identifies the extension point and the second parameter identifies an extension plugged in to that extension point param extension Point Id the unique identifier of the extension point e g code org eclipse core resources builders code param extension Id the unique identifier of the extension e g code com example acme coolbuilder code return the extension or code null code deprecated Replaced by link I Extension Registry get Extension String String  extensionPointId extensionId IExtensionRegistry getExtension
Returns the specified extension in this plug in registry or code null code if there is no such extension The first two parameters identify the extension point and the third parameter identifies an extension plugged in to that extension point param plugin Id the unique identifier of the plug in e g code org eclipse core resources code param extension Point Name the simple identifier of the extension point e g code builders code param extension Id the unique identifier of the extension e g code com example acme coolbuilder code return the extension or code null code deprecated Replaced by link I Extension Registry get Extension String String String  pluginId extensionPointName extensionId IExtensionRegistry getExtension
Returns the extension point with the given extension point identifier in this plug in registry or code null code if there is no such extension point param extension Point Id the unique identifier of the extension point e g code org eclipse core resources builders code return the extension point or code null code deprecated Replaced by link I Extension Registry get Extension Point String  extensionPointId IExtensionRegistry getExtensionPoint
Returns the extension point in this plug in registry with the given plug in identifier and extension point simple identifier or code null code if there is no such extension point param plugin Id the unique identifier of the plug in e g code org eclipse core resources code param extension Point Name the simple identifier of the extension point e g code builders code return the extension point or code null code deprecated Replaced by link I Extension Registry get Extension Point String String  pluginId extensionPointName IExtensionRegistry getExtensionPoint
Returns all extension points known to this plug in registry Returns an empty array if there are no extension points return the extension points known to this plug in registry deprecated Replaced by link I Extension Registry get Extension Points  IExtensionRegistry getExtensionPoints
Returns the plug in descriptor with the given plug in identifier in this plug in registry or code null code if there is no such plug in If there are multiple versions of the identified plug in one will be non deterministically chosen and returned param plugin Id the unique identifier of the plug in e g code com example acme code return the plug in descriptor or code null code deprecated code I Plugin Descriptor code was refactored in Eclipse 3 0 The code get Plugin 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  pluginId IPluginDescriptor getPluginDescriptor IPluginDescriptor
Returns the plug in descriptor with the given plug in identifier and version in this plug in registry or code null code if there is no such plug in param plugin Id the unique identifier of the plug in e g code org eclipse core resources code param version plug in version identifier If code null code is specified a non deterministically chosen version of the identified plug in if any will be returned return the plug in descriptor or code null code deprecated code I Plugin Descriptor code was refactored in Eclipse 3 0 The code get Plugin 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  pluginId IPluginDescriptor getPluginDescriptor IPluginDescriptor
Returns all plug in descriptors known to this plug in registry Returns an empty array if there are no installed plug ins return the plug in descriptors known to this plug in registry deprecated code I Plugin Descriptor code was refactored in Eclipse 3 0 The code get Plugin Descriptors 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  IPluginDescriptor getPluginDescriptors IPluginDescriptor
Returns all versions of the identified plug in descriptor known to this plug in registry Returns an empty array if there are no plug ins with the specified identifier param plugin Id the unique identifier of the plug in e g code org eclipse core resources code return the plug in descriptors known to this plug in registry deprecated code I Plugin Descriptor code was refactored in Eclipse 3 0 The code get Plugin Descriptors 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  pluginId IPluginDescriptor getPluginDescriptors IPluginDescriptor

public interface I Product Returns the applicatoin associated with this product This information is used to guide the runtime as to what application extension to create and execute return this product s application or code null code if none  IProduct
Returns the name of this product The name is typcially used in the title bar of UI windows return the name of this product or code null code if none 
Returns the text desciption of this product return the description of this product or code null code if none 
Returns the unique product id of this product return the id of this product 
Returns the property of this product with the given key code null code is returned if there is no such key value pair param key the name of the property to return return the value associated with the given key or code null code if none 
Returns the bundle which is responsible for the definition of this product Typically this is used as a base for searching for images and other files that are needed in presenting the product return the bundle which defines this product or code null code if none 

public interface I Product Provider Returns the human readable name of this product provider return the name of this product provider  IProductProvider
Returns the products provided by this provider return the products provided by this provider 

Notifies that the main task is beginning This must only be called once on a given progress monitor instance param name the name or description of the main task param total Work the total number of work units into which the main task is been subdivided If the value is code UNKNOWN code the implemenation is free to indicate progress in a way which doesn t require the total number of work units in advance  totalWork
Notifies that the work is done that is either the main task is completed or the user canceled it This method may be called more than once implementations should be prepared to handle this case 
Internal method to handle scaling correctly This method must not be called by a client Clients should always use the method code worked int code param work the amound of work done 
Returns whether cancelation of current operation has been requested Long running operations should poll to see if cancelation has been requested return code true code if cancellation has been requested and code false code otherwise see set Canceled boolean  setCanceled
Sets the cancel state to the given value param value code true code indicates that cancelation has been requested but not necessarily acknowledged code false code clears this flag see is Canceled  isCanceled
Sets the task name to the given value This method is used to restore the task label after a nested operation was executed Normally there is no need for clients to call this method param name the name or description of the main task see begin Task java lang String int  beginTask
Notifies that a subtask of the main task is beginning Subtasks are optional the main task might not have subtasks param name the name or description of the subtask 
Notifies that a given number of work unit of the main task has been completed Note that this amount represents an installment as opposed to a cumulative amount of work done to date param work the number of work units just completed 

public interface I Progress Monitor With Blocking extends I Progress Monitor Indicates that this operation is blocked by some background activity If a running operation ever calls code set Blocked code it must eventually call code clear Blocked code before the operation completes p If the caller is blocked by a currently executing job this method will return an code I Job Status code indicating the job that is currently blocking the caller If this blocking job is not known this method will return a plain informational code I Status code object p param reason an optional status object whose message describes the reason why this operation is blocked or code null code if this information is not available see clear Blocked see org eclipse core runtime jobs I Job Status  IProgressMonitorWithBlocking IProgressMonitor setBlocked clearBlocked IJobStatus IStatus clearBlocked IJobStatus
Clears the blocked state of the running operation If a running operation ever calls code set Blocked code it must eventually call code clear Blocked code before the operation completes see set Blocked I Status  setBlocked clearBlocked setBlocked IStatus

public interface I Registry Change Event Returns all extension deltas for all hosts Returns an empty array if there are no deltas in this event return all extension deltas  IRegistryChangeEvent
Returns all extension deltas for the given namespace Returns an empty array if there are no deltas in this event for any extension points provided in the given namespace param namespace the namespace for the extension deltas return all extension deltas for the given namespace 
Returns all the extension deltas for the given namespace and extension point Returns an empty array if there are no deltas in this event for the given extension point param namespace the namespace for the extension point param extension Point the simple identifier of the extension point e g code builders code return all extension deltas for the given extension point  extensionPoint
Returns the delta for the given namespace extension point and extension Returns code null code if none exists in this event param namespace the namespace for the extension point param extension Point the simple identifier of the extension point e g code builders code param extension the unique identifier of the extension return the extension delta or code null code  extensionPoint

public interface I Registry Change Listener extends Event Listener Notifies this listener that some registry changes are happening or have already happened p The supplied event gives details This event object and the deltas in it is valid only for the duration of the invocation of this method p p Note This method is called by the platform it is not intended to be called directly by clients p param event the registry change event see I Registry Change Event  IRegistryChangeListener EventListener IRegistryChangeEvent

public interface I Safe Runnable Handles an exception thrown by this runnable s code run code method The processing done here should be specific to the particular usecase for this runnable Generalized exception processing e g logging in the platform s log is done by the Platform s run mechanism param exception an exception which occurred during processing the body of this runnable i e in code run code see Platform run I Safe Runnable  ISafeRunnable ISafeRunnable
Runs this runnable Any exceptions thrown from this method will be passed to this runnable s code handle Exception code method exception Exception if a problem occurred while running this method The exception will be processed by code handle Exception code see Platform run I Safe Runnable  handleException handleException ISafeRunnable

Returns a list of status object immediately contained in this multi status or an empty list if this is not a multi status return an array of status objects see is Multi Status  isMultiStatus
Returns the plug in specific status code describing the outcome return plug in specific status code 
Returns the relevant low level exception or code null code if none For example when an operation fails because of a network communications failure this might return the code java io IO Exception code describing the exact nature of that failure return the relevant low level exception or code null code if none  IOException
Returns the message describing the outcome The message is localized to the current locale return a localized message 
Returns the unique identifier of the plug in associated with this status this is the plug in that defines the meaning of the status code return the unique identifier of the relevant plug in 
Returns the severity The severities are as follows in descending order ul li code CANCEL code cancelation occurred li li code ERROR code a serious error most severe li li code WARNING code a warning less severe li li code INFO code an informational fyi message least severe li li code OK code everything is just fine li ul p The severity of a multi status is defined to be the maximum severity of any of its children or code OK code if it has no children p return the severity one of code OK code code ERROR code code INFO code code WARNING code or code CANCEL code see matches int 
Returns whether this status is a multi status A multi status describes the outcome of an operation involving multiple operands p The severity of a multi status is derived from the severities of its children a multi status with no children is code OK code by definition A multi status carries a plug in identifier a status code a message and an optional exception Clients may treat multi status objects in a multi status unaware way p return code true code for a multi status code false code otherwise see get Children  getChildren
Returns whether this status indicates everything is okay neither info warning nor error return code true code if this status has severity code OK code and code false code otherwise 
Returns whether the severity of this status matches the given specification param severity Mask a mask formed by bitwise or ing severity mask constants code ERROR code code WARNING code code INFO code return code true code if there is at least one match code false code if there are no matches see get Severity see CANCEL see ERROR see WARNING see INFO  severityMask getSeverity

public interface I Job Change Event The amount of time in milliseconds to wait after scheduling the job before it should be run or code 1 code if not applicable for this type of event This value is only applicable for the code scheduled code event return the delay time for this event  IJobChangeEvent
The job on which this event occurred return the job for this event 
The result returned by the job s run method or code null code if not applicable This value is only applicable for the code done code event return the status for this event 

public interface I Job Change Listener Notification that a job is about to be run Listeners are allowed to sleep cancel or change the priority of the job before it is started and as a result may prevent the run from actually occurring param event the event details  IJobChangeListener
Notification that a job was previously sleeping and has now been rescheduled to run param event the event details 
Notification that a job has completed execution either due to cancelation successful completion or failure The event status object indicates how the job finished and the reason for failure if applicable param event the event details 
Notification that a job has started running param event the event details 
Notification that a job is being added to the queue of scheduled jobs The event details includes the scheduling delay before the job should start running param event the event details including the job instance and the scheduling delay 
Notification that a job was waiting to run and has now been put in the sleeping state param event the event details 

public interface I Job Manager Registers a job listener with the job manager Has no effect if an identical listener is already registered param listener the listener to be added see remove Job Change Listener I Job Change Listener see I Job Change Listener  IJobManager removeJobChangeListener IJobChangeListener IJobChangeListener
Begins applying this rule in the calling thread If the rule conficts with another rule currently running in another thread this method blocks until there are no conflicting rules Calls to tt begin Rule tt must eventually be followed by a matching call to tt end Rule tt in the same thread and with the identical rule instance p Rules can be nested only if the rule for the inner tt begin Rule tt is contained within the rule for the outer tt begin Rule tt Rule containment is tested with the API method tt I Scheduling Rule contains tt Also begin end pairs must be strictly nested Only the rule that has most recently begun can be ended at any given time p A rule of code null code can be used but will be ignored for scheduling purposes The outermost non null rule in the thread will be used for scheduling A code null code rule that is begun must still be ended p If this method is called from within a job that has a scheduling rule the given rule must also be contained within the rule for the running job p Note that tt end Rule tt must be called even if tt begin Rule tt fails The recommended usage is pre final I Scheduling Rule rule try manager begin Rule rule monitor finally manager end Rule rule pre param rule the rule to begin applying in this thread or code null code param monitor a progress monitor or code null code if progress reporting and cancellation are not desired throws Illegal Argument Exception if the rule is not strictly nested within all other rules currently active for this thread throws Operation Canceled Exception if the supplied monitor reports cancelation before the rule becomes available see I Scheduling Rule contains I Scheduling Rule  beginRule endRule beginRule beginRule ISchedulingRule endRule beginRule ISchedulingRule beginRule endRule IllegalArgumentException OperationCanceledException ISchedulingRule ISchedulingRule
Cancels all jobs in the given job family Jobs in the family that are currently waiting will be removed from the queue Sleeping jobs will be discarded without having a chance to wake up Currently executing jobs will be asked to cancel but there is no guarantee that they will do so param family the job family to cancel or code null code to cancel all jobs see Job belongs To Object  belongsTo
Returns a progress monitor that can be used to provide aggregated progress feedback on a set of running jobs A user interface will typically group all jobs in a progress group together providing progress feedback for individual jobs as well as aggregrated progress for the entire group Jobs in the group may be run sequentially in parallel or some combination of the two p Recommended usage this snippet runs two jobs in sequence in a single progress group pre Job parse Job compile Job I Progress Monitor pm Platform get Job Manager create Progress Group try pm begin Task Building 10 parse Job set Progress Group pm 5 parse Job schedule compile Job set Progress Group pm 5 compile Job schedule parse Job join compile Job join finally pm done pre see Job set Progress Group I Progress Monitor int see I Progress Monitor return a progress monitor  parseJob compileJob IProgressMonitor getJobManager createProgressGroup beginTask parseJob setProgressGroup parseJob compileJob setProgressGroup compileJob parseJob compileJob setProgressGroup IProgressMonitor IProgressMonitor
Returns the job that is currently running in this thread or null if there is no currently running job return the job or code null code 
Ends the application of a rule to the calling thread Calls to tt end Rule tt must be preceded by a matching call to tt begin Rule tt in the same thread with an identical rule instance p Rules can be nested only if the rule for the inner tt begin Rule tt is contained within the rule for the outer tt begin Rule tt Also begin end pairs must be strictly nested Only the rule that has most recently begun can be ended at any given time param rule the rule to end applying in this thread throws Illegal Argument Exception if this method is called on a rule for which there is no matching begin or that does not match the most recent begin see I Scheduling Rule contains I Scheduling Rule  endRule beginRule beginRule beginRule IllegalArgumentException ISchedulingRule ISchedulingRule
Returns all waiting executing and sleeping jobs belonging to the given family If no jobs are found an empty array is returned param family the job family to find or code null code to find all jobs return the job array see Job belongs To Object  belongsTo
Waits until all jobs of the given family are finished This method will block the calling thread until all such jobs have finished executing or until this thread is interrupted If there are no jobs in the family that are currently waiting running or sleeping this method returns immediately Feedback on how the join is progressing is provided to a progress monitor p Note that there is a deadlock risk when using join If the calling thread owns a lock or object monitor that the joined thread is waiting for deadlock will occur This method can also result in starvation of the current thread if another thread continues to add jobs of the given family or if a job in the given family reschedules itself in an infinite loop p param family the job family to join or code null code to join all jobs param monitor Progress monitor for reporting progress on how the wait is progressing or code null code if no progress monitoring is required exception Interrupted Exception if this thread is interrupted while waiting exception Operation Canceled Exception if the progress monitor is canceled while waiting see Job belongs To Object  InterruptedException OperationCanceledException belongsTo
Creates a new lock object All lock objects supplied by the job manager know about each other and will always avoid circular deadlock amongst themselves return the new lock object 
Removes a job listener from the job manager Has no effect if an identical listener is not already registered param listener the listener to be removed see add Job Change Listener I Job Change Listener see I Job Change Listener  addJobChangeListener IJobChangeListener IJobChangeListener
Resumes execution of jobs after a previous code suspend code All jobs that were sleeping or waiting prior to the suspension or that were scheduled while the job manager was suspended will now be elligible for execution p Calling this method on a rule that is not suspended has no effect If another thread also owns the rule at the time this method is called then the rule will not be resumed until all threads have released the rule see suspend I Scheduling Rule I Progress Monitor  ISchedulingRule IProgressMonitor
Resumes execution of jobs after a previous code suspend code All jobs that were sleeping or waiting prior to the suspension or that were scheduled while the job manager was suspended will now be elligible for execution p Calling code resume code when the job manager is not suspended has no effect see suspend 
Provides a hook that is notified whenever a thread is about to wait on a lock or when a thread is about to release a lock This hook must only be set once p This method is for internal use by the platform related plug ins Clients should not call this method p see Lock Listener  LockListener
Registers a progress provider with the job manager If there was a provider already registered it is replaced p This method is for internal use by the platform related plug ins Clients should not call this method p param provider the new provider or code null code if no progress is needed 
Suspends execution of all jobs Jobs that are already running when this method is invoked will complete as usual but all sleeping and waiting jobs will not be executed until the job manager is resumed p The job manager will remain suspended until a subsequent call to code resume code Further calls to code suspend code when the job manager is already suspended are ignored p All attempts to join sleeping and waiting jobs while the job manager is suspended will return immediately p Note that this very powerful function should be used with extreme caution Suspending the job manager will prevent all jobs in the system from executing which may have adverse affects on components that are relying on execution of jobs The job manager should never be suspended without intent to resume execution soon afterwards see resume 
Defers execution of all jobs with scheduling rules that conflict with the given rule The caller will be blocked until all currently executing jobs with conflicting rules are completed Conflicting jobs that are sleeping or waiting at the time this method is called will not be executed until the rule is resumed p While a rule is suspended all calls to code begin Rule code and code end Rule code on a suspended rule will not block the caller The rule remains suspended until a subsequent call to code resume I Scheduling Rule code with the identical rule instance Further calls to code suspend code with an identical rule prior to calling code resume code are ignored p p This method is long running progress and cancelation are provided by the given progress monitor In the case of cancelation the rule will not be suspended p Note this very powerful function should be used with extreme caution Suspending rules will prevent jobs in the system from executing which may have adverse effects on components that are relying on execution of jobs The job manager should never be suspended without intent to resume execution soon afterwards Deadlock will result if the thread responsible for resuming the rule attempts to join a suspended job param rule The scheduling rule to suspend Must not be code null code param monitor a progress monitor or code null code if progress reporting is not desired exception Operation Canceled Exception if the operation is canceled Cancelation can occur even if no progress monitor is provided see resume I Scheduling Rule  beginRule endRule ISchedulingRule OperationCanceledException ISchedulingRule
Requests that all jobs in the given job family be suspended Jobs currently waiting to be run will be removed from the queue and moved into the code SLEEPING code state Jobs that have been put to sleep will remain in that state until either resumed or canceled This method has no effect on jobs that are not currently waiting to be run p Sleeping jobs can be resumed using code wake Up code param family the job family to sleep or code null code to sleep all jobs see Job belongs To Object  wakeUp belongsTo
Resumes scheduling of all sleeping jobs in the given family This method has no effect on jobs in the family that are not currently sleeping param family the job family to wake up or code null code to wake up all jobs see Job belongs To Object  belongsTo

public interface I Job Status extends I Status Returns the job associated with this status return the job associated with this status  IJobStatus IStatus

public interface I Lock Attempts to acquire this lock If the lock is in use and the specified delay is greater than zero the calling thread will block until one of the following happens ul li This lock is available li li The thread is interrupted li li The specified delay has elapsed li ul p While a thread is waiting locks it already owns may be granted to other threads if necessary to break a deadlock In this situation the calling thread may be blocked for longer than the specified delay On returning from this call the calling thread will once again have exclusive access to any other locks it owned upon entering the acquire method param delay the number of milliseconds to delay return code true code if the lock was successfully acquired and code false code otherwise exception Interrupted Exception if the thread was interrupted  ILock InterruptedException
Acquires this lock If the lock is in use the calling thread will block until the lock becomes available If the calling thread owns several locks it will be blocked until all threads it requires become available or until the thread is interrupted While a thread is waiting its locks may be granted to other threads if necessary to break a deadlock On returning from this call the calling thread will have exclusive access to this lock and any other locks it owned upon entering the acquire method p This implementation ignores attempts to interrupt the thread If response to interruption is needed use the method code acquire long code 
Returns the number of nested acquires on this lock that have not been released This is the number of times that release must be called before the lock is freed return the number of nested acquires that have not been released 
Releases this lock Locks must only be released by the thread that currently owns the lock 

public interface I Scheduling Rule Returns whether this scheduling rule completely contains another scheduling rule Rules can only be nested within a thread if the inner rule is completely contained within the outer rule p Implementations of this method must obey the rules of a partial order relation on the set of all scheduling rules In particular implementations must be reflexive a contains a is always true antisymmetric a contains b and b contains a iff a equals b and transitive if a contains b and b contains c then a contains c Implementations of this method must return code false code when compared to a rule they know nothing about param rule the rule to check for containment return code true code if this rule contains the given rule and code false code otherwise  ISchedulingRule
Returns whether this scheduling rule is compatible with another scheduling rule If code true code is returned then no job with this rule will be run at the same time as a job with the conflicting rule If code false code is returned then the job manager is free to run jobs with these rules at the same time p Implementations of this method must be reflexive symmetric and consistent and must return code false code when compared to a rule they know nothing about param rule the rule to check for conflicts return code true code if the rule is conflicting and code false code otherwise 

Creates a new job with the specified name The job name is a human readable value that is displayed to users The name does not need to be unique but it must not be code null code param name the name of the job public Job String name super name 
Registers a job listener with this job Has no effect if an identical listener is already registered param listener the listener to be added public final void add Job Change Listener I Job Change Listener listener super add Job Change Listener listener  addJobChangeListener IJobChangeListener addJobChangeListener
Returns whether this job belongs to the given family Job families are represented as objects that are not interpreted or specified in any way by the job manager Thus a job can choose to belong to any number of families p Clients may override this method This default implementation always returns code false code Overriding implementations must return code false code for families they do not recognize p param family the job family identifier return code true code if this job belongs to the given family and code false code otherwise public boolean belongs To Object family return false  belongsTo
Stops the job If the job is currently waiting it will be removed from the queue If the job is sleeping it will be discarded without having a chance to resume and its sleeping state will be cleared If the job is currently executing it will be asked to stop but there is no guarantee that it will do so return code false code if the job is currently running and thus may not respond to cancelation and code true code in all other cases public final boolean cancel return super cancel 
Jobs that complete their execution asynchronously must indicate when they are finished by calling this method This method must not be called by a job that has not indicated that it is executing asynchronously p This method must not be called from within the scope of a job s code run code method Jobs should normally indicate completion by returning an appropriate status from the code run code method Jobs that return a status of code ASYNC FINISH code from their run method must later call code done code to indicate completion param result a status object indicating the result of the job s execution see ASYNC FINISH see run I Progress Monitor public final void done I Status result super done result  ASYNC_FINISH ASYNC_FINISH IProgressMonitor IStatus
Returns the human readable name of this job The name is never code null code return the name of this job public final String get Name return super get Name  getName getName
Returns the priority of this job The priority is used as a hint when the job is scheduled to be run return the priority of the job One of INTERACTIVE SHORT LONG BUILD or DECORATE public final int get Priority return super get Priority  getPriority getPriority
Returns the value of the property of this job identified by the given key or code null code if this job has no such property param key the name of the property return the value of the property or code null code if this job has no such property see set Property Qualified Name Object public final Object get Property Qualified Name key return super get Property key  setProperty QualifiedName getProperty QualifiedName getProperty
Returns the result of this job s last run return the result of this job s last run or code null code if this job has never finished running public final I Status get Result return super get Result  IStatus getResult getResult
Returns the scheduling rule for this job Returns code null code if this job has no scheduling rule return the scheduling rule for this job or code null code see I Scheduling Rule see set Rule I Scheduling Rule public final I Scheduling Rule get Rule return super get Rule  ISchedulingRule setRule ISchedulingRule ISchedulingRule getRule getRule
Returns the state of the job Result will be one of ul li code Job RUNNING code if the job is currently running li li code Job WAITING code if the job is waiting to be run li li code Job SLEEPING code if the job is sleeping li li code Job NONE code in all other cases li ul p Note that job state is inherently volatile and in most cases clients cannot rely on the result of this method being valid by the time the result is obtained For example if tt get State tt returns tt RUNNING tt the job may have actually completed by the time the tt get State tt method returns All clients can infer from invoking this method is that the job was recently in the returned state return the job state public final int get State return super get State  getState getState getState getState
Returns the thread that this job is currently running in return the thread this job is running in or code null code if this job is not running or the thread is unknown public final Thread get Thread return super get Thread  getThread getThread
Returns whether this job is blocking another non system job from starting due to a conflicting scheduling rule Returns code false code if this job is not running or is not blocking any other job return code true code if this job is blocking a waiting non system job and code false code otherwise see get Rule see is System public final boolean is Blocking return super is Blocking  getRule isSystem isBlocking isBlocking
Returns whether this job is a system job System jobs are typically not revealed to users in any UI presentation of jobs Other than their UI presentation system jobs act exactly like other jobs If this value is not explicitly set jobs are treated as non system jobs The default value is code false code return code true code if this job is a system job and code false code otherwise see set System boolean public final boolean is System return super is System  setSystem isSystem isSystem
Returns whether this job has been directly initiated by a UI end user These jobs may be presented differently in the UI The default value is code false code return code true code if this job is a user initiated job and code false code otherwise see set User boolean public final boolean is User return super is User  setUser isUser isUser
Waits until this job is finished This method will block the calling thread until the job has finished executing or until this thread has been interrupted If the job has not been scheduled this method returns immediately p If this method is called on a job that reschedules itself from within the tt run tt method the join will return at the end of the first execution In other words join will return the first time this job exits the tt RUNNING tt state or as soon as this job enters the tt NONE tt state p p Note that there is a deadlock risk when using join If the calling thread owns a lock or object monitor that the joined thread is waiting for deadlock will occur p exception Interrupted Exception if this thread is interrupted while waiting see I Lock public final void join throws Interrupted Exception super join  InterruptedException ILock InterruptedException
Removes a job listener from this job Has no effect if an identical listener is not already registered param listener the listener to be removed public final void remove Job Change Listener I Job Change Listener listener super remove Job Change Listener listener  removeJobChangeListener IJobChangeListener removeJobChangeListener
Executes this job Returns the result of the execution p The provided monitor can be used to report progress and respond to cancellation If the progress monitor has been canceled the job should finish its execution at the earliest convenience p This method must not be called directly by clients Clients should call code schedule code which will in turn cause this method to be called p Jobs can optionally finish their execution asynchronously in another thread by returning a result status of code Job ASYNC FINISH code Jobs that finish asynchronously b must b specify the execution thread by calling code set Thread code and must indicate when they are finished by calling the method code done code param monitor the monitor to be used for reporting progress and responding to cancelation The monitor is never code null code return resulting status of the run The result must not be code null code see ASYNC FINISH see done I Status  ASYNC_FINISH setThread ASYNC_FINISH IStatus
Schedules this job to be run The job is added to a queue of waiting jobs and will be run when it arrives at the beginning of the queue p This is a convenience method fully equivalent to code schedule 0L code p public final void schedule super schedule 0L 
Schedules this job to be run after a specified delay After the specified delay the job is added to a queue of waiting jobs and will be run when it arrives at the beginning of the queue p If this job is currently running it will be rescheduled with the specified delay as soon as it finishes If this method is called multiple times while the job is running the job will still only be rescheduled once with the most recent delay value that was provided p Scheduling a job that is waiting or sleeping has no effect param delay a time delay in milliseconds before the job should run public final void schedule long delay super schedule delay 
Changes the name of this job The job name is a human readable value that is displayed to users The name does not need to be unique but it must not be code null code param name the name of the job public final void set Name String name super set Name name  setName setName
Sets the priority of the job This will not affect the execution of a running job but it will affect how the job is scheduled while it is waiting to be run param priority the new job priority One of INTERACTIVE SHORT LONG BUILD or DECORATE public final void set Priority int priority super set Priority priority  setPriority setPriority
Associates this job with a progress group Progress feedback on this job s next execution will be displayed together with other jobs in that group The provided monitor must be a monitor created by the method tt I Job Manager create Progress Group tt and must have at least code ticks code units of available work p The progress group must be set before the job is scheduled The group will be used only for a single invocation of the job s tt run tt method after which any association of this job to the group will be lost see I Job Manager create Progress Group param group The progress group to use for this job param ticks the number of work ticks allocated from the parent monitor or I Progress Monitor UNKNOWN public final void set Progress Group I Progress Monitor group int ticks super set Progress Group group ticks  IJobManager createProgressGroup IJobManager createProgressGroup IProgressMonitor setProgressGroup IProgressMonitor setProgressGroup
Sets the value of the property of this job identified by the given key If the supplied value is code null code the property is removed from this resource p Properties are intended to be used as a caching mechanism by ISV plug ins They allow key object associations to be stored with a job instance These key value associations are maintained in memory at all times and the information is never discarded automatically p p The qualifier part of the property name must be the unique identifier of the declaring plug in e g code com example plugin code p param key the qualified name of the property param value the value of the property or code null code if the property is to be removed see get Property Qualified Name public void set Property Qualified Name key Object value super set Property key value  getProperty QualifiedName setProperty QualifiedName setProperty
Sets the scheduling rule to be used when scheduling this job This method must be called before the job is scheduled param rule the new scheduling rule or code null code if the job should have no scheduling rule see get Rule public final void set Rule I Scheduling Rule rule super set Rule rule  getRule setRule ISchedulingRule setRule
Sets whether or not this job is a system job System jobs are typically not revealed to users in any UI presentation of jobs Other than their UI presentation system jobs act exactly like other jobs If this value is not explicitly set jobs are treated as non system jobs This method must be called before the job is scheduled param value code true code if this job should be a system job and code false code otherwise see is System public final void set System boolean value super set System value  isSystem setSystem setSystem
Sets whether or not this job has been directly initiated by a UI end user These jobs may be presented differently in the UI This method must be called before the job is scheduled param value code true code if this job is a user initiated job and code false code otherwise see is User public final void set User boolean value super set User value  isUser setUser setUser
Sets the thread that this job is currently running in or code null code if this job is not running or the thread is unknown p Jobs that use the code Job ASYNC FINISH code return code should tell the job what thread it is running in This is used to prevent deadlocks param thread the thread that this job is running in see ASYNC FINISH see run I Progress Monitor public final void set Thread Thread thread super set Thread thread  ASYNC_FINISH ASYNC_FINISH IProgressMonitor setThread setThread
Returns whether this job should be run If code false code is returned this job will be discarded by the job manager without running p This method is called immediately prior to calling the job s run method so it can be used for last minute pre condition checking before a job is run This method must not attempt to schedule or change the state of any other job p p Clients may override this method This default implementation always returns code true code p return code true code if this job should be run and code false code otherwise public boolean should Run return true  shouldRun
Returns whether this job should be scheduled If code false code is returned this job will be discarded by the job manager without being added to the queue p This method is called immediately prior to adding the job to the waiting job queue so it can be used for last minute pre condition checking before a job is scheduled p p Clients may override this method This default implementation always returns code true code p return code true code if the job manager should schedule this job and code false code otherwise public boolean should Schedule return true  shouldSchedule
Requests that this job be suspended If the job is currently waiting to be run it will be removed from the queue move into the code SLEEPING code state The job will remain asleep until either resumed or canceled If this job is not currently waiting to be run this method has no effect p Sleeping jobs can be resumed using code wake Up code return code false code if the job is currently running and thus cannot be put to sleep and code true code in all other cases see wake Up public final boolean sleep return super sleep  wakeUp wakeUp
Puts this job immediately into the code WAITING code state so that it is eligible for immediate execution If this job is not currently sleeping the request is ignored p This is a convenience method fully equivalent to code wake Up 0L code p see sleep public final void wake Up super wake Up 0L  wakeUp wakeUp wakeUp
Puts this job back into the code WAITING code state after the specified delay This is equivalent to canceling the sleeping job and rescheduling with the given delay If this job is not currently sleeping the request is ignored param delay the number of milliseconds to delay see sleep public final void wake Up long delay super wake Up delay  wakeUp wakeUp

This default implementation does nothing public void about To Run I Job Change Event event do nothing  aboutToRun IJobChangeEvent
This default implementation does nothing public void awake I Job Change Event event do nothing  IJobChangeEvent
This default implementation does nothing public void done I Job Change Event event do nothing  IJobChangeEvent
This default implementation does nothing public void running I Job Change Event event do nothing  IJobChangeEvent
This default implementation does nothing public void scheduled I Job Change Event event do nothing  IJobChangeEvent
This default implementation does nothing public void sleeping I Job Change Event event do nothing  IJobChangeEvent

Notification that a thread is about to block on an attempt to acquire a lock Returns whether the thread should be granted immediate access to the lock p This default implementation always returns code false code Subclasses may override param lock Owner the thread that currently owns the lock this thread is waiting for or code null code if unknown return code true code if the thread should be granted immediate access and code false code if it should wait for the lock to be available public boolean about To Wait Thread lock Owner return false  lockOwner aboutToWait lockOwner
Notification that a thread is about to release a lock p This default implementation does nothing Subclasses may override public void about To Release do nothing  aboutToRelease
Returns whether this thread currently owns any locks return code true code if this thread owns any locks and code false code otherwise protected final boolean is Lock Owner Thread return manager is Lock Owner  isLockOwnerThread isLockOwner

Returns a scheduling rule that encompases both provided rules The resulting rule may or may not be an instance of code Multi Rule code If both provided rules are code null code then the result will be code null code param rule1 a scheduling rule or code null code param rule2 another scheduling rule or code null code return a combined scheduling rule or code null code public static I Scheduling Rule combine I Scheduling Rule rule1 I Scheduling Rule rule2 if rule1 rule2 return rule1 if rule1 null return rule2 if rule2 null return rule1 if rule1 contains rule2 return rule1 if rule2 contains rule1 return rule2 Multi Rule result new Multi Rule result rules new I Scheduling Rule rule1 rule2 return result  MultiRule ISchedulingRule ISchedulingRule ISchedulingRule MultiRule MultiRule ISchedulingRule
Creates a new scheduling rule that composes a set of nested rules param nested Rules the nested rules for this compound rule public Multi Rule I Scheduling Rule nested Rules this rules flatten nested Rules  nestedRules MultiRule ISchedulingRule nestedRules nestedRules
Creates a new scheduling rule with no nested rules For internal use only private Multi Rule to be invoked only by factory methods  MultiRule
private I Scheduling Rule flatten I Scheduling Rule nested Rules Array List my Rules new Array List nested Rules length for int i 0 i nested Rules length i if nested Rules i instanceof Multi Rule I Scheduling Rule children Multi Rule nested Rules i get Children for int j 0 j children length j my Rules add children j else my Rules add nested Rules i return I Scheduling Rule my Rules to Array new I Scheduling Rule my Rules size  ISchedulingRule ISchedulingRule nestedRules ArrayList myRules ArrayList nestedRules nestedRules nestedRules MultiRule ISchedulingRule MultiRule nestedRules getChildren myRules myRules nestedRules ISchedulingRule myRules toArray ISchedulingRule myRules
Returns the child rules within this rule return the child rules public I Scheduling Rule get Children return I Scheduling Rule rules clone  ISchedulingRule getChildren ISchedulingRule
public boolean contains I Scheduling Rule rule if this rule return true if rule instanceof Multi Rule I Scheduling Rule other Rules Multi Rule rule get Children for each child of the target there must be some child in this rule that contains it for int other 0 other other Rules length other boolean found false for int mine 0 found mine rules length mine found rules mine contains other Rules other if found return false return true for int i 0 i rules length i if rules i contains rule return true return false  ISchedulingRule MultiRule ISchedulingRule otherRules MultiRule getChildren otherRules otherRules
public boolean is Conflicting I Scheduling Rule rule if this rule return true if rule instanceof Multi Rule I Scheduling Rule other Rules Multi Rule rule get Children for int j 0 j other Rules length j for int i 0 i rules length i if rules i is Conflicting other Rules j return true else for int i 0 i rules length i if rules i is Conflicting rule return true return false  isConflicting ISchedulingRule MultiRule ISchedulingRule otherRules MultiRule getChildren otherRules isConflicting otherRules isConflicting
public String to String String Buffer buffer new String Buffer buffer append Multi Rule NON NLS 1 int last rules length 1 for int i 0 i rules length i buffer append rules i if i last buffer append buffer append return buffer to String  toString StringBuffer StringBuffer MultiRule toString

public abstract class Progress Provider Provides a new progress monitor instance to be used by the given job This method is called prior to running any job that does not belong to a progress group The returned monitor will be supplied to the job s code run code method see create Progress Group see Job set Progress Group I Progress Monitor int param job the job to create a progress monitor for return a progress monitor or code null code if no progress monitoring is needed  ProgressProvider createProgressGroup setProgressGroup IProgressMonitor
Returns a progress monitor that can be used to provide aggregated progress feedback on a set of running jobs This method implements code I Job Manager create Progress Group code and must obey all rules specified in that contract p This default implementation returns a new code Null Progress Monitor code Subclasses may override see I Job Manager create Progress Group return a progress monitor public I Progress Monitor create Progress Group return new Null Progress Monitor  IJobManager createProgressGroup NullProgressMonitor IJobManager createProgressGroup IProgressMonitor createProgressGroup NullProgressMonitor
Returns a progress monitor that can be used by a running job to report progress in the context of a progress group This method implements code Job set Progress Group code One of the two code create Monitor code methods will be invoked prior to each execution of a job depending on whether a progress group was specified for the job p The provided monitor must be a monitor returned by the method code create Progress Group code This method is responsible for asserting this and throwing an appropriate runtime exception if an invalid monitor is provided p This default implementation returns a new code Sub Progress Monitor code Subclasses may override see I Job Manager create Progress Group see Job set Progress Group I Progress Monitor int param job the job to create a progress monitor for param group the progress monitor group that this job belongs to param ticks the number of ticks of work for the progress monitor return a progress monitor or code null code if no progress monitoring is needed public I Progress Monitor create Monitor Job job I Progress Monitor group int ticks return new Sub Progress Monitor group ticks  setProgressGroup createMonitor createProgressGroup SubProgressMonitor IJobManager createProgressGroup setProgressGroup IProgressMonitor IProgressMonitor createMonitor IProgressMonitor SubProgressMonitor
Returns a progress monitor to use when none has been provided by the client running the job p This default implementation returns a new code Null Progress Monitor code Subclasses may override return a progress monitor public I Progress Monitor get Default Monitor return new Null Progress Monitor  NullProgressMonitor IProgressMonitor getDefaultMonitor NullProgressMonitor

Creates a new configuration element model in which all fields are code null code public Configuration Element Model super  ConfigurationElementModel
Returns the element which contains this element If this element is an immediate child of an extension the returned value can be downcast to code Extension Model code Otherwise the returned value can be downcast to code Configuration Element Model code return the parent of this configuration element or code null code public Object get Parent return parent  ExtensionModel ConfigurationElementModel getParent
Returns the extension in which this configuration element is declared If this element is a top level child of an extension the returned value is equivalent to code get Parent code return the extension in which this configuration element is declared or code null code public Extension Model get Parent Extension Object p get Parent while p null p instanceof Configuration Element Model p Configuration Element Model p get Parent return Extension Model p  getParent ExtensionModel getParentExtension getParent ConfigurationElementModel ConfigurationElementModel getParent ExtensionModel
Returns the properties associated with this element return the properties associated with this element or code null code public Configuration Property Model get Properties return properties  ConfigurationPropertyModel getProperties
Returns this element s sub elements return the sub elements of this element or code null code public Configuration Element Model get Sub Elements return children  ConfigurationElementModel getSubElements
Returns the value of this element return the value of this element or code null code public String get Value return value  getValue
Returns the value of this element return the value of this element or code null code since 2 0 public String get Value As Is return value  getValueAsIs
Sets this model object and all of its descendents to be read only Subclasses may extend this implementation see is Read Only public void mark Read Only super mark Read Only if children null for int i 0 i children length i children i mark Read Only if properties null for int i 0 i properties length i properties i mark Read Only  isReadOnly markReadOnly markReadOnly markReadOnly markReadOnly
Optimization to replace a non localized key with its localized value Avoids having to access resource bundles for further lookups param value the localized value of this model object public void set Localized Value String value this value value  setLocalizedValue
Sets the parent of this element The supplied parent is either an code Extension Model code if this element is to be a direct child of an extension or another code Configuration Element code This object must not be read only param value the new parent of this element May be code null code public void set Parent Object value assert Is Writeable parent value  ExtensionModel ConfigurationElement setParent assertIsWriteable
Sets the properties associated with this element This object must not be read only param value the properties to associate with this element May be code null code public void set Properties Configuration Property Model value assert Is Writeable properties value  setProperties ConfigurationPropertyModel assertIsWriteable
Sets configuration elements contained by this element This object must not be read only param value the configuration elements to be associated with this element May be code null code public void set Sub Elements Configuration Element Model value assert Is Writeable children value  setSubElements ConfigurationElementModel assertIsWriteable
Sets the value of this element This object must not be read only param value the new value of this element May be code null code public void set Value String value assert Is Writeable this value value  setValue assertIsWriteable

Creates a new configuration property model in which all fields are code null code public Configuration Property Model super  ConfigurationPropertyModel
Returns the value of this property return the value of this property or code null code public String get Value return value  getValue
Optimization to replace a non localized key with its localized value Avoids having to access resource bundles for further lookups param value the localized value of this model object public void set Localized Value String value this value value  setLocalizedValue
Sets the value of this property This object must not be read only param value the new value of this property May be code null code public void set Value String value assert Is Writeable this value value  setValue assertIsWriteable

Creates a new extension model in which all fields are code null code public Extension Model super  ExtensionModel
Returns the extension point with which this extension is associated return the extension point with which this extension is associated or code null code public String get Extension Point return extension Point  getExtensionPoint extensionPoint
Returns the simple identifier of this extension or code null code if this extension does not have an identifier This identifier is specified in the plug in manifest as a non empty string containing no period characters code code and must be unique within the defining plug in return the simple identifier of the extension e g code main code or code null code public String get Id return id  getId
Returns the plug in model descriptor or fragment in which this extension is declared return the plug in model in which this extension is declared or code null code public Plugin Model get Parent return plugin  PluginModel getParent
Returns the plug in descriptor in which this extension is declared return the plug in descriptor in which this extension is declared or code null code public Plugin Descriptor Model get Parent Plugin Descriptor return Plugin Descriptor Model plugin  PluginDescriptorModel getParentPluginDescriptor PluginDescriptorModel
Returns the configuration element children of this extension return the configuration elements in this extension or code null code public Configuration Element Model get Sub Elements return elements  ConfigurationElementModel getSubElements
Sets this model object and all of its descendents to be read only Subclasses may extend this implementation see is Read Only public void mark Read Only super mark Read Only if elements null for int i 0 i elements length i elements i mark Read Only  isReadOnly markReadOnly markReadOnly markReadOnly
Set the extension point with which this extension is associated This object must not be read only param value the extension point with which this extension is associated May be code null code public void set Extension Point String value assert Is Writeable extension Point value  setExtensionPoint assertIsWriteable extensionPoint
Sets the simple identifier of this extension or code null code if this extension does not have an identifier This identifier is specified in the plug in manifest as a non empty string containing no period characters code code and must be unique within the defining plug in This object must not be read only param value the simple identifier of the extension e g code main code May be code null code public void set Id String value assert Is Writeable id value  setId assertIsWriteable
Sets the plug in model in which this extension is declared This object must not be read only param value the plug in model in which this extension is declared May be code null code public void set Parent Plugin Model value assert Is Writeable plugin value  setParent PluginModel assertIsWriteable
Sets the plug in descriptor in which this extension is declared This object must not be read only param value the plug in descriptor in which this extension is declared May be code null code public void set Parent Plugin Descriptor Plugin Descriptor Model value assert Is Writeable plugin value  setParentPluginDescriptor PluginDescriptorModel assertIsWriteable
Sets the configuration element children of this extension This object must not be read only param value the configuration elements in this extension May be code null code public void set Sub Elements Configuration Element Model value assert Is Writeable elements value  setSubElements ConfigurationElementModel assertIsWriteable

Creates a new extension point model in which all fields are code null code public Extension Point Model super  ExtensionPointModel
Returns this extensions added to this extension point return the extensions in this extension point or code null code public Extension Model get Declared Extensions return extensions  ExtensionModel getDeclaredExtensions
Returns the simple identifier of this extension point or code null code if this extension point does not have an identifier This identifier is specified in the plug in manifest as a non empty string containing no period characters code code and must be unique within the defining plug in return the simple identifier of the extension point e g code main code or code null code public String get Id return id  getId
Returns the plug in model descriptor or fragment in which this extension is declared return the plug in model in which this extension is declared or code null code public Plugin Model get Parent return plugin  PluginModel getParent
Returns the plug in descriptor in which this extension point is declared return the plug in descriptor in which this extension point is declared or code null code public Plugin Descriptor Model get Parent Plugin Descriptor return Plugin Descriptor Model plugin  PluginDescriptorModel getParentPluginDescriptor PluginDescriptorModel
Returns the schema specification for this extension point return the schema specification for this extension point or code null code public String get Schema return schema  getSchema
Sets this extensions added to this extension point This object must not be read only param value the extensions in this extension point May be code null code public void set Declared Extensions Extension Model value assert Is Writeable extensions value  setDeclaredExtensions ExtensionModel assertIsWriteable
Sets the simple identifier of this extension point or code null code if this extension point does not have an identifier This identifier is specified in the plug in manifest as a non empty string containing no period characters code code and must be unique within the defining plug in This object must not be read only param value the simple identifier of the extension point e g code main code May be code null code public void set Id String value assert Is Writeable id value  setId assertIsWriteable
Sets the plug in model in which this extension is declared This object must not be read only param value the plug in model in which this extension is declared May be code null code public void set Parent Plugin Model value assert Is Writeable plugin value  setParent PluginModel assertIsWriteable
Sets the plug in descriptor in which this extension point is declared This object must not be read only param value the plug in descriptor in which this extension point is declared May be code null code public void set Parent Plugin Descriptor Plugin Descriptor Model value assert Is Writeable plugin value  setParentPluginDescriptor PluginDescriptorModel assertIsWriteable
Sets the schema specification for this extension point This object must not be read only param value the schema specification for this extension point May be code null code public void set Schema String value assert Is Writeable schema value  setSchema assertIsWriteable

Creates a factory which can be used to create plug in model objects Errors and warnings during parsing etc can be logged to the given status via the code error code method param status the status to which errors should be logged public Factory Multi Status status super this status status  MultiStatus
Returns a new configuration element model which is not initialized return a new configuration element model public Configuration Element Model create Configuration Element return new Configuration Element Model  ConfigurationElementModel createConfigurationElement ConfigurationElementModel
Returns a new configuration property model which is not initialized return a new configuration property model public Configuration Property Model create Configuration Property return new Configuration Property Model  ConfigurationPropertyModel createConfigurationProperty ConfigurationPropertyModel
Returns a new extension model which is not initialized return a new extension model public Extension Model create Extension return new Extension Model  ExtensionModel createExtension ExtensionModel
Returns a new extension point model which is not initialized return a new extension point model public Extension Point Model create Extension Point return new Extension Point Model  ExtensionPointModel createExtensionPoint ExtensionPointModel
Returns a new library model which is initialized to not export any of its code return a new library model public Library Model create Library return new Library Model  LibraryModel createLibrary LibraryModel
Returns a new plug in descriptor model which is not initialized return a new plug in descriptor model public Plugin Descriptor Model create Plugin Descriptor return new Plugin Descriptor Model  PluginDescriptorModel createPluginDescriptor PluginDescriptorModel
Returns a new plug in fragment model which is not initialized return a new plug in fragment model public Plugin Fragment Model create Plugin Fragment return new Plugin Fragment Model  PluginFragmentModel createPluginFragment PluginFragmentModel
Returns a new plug in prerequisite model which is initialized to not export its code and to not require an exact match return a new plug in prerequisite model public Plugin Prerequisite Model create Plugin Prerequisite return new Plugin Prerequisite Model  PluginPrerequisiteModel createPluginPrerequisite PluginPrerequisiteModel
Returns a new plug in registry model with an empty plug in table return a new plug in registry model public Plugin Registry Model create Plugin Registry return new Plugin Registry Model  PluginRegistryModel createPluginRegistry PluginRegistryModel
Returns a new URL model which is not initialized return a new URL model public URL Model createURL return new URL Model  URLModel URLModel
Handles an error state specified by the status The collection of all logged status objects can be accessed using code get Status code param error a status detailing the error condition public void error I Status error status add error if Internal Platform DEBUG Internal Platform DEBUG REGISTRY System out println error to String  getStatus IStatus InternalPlatform InternalPlatform DEBUG_REGISTRY toString
Returns all of the status objects logged thus far by this factory return a multi status containing all of the logged status objects public Multi Status get Status return status  MultiStatus getStatus

Creates a new library model in which all fields are code null code public Library Model super  LibraryModel
Returns this library s export mask return this library s export mask or code null code public String get Exports return exports  getExports
Returns this library s type return the type of this library The valid types are code CODE code and code RESOURCE code see CODE see RESOURCE public String get Type return type  getType
Returns whether or not any of the code in this library is exported return whether or not any of the code in this library represents is exported public boolean is Exported return is Exported  isExported isExported
Returns whether or not all of the code in this library is exported return whether or not all of the code in this library is exported public boolean is Fully Exported return is Fully Exported  isFullyExported isFullyExported
Sets this library s export mask This object must not be read only param value this library s export mask May be code null code public void set Exports String value assert Is Writeable exports value if value null is Exported false is Fully Exported false else for int i 0 i value length i if value i equals NON NLS 1 is Exported true if value i equals NON NLS 1 is Fully Exported true  setExports assertIsWriteable isExported isFullyExported isExported isFullyExported
Sets this library s type The valid types are code CODE code and code RESOURCE code The given type value is canonicalized before being set This object must not be read only param value the type of this library see CODE see RESOURCE public void set Type String value assert Is Writeable String lc Value value to Lower Case Assert is True lc Value equals CODE lc Value equals RESOURCE type lc Value  setType assertIsWriteable lcValue toLowerCase isTrue lcValue lcValue lcValue
see I Library get Package Prefixes public String get Package Prefixes return package Prefixes  ILibrary getPackagePrefixes getPackagePrefixes packagePrefixes
Sets this library s package prefixes to be the specified array or code null code param value the list of package prefixes for this library public void set Package Prefixes String value package Prefixes value  setPackagePrefixes packagePrefixes

Creates a new plug in descriptor model in which all fields are code null code public Plugin Descriptor Model super  PluginDescriptorModel
Returns true if this plugin has all of it s prerequisites and is therefore enabled return whether or not this plug in is fully resolved public boolean get Enabled return enabled  getEnabled
Returns the fragments installed for this plug in return this plug in s fragments or code null code public Plugin Fragment Model get Fragments return fragments  PluginFragmentModel getFragments
Returns the fully qualified name of the Java class which implements the runtime support for this plug in return the name of this plug in s runtime class or code null code public String get Plugin Class return plugin Class  getPluginClass pluginClass
Returns the unique identifier of the plug in related to this model or code null code This identifier is a non empty string and is unique within the plug in registry return the unique identifier of the plug in related to this model e g code com example code or code null code public String get Plugin Id return get Id  getPluginId getId
Sets the value of the field enabled to the parameter value If this plugin is enabled default it is assumed to have all of it s prerequisites param value set to false if this plugin should be disabled and true otherwise public void set Enabled boolean value enabled value  setEnabled
Sets the list of fragments for this plug in This object must not be read only param value the fragments for this plug in May be code null code public void set Fragments Plugin Fragment Model value assert Is Writeable fragments value  setFragments PluginFragmentModel assertIsWriteable
Sets the fully qualified name of the Java class which implements the runtime support for this plug in This object must not be read only param value the name of this plug in s runtime class May be code null code public void set Plugin Class String value assert Is Writeable plugin Class value  setPluginClass assertIsWriteable pluginClass

Creates a new plug in descriptor model in which all fields are code null code public Plugin Fragment Model super  PluginFragmentModel
Returns a byte code indicating the type of match this fragment requires when trying to find its associated plugin The byte code can be any one of the following FRAGMENT MATCH UNSPECIFIED initial value FRAGMENT MATCH PERFECT perfectly equal match FRAGMENT MATCH EQUIVALENT equivalent match FRAGMENT MATCH COMPATIBLE compatible match FRAGMENT MATCH GREATER OR EQUAL greater than or equal to match return a byte code indicating the type of match this fragment requires since 2 0 public byte get Match return plugin Match  FRAGMENT_MATCH_UNSPECIFIED FRAGMENT_MATCH_PERFECT FRAGMENT_MATCH_EQUIVALENT FRAGMENT_MATCH_COMPATIBLE FRAGMENT_MATCH_GREATER_OR_EQUAL getMatch pluginMatch
Returns the fully qualified name of the plug in for which this is a fragment return the name of this fragment s plug in or code null code public String get Plugin return plugin  getPlugin
Returns the unique identifier of the plug in related to this model or code null code This identifier is a non empty string and is unique within the plug in registry return the unique identifier of the plug in related to this model e g code com example code or code null code public String get Plugin Id return get Plugin  getPluginId getPlugin
Returns the version name of the plug in for which this is a fragment return the version name of this fragment s plug in or code null code public String get Plugin Version return plugin Version  getPluginVersion pluginVersion
Sets the type of match this fragment requires when trying to find its associated plugin The value parameter may be any one of the following FRAGMENT MATCH UNSPECIFIED initial value FRAGMENT MATCH PERFECT perfectly equal match FRAGMENT MATCH EQUIVALENT equivalent match FRAGMENT MATCH COMPATIBLE compatible match FRAGMENT MATCH GREATER OR EQUAL greater than or equal to match This object must not be read only param value the type of match required with the associated plugin since 2 0 public void set Match byte value assert Is Writeable Assert is True value FRAGMENT MATCH PERFECT value FRAGMENT MATCH EQUIVALENT value FRAGMENT MATCH COMPATIBLE value FRAGMENT MATCH GREATER OR EQUAL plugin Match value  FRAGMENT_MATCH_UNSPECIFIED FRAGMENT_MATCH_PERFECT FRAGMENT_MATCH_EQUIVALENT FRAGMENT_MATCH_COMPATIBLE FRAGMENT_MATCH_GREATER_OR_EQUAL setMatch assertIsWriteable isTrue FRAGMENT_MATCH_PERFECT FRAGMENT_MATCH_EQUIVALENT FRAGMENT_MATCH_COMPATIBLE FRAGMENT_MATCH_GREATER_OR_EQUAL pluginMatch
Sets the fully qualified name of the plug in for which this is a fragment This object must not be read only param value the name of this fragment s plug in May be code null code public void set Plugin String value assert Is Writeable plugin value  setPlugin assertIsWriteable
Sets the version name of the plug in for which this is a fragment The given version number is canonicalized This object must not be read only param value the version name of this fragment s plug in May be code null code public void set Plugin Version String value assert Is Writeable plugin Version new Plugin Version Identifier value to String  setPluginVersion assertIsWriteable pluginVersion PluginVersionIdentifier toString

Creates a new plug in descriptor model in which all fields are code null code public Plugin Model super  PluginModel
Returns the extension points in this plug in descriptor return the extension points in this plug in descriptor or code null code public Extension Point Model get Declared Extension Points return extension Points  ExtensionPointModel getDeclaredExtensionPoints extensionPoints
Returns the extensions in this plug in descriptor return the extensions in this plug in descriptor or code null code public Extension Model get Declared Extensions return extensions  ExtensionModel getDeclaredExtensions
Returns the unique identifier of this plug in model or code null code This identifier is a non empty string and is unique within the plug in registry return the unique identifier of this plugin model e g code com example code or code null code public String get Id return id  getId
Returns the location of the plug in corresponding to this plug in descriptor The location is in the form of a URL return the location of this plug in descriptor or code null code public String get Location return location  getLocation
Returns the unique identifier of the plug in related to this model or code null code This identifier is a non empty string and is unique within the plug in registry return the unique identifier of the plug in related to this model e g code com example code or code null code 
Returns the name of the provider who authored this plug in return name of the provider who authored this plug in or code null code public String get Provider Name return provider Name  getProviderName providerName
Returns the plug in registry of which this plug in descriptor is a member return the registry in which this descriptor has been installed or code null code if none public Plugin Registry Model get Registry return registry  PluginRegistryModel getRegistry
Returns the prerequisites of this plug in return the prerequisites of this plug in or code null code public Plugin Prerequisite Model get Requires return requires  PluginPrerequisiteModel getRequires
Returns the libraries configured for this plug in return the libraries configured for this plug in or code null code public Library Model get Runtime return runtime  LibraryModel getRuntime
Returns the version name of this plug in return the version name of this plug in or code null code public String get Version return version  getVersion
Sets this model object and all of its descendents to be read only Subclasses may extend this implementation see is Read Only public void mark Read Only super mark Read Only if runtime null for int i 0 i runtime length i runtime i mark Read Only if extension Points null for int i 0 i extension Points length i extension Points i mark Read Only if extensions null for int i 0 i extensions length i extensions i mark Read Only if requires null for int i 0 i requires length i requires i mark Read Only  isReadOnly markReadOnly markReadOnly markReadOnly extensionPoints extensionPoints extensionPoints markReadOnly markReadOnly markReadOnly
Sets the extension points in this plug in descriptor This object must not be read only param value the extension points in this plug in descriptor May be code null code public void set Declared Extension Points Extension Point Model value assert Is Writeable extension Points value  setDeclaredExtensionPoints ExtensionPointModel assertIsWriteable extensionPoints
Sets the extensions in this plug in descriptor This object must not be read only param value the extensions in this plug in descriptor May be code null code public void set Declared Extensions Extension Model value assert Is Writeable extensions value  setDeclaredExtensions ExtensionModel assertIsWriteable
Sets the unique identifier of this plug in model The identifier is a non empty string and is unique within the plug in registry This object must not be read only param value the unique identifier of the plug in model e g code com example code May be code null code public void set Id String value assert Is Writeable id value  setId assertIsWriteable
Optimization to replace a non localized key with its localized value Avoids having to access resource bundles for further lookups param value the localized provider name for this model object public void set Localized Provider Name String value provider Name value  setLocalizedProviderName providerName
Sets the location of the plug in manifest file e g code plugin xml code which corresponds to this plug in descriptor The location is in the form of a URL This object must not be read only param value the location of this plug in descriptor May be code null code public void set Location String value assert Is Writeable location value  setLocation assertIsWriteable
Sets the name of the provider who authored this plug in This object must not be read only param value name of the provider who authored this plug in May be code null code public void set Provider Name String value assert Is Writeable provider Name value  setProviderName assertIsWriteable providerName
Sets the registry with which this plug in descriptor is associated This object must not be read only param value the registry with which this plug in is associated May be code null code public void set Registry Plugin Registry Model value assert Is Writeable registry value  setRegistry PluginRegistryModel assertIsWriteable
Sets the prerequisites of this plug in This object must not be read only param value the prerequisites of this plug in May be code null code public void set Requires Plugin Prerequisite Model value assert Is Writeable requires value  setRequires PluginPrerequisiteModel assertIsWriteable
Sets the libraries configured for this plug in This object must not be read only param value the libraries configured for this plug in May be code null code public void set Runtime Library Model value assert Is Writeable runtime value  setRuntime LibraryModel assertIsWriteable
Sets the version name of this plug in The version number is canonicalized This object must not be read only param value the version name of this plug in May be code null code public void set Version String value assert Is Writeable version new Plugin Version Identifier value to String  setVersion assertIsWriteable PluginVersionIdentifier toString
Returns the manifest schema version of this plug in The version number is canonicalized p The manifest schema version indicates which shape of plug in manifest this is This was introduced in 3 0 plug ins created prior to then did not explicitly declare a manifest schema version p return the manifest schema version of this plug in May be code null code since 3 0 public String get Schema Version return schema Version  getSchemaVersion schemaVersion
Sets the manifest schema version of this plug in The version number is canonicalized This object must not be read only p The manifest schema version indicates which shape of plug in manifest this is This was introduced in 3 0 plug ins created prior to then did not explicitly declare a manifest schema version p param value the manifest schema version of this plug in May be code null code since 3 0 public void set Schema Version String value assert Is Writeable if value null schema Version null else schema Version new Plugin Version Identifier value to String  setSchemaVersion assertIsWriteable schemaVersion schemaVersion PluginVersionIdentifier toString

Checks that this model object is writeable A runtime exception is thrown if it is not protected void assert Is Writeable Assert is True is Read Only Model is read only NON NLS 1  assertIsWriteable isTrue isReadOnly
Returns the name of this element return the name of this element or code null code public String get Name return name  getName
Return the line number for the start tag for this plug in object This is the line number of the element declaration from the plug in manifest file return the line number of the start tag for this object public int get Start Line return flags M READ ONLY 1  getStartLine M_READ_ONLY
Returns whether or not this model object is read only return code true code if this model object is read only code false code otherwise see mark Read Only public boolean is Read Only return flags M READ ONLY M READ ONLY  markReadOnly isReadOnly M_READ_ONLY M_READ_ONLY
Sets this model object and all of its descendents to be read only Subclasses may extend this implementation see is Read Only public void mark Read Only flags M READ ONLY  isReadOnly markReadOnly M_READ_ONLY
Optimization to replace a non localized key with its localized value Avoids having to access resource bundles for further lookups param value the localized name of this model object public void set Localized Name String value name value  setLocalizedName
Sets the name of this element param value the new name of this element May be code null code public void set Name String value assert Is Writeable name value  setName assertIsWriteable
Set the line number for the start tag for this plug in object This is the line number for the element declaration from the plug in manifest file This value can only be set once subsequent calls to this method will be ignored param line Number the line number of this object s declaration in the file public void set Start Line int line Number if get Start Line 1 flags line Number 1 flags M READ ONLY  lineNumber setStartLine lineNumber getStartLine lineNumber M_READ_ONLY
Return a string representation of this object This value is not to be relied on and can change at any time To be used for debugging purposes only see java lang Object to String public String to String return this get Class get Name NON NLS 1 NON NLS 2  toString toString getClass getName

Creates a new plug in prerequisite model in which all fields are code null code public Plugin Prerequisite Model super  PluginPrerequisiteModel
Returns whether or not the code in this pre requisite is exported return whether or not the code in this pre requisite is exported public boolean get Export return export  getExport
Returns whether or not this pre requisite requires an exact match return whether or not this pre requisite requires an exact match deprecated use get Match Byte public boolean get Match return match PREREQ MATCH EQUIVALENT  getMatchByte getMatch PREREQ_MATCH_EQUIVALENT
Returns a byte code indicating the type of match this pre requisite requires The byte code can be any one of the following PREREQ MATCH UNSPECIFIED initial value PREREQ MATCH PERFECT perfectly equal match PREREQ MATCH EQUIVALENT equivalent match PREREQ MATCH COMPATIBLE compatible match PREREQ MATCH GREATER OR EQUAL greater than or equal to match return a byte code indicating the type of match this pre requisite requires since 2 0 public byte get Match Byte return match  PREREQ_MATCH_UNSPECIFIED PREREQ_MATCH_PERFECT PREREQ_MATCH_EQUIVALENT PREREQ_MATCH_COMPATIBLE PREREQ_MATCH_GREATER_OR_EQUAL getMatchByte
Returns whether this pre requisite is optional return whether this pre requisite is optional public boolean get Optional return optional  getOptional
Returns the plug in identifier of the prerequisite plug in return the plug in identifier or code null code public String get Plugin return plugin  getPlugin
Returns the resolved version of the prerequisite plug in The returned value is in the format specified by code Plugin Version Identifier code return the version of the prerequisite plug in see org eclipse core runtime Plugin Version Identifier public String get Resolved Version return resolved Version  PluginVersionIdentifier PluginVersionIdentifier getResolvedVersion resolvedVersion
Returns the version name of this plug in return the version name of this plug in or code null code public String get Version return version  getVersion
Sets whether or not the code in this pre requisite is exported This object must not be read only param value whether or not the code in this pre requisite is exported public void set Export boolean value assert Is Writeable export value  setExport assertIsWriteable
Sets whether or not this pre requisite requires an exact match This object must not be read only param value whether or not this pre requisite requires an exact match deprecated use set Match Byte public void set Match boolean value assert Is Writeable if value set Match Byte PREREQ MATCH EQUIVALENT else set Match Byte PREREQ MATCH COMPATIBLE  setMatchByte setMatch assertIsWriteable setMatchByte PREREQ_MATCH_EQUIVALENT setMatchByte PREREQ_MATCH_COMPATIBLE
Sets whether or not this pre requisite requires an exact match This object must not be read only param value whether or not this pre requisite requires an exact match since 2 0 public void set Match Byte byte value assert Is Writeable Assert is True value PREREQ MATCH PERFECT value PREREQ MATCH EQUIVALENT value PREREQ MATCH COMPATIBLE value PREREQ MATCH GREATER OR EQUAL match value  setMatchByte assertIsWriteable isTrue PREREQ_MATCH_PERFECT PREREQ_MATCH_EQUIVALENT PREREQ_MATCH_COMPATIBLE PREREQ_MATCH_GREATER_OR_EQUAL
Sets whether this pre requisite is optional This object must not be read only param value whether this pre requisite is optional public void set Optional boolean value assert Is Writeable optional value  setOptional assertIsWriteable
Sets the plug in identifier of this prerequisite plug in This object must not be read only param value the prerequisite plug in identifier May be code null code public void set Plugin String value assert Is Writeable plugin value  setPlugin assertIsWriteable
Sets the resolved version of the prerequisite plug in The given value is in the format specified by code Plugin Version Identifier code param value the version of the prerequisite plug in see org eclipse core runtime Plugin Version Identifier public void set Resolved Version String value assert Is Writeable resolved Version value  PluginVersionIdentifier PluginVersionIdentifier setResolvedVersion assertIsWriteable resolvedVersion
Sets the version name of this plug in prerequisite This object must not be read only param value the version name of this plug in prerequisite May be code null code public void set Version String value assert Is Writeable version value  setVersion assertIsWriteable

Creates a new plug in registry model which contains no plug ins public Plugin Registry Model super  PluginRegistryModel
Adds the specified plug in fragment to this registry An existing fragment with the same unique id and version is replaced by the new value param fragment the plug in fragment to add public void add Fragment Plugin Fragment Model fragment assert Is Writeable fragments add fragment  addFragment PluginFragmentModel assertIsWriteable
Adds the specified plug in to this registry An existing plug in with the same unique id and version is replaced by the new value param plugin the plug in descriptor to add public void add Plugin Plugin Descriptor Model plugin assert Is Writeable plugins add plugin  addPlugin PluginDescriptorModel assertIsWriteable
Checks that this model object is writeable A runtime exception is thrown if it is not protected void assert Is Writeable Assert is True is Read Only Model is read only NON NLS 1  assertIsWriteable isTrue isReadOnly
Returns the plug in fragment with the given identifier in this plug in registry or code null code if there is no such fragment If there are multiple versions of the identified fragment one will be non deterministically chosen and returned param id the unique identifier of the plug in fragment e g code com example acme code return the plug in fragment or code null code public Plugin Fragment Model get Fragment String id return Plugin Fragment Model fragments get Any id  PluginFragmentModel getFragment PluginFragmentModel getAny
Returns the identified plug in fragment or code null code if the fragment does not exist param id the unique identifier of the plug in fragment param version fragment version identifier If code null code is specified a non deterministically chosen version of the identified fragment if any will be returned return the matching fragment in this registry or code null code public Plugin Fragment Model get Fragment String id String version return Plugin Fragment Model fragments get id version  PluginFragmentModel getFragment PluginFragmentModel
Returns the list of plug in fragments managed by this registry return the fragments in this registry public Plugin Fragment Model get Fragments Plugin Fragment Model result new Plugin Fragment Model fragments size fragments copy To Array result return result  PluginFragmentModel getFragments PluginFragmentModel PluginFragmentModel copyToArray
Returns all versions of the identified plug in fragment known to this plug in registry Returns an empty array if there are no fragments with the specified identifier param id the unique identifier of the plug in fragment e g code org eclipse core resources code return the fragments known to this plug in registry with the given id public Plugin Fragment Model get Fragments String id List versions fragments get Versions id if versions null versions is Empty return new Plugin Fragment Model 0 return Plugin Fragment Model versions to Array new Plugin Fragment Model versions size  PluginFragmentModel getFragments getVersions isEmpty PluginFragmentModel PluginFragmentModel toArray PluginFragmentModel
Returns the plug in descriptor with the given plug in identifier in this plug in registry or code null code if there is no such plug in If there are multiple versions of the identified plug in one will be non deterministically chosen and returned param plugin Id the unique identifier of the plug in e g code com example acme code return the plug in descriptor or code null code public Plugin Descriptor Model get Plugin String plugin Id return Plugin Descriptor Model plugins get Any plugin Id  pluginId PluginDescriptorModel getPlugin pluginId PluginDescriptorModel getAny pluginId
Returns the identified plug in or code null code if the plug in does not exist param plugin Id the unique identifier of the plug in e g code org eclipse core resources code param version plug in version identifier If code null code is specified a non deterministically chosen version of the identified plug in if any will be returned return the matching plug in in this registry or code null code public Plugin Descriptor Model get Plugin String plugin Id String version Plugin Descriptor Model list get Plugins plugin Id if list null list length 0 return null if version null Just return the first one in the list random return list 0 for int i 0 i list length i Plugin Descriptor Model element list i if element get Version equals version return element return null  pluginId PluginDescriptorModel getPlugin pluginId PluginDescriptorModel getPlugins pluginId PluginDescriptorModel getVersion
Returns the list of plug ins managed by this registry return the plug ins in this registry public Plugin Descriptor Model get Plugins Plugin Descriptor Model result new Plugin Descriptor Model plugins size plugins copy To Array result return result  PluginDescriptorModel getPlugins PluginDescriptorModel PluginDescriptorModel copyToArray
Returns all versions of the identified plug in descriptor known to this plug in registry Returns an empty array if there are no plug ins with the specified identifier param plugin Id the unique identifier of the plug in e g code org eclipse core resources code return the plug in descriptors known to this plug in registry public Plugin Descriptor Model get Plugins String plugin Id List versions plugins get Versions plugin Id if versions null versions is Empty return new Plugin Descriptor Model 0 return Plugin Descriptor Model versions to Array new Plugin Descriptor Model versions size  pluginId PluginDescriptorModel getPlugins pluginId getVersions pluginId isEmpty PluginDescriptorModel PluginDescriptorModel toArray PluginDescriptorModel
Returns whether or not this model object is read only return code true code if this model object is read only code false code otherwise see mark Read Only public boolean is Read Only return read Only  markReadOnly isReadOnly readOnly
Returns whether or not this model object has been resolved return code true code if this model object has been resolved code false code otherwise public boolean is Resolved return resolved  isResolved
Sets this model object and all of its descendents to be read only Subclasses may extend this implementation see is Read Only public void mark Read Only read Only true plugins mark Read Only fragments mark Read Only  isReadOnly markReadOnly readOnly markReadOnly markReadOnly
Sets this model object to be resolved public void mark Resolved resolved true  markResolved
Removes the fragment with id and version if it exists in this registry This method has no effect if a fragment with the given id and version cannot be found param id the unique identifier of the fragment to remove param version the version of the fragment to remove public void remove Fragment String id String version assert Is Writeable fragments remove id version  removeFragment assertIsWriteable
Removes all versions of the identified plug in fragment from this registry This method has no effect if such a fragment cannot be found param id the unique identifier of the fragments to remove public void remove Fragments String id assert Is Writeable fragments remove Versions id  removeFragments assertIsWriteable removeVersions
Removes the plug in with id and version if it exists in this registry This method has no effect if a plug in with the given id and version cannot be found param plugin Id the unique identifier of the plug in to remove param version the version of the plug in to remove public void remove Plugin String plugin Id String version assert Is Writeable plugins remove plugin Id version  pluginId removePlugin pluginId assertIsWriteable pluginId
Removes all versions of the given plug in from this registry This method has no effect if such a plug in cannot be found param plugin Id the unique identifier of the plug ins to remove public void remove Plugins String plugin Id assert Is Writeable plugins remove Versions plugin Id  pluginId removePlugins pluginId assertIsWriteable removeVersions pluginId
Runs a resolve through the entire registry This resolve will mark any Plugin Descriptor Models which do not have access to all of their prerequisites as disabled Prerequisites which cause cyclical dependencies will be marked as disabled p If the parameter trim Disabled Plugins is set to true all Plugin Descriptor Models which are labelled as disabled will be removed from the registry p p If the paramter do Cross Linking is set to true links will be created between Extension Point Models and their corresponding Extension Models Not that these links will include disabled plugins if trim Disabled Plugins was set to false p param trim Disabled Plugins if true remove all disabled plugins from the registry recommended value true param do Cross Linking if true link all Extension Models in the registry to their corresponding Extension Point Model recommended value true return a status object describing the result of resolving public I Status resolve boolean trim Disabled Plugins boolean do Cross Linking Registry Resolver resolver new Registry Resolver resolver set Trim Plugins trim Disabled Plugins resolver set Cross Link do Cross Linking return resolver resolve this  PluginDescriptorModels trimDisabledPlugins PluginDescriptorModels doCrossLinking ExtensionPointModels ExtensionModels trimDisabledPlugins trimDisabledPlugins doCrossLinking ExtensionModels ExtensionPointModel IStatus trimDisabledPlugins doCrossLinking RegistryResolver RegistryResolver setTrimPlugins trimDisabledPlugins setCrossLink doCrossLinking
Returns a plug in registry containing all of the plug ins discovered on the given plug in path Any problems encountered are added to the status managed by the supplied factory p The given plug in path is the list of locations in which to look for plug ins If an entry identifies a directory i e ends in a this method attempts to scan all sub directories for plug ins Alternatively an entry may identify a particular plug in manifest code plugin xml code file p p b Note b this method does not affect the running platform It is intended for introspecting installed plug ins on this and other platforms The returned registry is b not b the same as the platform s registry p param plugin Path the list of locations in which to look for plug ins param factory the factory to use to create runtime model objects return the registry of parsed plug ins public static Plugin Registry Model parse Plugins URL plugin Path Factory factory return Internal Platform parse Plugins plugin Path factory false  pluginPath PluginRegistryModel parsePlugins pluginPath InternalPlatform parsePlugins pluginPath

Returns the URL specification return the URL specification or code null code public String getURL return url 
Sets the URL specification This object must not be read only param value the URL specification May be code null code public void setURL String value assert Is Writeable url value  assertIsWriteable

Creates and returns a new multi status object with the given children param plugin Id the unique identifier of the relevant plug in param code the plug in specific status code param new Children the list of children status objects param message a human readable message localized to the current locale param exception a low level exception or code null code if not applicable public Multi Status String plugin Id int code I Status new Children String message Throwable exception this plugin Id code message exception Assert is Legal new Children null int max Severity get Severity for int i 0 i new Children length i Assert is Legal new Children i null int severity new Children i get Severity if severity max Severity max Severity severity this children new I Status new Children length set Severity max Severity System arraycopy new Children 0 this children 0 new Children length  pluginId newChildren MultiStatus pluginId IStatus newChildren pluginId isLegal newChildren maxSeverity getSeverity newChildren isLegal newChildren newChildren getSeverity maxSeverity maxSeverity IStatus newChildren setSeverity maxSeverity newChildren newChildren
Creates and returns a new multi status object with no children param plugin Id the unique identifier of the relevant plug in param code the plug in specific status code param message a human readable message localized to the current locale param exception a low level exception or code null code if not applicable public Multi Status String plugin Id int code String message Throwable exception super OK plugin Id code message exception children new I Status 0  pluginId MultiStatus pluginId pluginId IStatus
Adds the given status to this multi status param status the new child status public void add I Status status Assert is Legal status null I Status result new I Status children length 1 System arraycopy children 0 result 0 children length result result length 1 status children result int new Sev status get Severity if new Sev get Severity set Severity new Sev  IStatus isLegal IStatus IStatus newSev getSeverity newSev getSeverity setSeverity newSev
Adds all of the children of the given status to this multi status Does nothing if the given status has no children which includes the case where it is not a multi status param status the status whose children are to be added to this one public void add All I Status status Assert is Legal status null I Status statuses status get Children for int i 0 i statuses length i add statuses i  addAll IStatus isLegal IStatus getChildren
Implements the corresponding method on code I Status code public I Status get Children return children  IStatus IStatus getChildren
Implements the corresponding method on code I Status code public boolean is Multi Status return true  IStatus isMultiStatus
Merges the given status into this multi status Equivalent to code add status code if the given status is not a multi status Equivalent to code add All status code if the given status is a multi status param status the status to merge into this one see add I Status see add All I Status public void merge I Status status Assert is Legal status null if status is Multi Status add status else add All status  addAll IStatus addAll IStatus IStatus isLegal isMultiStatus addAll
Returns a string representation of the status suitable for debugging purposes only public String to String String Buffer buf new String Buffer super to String buf append children NON NLS 1 for int i 0 i children length i if i 0 buf append NON NLS 1 buf append children i to String buf append NON NLS 1 return buf to String  toString StringBuffer StringBuffer toString toString toString

Constructs a new progress monitor public Null Progress Monitor super  NullProgressMonitor
This implementation does nothing Subclasses may override this method to do interesting processing when a task begins see I Progress Monitor begin Task String int public void begin Task String name int total Work do nothing  IProgressMonitor beginTask beginTask totalWork
This implementation does nothing Subclasses may override this method to do interesting processing when a task is done see I Progress Monitor done public void done do nothing  IProgressMonitor
This implementation does nothing Subclasses may override this method see I Progress Monitor internal Worked double public void internal Worked double work do nothing  IProgressMonitor internalWorked internalWorked
This implementation returns the value of the internal state variable set by code set Canceled code Subclasses which override this method should override code set Canceled code as well see I Progress Monitor is Canceled see I Progress Monitor set Canceled boolean public boolean is Canceled return cancelled  setCanceled setCanceled IProgressMonitor isCanceled IProgressMonitor setCanceled isCanceled
This implementation sets the value of an internal state variable Subclasses which override this method should override code is Canceled code as well see I Progress Monitor is Canceled see I Progress Monitor set Canceled boolean public void set Canceled boolean cancelled this cancelled cancelled  isCanceled IProgressMonitor isCanceled IProgressMonitor setCanceled setCanceled
This implementation does nothing Subclasses may override this method to do something with the name of the task see I Progress Monitor set Task Name String public void set Task Name String name do nothing  IProgressMonitor setTaskName setTaskName
This implementation does nothing Subclasses may override this method to do interesting processing when a subtask begins see I Progress Monitor sub Task String public void sub Task String name do nothing  IProgressMonitor subTask subTask
This implementation does nothing Subclasses may override this method to do interesting processing when some work has been completed see I Progress Monitor worked int public void worked int work do nothing  IProgressMonitor

public final class Operation Canceled Exception extends Runtime Exception Creates a new exception public Operation Canceled Exception super  OperationCanceledException RuntimeException OperationCanceledException
Creates a new exception with the given message param message the message for the exception public Operation Canceled Exception String message super message  OperationCanceledException

Private constructor private Path not allowed 
private Path String device String segments int  separators no segment validations are done for performance reasons this segments segments this device device hashcode is cached in all but the bottom three bits of the separators field this separators compute Hash Code 3  separators ALL SEPARATORS  _separators computeHashCode _separators ALL_SEPARATORS
Constructs a new path from the given string path The given string path must be valid The path is canonicalized and double slashes are removed except at the beginning to handle UNC paths All backslashes are replaced with forward slashes param full Path the string path see is Valid Path String public Path String full Path no segment validations are done for performance reasons initialize null full Path  fullPath isValidPath fullPath fullPath
Constructs a new path from the given device id and string path The given string path must be valid The path is canonicalized and double slashes are removed except at the beginning to handle UNC paths All backslashes are replaced with forward slashes param device the device id param path the string path see is Valid Path String see set Device String public Path String device String path no segment validations are done for performance reasons initialize device path  isValidPath setDevice
public I Path add File Extension String extension if is Root is Empty has Trailing Separator return this int len segments length String new Segments new String len System arraycopy segments 0 new Segments 0 len 1 new Segments len 1 segments len 1 extension NON NLS 1 return new Path device new Segments separators  IPath addFileExtension isRoot isEmpty hasTrailingSeparator newSegments newSegments newSegments newSegments
public I Path add Trailing Separator if has Trailing Separator is Root return this XXX workaround see 1GIGQ9V if is Empty return new Path device segments HAS LEADING return new Path device segments separators HAS TRAILING  IPath addTrailingSeparator hasTrailingSeparator isRoot isEmpty HAS_LEADING HAS_TRAILING
public I Path append String tail optimize addition of a single segment if tail index Of SEPARATOR 1 tail index Of 1 tail index Of DEVICE SEPARATOR 1 NON NLS 1 int tail Length tail length if tail Length 3 some special cases if tail Length 0 equals tail NON NLS 1 return this if equals tail NON NLS 1 return remove Last Segments 1 just add the segment int my Len segments length String new Segments new String my Len 1 System arraycopy segments 0 new Segments 0 my Len new Segments my Len tail return new Path device new Segments separators HAS TRAILING if this is Empty return new Path device tail make Relative if this is Root return new Path device tail make Absolute go with easy implementation return append new Path tail  IPath indexOf indexOf indexOf DEVICE_SEPARATOR tailLength tailLength tailLength removeLastSegments myLen newSegments myLen newSegments myLen newSegments myLen newSegments HAS_TRAILING isEmpty makeRelative isRoot makeAbsolute
public I Path append I Path tail optimize some easy cases if tail null tail segment Count 0 return this if this is Empty return tail set Device device make Relative if this is Root return tail set Device device make Absolute concatenate the two segment arrays int my Len segments length int tail Len tail segment Count String new Segments new String my Len tail Len System arraycopy segments 0 new Segments 0 my Len for int i 0 i tail Len i new Segments my Len i tail segment i use my leading separators and the tail s trailing separator Path result new Path device new Segments separators HAS LEADING IS UNC tail has Trailing Separator HAS TRAILING 0 String tail First Segment new Segments my Len if tail First Segment equals tail First Segment equals NON NLS 1 NON NLS 2 result canonicalize return result  IPath IPath segmentCount isEmpty setDevice makeRelative isRoot setDevice makeAbsolute myLen tailLen segmentCount newSegments myLen tailLen newSegments myLen tailLen newSegments myLen newSegments HAS_LEADING IS_UNC hasTrailingSeparator HAS_TRAILING tailFirstSegment newSegments myLen tailFirstSegment tailFirstSegment
Destructively converts this path to its canonical form p In its canonical form a path does not have any segments and parent references are collapsed where possible p return true if the path was modified and false otherwise private boolean canonicalize look for segments that need canonicalizing for int i 0 max segments length i max i String segment segments i if segment char At 0 segment equals segment equals NON NLS 1 NON NLS 2 path needs to be canonicalized collapse Parent References paths of length 0 have no trailing separator if segments length 0 separators HAS LEADING IS UNC recompute hash because canonicalize affects hash separators separators ALL SEPARATORS compute Hash Code 3 return true return false  charAt collapseParentReferences HAS_LEADING IS_UNC ALL_SEPARATORS computeHashCode
public Object clone try return super clone catch Clone Not Supported Exception e return null  CloneNotSupportedException
Destructively removes all occurrences of segments from this path private void collapse Parent References int segment Count segments length String stack new String segment Count int stack Pointer 0 for int i 0 i segment Count i String segment segments i if segment equals NON NLS 1 if stack Pointer 0 if the stack is empty we are going out of our scope so we need to accumulate segments But only if the original path is relative If it is absolute then we can t go any higher than root so simply toss the references if is Absolute stack stack Pointer segment stack push else if the top is then we are accumulating segments so don t pop if equals stack stack Pointer 1 NON NLS 1 stack stack Pointer NON NLS 1 else stack Pointer stack pop collapse current references else if segment equals i 0 is Absolute NON NLS 1 stack stack Pointer segment stack push if the number of segments hasn t changed then no modification needed if stack Pointer segment Count return build the new segment array backwards by popping the stack String new Segments new String stack Pointer System arraycopy stack 0 new Segments 0 stack Pointer this segments new Segments  collapseParentReferences segmentCount segmentCount stackPointer segmentCount stackPointer isAbsolute stackPointer stackPointer stackPointer stackPointer isAbsolute stackPointer stackPointer segmentCount newSegments stackPointer newSegments stackPointer newSegments
Removes duplicate slashes from the given path with the exception of leading double slash which represents a UNC path private String collapse Slashes String path int length path length if the path is only 0 1 or 2 chars long then it could not possibly have illegal duplicate slashes if length 3 return path check for an occurence of in the path Start at index 1 to ensure we skip leading UNC If there are no then there is nothing to collapse so just return if path index Of 1 1 NON NLS 1 return path We found an occurence of in the path so do the slow collapse char result new char path length int count 0 boolean has Previous false char characters path to Char Array for int index 0 index characters length index char c characters index if c SEPARATOR if has Previous skip double slashes except for beginning of UNC note that a UNC path can t have a device if device null index 1 result count c count else has Previous true result count c count else has Previous false result count c count return new String result 0 count  collapseSlashes indexOf hasPrevious toCharArray hasPrevious hasPrevious hasPrevious
private int compute Hash Code int hash device null 17 device hash Code int segment Count segments length for int i 0 i segment Count i this function tends to given a fairly even distribution hash hash 37 segments i hash Code return hash  computeHashCode hashCode segmentCount segmentCount hashCode
private int compute Length int length 0 if device null length device length if separators HAS LEADING 0 length if separators IS UNC 0 length add the segment lengths int max segments length if max 0 for int i 0 i max i length segments i length add the separator lengths length max 1 if separators HAS TRAILING 0 length return length  computeLength HAS_LEADING IS_UNC HAS_TRAILING
private int compute Segment Count String path int len path length if len 0 len 1 path char At 0 SEPARATOR return 0 int count 1 int prev 1 int i while i path index Of SEPARATOR prev 1 1 if i prev 1 i len count prev i if path char At len 1 SEPARATOR count return count  computeSegmentCount charAt indexOf charAt
Computes the segment array for the given canonicalized path private String compute Segments String path performance sensitive avoid creating garbage int segment Count compute Segment Count path if segment Count 0 return NO SEGMENTS String new Segments new String segment Count int len path length check for initial slash int first Position path char At 0 SEPARATOR 1 0 check for UNC if first Position 1 len 1 path char At 1 SEPARATOR first Position 2 int last Position path char At len 1 SEPARATOR len 1 len 2 for non empty paths the number of segments is the number of slashes plus 1 ignoring any leading and trailing slashes int next first Position for int i 0 i segment Count i int start next int end path index Of SEPARATOR next if end 1 new Segments i path substring start last Position 1 else new Segments i path substring start end next end 1 return new Segments  computeSegments segmentCount computeSegmentCount segmentCount NO_SEGMENTS newSegments segmentCount firstPosition charAt firstPosition charAt firstPosition lastPosition charAt firstPosition segmentCount indexOf newSegments lastPosition newSegments newSegments
public boolean equals Object obj if this obj return true if obj instanceof Path return false Path target Path obj check leading separators and hashcode if separators HASH MASK target separators HASH MASK return false String target Segments target segments int i segments length check segment count if i target Segments length return false check segments in reverse order later segments more likely to differ while i 0 if segments i equals target Segments i return false check device last least likely to differ return device target device device null device equals target device  HASH_MASK HASH_MASK targetSegments targetSegments targetSegments
see I Path get Device public String get Device return device  IPath getDevice getDevice
public String get File Extension if has Trailing Separator return null String last Segment last Segment if last Segment null return null int index last Segment last Index Of NON NLS 1 if index 1 return null return last Segment substring index 1  getFileExtension hasTrailingSeparator lastSegment lastSegment lastSegment lastSegment lastIndexOf lastSegment
Computes the hash code for this object public int hash Code return separators HASH MASK  hashCode HASH_MASK
see I Path has Trailing Separator public boolean has Trailing Separator return separators HAS TRAILING 0  IPath hasTrailingSeparator hasTrailingSeparator HAS_TRAILING
private void initialize String device String full Path Assert is Not Null full Path this device device index Of is much faster than replace String path full Path index Of 1 full Path full Path replace SEPARATOR int i path index Of DEVICE SEPARATOR if i 1 if the specified device is null then set it to be whatever is defined in the path string if device null this device path substring 0 i 1 path path substring i 1 path length path collapse Slashes path int len path length compute the separators array if len 2 if len 1 path char At 0 SEPARATOR this separators HAS LEADING else this separators 0 else boolean has Leading path char At 0 SEPARATOR boolean isUNC has Leading path char At 1 SEPARATOR UNC path of length two has no trailing separator boolean has Trailing isUNC len 2 path char At len 1 SEPARATOR separators has Leading HAS LEADING 0 if isUNC separators IS UNC if has Trailing separators HAS TRAILING compute segments and ensure canonical form segments compute Segments path if canonicalize compute hash now because canonicalize didn t need to do it separators separators ALL SEPARATORS compute Hash Code 3  fullPath isNotNull fullPath indexOf fullPath indexOf fullPath fullPath indexOf DEVICE_SEPARATOR collapseSlashes charAt HAS_LEADING hasLeading charAt hasLeading charAt hasTrailing charAt hasLeading HAS_LEADING IS_UNC hasTrailing HAS_TRAILING computeSegments ALL_SEPARATORS computeHashCode
see I Path is Absolute public boolean is Absolute it s absolute if it has a leading separator return separators HAS LEADING 0  IPath isAbsolute isAbsolute HAS_LEADING
public boolean is Empty true if no segments and no leading prefix return segments length 0 separators ALL SEPARATORS HAS LEADING  isEmpty ALL_SEPARATORS HAS_LEADING
public boolean is Prefix Of I Path another Path if device null if another Path get Device null return false else if device equals Ignore Case another Path get Device return false if is Empty is Root another Path is Absolute return true int len segments length if len another Path segment Count return false for int i 0 i len i if segments i equals another Path segment i return false return true  isPrefixOf IPath anotherPath anotherPath getDevice equalsIgnoreCase anotherPath getDevice isEmpty isRoot anotherPath isAbsolute anotherPath segmentCount anotherPath
see I Path is Root public boolean is Root must have no segments a leading separator and not be a UNC path return this ROOT segments length 0 separators ALL SEPARATORS HAS LEADING  IPath isRoot isRoot ALL_SEPARATORS HAS_LEADING
public boolean isUNC if device null return false return separators IS UNC 0  IS_UNC
public boolean is Valid Path String path We allow at the beginning for UNC paths if path index Of 1 0 NON NLS 1 return false Path test new Path path int segment Count test segment Count for int i 0 i segment Count i if test is Valid Segment test segment i return false return true  isValidPath indexOf segmentCount segmentCount segmentCount isValidSegment
public boolean is Valid Segment String segment int size segment length if size 0 return false if Character is Whitespace segment char At 0 Character is Whitespace segment char At size 1 return false for int i 0 i size i char c segment char At i if c c c return false return true  isValidSegment isWhitespace charAt isWhitespace charAt charAt
see I Path last Segment public String last Segment int len segments length return len 0 null segments len 1  IPath lastSegment lastSegment
public I Path make Absolute if is Absolute return this Path result new Path device segments separators HAS LEADING may need canonicalizing if it has leading or segments if result segment Count 0 String first result segment 0 if first equals first equals NON NLS 1 NON NLS 2 result canonicalize return result  IPath makeAbsolute isAbsolute HAS_LEADING segmentCount
public I Path make Relative if is Absolute return this return new Path device segments separators HAS TRAILING  IPath makeRelative isAbsolute HAS_TRAILING
public I Path makeUNC boolean toUNC if we are already in the right form then just return if toUNC isUNC return this int new Separators this separators if toUNC new Separators HAS LEADING IS UNC else mask out the UNC bit new Separators HAS LEADING HAS TRAILING return new Path toUNC null device segments new Separators  IPath newSeparators newSeparators HAS_LEADING IS_UNC newSeparators HAS_LEADING HAS_TRAILING newSeparators
public int matching First Segments I Path another Path Assert is Not Null another Path int another Path Len another Path segment Count int max Math min segments length another Path Len int count 0 for int i 0 i max i if segments i equals another Path segment i return count count return count  matchingFirstSegments IPath anotherPath isNotNull anotherPath anotherPathLen anotherPath segmentCount anotherPathLen anotherPath
public I Path remove File Extension String extension get File Extension if extension null extension equals NON NLS 1 return this String last Segment last Segment int index last Segment last Index Of extension 1 return remove Last Segments 1 append last Segment substring 0 index  IPath removeFileExtension getFileExtension lastSegment lastSegment lastSegment lastIndexOf removeLastSegments lastSegment
public I Path remove First Segments int count if count 0 return this if count segments length return new Path device NO SEGMENTS 0 Assert is Legal count 0 int new Size segments length count String new Segments new String new Size System arraycopy this segments count new Segments 0 new Size result is always a relative path return new Path device new Segments separators HAS TRAILING  IPath removeFirstSegments NO_SEGMENTS isLegal newSize newSegments newSize newSegments newSize newSegments HAS_TRAILING
public I Path remove Last Segments int count if count 0 return this if count segments length result will have no trailing separator return new Path device NO SEGMENTS separators HAS LEADING IS UNC Assert is Legal count 0 int new Size segments length count String new Segments new String new Size System arraycopy this segments 0 new Segments 0 new Size return new Path device new Segments separators  IPath removeLastSegments NO_SEGMENTS HAS_LEADING IS_UNC isLegal newSize newSegments newSize newSegments newSize newSegments
public I Path remove Trailing Separator if has Trailing Separator return this return new Path device segments separators HAS LEADING IS UNC  IPath removeTrailingSeparator hasTrailingSeparator HAS_LEADING IS_UNC
public String segment int index if index segments length return null return segments index 
see I Path segment Count public int segment Count return segments length  IPath segmentCount segmentCount
public String segments String segment Copy new String segments length System arraycopy segments 0 segment Copy 0 segments length return segment Copy  segmentCopy segmentCopy segmentCopy
public I Path set Device String value if value null Assert is True value index Of I Path DEVICE SEPARATOR value length 1 Last character should be the device separator NON NLS 1 return the reciever if the device is the same if value device value null value equals device return this return new Path value segments separators  IPath setDevice isTrue indexOf IPath DEVICE_SEPARATOR
see I Path to File public File to File return new File toOS String  IPath toFile toFile toOSString
public String toOS String Note that this method is identical to to String except it uses the OS file separator instead of the path separator int result Size compute Length if result Size 0 return EMPTY STRING char FILE SEPARATOR File separator Char char result new char result Size int offset 0 if device null int size device length device get Chars 0 size result offset offset size if separators HAS LEADING 0 result offset FILE SEPARATOR if separators IS UNC 0 result offset FILE SEPARATOR int len segments length 1 if len 0 append all but the last segment with separators for int i 0 i len i int size segments i length segments i get Chars 0 size result offset offset size result offset FILE SEPARATOR append the last segment int size segments len length segments len get Chars 0 size result offset offset size if separators HAS TRAILING 0 result offset FILE SEPARATOR return new String result  toOSString toString resultSize computeLength resultSize EMPTY_STRING FILE_SEPARATOR separatorChar resultSize getChars HAS_LEADING FILE_SEPARATOR IS_UNC FILE_SEPARATOR getChars FILE_SEPARATOR getChars HAS_TRAILING FILE_SEPARATOR
public String to String int result Size compute Length if result Size 0 return EMPTY STRING char result new char result Size int offset 0 if device null int size device length device get Chars 0 size result offset offset size if separators HAS LEADING 0 result offset SEPARATOR if separators IS UNC 0 result offset SEPARATOR int len segments length 1 if len 0 append all but the last segment with separators for int i 0 i len i int size segments i length segments i get Chars 0 size result offset offset size result offset SEPARATOR append the last segment int size segments len length segments len get Chars 0 size result offset offset size if separators HAS TRAILING 0 result offset SEPARATOR return new String result  toString resultSize computeLength resultSize EMPTY_STRING resultSize getChars HAS_LEADING IS_UNC getChars getChars HAS_TRAILING
public I Path upto Segment int count if count 0 return new Path device EMPTY STRING ARRAY separators HAS LEADING IS UNC if count segments length return this Assert is True count 0 Invalid parameter to Path upto Segment NON NLS 1 String new Segments new String count System arraycopy segments 0 new Segments 0 count return new Path device new Segments separators  IPath uptoSegment EMPTY_STRING_ARRAY HAS_LEADING IS_UNC isTrue uptoSegment newSegments newSegments newSegments

Private constructor to block instance creation private Platform super 
Adds the given authorization information to the keyring 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 usernames 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 usernames 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 keyring 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 which 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 asis If the specified URL is a plug in relative URL of a file incl jar archive it is returned as a locally accessible URL using file or jar file protocol caching the file locally if required If the specified URL is a plug in relative URL of a directory an exception is thrown 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 filesystem 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 It is recommended not to keep this value as the log location may vary when an instance location is being set s 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 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 If the compatibility layer is installed this method works as described If the compatibility layer is not installed code null code is returned in all cases 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  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 deregister 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 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 The resource bundle is typcially stored as the code plugin properties code file in the plug in itself and contains any translatable strings used in the plug in manifest file code plugin xml code along with other resource strings used by the plug in implementation 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 begining 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 begining 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 b Note b This is an early access API to the new OSGI based Eclipse 3 0 Platform Runtime Because the AP Is for the new runtime have not yet been full stabilized they should only be used by clients needing to take particular advantage of new OSGI specific functionality and only then with the understanding that these AP Is are likely to change in incompatible ways until they reach their finished stable form post 3 0 p return the platform admin for this instance of Eclipse public static Platform Admin get Platform Admin return Internal Platform get Default get Platform Admin  APIs APIs 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
Deregisters the given bundle group provider with the platform param provider a provider to deregister 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 setttings 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 Configuration Location  getUserLocation InternalPlatform getDefault getConfigurationLocation
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 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

public abstract class Platform Object implements I Adaptable Constructs a new platform object public Platform Object super  PlatformObject IAdaptable PlatformObject
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found p This implementation of the method declared by code I Adaptable code passes the request along to the platform s adapter manager roughly code Platform get Adapter Manager get Adapter this adapter code Subclasses may override this method however if they do so they should invoke the method on their superclass to ensure that the Platform s adapter manager is consulted p param adapter the class to adapt to return the adapted object or code null code see I Adaptable get Adapter Class see Platform get Adapter Manager public Object get Adapter Class adapter return Internal Platform get Default get Adapter Manager get Adapter this adapter  IAdaptable getAdapterManager getAdapter IAdaptable getAdapter getAdapterManager getAdapter InternalPlatform getDefault getAdapterManager getAdapter

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 Policy bind plugin deactivated Load this get Class get Name descriptor get Unique Identifier is not activated NON NLS 1 NON NLS 2 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 Policy bind plugin startup Problems descriptor get Unique Identifier NON NLS 1 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 deactivatedLoad getClass getName getUniqueIdentifier InternalPlatform getDefault getBundle getUniqueIdentifier getState BundleException 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 String plugin Id bundle get Symbolic Name descriptor Compatibility Helper get Plugin Descriptor plugin Id if descriptor null Compatibility Helper set Plugin descriptor this return descriptor  IPluginDescriptor getDescriptor IPluginDescriptor IPluginDescriptor getDescriptor pluginId getSymbolicName CompatibilityHelper getPluginDescriptor pluginId CompatibilityHelper setPlugin
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 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  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 PREFERENCES Policy debug Plugin preferences already loaded for bundle get Symbolic Name NON NLS 1 return preferences if Internal Platform DEBUG PREFERENCES 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_PREFERENCES getSymbolicName InternalPlatform DEBUG_PREFERENCES 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 if preferences null preferences needs Saving nothing to save return try preferences flush catch Backing Store Exception e String message Policy bind preferences save Problems NON NLS 1 I Status status new Status I Status ERROR Platform PI RUNTIME I Status ERROR message e Internal Platform get Default log status  OutputStream needsSaving savePluginPreferences needsSaving BackingStoreException saveProblems IStatus IStatus PI_RUNTIME IStatus 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 My Plugin get Plugin get Plugin Preferences set Default 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 MyPlugin getPlugin getPluginPreferences setDefault 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 get 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 Policy bind plugin shutdown Problems descriptor get Unique Identifier NON NLS 1 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 getCompatibility getClass getMethod doPluginDeactivation SecurityException NoSuchMethodException IllegalArgumentException IllegalAccessException InvocationTargetException 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 void initialize Descriptor String symbolic Name if Compatibility Helper get Compatibility null return This associate a descriptor to any real bundle that uses this to start if symbolic Name null return descriptor Compatibility Helper get Plugin Descriptor symbolic Name Compatibility Helper set Plugin descriptor this Compatibility Helper set Active descriptor  initializeDescriptor symbolicName CompatibilityHelper getCompatibility symbolicName CompatibilityHelper getPluginDescriptor symbolicName 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 plug in version identifier from its components param major major component of the version identifier param minor minor component of the version identifier param service service update component of the version identifier public Plugin Version Identifier int major int minor int service this major minor service null  PluginVersionIdentifier
Creates a plug in version identifier from its components param major major component of the version identifier param minor minor component of the version identifier param service service update component of the version identifier param qualifier qualifier component of the version identifier Qualifier characters that are not a letter or a digit are replaced public Plugin Version Identifier int major int minor int service String qualifier Do the test outside of the assert so that they Policy bind will not be evaluated each time including cases when we would have passed by the assert if major 0 Assert is True false Policy bind parse postive Major major SEPARATOR minor SEPARATOR service SEPARATOR qualifier NON NLS 1 if minor 0 Assert is True false Policy bind parse postive Minor major SEPARATOR minor SEPARATOR service SEPARATOR qualifier NON NLS 1 if service 0 Assert is True false Policy bind parse postive Service major SEPARATOR minor SEPARATOR service SEPARATOR qualifier NON NLS 1 if qualifier null qualifier NON NLS 1 this major major this minor minor this service service this qualifier verify Qualifier qualifier  PluginVersionIdentifier isTrue postiveMajor isTrue postiveMinor isTrue postiveService verifyQualifier
Creates a plug in version identifier from the given string The string represenation consists of up to 4 tokens separated by decimal point For example the following are valid version identifiers as strings ul li code 0 0 0 code li li code 1 0 127564 code li li code 3 7 2 build 127J code li li code 1 9 code interpreted as code 1 9 0 code li li code 3 code interpreted as code 3 0 0 code li ul p param version Id string representation of the version identifier Qualifier characters that are not a letter or a digit are replaced public Plugin Version Identifier String version Id Object parts parse Version version Id this major Integer parts 0 int Value this minor Integer parts 1 int Value this service Integer parts 2 int Value this qualifier String parts 3  versionId PluginVersionIdentifier versionId parseVersion versionId intValue intValue intValue
Validates the given string as a plug in version identifier param version the string to validate return a status object with code code I Status OK code if the given string is valid as a plug in version identifier otherwise a status object indicating what is wrong with the string since 2 0 public static I Status validate Version String version try parse Version version catch Runtime Exception e return new Status I Status ERROR Platform PI RUNTIME I Status ERROR e get Message e return Status OK STATUS NON NLS 1  IStatus IStatus validateVersion parseVersion RuntimeException IStatus PI_RUNTIME IStatus getMessage OK_STATUS
private static Object parse Version String version Id Do the test outside of the assert so that they Policy bind will not be evaluated each time including cases when we would have passed by the assert if version Id null Assert is Not Null null Policy bind parse empty Plugin Version NON NLS 1 String s version Id trim if s equals NON NLS 1 Assert is True false Policy bind parse empty Plugin Version NON NLS 1 if s starts With SEPARATOR Assert is True false Policy bind parse separator Start Version s NON NLS 1 if s ends With SEPARATOR Assert is True false Policy bind parse separator End Version s NON NLS 1 if s index Of SEPARATOR SEPARATOR 1 Assert is True false Policy bind parse double Separator Version s NON NLS 1 String Tokenizer st new String Tokenizer s SEPARATOR Vector elements new Vector 4 while st has More Tokens elements add Element st next Token int element Size elements size if element Size 0 Assert is True false Policy bind parse one Element Plugin Version s NON NLS 1 if element Size 4 Assert is True false Policy bind parse four Element Plugin Version s NON NLS 1 int numbers new int 3 try numbers 0 Integer parse Int String elements element At 0 if numbers 0 0 Assert is True false Policy bind parse postive Major s NON NLS 1 catch Number Format Exception nfe Assert is True false Policy bind parse numeric Major Component s NON NLS 1 try if element Size 2 numbers 1 Integer parse Int String elements element At 1 if numbers 1 0 Assert is True false Policy bind parse postive Minor s NON NLS 1 else numbers 1 0 catch Number Format Exception nfe Assert is True false Policy bind parse numeric Minor Component s NON NLS 1 try if element Size 3 numbers 2 Integer parse Int String elements element At 2 if numbers 2 0 Assert is True false Policy bind parse postive Service s NON NLS 1 else numbers 2 0 catch Number Format Exception nfe Assert is True false Policy bind parse numeric Service Component s NON NLS 1 result is a 4 element array with the major minor service and qualifier Object result new Object 4 result 0 new Integer numbers 0 result 1 new Integer numbers 1 result 2 new Integer numbers 2 if element Size 4 result 3 verify Qualifier String elements element At 3 else result 3 NON NLS 1 return result  parseVersion versionId versionId isNotNull emptyPluginVersion versionId isTrue emptyPluginVersion startsWith isTrue separatorStartVersion endsWith isTrue separatorEndVersion indexOf isTrue doubleSeparatorVersion StringTokenizer StringTokenizer hasMoreTokens addElement nextToken elementSize elementSize isTrue oneElementPluginVersion elementSize isTrue fourElementPluginVersion parseInt elementAt isTrue postiveMajor NumberFormatException isTrue numericMajorComponent elementSize parseInt elementAt isTrue postiveMinor NumberFormatException isTrue numericMinorComponent elementSize parseInt elementAt isTrue postiveService NumberFormatException isTrue numericServiceComponent elementSize verifyQualifier elementAt
Compare version identifiers for equality Identifiers are equal if all of their components are equal param object an object to compare return whehter or not the two objects are equal public boolean equals Object object if object instanceof Plugin Version Identifier return false Plugin Version Identifier v Plugin Version Identifier object return v get Major Component major v get Minor Component minor v get Service Component service v get Qualifier Component equals qualifier  PluginVersionIdentifier PluginVersionIdentifier PluginVersionIdentifier getMajorComponent getMinorComponent getServiceComponent getQualifierComponent
Returns a hash code value for the object return an integer which is a hash code value for this object public int hash Code int code major minor service R1 0 result if qualifier equals NON NLS 1 return code else return code qualifier hash Code  hashCode hashCode
Returns the major incompatible component of this version identifier return the major version public int get Major Component return major  getMajorComponent
Returns the minor compatible component of this version identifier return the minor version public int get Minor Component return minor  getMinorComponent
Returns the service level component of this version identifier return the service level public int get Service Component return service  getServiceComponent
Returns the qualifier component of this version identifier return the qualifier public String get Qualifier Component return qualifier  getQualifierComponent
Compares two version identifiers to see if this one is greater than or equal to the argument p A version identifier is considered to be greater than or equal if its major component is greater than the argument major component or the major components are equal and its minor component is greater than the argument minor component or the major and minor components are equal and its service component is greater than the argument service component or the major minor and service components are equal and the qualifier component is greated than the argument qualifier component using lexicographic string comparison or all components are equal p param id the other version identifier return code true code is this version identifier is compatible with the given version identifier and code false code otherwise since 2 0 public boolean is Greater Or Equal To Plugin Version Identifier id if id null return false if major id get Major Component return true if major id get Major Component minor id get Minor Component return true if major id get Major Component minor id get Minor Component service id get Service Component return true if major id get Major Component minor id get Minor Component service id get Service Component qualifier compare To id get Qualifier Component 0 return true else return false  isGreaterOrEqualTo PluginVersionIdentifier getMajorComponent getMajorComponent getMinorComponent getMajorComponent getMinorComponent getServiceComponent getMajorComponent getMinorComponent getServiceComponent compareTo getQualifierComponent
Compares two version identifiers for compatibility p A version identifier is considered to be compatible if its major component equals to the argument major component and its minor component is greater than or equal to the argument minor component If the minor components are equal than the service level of the version identifier must be greater than or equal to the service level of the argument identifier If the service levels are equal the two version identifiers are considered to be equivalent if this qualifier is greated or equal to the qualifier of the argument using lexicographic string comparison p param id the other version identifier return code true code is this version identifier is compatible with the given version identifier and code false code otherwise public boolean is Compatible With Plugin Version Identifier id if id null return false if major id get Major Component return false if minor id get Minor Component return true if minor id get Minor Component return false if service id get Service Component return true if service id get Service Component return false if qualifier compare To id get Qualifier Component 0 return true else return false  isCompatibleWith PluginVersionIdentifier getMajorComponent getMinorComponent getMinorComponent getServiceComponent getServiceComponent compareTo getQualifierComponent
Compares two version identifiers for equivalency p Two version identifiers are considered to be equivalent if their major and minor component equal and are at least at the same service level as the argument If the service levels are equal the two version identifiers are considered to be equivalent if this qualifier is greated or equal to the qualifier of the argument using lexicographic string comparison p param id the other version identifier return code true code is this version identifier is equivalent to the given version identifier and code false code otherwise public boolean is Equivalent To Plugin Version Identifier id if id null return false if major id get Major Component return false if minor id get Minor Component return false if service id get Service Component return true if service id get Service Component return false if qualifier compare To id get Qualifier Component 0 return true else return false  isEquivalentTo PluginVersionIdentifier getMajorComponent getMinorComponent getServiceComponent getServiceComponent compareTo getQualifierComponent
Compares two version identifiers for perfect equality p Two version identifiers are considered to be perfectly equal if their major minor service and qualifier components are equal p param id the other version identifier return code true code is this version identifier is perfectly equal to the given version identifier and code false code otherwise since 2 0 public boolean is Perfect Plugin Version Identifier id if id null return false if major id get Major Component minor id get Minor Component service id get Service Component qualifier equals id get Qualifier Component return false else return true  isPerfect PluginVersionIdentifier getMajorComponent getMinorComponent getServiceComponent getQualifierComponent
Compares two version identifiers for order using multi decimal comparison param id the other version identifier return code true code is this version identifier is greater than the given version identifier and code false code otherwise public boolean is Greater Than Plugin Version Identifier id if id null if major 0 minor 0 service 0 qualifier equals NON NLS 1 return false NON NLS 1 else return true if major id get Major Component return true if major id get Major Component return false if minor id get Minor Component return true if minor id get Minor Component return false if service id get Service Component return true if service id get Service Component return false if qualifier compare To id get Qualifier Component 0 return true else return false  isGreaterThan PluginVersionIdentifier getMajorComponent getMajorComponent getMinorComponent getMinorComponent getServiceComponent getServiceComponent compareTo getQualifierComponent
Returns the string representation of this version identifier The result satisfies code vi equals new Plugin Version Identifier vi to String code return the string representation of this plug in version identifier public String to String String base major SEPARATOR minor SEPARATOR service R1 0 result if qualifier equals NON NLS 1 return base else return base SEPARATOR qualifier  PluginVersionIdentifier toString toString
private static String verify Qualifier String s char chars s trim to Char Array boolean whitespace false for int i 0 i chars length i if Character is Letter Or Digit chars i chars i whitespace true return whitespace new String chars s  verifyQualifier toCharArray isLetterOrDigit

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 filesystem 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 try output new Buffered Output Stream new File Output Stream file I Eclipse Preferences node I Eclipse Preferences service get Root Node node Plugin PLUGIN PREFERENCE SCOPE service export Preferences node output null catch File Not Found Exception e String message Policy bind preferences error Writing file to String e get Message NON NLS 1 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 BufferedOutputStream FileOutputStream IEclipsePreferences IEclipsePreferences getRootNode PLUGIN_PREFERENCE_SCOPE exportPreferences FileNotFoundException errorWriting toString 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 filesystem 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 Policy bind preferences file Not Found path toOS String NON NLS 1 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 Policy bind preferences file Not Found path toOS String NON NLS 1 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 fileNotFound toOSString CoreException IStatus PI_RUNTIME IPreferencesService getPreferencesService InputStream BufferedInputStream FileInputStream toFile importPreferences FileNotFoundException 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 filesystem 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 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
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
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 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
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 integter 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

Default constructor for the class public Abstract Preference Initializer super  AbstractPreferenceInitializer
TODO public abstract void initialize Default Preferences  initializeDefaultPreferences

see org eclipse core runtime preferences I Scope Context get Name public String get Name return SCOPE  IScopeContext getName getName
public I Path get Location I Path result null Location location Internal Platform get Default get Configuration Location if location is Read Only URL url location getURL if url null result new Path url get File if result is Empty result null return result  IPath getLocation IPath InternalPlatform getDefault getConfigurationLocation isReadOnly getFile isEmpty

see org eclipse core runtime preferences I Scope Context get Name public String get Name return SCOPE  IScopeContext getName getName
see org eclipse core runtime preferences I Scope Context get Location public I Path get Location We don t persist defaults so return null return null  IScopeContext getLocation IPath getLocation

Constructor for a new node change event object param parent the parent node param child the child node public Node Change Event Preferences parent Preferences child super parent this child child  NodeChangeEvent
Return the parent node for this event This is the parent of the node which was added or removed return the parent node public Preferences get Parent return Preferences get Source  getParent getSource
Return the child node for this event This is the node which was added or removed p Note The child node may have been removed as a result of the bundle supplying its implementation being un installed In this case the only method which can safely be called on the child is name p return the child node public Preferences get Child return child  getChild
Notification that a child node was added to the preference hierarchy The given event must not be code null code param event an event specifying the details about the new node see I Eclipse Preferences Node Change Event see I Eclipse Preferences add Node Change Listener I Eclipse Preferences I Node Change Listener see I Eclipse Preferences remove Node Change Listener I Eclipse Preferences I Node Change Listener  IEclipsePreferences NodeChangeEvent IEclipsePreferences addNodeChangeListener IEclipsePreferences INodeChangeListener IEclipsePreferences removeNodeChangeListener IEclipsePreferences INodeChangeListener
Notification that a child node was removed from the preference hierarchy The given event must not be code null code param event an event specifying the details about the removed node see I Eclipse Preferences Node Change Event see I Eclipse Preferences add Node Change Listener I Eclipse Preferences I Node Change Listener see I Eclipse Preferences remove Node Change Listener I Eclipse Preferences I Node Change Listener  IEclipsePreferences NodeChangeEvent IEclipsePreferences addNodeChangeListener IEclipsePreferences INodeChangeListener IEclipsePreferences removeNodeChangeListener IEclipsePreferences INodeChangeListener
Constructor for a new preference change event The node and the key must not be code null code param node the node on which the change occurred param key the preference key param old Value the old preference value param new Value the new preference value public Preference Change Event Object node String key Object old Value Object new Value super node if key null node instanceof Preferences throw new Illegal Argument Exception this key key this new Value new Value this old Value old Value  oldValue newValue PreferenceChangeEvent oldValue newValue IllegalArgumentException newValue newValue oldValue oldValue
Return the preference node on which the change occurred return the node public Preferences get Node return Preferences source  getNode
Return the key of the preference which was changed return the preference key public String get Key return key  getKey
Return the new value for the preference or code null code if the preference was removed return the new value or code null code public Object get New Value return new Value  getNewValue newValue
Return the old value for the preference or code null code if the preference was removed or if it cannot be determined return the old value or code null code public Object get Old Value return old Value  getOldValue oldValue
Notification that a preference value has changed in the preference store The given event object describes the change details and must not be code null code param event the event details see I Eclipse Preferences Preference Change Event see I Eclipse Preferences add Preference Change Listener I Eclipse Preferences I Preference Change Listener see I Eclipse Preferences remove Preference Change Listener I Eclipse Preferences I Preference Change Listener  IEclipsePreferences PreferenceChangeEvent IEclipsePreferences addPreferenceChangeListener IEclipsePreferences IPreferenceChangeListener IEclipsePreferences removePreferenceChangeListener IEclipsePreferences IPreferenceChangeListener
Register the given listener for changes to this node Duplicate calls to this method with the same listener will have no effect The given listener argument must not be code null code param listener the node change listener to add throws Illegal State Exception if this node or an ancestor has been removed see remove Node Change Listener I Eclipse Preferences I Node Change Listener see I Eclipse Preferences I Node Change Listener  IllegalStateException removeNodeChangeListener IEclipsePreferences INodeChangeListener IEclipsePreferences INodeChangeListener
De register the given listener from receiving event change notifications for this node Calling this method with a listener which is not registered has no effect The given listener argument must not be code null code param listener the node change listener to remove throws Illegal State Exception if this node or an ancestor has been removed see add Node Change Listener I Eclipse Preferences I Node Change Listener see I Eclipse Preferences I Node Change Listener  IllegalStateException addNodeChangeListener IEclipsePreferences INodeChangeListener IEclipsePreferences INodeChangeListener
Register the given listener for notification of preference changes to this node Calling this method multiple times with the same listener has no effect The given listener argument must not be code null code param listener the preference change listener to register throws Illegal State Exception if this node or an ancestor has been removed see remove Preference Change Listener I Eclipse Preferences I Preference Change Listener see I Eclipse Preferences I Preference Change Listener  IllegalStateException removePreferenceChangeListener IEclipsePreferences IPreferenceChangeListener IEclipsePreferences IPreferenceChangeListener
De register the given listner from receiving notification of preference changes to this node Calling this method multiple times with the same listener has no effect The given listener argument must not be code null code param listener the preference change listener to remove throws Illegal State Exception if this node or an ancestor has been removed see add Preference Change Listener I Eclipse Preferences I Preference Change Listener see I Eclipse Preferences I Preference Change Listener  IllegalStateException addPreferenceChangeListener IEclipsePreferences IPreferenceChangeListener IEclipsePreferences IPreferenceChangeListener
Remove this node from the preference hierarchy If this node is the scope root then do not remove this node only remove this node s children p Functionally equivalent to calling link Preferences remove Node See the spec of link Preferences remove Node for more details p p Implementors must send the appropriate link Node Change Event to listeners who are registered on this node s parent p throws Backing Store Exception if there was a problem removing this node see org osgi service prefs Preferences remove Node see Node Change Event  removeNode removeNode NodeChangeEvent BackingStoreException removeNode NodeChangeEvent
Return the preferences node with the given path The given path must not be code null code p See the spec of link Preferences node String for more details p p Note that if the node does not yet exist and is created then the appropriate link Node Change Event must be sent to listeners who are registered at this node p param path the path of the node return the node see org osgi service prefs Preferences node String see Node Change Event  NodeChangeEvent NodeChangeEvent
Accepts the given visitor The visitor s code visit code method is called with this node If the visitor returns code true code this method visits this node s children param visitor the visitor see I Preference Node Visitor visit I Eclipse Preferences throws Backing Store Exception  IPreferenceNodeVisitor IEclipsePreferences BackingStoreException

Return code true code if this node was an export root when the preferences were exported and code false code otherwise This information is used during the import to clear nodes when importing a node s and its children s preferences return code true code if this node is an export root and code false code otherwise 

public I Path get Location Return null The instance location usually corresponds to the state location of the bundle and we don t know what bundle we are dealing with return null  IPath getLocation
see org eclipse core runtime preferences I Scope Context get Name public String get Name return SCOPE  IScopeContext getName getName

Visits the given preference node param node the node to visit return code true code if the node s children should be visited code false code if they should be skipped throws Backing Store Exception  BackingStoreException

Lookup the given key in the specified preference nodes in the given order Return the value from the first node the key is found in If the key is not defined in any of the given nodes then return the specified default value p Immediately returns the default value if the node list is code null code If any of the individual entries in the node list are code null code then skip over them and move on to the next node in the list p param key the preference key param default Value the default value param nodes the list of nodes to search or core null code return the stored preference value or the specified default value see org osgi service prefs Preferences  defaultValue
Return the value stored in the preference store for the given key If the key is not defined then return the specified default value Use the canonical scope lookup order for finding the preference value p The semantics of this method are to calculate the appropriate link Preferences nodes in the preference hierarchy to use and then call the link get String String Preferences method The order of the nodes is calculated by consulting the default scope lookup order as set by link set Default Lookup Order String String String p p The specified key may either refer to a simple key or be the concatenation of the path of a child node and key If the key contains a slash character then a double slash must be used to denote the end of they child path and the beginning of the key Otherwise it is assumed that the key is the last segment of the path The following are some examples of keys and their meanings ul li a look for a value for the property a li a look for a value for the property a li a look for a value for the property a li a b look for a value for the property a b li a b c look in the child node a b for property a li a b c look in the child node a b for property a li a b c look in the child node a b for the property c li a b c d look in the child node a b for the property c d li a b c d look in the child node a b for the property c d li a b c d look in the child node a b for the property c d ul p p Callers may specify an array of scope context objects to aid in the determination of the correct nodes For each entry in the lookup order the array of contexts is consulted and if one matching the scope exists then it is used to calculate the node Otherwise a default calculation algorithm is used p p An example of a qualifier for an Eclipse 2 1 preference is the plug in identifier e g org eclipse core resources for description autobuild p param qualifier a namespace qualifier for the preference param key the name of the preference optionally including its path param default Value the value to use if the preference is not defined param contexts optional context objects to help scopes determine which nodes to search or code null code return the value of the preference or the given default value see I Scope Context see get java lang String java lang String org osgi service prefs Preferences see get Lookup Order java lang String java lang String see get Default Lookup Order java lang String java lang String  setDefaultLookupOrder defaultValue IScopeContext getLookupOrder getDefaultLookupOrder
Return the value stored in the preference store for the given key If the key is not defined then return the specified default value Use the canonical scope lookup order for finding the preference value p The semantics of this method are to calculate the appropriate link Preferences nodes in the preference hierarchy to use and then call the link get String String Preferences method The order of the nodes is calculated by consulting the default scope lookup order as set by link set Default Lookup Order String String String p p The specified key may either refer to a simple key or be the concatenation of the path of a child node and key If the key contains a slash character then a double slash must be used to denote the end of they child path and the beginning of the key Otherwise it is assumed that the key is the last segment of the path The following are some examples of keys and their meanings ul li a look for a value for the property a li a look for a value for the property a li a look for a value for the property a li a b look for a value for the property a b li a b c look in the child node a b for property a li a b c look in the child node a b for property a li a b c look in the child node a b for the property c li a b c d look in the child node a b for the property c d li a b c d look in the child node a b for the property c d li a b c d look in the child node a b for the property c d ul p p Callers may specify an array of scope context objects to aid in the determination of the correct nodes For each entry in the lookup order the array of contexts is consulted and if one matching the scope exists then it is used to calculate the node Otherwise a default calculation algorithm is used p p An example of a qualifier for an Eclipse 2 1 preference is the plug in identifier e g org eclipse core resources for description autobuild p param qualifier a namespace qualifier for the preference param key the name of the preference optionally including its path param default Value the value to use if the preference is not defined param contexts optional context objects to help scopes determine which nodes to search or code null code return the value of the preference or the given default value see I Scope Context see get java lang String java lang String org osgi service prefs Preferences see get Lookup Order java lang String java lang String see get Default Lookup Order java lang String java lang String  setDefaultLookupOrder defaultValue IScopeContext getLookupOrder getDefaultLookupOrder
Return the value stored in the preference store for the given key If the key is not defined then return the specified default value Use the canonical scope lookup order for finding the preference value p The semantics of this method are to calculate the appropriate link Preferences nodes in the preference hierarchy to use and then call the link get String String Preferences method The order of the nodes is calculated by consulting the default scope lookup order as set by link set Default Lookup Order String String String p p The specified key may either refer to a simple key or be the concatenation of the path of a child node and key If the key contains a slash character then a double slash must be used to denote the end of they child path and the beginning of the key Otherwise it is assumed that the key is the last segment of the path The following are some examples of keys and their meanings ul li a look for a value for the property a li a look for a value for the property a li a look for a value for the property a li a b look for a value for the property a b li a b c look in the child node a b for property a li a b c look in the child node a b for property a li a b c look in the child node a b for the property c li a b c d look in the child node a b for the property c d li a b c d look in the child node a b for the property c d li a b c d look in the child node a b for the property c d ul p p Callers may specify an array of scope context objects to aid in the determination of the correct nodes For each entry in the lookup order the array of contexts is consulted and if one matching the scope exists then it is used to calculate the node Otherwise a default calculation algorithm is used p p An example of a qualifier for an Eclipse 2 1 preference is the plug in identifier e g org eclipse core resources for description autobuild p param qualifier a namespace qualifier for the preference param key the name of the preference optionally including its path param default Value the value to use if the preference is not defined param contexts optional context objects to help scopes determine which nodes to search or code null code return the value of the preference or the given default value see I Scope Context see get java lang String java lang String org osgi service prefs Preferences see get Lookup Order java lang String java lang String see get Default Lookup Order java lang String java lang String  setDefaultLookupOrder defaultValue IScopeContext getLookupOrder getDefaultLookupOrder
Return the value stored in the preference store for the given key If the key is not defined then return the specified default value Use the canonical scope lookup order for finding the preference value p The semantics of this method are to calculate the appropriate link Preferences nodes in the preference hierarchy to use and then call the link get String String Preferences method The order of the nodes is calculated by consulting the default scope lookup order as set by link set Default Lookup Order String String String p p The specified key may either refer to a simple key or be the concatenation of the path of a child node and key If the key contains a slash character then a double slash must be used to denote the end of they child path and the beginning of the key Otherwise it is assumed that the key is the last segment of the path The following are some examples of keys and their meanings ul li a look for a value for the property a li a look for a value for the property a li a look for a value for the property a li a b look for a value for the property a b li a b c look in the child node a b for property a li a b c look in the child node a b for property a li a b c look in the child node a b for the property c li a b c d look in the child node a b for the property c d li a b c d look in the child node a b for the property c d li a b c d look in the child node a b for the property c d ul p p Callers may specify an array of scope context objects to aid in the determination of the correct nodes For each entry in the lookup order the array of contexts is consulted and if one matching the scope exists then it is used to calculate the node Otherwise a default calculation algorithm is used p p An example of a qualifier for an Eclipse 2 1 preference is the plug in identifier e g org eclipse core resources for description autobuild p param qualifier a namespace qualifier for the preference param key the name of the preference optionally including its path param default Value the value to use if the preference is not defined param contexts optional context objects to help scopes determine which nodes to search or code null code return the value of the preference or the given default value see I Scope Context see get java lang String java lang String org osgi service prefs Preferences see get Lookup Order java lang String java lang String see get Default Lookup Order java lang String java lang String  setDefaultLookupOrder defaultValue IScopeContext getLookupOrder getDefaultLookupOrder
Return the value stored in the preference store for the given key If the key is not defined then return the specified default value Use the canonical scope lookup order for finding the preference value p The semantics of this method are to calculate the appropriate link Preferences nodes in the preference hierarchy to use and then call the link get String String Preferences method The order of the nodes is calculated by consulting the default scope lookup order as set by link set Default Lookup Order String String String p p The specified key may either refer to a simple key or be the concatenation of the path of a child node and key If the key contains a slash character then a double slash must be used to denote the end of they child path and the beginning of the key Otherwise it is assumed that the key is the last segment of the path The following are some examples of keys and their meanings ul li a look for a value for the property a li a look for a value for the property a li a look for a value for the property a li a b look for a value for the property a b li a b c look in the child node a b for property a li a b c look in the child node a b for property a li a b c look in the child node a b for the property c li a b c d look in the child node a b for the property c d li a b c d look in the child node a b for the property c d li a b c d look in the child node a b for the property c d ul p p Callers may specify an array of scope context objects to aid in the determination of the correct nodes For each entry in the lookup order the array of contexts is consulted and if one matching the scope exists then it is used to calculate the node Otherwise a default calculation algorithm is used p p An example of a qualifier for an Eclipse 2 1 preference is the plug in identifier e g org eclipse core resources for description autobuild p param qualifier a namespace qualifier for the preference param key the name of the preference optionally including its path param default Value the value to use if the preference is not defined param contexts optional context objects to help scopes determine which nodes to search or code null code return the value of the preference or the given default value see I Scope Context see get java lang String java lang String org osgi service prefs Preferences see get Lookup Order java lang String java lang String see get Default Lookup Order java lang String java lang String  setDefaultLookupOrder defaultValue IScopeContext getLookupOrder getDefaultLookupOrder
Return the value stored in the preference store for the given key If the key is not defined then return the specified default value Use the canonical scope lookup order for finding the preference value p The semantics of this method are to calculate the appropriate link Preferences nodes in the preference hierarchy to use and then call the link get String String Preferences method The order of the nodes is calculated by consulting the default scope lookup order as set by link set Default Lookup Order String String String p p The specified key may either refer to a simple key or be the concatenation of the path of a child node and key If the key contains a slash character then a double slash must be used to denote the end of they child path and the beginning of the key Otherwise it is assumed that the key is the last segment of the path The following are some examples of keys and their meanings ul li a look for a value for the property a li a look for a value for the property a li a look for a value for the property a li a b look for a value for the property a b li a b c look in the child node a b for property a li a b c look in the child node a b for property a li a b c look in the child node a b for the property c li a b c d look in the child node a b for the property c d li a b c d look in the child node a b for the property c d li a b c d look in the child node a b for the property c d ul p p Callers may specify an array of scope context objects to aid in the determination of the correct nodes For each entry in the lookup order the array of contexts is consulted and if one matching the scope exists then it is used to calculate the node Otherwise a default calculation algorithm is used p p An example of a qualifier for an Eclipse 2 1 preference is the plug in identifier e g org eclipse core resources for description autobuild p param qualifier a namespace qualifier for the preference param key the name of the preference optionally including its path param default Value the value to use if the preference is not defined param contexts optional context objects to help scopes determine which nodes to search or code null code return the value of the preference or the given default value see I Scope Context see get java lang String java lang String org osgi service prefs Preferences see get Lookup Order java lang String java lang String see get Default Lookup Order java lang String java lang String  setDefaultLookupOrder defaultValue IScopeContext getLookupOrder getDefaultLookupOrder
Return the value stored in the preference store for the given key If the key is not defined then return the specified default value Use the canonical scope lookup order for finding the preference value p The semantics of this method are to calculate the appropriate link Preferences nodes in the preference hierarchy to use and then call the link get String String Preferences method The order of the nodes is calculated by consulting the default scope lookup order as set by link set Default Lookup Order String String String p p The specified key may either refer to a simple key or be the concatenation of the path of a child node and key If the key contains a slash character then a double slash must be used to denote the end of they child path and the beginning of the key Otherwise it is assumed that the key is the last segment of the path The following are some examples of keys and their meanings ul li a look for a value for the property a li a look for a value for the property a li a look for a value for the property a li a b look for a value for the property a b li a b c look in the child node a b for property a li a b c look in the child node a b for property a li a b c look in the child node a b for the property c li a b c d look in the child node a b for the property c d li a b c d look in the child node a b for the property c d li a b c d look in the child node a b for the property c d ul p p Callers may specify an array of scope context objects to aid in the determination of the correct nodes For each entry in the lookup order the array of contexts is consulted and if one matching the scope exists then it is used to calculate the node Otherwise a default calculation algorithm is used p p An example of a qualifier for an Eclipse 2 1 preference is the plug in identifier e g org eclipse core resources for description autobuild p param qualifier a namespace qualifier for the preference param key the name of the preference optionally including its path param default Value the value to use if the preference is not defined param contexts optional context objects to help scopes determine which nodes to search or code null code return the value of the preference or the given default value see I Scope Context see get java lang String java lang String org osgi service prefs Preferences see get Lookup Order java lang String java lang String see get Default Lookup Order java lang String java lang String  setDefaultLookupOrder defaultValue IScopeContext getLookupOrder getDefaultLookupOrder
Return the root node of the Eclipse preference hierarchy return the root of the hierarchy 
Exports all preferences for the given preference node and all its children to the specified output stream It is the responsibility of the client to close the given output stream p If the given export list is code null code then all preferences for all subnodes of the given node are exported to the given stream Otherwise the export list is consulted before exporting each preference value If there is a string match then the preference is not exported The exclusion can also occur at a per node level Wildcards are em not em accepted in the excludes list as a basic String compare is done The basic algorithm is similar to the following pre String full Path node absolute Path key if full Path starts With excludes List i export preference pre p p The values stored in the resulting stream are suitable for later being read by the by link import Preferences Input Stream or link read Preferences Input Stream methods p param node the node to treat as the root of the export param output the stream to write to param excludes List a list of path prefixes to exclude from the export or code null code return a status object describing success or detailing failure reasons throws Core Exception if there was a problem exporting the preferences throws Illegal Argument Exception if the node or stream is code null code see import Preferences java io Input Stream see read Preferences Input Stream  fullPath absolutePath fullPath startsWith excludesList importPreferences InputStream readPreferences InputStream excludesList CoreException IllegalArgumentException importPreferences InputStream readPreferences InputStream
Loads preferences from the given file and stores them in the preferences store Existing values are over ridden by those from the stream The stream must not be code null code and is closed upon return from this method p This file must have been written by the link export Preferences I Eclipse Preferences Output Stream String method p p This method is equivalent to calling code apply Preferences read Preferences input code p param input the stream to load the preferences from return a status object describing success or detailing failure reasons throws Core Exception if there are problems importing the preferences throws Illegal Argument Exception if the stream is code null code see export Preferences I Eclipse Preferences Output Stream String  exportPreferences IEclipsePreferences OutputStream applyPreferences readPreferences CoreException IllegalArgumentException exportPreferences IEclipsePreferences OutputStream
Take the given preference tree and apply it to the Eclipse global preference hierarchy If a node is an export root then remove it from the global tree before adding any preferences contained in it or its children The given preferences object must not be code null code param preferences the preferences to apply globally return status object indicating sucess or failure throws Illegal Argument Exception if the preferences are code null code throws Core Exception if there are problems applying the preferences  IllegalArgumentException CoreException
Read from the given input stream and create a node hierarchy representing the preferences and their values The given input stream must not be code null code The result of this function is suitable for passing as an argument to link apply Preferences I Exported Preferences p It is assumed the contents of the input stream have been written by link export Preferences I Eclipse Preferences Output Stream String p param input the input stream to read from return the node hierarchy representing the stream contents throws Illegal Argument Exception if the given stream is null throws Core Exception if there are problems reading the preferences see export Preferences I Eclipse Preferences Output Stream String see apply Preferences I Exported Preferences  applyPreferences IExportedPreferences exportPreferences IEclipsePreferences OutputStream IllegalArgumentException CoreException exportPreferences IEclipsePreferences OutputStream applyPreferences IExportedPreferences
Return an array with the default lookup order for the preference keyed by the given qualifier and simple name Return code null code if no default has been set p The lookup order returned is based on an exact match to the specified qualifier and simple name For instance if the given key is non code null code and no default lookup order is found the default lookup order for the qualifier and a code null code key is em NOT em returned Clients should call link get Lookup Order String String if they desire this behavior p param qualifier the namespace qualifier for the preference param key the preference name or code null code return the scope order or code null code see set Default Lookup Order String String String see get Lookup Order String String  getLookupOrder setDefaultLookupOrder getLookupOrder
Return an array with the lookup order for the preference keyed by the given qualifier and simple name p First do an exact match lookup with the given qualifier and simple name If a match is found then return it Otherwise if the key is non code null code then do a lookup based on only the qualifier and return the set value Return the default default order as defined by the platform if no order has been set p param qualifier the namespace qualifier for the preference param key the preference name or code null code return the scope order throws Illegal Argument Exception if the qualifier is code null code see get Default Lookup Order String String see set Default Lookup Order String String String  IllegalArgumentException getDefaultLookupOrder setDefaultLookupOrder
Set the default scope lookup order for the preference keyed by the given qualifier and simple name If the given order is code null code then the set ordering if it exists is removed p If the given simple name is code null code then set the given lookup order to be used for all keys with the given qualifier p p Note that the default lookup order is not persisted across platform invocations p param qualifier the namespace qualifier for the preference param key the preference name or code null code param order the lookup order or code null code throws Illegal Argument Exception ul li if the qualifier is code null code li li if an entry in the order array is code null code the array itself is allowed to be code null code li ul see get Default Lookup Order String String  IllegalArgumentException getDefaultLookupOrder

Create and return a new preference node with the given parent and name Must not return code null code Clients are able to create a new node in memory or load the node s contents from the backing store Neither the parent or name arguments should be code null code p Implementors should note that the node might not have been added to the child list of the parent yet and therefore might not be able to be referenced through navigation from the root node p param parent the node s parent param name the name of the node return the new node 

Return the name of the scope that this context is associated with Must not be code null code return the name of the scope 
Return the preferences node that contains the preferences for the given qualifier or code null code if the node cannot be determined The given qualifier must not be code null code but may be a path to a subnode within the scope p An example of a qualifier in Eclipse 2 1 would be the plug in identifier that the preference is associated with e g the org eclipse core resources plug in defines the description autobuild preference p p This method can be used to determine the appropriate preferences node to aid in setting key value pairs For instance code new Instance Scope get Node org eclipse core resources code returns the preference node in the instance scope where the preferences for org eclipse core resources are stored p param qualifier a qualifier for the preference name return the node containing the plug in preferences or code null code see I Preferences Service  InstanceScope getNode IPreferencesService
Return a path to a location in the file system where clients are able to write files that will have the same sharing scope properties as preferences defined in this scope p Implementors may return code null code if the location is not known is unavailable or is unapplicable to this scope p return a writable location in the filesystem or code null code 

Creates a new wrapper around the given monitor param monitor the progress monitor to forward to protected Progress Monitor Wrapper I Progress Monitor monitor Assert is Not Null monitor progress Monitor monitor  ProgressMonitorWrapper IProgressMonitor isNotNull progressMonitor
This implementation of a code I Progress Monitor code method forwards to the wrapped progress monitor Clients may override this method to do additional processing see I Progress Monitor begin Task String int public void begin Task String name int total Work progress Monitor begin Task name total Work  IProgressMonitor IProgressMonitor beginTask beginTask totalWork progressMonitor beginTask totalWork
This implementation of a code I Progress Monitor With Blocking code method forwards to the wrapped progress monitor Clients may override this method to do additional processing see I Progress Monitor With Blocking clear Blocked since 3 0 public void clear Blocked if progress Monitor instanceof I Progress Monitor With Blocking I Progress Monitor With Blocking progress Monitor clear Blocked  IProgressMonitorWithBlocking IProgressMonitorWithBlocking clearBlocked clearBlocked progressMonitor IProgressMonitorWithBlocking IProgressMonitorWithBlocking progressMonitor clearBlocked
This implementation of a code I Progress Monitor code method forwards to the wrapped progress monitor Clients may override this method to do additional processing see I Progress Monitor done public void done progress Monitor done  IProgressMonitor IProgressMonitor progressMonitor
Returns the wrapped progress monitor return the wrapped progress monitor public I Progress Monitor get Wrapped Progress Monitor return progress Monitor  IProgressMonitor getWrappedProgressMonitor progressMonitor
This implementation of a code I Progress Monitor code method forwards to the wrapped progress monitor Clients may override this method to do additional processing see I Progress Monitor internal Worked double public void internal Worked double work progress Monitor internal Worked work  IProgressMonitor IProgressMonitor internalWorked internalWorked progressMonitor internalWorked
This implementation of a code I Progress Monitor code method forwards to the wrapped progress monitor Clients may override this method to do additional processing see I Progress Monitor is Canceled public boolean is Canceled return progress Monitor is Canceled  IProgressMonitor IProgressMonitor isCanceled isCanceled progressMonitor isCanceled
This implementation of a code I Progress Monitor With Blocking code method forwards to the wrapped progress monitor Clients may override this method to do additional processing see I Progress Monitor With Blocking set Blocked I Status since 3 0 public void set Blocked I Status reason if progress Monitor instanceof I Progress Monitor With Blocking I Progress Monitor With Blocking progress Monitor set Blocked reason  IProgressMonitorWithBlocking IProgressMonitorWithBlocking setBlocked IStatus setBlocked IStatus progressMonitor IProgressMonitorWithBlocking IProgressMonitorWithBlocking progressMonitor setBlocked
This implementation of a code I Progress Monitor code method forwards to the wrapped progress monitor Clients may override this method to do additional processing see I Progress Monitor set Canceled boolean public void set Canceled boolean b progress Monitor set Canceled b  IProgressMonitor IProgressMonitor setCanceled setCanceled progressMonitor setCanceled
This implementation of a code I Progress Monitor code method forwards to the wrapped progress monitor Clients may override this method to do additional processing see I Progress Monitor set Task Name String public void set Task Name String name progress Monitor set Task Name name  IProgressMonitor IProgressMonitor setTaskName setTaskName progressMonitor setTaskName
This implementation of a code I Progress Monitor code method forwards to the wrapped progress monitor Clients may override this method to do additional processing see I Progress Monitor sub Task String public void sub Task String name progress Monitor sub Task name  IProgressMonitor IProgressMonitor subTask subTask progressMonitor subTask
This implementation of a code I Progress Monitor code method forwards to the wrapped progress monitor Clients may override this method to do additional processing see I Progress Monitor worked int public void worked int work progress Monitor worked work  IProgressMonitor IProgressMonitor progressMonitor

Creates and returns a new qualified name with the given qualifier and local name The local name must not be the empty string The qualifier may be code null code p Clients may instantiate p param qualifier the qualifier string or code null code param local Name the local name string public Qualified Name String qualifier String local Name Assert is Legal local Name null local Name length 0 this qualifier qualifier this local Name local Name  localName QualifiedName localName isLegal localName localName localName localName
Returns whether this qualified name is equivalent to the given object p Qualified names are equal if and only if they have the same qualified parts and local parts Qualified names are not equal to objects other than qualified names p param obj the object to compare to return code true code if these are equivalent qualified names and code false code otherwise public boolean equals Object obj if obj this return true if obj instanceof Qualified Name return false Qualified Name q Name Qualified Name obj There may or may not be a quailfier if qualifier null q Name get Qualifier null return false if qualifier null qualifier equals q Name get Qualifier return false return local Name equals q Name get Local Name  QualifiedName QualifiedName qName QualifiedName qName getQualifier qName getQualifier localName qName getLocalName
Returns the local part of this name return the local name string public String get Local Name return local Name  getLocalName localName
Returns the qualifier part for this qualifed name or code null code if none return the qualifier string or code null code public String get Qualifier return qualifier  getQualifier
Returns the hash code for this qualified name public int hash Code return qualifier null 0 qualifier hash Code local Name hash Code  hashCode hashCode localName hashCode
Converts this qualified name into a string suitable for debug purposes only public String to String return get Qualifier null get Qualifier get Local Name NON NLS 1  toString getQualifier getQualifier getLocalName

Creates a new status object The created status has no children param severity the severity one of code OK code code ERROR code code INFO code code WARNING code or code CANCEL code param plugin Id the unique identifier of the relevant plug in param code the plug in specific status code or code OK code param message a human readable message localized to the current locale param exception a low level exception or code null code if not applicable public Status int severity String plugin Id int code String message Throwable exception set Severity severity set Plugin plugin Id set Code code set Message message set Exception exception  pluginId pluginId setSeverity setPlugin pluginId setCode setMessage setException
Implements the corresponding method on code I Status code public I Status get Children return the Empty Status Array  IStatus IStatus getChildren theEmptyStatusArray
Implements the corresponding method on code I Status code public int get Code return code  IStatus getCode
Implements the corresponding method on code I Status code public Throwable get Exception return exception  IStatus getException
Implements the corresponding method on code I Status code public String get Message return message  IStatus getMessage
Implements the corresponding method on code I Status code public String get Plugin return plugin Id  IStatus getPlugin pluginId
Implements the corresponding method on code I Status code public int get Severity return severity  IStatus getSeverity
Implements the corresponding method on code I Status code public boolean is Multi Status return false  IStatus isMultiStatus
Implements the corresponding method on code I Status code public boolean isOK return severity OK  IStatus
Implements the corresponding method on code I Status code public boolean matches int severity Mask return severity severity Mask 0  IStatus severityMask severityMask
Sets the status code param code the plug in specific status code or code OK code protected void set Code int code this code code  setCode
Sets the exception param exception a low level exception or code null code if not applicable protected void set Exception Throwable exception this exception exception  setException
Sets the message param message a human readable message localized to the current locale protected void set Message String message Assert is Legal message null this message message  setMessage isLegal
Sets the plug in id param plugin Id the unique identifier of the relevant plug in protected void set Plugin String plugin Id Assert is Legal plugin Id null plugin Id length 0 this plugin Id plugin Id  pluginId setPlugin pluginId isLegal pluginId pluginId pluginId pluginId
Sets the severity param severity the severity one of code OK code code ERROR code code INFO code code WARNING code or code CANCEL code protected void set Severity int severity Assert is Legal severity OK severity ERROR severity WARNING severity INFO severity CANCEL this severity severity  setSeverity isLegal
Returns a string representation of the status suitable for debugging purposes only public String to String String Buffer buf new String Buffer buf append Status NON NLS 1 if severity OK buf append OK NON NLS 1 else if severity ERROR buf append ERROR NON NLS 1 else if severity WARNING buf append WARNING NON NLS 1 else if severity INFO buf append INFO NON NLS 1 else if severity CANCEL buf append CANCEL NON NLS 1 else buf append severity NON NLS 1 buf append severity buf append NON NLS 1 buf append plugin Id buf append code NON NLS 1 buf append code buf append buf append message buf append buf append exception return buf to String  toString StringBuffer StringBuffer pluginId toString

Creates a new sub progress monitor for the given monitor The sub progress monitor uses the given number of work ticks from its parent monitor param monitor the parent progress monitor param ticks the number of work ticks allocated from the parent monitor public Sub Progress Monitor I Progress Monitor monitor int ticks this monitor ticks 0  SubProgressMonitor IProgressMonitor
Creates a new sub progress monitor for the given monitor The sub progress monitor uses the given number of work ticks from its parent monitor param monitor the parent progress monitor param ticks the number of work ticks allocated from the parent monitor param style one of ul li code SUPPRESS SUBTASK LABEL code li li code PREPEND MAIN LABEL TO SUBTASK code li ul see SUPPRESS SUBTASK LABEL see PREPEND MAIN LABEL TO SUBTASK public Sub Progress Monitor I Progress Monitor monitor int ticks int style super monitor this parent Ticks ticks this style style  SUPPRESS_SUBTASK_LABEL PREPEND_MAIN_LABEL_TO_SUBTASK SUPPRESS_SUBTASK_LABEL PREPEND_MAIN_LABEL_TO_SUBTASK SubProgressMonitor IProgressMonitor parentTicks
public void begin Task String name int total Work nested Begin Tasks Ignore nested begin task calls if nested Begin Tasks 1 return be safe if the argument would cause math errors zero or negative just use 0 as the scale This disables progress for this submonitor scale total Work 0 0 double parent Ticks double total Work if style PREPEND MAIN LABEL TO SUBTASK 0 main Task Label name  beginTask totalWork nestedBeginTasks nestedBeginTasks totalWork parentTicks totalWork PREPEND_MAIN_LABEL_TO_SUBTASK mainTaskLabel
public void done Ignore if more done calls than begin Task calls or if we are still in some nested begin Tasks if nested Begin Tasks 0 nested Begin Tasks 0 return Send any remaining ticks and clear out the subtask text double remaining parent Ticks sent To Parent if remaining 0 super internal Worked remaining sub Task NON NLS 1 sent To Parent 0  beginTask beginTasks nestedBeginTasks nestedBeginTasks parentTicks sentToParent internalWorked subTask sentToParent
public void internal Worked double work if used Up nested Begin Tasks 1 return double real Work scale work System out println Sub monitor real Work super internal Worked real Work sent To Parent real Work if sent To Parent parent Ticks used Up true  internalWorked usedUp nestedBeginTasks realWork realWork internalWorked realWork sentToParent realWork sentToParent parentTicks usedUp
public void sub Task String name if style SUPPRESS SUBTASK LABEL 0 return String label name if style PREPEND MAIN LABEL TO SUBTASK 0 main Task Label null main Task Label length 0 label main Task Label label super sub Task label  subTask SUPPRESS_SUBTASK_LABEL PREPEND_MAIN_LABEL_TO_SUBTASK mainTaskLabel mainTaskLabel mainTaskLabel subTask
Implements the method code I Progress Monitor worked code public void worked int work internal Worked work  IProgressMonitor internalWorked

Returns the value of this variable when referenced with the given argument possibly code null code param argument argument present in variable expression or code null code if none return value of this variable when referenced with the given argument possibly code null code throws Core Exception if unable to resolve a value for this variable  CoreException
Returns whether this variable supports an argument as specified by this variable s extension definition in plug in XML return whether this variable supports an argument 

Resolves and returns a value for the specified variable when referenced with the given argument possibly code null code param variable variable to resolve a value for param argument argument present in expression or code null code if none return variable value possibly code null code throws Core Exception if unable to resolve a value for the given variable  CoreException

Returns the name of this variable A variable is uniquely identified by its name return variable name 
Returns a human readable description of this variable possibly code null code return a description of this variable or code null code if none 

Returns all registered variables return a collection of all registered variables 
Returns all registered value variables return a collection of all registered value variables 
Returns the value variable with the given name or code null code if none param name variable name return the value variable with the given name or code null code if none 
Returns all registered dynamic variables return a collection of all registered dynamic variables 
Returns the dynamic variable with the given name or code null code if none param name variable name return the dynamic variable with the given name or code null code if none 
Recursively resolves and replaces all variable references in the given expression with their corresponding values Reports errors for references to undefined variables equivalent to calling code perform String Substitution expression true code param expression expression referencing variables return expression with variable references replaced with variable values throws Core Exception if unable to resolve the value of one or more variables  performStringSubstitution CoreException
Recursively resolves and replaces all variable references in the given expression with their corresponding values Allows the client to control whether references to undefined variables are reported as an error i e an exception is thrown param expression expression referencing variables param report Undefined Variables whether a reference to an undefined variable is to be considered an error i e throw an exception return expression with variable references replaced with variable values throws Core Exception if unable to resolve the value of one or more variables  reportUndefinedVariables CoreException
Validates variables references in the given expression and reports errors for references to undefined variables param expression expression referencing variables throws Core Exception if one or more referenced variables do not exist  CoreException
Returns a new value variable with the given name and description param name variable name cannot be code null code param description variable description possibly code null code return a new variable exception Core Exception if a variable already exists with the given name  CoreException
Adds the given variables to the variable registry param variables the variables to add throws Core Exception if one or more variables to add has a name collision with an existing variable  CoreException
Removes the given variables from the registry Has no effect for unregistered variables param variables variables to remove 
Registers the given listener for value variable notifications Has no effect if an identical listener is already registered param listener value variable listener to add 
Removes the given listener from the list of registered value variable listeners Has no effect if an identical listener is not already registered param listener value variable listener to remove 
Convenience method that returns an expression referencing the given variable and optional argument For example calling the method with a code var Name code of code my var code and an code argument code of code my arg code results in the string code my var my arg code param var Name variable name param arg argument text or code null code return an expression referencing the given variable and optional argument  varName my_var my_arg my_var my_arg varName

Sets the value of this variable to the given value A value of code null code indicates the value of this variable is undefined param value variable value possibly code null code 
Returns the value of this variable or code null code if none return the value of this variable or code null code if none 
Returns whether this variable was contributed by an extension return whether this variable was contributed by an extension 
Sets the description of this variable to the given value param description variable description possibly code null code 

public interface I Value Variable Initializer Initializes the specified variable param variable variable to initialize  IValueVariableInitializer

Notification the given variables have been added to the variable manager param variables added variables 
Notification the given variables have been removed from the variable manager param variables removed variables 
Notification the given variables have been changed value param variables changed variables 

Constructs an instance of this plug in runtime class p An instance of this plug in runtime class is automatically created when the facilities provided by the Variables plug in are required b Clients must never explicitly instantiate a plug in runtime class b p public Variables Plugin super plugin this  VariablesPlugin
Returns this plug in instance return the single instance of this plug in runtime class public static Variables Plugin get Default return plugin  VariablesPlugin getDefault
Logs the specified throwable with this plug in s log param t throwable to log public static void log Throwable t log new Status I Status ERROR PI CORE VARIABLES INTERNAL ERROR Error logged from Core Variables t NON NLS 1  IStatus PI_CORE_VARIABLES INTERNAL_ERROR
Logs the given message with this plug in s log and the given throwable or code null code if none param message the message to log param throwable the exception that occurred or code null code if none public static void log Message String message Throwable throwable log new Status I Status ERROR get Unique Identifier INTERNAL ERROR message throwable  logMessage IStatus getUniqueIdentifier INTERNAL_ERROR
Logs the specified status with this plug in s log param status status to log public static void log I Status status get Default get Log log status  IStatus getDefault getLog
Convenience method which returns the unique identifier of this plugin public static String get Unique Identifier return PI CORE VARIABLES  getUniqueIdentifier PI_CORE_VARIABLES
Returns the string variable manager return the string variable manager public I String Variable Manager get String Variable Manager return String Variable Manager get Default  IStringVariableManager getStringVariableManager StringVariableManager getDefault

Constructs a new debug event of the given kind with a detail code of code UNSPECIFIED code param event Source the object associated with the event param kind the kind of debug event one of the kind constants defined by this class public Debug Event Object event Source int kind this event Source kind UNSPECIFIED  eventSource DebugEvent eventSource eventSource
Constructs a new debug event of the given kind with the given detail param event Source the object associated with the event param kind the kind of debug event one of the kind constants defined by this class param detail extra information about the event one of the detail constants defined by this class or a client defined detail if this is a model specific event public Debug Event Object event Source int kind int detail super event Source if kind RESUME SUSPEND CREATE TERMINATE CHANGE MODEL SPECIFIC 0 throw new Illegal Argument Exception Debug Core Messages get String Debug Event illegal kind NON NLS 1 if kind MODEL SPECIFIC detail UNSPECIFIED detail STEP END STEP INTO STEP OVER STEP RETURN BREAKPOINT CLIENT REQUEST EVALUATION EVALUATION IMPLICIT STATE CONTENT 0 throw new Illegal Argument Exception Debug Core Messages get String Debug Event illegal detail NON NLS 1 f Kind kind f Detail detail  eventSource DebugEvent eventSource eventSource MODEL_SPECIFIC IllegalArgumentException DebugCoreMessages getString DebugEvent illegal_kind MODEL_SPECIFIC STEP_END STEP_INTO STEP_OVER STEP_RETURN CLIENT_REQUEST EVALUATION_IMPLICIT IllegalArgumentException DebugCoreMessages getString DebugEvent illegal_detail fKind fDetail
Returns a constant describing extra detail about the event either one of the detail constants defined by this class possibly code UNSPECIFIED code or a client defined detail if this is a model specific event return the detail code public int get Detail return f Detail  getDetail fDetail
Returns this event s kind one of the kind constants defined by this class return the kind code public int get Kind return f Kind  getKind fKind
Returns whether this event s detail indicates the beginning of a step event This event s detail is one of code STEP INTO code code STEP OVER code or code STEP RETURN code return whether this event s detail indicates the beginning of a step event since 2 0 public boolean is Step Start return get Detail STEP INTO STEP OVER STEP RETURN 0  STEP_INTO STEP_OVER STEP_RETURN isStepStart getDetail STEP_INTO STEP_OVER STEP_RETURN
Returns whether this event s detail indicates an evaluation This event s detail is one of code EVALUATION code or code EVALUATION IMPLICIT code return whether this event s detail indicates an evaluation since 2 0 public boolean is Evaluation return get Detail EVALUATION EVALUATION IMPLICIT 0  EVALUATION_IMPLICIT isEvaluation getDetail EVALUATION_IMPLICIT
Sets this event s application defined data param data application defined data since 2 1 2 public void set Data Object data f Data data  setData fData
Returns this event s application defined data or code null code if none return application defined data or code null code if none since 2 1 2 public Object get Data return f Data  getData fData
see java lang Object to String public String to String String Buffer buf new String Buffer Debug Event NON NLS 1 if get Source null buf append get Source to String else buf append null NON NLS 1 buf append NON NLS 1 switch get Kind case CREATE buf append CREATE NON NLS 1 break case TERMINATE buf append TERMINATE NON NLS 1 break case RESUME buf append RESUME NON NLS 1 break case SUSPEND buf append SUSPEND NON NLS 1 break case CHANGE buf append CHANGE NON NLS 1 break case UNSPECIFIED buf append UNSPECIFIED NON NLS 1 break case MODEL SPECIFIC buf append MODEL SPECIFIC NON NLS 1 break buf append NON NLS 1 switch get Detail case BREAKPOINT buf append BREAKPOINT NON NLS 1 break case CLIENT REQUEST buf append CLIENT REQUEST NON NLS 1 break case STEP END buf append STEP END NON NLS 1 break case STEP INTO buf append STEP INTO NON NLS 1 break case STEP OVER buf append STEP OVER NON NLS 1 break case STEP RETURN buf append STEP RETURN NON NLS 1 break case EVALUATION buf append EVALUATION NON NLS 1 break case EVALUATION IMPLICIT buf append EVALUATION IMPLICIT NON NLS 1 break case STATE buf append STATE NON NLS 1 break case CONTENT buf append CONTENT NON NLS 1 break case UNSPECIFIED buf append UNSPECIFIED NON NLS 1 break default model specific buf append get Detail break buf append NON NLS 1 return buf to String  toString toString StringBuffer StringBuffer DebugEvent getSource getSource toString getKind MODEL_SPECIFIC MODEL_SPECIFIC getDetail CLIENT_REQUEST CLIENT_REQUEST STEP_END STEP_END STEP_INTO STEP_INTO STEP_OVER STEP_OVER STEP_RETURN STEP_RETURN EVALUATION_IMPLICIT EVALUATION_IMPLICIT getDetail toString

Constructs a new debug exception with the given status object param status the status object describing this exception see I Status public Debug Exception I Status status super status  IStatus DebugException IStatus

Returns the singleton instance of the debug plug in public static Debug Plugin get Default return fg Debug Plugin  DebugPlugin getDefault fgDebugPlugin
Sets the singleton instance of the debug plug in param plugin the debug plug in or code null code when shutting down private static void set Default Debug Plugin plugin fg Debug Plugin plugin  setDefault DebugPlugin fgDebugPlugin
Convenience method which returns the unique identifier of this plugin public static String get Unique Identifier return PI DEBUG CORE  getUniqueIdentifier PI_DEBUG_CORE
Constructs the debug plug in p An instance of this plug in runtime class is automatically created when the facilities provided by this plug in are required b Clients must never explicitly instantiate a plug in runtime class b p public Debug Plugin super set Default this  DebugPlugin setDefault
Adds the given listener to the collection of registered debug event listeners Has no effect if an identical listener is already registered param listener the listener to add since 2 0 public void add Debug Event Listener I Debug Event Set Listener listener if f Event Listeners null f Event Listeners new Listener List 20 f Event Listeners add listener  addDebugEventListener IDebugEventSetListener fEventListeners fEventListeners ListenerList fEventListeners
Notifies all registered debug event set listeners of the given debug events Events which are filtered by a registered debug event filter are not fired param events array of debug events to fire see I Debug Event Filter see I Debug Event Set Listener since 2 0 public void fire Debug Event Set Debug Event events if is Shutting Down events null f Event Listeners null return get Event Notifier dispatch events  IDebugEventFilter IDebugEventSetListener fireDebugEventSet DebugEvent isShuttingDown fEventListeners getEventNotifier
Asynchronously executes the given runnable in a seperate thread after debug event dispatch has completed If debug events are not currently being dispatched the runnable is scheduled to run in a seperate thread immediately param r runnable to execute asynchronously since 2 1 public void async Exec Runnable r if f Runnables null initialize runnables and async job f Runnables new Vector 5 f Asynch Job new Asynch Job f Runnables add r if is Dispatching f Asynch Job schedule  asyncExec fRunnables fRunnables fAsynchJob AsynchJob fRunnables isDispatching fAsynchJob
Returns the breakpoint manager return the breakpoint manager see I Breakpoint Manager public I Breakpoint Manager get Breakpoint Manager if f Breakpoint Manager null f Breakpoint Manager new Breakpoint Manager return f Breakpoint Manager  IBreakpointManager IBreakpointManager getBreakpointManager fBreakpointManager fBreakpointManager BreakpointManager fBreakpointManager
Returns the launch manager return the launch manager see I Launch Manager public I Launch Manager get Launch Manager if f Launch Manager null f Launch Manager new Launch Manager return f Launch Manager  ILaunchManager ILaunchManager getLaunchManager fLaunchManager fLaunchManager LaunchManager fLaunchManager
Returns the status handler registered for the given status or code null code if none return the status handler registered for the given status or code null code if none since 2 0 public I Status Handler get Status Handler I Status status Status Handler Key key new Status Handler Key status get Plugin status get Code if f Status Handlers null initialize Status Handlers I Configuration Element config I Configuration Element f Status Handlers get key if config null try Object handler config create Executable Extension class NON NLS 1 if handler instanceof I Status Handler return I Status Handler handler invalid Status Handler null Message Format format Debug Core Messages get String Debug Plugin Registered status handler  0  does not implement required interface IStatusHandler  1 new String config get Declaring Extension get Unique Identifier NON NLS 1 catch Core Exception e log e return null  IStatusHandler getStatusHandler IStatus StatusHandlerKey StatusHandlerKey getPlugin getCode fStatusHandlers initializeStatusHandlers IConfigurationElement IConfigurationElement fStatusHandlers createExecutableExtension IStatusHandler IStatusHandler invalidStatusHandler MessageFormat DebugCoreMessages getString DebugPlugin Registered_status_handler_ _does_not_implement_required_interface_IStatusHandler _1 getDeclaringExtension getUniqueIdentifier CoreException
Returns the expression manager return the expression manager see I Expression Manager since 2 0 public I Expression Manager get Expression Manager if f Expression Manager null f Expression Manager new Expression Manager return f Expression Manager  IExpressionManager IExpressionManager getExpressionManager fExpressionManager fExpressionManager ExpressionManager fExpressionManager
Removes the given listener from the collection of registered debug event listeners Has no effect if an identical listener is not already registered param listener the listener to remove since 2 0 public void remove Debug Event Listener I Debug Event Set Listener listener if f Event Listeners null f Event Listeners remove listener  removeDebugEventListener IDebugEventSetListener fEventListeners fEventListeners
public void stop Bundle Context context throws Exception try set Shutting Down true if f Asynch Job null f Asynch Job cancel if f Launch Manager null f Launch Manager shutdown if f Breakpoint Manager null f Breakpoint Manager shutdown Memory Block Manager plugin Shutdown if f Event Listeners null f Event Listeners remove All Source Lookup Utils shutdown set Default null Resources Plugin get Workspace remove Save Participant this finally super stop context  BundleContext setShuttingDown fAsynchJob fAsynchJob fLaunchManager fLaunchManager fBreakpointManager fBreakpointManager MemoryBlockManager pluginShutdown fEventListeners fEventListeners removeAll SourceLookupUtils setDefault ResourcesPlugin getWorkspace removeSaveParticipant
Creates and returns a new process representing the given code java lang Process code A streams proxy is created for the I O streams in the system process The process is added to the given launch param launch the launch the process is contained in param process the system process to wrap param label the label assigned to the process return the process see I Process public static I Process new Process I Launch launch Process process String label return new Process launch process label null  IProcess IProcess newProcess ILaunch newProcess
Creates and returns a new process representing the given code java lang Process code A streams proxy is created for the I O streams in the system process The process is added to the given launch and the process is initialized with the given attribute map The process will be created by the code I Process Factory code if it has been designated via the org eclipse debug core process Factories extension point for the process factory id indicated in the launch configuration associated with the launch param launch the launch the process is contained in param process the system process to wrap param label the label assigned to the process param attributes initial values for the attribute map return the process code null code can be returned if errors occur dealing with the process factory designated to create the process see I Process since 2 1 public static I Process new Process I Launch launch Process process String label Map attributes I Launch Configuration config launch get Launch Configuration String process FactoryID null if config null try process FactoryID config get Attribute ATTR PROCESS FACTORY ID String null catch Core Exception e if process FactoryID null Debug Plugin plugin Debug Plugin get Default if plugin f Process Factories null plugin initialize Process Factories I Configuration Element element I Configuration Element plugin f Process Factories get process FactoryID if element null return null I Process Factory process Factory null try process Factory I Process Factory element create Executable Extension class NON NLS 1 catch Core Exception exception log exception return null return process Factory new Process launch process label attributes return new Runtime Process launch process label attributes  IProcessFactory processFactories IProcess IProcess newProcess ILaunch ILaunchConfiguration getLaunchConfiguration processFactoryID processFactoryID getAttribute ATTR_PROCESS_FACTORY_ID CoreException processFactoryID DebugPlugin DebugPlugin getDefault fProcessFactories initializeProcessFactories IConfigurationElement IConfigurationElement fProcessFactories processFactoryID IProcessFactory processFactory processFactory IProcessFactory createExecutableExtension CoreException processFactory newProcess RuntimeProcess
Returns any logical structure types that have been contributed for the given value param value the value for which logical structure types have been requested return logical structure types that have been contributed for the given value possibly an empty collection since 3 0 public static I Logical Structure Type get Logical Structure Types I Value value return Logical Structure Manager get Default get Logical Structure Types value  ILogicalStructureType getLogicalStructureTypes IValue LogicalStructureManager getDefault getLogicalStructureTypes
Convenience method that performs a runtime exec on the given command line in the context of the specified working directory and returns the resulting process If the current runtime does not support the specification of a working directory the status handler for error code code ERR WORKING DIRECTORY NOT SUPPORTED code is queried to see if the exec should be re executed without specifying a working directory param cmd Line the command line param working Directory the working directory or code null code return the resulting process or code null code if the exec is cancelled see Runtime since 2 1 public static Process exec String cmd Line File working Directory throws Core Exception return exec cmd Line working Directory null  ERR_WORKING_DIRECTORY_NOT_SUPPORTED cmdLine workingDirectory cmdLine workingDirectory CoreException cmdLine workingDirectory
Convenience method that performs a runtime exec on the given command line in the context of the specified working directory and returns the resulting process If the current runtime does not support the specification of a working directory the status handler for error code code ERR WORKING DIRECTORY NOT SUPPORTED code is queried to see if the exec should be re executed without specifying a working directory param cmd Line the command line param working Directory the working directory or code null code param envp the environment variables set in the process or code null code return the resulting process or code null code if the exec is cancelled see Runtime since 3 0 public static Process exec String cmd Line File working Directory String envp throws Core Exception Process p null try if working Directory null p Runtime get Runtime exec cmd Line envp else p Runtime get Runtime exec cmd Line envp working Directory catch IO Exception e if p null p destroy Status status new Status I Status ERROR get Unique Identifier INTERNAL ERROR Debug Core Messages get String Debug Plugin Exception occurred executing command line  1 e NON NLS 1 throw new Core Exception status catch No Such Method Error e attempting launches on 1 2 no ability to set working directory I Status status new Status I Status ERROR get Unique Identifier ERR WORKING DIRECTORY NOT SUPPORTED Debug Core Messages get String Debug Plugin Eclipse runtime does not support working directory 2 e NON NLS 1 I Status Handler handler Debug Plugin get Default get Status Handler status if handler null Object result handler handle Status status null if result instanceof Boolean Boolean result boolean Value p exec cmd Line null return p  ERR_WORKING_DIRECTORY_NOT_SUPPORTED cmdLine workingDirectory cmdLine workingDirectory CoreException workingDirectory getRuntime cmdLine getRuntime cmdLine workingDirectory IOException IStatus getUniqueIdentifier INTERNAL_ERROR DebugCoreMessages getString DebugPlugin Exception_occurred_executing_command_line _1 CoreException NoSuchMethodError IStatus IStatus getUniqueIdentifier ERR_WORKING_DIRECTORY_NOT_SUPPORTED DebugCoreMessages getString DebugPlugin Eclipse_runtime_does_not_support_working_directory_2 IStatusHandler DebugPlugin getDefault getStatusHandler handleStatus booleanValue cmdLine
Returns whether this plug in is in the process of being shutdown return whether this plug in is in the process of being shutdown private boolean is Shutting Down return f Shutting Down  isShuttingDown fShuttingDown
Sets whether this plug in is in the process of being shutdown param value whether this plug in is in the process of being shutdown private void set Shutting Down boolean value f Shutting Down value  setShuttingDown fShuttingDown
Returns the collection of debug event listeners registered with this plug in return list of registered debug event listeners instances of code I Debug Event Set Listeners code private Object get Event Listeners return f Event Listeners get Listeners  IDebugEventSetListeners getEventListeners fEventListeners getListeners
Adds the given debug event filter to the registered event filters Has no effect if an identical filter is already registerd param filter debug event filter since 2 0 public void add Debug Event Filter I Debug Event Filter filter if f Event Filters null f Event Filters new Listener List 2 f Event Filters add filter  addDebugEventFilter IDebugEventFilter fEventFilters fEventFilters ListenerList fEventFilters
Removes the given debug event filter from the registered event filters Has no effect if an identical filter is not already registered param filter debug event filter since 2 0 public void remove Debug Event Filter I Debug Event Filter filter if f Event Filters null f Event Filters remove filter if f Event Filters size 0 f Event Filters null  removeDebugEventFilter IDebugEventFilter fEventFilters fEventFilters fEventFilters fEventFilters
Logs the given message if in debug mode param message the message to log since 2 0 public static void log Debug Message String message if get Default is Debugging this message is intentionally not internationalized as an exception may be due to the resource bundle itself log new Status I Status ERROR get Unique Identifier INTERNAL ERROR Internal message logged from Debug Core message null NON NLS 1  logDebugMessage getDefault isDebugging IStatus getUniqueIdentifier INTERNAL_ERROR
Logs the given message with this plug in s log and the given throwable or code null code if none param message the message to log param throwable the exception that occurred or code null code if none public static void log Message String message Throwable throwable log new Status I Status ERROR get Unique Identifier INTERNAL ERROR message throwable  logMessage IStatus getUniqueIdentifier INTERNAL_ERROR
Logs the specified status with this plug in s log param status status to log since 2 0 public static void log I Status status get Default get Log log status  IStatus getDefault getLog
Logs the specified throwable with this plug in s log param t throwable to log since 2 0 public static void log Throwable t I Status status new Status I Status ERROR get Unique Identifier INTERNAL ERROR Error logged from Debug Core t NON NLS 1 log status  IStatus IStatus getUniqueIdentifier INTERNAL_ERROR
Register status handlers private void initialize Status Handlers I Extension Point extension Point Platform get Extension Registry get Extension Point Debug Plugin PI DEBUG CORE EXTENSION POINT STATUS HANDLERS I Configuration Element infos extension Point get Configuration Elements f Status Handlers new Hash Map infos length for int i 0 i infos length i I Configuration Element configuration Element infos i String id configuration Element get Attribute plugin NON NLS 1 String code configuration Element get Attribute code NON NLS 1 if id null code null try Status Handler Key key new Status Handler Key id Integer parse Int code f Status Handlers put key configuration Element catch Number Format Exception e invalid status handler invalid Status Handler e configuration Element get Attribute id NON NLS 1 else invalid status handler invalid Status Handler null configuration Element get Attribute id NON NLS 1  initializeStatusHandlers IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugPlugin PI_DEBUG_CORE EXTENSION_POINT_STATUS_HANDLERS IConfigurationElement extensionPoint getConfigurationElements fStatusHandlers HashMap IConfigurationElement configurationElement configurationElement getAttribute configurationElement getAttribute StatusHandlerKey StatusHandlerKey parseInt fStatusHandlers configurationElement NumberFormatException invalidStatusHandler configurationElement getAttribute invalidStatusHandler configurationElement getAttribute
Register process factories private void initialize Process Factories I Extension Point extension Point Platform get Extension Registry get Extension Point Debug Plugin PI DEBUG CORE EXTENSION POINT PROCESS FACTORIES I Configuration Element infos extension Point get Configuration Elements f Process Factories new Hash Map infos length for int i 0 i infos length i I Configuration Element configuration Element infos i String id configuration Element get Attribute id NON NLS 1 String clss configuration Element get Attribute class NON NLS 1 if id null clss null f Process Factories put id configuration Element else invalid process factory String bad Definer infos i get Declaring Extension get Namespace log new Status I Status ERROR Debug Plugin PI DEBUG CORE INTERNAL ERROR Message Format format Debug Core Messages get String Debug Plugin 31 new String bad Definer id null NON NLS 1  initializeProcessFactories IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugPlugin PI_DEBUG_CORE EXTENSION_POINT_PROCESS_FACTORIES IConfigurationElement extensionPoint getConfigurationElements fProcessFactories HashMap IConfigurationElement configurationElement configurationElement getAttribute configurationElement getAttribute fProcessFactories configurationElement badDefiner getDeclaringExtension getNamespace IStatus DebugPlugin PI_DEBUG_CORE INTERNAL_ERROR MessageFormat DebugCoreMessages getString DebugPlugin badDefiner
private void invalid Status Handler Exception e String id log new Status I Status ERROR Debug Plugin PI DEBUG CORE INTERNAL ERROR Message Format format Debug Core Messages get String Debug Plugin Invalid status handler extension   0  2 new String id e NON NLS 1  invalidStatusHandler IStatus DebugPlugin PI_DEBUG_CORE INTERNAL_ERROR MessageFormat DebugCoreMessages getString DebugPlugin Invalid_status_handler_extension__ _2
int f Code Status Handler Key String plugin Id int code f Plugin Id plugin Id f Code code  fCode StatusHandlerKey pluginId fPluginId pluginId fCode
public int hash Code return f Plugin Id hash Code f Code  hashCode fPluginId hashCode fCode
public boolean equals Object obj if obj instanceof Status Handler Key Status Handler Key s Status Handler Key obj return f Code s f Code f Plugin Id equals s f Plugin Id return false  StatusHandlerKey StatusHandlerKey StatusHandlerKey fCode fCode fPluginId fPluginId
Returns whether any event filters are registered return whether any event filters are registered private boolean has Event Filters return f Event Filters null f Event Filters size 0  hasEventFilters fEventFilters fEventFilters
Sets whether debug events are being dispatched private synchronized void set Dispatching boolean dispatching if dispatching f Dispatching else f Dispatching if is Dispatching if f Asynch Job null f Asynch Job schedule  setDispatching fDispatching fDispatching isDispatching fAsynchJob fAsynchJob
Returns whether debug events are being dispatched private synchronized boolean is Dispatching return f Dispatching 0  isDispatching fDispatching
public Asynch Job super Debug Core Messages get String Debug Plugin Debug async queue 1 NON NLS 1 set Priority Job INTERACTIVE set System true  AsynchJob DebugCoreMessages getString DebugPlugin Debug_async_queue_1 setPriority setSystem
see org eclipse core runtime jobs Job should Run public boolean should Run return f Shutting Down f Runnables is Empty  shouldRun shouldRun fShuttingDown fRunnables isEmpty
public I Status run I Progress Monitor monitor Executes runnables and empties the queue Vector v null synchronized f Runnables v f Runnables f Runnables new Vector 5 Multi Status failed null monitor begin Task Debug Core Messages get String Debug Plugin Debug async queue 1 v size NON NLS 1 Iterator iter v iterator while iter has Next f Shutting Down monitor is Canceled Runnable r Runnable iter next try r run catch Exception e if failed null failed new Multi Status Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Debug Core Messages get String Debug Plugin 0 null NON NLS 1 failed add new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Debug Core Messages get String Debug Plugin 0 e NON NLS 1 monitor worked 1 monitor done if failed null return Status OK STATUS return failed  IStatus IProgressMonitor fRunnables fRunnables fRunnables MultiStatus beginTask DebugCoreMessages getString DebugPlugin Debug_async_queue_1 hasNext fShuttingDown isCanceled MultiStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR DebugCoreMessages getString DebugPlugin IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR DebugCoreMessages getString DebugPlugin OK_STATUS
Returns an event notifier return an event notifier private Event Notifier get Event Notifier return new Event Notifier  EventNotifier getEventNotifier EventNotifier
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception switch f Mode case NOTIFY FILTERS I Status status new Status I Status ERROR get Unique Identifier INTERNAL ERROR Debug Core Messages get String Debug Plugin An exception occurred while filtering debug events  3 exception NON NLS 1 log status break case NOTIFY EVENTS status new Status I Status ERROR get Unique Identifier INTERNAL ERROR Debug Core Messages get String Debug Plugin An exception occurred while dispatching debug events  2 exception NON NLS 1 log status break  ISafeRunnable handleException handleException fMode NOTIFY_FILTERS IStatus IStatus getUniqueIdentifier INTERNAL_ERROR DebugCoreMessages getString DebugPlugin An_exception_occurred_while_filtering_debug_events _3 NOTIFY_EVENTS IStatus getUniqueIdentifier INTERNAL_ERROR DebugCoreMessages getString DebugPlugin An_exception_occurred_while_dispatching_debug_events _2
see org eclipse core runtime I Safe Runnable run public void run throws Exception switch f Mode case NOTIFY FILTERS f Events f Filter filter Debug Events f Events break case NOTIFY EVENTS f Listener handle Debug Events f Events break  ISafeRunnable fMode NOTIFY_FILTERS fEvents fFilter filterDebugEvents fEvents NOTIFY_EVENTS fListener handleDebugEvents fEvents
Filter and dispatch the given events If an exception occurs in one listener events are still fired to subsequent listeners param events debug events public void dispatch Debug Event events f Events events try set Dispatching true if has Event Filters f Mode NOTIFY FILTERS Object filters f Event Filters get Listeners for int i 0 i filters length i f Filter I Debug Event Filter filters i Platform run this if f Events null f Events length 0 return f Mode NOTIFY EVENTS Object listeners get Event Listeners for int i 0 i listeners length i f Listener I Debug Event Set Listener listeners i Platform run this finally set Dispatching false f Events null f Filter null f Listener null  DebugEvent fEvents setDispatching hasEventFilters fMode NOTIFY_FILTERS fEventFilters getListeners fFilter IDebugEventFilter fEvents fEvents fMode NOTIFY_EVENTS getEventListeners fListener IDebugEventSetListener setDispatching fEvents fFilter fListener
Creates and returns a new XML document return a new XML document throws Core Exception if unable to create a new document since 3 0 public static Document new Document throws Core Exception try return Launch Manager get Document catch Parser Configuration Exception e abort Source Lookup Messages get String Source Lookup Utils 3 e NON NLS 1 return null  CoreException newDocument CoreException LaunchManager getDocument ParserConfigurationException SourceLookupMessages getString SourceLookupUtils
Serializes the given XML document into a string param document XML document to serialize return a string representing the given document throws Core Exception if unable to serialize the document since 3 0 public static String serialize Document Document document throws Core Exception try return Launch Manager serialize Document document catch Transformer Exception e abort Source Lookup Messages get String Source Lookup Utils 4 e NON NLS 1 catch IO Exception e abort Source Lookup Messages get String Source Lookup Utils 5 e NON NLS 1 return null  CoreException serializeDocument CoreException LaunchManager serializeDocument TransformerException SourceLookupMessages getString SourceLookupUtils IOException SourceLookupMessages getString SourceLookupUtils
Parses the given string representing an XML document returning its root element param document XML document as a string return the document s root element throws Core Exception if unable to parse the document since 3 0 public static Element parse Document String document throws Core Exception Element root null Input Stream stream null try Document Builder parser Document Builder Factory new Instance new Document Builder stream new Byte Array Input Stream document get Bytes root parser parse stream get Document Element catch Parser Configuration Exception e abort Source Lookup Messages get String Source Lookup Utils 6 e NON NLS 1 catch Factory Configuration Error e abort Source Lookup Messages get String Source Lookup Utils 7 e NON NLS 1 catch SAX Exception e abort Source Lookup Messages get String Source Lookup Utils 8 e NON NLS 1 catch IO Exception e abort Source Lookup Messages get String Source Lookup Utils 9 e NON NLS 1 finally try stream close catch IO Exception e abort Source Lookup Messages get String Source Lookup Utils 10 e NON NLS 1 return root  CoreException parseDocument CoreException InputStream DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder ByteArrayInputStream getBytes getDocumentElement ParserConfigurationException SourceLookupMessages getString SourceLookupUtils FactoryConfigurationError SourceLookupMessages getString SourceLookupUtils SAXException SourceLookupMessages getString SourceLookupUtils IOException SourceLookupMessages getString SourceLookupUtils IOException SourceLookupMessages getString SourceLookupUtils
Throws an exception with the given message and underlying exception param message error message param exception underlying exception or code null code throws Core Exception private static void abort String message Throwable exception throws Core Exception I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR message exception throw new Core Exception status  CoreException CoreException IStatus IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR CoreException

Notifies this listener that the given breakpoint has been added to the breakpoint manager param breakpoint the added breakpoint since 2 0 
public void breakpoint Added I Breakpoint breakpoint Notifies this listener that the given breakpoint has been removed from the breakpoint manager If the given breakpoint has been removed because it has been deleted the associated marker delta is also provided param breakpoint the removed breakpoint param delta the associated marker delta or code null code when the breakpoint is removed from the breakpoint manager without being deleted see org eclipse core resources I Marker Delta since 2 0  breakpointAdded IBreakpoint IMarkerDelta
Notifies this listener that an attribute of the given breakpoint has changed as described by the delta param breakpoint the changed breakpoint param delta the marker delta that describes the changes with the marker associated with the given breakpoint or code null code when the breakpoint change does not generate a marker delta see org eclipse core resources I Marker Delta since 2 0  IMarkerDelta

public interface I Breakpoint Manager Adds the given breakpoint to the collection of registered breakpoints in the workspace and notifies all registered listeners This has no effect if the given breakpoint is already registered param breakpoint the breakpoint to add exception Debug Exception if adding fails Reasons include ul li CONFIGURATION INVALID the required code MODEL IDENTIFIER code attribute is not set on the breakpoint marker li li A code Core Exception code occurred while verifying the code MODEL IDENTIFIER code attribute li ul since 2 0  IBreakpointManager DebugException CONFIGURATION_INVALID MODEL_IDENTIFIER CoreException MODEL_IDENTIFIER
Adds the given breakpoints to the collection of registered breakpoints in the workspace and notifies all registered listeners Has no effect on breakpoints that are already registered param breakpoints the breakpoints to add exception Debug Exception if adding fails Reasons include ul li CONFIGURATION INVALID the required code MODEL IDENTIFIER code attribute is not set on a breakpoint marker li li A code Core Exception code occurred while verifying a code MODEL IDENTIFIER code attribute li ul since 2 1  DebugException CONFIGURATION_INVALID MODEL_IDENTIFIER CoreException MODEL_IDENTIFIER
Returns the breakpoint associated with the given marker or code null code if no such breakpoint exists param marker the marker return the breakpoint associated with the marker or code null code if none exists since 2 0 
Returns a collection of all registered breakpoints Returns an empty array if no breakpoints are registered return an array of breakpoints since 2 0 
Returns whether there are any registered breakpoints return whether there are any registered breakpoints since 2 0 
Returns a collection of all breakpoints registered for the given debug model Answers an empty array if no breakpoints are registered for the given debug model param model Identifier identifier of a debug model plug in return an array of breakpoints since 2 0  modelIdentifier
Returns whether the given breakpoint is currently registered with this breakpoint manager return whether the breakpoint is registered since 2 0 
Notifies all registered listeners that the given breakpoint has changed Has no effect if the given breakpoint is not currently registered This method is intended to be used when a breakpoint attribute is changed that does not alter the breakpoint s underlying marker that is when notification will not occur via the marker delta mechanism param breakpoint the breakpoint that has changed since 2 0 
Removes the given breakpoint from the breakpoint manager deletes the marker associated with the breakpoint if the code delete code flag is code true code and notifies all registered listeners Has no effect if the given breakpoint is not currently registered param breakpoint the breakpoint to remove param delete whether to delete the marker associated with the breakpoint exception Core Exception if an exception occurs while deleting the underlying marker since 2 0  CoreException
Removes the given breakpoints from the breakpoint manager deletes the markers associated with the breakpoints if the code delete code flag is code true code and notifies all registered listeners Has no effect on breakpoints not currently registered param breakpoints the breakpoints to remove param delete whether to delete the markers associated with the breakpoints exception Core Exception if an exception occurs while deleting an underlying marker since 2 1  CoreException
Adds the given listener to the collection of registered breakpoint listeners Has no effect if an identical listener is already registered param listener the listener to add 
Removes the given listener from the collection of registered breakpoint listeners Has no effect if an identical listener is not already registered param listener the listener to remove 
Adds the given listener to the collection of registered breakpoint listeners Has no effect if an identical listener is already registered param listener the listener to add since 2 1 
Removes the given listener from the collection of registered breakpoint listeners Has no effect if an identical listener is not already registered param listener the listener to remove since 2 1 
Adds the given listener to the collection of registered breakpoint manager listeners Has no effect if an identical listener is already registered param listener the listener to add since 3 0 
Removes the given listener from the collection of registered breakpoint manager listeners Has no effect if an identical listener is not already registered param listener the listener to remove since 3 0 
Returns whether or not this breakpoint manager is enabled When a breakpoint manager is enabled all breakpoints should be honored When it is disabled breakpoints should not be honored regardless of each breakpoint s enabled state return whether or not this breakpoint manager is enabled since 3 0 
Sets the enabled state of this breakpoint manager When enabled breakpoints should be honored When disabled all breakpoints should be ignored param enabled whether this breakpoint manager should be enabled since 3 0 

Notifies the listener that the breakpoint manager s enablement has changed param enabled whether or not the breakpoint manager is enabled 

Notifies this listener that the given breakpoints have been added to the breakpoint manager param breakpoints the added breakpoints 
public void breakpoints Added I Breakpoint breakpoints Notifies this listener that the given breakpoints have been removed from the breakpoint manager If a breakpoint has been removed because it has been deleted the associated marker delta is also provided param breakpoints the removed breakpoints param deltas the associated marker deltas Entries may be code null code when a breakpoint is removed from the breakpoint manager without being deleted see org eclipse core resources I Marker Delta  breakpointsAdded IBreakpoint IMarkerDelta
Notifies this listener that the given breakpoints have changed as described by the corresponding deltas param breakpoints the changed breakpoints param deltas the marker deltas that describe the changes with the markers associated with the given breakpoints Entries may be code null code when a breakpoint change does not generate a marker delta see org eclipse core resources I Marker Delta  IMarkerDelta

Filters the given set of debug events and returns the set of debug events that should be fired to registered listeners code null code or an empty collection if no debug events should be fired p When multiple event filters are registered events are passed through all filters That is the events returned from the first filter are passed through the second filter and so on p return the set of debug events to fire 

public interface I Debug Event Set Listener Notifies this listener of the given debug events All of the events in the given event collection occurred at the same location the program be run or debugged param events the debug events  IDebugEventSetListener

Notifies this listener that the given expression has been added to the expression manager param expression the added expression 
public void expression Added I Expression expression Notifies this listener that the given expression has been removed from the expression manager param expression the removed expression  expressionAdded IExpression
Notifies this listener that the given expression has changed param expression the changed expression 

public interface I Expression Manager Adds the given expression to the collection of registered expressions in the workspace and notifies all registered listeners This has no effect if the given expression is already registered param expression the expression to add  IExpressionManager
Adds the given expressions to the collection of registered expressions in the workspace and notifies all registered listeners Has no effect on expressions already registered param expressions the expressions to add since 2 1 
Creates and returns a new watch expression with the given text The returned expression is b not b added to this manager param expression Text the text for the new expression since 3 0  expressionText
Returns a collection of all registered expressions possibly empty return an array of expressions 
Returns whether there are any registered expressions return whether there are any registered expressions 
Returns a collection of all expressions registered for the given debug model possibly empty param model Identifier identifier of a debug model plug in return an array of expressions  modelIdentifier
Removes the given expression from the expression manager and notifies all registered listeners Has no effect if the given expression is not currently registered param expression the expression to remove 
Removes the given expressions from the collection of registered expressions in the workspace and notifies all registered listeners Has no effect on expressions not already registered param expressions the expressions to remove since 2 1 
Adds the given listener to the collection of registered expression listeners Has no effect if an identical listener is already registered param listener the listener to add 
Removes the given listener from the collection of registered expression listeners Has no effect if an identical listener is not already registered param listener the listener to remove 
Adds the given listener to the collection of registered expression listeners Has no effect if an identical listener is already registered param listener the listener to add since 2 1 
Removes the given listener from the collection of registered expression listeners Has no effect if an identical listener is not already registered param listener the listener to remove since 2 1 
Returns a new watch expression delegate for the given debug model or code null code if no delegate is available param id the unique identifier of a debug model for which a watch expression delegate has been contributed return a watch expression delegate associated with the given model or code null code if none since 3 0 see I Watch Expression Delegate  IWatchExpressionDelegate

Notifies this listener that the given expressions have been added to the expression manager param expressions the added expressions 
public void expressions Added I Expression expressions Notifies this listener that the given expressions has been removed from the expression manager param expressions the removed expressions  expressionsAdded IExpression
Notifies this listener that the given expressions have changed param expressions the changed expressions 

public interface I Launch extends I Terminate I Adaptable Returns the children of this launch a collection of one or more debug targets and processes possibly empty return an array element type code I Debug Target code or code I Process code or an empty array  ILaunch ITerminate IAdaptable IDebugTarget IProcess
public Object get Children Returns the primary first debug target associated with this launch or code null code if no debug target is associated with this launch All debug targets associated with this launch may be retrieved by code get Debug Targets code return the primary debug target associated with this launch or code null code  getChildren getDebugTargets
Returns the processes that were launched or an empty collection if no processes were launched return array of processes 
Returns all the debug targets associated with this launch or an empty collection if no debug targets are associated with this launch The primary debug target is the first in the collection if any return array of debug targets since 2 0 
Adds the given debug target to this launch Has no effect if the given debug target is already associated with this launch Registered listeners are notified that this launch has changed param target debug target to add to this launch since 2 0 
Removes the given debug target from this launch Has no effect if the given debug target is not already associated with this launch Registered listeners are notified that this launch has changed param target debug target to remove from this launch since 2 0 
Adds the given process to this launch Has no effect if the given process is already associated with this launch Registered listeners are notified that this launch has changed param process the process to add to this launch since 2 0 
Removes the given process from this launch Has no effect if the given process is not already associated with this launch Registered listeners are notified that this launch has changed param process the process to remove from this launch since 2 0 
Returns the source locator to use for locating source elements for the debug target associated with this launch or code null code if source lookup is not supported return the source locator 
Sets the source locator to use for locating source elements for the debug target associated with this launch or code null code if source lookup is not supported param source Locator source locator or code null code since 2 0  sourceLocator
Returns the mode of this launch one of the mode constants defined by the launch manager return the launch mode see I Launch Manager  ILaunchManager
Returns the configuration that was launched or code null code if no configuration was launched return the launched configuration or code null code since 2 0 
Sets the value of a client defined attribute param key the attribute key param value the attribute value since 2 0 
Returns the value of a client defined attribute param key the attribute key return value the attribute value or code null code if undefined since 2 0 
Returns whether this launch contains at least one process or debug target return whether this launch contains at least one process or debug target since 2 0 

Launches this configuration in the specified mode by delegating to this configuration s launch configuration delegate and returns the resulting launch p Equivalent to calling code launch String I Progress Montitor boolean code with a code build code flag of code false code p param mode the mode in which to launch one of the mode constants defined by code I Launch Manager code code RUN MODE code or code DEBUG MODE code param monitor progress monitor or code null code Since 3 0 this parameter is ignored A cancellable progress monitor is provided by the Job framework return the resulting launch exception Core Exception if this method fails Reasons include ul li unable to instantiate the underlying launch configuration delegate li li the launch fails in the delegate code ul  IProgressMontitor ILaunchManager RUN_MODE DEBUG_MODE CoreException
Launches this configuration in the specified mode by delegating to this configuration s launch configuration delegate and returns the resulting launch p If this configuration s launch delegate implements code I Launch Configuration Delegate2 code the launch delegate will be consulted to provide a launch object for the launch perform pre launch checks and build before the launch If code build code is code true code and the associated launch delegate does not implement code I Launch Configuration Delegate2 code an incremental workspace build will be performed before the launch by the debug platform The resulting launch object is registered with the launch manager before passing it to this configuration s delegate launch method for contributions debug targets and processes p p If the delegate contributes a source locator to the launch that source locator is used Otherwise an appropriate source locator is contributed to the launch based on the values of code ATTR SOURCE LOCATOR ID code and code ATTR SOURCE LOCATOR MEMENTO code If the launch is cancelled via the given progress monitor the launch is removed from the launch manager The launch is returned whether cancelled or not Invoking this method causes the underlying launch configuration delegate to be instantiated if not already p param mode the mode in which to launch one of the mode constants defined by code I Launch Manager code code RUN MODE code or code DEBUG MODE code param monitor progress monitor or code null code Since 3 0 this parameter is ignored A cancellable progress monitor is provided by the Job framework param build whether the workspace should be built before the launch return resulting launch throws Core Exception if an exception occurrs during the launch sequence since 3 0  ILaunchConfigurationDelegate2 ILaunchConfigurationDelegate2 ATTR_SOURCE_LOCATOR_ID ATTR_SOURCE_LOCATOR_MEMENTO ILaunchManager RUN_MODE DEBUG_MODE CoreException
Returns whether this launch configuration supports the specified mode param mode a mode in which a configuration can be launched one of the mode constants defined by code I Launch Manager code code RUN MODE code or code DEBUG MODE code return whether this launch configuration supports the specified mode exception Core Exception if this method fails Reasons include ul li Unable to retrieve this launch configuration s type li ul  ILaunchManager RUN_MODE DEBUG_MODE CoreException
Returns the name of this launch configuration return the name of this launch configuration 
Returns the location of this launch configuration as a path return the location of this launch configuration as a path 
Returns whether this launch configuration s underlying storage exists return whether this launch configuration s underlying storage exists 
Returns the integer valued attribute with the given name Returns the given default value if the attribute is undefined param attribute Name the name of the attribute param default Value the value to use if no value is found return the value or the default value if no value was found exception Core Exception if this method fails Reasons include ul li An exception occurs while retrieving the attribute from underlying storage li li An attribute with the given name exists but does not have an integer value li ul  attributeName defaultValue CoreException
public int get Attribute String attribute Name int default Value throws Core Exception Returns the string valued attribute with the given name Returns the given default value if the attribute is undefined param attribute Name the name of the attribute param default Value the value to use if no value is found return the value or the default value if no value was found exception Core Exception if this method fails Reasons include ul li An exception occurs while retrieving the attribute from underlying storage li li An attribute with the given name exists but does not have a String value li ul  getAttribute attributeName defaultValue CoreException attributeName defaultValue CoreException
public String get Attribute String attribute Name String default Value throws Core Exception Returns the boolean valued attribute with the given name Returns the given default value if the attribute is undefined param attribute Name the name of the attribute param default Value the value to use if no value is found return the value or the default value if no value was found exception Core Exception if this method fails Reasons include ul li An exception occurs while retrieving the attribute from underlying storage li li An attribute with the given name exists but does not have a boolean value li ul  getAttribute attributeName defaultValue CoreException attributeName defaultValue CoreException
public boolean get Attribute String attribute Name boolean default Value throws Core Exception Returns the code java util List code valued attribute with the given name Returns the given default value if the attribute is undefined param attribute Name the name of the attribute param default Value the value to use if no value is found return the value or the default value if no value was found exception Core Exception if this method fails Reasons include ul li An exception occurs while retrieving the attribute from underlying storage li li An attribute with the given name exists but does not have a List value li ul  getAttribute attributeName defaultValue CoreException attributeName defaultValue CoreException
public List get Attribute String attribute Name List default Value throws Core Exception Returns the code java util Map code valued attribute with the given name Returns the given default value if the attribute is undefined param attribute Name the name of the attribute param default Value the value to use if no value is found return the value or the default value if no value was found exception Core Exception if this method fails Reasons include ul li An exception occurs while retrieving the attribute from underlying storage li li An attribute with the given name exists but does not have a Map value li ul  getAttribute attributeName defaultValue CoreException attributeName defaultValue CoreException
Returns the file this launch configuration is stored in or code null code if this configuration is stored locally with the workspace return the file this launch configuration is stored in or code null code if this configuration is stored locally with the workspace 
Returns the type of this launch configuration return the type of this launch configuration exception Core Exception if this method fails Reasons include ul li Unable to retrieve or instantiate this launch configuration s type li ul see I Launch Configuration Type  CoreException ILaunchConfigurationType
Returns whether this launch configuration is stored locally with the workspace return whether this launch configuration is stored locally with the workspace 
Returns a working copy of this launch configuration Changes to the working copy will be applied to this launch configuration when saved The working copy will refer to this launch configuration as its original launch configuration return a working copy of this launch configuration exception Core Exception if this method fails Reasons include ul li An exception occurs while initializing the contents of the working copy from this configuration s underlying storage li ul see I Launch Configuration Working Copy get Original  CoreException ILaunchConfigurationWorkingCopy getOriginal
Returns a copy of this launch configuration as a working copy with the specified name The new working copy does not refer back to this configuration as its original launch configuration the working copy will return code null code for code get Original code When the working copy is saved it will not effect this launch configuration param name the name of the copy return a copy of this launch configuration exception Core Exception if this method fails Reasons include ul li An exception occurs while initializing the contents of the working copy from this configuration s underlying storage li ul see I Launch Configuration Working Copy get Original  getOriginal CoreException ILaunchConfigurationWorkingCopy getOriginal
Returns whether this launch configuration is a working copy Launch configurations which return code true code to this method can be safely cast to code org eclipse debug core I Launch Configuration Working Copy code return whether this launch configuration is a working copy  ILaunchConfigurationWorkingCopy
Deletes this launch configuration This configuration s underlying storage is deleted Has no effect if this configuration does not exist exception Core Exception if this method fails Reasons include ul li An exception occurs while deleting this configuration s underlying storage li ul  CoreException
Returns a memento for this launch configuration or code null code if unable to generate a memento for this configuration A memento can be used to re create a launch configuration via the launch manager return a memento for this configuration see I Launch Manager get Launch Configuration String exception Core Exception if an exception occurs generating this launch configuration s memento  ILaunchManager getLaunchConfiguration CoreException
Returns whether the contents of this launch configuration are equal to the contents of the given launch configuration return whether the contents of this launch configuration are equal to the contents of the specified launch configuration 
Returns this launch configuration s type s category or code null code if unspecified return this launch configuration s type s category or code null code exception Core Exception if this method fails Reasons include ul li Unable to retrieve or instantiate this launch configuration s type li ul since 2 1  CoreException
Returns a map containing the attributes in this launch configuration Returns an empty map if this configuration has no attributes return a map of attribute keys and values exception Core Exception unable to generate retrieve an attribute map since 2 1  CoreException

The given launch configuration has been created param configuration the newly created launch configuration 
The given launch configuration has changed in some way The configuration may be a working copy param configuration the launch configuration that has changed 
The given launch configuration has been deleted param configuration the deleted launch configuration 

Returns whether this type of launch configuration supports the specified mode param mode a mode in which a configuration can be launched one of the mode constants defined by code I Launch Manager code code RUN MODE code or code DEBUG MODE code return whether this kind of launch configuration supports the specified mode  ILaunchManager RUN_MODE DEBUG_MODE
Returns the name of this type of launch configuration return the name of this type of launch configuration 
Returns the unique identifier for this type of launch configuration return the unique identifier for this type of launch configuration 
Returns whether this launch configuration type is public Public configuration types are available for use by the user for example the user can create new configurations based on public types through the UI Private types are not accessbile in this way but are still available through the methods on code I Launch Manager code return whether this launch configuration type is public  ILaunchManager
Returns a new launch configuration working copy of this type that resides in the specified container with the given name When code container code is code null code the configuration will reside locally in the metadata area Note a launch configuration is not actually created until the working copy is saved param container the container in which the new configuration will reside or code null code if the configuration should reside locally with the metadata param name name for the launch configuration return a new launch configuration working copy instance of this type exception Core Exception if an instance of this type of launch configuration could not be created for any reason  CoreException
Returns the launch configuration delegate for launch configurations of this type for code run code mode The first time this method is called the delegate is instantiated return launch configuration delegate exception Core Exception if unable to instantiate the delegate deprecated use code get Delegate String code to specify mode  CoreException getDelegate
Returns the launch configuration delegate for launch configurations of this type for the specified mode The first time this method is called for a mode the delegate is instantiated Launch delegates may be contributed to a launch configuration type via the extension point code org eclipse debug core launch Delegates code param mode launch mode return launch configuration delegate exception Core Exception if unable to instantiate the delegate since 3 0  launchDelegates CoreException
Returns this launch configuration type s category or code null code if unspecified This corresponds to the category attribute specified in the extension definition return this launch configuration type s category or code null code since 2 1 
Returns the attribute with the given name as specified by this launch configuration type s extension definition or code null code if unspecified param attribute Name attribute name return the specified extension attribute or code null code since 2 1  attributeName
Returns the source path computer registered with this launch configuration type or code null code if unspecified A source path computer can be registered with a launch configuration type in plug in XML via the code source Path Computer Id code attribute return the source path computer registered with this launch configuration type or code null code if unspecified since 3 0  sourcePathComputerId
Returns the identifier of the persistable source locator registered with this launch configurations type or code null code if unspecified Launch configuration types optionally specify this attribue in their plug in XML via the code source Locator Id code attribute return the identifier of the persistable source locator registered with this launch configurations type or code null code if unspecified since 3 0  sourceLocatorId
Returns the identifier of the plug in that contributes this launch configuration type return the identifier of the plug in that contributes this launch configuration type since 3 0 

Returns whether this configuration has been modified since it was last saved or created return whether this configuration has been modified since it was last saved or created 
Saves this working copy to its underlying file and returns a handle to the resulting launch configuration Has no effect if this configuration does not need saving Creates the underlying file if not yet created exception Core Exception if an exception occurs while writing this configuration to its underlying file  CoreException
Sets the integer valued attribute with the given name param attribute Name the name of the attribute cannot be code null code param value the value  attributeName
Sets the String valued attribute with the given name If the value is code null code the attribute is removed from this launch configuration param attribute Name the name of the attribute cannot be code null code param value the value or code null code if the attribute is to be undefined  attributeName
Sets the code java util List code valued attribute with the given name The specified List em must em contain only String valued entries If the value is code null code the attribute is removed from this launch configuration param attribute Name the name of the attribute cannot be code null code param value the value or code null code if the attribute is to be undefined  attributeName
Sets the code java util Map code valued attribute with the given name The specified Map em must em contain only String keys and String values If the value is code null code the attribute is removed from this launch configuration param attribute Name the name of the attribute cannot be code null code param value the value or code null code if the attribute is to be undefined  attributeName
Sets the boolean valued attribute with the given name param attribute Name the name of the attribute cannot be code null code param value the value  attributeName
Returns the original launch configuration this working copy was created from or code null code if this is a new working copy created from a launch configuration type return the original launch configuration or code null code 
Renames this launch configuration to the specified name The new name cannot be code null code Has no effect if the name is the same as the current name If this working copy is based on an existing launch configuration this will cause the underlying launch configuration file to be renamed when this working copy is saved param name the new name for this configuration 
Sets the container this launch configuration will be stored in when saved When set to code null code this configuration will be stored locally with the workspace The specified container must exist if specified p If this configuration is changed from local to non local a file will be created in the specified container when saved The local file associated with this configuration will be deleted p p If this configuration is changed from non local to local a file will be created locally when saved The original file associated with this configuration in the workspace will be deleted p param container the container in which to store this launch configuration or code null code if this configuration is to be stored locally 
Sets the attributes of this launch configuration to be the ones contained in the given map The values must be an instance of one of the following classes code String code code Integer code or code Boolean code code List code code Map code Attributes previously set on this launch configuration but not included in the given map are considered to be removals Setting the given map to be code null code is equivalent to removing all attributes param attributes a map of attribute names to attribute values Attribute names are not allowed to be code null code since 2 1 

public interface I Launches Listener Notifies this listener that the specified launches have been removed param launches the removed launch objects  ILaunchesListener
public void launches Removed I Launch launches Notifies this listener that the specified launches have been added param launches the newly added launch objects  launchesRemoved ILaunch
public void launches Added I Launch launches Notifies this listener that the specified launches have changed For example a process or debug target has been added to a launch param launches the changed launch object  launchesAdded ILaunch

Notification that the given launches have terminated param launches the launches that have terminated 

public interface I Launch Listener Notifies this listener that the specified launch has been removed param launch the removed launch since 2 0  ILaunchListener
public void launch Removed I Launch launch Notifies this listener that the specified launch has been added param launch the newly added launch since 2 0  launchRemoved ILaunch
public void launch Added I Launch launch Notifies this listener that the specified launch has changed For example a process or debug target has been added to the launch param launch the changed launch since 2 0  launchAdded ILaunch

Adds the given listener to the collection of registered launch listeners Has no effect if an identical listener is already registerd param listener the listener to register 
public void add Launch Listener I Launch Listener listener Adds the given listener to the collection of registered launch listeners Has no effect if an identical listener is already registerd param listener the listener to register since 2 1  addLaunchListener ILaunchListener
public void add Launch Listener I Launches Listener listener Removes the specified launch and notifies listeners Has no effect if an identical launch is not already registered param launch the launch to remove since 2 0  addLaunchListener ILaunchesListener
public void remove Launch I Launch launch Removes the specified launch objects and notifies listeners Has no effect on identical launch objects that are not already registered param launches the launch objects to remove since 2 1  removeLaunch ILaunch
public void remove Launches I Launch launches Returns the collection of debug targets currently registered with this launch manager return an array of debug targets  removeLaunches ILaunch
public I Debug Target get Debug Targets Returns the collection of launches currently registered with this launch manager return an array of launches  IDebugTarget getDebugTargets
public I Launch get Launches Returns the collection of processes currently registered with this launch manager return an array of processes  ILaunch getLaunches
public I Process get Processes Adds the specified launch and notifies listeners Has no effect if an identical launch is already registered param launch the launch to add since 2 0  IProcess getProcesses
public void add Launch I Launch launch Adds the specified launch objects and notifies listeners Has no effect on identical launch objects already registered param launches the launch objects to add since 2 1  addLaunch ILaunch
public void add Launches I Launch launches Removes the given listener from the collection of registered launch listeners Has no effect if an identical listener is not already registerd param listener the listener to deregister  addLaunches ILaunch
public void remove Launch Listener I Launch Listener listener Removes the given listener from the collection of registered launch listeners Has no effect if an identical listener is not already registerd param listener the listener to deregister since 2 1  removeLaunchListener ILaunchListener
public void remove Launch Listener I Launches Listener listener Returns all launch configurations defined in the workspace return all launch configurations defined in the workspace exception Core Exception if an exception occurs retrieving configurations since 2 0  removeLaunchListener ILaunchesListener CoreException
Returns all launch configurations of the specified type defined in the workspace param type a launch configuration type return all launch configurations of the specified type defined in the workspace exception Core Exception if an error occurs while retreiving a launch configuration since 2 0  CoreException
Returns a handle to the launch configuration contained in the specified file The file is not verified to exist or contain a launch configuration param file launch configuration file return a handle to the launch configuration contained in the specified file since 2 0 
Returns a handle to the launch configuration specified by the given memento The configuration may not exist return a handle to the launch configuration specified by the given memento exception Core Exception if the given memento is invalid or an exception occurs parsing the memento see I Launch Configuration get Memento since 2 0  CoreException ILaunchConfiguration getMemento
Returns all defined launch configuration type extensions return all defined launch configuration type extensions since 2 0 
Returns the launch configuration type extension with the specified id or code null code if it does not exist param id unique identifier for a launch configuration type extension return the launch configuration type extension with the specified id or code null code if it does not exist since 2 0 
Adds the given launch configuration listener to the list of listeners notified when a launch configuration is added removed or changed Has no effect if the given listener is already registered param listener launch configuration listener since 2 0 
Removes the given launch configuration listener from the list of listeners notified when a launch configuration is added removed or changed Has no effect if the given listener is not already registered param listener launch configuration listener since 2 0 
Return code true code if there is a launch configuration with the specified name code false code otherwise param name the name of the launch configuration whose existence is being checked exception Core Exception if unable to retrieve existing launch configuration names since 2 0  CoreException
Return a String that can be used as the name of a launch configuration The name is guaranteed to be unique no existing launch configurations will have this name The name that is returned uses the code name Prefix code as a starting point If there is no existing launch configuration with this name then code name Prefix code is returned Otherwise the value returned consists of the specified prefix plus some suffix that guarantees uniqueness param name Prefix the String that the returned name must begin with since 2 0  namePrefix namePrefix namePrefix
Creates and returns a new source locator of the specified type param identifier the identifier associated with a persistable source locator extension return a source locator exception Core Exception if an exception occurs creating the source locator since 2 0  CoreException
When a launch configuration is created or moved registered launch configuration listeners see code I Launch Configuration Listener code are notified of an add notification for the new configuration If the notification is the result of a move this method will return a handle to the launch configuration that the added launch configuration was moved from This method returns code null code if the added launch configuration was not the result of a rename or move This information is only available during the add notification call back code launch Configuration Added code p Renaming a configuration is considered the same as moving a configuration p param added Configuration a launch configuration for which an add notification is being broadcast return the launch configuration that the added launch configuration was moved from or code null code if the add notification is not the result of a move since 2 1  ILaunchConfigurationListener launchConfigurationAdded addedConfiguration
When a launch configuration is deleted or moved registered launch configuration listeners see code I Launch Configuration Listener code are notified of a remove notification for launch configuration that has been deleted If the notification is the result of a move this method will return a handle to the launch configuration that the removed launch configuration was moved to This method returns code null code if the removed launch configuration was not the result of a rename or move This information is only available during the add notification call back code launch Configuration Removed code p Renaming a configuration is considered the same as moving a configuration p param removed Configuration a launch configuration for which a remove notification is being broadcast return the launch configuration that the removed launch configuration was moved to or code null code if the add notification is not the result of a move since 2 1  ILaunchConfigurationListener launchConfigurationRemoved removedConfiguration
Returns all registered launch modes return all registered launch modes since 3 0 
Returns the launch mode registered with the given mode identifier or code null code if none param mode mode identifier return launch mode or code null code since 3 0 
Returns an array of environment variables to be used when launching the given configuration or code null code if unspecified param configuration launch configuration throws Core Exception if unable to access associated attribute or if unable to resolve a variable in an environment variable s value since 3 0  CoreException
Returns a source path computer to compute a default source lookup path for the given launch configuration or code null code if a source path computer has not been registered for the associated launch configuration type param configuration a launch configuration return a source path computer registered for the associated launch configurations type or code null code if unspecified throws Core Exception if an exception occurs while instantiating a source path computer since 3 0  CoreException
Returns the source path computer extension registered with the given unique identifier or code null code if none param id source path computer identifier return the source path computer extension registered with the given unique identifier or code null code if none since 3 0 
Returns the native system environment variables as a map of variable names and values Strings On WIN32 all keys variable names are returned in uppercase Note that WIN32 s environment is not case sensitive return the native system environment variables since 3 0 
Returns all registered source container type extensions return all registered source container type extensions since 3 0 
Returns the source container type extension registered with the given unique identifier or code null code if none param id unique identifier of a source container type extension return the source container type extension registered with the given unique identifier or code null code if none since 3 0 

Returns the unique identifier for this launch mode return the unique identifier for this launch mode 
Returns a human readable label for this launch mode return a human readable label for this launch mode 

Returns a simple description of the logical structure provided by this structure type return a simple description of the logical structure provided by this structure type 
Returns this logical structure type s unique identifier as defined in plug in XML return this logical structure type s unique identifier 

Creates and returns a new process representing the given code java lang Process code A streams proxy is created for the I O streams in the system process The process is added to the given launch and the process is initialized with the given attribute map param launch the launch the process is contained in param process the system process to wrap param label the label assigned to the process param attributes initial values for the attribute map return the process see I Process  IProcess

Notifies this status handler that the given status has been generated by the specified source object and requires resolution param status the status to handle param source the object delegating to this status handler the given status return an object representing the resolution of the status exception Core Exception if unable to resolve the status  CoreException

public interface I Stream Listener Notifies this listener that text has been appended to the given stream monitor param text the appended text param monitor the stream monitor to which text was appended  IStreamListener

Constructs a launch with the specified attributes param launch Configuration the configuration that was launched param mode the mode of this launch run or debug constants defined by code I Launch Manager code param locator the source locator to use for this debug session or code null code if not supported public Launch I Launch Configuration launch Configuration String mode I Source Locator locator set Launch Configuration launch Configuration set Source Locator locator set Launch Mode mode f Suppress Change false get Launch Manager add Launch Listener this get Launch Manager add Launch Configuration Listener this Debug Plugin get Default add Debug Event Listener this  launchConfiguration ILaunchManager ILaunchConfiguration launchConfiguration ISourceLocator setLaunchConfiguration launchConfiguration setSourceLocator setLaunchMode fSuppressChange getLaunchManager addLaunchListener getLaunchManager addLaunchConfigurationListener DebugPlugin getDefault addDebugEventListener
see org eclipse debug core model I Terminate can Terminate public final boolean can Terminate List processes get Processes0 for int i 0 i processes size i I Process process I Process processes get i if process can Terminate return true List targets get Debug Targets0 for int i 0 i targets size i I Debug Target target I Debug Target targets get i if target can Terminate target can Disconnect return true return false  ITerminate canTerminate canTerminate getProcesses0 IProcess IProcess canTerminate getDebugTargets0 IDebugTarget IDebugTarget canTerminate canDisconnect
see I Launch get Children public final Object get Children Array List children new Array List get Debug Targets0 children add All get Processes0 return children to Array  ILaunch getChildren getChildren ArrayList ArrayList getDebugTargets0 addAll getProcesses0 toArray
see I Launch get Debug Target public final I Debug Target get Debug Target if get Debug Targets0 is Empty return I Debug Target get Debug Targets0 get 0 return null  ILaunch getDebugTarget IDebugTarget getDebugTarget getDebugTargets0 isEmpty IDebugTarget getDebugTargets0
Sets the configuration that was launched param configuration the configuration that was launched private void set Launch Configuration I Launch Configuration configuration f Configuration configuration  setLaunchConfiguration ILaunchConfiguration fConfiguration
see I Launch get Processes public final I Process get Processes return I Process get Processes0 to Array new I Process get Processes0 size  ILaunch getProcesses IProcess getProcesses IProcess getProcesses0 toArray IProcess getProcesses0
Returns the processes associated with this launch in its internal form a list return list of processes protected List get Processes0 return f Processes  getProcesses0 fProcesses
see I Launch get Source Locator public final I Source Locator get Source Locator return f Locator  ILaunch getSourceLocator ISourceLocator getSourceLocator fLocator
see I Launch set Source Locator I Source Locator public final void set Source Locator I Source Locator source Locator f Locator source Locator  ILaunch setSourceLocator ISourceLocator setSourceLocator ISourceLocator sourceLocator fLocator sourceLocator
see org eclipse debug core model I Terminate is Terminated public final boolean is Terminated if get Processes0 is Empty get Debug Targets0 is Empty return false Iterator processes get Processes0 iterator while processes has Next I Process process I Process processes next if process is Terminated return false Iterator targets get Debug Targets0 iterator while targets has Next I Debug Target target I Debug Target targets next if target is Terminated target is Disconnected return false return true  ITerminate isTerminated isTerminated getProcesses0 isEmpty getDebugTargets0 isEmpty getProcesses0 hasNext IProcess IProcess isTerminated getDebugTargets0 hasNext IDebugTarget IDebugTarget isTerminated isDisconnected
see org eclipse debug core model I Terminate terminate public final void terminate throws Debug Exception Multi Status status new Multi Status Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Debug Core Messages get String Launch terminate failed null NON NLS 1 terminate the system processes I Process processes get Processes for int i 0 i processes length i I Process process processes i if process can Terminate try process terminate catch Debug Exception e status merge e get Status terminate or disconnect debug target if it is still alive I Debug Target targets get Debug Targets for int i 0 i targets length i I Debug Target target targets i if target null if target can Terminate try target terminate catch Debug Exception e status merge e get Status else if target can Disconnect try target disconnect catch Debug Exception de status merge de get Status if status isOK return I Status children status get Children if children length 1 throw new Debug Exception children 0 throw new Debug Exception status  ITerminate DebugException MultiStatus MultiStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED DebugCoreMessages getString terminate_failed IProcess getProcesses IProcess canTerminate DebugException getStatus IDebugTarget getDebugTargets IDebugTarget canTerminate DebugException getStatus canDisconnect DebugException getStatus IStatus getChildren DebugException DebugException
see I Launch get Launch Mode public final String get Launch Mode return f Mode  ILaunch getLaunchMode getLaunchMode fMode
Sets the mode in which this launch was launched param mode the mode in which this launch was launched one of the constants defined by code I Launch Manager code private void set Launch Mode String mode f Mode mode  ILaunchManager setLaunchMode fMode
see I Launch get Launch Configuration public I Launch Configuration get Launch Configuration return f Configuration  ILaunch getLaunchConfiguration ILaunchConfiguration getLaunchConfiguration fConfiguration
see I Launch set Attribute String String public void set Attribute String key String value if f Attributes null f Attributes new Hash Map 5 f Attributes put key value  ILaunch setAttribute setAttribute fAttributes fAttributes HashMap fAttributes
see I Launch get Attribute String public String get Attribute String key if f Attributes null return null return String f Attributes get key  ILaunch getAttribute getAttribute fAttributes fAttributes
see I Launch get Debug Targets public I Debug Target get Debug Targets return I Debug Target f Targets to Array new I Debug Target f Targets size  ILaunch getDebugTargets IDebugTarget getDebugTargets IDebugTarget fTargets toArray IDebugTarget fTargets
Returns the debug targets associated with this launch in its internal form a list return list of debug targets protected List get Debug Targets0 return f Targets  getDebugTargets0 fTargets
see I Launch add Debug Target I Debug Target public final void add Debug Target I Debug Target target if target null if get Debug Targets0 contains target get Debug Targets0 add target fire Changed  ILaunch addDebugTarget IDebugTarget addDebugTarget IDebugTarget getDebugTargets0 getDebugTargets0 fireChanged
see I Launch remove Debug Target I Debug Target public final void remove Debug Target I Debug Target target if target null if get Debug Targets0 remove target fire Changed  ILaunch removeDebugTarget IDebugTarget removeDebugTarget IDebugTarget getDebugTargets0 fireChanged
see I Launch add Process I Process public final void add Process I Process process if process null if get Processes0 contains process get Processes0 add process fire Changed  ILaunch addProcess IProcess addProcess IProcess getProcesses0 getProcesses0 fireChanged
see I Launch remove Process I Process public final void remove Process I Process process if process null if get Processes0 remove process fire Changed  ILaunch removeProcess IProcess removeProcess IProcess getProcesses0 fireChanged
Adds the given processes to this launch param processes processes to add protected void add Processes I Process processes if processes null for int i 0 i processes length i add Process processes i fire Changed  addProcesses IProcess addProcess fireChanged
Notifies listeners that this launch has changed Has no effect of this launch has not yet been properly created initialized protected void fire Changed if f Suppress Change Launch Manager get Launch Manager fire Update this Launch Manager CHANGED Launch Manager get Launch Manager fire Update new I Launch this Launch Manager CHANGED  fireChanged fSuppressChange LaunchManager getLaunchManager fireUpdate LaunchManager LaunchManager getLaunchManager fireUpdate ILaunch LaunchManager
Notifies listeners that this launch has terminated Has no effect of this launch has not yet been properly created initialized protected void fire Terminate if f Suppress Change Launch Manager get Launch Manager fire Update this Launch Manager TERMINATE Launch Manager get Launch Manager fire Update new I Launch this Launch Manager TERMINATE  fireTerminate fSuppressChange LaunchManager getLaunchManager fireUpdate LaunchManager LaunchManager getLaunchManager fireUpdate ILaunch LaunchManager
see I Launch has Children public boolean has Children return get Processes0 size 0 get Debug Targets0 size 0  ILaunch hasChildren hasChildren getProcesses0 getDebugTargets0
see org eclipse debug core model I Disconnect can Disconnect public boolean can Disconnect if get Debug Targets0 size 1 return get Debug Target can Disconnect return false  IDisconnect canDisconnect canDisconnect getDebugTargets0 getDebugTarget canDisconnect
see org eclipse debug core model I Disconnect disconnect public void disconnect throws Debug Exception if get Debug Targets0 size 1 get Debug Target disconnect  IDisconnect DebugException getDebugTargets0 getDebugTarget
see org eclipse debug core model I Disconnect is Disconnected public boolean is Disconnected if get Debug Targets0 size 1 get Debug Target is Disconnected return false  IDisconnect isDisconnected isDisconnected getDebugTargets0 getDebugTarget isDisconnected
public void launch Removed I Launch launch if this equals launch get Launch Manager remove Launch Listener this get Launch Manager remove Launch Configuration Listener this Debug Plugin get Default remove Debug Event Listener this  launchRemoved ILaunch getLaunchManager removeLaunchListener getLaunchManager removeLaunchConfigurationListener DebugPlugin getDefault removeDebugEventListener
Returns the launch manager return the launch manager protected I Launch Manager get Launch Manager return Debug Plugin get Default get Launch Manager  ILaunchManager getLaunchManager DebugPlugin getDefault getLaunchManager
see org eclipse debug core I Launch Listener launch Added org eclipse debug core I Launch public void launch Added I Launch launch  ILaunchListener launchAdded ILaunch launchAdded ILaunch
see org eclipse debug core I Launch Listener launch Changed org eclipse debug core I Launch public void launch Changed I Launch launch  ILaunchListener launchChanged ILaunch launchChanged ILaunch
public void launch Configuration Added I Launch Configuration configuration I Launch Configuration from get Launch Manager get Moved From configuration if from null from equals get Launch Configuration set Launch Configuration configuration fire Changed  launchConfigurationAdded ILaunchConfiguration ILaunchConfiguration getLaunchManager getMovedFrom getLaunchConfiguration setLaunchConfiguration fireChanged
see org eclipse debug core I Launch Configuration Listener launch Configuration Changed org eclipse debug core I Launch Configuration public void launch Configuration Changed I Launch Configuration configuration  ILaunchConfigurationListener launchConfigurationChanged ILaunchConfiguration launchConfigurationChanged ILaunchConfiguration
public void launch Configuration Removed I Launch Configuration configuration if configuration equals get Launch Configuration if get Launch Manager get Moved To configuration null set Launch Configuration null fire Changed  launchConfigurationRemoved ILaunchConfiguration getLaunchConfiguration getLaunchManager getMovedTo setLaunchConfiguration fireChanged
public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i if event get Kind Debug Event TERMINATE Object object event get Source I Launch launch null if object instanceof I Process launch I Process object get Launch else if object instanceof I Debug Target launch I Debug Target object get Launch if this equals launch if is Terminated fire Terminate  handleDebugEvents DebugEvent DebugEvent getKind DebugEvent getSource ILaunch IProcess IProcess getLaunch IDebugTarget IDebugTarget getLaunch isTerminated fireTerminate

see I Breakpoint set Marker I Marker public void set Marker I Marker marker throws Core Exception f Marker marker  IBreakpoint setMarker IMarker setMarker IMarker CoreException fMarker
see Object equals Object public boolean equals Object item if item instanceof I Breakpoint return get Marker equals I Breakpoint item get Marker return false  IBreakpoint getMarker IBreakpoint getMarker
see Object hash Code public int hash Code return get Marker hash Code  hashCode hashCode getMarker hashCode
see I Breakpoint set Enabled boolean public void set Enabled boolean enabled throws Core Exception if enabled is Enabled set Attribute ENABLED enabled  IBreakpoint setEnabled setEnabled CoreException isEnabled setAttribute
see I Breakpoint is Enabled public boolean is Enabled throws Core Exception return get Marker get Attribute ENABLED false  IBreakpoint isEnabled isEnabled CoreException getMarker getAttribute
see I Breakpoint is Registered public boolean is Registered throws Core Exception I Marker marker get Marker return marker exists marker get Attribute REGISTERED true  IBreakpoint isRegistered isRegistered CoreException IMarker getMarker getAttribute
see I Breakpoint set Registered boolean public void set Registered boolean registered throws Core Exception if is Registered registered set Attribute REGISTERED registered I Breakpoint Manager mgr Debug Plugin get Default get Breakpoint Manager if registered mgr add Breakpoint this else mgr remove Breakpoint this false  IBreakpoint setRegistered setRegistered CoreException isRegistered setAttribute IBreakpointManager DebugPlugin getDefault getBreakpointManager addBreakpoint removeBreakpoint
see I Breakpoint delete public void delete throws Core Exception Debug Plugin get Default get Breakpoint Manager remove Breakpoint this false get Marker delete  IBreakpoint CoreException DebugPlugin getDefault getBreakpointManager removeBreakpoint getMarker
see I Breakpoint get Marker public I Marker get Marker return f Marker  IBreakpoint getMarker IMarker getMarker fMarker
see I Breakpoint is Persisted public boolean is Persisted throws Core Exception return get Marker get Attribute PERSISTED true  IBreakpoint isPersisted isPersisted CoreException getMarker getAttribute
see I Breakpoint set Persisted boolean public void set Persisted boolean persisted throws Core Exception if is Persisted persisted set Attributes new String PERSISTED I Marker TRANSIENT new Object new Boolean persisted new Boolean persisted  IBreakpoint setPersisted setPersisted CoreException isPersisted setAttributes IMarker
I Workspace workspace Resources Plugin get Workspace I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception ensure Marker set Attribute attribute Name value  IWorkspace ResourcesPlugin getWorkspace IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException ensureMarker setAttribute attributeName
Convenience method to set the given boolean attribute of this breakpoint s underlying marker in a workspace runnable Setting marker attributes in a workspace runnable prevents deadlock param attribute Name attribute name param value attribute value exception Core Exception is setting the attribute fails see I Marker set Attribute java lang String boolean protected void set Attribute final String attribute Name final boolean value throws Core Exception I Workspace workspace Resources Plugin get Workspace I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception ensure Marker set Attribute attribute Name value workspace run runnable null 0 null  attributeName CoreException IMarker setAttribute setAttribute attributeName CoreException IWorkspace ResourcesPlugin getWorkspace IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException ensureMarker setAttribute attributeName
I Workspace workspace Resources Plugin get Workspace I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception ensure Marker set Attribute attribute Name value  IWorkspace ResourcesPlugin getWorkspace IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException ensureMarker setAttribute attributeName
Convenience method to set the given integer attribute of this breakpoint s underlying marker in a workspace runnable Setting marker attributes in a workspace runnable prevents deadlock param attribute Name attribute name param value attribute value exception Core Exception is setting the attribute fails see I Marker set Attribute java lang String int protected void set Attribute final String attribute Name final int value throws Core Exception I Workspace workspace Resources Plugin get Workspace I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception ensure Marker set Attribute attribute Name value workspace run runnable null 0 null  attributeName CoreException IMarker setAttribute setAttribute attributeName CoreException IWorkspace ResourcesPlugin getWorkspace IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException ensureMarker setAttribute attributeName
I Workspace workspace Resources Plugin get Workspace I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception ensure Marker set Attribute attribute Name value  IWorkspace ResourcesPlugin getWorkspace IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException ensureMarker setAttribute attributeName
Convenience method to set the given attribute of this breakpoint s underlying marker in a workspace runnable Setting marker attributes in a workspace runnable prevents deadlock param attribute Name attribute name param value attribute value exception Core Exception is setting the attribute fails see I Marker set Attribute java lang String java lang Object protected void set Attribute final String attribute Name final Object value throws Core Exception I Workspace workspace Resources Plugin get Workspace I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception ensure Marker set Attribute attribute Name value workspace run runnable null 0 null  attributeName CoreException IMarker setAttribute setAttribute attributeName CoreException IWorkspace ResourcesPlugin getWorkspace IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException ensureMarker setAttribute attributeName
I Workspace workspace Resources Plugin get Workspace I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception ensure Marker set Attributes attribute Names values  IWorkspace ResourcesPlugin getWorkspace IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException ensureMarker setAttributes attributeNames
Convenience method to set the given attributes of this breakpoint s underlying marker in a workspace runnable Setting marker attributes in a workspace runnable prevents deadlock param attribute Names attribute names param values attribute values exception Core Exception is setting the attributes fails see I Marker set Attributes java lang String java lang Object protected void set Attributes final String attribute Names final Object values throws Core Exception I Workspace workspace Resources Plugin get Workspace I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception ensure Marker set Attributes attribute Names values workspace run runnable null 0 null  attributeNames CoreException IMarker setAttributes setAttributes attributeNames CoreException IWorkspace ResourcesPlugin getWorkspace IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException ensureMarker setAttributes attributeNames
I Workspace workspace Resources Plugin get Workspace I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception ensure Marker set Attributes attributes  IWorkspace ResourcesPlugin getWorkspace IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException ensureMarker setAttributes
Convenience method to set the attributes of this breakpoint s underlying marker in a workspace runnable Setting marker attributes in a workspace runnable prevents deadlock param attributes attribute map exception Core Exception is setting the attributes fails see I Marker set Attributes java util Map protected void set Attributes final Map attributes throws Core Exception I Workspace workspace Resources Plugin get Workspace I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception ensure Marker set Attributes attributes workspace run runnable null 0 null  CoreException IMarker setAttributes setAttributes CoreException IWorkspace ResourcesPlugin getWorkspace IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException ensureMarker setAttributes
Returns the marker associated with this breakpoint return breakpoint marker exception Debug Exception if no marker is associated with this breakpoint or the associated marker does not exist protected I Marker ensure Marker throws Debug Exception I Marker m get Marker if m null m exists throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Debug Core Messages get String Breakpoint no associated marker null NON NLS 1 return m  DebugException IMarker ensureMarker DebugException IMarker getMarker DebugException IStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED DebugCoreMessages getString no_associated_marker
Returns whether this breakpoint has an associated marker that exists return returns whether this breakpoint has an associated marker that exists since 2 1 protected boolean marker Exists I Marker m get Marker return m null m exists  markerExists IMarker getMarker

Deletes this breakpoint s underlying marker and removes this breakpoint from the breakpoint manager exception Core Exception if unable to delete this breakpoint s underlying marker  CoreException
Returns the marker associated with this breakpoint or code null code if no marker is associated with this breakpoint return associated marker or code null code if there is no associated marker 
public I Marker get Marker Sets the marker associated with this breakpoint This method is called once at breakpoint creation param marker the marker to associate with this breakpoint exception Core Exception if an error occurs accessing the marker  IMarker getMarker CoreException
public void set Marker I Marker marker throws Core Exception Returns the identifier of the debug model this breakpoint is associated with return the identifier of the debug model this breakpoint is associated with  setMarker IMarker CoreException
public String get Model Identifier Returns whether this breakpoint is enabled return whether this breakpoint is enabled exception Core Exception if unable to access the associated attribute from this breakpoint s underlying marker  getModelIdentifier CoreException
public boolean is Enabled throws Core Exception Sets the enabled state of this breakpoint This has no effect if the current enabled state is the same as specified by the enabled parameter param enabled whether this breakpoint should be enabled exception Core Exception if unable to set the associated attribute on this breakpoint s underlying marker  isEnabled CoreException CoreException
Returns whether this breakpoint is currently registered with the breakpoint manager return whether this breakpoint is currently registered with the breakpoint manager exception Core Exception if unable to access the associated attribute on this breakpoint s underlying marker  CoreException
Sets whether this breakpoint is currently registered with the breakpoint manager param registered whether this breakpoint is registered with the breakpoint manager exception Core Exception if unable to set the associated attribute on this breakpoint s underlying marker  CoreException
Returns whether this breakpoint is to be persisted across workspace invocations or when a project is closed and re opened Since marker definitions only allow all none of a specific type of marker to be persisted rather than selected markers of a specific type breakpoints define this functionality return whether this breakpoint is to be persisted exception Core Exception if unable to access the associated attribute on this breakpoint s underlying marker  CoreException
Sets whether this breakpoint is to be persisted across workspace invocations or when a project is closed and re opened Has no effect if this breakpoint s marker definition is defined as not persisted Sets the underlying code TRANSIENT code attribute on this breakpoint s marker to code true code param registered whether this breakpoint is to be persisted across workspace invocations exception Core Exception if unable to set the associated attribute on this breakpoint s underlying marker  CoreException

Returns the unique identifier of the plug in this debug element originated from return the plug in identifier 
public String get Model Identifier Returns the debug target this element is contained in return the debug target this element is contained in  getModelIdentifier
public I Debug Target get Debug Target Returns the launch this element is contained in return the launch this element is contained in  IDebugTarget getDebugTarget

Returns a collection of debug model identifiers return a collection of debug model identifiers 

public interface I Debug Target extends I Debug Element I Terminate I Suspend Resume I Breakpoint Listener I Disconnect I Memory Block Retrieval Returns the system process associated with this debug target return the system process associated with this debug target  IDebugTarget IDebugElement ITerminate ISuspendResume IBreakpointListener IDisconnect IMemoryBlockRetrieval
public I Process get Process Returns the threads contained in this debug target An empty collection is returned if this debug target contains no threads return a collection of threads exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 2 0  IProcess getProcess DebugException DebugException
Returns whether this debug target currently contains any threads return whether this debug target currently contains any threads exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 2 0  DebugException DebugException
Returns the name of this debug target Name format is debug model specific and should be specified by a debug model return this target s name exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException
Returns whether this target can install the given breakpoint return whether this target can install the given breakpoint 

public interface I Disconnect Returns whether this element can currently disconnect return whether this element can currently disconnect  IDisconnect
public boolean can Disconnect Disconnects this element from its target Generally disconnecting ends a debug session with a debug target but allows the target program to continue running exception Debug Exception on failure Reasons include ul li TARGET REQUEST FAILED The request failed in the target li NOT SUPPORTED The capability is not supported by the target ul  canDisconnect DebugException TARGET_REQUEST_FAILED NOT_SUPPORTED
public void disconnect throws Debug Exception Returns whether this element is disconnected return whether this element is disconnected  DebugException

public interface I Error Reporting Expression extends I Expression Returns whether this expression has errors to report An expression can have errors if errors were generated the last time its value was computed return whether this expression s result has errors  IErrorReportingExpression IExpression
public boolean has Errors Returns this expression s error messages if any An expression can have errors if errors were generated the last time its value was computed return this expression s error messages  hasErrors

Returns this expression s snippet of code return the expression 
Returns the current value of this expression or code null code if this expression does not currently have a value return value or code null code 
Returns the debug target this expression is associated with or code null code if this expression is not associated with a debug target return debug target or code null code see I Debug Element get Debug Target  IDebugElement getDebugTarget
Notifies this expression that it has been removed from the expression manager Any required clean up is be performed such that this expression can be garbage collected 

public interface I Filtered Step extends I Step Returns whether this element can currently perform a filtered step into return whether this element can currently perform a filtered step into  IFilteredStep IStep
public boolean can Step With Filters Steps into the current statement generating code RESUME code and code SUSPEND code events for the associated thread applying step filters as applicable for the associated thread Can only be called when the associated thread is suspended Implementations must implement stepping as non blocking exception Debug Exception on failure Reasons include ul li TARGET REQUEST FAILED The request failed in the target li li NOT SUPPORTED The capability is not supported by the target li ul  canStepWithFilters DebugException TARGET_REQUEST_FAILED NOT_SUPPORTED

public interface I Flushable Stream Monitor extends I Stream Monitor Empties the contents of this stream monitor s underlying buffer public void flush Contents  IFlushableStreamMonitor IStreamMonitor flushContents
Sets whether the contents of this monitor s underlying stream should be buffered When code false code contents appended to this stream monitor are not stored in a buffer and are thus not available from code get Contents code Registered listeners are notified of appended text and must buffer the contents if desired param buffer whether the contents of this monitor s underlying stream should be buffered  getContents
Returns whether the contents of this monitor s underlying stream is buffered return whether the contents of this monitor s underlying stream is buffered 

Returns the variable at the given offset in this collection The offset is zero based param offset zero based offset into this collection return returns the variable in this collection at the given offset throws Debug Exception if unable to retrieve the variable at the given offset  DebugException
Returns a subset of the elements in this collection of variables as specified by the given offset and length param offset beginning offset of the subset of elements to return param length the number of elements to return return a subset of the elements in this collection of variables as specified by the given offset and length throws Debug Exception if unable to retrieve the variables  DebugException
Returns the number of entries in this indexed collection return the number of entries in this indexed collection throws Debug Exception if unable to determine the number of entries in this collection  DebugException
Returns the index of the first variable contained in this value Generally indexed values are zero based but this allows for an arbitrary base offset return the index of the first variable contained in this value 

Launches the given configuration in the specified mode contributing debug targets and or processes to the given launch object The launch object has already been registered with the launch manager param configuration the configuration to launch param mode the mode in which to launch one of the mode constants defined by code I Launch Manager code code RUN MODE code or code DEBUG MODE code param monitor progress monitor or code null code param launch the launch object to contribute processes and debug targets to exception Core Exception if launching fails  ILaunchManager RUN_MODE DEBUG_MODE CoreException

Returns a launch object to use when launching the given launch configuration in the given mode or code null code if a new default launch object should be created by the debug platform If a launch object is returned its launch mode must match that of the mode specified in this method call param configuration the configuration being launched param mode the mode the configuration is being launched in return a launch object or code null code throws Core Exception if unable to launch  CoreException
Optionally performs any required building before launching the given configuration in the specified mode and returns whether the debug platform should perform an incremental workspace build before the launch continues If code false code is returned the launch will proceed without further building and if code true code is returned an incremental build will be performed on the workspace before launching p This method is only called if the launch is invoked with flag indicating building should take place before the launch This is done via the method code I Launch Configuration launch String mode I Progress Monitor monitor boolean build code p param configuration the configuration being launched param mode the mode the configuration is being launched in param monitor progress monitor return whether the debug platform should perform an incremental workspace build before the launch throws Core Exception if an exception occurrs while building  ILaunchConfiguration IProgressMonitor CoreException
Returns whether a launch should proceed This method is called after code pre Launch Check code and code build For Launch code providing a final chance for this launch delegate to abort a launch if required For example a delegate could cancel a launch if it discovered compilation errors that would prevent the launch from succeeding param configuration the configuration being launched param mode launch mode param monitor progress monitor return whether the launch should proceed throws Core Exception if an exception occurs during final checks  preLaunchCheck buildForLaunch CoreException
Returns whether a launch should proceed This method is called first in the launch sequence providing an opportunity for this launch delegate to abort the launch param configuration configuration being lanuched param mode launch mode param monitor progress monitor return whether the launch should proceed throws Core Exception if an exception occurs while performing pre launch checks  CoreException

Returns the line number in the original source that corresponds to the location of this breakpoint or 1 if the attribute is not present return this breakpoint s line number or 1 if unknown exception Core Exception if a code Core Exception code is thrown while accessing the underlying code I Marker LINE NUMBER code marker attribute  CoreException CoreException IMarker LINE_NUMBER
public int get Line Number throws Core Exception Returns starting source index in the original source that corresponds to the location of this breakpoint or 1 if the attribute is not present return this breakpoint s char start value or 1 if unknown exception Core Exception if a code Core Exception code is thrown while accessing the underlying code I Marker CHAR START code marker attribute  getLineNumber CoreException CoreException CoreException IMarker CHAR_START
public int get Char Start throws Core Exception Returns ending source index in the original source that corresponds to the location of this breakpoint or 1 if the attribute is not present return this breakpoint s char end value or 1 if unknown exception Core Exception if a code Core Exception code is thrown while accessing the underlying code I Marker CHAR END code marker attribute  getCharStart CoreException CoreException CoreException IMarker CHAR_END

Returns whether this structure type can provide a logical structure for the given value param value value for which a logial structure is being requested return whether this structure type can provide a logical structure for the given value 
Returns a value representing a logical structure of the given value param value value for which a logical structure is being requested return value representing logical structure throws Core Exception if an exception occurrs generating a logical structure  CoreException

Returns the start address of this memory block return the start address of this memory block 
Returns the length of this memory block in bytes return the length of this memory block in bytes 
Returns the values of the bytes currently contained in this this memory block return the values of the bytes currently contained in this this memory block exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException
Returns whether this memory block supports value modification return whether this memory block supports value modification 
Sets the value of the bytes in this memory block at the specified offset within this memory block to the spcified bytes The offset is zero based param offset the offset at which to set the new values param bytes the new values exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li li This memory block does not support value modification li li The specified offset is greater than or equal to the length of this memory block or the number of bytes specified goes beyond the end of this memory block index of out of range li ul  DebugException DebugException

Returns whether this debug target supports the retrieval of memory blocks return whether this debug target supports the retrieval of memory blocks 
Returns a memory block that starts at the specified memory address with the specified length param start Address starting address param length length of the memory block in bytes return a memory block that starts at the specified memory address with the specified length exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li li This debug target does not support memory block retrieval li li The specified address and length are not within valid ranges li ul  startAddress DebugException DebugException

Returns a memento that can be used to reconstruct this source locator return a memento that can be used to reconstruct this source locator exception Core Exception if unable to construct a memento  CoreException
Initializes this source locator based on the given memento param memento a memento to initialize this source locator exception Core Exception on failure to initialize  CoreException
Initializes this source locator to perform default source lookup for the given launch configuration param configuration launch configuration this source locator will be performing souce lookup for exception Core Exception on failure to initialize  CoreException

Returns a human readable label for this process return a label for this process 
public String get Label Returns the launch this element originated from return the launch this process is contained in  getLabel
public I Launch get Launch Returns a proxy to the standard input output and error streams for this process or code null code if not supported return a streams proxy or code null code if not supported  ILaunch getLaunch
Sets the value of a client defined attribute param key the attribute key param value the attribute value 
Returns the value of a client defined attribute param key the attribute key return value the String attribute value or code null code if undefined 
Returns the exit value of this process Conventionally 0 indicates normal termination return the exit value of this process exception Debug Exception if this process has not yet terminated  DebugException

Returns the register group this register is contained in return the register group this register is contained in exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li  DebugException DebugException

Returns the name of this register group return this register group s name exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li  DebugException DebugException
Returns the registers in this register group return the registers in this register group exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li  DebugException DebugException
Returns whether this register group currently contains any registers return whether this register group currently contains any registers exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li  DebugException DebugException

Returns a source element that corresponds to the given stack frame or code null code if a source element could not be located The object returned by this method will be used by the debug UI plug in to display source The debug UI uses the debug model presentation associated with the given stack frame s debug model to translate a source object into an editor input editor id pair in which to display source p For example a java source locator could return an object representing a compilation unit or class file The java debug model presentation would then be responsible for providing an editor input and editor id for each compilation unit and class file such that the debug UI could display source p param stack Frame the stack frame for which to locate source return an object representing a source element  stackFrame

public interface I Stack Frame extends I Debug Element I Step I Suspend Resume I Terminate Returns the thread this stack frame is contained in return thread since 2 0  IStackFrame IDebugElement IStep ISuspendResume ITerminate
public I Thread get Thread Returns the visible variables in this stack frame An empty collection is returned if there are no visible variables return collection of visible variables exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 2 0  IThread getThread DebugException DebugException
Returns whether this stack frame currently contains any visible variables return whether this stack frame currently contains any visible variables exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 2 0  DebugException DebugException
Returns the line number of the instruction pointer in this stack frame that corresponds to a line in an associated source element or code 1 code if line number information is unavailable return line number of instruction pointer in this stack frame or code 1 code if line number information is unavailable exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException
Returns the index of the first character in the associated source element that corresponds to the current location of the instruction pointer in this stack frame or code 1 code if the information is unavailable p If a debug model supports expression level stepping the start end character ranges are used to highlight the expression within a line that is being executed p return index of the first character in the associated source element that corresponds to the current location of the instruction pointer in this stack frame or code 1 code if the information is unavailable exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 2 0  DebugException DebugException
Returns the index of the last character in the associated source element that corresponds to the current location of the instruction pointer in this stack frame or code 1 code if the information is unavailable p If a debug model supports expression level stepping the start end character ranges are used to highlight the expression within a line that is being executed p return index of the last character in the associated source element that corresponds to the current location of the instruction pointer in this stack frame or code 1 code if the information is unavailable exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 2 0  DebugException DebugException
Returns the name of this stack frame Name format is debug model specific and should be specified by a debug model return this frame s name exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException
Returns the register groups assigned to this stack frame or an empty collection if no register groups are assigned to this stack frame return the register groups assigned to this stack frame or an empty collection if no register groups are assigned to this stack frame exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 2 0  DebugException DebugException
Returns whether this stack frame contains any register groups return whether this stack frame contains any visible register groups exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 2 0  DebugException DebugException

public interface I Step Returns whether this element can currently perform a step into return whether this element can currently perform a step into  IStep
public boolean can Step Into Returns whether this element can currently perform a step over return whether this element can currently perform a step over  canStepInto
public boolean can Step Over Returns whether this element can currently perform a step return return whether this element can currently perform a step return  canStepOver
public boolean can Step Return Returns whether this element is currently stepping p For example a thread is considered to be stepping after the code step Over code call until the step over is completed a breakpoint is reached an exception is thrown or the thread or debug target is terminated p return whether this element is currently stepping  canStepReturn stepOver
public boolean is Stepping Steps into the current statement generating code RESUME code and code SUSPEND code events for the associated thread Can only be called when the associated thread is suspended Implementations must implement stepping as non blocking exception Debug Exception on failure Reasons include ul li TARGET REQUEST FAILED The request failed in the target li li NOT SUPPORTED The capability is not supported by the target li ul  isStepping DebugException TARGET_REQUEST_FAILED NOT_SUPPORTED
public void step Into throws Debug Exception Steps over the current statement generating code RESUME code and code SUSPEND code events for the associated thread Can only be called when the associated thread is suspended Implementations must implement stepping as non blocking exception Debug Exception on failure Reasons include ul li TARGET REQUEST FAILED The request failed in the target li li NOT SUPPORTED The capability is not supported by the target li ul  stepInto DebugException DebugException TARGET_REQUEST_FAILED NOT_SUPPORTED
public void step Over throws Debug Exception Steps to the next return statement in the current scope generating code RESUME code and code SUSPEND code events for the associated thread Can only be called when the associated thread is suspended Implementations must implement stepping as non blocking exception Debug Exception on failure Reasons include ul li TARGET REQUEST FAILED The request failed in the target li li NOT SUPPORTED The capability is not supported by the target li ul  stepOver DebugException DebugException TARGET_REQUEST_FAILED NOT_SUPPORTED

Returns whether this debug target supports step filters return whether this debug target supports step filters 
Returns whether step filters are currently enabled in this debug target return whether step filters are currently enabled in this debug target 
Sets whether step filters are enabled in this debug target param enabled whether step filters are enabled in this debug target 

public interface I Stream Monitor Adds the given listener to this stream monitor s registered listeners Has no effect if an identical listener is already registered param listener the listener to add  IStreamMonitor
public void add Listener I Stream Listener listener Returns the entire current contents of the stream An empty String is returned if the stream is empty return the stream contents as a code String code  addListener IStreamListener
public String get Contents Removes the given listener from this stream monitor s registered listeners Has no effect if the listener is not already registered param listener the listener to remove  getContents

public interface I Streams Proxy Returns a monitor for the error stream of this proxy s process or code null code if not supported The monitor is connected to the error stream of the associated process return an error stream monitor or code null code if none  IStreamsProxy
public I Stream Monitor get Error Stream Monitor Returns a monitor for the output stream of this proxy s process or code null code if not supported The monitor is connected to the output stream of the associated process return an output stream monitor or code null code if none  IStreamMonitor getErrorStreamMonitor
public I Stream Monitor get Output Stream Monitor Writes the given text to the output stream connected to the standard input stream of this proxy s process param input the text to be written exception IO Exception when an error occurs writing to the underlying code Output Stream code  IStreamMonitor getOutputStreamMonitor IOException OutputStream

public interface I Suspend Resume Returns whether this element can currently be resumed return whether this element can currently be resumed  ISuspendResume
public boolean can Resume Returns whether this element can currently be suspended return whether this element can currently be suspended  canResume
public boolean can Suspend Returns whether this element is currently suspended return whether this element is currently suspended  canSuspend
public boolean is Suspended Causes this element to resume its execution generating a code RESUME code event Has no effect on an element that is not suspended This call is non blocking exception Debug Exception on failure Reasons include ul li TARGET REQUEST FAILED The request failed in the target li NOT SUPPORTED The capability is not supported by the target ul  isSuspended DebugException TARGET_REQUEST_FAILED NOT_SUPPORTED
public void resume throws Debug Exception Causes this element to suspend its execution generating a code SUSPEND code event Has no effect on an already suspended element Implementations may be blocking or non blocking exception Debug Exception on failure Reasons include ul li TARGET REQUEST FAILED The request failed in the target li NOT SUPPORTED The capability is not supported by the target ul  DebugException DebugException TARGET_REQUEST_FAILED NOT_SUPPORTED

public interface I Terminate Returns whether this element can be terminated return whether this element can be terminated  ITerminate
public boolean can Terminate Returns whether this element is terminated return whether this element is terminated  canTerminate
public boolean is Terminated Causes this element to terminate generating a code TERMINATE code event Implementations may be blocking or non blocking exception Debug Exception on failure Reasons include ul li TARGET REQUEST FAILED The request failed in the target li NOT SUPPORTED The capability is not supported by the target ul  isTerminated DebugException TARGET_REQUEST_FAILED NOT_SUPPORTED

public interface I Thread extends I Debug Element I Suspend Resume I Step I Terminate Returns the stack frames contained in this thread An empty collection is returned if this thread contains no stack frames or is not currently suspended Stack frames are returned in top down order return a collection of stack frames exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 2 0  IThread IDebugElement ISuspendResume IStep ITerminate DebugException DebugException
Returns whether this thread currently contains any stack frames return whether this thread currently contains any stack frames exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 2 0  DebugException DebugException
Returns the priority of this thread The meaning of this number is operating system dependent return thread priority exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li  DebugException DebugException
public int get Priority throws Debug Exception Returns the top stack frame or code null code if there is currently no top stack frame return the top stack frame or code null code if none exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li  getPriority DebugException DebugException DebugException
public I Stack Frame get Top Stack Frame throws Debug Exception Returns the name of this thread Name format is debug model specific and should be specified by a debug model return this thread s name exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li  IStackFrame getTopStackFrame DebugException DebugException DebugException
Returns the breakpoints that caused this thread to suspend or an empty collection if this thread is not suspended or was not suspended by a breakpoint Usually a single breakpoint will be returned but this collection can contain more than one breakpoint if two breakpoints are at the same location in a program return the collection of breakpoints that caused this thread to suspend 

Returns a description of the type of data this value contains or references return the name of this value s reference type exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li  DebugException DebugException
Returns this value as a code String code return a String representation of this value exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li  DebugException DebugException
Returns whether this value is currently allocated p For example if this value represents an object that has been garbage collected code false code is returned p return whether this value is currently allocated exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li  DebugException DebugException
public boolean is Allocated throws Debug Exception Returns the visible variables in this value An empty collection is returned if there are no visible variables return an array of visible variables exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 2 0  isAllocated DebugException DebugException DebugException
Returns whether this value currently contains any visible variables return whether this value currently contains any visible variables exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 2 0  DebugException DebugException

Attempts to set the value of this variable to the value of the given expression param expression an expression to generate a new value exception Debug Exception on failure Reasons include ul li TARGET REQUEST FAILED The request failed in the target li NOT SUPPORTED The capability is not supported by the target ul  DebugException TARGET_REQUEST_FAILED NOT_SUPPORTED
Sets the value of this variable to the given value param value a new value exception Debug Exception on failure Reasons include ul li TARGET REQUEST FAILED The request failed in the target li NOT SUPPORTED The capability is not supported by the target ul since 2 0  DebugException TARGET_REQUEST_FAILED NOT_SUPPORTED
Returns whether this variable supports value modification return whether this variable supports value modification 
Returns whether the given expression is valid to be used in setting a new value for this variable param expression an expression to generate a new value return whether the expression is valid exception Debug Exception on failure Reasons include ul li TARGET REQUEST FAILED The request failed in the target li NOT SUPPORTED The capability is not supported by the target ul  DebugException TARGET_REQUEST_FAILED NOT_SUPPORTED
Returns whether the given value can be used as a new value for this variable param value a new value return whether the value is valid exception Debug Exception on failure Reasons include ul li TARGET REQUEST FAILED The request failed in the target li NOT SUPPORTED The capability is not supported by the target ul since 2 0  DebugException TARGET_REQUEST_FAILED NOT_SUPPORTED

public interface I Variable extends I Debug Element I Value Modification Returns the value of this variable return this variable s value exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li  IVariable IDebugElement IValueModification DebugException DebugException
public I Value get Value throws Debug Exception Returns the name of this variable Name format is debug model specific and should be specified by a debug model return this variable s name exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li  IValue getValue DebugException DebugException DebugException
public String get Name throws Debug Exception Returns a description of the type of data this variable is declared to reference Note that the declared type of a variable and the concrete type of its value are not neccessarily the same return the declared type of this variable exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li  getName DebugException DebugException DebugException
Returns whether this variable s value has changed since the last suspend event Implementations may choose whether the last suspend event is the last suspend event in this variable s debug target or within the thread s in which this variable is visible p Implementations that choose not to implement this function should always return code false code p return whether this variable s value has changed since the last suspend event exception Debug Exception if an exception occurs determining if this variable s value has changed since the last suspend event  DebugException

Updates this watch expression s value based on the current evaluation context This watch expression fires a debug change event when the evaluation is complete A watch expression can be asked to evaluate even when it is disabled Note that implementations should generally be asynchronous to avoid blocking the calling thread 
public void evaluate Sets the context for this watch expression or code null code if none If the given context is valid for this expression this expression may update its value When the value update is complete a debug change event is fired When code null code is specified as a context this expression may choose to retain its previous value p The context is usually one of but not limited to ul li a debug target code I Debug Target code li li a thread code I Thread code li li a stack frame code I Stack Frame code li ul p param context context in which to update this expression s value or code null code if none  IDebugTarget IThread IStackFrame
public void set Expression Context I Debug Element context Sets this watch expression s snippet of code This method causes the new snippet to be evaluated immediately in the expression s last context param expression Text the snippet which will be evaluated  setExpressionContext IDebugElement expressionText
public void set Expression Text String expression Text Returns whether the result of this watch expression is pending An expression is pending if an evaluation has been requested but the value has not yet been returned return whether this expression s result is pending  setExpressionText expressionText
public boolean is Pending Returns whether this expression is enabled An enabled expression will update its value A disabled expression will not return whether this expression is enabled  isPending
public boolean is Enabled Sets this expression s enabled state This method causes the new snippet to be evaluated immediately in the expression s last context param enabled whether this expression should be enabled  isEnabled

Evaluates the given expression in the given context asynchronously and notifies the given listener when the evaluation finishes param expression the expression to evaluate param context the context for the evaluation param listener the listener to notify when the evaluation completes 

Notifies the listener that an evaluation has completed param result the result of the evaluation 

public interface I Watch Expression Result Returns the value representing the result of the evaluation or code null code if the associated evaluation failed If the associated evaluation failed there will be problems or an exception in this result return the resulting value possibly code null code  IWatchExpressionResult
Returns whether the evaluation had any problems or if an exception occurred while performing the evaluation return whether there were any problems see get Error Messages see get Exception  getErrorMessages getException
Returns an array of problem messages Each message describes a problem that occurred while compiling the snippet return evaluation error messages or an empty array if no errors occurred 
Returns the expression that was evaluated return The string expression 
Returns any exception that occurred while performing the evaluation or code null code if an exception did not occur The exception will be a debug exception or a debug exception that wrappers a debug model specific exception that indicates a problem communicating with the target or with actually performing some action in the target return The exception that occurred during the evaluation see org eclipse debug core Debug Exception  DebugException

see org eclipse debug core model I Launch Configuration Delegate2 get Launch org eclipse debug core I Launch Configuration java lang String public I Launch get Launch I Launch Configuration configuration String mode throws Core Exception return null  ILaunchConfigurationDelegate2 getLaunch ILaunchConfiguration ILaunch getLaunch ILaunchConfiguration CoreException
public boolean build For Launch I Launch Configuration configuration String mode I Progress Monitor monitor throws Core Exception I Project projects get Build Order configuration mode if projects null return true build Projects projects monitor return false  buildForLaunch ILaunchConfiguration IProgressMonitor CoreException IProject getBuildOrder buildProjects
Returns the projects to build before launching the given launch configuration or code null code if the entire workspace should be built incrementally Subclasses should override as required param configuration the configuration being launched param mode launch mode return projects to build in build order or code null code throws Core Exception if an exception occurrs protected I Project get Build Order I Launch Configuration configuration String mode throws Core Exception return null  CoreException IProject getBuildOrder ILaunchConfiguration CoreException
Returns the set of projects to use when searching for errors or code null code if no search is to be done param configuration the configuration being launched param mode launch mode return a list of projects or code null code throws Core Exception if an exception occurrs protected I Project get Projects For Problem Search I Launch Configuration configuration String mode throws Core Exception return null  CoreException IProject getProjectsForProblemSearch ILaunchConfiguration CoreException
public boolean final Launch Check I Launch Configuration configuration String mode I Progress Monitor monitor throws Core Exception I Project projects get Projects For Problem Search configuration mode if projects null return true continue launch boolean continue Launch true monitor sub Task Debug Core Messages get String Launch Configuration Delegate 6 NON NLS 1 for int i 0 i projects length i monitor sub Task Debug Core Messages get String Launch Configuration Delegate 7 projects i get Name NON NLS 1 if exists Problems projects i I Status Handler prompter Debug Plugin get Default get Status Handler prompt Status if prompter null continue Launch Boolean prompter handle Status complile Error Prompt Status configuration boolean Value break return continue Launch  finalLaunchCheck ILaunchConfiguration IProgressMonitor CoreException IProject getProjectsForProblemSearch continueLaunch subTask DebugCoreMessages getString LaunchConfigurationDelegate subTask DebugCoreMessages getString LaunchConfigurationDelegate getName existsProblems IStatusHandler DebugPlugin getDefault getStatusHandler promptStatus continueLaunch handleStatus complileErrorPromptStatus booleanValue continueLaunch
public boolean pre Launch Check I Launch Configuration configuration String mode I Progress Monitor monitor throws Core Exception if mode equals I Launch Manager RUN MODE configuration supports Mode I Launch Manager DEBUG MODE I Breakpoint Manager breakpoint Manager Debug Plugin get Default get Breakpoint Manager if breakpoint Manager is Enabled no need to check breakpoints individually return true I Breakpoint breakpoints breakpoint Manager get Breakpoints for int i 0 i breakpoints length i if breakpoints i is Enabled I Status Handler prompter Debug Plugin get Default get Status Handler prompt Status if prompter null boolean lauch In Debug Mode Instead Boolean prompter handle Status switch To Debug Prompt Status configuration boolean Value if lauch In Debug Mode Instead return false kill this launch if no user prompt or user says to continue no need to check other breakpoints return true no enabled breakpoints continue launch return true  preLaunchCheck ILaunchConfiguration IProgressMonitor CoreException ILaunchManager RUN_MODE supportsMode ILaunchManager DEBUG_MODE IBreakpointManager breakpointManager DebugPlugin getDefault getBreakpointManager breakpointManager isEnabled IBreakpoint breakpointManager getBreakpoints isEnabled IStatusHandler DebugPlugin getDefault getStatusHandler promptStatus lauchInDebugModeInstead handleStatus switchToDebugPromptStatus booleanValue lauchInDebugModeInstead
Returns an array of projects in their suggested build order containing all of the projects specified by code base Projects code and all of their referenced projects param base Projects a collection of projetcs return an array of projects in their suggested build order containing all of the projects specified by code base Projects code throws Core Exception if an error occurs while computing referenced projects protected I Project compute Referenced Build Order I Project base Projects throws Core Exception Hash Set unordered Projects new Hash Set for int i 0 i base Projects length i unordered Projects add base Projects i add Referenced Projects base Projects i unordered Projects I Project project Set I Project unordered Projects to Array new I Project unordered Projects size return compute Build Order project Set  baseProjects baseProjects baseProjects CoreException IProject computeReferencedBuildOrder IProject baseProjects CoreException HashSet unorderedProjects HashSet baseProjects unorderedProjects baseProjects addReferencedProjects baseProjects unorderedProjects IProject projectSet IProject unorderedProjects toArray IProject unorderedProjects computeBuildOrder projectSet
Adds all projects referenced by code project code to the given set param project project param references set to which referenced projects are added throws Core Exception if an error occurs while computing referenced projects protected void add Referenced Projects I Project project Set references throws Core Exception if project is Open I Project projects project get Referenced Projects for int i 0 i projects length i I Project ref Project projects i if ref Project exists references contains ref Project references add ref Project add Referenced Projects ref Project references  CoreException addReferencedProjects IProject CoreException isOpen IProject getReferencedProjects IProject refProject refProject refProject refProject addReferencedProjects refProject
Returns a list of projects in their suggested build order from the given unordered list of projects param projects the list of projects to sort into build order return a new array containing all projects from code projects code sorted according to their build order protected I Project compute Build Order I Project projects String ordered Names Resources Plugin get Workspace get Description get Build Order if ordered Names null List ordered Projects new Array List projects length Projects may not be in the build order but should be built if selected List unordered Projects new Array List projects length for int i 0 i projects length i unordered Projects add projects i for int i 0 i ordered Names length i String project Name ordered Names i for Iterator iterator unordered Projects iterator iterator has Next I Project project I Project iterator next if project get Name equals project Name ordered Projects add project iterator remove break Add anything not specified before we return ordered Projects add All unordered Projects return I Project ordered Projects to Array new I Project ordered Projects size Computing build order returned null try the project prerequisite order I Workspace Project Order po Resources Plugin get Workspace compute Project Order projects return po projects  IProject computeBuildOrder IProject orderedNames ResourcesPlugin getWorkspace getDescription getBuildOrder orderedNames orderedProjects ArrayList unorderedProjects ArrayList unorderedProjects orderedNames projectName orderedNames unorderedProjects hasNext IProject IProject getName projectName orderedProjects orderedProjects addAll unorderedProjects IProject orderedProjects toArray IProject orderedProjects IWorkspace ProjectOrder ResourcesPlugin getWorkspace computeProjectOrder
Returns whether the given project contains any problem markers of the specified severity param proj the project to search return whether the given project contains any problems that should stop it from launching throws Core Exception if an error occurs while searching for problem markers protected boolean exists Problems I Project proj throws Core Exception I Marker markers proj find Markers I Marker PROBLEM true I Resource DEPTH INFINITE if markers length 0 for int i 0 i markers length i if is Launch Problem markers i return true return false  CoreException existsProblems IProject CoreException IMarker findMarkers IMarker IResource DEPTH_INFINITE isLaunchProblem
Returns whether the given problem should potentially abort the launch By default if the problem has an error severity the problem is considered a potential launch problem Subclasses may override to specialize error detection param problem Marker candidate problem return whether the given problem should potentially abort the launch throws Core Exception if any exceptions occurr while accessing marker attributes protected boolean is Launch Problem I Marker problem Marker throws Core Exception Integer severity Integer problem Marker get Attribute I Marker SEVERITY if severity null return severity int Value I Marker SEVERITY ERROR else return false  problemMarker CoreException isLaunchProblem IMarker problemMarker CoreException problemMarker getAttribute IMarker intValue IMarker SEVERITY_ERROR
Performs an incremental build on each of the given projects param projects projects to build param monitor progress monitor throws Core Exception if an exception occurrs while building protected void build Projects I Project projects I Progress Monitor monitor throws Core Exception for int i 0 i projects length i projects i build Incremental Project Builder INCREMENTAL BUILD monitor  CoreException buildProjects IProject IProgressMonitor CoreException IncrementalProjectBuilder INCREMENTAL_BUILD

see I Line Breakpoint get Line Number public int get Line Number throws Core Exception I Marker m get Marker if m null return m get Attribute I Marker LINE NUMBER 1 return 1  ILineBreakpoint getLineNumber getLineNumber CoreException IMarker getMarker getAttribute IMarker LINE_NUMBER
see I Line Breakpoint get Char Start public int get Char Start throws Core Exception I Marker m get Marker if m null return m get Attribute I Marker CHAR START 1 return 1  ILineBreakpoint getCharStart getCharStart CoreException IMarker getMarker getAttribute IMarker CHAR_START
see I Line Breakpoint get Char End public int get Char End throws Core Exception I Marker m get Marker if m null return m get Attribute I Marker CHAR END 1 return 1  ILineBreakpoint getCharEnd getCharEnd CoreException IMarker getMarker getAttribute IMarker CHAR_END

Constructs a Runtime Process on the given system process with the given name adding this process to the given launch param launch the launch this process will be parented by param process underlyig system process param name the label used for this process param attributes map of attributes used to initialize the attributes of this process or code null code if none public Runtime Process I Launch launch Process process String name Map attributes set Launch launch initialize Attributes attributes f Process process f Name name f Terminated true try process exit Value catch Illegal Thread State Exception e f Terminated false f Streams Proxy create Streams Proxy f Monitor new Process Monitor Job this launch add Process this fire Creation Event  RuntimeProcess RuntimeProcess ILaunch setLaunch initializeAttributes fProcess fName fTerminated exitValue IllegalThreadStateException fTerminated fStreamsProxy createStreamsProxy fMonitor ProcessMonitorJob addProcess fireCreationEvent
Initialize the attributes of this process to those in the given map param attributes attribute map or code null code if none private void initialize Attributes Map attributes if attributes null Iterator keys attributes key Set iterator while keys has Next String key String keys next set Attribute key String attributes get key  initializeAttributes keySet hasNext setAttribute
see I Terminate can Terminate public boolean can Terminate return f Terminated  ITerminate canTerminate canTerminate fTerminated
see I Process get Label public String get Label return f Name  IProcess getLabel getLabel fName
Sets the launch this process is contained in param launch the launch this process is contained in protected void set Launch I Launch launch f Launch launch  setLaunch ILaunch fLaunch
see I Process get Launch public I Launch get Launch return f Launch  IProcess getLaunch ILaunch getLaunch fLaunch
Returns the underlying system process associated with this process return system process protected Process get System Process return f Process  getSystemProcess fProcess
see I Terminate is Terminated public boolean is Terminated return f Terminated  ITerminate isTerminated isTerminated fTerminated
see I Terminate terminate public void terminate throws Debug Exception if is Terminated f Process destroy if f Streams Proxy instanceof Streams Proxy Streams Proxy f Streams Proxy kill int attempts 0 while attempts MAX WAIT FOR DEATH ATTEMPTS try if f Process null f Exit Value f Process exit Value throws exception if process not exited return catch Illegal Thread State Exception ie try Thread sleep TIME TO WAIT FOR THREAD DEATH catch Interrupted Exception e attempts clean up if f Monitor null f Monitor kill Job f Monitor null I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception TARGET REQUEST FAILED Debug Core Messages get String Runtime Process terminate failed null NON NLS 1 throw new Debug Exception status  ITerminate DebugException isTerminated fProcess fStreamsProxy StreamsProxy StreamsProxy fStreamsProxy MAX_WAIT_FOR_DEATH_ATTEMPTS fProcess fExitValue fProcess exitValue IllegalThreadStateException TIME_TO_WAIT_FOR_THREAD_DEATH InterruptedException fMonitor fMonitor killJob fMonitor IStatus IStatus DebugPlugin getUniqueIdentifier DebugException TARGET_REQUEST_FAILED DebugCoreMessages getString RuntimeProcess terminate_failed DebugException
Notification that the system process associated with this process has terminated protected void terminated if f Streams Proxy instanceof Streams Proxy Streams Proxy f Streams Proxy close f Terminated true try f Exit Value f Process exit Value catch Illegal Thread State Exception ie f Process null fire Terminate Event  fStreamsProxy StreamsProxy StreamsProxy fStreamsProxy fTerminated fExitValue fProcess exitValue IllegalThreadStateException fProcess fireTerminateEvent
see I Process get Streams Proxy public I Streams Proxy get Streams Proxy return f Streams Proxy  IProcess getStreamsProxy IStreamsProxy getStreamsProxy fStreamsProxy
Returns the streams proxy associated with this process return streams proxy protected I Streams Proxy create Streams Proxy return new Streams Proxy get System Process  IStreamsProxy createStreamsProxy StreamsProxy getSystemProcess
Fires a creation event protected void fire Creation Event fire Event new Debug Event this Debug Event CREATE  fireCreationEvent fireEvent DebugEvent DebugEvent
Fires the given debug event param event debug event to fire protected void fire Event Debug Event event Debug Plugin manager Debug Plugin get Default if manager null manager fire Debug Event Set new Debug Event event  fireEvent DebugEvent DebugPlugin DebugPlugin getDefault fireDebugEventSet DebugEvent
Fires a terminate event protected void fire Terminate Event fire Event new Debug Event this Debug Event TERMINATE  fireTerminateEvent fireEvent DebugEvent DebugEvent
Fires a change event protected void fire Change Event fire Event new Debug Event this Debug Event CHANGE  fireChangeEvent fireEvent DebugEvent DebugEvent
see I Process set Attribute String String public void set Attribute String key String value if f Attributes null f Attributes new Hash Map 5 Object orig Val f Attributes get key if orig Val null orig Val equals value return nothing changed f Attributes put key value fire Change Event  IProcess setAttribute setAttribute fAttributes fAttributes HashMap origVal fAttributes origVal origVal fAttributes fireChangeEvent
see I Process get Attribute String public String get Attribute String key if f Attributes null return null return String f Attributes get key  IProcess getAttribute getAttribute fAttributes fAttributes
public Object get Adapter Class adapter if adapter equals I Process class return this if adapter equals I Debug Target class I Launch launch get Launch I Debug Target targets launch get Debug Targets for int i 0 i targets length i if this equals targets i get Process return targets i return null return super get Adapter adapter  getAdapter IProcess IDebugTarget ILaunch getLaunch IDebugTarget getDebugTargets getProcess getAdapter
see I Process get Exit Value public int get Exit Value throws Debug Exception if is Terminated return f Exit Value throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception TARGET REQUEST FAILED Debug Core Messages get String Runtime Process Exit value not available until process terminates  1 null NON NLS 1  IProcess getExitValue getExitValue DebugException isTerminated fExitValue DebugException IStatus DebugPlugin getUniqueIdentifier DebugException TARGET_REQUEST_FAILED DebugCoreMessages getString RuntimeProcess Exit_value_not_available_until_process_terminates _1
public I Status run I Progress Monitor monitor f Thread Thread current Thread while fOS Process null try fOS Process wait For catch Interrupted Exception ie clear interrupted state Thread interrupted finally fOS Process null f Runtime Process terminated f Thread null return Status OK STATUS  IStatus IProgressMonitor fThread currentThread fOSProcess fOSProcess waitFor InterruptedException fOSProcess fRuntimeProcess fThread OK_STATUS
Creates a new process monitor and starts monitoring the process for termination public Process Monitor Job Runtime Process process super Debug Core Messages get String Process Monitor Job 0 NON NLS 1 set Priority Job INTERACTIVE set System true f Runtime Process process fOS Process process get System Process schedule  ProcessMonitorJob RuntimeProcess DebugCoreMessages getString ProcessMonitorJob setPriority setSystem fRuntimeProcess fOSProcess getSystemProcess
Kills the monitoring thread This method is to be useful for dealing with the error case of an underlying process which has not informed this monitor of its termination protected void kill Job if f Thread null cancel else f Thread interrupt  killJob fThread fThread

private Object f Element null Source Lookup Query Object element f Element element  fElement SourceLookupQuery fElement
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception Debug Plugin log exception  ISafeRunnable handleException handleException DebugPlugin
public void run throws Exception Multi Status multi Status null Core Exception single null for int i 0 i f Participants size i Object source Array try source Array I Source Lookup Participant f Participants get i find Source Elements f Element if source Array null source Array length 0 if is Find Duplicates for int j 0 j source Array length j if check Duplicate source Array j f Source Elements f Source Elements add source Array j else f Source Elements add source Array 0 return catch Core Exception e if single null single e else if multi Status null multi Status new Multi Status Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR new I Status single get Status Source Lookup Messages get String Abstract Source Lookup Director 19 null NON NLS 1 multi Status add e get Status else multi Status add e get Status if f Source Elements is Empty throw exception if there was one if multi Status null throw new Core Exception multi Status else if single null throw single  MultiStatus multiStatus CoreException fParticipants sourceArray sourceArray ISourceLookupParticipant fParticipants findSourceElements fElement sourceArray sourceArray isFindDuplicates sourceArray checkDuplicate sourceArray fSourceElements fSourceElements sourceArray fSourceElements sourceArray CoreException multiStatus multiStatus MultiStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR IStatus getStatus SourceLookupMessages getString AbstractSourceLookupDirector multiStatus getStatus multiStatus getStatus fSourceElements isEmpty multiStatus CoreException multiStatus
public List get Source Elements return f Source Elements  getSourceElements fSourceElements
public void dispose f Element null f Source Elements null  fElement fSourceElements
Constructs source lookup director public Abstract Source Lookup Director  AbstractSourceLookupDirector
Sets the type identifier for this source locator s type param id corresponds to source locator type identifier for a persistable source locator public void set Id String id f Id id  setId fId
public void dispose I Launch Manager launch Manager Debug Plugin get Default get Launch Manager launch Manager remove Launch Configuration Listener this launch Manager remove Launch Listener this Iterator iterator f Participants iterator while iterator has Next I Source Lookup Participant participant I Source Lookup Participant iterator next director may also be a participant if participant this participant dispose f Participants clear if f Source Containers null for int i 0 i f Source Containers length i f Source Containers i dispose f Source Containers null f Resolved Elements null  ILaunchManager launchManager DebugPlugin getDefault getLaunchManager launchManager removeLaunchConfigurationListener launchManager removeLaunchListener fParticipants hasNext ISourceLookupParticipant ISourceLookupParticipant fParticipants fSourceContainers fSourceContainers fSourceContainers fSourceContainers fResolvedElements
Throws an exception with the given message and underlying exception param message error message param exception underlying exception or code null code throws Core Exception protected void abort String message Throwable exception throws Core Exception I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR message exception throw new Core Exception status  CoreException CoreException IStatus IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR CoreException
Constructs source containers from a list of container mementos param list the list of nodes to be parsed exception Core Exception if parsing encounters an error return a list of source containers private List parse Source Containers Node List list throws Core Exception List containers new Array List for int i 0 i list get Length i if list item i get Node Type Node ELEMENT NODE continue Element element Element list item i String type Id element get Attribute CONTAINER TYPE ATTR if type Id null type Id equals NON NLS 1 abort Source Lookup Messages get String Abstract Source Lookup Director 11 null NON NLS 1 I Source Container Type type Debug Plugin get Default get Launch Manager get Source Container Type type Id if type null abort Message Format format Source Lookup Messages get String Abstract Source Lookup Director 12 new String type Id null NON NLS 1 String memento element get Attribute CONTAINER MEMENTO ATTR if memento null memento equals NON NLS 1 abort Source Lookup Messages get String Abstract Source Lookup Director 13 null NON NLS 1 I Source Container container type create Source Container memento containers add container return containers  CoreException parseSourceContainers NodeList CoreException ArrayList getLength getNodeType ELEMENT_NODE typeId getAttribute CONTAINER_TYPE_ATTR typeId typeId SourceLookupMessages getString AbstractSourceLookupDirector ISourceContainerType DebugPlugin getDefault getLaunchManager getSourceContainerType typeId MessageFormat SourceLookupMessages getString AbstractSourceLookupDirector typeId getAttribute CONTAINER_MEMENTO_ATTR SourceLookupMessages getString AbstractSourceLookupDirector ISourceContainer createSourceContainer
Registers the given source lookup participant Has no effect if an identical participant is already registered Paticipants receive notification when the source containers associated with this source director change param participant the particiapant to register private void add Source Lookup Participant I Source Lookup Participant participant if f Participants contains participant f Participants add participant participant init this  addSourceLookupParticipant ISourceLookupParticipant fParticipants fParticipants
public I Source Container get Source Containers if f Source Containers null return new I Source Container 0 I Source Container copy new I Source Container f Source Containers length System arraycopy f Source Containers 0 copy 0 f Source Containers length return copy  ISourceContainer getSourceContainers fSourceContainers ISourceContainer ISourceContainer ISourceContainer fSourceContainers fSourceContainers fSourceContainers
see org eclipse debug internal core sourcelookup I Source Lookup Director is Find Duplicates public boolean is Find Duplicates return f Duplicates  ISourceLookupDirector isFindDuplicates isFindDuplicates fDuplicates
Sets whether source containers should be searched exhaustively for applicable source elements or if only the first match should be located param duplicates whether source containers should be searched exhaustively for applicable source elements or if only the first match should be located public void set Find Duplicates boolean duplicates f Duplicates duplicates  setFindDuplicates fDuplicates
Removes the given participant from the list of registered partipants Has no effect if an identical participant is not already registered param participant the participant to remove private void remove Source Lookup Participant I Source Lookup Participant participant if f Participants remove participant participant dispose  removeSourceLookupParticipant ISourceLookupParticipant fParticipants
see org eclipse debug core I Launch Configuration Listener launch Configuration Added org eclipse debug core I Launch Configuration public void launch Configuration Added I Launch Configuration configuration  ILaunchConfigurationListener launchConfigurationAdded ILaunchConfiguration launchConfigurationAdded ILaunchConfiguration
public void launch Configuration Changed I Launch Configuration configuration if f Config null configuration is Working Copy return if f Config equals configuration try String locator Memento configuration get Attribute I Launch Configuration ATTR SOURCE LOCATOR MEMENTO String null if locator Memento null initialize Defaults configuration else initialize From Memento locator Memento configuration catch Core Exception e  launchConfigurationChanged ILaunchConfiguration fConfig isWorkingCopy fConfig locatorMemento getAttribute ILaunchConfiguration ATTR_SOURCE_LOCATOR_MEMENTO locatorMemento initializeDefaults initializeFromMemento locatorMemento CoreException
see org eclipse debug core I Launch Configuration Listener launch Configuration Removed org eclipse debug core I Launch Configuration public void launch Configuration Removed I Launch Configuration configuration  ILaunchConfigurationListener launchConfigurationRemoved ILaunchConfiguration launchConfigurationRemoved ILaunchConfiguration
public String get Memento throws Core Exception Document doc Debug Plugin new Document Element root Node doc create Element DIRECTOR ROOT NODE doc append Child root Node Element path Node doc create Element CONTAINERS NODE if f Duplicates path Node set Attribute DUPLICATES ATTR true NON NLS 1 else path Node set Attribute DUPLICATES ATTR false NON NLS 1 root Node append Child path Node if f Source Containers null for int i 0 i f Source Containers length i Element node doc create Element CONTAINER NODE I Source Container container f Source Containers i I Source Container Type type container get Type node set Attribute CONTAINER TYPE ATTR type get Id node set Attribute CONTAINER MEMENTO ATTR type get Memento container path Node append Child node return Debug Plugin serialize Document doc  getMemento CoreException DebugPlugin newDocument rootNode createElement DIRECTOR_ROOT_NODE appendChild rootNode pathNode createElement CONTAINERS_NODE fDuplicates pathNode setAttribute DUPLICATES_ATTR pathNode setAttribute DUPLICATES_ATTR rootNode appendChild pathNode fSourceContainers fSourceContainers createElement CONTAINER_NODE ISourceContainer fSourceContainers ISourceContainerType getType setAttribute CONTAINER_TYPE_ATTR getId setAttribute CONTAINER_MEMENTO_ATTR getMemento pathNode appendChild DebugPlugin serializeDocument
public void initialize From Memento String memento throws Core Exception dispose Element root Element Debug Plugin parse Document memento if root Element get Node Name equals Ignore Case DIRECTOR ROOT NODE abort Source Lookup Messages get String Abstract Source Lookup Director 14 null NON NLS 1 Node List list root Element get Child Nodes int length list get Length for int i 0 i length i Node node list item i short type node get Node Type if type Node ELEMENT NODE Element entry Element node if entry get Node Name equals Ignore Case CONTAINERS NODE set Find Duplicates true equals entry get Attribute DUPLICATES ATTR NON NLS 1 Node List children entry get Child Nodes List containers parse Source Containers children set Source Containers I Source Container containers to Array new I Source Container containers size initialize Participants  initializeFromMemento CoreException rootElement DebugPlugin parseDocument rootElement getNodeName equalsIgnoreCase DIRECTOR_ROOT_NODE SourceLookupMessages getString AbstractSourceLookupDirector NodeList rootElement getChildNodes getLength getNodeType ELEMENT_NODE getNodeName equalsIgnoreCase CONTAINERS_NODE setFindDuplicates getAttribute DUPLICATES_ATTR NodeList getChildNodes parseSourceContainers setSourceContainers ISourceContainer toArray ISourceContainer initializeParticipants
Sets the source containers used by this source lookup director param containers source containers to search public void set Source Containers I Source Container containers I Source Container old get Source Containers for int i 0 i old length i old i dispose f Source Containers containers for int i 0 i containers length i I Source Container container containers i container init this clear resolved duplicates f Resolved Elements null notify participants I Source Lookup Participant participants get Participants for int i 0 i participants length i I Source Lookup Participant participant participants i participant source Containers Changed this  setSourceContainers ISourceContainer ISourceContainer getSourceContainers fSourceContainers ISourceContainer fResolvedElements ISourceLookupParticipant getParticipants ISourceLookupParticipant sourceContainersChanged
Would be better to accept Object so this can be used for breakpoints and other objects public Object get Source Element I Stack Frame stack Frame return get Source Element Object stack Frame  getSourceElement IStackFrame stackFrame getSourceElement stackFrame
Performs a source lookup query for the given element returning the source elements associated with the element param element stack frame return list of associated source elements protected List do Source Lookup Object element Source Lookup Query query new Source Lookup Query element Platform run query List sources query get Source Elements query dispose return sources  doSourceLookup SourceLookupQuery SourceLookupQuery getSourceElements
Returns the source element to associate with the given element This method is called when more than one source element has been found for an element and allows the source director to select a single source element to associate with the element p Subclasses should override this method as appropriate For example to prompt the user to choose a source element p param element the debug artifact for which source is being searched for param sources the source elements found for the given element return a single source element for the given element public Object resolve Source Element Object element List sources check the duplicates cache first Iterator duplicates sources iterator while duplicates has Next Object dup duplicates next Object resolved get Cached Element dup if resolved null return resolved consult a status handler I Status Handler prompter Debug Plugin get Default get Status Handler f Prompt Status if prompter null try Object result prompter handle Status f Resolve Duplicates Status new Object element sources if result null cache Resolved Element sources result return result catch Core Exception e return sources get 0  resolveSourceElement hasNext getCachedElement IStatusHandler DebugPlugin getDefault getStatusHandler fPromptStatus handleStatus fResolveDuplicatesStatus cacheResolvedElement CoreException
Checks if the object being added to the list of sources is a duplicate of what s already in the list param source To Add the new source file to be added param sources the list that the source will be compared against return true if it is already in the list false if it is a new object private boolean check Duplicate Object source To Add List sources if sources size 0 return false Iterator iterator sources iterator while iterator has Next if iterator next equals source To Add return true return false  sourceToAdd checkDuplicate sourceToAdd hasNext sourceToAdd
see org eclipse debug internal core sourcelookup I Persistable Source Lookup Director initialize From Memento java lang String org eclipse debug core I Launch Configuration public void initialize From Memento String memento I Launch Configuration configuration throws Core Exception set Launch Configuration configuration initialize From Memento memento  IPersistableSourceLookupDirector initializeFromMemento ILaunchConfiguration initializeFromMemento ILaunchConfiguration CoreException setLaunchConfiguration initializeFromMemento
public void initialize Defaults I Launch Configuration configuration throws Core Exception dispose set Launch Configuration configuration set Source Containers new I Source Container new Default Source Container initialize Participants  initializeDefaults ILaunchConfiguration CoreException setLaunchConfiguration setSourceContainers ISourceContainer DefaultSourceContainer initializeParticipants
see org eclipse debug internal core sourcelookup I Source Lookup Director get Launch Configuration public I Launch Configuration get Launch Configuration return f Config  ISourceLookupDirector getLaunchConfiguration ILaunchConfiguration getLaunchConfiguration fConfig
Sets the launch configuration associated with this source lookup director If the given configuration is a working copy this director will respond to changes the working copy If the given configuration is a persisted launch configration this director will respond to changes in the persisted launch configuration param configuration launch configuration to associate with this source lookup director or code null code if none protected void set Launch Configuration I Launch Configuration configuration f Config configuration I Launch Manager launch Manager Debug Plugin get Default get Launch Manager launch Manager add Launch Configuration Listener this launch Manager add Launch Listener this  setLaunchConfiguration ILaunchConfiguration fConfig ILaunchManager launchManager DebugPlugin getDefault getLaunchManager launchManager addLaunchConfigurationListener launchManager addLaunchListener
see org eclipse debug core I Launch Listener launch Added org eclipse debug core I Launch public void launch Added I Launch launch  ILaunchListener launchAdded ILaunch launchAdded ILaunch
see org eclipse debug core I Launch Listener launch Changed org eclipse debug core I Launch public void launch Changed I Launch launch  ILaunchListener launchChanged ILaunch launchChanged ILaunch
public void launch Removed I Launch launch if this equals launch get Source Locator dispose  launchRemoved ILaunch getSourceLocator
see org eclipse debug internal core sourcelookup I Source Lookup Director get Participants public I Source Lookup Participant get Participants return I Source Lookup Participant f Participants to Array new I Source Lookup Participant f Participants size  ISourceLookupDirector getParticipants ISourceLookupParticipant getParticipants ISourceLookupParticipant fParticipants toArray ISourceLookupParticipant fParticipants
see org eclipse debug internal core sourcelookup I Source Lookup Director supports Source Container Type org eclipse debug internal core sourcelookup I Source Container Type public boolean supports Source Container Type I Source Container Type type return true  ISourceLookupDirector supportsSourceContainerType ISourceContainerType supportsSourceContainerType ISourceContainerType
Caches the resolved source element to use when one of the following duplicates is found param duplicates duplicates source elemnets param source Element chosen source element to use in place of the duplicates protected void cache Resolved Element List duplicates Object source Element if f Resolved Elements null f Resolved Elements new Hash Map 10 Iterator iterator duplicates iterator while iterator has Next Object dup iterator next f Resolved Elements put dup source Element  sourceElement cacheResolvedElement sourceElement fResolvedElements fResolvedElements HashMap hasNext fResolvedElements sourceElement
Returns the cached source element to use when the given duplicate is encountered param duplicate duplicates source element return element to use in the duplicate s place protected Object get Cached Element Object duplicate if f Resolved Elements null return f Resolved Elements get duplicate return null  getCachedElement fResolvedElements fResolvedElements
Clears any cached source element associated with the given duplicate is source elemnet param duplicate duplicate source element to cache resolved results for protected void clear Cached Element Object duplicate if f Resolved Elements null f Resolved Elements remove duplicate  clearCachedElement fResolvedElements fResolvedElements
public void clear Source Elements Object element List list do Source Lookup element if list size 0 Iterator iterator list iterator while iterator has Next clear Cached Element iterator next  clearSourceElements doSourceLookup hasNext clearCachedElement
public void add Participants I Source Lookup Participant participants for int i 0 i participants length i I Source Lookup Participant participant participants i add Source Lookup Participant participant participant source Containers Changed this  addParticipants ISourceLookupParticipant ISourceLookupParticipant addSourceLookupParticipant sourceContainersChanged
public void remove Participants I Source Lookup Participant participants for int i 0 i participants length i remove Source Lookup Participant participants i  removeParticipants ISourceLookupParticipant removeSourceLookupParticipant
see org eclipse debug internal core sourcelookup I Source Lookup Director get Id public String get Id return f Id  ISourceLookupDirector getId getId fId
public I Source Path Computer get Source Path Computer if f Computer null get Launch Configuration null try return Debug Plugin get Default get Launch Manager get Source Path Computer get Launch Configuration catch Core Exception e return f Computer  ISourcePathComputer getSourcePathComputer fComputer getLaunchConfiguration DebugPlugin getDefault getLaunchManager getSourcePathComputer getLaunchConfiguration CoreException fComputer
see org eclipse debug core sourcelookup I Source Lookup Director set Source Path Computer org eclipse debug core sourcelookup I Source Path Computer public void set Source Path Computer I Source Path Computer computer f Computer computer  ISourceLookupDirector setSourcePathComputer ISourcePathComputer setSourcePathComputer ISourcePathComputer fComputer
public Object find Source Elements Object object throws Core Exception Source Lookup Query query new Source Lookup Query object Platform run query List sources query get Source Elements query dispose return sources to Array  findSourceElements CoreException SourceLookupQuery SourceLookupQuery getSourceElements toArray
public Object get Source Element Object element List sources do Source Lookup element if sources size 1 return sources get 0 else if sources size 1 return resolve Source Element element sources else return null  getSourceElement doSourceLookup resolveSourceElement

see org eclipse debug internal core sourcelookup I Source Lookup Participant init org eclipse debug internal core sourcelookup I Source Lookup Director public void init I Source Lookup Director director f Director director  ISourceLookupParticipant ISourceLookupDirector ISourceLookupDirector fDirector
see org eclipse debug internal core sourcelookup I Source Lookup Participant dispose public void dispose f Director null  ISourceLookupParticipant fDirector
public Object find Source Elements Object object throws Core Exception List results null if is Find Duplicates results new Array List String name get Source Name object if name null I Source Container containers get Source Containers for int i 0 i containers length i I Source Container container get Delegate Container containers i if container null Object objects container find Source Elements name if objects length 0 if is Find Duplicates for int j 0 j objects length j results add objects j else if objects length 1 return objects return new Object objects 0 if results null return EMPTY return results to Array  findSourceElements CoreException isFindDuplicates ArrayList getSourceName ISourceContainer getSourceContainers ISourceContainer getDelegateContainer findSourceElements isFindDuplicates toArray
Returns the source container to search in place of the given source container or code null code if the given source container is not to be searched The default implementation does not translate source containers Subclasses should override if required param container the source container about to be searched proxy return the source container to be searched delegate or code null code if the source container should not be searched protected I Source Container get Delegate Container I Source Container container return container  ISourceContainer getDelegateContainer ISourceContainer
Returns the source lookup director this participant is registered with or code null code if none return the source lookup director this participant is registered with or code null code if none protected I Source Lookup Director get Director return f Director  ISourceLookupDirector getDirector fDirector
Returns whether this participant s source lookup director is configured to search for duplicate source elements return whether this participant s source lookup director is configured to search for duplicate source elements protected boolean is Find Duplicates return get Director is Find Duplicates  isFindDuplicates getDirector isFindDuplicates
Returns the source containers currently registered with this participant s source lookup director return the source containers currently registered with this participant s source lookup director protected I Source Container get Source Containers return get Director get Source Containers  ISourceContainer getSourceContainers getDirector getSourceContainers
see org eclipse debug internal core sourcelookup I Source Lookup Participant source Containers Changed org eclipse debug internal core sourcelookup I Source Lookup Director public void source Containers Changed I Source Lookup Director director  ISourceLookupParticipant sourceContainersChanged ISourceLookupDirector sourceContainersChanged ISourceLookupDirector

Throws an exception with the given message and underlying exception param message error message param exception underlying exception or code null code throws Core Exception protected void abort String message Throwable exception throws Core Exception I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR message exception throw new Core Exception status  CoreException CoreException IStatus IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR CoreException
see org eclipse debug internal core sourcelookup I Source Container dispose public void dispose f Director null  ISourceContainer fDirector
see org eclipse debug internal core sourcelookup I Source Container get Source Containers public I Source Container get Source Containers throws Core Exception return new I Source Container 0  ISourceContainer getSourceContainers ISourceContainer getSourceContainers CoreException ISourceContainer
see org eclipse debug internal core sourcelookup I Source Container is Composite public boolean is Composite return false  ISourceContainer isComposite isComposite
see org eclipse debug internal core sourcelookup I Source Container init org eclipse debug internal core sourcelookup I Source Lookup Director public void init I Source Lookup Director director f Director director  ISourceContainer ISourceLookupDirector ISourceLookupDirector fDirector
Returns the source lookup director this source container registered in or code null code if none return the source lookup director this source container registered in or code null code if none protected I Source Lookup Director get Director return f Director  ISourceLookupDirector getDirector fDirector
Returns whether this container s source lookup director is configured to search for duplicate source elements return whether this container s source lookup director is configured to search for duplicate source elements protected boolean is Find Duplicates return get Director is Find Duplicates  isFindDuplicates getDirector isFindDuplicates
Returns the source container type identified by the given id or code null code if none param id source container type identifier return source container type or code null code protected I Source Container Type get Source Container Type String id return Debug Plugin get Default get Launch Manager get Source Container Type id  ISourceContainerType getSourceContainerType DebugPlugin getDefault getLaunchManager getSourceContainerType

Throws an exception with the given message and underlying exception param message error message param exception underlying exception or code null code throws Core Exception protected void abort String message Throwable exception throws Core Exception I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR message exception throw new Core Exception status  CoreException CoreException IStatus IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR CoreException
Creates and returns a new XML document return a new XML document throws Core Exception if unable to create a new document protected Document new Document throws Core Exception return Debug Plugin new Document  CoreException newDocument CoreException DebugPlugin newDocument
Returns the given XML document as a string param document document to serialize return the given XML document as a string throws Core Exception if unable to serialize the document protected String serialize Document Document document throws Core Exception return Debug Plugin serialize Document document  CoreException serializeDocument CoreException DebugPlugin serializeDocument
Parses the given XML document returning its root element param document XML document as a string return the document s root element throws Core Exception if unable to parse the document protected Element parse Document String document throws Core Exception return Debug Plugin parse Document document  CoreException parseDocument CoreException DebugPlugin parseDocument

Creates an archive source container on the given file param archive archive in the workspace param detect Root Path whether a root path should be detected When code true code searching is performed relative to a root path within the archive based on fully qualified file names The root path is automatically determined when the first successful search is performed For example when searching for a file named code a b c d code and an entry in the archive named code r a b c d code exists the root path is set to code r code From that point on searching is performed relative to code r code When code false code searching is performed by matching file names as suffixes to the entries in the archive public Archive Source Container I File archive boolean detect Root Path super archive get Location toOS String detect Root Path f File archive  detectRootPath ArchiveSourceContainer IFile detectRootPath getLocation toOSString detectRootPath fFile
see org eclipse debug internal core sourcelookup I Source Container get Name public String get Name return f File get Name  ISourceContainer getName getName fFile getName
Returns the associated file in the workspace return associated file in the workspace public I File get File return f File  IFile getFile fFile
see org eclipse debug internal core sourcelookup I Source Container get Type public I Source Container Type get Type return get Source Container Type TYPE ID  ISourceContainer getType ISourceContainerType getType getSourceContainerType TYPE_ID
see java lang Object equals java lang Object public boolean equals Object obj return obj instanceof Archive Source Container Archive Source Container obj get Name equals get Name  ArchiveSourceContainer ArchiveSourceContainer getName getName
see java lang Object hash Code public int hash Code return get Name hash Code  hashCode hashCode getName hashCode

see org eclipse debug internal core sourcelookup I Source Container is Composite public boolean is Composite return true  ISourceContainer isComposite isComposite
see org eclipse debug internal core sourcelookup I Source Container find Source Elements java lang String public Object find Source Elements String name throws Core Exception return find Source Elements name get Source Containers  ISourceContainer findSourceElements findSourceElements CoreException findSourceElements getSourceContainers
Returns a collection of source elements in the given containers corresponding to the given name Returns an empty collection if no source elements are found This source container s source lookup director specifies if duplicate source elements should be searched for via code is Find Duplicates code When code false code the returned collection should contain at most one source element If this is a composite container the containers contained by this container are also searched p The format of the given name is implementation specific but generally conforms to the format of a file name If a source container does not recognize the name format provided an empty collection should be returned A source container may or may not require names to be fully qualified i e be qualified with directory names p param name the name of the source element to search for param containers the containers to search return a collection of source elements corresponding to the given name exception Core Exception if an exception occurrs while searching for source elements protected Object find Source Elements String name I Source Container containers throws Core Exception List results null Core Exception single null Multi Status multi Status null if is Find Duplicates results new Array List for int i 0 i containers length i I Source Container container containers i try Object objects container find Source Elements name if objects length 0 if is Find Duplicates for int j 0 j objects length j results add objects j else if objects length 1 return objects return new Object objects 0 catch Core Exception e if single null single e else if multi Status null multi Status new Multi Status Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR new I Status single get Status Source Lookup Messages get String Composite Source Container 0 null NON NLS 1 multi Status add e get Status else multi Status add e get Status if results null if multi Status null throw new Core Exception multi Status else if single null throw single return EMPTY return results to Array  isFindDuplicates CoreException findSourceElements ISourceContainer CoreException CoreException MultiStatus multiStatus isFindDuplicates ArrayList ISourceContainer findSourceElements isFindDuplicates CoreException multiStatus multiStatus MultiStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR IStatus getStatus SourceLookupMessages getString CompositeSourceContainer multiStatus getStatus multiStatus getStatus multiStatus CoreException multiStatus toArray
Creates the source containers in this composite container Subclasses should override this methods throws Core Exception if unable to create the containers  CoreException
public I Source Container get Source Containers throws Core Exception if f Containers null f Containers create Source Containers for int i 0 i f Containers length i I Source Container container f Containers i container init get Director return f Containers  ISourceContainer getSourceContainers CoreException fContainers fContainers createSourceContainers fContainers ISourceContainer fContainers getDirector fContainers
public void dispose super dispose if f Containers null for int i 0 i f Containers length i I Source Container container f Containers i container dispose f Containers null  fContainers fContainers ISourceContainer fContainers fContainers

Constructs a default source container public Default Source Container  DefaultSourceContainer
see java lang Object equals java lang Object public boolean equals Object obj return obj instanceof Default Source Container  DefaultSourceContainer
see java lang Object hash Code public int hash Code return get Class hash Code  hashCode hashCode getClass hashCode
Returns the launch configuration for which a default source lookup path will be computed or code null code if none return the launch configuration for which a default source lookup path will be computed or code null code protected I Launch Configuration get Launch Configuration I Source Lookup Director director get Director if director null return director get Launch Configuration return null  ILaunchConfiguration getLaunchConfiguration ISourceLookupDirector getDirector getLaunchConfiguration
see org eclipse debug internal core sourcelookup I Source Container get Type public I Source Container Type get Type return get Source Container Type TYPE ID  ISourceContainer getType ISourceContainerType getType getSourceContainerType TYPE_ID
Returns the source path computer to use or code null code if none return the source path computer to use or code null code if none private I Source Path Computer get Source Path Computer return get Director get Source Path Computer  ISourcePathComputer getSourcePathComputer getDirector getSourcePathComputer
see org eclipse debug internal core sourcelookup I Source Container get Name public String get Name return Source Lookup Messages get String Default Source Container 0 NON NLS 1  ISourceContainer getName getName SourceLookupMessages getString DefaultSourceContainer
protected I Source Container create Source Containers throws Core Exception I Source Path Computer source Path Computer get Source Path Computer if source Path Computer null return new I Source Container 0 return source Path Computer compute Source Containers get Launch Configuration null  ISourceContainer createSourceContainers CoreException ISourcePathComputer sourcePathComputer getSourcePathComputer sourcePathComputer ISourceContainer sourcePathComputer computeSourceContainers getLaunchConfiguration

Consutructs an external folder container for the directory identified by the given path param dir Path path to a directory in the local file system param subfolders whether folders within the root directory should be searched for source elements public Directory Source Container I Path dir Path boolean subfolders this dir Path to File subfolders  dirPath DirectorySourceContainer IPath dirPath dirPath toFile
Consutructs an external folder container for the directory identified by the given file param dir a directory in the local file system param subfolders whether folders within the root directory should be searched for source elements public Directory Source Container File dir boolean subfolders f Directory dir f Subfolders subfolders  DirectorySourceContainer fDirectory fSubfolders
see org eclipse debug internal core sourcelookup I Source Container get Name public String get Name return f Directory get Name  ISourceContainer getName getName fDirectory getName
Returns the root directory in the local file system associated with this source container return the root directory in the local file system associated with this source container public File get Directory return f Directory  getDirectory fDirectory
see org eclipse debug internal core sourcelookup I Source Container get Type public I Source Container Type get Type return get Source Container Type TYPE ID  ISourceContainer getType ISourceContainerType getType getSourceContainerType TYPE_ID
public Object find Source Elements String name throws Core Exception Array List sources new Array List File directory get Directory File file new File directory name if file exists file is File sources add new Local File Storage file check subfolders if is Find Duplicates f Subfolders sources is Empty f Subfolders I Source Container containers get Source Containers for int i 0 i containers length i Object objects containers i find Source Elements name if objects null objects length 0 continue if is Find Duplicates for int j 0 j objects length j sources add objects j else sources add objects 0 break if sources is Empty return EMPTY return sources to Array  findSourceElements CoreException ArrayList ArrayList getDirectory isFile LocalFileStorage isFindDuplicates fSubfolders isEmpty fSubfolders ISourceContainer getSourceContainers findSourceElements isFindDuplicates isEmpty toArray
see org eclipse debug internal core sourcelookup I Source Container is Composite public boolean is Composite return f Subfolders  ISourceContainer isComposite isComposite fSubfolders
public boolean equals Object obj if obj instanceof Directory Source Container Directory Source Container container Directory Source Container obj return container get Directory equals get Directory return false  DirectorySourceContainer DirectorySourceContainer DirectorySourceContainer getDirectory getDirectory
see java lang Object hash Code public int hash Code return get Directory hash Code  hashCode hashCode getDirectory hashCode
protected I Source Container create Source Containers throws Core Exception if is Composite String files f Directory list if files null List dirs new Array List for int i 0 i files length i String name files i File file new File get Directory name if file exists file is Directory dirs add new Directory Source Container file true I Source Container containers I Source Container dirs to Array new I Source Container dirs size for int i 0 i containers length i I Source Container container containers i container init get Director return containers return new I Source Container 0  ISourceContainer createSourceContainers CoreException isComposite fDirectory ArrayList getDirectory isDirectory DirectorySourceContainer ISourceContainer ISourceContainer toArray ISourceContainer ISourceContainer getDirector ISourceContainer

Creates an archive source container on the archive at the specified location in the local file system param archive Path path to the archive in the local file system param detect Root Paths whether root container paths should be detected When code true code searching is performed relative to a root path within the archive based on fully qualified file names A root path is automatically determined for each file type when the first successful search is performed For example when searching for a file named code a b c d code and an entry in the archive named code r a b c d code exists the root path is set to code r code for file type code d code From that point on searching is performed relative to code r code for files of type code d code When searching for an unqualified file name root containers are not considered When code false code searching is performed by matching file names as suffixes to the entries in the archive public External Archive Source Container String archive Path boolean detect Root Paths f Archive Path archive Path f Detect Roots detect Root Paths  archivePath detectRootPaths ExternalArchiveSourceContainer archivePath detectRootPaths fArchivePath archivePath fDetectRoots detectRootPaths
public Object find Source Elements String name throws Core Exception name name replace Zip File file get Archive boolean is Qualfied name index Of 0 if f Detect Roots is Qualfied String root get Root file name if root null if root length 0 name root name Zip Entry entry file get Entry name if entry null return new Object new Zip Entry Storage file entry else try exact match Zip Entry entry file get Entry name if entry null can t be any dups if there is an exact match return new Object new Zip Entry Storage file entry search Enumeration entries file entries List matches null while entries has More Elements entry Zip Entry entries next Element String entry Name entry get Name if entry Name ends With name if is Qualfied entry Name length name length entry Name char At entry Name length name length 1 if is Find Duplicates if matches null matches new Array List matches add new Zip Entry Storage file entry else return new Object new Zip Entry Storage file entry if matches null return matches to Array return EMPTY  findSourceElements CoreException ZipFile getArchive isQualfied indexOf fDetectRoots isQualfied getRoot ZipEntry getEntry ZipEntryStorage ZipEntry getEntry ZipEntryStorage hasMoreElements ZipEntry nextElement entryName getName entryName endsWith isQualfied entryName entryName charAt entryName isFindDuplicates ArrayList ZipEntryStorage ZipEntryStorage toArray
Returns the root path in this archive for the given file name based on its type or code null code if none Detects a root if a root has not yet been detected for the given file type param file zip file to search in param name file name exception Core Exception if an exception occurrs while detecting the root private String get Root Zip File file String name throws Core Exception int index name last Index Of String file Type null if index 0 file Type name substring index else no filetype use as key file Type NON NLS 1 String root String f Roots get file Type if root null root detect Root file name if root null f Roots put file Type root return root  CoreException getRoot ZipFile CoreException lastIndexOf fileType fileType fileType fRoots fileType detectRoot fRoots fileType
Detects and returns the root path in this archive by searching for an entry with the given name as a suffix param file zip file to search in param name entry to search for return root exception Core Exception if an exception occurrs while detecting the root private String detect Root Zip File file String name throws Core Exception synchronized file Enumeration entries file entries try while entries has More Elements Zip Entry entry Zip Entry entries next Element String entry Name entry get Name if entry Name ends With name int root Length entry Name length name length if root Length 0 return entry Name substring 0 root Length else return NON NLS 1 catch Illegal State Exception e abort Message Format format Source Lookup Messages get String External Archive Source Container 1 new String get Name e NON NLS 1 return null  CoreException detectRoot ZipFile CoreException hasMoreElements ZipEntry ZipEntry nextElement entryName getName entryName endsWith rootLength entryName rootLength entryName rootLength IllegalStateException MessageFormat SourceLookupMessages getString ExternalArchiveSourceContainer getName
Returns the archive to search in throws Core Exception if unable to access the archive private Zip File get Archive throws Core Exception try return Source Lookup Utils get Zip File f Archive Path catch IO Exception e abort Message Format format Source Lookup Messages get String External Archive Source Container 2 new String f Archive Path e NON NLS 1 return null  CoreException ZipFile getArchive CoreException SourceLookupUtils getZipFile fArchivePath IOException MessageFormat SourceLookupMessages getString ExternalArchiveSourceContainer fArchivePath
see org eclipse debug internal core sourcelookup I Source Container get Name public String get Name return f Archive Path  ISourceContainer getName getName fArchivePath
see org eclipse debug internal core sourcelookup I Source Container get Type public I Source Container Type get Type return get Source Container Type TYPE ID  ISourceContainer getType ISourceContainerType getType getSourceContainerType TYPE_ID
Returns whether root paths are automatically detected in this archive source container return whether root paths are automatically detected in this archive source container public boolean is Detect Root return f Detect Roots  isDetectRoot fDetectRoots
see java lang Object equals java lang Object public boolean equals Object obj return obj instanceof External Archive Source Container External Archive Source Container obj get Name equals get Name  ExternalArchiveSourceContainer ExternalArchiveSourceContainer getName getName
see java lang Object hash Code public int hash Code return get Name hash Code  hashCode hashCode getName hashCode
see org eclipse debug core sourcelookup I Source Container dispose public void dispose super dispose f Roots clear  ISourceContainer fRoots

Constructs a source container on the given folder param folder the folder to search for source in param subfolders whether to search nested folders public Folder Source Container I Container folder boolean subfolders super folder subfolders  FolderSourceContainer IContainer
see org eclipse debug internal core sourcelookup I Source Container get Type public I Source Container Type get Type return get Source Container Type TYPE ID  ISourceContainer getType ISourceContainerType getType getSourceContainerType TYPE_ID

Constructs and returns storage for the given file param file a local file public Local File Storage File file set File file  LocalFileStorage setFile
public Input Stream get Contents throws Core Exception try return new File Input Stream get File catch IO Exception e throw new Core Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Source Lookup Messages get String Local File Storage 0 e NON NLS 1  InputStream getContents CoreException FileInputStream getFile IOException CoreException IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR SourceLookupMessages getString LocalFileStorage
public I Path get Full Path try return new Path get File get Canonical Path catch IO Exception e Debug Plugin log e return null  IPath getFullPath getFile getCanonicalPath IOException DebugPlugin
see org eclipse core resources I Storage get Name public String get Name return get File get Name  IStorage getName getName getFile getName
see org eclipse core resources I Storage is Read Only public boolean is Read Only return true  IStorage isReadOnly isReadOnly
Sets the file associated with this storage param file a local file private void set File File file f File file  setFile fFile
Returns the file asscoiated with this storage return file public File get File return f File  getFile fFile
see java lang Object equals java lang Object public boolean equals Object object return object instanceof Local File Storage get File equals Local File Storage object get File  LocalFileStorage getFile LocalFileStorage getFile
see java lang Object hash Code public int hash Code return get File hash Code  hashCode hashCode getFile hashCode

Constructs a project source container param project the project to search for source in param referenced whether referenced projects should be considered public Project Source Container I Project project boolean referenced super project true f Referenced Projects referenced  ProjectSourceContainer IProject fReferencedProjects
Returns whether referenced projects are considered return whether referenced projects are considered public boolean is Search Referenced Projects return f Referenced Projects  isSearchReferencedProjects fReferencedProjects
Returns the project this source container references return the project this source container references public I Project get Project return I Project get Container  IProject getProject IProject getContainer
see org eclipse debug internal core sourcelookup I Source Container get Type public I Source Container Type get Type return get Source Container Type TYPE ID  ISourceContainer getType ISourceContainerType getType getSourceContainerType TYPE_ID
see org eclipse debug internal core sourcelookup I Source Container is Composite public boolean is Composite return true  ISourceContainer isComposite isComposite
protected I Source Container create Source Containers throws Core Exception if get Project is Open if is Search Referenced Projects I Project project get Project I Project projects project get Referenced Projects I Source Container folders super create Source Containers List all new Array List folders length projects length for int i 0 i folders length i all add folders i for int i 0 i projects length i if project exists project is Open Project Source Container container new Project Source Container projects i true container init get Director all add container return I Source Container all to Array new I Source Container all size return super create Source Containers return new I Source Container 0  ISourceContainer createSourceContainers CoreException getProject isOpen isSearchReferencedProjects IProject getProject IProject getReferencedProjects ISourceContainer createSourceContainers ArrayList isOpen ProjectSourceContainer ProjectSourceContainer getDirector ISourceContainer toArray ISourceContainer createSourceContainers ISourceContainer

public static final String TYPE ID Debug Plugin get Unique Identifier container Type workspace NON NLS 1 public Workspace Source Container  TYPE_ID DebugPlugin getUniqueIdentifier containerType WorkspaceSourceContainer
see org eclipse debug internal core sourcelookup I Source Container get Name public String get Name return Source Lookup Messages get String Workspace Source Container 0 NON NLS 1  ISourceContainer getName getName SourceLookupMessages getString WorkspaceSourceContainer
see java lang Object equals java lang Object public boolean equals Object obj return obj instanceof Workspace Source Container  WorkspaceSourceContainer
see java lang Object hash Code public int hash Code return Resources Plugin get Workspace hash Code  hashCode hashCode ResourcesPlugin getWorkspace hashCode
see org eclipse debug internal core sourcelookup I Source Container get Type public I Source Container Type get Type return get Source Container Type TYPE ID  ISourceContainer getType ISourceContainerType getType getSourceContainerType TYPE_ID
protected I Source Container create Source Containers throws Core Exception I Project projects Resources Plugin get Workspace get Root get Projects I Source Container containers new I Source Container projects length for int i 0 i projects length i I Source Container container new Project Source Container projects i false container init get Director containers i container return containers  ISourceContainer createSourceContainers CoreException IProject ResourcesPlugin getWorkspace getRoot getProjects ISourceContainer ISourceContainer ISourceContainer ProjectSourceContainer getDirector

Constructs a new storage implementation for the given zip entry in the specified zip file param archive zip file param entry zip entry public Zip Entry Storage Zip File archive Zip Entry entry set Archive archive set Zip Entry entry  ZipEntryStorage ZipFile ZipEntry setArchive setZipEntry
public Input Stream get Contents throws Core Exception try return get Archive get Input Stream get Zip Entry catch IO Exception e throw new Core Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Source Lookup Messages get String Zip Entry Storage 0 e NON NLS 1  InputStream getContents CoreException getArchive getInputStream getZipEntry IOException CoreException IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR SourceLookupMessages getString ZipEntryStorage
see org eclipse core resources I Storage get Full Path public I Path get Full Path return new Path get Archive get Name append get Zip Entry get Name  IStorage getFullPath IPath getFullPath getArchive getName getZipEntry getName
public String get Name int index get Zip Entry get Name last Index Of if index 1 index get Zip Entry get Name last Index Of if index 1 return get Zip Entry get Name return get Zip Entry get Name substring index 1  getName getZipEntry getName lastIndexOf getZipEntry getName lastIndexOf getZipEntry getName getZipEntry getName
see org eclipse core resources I Storage is Read Only public boolean is Read Only return true  IStorage isReadOnly isReadOnly
Sets the archive containing the zip entry param archive a zip file private void set Archive Zip File archive f Archive archive  setArchive ZipFile fArchive
Returns the archive containing the zip entry return zip file public Zip File get Archive return f Archive  ZipFile getArchive fArchive
Sets the entry that contains the source param entry the entry that contains the source private void set Zip Entry Zip Entry entry f Zip Entry entry  setZipEntry ZipEntry fZipEntry
Returns the entry that contains the source return zip entry public Zip Entry get Zip Entry return f Zip Entry  ZipEntry getZipEntry fZipEntry
public boolean equals Object object return object instanceof Zip Entry Storage get Archive equals Zip Entry Storage object get Archive get Zip Entry get Name equals Zip Entry Storage object get Zip Entry get Name  ZipEntryStorage getArchive ZipEntryStorage getArchive getZipEntry getName ZipEntryStorage getZipEntry getName
see java lang Object hash Code public int hash Code return get Zip Entry get Name hash Code  hashCode hashCode getZipEntry getName hashCode

Initializes this source locator based on the given memento for the given launch configuration This method is called instead of code initialize From String memento code defined in code I Persistable Source Locator code when a source locator implements this interface param memento a memento to initialize this source locator param configuration the launch configuration this source locator is being created for exception Core Exception on failure to initialize  initializeFrom IPersistableSourceLocator CoreException
Disposes this source locator This method is called when a source locator s associated launch is removed from the launch manager 

Notifiation this source container has been added to the given source lookup director param director the director this container has been added to 
Returns a collection of source elements in this container corresponding to the given name Returns an empty collection if no source elements are found This source container s source lookup director specifies if duplicate source elements should be searched for via code is Find Duplicates code When code false code the returned collection should contain at most one source element If this is a composite container the containers contained by this container are also searched p The format of the given name is implementation specific but generally conforms to the format of a file name If a source container does not recognize the name format provided an empty collection should be returned A source container may or may not require names to be fully qualified i e be qualified with directory names p param name the name of the source element to search for return a collection of source elements corresponding to the given name exception Core Exception if an exception occurrs while searching for source elements  isFindDuplicates CoreException
The name of this source container that can be used for presentation purposes For example the name of a project return the name of this source container 
Returns the source containers this container is composed of An empty collection is returned if this container is not a composite container For example a workspace source container may be composed of project source containers return the source containers this container is composed of possibly an empty collection exception Core Exception if unable to retrieve source containers  CoreException
Returns whether this container is a composite container A composite container is composed of other source containers For example a workspace source container may be composed of project source containers return whether this container is a composite container 
Returns this container s type return this container s type 
Disposes this source container This method is called when the source director associated with this source container is disposed 

Returns the name of this source container type that can be used for presentation purposes For example code Working Set code or code Project code The value returned is identical to the name specified in plugin xml by the code name code attribute return the name of this source container type 
Returns the unique identifier associated with this source container type The value returned is identical to the identifier specified in plugin xml by the code id code attribute return the unique identifier associated with this source container type 
Returns a short description of this source container type that can be used for presenetation purposes or code null code if none return a short description of this source container type or code null code 

Creates and returns a new source container of this type corresponding to the given memento param memento a memento for a source conatiner of this source container type return a source container corresponding to the given memento exception Core Exception if unable to construct a source container based on the given memento  CoreException
Constructs and returns a memento for the given source container A memento can be used to reconstruct a source container param container The container for which a memento should be created The container must of this source container type return a memento for the source container exception Core Exception if unable to create a memento  CoreException

Returns the launch configuration associated with this source lookup director or code null code if none return the launch configuration associated with this source lookup director or code null code if none 
Returns the source lookup participants currently registered with this director possibly an empty collection return the source lookup participants currently registered with this director possibly an empty collection 
Returns the source containers currently registered with this director possibly an empty collection return the source containers currently registered with this director possibly an empty collection 
Sets the source containers this source lookup director should search when looking for source possibly an empty collection param containers the source containers this source lookup director should search when looking for source possibly an empty collection 
Returns whether to search exhaustively for all source elements with the same name in all registered source containers or whether to stop searching when the first source element matching the required name is found return whether to search exhaustively for all source elements with the same name 
Sets whether to search exhaustively for all source elements with the same name in all registered source containers or whether to stop searching when the first source element matching the required name is found param find Duplicates whether to search exhaustively for all source elements with the same name  findDuplicates
Notifies this source lookup director that it should initialize its set of source lookup participants 
Returns whether this source director supports the given type of source location param type source container type return whether this source director supports the given type of source location 
Clears any source lookup results associated with the given debug artifact such that a subsequent lookup will force a new search to be performed param element debug artifact to clear source lookup results for 
Adds the given source lookup participants to this director param participants participants to add 
Removes the given source lookup participants from this director param participants participants to remove 
Returns the identifier of this type of source locator return the identifier of this type of source locator 
Returns the source path computer to use with this source lookup director possibly code null code By default the source path computer returned is the one associated with this director s launch configuration s type However the source path computer can be specified programmatically by calling code set Source Path Computer code return the source path computer to use with this source lookup director possibly code null code  setSourcePathComputer
Sets the source path computer for this source lookup director This method can be used to override the default source path computer for a launch configuration type When code null code is specified the default source path computer will be used i e the one assocaited with this director s launch configuration s type param computer source path computer or code null code 
Returns a collection of source elements corresponding to the given debug artifact for example a stack frame or breakpoint Returns an empty collection if no source elements are found This participant s source lookup director specifies if duplicate source elements should be searched for via code is Find Duplicates code When code false code the returned collection should contain at most one source element param object the debug artifact for which source needs to be found e g stack frame return a collection of source elements corresponding to the given debug artifact possibly empty exception Core Exception if an exception occurrs while searching for source  isFindDuplicates CoreException
Returns a source element that corresponds to the given debug artifact or code null code if a source element could not be located This is a generalization of code get Source Element I Stack Frame code to allow source to be found for other types of elements param element the debug artifact for which to locate source return an object representing a source element  getSourceElement IStackFrame

Notification this participant has been added to the specified source lookup director param director the source lookup director that this participant has been added to 
Returns a collection of source elements corresponding to the given debug artifact for example a stack frame or breakpoint Returns an empty collection if no source elements are found This participant s source lookup director specifies if duplicate source elements should be searched for via code is Find Duplicates code When code false code the returned collection should contain at most one source element p If the given debug artifact is not recognized by this participant an empty collection is returned Otherwise this participant generates a source name from the given artifact and performs a search for associated source elements in its source containers p param object the debug artifact for which source needs to be found e g stack frame return a collection of source elements corresponding to the given debug artifact possibly empty exception Core Exception if an exception occurrs while searching for source  isFindDuplicates CoreException
Returns the source file name associated with the given debug artifact that source needs to be found for or code null code if none param object the debug artifact for which source needs to be found e g stack frame return the source file name associated with the given debug artifact or code null code if none throws Core Exception if unable to determine a source file name  CoreException
Disposes this source lookup participant This method is called when the source lookup director assocaited with this participant is disposed 
Notification that the source lookup containers in the given source lookup director have changed param director source lookup director that is directing this participant 

Returns the unique identifier for this source path computer return the unique identifier for this source path computer 

Returns a default collection source containers to be considered for the given launch configuration The collection returned represents the default source lookup path for the given configuration param configuration the launch configuration for which a default source lookup path is to be computed param monitor a progress monitor to be used in case of long operations return a default collection source containers to be considered for the given launch configuration exception Core Exception if unable to compute a default source lookup path  CoreException

Constructs a new breakpoint manager public Breakpoint Manager f Markers To Breakpoints new Hash Map 10 f Breakpoint Extensions new Hash Map 15  BreakpointManager fMarkersToBreakpoints HashMap fBreakpointExtensions HashMap
Loads all the breakpoints on the given resource param resource the resource which contains the breakpoints private void load Breakpoints I Resource resource throws Core Exception init Breakpoint Extensions I Marker markers get Persisted Markers resource List added new Array List for int i 0 i markers length i I Marker marker markers i try I Breakpoint breakpoint create Breakpoint marker if breakpoint is Registered added add breakpoint catch Debug Exception e Debug Plugin log e add Breakpoints I Breakpoint added to Array new I Breakpoint added size  loadBreakpoints IResource CoreException initBreakpointExtensions IMarker getPersistedMarkers ArrayList IMarker IBreakpoint createBreakpoint isRegistered DebugException DebugPlugin addBreakpoints IBreakpoint toArray IBreakpoint
if delete is Empty I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor pm throws Core Exception Resources Plugin get Workspace delete Markers I Marker delete to Array new I Marker delete size  isEmpty IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException ResourcesPlugin getWorkspace deleteMarkers IMarker toArray IMarker
Returns the persisted markers associated with the given resource Delete any invalid breakpoint markers This is done at startup rather than shutdown since the changes made at shutdown are not persisted as the workspace state has already been saved See bug 7683 Since the code TRANSIENT code marker attribute feature has been added we no longer have to manully delete non persisted markers the platform does this for us at shutdown transient markers are not saved However the code is still present to delete non persisted markers from old workspaces protected I Marker get Persisted Markers I Resource resource throws Core Exception I Marker markers resource find Markers I Breakpoint BREAKPOINT MARKER true I Resource DEPTH INFINITE final List delete new Array List List persisted new Array List for int i 0 i markers length i I Marker marker markers i ensure the marker has a valid model identifier attribute and delete the breakpoint if not String model Id marker get Attribute I Breakpoint ID null if model Id null marker with old invalid format delete delete add marker else if marker get Attribute I Breakpoint PERSISTED true the breakpoint is marked as not to be persisted schedule for deletion delete add marker else persisted add marker delete any markers that are not to be restored if delete is Empty I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor pm throws Core Exception Resources Plugin get Workspace delete Markers I Marker delete to Array new I Marker delete size new Breakpoint Manager Job wr schedule return I Marker persisted to Array new I Marker persisted size  IMarker getPersistedMarkers IResource CoreException IMarker findMarkers IBreakpoint BREAKPOINT_MARKER IResource DEPTH_INFINITE ArrayList ArrayList IMarker modelId getAttribute IBreakpoint modelId getAttribute IBreakpoint isEmpty IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException ResourcesPlugin getWorkspace deleteMarkers IMarker toArray IMarker BreakpointManagerJob IMarker toArray IMarker
Removes this manager as a resource change listener and removes all breakpoint listeners public void shutdown get Workspace remove Resource Change Listener this f Breakpoint Listeners remove All  getWorkspace removeResourceChangeListener fBreakpointListeners removeAll
Find the defined breakpoint extensions and cache them for use in recreating breakpoints from markers private void init Breakpoint Extensions I Extension Point ep Platform get Extension Registry get Extension Point Debug Plugin get Unique Identifier Debug Plugin EXTENSION POINT BREAKPOINTS I Configuration Element elements ep get Configuration Elements for int i 0 i elements length i String marker Type elements i get Attribute MARKER TYPE String class Name elements i get Attribute CLASS if marker Type null invalid Breakpoint Extension Message Format format Debug Core Messages get String Breakpoint Manager Breakpoint extension  0  missing required attribute  markerType 1 new String elements i get Declaring Extension get Unique Identifier NON NLS 1 else if class Name null invalid Breakpoint Extension Message Format format Debug Core Messages get String Breakpoint Manager Breakpoint extension  0  missing required attribute  class 2 new String elements i get Declaring Extension get Unique Identifier NON NLS 1 else f Breakpoint Extensions put marker Type elements i  initBreakpointExtensions IExtensionPoint getExtensionRegistry getExtensionPoint DebugPlugin getUniqueIdentifier DebugPlugin EXTENSION_POINT_BREAKPOINTS IConfigurationElement getConfigurationElements markerType getAttribute MARKER_TYPE className getAttribute markerType invalidBreakpointExtension MessageFormat DebugCoreMessages getString BreakpointManager Breakpoint_extension_ _missing_required_attribute__markerType_1 getDeclaringExtension getUniqueIdentifier className invalidBreakpointExtension MessageFormat DebugCoreMessages getString BreakpointManager Breakpoint_extension_ _missing_required_attribute__class_2 getDeclaringExtension getUniqueIdentifier fBreakpointExtensions markerType
private void invalid Breakpoint Extension String message I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR message null Debug Plugin log status  invalidBreakpointExtension IStatus IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR DebugPlugin
Convenience method to get the workspace private I Workspace get Workspace return Resources Plugin get Workspace  IWorkspace getWorkspace ResourcesPlugin getWorkspace
see I Breakpoint Manager get Breakpoint I Marker public I Breakpoint get Breakpoint I Marker marker ensure that breakpoints are initialized get Breakpoints0 return I Breakpoint f Markers To Breakpoints get marker  IBreakpointManager getBreakpoint IMarker IBreakpoint getBreakpoint IMarker getBreakpoints0 IBreakpoint fMarkersToBreakpoints
see I Breakpoint Manager get Breakpoints public I Breakpoint get Breakpoints Vector breakpoints get Breakpoints0 I Breakpoint temp new I Breakpoint breakpoints size breakpoints copy Into temp return temp  IBreakpointManager getBreakpoints IBreakpoint getBreakpoints getBreakpoints0 IBreakpoint IBreakpoint copyInto
The Breakpoint Manager waits to load the breakpoints of the workspace until a request is made to retrieve the breakpoints private Vector get Breakpoints0 if f Breakpoints null initialize Breakpoints return f Breakpoints  BreakpointManager getBreakpoints0 fBreakpoints initializeBreakpoints fBreakpoints
see I Breakpoint Manager get Breakpoints String public I Breakpoint get Breakpoints String model Identifier Vector all Breakpoints get Breakpoints0 Array List temp new Array List all Breakpoints size Iterator breakpoints all Breakpoints iterator while breakpoints has Next I Breakpoint breakpoint I Breakpoint breakpoints next String id breakpoint get Model Identifier if id null id equals model Identifier temp add breakpoint return I Breakpoint temp to Array new I Breakpoint temp size  IBreakpointManager getBreakpoints IBreakpoint getBreakpoints modelIdentifier allBreakpoints getBreakpoints0 ArrayList ArrayList allBreakpoints allBreakpoints hasNext IBreakpoint IBreakpoint getModelIdentifier modelIdentifier IBreakpoint toArray IBreakpoint
Loads the list of breakpoints from the breakpoint markers in the workspace Start listening to resource deltas private void initialize Breakpoints set Breakpoints new Vector 10 try load Breakpoints get Workspace get Root get Workspace add Resource Change Listener this I Resource Change Event POST BUILD catch Core Exception ce Debug Plugin log ce set Breakpoints new Vector 0  initializeBreakpoints setBreakpoints loadBreakpoints getWorkspace getRoot getWorkspace addResourceChangeListener IResourceChangeEvent POST_BUILD CoreException DebugPlugin setBreakpoints
see I Breakpoint Manager is Registered I Breakpoint public boolean is Registered I Breakpoint breakpoint return get Breakpoints0 contains breakpoint  IBreakpointManager isRegistered IBreakpoint isRegistered IBreakpoint getBreakpoints0
see I Breakpoint Manager remove Breakpoint I Breakpoint boolean public void remove Breakpoint I Breakpoint breakpoint boolean delete throws Core Exception remove Breakpoints new I Breakpoint breakpoint delete  IBreakpointManager removeBreakpoint IBreakpoint removeBreakpoint IBreakpoint CoreException removeBreakpoints IBreakpoint
I Workspace Runnable r new I Workspace Runnable public void run I Progress Monitor montitor throws Core Exception Iterator inner Iter remove iterator while inner Iter has Next I Breakpoint breakpoint I Breakpoint inner Iter next if delete breakpoint delete else if the breakpoint is being removed from the manager because the project is closing the breakpoint should remain as registered otherwise the breakpoint should be marked as deregistered I Marker marker breakpoint get Marker if marker exists I Project project breakpoint get Marker get Resource get Project if project null project is Open breakpoint set Registered false  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException innerIter innerIter hasNext IBreakpoint IBreakpoint innerIter IMarker getMarker IProject getMarker getResource getProject isOpen setRegistered
see I Breakpoint Manager remove Breakpoints I Breakpoint boolean public void remove Breakpoints I Breakpoint breakpoints final boolean delete throws Core Exception final List remove new Array List breakpoints length for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if get Breakpoints0 contains breakpoint remove add breakpoint if remove is Empty Iterator iter remove iterator while iter has Next I Breakpoint breakpoint I Breakpoint iter next get Breakpoints0 remove breakpoint f Markers To Breakpoints remove breakpoint get Marker fire Update remove null REMOVED I Workspace Runnable r new I Workspace Runnable public void run I Progress Monitor montitor throws Core Exception Iterator inner Iter remove iterator while inner Iter has Next I Breakpoint breakpoint I Breakpoint inner Iter next if delete breakpoint delete else if the breakpoint is being removed from the manager because the project is closing the breakpoint should remain as registered otherwise the breakpoint should be marked as deregistered I Marker marker breakpoint get Marker if marker exists I Project project breakpoint get Marker get Resource get Project if project null project is Open breakpoint set Registered false get Workspace run r null 0 null  IBreakpointManager removeBreakpoints IBreakpoint removeBreakpoints IBreakpoint CoreException ArrayList IBreakpoint getBreakpoints0 isEmpty hasNext IBreakpoint IBreakpoint getBreakpoints0 fMarkersToBreakpoints getMarker fireUpdate IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException innerIter innerIter hasNext IBreakpoint IBreakpoint innerIter IMarker getMarker IProject getMarker getResource getProject isOpen setRegistered getWorkspace
Create a breakpoint for the given marker The created breakpoint is of the type specified in the breakpoint extension associated with the given marker type return a breakpoint on this marker exception Debug Exception if breakpoint creation fails Reasons for failure include ol li The breakpoint manager cannot determine what kind of breakpoint to instantiate for the given marker type li li A lower level exception occurred while accessing the given marker li ol private I Breakpoint create Breakpoint I Marker marker throws Debug Exception I Breakpoint breakpoint I Breakpoint f Markers To Breakpoints get marker if breakpoint null return breakpoint try I Configuration Element config I Configuration Element f Breakpoint Extensions get marker get Type if config null throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception CONFIGURATION INVALID Message Format format Debug Core Messages get String Breakpoint Manager Missing breakpoint definition new String marker get Type null NON NLS 1 Object object config create Executable Extension CLASS if object instanceof I Breakpoint breakpoint I Breakpoint object breakpoint set Marker marker else invalid Breakpoint Extension Message Format format Debug Core Messages get String Breakpoint Manager Class  0  specified by breakpoint extension  1  does not implement required interface IBreakpoint  3 new String config get Attribute CLASS config get Declaring Extension get Unique Identifier NON NLS 1 return breakpoint catch Core Exception e throw new Debug Exception e get Status  DebugException IBreakpoint createBreakpoint IMarker DebugException IBreakpoint IBreakpoint fMarkersToBreakpoints IConfigurationElement IConfigurationElement fBreakpointExtensions getType DebugException IStatus DebugPlugin getUniqueIdentifier DebugException CONFIGURATION_INVALID MessageFormat DebugCoreMessages getString BreakpointManager Missing_breakpoint_definition getType createExecutableExtension IBreakpoint IBreakpoint setMarker invalidBreakpointExtension MessageFormat DebugCoreMessages getString BreakpointManager Class_ _specified_by_breakpoint_extension_ _does_not_implement_required_interface_IBreakpoint _3 getAttribute getDeclaringExtension getUniqueIdentifier CoreException DebugException getStatus
see I Breakpoint Manager add Breakpoint I Breakpoint public void add Breakpoint I Breakpoint breakpoint throws Core Exception add Breakpoints new I Breakpoint breakpoint  IBreakpointManager addBreakpoint IBreakpoint addBreakpoint IBreakpoint CoreException addBreakpoints IBreakpoint
I Workspace Runnable r new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception Iterator iter update iterator while iter has Next I Breakpoint breakpoint I Breakpoint iter next get Breakpoints0 add breakpoint breakpoint set Registered true f Markers To Breakpoints put breakpoint get Marker breakpoint  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException hasNext IBreakpoint IBreakpoint getBreakpoints0 setRegistered fMarkersToBreakpoints getMarker
see I Breakpoint Manager add Breakpoints I Breakpoint public void add Breakpoints I Breakpoint breakpoints throws Core Exception List added new Array List breakpoints length final List update new Array List for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if get Breakpoints0 contains breakpoint verify Breakpoint breakpoint if breakpoint is Registered added add breakpoint get Breakpoints0 add breakpoint f Markers To Breakpoints put breakpoint get Marker breakpoint else need to update the registered attribute update add breakpoint fire Update added null ADDED if update is Empty I Workspace Runnable r new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception Iterator iter update iterator while iter has Next I Breakpoint breakpoint I Breakpoint iter next get Breakpoints0 add breakpoint breakpoint set Registered true f Markers To Breakpoints put breakpoint get Marker breakpoint Need to suppress change notification since this is really an add notification f Suppress Change add All update get Workspace run r null 0 null f Suppress Change remove All update fire Update update null ADDED  IBreakpointManager addBreakpoints IBreakpoint addBreakpoints IBreakpoint CoreException ArrayList ArrayList IBreakpoint getBreakpoints0 verifyBreakpoint isRegistered getBreakpoints0 fMarkersToBreakpoints getMarker fireUpdate isEmpty IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException hasNext IBreakpoint IBreakpoint getBreakpoints0 setRegistered fMarkersToBreakpoints getMarker fSuppressChange addAll getWorkspace fSuppressChange removeAll fireUpdate
Returns whether change notification is to be suppressed for the given breakpoint Used when adding breakpoints and changing the REGISTERED attribute param breakpoint return boolean whether change notification is suppressed protected boolean is Change Suppressed I Breakpoint breakpoint return f Suppress Change contains breakpoint  isChangeSuppressed IBreakpoint fSuppressChange
see I Breakpoint Manager fire Breakpoint Changed I Breakpoint public void fire Breakpoint Changed I Breakpoint breakpoint if get Breakpoints0 contains breakpoint List changed new Array List changed add breakpoint fire Update changed null CHANGED  IBreakpointManager fireBreakpointChanged IBreakpoint fireBreakpointChanged IBreakpoint getBreakpoints0 ArrayList fireUpdate
Verifies that the breakpoint marker has the minimal required attributes and throws a debug exception if not private void verify Breakpoint I Breakpoint breakpoint throws Debug Exception try String id breakpoint get Model Identifier if id null throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception CONFIGURATION INVALID Debug Core Messages get String Breakpoint Manager Missing model identifier null NON NLS 1 catch Core Exception e throw new Debug Exception e get Status  verifyBreakpoint IBreakpoint DebugException getModelIdentifier DebugException IStatus DebugPlugin getUniqueIdentifier DebugException CONFIGURATION_INVALID DebugCoreMessages getString BreakpointManager Missing_model_identifier CoreException DebugException getStatus
A resource has changed Traverses the delta for breakpoint changes public void resource Changed I Resource Change Event event I Resource Delta delta event get Delta if delta null try if fg Visitor null fg Visitor new Breakpoint Manager Visitor delta accept fg Visitor fg Visitor update catch Core Exception ce Debug Plugin log ce  resourceChanged IResourceChangeEvent IResourceDelta getDelta fgVisitor fgVisitor BreakpointManagerVisitor fgVisitor fgVisitor CoreException DebugPlugin
Resets the visitor for a delta traversal empties collections of removed changed breakpoints protected void reset f Moved clear f Removed clear f Changed clear f Changed Deltas clear  fMoved fRemoved fChanged fChangedDeltas
delete moved markers I Workspace Runnable w Runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception get Workspace delete Markers I Marker f Moved to Array new I Marker f Moved size  IWorkspaceRunnable wRunnable IWorkspaceRunnable IProgressMonitor CoreException getWorkspace deleteMarkers IMarker fMoved toArray IMarker fMoved
Performs updates on accumlated changes and fires change notification after a traversal Accumlated updates are reset public void update if f Moved is Empty delete moved markers I Workspace Runnable w Runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception get Workspace delete Markers I Marker f Moved to Array new I Marker f Moved size try get Workspace run w Runnable null 0 null catch Core Exception e if f Removed is Empty try remove Breakpoints I Breakpoint f Removed to Array new I Breakpoint f Removed size false catch Core Exception e Debug Plugin log e if f Changed is Empty fire Update f Changed f Changed Deltas CHANGED reset  fMoved isEmpty IWorkspaceRunnable wRunnable IWorkspaceRunnable IProgressMonitor CoreException getWorkspace deleteMarkers IMarker fMoved toArray IMarker fMoved getWorkspace wRunnable CoreException fRemoved isEmpty removeBreakpoints IBreakpoint fRemoved toArray IBreakpoint fRemoved CoreException DebugPlugin fChanged isEmpty fireUpdate fChanged fChangedDeltas
see I Resource Delta Visitor visit I Resource Delta public boolean visit I Resource Delta delta if delta null return false if 0 delta get Flags I Resource Delta OPEN 0 delta get Flags I Resource Delta MOVED FROM handle Project Resource Open State Change delta get Resource return false I Marker Delta marker Deltas delta get Marker Deltas for int i 0 i marker Deltas length i I Marker Delta marker Delta marker Deltas i if marker Delta is Subtype Of I Breakpoint BREAKPOINT MARKER switch marker Delta get Kind case I Resource Delta ADDED handle Add Breakpoint delta marker Delta get Marker break case I Resource Delta REMOVED handle Remove Breakpoint marker Delta get Marker break case I Resource Delta CHANGED handle Change Breakpoint marker Delta get Marker marker Delta break return true  IResourceDeltaVisitor IResourceDelta IResourceDelta getFlags IResourceDelta getFlags IResourceDelta MOVED_FROM handleProjectResourceOpenStateChange getResource IMarkerDelta markerDeltas getMarkerDeltas markerDeltas IMarkerDelta markerDelta markerDeltas markerDelta isSubtypeOf IBreakpoint BREAKPOINT_MARKER markerDelta getKind IResourceDelta handleAddBreakpoint markerDelta getMarker IResourceDelta handleRemoveBreakpoint markerDelta getMarker IResourceDelta handleChangeBreakpoint markerDelta getMarker markerDelta
Wrapper for handling adds protected void handle Add Breakpoint I Resource Delta r Delta final I Marker marker if 0 r Delta get Flags I Resource Delta MOVED FROM This breakpoint has actually been moved already removed from the Breakpoint manager during the remove callback Schedule the marker associated with the new resource for deletion if get Breakpoint marker null f Moved add marker else do nothing we do not add until explicitly added  handleAddBreakpoint IResourceDelta rDelta IMarker rDelta getFlags IResourceDelta MOVED_FROM getBreakpoint fMoved
Wrapper for handling removes protected void handle Remove Breakpoint I Marker marker I Breakpoint breakpoint get Breakpoint marker if breakpoint null f Removed add breakpoint  handleRemoveBreakpoint IMarker IBreakpoint getBreakpoint fRemoved
Wrapper for handling changes protected void handle Change Breakpoint I Marker marker I Marker Delta delta final I Breakpoint breakpoint get Breakpoint marker if breakpoint null is Registered breakpoint is Change Suppressed breakpoint f Changed add breakpoint f Changed Deltas add delta  handleChangeBreakpoint IMarker IMarkerDelta IBreakpoint getBreakpoint isRegistered isChangeSuppressed fChanged fChangedDeltas
A project has been opened or closed Updates the breakpoints for that project private void handle Project Resource Open State Change final I Resource project if project is Accessible closed Enumeration breakpoints Vector get Breakpoints0 clone elements while breakpoints has More Elements I Breakpoint breakpoint I Breakpoint breakpoints next Element I Resource marker Resource breakpoint get Marker get Resource if project get Full Path is Prefix Of marker Resource get Full Path f Removed add breakpoint return try load Breakpoints project catch Core Exception e Debug Plugin log e  handleProjectResourceOpenStateChange IResource isAccessible getBreakpoints0 hasMoreElements IBreakpoint IBreakpoint nextElement IResource markerResource getMarker getResource getFullPath isPrefixOf markerResource getFullPath fRemoved loadBreakpoints CoreException DebugPlugin
see I Breakpoint Manager add Breakpoint Listener I Breakpoint Listener public void add Breakpoint Listener I Breakpoint Listener listener f Breakpoint Listeners add listener  IBreakpointManager addBreakpointListener IBreakpointListener addBreakpointListener IBreakpointListener fBreakpointListeners
see I Breakpoint Manager remove Breakpoint Listener I Breakpoint Listener public void remove Breakpoint Listener I Breakpoint Listener listener f Breakpoint Listeners remove listener  IBreakpointManager removeBreakpointListener IBreakpointListener removeBreakpointListener IBreakpointListener fBreakpointListeners
Notifies listeners of the adds removes changes param breakpoints associated breakpoints param deltas or code null code param update type of change private void fire Update List breakpoints List deltas int update if breakpoints is Empty return I Breakpoint bp Array I Breakpoint breakpoints to Array new I Breakpoint breakpoints size I Marker Delta delta Array new I Marker Delta bp Array length if deltas null delta Array I Marker Delta deltas to Array delta Array single listeners get Breakpoint Notifier notify bp Array delta Array update multi listeners get Breakpoints Notifier notify bp Array delta Array update  fireUpdate isEmpty IBreakpoint bpArray IBreakpoint toArray IBreakpoint IMarkerDelta deltaArray IMarkerDelta bpArray deltaArray IMarkerDelta toArray deltaArray getBreakpointNotifier bpArray deltaArray getBreakpointsNotifier bpArray deltaArray
protected void set Breakpoints Vector breakpoints f Breakpoints breakpoints  setBreakpoints fBreakpoints
see I Breakpoint Manager has Breakpoints public boolean has Breakpoints return get Breakpoints0 is Empty  IBreakpointManager hasBreakpoints hasBreakpoints getBreakpoints0 isEmpty
see org eclipse debug core I Breakpoint Manager add Breakpoint Listener org eclipse debug core I Breakpoints Listener public void add Breakpoint Listener I Breakpoints Listener listener f Breakpoints Listeners add listener  IBreakpointManager addBreakpointListener IBreakpointsListener addBreakpointListener IBreakpointsListener fBreakpointsListeners
see org eclipse debug core I Breakpoint Manager remove Breakpoint Listener org eclipse debug core I Breakpoints Listener public void remove Breakpoint Listener I Breakpoints Listener listener f Breakpoints Listeners remove listener  IBreakpointManager removeBreakpointListener IBreakpointsListener removeBreakpointListener IBreakpointsListener fBreakpointsListeners
private Breakpoint Notifier get Breakpoint Notifier return new Breakpoint Notifier  BreakpointNotifier getBreakpointNotifier BreakpointNotifier
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Debug Core Messages get String Breakpoint Manager An exception occurred during breakpoint change notification  4 exception NON NLS 1 Debug Plugin log status  ISafeRunnable handleException handleException IStatus IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR DebugCoreMessages getString BreakpointManager An_exception_occurred_during_breakpoint_change_notification _4 DebugPlugin
see org eclipse core runtime I Safe Runnable run public void run throws Exception switch f Type case ADDED f Listener breakpoint Added f Breakpoint break case REMOVED f Listener breakpoint Removed f Breakpoint f Delta break case CHANGED f Listener breakpoint Changed f Breakpoint f Delta break  ISafeRunnable fType fListener breakpointAdded fBreakpoint fListener breakpointRemoved fBreakpoint fDelta fListener breakpointChanged fBreakpoint fDelta
Notifies the listeners of the add change remove param breakpoints the breakpoints that changed param deltas the deltas associated with the change param update the type of change public void notify I Breakpoint breakpoints I Marker Delta deltas int update f Type update Object copied Listeners f Breakpoint Listeners get Listeners for int i 0 i copied Listeners length i f Listener I Breakpoint Listener copied Listeners i for int j 0 j breakpoints length j f Breakpoint breakpoints j f Delta deltas j Platform run this f Listener null f Delta null f Breakpoint null  IBreakpoint IMarkerDelta fType copiedListeners fBreakpointListeners getListeners copiedListeners fListener IBreakpointListener copiedListeners fBreakpoint fDelta fListener fDelta fBreakpoint
private Breakpoints Notifier get Breakpoints Notifier return new Breakpoints Notifier  BreakpointsNotifier getBreakpointsNotifier BreakpointsNotifier
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Debug Core Messages get String Breakpoint Manager An exception occurred during breakpoint change notification  5 exception NON NLS 1 Debug Plugin log status  ISafeRunnable handleException handleException IStatus IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR DebugCoreMessages getString BreakpointManager An_exception_occurred_during_breakpoint_change_notification _5 DebugPlugin
see org eclipse core runtime I Safe Runnable run public void run throws Exception switch f Type case ADDED f Listener breakpoints Added f Notifier Breakpoints break case REMOVED f Listener breakpoints Removed f Notifier Breakpoints f Deltas break case CHANGED f Listener breakpoints Changed f Notifier Breakpoints f Deltas break  ISafeRunnable fType fListener breakpointsAdded fNotifierBreakpoints fListener breakpointsRemoved fNotifierBreakpoints fDeltas fListener breakpointsChanged fNotifierBreakpoints fDeltas
Notifies the listeners of the adds changes removes param breakpoints the breakpoints that changed param deltas the deltas associated with the changed breakpoints param update the type of change public void notify I Breakpoint breakpoints I Marker Delta deltas int update f Type update f Notifier Breakpoints breakpoints f Deltas deltas Object copied Listeners f Breakpoints Listeners get Listeners for int i 0 i copied Listeners length i f Listener I Breakpoints Listener copied Listeners i Platform run this f Deltas null f Notifier Breakpoints null f Listener null  IBreakpoint IMarkerDelta fType fNotifierBreakpoints fDeltas copiedListeners fBreakpointsListeners getListeners copiedListeners fListener IBreakpointsListener copiedListeners fDeltas fNotifierBreakpoints fListener
see org eclipse debug core I Breakpoint Manager is Enabled public boolean is Enabled return f Enabled  IBreakpointManager isEnabled isEnabled fEnabled
see org eclipse debug core I Breakpoint Manager set Enabled boolean public void set Enabled boolean enabled f Enabled enabled new Breakpoint Manager Notifier notify enabled  IBreakpointManager setEnabled setEnabled fEnabled BreakpointManagerNotifier
see org eclipse debug core I Breakpoint Manager add Breakpoint Manager Listener org eclipse debug core I Breakpoint Manager Listener public void add Breakpoint Manager Listener I Breakpoint Manager Listener listener f Breakpoint Manager Listeners add listener  IBreakpointManager addBreakpointManagerListener IBreakpointManagerListener addBreakpointManagerListener IBreakpointManagerListener fBreakpointManagerListeners
see org eclipse debug core I Breakpoint Manager remove Breakpoint Manager Listener org eclipse debug core I Breakpoint Manager Listener public void remove Breakpoint Manager Listener I Breakpoint Manager Listener listener f Breakpoint Manager Listeners remove listener  IBreakpointManager removeBreakpointManagerListener IBreakpointManagerListener removeBreakpointManagerListener IBreakpointManagerListener fBreakpointManagerListeners
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Debug Core Messages get String Breakpoint Manager An exception occurred during breakpoint change notification  5 exception NON NLS 1 Debug Plugin log status  ISafeRunnable handleException handleException IStatus IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR DebugCoreMessages getString BreakpointManager An_exception_occurred_during_breakpoint_change_notification _5 DebugPlugin
see org eclipse core runtime I Safe Runnable run public void run throws Exception f Listener breakpoint Manager Enablement Changed f Manager Enabled  ISafeRunnable fListener breakpointManagerEnablementChanged fManagerEnabled
Notifies the listeners of the adds changes removes param breakpoints the breakpoints that changed param deltas the deltas associated with the changed breakpoints param update the type of change public void notify boolean enabled f Manager Enabled enabled Object copied Listeners f Breakpoint Manager Listeners get Listeners for int i 0 i copied Listeners length i f Listener I Breakpoint Manager Listener copied Listeners i Platform run this f Listener null  fManagerEnabled copiedListeners fBreakpointManagerListeners getListeners copiedListeners fListener IBreakpointManagerListener copiedListeners fListener
public Breakpoint Manager Job I Workspace Runnable w Runnable super breakpoint manager job NON NLS 1 f Runnable w Runnable set System true  BreakpointManagerJob IWorkspaceRunnable wRunnable fRunnable wRunnable setSystem
protected I Status run I Progress Monitor monitor try get Workspace run f Runnable null 0 null catch Core Exception ce Debug Plugin log ce return new Status I Status OK Debug Plugin get Unique Identifier I Status OK null NON NLS 1  IStatus IProgressMonitor getWorkspace fRunnable CoreException DebugPlugin IStatus DebugPlugin getUniqueIdentifier IStatus

Constructs a new contributed delegate on the given configuration element param element configuration element protected Contributed Delegate I Configuration Element element set Configuration Element element  ContributedDelegate IConfigurationElement setConfigurationElement
Sets this delegate s configuration element param element this delegate s configuration element private void set Configuration Element I Configuration Element element f Element element  setConfigurationElement IConfigurationElement fElement
Returns this delegate s configuration element return this delegate s configuration element protected I Configuration Element get Configuration Element return f Element  IConfigurationElement getConfigurationElement fElement
Returns the set of modes specified in the configuration data return the set of modes specified in the configuration data protected Set get Modes if f Modes null String modes get Configuration Element get Attribute modes NON NLS 1 if modes null return new Hash Set 0 String strings modes split NON NLS 1 f Modes new Hash Set 3 for int i 0 i strings length i String string strings i f Modes add string trim return f Modes  getModes fModes getConfigurationElement getAttribute HashSet fModes HashSet fModes fModes
Returns the type identifier of launch configuration type this delegate is contributed to protected String get Launch Configuration Type return get Configuration Element get Attribute type NON NLS 1  getLaunchConfigurationType getConfigurationElement getAttribute
protected I Launch Configuration Delegate get Delegate throws Core Exception if f Delegate null Object object get Configuration Element create Executable Extension delegate NON NLS 1 if object instanceof I Launch Configuration Delegate f Delegate I Launch Configuration Delegate object else throw new Core Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Message Format format Debug Core Messages get String Launch Configuration Type Launch delegate for  0  does not implement required interface ILaunchConfigurationDelegate  1 new String get Identifier null NON NLS 1 return f Delegate  ILaunchConfigurationDelegate getDelegate CoreException fDelegate getConfigurationElement createExecutableExtension ILaunchConfigurationDelegate fDelegate ILaunchConfigurationDelegate CoreException IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR MessageFormat DebugCoreMessages getString LaunchConfigurationType Launch_delegate_for_ _does_not_implement_required_interface_ILaunchConfigurationDelegate _1 getIdentifier fDelegate
Returns the identifier of this extension point protected String get Identifier return get Configuration Element get Attribute id NON NLS 1  getIdentifier getConfigurationElement getAttribute

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Debug Core Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE DebugCoreMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

public String resolve Value I Dynamic Variable variable String argument throws Core Exception if argument null throw new Core Exception new Status I Status ERROR Debug Plugin get Unique Identifier I Status ERROR Debug Core Messages get String Environment Variable Resolver 0 null NON NLS 1 Map map Debug Plugin get Default get Launch Manager get Native Environment if Platform getOS equals Constants OS WIN32 On Win32 env variables are case insensitive so we uppercase everything for map matches argument argument to Upper Case return String map get argument  resolveValue IDynamicVariable CoreException CoreException IStatus DebugPlugin getUniqueIdentifier IStatus DebugCoreMessages getString EnvironmentVariableResolver DebugPlugin getDefault getLaunchManager getNativeEnvironment OS_WIN32 toUpperCase

private static final String FALSE VALUE false NON NLS 1 public Expression Manager load Persisted Expressions load Watch Expression Delegates  FALSE_VALUE ExpressionManager loadPersistedExpressions loadWatchExpressionDelegates
Loads the mapping of debug models to watch expression delegates from the org eclipse debug core watch Expression Delegates extension point private void load Watch Expression Delegates I Extension Point extension Point Platform get Extension Registry get Extension Point Debug Plugin get Unique Identifier watch Expression Delegates NON NLS 1 I Configuration Element configuration Elements extension Point get Configuration Elements for int i 0 i configuration Elements length i I Configuration Element element configuration Elements i if element get Name equals watch Expression Delegate NON NLS 1 String debug Model element get Attribute debug Model NON NLS 1 if debug Model null debug Model length 0 continue f Watch Expression Delegates put debug Model element  watchExpressionDelegates loadWatchExpressionDelegates IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugPlugin getUniqueIdentifier watchExpressionDelegates IConfigurationElement configurationElements extensionPoint getConfigurationElements configurationElements IConfigurationElement configurationElements getName watchExpressionDelegate debugModel getAttribute debugModel debugModel debugModel fWatchExpressionDelegates debugModel
Returns a watch expression delegate specified for the given debug model via extension or code null code if no delegate is available param debug Model the unique identifier of a debug model return a watch expression delegate associated with the given model or code null code if none since 3 0 public I Watch Expression Delegate new Watch Expression Delegate String debug Model try I Configuration Element element I Configuration Element f Watch Expression Delegates get debug Model if element null return I Watch Expression Delegate element create Executable Extension delegate Class NON NLS 1 return null catch Core Exception e Debug Plugin log e return null  debugModel IWatchExpressionDelegate newWatchExpressionDelegate debugModel IConfigurationElement IConfigurationElement fWatchExpressionDelegates debugModel IWatchExpressionDelegate createExecutableExtension delegateClass CoreException DebugPlugin
Loads any persisted watch expresions from the preferences NOTE It s important that no setter methods are called on the watchpoints which will fire change events as this will cause an infinite loop see Bug 27281 private void load Persisted Expressions String expressions String Debug Plugin get Default get Plugin Preferences get String PREF WATCH EXPRESSIONS if expressions String length 0 return Element root try root Debug Plugin parse Document expressions String catch Core Exception e Debug Plugin log Message An exception occurred while loading watch expressions e NON NLS 1 return if root get Node Name equals WATCH EXPRESSIONS TAG Debug Plugin log Message Invalid format encountered while loading watch expressions null NON NLS 1 return Node List list root get Child Nodes boolean expressions Added false for int i 0 num Items list get Length i num Items i Node node list item i if node get Node Type Node ELEMENT NODE Element element Element node if element get Node Name equals EXPRESSION TAG Debug Plugin log Message Message Format format Invalid XML element encountered while loading watch expressions 0 new String node get Node Name null NON NLS 1 continue String expression Text element get Attribute TEXT TAG if expression Text length 0 boolean enabled TRUE VALUE equals element get Attribute ENABLED TAG I Watch Expression expression new Watch Expression expression Text enabled if f Expressions null f Expressions new Vector list get Length f Expressions add expression expressions Added true else Debug Plugin log Message Invalid expression entry encountered while loading watch expressions Expression text is empty null NON NLS 1 if expressions Added Debug Plugin get Default add Debug Event Listener this  loadPersistedExpressions expressionsString DebugPlugin getDefault getPluginPreferences getString PREF_WATCH_EXPRESSIONS expressionsString DebugPlugin parseDocument expressionsString CoreException DebugPlugin logMessage getNodeName WATCH_EXPRESSIONS_TAG DebugPlugin logMessage NodeList getChildNodes expressionsAdded numItems getLength numItems getNodeType ELEMENT_NODE getNodeName EXPRESSION_TAG DebugPlugin logMessage MessageFormat getNodeName expressionText getAttribute TEXT_TAG expressionText TRUE_VALUE getAttribute ENABLED_TAG IWatchExpression newWatchExpression expressionText fExpressions fExpressions getLength fExpressions expressionsAdded DebugPlugin logMessage expressionsAdded DebugPlugin getDefault addDebugEventListener
Creates a new watch expression with the given expression and the given enablement param expression Text the text of the expression to be evaluated param enabled whether or not the new expression should be enabled return the new watch expression private I Watch Expression new Watch Expression String expression Text boolean enabled return new Watch Expression expression Text enabled  expressionText IWatchExpression newWatchExpression expressionText WatchExpression expressionText
see I Expression Manager new Watch Expression String public I Watch Expression new Watch Expression String expression Text return new Watch Expression expression Text  IExpressionManager newWatchExpression IWatchExpression newWatchExpression expressionText WatchExpression expressionText
Persists this manager s watch expressions as XML in the preference store public void store Watch Expressions Preferences prefs Debug Plugin get Default get Plugin Preferences String expression String NON NLS 1 try expression String get Watch Expressions AsXML catch IO Exception e Debug Plugin log e catch Parser Configuration Exception e Debug Plugin log e catch Transformer Exception e Debug Plugin log e prefs set Value PREF WATCH EXPRESSIONS expression String Debug Plugin get Default save Plugin Preferences  storeWatchExpressions DebugPlugin getDefault getPluginPreferences expressionString expressionString getWatchExpressionsAsXML IOException DebugPlugin ParserConfigurationException DebugPlugin TransformerException DebugPlugin setValue PREF_WATCH_EXPRESSIONS expressionString DebugPlugin getDefault savePluginPreferences
Returns this manager s watch expressions as XML return this manager s watch expressions as XML throws IO Exception if an exception occurs while creating the XML document throws Parser Configuration Exception if an exception occurs while creating the XML document throws Transformer Exception if an exception occurs while creating the XML document private String get Watch Expressions AsXML throws IO Exception Parser Configuration Exception Transformer Exception I Expression expressions get Expressions Document document Launch Manager get Document Element root Element document create Element WATCH EXPRESSIONS TAG document append Child root Element for int i 0 i expressions length i I Expression expression expressions i if expression instanceof I Watch Expression Element element document create Element EXPRESSION TAG element set Attribute TEXT TAG expression get Expression Text element set Attribute ENABLED TAG I Watch Expression expression is Enabled TRUE VALUE FALSE VALUE root Element append Child element return Launch Manager serialize Document document  IOException ParserConfigurationException TransformerException getWatchExpressionsAsXML IOException ParserConfigurationException TransformerException IExpression getExpressions LaunchManager getDocument rootElement createElement WATCH_EXPRESSIONS_TAG appendChild rootElement IExpression IWatchExpression createElement EXPRESSION_TAG setAttribute TEXT_TAG getExpressionText setAttribute ENABLED_TAG IWatchExpression isEnabled TRUE_VALUE FALSE_VALUE rootElement appendChild LaunchManager serializeDocument
see I Expression Manager add Expression I Expression public void add Expression I Expression expression add Expressions new I Expression expression  IExpressionManager addExpression IExpression addExpression IExpression addExpressions IExpression
see I Expression Manager add Expressions I Expression public void add Expressions I Expression expressions if f Expressions null f Expressions new Vector expressions length boolean added Watch Expression false boolean was Empty f Expressions is Empty List added new Array List expressions length for int i 0 i expressions length i I Expression expression expressions i if f Expressions index Of expression 1 added add expression f Expressions add expression if expression instanceof I Watch Expression added Watch Expression true if was Empty Debug Plugin get Default add Debug Event Listener this if added is Empty fire Update I Expression added to Array new I Expression added size ADDED if added Watch Expression store Watch Expressions  IExpressionManager addExpressions IExpression addExpressions IExpression fExpressions fExpressions addedWatchExpression wasEmpty fExpressions isEmpty ArrayList IExpression fExpressions indexOf fExpressions IWatchExpression addedWatchExpression wasEmpty DebugPlugin getDefault addDebugEventListener isEmpty fireUpdate IExpression toArray IExpression addedWatchExpression storeWatchExpressions
see I Expression Manager get Expressions public I Expression get Expressions if f Expressions null return new I Expression 0 I Expression temp new I Expression f Expressions size f Expressions copy Into temp return temp  IExpressionManager getExpressions IExpression getExpressions fExpressions IExpression IExpression IExpression fExpressions fExpressions copyInto
see I Expression Manager get Expressions String public I Expression get Expressions String model Identifier if f Expressions null return new I Expression 0 Array List temp new Array List f Expressions size Iterator iter f Expressions iterator while iter has Next I Expression expression I Expression iter next String id expression get Model Identifier if id null id equals model Identifier temp add expression return I Expression temp to Array new I Expression temp size  IExpressionManager getExpressions IExpression getExpressions modelIdentifier fExpressions IExpression ArrayList ArrayList fExpressions fExpressions hasNext IExpression IExpression getModelIdentifier modelIdentifier IExpression toArray IExpression
see I Expression Manager remove Expression I Expression public void remove Expression I Expression expression remove Expressions new I Expression expression  IExpressionManager removeExpression IExpression removeExpression IExpression removeExpressions IExpression
see I Expression Manager remove Expressions I Expression public void remove Expressions I Expression expressions if f Expressions null return List removed new Array List expressions length for int i 0 i expressions length i I Expression expression expressions i if f Expressions remove expression removed add expression expression dispose if f Expressions is Empty Debug Plugin get Default remove Debug Event Listener this if removed is Empty fire Update I Expression removed to Array new I Expression removed size REMOVED store Watch Expressions  IExpressionManager removeExpressions IExpression removeExpressions IExpression fExpressions ArrayList IExpression fExpressions fExpressions isEmpty DebugPlugin getDefault removeDebugEventListener isEmpty fireUpdate IExpression toArray IExpression storeWatchExpressions
see I Expression Manager add Expression Listener I Expression Listener public void add Expression Listener I Expression Listener listener if f Listeners null f Listeners new Listener List 2 f Listeners add listener  IExpressionManager addExpressionListener IExpressionListener addExpressionListener IExpressionListener fListeners fListeners ListenerList fListeners
see I Expression Manager remove Expression Listener I Expression Listener public void remove Expression Listener I Expression Listener listener if f Listeners null return f Listeners remove listener  IExpressionManager removeExpressionListener IExpressionListener removeExpressionListener IExpressionListener fListeners fListeners
see I Debug Event Set Listener handle Debug Event Debug Event public void handle Debug Events Debug Event events for int i 0 i events length i List changed null Debug Event event events i if event get Source instanceof I Expression switch event get Kind case Debug Event CHANGE if changed null changed new Array List 1 changed add event get Source break default break if changed null I Expression array I Expression changed to Array new I Expression changed size fire Update array CHANGED  IDebugEventSetListener handleDebugEvent DebugEvent handleDebugEvents DebugEvent DebugEvent getSource IExpression getKind DebugEvent ArrayList getSource IExpression IExpression toArray IExpression fireUpdate
The given watch expression has changed Update the persisted expressions to store this change param expression the changed expression protected void watch Expression Changed I Watch Expression expression if f Expressions null f Expressions contains expression store Watch Expressions  watchExpressionChanged IWatchExpression fExpressions fExpressions storeWatchExpressions
Notifies listeners of the adds removes changes param breakpoints associated breakpoints param deltas or code null code param update type of change private void fire Update I Expression expressions int update single listeners get Expression Notifier notify expressions update multi listeners get Expressions Notifier notify expressions update  fireUpdate IExpression getExpressionNotifier getExpressionsNotifier
see I Expression Manager has Expressions public boolean has Expressions return f Expressions null  IExpressionManager hasExpressions hasExpressions fExpressions
see org eclipse debug core I Expression Manager add Expression Listener org eclipse debug core I Expressions Listener public void add Expression Listener I Expressions Listener listener if f Expressions Listeners null f Expressions Listeners new Listener List 2 f Expressions Listeners add listener  IExpressionManager addExpressionListener IExpressionsListener addExpressionListener IExpressionsListener fExpressionsListeners fExpressionsListeners ListenerList fExpressionsListeners
see org eclipse debug core I Expression Manager remove Expression Listener org eclipse debug core I Expressions Listener public void remove Expression Listener I Expressions Listener listener if f Expressions Listeners null return f Expressions Listeners remove listener  IExpressionManager removeExpressionListener IExpressionsListener removeExpressionListener IExpressionsListener fExpressionsListeners fExpressionsListeners
private Expression Notifier get Expression Notifier return new Expression Notifier  ExpressionNotifier getExpressionNotifier ExpressionNotifier
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Debug Core Messages get String Expression Manager An exception occurred during expression change notification  1 exception NON NLS 1 Debug Plugin log status  ISafeRunnable handleException handleException IStatus IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR DebugCoreMessages getString ExpressionManager An_exception_occurred_during_expression_change_notification _1 DebugPlugin
see org eclipse core runtime I Safe Runnable run public void run throws Exception switch f Type case ADDED f Listener expression Added f Expression break case REMOVED f Listener expression Removed f Expression break case CHANGED f Listener expression Changed f Expression break  ISafeRunnable fType fListener expressionAdded fExpression fListener expressionRemoved fExpression fListener expressionChanged fExpression
Notifies listeners of the add change remove param expression the expression that has changed param update the type of change public void notify I Expression expressions int update if f Listeners null f Type update Object copied Listeners f Listeners get Listeners for int i 0 i copied Listeners length i f Listener I Expression Listener copied Listeners i for int j 0 j expressions length j f Expression expressions j Platform run this f Listener null f Expression null  IExpression fListeners fType copiedListeners fListeners getListeners copiedListeners fListener IExpressionListener copiedListeners fExpression fListener fExpression
private Expressions Notifier get Expressions Notifier return new Expressions Notifier  ExpressionsNotifier getExpressionsNotifier ExpressionsNotifier
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Debug Core Messages get String Expression Manager An exception occurred during expression change notification  1 exception NON NLS 1 Debug Plugin log status  ISafeRunnable handleException handleException IStatus IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR DebugCoreMessages getString ExpressionManager An_exception_occurred_during_expression_change_notification _1 DebugPlugin
see org eclipse core runtime I Safe Runnable run public void run throws Exception switch f Type case ADDED f Listener expressions Added f Notifier Expressions break case REMOVED f Listener expressions Removed f Notifier Expressions break case CHANGED f Listener expressions Changed f Notifier Expressions break  ISafeRunnable fType fListener expressionsAdded fNotifierExpressions fListener expressionsRemoved fNotifierExpressions fListener expressionsChanged fNotifierExpressions
Notifies listeners of the adds changes removes param expressions the expressions that changed param update the type of change public void notify I Expression expressions int update if f Expressions Listeners null f Notifier Expressions expressions f Type update Object copied Listeners f Expressions Listeners get Listeners for int i 0 i copied Listeners length i f Listener I Expressions Listener copied Listeners i Platform run this f Notifier Expressions null f Listener null  IExpression fExpressionsListeners fNotifierExpressions fType copiedListeners fExpressionsListeners getListeners copiedListeners fListener IExpressionsListener copiedListeners fNotifierExpressions fListener

Creates an input stream monitor which writes to system in via the given output stream public Input Stream Monitor Output Stream stream f Stream stream f Queue new Vector f Lock new Object  InputStreamMonitor OutputStream fStream fQueue fLock
Appends the given text to the stream or queues the text to be written at a later time if the stream is blocked public void write String text synchronized f Lock f Queue add text f Lock notify All  fLock fQueue fLock notifyAll
if f Thread null f Thread new Thread new Runnable public void run write  fThread fThread
Starts a thread which writes the stream public void start Monitoring if f Thread null f Thread new Thread new Runnable public void run write Debug Core Messages get String Input Stream Monitor label NON NLS 1 f Thread start  startMonitoring fThread fThread DebugCoreMessages getString InputStreamMonitor fThread
Close all communications between this monitor and the underlying stream public void close if f Thread null Thread thread f Thread f Thread null thread interrupt  fThread fThread fThread
Continuously writes to the stream protected void write while f Thread null write Next try f Stream close catch IO Exception e Debug Plugin log e  fThread writeNext fStream IOException DebugPlugin
Write the text in the queue to the stream protected void write Next while f Queue is Empty String text String f Queue first Element f Queue remove Element At 0 try f Stream write text get Bytes f Stream flush catch IO Exception e Debug Plugin log e try synchronized f Lock f Lock wait catch Interrupted Exception e  writeNext fQueue isEmpty fQueue firstElement fQueue removeElementAt fStream getBytes fStream IOException DebugPlugin fLock fLock InterruptedException

Constructs a launch configuration in the given location param location path to where this launch configuration s underlying file is located protected Launch Configuration I Path location set Location location  LaunchConfiguration IPath setLocation
Constructs a launch configuration from the given memento param memento launch configuration memento exception Core Exception if the memento is invalid or an exception occurs reading the memento protected Launch Configuration String memento throws Core Exception Exception ex null try Element root null Document Builder parser Document Builder Factory new Instance new Document Builder String Reader reader new String Reader memento Input Source source new Input Source reader root parser parse source get Document Element String local String root get Attribute local NON NLS 1 String path root get Attribute path NON NLS 1 String message null if path null message Debug Core Messages get String Launch Configuration Invalid launch configuration memento  missing path attribute 3 NON NLS 1 else if local String null message Debug Core Messages get String Launch Configuration Invalid launch configuration memento  missing local attribute 4 NON NLS 1 if message null I Status s new Status message Debug Exception INTERNAL ERROR null throw new Core Exception s I Path location null boolean local Boolean value Of local String boolean Value if local location Launch Manager LOCAL LAUNCH CONFIGURATION CONTAINER PATH append path else location Resources Plugin get Workspace get Root get File new Path path get Location set Location location if location null I Status s new Status Message Format format Debug Core Messages get String Launch Configuration Unable to restore location for launch configuration from memento   0  1 new String path Debug Plugin INTERNAL ERROR null NON NLS 1 throw new Core Exception s return catch Parser Configuration Exception e ex e catch SAX Exception e ex e catch IO Exception e ex e I Status s new Status Debug Core Messages get String Launch Configuration Exception occurred parsing memento 5 Debug Exception INTERNAL ERROR ex NON NLS 1 throw new Core Exception s  CoreException LaunchConfiguration CoreException DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder StringReader StringReader InputSource InputSource getDocumentElement localString getAttribute getAttribute DebugCoreMessages getString LaunchConfiguration Invalid_launch_configuration_memento__missing_path_attribute_3 localString DebugCoreMessages getString LaunchConfiguration Invalid_launch_configuration_memento__missing_local_attribute_4 IStatus newStatus DebugException INTERNAL_ERROR CoreException IPath valueOf localString booleanValue LaunchManager LOCAL_LAUNCH_CONFIGURATION_CONTAINER_PATH ResourcesPlugin getWorkspace getRoot getFile getLocation setLocation IStatus newStatus MessageFormat DebugCoreMessages getString LaunchConfiguration Unable_to_restore_location_for_launch_configuration_from_memento__ _1 DebugPlugin INTERNAL_ERROR CoreException ParserConfigurationException SAXException IOException IStatus newStatus DebugCoreMessages getString LaunchConfiguration Exception_occurred_parsing_memento_5 DebugException INTERNAL_ERROR CoreException
Creates and returns a new error status based on the given message code and exception param message error message param code error code param e exception or code null code return status protected I Status new Status String message int code Throwable e return new Status I Status ERROR Debug Plugin get Unique Identifier code message e  IStatus newStatus IStatus DebugPlugin getUniqueIdentifier
see I Launch Configuration launch String I Progress Monitor public I Launch launch String mode I Progress Monitor monitor throws Core Exception return launch mode monitor false  ILaunchConfiguration IProgressMonitor ILaunch IProgressMonitor CoreException
Set the source locator to use with the launch if specified by this configuration param launch the launch on which to set the source locator protected void initialize Source Locator I Launch launch throws Core Exception if launch get Source Locator null String type get Attribute ATTR SOURCE LOCATOR ID String null if type null type get Type get Source Locator Id if type null I Persistable Source Locator locator get Launch Manager new Source Locator type String memento get Attribute ATTR SOURCE LOCATOR MEMENTO String null if memento null locator initialize Defaults this else if locator instanceof I Persistable Source Locator2 I Persistable Source Locator2 locator initialize From Memento memento this else locator initialize From Memento memento launch set Source Locator locator  initializeSourceLocator ILaunch CoreException getSourceLocator getAttribute ATTR_SOURCE_LOCATOR_ID getType getSourceLocatorId IPersistableSourceLocator getLaunchManager newSourceLocator getAttribute ATTR_SOURCE_LOCATOR_MEMENTO initializeDefaults IPersistableSourceLocator2 IPersistableSourceLocator2 initializeFromMemento initializeFromMemento setSourceLocator
see I Launch Configuration supports Mode String public boolean supports Mode String mode throws Core Exception return get Type supports Mode mode  ILaunchConfiguration supportsMode supportsMode CoreException getType supportsMode
A configuration s name is that of the last segment in it s location subtract the launch extension see I Launch Configuration get Name public String get Name return get Last Location Segment  ILaunchConfiguration getName getName getLastLocationSegment
private String get Last Location Segment String name get Location last Segment if name length LAUNCH CONFIGURATION FILE EXTENSION length name name substring 0 name length LAUNCH CONFIGURATION FILE EXTENSION length 1 return name  getLastLocationSegment getLocation lastSegment LAUNCH_CONFIGURATION_FILE_EXTENSION LAUNCH_CONFIGURATION_FILE_EXTENSION
see I Launch Configuration get Location public I Path get Location return f Location  ILaunchConfiguration getLocation IPath getLocation fLocation
Sets the location of this configuration s underlying file param location the location of this configuration s underlying file private void set Location I Path location f Location location  setLocation IPath fLocation
see I Launch Configuration exists public boolean exists return get Location to File exists  ILaunchConfiguration getLocation toFile
see I Launch Configuration get Attribute String int public int get Attribute String attribute Name int default Value throws Core Exception return get Info get Int Attribute attribute Name default Value  ILaunchConfiguration getAttribute getAttribute attributeName defaultValue CoreException getInfo getIntAttribute attributeName defaultValue
see I Launch Configuration get Attribute String String public String get Attribute String attribute Name String default Value throws Core Exception return get Info get String Attribute attribute Name default Value  ILaunchConfiguration getAttribute getAttribute attributeName defaultValue CoreException getInfo getStringAttribute attributeName defaultValue
see I Launch Configuration get Attribute String boolean public boolean get Attribute String attribute Name boolean default Value throws Core Exception return get Info get Boolean Attribute attribute Name default Value  ILaunchConfiguration getAttribute getAttribute attributeName defaultValue CoreException getInfo getBooleanAttribute attributeName defaultValue
see I Launch Configuration get Attribute String List public List get Attribute String attribute Name List default Value throws Core Exception return get Info get List Attribute attribute Name default Value  ILaunchConfiguration getAttribute getAttribute attributeName defaultValue CoreException getInfo getListAttribute attributeName defaultValue
see I Launch Configuration get Attribute String Map public Map get Attribute String attribute Name Map default Value throws Core Exception return get Info get Map Attribute attribute Name default Value  ILaunchConfiguration getAttribute getAttribute attributeName defaultValue CoreException getInfo getMapAttribute attributeName defaultValue
see I Launch Configuration get Type public I Launch Configuration Type get Type throws Core Exception return get Info get Type  ILaunchConfiguration getType ILaunchConfigurationType getType CoreException getInfo getType
see I Launch Configuration is Local public boolean is Local I Path local Path Launch Manager LOCAL LAUNCH CONFIGURATION CONTAINER PATH return local Path is Prefix Of get Location  ILaunchConfiguration isLocal isLocal IPath localPath LaunchManager LOCAL_LAUNCH_CONFIGURATION_CONTAINER_PATH localPath isPrefixOf getLocation
see I Launch Configuration get Working Copy public I Launch Configuration Working Copy get Working Copy throws Core Exception return new Launch Configuration Working Copy this  ILaunchConfiguration getWorkingCopy ILaunchConfigurationWorkingCopy getWorkingCopy CoreException LaunchConfigurationWorkingCopy
see I Launch Configuration copy String name public I Launch Configuration Working Copy copy String name throws Core Exception I Launch Configuration Working Copy copy new Launch Configuration Working Copy this name return copy  ILaunchConfiguration ILaunchConfigurationWorkingCopy CoreException ILaunchConfigurationWorkingCopy LaunchConfigurationWorkingCopy
see I Launch Configuration is Working Copy public boolean is Working Copy return false  ILaunchConfiguration isWorkingCopy isWorkingCopy
see I Launch Configuration delete public void delete throws Core Exception if exists if is Local if get Location to File delete throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Debug Core Messages get String Launch Configuration Failed to delete launch configuration  1 null NON NLS 1 manually update the launch manager cache since there will be no resource delta get Launch Manager launch Configuration Deleted this else delete the resource using I File API such that resource deltas are fired I File file get File if file null validate edit if file is Read Only I Status status Resources Plugin get Workspace validate Edit new I File file null if status isOK throw new Core Exception status file delete true null else Error the exists test passed but could not locate file  ILaunchConfiguration CoreException isLocal getLocation toFile DebugException IStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED DebugCoreMessages getString LaunchConfiguration Failed_to_delete_launch_configuration _1 getLaunchManager launchConfigurationDeleted IFile IFile getFile isReadOnly IStatus ResourcesPlugin getWorkspace validateEdit IFile CoreException
Returns the info object containing the attributes of this configuration return info for this handle exception Core Exception if unable to retrieve the info object protected Launch Configuration Info get Info throws Core Exception return get Launch Manager get Info this  CoreException LaunchConfigurationInfo getInfo CoreException getLaunchManager getInfo
Returns the launch configuration delegate for this launch configuration for the specified launch mode param mode launch mode return launch configuration delegate exception Core Exception if the delegate was unable to be created protected I Launch Configuration Delegate get Delegate String mode throws Core Exception return get Type get Delegate mode  CoreException ILaunchConfigurationDelegate getDelegate CoreException getType getDelegate
Returns the launch manager return launch manager protected Launch Manager get Launch Manager return Launch Manager Debug Plugin get Default get Launch Manager  LaunchManager getLaunchManager LaunchManager DebugPlugin getDefault getLaunchManager
see I Launch Configuration get Memento public String get Memento throws Core Exception I Path relative Path null if is Local I Path root Path Launch Manager LOCAL LAUNCH CONFIGURATION CONTAINER PATH I Path config Path get Location relative Path config Path remove First Segments root Path segment Count relative Path relative Path set Device null else I File file get File if file null cannot generate memento missing file I Status status new Status Message Format format Debug Core Messages get String Launch Configuration Unable to generate memento for  0  shared file does not exist  1 new String get Name Debug Exception INTERNAL ERROR null NON NLS 1 throw new Core Exception status relative Path get File get Full Path Exception e null try Document doc Launch Manager get Document Element node doc create Element launch Configuration NON NLS 1 doc append Child node node set Attribute local new Boolean is Local to String NON NLS 1 node set Attribute path relative Path to String NON NLS 1 return Launch Manager serialize Document doc catch IO Exception ioe e ioe catch Parser Configuration Exception pce e pce catch Transformer Exception te e te if e null I Status status new Status Debug Core Messages get String Launch Configuration Exception occurred creating launch configuration memento 9 Debug Exception INTERNAL ERROR e NON NLS 1 throw new Core Exception status execution will never reach here return null  ILaunchConfiguration getMemento getMemento CoreException IPath relativePath isLocal IPath rootPath LaunchManager LOCAL_LAUNCH_CONFIGURATION_CONTAINER_PATH IPath configPath getLocation relativePath configPath removeFirstSegments rootPath segmentCount relativePath relativePath setDevice IFile getFile IStatus newStatus MessageFormat DebugCoreMessages getString LaunchConfiguration Unable_to_generate_memento_for_ _shared_file_does_not_exist _1 getName DebugException INTERNAL_ERROR CoreException relativePath getFile getFullPath LaunchManager getDocument createElement launchConfiguration appendChild setAttribute isLocal toString setAttribute relativePath toString LaunchManager serializeDocument IOException ParserConfigurationException TransformerException IStatus newStatus DebugCoreMessages getString LaunchConfiguration Exception_occurred_creating_launch_configuration_memento_9 DebugException INTERNAL_ERROR CoreException
see I Launch Configuration get File public I File get File if is Local return null I File files Resources Plugin get Workspace get Root find Files For Location get Location if files length 0 return files 0 return null  ILaunchConfiguration getFile IFile getFile isLocal IFile ResourcesPlugin getWorkspace getRoot findFilesForLocation getLocation
see I Launch Configuration contents Equal I Launch Configuration public boolean contents Equal I Launch Configuration object try if object instanceof Launch Configuration Launch Configuration other Config Launch Configuration object return get Name equals other Config get Name get Type equals other Config get Type get Location equals other Config get Location get Info equals other Config get Info return false catch Core Exception ce return false  ILaunchConfiguration contentsEqual ILaunchConfiguration contentsEqual ILaunchConfiguration LaunchConfiguration LaunchConfiguration otherConfig LaunchConfiguration getName otherConfig getName getType otherConfig getType getLocation otherConfig getLocation getInfo otherConfig getInfo CoreException
Returns whether this configuration is equal to the given configuration Two configurations are equal if they are stored in the same location and neither one is a working copy return whether this configuration is equal to the given configuration see Object equals Object public boolean equals Object object if object instanceof I Launch Configuration if is Working Copy return this object I Launch Configuration config I Launch Configuration object if config is Working Copy return config get Location equals get Location return false  ILaunchConfiguration isWorkingCopy ILaunchConfiguration ILaunchConfiguration isWorkingCopy getLocation getLocation
see Object hash Code public int hash Code return get Location hash Code  hashCode hashCode getLocation hashCode
Returns the container this launch configuration is stored in or code null code if this launch configuration is stored locally return the container this launch configuration is stored in or code null code if this launch configuration is stored locally protected I Container get Container I File file get File if file null return file get Parent return null  IContainer getContainer IFile getFile getParent
see org eclipse debug core I Launch Configuration get Category public String get Category throws Core Exception return get Type get Category  ILaunchConfiguration getCategory getCategory CoreException getType getCategory
see org eclipse debug core I Launch Configuration get Attributes public Map get Attributes throws Core Exception Launch Configuration Info info get Info return info get Attributes  ILaunchConfiguration getAttributes getAttributes CoreException LaunchConfigurationInfo getInfo getAttributes
public I Launch launch String mode I Progress Monitor monitor boolean build throws Core Exception bug 28245 force the delegate to load in case it is interested in launch notifications I Launch Configuration Delegate delegate get Delegate mode I Launch Configuration Delegate2 delegate2 null if delegate instanceof I Launch Configuration Delegate2 delegate2 I Launch Configuration Delegate2 delegate allow the delegate to provide a launch implementation I Launch launch null if delegate2 null launch delegate2 get Launch this mode if launch null launch new Launch this mode null else ensure the launch mode is valid if mode equals launch get Launch Mode I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Message Format format Debug Core Messages get String Launch Configuration 13 new String mode launch get Launch Mode null NON NLS 1 throw new Core Exception status if monitor null monitor new Null Progress Monitor perform initial pre launch sanity checks if delegate2 null if delegate2 pre Launch Check this mode monitor canceled monitor set Canceled true return launch preform pre launch build I Progress Monitor sub Monitor monitor if build sub Monitor new Sub Progress Monitor monitor 100 if delegate2 null build delegate2 build For Launch this mode sub Monitor if build Resources Plugin get Workspace build Incremental Project Builder INCREMENTAL BUILD sub Monitor sub Monitor new Sub Progress Monitor monitor 100 final validation if delegate2 null if delegate2 final Launch Check this mode sub Monitor canceled monitor set Canceled true return launch get Launch Manager add Launch launch try initialize Source Locator launch delegate launch this mode launch sub Monitor catch Core Exception e if there was an exception and the launch is empty remove it if launch has Children get Launch Manager remove Launch launch throw e if monitor is Canceled get Launch Manager remove Launch launch return launch  ILaunch IProgressMonitor CoreException ILaunchConfigurationDelegate getDelegate ILaunchConfigurationDelegate2 ILaunchConfigurationDelegate2 ILaunchConfigurationDelegate2 ILaunch getLaunch getLaunchMode IStatus IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR MessageFormat DebugCoreMessages getString LaunchConfiguration getLaunchMode CoreException NullProgressMonitor preLaunchCheck setCanceled IProgressMonitor subMonitor subMonitor SubProgressMonitor buildForLaunch subMonitor ResourcesPlugin getWorkspace IncrementalProjectBuilder INCREMENTAL_BUILD subMonitor subMonitor SubProgressMonitor finalLaunchCheck subMonitor setCanceled getLaunchManager addLaunch initializeSourceLocator subMonitor CoreException hasChildren getLaunchManager removeLaunch isCanceled getLaunchManager removeLaunch

Constructs a new resolver on the given configuration element public Launch Configuration Comparator I Configuration Element element f Configuration Element element  LaunchConfigurationComparator IConfigurationElement fConfigurationElement
Returns the resolver delegate and creates if required protected Comparator get Comparator if f Delegate null try f Delegate Comparator f Configuration Element create Executable Extension class NON NLS 1 catch Core Exception e Debug Plugin log e return f Delegate  getComparator fDelegate fDelegate fConfigurationElement createExecutableExtension CoreException DebugPlugin fDelegate
see Comparator compare Object Object public int compare Object o1 Object o2 return get Comparator compare o1 o2  getComparator
see Object equals Object public boolean equals Object obj return get Comparator equals obj  getComparator

Constructs a new empty info protected Launch Configuration Info set Attribute Table new Hash Map 10  LaunchConfigurationInfo setAttributeTable HashMap
Returns this configuration s attribute table return attribute table private Hash Map get Attribute Table return f Attributes  HashMap getAttributeTable fAttributes
Sets this configuration s attribute table param table attribute table private void set Attribute Table Hash Map table f Attributes table  setAttributeTable HashMap fAttributes
Sets the attributes in this info to those in the given map param map protected void set Attributes Map map if map null set Attribute Table new Hash Map return Set entry Set map entry Set Hash Map attributes new Hash Map entry Set size Iterator iter entry Set iterator while iter has Next Map Entry entry Map Entry iter next attributes put entry get Key entry get Value set Attribute Table attributes  setAttributes setAttributeTable HashMap entrySet entrySet HashMap HashMap entrySet entrySet hasNext getKey getValue setAttributeTable
Returns the code String code attribute with the given key or the given default value if undefined return attribute specified by given key or the default Value if undefined throws Core Exception if the attribute with the given key exists but is not a code String code protected String get String Attribute String key String default Value throws Core Exception Object attr get Attribute Table get key if attr null if attr instanceof String return String attr throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Message Format format Debug Core Messages get String Launch Configuration Info Attribute  0  is not of type java lang String  1 new String key null NON NLS 1 return default Value  defaultValue CoreException getStringAttribute defaultValue CoreException getAttributeTable DebugException IStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED MessageFormat DebugCoreMessages getString LaunchConfigurationInfo Attribute_ _is_not_of_type_java _1 defaultValue
Returns the code int code attribute with the given key or the given default value if undefined return attribute specified by given key or the default Value if undefined throws Core Exception if the attribute with the given key exists but is not an code int code protected int get Int Attribute String key int default Value throws Core Exception Object attr get Attribute Table get key if attr null if attr instanceof Integer return Integer attr int Value throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Message Format format Debug Core Messages get String Launch Configuration Info Attribute  0  is not of type int  2 new String key null NON NLS 1 return default Value  defaultValue CoreException getIntAttribute defaultValue CoreException getAttributeTable intValue DebugException IStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED MessageFormat DebugCoreMessages getString LaunchConfigurationInfo Attribute_ _is_not_of_type_int _2 defaultValue
Returns the code boolean code attribute with the given key or the given default value if undefined return attribute specified by given key or the default Value if undefined throws Core Exception if the attribute with the given key exists but is not a code boolean code protected boolean get Boolean Attribute String key boolean default Value throws Core Exception Object attr get Attribute Table get key if attr null if attr instanceof Boolean return Boolean attr boolean Value throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Message Format format Debug Core Messages get String Launch Configuration Info Attribute  0  is not of type boolean  3 new String key null NON NLS 1 return default Value  defaultValue CoreException getBooleanAttribute defaultValue CoreException getAttributeTable booleanValue DebugException IStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED MessageFormat DebugCoreMessages getString LaunchConfigurationInfo Attribute_ _is_not_of_type_boolean _3 defaultValue
Returns the code java util List code attribute with the given key or the given default value if undefined return attribute specified by given key or the default Value if undefined throws Core Exception if the attribute with the given key exists but is not a code java util List code protected List get List Attribute String key List default Value throws Core Exception Object attr get Attribute Table get key if attr null if attr instanceof List return List attr throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Message Format format Debug Core Messages get String Launch Configuration Info Attribute  0  is not of type java util List  1 new String key null NON NLS 1 return default Value  defaultValue CoreException getListAttribute defaultValue CoreException getAttributeTable DebugException IStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED MessageFormat DebugCoreMessages getString LaunchConfigurationInfo Attribute_ _is_not_of_type_java _1 defaultValue
Returns the code java util Map code attribute with the given key or the given default value if undefined return attribute specified by given key or the default Value if undefined throws Core Exception if the attribute with the given key exists but is not a code java util Map code protected Map get Map Attribute String key Map default Value throws Core Exception Object attr get Attribute Table get key if attr null if attr instanceof Map return Map attr throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Message Format format Debug Core Messages get String Launch Configuration Info Attribute  0  is not of type java util Map  1 new String key null NON NLS 1 return default Value  defaultValue CoreException getMapAttribute defaultValue CoreException getAttributeTable DebugException IStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED MessageFormat DebugCoreMessages getString LaunchConfigurationInfo Attribute_ _is_not_of_type_java _1 defaultValue
Sets this configuration s type param type launch configuration type protected void set Type I Launch Configuration Type type f Type type  setType ILaunchConfigurationType fType
Returns this configuration s type return launch configuration type protected I Launch Configuration Type get Type return f Type  ILaunchConfigurationType getType fType
Returns a copy of this info object return copy of this info protected Launch Configuration Info get Copy Launch Configuration Info copy new Launch Configuration Info copy set Type get Type copy set Attribute Table get Attributes return copy  LaunchConfigurationInfo getCopy LaunchConfigurationInfo LaunchConfigurationInfo setType getType setAttributeTable getAttributes
Returns a copy of this info s attribute map return a copy of this info s attribute map protected Hash Map get Attributes return Hash Map get Attribute Table clone  HashMap getAttributes HashMap getAttributeTable
Sets the given attribute to the given value Only working copy s should use this API param key attribute key param value attribute value protected void set Attribute String key Object value if value null get Attribute Table remove key else get Attribute Table put key value  setAttribute getAttributeTable getAttributeTable
Returns the content of this info as XML return the content of this info as XML throws Core Exception if a attribute has been set with a null key throws IO Exception if an exception occurs creating the XML throws Parser Configuration Exception if an exception occurs creating the XML throws Transformer Exception if an exception occurs creating the XML protected String get AsXML throws Core Exception IO Exception Parser Configuration Exception Transformer Exception Document doc Launch Manager get Document Element config Root Element doc create Element launch Configuration NON NLS 1 doc append Child config Root Element config Root Element set Attribute type get Type get Identifier NON NLS 1 Iterator keys get Attribute Table key Set iterator while keys has Next String key String keys next if key null throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Debug Core Messages get String Launch Configuration Info 36 null NON NLS 1 Object value get Attribute Table get key if value null continue Element element null String value String null if value instanceof String value String String value element create Key Value Element doc string Attribute key value String NON NLS 1 else if value instanceof Integer value String Integer value to String element create Key Value Element doc int Attribute key value String NON NLS 1 else if value instanceof Boolean value String Boolean value to String element create Key Value Element doc boolean Attribute key value String NON NLS 1 else if value instanceof List element create List Element doc list Attribute key List value NON NLS 1 else if value instanceof Map element create Map Element doc map Attribute key Map value NON NLS 1 config Root Element append Child element return Launch Manager serialize Document doc  CoreException IOException ParserConfigurationException TransformerException getAsXML CoreException IOException ParserConfigurationException TransformerException LaunchManager getDocument configRootElement createElement launchConfiguration appendChild configRootElement configRootElement setAttribute getType getIdentifier getAttributeTable keySet hasNext DebugException IStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED DebugCoreMessages getString LaunchConfigurationInfo getAttributeTable valueString valueString createKeyValueElement stringAttribute valueString valueString toString createKeyValueElement intAttribute valueString valueString toString createKeyValueElement booleanAttribute valueString createListElement listAttribute createMapElement mapAttribute configRootElement appendChild LaunchManager serializeDocument
Helper method that creates a key value element of the specified type with the specified attribute values protected Element create Key Value Element Document doc String element Type String key String value Element element doc create Element element Type element set Attribute key key NON NLS 1 element set Attribute value value NON NLS 1 return element  createKeyValueElement elementType createElement elementType setAttribute setAttribute
protected Element create List Element Document doc String element Type String list Key List list Element list Element doc create Element element Type list Element set Attribute key list Key NON NLS 1 Iterator iterator list iterator while iterator has Next String value String iterator next Element element doc create Element list Entry NON NLS 1 element set Attribute value value NON NLS 1 list Element append Child element return list Element  createListElement elementType listKey listElement createElement elementType listElement setAttribute listKey hasNext createElement listEntry setAttribute listElement appendChild listElement
protected Element create Map Element Document doc String element Type String map Key Map map Element map Element doc create Element element Type map Element set Attribute key map Key NON NLS 1 Iterator iterator map key Set iterator while iterator has Next String key String iterator next String value String map get key Element element doc create Element map Entry NON NLS 1 element set Attribute key key NON NLS 1 element set Attribute value value NON NLS 1 map Element append Child element return map Element  createMapElement elementType mapKey mapElement createElement elementType mapElement setAttribute mapKey keySet hasNext createElement mapEntry setAttribute setAttribute mapElement appendChild mapElement
protected void initialize FromXML Element root throws Core Exception if root get Node Name equals Ignore Case launch Configuration NON NLS 1 throw get Invalid Format Debug Exception read type String id root get Attribute type NON NLS 1 if id null throw get Invalid Format Debug Exception I Launch Configuration Type type Debug Plugin get Default get Launch Manager get Launch Configuration Type id if type null String message Message Format format Debug Core Messages get String Launch Configuration Info missing type new Object id NON NLS 1 throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception MISSING LAUNCH CONFIGURATION TYPE message null set Type type Node List list root get Child Nodes int length list get Length for int i 0 i length i Node node list item i short node Type node get Node Type if node Type Node ELEMENT NODE Element element Element node String node Name element get Node Name if node Name equals Ignore Case string Attribute NON NLS 1 set String Attribute element else if node Name equals Ignore Case int Attribute NON NLS 1 set Integer Attribute element else if node Name equals Ignore Case boolean Attribute NON NLS 1 set Boolean Attribute element else if node Name equals Ignore Case list Attribute NON NLS 1 set List Attribute element else if node Name equals Ignore Case map Attribute NON NLS 1 set Map Attribute element  initializeFromXML CoreException getNodeName equalsIgnoreCase launchConfiguration getInvalidFormatDebugException getAttribute getInvalidFormatDebugException ILaunchConfigurationType DebugPlugin getDefault getLaunchManager getLaunchConfigurationType MessageFormat DebugCoreMessages getString LaunchConfigurationInfo missing_type DebugException IStatus DebugPlugin getUniqueIdentifier DebugException MISSING_LAUNCH_CONFIGURATION_TYPE setType NodeList getChildNodes getLength nodeType getNodeType nodeType ELEMENT_NODE nodeName getNodeName nodeName equalsIgnoreCase stringAttribute setStringAttribute nodeName equalsIgnoreCase intAttribute setIntegerAttribute nodeName equalsIgnoreCase booleanAttribute setBooleanAttribute nodeName equalsIgnoreCase listAttribute setListAttribute nodeName equalsIgnoreCase mapAttribute setMapAttribute
protected void set String Attribute Element element throws Core Exception String key get Key Attribute element String value get Value Attribute element set Attribute key value  setStringAttribute CoreException getKeyAttribute getValueAttribute setAttribute
protected void set Integer Attribute Element element throws Core Exception String key get Key Attribute element String value get Value Attribute element set Attribute key new Integer value  setIntegerAttribute CoreException getKeyAttribute getValueAttribute setAttribute
protected void set Boolean Attribute Element element throws Core Exception String key get Key Attribute element String value get Value Attribute element set Attribute key new Boolean value  setBooleanAttribute CoreException getKeyAttribute getValueAttribute setAttribute
protected void set List Attribute Element element throws Core Exception String list Key element get Attribute key NON NLS 1 Node List node List element get Child Nodes int entry Count node List get Length List list new Array List entry Count for int i 0 i entry Count i Node node node List item i short type node get Node Type if type Node ELEMENT NODE Element sub Element Element node String node Name sub Element get Node Name if node Name equals Ignore Case list Entry NON NLS 1 throw get Invalid Format Debug Exception String value get Value Attribute sub Element list add value set Attribute list Key list  setListAttribute CoreException listKey getAttribute NodeList nodeList getChildNodes entryCount nodeList getLength ArrayList entryCount entryCount nodeList getNodeType ELEMENT_NODE subElement nodeName subElement getNodeName nodeName equalsIgnoreCase listEntry getInvalidFormatDebugException getValueAttribute subElement setAttribute listKey
protected void set Map Attribute Element element throws Core Exception String map Key element get Attribute key NON NLS 1 Node List node List element get Child Nodes int entry Count node List get Length Map map new Hash Map entry Count for int i 0 i entry Count i Node node node List item i short type node get Node Type if type Node ELEMENT NODE Element sub Element Element node String node Name sub Element get Node Name if node Name equals Ignore Case map Entry NON NLS 1 throw get Invalid Format Debug Exception String key get Key Attribute sub Element String value get Value Attribute sub Element map put key value set Attribute map Key map  setMapAttribute CoreException mapKey getAttribute NodeList nodeList getChildNodes entryCount nodeList getLength HashMap entryCount entryCount nodeList getNodeType ELEMENT_NODE subElement nodeName subElement getNodeName nodeName equalsIgnoreCase mapEntry getInvalidFormatDebugException getKeyAttribute subElement getValueAttribute subElement setAttribute mapKey
protected String get Key Attribute Element element throws Core Exception String key element get Attribute key NON NLS 1 if key null throw get Invalid Format Debug Exception return key  getKeyAttribute CoreException getAttribute getInvalidFormatDebugException
protected String get Value Attribute Element element throws Core Exception String value element get Attribute value NON NLS 1 if value null throw get Invalid Format Debug Exception return value  getValueAttribute CoreException getAttribute getInvalidFormatDebugException
protected Debug Exception get Invalid Format Debug Exception return new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Debug Core Messages get String Launch Configuration Info Invalid launch configuration XML  10 null NON NLS 1  DebugException getInvalidFormatDebugException DebugException IStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED DebugCoreMessages getString LaunchConfigurationInfo Invalid_launch_configuration_XML _10
Two code Launch Configuration Info code objects are equal if and only if they have the same type and they have the same set of attributes with the same values see Object equals Object public boolean equals Object obj Make sure it s a Launch Configuration Info object if obj instanceof Launch Configuration Info return false Make sure the types are the same Launch Configuration Info other Launch Configuration Info obj if f Type get Identifier equals other get Type get Identifier return false Make sure the attributes are the same return compare Attributes f Attributes other get Attribute Table  LaunchConfigurationInfo LaunchConfigurationInfo LaunchConfigurationInfo LaunchConfigurationInfo LaunchConfigurationInfo fType getIdentifier getType getIdentifier compareAttributes fAttributes getAttributeTable
Returns whether the two attribute maps are equal consulting registered comparator extensions param map1 attribute map param map2 attribute map return whether the two attribute maps are equal protected boolean compare Attributes Hash Map map1 Hash Map map2 Launch Manager manager Launch Manager Debug Plugin get Default get Launch Manager if map1 size map2 size Iterator attributes map1 key Set iterator while attributes has Next String key String attributes next Object attr1 map1 get key Object attr2 map2 get key if attr2 null return false Comparator comp manager get Comparator key if comp null if attr1 equals attr2 return false else if comp compare attr1 attr2 0 return false return true return false  compareAttributes HashMap HashMap LaunchManager LaunchManager DebugPlugin getDefault getLaunchManager keySet hasNext getComparator
see java lang Object hash Code public int hash Code return f Type hash Code f Attributes size  hashCode hashCode fType hashCode fAttributes

Constructs a new launch configuration type on the given configuration element param element configuration element protected Launch Configuration Type I Configuration Element element set Configuration Element element  LaunchConfigurationType IConfigurationElement setConfigurationElement
Sets this type s configuration element param element this type s configuration element private void set Configuration Element I Configuration Element element f Element element  setConfigurationElement IConfigurationElement fElement
Returns this type s configuration element return this type s configuration element protected I Configuration Element get Configuration Element return f Element  IConfigurationElement getConfigurationElement fElement
see I Launch Configuration Type supports Mode String public boolean supports Mode String mode return get Base Modes contains mode get Contributed Modes contains mode  ILaunchConfigurationType supportsMode supportsMode getBaseModes getContributedModes
Returns the set of modes specified in the configuration data return the set of modes specified in the configuration data protected Set get Base Modes if f Base Modes null String modes get Configuration Element get Attribute modes NON NLS 1 if modes null return new Hash Set 0 String Tokenizer tokenizer new String Tokenizer modes NON NLS 1 f Base Modes new Hash Set tokenizer count Tokens while tokenizer has More Tokens f Base Modes add tokenizer next Token trim return f Base Modes  getBaseModes fBaseModes getConfigurationElement getAttribute HashSet StringTokenizer StringTokenizer fBaseModes HashSet countTokens hasMoreTokens fBaseModes nextToken fBaseModes
Returns the set of modes delegates have been contributed for return the set of modes delegates have been contributed for protected Set get Contributed Modes if f Contributed Modes null f Contributed Modes new Hash Set 0 add modes for contributed delegates List delegates Launch Manager Debug Plugin get Default get Launch Manager get Contributed Delegates Iterator iterator delegates iterator while iterator has Next Contributed Delegate delegate Contributed Delegate iterator next if delegate get Launch Configuration Type equals get Identifier f Contributed Modes add All delegate get Modes return f Contributed Modes  getContributedModes fContributedModes fContributedModes HashSet LaunchManager DebugPlugin getDefault getLaunchManager getContributedDelegates hasNext ContributedDelegate ContributedDelegate getLaunchConfigurationType getIdentifier fContributedModes addAll getModes fContributedModes
see I Launch Configuration Type get Name public String get Name return get Configuration Element get Attribute name NON NLS 1  ILaunchConfigurationType getName getName getConfigurationElement getAttribute
see I Launch Configuration Type get Source Path Computer public I Source Path Computer get Source Path Computer String id get Configuration Element get Attribute source Path Computer Id NON NLS 1 if id null id length 0 return Debug Plugin get Default get Launch Manager get Source Path Computer id return null  ILaunchConfigurationType getSourcePathComputer ISourcePathComputer getSourcePathComputer getConfigurationElement getAttribute sourcePathComputerId DebugPlugin getDefault getLaunchManager getSourcePathComputer
see I Launch Configuration Type get Identifier public String get Identifier return get Configuration Element get Attribute id NON NLS 1  ILaunchConfigurationType getIdentifier getIdentifier getConfigurationElement getAttribute
see I Launch Configuration Type get Category public String get Category return get Configuration Element get Attribute category NON NLS 1  ILaunchConfigurationType getCategory getCategory getConfigurationElement getAttribute
see I Launch Configuration Type get Attribute String public String get Attribute String attribute Name return get Configuration Element get Attribute attribute Name  ILaunchConfigurationType getAttribute getAttribute attributeName getConfigurationElement getAttribute attributeName
see I Launch Configuration Type is Public public boolean is Public String public String get Configuration Element get Attribute public NON NLS 1 if public String null if public String equals Ignore Case false NON NLS 1 return false return true  ILaunchConfigurationType isPublic isPublic publicString getConfigurationElement getAttribute publicString publicString equalsIgnoreCase
see I Launch Configuration Type new Instance I Container String public I Launch Configuration Working Copy new Instance I Container container String name return new Launch Configuration Working Copy container name this  ILaunchConfigurationType newInstance IContainer ILaunchConfigurationWorkingCopy newInstance IContainer LaunchConfigurationWorkingCopy
Returns the launch configuration delegate for launch configurations of this type The first time this method is called the delegate is instantiated see org eclipse debug core I Launch Configuration Type get Delegate return launch configuration delegate exception Core Exception if unable to instantiate the delegate deprecated use code get Delegate String code to specify mode public I Launch Configuration Delegate get Delegate throws Core Exception return get Delegate I Launch Manager RUN MODE  ILaunchConfigurationType getDelegate CoreException getDelegate ILaunchConfigurationDelegate getDelegate CoreException getDelegate ILaunchManager RUN_MODE
public I Launch Configuration Delegate get Delegate String mode throws Core Exception if supports Mode mode throw new Core Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Message Format format Debug Core Messages get String Launch Configuration Type 9 new String mode get Identifier null NON NLS 1 if f Delegates null initialize delegate table with base modes f Delegates new Hashtable 3 I Launch Configuration Delegate delegate I Launch Configuration Delegate f Delegates get mode if delegate null Set modes get Base Modes if modes contains mode Object object get Configuration Element create Executable Extension delegate NON NLS 1 if object instanceof I Launch Configuration Delegate Iterator iter modes iterator while iter has Next f Delegates put iter next object return I Launch Configuration Delegate object throw new Core Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Message Format format Debug Core Messages get String Launch Configuration Type Launch delegate for  0  does not implement required interface ILaunchConfigurationDelegate  1 new String get Name null NON NLS 1 contributed modes List contributed Launch Manager Debug Plugin get Default get Launch Manager get Contributed Delegates Iterator iterator contributed iterator while iterator has Next Contributed Delegate contributed Delegate Contributed Delegate iterator next if get Identifier equals contributed Delegate get Launch Configuration Type modes contributed Delegate get Modes if modes contains mode delegate contributed Delegate get Delegate Iterator modes Iterator modes iterator while modes Iterator has Next f Delegates put modes Iterator next delegate return delegate else return delegate throw new Core Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Message Format format Debug Core Messages get String Launch Configuration Type 10 new String get Identifier mode null NON NLS 1  ILaunchConfigurationDelegate getDelegate CoreException supportsMode CoreException IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR MessageFormat DebugCoreMessages getString LaunchConfigurationType getIdentifier fDelegates fDelegates ILaunchConfigurationDelegate ILaunchConfigurationDelegate fDelegates getBaseModes getConfigurationElement createExecutableExtension ILaunchConfigurationDelegate hasNext fDelegates ILaunchConfigurationDelegate CoreException IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR MessageFormat DebugCoreMessages getString LaunchConfigurationType Launch_delegate_for_ _does_not_implement_required_interface_ILaunchConfigurationDelegate _1 getName LaunchManager DebugPlugin getDefault getLaunchManager getContributedDelegates hasNext ContributedDelegate contributedDelegate ContributedDelegate getIdentifier contributedDelegate getLaunchConfigurationType contributedDelegate getModes contributedDelegate getDelegate modesIterator modesIterator hasNext fDelegates modesIterator CoreException IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR MessageFormat DebugCoreMessages getString LaunchConfigurationType getIdentifier
see org eclipse debug core I Launch Configuration Type get Source Locator Id public String get Source Locator Id return get Attribute source Locator Id NON NLS 1  ILaunchConfigurationType getSourceLocatorId getSourceLocatorId getAttribute sourceLocatorId
see org eclipse debug core I Launch Configuration Type get Plugin Id public String get Plugin Identifier return f Element get Declaring Extension get Namespace  ILaunchConfigurationType getPluginId getPluginIdentifier fElement getDeclaringExtension getNamespace

Constructs a working copy of the specified launch configuration param original launch configuration to make a working copy of exception Core Exception if unable to initialize this working copy s attributes based on the original configuration protected Launch Configuration Working Copy Launch Configuration original throws Core Exception super original get Location set Name original get Name copy From original set Original original f Suppress Change false  CoreException LaunchConfigurationWorkingCopy LaunchConfiguration CoreException getLocation setName getName copyFrom setOriginal fSuppressChange
Constructs a copy of the specified launch configuration with the given new name param original launch configuration to make a working copy of param name the new name for the copy of the launch configuration exception Core Exception if unable to initialize this working copy s attributes based on the original configuration protected Launch Configuration Working Copy Launch Configuration original String name throws Core Exception super original get Location copy From original set Name name f Suppress Change false  CoreException LaunchConfigurationWorkingCopy LaunchConfiguration CoreException getLocation copyFrom setName fSuppressChange
Constructs a new working copy to be created in the specified location param container the container that the configuration will be created in or code null code if to be local param name the name of the new launch configuration param type the type of this working copy protected Launch Configuration Working Copy I Container container String name I Launch Configuration Type type super I Path null set Name name set Info new Launch Configuration Info get Info set Type type set Container container f Suppress Change false  LaunchConfigurationWorkingCopy IContainer ILaunchConfigurationType IPath setName setInfo LaunchConfigurationInfo getInfo setType setContainer fSuppressChange
see I Launch Configuration Working Copy is Dirty public boolean is Dirty return f Dirty  ILaunchConfigurationWorkingCopy isDirty isDirty fDirty
if use Runnable I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor pm throws Core Exception do Save0  useRunnable IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException doSave0
see I Launch Configuration Working Copy do Save public I Launch Configuration do Save throws Core Exception if is Dirty boolean use Runnable true if is Local if is Moved If this config was moved from a shared location saving it will delete the original from the workspace Use runnable use Runnable is New get Original is Local else use Runnable false if use Runnable I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor pm throws Core Exception do Save0 Resources Plugin get Workspace run wr get Scheduling Rule 0 null else file is persisted in the metadata not the workspace do Save0 get Launch Manager set Moved From To null null return new Launch Configuration get Location  ILaunchConfigurationWorkingCopy doSave ILaunchConfiguration doSave CoreException isDirty useRunnable isLocal isMoved useRunnable isNew getOriginal isLocal useRunnable useRunnable IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException doSave0 ResourcesPlugin getWorkspace getSchedulingRule doSave0 getLaunchManager setMovedFromTo LaunchConfiguration getLocation
Returns the scheduling rule to be used when saving this launch configuration code null code is a valid scheduling rule return the scheduling rule to be used when saving this launch configuration private I Scheduling Rule get Scheduling Rule List rules new Array List 2 I Resource Rule Factory fac Resources Plugin get Workspace get Rule Factory if is Local working copy will be saved to a workspace location create or modify I File files Resources Plugin get Workspace get Root find Files For Location get Location if files length 0 I File file files 0 I Scheduling Rule rule null if file exists rule fac modify Rule file else rule fac create Rule file rules add Multi Rule combine rule fac validate Edit Rule files I Launch Configuration original get Original if is New is Moved original is Local I File files Resources Plugin get Workspace get Root find Files For Location original get Location if files length 0 rules add Multi Rule combine fac delete Rule files 0 fac validate Edit Rule files if rules is Empty return null return new Multi Rule I Scheduling Rule rules to Array new I Scheduling Rule rules size  ISchedulingRule getSchedulingRule ArrayList IResourceRuleFactory ResourcesPlugin getWorkspace getRuleFactory isLocal IFile ResourcesPlugin getWorkspace getRoot findFilesForLocation getLocation IFile ISchedulingRule modifyRule createRule MultiRule validateEditRule ILaunchConfiguration getOriginal isNew isMoved isLocal IFile ResourcesPlugin getWorkspace getRoot findFilesForLocation getLocation MultiRule deleteRule validateEditRule isEmpty MultiRule ISchedulingRule toArray ISchedulingRule
private void do Save0 throws Core Exception set up from to information if this is a move boolean moved is New is Moved if moved I Launch Configuration to new Launch Configuration get Location I Launch Configuration from get Original get Launch Manager set Moved From To from to delete the old file if this is not a new configuration or the file was renamed moved if moved get Original delete write the new file write New File reset Dirty  doSave0 CoreException isNew isMoved ILaunchConfiguration LaunchConfiguration getLocation ILaunchConfiguration getOriginal getLaunchManager setMovedFromTo getOriginal writeNewFile resetDirty
Writes the new configuration information to a file exception Core Exception if writing the file fails protected void write New File throws Core Exception String xml null Exception e null try xml get Info get AsXML catch IO Exception ioe e ioe catch Parser Configuration Exception pce e pce catch Transformer Exception te e te if e null throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Message Format format Debug Core Messages get String Launch Configuration Working Copy 0  occurred generating launch configuration XML  1 new String e to String null NON NLS 1 if is Local use java io to update configuration file try boolean added false File file get Location to File File dir get Location remove Last Segments 1 to File dir mkdirs if file exists added true file create New File File Output Stream stream new File Output Stream file stream write xml get Bytes UTF8 NON NLS 1 stream close if added get Launch Manager launch Configuration Added new Launch Configuration get Location else get Launch Manager launch Configuration Changed new Launch Configuration get Location catch IO Exception ie throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Message Format format Debug Core Messages get String Launch Configuration Working Copy 0  occurred generating launch configuration XML  1 new String ie to String null NON NLS 1 else use resource API to update configuration file I File file get File I Container dir file get Parent if dir exists throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Debug Core Messages get String Launch Configuration Working Copy Specified container for launch configuration does not exist 2 null NON NLS 1 Byte Array Input Stream stream null try stream new Byte Array Input Stream xml get Bytes UTF8 NON NLS 1 catch Unsupported Encoding Exception ue throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Debug Core Messages get String Launch Configuration Working Copy 5 null NON NLS 1 if file exists file create stream false null else validate edit if file is Read Only I Status status Resources Plugin get Workspace validate Edit new I File file null if status isOK throw new Core Exception status file set Contents stream false false null  CoreException writeNewFile CoreException getInfo getAsXML IOException ParserConfigurationException TransformerException DebugException IStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED MessageFormat DebugCoreMessages getString LaunchConfigurationWorkingCopy _occurred_generating_launch_configuration_XML _1 toString isLocal getLocation toFile getLocation removeLastSegments toFile createNewFile FileOutputStream FileOutputStream getBytes getLaunchManager launchConfigurationAdded LaunchConfiguration getLocation getLaunchManager launchConfigurationChanged LaunchConfiguration getLocation IOException DebugException IStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED MessageFormat DebugCoreMessages getString LaunchConfigurationWorkingCopy _occurred_generating_launch_configuration_XML _1 toString IFile getFile IContainer getParent DebugException IStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED DebugCoreMessages getString LaunchConfigurationWorkingCopy Specified_container_for_launch_configuration_does_not_exist_2 ByteArrayInputStream ByteArrayInputStream getBytes UnsupportedEncodingException DebugException IStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED DebugCoreMessages getString LaunchConfigurationWorkingCopy isReadOnly IStatus ResourcesPlugin getWorkspace validateEdit IFile CoreException setContents
see I Launch Configuration Working Copy set Attribute String int public void set Attribute String attribute Name int value get Info set Attribute attribute Name new Integer value set Dirty  ILaunchConfigurationWorkingCopy setAttribute setAttribute attributeName getInfo setAttribute attributeName setDirty
see I Launch Configuration Working Copy set Attribute String String public void set Attribute String attribute Name String value get Info set Attribute attribute Name value set Dirty  ILaunchConfigurationWorkingCopy setAttribute setAttribute attributeName getInfo setAttribute attributeName setDirty
see I Launch Configuration Working Copy set Attribute String boolean public void set Attribute String attribute Name boolean value get Info set Attribute attribute Name new Boolean value set Dirty  ILaunchConfigurationWorkingCopy setAttribute setAttribute attributeName getInfo setAttribute attributeName setDirty
see I Launch Configuration Working Copy set Attribute String List public void set Attribute String attribute Name List value get Info set Attribute attribute Name value set Dirty  ILaunchConfigurationWorkingCopy setAttribute setAttribute attributeName getInfo setAttribute attributeName setDirty
see I Launch Configuration Working Copy set Attribute String Map public void set Attribute String attribute Name Map value get Info set Attribute attribute Name value set Dirty  ILaunchConfigurationWorkingCopy setAttribute setAttribute attributeName getInfo setAttribute attributeName setDirty
see I Launch Configuration Working Copy get Original public I Launch Configuration get Original return f Original  ILaunchConfigurationWorkingCopy getOriginal ILaunchConfiguration getOriginal fOriginal
Sets the launch configuration this working copy is based on Initializes the attributes of this working copy to the current values of the given configuration param originl the launch configuration this working copy is based on exception Core Exception if unable to initialize this working copy based on the original s current attribute set private void copy From Launch Configuration original throws Core Exception Launch Configuration Info info original get Info set Info info get Copy set Container original get Container reset Dirty  CoreException copyFrom LaunchConfiguration CoreException LaunchConfigurationInfo getInfo setInfo getCopy setContainer getContainer resetDirty
Sets the launch configuration this working copy is based on param original the launch configuration this working copy is based on private void set Original Launch Configuration original f Original original  setOriginal LaunchConfiguration fOriginal
Sets the working copy info object for this working copy param info a copy of attributes from this working copy s original launch configuration protected void set Info Launch Configuration Info info f Info info  setInfo LaunchConfigurationInfo fInfo
see I Launch Configuration is Working Copy public boolean is Working Copy return true  ILaunchConfiguration isWorkingCopy isWorkingCopy
A working copy keeps a local info object that is not cached with the launch manager see Launch Configuration get Info protected Launch Configuration Info get Info return f Info  LaunchConfiguration getInfo LaunchConfigurationInfo getInfo fInfo
Sets this working copy s state to dirty Notifies listeners that this working copy has changed private void set Dirty f Dirty true if suppress Change Notification get Launch Manager get Configuration Notifier notify this Launch Manager CHANGED  setDirty fDirty suppressChangeNotification getLaunchManager getConfigurationNotifier LaunchManager
Sets this working copy s state to not dirty private void reset Dirty f Dirty false  resetDirty fDirty
see I Launch Configuration Working Copy rename String public void rename String name if get Name equals name set Name name f Renamed is New get Original get Name equals name  ILaunchConfigurationWorkingCopy getName setName fRenamed isNew getOriginal getName
Sets the new name for this configuration param name the new name for this configuration private void set Name String name f Name name set Dirty  setName fName setDirty
see I Launch Configuration get Name public String get Name return f Name  ILaunchConfiguration getName getName fName
see I Launch Configuration is Local public boolean is Local return get Container null  ILaunchConfiguration isLocal isLocal getContainer
Returns the location this launch configuration will reside at when saved see I Launch Configuration get Location public I Path get Location if is Moved I Path path null if is Local path Launch Manager LOCAL LAUNCH CONFIGURATION CONTAINER PATH else path get Container get Location path path append get Name LAUNCH CONFIGURATION FILE EXTENSION NON NLS 1 return path return get Original get Location  ILaunchConfiguration getLocation IPath getLocation isMoved IPath isLocal LaunchManager LOCAL_LAUNCH_CONFIGURATION_CONTAINER_PATH getContainer getLocation getName LAUNCH_CONFIGURATION_FILE_EXTENSION getOriginal getLocation
Returns whether this working copy is new or is a working copy of another launch configuration return whether this working copy is new or is a working copy of another launch configuration protected boolean is New return get Original null  isNew getOriginal
Returns whether this working copy is new or if its location has changed from that of its original return whether this working copy is new or if its location has changed from that of its original protected boolean is Moved if is New f Renamed return true I Container new Container get Container I Container original Container Launch Configuration get Original get Container if new Container original Container return false if new Container null return original Container equals new Container return new Container equals original Container  isMoved isNew fRenamed IContainer newContainer getContainer IContainer originalContainer LaunchConfiguration getOriginal getContainer newContainer originalContainer newContainer originalContainer newContainer newContainer originalContainer
A working copy cannot generate a memento see I Launch Configuration get Memento public String get Memento return null  ILaunchConfiguration getMemento getMemento
Returns whether change notification should be suppressed protected boolean suppress Change Notification return f Suppress Change  suppressChangeNotification fSuppressChange
see I Launch Configuration Working Copy set Container I Container public void set Container I Container container if container f Container return if container null if container equals f Container return else if f Container equals container return f Container container set Dirty  ILaunchConfigurationWorkingCopy setContainer IContainer setContainer IContainer fContainer fContainer fContainer fContainer setDirty
Returns the container this working copy will be stored in when saved or code null code if this working copy is local return the container this working copy will be stored in when saved or code null code if this working copy is local protected I Container get Container return f Container  IContainer getContainer fContainer
see org eclipse debug core I Launch Configuration Working Copy set Attributes java util Map public void set Attributes Map attributes get Info set Attributes attributes  ILaunchConfigurationWorkingCopy setAttributes setAttributes getInfo setAttributes

Serializes a XML document into a string encoded in UTF8 format with platform line separators param doc document to serialize return the document as a string throws Transformer Exception if an unrecoverable error occurs during the serialization throws IO Exception if the encoding attempted to be used is not supported public static String serialize Document Document doc throws Transformer Exception IO Exception Byte Array Output Stream s new Byte Array Output Stream Transformer Factory factory Transformer Factory new Instance Transformer transformer factory new Transformer transformer set Output Property Output Keys METHOD xml NON NLS 1 transformer set Output Property Output Keys INDENT yes NON NLS 1 DOM Source source new DOM Source doc Stream Result output Target new Stream Result s transformer transform source output Target return s to String UTF8 NON NLS 1  TransformerException IOException serializeDocument TransformerException IOException ByteArrayOutputStream ByteArrayOutputStream TransformerFactory TransformerFactory newInstance newTransformer setOutputProperty OutputKeys setOutputProperty OutputKeys DOMSource DOMSource StreamResult outputTarget StreamResult outputTarget toString
Returns a Document that can be used to build a DOM tree return the Document throws Parser Configuration Exception if an exception occurs creating the document builder since 3 0 public static Document get Document throws Parser Configuration Exception Document Builder Factory dfactory Document Builder Factory new Instance Document Builder doc Builder dfactory new Document Builder Document doc doc Builder new Document return doc  ParserConfigurationException getDocument ParserConfigurationException DocumentBuilderFactory DocumentBuilderFactory newInstance DocumentBuilder docBuilder newDocumentBuilder docBuilder newDocument
see I Launch Manager add Launch Listener I Launch Listener public void add Launch Listener I Launch Listener listener f Listeners add listener  ILaunchManager addLaunchListener ILaunchListener addLaunchListener ILaunchListener fListeners
Returns a collection of all launch configuration handles in the workspace This collection is initialized lazily return all launch configuration handles private List get All Launch Configurations if f Launch Configuration Index null try f Launch Configuration Index new Array List 20 List configs find Local Launch Configurations verify Configurations configs f Launch Configuration Index configs find Launch Configurations get Workspace Root verify Configurations configs f Launch Configuration Index finally get Workspace add Resource Change Listener this return f Launch Configuration Index  getAllLaunchConfigurations fLaunchConfigurationIndex fLaunchConfigurationIndex ArrayList findLocalLaunchConfigurations verifyConfigurations fLaunchConfigurationIndex findLaunchConfigurations getWorkspaceRoot verifyConfigurations fLaunchConfigurationIndex getWorkspace addResourceChangeListener fLaunchConfigurationIndex
Verify basic integrity of launch configurations in the given list adding valid configs to the collection of all launch configurations Exceptions are logged for invalid configs param verify the list of configs to verify param valid the list to place valid configrations in protected void verify Configurations List verify List valid Iterator configs verify iterator while configs has Next I Launch Configuration config I Launch Configuration configs next if is Valid config valid add config  verifyConfigurations hasNext ILaunchConfiguration ILaunchConfiguration isValid
Returns whether the given launch configuration passes a basic integritiy test by retrieving its type param config the configuration to verify return whether the config meets basic integrity constraints protected boolean is Valid I Launch Configuration config try config get Type catch Core Exception e if e get Status get Code Debug Exception MISSING LAUNCH CONFIGURATION TYPE only log warnings due to something other than a missing launch config type Debug Plugin log e return false return true  isValid ILaunchConfiguration getType CoreException getStatus getCode DebugException MISSING_LAUNCH_CONFIGURATION_TYPE DebugPlugin
Clears all launch configurations if any have been accessed private void clear All Launch Configurations if f Launch Configuration Types null f Launch Configuration Types clear if f Launch Configuration Index null f Launch Configuration Index clear  clearAllLaunchConfigurations fLaunchConfigurationTypes fLaunchConfigurationTypes fLaunchConfigurationIndex fLaunchConfigurationIndex
see I Launch Manager remove Launch I Launch public void remove Launch I Launch launch if internal Remove Launch launch fire Update launch REMOVED fire Update new I Launch launch REMOVED  ILaunchManager removeLaunch ILaunch removeLaunch ILaunch internalRemoveLaunch fireUpdate fireUpdate ILaunch
Removes the given launch object from the collection of registered launches Returns whether the launch was removed param launch the launch to remove return whether the launch was removed protected boolean internal Remove Launch I Launch launch if launch null return false return f Launches remove launch  internalRemoveLaunch ILaunch fLaunches
Fires notification to single listeners that a launch has been added changed removed public void fire Update I Launch launch int update get Launch Notifier notify launch update  fireUpdate ILaunch getLaunchNotifier
Fires notification to multi listeners that a launch has been added changed removed public void fire Update I Launch launches int update get Launches Notifier notify launches update  fireUpdate ILaunch getLaunchesNotifier
Returns whether the given launch is currently registered param launch a launch return whether the given launch is currently registered protected boolean is Registered I Launch launch return f Launches contains launch  isRegistered ILaunch fLaunches
see I Launch Manager get Debug Targets public I Debug Target get Debug Targets List all Targets new Array List f Launches size if f Launches size 0 Iterator e f Launches iterator while e has Next I Debug Target targets I Launch e next get Debug Targets for int i 0 i targets length i all Targets add targets i return I Debug Target all Targets to Array new I Debug Target all Targets size  ILaunchManager getDebugTargets IDebugTarget getDebugTargets allTargets ArrayList fLaunches fLaunches fLaunches hasNext IDebugTarget ILaunch getDebugTargets allTargets IDebugTarget allTargets toArray IDebugTarget allTargets
see I Launch Manager get Launches public I Launch get Launches return I Launch f Launches to Array new I Launch f Launches size  ILaunchManager getLaunches ILaunch getLaunches ILaunch fLaunches toArray ILaunch fLaunches
see I Launch Manager get Processes public I Process get Processes List all Processes new Array List f Launches size Iterator e f Launches iterator while e has Next I Process processes I Launch e next get Processes for int i 0 i processes length i all Processes add processes i return I Process all Processes to Array new I Process all Processes size  ILaunchManager getProcesses IProcess getProcesses allProcesses ArrayList fLaunches fLaunches hasNext IProcess ILaunch getProcesses allProcesses IProcess allProcesses toArray IProcess allProcesses
see I Launch Manager add Launch I Launch public void add Launch I Launch launch if internal Add Launch launch fire Update launch ADDED fire Update new I Launch launch ADDED  ILaunchManager addLaunch ILaunch addLaunch ILaunch internalAddLaunch fireUpdate fireUpdate ILaunch
Adds the given launch object to the list of registered launches and returns whether the launch was added param launch launch to register return whether the launch was added protected boolean internal Add Launch I Launch launch if f Launches contains launch return false f Launches add launch return true  internalAddLaunch ILaunch fLaunches fLaunches
see I Launch Manager remove Launch Listener I Launch Listener public void remove Launch Listener I Launch Listener listener f Listeners remove listener  ILaunchManager removeLaunchListener ILaunchListener removeLaunchListener ILaunchListener fListeners
Return a Launch Configuration Info object initialized from XML contained in the specified stream Simply pass out any exceptions encountered so that caller can deal with them This is important since caller may need access to the actual exception protected Launch Configuration Info create Info FromXML Input Stream stream throws Core Exception Parser Configuration Exception IO Exception SAX Exception Element root null Document Builder parser Document Builder Factory new Instance new Document Builder root parser parse new Input Source stream get Document Element Launch Configuration Info info new Launch Configuration Info info initialize FromXML root return info  LaunchConfigurationInfo LaunchConfigurationInfo createInfoFromXML InputStream CoreException ParserConfigurationException IOException SAXException DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder InputSource getDocumentElement LaunchConfigurationInfo LaunchConfigurationInfo initializeFromXML
Terminates Disconnects any active debug targets processes Clears launch configuration types public void shutdown f Listeners remove All I Launch launches get Launches for int i 0 i launches length i I Launch launch launches i try launch terminate catch Debug Exception e Debug Plugin log e clear All Launch Configurations get Workspace remove Resource Change Listener this  fListeners removeAll ILaunch getLaunches ILaunch DebugException DebugPlugin clearAllLaunchConfigurations getWorkspace removeResourceChangeListener
Returns the info object for the specified launch configuration If the configuration exists but is not yet in the cache an info object is built and added to the cache exception Core Exception if an exception occurs building the info object exception Debug Exception if the config does not exist protected Launch Configuration Info get Info I Launch Configuration config throws Core Exception Launch Configuration Info info Launch Configuration Info f Launch Configurations get config if info null if config exists Input Stream stream null try if config is Local I Path path config get Location File file path to File stream new File Input Stream file else I File file Launch Configuration config get File if file null throw create Debug Exception Message Format format Debug Core Messages get String Launch Manager 30 new String config get Name null NON NLS 1 stream file get Contents info create Info FromXML stream f Launch Configurations put config info catch File Not Found Exception e throw Exception config e catch SAX Exception e throw Exception config e catch Parser Configuration Exception e throw Exception config e catch IO Exception e throw Exception config e finally if stream null try stream close catch IO Exception e throw Exception config e else throw create Debug Exception Message Format format Debug Core Messages get String Launch Manager does not exist new String config get Name config get Location toOS String null NON NLS 1 return info  CoreException DebugException LaunchConfigurationInfo getInfo ILaunchConfiguration CoreException LaunchConfigurationInfo LaunchConfigurationInfo fLaunchConfigurations InputStream isLocal IPath getLocation toFile FileInputStream IFile LaunchConfiguration getFile createDebugException MessageFormat DebugCoreMessages getString LaunchManager getName getContents createInfoFromXML fLaunchConfigurations FileNotFoundException throwException SAXException throwException ParserConfigurationException throwException IOException throwException IOException throwException createDebugException MessageFormat DebugCoreMessages getString LaunchManager does_not_exist getName getLocation toOSString
Throws a debug exception with the given throwable that occurred while processing the given configuration private void throw Exception I Launch Configuration config Throwable e throws Debug Exception I Path path config get Location throw create Debug Exception Message Format format Debug Core Messages get String Launch Manager 0  occurred while reading launch configuration file  1  1 new String e to String path toOS String e NON NLS 1  throwException ILaunchConfiguration DebugException IPath getLocation createDebugException MessageFormat DebugCoreMessages getString LaunchManager _occurred_while_reading_launch_configuration_file_ _1 toString toOSString
Return an instance of Debug Exception containing the specified message and Throwable protected Debug Exception create Debug Exception String message Throwable throwable return new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED message throwable  DebugException DebugException createDebugException DebugException IStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED
Removes the given launch configuration from the cache of configurations When a local configuration is deleted this method is called as there will be no resource delta generated to auto update the cache param configuration the configuration to remove private void remove Info I Launch Configuration configuration f Launch Configurations remove configuration  removeInfo ILaunchConfiguration fLaunchConfigurations
see I Launch Manager get Launch Configurations public I Launch Configuration get Launch Configurations List all Configs get All Launch Configurations return I Launch Configuration all Configs to Array new I Launch Configuration all Configs size  ILaunchManager getLaunchConfigurations ILaunchConfiguration getLaunchConfigurations allConfigs getAllLaunchConfigurations ILaunchConfiguration allConfigs toArray ILaunchConfiguration allConfigs
see I Launch Manager get Launch Configurations I Launch Configuration Type public I Launch Configuration get Launch Configurations I Launch Configuration Type type throws Core Exception Iterator iter get All Launch Configurations iterator List configs new Array List while iter has Next I Launch Configuration config I Launch Configuration iter next if config get Type equals type configs add config return I Launch Configuration configs to Array new I Launch Configuration configs size  ILaunchManager getLaunchConfigurations ILaunchConfigurationType ILaunchConfiguration getLaunchConfigurations ILaunchConfigurationType CoreException getAllLaunchConfigurations ArrayList hasNext ILaunchConfiguration ILaunchConfiguration getType ILaunchConfiguration toArray ILaunchConfiguration
Returns all launch configurations that are stored as resources in the given project param project a project return collection of launch configurations that are stored as resources in the given project protected List get Launch Configurations I Project project Iterator iter get All Launch Configurations iterator List configs new Array List while iter has Next I Launch Configuration config I Launch Configuration iter next I File file config get File if file null file get Project equals project configs add config return configs  getLaunchConfigurations IProject getAllLaunchConfigurations ArrayList hasNext ILaunchConfiguration ILaunchConfiguration IFile getFile getProject
Returns all launch configurations that are stored locally return collection of launch configurations stored lcoally protected List get Local Launch Configurations Iterator iter get All Launch Configurations iterator List configs new Array List while iter has Next I Launch Configuration config I Launch Configuration iter next if config is Local configs add config return configs  getLocalLaunchConfigurations getAllLaunchConfigurations ArrayList hasNext ILaunchConfiguration ILaunchConfiguration isLocal
see I Launch Manager get Launch Configuration I File public I Launch Configuration get Launch Configuration I File file get Workspace add Resource Change Listener this return new Launch Configuration file get Location  ILaunchManager getLaunchConfiguration IFile ILaunchConfiguration getLaunchConfiguration IFile getWorkspace addResourceChangeListener LaunchConfiguration getLocation
see I Launch Manager get Launch Configuration String public I Launch Configuration get Launch Configuration String memento throws Core Exception get Workspace add Resource Change Listener this return new Launch Configuration memento  ILaunchManager getLaunchConfiguration ILaunchConfiguration getLaunchConfiguration CoreException getWorkspace addResourceChangeListener LaunchConfiguration
see I Launch Manager get Launch Configuration Types public I Launch Configuration Type get Launch Configuration Types List types get Launch Configuration Type List return I Launch Configuration Type types to Array new I Launch Configuration Type types size  ILaunchManager getLaunchConfigurationTypes ILaunchConfigurationType getLaunchConfigurationTypes getLaunchConfigurationTypeList ILaunchConfigurationType toArray ILaunchConfigurationType
see I Launch Manager get Launch Configuration Type String public I Launch Configuration Type get Launch Configuration Type String id Iterator iter get Launch Configuration Type List iterator while iter has Next I Launch Configuration Type type I Launch Configuration Type iter next if type get Identifier equals id return type return null  ILaunchManager getLaunchConfigurationType ILaunchConfigurationType getLaunchConfigurationType getLaunchConfigurationTypeList hasNext ILaunchConfigurationType ILaunchConfigurationType getIdentifier
private List get Launch Configuration Type List if f Launch Configuration Types null get Workspace add Resource Change Listener this initialize Launch Configuration Types return f Launch Configuration Types  getLaunchConfigurationTypeList fLaunchConfigurationTypes getWorkspace addResourceChangeListener initializeLaunchConfigurationTypes fLaunchConfigurationTypes
private void initialize Launch Configuration Types I Extension Point extension Point Platform get Extension Registry get Extension Point Debug Plugin get Unique Identifier Debug Plugin EXTENSION POINT LAUNCH CONFIGURATION TYPES I Configuration Element infos extension Point get Configuration Elements f Launch Configuration Types new Array List infos length for int i 0 i infos length i I Configuration Element configuration Element infos i Launch Configuration Type config Type new Launch Configuration Type configuration Element f Launch Configuration Types add config Type  initializeLaunchConfigurationTypes IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugPlugin getUniqueIdentifier DebugPlugin EXTENSION_POINT_LAUNCH_CONFIGURATION_TYPES IConfigurationElement extensionPoint getConfigurationElements fLaunchConfigurationTypes ArrayList IConfigurationElement configurationElement LaunchConfigurationType configType LaunchConfigurationType configurationElement fLaunchConfigurationTypes configType
Initializes contributed launch delegates i e delegates contributed to an existing launch configuration type private void initialize Contributed Delegates I Extension Point extension Point Platform get Extension Registry get Extension Point Debug Plugin get Unique Identifier Debug Plugin EXTENSION POINT LAUNCH DELEGATES I Configuration Element infos extension Point get Configuration Elements f Contributed Delegates new Array List infos length for int i 0 i infos length i I Configuration Element configuration Element infos i Contributed Delegate delegate new Contributed Delegate configuration Element f Contributed Delegates add delegate  initializeContributedDelegates IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugPlugin getUniqueIdentifier DebugPlugin EXTENSION_POINT_LAUNCH_DELEGATES IConfigurationElement extensionPoint getConfigurationElements fContributedDelegates ArrayList IConfigurationElement configurationElement ContributedDelegate ContributedDelegate configurationElement fContributedDelegates
Returns a list of launch delegates contributed for existing launch configuration types return list of Contributed Delegate protected List get Contributed Delegates if f Contributed Delegates null initialize Contributed Delegates return f Contributed Delegates  ContributedDelegate getContributedDelegates fContributedDelegates initializeContributedDelegates fContributedDelegates
Notifies the launch manager that a launch configuration has been deleted The configuration is removed from the cache of infos and from the index of configurations by project and listeners are notified param config the launch configuration that was deleted protected void launch Configuration Deleted I Launch Configuration config remove Info config get All Launch Configurations remove config get Configuration Notifier notify config REMOVED clear Config Name Cache  launchConfigurationDeleted ILaunchConfiguration removeInfo getAllLaunchConfigurations getConfigurationNotifier clearConfigNameCache
Notifies the launch manager that a launch configuration has been added The configuration is added to the index of configurations by project and listeners are notified param config the launch configuration that was added protected void launch Configuration Added I Launch Configuration config if config is Working Copy return if is Valid config List all Configs get All Launch Configurations if all Configs contains config all Configs add config get Configuration Notifier notify config ADDED clear Config Name Cache else launch Configuration Deleted config  launchConfigurationAdded ILaunchConfiguration isWorkingCopy isValid allConfigs getAllLaunchConfigurations allConfigs allConfigs getConfigurationNotifier clearConfigNameCache launchConfigurationDeleted
Notifies the launch manager that a launch configuration has been changed The configuration is removed from the cache of info objects such that the new attributes will be updated on the next access Listeners are notified of the change param config the launch configuration that was changed protected void launch Configuration Changed I Launch Configuration config remove Info config clear Config Name Cache if is Valid config in case the config has been refreshed and it was removed from the index due to out of synch with local file system see bug 36147 add it back will only add if required launch Configuration Added config get Configuration Notifier notify config CHANGED else launch Configuration Deleted config  launchConfigurationChanged ILaunchConfiguration removeInfo clearConfigNameCache isValid launchConfigurationAdded getConfigurationNotifier launchConfigurationDeleted
see I Launch Manager is Existing Launch Configuration Name String public boolean is Existing Launch Configuration Name String name String sorted Config Names get All Sorted Config Names int index Arrays binary Search sorted Config Names name if index 0 return false return true  ILaunchManager isExistingLaunchConfigurationName isExistingLaunchConfigurationName sortedConfigNames getAllSortedConfigNames binarySearch sortedConfigNames
see org eclipse debug core I Launch Manager generate Unique Launch Configuration Name From String public String generate Unique Launch Configuration Name From String base Name int index 1 int length base Name length int copy Index base Name last Index Of NON NLS 1 if copy Index 1 length copy Index 2 base Name char At length 1 String trailer base Name substring copy Index 2 length 1 if is Number trailer try index Integer parse Int trailer base Name base Name substring 0 copy Index catch Number Format Exception nfe String new Name base Name String Buffer buffer null while is Existing Launch Configuration Name new Name buffer new String Buffer base Name buffer append NON NLS 1 buffer append String value Of index index buffer append new Name buffer to String return new Name  ILaunchManager generateUniqueLaunchConfigurationNameFrom generateUniqueLaunchConfigurationNameFrom baseName baseName copyIndex baseName lastIndexOf copyIndex copyIndex baseName charAt baseName copyIndex isNumber parseInt baseName baseName copyIndex NumberFormatException newName baseName StringBuffer isExistingLaunchConfigurationName newName StringBuffer baseName valueOf newName toString newName
Returns whether the given String is composed solely of digits private boolean is Number String string int num Chars string length if num Chars 0 return false for int i 0 i num Chars i if Character is Digit string char At i return false return true  isNumber numChars numChars numChars isDigit charAt
Return a sorted array of the names of all code I Launch Configuration code s in the workspace These are cached and cache is cleared when a new config is added deleted or changed protected String get All Sorted Config Names if f Sorted Config Names null I Launch Configuration configs get Launch Configurations f Sorted Config Names new String configs length for int i 0 i configs length i f Sorted Config Names i configs i get Name Arrays sort f Sorted Config Names return f Sorted Config Names  ILaunchConfiguration getAllSortedConfigNames fSortedConfigNames ILaunchConfiguration getLaunchConfigurations fSortedConfigNames fSortedConfigNames getName fSortedConfigNames fSortedConfigNames
The launch config name cache is cleared when a config is added deleted or changed protected void clear Config Name Cache f Sorted Config Names null  clearConfigNameCache fSortedConfigNames
if directory is Directory Filename Filter filter new Filename Filter public boolean accept File dir String name return dir equals directory name ends With I Launch Configuration LAUNCH CONFIGURATION FILE EXTENSION  isDirectory FilenameFilter FilenameFilter endsWith ILaunchConfiguration LAUNCH_CONFIGURATION_FILE_EXTENSION
Finds and returns all local launch configurations return all local launch configurations exception Core Exception if there is a lower level IO exception protected List find Local Launch Configurations I Path container Path LOCAL LAUNCH CONFIGURATION CONTAINER PATH List configs new Array List 10 final File directory container Path to File if directory is Directory Filename Filter filter new Filename Filter public boolean accept File dir String name return dir equals directory name ends With I Launch Configuration LAUNCH CONFIGURATION FILE EXTENSION String files directory list filter for int i 0 i files length i Launch Configuration config new Launch Configuration container Path append files i configs add config return configs  CoreException findLocalLaunchConfigurations IPath containerPath LOCAL_LAUNCH_CONFIGURATION_CONTAINER_PATH ArrayList containerPath toFile isDirectory FilenameFilter FilenameFilter endsWith ILaunchConfiguration LAUNCH_CONFIGURATION_FILE_EXTENSION LaunchConfiguration LaunchConfiguration containerPath
Finds and returns all launch configurations in the given container and subcontainers param container the container to search exception Core Exception an exception occurs traversing the container return all launch configurations in the given container protected List find Launch Configurations I Container container List list new Array List 10 if container instanceof I Project I Project container is Open return list Resource Proxy Visitor visitor new Resource Proxy Visitor list try container accept visitor I Resource NONE catch Core Exception ce Closed project should not be possible with previous check Iterator iter list iterator List configs new Array List list size while iter has Next I File file I File iter next configs add get Launch Configuration file return configs  CoreException findLaunchConfigurations IContainer ArrayList IProject IProject isOpen ResourceProxyVisitor ResourceProxyVisitor IResource CoreException ArrayList hasNext IFile IFile getLaunchConfiguration
Traverses the delta looking for added removed changed launch configuration files see I Resource Change Listener resource Changed I Resource Change Event public void resource Changed I Resource Change Event event I Resource Delta delta event get Delta if delta null try if fg Visitor null fg Visitor new Launch Manager Visitor delta accept fg Visitor catch Core Exception e Debug Plugin log e  IResourceChangeListener resourceChanged IResourceChangeEvent resourceChanged IResourceChangeEvent IResourceDelta getDelta fgVisitor fgVisitor LaunchManagerVisitor fgVisitor CoreException DebugPlugin
Returns the launch configurations specified by the given XML document param root XML document return list of launch configurations exception IO Exception if an exception occurs reading the XML protected List get Configs FromXML Element root throws Core Exception Debug Exception invalid Format new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Debug Core Messages get String Launch Manager Invalid launch configuration index  18 null NON NLS 1 if root get Node Name equals Ignore Case launch Configurations NON NLS 1 throw invalid Format read each launch configuration List configs new Array List 4 Node List list root get Child Nodes int length list get Length for int i 0 i length i Node node list item i short type node get Node Type if type Node ELEMENT NODE Element entry Element node String node Name entry get Node Name if node Name equals launch Configuration NON NLS 1 throw invalid Format String memento entry get Attribute memento NON NLS 1 if memento null throw invalid Format configs add get Launch Configuration memento return configs  IOException getConfigsFromXML CoreException DebugException invalidFormat DebugException IStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED DebugCoreMessages getString LaunchManager Invalid_launch_configuration_index _18 getNodeName equalsIgnoreCase launchConfigurations invalidFormat ArrayList NodeList getChildNodes getLength getNodeType ELEMENT_NODE nodeName getNodeName nodeName launchConfiguration invalidFormat getAttribute invalidFormat getLaunchConfiguration
The specified project has just opened add all launch configs in the project to the index of all configs param project the project that has been opened exception Core Exception if reading the index fails protected void project Opened I Project project List configs find Launch Configurations project if configs is Empty Iterator iterator configs iterator while iterator has Next I Launch Configuration config I Launch Configuration iterator next launch Configuration Added config  CoreException projectOpened IProject findLaunchConfigurations isEmpty hasNext ILaunchConfiguration ILaunchConfiguration launchConfigurationAdded
The specified project has just closed remove its launch configurations from the cached index param project the project that has been closed exception Core Exception if writing the index fails protected void project Closed I Project project List configs get Launch Configurations project if configs is Empty Iterator iterator configs iterator while iterator has Next I Launch Configuration configuration I Launch Configuration iterator next launch Configuration Deleted configuration  CoreException projectClosed IProject getLaunchConfigurations isEmpty hasNext ILaunchConfiguration ILaunchConfiguration launchConfigurationDeleted
class Launch Manager Visitor implements I Resource Delta Visitor see I Resource Delta Visitor visit I Resource Delta public boolean visit I Resource Delta delta if delta null return false if 0 delta get Flags I Resource Delta OPEN if delta get Resource instanceof I Project I Project project I Project delta get Resource if project is Open Launch Manager this project Opened project else Launch Manager this project Closed project return false I Resource resource delta get Resource if resource instanceof I File I File file I File resource if I Launch Configuration LAUNCH CONFIGURATION FILE EXTENSION equals file get File Extension I Path config Path file get Location If the file has already been deleted reconstruct the full filesystem path if config Path null I Path workspace Relative Path delta get Full Path config Path get Workspace Root get Location append workspace Relative Path I Launch Configuration handle new Launch Configuration config Path switch delta get Kind case I Resource Delta ADDED Launch Manager this launch Configuration Added handle break case I Resource Delta REMOVED Launch Manager this launch Configuration Deleted handle break case I Resource Delta CHANGED Launch Manager this launch Configuration Changed handle break return false else if resource instanceof I Container return true return true  LaunchManagerVisitor IResourceDeltaVisitor IResourceDeltaVisitor IResourceDelta IResourceDelta getFlags IResourceDelta getResource IProject IProject IProject getResource isOpen LaunchManager projectOpened LaunchManager projectClosed IResource getResource IFile IFile IFile ILaunchConfiguration LAUNCH_CONFIGURATION_FILE_EXTENSION getFileExtension IPath configPath getLocation configPath IPath workspaceRelativePath getFullPath configPath getWorkspaceRoot getLocation workspaceRelativePath ILaunchConfiguration LaunchConfiguration configPath getKind IResourceDelta LaunchManager launchConfigurationAdded IResourceDelta LaunchManager launchConfigurationDeleted IResourceDelta LaunchManager launchConfigurationChanged IContainer
see I Launch Manager add Launch Configuration Listener I Launch Configuration Listener public void add Launch Configuration Listener I Launch Configuration Listener listener f Launch Configuration Listeners add listener  ILaunchManager addLaunchConfigurationListener ILaunchConfigurationListener addLaunchConfigurationListener ILaunchConfigurationListener fLaunchConfigurationListeners
see I Launch Manager remove Launch Configuration Listener I Launch Configuration Listener public void remove Launch Configuration Listener I Launch Configuration Listener listener f Launch Configuration Listeners remove listener  ILaunchManager removeLaunchConfigurationListener ILaunchConfigurationListener removeLaunchConfigurationListener ILaunchConfigurationListener fLaunchConfigurationListeners
Register source locators exception Core Exception if an exception occurs reading the extensions private void initialize Source Locators I Extension Point extension Point Platform get Extension Registry get Extension Point Debug Plugin get Unique Identifier Debug Plugin EXTENSION POINT SOURCE LOCATORS I Configuration Element infos extension Point get Configuration Elements f Source Locators new Hash Map infos length for int i 0 i infos length i I Configuration Element configuration Element infos i String id configuration Element get Attribute id NON NLS 1 if id null f Source Locators put id configuration Element else invalid status handler I Status s new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception INTERNAL ERROR Message Format format Debug Core Messages get String Launch Manager Invalid source locator extentsion defined by plug in    0       id   not specified 12 new String configuration Element get Declaring Extension get Namespace null NON NLS 1 Debug Plugin log s  CoreException initializeSourceLocators IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugPlugin getUniqueIdentifier DebugPlugin EXTENSION_POINT_SOURCE_LOCATORS IConfigurationElement extensionPoint getConfigurationElements fSourceLocators HashMap IConfigurationElement configurationElement configurationElement getAttribute fSourceLocators configurationElement IStatus IStatus DebugPlugin getUniqueIdentifier DebugException INTERNAL_ERROR MessageFormat DebugCoreMessages getString LaunchManager Invalid_source_locator_extentsion_defined_by_plug in___ ______id___not_specified_12 configurationElement getDeclaringExtension getNamespace DebugPlugin
Load comparator extensions private void initialize Comparators I Extension Point extension Point Platform get Extension Registry get Extension Point Debug Plugin get Unique Identifier Debug Plugin EXTENSION POINT LAUNCH CONFIGURATION COMPARATORS I Configuration Element infos extension Point get Configuration Elements f Comparators new Hash Map infos length for int i 0 i infos length i I Configuration Element configuration Element infos i String attr configuration Element get Attribute attribute NON NLS 1 if attr null f Comparators put attr new Launch Configuration Comparator configuration Element else invalid status handler I Status s new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception INTERNAL ERROR Message Format format Debug Core Messages get String Launch Manager Invalid launch configuration comparator extension defined by plug in  0    attribute not specified 1 new String configuration Element get Declaring Extension get Namespace null NON NLS 1 Debug Plugin log s  initializeComparators IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugPlugin getUniqueIdentifier DebugPlugin EXTENSION_POINT_LAUNCH_CONFIGURATION_COMPARATORS IConfigurationElement extensionPoint getConfigurationElements fComparators HashMap IConfigurationElement configurationElement configurationElement getAttribute fComparators LaunchConfigurationComparator configurationElement IStatus IStatus DebugPlugin getUniqueIdentifier DebugException INTERNAL_ERROR MessageFormat DebugCoreMessages getString LaunchManager Invalid_launch_configuration_comparator_extension_defined_by_plug in_ _ _attribute_not_specified_1 configurationElement getDeclaringExtension getNamespace DebugPlugin
see I Launch Manager new Source Locator String public I Persistable Source Locator new Source Locator String identifier throws Core Exception if f Source Locators null initialize Source Locators I Configuration Element config I Configuration Element f Source Locators get identifier if config null throw new Core Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception INTERNAL ERROR Message Format format Debug Core Messages get String Launch Manager Source locator does not exist   0  13 new String identifier null NON NLS 1 I Persistable Source Locator source Locator I Persistable Source Locator config create Executable Extension class NON NLS 1 if source Locator instanceof Abstract Source Lookup Director Abstract Source Lookup Director source Locator set Id identifier return source Locator  ILaunchManager newSourceLocator IPersistableSourceLocator newSourceLocator CoreException fSourceLocators initializeSourceLocators IConfigurationElement IConfigurationElement fSourceLocators CoreException IStatus DebugPlugin getUniqueIdentifier DebugException INTERNAL_ERROR MessageFormat DebugCoreMessages getString LaunchManager Source_locator_does_not_exist__ _13 IPersistableSourceLocator sourceLocator IPersistableSourceLocator createExecutableExtension sourceLocator AbstractSourceLookupDirector AbstractSourceLookupDirector sourceLocator setId sourceLocator
Returns the comparator registered for the given attribute or code null code if none param attribute Name attribute for which a comparator is required return comparator or code null code if none protected Comparator get Comparator String attribute Name Map map get Comparators return Comparator map get attribute Name  attributeName getComparator attributeName getComparators attributeName
Returns comparators loading if required protected Map get Comparators if f Comparators null initialize Comparators return f Comparators  getComparators fComparators initializeComparators fComparators
private I Workspace get Workspace return Resources Plugin get Workspace  IWorkspace getWorkspace ResourcesPlugin getWorkspace
private I Workspace Root get Workspace Root return get Workspace get Root  IWorkspaceRoot getWorkspaceRoot getWorkspace getRoot
see org eclipse debug core I Launch Manager add Launches org eclipse debug core I Launch public void add Launches I Launch launches List added new Array List launches length for int i 0 i launches length i if internal Add Launch launches i added add launches i if added is Empty I Launch added Launches I Launch added to Array new I Launch added size fire Update added Launches ADDED for int i 0 i added Launches length i fire Update launches i ADDED  ILaunchManager addLaunches ILaunch addLaunches ILaunch ArrayList internalAddLaunch isEmpty ILaunch addedLaunches ILaunch toArray ILaunch fireUpdate addedLaunches addedLaunches fireUpdate
see org eclipse debug core I Launch Manager add Launch Listener org eclipse debug core I Launches Listener public void add Launch Listener I Launches Listener listener f Launches Listeners add listener  ILaunchManager addLaunchListener ILaunchesListener addLaunchListener ILaunchesListener fLaunchesListeners
see org eclipse debug core I Launch Manager remove Launches org eclipse debug core I Launch public void remove Launches I Launch launches List removed new Array List launches length for int i 0 i launches length i if internal Remove Launch launches i removed add launches i if removed is Empty I Launch removed Launches I Launch removed to Array new I Launch removed size fire Update removed Launches REMOVED for int i 0 i removed Launches length i fire Update removed Launches i REMOVED  ILaunchManager removeLaunches ILaunch removeLaunches ILaunch ArrayList internalRemoveLaunch isEmpty ILaunch removedLaunches ILaunch toArray ILaunch fireUpdate removedLaunches removedLaunches fireUpdate removedLaunches
see org eclipse debug core I Launch Manager remove Launch Listener org eclipse debug core I Launches Listener public void remove Launch Listener I Launches Listener listener f Launches Listeners remove listener  ILaunchManager removeLaunchListener ILaunchesListener removeLaunchListener ILaunchesListener fLaunchesListeners
Indicates the given launch configuration is being moved from the given location to the new location param from the location a launch configuration is being moved from or code null code param to the location a launch configuration is being moved to or code null code protected void set Moved From To I Launch Configuration from I Launch Configuration to f From from f To to  setMovedFromTo ILaunchConfiguration ILaunchConfiguration fFrom fTo
see org eclipse debug core I Launch Manager get Moved From org eclipse debug core I Launch Configuration public I Launch Configuration get Moved From I Launch Configuration added Configuration if added Configuration equals f To return f From return null  ILaunchManager getMovedFrom ILaunchConfiguration ILaunchConfiguration getMovedFrom ILaunchConfiguration addedConfiguration addedConfiguration fTo fFrom
see org eclipse debug core I Launch Manager get Moved To org eclipse debug core I Launch Configuration public I Launch Configuration get Moved To I Launch Configuration removed Configuration if removed Configuration equals f From return f To return null  ILaunchManager getMovedTo ILaunchConfiguration ILaunchConfiguration getMovedTo ILaunchConfiguration removedConfiguration removedConfiguration fFrom fTo
private List f List protected Resource Proxy Visitor List list f List list  fList ResourceProxyVisitor fList
see org eclipse core resources I Resource Proxy Visitor visit org eclipse core resources I Resource Proxy public boolean visit I Resource Proxy proxy if proxy get Type I Resource FILE if I Launch Configuration LAUNCH CONFIGURATION FILE EXTENSION equals Ignore Case proxy request Full Path get File Extension f List add proxy request Resource return false return true  IResourceProxyVisitor IResourceProxy IResourceProxy getType IResource ILaunchConfiguration LAUNCH_CONFIGURATION_FILE_EXTENSION equalsIgnoreCase requestFullPath getFileExtension fList requestResource
private Launch Notifier get Launch Notifier return new Launch Notifier  LaunchNotifier getLaunchNotifier LaunchNotifier
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Debug Core Messages get String Launch Manager An exception occurred during launch change notification  1 exception NON NLS 1 Debug Plugin log status  ISafeRunnable handleException handleException IStatus IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR DebugCoreMessages getString LaunchManager An_exception_occurred_during_launch_change_notification _1 DebugPlugin
see org eclipse core runtime I Safe Runnable run public void run throws Exception switch f Type case ADDED f Listener launch Added f Launch break case REMOVED f Listener launch Removed f Launch break case CHANGED if is Registered f Launch f Listener launch Changed f Launch break  ISafeRunnable fType fListener launchAdded fLaunch fListener launchRemoved fLaunch isRegistered fLaunch fListener launchChanged fLaunch
Notifies the given listener of the add change remove param listener the listener to notify param launch the launch that has changed param update the type of change public void notify I Launch launch int update f Launch launch f Type update Object copied Listeners f Listeners get Listeners for int i 0 i copied Listeners length i f Listener I Launch Listener copied Listeners i Platform run this f Launch null f Listener null  ILaunch fLaunch fType copiedListeners fListeners getListeners copiedListeners fListener ILaunchListener copiedListeners fLaunch fListener
private Launches Notifier get Launches Notifier return new Launches Notifier  LaunchesNotifier getLaunchesNotifier LaunchesNotifier
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Debug Core Messages get String Launch Manager An exception occurred during launch change notification  1 exception NON NLS 1 Debug Plugin log status  ISafeRunnable handleException handleException IStatus IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR DebugCoreMessages getString LaunchManager An_exception_occurred_during_launch_change_notification _1 DebugPlugin
see org eclipse core runtime I Safe Runnable run public void run throws Exception switch f Type case ADDED f Listener launches Added f Notifier Launches break case REMOVED f Listener launches Removed f Notifier Launches break case CHANGED case TERMINATE if f Registered null List registered null for int j 0 j f Notifier Launches length j if is Registered f Notifier Launches j if registered null registered add f Notifier Launches j else if registered null registered new Array List f Notifier Launches length for int k 0 k j k registered add f Notifier Launches k if registered null f Registered f Notifier Launches else f Registered I Launch registered to Array new I Launch registered size if f Registered length 0 if f Type CHANGED f Listener launches Changed f Registered if f Type TERMINATE f Listener instanceof I Launches Listener2 I Launches Listener2 f Listener launches Terminated f Registered break  ISafeRunnable fType fListener launchesAdded fNotifierLaunches fListener launchesRemoved fNotifierLaunches fRegistered fNotifierLaunches isRegistered fNotifierLaunches fNotifierLaunches ArrayList fNotifierLaunches fNotifierLaunches fRegistered fNotifierLaunches fRegistered ILaunch toArray ILaunch fRegistered fType fListener launchesChanged fRegistered fType fListener ILaunchesListener2 ILaunchesListener2 fListener launchesTerminated fRegistered
Notifies the given listener of the adds changes removes param launches the launches that changed param update the type of change public void notify I Launch launches int update f Notifier Launches launches f Type update f Registered null Object copied Listeners f Launches Listeners get Listeners for int i 0 i copied Listeners length i f Listener I Launches Listener copied Listeners i Platform run this f Notifier Launches null f Registered null f Listener null  ILaunch fNotifierLaunches fType fRegistered copiedListeners fLaunchesListeners getListeners copiedListeners fListener ILaunchesListener copiedListeners fNotifierLaunches fRegistered fListener
protected Configuration Notifier get Configuration Notifier return new Configuration Notifier  ConfigurationNotifier getConfigurationNotifier ConfigurationNotifier
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Debug Core Messages get String Launch Manager An exception occurred during launch configuration change notification  3 exception NON NLS 1 Debug Plugin log status  ISafeRunnable handleException handleException IStatus IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR DebugCoreMessages getString LaunchManager An_exception_occurred_during_launch_configuration_change_notification _3 DebugPlugin
see org eclipse core runtime I Safe Runnable run public void run throws Exception switch f Type case ADDED f Listener launch Configuration Added f Configuration break case REMOVED f Listener launch Configuration Removed f Configuration break case CHANGED f Listener launch Configuration Changed f Configuration break  ISafeRunnable fType fListener launchConfigurationAdded fConfiguration fListener launchConfigurationRemoved fConfiguration fListener launchConfigurationChanged fConfiguration
Notifies the given listener of the add change remove param configuration the configuration that has changed param update the type of change public void notify I Launch Configuration configuration int update f Configuration configuration f Type update if f Launch Configuration Listeners size 0 Object listeners f Launch Configuration Listeners get Listeners for int i 0 i listeners length i f Listener I Launch Configuration Listener listeners i Platform run this f Configuration null f Listener null  ILaunchConfiguration fConfiguration fType fLaunchConfigurationListeners fLaunchConfigurationListeners getListeners fListener ILaunchConfigurationListener fConfiguration fListener
Load comparator extensions exception Core Exception if an exception occurs reading the extensions private void initialize Launch Modes I Extension Point extension Point Platform get Extension Registry get Extension Point Debug Plugin get Unique Identifier Debug Plugin EXTENSION POINT LAUNCH MODES I Configuration Element infos extension Point get Configuration Elements f Launch Modes new Hash Map for int i 0 i infos length i I Configuration Element configuration Element infos i try I Launch Mode mode new Launch Mode configuration Element f Launch Modes put mode get Identifier mode catch Core Exception e Debug Plugin log e  CoreException initializeLaunchModes IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugPlugin getUniqueIdentifier DebugPlugin EXTENSION_POINT_LAUNCH_MODES IConfigurationElement extensionPoint getConfigurationElements fLaunchModes HashMap IConfigurationElement configurationElement ILaunchMode LaunchMode configurationElement fLaunchModes getIdentifier CoreException DebugPlugin
Returns an array of environment variables to be used when launching the given configuration or code null code if unspecified param configuration launch configuration throws Core Exception if unable to access associated attribute or if unable to resolve a variable in an environment variable s value public String get Environment I Launch Configuration configuration throws Core Exception Map env Map configuration get Attribute ATTR ENVIRONMENT VARIABLES Map null if env Map null return null Map env null build base environment env new Hash Map boolean append configuration get Attribute ATTR APPEND ENVIRONMENT VARIABLES true if append env put All get Native Environment Add variables from config Iterator iter env Map entry Set iterator boolean win32 Platform getOS equals Constants OS WIN32 while iter has Next Map Entry entry Map Entry iter next String key String entry get Key if win32 Win32 vars are case insensitive Uppercase everything so that for example p AtH will correctly replace PATH key key to Upper Case String value String entry get Value translate any string substitution variables String translated Variables Plugin get Default get String Variable Manager perform String Substitution value env put key translated iter env entry Set iterator List strings new Array List env size while iter has Next Map Entry entry Map Entry iter next String Buffer buffer new String Buffer String entry get Key buffer append append String entry get Value strings add buffer to String return String strings to Array new String strings size  CoreException getEnvironment ILaunchConfiguration CoreException envMap getAttribute ATTR_ENVIRONMENT_VARIABLES envMap HashMap getAttribute ATTR_APPEND_ENVIRONMENT_VARIABLES putAll getNativeEnvironment envMap entrySet OS_WIN32 hasNext getKey pAtH toUpperCase getValue VariablesPlugin getDefault getStringVariableManager performStringSubstitution entrySet ArrayList hasNext StringBuffer StringBuffer getKey getValue toString toArray
Returns a copy of the native system environment variables On WIN32 all keys variable names are returned in uppercase Note that WIN32 s environment is not case sensitive return the a copy of the native system environment variables public Map get Native Environment if fg Native Env null return new Hash Map fg Native Env fg Native Env new Hash Map try String native Command null boolean windowsOS false boolean is Win9xME false see bug 50567 String file Name null if Platform getOS equals Constants OS WIN32 windowsOS true String os Name System get Property os name NON NLS 1 is Win9xME os Name null os Name starts With Windows 9 os Name starts With Windows ME NON NLS 1 NON NLS 2 if is Win9xME Win 95 98 and ME SET might not return therefore we pipe into a file I Path state Location Debug Plugin get Default get State Location file Name state Location toOS String File separator env txt NON NLS 1 native Command command com C set file Name NON NLS 1 else Win NT 2K XP native Command cmd exe C set NON NLS 1 else if Platform getOS equals Constants OS UNKNOWN native Command printenv NON NLS 1 if native Command null return fg Native Env Process process Runtime get Runtime exec native Command if is Win9xME read piped data on Win 95 98 and ME Properties p new Properties File file new File file Name File Input Stream stream new File Input Stream file p load stream stream close if file delete file delete On Exit if delete fails try again on VM close for Enumeration enum p keys enum has More Elements Win32 s environment vars are case insensitive Put everything to uppercase so that for example the PATH variable will match p AtH correctly on Windows String key String enum next Element to Upper Case no need to cast value fg Native Env put key p get key else read process directly on other platforms Buffered Reader reader new Buffered Reader new Input Stream Reader process get Input Stream String line reader read Line while line null int separator line index Of if separator 0 String key line substring 0 separator if windowsOS Win32 s environment vars are case insensitive Put everything to uppercase so that for example the PATH variable will match p AtH correctly on Windows key key to Upper Case String value line substring separator 1 fg Native Env put key value line reader read Line reader close catch IO Exception e Native environment fetching code failed This can easily happen and is not useful to log return new Hash Map fg Native Env  getNativeEnvironment fgNativeEnv HashMap fgNativeEnv fgNativeEnv HashMap nativeCommand isWin9xME fileName OS_WIN32 osName getProperty isWin9xME osName osName startsWith osName startsWith isWin9xME IPath stateLocation DebugPlugin getDefault getStateLocation fileName stateLocation toOSString nativeCommand fileName nativeCommand OS_UNKNOWN nativeCommand nativeCommand fgNativeEnv getRuntime nativeCommand isWin9xME fileName FileInputStream FileInputStream deleteOnExit hasMoreElements pAtH nextElement toUpperCase fgNativeEnv BufferedReader BufferedReader InputStreamReader getInputStream readLine indexOf pAtH toUpperCase fgNativeEnv readLine IOException HashMap fgNativeEnv
public I Source Path Computer get Source Path Computer I Launch Configuration configuration throws Core Exception String id null id configuration get Attribute I Source Path Computer ATTR SOURCE PATH COMPUTER ID String null if id null use default computer for configuration type if any return configuration get Type get Source Path Computer return get Source Path Computer id  ISourcePathComputer getSourcePathComputer ILaunchConfiguration CoreException getAttribute ISourcePathComputer ATTR_SOURCE_PATH_COMPUTER_ID getType getSourcePathComputer getSourcePathComputer
Initializes source container type and source path computer extensions private void initialize Source Container Types if source Container Types null I Extension Point extension Point Platform get Extension Registry get Extension Point Debug Plugin get Unique Identifier Debug Plugin EXTENSION POINT SOURCE CONTAINER TYPES I Configuration Element extensions extension Point get Configuration Elements source Container Types new Hash Map for int i 0 i extensions length i source Container Types put extensions i get Attribute id NON NLS 1 new Source Container Type extensions i extension Point Platform get Extension Registry get Extension Point Debug Plugin get Unique Identifier Debug Plugin EXTENSION POINT SOURCE PATH COMPUTERS extensions extension Point get Configuration Elements source Path Computers new Hash Map for int i 0 i extensions length i source Path Computers put extensions i get Attribute id NON NLS 1 new Source Path Computer extensions i  initializeSourceContainerTypes sourceContainerTypes IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugPlugin getUniqueIdentifier DebugPlugin EXTENSION_POINT_SOURCE_CONTAINER_TYPES IConfigurationElement extensionPoint getConfigurationElements sourceContainerTypes HashMap sourceContainerTypes getAttribute SourceContainerType extensionPoint getExtensionRegistry getExtensionPoint DebugPlugin getUniqueIdentifier DebugPlugin EXTENSION_POINT_SOURCE_PATH_COMPUTERS extensionPoint getConfigurationElements sourcePathComputers HashMap sourcePathComputers getAttribute SourcePathComputer
see org eclipse debug core I Launch Manager get Source Container Type java lang String public I Source Container Type get Source Container Type String id initialize Source Container Types return I Source Container Type source Container Types get id  ILaunchManager getSourceContainerType ISourceContainerType getSourceContainerType initializeSourceContainerTypes ISourceContainerType sourceContainerTypes
public I Source Container Type get Source Container Types initialize Source Container Types Collection containers source Container Types values return I Source Container Type containers to Array new I Source Container Type containers size  ISourceContainerType getSourceContainerTypes initializeSourceContainerTypes sourceContainerTypes ISourceContainerType toArray ISourceContainerType
see org eclipse debug core I Launch Manager get Source Path Computer java lang String public I Source Path Computer get Source Path Computer String id initialize Source Container Types return I Source Path Computer source Path Computers get id  ILaunchManager getSourcePathComputer ISourcePathComputer getSourcePathComputer initializeSourceContainerTypes ISourcePathComputer sourcePathComputers
public I Launch Mode get Launch Modes if f Launch Modes null initialize Launch Modes Collection collection f Launch Modes values return I Launch Mode collection to Array new I Launch Mode collection size  ILaunchMode getLaunchModes fLaunchModes initializeLaunchModes fLaunchModes ILaunchMode toArray ILaunchMode
public I Launch Mode get Launch Mode String mode if f Launch Modes null initialize Launch Modes return I Launch Mode f Launch Modes get mode  ILaunchMode getLaunchMode fLaunchModes initializeLaunchModes ILaunchMode fLaunchModes

Constructs a new launch mode exception Core Exception if required attributes are missing public Launch Mode I Configuration Element element throws Core Exception f Configuration Element element verify Attributes  CoreException LaunchMode IConfigurationElement CoreException fConfigurationElement verifyAttributes
Verifies required attributes exception Core Exception if required attributes are missing private void verify Attributes throws Core Exception verify Attribute Exists mode NON NLS 1 verify Attribute Exists label NON NLS 1  CoreException verifyAttributes CoreException verifyAttributeExists verifyAttributeExists
Verifies the given attribute exists exception Core Exception if attribute does not exist private void verify Attribute Exists String name throws Core Exception if f Configuration Element get Attribute name null missing Attribute name  CoreException verifyAttributeExists CoreException fConfigurationElement getAttribute missingAttribute
private void missing Attribute String attr Name throws Core Exception throw new Core Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Message Format format Debug Core Messages get String Launch Mode 1 new String attr Name null NON NLS 1  missingAttribute attrName CoreException CoreException IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR MessageFormat DebugCoreMessages getString LaunchMode attrName
see org eclipse debug core I Launch Mode get Identifier public String get Identifier return f Configuration Element get Attribute mode NON NLS 1  ILaunchMode getIdentifier getIdentifier fConfigurationElement getAttribute
see org eclipse debug core I Launch Mode get Label public String get Label return f Configuration Element get Attribute label NON NLS 1  ILaunchMode getLabel getLabel fConfigurationElement getAttribute

Creates a listener list with the given initial capacity param capacity the number of listeners which this list can initially accept without growing its internal representation must be at least 1 public Listener List int capacity if capacity 1 throw new Illegal Argument Exception f Listeners new Object capacity f Size 0  ListenerList IllegalArgumentException fListeners fSize
Adds a listener to the list Has no effect if an identical listener is already registered param listener a listener public synchronized void add Object listener if listener null throw new Illegal Argument Exception check for duplicates using identity for int i 0 i f Size i if f Listeners i listener return grow array if necessary if f Size f Listeners length Object temp new Object f Size 2 1 System arraycopy f Listeners 0 temp 0 f Size f Listeners temp f Listeners f Size listener  IllegalArgumentException fSize fListeners fSize fListeners fSize fListeners fSize fListeners fListeners fSize
Returns an array containing all the registered listeners The resulting array is unaffected by subsequent adds or removes If there are no listeners registered the result is an empty array singleton instance no garbage is created Use this method when notifying listeners so that any modifications to the listener list during the notification will have no effect on the notification itself public synchronized Object get Listeners if f Size 0 return Empty Array Object result new Object f Size System arraycopy f Listeners 0 result 0 f Size return result  getListeners fSize EmptyArray fSize fListeners fSize
Removes a listener from the list Has no effect if an identical listener was not already registered param listener a listener public synchronized void remove Object listener if listener null throw new Illegal Argument Exception for int i 0 i f Size i if f Listeners i listener if f Size 0 f Listeners new Object 1 else if i f Size f Listeners i f Listeners f Size f Listeners f Size null return  IllegalArgumentException fSize fListeners fSize fListeners fSize fListeners fListeners fSize fListeners fSize
Removes all the listeners from the list public synchronized void remove All f Listeners new Object 0 f Size 0  removeAll fListeners fSize
Returns the number of registered listeners return the number of registered listeners public int size return f Size  fSize

public static Logical Structure Manager get Default if fg Default null fg Default new Logical Structure Manager return fg Default  LogicalStructureManager getDefault fgDefault fgDefault LogicalStructureManager fgDefault
public I Logical Structure Type get Logical Structure Types I Value value initialize Iterator iterator f Types iterator List select new Array List while iterator has Next I Logical Structure Type type I Logical Structure Type iterator next if type provides Logical Structure value select add type return I Logical Structure Type select to Array new I Logical Structure Type select size  ILogicalStructureType getLogicalStructureTypes IValue fTypes ArrayList hasNext ILogicalStructureType ILogicalStructureType providesLogicalStructure ILogicalStructureType toArray ILogicalStructureType
private void initialize if f Types null I Extension Point point Platform get Extension Registry get Extension Point Debug Plugin get Unique Identifier Debug Plugin EXTENSION POINT LOGICAL STRUCTURE TYPES I Configuration Element extensions point get Configuration Elements f Types new Array List extensions length for int i 0 i extensions length i I Configuration Element extension extensions i Logical Structure Type type try type new Logical Structure Type extension f Types add type catch Core Exception e Debug Plugin log e  fTypes IExtensionPoint getExtensionRegistry getExtensionPoint DebugPlugin getUniqueIdentifier DebugPlugin EXTENSION_POINT_LOGICAL_STRUCTURE_TYPES IConfigurationElement getConfigurationElements fTypes ArrayList IConfigurationElement LogicalStructureType LogicalStructureType fTypes CoreException DebugPlugin

Constructs a new logical structure type and verifies required attributes exception Core Exception if required attributes are missing public Logical Structure Type I Configuration Element element throws Core Exception f Configuration Element element verify Attributes  CoreException LogicalStructureType IConfigurationElement CoreException fConfigurationElement verifyAttributes
Verifies required attributes exception Core Exception if required attributes are missing private void verify Attributes throws Core Exception verify Attribute Exists id NON NLS 1 verify Attribute Exists description NON NLS 1 verify Attribute Exists class NON NLS 1 f Model Id f Configuration Element get Attribute model Identifier NON NLS 1 if f Model Id null missing Attribute model Identifier NON NLS 1  CoreException verifyAttributes CoreException verifyAttributeExists verifyAttributeExists verifyAttributeExists fModelId fConfigurationElement getAttribute modelIdentifier fModelId missingAttribute modelIdentifier
Verifies the given attribute exists exception Core Exception if attribute does not exist private void verify Attribute Exists String name throws Core Exception if f Configuration Element get Attribute name null missing Attribute name  CoreException verifyAttributeExists CoreException fConfigurationElement getAttribute missingAttribute
private void missing Attribute String attr Name throws Core Exception throw new Core Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Message Format format Debug Core Messages get String Logical Structure Type 7 new String attr Name null NON NLS 1  missingAttribute attrName CoreException CoreException IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR MessageFormat DebugCoreMessages getString LogicalStructureType attrName
see org eclipse debug internal core I Logical Structure Type get Description public String get Description return f Configuration Element get Attribute description NON NLS 1  ILogicalStructureType getDescription getDescription fConfigurationElement getAttribute
see org eclipse debug internal core I Logical Structure Type get Id public String get Id return f Configuration Element get Attribute id NON NLS 1  ILogicalStructureType getId getId fConfigurationElement getAttribute
see org eclipse debug internal core I Logical Structure Type get Logical Structure org eclipse debug core model I Value public I Value get Logical Structure I Value value throws Core Exception return get Delegate get Logical Structure value  ILogicalStructureType getLogicalStructure IValue IValue getLogicalStructure IValue CoreException getDelegate getLogicalStructure
public boolean provides Logical Structure I Value value if value get Model Identifier equals f Model Id return get Delegate provides Logical Structure value return false  providesLogicalStructure IValue getModelIdentifier fModelId getDelegate providesLogicalStructure
protected I Logical Structure Type Delegate get Delegate if f Delegate null try f Delegate I Logical Structure Type Delegate f Configuration Element create Executable Extension class NON NLS 1 catch Core Exception e Debug Plugin log e return f Delegate  ILogicalStructureTypeDelegate getDelegate fDelegate fDelegate ILogicalStructureTypeDelegate fConfigurationElement createExecutableExtension CoreException DebugPlugin fDelegate

public interface I Dynamic Rendering Factory return a list of dynamic rendering types I Dynamic Rendering Info get Rendering Infos  IDynamicRenderingFactory IDynamicRenderingInfo getRenderingInfos

public interface I Dynamic Rendering Info return the parent rendering definition of the dynamic rendering type I Memory Rendering Info get Parent Rendering Info  IDynamicRenderingInfo IMemoryRenderingInfo getParentRenderingInfo
I Memory Rendering Info get Parent Rendering Info return the rendering id of this rendering String get Rendering Id  IMemoryRenderingInfo getParentRenderingInfo getRenderingId
String get Rendering Id return the name of this dynamic rendering String get Name  getRenderingId getName

Returns the expression of this memory block The expression will be used to construct the tab label of the memory view return expression of the memory block exception Debug Exception if this method fails Reasons include ul li Failure communicating with the engine The Debug Exception s status code contains the underlying exception responsible for the failure li  DebugException DebugException
Get the base address of this memory block in Big Integer return  BigInteger
public Big Integer get Big Base Address return address size in number of bytes public int get Address Size  BigInteger getBigBaseAddress getAddressSize
Indicate if the base address of this memory block block could be modified If return true set Base Address will be used to change the base address of this memory block return  setBaseAddress
return true to indicate that the memory block manages the changes in the memory block If the memory block manages changes the memory block is expected to cache the Memory Byte array returned by get Bytes From Offset and get Bytes From Address The change information will not be calculated by the memory view Intead the memory block keeps track of the bytes and marks the bytes as changed unchanged Turn off both the CHANGE and UNCHANGED bits if the memory block does not contain history for the address If this function returns false the Memory View will calculate delta information for each byte based on its history  MemoryByte getBytesFromOffset getBytesFromAddress
Set the base address of this memory block param address throws Debug Exception if the method fails Reasons inlucde ul li Failure communicating with the engine The Debug Exception s status code contains the underlying exception responsible for the failure li  DebugException DebugException
Get bytes based on offset and length Memory at base address offset should be returned Return an array of I Memory Each I Memory object represents a section of the memory block The I Memory object allows debug adapters to provide more information about a section of memory Refer to I Memory for details param offset param length return throws Debug Exception if the method fails  IMemory IMemory IMemory IMemory DebugException
Get bytes based on a given address Return an array of I Memory Each I Memory object represents a section of the memory block The I Memory object allows debug adapters to provide more information about a section of memory Refer to I Memory for details param address param length return throws Debug Exception if method fails  IMemory IMemory IMemory IMemory DebugException
public Memory Byte get Bytes From Address Big Integer address long length throws Debug Exception return true if the platform is big endian false otherwise public boolean is Big Endian  MemoryByte getBytesFromAddress BigInteger DebugException isBigEndian
Enable this memory block Block is enabled when its view tab is in focus public void enable 
Disable this memory block Block is disabled when its view tab loses focus public void disable 
Indicate if this memory block is enabled disabled return 
Delete this memory block public void delete 
Return the I Memory Block Retrieval responsible for getting this memory block return  IMemoryBlockRetrieval

Retrieves a memory block param expression expression to be evalutated to an address evaluation context can be retrieved from the selected debug element param selected selected debug element from Debug View return throws Debug Exception  DebugException
return the string to be used in place of this memory content when bytes are not available Return null if the byte is available 

Called when a memory block is added param memory 
Called when a memory block is removed param memory 

Tell the manager that a memory block has been added param mem param add Default Renderings true if default renderings are to be added  addDefaultRenderings
Tell the manager that a memory block has been removed param mem 
Add a listener to the memory block manager param listener 
Remove a listener from the memory block manager param listener 
Get all memory blocks in the workbench return 
Get all memory blocks associated with the given debug target i e memory Block get Debug Target debug Target param debug Target return  memoryBlock getDebugTarget debugTarget debugTarget
Get all memory blocks associated with the given memory block retrieval param retrieve return 

public interface I Memory Rendering return the memory block of this rendering public I Memory Block get Block  IMemoryRendering IMemoryBlock getBlock
public I Memory Block get Block return the rendering id of this rendering public String get Rendering Id  IMemoryBlock getBlock getRenderingId

param memory Block param rendering Id return the rendering created Null if the rendering is not to be created Throws a Debug Exception if an error has occurred  memoryBlock renderingId

return the name of the rendering type Name will be used to label the view tab of the rendering 
public String get Name return the id of this rendering public String get Rendering Id  getName getRenderingId
Given the property id get rendering specific property Return null if the property is nto available param property Id return  propertyId
public String get Property String property Id return the configuration element of the rendering public I Configuration Element get Config Element  getProperty propertyId IConfigurationElement getConfigElement
param property Id return the configuration element of the property  propertyId
public I Configuration Element get Property Config Element String property Id return the configuration element of all the properties public I Configuration Element get All Properties  IConfigurationElement getPropertyConfigElement propertyId IConfigurationElement getAllProperties

This function is called when a new rendering is added param memory param rendering Id  renderingId
Fired when a memory rendering is removed param memory 

Tell the manager to add a new memory rendering param mem param rendering Id return the I Memory Rendering object created  renderingId IMemoryRendering
Tell the manager that a memory rendering has been removed Remove all renderings with that same memory block and rendering ids param mem 
Add the specified rendering from the manager and notify listeners param rendering 
Remove the specified rendering from the manager and notify listeners param rendering 
Add a listener to the memory rendering manager param listener 
Remove a listener from the memory rendering manager param listener 
Get renderings based on given memory block and rendering id Return all renderings related to the memory block if rendering Id is null Return an empty array if the rendering cannot be found param mem param rendering Id  renderingId renderingId
Get all memory renderings from the given debug target Return an empty array if nothing can be found for the debug target param target return 
Get all memory renderings from the given memory block Return an empty array if nothing can be found for the memory block param block return 
param rendering Id return rendering information of the given rendering id  renderingId
param obj return all rendering information valid for the given object 
param obj return default renderings ids for the given object 

Returns the memory block manager return the memory block manager see I Memory Block Manager since 3 0 public static I Memory Block Manager get Memory Block Manager if fg Memory Block Manager null fg Memory Block Manager new Memory Block Manager return fg Memory Block Manager  IMemoryBlockManager IMemoryBlockManager getMemoryBlockManager fgMemoryBlockManager fgMemoryBlockManager MemoryBlockManager fgMemoryBlockManager
Returns the memory rendering manager return the memory rendering manager see I Memory Rendering Manager since 3 0 public static I Memory Rendering Manager get Memory Rendering Manager if fg Memory Rendering Manager null fg Memory Rendering Manager new Memory Rendering Manager return fg Memory Rendering Manager  IMemoryRenderingManager IMemoryRenderingManager getMemoryRenderingManager fgMemoryRenderingManager fgMemoryRenderingManager MemoryRenderingManager fgMemoryRenderingManager
public static void plugin Shutdown if fg Memory Block Manager null fg Memory Block Manager shutdown if fg Memory Rendering Manager null fg Memory Rendering Manager shutdown  pluginShutdown fgMemoryBlockManager fgMemoryBlockManager fgMemoryRenderingManager fgMemoryRenderingManager
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception Debug Plugin log exception  ISafeRunnable handleException handleException DebugPlugin
see org eclipse core runtime I Safe Runnable run public void run throws Exception switch f Type case ADDED f Listener Memory Block Added f Memory Block break case REMOVED f Listener Memory Block Removed f Memory Block break  ISafeRunnable fType fListener MemoryBlockAdded fMemoryBlock fListener MemoryBlockRemoved fMemoryBlock
Notify listeners of added removed memory block events public void notify I Memory Block memory Block int update if listeners null f Type update Object copied Listeners listeners to Array new I Memory Block Listener listeners size for int i 0 i copied Listeners length i f Listener I Memory Block Listener copied Listeners i f Memory Block memory Block Platform run this f Listener null f Memory Block null  IMemoryBlock memoryBlock fType copiedListeners toArray IMemoryBlockListener copiedListeners fListener IMemoryBlockListener copiedListeners fMemoryBlock memoryBlock fListener fMemoryBlock
private Memory Block Notifier get Memory Block Notifier return new Memory Block Notifier  MemoryBlockNotifier getMemoryBlockNotifier MemoryBlockNotifier
public void add Memory Block I Memory Block mem boolean add Default Renderings if memory Blocks null return if mem null Debug Plugin log Message Null argument passed into I Memory Block Manager add Memory Block null NON NLS 1 return do not allow duplicates if memory Blocks contains mem return Memory Rendering Manager rendering Manager Memory Rendering Manager get Memory Rendering Manager if add Default Renderings rendering Manager set Handle Memory Block Added Event false else rendering Manager set Handle Memory Block Added Event true if mem null Debug Plugin log Message Null argument passed into I Memory Block Manager add Memory Block null NON NLS 1 return memory Blocks add mem add listener for the first memory block added if memory Blocks size 1 Debug Plugin get Default add Debug Event Listener this notify Listeners mem ADDED always set it back to true rendering Manager set Handle Memory Block Added Event true  addMemoryBlock IMemoryBlock addDefaultRenderings memoryBlocks DebugPlugin logMessage IMemoryBlockManager addMemoryBlock memoryBlocks MemoryRenderingManager renderingManager MemoryRenderingManager getMemoryRenderingManager addDefaultRenderings renderingManager setHandleMemoryBlockAddedEvent renderingManager setHandleMemoryBlockAddedEvent DebugPlugin logMessage IMemoryBlockManager addMemoryBlock memoryBlocks memoryBlocks DebugPlugin getDefault addDebugEventListener notifyListeners renderingManager setHandleMemoryBlockAddedEvent
public void remove Memory Block I Memory Block mem if memory Blocks null return if mem null Debug Plugin log Message Null argument passed into I Memory Block Manager remove Memory Block null NON NLS 1 return memory Blocks remove mem remove listener after the last memory block has been removed if memory Blocks size 0 Debug Plugin get Default remove Debug Event Listener this if mem instanceof I Extended Memory Block I Extended Memory Block mem delete notify Listeners mem REMOVED  removeMemoryBlock IMemoryBlock memoryBlocks DebugPlugin logMessage IMemoryBlockManager removeMemoryBlock memoryBlocks memoryBlocks DebugPlugin getDefault removeDebugEventListener IExtendedMemoryBlock IExtendedMemoryBlock notifyListeners
public void add Listener I Memory Block Listener listener if listeners null return if listener null Debug Plugin log Message Null argument passed into I Memory Block Manager add Listener null NON NLS 1 return if listeners contains listener listeners add listener  addListener IMemoryBlockListener DebugPlugin logMessage IMemoryBlockManager addListener
public void remove Listener I Memory Block Listener listener if listeners null return if listener null Debug Plugin log Message Null argument passed into I Memory Block Manager remove Listener null NON NLS 1 return if listeners contains listener listeners remove listener  removeListener IMemoryBlockListener DebugPlugin logMessage IMemoryBlockManager removeListener
public I Memory Block get All Memory Blocks I Memory Block blocks I Memory Block memory Blocks to Array new I Memory Block memory Blocks size return blocks  IMemoryBlock getAllMemoryBlocks IMemoryBlock IMemoryBlock memoryBlocks toArray IMemoryBlock memoryBlocks
public I Memory Block get Memory Blocks I Debug Target debug Target I Memory Block blocks I Memory Block memory Blocks to Array new I Memory Block memory Blocks size Array List memory Blocks List new Array List for int i 0 i blocks length i if blocks i get Debug Target debug Target memory Blocks List add blocks i return I Memory Block memory Blocks List to Array new I Memory Block memory Blocks List size  IMemoryBlock getMemoryBlocks IDebugTarget debugTarget IMemoryBlock IMemoryBlock memoryBlocks toArray IMemoryBlock memoryBlocks ArrayList memoryBlocksList ArrayList getDebugTarget debugTarget memoryBlocksList IMemoryBlock memoryBlocksList toArray IMemoryBlock memoryBlocksList
public I Memory Block get Memory Blocks I Memory Block Retrieval retrieve I Memory Block blocks I Memory Block memory Blocks to Array new I Memory Block memory Blocks size Array List memory Blocks List new Array List blocks length for int i 0 i blocks length i if blocks i instanceof I Extended Memory Block if I Extended Memory Block blocks i get Memory Block Retrieval retrieve memory Blocks List add blocks i else standard memory block always uses the debug target as the memory block retrieval if blocks i get Debug Target retrieve memory Blocks List add blocks i return I Memory Block memory Blocks List to Array new I Memory Block memory Blocks List size  IMemoryBlock getMemoryBlocks IMemoryBlockRetrieval IMemoryBlock IMemoryBlock memoryBlocks toArray IMemoryBlock memoryBlocks ArrayList memoryBlocksList ArrayList IExtendedMemoryBlock IExtendedMemoryBlock getMemoryBlockRetrieval memoryBlocksList getDebugTarget memoryBlocksList IMemoryBlock memoryBlocksList toArray IMemoryBlock memoryBlocksList
private void notify Listeners I Memory Block memory Block int event get Memory Block Notifier notify memory Block event  notifyListeners IMemoryBlock memoryBlock getMemoryBlockNotifier memoryBlock
public void handle Debug Events Debug Event events for int i 0 i events length i handle Debug Event events i  handleDebugEvents DebugEvent handleDebugEvent
public void handle Debug Event Debug Event event Object obj event get Source I Debug Target dt null if event get Kind Debug Event TERMINATE a terminate event could happen from an I Thread or I Debug Target only handle a debug event from the debug target if obj instanceof I Debug Target dt I Debug Target obj get Memory Blocks will return an empty array if dt is null I Memory Block deleted Memory Blocks get Memory Blocks dt for int i 0 i deleted Memory Blocks length i remove Memory Block deleted Memory Blocks i  handleDebugEvent DebugEvent getSource IDebugTarget getKind DebugEvent IThread IDebugTarget IDebugTarget IDebugTarget getMemoryBlocks IMemoryBlock deletedMemoryBlocks getMemoryBlocks deletedMemoryBlocks removeMemoryBlock deletedMemoryBlocks
Clean up when the plugin is shut down public void shutdown if listeners null listeners clear listeners null if memory Blocks null memory Blocks clear memory Blocks null  memoryBlocks memoryBlocks memoryBlocks

public Memory Rendering I Memory Block block String rendering Id f Block block f Rendering Id rendering Id  MemoryRendering IMemoryBlock renderingId fBlock fRenderingId renderingId
return public I Memory Block get Block return f Block  IMemoryBlock getBlock fBlock
see org eclipse debug core model I Memory Rendering get Rendering Id public String get Rendering Id return f Rendering Id  IMemoryRendering getRenderingId getRenderingId fRenderingId

public Memory Rendering Info String rendering Id String name I Configuration Element element f Rendering Id rendering Id f Name name f Element element  MemoryRenderingInfo renderingId IConfigurationElement fRenderingId renderingId fName fElement
return public String get Rendering Id return f Rendering Id  getRenderingId fRenderingId
return public String get Name return f Name  getName fName
Add a property to the rendering type param property Id param value public void add Property String property Id I Configuration Element element if f Properties null f Properties new Hashtable if property Id null element null f Properties put property Id element  propertyId addProperty propertyId IConfigurationElement fProperties fProperties propertyId fProperties propertyId
public String get Property String property Id if f Properties null I Configuration Element element I Configuration Element f Properties get property Id if element null String ret element get Attribute VALUE return ret return null return null  getProperty propertyId fProperties IConfigurationElement IConfigurationElement fProperties propertyId getAttribute
see org eclipse debug ui I Memory Rendering Info get Element public I Configuration Element get Config Element return f Element  IMemoryRenderingInfo getElement IConfigurationElement getConfigElement fElement
public I Configuration Element get Property Config Element String property Id if f Properties null I Configuration Element element I Configuration Element f Properties get property Id return element return null  IConfigurationElement getPropertyConfigElement propertyId fProperties IConfigurationElement IConfigurationElement fProperties propertyId
public I Configuration Element get All Properties Enumeration enum f Properties elements I Configuration Element elements new I Configuration Element f Properties size int i 0 while enum has More Elements elements i I Configuration Element enum next Element i return elements  IConfigurationElement getAllProperties fProperties IConfigurationElement IConfigurationElement fProperties hasMoreElements IConfigurationElement nextElement

see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception Debug Plugin log exception  ISafeRunnable handleException handleException DebugPlugin
see org eclipse core runtime I Safe Runnable run public void run throws Exception switch f Type case ADDED f Listener Memory Block Rendering Added f Rendering break case REMOVED f Listener Memory Block Rendering Removed f Rendering break  ISafeRunnable fType fListener MemoryBlockRenderingAdded fRendering fListener MemoryBlockRenderingRemoved fRendering
Notfied listeners of added removed rendering events public void notify int update I Memory Rendering rendering if listeners null f Type update f Rendering rendering Object copied Listeners listeners to Array new I Memory Rendering Listener listeners size for int i 0 i copied Listeners length i f Listener I Memory Rendering Listener copied Listeners i Platform run this f Listener null  IMemoryRendering fType fRendering copiedListeners toArray IMemoryRenderingListener copiedListeners fListener IMemoryRenderingListener copiedListeners fListener
public Memory Rendering Manager Memory Block Manager get Memory Block Manager add Listener this build Memory Rendering Info  MemoryRenderingManager MemoryBlockManager getMemoryBlockManager addListener buildMemoryRenderingInfo
Build rendering info in the manager Then read in extended rendering types private void build Memory Rendering Info get rendering extensions get Extended Rendering  buildMemoryRenderingInfo getExtendedRendering
Read in and store extension to rendering private void get Extended Rendering I Extension Point rendering Platform get Extension Registry get Extension Point Debug Plugin get Unique Identifier RENDERING EXT I Extension extensions rendering get Extensions for int i 0 i extensions length i I Configuration Element elements extensions i get Configuration Elements for int j 0 j elements length j if elements j get Name equals RENDERING ELEMENT add Rendering elements j else if elements j get Name equals RENDERING PROPERTY ELEMENT add Rendering Property elements j else if elements j get Name equals DEFAULT RENDERING add Default Renderings elements j else if elements j get Name equals RENDERING BIND add Rendering Bind elements j else Debug Plugin log Message Unknown element in rendering extenstion elements j get Name null NON NLS 1  getExtendedRendering IExtensionPoint getExtensionRegistry getExtensionPoint DebugPlugin getUniqueIdentifier RENDERING_EXT IExtension getExtensions IConfigurationElement getConfigurationElements getName RENDERING_ELEMENT addRendering getName RENDERING_PROPERTY_ELEMENT addRenderingProperty getName DEFAULT_RENDERING addDefaultRenderings getName RENDERING_BIND addRenderingBind DebugPlugin logMessage getName
param elements param j private void add Rendering I Configuration Element element String rendering Id element get Attribute RENDERING ID String name element get Attribute NAME if any of them is null do not add log an error if rendering Id null name null String extension element get Declaring Extension get Unique Identifier Debug Plugin log Message Rendering defined is malformed extension null NON NLS 1 else Memory Rendering Info info new Memory Rendering Info rendering Id name element if f Memory Rendering Info contains Key rendering Id if a rendering already exists with the same id log a warning of duplicated rendering Status status new Status I Status WARNING Debug Plugin get Unique Identifier 0 Duplicated rendering definition rendering Id null NON NLS 1 Debug Plugin log status f Memory Rendering Info put rendering Id info f Rendering Info Order List add rendering Id get sub elements from rendering and parse as properties I Configuration Element sub Elements element get Children for int k 0 k sub Elements length k if sub Elements k get Name equals RENDERING PROPERTY ELEMENT add Rendering Property sub Elements k else Debug Plugin log Message Unknown element in rendering extenstion element get Name null NON NLS 1  addRendering IConfigurationElement renderingId getAttribute RENDERING_ID getAttribute renderingId getDeclaringExtension getUniqueIdentifier DebugPlugin logMessage MemoryRenderingInfo MemoryRenderingInfo renderingId fMemoryRenderingInfo containsKey renderingId IStatus DebugPlugin getUniqueIdentifier renderingId DebugPlugin fMemoryRenderingInfo renderingId fRenderingInfoOrderList renderingId IConfigurationElement subElements getChildren subElements subElements getName RENDERING_PROPERTY_ELEMENT addRenderingProperty subElements DebugPlugin logMessage getName
param elements param j private void add Rendering Property I Configuration Element element String rendering Id element get Attribute RENDERING ID String property Id element get Attribute NAME String property Value element get Attribute VALUE if rendering Id null property Id null property Value null String extension element get Declaring Extension get Unique Identifier Debug Plugin log Message Rendering property defined is malformed extension null NON NLS 1 else find the rendering Memory Rendering Info info Memory Rendering Info f Memory Rendering Info get rendering Id if info null Debug Plugin log Message Rendering info for this property is not found property Id null NON NLS 1 else add the property to the rendering info add Property property Id element  addRenderingProperty IConfigurationElement renderingId getAttribute RENDERING_ID propertyId getAttribute propertyValue getAttribute renderingId propertyId propertyValue getDeclaringExtension getUniqueIdentifier DebugPlugin logMessage MemoryRenderingInfo MemoryRenderingInfo fMemoryRenderingInfo renderingId DebugPlugin logMessage propertyId addProperty propertyId
Process the configuration element into default rendering for a type of memory block param element private void add Default Renderings I Configuration Element element String memory Block Class element get Attribute MEMORYBLOCKCLASS String renderings element get Attribute RENDERINGS if memory Block Class null renderings null String extension element get Declaring Extension get Unique Identifier Debug Plugin log Message Default rendering defined is malformed extension null NON NLS 1 return Array List renderings Array new Array List seperate renderings and create an array int idx renderings index Of NON NLS 1 if idx 1 renderings Array add renderings else String Tokenizer tokenizer new String Tokenizer renderings NON NLS 1 while tokenizer has More Elements String rendering tokenizer next Token rendering rendering trim check if rendering is valid renderings Array add rendering if f Default Renderings null f Default Renderings new Hashtable check hash table to see if something is alreay added Array List definedrenderings Array List f Default Renderings get memory Block Class if definedrenderings null add renderings to hashtable f Default Renderings put memory Block Class renderings Array else for int i 0 i renderings Array size i append to the list if definedrenderings contains renderings Array get i definedrenderings add renderings Array get i  addDefaultRenderings IConfigurationElement memoryBlockClass getAttribute getAttribute memoryBlockClass getDeclaringExtension getUniqueIdentifier DebugPlugin logMessage ArrayList renderingsArray ArrayList indexOf renderingsArray StringTokenizer StringTokenizer hasMoreElements nextToken renderingsArray fDefaultRenderings fDefaultRenderings ArrayList ArrayList fDefaultRenderings memoryBlockClass fDefaultRenderings memoryBlockClass renderingsArray renderingsArray renderingsArray renderingsArray
private void add Rendering Bind I Configuration Element element String memory Block Class element get Attribute MEMORYBLOCKCLASS String renderings element get Attribute RENDERINGS if memory Block Class null renderings null String extension element get Declaring Extension get Unique Identifier Debug Plugin log Message Rendering bind defined is malformed extension null NON NLS 1 return Array List renderings Array new Array List seperate renderings and create an array int idx renderings index Of NON NLS 1 if idx 1 renderings Array add renderings else String Tokenizer tokenizer new String Tokenizer renderings NON NLS 1 while tokenizer has More Elements String rendering tokenizer next Token rendering rendering trim check if rendering is valid renderings Array add rendering if f Rendering Binds null f Rendering Binds new Hashtable check hash table to see if something is alreay added Array List rendering Ids Array List f Rendering Binds get memory Block Class if rendering Ids null add renderings to hashtable f Rendering Binds put memory Block Class renderings Array else for int i 0 i renderings Array size i append to the list if rendering Ids contains renderings Array get i rendering Ids add renderings Array get i  addRenderingBind IConfigurationElement memoryBlockClass getAttribute getAttribute memoryBlockClass getDeclaringExtension getUniqueIdentifier DebugPlugin logMessage ArrayList renderingsArray ArrayList indexOf renderingsArray StringTokenizer StringTokenizer hasMoreElements nextToken renderingsArray fRenderingBinds fRenderingBinds ArrayList renderingIds ArrayList fRenderingBinds memoryBlockClass renderingIds fRenderingBinds memoryBlockClass renderingsArray renderingsArray renderingIds renderingsArray renderingIds renderingsArray
private Memory Rendering Manager Notifier get Memory Block Notifier return new Memory Rendering Manager Notifier  MemoryRenderingManagerNotifier getMemoryBlockNotifier MemoryRenderingManagerNotifier
public I Memory Rendering add Memory Block Rendering I Memory Block mem String rendering Id throws Debug Exception if f Renderings null return null I Memory Rendering new Rendering create Rendering mem rendering Id if an error has occurred or if user has canceled if new Rendering null return new Rendering if f Renderings contains new Rendering return new Rendering f Renderings add new Rendering add listener for the first memory block added if f Renderings size 1 Debug Plugin get Default add Debug Event Listener this notify Listeners ADDED new Rendering return new Rendering  IMemoryRendering addMemoryBlockRendering IMemoryBlock renderingId DebugException fRenderings IMemoryRendering newRendering createRendering renderingId newRendering newRendering fRenderings newRendering newRendering fRenderings newRendering fRenderings DebugPlugin getDefault addDebugEventListener notifyListeners newRendering newRendering
param mem param rendering Id return the memory rendering created by the factory or default rendering Returns null if an error has occurred public I Memory Rendering create Rendering I Memory Block mem String rendering Id throws Debug Exception I Memory Rendering Info info get Rendering Info rendering Id if info null I Configuration Element element info get Config Element if element null String factory Att element get Attribute RENDERING FACTORY if factory Att null Object obj null try obj element create Executable Extension RENDERING FACTORY catch Core Exception e throw a debug exception due to error I Status stat e get Status Debug Exception de new Debug Exception stat throw de if obj null return new Memory Rendering mem rendering Id if obj instanceof I Memory Rendering Factory I Memory Rendering Factory factory I Memory Rendering Factory obj I Memory Rendering rendering null rendering factory create Rendering mem rendering Id return rendering else String message Message Format format Debug Core Messages get String Memory Rendering Manager Error Msg new String rendering Id NON NLS 1 throw a debug exception because the rendering info cannot be located Status status new Status I Status ERROR Debug Plugin get Unique Identifier 0 message null NON NLS 1 Debug Exception de new Debug Exception status throw de else String message Message Format format Debug Core Messages get String Memory Rendering Manager Error Msg new String rendering Id NON NLS 1 throw a debug exception because the rendering info cannot be located Status status new Status I Status ERROR Debug Plugin get Unique Identifier 0 message null NON NLS 1 Debug Exception de new Debug Exception status throw de return new Memory Rendering mem rendering Id  renderingId IMemoryRendering createRendering IMemoryBlock renderingId DebugException IMemoryRenderingInfo getRenderingInfo renderingId IConfigurationElement getConfigElement factoryAtt getAttribute RENDERING_FACTORY factoryAtt createExecutableExtension RENDERING_FACTORY CoreException IStatus getStatus DebugException DebugException MemoryRendering renderingId IMemoryRenderingFactory IMemoryRenderingFactory IMemoryRenderingFactory IMemoryRendering createRendering renderingId MessageFormat DebugCoreMessages getString MemoryRenderingManager ErrorMsg renderingId IStatus DebugPlugin getUniqueIdentifier DebugException DebugException MessageFormat DebugCoreMessages getString MemoryRenderingManager ErrorMsg renderingId IStatus DebugPlugin getUniqueIdentifier DebugException DebugException MemoryRendering renderingId
public void remove Memory Block Rendering I Memory Block mem String rendering Id if f Renderings null return I Memory Rendering to Remove get Renderings mem rendering Id for int i 0 i to Remove length i f Renderings remove to Remove i remove listener after the last memory block has been removed if f Renderings size 0 Debug Plugin get Default remove Debug Event Listener this notify Listeners REMOVED to Remove i  removeMemoryBlockRendering IMemoryBlock renderingId fRenderings IMemoryRendering toRemove getRenderings renderingId toRemove fRenderings toRemove fRenderings DebugPlugin getDefault removeDebugEventListener notifyListeners toRemove
public void add Memory Block Rendering I Memory Rendering rendering throws Debug Exception do not allow duplicated objects if f Renderings contains rendering return f Renderings add rendering add listener for the first memory block added if f Renderings size 1 Debug Plugin get Default add Debug Event Listener this notify Listeners ADDED rendering  addMemoryBlockRendering IMemoryRendering DebugException fRenderings fRenderings fRenderings DebugPlugin getDefault addDebugEventListener notifyListeners
public void remove Memory Block Rendering I Memory Rendering rendering if rendering null return if f Renderings contains rendering return f Renderings remove rendering remove listener after the last memory block has been removed if f Renderings size 0 Debug Plugin get Default remove Debug Event Listener this notify Listeners REMOVED rendering  removeMemoryBlockRendering IMemoryRendering fRenderings fRenderings fRenderings DebugPlugin getDefault removeDebugEventListener notifyListeners
public I Memory Rendering get Renderings I Memory Block mem String rendering Id if rendering Id null return get Renderings From Memory Block mem Array List ret new Array List for int i 0 i f Renderings size i if f Renderings get i instanceof I Memory Rendering I Memory Rendering rendering I Memory Rendering f Renderings get i if rendering get Block mem rendering Id equals rendering get Rendering Id ret add rendering return I Memory Rendering ret to Array new I Memory Rendering ret size  IMemoryRendering getRenderings IMemoryBlock renderingId renderingId getRenderingsFromMemoryBlock ArrayList ArrayList fRenderings fRenderings IMemoryRendering IMemoryRendering IMemoryRendering fRenderings getBlock renderingId getRenderingId IMemoryRendering toArray IMemoryRendering
public I Memory Rendering get Renderings From Debug Target I Debug Target target Array List ret new Array List for int i 0 i f Renderings size i if f Renderings get i instanceof I Memory Rendering I Memory Rendering rendering I Memory Rendering f Renderings get i if rendering get Block get Debug Target target ret add rendering return I Memory Rendering ret to Array new I Memory Rendering ret size  IMemoryRendering getRenderingsFromDebugTarget IDebugTarget ArrayList ArrayList fRenderings fRenderings IMemoryRendering IMemoryRendering IMemoryRendering fRenderings getBlock getDebugTarget IMemoryRendering toArray IMemoryRendering
public I Memory Rendering get Renderings From Memory Block I Memory Block block Array List ret new Array List for int i 0 i f Renderings size i if f Renderings get i instanceof I Memory Rendering I Memory Rendering rendering I Memory Rendering f Renderings get i if rendering get Block block ret add rendering return I Memory Rendering ret to Array new I Memory Rendering ret size  IMemoryRendering getRenderingsFromMemoryBlock IMemoryBlock ArrayList ArrayList fRenderings fRenderings IMemoryRendering IMemoryRendering IMemoryRendering fRenderings getBlock IMemoryRendering toArray IMemoryRendering
public void add Listener I Memory Rendering Listener listener if listeners null return if listener null Debug Plugin log Message Null argument passed into I Memory Rendering Manager add Listener null NON NLS 1 return if listeners contains listener listeners add listener  addListener IMemoryRenderingListener DebugPlugin logMessage IMemoryRenderingManager addListener
public void remove Listener I Memory Rendering Listener listener if listeners null return if listener null Debug Plugin log Message Null argument passed into I Memory Rendering Manager remove Listener null NON NLS 1 return if listeners contains listener listeners remove listener  removeListener IMemoryRenderingListener DebugPlugin logMessage IMemoryRenderingManager removeListener
private void notify Listeners int update I Memory Rendering rendering get Memory Block Notifier notify update rendering  notifyListeners IMemoryRendering getMemoryBlockNotifier
public void handle Debug Events Debug Event events for int i 0 i events length i handle Debug Event events i  handleDebugEvents DebugEvent handleDebugEvent
public void handle Debug Event Debug Event event Object obj event get Source I Debug Target dt null if event get Kind Debug Event TERMINATE a terminate event could happen from an I Thread or I Debug Target Only handle terminate event from debug target if obj instanceof I Debug Target dt I Debug Target obj returns empty array if dt null I Memory Rendering deletedrendering get Renderings From Debug Target dt for int i 0 i deletedrendering length i remove Memory Block Rendering deletedrendering i get Block deletedrendering i get Rendering Id  handleDebugEvent DebugEvent getSource IDebugTarget getKind DebugEvent IThread IDebugTarget IDebugTarget IDebugTarget IMemoryRendering getRenderingsFromDebugTarget removeMemoryBlockRendering getBlock getRenderingId
public void Memory Block Added I Memory Block memory if f Handle Add Event get default renderings String rendering Ids get Default Renderings memory add renderings for int i 0 i rendering Ids length i try add Memory Block Rendering memory rendering Ids i catch Debug Exception e catch error silently log error Debug Plugin log Message Cannot create default rendering rendering Ids i null NON NLS 1  MemoryBlockAdded IMemoryBlock fHandleAddEvent renderingIds getDefaultRenderings renderingIds addMemoryBlockRendering renderingIds DebugException DebugPlugin logMessage renderingIds
public void Memory Block Removed I Memory Block memory remove all renderings related to the deleted memory block I Memory Rendering renderings get Renderings From Memory Block memory for int i 0 i renderings length i remove Memory Block Rendering renderings i get Block renderings i get Rendering Id  MemoryBlockRemoved IMemoryBlock IMemoryRendering getRenderingsFromMemoryBlock removeMemoryBlockRendering getBlock getRenderingId
public I Memory Rendering Info get Rendering Info String rendering Id Memory Rendering Info info Memory Rendering Info f Memory Rendering Info get rendering Id if info null return info return null  IMemoryRenderingInfo getRenderingInfo renderingId MemoryRenderingInfo MemoryRenderingInfo fMemoryRenderingInfo renderingId
public I Memory Rendering Info get All Rendering Info Object obj String hierarchy get Hierarchy obj Array List rendering Ids new Array List Array List rendering Infos new Array List get all rendering ids for int i 0 i hierarchy length i Array List ids Array List f Rendering Binds get hierarchy i if ids null for int j 0 j ids size j if rendering Ids contains ids get j rendering Ids add ids get j get all rendering infos for int i 0 i rendering Ids size i I Memory Rendering Info info I Memory Rendering Info f Memory Rendering Info get rendering Ids get i I Dynamic Rendering Info dynamic null if info null dynamic get Dynamic Rendering Info info if dynamic null for int j 0 j dynamic length j I Memory Rendering Info dynamic Info I Memory Rendering Info f Memory Rendering Info get dynamic j get Rendering Id rendering Infos add dynamic Info else if info null rendering Infos add info return I Memory Rendering Info rendering Infos to Array new I Memory Rendering Info rendering Infos size  IMemoryRenderingInfo getAllRenderingInfo getHierarchy ArrayList renderingIds ArrayList ArrayList renderingInfos ArrayList ArrayList ArrayList fRenderingBinds renderingIds renderingIds renderingIds IMemoryRenderingInfo IMemoryRenderingInfo fMemoryRenderingInfo renderingIds IDynamicRenderingInfo getDynamicRenderingInfo IMemoryRenderingInfo dynamicInfo IMemoryRenderingInfo fMemoryRenderingInfo getRenderingId renderingInfos dynamicInfo renderingInfos IMemoryRenderingInfo renderingInfos toArray IMemoryRenderingInfo renderingInfos
private I Dynamic Rendering Info get Dynamic Rendering Info I Memory Rendering Info rendering I Configuration Element element rendering get Property Config Element DYNAMIC RENDERING FACTORY try if element null Object obj obj f Dynamic Rendering Factory get rendering get Rendering Id if obj null obj element create Executable Extension VALUE if obj null obj instanceof I Dynamic Rendering Factory f Dynamic Rendering Factory put rendering get Rendering Id obj I Dynamic Rendering Info dynamic Rendering Types I Dynamic Rendering Factory obj get Rendering Infos if dynamic Rendering Types null add Rendering Info dynamic Rendering Types now compare the returned list to what is orginally cached Enumeration enum f Dynamic Rendering Map keys while enum has More Elements String dynamic Rendering Id String enum next Element String static Rendering Id String f Dynamic Rendering Map get dynamic Rendering Id if static Rendering Id equals rendering get Rendering Id boolean found false check that this dynamic rendering still exists for int i 0 i dynamic Rendering Types length i if dynamic Rendering Types i get Rendering Id equals dynamic Rendering Id found true break if found if the rendering no longer exists remove rendering info f Memory Rendering Info remove dynamic Rendering Id f Dynamic Rendering Map remove dynamic Rendering Id update map before returning String static Rendering Id rendering get Rendering Id for int i 0 i dynamic Rendering Types length i f Dynamic Rendering Map put dynamic Rendering Types i get Rendering Id static Rendering Id return dynamic Rendering Types return null catch Core Exception e Debug Plugin log Message Cannot create the dynamic rendering factory for element get Declaring Extension get Unique Identifier null NON NLS 1 return null return null  IDynamicRenderingInfo getDynamicRenderingInfo IMemoryRenderingInfo IConfigurationElement getPropertyConfigElement DYNAMIC_RENDERING_FACTORY fDynamicRenderingFactory getRenderingId createExecutableExtension IDynamicRenderingFactory fDynamicRenderingFactory getRenderingId IDynamicRenderingInfo dynamicRenderingTypes IDynamicRenderingFactory getRenderingInfos dynamicRenderingTypes addRenderingInfo dynamicRenderingTypes fDynamicRenderingMap hasMoreElements dynamicRenderingId nextElement staticRenderingId fDynamicRenderingMap dynamicRenderingId staticRenderingId getRenderingId dynamicRenderingTypes dynamicRenderingTypes getRenderingId dynamicRenderingId fMemoryRenderingInfo dynamicRenderingId fDynamicRenderingMap dynamicRenderingId staticRenderingId getRenderingId dynamicRenderingTypes fDynamicRenderingMap dynamicRenderingTypes getRenderingId staticRenderingId dynamicRenderingTypes CoreException DebugPlugin logMessage getDeclaringExtension getUniqueIdentifier
private I Memory Rendering Info create Rendering Info I Dynamic Rendering Info info if info null return null if info get Parent Rendering Info null Debug Plugin log Message Dynamic rendering info does not have a parent info get Rendering Id null NON NLS 1 return null I Memory Rendering Info parent info get Parent Rendering Info Memory Rendering Info dynamic Info new Memory Rendering Info info get Rendering Id info get Name info get Parent Rendering Info get Config Element I Configuration Element properties parent get All Properties for int i 0 i properties length i String name properties i get Attribute NAME if name null if name equals DYNAMIC RENDERING FACTORY dynamic Info add Property name properties i return dynamic Info  IMemoryRenderingInfo createRenderingInfo IDynamicRenderingInfo getParentRenderingInfo DebugPlugin logMessage getRenderingId IMemoryRenderingInfo getParentRenderingInfo MemoryRenderingInfo dynamicInfo MemoryRenderingInfo getRenderingId getName getParentRenderingInfo getConfigElement IConfigurationElement getAllProperties getAttribute DYNAMIC_RENDERING_FACTORY dynamicInfo addProperty dynamicInfo
public String get Default Renderings Object obj if f Default Renderings null return new String 0 if obj null return new String 0 get all rendering info supporting the object I Memory Rendering Info supported get All Rendering Info obj Array List results new Array List match it with default renderings String hierarchy get Hierarchy obj get defaults for the entire hierarchy for int i 0 i hierarchy length i Array List defaults Array List f Default Renderings get hierarchy i if defaults is defined if defaults null for int j 0 j defaults size j check if the default is supported for int k 0 k supported length k if supported k get Rendering Id equals defaults get j results add supported k get Rendering Id return the list return String results to Array new String results size  getDefaultRenderings fDefaultRenderings IMemoryRenderingInfo getAllRenderingInfo ArrayList ArrayList getHierarchy ArrayList ArrayList fDefaultRenderings getRenderingId getRenderingId toArray
protected void add Rendering Info I Dynamic Rendering Info dynamic Rendering Types if dynamic Rendering Types null store in f Memory Rendering Info arrays so they can be queried for int i 0 i dynamic Rendering Types length i I Memory Rendering Info dynamic Info if f Memory Rendering Info get dynamic Rendering Types i get Rendering Id null dynamic Info create Rendering Info dynamic Rendering Types i if dynamic Info null f Memory Rendering Info put dynamic Rendering Types i get Rendering Id dynamic Info  addRenderingInfo IDynamicRenderingInfo dynamicRenderingTypes dynamicRenderingTypes fMemoryRenderingInfo dynamicRenderingTypes IMemoryRenderingInfo dynamicInfo fMemoryRenderingInfo dynamicRenderingTypes getRenderingId dynamicInfo createRenderingInfo dynamicRenderingTypes dynamicInfo fMemoryRenderingInfo dynamicRenderingTypes getRenderingId dynamicInfo
param obj return all superclasses and interfaces private String get Hierarchy Object obj Array List hierarchy new Array List get class name hierarchy add obj get Class get Name get all super classes Class super Class obj get Class get Superclass while super Class null hierarchy add super Class get Name super Class super Class get Superclass get all interfaces Array List interfaces new Array List Class base Interfaces obj get Class get Interfaces for int i 0 i base Interfaces length i interfaces add base Interfaces i get Interfaces interfaces base Interfaces for int i 0 i interfaces size i hierarchy add Class interfaces get i get Name return String hierarchy to Array new String hierarchy size  getHierarchy ArrayList ArrayList getClass getName superClass getClass getSuperclass superClass superClass getName superClass superClass getSuperclass ArrayList ArrayList baseInterfaces getClass getInterfaces baseInterfaces baseInterfaces getInterfaces baseInterfaces getName toArray
private void get Interfaces Array List list Class interfaces Class super Interfaces new Class 0 for int i 0 i interfaces length i super Interfaces interfaces i get Interfaces for int j 0 j super Interfaces length j list add super Interfaces j get Interfaces list super Interfaces  getInterfaces ArrayList superInterfaces superInterfaces getInterfaces superInterfaces superInterfaces getInterfaces superInterfaces
Clean up when the plugin is shut down public void shutdown clean up if listeners null listeners clear listeners null if f Renderings null f Renderings clear f Renderings null if f Memory Rendering Info null f Memory Rendering Info clear f Memory Rendering Info null if f Rendering Info Order List null f Rendering Info Order List clear f Rendering Info Order List null if f Dynamic Rendering Map null f Dynamic Rendering Map clear f Dynamic Rendering Map null if f Dynamic Rendering Factory null f Dynamic Rendering Factory clear f Dynamic Rendering Factory null remove listener Memory Block Manager get Memory Block Manager remove Listener this  fRenderings fRenderings fRenderings fMemoryRenderingInfo fMemoryRenderingInfo fMemoryRenderingInfo fRenderingInfoOrderList fRenderingInfoOrderList fRenderingInfoOrderList fDynamicRenderingMap fDynamicRenderingMap fDynamicRenderingMap fDynamicRenderingFactory fDynamicRenderingFactory fDynamicRenderingFactory MemoryBlockManager getMemoryBlockManager removeListener
public void set Handle Memory Block Added Event boolean handle Evt f Handle Add Event handle Evt  setHandleMemoryBlockAddedEvent handleEvt fHandleAddEvent handleEvt

Creates an output stream monitor on the given stream connected to system out or err public Output Stream Monitor Input Stream stream f Stream stream f Contents new String Buffer  OutputStreamMonitor InputStream fStream fContents StringBuffer
see org eclipse debug core model I Stream Monitor add Listener org eclipse debug core I Stream Listener public void add Listener I Stream Listener listener f Listeners add listener  IStreamMonitor addListener IStreamListener addListener IStreamListener fListeners
Causes the monitor to close all communications between it and the underlying stream by waiting for the thread to terminate protected void close if f Thread null Thread thread f Thread f Thread null try thread join catch Interrupted Exception ie f Listeners remove All  fThread fThread fThread InterruptedException fListeners removeAll
Notifies the listeners that text has been appended to the stream private void fire Stream Appended String text get Notifier notify Append text  fireStreamAppended getNotifier notifyAppend
see org eclipse debug core model I Stream Monitor get Contents public String get Contents return f Contents to String  IStreamMonitor getContents getContents fContents toString
Continually reads from the stream p This method along with the code start Reading code method is used to allow code Output Stream Monitor code to implement code Runnable code without publicly exposing a code run code method private void read byte bytes new byte BUFFER SIZE int read 0 while read 0 try if f Killed break read f Stream read bytes if read 0 String text new String bytes 0 read if is Buffered f Contents append text fire Stream Appended text catch IO Exception ioe Debug Plugin log ioe return catch Null Pointer Exception e killing the stream monitor while reading can cause an NPE when reading from the stream if f Killed f Thread null Debug Plugin log e return try f Stream close catch IO Exception e Debug Plugin log e  startReading OutputStreamMonitor BUFFER_SIZE fKilled fStream isBuffered fContents fireStreamAppended IOException DebugPlugin NullPointerException fKilled fThread DebugPlugin fStream IOException DebugPlugin
protected void kill f Killed true  fKilled
see org eclipse debug core model I Stream Monitor remove Listener org eclipse debug core I Stream Listener public void remove Listener I Stream Listener listener f Listeners remove listener  IStreamMonitor removeListener IStreamListener removeListener IStreamListener fListeners
if f Thread null f Thread new Thread new Runnable public void run read  fThread fThread
Starts a thread which reads from the stream protected void start Monitoring if f Thread null f Thread new Thread new Runnable public void run read Debug Core Messages get String Output Stream Monitor label NON NLS 1 f Thread start  startMonitoring fThread fThread DebugCoreMessages getString OutputStreamMonitor fThread
see org eclipse debug core model I Flushable Stream Monitor set Buffered boolean public void set Buffered boolean buffer f Buffered buffer  IFlushableStreamMonitor setBuffered setBuffered fBuffered
see org eclipse debug core model I Flushable Stream Monitor flush Contents public void flush Contents f Contents set Length 0  IFlushableStreamMonitor flushContents flushContents fContents setLength
see I Flushable Stream Monitor is Buffered public boolean is Buffered return f Buffered  IFlushableStreamMonitor isBuffered isBuffered fBuffered
private Content Notifier get Notifier return new Content Notifier  ContentNotifier getNotifier ContentNotifier
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception Debug Plugin log exception  ISafeRunnable handleException handleException DebugPlugin
see org eclipse core runtime I Safe Runnable run public void run throws Exception f Listener stream Appended f Text Output Stream Monitor this  ISafeRunnable fListener streamAppended fText OutputStreamMonitor
public void notify Append String text if text null return f Text text Object copied Listeners f Listeners get Listeners for int i 0 i copied Listeners length i f Listener I Stream Listener copied Listeners i Platform run this f Listener null f Text null  notifyAppend fText copiedListeners fListeners getListeners copiedListeners fListener IStreamListener copiedListeners fListener fText

public I Source Container create Source Container String memento throws Core Exception Node node parse Document memento if node get Node Type Node ELEMENT NODE Element element Element node if archive equals element get Node Name NON NLS 1 String string element get Attribute path NON NLS 1 if string null string length 0 abort Source Lookup Messages get String External Archive Source Container Type 10 null NON NLS 1 String detect element get Attribute detect Root NON NLS 1 boolean auto true equals detect NON NLS 1 I File file Resources Plugin get Workspace get Root get File new Path string return new Archive Source Container file auto abort Source Lookup Messages get String External Archive Source Container Type 11 null NON NLS 1 abort Source Lookup Messages get String External Archive Source Container Type 12 null NON NLS 1 return null  ISourceContainer createSourceContainer CoreException parseDocument getNodeType ELEMENT_NODE getNodeName getAttribute SourceLookupMessages getString ExternalArchiveSourceContainerType getAttribute detectRoot IFile ResourcesPlugin getWorkspace getRoot getFile ArchiveSourceContainer SourceLookupMessages getString ExternalArchiveSourceContainerType SourceLookupMessages getString ExternalArchiveSourceContainerType
public String get Memento I Source Container container throws Core Exception Archive Source Container archive Archive Source Container container Document document new Document Element element document create Element archive NON NLS 1 element set Attribute path archive get File get Full Path to String NON NLS 1 String detect Root false NON NLS 1 if archive is Detect Root detect Root true NON NLS 1 element set Attribute detect Root detect Root NON NLS 1 document append Child element return serialize Document document  getMemento ISourceContainer CoreException ArchiveSourceContainer ArchiveSourceContainer newDocument createElement setAttribute getFile getFullPath toString detectRoot isDetectRoot detectRoot setAttribute detectRoot detectRoot appendChild serializeDocument

Constructs a source container on the given workspace container param container the container to search for source in param subfolders whether nested folders should be searched for source elements public Container Source Container I Container container boolean subfolders f Container container f Subfolders subfolders  ContainerSourceContainer IContainer fContainer fSubfolders
Returns the workspace container this source container is rooted at return the workspace container this source container is rooted at public I Container get Container return f Container  IContainer getContainer fContainer
public Object find Source Elements String name throws Core Exception Array List sources new Array List I Container container get Container I Path path new Path name I File file container get File path if file exists sources add file check subfolders if is Find Duplicates f Subfolders sources is Empty f Subfolders I Source Container containers get Source Containers for int i 0 i containers length i Object objects containers i find Source Elements name if objects null objects length 0 continue if is Find Duplicates for int j 0 j objects length j sources add objects j else sources add objects 0 break if sources is Empty return EMPTY return sources to Array  findSourceElements CoreException ArrayList ArrayList IContainer getContainer IPath IFile getFile isFindDuplicates fSubfolders isEmpty fSubfolders ISourceContainer getSourceContainers findSourceElements isFindDuplicates isEmpty toArray
see org eclipse debug internal core sourcelookup I Source Container get Name public String get Name return get Container get Name  ISourceContainer getName getName getContainer getName
public boolean equals Object obj if obj null obj instanceof Container Source Container Container Source Container loc Container Source Container obj return loc get Container equals get Container return false  ContainerSourceContainer ContainerSourceContainer ContainerSourceContainer getContainer getContainer
see java lang Object hash Code public int hash Code return get Container hash Code  hashCode hashCode getContainer hashCode
see org eclipse debug internal core sourcelookup I Source Container is Composite public boolean is Composite return f Subfolders  ISourceContainer isComposite isComposite fSubfolders
protected I Source Container create Source Containers throws Core Exception if f Subfolders I Resource resources get Container members List list new Array List resources length for int i 0 i resources length i I Resource resource resources i if resource get Type I Resource FOLDER list add new Folder Source Container I Folder resource f Subfolders I Source Container containers I Source Container list to Array new I Source Container list size for int i 0 i containers length i I Source Container container containers i container init get Director return containers return new I Source Container 0  ISourceContainer createSourceContainers CoreException fSubfolders IResource getContainer ArrayList IResource getType IResource FolderSourceContainer IFolder fSubfolders ISourceContainer ISourceContainer toArray ISourceContainer ISourceContainer getDirector ISourceContainer

public String get Memento I Source Container container throws Core Exception Document document new Document Element element document create Element default NON NLS 1 document append Child element return serialize Document document  getMemento ISourceContainer CoreException newDocument createElement appendChild serializeDocument
public I Source Container create Source Container String memento throws Core Exception Node node parse Document memento if node get Node Type Node ELEMENT NODE Element element Element node if default equals element get Node Name NON NLS 1 return new Default Source Container abort Source Lookup Messages get String Default Source Container Type 6 null NON NLS 1 abort Source Lookup Messages get String Default Source Container Type 7 null NON NLS 1 return null  ISourceContainer createSourceContainer CoreException parseDocument getNodeType ELEMENT_NODE getNodeName DefaultSourceContainer SourceLookupMessages getString DefaultSourceContainerType SourceLookupMessages getString DefaultSourceContainerType

public I Source Container create Source Container String memento throws Core Exception Node node parse Document memento if node get Node Type Node ELEMENT NODE Element element Element node if directory equals element get Node Name NON NLS 1 String string element get Attribute path NON NLS 1 if string null string length 0 abort Source Lookup Messages get String Directory Source Container Type 10 null NON NLS 1 String nest element get Attribute nest NON NLS 1 boolean nested true equals nest NON NLS 1 return new Directory Source Container new Path string nested abort Source Lookup Messages get String Directory Source Container Type 11 null NON NLS 1 abort Source Lookup Messages get String Directory Source Container Type 12 null NON NLS 1 return null  ISourceContainer createSourceContainer CoreException parseDocument getNodeType ELEMENT_NODE getNodeName getAttribute SourceLookupMessages getString DirectorySourceContainerType getAttribute DirectorySourceContainer SourceLookupMessages getString DirectorySourceContainerType SourceLookupMessages getString DirectorySourceContainerType
public String get Memento I Source Container container throws Core Exception Directory Source Container folder Directory Source Container container Document document new Document Element element document create Element directory NON NLS 1 element set Attribute path folder get Directory get Absolute Path NON NLS 1 String nest false NON NLS 1 if folder is Composite nest true NON NLS 1 element set Attribute nest nest NON NLS 1 document append Child element return serialize Document document  getMemento ISourceContainer CoreException DirectorySourceContainer DirectorySourceContainer newDocument createElement setAttribute getDirectory getAbsolutePath isComposite setAttribute appendChild serializeDocument

public I Source Container create Source Container String memento throws Core Exception Node node parse Document memento if node get Node Type Node ELEMENT NODE Element element Element node if archive equals element get Node Name NON NLS 1 String string element get Attribute path NON NLS 1 if string null string length 0 abort Source Lookup Messages get String External Archive Source Container Type 10 null NON NLS 1 String detect element get Attribute detect Root NON NLS 1 boolean auto true equals detect NON NLS 1 return new External Archive Source Container string auto abort Source Lookup Messages get String External Archive Source Container Type 11 null NON NLS 1 abort Source Lookup Messages get String External Archive Source Container Type 12 null NON NLS 1 return null  ISourceContainer createSourceContainer CoreException parseDocument getNodeType ELEMENT_NODE getNodeName getAttribute SourceLookupMessages getString ExternalArchiveSourceContainerType getAttribute detectRoot ExternalArchiveSourceContainer SourceLookupMessages getString ExternalArchiveSourceContainerType SourceLookupMessages getString ExternalArchiveSourceContainerType
public String get Memento I Source Container container throws Core Exception External Archive Source Container archive External Archive Source Container container Document document new Document Element element document create Element archive NON NLS 1 element set Attribute path archive get Name NON NLS 1 String detect Root false NON NLS 1 if archive is Detect Root detect Root true NON NLS 1 element set Attribute detect Root detect Root NON NLS 1 document append Child element return serialize Document document  getMemento ISourceContainer CoreException ExternalArchiveSourceContainer ExternalArchiveSourceContainer newDocument createElement setAttribute getName detectRoot isDetectRoot detectRoot setAttribute detectRoot detectRoot appendChild serializeDocument

public String get Memento I Source Container container throws Core Exception Folder Source Container folder Source Container Folder Source Container container Document document new Document Element element document create Element folder NON NLS 1 element set Attribute path folder Source Container get Container get Full Path to String NON NLS 1 String nest false NON NLS 1 if folder Source Container is Composite nest true NON NLS 1 element set Attribute nest nest NON NLS 1 document append Child element return serialize Document document  getMemento ISourceContainer CoreException FolderSourceContainer folderSourceContainer FolderSourceContainer newDocument createElement setAttribute folderSourceContainer getContainer getFullPath toString folderSourceContainer isComposite setAttribute appendChild serializeDocument
public I Source Container create Source Container String memento throws Core Exception Node node parse Document memento if node get Node Type Node ELEMENT NODE Element element Element node if folder equals element get Node Name NON NLS 1 String string element get Attribute path NON NLS 1 if string null string length 0 abort Source Lookup Messages get String Folder Source Container Type 10 null NON NLS 1 String nest element get Attribute nest NON NLS 1 boolean nested true equals nest NON NLS 1 I Workspace workspace Resources Plugin get Workspace I Folder folder workspace get Root get Folder new Path string TODO what if folder does not exist return new Folder Source Container folder nested abort Source Lookup Messages get String Folder Source Container Type 11 null NON NLS 1 abort Source Lookup Messages get String Folder Source Container Type 12 null NON NLS 1 return null  ISourceContainer createSourceContainer CoreException parseDocument getNodeType ELEMENT_NODE getNodeName getAttribute SourceLookupMessages getString FolderSourceContainerType getAttribute IWorkspace ResourcesPlugin getWorkspace IFolder getRoot getFolder FolderSourceContainer SourceLookupMessages getString FolderSourceContainerType SourceLookupMessages getString FolderSourceContainerType

public String get Memento I Source Container container throws Core Exception Project Source Container project Project Source Container container Document document new Document Element element document create Element project NON NLS 1 element set Attribute name project get Container get Name NON NLS 1 String referenced false NON NLS 1 if project is Search Referenced Projects referenced true NON NLS 1 element set Attribute referenced Projects referenced NON NLS 1 document append Child element return serialize Document document  getMemento ISourceContainer CoreException ProjectSourceContainer ProjectSourceContainer newDocument createElement setAttribute getContainer getName isSearchReferencedProjects setAttribute referencedProjects appendChild serializeDocument
public I Source Container create Source Container String memento throws Core Exception Node node parse Document memento if node get Node Type Node ELEMENT NODE Element element Element node if project equals element get Node Name NON NLS 1 String string element get Attribute name NON NLS 1 if string null string length 0 abort Source Lookup Messages get String Project Source Container Type 10 null NON NLS 1 String nest element get Attribute referenced Projects NON NLS 1 boolean ref true equals nest NON NLS 1 I Workspace workspace Resources Plugin get Workspace I Project project workspace get Root get Project string return new Project Source Container project ref abort Source Lookup Messages get String Project Source Container Type 11 null NON NLS 1 abort Source Lookup Messages get String Project Source Container Type 12 null NON NLS 1 return null  ISourceContainer createSourceContainer CoreException parseDocument getNodeType ELEMENT_NODE getNodeName getAttribute SourceLookupMessages getString ProjectSourceContainerType getAttribute referencedProjects IWorkspace ResourcesPlugin getWorkspace IProject getRoot getProject ProjectSourceContainer SourceLookupMessages getString ProjectSourceContainerType SourceLookupMessages getString ProjectSourceContainerType

public I Source Container create Source Container String memento throws Core Exception Node node parse Document memento if node get Node Type Node ELEMENT NODE Element element Element node if workspace equals element get Node Name NON NLS 1 return new Workspace Source Container abort Source Lookup Messages get String Workspace Source Container Type 3 null NON NLS 1 abort Source Lookup Messages get String Workspace Source Container Type 4 null NON NLS 1 return null  ISourceContainer createSourceContainer CoreException parseDocument getNodeType ELEMENT_NODE getNodeName WorkspaceSourceContainer SourceLookupMessages getString WorkspaceSourceContainerType SourceLookupMessages getString WorkspaceSourceContainerType
public String get Memento I Source Container container throws Core Exception Document document new Document Element element document create Element workspace NON NLS 1 document append Child element return serialize Document document  getMemento ISourceContainer CoreException newDocument createElement appendChild serializeDocument

Constructs a source container type on the given extension param element extension definition public Source Container Type I Configuration Element element f Element element  SourceContainerType IConfigurationElement fElement
see org eclipse debug internal core sourcelookup I Source Container Type create Source Container java lang String public I Source Container create Source Container String memento throws Core Exception return get Delegate create Source Container memento  ISourceContainerType createSourceContainer ISourceContainer createSourceContainer CoreException getDelegate createSourceContainer
public String get Memento I Source Container container throws Core Exception if this equals container get Type return get Delegate get Memento container I Status status new Status I Status ERROR Debug Plugin get Unique Identifier Debug Plugin INTERNAL ERROR Source Lookup Messages get String Source Container Type 3 null NON NLS 1 throw new Core Exception status  getMemento ISourceContainer CoreException getType getDelegate getMemento IStatus IStatus DebugPlugin getUniqueIdentifier DebugPlugin INTERNAL_ERROR SourceLookupMessages getString SourceContainerType CoreException
see org eclipse debug internal core sourcelookup I Source Container Type get Name public String get Name return f Element get Attribute name NON NLS 1  ISourceContainerType getName getName fElement getAttribute
see org eclipse debug internal core sourcelookup I Source Container Type get Id public String get Id return f Element get Attribute id NON NLS 1  ISourceContainerType getId getId fElement getAttribute
Lazily instantiates and returns the underlying source container type exception Core Exception if unable to instantiate private I Source Container Type Delegate get Delegate throws Core Exception if f Delegate null f Delegate I Source Container Type Delegate f Element create Executable Extension class NON NLS 1 return f Delegate  CoreException ISourceContainerTypeDelegate getDelegate CoreException fDelegate fDelegate ISourceContainerTypeDelegate fElement createExecutableExtension fDelegate
see org eclipse debug internal core sourcelookup I Source Container Type get Description public String get Description return f Element get Attribute description NON NLS 1  ISourceContainerType getDescription getDescription fElement getAttribute

public int compare Object o1 Object o2 String m1 String o1 String m2 String o2 int i1 0 i2 0 while i1 m1 length i1 skip Whitespace m1 i1 i2 skip Whitespace m2 i2 if i1 m1 length i2 m2 length if m1 char At i1 m2 char At i2 return 1 i1 i2 else if i2 m2 length return 1 return 0 return 0  skipWhitespace skipWhitespace charAt charAt
private int skip Whitespace String string int offset while offset string length Character is Whitespace string char At offset offset return offset  skipWhitespace isWhitespace charAt

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Source Lookup Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME SourceLookupMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Returns a zip file with the given name param name zip file name return The zip file with the given name exception IO Exception if unable to create the specified zip file public static Zip File get Zip File String name throws IO Exception synchronized fg Zip File Cache if fg Cleaner null fg Cleaner new Archive Cleaner Debug Plugin get Default add Debug Event Listener fg Cleaner Debug Plugin get Default get Launch Manager add Launch Listener fg Cleaner Resources Plugin get Workspace add Resource Change Listener fg Cleaner I Resource Change Event PRE DELETE I Resource Change Event PRE CLOSE Zip File zip Zip File fg Zip File Cache get name if zip null zip new Zip File name fg Zip File Cache put name zip return zip  IOException ZipFile getZipFile IOException fgZipFileCache fgCleaner fgCleaner ArchiveCleaner DebugPlugin getDefault addDebugEventListener fgCleaner DebugPlugin getDefault getLaunchManager addLaunchListener fgCleaner ResourcesPlugin getWorkspace addResourceChangeListener fgCleaner IResourceChangeEvent PRE_DELETE IResourceChangeEvent PRE_CLOSE ZipFile ZipFile fgZipFileCache ZipFile fgZipFileCache
Closes all zip files that have been opened and removes them from the zip file cache This method is only to be called by the debug plug in public static void close Archives synchronized fg Zip File Cache Iterator iter fg Zip File Cache values iterator while iter has Next Zip File file Zip File iter next synchronized file try file close catch IO Exception e Debug Plugin log e fg Zip File Cache clear  closeArchives fgZipFileCache fgZipFileCache hasNext ZipFile ZipFile IOException DebugPlugin fgZipFileCache
Called when the debug plug in shuts down public static void shutdown close Archives if fg Cleaner null Debug Plugin get Default remove Debug Event Listener fg Cleaner Debug Plugin get Default get Launch Manager remove Launch Listener fg Cleaner Resources Plugin get Workspace remove Resource Change Listener fg Cleaner  closeArchives fgCleaner DebugPlugin getDefault removeDebugEventListener fgCleaner DebugPlugin getDefault getLaunchManager removeLaunchListener fgCleaner ResourcesPlugin getWorkspace removeResourceChangeListener fgCleaner
public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i if event get Kind Debug Event TERMINATE Object source event get Source if source instanceof I Debug Target source instanceof I Process Source Lookup Utils close Archives  handleDebugEvents DebugEvent DebugEvent getKind DebugEvent getSource IDebugTarget IProcess SourceLookupUtils closeArchives
see org eclipse debug core I Launches Listener launches Removed org eclipse debug core I Launch public void launches Removed I Launch launches Source Lookup Utils close Archives  ILaunchesListener launchesRemoved ILaunch launchesRemoved ILaunch SourceLookupUtils closeArchives
see org eclipse debug core I Launches Listener launches Added org eclipse debug core I Launch public void launches Added I Launch launches  ILaunchesListener launchesAdded ILaunch launchesAdded ILaunch
see org eclipse debug core I Launches Listener launches Changed org eclipse debug core I Launch public void launches Changed I Launch launches  ILaunchesListener launchesChanged ILaunch launchesChanged ILaunch
see org eclipse core resources I Resource Change Listener resource Changed org eclipse core resources I Resource Change Event public void resource Changed I Resource Change Event event Source Lookup Utils close Archives  IResourceChangeListener resourceChanged IResourceChangeEvent resourceChanged IResourceChangeEvent SourceLookupUtils closeArchives

Constructs a source path computer on the given extension param element extension definition public Source Path Computer I Configuration Element element f Element element  SourcePathComputer IConfigurationElement fElement
see org eclipse debug internal core sourcelookup I Source Container Type get Id public String get Id return f Element get Attribute id NON NLS 1  ISourceContainerType getId getId fElement getAttribute
Lazily instantiates and returns the underlying source container type exception Core Exception if unable to instantiate private I Source Path Computer Delegate get Delegate throws Core Exception if f Delegate null f Delegate I Source Path Computer Delegate f Element create Executable Extension class NON NLS 1 return f Delegate  CoreException ISourcePathComputerDelegate getDelegate CoreException fDelegate fDelegate ISourcePathComputerDelegate fElement createExecutableExtension fDelegate
public I Source Container compute Source Containers I Launch Configuration configuration I Progress Monitor monitor try return get Delegate compute Source Containers configuration monitor catch Core Exception e Debug Plugin log e return new I Source Container 0  ISourceContainer computeSourceContainers ILaunchConfiguration IProgressMonitor getDelegate computeSourceContainers CoreException DebugPlugin ISourceContainer

private boolean f Closed false Creates a code Streams Proxy code on the streams of the given system process public Streams Proxy Process process if process null return f Output Monitor new Output Stream Monitor process get Input Stream f Error Monitor new Output Stream Monitor process get Error Stream f Input Monitor new Input Stream Monitor process get Output Stream f Output Monitor start Monitoring f Error Monitor start Monitoring f Input Monitor start Monitoring  fClosed StreamsProxy StreamsProxy fOutputMonitor OutputStreamMonitor getInputStream fErrorMonitor OutputStreamMonitor getErrorStream fInputMonitor InputStreamMonitor getOutputStream fOutputMonitor startMonitoring fErrorMonitor startMonitoring fInputMonitor startMonitoring
Causes the proxy to close all communications between it and the underlying streams after all remaining data in the streams is read public void close if f Closed f Closed true f Output Monitor close f Error Monitor close f Input Monitor close  fClosed fClosed fOutputMonitor fErrorMonitor fInputMonitor
Causes the proxy to close all communications between it and the underlying streams immediately Data remaining in the streams is lost public void kill f Closed true f Output Monitor kill f Error Monitor kill f Input Monitor close  fClosed fOutputMonitor fErrorMonitor fInputMonitor
see I Streams Proxy get Error Stream Monitor public I Stream Monitor get Error Stream Monitor return f Error Monitor  IStreamsProxy getErrorStreamMonitor IStreamMonitor getErrorStreamMonitor fErrorMonitor
see I Streams Proxy get Output Stream Monitor public I Stream Monitor get Output Stream Monitor return f Output Monitor  IStreamsProxy getOutputStreamMonitor IStreamMonitor getOutputStreamMonitor fOutputMonitor
see I Streams Proxy write String public void write String input throws IO Exception if f Closed f Input Monitor write input else throw new IO Exception  IStreamsProxy IOException fClosed fInputMonitor IOException

public String resolve Value I Dynamic Variable variable String argument throws Core Exception if ARCH equals argument NON NLS 1 return Platform getOS Arch else if ECLIPSE HOME equals argument NON NLS 1 URL installURL Platform get Install Location getURL I Path ppath new Path installURL get File remove Trailing Separator return get Correct Path ppath toOS String else if NL equals argument NON NLS 1 return Platform getNL else if OS equals argument NON NLS 1 return Platform getOS else if WS equals argument NON NLS 1 return Platform getWS return null  resolveValue IDynamicVariable CoreException getOSArch ECLIPSE_HOME getInstallLocation IPath getFile removeTrailingSeparator getCorrectPath toOSString
private static String get Correct Path String path String Buffer buf new String Buffer for int i 0 i path length i char c path char At i if Platform getOS equals win32 NON NLS 1 if i 0 c continue Some V Ms may return 20 instead of a space if c i 2 path length char c1 path char At i 1 char c2 path char At i 2 if c1 2 c2 0 i 2 buf append NON NLS 1 continue buf append c return buf to String  getCorrectPath StringBuffer StringBuffer charAt VMs charAt charAt toString

Creates a new watch expression with the given expression text param expression the text of the expression to be evaluated public Watch Expression String expression f Expression Text expression  WatchExpression fExpressionText
Creates a new watch expression with the given expression and the given enablement param expression Text the text of the expression to be evaluated param enabled whether or not the new expression should be enabled public Watch Expression String expression Text boolean enabled this expression Text f Enabled enabled  expressionText WatchExpression expressionText expressionText fEnabled
see org eclipse debug core model I Watch Expression Listener watch Evaluation Finished org eclipse debug core model I Watch Expression Result public void watch Evaluation Finished I Watch Expression Result result set Pending false set Result result  IWatchExpressionListener watchEvaluationFinished IWatchExpressionResult watchEvaluationFinished IWatchExpressionResult setPending setResult
No delegate provided listener watch Evaluation Finished new I Watch Expression Result public I Value get Value return null  watchEvaluationFinished IWatchExpressionResult IValue getValue
return null public boolean has Errors return true  hasErrors
return true public String get Error Messages return new String Debug Core Messages get String Watch Expression 0 NON NLS 1  getErrorMessages DebugCoreMessages getString WatchExpression
return new String Debug Core Messages get String Watch Expression 0 NON NLS 1 public String get Expression Text return Watch Expression this get Expression Text  DebugCoreMessages getString WatchExpression getExpressionText WatchExpression getExpressionText
return Watch Expression this get Expression Text public Debug Exception get Exception return null  WatchExpression getExpressionText DebugException getException
see org eclipse debug core model I Watch Expression evaluate public void evaluate if f Current Context null return I Debug Element context f Current Context f Debug Target context get Debug Target I Watch Expression Listener listener new I Watch Expression Listener non Javadoc see org eclipse debug core model I Watch Expression Listener watch Evaluation Finished org eclipse debug core model I Watch Expression Result public void watch Evaluation Finished I Watch Expression Result result set Pending false set Result result set Pending true I Watch Expression Delegate delegate Debug Plugin get Default get Expression Manager new Watch Expression Delegate context get Model Identifier if delegate null delegate evaluate Expression get Expression Text context listener else No delegate provided listener watch Evaluation Finished new I Watch Expression Result public I Value get Value return null public boolean has Errors return true public String get Error Messages return new String Debug Core Messages get String Watch Expression 0 NON NLS 1 public String get Expression Text return Watch Expression this get Expression Text public Debug Exception get Exception return null  IWatchExpression fCurrentContext IDebugElement fCurrentContext fDebugTarget getDebugTarget IWatchExpressionListener IWatchExpressionListener IWatchExpressionListener watchEvaluationFinished IWatchExpressionResult watchEvaluationFinished IWatchExpressionResult setPending setResult setPending IWatchExpressionDelegate DebugPlugin getDefault getExpressionManager newWatchExpressionDelegate getModelIdentifier evaluateExpression getExpressionText watchEvaluationFinished IWatchExpressionResult IValue getValue hasErrors getErrorMessages DebugCoreMessages getString WatchExpression getExpressionText WatchExpression getExpressionText DebugException getException
public void set Expression Context I Debug Element context f Current Context context if context null set Result null return if is Enabled return evaluate  setExpressionContext IDebugElement fCurrentContext setResult isEnabled
Sets the result of the last expression and fires notification that this expression s value has changed public void set Result I Watch Expression Result result f Result result Debug Plugin get Default fire Debug Event Set new Debug Event new Debug Event this Debug Event CHANGE  setResult IWatchExpressionResult fResult DebugPlugin getDefault fireDebugEventSet DebugEvent DebugEvent DebugEvent
Notifies the expression manager that this watch expression s values have changed so the manager can update the persisted expression private void watch Expression Changed Expression Manager Debug Plugin get Default get Expression Manager watch Expression Changed this  watchExpressionChanged ExpressionManager DebugPlugin getDefault getExpressionManager watchExpressionChanged
see org eclipse debug core model I Expression get Expression Text public String get Expression Text return f Expression Text  IExpression getExpressionText getExpressionText fExpressionText
see org eclipse debug core model I Expression get Value public I Value get Value if f Result null return null return f Result get Value  IExpression getValue IValue getValue fResult fResult getValue
see org eclipse debug core model I Debug Element get Debug Target public I Debug Target get Debug Target return f Debug Target  IDebugElement getDebugTarget IDebugTarget getDebugTarget fDebugTarget
see org eclipse debug core model I Expression dispose public void dispose  IExpression
see org eclipse debug core model I Debug Element get Model Identifier public String get Model Identifier if f Current Context null return f Current Context get Model Identifier return Debug Plugin get Unique Identifier  IDebugElement getModelIdentifier getModelIdentifier fCurrentContext fCurrentContext getModelIdentifier DebugPlugin getUniqueIdentifier
see org eclipse debug core model I Debug Element get Launch public I Launch get Launch return get Debug Target get Launch  IDebugElement getLaunch ILaunch getLaunch getDebugTarget getLaunch
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return Platform get Adapter Manager get Adapter this adapter  IAdaptable getAdapter getAdapter getAdapterManager getAdapter
param enabled public void set Enabled boolean enabled f Enabled enabled watch Expression Changed evaluate  setEnabled fEnabled watchExpressionChanged
param expression public void set Expression Text String expression f Expression Text expression watch Expression Changed evaluate  setExpressionText fExpressionText watchExpressionChanged
return Whether or not this watch expression is currently enabled Enabled watch expressions will continue to update their value automatically Disabled expressions require a manual update public boolean is Enabled return f Enabled  isEnabled fEnabled
see org eclipse debug core model I Watch Expression is Pending public boolean is Pending return f Pending  IWatchExpression isPending isPending fPending
Sets the pending state of this expression param pending whether or not this expression should be flagged as pending protected void set Pending boolean pending f Pending pending watch Expression Changed  setPending fPending watchExpressionChanged
see org eclipse debug core model I Error Reporting Expression has Errors public boolean has Errors return f Result null f Result has Errors  IErrorReportingExpression hasErrors hasErrors fResult fResult hasErrors
public String get Error Messages if f Result null return new String 0 return f Result get Error Messages  getErrorMessages fResult fResult getErrorMessages

It s crucial that delegate actions have a zero arg constructor so that they can be reflected into existence when referenced in an action set in the plugin s plugin xml file public Abstract Debug Action Delegate  AbstractDebugActionDelegate
see I Workbench Window Action Delegate dispose public void dispose if get Window null get Window get Selection Service remove Selection Listener I DebugUI Constants ID DEBUG VIEW this  IWorkbenchWindowActionDelegate getWindow getWindow getSelectionService removeSelectionListener IDebugUIConstants ID_DEBUG_VIEW
see I Workbench Window Action Delegate init I Workbench Window public void init I Workbench Window window listen to selection changes in the debug view set Window window window get Selection Service add Selection Listener I DebugUI Constants ID DEBUG VIEW this  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow setWindow getSelectionService addSelectionListener IDebugUIConstants ID_DEBUG_VIEW
Busy Indicator show While Display get Current new Runnable public void run while itr has Next Object element itr next try do Action element catch Debug Exception e ms merge e get Status  BusyIndicator showWhile getCurrent hasNext doAction DebugException getStatus
see I Action Delegate run I Action public void run I Action action I Structured Selection selection get Selection final Iterator itr selection iterator String plugin Id DebugUI Plugin get Unique Identifier final Multi Status ms new Multi Status plugin Id Debug Exception REQUEST FAILED get Status Message null Busy Indicator show While Display get Current new Runnable public void run while itr has Next Object element itr next try do Action element catch Debug Exception e ms merge e get Status if ms isOK I Workbench Window window DebugUI Plugin get Active Workbench Window if window null DebugUI Plugin error Dialog window get Shell get Error Dialog Title get Error Dialog Message ms else DebugUI Plugin log ms  IActionDelegate IAction IAction IStructuredSelection getSelection pluginId DebugUIPlugin getUniqueIdentifier MultiStatus MultiStatus pluginId DebugException REQUEST_FAILED getStatusMessage BusyIndicator showWhile getCurrent hasNext doAction DebugException getStatus IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow DebugUIPlugin errorDialog getShell getErrorDialogTitle getErrorDialogMessage DebugUIPlugin
Abstract Debug Action Delegates come in 2 flavors I View Action Delegate I Workbench Window Action Delegate delegates p ul li I View Action Delegate delegate get View null li li I Workbench Window Action Delegate get View null li ul p Only want to call update action selection for I View Action Delegates An initialize call to update action selection is made for all flavors to set the initial enabled state of the underlying action I Workbench Window Action Delegate s listen to selection changes in the debug view only p see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection s boolean was Initialized initialize action s if was Initialized if get View null update action s  AbstractDebugActionDelegates IViewActionDelegate IWorkbenchWindowActionDelegate IViewActionDelegate getView IWorkbenchWindowActionDelegate getView IViewActionDelegates IWorkbenchWindowActionDelegate IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection wasInitialized wasInitialized getView
protected void update I Action action I Selection s if s instanceof I Structured Selection I Structured Selection ss I Structured Selection s action set Enabled get Enable State For Selection ss set Selection ss else action set Enabled false set Selection Structured Selection EMPTY  IAction ISelection IStructuredSelection IStructuredSelection IStructuredSelection setEnabled getEnableStateForSelection setSelection setEnabled setSelection StructuredSelection
Performs the specific action on this element protected abstract void do Action Object element throws Debug Exception  doAction DebugException
Returns the String to use as an error dialog title for a failed action Default is to return null protected String get Error Dialog Title return null  getErrorDialogTitle
Returns the String to use as an error dialog message for a failed action This message appears as the Message in the error dialog for this action Default is to return null protected String get Error Dialog Message return null  getErrorDialogMessage
Returns the String to use as a status message for a failed action This message appears as the Reason in the error dialog for this action Default is to return the empty String protected String get Status Message return NON NLS 1  getStatusMessage
see I View Action Delegate init I View Part public void init I View Part view f View Part view  IViewActionDelegate IViewPart IViewPart fViewPart
Returns this action s view part or code null code if not installed in a view return view part or code null code protected I View Part get View return f View Part  IViewPart getView fViewPart
Initialize this delegate updating this delegate s presentation As well all of the flavors of Abstract Debug Action Delegates need to have the initial enabled state set with a call to update I Action I Selection param action the presentation for this action return whether the action was initialized protected boolean initialize I Action action I Selection selection if is Initialized set Action action if get View null update on the selection in the debug view I Workbench Window window get Window if window null window get Shell null window get Shell is Disposed I Workbench Page page window get Active Page if page null selection page get Selection I DebugUI Constants ID DEBUG VIEW update action selection set Initialized true return true return false  AbstractDebugActionDelegates IAction ISelection IAction ISelection isInitialized setAction getView IWorkbenchWindow getWindow getShell getShell isDisposed IWorkbenchPage getActivePage getSelection IDebugUIConstants ID_DEBUG_VIEW setInitialized
Returns the most recent selection return structured selection protected I Structured Selection get Selection if get View null cannot used the cached selection in a view as the selection can be out of date for context menu actions See bug 14556 I Selection s get View get View Site get Selection Provider get Selection if s instanceof I Structured Selection return I Structured Selection s else return Structured Selection EMPTY return f Selection  IStructuredSelection getSelection getView ISelection getView getViewSite getSelectionProvider getSelection IStructuredSelection IStructuredSelection StructuredSelection fSelection
Sets the most recent selection parm selection structured selection private void set Selection I Structured Selection selection f Selection selection  setSelection IStructuredSelection fSelection
see I Selection Listener selection Changed I Workbench Part I Selection public void selection Changed I Workbench Part part I Selection selection update get Action selection  ISelectionListener selectionChanged IWorkbenchPart ISelection selectionChanged IWorkbenchPart ISelection getAction
protected void set Action I Action action f Action action  setAction IAction fAction
protected I Action get Action return f Action  IAction getAction fAction
protected void set View I View Part view Part f View Part view Part  setView IViewPart viewPart fViewPart viewPart
protected boolean is Initialized return f Initialized  isInitialized fInitialized
protected void set Initialized boolean initialized f Initialized initialized  setInitialized fInitialized
protected I Workbench Window get Window return f Window  IWorkbenchWindow getWindow fWindow
protected void set Window I Workbench Window window f Window window  setWindow IWorkbenchWindow fWindow
Return whether the action should be enabled or not based on the given selection protected boolean get Enable State For Selection I Structured Selection selection if selection size 0 return false Iterator itr selection iterator while itr has Next Object element itr next if is Enabled For element return false return true  getEnableStateForSelection IStructuredSelection hasNext isEnabledFor
protected boolean is Enabled For Object element return true  isEnabledFor

see org eclipse ui I Workbench Window Action Delegate dispose see org eclipse ui I Action Delegate2 dispose public void dispose super dispose Debug Plugin get Default remove Debug Event Listener this  IWorkbenchWindowActionDelegate IActionDelegate2 DebugPlugin getDefault removeDebugEventListener
Runnable r new Runnable public void run Shell window Shell get Window get Shell if window Shell null window Shell is Disposed return for int i 0 i events length i if events i get Source null do Handle Debug Event events i  windowShell getWindow getShell windowShell windowShell isDisposed getSource doHandleDebugEvent
see I Debug Event Set Listener handle Debug Events Debug Event public void handle Debug Events final Debug Event events if get Window null get Action null return Shell shell get Window get Shell if shell null shell is Disposed return Runnable r new Runnable public void run Shell window Shell get Window get Shell if window Shell null window Shell is Disposed return for int i 0 i events length i if events i get Source null do Handle Debug Event events i shell get Display async Exec r  IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent getWindow getAction getWindow getShell isDisposed windowShell getWindow getShell windowShell windowShell isDisposed getSource doHandleDebugEvent getDisplay asyncExec
Default implementation to update on specific debug events Subclasses should override to handle events differently protected void do Handle Debug Event Debug Event event switch event get Kind case Debug Event TERMINATE update get Action get Selection break case Debug Event RESUME if event is Evaluation event get Detail Debug Event EVALUATION IMPLICIT 0 update get Action get Selection break case Debug Event SUSPEND Update on suspend events even for evaluations in case the user changed the selection during an implicit evaluation update get Action get Selection break  doHandleDebugEvent DebugEvent getKind DebugEvent getAction getSelection DebugEvent isEvaluation getDetail DebugEvent EVALUATION_IMPLICIT getAction getSelection DebugEvent getAction getSelection
see I Workbench Window Action Delegate init I Workbench Window public void init I Workbench Window window super init window Debug Plugin get Default add Debug Event Listener this  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow DebugPlugin getDefault addDebugEventListener
see I View Action Delegate init I View Part public void init I View Part view super init view Debug Plugin get Default add Debug Event Listener this set Window view get View Site get Workbench Window  IViewActionDelegate IViewPart IViewPart DebugPlugin getDefault addDebugEventListener setWindow getViewSite getWorkbenchWindow
see org eclipse ui I Action Delegate2 init org eclipse jface action I Action public void init I Action action  IActionDelegate2 IAction IAction
see org eclipse ui I Action Delegate2 run With Event org eclipse jface action I Action org eclipse swt widgets Event public void run With Event I Action action Event event run action  IActionDelegate2 runWithEvent IAction runWithEvent IAction

see I View Action Delegate init I View Part public void init I View Part view set View view set Window view get View Site get Workbench Window  IViewActionDelegate IViewPart IViewPart setView setWindow getViewSite getWorkbenchWindow
see Abstract Debug Action Delegate initialize I Action I Selection protected boolean initialize I Action action I Selection selection if is Initialized I Debug View debug View I Debug View get View get Adapter I Debug View class if debug View null debug View set Action I Debug View REMOVE ACTION action return super initialize action selection return false  AbstractDebugActionDelegate IAction ISelection IAction ISelection isInitialized IDebugView debugView IDebugView getView getAdapter IDebugView debugView debugView setAction IDebugView REMOVE_ACTION

see Abstract Debug Action Delegate do Action Object protected void do Action Object element do Action get Action set Enabled false  AbstractDebugActionDelegate doAction doAction doAction getAction setEnabled
see I Action Delegate run I Action public void run I Action action do Action null  IActionDelegate IAction IAction doAction
protected abstract void do Action  doAction
protected abstract void do Action protected void update I Action action I Selection s update  doAction IAction ISelection
protected abstract void update 
Remove all actions do care nothing about the current selection see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection s if is Initialized action set Enabled false set Action action set Initialized true update  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection isInitialized setEnabled setAction setInitialized
see I View Action Delegate init I View Part public void init I View Part view set View view set Window view get View Site get Workbench Window  IViewActionDelegate IViewPart IViewPart setView setWindow getViewSite getWorkbenchWindow

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Action Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE ActionMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

Constructs a new action public Add To Favorites Action super NON NLS 1 set Enabled false Workbench Help set Help this I Debug Help Context Ids EDIT LAUNCH CONFIGURATION ACTION  AddToFavoritesAction setEnabled WorkbenchHelp setHelp IDebugHelpContextIds EDIT_LAUNCH_CONFIGURATION_ACTION
see org eclipse ui actions Selection Listener Action update Selection org eclipse jface viewers I Structured Selection protected boolean update Selection I Structured Selection selection set Launch Configuration null set Mode null if selection size 1 Object object selection get First Element I Launch launch null if object instanceof I Adaptable launch I Launch I Adaptable object get Adapter I Launch class if launch null if object instanceof I Launch launch I Launch object else if object instanceof I Debug Element launch I Debug Element object get Launch else if object instanceof I Process launch I Process object get Launch if launch null I Launch Configuration configuration launch get Launch Configuration if configuration null set Launch Configuration configuration set Mode launch get Launch Mode set Group DebugUI Tools get Launch Group configuration get Mode set Text Message Format format Action Messages get String Add To Favorites Action 1 new String get Group get Label NON NLS 1 Disable the action if the launch config is private I Launch Configuration config get Launch Configuration if config null return false else if DebugUI Tools is Private config return false if get Group null try List groups config get Attribute I DebugUI Constants ATTR FAVORITE GROUPS List null if groups null return groups contains get Group get Identifier return true catch Core Exception e return false  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection setLaunchConfiguration setMode getFirstElement ILaunch IAdaptable ILaunch IAdaptable getAdapter ILaunch ILaunch ILaunch IDebugElement IDebugElement getLaunch IProcess IProcess getLaunch ILaunchConfiguration getLaunchConfiguration setLaunchConfiguration setMode getLaunchMode setGroup DebugUITools getLaunchGroup getMode setText MessageFormat ActionMessages getString AddToFavoritesAction getGroup getLabel ILaunchConfiguration getLaunchConfiguration DebugUITools isPrivate getGroup getAttribute IDebugUIConstants ATTR_FAVORITE_GROUPS getGroup getIdentifier CoreException
protected void set Launch Configuration I Launch Configuration configuration f Configuration configuration  setLaunchConfiguration ILaunchConfiguration fConfiguration
protected I Launch Configuration get Launch Configuration return f Configuration  ILaunchConfiguration getLaunchConfiguration fConfiguration
protected void set Mode String mode f Mode mode  setMode fMode
protected String get Mode return f Mode  getMode fMode
protected void set Group I Launch Group group f Group group  setGroup ILaunchGroup fGroup
protected I Launch Group get Group return f Group  ILaunchGroup getGroup fGroup
Busy Indicator show While DebugUI Plugin get Standard Display new Runnable public void run try List list get Launch Configuration get Attribute I DebugUI Constants ATTR FAVORITE GROUPS List null if list null list new Array List list add get Group get Identifier I Launch Configuration Working Copy copy get Launch Configuration get Working Copy copy set Attribute I DebugUI Constants ATTR FAVORITE GROUPS list copy do Save set Enabled false catch Core Exception e ex 0 e  BusyIndicator showWhile DebugUIPlugin getStandardDisplay getLaunchConfiguration getAttribute IDebugUIConstants ATTR_FAVORITE_GROUPS ArrayList getGroup getIdentifier ILaunchConfigurationWorkingCopy getLaunchConfiguration getWorkingCopy setAttribute IDebugUIConstants ATTR_FAVORITE_GROUPS doSave setEnabled CoreException
see org eclipse jface action I Action run public void run final Core Exception ex new Core Exception 1 Busy Indicator show While DebugUI Plugin get Standard Display new Runnable public void run try List list get Launch Configuration get Attribute I DebugUI Constants ATTR FAVORITE GROUPS List null if list null list new Array List list add get Group get Identifier I Launch Configuration Working Copy copy get Launch Configuration get Working Copy copy set Attribute I DebugUI Constants ATTR FAVORITE GROUPS list copy do Save set Enabled false catch Core Exception e ex 0 e if ex 0 null DebugUI Plugin error Dialog DebugUI Plugin get Shell Action Messages get String Add To Favorites Action 2 Action Messages get String Add To Favorites Action 3 ex 0 get Status NON NLS 1 NON NLS 2  IAction CoreException CoreException BusyIndicator showWhile DebugUIPlugin getStandardDisplay getLaunchConfiguration getAttribute IDebugUIConstants ATTR_FAVORITE_GROUPS ArrayList getGroup getIdentifier ILaunchConfigurationWorkingCopy getLaunchConfiguration getWorkingCopy setAttribute IDebugUIConstants ATTR_FAVORITE_GROUPS doSave setEnabled CoreException DebugUIPlugin errorDialog DebugUIPlugin getShell ActionMessages getString AddToFavoritesAction ActionMessages getString AddToFavoritesAction getStatus

see org eclipse ui I View Action Delegate init org eclipse ui I View Part public void init I View Part view  IViewActionDelegate IViewPart IViewPart
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action create a watch expression I Watch Expression watch Expression Debug Plugin get Default get Expression Manager new Watch Expression NON NLS 1 open the watch expression dialog if new Watch Expression Dialog DebugUI Plugin get Shell watch Expression false open Window OK if OK is selected add the expression to the expression view and try to evaluate the expression Debug Plugin get Default get Expression Manager add Expression watch Expression watch Expression set Expression Context get Context  IActionDelegate IAction IAction IWatchExpression watchExpression DebugPlugin getDefault getExpressionManager newWatchExpression WatchExpressionDialog DebugUIPlugin getShell watchExpression DebugPlugin getDefault getExpressionManager addExpression watchExpression watchExpression setExpressionContext getContext
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection

public Assign Value Action Variables View var View I Source Viewer detail Viewer super var View get Viewer Action Messages get String Assign Value Action 1 NON NLS 1 variables View var View details Viewer detail Viewer set Enabled false variables View get Site get Key Binding Service register Action this  AssignValueAction VariablesView varView ISourceViewer detailViewer varView getViewer ActionMessages getString AssignValueAction variablesView varView detailsViewer detailViewer setEnabled variablesView getSite getKeyBindingService registerAction
public void selection Changed I Structured Selection selection boolean enabled false if selection size 1 selection get First Element instanceof I Value Modification I Value Modification val Mod I Value Modification selection get First Element if val Mod supports Value Modification super selection Changed selection enabled true set Enabled enabled  selectionChanged IStructuredSelection getFirstElement IValueModification IValueModification valMod IValueModification getFirstElement valMod supportsValueModification selectionChanged setEnabled
public void run I Variable variable I Variable get Structured Selection get First Element Point selection details Viewer get Selected Range String value null if selection y 0 value details Viewer get Document get else try value details Viewer get Document get selection x selection y catch Bad Location Exception e1 try if variable verify Value value variable set Value value else I Workbench Window window DebugUI Plugin get Active Workbench Window if window null return Shell active Shell window get Shell DebugUI Plugin error Dialog active Shell Action Messages get String Assign Value Action 2 Message Format format Action Messages get String Assign Value Action 3 new String value variable get Name new Status Info I Status ERROR Action Messages get String Assign Value Action 4 NON NLS 1 NON NLS 2 NON NLS 3 catch Debug Exception e DebugUI Plugin log e  IVariable IVariable getStructuredSelection getFirstElement detailsViewer getSelectedRange detailsViewer getDocument detailsViewer getDocument BadLocationException verifyValue setValue IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow activeShell getShell DebugUIPlugin errorDialog activeShell ActionMessages getString AssignValueAction MessageFormat ActionMessages getString AssignValueAction getName StatusInfo IStatus ActionMessages getString AssignValueAction DebugException DebugUIPlugin
see org eclipse jface action I Action get Action Definition Id public String get Action Definition Id return org eclipse ui file save NON NLS 1  IAction getActionDefinitionId getActionDefinitionId

public Change Variable Value Action Viewer viewer super viewer Action Messages get String Change Variable Value title NON NLS 1 set Description Action Messages get String Change Variable Value tool Tip Text NON NLS 1 set Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG ELCL CHANGE VARIABLE VALUE set Hover Image Descriptor Debug Plugin Images get Image Descriptor I DebugUI Constants IMG LCL CHANGE VARIABLE VALUE set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL CHANGE VARIABLE VALUE Workbench Help set Help this I Debug Help Context Ids CHANGE VALUE ACTION  ChangeVariableValueAction ActionMessages getString ChangeVariableValue setDescription ActionMessages getString ChangeVariableValue toolTipText setImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_ELCL_CHANGE_VARIABLE_VALUE setHoverImageDescriptor DebugPluginImages getImageDescriptor IDebugUIConstants IMG_LCL_CHANGE_VARIABLE_VALUE setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_CHANGE_VARIABLE_VALUE WorkbenchHelp setHelp IDebugHelpContextIds CHANGE_VALUE_ACTION
f Input Dialog new Change Variable Value Input Dialog active Shell Action Messages get String Change Variable Value 1 Message Format format Action Messages get String Change Variable Value 2 new String name value new I Input Validator NON NLS 1 NON NLS 2 Returns an error string if the input is invalid public String is Valid String input try if f Variable verify Value input return null null means valid catch Debug Exception exception return Action Messages get String Change Variable Value 3 NON NLS 1 return Action Messages get String Change Variable Value 4 NON NLS 1  fInputDialog ChangeVariableValueInputDialog activeShell ActionMessages getString ChangeVariableValue MessageFormat ActionMessages getString ChangeVariableValue IInputValidator isValid fVariable verifyValue DebugException ActionMessages getString ChangeVariableValue ActionMessages getString ChangeVariableValue
Edit the variable value with an inline text editor protected void do Action Performed final I Variable variable I Workbench Window window DebugUI Plugin get Active Workbench Window if window null return Shell active Shell window get Shell If a previous edit is still in progress don t start another if f Input Dialog null return f Variable variable String name NON NLS 1 String value NON NLS 1 try name f Variable get Name value f Variable get Value get Value String catch Debug Exception exception DebugUI Plugin error Dialog active Shell Action Messages get String Change Variable Value error Dialog Title Action Messages get String Change Variable Value error Dialog Message exception NON NLS 2 NON NLS 1 f Input Dialog null return f Input Dialog new Change Variable Value Input Dialog active Shell Action Messages get String Change Variable Value 1 Message Format format Action Messages get String Change Variable Value 2 new String name value new I Input Validator NON NLS 1 NON NLS 2 Returns an error string if the input is invalid public String is Valid String input try if f Variable verify Value input return null null means valid catch Debug Exception exception return Action Messages get String Change Variable Value 3 NON NLS 1 return Action Messages get String Change Variable Value 4 NON NLS 1 f Input Dialog open String new Value f Input Dialog get Value if new Value null null value means cancel was pressed try f Variable set Value new Value get Selection Provider set Selection new Structured Selection variable catch Debug Exception de DebugUI Plugin error Dialog active Shell Action Messages get String Change Variable Value error Dialog Title Action Messages get String Change Variable Value error Dialog Message de NON NLS 2 NON NLS 1 f Input Dialog null return f Input Dialog null  doActionPerformed IVariable IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow activeShell getShell fInputDialog fVariable fVariable getName fVariable getValue getValueString DebugException DebugUIPlugin errorDialog activeShell ActionMessages getString ChangeVariableValue errorDialogTitle ActionMessages getString ChangeVariableValue errorDialogMessage fInputDialog fInputDialog ChangeVariableValueInputDialog activeShell ActionMessages getString ChangeVariableValue MessageFormat ActionMessages getString ChangeVariableValue IInputValidator isValid fVariable verifyValue DebugException ActionMessages getString ChangeVariableValue ActionMessages getString ChangeVariableValue fInputDialog newValue fInputDialog getValue newValue fVariable setValue newValue getSelectionProvider setSelection StructuredSelection DebugException DebugUIPlugin errorDialog activeShell ActionMessages getString ChangeVariableValue errorDialogTitle ActionMessages getString ChangeVariableValue errorDialogMessage fInputDialog fInputDialog
Updates the enabled state of this action based on the selection protected void update I Structured Selection sel Iterator iter sel iterator if iter has Next Object object iter next if object instanceof I Value Modification I Value Modification var Mod I Value Modification object if var Mod supports Value Modification set Enabled false return set Enabled iter has Next return set Enabled false  IStructuredSelection hasNext IValueModification IValueModification varMod IValueModification varMod supportsValueModification setEnabled setEnabled hasNext setEnabled
see I Action run public void run Iterator iterator get Structured Selection iterator do Action Performed I Variable iterator next  IAction getStructuredSelection doActionPerformed IVariable
see Selection Provider Action selection Changed org eclipse jface viewers I Structured Selection public void selection Changed I Structured Selection sel update sel  SelectionProviderAction selectionChanged IStructuredSelection selectionChanged IStructuredSelection

private Label error Message Label Creates an input dialog with OK and Cancel buttons Note that the dialog will have no visual representation no widgets until it is told to open p Note that the code open code method blocks for input dialogs p param parent Shell the parent shell param dialog Title the dialog title or code null code if none param dialog Message the dialog message or code null code if none param initial Value the initial input value or code null code if none equivalent to the empty string param validator an input validator or code null code if none public Change Variable Value Input Dialog Shell parent Shell String dialog Title String dialog Message String initial Value I Input Validator validator super parent Shell this title dialog Title message dialog Message if initial Value null value NON NLS 1 else value initial Value this validator validator set Shell Style get Shell Style SWT RESIZE  errorMessageLabel parentShell dialogTitle dialogMessage initialValue ChangeVariableValueInputDialog parentShell dialogTitle dialogMessage initialValue IInputValidator parentShell dialogTitle dialogMessage initialValue initialValue setShellStyle getShellStyle
protected void button Pressed int button Id if button Id I Dialog Constants OK ID value text get Text else value null super button Pressed button Id  buttonPressed buttonId buttonId IDialogConstants OK_ID getText buttonPressed buttonId
protected void configure Shell Shell shell super configure Shell shell if title null shell set Text title  configureShell configureShell setText
protected void create Buttons For Button Bar Composite parent create OK and Cancel buttons by default ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false do this here because setting the text will set enablement on the ok button text set Focus if value null text set Text value text select All  createButtonsForButtonBar okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL setFocus setText selectAll
protected Control create Dialog Area Composite parent Font font parent get Font create composite Composite composite Composite super create Dialog Area parent create message if message null Label label new Label composite SWT WRAP label set Text message Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER data width Hint convert HorizontalDL Us To Pixels I Dialog Constants MINIMUM MESSAGE AREA WIDTH label set Layout Data data label set Font font text new Text composite SWT MULTI SWT BORDER SWT V SCROLL SWT H SCROLL Grid Data grid Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB VERTICAL Grid Data VERTICAL ALIGN FILL grid Data height Hint 50 grid Data width Hint 100 text set Layout Data grid Data text set Font font text add Modify Listener new Modify Listener public void modify Text Modify Event e if ok Button is Enabled return error Message Label set Text NON NLS 1 error Message Label get Parent update ok Button set Enabled true error Message Label new Label composite SWT NONE error Message Label set Layout Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL error Message Label set Font font return composite  createDialogArea getFont createDialogArea setText GridData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER widthHint convertHorizontalDLUsToPixels IDialogConstants MINIMUM_MESSAGE_AREA_WIDTH setLayoutData setFont V_SCROLL H_SCROLL GridData gridData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL GridData GRAB_VERTICAL GridData VERTICAL_ALIGN_FILL gridData heightHint gridData widthHint setLayoutData gridData setFont addModifyListener ModifyListener modifyText ModifyEvent okButton isEnabled errorMessageLabel setText errorMessageLabel getParent okButton setEnabled errorMessageLabel errorMessageLabel setLayoutData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL errorMessageLabel setFont
Returns the error message label return the error message label protected Label get Error Message Label return error Message Label  getErrorMessageLabel errorMessageLabel
Returns the ok button return the ok button protected Button get Ok Button return ok Button  getOkButton okButton
Returns the text area return the text area protected Text get Text return text  getText
Returns the validator return the validator protected I Input Validator get Validator return validator  IInputValidator getValidator
Returns the string typed into this input dialog return the input string public String get Value return value  getValue
Validates the input p The default implementation of this framework method delegates the request to the supplied input validator object if it finds the input invalid the error message is displayed in the dialog s message line This hook method is called whenever the text changes in the input field p protected void validate Input String error Message null if validator null error Message validator is Valid text get Text Bug 16256 important not to treat blank error the same as null no error error Message Label set Text error Message null error Message NON NLS 1 ok Button set Enabled error Message null error Message Label get Parent update  validateInput errorMessage errorMessage isValid getText errorMessageLabel setText errorMessage errorMessage okButton setEnabled errorMessage errorMessageLabel getParent
protected void ok Pressed validate Input if ok Button is Enabled super ok Pressed  okPressed validateInput okButton isEnabled okPressed
Returns the name of the section that this dialog stores its settings in return String protected String get Dialog Settings Section Name return I DebugUI Constants PLUGIN ID CHANGE VARIABLE VALUE DIALOG SECTION NON NLS 1  getDialogSettingsSectionName IDebugUIConstants PLUGIN_ID CHANGE_VARIABLE_VALUE_DIALOG_SECTION
see org eclipse jface window Window close public boolean close Dialog Settings Helper persist Shell Geometry get Shell get Dialog Settings Section Name return super close  DialogSettingsHelper persistShellGeometry getShell getDialogSettingsSectionName
protected Point get Initial Location Point initial Size Point initial Location Dialog Settings Helper get Initial Location get Dialog Settings Section Name if initial Location null return initial Location return super get Initial Location initial Size  getInitialLocation initialSize initialLocation DialogSettingsHelper getInitialLocation getDialogSettingsSectionName initialLocation initialLocation getInitialLocation initialSize
see org eclipse jface window Window get Initial Size protected Point get Initial Size Point size super get Initial Size return Dialog Settings Helper get Initial Size get Dialog Settings Section Name size  getInitialSize getInitialSize getInitialSize DialogSettingsHelper getInitialSize getDialogSettingsSectionName
see org eclipse jface window Window handle Shell Close Event protected void handle Shell Close Event value null super handle Shell Close Event  handleShellCloseEvent handleShellCloseEvent handleShellCloseEvent

public Collapse All Action Abstract Tree Viewer viewer super Action Messages get String Collapse All Action 0 Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG ELCL COLLAPSE ALL NON NLS 1 set Tool Tip Text Action Messages get String Collapse All Action 0 NON NLS 1 set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL COLLAPSE ALL set Hover Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG LCL COLLAPSE ALL f Viewer viewer  CollapseAllAction AbstractTreeViewer ActionMessages getString CollapseAllAction DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_ELCL_COLLAPSE_ALL setToolTipText ActionMessages getString CollapseAllAction setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_COLLAPSE_ALL setHoverImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_LCL_COLLAPSE_ALL fViewer
see org eclipse jface action I Action run public void run f Viewer collapse All  IAction fViewer collapseAll

see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action I Structured Selection selection get Current Selection I Expression Manager expression Manager Debug Plugin get Default get Expression Manager for Iterator iter selection iterator iter has Next I Expression expression I Expression iter next create the new watch expression I Watch Expression watch Expression expression Manager new Watch Expression expression get Expression Text expression Manager remove Expression expression expression Manager add Expression watch Expression refresh and re evaluate watch Expression set Expression Context get Context  IActionDelegate IAction IAction IStructuredSelection getCurrentSelection IExpressionManager expressionManager DebugPlugin getDefault getExpressionManager hasNext IExpression IExpression IWatchExpression watchExpression expressionManager newWatchExpression getExpressionText expressionManager removeExpression expressionManager addExpression watchExpression watchExpression setExpressionContext getContext

see Abstract Debug Action Delegate initialize I Action I Selection protected boolean initialize I Action action I Selection selection if is Initialized I Debug View adapter I Debug View get View get Adapter I Debug View class if adapter null if adapter get Viewer instanceof Content Viewer set Viewer Tree Viewer adapter get Viewer adapter set Action get Action Id action return super initialize action selection return false  AbstractDebugActionDelegate IAction ISelection IAction ISelection isInitialized IDebugView IDebugView getView getAdapter IDebugView getViewer ContentViewer setViewer TreeViewer getViewer setAction getActionId
protected String get Action Id return I Debug View COPY ACTION  getActionId IDebugView COPY_ACTION
see Abstract Debug Action Delegate is Enabled For Object protected boolean is Enabled For Object element return get Viewer null element instanceof I Debug Element  AbstractDebugActionDelegate isEnabledFor isEnabledFor getViewer IDebugElement
see Abstract Debug Action Delegate do Action Object protected void do Action Tree Item item String Buffer buffer append item buffer 0  AbstractDebugActionDelegate doAction doAction TreeItem StringBuffer
Appends the representation of the specified element using the label provider and indent to the buffer For elements down to stack frames children representations are append to the buffer as well protected void append Tree Item item String Buffer buffer int indent for int i 0 i indent i buffer append t buffer append item get Text buffer append System get Property line separator NON NLS 1 if should Append Children item Tree Item children item get Items for int i 0 i children length i Tree Item child children i append child buffer indent 1  TreeItem StringBuffer getText getProperty shouldAppendChildren TreeItem getItems TreeItem
Busy Indicator show While Display get Current new Runnable public void run String Buffer buffer new String Buffer while iter has Next do Action Tree Item iter next buffer Text Transfer plain Text Transfer Text Transfer get Instance Clipboard clipboard new Clipboard get Viewer get Control get Display try do Copy clipboard plain Text Transfer buffer finally clipboard dispose  BusyIndicator showWhile getCurrent StringBuffer StringBuffer hasNext doAction TreeItem TextTransfer plainTextTransfer TextTransfer getInstance getViewer getControl getDisplay doCopy plainTextTransfer
Do the specific action using the current selection public void run I Action action final Iterator iter prune Selection Busy Indicator show While Display get Current new Runnable public void run String Buffer buffer new String Buffer while iter has Next do Action Tree Item iter next buffer Text Transfer plain Text Transfer Text Transfer get Instance Clipboard clipboard new Clipboard get Viewer get Control get Display try do Copy clipboard plain Text Transfer buffer finally clipboard dispose  IAction pruneSelection BusyIndicator showWhile getCurrent StringBuffer StringBuffer hasNext doAction TreeItem TextTransfer plainTextTransfer TextTransfer getInstance getViewer getControl getDisplay doCopy plainTextTransfer
protected void do Copy Clipboard clipboard Text Transfer plain Text Transfer String Buffer buffer try clipboard set Contents new String buffer to String new Transfer plain Text Transfer catch SWT Error e if e code DND ERROR CANNOT SET CLIPBOARD throw e if Message Dialog open Question get Viewer get Control get Shell Action Messages get String Copy To Clipboard Action Delegate Problem Copying to Clipboard 1 Action Messages get String Copy To Clipboard Action Delegate There was a problem when accessing the system clipboard  Retry  2 NON NLS 1 NON NLS 2 do Copy clipboard plain Text Transfer buffer  doCopy TextTransfer plainTextTransfer StringBuffer setContents toString plainTextTransfer SWTError ERROR_CANNOT_SET_CLIPBOARD MessageDialog openQuestion getViewer getControl getShell ActionMessages getString CopyToClipboardActionDelegate Problem_Copying_to_Clipboard_1 ActionMessages getString CopyToClipboardActionDelegate There_was_a_problem_when_accessing_the_system_clipboard _Retry__2 doCopy plainTextTransfer
Removes the duplicate items from the selection That is if both a parent and a child are in a selection remove the child protected Iterator prune Selection Tree Item selection get Viewer get Tree get Selection List items new Array List selection length for int i 0 i selection length i Tree Item item selection i if is Enabled For item get Data if walk Hierarchy item items items add item return items iterator  pruneSelection TreeItem getViewer getTree getSelection ArrayList TreeItem isEnabledFor getData walkHierarchy
Returns whether the parent of the specified element is already contained in the collection protected boolean walk Hierarchy Tree Item item List elements Tree Item parent item get Parent Item if parent null return true if elements contains parent return false return walk Hierarchy parent elements  walkHierarchy TreeItem TreeItem getParentItem walkHierarchy
protected boolean should Append Children Tree Item item Object data item get Data return data instanceof I Debug Target data instanceof I Thread  shouldAppendChildren TreeItem getData IDebugTarget IThread
protected Tree Viewer get Viewer return f Viewer  TreeViewer getViewer fViewer
protected void set Viewer Tree Viewer viewer f Viewer viewer  setViewer TreeViewer fViewer
see Abstract Debug Action Delegate do Action Object protected void do Action Object element not used  AbstractDebugActionDelegate doAction doAction

Only append children that are expanded in the tree viewer protected boolean should Append Children Tree Item item return item get Expanded  shouldAppendChildren TreeItem getExpanded
protected String get Action Id return I Debug View COPY ACTION Variables NON NLS 1  getActionId IDebugView COPY_ACTION

public class Debug As Action extends Launch As Action public Debug As Action super I DebugUI Constants ID DEBUG LAUNCH GROUP  DebugAsAction LaunchAsAction DebugAsAction IDebugUIConstants ID_DEBUG_LAUNCH_GROUP

public class Debug Contextual Launch Action extends Contextual Launch Action public Debug Contextual Launch Action super I Launch Manager DEBUG MODE  DebugContextualLaunchAction ContextualLaunchAction DebugContextualLaunchAction ILaunchManager DEBUG_MODE

public class Debug History Menu Action extends Abstract Launch History Action public Debug History Menu Action super I DebugUI Constants ID DEBUG LAUNCH GROUP  DebugHistoryMenuAction AbstractLaunchHistoryAction DebugHistoryMenuAction IDebugUIConstants ID_DEBUG_LAUNCH_GROUP

see Relaunch Last Action get Mode public String get Mode return I Launch Manager DEBUG MODE  RelaunchLastAction getMode getMode ILaunchManager DEBUG_MODE
see org eclipse debug internal ui actions Launch Drop Down Action get Launch Group Id public String get Launch Group Id return I DebugUI Constants ID DEBUG LAUNCH GROUP  LaunchDropDownAction getLaunchGroupId getLaunchGroupId IDebugUIConstants ID_DEBUG_LAUNCH_GROUP

public class Debug Toolbar Action extends Abstract Launch Toolbar Action public Debug Toolbar Action super I DebugUI Constants ID DEBUG LAUNCH GROUP  DebugToolbarAction AbstractLaunchToolbarAction DebugToolbarAction IDebugUIConstants ID_DEBUG_LAUNCH_GROUP

This action disables breakpoints protected boolean is Enable Action return false  isEnableAction

public class Disable Watch Expression Action extends Enable Watch Expression Action public Disable Watch Expression Action f Enable false  DisableWatchExpressionAction EnableWatchExpressionAction DisableWatchExpressionAction fEnable

see Abstract Debug Action Delegate do Action Object protected void do Action Object element throws Debug Exception if element instanceof I Disconnect I Disconnect element disconnect  AbstractDebugActionDelegate doAction doAction DebugException IDisconnect IDisconnect
see Abstract Debug Action Delegate is Enabled For Object protected boolean is Enabled For Object element return element instanceof I Disconnect I Disconnect element can Disconnect  AbstractDebugActionDelegate isEnabledFor isEnabledFor IDisconnect IDisconnect canDisconnect
see Abstract Debug Action Delegate get Status Message protected String get Status Message return Action Messages get String Disconnect Action Delegate Exceptions occurred attempting to disconnect  2 NON NLS 1  AbstractDebugActionDelegate getStatusMessage getStatusMessage ActionMessages getString DisconnectActionDelegate Exceptions_occurred_attempting_to_disconnect _2
see Abstract Debug Action Delegate get Error Dialog Message protected String get Error Dialog Message return Action Messages get String Disconnect Action Delegate Disconnect failed 1 NON NLS 1  AbstractDebugActionDelegate getErrorDialogMessage getErrorDialogMessage ActionMessages getString DisconnectActionDelegate Disconnect_failed_1
see Abstract Debug Action Delegate get Error Dialog Title protected String get Error Dialog Title return Action Messages get String Disconnect Action Delegate Disconnect 3 NON NLS 1  AbstractDebugActionDelegate getErrorDialogTitle getErrorDialogTitle ActionMessages getString DisconnectActionDelegate Disconnect_3
see Listener Action Delegate do Handle Debug Event Debug Event protected void do Handle Debug Event Debug Event event if event get Kind Debug Event TERMINATE event get Source instanceof I Debug Target update get Action get Selection  ListenerActionDelegate doHandleDebugEvent DebugEvent doHandleDebugEvent DebugEvent getKind DebugEvent getSource IDebugTarget getAction getSelection

Constructs a new action public Edit Launch Configuration Action super NON NLS 1 set Enabled false Workbench Help set Help this I Debug Help Context Ids EDIT LAUNCH CONFIGURATION ACTION  EditLaunchConfigurationAction setEnabled WorkbenchHelp setHelp IDebugHelpContextIds EDIT_LAUNCH_CONFIGURATION_ACTION
see org eclipse ui actions Selection Listener Action update Selection org eclipse jface viewers I Structured Selection protected boolean update Selection I Structured Selection selection set Launch Configuration null set Mode null if selection size 1 Object object selection get First Element I Launch launch null if object instanceof I Adaptable launch I Launch I Adaptable object get Adapter I Launch class if launch null if object instanceof I Launch launch I Launch object else if object instanceof I Debug Element launch I Debug Element object get Launch else if object instanceof I Process launch I Process object get Launch if launch null I Launch Configuration configuration launch get Launch Configuration if configuration null try The DebugUI Plugin creates stand in launches with copied configurations while a launch is waiting for a build These copied configurations have an attribute that points to the config that the user is really launching String underlying Handle configuration get Attribute DebugUI Plugin ATTR LAUNCHING CONFIG HANDLE NON NLS 1 if underlying Handle length 0 I Launch Configuration underlying Config Debug Plugin get Default get Launch Manager get Launch Configuration underlying Handle if underlying Config null configuration underlying Config catch Core Exception e1 set Launch Configuration configuration set Mode launch get Launch Mode set Text Message Format format Action Messages get String Edit Launch Configuration Action 1 new String configuration get Name NON NLS 1 Image Descriptor descriptor null try descriptor Debug Plugin Images get Image Descriptor configuration get Type get Identifier catch Core Exception e DebugUI Plugin log e set Image Descriptor descriptor Disable the action if the launch config is private I Launch Configuration config get Launch Configuration if config null return false return DebugUI Tools is Private config  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection setLaunchConfiguration setMode getFirstElement ILaunch IAdaptable ILaunch IAdaptable getAdapter ILaunch ILaunch ILaunch IDebugElement IDebugElement getLaunch IProcess IProcess getLaunch ILaunchConfiguration getLaunchConfiguration DebugUIPlugin underlyingHandle getAttribute DebugUIPlugin ATTR_LAUNCHING_CONFIG_HANDLE underlyingHandle ILaunchConfiguration underlyingConfig DebugPlugin getDefault getLaunchManager getLaunchConfiguration underlyingHandle underlyingConfig underlyingConfig CoreException setLaunchConfiguration setMode getLaunchMode setText MessageFormat ActionMessages getString EditLaunchConfigurationAction getName ImageDescriptor DebugPluginImages getImageDescriptor getType getIdentifier CoreException DebugUIPlugin setImageDescriptor ILaunchConfiguration getLaunchConfiguration DebugUITools isPrivate
protected void set Launch Configuration I Launch Configuration configuration f Configuration configuration  setLaunchConfiguration ILaunchConfiguration fConfiguration
protected I Launch Configuration get Launch Configuration return f Configuration  ILaunchConfiguration getLaunchConfiguration fConfiguration
protected void set Mode String mode f Mode mode  setMode fMode
protected String get Mode return f Mode  getMode fMode
see org eclipse jface action I Action run public void run I Launch Group group DebugUI Tools get Launch Group get Launch Configuration get Mode if group null DebugUI Tools open Launch Configuration Dialog DebugUI Plugin get Shell get Launch Configuration group get Identifier null  IAction ILaunchGroup DebugUITools getLaunchGroup getLaunchConfiguration getMode DebugUITools openLaunchConfigurationDialog DebugUIPlugin getShell getLaunchConfiguration getIdentifier

see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action I Watch Expression watch Expression I Watch Expression get Current Selection get First Element display the watch expression dialog for the currently selected watch expression new Watch Expression Dialog DebugUI Plugin get Shell watch Expression true open  IActionDelegate IAction IAction IWatchExpression watchExpression IWatchExpression getCurrentSelection getFirstElement WatchExpressionDialog DebugUIPlugin getShell watchExpression

private I Action f Action public Enable Breakpoints Action  IAction fAction EnableBreakpointsAction
protected I View Part get View return f View  IViewPart getView fView
protected void set View I View Part view f View view  setView IViewPart fView
see I View Action Delegate init I View Part public void init I View Part view set View view Debug Plugin get Default get Breakpoint Manager add Breakpoint Listener this view get View Site get Page add Part Listener this  IViewActionDelegate IViewPart IViewPart setView DebugPlugin getDefault getBreakpointManager addBreakpointListener getViewSite getPage addPartListener
protected void update selection Changed get Action get View get View Site get Selection Provider get Selection  selectionChanged getAction getView getViewSite getSelectionProvider getSelection
This action enables breakpoints protected boolean is Enable Action return true  isEnableAction
I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor while itr has Next I Breakpoint breakpoint I Breakpoint itr next try if size 1 if is Enable Action breakpoint set Enabled true else breakpoint set Enabled false else breakpoint set Enabled breakpoint is Enabled catch Core Exception e ms merge e get Status  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor hasNext IBreakpoint IBreakpoint isEnableAction setEnabled setEnabled setEnabled isEnabled CoreException getStatus
see I Action Delegate run I Action public void run I Action action I Structured Selection selection get Selection final int size selection size if size 0 return final Iterator itr selection iterator final Multi Status ms new Multi Status DebugUI Plugin get Unique Identifier Debug Exception REQUEST FAILED Action Messages get String Enable Breakpoint Action Enable breakpoint s  failed 2 null NON NLS 1 I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor while itr has Next I Breakpoint breakpoint I Breakpoint itr next try if size 1 if is Enable Action breakpoint set Enabled true else breakpoint set Enabled false else breakpoint set Enabled breakpoint is Enabled catch Core Exception e ms merge e get Status try Resources Plugin get Workspace run runnable null 0 new Null Progress Monitor catch Core Exception e Exceptions are handled by runnable if ms isOK I Workbench Window window DebugUI Plugin get Active Workbench Window if window null DebugUI Plugin error Dialog window get Shell Action Messages get String Enable Breakpoint Action Enabling breakpoints 3 Action Messages get String Enable Breakpoint Action Exceptions occurred enabling the breakpoint s  4 ms NON NLS 2 NON NLS 1 else DebugUI Plugin log ms  IActionDelegate IAction IAction IStructuredSelection getSelection MultiStatus MultiStatus DebugUIPlugin getUniqueIdentifier DebugException REQUEST_FAILED ActionMessages getString EnableBreakpointAction Enable_breakpoint _failed_2 IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor hasNext IBreakpoint IBreakpoint isEnableAction setEnabled setEnabled setEnabled isEnabled CoreException getStatus ResourcesPlugin getWorkspace NullProgressMonitor CoreException IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow DebugUIPlugin errorDialog getShell ActionMessages getString EnableBreakpointAction Enabling_breakpoints_3 ActionMessages getString EnableBreakpointAction Exceptions_occurred_enabling_the_breakpoint _4 DebugUIPlugin
private I Structured Selection get Selection return I Structured Selection get View get View Site get Selection Provider get Selection  IStructuredSelection getSelection IStructuredSelection getView getViewSite getSelectionProvider getSelection
see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection set Action action if selection instanceof I Structured Selection return I Structured Selection sel I Structured Selection selection Object o sel get First Element if o instanceof I Breakpoint return Iterator itr sel iterator boolean all Enabled true boolean all Disabled true while itr has Next I Breakpoint bp I Breakpoint itr next try if bp is Enabled all Disabled false else all Enabled false catch Core Exception ce I Workbench Window window DebugUI Plugin get Active Workbench Window if window null DebugUI Plugin error Dialog window get Shell Action Messages get String Enable Breakpoint Action Enabling breakpoints 3 Action Messages get String Enable Breakpoint Action Exceptions occurred enabling the breakpoint s  4 ce NON NLS 2 NON NLS 1 else DebugUI Plugin log ce if is Enable Action action set Enabled all Enabled else action set Enabled all Disabled  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection setAction IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement IBreakpoint allEnabled allDisabled hasNext IBreakpoint IBreakpoint isEnabled allDisabled allEnabled CoreException IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow DebugUIPlugin errorDialog getShell ActionMessages getString EnableBreakpointAction Enabling_breakpoints_3 ActionMessages getString EnableBreakpointAction Exceptions_occurred_enabling_the_breakpoint _4 DebugUIPlugin isEnableAction setEnabled allEnabled setEnabled allDisabled
Removes this action as a breakpoint and part listener public void dispose Debug Plugin get Default get Breakpoint Manager remove Breakpoint Listener this get View get View Site get Page remove Part Listener this  DebugPlugin getDefault getBreakpointManager removeBreakpointListener getView getViewSite getPage removePartListener
see I Breakpoints Listener breakpoints Added I Breakpoint public void breakpoints Added I Breakpoint breakpoints  IBreakpointsListener breakpointsAdded IBreakpoint breakpointsAdded IBreakpoint
see I Breakpoints Listener breakpoints Removed I Breakpoint I Marker Delta public void breakpoints Removed I Breakpoint breakpoints I Marker Delta deltas asynch Update  IBreakpointsListener breakpointsRemoved IBreakpoint IMarkerDelta breakpointsRemoved IBreakpoint IMarkerDelta asynchUpdate
see I Breakpoints Listener breakpoints Changed I Breakpoint I Marker Delta public void breakpoints Changed I Breakpoint breakpoints I Marker Delta deltas asynch Update  IBreakpointsListener breakpointsChanged IBreakpoint IMarkerDelta breakpointsChanged IBreakpoint IMarkerDelta asynchUpdate
Runnable r new Runnable public void run I Workbench Window ww get View get View Site get Page get Workbench Window if ww null return Shell s ww get Shell if s null s is Disposed return update  IWorkbenchWindow getView getViewSite getPage getWorkbenchWindow getShell isDisposed
protected void asynch Update if get Action null return I Workbench Window window get View get View Site get Page get Workbench Window if window null return Shell shell window get Shell if shell null shell is Disposed return Runnable r new Runnable public void run I Workbench Window ww get View get View Site get Page get Workbench Window if ww null return Shell s ww get Shell if s null s is Disposed return update shell get Display async Exec r  asynchUpdate getAction IWorkbenchWindow getView getViewSite getPage getWorkbenchWindow getShell isDisposed IWorkbenchWindow getView getViewSite getPage getWorkbenchWindow getShell isDisposed getDisplay asyncExec
protected I Action get Action return f Action  IAction getAction fAction
protected void set Action I Action action f Action action  setAction IAction fAction
see I Part Listener part Activated I Workbench Part public void part Activated I Workbench Part part  IPartListener partActivated IWorkbenchPart partActivated IWorkbenchPart
see I Part Listener part Brought To Top I Workbench Part public void part Brought To Top I Workbench Part part  IPartListener partBroughtToTop IWorkbenchPart partBroughtToTop IWorkbenchPart
see I Part Listener part Closed I Workbench Part public void part Closed I Workbench Part part if part equals get View dispose  IPartListener partClosed IWorkbenchPart partClosed IWorkbenchPart getView
see I Part Listener part Deactivated I Workbench Part public void part Deactivated I Workbench Part part  IPartListener partDeactivated IWorkbenchPart partDeactivated IWorkbenchPart
see I Part Listener part Opened I Workbench Part public void part Opened I Workbench Part part  IPartListener partOpened IWorkbenchPart partOpened IWorkbenchPart

see org eclipse ui I Object Action Delegate set Active Part org eclipse jface action I Action org eclipse ui I Workbench Part public void set Active Part I Action action I Workbench Part target Part  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action if f Selection instanceof I Structured Selection Iterator iter I Structured Selection f Selection iterator I Watch Expression expression while iter has Next expression I Watch Expression iter next expression set Enabled f Enable fire Watch Expression Changed expression else if f Selection instanceof I Watch Expression I Watch Expression expression I Watch Expression f Selection expression set Enabled f Enable fire Watch Expression Changed expression  IActionDelegate IAction IAction fSelection IStructuredSelection IStructuredSelection fSelection IWatchExpression hasNext IWatchExpression setEnabled fEnable fireWatchExpressionChanged fSelection IWatchExpression IWatchExpression IWatchExpression fSelection setEnabled fEnable fireWatchExpressionChanged
param expression private void fire Watch Expression Changed I Watch Expression expression Debug Plugin get Default fire Debug Event Set new Debug Event new Debug Event expression Debug Event CHANGE  fireWatchExpressionChanged IWatchExpression DebugPlugin getDefault fireDebugEventSet DebugEvent DebugEvent DebugEvent
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection f Selection selection if f Selection instanceof I Structured Selection boolean enabled false Iterator iter I Structured Selection selection iterator while iter has Next I Watch Expression expression I Watch Expression iter next if expression is Enabled f Enable enabled true break action set Enabled enabled else if f Selection instanceof I Watch Expression action set Enabled I Watch Expression f Selection is Enabled f Enable else action set Enabled false  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection fSelection fSelection IStructuredSelection IStructuredSelection hasNext IWatchExpression IWatchExpression isEnabled fEnable setEnabled fSelection IWatchExpression setEnabled IWatchExpression fSelection isEnabled fEnable setEnabled

private String f Launch Group Identifier public Execution Action String launch Group Identifier f Launch Group Identifier launch Group Identifier  fLaunchGroupIdentifier ExecutionAction launchGroupIdentifier fLaunchGroupIdentifier launchGroupIdentifier
see I Action Delegate2 run With Event I Action Event public void run With Event I Action action Event event run action  IActionDelegate2 runWithEvent IAction runWithEvent IAction
Open the launch configuration dialog passing in the current workbench selection private void open Launch Configuration Dialog I Workbench Window dwindow DebugUI Plugin get Active Workbench Window if dwindow null return Launch Configurations Dialog dialog new Launch Configurations Dialog DebugUI Plugin get Shell get Launch Configuration Manager get Launch Group f Launch Group Identifier dialog open  openLaunchConfigurationDialog IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow LaunchConfigurationsDialog LaunchConfigurationsDialog DebugUIPlugin getShell getLaunchConfigurationManager getLaunchGroup fLaunchGroupIdentifier
protected Launch Configuration Manager get Launch Configuration Manager return DebugUI Plugin get Default get Launch Configuration Manager  LaunchConfigurationManager getLaunchConfigurationManager DebugUIPlugin getDefault getLaunchConfigurationManager
Returns the mode of a launcher to use for this action protected abstract String get Mode  getMode
see org eclipse ui I Action Delegate2 dispose public void dispose  IActionDelegate2
see org eclipse ui I Action Delegate2 init org eclipse jface action I Action public void init I Action action  IActionDelegate2 IAction IAction
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action I Launch Configuration configuration get Launch Configuration Manager get Last Launch f Launch Group Identifier if configuration null open Launch Configuration Dialog else DebugUI Tools launch configuration get Mode  IActionDelegate IAction IAction ILaunchConfiguration getLaunchConfigurationManager getLastLaunch fLaunchGroupIdentifier openLaunchConfigurationDialog DebugUITools getMode
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection

Constructs a follow link action public Follow Hyperlink Action I Selection Provider selection Provider super selection Provider Action Messages get String Follow Hyperlink Action Open Link 1 NON NLS 1 set Tool Tip Text Action Messages get String Follow Hyperlink Action Follow the selected hyperlink  2 NON NLS 1 I Shared Images images DebugUI Plugin get Default get Workbench get Shared Images set Image Descriptor images get Image Descriptor IDE Shared Images IMG OPEN MARKER Workbench Help set Help this I Debug Help Context Ids FOLLOW CONSOLE HYPERLINK ACTION  FollowHyperlinkAction ISelectionProvider selectionProvider selectionProvider ActionMessages getString FollowHyperlinkAction Open_Link_1 setToolTipText ActionMessages getString FollowHyperlinkAction Follow_the_selected_hyperlink _2 ISharedImages DebugUIPlugin getDefault getWorkbench getSharedImages setImageDescriptor getImageDescriptor SharedImages IMG_OPEN_MARKER WorkbenchHelp setHelp IDebugHelpContextIds FOLLOW_CONSOLE_HYPERLINK_ACTION
public I Console Hyperlink get Hyper Link I Selection Provider selection Provider get Selection Provider if selection Provider instanceof Console Viewer I Text Selection text Selection I Text Selection selection Provider get Selection Console Viewer console Viewer Console Viewer selection Provider if text Selection null return console Viewer get Hyperlink text Selection get Offset return null  IConsoleHyperlink getHyperLink ISelectionProvider selectionProvider getSelectionProvider selectionProvider ConsoleViewer ITextSelection textSelection ITextSelection selectionProvider getSelection ConsoleViewer consoleViewer ConsoleViewer selectionProvider textSelection consoleViewer getHyperlink textSelection getOffset
see org eclipse jface action I Action run public void run I Console Hyperlink link get Hyper Link if link null link link Activated  IAction IConsoleHyperlink getHyperLink linkActivated

private I Action Bars f Action Bars public Key Binding Follow Hyperlink Action I Selection Provider selection Provider I Action Bars action Bars super selection Provider f Action Bars action Bars  IActionBars fActionBars KeyBindingFollowHyperlinkAction ISelectionProvider selectionProvider IActionBars actionBars selectionProvider fActionBars actionBars
see org eclipse jface action I Action run public void run I Console Hyperlink link get Hyper Link if link null I Status Line Manager status Line get Status Line Manager if status Line null status Line set Error Message Action Messages get String Key Binding Follow Hyper Link Action No hyperlink NON NLS 1 f Selection NotA Hyperlink true DebugUI Plugin get Standard Display beep else link link Activated f Selection NotA Hyperlink false  IAction IConsoleHyperlink getHyperLink IStatusLineManager statusLine getStatusLineManager statusLine statusLine setErrorMessage ActionMessages getString KeyBindingFollowHyperLinkAction No_hyperlink fSelectionNotAHyperlink DebugUIPlugin getStandardDisplay linkActivated fSelectionNotAHyperlink
public void clear Status Line if f Selection NotA Hyperlink I Status Line Manager status Line get Status Line Manager if status Line null status Line set Error Message null f Selection NotA Hyperlink false  clearStatusLine fSelectionNotAHyperlink IStatusLineManager statusLine getStatusLineManager statusLine statusLine setErrorMessage fSelectionNotAHyperlink
public void selection Changed I Selection selection if is Empty Selection selection clear Status Line  selectionChanged ISelection isEmptySelection clearStatusLine
see org eclipse ui actions Selection Provider Action selection Changed org eclipse jface viewers I Structured Selection public void selection Changed I Structured Selection selection selection Changed I Selection selection  SelectionProviderAction selectionChanged IStructuredSelection selectionChanged IStructuredSelection selectionChanged ISelection
This method is required because I Text Selection s of length zero are NOT considered empty according to the implementation of Text Selection is Empty see bug 32063 protected boolean is Empty Selection I Selection selection if selection instanceof I Text Selection return I Text Selection selection get Length 1 return selection is Empty  ITextSelection TextSelection isEmpty isEmptySelection ISelection ITextSelection ITextSelection getLength isEmpty
Convenience method protected I Status Line Manager get Status Line Manager return f Action Bars get Status Line Manager  IStatusLineManager getStatusLineManager fActionBars getStatusLineManager

public boolean test Object receiver String property Object args Object expected Value if property equals launchable NON NLS 1 if DebugUI Plugin get Default get Launch Configuration Manager launch Mode Available String expected Value return Platform get Adapter Manager has Adapter receiver I Launchable class get Name return false  expectedValue DebugUIPlugin getDefault getLaunchConfigurationManager launchModeAvailable expectedValue getAdapterManager hasAdapter ILaunchable getName

Constructor for Launch Shortcut Action public Launch Shortcut Action String mode Launch Shortcut Extension shortcut super shortcut get Label shortcut get Image Descriptor f Mode mode f Shortcut shortcut update Enablement  LaunchShortcutAction LaunchShortcutAction LaunchShortcutExtension getLabel getImageDescriptor fMode fShortcut updateEnablement
Runs with either the active editor or workbench selection see I Action run public void run I Workbench Window wb DebugUI Plugin get Active Workbench Window if wb null I Workbench Page page wb get Active Page if page null I Selection selection page get Selection if selection instanceof I Structured Selection f Shortcut launch selection f Mode else I Editor Part editor page get Active Editor if editor null f Shortcut launch editor f Mode  IAction IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow IWorkbenchPage getActivePage ISelection getSelection IStructuredSelection fShortcut fMode IEditorPart getActiveEditor fShortcut fMode
Since these actions are re created each time the run debug as menu is filled the enablement of this action is static private void update Enablement I Workbench Window wb DebugUI Plugin get Active Workbench Window boolean enabled false if wb null I Workbench Page page wb get Active Page if page null I Selection selection page get Selection if selection instanceof I Structured Selection I Structured Selection structured Selection I Structured Selection selection try check enablement logic if any Expression expression f Shortcut get Shortcut Enablement Expression if expression null enabled structured Selection is Empty else List list structured Selection to List I Evaluation Context context new Evaluation Context null list context add Variable selection list NON NLS 1 enabled f Shortcut eval Enablement Expression context expression catch Core Exception e else I Editor Part editor page get Active Editor if editor null enabled true set Enabled enabled  updateEnablement IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow IWorkbenchPage getActivePage ISelection getSelection IStructuredSelection IStructuredSelection structuredSelection IStructuredSelection fShortcut getShortcutEnablementExpression structuredSelection isEmpty structuredSelection toList IEvaluationContext EvaluationContext addVariable fShortcut evalEnablementExpression CoreException IEditorPart getActiveEditor setEnabled

public Link Breakpoints With Debug View Action Breakpoints View view super Action Messages get String Link Breakpoints With Debug View Action 0 NON NLS 1 set Tool Tip Text Action Messages get String Link Breakpoints With Debug View Action 1 NON NLS 1 set Description Action Messages get String Link Breakpoints With Debug View Action 2 NON NLS 1 set Image Descriptor Debug Plugin Images get Image Descriptor I DebugUI Constants IMG ACT SYNCED Workbench Help set Help this I Debug Help Context Ids LINK BREAKPOINTS WITH DEBUG ACTION f View view set Checked view is Tracking Selection  LinkBreakpointsWithDebugViewAction BreakpointsView ActionMessages getString LinkBreakpointsWithDebugViewAction setToolTipText ActionMessages getString LinkBreakpointsWithDebugViewAction setDescription ActionMessages getString LinkBreakpointsWithDebugViewAction setImageDescriptor DebugPluginImages getImageDescriptor IDebugUIConstants IMG_ACT_SYNCED WorkbenchHelp setHelp IDebugHelpContextIds LINK_BREAKPOINTS_WITH_DEBUG_ACTION fView setChecked isTrackingSelection
see org eclipse jface action I Action run public void run f View set Track Selection is Checked  IAction fView setTrackSelection isChecked

public Open Breakpoint Marker Action I Selection Provider selection Provider super selection Provider Action Messages get String Open Breakpoint Marker Action Go to File 1 NON NLS 1 set Tool Tip Text Action Messages get String Open Breakpoint Marker Action Go to File for Breakpoint 2 NON NLS 1 I Shared Images images DebugUI Plugin get Default get Workbench get Shared Images set Image Descriptor images get Image Descriptor IDE Shared Images IMG OPEN MARKER Workbench Help set Help this I Debug Help Context Ids OPEN BREAKPOINT ACTION set Enabled false  OpenBreakpointMarkerAction ISelectionProvider selectionProvider selectionProvider ActionMessages getString OpenBreakpointMarkerAction Go_to_File_1 setToolTipText ActionMessages getString OpenBreakpointMarkerAction Go_to_File_for_Breakpoint_2 ISharedImages DebugUIPlugin getDefault getWorkbench getSharedImages setImageDescriptor getImageDescriptor SharedImages IMG_OPEN_MARKER WorkbenchHelp setHelp IDebugHelpContextIds OPEN_BREAKPOINT_ACTION setEnabled
public void run I Workbench Window dwindow DebugUI Plugin get Active Workbench Window if dwindow null return I Workbench Page page dwindow get Active Page if page null return I Structured Selection selection get Structured Selection if selection is Empty set Enabled false return I Editor Part part null if input null String editor Id fg Presentation get Editor Id input breakpoint try part page open Editor input editor Id catch Part Init Exception e DebugUI Plugin error Dialog dwindow get Shell Action Messages get String Open Breakpoint Marker Action Go to Breakpoint 1 Action Messages get String Open Breakpoint Marker Action Exceptions occurred attempting to open the editor for the breakpoint resource 2 e NON NLS 1 NON NLS 2 if part null part set Focus IDE goto Marker part breakpoint get Marker  IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow IWorkbenchPage getActivePage IStructuredSelection getStructuredSelection isEmpty setEnabled IEditorPart editorId fgPresentation getEditorId openEditor editorId PartInitException DebugUIPlugin errorDialog getShell ActionMessages getString OpenBreakpointMarkerAction Go_to_Breakpoint_1 ActionMessages getString OpenBreakpointMarkerAction Exceptions_occurred_attempting_to_open_the_editor_for_the_breakpoint_resource_2 setFocus gotoMarker getMarker
public void selection Changed I Structured Selection sel if sel size 1 breakpoint I Breakpoint sel get First Element input fg Presentation get Editor Input breakpoint if input null set Enabled true else set Enabled false else breakpoint null input null set Enabled false  selectionChanged IStructuredSelection IBreakpoint getFirstElement fgPresentation getEditorInput setEnabled setEnabled setEnabled

public class Open Debug Configurations extends Open Launch Dialog Action public Open Debug Configurations super I DebugUI Constants ID DEBUG LAUNCH GROUP  OpenDebugConfigurations OpenLaunchDialogAction OpenDebugConfigurations IDebugUIConstants ID_DEBUG_LAUNCH_GROUP

public class Open Profile Configurations extends Open Launch Dialog Action public Open Profile Configurations super I DebugUI Constants ID PROFILE LAUNCH GROUP  OpenProfileConfigurations OpenLaunchDialogAction OpenProfileConfigurations IDebugUIConstants ID_PROFILE_LAUNCH_GROUP

public class Open Run Configurations extends Open Launch Dialog Action public Open Run Configurations super I DebugUI Constants ID RUN LAUNCH GROUP  OpenRunConfigurations OpenLaunchDialogAction OpenRunConfigurations IDebugUIConstants ID_RUN_LAUNCH_GROUP

public class Profile As Action extends Launch As Action public Profile As Action super I DebugUI Constants ID PROFILE LAUNCH GROUP  ProfileAsAction LaunchAsAction ProfileAsAction IDebugUIConstants ID_PROFILE_LAUNCH_GROUP

public class Profile Contextual Launch Action extends Contextual Launch Action public Profile Contextual Launch Action super I Launch Manager PROFILE MODE  ProfileContextualLaunchAction ContextualLaunchAction ProfileContextualLaunchAction ILaunchManager PROFILE_MODE

public class Profile History Menu Action extends Abstract Launch History Action public Profile History Menu Action super I DebugUI Constants ID PROFILE LAUNCH GROUP  ProfileHistoryMenuAction AbstractLaunchHistoryAction ProfileHistoryMenuAction IDebugUIConstants ID_PROFILE_LAUNCH_GROUP

see Relaunch Last Action get Mode public String get Mode return I Launch Manager PROFILE MODE  RelaunchLastAction getMode getMode ILaunchManager PROFILE_MODE
see org eclipse debug internal ui actions Launch Drop Down Action get Launch Group Id public String get Launch Group Id return I DebugUI Constants ID PROFILE LAUNCH GROUP  LaunchDropDownAction getLaunchGroupId getLaunchGroupId IDebugUIConstants ID_PROFILE_LAUNCH_GROUP

public class Profile Toolbar Action extends Abstract Launch Toolbar Action public Profile Toolbar Action super I DebugUI Constants ID PROFILE LAUNCH GROUP  ProfileToolbarAction AbstractLaunchToolbarAction ProfileToolbarAction IDebugUIConstants ID_PROFILE_LAUNCH_GROUP

see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action I Debug Element context get Context for Iterator iter get Current Selection iterator iter has Next I Watch Expression expression I Watch Expression iter next expression set Expression Context context if expression is Enabled Force a reevaluation expression evaluate  IActionDelegate IAction IAction IDebugElement getContext getCurrentSelection hasNext IWatchExpression IWatchExpression setExpressionContext isEnabled
see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection I Debug Element debug Element get Context if debug Element null action set Enabled false else action set Enabled true  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection IDebugElement debugElement getContext debugElement setEnabled setEnabled

see Abstract Debug Action Delegate do Action Object protected void do Action Object object if object instanceof I Debug Element relaunch I Debug Element object else if object instanceof I Launch relaunch I Launch object else if object instanceof I Process relaunch I Process object  AbstractDebugActionDelegate doAction doAction IDebugElement IDebugElement ILaunch ILaunch IProcess IProcess
public static void relaunch I Debug Element element relaunch element get Launch  IDebugElement getLaunch
public static void relaunch I Process process relaunch process get Launch  IProcess getLaunch
public static void relaunch I Launch launch relaunch launch get Launch Configuration launch get Launch Mode  ILaunch getLaunchConfiguration getLaunchMode
public static void relaunch I Launch launch String mode relaunch launch get Launch Configuration mode  ILaunch getLaunchConfiguration
Re launches the given configuration in the specified mode public static void relaunch I Launch Configuration config String mode DebugUI Tools launch config mode  ILaunchConfiguration DebugUITools
see Abstract Debug Action Delegate is Enabled For Object protected boolean is Enabled For Object element I Launch launch null if element instanceof I Launch launch I Launch element else if element instanceof I Debug Element launch I Debug Element element get Launch else if element instanceof I Process launch I Process element get Launch return launch null launch get Launch Configuration null Launch Configuration Manager is Visible launch get Launch Configuration  AbstractDebugActionDelegate isEnabledFor isEnabledFor ILaunch ILaunch ILaunch IDebugElement IDebugElement getLaunch IProcess IProcess getLaunch getLaunchConfiguration LaunchConfigurationManager isVisible getLaunchConfiguration
see Abstract Debug Action Delegate get Error Dialog Message protected String get Error Dialog Message return Action Messages get String Relaunch Action Delegate Launch Failed 1 NON NLS 1  AbstractDebugActionDelegate getErrorDialogMessage getErrorDialogMessage ActionMessages getString RelaunchActionDelegate Launch_Failed_1
see Abstract Debug Action Delegate get Error Dialog Title protected String get Error Dialog Title return Action Messages get String Relaunch Action Delegate Launch 1 NON NLS 1  AbstractDebugActionDelegate getErrorDialogTitle getErrorDialogTitle ActionMessages getString RelaunchActionDelegate Launch_1
see Abstract Debug Action Delegate get Status Message protected String get Status Message return Action Messages get String Relaunch Action Delegate An exception occurred while launching 2 NON NLS 1  AbstractDebugActionDelegate getStatusMessage getStatusMessage ActionMessages getString RelaunchActionDelegate An_exception_occurred_while_launching_2

see I Workbench Window Action Delegate public void dispose  IWorkbenchWindowActionDelegate
see I Workbench Window Action Delegate public void init I Workbench Window window f Workbench Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow fWorkbenchWindow
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action try final I Launch Configuration configuration get Last Launch if configuration null if configuration supports Mode get Mode DebugUI Tools launch configuration get Mode else String config Name configuration get Name String title Action Messages get String Relaunch Last Action Cannot relaunch 1 NON NLS 1 String message Message Format format Action Messages get String Relaunch Last Action Cannot relaunch  0  because it does not support  2  mode 2 new String config Name get Mode NON NLS 1 Message Dialog open Error get Shell title message else If the history is empty just open the launch config dialog open Launch Configuration Dialog catch Core Exception ce DebugUI Plugin error Dialog get Shell Action Messages get String Relaunch Last Action Error relaunching 3 Action Messages get String Relaunch Last Action Error encountered attempting to relaunch 4 ce NON NLS 1 NON NLS 2  IActionDelegate IAction IAction ILaunchConfiguration getLastLaunch supportsMode getMode DebugUITools getMode configName getName ActionMessages getString RelaunchLastAction Cannot_relaunch_1 MessageFormat ActionMessages getString RelaunchLastAction Cannot_relaunch_ _because_it_does_not_support_ _mode_2 configName getMode MessageDialog openError getShell openLaunchConfigurationDialog CoreException DebugUIPlugin errorDialog getShell ActionMessages getString RelaunchLastAction Error_relaunching_3 ActionMessages getString RelaunchLastAction Error_encountered_attempting_to_relaunch_4
Open the launch configuration dialog passing in the current workbench selection private void open Launch Configuration Dialog I Workbench Window dwindow DebugUI Plugin get Active Workbench Window if dwindow null return Launch Configurations Dialog dialog new Launch Configurations Dialog DebugUI Plugin get Shell DebugUI Plugin get Default get Launch Configuration Manager get Default Lanuch Group get Mode dialog set Open Mode Launch Configurations Dialog LAUNCH CONFIGURATION DIALOG OPEN ON LAST LAUNCHED dialog open  openLaunchConfigurationDialog IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow LaunchConfigurationsDialog LaunchConfigurationsDialog DebugUIPlugin getShell DebugUIPlugin getDefault getLaunchConfigurationManager getDefaultLanuchGroup getMode setOpenMode LaunchConfigurationsDialog LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection if f Action null initialize action  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection fAction
Set the enabled state of the underlying action based on whether there are any registered launch configuration types that understand how to launch in the mode of this action private void initialize I Action action f Action action action set Enabled exists Config Types For Mode  IAction fAction setEnabled existsConfigTypesForMode
Return whether there are any registered launch configuration types for the mode of this action return whether there are any registered launch configuration types for the mode of this action private boolean exists Config Types For Mode I Launch Configuration Type config Types Debug Plugin get Default get Launch Manager get Launch Configuration Types for int i 0 i config Types length i I Launch Configuration Type config Type config Types i if config Type supports Mode get Mode return true return false  existsConfigTypesForMode ILaunchConfigurationType configTypes DebugPlugin getDefault getLaunchManager getLaunchConfigurationTypes configTypes ILaunchConfigurationType configType configTypes configType supportsMode getMode
Return the last launch that occurred in the workspace protected I Launch Configuration get Last Launch return DebugUI Plugin get Default get Launch Configuration Manager get Last Launch get Launch Group Id  ILaunchConfiguration getLastLaunch DebugUIPlugin getDefault getLaunchConfigurationManager getLastLaunch getLaunchGroupId
protected Shell get Shell return f Workbench Window get Shell  getShell fWorkbenchWindow getShell
Returns the mode run or debug of this action public abstract String get Mode  getMode
public abstract String get Mode Returns the launch group id of this action public abstract String get Launch Group Id  getMode getLaunchGroupId

protected void do Action I Breakpoint Manager breakpoint Manager Debug Plugin get Default get Breakpoint Manager I Breakpoint breakpoints breakpoint Manager get Breakpoints try breakpoint Manager remove Breakpoints breakpoints true catch Core Exception e I Workbench Window window DebugUI Plugin get Active Workbench Window if window null DebugUI Plugin error Dialog window get Shell Action Messages get String Remove All Breakpoints Action Removing all breakpoints 4 Action Messages get String Remove All Breakpoints Action Exceptions occurred removing breakpoints  5 e NON NLS 1 NON NLS 2  doAction IBreakpointManager breakpointManager DebugPlugin getDefault getBreakpointManager IBreakpoint breakpointManager getBreakpoints breakpointManager removeBreakpoints CoreException IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow DebugUIPlugin errorDialog getShell ActionMessages getString RemoveAllBreakpointsAction Removing_all_breakpoints_4 ActionMessages getString RemoveAllBreakpointsAction Exceptions_occurred_removing_breakpoints _5
protected void update get Action set Enabled Debug Plugin get Default get Breakpoint Manager has Breakpoints  getAction setEnabled DebugPlugin getDefault getBreakpointManager hasBreakpoints
see I Breakpoints Listener breakpoints Added I Breakpoint public void breakpoints Added I Breakpoint breakpoints if get Action null get Action is Enabled update  IBreakpointsListener breakpointsAdded IBreakpoint breakpointsAdded IBreakpoint getAction getAction isEnabled
see I Breakpoints Listener breakpoints Changed I Breakpoint I Marker Delta public void breakpoints Changed I Breakpoint breakpoints I Marker Delta deltas  IBreakpointsListener breakpointsChanged IBreakpoint IMarkerDelta breakpointsChanged IBreakpoint IMarkerDelta
see I Breakpoints Listener breakpoints Removed I Breakpoint I Marker Delta breakpoint Removed I Breakpoint I Marker Delta public void breakpoints Removed I Breakpoint breakpoints I Marker Delta deltas if get Action null update  IBreakpointsListener breakpointsRemoved IBreakpoint IMarkerDelta breakpointRemoved IBreakpoint IMarkerDelta breakpointsRemoved IBreakpoint IMarkerDelta getAction
see I View Action Delegate init I View Part public void init I View Part view super init view Debug Plugin get Default get Breakpoint Manager add Breakpoint Listener this  IViewActionDelegate IViewPart IViewPart DebugPlugin getDefault getBreakpointManager addBreakpointListener
public void dispose Debug Plugin get Default get Breakpoint Manager remove Breakpoint Listener this super dispose  DebugPlugin getDefault getBreakpointManager removeBreakpointListener

protected void do Action I Expression Manager manager Debug Plugin get Default get Expression Manager I Expression expressions manager get Expressions manager remove Expressions expressions  doAction IExpressionManager DebugPlugin getDefault getExpressionManager IExpression getExpressions removeExpressions
protected void update get Action set Enabled Debug Plugin get Default get Expression Manager has Expressions  getAction setEnabled DebugPlugin getDefault getExpressionManager hasExpressions

see Listener Action Delegate do Handle Debug Event Debug Event protected void do Handle Debug Event Debug Event event if event get Kind Debug Event TERMINATE Object source event get Source if source instanceof I Debug Target I Launch launch I Debug Target source get Launch if launch is Terminated launch Is Registered launch get Action set Enabled true else if source instanceof I Process I Launch launch I Process source get Launch if launch is Terminated launch Is Registered launch get Action set Enabled true  ListenerActionDelegate doHandleDebugEvent DebugEvent doHandleDebugEvent DebugEvent getKind DebugEvent getSource IDebugTarget ILaunch IDebugTarget getLaunch isTerminated launchIsRegistered getAction setEnabled IProcess ILaunch IProcess getLaunch isTerminated launchIsRegistered getAction setEnabled
private boolean launch Is Registered I Launch i Launch I Launch launches Debug Plugin get Default get Launch Manager get Launches for int i 0 i launches length i I Launch launch launches i if launch equals i Launch return true return false  launchIsRegistered ILaunch iLaunch ILaunch DebugPlugin getDefault getLaunchManager getLaunches ILaunch iLaunch
Updates the enabled state of this action to enabled if at least one launch is terminated and relative to the current perspective protected void update Object elements get Elements if elements null for int i 0 i elements length i if elements i instanceof I Launch I Launch launch I Launch elements i if launch is Terminated get Action set Enabled true return get Action set Enabled false  getElements ILaunch ILaunch ILaunch isTerminated getAction setEnabled getAction setEnabled
protected void do Action Object elements get Elements remove Terminated Launches elements  doAction getElements removeTerminatedLaunches
Returns the top level elements in the active debug view or code null code if none return array of object public Object get Elements I Debug View view get Debug View if view null Viewer viewer view get Viewer if viewer instanceof Structured Viewer I Structured Content Provider cp I Structured Content Provider Structured Viewer viewer get Content Provider if cp null return cp get Elements viewer get Input return null  getElements IDebugView getDebugView getViewer StructuredViewer IStructuredContentProvider IStructuredContentProvider StructuredViewer getContentProvider getElements getInput
public static void remove Terminated Launches Object elements List removed new Array List for int i 0 i elements length i if elements i instanceof I Launch I Launch launch I Launch elements i if launch is Terminated removed add launch if removed is Empty I Launch Manager manager Debug Plugin get Default get Launch Manager manager remove Launches I Launch removed to Array new I Launch removed size  removeTerminatedLaunches ArrayList ILaunch ILaunch ILaunch isTerminated isEmpty ILaunchManager DebugPlugin getDefault getLaunchManager removeLaunches ILaunch toArray ILaunch
protected I Debug View get Debug View return I Debug View get View get Adapter I Debug View class  IDebugView getDebugView IDebugView getView getAdapter IDebugView
see I View Action Delegate init I View Part public void init I View Part view super init view Debug Plugin get Default get Launch Manager add Launch Listener this Debug Plugin get Default add Debug Event Listener this  IViewActionDelegate IViewPart IViewPart DebugPlugin getDefault getLaunchManager addLaunchListener DebugPlugin getDefault addDebugEventListener
see I Workbench Window Action Delegate dispose public void dispose removes as a debug event listener super dispose Debug Plugin get Default get Launch Manager remove Launch Listener this  IWorkbenchWindowActionDelegate DebugPlugin getDefault getLaunchManager removeLaunchListener
see I Launches Listener launches Added I Launch public void launches Added I Launch launches  ILaunchesListener launchesAdded ILaunch launchesAdded ILaunch
see I Launches Listener launches Changed I Launch public void launches Changed I Launch launches  ILaunchesListener launchesChanged ILaunch launchesChanged ILaunch
see I Launches Listener launches Removed I Launch public void launches Removed I Launch launches if get Action is Enabled update  ILaunchesListener launchesRemoved ILaunch launchesRemoved ILaunch getAction isEnabled

I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor I Breakpoint Manager breakpoint Manager Debug Plugin get Default get Breakpoint Manager while itr has Next try Object next itr next if next instanceof I Breakpoint I Breakpoint breakpoint I Breakpoint next breakpoint Manager remove Breakpoint breakpoint true catch Core Exception ce ms merge ce get Status  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor IBreakpointManager breakpointManager DebugPlugin getDefault getBreakpointManager hasNext IBreakpoint IBreakpoint IBreakpoint breakpointManager removeBreakpoint CoreException getStatus
see I Action Delegate run I Action public void run I Action action I Structured Selection selection get Selection final Iterator itr selection iterator final Multi Status ms new Multi Status DebugUI Plugin get Unique Identifier Debug Exception REQUEST FAILED Action Messages get String Remove Breakpoint Action Breakpoint s  removal failed 3 null NON NLS 1 I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor I Breakpoint Manager breakpoint Manager Debug Plugin get Default get Breakpoint Manager while itr has Next try Object next itr next if next instanceof I Breakpoint I Breakpoint breakpoint I Breakpoint next breakpoint Manager remove Breakpoint breakpoint true catch Core Exception ce ms merge ce get Status try Resources Plugin get Workspace run runnable null 0 null catch Core Exception ce ms merge ce get Status if ms isOK I Workbench Window window DebugUI Plugin get Active Workbench Window if window null DebugUI Plugin error Dialog window get Shell Action Messages get String Remove Breakpoint Action Removing a breakpoint 4 Action Messages get String Remove Breakpoint Action Exceptions occurred attempting to remove a breakpoint  5 ms NON NLS 1 NON NLS 2 else DebugUI Plugin log ms  IActionDelegate IAction IAction IStructuredSelection getSelection MultiStatus MultiStatus DebugUIPlugin getUniqueIdentifier DebugException REQUEST_FAILED ActionMessages getString RemoveBreakpointAction _removal_failed_3 IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor IBreakpointManager breakpointManager DebugPlugin getDefault getBreakpointManager hasNext IBreakpoint IBreakpoint IBreakpoint breakpointManager removeBreakpoint CoreException getStatus ResourcesPlugin getWorkspace CoreException getStatus IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow DebugUIPlugin errorDialog getShell ActionMessages getString RemoveBreakpointAction Removing_a_breakpoint_4 ActionMessages getString RemoveBreakpointAction Exceptions_occurred_attempting_to_remove_a_breakpoint _5 DebugUIPlugin
see Abstract Debug Action Delegate do Action Object protected void do Action Object element not used  AbstractDebugActionDelegate doAction doAction

protected void do Action Object element I Expression Manager manager Debug Plugin get Default get Expression Manager I Expression exp get Expression element if exp null manager remove Expression exp  doAction IExpressionManager DebugPlugin getDefault getExpressionManager IExpression getExpression removeExpression
Returns the expression associated with the given element param element an expression of child of an expression in the expression view return associated expression protected I Expression get Expression Object obj if get View null return null I Debug View adapter I Debug View get View get Adapter I Debug View class if adapter null Viewer v adapter get Viewer if v instanceof Tree Viewer I Tree Content Provider cp I Tree Content Provider Tree Viewer v get Content Provider while obj instanceof I Expression obj null obj cp get Parent obj return I Expression obj return null  IExpression getExpression getView IDebugView IDebugView getView getAdapter IDebugView getViewer TreeViewer ITreeContentProvider ITreeContentProvider TreeViewer getContentProvider IExpression getParent IExpression

see Abstract Debug Action Delegate do Action Object protected void do Action Object object throws Debug Exception if object instanceof I Suspend Resume I Suspend Resume resume I Suspend Resume object if resume can Resume resume resume  AbstractDebugActionDelegate doAction doAction DebugException ISuspendResume ISuspendResume ISuspendResume canResume
see Abstract Debug Action Delegate is Enabled For Object protected boolean is Enabled For Object element return element instanceof I Suspend Resume I Suspend Resume element can Resume  AbstractDebugActionDelegate isEnabledFor isEnabledFor ISuspendResume ISuspendResume canResume
see Abstract Debug Action Delegate get Enable State For Selection I Structured Selection protected boolean get Enable State For Selection I Structured Selection selection boolean enabled false for Iterator i selection iterator i has Next Object element i next if element instanceof I Suspend Resume return false all elements should be I Structured Selection if enabled is Enabled For element enabled true return enabled  AbstractDebugActionDelegate getEnableStateForSelection IStructuredSelection getEnableStateForSelection IStructuredSelection hasNext ISuspendResume IStructuredSelection isEnabledFor
see Abstract Debug Action Delegate get Status Message protected String get Status Message return Action Messages get String Resume Action Delegate Exceptions occurred attempting to resume  2 NON NLS 1  AbstractDebugActionDelegate getStatusMessage getStatusMessage ActionMessages getString ResumeActionDelegate Exceptions_occurred_attempting_to_resume _2
see Abstract Debug Action Delegate get Error Dialog Message protected String get Error Dialog Message return Action Messages get String Resume Action Delegate Resume failed  1 NON NLS 1  AbstractDebugActionDelegate getErrorDialogMessage getErrorDialogMessage ActionMessages getString ResumeActionDelegate Resume_failed _1
see Abstract Debug Action Delegate get Error Dialog Title protected String get Error Dialog Title return Action Messages get String Resume Action Delegate Resume 3 NON NLS 1  AbstractDebugActionDelegate getErrorDialogTitle getErrorDialogTitle ActionMessages getString ResumeActionDelegate Resume_3

see org eclipse jface viewers I Selection is Empty public boolean is Empty return true  ISelection isEmpty isEmpty
Returns the current selection in the active part possibly and empty selection but never code null code return the selection in the active part possibly empty private I Selection get Target Selection if active Part null I Selection Provider selection Provider active Part get Site get Selection Provider if selection Provider null return selection Provider get Selection return EMPTY SELECTION  ISelection getTargetSelection activePart ISelectionProvider selectionProvider activePart getSite getSelectionProvider selectionProvider selectionProvider getSelection EMPTY_SELECTION
public void dispose window get Part Service remove Part Listener this active Part null target Adapter null  getPartService removePartListener activePart targetAdapter
public void init I Workbench Window window this window window I Part Service part Service window get Part Service part Service add Part Listener this I Workbench Part part part Service get Active Part if part null part Activated part  IWorkbenchWindow IPartService partService getPartService partService addPartListener IWorkbenchPart partService getActivePart partActivated
public void run I Action action if target Adapter null try perform Action target Adapter get Target Selection active Part catch Core Exception e DebugUI Plugin error Dialog window get Shell Action Messages get String Retarget Action 2 Action Messages get String Retarget Action 3 e get Status NON NLS 1 NON NLS 2  IAction targetAdapter performAction targetAdapter getTargetSelection activePart CoreException DebugUIPlugin errorDialog getShell ActionMessages getString RetargetAction ActionMessages getString RetargetAction getStatus
Performs the specific breakpoint toggling param selection selection in the active part param part active part throws Core Exception if an exception occurrs  CoreException
public void selection Changed I Action action I Selection selection this action action if the active part did not provide an adapter see if the selectoin does if target Adapter null selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection if ss is Empty Object object ss get First Element if object instanceof I Adaptable target Adapter get Adapter I Adaptable object update  selectionChanged IAction ISelection targetAdapter IStructuredSelection IStructuredSelection IStructuredSelection isEmpty getFirstElement IAdaptable targetAdapter getAdapter IAdaptable
public void part Activated I Workbench Part part active Part part target Adapter get Adapter part update  partActivated IWorkbenchPart activePart targetAdapter getAdapter
protected Object get Adapter I Adaptable adaptable Object adapter adaptable get Adapter get Adapter Class if adapter null I Adapter Manager adapter Manager Platform get Adapter Manager if adapter Manager has Adapter adaptable get Adapter Class get Name NON NLS 1 target Adapter adapter Manager load Adapter adaptable get Adapter Class get Name NON NLS 1 return adapter  getAdapter IAdaptable getAdapter getAdapterClass IAdapterManager adapterManager getAdapterManager adapterManager hasAdapter getAdapterClass getName targetAdapter adapterManager loadAdapter getAdapterClass getName
Returns the type of adapter target this action works on return the type of adapter this action works on 
see org eclipse ui I Part Listener part Brought To Top org eclipse ui I Workbench Part public void part Brought To Top I Workbench Part part  IPartListener partBroughtToTop IWorkbenchPart partBroughtToTop IWorkbenchPart
see org eclipse ui I Part Listener part Closed org eclipse ui I Workbench Part public void part Closed I Workbench Part part clear Part part  IPartListener partClosed IWorkbenchPart partClosed IWorkbenchPart clearPart
Clears reference to active part and adapter when a relevant part is closed or deactivated param part workbench part that has been closed or deactivated protected void clear Part I Workbench Part part if part equals active Part active Part null target Adapter null  clearPart IWorkbenchPart activePart activePart targetAdapter
see org eclipse ui I Part Listener part Deactivated org eclipse ui I Workbench Part public void part Deactivated I Workbench Part part clear Part part  IPartListener partDeactivated IWorkbenchPart partDeactivated IWorkbenchPart clearPart
see org eclipse ui I Part Listener part Opened org eclipse ui I Workbench Part public void part Opened I Workbench Part part  IPartListener partOpened IWorkbenchPart partOpened IWorkbenchPart
public void update if action null return if target Adapter null action set Enabled can Perform Action target Adapter get Target Selection active Part else action set Enabled false  targetAdapter setEnabled canPerformAction targetAdapter getTargetSelection activePart setEnabled
Returns whether the specific operation is supported param target the target adapter param selection the selection to verify the operation on param part the part the operation has been requested on return whether the operation can be performed 

see org eclipse debug internal ui actions Retarget Action get Adapter Class protected Class get Adapter Class return I Toggle Breakpoints Target class  RetargetAction getAdapterClass getAdapterClass IToggleBreakpointsTarget

see org eclipse debug internal ui actions Retarget Breakpoint Action perform Action java lang Object org eclipse jface viewers I Selection org eclipse ui I Workbench Part protected void perform Action Object target I Selection selection I Workbench Part part throws Core Exception I Toggle Breakpoints Target target toggle Method Breakpoints part selection  RetargetBreakpointAction performAction ISelection IWorkbenchPart performAction ISelection IWorkbenchPart CoreException IToggleBreakpointsTarget toggleMethodBreakpoints
see org eclipse debug internal ui actions Retarget Breakpoint Action can Perform Action java lang Object org eclipse jface viewers I Selection org eclipse ui I Workbench Part protected boolean can Perform Action Object target I Selection selection I Workbench Part part return I Toggle Breakpoints Target target can Toggle Method Breakpoints part selection  RetargetBreakpointAction canPerformAction ISelection IWorkbenchPart canPerformAction ISelection IWorkbenchPart IToggleBreakpointsTarget canToggleMethodBreakpoints

public void selection Changed I Workbench Part part I Selection selection target Element null if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection if ss size 1 Object object ss get First Element if object instanceof I Suspend Resume target Element I Suspend Resume object update  selectionChanged IWorkbenchPart ISelection targetElement IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement ISuspendResume targetElement ISuspendResume
see org eclipse ui I Workbench Window Action Delegate dispose public void dispose window get Selection Service remove Selection Listener I DebugUI Constants ID DEBUG VIEW selection Listener super dispose  IWorkbenchWindowActionDelegate getSelectionService removeSelectionListener IDebugUIConstants ID_DEBUG_VIEW selectionListener
see org eclipse ui I Workbench Window Action Delegate init org eclipse ui I Workbench Window public void init I Workbench Window window super init window window get Selection Service add Selection Listener I DebugUI Constants ID DEBUG VIEW selection Listener  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow getSelectionService addSelectionListener IDebugUIConstants ID_DEBUG_VIEW selectionListener
see org eclipse debug internal ui actions Retarget Action can Perform Action java lang Object org eclipse jface viewers I Selection org eclipse ui I Workbench Part protected boolean can Perform Action Object target I Selection selection I Workbench Part part return target Element null I Run To Line Target target can Run To Line part selection target Element  RetargetAction canPerformAction ISelection IWorkbenchPart canPerformAction ISelection IWorkbenchPart targetElement IRunToLineTarget canRunToLine targetElement
see org eclipse debug internal ui actions Retarget Action get Adapter Class protected Class get Adapter Class return I Run To Line Target class  RetargetAction getAdapterClass getAdapterClass IRunToLineTarget
see org eclipse debug internal ui actions Retarget Action perform Action java lang Object org eclipse jface viewers I Selection org eclipse ui I Workbench Part protected void perform Action Object target I Selection selection I Workbench Part part throws Core Exception I Run To Line Target target run To Line part selection target Element  RetargetAction performAction ISelection IWorkbenchPart performAction ISelection IWorkbenchPart CoreException IRunToLineTarget runToLine targetElement

see org eclipse debug internal ui actions Retarget Breakpoint Action perform Action java lang Object org eclipse jface viewers I Selection org eclipse ui I Workbench Part protected void perform Action Object target I Selection selection I Workbench Part part throws Core Exception I Toggle Breakpoints Target target toggle Line Breakpoints part selection  RetargetBreakpointAction performAction ISelection IWorkbenchPart performAction ISelection IWorkbenchPart CoreException IToggleBreakpointsTarget toggleLineBreakpoints
see org eclipse debug internal ui actions Retarget Breakpoint Action can Perform Action java lang Object org eclipse jface viewers I Selection org eclipse ui I Workbench Part protected boolean can Perform Action Object target I Selection selection I Workbench Part part return I Toggle Breakpoints Target target can Toggle Line Breakpoints part selection  RetargetBreakpointAction canPerformAction ISelection IWorkbenchPart canPerformAction ISelection IWorkbenchPart IToggleBreakpointsTarget canToggleLineBreakpoints

see org eclipse debug internal ui actions Retarget Breakpoint Action perform Action java lang Object org eclipse jface viewers I Selection org eclipse ui I Workbench Part protected void perform Action Object target I Selection selection I Workbench Part part throws Core Exception I Toggle Breakpoints Target target toggle Watchpoints part selection  RetargetBreakpointAction performAction ISelection IWorkbenchPart performAction ISelection IWorkbenchPart CoreException IToggleBreakpointsTarget toggleWatchpoints
see org eclipse debug internal ui actions Retarget Breakpoint Action can Perform Action java lang Object org eclipse jface viewers I Selection org eclipse ui I Workbench Part protected boolean can Perform Action Object target I Selection selection I Workbench Part part return I Toggle Breakpoints Target target can Toggle Watchpoints part selection  RetargetBreakpointAction canPerformAction ISelection IWorkbenchPart canPerformAction ISelection IWorkbenchPart IToggleBreakpointsTarget canToggleWatchpoints

public class Run As Action extends Launch As Action public Run As Action super I DebugUI Constants ID RUN LAUNCH GROUP  RunAsAction LaunchAsAction RunAsAction IDebugUIConstants ID_RUN_LAUNCH_GROUP

public class Run Contextual Launch Action extends Contextual Launch Action public Run Contextual Launch Action super I Launch Manager RUN MODE  RunContextualLaunchAction ContextualLaunchAction RunContextualLaunchAction ILaunchManager RUN_MODE

public class Run History Menu Action extends Abstract Launch History Action public Run History Menu Action super I DebugUI Constants ID RUN LAUNCH GROUP  RunHistoryMenuAction AbstractLaunchHistoryAction RunHistoryMenuAction IDebugUIConstants ID_RUN_LAUNCH_GROUP

see Relaunch Last Action get Mode public String get Mode return I Launch Manager RUN MODE  RelaunchLastAction getMode getMode ILaunchManager RUN_MODE
see org eclipse debug internal ui actions Launch Drop Down Action get Launch Group Id public String get Launch Group Id return I DebugUI Constants ID RUN LAUNCH GROUP  LaunchDropDownAction getLaunchGroupId getLaunchGroupId IDebugUIConstants ID_RUN_LAUNCH_GROUP

public class Run Toolbar Action extends Abstract Launch Toolbar Action public Run Toolbar Action super I DebugUI Constants ID RUN LAUNCH GROUP  RunToolbarAction AbstractLaunchToolbarAction RunToolbarAction IDebugUIConstants ID_RUN_LAUNCH_GROUP

see I View Action Delegate init I View Part public void init I View Part view set View view set Window view get View Site get Workbench Window  IViewActionDelegate IViewPart IViewPart setView setWindow getViewSite getWorkbenchWindow
see Abstract Debug Action Delegate initialize I Action I Selection protected boolean initialize I Action action I Selection selection if is Initialized I Debug View debug View I Debug View get View get Adapter I Debug View class if debug View null debug View set Action get Action Id action return super initialize action selection return false  AbstractDebugActionDelegate IAction ISelection IAction ISelection isInitialized IDebugView debugView IDebugView getView getAdapter IDebugView debugView debugView setAction getActionId
protected abstract String get Action Id  getActionId
see I Action Delegate run I Action public void run I Action action do Action null  IActionDelegate IAction IAction doAction
see Abstract Debug Action Delegate do Action Object protected void do Action Object element if get View instanceof I Debug View return Viewer viewer I Debug View get View get Viewer if viewer instanceof Tree Viewer return Tree Viewer viewer get Tree select All ensure that the selection change callback is fired viewer set Selection viewer get Selection  AbstractDebugActionDelegate doAction doAction getView IDebugView IDebugView getView getViewer TreeViewer TreeViewer getTree selectAll setSelection getSelection
protected abstract void update 
protected abstract void update protected void update I Action action I Selection selection update  IAction ISelection

public class Select All Breakpoints Action extends Select All Action implements I Breakpoints Listener protected void update get Action set Enabled Debug Plugin get Default get Breakpoint Manager has Breakpoints  SelectAllBreakpointsAction SelectAllAction IBreakpointsListener getAction setEnabled DebugPlugin getDefault getBreakpointManager hasBreakpoints
see Abstract Debug Action Delegate do Action Object protected void do Action Object element if get View instanceof I Debug View return Viewer viewer I Debug View get View get Viewer if viewer instanceof Table Viewer return Table Viewer viewer get Table select All ensure that the selection change callback is fired viewer set Selection viewer get Selection  AbstractDebugActionDelegate doAction doAction getView IDebugView IDebugView getView getViewer TableViewer TableViewer getTable selectAll setSelection getSelection
see I Breakpoints Listener breakpoints Added I Breakpoint breakpoint Added I Breakpoint public void breakpoints Added I Breakpoint breakpoints if get Action null get Action is Enabled update  IBreakpointsListener breakpointsAdded IBreakpoint breakpointAdded IBreakpoint breakpointsAdded IBreakpoint getAction getAction isEnabled
see I Breakpoints Listener breakpoints Changed I Breakpoint I Marker Delta breakpoint Changed I Breakpoint I Marker Delta public void breakpoints Changed I Breakpoint breakpoints I Marker Delta deltas  IBreakpointsListener breakpointsChanged IBreakpoint IMarkerDelta breakpointChanged IBreakpoint IMarkerDelta breakpointsChanged IBreakpoint IMarkerDelta
see I Breakpoints Listener breakpoints Removed I Breakpoint I Marker Delta public void breakpoints Removed I Breakpoint breakpoints I Marker Delta deltas if get Action null update  IBreakpointsListener breakpointsRemoved IBreakpoint IMarkerDelta breakpointsRemoved IBreakpoint IMarkerDelta getAction
see I View Action Delegate init I View Part public void init I View Part view super init view Debug Plugin get Default get Breakpoint Manager add Breakpoint Listener this  IViewActionDelegate IViewPart IViewPart DebugPlugin getDefault getBreakpointManager addBreakpointListener
public void dispose Debug Plugin get Default get Breakpoint Manager remove Breakpoint Listener this super dispose  DebugPlugin getDefault getBreakpointManager removeBreakpointListener
protected String get Action Id return I Debug View SELECT ALL ACTION  getActionId IDebugView SELECT_ALL_ACTION

public class Select All Expressions Action extends Select All Action protected void update get Action set Enabled Debug Plugin get Default get Expression Manager has Expressions  SelectAllExpressionsAction SelectAllAction getAction setEnabled DebugPlugin getDefault getExpressionManager hasExpressions
protected String get Action Id return I Debug View SELECT ALL ACTION Variables NON NLS 1  getActionId IDebugView SELECT_ALL_ACTION

protected void update if get View instanceof I Debug View return Viewer viewer I Debug View get View get Viewer get Action set Enabled Tree Viewer viewer get Tree get Item Count 0  getView IDebugView IDebugView getView getViewer getAction setEnabled TreeViewer getTree getItemCount
protected String get Action Id return I Debug View SELECT ALL ACTION Variables NON NLS 1  getActionId IDebugView SELECT_ALL_ACTION

see Viewer Filter select Viewer Object Object public boolean select Viewer viewer Object parent Element Object element I Breakpoint breakpoint I Breakpoint element if f Debug Targets is Empty return true Iterator iterator f Debug Targets iterator while iterator has Next I Debug Target target I Debug Target iterator next if target supports Breakpoint breakpoint return true return false  ViewerFilter parentElement IBreakpoint IBreakpoint fDebugTargets isEmpty fDebugTargets hasNext IDebugTarget IDebugTarget supportsBreakpoint
public Show Supported Breakpoints Action Structured Viewer viewer I View Part view super set Text Action Messages get String Show Supported Breakpoints Action Show For Selected NON NLS 1 set Tool Tip Text Action Messages get String Show Supported Breakpoints Action tooltip NON NLS 1 set Viewer Filter new Breakpoint Filter set Viewer viewer set Image Descriptor Debug Plugin Images get Image Descriptor I DebugUI Constants IMG OBJS DEBUG TARGET set Checked false set Id DebugUI Plugin get Unique Identifier Show Supported Breakpoints Action NON NLS 1 set View view Workbench Help set Help this I Debug Help Context Ids SHOW BREAKPOINTS FOR MODEL ACTION  ShowSupportedBreakpointsAction StructuredViewer IViewPart setText ActionMessages getString ShowSupportedBreakpointsAction Show_For_Selected setToolTipText ActionMessages getString ShowSupportedBreakpointsAction setViewerFilter BreakpointFilter setViewer setImageDescriptor DebugPluginImages getImageDescriptor IDebugUIConstants IMG_OBJS_DEBUG_TARGET setChecked setId DebugUIPlugin getUniqueIdentifier ShowSupportedBreakpointsAction setView WorkbenchHelp setHelp IDebugHelpContextIds SHOW_BREAKPOINTS_FOR_MODEL_ACTION
public void dispose if is Checked get View get Site get Page remove Selection Listener I DebugUI Constants ID DEBUG VIEW this  isChecked getView getSite getPage removeSelectionListener IDebugUIConstants ID_DEBUG_VIEW
see I Selection Listener selection Changed I Workbench Part I Selection public void selection Changed I Workbench Part part I Selection selection if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection List debug Targets get Debug Targets ss if is Checked f Debug Targets debug Targets return if debug Targets is Empty if f Debug Targets is Empty return reapply Filters debug Targets return if f Debug Targets is Empty reapply Filters debug Targets return if debug Targets size f Debug Targets size List copy new Array List debug Targets size Iterator iter f Debug Targets iterator while iter has Next I Debug Target target I Debug Target iter next Iterator new Debug Targets debug Targets iterator while new Debug Targets has Next I Debug Target new Target I Debug Target new Debug Targets next copy add new Target if target equals new Target new Debug Targets remove check for real change if debug Targets is Empty return reapply Filters copy  ISelectionListener selectionChanged IWorkbenchPart ISelection selectionChanged IWorkbenchPart ISelection IStructuredSelection IStructuredSelection IStructuredSelection debugTargets getDebugTargets isChecked fDebugTargets debugTargets debugTargets isEmpty fDebugTargets isEmpty reapplyFilters debugTargets fDebugTargets isEmpty reapplyFilters debugTargets debugTargets fDebugTargets ArrayList debugTargets fDebugTargets hasNext IDebugTarget IDebugTarget newDebugTargets debugTargets newDebugTargets hasNext IDebugTarget newTarget IDebugTarget newDebugTargets newTarget newTarget newDebugTargets debugTargets isEmpty reapplyFilters
Selection has changed in the debug view need to reapply the filters protected void reapply Filters List debug Targets f Debug Targets debug Targets get Viewer refresh Breakpoints View get View initialize Checked State  reapplyFilters debugTargets fDebugTargets debugTargets getViewer BreakpointsView getView initializeCheckedState
protected I View Part get View return f View  IViewPart getView fView
protected void set View I View Part view f View view  setView IViewPart fView
protected List get Debug Targets I Structured Selection ss List debug Targets new Array List 2 Iterator i ss iterator while i has Next Object next i next if next instanceof I Debug Element debug Targets add I Debug Element next get Debug Target else if next instanceof I Launch I Debug Target targets I Launch next get Debug Targets for int j 0 j targets length j debug Targets add targets j else if next instanceof I Process I Debug Target target I Debug Target I Process next get Adapter I Debug Target class if target null debug Targets add target return debug Targets  getDebugTargets IStructuredSelection debugTargets ArrayList hasNext IDebugElement debugTargets IDebugElement getDebugTarget ILaunch IDebugTarget ILaunch getDebugTargets debugTargets IProcess IDebugTarget IDebugTarget IProcess getAdapter IDebugTarget debugTargets debugTargets
Adds or removes the viewer filter depending on the value of the parameter protected void value Changed boolean on if get Viewer get Control is Disposed return if on get View get Site get Page add Selection Listener I DebugUI Constants ID DEBUG VIEW this I Selection selection get View get Site get Page get Selection I DebugUI Constants ID DEBUG VIEW selection Changed null selection else get View get Site get Page remove Selection Listener I DebugUI Constants ID DEBUG VIEW this super value Changed on if on Breakpoints View get View initialize Checked State  valueChanged getViewer getControl isDisposed getView getSite getPage addSelectionListener IDebugUIConstants ID_DEBUG_VIEW ISelection getView getSite getPage getSelection IDebugUIConstants ID_DEBUG_VIEW selectionChanged getView getSite getPage removeSelectionListener IDebugUIConstants ID_DEBUG_VIEW valueChanged BreakpointsView getView initializeCheckedState

public Show Types Action I Debug View view super Action Messages get String Show Types Action Show  Type Names 1 I Action AS CHECK BOX NON NLS 1 set View view set Tool Tip Text Action Messages get String Show Types Action Show Type Names NON NLS 1 set Hover Image Descriptor Debug Plugin Images get Image Descriptor I DebugUI Constants IMG LCL TYPE NAMES set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL TYPE NAMES set Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG ELCL TYPE NAMES set Id DebugUI Plugin get Unique Identifier Show Types Action NON NLS 1 Workbench Help set Help this I Debug Help Context Ids SHOW TYPES ACTION  ShowTypesAction IDebugView ActionMessages getString ShowTypesAction Show_ Type_Names_1 IAction AS_CHECK_BOX setView setToolTipText ActionMessages getString ShowTypesAction Show_Type_Names setHoverImageDescriptor DebugPluginImages getImageDescriptor IDebugUIConstants IMG_LCL_TYPE_NAMES setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_TYPE_NAMES setImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_ELCL_TYPE_NAMES setId DebugUIPlugin getUniqueIdentifier ShowTypesAction WorkbenchHelp setHelp IDebugHelpContextIds SHOW_TYPES_ACTION
see Action run public void run value Changed is Checked  valueChanged isChecked
debug Label Provider set Attribute I Debug Model Presentation DISPLAY VARIABLE TYPE NAMES on Boolean TRUE Boolean FALSE Busy Indicator show While get View get Viewer get Control get Display new Runnable public void run get View get Viewer refresh  debugLabelProvider setAttribute IDebugModelPresentation DISPLAY_VARIABLE_TYPE_NAMES BusyIndicator showWhile getView getViewer getControl getDisplay getView getViewer
private void value Changed boolean on if get View get Viewer get Control is Disposed return I Debug Model Presentation debug Label Provider I Debug Model Presentation get View get Adapter I Debug Model Presentation class if debug Label Provider null debug Label Provider set Attribute I Debug Model Presentation DISPLAY VARIABLE TYPE NAMES on Boolean TRUE Boolean FALSE Busy Indicator show While get View get Viewer get Control get Display new Runnable public void run get View get Viewer refresh  valueChanged getView getViewer getControl isDisposed IDebugModelPresentation debugLabelProvider IDebugModelPresentation getView getAdapter IDebugModelPresentation debugLabelProvider debugLabelProvider setAttribute IDebugModelPresentation DISPLAY_VARIABLE_TYPE_NAMES BusyIndicator showWhile getView getViewer getControl getDisplay getView getViewer
see Action set Checked boolean public void set Checked boolean value super set Checked value value Changed value  setChecked setChecked setChecked valueChanged
protected I Debug View get View return f View  IDebugView getView fView
protected void set View I Debug View view f View view  setView IDebugView fView

public Skip All Breakpoints Action super Action Messages get String Skip All Breakpoints Action 0 NON NLS 1 set Tool Tip Text Action Messages get String Skip All Breakpoints Action 0 NON NLS 1 set Description Action Messages get String Skip All Breakpoints Action 2 NON NLS 1 set Image Descriptor Debug Plugin Images get Image Descriptor I DebugUI Constants IMG SKIP BREAKPOINTS Workbench Help set Help this I Debug Help Context Ids SKIP ALL BREAKPOINT ACTION update Action Checked State  SkipAllBreakpointsAction ActionMessages getString SkipAllBreakpointsAction setToolTipText ActionMessages getString SkipAllBreakpointsAction setDescription ActionMessages getString SkipAllBreakpointsAction setImageDescriptor DebugPluginImages getImageDescriptor IDebugUIConstants IMG_SKIP_BREAKPOINTS WorkbenchHelp setHelp IDebugHelpContextIds SKIP_ALL_BREAKPOINT_ACTION updateActionCheckedState
see org eclipse jface action I Action run public void run I Breakpoint Manager manager get Breakpoint Manager manager set Enabled manager is Enabled  IAction IBreakpointManager getBreakpointManager setEnabled isEnabled
Updates the action s checked state to be opposite the enabled state of the breakpoint manager public void update Action Checked State if f Action null f Action set Checked get Breakpoint Manager is Enabled else set Checked get Breakpoint Manager is Enabled  updateActionCheckedState fAction fAction setChecked getBreakpointManager isEnabled setChecked getBreakpointManager isEnabled
Returns the global breakpoint manager return the global breakpoint manager public static I Breakpoint Manager get Breakpoint Manager return Debug Plugin get Default get Breakpoint Manager  IBreakpointManager getBreakpointManager DebugPlugin getDefault getBreakpointManager
see org eclipse ui I Workbench Window Action Delegate dispose public void dispose get Breakpoint Manager remove Breakpoint Manager Listener this  IWorkbenchWindowActionDelegate getBreakpointManager removeBreakpointManagerListener
see org eclipse ui I Workbench Window Action Delegate init org eclipse ui I Workbench Window public void init I Workbench Window window update Action Checked State get Breakpoint Manager add Breakpoint Manager Listener this  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow updateActionCheckedState getBreakpointManager addBreakpointManagerListener
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action run  IActionDelegate IAction IAction
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection f Action action  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection fAction
public void breakpoint Manager Enablement Changed boolean enabled if f Action null f Action set Checked enabled  breakpointManagerEnablementChanged fAction fAction setChecked

Creates an instane of a status dialog public Status Dialog Shell parent super parent f Last Status new Status Info  StatusDialog fLastStatus StatusInfo
Update the dialog s status line to reflect the given status It is save to call this method before the dialog has been opened protected void update Status I Status status f Last Status status if f Status Line null f Status Line is Disposed update Buttons Enable State status f Status Line set Error Status status  updateStatus IStatus fLastStatus fStatusLine fStatusLine isDisposed updateButtonsEnableState fStatusLine setErrorStatus
Returns the last status public I Status get Status return f Last Status  IStatus getStatus fLastStatus
Updates the status of the ok button to reflect the given status Subclasses may override this method to update additional buttons param status the status protected void update Buttons Enable State I Status status if f Ok Button null f Ok Button is Disposed f Ok Button set Enabled status matches I Status ERROR  updateButtonsEnableState IStatus fOkButton fOkButton isDisposed fOkButton setEnabled IStatus
protected void configure Shell Shell shell super configure Shell shell if f Title null shell set Text f Title  configureShell configureShell fTitle setText fTitle
public void create super create if f Last Status null policy dialogs are not allowed to come up with an error message if f Last Status matches I Status ERROR Status Info status new Status Info status set Error NON NLS 1 f Last Status status update Status f Last Status  fLastStatus fLastStatus IStatus StatusInfo StatusInfo setError fLastStatus updateStatus fLastStatus
see Dialog create Buttons For Button Bar Composite protected void create Buttons For Button Bar Composite parent f Ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButtonsForButtonBar fOkButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
protected Control create Button Bar Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 1 layout margin Height 0 layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Status Line new Message Line composite f Status Line set Alignment SWT LEFT f Status Line set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Status Line set Error Status null NON NLS 1 apply Dialog Font composite super create Button Bar composite return composite  createButtonBar GridLayout GridLayout numColumns marginHeight marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN setLayout setLayoutData GridData GridData FILL_HORIZONTAL fStatusLine MessageLine fStatusLine setAlignment fStatusLine setLayoutData GridData GridData FILL_HORIZONTAL fStatusLine setErrorStatus applyDialogFont createButtonBar
Sets the title for this dialog param title the title public void set Title String title f Title title null title NON NLS 1 Shell shell get Shell if shell null shell is Disposed shell set Text f Title  setTitle fTitle getShell isDisposed setText fTitle
Sets the image for this dialog param image the image public void set Image Image image f Image image Shell shell get Shell if shell null shell is Disposed shell set Image f Image  setImage fImage getShell isDisposed setImage fImage

Creates a status set to OK no message public Status Info this OK null  StatusInfo
Creates a status param severity The status severity ERROR WARNING INFO and OK param message The message of the status Applies only for ERROR WARNING and INFO public Status Info int severity String message f Status Message message f Severity severity  StatusInfo fStatusMessage fSeverity
Returns if the status severity is OK public boolean isOK return f Severity I Status OK  fSeverity IStatus
Returns if the status severity is WARNING public boolean is Warning return f Severity I Status WARNING  isWarning fSeverity IStatus
Returns if the status severity is INFO public boolean is Info return f Severity I Status INFO  isInfo fSeverity IStatus
Returns if the status severity is ERROR public boolean is Error return f Severity I Status ERROR  isError fSeverity IStatus
see I Status get Message public String get Message return f Status Message  IStatus getMessage getMessage fStatusMessage
Sets the status to ERROR param The error message can be empty but not null public void set Error String error Message Assert is Not Null error Message f Status Message error Message f Severity I Status ERROR  setError errorMessage isNotNull errorMessage fStatusMessage errorMessage fSeverity IStatus
Sets the status to WARNING param The warning message can be empty but not null public void set Warning String warning Message Assert is Not Null warning Message f Status Message warning Message f Severity I Status WARNING  setWarning warningMessage isNotNull warningMessage fStatusMessage warningMessage fSeverity IStatus
Sets the status to INFO param The info message can be empty but not null public void set Info String info Message Assert is Not Null info Message f Status Message info Message f Severity I Status INFO  setInfo infoMessage isNotNull infoMessage fStatusMessage infoMessage fSeverity IStatus
Sets the status to OK public void setOK f Status Message null f Severity I Status OK  fStatusMessage fSeverity IStatus
see I Status matches int public boolean matches int severity Mask return f Severity severity Mask 0  IStatus severityMask fSeverity severityMask
Returns always code false code see I Status is Multi Status public boolean is Multi Status return false  IStatus isMultiStatus isMultiStatus
see I Status get Severity public int get Severity return f Severity  IStatus getSeverity getSeverity fSeverity
see I Status get Plugin public String get Plugin return DebugUI Plugin get Unique Identifier  IStatus getPlugin getPlugin DebugUIPlugin getUniqueIdentifier
Returns always code null code see I Status get Exception public Throwable get Exception return null  IStatus getException getException
Returns always the error severity see I Status get Code public int get Code return f Severity  IStatus getCode getCode fSeverity
Returns always code null code see I Status get Children public I Status get Children return new I Status 0  IStatus getChildren IStatus getChildren IStatus

see Abstract Debug Action Delegate do Action Object protected void do Action Object object throws Debug Exception if object instanceof I Step step Action I Step object  AbstractDebugActionDelegate doAction doAction DebugException IStep stepAction IStep
see Abstract Debug Action Delegate is Enabled For Object protected boolean is Enabled For Object element if element instanceof I Step return check Capability I Step element return false  AbstractDebugActionDelegate isEnabledFor isEnabledFor IStep checkCapability IStep
Returns whether the code I Step code has the capability to perform the requested step action  IStep
Performs the specific step action exception Debug Exception if the action fails  DebugException

see Step Action Delegate check Capability I Step protected boolean check Capability I Step element return element can Step Into  StepActionDelegate checkCapability IStep checkCapability IStep canStepInto
see Step Action Delegate step Action I Step protected void step Action I Step element throws Debug Exception element step Into  StepActionDelegate stepAction IStep stepAction IStep DebugException stepInto
see Abstract Debug Action Delegate get Status Message protected String get Status Message return Action Messages get String Step Into Action Delegate Exceptions occurred attempting to step into the frame 2 NON NLS 1  AbstractDebugActionDelegate getStatusMessage getStatusMessage ActionMessages getString StepIntoActionDelegate Exceptions_occurred_attempting_to_step_into_the_frame_2
see Abstract Debug Action Delegate get Error Dialog Message protected String get Error Dialog Message return Action Messages get String Step Into Action Delegate Step into failed 1 NON NLS 1  AbstractDebugActionDelegate getErrorDialogMessage getErrorDialogMessage ActionMessages getString StepIntoActionDelegate Step_into_failed_1
see Abstract Debug Action Delegate get Error Dialog Title protected String get Error Dialog Title return Action Messages get String Step Into Action Delegate Step Into 3 NON NLS 1  AbstractDebugActionDelegate getErrorDialogTitle getErrorDialogTitle ActionMessages getString StepIntoActionDelegate Step_Into_3
see org eclipse debug internal ui actions Step Action Delegate get Action Definition Id protected String get Action Definition Id return org eclipse debug internal ui actions Step Into Action Delegate NON NLS 1  StepActionDelegate getActionDefinitionId getActionDefinitionId StepIntoActionDelegate

see Step Action Delegate check Capability I Step protected boolean check Capability I Step element return element can Step Over  StepActionDelegate checkCapability IStep checkCapability IStep canStepOver
see Step Action Delegate step Action I Step protected void step Action I Step element throws Debug Exception element step Over  StepActionDelegate stepAction IStep stepAction IStep DebugException stepOver
see Abstract Debug Action Delegate get Status Message protected String get Status Message return Action Messages get String Step Over Action Delegate Exceptions occurred attempting to step over the frame 2 NON NLS 1  AbstractDebugActionDelegate getStatusMessage getStatusMessage ActionMessages getString StepOverActionDelegate Exceptions_occurred_attempting_to_step_over_the_frame_2
see Abstract Debug Action Delegate get Error Dialog Message protected String get Error Dialog Message return Action Messages get String Step Over Action Delegate Step over failed 1 NON NLS 1  AbstractDebugActionDelegate getErrorDialogMessage getErrorDialogMessage ActionMessages getString StepOverActionDelegate Step_over_failed_1
see Abstract Debug Action Delegate get Error Dialog Title protected String get Error Dialog Title return Action Messages get String Step Over Action Delegate Step over 3 NON NLS 1  AbstractDebugActionDelegate getErrorDialogTitle getErrorDialogTitle ActionMessages getString StepOverActionDelegate Step_over_3
see org eclipse debug internal ui actions Step Action Delegate get Action Definition Id protected String get Action Definition Id return org eclipse debug internal ui actions Step Over Action Delegate NON NLS 1  StepActionDelegate getActionDefinitionId getActionDefinitionId StepOverActionDelegate

see Step Action Delegate check Capability I Step protected boolean check Capability I Step element return element can Step Return  StepActionDelegate checkCapability IStep checkCapability IStep canStepReturn
see Step Action Delegate step Action I Step protected void step Action I Step element throws Debug Exception element step Return  StepActionDelegate stepAction IStep stepAction IStep DebugException stepReturn
see Abstract Debug Action Delegate get Status Message protected String get Status Message return Action Messages get String Step Return Action Delegate Exceptions occurred attempting to run to return of the frame  2 NON NLS 1  AbstractDebugActionDelegate getStatusMessage getStatusMessage ActionMessages getString StepReturnActionDelegate Exceptions_occurred_attempting_to_run_to_return_of_the_frame _2
see Abstract Debug Action Delegate get Error Dialog Message protected String get Error Dialog Message return Action Messages get String Step Return Action Delegate Run to return failed  1 NON NLS 1  AbstractDebugActionDelegate getErrorDialogMessage getErrorDialogMessage ActionMessages getString StepReturnActionDelegate Run_to_return_failed _1
see Abstract Debug Action Delegate get Error Dialog Title protected String get Error Dialog Title return Action Messages get String Step Return Action Delegate Run to Return 3 NON NLS 1  AbstractDebugActionDelegate getErrorDialogTitle getErrorDialogTitle ActionMessages getString StepReturnActionDelegate Run_to_Return_3
see org eclipse debug internal ui actions Step Action Delegate get Action Definition Id protected String get Action Definition Id return org eclipse debug internal ui actions Step Return Action Delegate NON NLS 1  StepActionDelegate getActionDefinitionId getActionDefinitionId StepReturnActionDelegate

see Abstract Debug Action Delegate do Action Object protected void do Action Object element throws Debug Exception if element instanceof I Suspend Resume I Suspend Resume element suspend  AbstractDebugActionDelegate doAction doAction DebugException ISuspendResume ISuspendResume
see Abstract Debug Action Delegate is Enabled For Object protected boolean is Enabled For Object element return element instanceof I Suspend Resume I Suspend Resume element can Suspend  AbstractDebugActionDelegate isEnabledFor isEnabledFor ISuspendResume ISuspendResume canSuspend
see Abstract Debug Action Delegate get Status Message protected String get Status Message return Action Messages get String Suspend Action Delegate Exceptions occurred attempting to suspend  2 NON NLS 1  AbstractDebugActionDelegate getStatusMessage getStatusMessage ActionMessages getString SuspendActionDelegate Exceptions_occurred_attempting_to_suspend _2
see Abstract Debug Action Delegate get Error Dialog Message protected String get Error Dialog Message return Action Messages get String Suspend Action Delegate Suspend failed 1 NON NLS 1  AbstractDebugActionDelegate getErrorDialogMessage getErrorDialogMessage ActionMessages getString SuspendActionDelegate Suspend_failed_1
see Abstract Debug Action Delegate get Error Dialog Title protected String get Error Dialog Title return Action Messages get String Suspend Action Delegate Suspend 3 NON NLS 1  AbstractDebugActionDelegate getErrorDialogTitle getErrorDialogTitle ActionMessages getString SuspendActionDelegate Suspend_3

see Abstract Debug Action Delegate do Action Object protected void do Action Object element throws Debug Exception if element instanceof I Terminate I Terminate element terminate  AbstractDebugActionDelegate doAction doAction DebugException ITerminate ITerminate
see Abstract Debug Action Delegate is Enabled For Object protected boolean is Enabled For Object element return element instanceof I Terminate I Terminate element can Terminate  AbstractDebugActionDelegate isEnabledFor isEnabledFor ITerminate ITerminate canTerminate
see Abstract Debug Action Delegate get Status Message protected String get Status Message return Action Messages get String Terminate Action Delegate Exceptions occurred attempting to terminate  2 NON NLS 1  AbstractDebugActionDelegate getStatusMessage getStatusMessage ActionMessages getString TerminateActionDelegate Exceptions_occurred_attempting_to_terminate _2
see Abstract Debug Action Delegate get Error Dialog Message protected String get Error Dialog Message return Action Messages get String Terminate Action Delegate Terminate failed  1 NON NLS 1  AbstractDebugActionDelegate getErrorDialogMessage getErrorDialogMessage ActionMessages getString TerminateActionDelegate Terminate_failed _1
see Abstract Debug Action Delegate get Error Dialog Title protected String get Error Dialog Title return Action Messages get String Terminate Action Delegate Terminate 3 NON NLS 1  AbstractDebugActionDelegate getErrorDialogTitle getErrorDialogTitle ActionMessages getString TerminateActionDelegate Terminate_3
see Listener Action Delegate do Handle Debug Event Debug Event protected void do Handle Debug Event Debug Event event if event get Kind Debug Event TERMINATE update get Action get Selection  ListenerActionDelegate doHandleDebugEvent DebugEvent doHandleDebugEvent DebugEvent getKind DebugEvent getAction getSelection

public class Terminate All Action extends Abstract Listener Action Delegate protected void do Action Object element not used  TerminateAllAction AbstractListenerActionDelegate doAction
protected void update I Launch Manager l Manager Debug Plugin get Default get Launch Manager I Launch launches l Manager get Launches for int i 0 i launches length i I Launch launch launches i if launch is Terminated get Action set Enabled true return get Action set Enabled false  ILaunchManager lManager DebugPlugin getDefault getLaunchManager ILaunch lManager getLaunches ILaunch isTerminated getAction setEnabled getAction setEnabled
see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection set Action action  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection setAction
see I Action Delegate run I Action public void run I Action action I Launch Manager l Manager Debug Plugin get Default get Launch Manager I Launch launches l Manager get Launches Multi Status ms new Multi Status Debug Plugin get Unique Identifier Debug Exception REQUEST FAILED Action Messages get String Terminate All Action Terminate all failed 3 null NON NLS 1 for int i 0 i launches length i I Launch launch launches i if launch is Terminated try launch terminate catch Debug Exception de ms merge de get Status if ms isOK I Workbench Window window DebugUI Plugin get Active Workbench Window if window null DebugUI Plugin error Dialog window get Shell Action Messages get String Terminate All Action Terminate All 2 Action Messages get String Terminate All Action Exceptions occurred attempting to terminate all  5 ms NON NLS 1 NON NLS 2 else DebugUI Plugin log ms  IActionDelegate IAction IAction ILaunchManager lManager DebugPlugin getDefault getLaunchManager ILaunch lManager getLaunches MultiStatus MultiStatus DebugPlugin getUniqueIdentifier DebugException REQUEST_FAILED ActionMessages getString TerminateAllAction Terminate_all_failed_3 ILaunch isTerminated DebugException getStatus IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow DebugUIPlugin errorDialog getShell ActionMessages getString TerminateAllAction Terminate_All_2 ActionMessages getString TerminateAllAction Exceptions_occurred_attempting_to_terminate_all _5 DebugUIPlugin
protected void do Handle Debug Event Debug Event event switch event get Kind case Debug Event TERMINATE update break case Debug Event CREATE update break  doHandleDebugEvent DebugEvent getKind DebugEvent DebugEvent

see Abstract Debug Action Delegate do Action Object protected void do Action Object element throws Debug Exception Launch View terminate And Remove element  AbstractDebugActionDelegate doAction doAction DebugException LaunchView terminateAndRemove
see Abstract Debug Action Delegate is Enabled For Object protected boolean is Enabled For Object element if element instanceof I Terminate I Terminate terminate I Terminate element do not want to terminate an attach launch that does not have termination enabled return terminate can Terminate terminate is Terminated return false  AbstractDebugActionDelegate isEnabledFor isEnabledFor ITerminate ITerminate ITerminate canTerminate isTerminated
see Abstract Debug Action Delegate get Status Message protected String get Status Message return Action Messages get String Terminate And Remove Action Delegate Exceptions occurred attempting to terminate and remove 2 NON NLS 1  AbstractDebugActionDelegate getStatusMessage getStatusMessage ActionMessages getString TerminateAndRemoveActionDelegate Exceptions_occurred_attempting_to_terminate_and_remove_2
see Abstract Debug Action Delegate get Error Dialog Message protected String get Error Dialog Message return Action Messages get String Terminate And Remove Action Delegate Terminate and remove failed 1 NON NLS 1  AbstractDebugActionDelegate getErrorDialogMessage getErrorDialogMessage ActionMessages getString TerminateAndRemoveActionDelegate Terminate_and_remove_failed_1
see Abstract Debug Action Delegate get Error Dialog Title protected String get Error Dialog Title return Action Messages get String Terminate And Remove Action Delegate Terminate and Remove  3 NON NLS 1  AbstractDebugActionDelegate getErrorDialogTitle getErrorDialogTitle ActionMessages getString TerminateAndRemoveActionDelegate Terminate_and_Remove _3

see org eclipse ui I Object Action Delegate set Active Part org eclipse jface action I Action org eclipse ui I Workbench Part public void set Active Part I Action action I Workbench Part target Part part target Part  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart targetPart
public void run I Action action I Adaptable adaptable I Adaptable selection get First Element I Toggle Breakpoints Target target I Toggle Breakpoints Target adaptable get Adapter I Toggle Breakpoints Target class if target null I Adapter Manager adapter Manager Platform get Adapter Manager target I Toggle Breakpoints Target adapter Manager load Adapter adaptable I Toggle Breakpoints Target class get Name if target null try perform Action target part selection catch Core Exception e Debug Plugin log e  IAction IAdaptable IAdaptable getFirstElement IToggleBreakpointsTarget IToggleBreakpointsTarget getAdapter IToggleBreakpointsTarget IAdapterManager adapterManager getAdapterManager IToggleBreakpointsTarget adapterManager loadAdapter IToggleBreakpointsTarget getName performAction CoreException DebugPlugin
Performs the operation specific to this action param target adapter to toggle breakpoints param part the active part param selection the seleciton in the active part exception Core Exception if an exception occurrs  CoreException
public void selection Changed I Action action I Selection selection boolean enabled false if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection this selection ss if ss is Empty Object object ss get First Element if object instanceof I Adaptable I Adaptable adaptable I Adaptable object I Toggle Breakpoints Target target I Toggle Breakpoints Target adaptable get Adapter I Toggle Breakpoints Target class if target null I Adapter Manager adapter Manager Platform get Adapter Manager enabled adapter Manager has Adapter adaptable I Toggle Breakpoints Target class get Name else enabled true action set Enabled enabled  selectionChanged IAction ISelection IStructuredSelection IStructuredSelection IStructuredSelection isEmpty getFirstElement IAdaptable IAdaptable IAdaptable IToggleBreakpointsTarget IToggleBreakpointsTarget getAdapter IToggleBreakpointsTarget IAdapterManager adapterManager getAdapterManager adapterManager hasAdapter IToggleBreakpointsTarget getName setEnabled
see org eclipse ui I Action Delegate2 init org eclipse jface action I Action public void init I Action action  IActionDelegate2 IAction IAction
see org eclipse ui I Action Delegate2 dispose public void dispose selection null part null  IActionDelegate2
see org eclipse ui I Action Delegate2 run With Event org eclipse jface action I Action org eclipse swt widgets Event public void run With Event I Action action Event event run action  IActionDelegate2 runWithEvent IAction runWithEvent IAction

public Toggle Detail Pane Action Variables View view String orientation String hidden Label super AS RADIO BUTTON NON NLS 1 set Variables View view set Orientation orientation if orientation I Debug Preference Constants VARIABLES DETAIL PANE UNDERNEATH set Text Action Messages get String Toggle Detail Pane Action 1 NON NLS 1 set Tool Tip Text Action Messages get String Toggle Detail Pane Action 2 NON NLS 1 set Description Action Messages get String Toggle Detail Pane Action 3 NON NLS 1 set Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG ELCL DETAIL PANE UNDER set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL DETAIL PANE UNDER set Hover Image Descriptor Debug Plugin Images get Image Descriptor I DebugUI Constants IMG LCL DETAIL PANE UNDER else if orientation I Debug Preference Constants VARIABLES DETAIL PANE RIGHT set Text Action Messages get String Toggle Detail Pane Action 4 NON NLS 1 set Tool Tip Text Action Messages get String Toggle Detail Pane Action 5 NON NLS 1 set Description Action Messages get String Toggle Detail Pane Action 6 NON NLS 1 set Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG ELCL DETAIL PANE RIGHT set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL DETAIL PANE RIGHT set Hover Image Descriptor Debug Plugin Images get Image Descriptor I DebugUI Constants IMG LCL DETAIL PANE RIGHT else set Text hidden Label set Tool Tip Text Action Messages get String Toggle Detail Pane Action 8 NON NLS 1 set Description Action Messages get String Toggle Detail Pane Action 9 NON NLS 1 set Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG ELCL DETAIL PANE HIDE set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL DETAIL PANE HIDE set Hover Image Descriptor Debug Plugin Images get Image Descriptor I DebugUI Constants IMG LCL DETAIL PANE HIDE Workbench Help set Help this I Debug Help Context Ids SHOW DETAIL PANE ACTION  ToggleDetailPaneAction VariablesView hiddenLabel AS_RADIO_BUTTON setVariablesView setOrientation IDebugPreferenceConstants VARIABLES_DETAIL_PANE_UNDERNEATH setText ActionMessages getString ToggleDetailPaneAction setToolTipText ActionMessages getString ToggleDetailPaneAction setDescription ActionMessages getString ToggleDetailPaneAction setImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_ELCL_DETAIL_PANE_UNDER setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_DETAIL_PANE_UNDER setHoverImageDescriptor DebugPluginImages getImageDescriptor IDebugUIConstants IMG_LCL_DETAIL_PANE_UNDER IDebugPreferenceConstants VARIABLES_DETAIL_PANE_RIGHT setText ActionMessages getString ToggleDetailPaneAction setToolTipText ActionMessages getString ToggleDetailPaneAction setDescription ActionMessages getString ToggleDetailPaneAction setImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_ELCL_DETAIL_PANE_RIGHT setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_DETAIL_PANE_RIGHT setHoverImageDescriptor DebugPluginImages getImageDescriptor IDebugUIConstants IMG_LCL_DETAIL_PANE_RIGHT setText hiddenLabel setToolTipText ActionMessages getString ToggleDetailPaneAction setDescription ActionMessages getString ToggleDetailPaneAction setImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_ELCL_DETAIL_PANE_HIDE setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_DETAIL_PANE_HIDE setHoverImageDescriptor DebugPluginImages getImageDescriptor IDebugUIConstants IMG_LCL_DETAIL_PANE_HIDE WorkbenchHelp setHelp IDebugHelpContextIds SHOW_DETAIL_PANE_ACTION
see org eclipse jface action I Action run public void run get Variables View set Detail Pane Orientation get Orientation  IAction getVariablesView setDetailPaneOrientation getOrientation
private Variables View get Variables View return f Variables View  VariablesView getVariablesView fVariablesView
private void set Variables View Variables View variables View f Variables View variables View  setVariablesView VariablesView variablesView fVariablesView variablesView
private void set Orientation String orientation f Orientation orientation  setOrientation fOrientation
public String get Orientation return f Orientation  getOrientation fOrientation

private Viewer Filter f Viewer Filter public void run value Changed is Checked  ViewerFilter fViewerFilter valueChanged isChecked
Busy Indicator show While get Viewer get Control get Display new Runnable public void run if on Viewer Filter filter get Viewer Filter Viewer Filter filters get Viewer get Filters boolean already Added false for int i 0 i filters length i Viewer Filter added Filter filters i if added Filter equals filter already Added true break if already Added get Viewer add Filter filter else get Viewer remove Filter get Viewer Filter  BusyIndicator showWhile getViewer getControl getDisplay ViewerFilter getViewerFilter ViewerFilter getViewer getFilters alreadyAdded ViewerFilter addedFilter addedFilter alreadyAdded alreadyAdded getViewer addFilter getViewer removeFilter getViewerFilter
Adds or removes the viewer filter depending on the value of the parameter protected void value Changed final boolean on if get Viewer get Control is Disposed return Busy Indicator show While get Viewer get Control get Display new Runnable public void run if on Viewer Filter filter get Viewer Filter Viewer Filter filters get Viewer get Filters boolean already Added false for int i 0 i filters length i Viewer Filter added Filter filters i if added Filter equals filter already Added true break if already Added get Viewer add Filter filter else get Viewer remove Filter get Viewer Filter  valueChanged getViewer getControl isDisposed BusyIndicator showWhile getViewer getControl getDisplay ViewerFilter getViewerFilter ViewerFilter getViewer getFilters alreadyAdded ViewerFilter addedFilter addedFilter alreadyAdded alreadyAdded getViewer addFilter getViewer removeFilter getViewerFilter
Returns the code Viewer Filter code that this action will add remove from the viewer or code null code if no filter is involved protected Viewer Filter get Viewer Filter return f Viewer Filter  ViewerFilter ViewerFilter getViewerFilter fViewerFilter
protected void set Viewer Filter Viewer Filter filter f Viewer Filter filter  setViewerFilter ViewerFilter fViewerFilter
protected Structured Viewer get Viewer return f Viewer  StructuredViewer getViewer fViewer
protected void set Viewer Structured Viewer viewer f Viewer viewer  setViewer StructuredViewer fViewer

see org eclipse debug internal ui actions Abstract Debug Action Delegate do Action java lang Object protected void do Action Object element do nothing we override run I Action  AbstractDebugActionDelegate doAction doAction IAction
public void init I Action action set Action action action set Checked is Use Step Filters get Preference Store add Property Change Listener this  IAction setAction setChecked isUseStepFilters getPreferenceStore addPropertyChangeListener
private boolean is Use Step Filters return DebugUI Plugin get Default get Step Filter Manager is Use Step Filters  isUseStepFilters DebugUIPlugin getDefault getStepFilterManager isUseStepFilters
private I Preference Store get Preference Store return DebugUI Plugin get Default get Preference Store  IPreferenceStore getPreferenceStore DebugUIPlugin getDefault getPreferenceStore
see org eclipse ui I Action Delegate2 run With Event org eclipse jface action I Action org eclipse swt widgets Event public void run With Event I Action action Event event run action  IActionDelegate2 runWithEvent IAction runWithEvent IAction
public void property Change Property Change Event event if event get Property equals I Internal DebugUI Constants PREF USE STEP FILTERS Object new Value event get New Value if new Value instanceof Boolean get Action set Checked Boolean new Value boolean Value else if new Value instanceof String get Action set Checked Boolean get Boolean String new Value  propertyChange PropertyChangeEvent getProperty IInternalDebugUIConstants PREF_USE_STEP_FILTERS newValue getNewValue newValue getAction setChecked newValue booleanValue newValue getAction setChecked getBoolean newValue
see org eclipse ui I Workbench Window Action Delegate dispose public void dispose super dispose get Preference Store remove Property Change Listener this  IWorkbenchWindowActionDelegate getPreferenceStore removePropertyChangeListener
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action DebugUI Tools set Use Step Filters action is Checked  IActionDelegate IAction IAction DebugUITools setUseStepFilters isChecked
protected boolean initialize I Action action I Selection selection boolean res super initialize action selection init action return res  IAction ISelection
protected void update I Action action I Selection s boolean enabled true if s null s is Empty if s instanceof I Structured Selection I Structured Selection ss I Structured Selection s if ss size 1 ss get First Element instanceof I Debug Element only disable if the selection does not support step filters I Debug Element element I Debug Element ss get First Element I Debug Target target element get Debug Target if target instanceof I Step Filters I Step Filters filters I Step Filters target enabled filters supports Step Filters else enabled false action set Enabled enabled  IAction ISelection isEmpty IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement IDebugElement IDebugElement IDebugElement getFirstElement IDebugTarget getDebugTarget IStepFilters IStepFilters IStepFilters supportsStepFilters setEnabled

public class View Management Action extends Action Delegate implements I View Action Delegate public View Management Action  ViewManagementAction ActionDelegate IViewActionDelegate ViewManagementAction
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action I Preference Page page new View Management Preference Page show Preference Page org eclipse debug ui View Management Preference Page page NON NLS 1  IActionDelegate IAction IAction IPreferencePage ViewManagementPreferencePage showPreferencePage ViewManagementPreferencePage
see org eclipse ui I View Action Delegate init org eclipse ui I View Part public void init I View Part view  IViewActionDelegate IViewPart IViewPart
Busy Indicator show While DebugUI Plugin get Standard Display new Runnable public void run dialog create dialog set Message target Node get Label Text result 0 dialog open Window OK  BusyIndicator showWhile DebugUIPlugin getStandardDisplay setMessage targetNode getLabelText
protected void show Preference Page String id I Preference Page page final I Preference Node target Node new Preference Node id page Preference Manager manager new Preference Manager manager add To Root target Node final Preference Dialog dialog new Preference Dialog DebugUI Plugin get Shell manager final boolean result new boolean false Busy Indicator show While DebugUI Plugin get Standard Display new Runnable public void run dialog create dialog set Message target Node get Label Text result 0 dialog open Window OK  showPreferencePage IPreferencePage IPreferenceNode targetNode PreferenceNode PreferenceManager PreferenceManager addToRoot targetNode PreferenceDialog PreferenceDialog DebugUIPlugin getShell BusyIndicator showWhile DebugUIPlugin getStandardDisplay setMessage targetNode getLabelText

see org eclipse ui I Object Action Delegate set Active Part org eclipse jface action I Action org eclipse ui I Workbench Part public void set Active Part I Action action I Workbench Part target Part  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action if f Selection null return if f Selection instanceof I Structured Selection Iterator iter I Structured Selection f Selection iterator while iter has Next I Variable variable I Variable iter next create Expression variable else if f Selection instanceof I Variable create Expression I Variable f Selection  IActionDelegate IAction IAction fSelection fSelection IStructuredSelection IStructuredSelection fSelection hasNext IVariable IVariable createExpression fSelection IVariable createExpression IVariable fSelection
private void show Expressions View I Workbench Page page DebugUI Plugin get Default get Workbench get Active Workbench Window get Active Page I View Part part page find View I DebugUI Constants ID EXPRESSION VIEW if part null try page show View I DebugUI Constants ID EXPRESSION VIEW catch Part Init Exception e else page bring To Top part  showExpressionsView IWorkbenchPage DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getActivePage IViewPart findView IDebugUIConstants ID_EXPRESSION_VIEW showView IDebugUIConstants ID_EXPRESSION_VIEW PartInitException bringToTop
private void create Expression I Variable variable I Watch Expression expression try expression Debug Plugin get Default get Expression Manager new Watch Expression variable get Name catch Debug Exception e DebugUI Plugin error Dialog DebugUI Plugin get Shell Action Messages get String Watch Action 0 Action Messages get String Watch Action 1 e NON NLS 1 NON NLS 2 return Debug Plugin get Default get Expression Manager add Expression expression I Adaptable object DebugUI Tools get Debug Context I Debug Element context null if object instanceof I Debug Element context I Debug Element object else if object instanceof I Launch context I Launch object get Debug Target expression set Expression Context context show Expressions View  createExpression IVariable IWatchExpression DebugPlugin getDefault getExpressionManager newWatchExpression getName DebugException DebugUIPlugin errorDialog DebugUIPlugin getShell ActionMessages getString WatchAction ActionMessages getString WatchAction DebugPlugin getDefault getExpressionManager addExpression IAdaptable DebugUITools getDebugContext IDebugElement IDebugElement IDebugElement ILaunch ILaunch getDebugTarget setExpressionContext showExpressionsView
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection f Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection fSelection

I Workbench Part f Part null Finds the currently selected context in the UI protected I Debug Element get Context I Adaptable object DebugUI Tools get Debug Context I Debug Element context null if object instanceof I Debug Element context I Debug Element object else if object instanceof I Launch context I Launch object get Debug Target return context  IWorkbenchPart fPart IDebugElement getContext IAdaptable DebugUITools getDebugContext IDebugElement IDebugElement IDebugElement ILaunch ILaunch getDebugTarget
see I Object Action Delegate set Active Part I Action I Workbench Part public void set Active Part I Action action I Workbench Part target Part f Part target Part  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart fPart targetPart
see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection sel  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection
protected I Structured Selection get Current Selection I Workbench Page page DebugUI Plugin get Active Workbench Window get Active Page if page null I Selection selection page get Selection if selection instanceof I Structured Selection return I Structured Selection selection return null  IStructuredSelection getCurrentSelection IWorkbenchPage DebugUIPlugin getActiveWorkbenchWindow getActivePage ISelection getSelection IStructuredSelection IStructuredSelection
Displays the given error message in the status line param message protected void show Error Message String message if f Part instanceof I View Part I View Site view Site I View Part f Part get View Site I Status Line Manager manager view Site get Action Bars get Status Line Manager manager set Error Message message Display get Current beep  showErrorMessage fPart IViewPart IViewSite viewSite IViewPart fPart getViewSite IStatusLineManager viewSite getActionBars getStatusLineManager setErrorMessage getCurrent
see org eclipse ui I Action Delegate2 dispose public void dispose f Part null  IActionDelegate2 fPart
see org eclipse ui I Action Delegate2 init org eclipse jface action I Action public void init I Action action  IActionDelegate2 IAction IAction
see org eclipse ui I Action Delegate2 run With Event org eclipse jface action I Action org eclipse swt widgets Event public void run With Event I Action action Event event run action  IActionDelegate2 runWithEvent IAction runWithEvent IAction

public Watch Expression Dialog Shell parent I Watch Expression watch Expression boolean edit Dialog super parent f Watch Expression watch Expression set Shell Style get Shell Style SWT MAX SWT RESIZE String help Context Id null if edit Dialog set Title Action Messages get String Watch Expression Dialog 0 NON NLS 1 help Context Id I Debug Help Context Ids EDIT WATCH EXPRESSION DIALOG else set Title Action Messages get String Watch Expression Dialog 1 NON NLS 1 help Context Id I Debug Help Context Ids ADD WATCH EXPRESSION DIALOG Workbench Help set Help parent help Context Id  WatchExpressionDialog IWatchExpression watchExpression editDialog fWatchExpression watchExpression setShellStyle getShellStyle helpContextId editDialog setTitle ActionMessages getString WatchExpressionDialog helpContextId IDebugHelpContextIds EDIT_WATCH_EXPRESSION_DIALOG setTitle ActionMessages getString WatchExpressionDialog helpContextId IDebugHelpContextIds ADD_WATCH_EXPRESSION_DIALOG WorkbenchHelp setHelp helpContextId
Create the dialog area see org eclipse jface dialogs Dialog create Dialog Area Composite protected Control create Dialog Area Composite parent Font font parent get Font Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH container set Layout Data gd snippet label Label label new Label container SWT NONE label set Text Action Messages get String Watch Expression Dialog 2 NON NLS 1 gd new Grid Data Grid Data BEGINNING label set Layout Data gd label set Font font f Snippet Viewer new Source Viewer container null SWT BORDER SWT V SCROLL SWT H SCROLL f Snippet Viewer set Input this I Document document new Document I Document Partitioner partitioner new Rule Based Partitioner document set Document Partitioner partitioner partitioner connect document f Snippet Viewer configure new Source Viewer Configuration f Snippet Viewer set Editable true f Snippet Viewer set Document document document add Document Listener new I Document Listener public void document About To Be Changed Document Event event public void document Changed Document Event event check Values f Snippet Viewer get Text Widget set Font J Face Resources get Text Font Control control f Snippet Viewer get Control gd new Grid Data Grid Data FILL BOTH gd height Hint convert Height In Chars To Pixels 10 gd width Hint convert Width In Chars To Pixels 80 control set Layout Data gd f Snippet Viewer get Document set f Watch Expression get Expression Text enable checkbox f Check Box new Button container SWT CHECK SWT LEFT f Check Box set Text Action Messages get String Watch Expression Dialog 3 NON NLS 1 f Check Box set Selection f Watch Expression is Enabled f Check Box set Font font apply Dialog Font container f Snippet Viewer get Control set Focus return container  createDialogArea createDialogArea getFont GridLayout GridLayout setLayout GridData GridData GridData FILL_BOTH setLayoutData setText ActionMessages getString WatchExpressionDialog GridData GridData setLayoutData setFont fSnippetViewer SourceViewer V_SCROLL H_SCROLL fSnippetViewer setInput IDocument IDocumentPartitioner RuleBasedPartitioner setDocumentPartitioner fSnippetViewer SourceViewerConfiguration fSnippetViewer setEditable fSnippetViewer setDocument addDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent documentChanged DocumentEvent checkValues fSnippetViewer getTextWidget setFont JFaceResources getTextFont fSnippetViewer getControl GridData GridData FILL_BOTH heightHint convertHeightInCharsToPixels widthHint convertWidthInCharsToPixels setLayoutData fSnippetViewer getDocument fWatchExpression getExpressionText fCheckBox fCheckBox setText ActionMessages getString WatchExpressionDialog fCheckBox setSelection fWatchExpression isEnabled fCheckBox setFont applyDialogFont fSnippetViewer getControl setFocus
see org eclipse jface dialogs Dialog ok Pressed protected void ok Pressed f Watch Expression set Enabled f Check Box get Selection f Watch Expression set Expression Text f Snippet Viewer get Document get super ok Pressed  okPressed okPressed fWatchExpression setEnabled fCheckBox getSelection fWatchExpression setExpressionText fSnippetViewer getDocument okPressed
Check the field values and display a message in the status if needed private void check Values Status Info status new Status Info if f Snippet Viewer get Document get trim length 0 status set Error Action Messages get String Watch Expression Dialog 4 NON NLS 1 update Status status  checkValues StatusInfo StatusInfo fSnippetViewer getDocument setError ActionMessages getString WatchExpressionDialog updateStatus

public Image get Managed Image Annotation annotation if annotation instanceof Marker Annotation I Marker marker Marker Annotation annotation get Marker if marker null I Breakpoint breakpoint Debug Plugin get Default get Breakpoint Manager get Breakpoint marker if breakpoint null return DebugUI Plugin get Model Presentation get Image breakpoint return null  getManagedImage MarkerAnnotation IMarker MarkerAnnotation getMarker IBreakpoint DebugPlugin getDefault getBreakpointManager getBreakpoint DebugUIPlugin getModelPresentation getImage
see org eclipse ui texteditor I Annotation Image Provider get Image Descriptor Id org eclipse jface text source Annotation public String get Image Descriptor Id Annotation annotation return null  IAnnotationImageProvider getImageDescriptorId getImageDescriptorId
see org eclipse ui texteditor I Annotation Image Provider get Image Descriptor java lang String public Image Descriptor get Image Descriptor String image Descritpor Id return null  IAnnotationImageProvider getImageDescriptor ImageDescriptor getImageDescriptor imageDescritporId

private static Color Manager fg Color Manager private Color Manager  ColorManager fgColorManager ColorManager
public static Color Manager get Default if fg Color Manager null fg Color Manager new Color Manager return fg Color Manager  ColorManager getDefault fgColorManager fgColorManager ColorManager fgColorManager
public Color get Color RGB rgb Color color Color f Color Table get rgb if color null color new Color Display get Current rgb f Color Table put rgb color return color  getColor fColorTable getCurrent fColorTable
public void dispose Iterator e f Color Table values iterator while e has Next Color e next dispose  fColorTable hasNext

see I Perspective Factory create Initial Layout I Page Layout public void create Initial Layout I Page Layout layout I Folder Layout console Folder layout create Folder I Internal DebugUI Constants ID CONSOLE FOLDER VIEW I Page Layout BOTTOM float 0 75 layout get Editor Area console Folder add View I Console Constants ID CONSOLE VIEW console Folder add View I Page Layout ID TASK LIST console Folder add Placeholder I Page Layout ID BOOKMARKS console Folder add Placeholder I Page Layout ID PROP SHEET I Folder Layout nav Folder layout create Folder I Internal DebugUI Constants ID NAVIGATOR FOLDER VIEW I Page Layout TOP float 0 45 layout get Editor Area nav Folder add View I DebugUI Constants ID DEBUG VIEW nav Folder add Placeholder I Page Layout ID RES NAV I Folder Layout tools Folder layout create Folder I Internal DebugUI Constants ID TOOLS FOLDER VIEW I Page Layout RIGHT float 0 50 I Internal DebugUI Constants ID NAVIGATOR FOLDER VIEW tools Folder add View I DebugUI Constants ID VARIABLE VIEW tools Folder add View I DebugUI Constants ID BREAKPOINT VIEW tools Folder add Placeholder I DebugUI Constants ID EXPRESSION VIEW tools Folder add Placeholder I DebugUI Constants ID REGISTER VIEW I Folder Layout outline Folder layout create Folder I Internal DebugUI Constants ID OUTLINE FOLDER VIEW I Page Layout RIGHT float 0 75 layout get Editor Area outline Folder add View I Page Layout ID OUTLINE layout add Action Set I DebugUI Constants LAUNCH ACTION SET layout add Action Set I DebugUI Constants DEBUG ACTION SET set Contents Of Show View Menu layout  IPerspectiveFactory createInitialLayout IPageLayout createInitialLayout IPageLayout IFolderLayout consoleFolder createFolder IInternalDebugUIConstants ID_CONSOLE_FOLDER_VIEW IPageLayout getEditorArea consoleFolder addView IConsoleConstants ID_CONSOLE_VIEW consoleFolder addView IPageLayout ID_TASK_LIST consoleFolder addPlaceholder IPageLayout ID_BOOKMARKS consoleFolder addPlaceholder IPageLayout ID_PROP_SHEET IFolderLayout navFolder createFolder IInternalDebugUIConstants ID_NAVIGATOR_FOLDER_VIEW IPageLayout getEditorArea navFolder addView IDebugUIConstants ID_DEBUG_VIEW navFolder addPlaceholder IPageLayout ID_RES_NAV IFolderLayout toolsFolder createFolder IInternalDebugUIConstants ID_TOOLS_FOLDER_VIEW IPageLayout IInternalDebugUIConstants ID_NAVIGATOR_FOLDER_VIEW toolsFolder addView IDebugUIConstants ID_VARIABLE_VIEW toolsFolder addView IDebugUIConstants ID_BREAKPOINT_VIEW toolsFolder addPlaceholder IDebugUIConstants ID_EXPRESSION_VIEW toolsFolder addPlaceholder IDebugUIConstants ID_REGISTER_VIEW IFolderLayout outlineFolder createFolder IInternalDebugUIConstants ID_OUTLINE_FOLDER_VIEW IPageLayout getEditorArea outlineFolder addView IPageLayout ID_OUTLINE addActionSet IDebugUIConstants LAUNCH_ACTION_SET addActionSet IDebugUIConstants DEBUG_ACTION_SET setContentsOfShowViewMenu
Sets the intial contents of the Show View menu protected void set Contents Of Show View Menu I Page Layout layout layout add Show View Shortcut I DebugUI Constants ID DEBUG VIEW layout add Show View Shortcut I DebugUI Constants ID VARIABLE VIEW layout add Show View Shortcut I DebugUI Constants ID BREAKPOINT VIEW layout add Show View Shortcut I DebugUI Constants ID EXPRESSION VIEW layout add Show View Shortcut I Page Layout ID OUTLINE layout add Show View Shortcut I Console Constants ID CONSOLE VIEW layout add Show View Shortcut I Page Layout ID TASK LIST  setContentsOfShowViewMenu IPageLayout addShowViewShortcut IDebugUIConstants ID_DEBUG_VIEW addShowViewShortcut IDebugUIConstants ID_VARIABLE_VIEW addShowViewShortcut IDebugUIConstants ID_BREAKPOINT_VIEW addShowViewShortcut IDebugUIConstants ID_EXPRESSION_VIEW addShowViewShortcut IPageLayout ID_OUTLINE addShowViewShortcut IConsoleConstants ID_CONSOLE_VIEW addShowViewShortcut IPageLayout ID_TASK_LIST

Declare all images private static void declare Images Actions declare Registry Image I DebugUI Constants IMG ACT DEBUG CTOOL debug exc gif NON NLS 1 declare Registry Image I DebugUI Constants IMG ACT RUN CTOOL run exc gif NON NLS 1 declare Registry Image I DebugUI Constants IMG ACT SYNCED ELCL synced gif NON NLS 1 declare Registry Image I DebugUI Constants IMG SKIP BREAKPOINTS ELCL skip brkp gif NON NLS 1 menus declare Registry Image I DebugUI Constants IMG LCL CHANGE VARIABLE VALUE ELCL changevariablevalue co gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL CHANGE VARIABLE VALUE DLCL changevariablevalue co gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG ELCL CHANGE VARIABLE VALUE ELCL changevariablevalue co gif NON NLS 1 declare Registry Image I DebugUI Constants IMG LCL CONTENT ASSIST ELCL metharg obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG DLCL CONTENT ASSIST DLCL metharg obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG ELCL CONTENT ASSIST ELCL metharg obj gif NON NLS 1 Local toolbars declare Registry Image I DebugUI Constants IMG LCL DETAIL PANE ELCL toggledetailpane co gif NON NLS 1 declare Registry Image I DebugUI Constants IMG LCL DETAIL PANE UNDER ELCL det pane under gif NON NLS 1 declare Registry Image I DebugUI Constants IMG LCL DETAIL PANE RIGHT ELCL det pane right gif NON NLS 1 declare Registry Image I DebugUI Constants IMG LCL DETAIL PANE HIDE ELCL det pane hide gif NON NLS 1 declare Registry Image I DebugUI Constants IMG LCL LOCK ELCL lock co gif NON NLS 1 declare Registry Image I DebugUI Constants IMG LCL TYPE NAMES ELCL tnames co gif NON NLS 1 declare Registry Image I DebugUI Constants IMG LCL DISCONNECT ELCL disconnect co gif NON NLS 1 declare Registry Image I DebugUI Constants IMG LCL REMOVE ALL ELCL rem all co gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG LCL SHOW LOGICAL STRUCTURE ELCL var cntnt prvdr gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG LCL COLLAPSE ALL ELCL collapseall gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG LCL TERMINATE ELCL terminate co gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG LCL RUN TO LINE ELCL runtoline co gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG LCL MONITOR EXPRESSION ELCL monitorexpression tsk gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG LCL REMOVE MEMORY ELCL removememory tsk gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG LCL RESET MEMORY ELCL memoryreset tsk gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG LCL COPY VIEW TO CLIPBOARD ELCL copyviewtoclipboard tsk gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG LCL PRINT TOP VIEW TAB ELCL printview tsk gif NON NLS 1 disabled local toolbars declare Registry Image I Internal DebugUI Constants IMG DLCL DETAIL PANE DLCL toggledetailpane co gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL DETAIL PANE UNDER DLCL det pane under gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL DETAIL PANE RIGHT DLCL det pane right gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL DETAIL PANE HIDE DLCL det pane hide gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL LOCK DLCL lock co gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL TYPE NAMES DLCL tnames co gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL SHOW LOGICAL STRUCTURE DLCL var cntnt prvdr gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL COLLAPSE ALL DLCL collapseall gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL TERMINATE DLCL terminate co gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL REMOVE ALL DLCL rem all co gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL RUN TO LINE DLCL runtoline co gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL MONITOR EXPRESSION DLCL monitorexpression tsk gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL REMOVE MEMORY DLCL removememory tsk gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL RESET MEMORY DLCL memoryreset tsk gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL COPY VIEW TO CLIPBOARD DLCL copyviewtoclipboard tsk gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG DLCL PRINT TOP VIEW TAB DLCL printview tsk gif NON NLS 1 enabled local toolbars declare Registry Image I Internal DebugUI Constants IMG ELCL DETAIL PANE ELCL toggledetailpane co gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG ELCL DETAIL PANE UNDER ELCL det pane under gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG ELCL DETAIL PANE RIGHT ELCL det pane right gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG ELCL DETAIL PANE HIDE ELCL det pane hide gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG ELCL LOCK ELCL lock co gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG ELCL TYPE NAMES ELCL tnames co gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG ELCL SHOW LOGICAL STRUCTURE ELCL var cntnt prvdr gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG ELCL COLLAPSE ALL ELCL collapseall gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG ELCL TERMINATE ELCL terminate co gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG ELCL MONITOR EXPRESSION ELCL monitorexpression tsk gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG ELCL REMOVE MEMORY ELCL removememory tsk gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG ELCL RESET MEMORY ELCL memoryreset tsk gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG ELCL COPY VIEW TO CLIPBOARD ELCL copyviewtoclipboard tsk gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG ELCL PRINT TOP VIEW TAB ELCL printview tsk gif NON NLS 1 Object declare Registry Image I DebugUI Constants IMG OBJS LAUNCH DEBUG OBJECT ldebug obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS LAUNCH RUN OBJECT lrun obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS LAUNCH RUN TERMINATED OBJECT terminatedlaunch obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS DEBUG TARGET OBJECT debugt obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS DEBUG TARGET SUSPENDED OBJECT debugts obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS DEBUG TARGET TERMINATED OBJECT debugtt obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS THREAD RUNNING OBJECT thread obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS THREAD SUSPENDED OBJECT threads obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS THREAD TERMINATED OBJECT threadt obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS STACKFRAME OBJECT stckframe obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS STACKFRAME RUNNING OBJECT stckframe running obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS VARIABLE OBJECT genericvariable obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS REGISTER OBJECT genericregister obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS REGISTER GROUP OBJECT genericreggroup obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS BREAKPOINT OBJECT brkp obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS BREAKPOINT DISABLED OBJECT brkpd obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS WATCHPOINT OBJECT readwrite obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS WATCHPOINT DISABLED OBJECT readwrite obj disabled gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS OS PROCESS OBJECT osprc obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS OS PROCESS TERMINATED OBJECT osprct obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS EXPRESSION OBJECT expression obj gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG OBJS INSTRUCTION POINTER TOP OBJECT inst ptr top gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG OBJS INSTRUCTION POINTER OBJECT inst ptr gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG OBJS ARRAY PARTITION OBJECT arraypartition obj gif NON NLS 1 declare Registry Image I DebugUI Constants IMG OBJS ENV VAR OBJECT envvar obj gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG OBJECT MEMORY CHANGED OBJECT memorychanged obj gif NON NLS 1 declare Registry Image I Internal DebugUI Constants IMG OBJECT MEMORY OBJECT memory obj gif NON NLS 1 tabs declare Registry Image I Internal DebugUI Constants IMG OBJS COMMON TAB OBJECT common tab gif NON NLS 1 declare Registry Image I Internal DebugUI Consta declareImages declareRegistryImage IDebugUIConstants IMG_ACT_DEBUG debug_exc declareRegistryImage IDebugUIConstants IMG_ACT_RUN run_exc declareRegistryImage IDebugUIConstants IMG_ACT_SYNCED declareRegistryImage IDebugUIConstants IMG_SKIP_BREAKPOINTS skip_brkp declareRegistryImage IDebugUIConstants IMG_LCL_CHANGE_VARIABLE_VALUE changevariablevalue_co declareRegistryImage IInternalDebugUIConstants IMG_DLCL_CHANGE_VARIABLE_VALUE changevariablevalue_co declareRegistryImage IInternalDebugUIConstants IMG_ELCL_CHANGE_VARIABLE_VALUE changevariablevalue_co declareRegistryImage IDebugUIConstants IMG_LCL_CONTENT_ASSIST metharg_obj declareRegistryImage IDebugUIConstants IMG_DLCL_CONTENT_ASSIST metharg_obj declareRegistryImage IDebugUIConstants IMG_ELCL_CONTENT_ASSIST metharg_obj declareRegistryImage IDebugUIConstants IMG_LCL_DETAIL_PANE toggledetailpane_co declareRegistryImage IDebugUIConstants IMG_LCL_DETAIL_PANE_UNDER det_pane_under declareRegistryImage IDebugUIConstants IMG_LCL_DETAIL_PANE_RIGHT det_pane_right declareRegistryImage IDebugUIConstants IMG_LCL_DETAIL_PANE_HIDE det_pane_hide declareRegistryImage IDebugUIConstants IMG_LCL_LOCK lock_co declareRegistryImage IDebugUIConstants IMG_LCL_TYPE_NAMES tnames_co declareRegistryImage IDebugUIConstants IMG_LCL_DISCONNECT disconnect_co declareRegistryImage IDebugUIConstants IMG_LCL_REMOVE_ALL rem_all_co declareRegistryImage IInternalDebugUIConstants IMG_LCL_SHOW_LOGICAL_STRUCTURE var_cntnt_prvdr declareRegistryImage IInternalDebugUIConstants IMG_LCL_COLLAPSE_ALL declareRegistryImage IInternalDebugUIConstants IMG_LCL_TERMINATE terminate_co declareRegistryImage IInternalDebugUIConstants IMG_LCL_RUN_TO_LINE runtoline_co declareRegistryImage IInternalDebugUIConstants IMG_LCL_MONITOR_EXPRESSION monitorexpression_tsk declareRegistryImage IInternalDebugUIConstants IMG_LCL_REMOVE_MEMORY removememory_tsk declareRegistryImage IInternalDebugUIConstants IMG_LCL_RESET_MEMORY memoryreset_tsk declareRegistryImage IInternalDebugUIConstants IMG_LCL_COPY_VIEW_TO_CLIPBOARD copyviewtoclipboard_tsk declareRegistryImage IInternalDebugUIConstants IMG_LCL_PRINT_TOP_VIEW_TAB printview_tsk declareRegistryImage IInternalDebugUIConstants IMG_DLCL_DETAIL_PANE toggledetailpane_co declareRegistryImage IInternalDebugUIConstants IMG_DLCL_DETAIL_PANE_UNDER det_pane_under declareRegistryImage IInternalDebugUIConstants IMG_DLCL_DETAIL_PANE_RIGHT det_pane_right declareRegistryImage IInternalDebugUIConstants IMG_DLCL_DETAIL_PANE_HIDE det_pane_hide declareRegistryImage IInternalDebugUIConstants IMG_DLCL_LOCK lock_co declareRegistryImage IInternalDebugUIConstants IMG_DLCL_TYPE_NAMES tnames_co declareRegistryImage IInternalDebugUIConstants IMG_DLCL_SHOW_LOGICAL_STRUCTURE var_cntnt_prvdr declareRegistryImage IInternalDebugUIConstants IMG_DLCL_COLLAPSE_ALL declareRegistryImage IInternalDebugUIConstants IMG_DLCL_TERMINATE terminate_co declareRegistryImage IInternalDebugUIConstants IMG_DLCL_REMOVE_ALL rem_all_co declareRegistryImage IInternalDebugUIConstants IMG_DLCL_RUN_TO_LINE runtoline_co declareRegistryImage IInternalDebugUIConstants IMG_DLCL_MONITOR_EXPRESSION monitorexpression_tsk declareRegistryImage IInternalDebugUIConstants IMG_DLCL_REMOVE_MEMORY removememory_tsk declareRegistryImage IInternalDebugUIConstants IMG_DLCL_RESET_MEMORY memoryreset_tsk declareRegistryImage IInternalDebugUIConstants IMG_DLCL_COPY_VIEW_TO_CLIPBOARD copyviewtoclipboard_tsk declareRegistryImage IInternalDebugUIConstants IMG_DLCL_PRINT_TOP_VIEW_TAB printview_tsk declareRegistryImage IInternalDebugUIConstants IMG_ELCL_DETAIL_PANE toggledetailpane_co declareRegistryImage IInternalDebugUIConstants IMG_ELCL_DETAIL_PANE_UNDER det_pane_under declareRegistryImage IInternalDebugUIConstants IMG_ELCL_DETAIL_PANE_RIGHT det_pane_right declareRegistryImage IInternalDebugUIConstants IMG_ELCL_DETAIL_PANE_HIDE det_pane_hide declareRegistryImage IInternalDebugUIConstants IMG_ELCL_LOCK lock_co declareRegistryImage IInternalDebugUIConstants IMG_ELCL_TYPE_NAMES tnames_co declareRegistryImage IInternalDebugUIConstants IMG_ELCL_SHOW_LOGICAL_STRUCTURE var_cntnt_prvdr declareRegistryImage IInternalDebugUIConstants IMG_ELCL_COLLAPSE_ALL declareRegistryImage IInternalDebugUIConstants IMG_ELCL_TERMINATE terminate_co declareRegistryImage IInternalDebugUIConstants IMG_ELCL_MONITOR_EXPRESSION monitorexpression_tsk declareRegistryImage IInternalDebugUIConstants IMG_ELCL_REMOVE_MEMORY removememory_tsk declareRegistryImage IInternalDebugUIConstants IMG_ELCL_RESET_MEMORY memoryreset_tsk declareRegistryImage IInternalDebugUIConstants IMG_ELCL_COPY_VIEW_TO_CLIPBOARD copyviewtoclipboard_tsk declareRegistryImage IInternalDebugUIConstants IMG_ELCL_PRINT_TOP_VIEW_TAB printview_tsk declareRegistryImage IDebugUIConstants IMG_OBJS_LAUNCH_DEBUG ldebug_obj declareRegistryImage IDebugUIConstants IMG_OBJS_LAUNCH_RUN lrun_obj declareRegistryImage IDebugUIConstants IMG_OBJS_LAUNCH_RUN_TERMINATED terminatedlaunch_obj declareRegistryImage IDebugUIConstants IMG_OBJS_DEBUG_TARGET debugt_obj declareRegistryImage IDebugUIConstants IMG_OBJS_DEBUG_TARGET_SUSPENDED debugts_obj declareRegistryImage IDebugUIConstants IMG_OBJS_DEBUG_TARGET_TERMINATED debugtt_obj declareRegistryImage IDebugUIConstants IMG_OBJS_THREAD_RUNNING thread_obj declareRegistryImage IDebugUIConstants IMG_OBJS_THREAD_SUSPENDED threads_obj declareRegistryImage IDebugUIConstants IMG_OBJS_THREAD_TERMINATED threadt_obj declareRegistryImage IDebugUIConstants IMG_OBJS_STACKFRAME stckframe_obj declareRegistryImage IDebugUIConstants IMG_OBJS_STACKFRAME_RUNNING stckframe_running_obj declareRegistryImage IDebugUIConstants IMG_OBJS_VARIABLE genericvariable_obj declareRegistryImage IDebugUIConstants IMG_OBJS_REGISTER genericregister_obj declareRegistryImage IDebugUIConstants IMG_OBJS_REGISTER_GROUP genericreggroup_obj declareRegistryImage IDebugUIConstants IMG_OBJS_BREAKPOINT brkp_obj declareRegistryImage IDebugUIConstants IMG_OBJS_BREAKPOINT_DISABLED brkpd_obj declareRegistryImage IDebugUIConstants IMG_OBJS_WATCHPOINT readwrite_obj declareRegistryImage IDebugUIConstants IMG_OBJS_WATCHPOINT_DISABLED readwrite_obj_disabled declareRegistryImage IDebugUIConstants IMG_OBJS_OS_PROCESS osprc_obj declareRegistryImage IDebugUIConstants IMG_OBJS_OS_PROCESS_TERMINATED osprct_obj declareRegistryImage IDebugUIConstants IMG_OBJS_EXPRESSION expression_obj declareRegistryImage IInternalDebugUIConstants IMG_OBJS_INSTRUCTION_POINTER_TOP inst_ptr_top declareRegistryImage IInternalDebugUIConstants IMG_OBJS_INSTRUCTION_POINTER inst_ptr declareRegistryImage IInternalDebugUIConstants IMG_OBJS_ARRAY_PARTITION arraypartition_obj declareRegistryImage IDebugUIConstants IMG_OBJS_ENV_VAR envvar_obj declareRegistryImage IInternalDebugUIConstants IMG_OBJECT_MEMORY_CHANGED memorychanged_obj declareRegistryImage IInternalDebugUIConstants IMG_OBJECT_MEMORY memory_obj declareRegistryImage IInternalDebugUIConstants IMG_OBJS_COMMON_TAB common_tab declareRegistryImage IInternalDebugUIConsta
Declare an Image in the registry table param key The key to use when registering the image param path The path where the image can be found This path is relative to where this plugin class is found i e typically the packages directory private final static void declare Registry Image String key String path Image Descriptor desc Image Descriptor get Missing Image Descriptor try desc Image Descriptor create FromURL make Icon FileURL path catch MalformedURL Exception me DebugUI Plugin log me image Registry put key desc image Descriptors put key desc  declareRegistryImage ImageDescriptor ImageDescriptor getMissingImageDescriptor ImageDescriptor createFromURL makeIconFileURL MalformedURLException DebugUIPlugin imageRegistry imageDescriptors
Returns the Image Registry public static Image Registry get Image Registry if image Registry null initialize Image Registry return image Registry  ImageRegistry ImageRegistry getImageRegistry imageRegistry initializeImageRegistry imageRegistry
Initialize the image registry by declaring all of the required graphics This involves creating J Face image descriptors describing how to create find the image should it be needed The image is not actually allocated until requested Prefix conventions Wizard Banners WIZBAN  Preference Banners PREF BAN  Property Page Banners PROPBAN  Color toolbar CTOOL  Enable toolbar ETOOL  Disable toolbar DTOOL  Local enabled toolbar ELCL  Local Disable toolbar DLCL  Object large OBJL  Object small OBJS  View VIEW  Product images PROD  Misc images MISC  Where are the images The images typically gifs are found in the same location as this plugin class This may mean the same package directory as the package holding this class The images are declared using this get Class to ensure they are looked up via this plugin class see org eclipse jface resource Image Registry public static Image Registry initialize Image Registry image Registry new Image Registry DebugUI Plugin get Standard Display image Descriptors new Hash Map 30 declare Images return image Registry  JFace WIZBAN_ PREF_BAN_ PROPBAN_ CTOOL_ ETOOL_ DTOOL_ ELCL_ DLCL_ OBJL_ OBJS_ VIEW_ PROD_ MISC_ getClass ImageRegistry ImageRegistry initializeImageRegistry imageRegistry ImageRegistry DebugUIPlugin getStandardDisplay imageDescriptors HashMap declareImages imageRegistry
Returns the code Image code identified by the given key or code null code if it does not exist public static Image get Image String key return get Image Registry get key  getImage getImageRegistry
Returns the code Image Descriptor code identified by the given key or code null code if it does not exist public static Image Descriptor get Image Descriptor String key if image Descriptors null initialize Image Registry return Image Descriptor image Descriptors get key  ImageDescriptor ImageDescriptor getImageDescriptor imageDescriptors initializeImageRegistry ImageDescriptor imageDescriptors
private static URL make Icon FileURL String icon Path throws MalformedURL Exception if ICON BASE URL null throw new MalformedURL Exception return new URL ICON BASE URL icon Path  makeIconFileURL iconPath MalformedURLException ICON_BASE_URL MalformedURLException ICON_BASE_URL iconPath

see org eclipse core runtime I Adapter Factory get Adapter Object Class public Object get Adapter Object obj Class adapter Type if adapter Type is Instance obj return obj if adapter Type I Persistable Element class if obj instanceof I Launch Configuration return new Persistable Launch Configuration Factory I Launch Configuration obj else if obj instanceof I Launch Configuration Type return new Persistable Launch Configuration Type Factory I Launch Configuration Type obj return null  IAdapterFactory getAdapter getAdapter adapterType adapterType isInstance adapterType IPersistableElement ILaunchConfiguration PersistableLaunchConfigurationFactory ILaunchConfiguration ILaunchConfigurationType PersistableLaunchConfigurationTypeFactory ILaunchConfigurationType
see org eclipse core runtime I Adapter Factory get Adapter List public Class get Adapter List return new Class I Persistable Element class  IAdapterFactory getAdapterList getAdapterList IPersistableElement

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private DebugUI Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE DebugUIMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

Returns whether the debug UI plug in is in trace mode return whether the debug UI plug in is in trace mode public boolean is Trace Mode return f Trace  isTraceMode fTrace
Logs the given message if in trace mode param String message to log public static void log Trace Message String message if get Default is Trace Mode I Status s new Status I Status WARNING I DebugUI Constants PLUGIN ID I DebugUI Constants INTERNAL ERROR message null get Default get Log log s  logTraceMessage getDefault isTraceMode IStatus IStatus IDebugUIConstants PLUGIN_ID IDebugUIConstants INTERNAL_ERROR getDefault getLog
Constructs the debug UI plugin public DebugUI Plugin super fg DebugUI Plugin this  DebugUIPlugin fgDebugUIPlugin
protected I Launch Manager get Launch Manager return Debug Plugin get Default get Launch Manager  ILaunchManager getLaunchManager DebugPlugin getDefault getLaunchManager
Returns the singleton instance of the debug plugin public static DebugUI Plugin get Default return fg DebugUI Plugin  DebugUIPlugin getDefault fgDebugUIPlugin
Convenience method which returns the unique identifier of this plugin public static String get Unique Identifier return PI DEBUG UI  getUniqueIdentifier PI_DEBUG_UI
public static I Debug Model Presentation get Model Presentation if fg Presentation null fg Presentation new Delegating Model Presentation return fg Presentation  IDebugModelPresentation getModelPresentation fgPresentation fgPresentation DelegatingModelPresentation fgPresentation
public Launch Configuration Manager get Launch Configuration Manager if f Launch Configuration Manager null f Launch Configuration Manager new Launch Configuration Manager return f Launch Configuration Manager  LaunchConfigurationManager getLaunchConfigurationManager fLaunchConfigurationManager fLaunchConfigurationManager LaunchConfigurationManager fLaunchConfigurationManager
public I Memory Block View Synchronizer get Memory Block View Synchronizer if f Mem Blk View Synchronizer null f Mem Blk View Synchronizer new Memory Block View Synchronizer return f Mem Blk View Synchronizer  IMemoryBlockViewSynchronizer getMemoryBlockViewSynchronizer fMemBlkViewSynchronizer fMemBlkViewSynchronizer MemoryBlockViewSynchronizer fMemBlkViewSynchronizer
Returns the currently active workbench window or code null code if none return the currently active workbench window or code null code public static I Workbench Window get Active Workbench Window return get Default get Workbench get Active Workbench Window  IWorkbenchWindow getActiveWorkbenchWindow getDefault getWorkbench getActiveWorkbenchWindow
Returns the currently active workbench window shell or code null code if none return the currently active workbench window shell or code null code public static Shell get Shell if get Active Workbench Window null return get Active Workbench Window get Shell return null  getShell getActiveWorkbenchWindow getActiveWorkbenchWindow getShell
Returns the default label provider for the debug UI public static I Label Provider get Default Label Provider if fg Default Label Provider null fg Default Label Provider new Default Label Provider return fg Default Label Provider  ILabelProvider getDefaultLabelProvider fgDefaultLabelProvider fgDefaultLabelProvider DefaultLabelProvider fgDefaultLabelProvider
Busy Indicator show While null new Runnable public void run try ret 0 element create Executable Extension class Attribute catch Core Exception e exc 0 e  BusyIndicator showWhile createExecutableExtension classAttribute CoreException
Creates an extension If the extension plugin has not been loaded a busy cursor will be activated during the duration of the load param element the config element defining the extension param class Attribute the name of the attribute carrying the class return the extension object public static Object create Extension final I Configuration Element element final String class Attribute throws Core Exception If plugin has been loaded create extension Otherwise show busy cursor then create extension Bundle bundle Platform get Bundle element get Declaring Extension get Namespace if bundle get State Bundle ACTIVE return element create Executable Extension class Attribute final Object ret new Object 1 final Core Exception exc new Core Exception 1 Busy Indicator show While null new Runnable public void run try ret 0 element create Executable Extension class Attribute catch Core Exception e exc 0 e if exc 0 null throw exc 0 return ret 0  classAttribute createExtension IConfigurationElement classAttribute CoreException getBundle getDeclaringExtension getNamespace getState createExecutableExtension classAttribute CoreException CoreException BusyIndicator showWhile createExecutableExtension classAttribute CoreException
protected Image Registry create Image Registry return Debug Plugin Images initialize Image Registry  ImageRegistry createImageRegistry DebugPluginImages initializeImageRegistry
public void stop Bundle Context context throws Exception try if f Perspective Manager null f Perspective Manager shutdown if f Launch Configuration Manager null f Launch Configuration Manager shutdown if f Console Document Manager null f Console Document Manager shutdown if f Step Filter Manager null f Step Filter Manager shutdown Color Manager get Default dispose if fg Presentation null fg Presentation dispose if f Mem Blk View Synchronizer null f Mem Blk View Synchronizer shutdown finally super stop context  BundleContext fPerspectiveManager fPerspectiveManager fLaunchConfigurationManager fLaunchConfigurationManager fConsoleDocumentManager fConsoleDocumentManager fStepFilterManager fStepFilterManager ColorManager getDefault fgPresentation fgPresentation fMemBlkViewSynchronizer fMemBlkViewSynchronizer
get Standard Display async Exec new Runnable public void run initialize the selected resource manager Selected Resource Manager get Default  getStandardDisplay asyncExec SelectedResourceManager getDefault
see AbstractUI Plugin startup public void start Bundle Context context throws Exception super start context Listen to launches to lazily create launch processors Debug Plugin get Default get Launch Manager add Launch Listener this I Adapter Manager manager Platform get Adapter Manager DebugUI Properties Adapter Factory properties Factory new DebugUI Properties Adapter Factory manager register Adapters properties Factory I Debug Element class manager register Adapters properties Factory I Process class DebugUI Adapter Factory ui Factory new DebugUI Adapter Factory manager register Adapters ui Factory I Launch Configuration class manager register Adapters ui Factory I Launch Configuration Type class get Standard Display async Exec new Runnable public void run initialize the selected resource manager Selected Resource Manager get Default  AbstractUIPlugin BundleContext DebugPlugin getDefault getLaunchManager addLaunchListener IAdapterManager getAdapterManager DebugUIPropertiesAdapterFactory propertiesFactory DebugUIPropertiesAdapterFactory registerAdapters propertiesFactory IDebugElement registerAdapters propertiesFactory IProcess DebugUIAdapterFactory uiFactory DebugUIAdapterFactory registerAdapters uiFactory ILaunchConfiguration registerAdapters uiFactory ILaunchConfigurationType getStandardDisplay asyncExec SelectedResourceManager getDefault
see AbstractUI Plugin initialize Default Preferences protected void initialize Default Preferences I Preference Store prefs Debug Preference Page prefs set Default I DebugUI Constants PREF BUILD BEFORE LAUNCH true prefs set Default I Internal DebugUI Constants PREF SAVE DIRTY EDITORS BEFORE LAUNCH Message Dialog With Toggle PROMPT prefs set Default I DebugUI Constants PREF SHOW DEBUG PERSPECTIVE DEFAULT I DebugUI Constants ID DEBUG PERSPECTIVE prefs set Default I DebugUI Constants PREF SHOW RUN PERSPECTIVE DEFAULT I DebugUI Constants PERSPECTIVE NONE prefs set Default I DebugUI Constants PREF AUTO REMOVE OLD LAUNCHES true prefs set Default I DebugUI Constants PREF ACTIVATE WORKBENCH true prefs set Default I Internal DebugUI Constants PREF ACTIVATE DEBUG VIEW true prefs set Default I Internal DebugUI Constants PREF SWITCH TO PERSPECTIVE Message Dialog With Toggle NEVER prefs set Default I Internal DebugUI Constants PREF SWITCH PERSPECTIVE ON SUSPEND Message Dialog With Toggle PROMPT prefs set Default I Internal DebugUI Constants PREF WAIT FOR BUILD Message Dialog With Toggle ALWAYS prefs set Default I DebugUI Constants PREF REUSE EDITOR true prefs set Default I DebugUI Constants PREF SKIP BREAKPOINTS DURING RUN TO LINE false prefs set Default I Internal DebugUI Constants PREF RELAUNCH IN DEBUG MODE Message Dialog With Toggle NEVER prefs set Default I Internal DebugUI Constants PREF CONTINUE WITH COMPILE ERROR Message Dialog With Toggle PROMPT prefs set Default I Internal DebugUI Constants PREF CONSOLE SCROLL LOCK false View Management preference page prefs set Default I DebugUI Constants PREF MANAGE VIEW PERSPECTIVES I DebugUI Constants ID DEBUG PERSPECTIVE prefs set Default I Internal DebugUI Constants PREF TRACK VIEWS true Console Preference Page prefs set Default I Debug Preference Constants CONSOLE WRAP false prefs set Default I Debug Preference Constants CONSOLE WIDTH 80 prefs set Default I Debug Preference Constants CONSOLE OPEN ON OUT true prefs set Default I Debug Preference Constants CONSOLE OPEN ON ERR true prefs set Default I Debug Preference Constants CONSOLE LIMIT CONSOLE OUTPUT true prefs set Default I Debug Preference Constants CONSOLE LOW WATER MARK 80000 prefs set Default I Debug Preference Constants CONSOLE HIGH WATER MARK 100000 prefs set Default I Debug Preference Constants CONSOLE TAB WIDTH 8 Preference Converter set Default prefs I Debug Preference Constants CONSOLE SYS OUT COLOR new RGB 0 0 255 Preference Converter set Default prefs I Debug Preference Constants CONSOLE SYS IN COLOR new RGB 0 200 125 Preference Converter set Default prefs I Debug Preference Constants CONSOLE SYS ERR COLOR new RGB 255 0 0 Preference Converter set Default prefs I Debug Preference Constants MEMORY VIEW UNBUFFERED LINE COLOR new RGB 114 119 129 Launch History Preference Page prefs set Default I DebugUI Constants PREF MAX HISTORY SIZE 10 Variable Views Preference Page prefs set Default I Debug Preference Constants VARIABLES DETAIL PANE ORIENTATION I Debug Preference Constants VARIABLES DETAIL PANE UNDERNEATH Preference Converter set Default prefs I Debug Preference Constants CHANGED VARIABLE COLOR new RGB 255 0 0 prefs set Default I Debug Preference Constants PREF DETAIL PANE WORD WRAP false Registers View prefs set Default I Debug Preference Constants REGISTERS DETAIL PANE ORIENTATION I Debug Preference Constants VARIABLES DETAIL PANE UNDERNEATH Variable Expression view default settings prefs set Default I DebugUI Constants ID VARIABLE VIEW org eclipse debug ui Show Detail Pane Action true NON NLS 1 prefs set Default I DebugUI Constants ID EXPRESSION VIEW org eclipse debug ui Show Detail Pane Action true NON NLS 1 prefs set Default I DebugUI Constants ID VARIABLE VIEW org eclipse debug ui Show Type Names Action false NON NLS 1 prefs set Default I DebugUI Constants ID EXPRESSION VIEW org eclipse debug ui Show Type Names Action false NON NLS 1 Step filter preferences prefs set Default I Internal DebugUI Constants PREF USE STEP FILTERS false set default for column size preference prefs set Default I Debug Preference Constants PREF COLUMN SIZE I Debug Preference Constants PREF COLUMN SIZE DEFAULT  AbstractUIPlugin initializeDefaultPreferences initializeDefaultPreferences IPreferenceStore PreferencePage setDefault IDebugUIConstants PREF_BUILD_BEFORE_LAUNCH setDefault IInternalDebugUIConstants PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH MessageDialogWithToggle setDefault IDebugUIConstants PREF_SHOW_DEBUG_PERSPECTIVE_DEFAULT IDebugUIConstants ID_DEBUG_PERSPECTIVE setDefault IDebugUIConstants PREF_SHOW_RUN_PERSPECTIVE_DEFAULT IDebugUIConstants PERSPECTIVE_NONE setDefault IDebugUIConstants PREF_AUTO_REMOVE_OLD_LAUNCHES setDefault IDebugUIConstants PREF_ACTIVATE_WORKBENCH setDefault IInternalDebugUIConstants PREF_ACTIVATE_DEBUG_VIEW setDefault IInternalDebugUIConstants PREF_SWITCH_TO_PERSPECTIVE MessageDialogWithToggle setDefault IInternalDebugUIConstants PREF_SWITCH_PERSPECTIVE_ON_SUSPEND MessageDialogWithToggle setDefault IInternalDebugUIConstants PREF_WAIT_FOR_BUILD MessageDialogWithToggle setDefault IDebugUIConstants PREF_REUSE_EDITOR setDefault IDebugUIConstants PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE setDefault IInternalDebugUIConstants PREF_RELAUNCH_IN_DEBUG_MODE MessageDialogWithToggle setDefault IInternalDebugUIConstants PREF_CONTINUE_WITH_COMPILE_ERROR MessageDialogWithToggle setDefault IInternalDebugUIConstants PREF_CONSOLE_SCROLL_LOCK setDefault IDebugUIConstants PREF_MANAGE_VIEW_PERSPECTIVES IDebugUIConstants ID_DEBUG_PERSPECTIVE setDefault IInternalDebugUIConstants PREF_TRACK_VIEWS ConsolePreferencePage setDefault IDebugPreferenceConstants CONSOLE_WRAP setDefault IDebugPreferenceConstants CONSOLE_WIDTH setDefault IDebugPreferenceConstants CONSOLE_OPEN_ON_OUT setDefault IDebugPreferenceConstants CONSOLE_OPEN_ON_ERR setDefault IDebugPreferenceConstants CONSOLE_LIMIT_CONSOLE_OUTPUT setDefault IDebugPreferenceConstants CONSOLE_LOW_WATER_MARK setDefault IDebugPreferenceConstants CONSOLE_HIGH_WATER_MARK setDefault IDebugPreferenceConstants CONSOLE_TAB_WIDTH PreferenceConverter setDefault IDebugPreferenceConstants CONSOLE_SYS_OUT_COLOR PreferenceConverter setDefault IDebugPreferenceConstants CONSOLE_SYS_IN_COLOR PreferenceConverter setDefault IDebugPreferenceConstants CONSOLE_SYS_ERR_COLOR PreferenceConverter setDefault IDebugPreferenceConstants MEMORY_VIEW_UNBUFFERED_LINE_COLOR LaunchHistoryPreferencePage setDefault IDebugUIConstants PREF_MAX_HISTORY_SIZE VariableViewsPreferencePage setDefault IDebugPreferenceConstants VARIABLES_DETAIL_PANE_ORIENTATION IDebugPreferenceConstants VARIABLES_DETAIL_PANE_UNDERNEATH PreferenceConverter setDefault IDebugPreferenceConstants CHANGED_VARIABLE_COLOR setDefault IDebugPreferenceConstants PREF_DETAIL_PANE_WORD_WRAP setDefault IDebugPreferenceConstants REGISTERS_DETAIL_PANE_ORIENTATION IDebugPreferenceConstants VARIABLES_DETAIL_PANE_UNDERNEATH setDefault IDebugUIConstants ID_VARIABLE_VIEW ShowDetailPaneAction setDefault IDebugUIConstants ID_EXPRESSION_VIEW ShowDetailPaneAction setDefault IDebugUIConstants ID_VARIABLE_VIEW ShowTypeNamesAction setDefault IDebugUIConstants ID_EXPRESSION_VIEW ShowTypeNamesAction setDefault IInternalDebugUIConstants PREF_USE_STEP_FILTERS setDefault IDebugPreferenceConstants PREF_COLUMN_SIZE IDebugPreferenceConstants PREF_COLUMN_SIZE_DEFAULT
protected I Process get Process From Input Object input I Process process Input null if input instanceof I Process process Input I Process input else if input instanceof I Launch I Debug Target target I Launch input get Debug Target if target null process Input target get Process else I Process processes I Launch input get Processes if processes null processes length 0 process Input processes 0 else if input instanceof I Debug Element process Input I Debug Element input get Debug Target get Process return process Input  IProcess getProcessFromInput IProcess processInput IProcess processInput IProcess ILaunch IDebugTarget ILaunch getDebugTarget processInput getProcess IProcess ILaunch getProcesses processInput IDebugElement processInput IDebugElement getDebugTarget getProcess processInput
Utility method with conventions public static void error Dialog Shell shell String title String message I Status s if the message resource string and the I Status message are the same don t show both in the dialog if s null message equals s get Message message null Error Dialog open Error shell title message s  errorDialog IStatus IStatus getMessage ErrorDialog openError
Utility method with conventions public static void error Dialog Shell shell String title String message Throwable t I Status status if t instanceof Core Exception status Core Exception t get Status if the message resource string and the I Status message are the same don t show both in the dialog if status null message equals status get Message message null else status new Status I Status ERROR get Unique Identifier I DebugUI Constants INTERNAL ERROR Error within Debug UI t NON NLS 1 log status Error Dialog open Error shell title message status  errorDialog IStatus CoreException CoreException getStatus IStatus getMessage IStatus getUniqueIdentifier IDebugUIConstants INTERNAL_ERROR ErrorDialog openError
Logs the specified status with this plug in s log param status status to log public static void log I Status status get Default get Log log status  IStatus getDefault getLog
Logs the specified throwable with this plug in s log param t throwable to log public static void log Throwable t log new Error Status Error logged from Debug UI t NON NLS 1  newErrorStatus
Logs the given message if in debug mode param String message to log public static void log Debug Message String message if get Default is Debugging log Error Message message  logDebugMessage getDefault isDebugging logErrorMessage
Logs an internal error with the specified message param message the error message to log public static void log Error Message String message this message is intentionally not internationalized as an exception may be due to the resource bundle itself log new Error Status Internal message logged from Debug UI message null NON NLS 1  logErrorMessage newErrorStatus
Returns a new error status for this plugin with the given message param message the message to be included in the status param exception the exception to be included in the status or code null code if none return a new error status public static I Status new Error Status String message Throwable exception return new Status I Status ERROR get Unique Identifier I DebugUI Constants INTERNAL ERROR message exception  IStatus newErrorStatus IStatus getUniqueIdentifier IDebugUIConstants INTERNAL_ERROR
Save all dirty editors in the workbench Returns whether the operation succeeded return whether all saving was completed protected static boolean save All Editors boolean confirm if get Active Workbench Window null return false return PlatformUI get Workbench save All Editors confirm  saveAllEditors getActiveWorkbenchWindow getWorkbench saveAllEditors
Save build the workspace according to the user specified preferences Return code false code if any problems were encountered code true code otherwise public static boolean save And Build boolean status true String save Dirty get Default get Preference Store get String I Internal DebugUI Constants PREF SAVE DIRTY EDITORS BEFORE LAUNCH boolean build Before Launch get Default get Preference Store get Boolean I DebugUI Constants PREF BUILD BEFORE LAUNCH If we re ignoring dirty editors check if we need to build if save Dirty equals Message Dialog With Toggle NEVER if build Before Launch return do Build else status save All Editors save Dirty equals Message Dialog With Toggle PROMPT if status build Before Launch status do Build return status  saveAndBuild saveDirty getDefault getPreferenceStore getString IInternalDebugUIConstants PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH buildBeforeLaunch getDefault getPreferenceStore getBoolean IDebugUIConstants PREF_BUILD_BEFORE_LAUNCH saveDirty MessageDialogWithToggle buildBeforeLaunch doBuild saveAllEditors saveDirty MessageDialogWithToggle buildBeforeLaunch doBuild
PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try Resources Plugin get Workspace build Incremental Project Builder INCREMENTAL BUILD monitor catch Core Exception e throw new Invocation Target Exception e  getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException ResourcesPlugin getWorkspace IncrementalProjectBuilder INCREMENTAL_BUILD CoreException InvocationTargetException
private static boolean do Build try PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try Resources Plugin get Workspace build Incremental Project Builder INCREMENTAL BUILD monitor catch Core Exception e throw new Invocation Target Exception e catch Interrupted Exception e cancelled by user return false catch Invocation Target Exception e String title DebugUI Messages get String DebugUI Plugin Run Debug 1 NON NLS 1 String message DebugUI Messages get String DebugUI Plugin Build error  Check log for details  2 NON NLS 1 Throwable t e get Target Exception error Dialog get Shell title message t return false return true  doBuild getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException ResourcesPlugin getWorkspace IncrementalProjectBuilder INCREMENTAL_BUILD CoreException InvocationTargetException InterruptedException InvocationTargetException DebugUIMessages getString DebugUIPlugin Debug_1 DebugUIMessages getString DebugUIPlugin Build_error _Check_log_for_details _2 getTargetException errorDialog getShell
Returns the standard display to be used The method first checks if the thread calling this method has an associated display If so this display is returned Otherwise the method returns the default display public static Display get Standard Display Display display Display get Current if display null display Display get Default return display  getStandardDisplay getCurrent getDefault
Returns the a color based on the type of output Valid types li CONSOLE SYS OUT RGB li li CONSOLE SYS ERR RGB li li CONSOLE SYS IN RGB li li CHANGED VARIABLE RGB li public static Color get Preference Color String type return Color Manager get Default get Color Preference Converter get Color get Default get Preference Store type  CONSOLE_SYS_OUT_RGB CONSOLE_SYS_ERR_RGB CONSOLE_SYS_IN_RGB CHANGED_VARIABLE_RGB getPreferenceColor ColorManager getDefault getColor PreferenceConverter getColor getDefault getPreferenceStore
Returns the console document manager The manager will be created lazily on the first access return Console Document Manager public Console Document Manager get Console Document Manager if f Console Document Manager null f Console Document Manager new Console Document Manager return f Console Document Manager  ConsoleDocumentManager ConsoleDocumentManager getConsoleDocumentManager fConsoleDocumentManager fConsoleDocumentManager ConsoleDocumentManager fConsoleDocumentManager
Serializes a XML document into a string encoded in UTF8 format with platform line separators param doc document to serialize return the document as a string throws Transformer Exception if an unrecoverable error occurs during the serialization throws IO Exception if the encoding attempted to be used is not supported public static String serialize Document Document doc throws Transformer Exception IO Exception Byte Array Output Stream s new Byte Array Output Stream Transformer Factory factory Transformer Factory new Instance Transformer transformer factory new Transformer transformer set Output Property Output Keys METHOD xml NON NLS 1 transformer set Output Property Output Keys INDENT yes NON NLS 1 DOM Source source new DOM Source doc Stream Result output Target new Stream Result s transformer transform source output Target return s to String UTF8 NON NLS 1  TransformerException IOException serializeDocument TransformerException IOException ByteArrayOutputStream ByteArrayOutputStream TransformerFactory TransformerFactory newInstance newTransformer setOutputProperty OutputKeys setOutputProperty OutputKeys DOMSource DOMSource StreamResult outputTarget StreamResult outputTarget toString
Returns a Document that can be used to build a DOM tree return the Document throws Parser Configuration Exception if an exception occurs creating the document builder since 3 0 public static Document get Document throws Parser Configuration Exception Document Builder Factory dfactory Document Builder Factory new Instance Document Builder doc Builder dfactory new Document Builder Document doc doc Builder new Document return doc  ParserConfigurationException getDocument ParserConfigurationException DocumentBuilderFactory DocumentBuilderFactory newInstance DocumentBuilder docBuilder newDocumentBuilder docBuilder newDocument
Determines and returns the selection in the specified window If nothing is actually selected look for an active editor public static I Structured Selection resolve Selection I Workbench Window window if window null return null I Selection selection window get Selection Service get Selection if selection null selection is Empty selection instanceof I Structured Selection there is no obvious selection go fishing selection null I Workbench Page page window get Active Page if page null workspace is closed return null first see if there is an active editor and try its input element I Editor Part editor page get Active Editor Object element null if editor null element editor get Editor Input if selection null element null selection new Structured Selection element return I Structured Selection selection  IStructuredSelection resolveSelection IWorkbenchWindow ISelection getSelectionService getSelection isEmpty IStructuredSelection IWorkbenchPage getActivePage IEditorPart getActiveEditor getEditorInput StructuredSelection IStructuredSelection
When the first launch is added instantiate launch processors and stop listening to launch notifications p Launch processors are ul li console document manager li li perspective manager li ul p see org eclipse debug core I Launch Listener launch Added org eclipse debug core I Launch public void launch Added I Launch launch Debug Plugin get Default get Launch Manager remove Launch Listener this get Console Document Manager startup if f Perspective Manager null Perspective Manager manager get Perspective Manager manager launch Added launch if f Step Filter Manager null get Step Filter Manager launch Added launch get Launch Configuration Manager startup  ILaunchListener launchAdded ILaunch launchAdded ILaunch DebugPlugin getDefault getLaunchManager removeLaunchListener getConsoleDocumentManager fPerspectiveManager PerspectiveManager getPerspectiveManager launchAdded fStepFilterManager getStepFilterManager launchAdded getLaunchConfigurationManager
Returns the persepective manager instantiating it if required return public Perspective Manager get Perspective Manager if f Perspective Manager null f Perspective Manager new Perspective Manager f Perspective Manager startup return f Perspective Manager  PerspectiveManager getPerspectiveManager fPerspectiveManager fPerspectiveManager PerspectiveManager fPerspectiveManager fPerspectiveManager
Returns the singleton step filter manager return the step filter manager public Step Filter Manager get Step Filter Manager if f Step Filter Manager null f Step Filter Manager new Step Filter Manager return f Step Filter Manager  StepFilterManager getStepFilterManager fStepFilterManager fStepFilterManager StepFilterManager fStepFilterManager
see org eclipse debug core I Launch Listener launch Changed org eclipse debug core I Launch public void launch Changed I Launch launch  ILaunchListener launchChanged ILaunch launchChanged ILaunch
see org eclipse debug core I Launch Listener launch Removed org eclipse debug core I Launch public void launch Removed I Launch launch  ILaunchListener launchRemoved ILaunch launchRemoved ILaunch
Save dirty editors before launching according to preferences return whether to proceed with launch public static boolean pre Launch Save String save Dirty get Default get Preference Store get String I Internal DebugUI Constants PREF SAVE DIRTY EDITORS BEFORE LAUNCH if save Dirty equals Message Dialog With Toggle NEVER return true return save All Editors save Dirty equals Message Dialog With Toggle PROMPT  preLaunchSave saveDirty getDefault getPreferenceStore getString IInternalDebugUIConstants PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH saveDirty MessageDialogWithToggle saveAllEditors saveDirty MessageDialogWithToggle
Builds the workspace according to preferences and launches the given launch configuration in the specified mode May return null if autobuild is in process and user cancels the launch param configuration the configuration to launch param mode launch mode run or debug param monitor progress monitor exception Core Exception if an exception occurs while building or launching return resulting launch or code null code if user cancels public static I Launch build And Launch I Launch Configuration configuration String mode I Progress Monitor monitor throws Core Exception boolean build Before Launch get Default get Preference Store get Boolean I DebugUI Constants PREF BUILD BEFORE LAUNCH I Progress Monitor sub Monitor monitor String message Message Format format 0 new String configuration get Name NON NLS 1 if build Before Launch monitor begin Task message 200 return configuration launch mode monitor true sub Monitor monitor sub Monitor begin Task message 100 return configuration launch mode sub Monitor  CoreException ILaunch buildAndLaunch ILaunchConfiguration IProgressMonitor CoreException buildBeforeLaunch getDefault getPreferenceStore getBoolean IDebugUIConstants PREF_BUILD_BEFORE_LAUNCH IProgressMonitor subMonitor MessageFormat getName buildBeforeLaunch beginTask subMonitor subMonitor beginTask subMonitor
final I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try job Manager join Resources Plugin FAMILY AUTO BUILD monitor job Manager join Resources Plugin FAMILY MANUAL BUILD monitor catch Interrupted Exception e continue if monitor is Canceled try build And Launch configuration mode monitor catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException jobManager ResourcesPlugin FAMILY_AUTO_BUILD jobManager ResourcesPlugin FAMILY_MANUAL_BUILD InterruptedException isCanceled buildAndLaunch CoreException InvocationTargetException
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try build And Launch configuration mode monitor catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException buildAndLaunch CoreException InvocationTargetException
Saves and builds the workspace according to current preference settings and launches the given launch configuration in the specified mode in the foreground with a progress dialog Reports any exceptions that occur in an error dialog param configuration the configuration to launch param mode launch mode since 3 0 public static void launch In Foreground final I Launch Configuration configuration final String mode if DebugUI Plugin pre Launch Save return final I Job Manager job Manager Platform get Job Manager I Preference Store store DebugUI Plugin get Default get Preference Store boolean wait false if job Manager find Resources Plugin FAMILY AUTO BUILD length 0 job Manager find Resources Plugin FAMILY MANUAL BUILD length 0 String wait For Build store get String I Internal DebugUI Constants PREF WAIT FOR BUILD if wait For Build equals Message Dialog With Toggle PROMPT Message Dialog With Toggle dialog Message Dialog With Toggle open Yes No Cancel Question get Shell DebugUI Messages get String DebugUI Plugin 23 DebugUI Messages get String DebugUI Plugin 24 null false store I Internal DebugUI Constants PREF WAIT FOR BUILD NON NLS 1 NON NLS 2 switch dialog get Return Code case I Dialog Constants CANCEL ID return case I Dialog Constants YES ID wait false break case I Dialog Constants NO ID wait true break else if wait For Build equals Message Dialog With Toggle ALWAYS wait true if wait I Workbench workbench DebugUI Plugin get Default get Workbench I Progress Service progress Service workbench get Progress Service final I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try job Manager join Resources Plugin FAMILY AUTO BUILD monitor job Manager join Resources Plugin FAMILY MANUAL BUILD monitor catch Interrupted Exception e continue if monitor is Canceled try build And Launch configuration mode monitor catch Core Exception e throw new Invocation Target Exception e try progress Service busy Cursor While runnable catch Interrupted Exception e catch Invocation Target Exception e2 handle Invocation Target Exception e2 configuration mode else I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try build And Launch configuration mode monitor catch Core Exception e throw new Invocation Target Exception e try PlatformUI get Workbench get Progress Service busy Cursor While runnable catch Invocation Target Exception e handle Invocation Target Exception e configuration mode catch Interrupted Exception e  launchInForeground ILaunchConfiguration DebugUIPlugin preLaunchSave IJobManager jobManager getJobManager IPreferenceStore DebugUIPlugin getDefault getPreferenceStore jobManager ResourcesPlugin FAMILY_AUTO_BUILD jobManager ResourcesPlugin FAMILY_MANUAL_BUILD waitForBuild getString IInternalDebugUIConstants PREF_WAIT_FOR_BUILD waitForBuild MessageDialogWithToggle MessageDialogWithToggle MessageDialogWithToggle openYesNoCancelQuestion getShell DebugUIMessages getString DebugUIPlugin DebugUIMessages getString DebugUIPlugin IInternalDebugUIConstants PREF_WAIT_FOR_BUILD getReturnCode IDialogConstants CANCEL_ID IDialogConstants YES_ID IDialogConstants NO_ID waitForBuild MessageDialogWithToggle IWorkbench DebugUIPlugin getDefault getWorkbench IProgressService progressService getProgressService IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException jobManager ResourcesPlugin FAMILY_AUTO_BUILD jobManager ResourcesPlugin FAMILY_MANUAL_BUILD InterruptedException isCanceled buildAndLaunch CoreException InvocationTargetException progressService busyCursorWhile InterruptedException InvocationTargetException handleInvocationTargetException IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException buildAndLaunch CoreException InvocationTargetException getWorkbench getProgressService busyCursorWhile InvocationTargetException handleInvocationTargetException InterruptedException
private static void handle Invocation Target Exception Invocation Target Exception e I Launch Configuration configuration String mode Throwable target Exception e get Target Exception Throwable t e if target Exception instanceof Core Exception t target Exception if t instanceof Core Exception Core Exception ce Core Exception t I Status Handler handler Debug Plugin get Default get Status Handler ce get Status if handler null I Launch Group group DebugUI Tools get Launch Group configuration mode if group null DebugUI Tools open Launch Configuration Dialog On Group DebugUI Plugin get Shell new Structured Selection configuration group get Identifier ce get Status return DebugUI Plugin error Dialog DebugUI Plugin get Shell DebugUI Messages get String DebugUI Tools Error 1 DebugUI Messages get String DebugUI Tools Exception occurred during launch 2 t NON NLS 1 NON NLS 2  handleInvocationTargetException InvocationTargetException ILaunchConfiguration targetException getTargetException targetException CoreException targetException CoreException CoreException CoreException IStatusHandler DebugPlugin getDefault getStatusHandler getStatus ILaunchGroup DebugUITools getLaunchGroup DebugUITools openLaunchConfigurationDialogOnGroup DebugUIPlugin getShell StructuredSelection getIdentifier getStatus DebugUIPlugin errorDialog DebugUIPlugin getShell DebugUIMessages getString DebugUITools Error_1 DebugUIMessages getString DebugUITools Exception_occurred_during_launch_2
Runnable r new Runnable public void run DebugUI Tools open Launch Configuration Dialog On Group DebugUI Plugin get Shell new Structured Selection configuration group get Identifier status  DebugUITools openLaunchConfigurationDialogOnGroup DebugUIPlugin getShell StructuredSelection getIdentifier
Job job new Job DebugUI Messages get String DebugUI Tools 3 NON NLS 1 public I Status run I Progress Monitor monitor try if wait In Job try job Manager join Resources Plugin FAMILY AUTO BUILD monitor job Manager join Resources Plugin FAMILY MANUAL BUILD monitor catch Interrupted Exception e just continue if monitor is Canceled build And Launch configuration mode monitor catch Core Exception e final I Status status e get Status I Status Handler handler Debug Plugin get Default get Status Handler status if handler null return status final I Launch Group group DebugUI Tools get Launch Group configuration mode if group null return status Runnable r new Runnable public void run DebugUI Tools open Launch Configuration Dialog On Group DebugUI Plugin get Shell new Structured Selection configuration group get Identifier status DebugUI Plugin get Standard Display async Exec r return Status OK STATUS  DebugUIMessages getString DebugUITools IStatus IProgressMonitor waitInJob jobManager ResourcesPlugin FAMILY_AUTO_BUILD jobManager ResourcesPlugin FAMILY_MANUAL_BUILD InterruptedException isCanceled buildAndLaunch CoreException IStatus getStatus IStatusHandler DebugPlugin getDefault getStatusHandler ILaunchGroup DebugUITools getLaunchGroup DebugUITools openLaunchConfigurationDialogOnGroup DebugUIPlugin getShell StructuredSelection getIdentifier DebugUIPlugin getStandardDisplay asyncExec OK_STATUS
Saves and builds the workspace according to current preference settings and launches the given launch configuration in the specified mode in a background Job with progress reported via the Job Exceptions are reported in the Progress view param configuration the configuration to launch param mode launch mode since 3 0 public static void launch In Background final I Launch Configuration configuration final String mode if DebugUI Plugin pre Launch Save return final I Job Manager job Manager Platform get Job Manager I Preference Store store DebugUI Plugin get Default get Preference Store boolean wait job Manager find Resources Plugin FAMILY AUTO BUILD length 0 job Manager find Resources Plugin FAMILY MANUAL BUILD length 0 String wait Pref store get String I Internal DebugUI Constants PREF WAIT FOR BUILD if wait if there are build jobs running do we wait or not if wait Pref equals Message Dialog With Toggle PROMPT Message Dialog With Toggle dialog Message Dialog With Toggle open Yes No Cancel Question get Shell DebugUI Messages get String DebugUI Plugin 23 DebugUI Messages get String DebugUI Plugin 24 null false store I Internal DebugUI Constants PREF WAIT FOR BUILD NON NLS 1 NON NLS 2 switch dialog get Return Code case I Dialog Constants CANCEL ID return case I Dialog Constants YES ID wait true break case I Dialog Constants NO ID wait false break else wait wait Pref equals Message Dialog With Toggle ALWAYS final boolean wait In Job wait Job job new Job DebugUI Messages get String DebugUI Tools 3 NON NLS 1 public I Status run I Progress Monitor monitor try if wait In Job try job Manager join Resources Plugin FAMILY AUTO BUILD monitor job Manager join Resources Plugin FAMILY MANUAL BUILD monitor catch Interrupted Exception e just continue if monitor is Canceled build And Launch configuration mode monitor catch Core Exception e final I Status status e get Status I Status Handler handler Debug Plugin get Default get Status Handler status if handler null return status final I Launch Group group DebugUI Tools get Launch Group configuration mode if group null return status Runnable r new Runnable public void run DebugUI Tools open Launch Configuration Dialog On Group DebugUI Plugin get Shell new Structured Selection configuration group get Identifier status DebugUI Plugin get Standard Display async Exec r return Status OK STATUS I Workbench workbench DebugUI Plugin get Default get Workbench I Progress Service progress Service workbench get Progress Service job set Priority Job INTERACTIVE job set Name DebugUI Messages get String DebugUI Tools 8 NON NLS 1 if wait progress Service show In Dialog workbench get Active Workbench Window get Shell job job schedule  launchInBackground ILaunchConfiguration DebugUIPlugin preLaunchSave IJobManager jobManager getJobManager IPreferenceStore DebugUIPlugin getDefault getPreferenceStore jobManager ResourcesPlugin FAMILY_AUTO_BUILD jobManager ResourcesPlugin FAMILY_MANUAL_BUILD waitPref getString IInternalDebugUIConstants PREF_WAIT_FOR_BUILD waitPref MessageDialogWithToggle MessageDialogWithToggle MessageDialogWithToggle openYesNoCancelQuestion getShell DebugUIMessages getString DebugUIPlugin DebugUIMessages getString DebugUIPlugin IInternalDebugUIConstants PREF_WAIT_FOR_BUILD getReturnCode IDialogConstants CANCEL_ID IDialogConstants YES_ID IDialogConstants NO_ID waitPref MessageDialogWithToggle waitInJob DebugUIMessages getString DebugUITools IStatus IProgressMonitor waitInJob jobManager ResourcesPlugin FAMILY_AUTO_BUILD jobManager ResourcesPlugin FAMILY_MANUAL_BUILD InterruptedException isCanceled buildAndLaunch CoreException IStatus getStatus IStatusHandler DebugPlugin getDefault getStatusHandler ILaunchGroup DebugUITools getLaunchGroup DebugUITools openLaunchConfigurationDialogOnGroup DebugUIPlugin getShell StructuredSelection getIdentifier DebugUIPlugin getStandardDisplay asyncExec OK_STATUS IWorkbench DebugUIPlugin getDefault getWorkbench IProgressService progressService getProgressService setPriority setName DebugUIMessages getString DebugUITools progressService showInDialog getActiveWorkbenchWindow getShell
Returns the label with any acclerators removed return label without accelerators public static String remove Accelerators String label String title label if title null strip out any accelerators int index title index Of if index 0 title title substring 1 else if index 0 index title length 1 String first title substring 0 index String last title substring index 1 title first last return title  removeAccelerators indexOf

see I Workbench Adapter get Children Object public Object get Children Object o return new Object 0  IWorkbenchAdapter getChildren getChildren
see I Workbench Adapter get Image Descriptor Object public Image Descriptor get Image Descriptor Object object return DebugUI Tools get Default Image Descriptor object  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor DebugUITools getDefaultImageDescriptor
see I Workbench Adapter get Label Object public String get Label Object o I Debug Model Presentation presentation DebugUI Plugin get Model Presentation return presentation get Text o  IWorkbenchAdapter getLabel getLabel IDebugModelPresentation DebugUIPlugin getModelPresentation getText
see I Workbench Adapter get Parent Object public Object get Parent Object o return null  IWorkbenchAdapter getParent getParent
see I Adapter Factory get Adapter Object Class public Object get Adapter Object obj Class adapter Type if adapter Type is Instance obj return obj if adapter Type I Workbench Adapter class if obj instanceof I Debug Element return new DebugUI Properties Adapter if obj instanceof I Process return new DebugUI Properties Adapter return null  IAdapterFactory getAdapter getAdapter adapterType adapterType isInstance adapterType IWorkbenchAdapter IDebugElement DebugUIPropertiesAdapter IProcess DebugUIPropertiesAdapter
see I Adapter Factory get Adapter List public Class get Adapter List return new Class I Workbench Adapter class  IAdapterFactory getAdapterList getAdapterList IWorkbenchAdapter

see I Label Provider get Image Object public Image get Image Object element String key get Image Key element if key null element instanceof I Adaptable I Workbench Adapter de I Workbench Adapter I Adaptable element get Adapter I Workbench Adapter class if de null Image Descriptor descriptor de get Image Descriptor element if descriptor null return descriptor create Image return null return Debug Plugin Images get Image key  ILabelProvider getImage getImage getImageKey IAdaptable IWorkbenchAdapter IWorkbenchAdapter IAdaptable getAdapter IWorkbenchAdapter ImageDescriptor getImageDescriptor createImage DebugPluginImages getImage
Returns the key code String code of the default image appropriate for the given element or code null code if no default image is defined public String get Image Key Object element if element instanceof I Debug Element Group elements into debug elements and non debug elements to reduce the number of instanceof checks performed if element instanceof I Register return I DebugUI Constants IMG OBJS REGISTER else if element instanceof I Register Group return I DebugUI Constants IMG OBJS REGISTER GROUP else if element instanceof I Variable element instanceof I Value if element instanceof Indexed Variable Partition return I Internal DebugUI Constants IMG OBJS ARRAY PARTITION else return I DebugUI Constants IMG OBJS VARIABLE else if element instanceof I Stack Frame if I Stack Frame element get Thread is Suspended return I DebugUI Constants IMG OBJS STACKFRAME else return I DebugUI Constants IMG OBJS STACKFRAME RUNNING else if element instanceof I Thread I Thread thread I Thread element if thread is Suspended return I DebugUI Constants IMG OBJS THREAD SUSPENDED else if thread is Terminated return I DebugUI Constants IMG OBJS THREAD TERMINATED else return I DebugUI Constants IMG OBJS THREAD RUNNING else if element instanceof I Debug Target I Debug Target target I Debug Target element if target is Terminated target is Disconnected return I DebugUI Constants IMG OBJS DEBUG TARGET TERMINATED else if target is Suspended return I DebugUI Constants IMG OBJS DEBUG TARGET SUSPENDED else return I DebugUI Constants IMG OBJS DEBUG TARGET else if element instanceof I Expression return I DebugUI Constants IMG OBJS EXPRESSION else if element instanceof I Marker return get Marker Image Key I Marker element else if element instanceof I Breakpoint return get Breakpoint Image Key I Breakpoint element else if element instanceof I Process if I Process element is Terminated return I DebugUI Constants IMG OBJS OS PROCESS TERMINATED else return I DebugUI Constants IMG OBJS OS PROCESS else if element instanceof I Launch determine the image from the launch config type I Launch launch I Launch element I Launch Configuration configuration launch get Launch Configuration if configuration null try return configuration get Type get Identifier catch Core Exception e DebugUI Plugin log e return null if no config use the old mode way if launch get Launch Mode equals I Launch Manager DEBUG MODE return I DebugUI Constants IMG OBJS LAUNCH DEBUG else if launch is Terminated return I DebugUI Constants IMG OBJS LAUNCH RUN TERMINATED else return I DebugUI Constants IMG OBJS LAUNCH RUN else if element instanceof I Launch Configuration Type return I Launch Configuration Type element get Identifier else if element instanceof I Launch Configuration try return I Launch Configuration element get Type get Identifier catch Core Exception e DebugUI Plugin log e return null return null  getImageKey IDebugElement IRegister IDebugUIConstants IMG_OBJS_REGISTER IRegisterGroup IDebugUIConstants IMG_OBJS_REGISTER_GROUP IVariable IValue IndexedVariablePartition IInternalDebugUIConstants IMG_OBJS_ARRAY_PARTITION IDebugUIConstants IMG_OBJS_VARIABLE IStackFrame IStackFrame getThread isSuspended IDebugUIConstants IMG_OBJS_STACKFRAME IDebugUIConstants IMG_OBJS_STACKFRAME_RUNNING IThread IThread IThread isSuspended IDebugUIConstants IMG_OBJS_THREAD_SUSPENDED isTerminated IDebugUIConstants IMG_OBJS_THREAD_TERMINATED IDebugUIConstants IMG_OBJS_THREAD_RUNNING IDebugTarget IDebugTarget IDebugTarget isTerminated isDisconnected IDebugUIConstants IMG_OBJS_DEBUG_TARGET_TERMINATED isSuspended IDebugUIConstants IMG_OBJS_DEBUG_TARGET_SUSPENDED IDebugUIConstants IMG_OBJS_DEBUG_TARGET IExpression IDebugUIConstants IMG_OBJS_EXPRESSION IMarker getMarkerImageKey IMarker IBreakpoint getBreakpointImageKey IBreakpoint IProcess IProcess isTerminated IDebugUIConstants IMG_OBJS_OS_PROCESS_TERMINATED IDebugUIConstants IMG_OBJS_OS_PROCESS ILaunch ILaunch ILaunch ILaunchConfiguration getLaunchConfiguration getType getIdentifier CoreException DebugUIPlugin getLaunchMode ILaunchManager DEBUG_MODE IDebugUIConstants IMG_OBJS_LAUNCH_DEBUG isTerminated IDebugUIConstants IMG_OBJS_LAUNCH_RUN_TERMINATED IDebugUIConstants IMG_OBJS_LAUNCH_RUN ILaunchConfigurationType ILaunchConfigurationType getIdentifier ILaunchConfiguration ILaunchConfiguration getType getIdentifier CoreException DebugUIPlugin
see I Label Provider get Text Object public String get Text Object element String Buffer label new String Buffer try Group elements into debug elements and non debug elements to reduce the number of instanceof checks performed if element instanceof I Debug Element if element instanceof I Stack Frame label append I Stack Frame element get Name else if element instanceof Indexed Variable Partition label append Indexed Variable Partition element get Name else if element instanceof I Variable label append get Variable Text I Variable element else if element instanceof I Thread label append I Thread element get Name else if element instanceof I Debug Target label append I Debug Target element get Name else if element instanceof I Expression label append get Expression Text I Expression element else if element instanceof I Register Group label append get Register Group Text I Register Group element else if element instanceof I Value label append I Value element get Value String else if element instanceof I Marker label append get Marker Text I Marker element else if element instanceof I Breakpoint label append get Breakpoint Text I Breakpoint element else if element instanceof I Process label append I Process element get Label else if element instanceof I Launch label append get Launch Text I Launch element else if element instanceof I Launch Configuration label append I Launch Configuration element get Name else if element instanceof I Launch Configuration Type label append I Launch Configuration Type element get Name else if element instanceof String label append element else label append get Adapter Label element if element instanceof I Terminate if I Terminate element is Terminated String terminated Message null if element instanceof I Process I Process process I Process element int exit process get Exit Value terminated Message Message Format format DebugUI Messages get String Default Label Provider 16 new String new Integer exit to String NON NLS 1 else terminated Message DebugUI Messages get String Default Label Provider 1 NON NLS 1 label insert 0 terminated Message else if element instanceof I Disconnect if I Disconnect element is Disconnected label insert 0 DebugUI Messages get String Default Label Provider disconnected  1 NON NLS 1 catch Debug Exception e DebugUI Plugin log e label append DebugUI Messages get String Default Label Provider unknown  1 NON NLS 1 return label to String  ILabelProvider getText getText StringBuffer StringBuffer IDebugElement IStackFrame IStackFrame getName IndexedVariablePartition IndexedVariablePartition getName IVariable getVariableText IVariable IThread IThread getName IDebugTarget IDebugTarget getName IExpression getExpressionText IExpression IRegisterGroup getRegisterGroupText IRegisterGroup IValue IValue getValueString IMarker getMarkerText IMarker IBreakpoint getBreakpointText IBreakpoint IProcess IProcess getLabel ILaunch getLaunchText ILaunch ILaunchConfiguration ILaunchConfiguration getName ILaunchConfigurationType ILaunchConfigurationType getName getAdapterLabel ITerminate ITerminate isTerminated terminatedMessage IProcess IProcess IProcess getExitValue terminatedMessage MessageFormat DebugUIMessages getString DefaultLabelProvider toString terminatedMessage DebugUIMessages getString DefaultLabelProvider terminatedMessage IDisconnect IDisconnect isDisconnected DebugUIMessages getString DefaultLabelProvider _1 DebugException DebugUIPlugin DebugUIMessages getString DefaultLabelProvider _1 toString
Returns default label for a breakpoint param breakpoint return default label for a breakpoint private String get Breakpoint Text I Breakpoint breakpoint I Resource resource breakpoint get Marker get Resource String Buffer label new String Buffer if resource null label append resource get Name if breakpoint instanceof I Line Breakpoint try int line Number I Line Breakpoint breakpoint get Line Number label append Message Format format DebugUI Messages get String Default Label Provider 17 new String Integer to String line Number NON NLS 1 catch Core Exception e return label to String  getBreakpointText IBreakpoint IResource getMarker getResource StringBuffer StringBuffer getName ILineBreakpoint lineNumber ILineBreakpoint getLineNumber MessageFormat DebugUIMessages getString DefaultLabelProvider toString lineNumber CoreException toString
public String get Adapter Label Object object if object instanceof I Adaptable I Workbench Adapter de I Workbench Adapter I Adaptable object get Adapter I Workbench Adapter class if de null return de get Label object return DebugUI Messages get String Default Label Provider unknown  1 NON NLS 1  getAdapterLabel IAdaptable IWorkbenchAdapter IWorkbenchAdapter IAdaptable getAdapter IWorkbenchAdapter getLabel DebugUIMessages getString DefaultLabelProvider _1
Used to render launch history items in the re launch drop downs protected String get Launch Text I Launch launch if launch get Launch Configuration null launch get Launch Configuration exists launch get Launch Configuration is Working Copy return DebugUI Messages get String Default Label Provider unknown  1 NON NLS 1 else new launch configuration I Launch Configuration config launch get Launch Configuration String Buffer buff new String Buffer config get Name buff append NON NLS 1 try buff append config get Type get Name catch Core Exception e DebugUI Plugin log e buff append NON NLS 1 return buff to String  getLaunchText ILaunch getLaunchConfiguration getLaunchConfiguration getLaunchConfiguration isWorkingCopy DebugUIMessages getString DefaultLabelProvider _1 ILaunchConfiguration getLaunchConfiguration StringBuffer StringBuffer getName getType getName CoreException DebugUIPlugin toString
protected String get Expression Text I Expression expression if expression instanceof I Watch Expression return get Watch Expression Text I Watch Expression expression String Buffer buffer new String Buffer expression get Expression Text String value String null I Value value expression get Value if value null value String null value String length 1 try value String value get Value String catch Debug Exception de DebugUI Plugin log de if value String null value String length 0 buffer append NON NLS 1 buffer append value String return buffer to String  getExpressionText IExpression IWatchExpression getWatchExpressionText IWatchExpression StringBuffer StringBuffer getExpressionText valueString IValue getValue valueString valueString valueString getValueString DebugException DebugUIPlugin valueString valueString valueString toString
param expression return protected String get Watch Expression Text I Watch Expression expression String Buffer result new String Buffer result append append expression get Expression Text append if expression is Pending result append DebugUI Messages get String Default Label Provider 12 NON NLS 1 else if expression has Errors result append DebugUI Messages get String Default Label Provider 13 NON NLS 1 else I Value value expression get Value if value null String value String DebugUI Plugin get Model Presentation get Text value if value String length 0 result append append value String NON NLS 1 if expression is Enabled result append DebugUI Messages get String Default Label Provider 15 NON NLS 1 return result to String  getWatchExpressionText IWatchExpression StringBuffer StringBuffer getExpressionText isPending DebugUIMessages getString DefaultLabelProvider hasErrors DebugUIMessages getString DefaultLabelProvider IValue getValue valueString DebugUIPlugin getModelPresentation getText valueString valueString isEnabled DebugUIMessages getString DefaultLabelProvider toString
protected String get Variable Text I Variable variable String Buffer buffer new String Buffer try I Value value variable get Value buffer append variable get Name buffer append NON NLS 1 buffer append value get Value String catch Debug Exception de DebugUI Plugin log de return buffer to String  getVariableText IVariable StringBuffer StringBuffer IValue getValue getName getValueString DebugException DebugUIPlugin toString
protected String get Register Group Text I Register Group register Group String Buffer buffer new String Buffer try buffer append register Group get Name catch Debug Exception de DebugUI Plugin log de return buffer to String  getRegisterGroupText IRegisterGroup registerGroup StringBuffer StringBuffer registerGroup getName DebugException DebugUIPlugin toString
protected String get Marker Text I Marker marker try if marker exists marker is Subtype Of I Breakpoint BREAKPOINT MARKER return DebugUI Messages get String Default Label Provider Breakpoint 1 NON NLS 1 catch Core Exception e DebugUI Plugin log e return NON NLS 1  getMarkerText IMarker isSubtypeOf IBreakpoint BREAKPOINT_MARKER DebugUIMessages getString DefaultLabelProvider Breakpoint_1 CoreException DebugUIPlugin
protected String get Marker Image Key I Marker marker try I Breakpoint breakpoint Debug Plugin get Default get Breakpoint Manager get Breakpoint marker if breakpoint null marker exists if breakpoint is Enabled return I DebugUI Constants IMG OBJS BREAKPOINT else return I DebugUI Constants IMG OBJS BREAKPOINT DISABLED catch Core Exception e return null  getMarkerImageKey IMarker IBreakpoint DebugPlugin getDefault getBreakpointManager getBreakpoint isEnabled IDebugUIConstants IMG_OBJS_BREAKPOINT IDebugUIConstants IMG_OBJS_BREAKPOINT_DISABLED CoreException
protected String get Breakpoint Image Key I Breakpoint breakpoint if breakpoint null breakpoint get Marker exists try if breakpoint is Enabled return I DebugUI Constants IMG OBJS BREAKPOINT else return I DebugUI Constants IMG OBJS BREAKPOINT DISABLED catch Core Exception e return null  getBreakpointImageKey IBreakpoint getMarker isEnabled IDebugUIConstants IMG_OBJS_BREAKPOINT IDebugUIConstants IMG_OBJS_BREAKPOINT_DISABLED CoreException
see I Base Label Provider add Listener I Label Provider Listener public void add Listener I Label Provider Listener listener  IBaseLabelProvider addListener ILabelProviderListener addListener ILabelProviderListener
see I Base Label Provider dispose public void dispose  IBaseLabelProvider
see I Base Label Provider is Label Property Object String public boolean is Label Property Object element String property return false  IBaseLabelProvider isLabelProperty isLabelProperty
see I Base Label Provider remove Listener I Label Provider Listener public void remove Listener I Label Provider Listener listener  IBaseLabelProvider removeListener ILabelProviderListener removeListener ILabelProviderListener

public void remove Annotations I Editor Part editor Part I Thread thread I Debug Model Presentation presentation get Configured Presentation thread if presentation null if presentation instanceof I Debug Editor Presentation I Debug Editor Presentation presentation remove Annotations editor Part thread  removeAnnotations IEditorPart editorPart IThread IDebugModelPresentation getConfiguredPresentation IDebugEditorPresentation IDebugEditorPresentation removeAnnotations editorPart
public boolean add Annotations I Editor Part editor Part I Stack Frame frame I Debug Model Presentation presentation get Configured Presentation frame if presentation null if presentation instanceof I Debug Editor Presentation return I Debug Editor Presentation presentation add Annotations editor Part frame return false  addAnnotations IEditorPart editorPart IStackFrame IDebugModelPresentation getConfiguredPresentation IDebugEditorPresentation IDebugEditorPresentation addAnnotations editorPart
Constructs a new Delegating Label Provider that delegates to extensions of kind code org eclipse debug ui debug Label Provider code public Delegating Model Presentation I Extension Point point Platform get Extension Registry get Extension Point DebugUI Plugin get Unique Identifier I DebugUI Constants ID DEBUG MODEL PRESENTATION if point null I Extension extensions point get Extensions for int i 0 i extensions length i I Extension extension extensions i I Configuration Element config Elements extension get Configuration Elements for int j 0 j config Elements length j I Configuration Element elt config Elements j String id elt get Attribute id NON NLS 1 if id null I Debug Model Presentation lp new Lazy Model Presentation elt get Label Providers put id lp  DelegatingLabelProvider debugLabelProvider DelegatingModelPresentation IExtensionPoint getExtensionRegistry getExtensionPoint DebugUIPlugin getUniqueIdentifier IDebugUIConstants ID_DEBUG_MODEL_PRESENTATION IExtension getExtensions IExtension IConfigurationElement configElements getConfigurationElements configElements IConfigurationElement configElements getAttribute IDebugModelPresentation LazyModelPresentation getLabelProviders
Delegate to all extensions see org eclipse jface viewers I Base Label Provider add Listener org eclipse jface viewers I Label Provider Listener public void add Listener I Label Provider Listener listener Iterator i get Label Providers values iterator while i has Next I Label Provider i next add Listener listener  IBaseLabelProvider addListener ILabelProviderListener addListener ILabelProviderListener getLabelProviders hasNext ILabelProvider addListener
Delegate to all extensions see I Base Label Provider dispose public void dispose Iterator i get Label Providers values iterator while i has Next I Label Provider i next dispose  IBaseLabelProvider getLabelProviders hasNext ILabelProvider
see I Debug Model Presentation get Image Object public Image get Image Object item Attempt to delegate I Debug Model Presentation lp get Configured Presentation item if lp null Image image lp get Image item if image null return image If no delegate returned an image use the default return get Default Image item  IDebugModelPresentation getImage getImage IDebugModelPresentation getConfiguredPresentation getImage getDefaultImage
see I Debug Model Presentation get Text Object public String get Text Object item if item instanceof Indexed Variable Partition Attempt to delegate I Debug Model Presentation lp get Configured Presentation item if lp null String label lp get Text item if label null return label If no delegate returned a text label use the default if show Variable Type Names try if item instanceof I Expression String Buffer buf new String Buffer I Value value I Expression item get Value if value null buf append value get Reference Type Name buf append buf append get Default Text item return buf to String else if item instanceof I Variable return new String Buffer I Variable item get Value get Reference Type Name append append get Default Text item to String catch Debug Exception de DebugUI Plugin log de return get Default Text item  IDebugModelPresentation getText getText IndexedVariablePartition IDebugModelPresentation getConfiguredPresentation getText showVariableTypeNames IExpression StringBuffer StringBuffer IValue IExpression getValue getReferenceTypeName getDefaultText toString IVariable StringBuffer IVariable getValue getReferenceTypeName getDefaultText toString DebugException DebugUIPlugin getDefaultText
public I Editor Input get Editor Input Object item I Debug Model Presentation lp get Configured Presentation item if lp null return lp get Editor Input item return null  IEditorInput getEditorInput IDebugModelPresentation getConfiguredPresentation getEditorInput
public String get Editor Id I Editor Input input Object object Input I Debug Model Presentation lp get Configured Presentation object Input if lp null return lp get Editor Id input object Input return null  getEditorId IEditorInput objectInput IDebugModelPresentation getConfiguredPresentation objectInput getEditorId objectInput
Returns a default text label for the debug element protected String get Default Text Object element return DebugUI Plugin get Default Label Provider get Text element  getDefaultText DebugUIPlugin getDefaultLabelProvider getText
Returns a default image for the debug element protected Image get Default Image Object element return DebugUI Plugin get Default Label Provider get Image element  getDefaultImage DebugUIPlugin getDefaultLabelProvider getImage
public void compute Detail I Value value I Value Detail Listener listener I Debug Model Presentation lp get Configured Presentation value if lp null lp compute Detail value listener else listener detail Computed value get Text value  computeDetail IValue IValueDetailListener IDebugModelPresentation getConfiguredPresentation computeDetail detailComputed getText
Delegate to all extensions see org eclipse jface viewers I Base Label Provider remove Listener org eclipse jface viewers I Label Provider Listener public void remove Listener I Label Provider Listener listener Iterator i get Label Providers values iterator while i has Next I Label Provider i next remove Listener listener  IBaseLabelProvider removeListener ILabelProviderListener removeListener ILabelProviderListener getLabelProviders hasNext ILabelProvider removeListener
Delegate to the appropriate label provider see org eclipse jface viewers I Base Label Provider is Label Property java lang Object java lang String public boolean is Label Property Object element String property if element instanceof I Debug Element I Debug Model Presentation lp get Configured Presentation element if lp null return lp is Label Property element property return true  IBaseLabelProvider isLabelProperty isLabelProperty IDebugElement IDebugModelPresentation getConfiguredPresentation isLabelProperty
Returns a configured model presentation for the given object or code null code if one is not registered protected I Debug Model Presentation get Configured Presentation Object element String id null if element instanceof I Debug Element I Debug Element de I Debug Element element id de get Model Identifier else if element instanceof I Marker I Marker m I Marker element I Breakpoint bp Debug Plugin get Default get Breakpoint Manager get Breakpoint m if bp null id bp get Model Identifier else if element instanceof I Breakpoint id I Breakpoint element get Model Identifier if id null return get Presentation id return null  IDebugModelPresentation getConfiguredPresentation IDebugElement IDebugElement IDebugElement getModelIdentifier IMarker IMarker IMarker IBreakpoint DebugPlugin getDefault getBreakpointManager getBreakpoint getModelIdentifier IBreakpoint IBreakpoint getModelIdentifier getPresentation
Returns the presentation registered for the given id or code null code of nothing is registered for the id public I Debug Model Presentation get Presentation String id return I Debug Model Presentation get Label Providers get id  IDebugModelPresentation getPresentation IDebugModelPresentation getLabelProviders
public void set Attribute String id Object value if value null return get Attributes put id value Iterator presentations f Label Providers values iterator while presentations has Next I Debug Model Presentation presentations next set Attribute id value  setAttribute getAttributes fLabelProviders hasNext IDebugModelPresentation setAttribute
Whether or not to show variable type names This option is configured per model presentation This allows this option to be set per view for example protected boolean show Variable Type Names Boolean show Boolean f Attributes get DISPLAY VARIABLE TYPE NAMES show show null Boolean FALSE show return show boolean Value  showVariableTypeNames fAttributes DISPLAY_VARIABLE_TYPE_NAMES booleanValue
protected Hash Map get Attributes return f Attributes  HashMap getAttributes fAttributes
Returns a copy of the attribute map for this presentation return a copy of the attribute map for this presentation since 3 0 public Map get Attribute Map return Map get Attributes clone  getAttributeMap getAttributes
protected void set Attributes Hash Map attributes f Attributes attributes  setAttributes HashMap fAttributes
protected Hash Map get Label Providers return f Label Providers  HashMap getLabelProviders fLabelProviders
protected void set Label Providers Hash Map label Providers f Label Providers label Providers  setLabelProviders HashMap labelProviders fLabelProviders labelProviders

Persists the location and dimensions of the shell in the Debug UI Plugin dialog settings under the provided dialog settings section name param shell The shell whose geometry is to be stored param dialog Settings Section Name The name of the dialog settings section public static void persist Shell Geometry Shell shell String dialog Settings Section Name Point shell Location shell get Location Point shell Size shell get Size I Dialog Settings settings get Dialog Settings dialog Settings Section Name settings put I Debug Preference Constants DIALOG ORIGIN X shell Location x settings put I Debug Preference Constants DIALOG ORIGIN Y shell Location y settings put I Debug Preference Constants DIALOG WIDTH shell Size x settings put I Debug Preference Constants DIALOG HEIGHT shell Size y  dialogSettingsSectionName persistShellGeometry dialogSettingsSectionName shellLocation getLocation shellSize getSize IDialogSettings getDialogSettings dialogSettingsSectionName IDebugPreferenceConstants DIALOG_ORIGIN_X shellLocation IDebugPreferenceConstants DIALOG_ORIGIN_Y shellLocation IDebugPreferenceConstants DIALOG_WIDTH shellSize IDebugPreferenceConstants DIALOG_HEIGHT shellSize
private static I Dialog Settings get Dialog Settings String dialog Settings Section Name I Dialog Settings settings DebugUI Plugin get Default get Dialog Settings I Dialog Settings section settings get Section dialog Settings Section Name if section null section settings add New Section dialog Settings Section Name return section  IDialogSettings getDialogSettings dialogSettingsSectionName IDialogSettings DebugUIPlugin getDefault getDialogSettings IDialogSettings getSection dialogSettingsSectionName addNewSection dialogSettingsSectionName
Returns the initial size which is the larger of the code initial Size code or the size persisted in the Debug UI Plugin dialog settings under the provided dialog setttings section name If no size is persisted in the settings the code initial Size code is returned param initial Size The initial Size to compare against param dialog Settings Section Name The name of the dialog settings section return the initial size public static Point get Initial Size String dialog Settings Section Name Point initial Size I Dialog Settings settings get Dialog Settings dialog Settings Section Name try int x y x settings get Int I Debug Preference Constants DIALOG WIDTH y settings get Int I Debug Preference Constants DIALOG HEIGHT return new Point Math max x initial Size x Math max y initial Size y catch Number Format Exception e return initial Size  initialSize initialSize initialSize initialSize dialogSettingsSectionName getInitialSize dialogSettingsSectionName initialSize IDialogSettings getDialogSettings dialogSettingsSectionName getInt IDebugPreferenceConstants DIALOG_WIDTH getInt IDebugPreferenceConstants DIALOG_HEIGHT initialSize initialSize NumberFormatException initialSize
Returns the initial location which is persisted in the Debug UI Plugin dialog settings under the provided dialog setttings section name If location is not persisted in the settings the code null code is returned param dialog Settings Section Name The name of the dialog settings section return The initial location or code null code public static Point get Initial Location String dialog Settings Section Name I Dialog Settings settings get Dialog Settings dialog Settings Section Name try int x settings get Int I Debug Preference Constants DIALOG ORIGIN X int y settings get Int I Debug Preference Constants DIALOG ORIGIN Y return new Point x y catch Number Format Exception e return null  dialogSettingsSectionName getInitialLocation dialogSettingsSectionName IDialogSettings getDialogSettings dialogSettingsSectionName getInt IDebugPreferenceConstants DIALOG_ORIGIN_X getInt IDebugPreferenceConstants DIALOG_ORIGIN_Y NumberFormatException

Notification that the launch history has changed Any of the run history debug history or last launched items could have changed To examine the history items retrieve them from the code DebugUI Plugin code  DebugUIPlugin

Construct an instruction pointer annotation for the given stack frame param stack Frame frame to create an instruction pointer annotation for param is Top Frame whether the given frame is the top stack frame in its thread public Instruction Pointer Annotation I Stack Frame stack Frame boolean is Top Frame super is Top Frame I Internal DebugUI Constants ANN INSTR POINTER CURRENT I Internal DebugUI Constants ANN INSTR POINTER SECONDARY false is Top Frame DebugUI Messages get String Instruction Pointer Annotation 0 DebugUI Messages get String Instruction Pointer Annotation 1 NON NLS 1 NON NLS 2 f Stack Frame stack Frame  stackFrame isTopFrame InstructionPointerAnnotation IStackFrame stackFrame isTopFrame isTopFrame IInternalDebugUIConstants ANN_INSTR_POINTER_CURRENT IInternalDebugUIConstants ANN_INSTR_POINTER_SECONDARY isTopFrame DebugUIMessages getString InstructionPointerAnnotation DebugUIMessages getString InstructionPointerAnnotation fStackFrame stackFrame
public boolean equals Object other if other instanceof Instruction Pointer Annotation return get Stack Frame equals Instruction Pointer Annotation other get Stack Frame return false  InstructionPointerAnnotation getStackFrame InstructionPointerAnnotation getStackFrame
see java lang Object hash Code public int hash Code return get Stack Frame hash Code  hashCode hashCode getStackFrame hashCode
Returns the stack frame associated with this annotation return the stack frame associated with this annotation private I Stack Frame get Stack Frame return f Stack Frame  IStackFrame getStackFrame fStackFrame

private Instruction Pointer Annotation f Annotation public Instruction Pointer Context I Text Editor text Editor Instruction Pointer Annotation annotation set Text Editor text Editor set Annotation annotation  InstructionPointerAnnotation fAnnotation InstructionPointerContext ITextEditor textEditor InstructionPointerAnnotation setTextEditor textEditor setAnnotation
see java lang Object equals java lang Object public boolean equals Object other if other instanceof Instruction Pointer Context Instruction Pointer Context other Context Instruction Pointer Context other return get Annotation equals other Context get Annotation return false  InstructionPointerContext InstructionPointerContext otherContext InstructionPointerContext getAnnotation otherContext getAnnotation
see java lang Object hash Code public int hash Code return get Annotation hash Code  hashCode hashCode getAnnotation hashCode
private void set Text Editor I Text Editor text Editor f Text Editor text Editor  setTextEditor ITextEditor textEditor fTextEditor textEditor
public I Text Editor get Text Editor return f Text Editor  ITextEditor getTextEditor fTextEditor
private void set Annotation Instruction Pointer Annotation annotation f Annotation annotation  setAnnotation InstructionPointerAnnotation fAnnotation
public Instruction Pointer Annotation get Annotation return f Annotation  InstructionPointerAnnotation getAnnotation fAnnotation

Clients must not instantiate this class private Instruction Pointer Manager f Debug Target Map new Hash Map  InstructionPointerManager fDebugTargetMap HashMap
Return the singleton instance of this class creating it if necessary public static Instruction Pointer Manager get Default if fg Default null fg Default new Instruction Pointer Manager return fg Default  InstructionPointerManager getDefault fgDefault fgDefault InstructionPointerManager fgDefault
Add an instruction pointer annotation in the specified editor for the specified stack frame public void add Annotation I Text Editor text Editor I Stack Frame stack Frame Create the annotation object I Document Provider doc Provider text Editor get Document Provider I Editor Input editor Input text Editor get Editor Input I Thread thread stack Frame get Thread boolean tos false try tos stack Frame equals thread get Top Stack Frame catch Debug Exception de Instruction Pointer Annotation inst Ptr Annotation new Instruction Pointer Annotation stack Frame tos Create the Position object that specifies a location for the annotation Position position null int char Start 1 int length 1 try char Start stack Frame get Char Start length stack Frame get Char End char Start catch Debug Exception de if char Start 0 I Document doc doc Provider get Document editor Input try int line Number stack Frame get Line Number 1 I Region region doc get Line Information line Number char Start region get Offset length region get Length catch Bad Location Exception ble return catch Debug Exception de return if char Start 0 return position new Position char Start length Add the annotation at the position to the editor s annotation model If there is no annotation model there s nothing more to do I Annotation Model ann Model doc Provider get Annotation Model editor Input if ann Model null return ann Model remove Annotation inst Ptr Annotation ann Model add Annotation inst Ptr Annotation position Retrieve the list of instruction pointer contexts I Debug Target debug Target stack Frame get Debug Target Map thread Map Map f Debug Target Map get debug Target if thread Map null thread Map new Hash Map f Debug Target Map put debug Target thread Map List context List List thread Map get thread if context List null context List new Array List thread Map put thread context List Create a context object add it to the list Instruction Pointer Context context new Instruction Pointer Context text Editor inst Ptr Annotation context List remove context context List add context  addAnnotation ITextEditor textEditor IStackFrame stackFrame IDocumentProvider docProvider textEditor getDocumentProvider IEditorInput editorInput textEditor getEditorInput IThread stackFrame getThread stackFrame getTopStackFrame DebugException InstructionPointerAnnotation instPtrAnnotation InstructionPointerAnnotation stackFrame charStart charStart stackFrame getCharStart stackFrame getCharEnd charStart DebugException charStart IDocument docProvider getDocument editorInput lineNumber stackFrame getLineNumber IRegion getLineInformation lineNumber charStart getOffset getLength BadLocationException DebugException charStart charStart IAnnotationModel annModel docProvider getAnnotationModel editorInput annModel annModel removeAnnotation instPtrAnnotation annModel addAnnotation instPtrAnnotation IDebugTarget debugTarget stackFrame getDebugTarget threadMap fDebugTargetMap debugTarget threadMap threadMap HashMap fDebugTargetMap debugTarget threadMap contextList threadMap contextList contextList ArrayList threadMap contextList InstructionPointerContext InstructionPointerContext textEditor instPtrAnnotation contextList contextList
Remove all annotations associated with the specified debug target that this class is tracking public void remove Annotations I Debug Target debug Target Retrieve the mapping of threads to context lists Map thread Map Map f Debug Target Map get debug Target if thread Map null return Remove annotations for all threads associated with the debug target Object threads thread Map key Set to Array for int i 0 i threads length i I Thread thread I Thread threads i remove Annotations thread thread Map Remove the entry for the debug target f Debug Target Map remove debug Target  removeAnnotations IDebugTarget debugTarget threadMap fDebugTargetMap debugTarget threadMap threadMap keySet toArray IThread IThread removeAnnotations threadMap fDebugTargetMap debugTarget
Remove all annotations associated with the specified thread that this class is tracking public void remove Annotations I Thread thread Retrieve the thread map I Debug Target debug Target thread get Debug Target Map thread Map Map f Debug Target Map get debug Target if thread Map null return Remove all annotations for the thread remove Annotations thread thread Map  removeAnnotations IThread IDebugTarget debugTarget getDebugTarget threadMap fDebugTargetMap debugTarget threadMap removeAnnotations threadMap
Remove all annotations associated with the specified thread private void remove Annotations I Thread thread Map thread Map Retrieve the context list and remove each corresponding annotation List context List List thread Map get thread if context List null Iterator context Iterator context List iterator while context Iterator has Next Instruction Pointer Context context Instruction Pointer Context context Iterator next remove Annotation context get Text Editor context get Annotation Remove the thread map thread Map remove thread  removeAnnotations IThread threadMap contextList threadMap contextList contextIterator contextList contextIterator hasNext InstructionPointerContext InstructionPointerContext contextIterator removeAnnotation getTextEditor getAnnotation threadMap
Remove the specified annotation from the specified text editor private void remove Annotation I Text Editor text Editor Instruction Pointer Annotation annotation I Document Provider doc Provider text Editor get Document Provider if doc Provider null I Annotation Model annotation Model doc Provider get Annotation Model text Editor get Editor Input if annotation Model null annotation Model remove Annotation annotation  removeAnnotation ITextEditor textEditor InstructionPointerAnnotation IDocumentProvider docProvider textEditor getDocumentProvider docProvider IAnnotationModel annotationModel docProvider getAnnotationModel textEditor getEditorInput annotationModel annotationModel removeAnnotation

public interface I Confirmation Requestor Returns whether this action should proceed Confirmation is requested when an action is run return whether this action should proceed  IConfirmationRequestor
Constructor for Abstract Launch Configuration Action param text public Abstract Launch Configuration Action String text Viewer viewer String mode super text f Viewer viewer f Viewer add Selection Changed Listener this f Mode mode  AbstractLaunchConfigurationAction AbstractLaunchConfigurationAction fViewer fViewer addSelectionChangedListener fMode
Returns the shell this action is contained in return the shell this action is contained in protected Shell get Shell return get Viewer get Control get Shell  getShell getViewer getControl getShell
Returns the viewer this action is working on return the viewer this action is working on protected Viewer get Viewer return f Viewer  getViewer fViewer
Performs this action once confirmation has been aquired Subclasses should override this method 
Runnable r new Runnable see java lang Runnable run public void run perform Action  performAction
see org eclipse jface action I Action run public final void run if f Confirmation Requestor null if f Confirmation Requestor get Confirmation return Runnable r new Runnable see java lang Runnable run public void run perform Action Busy Indicator show While get Shell get Display r  IAction fConfirmationRequestor fConfirmationRequestor getConfirmation performAction BusyIndicator showWhile getShell getDisplay
Sets this action s confirmation requestor param confirmation Requestor public void set Confirmation Requestor I Confirmation Requestor confirmation Requestor f Confirmation Requestor confirmation Requestor  confirmationRequestor setConfirmationRequestor IConfirmationRequestor confirmationRequestor fConfirmationRequestor confirmationRequestor
Disposes this action public void dispose f Viewer remove Selection Changed Listener this  fViewer removeSelectionChangedListener
Show an error dialog on the given exception param exception protected void error Dialog Core Exception exception Error Dialog open Error get Shell null null exception get Status  errorDialog CoreException ErrorDialog openError getShell getStatus
Return this action s mode return launch mode protected String get Mode return f Mode  getMode fMode

public Object handle Status I Status status Object source throws Core Exception if source instanceof I Launch Configuration I Launch Configuration config I Launch Configuration source if DebugUI Tools is Private config return new Boolean true Shell shell DebugUI Plugin get Shell String title Launch Configurations Messages get String Compile Error Prompt Status Handler 0 NON NLS 1 String message Launch Configurations Messages get String Compile Error Prompt Status Handler 1 NON NLS 1 I Preference Store store DebugUI Plugin get Default get Preference Store String pref store get String I Internal DebugUI Constants PREF CONTINUE WITH COMPILE ERROR if pref null if pref equals Message Dialog With Toggle ALWAYS return new Boolean true Message Dialog With Toggle dialog new Message Dialog With Toggle shell title null message Message Dialog WARNING new String I Dialog Constants OK LABEL I Dialog Constants CANCEL LABEL 1 null false dialog set Pref Key I Internal DebugUI Constants PREF CONTINUE WITH COMPILE ERROR dialog set Pref Store store dialog open int return Value dialog get Return Code if return Value I Dialog Constants OK ID return new Boolean true else return new Boolean false  handleStatus IStatus CoreException ILaunchConfiguration ILaunchConfiguration ILaunchConfiguration DebugUITools isPrivate DebugUIPlugin getShell LaunchConfigurationsMessages getString CompileErrorPromptStatusHandler LaunchConfigurationsMessages getString CompileErrorPromptStatusHandler IPreferenceStore DebugUIPlugin getDefault getPreferenceStore getString IInternalDebugUIConstants PREF_CONTINUE_WITH_COMPILE_ERROR MessageDialogWithToggle MessageDialogWithToggle MessageDialogWithToggle MessageDialog IDialogConstants OK_LABEL IDialogConstants CANCEL_LABEL setPrefKey IInternalDebugUIConstants PREF_CONTINUE_WITH_COMPILE_ERROR setPrefStore returnValue getReturnCode returnValue IDialogConstants OK_ID

Constructs an action to create a launch configuration public Create Launch Configuration Action Viewer viewer String mode super Launch Configurations Messages get String Create Launch Configuration Action Ne w 1 viewer mode NON NLS 1  CreateLaunchConfigurationAction LaunchConfigurationsMessages getString CreateLaunchConfigurationAction w_1
see Abstract Launch Configuration Action perform Action protected void perform Action Object object get Structured Selection get First Element I Launch Configuration Type type null Construct a new config of the selected type if object instanceof I Launch Configuration I Launch Configuration config I Launch Configuration object try type config get Type catch Core Exception e error Dialog e return else type I Launch Configuration Type object try I Launch Configuration Working Copy wc type new Instance null Debug Plugin get Default get Launch Manager generate Unique Launch Configuration Name From Launch Configurations Messages get String Create Launch Configuration Action New configuration 2 NON NLS 1 I Launch Configuration Tab Group tab Group Launch Configuration Presentation Manager get Default get Tab Group wc get Type get Mode this only works because this action is only present when the dialog is open I Launch Configuration Dialog dialog Launch Configurations Dialog get Currently Visible Launch Configuration Dialog tab Group create Tabs dialog dialog get Mode I Launch Configuration Tab tabs tab Group get Tabs for int i 0 i tabs length i I Launch Configuration Tab tab tabs i tab set Launch Configuration Dialog dialog tab Group set Defaults wc tab Group dispose wc do Save catch Core Exception e error Dialog e return  AbstractLaunchConfigurationAction performAction performAction getStructuredSelection getFirstElement ILaunchConfigurationType ILaunchConfiguration ILaunchConfiguration ILaunchConfiguration getType CoreException errorDialog ILaunchConfigurationType ILaunchConfigurationWorkingCopy newInstance DebugPlugin getDefault getLaunchManager generateUniqueLaunchConfigurationNameFrom LaunchConfigurationsMessages getString CreateLaunchConfigurationAction New_configuration_2 ILaunchConfigurationTabGroup tabGroup LaunchConfigurationPresentationManager getDefault getTabGroup getType getMode ILaunchConfigurationDialog LaunchConfigurationsDialog getCurrentlyVisibleLaunchConfigurationDialog tabGroup createTabs getMode ILaunchConfigurationTab tabGroup getTabs ILaunchConfigurationTab setLaunchConfigurationDialog tabGroup setDefaults tabGroup doSave CoreException errorDialog
see org eclipse ui actions Selection Listener Action update Selection org eclipse jface viewers I Structured Selection protected boolean update Selection I Structured Selection selection return selection size 1  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection

public Object handle Status I Status status Object source throws Core Exception if source instanceof I Launch Configuration I Launch Configuration config I Launch Configuration source if DebugUI Tools is Private config return new Boolean false Shell active Shell DebugUI Plugin get Shell String title Launch Configurations Messages get String Debug Mode Prompt Status Handler 0 NON NLS 1 String message Launch Configurations Messages get String Debug Mode Prompt Status Handler 1 NON NLS 1 I Preference Store store DebugUI Plugin get Default get Preference Store I Launch Configuration configuration I Launch Configuration source String pref store get String I Internal DebugUI Constants PREF RELAUNCH IN DEBUG MODE if pref null if pref equals Message Dialog With Toggle NEVER return new Boolean false else if pref equals Message Dialog With Toggle ALWAYS relaunch In Debug Mode configuration return new Boolean true Message Dialog With Toggle dialog Message Dialog With Toggle open Yes No Cancel Question active Shell title message null false store I Internal DebugUI Constants PREF RELAUNCH IN DEBUG MODE NON NLS 1 int button Id dialog get Return Code if button Id I Dialog Constants YES ID relaunch In Debug Mode configuration return new Boolean true stops launch else if button Id I Dialog Constants NO ID return new Boolean false continue launch else CANCEL return new Boolean true stops the launch  handleStatus IStatus CoreException ILaunchConfiguration ILaunchConfiguration ILaunchConfiguration DebugUITools isPrivate activeShell DebugUIPlugin getShell LaunchConfigurationsMessages getString DebugModePromptStatusHandler LaunchConfigurationsMessages getString DebugModePromptStatusHandler IPreferenceStore DebugUIPlugin getDefault getPreferenceStore ILaunchConfiguration ILaunchConfiguration getString IInternalDebugUIConstants PREF_RELAUNCH_IN_DEBUG_MODE MessageDialogWithToggle MessageDialogWithToggle relaunchInDebugMode MessageDialogWithToggle MessageDialogWithToggle openYesNoCancelQuestion activeShell IInternalDebugUIConstants PREF_RELAUNCH_IN_DEBUG_MODE buttonId getReturnCode buttonId IDialogConstants YES_ID relaunchInDebugMode buttonId IDialogConstants NO_ID
param configuration private void relaunch In Debug Mode I Launch Configuration configuration DebugUI Tools launch configuration I Launch Manager DEBUG MODE  relaunchInDebugMode ILaunchConfiguration DebugUITools ILaunchManager DEBUG_MODE

class Confirmation implements I Confirmation Requestor see org eclipse debug internal ui launch Configurations Abstract Launch Configuration Action I Confirmation Requestor get Confirmation public boolean get Confirmation I Structured Selection selection get Structured Selection Make the user confirm the deletion String dialog Message selection size 1 Launch Configurations Messages get String Launch Configuration Dialog Do you wish to delete the selected launch configurations  1 Launch Configurations Messages get String Launch Configuration Dialog Do you wish to delete the selected launch configuration  2 NON NLS 1 NON NLS 2 return Message Dialog open Question get Shell Launch Configurations Messages get String Launch Configuration Dialog Confirm Launch Configuration Deletion 3 dialog Message NON NLS 1  IConfirmationRequestor launchConfigurations AbstractLaunchConfigurationAction IConfirmationRequestor getConfirmation getConfirmation IStructuredSelection getStructuredSelection dialogMessage LaunchConfigurationsMessages getString LaunchConfigurationDialog Do_you_wish_to_delete_the_selected_launch_configurations__1 LaunchConfigurationsMessages getString LaunchConfigurationDialog Do_you_wish_to_delete_the_selected_launch_configuration__2 MessageDialog openQuestion getShell LaunchConfigurationsMessages getString LaunchConfigurationDialog Confirm_Launch_Configuration_Deletion_3 dialogMessage
Constructs an action to delete launch configuration s public Delete Launch Configuration Action Viewer viewer String mode super Launch Configurations Messages get String Delete Launch Configuration Action Dele te 1 viewer mode NON NLS 1 set Confirmation Requestor new Confirmation  DeleteLaunchConfigurationAction LaunchConfigurationsMessages getString DeleteLaunchConfigurationAction te_1 setConfirmationRequestor
see Abstract Launch Configuration Action perform Action protected void perform Action I Structured Selection selection get Structured Selection get Viewer get Control set Redraw false Iterator iterator selection iterator while iterator has Next I Launch Configuration configuration I Launch Configuration iterator next try configuration delete catch Core Exception e error Dialog e get Viewer get Control set Redraw true  AbstractLaunchConfigurationAction performAction performAction IStructuredSelection getStructuredSelection getViewer getControl setRedraw hasNext ILaunchConfiguration ILaunchConfiguration CoreException errorDialog getViewer getControl setRedraw
see org eclipse ui actions Selection Listener Action update Selection org eclipse jface viewers I Structured Selection protected boolean update Selection I Structured Selection selection if selection is Empty return false Iterator items selection iterator while items has Next if items next instanceof I Launch Configuration return false return true  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection isEmpty hasNext ILaunchConfiguration

Constructs an action to duplicate a launch configuration public Duplicate Launch Configuration Action Viewer viewer String mode super Launch Configurations Messages get String Duplicate Launch Configuration Action Duplicate 1 viewer mode NON NLS 1  DuplicateLaunchConfigurationAction LaunchConfigurationsMessages getString DuplicateLaunchConfigurationAction Duplicate_1
see Abstract Launch Configuration Action perform Action protected void perform Action I Launch Configuration original I Launch Configuration get Structured Selection get First Element String new Name Debug Plugin get Default get Launch Manager generate Unique Launch Configuration Name From original get Name try I Launch Configuration Working Copy new Working Copy original copy new Name new Working Copy do Save catch Core Exception e error Dialog e  AbstractLaunchConfigurationAction performAction performAction ILaunchConfiguration ILaunchConfiguration getStructuredSelection getFirstElement newName DebugPlugin getDefault getLaunchManager generateUniqueLaunchConfigurationNameFrom getName ILaunchConfigurationWorkingCopy newWorkingCopy newName newWorkingCopy doSave CoreException errorDialog
see org eclipse ui actions Selection Listener Action update Selection org eclipse jface viewers I Structured Selection protected boolean update Selection I Structured Selection selection return selection size 1 selection get First Element instanceof I Launch Configuration  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection getFirstElement ILaunchConfiguration

public Environment Variable String name String value this name name this value value  EnvironmentVariable
Returns this variable s name which serves as the key in the key value pair this variable represents return this variable s name public String get Name return name  getName
Returns this variables value return this variable s value public String get Value return value  getValue
Sets this variable s name key param name public void set Name String name this name name  setName
Sets this variable s value param value public void set Value String value this value value  setValue
see java lang Object to String public String to String return get Name  toString toString getName
public boolean equals Object obj boolean equal false if obj instanceof Environment Variable Environment Variable var Environment Variable obj equal var get Name equals name return equal  EnvironmentVariable EnvironmentVariable EnvironmentVariable getName
see java lang Object hash Code public int hash Code return name hash Code  hashCode hashCode hashCode

private Selection Adapter f Button Listener new Selection Adapter public void widget Selected Selection Event e Button button Button e widget if button f Add Favorite Button handle Add Config Button Selected else if button f Remove Favorites Button remove Selected Favorites else if button f Move Up Button handle Move Up Button Selected else if button f Move Down Button handle Move Down Button Selected  SelectionAdapter fButtonListener SelectionAdapter widgetSelected SelectionEvent fAddFavoriteButton handleAddConfigButtonSelected fRemoveFavoritesButton removeSelectedFavorites fMoveUpButton handleMoveUpButtonSelected fMoveDownButton handleMoveDownButtonSelected
private I Selection Changed Listener f Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Favorite Selection Changed  ISelectionChangedListener fSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleFavoriteSelectionChanged
private Key Listener f Key Listener new Key Adapter public void key Pressed Key Event event if event character SWT DEL event state Mask 0 remove Selected Favorites  KeyListener fKeyListener KeyAdapter keyPressed KeyEvent stateMask removeSelectedFavorites
see I Structured Content Provider get Elements Object public Object get Elements Object input Element I Launch Configuration favorites I Launch Configuration get Favorites to Array new I Launch Configuration 0 return Launch Configuration Manager filter Configs favorites  IStructuredContentProvider getElements getElements inputElement ILaunchConfiguration ILaunchConfiguration getFavorites toArray ILaunchConfiguration LaunchConfigurationManager filterConfigs
see I Content Provider dispose public void dispose  IContentProvider
see I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
see I Structured Content Provider get Elements Object public Object get Elements Object input Element I Launch Configuration all null try all Debug Plugin get Default get Launch Manager get Launch Configurations catch Core Exception e DebugUI Plugin log e return new I Launch Configuration 0 List list new Array List all length Viewer Filter filter new Launch Group Filter get Launch History get Launch Group for int i 0 i all length i if filter select null null all i list add all i list remove All get Favorites Object objs list to Array new Workbench Viewer Sorter sort get Favorites Table objs return objs  IStructuredContentProvider getElements getElements inputElement ILaunchConfiguration DebugPlugin getDefault getLaunchManager getLaunchConfigurations CoreException DebugUIPlugin ILaunchConfiguration ArrayList ViewerFilter LaunchGroupFilter getLaunchHistory getLaunchGroup removeAll getFavorites toArray WorkbenchViewerSorter getFavoritesTable
Constructs a favorites dialog param parent Shell shell to open the dialog on param history launch history to edit public Favorites Dialog Shell parent Shell Launch History history super parent Shell set Shell Style get Shell Style SWT RESIZE f History history  parentShell FavoritesDialog parentShell LaunchHistory parentShell setShellStyle getShellStyle fHistory
The add config button has been pressed protected void handle Add Config Button Selected List Selection Dialog dialog new List Selection Dialog f Favorites Table get Control get Shell get Mode new Launch Configuration Content Provider DebugUI Tools new Debug Model Presentation Launch Configurations Messages get String Favorites Dialog 7 NON NLS 1 dialog open Object selection dialog get Result if selection null for int i 0 i selection length i get Favorites add selection i update Status  handleAddConfigButtonSelected ListSelectionDialog ListSelectionDialog fFavoritesTable getControl getShell getMode LaunchConfigurationContentProvider DebugUITools newDebugModelPresentation LaunchConfigurationsMessages getString FavoritesDialog getResult getFavorites updateStatus
The remove favorites button has been pressed protected void remove Selected Favorites I Structured Selection sel I Structured Selection get Favorites Table get Selection Iterator iter sel iterator while iter has Next Object config iter next get Favorites remove config get Favorites Table refresh  removeSelectedFavorites IStructuredSelection IStructuredSelection getFavoritesTable getSelection hasNext getFavorites getFavoritesTable
The move up button has been pressed protected void handle Move Up Button Selected handle Move 1  handleMoveUpButtonSelected handleMove
The move down button has been pressed protected void handle Move Down Button Selected handle Move 1  handleMoveDownButtonSelected handleMove
protected void handle Move int direction I Structured Selection sel I Structured Selection get Favorites Table get Selection List sel List sel to List Object moved Favs new Object get Favorites size int i for Iterator favs sel List iterator favs has Next Object config favs next i get Favorites index Of config moved Favs i direction config get Favorites remove All sel List for int j 0 j moved Favs length j Object config moved Favs j if config null get Favorites add j config get Favorites Table refresh handle Favorite Selection Changed  handleMove IStructuredSelection IStructuredSelection getFavoritesTable getSelection selList toList movedFavs getFavorites selList hasNext getFavorites indexOf movedFavs getFavorites removeAll selList movedFavs movedFavs getFavorites getFavoritesTable handleFavoriteSelectionChanged
Returns the table of favorite launch configurations return table viewer protected Table Viewer get Favorites Table return f Favorites Table  TableViewer getFavoritesTable fFavoritesTable
protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent get Shell set Text Message Format format Launch Configurations Messages get String Favorites Dialog 1 new String DebugUI Plugin remove Accelerators f History get Launch Group get Label NON NLS 1 create Favorites Area composite return composite  createDialogArea createDialogArea getShell setText MessageFormat LaunchConfigurationsMessages getString FavoritesDialog DebugUIPlugin removeAccelerators fHistory getLaunchGroup getLabel createFavoritesArea
protected void create Favorites Area Composite parent Composite top Comp new Composite parent SWT NULL Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 2 top Comp set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH top Comp set Layout Data gd top Comp set Font parent get Font Create favorite config area create Label top Comp Launch Configurations Messages get String Favorites Dialog 2 NON NLS 1 f Favorites Table create Table top Comp new Favorites Content Provider Composite button Comp create Button Composite top Comp f Add Favorite Button create Push Button button Comp Launch Configurations Messages get String Favorites Dialog 3 NON NLS 1 f Add Favorite Button set Enabled true f Remove Favorites Button create Push Button button Comp Launch Configurations Messages get String Favorites Dialog 4 NON NLS 1 f Move Up Button create Push Button button Comp Launch Configurations Messages get String Favorites Dialog 5 NON NLS 1 f Move Down Button create Push Button button Comp Launch Configurations Messages get String Favorites Dialog 6 NON NLS 1  createFavoritesArea topComp GridLayout GridLayout marginHeight marginWidth numColumns topComp setLayout GridData GridData GridData FILL_BOTH topComp setLayoutData topComp setFont getFont createLabel topComp LaunchConfigurationsMessages getString FavoritesDialog fFavoritesTable createTable topComp FavoritesContentProvider buttonComp createButtonComposite topComp fAddFavoriteButton createPushButton buttonComp LaunchConfigurationsMessages getString FavoritesDialog fAddFavoriteButton setEnabled fRemoveFavoritesButton createPushButton buttonComp LaunchConfigurationsMessages getString FavoritesDialog fMoveUpButton createPushButton buttonComp LaunchConfigurationsMessages getString FavoritesDialog fMoveDownButton createPushButton buttonComp LaunchConfigurationsMessages getString FavoritesDialog
Creates a fully configured table with the given content provider private Table Viewer create Table Composite parent I Content Provider content Provider Table Viewer table Viewer new Table Viewer parent SWT MULTI SWT BORDER SWT FULL SELECTION table Viewer set Label Provider DebugUI Tools new Debug Model Presentation table Viewer set Content Provider content Provider table Viewer set Input DebugUI Plugin get Default Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint 100 gd height Hint 100 table Viewer get Table set Layout Data gd table Viewer get Table set Font parent get Font table Viewer add Selection Changed Listener f Selection Changed Listener table Viewer get Control add Key Listener f Key Listener return table Viewer  TableViewer createTable IContentProvider contentProvider TableViewer tableViewer TableViewer FULL_SELECTION tableViewer setLabelProvider DebugUITools newDebugModelPresentation tableViewer setContentProvider contentProvider tableViewer setInput DebugUIPlugin getDefault GridData GridData GridData FILL_BOTH widthHint heightHint tableViewer getTable setLayoutData tableViewer getTable setFont getFont tableViewer addSelectionChangedListener fSelectionChangedListener tableViewer getControl addKeyListener fKeyListener tableViewer
Creates and returns a fully configured push button in the given paren with the given label private Button create Push Button Composite parent String label Button button new Button parent SWT PUSH button set Text label button set Font parent get Font set Button Layout Data button button add Selection Listener f Button Listener button set Enabled false return button  createPushButton setText setFont getFont setButtonLayoutData addSelectionListener fButtonListener setEnabled
Creates a fully configured composite to add buttons to private Composite create Button Composite Composite parent Composite composite new Composite parent SWT NONE Grid Data gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING composite set Layout Data gd Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 1 composite set Layout layout composite set Font parent get Font return composite  createButtonComposite GridData GridData GridData VERTICAL_ALIGN_BEGINNING setLayoutData GridLayout GridLayout marginHeight marginWidth numColumns setLayout setFont getFont
Creates a fully configured label with the given text private Label create Label Composite parent String label Text Label label new Label parent SWT LEFT label set Text label Text Grid Data gd new Grid Data gd horizontal Span 2 label set Layout Data gd label set Font parent get Font return label  createLabel labelText setText labelText GridData GridData horizontalSpan setLayoutData setFont getFont
Returns the current list of favorites protected List get Favorites if f Favorites null I Launch Configuration favs get Initial Favorites f Favorites new Array List favs length add All favs f Favorites return f Favorites  getFavorites fFavorites ILaunchConfiguration getInitialFavorites fFavorites ArrayList addAll fFavorites fFavorites
protected Launch History get Launch History return f History  LaunchHistory getLaunchHistory fHistory
Returns the initial content for the favorites list protected I Launch Configuration get Initial Favorites return get Launch History get Favorites  ILaunchConfiguration getInitialFavorites getLaunchHistory getFavorites
Returns the mode of this page run or debug protected String get Mode return get Launch History get Launch Group get Mode  getMode getLaunchHistory getLaunchGroup getMode
Copies the array into the list protected void add All Object array List list for int i 0 i array length i list add array i  addAll
Refresh all tables and buttons protected void update Status get Favorites Table refresh handle Favorite Selection Changed  updateStatus getFavoritesTable handleFavoriteSelectionChanged
The selection in the favorites list has changed protected void handle Favorite Selection Changed I Structured Selection selection I Structured Selection get Favorites Table get Selection List favs get Favorites boolean not Empty selection is Empty Iterator elements selection iterator boolean first false boolean last false int last Fav favs size 1 while elements has Next Object element elements next if first favs index Of element 0 first true if last favs index Of element last Fav last true f Remove Favorites Button set Enabled not Empty f Move Up Button set Enabled not Empty first f Move Down Button set Enabled not Empty last  handleFavoriteSelectionChanged IStructuredSelection IStructuredSelection getFavoritesTable getSelection getFavorites notEmpty isEmpty lastFav hasNext indexOf indexOf lastFav fRemoveFavoritesButton setEnabled notEmpty fMoveUpButton setEnabled notEmpty fMoveDownButton setEnabled notEmpty
Method performOK public void save Favorites I Launch Configuration initial get Initial Favorites List current get Favorites String group Id get Launch History get Launch Group get Identifier removed favorites for int i 0 i initial length i I Launch Configuration configuration initial i if current contains configuration else remove fav attributes try I Launch Configuration Working Copy working Copy configuration get Working Copy working Copy set Attribute I DebugUI Constants ATTR DEBUG FAVORITE String null working Copy set Attribute I DebugUI Constants ATTR DEBUG FAVORITE String null List groups working Copy get Attribute I DebugUI Constants ATTR FAVORITE GROUPS List null if groups null groups remove group Id if groups is Empty groups null working Copy set Attribute I DebugUI Constants ATTR FAVORITE GROUPS groups working Copy do Save catch Core Exception e DebugUI Plugin log e update added favorites Iterator favs current iterator while favs has Next I Launch Configuration configuration I Launch Configuration favs next try List groups configuration get Attribute I DebugUI Constants ATTR FAVORITE GROUPS List null if groups null groups new Array List if groups contains group Id groups add group Id I Launch Configuration Working Copy working Copy configuration get Working Copy working Copy set Attribute I DebugUI Constants ATTR FAVORITE GROUPS groups working Copy do Save catch Core Exception e DebugUI Plugin log e f History set Favorites get Array current  saveFavorites ILaunchConfiguration getInitialFavorites getFavorites groupId getLaunchHistory getLaunchGroup getIdentifier ILaunchConfiguration ILaunchConfigurationWorkingCopy workingCopy getWorkingCopy workingCopy setAttribute IDebugUIConstants ATTR_DEBUG_FAVORITE workingCopy setAttribute IDebugUIConstants ATTR_DEBUG_FAVORITE workingCopy getAttribute IDebugUIConstants ATTR_FAVORITE_GROUPS groupId isEmpty workingCopy setAttribute IDebugUIConstants ATTR_FAVORITE_GROUPS workingCopy doSave CoreException DebugUIPlugin hasNext ILaunchConfiguration ILaunchConfiguration getAttribute IDebugUIConstants ATTR_FAVORITE_GROUPS ArrayList groupId groupId ILaunchConfigurationWorkingCopy workingCopy getWorkingCopy workingCopy setAttribute IDebugUIConstants ATTR_FAVORITE_GROUPS workingCopy doSave CoreException DebugUIPlugin fHistory setFavorites getArray
protected I Launch Configuration get Array List list return I Launch Configuration list to Array new I Launch Configuration list size  ILaunchConfiguration getArray ILaunchConfiguration toArray ILaunchConfiguration
see org eclipse jface dialogs Dialog ok Pressed protected void ok Pressed save Favorites super ok Pressed  okPressed okPressed saveFavorites okPressed
see org eclipse jface window Window close public boolean close Dialog Settings Helper persist Shell Geometry get Shell get Dialog Settings Section Name return super close  DialogSettingsHelper persistShellGeometry getShell getDialogSettingsSectionName
protected Point get Initial Location Point initial Size Point initial Location Dialog Settings Helper get Initial Location get Dialog Settings Section Name if initial Location null return initial Location return super get Initial Location initial Size  getInitialLocation initialSize initialLocation DialogSettingsHelper getInitialLocation getDialogSettingsSectionName initialLocation initialLocation getInitialLocation initialSize
see org eclipse jface window Window get Initial Size protected Point get Initial Size Point size super get Initial Size return Dialog Settings Helper get Initial Size get Dialog Settings Section Name size  getInitialSize getInitialSize getInitialSize DialogSettingsHelper getInitialSize getDialogSettingsSectionName
Returns the name of the section that this dialog stores its settings in return String private String get Dialog Settings Section Name return FAVORITES DIALOG SECTION NON NLS 1  getDialogSettingsSectionName FAVORITES_DIALOG_SECTION

Constructs a dialog param shell param launch Configuration param group public Launch Configuration Dialog Shell shell I Launch Configuration launch Configuration Launch Group Extension group super shell launch Configuration group  launchConfiguration LaunchConfigurationDialog ILaunchConfiguration launchConfiguration LaunchGroupExtension launchConfiguration
This dialog has Launch and Close buttons see org eclipse jface dialogs Dialog create Buttons For Button Bar Composite protected void create Buttons For Button Bar Composite parent create Button parent ID LAUNCH BUTTON get Launch Button Text true create Button parent ID CLOSE BUTTON Launch Configurations Messages get String Launch Configuration Dialog Close 1 false NON NLS 1  createButtonsForButtonBar createButtonsForButtonBar createButton ID_LAUNCH_BUTTON getLaunchButtonText createButton ID_CLOSE_BUTTON LaunchConfigurationsMessages getString LaunchConfigurationDialog Close_1
protected String get Shell Title return get Launch Configuration get Name  getShellTitle getLaunchConfiguration getName
protected String get Title Area Title return Launch Configurations Messages get String Launch Configuration Dialog Modify attributes and launch  1 NON NLS 1  getTitleAreaTitle LaunchConfigurationsMessages getString LaunchConfigurationDialog Modify_attributes_and_launch _1
see I Launch Configuration Dialog update Buttons public void update Buttons Launch button get Tab Viewer refresh get Button ID LAUNCH BUTTON set Enabled get Tab Viewer can Launch  ILaunchConfigurationDialog updateButtons updateButtons getTabViewer getButton ID_LAUNCH_BUTTON setEnabled getTabViewer canLaunch
protected String get Help Context Id return I Debug Help Context Ids SINGLE LAUNCH CONFIGURATION DIALOG  getHelpContextId IDebugHelpContextIds SINGLE_LAUNCH_CONFIGURATION_DIALOG
protected void initialize Content get Tab Viewer set Input get Launch Configuration I Status status get Initial Status if status null handle Status status  initializeContent getTabViewer setInput getLaunchConfiguration IStatus getInitialStatus handleStatus
Returns the name of the section that this dialog stores its settings in return String protected String get Dialog Settings Section Name return I DebugUI Constants PLUGIN ID SINGLE LAUNCH CONFIGURATION DIALOG SECTION NON NLS 1  getDialogSettingsSectionName IDebugUIConstants PLUGIN_ID SINGLE_LAUNCH_CONFIGURATION_DIALOG_SECTION

public void startup I Launch Manager launch Manager Debug Plugin get Default get Launch Manager launch Manager add Launch Listener this update histories for launches already registered I Launch launches launch Manager get Launches for int i 0 i launches length i launch Added launches i  ILaunchManager launchManager DebugPlugin getDefault getLaunchManager launchManager addLaunchListener ILaunch launchManager getLaunches launchAdded
Returns whether any launch config supports the given mode param mode launch mode return whether any launch config supports the given mode public boolean launch Mode Available String mode if f Loaded Modes null I Launch Manager launch Manager Debug Plugin get Default get Launch Manager I Launch Configuration Type types launch Manager get Launch Configuration Types I Launch Mode modes launch Manager get Launch Modes f Loaded Modes new Hash Set 3 for int i 0 i types length i I Launch Configuration Type type types i for int j 0 j modes length j I Launch Mode launch Mode modes j if type supports Mode launch Mode get Identifier f Loaded Modes add launch Mode get Identifier return f Loaded Modes contains mode  launchModeAvailable fLoadedModes ILaunchManager launchManager DebugPlugin getDefault getLaunchManager ILaunchConfigurationType launchManager getLaunchConfigurationTypes ILaunchMode launchManager getLaunchModes fLoadedModes HashSet ILaunchConfigurationType ILaunchMode launchMode supportsMode launchMode getIdentifier fLoadedModes launchMode getIdentifier fLoadedModes
Returns whether the given launch configuraiton should be visible in the debug ui If the config is marked as private or belongs to a different category i e non null then this configuration should not be displayed in the debug ui param launch Configuration return boolean public static boolean is Visible I Launch Configuration launch Configuration try return launch Configuration get Attribute I DebugUI Constants ATTR PRIVATE false catch Core Exception e return false  launchConfiguration isVisible ILaunchConfiguration launchConfiguration launchConfiguration getAttribute IDebugUIConstants ATTR_PRIVATE CoreException
Returns a collection of launch configurations that does not contain configs from disabled activities param configurations a collection of configurations return the given collection minus any configurations from disabled activities public static I Launch Configuration filter Configs I Launch Configuration configurations I Workbench Activity Support activity Support PlatformUI get Workbench get Activity Support if activity Support null return configurations List filtered Configs new Array List for int i 0 i configurations length i I Launch Configuration configuration configurations i I Launch Configuration Type type null try type configuration get Type Launch Configuration Type Contribution contribution new Launch Configuration Type Contribution type if Workbench Activity Helper filter Item contribution filtered Configs add configuration catch Core Exception e DebugUI Plugin log e get Status return I Launch Configuration filtered Configs to Array new I Launch Configuration filtered Configs size  ILaunchConfiguration filterConfigs ILaunchConfiguration IWorkbenchActivitySupport activitySupport getWorkbench getActivitySupport activitySupport filteredConfigs ArrayList ILaunchConfiguration ILaunchConfigurationType getType LaunchConfigurationTypeContribution LaunchConfigurationTypeContribution WorkbenchActivityHelper filterItem filteredConfigs CoreException DebugUIPlugin getStatus ILaunchConfiguration filteredConfigs toArray ILaunchConfiguration filteredConfigs
public void shutdown I Launch Manager launch Manager Debug Plugin get Default get Launch Manager launch Manager remove Launch Listener this if f Launch Histories null Iterator histories f Launch Histories values iterator while histories has Next Launch History history Launch History histories next history dispose  ILaunchManager launchManager DebugPlugin getDefault getLaunchManager launchManager removeLaunchListener fLaunchHistories fLaunchHistories hasNext LaunchHistory LaunchHistory
see I Launch Listener launch Removed I Launch public void launch Removed I Launch launch  ILaunchListener launchRemoved ILaunch launchRemoved ILaunch
see I Launch Listener launch Changed I Launch public void launch Changed I Launch launch  ILaunchListener launchChanged ILaunch launchChanged ILaunch
Must not assume that will only be called from the UI thread see I Launch Listener launch Added I Launch public void launch Added final I Launch launch remove Terminated Launches launch  ILaunchListener launchAdded ILaunch launchAdded ILaunch removeTerminatedLaunches
protected void remove Terminated Launches I Launch new Launch if DebugUI Plugin get Default get Preference Store get Boolean I DebugUI Constants PREF AUTO REMOVE OLD LAUNCHES I Launch Manager l Manager Debug Plugin get Default get Launch Manager Object launches l Manager get Launches for int i 0 i launches length i I Launch launch I Launch launches i if launch new Launch launch is Terminated l Manager remove Launch launch  removeTerminatedLaunches ILaunch newLaunch DebugUIPlugin getDefault getPreferenceStore getBoolean IDebugUIConstants PREF_AUTO_REMOVE_OLD_LAUNCHES ILaunchManager lManager DebugPlugin getDefault getLaunchManager lManager getLaunches ILaunch ILaunch newLaunch isTerminated lManager removeLaunch
Returns the most recent launch for the given group or code null code if none return the last launch or code null code if none public I Launch Configuration get Last Launch String group Id Launch History history get Launch History group Id if history null return history get Recent Launch return null  ILaunchConfiguration getLastLaunch groupId LaunchHistory getLaunchHistory groupId getRecentLaunch
Add the specified listener to the list of listeners that will be notified when the launch history changes public void add Launch History Listener I Launch History Changed Listener listener if f Launch History Changed Listeners contains listener f Launch History Changed Listeners add listener  addLaunchHistoryListener ILaunchHistoryChangedListener fLaunchHistoryChangedListeners fLaunchHistoryChangedListeners
Remove the specified listener from the list of listeners that will be notified when the launch history changes public void remove Launch History Listener I Launch History Changed Listener listener f Launch History Changed Listeners remove listener  removeLaunchHistoryListener ILaunchHistoryChangedListener fLaunchHistoryChangedListeners
Notify all launch history listeners that the launch history has changed in some way protected void fire Launch History Changed Iterator iterator f Launch History Changed Listeners iterator while iterator has Next I Launch History Changed Listener listener I Launch History Changed Listener iterator next listener launch History Changed  fireLaunchHistoryChanged fLaunchHistoryChangedListeners hasNext ILaunchHistoryChangedListener ILaunchHistoryChangedListener launchHistoryChanged
protected String get History AsXML throws Core Exception Parser Configuration Exception Transformer Exception IO Exception Document doc DebugUI Plugin get Document Element history Root Element doc create Element HISTORY ROOT NODE doc append Child history Root Element Iterator histories f Launch Histories values iterator while histories has Next Launch History history Launch History histories next create Entry doc history Root Element history get Launch Group get Mode history get History create Entry doc history Root Element history get Launch Group get Mode history get Favorites I Launch Configuration configuration history get Recent Launch if configuration null configuration exists Element last doc create Element HISTORY LAST LAUNCH NODE last set Attribute HISTORY MEMENTO ATT configuration get Memento last set Attribute HISTORY MODE ATT history get Launch Group get Mode history Root Element append Child last return DebugUI Plugin serialize Document doc  getHistoryAsXML CoreException ParserConfigurationException TransformerException IOException DebugUIPlugin getDocument historyRootElement createElement HISTORY_ROOT_NODE appendChild historyRootElement fLaunchHistories hasNext LaunchHistory LaunchHistory createEntry historyRootElement getLaunchGroup getMode getHistory createEntry historyRootElement getLaunchGroup getMode getFavorites ILaunchConfiguration getRecentLaunch createElement HISTORY_LAST_LAUNCH_NODE setAttribute HISTORY_MEMENTO_ATT getMemento setAttribute HISTORY_MODE_ATT getLaunchGroup getMode historyRootElement appendChild DebugUIPlugin serializeDocument
protected void create Entry Document doc Element history Root Element String mode I Launch Configuration configurations throws Core Exception for int i 0 i configurations length i I Launch Configuration configuration configurations i if configuration exists Element launch doc create Element HISTORY LAUNCH NODE launch set Attribute HISTORY MEMENTO ATT configuration get Memento launch set Attribute HISTORY MODE ATT mode history Root Element append Child launch  createEntry historyRootElement ILaunchConfiguration CoreException ILaunchConfiguration createElement HISTORY_LAUNCH_NODE setAttribute HISTORY_MEMENTO_ATT getMemento setAttribute HISTORY_MODE_ATT historyRootElement appendChild
protected I Path get History File Path return DebugUI Plugin get Default get State Location append LAUNCH CONFIGURATION HISTORY FILENAME  IPath getHistoryFilePath DebugUIPlugin getDefault getStateLocation LAUNCH_CONFIGURATION_HISTORY_FILENAME
Write out an XML file indicating the entries on the run debug history lists and the most recent launch protected void persist Launch History throws IO Exception Core Exception Transformer Exception Parser Configuration Exception if f Restoring return I Path history Path get History File Path String os History Path history Path toOS String String xml get History AsXML File file new File os History Path file create New File File Output Stream stream new File Output Stream file stream write xml get Bytes UTF8 NON NLS 1 stream close fire Launch History Changed  persistLaunchHistory IOException CoreException TransformerException ParserConfigurationException fRestoring IPath historyPath getHistoryFilePath osHistoryPath historyPath toOSString getHistoryAsXML osHistoryPath createNewFile FileOutputStream FileOutputStream getBytes fireLaunchHistoryChanged
Find the XML history file and parse it Place the corresponding configs in the appropriate history and set the most recent launch private void restore Launch History Find the history file I Path history Path get History File Path String os History Path history Path toOS String File file new File os History Path If no history file nothing to do if file exists return File Input Stream stream null Element root History Element null try Parse the history file stream new File Input Stream file root History Element null try Document Builder parser Document Builder Factory new Instance new Document Builder root History Element parser parse new Input Source stream get Document Element catch SAX Exception e DebugUI Plugin log e return catch Parser Configuration Exception e DebugUI Plugin log e return finally stream close catch IO Exception exception DebugUI Plugin log exception return If root node isn t what we expect return if root History Element get Node Name equals Ignore Case HISTORY ROOT NODE return For each child of the root node construct a launch config handle and add it to the appropriate history or set the most recent launch Collection l f Launch Histories values Launch History histories Launch History l to Array new Launch History l size Node List list root History Element get Child Nodes int length list get Length for int i 0 i length i Node node list item i short type node get Node Type if type Node ELEMENT NODE Element entry Element node if entry get Node Name equals Ignore Case HISTORY LAUNCH NODE create History Element entry histories else if entry get Node Name equals Ignore Case HISTORY LAST LAUNCH NODE create Recent Element entry histories  restoreLaunchHistory IPath historyPath getHistoryFilePath osHistoryPath historyPath toOSString osHistoryPath FileInputStream rootHistoryElement FileInputStream rootHistoryElement DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder rootHistoryElement InputSource getDocumentElement SAXException DebugUIPlugin ParserConfigurationException DebugUIPlugin IOException DebugUIPlugin rootHistoryElement getNodeName equalsIgnoreCase HISTORY_ROOT_NODE fLaunchHistories LaunchHistory LaunchHistory toArray LaunchHistory NodeList rootHistoryElement getChildNodes getLength getNodeType ELEMENT_NODE getNodeName equalsIgnoreCase HISTORY_LAUNCH_NODE createHistoryElement getNodeName equalsIgnoreCase HISTORY_LAST_LAUNCH_NODE createRecentElement
Construct a launch configuration corresponding to the specified XML element and place it in the approriate history private void create History Element Element entry Launch History histories String memento entry get Attribute HISTORY MEMENTO ATT String mode entry get Attribute HISTORY MODE ATT try I Launch Configuration launch Config Debug Plugin get Default get Launch Manager get Launch Configuration memento if launch Config exists for int i 0 i histories length i Launch History history histories i if history accepts launch Config history get Launch Group get Mode equals mode history add History launch Config false catch Core Exception e DebugUI Plugin log e  createHistoryElement LaunchHistory getAttribute HISTORY_MEMENTO_ATT getAttribute HISTORY_MODE_ATT ILaunchConfiguration launchConfig DebugPlugin getDefault getLaunchManager getLaunchConfiguration launchConfig LaunchHistory launchConfig getLaunchGroup getMode addHistory launchConfig CoreException DebugUIPlugin
Construct a launch configuration corresponding to the specified XML element and place it in the approriate history s recent launch private void create Recent Element Element entry Launch History histories String memento entry get Attribute HISTORY MEMENTO ATT String mode entry get Attribute HISTORY MODE ATT try I Launch Configuration launch Config Debug Plugin get Default get Launch Manager get Launch Configuration memento if launch Config exists for int i 0 i histories length i Launch History history histories i if history accepts launch Config history get Launch Group get Mode equals mode history set Recent Launch launch Config catch Core Exception e if e get Status get Code Debug Exception MISSING LAUNCH CONFIGURATION TYPE only log the error if it s not a missing type definition DebugUI Plugin log e  createRecentElement LaunchHistory getAttribute HISTORY_MEMENTO_ATT getAttribute HISTORY_MODE_ATT ILaunchConfiguration launchConfig DebugPlugin getDefault getLaunchManager getLaunchConfiguration launchConfig LaunchHistory launchConfig getLaunchGroup getMode setRecentLaunch launchConfig CoreException getStatus getCode DebugException MISSING_LAUNCH_CONFIGURATION_TYPE DebugUIPlugin
Load all registered extensions of the launch shortcut extension point private void load Launch Shortcuts Get the configuration elements I Extension Point extension Point Platform get Extension Registry get Extension Point DebugUI Plugin get Unique Identifier I DebugUI Constants EXTENSION POINT LAUNCH SHORTCUTS I Configuration Element infos extension Point get Configuration Elements Load the configuration elements into a Map f Launch Shortcuts new Array List infos length for int i 0 i infos length i Launch Shortcut Extension ext new Launch Shortcut Extension infos i f Launch Shortcuts add ext Collections sort f Launch Shortcuts new Shortcut Comparator  loadLaunchShortcuts IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugUIPlugin getUniqueIdentifier IDebugUIConstants EXTENSION_POINT_LAUNCH_SHORTCUTS IConfigurationElement extensionPoint getConfigurationElements fLaunchShortcuts ArrayList LaunchShortcutExtension LaunchShortcutExtension fLaunchShortcuts fLaunchShortcuts ShortcutComparator
Load all registered extensions of the launch groups extension point private void load Launch Groups if f Launch Groups null Get the configuration elements I Extension Point extension Point Platform get Extension Registry get Extension Point DebugUI Plugin get Unique Identifier I DebugUI Constants EXTENSION POINT LAUNCH GROUPS I Configuration Element infos extension Point get Configuration Elements Load the configuration elements into a Map f Launch Groups new Hash Map infos length for int i 0 i infos length i Launch Group Extension ext new Launch Group Extension infos i f Launch Groups put ext get Identifier ext  loadLaunchGroups fLaunchGroups IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugUIPlugin getUniqueIdentifier IDebugUIConstants EXTENSION_POINT_LAUNCH_GROUPS IConfigurationElement extensionPoint getConfigurationElements fLaunchGroups HashMap LaunchGroupExtension LaunchGroupExtension fLaunchGroups getIdentifier
Returns all launch shortcuts return all launch shortcuts public List get Launch Shortcuts if f Launch Shortcuts null load Launch Shortcuts return f Launch Shortcuts  getLaunchShortcuts fLaunchShortcuts loadLaunchShortcuts fLaunchShortcuts
Returns all launch shortcuts for the given category return all launch shortcuts public List get Launch Shortcuts String category return filter Shortcuts get Launch Shortcuts category  getLaunchShortcuts filterShortcuts getLaunchShortcuts
Return a list of filtered launch shortcuts based on the given category param unfiltered param category return List protected List filter Shortcuts List unfiltered String category List filtered new Array List unfiltered size Iterator iter unfiltered iterator while iter has Next Launch Shortcut Extension extension Launch Shortcut Extension iter next if category null if extension get Category null filtered add extension else if category equals extension get Category filtered add extension return filtered  filterShortcuts ArrayList hasNext LaunchShortcutExtension LaunchShortcutExtension getCategory getCategory
Returns all launch shortcuts defined for the given perspective empty list if none param perpsective perspective identifier return all launch shortcuts defined for the given perspective empty list if none public List get Launch Shortcuts String perpsective String category if f Launch Shortcuts By Perspective null Iterator shortcuts get Launch Shortcuts iterator f Launch Shortcuts By Perspective new Hash Map 10 while shortcuts has Next Launch Shortcut Extension ext Launch Shortcut Extension shortcuts next Iterator perspectives ext get Perspectives iterator while perspectives has Next String id String perspectives next List list List f Launch Shortcuts By Perspective get id if list null list new Array List 4 f Launch Shortcuts By Perspective put id list list add ext List list List f Launch Shortcuts By Perspective get perpsective if list null return new Array List else return filter Shortcuts list category  getLaunchShortcuts fLaunchShortcutsByPerspective getLaunchShortcuts fLaunchShortcutsByPerspective HashMap hasNext LaunchShortcutExtension LaunchShortcutExtension getPerspectives hasNext fLaunchShortcutsByPerspective ArrayList fLaunchShortcutsByPerspective fLaunchShortcutsByPerspective ArrayList filterShortcuts
Returns the image used to display an error in the given tab public Image get Error Tab Image I Launch Configuration Tab tab if f Error Images null f Error Images new Image Registry String key tab get Class get Name Image image f Error Images get key if image null create image Image base tab get Image if base null base Debug Plugin Images get Image I Internal DebugUI Constants IMG OVR TRANSPARENT base new Image Display get Current base SWT IMAGE COPY Launch Configuration Tab Image Descriptor desc new Launch Configuration Tab Image Descriptor base Launch Configuration Tab Image Descriptor ERROR image desc create Image f Error Images put key image return image  getErrorTabImage ILaunchConfigurationTab fErrorImages fErrorImages ImageRegistry getClass getName fErrorImages getImage DebugPluginImages getImage IInternalDebugUIConstants IMG_OVR_TRANSPARENT getCurrent IMAGE_COPY LaunchConfigurationTabImageDescriptor LaunchConfigurationTabImageDescriptor LaunchConfigurationTabImageDescriptor createImage fErrorImages
Return the launch group with the given id or code null code return the launch group with the given id or code null code public Launch Group Extension get Launch Group String id if f Launch Groups null load Launch Groups return Launch Group Extension f Launch Groups get id  LaunchGroupExtension getLaunchGroup fLaunchGroups loadLaunchGroups LaunchGroupExtension fLaunchGroups
Return all defined launch groups return all defined launch groups public I Launch Group get Launch Groups if f Launch Groups null load Launch Groups Collection groups f Launch Groups values return I Launch Group groups to Array new I Launch Group groups size  ILaunchGroup getLaunchGroups fLaunchGroups loadLaunchGroups fLaunchGroups ILaunchGroup toArray ILaunchGroup
Return the launch history with the given group id or code null code return the launch history with the given group id or code null code public Launch History get Launch History String id if f Launch Histories null load Launch Histories return Launch History f Launch Histories get id  LaunchHistory getLaunchHistory fLaunchHistories loadLaunchHistories LaunchHistory fLaunchHistories
Restore launch history private void load Launch Histories if f Launch Histories null f Restoring true I Launch Group groups get Launch Groups f Launch Histories new Hash Map groups length for int i 0 i groups length i I Launch Group extension groups i if extension is Public f Launch Histories put extension get Identifier new Launch History extension restore Launch History f Restoring false  loadLaunchHistories fLaunchHistories fRestoring ILaunchGroup getLaunchGroups fLaunchHistories HashMap ILaunchGroup isPublic fLaunchHistories getIdentifier LaunchHistory restoreLaunchHistory fRestoring
Returns the default launch group for the given mode param mode return launch group public Launch Group Extension get Default Lanuch Group String mode if mode equals I Launch Manager DEBUG MODE return get Launch Group I DebugUI Constants ID DEBUG LAUNCH GROUP else return get Launch Group I DebugUI Constants ID RUN LAUNCH GROUP  LaunchGroupExtension getDefaultLanuchGroup ILaunchManager DEBUG_MODE getLaunchGroup IDebugUIConstants ID_DEBUG_LAUNCH_GROUP getLaunchGroup IDebugUIConstants ID_RUN_LAUNCH_GROUP
Returns the launch group the given launch configuration belongs to in the specified mode or code null code if none param configuration param mode return the launch group the given launch configuration belongs to in the specified mode or code null code if none public I Launch Group get Launch Group I Launch Configuration configuration String mode try String category configuration get Category I Launch Group groups get Launch Groups for int i 0 i groups length i I Launch Group extension groups i if category null if extension get Category null extension get Mode equals mode return extension else if category equals extension get Category if extension get Mode equals mode return extension catch Core Exception e DebugUI Plugin log e return null  ILaunchGroup getLaunchGroup ILaunchConfiguration getCategory ILaunchGroup getLaunchGroups ILaunchGroup getCategory getMode getCategory getMode CoreException DebugUIPlugin
Returns the private launch configuration used as a placeholder to represent store the information associated with a launch configuration type param type launch configuration type return launch configuration since 3 0 public static I Launch Configuration get Shared Type Config I Launch Configuration Type type throws Core Exception String id type get Identifier String name id SHARED INFO NON NLS 1 I Launch Configuration shared null I Launch Configuration configurations Debug Plugin get Default get Launch Manager get Launch Configurations type for int i 0 i configurations length i I Launch Configuration configuration configurations i if configuration get Name equals name shared configuration break if shared null create a new shared config I Launch Configuration Working Copy working Copy working Copy type new Instance null name working Copy set Attribute I DebugUI Constants ATTR PRIVATE true null entries indicate default settings save shared working Copy do Save return shared  ILaunchConfiguration getSharedTypeConfig ILaunchConfigurationType CoreException getIdentifier SHARED_INFO ILaunchConfiguration ILaunchConfiguration DebugPlugin getDefault getLaunchManager getLaunchConfigurations ILaunchConfiguration getName ILaunchConfigurationWorkingCopy workingCopy workingCopy newInstance workingCopy setAttribute IDebugUIConstants ATTR_PRIVATE workingCopy doSave
class Shortcut Comparator implements Comparator see Comparator compare Object Object public int compare Object a Object b String labelA Launch Shortcut Extension a get Label String labelB Launch Shortcut Extension b get Label null labels sort last i e highest if labelA labelB return 0 if labelA null return 1 if labelB null return 1 return labelA compare To Ignore Case labelB  ShortcutComparator LaunchShortcutExtension getLabel LaunchShortcutExtension getLabel compareToIgnoreCase

Constructs the singleton launch configuration presentation manager private Launch Configuration Presentation Manager fg Default this initialize Tab Group Extensions  LaunchConfigurationPresentationManager fgDefault initializeTabGroupExtensions
Returns the launch configuration presentation manager public static Launch Configuration Presentation Manager get Default if fg Default null fg Default new Launch Configuration Presentation Manager return fg Default  LaunchConfigurationPresentationManager getDefault fgDefault fgDefault LaunchConfigurationPresentationManager fgDefault
Creates launch configuration tab group extensions for each extension defined in XML and adds them to the table of tab group extensions private void initialize Tab Group Extensions f Tab Group Extensions new Hashtable I Extension Point extension Point Platform get Extension Registry get Extension Point DebugUI Plugin get Unique Identifier I DebugUI Constants EXTENSION POINT LAUNCH CONFIGURATION TAB GROUPS I Configuration Element groups extension Point get Configuration Elements for int i 0 i groups length i Launch Configuration Tab Group Extension group new Launch Configuration Tab Group Extension groups i String type Id group get Type Identifier if type Id null I Extension ext groups i get Declaring Extension I Status status new Status I Status ERROR I DebugUI Constants PLUGIN ID I DebugUI Constants STATUS INVALID EXTENSION DEFINITION Message Format format Launch Configurations Messages get String Launch Configuration Presentation Manager Launch configuration tab group extension  0  does not specify launch configuration type 1 new String ext get Unique Identifier null NON NLS 1 DebugUI Plugin log status else verify it references a valid launch configuration type I Launch Configuration Type lct Debug Plugin get Default get Launch Manager get Launch Configuration Type type Id if lct null I Extension ext groups i get Declaring Extension I Status status new Status I Status ERROR I DebugUI Constants PLUGIN ID I DebugUI Constants STATUS INVALID EXTENSION DEFINITION Message Format format Launch Configurations Messages get String Launch Configuration Presentation Manager Launch configuration tab group extension  0  refers to non existant launch configuration type  1  2 new String ext get Unique Identifier type Id null NON NLS 1 DebugUI Plugin log status if type Id null get the map for the config type Map map Map f Tab Group Extensions get type Id if map null map new Hashtable f Tab Group Extensions put type Id map Set modes group get Modes if modes null default tabs store with map put group NON NLS 1 else store per mode Iterator iterator modes iterator while iterator has Next map put iterator next group  initializeTabGroupExtensions fTabGroupExtensions IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugUIPlugin getUniqueIdentifier IDebugUIConstants EXTENSION_POINT_LAUNCH_CONFIGURATION_TAB_GROUPS IConfigurationElement extensionPoint getConfigurationElements LaunchConfigurationTabGroupExtension LaunchConfigurationTabGroupExtension typeId getTypeIdentifier typeId IExtension getDeclaringExtension IStatus IStatus IDebugUIConstants PLUGIN_ID IDebugUIConstants STATUS_INVALID_EXTENSION_DEFINITION MessageFormat LaunchConfigurationsMessages getString LaunchConfigurationPresentationManager Launch_configuration_tab_group_extension_ _does_not_specify_launch_configuration_type_1 getUniqueIdentifier DebugUIPlugin ILaunchConfigurationType DebugPlugin getDefault getLaunchManager getLaunchConfigurationType typeId IExtension getDeclaringExtension IStatus IStatus IDebugUIConstants PLUGIN_ID IDebugUIConstants STATUS_INVALID_EXTENSION_DEFINITION MessageFormat LaunchConfigurationsMessages getString LaunchConfigurationPresentationManager Launch_configuration_tab_group_extension_ _refers_to_non existant_launch_configuration_type_ _2 getUniqueIdentifier typeId DebugUIPlugin typeId fTabGroupExtensions typeId fTabGroupExtensions typeId getModes hasNext
Returns the tab group for the given launch configuration type and mode param type launch configuration type param mode launch mode return the tab group for the given type of launch configuration exception Core Exception if an exception occurs creating the group public I Launch Configuration Tab Group get Tab Group I Launch Configuration Type type String mode throws Core Exception Launch Configuration Tab Group Extension ext get Extension type get Identifier mode if ext null I Status status new Status I Status ERROR I DebugUI Constants PLUGIN ID I DebugUI Constants INTERNAL ERROR Message Format format Launch Configurations Messages get String Launch Configuration Presentation Manager No tab group defined for launch configuration type  0  3 new String type get Identifier null NON NLS 1 throw new Core Exception status else return ext new Tab Group  CoreException ILaunchConfigurationTabGroup getTabGroup ILaunchConfigurationType CoreException LaunchConfigurationTabGroupExtension getExtension getIdentifier IStatus IStatus IDebugUIConstants PLUGIN_ID IDebugUIConstants INTERNAL_ERROR MessageFormat LaunchConfigurationsMessages getString LaunchConfigurationPresentationManager No_tab_group_defined_for_launch_configuration_type_ _3 getIdentifier CoreException newTabGroup
Returns the launch tab group extension for the given type and mode or code null code if none param type launch configuration type identifier param mode launch mode identifier return launch tab group extension or code null code protected Launch Configuration Tab Group Extension get Extension String type String mode get the map for the config type Map map Map f Tab Group Extensions get type if map null try the specific mode Object extension map get mode if extension null get the default tabs extension map get NON NLS 1 return Launch Configuration Tab Group Extension extension return null  LaunchConfigurationTabGroupExtension getExtension fTabGroupExtensions LaunchConfigurationTabGroupExtension
Returns the identifier of the help context that is associated with the specified launch configuration type and mode or code null code if none param type launch config type param mode launch mode return the identifier for the help context associated with the given type of launch configuration or code null code exception Core Exception if an exception occurs creating the group since 2 1 public String get Help Context I Launch Configuration Type type String mode throws Core Exception Launch Configuration Tab Group Extension ext get Extension type get Identifier mode if ext null I Status status new Status I Status ERROR I DebugUI Constants PLUGIN ID I DebugUI Constants INTERNAL ERROR Message Format format Launch Configurations Messages get String Launch Configuration Presentation Manager No tab group defined for launch configuration type  0  3 new String type get Identifier null NON NLS 1 throw new Core Exception status else return ext get Help Context Id  CoreException getHelpContext ILaunchConfigurationType CoreException LaunchConfigurationTabGroupExtension getExtension getIdentifier IStatus IStatus IDebugUIConstants PLUGIN_ID IDebugUIConstants INTERNAL_ERROR MessageFormat LaunchConfigurationsMessages getString LaunchConfigurationPresentationManager No_tab_group_defined_for_launch_configuration_type_ _3 getIdentifier CoreException getHelpContextId

Constructs a new launch configuration dialog on the given parent shell param shell the parent shell param selection the selection used to initialize this dialog typically the current workbench selection param group launch group public Launch Configuration Properties Dialog Shell shell I Launch Configuration launch Configuration Launch Group Extension group super shell group set Launch Configuration launch Configuration Debug Plugin get Default get Launch Manager add Launch Configuration Listener this  LaunchConfigurationPropertiesDialog ILaunchConfiguration launchConfiguration LaunchGroupExtension setLaunchConfiguration launchConfiguration DebugPlugin getDefault getLaunchManager addLaunchConfigurationListener
Sets the launch configration to be displayed param configuration private void set Launch Configuration I Launch Configuration configuration f Launch Configuration configuration  setLaunchConfiguration ILaunchConfiguration fLaunchConfiguration
Returns the launch configuration being displayed return I Launch Configuration protected I Launch Configuration get Launch Configuration return f Launch Configuration  ILaunchConfiguration ILaunchConfiguration getLaunchConfiguration fLaunchConfiguration
protected void initialize Content get Tab Viewer set Input get Launch Configuration I Status status get Initial Status if status null handle Status status  initializeContent getTabViewer setInput getLaunchConfiguration IStatus getInitialStatus handleStatus
see Window close public boolean close persist Shell Geometry get Banner Image dispose get Tab Viewer dispose Debug Plugin get Default get Launch Manager remove Launch Configuration Listener this return super close  persistShellGeometry getBannerImage getTabViewer DebugPlugin getDefault getLaunchManager removeLaunchConfigurationListener
Adds content to the dialog area protected void add Content Composite dialog Comp Grid Data gd Composite top Comp new Composite dialog Comp SWT NONE gd new Grid Data Grid Data FILL BOTH top Comp set Layout Data gd Grid Layout top Layout new Grid Layout top Layout num Columns 1 top Layout margin Height 5 top Layout margin Width 0 top Comp set Layout top Layout top Comp set Font dialog Comp get Font Set the things that Title Area Dialog takes care of set Title get Title Area Title set Message NON NLS 1 set Mode Label State Build the launch configuration edit area and put it into the composite Composite edit Area Comp create Launch Configuration Edit Area top Comp set Edit Area edit Area Comp gd new Grid Data Grid Data FILL BOTH edit Area Comp set Layout Data gd edit Area Comp set Font dialog Comp get Font Build the separator line that demarcates the button bar Label separator new Label top Comp SWT HORIZONTAL SWT SEPARATOR gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 1 separator set Layout Data gd dialog Comp layout true apply Dialog Font dialog Comp  addContent dialogComp GridData topComp dialogComp GridData GridData FILL_BOTH topComp setLayoutData GridLayout topLayout GridLayout topLayout numColumns topLayout marginHeight topLayout marginWidth topComp setLayout topLayout topComp setFont dialogComp getFont TitleAreaDialog setTitle getTitleAreaTitle setMessage setModeLabelState editAreaComp createLaunchConfigurationEditArea topComp setEditArea editAreaComp GridData GridData FILL_BOTH editAreaComp setLayoutData editAreaComp setFont dialogComp getFont topComp GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData dialogComp applyDialogFont dialogComp
protected String get Title Area Title return Launch Configurations Messages get String Launch Configuration Properties Dialog Edit launch configuration properties 1 NON NLS 1  getTitleAreaTitle LaunchConfigurationsMessages getString LaunchConfigurationPropertiesDialog Edit_launch_configuration_properties_1
protected void create Buttons For Button Bar Composite parent create OK and Cancel buttons by default create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
protected String get Shell Title return Message Format format Launch Configurations Messages get String Launch Configuration Properties Dialog Properties for  0  2 new String get Launch Configuration get Name NON NLS 1  getShellTitle MessageFormat LaunchConfigurationsMessages getString LaunchConfigurationPropertiesDialog Properties_for_ _2 getLaunchConfiguration getName
protected String get Help Context Id return I Debug Help Context Ids LAUNCH CONFIGURATION PROPERTIES DIALOG  getHelpContextId IDebugHelpContextIds LAUNCH_CONFIGURATION_PROPERTIES_DIALOG
protected void resize determine the maximum tab dimensions Pixel Converter pixel Converter new Pixel Converter get Edit Area int running Tab Width 0 I Launch Configuration Tab Group group get Tab Group if group null return I Launch Configuration Tab tabs group get Tabs Point content Size new Point 0 0 for int i 0 i tabs length i String name tabs i get Name Image image tabs i get Image running Tab Width pixel Converter convert Width In Chars To Pixels name length 5 if image null running Tab Width image get Bounds width Control control tabs i get Control if control null Point size control compute Size SWT DEFAULT SWT DEFAULT true if size x content Size x content Size x size x if size y content Size y content Size y size y Determine if more space is needed to show all tab labels across the top of the tab folder If so only increase size of dialog to some percent of the available screen real estate if running Tab Width content Size x int max Allowed Width int get Display get Bounds width MAX DIALOG WIDTH PERCENT if running Tab Width max Allowed Width content Size x max Allowed Width else content Size x running Tab Width Adjust the maximum tab dimensions to account for the extra space required for the tab labels Rectangle tab Folder Bounding Box get Edit Area compute Trim 0 0 content Size x content Size y content Size x tab Folder Bounding Box width content Size y tab Folder Bounding Box height Force recalculation of sizes get Edit Area layout true Calculate difference between required space for tab folder and current size then increase size of this dialog s Shell by that amount Rectangle rect get Edit Area get Client Area Point container Size new Point rect width rect height int hdiff content Size x container Size x int vdiff content Size y container Size y Only increase size of dialog never shrink it if hdiff 0 vdiff 0 hdiff Math max 0 hdiff vdiff Math max 0 vdiff Shell shell get Shell Point shell Size shell get Size set Shell Size shell Size x hdiff shell Size y vdiff  PixelConverter pixelConverter PixelConverter getEditArea runningTabWidth ILaunchConfigurationTabGroup getTabGroup ILaunchConfigurationTab getTabs contentSize getName getImage runningTabWidth pixelConverter convertWidthInCharsToPixels runningTabWidth getBounds getControl computeSize contentSize contentSize contentSize contentSize runningTabWidth contentSize maxAllowedWidth getDisplay getBounds MAX_DIALOG_WIDTH_PERCENT runningTabWidth maxAllowedWidth contentSize maxAllowedWidth contentSize runningTabWidth tabFolderBoundingBox getEditArea computeTrim contentSize contentSize contentSize tabFolderBoundingBox contentSize tabFolderBoundingBox getEditArea getEditArea getClientArea containerSize contentSize containerSize contentSize containerSize getShell shellSize getSize setShellSize shellSize shellSize
see I Launch Configuration Dialog update Buttons public void update Buttons apply revert buttons get Tab Viewer refresh get Button I Dialog Constants OK ID set Enabled get Tab Viewer can Save  ILaunchConfigurationDialog updateButtons updateButtons getTabViewer getButton IDialogConstants OK_ID setEnabled getTabViewer canSave
see org eclipse jface dialogs Dialog ok Pressed protected void ok Pressed get Tab Viewer handle Apply Pressed super ok Pressed  okPressed okPressed getTabViewer handleApplyPressed okPressed
see org eclipse jface window Window open public int open set Open Mode 1 return super open  setOpenMode
Returns the name of the section that this dialog stores its settings in return String protected String get Dialog Settings Section Name return I DebugUI Constants PLUGIN ID LAUNCH CONFIGURATION PROPERTIES DIALOG SECTION NON NLS 1  getDialogSettingsSectionName IDebugUIConstants PLUGIN_ID LAUNCH_CONFIGURATION_PROPERTIES_DIALOG_SECTION
see org eclipse debug core I Launch Configuration Listener launch Configuration Added org eclipse debug core I Launch Configuration public void launch Configuration Added I Launch Configuration configuration I Launch Manager manager Debug Plugin get Default get Launch Manager if get Launch Configuration equals manager get Moved From configuration this config was re named update the dialog with the new config set Launch Configuration configuration get Tab Viewer set Input get Launch Configuration  ILaunchConfigurationListener launchConfigurationAdded ILaunchConfiguration launchConfigurationAdded ILaunchConfiguration ILaunchManager DebugPlugin getDefault getLaunchManager getLaunchConfiguration getMovedFrom setLaunchConfiguration getTabViewer setInput getLaunchConfiguration
see org eclipse debug core I Launch Configuration Listener launch Configuration Changed org eclipse debug core I Launch Configuration public void launch Configuration Changed I Launch Configuration configuration  ILaunchConfigurationListener launchConfigurationChanged ILaunchConfiguration launchConfigurationChanged ILaunchConfiguration
see org eclipse debug core I Launch Configuration Listener launch Configuration Removed org eclipse debug core I Launch Configuration public void launch Configuration Removed I Launch Configuration configuration  ILaunchConfigurationListener launchConfigurationRemoved ILaunchConfiguration launchConfigurationRemoved ILaunchConfiguration

Constructs a new launch configuration dialog on the given parent shell param shell the parent shell param group the group of launch configuration to display public Launch Configurations Dialog Shell shell Launch Group Extension group super shell set Shell Style get Shell Style SWT RESIZE set Launch Group group  LaunchConfigurationsDialog LaunchGroupExtension setShellStyle getShellStyle setLaunchGroup
Set the flag indicating how this dialog behaves when the code open code method is called Valid values are defined by the LAUNCH CONFIGURATION DIALOG constants in this class public void set Open Mode int mode f Open Mode mode  LAUNCH_CONFIGURATION_DIALOG setOpenMode fOpenMode
protected int get Open Mode return f Open Mode  getOpenMode fOpenMode
A launch configuration dialog overrides this method to create a custom set of buttons in the button bar This dialog has Launch and Cancel buttons see org eclipse jface dialogs Dialog create Buttons For Button Bar org eclipse swt widgets Composite protected void create Buttons For Button Bar Composite parent create Button parent ID LAUNCH BUTTON get Launch Button Text true create Button parent ID CLOSE BUTTON Launch Configurations Messages get String Launch Configuration Dialog Close 1 false NON NLS 1  createButtonsForButtonBar createButtonsForButtonBar createButton ID_LAUNCH_BUTTON getLaunchButtonText createButton ID_CLOSE_BUTTON LaunchConfigurationsMessages getString LaunchConfigurationDialog Close_1
Handle the save and launch launch buttons here all others are handled in code Dialog code see org eclipse jface dialogs Dialog button Pressed int protected void button Pressed int button Id if button Id ID LAUNCH BUTTON handle Launch Pressed else if button Id ID CLOSE BUTTON handle Close Pressed else super button Pressed button Id  buttonPressed buttonPressed buttonId buttonId ID_LAUNCH_BUTTON handleLaunchPressed buttonId ID_CLOSE_BUTTON handleClosePressed buttonPressed buttonId
Returns the appropriate text for the launch button run or debug protected String get Launch Button Text return Debug Plugin get Default get Launch Manager get Launch Mode get Mode get Label  getLaunchButtonText DebugPlugin getDefault getLaunchManager getLaunchMode getMode getLabel
protected Control create Contents Composite parent Control contents super create Contents parent initialize Content return contents  createContents createContents initializeContent
protected void initialize Content do Initial Tree Selection I Status status get Initial Status if status null handle Status status  initializeContent doInitialTreeSelection IStatus getInitialStatus handleStatus
Initialize the relative weights widths of the 2 sides of the sash private void initialize Sash Form if get Sash Form null I Dialog Settings settings get Dialog Settings int sash Weights try int w1 w2 w1 settings get Int I Debug Preference Constants DIALOG SASH WEIGHTS 1 w2 settings get Int I Debug Preference Constants DIALOG SASH WEIGHTS 2 sash Weights new int w1 w2 catch Number Format Exception e sash Weights DEFAULT SASH WEIGHTS get Sash Form set Weights sash Weights  initializeSashForm getSashForm IDialogSettings getDialogSettings sashWeights getInt IDebugPreferenceConstants DIALOG_SASH_WEIGHTS_1 getInt IDebugPreferenceConstants DIALOG_SASH_WEIGHTS_2 sashWeights NumberFormatException sashWeights DEFAULT_SASH_WEIGHTS getSashForm setWeights sashWeights
Check if the selection area is currently wide enough so that both the New Delete buttons are shown without truncation If so do nothing Otherwise increase the width of this dialog s Shell just enough so that both buttons are shown cleanly private void ensure Selection Area Width if f Launch Configuration View null Button new Button get Button Action New get Button Button delete Button get Button Action Delete get Button int required Width new Button get Bounds width delete Button get Bounds width int margin Width Grid Layout get Selection Area get Layout margin Width int horizontal Spacing Grid Layout get Selection Area get Layout horizontal Spacing required Width 2 margin Width horizontal Spacing int current Width get Selection Area get Bounds width if required Width current Width int new Sash Weights new int 2 new Sash Weights 0 required Width new Sash Weights 1 get Edit Area get Bounds width Shell shell get Shell Point shell Size shell get Size set Shell Size shell Size x required Width current Width shell Size y get Sash Form set Weights new Sash Weights  ensureSelectionAreaWidth fLaunchConfigurationView newButton getButtonActionNew getButton deleteButton getButtonActionDelete getButton requiredWidth newButton getBounds deleteButton getBounds marginWidth GridLayout getSelectionArea getLayout marginWidth horizontalSpacing GridLayout getSelectionArea getLayout horizontalSpacing requiredWidth marginWidth horizontalSpacing currentWidth getSelectionArea getBounds requiredWidth currentWidth newSashWeights newSashWeights requiredWidth newSashWeights getEditArea getBounds getShell shellSize getSize setShellSize shellSize requiredWidth currentWidth shellSize getSashForm setWeights newSashWeights
Set the initial selection in the tree public void do Initial Tree Selection f Launch Configuration View get Viewer set Selection get Initial Selection  doInitialTreeSelection fLaunchConfigurationView getViewer setSelection getInitialSelection
Write out this dialog s Shell size location to the preference store protected void persist Shell Geometry Dialog Settings Helper persist Shell Geometry get Shell get Dialog Settings Section Name  persistShellGeometry DialogSettingsHelper persistShellGeometry getShell getDialogSettingsSectionName
protected void persist Sash Weights I Dialog Settings settings get Dialog Settings Sash Form sash Form get Sash Form if sash Form null int sash Weights get Sash Form get Weights settings put I Debug Preference Constants DIALOG SASH WEIGHTS 1 sash Weights 0 settings put I Debug Preference Constants DIALOG SASH WEIGHTS 2 sash Weights 1  persistSashWeights IDialogSettings getDialogSettings SashForm sashForm getSashForm sashForm sashWeights getSashForm getWeights IDebugPreferenceConstants DIALOG_SASH_WEIGHTS_1 sashWeights IDebugPreferenceConstants DIALOG_SASH_WEIGHTS_2 sashWeights
public boolean close persist Shell Geometry persist Sash Weights set Currently Visible Launch Configuration Dialog null get Banner Image dispose get Tab Viewer dispose if f Launch Configuration View null f Launch Configuration View dispose return super close  persistShellGeometry persistSashWeights setCurrentlyVisibleLaunchConfigurationDialog getBannerImage getTabViewer fLaunchConfigurationView fLaunchConfigurationView
Determine the initial configuration for this dialog Open the dialog in the mode set using set Open Mode int and return one of code Window OK code or code Window CANCEL code see org eclipse jface window Window open public int open int mode get Open Mode set Currently Visible Launch Configuration Dialog this if mode LAUNCH CONFIGURATION DIALOG OPEN ON LAST LAUNCHED I Launch Configuration last Launched Config get Last Launched Workbench Configuration if last Launched Config null set Initial Selection new Structured Selection last Launched Config return super open  setOpenMode getOpenMode setCurrentlyVisibleLaunchConfigurationDialog LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED ILaunchConfiguration lastLaunchedConfig getLastLaunchedWorkbenchConfiguration lastLaunchedConfig setInitialSelection StructuredSelection lastLaunchedConfig
Return the last launched configuration in the workspace protected I Launch Configuration get Last Launched Workbench Configuration return DebugUI Plugin get Default get Launch Configuration Manager get Last Launch get Launch Group get Identifier  ILaunchConfiguration getLastLaunchedWorkbenchConfiguration DebugUIPlugin getDefault getLaunchConfigurationManager getLastLaunch getLaunchGroup getIdentifier
protected Control create Dialog Area Composite parent Composite dialog Comp Composite super create Dialog Area parent add Content dialog Comp return dialog Comp  createDialogArea dialogComp createDialogArea addContent dialogComp dialogComp
Adds content to the dialog area param dialog Comp protected void add Content Composite dialog Comp Grid Data gd Composite top Comp new Composite dialog Comp SWT NONE gd new Grid Data Grid Data FILL BOTH top Comp set Layout Data gd Grid Layout top Layout new Grid Layout top Layout num Columns 2 top Layout margin Height 5 top Layout margin Width 0 top Comp set Layout top Layout Set the things that Title Area Dialog takes care of set Title Launch Configurations Messages get String Launch Configuration Dialog Create  manage  and run launch configurations 8 NON NLS 1 set Message Launch Configurations Messages get String Launch Configuration Dialog Ready to launch 2 NON NLS 1 set Mode Label State Create the Sash Form that contains the selection area on the left and the edit area on the right set Sash Form new Sash Form top Comp SWT NONE get Sash Form set Orientation SWT HORIZONTAL gd new Grid Data Grid Data FILL BOTH gd horizontal Span 2 get Sash Form set Layout Data gd get Sash Form set Font dialog Comp get Font Build the launch configuration selection area and put it into the composite Control launch Config Selection Area create Launch Configuration Selection Area get Sash Form gd new Grid Data Grid Data FILL VERTICAL launch Config Selection Area set Layout Data gd Build the launch configuration edit area and put it into the composite Composite edit Area Comp create Launch Configuration Edit Area get Sash Form set Edit Area edit Area Comp gd new Grid Data Grid Data FILL BOTH edit Area Comp set Layout Data gd Build the separator line that demarcates the button bar Label separator new Label top Comp SWT HORIZONTAL SWT SEPARATOR gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 separator set Layout Data gd dialog Comp layout true apply Dialog Font dialog Comp  dialogComp addContent dialogComp GridData topComp dialogComp GridData GridData FILL_BOTH topComp setLayoutData GridLayout topLayout GridLayout topLayout numColumns topLayout marginHeight topLayout marginWidth topComp setLayout topLayout TitleAreaDialog setTitle LaunchConfigurationsMessages getString LaunchConfigurationDialog _manage _and_run_launch_configurations_8 setMessage LaunchConfigurationsMessages getString LaunchConfigurationDialog Ready_to_launch_2 setModeLabelState SashForm setSashForm SashForm topComp getSashForm setOrientation GridData GridData FILL_BOTH horizontalSpan getSashForm setLayoutData getSashForm setFont dialogComp getFont launchConfigSelectionArea createLaunchConfigurationSelectionArea getSashForm GridData GridData FILL_VERTICAL launchConfigSelectionArea setLayoutData editAreaComp createLaunchConfigurationEditArea getSashForm setEditArea editAreaComp GridData GridData FILL_BOTH editAreaComp setLayoutData topComp GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData dialogComp applyDialogFont dialogComp
Set the title area image based on the mode this dialog was initialized with protected void set Mode Label State set Title Image get Banner Image  setModeLabelState setTitleImage getBannerImage
Update buttons and message protected void refresh Status update Message update Buttons  refreshStatus updateMessage updateButtons
protected Display get Display Shell shell get Shell if shell null return shell get Display else return Display get Default  getDisplay getShell getDisplay getDefault
Creates the launch configuration selection area of the dialog This area displays a tree of launch configurations that the user may select and allows users to create new configurations and delete and duplicate existing configurations return the composite used for launch configuration selection area protected Control create Launch Configuration Selection Area Composite parent Font font parent get Font Composite comp new Composite parent SWT NONE set Selection Area comp Grid Layout layout new Grid Layout layout num Columns 1 layout margin Height 0 layout margin Width 5 comp set Layout layout comp set Font font set Tree Label new Label comp SWT NONE get Tree Label set Font font get Tree Label set Text Launch Configurations Messages get String Launch Configuration Dialog Launch Con figurations  1 NON NLS 1 f Launch Configuration View new Launch Configuration View get Launch Group f Launch Configuration View create Launch Dialog Control comp Viewer viewer f Launch Configuration View get Viewer Control control viewer get Control Grid Data gd new Grid Data Grid Data FILL BOTH control set Layout Data gd control set Font font f Double Click Action new Double Click Action f Launch Configuration View set Action I Debug View DOUBLE CLICK ACTION f Double Click Action Composite button Composite new Composite comp SWT NONE layout new Grid Layout 2 false layout margin Height 0 layout margin Width 0 button Composite set Layout layout gd new Grid Data Grid Data FILL HORIZONTAL button Composite set Layout Data gd button Composite set Font comp get Font final Button new Button SWT Util create Push Button button Composite Launch Configurations Messages get String Launch Configuration Dialog Ne w 13 null NON NLS 1 set Button Action New new Button Action New new Button get Text new Button final Button delete Button SWT Util create Push Button button Composite Launch Configurations Messages get String Launch Configuration Dialog Dele te 14 null NON NLS 1 gd Grid Data delete Button get Layout Data gd horizontal Alignment Grid Data BEGINNING gd grab Excess Horizontal Space true set Button Action Delete new Button Action Delete delete Button get Text delete Button Abstract Launch Configuration Action I Confirmation Requestor requestor new Abstract Launch Configuration Action I Confirmation Requestor see org eclipse debug internal ui launch Configurations Abstract Launch Configuration Action I Confirmation Requestor get Confirmation public boolean get Confirmation return can Discard Current Config confirmation requestors get Duplicate Action set Confirmation Requestor requestor get New Action set Confirmation Requestor requestor viewer add Selection Changed Listener new I Selection Changed Listener see org eclipse jface viewers I Selection Changed Listener selection Changed org eclipse jface viewers Selection Changed Event public void selection Changed Selection Changed Event event handle Launch Configuration Selection Changed event new Button set Enabled get New Action is Enabled delete Button set Enabled get Delete Action is Enabled return comp  createLaunchConfigurationSelectionArea getFont setSelectionArea GridLayout GridLayout numColumns marginHeight marginWidth setLayout setFont setTreeLabel getTreeLabel setFont getTreeLabel setText LaunchConfigurationsMessages getString LaunchConfigurationDialog Launch_Con figurations__1 fLaunchConfigurationView LaunchConfigurationView getLaunchGroup fLaunchConfigurationView createLaunchDialogControl fLaunchConfigurationView getViewer getControl GridData GridData GridData FILL_BOTH setLayoutData setFont fDoubleClickAction DoubleClickAction fLaunchConfigurationView setAction IDebugView DOUBLE_CLICK_ACTION fDoubleClickAction buttonComposite GridLayout marginHeight marginWidth buttonComposite setLayout GridData GridData FILL_HORIZONTAL buttonComposite setLayoutData buttonComposite setFont getFont newButton SWTUtil createPushButton buttonComposite LaunchConfigurationsMessages getString LaunchConfigurationDialog w_13 setButtonActionNew ButtonActionNew newButton getText newButton deleteButton SWTUtil createPushButton buttonComposite LaunchConfigurationsMessages getString LaunchConfigurationDialog te_14 GridData deleteButton getLayoutData horizontalAlignment GridData grabExcessHorizontalSpace setButtonActionDelete ButtonActionDelete deleteButton getText deleteButton AbstractLaunchConfigurationAction IConfirmationRequestor AbstractLaunchConfigurationAction IConfirmationRequestor launchConfigurations AbstractLaunchConfigurationAction IConfirmationRequestor getConfirmation getConfirmation canDiscardCurrentConfig getDuplicateAction setConfirmationRequestor getNewAction setConfirmationRequestor addSelectionChangedListener ISelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent selectionChanged SelectionChangedEvent handleLaunchConfigurationSelectionChanged newButton setEnabled getNewAction isEnabled deleteButton setEnabled getDeleteAction isEnabled
Creates the launch configuration edit area of the dialog This area displays the name of the launch configuration currently being edited as well as a tab folder of tabs that are applicable to the launch configuration return the composite used for launch configuration editing protected Composite create Launch Configuration Edit Area Composite parent set Tab Viewer new Launch Configuration Tab Group Viewer parent this get Tab Viewer add Selection Changed Listener new I Selection Changed Listener see org eclipse jface viewers I Selection Changed Listener selection Changed org eclipse jface viewers Selection Changed Event public void selection Changed Selection Changed Event event handle Tab Selection Changed return Composite get Tab Viewer get Control  createLaunchConfigurationEditArea setTabViewer LaunchConfigurationTabGroupViewer getTabViewer addSelectionChangedListener ISelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent selectionChanged SelectionChangedEvent handleTabSelectionChanged getTabViewer getControl
protected Control create Button Bar Composite parent Font font parent get Font Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL composite set Font font Composite monitor Composite new Composite composite SWT NULL layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 2 monitor Composite set Layout layout monitor Composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout pm Layout new Grid Layout set Progress Monitor Part new Progress Monitor Part monitor Composite pm Layout Button cancel Button create Button monitor Composite ID CANCEL BUTTON Launch Configurations Messages get String Launch Configuration Dialog Cancel 3 true NON NLS 1 set Progress Monitor Cancel Button cancel Button get Progress Monitor Cancel Button set Font font get Progress Monitor Part set Layout Data new Grid Data Grid Data FILL HORIZONTAL get Progress Monitor Part set Font font monitor Composite set Visible false return super create Button Bar composite  createButtonBar getFont GridLayout GridLayout numColumns marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_HORIZONTAL setFont monitorComposite GridLayout marginHeight marginWidth numColumns monitorComposite setLayout monitorComposite setLayoutData GridData GridData FILL_HORIZONTAL GridLayout pmLayout GridLayout setProgressMonitorPart ProgressMonitorPart monitorComposite pmLayout cancelButton createButton monitorComposite ID_CANCEL_BUTTON LaunchConfigurationsMessages getString LaunchConfigurationDialog Cancel_3 setProgressMonitorCancelButton cancelButton getProgressMonitorCancelButton setFont getProgressMonitorPart setLayoutData GridData GridData FILL_HORIZONTAL getProgressMonitorPart setFont monitorComposite setVisible createButtonBar
Sets the title for the dialog and establishes the help context see org eclipse jface window Window configure Shell org eclipse swt widgets Shell protected void configure Shell Shell shell super configure Shell shell shell set Text get Shell Title Workbench Help set Help shell get Help Context Id  configureShell configureShell configureShell setText getShellTitle WorkbenchHelp setHelp getHelpContextId
protected String get Help Context Id return I Debug Help Context Ids LAUNCH CONFIGURATION DIALOG  getHelpContextId IDebugHelpContextIds LAUNCH_CONFIGURATION_DIALOG
protected String get Shell Title String title DebugUI Plugin remove Accelerators get Launch Group get Label if title null title Launch Configurations Messages get String Launch Configuration Dialog Launch Configurations 18 NON NLS 1 return title  getShellTitle DebugUIPlugin removeAccelerators getLaunchGroup getLabel LaunchConfigurationsMessages getString LaunchConfigurationDialog Launch_Configurations_18
protected Point get Initial Location Point initial Size I Dialog Settings settings get Dialog Settings try int x y x settings get Int I Debug Preference Constants DIALOG ORIGIN X y settings get Int I Debug Preference Constants DIALOG ORIGIN Y return new Point x y catch Number Format Exception e return super get Initial Location initial Size  getInitialLocation initialSize IDialogSettings getDialogSettings getInt IDebugPreferenceConstants DIALOG_ORIGIN_X getInt IDebugPreferenceConstants DIALOG_ORIGIN_Y NumberFormatException getInitialLocation initialSize
protected Point get Initial Size I Dialog Settings settings get Dialog Settings try int x y x settings get Int I Debug Preference Constants DIALOG WIDTH y settings get Int I Debug Preference Constants DIALOG HEIGHT return new Point x y catch Number Format Exception e return DEFAULT INITIAL DIALOG SIZE  getInitialSize IDialogSettings getDialogSettings getInt IDebugPreferenceConstants DIALOG_WIDTH getInt IDebugPreferenceConstants DIALOG_HEIGHT NumberFormatException DEFAULT_INITIAL_DIALOG_SIZE
private void set Sash Form Sash Form sash Form f Sash Form sash Form  setSashForm SashForm sashForm fSashForm sashForm
private Sash Form get Sash Form return f Sash Form  SashForm getSashForm fSashForm
Returns the launch manager return the launch manager private I Launch Manager get Launch Manager return Debug Plugin get Default get Launch Manager  ILaunchManager getLaunchManager DebugPlugin getDefault getLaunchManager
Returns whether this dialog is currently open private boolean is Visible return get Shell null get Shell is Visible  isVisible getShell getShell isVisible
Notification that selection has changed in the launch configuration tree p If the currently displayed configuration is not saved prompt for saving before moving on to the new selection p param event selection changed event protected void handle Launch Configuration Selection Changed Selection Changed Event event Object input get Tab Viewer get Input Object new Input null I Selection selection event get Selection if selection is Empty if selection instanceof I Structured Selection I Structured Selection structured Selection I Structured Selection selection if structured Selection size 1 new Input structured Selection get First Element I Launch Configuration original get Tab Viewer get Original if original null new Input null get Launch Manager get Moved To original null the current config is about to be deleted ignore this change return if is Equal input new Input I Launch Configuration Tab Group group get Tab Group if original null boolean deleted original exists boolean renamed false if new Input instanceof I Launch Configuration I Launch Configuration lc I Launch Configuration new Input renamed get Launch Manager get Moved From lc null if get Tab Viewer is Dirty deleted renamed boolean can Replace show Unsaved Changes Dialog if can Replace restore the original selection I Structured Selection sel new Structured Selection input f Launch Configuration View get Viewer set Selection sel return get Tab Viewer set Input new Input bug 14758 if the newly selected config is dirty save its changes if get Tab Viewer is Dirty get Tab Viewer handle Apply Pressed bug 14758 I Launch Configuration Tab Group new Group get Tab Group if is Equal group new Group if is Visible resize  handleLaunchConfigurationSelectionChanged SelectionChangedEvent getTabViewer getInput newInput ISelection getSelection isEmpty IStructuredSelection IStructuredSelection structuredSelection IStructuredSelection structuredSelection newInput structuredSelection getFirstElement ILaunchConfiguration getTabViewer getOriginal newInput getLaunchManager getMovedTo isEqual newInput ILaunchConfigurationTabGroup getTabGroup newInput ILaunchConfiguration ILaunchConfiguration ILaunchConfiguration newInput getLaunchManager getMovedFrom getTabViewer isDirty canReplace showUnsavedChangesDialog canReplace IStructuredSelection StructuredSelection fLaunchConfigurationView getViewer setSelection getTabViewer setInput newInput getTabViewer isDirty getTabViewer handleApplyPressed ILaunchConfigurationTabGroup newGroup getTabGroup isEqual newGroup isVisible
protected boolean is Equal Object o1 Object o2 if o1 o2 return true else if o1 null return false else return o1 equals o2  isEqual
protected void resize determine the maximum tab dimensions Pixel Converter pixel Converter new Pixel Converter get Edit Area int running Tab Width 0 I Launch Configuration Tab Group group get Tab Group if group null return I Launch Configuration Tab tabs group get Tabs Point content Size new Point 0 0 for int i 0 i tabs length i String name tabs i get Name Image image tabs i get Image running Tab Width pixel Converter convert Width In Chars To Pixels name length 5 if image null running Tab Width image get Bounds width Control control tabs i get Control if control null Point size control compute Size SWT DEFAULT SWT DEFAULT true if size x content Size x content Size x size x if size y content Size y content Size y size y Determine if more space is needed to show all tab labels across the top of the tab folder If so only increase size of dialog to some percent of the available screen real estate if running Tab Width content Size x int max Allowed Width int get Display get Bounds width MAX DIALOG WIDTH PERCENT int other Width get Sash Form SASH WIDTH get Selection Area get Bounds width int total Width running Tab Width other Width if total Width max Allowed Width content Size x max Allowed Width other Width else content Size x running Tab Width int max Allowed Height int get Display get Bounds height MAX DIALOG HEIGHT PERCENT content Size y Math min content Size y max Allowed Height Adjust the maximum tab dimensions to account for the extra space required for the tab labels Rectangle tab Folder Bounding Box get Edit Area compute Trim 0 0 content Size x content Size y content Size x tab Folder Bounding Box width content Size y tab Folder Bounding Box height Force recalculation of sizes get Edit Area layout true Calculate difference between required space for the tab folder s client area and it s current size then increase size of this dialog s Shell by that amount Rectangle rect get Tab Viewer get Tab Folder get Client Area Point container Size new Point rect width rect height int hdiff content Size x container Size x int vdiff content Size y container Size y Only increase size of dialog never shrink it if hdiff 0 vdiff 0 int new Sash Weights null if hdiff 0 new Sash Weights calculate New Sash Weights hdiff hdiff Math max 0 hdiff vdiff Math max 0 vdiff Shell shell get Shell Point shell Size shell get Size set Shell Size shell Size x hdiff shell Size y vdiff Adjust the sash weights so that all of the increase in width is given to the tab area if new Sash Weights null get Sash Form set Weights new Sash Weights  PixelConverter pixelConverter PixelConverter getEditArea runningTabWidth ILaunchConfigurationTabGroup getTabGroup ILaunchConfigurationTab getTabs contentSize getName getImage runningTabWidth pixelConverter convertWidthInCharsToPixels runningTabWidth getBounds getControl computeSize contentSize contentSize contentSize contentSize runningTabWidth contentSize maxAllowedWidth getDisplay getBounds MAX_DIALOG_WIDTH_PERCENT otherWidth getSashForm SASH_WIDTH getSelectionArea getBounds totalWidth runningTabWidth otherWidth totalWidth maxAllowedWidth contentSize maxAllowedWidth otherWidth contentSize runningTabWidth maxAllowedHeight getDisplay getBounds MAX_DIALOG_HEIGHT_PERCENT contentSize contentSize maxAllowedHeight tabFolderBoundingBox getEditArea computeTrim contentSize contentSize contentSize tabFolderBoundingBox contentSize tabFolderBoundingBox getEditArea getTabViewer getTabFolder getClientArea containerSize contentSize containerSize contentSize containerSize newSashWeights newSashWeights calculateNewSashWeights getShell shellSize getSize setShellSize shellSize shellSize newSashWeights getSashForm setWeights newSashWeights
Notification that tab selection has changed protected void handle Tab Selection Changed update Message  handleTabSelectionChanged updateMessage
private void set Progress Monitor Part Progress Monitor Part part f Progress Monitor Part part  setProgressMonitorPart ProgressMonitorPart fProgressMonitorPart
private Progress Monitor Part get Progress Monitor Part return f Progress Monitor Part  ProgressMonitorPart getProgressMonitorPart fProgressMonitorPart
private void set Progress Monitor Cancel Button Button button f Progress Monitor Cancel Button button  setProgressMonitorCancelButton fProgressMonitorCancelButton
private Button get Progress Monitor Cancel Button return f Progress Monitor Cancel Button  getProgressMonitorCancelButton fProgressMonitorCancelButton
Calculate return a 2 element integer array that specifies the relative weights of the selection area and the edit area based on the specified increase in width of the owning shell The point of this method is calculate sash weights such that when the shell gets wider all of the increase in width is given to the edit area tab folder and the selection area tree stays the same width private int calculate New Sash Weights int width Increase int new Weights new int 2 new Weights 0 get Selection Area get Bounds width new Weights 1 get Edit Area get Bounds width width Increase return new Weights  calculateNewSashWeights widthIncrease newWeights newWeights getSelectionArea getBounds newWeights getEditArea getBounds widthIncrease newWeights
Increase the size of this dialog s code Shell code by the specified amounts Do not increase the size of the Shell beyond the bounds of the Display protected void set Shell Size int width int height Rectangle bounds get Shell get Display get Bounds get Shell set Size Math min width bounds width Math min height bounds height  setShellSize getShell getDisplay getBounds getShell setSize
see org eclipse debug ui I Launch Configuration Dialog get Mode public String get Mode return get Launch Group get Mode  ILaunchConfigurationDialog getMode getMode getLaunchGroup getMode
Returns the current tab group return the current tab group or code null code if none public I Launch Configuration Tab Group get Tab Group if get Tab Viewer null return get Tab Viewer get Tab Group return null  ILaunchConfigurationTabGroup getTabGroup getTabViewer getTabViewer getTabGroup
public I Launch Configuration Tab get Tabs if get Tab Group null return null else return get Tab Group get Tabs  ILaunchConfigurationTab getTabs getTabGroup getTabGroup getTabs
Return whether the current configuration can be discarded This involves determining if it is dirty and if it is asking the user what to do private boolean can Discard Current Config if get Tab Viewer is Dirty return show Unsaved Changes Dialog else return true  canDiscardCurrentConfig getTabViewer isDirty showUnsavedChangesDialog
Show the user a dialog appropriate to whether the unsaved changes in the current config can be saved or not Return code true code if the user indicated that they wish to replace the current config either by saving changes or by discarding the return code false code otherwise private boolean show Unsaved Changes Dialog if get Tab Viewer can Save return show Save Changes Dialog else return show Discard Changes Dialog  showUnsavedChangesDialog getTabViewer canSave showSaveChangesDialog showDiscardChangesDialog
Create and return a dialog that asks the user whether they want to save unsaved changes Return code true code if they chose to save changes code false code otherwise private boolean show Save Changes Dialog String message null if get Active Tab instanceof Perspectives Tab try message Message Format format Launch Configurations Messages get String Launch Configurations Dialog 45 new String get Tab Viewer get Working Copy get Type get Name NON NLS 1 catch Core Exception e DebugUI Plugin log e else message Message Format format Launch Configurations Messages get String Launch Configuration Dialog The configuration   29 new String get Tab Viewer get Working Copy get Name NON NLS 1 Message Dialog dialog new Message Dialog get Shell Launch Configurations Messages get String Launch Configuration Dialog Save changes  31 NON NLS 1 null message Message Dialog QUESTION new String Launch Configurations Messages get String Launch Configuration Dialog Yes 32 Launch Configurations Messages get String Launch Configuration Dialog No 33 Launch Configurations Messages get String Launch Configuration Dialog Cancel 34 NON NLS 1 NON NLS 2 NON NLS 3 0 If user clicked Cancel or closed dialog return false int selected Button dialog open if selected Button 0 selected Button 2 return false If they hit Yes save the working copy if selected Button 0 Turn off auto select if prompting to save changes The user has made another selection and we don t want a rename to cause an auto select if f Launch Configuration View null f Launch Configuration View set Auto Select false get Tab Viewer handle Apply Pressed if f Launch Configuration View null f Launch Configuration View set Auto Select true return true  showSaveChangesDialog getActiveTab PerspectivesTab MessageFormat LaunchConfigurationsMessages getString LaunchConfigurationsDialog getTabViewer getWorkingCopy getType getName CoreException DebugUIPlugin MessageFormat LaunchConfigurationsMessages getString LaunchConfigurationDialog The_configuration___29 getTabViewer getWorkingCopy getName MessageDialog MessageDialog getShell LaunchConfigurationsMessages getString LaunchConfigurationDialog Save_changes__31 MessageDialog LaunchConfigurationsMessages getString LaunchConfigurationDialog Yes_32 LaunchConfigurationsMessages getString LaunchConfigurationDialog No_33 LaunchConfigurationsMessages getString LaunchConfigurationDialog Cancel_34 selectedButton selectedButton selectedButton selectedButton fLaunchConfigurationView fLaunchConfigurationView setAutoSelect getTabViewer handleApplyPressed fLaunchConfigurationView fLaunchConfigurationView setAutoSelect
Create and return a dialog that asks the user whether they want to discard unsaved changes Return code true code if they chose to discard changes code false code otherwise private boolean show Discard Changes Dialog String Buffer buffer new String Buffer Message Format format Launch Configurations Messages get String Launch Configuration Dialog The configuration   35 new String get Tab Viewer get Working Copy get Name NON NLS 1 buffer append get Tab Viewer get Error Messsage buffer append Launch Configurations Messages get String Launch Configuration Dialog Do you wish to discard changes 37 NON NLS 1 Message Dialog dialog new Message Dialog get Shell Launch Configurations Messages get String Launch Configuration Dialog Discard changes  38 NON NLS 1 null buffer to String Message Dialog QUESTION new String Launch Configurations Messages get String Launch Configuration Dialog Yes 32 Launch Configurations Messages get String Launch Configuration Dialog No 33 NON NLS 1 NON NLS 2 1 If user clicked Yes return true int selected Button dialog open if selected Button 0 return true return false  showDiscardChangesDialog StringBuffer StringBuffer MessageFormat LaunchConfigurationsMessages getString LaunchConfigurationDialog The_configuration___35 getTabViewer getWorkingCopy getName getTabViewer getErrorMesssage LaunchConfigurationsMessages getString LaunchConfigurationDialog Do_you_wish_to_discard_changes_37 MessageDialog MessageDialog getShell LaunchConfigurationsMessages getString LaunchConfigurationDialog Discard_changes__38 toString MessageDialog LaunchConfigurationsMessages getString LaunchConfigurationDialog Yes_32 LaunchConfigurationsMessages getString LaunchConfigurationDialog No_33 selectedButton selectedButton
Notification the Close button has been pressed protected void handle Close Pressed if can Discard Current Config cancel Pressed  handleClosePressed canDiscardCurrentConfig cancelPressed
Notification the launch button has been pressed Save and launch protected void handle Launch Pressed I Launch Configuration config get Tab Viewer get Original if get Tab Viewer is Dirty get Tab Viewer handle Apply Pressed config get Tab Viewer get Original String mode get Mode close DebugUI Tools launch config mode  handleLaunchPressed ILaunchConfiguration getTabViewer getOriginal getTabViewer isDirty getTabViewer handleApplyPressed getTabViewer getOriginal getMode DebugUITools
Progress Monitor I Runnable Context related methods non Javadoc see org eclipse jface operation I Runnable Context run boolean boolean org eclipse jface operation I Runnable With Progress public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception if is Visible The operation can only be canceled if it is executed in a separate thread Otherwise the UI is blocked anyway Object state about To Start f Active Running Operations try Modal Context run runnable fork f Progress Monitor Part get Shell get Display finally f Active Running Operations stopped state else PlatformUI get Workbench get Progress Service run fork cancelable runnable  ProgressMonitor IRunnableContext IRunnableContext IRunnableWithProgress IRunnableWithProgress InvocationTargetException InterruptedException isVisible aboutToStart fActiveRunningOperations ModalContext fProgressMonitorPart getShell getDisplay fActiveRunningOperations getWorkbench getProgressService
About to start a long running operation triggered through the dialog Shows the progress monitor and disables the dialog s buttons and controls return the saved UI state private Object about To Start Map saved State null if get Shell null Save focus control Control focus Control get Shell get Display get Focus Control if focus Control null focus Control get Shell get Shell focus Control null Set the busy cursor to all shells Display d get Shell get Display wait Cursor new Cursor d SWT CURSOR WAIT set Display Cursor wait Cursor Set the arrow cursor to the cancel component arrow Cursor new Cursor d SWT CURSOR ARROW get Progress Monitor Cancel Button set Cursor arrow Cursor Deactivate shell saved State saveUI State if focus Control null saved State put FOCUS CONTROL focus Control Attach the progress monitor part to the cancel button get Progress Monitor Cancel Button set Enabled true get Progress Monitor Part attach To Cancel Component get Progress Monitor Cancel Button get Progress Monitor Part get Parent set Visible true get Progress Monitor Cancel Button set Focus return saved State  aboutToStart savedState getShell focusControl getShell getDisplay getFocusControl focusControl focusControl getShell getShell focusControl getShell getDisplay waitCursor CURSOR_WAIT setDisplayCursor waitCursor arrowCursor CURSOR_ARROW getProgressMonitorCancelButton setCursor arrowCursor savedState saveUIState focusControl savedState FOCUS_CONTROL focusControl getProgressMonitorCancelButton setEnabled getProgressMonitorPart attachToCancelComponent getProgressMonitorCancelButton getProgressMonitorPart getParent setVisible getProgressMonitorCancelButton setFocus savedState
A long running operation triggered through the dialog was stopped either by user input or by normal end Hides the progress monitor and restores the enable state of the dialog s buttons and controls param saved State the saved UI state as returned by code about To Start code see about To Start private void stopped Object saved State if get Shell null get Progress Monitor Part get Parent set Visible false get Progress Monitor Part remove From Cancel Component get Progress Monitor Cancel Button Map state Map saved State restoreUI State state set Display Cursor null wait Cursor dispose wait Cursor null arrow Cursor dispose arrow Cursor null Control focus Control Control state get FOCUS CONTROL if focus Control null focus Control set Focus  savedState aboutToStart aboutToStart savedState getShell getProgressMonitorPart getParent setVisible getProgressMonitorPart removeFromCancelComponent getProgressMonitorCancelButton savedState restoreUIState setDisplayCursor waitCursor waitCursor arrowCursor arrowCursor focusControl FOCUS_CONTROL focusControl focusControl setFocus
Captures and returns the enabled disabled state of the wizard dialog s buttons and the tree of controls for the currently showing page All these controls are disabled in the process with the possible excepton of the Cancel button return a map containing the saved state suitable for restoring later with code restoreUI State code see restoreUI State private Map saveUI State Map saved State new Hash Map 4 save Enable State And Set get Button ID LAUNCH BUTTON saved State launch false NON NLS 1 save Enable State And Set get Button ID CLOSE BUTTON saved State close false NON NLS 1 if get Selection Area null saved State put selectionarea Control Enable State disable get Selection Area NON NLS 1 saved State put editarea Control Enable State disable get Edit Area NON NLS 1 return saved State  restoreUIState restoreUIState saveUIState savedState HashMap saveEnableStateAndSet getButton ID_LAUNCH_BUTTON savedState saveEnableStateAndSet getButton ID_CLOSE_BUTTON savedState getSelectionArea savedState ControlEnableState getSelectionArea savedState ControlEnableState getEditArea savedState
Saves the enabled disabled state of the given control in the given map which must be modifiable param w the control or code null code if none param h the map key type code String code element type code Boolean code param key the key param enabled code true code to enable the control and code false code to disable it see restore Enable State And Set private void save Enable State And Set Control w Map h String key boolean enabled if w null h put key new Boolean w is Enabled w set Enabled enabled  restoreEnableStateAndSet saveEnableStateAndSet isEnabled setEnabled
Restores the enabled disabled state of the wizard dialog s buttons and the tree of controls for the currently showing page param state a map containing the saved state as returned by code saveUI State code see saveUI State private void restoreUI State Map state restore Enable State get Button ID LAUNCH BUTTON state launch NON NLS 1 restore Enable State get Button ID CLOSE BUTTON state close NON NLS 1 Control Enable State tree State Control Enable State state get selectionarea NON NLS 1 if tree State null tree State restore Control Enable State tab State Control Enable State state get editarea NON NLS 1 tab State restore  saveUIState saveUIState restoreUIState restoreEnableState getButton ID_LAUNCH_BUTTON restoreEnableState getButton ID_CLOSE_BUTTON ControlEnableState treeState ControlEnableState treeState treeState ControlEnableState tabState ControlEnableState tabState
Restores the enabled disabled state of the given control param w the control param h the map key type code String code element type code Boolean code param key the key see save Enable State And Set private void restore Enable State Control w Map h String key if w null Boolean b Boolean h get key if b null w set Enabled b boolean Value  saveEnableStateAndSet restoreEnableState setEnabled booleanValue
Sets the given cursor for all shells currently active for this window s display param cursor the cursor private void set Display Cursor Cursor cursor Shell shells get Shell get Display get Shells for int i 0 i shells length i shells i set Cursor cursor  setDisplayCursor getShell getDisplay getShells setCursor
Convenience method that replies whether the tab viewer is in a launchable state private boolean can Launch return get Tab Viewer can Launch  canLaunch getTabViewer canLaunch
public void update Buttons New Delete buttons get Button Action New set Enabled get New Action is Enabled get Button Action Delete set Enabled get Delete Action is Enabled Launch button get Tab Viewer refresh get Button ID LAUNCH BUTTON set Enabled can Launch  updateButtons getButtonActionNew setEnabled getNewAction isEnabled getButtonActionDelete setEnabled getDeleteAction isEnabled getTabViewer getButton ID_LAUNCH_BUTTON setEnabled canLaunch
see org eclipse debug ui I Launch Configuration Dialog get Active Tab public I Launch Configuration Tab get Active Tab return get Tab Viewer get Active Tab  ILaunchConfigurationDialog getActiveTab ILaunchConfigurationTab getActiveTab getTabViewer getActiveTab
see org eclipse debug ui I Launch Configuration Dialog update Message public void update Message set Error Message get Tab Viewer get Error Messsage set Message get Tab Viewer get Message  ILaunchConfigurationDialog updateMessage updateMessage setErrorMessage getTabViewer getErrorMesssage setMessage getTabViewer getMessage
Returns the launch configuration selection area control return control private Composite get Selection Area return f Selection Area  getSelectionArea fSelectionArea
Sets the launch configuration selection area control param selection Area control private void set Selection Area Composite selection Area f Selection Area selection Area  selectionArea setSelectionArea selectionArea fSelectionArea selectionArea
Returns the launch configuration edit area control return control protected Composite get Edit Area return f Edit Area  getEditArea fEditArea
Sets the launch configuration edit area control param edit Area control protected void set Edit Area Composite edit Area f Edit Area edit Area  editArea setEditArea editArea fEditArea editArea
see org eclipse debug ui I Launch Configuration Dialog set Name java lang String public void set Name String name get Tab Viewer set Name name  ILaunchConfigurationDialog setName setName getTabViewer setName
public String generate Name String name if name null name NON NLS 1 return get Launch Manager generate Unique Launch Configuration Name From name  generateName getLaunchManager generateUniqueLaunchConfigurationNameFrom
Returns the initial selection shown in this dialog when opened in code LAUNCH CONFIGURATION DIALOG OPEN ON SELECTION code mode private I Structured Selection get Initial Selection return f Initial Selection  LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION IStructuredSelection getInitialSelection fInitialSelection
Sets the initial selection for the dialog when opened in code LAUNCH CONFIGURATION DIALOG OPEN ON SELECTION code mode public void set Initial Selection I Structured Selection selection f Initial Selection selection  LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION setInitialSelection IStructuredSelection fInitialSelection
Handles key events in the tree viewer Specifically when the delete key is pressed protected void handle Tree Viewer Key Pressed Key Event event if event character SWT DEL event state Mask 0 if get Button Action Delete is Enabled get Button Action Delete run  handleTreeViewerKeyPressed KeyEvent stateMask getButtonActionDelete isEnabled getButtonActionDelete
private void set Button Action New Button Action action f Button Action New action  setButtonActionNew ButtonAction fButtonActionNew
private Button Action get Button Action New return f Button Action New  ButtonAction getButtonActionNew fButtonActionNew
private void set Button Action Delete Button Action action f Button Action Delete action  setButtonActionDelete ButtonAction fButtonActionDelete
private Button Action get Button Action Delete return f Button Action Delete  ButtonAction getButtonActionDelete fButtonActionDelete
private void set Tree Label Label tree Label f Tree Label tree Label  setTreeLabel treeLabel fTreeLabel treeLabel
private Label get Tree Label return f Tree Label  getTreeLabel fTreeLabel
public static void set Currently Visible Launch Configuration Dialog I Launch Configuration Dialog dialog fg Currently Visible Launch Configuration Dialog dialog  setCurrentlyVisibleLaunchConfigurationDialog ILaunchConfigurationDialog fgCurrentlyVisibleLaunchConfigurationDialog
public static I Launch Configuration Dialog get Currently Visible Launch Configuration Dialog return fg Currently Visible Launch Configuration Dialog  ILaunchConfigurationDialog getCurrentlyVisibleLaunchConfigurationDialog fgCurrentlyVisibleLaunchConfigurationDialog
if f Button null f Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt Button Action this run  fButton fButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent ButtonAction
Construct a Button Action handler All details of the specified code Button code s layout and appearance should be handled external to this class public Button Action String text Button button super text f Button button if f Button null f Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt Button Action this run  ButtonAction ButtonAction fButton fButton fButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent ButtonAction
public Button get Button return f Button  getButton fButton
see I Action set Enabled boolean public void set Enabled boolean enabled super set Enabled enabled if f Button null f Button set Enabled enabled  IAction setEnabled setEnabled setEnabled fButton fButton setEnabled
private class Button Action New extends Button Action public Button Action New String text Button button super text button  ButtonActionNew ButtonAction ButtonActionNew
public void run get New Action run  getNewAction
private class Button Action Delete extends Button Action public Button Action Delete String text Button button super text button  ButtonActionDelete ButtonAction ButtonActionDelete
public void run get Delete Action run  getDeleteAction
private class Double Click Action extends Action see org eclipse jface action I Action run public void run I Structured Selection selection I Structured Selection f Launch Configuration View get Viewer get Selection Object target selection get First Element if target instanceof I Launch Configuration if can Launch handle Launch Pressed else get New Action run  DoubleClickAction IAction IStructuredSelection IStructuredSelection fLaunchConfigurationView getViewer getSelection getFirstElement ILaunchConfiguration canLaunch handleLaunchPressed getNewAction
Returns the banner image to display in the title area protected Image get Banner Image if f Banner Image null Image Descriptor descriptor get Launch Group get Banner Image Descriptor if descriptor null f Banner Image descriptor create Image return f Banner Image  getBannerImage fBannerImage ImageDescriptor getLaunchGroup getBannerImageDescriptor fBannerImage createImage fBannerImage
Sets the launch group to display param group launch group protected void set Launch Group Launch Group Extension group f Group group  setLaunchGroup LaunchGroupExtension fGroup
Returns the launch group being displayed return launch group public Launch Group Extension get Launch Group return f Group  LaunchGroupExtension getLaunchGroup fGroup
protected Abstract Launch Configuration Action get New Action return Abstract Launch Configuration Action f Launch Configuration View get Action Create Launch Configuration Action ID CREATE ACTION  AbstractLaunchConfigurationAction getNewAction AbstractLaunchConfigurationAction fLaunchConfigurationView getAction CreateLaunchConfigurationAction ID_CREATE_ACTION
protected Abstract Launch Configuration Action get Delete Action return Abstract Launch Configuration Action f Launch Configuration View get Action Delete Launch Configuration Action ID DELETE ACTION  AbstractLaunchConfigurationAction getDeleteAction AbstractLaunchConfigurationAction fLaunchConfigurationView getAction DeleteLaunchConfigurationAction ID_DELETE_ACTION
protected Abstract Launch Configuration Action get Duplicate Action return Abstract Launch Configuration Action f Launch Configuration View get Action Duplicate Launch Configuration Action ID DUPLICATE ACTION  AbstractLaunchConfigurationAction getDuplicateAction AbstractLaunchConfigurationAction fLaunchConfigurationView getAction DuplicateLaunchConfigurationAction ID_DUPLICATE_ACTION
Returns the dialog settings for this dialog Subclasses should override code get Dialog Settings Key code return I Dialog Settings protected I Dialog Settings get Dialog Settings I Dialog Settings settings DebugUI Plugin get Default get Dialog Settings I Dialog Settings section settings get Section get Dialog Settings Section Name if section null section settings add New Section get Dialog Settings Section Name return section  getDialogSettingsKey IDialogSettings IDialogSettings getDialogSettings IDialogSettings DebugUIPlugin getDefault getDialogSettings IDialogSettings getSection getDialogSettingsSectionName addNewSection getDialogSettingsSectionName
Returns the name of the section that this dialog stores its settings in return String protected String get Dialog Settings Section Name return I DebugUI Constants PLUGIN ID LAUNCH CONFIGURATIONS DIALOG SECTION NON NLS 1  getDialogSettingsSectionName IDebugUIConstants PLUGIN_ID LAUNCH_CONFIGURATIONS_DIALOG_SECTION
Sets the viewer used to display the tabs for a launch configuration param viewer protected void set Tab Viewer Launch Configuration Tab Group Viewer viewer f Tab Viewer viewer  setTabViewer LaunchConfigurationTabGroupViewer fTabViewer
Returns the viewer used to display the tabs for a launch configuration return Launch Configuration Tab Group Viewer protected Launch Configuration Tab Group Viewer get Tab Viewer return f Tab Viewer  LaunchConfigurationTabGroupViewer LaunchConfigurationTabGroupViewer getTabViewer fTabViewer
protected void initialize Bounds super initialize Bounds initialize Sash Form ensure Selection Area Width resize  initializeBounds initializeBounds initializeSashForm ensureSelectionAreaWidth
public void create super create bug 27011 if get Tab Viewer get Input null get Tab Viewer input Changed null  getTabViewer getInput getTabViewer inputChanged
see org eclipse debug ui I Launch Configuration Dialog set Active Tab org eclipse debug ui I Launch Configuration Tab public void set Active Tab I Launch Configuration Tab tab get Tab Viewer set Active Tab tab  ILaunchConfigurationDialog setActiveTab ILaunchConfigurationTab setActiveTab ILaunchConfigurationTab getTabViewer setActiveTab
see org eclipse debug ui I Launch Configuration Dialog set Active Tab int public void set Active Tab int index get Tab Viewer set Active Tab index  ILaunchConfigurationDialog setActiveTab setActiveTab getTabViewer setActiveTab
Sets the status to open the dialog on param status the intial status for the dialog public void set Initial Status I Status status f Initial Status status  setInitialStatus IStatus fInitialStatus
Returns the status the dialog was opened on or code null code if none return I Status protected I Status get Initial Status return f Initial Status  IStatus IStatus getInitialStatus fInitialStatus
Consult a status handler for the given status if any The status handler is passed this launch config dialog as an argument param status the status to be handled public void handle Status I Status status I Status Handler handler Debug Plugin get Default get Status Handler status if handler null try handler handle Status status this return catch Core Exception e status e get Status if no handler or handler failed display error warning dialog String title null switch status get Severity case I Status ERROR title Launch Configurations Messages get String Launch Configurations Dialog Error 1 NON NLS 1 break case I Status WARNING title Launch Configurations Messages get String Launch Configurations Dialog Warning 2 NON NLS 1 break default title Launch Configurations Messages get String Launch Configurations Dialog Information 3 NON NLS 1 break Error Dialog open Error get Shell title null status  handleStatus IStatus IStatusHandler DebugPlugin getDefault getStatusHandler handleStatus CoreException getStatus getSeverity IStatus LaunchConfigurationsMessages getString LaunchConfigurationsDialog Error_1 IStatus LaunchConfigurationsMessages getString LaunchConfigurationsDialog Warning_2 LaunchConfigurationsMessages getString LaunchConfigurationsDialog Information_3 ErrorDialog openError getShell

Resource Bundle get Bundle BUNDLE NAME private Launch Configurations Messages  ResourceBundle getBundle BUNDLE_NAME LaunchConfigurationsMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Constructs a launch configuration tab extension based on the given configuration element param element the configuration element defining the attribtues of this launch configuration tab extension return a new launch configuration tab extension public Launch Configuration Tab Group Extension I Configuration Element element set Configuration Element element  LaunchConfigurationTabGroupExtension IConfigurationElement setConfigurationElement
Sets the configuration element that defines the attributes for this launch configuration tab group extension param element configuration element private void set Configuration Element I Configuration Element element f Config element  setConfigurationElement IConfigurationElement fConfig
Returns the configuration element that defines the attributes for this launch configuration tab group extension param configuration element that defines the attributes for this launch configuration tab extension protected I Configuration Element get Configuration Element return f Config  IConfigurationElement getConfigurationElement fConfig
Returns the type of launch configuration this tab group is associated with return the type of launch configuration this tab group is associated with public I Launch Configuration Type get Type return Debug Plugin get Default get Launch Manager get Launch Configuration Type get Type Identifier  ILaunchConfigurationType getType DebugPlugin getDefault getLaunchManager getLaunchConfigurationType getTypeIdentifier
Returns the set of modes specified in the configuration data or code null code if none i e default tab group return the set of modes specified in the configuration data or code null code protected Set get Modes if f Modes null I Configuration Element modes get Configuration Element get Children launch Mode NON NLS 1 if modes length 0 f Modes new Hash Set modes length f Perspectives new Hashtable modes length for int i 0 i modes length i I Configuration Element element modes i String mode element get Attribute mode NON NLS 1 f Modes add mode String perspective element get Attribute perspective NON NLS 1 if perspective null f Perspectives put mode perspective return f Modes  getModes fModes IConfigurationElement getConfigurationElement getChildren launchMode fModes HashSet fPerspectives IConfigurationElement getAttribute fModes getAttribute fPerspectives fModes
Returns the perspective associated with the given launch mode as specified in plug in XML or code null code if none param mode launch mode return perspective identifier or code null code protected String get Perspective String mode ensure modes are initialized get Modes String id null if f Perspectives null id String f Perspectives get mode return id  getPerspective getModes fPerspectives fPerspectives
Returns the identifier of the type of launch configuration this tab group is associated with return the identifier of the type of launch configuration this tab group is associated with protected String get Type Identifier return get Configuration Element get Attribute type NON NLS 1  getTypeIdentifier getConfigurationElement getAttribute
Returns the identifier of the help context associated with this tab group or code null code if one was not specified return the identifier of this tab group s help context or code null code since 2 1 protected String get Help Context Id return get Configuration Element get Attribute help Context Id NON NLS 1  getHelpContextId getConfigurationElement getAttribute helpContextId
Returns a new tab group defined by this extension return a new tab group defined by this extension exception Core Exception if an exception occurs instantiating the tab group public I Launch Configuration Tab Group new Tab Group throws Core Exception return I Launch Configuration Tab Group get Configuration Element create Executable Extension class NON NLS 1  CoreException ILaunchConfigurationTabGroup newTabGroup CoreException ILaunchConfigurationTabGroup getConfigurationElement createExecutableExtension
Returns this tab group s description in the given mode param mode the mode return a description of the Launch Mode if available If not available attempts to return a description of the Launch Configuration If no appropriate description is found an empty string is returned public String get Description String mode String description null I Configuration Element children f Config get Children launch Mode NON NLS 1 if children null children length 0 for int i 0 i children length i I Configuration Element child children i if child get Attribute mode equals mode NON NLS 1 description child get Attribute description NON NLS 1 if description null description f Config get Attribute description NON NLS 1 if description null description NON NLS 1 return description  getDescription IConfigurationElement fConfig getChildren launchMode IConfigurationElement getAttribute getAttribute fConfig getAttribute

Constructs a viewer in the given composite contained by the given launch configuration dialog param parent composite containing this viewer param dialog containing launch configuration dialog public Launch Configuration Tab Group Viewer Composite parent I Launch Configuration Dialog dialog super f Dialog dialog create Control parent  LaunchConfigurationTabGroupViewer ILaunchConfigurationDialog fDialog createControl
Cleanup public void dispose dispose Tab Group  disposeTabGroup
Dispose the active tab group if any protected void dispose Tab Group if get Tab Group null get Tab Group dispose set Tab Group null set Tab Type null  disposeTabGroup getTabGroup getTabGroup setTabGroup setTabType
get Name Widget add Modify Listener new Modify Listener public void modify Text Modify Event e handle Name Modified  getNameWidget addModifyListener ModifyListener modifyText ModifyEvent handleNameModified
SWT Util set Button Dimension Hint get Apply Button get Apply Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Apply Pressed  SWTUtil setButtonDimensionHint getApplyButton getApplyButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleApplyPressed
SWT Util set Button Dimension Hint get Revert Button get Revert Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Revert Pressed  SWTUtil setButtonDimensionHint getRevertButton getRevertButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleRevertPressed
Creates this viewer s control This area displays the name of the launch configuration currently being edited as well as a tab folder of tabs that are applicable to the launch configuration return the composite used for launch configuration editing private void create Control Composite parent Font font parent get Font f Viewer Control new Composite parent SWT NONE Grid Layout outer Comp Layout new Grid Layout outer Comp Layout num Columns 1 outer Comp Layout margin Height 0 outer Comp Layout margin Width 0 f Viewer Control set Layout outer Comp Layout Grid Data gd new Grid Data Grid Data FILL BOTH f Viewer Control set Layout Data gd Composite container new Composite f Viewer Control SWT NONE outer Comp Layout new Grid Layout outer Comp Layout num Columns 2 outer Comp Layout margin Height 0 outer Comp Layout margin Width 5 container set Layout outer Comp Layout gd new Grid Data Grid Data FILL BOTH container set Layout Data gd set Visible Area container f Name Label new Label container SWT HORIZONTAL SWT LEFT f Name Label set Text Launch Configurations Messages get String Launch Configuration Dialog Name  16 NON NLS 1 gd new Grid Data Grid Data BEGINNING f Name Label set Layout Data gd f Name Label set Font font Text name Text new Text container SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL name Text set Layout Data gd name Text set Font font set Name Widget name Text get Name Widget add Modify Listener new Modify Listener public void modify Text Modify Event e handle Name Modified Label spacer new Label container SWT NONE gd new Grid Data gd horizontal Span 2 spacer set Layout Data gd f Tab Composite new Composite container SWT NONE Grid Layout outer Tab Composite Layout new Grid Layout outer Tab Composite Layout margin Height 0 outer Tab Composite Layout margin Width 0 f Tab Composite set Layout outer Tab Composite Layout gd new Grid Data Grid Data FILL BOTH gd horizontal Span 2 f Tab Composite set Layout Data gd create Tab Folder f Tab Composite Composite button Comp new Composite container SWT NONE Grid Layout button Comp Layout new Grid Layout button Comp Layout num Columns 2 button Comp set Layout button Comp Layout gd new Grid Data Grid Data HORIZONTAL ALIGN END gd horizontal Span 2 button Comp set Layout Data gd set Apply Button new Button button Comp SWT PUSH get Apply Button set Text Launch Configurations Messages get String Launch Configuration Dialog Apply 17 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN END get Apply Button set Layout Data gd get Apply Button set Font font SWT Util set Button Dimension Hint get Apply Button get Apply Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Apply Pressed set Revert Button new Button button Comp SWT PUSH get Revert Button set Text Launch Configurations Messages get String Launch Configuration Dialog Revert 2 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN END get Revert Button set Layout Data gd get Revert Button set Font font SWT Util set Button Dimension Hint get Revert Button get Revert Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Revert Pressed  createControl getFont fViewerControl GridLayout outerCompLayout GridLayout outerCompLayout numColumns outerCompLayout marginHeight outerCompLayout marginWidth fViewerControl setLayout outerCompLayout GridData GridData GridData FILL_BOTH fViewerControl setLayoutData fViewerControl outerCompLayout GridLayout outerCompLayout numColumns outerCompLayout marginHeight outerCompLayout marginWidth setLayout outerCompLayout GridData GridData FILL_BOTH setLayoutData setVisibleArea fNameLabel fNameLabel setText LaunchConfigurationsMessages getString LaunchConfigurationDialog Name__16 GridData GridData fNameLabel setLayoutData fNameLabel setFont nameText GridData GridData FILL_HORIZONTAL nameText setLayoutData nameText setFont setNameWidget nameText getNameWidget addModifyListener ModifyListener modifyText ModifyEvent handleNameModified GridData horizontalSpan setLayoutData fTabComposite GridLayout outerTabCompositeLayout GridLayout outerTabCompositeLayout marginHeight outerTabCompositeLayout marginWidth fTabComposite setLayout outerTabCompositeLayout GridData GridData FILL_BOTH horizontalSpan fTabComposite setLayoutData createTabFolder fTabComposite buttonComp GridLayout buttonCompLayout GridLayout buttonCompLayout numColumns buttonComp setLayout buttonCompLayout GridData GridData HORIZONTAL_ALIGN_END horizontalSpan buttonComp setLayoutData setApplyButton buttonComp getApplyButton setText LaunchConfigurationsMessages getString LaunchConfigurationDialog Apply_17 GridData GridData HORIZONTAL_ALIGN_END getApplyButton setLayoutData getApplyButton setFont SWTUtil setButtonDimensionHint getApplyButton getApplyButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleApplyPressed setRevertButton buttonComp getRevertButton setText LaunchConfigurationsMessages getString LaunchConfigurationDialog Revert_2 GridData GridData HORIZONTAL_ALIGN_END getRevertButton setLayoutData getRevertButton setFont SWTUtil setButtonDimensionHint getRevertButton getRevertButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleRevertPressed
get Tab Folder add Selection Listener new Selection Adapter public void widget Selected Selection Event event if is Initializing Tabs handle Tab Selected  getTabFolder addSelectionListener SelectionAdapter widgetSelected SelectionEvent isInitializingTabs handleTabSelected
private void create Tab Folder Composite parent Point size null if f Tab Folder null size f Tab Folder get Size f Tab Folder dispose f Tab Folder new Tab Folder parent SWT NONE Grid Data gd new Grid Data Grid Data FILL BOTH f Tab Folder set Layout Data gd f Tab Folder set Font parent get Font if size null f Tab Folder set Size size get Tab Folder add Selection Listener new Selection Adapter public void widget Selected Selection Event event if is Initializing Tabs handle Tab Selected  createTabFolder fTabFolder fTabFolder getSize fTabFolder fTabFolder TabFolder GridData GridData GridData FILL_BOTH fTabFolder setLayoutData fTabFolder setFont getFont fTabFolder setSize getTabFolder addSelectionListener SelectionAdapter widgetSelected SelectionEvent isInitializingTabs handleTabSelected
Sets the apply button private void set Apply Button Button button f Apply Button button  setApplyButton fApplyButton
Returns the apply button protected Button get Apply Button return f Apply Button  getApplyButton fApplyButton
Sets the revert button private void set Revert Button Button button f Revert Button button  setRevertButton fRevertButton
Returns the revert button protected Button get Revert Button return f Revert Button  getRevertButton fRevertButton
Sets the tab folder protected Tab Folder get Tab Folder return f Tab Folder  TabFolder getTabFolder fTabFolder
Returns the name widget private Text get Name Widget return f Name Widget  getNameWidget fNameWidget
Sets the name widget private void set Name Widget Text name Text f Name Widget name Text  setNameWidget nameText fNameWidget nameText
Sets the current name public void set Name String name if get Working Copy null if name null name NON NLS 1 get Name Widget set Text name trim refresh Status  setName getWorkingCopy getNameWidget setText refreshStatus
see org eclipse jface viewers Viewer get Control public Control get Control return f Viewer Control  getControl getControl fViewerControl
Returns the shell this viewer is contained in protected Shell get Shell return get Control get Shell  getShell getControl getShell
see org eclipse jface viewers I Input Provider get Input public Object get Input return f Input  IInputProvider getInput getInput fInput
see org eclipse jface viewers I Selection Provider get Selection public I Selection get Selection if get Active Tab null return new Structured Selection else return new Structured Selection get Active Tab  ISelectionProvider getSelection ISelection getSelection getActiveTab StructuredSelection StructuredSelection getActiveTab
see org eclipse jface viewers Viewer refresh public void refresh if is Initializing Tabs return I Launch Configuration Tab tabs get Tabs if is Initializing Tabs tabs null update the working copy from the active tab get Active Tab perform Apply get Working Copy update Buttons update error ticks Tab Folder folder get Tab Folder for int i 0 i tabs length i I Launch Configuration Tab tab tabs i tab is Valid get Working Copy boolean error tab get Error Message null Tab Item item folder get Item i set Tab Icon item error tab  isInitializingTabs ILaunchConfigurationTab getTabs isInitializingTabs getActiveTab performApply getWorkingCopy updateButtons TabFolder getTabFolder ILaunchConfigurationTab isValid getWorkingCopy getErrorMessage TabItem getItem setTabIcon
private void update Buttons boolean dirty is Dirty get Apply Button set Enabled dirty can Save get Revert Button set Enabled dirty  updateButtons isDirty getApplyButton setEnabled canSave getRevertButton setEnabled
Set the specified tab item s icon to an error icon if code error code is true or a transparent icon of the same size otherwise private void set Tab Icon Tab Item tab Item boolean error I Launch Configuration Tab tab Image image null if error image DebugUI Plugin get Default get Launch Configuration Manager get Error Tab Image tab else image tab get Image tab Item set Image image  setTabIcon TabItem tabItem ILaunchConfigurationTab DebugUIPlugin getDefault getLaunchConfigurationManager getErrorTabImage getImage tabItem setImage
see org eclipse jface viewers Viewer set Input java lang Object public void set Input Object input if input null if f Input null return else input Changed input else if input equals f Input input Changed input  setInput setInput fInput inputChanged fInput inputChanged
Runnable r new Runnable public void run try if f Input instanceof I Launch Configuration I Launch Configuration configuration I Launch Configuration f Input set Original configuration set Working Copy configuration get Working Copy display Instance Tabs else if f Input instanceof I Launch Configuration Type I Launch Configuration configuration Launch Configuration Manager get Shared Type Config I Launch Configuration Type f Input set Original configuration set Working Copy configuration get Working Copy display Shared Tabs else set No Input set Redraw true catch Core Exception ce error Dialog ce set No Input set Redraw true  fInput ILaunchConfiguration ILaunchConfiguration ILaunchConfiguration fInput setOriginal setWorkingCopy getWorkingCopy displayInstanceTabs fInput ILaunchConfigurationType ILaunchConfiguration LaunchConfigurationManager getSharedTypeConfig ILaunchConfigurationType fInput setOriginal setWorkingCopy getWorkingCopy displaySharedTabs setNoInput setRedraw CoreException errorDialog setNoInput setRedraw
The input has changed to the given object possibly code null code param input the new input possibly code null code protected void input Changed Object input f Input input Runnable r new Runnable public void run try if f Input instanceof I Launch Configuration I Launch Configuration configuration I Launch Configuration f Input set Original configuration set Working Copy configuration get Working Copy display Instance Tabs else if f Input instanceof I Launch Configuration Type I Launch Configuration configuration Launch Configuration Manager get Shared Type Config I Launch Configuration Type f Input set Original configuration set Working Copy configuration get Working Copy display Shared Tabs else set No Input set Redraw true catch Core Exception ce error Dialog ce set No Input set Redraw true Busy Indicator show While get Shell get Display r  inputChanged fInput fInput ILaunchConfiguration ILaunchConfiguration ILaunchConfiguration fInput setOriginal setWorkingCopy getWorkingCopy displayInstanceTabs fInput ILaunchConfigurationType ILaunchConfiguration LaunchConfigurationManager getSharedTypeConfig ILaunchConfigurationType fInput setOriginal setWorkingCopy getWorkingCopy displaySharedTabs setNoInput setRedraw CoreException errorDialog setNoInput setRedraw BusyIndicator showWhile getShell getDisplay
private void set No Input set Original null set Working Copy null get Visible Area set Visible false dispose Existing Tabs  setNoInput setOriginal setWorkingCopy getVisibleArea setVisible disposeExistingTabs
private void set Redraw boolean b if f Redraw b f Redraw b get Visible Area set Redraw f Redraw  setRedraw fRedraw fRedraw getVisibleArea setRedraw fRedraw
Displays tabs for the current working copy protected void display Instance Tabs Turn on initializing flag to ignore message updates set Initializing Tabs true I Launch Configuration Type type null try type get Working Copy get Type show Instance Tabs For type catch Core Exception e error Dialog e set Initializing Tabs false return show the name area f Name Label set Visible true f Name Widget set Visible true Update the name field before to avoid verify error get Name Widget set Text get Working Copy get Name Retrieve the current tab group If there is none clean up and leave I Launch Configuration Tab Group tab Group get Tab Group if tab Group null I Status status new Status I Status ERROR DebugUI Plugin get Unique Identifier 0 Message Format format Launch Configurations Messages get String Launch Configuration Tab Group Viewer No tabs defined for launch configuration type  0  1 new String type get Name null NON NLS 1 Core Exception e new Core Exception status error Dialog e set Initializing Tabs false return Update the tabs with the new working copy tab Group initialize From get Working Copy Update the name field after in case client changed it get Name Widget set Text get Working Copy get Name f Current Tab Index get Tab Folder get Selection Index Turn off initializing flag to update message set Initializing Tabs false if get Visible Area is Visible get Visible Area set Visible true refresh Status  displayInstanceTabs setInitializingTabs ILaunchConfigurationType getWorkingCopy getType showInstanceTabsFor CoreException errorDialog setInitializingTabs fNameLabel setVisible fNameWidget setVisible getNameWidget setText getWorkingCopy getName ILaunchConfigurationTabGroup tabGroup getTabGroup tabGroup IStatus IStatus DebugUIPlugin getUniqueIdentifier MessageFormat LaunchConfigurationsMessages getString LaunchConfigurationTabGroupViewer No_tabs_defined_for_launch_configuration_type_ _1 getName CoreException CoreException errorDialog setInitializingTabs tabGroup initializeFrom getWorkingCopy getNameWidget setText getWorkingCopy getName fCurrentTabIndex getTabFolder getSelectionIndex setInitializingTabs getVisibleArea isVisible getVisibleArea setVisible refreshStatus
Displays tabs for the current config type protected void display Shared Tabs Turn on initializing flag to ignore message updates set Initializing Tabs true I Launch Configuration Type type null try type get Working Copy get Type show Shared Tabs For type catch Core Exception e error Dialog e set Initializing Tabs false return hide the name area f Name Label set Visible false f Name Widget set Visible false Update the name field before to avoid verify error get Name Widget set Text get Working Copy get Name Retrieve the current tab group If there is none clean up and leave I Launch Configuration Tab Group tab Group get Tab Group if tab Group null I Status status new Status I Status ERROR DebugUI Plugin get Unique Identifier 0 Message Format format Launch Configurations Messages get String Launch Configuration Tab Group Viewer No tabs defined for launch configuration type  0  1 new String type get Name null NON NLS 1 Core Exception e new Core Exception status error Dialog e set Initializing Tabs false return Update the tabs with the new working copy tab Group initialize From get Working Copy Update the name field after in case client changed it get Name Widget set Text get Working Copy get Name f Current Tab Index get Tab Folder get Selection Index Turn off initializing flag to update message set Initializing Tabs false if get Visible Area is Visible get Visible Area set Visible true f Description get Description null refresh Status  displaySharedTabs setInitializingTabs ILaunchConfigurationType getWorkingCopy getType showSharedTabsFor CoreException errorDialog setInitializingTabs fNameLabel setVisible fNameWidget setVisible getNameWidget setText getWorkingCopy getName ILaunchConfigurationTabGroup tabGroup getTabGroup tabGroup IStatus IStatus DebugUIPlugin getUniqueIdentifier MessageFormat LaunchConfigurationsMessages getString LaunchConfigurationTabGroupViewer No_tabs_defined_for_launch_configuration_type_ _1 getName CoreException CoreException errorDialog setInitializingTabs tabGroup initializeFrom getWorkingCopy getNameWidget setText getWorkingCopy getName fCurrentTabIndex getTabFolder getSelectionIndex setInitializingTabs getVisibleArea isVisible getVisibleArea setVisible fDescription getDescription refreshStatus
Populate the tabs in the configuration edit area to be appropriate to the current launch configuration type private void show Instance Tabs For I Launch Configuration Type config Type Don t do any work if the current tabs are for the current config type if get Tab Type null get Tab Type equals config Type get Tab Group instanceof Perspective Tab Group return Build the new tabs I Launch Configuration Tab Group group null try group create Group config Type catch Core Exception ce DebugUI Plugin error Dialog get Shell Launch Configurations Messages get String Launch Configuration Dialog Error 19 Launch Configurations Messages get String Launch Configuration Dialog Exception occurred creating launch configuration tabs 27 ce NON NLS 1 NON NLS 2 return show Tabs For group set Tab Group group set Tab Type config Type f Description get Description config Type  showInstanceTabsFor ILaunchConfigurationType configType getTabType getTabType configType getTabGroup PerspectiveTabGroup ILaunchConfigurationTabGroup createGroup configType CoreException DebugUIPlugin errorDialog getShell LaunchConfigurationsMessages getString LaunchConfigurationDialog Error_19 LaunchConfigurationsMessages getString LaunchConfigurationDialog Exception_occurred_creating_launch_configuration_tabs_27 showTabsFor setTabGroup setTabType configType fDescription getDescription configType
Returns the description of the given configuration type in the current mode or code null code if none param config Type the config type return the description of the given configuration type or code null code private String get Description I Launch Configuration Type config Type String description null if config Type null String mode f Dialog get Mode Launch Configuration Presentation Manager manager Launch Configuration Presentation Manager get Default Launch Configuration Tab Group Extension extension manager get Extension config Type get Attribute id mode NON NLS 1 description extension get Description mode if description null description NON NLS 1 return description  configType getDescription ILaunchConfigurationType configType configType fDialog getMode LaunchConfigurationPresentationManager LaunchConfigurationPresentationManager getDefault LaunchConfigurationTabGroupExtension getExtension configType getAttribute getDescription
Populate the tabs in the configuration edit area for the shared info for the given launch config type private void show Shared Tabs For I Launch Configuration Type config Type Don t do any work if the current tabs are for the current config type if get Tab Type null get Tab Type equals config Type get Tab Group instanceof Perspective Tab Group return Build the new tabs I Launch Configuration Tab Group group new Perspective Tab Group config Type group create Tabs get Launch Configuration Dialog get Launch Configuration Dialog get Mode I Launch Configuration Tab tabs group get Tabs for int i 0 i tabs length i tabs i set Launch Configuration Dialog get Launch Configuration Dialog show Tabs For group set Tab Type config Type set Tab Group group  showSharedTabsFor ILaunchConfigurationType configType getTabType getTabType configType getTabGroup PerspectiveTabGroup ILaunchConfigurationTabGroup PerspectiveTabGroup configType createTabs getLaunchConfigurationDialog getLaunchConfigurationDialog getMode ILaunchConfigurationTab getTabs setLaunchConfigurationDialog getLaunchConfigurationDialog showTabsFor setTabType configType setTabGroup
Create the tabs in the configuration edit area for the given tab group private void show Tabs For I Launch Configuration Tab Group tab Group turn off redraw set Redraw false Dispose the current tabs dispose Existing Tabs set Tab Group tab Group Create the Control for each tab I Launch Configuration Tab tabs tab Group get Tabs for int i 0 i tabs length i Tab Item tab new Tab Item get Tab Folder SWT NONE String name tabs i get Name if name null name Launch Configurations Messages get String Launch Configuration Dialog unspecified 28 NON NLS 1 tab set Text name Image image tabs i get Image tab set Image image tabs i create Control tab get Parent Control control tabs i get Control if control null tab set Control control  showTabsFor ILaunchConfigurationTabGroup tabGroup setRedraw disposeExistingTabs setTabGroup tabGroup ILaunchConfigurationTab tabGroup getTabs TabItem TabItem getTabFolder getName LaunchConfigurationsMessages getString LaunchConfigurationDialog unspecified_28 setText getImage setImage createControl getParent getControl setControl
Runnable runnable new Runnable public void run I Launch Configuration Tab Group tab Group null try tab Group Launch Configuration Presentation Manager get Default get Tab Group config Type get Launch Configuration Dialog get Mode final Array 0 tab Group catch Core Exception ce final Array 1 ce return tab Group create Tabs get Launch Configuration Dialog get Launch Configuration Dialog get Mode I Launch Configuration Tab tabs tab Group get Tabs for int i 0 i tabs length i tabs i set Launch Configuration Dialog get Launch Configuration Dialog  ILaunchConfigurationTabGroup tabGroup tabGroup LaunchConfigurationPresentationManager getDefault getTabGroup configType getLaunchConfigurationDialog getMode finalArray tabGroup CoreException finalArray tabGroup createTabs getLaunchConfigurationDialog getLaunchConfigurationDialog getMode ILaunchConfigurationTab tabGroup getTabs setLaunchConfigurationDialog getLaunchConfigurationDialog
Returns tab group for the given type of launch configuration Tabs are initialized to be contained in this dialog exception Core Exception if unable to instantiate a tab group protected I Launch Configuration Tab Group create Group final I Launch Configuration Type config Type throws Core Exception Use a final Object array to store the tab group and any exception that results from the Runnable final Object final Array new Object 2 Runnable runnable new Runnable public void run I Launch Configuration Tab Group tab Group null try tab Group Launch Configuration Presentation Manager get Default get Tab Group config Type get Launch Configuration Dialog get Mode final Array 0 tab Group catch Core Exception ce final Array 1 ce return tab Group create Tabs get Launch Configuration Dialog get Launch Configuration Dialog get Mode I Launch Configuration Tab tabs tab Group get Tabs for int i 0 i tabs length i tabs i set Launch Configuration Dialog get Launch Configuration Dialog Creating the tabs can result in plugin loading so we show the busy cursor Busy Indicator show While get Control get Display runnable Re throw any Core Exception if there was one if final Array 1 null throw Core Exception final Array 1 Otherwise return the tab group return I Launch Configuration Tab Group final Array 0  CoreException ILaunchConfigurationTabGroup createGroup ILaunchConfigurationType configType CoreException finalArray ILaunchConfigurationTabGroup tabGroup tabGroup LaunchConfigurationPresentationManager getDefault getTabGroup configType getLaunchConfigurationDialog getMode finalArray tabGroup CoreException finalArray tabGroup createTabs getLaunchConfigurationDialog getLaunchConfigurationDialog getMode ILaunchConfigurationTab tabGroup getTabs setLaunchConfigurationDialog getLaunchConfigurationDialog BusyIndicator showWhile getControl getDisplay CoreException finalArray CoreException finalArray ILaunchConfigurationTabGroup finalArray
see org eclipse jface viewers Viewer set Selection org eclipse jface viewers I Selection boolean public void set Selection I Selection selection boolean reveal if get Working Copy null if selection instanceof I Structured Selection I Structured Selection structured Selection I Structured Selection selection Object object structured Selection get First Element if object instanceof I Launch Configuration Tab I Launch Configuration Tab tabs get Tabs for int i 0 i tabs length i I Launch Configuration Tab tab tabs i if tab equals object f Current Tab Index i get Tab Folder set Selection i return  setSelection ISelection setSelection ISelection getWorkingCopy IStructuredSelection IStructuredSelection structuredSelection IStructuredSelection structuredSelection getFirstElement ILaunchConfigurationTab ILaunchConfigurationTab getTabs ILaunchConfigurationTab fCurrentTabIndex getTabFolder setSelection
Returns the tabs currently being displayed or code null code if none return currently displayed tabs or code null code public I Launch Configuration Tab get Tabs if get Tab Group null return get Tab Group get Tabs return null  ILaunchConfigurationTab getTabs getTabGroup getTabGroup getTabs
Returns the currently active code I Launch Configuration Tab code being displayed or code null code if there is none return currently active code I Launch Configuration Tab code or code null code public I Launch Configuration Tab get Active Tab Tab Folder folder get Tab Folder I Launch Configuration Tab tabs get Tabs if folder null tabs null int page Index folder get Selection Index if page Index 0 return tabs page Index return null  ILaunchConfigurationTab ILaunchConfigurationTab ILaunchConfigurationTab getActiveTab TabFolder getTabFolder ILaunchConfigurationTab getTabs pageIndex getSelectionIndex pageIndex pageIndex
Returns whether the launch configuration being edited is dirty i e needs saving return whether the launch configuration being edited needs saving public boolean is Dirty I Launch Configuration Working Copy working Copy get Working Copy if working Copy null return false Working copy hasn t been saved if working Copy get Original null return true I Launch Configuration original get Original return original contents Equal working Copy  isDirty ILaunchConfigurationWorkingCopy workingCopy getWorkingCopy workingCopy workingCopy getOriginal ILaunchConfiguration getOriginal contentsEqual workingCopy
Update apply revert buttons as well as buttons and message on the launch config dialog protected void refresh Status if is Initializing Tabs get Launch Configuration Dialog update Buttons get Launch Configuration Dialog update Message  refreshStatus isInitializingTabs getLaunchConfigurationDialog updateButtons getLaunchConfigurationDialog updateMessage
Returns the containing launch dialog protected I Launch Configuration Dialog get Launch Configuration Dialog return f Dialog  ILaunchConfigurationDialog getLaunchConfigurationDialog fDialog
Sets the launch configuration being displayed edited possilby code null code private void set Original I Launch Configuration configuration f Original configuration  setOriginal ILaunchConfiguration fOriginal
Returns the original launch configuration being edited possibly code null code return I Launch Configuration protected I Launch Configuration get Original return f Original  ILaunchConfiguration ILaunchConfiguration getOriginal fOriginal
Sets the working copy used to edit the original private void set Working Copy I Launch Configuration Working Copy working Copy f Working Copy working Copy  setWorkingCopy ILaunchConfigurationWorkingCopy workingCopy fWorkingCopy workingCopy
Returns the working copy used to edit the original possibly code null code protected I Launch Configuration Working Copy get Working Copy return f Working Copy  ILaunchConfigurationWorkingCopy getWorkingCopy fWorkingCopy
Return whether the current configuration can be saved p Note this is NOT the same thing as the config simply being valid It is possible to save a config that does not validate This method determines whether the config can be saved without causing a serious error For example a shared config that has no specified location would cause this method to return code false code p public boolean can Save if is Initializing Tabs return false First make sure that name doesn t prevent saving the config try verify Name catch Core Exception ce return false Next make sure none of the tabs object to saving the config I Launch Configuration Tab tabs get Tabs if tabs null return false for int i 0 i tabs length i if tabs i can Save return false return true  canSave isInitializingTabs verifyName CoreException ILaunchConfigurationTab getTabs canSave
see I Launch Configuration Dialog can Launch public boolean can Launch if is Initializing Tabs return false if get Active Tab instanceof Perspectives Tab return false if get Working Copy null return false try verify Name catch Core Exception e return false I Launch Configuration Tab tabs get Tabs if tabs null return false for int i 0 i tabs length i if tabs i is Valid get Working Copy return false return true  ILaunchConfigurationDialog canLaunch canLaunch isInitializingTabs getActiveTab PerspectivesTab getWorkingCopy verifyName CoreException ILaunchConfigurationTab getTabs isValid getWorkingCopy
Returns the current error message or code null code if none public String get Error Messsage if is Initializing Tabs return null if get Working Copy null return null try verify Name catch Core Exception ce return ce get Status get Message String message null I Launch Configuration Tab active Tab get Active Tab if active Tab null return null else message active Tab get Error Message if message null return message I Launch Configuration Tab all Tabs get Tabs for int i 0 i all Tabs length i I Launch Configuration Tab tab all Tabs i if tab active Tab continue message tab get Error Message if message null String Buffer temp new String Buffer temp append temp append remove Ampersands From tab get Name temp append NON NLS 1 temp append message return temp to String return null  getErrorMesssage isInitializingTabs getWorkingCopy verifyName CoreException getStatus getMessage ILaunchConfigurationTab activeTab getActiveTab activeTab activeTab getErrorMessage ILaunchConfigurationTab allTabs getTabs allTabs ILaunchConfigurationTab allTabs activeTab getErrorMessage StringBuffer StringBuffer removeAmpersandsFrom getName toString
Return a copy of the specified string without ampersands private String remove Ampersands From String string String new String new String string int index new String index Of while index 1 new String string substring 0 index new String substring index 1 new String length index new String index Of return new String  removeAmpersandsFrom newString newString indexOf newString newString newString newString indexOf newString
Returns the current message or code null code if none return Returns an appropriate message for display to user The message returned will be The message defined by the visible tab or The tab group description for the particular launch mode or The generic tab group description or code null code if no message is defined public String get Message if is Initializing Tabs return null String message f Description I Launch Configuration Tab tab get Active Tab if tab null String tab Message tab get Message if tab Message null message tab Message return message  getMessage isInitializingTabs fDescription ILaunchConfigurationTab getActiveTab tabMessage getMessage tabMessage tabMessage
Verify that the launch configuration name is valid protected void verify Name throws Core Exception if f Name Widget is Visible String current Name get Name Widget get Text trim If there is no name complain if current Name length 1 throw new Core Exception new Status I Status ERROR DebugUI Plugin get Unique Identifier 0 Launch Configurations Messages get String Launch Configuration Dialog Name required for launch configuration 11 NON NLS 1 null See if name contains any illegal characters I Status status Resources Plugin get Workspace validate Name current Name I Resource FILE if status get Code I Status OK throw new Core Exception new Status I Status ERROR DebugUI Plugin get Unique Identifier 0 status get Message null Otherwise if there s already a config with the same name complain if get Original get Name equals current Name if get Launch Manager is Existing Launch Configuration Name current Name throw new Core Exception new Status I Status ERROR DebugUI Plugin get Unique Identifier 0 Launch Configurations Messages get String Launch Configuration Dialog Launch configuration already exists with this name 12 NON NLS 1 null  verifyName CoreException fNameWidget isVisible currentName getNameWidget getText currentName CoreException IStatus DebugUIPlugin getUniqueIdentifier LaunchConfigurationsMessages getString LaunchConfigurationDialog Name_required_for_launch_configuration_11 IStatus ResourcesPlugin getWorkspace validateName currentName IResource getCode IStatus CoreException IStatus DebugUIPlugin getUniqueIdentifier getMessage getOriginal getName currentName getLaunchManager isExistingLaunchConfigurationName currentName CoreException IStatus DebugUIPlugin getUniqueIdentifier LaunchConfigurationsMessages getString LaunchConfigurationDialog Launch_configuration_already_exists_with_this_name_12
private void set Disposing Tabs boolean disposing f Disposing Tabs disposing  setDisposingTabs fDisposingTabs
private boolean is Disposing Tabs return f Disposing Tabs  isDisposingTabs fDisposingTabs
private void set Initializing Tabs boolean initializing f Initializing Tabs initializing  setInitializingTabs fInitializingTabs
private boolean is Initializing Tabs return f Initializing Tabs  isInitializingTabs fInitializingTabs
private void dispose Existing Tabs set Disposing Tabs true Tab Item old Tabs get Tab Folder get Items for int i 0 i old Tabs length i old Tabs i dispose create Tab Folder f Tab Composite dispose Tab Group set Disposing Tabs false  disposeExistingTabs setDisposingTabs TabItem oldTabs getTabFolder getItems oldTabs oldTabs createTabFolder fTabComposite disposeTabGroup setDisposingTabs
private I Launch Manager get Launch Manager return Debug Plugin get Default get Launch Manager  ILaunchManager getLaunchManager DebugPlugin getDefault getLaunchManager
Returns the type that tabs are currently displayed for or code null code if none return launch configuration type or code null code private I Launch Configuration Type get Tab Type return f Tab Type  ILaunchConfigurationType getTabType fTabType
Sets the type that tabs are currently displayed for or code null code if none param tab Type launch configuration type private void set Tab Type I Launch Configuration Type tab Type f Tab Type tab Type  tabType setTabType ILaunchConfigurationType tabType fTabType tabType
Sets the current tab group being displayed param group the current tab group being displayed private void set Tab Group I Launch Configuration Tab Group group f Tab Group group  setTabGroup ILaunchConfigurationTabGroup fTabGroup
Returns the current tab group return the current tab group or code null code if none public I Launch Configuration Tab Group get Tab Group return f Tab Group  ILaunchConfigurationTabGroup getTabGroup fTabGroup
Notification that a tab has been selected Disallow tab changing when the current tab is invalid Update the config from the tab being left and refresh the tab being entered protected void handle Tab Selected if is Disposing Tabs return I Launch Configuration Tab tabs get Tabs if f Current Tab Index get Tab Folder get Selection Index tabs null tabs length 0 f Current Tab Index tabs length 1 return if f Current Tab Index 1 I Launch Configuration Tab tab tabs f Current Tab Index I Launch Configuration Working Copy wc get Working Copy if wc null tab deactivated wc get Active Tab activated wc f Current Tab Index get Tab Folder get Selection Index Selection Changed Event event new Selection Changed Event this get Selection fire Selection Changed event  handleTabSelected isDisposingTabs ILaunchConfigurationTab getTabs fCurrentTabIndex getTabFolder getSelectionIndex fCurrentTabIndex fCurrentTabIndex ILaunchConfigurationTab fCurrentTabIndex ILaunchConfigurationWorkingCopy getWorkingCopy getActiveTab fCurrentTabIndex getTabFolder getSelectionIndex SelectionChangedEvent SelectionChangedEvent getSelection fireSelectionChanged
Notification the name field has been modified protected void handle Name Modified get Working Copy rename get Name Widget get Text trim refresh Status  handleNameModified getWorkingCopy getNameWidget getText refreshStatus
Notification that the Apply button has been pressed protected void handle Apply Pressed try trim name Text widget get Name Widget String name widget get Text String trimmed name trim update launch config set Initializing Tabs true if name equals trimmed widget set Text trimmed get Working Copy rename trimmed get Tab Group perform Apply get Working Copy set Initializing Tabs false if is Dirty get Working Copy do Save update Buttons catch Core Exception e DebugUI Plugin error Dialog get Shell Launch Configurations Messages get String Launch Configuration Dialog Launch Configuration Error 46 Launch Configurations Messages get String Launch Configuration Dialog Exception occurred while saving launch configuration 47 e NON NLS 1 NON NLS 2 return  handleApplyPressed getNameWidget getText setInitializingTabs setText getWorkingCopy getTabGroup performApply getWorkingCopy setInitializingTabs isDirty getWorkingCopy doSave updateButtons CoreException DebugUIPlugin errorDialog getShell LaunchConfigurationsMessages getString LaunchConfigurationDialog Launch_Configuration_Error_46 LaunchConfigurationsMessages getString LaunchConfigurationDialog Exception_occurred_while_saving_launch_configuration_47
Notification that the Revert button has been pressed protected void handle Revert Pressed if get Active Tab instanceof Perspectives Tab input Changed get Tab Type else input Changed get Original  handleRevertPressed getActiveTab PerspectivesTab inputChanged getTabType inputChanged getOriginal
Show an error dialog on the given exception param exception protected void error Dialog Core Exception exception Error Dialog open Error get Shell null null exception get Status  errorDialog CoreException ErrorDialog openError getShell getStatus
protected void set Visible Area Composite control f Visible Area control  setVisibleArea fVisibleArea
protected Composite get Visible Area return f Visible Area  getVisibleArea fVisibleArea
Sets the displayed tab to the given tab Has no effect if the specified tab is not one of the tabs being displayed in the dialog currently param tab the tab to display activate public void set Active Tab I Launch Configuration Tab tab I Launch Configuration Tab tabs get Tabs for int i 0 i tabs length i I Launch Configuration Tab configuration Tab tabs i if configuration Tab equals tab set Active Tab i return  setActiveTab ILaunchConfigurationTab ILaunchConfigurationTab getTabs ILaunchConfigurationTab configurationTab configurationTab setActiveTab
Sets the displayed tab to the tab with the given index Has no effect if the specified index is not within the limits of the tabs returned by code get Tabs code param index the index of the tab to dispay public void set Active Tab int index I Launch Configuration Tab tabs get Tabs if index 0 index tabs length get Tab Folder set Selection index handle Tab Selected  getTabs setActiveTab ILaunchConfigurationTab getTabs getTabFolder setSelection handleTabSelected

Create a new JDI Image Descriptor param base Image an image descriptor used as the base image param flags flags indicating which adornments are to be rendered public Launch Configuration Tab Image Descriptor Image base Image int flags set Base Image base Image set Flags flags  JDIImageDescriptor baseImage LaunchConfigurationTabImageDescriptor baseImage setBaseImage baseImage setFlags
see Composite Image Descriptor get Size protected Point get Size if f Size null Image Data data get Base Image get Image Data set Size new Point data width data height return f Size  CompositeImageDescriptor getSize getSize fSize ImageData getBaseImage getImageData setSize fSize
see Object equals java lang Object public boolean equals Object object if object instanceof Launch Configuration Tab Image Descriptor return false Launch Configuration Tab Image Descriptor other Launch Configuration Tab Image Descriptor object return get Base Image equals other get Base Image get Flags other get Flags  LaunchConfigurationTabImageDescriptor LaunchConfigurationTabImageDescriptor LaunchConfigurationTabImageDescriptor getBaseImage getBaseImage getFlags getFlags
see Object hash Code public int hash Code return get Base Image hash Code get Flags  hashCode hashCode getBaseImage hashCode getFlags
see Composite Image Descriptor draw Composite Image int int protected void draw Composite Image int width int height Image Data bg get Base Image get Image Data if bg null bg DEFAULT IMAGE DATA draw Image bg 0 0 draw Overlays  CompositeImageDescriptor drawCompositeImage drawCompositeImage ImageData getBaseImage getImageData DEFAULT_IMAGE_DATA drawImage drawOverlays
Add any overlays to the image as specified in the flags protected void draw Overlays int flags get Flags Image Data data null if flags ERROR 0 data DebugUI Tools get Image I DebugUI Constants IMG OVR ERROR get Image Data draw Image data 0 0  drawOverlays getFlags ImageData DebugUITools getImage IDebugUIConstants IMG_OVR_ERROR getImageData drawImage
protected Image get Base Image return f Base Image  getBaseImage fBaseImage
protected void set Base Image Image base Image f Base Image base Image  setBaseImage baseImage fBaseImage baseImage
protected int get Flags return f Flags  getFlags fFlags
protected void set Flags int flags f Flags flags  setFlags fFlags
protected void set Size Point size f Size size  setSize fSize

private Shell f Shell public Launch Configuration Tree Content Provider String mode Shell shell set Mode mode set Shell shell  fShell LaunchConfigurationTreeContentProvider setMode setShell
Actual launch configurations have no children Launch configuration types have all configurations of that type as children minus any configurations that are marked as private p In 2 1 the code category code attribute was added to launch config types The debug UI only displays those configs that do not specify a category p see org eclipse jface viewers I Tree Content Provider get Children java lang Object public Object get Children Object parent Element if parent Element instanceof I Launch Configuration return EMPTY ARRAY else if parent Element instanceof I Launch Configuration Type try I Launch Configuration Type type I Launch Configuration Type parent Element return get Launch Manager get Launch Configurations type catch Core Exception e DebugUI Plugin error Dialog get Shell Launch Configurations Messages get String Launch Configuration Dialog Error 19 Launch Configurations Messages get String Launch Configuration Dialog An exception occurred while retrieving launch configurations 20 e NON NLS 1 NON NLS 2 else return get Launch Manager get Launch Configuration Types return EMPTY ARRAY  ITreeContentProvider getChildren getChildren parentElement parentElement ILaunchConfiguration EMPTY_ARRAY parentElement ILaunchConfigurationType ILaunchConfigurationType ILaunchConfigurationType parentElement getLaunchManager getLaunchConfigurations CoreException DebugUIPlugin errorDialog getShell LaunchConfigurationsMessages getString LaunchConfigurationDialog Error_19 LaunchConfigurationsMessages getString LaunchConfigurationDialog An_exception_occurred_while_retrieving_launch_configurations_20 getLaunchManager getLaunchConfigurationTypes EMPTY_ARRAY
public Object get Parent Object element if element instanceof I Launch Configuration if I Launch Configuration element exists return null try return I Launch Configuration element get Type catch Core Exception e DebugUI Plugin error Dialog get Shell Launch Configurations Messages get String Launch Configuration Dialog Error 19 Launch Configurations Messages get String Launch Configuration Dialog An exception occurred while retrieving launch configurations 20 e NON NLS 1 NON NLS 2 else if element instanceof I Launch Configuration Type return Resources Plugin get Workspace get Root return null  getParent ILaunchConfiguration ILaunchConfiguration ILaunchConfiguration getType CoreException DebugUIPlugin errorDialog getShell LaunchConfigurationsMessages getString LaunchConfigurationDialog Error_19 LaunchConfigurationsMessages getString LaunchConfigurationDialog An_exception_occurred_while_retrieving_launch_configurations_20 ILaunchConfigurationType ResourcesPlugin getWorkspace getRoot
public boolean has Children Object element if element instanceof I Launch Configuration return false else return get Children element length 0  hasChildren ILaunchConfiguration getChildren
Return only the launch configuration types that support the current mode AND are marked as public see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element I Launch Configuration Type all Types get Launch Manager get Launch Configuration Types return filter Types all Types to Array  IStructuredContentProvider getElements getElements inputElement ILaunchConfigurationType allTypes getLaunchManager getLaunchConfigurationTypes filterTypes allTypes toArray
Returns a list containing the given types minus any types that should not be visible A type should not be visible if it doesn t match the current mode or if it matches a disabled activity param all Types the types return the given types minus any types that should not be visible private List filter Types I Launch Configuration Type all Types List filtered Types new Array List String mode get Mode Launch Configuration Type Contribution contribution for int i 0 i all Types length i I Launch Configuration Type type all Types i contribution new Launch Configuration Type Contribution type if is Visible type mode Workbench Activity Helper filter Item contribution filtered Types add type return filtered Types  allTypes filterTypes ILaunchConfigurationType allTypes filteredTypes ArrayList getMode LaunchConfigurationTypeContribution allTypes ILaunchConfigurationType allTypes LaunchConfigurationTypeContribution isVisible WorkbenchActivityHelper filterItem filteredTypes filteredTypes
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
Return code true code if the specified launch configuration type should be visible in the specified mode code false code otherwise private boolean is Visible I Launch Configuration Type config Type String mode if config Type is Public return false if mode null return true return config Type supports Mode mode  isVisible ILaunchConfigurationType configType configType isPublic configType supportsMode
Convenience method to get the singleton launch manager private I Launch Manager get Launch Manager return Debug Plugin get Default get Launch Manager  ILaunchManager getLaunchManager DebugPlugin getDefault getLaunchManager
Write accessor for the mode value private void set Mode String mode f Mode mode  setMode fMode
Read accessor for the mode value private String get Mode return f Mode  getMode fMode
Write accessor for the shell value private void set Shell Shell shell f Shell shell  setShell fShell
Read accessor for the shell value private Shell get Shell return f Shell  getShell fShell

Creates a new plug in contribution for the given type param type the launch configuration type public Launch Configuration Type Contribution I Launch Configuration Type type this type type  LaunchConfigurationTypeContribution ILaunchConfigurationType
see org eclipse ui I Plugin Contribution get Local Id public String get Local Id return type get Identifier  IPluginContribution getLocalId getLocalId getIdentifier
see org eclipse ui I Plugin Contribution get Plugin Id public String get Plugin Id return type get Plugin Identifier  IPluginContribution getPluginId getPluginId getPluginIdentifier

Constructs a launch configuration view for the given launch group public Launch Configuration View Launch Group Extension launch Group super f Launch Group launch Group  LaunchConfigurationView LaunchGroupExtension launchGroup fLaunchGroup launchGroup
Returns the launch group this view is displaying return the launch group this view is displaying protected Launch Group Extension get Launch Group return f Launch Group  LaunchGroupExtension getLaunchGroup fLaunchGroup
tree Viewer expand All tree Viewer get Control add Help Listener new Help Listener public void help Requested Help Event evt handle Help Request evt  treeViewer expandAll treeViewer getControl addHelpListener HelpListener helpRequested HelpEvent handleHelpRequest
see org eclipse debug ui Abstract Debug View create Viewer org eclipse swt widgets Composite protected Viewer create Viewer Composite parent Tree Viewer tree Viewer new Tree Viewer parent tree Viewer set Label Provider DebugUI Tools new Debug Model Presentation tree Viewer set Sorter new Workbench Viewer Sorter tree Viewer set Content Provider new Launch Configuration Tree Content Provider f Launch Group get Mode parent get Shell tree Viewer add Filter new Launch Group Filter get Launch Group tree Viewer set Input Resources Plugin get Workspace get Root tree Viewer expand All tree Viewer get Control add Help Listener new Help Listener public void help Requested Help Event evt handle Help Request evt get Launch Manager add Launch Configuration Listener this return tree Viewer  AbstractDebugView createViewer createViewer TreeViewer treeViewer TreeViewer treeViewer setLabelProvider DebugUITools newDebugModelPresentation treeViewer setSorter WorkbenchViewerSorter treeViewer setContentProvider LaunchConfigurationTreeContentProvider fLaunchGroup getMode getShell treeViewer addFilter LaunchGroupFilter getLaunchGroup treeViewer setInput ResourcesPlugin getWorkspace getRoot treeViewer expandAll treeViewer getControl addHelpListener HelpListener helpRequested HelpEvent handleHelpRequest getLaunchManager addLaunchConfigurationListener treeViewer
Handle help events locally rather than deferring to Workbench Help This allows help specific to the selected config type to be presented since 2 1 protected void handle Help Request Help Event evt if get Tree Viewer get Tree evt get Source return try I Selection selection get Viewer get Selection if selection is Empty selection instanceof I Structured Selection I Structured Selection structured Selection I Structured Selection selection Object first Selected structured Selection get First Element I Launch Configuration Type config Type null if first Selected instanceof I Launch Configuration Type config Type I Launch Configuration Type first Selected else if first Selected instanceof I Launch Configuration config Type I Launch Configuration first Selected get Type if config Type null String help Context Id Launch Configuration Presentation Manager get Default get Help Context config Type get Launch Group get Mode if help Context Id null Workbench Help display Help help Context Id catch Core Exception ce DebugUI Plugin log ce  WorkbenchHelp handleHelpRequest HelpEvent getTreeViewer getTree getSource ISelection getViewer getSelection isEmpty IStructuredSelection IStructuredSelection structuredSelection IStructuredSelection firstSelected structuredSelection getFirstElement ILaunchConfigurationType configType firstSelected ILaunchConfigurationType configType ILaunchConfigurationType firstSelected firstSelected ILaunchConfiguration configType ILaunchConfiguration firstSelected getType configType helpContextId LaunchConfigurationPresentationManager getDefault getHelpContext configType getLaunchGroup getMode helpContextId WorkbenchHelp displayHelp helpContextId CoreException DebugUIPlugin
see org eclipse debug ui Abstract Debug View create Actions protected void create Actions f Create Action new Create Launch Configuration Action get Viewer get Launch Group get Mode set Action Create Launch Configuration Action ID CREATE ACTION f Create Action f Delete Action new Delete Launch Configuration Action get Viewer get Launch Group get Mode set Action Delete Launch Configuration Action ID DELETE ACTION f Delete Action set Action I Debug View REMOVE ACTION f Delete Action f Duplicate Action new Duplicate Launch Configuration Action get Viewer get Launch Group get Mode set Action Duplicate Launch Configuration Action ID DUPLICATE ACTION f Duplicate Action  AbstractDebugView createActions createActions fCreateAction CreateLaunchConfigurationAction getViewer getLaunchGroup getMode setAction CreateLaunchConfigurationAction ID_CREATE_ACTION fCreateAction fDeleteAction DeleteLaunchConfigurationAction getViewer getLaunchGroup getMode setAction DeleteLaunchConfigurationAction ID_DELETE_ACTION fDeleteAction setAction IDebugView REMOVE_ACTION fDeleteAction fDuplicateAction DuplicateLaunchConfigurationAction getViewer getLaunchGroup getMode setAction DuplicateLaunchConfigurationAction ID_DUPLICATE_ACTION fDuplicateAction
see org eclipse debug ui Abstract Debug View get Help Context Id protected String get Help Context Id return I Debug Help Context Ids LAUNCH CONFIGURATION VIEW  AbstractDebugView getHelpContextId getHelpContextId IDebugHelpContextIds LAUNCH_CONFIGURATION_VIEW
see org eclipse debug ui Abstract Debug View fill Context Menu org eclipse jface action I Menu Manager protected void fill Context Menu I Menu Manager menu menu add f Create Action menu add f Duplicate Action menu add f Delete Action menu add new Separator  AbstractDebugView fillContextMenu IMenuManager fillContextMenu IMenuManager fCreateAction fDuplicateAction fDeleteAction
see org eclipse debug ui Abstract Debug View configure Tool Bar org eclipse jface action I Tool Bar Manager protected void configure Tool Bar I Tool Bar Manager tbm  AbstractDebugView configureToolBar IToolBarManager configureToolBar IToolBarManager
Returns this view s tree viewer return this view s tree viewer protected Tree Viewer get Tree Viewer return Tree Viewer get Viewer  TreeViewer getTreeViewer TreeViewer getViewer
see org eclipse ui I Workbench Part dispose public void dispose f Create Action dispose f Delete Action dispose f Duplicate Action dispose get Launch Manager remove Launch Configuration Listener this  IWorkbenchPart fCreateAction fDeleteAction fDuplicateAction getLaunchManager removeLaunchConfigurationListener
see org eclipse debug core I Launch Configuration Listener launch Configuration Added org eclipse debug core I Launch Configuration public void launch Configuration Added I Launch Configuration configuration try if configuration get Attribute I DebugUI Constants ATTR PRIVATE false return catch Core Exception e DebugUI Plugin log e return Tree Viewer viewer get Tree Viewer viewer get Control set Redraw false try viewer add configuration get Type configuration if moved remove original now I Launch Configuration from get Launch Manager get Moved From configuration if from null viewer remove from catch Core Exception e viewer get Control set Redraw true if is Auto Select get Tree Viewer set Selection new Structured Selection configuration true  ILaunchConfigurationListener launchConfigurationAdded ILaunchConfiguration launchConfigurationAdded ILaunchConfiguration getAttribute IDebugUIConstants ATTR_PRIVATE CoreException DebugUIPlugin TreeViewer getTreeViewer getControl setRedraw getType ILaunchConfiguration getLaunchManager getMovedFrom CoreException getControl setRedraw isAutoSelect getTreeViewer setSelection StructuredSelection
see org eclipse debug core I Launch Configuration Listener launch Configuration Changed org eclipse debug core I Launch Configuration public void launch Configuration Changed I Launch Configuration configuration  ILaunchConfigurationListener launchConfigurationChanged ILaunchConfiguration launchConfigurationChanged ILaunchConfiguration
see org eclipse debug core I Launch Configuration Listener launch Configuration Removed org eclipse debug core I Launch Configuration public void launch Configuration Removed I Launch Configuration configuration if moved ignore I Launch Configuration to get Launch Manager get Moved To configuration if to null return I Launch Configuration Type type null int type Index 1 The index of the deleted configuration s type int config Index 1 The index of the deleted configuration Initialize data used to set the selection after deletion Tree Item items get Tree Viewer get Tree get Items Tree Item type Item for int i 0 num Types items length i num Types type null i type Item items i type Index i Tree Item configs type Item get Items for int j 0 num Configs configs length j num Configs j if configuration equals configs j get Data config Index j type I Launch Configuration Type type Item get Data break get Tree Viewer remove configuration if get Viewer get Selection is Empty I Structured Selection new Selection null if type Index 1 config Index 1 Reset selection to the next config Tree Item config Items get Tree Viewer get Tree get Items type Index get Items int num Items config Items length Object data null if num Items config Index Select the item at the same index as the deleted data config Items config Index get Data else if num Items 0 Deleted the last item s Select the last item data config Items num Items 1 get Data if data null new Selection new Structured Selection data if new Selection null type null Reset selection to the config type of the first selected configuration new Selection new Structured Selection type get Tree Viewer set Selection new Selection  ILaunchConfigurationListener launchConfigurationRemoved ILaunchConfiguration launchConfigurationRemoved ILaunchConfiguration ILaunchConfiguration getLaunchManager getMovedTo ILaunchConfigurationType typeIndex configIndex TreeItem getTreeViewer getTree getItems TreeItem typeItem numTypes numTypes typeItem typeIndex TreeItem typeItem getItems numConfigs numConfigs getData configIndex ILaunchConfigurationType typeItem getData getTreeViewer getViewer getSelection isEmpty IStructuredSelection newSelection typeIndex configIndex TreeItem configItems getTreeViewer getTree getItems typeIndex getItems numItems configItems numItems configIndex configItems configIndex getData numItems configItems numItems getData newSelection StructuredSelection newSelection newSelection StructuredSelection getTreeViewer setSelection newSelection
Workbench Help set Help parent get Help Context Id get Viewer get Control add Key Listener new Key Adapter public void key Pressed Key Event e handle Key Pressed e  WorkbenchHelp setHelp getHelpContextId getViewer getControl addKeyListener KeyAdapter keyPressed KeyEvent handleKeyPressed
This is similar to I Workbench Part create Part Control Composite but it is called by the launch dialog when creating the launch config tree view Since this view is not contained in the workbench we cannot do all the usual initialzation toolbars etc public void create Launch Dialog Control Composite parent f Viewer create Viewer parent create Actions create Context Menu get Viewer get Control Workbench Help set Help parent get Help Context Id get Viewer get Control add Key Listener new Key Adapter public void key Pressed Key Event e handle Key Pressed e if get Viewer instanceof Structured Viewer Structured Viewer get Viewer add Double Click Listener this  IWorkbenchPart createPartControl createLaunchDialogControl fViewer createViewer createActions createContextMenu getViewer getControl WorkbenchHelp setHelp getHelpContextId getViewer getControl addKeyListener KeyAdapter keyPressed KeyEvent handleKeyPressed getViewer StructuredViewer StructuredViewer getViewer addDoubleClickListener
see org eclipse debug ui I Debug View get Viewer public Viewer get Viewer return f Viewer  IDebugView getViewer getViewer fViewer
protected I Launch Manager get Launch Manager return Debug Plugin get Default get Launch Manager  ILaunchManager getLaunchManager DebugPlugin getDefault getLaunchManager
Sets whether to automatically select configs that are added into the view newly created param select whether to automatically select configs that are added into the view newly created public void set Auto Select boolean select f Auto Select select  setAutoSelect fAutoSelect
Returns whether this view is currently configured to automatically select newly created configs that are added into the view return whether this view is currently configured to automatically select newly created configs protected boolean is Auto Select return f Auto Select  isAutoSelect fAutoSelect

Constructs a launch group extension based on the given configuration element param element the configuration element defining the attribtues of this launch group extension return a new launch group extension public Launch Group Extension I Configuration Element element set Configuration Element element  LaunchGroupExtension IConfigurationElement setConfigurationElement
Sets the configuration element that defines the attributes for this launch group extension param element configuration element private void set Configuration Element I Configuration Element element f Config element  setConfigurationElement IConfigurationElement fConfig
Returns the configuration element that defines the attributes for this launch group extension param configuration element that defines the attributes for this launch group extension protected I Configuration Element get Configuration Element return f Config  IConfigurationElement getConfigurationElement fConfig
Returns the image for this launch group or code null code if none return the image for this launch group or code null code if none public Image Descriptor get Image Descriptor if f Image Descriptor null f Image Descriptor create Image Descriptor image NON NLS 1 return f Image Descriptor  ImageDescriptor getImageDescriptor fImageDescriptor fImageDescriptor createImageDescriptor fImageDescriptor
Returns the banner image for this launch group or code null code if none return the banner image for this launch group or code null code if none public Image Descriptor get Banner Image Descriptor if f Banner Image Descriptor null f Banner Image Descriptor create Image Descriptor banner Image NON NLS 1 return f Banner Image Descriptor  ImageDescriptor getBannerImageDescriptor fBannerImageDescriptor fBannerImageDescriptor createImageDescriptor bannerImage fBannerImageDescriptor
Returns the label for this launch group return the label for this launch group public String get Label return get Configuration Element get Attribute label NON NLS 1  getLabel getConfigurationElement getAttribute
Returns the id for this launch group return the id for this launch group public String get Identifier return get Configuration Element get Attribute id NON NLS 1  getIdentifier getConfigurationElement getAttribute
Returns the category for this launch group possibly code null code return the category for this launch group possibly code null code public String get Category return get Configuration Element get Attribute category NON NLS 1  getCategory getConfigurationElement getAttribute
Returns the mode for this launch group return the mode for this launch group public String get Mode return get Configuration Element get Attribute mode NON NLS 1  getMode getConfigurationElement getAttribute
Creates an image descriptor based on the given attribute name param attribute return Image Descriptor protected Image Descriptor create Image Descriptor String attribute Bundle bundle Platform get Bundle get Configuration Element get Declaring Extension get Namespace URL iconURL bundle get Entry NON NLS 1 String icon Path get Configuration Element get Attribute attribute if icon Path null try iconURL new URL iconURL icon Path return Image Descriptor create FromURL iconURL catch MalformedURL Exception e DebugUI Plugin log e return null  ImageDescriptor ImageDescriptor createImageDescriptor getBundle getConfigurationElement getDeclaringExtension getNamespace getEntry iconPath getConfigurationElement getAttribute iconPath iconPath ImageDescriptor createFromURL MalformedURLException DebugUIPlugin
Returns whether this launch group is public return boolean public boolean is Public String string get Configuration Element get Attribute public NON NLS 1 if string null return true return string equals true NON NLS 1  isPublic getConfigurationElement getAttribute

Constructor for External Tools Launch Configuration Filter public Launch Group Filter I Launch Group group Extension super f Group group Extension  ExternalToolsLaunchConfigurationFilter LaunchGroupFilter ILaunchGroup groupExtension fGroup groupExtension
see org eclipse jface viewers Viewer Filter select org eclipse jface viewers Viewer java lang Object java lang Object public boolean select Viewer viewer Object parent Element Object element I Launch Configuration Type type null I Launch Configuration config null if parent Element instanceof I Launch Configuration Type type I Launch Configuration Type parent Element if element instanceof I Launch Configuration Type type I Launch Configuration Type element if element instanceof I Launch Configuration config I Launch Configuration element try type config get Type catch Core Exception e boolean priv false if config null try priv config get Attribute I DebugUI Constants ATTR PRIVATE false catch Core Exception e if type null return priv type supports Mode f Group get Mode equal Categories type get Category f Group get Category Workbench Activity Helper filter Item new Launch Configuration Type Contribution type return false  ViewerFilter parentElement ILaunchConfigurationType ILaunchConfiguration parentElement ILaunchConfigurationType ILaunchConfigurationType parentElement ILaunchConfigurationType ILaunchConfigurationType ILaunchConfiguration ILaunchConfiguration getType CoreException getAttribute IDebugUIConstants ATTR_PRIVATE CoreException supportsMode fGroup getMode equalCategories getCategory fGroup getCategory WorkbenchActivityHelper filterItem LaunchConfigurationTypeContribution
Returns whether the given categories are equal param c1 category identifier or code null code param c2 category identifier or code null code return boolean private boolean equal Categories String c1 String c2 if c1 null c2 null return c1 c2 return c1 equals c2  equalCategories

Creates a new launch history for the given launch group public Launch History I Launch Group group f Group group I Launch Manager manager Debug Plugin get Default get Launch Manager manager add Launch Listener this manager add Launch Configuration Listener this launch History Instances add this  LaunchHistory ILaunchGroup fGroup ILaunchManager DebugPlugin getDefault getLaunchManager addLaunchListener addLaunchConfigurationListener launchHistoryInstances
Disposes this history public void dispose I Launch Manager manager Debug Plugin get Default get Launch Manager manager remove Launch Listener this manager remove Launch Configuration Listener this launch History Instances remove this  ILaunchManager DebugPlugin getDefault getLaunchManager removeLaunchListener removeLaunchConfigurationListener launchHistoryInstances
see org eclipse debug core I Launch Listener launch Added org eclipse debug core I Launch public void launch Added I Launch launch I Launch Configuration configuration launch get Launch Configuration if configuration null configuration is Working Copy accepts configuration add History configuration true set Recent Launch configuration  ILaunchListener launchAdded ILaunch launchAdded ILaunch ILaunchConfiguration getLaunchConfiguration isWorkingCopy addHistory setRecentLaunch
Adds the givev configuration to this hisotry param configuration param prepend whether the configuration should be added to the beginning of the history list protected void add History I Launch Configuration configuration boolean prepend clear Dirty if f Favorites contains configuration return might be reconstructing history if check If Favorite configuration return int index f History index Of configuration if index 0 if prepend f History add 0 configuration else f History add configuration resize History set Dirty else if index 0 move to first for int i index i 0 i f History set i f History get i 1 f History set 0 configuration set Dirty save  addHistory ILaunchConfiguration clearDirty fFavorites checkIfFavorite fHistory indexOf fHistory fHistory resizeHistory setDirty fHistory fHistory fHistory setDirty
Saves if dirty private void save if is Dirty try DebugUI Plugin get Default get Launch Configuration Manager persist Launch History catch Core Exception e DebugUI Plugin log e catch IO Exception e DebugUI Plugin log e catch Parser Configuration Exception e DebugUI Plugin log e catch Transformer Exception e DebugUI Plugin log e  isDirty DebugUIPlugin getDefault getLaunchConfigurationManager persistLaunchHistory CoreException DebugUIPlugin IOException DebugUIPlugin ParserConfigurationException DebugUIPlugin TransformerException DebugUIPlugin
Clears the dirty flag private void clear Dirty f Dirty false  clearDirty fDirty
Sets the dirty flag private void set Dirty f Dirty true  setDirty fDirty
Returns the dirty state private boolean is Dirty return f Dirty  isDirty fDirty
see org eclipse debug core I Launch Listener launch Changed org eclipse debug core I Launch public void launch Changed I Launch launch  ILaunchListener launchChanged ILaunch launchChanged ILaunch
see org eclipse debug core I Launch Listener launch Removed org eclipse debug core I Launch public void launch Removed I Launch launch  ILaunchListener launchRemoved ILaunch launchRemoved ILaunch
Returns the most recently launched configuration in this history or code null code if none return the most recently launched configuration in this history or code null code if none public I Launch Configuration get Recent Launch return f Recent Launch  ILaunchConfiguration getRecentLaunch fRecentLaunch
Sets the most recently launched configuration in this history or code null code if none protected void set Recent Launch I Launch Configuration configuration if accepts configuration if configuration equals f Recent Launch f Recent Launch configuration set Dirty save  setRecentLaunch ILaunchConfiguration fRecentLaunch fRecentLaunch setDirty
Returns the launch configuration in this history in most recently launched order return launch history public I Launch Configuration get History return I Launch Configuration f History to Array new I Launch Configuration f History size  ILaunchConfiguration getHistory ILaunchConfiguration fHistory toArray ILaunchConfiguration fHistory
Returns the favorite launch configurations in this history in the order they were created return launch favorites public I Launch Configuration get Favorites return I Launch Configuration f Favorites to Array new I Launch Configuration f Favorites size  ILaunchConfiguration getFavorites ILaunchConfiguration fFavorites toArray ILaunchConfiguration fFavorites
Sets this container s launch history param history public void set History I Launch Configuration history f History new Array List history length for int i 0 i history length i f History add history i resize History set Dirty save  setHistory ILaunchConfiguration fHistory ArrayList fHistory resizeHistory setDirty
Sets this container s favorites param favorites public void set Favorites I Launch Configuration favorites f Favorites new Array List favorites length for int i 0 i favorites length i f Favorites add favorites i set Dirty save  setFavorites ILaunchConfiguration fFavorites ArrayList fFavorites setDirty
Adds the given configuration to the favorites list param configuration public void add Favorite I Launch Configuration configuration clear Dirty if f Favorites contains configuration f Favorites add configuration f History remove configuration set Dirty save  addFavorite ILaunchConfiguration clearDirty fFavorites fFavorites fHistory setDirty
Returns the launch group associated with this history return group public I Launch Group get Launch Group return f Group  ILaunchGroup getLaunchGroup fGroup
Returns whether the given configruation is included in the group associated with this launch history param launch return boolean public boolean accepts I Launch Configuration configuration try if Launch Configuration Manager is Visible configuration return false if configuration get Type supports Mode get Launch Group get Mode String launch Category null launch Category configuration get Category String category get Launch Group get Category if launch Category null category null return launch Category category return category equals launch Category catch Core Exception e DebugUI Plugin log e return false  ILaunchConfiguration LaunchConfigurationManager isVisible getType supportsMode getLaunchGroup getMode launchCategory launchCategory getCategory getLaunchGroup getCategory launchCategory launchCategory launchCategory CoreException DebugUIPlugin
Notifies all launch histories that the launch history size has changed public static void launch History Changed Iterator iter launch History Instances iterator while iter has Next Launch History history Launch History iter next history resize History history save  launchHistoryChanged launchHistoryInstances hasNext LaunchHistory LaunchHistory resizeHistory
The max history size has changed remove any histories if current collection is too long protected void resize History int max get Max History Size while f History size max f History remove f History size 1 set Dirty  resizeHistory getMaxHistorySize fHistory fHistory fHistory setDirty
Returns the maximum number of entries allowed in this history return the maximum number of entries allowed in this history protected int get Max History Size return DebugUI Plugin get Default get Preference Store get Int I DebugUI Constants PREF MAX HISTORY SIZE  getMaxHistorySize DebugUIPlugin getDefault getPreferenceStore getInt IDebugUIConstants PREF_MAX_HISTORY_SIZE
see org eclipse debug core I Launch Configuration Listener launch Configuration Added org eclipse debug core I Launch Configuration public void launch Configuration Added I Launch Configuration configuration I Launch Configuration moved From Debug Plugin get Default get Launch Manager get Moved From configuration if moved From null check If Favorite configuration else String moved From Name moved From get Name I Launch Configuration history get History for int i 0 i history length i if history i get Name equals moved From Name if i 0 f Recent Launch configuration set Dirty  ILaunchConfigurationListener launchConfigurationAdded ILaunchConfiguration launchConfigurationAdded ILaunchConfiguration ILaunchConfiguration movedFrom DebugPlugin getDefault getLaunchManager getMovedFrom movedFrom checkIfFavorite movedFromName movedFrom getName ILaunchConfiguration getHistory getName movedFromName fRecentLaunch setDirty
Adds the given config to the favorites list if it is a favorite and returns whether the config was added to the favorites list param configuration return whether added to the favorites list protected boolean check If Favorite I Launch Configuration configuration update favorites if configuration is Working Copy return false try List favorite Groups configuration get Attribute I DebugUI Constants ATTR FAVORITE GROUPS List null if favorite Groups null check deprecated attributes for backwards compatibility String group Id get Launch Group get Identifier boolean fav false if group Id equals I DebugUI Constants ID DEBUG LAUNCH GROUP fav configuration get Attribute I DebugUI Constants ATTR DEBUG FAVORITE false else if group Id equals I DebugUI Constants ID RUN LAUNCH GROUP fav configuration get Attribute I DebugUI Constants ATTR RUN FAVORITE false if fav add Favorite configuration return true else remove Favorite configuration return false else if favorite Groups contains get Launch Group get Identifier add Favorite configuration return true else remove Favorite configuration return false catch Core Exception e return false  checkIfFavorite ILaunchConfiguration isWorkingCopy favoriteGroups getAttribute IDebugUIConstants ATTR_FAVORITE_GROUPS favoriteGroups groupId getLaunchGroup getIdentifier groupId IDebugUIConstants ID_DEBUG_LAUNCH_GROUP getAttribute IDebugUIConstants ATTR_DEBUG_FAVORITE groupId IDebugUIConstants ID_RUN_LAUNCH_GROUP getAttribute IDebugUIConstants ATTR_RUN_FAVORITE addFavorite removeFavorite favoriteGroups getLaunchGroup getIdentifier addFavorite removeFavorite CoreException
Revmoves the given config from the favorites list if needed param configuration protected void remove Favorite I Launch Configuration configuration if f Favorites contains configuration f Favorites remove configuration set Dirty save  removeFavorite ILaunchConfiguration fFavorites fFavorites setDirty
see org eclipse debug core I Launch Configuration Listener launch Configuration Changed org eclipse debug core I Launch Configuration public void launch Configuration Changed I Launch Configuration configuration check If Favorite configuration  ILaunchConfigurationListener launchConfigurationChanged ILaunchConfiguration launchConfigurationChanged ILaunchConfiguration checkIfFavorite
see org eclipse debug core I Launch Configuration Listener launch Configuration Removed org eclipse debug core I Launch Configuration public void launch Configuration Removed I Launch Configuration configuration boolean changed false I Launch Configuration new Config Debug Plugin get Default get Launch Manager get Moved To configuration if new Config null deleted changed f History remove configuration changed f Favorites remove configuration changed else moved renamed int index f History index Of configuration if index 0 f History remove index f History add index new Config changed true else index f Favorites index Of configuration if index 0 f Favorites remove index f Favorites add index new Config check If Favorite new Config if changed set Dirty if configuration equals f Recent Launch if f History is Empty f Recent Launch I Launch Configuration f History get 0 else if f Favorites is Empty f Recent Launch I Launch Configuration f Favorites get 0 else f Recent Launch null save  ILaunchConfigurationListener launchConfigurationRemoved ILaunchConfiguration launchConfigurationRemoved ILaunchConfiguration ILaunchConfiguration newConfig DebugPlugin getDefault getLaunchManager getMovedTo newConfig fHistory fFavorites fHistory indexOf fHistory fHistory newConfig fFavorites indexOf fFavorites fFavorites newConfig checkIfFavorite newConfig setDirty fRecentLaunch fHistory isEmpty fRecentLaunch ILaunchConfiguration fHistory fFavorites isEmpty fRecentLaunch ILaunchConfiguration fFavorites fRecentLaunch

Constructs a launch configuration tab extension based on the given configuration element param element the configuration element defining the attribtues of this launch configuration tab extension return a new launch configuration tab extension public Launch Shortcut Extension I Configuration Element element set Configuration Element element  LaunchShortcutExtension IConfigurationElement setConfigurationElement
Sets the configuration element that defines the attributes for this extension param element configuration element private void set Configuration Element I Configuration Element element f Config element  setConfigurationElement IConfigurationElement fConfig
Returns the configuration element that defines the attributes for this extension param configuration element that defines the attributes for this launch configuration tab extension public I Configuration Element get Configuration Element return f Config  IConfigurationElement getConfigurationElement fConfig
Returns the label of this shortcut return the label of this shortcut or code null code if not specified public String get Label return get Configuration Element get Attribute label NON NLS 1  getLabel getConfigurationElement getAttribute
Returns the configuration element for the optional Contextual Launch element of this Launch Configuration description return contextual Launch element public I Configuration Element get Contextual Launch Configuration Element if f Contextual Launch Configuration Element null I Configuration Element elements get Configuration Element get Children contextual Launch NON NLS 1 if elements length 0 remember so we don t have to hunt again f Contextual Launch Configuration Element elements 0 return f Contextual Launch Configuration Element  contextualLaunch IConfigurationElement getContextualLaunchConfigurationElement fContextualLaunchConfigurationElement IConfigurationElement getConfigurationElement getChildren contextualLaunch fContextualLaunchConfigurationElement fContextualLaunchConfigurationElement
Returns the contextual launch label of this shortcut for the named mode p samp launch Shortcut contextual Launch context Label mode run label Run Java Application context Label mode debug label Debug Java Application contextual Launch launch Shortcut samp return the contextual label of this shortcut or code null code if not specified public String get Context Label String mode remember the list of context labels for this shortcut if f Context Labels null I Configuration Element context get Contextual Launch Configuration Element if context null return null I Configuration Element labels context get Children context Label NON NLS 1 f Context Labels new Array List labels length for int i 0 i labels length i f Context Labels add new Pair labels i get Attribute mode NON NLS 1 labels i get Attribute label NON NLS 1 pick out the first occurance of the name bound to mode Iterator iter f Context Labels iterator while iter has Next Pair p Pair iter next if p first As String equals mode return p second As String return get Label  launchShortcut contextualLaunch contextLabel contextLabel contextualLaunch launchShortcut getContextLabel fContextLabels IConfigurationElement getContextualLaunchConfigurationElement IConfigurationElement getChildren contextLabel fContextLabels ArrayList fContextLabels getAttribute getAttribute fContextLabels hasNext firstAsString secondAsString getLabel
Evaluate the given expression within the given context and return the result Returns code true code iff result is either TRUE or NOT LOADED This allows optimistic inclusion of shortcuts before plugins are loaded Returns code false code if exp is code null code param exp the enablement expression to evaluate or code null code param context the context of the evaluation Usually the user s selection return the result of evaluating the expression throws Core Exception public boolean eval Enablement Expression I Evaluation Context context Expression exp throws Core Exception return exp null exp evaluate context Evaluation Result FALSE false  NOT_LOADED CoreException evalEnablementExpression IEvaluationContext CoreException EvaluationResult
Returns an expression that represents the enablement logic for the contextual launch element of this launch shortcut description or code null code if none return an evaluatable expression or code null code throws Core Exception if the configuration element can t be converted Reasons include a no handler is available to cope with a certain configuration element or b the XML expression tree is malformed public Expression get Contextual Launch Enablement Expression throws Core Exception all of this stuff is optional so tedius testing is required if f Contextual Launch Expr null I Configuration Element contextual Launch Element get Contextual Launch Configuration Element if contextual Launch Element null not available return null I Configuration Element elements contextual Launch Element get Children Expression Tag Names ENABLEMENT I Configuration Element enablement elements length 0 elements 0 null if enablement null f Contextual Launch Expr Expression Converter get Default perform enablement return f Contextual Launch Expr  CoreException getContextualLaunchEnablementExpression CoreException fContextualLaunchExpr IConfigurationElement contextualLaunchElement getContextualLaunchConfigurationElement contextualLaunchElement IConfigurationElement contextualLaunchElement getChildren ExpressionTagNames IConfigurationElement fContextualLaunchExpr ExpressionConverter getDefault fContextualLaunchExpr
Returns an expression that represents the enablement logic for the launch shortcut description or code null code if none return an evaluatable expression or code null code throws Core Exception if the configuration element can t be converted Reasons include a no handler is available to cope with a certain configuration element or b the XML expression tree is malformed public Expression get Shortcut Enablement Expression throws Core Exception all of this stuff is optional so tedius testing is required if f Standard Launch Expr null I Configuration Element elements get Configuration Element get Children Expression Tag Names ENABLEMENT I Configuration Element enablement elements length 0 elements 0 null if enablement null f Standard Launch Expr Expression Converter get Default perform enablement return f Standard Launch Expr  CoreException getShortcutEnablementExpression CoreException fStandardLaunchExpr IConfigurationElement getConfigurationElement getChildren ExpressionTagNames IConfigurationElement fStandardLaunchExpr ExpressionConverter getDefault fStandardLaunchExpr
Returns the id of this shortcut return the id of this shortcut or code null code if not specified public String get Id return get Configuration Element get Attribute id NON NLS 1  getId getConfigurationElement getAttribute
Returns the path of the icon for this shortcut or code null code if none return the path of the icon for this shortcut or code null code if none protected String get Icon Path return get Configuration Element get Attribute icon NON NLS 1  getIconPath getConfigurationElement getAttribute
Returns the identifier of the help context associated with this launch shortcut or code null code if one was not specified return the identifier of this launch shortcut s help context or code null code since 2 1 public String get Help Context Id return get Configuration Element get Attribute help Context Id NON NLS 1  getHelpContextId getConfigurationElement getAttribute helpContextId
Returns the category of this shortcut return the category of this shortcut or code null code if not specified public String get Category return get Configuration Element get Attribute category NON NLS 1  getCategory getConfigurationElement getAttribute
Returns the image for this shortcut or code null code if none return the image for this shortcut or code null code if none public Image Descriptor get Image Descriptor if f Image Descriptor null String icon Path get Icon Path icon Path may be null because image Icon is optional if icon Path null try Bundle bundle Platform get Bundle get Configuration Element get Declaring Extension get Namespace URL iconURL bundle get Entry NON NLS 1 iconURL new URL iconURL icon Path f Image Descriptor Image Descriptor create FromURL iconURL catch MalformedURL Exception e DebugUI Plugin log e return f Image Descriptor  ImageDescriptor getImageDescriptor fImageDescriptor iconPath getIconPath iconPath imageIcon iconPath getBundle getConfigurationElement getDeclaringExtension getNamespace getEntry iconPath fImageDescriptor ImageDescriptor createFromURL MalformedURLException DebugUIPlugin fImageDescriptor
Returns the perspectives this shortcut is registered for return list of Strings representing perspective identifiers public List get Perspectives if f Perspectives null I Configuration Element perspectives get Configuration Element get Children perspective NON NLS 1 f Perspectives new Array List perspectives length for int i 0 i perspectives length i f Perspectives add perspectives i get Attribute id NON NLS 1 return f Perspectives  getPerspectives fPerspectives IConfigurationElement getConfigurationElement getChildren fPerspectives ArrayList fPerspectives getAttribute fPerspectives
Returns this shortcut s delegate or code null code if none return this shortcut s delegate or code null code if none protected I Launch Shortcut get Delegate if f Delegate null try f Delegate I Launch Shortcut f Config create Executable Extension class NON NLS 1 catch Core Exception e DebugUI Plugin error Dialog DebugUI Plugin get Shell Launch Configurations Messages get String Launch Shortcut Extension Error 4 Launch Configurations Messages get String Launch Shortcut Extension Unable to use launch shortcut 5 e get Status NON NLS 1 NON NLS 2 return f Delegate  ILaunchShortcut getDelegate fDelegate fDelegate ILaunchShortcut fConfig createExecutableExtension CoreException DebugUIPlugin errorDialog DebugUIPlugin getShell LaunchConfigurationsMessages getString LaunchShortcutExtension Error_4 LaunchConfigurationsMessages getString LaunchShortcutExtension Unable_to_use_launch_shortcut_5 getStatus fDelegate
see I Launch Shortcut launch I Editor Part String public void launch I Editor Part editor String mode I Launch Shortcut shortcut get Delegate if shortcut null shortcut launch editor mode  ILaunchShortcut IEditorPart IEditorPart ILaunchShortcut getDelegate
see I Launch Shortcut launch I Selection String public void launch I Selection selection String mode I Launch Shortcut shortcut get Delegate if shortcut null shortcut launch selection mode  ILaunchShortcut ISelection ISelection ILaunchShortcut getDelegate
Returns the set of modes this shortcut supports return the set of modes this shortcut supports public Set get Modes if f Modes null String modes get Configuration Element get Attribute modes NON NLS 1 if modes null return new Hash Set 0 String Tokenizer tokenizer new String Tokenizer modes NON NLS 1 f Modes new Hash Set tokenizer count Tokens while tokenizer has More Tokens f Modes add tokenizer next Token trim return f Modes  getModes fModes getConfigurationElement getAttribute HashSet StringTokenizer StringTokenizer fModes HashSet countTokens hasMoreTokens fModes nextToken fModes
see java lang Object to String public String to String return get Id  toString toString getId
see org eclipse ui I Plugin Contribution get Local Id public String get Local Id return get Id  IPluginContribution getLocalId getLocalId getId
see org eclipse ui I Plugin Contribution get Plugin Id public String get Plugin Id return f Config get Declaring Extension get Namespace  IPluginContribution getPluginId getPluginId fConfig getDeclaringExtension getNamespace

param text public Organize Favorites Action String launch Group Id super Launch Configurations Messages get String Organize Favorites Action 0 NON NLS 1 f Group Id launch Group Id  OrganizeFavoritesAction launchGroupId LaunchConfigurationsMessages getString OrganizeFavoritesAction fGroupId launchGroupId
public void run Launch History history DebugUI Plugin get Default get Launch Configuration Manager get Launch History f Group Id Favorites Dialog dialog new Favorites Dialog DebugUI Plugin get Shell history dialog open  LaunchHistory DebugUIPlugin getDefault getLaunchConfigurationManager getLaunchHistory fGroupId FavoritesDialog FavoritesDialog DebugUIPlugin getShell

private static final String FACTORY ID org eclipse debug ui Persistable Launch Configuration Factory NON NLS 1 public Persistable Launch Configuration Factory  FACTORY_ID PersistableLaunchConfigurationFactory PersistableLaunchConfigurationFactory
public Persistable Launch Configuration Factory I Launch Configuration config set Config config  PersistableLaunchConfigurationFactory ILaunchConfiguration setConfig
see org eclipse ui I Persistable Element get Factory Id public String get Factory Id return FACTORY ID  IPersistableElement getFactoryId getFactoryId FACTORY_ID
see org eclipse ui I Persistable Element save State I Memento public void save State I Memento memento try String config Memento get Config get Memento memento put String KEY config Memento catch Core Exception ce  IPersistableElement saveState IMemento saveState IMemento configMemento getConfig getMemento putString configMemento CoreException
see org eclipse ui I Element Factory create Element I Memento public I Adaptable create Element I Memento memento try String launch Config Memento memento get String KEY return get Launch Manager get Launch Configuration launch Config Memento catch Core Exception ce return null  IElementFactory createElement IMemento IAdaptable createElement IMemento launchConfigMemento getString getLaunchManager getLaunchConfiguration launchConfigMemento CoreException
private void set Config I Launch Configuration config f Config config  setConfig ILaunchConfiguration fConfig
private I Launch Configuration get Config return f Config  ILaunchConfiguration getConfig fConfig
private I Launch Manager get Launch Manager return Debug Plugin get Default get Launch Manager  ILaunchManager getLaunchManager DebugPlugin getDefault getLaunchManager

private static final String FACTORY ID org eclipse debug ui Persistable Launch Configuration Type Factory NON NLS 1 public Persistable Launch Configuration Type Factory  FACTORY_ID PersistableLaunchConfigurationTypeFactory PersistableLaunchConfigurationTypeFactory
public Persistable Launch Configuration Type Factory I Launch Configuration Type config Type set Config Type config Type  PersistableLaunchConfigurationTypeFactory ILaunchConfigurationType configType setConfigType configType
see org eclipse ui I Persistable Element get Factory Id public String get Factory Id return FACTORY ID  IPersistableElement getFactoryId getFactoryId FACTORY_ID
see org eclipse ui I Persistable Element save State I Memento public void save State I Memento memento String config TypeID get Config Type get Identifier memento put String KEY config TypeID  IPersistableElement saveState IMemento saveState IMemento configTypeID getConfigType getIdentifier putString configTypeID
see org eclipse ui I Element Factory create Element I Memento public I Adaptable create Element I Memento memento String config TypeID memento get String KEY return get Launch Manager get Launch Configuration Type config TypeID  IElementFactory createElement IMemento IAdaptable createElement IMemento configTypeID getString getLaunchManager getLaunchConfigurationType configTypeID
private void set Config Type I Launch Configuration Type config Type f Config Type config Type  setConfigType ILaunchConfigurationType configType fConfigType configType
private I Launch Configuration Type get Config Type return f Config Type  ILaunchConfigurationType getConfigType fConfigType
private I Launch Manager get Launch Manager return Debug Plugin get Default get Launch Manager  ILaunchManager getLaunchManager DebugPlugin getDefault getLaunchManager

Called by the debug ui plug in on startup The perspective manager starts listening for launches to be registered public void startup Debug Plugin plugin Debug Plugin get Default plugin get Launch Manager add Launch Listener this plugin add Debug Event Listener this  DebugPlugin DebugPlugin getDefault getLaunchManager addLaunchListener addDebugEventListener
Called by the debug ui plug in on shutdown The perspective manager de registers as a launch listener public void shutdown Debug Plugin plugin Debug Plugin get Default plugin get Launch Manager remove Launch Listener this plugin remove Debug Event Listener this  DebugPlugin DebugPlugin getDefault getLaunchManager removeLaunchListener removeDebugEventListener
Do nothing see I Launch Listener launch Removed I Launch public void launch Removed I Launch launch  ILaunchListener launchRemoved ILaunch launchRemoved ILaunch
Do nothing see I Launch Listener launch Changed I Launch public void launch Changed I Launch launch  ILaunchListener launchChanged ILaunch launchChanged ILaunch
async new Runnable public void run I Workbench Window window get Window For Perspective id if id null window null should Switch Perspective For Launch window id switch To Perspective window id  IWorkbenchWindow getWindowForPerspective shouldSwitchPerspectiveForLaunch switchToPerspective
Switch to the perspective specified by the launch configuration see I Launch Listener launch Added I Launch public void launch Added I Launch launch String perspective Id null check event filters try perspective Id get Perspective Id launch catch Core Exception e String name DebugUI Plugin get Model Presentation get Text launch switch Failed e name don t switch if a private config I Launch Configuration configuration launch get Launch Configuration if configuration null if Launch Configuration Manager is Visible configuration perspective Id null final String id perspective Id switch async new Runnable public void run I Workbench Window window get Window For Perspective id if id null window null should Switch Perspective For Launch window id switch To Perspective window id  ILaunchListener launchAdded ILaunch launchAdded ILaunch perspectiveId perspectiveId getPerspectiveId CoreException DebugUIPlugin getModelPresentation getText switchFailed ILaunchConfiguration getLaunchConfiguration LaunchConfigurationManager isVisible perspectiveId perspectiveId IWorkbenchWindow getWindowForPerspective shouldSwitchPerspectiveForLaunch switchToPerspective
Switches to the specified perspective param id perspective identifier protected void switch To Perspective I Workbench Window window String id try window get Workbench show Perspective id window catch Workbench Exception e DebugUI Plugin error Dialog DebugUI Plugin get Shell Launch Configurations Messages get String Perspective Manager Error 1 NON NLS 1 Message Format format Launch Configurations Messages get String Perspective Manager Unable to switch to perspective   0  2 new String id NON NLS 1 e  switchToPerspective IWorkbenchWindow getWorkbench showPerspective WorkbenchException DebugUIPlugin errorDialog DebugUIPlugin getShell LaunchConfigurationsMessages getString PerspectiveManager Error_1 MessageFormat LaunchConfigurationsMessages getString PerspectiveManager Unable_to_switch_to_perspective__ _2
Utility method to submit an asnychronous runnable to the UI protected void async Runnable r Display d DebugUI Plugin get Standard Display if d null d is Disposed d async Exec r  DebugUIPlugin getStandardDisplay isDisposed asyncExec
Utility method to submit a synchronous runnable to the UI protected void sync Runnable r Display d DebugUI Plugin get Standard Display if d null d is Disposed d sync Exec r  DebugUIPlugin getStandardDisplay isDisposed syncExec
sync new Runnable public void run DebugUI Plugin error Dialog DebugUI Plugin get Shell Launch Configurations Messages get String Perspective Manager Error 1 NON NLS 1 Message Format format Launch Configurations Messages get String Perspective Manager Unable to switch perpsectives as specified by launch   0  4 new String launch Name NON NLS 1 t  DebugUIPlugin errorDialog DebugUIPlugin getShell LaunchConfigurationsMessages getString PerspectiveManager Error_1 MessageFormat LaunchConfigurationsMessages getString PerspectiveManager Unable_to_switch_perpsectives_as_specified_by_launch__ _4 launchName
Reports failure to switch perspectives to the user param status exception status describing failure param launch Name the name of the launch that the failure is associated with protected void switch Failed final Throwable t final String launch Name sync new Runnable public void run DebugUI Plugin error Dialog DebugUI Plugin get Shell Launch Configurations Messages get String Perspective Manager Error 1 NON NLS 1 Message Format format Launch Configurations Messages get String Perspective Manager Unable to switch perpsectives as specified by launch   0  4 new String launch Name NON NLS 1 t  launchName switchFailed launchName DebugUIPlugin errorDialog DebugUIPlugin getShell LaunchConfigurationsMessages getString PerspectiveManager Error_1 MessageFormat LaunchConfigurationsMessages getString PerspectiveManager Unable_to_switch_perpsectives_as_specified_by_launch__ _4 launchName
On a SUSPEND event show the debug view If no debug view is open switch to the perspective specified by the launcher see I Debug Event Set Listener handle Debug Events Debug Event public void handle Debug Events Debug Event events open the debugger if this is a suspend event and the debug view is not yet open and the preferences are set to switch for int i 0 i events length i Debug Event event events i if event get Kind Debug Event SUSPEND event get Detail Debug Event BREAKPOINT handle Breakpoint Hit event  IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent DebugEvent getKind DebugEvent getDetail DebugEvent handleBreakpointHit
async new Runnable public void run do Show Debug View window  doShowDebugView
Thread thread new Thread new Runnable public void run if f Prompting synchronized Perspective Manager this try Perspective Manager this wait catch Interrupted Exception e async new Runnable public void run do Show Debug View window  fPrompting PerspectiveManager PerspectiveManager InterruptedException doShowDebugView
Makes the debug view visible protected void show Debug View final I Workbench Window window if f Prompting Wait until the user has dismissed the perspective switching dialog before opening the view Thread thread new Thread new Runnable public void run if f Prompting synchronized Perspective Manager this try Perspective Manager this wait catch Interrupted Exception e async new Runnable public void run do Show Debug View window thread start return do Show Debug View window  showDebugView IWorkbenchWindow fPrompting fPrompting PerspectiveManager PerspectiveManager InterruptedException doShowDebugView doShowDebugView
Shows the debug view in the given workbench window private void do Show Debug View I Workbench Window window I Workbench Page page window get Active Page if page null try page show View I DebugUI Constants ID DEBUG VIEW null I Workbench Page VIEW VISIBLE catch Part Init Exception e DebugUI Plugin log e  doShowDebugView IWorkbenchWindow IWorkbenchPage getActivePage showView IDebugUIConstants ID_DEBUG_VIEW IWorkbenchPage VIEW_VISIBLE PartInitException DebugUIPlugin
Runnable r new Runnable public void run I Workbench Window window null if target Id null window get Window For Perspective target Id if window null return if should Switch Perspective For Suspend window target Id switch To Perspective window target Id Showing the perspective can open a new window based on user prefs So check again in case a new window has been opened window get Window For Perspective target Id if window null return re open the window if minimized Shell shell window get Shell if shell null if shell get Minimized shell set Minimized false if DebugUI Plugin get Default get Preference Store get Boolean I DebugUI Constants PREF ACTIVATE WORKBENCH shell force Active if window null DebugUI Plugin get Default get Preference Store get Boolean I Internal DebugUI Constants PREF ACTIVATE DEBUG VIEW show Debug View window  IWorkbenchWindow targetId getWindowForPerspective targetId shouldSwitchPerspectiveForSuspend targetId switchToPerspective targetId getWindowForPerspective targetId getShell getMinimized setMinimized DebugUIPlugin getDefault getPreferenceStore getBoolean IDebugUIConstants PREF_ACTIVATE_WORKBENCH forceActive DebugUIPlugin getDefault getPreferenceStore getBoolean IInternalDebugUIConstants PREF_ACTIVATE_DEBUG_VIEW showDebugView
A breakpoint has been hit Carry out perspective switching as appropriate for the given debug event param event the suspend event private void handle Breakpoint Hit Debug Event event apply event filters I Launch launch null Object source event get Source if source instanceof I Debug Element launch I Debug Element source get Launch else if source instanceof I Process launch I Process source get Launch String perspective Id null try perspective Id get Perspective Id launch catch Core Exception e DebugUI Plugin log e if no perspective specified always switch to debug perspective this has to be done in an asynch such that the workbench window can be accessed final String target Id perspective Id Runnable r new Runnable public void run I Workbench Window window null if target Id null window get Window For Perspective target Id if window null return if should Switch Perspective For Suspend window target Id switch To Perspective window target Id Showing the perspective can open a new window based on user prefs So check again in case a new window has been opened window get Window For Perspective target Id if window null return re open the window if minimized Shell shell window get Shell if shell null if shell get Minimized shell set Minimized false if DebugUI Plugin get Default get Preference Store get Boolean I DebugUI Constants PREF ACTIVATE WORKBENCH shell force Active if window null DebugUI Plugin get Default get Preference Store get Boolean I Internal DebugUI Constants PREF ACTIVATE DEBUG VIEW show Debug View window async r  handleBreakpointHit DebugEvent ILaunch getSource IDebugElement IDebugElement getLaunch IProcess IProcess getLaunch perspectiveId perspectiveId getPerspectiveId CoreException DebugUIPlugin targetId perspectiveId IWorkbenchWindow targetId getWindowForPerspective targetId shouldSwitchPerspectiveForSuspend targetId switchToPerspective targetId getWindowForPerspective targetId getShell getMinimized setMinimized DebugUIPlugin getDefault getPreferenceStore getBoolean IDebugUIConstants PREF_ACTIVATE_WORKBENCH forceActive DebugUIPlugin getDefault getPreferenceStore getBoolean IInternalDebugUIConstants PREF_ACTIVATE_DEBUG_VIEW showDebugView
Returns the workbench window in which the given perspective should be shown First check the current window to see if it is already showing the perspective Then check any other windows param perspective Id the perspective identifier return which window the given perspective should be shown in or code null code if there are no windows available private I Workbench Window get Window For Perspective String perspective Id Check the active window first I Workbench Window window DebugUI Plugin get Active Workbench Window if is Window Showing Perspective window perspective Id return window Then check all other windows I Workbench Window windows PlatformUI get Workbench get Workbench Windows for int i 0 i windows length i window windows i if is Window Showing Perspective window perspective Id return window Finally just return a window in which the perspective should be created window DebugUI Plugin get Active Workbench Window if window null return window if windows length 0 return windows 0 return null  perspectiveId IWorkbenchWindow getWindowForPerspective perspectiveId IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow isWindowShowingPerspective perspectiveId IWorkbenchWindow getWorkbench getWorkbenchWindows isWindowShowingPerspective perspectiveId DebugUIPlugin getActiveWorkbenchWindow
private boolean is Window Showing Perspective I Workbench Window window String perspective Id if window null I Workbench Page page window get Active Page if page null I Perspective Descriptor perspective Descriptor page get Perspective if perspective Descriptor null perspective Descriptor get Id equals perspective Id return true return false  isWindowShowingPerspective IWorkbenchWindow perspectiveId IWorkbenchPage getActivePage IPerspectiveDescriptor perspectiveDescriptor getPerspective perspectiveDescriptor perspectiveDescriptor getId perspectiveId
Returns whether or not the user wishes to switch to the specified perspective when a suspend occurs param perspective Name the name of the perspective that will be presented to the user for confirmation if they ve asked to be prompted about perspective switching for suspension return whether or not the user wishes to switch to the specified perspective automatically when the given launch suspends protected boolean should Switch Perspective For Suspend I Workbench Window window String perspective Id return should Switch Perspective window perspective Id Launch Configurations Messages get String Perspective Manager 13 I Internal DebugUI Constants PREF SWITCH PERSPECTIVE ON SUSPEND NON NLS 1  perspectiveName shouldSwitchPerspectiveForSuspend IWorkbenchWindow perspectiveId shouldSwitchPerspective perspectiveId LaunchConfigurationsMessages getString PerspectiveManager IInternalDebugUIConstants PREF_SWITCH_PERSPECTIVE_ON_SUSPEND
Returns whether or not the user wishes to switch to the specified perspective when a launch occurs param perspective Name the name of the perspective that will be presented to the user for confirmation if they ve asked to be prompted about perspective switching return whether or not the user wishes to switch to the specified perspective automatically when a launch occurs protected boolean should Switch Perspective For Launch I Workbench Window window String perspective Id return should Switch Perspective window perspective Id Launch Configurations Messages get String Perspective Manager 15 I Internal DebugUI Constants PREF SWITCH TO PERSPECTIVE NON NLS 1  perspectiveName shouldSwitchPerspectiveForLaunch IWorkbenchWindow perspectiveId shouldSwitchPerspective perspectiveId LaunchConfigurationsMessages getString PerspectiveManager IInternalDebugUIConstants PREF_SWITCH_TO_PERSPECTIVE
Returns whether or not the user wishes to switch to the specified perspective when a launch occurs param perspective Name the name of the perspective that will be presented to the user for confirmation if they ve asked to be prompted about perspective switching param message a message to be presented to the user This message is expected to contain a slot for the perspective name to be inserted 0 param preference Key the preference key of the perspective switching preference return whether or not the user wishes to switch to the specified perspective automatically private boolean should Switch Perspective I Workbench Window window String perspective Id String message String preference Key if is Current Perspective window perspective Id return false String perspective Name get Perspective Label perspective Id if perspective Name null return false String switch Perspective DebugUI Plugin get Default get Preference Store get String preference Key if Message Dialog With Toggle ALWAYS equals switch Perspective return true else if Message Dialog With Toggle NEVER equals switch Perspective return false Shell shell window get Shell if shell null f Prompting return false f Prompting true Activate the shell if necessary so the prompt is visible if shell get Minimized shell set Minimized false if DebugUI Plugin get Default get Preference Store get Boolean I DebugUI Constants PREF ACTIVATE WORKBENCH shell force Active Message Dialog With Toggle dialog Message Dialog With Toggle open Yes No Question shell Launch Configurations Messages get String Perspective Manager 12 Message Format format message new String perspective Name null false DebugUI Plugin get Default get Preference Store preference Key NON NLS 1 boolean answer dialog get Return Code I Dialog Constants YES ID synchronized this f Prompting false notify All if is Current Perspective window perspective Id While prompting in response to one event say a launch another event can occur which changes the perspective Double check that we re not in the right perspective answer false return answer  perspectiveName preferenceKey shouldSwitchPerspective IWorkbenchWindow perspectiveId preferenceKey isCurrentPerspective perspectiveId perspectiveName getPerspectiveLabel perspectiveId perspectiveName switchPerspective DebugUIPlugin getDefault getPreferenceStore getString preferenceKey MessageDialogWithToggle switchPerspective MessageDialogWithToggle switchPerspective getShell fPrompting fPrompting getMinimized setMinimized DebugUIPlugin getDefault getPreferenceStore getBoolean IDebugUIConstants PREF_ACTIVATE_WORKBENCH forceActive MessageDialogWithToggle MessageDialogWithToggle openYesNoQuestion LaunchConfigurationsMessages getString PerspectiveManager MessageFormat perspectiveName DebugUIPlugin getDefault getPreferenceStore preferenceKey getReturnCode IDialogConstants YES_ID fPrompting notifyAll isCurrentPerspective perspectiveId
Returns whether the given perspective identifier matches the identifier of the current perspective param perspective Id the identifier return whether the given perspective identifier matches the identifier of the current perspective protected boolean is Current Perspective I Workbench Window window String perspective Id boolean is Current false if window null I Workbench Page page window get Active Page if page null I Perspective Descriptor perspective Descriptor page get Perspective if perspective Descriptor null is Current perspective Id equals perspective Descriptor get Id return is Current  perspectiveId isCurrentPerspective IWorkbenchWindow perspectiveId isCurrent IWorkbenchPage getActivePage IPerspectiveDescriptor perspectiveDescriptor getPerspective perspectiveDescriptor isCurrent perspectiveId perspectiveDescriptor getId isCurrent
Returns the label of the perspective with the given identifier or code null code if no such perspective exists param perspective Id the identifier return the label of the perspective with the given identifier or code null code if no such perspective exists protected String get Perspective Label String perspective Id I Perspective Descriptor new Perspective PlatformUI get Workbench get Perspective Registry find Perspective With Id perspective Id if new Perspective null return null return new Perspective get Label  perspectiveId getPerspectiveLabel perspectiveId IPerspectiveDescriptor newPerspective getWorkbench getPerspectiveRegistry findPerspectiveWithId perspectiveId newPerspective newPerspective getLabel
Returns the perspective associated with the given launch or code null code if none param launch a launch return the perspective associated with the launch or code null code exception Core Exception if unable to retrieve a required launch configuration attribute protected String get Perspective Id I Launch launch throws Core Exception if launch null return null I Launch Configuration config launch get Launch Configuration if config null return null String perspective Id null perspective Id DebugUI Tools get Launch Perspective config get Type launch get Launch Mode if perspective Id null perspective Id equals I DebugUI Constants PERSPECTIVE NONE perspective Id null return perspective Id  CoreException getPerspectiveId ILaunch CoreException ILaunchConfiguration getLaunchConfiguration perspectiveId perspectiveId DebugUITools getLaunchPerspective getType getLaunchMode perspectiveId perspectiveId IDebugUIConstants PERSPECTIVE_NONE perspectiveId perspectiveId
Returns the perspective to switch to when a configuration of the given type is launched in the given mode or code null code if no switch should take place param type launch configuration type param mode launch mode identifier return perspective identifier or code null code since 3 0 public String get Launch Perspective I Launch Configuration Type type String mode String id get User Specified Launch Perspective type mode if id null get the default id get Default Launch Perspective type mode else if id equals I DebugUI Constants PERSPECTIVE NONE translate NONE to null id null return id  getLaunchPerspective ILaunchConfigurationType getUserSpecifiedLaunchPerspective getDefaultLaunchPerspective IDebugUIConstants PERSPECTIVE_NONE
Sets the perspective to switch to when a configuration of the given type is launched in the given mode code PERSPECTIVE NONE code indicates no perspective switch should take place code PERSPECTIVE DEFAULT code indicates a default perspective switch should take place as defined by the associated launch tab group extension Saves plug in preferences param type launch configuration type param mode launch mode identifier param perspective identifier code PERSPECTIVE NONE code or code PERSPECTIVE DEFAULT code since 3 0 public void set Launch Perspective I Launch Configuration Type type String mode String perspective internal Set Launch Perspective type get Identifier mode perspective update preference String xml try xml generate PerspectiveXML DebugUI Plugin get Default get Preference Store put Value I Internal DebugUI Constants PREF LAUNCH PERSPECTIVES xml DebugUI Plugin get Default save Plugin Preferences catch IO Exception e DebugUI Plugin log DebugUI Plugin new Error Status Launch Configurations Messages get String Perspective Manager 9 e NON NLS 1 catch Parser Configuration Exception e DebugUI Plugin log DebugUI Plugin new Error Status Launch Configurations Messages get String Perspective Manager 9 e NON NLS 1 catch Transformer Exception e DebugUI Plugin log DebugUI Plugin new Error Status Launch Configurations Messages get String Perspective Manager 9 e NON NLS 1  PERSPECTIVE_NONE PERSPECTIVE_DEFAULT PERSPECTIVE_NONE PERSPECTIVE_DEFAULT setLaunchPerspective ILaunchConfigurationType internalSetLaunchPerspective getIdentifier generatePerspectiveXML DebugUIPlugin getDefault getPreferenceStore putValue IInternalDebugUIConstants PREF_LAUNCH_PERSPECTIVES DebugUIPlugin getDefault savePluginPreferences IOException DebugUIPlugin DebugUIPlugin newErrorStatus LaunchConfigurationsMessages getString PerspectiveManager ParserConfigurationException DebugUIPlugin DebugUIPlugin newErrorStatus LaunchConfigurationsMessages getString PerspectiveManager TransformerException DebugUIPlugin DebugUIPlugin newErrorStatus LaunchConfigurationsMessages getString PerspectiveManager
Sets the perspective to switch to when a configuration of the given type is launched in the given mode code PERSPECTIVE NONE code indicates no perspective switch should take place code PERSPECTIVE DEFAULT code indicates a default perspective switch should take place as defined by the associated launch tab group extension param type launch configuration type identifier param mode launch mode identifier param perspective identifier code PERSPECTIVE NONE code or code PERSPECTIVE DEFAULT code since 3 0 private void internal Set Launch Perspective String type String mode String perspective if f Preference Map null init Perspectives Map mode Map Map f Preference Map get type if mode Map null mode Map new Hash Map f Preference Map put type mode Map if perspective equals I DebugUI Constants PERSPECTIVE DEFAULT remove user preference setting mode Map remove mode else override default setting mode Map put mode perspective  PERSPECTIVE_NONE PERSPECTIVE_DEFAULT PERSPECTIVE_NONE PERSPECTIVE_DEFAULT internalSetLaunchPerspective fPreferenceMap initPerspectives modeMap fPreferenceMap modeMap modeMap HashMap fPreferenceMap modeMap IDebugUIConstants PERSPECTIVE_DEFAULT modeMap modeMap
Generates XML for the user specified perspective settings return XML exception IO Exception if unable to generate the XML exception Transformer Exception if unable to generate the XML exception Parser Configuration Exception if unable to generate the XML private String generate PerspectiveXML throws Parser Configuration Exception Transformer Exception IO Exception Document doc DebugUI Plugin get Document Element config Root Element doc create Element ELEMENT PERSPECTIVES doc append Child config Root Element Iterator config Types f Preference Map key Set iterator while config Types has Next String type String config Types next Map mode Map Map f Preference Map get type if mode Map null mode Map is Empty Iterator modes mode Map key Set iterator while modes has Next String mode String modes next String perspective String mode Map get mode Element element doc create Element ELEMENT PERSPECTIVE element set Attribute ATTR TYPE ID type element set Attribute ATTR MODE ID mode element set Attribute ATTR PERSPECTIVE ID perspective config Root Element append Child element return DebugUI Plugin serialize Document doc  IOException TransformerException ParserConfigurationException generatePerspectiveXML ParserConfigurationException TransformerException IOException DebugUIPlugin getDocument configRootElement createElement ELEMENT_PERSPECTIVES appendChild configRootElement configTypes fPreferenceMap keySet configTypes hasNext configTypes modeMap fPreferenceMap modeMap modeMap isEmpty modeMap keySet hasNext modeMap createElement ELEMENT_PERSPECTIVE setAttribute ATTR_TYPE_ID setAttribute ATTR_MODE_ID setAttribute ATTR_PERSPECTIVE_ID configRootElement appendChild DebugUIPlugin serializeDocument
Returns the default perspective to switch to when a configuration of the given type is launched in the given mode or code null code if none param type launch configuration type param mode launch mode return perspective identifier or code null code protected String get Default Launch Perspective I Launch Configuration Type type String mode Launch Configuration Tab Group Extension extension Launch Configuration Presentation Manager get Default get Extension type get Identifier mode if extension null String id extension get Perspective mode if id null revert to hard coded default for backwards compatibility since nothing is specified in XML if mode equals I Launch Manager DEBUG MODE return I DebugUI Constants ID DEBUG PERSPECTIVE else return id return null  getDefaultLaunchPerspective ILaunchConfigurationType LaunchConfigurationTabGroupExtension LaunchConfigurationPresentationManager getDefault getExtension getIdentifier getPerspective ILaunchManager DEBUG_MODE IDebugUIConstants ID_DEBUG_PERSPECTIVE
Returns the user specified perspective to switch to when a configuration of the given type is launched in the given mode or code null code if unspecified Returns code PERSPECTIVE NONE code to indicate no switch param type launch configuration type param mode launch mode return perspective identifier code PERSPECTIVE NONE code or code null code protected String get User Specified Launch Perspective I Launch Configuration Type type String mode String id null if f Preference Map null init Perspectives Map mode Map Map f Preference Map get type get Identifier if mode Map null id String mode Map get mode return id  PERSPECTIVE_NONE PERSPECTIVE_NONE getUserSpecifiedLaunchPerspective ILaunchConfigurationType fPreferenceMap initPerspectives modeMap fPreferenceMap getIdentifier modeMap modeMap
Initialize the preference map with settings from user preference private void init Perspectives f Preference Map new Hash Map String xml DebugUI Plugin get Default get Preference Store get String I Internal DebugUI Constants PREF LAUNCH PERSPECTIVES if xml null xml length 0 try Element root null Document Builder parser Document Builder Factory new Instance new Document Builder String Reader reader new String Reader xml Input Source source new Input Source reader root parser parse source get Document Element Node List list root get Child Nodes int length list get Length for int i 0 i length i Node node list item i short nt node get Node Type if nt Node ELEMENT NODE Element element Element node String node Name element get Node Name if node Name equals Ignore Case ELEMENT PERSPECTIVE String type element get Attribute ATTR TYPE ID String mode element get Attribute ATTR MODE ID String perpsective element get Attribute ATTR PERSPECTIVE ID internal Set Launch Perspective type mode perpsective catch Parser Configuration Exception e DebugUI Plugin log e catch SAX Exception e DebugUI Plugin log e catch IO Exception e DebugUI Plugin log e  initPerspectives fPreferenceMap HashMap DebugUIPlugin getDefault getPreferenceStore getString IInternalDebugUIConstants PREF_LAUNCH_PERSPECTIVES DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder StringReader StringReader InputSource InputSource getDocumentElement NodeList getChildNodes getLength getNodeType ELEMENT_NODE nodeName getNodeName nodeName equalsIgnoreCase ELEMENT_PERSPECTIVE getAttribute ATTR_TYPE_ID getAttribute ATTR_MODE_ID getAttribute ATTR_PERSPECTIVE_ID internalSetLaunchPerspective ParserConfigurationException DebugUIPlugin SAXException DebugUIPlugin IOException DebugUIPlugin

private Selection Adapter f Selection Adapter new Selection Adapter public void widget Selected Selection Event e Object source e get Source if source f Restore Defaults handle Restore Defaults Selected update Launch Configuration Dialog  SelectionAdapter fSelectionAdapter SelectionAdapter widgetSelected SelectionEvent getSource fRestoreDefaults handleRestoreDefaultsSelected updateLaunchConfigurationDialog
private void handle Restore Defaults Selected for int i 0 i f Combos length i String mode String f Combos i get Data String def DebugUI Plugin get Default get Perspective Manager get Default Launch Perspective get Launch Configuration Type mode if def null f Combos i set Text Launch Configurations Messages get String Perspectives Tab 1 NON NLS 1 else I Perspective Registry registry PlatformUI get Workbench get Perspective Registry I Perspective Descriptor descriptor registry find Perspective With Id def f Combos i set Text descriptor get Label  handleRestoreDefaultsSelected fCombos fCombos getData DebugUIPlugin getDefault getPerspectiveManager getDefaultLaunchPerspective getLaunchConfigurationType fCombos setText LaunchConfigurationsMessages getString PerspectivesTab IPerspectiveRegistry getWorkbench getPerspectiveRegistry IPerspectiveDescriptor findPerspectiveWithId fCombos setText getLabel
see org eclipse debug ui I Launch Configuration Tab dispose public void dispose super dispose Debug Plugin get Default get Launch Manager remove Launch Configuration Listener this  ILaunchConfigurationTab DebugPlugin getDefault getLaunchManager removeLaunchConfigurationListener
see org eclipse debug core I Launch Configuration Listener launch Configuration Added org eclipse debug core I Launch Configuration public void launch Configuration Added I Launch Configuration configuration  ILaunchConfigurationListener launchConfigurationAdded ILaunchConfiguration launchConfigurationAdded ILaunchConfiguration
public void launch Configuration Changed I Launch Configuration configuration if configuration is Working Copy if configuration get Name starts With get Launch Configuration Type get Identifier for int i 0 i f Mode Ids length i String mode f Mode Ids i try String persp configuration get Attribute mode String null if persp null default persp I DebugUI Constants PERSPECTIVE DEFAULT DebugUI Tools set Launch Perspective get Launch Configuration Type mode persp catch Core Exception e DebugUI Plugin log e  launchConfigurationChanged ILaunchConfiguration isWorkingCopy getName startsWith getLaunchConfigurationType getIdentifier fModeIds fModeIds getAttribute IDebugUIConstants PERSPECTIVE_DEFAULT DebugUITools setLaunchPerspective getLaunchConfigurationType CoreException DebugUIPlugin
see org eclipse debug core I Launch Configuration Listener launch Configuration Removed org eclipse debug core I Launch Configuration public void launch Configuration Removed I Launch Configuration configuration  ILaunchConfigurationListener launchConfigurationRemoved ILaunchConfiguration launchConfigurationRemoved ILaunchConfiguration
Constructs a new tab param type public Perspectives Tab I Launch Configuration Type type super f Type type Debug Plugin get Default get Launch Manager add Launch Configuration Listener this  PerspectivesTab ILaunchConfigurationType fType DebugPlugin getDefault getLaunchManager addLaunchConfigurationListener
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return Debug Plugin Images get Image I Internal DebugUI Constants IMG OBJS PERSPECTIVE TAB  ILaunchConfigurationTab getImage getImage DebugPluginImages getImage IInternalDebugUIConstants IMG_OBJS_PERSPECTIVE_TAB
public void create Control Composite parent Composite composite new Composite parent SWT NONE set Control composite Workbench Help set Help get Control I Debug Help Context Ids LAUNCH CONFIGURATION DIALOG PERSPECTIVE TAB Grid Layout layout new Grid Layout 2 false composite set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH composite set Layout Data gd composite set Font parent get Font Label label new Label composite SWT LEFT SWT WRAP label set Font parent get Font label set Text Message Format format Launch Configurations Messages get String Perspectives Tab 0 new String get Launch Configuration Type get Name NON NLS 1 gd new Grid Data Pixel Converter converter new Pixel Converter label gd width Hint converter convert Width In Chars To Pixels 80 gd horizontal Span 2 label set Layout Data gd init modes I Launch Mode modes Debug Plugin get Default get Launch Manager get Launch Modes Array List supported new Array List for int i 0 i modes length i I Launch Mode mode modes i if get Launch Configuration Type supports Mode mode get Identifier supported add mode get Identifier f Mode Ids String supported to Array new String supported size init perspective labels I Perspective Registry registry PlatformUI get Workbench get Perspective Registry I Perspective Descriptor descriptors registry get Perspectives f Perspective Labels new String descriptors length 1 f Perspective Labels 0 Launch Configurations Messages get String Perspectives Tab 1 NON NLS 1 f Perspective Ids new Hash Map descriptors length for int i 0 i descriptors length i I Perspective Descriptor descriptor descriptors i f Perspective Labels i 1 descriptor get Label f Perspective Ids put descriptor get Label descriptor get Id spacer create Vertical Spacer composite 2 f Combos new Combo f Mode Ids length for int i 0 i f Mode Ids length i label new Label composite SWT NONE label set Font composite get Font gd new Grid Data Grid Data BEGINNING gd horizontal Span 1 label set Layout Data gd String text Debug Plugin get Default get Launch Manager get Launch Mode f Mode Ids i get Label label set Text Message Format format Launch Configurations Messages get String Perspectives Tab 2 new String text NON NLS 1 Combo combo new Combo composite SWT READ ONLY combo set Font composite get Font combo set Items f Perspective Labels combo set Data f Mode Ids i gd new Grid Data Grid Data BEGINNING combo set Layout Data gd f Combos i combo combo add Selection Listener f Selection Adapter create Vertical Spacer composite 2 f Restore Defaults create Push Button composite Launch Configurations Messages get String Perspectives Tab 3 null NON NLS 1 f Restore Defaults add Selection Listener f Selection Adapter Dialog apply Dialog Font composite  createControl setControl WorkbenchHelp setHelp getControl IDebugHelpContextIds LAUNCH_CONFIGURATION_DIALOG_PERSPECTIVE_TAB GridLayout GridLayout setLayout GridData GridData GridData FILL_BOTH setLayoutData setFont getFont setFont getFont setText MessageFormat LaunchConfigurationsMessages getString PerspectivesTab getLaunchConfigurationType getName GridData PixelConverter PixelConverter widthHint convertWidthInCharsToPixels horizontalSpan setLayoutData ILaunchMode DebugPlugin getDefault getLaunchManager getLaunchModes ArrayList ArrayList ILaunchMode getLaunchConfigurationType supportsMode getIdentifier getIdentifier fModeIds toArray IPerspectiveRegistry getWorkbench getPerspectiveRegistry IPerspectiveDescriptor getPerspectives fPerspectiveLabels fPerspectiveLabels LaunchConfigurationsMessages getString PerspectivesTab fPerspectiveIds HashMap IPerspectiveDescriptor fPerspectiveLabels getLabel fPerspectiveIds getLabel getId createVerticalSpacer fCombos fModeIds fModeIds setFont getFont GridData GridData horizontalSpan setLayoutData DebugPlugin getDefault getLaunchManager getLaunchMode fModeIds getLabel setText MessageFormat LaunchConfigurationsMessages getString PerspectivesTab READ_ONLY setFont getFont setItems fPerspectiveLabels setData fModeIds GridData GridData setLayoutData fCombos addSelectionListener fSelectionAdapter createVerticalSpacer fRestoreDefaults createPushButton LaunchConfigurationsMessages getString PerspectivesTab fRestoreDefaults addSelectionListener fSelectionAdapter applyDialogFont
public void set Defaults I Launch Configuration Working Copy configuration for int i 0 i f Mode Ids length i String mode f Mode Ids i null indicates default configuration set Attribute mode String null  setDefaults ILaunchConfigurationWorkingCopy fModeIds fModeIds setAttribute
public void initialize From I Launch Configuration configuration each perspective is stored with its mode identifier f Initializing true I Perspective Registry registry PlatformUI get Workbench get Perspective Registry for int i 0 i f Mode Ids length i String mode f Mode Ids i String persp try persp configuration get Attribute mode String null if persp null null indicates default persp DebugUI Tools get Launch Perspective get Launch Configuration Type mode if I DebugUI Constants PERSPECTIVE NONE equals persp persp null I Perspective Descriptor descriptor null if persp null descriptor registry find Perspective With Id persp if descriptor null select none f Combos i set Text Launch Configurations Messages get String Perspectives Tab 1 NON NLS 1 else f Combos i set Text descriptor get Label catch Core Exception e DebugUI Plugin log e f Initializing false  initializeFrom ILaunchConfiguration fInitializing IPerspectiveRegistry getWorkbench getPerspectiveRegistry fModeIds fModeIds getAttribute DebugUITools getLaunchPerspective getLaunchConfigurationType IDebugUIConstants PERSPECTIVE_NONE IPerspectiveDescriptor findPerspectiveWithId fCombos setText LaunchConfigurationsMessages getString PerspectivesTab fCombos setText getLabel CoreException DebugUIPlugin fInitializing
public void perform Apply I Launch Configuration Working Copy configuration for int i 0 i f Combos length i update Config From Combo f Combos i configuration  performApply ILaunchConfigurationWorkingCopy fCombos updateConfigFromCombo fCombos
Updates the configuration based on the user s selection in the perspective combo by setting the given configurations perspective attribute param combo the combo widget param working Copy the launch configuration to update protected void update Config From Combo Combo combo I Launch Configuration Working Copy working Copy if f Initializing String mode String combo get Data String persp combo get Text if persp equals Launch Configurations Messages get String Perspectives Tab 1 NON NLS 1 persp I DebugUI Constants PERSPECTIVE NONE else persp String f Perspective Ids get persp if the same as default use null which indicates default String def DebugUI Plugin get Default get Perspective Manager get Default Launch Perspective get Launch Configuration Type mode if def null def I DebugUI Constants PERSPECTIVE NONE if persp equals def persp null working Copy set Attribute mode persp  workingCopy updateConfigFromCombo ILaunchConfigurationWorkingCopy workingCopy fInitializing getData getText LaunchConfigurationsMessages getString PerspectivesTab IDebugUIConstants PERSPECTIVE_NONE fPerspectiveIds DebugUIPlugin getDefault getPerspectiveManager getDefaultLaunchPerspective getLaunchConfigurationType IDebugUIConstants PERSPECTIVE_NONE workingCopy setAttribute
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Launch Configurations Messages get String Perspectives Tab 7 NON NLS 1  ILaunchConfigurationTab getName getName LaunchConfigurationsMessages getString PerspectivesTab
Returns the launch configuration type this tab was opened on return launch config type protected I Launch Configuration Type get Launch Configuration Type return f Type  ILaunchConfigurationType getLaunchConfigurationType fType
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy do nothing on activation  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy do nothing on deactivation  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
Returns the description associated with the current launch configuration type in the current mode or code null code if none see org eclipse debug ui I Launch Configuration Tab get Message public String get Message String description super get Message if f Type null String mode get Launch Configuration Dialog get Mode Launch Configuration Presentation Manager manager Launch Configuration Presentation Manager get Default Launch Configuration Tab Group Extension extension manager get Extension f Type get Attribute id mode NON NLS 1 description extension get Description mode return description  ILaunchConfigurationTab getMessage getMessage getMessage fType getLaunchConfigurationDialog getMode LaunchConfigurationPresentationManager LaunchConfigurationPresentationManager getDefault LaunchConfigurationTabGroupExtension getExtension fType getAttribute getDescription

private I Launch Configuration Type f Type public Perspective Tab Group I Launch Configuration Type type f Type type  ILaunchConfigurationType fType PerspectiveTabGroup ILaunchConfigurationType fType
see org eclipse debug ui I Launch Configuration Tab Group create Tabs org eclipse debug ui I Launch Configuration Dialog java lang String public void create Tabs I Launch Configuration Dialog dialog String mode I Launch Configuration Tab tabs new I Launch Configuration Tab new Perspectives Tab f Type set Tabs tabs  ILaunchConfigurationTabGroup createTabs ILaunchConfigurationDialog createTabs ILaunchConfigurationDialog ILaunchConfigurationTab ILaunchConfigurationTab PerspectivesTab fType setTabs

public int compare Object o1 Object o2 String one String o1 String two String o2 if one null two null if one two return 0 else return 1 if one starts With working set two starts With working set NON NLS 1 NON NLS 2 I Working Set working Set1 Refresh Tab get Working Set one I Working Set working Set2 Refresh Tab get Working Set two if working Set1 null working Set2 null if working Set1 working Set2 return 0 else return 1 if working Set1 equals working Set2 return 0 return 1 else return one compare To two  startsWith working_set startsWith working_set IWorkingSet workingSet1 RefreshTab getWorkingSet IWorkingSet workingSet2 RefreshTab getWorkingSet workingSet1 workingSet2 workingSet1 workingSet2 workingSet1 workingSet2 compareTo

public void remove Annotations I Editor Part editor Part I Thread thread I Debug Model Presentation presentation get Presentation if presentation instanceof I Debug Editor Presentation I Debug Editor Presentation presentation remove Annotations editor Part thread  removeAnnotations IEditorPart editorPart IThread IDebugModelPresentation getPresentation IDebugEditorPresentation IDebugEditorPresentation removeAnnotations editorPart
public boolean add Annotations I Editor Part editor Part I Stack Frame frame I Debug Model Presentation presentation get Presentation if presentation instanceof I Debug Editor Presentation return I Debug Editor Presentation presentation add Annotations editor Part frame return false  addAnnotations IEditorPart editorPart IStackFrame IDebugModelPresentation getPresentation IDebugEditorPresentation IDebugEditorPresentation addAnnotations editorPart
Constructs a lazy presentation from the config element public Lazy Model Presentation I Configuration Element config Element f Config config Element  LazyModelPresentation IConfigurationElement configElement fConfig configElement
see I Debug Model Presentation get Image Object public Image get Image Object element return get Presentation get Image element  IDebugModelPresentation getImage getImage getPresentation getImage
see I Debug Model Presentation get Text Object public String get Text Object element return get Presentation get Text element  IDebugModelPresentation getText getText getPresentation getText
see I Debug Model Presentation compute Detail I Value I Value Detail Listener public void compute Detail I Value value I Value Detail Listener listener get Presentation compute Detail value listener  IDebugModelPresentation computeDetail IValue IValueDetailListener computeDetail IValue IValueDetailListener getPresentation computeDetail
see I Source Presentation get Editor Input Object public I Editor Input get Editor Input Object element return get Presentation get Editor Input element  ISourcePresentation getEditorInput IEditorInput getEditorInput getPresentation getEditorInput
see I Source Presentation get Editor Id I Editor Input Object public String get Editor Id I Editor Input input Object input Object return get Presentation get Editor Id input input Object  ISourcePresentation getEditorId IEditorInput getEditorId IEditorInput inputObject getPresentation getEditorId inputObject
see I Base Label Provider add Listener I Label Provider Listener public void add Listener I Label Provider Listener listener if f Presentation null get Presentation add Listener listener f Listeners add listener  IBaseLabelProvider addListener ILabelProviderListener addListener ILabelProviderListener fPresentation getPresentation addListener fListeners
see I Base Label Provider dispose public void dispose if f Presentation null get Presentation dispose f Listeners null  IBaseLabelProvider fPresentation getPresentation fListeners
see I Base Label Provider is Label Property Object String public boolean is Label Property Object element String property if f Presentation null return get Presentation is Label Property element property return false  IBaseLabelProvider isLabelProperty isLabelProperty fPresentation getPresentation isLabelProperty
see I Base Label Provider remove Listener I Label Provider Listener public void remove Listener I Label Provider Listener listener if f Presentation null get Presentation remove Listener listener f Listeners remove listener  IBaseLabelProvider removeListener ILabelProviderListener removeListener ILabelProviderListener fPresentation getPresentation removeListener fListeners
Returns the real presentation instantiating if required protected I Debug Model Presentation get Presentation if f Presentation null try f Presentation I Debug Model Presentation DebugUI Plugin create Extension f Config class NON NLS 1 configure it if f Listeners null Object list f Listeners get Listeners for int i 0 i list length i f Presentation add Listener I Label Provider Listener list i Iterator keys f Attributes key Set iterator while keys has Next String key String keys next f Presentation set Attribute key f Attributes get key catch Core Exception e DebugUI Plugin log e return f Presentation  IDebugModelPresentation getPresentation fPresentation fPresentation IDebugModelPresentation DebugUIPlugin createExtension fConfig fListeners fListeners getListeners fPresentation addListener ILabelProviderListener fAttributes keySet hasNext fPresentation setAttribute fAttributes CoreException DebugUIPlugin fPresentation
see I Debug Model Presentation set Attribute String Object public void set Attribute String id Object value if value null return if f Presentation null get Presentation set Attribute id value f Attributes put id value  IDebugModelPresentation setAttribute setAttribute fPresentation getPresentation setAttribute fAttributes
Returns the identifier of the debug model this presentation is registered for public String get Debug Model Identifier return f Config get Attribute id NON NLS 1  getDebugModelIdentifier fConfig getAttribute
Returns a new source viewer configuration for the details area of the variables view or code null code if unspecified return source viewer configuration or code null code exception Core Exception if unable to create the specified source viewer configuration public Source Viewer Configuration new Details Viewer Configuration throws Core Exception String attr f Config get Attribute details Viewer Configuration NON NLS 1 if attr null return Source Viewer Configuration f Config create Executable Extension details Viewer Configuration NON NLS 1 return null  CoreException SourceViewerConfiguration newDetailsViewerConfiguration CoreException fConfig getAttribute detailsViewerConfiguration SourceViewerConfiguration fConfig createExecutableExtension detailsViewerConfiguration
Returns a copy of the attributes in this model presentation return a copy of the attributes in this model presentation since 3 0 public Map get Attribute Map return Map f Attributes clone  getAttributeMap fAttributes

public Multiple Input Dialog Shell shell String title super shell this title title set Shell Style get Shell Style SWT RESIZE  MultipleInputDialog setShellStyle getShellStyle
protected void configure Shell Shell shell super configure Shell shell if title null shell set Text title  configureShell configureShell setText
protected Control create Button Bar Composite parent Control bar super create Button Bar parent validate Fields return bar  createButtonBar createButtonBar validateFields
protected Control create Dialog Area Composite parent Composite container Composite super create Dialog Area parent container set Layout new Grid Layout 2 false container set Layout Data new Grid Data Grid Data FILL BOTH panel new Composite container SWT NONE Grid Layout layout new Grid Layout 2 false panel set Layout layout panel set Layout Data new Grid Data Grid Data FILL HORIZONTAL for Iterator i field List iterator i has Next Field Summary field Field Summary i next switch field type case TEXT create Text Field field name field initial Value field allows Empty break case BROWSE create Browse Field field name field initial Value field allows Empty break case VARIABLE create Variables Field field name field initial Value field allows Empty break field List null allow it to be gc d Dialog apply Dialog Font container return container  createDialogArea createDialogArea setLayout GridLayout setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout setLayout setLayoutData GridData GridData FILL_HORIZONTAL fieldList hasNext FieldSummary FieldSummary createTextField initialValue allowsEmpty createBrowseField initialValue allowsEmpty createVariablesField initialValue allowsEmpty fieldList applyDialogFont
public void add Browse Field String label Text String initial Value boolean allows Empty field List add new Field Summary BROWSE label Text initial Value allows Empty  addBrowseField labelText initialValue allowsEmpty fieldList FieldSummary labelText initialValue allowsEmpty
field List add new Field Summary BROWSE label Text initial Value allows Empty public void add Text Field String label Text String initial Value boolean allows Empty field List add new Field Summary TEXT label Text initial Value allows Empty  fieldList FieldSummary labelText initialValue allowsEmpty addTextField labelText initialValue allowsEmpty fieldList FieldSummary labelText initialValue allowsEmpty
field List add new Field Summary TEXT label Text initial Value allows Empty public void add Variables Field String label Text String initial Value boolean allows Empty field List add new Field Summary VARIABLE label Text initial Value allows Empty  fieldList FieldSummary labelText initialValue allowsEmpty addVariablesField labelText initialValue allowsEmpty fieldList FieldSummary labelText initialValue allowsEmpty
if allow Empty validators add new Validator public boolean validate return text get Text equals NON NLS 1  allowEmpty getText
text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Fields  addModifyListener ModifyListener modifyText ModifyEvent validateFields
protected void create Text Field String label Text String initial Value boolean allow Empty Label label new Label panel SWT NONE label set Text label Text label set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING final Text text new Text panel SWT SINGLE SWT BORDER text set Layout Data new Grid Data Grid Data FILL HORIZONTAL text set Data FIELD NAME label Text make sure rows are the same height on both panels label set Size label get Size x text get Size y if initial Value null text set Text initial Value if allow Empty validators add new Validator public boolean validate return text get Text equals NON NLS 1 text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Fields control List add text  createTextField labelText initialValue allowEmpty setText labelText setLayoutData GridData GridData HORIZONTAL_ALIGN_BEGINNING setLayoutData GridData GridData FILL_HORIZONTAL setData FIELD_NAME labelText setSize getSize getSize initialValue setText initialValue allowEmpty getText addModifyListener ModifyListener modifyText ModifyEvent validateFields controlList
if allow Empty validators add new Validator public boolean validate return text get Text equals NON NLS 1  allowEmpty getText
text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Fields  addModifyListener ModifyListener modifyText ModifyEvent validateFields
button add Selection Listener new Selection Adapter public void widget Selected Selection Event e Directory Dialog dialog new Directory Dialog get Shell dialog set Message DebugUI Messages get String Multiple Input Dialog 7 NON NLS 1 String current Working Dir text get Text if current Working Dir trim equals NON NLS 1 File path new File current Working Dir if path exists dialog set Filter Path current Working Dir String selected Directory dialog open if selected Directory null text set Text selected Directory  addSelectionListener SelectionAdapter widgetSelected SelectionEvent DirectoryDialog DirectoryDialog getShell setMessage DebugUIMessages getString MultipleInputDialog currentWorkingDir getText currentWorkingDir currentWorkingDir setFilterPath currentWorkingDir selectedDirectory selectedDirectory setText selectedDirectory
protected void create Browse Field String label Text String initial Value boolean allow Empty Label label new Label panel SWT NONE label set Text label Text label set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING Composite comp new Composite panel SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 comp set Layout layout comp set Layout Data new Grid Data Grid Data FILL HORIZONTAL final Text text new Text comp SWT SINGLE SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint 200 text set Layout Data data text set Data FIELD NAME label Text make sure rows are the same height on both panels label set Size label get Size x text get Size y if initial Value null text set Text initial Value if allow Empty validators add new Validator public boolean validate return text get Text equals NON NLS 1 text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Fields Button button create Button comp I Dialog Constants IGNORE ID DebugUI Messages get String Multiple Input Dialog 6 false NON NLS 1 button add Selection Listener new Selection Adapter public void widget Selected Selection Event e Directory Dialog dialog new Directory Dialog get Shell dialog set Message DebugUI Messages get String Multiple Input Dialog 7 NON NLS 1 String current Working Dir text get Text if current Working Dir trim equals NON NLS 1 File path new File current Working Dir if path exists dialog set Filter Path current Working Dir String selected Directory dialog open if selected Directory null text set Text selected Directory control List add text  createBrowseField labelText initialValue allowEmpty setText labelText setLayoutData GridData GridData HORIZONTAL_ALIGN_BEGINNING GridLayout GridLayout marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_HORIZONTAL GridData GridData GridData FILL_HORIZONTAL widthHint setLayoutData setData FIELD_NAME labelText setSize getSize getSize initialValue setText initialValue allowEmpty getText addModifyListener ModifyListener modifyText ModifyEvent validateFields createButton IDialogConstants IGNORE_ID DebugUIMessages getString MultipleInputDialog addSelectionListener SelectionAdapter widgetSelected SelectionEvent DirectoryDialog DirectoryDialog getShell setMessage DebugUIMessages getString MultipleInputDialog currentWorkingDir getText currentWorkingDir currentWorkingDir setFilterPath currentWorkingDir selectedDirectory selectedDirectory setText selectedDirectory controlList
if allow Empty validators add new Validator public boolean validate return text get Text equals NON NLS 1  allowEmpty getText
text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Fields  addModifyListener ModifyListener modifyText ModifyEvent validateFields
button add Selection Listener new Selection Adapter public void widget Selected Selection Event e String Variable Selection Dialog dialog new String Variable Selection Dialog get Shell int code dialog open if code I Dialog Constants OK ID String variable dialog get Variable Expression if variable null text append variable  addSelectionListener SelectionAdapter widgetSelected SelectionEvent StringVariableSelectionDialog StringVariableSelectionDialog getShell IDialogConstants OK_ID getVariableExpression
public void create Variables Field String label Text String initial Value boolean allow Empty Label label new Label panel SWT NONE label set Text label Text label set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING Composite comp new Composite panel SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 comp set Layout layout comp set Layout Data new Grid Data Grid Data FILL HORIZONTAL final Text text new Text comp SWT SINGLE SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint 200 text set Layout Data data text set Data FIELD NAME label Text make sure rows are the same height on both panels label set Size label get Size x text get Size y if initial Value null text set Text initial Value if allow Empty validators add new Validator public boolean validate return text get Text equals NON NLS 1 text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Fields Button button create Button comp I Dialog Constants IGNORE ID DebugUI Messages get String Multiple Input Dialog 8 false NON NLS 1 button add Selection Listener new Selection Adapter public void widget Selected Selection Event e String Variable Selection Dialog dialog new String Variable Selection Dialog get Shell int code dialog open if code I Dialog Constants OK ID String variable dialog get Variable Expression if variable null text append variable control List add text  createVariablesField labelText initialValue allowEmpty setText labelText setLayoutData GridData GridData HORIZONTAL_ALIGN_BEGINNING GridLayout GridLayout marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_HORIZONTAL GridData GridData GridData FILL_HORIZONTAL widthHint setLayoutData setData FIELD_NAME labelText setSize getSize getSize initialValue setText initialValue allowEmpty getText addModifyListener ModifyListener modifyText ModifyEvent validateFields createButton IDialogConstants IGNORE_ID DebugUIMessages getString MultipleInputDialog addSelectionListener SelectionAdapter widgetSelected SelectionEvent StringVariableSelectionDialog StringVariableSelectionDialog getShell IDialogConstants OK_ID getVariableExpression controlList
protected void ok Pressed for Iterator i control List iterator i has Next Control control Control i next if control instanceof Text value Map put control get Data FIELD NAME Text control get Text control List null super ok Pressed  okPressed controlList hasNext valueMap getData FIELD_NAME getText controlList okPressed
see org eclipse jface window Window open public int open apply Dialog Font panel return super open  applyDialogFont
public Object get Value String key return value Map get key  getValue valueMap
public String get String Value String key return String get Value key  getStringValue getValue
public void validate Fields for Iterator i validators iterator i has Next Validator validator Validator i next if validator validate get Button I Dialog Constants OK ID set Enabled false return get Button I Dialog Constants OK ID set Enabled true  validateFields hasNext getButton IDialogConstants OK_ID setEnabled getButton IDialogConstants OK_ID setEnabled
protected Point get Initial Location Point initial Size Point initial Location Dialog Settings Helper get Initial Location get Dialog Settings Section Name if initial Location null return initial Location return super get Initial Location initial Size  getInitialLocation initialSize initialLocation DialogSettingsHelper getInitialLocation getDialogSettingsSectionName initialLocation initialLocation getInitialLocation initialSize
protected String get Dialog Settings Section Name return I DebugUI Constants PLUGIN ID MULTIPLE INPUT DIALOG 2 NON NLS 1  getDialogSettingsSectionName IDebugUIConstants PLUGIN_ID MULTIPLE_INPUT_DIALOG_2
see org eclipse jface window Window get Initial Size protected Point get Initial Size Point size super get Initial Size return Dialog Settings Helper get Initial Size get Dialog Settings Section Name size  getInitialSize getInitialSize getInitialSize DialogSettingsHelper getInitialSize getDialogSettingsSectionName
see org eclipse jface window Window close public boolean close Dialog Settings Helper persist Shell Geometry get Shell get Dialog Settings Section Name return super close  DialogSettingsHelper persistShellGeometry getShell getDialogSettingsSectionName
public Field Summary int type String name String initial Value boolean allows Empty this type type this name name this initial Value initial Value this allows Empty allows Empty  FieldSummary initialValue allowsEmpty initialValue initialValue allowsEmpty allowsEmpty
protected class Validator boolean validate return true 

public Object f First null public Object f Second null public Pair Object first Object second f First first f Second second  fFirst fSecond fFirst fSecond
String accessors public String first As String return String f First  firstAsString fFirst
return String f First public String second As String return String f Second  fFirst secondAsString fSecond
Integer accessors public Integer first As Integer return Integer f First  firstAsInteger fFirst
return Integer f First public Integer second As Integer return Integer f Second  fFirst secondAsInteger fSecond

public Pixel Converter Control control GC gc new GC control gc set Font control get Font f Font Metrics gc get Font Metrics gc dispose  PixelConverter setFont getFont fFontMetrics getFontMetrics
see Dialog Page convert Height In Chars To Pixels public int convert Height In Chars To Pixels int chars return Dialog convert Height In Chars To Pixels f Font Metrics chars  DialogPage convertHeightInCharsToPixels convertHeightInCharsToPixels convertHeightInCharsToPixels fFontMetrics
see Dialog Page convert HorizontalDL Us To Pixels public int convert HorizontalDL Us To Pixels int dlus return Dialog convert HorizontalDL Us To Pixels f Font Metrics dlus  DialogPage convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels fFontMetrics
see Dialog Page convert VerticalDL Us To Pixels public int convert VerticalDL Us To Pixels int dlus return Dialog convert VerticalDL Us To Pixels f Font Metrics dlus  DialogPage convertVerticalDLUsToPixels convertVerticalDLUsToPixels convertVerticalDLUsToPixels fFontMetrics
see Dialog Page convert Width In Chars To Pixels public int convert Width In Chars To Pixels int chars return Dialog convert Width In Chars To Pixels f Font Metrics chars  DialogPage convertWidthInCharsToPixels convertWidthInCharsToPixels convertWidthInCharsToPixels fFontMetrics

see Boolean Field Editor Boolean Field Editor java lang String java lang String int org eclipse swt widgets Composite public Boolean Field Editor2 String name String label Text int style Composite parent super name label Text style parent  BooleanFieldEditor BooleanFieldEditor BooleanFieldEditor2 labelText labelText
see Boolean Field Editor Boolean Field Editor java lang String java lang String org eclipse swt widgets Composite public Boolean Field Editor2 String name String label Composite parent super name label parent  BooleanFieldEditor BooleanFieldEditor BooleanFieldEditor2
see org eclipse jface preference Boolean Field Editor get Change Control Composite public Button get Change Control Composite parent if f Change Control null f Change Control super get Change Control parent return f Change Control  BooleanFieldEditor getChangeControl getChangeControl fChangeControl fChangeControl getChangeControl fChangeControl

protected class Console Integer Field Editor extends Integer Field Editor public Console Integer Field Editor String name String label Text Composite parent super name label Text parent  ConsoleIntegerFieldEditor IntegerFieldEditor ConsoleIntegerFieldEditor labelText labelText
see org eclipse jface preference Field Editor refresh Valid State protected void refresh Valid State super refresh Valid State  FieldEditor refreshValidState refreshValidState refreshValidState
Clears the error message from the message line if the error message is the error message from this field editor protected void clear Error Message if can Clear Error Message super clear Error Message  clearErrorMessage canClearErrorMessage clearErrorMessage
Create the console page public Console Preference Page super GRID set Description Debug Preferences Messages get String Console Preference Page Console settings NON NLS 1 set Preference Store DebugUI Plugin get Default get Preference Store  ConsolePreferencePage setDescription DebugPreferencesMessages getString ConsolePreferencePage Console_settings setPreferenceStore DebugUIPlugin getDefault getPreferenceStore
public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Debug Help Context Ids CONSOLE PREFERENCE PAGE  createControl createControl WorkbenchHelp setHelp getControl IDebugHelpContextIds CONSOLE_PREFERENCE_PAGE
f Wrap Editor get Change Control get Field Editor Parent add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Width Editor  fWrapEditor getChangeControl getFieldEditorParent addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateWidthEditor
f Use Buffer Size get Change Control get Field Editor Parent add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Buffer Size Editor  fUseBufferSize getChangeControl getFieldEditorParent addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateBufferSizeEditor
Create all field editors for this page public void create Field Editors f Wrap Editor new Boolean Field Editor2 I Debug Preference Constants CONSOLE WRAP Debug Preferences Messages get String Console Preference Page Wrap text 1 SWT NONE get Field Editor Parent NON NLS 1 add Field f Wrap Editor f Width Editor new Console Integer Field Editor I Debug Preference Constants CONSOLE WIDTH Debug Preferences Messages get String Console Preference Page Console width get Field Editor Parent NON NLS 1 add Field f Width Editor f Width Editor set Valid Range 80 Integer MAX VALUE 1 f Width Editor set Error Message Debug Preferences Messages get String Console Preference Page console width NON NLS 1 f Wrap Editor get Change Control get Field Editor Parent add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Width Editor f Use Buffer Size new Boolean Field Editor2 I Debug Preference Constants CONSOLE LIMIT CONSOLE OUTPUT Debug Preferences Messages get String Console Preference Page Limit console output 1 SWT NONE get Field Editor Parent NON NLS 1 add Field f Use Buffer Size f Buffer Size Editor new Console Integer Field Editor I Debug Preference Constants CONSOLE LOW WATER MARK Debug Preferences Messages get String Console Preference Page Console buffer size  characters   2 get Field Editor Parent NON NLS 1 add Field f Buffer Size Editor f Buffer Size Editor set Valid Range 1000 Integer MAX VALUE f Buffer Size Editor set Error Message Debug Preferences Messages get String Console Preference Page The console buffer size must be at least 1000 characters  1 NON NLS 1 f Use Buffer Size get Change Control get Field Editor Parent add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Buffer Size Editor f Tab Size Editor new Console Integer Field Editor I Debug Preference Constants CONSOLE TAB WIDTH Debug Preferences Messages get String Console Preference Page 12 get Field Editor Parent NON NLS 1 add Field f Tab Size Editor f Tab Size Editor set Valid Range 1 100 f Tab Size Editor set Error Message Debug Preferences Messages get String Console Preference Page 13 NON NLS 1 add Field new Boolean Field Editor I Debug Preference Constants CONSOLE OPEN ON OUT Debug Preferences Messages get String Console Preference Page Show  Console View when there is program output 3 SWT NONE get Field Editor Parent NON NLS 1 add Field new Boolean Field Editor I Debug Preference Constants CONSOLE OPEN ON ERR Debug Preferences Messages get String Console Preference Page Show  Console View when there is program error 3 SWT NONE get Field Editor Parent NON NLS 1 Color Field Editor sysout new Color Field Editor I Debug Preference Constants CONSOLE SYS OUT COLOR Debug Preferences Messages get String Console Preference Page Standard Out  2 get Field Editor Parent NON NLS 1 Color Field Editor syserr new Color Field Editor I Debug Preference Constants CONSOLE SYS ERR COLOR Debug Preferences Messages get String Console Preference Page Standard Error  3 get Field Editor Parent NON NLS 1 Color Field Editor sysin new Color Field Editor I Debug Preference Constants CONSOLE SYS IN COLOR Debug Preferences Messages get String Console Preference Page Standard In  4 get Field Editor Parent NON NLS 1 add Field sysout add Field syserr add Field sysin  createFieldEditors fWrapEditor BooleanFieldEditor2 IDebugPreferenceConstants CONSOLE_WRAP DebugPreferencesMessages getString ConsolePreferencePage Wrap_text_1 getFieldEditorParent addField fWrapEditor fWidthEditor ConsoleIntegerFieldEditor IDebugPreferenceConstants CONSOLE_WIDTH DebugPreferencesMessages getString ConsolePreferencePage Console_width getFieldEditorParent addField fWidthEditor fWidthEditor setValidRange MAX_VALUE fWidthEditor setErrorMessage DebugPreferencesMessages getString ConsolePreferencePage console_width fWrapEditor getChangeControl getFieldEditorParent addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateWidthEditor fUseBufferSize BooleanFieldEditor2 IDebugPreferenceConstants CONSOLE_LIMIT_CONSOLE_OUTPUT DebugPreferencesMessages getString ConsolePreferencePage Limit_console_output_1 getFieldEditorParent addField fUseBufferSize fBufferSizeEditor ConsoleIntegerFieldEditor IDebugPreferenceConstants CONSOLE_LOW_WATER_MARK DebugPreferencesMessages getString ConsolePreferencePage Console_buffer_size_ __2 getFieldEditorParent addField fBufferSizeEditor fBufferSizeEditor setValidRange MAX_VALUE fBufferSizeEditor setErrorMessage DebugPreferencesMessages getString ConsolePreferencePage The_console_buffer_size_must_be_at_least_1000_characters _1 fUseBufferSize getChangeControl getFieldEditorParent addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateBufferSizeEditor fTabSizeEditor ConsoleIntegerFieldEditor IDebugPreferenceConstants CONSOLE_TAB_WIDTH DebugPreferencesMessages getString ConsolePreferencePage getFieldEditorParent addField fTabSizeEditor fTabSizeEditor setValidRange fTabSizeEditor setErrorMessage DebugPreferencesMessages getString ConsolePreferencePage addField BooleanFieldEditor IDebugPreferenceConstants CONSOLE_OPEN_ON_OUT DebugPreferencesMessages getString ConsolePreferencePage Show_ Console_View_when_there_is_program_output_3 getFieldEditorParent addField BooleanFieldEditor IDebugPreferenceConstants CONSOLE_OPEN_ON_ERR DebugPreferencesMessages getString ConsolePreferencePage Show_ Console_View_when_there_is_program_error_3 getFieldEditorParent ColorFieldEditor ColorFieldEditor IDebugPreferenceConstants CONSOLE_SYS_OUT_COLOR DebugPreferencesMessages getString ConsolePreferencePage Standard_Out__2 getFieldEditorParent ColorFieldEditor ColorFieldEditor IDebugPreferenceConstants CONSOLE_SYS_ERR_COLOR DebugPreferencesMessages getString ConsolePreferencePage Standard_Error__3 getFieldEditorParent ColorFieldEditor ColorFieldEditor IDebugPreferenceConstants CONSOLE_SYS_IN_COLOR DebugPreferencesMessages getString ConsolePreferencePage Standard_In__4 getFieldEditorParent addField addField addField
see I Workbench Preference Page init I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
public boolean perform Ok boolean ok super perform Ok update high water mark to be about 100 lines 100 80 chars greater than low water mark I Preference Store store DebugUI Plugin get Default get Preference Store int low store get Int I Debug Preference Constants CONSOLE LOW WATER MARK int high low 8000 store set Value I Debug Preference Constants CONSOLE HIGH WATER MARK high DebugUI Plugin get Default save Plugin Preferences return ok  performOk performOk IPreferenceStore DebugUIPlugin getDefault getPreferenceStore getInt IDebugPreferenceConstants CONSOLE_LOW_WATER_MARK setValue IDebugPreferenceConstants CONSOLE_HIGH_WATER_MARK DebugUIPlugin getDefault savePluginPreferences
see org eclipse jface preference Field Editor Preference Page initialize protected void initialize super initialize update Width Editor update Buffer Size Editor  FieldEditorPreferencePage updateWidthEditor updateBufferSizeEditor
Update enablement of width editor based on enablement of fixed width editor protected void update Width Editor Button b f Wrap Editor get Change Control get Field Editor Parent f Width Editor get Text Control get Field Editor Parent set Enabled b get Selection f Width Editor get Label Control get Field Editor Parent set Enabled b get Selection  updateWidthEditor fWrapEditor getChangeControl getFieldEditorParent fWidthEditor getTextControl getFieldEditorParent setEnabled getSelection fWidthEditor getLabelControl getFieldEditorParent setEnabled getSelection
Update enablement of buffer size editor based on enablement of limit console output editor protected void update Buffer Size Editor Button b f Use Buffer Size get Change Control get Field Editor Parent f Buffer Size Editor get Text Control get Field Editor Parent set Enabled b get Selection f Buffer Size Editor get Label Control get Field Editor Parent set Enabled b get Selection  updateBufferSizeEditor fUseBufferSize getChangeControl getFieldEditorParent fBufferSizeEditor getTextControl getFieldEditorParent setEnabled getSelection fBufferSizeEditor getLabelControl getFieldEditorParent setEnabled getSelection
see org eclipse jface preference Preference Page perform Defaults protected void perform Defaults super perform Defaults update Width Editor  PreferencePage performDefaults performDefaults performDefaults updateWidthEditor
protected boolean can Clear Error Message if f Width Editor is Valid f Buffer Size Editor is Valid return true return false  canClearErrorMessage fWidthEditor isValid fBufferSizeEditor isValid
see org eclipse jface util I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event if event get Property equals Field Editor IS VALID boolean new Value Boolean event get New Value boolean Value If the new value is true then we must check all field editors If it is false then the page is invalid in any case if new Value if f Width Editor null event get Source f Width Editor f Width Editor refresh Valid State if f Buffer Size Editor null event get Source f Buffer Size Editor f Buffer Size Editor refresh Valid State check State else super property Change event else super property Change event  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent getProperty FieldEditor IS_VALID newValue getNewValue booleanValue newValue fWidthEditor getSource fWidthEditor fWidthEditor refreshValidState fBufferSizeEditor getSource fBufferSizeEditor fBufferSizeEditor refreshValidState checkState propertyChange propertyChange

public Debug Preference Page super GRID I Preference Store store DebugUI Plugin get Default get Preference Store set Preference Store store set Description Debug Preferences Messages get String Debug Preference Page 1 NON NLS 1  DebugPreferencePage IPreferenceStore DebugUIPlugin getDefault getPreferenceStore setPreferenceStore setDescription DebugPreferencesMessages getString DebugPreferencePage
see org eclipse jface preference Preference Page create Control Composite public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Debug Help Context Ids DEBUG PREFERENCE PAGE  PreferencePage createControl createControl createControl WorkbenchHelp setHelp getControl IDebugHelpContextIds DEBUG_PREFERENCE_PAGE
see Field Editor Preference Page create Field Editors protected void create Field Editors add Field new Boolean Field Editor I DebugUI Constants PREF REUSE EDITOR Debug Preferences Messages get String Debug Preference Page 2 SWT NONE get Field Editor Parent NON NLS 1 create Spacer get Field Editor Parent 2 add Field new Boolean Field Editor I DebugUI Constants PREF ACTIVATE WORKBENCH Debug Preferences Messages get String Debug Preference Page 3 SWT NONE get Field Editor Parent NON NLS 1 add Field new Boolean Field Editor I Internal DebugUI Constants PREF ACTIVATE DEBUG VIEW Debug Preferences Messages get String Debug Preference Page 26 SWT NONE get Field Editor Parent NON NLS 1 create Switch Perspective On Suspend Editor create Spacer get Field Editor Parent 2 add Field new Boolean Field Editor I DebugUI Constants PREF SKIP BREAKPOINTS DURING RUN TO LINE Debug Preferences Messages get String Debug Preference Page 25 SWT NONE get Field Editor Parent NON NLS 1 create Spacer get Field Editor Parent 2 Color Field Editor mem new Color Field Editor I Debug Preference Constants CHANGED VARIABLE COLOR Debug Preferences Messages get String Debug Preference Page 4 get Field Editor Parent NON NLS 1 add Field mem mem new Color Field Editor I Debug Preference Constants MEMORY VIEW UNBUFFERED LINE COLOR Debug Preferences Messages get String Debug Preference Page 0 get Field Editor Parent NON NLS 1 add Field mem  FieldEditorPreferencePage createFieldEditors createFieldEditors addField BooleanFieldEditor IDebugUIConstants PREF_REUSE_EDITOR DebugPreferencesMessages getString DebugPreferencePage getFieldEditorParent createSpacer getFieldEditorParent addField BooleanFieldEditor IDebugUIConstants PREF_ACTIVATE_WORKBENCH DebugPreferencesMessages getString DebugPreferencePage getFieldEditorParent addField BooleanFieldEditor IInternalDebugUIConstants PREF_ACTIVATE_DEBUG_VIEW DebugPreferencesMessages getString DebugPreferencePage getFieldEditorParent createSwitchPerspectiveOnSuspendEditor createSpacer getFieldEditorParent addField BooleanFieldEditor IDebugUIConstants PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE DebugPreferencesMessages getString DebugPreferencePage getFieldEditorParent createSpacer getFieldEditorParent ColorFieldEditor ColorFieldEditor IDebugPreferenceConstants CHANGED_VARIABLE_COLOR DebugPreferencesMessages getString DebugPreferencePage getFieldEditorParent addField ColorFieldEditor IDebugPreferenceConstants MEMORY_VIEW_UNBUFFERED_LINE_COLOR DebugPreferencesMessages getString DebugPreferencePage getFieldEditorParent addField
see I Workbench Preference Page init I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
private void create Switch Perspective On Suspend Editor add Field new Radio Group Field Editor I Internal DebugUI Constants PREF SWITCH PERSPECTIVE ON SUSPEND Debug Preferences Messages get String Debug Preference Page 21 3 NON NLS 1 new String Debug Preferences Messages get String Debug Preference Page 22 Message Dialog With Toggle ALWAYS NON NLS 1 Debug Preferences Messages get String Debug Preference Page 23 Message Dialog With Toggle NEVER NON NLS 1 Debug Preferences Messages get String Debug Preference Page 24 Message Dialog With Toggle PROMPT NON NLS 1 get Field Editor Parent true  createSwitchPerspectiveOnSuspendEditor addField RadioGroupFieldEditor IInternalDebugUIConstants PREF_SWITCH_PERSPECTIVE_ON_SUSPEND DebugPreferencesMessages getString DebugPreferencePage DebugPreferencesMessages getString DebugPreferencePage MessageDialogWithToggle DebugPreferencesMessages getString DebugPreferencePage MessageDialogWithToggle DebugPreferencesMessages getString DebugPreferencePage MessageDialogWithToggle getFieldEditorParent
protected void create Spacer Composite composite int column Span Label label new Label composite SWT NONE Grid Data gd new Grid Data gd horizontal Span column Span label set Layout Data gd  createSpacer columnSpan GridData GridData horizontalSpan columnSpan setLayoutData
public boolean perform Ok boolean ok super perform Ok DebugUI Plugin get Default save Plugin Preferences return ok  performOk performOk DebugUIPlugin getDefault savePluginPreferences

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Debug Preferences Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE DebugPreferencesMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

public Launching Preference Page super GRID I Preference Store store DebugUI Plugin get Default get Preference Store set Preference Store store set Description Debug Preferences Messages get String Launching Preference Page 20 NON NLS 1  LaunchingPreferencePage IPreferenceStore DebugUIPlugin getDefault getPreferenceStore setPreferenceStore setDescription DebugPreferencesMessages getString LaunchingPreferencePage
protected void create Field Editors add Field new Boolean Field Editor I DebugUI Constants PREF BUILD BEFORE LAUNCH Debug Preferences Messages get String Launching Preference Page 1 SWT NONE get Field Editor Parent NON NLS 1 create Save Before Launch Editors create Wait For Build Editor create Spacer get Field Editor Parent 2 add Field new Boolean Field Editor I DebugUI Constants PREF AUTO REMOVE OLD LAUNCHES Debug Preferences Messages get String Launching Preference Page 10 SWT NONE get Field Editor Parent NON NLS 1 create Switch Perspective Editor create Relaunch In Debug Mode create Continue With Compile Errors create Launch History Editor  createFieldEditors addField BooleanFieldEditor IDebugUIConstants PREF_BUILD_BEFORE_LAUNCH DebugPreferencesMessages getString LaunchingPreferencePage getFieldEditorParent createSaveBeforeLaunchEditors createWaitForBuildEditor createSpacer getFieldEditorParent addField BooleanFieldEditor IDebugUIConstants PREF_AUTO_REMOVE_OLD_LAUNCHES DebugPreferencesMessages getString LaunchingPreferencePage getFieldEditorParent createSwitchPerspectiveEditor createRelaunchInDebugMode createContinueWithCompileErrors createLaunchHistoryEditor
protected void create Spacer Composite composite int column Span Label label new Label composite SWT NONE Grid Data gd new Grid Data gd horizontal Span column Span label set Layout Data gd  createSpacer columnSpan GridData GridData horizontalSpan columnSpan setLayoutData
editor set Valid Range 1 history Max editor set Property Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals Field Editor IS VALID set Valid editor is Valid  setValidRange historyMax setPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty FieldEditor IS_VALID setValid isValid
private void create Launch History Editor final Integer Field Editor editor new Integer Field Editor I DebugUI Constants PREF MAX HISTORY SIZE Debug Preferences Messages get String Debug Preference Page 10 get Field Editor Parent NON NLS 1 int history Max I Debug Preference Constants MAX LAUNCH HISTORY SIZE editor set Text Limit Integer to String history Max length editor set Error Message Message Format format Debug Preferences Messages get String Debug Preference Page 11 new Object new Integer 1 new Integer history Max NON NLS 1 editor set Validate Strategy String Field Editor VALIDATE ON KEY STROKE editor set Valid Range 1 history Max editor set Property Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals Field Editor IS VALID set Valid editor is Valid add Field editor  createLaunchHistoryEditor IntegerFieldEditor IntegerFieldEditor IDebugUIConstants PREF_MAX_HISTORY_SIZE DebugPreferencesMessages getString DebugPreferencePage getFieldEditorParent historyMax IDebugPreferenceConstants MAX_LAUNCH_HISTORY_SIZE setTextLimit toString historyMax setErrorMessage MessageFormat DebugPreferencesMessages getString DebugPreferencePage historyMax setValidateStrategy StringFieldEditor VALIDATE_ON_KEY_STROKE setValidRange historyMax setPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty FieldEditor IS_VALID setValid isValid addField
private void create Save Before Launch Editors add Field new Radio Group Field Editor I Internal DebugUI Constants PREF SAVE DIRTY EDITORS BEFORE LAUNCH Debug Preferences Messages get String Launching Preference Page 2 3 NON NLS 1 new String Debug Preferences Messages get String Launching Preference Page 3 Message Dialog With Toggle ALWAYS NON NLS 1 Debug Preferences Messages get String Launching Preference Page 4 Message Dialog With Toggle NEVER NON NLS 1 Debug Preferences Messages get String Launching Preference Page 5 Message Dialog With Toggle PROMPT NON NLS 1 get Field Editor Parent true  createSaveBeforeLaunchEditors addField RadioGroupFieldEditor IInternalDebugUIConstants PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH DebugPreferencesMessages getString LaunchingPreferencePage DebugPreferencesMessages getString LaunchingPreferencePage MessageDialogWithToggle DebugPreferencesMessages getString LaunchingPreferencePage MessageDialogWithToggle DebugPreferencesMessages getString LaunchingPreferencePage MessageDialogWithToggle getFieldEditorParent
private void create Wait For Build Editor add Field new Radio Group Field Editor I Internal DebugUI Constants PREF WAIT FOR BUILD Debug Preferences Messages get String Launching Preference Page 6 3 NON NLS 1 new String Debug Preferences Messages get String Launching Preference Page 7 Message Dialog With Toggle ALWAYS NON NLS 1 Debug Preferences Messages get String Launching Preference Page 8 Message Dialog With Toggle NEVER NON NLS 1 Debug Preferences Messages get String Launching Preference Page 9 Message Dialog With Toggle PROMPT NON NLS 1 get Field Editor Parent true  createWaitForBuildEditor addField RadioGroupFieldEditor IInternalDebugUIConstants PREF_WAIT_FOR_BUILD DebugPreferencesMessages getString LaunchingPreferencePage DebugPreferencesMessages getString LaunchingPreferencePage MessageDialogWithToggle DebugPreferencesMessages getString LaunchingPreferencePage MessageDialogWithToggle DebugPreferencesMessages getString LaunchingPreferencePage MessageDialogWithToggle getFieldEditorParent
private void create Switch Perspective Editor add Field new Radio Group Field Editor I Internal DebugUI Constants PREF SWITCH TO PERSPECTIVE Debug Preferences Messages get String Launching Preference Page 11 3 NON NLS 1 new String Debug Preferences Messages get String Launching Preference Page 12 Message Dialog With Toggle ALWAYS NON NLS 1 Debug Preferences Messages get String Launching Preference Page 13 Message Dialog With Toggle NEVER NON NLS 1 Debug Preferences Messages get String Launching Preference Page 14 Message Dialog With Toggle PROMPT NON NLS 1 get Field Editor Parent true  createSwitchPerspectiveEditor addField RadioGroupFieldEditor IInternalDebugUIConstants PREF_SWITCH_TO_PERSPECTIVE DebugPreferencesMessages getString LaunchingPreferencePage DebugPreferencesMessages getString LaunchingPreferencePage MessageDialogWithToggle DebugPreferencesMessages getString LaunchingPreferencePage MessageDialogWithToggle DebugPreferencesMessages getString LaunchingPreferencePage MessageDialogWithToggle getFieldEditorParent
private void create Relaunch In Debug Mode add Field new Radio Group Field Editor I Internal DebugUI Constants PREF RELAUNCH IN DEBUG MODE Debug Preferences Messages get String Launching Preference Page 15 3 NON NLS 1 new String Debug Preferences Messages get String Launching Preference Page 16 Message Dialog With Toggle ALWAYS NON NLS 1 Debug Preferences Messages get String Launching Preference Page 17 Message Dialog With Toggle NEVER NON NLS 1 Debug Preferences Messages get String Launching Preference Page 18 Message Dialog With Toggle PROMPT NON NLS 1 get Field Editor Parent true  createRelaunchInDebugMode addField RadioGroupFieldEditor IInternalDebugUIConstants PREF_RELAUNCH_IN_DEBUG_MODE DebugPreferencesMessages getString LaunchingPreferencePage DebugPreferencesMessages getString LaunchingPreferencePage MessageDialogWithToggle DebugPreferencesMessages getString LaunchingPreferencePage MessageDialogWithToggle DebugPreferencesMessages getString LaunchingPreferencePage MessageDialogWithToggle getFieldEditorParent
private void create Continue With Compile Errors add Field new Radio Group Field Editor I Internal DebugUI Constants PREF CONTINUE WITH COMPILE ERROR Debug Preferences Messages get String Launching Preference Page 21 2 NON NLS 1 new String Debug Preferences Messages get String Launching Preference Page 22 Message Dialog With Toggle ALWAYS NON NLS 1 Debug Preferences Messages get String Launching Preference Page 23 Message Dialog With Toggle PROMPT NON NLS 1 get Field Editor Parent true  createContinueWithCompileErrors addField RadioGroupFieldEditor IInternalDebugUIConstants PREF_CONTINUE_WITH_COMPILE_ERROR DebugPreferencesMessages getString LaunchingPreferencePage DebugPreferencesMessages getString LaunchingPreferencePage MessageDialogWithToggle DebugPreferencesMessages getString LaunchingPreferencePage MessageDialogWithToggle getFieldEditorParent
see org eclipse ui I Workbench Preference Page init org eclipse ui I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench

Constructor for Process Property Page public Process Property Page super  ProcessPropertyPage ProcessPropertyPage
see Preference Page create Contents Composite protected Control create Contents Composite ancestor Font font ancestor get Font no Default And Apply Button Composite parent new Composite ancestor SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 parent set Layout layout Label l1 new Label parent SWT NULL l1 set Text Debug Preferences Messages get String Process Property Page Command Line  1 NON NLS 1 Grid Data gd new Grid Data gd vertical Alignment Grid Data BEGINNING l1 set Layout Data gd l1 set Font font Text l2 new Text parent SWT WRAP SWT BORDER SWT V SCROLL SWT READ ONLY gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint convert Width In Chars To Pixels 80 gd height Hint convert Height In Chars To Pixels 15 l2 set Layout Data gd l2 set Font font init Command Line Label l2 return parent  PreferencePage createContents createContents getFont noDefaultAndApplyButton GridLayout GridLayout numColumns setLayout setText DebugPreferencesMessages getString ProcessPropertyPage Command_Line__1 GridData GridData verticalAlignment GridData setLayoutData setFont V_SCROLL READ_ONLY GridData GridData FILL_HORIZONTAL widthHint convertWidthInCharsToPixels heightHint convertHeightInCharsToPixels setLayoutData setFont initCommandLineLabel
private void init Command Line Label Text l Object o get Element if o instanceof I Debug Target o I Debug Target o get Process if o instanceof I Process I Process process I Process o String cmd Line process get Attribute I Process ATTR CMDLINE if cmd Line null l set Text cmd Line  initCommandLineLabel getElement IDebugTarget IDebugTarget getProcess IProcess IProcess IProcess cmdLine getAttribute IProcess ATTR_CMDLINE cmdLine setText cmdLine
public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Debug Help Context Ids PROCESS PROPERTY PAGE  createControl createControl WorkbenchHelp setHelp getControl IDebugHelpContextIds PROCESS_PROPERTY_PAGE

public String Variable Preference Page set Description Debug Preferences Messages get String Simple Variable Preference Page 6 NON NLS 1  StringVariablePreferencePage setDescription DebugPreferencesMessages getString SimpleVariablePreferencePage
see Preference Page create Control Composite public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Debug Help Context Ids SIMPLE VARIABLE PREFERENCE PAGE  PreferencePage createControl createControl createControl WorkbenchHelp setHelp getControl IDebugHelpContextIds SIMPLE_VARIABLE_PREFERENCE_PAGE
protected Control create Contents Composite parent no Default And Apply Button Font font parent get Font The main composite Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 2 composite set Layout layout composite set Font font create Table composite create Buttons composite return composite  createContents noDefaultAndApplyButton getFont GridLayout GridLayout marginHeight marginWidth numColumns setLayout setFont createTable createButtons
variable Table set Sorter new Viewer Sorter public int compare Viewer i Viewer Object e1 Object e2 if e1 null return 1 else if e2 null return 1 else return I Value Variable e1 get Name compare To Ignore Case I Value Variable e2 get Name  variableTable setSorter ViewerSorter iViewer IValueVariable getName compareToIgnoreCase IValueVariable getName
variable Table add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Table Selection Changed event  variableTable addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleTableSelectionChanged
variable Table add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if variable Table get Selection is Empty handle Edit Button Pressed  variableTable addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent variableTable getSelection isEmpty handleEditButtonPressed
variable Table get Table add Key Listener new Key Adapter public void key Pressed Key Event event if event character SWT DEL event state Mask 0 handle Remove Button Pressed  variableTable getTable addKeyListener KeyAdapter keyPressed KeyEvent stateMask handleRemoveButtonPressed
Creates and configures the table containing launch configuration variables and their associated value private void create Table Composite parent Font font parent get Font Create table composite Composite table Composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 1 Grid Data grid Data new Grid Data Grid Data FILL BOTH grid Data height Hint 150 grid Data width Hint 400 table Composite set Layout layout table Composite set Layout Data grid Data table Composite set Font font Create table variable Table new Table Viewer table Composite SWT BORDER SWT H SCROLL SWT V SCROLL SWT MULTI SWT FULL SELECTION Table table variable Table get Table Table Layout table Layout new Table Layout table set Layout table Layout table set Header Visible true table set Lines Visible true table set Font font grid Data new Grid Data Grid Data FILL BOTH variable Table get Control set Layout Data grid Data variable Table set Content Provider variable Content Provider variable Table set Column Properties variable Table Column Properties variable Table set Sorter new Viewer Sorter public int compare Viewer i Viewer Object e1 Object e2 if e1 null return 1 else if e2 null return 1 else return I Value Variable e1 get Name compare To Ignore Case I Value Variable e2 get Name variable Table add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Table Selection Changed event variable Table add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if variable Table get Selection is Empty handle Edit Button Pressed variable Table get Table add Key Listener new Key Adapter public void key Pressed Key Event event if event character SWT DEL event state Mask 0 handle Remove Button Pressed Create columns for int i 0 i variable Table Column Headers length i table Layout add Column Data variable Table Column Layouts i Table Column tc new Table Column table SWT NONE i tc set Resizable variable Table Column Layouts i resizable tc set Text variable Table Column Headers i variable Table set Input get Variable Manager variable Table set Label Provider new Simple Variable Label Provider  createTable getFont tableComposite GridLayout GridLayout marginHeight marginWidth numColumns GridData gridData GridData GridData FILL_BOTH gridData heightHint gridData widthHint tableComposite setLayout tableComposite setLayoutData gridData tableComposite setFont variableTable TableViewer tableComposite H_SCROLL V_SCROLL FULL_SELECTION variableTable getTable TableLayout tableLayout TableLayout setLayout tableLayout setHeaderVisible setLinesVisible setFont gridData GridData GridData FILL_BOTH variableTable getControl setLayoutData gridData variableTable setContentProvider variableContentProvider variableTable setColumnProperties variableTableColumnProperties variableTable setSorter ViewerSorter iViewer IValueVariable getName compareToIgnoreCase IValueVariable getName variableTable addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleTableSelectionChanged variableTable addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent variableTable getSelection isEmpty handleEditButtonPressed variableTable getTable addKeyListener KeyAdapter keyPressed KeyEvent stateMask handleRemoveButtonPressed variableTableColumnHeaders tableLayout addColumnData variableTableColumnLayouts TableColumn TableColumn setResizable variableTableColumnLayouts setText variableTableColumnHeaders variableTable setInput getVariableManager variableTable setLabelProvider SimpleVariableLabelProvider
env Add Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Add Button Pressed  envAddButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAddButtonPressed
env Edit Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Edit Button Pressed  envEditButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleEditButtonPressed
env Remove Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Remove Button Pressed  envRemoveButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleRemoveButtonPressed
Creates the new edit remove buttons for the variable table param parent the composite in which the buttons should be created private void create Buttons Composite parent Create button composite Composite button Composite new Composite parent SWT NONE Grid Layout glayout new Grid Layout glayout margin Height 0 glayout margin Width 0 glayout num Columns 1 Grid Data gdata new Grid Data Grid Data VERTICAL ALIGN BEGINNING button Composite set Layout glayout button Composite set Layout Data gdata button Composite set Font parent get Font Create buttons env Add Button SWT Util create Push Button button Composite Debug Preferences Messages get String Simple Variable Preference Page 7 null NON NLS 1 env Add Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Add Button Pressed env Edit Button SWT Util create Push Button button Composite Debug Preferences Messages get String Simple Variable Preference Page 8 null NON NLS 1 env Edit Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Edit Button Pressed env Edit Button set Enabled false env Remove Button SWT Util create Push Button button Composite Debug Preferences Messages get String Simple Variable Preference Page 9 null NON NLS 1 env Remove Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Remove Button Pressed env Remove Button set Enabled false  createButtons buttonComposite GridLayout GridLayout marginHeight marginWidth numColumns GridData GridData GridData VERTICAL_ALIGN_BEGINNING buttonComposite setLayout buttonComposite setLayoutData buttonComposite setFont getFont envAddButton SWTUtil createPushButton buttonComposite DebugPreferencesMessages getString SimpleVariablePreferencePage envAddButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAddButtonPressed envEditButton SWTUtil createPushButton buttonComposite DebugPreferencesMessages getString SimpleVariablePreferencePage envEditButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleEditButtonPressed envEditButton setEnabled envRemoveButton SWTUtil createPushButton buttonComposite DebugPreferencesMessages getString SimpleVariablePreferencePage envRemoveButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleRemoveButtonPressed envRemoveButton setEnabled
private void handle Add Button Pressed Multiple Input Dialog dialog new Multiple Input Dialog get Shell Debug Preferences Messages get String Simple Variable Preference Page 13 NON NLS 1 dialog add Text Field NAME LABEL null false dialog add Browse Field VALUE LABEL null true dialog add Text Field DESCRIPTION LABEL null true if dialog open Window OK return String name dialog get String Value NAME LABEL trim if name null name length 0 String description dialog get String Value DESCRIPTION LABEL I Value Variable variable get Variable Manager new Value Variable name description variable set Value dialog get String Value VALUE LABEL add Variable variable  handleAddButtonPressed MultipleInputDialog MultipleInputDialog getShell DebugPreferencesMessages getString SimpleVariablePreferencePage addTextField NAME_LABEL addBrowseField VALUE_LABEL addTextField DESCRIPTION_LABEL getStringValue NAME_LABEL getStringValue DESCRIPTION_LABEL IValueVariable getVariableManager newValueVariable setValue getStringValue VALUE_LABEL addVariable
Attempts to add the given variable Returns whether the variable was added or not as when the user answers not to overwrite an existing variable param variable the variable to add return whether the variable was added public boolean add Variable I Value Variable variable String name variable get Name List edited Variables variable Content Provider get Variables Iterator iter edited Variables iterator while iter has Next I Value Variable current Variable I Value Variable iter next String variable Name current Variable get Name if variable Name equals name boolean over Write Message Dialog open Question get Shell Debug Preferences Messages get String Simple Variable Preference Page 15 Message Format format Debug Preferences Messages get String Simple Variable Preference Page 16 new String name NON NLS 1 NON NLS 2 if over Write return false variable Content Provider remove Variables new I Value Variable current Variable break variable Content Provider add Variables new I Value Variable variable variable Table refresh return true  addVariable IValueVariable getName editedVariables variableContentProvider getVariables editedVariables hasNext IValueVariable currentVariable IValueVariable variableName currentVariable getName variableName overWrite MessageDialog openQuestion getShell DebugPreferencesMessages getString SimpleVariablePreferencePage MessageFormat DebugPreferencesMessages getString SimpleVariablePreferencePage overWrite variableContentProvider removeVariables IValueVariable currentVariable variableContentProvider addVariables IValueVariable variableTable
private void handle Edit Button Pressed I Structured Selection selection I Structured Selection variable Table get Selection I Value Variable variable I Value Variable selection get First Element if variable null return String value variable get Value if value null value NON NLS 1 String description variable get Description if description null description NON NLS 1 String original Name variable get Name Multiple Input Dialog dialog new Multiple Input Dialog get Shell Debug Preferences Messages get String Simple Variable Preference Page 14 NON NLS 1 dialog add Text Field NAME LABEL original Name false dialog add Browse Field VALUE LABEL value true dialog add Text Field DESCRIPTION LABEL description true if dialog open Window OK String name dialog get String Value NAME LABEL value dialog get String Value VALUE LABEL description dialog get String Value DESCRIPTION LABEL if name equals original Name I Value Variable new Variable get Variable Manager new Value Variable name description new Variable set Value value if add Variable new Variable variable Content Provider remove Variables new I Value Variable variable variable Table refresh else if value null variable set Value value if description null variable set Description description variable Table update variable null  handleEditButtonPressed IStructuredSelection IStructuredSelection variableTable getSelection IValueVariable IValueVariable getFirstElement getValue getDescription originalName getName MultipleInputDialog MultipleInputDialog getShell DebugPreferencesMessages getString SimpleVariablePreferencePage addTextField NAME_LABEL originalName addBrowseField VALUE_LABEL addTextField DESCRIPTION_LABEL getStringValue NAME_LABEL getStringValue VALUE_LABEL getStringValue DESCRIPTION_LABEL originalName IValueVariable newVariable getVariableManager newValueVariable newVariable setValue addVariable newVariable variableContentProvider removeVariables IValueVariable variableTable setValue setDescription variableTable
Remove the selection variables private void handle Remove Button Pressed I Structured Selection selection I Structured Selection variable Table get Selection List variables To Remove selection to List String Buffer contributed Variables To Remove new String Buffer Iterator iter variables To Remove iterator while iter has Next I Value Variable variable I Value Variable iter next if variable is Contributed contributed Variables To Remove append t append variable get Name append n if contributed Variables To Remove length 0 boolean remove Message Dialog open Question get Shell Debug Preferences Messages get String Simple Launch Variable Preference Page 21 Message Format format Debug Preferences Messages get String Simple Launch Variable Preference Page 22 new String contributed Variables To Remove to String NON NLS 1 NON NLS 2 if remove return I Value Variable variables I Value Variable variables To Remove to Array new I Value Variable 0 variable Content Provider remove Variables variables variable Table refresh  handleRemoveButtonPressed IStructuredSelection IStructuredSelection variableTable getSelection variablesToRemove toList StringBuffer contributedVariablesToRemove StringBuffer variablesToRemove hasNext IValueVariable IValueVariable isContributed contributedVariablesToRemove getName contributedVariablesToRemove MessageDialog openQuestion getShell DebugPreferencesMessages getString SimpleLaunchVariablePreferencePage MessageFormat DebugPreferencesMessages getString SimpleLaunchVariablePreferencePage contributedVariablesToRemove toString IValueVariable IValueVariable variablesToRemove toArray IValueVariable variableContentProvider removeVariables variableTable
Responds to a selection changed event in the variable table param event the selection change event protected void handle Table Selection Changed Selection Changed Event event int size I Structured Selection event get Selection size env Edit Button set Enabled size 1 env Remove Button set Enabled size 0  handleTableSelectionChanged SelectionChangedEvent IStructuredSelection getSelection envEditButton setEnabled envRemoveButton setEnabled
public void init I Workbench workbench  IWorkbench
Clear the variables protected void perform Defaults variable Content Provider discard Changes variable Table refresh super perform Defaults  performDefaults variableContentProvider discardChanges variableTable performDefaults
Sets the saved state for reversion public boolean perform Ok variable Content Provider save Changes return super perform Ok  performOk variableContentProvider saveChanges performOk
Returns the Debug Plugin s singleton instance of the launch variable manager return the singleton instance of the simple variable registry private I String Variable Manager get Variable Manager return Variables Plugin get Default get String Variable Manager  DebugPlugin IStringVariableManager getVariableManager VariablesPlugin getDefault getStringVariableManager
private List f Variables new Array List public Object get Elements Object input Element return f Variables to Array  fVariables ArrayList getElements inputElement fVariables toArray
Removes the given variables from the copied list param variables variables to remove public void remove Variables I Value Variable variables for int i 0 i variables length i f Variables remove variables i  removeVariables IValueVariable fVariables
Adds the given variables to the copied list param variables variables to add public void add Variables I Value Variable variables for int i 0 i variables length i f Variables add variables i  addVariables IValueVariable fVariables
public void dispose 
public void input Changed Viewer viewer Object old Input Object new Input if new Input null new Input instanceof I String Variable Manager return discard Changes  inputChanged oldInput newInput newInput newInput IStringVariableManager discardChanges
Saves the edited variable state to the variable manager public void save Changes I String Variable Manager manager get Variable Manager manager remove Variables manager get Value Variables try manager add Variables I Value Variable f Variables to Array new I Value Variable 0 catch Core Exception e DebugUI Plugin error Dialog get Shell Debug Preferences Messages get String String Variable Preference Page 24 Debug Preferences Messages get String String Variable Preference Page 25 e get Status NON NLS 1 NON NLS 2  saveChanges IStringVariableManager getVariableManager removeVariables getValueVariables addVariables IValueVariable fVariables toArray IValueVariable CoreException DebugUIPlugin errorDialog getShell DebugPreferencesMessages getString StringVariablePreferencePage DebugPreferencesMessages getString StringVariablePreferencePage getStatus
Re initializes to the variables currently stored in the manager public void discard Changes I String Variable Manager manager get Variable Manager I Value Variable variables manager get Value Variables for int i 0 i variables length i I Value Variable variable variables i I Value Variable copy manager new Value Variable variable get Name variable get Description copy set Value variable get Value f Variables add copy  discardChanges IStringVariableManager getVariableManager IValueVariable getValueVariables IValueVariable IValueVariable newValueVariable getName getDescription setValue getValue fVariables
Returns the working set of variables return the working set of variables not yet saved public List get Variables return f Variables  getVariables fVariables
private class Simple Variable Label Provider extends Label Provider implements I Table Label Provider I Color Provider public Image get Column Image Object element int column Index return null  SimpleVariableLabelProvider LabelProvider ITableLabelProvider IColorProvider getColumnImage columnIndex
public String get Column Text Object element int column Index if element instanceof I Value Variable I Value Variable variable I Value Variable element switch column Index case 0 String Buffer buffer new String Buffer variable get Name if variable is Contributed buffer append Debug Preferences Messages get String Simple Launch Variable Preference Page 23 NON NLS 1 return buffer to String case 1 String value variable get Value if value null value NON NLS 1 return value case 2 String description variable get Description if description null description NON NLS 1 return description return null  getColumnText columnIndex IValueVariable IValueVariable IValueVariable columnIndex StringBuffer StringBuffer getName isContributed DebugPreferencesMessages getString SimpleLaunchVariablePreferencePage toString getValue getDescription
return null public Color get Foreground Object element return null  getForeground
public Color get Background Object element if element instanceof I Value Variable if I Value Variable element is Contributed Display display Display get Current return display get System Color SWT COLOR INFO BACKGROUND return null  getBackground IValueVariable IValueVariable isContributed getCurrent getSystemColor COLOR_INFO_BACKGROUND

public View Management Preference Page super set Title Debug Preferences Messages get String View Management Preference Page 1 NON NLS 1 set Description Debug Preferences Messages get String View Management Preference Page 0 NON NLS 1 set Preference Store DebugUI Tools get Preference Store  ViewManagementPreferencePage setTitle DebugPreferencesMessages getString ViewManagementPreferencePage setDescription DebugPreferencesMessages getString ViewManagementPreferencePage setPreferenceStore DebugUITools getPreferenceStore
protected Control create Contents Composite parent Composite composite new Composite parent SWT NONE composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL BOTH composite set Font parent get Font create Perspective Viewer composite create View Tracking Options composite Dialog apply Dialog Font composite return composite  createContents setLayout GridLayout setLayoutData GridData GridData FILL_BOTH setFont getFont createPerspectiveViewer createViewTrackingOptions applyDialogFont
Grid Data f Reset Views Button get Layout Data horizontal Alignment Grid Data BEGINNING f Reset Views Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Reset Pressed true f Reset Views Button set Enabled false  GridData fResetViewsButton getLayoutData horizontalAlignment GridData fResetViewsButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fResetPressed fResetViewsButton setEnabled
param composite private void create View Tracking Options Composite composite f Track Views Button new Button composite SWT CHECK f Track Views Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Track Views Button set Text Debug Preferences Messages get String View Management Preference Page 3 NON NLS 1 f Track Views Button set Selection DebugUI Tools get Preference Store get Boolean I Internal DebugUI Constants PREF TRACK VIEWS Label label new Label composite SWT WRAP label set Text Debug Preferences Messages get String View Management Preference Page 4 NON NLS 1 label set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Reset Views Button SWT Util create Push Button composite Debug Preferences Messages get String View Management Preference Page 5 null NON NLS 1 Grid Data f Reset Views Button get Layout Data horizontal Alignment Grid Data BEGINNING f Reset Views Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Reset Pressed true f Reset Views Button set Enabled false update Reset Button  createViewTrackingOptions fTrackViewsButton fTrackViewsButton setLayoutData GridData GridData FILL_HORIZONTAL fTrackViewsButton setText DebugPreferencesMessages getString ViewManagementPreferencePage fTrackViewsButton setSelection DebugUITools getPreferenceStore getBoolean IInternalDebugUIConstants PREF_TRACK_VIEWS setText DebugPreferencesMessages getString ViewManagementPreferencePage setLayoutData GridData GridData FILL_HORIZONTAL fResetViewsButton SWTUtil createPushButton DebugPreferencesMessages getString ViewManagementPreferencePage GridData fResetViewsButton getLayoutData horizontalAlignment GridData fResetViewsButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fResetPressed fResetViewsButton setEnabled updateResetButton
param parent private void create Perspective Viewer Composite parent Label label new Label parent SWT WRAP label set Text Debug Preferences Messages get String View Management Preference Page 2 NON NLS 1 label set Layout Data new Grid Data Grid Data FILL HORIZONTAL Table table new Table parent SWT CHECK SWT BORDER SWT MULTI SWT FULL SELECTION table set Layout new Grid Layout table set Layout Data new Grid Data Grid Data FILL BOTH f Perspective Viewer new Checkbox Table Viewer table Perspective Provider provider new Perspective Provider f Perspective Viewer set Content Provider provider f Perspective Viewer set Label Provider provider f Perspective Viewer set Input this check Perspectives get Preference Store get String I DebugUI Constants PREF MANAGE VIEW PERSPECTIVES  createPerspectiveViewer setText DebugPreferencesMessages getString ViewManagementPreferencePage setLayoutData GridData GridData FILL_HORIZONTAL FULL_SELECTION setLayout GridLayout setLayoutData GridData GridData FILL_BOTH fPerspectiveViewer CheckboxTableViewer PerspectiveProvider PerspectiveProvider fPerspectiveViewer setContentProvider fPerspectiveViewer setLabelProvider fPerspectiveViewer setInput checkPerspectives getPreferenceStore getString IDebugUIConstants PREF_MANAGE_VIEW_PERSPECTIVES
private void check Perspectives String perspective List f Perspective Viewer set All Checked false I Perspective Registry registry PlatformUI get Workbench get Perspective Registry Iterator perspective Ids Launch View Context Listener parse List perspective List iterator while perspective Ids has Next I Perspective Descriptor descriptor registry find Perspective With Id String perspective Ids next f Perspective Viewer set Checked descriptor true  checkPerspectives perspectiveList fPerspectiveViewer setAllChecked IPerspectiveRegistry getWorkbench getPerspectiveRegistry perspectiveIds LaunchViewContextListener parseList perspectiveList perspectiveIds hasNext IPerspectiveDescriptor findPerspectiveWithId perspectiveIds fPerspectiveViewer setChecked
public boolean perform Ok String Buffer buffer new String Buffer Object descriptors f Perspective Viewer get Checked Elements for int i 0 i descriptors length i buffer append I Perspective Descriptor descriptors i get Id append get Preference Store set Value I DebugUI Constants PREF MANAGE VIEW PERSPECTIVES buffer to String get Preference Store set Value I Internal DebugUI Constants PREF TRACK VIEWS f Track Views Button get Selection if f Reset Pressed get Preference Store set Value Launch View Context Listener PREF VIEWS TO NOT OPEN NON NLS 1 get Preference Store set Value Launch View Context Listener PREF OPENED VIEWS NON NLS 1 return super perform Ok  performOk StringBuffer StringBuffer fPerspectiveViewer getCheckedElements IPerspectiveDescriptor getId getPreferenceStore setValue IDebugUIConstants PREF_MANAGE_VIEW_PERSPECTIVES toString getPreferenceStore setValue IInternalDebugUIConstants PREF_TRACK_VIEWS fTrackViewsButton getSelection fResetPressed getPreferenceStore setValue LaunchViewContextListener PREF_VIEWS_TO_NOT_OPEN getPreferenceStore setValue LaunchViewContextListener PREF_OPENED_VIEWS performOk
protected void perform Defaults check Perspectives get Preference Store get Default String I DebugUI Constants PREF MANAGE VIEW PERSPECTIVES f Track Views Button set Selection get Preference Store get Default Boolean I Internal DebugUI Constants PREF TRACK VIEWS f Reset Pressed false update Reset Button super perform Defaults  performDefaults checkPerspectives getPreferenceStore getDefaultString IDebugUIConstants PREF_MANAGE_VIEW_PERSPECTIVES fTrackViewsButton setSelection getPreferenceStore getDefaultBoolean IInternalDebugUIConstants PREF_TRACK_VIEWS fResetPressed updateResetButton performDefaults
see org eclipse ui I Workbench Preference Page init org eclipse ui I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
Updates enablement of the reset button Enable if either persisted view collection is not empty private void update Reset Button boolean enable Reset equals get Preference Store get String Launch View Context Listener PREF VIEWS TO NOT OPEN NON NLS 1 equals get Preference Store get String Launch View Context Listener PREF OPENED VIEWS NON NLS 1 f Reset Views Button set Enabled enable Reset  updateResetButton enableReset getPreferenceStore getString LaunchViewContextListener PREF_VIEWS_TO_NOT_OPEN getPreferenceStore getString LaunchViewContextListener PREF_OPENED_VIEWS fResetViewsButton setEnabled enableReset
see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return PlatformUI get Workbench get Perspective Registry get Perspectives  IStructuredContentProvider getElements getElements inputElement getWorkbench getPerspectiveRegistry getPerspectives
public void dispose Iterator images f Images iterator while images has Next Image images next dispose  fImages hasNext
public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
public Image get Image Object element Image image null if element instanceof I Perspective Descriptor image I Perspective Descriptor element get Image Descriptor create Image f Images add image return image  getImage IPerspectiveDescriptor IPerspectiveDescriptor getImageDescriptor createImage fImages
public String get Text Object element String text null if element instanceof I Perspective Descriptor I Perspective Descriptor descriptor I Perspective Descriptor element text descriptor get Label return text  getText IPerspectiveDescriptor IPerspectiveDescriptor IPerspectiveDescriptor getLabel
return text public void add Listener I Label Provider Listener listener  addListener ILabelProviderListener
public void add Listener I Label Provider Listener listener public boolean is Label Property Object element String property return false  addListener ILabelProviderListener isLabelProperty
return false public void remove Listener I Label Provider Listener listener  removeListener ILabelProviderListener

public boolean test Object receiver String method Object args Object expected Value I Resource resource I Resource I Adaptable receiver get Adapter I Resource class if resource null if PROPERTY MATCHES PATTERN equals method NON NLS 1 String file Name resource get Name String Matcher matcher new String Matcher String expected Value false false return matcher match file Name else if PROJECT NATURE equals method try I Project proj resource get Project return proj is Accessible proj has Nature String expected Value catch Core Exception e return false else if PROPERTY MATCHES CONTENT TYPE equals method return matches Content Type resource String expected Value return false  expectedValue IResource IResource IAdaptable getAdapter IResource PROPERTY_MATCHES_PATTERN fileName getName StringMatcher StringMatcher expectedValue fileName PROJECT_NATURE IProject getProject isAccessible hasNature expectedValue CoreException PROPERTY_MATCHES_CONTENT_TYPE matchesContentType expectedValue
Returns whether or not the given file s content type matches the specified content type Content types are looked up in the content type registry return whether or not the given resource has the given content type private boolean matches Content Type I Resource resource String content Type if resource null resource instanceof I File resource exists return false I File file I File resource I Content Description description try description file get Content Description catch Core Exception e return false if description null I Content Type type description get Content Type return type null content Type equals type get Id return false  matchesContentType IResource contentType IFile IFile IFile IContentDescription getContentDescription CoreException IContentType getContentType contentType getId

private I Source Lookup Director f Director public Add Container Action super Source LookupUI Messages get String source Tab add Button NON NLS 1  ISourceLookupDirector fDirector AddContainerAction SourceLookupUIMessages getString sourceTab addButton
Prompts for a project to add see org eclipse jface action I Action run public void run Add Source Container Dialog dialog new Add Source Container Dialog get Shell get Viewer f Director dialog open  IAction AddSourceContainerDialog AddSourceContainerDialog getShell getViewer fDirector
public void set Source Lookup Director I Source Lookup Director director f Director director  setSourceLookupDirector ISourceLookupDirector fDirector
protected boolean update Selection I Structured Selection selection if selection null selection is Empty return true else return get Viewer get Tree get Selection 0 get Parent Item null  updateSelection IStructuredSelection isEmpty getViewer getTree getSelection getParentItem

Constructor public Add Source Container Dialog Shell shell Source Container Viewer viewer I Source Lookup Director director super shell set Shell Style get Shell Style SWT RESIZE f Source Container Viewer viewer f Director director  AddSourceContainerDialog SourceContainerViewer ISourceLookupDirector setShellStyle getShellStyle fSourceContainerViewer fDirector
if f Double Click Selects table add Selection Listener new Selection Adapter public void widget Default Selected Selection Event e if table get Selection Count 1 ok Pressed  fDoubleClickSelects addSelectionListener SelectionAdapter widgetDefaultSelected SelectionEvent getSelectionCount okPressed
f Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Selection selection event get Selection String desc null if selection is Empty I Source Container Type type I Source Container Type I Structured Selection selection get First Element desc type get Description set Message desc  fViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection isEmpty ISourceContainerType ISourceContainerType IStructuredSelection getFirstElement getDescription setMessage
Creates the dialog area to display source container types that are browseable protected Control create Dialog Area Composite ancestor get Shell set Text Source LookupUI Messages get String add Source Location title NON NLS 1 set Title Source LookupUI Messages get String add Source Location description NON NLS 1 set Title Image Debug Plugin Images get Image I Internal DebugUI Constants IMG ADD SRC LOC WIZ Composite parent new Composite ancestor SWT NULL Grid Data gd new Grid Data Grid Data FILL BOTH Grid Layout top Layout new Grid Layout top Layout num Columns 1 parent set Layout top Layout parent set Layout Data gd I Source Container Type types filter Types Debug Plugin get Default get Launch Manager get Source Container Types f Viewer new Table Viewer parent SWT H SCROLL SWT V SCROLL SWT BORDER SWT SINGLE final Table table f Viewer get Table gd new Grid Data Grid Data FILL BOTH table set Layout Data gd if f Double Click Selects table add Selection Listener new Selection Adapter public void widget Default Selected Selection Event e if table get Selection Count 1 ok Pressed f Viewer set Label Provider new Source Container Label Provider f Viewer set Content Provider new Array Content Provider f Viewer set Sorter new Viewer Sorter f Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Selection selection event get Selection String desc null if selection is Empty I Source Container Type type I Source Container Type I Structured Selection selection get First Element desc type get Description set Message desc if types length 0 f Viewer set Input types Dialog apply Dialog Font parent Workbench Help set Help get Shell I Debug Help Context Ids ADD SOURCE CONTAINER DIALOG return parent  createDialogArea getShell setText SourceLookupUIMessages getString addSourceLocation setTitle SourceLookupUIMessages getString addSourceLocation setTitleImage DebugPluginImages getImage IInternalDebugUIConstants IMG_ADD_SRC_LOC_WIZ GridData GridData GridData FILL_BOTH GridLayout topLayout GridLayout topLayout numColumns setLayout topLayout setLayoutData ISourceContainerType filterTypes DebugPlugin getDefault getLaunchManager getSourceContainerTypes fViewer TableViewer H_SCROLL V_SCROLL fViewer getTable GridData GridData FILL_BOTH setLayoutData fDoubleClickSelects addSelectionListener SelectionAdapter widgetDefaultSelected SelectionEvent getSelectionCount okPressed fViewer setLabelProvider SourceContainerLabelProvider fViewer setContentProvider ArrayContentProvider fViewer setSorter ViewerSorter fViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection isEmpty ISourceContainerType ISourceContainerType IStructuredSelection getFirstElement getDescription setMessage fViewer setInput applyDialogFont WorkbenchHelp setHelp getShell IDebugHelpContextIds ADD_SOURCE_CONTAINER_DIALOG
Removes types without browsers from the provided list of types param types the complete list of source container types return the list of source container types that have browsers private I Source Container Type filter Types I Source Container Type types Array List valid Types new Array List for int i 0 i types length i I Source Container Type type types i if f Director supports Source Container Type type I Source Container Browser source Container Browser Source LookupUI Utils get Source Container Browser type get Id if source Container Browser null source Container Browser can Add Source Containers f Director valid Types add type return I Source Container Type valid Types to Array new I Source Container Type valid Types size  ISourceContainerType filterTypes ISourceContainerType ArrayList validTypes ArrayList ISourceContainerType fDirector supportsSourceContainerType ISourceContainerBrowser sourceContainerBrowser SourceLookupUIUtils getSourceContainerBrowser getId sourceContainerBrowser sourceContainerBrowser canAddSourceContainers fDirector validTypes ISourceContainerType validTypes toArray ISourceContainerType validTypes
protected void ok Pressed single selection dialog so take first item in array there will always be a selected item since we set it with viewer set Selection I Source Container Type type I Source Container Type Structured Selection f Viewer get Selection get First Element I Source Container Browser browser Source LookupUI Utils get Source Container Browser type get Id if browser null super ok Pressed I Source Container results browser add Source Containers get Shell f Director if results null f Source Container Viewer add Entries results super ok Pressed  okPressed setSelection ISourceContainerType ISourceContainerType StructuredSelection fViewer getSelection getFirstElement ISourceContainerBrowser SourceLookupUIUtils getSourceContainerBrowser getId okPressed ISourceContainer addSourceContainers getShell fDirector fSourceContainerViewer addEntries okPressed
protected void add Filter Viewer Filter filter f Viewer add Filter filter  addFilter ViewerFilter fViewer addFilter

private boolean f Show Closed Projects true Creates a new Resource Content Provider public Basic Container Content Provider  fShowClosedProjects ResourceContentProvider BasicContainerContentProvider
The visual part that is using this content provider is about to be disposed Deallocate all allocated SWT resources public void dispose 
see I Tree Content Provider get Children public Object get Children Object element if element instanceof I Workspace Root check if closed projects should be shown I Project all Projects I Workspace Root element get Projects if f Show Closed Projects return all Projects Array List accessible Projects new Array List for int i 0 i all Projects length i if all Projects i is Open accessible Projects add all Projects i return accessible Projects to Array return new Object 0  ITreeContentProvider getChildren getChildren IWorkspaceRoot IProject allProjects IWorkspaceRoot getProjects fShowClosedProjects allProjects ArrayList accessibleProjects ArrayList allProjects allProjects isOpen accessibleProjects allProjects accessibleProjects toArray
see I Tree Content Provider get Elements public Object get Elements Object element return get Children element  ITreeContentProvider getElements getElements getChildren
see I Tree Content Provider get Parent public Object get Parent Object element if element instanceof I Resource return I Resource element get Parent return null  ITreeContentProvider getParent getParent IResource IResource getParent
see I Tree Content Provider has Children public boolean has Children Object element return get Children element length 0  ITreeContentProvider hasChildren hasChildren getChildren
see I Content Provider input Changed public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput

see org eclipse jface viewers Viewer Filter select org eclipse jface viewers Viewer java lang Object java lang Object public boolean select Viewer viewer Object parent Element Object element return f Archives contains element f Existing contains element  ViewerFilter parentElement fArchives fExisting
Constructs a new filter to display archives and their containers excluding the resources in the given list param objects resources to exclude public Archive Filter List objects f Existing objects init  ArchiveFilter fExisting
private void init Busy Indicator show While DebugUI Plugin get Standard Display new Runnable public void run f Archives new Hash Set traverse Resources Plugin get Workspace get Root f Archives  BusyIndicator showWhile DebugUIPlugin getStandardDisplay fArchives HashSet ResourcesPlugin getWorkspace getRoot fArchives
Search for all archives in the workspace private void init Busy Indicator show While DebugUI Plugin get Standard Display new Runnable public void run f Archives new Hash Set traverse Resources Plugin get Workspace get Root f Archives  BusyIndicator showWhile DebugUIPlugin getStandardDisplay fArchives HashSet ResourcesPlugin getWorkspace getRoot fArchives
Traverse the given container adding archives to the given set Returns whether any files were added param root private boolean traverse I Container container Set set boolean added false try I Resource resources container members for int i 0 i resources length i I Resource resource resources i if resource instanceof I File I File file I File resource String ext file get File Extension if ext null ext equals Ignore Case jar ext equals Ignore Case zip NON NLS 1 NON NLS 2 set add file added true else if resource instanceof I Container if traverse I Container resource set set add resource added true catch Core Exception e return added  IContainer IResource IResource IFile IFile IFile getFileExtension equalsIgnoreCase equalsIgnoreCase IContainer IContainer CoreException

private I Selection Status Validator validator new I Selection Status Validator public I Status validate Object selection if selection length 0 return new Status I Status ERROR DebugUI Plugin get Unique Identifier 0 null NON NLS 1 for int i 0 i selection length i if selection i instanceof I File return new Status I Status ERROR DebugUI Plugin get Unique Identifier 0 null NON NLS 1 return new Status I Status OK DebugUI Plugin get Unique Identifier 0 null NON NLS 1  ISelectionStatusValidator ISelectionStatusValidator IStatus IStatus DebugUIPlugin getUniqueIdentifier IFile IStatus DebugUIPlugin getUniqueIdentifier IStatus DebugUIPlugin getUniqueIdentifier
Returns internal jars source containers currently used by the given source lookup director param director source lookup director jars are being added to protected List get Selected Jars I Source Lookup Director director I Source Container containers director get Source Containers List jars new Array List for int i 0 i containers length i I Source Container container containers i if container get Type get Id equals Archive Source Container TYPE ID jars add container return jars  getSelectedJars ISourceLookupDirector ISourceContainer getSourceContainers ArrayList ISourceContainer getType getId ArchiveSourceContainer TYPE_ID
public I Source Container add Source Containers Shell shell I Source Lookup Director director Viewer Filter filter new Archive Filter get Selected Jars director I Label Provider lp new Workbench Label Provider I Tree Content Provider cp new Workbench Content Provider Element Tree Selection Dialog dialog new Element Tree Selection Dialog shell lp cp dialog set Validator validator dialog set Title Source LookupUI Messages get String Archive Source Container Browser 3 NON NLS 1 dialog set Message Source LookupUI Messages get String Archive Source Container Browser 4 NON NLS 1 dialog add Filter filter dialog set Input Resources Plugin get Workspace get Root dialog set Sorter new Resource Sorter Resource Sorter NAME if dialog open Window OK Object result dialog get Result I Source Container containers new I Source Container result length for int i 0 i containers length i containers i new Archive Source Container I File result i true return containers return new I Source Container 0  ISourceContainer addSourceContainers ISourceLookupDirector ViewerFilter ArchiveFilter getSelectedJars ILabelProvider WorkbenchLabelProvider ITreeContentProvider WorkbenchContentProvider ElementTreeSelectionDialog ElementTreeSelectionDialog setValidator setTitle SourceLookupUIMessages getString ArchiveSourceContainerBrowser setMessage SourceLookupUIMessages getString ArchiveSourceContainerBrowser addFilter setInput ResourcesPlugin getWorkspace getRoot setSorter ResourceSorter ResourceSorter getResult ISourceContainer ISourceContainer ArchiveSourceContainer IFile ISourceContainer

public I Source Container add Source Containers Shell shell I Source Lookup Director director I Source Container containers new I Source Container 1 Directory Source Container Dialog dialog new Directory Source Container Dialog shell String result dialog get Result if result null TODO add boolean to dialog instead of hard coding containers 0 new Directory Source Container new Path result true return containers return new I Source Container 0  ISourceContainer addSourceContainers ISourceLookupDirector ISourceContainer ISourceContainer DirectorySourceContainerDialog DirectorySourceContainerDialog getResult DirectorySourceContainer ISourceContainer

public Directory Source Container Dialog Shell shell String last Used Path DebugUI Plugin get Default get Dialog Settings get LAST PATH SETTING if last Used Path null last Used Path NON NLS 1 TODO not supposed to subclass Directory Dialog but need a checkbox added for subfolder searching Directory Dialog dialog new Directory Dialog shell SWT MULTI dialog set Text Source LookupUI Messages get String Directory Source Container Dialog 0 NON NLS 1 dialog set Filter Path last Used Path dialog set Message Source LookupUI Messages get String Directory Source Container Dialog 1 NON NLS 1 f Res dialog open if f Res null return I Path filter Path new Path dialog get Filter Path DebugUI Plugin get Default get Dialog Settings put LAST PATH SETTING filter Path toOS String  DirectorySourceContainerDialog lastUsedPath DebugUIPlugin getDefault getDialogSettings LAST_PATH_SETTING lastUsedPath lastUsedPath DirectoryDialog DirectoryDialog DirectoryDialog setText SourceLookupUIMessages getString DirectorySourceContainerDialog setFilterPath lastUsedPath setMessage SourceLookupUIMessages getString DirectorySourceContainerDialog fRes fRes IPath filterPath getFilterPath DebugUIPlugin getDefault getDialogSettings LAST_PATH_SETTING filterPath toOSString
Returns the result of the dialog open operation return the dialog open result public String get Result return f Res  getResult fRes

public I Source Container add Source Containers Shell shell I Source Lookup Director director File Dialog dialog new File Dialog shell SWT OPEN SWT MULTI String root Dir DebugUI Plugin get Default get Dialog Settings get ROOT DIR dialog set Text Source LookupUI Messages get String External Archive Source Container Browser 2 NON NLS 1 dialog set Filter Extensions new String jar zip NON NLS 1 NON NLS 2 if root Dir null dialog set Filter Path root Dir dialog open String file Names dialog get File Names int n Chosen file Names length if n Chosen 0 root Dir dialog get Filter Path I Path filter Path new Path root Dir I Source Container containers new I Source Container n Chosen for int i 0 i n Chosen i I Path path filter Path append file Names i make Absolute TODO configure auto detect containers i new External Archive Source Container path toOS String true DebugUI Plugin get Default get Dialog Settings put ROOT DIR root Dir return containers return new I Source Container 0  ISourceContainer addSourceContainers ISourceLookupDirector FileDialog FileDialog rootDir DebugUIPlugin getDefault getDialogSettings ROOT_DIR setText SourceLookupUIMessages getString ExternalArchiveSourceContainerBrowser setFilterExtensions rootDir setFilterPath rootDir fileNames getFileNames nChosen fileNames nChosen rootDir getFilterPath IPath filterPath rootDir ISourceContainer ISourceContainer nChosen nChosen IPath filterPath fileNames makeAbsolute ExternalArchiveSourceContainer toOSString DebugUIPlugin getDefault getDialogSettings ROOT_DIR rootDir ISourceContainer

public I Source Container add Source Containers Shell shell I Source Lookup Director director Dialog dialog new Folder Source Container Dialog shell new Workbench Label Provider new Workbench Content Provider if dialog open Window OK Object selection Element Tree Selection Dialog dialog get Result Array List containers new Array List for int i 0 i selection length i if selection i instanceof I Folder continue TODO add boolean to dialog instead of hard coding containers add new Folder Source Container I Folder selection i true return I Source Container containers to Array new I Source Container containers size return new I Source Container 0  ISourceContainer addSourceContainers ISourceLookupDirector FolderSourceContainerDialog WorkbenchLabelProvider WorkbenchContentProvider ElementTreeSelectionDialog getResult ArrayList ArrayList IFolder FolderSourceContainer IFolder ISourceContainer toArray ISourceContainer ISourceContainer

I Selection Status Validator validator new I Selection Status Validator public I Status validate Object selection for int i 0 i selection length i if selection i instanceof I Folder return new Status I Status ERROR DebugUI Plugin get Unique Identifier 1 Source LookupUI Messages get String source Search folder Selection Error null NON NLS 1 return new Status I Status OK DebugUI Plugin get Unique Identifier 0 null NON NLS 1  ISelectionStatusValidator ISelectionStatusValidator IStatus IFolder IStatus DebugUIPlugin getUniqueIdentifier SourceLookupUIMessages getString sourceSearch folderSelectionError IStatus DebugUIPlugin getUniqueIdentifier
public Folder Source Container Dialog Shell parent I Label Provider label Provider I Tree Content Provider content Provider super parent label Provider content Provider set Title Source LookupUI Messages get String folder Selection title NON NLS 1 set Input Resources Plugin get Workspace get Root set Sorter new Resource Sorter Resource Sorter NAME I Selection Status Validator validator new I Selection Status Validator public I Status validate Object selection for int i 0 i selection length i if selection i instanceof I Folder return new Status I Status ERROR DebugUI Plugin get Unique Identifier 1 Source LookupUI Messages get String source Search folder Selection Error null NON NLS 1 return new Status I Status OK DebugUI Plugin get Unique Identifier 0 null NON NLS 1 set Validator validator set Double Click Selects true set Allow Multiple true set Message Source LookupUI Messages get String folder Selection label NON NLS 1 Workbench Help set Help parent I Debug Help Context Ids ADD FOLDER CONTAINER DIALOG  FolderSourceContainerDialog ILabelProvider labelProvider ITreeContentProvider contentProvider labelProvider contentProvider setTitle SourceLookupUIMessages getString folderSelection setInput ResourcesPlugin getWorkspace getRoot setSorter ResourceSorter ResourceSorter ISelectionStatusValidator ISelectionStatusValidator IStatus IFolder IStatus DebugUIPlugin getUniqueIdentifier SourceLookupUIMessages getString sourceSearch folderSelectionError IStatus DebugUIPlugin getUniqueIdentifier setValidator setDoubleClickSelects setAllowMultiple setMessage SourceLookupUIMessages getString folderSelection WorkbenchHelp setHelp IDebugHelpContextIds ADD_FOLDER_CONTAINER_DIALOG

public I Source Container add Source Containers Shell shell I Source Lookup Director director Object input Resources Plugin get Workspace get Root I Structured Content Provider content Provider new Basic Container Content Provider I Label Provider label Provider new Workbench Label Provider Dialog dialog new Project Source Container Dialog shell input content Provider label Provider Source LookupUI Messages get String project Selection choose Label NON NLS 1 if dialog open Window OK Object elements List Selection Dialog dialog get Result Array List res new Array List for int i 0 i elements length i if elements i instanceof I Project continue res add new Project Source Container I Project elements i Project Source Container Dialog dialog is Add Required Projects return I Source Container res to Array new I Source Container res size return new I Source Container 0  ISourceContainer addSourceContainers ISourceLookupDirector ResourcesPlugin getWorkspace getRoot IStructuredContentProvider contentProvider BasicContainerContentProvider ILabelProvider labelProvider WorkbenchLabelProvider ProjectSourceContainerDialog contentProvider labelProvider SourceLookupUIMessages getString projectSelection chooseLabel ListSelectionDialog getResult ArrayList ArrayList IProject ProjectSourceContainer IProject ProjectSourceContainerDialog isAddRequiredProjects ISourceContainer toArray ISourceContainer ISourceContainer

public Project Source Container Dialog Shell parent Shell Object input I Structured Content Provider content Provider I Label Provider label Provider String message super parent Shell input content Provider label Provider message  ProjectSourceContainerDialog parentShell IStructuredContentProvider contentProvider ILabelProvider labelProvider parentShell contentProvider labelProvider
add Required set Text Source LookupUI Messages get String project Selection required Label NON NLS 1 add Required add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Add Required Projects add Required get Selection  addRequired setText SourceLookupUIMessages getString projectSelection requiredLabel addRequired addSelectionListener SelectionAdapter widgetSelected SelectionEvent fAddRequiredProjects addRequired getSelection
see org eclipse jface dialogs Dialog create Dialog Area org eclipse swt widgets Composite protected Control create Dialog Area Composite parent Font font parent get Font Composite composite Composite super create Dialog Area parent final Button add Required new Button composite SWT CHECK add Required set Text Source LookupUI Messages get String project Selection required Label NON NLS 1 add Required add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Add Required Projects add Required get Selection add Required set Selection f Add Required Projects add Required set Font font apply Dialog Font composite Workbench Help set Help get Shell I Debug Help Context Ids ADD PROJECT CONTAINER DIALOG return composite  createDialogArea createDialogArea getFont createDialogArea addRequired addRequired setText SourceLookupUIMessages getString projectSelection requiredLabel addRequired addSelectionListener SelectionAdapter widgetSelected SelectionEvent fAddRequiredProjects addRequired getSelection addRequired setSelection fAddRequiredProjects addRequired setFont applyDialogFont WorkbenchHelp setHelp getShell IDebugHelpContextIds ADD_PROJECT_CONTAINER_DIALOG
Returns whether the user has selected to add required projects return whether the user has selected to add required projects public boolean is Add Required Projects return f Add Required Projects  isAddRequiredProjects fAddRequiredProjects

public I Source Container add Source Containers Shell shell I Source Lookup Director director Array List containers new Array List I Working Set Selection Dialog dialog Workbench Plugin get Default get Working Set Manager create Working Set Selection Dialog shell true if dialog open Window OK I Working Set selections dialog get Selection if selections null for int i 0 i selections length i containers add new Working Set Source Container selections i return I Source Container containers to Array new I Source Container containers size  ISourceContainer addSourceContainers ISourceLookupDirector ArrayList ArrayList IWorkingSetSelectionDialog WorkbenchPlugin getDefault getWorkingSetManager createWorkingSetSelectionDialog IWorkingSet getSelection WorkingSetSourceContainer ISourceContainer toArray ISourceContainer

public I Source Container add Source Containers Shell shell I Source Lookup Director director I Source Container containers new I Source Container 1 containers 0 new Workspace Source Container return containers  ISourceContainer addSourceContainers ISourceLookupDirector ISourceContainer ISourceContainer WorkspaceSourceContainer

see org eclipse ui I Editor Part do Save I Progress Monitor public void do Save I Progress Monitor monitor  IEditorPart doSave IProgressMonitor doSave IProgressMonitor
see org eclipse ui I Editor Part do Save As public void do Save As  IEditorPart doSaveAs doSaveAs
see org eclipse ui I Editor Part goto Marker I Marker public void goto Marker I Marker marker  IEditorPart gotoMarker IMarker gotoMarker IMarker
see org eclipse ui I Editor Part init I Editor Site I Editor Input public void init I Editor Site site I Editor Input input throws Part Init Exception set Site site set Input input Debug Plugin get Default add Debug Event Listener this  IEditorPart IEditorSite IEditorInput IEditorSite IEditorInput PartInitException setSite setInput DebugPlugin getDefault addDebugEventListener
see org eclipse ui I Editor Part is Dirty public boolean is Dirty return false  IEditorPart isDirty isDirty
see org eclipse ui I Editor Part is Save As Allowed public boolean is Save As Allowed return false  IEditorPart isSaveAsAllowed isSaveAsAllowed
button set Text Source LookupUI Messages get String add Source Location add Button2 NON NLS 1 button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt button Selected  setText SourceLookupUIMessages getString addSourceLocation addButton2 addSelectionListener SelectionAdapter widgetSelected SelectionEvent buttonSelected
see org eclipse ui I Workbench Part create Part Control Composite public void create Part Control Composite parent Grid Layout top Layout new Grid Layout Grid Data data new Grid Data top Layout num Columns 1 top Layout vertical Spacing 10 parent set Layout top Layout parent set Layout Data data parent set Background parent get Display get System Color SWT COLOR WHITE f Text new Text parent SWT READ ONLY SWT WRAP f Text set Foreground J Face Colors get Error Text f Text get Display f Text set Background parent get Display get System Color SWT COLOR WHITE if get Editor Input null set Input get Editor Input Button button new Button parent SWT PUSH data new Grid Data data grab Excess Horizontal Space false data grab Excess Vertical Space false data height Hint 50 data width Hint 50 button set Data data button set Text Source LookupUI Messages get String add Source Location add Button2 NON NLS 1 button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt button Selected Dialog apply Dialog Font parent Workbench Help set Help parent I Debug Help Context Ids NO SOURCE EDITOR  IWorkbenchPart createPartControl createPartControl GridLayout topLayout GridLayout GridData GridData topLayout numColumns topLayout verticalSpacing setLayout topLayout setLayoutData setBackground getDisplay getSystemColor COLOR_WHITE fText READ_ONLY fText setForeground JFaceColors getErrorText fText getDisplay fText setBackground getDisplay getSystemColor COLOR_WHITE getEditorInput setInput getEditorInput GridData grabExcessHorizontalSpace grabExcessVerticalSpace heightHint widthHint setData setText SourceLookupUIMessages getString addSourceLocation addButton2 addSelectionListener SelectionAdapter widgetSelected SelectionEvent buttonSelected applyDialogFont WorkbenchHelp setHelp IDebugHelpContextIds NO_SOURCE_EDITOR
Handles the event when the add source container button is selected Displays the code Edit Source Lookup Path Dialog code so the user can add additional source containers that should be searched private void button Selected I Source Locator locator null I Launch launch null I Adaptable selection DebugUI Tools get Debug Context if selection null return if selection get Adapter I Launch class null launch I Launch selection get Adapter I Launch class locator launch get Source Locator else if selection get Adapter I Debug Element class null launch I Debug Element selection get Adapter I Debug Element class get Launch locator launch get Source Locator else return should not occur if locator null locator instanceof Abstract Source Lookup Director return final Source Lookup Dialog dialog new Source Lookup Dialog DebugUI Plugin get Shell Abstract Source Lookup Director locator int result dialog open if result Window OK reset Editor  EditSourceLookupPathDialog buttonSelected ISourceLocator ILaunch IAdaptable DebugUITools getDebugContext getAdapter ILaunch ILaunch getAdapter ILaunch getSourceLocator getAdapter IDebugElement IDebugElement getAdapter IDebugElement getLaunch getSourceLocator AbstractSourceLookupDirector SourceLookupDialog SourceLookupDialog DebugUIPlugin getShell AbstractSourceLookupDirector resetEditor
Runnable open new Runnable public void run I Workbench Window dwindow DebugUI Plugin get Active Workbench Window if dwindow null I Workbench Page page dwindow get Active Page if page null I Debug Model Presentation model Pres DebugUI Tools new Debug Model Presentation I Editor Input input model Pres get Editor Input f Object if input null String id model Pres get Editor Id input f Object if id null try I Editor Part editor Part page open Editor input id if editor Part instanceof I Text Editor line Number 0 position to line number I Text Editor text Editor I Text Editor editor Part I Region region get Line Information text Editor line Number if region null text Editor select And Reveal region get Offset 0 catch Part Init Exception e1 model Pres dispose  IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow IWorkbenchPage getActivePage IDebugModelPresentation modelPres DebugUITools newDebugModelPresentation IEditorInput modelPres getEditorInput fObject modelPres getEditorId fObject IEditorPart editorPart openEditor editorPart ITextEditor lineNumber ITextEditor textEditor ITextEditor editorPart IRegion getLineInformation textEditor lineNumber textEditor selectAndReveal getOffset PartInitException modelPres
Clears the source not found editor inputs associated with the stack and opening the editor again if the item is not a stackframe A marker will be added and the editor will be told to scroll to the marker If it is a stackframe the launch view will pick up the change event and open a new editor automatically public void reset Editor fire Change Events On Stack if f Object instanceof I Stack Frame return launch view will pick up from here close this editor and open a new editor final int line Number get Line Number Runnable open new Runnable public void run I Workbench Window dwindow DebugUI Plugin get Active Workbench Window if dwindow null I Workbench Page page dwindow get Active Page if page null I Debug Model Presentation model Pres DebugUI Tools new Debug Model Presentation I Editor Input input model Pres get Editor Input f Object if input null String id model Pres get Editor Id input f Object if id null try I Editor Part editor Part page open Editor input id if editor Part instanceof I Text Editor line Number 0 position to line number I Text Editor text Editor I Text Editor editor Part I Region region get Line Information text Editor line Number if region null text Editor select And Reveal region get Offset 0 catch Part Init Exception e1 model Pres dispose close Editor get new editor input DebugUI Plugin get Standard Display async Exec open  resetEditor fireChangeEventsOnStack fObject IStackFrame lineNumber getLineNumber IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow IWorkbenchPage getActivePage IDebugModelPresentation modelPres DebugUITools newDebugModelPresentation IEditorInput modelPres getEditorInput fObject modelPres getEditorId fObject IEditorPart editorPart openEditor editorPart ITextEditor lineNumber ITextEditor textEditor ITextEditor editorPart IRegion getLineInformation textEditor lineNumber textEditor selectAndReveal getOffset PartInitException modelPres closeEditor DebugUIPlugin getStandardDisplay asyncExec
Returns the line information for the given line in the given editor private I Region get Line Information I Text Editor editor int line Number I Document Provider provider editor get Document Provider I Editor Input input editor get Editor Input try provider connect input catch Core Exception e return null try I Document document provider get Document input if document null return document get Line Information line Number catch Bad Location Exception e finally provider disconnect input return null  IRegion getLineInformation ITextEditor lineNumber IDocumentProvider getDocumentProvider IEditorInput getEditorInput CoreException IDocument getDocument getLineInformation lineNumber BadLocationException
Returns the line number associated with the breakpoint marker return the line number to scroll to protected int get Line Number int line 1 if f Object instanceof I Marker try line Integer I Marker f Object get Attribute I Marker LINE NUMBER int Value catch Core Exception e return line  getLineNumber fObject IMarker IMarker fObject getAttribute IMarker LINE_NUMBER intValue CoreException
see org eclipse ui I Workbench Part set Focus public void set Focus if f Text null f Text set Focus  IWorkbenchPart setFocus setFocus fText fText setFocus
see I Reusable Editor set Input org eclipse ui I Editor Input public void set Input I Editor Input input super set Input input if input instanceof Common Source Not Found Editor Input f Object Common Source Not Found Editor Input input get Object set Title input get Name if f Text null f Text set Text input get Tool Tip Text n NON NLS 1  IReusableEditor setInput IEditorInput setInput IEditorInput setInput CommonSourceNotFoundEditorInput fObject CommonSourceNotFoundEditorInput getObject setTitle getName fText fText setText getToolTipText
Fires change event s to clear the source file history of the items in the stack protected void fire Change Events On Stack if f Object instanceof I Stack Frame fire Change Event Debug Event CONTENT I Stack Frame f Object else if f Object instanceof I Debug Element loop through all threads and clear the cached source files try I Thread threads I Debug Element f Object get Debug Target get Threads for int i 0 i threads length i fire Change Event Debug Event CONTENT threads i get Top Stack Frame catch Debug Exception e  fireChangeEventsOnStack fObject IStackFrame fireChangeEvent DebugEvent IStackFrame fObject fObject IDebugElement IThread IDebugElement fObject getDebugTarget getThreads fireChangeEvent DebugEvent getTopStackFrame DebugException
Fire a debug change event with detail param detail see Debug Event public void fire Change Event int detail I Debug Element source fire Event new Debug Event source Debug Event CHANGE detail  DebugEvent fireChangeEvent IDebugElement fireEvent DebugEvent DebugEvent
Fire a debug event private void fire Event Debug Event event if Debug Plugin get Default null Debug Plugin get Default fire Debug Event Set new Debug Event event  fireEvent DebugEvent DebugPlugin getDefault DebugPlugin getDefault fireDebugEventSet DebugEvent
public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i Object source event get Source switch event get Kind case Debug Event TERMINATE if check If Editor Should Close source close Editor break case Debug Event CHANGE if source equals f Object return Trigger a selection Change event I Workbench Window window DebugUI Plugin get Active Workbench Window if window null return I Workbench Page p window get Active Page if p null return I View Part f Launch View p find View I DebugUI Constants ID DEBUG VIEW if f Launch View instanceof I Selection Changed Listener I Selection f Selection Launch View f Launch View get Viewer get Selection To clear the stackframe stored in the launch View Launch View f Launch View clear Source Selection I Stack Frame source get Thread Launch View f Launch View get Viewer set Selection f Selection true break  handleDebugEvents DebugEvent DebugEvent getSource getKind DebugEvent checkIfEditorShouldClose closeEditor DebugEvent fObject selectionChange IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow IWorkbenchPage getActivePage IViewPart fLaunchView findView IDebugUIConstants ID_DEBUG_VIEW fLaunchView ISelectionChangedListener ISelection fSelection LaunchView fLaunchView getViewer getSelection launchView LaunchView fLaunchView clearSourceSelection IStackFrame getThread LaunchView fLaunchView getViewer setSelection fSelection
Checks if the source of the terminate event is associated with this editor object param source the source of the event return true if the code source code is related to this editor false otherwise protected boolean check If Editor Should Close Object source Make sure terminate event is for me if f Object instanceof I Debug Element source instanceof I Debug Element I Debug Element element I Debug Element f Object I Debug Element source Element I Debug Element source return source Element get Debug Target equals element get Debug Target return false  checkIfEditorShouldClose fObject IDebugElement IDebugElement IDebugElement IDebugElement fObject IDebugElement sourceElement IDebugElement sourceElement getDebugTarget getDebugTarget
DebugUI Plugin get Standard Display sync Exec new Runnable public void run DebugUI Plugin get Active Workbench Window get Active Page close Editor editor false  DebugUIPlugin getStandardDisplay syncExec DebugUIPlugin getActiveWorkbenchWindow getActivePage closeEditor
Closes this editor protected void close Editor final I Editor Part editor this DebugUI Plugin get Standard Display sync Exec new Runnable public void run DebugUI Plugin get Active Workbench Window get Active Page close Editor editor false  closeEditor IEditorPart DebugUIPlugin getStandardDisplay syncExec DebugUIPlugin getActiveWorkbenchWindow getActivePage closeEditor
see org eclipse ui I Workbench Part dispose public void dispose Debug Plugin get Default remove Debug Event Listener this super dispose  IWorkbenchPart DebugPlugin getDefault removeDebugEventListener

Constructs an editor input for the given debug element or breakpoint param object debug element or breakpoint public Common Source Not Found Editor Input Object object f Object object if object null I Debug Model Presentation pres DebugUI Tools new Debug Model Presentation f Label pres get Text object pres dispose if f Label null f Label NON NLS 1  CommonSourceNotFoundEditorInput fObject IDebugModelPresentation DebugUITools newDebugModelPresentation fLabel getText fLabel fLabel
see org eclipse ui I Editor Input exists public boolean exists return false  IEditorInput
see org eclipse ui I Editor Input get Image Descriptor public Image Descriptor get Image Descriptor return DebugUI Tools get Default Image Descriptor f Object  IEditorInput getImageDescriptor ImageDescriptor getImageDescriptor DebugUITools getDefaultImageDescriptor fObject
see org eclipse ui I Editor Input get Name public String get Name return f Label  IEditorInput getName getName fLabel
see org eclipse ui I Editor Input get Persistable public I Persistable Element get Persistable return null  IEditorInput getPersistable IPersistableElement getPersistable
see org eclipse ui I Editor Input get Tool Tip Text public String get Tool Tip Text return Message Format format Source LookupUI Messages get String add Source Location editor Message new String f Label NON NLS 1  IEditorInput getToolTipText getToolTipText MessageFormat SourceLookupUIMessages getString addSourceLocation editorMessage fLabel
Returns the object that was the reason why source was being searched for i e it was clicked on return the object public Object get Object return f Object  getObject fObject

public class Down Action extends Source Container Action public Down Action super Source LookupUI Messages get String source Tab down Button NON NLS 1  DownAction SourceContainerAction DownAction SourceLookupUIMessages getString sourceTab downButton
see I Action run public void run List targets get Ordered Selection if targets is Empty return List list get Entries As List int bottom list size 1 int index 0 for int i targets size 1 i 0 i Object target targets get i index list index Of target if index bottom bottom index 1 Object temp list get bottom list set bottom target list set index temp bottom index set Entries list  IAction getOrderedSelection isEmpty getEntriesAsList indexOf setEntries
see Selection Listener Action update Selection I Structured Selection protected boolean update Selection I Structured Selection selection return selection is Empty is Index Selected selection get Entries As List size 1 get Viewer get Tree get Selection 0 get Parent Item null  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection isEmpty isIndexSelected getEntriesAsList getViewer getTree getSelection getParentItem

private I Source Container Browser f Browser public Edit Container Action super Source LookupUI Messages get String Edit Container Action 0 NON NLS 1  ISourceContainerBrowser fBrowser EditContainerAction SourceLookupUIMessages getString EditContainerAction
Prompts for a project to add see org eclipse jface action I Action run public void run I Source Container replacements f Browser edit Source Containers get Shell f Director f Containers int j 0 I Source Container existing get Viewer get Entries for int i 0 i existing length j replacements length i I Source Container to Be Replaced f Containers j I Source Container container existing i if container equals to Be Replaced existing i replacements j j get Viewer set Entries existing  IAction ISourceContainer fBrowser editSourceContainers getShell fDirector fContainers ISourceContainer getViewer getEntries ISourceContainer toBeReplaced fContainers ISourceContainer toBeReplaced getViewer setEntries
public void set Source Lookup Director I Source Lookup Director director f Director director  setSourceLookupDirector ISourceLookupDirector fDirector
protected boolean update Selection I Structured Selection selection if selection null selection is Empty return false if get Viewer get Tree get Selection 0 get Parent Item null can only edit top level items of same type f Containers new I Source Container selection size Iterator iterator selection iterator I Source Container container I Source Container iterator next I Source Container Type type container get Type f Containers 0 container int i 1 while iterator has Next container I Source Container iterator next f Containers i container i if container get Type equals type return false all the same type see if editing is supported f Browser Source LookupUI Utils get Source Container Browser type get Id if f Browser null return f Browser can Edit Source Containers f Director f Containers return false  updateSelection IStructuredSelection isEmpty getViewer getTree getSelection getParentItem fContainers ISourceContainer ISourceContainer ISourceContainer ISourceContainerType getType fContainers hasNext ISourceContainer fContainers getType fBrowser SourceLookupUIUtils getSourceContainerBrowser getId fBrowser fBrowser canEditSourceContainers fDirector fContainers

public Edit Source Lookup Path Action Launch View view super Source LookupUI Messages get String Edit Source Lookup Path Action 0 NON NLS 1 set Enabled false Workbench Help set Help this I Debug Help Context Ids EDIT SOURCELOOKUP ACTION set Image Descriptor DebugUI Tools get Image Descriptor I Internal DebugUI Constants IMG SRC LOOKUP MENU f View view  EditSourceLookupPathAction LaunchView SourceLookupUIMessages getString EditSourceLookupPathAction setEnabled WorkbenchHelp setHelp IDebugHelpContextIds EDIT_SOURCELOOKUP_ACTION setImageDescriptor DebugUITools getImageDescriptor IInternalDebugUIConstants IMG_SRC_LOOKUP_MENU fView
protected boolean update Selection I Structured Selection selection director null if selection size 1 Object object selection get First Element I Launch launch null if object instanceof I Debug Element launch I Debug Element object get Launch else if object instanceof I Launch launch I Launch object if launch null launch get Launch Configuration null launch get Source Locator instanceof I Source Lookup Director director I Source Lookup Director launch get Source Locator return director null  updateSelection IStructuredSelection getFirstElement ILaunch IDebugElement IDebugElement getLaunch ILaunch ILaunch getLaunchConfiguration getSourceLocator ISourceLookupDirector ISourceLookupDirector getSourceLocator
public void run Shell shell DebugUI Plugin get Shell Source Lookup Dialog dialog new Source Lookup Dialog shell director if dialog open Window OK f View redo Source Lookup  DebugUIPlugin getShell SourceLookupDialog SourceLookupDialog fView redoSourceLookup

public Lookup Source Action Launch View view super Source LookupUI Messages get String Lookup Source Action 0 NON NLS 1 set Enabled false Workbench Help set Help this I Debug Help Context Ids LOOKUP SOURCE ACTION f View view  LookupSourceAction LaunchView SourceLookupUIMessages getString LookupSourceAction setEnabled WorkbenchHelp setHelp IDebugHelpContextIds LOOKUP_SOURCE_ACTION fView
protected boolean update Selection I Structured Selection selection director null frame null if selection size 1 Object object selection get First Element if object instanceof I Stack Frame frame I Stack Frame object I Launch launch frame get Launch if launch null launch get Launch Configuration null launch get Source Locator instanceof I Source Lookup Director director I Source Lookup Director launch get Source Locator return director null  updateSelection IStructuredSelection getFirstElement IStackFrame IStackFrame ILaunch getLaunch getLaunchConfiguration getSourceLocator ISourceLookupDirector ISourceLookupDirector getSourceLocator
see org eclipse jface action I Action run public void run director clear Source Elements frame f View redo Source Lookup  IAction clearSourceElements fView redoSourceLookup

Runnable r new Runnable public void run try result 0 handler handle Status status source catch Core Exception e exception 0 e synchronized lock lock notify All  handleStatus CoreException notifyAll
public class Prompter implements I Status Handler Prompts the user for input based on the given status and source object blocking the calling thread until the status is resolved param status client status code for which a status handler must be registered param source object requesting the status to be resolved return result of resolving the givne status see org eclipse debug core I Status Handler handle Status org eclipse core runtime I Status java lang Object public Object handle Status final I Status status final Object source throws Core Exception final I Status Handler handler Debug Plugin get Default get Status Handler status if handler null TODO throw exception Display display DebugUI Plugin get Standard Display if display get Thread equals Thread current Thread return handler handle Status status source final Object result new Object 1 final Core Exception exception new Core Exception 1 final Object lock this Runnable r new Runnable public void run try result 0 handler handle Status status source catch Core Exception e exception 0 e synchronized lock lock notify All synchronized lock DebugUI Plugin get Standard Display async Exec r try lock wait catch Interrupted Exception e if exception 0 null throw exception 0 return result 0  IStatusHandler IStatusHandler handleStatus IStatus handleStatus IStatus CoreException IStatusHandler DebugPlugin getDefault getStatusHandler DebugUIPlugin getStandardDisplay getThread currentThread handleStatus CoreException CoreException handleStatus CoreException notifyAll DebugUIPlugin getStandardDisplay asyncExec InterruptedException

public class Remove Action extends Source Container Action public Remove Action super Source LookupUI Messages get String source Tab remove Button NON NLS 1  RemoveAction SourceContainerAction RemoveAction SourceLookupUIMessages getString sourceTab removeButton
Removes all selected entries see I Action run public void run List targets get Ordered Selection List list get Entries As List list remove All targets set Entries list  IAction getOrderedSelection getEntriesAsList removeAll setEntries
see Selection Listener Action update Selection I Structured Selection protected boolean update Selection I Structured Selection selection check that something is selected and it is a root tree node return selection is Empty get Viewer get Tree get Selection 0 get Parent Item null  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection isEmpty getViewer getTree getSelection getParentItem

public Object handle Status I Status status Object source throws Core Exception Object args Object source List sources List args 1 return resolve Source Element sources  handleStatus IStatus CoreException resolveSourceElement
public Object resolve Source Element List sources Object file null sources remove Source Not Found Editors sources if sources size 1 return sources get 0 else if sources size 0 return null Element List Selection Dialog dialog new Element List Selection Dialog DebugUI Plugin get Shell new Source Element Label Provider dialog set Multiple Selection false dialog set Title Source LookupUI Messages get String Resolve Duplicates Handler 0 NON NLS 1 dialog set Message Source LookupUI Messages get String Resolve Duplicates Handler 1 NON NLS 1 dialog set Elements sources to Array dialog open if dialog get Return Code Window OK file dialog get First Result return file  resolveSourceElement removeSourceNotFoundEditors ElementListSelectionDialog ElementListSelectionDialog DebugUIPlugin getShell SourceElementLabelProvider setMultipleSelection setTitle SourceLookupUIMessages getString ResolveDuplicatesHandler setMessage SourceLookupUIMessages getString ResolveDuplicatesHandler setElements toArray getReturnCode getFirstResult
Remove extra source not found editors if any If multiple source not found editors and no real source inputs return the first source not found editor param sources the list to be filtered return the filtered list may be empty private List remove Source Not Found Editors List sources Iterator iterator sources iterator List filtered List new Array List Object next while iterator has Next next iterator next if next instanceof Common Source Not Found Editor filtered List add next if filtered List is Empty sources get 0 null filtered List add sources get 0 return filtered List  removeSourceNotFoundEditors filteredList ArrayList hasNext CommonSourceNotFoundEditor filteredList filteredList isEmpty filteredList filteredList

private I Source Lookup Director f Director public Restore Default Action super Source LookupUI Messages get String source Tab default Button NON NLS 1  ISourceLookupDirector fDirector RestoreDefaultAction SourceLookupUIMessages getString sourceTab defaultButton
see I Action run public void run I Source Container containers new I Source Container 1 containers 0 new Default Source Container containers 0 init f Director get Viewer set Entries containers set Enabled false  IAction ISourceContainer ISourceContainer DefaultSourceContainer fDirector getViewer setEntries setEnabled
public void set Source Lookup Director I Source Lookup Director director f Director director  setSourceLookupDirector ISourceLookupDirector fDirector
see Selection Listener Action update Selection I Structured Selection protected boolean update Selection I Structured Selection selection disable if selection is empty default already present or non root node selected I Source Container containers get Viewer get Entries if containers null containers length 1 if containers 0 instanceof Default Source Container return false return true  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection ISourceContainer getViewer getEntries DefaultSourceContainer

The constructor for the action param label the label for the action s button public Source Container Action String label super label  SourceContainerAction
Sets the viewer on which this action operates param viewer the viewer on which this action operates public void set Viewer Source Container Viewer viewer if f Viewer null f Viewer remove Selection Changed Listener this f Viewer viewer if f Viewer null f Viewer add Selection Changed Listener this update  setViewer SourceContainerViewer fViewer fViewer removeSelectionChangedListener fViewer fViewer fViewer addSelectionChangedListener
Returns the viewer on which this action operates return the viewer on which this action operates protected Source Container Viewer get Viewer return f Viewer  SourceContainerViewer getViewer fViewer
Returns the selected items in the list in the order they are displayed return targets for an action protected List get Ordered Selection List targets new Array List List selection I Structured Selection get Viewer get Selection to List I Source Container entries get Viewer get Entries for int i 0 i entries length i I Source Container target entries i if selection contains target targets add target return targets  getOrderedSelection ArrayList IStructuredSelection getViewer getSelection toList ISourceContainer getViewer getEntries ISourceContainer
Returns a list copy of the entries in the viewer protected List get Entries As List I Source Container entries get Viewer get Entries List list new Array List entries length for int i 0 i entries length i list add entries i return list  getEntriesAsList ISourceContainer getViewer getEntries ArrayList
Updates the entries to the entries in the given list protected void set Entries List list get Viewer set Entries I Source Container list to Array new I Source Container list size update all selection listeners get Viewer set Selection get Viewer get Selection  setEntries getViewer setEntries ISourceContainer toArray ISourceContainer getViewer setSelection getViewer getSelection
Returns whether the item at the given index in the list visually is selected protected boolean is Index Selected I Structured Selection selection int index if selection is Empty return false Iterator entries selection iterator List list get Entries As List while entries has Next Object next entries next if list index Of next index return true return false  isIndexSelected IStructuredSelection isEmpty getEntriesAsList hasNext indexOf
Sets the button that invokes this action public void set Button Button button f Button button button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt run  setButton fButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent
see I Action set Enabled boolean public void set Enabled boolean enabled super set Enabled enabled if f Button null f Button set Enabled enabled  IAction setEnabled setEnabled setEnabled fButton fButton setEnabled
Updates the enabled state protected void update selection Changed I Structured Selection get Viewer get Selection  selectionChanged IStructuredSelection getViewer getSelection
Returns the shell used to realize this action s dialog if any protected Shell get Shell if f Shell null f Shell get Viewer get Control get Shell return f Shell  getShell fShell fShell getViewer getControl getShell fShell
Sets the shell used to realize this action s dialog if any public void set Shell Shell shell f Shell shell  setShell fShell

public Object get Adapter Object adaptable Object Class adapter Type if adapter Type equals I Workbench Adapter class return new Source Container Workbench Adapter return null  getAdapter adaptableObject adapterType adapterType IWorkbenchAdapter SourceContainerWorkbenchAdapter
see org eclipse core runtime I Adapter Factory get Adapter List public Class get Adapter List return new Class I Workbench Adapter class  IAdapterFactory getAdapterList getAdapterList IWorkbenchAdapter

public Image get Image Object element first allow workbench adapter to provide image Image image get Workbench Label Provider get Image element if image null I Source Container Type type null if element instanceof I Source Container type I Source Container element get Type else if element instanceof I Source Container Type type I Source Container Type element if type null next consult contributed image image Source LookupUI Utils get Source Container Image type get Id if image null return image return super get Image element  getImage getWorkbenchLabelProvider getImage ISourceContainerType ISourceContainer ISourceContainer getType ISourceContainerType ISourceContainerType SourceLookupUIUtils getSourceContainerImage getId getImage
public String get Text Object element first allo workbench adapter to provide label String label get Workbench Label Provider get Text element if label null label length 0 if element instanceof I Source Container return I Source Container element get Name else if element instanceof I Source Container Type return I Source Container Type element get Name else return label return super get Text element  getText getWorkbenchLabelProvider getText ISourceContainer ISourceContainer getName ISourceContainerType ISourceContainerType getName getText
private I Label Provider get Workbench Label Provider if f Label Provider null f Label Provider new Workbench Label Provider return f Label Provider  ILabelProvider getWorkbenchLabelProvider fLabelProvider fLabelProvider WorkbenchLabelProvider fLabelProvider
public void dispose super dispose if f Label Provider null f Label Provider dispose  fLabelProvider fLabelProvider

see I Structured Content Provider get Elements Object public Object get Elements Object input Element return get Entries  IStructuredContentProvider getElements getElements inputElement getEntries
see I Content Provider dispose public void dispose  IContentProvider
see I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
see org eclipse jface viewers I Tree Content Provider get Children java lang Object public Object get Children Object parent Element try return I Source Container parent Element get Source Containers catch Core Exception e return new Object 0  ITreeContentProvider getChildren getChildren parentElement ISourceContainer parentElement getSourceContainers CoreException
see org eclipse jface viewers I Tree Content Provider get Parent java lang Object public Object get Parent Object element TODO return null  ITreeContentProvider getParent getParent
see org eclipse jface viewers I Tree Content Provider has Children java lang Object public boolean has Children Object element return I Source Container element is Composite  ITreeContentProvider hasChildren hasChildren ISourceContainer isComposite
Creates a runtime classpath viewer with the given parent param parent the parent control param panel the panel hosting this viewer public Source Container Viewer Composite parent Source Lookup Panel panel super parent set Content Provider new Content Provider Source Container Label Provider lp new Source Container Label Provider set Label Provider lp f Panel panel  SourceContainerViewer SourceLookupPanel setContentProvider ContentProvider SourceContainerLabelProvider SourceContainerLabelProvider setLabelProvider fPanel
Sets the entries in this viewer param entries source container entries public void set Entries I Source Container entries f Entries clear for int i 0 i entries length i if entries i null f Entries add entries i if get Input null set Input f Entries select first item in list if f Entries is Empty f Entries get 0 null set Selection new Structured Selection f Entries get 0 else refresh f Panel set Dirty true f Panel update Launch Configuration Dialog  setEntries ISourceContainer fEntries fEntries getInput setInput fEntries fEntries isEmpty fEntries setSelection StructuredSelection fEntries fPanel setDirty fPanel updateLaunchConfigurationDialog
Returns the entries in this viewer return the entries in this viewer public I Source Container get Entries return I Source Container f Entries to Array new I Source Container f Entries size  ISourceContainer getEntries ISourceContainer fEntries toArray ISourceContainer fEntries
Adds the given entries to the list If there is no selection in the list the entries are added at the end of the list otherwise the new entries are added before the first selected entry The new entries are selected param entries additions public void add Entries I Source Container entries I Structured Selection sel I Structured Selection get Selection if sel is Empty for int i 0 i entries length i if f Entries contains entries i f Entries add entries i else int index f Entries index Of sel get First Element for int i 0 i entries length i if f Entries contains entries i f Entries add index entries i index if f Entries is Empty f Entries get 0 null set Selection new Structured Selection f Entries get 0 refresh f Panel set Dirty true f Panel update Launch Configuration Dialog  addEntries ISourceContainer IStructuredSelection IStructuredSelection getSelection isEmpty fEntries fEntries fEntries indexOf getFirstElement fEntries fEntries fEntries isEmpty fEntries setSelection StructuredSelection fEntries fPanel setDirty fPanel updateLaunchConfigurationDialog
Enables disables this viewer Note the control is not disabled since we still want the user to be able to scroll if required to see the existing entries Just actions should be disabled public void set Enabled boolean enabled f Enabled enabled fire selection change to upate actions set Selection get Selection  setEnabled fEnabled setSelection getSelection
Returns whether this viewer is enabled public boolean is Enabled return f Enabled  isEnabled fEnabled
Returns the index of an equivalent entry or 1 if none return the index of an equivalent entry or 1 if none public int index Of I Source Container entry return f Entries index Of entry  indexOf ISourceContainer fEntries indexOf
Returns the source locator associated with the parent panel return the source locator public I Source Lookup Director get Source Locator return f Panel f Locator  ISourceLookupDirector getSourceLocator fPanel fLocator

see org eclipse ui model I Workbench Adapter get Children java lang Object public Object get Children Object o return null  IWorkbenchAdapter getChildren getChildren
see org eclipse ui model I Workbench Adapter get Image Descriptor java lang Object public Image Descriptor get Image Descriptor Object object return null  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor
public String get Label Object o if o instanceof Directory Source Container Directory Source Container container Directory Source Container o File file container get Directory I Path path new Path file get Absolute Path return Source Element Workbench Adapter get Qualified Name path if o instanceof Folder Source Container Folder Source Container container Folder Source Container o return Source Element Workbench Adapter get Qualified Name container get Container get Full Path if o instanceof Archive Source Container Archive Source Container container Archive Source Container o return Source Element Workbench Adapter get Qualified Name container get File get Full Path if o instanceof External Archive Source Container External Archive Source Container container External Archive Source Container o I Path path new Path container get Name return Source Element Workbench Adapter get Qualified Name path return NON NLS 1  getLabel DirectorySourceContainer DirectorySourceContainer DirectorySourceContainer getDirectory IPath getAbsolutePath SourceElementWorkbenchAdapter getQualifiedName FolderSourceContainer FolderSourceContainer FolderSourceContainer SourceElementWorkbenchAdapter getQualifiedName getContainer getFullPath ArchiveSourceContainer ArchiveSourceContainer ArchiveSourceContainer SourceElementWorkbenchAdapter getQualifiedName getFile getFullPath ExternalArchiveSourceContainer ExternalArchiveSourceContainer ExternalArchiveSourceContainer IPath getName SourceElementWorkbenchAdapter getQualifiedName
see org eclipse ui model I Workbench Adapter get Parent java lang Object public Object get Parent Object o return null  IWorkbenchAdapter getParent getParent

public Object get Adapter Object adaptable Object Class adapter Type if adapter Type equals I Workbench Adapter class return new Source Element Workbench Adapter return null  getAdapter adaptableObject adapterType adapterType IWorkbenchAdapter SourceElementWorkbenchAdapter
see org eclipse core runtime I Adapter Factory get Adapter List public Class get Adapter List return new Class I Workbench Adapter class  IAdapterFactory getAdapterList getAdapterList IWorkbenchAdapter

private I Label Provider get Workbench Label Provider if f Label Provider null f Label Provider new Workbench Label Provider return f Label Provider  ILabelProvider getWorkbenchLabelProvider fLabelProvider fLabelProvider WorkbenchLabelProvider fLabelProvider
public void dispose super dispose if f Label Provider null f Label Provider dispose  fLabelProvider fLabelProvider
see org eclipse jface viewers I Label Provider get Image java lang Object public Image get Image Object element return get Workbench Label Provider get Image element  ILabelProvider getImage getImage getWorkbenchLabelProvider getImage
public String get Text Object element if element instanceof I Resource return Source Element Workbench Adapter get Qualified Name I Resource element get Full Path return get Workbench Label Provider get Text element  getText IResource SourceElementWorkbenchAdapter getQualifiedName IResource getFullPath getWorkbenchLabelProvider getText

see org eclipse ui model I Workbench Adapter get Children java lang Object public Object get Children Object o return null  IWorkbenchAdapter getChildren getChildren
public Image Descriptor get Image Descriptor Object o if o instanceof Local File Storage o instanceof Zip Entry Storage return PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG OBJ FILE return null  ImageDescriptor getImageDescriptor LocalFileStorage ZipEntryStorage getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_OBJ_FILE
public String get Label Object o if o instanceof Local File Storage Local File Storage storage Local File Storage o I Path path storage get Full Path return get Qualified Name path if o instanceof Zip Entry Storage Zip Entry Storage storage Zip Entry Storage o String Buffer buffer new String Buffer buffer append storage get Zip Entry get Name buffer append NON NLS 1 buffer append storage get Archive get Name return buffer to String return NON NLS 1  getLabel LocalFileStorage LocalFileStorage LocalFileStorage IPath getFullPath getQualifiedName ZipEntryStorage ZipEntryStorage ZipEntryStorage StringBuffer StringBuffer getZipEntry getName getArchive getName toString
see org eclipse ui model I Workbench Adapter get Parent java lang Object public Object get Parent Object o return null  IWorkbenchAdapter getParent getParent
public static String get Qualified Name I Path path String Buffer buffer new String Buffer String segments path segments if segments length 0 buffer append path last Segment if segments length 1 buffer append NON NLS 1 if path get Device null buffer append path get Device for int i 0 i segments length 1 i buffer append File separator Char buffer append segments i return buffer to String return NON NLS 1  getQualifiedName IPath StringBuffer StringBuffer lastSegment getDevice getDevice separatorChar toString

Creates and returns the source lookup control param parent the parent widget of this control public void create Control Composite parent Font font parent get Font Composite comp new Composite parent SWT NONE Grid Layout top Layout new Grid Layout top Layout num Columns 2 comp set Layout top Layout Grid Data gd new Grid Data Grid Data FILL BOTH comp set Layout Data gd Label viewer Label new Label comp SWT LEFT viewer Label set Text Source LookupUI Messages get String source Tab lookup Label NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 viewer Label set Layout Data gd viewer Label set Font font f Path Viewer new Source Container Viewer comp this gd new Grid Data Grid Data FILL BOTH f Path Viewer get Control set Layout Data gd f Path Viewer get Control set Font font I Working Set Manager working Set Mgr DebugUI Plugin get Default get Workbench get Working Set Manager listen to changes user made to the working sets if a working set is being removed check current list to validate working sets working Set Mgr add Property Change Listener this Composite path Button Comp new Composite comp SWT NONE Grid Layout path Button Layout new Grid Layout path Button Layout margin Height 0 path Button Layout margin Width 0 path Button Comp set Layout path Button Layout gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data HORIZONTAL ALIGN FILL path Button Comp set Layout Data gd path Button Comp set Font font create Vertical Spacer comp 2 f Duplicates Button new Button comp SWT CHECK f Duplicates Button set Text Source LookupUI Messages get String source Tab search Duplicate Label NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 f Duplicates Button set Layout Data gd f Duplicates Button set Font font f Duplicates Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt set Dirty true update Launch Configuration Dialog GC gc new GC parent gc set Font parent get Font Font Metrics font Metrics gc get Font Metrics gc dispose f Add Action new Add Container Action Button button create Push Button path Button Comp f Add Action get Text font Metrics f Add Action set Button button add Action f Add Action f Edit Action new Edit Container Action button create Push Button path Button Comp f Edit Action get Text font Metrics f Edit Action set Button button add Action f Edit Action Source Container Action action new Remove Action button create Push Button path Button Comp action get Text font Metrics action set Button button add Action action action new Up Action button create Push Button path Button Comp action get Text font Metrics action set Button button add Action action action new Down Action button create Push Button path Button Comp action get Text font Metrics action set Button button add Action action f Restore Default Action new Restore Default Action button create Push Button path Button Comp f Restore Default Action get Text font Metrics f Restore Default Action set Button button add Action f Restore Default Action retarget Actions f Path Viewer Dialog apply Dialog Font comp set Control comp  createControl getFont GridLayout topLayout GridLayout topLayout numColumns setLayout topLayout GridData GridData GridData FILL_BOTH setLayoutData viewerLabel viewerLabel setText SourceLookupUIMessages getString sourceTab lookupLabel GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan viewerLabel setLayoutData viewerLabel setFont fPathViewer SourceContainerViewer GridData GridData FILL_BOTH fPathViewer getControl setLayoutData fPathViewer getControl setFont IWorkingSetManager workingSetMgr DebugUIPlugin getDefault getWorkbench getWorkingSetManager workingSetMgr addPropertyChangeListener pathButtonComp GridLayout pathButtonLayout GridLayout pathButtonLayout marginHeight pathButtonLayout marginWidth pathButtonComp setLayout pathButtonLayout GridData GridData VERTICAL_ALIGN_BEGINNING GridData HORIZONTAL_ALIGN_FILL pathButtonComp setLayoutData pathButtonComp setFont createVerticalSpacer fDuplicatesButton fDuplicatesButton setText SourceLookupUIMessages getString sourceTab searchDuplicateLabel GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan fDuplicatesButton setLayoutData fDuplicatesButton setFont fDuplicatesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setDirty updateLaunchConfigurationDialog setFont getFont FontMetrics fontMetrics getFontMetrics fAddAction AddContainerAction createPushButton pathButtonComp fAddAction getText fontMetrics fAddAction setButton addAction fAddAction fEditAction EditContainerAction createPushButton pathButtonComp fEditAction getText fontMetrics fEditAction setButton addAction fEditAction SourceContainerAction RemoveAction createPushButton pathButtonComp getText fontMetrics setButton addAction UpAction createPushButton pathButtonComp getText fontMetrics setButton addAction DownAction createPushButton pathButtonComp getText fontMetrics setButton addAction fRestoreDefaultAction RestoreDefaultAction createPushButton pathButtonComp fRestoreDefaultAction getText fontMetrics fRestoreDefaultAction setButton addAction fRestoreDefaultAction retargetActions fPathViewer applyDialogFont setControl
Creates and returns a button param parent parent widget param label label return Button protected Button create Push Button Composite parent String label Font Metrics font Metrics Button button new Button parent SWT PUSH button set Font parent get Font button set Text label Grid Data gd get Button Grid Data button font Metrics button set Layout Data gd return button  createPushButton FontMetrics fontMetrics setFont getFont setText GridData getButtonGridData fontMetrics setLayoutData
private Grid Data get Button Grid Data Button button Font Metrics font Metrics Grid Data gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING int width Hint Dialog convert HorizontalDL Us To Pixels font Metrics I Dialog Constants BUTTON WIDTH gd width Hint Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x gd height Hint Dialog convert VerticalDL Us To Pixels font Metrics I Dialog Constants BUTTON HEIGHT return gd  GridData getButtonGridData FontMetrics fontMetrics GridData GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING widthHint convertHorizontalDLUsToPixels fontMetrics IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize heightHint convertVerticalDLUsToPixels fontMetrics IDialogConstants BUTTON_HEIGHT
Create some empty space protected void create Vertical Spacer Composite comp int col Span Label label new Label comp SWT NONE Grid Data gd new Grid Data gd horizontal Span col Span label set Layout Data gd  createVerticalSpacer colSpan GridData GridData horizontalSpan colSpan setLayoutData
Adds the given action to the action collection in this tab protected void add Action Source Container Action action f Actions add action  addAction SourceContainerAction fActions
Re targets actions to the given viewer protected void retarget Actions Source Container Viewer viewer Iterator actions f Actions iterator while actions has Next Source Container Action action Source Container Action actions next action set Viewer viewer  retargetActions SourceContainerViewer fActions hasNext SourceContainerAction SourceContainerAction setViewer
Initializes this control based on the settings in the given launch configuration public void initialize From I Launch Configuration configuration if f Locator null f Locator dispose f Locator null set Error Message null set Message null String memento null String type null try memento configuration get Attribute I Launch Configuration ATTR SOURCE LOCATOR MEMENTO String null type configuration get Attribute I Launch Configuration ATTR SOURCE LOCATOR ID String null if type null type configuration get Type get Source Locator Id catch Core Exception e set Error Message e get Message return if type null set Error Message Source LookupUI Messages get String source Lookup Panel 2 NON NLS 1 return boolean migration false try I Source Locator locator get Launch Manager new Source Locator type if locator instanceof Abstract Source Lookup Director migrate to the new source lookup infrastructure memento null don t use old memento type configuration get Type get Source Locator Id if type null set Error Message Source LookupUI Messages get String source Lookup Panel 2 NON NLS 1 return locator get Launch Manager new Source Locator type if locator instanceof Abstract Source Lookup Director set Error Message Source LookupUI Messages get String source Lookup Panel 2 NON NLS 1 return migration true f Locator Abstract Source Lookup Director locator if memento null f Locator initialize Defaults configuration else f Locator initialize From Memento memento configuration catch Core Exception e set Error Message e get Message return initialize From f Locator if migration configuration is Working Copy ensure perform apply actual updates the config set Dirty true perform Apply I Launch Configuration Working Copy configuration  initializeFrom ILaunchConfiguration fLocator fLocator fLocator setErrorMessage setMessage getAttribute ILaunchConfiguration ATTR_SOURCE_LOCATOR_MEMENTO getAttribute ILaunchConfiguration ATTR_SOURCE_LOCATOR_ID getType getSourceLocatorId CoreException setErrorMessage getMessage setErrorMessage SourceLookupUIMessages getString sourceLookupPanel ISourceLocator getLaunchManager newSourceLocator AbstractSourceLookupDirector getType getSourceLocatorId setErrorMessage SourceLookupUIMessages getString sourceLookupPanel getLaunchManager newSourceLocator AbstractSourceLookupDirector setErrorMessage SourceLookupUIMessages getString sourceLookupPanel fLocator AbstractSourceLookupDirector fLocator initializeDefaults fLocator initializeFromMemento CoreException setErrorMessage getMessage initializeFrom fLocator isWorkingCopy setDirty performApply ILaunchConfigurationWorkingCopy
Initializes this control based on the settings in the given Abstract Source Lookup Director public void initialize From I Source Lookup Director locator if f Config null f Config locator get Launch Configuration f Path Viewer set Entries locator get Source Containers f Duplicates Button set Selection locator is Find Duplicates f Locator locator f Add Action set Source Lookup Director locator f Edit Action set Source Lookup Director locator f Restore Default Action set Source Lookup Director locator set Dirty false  AbstractSourceLookupDirector initializeFrom ISourceLookupDirector fConfig fConfig getLaunchConfiguration fPathViewer setEntries getSourceContainers fDuplicatesButton setSelection isFindDuplicates fLocator fAddAction setSourceLookupDirector fEditAction setSourceLookupDirector fRestoreDefaultAction setSourceLookupDirector setDirty
Saves the containers and duplicate policy into the given working copy of the configuration Saving the configuration will result in a change event which will be picked up by the director and used to refresh its internal list param containers the list of containers entered by the user param duplicates true if the user checked the duplicates check box false otherwise param working Copy the working copy of the configuration that these values should be stored in may be null If null will be written into a working copy of the configuration referenced by the director public void perform Apply I Launch Configuration Working Copy configuration if is Dirty if f Locator null configuration set Attribute I Launch Configuration ATTR SOURCE LOCATOR MEMENTO String null configuration set Attribute I Launch Configuration ATTR SOURCE LOCATOR ID String null return I Launch Configuration Working Copy working Copy null if configuration null try working Copy f Locator get Launch Configuration get Working Copy catch Core Exception e DebugUI Plugin log e set Error Message Source LookupUI Messages get String source Lookup Panel 1 NON NLS 1 return else working Copy configuration if working Copy null DebugUI Plugin log Error Message Source LookupUI Messages get String source Lookup Panel 1 NON NLS 1 return set new values in director so memento returned is correct f Locator set Source Containers f Path Viewer get Entries f Locator set Find Duplicates f Duplicates Button get Selection writing to the file will cause a change event and the listeners will be updated try if is Default working Copy working Copy set Attribute I Launch Configuration ATTR SOURCE LOCATOR MEMENTO String null working Copy set Attribute I Launch Configuration ATTR SOURCE LOCATOR ID String null else working Copy set Attribute I Launch Configuration ATTR SOURCE LOCATOR MEMENTO f Locator get Memento working Copy set Attribute I Launch Configuration ATTR SOURCE LOCATOR ID f Locator get Id if configuration null working Copy do Save set Dirty false catch Core Exception e DebugUI Plugin log e set Error Message Source LookupUI Messages get String source Lookup Panel 1 NON NLS 1  workingCopy performApply ILaunchConfigurationWorkingCopy isDirty fLocator setAttribute ILaunchConfiguration ATTR_SOURCE_LOCATOR_MEMENTO setAttribute ILaunchConfiguration ATTR_SOURCE_LOCATOR_ID ILaunchConfigurationWorkingCopy workingCopy workingCopy fLocator getLaunchConfiguration getWorkingCopy CoreException DebugUIPlugin setErrorMessage SourceLookupUIMessages getString sourceLookupPanel workingCopy workingCopy DebugUIPlugin logErrorMessage SourceLookupUIMessages getString sourceLookupPanel fLocator setSourceContainers fPathViewer getEntries fLocator setFindDuplicates fDuplicatesButton getSelection isDefault workingCopy workingCopy setAttribute ILaunchConfiguration ATTR_SOURCE_LOCATOR_MEMENTO workingCopy setAttribute ILaunchConfiguration ATTR_SOURCE_LOCATOR_ID workingCopy setAttribute ILaunchConfiguration ATTR_SOURCE_LOCATOR_MEMENTO fLocator getMemento workingCopy setAttribute ILaunchConfiguration ATTR_SOURCE_LOCATOR_ID fLocator getId workingCopy doSave setDirty CoreException DebugUIPlugin setErrorMessage SourceLookupUIMessages getString sourceLookupPanel
protected boolean is Default I Launch Configuration configuration I Source Container current get Entries return current length 1 current 0 instanceof Default Source Container  isDefault ILaunchConfiguration ISourceContainer getEntries DefaultSourceContainer
Returns the entries visible in the viewer public I Source Container get Entries return f Path Viewer get Entries  ISourceContainer getEntries fPathViewer getEntries
Marks the panel as dirty public void set Dirty boolean dirty super set Dirty dirty  setDirty setDirty
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Source LookupUI Messages get String source Tab tab Title NON NLS 1  ILaunchConfigurationTab getName getName SourceLookupUIMessages getString sourceTab tabTitle
see org eclipse debug ui I Launch Configuration Tab set Defaults org eclipse debug core I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy
protected void update Launch Configuration Dialog if get Launch Configuration Dialog null super update Launch Configuration Dialog  updateLaunchConfigurationDialog getLaunchConfigurationDialog updateLaunchConfigurationDialog
This is called whenever a working set has been removed Loops through the original list of working sets the user stores in the configuration If the one being removed is in the list remove it from the list param affected Working Set the working set being removed private void validate Working Set Source Containers I Working Set affected Working Set List source Containers List f Path Viewer get Input if source Containers null for int i 0 i source Containers size i if source Containers get i instanceof Working Set Source Container Working Set Source Container ws Src Container Working Set Source Container source Containers get i if ws Src Container get Name equals affected Working Set get Name source Containers remove i  affectedWorkingSet validateWorkingSetSourceContainers IWorkingSet affectedWorkingSet sourceContainers fPathViewer getInput sourceContainers sourceContainers sourceContainers WorkingSetSourceContainer WorkingSetSourceContainer wsSrcContainer WorkingSetSourceContainer sourceContainers wsSrcContainer getName affectedWorkingSet getName sourceContainers
Listen to working set changes param event public void property Change Property Change Event event if the Property Change Event has change Id CHANGE WORKING SET REMOVE validate the list to make sure all working sets are valid if event get Property equals I Working Set Manager CHANGE WORKING SET REMOVE validate Working Set Source Containers I Working Set event get Old Value if the Property Change Event has change Id CHANGE WORKING SET NAME CHANGE do nothing because the event only has new Value since old Value is not provided there is no way to identify which working set does the new Value corresponds to  propertyChange PropertyChangeEvent PropertyChangeEvent changeId CHANGE_WORKING_SET_REMOVE getProperty IWorkingSetManager CHANGE_WORKING_SET_REMOVE validateWorkingSetSourceContainers IWorkingSet getOldValue PropertyChangeEvent changeId CHANGE_WORKING_SET_NAME_CHANGE newValue oldValue newValue
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy initialize From working Copy  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy initializeFrom workingCopy
Returns the source lookup director associated with this panel or code null code if none return the source lookup director associated with this panel or code null code if none public I Source Lookup Director get Director return f Locator  ISourceLookupDirector getDirector fLocator
public void dispose super dispose I Working Set Manager working Set Mgr DebugUI Plugin get Default get Workbench get Working Set Manager listen to changes user made to the working sets if a working set is being removed check current list to validate working sets working Set Mgr remove Property Change Listener this  IWorkingSetManager workingSetMgr DebugUIPlugin getDefault getWorkbench getWorkingSetManager workingSetMgr removePropertyChangeListener

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Source LookupUI Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE SourceLookupUIMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

Constructor Reads in Source Container Presentation extension implementations public Source LookupUI Utils I Extension Point extension Point Platform get Extension Registry get Extension Point DebugUI Plugin get Unique Identifier CONTAINER PRESENTATION EXTENSION read in Source Container presentation extensions I Configuration Element source Container Presentation Extensions extension Point get Configuration Elements f Source Container Presentation Hashtable new Hashtable for int i 0 i source Container Presentation Extensions length i f Source Container Presentation Hashtable put source Container Presentation Extensions i get Attribute CONTAINER ID ATTRIBUTE source Container Presentation Extensions i register Container Images source Container Presentation Extensions i  SourceLookupUIUtils IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugUIPlugin getUniqueIdentifier CONTAINER_PRESENTATION_EXTENSION SourceContainer IConfigurationElement sourceContainerPresentationExtensions extensionPoint getConfigurationElements fSourceContainerPresentationHashtable sourceContainerPresentationExtensions fSourceContainerPresentationHashtable sourceContainerPresentationExtensions getAttribute CONTAINER_ID_ATTRIBUTE sourceContainerPresentationExtensions registerContainerImages sourceContainerPresentationExtensions
Retrieves the icon associated with a source container type param id the container type id return the image for the type specified public static Image get Source Container Image String id if f Source Container Presentation Hashtable null new Source LookupUI Utils return Debug Plugin Images get Image id  getSourceContainerImage fSourceContainerPresentationHashtable SourceLookupUIUtils DebugPluginImages getImage
Retrieves the browser class associated with the source container type specified param typeID the source container type id return the browser class public static I Source Container Browser get Source Container Browser String typeID if f Source Container Presentation Hashtable null new Source LookupUI Utils I Configuration Element element I Configuration Element f Source Container Presentation Hashtable get typeID I Source Container Browser browser null try if element null element get Attribute BROWSER CLASS ATTRIBUTE null browser I Source Container Browser element create Executable Extension BROWSER CLASS ATTRIBUTE catch Core Exception e return browser  ISourceContainerBrowser getSourceContainerBrowser fSourceContainerPresentationHashtable SourceLookupUIUtils IConfigurationElement IConfigurationElement fSourceContainerPresentationHashtable ISourceContainerBrowser getAttribute BROWSER_CLASS_ATTRIBUTE ISourceContainerBrowser createExecutableExtension BROWSER_CLASS_ATTRIBUTE CoreException
private void register Container Images I Configuration Element config Element Bundle bundle Platform get Bundle config Element get Declaring Extension get Namespace URL iconURL bundle get Entry NON NLS 1 String icon Path config Element get Attribute ICON ATTRIBUTE Image Descriptor image Descriptor Image Descriptor get Missing Image Descriptor String config TypeID config Element get Attribute CONTAINER ID ATTRIBUTE Image Registry image Registry Debug Plugin Images get Image Registry Debug Plugin Images get Image Registry if icon Path null try iconURL new URL iconURL icon Path image Descriptor Image Descriptor create FromURL iconURL catch MalformedURL Exception mue DebugUI Plugin log mue image Registry put config TypeID image Descriptor  registerContainerImages IConfigurationElement configElement getBundle configElement getDeclaringExtension getNamespace getEntry iconPath configElement getAttribute ICON_ATTRIBUTE ImageDescriptor imageDescriptor ImageDescriptor getMissingImageDescriptor configTypeID configElement getAttribute CONTAINER_ID_ATTRIBUTE ImageRegistry imageRegistry DebugPluginImages getImageRegistry DebugPluginImages getImageRegistry iconPath iconPath imageDescriptor ImageDescriptor createFromURL MalformedURLException DebugUIPlugin imageRegistry configTypeID imageDescriptor

public class Up Action extends Source Container Action public Up Action super Source LookupUI Messages get String source Tab up Button NON NLS 1  UpAction SourceContainerAction UpAction SourceLookupUIMessages getString sourceTab upButton
Moves all selected entries up one position if possible see I Action run public void run List targets get Ordered Selection if targets is Empty return int top 0 int index 0 List list get Entries As List Iterator entries targets iterator while entries has Next Object target entries next index list index Of target if index top top index 1 Object temp list get top list set top target list set index temp top index set Entries list  IAction getOrderedSelection isEmpty getEntriesAsList hasNext indexOf setEntries
see Selection Listener Action update Selection I Structured Selection protected boolean update Selection I Structured Selection selection check that something is selected it s not first in the list and it is a root tree node return selection is Empty is Index Selected selection 0 get Viewer get Tree get Selection 0 get Parent Item null  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection isEmpty isIndexSelected getViewer getTree getSelection getParentItem

public String get Memento I Source Container container throws Core Exception Working Set Source Container working Set Working Set Source Container container Document doc new Document Element node doc create Element working Set NON NLS 1 node set Attribute name working Set get Name NON NLS 1 doc append Child node return serialize Document doc  getMemento ISourceContainer CoreException WorkingSetSourceContainer workingSet WorkingSetSourceContainer newDocument createElement workingSet setAttribute workingSet getName appendChild serializeDocument
public I Source Container create Source Container String memento throws Core Exception I Working Set working Set null Exception ex null try Element root null Document Builder parser Document Builder Factory new Instance new Document Builder String Reader reader new String Reader memento Input Source source new Input Source reader root parser parse source get Document Element String name root get Attribute name NON NLS 1 if is Empty name abort Source LookupUI Messages get String source Search init Error null NON NLS 1 working Set Workbench Plugin get Default get Working Set Manager get Working Set name check that set still exists if working Set null abort Source LookupUI Messages get String source Search init Error null NON NLS 1 return new Working Set Source Container working Set catch Parser Configuration Exception e ex e catch SAX Exception e ex e catch IO Exception e ex e abort Source LookupUI Messages get String source Search init Error ex NON NLS 1 return null  ISourceContainer createSourceContainer CoreException IWorkingSet workingSet DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder StringReader StringReader InputSource InputSource getDocumentElement getAttribute isEmpty SourceLookupUIMessages getString sourceSearch initError workingSet WorkbenchPlugin getDefault getWorkingSetManager getWorkingSet workingSet SourceLookupUIMessages getString sourceSearch initError WorkingSetSourceContainer workingSet ParserConfigurationException SAXException IOException SourceLookupUIMessages getString sourceSearch initError
private boolean is Empty String string return string null string length 0  isEmpty

The step filter manager is instantiated by the debug UI plug in and should be accessed from the code DebugUI Plugin code class protected Step Filter Manager Debug Plugin get Default get Launch Manager add Launch Listener this  DebugUIPlugin StepFilterManager DebugPlugin getDefault getLaunchManager addLaunchListener
This method is called by the debug UI plug in at shutdown public void shutdown Debug Plugin get Default get Launch Manager remove Launch Listener this  DebugPlugin getDefault getLaunchManager removeLaunchListener
see org eclipse debug core I Launch Listener launch Added org eclipse debug core I Launch public void launch Added I Launch launch launch Changed launch  ILaunchListener launchAdded ILaunch launchAdded ILaunch launchChanged
public void launch Changed I Launch launch boolean use Step Filters is Use Step Filters I Debug Target targets launch get Debug Targets for int i 0 i targets length i I Debug Target target targets i if target instanceof I Step Filters I Step Filters filters I Step Filters target if filters is Step Filters Enabled use Step Filters filters set Step Filters Enabled use Step Filters  launchChanged ILaunch useStepFilters isUseStepFilters IDebugTarget getDebugTargets IDebugTarget IStepFilters IStepFilters IStepFilters isStepFiltersEnabled useStepFilters setStepFiltersEnabled useStepFilters
Returns whether the use step filters preference is on return whether to use step filters public boolean is Use Step Filters return DebugUI Plugin get Default get Preference Store get Boolean I Internal DebugUI Constants PREF USE STEP FILTERS  isUseStepFilters DebugUIPlugin getDefault getPreferenceStore getBoolean IInternalDebugUIConstants PREF_USE_STEP_FILTERS
Sets whether to use step filters param use Filters whether to use step filters public void set Use Step Filters boolean use Filters DebugUI Plugin get Default get Preference Store set Value I Internal DebugUI Constants PREF USE STEP FILTERS use Filters I Launch launchs Debug Plugin get Default get Launch Manager get Launches for int i 0 i launchs length i I Launch launch launchs i launch Changed launch  useFilters setUseStepFilters useFilters DebugUIPlugin getDefault getPreferenceStore setValue IInternalDebugUIConstants PREF_USE_STEP_FILTERS useFilters ILaunch DebugPlugin getDefault getLaunchManager getLaunches ILaunch launchChanged
see org eclipse debug core I Launch Listener launch Removed org eclipse debug core I Launch public void launch Removed I Launch launch  ILaunchListener launchRemoved ILaunch launchRemoved ILaunch

int start inclusive int end exclusive public Position int start int end this start start this end end 
this end end public int get Start return start  getStart
return start public int get End return end  getEnd
String Matcher constructor takes in a String object that is a simple pattern which may contain for 0 and many characters and for exactly one character Literal and characters must be escaped in the pattern e g means literal etc Escaping any other character including the escape character itself just results in that character in the pattern e g a means a and means If invoking the String Matcher with string literals in Java don t forget escape characters are represented by param pattern the pattern to match text against param ignore Case if true case is ignored param ignore Wild Cards if true wild cards and their escape sequences are ignored everything is taken literally public String Matcher String pattern boolean ignore Case boolean ignore Wild Cards if pattern null throw new Illegal Argument Exception f Ignore Case ignore Case f Ignore Wild Cards ignore Wild Cards f Pattern pattern f Length pattern length if f Ignore Wild Cards parse No Wild Cards else parse Wild Cards  StringMatcher StringMatcher ignoreCase ignoreWildCards StringMatcher ignoreCase ignoreWildCards IllegalArgumentException fIgnoreCase ignoreCase fIgnoreWildCards ignoreWildCards fPattern fLength fIgnoreWildCards parseNoWildCards parseWildCards
Find the first occurrence of the pattern between code start code inclusive and code end code exclusive param code text code the String object to search in param code start code the starting index of the search range inclusive param code end code the ending index of the search range exclusive return an code String Matcher Position code object that keeps the starting inclusive and ending positions exclusive of the first occurrence of the pattern in the specified range of the text return null if not found or subtext is empty start end A pair of zeros is returned if pattern is empty string Note that for pattern like abc with leading and trailing stars position of abc is returned For a pattern like in text abcdf 1 3 is returned public String Matcher Position find String text int start int end if text null throw new Illegal Argument Exception int tlen text length if start 0 start 0 if end tlen end tlen if end 0 start end return null if f Length 0 return new Position start start if f Ignore Wild Cards int x pos In text start end if x 0 return null return new Position x x f Length int seg Count f Segments length if seg Count 0 pattern contains only s return new Position start end int cur Pos start int match Start 1 int i for i 0 i seg Count cur Pos end i String current f Segments i int next Match reg Exp Pos In text cur Pos end current if next Match 0 return null if i 0 match Start next Match cur Pos next Match current length if i seg Count return null return new Position match Start cur Pos  StringMatcher StringMatcher IllegalArgumentException fLength fIgnoreWildCards posIn fLength segCount fSegments segCount curPos matchStart segCount curPos fSegments nextMatch regExpPosIn curPos nextMatch matchStart nextMatch curPos nextMatch segCount matchStart curPos
match the given code text code with the pattern return true if matched eitherwise false param code text code a String object public boolean match String text return match text 0 text length 
Given the starting inclusive and the ending exclusive positions in the code text code determine if the given substring matches with a Pattern return true if the specified portion of the text matches the pattern param String code text code a String object that contains the substring to match param int code start code marks the starting position inclusive of the substring param int code end code marks the ending index exclusive of the substring public boolean match String text int start int end if null text throw new Illegal Argument Exception if start end return false if f Ignore Wild Cards return end start f Length f Pattern region Matches f Ignore Case 0 text start f Length int seg Count f Segments length if seg Count 0 f Has Leading Star f Has Trailing Star pattern contains only s return true if start end return f Length 0 if f Length 0 return start end int tlen text length if start 0 start 0 if end tlen end tlen int t Cur Pos start int bound end f Bound if bound 0 return false int i 0 String current f Segments i int seg Length current length process first segment if f Has Leading Star if reg Exp Region Matches text start current 0 seg Length return false else i t Cur Pos t Cur Pos seg Length if f Segments length 1 f Has Leading Star f Has Trailing Star only one segment to match no wildcards specified return t Cur Pos end process middle segments while i seg Count current f Segments i int current Match int k current index Of f Single Wild Card if k 0 current Match text Pos In text t Cur Pos end current if current Match 0 return false else current Match reg Exp Pos In text t Cur Pos end current if current Match 0 return false t Cur Pos current Match current length i process final segment if f Has Trailing Star t Cur Pos end int clen current length return reg Exp Region Matches text end clen current 0 clen return i seg Count  aPattern IllegalArgumentException fIgnoreWildCards fLength fPattern regionMatches fIgnoreCase fLength segCount fSegments segCount fHasLeadingStar fHasTrailingStar fLength fLength tCurPos fBound fSegments segLength fHasLeadingStar regExpRegionMatches segLength tCurPos tCurPos segLength fSegments fHasLeadingStar fHasTrailingStar tCurPos segCount fSegments currentMatch indexOf fSingleWildCard currentMatch textPosIn tCurPos currentMatch currentMatch regExpPosIn tCurPos currentMatch tCurPos currentMatch fHasTrailingStar tCurPos regExpRegionMatches segCount
This method parses the given pattern into segments seperated by wildcard characters Since wildcards are not being used in this case the pattern consists of a single segment private void parse No Wild Cards f Segments new String 1 f Segments 0 f Pattern f Bound f Length  parseNoWildCards fSegments fSegments fPattern fBound fLength
Parses the given pattern into segments seperated by wildcard characters param p a String object that is a simple regular expression with and or private void parse Wild Cards if f Pattern starts With NON NLS 1 f Has Leading Star true if f Pattern ends With NON NLS 1 make sure it s not an escaped wildcard if f Length 1 f Pattern char At f Length 2 f Has Trailing Star true Vector temp new Vector int pos 0 String Buffer buf new String Buffer while pos f Length char c f Pattern char At pos switch c case if pos f Length buf append c else char next f Pattern char At pos if it s an escape sequence if next next next buf append next else not an escape sequence just insert literally buf append c buf append next break case if buf length 0 new segment temp add Element buf to String f Bound buf length buf set Length 0 break case append special character representing single match wildcard buf append f Single Wild Card break default buf append c add last buffer to segment list if buf length 0 temp add Element buf to String f Bound buf length f Segments new String temp size temp copy Into f Segments  parseWildCards fPattern startsWith fHasLeadingStar fPattern endsWith fLength fPattern charAt fLength fHasTrailingStar StringBuffer StringBuffer fLength fPattern charAt fLength fPattern charAt addElement toString fBound setLength fSingleWildCard addElement toString fBound fSegments copyInto fSegments
param code text code a string which contains no wildcard param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive return the starting index in the text of the pattern or 1 if not found protected int pos In String text int start int end no wild card in pattern int max end f Length if f Ignore Case int i text index Of f Pattern start if i 1 i max return 1 return i for int i start i max i if text region Matches true i f Pattern 0 f Length return i return 1  posIn fLength fIgnoreCase indexOf fPattern regionMatches fPattern fLength
param code text code a simple regular expression that may only contain s param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a simple regular expression that may contains param code case Ignored code wether the pattern is not casesensitive return the starting index in the text of the pattern or 1 if not found protected int reg Exp Pos In String text int start int end String p int plen p length int max end plen for int i start i max i if reg Exp Region Matches text i p 0 plen return i return 1  caseIgnored regExpPosIn regExpRegionMatches
return boolean param code text code a String to match param code start code int that indicates the starting index of match inclusive param code end code int that indicates the ending index of match exclusive param code p code String String a simple regular expression that may contain param code ignore Case code boolean indicating wether code p code is case sensitive protected boolean reg Exp Region Matches String text int t Start String p int p Start int plen while plen 0 char tchar text char At t Start char pchar p char At p Start process wild cards if f Ignore Wild Cards skip single wild cards if pchar f Single Wild Card continue if pchar tchar continue if f Ignore Case if Character to Upper Case tchar Character to Upper Case pchar continue comparing after converting to upper case doesn t handle all cases also compare after converting to lower case if Character to Lower Case tchar Character to Lower Case pchar continue return false return true  ignoreCase regExpRegionMatches tStart pStart charAt tStart charAt pStart fIgnoreWildCards fSingleWildCard fIgnoreCase toUpperCase toUpperCase toLowerCase toLowerCase
param code text code the string to match param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a string that has no wildcard param code ignore Case code boolean indicating wether code p code is case sensitive return the starting index in the text of the pattern or 1 if not found protected int text Pos In String text int start int end String p int plen p length int max end plen if f Ignore Case int i text index Of p start if i 1 i max return 1 return i for int i start i max i if text region Matches true i p 0 plen return i return 1  ignoreCase textPosIn fIgnoreCase indexOf regionMatches

see org eclipse debug internal ui stringsubstitution Resource Resolver translate Selected Resource org eclipse core resources I Resource protected I Resource translate Selected Resource I Resource resource return resource get Parent  ResourceResolver translateSelectedResource IResource IResource translateSelectedResource IResource getParent

Prompts the user to choose a file see Prompt Expander Base prompt public void prompt File Dialog dialog new File Dialog get Shell dialog set Text dialog Message dialog set File Name last Value null default Value last Value dialog Result String dialog open  PromptExpanderBase FileDialog FileDialog getShell setText dialogMessage setFileName lastValue defaultValue lastValue dialogResultString

Prompts the user to choose a folder see Prompt Expander Base prompt public void prompt Directory Dialog dialog new Directory Dialog get Shell dialog set Text dialog Message dialog set Filter Path last Value null default Value last Value dialog Result String dialog open  PromptExpanderBase DirectoryDialog DirectoryDialog getShell setText dialogMessage setFilterPath lastValue defaultValue lastValue dialogResultString

Selects and returns an argument for the given variable or code null code if none param variable the variable an arugment is being seleted for param the shell to create any dialogs on or code null code if none return argument for the given variable or code null code if none 

see org eclipse debug internal ui stringsubstitution Resource Resolver translate Selected Resource org eclipse core resources I Resource protected I Resource translate Selected Resource I Resource resource return resource get Project  ResourceResolver translateSelectedResource IResource IResource translateSelectedResource IResource getProject

Presents the user with the appropriate prompt for the variable to be expanded and sets the code dialog Result String code based on the user s selection  dialogResultString
Initializes values displayed when the user is prompted If a prompt hint and default value are supplied in the given variable value these are extracted for presentation param var Value the value of the variable from which the prompt hint and default value will be extracted protected void setup Dialog String var Value prompt Hint null default Value null dialog Result String null if var Value null int idx var Value index Of if idx 1 prompt Hint var Value substring 0 idx default Value var Value substring idx 1 else prompt Hint var Value if prompt Hint null dialog Message Message Format format String Substitution Messages get String Prompt Expander Base 0 new String prompt Hint NON NLS 1 else dialog Message String Substitution Messages get String Prompt Expander Base 1 NON NLS 1  varValue setupDialog varValue promptHint defaultValue dialogResultString varValue varValue indexOf promptHint varValue defaultValue varValue promptHint varValue promptHint dialogMessage MessageFormat StringSubstitutionMessages getString PromptExpanderBase promptHint dialogMessage StringSubstitutionMessages getString PromptExpanderBase
DebugUI Plugin get Standard Display sync Exec new Runnable public void run prompt  DebugUIPlugin getStandardDisplay syncExec
public String resolve Value I Dynamic Variable variable String argument String value null setup Dialog argument DebugUI Plugin get Standard Display sync Exec new Runnable public void run prompt if dialog Result String null value dialog Result String last Value dialog Result String return value  resolveValue IDynamicVariable setupDialog DebugUIPlugin getStandardDisplay syncExec dialogResultString dialogResultString lastValue dialogResultString
protected Shell get Shell Shell shell DebugUI Plugin get Standard Display get Active Shell if shell null shell DebugUI Plugin get Shell return shell  getShell DebugUIPlugin getStandardDisplay getActiveShell DebugUIPlugin getShell

public String resolve Value I Dynamic Variable variable String argument throws Core Exception I Resource resource null if argument null resource get Selected Resource variable else resource get Workspace Root find Member new Path argument if resource null resource exists resource translate Selected Resource resource if resource null resource exists return translate To Value resource variable abort Message Format format String Substitution Messages get String Resource Resolver 6 new String get Reference Expression variable argument null NON NLS 1 return null  resolveValue IDynamicVariable CoreException IResource getSelectedResource getWorkspaceRoot findMember translateSelectedResource translateToValue MessageFormat StringSubstitutionMessages getString ResourceResolver getReferenceExpression
Returns the resource applicable to this resolver relative to the selected resource This method is called when no argument is present in a variable expression For example this method might return the project for the selected resource param resource selected resource return resource applicable to this variable resolver protected I Resource translate Selected Resource I Resource resource return resource  IResource translateSelectedResource IResource
Returns the workspace root return workspace root protected I Workspace Root get Workspace Root return Resources Plugin get Workspace get Root  IWorkspaceRoot getWorkspaceRoot ResourcesPlugin getWorkspace getRoot
Returns an expression used to reference the given variable and optional argument For example code var name arg code param variable referenced variable param argument referenced argument or code null code return vraiable reference expression protected String get Reference Expression I Dynamic Variable variable String argument String Buffer reference new String Buffer reference append NON NLS 1 reference append variable get Name if argument null reference append NON NLS 1 reference append argument reference append NON NLS 1 return reference to String  var_name getReferenceExpression IDynamicVariable StringBuffer StringBuffer getName toString
Throws an exception with the given message and underlying exception param message exception message param exception underlying exception or code null code throws Core Exception protected void abort String message Throwable exception throws Core Exception throw new Core Exception new Status I Status ERROR DebugUI Plugin get Unique Identifier I DebugUI Constants INTERNAL ERROR message exception  CoreException CoreException CoreException IStatus DebugUIPlugin getUniqueIdentifier IDebugUIConstants INTERNAL_ERROR
Returns the selected resource param variable variable referencing a resource return selected resource throws Core Exception if there is no selection protected I Resource get Selected Resource I Dynamic Variable variable throws Core Exception I Resource resource Selected Resource Manager get Default get Selected Resource if resource null abort Message Format format String Substitution Messages get String Resource Resolver 7 new String get Reference Expression variable null null NON NLS 1 return resource  CoreException IResource getSelectedResource IDynamicVariable CoreException IResource SelectedResourceManager getDefault getSelectedResource MessageFormat StringSubstitutionMessages getString ResourceResolver getReferenceExpression
Translates the given resource into a value for this variable resolver param resource the resource applicable to this resolver s variable param variable the variable being resolved return variable value throws Core Exception if the variable name is not recognized protected String translate To Value I Resource resource I Dynamic Variable variable throws Core Exception String name variable get Name if name ends With  loc NON NLS 1 return resource get Location toOS String else if name ends With  path NON NLS 1 return resource get Full Path toOS String else if name ends With  name NON NLS 1 return resource get Name abort Message Format format String Substitution Messages get String Resource Resolver 8 new String get Reference Expression variable null null NON NLS 1 return null  CoreException translateToValue IResource IDynamicVariable CoreException getName endsWith _loc getLocation toOSString endsWith _path getFullPath toOSString endsWith _name getName MessageFormat StringSubstitutionMessages getString ResourceResolver getReferenceExpression

public String select Argument I String Variable variable Shell shell Resource List Selection Dialog dialog new Resource List Selection Dialog shell Resources Plugin get Workspace get Root I Resource FILE I Resource FOLDER I Resource PROJECT dialog set Title String Substitution Messages get String Resource Selector 0 NON NLS 1 if dialog open Window OK Object objects dialog get Result if objects length 1 return I Resource objects 0 get Full Path to String return null  selectArgument IStringVariable ResourceListSelectionDialog ResourceListSelectionDialog ResourcesPlugin getWorkspace getRoot IResource IResource IResource setTitle StringSubstitutionMessages getString ResourceSelector getResult IResource getFullPath toString

private Selected Resource Manager I Workbench workbench PlatformUI get Workbench if workbench null may be running headless workbench add Window Listener this I Workbench Window active Window workbench get Active Workbench Window if active Window null window Activated active Window  SelectedResourceManager IWorkbench getWorkbench addWindowListener IWorkbenchWindow activeWindow getActiveWorkbenchWindow activeWindow windowActivated activeWindow
Returns the singleton resource selection manager return Variable Context Manager public static Selected Resource Manager get Default if fg Default null fg Default new Selected Resource Manager return fg Default  VariableContextManager SelectedResourceManager getDefault fgDefault fgDefault SelectedResourceManager fgDefault
see org eclipse ui I Window Listener window Activated org eclipse ui I Workbench Window public void window Activated I Workbench Window window I Selection Service service window get Selection Service service add Selection Listener this I Workbench Page page window get Active Page if page null I Workbench Part part page get Active Part if part null I Selection selection service get Selection if selection null selection Changed part selection  IWindowListener windowActivated IWorkbenchWindow windowActivated IWorkbenchWindow ISelectionService getSelectionService addSelectionListener IWorkbenchPage getActivePage IWorkbenchPart getActivePart ISelection getSelection selectionChanged
see org eclipse ui I Window Listener window Closed org eclipse ui I Workbench Window public void window Closed I Workbench Window window window get Selection Service remove Selection Listener this  IWindowListener windowClosed IWorkbenchWindow windowClosed IWorkbenchWindow getSelectionService removeSelectionListener
see org eclipse ui I Window Listener window Deactivated org eclipse ui I Workbench Window public void window Deactivated I Workbench Window window window get Selection Service remove Selection Listener this  IWindowListener windowDeactivated IWorkbenchWindow windowDeactivated IWorkbenchWindow getSelectionService removeSelectionListener
see org eclipse ui I Window Listener window Opened org eclipse ui I Workbench Window public void window Opened I Workbench Window window  IWindowListener windowOpened IWorkbenchWindow windowOpened IWorkbenchWindow
see org eclipse ui I Selection Listener selection Changed org eclipse ui I Workbench Part org eclipse jface viewers I Selection public void selection Changed I Workbench Part part I Selection selection I Resource selected Resource null if selection instanceof I Structured Selection Object result I Structured Selection selection get First Element if result instanceof I Resource selected Resource I Resource result else if result instanceof I Adaptable selected Resource I Resource I Adaptable result get Adapter I Resource class if selected Resource null If the active part is an editor get the file resource used as input if part instanceof I Editor Part I Editor Part editor Part I Editor Part part I Editor Input input editor Part get Editor Input selected Resource I Resource input get Adapter I Resource class if selected Resource null f Selected Resource selected Resource if selection instanceof I Text Selection f Selected Text I Text Selection selection get Text  ISelectionListener selectionChanged IWorkbenchPart ISelection selectionChanged IWorkbenchPart ISelection IResource selectedResource IStructuredSelection IStructuredSelection getFirstElement IResource selectedResource IResource IAdaptable selectedResource IResource IAdaptable getAdapter IResource selectedResource IEditorPart IEditorPart editorPart IEditorPart IEditorInput editorPart getEditorInput selectedResource IResource getAdapter IResource selectedResource fSelectedResource selectedResource ITextSelection fSelectedText ITextSelection getText
Returns the currently selected resource in the active workbench window or code null code if none If an editor is active the resource adapater associated with the editor is returned return selected resource or code null code public I Resource get Selected Resource return f Selected Resource  IResource getSelectedResource fSelectedResource
Returns the current text selection as a code String code or code null code if none return the current text selection as a code String code or code null code public String get Selected Text return f Selected Text  getSelectedText fSelectedText

private Selected Resource Manager selected Resource Manager public Selected Text Resolver selected Resource Manager Selected Resource Manager get Default  SelectedResourceManager selectedResourceManager SelectedTextResolver selectedResourceManager SelectedResourceManager getDefault
public String resolve Value I Dynamic Variable variable String argument String selection selected Resource Manager get Selected Text String selected Text argument if selection null selection length 0 selected Text selection return selected Text  resolveValue IDynamicVariable selectedResourceManager getSelectedText selectedText selectedText selectedText

Prompts the user to input a string see Prompt Expander Base prompt public void prompt Input Dialog dialog new Input Dialog null String Substitution Messages get String String Prompt Expander 0 dialog Message last Value null default Value last Value null NON NLS 1 int dialog Result dialog open if dialog Result Window OK dialog Result String dialog get Value  PromptExpanderBase InputDialog InputDialog StringSubstitutionMessages getString StringPromptExpander dialogMessage lastValue defaultValue lastValue dialogResult dialogResult dialogResultString getValue

Resource Bundle get Bundle BUNDLE NAME private String Substitution Messages  ResourceBundle getBundle BUNDLE_NAME StringSubstitutionMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public String get Text Object element if element instanceof I String Variable I String Variable variable I String Variable element return variable get Name return super get Text element  getText IStringVariable IStringVariable IStringVariable getName getText

Returns the singleton string variable presentation manager return the singleton string variable presentation manager public static String Variable Presentation Manager get Default if fg Manager null fg Manager new String Variable Presentation Manager return fg Manager  StringVariablePresentationManager getDefault fgManager fgManager StringVariablePresentationManager fgManager
Returns an argument selector contributed for the given variable or code null code if none param variable string substitution variable return argument selector or code null code public I Argument Selector get Argument Selector I String Variable variable I Configuration Element element I Configuration Element f Configurations get variable get Name if element null try return I Argument Selector element create Executable Extension ATTR ARGUMENT SELECTOR catch Core Exception e DebugUI Plugin log e return null  IArgumentSelector getArgumentSelector IStringVariable IConfigurationElement IConfigurationElement fConfigurations getName IArgumentSelector createExecutableExtension ATTR_ARGUMENT_SELECTOR CoreException DebugUIPlugin
Constructs the manager loading extensions private String Variable Presentation Manager initialize  StringVariablePresentationManager
Load extensions private void initialize f Configurations new Hash Map I Extension Point point Platform get Extension Registry get Extension Point DebugUI Plugin get Unique Identifier EXTENSION POINT STRING VARIABLE PRESENTATIONS I Configuration Element elements point get Configuration Elements for int i 0 i elements length i I Configuration Element element elements i String name element get Attribute ATTR NAME if name null DebugUI Plugin log Error Message Message Format format String variable presentation extension missing required variable Name attribute 0 new String element get Declaring Extension get Label NON NLS 1 continue f Configurations put name element  fConfigurations HashMap IExtensionPoint getExtensionRegistry getExtensionPoint DebugUIPlugin getUniqueIdentifier EXTENSION_POINT_STRING_VARIABLE_PRESENTATIONS IConfigurationElement getConfigurationElements IConfigurationElement getAttribute ATTR_NAME DebugUIPlugin logErrorMessage MessageFormat variableName getDeclaringExtension getLabel fConfigurations

Constructs a new string substitution variable selection dialog param parent parent shell public String Variable Selection Dialog Shell parent super parent new String Variable Label Provider set Shell Style get Shell Style SWT RESIZE set Title String Substitution Messages get String String Variable Selection Dialog 2 NON NLS 1 set Message String Substitution Messages get String String Variable Selection Dialog 3 NON NLS 1 set Multiple Selection false set Elements Variables Plugin get Default get String Variable Manager get Variables  StringVariableSelectionDialog StringVariableLabelProvider setShellStyle getShellStyle setTitle StringSubstitutionMessages getString StringVariableSelectionDialog setMessage StringSubstitutionMessages getString StringVariableSelectionDialog setMultipleSelection setElements VariablesPlugin getDefault getStringVariableManager getVariables
Returns the variable expression the user generated from this dialog or code null code if none return variable expression the user generated from this dialog or code null code if none public String get Variable Expression Object selected get Result if selected null selected length 1 I String Variable variable I String Variable selected 0 String Buffer buffer new String Buffer buffer append NON NLS 1 buffer append variable get Name if f Argument Value null f Argument Value length 0 buffer append NON NLS 1 buffer append f Argument Value buffer append NON NLS 1 return buffer to String return null  getVariableExpression getResult IStringVariable IStringVariable StringBuffer StringBuffer getName fArgumentValue fArgumentValue fArgumentValue toString
protected Control create Dialog Area Composite parent Control control super create Dialog Area parent create Argument Area Composite control return control  createDialogArea createDialogArea createArgumentArea
f Edit Variables Button set Layout Data gd f Edit Variables Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e edit Variables  fEditVariablesButton setLayoutData fEditVariablesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent editVariables
f Argument Button set Layout Data gd f Argument Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e configure Argument  fArgumentButton setLayoutData fArgumentButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent configureArgument
Creates an area to display a description of the selected variable and a button to configure the variable s argument param parent parnet widget private void create Argument Area Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout make Columns Equal Width false layout margin Height 0 layout margin Width 0 container set Layout layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL container set Layout Data gd container set Font parent get Font f Edit Variables Button new Button container SWT PUSH f Edit Variables Button set Font container get Font f Edit Variables Button set Text String Substitution Messages get String String Variable Selection Dialog 0 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN END gd horizontal Span 2 f Edit Variables Button set Layout Data gd f Edit Variables Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e edit Variables Label desc new Label container SWT NONE desc set Font parent get Font desc set Text String Substitution Messages get String String Variable Selection Dialog 6 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 desc set Layout Data gd Composite args new Composite container SWT NONE layout new Grid Layout 2 false layout margin Height 0 layout margin Width 0 args set Layout layout gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 args set Layout Data gd args set Font container get Font f Argument Text new Text args SWT BORDER f Argument Text set Font container get Font gd new Grid Data Grid Data FILL HORIZONTAL f Argument Text set Layout Data gd f Argument Button new Button args SWT PUSH f Argument Button set Font parent get Font f Argument Button set Text String Substitution Messages get String String Variable Selection Dialog 7 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN END gd width Hint SWT Util get Button Width Hint f Argument Button f Argument Button set Layout Data gd f Argument Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e configure Argument desc new Label container SWT NONE desc set Font parent get Font desc set Text String Substitution Messages get String String Variable Selection Dialog 8 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 desc set Layout Data gd f Description Text new Text container SWT BORDER SWT WRAP SWT V SCROLL f Description Text set Font container get Font f Description Text set Editable false gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 gd height Hint 50 f Description Text set Layout Data gd  createArgumentArea GridLayout GridLayout numColumns makeColumnsEqualWidth marginHeight marginWidth setLayout GridData GridData GridData FILL_HORIZONTAL setLayoutData setFont getFont fEditVariablesButton fEditVariablesButton setFont getFont fEditVariablesButton setText StringSubstitutionMessages getString StringVariableSelectionDialog GridData GridData HORIZONTAL_ALIGN_END horizontalSpan fEditVariablesButton setLayoutData fEditVariablesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent editVariables setFont getFont setText StringSubstitutionMessages getString StringVariableSelectionDialog GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData GridLayout marginHeight marginWidth setLayout GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData setFont getFont fArgumentText fArgumentText setFont getFont GridData GridData FILL_HORIZONTAL fArgumentText setLayoutData fArgumentButton fArgumentButton setFont getFont fArgumentButton setText StringSubstitutionMessages getString StringVariableSelectionDialog GridData GridData HORIZONTAL_ALIGN_END widthHint SWTUtil getButtonWidthHint fArgumentButton fArgumentButton setLayoutData fArgumentButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent configureArgument setFont getFont setText StringSubstitutionMessages getString StringVariableSelectionDialog GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData fDescriptionText V_SCROLL fDescriptionText setFont getFont fDescriptionText setEditable GridData GridData FILL_HORIZONTAL horizontalSpan heightHint fDescriptionText setLayoutData
final I String Variable elements Variables Plugin get Default get String Variable Manager get Variables display async Exec new Runnable public void run set List Elements elements  IStringVariable VariablesPlugin getDefault getStringVariableManager getVariables asyncExec setListElements
Busy Indicator show While display new Runnable public void run dialog create dialog set Message target Node get Label Text if dialog open I Dialog Constants OK ID final I String Variable elements Variables Plugin get Default get String Variable Manager get Variables display async Exec new Runnable public void run set List Elements elements  BusyIndicator showWhile setMessage targetNode getLabelText IDialogConstants OK_ID IStringVariable VariablesPlugin getDefault getStringVariableManager getVariables asyncExec setListElements
protected void edit Variables Preference Page page new String Variable Preference Page page set Title String Substitution Messages get String String Variable Selection Dialog 1 NON NLS 1 final I Preference Node target Node new Preference Node org eclipse debug ui String Variable Preference Page page NON NLS 1 Preference Manager manager new Preference Manager manager add To Root target Node final Preference Dialog dialog new Preference Dialog get Shell manager final Display display DebugUI Plugin get Standard Display Busy Indicator show While display new Runnable public void run dialog create dialog set Message target Node get Label Text if dialog open I Dialog Constants OK ID final I String Variable elements Variables Plugin get Default get String Variable Manager get Variables display async Exec new Runnable public void run set List Elements elements  editVariables PreferencePage StringVariablePreferencePage setTitle StringSubstitutionMessages getString StringVariableSelectionDialog IPreferenceNode targetNode PreferenceNode StringVariablePreferencePage PreferenceManager PreferenceManager addToRoot targetNode PreferenceDialog PreferenceDialog getShell DebugUIPlugin getStandardDisplay BusyIndicator showWhile setMessage targetNode getLabelText IDialogConstants OK_ID IStringVariable VariablesPlugin getDefault getStringVariableManager getVariables asyncExec setListElements
Configures the argument for the selected variable protected void configure Argument Object objects get Selected Elements I String Variable variable I String Variable objects 0 I Argument Selector selector String Variable Presentation Manager get Default get Argument Selector variable String value selector select Argument variable get Shell if value null f Argument Text set Text value  configureArgument getSelectedElements IStringVariable IStringVariable IArgumentSelector StringVariablePresentationManager getDefault getArgumentSelector selectArgument getShell fArgumentText setText
Update variable description and argument button enablement see org eclipse ui dialogs Abstract Element List Selection Dialog handle Selection Changed protected void handle Selection Changed super handle Selection Changed Object objects get Selected Elements boolean button Enabled false boolean arg Enabled false String text null if objects length 1 I String Variable variable I String Variable objects 0 I Argument Selector selector String Variable Presentation Manager get Default get Argument Selector variable if variable instanceof I Dynamic Variable arg Enabled I Dynamic Variable variable supports Argument button Enabled arg Enabled selector null text variable get Description if text null text NON NLS 1 f Argument Text set Enabled arg Enabled f Argument Button set Enabled button Enabled f Description Text set Text text  AbstractElementListSelectionDialog handleSelectionChanged handleSelectionChanged handleSelectionChanged getSelectedElements buttonEnabled argEnabled IStringVariable IStringVariable IArgumentSelector StringVariablePresentationManager getDefault getArgumentSelector IDynamicVariable argEnabled IDynamicVariable supportsArgument buttonEnabled argEnabled getDescription fArgumentText setEnabled argEnabled fArgumentButton setEnabled buttonEnabled fDescriptionText setText
see org eclipse jface dialogs Dialog ok Pressed protected void ok Pressed f Argument Value f Argument Text get Text trim super ok Pressed  okPressed okPressed fArgumentValue fArgumentText getText okPressed
protected I Dialog Settings get Dialog Settings I Dialog Settings settings DebugUI Plugin get Default get Dialog Settings I Dialog Settings section settings get Section get Dialog Settings Section Name if section null section settings add New Section get Dialog Settings Section Name return section  IDialogSettings getDialogSettings IDialogSettings DebugUIPlugin getDefault getDialogSettings IDialogSettings getSection getDialogSettingsSectionName addNewSection getDialogSettingsSectionName
Returns the name of the section that this dialog stores its settings in return String protected String get Dialog Settings Section Name return I DebugUI Constants PLUGIN ID STRING VARIABLE SELECTION DIALOG SECTION NON NLS 1  getDialogSettingsSectionName IDebugUIConstants PLUGIN_ID STRING_VARIABLE_SELECTION_DIALOG_SECTION
protected Point get Initial Location Point initial Size Point initial Location Dialog Settings Helper get Initial Location get Dialog Settings Section Name if initial Location null return initial Location return super get Initial Location initial Size  getInitialLocation initialSize initialLocation DialogSettingsHelper getInitialLocation getDialogSettingsSectionName initialLocation initialLocation getInitialLocation initialSize
see org eclipse jface window Window get Initial Size protected Point get Initial Size Point size super get Initial Size return Dialog Settings Helper get Initial Size get Dialog Settings Section Name size  getInitialSize getInitialSize getInitialSize DialogSettingsHelper getInitialSize getDialogSettingsSectionName
see org eclipse jface window Window close public boolean close Dialog Settings Helper persist Shell Geometry get Shell get Dialog Settings Section Name return super close  DialogSettingsHelper persistShellGeometry getShell getDialogSettingsSectionName

The code workspace loc code variable does not use the selected resource see org eclipse debug internal ui stringsubstitution Resource Resolver get Selected Resource org eclipse debug internal core stringsubstitution I Context Variable protected I Resource get Selected Resource I Dynamic Variable variable return get Workspace Root  workspace_loc ResourceResolver getSelectedResource IContextVariable IResource getSelectedResource IDynamicVariable getWorkspaceRoot

Returns the standard display to be used The method first checks if the thread calling this method has an associated disaply If so this display is returned Otherwise the method returns the default display public static Display get Standard Display Display display display Display get Current if display null display Display get Default return display  getStandardDisplay getCurrent getDefault
Returns the shell for the given widget If the widget doesn t represent a SWT object that manage a shell code null code is returned return the shell for the given widget public static Shell get Shell Widget widget if widget instanceof Control return Control widget get Shell if widget instanceof Caret return Caret widget get Parent get Shell if widget instanceof Drag Source return Drag Source widget get Control get Shell if widget instanceof Drop Target return Drop Target widget get Control get Shell if widget instanceof Menu return Menu widget get Parent get Shell if widget instanceof Scroll Bar return Scroll Bar widget get Parent get Shell return null  getShell getShell getParent getShell DragSource DragSource getControl getShell DropTarget DropTarget getControl getShell getParent getShell ScrollBar ScrollBar getParent getShell
Returns a width hint for a button control public static int get Button Width Hint Button button Pixel Converter converter new Pixel Converter button int width Hint converter convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH return Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x  getButtonWidthHint PixelConverter PixelConverter widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint computeSize
Returns a height hint for a button control public static int get Button Heigth Hint Button button Pixel Converter converter new Pixel Converter button return converter convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT  getButtonHeigthHint PixelConverter PixelConverter convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT
Sets width and height hint for the button control b Note b This is a NOP if the button s layout data is not an instance of code Grid Data code param the button for which to set the dimension hint public static void set Button Dimension Hint Button button Assert is Not Null button Object gd button get Layout Data if gd instanceof Grid Data Grid Data gd height Hint get Button Heigth Hint button Grid Data gd width Hint get Button Width Hint button Grid Data gd horizontal Alignment Grid Data FILL  GridData setButtonDimensionHint isNotNull getLayoutData GridData GridData heightHint getButtonHeigthHint GridData widthHint getButtonWidthHint GridData horizontalAlignment GridData
Creates and returns a new push button with the given label and or image param parent parent control param label button label or code null code param image image of code null code return a new push button public static Button create Push Button Composite parent String label Image image Button button new Button parent SWT PUSH button set Font parent get Font if image null button set Image image if label null button set Text label Grid Data gd new Grid Data button set Layout Data gd SWT Util set Button Dimension Hint button return button  createPushButton setFont getFont setImage setText GridData GridData setLayoutData SWTUtil setButtonDimensionHint
Creates and returns a new radio button with the given label param parent parent control param label button label or code null code return a new radio button public static Button create Radio Button Composite parent String label Button button new Button parent SWT RADIO button set Font parent get Font if label null button set Text label Grid Data gd new Grid Data button set Layout Data gd SWT Util set Button Dimension Hint button return button  createRadioButton setFont getFont setText GridData GridData setLayoutData SWTUtil setButtonDimensionHint

see Delegating Model Presentation get Text Object Strips out control characters and replaces them with string representations public String get Text Object element String Buffer string new String Buffer String Tokenizer tokenizer new String Tokenizer super get Text element b f n r t true NON NLS 1 String token while tokenizer has More Tokens token tokenizer next Token if token length 1 string append token else switch token char At 0 case b string append b NON NLS 1 break case f string append f NON NLS 1 break case n string append n NON NLS 1 break case r string append r NON NLS 1 break case t string append t NON NLS 1 break case string append NON NLS 1 break default string append token return string to String  DelegatingModelPresentation getText getText StringBuffer StringBuffer StringTokenizer StringTokenizer getText hasMoreTokens nextToken charAt toString

Constructs an event handler for the given view param view debug view public Abstract Debug Event Handler Abstract Debug View view set View view Debug Plugin plugin Debug Plugin get Default plugin add Debug Event Listener this  AbstractDebugEventHandler AbstractDebugView setView DebugPlugin DebugPlugin getDefault addDebugEventListener
Returns the active workbench page or code null code if none protected I Workbench Page get Active Page I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null return null return window get Active Page  IWorkbenchPage getActivePage IWorkbenchWindow getWorkbench getActiveWorkbenchWindow getActivePage
Runnable r new Runnable public void run if is Available if is View Visible do Handle Debug Events events update For Debug Events events  isAvailable isViewVisible doHandleDebugEvents updateForDebugEvents
see I Debug Event Set Listener handle Debug Events Debug Event public void handle Debug Events final Debug Event events if is Available return Runnable r new Runnable public void run if is Available if is View Visible do Handle Debug Events events update For Debug Events events get View async Exec r  IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent isAvailable isAvailable isViewVisible doHandleDebugEvents updateForDebugEvents getView asyncExec
Updates this view for the given debug events Unlike do Handle Debug Events Debug Event which is only called if the view is visible this method is always called This allows the view to perform updating that must always be performed even when the view is not visible protected void update For Debug Events Debug Event events  doHandleDebugEvents DebugEvent updateForDebugEvents DebugEvent
Implementation specific handling of debug events Subclasses should override 
Helper method for inserting the given element must be called in UI thread protected void insert Object element if is Available Object parent I Tree Content Provider get Tree Viewer get Content Provider get Parent element a parent can be null for a debug target or process that has not yet been associated with a launch if parent null get View show Viewer get Tree Viewer add parent element  isAvailable ITreeContentProvider getTreeViewer getContentProvider getParent getView showViewer getTreeViewer
Helper method to remove the given element must be called in UI thread protected void remove Object element if is Available get View show Viewer get Tree Viewer remove element  isAvailable getView showViewer getTreeViewer
Helper method to update the label of the given element must be called in UI thread protected void label Changed Object element if is Available get View show Viewer get Tree Viewer update element new String I Basic Property Constants P TEXT  labelChanged isAvailable getView showViewer getTreeViewer IBasicPropertyConstants P_TEXT
Refresh the given element in the viewer must be called in UI thread protected void refresh Object element if is Available get View show Viewer get Tree Viewer refresh element  isAvailable getView showViewer getTreeViewer
Refresh the viewer must be called in UI thread public void refresh if is Available get View show Viewer get Tree Viewer refresh  isAvailable getView showViewer getTreeViewer
Helper method to select and reveal the given element must be called in UI thread protected void select And Reveal Object element if is Available get Viewer set Selection new Structured Selection element true  selectAndReveal isAvailable getViewer setSelection StructuredSelection
De registers this event handler from the debug model public void dispose Debug Plugin plugin Debug Plugin get Default plugin remove Debug Event Listener this  DebugPlugin DebugPlugin getDefault removeDebugEventListener
Returns the view this event handler is updating return debug view protected Abstract Debug View get View return f View  AbstractDebugView getView fView
Sets the view this event handler is updating param view debug view private void set View Abstract Debug View view f View view  setView AbstractDebugView fView
Returns the viewer this event handler is updating return viewer protected Viewer get Viewer return get View get Viewer  getViewer getView getViewer
Returns this event handler s viewer as a tree viewer or code null code if none return this event handler s viewer as a tree viewer or code null code if none protected Tree Viewer get Tree Viewer if get Viewer instanceof Tree Viewer return Tree Viewer get Viewer return null  TreeViewer getTreeViewer getViewer TreeViewer TreeViewer getViewer
Returns whether this event handler s viewer is currently available return whether this event handler s viewer is currently available protected boolean is Available return get View is Available  isAvailable getView isAvailable
Returns whether this event handler s view is currently visible return whether this event handler s view is currently visible protected boolean is View Visible return get View is Visible  isViewVisible getView isVisible
Called when this event handler s view becomes visible Default behavior is to refresh the view protected void view Becomes Visible refresh  viewBecomesVisible
Called when this event handler s view becomes hidden Default behavior is to do nothing Subclasses may override protected void view Becomes Hidden  viewBecomesHidden

Sets the event handler for this view param event Handler event handler protected void set Event Handler Abstract Debug Event Handler event Handler f Event Handler event Handler  eventHandler setEventHandler AbstractDebugEventHandler eventHandler fEventHandler eventHandler
Returns the event handler for this view return The event handler for this view protected Abstract Debug Event Handler get Event Handler return f Event Handler  AbstractDebugEventHandler getEventHandler fEventHandler
see I Workbench Part dispose public void dispose super dispose if get Event Handler null get Event Handler dispose  IWorkbenchPart getEventHandler getEventHandler
see org eclipse debug ui Abstract Debug View becomes Hidden protected void becomes Hidden super becomes Hidden get Event Handler view Becomes Hidden  AbstractDebugView becomesHidden becomesHidden becomesHidden getEventHandler viewBecomesHidden
see org eclipse debug ui Abstract Debug View becomes Visible protected void becomes Visible super becomes Visible get Event Handler view Becomes Visible  AbstractDebugView becomesVisible becomesVisible becomesVisible getEventHandler viewBecomesVisible
protected void clear Status Line I Status Line Manager manager get View Site get Action Bars get Status Line Manager manager set Error Message null manager set Message null  clearStatusLine IStatusLineManager getViewSite getActionBars getStatusLineManager setErrorMessage setMessage

Constructs a memento for the given viewer public Abstract Viewer State Tree Viewer viewer save State viewer  AbstractViewerState TreeViewer saveState
Saves the current state of the given viewer into this memento param viewer viewer of which to save the state public void save State Tree Viewer viewer List expanded new Array List f Expanded Elements null Tree Item items viewer get Tree get Items try for int i 0 i items length i collect Exanded Items items i expanded if expanded size 0 f Expanded Elements expanded catch Debug Exception e f Expanded Elements null Tree Item selection viewer get Tree get Selection f Selection new I Path selection length try for int i 0 i selection length i f Selection i encode Element selection i catch Debug Exception e f Selection null  saveState TreeViewer ArrayList fExpandedElements TreeItem getTree getItems collectExandedItems fExpandedElements DebugException fExpandedElements TreeItem getTree getSelection fSelection IPath fSelection encodeElement DebugException fSelection
protected void collect Exanded Items Tree Item item List expanded throws Debug Exception if item get Expanded expanded add encode Element item Tree Item items item get Items for int i 0 i items length i collect Exanded Items items i expanded  collectExandedItems TreeItem DebugException getExpanded encodeElement TreeItem getItems collectExandedItems
Constructs a path representing the given tree item The segments in the path denote parent items and the last segment is the name of the given item param item tree item to encode return path encoding the given item throws Debug Exception if unable to generate a path  DebugException
Restores the state of the given viewer to this memento s saved state param viewer viewer to which state is restored public void restore State Tree Viewer viewer if f Expanded Elements null List expansion new Array List f Expanded Elements size for int i 0 i f Expanded Elements size i I Path path I Path f Expanded Elements get i if path null Object obj try obj decode Path path viewer if obj null expansion add obj catch Debug Exception e viewer set Expanded Elements expansion to Array if f Selection null List selection new Array List f Selection length for int i 0 i f Selection length i I Path path f Selection i Object obj try obj decode Path path viewer if obj null selection add obj catch Debug Exception e viewer set Selection new Structured Selection selection  restoreState TreeViewer fExpandedElements ArrayList fExpandedElements fExpandedElements IPath IPath fExpandedElements decodePath DebugException setExpandedElements toArray fSelection ArrayList fSelection fSelection IPath fSelection decodePath DebugException setSelection StructuredSelection
Returns an element in the given viewer that corresponds to the given path or code null code if none param path encoded element path param viewer viewer to search for the element in return element represented by the path or code null code if none throws Debug Exception if unable to locate a variable  DebugException

public class Breakpoints Sorter extends Viewer Sorter see Viewer Sorter is Sorter Property Object String public boolean is Sorter Property Object element String property Id return property Id equals I Basic Property Constants P TEXT  BreakpointsSorter ViewerSorter ViewerSorter isSorterProperty isSorterProperty propertyId propertyId IBasicPropertyConstants P_TEXT
Returns a negative zero or positive number depending on whether the first element is less than equal to or greater than the second element p Group breakpoints by debug model within debug model group breakpoints by type within type groups sort by line number if applicable and then alphabetically by label param viewer the viewer param e1 the first element param e2 the second element return a negative number if the first element is less than the second element the value code 0 code if the first element is equal to the second element and a positive number if the first element is greater than the second element public int compare Viewer viewer Object e1 Object e2 I Breakpoint b1 I Breakpoint e1 I Breakpoint b2 I Breakpoint e2 String model Id1 b1 get Model Identifier String model Id2 b2 get Model Identifier int result model Id1 compare To model Id2 if result 0 return result String type1 NON NLS 1 String type2 NON NLS 1 I Marker marker1 b1 get Marker if marker1 exists return 0 try type1 marker1 get Type catch Core Exception ce DebugUI Plugin log ce try I Marker marker2 b2 get Marker if marker2 exists return 0 type2 marker2 get Type catch Core Exception e DebugUI Plugin log e result type1 compare To type2 if result 0 return result model and type are the same I Label Provider lprov I Label Provider Structured Viewer viewer get Label Provider String name1 lprov get Text e1 String name2 lprov get Text e2 boolean line Breakpoint false try line Breakpoint marker1 is Subtype Of I Breakpoint LINE BREAKPOINT MARKER catch Core Exception ce DebugUI Plugin log ce if line Breakpoint return compare Line Breakpoints b1 b2 name1 name2 return name1 compare To name2  IBreakpoint IBreakpoint IBreakpoint IBreakpoint modelId1 getModelIdentifier modelId2 getModelIdentifier modelId1 compareTo modelId2 IMarker getMarker getType CoreException DebugUIPlugin IMarker getMarker getType CoreException DebugUIPlugin compareTo ILabelProvider ILabelProvider StructuredViewer getLabelProvider getText getText lineBreakpoint lineBreakpoint isSubtypeOf IBreakpoint LINE_BREAKPOINT_MARKER CoreException DebugUIPlugin lineBreakpoint compareLineBreakpoints compareTo
protected int compare Line Breakpoints I Breakpoint b1 I Breakpoint b2 String name1 String name2 int colon1 name1 index Of if colon1 1 int colon2 name2 index Of if colon2 1 String up To Colon1 name1 substring 0 colon1 if name2 starts With up To Colon1 int l1 0 int l2 0 try l1 I Line Breakpoint b1 get Line Number catch Core Exception e DebugUI Plugin log e try l2 I Line Breakpoint b2 get Line Number catch Core Exception e DebugUI Plugin log e return l1 l2 return name1 compare To name2  compareLineBreakpoints IBreakpoint IBreakpoint indexOf indexOf upToColon1 startsWith upToColon1 ILineBreakpoint getLineNumber CoreException DebugUIPlugin ILineBreakpoint getLineNumber CoreException DebugUIPlugin compareTo

private Breakpoints View Event Handler f Event Handler private I Check State Listener f Check Listener new I Check State Listener public void check State Changed Check State Changed Event event handle Check State Changed event  BreakpointsViewEventHandler fEventHandler ICheckStateListener fCheckListener ICheckStateListener checkStateChanged CheckStateChangedEvent handleCheckStateChanged
see org eclipse ui I Workbench Part create Part Control org eclipse swt widgets Composite public void create Part Control Composite parent super create Part Control parent if get Viewer null initialize Checked State update Viewer Background Debug Plugin get Default get Breakpoint Manager add Breakpoint Manager Listener this  IWorkbenchPart createPartControl createPartControl createPartControl getViewer initializeCheckedState updateViewerBackground DebugPlugin getDefault getBreakpointManager addBreakpointManagerListener
see Abstract Debug View create Viewer Composite protected Viewer create Viewer Composite parent Checkbox Table Viewer viewer Checkbox Table Viewer new Check List parent SWT MULTI SWT H SCROLL SWT V SCROLL viewer set Content Provider new Breakpoints View Content Provider viewer set Label Provider new Delegating Model Presentation viewer set Sorter new Breakpoints Sorter viewer set Input Debug Plugin get Default get Breakpoint Manager viewer add Check State Listener f Check Listener Necessary so that the Property Sheet View hears about selections in this view get Site set Selection Provider viewer init Is Tracking Selection set Event Handler new Breakpoints View Event Handler this return viewer  AbstractDebugView createViewer createViewer CheckboxTableViewer CheckboxTableViewer newCheckList H_SCROLL V_SCROLL setContentProvider BreakpointsViewContentProvider setLabelProvider DelegatingModelPresentation setSorter BreakpointsSorter setInput DebugPlugin getDefault getBreakpointManager addCheckStateListener fCheckListener PropertySheetView getSite setSelectionProvider initIsTrackingSelection setEventHandler BreakpointsViewEventHandler
Initializes whether this view tracks selection in the debug view from the persisted state private void init Is Tracking Selection I Memento memento get Memento if memento null I Memento node memento get Child KEY IS TRACKING SELECTION if node null set Track Selection Boolean value Of node get String KEY VALUE boolean Value return set Track Selection false  initIsTrackingSelection IMemento getMemento IMemento getChild KEY_IS_TRACKING_SELECTION setTrackSelection valueOf getString KEY_VALUE booleanValue setTrackSelection
Sets the initial checked state of the items in the viewer public void initialize Checked State I Breakpoint Manager manager Debug Plugin get Default get Breakpoint Manager final Checkbox Table Viewer viewer get Checkbox Viewer Object elements I Structured Content Provider viewer get Content Provider get Elements manager Array List breakpoints new Array List elements length for int i 0 i elements length i breakpoints add elements i List Iterator iterator breakpoints list Iterator while iterator has Next try if I Breakpoint iterator next is Enabled iterator remove catch Core Exception e DebugUI Plugin log e viewer set Checked Elements breakpoints to Array  initializeCheckedState IBreakpointManager DebugPlugin getDefault getBreakpointManager CheckboxTableViewer getCheckboxViewer IStructuredContentProvider getContentProvider getElements ArrayList ArrayList ListIterator listIterator hasNext IBreakpoint isEnabled CoreException DebugUIPlugin setCheckedElements toArray
Returns this view s viewer as a checkbox table viewer return private Checkbox Table Viewer get Checkbox Viewer return Checkbox Table Viewer get Viewer  CheckboxTableViewer getCheckboxViewer CheckboxTableViewer getViewer
Responds to the user checking and unchecking breakpoints by enabling and disabling them param event the check state change event private void handle Check State Changed Check State Changed Event event Object source event get Element if source instanceof I Breakpoint return I Breakpoint breakpoint I Breakpoint source boolean enable event get Checked try breakpoint set Enabled enable get Checkbox Viewer refresh breakpoint catch Core Exception e String title State enable DebugUI Views Messages get String Breakpoints View 6 DebugUI Views Messages get String Breakpoints View 7 NON NLS 1 NON NLS 2 String message State enable DebugUI Views Messages get String Breakpoints View 8 DebugUI Views Messages get String Breakpoints View 9 NON NLS 1 NON NLS 2 DebugUI Plugin error Dialog DebugUI Plugin get Shell Message Format format DebugUI Views Messages get String Breakpoints View 10 new String title State Message Format format DebugUI Views Messages get String Breakpoints View 11 new String message State e NON NLS 1 NON NLS 2 If the breakpoint fails to update reset its check state get Checkbox Viewer remove Check State Listener f Check Listener event get Checkable set Checked source event get Checked get Checkbox Viewer add Check State Listener f Check Listener  handleCheckStateChanged CheckStateChangedEvent getElement IBreakpoint IBreakpoint IBreakpoint getChecked setEnabled getCheckboxViewer CoreException titleState DebugUIViewsMessages getString BreakpointsView DebugUIViewsMessages getString BreakpointsView messageState DebugUIViewsMessages getString BreakpointsView DebugUIViewsMessages getString BreakpointsView DebugUIPlugin errorDialog DebugUIPlugin getShell MessageFormat DebugUIViewsMessages getString BreakpointsView titleState MessageFormat DebugUIViewsMessages getString BreakpointsView messageState getCheckboxViewer removeCheckStateListener fCheckListener getCheckable setChecked getChecked getCheckboxViewer addCheckStateListener fCheckListener
see Abstract Debug View get Help Context Id protected String get Help Context Id return I Debug Help Context Ids BREAKPOINT VIEW  AbstractDebugView getHelpContextId getHelpContextId IDebugHelpContextIds BREAKPOINT_VIEW
see I Workbench Part dispose public void dispose get Checkbox Viewer remove Check State Listener f Check Listener I Action action get Action Show Breakpoints For Model NON NLS 1 if action null Show Supported Breakpoints Action action dispose get Site get Page remove Selection Listener I DebugUI Constants ID DEBUG VIEW this Debug Plugin get Default get Breakpoint Manager remove Breakpoint Manager Listener this super dispose if get Event Handler null get Event Handler dispose  IWorkbenchPart getCheckboxViewer removeCheckStateListener fCheckListener IAction getAction ShowBreakpointsForModel ShowSupportedBreakpointsAction getSite getPage removeSelectionListener IDebugUIConstants ID_DEBUG_VIEW DebugPlugin getDefault getBreakpointManager removeBreakpointManagerListener getEventHandler getEventHandler
see Abstract Debug View create Actions protected void create Actions I Action action new Open Breakpoint Marker Action get Viewer set Action Goto Marker action NON NLS 1 set Action DOUBLE CLICK ACTION action set Action Show Breakpoints For Model new Show Supported Breakpoints Action get Structured Viewer this NON NLS 1 set Action Link With Debug View new Link Breakpoints With Debug View Action this NON NLS 1 set Action Skip Breakpoints new Skip All Breakpoints Action NON NLS 1  AbstractDebugView createActions createActions IAction OpenBreakpointMarkerAction getViewer setAction GotoMarker setAction DOUBLE_CLICK_ACTION setAction ShowBreakpointsForModel ShowSupportedBreakpointsAction getStructuredViewer setAction LinkWithDebugView LinkBreakpointsWithDebugViewAction setAction SkipBreakpoints SkipAllBreakpointsAction
Adds items to the context menu param menu The menu to contribute to protected void fill Context Menu I Menu Manager menu update Objects menu add new Separator I DebugUI Constants EMPTY NAVIGATION GROUP menu add new Separator I DebugUI Constants NAVIGATION GROUP menu add get Action Goto Marker NON NLS 1 menu add new Separator I DebugUI Constants EMPTY BREAKPOINT GROUP menu add new Separator I DebugUI Constants BREAKPOINT GROUP menu add new Separator I DebugUI Constants EMPTY RENDER GROUP menu add new Separator I Workbench Action Constants MB ADDITIONS  fillContextMenu IMenuManager updateObjects IDebugUIConstants EMPTY_NAVIGATION_GROUP IDebugUIConstants NAVIGATION_GROUP getAction GotoMarker IDebugUIConstants EMPTY_BREAKPOINT_GROUP IDebugUIConstants BREAKPOINT_GROUP IDebugUIConstants EMPTY_RENDER_GROUP IWorkbenchActionConstants MB_ADDITIONS
see Abstract Debug View configure Tool Bar I Tool Bar Manager protected void configure Tool Bar I Tool Bar Manager tbm tbm add new Separator I DebugUI Constants BREAKPOINT GROUP tbm add get Action Show Breakpoints For Model NON NLS 1 tbm add get Action Goto Marker NON NLS 1 tbm add get Action Link With Debug View NON NLS 1 tbm add get Action Skip Breakpoints NON NLS 1 tbm add new Separator I DebugUI Constants RENDER GROUP  AbstractDebugView configureToolBar IToolBarManager configureToolBar IToolBarManager IDebugUIConstants BREAKPOINT_GROUP getAction ShowBreakpointsForModel getAction GotoMarker getAction LinkWithDebugView getAction SkipBreakpoints IDebugUIConstants RENDER_GROUP
Returns this view s event handler return a breakpoint view event handler protected Breakpoints View Event Handler get Event Handler return f Event Handler  BreakpointsViewEventHandler getEventHandler fEventHandler
Sets this view s event handler param event Handler a breakpoint view event handler private void set Event Handler Breakpoints View Event Handler event Handler f Event Handler event Handler  eventHandler setEventHandler BreakpointsViewEventHandler eventHandler fEventHandler eventHandler
see org eclipse debug ui Abstract Debug View becomes Visible protected void becomes Visible super becomes Visible get Viewer refresh initialize Checked State  AbstractDebugView becomesVisible becomesVisible becomesVisible getViewer initializeCheckedState
public void selection Changed I Workbench Part part I Selection sel if sel is Empty is Tracking Selection return I Structured Selection selection I Structured Selection sel Iterator iter selection iterator Object first Element iter next if first Element null iter has Next return I Thread thread null if first Element instanceof I Stack Frame thread I Stack Frame first Element get Thread else if first Element instanceof I Thread thread I Thread first Element else return I Breakpoint breakpoints thread get Breakpoints get Viewer set Selection new Structured Selection breakpoints true  selectionChanged IWorkbenchPart ISelection isEmpty isTrackingSelection IStructuredSelection IStructuredSelection firstElement firstElement hasNext IThread firstElement IStackFrame IStackFrame firstElement getThread firstElement IThread IThread firstElement IBreakpoint getBreakpoints getViewer setSelection StructuredSelection
Returns whether this view is currently tracking the selection from the debug view return whether this view is currently tracking the debug view s selection public boolean is Tracking Selection return f Is Tracking Selection  isTrackingSelection fIsTrackingSelection
Sets whether this view should track the selection from the debug view param track Selection whether or not this view should track the debug view s selection public void set Track Selection boolean track Selection f Is Tracking Selection track Selection if track Selection get Site get Page add Selection Listener I DebugUI Constants ID DEBUG VIEW this else get Site get Page remove Selection Listener I DebugUI Constants ID DEBUG VIEW this  trackSelection setTrackSelection trackSelection fIsTrackingSelection trackSelection trackSelection getSite getPage addSelectionListener IDebugUIConstants ID_DEBUG_VIEW getSite getPage removeSelectionListener IDebugUIConstants ID_DEBUG_VIEW
public void save State I Memento memento super save State memento I Memento node memento create Child KEY IS TRACKING SELECTION node put String KEY VALUE String value Of f Is Tracking Selection  saveState IMemento saveState IMemento createChild KEY_IS_TRACKING_SELECTION putString KEY_VALUE valueOf fIsTrackingSelection
DebugUI Plugin get Standard Display async Exec new Runnable public void run I Action action get Action Skip Breakpoints NON NLS 1 if action null Skip All Breakpoints Action action update Action Checked State update Viewer Background  DebugUIPlugin getStandardDisplay asyncExec IAction getAction SkipBreakpoints SkipAllBreakpointsAction updateActionCheckedState updateViewerBackground
public void breakpoint Manager Enablement Changed boolean enabled DebugUI Plugin get Standard Display async Exec new Runnable public void run I Action action get Action Skip Breakpoints NON NLS 1 if action null Skip All Breakpoints Action action update Action Checked State update Viewer Background  breakpointManagerEnablementChanged DebugUIPlugin getStandardDisplay asyncExec IAction getAction SkipBreakpoints SkipAllBreakpointsAction updateActionCheckedState updateViewerBackground
Updates the background color of the viewer based on the breakpoint manager enablement protected void update Viewer Background Color color null boolean enabled true if Debug Plugin get Default get Breakpoint Manager is Enabled color DebugUI Plugin get Standard Display get System Color SWT COLOR INFO BACKGROUND enabled false Table table get Checkbox Viewer get Table Table Item items table get Items for int i 0 i items length i items i set Background color items i set Grayed enabled table set Background color if enabled set Title DebugUI Views Messages get String Breakpoints View 19 NON NLS 1 else set Title DebugUI Views Messages get String Breakpoints View 20 NON NLS 1  updateViewerBackground DebugPlugin getDefault getBreakpointManager isEnabled DebugUIPlugin getStandardDisplay getSystemColor COLOR_INFO_BACKGROUND getCheckboxViewer getTable TableItem getItems setBackground setGrayed setBackground setTitle DebugUIViewsMessages getString BreakpointsView setTitle DebugUIViewsMessages getString BreakpointsView

see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object parent return I Breakpoint Manager parent get Breakpoints  IStructuredContentProvider getElements getElements IBreakpointManager getBreakpoints
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput

Constructs an event handler for the breakpoints view public Breakpoints View Event Handler Breakpoints View view f View view Debug Plugin get Default get Breakpoint Manager add Breakpoint Listener this I Workbench Activity Support activity Support PlatformUI get Workbench get Activity Support if activity Support null activity Support get Activity Manager add Activity Manager Listener this  BreakpointsViewEventHandler BreakpointsView fView DebugPlugin getDefault getBreakpointManager addBreakpointListener IWorkbenchActivitySupport activitySupport getWorkbench getActivitySupport activitySupport activitySupport getActivityManager addActivityManagerListener
When this event handler is disposed remove it as a listener public void dispose Debug Plugin get Default get Breakpoint Manager remove Breakpoint Listener this I Workbench Activity Support activity Support PlatformUI get Workbench get Activity Support if activity Support null activity Support get Activity Manager remove Activity Manager Listener this  DebugPlugin getDefault getBreakpointManager removeBreakpointListener IWorkbenchActivitySupport activitySupport getWorkbench getActivitySupport activitySupport activitySupport getActivityManager removeActivityManagerListener
f View async Exec new Runnable public void run if f View is Available Checkbox Table Viewer viewer Checkbox Table Viewer f View get Viewer Multi Status status new Multi Status DebugUI Plugin get Unique Identifier I Status ERROR DebugUI Views Messages get String Breakpoints View Event Handler 4 null NON NLS 1 for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i check if the breakpoint is still registered at this time if Debug Plugin get Default get Breakpoint Manager is Registered breakpoint continue viewer add breakpoint try boolean enabled breakpoint is Enabled if viewer get Checked breakpoint enabled viewer set Checked breakpoint breakpoint is Enabled if Debug Plugin get Default get Breakpoint Manager is Enabled f View update Viewer Background catch Core Exception e status add DebugUI Plugin new Error Status DebugUI Views Messages get String Breakpoints View Event Handler 5 e NON NLS 1 DebugUI Plugin log e if status isOK DebugUI Plugin error Dialog DebugUI Plugin get Shell DebugUI Views Messages get String Breakpoints View Event Handler 1 DebugUI Views Messages get String Breakpoints View Event Handler 2 status NON NLS 1 NON NLS 2 f View update Objects  fView asyncExec fView isAvailable CheckboxTableViewer CheckboxTableViewer fView getViewer MultiStatus MultiStatus DebugUIPlugin getUniqueIdentifier IStatus DebugUIViewsMessages getString BreakpointsViewEventHandler IBreakpoint DebugPlugin getDefault getBreakpointManager isRegistered isEnabled getChecked setChecked isEnabled DebugPlugin getDefault getBreakpointManager isEnabled fView updateViewerBackground CoreException DebugUIPlugin newErrorStatus DebugUIViewsMessages getString BreakpointsViewEventHandler DebugUIPlugin DebugUIPlugin errorDialog DebugUIPlugin getShell DebugUIViewsMessages getString BreakpointsViewEventHandler DebugUIViewsMessages getString BreakpointsViewEventHandler fView updateObjects
see I Breakpoints Listener breakpoints Added I Breakpoint public void breakpoints Added final I Breakpoint breakpoints if f View is Available f View is Visible f View async Exec new Runnable public void run if f View is Available Checkbox Table Viewer viewer Checkbox Table Viewer f View get Viewer Multi Status status new Multi Status DebugUI Plugin get Unique Identifier I Status ERROR DebugUI Views Messages get String Breakpoints View Event Handler 4 null NON NLS 1 for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i check if the breakpoint is still registered at this time if Debug Plugin get Default get Breakpoint Manager is Registered breakpoint continue viewer add breakpoint try boolean enabled breakpoint is Enabled if viewer get Checked breakpoint enabled viewer set Checked breakpoint breakpoint is Enabled if Debug Plugin get Default get Breakpoint Manager is Enabled f View update Viewer Background catch Core Exception e status add DebugUI Plugin new Error Status DebugUI Views Messages get String Breakpoints View Event Handler 5 e NON NLS 1 DebugUI Plugin log e if status isOK DebugUI Plugin error Dialog DebugUI Plugin get Shell DebugUI Views Messages get String Breakpoints View Event Handler 1 DebugUI Views Messages get String Breakpoints View Event Handler 2 status NON NLS 1 NON NLS 2 f View update Objects  IBreakpointsListener breakpointsAdded IBreakpoint breakpointsAdded IBreakpoint fView isAvailable fView isVisible fView asyncExec fView isAvailable CheckboxTableViewer CheckboxTableViewer fView getViewer MultiStatus MultiStatus DebugUIPlugin getUniqueIdentifier IStatus DebugUIViewsMessages getString BreakpointsViewEventHandler IBreakpoint DebugPlugin getDefault getBreakpointManager isRegistered isEnabled getChecked setChecked isEnabled DebugPlugin getDefault getBreakpointManager isEnabled fView updateViewerBackground CoreException DebugUIPlugin newErrorStatus DebugUIViewsMessages getString BreakpointsViewEventHandler DebugUIPlugin DebugUIPlugin errorDialog DebugUIPlugin getShell DebugUIViewsMessages getString BreakpointsViewEventHandler DebugUIViewsMessages getString BreakpointsViewEventHandler fView updateObjects
f View async Exec new Runnable public void run if f View is Available Table Viewer viewer Table Viewer f View get Viewer int indices viewer get Table get Selection Indices viewer get Control set Redraw false viewer remove breakpoints viewer get Control set Redraw true if viewer get Selection is Empty if indices length 0 int index indices 0 viewer get Table select Math min index viewer get Table get Item Count 1 fire the selection changed as does not occur when setting selection on the swt widget viewer set Selection viewer get Selection f View update Objects  fView asyncExec fView isAvailable TableViewer TableViewer fView getViewer getTable getSelectionIndices getControl setRedraw getControl setRedraw getSelection isEmpty getTable getTable getItemCount setSelection getSelection fView updateObjects
see I Breakpoints Listener breakpoints Removed I Breakpoint I Marker Delta public void breakpoints Removed final I Breakpoint breakpoints I Marker Delta deltas if f View is Available f View is Visible f View async Exec new Runnable public void run if f View is Available Table Viewer viewer Table Viewer f View get Viewer int indices viewer get Table get Selection Indices viewer get Control set Redraw false viewer remove breakpoints viewer get Control set Redraw true if viewer get Selection is Empty if indices length 0 int index indices 0 viewer get Table select Math min index viewer get Table get Item Count 1 fire the selection changed as does not occur when setting selection on the swt widget viewer set Selection viewer get Selection f View update Objects  IBreakpointsListener breakpointsRemoved IBreakpoint IMarkerDelta breakpointsRemoved IBreakpoint IMarkerDelta fView isAvailable fView isVisible fView asyncExec fView isAvailable TableViewer TableViewer fView getViewer getTable getSelectionIndices getControl setRedraw getControl setRedraw getSelection isEmpty getTable getTable getItemCount setSelection getSelection fView updateObjects
f View async Exec new Runnable public void run if f View is Available Checkbox Table Viewer viewer Checkbox Table Viewer f View get Viewer viewer get Control set Redraw false for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i I Marker marker breakpoint get Marker if marker null marker exists only refresh if still exists try boolean enabled breakpoint is Enabled if viewer get Checked breakpoint enabled viewer set Checked breakpoint breakpoint is Enabled catch Core Exception e DebugUI Plugin error Dialog DebugUI Plugin get Shell DebugUI Views Messages get String Breakpoints View Event Handler 1 DebugUI Views Messages get String Breakpoints View Event Handler 2 e NON NLS 1 NON NLS 2 DebugUI Plugin log e viewer refresh breakpoint viewer get Control set Redraw true f View update Objects  fView asyncExec fView isAvailable CheckboxTableViewer CheckboxTableViewer fView getViewer getControl setRedraw IBreakpoint IMarker getMarker isEnabled getChecked setChecked isEnabled CoreException DebugUIPlugin errorDialog DebugUIPlugin getShell DebugUIViewsMessages getString BreakpointsViewEventHandler DebugUIViewsMessages getString BreakpointsViewEventHandler DebugUIPlugin getControl setRedraw fView updateObjects
see I Breakpoints Listener breakpoints Changed I Breakpoint I Marker Delta public void breakpoints Changed final I Breakpoint breakpoints I Marker Delta deltas if f View is Available f View is Visible f View async Exec new Runnable public void run if f View is Available Checkbox Table Viewer viewer Checkbox Table Viewer f View get Viewer viewer get Control set Redraw false for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i I Marker marker breakpoint get Marker if marker null marker exists only refresh if still exists try boolean enabled breakpoint is Enabled if viewer get Checked breakpoint enabled viewer set Checked breakpoint breakpoint is Enabled catch Core Exception e DebugUI Plugin error Dialog DebugUI Plugin get Shell DebugUI Views Messages get String Breakpoints View Event Handler 1 DebugUI Views Messages get String Breakpoints View Event Handler 2 e NON NLS 1 NON NLS 2 DebugUI Plugin log e viewer refresh breakpoint viewer get Control set Redraw true f View update Objects  IBreakpointsListener breakpointsChanged IBreakpoint IMarkerDelta breakpointsChanged IBreakpoint IMarkerDelta fView isAvailable fView isVisible fView asyncExec fView isAvailable CheckboxTableViewer CheckboxTableViewer fView getViewer getControl setRedraw IBreakpoint IMarker getMarker isEnabled getChecked setChecked isEnabled CoreException DebugUIPlugin errorDialog DebugUIPlugin getShell DebugUIViewsMessages getString BreakpointsViewEventHandler DebugUIViewsMessages getString BreakpointsViewEventHandler DebugUIPlugin getControl setRedraw fView updateObjects
if f View is Available f View is Visible activity Manager Event have Enabled Activity Ids Changed f View async Exec new Runnable public void run f View get Viewer refresh f View initialize Checked State  fView isAvailable fView isVisible activityManagerEvent haveEnabledActivityIdsChanged fView asyncExec fView getViewer fView initializeCheckedState
When new activities are added or enabled refresh the view contents to add remove breakpoints related to the affected activities public void activity Manager Changed final Activity Manager Event activity Manager Event if f View is Available f View is Visible activity Manager Event have Enabled Activity Ids Changed f View async Exec new Runnable public void run f View get Viewer refresh f View initialize Checked State  activityManagerChanged ActivityManagerEvent activityManagerEvent fView isAvailable fView isVisible activityManagerEvent haveEnabledActivityIdsChanged fView asyncExec fView getViewer fView initializeCheckedState

public Break Partition String stream Identifier int offset int length super stream Identifier offset length BREAK PARTITION TYPE  BreakPartition streamIdentifier streamIdentifier BREAK_PARTITION_TYPE
see org eclipse debug internal ui views console Stream Partition create New Partition String int int public Stream Partition create New Partition String stream Identifier int offset int length return new Break Partition stream Identifier offset length  StreamPartition createNewPartition StreamPartition createNewPartition streamIdentifier BreakPartition streamIdentifier

public Console Document I Console Color Provider color Provider f Color Provider color Provider set Text Store new Text Store set Line Tracker new Default Line Tracker complete Initialization  ConsoleDocument IConsoleColorProvider colorProvider fColorProvider colorProvider setTextStore newTextStore setLineTracker DefaultLineTracker completeInitialization
Returns whether this document is read only public boolean is Read Only return f Color Provider is Read Only  isReadOnly fColorProvider isReadOnly
Creates a new text store for this document protected I Text Store new Text Store return new Console Output Text Store 2500  ITextStore newTextStore ConsoleOutputTextStore

see I Launch Listener launch Removed I Launch public void launch Removed I Launch launch remove Launch launch  ILaunchListener launchRemoved ILaunch launchRemoved ILaunch removeLaunch
protected void remove Launch I Launch launch I Process processes launch get Processes for int i 0 i processes length i I Process i Process processes i remove Process i Process if f Processes null f Processes remove launch  removeLaunch ILaunch IProcess getProcesses IProcess iProcess removeProcess iProcess fProcesses fProcesses
Removes the console and document associated with the given process param i Process process to clean up private void remove Process I Process i Process I Console console get Console i Process if console null I Console Manager manager Console Plugin get Default get Console Manager manager remove Consoles new I Console console I Document Provider provider get Document Provider provider disconnect i Process  iProcess removeProcess IProcess iProcess IConsole getConsole iProcess IConsoleManager ConsolePlugin getDefault getConsoleManager removeConsoles IConsole IDocumentProvider getDocumentProvider iProcess
Returns the console for the given process or code null code if none param process return the console for the given process or code null code if none public I Console get Console I Process process I Console Manager manager Console Plugin get Default get Console Manager I Console consoles manager get Consoles for int i 0 i consoles length i I Console console consoles i if console instanceof Process Console Process Console pc Process Console console if pc get Process equals process return pc return null  IConsole getConsole IProcess IConsoleManager ConsolePlugin getDefault getConsoleManager IConsole getConsoles IConsole ProcessConsole ProcessConsole ProcessConsole getProcess
see I Launch Listener launch Added I Launch public void launch Added I Launch launch launch Changed launch  ILaunchListener launchAdded ILaunch launchAdded ILaunch launchChanged
DebugUI Plugin get Standard Display sync Exec new Runnable public void run I Process processes launch get Processes for int i 0 i processes length i if get Console Document processes i null create new document I Process process processes i I Document Provider provider get Document Provider try provider connect process catch Core Exception e Process Console pc new Process Console process Console Plugin get Default get Console Manager add Consoles new I Console pc List removed get Removed Processes launch if removed null Iterator iterator removed iterator while iterator has Next I Process p I Process iterator next remove Process p  DebugUIPlugin getStandardDisplay syncExec IProcess getProcesses getConsoleDocument IProcess IDocumentProvider getDocumentProvider CoreException ProcessConsole ProcessConsole ConsolePlugin getDefault getConsoleManager addConsoles IConsole getRemovedProcesses hasNext IProcess IProcess removeProcess
see I Launch Listener launch Changed I Launch public void launch Changed final I Launch launch DebugUI Plugin get Standard Display sync Exec new Runnable public void run I Process processes launch get Processes for int i 0 i processes length i if get Console Document processes i null create new document I Process process processes i I Document Provider provider get Document Provider try provider connect process catch Core Exception e Process Console pc new Process Console process Console Plugin get Default get Console Manager add Consoles new I Console pc List removed get Removed Processes launch if removed null Iterator iterator removed iterator while iterator has Next I Process p I Process iterator next remove Process p  ILaunchListener launchChanged ILaunch launchChanged ILaunch DebugUIPlugin getStandardDisplay syncExec IProcess getProcesses getConsoleDocument IProcess IDocumentProvider getDocumentProvider CoreException ProcessConsole ProcessConsole ConsolePlugin getDefault getConsoleManager addConsoles IConsole getRemovedProcesses hasNext IProcess IProcess removeProcess
Returns the document for the process or code null code if none public I Document get Console Document I Process process I Document Provider provider get Document Provider return provider get Document process  IDocument getConsoleDocument IProcess IDocumentProvider getDocumentProvider getDocument
Returns the document provider return document provider private I Document Provider get Document Provider if f Default Document Provider null f Default Document Provider new Console Document Provider return f Default Document Provider  IDocumentProvider getDocumentProvider fDefaultDocumentProvider fDefaultDocumentProvider ConsoleDocumentProvider fDefaultDocumentProvider
Called by the debug ui plug in on startup The console document manager starts listening for launches to be registered and initializes if any launches already exist public void startup I Launch Manager launch Manager Debug Plugin get Default get Launch Manager launch Manager add Launch Listener this set up the docs for launches already registered I Launch launches launch Manager get Launches for int i 0 i launches length i launch Added launches i  ILaunchManager launchManager DebugPlugin getDefault getLaunchManager launchManager addLaunchListener ILaunch launchManager getLaunches launchAdded
Called by the debug ui plug in on shutdown The console document manager de registers as a launch listener and kills all existing console documents public void shutdown I Launch Manager launch Manager Debug Plugin get Default get Launch Manager I Launch launches launch Manager get Launches for int i 0 i launches length i I Launch launch launches i remove Launch launch launch Manager remove Launch Listener this if f Processes null f Processes clear  ILaunchManager launchManager DebugPlugin getDefault getLaunchManager ILaunch launchManager getLaunches ILaunch removeLaunch launchManager removeLaunchListener fProcesses fProcesses
Notifies the console document manager that system err is about to be written to the console The manager will open the console if the preference is set to show the console on system err protected void about To Write System Err I Process process if DebugUI Plugin get Default get Preference Store get Boolean I Debug Preference Constants CONSOLE OPEN ON ERR show Console process  aboutToWriteSystemErr IProcess DebugUIPlugin getDefault getPreferenceStore getBoolean IDebugPreferenceConstants CONSOLE_OPEN_ON_ERR showConsole
Notifies the console document manager that system out is about to be written to the console The manager will open the console if the preference is set to show the console on system out and the console document being written is associated with the current process protected void about To Write System Out I Process process if DebugUI Plugin get Default get Preference Store get Boolean I Debug Preference Constants CONSOLE OPEN ON OUT show Console process  aboutToWriteSystemOut IProcess DebugUIPlugin getDefault getPreferenceStore getBoolean IDebugPreferenceConstants CONSOLE_OPEN_ON_OUT showConsole
Opens the console view If the view is already open it is brought to the front protected void show Console final I Process process Console Plugin get Default get Console Manager show Console View get Console process  showConsole IProcess ConsolePlugin getDefault getConsoleManager showConsoleView getConsole
Returns a new console document color provider extension for the given process type or code null code if none param type corresponds to code I Process ATTR PROCESS TYPE code return I Console Color Provider public I Console Color Provider get Color Provider String type if f Color Providers null f Color Providers new Hash Map I Extension Point extension Point Platform get Extension Registry get Extension Point DebugUI Plugin get Unique Identifier I DebugUI Constants EXTENSION POINT CONSOLE COLOR PROVIDERS I Configuration Element elements extension Point get Configuration Elements for int i 0 i elements length i I Configuration Element extension elements i f Color Providers put extension get Attribute As Is process Type extension NON NLS 1 I Configuration Element extension I Configuration Element f Color Providers get type if extension null try Object color Provider extension create Executable Extension class NON NLS 1 if color Provider instanceof I Console Color Provider return I Console Color Provider color Provider DebugUI Plugin log Error Message Message Format format Console Messages get String Console Document Manager 1 new String extension get Declaring Extension get Unique Identifier NON NLS 1 catch Core Exception e DebugUI Plugin log e return null  IProcess ATTR_PROCESS_TYPE IConsoleColorProvider IConsoleColorProvider getColorProvider fColorProviders fColorProviders HashMap IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugUIPlugin getUniqueIdentifier IDebugUIConstants EXTENSION_POINT_CONSOLE_COLOR_PROVIDERS IConfigurationElement extensionPoint getConfigurationElements IConfigurationElement fColorProviders getAttributeAsIs processType IConfigurationElement IConfigurationElement fColorProviders colorProvider createExecutableExtension colorProvider IConsoleColorProvider IConsoleColorProvider colorProvider DebugUIPlugin logErrorMessage MessageFormat ConsoleMessages getString ConsoleDocumentManager getDeclaringExtension getUniqueIdentifier CoreException DebugUIPlugin
Creates and retuns a new line notifier for the given type of process or code null code if none The notifier will be seeded with new console line listeners registered for the given process type param type process type return line notifier or code null code public Console Line Notifier new Line Notifier String type if f Line Trackers null f Line Trackers new Hash Map I Extension Point extension Point Platform get Extension Registry get Extension Point DebugUI Plugin get Unique Identifier I DebugUI Constants EXTENSION POINT CONSOLE LINE TRACKERS I Configuration Element elements extension Point get Configuration Elements for int i 0 i elements length i I Configuration Element extension elements i String process Type extension get Attribute As Is process Type NON NLS 1 List list List f Line Trackers get process Type if list null list new Array List f Line Trackers put process Type list list add extension List extensions List f Line Trackers get type Console Line Notifier line Notifier null if extensions null line Notifier new Console Line Notifier Iterator iter extensions iterator while iter has Next I Configuration Element extension I Configuration Element iter next try Object tracker extension create Executable Extension class NON NLS 1 if tracker instanceof I Console Line Tracker line Notifier add Console Listener I Console Line Tracker tracker else DebugUI Plugin log Error Message Message Format format Console Messages get String Console Document Manager 2 new String extension get Declaring Extension get Unique Identifier NON NLS 1 catch Core Exception e DebugUI Plugin log e return line Notifier  ConsoleLineNotifier newLineNotifier fLineTrackers fLineTrackers HashMap IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugUIPlugin getUniqueIdentifier IDebugUIConstants EXTENSION_POINT_CONSOLE_LINE_TRACKERS IConfigurationElement extensionPoint getConfigurationElements IConfigurationElement processType getAttributeAsIs processType fLineTrackers processType ArrayList fLineTrackers processType fLineTrackers ConsoleLineNotifier lineNotifier lineNotifier ConsoleLineNotifier hasNext IConfigurationElement IConfigurationElement createExecutableExtension IConsoleLineTracker lineNotifier addConsoleListener IConsoleLineTracker DebugUIPlugin logErrorMessage MessageFormat ConsoleMessages getString ConsoleDocumentManager getDeclaringExtension getUniqueIdentifier CoreException DebugUIPlugin lineNotifier
Returns the processes that have been removed from the given launch or code null code if none param launch launch that has changed return removed processes or code null code private List get Removed Processes I Launch launch List removed null if f Processes null f Processes new Hash Map I Process old I Process f Processes get launch I Process curr launch get Processes if old null for int i 0 i old length i I Process process old i if contains curr process if removed null removed new Array List removed add process update cache with current processes f Processes put launch curr return removed  getRemovedProcesses ILaunch fProcesses fProcesses HashMap IProcess IProcess fProcesses IProcess getProcesses IProcess ArrayList fProcesses
Returns whether the given object is contained in the list param list list to search param object object to search for return whether the given object is contained in the list private boolean contains Object list Object object for int i 0 i list length i Object object2 list i if object2 equals object return true return false 

private String f Text null Stream Entry String text String stream Identifier f Text text f Stream Identifier stream Identifier  fText StreamEntry streamIdentifier fText fStreamIdentifier streamIdentifier
Returns the stream identifier public String get Stream Identifier return f Stream Identifier  getStreamIdentifier fStreamIdentifier
Returns the text written public String get Text return f Text  getText fText
public boolean is Closed Entry return false  isClosedEntry
class Streams Closed Entry extends Stream Entry Streams Closed Entry super NON NLS 1 NON NLS 2  StreamsClosedEntry StreamEntry StreamsClosedEntry
public boolean is Closed Entry return true  isClosedEntry
public Stream Listener String stream Identifier I Stream Monitor stream Monitor f Stream Identifier stream Identifier f Stream Monitor stream Monitor f Is System Out I DebugUI Constants ID STANDARD OUTPUT STREAM equals stream Identifier f Is System Err I DebugUI Constants ID STANDARD ERROR STREAM equals stream Identifier  StreamListener streamIdentifier IStreamMonitor streamMonitor fStreamIdentifier streamIdentifier fStreamMonitor streamMonitor fIsSystemOut IDebugUIConstants ID_STANDARD_OUTPUT_STREAM streamIdentifier fIsSystemErr IDebugUIConstants ID_STANDARD_ERROR_STREAM streamIdentifier
public void stream Appended String new Text I Stream Monitor monitor if f Is System Out DebugUI Plugin get Default get Console Document Manager about To Write System Out get Process else if f Is System Err DebugUI Plugin get Default get Console Document Manager about To Write System Err get Process Console Document Partitioner this stream Appended new Text f Stream Identifier  streamAppended newText IStreamMonitor fIsSystemOut DebugUIPlugin getDefault getConsoleDocumentManager aboutToWriteSystemOut getProcess fIsSystemErr DebugUIPlugin getDefault getConsoleDocumentManager aboutToWriteSystemErr getProcess ConsoleDocumentPartitioner streamAppended newText fStreamIdentifier
public void stream Closed I Stream Monitor monitor Console Document Partitioner this stream Closed f Stream Identifier  streamClosed IStreamMonitor ConsoleDocumentPartitioner streamClosed fStreamIdentifier
public void connect f Stream Monitor add Listener this String contents f Stream Monitor get Contents if f Stream Monitor instanceof I Flushable Stream Monitor flush the underlying buffer and do not duplicate storage I Flushable Stream Monitor flushable Stream Monitor I Flushable Stream Monitor f Stream Monitor flushable Stream Monitor flush Contents flushable Stream Monitor set Buffered false if contents length 0 stream Appended contents f Stream Monitor  fStreamMonitor addListener fStreamMonitor getContents fStreamMonitor IFlushableStreamMonitor IFlushableStreamMonitor flushableStreamMonitor IFlushableStreamMonitor fStreamMonitor flushableStreamMonitor flushContents flushableStreamMonitor setBuffered streamAppended fStreamMonitor
public void disconnect f Stream Monitor remove Listener this  fStreamMonitor removeListener
see org eclipse jface text I Document Partitioner connect org eclipse jface text I Document public void connect I Document document f Document document f Document add Position Category Hyperlink Position HYPER LINK CATEGORY document set Document Partitioner this I Preference Store store DebugUI Plugin get Default get Preference Store f Wrap store get Boolean I Debug Preference Constants CONSOLE WRAP f Max Line Length store get Int I Debug Preference Constants CONSOLE WIDTH store add Property Change Listener this f Color Provider connect f Process this Debug Plugin get Default add Debug Event Listener this if f Process is Terminated it is possible the terminate event will have been fired before the document is connected in this case ensure we have closed the streams and notified the line tracker streams Closed  IDocumentPartitioner IDocument IDocument fDocument fDocument addPositionCategory HyperlinkPosition HYPER_LINK_CATEGORY setDocumentPartitioner IPreferenceStore DebugUIPlugin getDefault getPreferenceStore fWrap getBoolean IDebugPreferenceConstants CONSOLE_WRAP fMaxLineLength getInt IDebugPreferenceConstants CONSOLE_WIDTH addPropertyChangeListener fColorProvider fProcess DebugPlugin getDefault addDebugEventListener fProcess isTerminated streamsClosed
see org eclipse jface text I Document Partitioner disconnect public void disconnect kill if f Line Notifier null f Line Notifier disconnect f Color Provider disconnect f Document set Document Partitioner null Debug Plugin get Default remove Debug Event Listener this  IDocumentPartitioner fLineNotifier fLineNotifier fColorProvider fDocument setDocumentPartitioner DebugPlugin getDefault removeDebugEventListener
see org eclipse jface text I Document Partitioner document About To Be Changed org eclipse jface text Document Event public void document About To Be Changed Document Event event  IDocumentPartitioner documentAboutToBeChanged DocumentEvent documentAboutToBeChanged DocumentEvent
see org eclipse jface text I Document Partitioner document Changed org eclipse jface text Document Event public boolean document Changed Document Event event return document Changed2 event null  IDocumentPartitioner documentChanged DocumentEvent documentChanged DocumentEvent documentChanged2
see org eclipse jface text I Document Partitioner get Legal Content Types public String get Legal Content Types return new String Input Partition INPUT PARTITION TYPE Output Partition OUTPUT PARTITION TYPE Break Partition BREAK PARTITION TYPE  IDocumentPartitioner getLegalContentTypes getLegalContentTypes InputPartition INPUT_PARTITION_TYPE OutputPartition OUTPUT_PARTITION_TYPE BreakPartition BREAK_PARTITION_TYPE
see org eclipse jface text I Document Partitioner get Content Type int public String get Content Type int offset I Typed Region partition get Partition offset if partition null return partition get Type return null  IDocumentPartitioner getContentType getContentType ITypedRegion getPartition getType
see org eclipse jface text I Document Partitioner compute Partitioning int int public I Typed Region compute Partitioning int offset int length if offset 0 length f Document get Length return I Typed Region f Partitions to Array new I Typed Region f Partitions size else int end offset length List list new Array List for int i 0 i f Partitions size i I Typed Region partition I Typed Region f Partitions get i int partition Start partition get Offset int partition End partition Start partition get Length if offset partition Start offset partition End offset partition Start end partition Start list add partition return I Typed Region list to Array new I Typed Region list size  IDocumentPartitioner computePartitioning ITypedRegion computePartitioning fDocument getLength ITypedRegion fPartitions toArray ITypedRegion fPartitions ArrayList fPartitions ITypedRegion ITypedRegion fPartitions partitionStart getOffset partitionEnd partitionStart getLength partitionStart partitionEnd partitionStart partitionStart ITypedRegion toArray ITypedRegion
see org eclipse jface text I Document Partitioner get Partition int public I Typed Region get Partition int offset for int i 0 i f Partitions size i I Typed Region partition I Typed Region f Partitions get i int start partition get Offset int end start partition get Length if offset start offset end return partition return null  IDocumentPartitioner getPartition ITypedRegion getPartition fPartitions ITypedRegion ITypedRegion fPartitions getOffset getLength
see org eclipse jface text I Document Partitioner Extension document Changed2 org eclipse jface text Document Event public I Region document Changed2 Document Event event if f Updating Buffer return new Region 0 f Document get Length add Pending Links String text event get Text if is Append In Progress stream input add Partition new Output Partition f Last Stream Identifier event get Offset text length if f Line Notifier null f Line Notifier console Changed event else console keyboard input int amount Deleted event get Length text length int doc Length f Document get Length int buffer Start Offset doc Length amount Deleted f Input Buffer length int buffer Modify Offset event get Offset buffer Start Offset int buffer Modify Offset End buffer Modify Offset event get Length if doc Length 0 cleared f Queue clear f Input Buffer set Length 0 f Partitions clear reset lines processed to 0 if f Line Notifier null f Line Notifier set Lines Processed 0 remove existing positions try Position positions f Document get Positions Hyperlink Position HYPER LINK CATEGORY for int i 0 i positions length i Position position positions i f Document remove Position Hyperlink Position HYPER LINK CATEGORY position catch Bad Position Category Exception e return new Region 0 0 if amount Deleted 0 deletion f Input Buffer replace buffer Modify Offset buffer Modify Offset End text replace the last partition Input Partition partition new Input Partition I DebugUI Constants ID STANDARD INPUT STREAM buffer Start Offset f Input Buffer length f Partitions set f Partitions size 1 partition else insert replace must process entire buffer in case of line delimiter insertion in middle of buffer parse for line delimiters indicate chunks to write to standard in String line Delimiters get Legal Line Delimiters String Buffer temp new String Buffer f Input Buffer to String temp replace buffer Modify Offset buffer Modify Offset End text String remaining temp to String int partition Offset buffer Start Offset f Input Buffer set Length 0 boolean includesLF false line delimiters are sorted by length compare longest ones first for int i line Delimiters length 1 i 0 i int lf remaining index Of line Delimiters i while lf 0 includesLF true int split lf line Delimiters i length f Input Buffer append remaining substring 0 split remaining remaining substring split String buffer f Input Buffer to String f Input Buffer set Length 0 Input Partition written Input Partition add Partition new Input Partition I DebugUI Constants ID STANDARD INPUT STREAM partition Offset split written set Read Only true partition Offset split add Partition new Input Partition I DebugUI Constants ID STANDARD INPUT STREAM partition Offset 0 if f Proxy null try f Proxy write buffer catch IO Exception ioe DebugUI Plugin log ioe lf remaining index Of line Delimiters i if includesLF break if remaining length 0 f Input Buffer append remaining add Partition new Input Partition I DebugUI Constants ID STANDARD INPUT STREAM partition Offset remaining length I Typed Region affected Regions compute Partitioning event get Offset text length if affected Regions length 0 return null if affected Regions length 1 return affected Regions 0 int affected Length affected Regions 0 get Length for int i 1 i affected Regions length i I Typed Region region affected Regions i affected Length region get Length return new Region affected Regions 0 get Offset affected Length  IDocumentPartitionerExtension documentChanged2 DocumentEvent IRegion documentChanged2 DocumentEvent fUpdatingBuffer fDocument getLength addPendingLinks getText isAppendInProgress addPartition OutputPartition fLastStreamIdentifier getOffset fLineNotifier fLineNotifier consoleChanged amountDeleted getLength docLength fDocument getLength bufferStartOffset docLength amountDeleted fInputBuffer bufferModifyOffset getOffset bufferStartOffset bufferModifyOffsetEnd bufferModifyOffset getLength docLength fQueue fInputBuffer setLength fPartitions fLineNotifier fLineNotifier setLinesProcessed fDocument getPositions HyperlinkPosition HYPER_LINK_CATEGORY fDocument removePosition HyperlinkPosition HYPER_LINK_CATEGORY BadPositionCategoryException amountDeleted fInputBuffer bufferModifyOffset bufferModifyOffsetEnd InputPartition InputPartition IDebugUIConstants ID_STANDARD_INPUT_STREAM bufferStartOffset fInputBuffer fPartitions fPartitions lineDelimiters getLegalLineDelimiters StringBuffer StringBuffer fInputBuffer toString bufferModifyOffset bufferModifyOffsetEnd toString partitionOffset bufferStartOffset fInputBuffer setLength lineDelimiters indexOf lineDelimiters lineDelimiters fInputBuffer fInputBuffer toString fInputBuffer setLength InputPartition InputPartition addPartition InputPartition IDebugUIConstants ID_STANDARD_INPUT_STREAM partitionOffset setReadOnly partitionOffset addPartition InputPartition IDebugUIConstants ID_STANDARD_INPUT_STREAM partitionOffset fProxy fProxy IOException DebugUIPlugin indexOf lineDelimiters fInputBuffer addPartition InputPartition IDebugUIConstants ID_STANDARD_INPUT_STREAM partitionOffset ITypedRegion affectedRegions computePartitioning getOffset affectedRegions affectedRegions affectedRegions affectedLength affectedRegions getLength affectedRegions ITypedRegion affectedRegions affectedLength getLength affectedRegions getOffset affectedLength
Adds a new colored input partition combining with the previous partition if possible protected Stream Partition add Partition Stream Partition partition if f Partitions is Empty f Partitions add partition else int index f Partitions size 1 Stream Partition last Stream Partition f Partitions get index if last can Be Combined With partition replace with a single partition partition last combine With partition f Partitions set index partition else different kinds add a new parition f Partitions add partition return partition  StreamPartition addPartition StreamPartition fPartitions isEmpty fPartitions fPartitions StreamPartition StreamPartition fPartitions canBeCombinedWith combineWith fPartitions fPartitions
Add any pending links to the document that are now within the document s bounds protected void add Pending Links synchronized f Pending Links if f Pending Links is Empty return Iterator links f Pending Links iterator while links has Next Hyperlink Position link Hyperlink Position links next if link get Offset link get Length f Document get Length links remove add Link link get Hyper Link link get Offset link get Length  addPendingLinks fPendingLinks fPendingLinks isEmpty fPendingLinks hasNext HyperlinkPosition HyperlinkPosition getOffset getLength fDocument getLength addLink getHyperLink getOffset getLength
public Console Document Partitioner I Process process I Console Color Provider color Provider f Process process f Color Provider color Provider I Preference Store store DebugUI Plugin get Default get Preference Store boolean limit store get Boolean I Debug Preference Constants CONSOLE LIMIT CONSOLE OUTPUT if limit f Low Water Mark store get Int I Debug Preference Constants CONSOLE LOW WATER MARK f High Water Mark store get Int I Debug Preference Constants CONSOLE HIGH WATER MARK f Max Append Size f Low Water Mark else f Low Water Mark 1 f High Water Mark 1 f Max Append Size 80000  ConsoleDocumentPartitioner IProcess IConsoleColorProvider colorProvider fProcess fColorProvider colorProvider IPreferenceStore DebugUIPlugin getDefault getPreferenceStore getBoolean IDebugPreferenceConstants CONSOLE_LIMIT_CONSOLE_OUTPUT fLowWaterMark getInt IDebugPreferenceConstants CONSOLE_LOW_WATER_MARK fHighWaterMark getInt IDebugPreferenceConstants CONSOLE_HIGH_WATER_MARK fMaxAppendSize fLowWaterMark fLowWaterMark fHighWaterMark fMaxAppendSize
Stops reading polling immediately public synchronized void kill if f Killed f Killed true if f Polling Thread null f Polling Thread is Alive f Polling Thread interrupt f Poll false Iterator iter f Stream Listeners iterator while iter has Next Stream Listener listener Stream Listener iter next listener disconnect DebugUI Plugin get Default get Preference Store remove Property Change Listener this  fKilled fKilled fPollingThread fPollingThread isAlive fPollingThread fPoll fStreamListeners hasNext StreamListener StreamListener DebugUIPlugin getDefault getPreferenceStore removePropertyChangeListener
Runnable r new Runnable public void run poll And Sleep  pollAndSleep
public synchronized void start Reading if f Polling Thread null already polling return Runnable r new Runnable public void run poll And Sleep f Poll true f Polling Thread new Thread r Console Polling Thread NON NLS 1 f Polling Thread start  startReading fPollingThread pollAndSleep fPoll fPollingThread fPollingThread
Polls and sleeps until closed or the associated process terminates protected void poll And Sleep while f Killed f Poll is Closed f Queue is Empty poll try Thread sleep BASE DELAY catch Interrupted Exception e  pollAndSleep fKilled fPoll isClosed fQueue isEmpty BASE_DELAY InterruptedException
display async Exec new Runnable public void run if f Line Notifier null f Line Notifier streams Closed  asyncExec fLineNotifier fLineNotifier streamsClosed
Polls the queue for new output and updates this document protected void poll if is Append In Progress return synchronized f Queue String Buffer buffer null Stream Entry prev null int processed 0 int amount 0 String lds f Document get Legal Line Delimiters boolean closed false while f Killed closed processed f Queue size amount f Max Append Size Stream Entry entry Stream Entry f Queue get processed if entry is Closed Entry closed true processed else if prev null prev get Stream Identifier equals entry get Stream Identifier String text entry get Text if buffer null buffer new String Buffer text length if is Wrap for int i 0 i text length i if f Line Length f Max Line Length String d get Line Delimiter text i lds if d null buffer append lds 0 else buffer append d i i d length f Line Length 0 if i text length String line Delimiter get Line Delimiter text i lds if line Delimiter null buffer append text char At i f Line Length else buffer append line Delimiter f Line Length 0 i i line Delimiter length 1 else buffer append text prev entry processed amount entry get Text length else change streams write the contents of the current stream and start processing the next stream if buffer null append To Document buffer to String prev get Stream Identifier buffer set Length 0 prev null if buffer null append To Document buffer to String prev get Stream Identifier if closed Display display DebugUI Plugin get Standard Display if display null display async Exec new Runnable public void run if f Line Notifier null f Line Notifier streams Closed for int i 0 i processed i f Queue remove 0  isAppendInProgress fQueue StringBuffer StreamEntry fDocument getLegalLineDelimiters fKilled fQueue fMaxAppendSize StreamEntry StreamEntry fQueue isClosedEntry getStreamIdentifier getStreamIdentifier getText StringBuffer isWrap fLineLength fMaxLineLength getLineDelimiter fLineLength lineDelimiter getLineDelimiter lineDelimiter charAt fLineLength lineDelimiter fLineLength lineDelimiter getText appendToDocument toString getStreamIdentifier setLength appendToDocument toString getStreamIdentifier DebugUIPlugin getStandardDisplay asyncExec fLineNotifier fLineNotifier streamsClosed fQueue
Returns the longest line delimiter at the given position in the given text or code null code if none param text the text in which to look for a line delimiter param pos the position at which to look for a line delimiter param line Delimiters the line delimiters to look for protected String get Line Delimiter String text int pos String line Delimiters String ld null for int i 0 i line Delimiters length i if text region Matches pos line Delimiters i 0 line Delimiters i length if ld null ld line Delimiters i else if ld length line Delimiters i length ld line Delimiters i return ld  lineDelimiters getLineDelimiter lineDelimiters lineDelimiters regionMatches lineDelimiters lineDelimiters lineDelimiters lineDelimiters lineDelimiters
Returns whether this console document is performing auto wrap protected boolean is Wrap return f Wrap  isWrap fWrap
Runnable r new Runnable public void run set Append In Progress true f Last Stream Identifier stream Identifier try f Document replace f Document get Length 0 text warn Of Content Change catch Bad Location Exception e set Append In Progress false check Overflow  setAppendInProgress fLastStreamIdentifier streamIdentifier fDocument fDocument getLength warnOfContentChange BadLocationException setAppendInProgress checkOverflow
The stream with the given identifier has had text appended to it Adds the new text to the document see I Stream Listener stream Appended String I Stream Monitor protected void append To Document final String text final String stream Identifier Runnable r new Runnable public void run set Append In Progress true f Last Stream Identifier stream Identifier try f Document replace f Document get Length 0 text warn Of Content Change catch Bad Location Exception e set Append In Progress false check Overflow Display display DebugUI Plugin get Standard Display if display null display async Exec r  IStreamListener streamAppended IStreamMonitor appendToDocument streamIdentifier setAppendInProgress fLastStreamIdentifier streamIdentifier fDocument fDocument getLength warnOfContentChange BadLocationException setAppendInProgress checkOverflow DebugUIPlugin getStandardDisplay asyncExec
Checks to see if the console buffer has overflowed and empties the overflow if needed updating partitions and hyperlink positions protected void check Overflow if f High Water Mark 0 if f Document get Length f High Water Mark int line Difference 0 if f Line Notifier null int processed f Line Notifier get Lines Processed int num Lines f Document get Number Of Lines line Difference num Lines processed int overflow f Document get Length f Low Water Mark f Updating Buffer true try update partitions List new Paritions new Array List f Partitions size Iterator partitions f Partitions iterator while partitions has Next I Typed Region region I Typed Region partitions next if region instanceof Stream Partition Stream Partition stream Partition Stream Partition region I Typed Region new Partition null int offset region get Offset if offset overflow int end Offset offset region get Length if end Offset overflow remove partition else split partition int length end Offset overflow new Partition stream Partition create New Partition stream Partition get Stream Identifier 0 length else modify parition offset new Partition stream Partition create New Partition stream Partition get Stream Identifier stream Partition get Offset overflow stream Partition get Length if new Partition null new Paritions add new Partition f Partitions new Paritions update hyperlinks try Position hyperlinks f Document get Positions Hyperlink Position HYPER LINK CATEGORY for int i 0 i hyperlinks length i Hyperlink Position position Hyperlink Position hyperlinks i remove old the position f Document remove Position Hyperlink Position HYPER LINK CATEGORY position if position get Offset overflow add new poisition try f Document add Position Hyperlink Position HYPER LINK CATEGORY new Hyperlink Position position get Hyper Link position get Offset overflow position get Length catch Bad Location Exception e catch Bad Position Category Exception e synchronized f Pending Links update pending hyperlinks Vector new Pending Links new Vector f Pending Links size Iterator pending Links f Pending Links iterator while pending Links has Next Hyperlink Position position Hyperlink Position pending Links next if position get Offset overflow new Pending Links add new Hyperlink Position position get Hyper Link position get Offset overflow position get Length f Pending Links new Pending Links remove overflow text try f Document replace 0 overflow NON NLS 1 catch Bad Location Exception e DebugUI Plugin log e finally update number of lines processed if f Line Notifier null f Line Notifier set Lines Processed f Document get Number Of Lines line Difference f Updating Buffer false  checkOverflow fHighWaterMark fDocument getLength fHighWaterMark lineDifference fLineNotifier fLineNotifier getLinesProcessed numLines fDocument getNumberOfLines lineDifference numLines fDocument getLength fLowWaterMark fUpdatingBuffer newParitions ArrayList fPartitions fPartitions hasNext ITypedRegion ITypedRegion StreamPartition StreamPartition streamPartition StreamPartition ITypedRegion newPartition getOffset endOffset getLength endOffset endOffset newPartition streamPartition createNewPartition streamPartition getStreamIdentifier newPartition streamPartition createNewPartition streamPartition getStreamIdentifier streamPartition getOffset streamPartition getLength newPartition newParitions newPartition fPartitions newParitions fDocument getPositions HyperlinkPosition HYPER_LINK_CATEGORY HyperlinkPosition HyperlinkPosition fDocument removePosition HyperlinkPosition HYPER_LINK_CATEGORY getOffset fDocument addPosition HyperlinkPosition HYPER_LINK_CATEGORY HyperlinkPosition getHyperLink getOffset getLength BadLocationException BadPositionCategoryException fPendingLinks newPendingLinks fPendingLinks pendingLinks fPendingLinks pendingLinks hasNext HyperlinkPosition HyperlinkPosition pendingLinks getOffset newPendingLinks HyperlinkPosition getHyperLink getOffset getLength fPendingLinks newPendingLinks fDocument BadLocationException DebugUIPlugin fLineNotifier fLineNotifier setLinesProcessed fDocument getNumberOfLines lineDifference fUpdatingBuffer
The stream with the given identifier has had text appended to it Adds a new entry to the queue protected void stream Appended String text String stream Identifier synchronized f Queue if f Closed ERROR attempt to append after console is closed DebugUI Plugin log Error Message An attempt was made to append text to the console after it was closed NON NLS 1 else f Queue add new Stream Entry text stream Identifier  streamAppended streamIdentifier fQueue fClosed DebugUIPlugin logErrorMessage fQueue StreamEntry streamIdentifier
The streams associated with this process have been closed Adds a new stream closed entry to the queue protected void streams Closed synchronized f Queue if f Closed f Queue add new Streams Closed Entry f Closed true  streamsClosed fQueue fClosed fQueue StreamsClosedEntry fClosed
Sets whether a runnable has been submitted to update the console document protected void set Append In Progress boolean appending f Appending appending  setAppendInProgress fAppending
Returns whether a runnable has been submitted to update the console document protected boolean is Append In Progress return f Appending  isAppendInProgress fAppending
see org eclipse jface util I Property Change Listener property Change Property Change Event public void property Change Property Change Event event if event get Property equals I Debug Preference Constants CONSOLE WRAP f Wrap DebugUI Plugin get Default get Preference Store get Boolean I Debug Preference Constants CONSOLE WRAP else if event get Property equals I Debug Preference Constants CONSOLE WIDTH f Max Line Length DebugUI Plugin get Default get Preference Store get Int I Debug Preference Constants CONSOLE WIDTH  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent getProperty IDebugPreferenceConstants CONSOLE_WRAP fWrap DebugUIPlugin getDefault getPreferenceStore getBoolean IDebugPreferenceConstants CONSOLE_WRAP getProperty IDebugPreferenceConstants CONSOLE_WIDTH fMaxLineLength DebugUIPlugin getDefault getPreferenceStore getInt IDebugPreferenceConstants CONSOLE_WIDTH
Comparator comparator new Comparator see java util Comparator compare java lang Object java lang Object public int compare Object a Object b String s1 String a String s2 String b return s2 length s1 length 
Returns a collection of legal line delimiters for this partitioner s associated document sorted by length in descending order protected String get Legal Line Delimiters if f Sorted Line Delimiters null String line Delimiters f Document get Legal Line Delimiters List list new Array List line Delimiters length for int i 0 i line Delimiters length i list add line Delimiters i Comparator comparator new Comparator see java util Comparator compare java lang Object java lang Object public int compare Object a Object b String s1 String a String s2 String b return s2 length s1 length Collections sort list comparator f Sorted Line Delimiters String list to Array new String line Delimiters length return f Sorted Line Delimiters  getLegalLineDelimiters fSortedLineDelimiters lineDelimiters fDocument getLegalLineDelimiters ArrayList lineDelimiters lineDelimiters lineDelimiters fSortedLineDelimiters toArray lineDelimiters fSortedLineDelimiters
public void connect I Stream Monitor stream Monitor String stream Identifer if stream Monitor null Stream Listener listener new Stream Listener stream Identifer stream Monitor f Stream Listeners add listener listener connect ensure we start polling for output start Reading  IStreamMonitor streamMonitor streamIdentifer streamMonitor StreamListener StreamListener streamIdentifer streamMonitor fStreamListeners startReading
public void connect I Streams Proxy streams Proxy f Proxy streams Proxy connect streams Proxy get Output Stream Monitor I DebugUI Constants ID STANDARD OUTPUT STREAM connect streams Proxy get Error Stream Monitor I DebugUI Constants ID STANDARD ERROR STREAM  IStreamsProxy streamsProxy fProxy streamsProxy streamsProxy getOutputStreamMonitor IDebugUIConstants ID_STANDARD_OUTPUT_STREAM streamsProxy getErrorStreamMonitor IDebugUIConstants ID_STANDARD_ERROR_STREAM
Returns whether the streams assocaited with this console s process have been closed protected boolean is Closed return f Closed  isClosed fClosed
protected I Console Color Provider get Color Provider return f Color Provider  IConsoleColorProvider getColorProvider fColorProvider
public void add Link I Console Hyperlink link int offset int length Hyperlink Position hyperlink Position new Hyperlink Position link offset length try f Document add Position Hyperlink Position HYPER LINK CATEGORY hyperlink Position catch Bad Position Category Exception e internal error DebugUI Plugin log e catch Bad Location Exception e queue the link f Pending Links add hyperlink Position  addLink IConsoleHyperlink HyperlinkPosition hyperlinkPosition HyperlinkPosition fDocument addPosition HyperlinkPosition HYPER_LINK_CATEGORY hyperlinkPosition BadPositionCategoryException DebugUIPlugin BadLocationException fPendingLinks hyperlinkPosition
see org eclipse debug ui console I Console get Document public I Document get Document return f Document  IConsole getDocument IDocument getDocument fDocument
see org eclipse debug ui console I Console get Process public I Process get Process return f Process  IConsole getProcess IProcess getProcess fProcess
Connects the given line notifier to this console document partitioner param line Notifier public void connect Line Notifier Console Line Notifier line Notifier f Line Notifier line Notifier line Notifier connect this  lineNotifier connectLineNotifier ConsoleLineNotifier lineNotifier fLineNotifier lineNotifier lineNotifier
public I Region get Region I Console Hyperlink link try Position positions get Document get Positions Hyperlink Position HYPER LINK CATEGORY for int i 0 i positions length i Hyperlink Position position Hyperlink Position positions i if position get Hyper Link equals link return new Region position get Offset position get Length catch Bad Position Category Exception e return null  IRegion getRegion IConsoleHyperlink getDocument getPositions HyperlinkPosition HYPER_LINK_CATEGORY HyperlinkPosition HyperlinkPosition getHyperLink getOffset getLength BadPositionCategoryException
public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i if event get Kind Debug Event TERMINATE event get Source equals get Process Debug Plugin get Default remove Debug Event Listener this streams Closed  handleDebugEvents DebugEvent DebugEvent getKind DebugEvent getSource getProcess DebugPlugin getDefault removeDebugEventListener streamsClosed
private void warn Of Content Change Console Plugin get Default get Console Manager warn Of Content Change DebugUI Tools get Console f Process  warnOfContentChange ConsolePlugin getDefault getConsoleManager warnOfContentChange DebugUITools getConsole fProcess

see org eclipse ui texteditor Abstract Document Provider create Document java lang Object protected I Document create Document Object element if element instanceof I Process I Process process I Process element I Console Color Provider color Provider get Color Provider process Console Document doc new Console Document color Provider Console Document Partitioner partitioner new Console Document Partitioner process color Provider Console Line Notifier line Notifier get Line Notifier process partitioner connect doc if line Notifier null partitioner connect Line Notifier line Notifier return doc return null  AbstractDocumentProvider createDocument IDocument createDocument IProcess IProcess IProcess IConsoleColorProvider colorProvider getColorProvider ConsoleDocument ConsoleDocument colorProvider ConsoleDocumentPartitioner ConsoleDocumentPartitioner colorProvider ConsoleLineNotifier lineNotifier getLineNotifier lineNotifier connectLineNotifier lineNotifier
see org eclipse ui texteditor Abstract Document Provider create Annotation Model java lang Object protected I Annotation Model create Annotation Model Object element return null  AbstractDocumentProvider createAnnotationModel IAnnotationModel createAnnotationModel
see org eclipse ui texteditor Abstract Document Provider do Save Document org eclipse core runtime I Progress Monitor java lang Object org eclipse jface text I Document boolean protected void do Save Document I Progress Monitor monitor Object element I Document document boolean overwrite  AbstractDocumentProvider doSaveDocument IProgressMonitor IDocument doSaveDocument IProgressMonitor IDocument
see org eclipse ui texteditor Abstract Document Provider dispose Element Info java lang Object org eclipse ui texteditor Abstract Document Provider Element Info protected void dispose Element Info Object element Element Info info Console Document document Console Document info f Document document get Document Partitioner disconnect super dispose Element Info element info  AbstractDocumentProvider disposeElementInfo AbstractDocumentProvider ElementInfo disposeElementInfo ElementInfo ConsoleDocument ConsoleDocument fDocument getDocumentPartitioner disposeElementInfo
Returns a color provider for the given process param process return I Console Color Provider protected I Console Color Provider get Color Provider I Process process String type process get Attribute I Process ATTR PROCESS TYPE I Console Color Provider color Provider null if type null color Provider get Console Document Manager get Color Provider type if color Provider null color Provider new Console Color Provider return color Provider  IConsoleColorProvider IConsoleColorProvider getColorProvider IProcess getAttribute IProcess ATTR_PROCESS_TYPE IConsoleColorProvider colorProvider colorProvider getConsoleDocumentManager getColorProvider colorProvider colorProvider ConsoleColorProvider colorProvider
Returns the line notifier for this console or code null code if none param process return line notifier or code null code protected Console Line Notifier get Line Notifier I Process process String type process get Attribute I Process ATTR PROCESS TYPE if type null return get Console Document Manager new Line Notifier type return null  ConsoleLineNotifier getLineNotifier IProcess getAttribute IProcess ATTR_PROCESS_TYPE getConsoleDocumentManager newLineNotifier
Convenience accessor return Console Document Manager private Console Document Manager get Console Document Manager return DebugUI Plugin get Default get Console Document Manager  ConsoleDocumentManager ConsoleDocumentManager getConsoleDocumentManager DebugUIPlugin getDefault getConsoleDocumentManager
protected I Runnable Context get Operation Runner I Progress Monitor monitor if f Operation Runner null f Operation Runner new Workspace Operation Runner f Operation Runner set Progress Monitor monitor return f Operation Runner  IRunnableContext getOperationRunner IProgressMonitor fOperationRunner fOperationRunner WorkspaceOperationRunner fOperationRunner setProgressMonitor fOperationRunner

Connects this notifier to the given console param console public void connect I Console console f Console console Object listeners f Listeners get Listeners for int i 0 i listeners length i I Console Line Tracker listener I Console Line Tracker listeners i listener init console  IConsole fConsole fListeners getListeners IConsoleLineTracker IConsoleLineTracker
Disposes this notifier public void disconnect synchronized this Object listeners f Listeners get Listeners for int i 0 i listeners length i I Console Line Tracker listener I Console Line Tracker listeners i listener dispose f Listeners null f Console null  fListeners getListeners IConsoleLineTracker IConsoleLineTracker fListeners fConsole
Notification the console has changed based on the given event public void console Changed Document Event event process New Lines  consoleChanged DocumentEvent processNewLines
Notification the console s streams have been closed public void streams Closed synchronized this if f Console null already disconnected return f Closed true process New Lines Object listeners f Listeners get Listeners for int i 0 i listeners length i Object obj listeners i if obj instanceof I Console Line Tracker Extension I Console Line Tracker Extension obj console Closed  streamsClosed fConsole fClosed processNewLines fListeners getListeners IConsoleLineTrackerExtension IConsoleLineTrackerExtension consoleClosed
Notifies listeners of any new lines appended to the console protected synchronized void process New Lines I Document document f Console get Document int lines document get Number Of Lines Object listeners f Listeners get Listeners for int line f Lines Processed line lines line String delimiter null try delimiter document get Line Delimiter line catch Bad Location Exception e DebugUI Plugin log e return if delimiter null f Closed line not complete yet return f Lines Processed I Region line Region null try line Region document get Line Information line catch Bad Location Exception e DebugUI Plugin log e return for int i 0 i listeners length i I Console Line Tracker listener I Console Line Tracker listeners i listener line Appended line Region  processNewLines IDocument fConsole getDocument getNumberOfLines fListeners getListeners fLinesProcessed getLineDelimiter BadLocationException DebugUIPlugin fClosed fLinesProcessed IRegion lineRegion lineRegion getLineInformation BadLocationException DebugUIPlugin IConsoleLineTracker IConsoleLineTracker lineAppended lineRegion
Adds the given listener to the list of listeners notified when a line of text is appended to the console param listener public void add Console Listener I Console Line Tracker listener f Listeners add listener  addConsoleListener IConsoleLineTracker fListeners
protected void set Lines Processed int lines Processed f Lines Processed lines Processed  setLinesProcessed linesProcessed fLinesProcessed linesProcessed
protected int get Lines Processed return f Lines Processed  getLinesProcessed fLinesProcessed

Resource Bundle get Bundle BUNDLE NAME private Console Messages  ResourceBundle getBundle BUNDLE_NAME ConsoleMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

private String Buffer f Buffer public Console Output Text Store int buffer Size f Buffer new String Buffer buffer Size  StringBuffer fBuffer ConsoleOutputTextStore bufferSize fBuffer StringBuffer bufferSize
see I Text Store get int public char get int pos return f Buffer char At pos  ITextStore fBuffer charAt
see I Text Store get int int public String get int pos int length return f Buffer substring pos pos length  ITextStore fBuffer
see I Text Store get Length public int get Length return f Buffer length  ITextStore getLength getLength fBuffer
see I Text Store replace int int String public void replace int pos int length String text if text null text NON NLS 1 f Buffer replace pos pos length text  ITextStore fBuffer
see I Text Store set String public void set String text f Buffer new String Buffer text  ITextStore fBuffer StringBuffer
see String Buffer ensure Capacity int public void set Minimal Buffer Size int buffer Size f Buffer ensure Capacity buffer Size  StringBuffer ensureCapacity setMinimalBufferSize bufferSize fBuffer ensureCapacity bufferSize

if event get Kind Debug Event TERMINATE source instanceof I Debug Target source instanceof I Process DebugUI Plugin get Standard Display async Exec new Runnable public void run update  getKind DebugEvent IDebugTarget IProcess DebugUIPlugin getStandardDisplay asyncExec
public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i Object source event get Source if event get Kind Debug Event TERMINATE source instanceof I Debug Target source instanceof I Process DebugUI Plugin get Standard Display async Exec new Runnable public void run update  handleDebugEvents DebugEvent DebugEvent getSource getKind DebugEvent IDebugTarget IProcess DebugUIPlugin getStandardDisplay asyncExec
public void dispose Debug Plugin get Default remove Debug Event Listener this  DebugPlugin getDefault removeDebugEventListener
public void update I Launch launches Debug Plugin get Default get Launch Manager get Launches for int i 0 i launches length i I Launch launch launches i if launch is Terminated set Enabled true return set Enabled false  ILaunch DebugPlugin getDefault getLaunchManager getLaunches ILaunch isTerminated setEnabled setEnabled
see org eclipse jface action I Action run public void run I Launch launches Debug Plugin get Default get Launch Manager get Launches Remove All Terminated Action remove Terminated Launches launches  IAction ILaunch DebugPlugin getDefault getLaunchManager getLaunches RemoveAllTerminatedAction removeTerminatedLaunches
public Console Remove All Terminated Action super Console Messages get String Console Remove All Terminated Action 0 NON NLS 1 set Tool Tip Text Console Messages get String Console Remove All Terminated Action 1 NON NLS 1 set Image Descriptor Debug Plugin Images get Image Descriptor I DebugUI Constants IMG LCL REMOVE ALL set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL REMOVE ALL set Hover Image Descriptor Debug Plugin Images get Image Descriptor I DebugUI Constants IMG LCL REMOVE ALL Debug Plugin get Default add Debug Event Listener this update  ConsoleRemoveAllTerminatedAction ConsoleMessages getString ConsoleRemoveAllTerminatedAction setToolTipText ConsoleMessages getString ConsoleRemoveAllTerminatedAction setImageDescriptor DebugPluginImages getImageDescriptor IDebugUIConstants IMG_LCL_REMOVE_ALL setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_REMOVE_ALL setHoverImageDescriptor DebugPluginImages getImageDescriptor IDebugUIConstants IMG_LCL_REMOVE_ALL DebugPlugin getDefault addDebugEventListener

Creates a terminate action for the console public Console Terminate Action Process Console console super Console Messages get String Console Terminate Action 0 NON NLS 1 f Console console set Tool Tip Text Console Messages get String Console Terminate Action 1 NON NLS 1 set Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG LCL TERMINATE set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL TERMINATE set Hover Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG LCL TERMINATE update  ConsoleTerminateAction ProcessConsole ConsoleMessages getString ConsoleTerminateAction fConsole setToolTipText ConsoleMessages getString ConsoleTerminateAction setImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_LCL_TERMINATE setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_TERMINATE setHoverImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_LCL_TERMINATE
see org eclipse ui texteditor I Update update public void update I Process process f Console get Process set Enabled process can Terminate  IUpdate IProcess fConsole getProcess setEnabled canTerminate
public void run try f Console get Process terminate catch Debug Exception e TODO report exception  fConsole getProcess DebugException

class Internal Document Listener implements I Document Listener see I Document Listener document About To Be Changed Document Event public void document About To Be Changed Document Event e  InternalDocumentListener IDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent documentAboutToBeChanged DocumentEvent
see I Document Listener document Changed Document Event public void document Changed Document Event e Console Document doc Console Document get Document if doc null get Text Widget set Editable false return get Text Widget set Editable doc is Read Only reveal End Of Document  IDocumentListener documentChanged DocumentEvent documentChanged DocumentEvent ConsoleDocument ConsoleDocument getDocument getTextWidget setEditable getTextWidget setEditable isReadOnly revealEndOfDocument
Creates a new console viewer and adds verification checking to only allow text modification if the text is being modified in the editable portion of the underlying document see org eclipse swt events Verify Listener public Console Viewer Composite parent super parent getSWT Styles get Text Widget set Double Click Enabled true DebugUI Plugin get Default get Preference Store add Property Change Listener this J Face Resources get Font Registry add Listener this get Text Widget set Font J Face Resources get Font I Console Constants CONSOLE FONT get Text Widget add Mouse Track Listener this get Text Widget add Paint Listener this get Text Widget add Line Style Listener this get Text Widget add Listener SWT Key Up this get Text Widget set Tabs DebugUI Plugin get Default get Plugin Preferences get Int I Debug Preference Constants CONSOLE TAB WIDTH  VerifyListener ConsoleViewer getSWTStyles getTextWidget setDoubleClickEnabled DebugUIPlugin getDefault getPreferenceStore addPropertyChangeListener JFaceResources getFontRegistry addListener getTextWidget setFont JFaceResources getFont IConsoleConstants CONSOLE_FONT getTextWidget addMouseTrackListener getTextWidget addPaintListener getTextWidget addLineStyleListener getTextWidget addListener KeyUp getTextWidget setTabs DebugUIPlugin getDefault getPluginPreferences getInt IDebugPreferenceConstants CONSOLE_TAB_WIDTH
Returns the SWT style flags used when instantiating this viewer private static int getSWT Styles int styles SWT H SCROLL SWT V SCROLL return styles  getSWTStyles H_SCROLL V_SCROLL
Reveals makes visible the end of the current document protected void reveal End Of Document if is Auto Scroll I Document doc get Document int lines doc get Number Of Lines try lines are 0 based int line Start Offset doc get Line Offset lines 1 Styled Text widget get Text Widget if line Start Offset 0 widget set Caret Offset line Start Offset widget show Selection int line End Offset line Start Offset doc get Line Length lines 1 if line End Offset 0 widget set Caret Offset line End Offset catch Bad Location Exception e  revealEndOfDocument isAutoScroll IDocument getDocument getNumberOfLines lineStartOffset getLineOffset StyledText getTextWidget lineStartOffset setCaretOffset lineStartOffset showSelection lineEndOffset lineStartOffset getLineLength lineEndOffset setCaretOffset lineEndOffset BadLocationException
see I Text Viewer set Document I Document public void set Document I Document doc I Document old Doc get Document I Document document doc if old Doc null document null return if old Doc null old Doc remove Document Listener f Internal Document Listener if old Doc equals document document add Document Listener f Internal Document Listener return super set Document document if document null reveal End Of Document document add Document Listener f Internal Document Listener  ITextViewer setDocument IDocument setDocument IDocument IDocument oldDoc getDocument IDocument oldDoc oldDoc oldDoc removeDocumentListener fInternalDocumentListener oldDoc addDocumentListener fInternalDocumentListener setDocument revealEndOfDocument addDocumentListener fInternalDocumentListener
see I Property Change Listener property Change Property Change Event public void property Change Property Change Event event String property Name event get Property if property Name equals I Debug Preference Constants CONSOLE SYS IN COLOR property Name equals I Debug Preference Constants CONSOLE SYS OUT COLOR property Name equals I Debug Preference Constants CONSOLE SYS ERR COLOR get Text Widget redraw else if property Name equals I Console Constants CONSOLE FONT get Text Widget set Font J Face Resources get Font I Console Constants CONSOLE FONT else if property Name equals I Debug Preference Constants CONSOLE TAB WIDTH get Text Widget set Tabs DebugUI Plugin get Default get Plugin Preferences get Int I Debug Preference Constants CONSOLE TAB WIDTH else if property Name equals I Internal DebugUI Constants PREF CONSOLE SCROLL LOCK set Auto Scroll DebugUI Plugin get Default get Plugin Preferences get Boolean I Internal DebugUI Constants PREF CONSOLE SCROLL LOCK  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent propertyName getProperty propertyName IDebugPreferenceConstants CONSOLE_SYS_IN_COLOR propertyName IDebugPreferenceConstants CONSOLE_SYS_OUT_COLOR propertyName IDebugPreferenceConstants CONSOLE_SYS_ERR_COLOR getTextWidget propertyName IConsoleConstants CONSOLE_FONT getTextWidget setFont JFaceResources getFont IConsoleConstants CONSOLE_FONT propertyName IDebugPreferenceConstants CONSOLE_TAB_WIDTH getTextWidget setTabs DebugUIPlugin getDefault getPluginPreferences getInt IDebugPreferenceConstants CONSOLE_TAB_WIDTH propertyName IInternalDebugUIConstants PREF_CONSOLE_SCROLL_LOCK setAutoScroll DebugUIPlugin getDefault getPluginPreferences getBoolean IInternalDebugUIConstants PREF_CONSOLE_SCROLL_LOCK
Dispose this viewer and resources public void dispose Control control get Text Widget if control null control remove Mouse Track Listener this control remove Paint Listener this if f Hand Cursor null f Hand Cursor dispose if f Text Cursor null f Text Cursor dispose DebugUI Plugin get Default get Preference Store remove Property Change Listener this J Face Resources get Font Registry remove Listener this  getTextWidget removeMouseTrackListener removePaintListener fHandCursor fHandCursor fTextCursor fTextCursor DebugUIPlugin getDefault getPreferenceStore removePropertyChangeListener JFaceResources getFontRegistry removeListener
Only allow text to be typed at the end of the document see org eclipse swt events Verify Listener verify Text org eclipse swt events Verify Event protected void handle Verify Event Verify Event e Console Document doc Console Document get Document if doc null if doc is Read Only e doit false return I Document Partitioner partitioner doc get Document Partitioner if partitioner null int length doc get Length I Typed Region partitions partitioner compute Partitioning length 0 if partitions length 0 else I Typed Region partition partitions partitions length 1 if partition get Type equals Input Partition INPUT PARTITION TYPE 1 char in the input buffer e doit e start partition get Offset e end partition get Length partition get Offset else first character in the input buffer e doit length e start  VerifyListener verifyText VerifyEvent handleVerifyEvent VerifyEvent ConsoleDocument ConsoleDocument getDocument isReadOnly IDocumentPartitioner getDocumentPartitioner getLength ITypedRegion computePartitioning ITypedRegion getType InputPartition INPUT_PARTITION_TYPE getOffset getLength getOffset
see org eclipse swt events Mouse Track Listener mouse Enter org eclipse swt events Mouse Event public void mouse Enter Mouse Event e get Text Widget add Mouse Move Listener this  MouseTrackListener mouseEnter MouseEvent mouseEnter MouseEvent getTextWidget addMouseMoveListener
see org eclipse swt events Mouse Track Listener mouse Exit org eclipse swt events Mouse Event public void mouse Exit Mouse Event e get Text Widget remove Mouse Move Listener this if f Hyper Link null link Exited f Hyper Link  MouseTrackListener mouseExit MouseEvent mouseExit MouseEvent getTextWidget removeMouseMoveListener fHyperLink linkExited fHyperLink
see org eclipse swt events Mouse Track Listener mouse Hover org eclipse swt events Mouse Event public void mouse Hover Mouse Event e  MouseTrackListener mouseHover MouseEvent mouseHover MouseEvent
see org eclipse swt events Mouse Move Listener mouse Move org eclipse swt events Mouse Event public void mouse Move Mouse Event e int offset 1 try Point p new Point e x e y offset get Text Widget get Offset At Location p catch Illegal Argument Exception ex out of the document range update Links offset  MouseMoveListener mouseMove MouseEvent mouseMove MouseEvent getTextWidget getOffsetAtLocation IllegalArgumentException updateLinks
public I Console Hyperlink get Hyperlink int offset if offset 0 get Document null Position positions null try positions get Document get Positions Hyperlink Position HYPER LINK CATEGORY catch Bad Position Category Exception ex no links have been added return null for int i 0 i positions length i Position position positions i if offset position get Offset offset position get Offset position get Length return Hyperlink Position position get Hyper Link return null  IConsoleHyperlink getHyperlink getDocument getDocument getPositions HyperlinkPosition HYPER_LINK_CATEGORY BadPositionCategoryException getOffset getOffset getLength HyperlinkPosition getHyperLink
protected void link Entered I Console Hyperlink link Control control get Text Widget control set Redraw false if f Hyper Link null link Exited f Hyper Link f Hyper Link link f Hyper Link link Entered control set Cursor get Hand Cursor control set Redraw true control redraw control add Mouse Listener this  linkEntered IConsoleHyperlink getTextWidget setRedraw fHyperLink linkExited fHyperLink fHyperLink fHyperLink linkEntered setCursor getHandCursor setRedraw addMouseListener
protected void link Exited I Console Hyperlink link link link Exited f Hyper Link null Control control get Text Widget control set Cursor get Text Cursor control redraw control remove Mouse Listener this  linkExited IConsoleHyperlink linkExited fHyperLink getTextWidget setCursor getTextCursor removeMouseListener
see org eclipse swt events Paint Listener paint Control org eclipse swt events Paint Event public void paint Control Paint Event e if f Hyper Link null I Document doc get Document if doc null return Console Document Partitioner partitioner Console Document Partitioner doc get Document Partitioner if partitioner null return I Region link Region partitioner get Region f Hyper Link if link Region null int start link Region get Offset int end start link Region get Length I Console Color Provider color Provider partitioner get Color Provider try I Typed Region partition doc get Partition start Color font Color e gc get Foreground if partition instanceof Stream Partition Stream Partition stream Partition Stream Partition partition font Color color Provider get Color stream Partition get Stream Identifier int start Line doc get Line Of Offset start int end Line doc get Line Of Offset end for int i start Line i end Line i I Region line Region doc get Line Information i int line Start line Region get Offset int line End line Start line Region get Length Color color e gc get Foreground e gc set Foreground font Color if line Start end line Start Math max start line Start line End Math min end line End Point p1 get Text Widget get Location At Offset line Start Point p2 get Text Widget get Location At Offset line End Font Metrics metrics e gc get Font Metrics int height metrics get Height e gc draw Line p1 x p1 y height p2 x p2 y height e gc set Foreground color catch Bad Location Exception ex  PaintListener paintControl PaintEvent paintControl PaintEvent fHyperLink IDocument getDocument ConsoleDocumentPartitioner ConsoleDocumentPartitioner getDocumentPartitioner IRegion linkRegion getRegion fHyperLink linkRegion linkRegion getOffset linkRegion getLength IConsoleColorProvider colorProvider getColorProvider ITypedRegion getPartition fontColor getForeground StreamPartition StreamPartition streamPartition StreamPartition fontColor colorProvider getColor streamPartition getStreamIdentifier startLine getLineOfOffset endLine getLineOfOffset startLine endLine IRegion lineRegion getLineInformation lineStart lineRegion getOffset lineEnd lineStart lineRegion getLength getForeground setForeground fontColor lineStart lineStart lineStart lineEnd lineEnd getTextWidget getLocationAtOffset lineStart getTextWidget getLocationAtOffset lineEnd FontMetrics getFontMetrics getHeight drawLine setForeground BadLocationException
protected Cursor get Hand Cursor if f Hand Cursor null f Hand Cursor new Cursor DebugUI Plugin get Standard Display SWT CURSOR HAND return f Hand Cursor  getHandCursor fHandCursor fHandCursor DebugUIPlugin getStandardDisplay CURSOR_HAND fHandCursor
protected Cursor get Text Cursor if f Text Cursor null f Text Cursor new Cursor DebugUI Plugin get Standard Display SWT CURSOR IBEAM return f Text Cursor  getTextCursor fTextCursor fTextCursor DebugUIPlugin getStandardDisplay CURSOR_IBEAM fTextCursor
see org eclipse swt events Mouse Listener mouse Double Click org eclipse swt events Mouse Event public void mouse Double Click Mouse Event e  MouseListener mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent
see org eclipse swt events Mouse Listener mouse Down org eclipse swt events Mouse Event public void mouse Down Mouse Event e  MouseListener mouseDown MouseEvent mouseDown MouseEvent
see org eclipse swt events Mouse Listener mouse Up org eclipse swt events Mouse Event public void mouse Up Mouse Event e if f Hyper Link null String selection get Text Widget get Selection Text if selection length 0 if e button 1 f Hyper Link link Activated  MouseListener mouseUp MouseEvent mouseUp MouseEvent fHyperLink getTextWidget getSelectionText fHyperLink linkActivated
see org eclipse swt custom Line Style Listener line Get Style org eclipse swt custom Line Style Event public void line Get Style Line Style Event event I Document document get Document if document null Console Document Partitioner partitioner Console Document Partitioner document get Document Partitioner if partitioner null I Console Color Provider color Provider partitioner get Color Provider I Typed Region regions partitioner compute Partitioning event line Offset event line Offset event line Text length Style Range styles new Style Range regions length for int i 0 i regions length i Stream Partition partition Stream Partition regions i Color color color Provider get Color partition get Stream Identifier styles i new Style Range partition get Offset partition get Length color null event styles styles  LineStyleListener lineGetStyle LineStyleEvent lineGetStyle LineStyleEvent IDocument getDocument ConsoleDocumentPartitioner ConsoleDocumentPartitioner getDocumentPartitioner IConsoleColorProvider colorProvider getColorProvider ITypedRegion computePartitioning lineOffset lineOffset lineText StyleRange StyleRange StreamPartition StreamPartition colorProvider getColor getStreamIdentifier StyleRange getOffset getLength
Sets whether this viewer should auto scroll as output is appended to the document param scroll public void set Auto Scroll boolean scroll f Auto Scroll scroll  setAutoScroll fAutoScroll
Returns whether this viewer should auto scroll as output is appended to the document public boolean is Auto Scroll return f Auto Scroll  isAutoScroll fAutoScroll
On Key Up events see if we need to enter exit a link see org eclipse swt widgets Listener handle Event org eclipse swt widgets Event public void handle Event Event event int offset get Text Widget get Caret Offset update Links offset  KeyUp handleEvent handleEvent getTextWidget getCaretOffset updateLinks
The cursor has just be moved to the given offset the mouse has hovered over the given offset Update link rendering param offset protected void update Links int offset if offset 0 I Console Hyperlink link get Hyperlink offset if link null if link equals f Hyper Link return else link Entered link return if f Hyper Link null link Exited f Hyper Link  updateLinks IConsoleHyperlink getHyperlink fHyperLink linkEntered fHyperLink linkExited fHyperLink

public Hyperlink Position I Console Hyperlink link int offset int length super offset length f Link link  HyperlinkPosition IConsoleHyperlink fLink
public I Console Hyperlink get Hyper Link return f Link  IConsoleHyperlink getHyperLink fLink
see java lang Object equals java lang Object public boolean equals Object arg return arg instanceof Hyperlink Position super equals arg get Hyper Link equals Hyperlink Position arg get Hyper Link  HyperlinkPosition getHyperLink HyperlinkPosition getHyperLink
see java lang Object hash Code public int hash Code return super hash Code get Hyper Link hash Code  hashCode hashCode hashCode getHyperLink hashCode

public Input Partition String stream Identifier int offset int length super stream Identifier offset length INPUT PARTITION TYPE  InputPartition streamIdentifier streamIdentifier INPUT_PARTITION_TYPE
see org eclipse debug internal ui views console Stream Partition create New Partition String int int public Stream Partition create New Partition String stream Identifier int offset int length return new Input Partition stream Identifier offset length  StreamPartition createNewPartition StreamPartition createNewPartition streamIdentifier InputPartition streamIdentifier
Sets whether this partition is read only param read Only whether this partition is read only public void set Read Only boolean read Only f Read Only read Only  readOnly setReadOnly readOnly fReadOnly readOnly
Returns whether this partition is read only return whether this partition is read only public boolean is Read Only return f Read Only  isReadOnly fReadOnly
Returns whether this partition is allowed to be combined with the given partition Once read only this partition cannot be combined param partition return boolean public boolean can Be Combined With Stream Partition partition return is Read Only super can Be Combined With partition  canBeCombinedWith StreamPartition isReadOnly canBeCombinedWith

public Output Partition String stream Identifier int offset int length super stream Identifier offset length OUTPUT PARTITION TYPE  OutputPartition streamIdentifier streamIdentifier OUTPUT_PARTITION_TYPE
see org eclipse debug internal ui views console Stream Partition create New Partition String int int public Stream Partition create New Partition String stream Idetifier int offset int length return new Output Partition stream Idetifier offset length  StreamPartition createNewPartition StreamPartition createNewPartition streamIdetifier OutputPartition streamIdetifier

see org eclipse ui console I Console create Page org eclipse ui console I Console View public I Page Book View Page create Page I Console View view return new Process Console Page view this  IConsole createPage IConsoleView IPageBookViewPage createPage IConsoleView ProcessConsolePage
Computes and returns the image descriptor for this console return an image descriptor for this console or code null code protected Image Descriptor compute Image Descriptor I Launch Configuration configuration get Process get Launch get Launch Configuration if configuration null I Launch Configuration Type type try type configuration get Type return Debug Plugin Images get Image Descriptor type get Identifier catch Core Exception e DebugUI Plugin log e return null  ImageDescriptor computeImageDescriptor ILaunchConfiguration getProcess getLaunch getLaunchConfiguration ILaunchConfigurationType getType DebugPluginImages getImageDescriptor getIdentifier CoreException DebugUIPlugin
Computes and returns the current name of this console return a name for this console protected String compute Name String label null I Process process get Process I Launch Configuration config process get Launch get Launch Configuration label process get Attribute I Process ATTR PROCESS LABEL if label null if config null label process get Label else check if PRIVATE config if DebugUI Tools is Private config label process get Label else String type null try type config get Type get Name catch Core Exception e String Buffer buffer new String Buffer buffer append config get Name if type null buffer append NON NLS 1 buffer append type buffer append NON NLS 1 buffer append process get Label label buffer to String if process is Terminated return Message Format format Console Messages get String Process Console 0 new String label NON NLS 1 else return label  computeName IProcess getProcess ILaunchConfiguration getLaunch getLaunchConfiguration getAttribute IProcess ATTR_PROCESS_LABEL getLabel DebugUITools isPrivate getLabel getType getName CoreException StringBuffer StringBuffer getName getLabel toString isTerminated MessageFormat ConsoleMessages getString ProcessConsole
Proxy to a console document public Process Console I Process process super null NON NLS 1 f Process process set Name compute Name set Image Descriptor compute Image Descriptor  ProcessConsole IProcess fProcess setName computeName setImageDescriptor computeImageDescriptor
Returns the process associated with this console return the process associated with this console public I Process get Process return f Process  IProcess getProcess fProcess
see org eclipse ui console Abstract Console dispose protected void dispose super dispose Debug Plugin get Default remove Debug Event Listener this  AbstractConsole DebugPlugin getDefault removeDebugEventListener
see org eclipse ui console Abstract Console init protected void init super init Debug Plugin get Default add Debug Event Listener this  AbstractConsole DebugPlugin getDefault addDebugEventListener
if event get Source equals get Process Runnable r new Runnable public void run set Name compute Name warn Of Content Change  getSource getProcess setName computeName warnOfContentChange
Notify listeners when name changes see org eclipse debug core I Debug Event Set Listener handle Debug Events org eclipse debug core Debug Event public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i if event get Source equals get Process Runnable r new Runnable public void run set Name compute Name warn Of Content Change DebugUI Plugin get Standard Display async Exec r  IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent DebugEvent getSource getProcess setName computeName warnOfContentChange DebugUIPlugin getStandardDisplay asyncExec
private void warn Of Content Change Console Plugin get Default get Console Manager warn Of Content Change DebugUI Tools get Console f Process  warnOfContentChange ConsolePlugin getDefault getConsoleManager warnOfContentChange DebugUITools getConsole fProcess

text selection listener private I Selection Changed Listener f Text Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Selection Dependent Actions  ISelectionChangedListener fTextListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateSelectionDependentActions
Constructs a new process page public Process Console Page I Console View view Process Console console f View view f Console console  ProcessConsolePage IConsoleView ProcessConsole fView fConsole
see org eclipse ui part I Page Book View Page get Site public I Page Site get Site return f Site  IPageBookViewPage getSite IPageSite getSite fSite
see org eclipse ui part I Page Book View Page init org eclipse ui part I Page Site public void init I Page Site site f Site site  IPageBookViewPage IPageSite IPageSite fSite
manager set Remove All When Shown true manager add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager m context Menu About To Show m  setRemoveAllWhenShown addMenuListener IMenuListener menuAboutToShow IMenuManager contextMenuAboutToShow
public void create Control Composite parent f Viewer new Console Viewer parent f Viewer set Document DebugUI Plugin get Default get Console Document Manager get Console Document get Process Menu Manager manager new Menu Manager Process Console Process Console NON NLS 1 NON NLS 2 manager set Remove All When Shown true manager add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager m context Menu About To Show m f Menu manager create Context Menu get Control get Control set Menu f Menu I Page Site site get Site site register Context Menu DebugUI Plugin get Unique Identifier process Console manager get Console Viewer NON NLS 1 site set Selection Provider get Console Viewer create Actions configure Tool Bar get Site get Action Bars get Tool Bar Manager get Site get Page add Selection Listener I DebugUI Constants ID DEBUG VIEW this f Viewer get Selection Provider add Selection Changed Listener f Text Listener f Viewer add Text Listener this  createControl fViewer ConsoleViewer fViewer setDocument DebugUIPlugin getDefault getConsoleDocumentManager getConsoleDocument getProcess MenuManager MenuManager ProcessConsole ProcessConsole setRemoveAllWhenShown addMenuListener IMenuListener menuAboutToShow IMenuManager contextMenuAboutToShow fMenu createContextMenu getControl getControl setMenu fMenu IPageSite getSite registerContextMenu DebugUIPlugin getUniqueIdentifier processConsole getConsoleViewer setSelectionProvider getConsoleViewer createActions configureToolBar getSite getActionBars getToolBarManager getSite getPage addSelectionListener IDebugUIConstants ID_DEBUG_VIEW fViewer getSelectionProvider addSelectionChangedListener fTextListener fViewer addTextListener
Fill the context menu param menu menu protected void context Menu About To Show I Menu Manager menu Console Document doc Console Document get Console Viewer get Document if doc null return if doc is Read Only menu add I Action f Global Actions get Action Factory COPY get Id menu add I Action f Global Actions get Action Factory SELECT ALL get Id else update Action Action Factory PASTE get Id menu add I Action f Global Actions get Action Factory CUT get Id menu add I Action f Global Actions get Action Factory COPY get Id menu add I Action f Global Actions get Action Factory PASTE get Id menu add I Action f Global Actions get Action Factory SELECT ALL get Id menu add new Separator FIND NON NLS 1 menu add I Action f Global Actions get Action Factory FIND get Id menu add I Action f Global Actions get I Text Editor Action Constants GOTO LINE f Follow Link Action set Enabled f Follow Link Action get Hyper Link null menu add f Follow Link Action menu add f Clear Output Action menu add new Separator I Workbench Action Constants MB ADDITIONS menu add f Terminate  contextMenuAboutToShow IMenuManager ConsoleDocument ConsoleDocument getConsoleViewer getDocument isReadOnly IAction fGlobalActions ActionFactory getId IAction fGlobalActions ActionFactory SELECT_ALL getId updateAction ActionFactory getId IAction fGlobalActions ActionFactory getId IAction fGlobalActions ActionFactory getId IAction fGlobalActions ActionFactory getId IAction fGlobalActions ActionFactory SELECT_ALL getId IAction fGlobalActions ActionFactory getId IAction fGlobalActions ITextEditorActionConstants GOTO_LINE fFollowLinkAction setEnabled fFollowLinkAction getHyperLink fFollowLinkAction fClearOutputAction IWorkbenchActionConstants MB_ADDITIONS fTerminate
public void dispose Debug Plugin get Default remove Debug Event Listener this get Site get Page remove Selection Listener I DebugUI Constants ID DEBUG VIEW this f Viewer get Selection Provider remove Selection Changed Listener f Text Listener f Viewer remove Text Listener this if f Key Binding Follow Link Action null get Console View get Site get Key Binding Service unregister Action f Key Binding Follow Link Action if f Remove Terminated null f Remove Terminated dispose if f Scroll Lock Action null f Scroll Lock Action dispose if f Menu null f Menu is Disposed f Menu dispose f Menu null if f Viewer null f Viewer dispose f Viewer null f Site null f Selection Actions clear  DebugPlugin getDefault removeDebugEventListener getSite getPage removeSelectionListener IDebugUIConstants ID_DEBUG_VIEW fViewer getSelectionProvider removeSelectionChangedListener fTextListener fViewer removeTextListener fKeyBindingFollowLinkAction getConsoleView getSite getKeyBindingService unregisterAction fKeyBindingFollowLinkAction fRemoveTerminated fRemoveTerminated fScrollLockAction fScrollLockAction fMenu fMenu isDisposed fMenu fMenu fViewer fViewer fViewer fSite fSelectionActions
public Control get Control if f Viewer null return f Viewer get Control return null  getControl fViewer fViewer getControl
see org eclipse ui part I Page set Action Bars org eclipse ui I Action Bars public void set Action Bars I Action Bars action Bars  IPage setActionBars IActionBars setActionBars IActionBars actionBars
public void set Focus Control control get Control if control null control set Focus update Selection Dependent Actions  setFocus getControl setFocus updateSelectionDependentActions
protected void create Actions f Clear Output Action new Clear Output Action get Console Viewer f Remove Terminated new Console Remove All Terminated Action In order for the clipboard actions to accessible via their shortcuts e g Ctrl C Ctrl V we must set a global action handler for each action I Action Bars action Bars get Site get Action Bars Text Viewer Action action new Text Viewer Action get Console Viewer I Text Operation Target CUT action configure Action DebugUI Views Messages get String Console View Cu t Ctrl X 3 DebugUI Views Messages get String Console View Cut 4 DebugUI Views Messages get String Console View Cut 4 NON NLS 3 NON NLS 2 NON NLS 1 action set Image Descriptor PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG TOOL CUT set Global Action action Bars Action Factory CUT get Id action action new Text Viewer Action get Console Viewer I Text Operation Target COPY action configure Action DebugUI Views Messages get String Console View Copy Ctrl C 6 DebugUI Views Messages get String Console View Copy 7 DebugUI Views Messages get String Console View Copy 7 NON NLS 3 NON NLS 2 NON NLS 1 action set Image Descriptor PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG TOOL COPY set Global Action action Bars Action Factory COPY get Id action action new Text Viewer Action get Console Viewer I Text Operation Target PASTE action configure Action DebugUI Views Messages get String Console View Paste Ctrl V 9 DebugUI Views Messages get String Console View Paste 10 DebugUI Views Messages get String Console View Paste Clipboard Text 11 NON NLS 3 NON NLS 2 NON NLS 1 action set Image Descriptor PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG TOOL PASTE set Global Action action Bars Action Factory PASTE get Id action action new Text Viewer Action get Console Viewer I Text Operation Target SELECT ALL action configure Action DebugUI Views Messages get String Console View Select  All Ctrl A 12 DebugUI Views Messages get String Console View Select All DebugUI Views Messages get String Console View Select All NON NLS 3 NON NLS 2 NON NLS 1 set Global Action action Bars Action Factory SELECT ALL get Id action XXX Still using old resource access Resource Bundle bundle Resource Bundle get Bundle org eclipse debug internal ui views DebugUI Views Messages NON NLS 1 set Global Action action Bars Action Factory FIND get Id new Find Replace Action bundle find replace action get Console View NON NLS 1 action new Text Viewer Goto Line Action get Console Viewer set Global Action action Bars I Text Editor Action Constants GOTO LINE action f Follow Link Action new Follow Hyperlink Action get Console Viewer f Key Binding Follow Link Action new Key Binding Follow Hyperlink Action get Console Viewer action Bars f Key Binding Follow Link Action set Action Definition Id org eclipse jdt ui edit text java open editor NON NLS 1 get Console View get Site get Key Binding Service register Action f Key Binding Follow Link Action f Scroll Lock Action new Scroll Lock Action f Scroll Lock Action set Checked f Is Locked get Console Viewer set Auto Scroll f Is Locked action Bars update Action Bars f Terminate new Console Terminate Action get Console Debug Plugin get Default add Debug Event Listener this f Selection Actions add Action Factory CUT get Id f Selection Actions add Action Factory COPY get Id f Selection Actions add Action Factory PASTE get Id f Selection Actions add Action Factory FIND get Id  createActions fClearOutputAction ClearOutputAction getConsoleViewer fRemoveTerminated ConsoleRemoveAllTerminatedAction IActionBars actionBars getSite getActionBars TextViewerAction TextViewerAction getConsoleViewer ITextOperationTarget configureAction DebugUIViewsMessages getString ConsoleView X_3 DebugUIViewsMessages getString ConsoleView Cut_4 DebugUIViewsMessages getString ConsoleView Cut_4 setImageDescriptor getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_TOOL_CUT setGlobalAction actionBars ActionFactory getId TextViewerAction getConsoleViewer ITextOperationTarget configureAction DebugUIViewsMessages getString ConsoleView C_6 DebugUIViewsMessages getString ConsoleView Copy_7 DebugUIViewsMessages getString ConsoleView Copy_7 setImageDescriptor getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_TOOL_COPY setGlobalAction actionBars ActionFactory getId TextViewerAction getConsoleViewer ITextOperationTarget configureAction DebugUIViewsMessages getString ConsoleView V_9 DebugUIViewsMessages getString ConsoleView Paste_10 DebugUIViewsMessages getString ConsoleView Paste_Clipboard_Text_11 setImageDescriptor getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_TOOL_PASTE setGlobalAction actionBars ActionFactory getId TextViewerAction getConsoleViewer ITextOperationTarget SELECT_ALL configureAction DebugUIViewsMessages getString ConsoleView Select_ A_12 DebugUIViewsMessages getString ConsoleView Select_All DebugUIViewsMessages getString ConsoleView Select_All setGlobalAction actionBars ActionFactory SELECT_ALL getId ResourceBundle ResourceBundle getBundle DebugUIViewsMessages setGlobalAction actionBars ActionFactory getId FindReplaceAction find_replace_action getConsoleView TextViewerGotoLineAction getConsoleViewer setGlobalAction actionBars ITextEditorActionConstants GOTO_LINE fFollowLinkAction FollowHyperlinkAction getConsoleViewer fKeyBindingFollowLinkAction KeyBindingFollowHyperlinkAction getConsoleViewer actionBars fKeyBindingFollowLinkAction setActionDefinitionId getConsoleView getSite getKeyBindingService registerAction fKeyBindingFollowLinkAction fScrollLockAction ScrollLockAction fScrollLockAction setChecked fIsLocked getConsoleViewer setAutoScroll fIsLocked actionBars updateActionBars fTerminate ConsoleTerminateAction getConsole DebugPlugin getDefault addDebugEventListener fSelectionActions ActionFactory getId fSelectionActions ActionFactory getId fSelectionActions ActionFactory getId fSelectionActions ActionFactory getId
protected void update Selection Dependent Actions Iterator iterator f Selection Actions iterator while iterator has Next update Action String iterator next  updateSelectionDependentActions fSelectionActions hasNext updateAction
protected void update Action String action Id I Action action I Action f Global Actions get action Id if action instanceof I Update I Update action update  updateAction actionId IAction IAction fGlobalActions actionId IUpdate IUpdate
protected void set Global Action I Action Bars action Bars String actionID I Action action f Global Actions put actionID action action Bars set Global Action Handler actionID action  setGlobalAction IActionBars actionBars IAction fGlobalActions actionBars setGlobalActionHandler
Returns the console viewer in this page return the console viewer in this page public Console Viewer get Console Viewer return f Viewer  ConsoleViewer getConsoleViewer fViewer
protected void configure Tool Bar I Tool Bar Manager mgr mgr append To Group I Console Constants LAUNCH GROUP f Terminate mgr append To Group I Console Constants LAUNCH GROUP f Remove Terminated mgr add f Process Drop Down Action mgr append To Group I Console Constants OUTPUT GROUP f Scroll Lock Action mgr append To Group I Console Constants OUTPUT GROUP f Clear Output Action  configureToolBar IToolBarManager appendToGroup IConsoleConstants LAUNCH_GROUP fTerminate appendToGroup IConsoleConstants LAUNCH_GROUP fRemoveTerminated fProcessDropDownAction appendToGroup IConsoleConstants OUTPUT_GROUP fScrollLockAction appendToGroup IConsoleConstants OUTPUT_GROUP fClearOutputAction
Returns the process associated with this page return the process associated with this page protected I Process get Process return get Console get Process  IProcess getProcess getConsole getProcess
Returns the view this page is contained in return the view this page is contained in protected I Console View get Console View return f View  IConsoleView getConsoleView fView
Returns the console this page is displaying return the console this page is displaying protected Process Console get Console return f Console  ProcessConsole getConsole fConsole
public void selection Changed I Workbench Part part I Selection selection if get Process equals DebugUI Tools get Current Process get Console View display get Console  selectionChanged IWorkbenchPart ISelection getProcess DebugUITools getCurrentProcess getConsoleView getConsole
public Object get Adapter Class required if I Find Replace Target class equals required return get Console Viewer get Find Replace Target if Widget class equals required return get Console Viewer get Text Widget if I Show In Source class equals required return this if I Show In Target List class equals required return this return null  getAdapter IFindReplaceTarget getConsoleViewer getFindReplaceTarget getConsoleViewer getTextWidget IShowInSource IShowInTargetList
public Show In Context get Show In Context I Process process get Process if process null return null else I Debug Target target I Debug Target process get Adapter I Debug Target class I Selection selection null if target null selection new Structured Selection process else selection new Structured Selection target return new Show In Context null selection  ShowInContext getShowInContext IProcess getProcess IDebugTarget IDebugTarget getAdapter IDebugTarget ISelection StructuredSelection StructuredSelection ShowInContext
see org eclipse ui part I Show In Target List get Show In Target Ids public String get Show In Target Ids return new String I DebugUI Constants ID DEBUG VIEW  IShowInTargetList getShowInTargetIds getShowInTargetIds IDebugUIConstants ID_DEBUG_VIEW
Runnable r new Runnable public void run if is Available f Terminate update  isAvailable fTerminate
Update terminate action see org eclipse debug core I Debug Event Set Listener handle Debug Events org eclipse debug core Debug Event public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i if event get Source equals get Process Runnable r new Runnable public void run if is Available f Terminate update if is Available get Control get Display async Exec r  IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent DebugEvent getSource getProcess isAvailable fTerminate isAvailable getControl getDisplay asyncExec
Returns whether this page s controls are available return whether this page s controls are available protected boolean is Available return get Control null  isAvailable getControl
public void text Changed Text Event event update the find replace action if the document length is 0 I Update find Replace I Update f Global Actions get Action Factory FIND get Id if find Replace null find Replace update  textChanged TextEvent IUpdate findReplace IUpdate fGlobalActions ActionFactory getId findReplace findReplace

public Scroll Lock Action super Action Messages get String Scroll Lock Action Scroll Lock 1 NON NLS 1 set Tool Tip Text Action Messages get String Scroll Lock Action Scroll Lock 1 NON NLS 1 set Hover Image Descriptor Debug Plugin Images get Image Descriptor I DebugUI Constants IMG LCL LOCK set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL LOCK set Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG ELCL LOCK Workbench Help set Help this I Debug Help Context Ids CONSOLE SCROLL LOCK ACTION set Checked DebugUI Plugin get Default get Preference Store get Boolean I Internal DebugUI Constants PREF CONSOLE SCROLL LOCK f Store add Property Change Listener this  ScrollLockAction ActionMessages getString ScrollLockAction Scroll_Lock_1 setToolTipText ActionMessages getString ScrollLockAction Scroll_Lock_1 setHoverImageDescriptor DebugPluginImages getImageDescriptor IDebugUIConstants IMG_LCL_LOCK setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_LOCK setImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_ELCL_LOCK WorkbenchHelp setHelp IDebugHelpContextIds CONSOLE_SCROLL_LOCK_ACTION setChecked DebugUIPlugin getDefault getPreferenceStore getBoolean IInternalDebugUIConstants PREF_CONSOLE_SCROLL_LOCK fStore addPropertyChangeListener
see org eclipse jface action I Action run public void run f Store set Value I Internal DebugUI Constants PREF CONSOLE SCROLL LOCK is Checked  IAction fStore setValue IInternalDebugUIConstants PREF_CONSOLE_SCROLL_LOCK isChecked
public void dispose f Store remove Property Change Listener this  fStore removePropertyChangeListener
public void property Change Property Change Event event if event get Property equals I Internal DebugUI Constants PREF CONSOLE SCROLL LOCK set Checked f Store get Boolean I Internal DebugUI Constants PREF CONSOLE SCROLL LOCK  propertyChange PropertyChangeEvent getProperty IInternalDebugUIConstants PREF_CONSOLE_SCROLL_LOCK setChecked fStore getBoolean IInternalDebugUIConstants PREF_CONSOLE_SCROLL_LOCK

private String f Stream Identifier public Stream Partition String stream Identifier int offset int length String type super offset length type f Stream Identifier stream Identifier  fStreamIdentifier StreamPartition streamIdentifier fStreamIdentifier streamIdentifier
see java lang Object equals java lang Object public boolean equals Object partition if super equals partition f Stream Identifier equals Stream Partition partition get Stream Identifier return false  fStreamIdentifier StreamPartition getStreamIdentifier
see java lang Object hash Code public int hash Code return super hash Code f Stream Identifier hash Code  hashCode hashCode hashCode fStreamIdentifier hashCode
Returns this partition s stream identifier return this partition s stream identifier public String get Stream Identifier return f Stream Identifier  getStreamIdentifier fStreamIdentifier
Returns whether this partition is allowed to be combined with the given partition param partition return boolean public boolean can Be Combined With Stream Partition partition int start get Offset int end start get Length int other Start partition get Offset int other End other Start partition get Length boolean overlap other Start start other Start end start other Start start other End return overlap get Type equals partition get Type get Stream Identifier equals partition get Stream Identifier  canBeCombinedWith StreamPartition getOffset getLength otherStart getOffset otherEnd otherStart getLength otherStart otherStart otherStart otherEnd getType getType getStreamIdentifier getStreamIdentifier
Returns a new partition representing this and the given parition combined param partition return partition public Stream Partition combine With Stream Partition partition int start get Offset int end start get Length int other Start partition get Offset int other End other Start partition get Length int the Start Math min start other Start int the End Math max end other End return create New Partition get Stream Identifier the Start the End the Start  StreamPartition combineWith StreamPartition getOffset getLength otherStart getOffset otherEnd otherStart getLength theStart otherStart theEnd otherEnd createNewPartition getStreamIdentifier theStart theEnd theStart
Creates a new patition of this type with the given color offset and length param stream Identifer param offset param length return Color Partition  streamIdentifer ColorPartition

private I Progress Monitor f Progress Monitor public Workspace Operation Runner  IProgressMonitor fProgressMonitor WorkspaceOperationRunner
Sets the progress monitor param progress Monitor the progress monitor to set public void set Progress Monitor I Progress Monitor progress Monitor f Progress Monitor progress Monitor  progressMonitor setProgressMonitor IProgressMonitor progressMonitor fProgressMonitor progressMonitor
Returns the progress monitor It there is no progress monitor the monitor is set to the code Null Progress Monitor code return the progress monitor public I Progress Monitor get Progress Monitor if f Progress Monitor null f Progress Monitor new Null Progress Monitor return f Progress Monitor  NullProgressMonitor IProgressMonitor getProgressMonitor fProgressMonitor fProgressMonitor NullProgressMonitor fProgressMonitor
public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception if runnable instanceof I Scheduling Rule Provider run fork cancelable runnable I Scheduling Rule Provider runnable get Scheduling Rule else run fork cancelable runnable Resources Plugin get Workspace get Root  IRunnableWithProgress InvocationTargetException InterruptedException ISchedulingRuleProvider ISchedulingRuleProvider getSchedulingRule ResourcesPlugin getWorkspace getRoot
see org eclipse jface operation I Runnable Context run boolean boolean org eclipse jface operation I Runnable With Progress public void run boolean fork boolean cancelable I Runnable With Progress runnable I Scheduling Rule scheduling Rule throws Invocation Target Exception Interrupted Exception Workspace Modify Delegating Operation operation new Workspace Modify Delegating Operation runnable scheduling Rule operation run get Progress Monitor  IRunnableContext IRunnableWithProgress IRunnableWithProgress ISchedulingRule schedulingRule InvocationTargetException InterruptedException WorkspaceModifyDelegatingOperation WorkspaceModifyDelegatingOperation schedulingRule getProgressMonitor

Resource Bundle get Bundle BUNDLE NAME private DebugUI Views Messages  ResourceBundle getBundle BUNDLE_NAME DebugUIViewsMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

see Decorating Label Provider Decorating Label Provider org eclipse jface viewers I Label Provider org eclipse jface viewers I Label Decorator public Debug View Decorating Label Provider Structured Viewer viewer I Label Provider provider Debug View Label Decorator decorator super provider decorator decorator set Label Provider this this viewer viewer  DecoratingLabelProvider DecoratingLabelProvider ILabelProvider ILabelDecorator DebugViewDecoratingLabelProvider StructuredViewer ILabelProvider DebugViewLabelDecorator setLabelProvider
Notifies this label provider that the given text was computed for the given element The given text will be returned the next time its text is requested param element the element whose label was computed param text the label public void text Computed Object element String text computed Text put element text  textComputed computedText
Labels have been computed for the given block of elements This method tells the label provider to update the given elements in the view param elements the elements which have had their text computed public void labels Computed Object elements if disposed viewer update elements null for int i 0 i elements length i computed Text remove elements i  labelsComputed computedText
Returns the stored text computed by the background decorator or delegates to the decorating label provider to compute text If a stored value exists for the given element it is cleared and then returned such that the next call to this method will have to delegate see Decorating Label Provider get Text java lang Object public String get Text Object element String text String computed Text remove element if text null return text return super get Text element  DecoratingLabelProvider getText getText computedText getText
see org eclipse jface viewers I Base Label Provider dispose public void dispose disposed true super dispose  IBaseLabelProvider

Creates a new interim label provider with the given model presentation param presentation the model presentation to use for computing images public Debug View Interim Label Provider I Debug Model Presentation presentation this presentation presentation  DebugViewInterimLabelProvider IDebugModelPresentation
Returns the debug model presentation used by this label provider to compute images return this label provider s model presentation public I Debug Model Presentation get Presentation return presentation  IDebugModelPresentation getPresentation
see org eclipse jface viewers I Label Provider get Image java lang Object public Image get Image Object element return presentation get Image element  ILabelProvider getImage getImage getImage
see org eclipse jface viewers I Label Provider get Text java lang Object public String get Text Object element return Debug View Interim Label Provider PENDING LABEL  ILabelProvider getText getText DebugViewInterimLabelProvider PENDING_LABEL
see org eclipse jface viewers I Base Label Provider add Listener org eclipse jface viewers I Label Provider Listener public void add Listener I Label Provider Listener listener presentation add Listener listener  IBaseLabelProvider addListener ILabelProviderListener addListener ILabelProviderListener addListener
see org eclipse jface viewers I Base Label Provider dispose public void dispose presentation dispose  IBaseLabelProvider
see org eclipse jface viewers I Base Label Provider is Label Property java lang Object java lang String public boolean is Label Property Object element String property return presentation is Label Property element property  IBaseLabelProvider isLabelProperty isLabelProperty isLabelProperty
see org eclipse jface viewers I Base Label Provider remove Listener org eclipse jface viewers I Label Provider Listener public void remove Listener I Label Provider Listener listener presentation remove Listener listener  IBaseLabelProvider removeListener ILabelProviderListener removeListener ILabelProviderListener removeListener

Creates a new label decorator which will query the given model presentation for text in the background param presentation public Debug View Label Decorator I Debug Model Presentation presentation f Presentation presentation Debug Plugin get Default add Debug Event Listener this  DebugViewLabelDecorator IDebugModelPresentation fPresentation DebugPlugin getDefault addDebugEventListener
Sets the label provider which will be notified when a label has been computed in the background param label Provider the label provider to notify when text is computed public void set Label Provider Debug View Decorating Label Provider label Provider f Label Provider label Provider  labelProvider setLabelProvider DebugViewDecoratingLabelProvider labelProvider fLabelProvider labelProvider
see org eclipse jface viewers I Label Decorator decorate Image org eclipse swt graphics Image java lang Object public Image decorate Image Image image Object element return image  ILabelDecorator decorateImage decorateImage
see org eclipse jface viewers I Label Decorator decorate Text java lang String java lang Object public String decorate Text String text final Object element compute Text element return text  ILabelDecorator decorateText decorateText computeText
Queues up computation of text for the given element param element public void compute Text Object element synchronized this if f Next Job null f Next Job new Label Job DebugUI Views Messages get String Debug View Label Decorator 0 f Presentation NON NLS 1 f Next Job compute Text element  computeText fNextJob fNextJob LabelJob DebugUIViewsMessages getString DebugViewLabelDecorator fPresentation fNextJob computeText
public void labels Computed final Object computed Elements DebugUI Plugin get Standard Display async Exec new Runnable public void run f Label Provider labels Computed computed Elements  labelsComputed computedElements DebugUIPlugin getStandardDisplay asyncExec fLabelProvider labelsComputed computedElements
Labels have been computed for the given elements Fire notification asynchronously param computed Elements the elements whose labels have been computed public void labels Computed final Object computed Elements DebugUI Plugin get Standard Display async Exec new Runnable public void run f Label Provider labels Computed computed Elements  computedElements labelsComputed computedElements DebugUIPlugin getStandardDisplay asyncExec fLabelProvider labelsComputed computedElements
public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i if event get Kind Debug Event SUSPEND handle Suspend Event event else if event get Kind Debug Event TERMINATE handle Terminate Event event else if event get Kind Debug Event RESUME handle Resume Event event  handleDebugEvents DebugEvent DebugEvent getKind DebugEvent handleSuspendEvent getKind DebugEvent handleTerminateEvent getKind DebugEvent handleResumeEvent
When a thread resumes for an evaluation or step while computing labels for one of that thread s stack frames add the thread to the collection of resumed threads This allows any stack frames whose label computation was interrupted when the thread was resumed to be cleaned up later param event the resume event private void handle Resume Event Debug Event event if event get Source instanceof I Thread event is Evaluation event is Step Start I Thread thread I Thread event get Source I Stack Frame frame synchronized f Current Stack Frame Lock if f Current Stack Frame null return frame f Current Stack Frame if thread frame get Thread resumed Threads add thread  handleResumeEvent DebugEvent getSource IThread isEvaluation isStepStart IThread IThread getSource IStackFrame fCurrentStackFrameLock fCurrentStackFrame fCurrentStackFrame getThread resumedThreads
When a thread suspends after an evaluation or step recompute labels for its stack frames This ensures that any stack frames whose label computation was interrupted when the thread was resumed will be cleaned up param event the suspend event private void handle Suspend Event Debug Event event Object source event get Source synchronized resumed Threads if resumed Threads remove source return if event is Evaluation event get Detail Debug Event STEP END 0 return I Thread thread I Thread source try I Stack Frame frames thread get Stack Frames for int i 0 i frames length i compute Text frames i catch Debug Exception e  handleSuspendEvent DebugEvent getSource resumedThreads resumedThreads isEvaluation getDetail DebugEvent STEP_END IThread IThread IStackFrame getStackFrames computeText DebugException
When a terminate event is received for a debug target remove any of its threads from the resumed threads collection This not only prevents unnecessary stack frame label computations it is a backstop for cleaning up threads in the collection param event the terminate event private void handle Terminate Event Debug Event event Object source event get Source if source instanceof I Debug Target List copied Threads new Array List resumed Threads List Iterator iterator copied Threads list Iterator while iterator has Next I Thread thread I Thread iterator next if thread get Debug Target source iterator remove synchronized resumed Threads resumed Threads retain All copied Threads  handleTerminateEvent DebugEvent getSource IDebugTarget copiedThreads ArrayList resumedThreads ListIterator copiedThreads listIterator hasNext IThread IThread getDebugTarget resumedThreads resumedThreads retainAll copiedThreads
see org eclipse jface viewers I Base Label Provider dispose public void dispose super dispose Debug Plugin get Default remove Debug Event Listener this  IBaseLabelProvider DebugPlugin getDefault removeDebugEventListener
Creates a new job with the given name which will use the given presentation to compute labels in the background param name the job s name param presentation the presentation to use for label computation public Label Job String name I Debug Model Presentation presentation super name f Job Presentation presentation set Rule this set System true  LabelJob IDebugModelPresentation fJobPresentation setRule setSystem
Queues up the given element to have its text computed param element the element whose text should be computed in this background job public void compute Text Object element if f Element Queue contains element if element instanceof I Stack Frame f Element Queue add element else Add non stack frame elements debug target thread etc to the beginning of the queue so they re computed first f Element Queue add 0 element schedule  computeText fElementQueue IStackFrame fElementQueue fElementQueue
see org eclipse core runtime jobs Job run org eclipse core runtime I Progress Monitor public I Status run I Progress Monitor monitor synchronized Debug View Label Decorator this f Next Job null int num Elements f Element Queue size monitor begin Task Message Format format DebugUI Views Messages get String Debug View Label Decorator 1 new String Integer to String num Elements num Elements NON NLS 1 while f Element Queue is Empty monitor is Canceled String Buffer message new String Buffer Message Format format DebugUI Views Messages get String Debug View Label Decorator 1 new String Integer to String f Element Queue size NON NLS 1 if f Next Job null message append Message Format format DebugUI Views Messages get String Debug View Label Decorator 2 new String Integer to String f Next Job f Element Queue size NON NLS 1 monitor set Task Name message to String int block Size 10 if f Element Queue size block Size block Size f Element Queue size final List computed Elements new Array List for int i 0 i block Size i Object element f Element Queue remove 0 if element null break if element instanceof I Stack Frame synchronized f Current Stack Frame Lock f Current Stack Frame I Stack Frame element If a stack frame s thread has been resumed make sure it is added to the collection of resumed threads There s a small chance of a race condition here if the thread manages to resume after we check its suspended status and then suspend before we check the status for the next frame I Thread thread f Current Stack Frame get Thread synchronized resumed Threads if thread is Terminated thread is Suspended resumed Threads add thread no need to compute label for running stack frame continue f Label Provider text Computed element f Job Presentation get Text element synchronized f Current Stack Frame Lock f Current Stack Frame null computed Elements add element labels Computed computed Elements to Array monitor worked computed Elements size monitor done return Status OK STATUS  IProgressMonitor IStatus IProgressMonitor DebugViewLabelDecorator fNextJob numElements fElementQueue beginTask MessageFormat DebugUIViewsMessages getString DebugViewLabelDecorator toString numElements numElements fElementQueue isEmpty isCanceled StringBuffer StringBuffer MessageFormat DebugUIViewsMessages getString DebugViewLabelDecorator toString fElementQueue fNextJob MessageFormat DebugUIViewsMessages getString DebugViewLabelDecorator toString fNextJob fElementQueue setTaskName toString blockSize fElementQueue blockSize blockSize fElementQueue computedElements ArrayList blockSize fElementQueue IStackFrame fCurrentStackFrameLock fCurrentStackFrame IStackFrame IThread fCurrentStackFrame getThread resumedThreads isTerminated isSuspended resumedThreads fLabelProvider textComputed fJobPresentation getText fCurrentStackFrameLock fCurrentStackFrame computedElements labelsComputed computedElements toArray computedElements OK_STATUS
see org eclipse core runtime jobs I Scheduling Rule contains org eclipse core runtime jobs I Scheduling Rule public boolean contains I Scheduling Rule rule return rule instanceof Label Job f Job Presentation Label Job rule f Job Presentation  ISchedulingRule ISchedulingRule ISchedulingRule LabelJob fJobPresentation LabelJob fJobPresentation
see org eclipse core runtime jobs I Scheduling Rule is Conflicting org eclipse core runtime jobs I Scheduling Rule public boolean is Conflicting I Scheduling Rule rule return rule instanceof Label Job f Job Presentation Label Job rule f Job Presentation  ISchedulingRule isConflicting ISchedulingRule isConflicting ISchedulingRule LabelJob fJobPresentation LabelJob fJobPresentation

Constructs a popup to display an expression A label and handler are provided to move the expression to the Expressions view when dismissed with the given command param page the workbench page on which the popup should be displayed param exp the expression to display param command Id identifier of the command used to dismiss the popup public Expression Information Control I Workbench Page page I Expression exp String command Id super page get Workbench Window get Shell DebugUI Views Messages get String Expression Information Control 5 command Id NON NLS 1 this page page this exp exp  commandId ExpressionInformationControl IWorkbenchPage IExpression commandId getWorkbenchWindow getShell DebugUIViewsMessages getString ExpressionInformationControl commandId
public void set Information String information Variables View view get View To Emulate viewer get Content Provider if view null Structured Viewer structured Viewer Structured Viewer view get Viewer Viewer Filter filters structured Viewer get Filters for int i 0 i filters length i viewer add Filter filters i Variables View Content Provider viewer get Content Provider set Show Logical Structure view is Show Logical Structure Map map view get Presentation Attributes exp get Model Identifier Iterator iterator map key Set iterator while iterator has Next String key String iterator next model Presentation set Attribute key map get key viewer set Input new Object exp viewer expand To Level 2  setInformation VariablesView getViewToEmulate getContentProvider StructuredViewer structuredViewer StructuredViewer getViewer ViewerFilter structuredViewer getFilters addFilter VariablesViewContentProvider getContentProvider setShowLogicalStructure isShowLogicalStructure getPresentationAttributes getModelIdentifier keySet hasNext modelPresentation setAttribute setInput expandToLevel
private Variables View get View To Emulate Variables View expressions View Variables View page find View I DebugUI Constants ID EXPRESSION VIEW if expressions View null expressions View is Visible return expressions View else Variables View variables View Variables View page find View I DebugUI Constants ID VARIABLE VIEW if variables View null variables View is Visible return variables View else if expressions View null return expressions View else return variables View  VariablesView getViewToEmulate VariablesView expressionsView VariablesView findView IDebugUIConstants ID_EXPRESSION_VIEW expressionsView expressionsView isVisible expressionsView VariablesView variablesView VariablesView findView IDebugUIConstants ID_VARIABLE_VIEW variablesView variablesView isVisible variablesView expressionsView expressionsView variablesView
protected int get Initial Sash Weights I Dialog Settings settings get Dialog Settings int sashes new int 2 try sashes 0 settings get Int SASH KEY  ONE NON NLS 1 sashes 1 settings get Int SASH KEY  TWO NON NLS 1 return sashes catch Number Format Exception nfe return DEFAULT SASH WEIGHTS  getInitialSashWeights IDialogSettings getDialogSettings getInt SASH_KEY _ONE getInt SASH_KEY _TWO NumberFormatException DEFAULT_SASH_WEIGHTS
protected void persist Sash Weights I Dialog Settings settings get Dialog Settings int sashes sash Form get Weights settings put SASH KEY  ONE sashes 0 NON NLS 1 settings put SASH KEY  TWO sashes 1 NON NLS 1  persistSashWeights IDialogSettings getDialogSettings sashForm getWeights SASH_KEY _ONE SASH_KEY _TWO
public void detail Computed I Value value final String result Display get Default async Exec new Runnable public void run value Display set Text result  detailComputed IValue getDefault asyncExec valueDisplay setText
I Value Detail Listener value Detail Listener new I Value Detail Listener public void detail Computed I Value value final String result Display get Default async Exec new Runnable public void run value Display set Text result  IValueDetailListener valueDetailListener IValueDetailListener detailComputed IValue getDefault asyncExec valueDisplay setText
private void update Value Display I Value val I Value Detail Listener value Detail Listener new I Value Detail Listener public void detail Computed I Value value final String result Display get Default async Exec new Runnable public void run value Display set Text result model Presentation compute Detail val value Detail Listener  updateValueDisplay IValue IValueDetailListener valueDetailListener IValueDetailListener detailComputed IValue getDefault asyncExec valueDisplay setText modelPresentation computeDetail valueDetailListener
tree add Selection Listener new Selection Listener public void widget Selected Selection Event e try Tree Item selections tree get Selection Object data selections selections length 1 get Data I Value val null if data instanceof Indexed Variable Partition no details for parititions return if data instanceof I Variable val I Variable data get Value else if data instanceof I Expression val I Expression data get Value if val null return update Value Display val catch Debug Exception ex DebugUI Plugin log ex  addSelectionListener SelectionListener widgetSelected SelectionEvent TreeItem getSelection getData IValue IndexedVariablePartition IVariable IVariable getValue IExpression IExpression getValue updateValueDisplay DebugException DebugUIPlugin
public void widget Default Selected Selection Event e  widgetDefaultSelected SelectionEvent
protected Control create Control Composite parent Composite composite new Composite parent parent get Style Grid Layout layout new Grid Layout composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH sash Form new Sash Form composite parent get Style sash Form set Orientation SWT VERTICAL sash Form set Layout Data new Grid Data Grid Data FILL BOTH viewer new Variables Viewer sash Form SWT NO TRIM viewer set Content Provider new Expression Popup Content Provider model Presentation DebugUI Tools new Debug Model Presentation viewer set Label Provider model Presentation value Display new Styled Text sash Form SWT NO TRIM SWT WRAP SWT V SCROLL value Display set Editable false tree viewer get Tree tree add Selection Listener new Selection Listener public void widget Selected Selection Event e try Tree Item selections tree get Selection Object data selections selections length 1 get Data I Value val null if data instanceof Indexed Variable Partition no details for parititions return if data instanceof I Variable val I Variable data get Value else if data instanceof I Expression val I Expression data get Value if val null return update Value Display val catch Debug Exception ex DebugUI Plugin log ex public void widget Default Selected Selection Event e Color background parent get Display get System Color SWT COLOR INFO BACKGROUND Color foreground parent get Display get System Color SWT COLOR INFO FOREGROUND tree set Foreground foreground tree set Background background composite set Foreground foreground composite set Background background value Display set Foreground foreground value Display set Background background sash Form set Weights get Initial Sash Weights sash Form set Weights DEFAULT SASH WEIGHTS return tree  createControl getStyle GridLayout GridLayout setLayout setLayoutData GridData GridData FILL_BOTH sashForm SashForm getStyle sashForm setOrientation sashForm setLayoutData GridData GridData FILL_BOTH VariablesViewer sashForm NO_TRIM setContentProvider ExpressionPopupContentProvider modelPresentation DebugUITools newDebugModelPresentation setLabelProvider modelPresentation valueDisplay StyledText sashForm NO_TRIM V_SCROLL valueDisplay setEditable getTree addSelectionListener SelectionListener widgetSelected SelectionEvent TreeItem getSelection getData IValue IndexedVariablePartition IVariable IVariable getValue IExpression IExpression getValue updateValueDisplay DebugException DebugUIPlugin widgetDefaultSelected SelectionEvent getDisplay getSystemColor COLOR_INFO_BACKGROUND getDisplay getSystemColor COLOR_INFO_FOREGROUND setForeground setBackground setForeground setBackground valueDisplay setForeground valueDisplay setBackground sashForm setWeights getInitialSashWeights sashForm setWeights DEFAULT_SASH_WEIGHTS
public Point compute Size Hint Point persisted Size get Initial Size if persisted Size null return persisted Size int height 0 int width 0 int item Count 0 Tree Item items tree get Items GC gc new GC tree for int i 0 i items length i width Math max width calculate Width items i gc item Count do the same for the children because we expand the first level Tree Item children items i get Items for int j 0 j children length j width Math max width calculate Width children j gc item Count gc dispose width 40 give a little extra space height item Count tree get Item Height 90 if width 300 width 300 if height 300 height 300 return shell compute Size width height true  computeSizeHint persistedSize getInitialSize persistedSize persistedSize itemCount TreeItem getItems calculateWidth itemCount TreeItem getItems calculateWidth itemCount itemCount getItemHeight computeSize
private int calculate Width Tree Item item GC gc int width 0 Image image item get Image String text item get Text if image null width image get Bounds width 2 if text null text length 0 width gc string Extent text x return width  calculateWidth TreeItem getImage getText getBounds stringExtent
see org eclipse jface text I Information Control Extension has Contents public boolean has Contents return viewer null  IInformationControlExtension hasContents hasContents
protected void perform Command Debug Plugin get Default get Expression Manager add Expression exp I View Part part page find View I DebugUI Constants ID EXPRESSION VIEW if part null try page show View I DebugUI Constants ID EXPRESSION VIEW catch Part Init Exception e else page bring To Top part  performCommand DebugPlugin getDefault getExpressionManager addExpression IViewPart findView IDebugUIConstants ID_EXPRESSION_VIEW showView IDebugUIConstants ID_EXPRESSION_VIEW PartInitException bringToTop

private Object input null public Expression Popup Content Provider super null  ExpressionPopupContentProvider
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input super input Changed viewer old Input new Input input new Input  IContentProvider inputChanged inputChanged oldInput newInput inputChanged oldInput newInput newInput
public Object get Elements Object parent if parent input return Object input return super get Elements parent  getElements getElements

protected class Expression View Decorating Label Provider extends Variables View Variables View Decorating Label Provider see org eclipse jface viewers I Color Provider get Foreground java lang Object public Color get Foreground Object element boolean expression With Error false I Error Reporting Expression expression null if element instanceof I Error Reporting Expression expression I Error Reporting Expression element else if element instanceof String Object parent Variables View Content Provider get Variables Viewer get Content Provider get Parent element if parent instanceof I Error Reporting Expression expression I Error Reporting Expression parent if expression null expression has Errors expression With Error true if expression With Error return Display get Default get System Color SWT COLOR RED return super get Foreground element  ExpressionViewDecoratingLabelProvider VariablesView VariablesViewDecoratingLabelProvider IColorProvider getForeground getForeground expressionWithError IErrorReportingExpression IErrorReportingExpression IErrorReportingExpression VariablesViewContentProvider getVariablesViewer getContentProvider getParent IErrorReportingExpression IErrorReportingExpression hasErrors expressionWithError expressionWithError getDefault getSystemColor COLOR_RED getForeground
public Expression View Decorating Label Provider Structured Viewer viewer I Label Provider provider Debug View Label Decorator decorator super viewer provider decorator  ExpressionViewDecoratingLabelProvider StructuredViewer ILabelProvider DebugViewLabelDecorator
see org eclipse debug internal ui views variables Variables View create Label Provider protected I Base Label Provider create Label Provider Structured Viewer viewer return new Expression View Decorating Label Provider viewer new Debug View Interim Label Provider get Model Presentation new Debug View Label Decorator get Model Presentation  VariablesView createLabelProvider IBaseLabelProvider createLabelProvider StructuredViewer ExpressionViewDecoratingLabelProvider DebugViewInterimLabelProvider getModelPresentation DebugViewLabelDecorator getModelPresentation
Creates this view s content provider return a content provider protected I Content Provider create Content Provider return new Expression View Content Provider this  IContentProvider createContentProvider ExpressionViewContentProvider
Creates this view s event handler return an event handler protected Abstract Debug Event Handler create Event Handler return new Expression View Event Handler this  AbstractDebugEventHandler createEventHandler ExpressionViewEventHandler
see Abstract Debug View get Help Context Id protected String get Help Context Id return I Debug Help Context Ids EXPRESSION VIEW  AbstractDebugView getHelpContextId getHelpContextId IDebugHelpContextIds EXPRESSION_VIEW
Initializes the viewer input on creation protected void set Initial Content get Viewer set Input Debug Plugin get Default get Expression Manager  setInitialContent getViewer setInput DebugPlugin getDefault getExpressionManager
Configures the tool Bar param tbm The toolbar that will be configured protected void configure Tool Bar I Tool Bar Manager tbm super configure Tool Bar tbm tbm add new Separator I DebugUI Constants EMPTY EXPRESSION GROUP tbm add new Separator I DebugUI Constants EXPRESSION GROUP  toolBar configureToolBar IToolBarManager configureToolBar IDebugUIConstants EMPTY_EXPRESSION_GROUP IDebugUIConstants EXPRESSION_GROUP
Adds items to the tree viewer s context menu including any extension defined actions param menu The menu to add the item to protected void fill Context Menu I Menu Manager menu menu add new Separator I DebugUI Constants EMPTY EXPRESSION GROUP menu add new Separator I DebugUI Constants EXPRESSION GROUP menu add get Action Change Variable Value NON NLS 1 menu add new Separator I DebugUI Constants EMPTY RENDER GROUP menu add new Separator I Workbench Action Constants MB ADDITIONS  fillContextMenu IMenuManager IDebugUIConstants EMPTY_EXPRESSION_GROUP IDebugUIConstants EXPRESSION_GROUP getAction ChangeVariableValue IDebugUIConstants EMPTY_RENDER_GROUP IWorkbenchActionConstants MB_ADDITIONS
The code Expression View code listens for selection changes in the code Launches View code to correctly set the editable state of the details pane Updates the context of watch expressions see I Selection Listener selection Changed I Workbench Part I Selection public void selection Changed I Workbench Part part I Selection selection if selection instanceof I Structured Selection I Debug Element context null I Structured Selection ss I Structured Selection selection if ss size 2 Object object ss get First Element if object instanceof I Debug Element context I Debug Element object else if object instanceof I Launch context I Launch object get Debug Target update watch expressions with new context I Expression expressions Debug Plugin get Default get Expression Manager get Expressions for int i 0 i expressions length i I Expression expression expressions i if expression instanceof I Watch Expression I Watch Expression expression set Expression Context context update actions update Action Content Assist NON NLS 1  ExpressionView LaunchesView ISelectionListener selectionChanged IWorkbenchPart ISelection selectionChanged IWorkbenchPart ISelection IStructuredSelection IDebugElement IStructuredSelection IStructuredSelection getFirstElement IDebugElement IDebugElement ILaunch ILaunch getDebugTarget IExpression DebugPlugin getDefault getExpressionManager getExpressions IExpression IWatchExpression IWatchExpression setExpressionContext updateAction ContentAssist
Do nothing the input to this view never changes it is always the expression manager see Variables View set Viewer Input I Structured Selection protected void set Viewer Input I Structured Selection ssel  VariablesView setViewerInput IStructuredSelection setViewerInput IStructuredSelection
protected void tree Selection Changed Selection Changed Event event super tree Selection Changed event I Selection selection event get Selection if selection instanceof I Structured Selection I Structured Selection ssel I Structured Selection selection if ssel size 1 Object input ssel get First Element if input instanceof I Debug Element get Detail Viewer set Editable true return get Detail Viewer set Editable false  treeSelectionChanged SelectionChangedEvent treeSelectionChanged ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement IDebugElement getDetailViewer setEditable getDetailViewer setEditable
see org eclipse debug internal ui views variables Variables View get Detail Pane Preference Key protected String get Detail Pane Preference Key return I Debug Preference Constants EXPRESSIONS DETAIL PANE ORIENTATION  VariablesView getDetailPanePreferenceKey getDetailPanePreferenceKey IDebugPreferenceConstants EXPRESSIONS_DETAIL_PANE_ORIENTATION
see org eclipse debug internal ui views variables Variables View get Toggle Action Label protected String get Toggle Action Label return Variables View Messages get String Expression View 4 NON NLS 1  VariablesView getToggleActionLabel getToggleActionLabel VariablesViewMessages getString ExpressionView
see org eclipse debug ui Abstract Debug View create Actions protected void create Actions super create Actions set Initial Content  AbstractDebugView createActions createActions createActions setInitialContent

public class Expression View Content Provider extends Variables View Content Provider public Expression View Content Provider I Debug View view super view  ExpressionViewContentProvider VariablesViewContentProvider ExpressionViewContentProvider IDebugView
see I Tree Content Provider get Children Object public Object get Children Object parent Object children null try if parent instanceof I Expression Manager do not cache parents return I Expression Manager parent get Expressions else if parent instanceof I Expression if parent instanceof I Error Reporting Expression I Error Reporting Expression expression I Error Reporting Expression parent if expression has Errors children expression get Error Messages if children null I Expression expression I Expression parent I Value value expression get Value children get Model Specific Children expression value else if parent instanceof I Variable I Variable variable I Variable parent I Value value variable get Value children get Model Specific Children variable value if children null cache parent children return children catch Debug Exception de DebugUI Plugin log de return new Object 0  ITreeContentProvider getChildren getChildren IExpressionManager IExpressionManager getExpressions IExpression IErrorReportingExpression IErrorReportingExpression IErrorReportingExpression hasErrors getErrorMessages IExpression IExpression IValue getValue getModelSpecificChildren IVariable IVariable IVariable IValue getValue getModelSpecificChildren DebugException DebugUIPlugin
see I Tree Content Provider get Parent Object public Object get Parent Object item if item instanceof I Expression return Debug Plugin get Default get Expression Manager return super get Parent item  ITreeContentProvider getParent getParent IExpression DebugPlugin getDefault getExpressionManager getParent
see I Tree Content Provider has Children Object public boolean has Children Object element if element instanceof I Expression Manager return I Expression Manager element has Expressions else if element instanceof I Expression if element instanceof I Error Reporting Expression I Error Reporting Expression element has Errors return true I Value v I Expression element get Value if v null return false try return v has Variables catch Debug Exception e DebugUI Plugin log e return false return super has Children element  ITreeContentProvider hasChildren hasChildren IExpressionManager IExpressionManager hasExpressions IExpression IErrorReportingExpression IErrorReportingExpression hasErrors IValue IExpression getValue hasVariables DebugException DebugUIPlugin hasChildren

Also update expressions if a target terminates see org eclipse debug internal ui views variables Variables View Event Handler do Handle Terminate Event org eclipse debug core Debug Event protected void do Handle Terminate Event Debug Event event super do Handle Terminate Event event if event get Source instanceof I Debug Target I Expression expressions Debug Plugin get Default get Expression Manager get Expressions I Adaptable object DebugUI Tools get Debug Context I Debug Element context null if object instanceof I Debug Element context I Debug Element object else if object instanceof I Launch context I Launch object get Debug Target for int i 0 i expressions length i I Expression expression expressions i if expression instanceof I Watch Expression I Watch Expression expression set Expression Context context  VariablesViewEventHandler doHandleTerminateEvent DebugEvent doHandleTerminateEvent DebugEvent doHandleTerminateEvent getSource IDebugTarget IExpression DebugPlugin getDefault getExpressionManager getExpressions IAdaptable DebugUITools getDebugContext IDebugElement IDebugElement IDebugElement ILaunch ILaunch getDebugTarget IExpression IWatchExpression IWatchExpression setExpressionContext
Constructs a new event handler on the given view param view variables view public Expression View Event Handler Abstract Debug View view super view Debug Plugin plugin Debug Plugin get Default plugin get Expression Manager add Expression Listener this  ExpressionViewEventHandler AbstractDebugView DebugPlugin DebugPlugin getDefault getExpressionManager addExpressionListener
De registers this event handler from the debug model public void dispose Debug Plugin plugin Debug Plugin get Default plugin get Expression Manager remove Expression Listener this super dispose  DebugPlugin DebugPlugin getDefault getExpressionManager removeExpressionListener
Runnable r new Runnable public void run if is Available get Tree Viewer refresh if expressions length 0 I Selection selection new Structured Selection expressions 0 get Tree Viewer set Selection selection true  isAvailable getTreeViewer ISelection StructuredSelection getTreeViewer setSelection
see I Expressions Listener expressions Added I Expression public void expressions Added final I Expression expressions Runnable r new Runnable public void run if is Available get Tree Viewer refresh if expressions length 0 I Selection selection new Structured Selection expressions 0 get Tree Viewer set Selection selection true get View async Exec r  IExpressionsListener expressionsAdded IExpression expressionsAdded IExpression isAvailable getTreeViewer ISelection StructuredSelection getTreeViewer setSelection getView asyncExec
Runnable r new Runnable public void run if is Available get Tree Viewer get Control set Redraw false for int i 0 i expressions length i I Expression expression expressions i remove expression I Content Provider provider get Tree Viewer get Content Provider if provider instanceof Expression View Content Provider Expression View Content Provider expression Provider Expression View Content Provider provider List decendants expression Provider get Cached Decendants expression decendants add expression Remove the parent cache for the expression and its children expression Provider remove Cache decendants to Array I Expression all Expressions Debug Plugin get Default get Expression Manager get Expressions if all Expressions length 0 get Tree Viewer set Selection new Structured Selection all Expressions 0 true get Tree Viewer get Control set Redraw true  isAvailable getTreeViewer getControl setRedraw IExpression IContentProvider getTreeViewer getContentProvider ExpressionViewContentProvider ExpressionViewContentProvider expressionProvider ExpressionViewContentProvider expressionProvider getCachedDecendants expressionProvider removeCache toArray IExpression allExpressions DebugPlugin getDefault getExpressionManager getExpressions allExpressions getTreeViewer setSelection StructuredSelection allExpressions getTreeViewer getControl setRedraw
see I Expressions Listener expressions Removed I Expression public void expressions Removed final I Expression expressions Runnable r new Runnable public void run if is Available get Tree Viewer get Control set Redraw false for int i 0 i expressions length i I Expression expression expressions i remove expression I Content Provider provider get Tree Viewer get Content Provider if provider instanceof Expression View Content Provider Expression View Content Provider expression Provider Expression View Content Provider provider List decendants expression Provider get Cached Decendants expression decendants add expression Remove the parent cache for the expression and its children expression Provider remove Cache decendants to Array I Expression all Expressions Debug Plugin get Default get Expression Manager get Expressions if all Expressions length 0 get Tree Viewer set Selection new Structured Selection all Expressions 0 true get Tree Viewer get Control set Redraw true get View async Exec r  IExpressionsListener expressionsRemoved IExpression expressionsRemoved IExpression isAvailable getTreeViewer getControl setRedraw IExpression IContentProvider getTreeViewer getContentProvider ExpressionViewContentProvider ExpressionViewContentProvider expressionProvider ExpressionViewContentProvider expressionProvider getCachedDecendants expressionProvider removeCache toArray IExpression allExpressions DebugPlugin getDefault getExpressionManager getExpressions allExpressions getTreeViewer setSelection StructuredSelection allExpressions getTreeViewer getControl setRedraw getView asyncExec
Runnable r new Runnable public void run if is Available get Tree Viewer get Control set Redraw false for int i 0 i expressions length i I Expression expression expressions i refresh expression update details if selected I Structured Selection selection I Structured Selection get Viewer get Selection if selection size 1 selection get First Element equals expression get Variables View populate Detail Pane get Tree Viewer get Control set Redraw true  isAvailable getTreeViewer getControl setRedraw IExpression IStructuredSelection IStructuredSelection getViewer getSelection getFirstElement getVariablesView populateDetailPane getTreeViewer getControl setRedraw
see I Expressions Listener expressions Changed I Expression public void expressions Changed final I Expression expressions Runnable r new Runnable public void run if is Available get Tree Viewer get Control set Redraw false for int i 0 i expressions length i I Expression expression expressions i refresh expression update details if selected I Structured Selection selection I Structured Selection get Viewer get Selection if selection size 1 selection get First Element equals expression get Variables View populate Detail Pane get Tree Viewer get Control set Redraw true get View async Exec r  IExpressionsListener expressionsChanged IExpression expressionsChanged IExpression isAvailable getTreeViewer getControl setRedraw IExpression IStructuredSelection IStructuredSelection getViewer getSelection getFirstElement getVariablesView populateDetailPane getTreeViewer getControl setRedraw getView asyncExec
Override the superclass method Do nothing protected void do Handle Resume Event Debug Event event  doHandleResumeEvent DebugEvent
see org eclipse debug internal ui views variables Variables View Event Handler do Handle Change Event org eclipse debug core Debug Event protected void do Handle Change Event Debug Event event if event get Source instanceof I Expression refresh event get Source else if event get Detail Debug Event STATE only process variable state changes if event get Source instanceof I Variable refresh event get Source else refresh  VariablesViewEventHandler doHandleChangeEvent DebugEvent doHandleChangeEvent DebugEvent getSource IExpression getSource getDetail DebugEvent getSource IVariable getSource

add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dispose  addDisposeListener DisposeListener widgetDisposed DisposeEvent
Creates a popup information control When the specified command is invoked the handler is invoked and the popup is closed param parent the shell to parent the popup param label Text label to display at the bottom of the popup window The label will be augmented with the key sequence asscoaited with the given command Id param command Id command identifier used to bind a key sequence to close the popup invoking code perform Command code public Popup Information Control Shell parent String label Text String command Id this close Handler new Close Handler this command Id command Id shell new Shell parent SWT RESIZE Display display shell get Display shell set Foreground display get System Color SWT COLOR INFO FOREGROUND shell set Background display get System Color SWT COLOR INFO BACKGROUND add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dispose Grid Layout layout new Grid Layout 1 false layout margin Height 0 layout margin Width 0 shell set Layout layout shell set Layout Data new Grid Data Grid Data FILL BOTH control create Control shell register I Command Manager command Manager PlatformUI get Workbench get Command Support get Command Manager I Command command null if command Id null command command Manager get Command command Id Label separator new Label shell SWT SEPARATOR SWT HORIZONTAL SWT LINE DOT separator set Layout Data new Grid Data Grid Data FILL HORIZONTAL Label label new Label shell SWT SHADOW NONE SWT RIGHT label set Text label Text label set Foreground display get System Color SWT COLOR INFO FOREGROUND label set Background display get System Color SWT COLOR INFO BACKGROUND label set Enabled false label set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data GRAB HORIZONTAL Grid Data FILL HORIZONTAL if command null List key Bindings command get Key Sequence Bindings if key Bindings null key Bindings size 0 I Key Sequence Binding key Sequence Binding I Key Sequence Binding key Bindings get 0 label set Text Message Format format DebugUI Messages get String Popup Information Control 1 new String key Sequence Binding get Key Sequence format label Text NON NLS 1 label get Parent layout  labelText commandId commandId performCommand PopupInformationControl labelText commandId closeHandler CloseHandler commandId commandId getDisplay setForeground getSystemColor COLOR_INFO_FOREGROUND setBackground getSystemColor COLOR_INFO_BACKGROUND addDisposeListener DisposeListener widgetDisposed DisposeEvent GridLayout GridLayout marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_BOTH createControl ICommandManager commandManager getWorkbench getCommandSupport getCommandManager ICommand commandId commandManager getCommand commandId LINE_DOT setLayoutData GridData GridData FILL_HORIZONTAL SHADOW_NONE setText labelText setForeground getSystemColor COLOR_INFO_FOREGROUND setBackground getSystemColor COLOR_INFO_BACKGROUND setEnabled setLayoutData GridData GridData HORIZONTAL_ALIGN_END GridData GRAB_HORIZONTAL GridData FILL_HORIZONTAL keyBindings getKeySequenceBindings keyBindings keyBindings IKeySequenceBinding keySequenceBinding IKeySequenceBinding keyBindings setText MessageFormat DebugUIMessages getString PopupInformationControl keySequenceBinding getKeySequence labelText getParent
see org eclipse jface text I Information Control add Dispose Listener Dispose Listener public void add Dispose Listener Dispose Listener listener shell add Dispose Listener listener  IInformationControl addDisposeListener DisposeListener addDisposeListener DisposeListener addDisposeListener
see org eclipse jface text I Information Control add Focus Listener Focus Listener public void add Focus Listener Focus Listener listener shell add Focus Listener listener  IInformationControl addFocusListener FocusListener addFocusListener FocusListener addFocusListener
public Point compute Size Hint Point persisted Size get Initial Size if persisted Size null return persisted Size else Point computed Size shell compute Size SWT DEFAULT SWT DEFAULT true if max Width 0 computed Size x max Width computed Size x max Width if max Height 0 computed Size y max Height computed Size y max Height return computed Size  computeSizeHint persistedSize getInitialSize persistedSize persistedSize computedSize computeSize maxWidth computedSize maxWidth computedSize maxWidth maxHeight computedSize maxHeight computedSize maxHeight computedSize
public void dispose deregister persist Size shell null  persistSize
Deregisters this popup s default close action and turns off the debug popup scope private void deregister I Workbench workbench PlatformUI get Workbench I Workbench Context Support context Support workbench get Context Support I Workbench Command Support command Support workbench get Command Support command Support remove Handler Submission submission context Support unregister Shell shell  IWorkbench getWorkbench IWorkbenchContextSupport contextSupport getContextSupport IWorkbenchCommandSupport commandSupport getCommandSupport commandSupport removeHandlerSubmission contextSupport unregisterShell
Registers this popup s default close action and turns on the debug popup scope private void register if close Handler null I Workbench workbench PlatformUI get Workbench I Workbench Context Support context Support workbench get Context Support I Workbench Command Support command Support workbench get Command Support submission new Handler Submission null shell null command Id close Handler Priority MEDIUM command Support add Handler Submission submission context Support register Shell shell I Workbench Context Support TYPE WINDOW  closeHandler IWorkbench getWorkbench IWorkbenchContextSupport contextSupport getContextSupport IWorkbenchCommandSupport commandSupport getCommandSupport HandlerSubmission commandId closeHandler commandSupport addHandlerSubmission contextSupport registerShell IWorkbenchContextSupport TYPE_WINDOW
see org eclipse jface text I Information Control remove Dispose Listener Dispose Listener public void remove Dispose Listener Dispose Listener listener shell remove Dispose Listener listener  IInformationControl removeDisposeListener DisposeListener removeDisposeListener DisposeListener removeDisposeListener
see org eclipse jface text I Information Control remove Focus Listener Focus Listener public void remove Focus Listener Focus Listener listener shell remove Focus Listener listener  IInformationControl removeFocusListener FocusListener removeFocusListener FocusListener removeFocusListener
see org eclipse jface text I Information Control set Background Color Color public void set Background Color Color background shell set Background background  IInformationControl setBackgroundColor setBackgroundColor setBackground
see org eclipse jface text I Information Control set Foreground Color Color public void set Foreground Color Color foreground shell set Foreground foreground  IInformationControl setForegroundColor setForegroundColor setForeground
see org eclipse jface text I Information Control set Location Point public void set Location Point location shell set Location location  IInformationControl setLocation setLocation setLocation
see org eclipse jface text I Information Control set Size int int public void set Size int width int height shell set Size width height  IInformationControl setSize setSize setSize
see org eclipse jface text I Information Control set Size Contraints int int public void set Size Constraints int max Width int max Height this max Width max Width this max Height max Height  IInformationControl setSizeContraints setSizeConstraints maxWidth maxHeight maxWidth maxWidth maxHeight maxHeight
public void set Visible boolean visible shell set Visible visible if visible deregister shell dispose  setVisible setVisible
Creates and returns the control for this popup param parent parent control return control 
Attempts to retrieve the size of the popup when it was last disposed return The size the initial size of the popup if available otherwise null protected Point get Initial Size Point point null try I Dialog Settings settings get Dialog Settings if settings null String key get Class get Name int height settings get Int key HEIGHT STRING int width settings get Int key WIDTH STRING point new Point width height catch Number Format Exception e return point  getInitialSize IDialogSettings getDialogSettings getClass getName getInt HEIGHT_STRING getInt WIDTH_STRING NumberFormatException
Returns a dialog settings in which to persist restore popup control size return dialog settings protected I Dialog Settings get Dialog Settings return DebugUI Plugin get Default get Dialog Settings  IDialogSettings getDialogSettings DebugUIPlugin getDefault getDialogSettings
Attempts to store the current size of the popup in the adapter s I Dialog Settings Uses the adapters fully qualified class name to create unique keys protected void persist Size if shell null return I Dialog Settings settings get Dialog Settings if settings null String key get Class get Name Point size shell get Size settings put key WIDTH STRING size x settings put key HEIGHT STRING size y  IDialogSettings persistSize IDialogSettings getDialogSettings getClass getName getSize WIDTH_STRING HEIGHT_STRING
public Object execute Map parameter throws Execution Exception perform Command if shell null shell dispose return null  ExecutionException performCommand
Called when this popup is closed via its command Subclasses must override 
Returns this popup s shell return shell protected Shell get Shell return shell  getShell
see org eclipse jface text I Information Control is Focus Control public boolean is Focus Control return control is Focus Control  IInformationControl isFocusControl isFocusControl isFocusControl
see org eclipse jface text I Information Control set Focus public void set Focus control set Focus  IInformationControl setFocus setFocus setFocus

Handles the given debug exception param e debug exception 

public abstract class Decoration Removes this decoration public abstract void remove 
Returns the thread this decoration decorates return thead associated with this decoration 

Adds the given decoration for the given stack frame param decoration param frame public static void add Decoration Decoration decoration I Debug Target target decoration get Thread get Debug Target List list List f Decorations get target if list null list new Array List f Decorations put target list list add decoration  addDecoration IDebugTarget getThread getDebugTarget fDecorations ArrayList fDecorations
Removes any decorations for the given debug target param target to remove editor decorations for public static void remove Decorations I Debug Target target List list List f Decorations get target if list null List Iterator iterator list list Iterator while iterator has Next Decoration decoration Decoration iterator next decoration remove iterator remove  removeDecorations IDebugTarget fDecorations ListIterator listIterator hasNext
Removes any decorations for the given thread param thread thread to remove decorations for public static void remove Decorations I Thread thread List list List f Decorations get thread get Debug Target if list null List Iterator iterator list list Iterator while iterator has Next Decoration decoration Decoration iterator next if thread equals decoration get Thread decoration remove iterator remove  removeDecorations IThread fDecorations getDebugTarget ListIterator listIterator hasNext getThread

Creates a launch view and an instruction pointer marker for the view public Launch View DebugUI Plugin get Default get Preference Store add Property Change Listener this Resources Plugin get Workspace add Resource Change Listener this  LaunchView DebugUIPlugin getDefault getPreferenceStore addPropertyChangeListener ResourcesPlugin getWorkspace addResourceChangeListener
see org eclipse debug ui Abstract Debug View get Help Context Id protected String get Help Context Id return I Debug Help Context Ids DEBUG VIEW  AbstractDebugView getHelpContextId getHelpContextId IDebugHelpContextIds DEBUG_VIEW
viewer needs to be set Runnable r new Runnable public void run initialize Selection  initializeSelection
protected void create Actions set Action Properties new Property Dialog Action get Site get Workbench Window get Shell get Site get Selection Provider NON NLS 1 f Edit Config Action new Edit Launch Configuration Action f Add To Favorites Action new Add To Favorites Action f Edit Source Action new Edit Source Lookup Path Action this f Lookup Action new Lookup Source Action this submit an async exec to update the selection once the view has been created i e auto expand and select the suspended thread on creation Done here because the viewer needs to be set Runnable r new Runnable public void run initialize Selection async Exec r  createActions setAction PropertyDialogAction getSite getWorkbenchWindow getShell getSite getSelectionProvider fEditConfigAction EditLaunchConfigurationAction fAddToFavoritesAction AddToFavoritesAction fEditSourceAction EditSourceLookupPathAction fLookupAction LookupSourceAction initializeSelection asyncExec
lv get Control add Key Listener new Key Adapter public void key Pressed Key Event event if event character SWT DEL event state Mask 0 handle Delete Key Pressed  getControl addKeyListener KeyAdapter keyPressed KeyEvent stateMask handleDeleteKeyPressed
protected Viewer create Viewer Composite parent Launch Viewer lv new Launch Viewer parent lv add Post Selection Changed Listener this lv get Control add Key Listener new Key Adapter public void key Pressed Key Event event if event character SWT DEL event state Mask 0 handle Delete Key Pressed lv set Content Provider create Content Provider final Delegating Model Presentation presentation new Delegating Model Presentation Debug View Decorating Label Provider label Provider new Debug View Decorating Label Provider lv new Debug View Interim Label Provider presentation new Debug View Label Decorator presentation lv set Label Provider label Provider f Editor Presentation presentation add my viewer as a selection provider so selective re launch works get Site set Selection Provider lv lv set Input Debug Plugin get Default get Launch Manager set Event Handler new Launch View Event Handler this determine if active set Active get Site get Page find View get Site get Id null return lv  createViewer LaunchViewer LaunchViewer addPostSelectionChangedListener getControl addKeyListener KeyAdapter keyPressed KeyEvent stateMask handleDeleteKeyPressed setContentProvider createContentProvider DelegatingModelPresentation DelegatingModelPresentation DebugViewDecoratingLabelProvider labelProvider DebugViewDecoratingLabelProvider DebugViewInterimLabelProvider DebugViewLabelDecorator setLabelProvider labelProvider fEditorPresentation getSite setSelectionProvider setInput DebugPlugin getDefault getLaunchManager setEventHandler LaunchViewEventHandler setActive getSite getPage findView getSite getId
Returns the label decorator used by this view return this view s label decorator public Debug View Label Decorator get Label Decorator return Debug View Label Decorator Debug View Decorating Label Provider Launch Viewer get Viewer get Label Provider get Label Decorator  DebugViewLabelDecorator getLabelDecorator DebugViewLabelDecorator DebugViewDecoratingLabelProvider LaunchViewer getViewer getLabelProvider getLabelDecorator
private void handle Delete Key Pressed I Structured Selection selection I Structured Selection get Viewer get Selection Iterator iter selection iterator Object item boolean items To Terminate false I Terminate terminable while iter has Next item iter next if item instanceof I Terminate terminable I Terminate item if terminable can Terminate terminable is Terminated items To Terminate true break if items To Terminate Prompt the user to proceed with termination if Message Dialog open Question get Site get Shell DebugUI Views Messages get String Launch View Terminate and Remove 1 DebugUI Views Messages get String Launch View Terminate and remove selected  2 NON NLS 1 NON NLS 2 return Multi Status status new Multi Status DebugUI Plugin get Unique Identifier Debug Exception REQUEST FAILED DebugUI Views Messages get String Launch View Exceptions occurred attempting to terminate and remove 3 null NON NLS 1 iter selection iterator while iter has Next try terminate And Remove iter next catch Debug Exception exception status merge exception get Status if status isOK I Workbench Window window DebugUI Plugin get Active Workbench Window if window null DebugUI Plugin error Dialog window get Shell DebugUI Views Messages get String Launch View Terminate and Remove 4 DebugUI Views Messages get String Launch View Terminate and remove failed 5 status NON NLS 1 NON NLS 2 else DebugUI Plugin log status  handleDeleteKeyPressed IStructuredSelection IStructuredSelection getViewer getSelection itemsToTerminate ITerminate hasNext ITerminate ITerminate canTerminate isTerminated itemsToTerminate itemsToTerminate MessageDialog openQuestion getSite getShell DebugUIViewsMessages getString LaunchView Terminate_and_Remove_1 DebugUIViewsMessages getString LaunchView Terminate_and_remove_selected__2 MultiStatus MultiStatus DebugUIPlugin getUniqueIdentifier DebugException REQUEST_FAILED DebugUIViewsMessages getString LaunchView Exceptions_occurred_attempting_to_terminate_and_remove_3 hasNext terminateAndRemove DebugException getStatus IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow DebugUIPlugin errorDialog getShell DebugUIViewsMessages getString LaunchView Terminate_and_Remove_4 DebugUIViewsMessages getString LaunchView Terminate_and_remove_failed_5 DebugUIPlugin
Terminates and removes the given element from the launch manager public static void terminate And Remove Object element throws Debug Exception if element instanceof I Terminate return I Terminate terminable I Terminate element if terminable can Terminate terminable is Terminated Don t try to terminate or remove attached launches return try if terminable is Terminated terminable terminate finally remove element  terminateAndRemove DebugException ITerminate ITerminate ITerminate canTerminate isTerminated isTerminated
Removes the given element from the launch manager Has no effect if the given element is not of type I Launch I Debug Element or I Process private static void remove Object element I Launch launch null if element instanceof I Launch launch I Launch element else if element instanceof I Debug Element launch I Debug Element element get Launch else if element instanceof I Process launch I Process element get Launch else return I Launch Manager l Manager Debug Plugin get Default get Launch Manager l Manager remove Launch launch  ILaunch IDebugElement IProcess ILaunch ILaunch ILaunch IDebugElement IDebugElement getLaunch IProcess IProcess getLaunch ILaunchManager lManager DebugPlugin getDefault getLaunchManager lManager removeLaunch
Select the first stack frame in a suspended thread if any protected void initialize Selection if is Available return Tree Viewer tv Tree Viewer get Viewer tv expand To Level 2 Object elements tv get Expanded Elements for int i 0 i elements length i if elements i instanceof I Launch I Stack Frame frame find Frame I Launch elements i if frame null auto Expand frame false true  initializeSelection isAvailable TreeViewer TreeViewer getViewer expandToLevel getExpandedElements ILaunch IStackFrame findFrame ILaunch autoExpand
Returns the first stack frame in the first suspended thread of the given launch or code null code if none param launch a launch in this view return stack frame or code null code protected I Stack Frame find Frame I Launch launch I Debug Target target launch get Debug Target if target null try I Thread threads target get Threads for int i 0 i threads length i if threads i is Suspended return threads i get Top Stack Frame catch Debug Exception e return null  IStackFrame findFrame ILaunch IDebugTarget getDebugTarget IThread getThreads isSuspended getTopStackFrame DebugException
public void init I View Site site throws Part Init Exception super init site site get Page add Part Listener I Part Listener2 this site get Workbench Window add Page Listener this site get Workbench Window add Perspective Listener this  IViewSite PartInitException getPage addPartListener IPartListener2 getWorkbenchWindow addPageListener getWorkbenchWindow addPerspectiveListener
public void init I View Site site I Memento memento throws Part Init Exception super init site memento site get Page add Part Listener I Part Listener2 this site get Workbench Window add Page Listener this site get Workbench Window add Perspective Listener this if memento null return if f Reuse Editor String index memento get String I DebugUI Constants PREF REUSE EDITOR if index null try f Editor Index Integer parse Int index catch Number Format Exception e DebugUI Plugin log e  IViewSite IMemento PartInitException getPage addPartListener IPartListener2 getWorkbenchWindow addPageListener getWorkbenchWindow addPerspectiveListener fReuseEditor getString IDebugUIConstants PREF_REUSE_EDITOR fEditorIndex parseInt NumberFormatException DebugUIPlugin
protected void configure Tool Bar I Tool Bar Manager tbm tbm add new Separator I DebugUI Constants THREAD GROUP tbm add new Separator I DebugUI Constants STEP GROUP tbm add new Group Marker I DebugUI Constants STEP INTO GROUP tbm add new Group Marker I DebugUI Constants STEP OVER GROUP tbm add new Group Marker I DebugUI Constants STEP RETURN GROUP tbm add new Group Marker I DebugUI Constants EMPTY STEP GROUP tbm add new Separator I DebugUI Constants RENDER GROUP  configureToolBar IToolBarManager IDebugUIConstants THREAD_GROUP IDebugUIConstants STEP_GROUP GroupMarker IDebugUIConstants STEP_INTO_GROUP GroupMarker IDebugUIConstants STEP_OVER_GROUP GroupMarker IDebugUIConstants STEP_RETURN_GROUP GroupMarker IDebugUIConstants EMPTY_STEP_GROUP IDebugUIConstants RENDER_GROUP
public void dispose if get Viewer null get Viewer remove Selection Changed Listener this if f Context Listener null f Context Listener dispose I Workbench Page page get Site get Page page remove Part Listener I Part Listener2 this I Workbench Window window get Site get Workbench Window window remove Perspective Listener this window remove Page Listener this cleanup DebugUI Plugin get Default get Preference Store remove Property Change Listener this Resources Plugin get Workspace remove Resource Change Listener this super dispose  getViewer getViewer removeSelectionChangedListener fContextListener fContextListener IWorkbenchPage getSite getPage removePartListener IPartListener2 IWorkbenchWindow getSite getWorkbenchWindow removePerspectiveListener removePageListener DebugUIPlugin getDefault getPreferenceStore removePropertyChangeListener ResourcesPlugin getWorkspace removeResourceChangeListener
Disposes of cached information protected void cleanup set Editor Id null set Editor Input null set Stack Frame null  setEditorId setEditorInput setStackFrame
Creates and returns the content provider to use for the viewer of this view protected I Structured Content Provider create Content Provider return new Launch View Content Provider  IStructuredContentProvider createContentProvider LaunchViewContentProvider
The selection has changed in the viewer Show the associated source code if it is a stack frame see org eclipse jface viewers I Selection Changed Listener selection Changed org eclipse jface viewers Selection Changed Event public void selection Changed Selection Changed Event event clear Status Line update Objects show Editor For Current Selection f Context Listener update For Selection I Structured Selection get Viewer get Selection get First Element  ISelectionChangedListener selectionChanged SelectionChangedEvent selectionChanged SelectionChangedEvent clearStatusLine updateObjects showEditorForCurrentSelection fContextListener updateForSelection IStructuredSelection getViewer getSelection getFirstElement
Lookup source element for current stack frame again public void redo Source Lookup set Stack Frame null selection Changed null  redoSourceLookup setStackFrame selectionChanged
Notifies this view that the given launches have terminated When a launch terminates remove all context submissions associated with it Clear the cache of the last stack frame that source was displayed for if that launch is terminated param launches the terminated launches protected void launches Terminated I Launch launches f Context Listener launches Terminated launches I Stack Frame frame get Stack Frame if frame null I Launch launch frame get Launch for int i 0 i launches length i I Launch terminated Launch launches i if terminated Launch equals launch set Stack Frame null  launchesTerminated ILaunch fContextListener launchesTerminated IStackFrame getStackFrame ILaunch getLaunch ILaunch terminatedLaunch terminatedLaunch setStackFrame
public void double Click Double Click Event event I Selection selection event get Selection if selection instanceof I Structured Selection return I Structured Selection ss I Structured Selection selection Object o ss get First Element if o null o instanceof I Stack Frame return Tree Viewer t Viewer Tree Viewer get Viewer boolean expanded t Viewer get Expanded State o t Viewer set Expanded State o expanded  doubleClick DoubleClickEvent ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement IStackFrame TreeViewer tViewer TreeViewer getViewer tViewer getExpandedState tViewer setExpandedState
public void perspective Activated I Workbench Page page I Perspective Descriptor perspective set Active page find View get Site get Id null update Objects show Editor For Current Selection if is Active f Context Listener update For Selection I Structured Selection get Viewer get Selection get First Element  perspectiveActivated IWorkbenchPage IPerspectiveDescriptor setActive findView getSite getId updateObjects showEditorForCurrentSelection isActive fContextListener updateForSelection IStructuredSelection getViewer getSelection getFirstElement
public void perspective Changed I Workbench Page page I Perspective Descriptor perspective String change Id set Active page find View get Site get Id null if f Context Listener null f Context Listener perspective Changed page change Id  perspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId setActive findView getSite getId fContextListener fContextListener perspectiveChanged changeId
public void perspective Changed I Workbench Page page I Perspective Descriptor perspective I Workbench Part Reference part Ref String change Id if f Context Listener null f Context Listener perspective Changed page part Ref change Id  perspectiveChanged IWorkbenchPage IPerspectiveDescriptor IWorkbenchPartReference partRef changeId fContextListener fContextListener perspectiveChanged partRef changeId
public void page Activated I Workbench Page page if get Site get Page equals page set Active true update Objects show Editor For Current Selection f Context Listener load Track Views  pageActivated IWorkbenchPage getSite getPage setActive updateObjects showEditorForCurrentSelection fContextListener loadTrackViews
see org eclipse ui I Page Listener page Closed org eclipse ui I Workbench Page public void page Closed I Workbench Page page  IPageListener pageClosed IWorkbenchPage pageClosed IWorkbenchPage
see org eclipse ui I Page Listener page Opened org eclipse ui I Workbench Page public void page Opened I Workbench Page page  IPageListener pageOpened IWorkbenchPage pageOpened IWorkbenchPage
Opens an editor for the current selection if it is a stack frame Otherwise nothing will happen protected void show Editor For Current Selection ensure this view is visible in the active page if is Active return I Selection selection get Viewer get Selection Object obj null if selection instanceof I Structured Selection obj I Structured Selection selection get First Element if obj instanceof I Stack Frame return open Editor For Stack Frame I Stack Frame obj  showEditorForCurrentSelection isActive ISelection getViewer getSelection IStructuredSelection IStructuredSelection getFirstElement IStackFrame openEditorForStackFrame IStackFrame
Translate to an editor input using the source presentation provided by the source locator or the default debug model presentation private void lookup Editor Input I Stack Frame stack Frame set Editor Id null set Editor Input null set Source Element null Object source Element null I Launch launch stack Frame get Launch if launch null return I Source Locator locator launch get Source Locator if locator null return source Element locator get Source Element stack Frame if source Element null if locator instanceof Abstract Source Lookup Director common Source Not Found stack Frame else source Not Found stack Frame return I Source Presentation presentation null if locator instanceof I Source Presentation presentation I Source Presentation locator else presentation get Presentation stack Frame get Model Identifier I Editor Input editor Input null String editor Id null if presentation null editor Input presentation get Editor Input source Element if editor Input null editor Id presentation get Editor Id editor Input source Element set Editor Input editor Input set Editor Id editor Id set Source Element source Element  lookupEditorInput IStackFrame stackFrame setEditorId setEditorInput setSourceElement sourceElement ILaunch stackFrame getLaunch ISourceLocator getSourceLocator sourceElement getSourceElement stackFrame sourceElement AbstractSourceLookupDirector commonSourceNotFound stackFrame sourceNotFound stackFrame ISourcePresentation ISourcePresentation ISourcePresentation getPresentation stackFrame getModelIdentifier IEditorInput editorInput editorId editorInput getEditorInput sourceElement editorInput editorId getEditorId editorInput sourceElement setEditorInput editorInput setEditorId editorId setSourceElement sourceElement
see org eclipse debug ui I Debug View get Presentation java lang String public I Debug Model Presentation get Presentation String id return Delegating Model Presentation f Editor Presentation get Presentation id  IDebugView getPresentation IDebugModelPresentation getPresentation DelegatingModelPresentation fEditorPresentation getPresentation
Sets editor id and input for the source not found editor private void source Not Found I Stack Frame frame set Editor Input new Source Not Found Editor Input frame set Editor Id I Internal DebugUI Constants ID SOURCE NOT FOUND EDITOR  sourceNotFound IStackFrame setEditorInput SourceNotFoundEditorInput setEditorId IInternalDebugUIConstants ID_SOURCE_NOT_FOUND_EDITOR
Sets editor id and input for the common source not found editor private void common Source Not Found I Stack Frame frame set Editor Input new Common Source Not Found Editor Input frame set Editor Id I Internal DebugUI Constants ID COMMON SOURCE NOT FOUND EDITOR  commonSourceNotFound IStackFrame setEditorInput CommonSourceNotFoundEditorInput setEditorId IInternalDebugUIConstants ID_COMMON_SOURCE_NOT_FOUND_EDITOR
Get the active window and open bring to the front an editor on the stack frame Selection is based on the line number OR the char start and end protected void open Editor For Stack Frame I Stack Frame stack Frame if f Showing Editor return try f Showing Editor true if stack Frame is Suspended return if stack Frame equals get Stack Frame if get Editor Input null get Editor Id null lookup Editor Input stack Frame else set Stack Frame stack Frame lookup Editor Input stack Frame if get Editor Input null get Editor Id null return I Editor Part editor open Editor if editor null return position and annotate editor for stack frame if f Editor Presentation add Annotations editor stack Frame Decoration decoration new Standard Decoration f Editor Presentation editor stack Frame get Thread Decoration Manager add Decoration decoration else if editor instanceof I Text Editor perform standard positioning and annotations I Text Editor text Editor I Text Editor editor position Editor text Editor stack Frame Instruction Pointer Manager get Default add Annotation text Editor stack Frame finally f Showing Editor false  openEditorForStackFrame IStackFrame stackFrame fShowingEditor fShowingEditor stackFrame isSuspended stackFrame getStackFrame getEditorInput getEditorId lookupEditorInput stackFrame setStackFrame stackFrame lookupEditorInput stackFrame getEditorInput getEditorId IEditorPart openEditor fEditorPresentation addAnnotations stackFrame StandardDecoration fEditorPresentation stackFrame getThread DecorationManager addDecoration ITextEditor ITextEditor textEditor ITextEditor positionEditor textEditor stackFrame InstructionPointerManager getDefault addAnnotation textEditor stackFrame fShowingEditor
Positions the text editor for the given stack frame private void position Editor I Text Editor editor I Stack Frame frame try int char Start frame get Char Start if char Start 0 editor select And Reveal char Start 0 return int line Number frame get Line Number line Number Document line numbers are 0 based Debug line numbers are 1 based I Region region get Line Information editor line Number if region null editor select And Reveal region get Offset 0 catch Debug Exception e  positionEditor ITextEditor IStackFrame charStart getCharStart charStart selectAndReveal charStart lineNumber getLineNumber lineNumber IRegion getLineInformation lineNumber selectAndReveal getOffset DebugException
Returns the line information for the given line in the given editor private I Region get Line Information I Text Editor editor int line Number I Document Provider provider editor get Document Provider I Editor Input input editor get Editor Input try provider connect input catch Core Exception e return null try I Document document provider get Document input if document null return document get Line Information line Number catch Bad Location Exception e finally provider disconnect input return null  IRegion getLineInformation ITextEditor lineNumber IDocumentProvider getDocumentProvider IEditorInput getEditorInput CoreException IDocument getDocument getLineInformation lineNumber BadLocationException
Opens the editor used to display the source for an element selected in this view and returns the editor that was opened or code null code if no editor could be opened private I Editor Part open Editor I Workbench Window window get Site get Workbench Window if window null return null I Workbench Page page window get Active Page if page null return null if f Editor Index 0 first restoration of editor re use I Editor Reference refs page get Editor References if f Editor Index refs length f Editor refs f Editor Index get Editor false f Editor Index 1 I Editor Part editor null I Editor Input input get Editor Input String id get Editor Id if input null id null return null if f Reuse Editor editor page get Active Editor if editor null The active editor is the one we want to reuse if editor get Editor Input equals input editor null if editor null Try to find the editor we want to reuse and activate it I Editor Reference refs page get Editor References for int i 0 i refs length i I Editor Part ref Editor refs i get Editor false if ref Editor null input equals ref Editor get Editor Input editor ref Editor page bring To Top editor break if editor null if f Editor null f Editor is Dirty page is Editor Pinned f Editor editor open Editor page input id f Editor editor else if f Editor instanceof I Reusable Editor f Editor get Site get Id equals id I Reusable Editor f Editor set Input input editor f Editor page bring To Top editor else editor open Editor page input id page close Editor f Editor false f Editor editor else Open a new editor editor open Editor page input id return editor  IEditorPart openEditor IWorkbenchWindow getSite getWorkbenchWindow IWorkbenchPage getActivePage fEditorIndex IEditorReference getEditorReferences fEditorIndex fEditor fEditorIndex getEditor fEditorIndex IEditorPart IEditorInput getEditorInput getEditorId fReuseEditor getActiveEditor getEditorInput IEditorReference getEditorReferences IEditorPart refEditor getEditor refEditor refEditor getEditorInput refEditor bringToTop fEditor fEditor isDirty isEditorPinned fEditor openEditor fEditor fEditor IReusableEditor fEditor getSite getId IReusableEditor fEditor setInput fEditor bringToTop openEditor closeEditor fEditor fEditor openEditor
Runnable r new Runnable public void run try editor 0 page open Editor input id false catch Part Init Exception e DebugUI Plugin error Dialog DebugUI Plugin get Shell DebugUI Views Messages get String Launch View Error 1 NON NLS 1 DebugUI Views Messages get String Launch View Exception occurred opening editor for debugger  2 NON NLS 1 e  openEditor PartInitException DebugUIPlugin errorDialog DebugUIPlugin getShell DebugUIViewsMessages getString LaunchView Error_1 DebugUIViewsMessages getString LaunchView Exception_occurred_opening_editor_for_debugger _2
Opens an editor in the workbench and returns the editor that was opened or code null code if an error occurred while attempting to open the editor private I Editor Part open Editor final I Workbench Page page final I Editor Input input final String id final I Editor Part editor new I Editor Part null Runnable r new Runnable public void run try editor 0 page open Editor input id false catch Part Init Exception e DebugUI Plugin error Dialog DebugUI Plugin get Shell DebugUI Views Messages get String Launch View Error 1 NON NLS 1 DebugUI Views Messages get String Launch View Exception occurred opening editor for debugger  2 NON NLS 1 e Busy Indicator show While DebugUI Plugin get Standard Display r return editor 0  IEditorPart openEditor IWorkbenchPage IEditorInput IEditorPart IEditorPart openEditor PartInitException DebugUIPlugin errorDialog DebugUIPlugin getShell DebugUIViewsMessages getString LaunchView Error_1 DebugUIViewsMessages getString LaunchView Exception_occurred_opening_editor_for_debugger _2 BusyIndicator showWhile DebugUIPlugin getStandardDisplay
Deselects any source decorations associated with the given thread or debug target param source thread or debug target public void clear Source Selection Object source if source instanceof I Thread I Thread thread I Thread source Decoration Manager remove Decorations thread Instruction Pointer Manager get Default remove Annotations thread else if source instanceof I Debug Target I Debug Target target I Debug Target source Decoration Manager remove Decorations target Instruction Pointer Manager get Default remove Annotations target  clearSourceSelection IThread IThread IThread DecorationManager removeDecorations InstructionPointerManager getDefault removeAnnotations IDebugTarget IDebugTarget IDebugTarget DecorationManager removeDecorations InstructionPointerManager getDefault removeAnnotations
protected void fill Context Menu I Menu Manager menu menu add new Separator I DebugUI Constants EMPTY EDIT GROUP menu add new Separator I DebugUI Constants EDIT GROUP menu add new Separator I DebugUI Constants EMPTY STEP GROUP menu add new Separator I DebugUI Constants STEP GROUP menu add new Group Marker I DebugUI Constants STEP INTO GROUP menu add new Group Marker I DebugUI Constants STEP OVER GROUP menu add new Group Marker I DebugUI Constants STEP RETURN GROUP menu add new Separator I DebugUI Constants RENDER GROUP menu add new Separator I DebugUI Constants EMPTY THREAD GROUP menu add new Separator I DebugUI Constants THREAD GROUP menu add new Separator I DebugUI Constants EMPTY LAUNCH GROUP menu add new Separator I DebugUI Constants LAUNCH GROUP I Structured Selection selection I Structured Selection get Site get Selection Provider get Selection update And Add menu f Edit Config Action selection update And Add menu f Add To Favorites Action selection update And Add menu f Edit Source Action selection update And Add menu f Lookup Action selection menu add new Separator I DebugUI Constants EMPTY RENDER GROUP menu add new Separator I DebugUI Constants RENDER GROUP menu add new Separator I DebugUI Constants PROPERTY GROUP Property Dialog Action action Property Dialog Action get Action Properties NON NLS 1 action set Enabled action is Applicable For Selection menu add action menu add new Separator I Workbench Action Constants MB ADDITIONS  fillContextMenu IMenuManager IDebugUIConstants EMPTY_EDIT_GROUP IDebugUIConstants EDIT_GROUP IDebugUIConstants EMPTY_STEP_GROUP IDebugUIConstants STEP_GROUP GroupMarker IDebugUIConstants STEP_INTO_GROUP GroupMarker IDebugUIConstants STEP_OVER_GROUP GroupMarker IDebugUIConstants STEP_RETURN_GROUP IDebugUIConstants RENDER_GROUP IDebugUIConstants EMPTY_THREAD_GROUP IDebugUIConstants THREAD_GROUP IDebugUIConstants EMPTY_LAUNCH_GROUP IDebugUIConstants LAUNCH_GROUP IStructuredSelection IStructuredSelection getSite getSelectionProvider getSelection updateAndAdd fEditConfigAction updateAndAdd fAddToFavoritesAction updateAndAdd fEditSourceAction updateAndAdd fLookupAction IDebugUIConstants EMPTY_RENDER_GROUP IDebugUIConstants RENDER_GROUP IDebugUIConstants PROPERTY_GROUP PropertyDialogAction PropertyDialogAction getAction setEnabled isApplicableForSelection IWorkbenchActionConstants MB_ADDITIONS
Updates the enablement of the given action based on the selection and addes to the menu iff enabled param menu menu to add the action to param action action to add if enabled param selection selection to update enablement private void update And Add I Menu Manager menu Selection Listener Action action I Structured Selection selection action selection Changed selection if action is Enabled menu add action  updateAndAdd IMenuManager SelectionListenerAction IStructuredSelection selectionChanged isEnabled
Auto expand and select the given element must be called in UI thread This is used to implement auto expansion and select on a SUSPEND event public void auto Expand Object element boolean refresh Needed boolean select Needed Object selectee element Object children null if element instanceof I Thread if refresh Needed refresh Needed thread Refresh Needed I Thread element try the top stack frame try selectee I Thread element get Top Stack Frame catch Debug Exception de if selectee null selectee element else if element instanceof I Launch I Debug Target dt I Launch element get Debug Target if dt null selectee dt try children dt get Threads catch Debug Exception de DebugUI Plugin log de else I Process processes I Launch element get Processes if processes length 0 selectee processes 0 if refresh Needed ensures that the child item exists in the viewer widget set selection only works if the child exists get Structured Viewer refresh element if select Needed get Viewer set Selection new Structured Selection selectee true if children null children length 0 reveal the thread children of a debug target get Structured Viewer reveal children 0  autoExpand refreshNeeded selectNeeded IThread refreshNeeded refreshNeeded threadRefreshNeeded IThread IThread getTopStackFrame DebugException ILaunch IDebugTarget ILaunch getDebugTarget getThreads DebugException DebugUIPlugin IProcess ILaunch getProcesses refreshNeeded getStructuredViewer selectNeeded getViewer setSelection StructuredSelection getStructuredViewer
Returns whether the given thread needs to be refreshed in the tree The tree needs to be refreshed if the underlying model objects I Stack Frame under the given thread differ from those currently displayed in the tree protected boolean thread Refresh Needed I Thread thread Launch Viewer viewer Launch Viewer get Structured Viewer I Launch launch thread get Launch Tree Item launches viewer get Tree get Items for int i 0 i launches length i if launches i get Data launch I Debug Target target thread get Debug Target Tree Item targets launches i get Items for int j 0 j targets length j if targets j get Data target Tree Item threads targets j get Items for int k 0 k threads length k if threads k get Data thread I Stack Frame frames null try frames thread get Stack Frames catch Debug Exception exception return true Tree Item tree Frames threads k get Items if frames length tree Frames length return true for int l 0 num Frames tree Frames length l num Frames l if tree Frames l get Data frames l return true break break break return false  IStackFrame threadRefreshNeeded IThread LaunchViewer LaunchViewer getStructuredViewer ILaunch getLaunch TreeItem getTree getItems getData IDebugTarget getDebugTarget TreeItem getItems getData TreeItem getItems getData IStackFrame getStackFrames DebugException TreeItem treeFrames getItems treeFrames numFrames treeFrames numFrames treeFrames getData
Returns the last stack frame that source was retrieved for Used to avoid source lookups for the same stack frame when stepping return stack frame or code null code protected I Stack Frame get Stack Frame return f Stack Frame  IStackFrame getStackFrame fStackFrame
Sets the last stack frame that source was retrieved for Used to avoid source lookups for the same stack frame when stepping Setting the stack frame to code null code effectively forces a source lookup param frame The stack frame or code null code protected void set Stack Frame I Stack Frame frame f Stack Frame frame  setStackFrame IStackFrame fStackFrame
Sets the editor input that was resolved for the source display param editor Input editor input private void set Editor Input I Editor Input editor Input f Editor Input editor Input  editorInput setEditorInput IEditorInput editorInput fEditorInput editorInput
Returns the editor input that was resolved for the source display return editor input protected I Editor Input get Editor Input return f Editor Input  IEditorInput getEditorInput fEditorInput
Sets the id of the editor opened when displaying source param editor Id editor id private void set Editor Id String editor Id f Editor Id editor Id  editorId setEditorId editorId fEditorId editorId
Returns the id of the editor opened when displaying source return editor id protected String get Editor Id return f Editor Id  getEditorId fEditorId
Sets the current source element possibly code null code param source Element private void set Source Element Object source Element f Source Element source Element  sourceElement setSourceElement sourceElement fSourceElement sourceElement
Returns the current source element possibly code null code return Object protected Object get Source Element return f Source Element  getSourceElement fSourceElement
Sets whether this view is in the active page of a perspective Since a page can have more than one perspective this view only show s source when in the active perspective page param active whether this view is in the active page of a perspective protected void set Active boolean active f Is Active active  setActive fIsActive
Returns whether this view is in the active page of the active perspective and has been fully created return whether this view is in the active page of the active perspective and has been fully created protected boolean is Active return f Is Active get Viewer null  isActive fIsActive getViewer
public void property Change Property Change Event event String property event get Property if property equals I DebugUI Constants PREF REUSE EDITOR f Reuse Editor DebugUI Plugin get Default get Preference Store get Boolean I DebugUI Constants PREF REUSE EDITOR else if property equals I DebugUI Constants PREF MANAGE VIEW PERSPECTIVES f Context Listener reload Auto Manage Perspectives I Structured Selection get Viewer get Selection get First Element else if property equals Launch View Context Listener PREF OPENED VIEWS f Context Listener null f Context Listener load Opened Views else if property equals Launch View Context Listener PREF VIEWS TO NOT OPEN f Context Listener null f Context Listener load Views To Not Open else if property equals I Internal DebugUI Constants PREF TRACK VIEWS f Context Listener null f Context Listener load Track Views  propertyChange PropertyChangeEvent getProperty IDebugUIConstants PREF_REUSE_EDITOR fReuseEditor DebugUIPlugin getDefault getPreferenceStore getBoolean IDebugUIConstants PREF_REUSE_EDITOR IDebugUIConstants PREF_MANAGE_VIEW_PERSPECTIVES fContextListener reloadAutoManagePerspectives IStructuredSelection getViewer getSelection getFirstElement LaunchViewContextListener PREF_OPENED_VIEWS fContextListener fContextListener loadOpenedViews LaunchViewContextListener PREF_VIEWS_TO_NOT_OPEN fContextListener fContextListener loadViewsToNotOpen IInternalDebugUIConstants PREF_TRACK_VIEWS fContextListener fContextListener loadTrackViews
public void save State I Memento memento super save State memento if f Reuse Editor f Editor null I Workbench Window dwindow get Site get Workbench Window if dwindow null return I Workbench Page page dwindow get Active Page if page null return I Editor Reference refs page get Editor References int index 1 for int i 0 i refs length i if f Editor equals refs i get Editor false index i break if index 0 memento put String I DebugUI Constants PREF REUSE EDITOR Integer to String index  saveState IMemento saveState fReuseEditor fEditor IWorkbenchWindow getSite getWorkbenchWindow IWorkbenchPage getActivePage IEditorReference getEditorReferences fEditor getEditor putString IDebugUIConstants PREF_REUSE_EDITOR toString
public boolean visit I Resource Delta delta if delta null return false I Resource resource delta get Resource if 0 delta get Flags I Resource Delta OPEN if resource instanceof I Project I Project project I Project resource if project is Open clear cleanup return false return resource instanceof I Workspace Root  IResourceDelta IResource getResource getFlags IResourceDelta IProject IProject IProject isOpen IWorkspaceRoot
public void resource Changed I Resource Change Event event I Resource Delta delta event get Delta if delta null try delta accept get Visitor catch Core Exception e DebugUI Plugin log e  resourceChanged IResourceChangeEvent IResourceDelta getDelta getVisitor CoreException DebugUIPlugin
Returns the resource delta visitor for this view creating if required return resource delta visitor protected I Resource Delta Visitor get Visitor if f Visitor null f Visitor new Launch View Visitor return f Visitor  IResourceDeltaVisitor getVisitor fVisitor fVisitor LaunchViewVisitor fVisitor
When this view becomes visible selects the last stack frame whose location was revealed see org eclipse debug ui Abstract Debug View becomes Visible protected void becomes Visible super becomes Visible I Structured Selection selection I Structured Selection get Viewer get Selection if selection is Empty selection get First Element equals get Stack Frame initialize Selection  AbstractDebugView becomesVisible becomesVisible becomesVisible IStructuredSelection IStructuredSelection getViewer getSelection isEmpty getFirstElement getStackFrame initializeSelection
public boolean show Show In Context context I Selection selection context get Selection if selection null if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection if ss size 1 Object obj ss get First Element if obj instanceof I Debug Target obj instanceof I Process get Viewer set Selection selection true return true return false  ShowInContext ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement IDebugTarget IProcess getViewer setSelection
public Show In Context get Show In Context if is Active I Structured Selection selection I Structured Selection get Viewer get Selection if selection is Empty Object source Element get Source Element if source Element instanceof I Adaptable if I Adaptable source Element get Adapter I Resource class null return new Show In Context null new Structured Selection get Source Element return null  ShowInContext getShowInContext isActive IStructuredSelection IStructuredSelection getViewer getSelection isEmpty sourceElement getSourceElement sourceElement IAdaptable IAdaptable sourceElement getAdapter IResource ShowInContext StructuredSelection getSourceElement
see org eclipse ui part I Show In Target List get Show In Target Ids public String get Show In Target Ids return new String I Page Layout ID RES NAV  IShowInTargetList getShowInTargetIds getShowInTargetIds IPageLayout ID_RES_NAV
public void part Closed I Workbench Part Reference part Ref I Workbench Part part part Ref get Part false if part null part equals f Editor f Editor null  partClosed IWorkbenchPartReference partRef IWorkbenchPart partRef getPart fEditor fEditor
public void part Visible I Workbench Part Reference part Ref I Workbench Part part part Ref get Part false if part this set Active true TODO Workaround for Bug 63332 Reexamine after M9 update Context Listener When the launch view becomes visible turn on the debug action set Note that the workbench will handle the case where the user really doesn t want the action set enabled show Action Set String will do nothing for an action set that s been manually disabled get Site get Page show Action Set I DebugUI Constants DEBUG ACTION SET  partVisible IWorkbenchPartReference partRef IWorkbenchPart partRef getPart setActive updateContextListener showActionSet getSite getPage showActionSet IDebugUIConstants DEBUG_ACTION_SET
public void part Opened I Workbench Part Reference part Ref I Workbench Part part part Ref get Part false if part this f Context Listener new Launch View Context Listener Launch View this  partOpened IWorkbenchPartReference partRef IWorkbenchPart partRef getPart fContextListener LaunchViewContextListener LaunchView
see org eclipse ui I Part Listener2 part Activated org eclipse ui I Workbench Part Reference public void part Activated I Workbench Part Reference part Ref  IPartListener2 partActivated IWorkbenchPartReference partActivated IWorkbenchPartReference partRef
see org eclipse ui I Part Listener2 part Brought To Top org eclipse ui I Workbench Part Reference public void part Brought To Top I Workbench Part Reference part Ref  IPartListener2 partBroughtToTop IWorkbenchPartReference partBroughtToTop IWorkbenchPartReference partRef
see org eclipse ui I Part Listener2 part Deactivated org eclipse ui I Workbench Part Reference public void part Deactivated I Workbench Part Reference part Ref  IPartListener2 partDeactivated IWorkbenchPartReference partDeactivated IWorkbenchPartReference partRef
see org eclipse ui I Part Listener2 part Hidden org eclipse ui I Workbench Part Reference public void part Hidden I Workbench Part Reference part Ref  IPartListener2 partHidden IWorkbenchPartReference partHidden IWorkbenchPartReference partRef
see org eclipse ui I Part Listener2 part Input Changed org eclipse ui I Workbench Part Reference public void part Input Changed I Workbench Part Reference part Ref  IPartListener2 partInputChanged IWorkbenchPartReference partInputChanged IWorkbenchPartReference partRef

see I Tree Content Provider get Children Object public Object get Children Object parent try if parent instanceof I Debug Target return I Debug Target parent get Threads if parent instanceof I Thread return I Thread parent get Stack Frames catch Debug Exception e DebugUI Plugin log e if parent instanceof I Launch return I Launch parent get Children if parent instanceof I Launch Manager return I Launch Manager parent get Launches return new Object 0  ITreeContentProvider getChildren getChildren IDebugTarget IDebugTarget getThreads IThread IThread getStackFrames DebugException DebugUIPlugin ILaunch ILaunch getChildren ILaunchManager ILaunchManager getLaunches
see I Tree Content Provider get Parent Object public Object get Parent Object element if element instanceof I Stack Frame return I Stack Frame element get Thread if element instanceof I Thread return I Thread element get Debug Target if element instanceof I Debug Target return I Debug Element element get Launch if element instanceof I Process return I Process element get Launch if element instanceof I Launch return Debug Plugin get Default get Launch Manager return null  ITreeContentProvider getParent getParent IStackFrame IStackFrame getThread IThread IThread getDebugTarget IDebugTarget IDebugElement getLaunch IProcess IProcess getLaunch ILaunch DebugPlugin getDefault getLaunchManager
see I Tree Content Provider has Children Object public boolean has Children Object element if element instanceof I Stack Frame return false if element instanceof I Debug Target try return I Debug Target element has Threads catch Debug Exception e return false if element instanceof I Thread try return I Thread element has Stack Frames catch Debug Exception e return false if element instanceof I Process return false if element instanceof I Launch return I Launch element has Children if element instanceof I Launch Manager return I Launch Manager element get Launches length 0 return false  ITreeContentProvider hasChildren hasChildren IStackFrame IDebugTarget IDebugTarget hasThreads DebugException IThread IThread hasStackFrames DebugException IProcess ILaunch ILaunch hasChildren ILaunchManager ILaunchManager getLaunches
see I Structured Content Provider get Elements Object public Object get Elements Object input Element return get Children input Element  IStructuredContentProvider getElements getElements inputElement getChildren inputElement
Nothing to dispose see I Content Provider dispose public void dispose  IContentProvider
see I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput

Creates a fully initialized context listener param view a fully initialized launch view public Launch View Context Listener Launch View view launch View view load Track Views load Debug Model Context Extensions load Debug Model Activity Extensions load Context To View Extensions true load Opened Views load Views To Not Open load Auto Manage Perspectives PlatformUI get Workbench get Context Support get Context Manager add Context Manager Listener this  LaunchViewContextListener LaunchView launchView loadTrackViews loadDebugModelContextExtensions loadDebugModelActivityExtensions loadContextToViewExtensions loadOpenedViews loadViewsToNotOpen loadAutoManagePerspectives getWorkbench getContextSupport getContextManager addContextManagerListener
Loads extensions which map context ids to views This information is used to open the appropriate views when a context is activated private void load Context To View Extensions boolean reload Context Mappings I Extension Point extension Point Platform get Extension Registry get Extension Point DebugUI Plugin get Unique Identifier ID CONTEXT VIEW BINDINGS I Configuration Element configuration Elements extension Point get Configuration Elements for int i 0 i configuration Elements length i I Configuration Element element configuration Elements i String view Id get View Id element if reload Context Mappings String context Id element get Attribute ATTR CONTEXT ID if context Id null view Id null continue List elements List context Views get context Id if elements null elements new Array List context Views put context Id elements elements add element managed View Ids add view Id  loadContextToViewExtensions reloadContextMappings IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugUIPlugin getUniqueIdentifier ID_CONTEXT_VIEW_BINDINGS IConfigurationElement configurationElements extensionPoint getConfigurationElements configurationElements IConfigurationElement configurationElements viewId getViewId reloadContextMappings contextId getAttribute ATTR_CONTEXT_ID contextId viewId contextViews contextId ArrayList contextViews contextId managedViewIds viewId
Loads the extensions which map debug model identifiers to context ids This information is used to activate the appropriate context when a debug element is selected When a context associated with a debug model is enabled we also activate all parent contexts Since the context manager does not do this automatically we cache all parent context identifiers in the model To Contexts map as well private void load Debug Model Context Extensions I Extension Point extension Point Platform get Extension Registry get Extension Point DebugUI Plugin get Unique Identifier ID DEBUG MODEL CONTEXT BINDINGS I Configuration Element configuration Elements extension Point get Configuration Elements for int i 0 i configuration Elements length i I Configuration Element element configuration Elements i String model Identifier element get Attribute ATTR DEBUG MODEL ID String context Id element get Attribute ATTR CONTEXT ID if model Identifier null context Id null List context Ids List models To Contexts get model Identifier if context Ids null context Ids new Array List models To Contexts put model Identifier context Ids context Ids add context Id  modelToContexts loadDebugModelContextExtensions IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint DebugUIPlugin getUniqueIdentifier ID_DEBUG_MODEL_CONTEXT_BINDINGS IConfigurationElement configurationElements extensionPoint getConfigurationElements configurationElements IConfigurationElement configurationElements modelIdentifier getAttribute ATTR_DEBUG_MODEL_ID contextId getAttribute ATTR_CONTEXT_ID modelIdentifier contextId contextIds modelsToContexts modelIdentifier contextIds contextIds ArrayList modelsToContexts modelIdentifier contextIds contextIds contextId
Loads the extensions which map debug model identifiers to activity ids This information is used to activate the appropriate activities when a debug element is selected private void load Debug Model Activity Extensions I Activity Manager activity Manager PlatformUI get Workbench get Activity Support get Activity Manager Set activity Ids activity Manager get Defined Activity Ids Iterator activity Iterator activity Ids iterator while activity Iterator has Next String activity Id String activity Iterator next I Activity activity activity Manager get Activity activity Id if activity null Set pattern Bindings activity get Activity Pattern Bindings Iterator pattern Iterator pattern Bindings iterator while pattern Iterator has Next I Activity Pattern Binding pattern Binding I Activity Pattern Binding pattern Iterator next String pattern pattern Binding get Pattern pattern int index pattern last Index Of DEBUG MODEL ACTIVITY SUFFIX if index 0 String debug Model pattern substring 0 index 1 List ids List models To Activities get debug Model if ids null ids new Array List models To Activities put debug Model ids ids add activity Id  loadDebugModelActivityExtensions IActivityManager activityManager getWorkbench getActivitySupport getActivityManager activityIds activityManager getDefinedActivityIds activityIterator activityIds activityIterator hasNext activityId activityIterator IActivity activityManager getActivity activityId patternBindings getActivityPatternBindings patternIterator patternBindings patternIterator hasNext IActivityPatternBinding patternBinding IActivityPatternBinding patternIterator patternBinding getPattern lastIndexOf DEBUG_MODEL_ACTIVITY_SUFFIX debugModel modelsToActivities debugModel ArrayList modelsToActivities debugModel activityId
Lists the context Views configuration elements for the given context ID and all its parent context I Ds The list only contains one configuration element per view such that if a child context provides a binding for a view it will override any bindings provided for that same view by parent contexts param context Id the context ID return the configuration elements for the given context ID and all parent context I Ds private List get Configuration Elements String context Id Collection of view ids for which configuration elements have been found List configured View Ids new Array List List all Configuration Elements new Array List I Context Manager context Manager PlatformUI get Workbench get Context Support get Context Manager while context Id null List configuration Elements List context Views get context Id if configuration Elements null List Iterator iter configuration Elements list Iterator while iter has Next Remove any configuration elements for views that are already bound by a configuration element This allows child contexts to override parent bindings I Configuration Element element I Configuration Element iter next String view Id element get Attribute ATTR VIEW ID if view Id null if configured View Ids contains view Id iter remove configured View Ids add view Id all Configuration Elements add All configuration Elements I Context context context Manager get Context context Id if context null try context Id context get Parent Id catch Not Defined Exception e context Id null return all Configuration Elements  contextViews IDs contextId IDs getConfigurationElements contextId configuredViewIds ArrayList allConfigurationElements ArrayList IContextManager contextManager getWorkbench getContextSupport getContextManager contextId configurationElements contextViews contextId configurationElements ListIterator configurationElements listIterator hasNext IConfigurationElement IConfigurationElement viewId getAttribute ATTR_VIEW_ID viewId configuredViewIds viewId configuredViewIds viewId allConfigurationElements addAll configurationElements IContext contextManager getContext contextId contextId getParentId NotDefinedException contextId allConfigurationElements
Persist the collection of views to not automatically open private void save Views To Not Open save View Collection Launch View Context Listener PREF VIEWS TO NOT OPEN view Ids To Not Open  saveViewsToNotOpen saveViewCollection LaunchViewContextListener PREF_VIEWS_TO_NOT_OPEN viewIdsToNotOpen
Persist the collection of views which have been automatically opened private void save Opened Views save View Collection Launch View Context Listener PREF OPENED VIEWS opened View Ids  saveOpenedViews saveViewCollection LaunchViewContextListener PREF_OPENED_VIEWS openedViewIds
Persist the view identifiers that the user has manually opened closed so that we continue to not automatically open close them param attribute the preference key in which to store the view id collection param collection the view identifier collection public void save View Collection String attribute Set collection String Buffer views new String Buffer Iterator iter collection iterator while iter has Next views append String iter next append if views length 0 I Preference Store preference Store DebugUI Tools get Preference Store preference Store remove Property Change Listener launch View preference Store set Value attribute views to String preference Store add Property Change Listener launch View  saveViewCollection StringBuffer StringBuffer hasNext IPreferenceStore preferenceStore DebugUITools getPreferenceStore preferenceStore removePropertyChangeListener launchView preferenceStore setValue toString preferenceStore addPropertyChangeListener launchView
Load the collection of views to not open public void load Views To Not Open load View Collection ATTR VIEWS TO NOT OPEN view Ids To Not Open  loadViewsToNotOpen loadViewCollection ATTR_VIEWS_TO_NOT_OPEN viewIdsToNotOpen
Load the collection of views that have been automatically opened public void load Opened Views load View Collection ATTR OPENED VIEWS opened View Ids  loadOpenedViews loadViewCollection ATTR_OPENED_VIEWS openedViewIds
Loads a collection of view ids from the preferences keyed to the given attribute and stores them in the given collection param attribute the attribute of the view ids param collection the collection to store the view ids into public void load View Collection String attribute Set collection collection clear String views DebugUI Tools get Preference Store get String attribute int start Index 0 int end Index views index Of if end Index 1 end Index views length while start Index views length 1 String view Id views substring start Index end Index if view Id length 0 collection add view Id start Index end Index 1 end Index views index Of start Index  loadViewCollection DebugUITools getPreferenceStore getString startIndex endIndex indexOf endIndex endIndex startIndex viewId startIndex endIndex viewId viewId startIndex endIndex endIndex indexOf startIndex
public void context Manager Changed Context Manager Event context Manager Event Set enabled get Newly Enabled Contexts context Manager Event Set disabled get Newly Disabled Contexts context Manager Event context Enabled enabled contexts Disabled disabled  contextManagerChanged ContextManagerEvent contextManagerEvent getNewlyEnabledContexts contextManagerEvent getNewlyDisabledContexts contextManagerEvent contextEnabled contextsDisabled
private Set get Newly Enabled Contexts Context Manager Event context Manager Event Set set new Hash Set context Manager Event get Context Manager get Enabled Context Ids set remove All context Manager Event get Previously Enabled Context Ids return set  getNewlyEnabledContexts ContextManagerEvent contextManagerEvent HashSet contextManagerEvent getContextManager getEnabledContextIds removeAll contextManagerEvent getPreviouslyEnabledContextIds
private Set get Newly Disabled Contexts Context Manager Event context Manager Event Set set new Hash Set context Manager Event get Previously Enabled Context Ids set remove All context Manager Event get Context Manager get Enabled Context Ids return set  getNewlyDisabledContexts ContextManagerEvent contextManagerEvent HashSet contextManagerEvent getPreviouslyEnabledContextIds removeAll contextManagerEvent getContextManager getEnabledContextIds
The context with the given ID has been enabled Activate the appropriate views param context Id the ID of the context that has been enabled public void context Enabled Set context Ids if is Auto Manage Views return I Workbench Page page get Page We ignore the Debugging context since we use it to provide a base set of views for other context bindings to inherit If we don t ignore it we ll end up opening those views whenever a debug session starts which is not the desired behavior context Ids remove DEBUG CONTEXT if page null context Ids size 0 return Set views To Show new Hash Set Set views To Open new Hash Set compute View Activation context Ids views To Open views To Show f Is Tracking Part Changes false Iterator iterator views To Open iterator while iterator has Next String view Id String iterator next try I View Part view page show View view Id null I Workbench Page VIEW CREATE opened View Ids add view get View Site get Id views To Show add view catch Part Init Exception e DebugUI Plugin log e get Status if views To Open is Empty save Opened Views iterator views To Show iterator while iterator has Next boolean activate true I View Part view I View Part iterator next I View Part stacked Views page get View Stack view if stacked Views null continue For each applicable view iterate through the view stack If we find that view before any other applicable views show it Otherwise don t for int i 0 i stacked Views length i I View Part stacked View stacked Views i if view stacked View break else if views To Show contains stacked View If this view is below an appropriate view don t show it activate false break if activate page bring To Top view load Track Views  contextId contextEnabled contextIds isAutoManageViews IWorkbenchPage getPage contextIds DEBUG_CONTEXT contextIds viewsToShow HashSet viewsToOpen HashSet computeViewActivation contextIds viewsToOpen viewsToShow fIsTrackingPartChanges viewsToOpen hasNext viewId IViewPart showView viewId IWorkbenchPage VIEW_CREATE openedViewIds getViewSite getId viewsToShow PartInitException DebugUIPlugin getStatus viewsToOpen isEmpty saveOpenedViews viewsToShow hasNext IViewPart IViewPart IViewPart stackedViews getViewStack stackedViews stackedViews IViewPart stackedView stackedViews stackedView viewsToShow stackedView bringToTop loadTrackViews
Compute which views should be automatically opened and which should be automatically brought to top when the given contexts are enabled param context Ids the contexts that have been enabled param view Ids To Open a Set into which this method can store the collection of view identifiers String that should be opened param view Ids Show a Set into which this method can store the collection of view identifiers String that should be brought to top private void compute View Activation Set context Ids Set view Ids To Open Set view Ids Show I Workbench Page page get Page if page null return Iterator contexts context Ids iterator while contexts has Next String context Id String contexts next Iterator configuration Elements get Configuration Elements context Id iterator while configuration Elements has Next I Configuration Element element I Configuration Element configuration Elements next String view Id get View Id element if view Id null continue I View Reference reference page find View Reference view Id if reference null reference is Fast View continue I View Part view page find View view Id if view null view Ids Show add view else if is Auto Open element view Ids To Not Open contains view Id Don t open automatically if specified not to view Ids To Open add view Id  contextIds viewIdsToOpen viewIdsShow computeViewActivation contextIds viewIdsToOpen viewIdsShow IWorkbenchPage getPage contextIds hasNext contextId configurationElements getConfigurationElements contextId configurationElements hasNext IConfigurationElement IConfigurationElement configurationElements viewId getViewId viewId IViewReference findViewReference viewId isFastView IViewPart findView viewId viewIdsShow isAutoOpen viewIdsToNotOpen viewId viewIdsToOpen viewId
The given contexts have been disabled Close all views associated with these contexts that aren t associated with other active contexts param contexts public void contexts Disabled Set contexts I Workbench Page page get Page if page null contexts size 0 is Auto Manage Views return Set views To Close get View Ids To Close contexts if views To Close is Empty return f Is Tracking Part Changes false Iterator iter views To Close iterator while iter has Next String view Id String iter next I View Reference view page find View Reference view Id if view null page hide View view opened View Ids remove view Id save Opened Views load Track Views  contextsDisabled IWorkbenchPage getPage isAutoManageViews viewsToClose getViewIdsToClose viewsToClose isEmpty fIsTrackingPartChanges viewsToClose hasNext viewId IViewReference findViewReference viewId hideView openedViewIds viewId saveOpenedViews loadTrackViews
Returns a collection of view I Ds which should be closed when the given context I Ds are disabled param context Ids the context identifiers return the identifiers of the views which should be closed when the given contexts disable public Set get View Ids To Close Set context Ids Set view Ids To Close new Hash Set Set view Ids To Keep Open get View Ids For Enabled Contexts Iterator contexts context Ids iterator while contexts has Next String context Id String contexts next List list get Configuration Elements context Id Iterator iter list iterator while iter has Next I Configuration Element element I Configuration Element iter next if is Auto Close element continue String view Id get View Id element if view Id null opened View Ids contains view Id view Ids To Keep Open contains view Id Don t close views that the user has manually opened or views which are associated with contexts that are still enabled continue view Ids To Close add view Id return view Ids To Close  IDs IDs contextIds getViewIdsToClose contextIds viewIdsToClose HashSet viewIdsToKeepOpen getViewIdsForEnabledContexts contextIds hasNext contextId getConfigurationElements contextId hasNext IConfigurationElement IConfigurationElement isAutoClose viewId getViewId viewId openedViewIds viewId viewIdsToKeepOpen viewId viewIdsToClose viewId viewIdsToClose
Returns the set of view identifiers that are bound to contexts which are enabled in the workbench return the set of view identifiers bound to enabled contexts protected Set get View Ids For Enabled Contexts Set view Ids new Hash Set Iterator enabled Contexts PlatformUI get Workbench get Context Support get Context Manager get Enabled Context Ids iterator while enabled Contexts has Next String context Id String enabled Contexts next if context Id equals DEBUG CONTEXT Ignore the Debugging context See comment in context Enabled continue view Ids add All get Applicable View Ids context Id return view Ids  getViewIdsForEnabledContexts viewIds HashSet enabledContexts getWorkbench getContextSupport getContextManager getEnabledContextIds enabledContexts hasNext contextId enabledContexts contextId DEBUG_CONTEXT contextEnabled viewIds addAll getApplicableViewIds contextId viewIds
Returns the set of view identifiers that are bound to the given context param context Id the context identifier return the set of view identifiers bound to the given context public Set get Applicable View Ids String context Id Set view Ids new Hash Set Iterator elements get Configuration Elements context Id iterator while elements has Next String view Id get View Id I Configuration Element elements next if view Id null view Ids add view Id return view Ids  contextId getApplicableViewIds contextId viewIds HashSet getConfigurationElements contextId hasNext viewId getViewId IConfigurationElement viewId viewIds viewId viewIds
Determines the debug context associated with the selected stack frame s debug model if any and activates that context This triggers this view s context listener to automatically open close activate views as appropriate public void update For Selection Object selection I Launch launch get Launch selection if launch null return String model Ids get Debug Model Ids For Selection selection enable Contexts get Contexts For Models model Ids launch enable Activities get Activities For Models model Ids  updateForSelection ILaunch getLaunch modelIds getDebugModelIdsForSelection enableContexts getContextsForModels modelIds enableActivities getActivitiesForModels modelIds
Returns the I Launch associated with the given selection or code null code if none can be determined param selection the selection or code null code return the I Launch associated with the given selection or code null code protected static I Launch get Launch Object selection I Launch launch null if selection instanceof I Launch launch I Launch selection else if selection instanceof I Debug Element launch I Debug Element selection get Launch else if selection instanceof I Process launch I Process selection get Launch return launch  ILaunch ILaunch ILaunch getLaunch ILaunch ILaunch ILaunch IDebugElement IDebugElement getLaunch IProcess IProcess getLaunch
Returns the debug model identifiers associated with the given selection param selection the selection return the debug model identifiers associated with the given selection protected String get Debug Model Ids For Selection Object selection if selection instanceof I Adaptable I Debug Model Provider model Provider I Debug Model Provider Platform get Adapter Manager get Adapter selection I Debug Model Provider class if model Provider null String model Ids model Provider get Model Identifiers if model Ids null return model Ids if selection instanceof I Stack Frame return new String I Stack Frame selection get Model Identifier return new String 0  getDebugModelIdsForSelection IAdaptable IDebugModelProvider modelProvider IDebugModelProvider getAdapterManager getAdapter IDebugModelProvider modelProvider modelIds modelProvider getModelIdentifiers modelIds modelIds IStackFrame IStackFrame getModelIdentifier
Returns the activity identifiers associated with the given model identifiers param model Ids the model identifiers return the activities associated with the given model identifiers protected List get Activities For Models String model Ids List activity Ids new Array List for int i 0 i model Ids length i List ids List models To Activities get model Ids i if ids null activity Ids add All ids return activity Ids  modelIds getActivitiesForModels modelIds activityIds ArrayList modelIds modelsToActivities modelIds activityIds addAll activityIds
Returns the context identifiers associated with the given model identifiers param model Ids the model identifiers return the contexts associated with the given model identifiers protected List get Contexts For Models String model Ids List context Ids new Array List for int i 0 i model Ids length i List ids List models To Contexts get model Ids i if ids null seed with base debug context ids new Array List ids add DEBUG CONTEXT models To Contexts put model Ids i ids context Ids add All ids return context Ids  modelIds getContextsForModels modelIds contextIds ArrayList modelIds modelsToContexts modelIds ArrayList DEBUG_CONTEXT modelsToContexts modelIds contextIds addAll contextIds
Enables the given activities in the workbench param activity Ids the activities to enable protected void enable Activities List activity Ids I Workbench Activity Support activity Support PlatformUI get Workbench get Activity Support Set enabled Ids activity Support get Activity Manager get Enabled Activity Ids Set ids To Enable new Hash Set Iterator iter activity Ids iterator while iter has Next ids To Enable add iter next if ids To Enable is Empty ids To Enable add All enabled Ids activity Support set Enabled Activity Ids ids To Enable  activityIds enableActivities activityIds IWorkbenchActivitySupport activitySupport getWorkbench getActivitySupport enabledIds activitySupport getActivityManager getEnabledActivityIds idsToEnable HashSet activityIds hasNext idsToEnable idsToEnable isEmpty idsToEnable addAll enabledIds activitySupport setEnabledActivityIds idsToEnable
Enable the given contexts for the given launch Context I Ds which are not currently enabled in the workbench will be submitted to the workbench Simulate a context enablement callback by calling context Activated for contexts that are already enabled so that their views can be promoted param context Ids the contexts to enable param launch the launch for which the contexts are being enabled protected void enable Contexts List context Ids I Launch launch if context Ids is Empty return Set enabled Contexts PlatformUI get Workbench get Context Support get Context Manager get Enabled Context Ids Set contexts Already Enabled new Hash Set Iterator iter context Ids iterator while iter has Next String context Id String iter next if enabled Contexts contains context Id last Enabled Ids contains context Id If a context is already enabled submitting it won t generate a callback from the workbench So we inform our context listener ourselves This covers the case where the user is selecting among elements from several enabled contexts contexts Already Enabled add context Id last Enabled Ids clear last Enabled Ids add All context Ids submit Contexts context Ids launch context Enabled contexts Already Enabled  IDs contextActivated contextIds enableContexts contextIds ILaunch contextIds isEmpty enabledContexts getWorkbench getContextSupport getContextManager getEnabledContextIds contextsAlreadyEnabled HashSet contextIds hasNext contextId enabledContexts contextId lastEnabledIds contextId contextsAlreadyEnabled contextId lastEnabledIds lastEnabledIds addAll contextIds submitContexts contextIds contextEnabled contextsAlreadyEnabled
Submits the given context I Ds to the workbench context support on behalf of the given launch When the launch terminates the context submissions will be automatically removed param context Ids the contexts to submit param launch the launch for which the contexts are being submitted protected void submit Contexts List context Ids I Launch launch List submissions List f Context Submissions get launch if submissions null submissions new Array List f Context Submissions put launch submissions List new Submissions new Array List Iterator iter context Ids iterator while iter has Next new Submissions add new Enabled Submission null null null String iter next I Workbench Context Support context Support PlatformUI get Workbench get Context Support if new Submissions is Empty context Support add Enabled Submissions new Submissions After adding the new submissions remove any old submissions that exist for the same context I Ds This prevents us from building up a ton of redundant submissions List submissions To Remove new Array List List Iterator old Submissions submissions list Iterator while old Submissions has Next Enabled Submission old Submission Enabled Submission old Submissions next String context Id old Submission get Context Id if context Ids contains context Id old Submissions remove submissions To Remove add old Submission context Support remove Enabled Submissions submissions To Remove submissions add All new Submissions  IDs contextIds submitContexts contextIds ILaunch fContextSubmissions ArrayList fContextSubmissions newSubmissions ArrayList contextIds hasNext newSubmissions EnabledSubmission IWorkbenchContextSupport contextSupport getWorkbench getContextSupport newSubmissions isEmpty contextSupport addEnabledSubmissions newSubmissions IDs submissionsToRemove ArrayList ListIterator oldSubmissions listIterator oldSubmissions hasNext EnabledSubmission oldSubmission EnabledSubmission oldSubmissions contextId oldSubmission getContextId contextIds contextId oldSubmissions submissionsToRemove oldSubmission contextSupport removeEnabledSubmissions submissionsToRemove addAll newSubmissions
Notifies this view that the given launches have terminated When a launch terminates remove all context submissions associated with it param launches the terminated launches protected void launches Terminated I Launch launches List all Submissions new Array List for int i 0 i launches length i List submissions List f Context Submissions remove launches i if submissions null all Submissions add All submissions PlatformUI get Workbench get Context Support remove Enabled Submissions all Submissions  launchesTerminated ILaunch allSubmissions ArrayList fContextSubmissions allSubmissions addAll getWorkbench getContextSupport removeEnabledSubmissions allSubmissions
Returns the view identifier associated with the given extension element or code null code if none param element the context View Binding extension element return the view identifier associated with the given element or code null code public static String get View Id I Configuration Element element return element get Attribute ATTR VIEW ID  contextViewBinding getViewId IConfigurationElement getAttribute ATTR_VIEW_ID
Returns whether the given configuration element is configured for automatic view opening The element s view should be automatically opened if the auto Open element is specified as true or if the auto Open element is unspecified param element the context View Binding extension element return whether or not given given configuration element s view should be automatically opened public static boolean is Auto Open I Configuration Element element String auto Open element get Attribute ATTR AUTO OPEN return auto Open null Boolean value Of auto Open boolean Value  autoOpen autoOpen contextViewBinding isAutoOpen IConfigurationElement autoOpen getAttribute ATTR_AUTO_OPEN autoOpen valueOf autoOpen booleanValue
Returns whether the given configuration element is configured for automatic view closure The element s view should be automatically close if the auto Close element is specified as true or if the auto Close element is unspecified param element the context View Binding extension element return whether or not given given configuration element s view should be automatically closed public static boolean is Auto Close I Configuration Element element String auto Close element get Attribute ATTR AUTO CLOSE return auto Close null Boolean value Of auto Close boolean Value  autoClose autoClose contextViewBinding isAutoClose IConfigurationElement autoClose getAttribute ATTR_AUTO_CLOSE autoClose valueOf autoClose booleanValue
Returns whether this view automatically opens and closes views based on contexts return whether or not this view automatically manages views based on contexts private boolean is Auto Manage Views I Workbench Page page launch View get View Site get Workbench Window get Active Page if page null I Perspective Descriptor descriptor page get Perspective if descriptor null return f Auto Manage Perspectives contains descriptor get Id return false  isAutoManageViews IWorkbenchPage launchView getViewSite getWorkbenchWindow getActivePage IPerspectiveDescriptor getPerspective fAutoManagePerspectives getId
Returns the workbench page containing the launch view return the workbench page containing the launch view public I Workbench Page get Page return launch View get Site get Page  IWorkbenchPage getPage launchView getSite getPage
Notifies this listener that the given perspective change has occurred Don t listen to part open close notifications during reset public void perspective Changed I Workbench Page page String change Id if change Id equals I Workbench Page CHANGE RESET f Is Tracking Part Changes false else if change Id equals I Workbench Page CHANGE RESET COMPLETE load Track Views  perspectiveChanged IWorkbenchPage changeId changeId IWorkbenchPage CHANGE_RESET fIsTrackingPartChanges changeId IWorkbenchPage CHANGE_RESET_COMPLETE loadTrackViews
Notifies this listener that the given perspective change has occurred When a part is opened closed do not close open it automatically public void perspective Changed I Workbench Page page I Workbench Part Reference ref String change Id if f Is Tracking Part Changes return if I Workbench Page CHANGE VIEW HIDE equals change Id ref instanceof I View Reference String id I View Reference ref get Id if managed View Ids contains id view Ids To Not Open add id save Views To Not Open opened View Ids remove id save Opened Views else if I Workbench Page CHANGE VIEW SHOW equals change Id ref instanceof I View Reference String id I View Reference ref get Id opened View Ids remove id save Opened Views  perspectiveChanged IWorkbenchPage IWorkbenchPartReference changeId fIsTrackingPartChanges IWorkbenchPage CHANGE_VIEW_HIDE changeId IViewReference IViewReference getId managedViewIds viewIdsToNotOpen saveViewsToNotOpen openedViewIds saveOpenedViews IWorkbenchPage CHANGE_VIEW_SHOW changeId IViewReference IViewReference getId openedViewIds saveOpenedViews
Reads the preference specifying whether this view automatically tracks views being opened and closed for the purpose of not automatically managing those views once they ve been opened closed manually public void load Track Views f Is Tracking Part Changes DebugUI Tools get Preference Store get Boolean I Internal DebugUI Constants PREF TRACK VIEWS  loadTrackViews fIsTrackingPartChanges DebugUITools getPreferenceStore getBoolean IInternalDebugUIConstants PREF_TRACK_VIEWS
Load the collection of perspectives in which view management will occur from the preference store private void load Auto Manage Perspectives String pref String DebugUI Plugin get Default get Preference Store get String I DebugUI Constants PREF MANAGE VIEW PERSPECTIVES f Auto Manage Perspectives parse List pref String  loadAutoManagePerspectives prefString DebugUIPlugin getDefault getPreferenceStore getString IDebugUIConstants PREF_MANAGE_VIEW_PERSPECTIVES fAutoManagePerspectives parseList prefString
Reloaded the collection of view management perspectives and updates potentially opening views for the given selection public void reload Auto Manage Perspectives Object selection Remove the context ids associated with the current selection so that update For Selection will open views as appropriate given the new view management settings String model Ids get Debug Model Ids For Selection selection List context Ids get Contexts For Models model Ids last Enabled Ids remove All context Ids load Auto Manage Perspectives update For Selection selection  reloadAutoManagePerspectives updateForSelection modelIds getDebugModelIdsForSelection contextIds getContextsForModels modelIds lastEnabledIds removeAll contextIds loadAutoManagePerspectives updateForSelection
Parses the comma separated string into a list of strings return list public static List parse List String list String List list new Array List 10 String Tokenizer tokenizer new String Tokenizer list String NON NLS 1 while tokenizer has More Tokens String token tokenizer next Token list add token return list  parseList listString ArrayList StringTokenizer StringTokenizer listString hasMoreTokens nextToken
The launch view associated with this context listener has been disposed Remove as a context listener public void dispose I Workbench workbench PlatformUI get Workbench workbench get Context Support get Context Manager remove Context Manager Listener this  IWorkbench getWorkbench getContextSupport getContextManager removeContextManagerListener

Overridden to fix bug 39709 duplicate items in launch viewer The workaround is required since debug creation events which result in additions to the tree are processed asynchrnously with the expanding of a launch debug target in the tree see org eclipse jface viewers Abstract Tree Viewer add java lang Object java lang Object public void add Object parent Element Object child Element if do Find Item child Element null super add parent Element child Element  AbstractTreeViewer parentElement childElement doFindItem childElement parentElement childElement
public Launch Viewer Composite parent super new Tree parent SWT MULTI set Use Hashlookup true  LaunchViewer setUseHashlookup
Update the images for all stack frame children of the given thread param parent Thread the thread whose frames should be updated protected void update Stack Frame Images I Thread parent Thread Widget parent Item find Item parent Thread if parent Item null Item items get Items Item parent Item for int i 0 i items length i update Tree Item Image Tree Item items i  parentThread updateStackFrameImages IThread parentThread parentItem findItem parentThread parentItem getItems parentItem updateTreeItemImage TreeItem
Updates the image of the given tree item param tree Item the item protected void update Tree Item Image Tree Item tree Item I Label Provider provider I Label Provider get Label Provider Image image provider get Image tree Item get Data if image null tree Item set Image image  treeItem updateTreeItemImage TreeItem treeItem ILabelProvider ILabelProvider getLabelProvider getImage treeItem getData treeItem setImage
protected void do Update Item Item item Object element update icon and label I Label Provider provider I Label Provider get Label Provider String text provider get Text element if equals item get Text Debug View Interim Label Provider PENDING LABEL equals text NON NLS 1 If an element already has a label don t set the label to the pending label This avoids labels flashing when they re updated item set Text text Image image provider get Image element if item get Image image item set Image image if provider instanceof I Color Provider I Color Provider cp I Color Provider provider Tree Item tree Item Tree Item item tree Item set Foreground cp get Foreground element tree Item set Background cp get Background element  doUpdateItem ILabelProvider ILabelProvider getLabelProvider getText getText DebugViewInterimLabelProvider PENDING_LABEL setText getImage getImage setImage IColorProvider IColorProvider IColorProvider TreeItem treeItem TreeItem treeItem setForeground getForeground treeItem setBackground getBackground
see Structured Viewer refresh Object public void refresh Object element see bug 7965 Debug view refresh flicker get Control set Redraw false super refresh element get Control set Redraw true  StructuredViewer getControl setRedraw getControl setRedraw

Constructs an event handler for the given launch view param view launch view public Launch View Event Handler Launch View view super view Debug Plugin plugin Debug Plugin get Default plugin get Launch Manager add Launch Listener this  LaunchViewEventHandler LaunchView DebugPlugin DebugPlugin getDefault getLaunchManager addLaunchListener
see Abstract Debug Event Handler do Handle Debug Events Debug Event protected void do Handle Debug Events Debug Event events f Thread Timer handle Debug Events events Object suspendee null for int i 0 i events length i Debug Event event events i Object source event get Source if source instanceof I Stack Frame source instanceof I Thread source instanceof I Debug Target source instanceof I Process the launch view is not interested in any other types of elements return switch event get Kind case Debug Event CREATE insert source if source instanceof I Debug Target I Launch launch I Debug Target source get Launch get Launch View auto Expand launch false true break case Debug Event TERMINATE if source instanceof I Thread clear Source Selection source f Thread Timer get Timed Out Threads remove source remove source else if source instanceof I Debug Target clear Source Selection source Object parent I Tree Content Provider get Tree Viewer get Content Provider get Parent source refresh parent break case Debug Event RESUME do Handle Resume Event event source break case Debug Event SUSPEND if suspendee null suspendee equals source do Handle Suspend Event source event suspendee source break case Debug Event CHANGE if source instanceof I Stack Frame I Stack Frame last Frame get Launch View get Stack Frame if source equals last Frame get Launch View set Stack Frame null get Launch View show Editor For Current Selection if event get Detail Debug Event STATE label Changed source else structural change refresh source break  AbstractDebugEventHandler doHandleDebugEvents DebugEvent doHandleDebugEvents DebugEvent fThreadTimer handleDebugEvents DebugEvent getSource IStackFrame IThread IDebugTarget IProcess getKind DebugEvent IDebugTarget ILaunch IDebugTarget getLaunch getLaunchView autoExpand DebugEvent IThread clearSourceSelection fThreadTimer getTimedOutThreads IDebugTarget clearSourceSelection ITreeContentProvider getTreeViewer getContentProvider getParent DebugEvent doHandleResumeEvent DebugEvent doHandleSuspendEvent DebugEvent IStackFrame IStackFrame lastFrame getLaunchView getStackFrame lastFrame getLaunchView setStackFrame getLaunchView showEditorForCurrentSelection getDetail DebugEvent labelChanged
Handles the given resume event with the given source protected void do Handle Resume Event Debug Event event Object source if event is Evaluation clear Source Selection source if event is Evaluation event is Step Start Do not update for step starts and evaluation starts immediately Instead start the timer I Thread thread get Thread source if thread null f Thread Timer start Timer thread return refresh source if source instanceof I Thread When a thread resumes try to select another suspended thread in the same target try I Thread threads I Thread source get Debug Target get Threads for int i 0 i threads length i I Stack Frame frame threads i get Top Stack Frame if frame null select And Reveal frame return catch Debug Exception e select And Reveal source return  doHandleResumeEvent DebugEvent isEvaluation clearSourceSelection isEvaluation isStepStart IThread getThread fThreadTimer startTimer IThread IThread IThread getDebugTarget getThreads IStackFrame getTopStackFrame selectAndReveal DebugException selectAndReveal
Updates the stack frame icons for a running thread This is useful for the case where a thread is resumed temporarily but the view should keep the stack frame visible for example step start or evaluation start protected void update Running Thread I Thread thread label Changed thread get Launch Viewer update Stack Frame Images thread clear Source Selection thread  updateRunningThread IThread labelChanged getLaunchViewer updateStackFrameImages clearSourceSelection
protected void do Handle Suspend Event Object element Debug Event event I Thread thread get Thread element if thread null f Thread Timer stop Timer thread boolean was Timed Out f Thread Timer get Timed Out Threads remove thread if event is Evaluation event get Detail Debug Event EVALUATION IMPLICIT 0 if thread null was Timed Out No refresh required for implicit evaluations that complete on time return if element instanceof I Thread do Handle Suspend Thread Event I Thread element event was Timed Out return refresh element  doHandleSuspendEvent DebugEvent IThread getThread fThreadTimer stopTimer wasTimedOut fThreadTimer getTimedOutThreads isEvaluation getDetail DebugEvent EVALUATION_IMPLICIT wasTimedOut IThread doHandleSuspendThreadEvent IThread wasTimedOut
Updates the given thread for the given suspend event protected void do Handle Suspend Thread Event I Thread thread Debug Event event boolean was Timed Out if the thread has already resumed do nothing if thread is Suspended is Available return do not update source selection for evaluation events boolean evaluation Event event is Evaluation if the top frame is the same only update labels and images and re select the frame to display source try I Stack Frame frame thread get Top Stack Frame if frame null frame equals f Last Stack Frame if was Timed Out get Launch Viewer update Stack Frame Images thread get Launch Viewer update new Object thread frame null if evaluation Event get Launch Viewer set Selection new Structured Selection frame else if was Timed Out get Launch View show Editor For Current Selection return catch Debug Exception e Auto expand the thread Only select the thread if this wasn t the end of an evaluation get Launch View auto Expand thread true evaluation Event try f Last Stack Frame thread get Top Stack Frame catch Debug Exception e f Last Stack Frame null  doHandleSuspendThreadEvent IThread DebugEvent wasTimedOut isSuspended isAvailable evaluationEvent isEvaluation IStackFrame getTopStackFrame fLastStackFrame wasTimedOut getLaunchViewer updateStackFrameImages getLaunchViewer evaluationEvent getLaunchViewer setSelection StructuredSelection wasTimedOut getLaunchView showEditorForCurrentSelection DebugException getLaunchView autoExpand evaluationEvent fLastStackFrame getTopStackFrame DebugException fLastStackFrame
see Abstract Debug Event Handler update For Debug Events Debug Event protected void update For Debug Events Debug Event events super update For Debug Events events if is View Visible return do Handle Debug Events events  AbstractDebugEventHandler updateForDebugEvents DebugEvent updateForDebugEvents DebugEvent updateForDebugEvents isViewVisible doHandleDebugEvents
De registers this event handler from the debug model public void dispose super dispose f Thread Timer stop Debug Plugin plugin Debug Plugin get Default plugin get Launch Manager remove Launch Listener this  fThreadTimer DebugPlugin DebugPlugin getDefault getLaunchManager removeLaunchListener
Clear the selection in the editor must be called in UI thread private void clear Source Selection Object source if get Viewer null get Launch View clear Source Selection source  clearSourceSelection getViewer getLaunchView clearSourceSelection
Returns this event handler s launch viewer return launch viewer protected Launch Viewer get Launch Viewer return Launch Viewer get Viewer  LaunchViewer getLaunchViewer LaunchViewer getViewer
Returns this event handler s launch view return launch view protected Launch View get Launch View return Launch View get View  LaunchView getLaunchView LaunchView getView
private I Thread get Thread Object element I Thread thread null if element instanceof I Thread thread I Thread element else if element instanceof I Stack Frame thread I Stack Frame element get Thread return thread  IThread getThread IThread IThread IThread IStackFrame IStackFrame getThread
Hash Set f Timed Out Threads new Hash Set public Set get Timed Out Threads return f Timed Out Threads  HashSet fTimedOutThreads HashSet getTimedOutThreads fTimedOutThreads
Handle debug events dispatched from launch view event handler If there are no running targets stop this timer public void handle Debug Events Debug Event events if f Stopped return Debug Event event for int i 0 num Events events length i num Events i event events i if event get Kind Debug Event TERMINATE event get Source instanceof I Debug Target I Launch launches Debug Plugin get Default get Launch Manager get Launches If there are no more active Debug Targets stop the thread for int j 0 j launches length j I Debug Target targets launches j get Debug Targets for int k 0 k targets length k I Debug Target target targets k if target null target is Disconnected target is Terminated return To get here there must be no running Debug Targets stop return  handleDebugEvents DebugEvent fStopped DebugEvent numEvents numEvents getKind DebugEvent getSource IDebugTarget ILaunch DebugPlugin getDefault getLaunchManager getLaunches DebugTargets IDebugTarget getDebugTargets IDebugTarget isDisconnected isTerminated DebugTargets
public void start Timer I Thread thread synchronized f Lock f Stop Times put thread new Long System current Time Millis TIMEOUT if f Thread null start Thread  startTimer IThread fLock fStopTimes currentTimeMillis fThread startThread
public void stop synchronized f Lock f Stopped true f Thread null f Stop Times clear  fLock fStopped fThread fStopTimes
public void stop Timer I Thread thread synchronized f Lock f Stop Times remove thread  stopTimer IThread fLock fStopTimes
f Thread new Thread new Runnable public void run f Stopped false while f Stopped check Timers  fThread fStopped fStopped checkTimers
private void start Thread f Thread new Thread new Runnable public void run f Stopped false while f Stopped check Timers Thread timer NON NLS 1 f Thread start  startThread fThread fStopped fStopped checkTimers fThread
f Stop Times remove thread get View async Exec new Runnable public void run f Timed Out Threads add thread update Running Thread thread  fStopTimes getView asyncExec fTimedOutThreads updateRunningThread
private void check Timers long time To Wait TIMEOUT Map Entry entries synchronized f Lock if f Stop Times size 0 if time Empty 0 time Empty System current Time Millis else if System current Time Millis time Empty MAX TIME EMPTY stop return else time Empty 0 entries Map Entry f Stop Times entry Set to Array new Map Entry 0 long stop Time current Time System current Time Millis Long entry Value Map Entry entry null for int i 0 num Entries entries length i num Entries i entry entries i entry Value Long entry get Value if entry Value null continue stop Time entry Value long Value if stop Time current Time The timer has expired for this thread Refresh the UI to show that the thread is performing a long evaluation final I Thread thread I Thread entry get Key f Stop Times remove thread get View async Exec new Runnable public void run f Timed Out Threads add thread update Running Thread thread else time To Wait Math min time To Wait stop Time current Time try Thread sleep time To Wait catch Interrupted Exception e  checkTimers timeToWait fLock fStopTimes timeEmpty timeEmpty currentTimeMillis currentTimeMillis timeEmpty MAX_TIME_EMPTY timeEmpty fStopTimes entrySet toArray stopTime currentTime currentTimeMillis entryValue numEntries numEntries entryValue getValue entryValue stopTime entryValue longValue stopTime currentTime IThread IThread getKey fStopTimes getView asyncExec fTimedOutThreads updateRunningThread timeToWait timeToWait stopTime currentTime timeToWait InterruptedException
Runnable r new Runnable public void run if is Available if launches length 1 insert launches 0 else refresh for int i 0 i launches length i if launches i has Children get Launch View auto Expand launches i false i launches length 1  isAvailable hasChildren getLaunchView autoExpand
see org eclipse debug core I Launches Listener launches Added org eclipse debug core I Launch public void launches Added final I Launch launches Runnable r new Runnable public void run if is Available if launches length 1 insert launches 0 else refresh for int i 0 i launches length i if launches i has Children get Launch View auto Expand launches i false i launches length 1 get View sync Exec r  ILaunchesListener launchesAdded ILaunch launchesAdded ILaunch isAvailable hasChildren getLaunchView autoExpand getView syncExec
Runnable r new Runnable public void run if is Available if launches length 1 refresh launches 0 else refresh for int i 0 i launches length i if launches i has Children get Launch View auto Expand launches i false i launches length 1  isAvailable hasChildren getLaunchView autoExpand
see org eclipse debug core I Launches Listener launches Changed org eclipse debug core I Launch public void launches Changed final I Launch launches Runnable r new Runnable public void run if is Available if launches length 1 refresh launches 0 else refresh for int i 0 i launches length i if launches i has Children get Launch View auto Expand launches i false i launches length 1 get View sync Exec r  ILaunchesListener launchesChanged ILaunch launchesChanged ILaunch isAvailable hasChildren getLaunchView autoExpand getView syncExec
Runnable r new Runnable public void run if is Available if launches length 1 remove launches 0 else refresh I Launch Manager lm Debug Plugin get Default get Launch Manager I Debug Target targets lm get Debug Targets if targets length 0 I Debug Target target targets targets length 1 try I Thread threads target get Threads for int i 0 i threads length i if threads i is Suspended get Launch View auto Expand threads i false true return catch Debug Exception de DebugUI Plugin log de get Launch View auto Expand target get Launch false true  isAvailable ILaunchManager DebugPlugin getDefault getLaunchManager IDebugTarget getDebugTargets IDebugTarget IThread getThreads isSuspended getLaunchView autoExpand DebugException DebugUIPlugin getLaunchView autoExpand getLaunch
see org eclipse debug core I Launches Listener launches Removed org eclipse debug core I Launch public void launches Removed final I Launch launches Runnable r new Runnable public void run if is Available if launches length 1 remove launches 0 else refresh I Launch Manager lm Debug Plugin get Default get Launch Manager I Debug Target targets lm get Debug Targets if targets length 0 I Debug Target target targets targets length 1 try I Thread threads target get Threads for int i 0 i threads length i if threads i is Suspended get Launch View auto Expand threads i false true return catch Debug Exception de DebugUI Plugin log de get Launch View auto Expand target get Launch false true get View async Exec r  ILaunchesListener launchesRemoved ILaunch launchesRemoved ILaunch isAvailable ILaunchManager DebugPlugin getDefault getLaunchManager IDebugTarget getDebugTargets IDebugTarget IThread getThreads isSuspended getLaunchView autoExpand DebugException DebugUIPlugin getLaunchView autoExpand getLaunch getView asyncExec
Runnable r new Runnable public void run get Launch View launches Terminated launches  getLaunchView launchesTerminated
public void launches Terminated final I Launch launches if f Last Stack Frame null I Launch launch f Last Stack Frame get Launch for int i 0 i launches length i I Launch terminated Launch launches i if terminated Launch equals launch f Last Stack Frame null Runnable r new Runnable public void run get Launch View launches Terminated launches get View async Exec r  launchesTerminated ILaunch fLastStackFrame ILaunch fLastStackFrame getLaunch ILaunch terminatedLaunch terminatedLaunch fLastStackFrame getLaunchView launchesTerminated getView asyncExec

see org eclipse ui I Editor Part do Save I Progress Monitor public void do Save I Progress Monitor monitor  IEditorPart doSave IProgressMonitor doSave IProgressMonitor
see org eclipse ui I Editor Part do Save As public void do Save As  IEditorPart doSaveAs doSaveAs
see org eclipse ui I Editor Part goto Marker I Marker public void goto Marker I Marker marker  IEditorPart gotoMarker IMarker gotoMarker IMarker
see org eclipse ui I Editor Part init I Editor Site I Editor Input public void init I Editor Site site I Editor Input input set Site site set Input input  IEditorPart IEditorSite IEditorInput IEditorSite IEditorInput setSite setInput
see org eclipse ui I Editor Part is Dirty public boolean is Dirty return false  IEditorPart isDirty isDirty
see org eclipse ui I Editor Part is Save As Allowed public boolean is Save As Allowed return false  IEditorPart isSaveAsAllowed isSaveAsAllowed
see org eclipse ui I Workbench Part create Part Control Composite public void create Part Control Composite parent f Text new Text parent SWT MULTI SWT READ ONLY SWT WRAP f Text set Foreground J Face Colors get Error Text f Text get Display f Text set Background f Text get Display get System Color SWT COLOR WIDGET BACKGROUND if get Editor Input null set Input get Editor Input  IWorkbenchPart createPartControl createPartControl fText READ_ONLY fText setForeground JFaceColors getErrorText fText getDisplay fText setBackground fText getDisplay getSystemColor COLOR_WIDGET_BACKGROUND getEditorInput setInput getEditorInput
see org eclipse ui I Workbench Part set Focus public void set Focus if f Text null f Text set Focus  IWorkbenchPart setFocus setFocus fText fText setFocus
see I Reusable Editor set Input org eclipse ui I Editor Input public void set Input I Editor Input input super set Input input set Title input get Name if f Text null f Text set Text input get Tool Tip Text  IReusableEditor setInput IEditorInput setInput IEditorInput setInput setTitle getName fText fText setText getToolTipText

Constructs an editor input for the given stack frame to indicate source could not be found param frame stack frame public Source Not Found Editor Input I Stack Frame frame f Frame frame I Debug Model Presentation pres DebugUI Tools new Debug Model Presentation frame get Model Identifier f Frame Text pres get Text frame pres dispose  SourceNotFoundEditorInput IStackFrame fFrame IDebugModelPresentation DebugUITools newDebugModelPresentation getModelIdentifier fFrameText getText
see org eclipse ui I Editor Input exists public boolean exists return false  IEditorInput
see org eclipse ui I Editor Input get Image Descriptor public Image Descriptor get Image Descriptor return DebugUI Tools get Default Image Descriptor f Frame  IEditorInput getImageDescriptor ImageDescriptor getImageDescriptor DebugUITools getDefaultImageDescriptor fFrame
see org eclipse ui I Editor Input get Name public String get Name try return f Frame get Name catch Debug Exception e return DebugUI Views Messages get String Source Not Found Editor Input Source Not Found 1 NON NLS 1  IEditorInput getName getName fFrame getName DebugException DebugUIViewsMessages getString SourceNotFoundEditorInput Source_Not_Found_1
see org eclipse ui I Editor Input get Persistable public I Persistable Element get Persistable return null  IEditorInput getPersistable IPersistableElement getPersistable
see org eclipse ui I Editor Input get Tool Tip Text public String get Tool Tip Text return Message Format format DebugUI Views Messages get String Source Not Found Editor Input Source not found for  0  2 new String f Frame Text NON NLS 1  IEditorInput getToolTipText getToolTipText MessageFormat DebugUIViewsMessages getString SourceNotFoundEditorInput Source_not_found_for_ _2 fFrameText

public Standard Decoration I Debug Editor Presentation presentation I Editor Part editor Part I Thread thread f Thread thread f Editor editor Part f Presentation presentation  StandardDecoration IDebugEditorPresentation IEditorPart editorPart IThread fThread fEditor editorPart fPresentation
see org eclipse debug internal ui views launch Decoration remove public void remove f Presentation remove Annotations f Editor f Thread  fPresentation removeAnnotations fEditor fThread
see org eclipse debug internal ui views launch Decoration get Thread public I Thread get Thread return f Thread  getThread IThread getThread fThread

abstract public class Abstract Memory Action extends Action public Abstract Memory Action super  AbstractMemoryAction AbstractMemoryAction
public Abstract Memory Action String label super label  AbstractMemoryAction
public Abstract Memory Action String label int style super label style  AbstractMemoryAction
return the view tab for which the action should act on abstract I Memory View Tab get View Tab  IMemoryViewTab getViewTab
Given a view id return the top view tab from the view Returns null if the view cannot be opened or a top view tab is not found param view Id return public I Memory View Tab get Top View Tab From View String view Id if view Id equals I Internal DebugUI Constants ID MEMORY VIEW open a new view if necessary I Workbench Page p DebugUI Plugin get Default get Workbench get Active Workbench Window get Active Page if p null return null I View Part view null view p find View view Id if view null try I Workbench Part active Part p get Active Part view Memory View p show View view Id p activate active Part catch Part Init Exception e return null if view instanceof I Memory View I Memory View Tab top Tap I Memory View view get Top Memory Tab return top Tap else return null else return null  viewId IMemoryViewTab getTopViewTabFromView viewId viewId IInternalDebugUIConstants ID_MEMORY_VIEW IWorkbenchPage DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getActivePage IViewPart findView viewId IWorkbenchPart activePart getActivePart MemoryView showView viewId activePart PartInitException IMemoryView IMemoryViewTab topTap IMemoryView getTopMemoryTab topTap

Sets the view tab of which the renderer is rendering for param view Tab public void set View Tab I Memory View Tab view Tab f View Tab view Tab  viewTab setViewTab IMemoryViewTab viewTab fViewTab viewTab
Sets the rendering id of this renderer param redering Id public void set Rendering Id String redering Id f Rendering Id redering Id  rederingId setRenderingId rederingId fRenderingId rederingId
This is called by the label provider for I Memory View Tab Implementor can reuse a memory view tab and presents data in a different format param data Type type of data the bytes hold param address addres where the bytes belong to param data the bytes param padded Str fill each byte that is invalid with this padded string return a string to represent the memory Do not return null Return a string to pad the cell if the memory cannot be converted successfully  IMemoryViewTab dataType paddedStr
This is called by the cell modifier from an I Memory View Tab Implementor will convert the string value to an array of bytes The bytes will be passed to the debug adapter for memory block modification Return null if the byte cannot be formatted properly param data Type type of data the string represents param address address where the bytes belong to param current Values current values of the data in bytes format param data the string to be converted to bytes return the bytes to be passed to debug adapter for modification  IMemoryViewTab dataType currentValues

public Abstract Memory View Tab I Memory Block new Memory Tab Item new Tab Menu Manager menu Mgr I Memory Rendering rendering f Memory Block new Memory f Tab Item new Tab f Menu Mgr menu Mgr f Rendering rendering f Rendering Id rendering get Rendering Id f Tab Item set Data this Whenever a new view tab is created enable the tab to ensure that reference counting and memory block enablement state is maintained maintain Ref And Enablement true  AbstractMemoryViewTab IMemoryBlock newMemory TabItem newTab MenuManager menuMgr IMemoryRendering fMemoryBlock newMemory fTabItem newTab fMenuMgr menuMgr fRendering fRenderingId getRenderingId fTabItem setData maintainRefAndEnablement
see org eclipse debug ui I Memory View Tab set Enabled boolean public void set Enabled boolean enabled maintain Ref And Enablement enabled  IMemoryViewTab setEnabled setEnabled maintainRefAndEnablement
Maintain memory enabled reference counting and its enablement If add Reference is true a reference count will be added to the memory block The memory block will be enabled if there is more than one object referencing to the memory block If add Reference is false a refernece count will be removed from the memory block The memory block will be disabled if no object is referencing to the memory block param add Reference protected void maintain Ref And Enablement boolean add Reference if add enabled reference if add Reference if get Memory Block instanceof I Extended Memory Block add view tab to synchronizer Array List references add Reference To Synchronizer if this is the first enabled reference to the memory block enable the memory block if references size 1 I Extended Memory Block get Memory Block is Enabled I Extended Memory Block get Memory Block enable if remove enabled reference else if add Reference if get Memory Block instanceof I Extended Memory Block Array List references remove Reference From Synchronizer if references null return if there is not more enabled reference to the memory block disable the memory block if references size 0 I Extended Memory Block get Memory Block is Enabled I Extended Memory Block get Memory Block disable  addReference addReference addReference maintainRefAndEnablement addReference addReference getMemoryBlock IExtendedMemoryBlock ArrayList addReferenceToSynchronizer IExtendedMemoryBlock getMemoryBlock isEnabled IExtendedMemoryBlock getMemoryBlock addReference getMemoryBlock IExtendedMemoryBlock ArrayList removeReferenceFromSynchronizer IExtendedMemoryBlock getMemoryBlock isEnabled IExtendedMemoryBlock getMemoryBlock
Multiple view tabs can reference to the same memory block Use this property to keep track of all references that are enabled i e requiring change events from the memory block When a view tab is created enabled a reference will be added to the synchronizer When a view tab is disposed disabled the reference will be removed from the synchronizer The view tab examines this references array and will only enable a memory block if there is at least one enabled reference to the memory block If there is no enabled reference to the memory block the memory block should be disabled return the reference object protected Array List add Reference To Synchronizer Array List references Array List DebugUI Plugin get Default get Memory Block View Synchronizer get Synchronized Property get Memory Block I Memory View Constants PROPERTY ENABLED REFERENCES first reference count if references null references new Array List add the reference to the reference counting object if references contains this references add this DebugUI Plugin get Default get Memory Block View Synchronizer set Synchronized Property get Memory Block I Memory View Constants PROPERTY ENABLED REFERENCES references return references  ArrayList addReferenceToSynchronizer ArrayList ArrayList DebugUIPlugin getDefault getMemoryBlockViewSynchronizer getSynchronizedProperty getMemoryBlock IMemoryViewConstants PROPERTY_ENABLED_REFERENCES ArrayList DebugUIPlugin getDefault getMemoryBlockViewSynchronizer setSynchronizedProperty getMemoryBlock IMemoryViewConstants PROPERTY_ENABLED_REFERENCES
return the reference object null if the reference object does not exisit in the synchronizer protected Array List remove Reference From Synchronizer Array List references Array List DebugUI Plugin get Default get Memory Block View Synchronizer get Synchronized Property get Memory Block I Memory View Constants PROPERTY ENABLED REFERENCES do not create a new reference object if it does not exist the memory block may have been deleted if references null return null remove the reference from the reference counting object if references contains this references remove this DebugUI Plugin get Default get Memory Block View Synchronizer set Synchronized Property get Memory Block I Memory View Constants PROPERTY ENABLED REFERENCES references return references  ArrayList removeReferenceFromSynchronizer ArrayList ArrayList DebugUIPlugin getDefault getMemoryBlockViewSynchronizer getSynchronizedProperty getMemoryBlock IMemoryViewConstants PROPERTY_ENABLED_REFERENCES DebugUIPlugin getDefault getMemoryBlockViewSynchronizer setSynchronizedProperty getMemoryBlock IMemoryViewConstants PROPERTY_ENABLED_REFERENCES
public void dispose whenever a view tab is disposed disable view tab to ensure that reference counting and memory block enablement state is maintained maintain Ref And Enablement false  maintainRefAndEnablement
see org eclipse debug ui I Memory View Tab get Memory Block public I Memory Block get Memory Block return f Memory Block  IMemoryViewTab getMemoryBlock IMemoryBlock getMemoryBlock fMemoryBlock
see org eclipse debug ui I Memory View Tab get Rendering Id public String get Rendering Id return f Rendering get Rendering Id  IMemoryViewTab getRenderingId getRenderingId fRendering getRenderingId
see org eclipse debug ui I Memory View Tab get Rendering public I Memory Rendering get Rendering return f Rendering  IMemoryViewTab getRendering IMemoryRendering getRendering fRendering

Constructor for Memory View Label Provider public Abstract Table View Tab Label Provider super  MemoryViewLabelProvider AbstractTableViewTabLabelProvider
public Abstract Table View Tab Label Provider I Table Memory View Tab view Tab Abstract Memory Renderer renderer f View Tab view Tab set Renderer renderer  AbstractTableViewTabLabelProvider ITableMemoryViewTab viewTab AbstractMemoryRenderer fViewTab viewTab setRenderer
public void set View Tab I Table Memory View Tab view Tab f View Tab view Tab  setViewTab ITableMemoryViewTab viewTab fViewTab viewTab
public void set Renderer Abstract Memory Renderer renderer f Renderer renderer renderer set View Tab f View Tab  setRenderer AbstractMemoryRenderer fRenderer setViewTab fViewTab
public Abstract Memory Renderer get Renderer return f Renderer  AbstractMemoryRenderer getRenderer fRenderer
see I Table Label Provider get Column Image Object int public Image get Column Image Object element int column Index if column Index 0 return Debug Plugin Images get Image I Internal DebugUI Constants IMG OBJECT MEMORY else if column Index f View Tab get Bytes Per Line f View Tab get Column Size return Debug Plugin Images get Image I Internal DebugUI Constants IMG OBJECT MEMORY else if memory in the range has changed return delta icon int start Offset column Index 1 f View Tab get Column Size int end Offset start Offset f View Tab get Column Size 1 if Memory View Line element is Range Change start Offset end Offset return Debug Plugin Images get Image I Internal DebugUI Constants IMG OBJECT MEMORY CHANGED else return Debug Plugin Images get Image I Internal DebugUI Constants IMG OBJECT MEMORY  ITableLabelProvider getColumnImage getColumnImage columnIndex columnIndex DebugPluginImages getImage IInternalDebugUIConstants IMG_OBJECT_MEMORY columnIndex fViewTab getBytesPerLine fViewTab getColumnSize DebugPluginImages getImage IInternalDebugUIConstants IMG_OBJECT_MEMORY startOffset columnIndex fViewTab getColumnSize endOffset startOffset fViewTab getColumnSize MemoryViewLine isRangeChange startOffset endOffset DebugPluginImages getImage IInternalDebugUIConstants IMG_OBJECT_MEMORY_CHANGED DebugPluginImages getImage IInternalDebugUIConstants IMG_OBJECT_MEMORY
public String get Column Text Object element int column Index String column Label null if column Index 0 column Label Memory View Line element get Address consult model presentation for address presentation else if column Index f View Tab get Bytes Per Line f View Tab get Column Size column Label NON NLS 1 else int start column Index 1 f View Tab get Column Size int end start f View Tab get Column Size Memory View Line line Memory View Line element Memory Byte bytes Memory View Line element get Bytes start end Big Integer address new Big Integer Memory View Line element get Address 16 address address add Big Integer value Of start column Label f Renderer get String f View Tab get Rendering Id address bytes line get Padded String return column Label  getColumnText columnIndex columnLabel columnIndex columnLabel MemoryViewLine getAddress columnIndex fViewTab getBytesPerLine fViewTab getColumnSize columnLabel columnIndex fViewTab getColumnSize fViewTab getColumnSize MemoryViewLine MemoryViewLine MemoryByte MemoryViewLine getBytes BigInteger BigInteger MemoryViewLine getAddress BigInteger valueOf columnLabel fRenderer getString fViewTab getRenderingId getPaddedString columnLabel

see org eclipse jface action I Action set Enabled boolean public void set Enabled boolean enabled super set Enabled enabled  IAction setEnabled setEnabled setEnabled
public Add Memory Block Action set Text DebugUI Messages get String TITLE set Tool Tip Text DebugUI Messages get String TOOLTIP set Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG ELCL MONITOR EXPRESSION set Hover Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG LCL MONITOR EXPRESSION set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL MONITOR EXPRESSION get selection from Debug View DebugUI Plugin get Default get Workbench get Active Workbench Window get Selection Service add Selection Listener I DebugUI Constants ID DEBUG VIEW this check to see if something is selected in the debug view since a selection event won t be generated for something selected prior to creating this action I Selection selection DebugUI Plugin get Default get Workbench get Active Workbench Window get Selection Service get Selection I DebugUI Constants ID DEBUG VIEW current Selection selection set up enablement based on current selection set Enabled Memory View Util is Valid Selection selection Debug Plugin get Default add Debug Event Listener this  AddMemoryBlockAction setText DebugUIMessages getString setToolTipText DebugUIMessages getString setImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_ELCL_MONITOR_EXPRESSION setHoverImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_LCL_MONITOR_EXPRESSION setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_MONITOR_EXPRESSION DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getSelectionService addSelectionListener IDebugUIConstants ID_DEBUG_VIEW ISelection DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getSelectionService getSelection IDebugUIConstants ID_DEBUG_VIEW currentSelection setEnabled MemoryViewUtil isValidSelection DebugPlugin getDefault addDebugEventListener
public Add Memory Block Action String text int style super text style set Tool Tip Text DebugUI Messages get String TOOLTIP set Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG ELCL MONITOR EXPRESSION set Hover Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG LCL MONITOR EXPRESSION set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL MONITOR EXPRESSION DebugUI Plugin get Default get Workbench get Active Workbench Window get Selection Service add Selection Listener I DebugUI Constants ID DEBUG VIEW this check to see if something is selected in the debug view since a selection event won t be generated for something selected prior to creating this action I Selection selection DebugUI Plugin get Default get Workbench get Active Workbench Window get Selection Service get Selection I DebugUI Constants ID DEBUG VIEW current Selection selection set Enabled Memory View Util is Valid Selection selection Debug Plugin get Default add Debug Event Listener this  AddMemoryBlockAction setToolTipText DebugUIMessages getString setImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_ELCL_MONITOR_EXPRESSION setHoverImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_LCL_MONITOR_EXPRESSION setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_MONITOR_EXPRESSION DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getSelectionService addSelectionListener IDebugUIConstants ID_DEBUG_VIEW ISelection DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getSelectionService getSelection IDebugUIConstants ID_DEBUG_VIEW currentSelection setEnabled MemoryViewUtil isValidSelection DebugPlugin getDefault addDebugEventListener
public void run get current selection from Debug View I Selection selection DebugUI Plugin get Default get Workbench get Active Workbench Window get Selection Service get Selection I DebugUI Constants ID DEBUG VIEW Object elem I Structured Selection selection get First Element if elem instanceof I Debug Element return ask debug element about memeory retrieval I Debug Target debug Target I Debug Element elem get Debug Target I Memory Block Retrieval standard Mem Retrieval I Memory Block Retrieval I Debug Element elem get Adapter I Memory Block Retrieval class if standard Mem Retrieval null if get Adapter returns null assume debug target as memory block retrieval standard Mem Retrieval debug Target Shell shell DebugUI Plugin get Default get Workbench get Active Workbench Window get Shell create dialog to ask for expression address to block Monitor Memory Block Dialog dialog new Monitor Memory Block Dialog shell standard Mem Retrieval dialog open int return Code dialog get Return Code if return Code Window CANCEL return get expression entered in dialog String expression dialog get Expression try if standard Mem Retrieval instanceof I Extended Memory Block Retrieval if the debug session supports I Extended Memory Block Retrieval I Extended Memory Block Retrieval mem Retrieval I Extended Memory Block Retrieval standard Mem Retrieval get extended memory block with the expression entered I Extended Memory Block mem Block mem Retrieval get Extended Memory Block expression I Debug Element elem add block to memory block manager if mem Block null f Last Memory Block mem Block Memory Block Manager get Memory Block Manager add Memory Block mem Block true move the tab with that memory block to the top switch Memory Block To Top f Last Memory Block else open error if it failed to retrieve a memory block Memory View Util open Error DebugUI Messages get String TITLE DebugUI Messages get String NO MEMORY BLOCK null else if the debug session does not support I Extended Memory Block Retrieval expression expression to Upper Case String hex Prefix 0X NON NLS 1 if expression starts With hex Prefix expression expression substring hex Prefix length convert the expression to an address Big Integer address new Big Integer expression 16 long long Address address long Value get the length of memory to block String str Length dialog get Length long length Long parse Long str Length must block at least one line if length 0 length I Internal DebugUI Constants BYTES PER LINE make sure length is divisible by 16 so that the entire row is filled while length I Internal DebugUI Constants BYTES PER LINE 0 length get standard memory block I Memory Block mem Block standard Mem Retrieval get Memory Block long Address length make sure the memory block returned is not an instance of I Extended Memory Block if mem Block instanceof I Extended Memory Block Status status new Status I Status WARNING DebugUI Plugin get Unique Identifier 0 I Memory Block Retrieval returns I Extended Memory Block This may result in unexpected behavior null NON NLS 1 DebugUI Plugin log status if mem Block null add memory block to memory block manager f Last Memory Block mem Block Memory Block Manager get Memory Block Manager add Memory Block mem Block true move the tab with that memory block to the top switch Memory Block To Top f Last Memory Block else otherwise open up an error doalog Memory View Util open Error DebugUI Messages get String TITLE DebugUI Messages get String NO MEMORY BLOCK null catch Debug Exception e1 Memory View Util open Error DebugUI Messages get String TITLE DebugUI Messages get String FAILED e1 catch Number Format Exception e2 String message DebugUI Messages get String FAILED n DebugUI Messages get String EXPR EVAL FAILED NON NLS 1 Memory View Util open Error DebugUI Messages get String TITLE message null  ISelection DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getSelectionService getSelection IDebugUIConstants ID_DEBUG_VIEW IStructuredSelection getFirstElement IDebugElement IDebugTarget debugTarget IDebugElement getDebugTarget IMemoryBlockRetrieval standardMemRetrieval IMemoryBlockRetrieval IDebugElement getAdapter IMemoryBlockRetrieval standardMemRetrieval getAdapter standardMemRetrieval debugTarget DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getShell MonitorMemoryBlockDialog MonitorMemoryBlockDialog standardMemRetrieval returnCode getReturnCode returnCode getExpression standardMemRetrieval IExtendedMemoryBlockRetrieval IExtendedMemoryBlockRetrieval IExtendedMemoryBlockRetrieval memRetrieval IExtendedMemoryBlockRetrieval standardMemRetrieval IExtendedMemoryBlock memBlock memRetrieval getExtendedMemoryBlock IDebugElement memBlock fLastMemoryBlock memBlock MemoryBlockManager getMemoryBlockManager addMemoryBlock memBlock switchMemoryBlockToTop fLastMemoryBlock MemoryViewUtil openError DebugUIMessages getString DebugUIMessages getString NO_MEMORY_BLOCK IExtendedMemoryBlockRetrieval toUpperCase hexPrefix startsWith hexPrefix hexPrefix BigInteger BigInteger longAddress longValue strLength getLength parseLong strLength IInternalDebugUIConstants BYTES_PER_LINE IInternalDebugUIConstants BYTES_PER_LINE IMemoryBlock memBlock standardMemRetrieval getMemoryBlock longAddress IExtendedMemoryBlock memBlock IExtendedMemoryBlock IStatus DebugUIPlugin getUniqueIdentifier IMemoryBlockRetrieval IExtendedMemoryBlock DebugUIPlugin memBlock fLastMemoryBlock memBlock MemoryBlockManager getMemoryBlockManager addMemoryBlock memBlock switchMemoryBlockToTop fLastMemoryBlock MemoryViewUtil openError DebugUIMessages getString DebugUIMessages getString NO_MEMORY_BLOCK DebugException MemoryViewUtil openError DebugUIMessages getString DebugUIMessages getString NumberFormatException DebugUIMessages getString DebugUIMessages getString EXPR_EVAL_FAILED MemoryViewUtil openError DebugUIMessages getString
public void selection Changed I Workbench Part part I Selection selection update enablement state based on selection from Debug View set Enabled Memory View Util is Valid Selection selection current Selection selection  selectionChanged IWorkbenchPart ISelection setEnabled MemoryViewUtil isValidSelection currentSelection
see org eclipse debug core I Debug Event Set Listener handle Debug Events org eclipse debug core Debug Event public void handle Debug Events Debug Event events for int i 0 i events length i handle Debug Event events i  IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent handleDebugEvent
private void handle Debug Event Debug Event event update action enablement based on debug event Object src event get Source I Debug Target srcDT null I Debug Target selectionDT null if event get Kind Debug Event TERMINATE if src instanceof I Terminate src instanceof I Debug Element srcDT I Debug Element src get Debug Target if current Selection instanceof I Structured Selection Object elem I Structured Selection current Selection get First Element if elem instanceof I Debug Element selectionDT I Debug Element elem get Debug Target disable action if the debug target is terminated if srcDT selectionDT set Enabled false  handleDebugEvent DebugEvent getSource IDebugTarget IDebugTarget getKind DebugEvent ITerminate IDebugElement IDebugElement getDebugTarget currentSelection IStructuredSelection IStructuredSelection currentSelection getFirstElement IDebugElement IDebugElement getDebugTarget setEnabled
Return the last memory block added to memory block manager via this action return Returns the f Last Memory Block public I Memory Block get Last Memory Block return f Last Memory Block  fLastMemoryBlock IMemoryBlock getLastMemoryBlock fLastMemoryBlock
private void switch Memory Block To Top I Memory Block memory Block open a new view if necessary I Workbench Page p DebugUI Plugin get Default get Workbench get Active Workbench Window get Active Page if p null return I View Part view null view p find View I Internal DebugUI Constants ID MEMORY VIEW if view null try I Workbench Part active Part p get Active Part view Memory View p show View I Internal DebugUI Constants ID MEMORY VIEW p activate active Part catch Part Init Exception e return if view instanceof I Memory View I Memory View Tab top Tap I Memory View view get Top Memory Tab if top Tap get Memory Block memory Block I Memory View Tab all Tabs I Memory View view get All View Tabs I Memory View Tab move To Top null for int i 0 i all Tabs length i if all Tabs i get Memory Block memory Block move To Top all Tabs i break if move To Top null I Memory View view move To Top move To Top  switchMemoryBlockToTop IMemoryBlock memoryBlock IWorkbenchPage DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getActivePage IViewPart findView IInternalDebugUIConstants ID_MEMORY_VIEW IWorkbenchPart activePart getActivePart MemoryView showView IInternalDebugUIConstants ID_MEMORY_VIEW activePart PartInitException IMemoryView IMemoryViewTab topTap IMemoryView getTopMemoryTab topTap getMemoryBlock memoryBlock IMemoryViewTab allTabs IMemoryView getAllViewTabs IMemoryViewTab moveToTop allTabs allTabs getMemoryBlock memoryBlock moveToTop allTabs moveToTop IMemoryView moveToTop moveToTop

see org eclipse jface viewers I Content Provider dispose public void dispose f Disposed true  IContentProvider fDisposed
Returns whether this content provider has already been disposed protected boolean is Disposed return f Disposed  isDisposed fDisposed
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input f Viewer Structured Viewer viewer  IContentProvider inputChanged inputChanged oldInput newInput fViewer StructuredViewer
see org eclipse swt widgets Display async Exec java lang Runnable protected void async Exec Runnable r if f Viewer null Control ctrl f Viewer get Control if ctrl null ctrl is Disposed ctrl get Display async Exec r  asyncExec asyncExec fViewer fViewer getControl isDisposed getDisplay asyncExec
see org eclipse swt widgets Display sync Exec java lang Runnable protected void sync Exec Runnable r if f Viewer null Control ctrl f Viewer get Control if ctrl null ctrl is Disposed ctrl get Display sync Exec r  syncExec syncExec fViewer fViewer getControl isDisposed getDisplay syncExec
Refreshes the viewer must be called in UI thread protected void refresh if f Viewer null f Viewer refresh  fViewer fViewer
Refresh the given element in the viewer must be called in UI thread protected void refresh Object element if f Viewer null f Viewer refresh element  fViewer fViewer
Runnable r new Runnable public void run if is Disposed do Handle Debug Event event  isDisposed doHandleDebugEvent
Handle debug events on the main thread param event public void handle Debug Event final Debug Event event if f Viewer null return Object element event get Source if element null return Runnable r new Runnable public void run if is Disposed do Handle Debug Event event async Exec r  handleDebugEvent DebugEvent fViewer getSource isDisposed doHandleDebugEvent asyncExec
see I Debug Event Set Listener handle Debug Events Debug Event public void handle Debug Events Debug Event events for int i 0 i events length i handle Debug Event events i  IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent handleDebugEvent
Performs an update based on the event protected abstract void do Handle Debug Event Debug Event event  doHandleDebugEvent DebugEvent

public Copy View Tab To Clipboard Action super set Text DebugUI Messages get String TITLE set Tool Tip Text DebugUI Messages get String TOOLTIP set Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG ELCL COPY VIEW TO CLIPBOARD set Hover Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG LCL COPY VIEW TO CLIPBOARD set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL COPY VIEW TO CLIPBOARD  CopyViewTabToClipboardAction setText DebugUIMessages getString setToolTipText DebugUIMessages getString setImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_ELCL_COPY_VIEW_TO_CLIPBOARD setHoverImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_LCL_COPY_VIEW_TO_CLIPBOARD setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_COPY_VIEW_TO_CLIPBOARD
private String concatenate Table As String Table Item item List if item List length 0 return null String Buffer table Contents new String Buffer Table Viewer viewer Memory View Tab get View Tab get Table Viewer Table table viewer get Table int num Columns table get Column Count I Table Label Provider label Provider I Table Label Provider viewer get Label Provider Table Column columns table get Columns get title of view tab String tab Label get View Tab get Tab Label table Contents append tab Label table Contents append System get Property line separator NON NLS 1 table Contents append COLUMN SEPERATOR int char Per Byte 4 if label Provider instanceof Abstract Table View Tab Label Provider Abstract Memory Renderer renderer Abstract Table View Tab Label Provider label Provider get Renderer if renderer instanceof I Fixed Length Output Renderer char Per Byte I Fixed Length Output Renderer renderer get Num Char Per Byte get the column headers and line them up properly for int k 0 k num Columns k String Buffer column Label new String Buffer columns k get Text int num Bytes 0 int num Chars 0 if k 0 if get View Tab instanceof I Table Memory View Tab return NON NLS 1 num Bytes I Table Memory View Tab get View Tab get Column Size num Chars num Bytes char Per Byte else special for address column I Memory Block mem Block get View Tab get Memory Block if mem Block instanceof I Extended Memory Block num Bytes I Extended Memory Block mem Block get Address Size check address size if num Bytes 0 num Bytes 4 else num Bytes 4 num Chars num Bytes 2 while column Label length num Chars column Label append NON NLS 1 table Contents append column Label table Contents append COLUMN SEPERATOR table Contents append System get Property line separator NON NLS 1 String Buffer temp get the column contents from all the rows for int i 0 i item List length i for int j 0 j num Columns j table Contents append COLUMN SEPERATOR temp new String Buffer label Provider get Column Text item List i get Data j if j 0 if get View Tab instanceof I Table Memory View Tab return NON NLS 1 int num Bytes I Table Memory View Tab get View Tab get Column Size int num Chars num Bytes char Per Byte while temp length num Chars temp append NON NLS 1 table Contents append temp table Contents append System get Property line separator NON NLS 1 return table Contents to String  concatenateTableAsString TableItem itemList itemList StringBuffer tableContents StringBuffer TableViewer MemoryViewTab getViewTab getTableViewer getTable numColumns getColumnCount ITableLabelProvider labelProvider ITableLabelProvider getLabelProvider TableColumn getColumns tabLabel getViewTab getTabLabel tableContents tabLabel tableContents getProperty tableContents COLUMN_SEPERATOR charPerByte labelProvider AbstractTableViewTabLabelProvider AbstractMemoryRenderer AbstractTableViewTabLabelProvider labelProvider getRenderer IFixedLengthOutputRenderer charPerByte IFixedLengthOutputRenderer getNumCharPerByte numColumns StringBuffer columnLabel StringBuffer getText numBytes numChars getViewTab ITableMemoryViewTab numBytes ITableMemoryViewTab getViewTab getColumnSize numChars numBytes charPerByte IMemoryBlock memBlock getViewTab getMemoryBlock memBlock IExtendedMemoryBlock numBytes IExtendedMemoryBlock memBlock getAddressSize numBytes numBytes numBytes numChars numBytes columnLabel numChars columnLabel tableContents columnLabel tableContents COLUMN_SEPERATOR tableContents getProperty StringBuffer itemList numColumns tableContents COLUMN_SEPERATOR StringBuffer labelProvider getColumnText itemList getData getViewTab ITableMemoryViewTab numBytes ITableMemoryViewTab getViewTab getColumnSize numChars numBytes charPerByte numChars tableContents tableContents getProperty tableContents toString
public void run if get View Tab null return Table Viewer viewer Memory View Tab get View Tab get Table Viewer if viewer null return Table table viewer get Table if table null return Clipboard clip new Clipboard table get Display Table Item table Items table get Items String table As String new String table As String concatenate Table As String table Items if table As String equals NON NLS 1 Text Transfer plain Text Transfer Text Transfer get Instance clip set Contents new Object table As String new Transfer plain Text Transfer  getViewTab TableViewer MemoryViewTab getViewTab getTableViewer getTable getDisplay TableItem tableItems getItems tableAsString tableAsString concatenateTableAsString tableItems tableAsString TextTransfer plainTextTransfer TextTransfer getInstance setContents tableAsString plainTextTransfer
see org eclipse debug ui internal actions Abstract Memory Action get View Tab I Memory View Tab get View Tab return get Top View Tab From View I Internal DebugUI Constants ID MEMORY VIEW  AbstractMemoryAction getViewTab IMemoryViewTab getViewTab getTopViewTabFromView IInternalDebugUIConstants ID_MEMORY_VIEW

public Copy View Tab To Clipboard Context Action I Memory View Tab view Tab super f View Tab view Tab Workbench Help set Help this I DebugUI Constants PLUGIN ID CopyViewTabToClipboardContextAction context NON NLS 1  CopyViewTabToClipboardContextAction IMemoryViewTab viewTab fViewTab viewTab WorkbenchHelp setHelp IDebugUIConstants PLUGIN_ID CopyViewTabToClipboardContextAction_context
see org eclipse debug ui internal actions Abstract Memory Action get View Tab I Memory View Tab get View Tab return f View Tab  AbstractMemoryAction getViewTab IMemoryViewTab getViewTab fViewTab

param parent Shell protected Default Column Size Dialog Shell parent Shell super parent Shell f Pref Store DebugUI Plugin get Default get Preference Store  parentShell DefaultColumnSizeDialog parentShell parentShell fPrefStore DebugUIPlugin getDefault getPreferenceStore
protected Control create Dialog Area Composite parent Workbench Help set Help parent I DebugUI Constants PLUGIN ID DefaultColumnSizeDialog context NON NLS 1 get Shell set Text DebugUI Messages get String DEFAULT COLUMN SIZE Composite content new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 content set Layout layout Label text Label new Label content SWT NONE text Label set Text DebugUI Messages get String COLUMN SIZE Grid Data text Layout new Grid Data text Label set Layout Data text Layout f Column Size new Combo content SWT BORDER SWT READ ONLY Grid Data column Layout new Grid Data f Column Size set Layout Data column Layout for int i 0 i f Column Sizes length i f Column Size add String value Of f Column Sizes i int col Size f Pref Store get Int I Debug Preference Constants PREF COLUMN SIZE int idx 0 for int i 0 i f Column Sizes length i if f Column Sizes i col Size idx i break f Column Size select idx return content  createDialogArea WorkbenchHelp setHelp IDebugUIConstants PLUGIN_ID DefaultColumnSizeDialog_context getShell setText DebugUIMessages getString DEFAULT_COLUMN_SIZE GridLayout GridLayout numColumns setLayout textLabel textLabel setText DebugUIMessages getString COLUMN_SIZE GridData textLayout GridData textLabel setLayoutData textLayout fColumnSize READ_ONLY GridData columnLayout GridData fColumnSize setLayoutData columnLayout fColumnSizes fColumnSize valueOf fColumnSizes colSize fPrefStore getInt IDebugPreferenceConstants PREF_COLUMN_SIZE fColumnSizes fColumnSizes colSize fColumnSize
protected void ok Pressed int idx f Column Size get Selection Index int col Size f Column Sizes idx f Pref Store set Value I Debug Preference Constants PREF COLUMN SIZE col Size super ok Pressed  okPressed fColumnSize getSelectionIndex colSize fColumnSizes fPrefStore setValue IDebugPreferenceConstants PREF_COLUMN_SIZE colSize okPressed

public String get String String data Type Big Integer address Memory Byte data String padded Str return NON NLS 1  getString dataType BigInteger MemoryByte paddedStr
public byte get Bytes String data Type Big Integer address Memory Byte current Values String data return new byte 0  getBytes dataType BigInteger MemoryByte currentValues

public Format Column Action int num Bytes I Table Memory View Tab view Tab super String label if num Bytes 1 label String value Of num Bytes DebugUI Messages get String BYTES NON NLS 1 else label String value Of num Bytes DebugUI Messages get String BYTE NON NLS 1 super set Text label f View Tab view Tab check this action if the view tab is currently in this format if num Bytes f View Tab get Column Size set Checked true f Num Bytes Per Col num Bytes Workbench Help set Help this I DebugUI Constants PLUGIN ID FormatColumnAction context NON NLS 1  FormatColumnAction numBytes ITableMemoryViewTab viewTab numBytes valueOf numBytes DebugUIMessages getString valueOf numBytes DebugUIMessages getString setText fViewTab viewTab numBytes fViewTab getColumnSize setChecked fNumBytesPerCol numBytes WorkbenchHelp setHelp IDebugUIConstants PLUGIN_ID FormatColumnAction_context
see org eclipse jface action I Action run public void run f View Tab format f View Tab get Bytes Per Line f Num Bytes Per Col  IAction fViewTab fViewTab getBytesPerLine fNumBytesPerCol
public int get Column Size return f Num Bytes Per Col  getColumnSize fNumBytesPerCol

public Go To Address Action I Table Memory View Tab view Tab super DebugUI Messages get String TITLE f View Tab view Tab set Tool Tip Text DebugUI Messages get String TOOLTIP Workbench Help set Help this I DebugUI Constants PLUGIN ID GoToAddressAction context NON NLS 1 TODO set image  GoToAddressAction ITableMemoryViewTab viewTab DebugUIMessages getString fViewTab viewTab setToolTipText DebugUIMessages getString WorkbenchHelp setHelp IDebugUIConstants PLUGIN_ID GoToAddressAction_context
public void run try Shell shell DebugUI Plugin get Default get Workbench get Active Workbench Window get Shell create dialog to ask for expression address to block Go To Address Dialog dialog new Go To Address Dialog shell dialog open int return Code dialog get Return Code if return Code Window CANCEL return get expression from dialog String expression dialog get Expression expression expression to Upper Case expression expression trim if expression starts With 0X NON NLS 1 expression expression substring 2 convert expression to address Big Integer address new Big Integer expression 16 go to specified address f View Tab go To Address address open error in case of any error catch Debug Exception e Memory View Util open Error DebugUI Messages get String GO TO ADDRESS FAILED DebugUI Messages get String GO TO ADDRESS FAILED e catch Number Format Exception e1 Memory View Util open Error DebugUI Messages get String GO TO ADDRESS FAILED DebugUI Messages get String ADDRESS IS INVALID null  DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getShell GoToAddressDialog GoToAddressDialog returnCode getReturnCode returnCode getExpression toUpperCase startsWith BigInteger BigInteger fViewTab goToAddress DebugException MemoryViewUtil openError DebugUIMessages getString GO_TO_ADDRESS_FAILED DebugUIMessages getString GO_TO_ADDRESS_FAILED NumberFormatException MemoryViewUtil openError DebugUIMessages getString GO_TO_ADDRESS_FAILED DebugUIMessages getString ADDRESS_IS_INVALID

param parent Shell public Go To Address Dialog Shell parent Shell super parent Shell Workbench Help set Help parent Shell I DebugUI Constants PLUGIN ID GoToAddressDialog context NON NLS 1  parentShell GoToAddressDialog parentShell parentShell WorkbenchHelp setHelp parentShell IDebugUIConstants PLUGIN_ID GoToAddressDialog_context
protected Control create Dialog Area Composite parent parent set Layout new Grid Layout Grid Data spec2 new Grid Data spec2 grab Excess Vertical Space true spec2 grab Excess Horizontal Space true spec2 horizontal Alignment Grid Data FILL spec2 vertical Alignment Grid Data CENTER parent set Layout Data spec2 Label text Label new Label parent SWT NONE text Label set Text DebugUI Messages get String ADDRESS Grid Data text Layout new Grid Data text Layout width Hint 280 text Label set Layout Data text Layout expression Input new Combo parent SWT BORDER Grid Data spec new Grid Data spec grab Excess Vertical Space false spec grab Excess Horizontal Space true spec horizontal Alignment Grid Data FILL spec vertical Alignment Grid Data BEGINNING spec height Hint 50 expression Input set Layout Data spec add history String history Expression String history to Array new String history size for int i 0 i history Expression length i expression Input add history Expression i expression Input add Modify Listener this return parent  createDialogArea setLayout GridLayout GridData GridData grabExcessVerticalSpace grabExcessHorizontalSpace horizontalAlignment GridData verticalAlignment GridData setLayoutData textLabel textLabel setText DebugUIMessages getString GridData textLayout GridData textLayout widthHint textLabel setLayoutData textLayout expressionInput GridData GridData grabExcessVerticalSpace grabExcessHorizontalSpace horizontalAlignment GridData verticalAlignment GridData heightHint expressionInput setLayoutData historyExpression toArray historyExpression expressionInput historyExpression expressionInput addModifyListener
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text DebugUI Messages get String GO TO ADDRESS  configureShell newShell configureShell newShell newShell setText DebugUIMessages getString GO_TO_ADDRESS
public String get Expression return expression  getExpression
protected void ok Pressed expression expression Input get Text add to history list if history contains expression history insert Element At expression 0 super ok Pressed  okPressed expressionInput getText insertElementAt okPressed
public void modify Text Modify Event e String input expression Input get Text if input null input equals NON NLS 1 get Button I Dialog Constants OK ID set Enabled false else get Button I Dialog Constants OK ID set Enabled true  modifyText ModifyEvent expressionInput getText getButton IDialogConstants OK_ID setEnabled getButton IDialogConstants OK_ID setEnabled
protected Control create Button Bar Composite parent Control ret super create Button Bar parent get Button I Dialog Constants OK ID set Enabled false return ret  createButtonBar createButtonBar getButton IDialogConstants OK_ID setEnabled

public String get String String data Type Big Integer address Memory Byte data String padded Str String Buffer str Buffer new String Buffer for int i 0 i data length i if data i flags Memory Byte VALID 0 str Buffer append new String convert Byte To Char Array data i value else pad with padded string str Buffer append padded Str return str Buffer to String to Upper Case  getString dataType BigInteger MemoryByte paddedStr StringBuffer strBuffer StringBuffer MemoryByte strBuffer convertByteToCharArray strBuffer paddedStr strBuffer toString toUpperCase
public byte get Bytes String data Type Big Integer address Memory Byte current Values String data byte bytes convert Hex String To Byte Array data return bytes  getBytes dataType BigInteger MemoryByte currentValues convertHexStringToByteArray
see org eclipse debug internal ui views memory I Fixed Length Output Renderer get Num Char Per Byte public int get Num Char Per Byte return 2  IFixedLengthOutputRenderer getNumCharPerByte getNumCharPerByte
byte array to Hex string helper replaces the Integer to Hex String which can t convert byte values properly always pads with FFFFFF static public String convert Byte Array To Hex String byte byte Array String Buffer str Buffer new String Buffer char char Array for int i 0 i byte Array length i char Array convert Byte To Char Array byte Array i str Buffer append char Array return str Buffer to String  toHexString convertByteArrayToHexString byteArray StringBuffer strBuffer StringBuffer charArray byteArray charArray convertByteToCharArray byteArray strBuffer charArray strBuffer toString
static private char convert Byte To Char Array byte a Byte char char Array new char 2 int val a Byte if val 0 val 256 char Array 0 Character for Digit val 16 16 char Array 1 Character for Digit val 16 16 return char Array  convertByteToCharArray aByte charArray aByte charArray forDigit charArray forDigit charArray
Convert raw memory datat to byte array param str return throws Number Format Exception public byte convert Hex String To Byte Array String str throws Number Format Exception if str length get Num Char Per Byte return null byte bytes new byte str length get Num Char Per Byte set data in memory for int i 0 i bytes length i convert string to byte String one Byte str substring i 2 i 2 2 Integer number Integer value Of one Byte 16 if number compare To Integer value Of Byte to String Byte MAX VALUE 0 int temp number int Value temp temp 256 String temp Str Integer to String temp Byte my Byte Byte value Of temp Str bytes i my Byte byte Value else Byte my Byte Byte value Of one Byte 16 bytes i my Byte byte Value return bytes  NumberFormatException convertHexStringToByteArray NumberFormatException getNumCharPerByte getNumCharPerByte oneByte valueOf oneByte compareTo valueOf toString MAX_VALUE intValue tempStr toString myByte valueOf tempStr myByte byteValue myByte valueOf oneByte myByte byteValue

public Hex Rendering I Memory Block mem Block String rendering Id f Memory Block mem Block f Rendering Id rendering Id  HexRendering IMemoryBlock memBlock renderingId fMemoryBlock memBlock fRenderingId renderingId
see org eclipse debug ui I Memory Rendering get Block public I Memory Block get Block return f Memory Block  IMemoryRendering getBlock IMemoryBlock getBlock fMemoryBlock
see org eclipse debug ui I Memory Rendering get Rendering Id public String get Rendering Id return f Rendering Id  IMemoryRendering getRenderingId getRenderingId fRenderingId

public I Memory Rendering create Rendering I Memory Block memory Block String rendering Id return new Hex Rendering memory Block rendering Id  IMemoryRendering createRendering IMemoryBlock memoryBlock renderingId HexRendering memoryBlock renderingId

public interface I Fixed Length Output Renderer public int get Num Char Per Byte  IFixedLengthOutputRenderer getNumCharPerByte

param blk memory block the tab is monitoring param rendering Id rendering id of the tab return tab label for this memory block Return null if default is to be used Default tab label is expression evaluated address for I Extended Memory Block Base Address for I Memory Block  renderingId IExtendedMemoryBlock IMemoryBlock
param blk param bytes Per Line param column Size return column labels for the Memory View Tab of the memory block Size of the String array returned must equal to bytes Per Line column Size Return an empty array if default column labels are to be used  bytesPerLine columnSize MemoryViewTab bytesPerLine columnSize
param blk param address return the address presentation of the specfied address Return null if default address presentation is to be used 

Add the view to the synchronizer The view will be notified when one of the synchronization properties has changed param view the view listening for property changed events param filters list of properties the view tab is interested in Null if view tab is interested in all events 
Remove the view from the synchronizer The view will no longer be notified about changes in synchronization properties param view 
Sets a property to the synchronizer to be synchronized A change event will be fired if the value provided is different from the value stored in the synchronizer Otherwise no change event will be fired param memory Block param property Id param value  memoryBlock propertyId
Get the property from the synchronizer for a memory block param memory Block param property Id return  memoryBlock propertyId
Set up a list of properties that the view wishes to be notified about when the properties have changed param view view listening for property changed events param filters properties that the view are interested in Synchronizer will filter out events not listed in the filters Enter null when the view wishes to listen to all events 

public interface I Memory View return the top view tab from the Memory View public I Memory View Tab get Top Memory Tab  IMemoryView IMemoryViewTab getTopMemoryTab
public I Memory View Tab get Top Memory Tab return all view tabs from current tab folder public I Memory View Tab get All View Tabs  IMemoryViewTab getTopMemoryTab IMemoryViewTab getAllViewTabs
Move specified view tab to the top param view Tab  viewTab

public interface I Memory View Tab return the memory block blockied by the view tab public I Memory Block get Memory Block  IMemoryViewTab IMemoryBlock getMemoryBlock
Remove the view tab Memory block should not be removed from Memory Block Manager 
This function makes the cursor to go to the address provided If the address provided is not currently displayed on screen the view tab will ask for memory from the memory block to have that part of the memory displayed This function throws a Debug Exception if the call has failed param address throws Debug Exception  DebugException DebugException
This function resets the view tab to the base address of the memory block It will throw a Debug Exception if the call has failed throws Debug Exception  DebugException DebugException
This function refreshes the view tab with the most current data from the memory block If the base address of the memory block has changed it will reload at the new base address If the call has failed it would display an error on the view tab 
public void refresh return true if the view tab is displaying an error false otherwise public boolean is Displaying Error  isDisplayingError
return enablement state of the view tab public boolean is Enabled  isEnabled
Sets the enablament state of the view tab param enabled 
Sets the font to be used in a view tab param font 
Set view tab s label param label 
public void set Tab Label String label return view tab s label null if the label is not available public String get Tab Label  setTabLabel getTabLabel
public String get Tab Label return rendering id of this view tab public String get Rendering Id  getTabLabel getRenderingId
public String get Rendering Id return the rendering of this view tab public I Memory Rendering get Rendering  getRenderingId IMemoryRendering getRendering
Allow view tab to supply its own context menu actions Context menu extensions are hanled by the view param menu 
public void fill Context Menu I Menu Manager menu return selected address in the view tab public Big Integer get Selected Address  fillContextMenu IMenuManager BigInteger getSelectedAddress
return the content at the selected address View tab decides how long the content is and how much information to return Return empty string if content is not available 

Create a view tab based on the given parameters param new Memory is the memory block to be blocked by this memory view tab The view tab is responsible for blocking changes from the memory block and refreshing its content accordingly param new Tab is the tab item in the Memory View or Memory Rendering View used to display this view tab Implementor needs to set the created memory view tab as the data in the tab item i e call new Tab set Data memory view tab param menu Mgr is the menuger manager the view tab should used in creation of its context menu param rendering is the rendering to be displayed by the view tab param renderer is the object responsible for converting bytes to string and vice versa This field is optional and can be null return the memory view tab created null if the view tab cannot be created  newMemory newTab newTab setData menuMgr

public interface I Synchronized Memory Block View return the memory block that this view tab is blocking public I Memory Block get Memory Block  ISynchronizedMemoryBlockView IMemoryBlock getMemoryBlock
This function will be called when a property of the memory block being blocked is changed param property Name param value  propertyName
Return the value of a property Return null if the property is not supported by the view tab param property Id return  propertyId
public Object get Property String property Id return true if the view is enabled public boolean is Enabled  getProperty propertyId isEnabled

View tab will be formatted based on the parameters provided Possible value for bytes Per Line is 16 Although bytes Per Line is limited to 16 this function should still take this argument for future extension when other values are to be supported Possible values for column Size 1 2 4 8 16 param bytes Per Line param column Size return true if formatting is successful false otherwise  bytesPerLine bytesPerLine columnSize bytesPerLine columnSize
public boolean format int bytes Per Line int column Size return number of bytes per line from the view tab public int get Bytes Per Line  bytesPerLine columnSize getBytesPerLine
return number of bytes per column from the view tab public int get Column Size  getColumnSize
return number of visible lines from the view tab public int get Number Of Visible Lines  getNumberOfVisibleLines

public Memory Block View Synchronizer f Synchronize Info new Hashtable Memory Block Manager get Memory Block Manager add Listener this  MemoryBlockViewSynchronizer fSynchronizeInfo MemoryBlockManager getMemoryBlockManager addListener
public void add View I Synchronized Memory Block View view String filters I Memory Block key view get Memory Block if f Synchronize Info get key null create a synchronize info object for the memory block Synchronize Info new Info new Synchronize Info view get Memory Block f Synchronize Info put key new Info new Info add Synchronized View view filters else Synchronize Info info Synchronize Info f Synchronize Info get key info add Synchronized View view filters  addView ISynchronizedMemoryBlockView IMemoryBlock getMemoryBlock fSynchronizeInfo SynchronizeInfo newInfo SynchronizeInfo getMemoryBlock fSynchronizeInfo newInfo newInfo addSynchronizedView SynchronizeInfo SynchronizeInfo fSynchronizeInfo addSynchronizedView
public void remove View I Synchronized Memory Block View view I Memory Block key view get Memory Block if f Synchronize Info get key null return else Synchronize Info info Synchronize Info f Synchronize Info get key info remove Synchronized View view  removeView ISynchronizedMemoryBlockView IMemoryBlock getMemoryBlock fSynchronizeInfo SynchronizeInfo SynchronizeInfo fSynchronizeInfo removeSynchronizedView
public void set Synchronized Property I Memory Block memory Block String property Id Object value find the synchronize info object for the memory block Synchronize Info info Synchronize Info f Synchronize Info get memory Block if info is not available need to create one to hold the property if info null info new Synchronize Info memory Block f Synchronize Info put memory Block info get the value of the property Object old Value info get Property property Id if old Value null if the value has never been added to the info object set the property and fire a change event info set Property property Id value info fire Property Changed property Id return else if old Value equals value if the value has changed set the property and fire a change event info set Property property Id value info fire Property Changed property Id  setSynchronizedProperty IMemoryBlock memoryBlock propertyId SynchronizeInfo SynchronizeInfo fSynchronizeInfo memoryBlock SynchronizeInfo memoryBlock fSynchronizeInfo memoryBlock oldValue getProperty propertyId oldValue setProperty propertyId firePropertyChanged propertyId oldValue setProperty propertyId firePropertyChanged propertyId
public Object get Synchronized Property I Memory Block memory Block String property Id Synchronize Info info Synchronize Info f Synchronize Info get memory Block if info null Object value info get Property property Id return value return null  getSynchronizedProperty IMemoryBlock memoryBlock propertyId SynchronizeInfo SynchronizeInfo fSynchronizeInfo memoryBlock getProperty propertyId
public void Memory Block Added I Memory Block memory do nothing when a memory block is added create a synchronize info object when there is a f View tab registered to be synchronized  MemoryBlockAdded IMemoryBlock fView
public void Memory Block Removed I Memory Block memory delete the info object and remove it from f Synchronize Info when the memory block is deleted Synchronize Info info Synchronize Info f Synchronize Info get memory if info null info delete f Synchronize Info remove memory  MemoryBlockRemoved IMemoryBlock fSynchronizeInfo SynchronizeInfo SynchronizeInfo fSynchronizeInfo fSynchronizeInfo
public void set Property Filters I Synchronized Memory Block View view String filters I Memory Block blk view get Memory Block Synchronize Info info Synchronize Info f Synchronize Info get blk if info null info set Property Filters view filters  setPropertyFilters ISynchronizedMemoryBlockView IMemoryBlock getMemoryBlock SynchronizeInfo SynchronizeInfo fSynchronizeInfo setPropertyFilters
Clean up when the plugin is shutdown public void shutdown if f Synchronize Info null Enumeration enum f Synchronize Info elements clean up all synchronize info objects while enum has More Elements Synchronize Info info Synchronize Info enum next Element info delete f Synchronize Info clear f Synchronize Info null  fSynchronizeInfo fSynchronizeInfo hasMoreElements SynchronizeInfo SynchronizeInfo nextElement fSynchronizeInfo fSynchronizeInfo

public I Memory View Tab create View Tab I Memory Block new Memory Tab Item new Tab Menu Manager menu Mgr I Memory Rendering rendering Abstract Memory Renderer renderer return new Memory View Tab new Memory new Tab menu Mgr rendering renderer  IMemoryViewTab createViewTab IMemoryBlock newMemory TabItem newTab MenuManager menuMgr IMemoryRendering AbstractMemoryRenderer MemoryViewTab newMemory newTab menuMgr

class Viewer Page extends Page see I Page create Control Composite public void create Control Composite parent  ViewerPage IPage createControl createControl
public void create Control Composite parent see I Page get Control public Control get Control return null  createControl IPage getControl getControl
see I Page set Focus public void set Focus Viewer viewer get Viewer if viewer null Control c viewer get Control if c is Focus Control c set Focus  IPage setFocus setFocus getViewer getControl isFocusControl setFocus
Memory View f View null public Memory View Part Listener Memory View view f View view  MemoryView fView MemoryViewPartListener MemoryView fView
see org eclipse ui I Part Listener2 part Activated org eclipse ui I Workbench Part Reference public void part Activated I Workbench Part Reference ref  IPartListener2 partActivated IWorkbenchPartReference partActivated IWorkbenchPartReference
see org eclipse ui I Part Listener2 part Brought To Top org eclipse ui I Workbench Part Reference public void part Brought To Top I Workbench Part Reference ref  IPartListener2 partBroughtToTop IWorkbenchPartReference partBroughtToTop IWorkbenchPartReference
see org eclipse ui I Part Listener2 part Closed org eclipse ui I Workbench Part Reference public void part Closed I Workbench Part Reference ref  IPartListener2 partClosed IWorkbenchPartReference partClosed IWorkbenchPartReference
see org eclipse ui I Part Listener2 part Deactivated org eclipse ui I Workbench Part Reference public void part Deactivated I Workbench Part Reference ref  IPartListener2 partDeactivated IWorkbenchPartReference partDeactivated IWorkbenchPartReference
public void part Hidden I Workbench Part Reference ref I Workbench Part part ref get Part false if part f View f Visible false disable current storag block I Memory View Tab top get Top Memory Tab if top null top set Enabled false  partHidden IWorkbenchPartReference IWorkbenchPart getPart fView fVisible IMemoryViewTab getTopMemoryTab setEnabled
public void part Visible I Workbench Part Reference ref I Workbench Part part ref get Part false if part f View f Visible true get current selection from debug view I Selection selection DebugUI Plugin get Default get Workbench get Active Workbench Window get Selection Service get Selection I DebugUI Constants ID DEBUG VIEW if Memory View Util is Valid Selection selection Object elem I Structured Selection selection get First Element I Debug Target debug Target I Debug Element elem get Debug Target I Memory Block Retrieval mem Retrieval I Memory Block Retrieval I Debug Element elem get Adapter I Memory Block Retrieval class if mem Retrieval null if debug element returns null from get Adapter assume its debug target is going to retrieve memory blocks mem Retrieval debug Target if tab Folder Hashtable contains Key mem Retrieval Tab Folder to Display Tab Folder tab Folder Hashtable get mem Retrieval if to Display null set Tab Folder to Display parent layout restore view tabs I Memory Block memory Blocks Memory Block Manager get Memory Block Manager get Memory Blocks debug Target if to Display get Item Count 0 restore View Tabs memory Blocks disable current storag block I Memory View Tab top get Top Memory Tab if top null if top is Enabled top set Enabled true  partVisible IWorkbenchPartReference IWorkbenchPart getPart fView fVisible ISelection DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getSelectionService getSelection IDebugUIConstants ID_DEBUG_VIEW MemoryViewUtil isValidSelection IStructuredSelection getFirstElement IDebugTarget debugTarget IDebugElement getDebugTarget IMemoryBlockRetrieval memRetrieval IMemoryBlockRetrieval IDebugElement getAdapter IMemoryBlockRetrieval memRetrieval getAdapter memRetrieval debugTarget tabFolderHashtable containsKey memRetrieval TabFolder toDisplay TabFolder tabFolderHashtable memRetrieval toDisplay setTabFolder toDisplay IMemoryBlock memoryBlocks MemoryBlockManager getMemoryBlockManager getMemoryBlocks debugTarget toDisplay getItemCount restoreViewTabs memoryBlocks IMemoryViewTab getTopMemoryTab isEnabled setEnabled
see org eclipse ui I Part Listener2 part Input Changed org eclipse ui I Workbench Part Reference public void part Input Changed I Workbench Part Reference ref  IPartListener2 partInputChanged IWorkbenchPartReference partInputChanged IWorkbenchPartReference
public void part Opened I Workbench Part Reference ref  partOpened IWorkbenchPartReference
public void add Selection Changed Listener I Selection Changed Listener listener if f Listeners contains listener f Listeners add listener  addSelectionChangedListener ISelectionChangedListener fListeners fListeners
see org eclipse jface viewers I Selection Provider get Selection public I Selection get Selection return selected Memory Block  ISelectionProvider getSelection ISelection getSelection selectedMemoryBlock
public void remove Selection Changed Listener I Selection Changed Listener listener if f Listeners contains listener f Listeners remove listener  removeSelectionChangedListener ISelectionChangedListener fListeners fListeners
public void set Selection I Selection selection selected Memory Block selection fire Changed  setSelection ISelection selectedMemoryBlock fireChanged
public void widget Selected Selection Event e if get Top Memory Tab null return I Memory Block blk get Top Memory Tab get Memory Block if blk null set Selection new Structured Selection blk  widgetSelected SelectionEvent getTopMemoryTab IMemoryBlock getTopMemoryTab getMemoryBlock setSelection StructuredSelection
public void widget Default Selected Selection Event e  widgetDefaultSelected SelectionEvent
public void fire Changed Selection Changed Event evt new Selection Changed Event this get Selection for int i 0 i f Listeners size i I Selection Changed Listener f Listeners get i selection Changed evt  fireChanged SelectionChangedEvent SelectionChangedEvent getSelection fListeners ISelectionChangedListener fListeners selectionChanged
The constructor public Memory View  MemoryView
This is a callback that will allow us to create the viewer and initialize it public void create Part Control Composite parent super create Part Control parent this parent parent stack Layout new Stack Layout parent set Layout stack Layout Workbench Help set Help parent I DebugUI Constants PLUGIN ID MemoryView context NON NLS 1 f Selection Provider new Memory View Selection Provider f View Tab Enablement Manager new View Tab Enablement Manager contribute actions make Actions contribute To Action Bars get View Site get Action Bars update Action Bars empty Tab Folder new Tab Folder parent SWT NULL set Tab Folder empty Tab Folder tab Folder Hashtable new Hashtable 3 f Menu Mgr new Hashtable add Listeners check current selection and create folder if something is already selected from debug view I Selection selection DebugUI Plugin get Default get Workbench get Active Workbench Window get Selection Service get Selection I DebugUI Constants ID DEBUG VIEW if Memory View Util is Valid Selection selection create Folder selection f Visible true get Site set Selection Provider this f Selection Provider  createPartControl createPartControl stackLayout StackLayout setLayout stackLayout WorkbenchHelp setHelp IDebugUIConstants PLUGIN_ID MemoryView_context fSelectionProvider MemoryViewSelectionProvider fViewTabEnablementManager ViewTabEnablementManager makeActions contributeToActionBars getViewSite getActionBars updateActionBars emptyTabFolder TabFolder setTabFolder emptyTabFolder tabFolderHashtable fMenuMgr addListeners ISelection DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getSelectionService getSelection IDebugUIConstants ID_DEBUG_VIEW MemoryViewUtil isValidSelection createFolder fVisible getSite setSelectionProvider fSelectionProvider
protected void add Listeners f Listener new Memory View Part Listener this get Site get Page add Part Listener f Listener Memory Block Manager get Memory Block Manager add Listener this DebugUI Plugin get Default get Workbench get Active Workbench Window get Selection Service add Selection Listener I DebugUI Constants ID DEBUG VIEW this DebugUI Plugin get Default get Workbench get Active Workbench Window get Selection Service add Selection Listener I Memory View Constants MEMORY RENDERING VIEW ID this DebugUI Plugin get Default get Workbench get Active Workbench Window get Selection Service add Selection Listener this  addListeners fListener MemoryViewPartListener getSite getPage addPartListener fListener MemoryBlockManager getMemoryBlockManager addListener DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getSelectionService addSelectionListener IDebugUIConstants ID_DEBUG_VIEW DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getSelectionService addSelectionListener IMemoryViewConstants MEMORY_RENDERING_VIEW_ID DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getSelectionService addSelectionListener
menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager I Memory View Tab top get Top Memory Tab if top null top fill Context Menu manager manager add new Separator I Workbench Action Constants MB ADDITIONS  menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager IMemoryViewTab getTopMemoryTab fillContextMenu IWorkbenchActionConstants MB_ADDITIONS
private Menu Manager create Context Menu Manager Menu Manager menu Mgr new Menu Manager Popup Menu NON NLS 1 menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager I Memory View Tab top get Top Memory Tab if top null top fill Context Menu manager manager add new Separator I Workbench Action Constants MB ADDITIONS get Site register Context Menu menu Mgr f Selection Provider return menu Mgr  MenuManager createContextMenuManager MenuManager menuMgr MenuManager PopupMenu menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager IMemoryViewTab getTopMemoryTab fillContextMenu IWorkbenchActionConstants MB_ADDITIONS getSite registerContextMenu menuMgr fSelectionProvider menuMgr
private void contribute To Action Bars I Action Bars bars get View Site get Action Bars fill Local Tool Bar bars get Tool Bar Manager bars get Menu Manager add new Set Default Column Size Pref Action bars update Action Bars  contributeToActionBars IActionBars getViewSite getActionBars fillLocalToolBar getToolBarManager getMenuManager SetDefaultColumnSizePrefAction updateActionBars
protected void fill Context Menu I Menu Manager manager manager add add Memory Block Action manager add remove Memory Block Action manager add reset Memory Block Action Other plug ins can contribute there actions here manager add new Separator Additions NON NLS 1  fillContextMenu IMenuManager addMemoryBlockAction removeMemoryBlockAction resetMemoryBlockAction
protected void fill Local Tool Bar I Tool Bar Manager manager manager add add Memory Block Action manager add remove Memory Block Action manager add new Separator manager add reset Memory Block Action manager add copy View To Clipboard Action manager add print View Tab Action  fillLocalToolBar IToolBarManager addMemoryBlockAction removeMemoryBlockAction resetMemoryBlockAction copyViewToClipboardAction printViewTabAction
private void make Actions add Memory Block Action new Add Memory Block Action remove Memory Block Action new Remove Memory Block Action remove Memory Block Action set Enabled false reset Memory Block Action new Reset Memory Block Action reset Memory Block Action set Enabled false copy View To Clipboard Action new Copy View Tab To Clipboard Action copy View To Clipboard Action set Enabled false print View Tab Action new Print View Tab Action print View Tab Action set Enabled false  makeActions addMemoryBlockAction AddMemoryBlockAction removeMemoryBlockAction RemoveMemoryBlockAction removeMemoryBlockAction setEnabled resetMemoryBlockAction ResetMemoryBlockAction resetMemoryBlockAction setEnabled copyViewToClipboardAction CopyViewTabToClipboardAction copyViewToClipboardAction setEnabled printViewTabAction PrintViewTabAction printViewTabAction setEnabled
Passing the focus request to the viewer s control public void set Focus stack Layout top Control set Focus  setFocus stackLayout topControl setFocus
public void Memory Block Added I Memory Block memoryblk final I Memory Block memory memoryblk disable current view tab if get Top Memory Tab null get Top Memory Tab set Enabled false Tab Folder tab Folder Tab Folder stack Layout top Control Tab Item tab new Tab Item tab Folder SWT NULL create memory tab with new memory Memory View Tab memory Tab create a new menu manager for each view tab menu manager will be cleaned up when the view tab is disposed or when the view is disposed Menu Manager menu Mgr create Context Menu Manager Hex Rendering hex Rendering new Hex Rendering memory I Memory View Constants RENDERING RAW MEMORY memory Tab new Memory View Tab memory tab menu Mgr hex Rendering new Hex Renderer put to hashtable to be cleaned up later f Menu Mgr put memory Tab menu Mgr bring new tab to the front tab Folder set Selection tab Folder index Of memory Tab get Tab bringing the tab to the front causes the view tab s cursor to lose focus this is a work around to force focus to the cursor when the tab is created memory Tab set Cursor Focus update Tool Bar Actions Enablement f Selection Provider set Selection new Structured Selection memory Tab get Memory Block ask debug target about memeory retrieval I Debug Target debug Target memory get Debug Target I Memory Block Retrieval standard Mem Retrieval I Memory Block Retrieval memory get Adapter I Memory Block Retrieval class if standard Mem Retrieval null if get Adapter returns null assume we only have one language under the debug target make use of the debug target to get I Memory Block standard Mem Retrieval debug Target  MemoryBlockAdded IMemoryBlock IMemoryBlock getTopMemoryTab getTopMemoryTab setEnabled TabFolder tabFolder TabFolder stackLayout topControl TabItem TabItem tabFolder MemoryViewTab memoryTab MenuManager menuMgr createContextMenuManager HexRendering hexRendering HexRendering IMemoryViewConstants RENDERING_RAW_MEMORY memoryTab MemoryViewTab menuMgr hexRendering HexRenderer fMenuMgr memoryTab menuMgr tabFolder setSelection tabFolder indexOf memoryTab getTab memoryTab setCursorFocus updateToolBarActionsEnablement fSelectionProvider setSelection StructuredSelection memoryTab getMemoryBlock IDebugTarget debugTarget getDebugTarget IMemoryBlockRetrieval standardMemRetrieval IMemoryBlockRetrieval getAdapter IMemoryBlockRetrieval standardMemRetrieval getAdapter IMemoryBlock standardMemRetrieval debugTarget
public void Memory Block Removed I Memory Block memoryblk final I Memory Block memory memoryblk need to run the following code on the UI Thread to avoid invalid thread access exception Display get Default async Exec new Runnable public void run Tab Folder tab Folder Tab Folder stack Layout top Control if tab Folder is Disposed return Tab Item tabs tab Folder get Items boolean found Tab false for int i 0 i tabs length i I Memory View Tab view Tab I Memory View Tab tabs i get Data if view Tab get Memory Block memory dispose View Tab view Tab tabs i found Tab true break if found Tab if tab Folder get Item Count 0 remove Memory Block Action set Enabled false reset Memory Block Action set Enabled false copy View To Clipboard Action set Enabled false print View Tab Action set Enabled false if there is no more item in the top tab folder set selection as empty f Selection Provider set Selection new Structured Selection new Object 0 if there is no item left in the folder and if the debug target for the last memory block has been terminated Clean up the tab folder and use the Empty Tab Folder for display I Debug Target dt memory get Debug Target if dt is Terminated dt is Disconnected if key null tab Folder Hashtable remove key if tab Folder is Disposed tab Folder dispose empty Folder if a tab is not found in the current top control this deletion is a result of a debug target termination find memory from other folder and dispose the view tab if found Tab Enumeration enum tab Folder Hashtable elements while enum has More Elements tab Folder Tab Folder enum next Element tabs tab Folder get Items I Memory View Tab view Tab null for int i 0 i tabs length i view Tab I Memory View Tab tabs i get Data if view Tab get Memory Block memory dispose View Tab view Tab tabs i found Tab true break if found Tab if tab Folder get Item Count 0 if there is no item left in the folder and if the debug target for the last memory block has been terminated Clean up the tab folder and use the Empty Tab Folder for display I Debug Target dt memory get Debug Target if dt is Terminated dt is Disconnected Enumeration key Enum tab Folder Hashtable keys Object tab Key null while key Enum has More Elements tab Key key Enum next Element if tab Folder Hashtable get tab Key tab Folder break dispose of the folder if it no longer contains anything if tab Folder is Disposed tab Folder dispose remove the folder from the hashtable if tab Key null tab Folder Hashtable remove tab Key use empty folder for display empty Folder break  MemoryBlockRemoved IMemoryBlock IMemoryBlock getDefault asyncExec TabFolder tabFolder TabFolder stackLayout topControl tabFolder isDisposed TabItem tabFolder getItems foundTab IMemoryViewTab viewTab IMemoryViewTab getData viewTab getMemoryBlock disposeViewTab viewTab foundTab foundTab tabFolder getItemCount removeMemoryBlockAction setEnabled resetMemoryBlockAction setEnabled copyViewToClipboardAction setEnabled printViewTabAction setEnabled fSelectionProvider setSelection StructuredSelection EmptyTabFolder IDebugTarget getDebugTarget isTerminated isDisconnected tabFolderHashtable tabFolder isDisposed tabFolder emptyFolder foundTab tabFolderHashtable hasMoreElements tabFolder TabFolder nextElement tabFolder getItems IMemoryViewTab viewTab viewTab IMemoryViewTab getData viewTab getMemoryBlock disposeViewTab viewTab foundTab foundTab tabFolder getItemCount EmptyTabFolder IDebugTarget getDebugTarget isTerminated isDisconnected keyEnum tabFolderHashtable tabKey keyEnum hasMoreElements tabKey keyEnum nextElement tabFolderHashtable tabKey tabFolder tabFolder isDisposed tabFolder tabKey tabFolderHashtable tabKey emptyFolder
public void dispose remove Listeners dispose empty folders empty Tab Folder dispose dispose all other folders try if tab Folder Hashtable null Enumeration enum tab Folder Hashtable elements while enum has More Elements Tab Folder tab Folder Tab Folder enum next Element if tab Folder is Disposed continue if tab folder is not empty dipose view tabs Tab Item tabs tab Folder get Items for int i 0 i tabs length i I Memory View Tab view Tab I Memory View Tab tabs i get Data if tabs i is Disposed dispose View Tab view Tab tabs i tab Folder dispose set to null so that clean up is only done once tab Folder Hashtable null catch Exception e Status status new Status I Status ERROR DebugUI Plugin get Unique Identifier 0 Exception occurred when the Memory View is disposed e NON NLS 1 DebugUI Plugin log status super dispose  removeListeners emptyTabFolder tabFolderHashtable tabFolderHashtable hasMoreElements TabFolder tabFolder TabFolder nextElement tabFolder isDisposed TabItem tabFolder getItems IMemoryViewTab viewTab IMemoryViewTab getData isDisposed disposeViewTab viewTab tabFolder tabFolderHashtable IStatus DebugUIPlugin getUniqueIdentifier DebugUIPlugin
private void remove Listeners remove listeners Memory Block Manager get Memory Block Manager remove Listener this DebugUI Plugin get Default get Workbench get Active Workbench Window get Selection Service remove Selection Listener I DebugUI Constants ID DEBUG VIEW this DebugUI Plugin get Default get Workbench get Active Workbench Window get Selection Service remove Selection Listener I Memory View Constants MEMORY RENDERING VIEW ID this DebugUI Plugin get Default get Workbench get Active Workbench Window get Selection Service remove Selection Listener this get Site get Page remove Part Listener f Listener f Listener null  removeListeners MemoryBlockManager getMemoryBlockManager removeListener DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getSelectionService removeSelectionListener IDebugUIConstants ID_DEBUG_VIEW DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getSelectionService removeSelectionListener IMemoryViewConstants MEMORY_RENDERING_VIEW_ID DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getSelectionService removeSelectionListener getSite getPage removePartListener fListener fListener
protected I Page create Default Page Page Book book Memory View Viewer Page page new Memory View Viewer Page page create Control book init Page page return page  IPage createDefaultPage PageBook MemoryView ViewerPage MemoryView ViewerPage createControl initPage
see org eclipse ui part Page Book View do Create Page org eclipse ui I Workbench Part protected Page Rec do Create Page I Workbench Part part return null  PageBookView doCreatePage IWorkbenchPart PageRec doCreatePage IWorkbenchPart
see org eclipse ui part Page Book View do Destroy Page org eclipse ui I Workbench Part org eclipse ui part Page Book View Page Rec protected void do Destroy Page I Workbench Part part Page Rec page Record  PageBookView doDestroyPage IWorkbenchPart PageBookView PageRec doDestroyPage IWorkbenchPart PageRec pageRecord
see org eclipse ui part Page Book View get Bootstrap Part protected I Workbench Part get Bootstrap Part return null  PageBookView getBootstrapPart IWorkbenchPart getBootstrapPart
see org eclipse ui part Page Book View is Important org eclipse ui I Workbench Part protected boolean is Important I Workbench Part part return false  PageBookView isImportant IWorkbenchPart isImportant IWorkbenchPart
see org eclipse debug ui I Debug View get Viewer public Viewer get Viewer return null  IDebugView getViewer getViewer
see org eclipse debug ui I Debug View get Presentation java lang String public I Debug Model Presentation get Presentation String id return null  IDebugView getPresentation IDebugModelPresentation getPresentation
see org eclipse debug ui I Debug View set Action java lang String org eclipse jface action I Action public void set Action String actionID I Action action  IDebugView setAction IAction setAction IAction
see org eclipse debug ui I Debug View add org eclipse ui texteditor I Update public void add I Update updatable  IDebugView IUpdate IUpdate
see org eclipse debug ui I Debug View remove org eclipse ui texteditor I Update public void remove I Update updatable  IDebugView IUpdate IUpdate
see org eclipse debug ui I Debug View get Action java lang String public I Action get Action String actionID return null  IDebugView getAction IAction getAction
see org eclipse debug ui I Debug View get Context Menu Manager public I Menu Manager get Context Menu Manager return null  IDebugView getContextMenuManager IMenuManager getContextMenuManager
public I Memory View Tab get Top Memory Tab if stack Layout top Control instanceof Tab Folder Tab Folder folder Tab Folder stack Layout top Control int index folder get Selection Index if index 0 Tab Item tab folder get Item index return I Memory View Tab tab get Data return null  IMemoryViewTab getTopMemoryTab stackLayout topControl TabFolder TabFolder TabFolder stackLayout topControl getSelectionIndex TabItem getItem IMemoryViewTab getData
public void selection Changed I Workbench Part part I Selection selection try if part this return if selection instanceof I Structured Selection return back up current view tab I Memory View Tab last View Tab get Top Memory Tab only single selection of I Debug Element is allowed for this action if selection null selection is Empty I Structured Selection selection size 1 do not do anything if there is no selection or if there is more than one selection In the case when a debug adpater fires a debug event incorrectly Launch View sets selection to nothing If the view tab is disabled it erases all the delta information in the content This may not be desirable as it will cause memory to show up as unchanged when it s actually changed Do not disable the view tab until there is a valid selection return Object elem I Structured Selection selection get First Element if elem instanceof I Memory Rendering handle Memory Block Selection last View Tab I Memory Rendering elem get Block else if elem instanceof I Memory Block handle Memory Block Selection last View Tab I Memory Block elem else if elem instanceof I Debug Element handle Debug Element Selection last View Tab I Debug Element elem else if part get Site get Id equals I DebugUI Constants ID DEBUG VIEW if last View Tab null last View Tab set Enabled false empty Folder key null return catch SWT Exception se Status status new Status I Status ERROR DebugUI Plugin get Unique Identifier 0 SWT Exception occurred in Memory View selection changed se NON NLS 1 DebugUI Plugin log status  selectionChanged IWorkbenchPart ISelection IStructuredSelection IMemoryViewTab lastViewTab getTopMemoryTab IDebugElement isEmpty IStructuredSelection IStructuredSelection getFirstElement IMemoryRendering handleMemoryBlockSelection lastViewTab IMemoryRendering getBlock IMemoryBlock handleMemoryBlockSelection lastViewTab IMemoryBlock IDebugElement handleDebugElementSelection lastViewTab IDebugElement getSite getId IDebugUIConstants ID_DEBUG_VIEW lastViewTab lastViewTab setEnabled emptyFolder SWTException IStatus DebugUIPlugin getUniqueIdentifier DebugUIPlugin
private void handle Memory Block Selection final I Memory View Tab last View Tab final I Memory Block memory Block check top view tab if already showing the memory block do nothing if get Top Memory Tab null if get Top Memory Tab get Memory Block memory Block return otherwise find the memory block to display Tab Folder folder Tab Folder stack Layout top Control Tab Item items folder get Items for int i 0 i items length i I Memory View Tab view Tab I Memory View Tab items i get Data if view Tab get Memory Block memory Block boolean is Enabled last View Tab is Enabled switch to that memory block last View Tab set Enabled false folder set Selection i f Selection Provider set Selection new Structured Selection memory Block get Top Memory Tab set Enabled is Enabled break else do nothing since there is nothing else to display  handleMemoryBlockSelection IMemoryViewTab lastViewTab IMemoryBlock memoryBlock getTopMemoryTab getTopMemoryTab getMemoryBlock memoryBlock TabFolder TabFolder stackLayout topControl TabItem getItems IMemoryViewTab viewTab IMemoryViewTab getData viewTab getMemoryBlock memoryBlock isEnabled lastViewTab isEnabled lastViewTab setEnabled setSelection fSelectionProvider setSelection StructuredSelection memoryBlock getTopMemoryTab setEnabled isEnabled
private void handle Debug Element Selection I Memory View Tab last View Tab I Debug Element elem find the folder associated with the given I Memory Block Retrieval I Memory Block Retrieval retrieve I Memory Block Retrieval elem get Adapter I Memory Block Retrieval class I Debug Target debug Target elem get Debug Target if I Memory Block Retrieval is null use debugtarget if retrieve null retrieve debug Target key retrieve if debug Target null debug Target is Terminated debug Target is Disconnected empty Folder if tab Folder Hashtable null if tab Folder Hashtable contains Key key Tab Folder delete Folder Tab Folder tab Folder Hashtable get key dispose folder if not already disposed if delete Folder is Disposed delete Folder dispose tab Folder Hashtable remove key key null return should never get here added code for safety if tab Folder Hashtable null empty Folder key null return if we ve got a tabfolder to go with the I Memory Block Retrieval display it if tab Folder Hashtable contains Key retrieve if stack Layout top Control Tab Folder tab Folder Hashtable get retrieve set Tab Folder Tab Folder tab Folder Hashtable get retrieve parent layout else otherwise add a new one tab Folder Hashtable put retrieve new Tab Folder parent SWT NULL set Tab Folder Tab Folder tab Folder Hashtable get retrieve parent layout restore view tabs based on memory block retrieval I Memory Block memory Blocks Memory Block Manager get Memory Block Manager get Memory Blocks retrieve Tab Folder to Display Tab Folder stack Layout top Control if to Display get Item Count 0 restore View Tabs memory Blocks disable last view tab as it becomes hidden I Memory View Tab new View Tab get Top Memory Tab if last View Tab null last View Tab new View Tab last View Tab set Enabled false if new View Tab null if new view tab is not already enabled enable it if new View Tab is Enabled if the view tab is visible enable it if f Visible new View Tab set Enabled true f Selection Provider set Selection new Structured Selection new View Tab get Memory Block set toolbar actions enabled disabled update Tool Bar Actions Enablement  handleDebugElementSelection IMemoryViewTab lastViewTab IDebugElement IMemoryBlockRetrieval IMemoryBlockRetrieval IMemoryBlockRetrieval getAdapter IMemoryBlockRetrieval IDebugTarget debugTarget getDebugTarget IMemoryBlockRetrieval debugTarget debugTarget debugTarget isTerminated debugTarget isDisconnected emptyFolder tabFolderHashtable tabFolderHashtable containsKey TabFolder deleteFolder TabFolder tabFolderHashtable deleteFolder isDisposed deleteFolder tabFolderHashtable tabFolderHashtable emptyFolder IMemoryBlockRetrieval tabFolderHashtable containsKey stackLayout topControl TabFolder tabFolderHashtable setTabFolder TabFolder tabFolderHashtable tabFolderHashtable TabFolder setTabFolder TabFolder tabFolderHashtable IMemoryBlock memoryBlocks MemoryBlockManager getMemoryBlockManager getMemoryBlocks TabFolder toDisplay TabFolder stackLayout topControl toDisplay getItemCount restoreViewTabs memoryBlocks IMemoryViewTab newViewTab getTopMemoryTab lastViewTab lastViewTab newViewTab lastViewTab setEnabled newViewTab newViewTab isEnabled fVisible newViewTab setEnabled fSelectionProvider setSelection StructuredSelection newViewTab getMemoryBlock updateToolBarActionsEnablement
protected void empty Folder set Tab Folder empty Tab Folder if parent is Disposed parent layout this folder will always remain empty remove button should always be disabled remove Memory Block Action set Enabled false reset Memory Block Action set Enabled false copy View To Clipboard Action set Enabled false print View Tab Action set Enabled false f Selection Provider set Selection new Structured Selection new Object 0  emptyFolder setTabFolder emptyTabFolder isDisposed removeMemoryBlockAction setEnabled resetMemoryBlockAction setEnabled copyViewToClipboardAction setEnabled printViewTabAction setEnabled fSelectionProvider setSelection StructuredSelection
private void create Folder I Selection selection if selection instanceof I Structured Selection return only single selection of PICL Debug Elements is allowed for this action if selection null selection is Empty I Structured Selection selection size 1 return Object elem I Structured Selection selection get First Element if not debug element if elem instanceof I Debug Element return I Debug Target debug Target I Debug Element elem get Debug Target I Memory Block Retrieval mem Retrieval I Memory Block Retrieval I Debug Element elem get Adapter I Memory Block Retrieval class if mem Retrieval null if debug element returns null from get Adapter assume its debug target is going to retrieve memory blocks mem Retrieval debug Target if we ve got a tabfolder to go with the I Memory Block Retrieval display it if tab Folder Hashtable contains Key mem Retrieval if stack Layout top Control Tab Folder tab Folder Hashtable get mem Retrieval set Tab Folder Tab Folder tab Folder Hashtable get mem Retrieval parent layout else otherwise add a new one tab Folder Hashtable put mem Retrieval new Tab Folder parent SWT NULL set Tab Folder Tab Folder tab Folder Hashtable get mem Retrieval parent layout set toolbar actions enabled disabled update Tool Bar Actions Enablement  createFolder ISelection IStructuredSelection PICLDebugElements isEmpty IStructuredSelection IStructuredSelection getFirstElement IDebugElement IDebugTarget debugTarget IDebugElement getDebugTarget IMemoryBlockRetrieval memRetrieval IMemoryBlockRetrieval IDebugElement getAdapter IMemoryBlockRetrieval memRetrieval getAdapter memRetrieval debugTarget IMemoryBlockRetrieval tabFolderHashtable containsKey memRetrieval stackLayout topControl TabFolder tabFolderHashtable memRetrieval setTabFolder TabFolder tabFolderHashtable memRetrieval tabFolderHashtable memRetrieval TabFolder setTabFolder TabFolder tabFolderHashtable memRetrieval updateToolBarActionsEnablement
enable disable toolbar action protected void update Tool Bar Actions Enablement Tab Folder folder Tab Folder stack Layout top Control int index folder get Selection Index if index 0 remove Memory Block Action set Enabled true reset Memory Block Action set Enabled true copy View To Clipboard Action set Enabled true print View Tab Action set Enabled true else remove Memory Block Action set Enabled false reset Memory Block Action set Enabled false copy View To Clipboard Action set Enabled false print View Tab Action set Enabled false  updateToolBarActionsEnablement TabFolder TabFolder stackLayout topControl getSelectionIndex removeMemoryBlockAction setEnabled resetMemoryBlockAction setEnabled copyViewToClipboardAction setEnabled printViewTabAction setEnabled removeMemoryBlockAction setEnabled resetMemoryBlockAction setEnabled copyViewToClipboardAction setEnabled printViewTabAction setEnabled
private void restore View Tabs I Memory Block memory Blocks for int i 0 i memory Blocks length i enable to get latest data if memory Blocks i instanceof I Extended Memory Block I Extended Memory Block memory Blocks i enable Memory Block Added memory Blocks i disable after done if memory Blocks i instanceof I Extended Memory Block I Extended Memory Block memory Blocks i disable enable memory block I Memory View Tab view Tab get Top Memory Tab if view Tab null if view Tab get Memory Block instanceof I Extended Memory Block I Extended Memory Block view Tab get Memory Block enable  restoreViewTabs IMemoryBlock memoryBlocks memoryBlocks memoryBlocks IExtendedMemoryBlock IExtendedMemoryBlock memoryBlocks MemoryBlockAdded memoryBlocks memoryBlocks IExtendedMemoryBlock IExtendedMemoryBlock memoryBlocks IMemoryViewTab viewTab getTopMemoryTab viewTab viewTab getMemoryBlock IExtendedMemoryBlock IExtendedMemoryBlock viewTab getMemoryBlock
private void set Tab Folder Tab Folder folder if stack Layout top Control null Tab Folder old Tab Folder stack Layout top Control if old is Disposed old remove Selection Listener f Selection Provider old remove Selection Listener f View Tab Enablement Manager stack Layout top Control folder if folder get Item Count 0 Tab Item selected Item folder get Selection if selected Item length 0 I Memory View Tab view Tab I Memory View Tab selected Item 0 get Data f Selection Provider set Selection new Structured Selection view Tab get Memory Block else f Selection Provider set Selection new Structured Selection folder add Selection Listener f Selection Provider folder add Selection Listener f View Tab Enablement Manager  setTabFolder TabFolder stackLayout topControl TabFolder TabFolder stackLayout topControl isDisposed removeSelectionListener fSelectionProvider removeSelectionListener fViewTabEnablementManager stackLayout topControl getItemCount TabItem selectedItem getSelection selectedItem IMemoryViewTab viewTab IMemoryViewTab selectedItem getData fSelectionProvider setSelection StructuredSelection viewTab getMemoryBlock fSelectionProvider setSelection StructuredSelection addSelectionListener fSelectionProvider addSelectionListener fViewTabEnablementManager
private void dispose View Tab I Memory View Tab view Tab Tab Item tab Item if view Tab null return get menu manager and clean up I Menu Manager menu Mgr I Menu Manager f Menu Mgr get view Tab if menu Mgr null menu Mgr dispose view Tab dispose if tab Item null return dispose the tab item in case the view tab has not cleaned up the tab item if tab Item is Disposed tab Item dispose  disposeViewTab IMemoryViewTab viewTab TabItem tabItem viewTab IMenuManager menuMgr IMenuManager fMenuMgr viewTab menuMgr menuMgr viewTab tabItem tabItem isDisposed tabItem
public I Memory View Tab get All View Tabs otherwise find the view tab to display Tab Folder folder Tab Folder stack Layout top Control Tab Item items folder get Items I Memory View Tab view Tabs new I Memory View Tab folder get Item Count for int i 0 i items length i view Tabs i I Memory View Tab items i get Data return view Tabs  IMemoryViewTab getAllViewTabs TabFolder TabFolder stackLayout topControl TabItem getItems IMemoryViewTab viewTabs IMemoryViewTab getItemCount viewTabs IMemoryViewTab getData viewTabs
public void move To Top I Memory View Tab view Tab I Memory View Tab last View Tab get Top Memory Tab if view Tab last View Tab return otherwise find the view tab to display Tab Folder folder Tab Folder stack Layout top Control Tab Item items folder get Items for int i 0 i items length i I Memory View Tab tab I Memory View Tab items i get Data if view Tab tab boolean is Enabled last View Tab is Enabled switch to that view Tab last View Tab set Enabled false folder set Selection i f Selection Provider set Selection new Structured Selection get Top Memory Tab get Memory Block get Top Memory Tab set Enabled is Enabled break  moveToTop IMemoryViewTab viewTab IMemoryViewTab lastViewTab getTopMemoryTab viewTab lastViewTab TabFolder TabFolder stackLayout topControl TabItem getItems IMemoryViewTab IMemoryViewTab getData viewTab isEnabled lastViewTab isEnabled viewTab lastViewTab setEnabled setSelection fSelectionProvider setSelection StructuredSelection getTopMemoryTab getMemoryBlock getTopMemoryTab setEnabled isEnabled

private I Table Memory View Tab f View Tab public Memory View Cell Modifier I Table Memory View Tab view Tab f View Tab view Tab  ITableMemoryViewTab fViewTab MemoryViewCellModifier ITableMemoryViewTab viewTab fViewTab viewTab
public boolean can Modify Object element String property boolean can Modify true try if element instanceof Memory View Line return false if edit Action Invoked return false if f View Tab null return false if f View Tab get Memory Block supports Value Modification false return false Memory View Line line Memory View Line element if Memory View Line P ADDRESS equals property return false else int offset Integer value Of property 16 int Value int end offset f View Tab get Column Size for int i offset i end i Memory Byte one Byte line get Byte i if one Byte flags Memory Byte VALID Memory Byte VALID one Byte flags Memory Byte READONLY Memory Byte READONLY if one Byte flags Memory Byte READONLY Memory Byte READONLY can Modify false return can Modify catch Number Format Exception e can Modify false return can Modify  canModify canModify MemoryViewLine editActionInvoked fViewTab fViewTab getMemoryBlock supportsValueModification MemoryViewLine MemoryViewLine MemoryViewLine P_ADDRESS valueOf intValue fViewTab getColumnSize MemoryByte oneByte getByte oneByte MemoryByte MemoryByte oneByte MemoryByte MemoryByte oneByte MemoryByte MemoryByte canModify canModify NumberFormatException canModify canModify
public Object get Value Object element String property give back the value of the column if element instanceof Memory View Line return null Memory View Line line Memory View Line element try if Memory View Line P ADDRESS equals property return line get Address else int offset Integer value Of property 16 int Value int end offset f View Tab get Column Size Ask for label provider Memory Byte memory line get Bytes offset end I Base Label Provider label Provider Memory View Tab f View Tab get Table Viewer get Label Provider if label Provider instanceof Abstract Table View Tab Label Provider if line is Available offset end ask the renderer for a string representation of the bytes offset Integer value Of property 16 int Value Abstract Memory Renderer renderer Abstract Table View Tab Label Provider label Provider get Renderer Big Integer address new Big Integer Memory View Line element get Address 16 address address add Big Integer value Of offset return renderer get String f View Tab get Rendering Id address memory line get Padded String else if the range is not available just return padded string return line get Padded String offset end return NON NLS 1 catch Number Format Exception e return 00 NON NLS 1  getValue MemoryViewLine MemoryViewLine MemoryViewLine MemoryViewLine P_ADDRESS getAddress valueOf intValue fViewTab getColumnSize MemoryByte getBytes IBaseLabelProvider labelProvider MemoryViewTab fViewTab getTableViewer getLabelProvider labelProvider AbstractTableViewTabLabelProvider isAvailable valueOf intValue AbstractMemoryRenderer AbstractTableViewTabLabelProvider labelProvider getRenderer BigInteger BigInteger MemoryViewLine getAddress BigInteger valueOf getString fViewTab getRenderingId getPaddedString getPaddedString NumberFormatException
public void modify Object element String property Object value Memory View Line line null if element instanceof Memory View Line line Memory View Line Table Item element get Data else line Memory View Line element calculate offset to update I Memory Block memory f View Tab get Memory Block int line Offset Integer value Of property 16 int Value long offset get Offset memory line get Address line Offset validate data if value instanceof String return if f View Tab instanceof Memory View Tab return try byte bytes null String old Value String get Value line property if old Value equals value try label provider I Base Label Provider label Provider Memory View Tab f View Tab get Table Viewer get Label Provider if label Provider instanceof Abstract Table View Tab Label Provider int offset To Line Integer value Of property 16 int Value int end offset To Line f View Tab get Column Size Memory Byte old Array line get Bytes offset To Line end Big Integer address new Big Integer line get Address 16 address address add Big Integer value Of offset To Line bytes Abstract Table View Tab Label Provider label Provider get Renderer get Bytes f View Tab get Rendering Id address old Array String value if bytes null return if bytes length 0 return else return else return if value has not changed return memory set Value offset bytes catch Debug Exception e Memory View Util open Error DebugUI Messages get String TITLE DebugUI Messages get String FAILED e catch Number Format Exception e Memory View Util open Error DebugUI Messages get String TITLE DebugUI Messages get String FAILED n DebugUI Messages get String DATA IS INVALID null NON NLS 1  MemoryViewLine MemoryViewLine MemoryViewLine TableItem getData MemoryViewLine IMemoryBlock fViewTab getMemoryBlock lineOffset valueOf intValue getOffset getAddress lineOffset fViewTab MemoryViewTab oldValue getValue oldValue IBaseLabelProvider labelProvider MemoryViewTab fViewTab getTableViewer getLabelProvider labelProvider AbstractTableViewTabLabelProvider offsetToLine valueOf intValue offsetToLine fViewTab getColumnSize MemoryByte oldArray getBytes offsetToLine BigInteger BigInteger getAddress BigInteger valueOf offsetToLine AbstractTableViewTabLabelProvider labelProvider getRenderer getBytes fViewTab getRenderingId oldArray setValue DebugException MemoryViewUtil openError DebugUIMessages getString DebugUIMessages getString NumberFormatException MemoryViewUtil openError DebugUIMessages getString DebugUIMessages getString DebugUIMessages getString DATA_IS_INVALID
private long get Offset I Memory Block memory String line Address int line Offset Big Integer line Addr new Big Integer line Address 16 Big Integer memory Addr if memory instanceof I Extended Memory Block memory Addr I Extended Memory Block memory get Big Base Address else memory Addr Big Integer value Of memory get Start Address if memory Addr null memory Addr new Big Integer 0 NON NLS 1 long offset line Addr subtract memory Addr long Value return offset line Offset  getOffset IMemoryBlock lineAddress lineOffset BigInteger lineAddr BigInteger lineAddress BigInteger memoryAddr IExtendedMemoryBlock memoryAddr IExtendedMemoryBlock getBigBaseAddress memoryAddr BigInteger valueOf getStartAddress memoryAddr memoryAddr BigInteger lineAddr memoryAddr longValue lineOffset
param edit Action Invoked The edit Action Invoked to set public void set Edit Action Invoked boolean edit Action Invoked this edit Action Invoked edit Action Invoked  editActionInvoked editActionInvoked setEditActionInvoked editActionInvoked editActionInvoked editActionInvoked

protected M Byte byte value byte flags this value value this flags flags  MByte
protected M Byte  MByte
param memory Block param new Tab public Memory View Content Provider I Memory Block memory Block Tab Item new Tab f Memory Block memory Block f Tab Item new Tab line Cache new Vector content Cache new Hashtable f View Tab Memory View Tab f Tab Item get Data Debug Plugin get Default add Debug Event Listener this  memoryBlock newTab MemoryViewContentProvider IMemoryBlock memoryBlock TabItem newTab fMemoryBlock memoryBlock fTabItem newTab lineCache contentCache fViewTab MemoryViewTab fTabItem getData DebugPlugin getDefault addDebugEventListener
param viewer public void set Viewer Structured Viewer viewer f Viewer viewer  setViewer StructuredViewer fViewer
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer v Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
public void dispose f Tab Item disposed by view tab Debug Plugin get Default remove Debug Event Listener this super dispose  fTabItem DebugPlugin getDefault removeDebugEventListener
public Object get Elements Object parent if cache is empty get memory if line Cache is Empty try if f Memory Block instanceof I Extended Memory Block calculate top buffered address Big Integer address I Extended Memory Block f Memory Block get Big Base Address if address null address new Big Integer 0 NON NLS 1 Memory View Tab view Tab Memory View Tab f Tab Item get Data Big Integer big Int address if big Int compare To Big Integer value Of 32 0 view Tab TABLE PREBUFFER 0 else view Tab TABLE PREBUFFER big Int divide Big Integer value Of 32 min Big Integer value Of view Tab TABLE DEFAULTBUFFER int Value address big Int subtract Big Integer value Of f View Tab get Bytes Per Line view Tab TABLE PREBUFFER get stoarage to fit the memory view tab size get Memory To Fit Table address f View Tab get Number Of Visible Lines view Tab TABLE PREBUFFER view Tab TABLE POSTBUFFER true else get as much memory as the memory block can handle Memory View Tab view Tab Memory View Tab f Tab Item get Data view Tab TABLE PREBUFFER 0 view Tab TABLE POSTBUFFER 0 view Tab TABLE DEFAULTBUFFER 0 long start Address f Memory Block get Start Address Big Integer address Big Integer value Of start Address long length f Memory Block get Length long num Lines length f View Tab get Bytes Per Line get Memory To Fit Table address num Lines true catch Debug Exception e DebugUI Plugin log e get Status Memory View Tab f Tab Item get Data display Error e return line Cache to Array return line Cache to Array  getElements lineCache isEmpty fMemoryBlock IExtendedMemoryBlock BigInteger IExtendedMemoryBlock fMemoryBlock getBigBaseAddress BigInteger MemoryViewTab viewTab MemoryViewTab fTabItem getData BigInteger bigInt bigInt compareTo BigInteger valueOf viewTab TABLE_PREBUFFER viewTab TABLE_PREBUFFER bigInt BigInteger valueOf BigInteger valueOf viewTab TABLE_DEFAULTBUFFER intValue bigInt BigInteger valueOf fViewTab getBytesPerLine viewTab TABLE_PREBUFFER getMemoryToFitTable fViewTab getNumberOfVisibleLines viewTab TABLE_PREBUFFER viewTab TABLE_POSTBUFFER MemoryViewTab viewTab MemoryViewTab fTabItem getData viewTab TABLE_PREBUFFER viewTab TABLE_POSTBUFFER viewTab TABLE_DEFAULTBUFFER startAddress fMemoryBlock getStartAddress BigInteger BigInteger valueOf startAddress fMemoryBlock getLength numLines fViewTab getBytesPerLine getMemoryToFitTable numLines DebugException DebugUIPlugin getStatus MemoryViewTab fTabItem getData displayError lineCache toArray lineCache toArray
return public I Memory Block get Memory Block return f Memory Block  IMemoryBlock getMemoryBlock fMemoryBlock
Get memory to fit table param starting Address param number Of Lines param update Delta throws Debug Exception public void get Memory To Fit Table Big Integer starting Address long number Of Lines boolean update Delta throws Debug Exception boolean error false Debug Exception dbg Evt null calculate address size String adjusted Address starting Address to String 16 int address Size get Address Size starting Address int address Length address Size I Internal DebugUI Constants CHAR PER BYTE align starting address with double word boundary if f Memory Block instanceof I Extended Memory Block if adjusted Address ends With 0 NON NLS 1 adjusted Address adjusted Address substring 0 adjusted Address length 1 adjusted Address 0 NON NLS 1 starting Address new Big Integer adjusted Address 16 I Extended Memory Block ext Memory Block null Memory Byte memory Buffer null required number of bytes long req Num Bytes f View Tab get Bytes Per Line number Of Lines String padded String DEFAULT PADDED STR try if f Memory Block instanceof I Extended Memory Block get memory from memory block ext Memory Block I Extended Memory Block f Memory Block memory Buffer ext Memory Block get Bytes From Address starting Address req Num Bytes if memory Buffer null Debug Exception e new Debug Exception DebugUI Plugin new Error Status DebugUI Messages get String UNABLE TO RETRIEVE CONTENT null throw e get padded string I Memory Block Retrieval retrieval ext Memory Block get Memory Block Retrieval if retrieval null retrieval instanceof I Extended Memory Block Retrieval padded String I Extended Memory Block Retrieval retrieval get Padded String if padded String null padded String DEFAULT PADDED STR else get memory from memory block byte memory f Memory Block get Bytes if memory null Debug Exception e new Debug Exception DebugUI Plugin new Error Status DebugUI Messages get String UNABLE TO RETRIEVE CONTENT null throw e create memory byte for I Memory Block memory Buffer new Memory Byte memory length for int i 0 i memory length i M Byte tmp new M Byte tmp value memory i tmp flags Memory Byte VALID memory Buffer i tmp padded String DEFAULT PADDED STR catch Debug Exception e memory Buffer make Dummy Content number Of Lines finish creating the content provider before throwing an event error true dbg Evt e if debug adapter did not return enough memory create dummy memory if memory Buffer length req Num Bytes Array List new Buffer new Array List for int i 0 i memory Buffer length i new Buffer add memory Buffer i for int i memory Buffer length i req Num Bytes i byte value 0 byte flags 0 flags Memory Byte READONLY new Buffer add new M Byte value flags clear line cacheit if line Cache is Empty line Cache clear String address starting Address to String 16 save address of the top of buffer f Buffer Top Address starting Address if f Memory Block instanceof I Extended Memory Block f Base Address I Extended Memory Block f Memory Block get Big Base Address else f Base Address Big Integer value Of f Memory Block get Start Address if f Base Address null f Base Address new Big Integer 0 NON NLS 1 update tab name in case base address has changed f View Tab set Tab Name f Memory Block true boolean manage Delta true If change information is not managed by the memory block The view tab will manage it and calculate delta information for its content cache if f Memory Block instanceof I Extended Memory Block manage Delta I Extended Memory Block f Memory Block is Memory Changes Managed put memory information into Memory View Line for int i 0 i number Of Lines i chop the raw memory up String tmp Address address to Upper Case if tmp Address length address Length for int j 0 tmp Address length address Length j tmp Address 0 tmp Address NON NLS 1 Memory Byte memory new Memory Byte f View Tab get Bytes Per Line boolean is Monitored true counter for memory starts from 0 to number of bytes per line int k 0 j is the counter for mem Array memory returned by debug adapter for int j i f View Tab get Bytes Per Line j i f View Tab get Bytes Per Line f View Tab get Bytes Per Line j byte change Flag memory Buffer j flags if manage Delta turn off both change and unchanged bits to make sure that the change bits returned by debug adapters do not take any effect change Flag Memory Byte CHANGED change Flag Memory Byte CHANGED change Flag Memory Byte UNCHANGED change Flag Memory Byte UNCHANGED M Byte new Byte Obj new M Byte memory Buffer j value change Flag memory k new Byte Obj k if manage Delta if byte is not changed nor unchanged we do not currently have history for it if memory Buffer j flags Memory Byte CHANGED 0 memory Buffer j flags Memory Byte UNCHANGED 0 is Monitored false Memory View Line new Line new Memory View Line tmp Address memory line Cache size padded String Memory View Line old Line Memory View Line content Cache get new Line get Address if manage Delta if old Line null new Line is Monitored true else check the byte for information new Line is Monitored is Monitored calculate delta info for the memory view line if manage Delta if update Delta if old Line null new Line mark Deltas old Line else if old Line null deltas can only be reused if the line has not been changed otherwise force a refresh if new Line is Line Changed old Line new Line mark Deltas old Line else new Line copy Deltas old Line line Cache add new Line add to content Cache content Cache put new Line get Address new Line increment row address Big Integer big Int new Big Integer address 16 address big Int add Big Integer value Of f View Tab get Bytes Per Line to String 16 if error throw dbg Evt  startingAddress numberOfLines updateDelta DebugException getMemoryToFitTable BigInteger startingAddress numberOfLines updateDelta DebugException DebugException dbgEvt adjustedAddress startingAddress toString addressSize getAddressSize startingAddress addressLength addressSize IInternalDebugUIConstants CHAR_PER_BYTE fMemoryBlock IExtendedMemoryBlock adjustedAddress endsWith adjustedAddress adjustedAddress adjustedAddress adjustedAddress startingAddress BigInteger adjustedAddress IExtendedMemoryBlock extMemoryBlock MemoryByte memoryBuffer reqNumBytes fViewTab getBytesPerLine numberOfLines paddedString DEFAULT_PADDED_STR fMemoryBlock IExtendedMemoryBlock extMemoryBlock IExtendedMemoryBlock fMemoryBlock memoryBuffer extMemoryBlock getBytesFromAddress startingAddress reqNumBytes memoryBuffer DebugException DebugException DebugUIPlugin newErrorStatus DebugUIMessages getString UNABLE_TO_RETRIEVE_CONTENT IMemoryBlockRetrieval extMemoryBlock getMemoryBlockRetrieval IExtendedMemoryBlockRetrieval paddedString IExtendedMemoryBlockRetrieval getPaddedString paddedString paddedString DEFAULT_PADDED_STR fMemoryBlock getBytes DebugException DebugException DebugUIPlugin newErrorStatus DebugUIMessages getString UNABLE_TO_RETRIEVE_CONTENT IMemoryBlock memoryBuffer MemoryByte MByte MByte MemoryByte memoryBuffer paddedString DEFAULT_PADDED_STR DebugException memoryBuffer makeDummyContent numberOfLines dbgEvt memoryBuffer reqNumBytes ArrayList newBuffer ArrayList memoryBuffer newBuffer memoryBuffer memoryBuffer reqNumBytes MemoryByte newBuffer MByte lineCache isEmpty lineCache startingAddress toString fBufferTopAddress startingAddress fMemoryBlock IExtendedMemoryBlock fBaseAddress IExtendedMemoryBlock fMemoryBlock getBigBaseAddress fBaseAddress BigInteger valueOf fMemoryBlock getStartAddress fBaseAddress fBaseAddress BigInteger fViewTab setTabName fMemoryBlock manageDelta fMemoryBlock IExtendedMemoryBlock manageDelta IExtendedMemoryBlock fMemoryBlock isMemoryChangesManaged MemoryViewLine numberOfLines tmpAddress toUpperCase tmpAddress addressLength tmpAddress addressLength tmpAddress tmpAddress MemoryByte MemoryByte fViewTab getBytesPerLine isMonitored memArray fViewTab getBytesPerLine fViewTab getBytesPerLine fViewTab getBytesPerLine changeFlag memoryBuffer manageDelta changeFlag MemoryByte changeFlag MemoryByte changeFlag MemoryByte changeFlag MemoryByte MByte newByteObj MByte memoryBuffer changeFlag newByteObj manageDelta memoryBuffer MemoryByte memoryBuffer MemoryByte isMonitored MemoryViewLine newLine MemoryViewLine tmpAddress lineCache paddedString MemoryViewLine oldLine MemoryViewLine contentCache newLine getAddress manageDelta oldLine newLine isMonitored newLine isMonitored isMonitored manageDelta updateDelta oldLine newLine markDeltas oldLine oldLine newLine isLineChanged oldLine newLine markDeltas oldLine newLine copyDeltas oldLine lineCache newLine contentCache contentCache newLine getAddress newLine BigInteger bigInt BigInteger bigInt BigInteger valueOf fViewTab getBytesPerLine toString dbgEvt
param number Of Lines return private Memory Byte make Dummy Content long number Of Lines Memory Byte memory Buffer make up dummy memory needed for recovery in case the debug adapter is capable of retrieving memory again int num Bytes int f View Tab get Bytes Per Line number Of Lines memory Buffer new Memory Byte num Bytes for int i 0 i memory Buffer length i memory Buffer i new M Byte memory Buffer i value 0 memory Buffer i flags Memory Byte READONLY return memory Buffer  numberOfLines MemoryByte makeDummyContent numberOfLines MemoryByte memoryBuffer numBytes fViewTab getBytesPerLine numberOfLines memoryBuffer MemoryByte numBytes memoryBuffer memoryBuffer MByte memoryBuffer memoryBuffer MemoryByte memoryBuffer
protected void do Handle Debug Event Debug Event event do nothing if the debug event did not come from a debug element comes from non debug element if event get Source instanceof I Debug Element return I Debug Element src I Debug Element event get Source if a debug event happens from the memory block invoke content Changed to get content of the memory block updated if event get Kind Debug Event CHANGE event get Source f Memory Block if event get Detail Debug Event STATE f View Tab update Labels else update Content if the suspend evnet happens from the debug target that the blocked memory block belongs to if event get Kind Debug Event SUSPEND src get Debug Target f Memory Block get Debug Target update Content  doHandleDebugEvent DebugEvent getSource IDebugElement IDebugElement IDebugElement getSource contentChanged getKind DebugEvent getSource fMemoryBlock getDetail DebugEvent fViewTab updateLabels updateContent getKind DebugEvent getDebugTarget fMemoryBlock getDebugTarget updateContent
Checks to see if the content needs to be refreshed TODO this methd is never called return protected boolean is Refresh Needed boolean refresh Needed false try if is Base Address Changed return true Memory View Line cached Memory View Line line Cache to Array new Memory View Line line Cache size convert I Memory to a flat array of Memory Block Byte Array List new Memory new Array List if f Memory Block instanceof I Extended Memory Block byte memory f Memory Block get Bytes if memory null Debug Exception e new Debug Exception DebugUI Plugin new Error Status DebugUI Messages get String UNABLE TO RETRIEVE CONTENT null throw e create memory byte for I Memory Block for int i 0 i memory length i M Byte tmp new M Byte tmp value memory i tmp flags Memory Byte VALID new Memory add tmp else I Extended Memory Block extMB I Extended Memory Block f Memory Block Memory Byte memory extMB get Bytes From Address f Buffer Top Address line Cache size f View Tab get Bytes Per Line if memory null Debug Exception e new Debug Exception DebugUI Plugin new Error Status DebugUI Messages get String UNABLE TO RETRIEVE CONTENT null throw e for int i 0 i memory length i new Memory add memory i compare each byte if one of the bytes is not the same refresh view tab for int i 0 i new Memory size i Memory Byte new Byte Memory Byte new Memory get i if i f View Tab get Bytes Per Line cached length if cache cannot be located need refresh refresh Needed true break Memory View Line line To Check cached i f View Tab get Bytes Per Line Memory Byte old Byte line To Check get Byte i f View Tab get Bytes Per Line if a byte becomes available or unavailable if new Byte flags Memory Byte VALID old Byte flags Memory Byte VALID refresh Needed true break if new Byte flags Memory Byte VALID Memory Byte VALID old Byte flags Memory Byte VALID Memory Byte VALID compare value if both bytes are available if new Byte value old Byte value refresh Needed true break catch Debug Exception e f View Tab display Error e return false return refresh Needed  isRefreshNeeded refreshNeeded isBaseAddressChanged MemoryViewLine MemoryViewLine lineCache toArray MemoryViewLine lineCache IMemory MemoryBlockByte ArrayList newMemory ArrayList fMemoryBlock IExtendedMemoryBlock fMemoryBlock getBytes DebugException DebugException DebugUIPlugin newErrorStatus DebugUIMessages getString UNABLE_TO_RETRIEVE_CONTENT IMemoryBlock MByte MByte MemoryByte newMemory IExtendedMemoryBlock IExtendedMemoryBlock fMemoryBlock MemoryByte getBytesFromAddress fBufferTopAddress lineCache fViewTab getBytesPerLine DebugException DebugException DebugUIPlugin newErrorStatus DebugUIMessages getString UNABLE_TO_RETRIEVE_CONTENT newMemory newMemory MemoryByte newByte MemoryByte newMemory fViewTab getBytesPerLine refreshNeeded MemoryViewLine lineToCheck fViewTab getBytesPerLine MemoryByte oldByte lineToCheck getByte fViewTab getBytesPerLine newByte MemoryByte oldByte MemoryByte refreshNeeded newByte MemoryByte MemoryByte oldByte MemoryByte MemoryByte newByte oldByte refreshNeeded DebugException fViewTab displayError refreshNeeded
return if the base address of the memory block has changed private boolean is Base Address Changed if f Memory Block instanceof I Extended Memory Block return false I Extended Memory Block extMB I Extended Memory Block f Memory Block if base address has changed refresh is needed Big Integer new Base Address extMB get Big Base Address if new Base Address null new Base Address new Big Integer 0 NON NLS 1 if new Base Address compare To f Base Address 0 return true else return false  isBaseAddressChanged fMemoryBlock IExtendedMemoryBlock IExtendedMemoryBlock IExtendedMemoryBlock fMemoryBlock BigInteger newBaseAddress getBigBaseAddress newBaseAddress newBaseAddress BigInteger newBaseAddress compareTo fBaseAddress
public void force Refresh if f Lock Refresh f Lock Refresh true refresh f Lock Refresh false  forceRefresh fLockRefresh fLockRefresh fLockRefresh
see org eclipse debug ui internal views Basic Debug View Content Provider refresh protected void refresh super refresh  BasicDebugViewContentProvider
Update content of the view tab if the content of the memory block has changed or if its base address has changed Update will not be performed if the memory block has not been changed or if the view tab is disabled public void update Content I Debug Target dt f Memory Block get Debug Target no need to update if debug target is disconnected or terminated if dt is Disconnected dt is Terminated return cache content before getting new ones Memory View Line lines Memory View Line line Cache to Array new Memory View Line line Cache size if content Cache null content Cache clear do not handle event if the tab has been disabled if f View Tab is Enabled return for int i 0 i lines length i content Cache put lines i get Address lines i lines i is Monitored true if view tab is enabled but block is disabled enable the block if f View Tab get Memory Block instanceof I Extended Memory Block if I Extended Memory Block f View Tab get Memory Block is Enabled I Extended Memory Block f View Tab get Memory Block enable boolean update Top Address false if base address has changed set cursor back to the base address if is Base Address Changed update Top Address true if f Memory Block instanceof I Extended Memory Block Big Integer address I Extended Memory Block f Memory Block get Big Base Address if address null address new Big Integer 0 NON NLS 1 f View Tab set Selected Address address true else Big Integer address Big Integer value Of f Memory Block get Start Address f View Tab set Selected Address address true reset all the deltas currently stored in content Cache This will ensure that changes will be recomputed when user scrolls up or down the memory view reset Deltas f View Tab refresh if update Top Address top visible address may have been changed if base address has changed f View Tab update Sync Top Address true  updateContent IDebugTarget fMemoryBlock getDebugTarget isDisconnected isTerminated MemoryViewLine MemoryViewLine lineCache toArray MemoryViewLine lineCache contentCache contentCache fViewTab isEnabled contentCache getAddress isMonitored fViewTab getMemoryBlock IExtendedMemoryBlock IExtendedMemoryBlock fViewTab getMemoryBlock isEnabled IExtendedMemoryBlock fViewTab getMemoryBlock updateTopAddress isBaseAddressChanged updateTopAddress fMemoryBlock IExtendedMemoryBlock BigInteger IExtendedMemoryBlock fMemoryBlock getBigBaseAddress BigInteger fViewTab setSelectedAddress BigInteger BigInteger valueOf fMemoryBlock getStartAddress fViewTab setSelectedAddress contentCache resetDeltas fViewTab updateTopAddress fViewTab updateSyncTopAddress
return public Big Integer get Buffer Top Address return f Buffer Top Address  BigInteger getBufferTopAddress fBufferTopAddress
Calculate address size of the given address param address return public int get Address Size Big Integer address calculate address size String adjusted Address address to String 16 int address Size 0 if f Memory Block instanceof I Extended Memory Block address Size I Extended Memory Block f Memory Block get Address Size handle I Memory Block and invalid address size returned by I Extended Memory Block if address Size 0 if adjusted Address length 8 address Size 8 else address Size 4 return address Size  getAddressSize BigInteger adjustedAddress toString addressSize fMemoryBlock IExtendedMemoryBlock addressSize IExtendedMemoryBlock fMemoryBlock getAddressSize IMemoryBlock IExtendedMemoryBlock addressSize adjustedAddress addressSize addressSize addressSize
return base address of memory block public Big Integer get Content Base Address return f Base Address  BigInteger getContentBaseAddress fBaseAddress
Clear all delta information in the lines public void reset Deltas Enumeration enum content Cache elements while enum has More Elements Memory View Line line Memory View Line enum next Element line unmark Deltas  resetDeltas contentCache hasMoreElements MemoryViewLine MemoryViewLine nextElement unmarkDeltas
Check if address is out of buffered range param address return protected boolean is Address Out Of Range Big Integer address if line Cache null Memory View Line first Memory View Line line Cache first Element Memory View Line last Memory View Line line Cache last Element if first null last null return true Big Integer start Address new Big Integer first get Address 16 Big Integer last Address new Big Integer last get Address 16 last Address last Address add Big Integer value Of f View Tab get Bytes Per Line if start Address compare To address 0 last Address compare To address 0 return false else return true else return true  isAddressOutOfRange BigInteger lineCache MemoryViewLine MemoryViewLine lineCache firstElement MemoryViewLine MemoryViewLine lineCache lastElement BigInteger startAddress BigInteger getAddress BigInteger lastAddress BigInteger getAddress lastAddress lastAddress BigInteger valueOf fViewTab getBytesPerLine startAddress compareTo lastAddress compareTo

public Memory View Line String address Memory Byte bytes int table Index String padded String f Address address f Bytes bytes f Table Index table Index f Padded String padded String  MemoryViewLine MemoryByte tableIndex paddedString fAddress fBytes fTableIndex tableIndex fPaddedString paddedString
public String get Address return f Address  getAddress fAddress
public void set Address String address f Address address  setAddress fAddress
public Memory Byte get Bytes return f Bytes  MemoryByte getBytes fBytes
public Memory Byte get Byte int offset if f Bytes null return null if offset f Bytes length return f Bytes offset else return null  MemoryByte getByte fBytes fBytes fBytes
public Memory Byte get Bytes int start int end Array List ret new Array List for int i start i end i ret add f Bytes i return Memory Byte ret to Array new Memory Byte ret size  MemoryByte getBytes ArrayList ArrayList fBytes MemoryByte toArray MemoryByte
public String get Raw Memory String if f Str Rep null String Buffer buffer new String Buffer f Str Rep Hex Renderer convert Byte Array To Hex String get Byte Array f Str Rep f Str Rep to Upper Case buffer buffer append f Str Rep pad unavailable bytes with padded string from memory block String padded String null int buffer Counter 0 for int i 0 i f Bytes length i if byte is valid if f Bytes i flags Memory Byte VALID Memory Byte VALID if padded String null padded String f Padded String if padded String length Memory View Line num Char Per Byte For Hex padded String padded String substring 0 Memory View Line num Char Per Byte For Hex buffer replace buffer Counter buffer Counter Memory View Line num Char Per Byte For Hex padded String buffer Counter Memory View Line num Char Per Byte For Hex f Str Rep buffer to String return f Str Rep  getRawMemoryString fStrRep StringBuffer StringBuffer fStrRep HexRenderer convertByteArrayToHexString getByteArray fStrRep fStrRep toUpperCase fStrRep paddedString bufferCounter fBytes fBytes MemoryByte MemoryByte paddedString paddedString fPaddedString paddedString MemoryViewLine numCharPerByteForHex paddedString paddedString MemoryViewLine numCharPerByteForHex bufferCounter bufferCounter MemoryViewLine numCharPerByteForHex paddedString bufferCounter MemoryViewLine numCharPerByteForHex fStrRep toString fStrRep
param start param end return public String get Padded String int start int end String Buffer buf new String Buffer for int i start i end i buf append f Padded String return buf to String  getPaddedString StringBuffer StringBuffer fPaddedString toString
public String get Padded String return f Padded String  getPaddedString fPaddedString
param start param end return public boolean is Available int start int end boolean available true for int i start i end i if f Bytes i flags Memory Byte VALID Memory Byte VALID available false break return available  isAvailable fBytes MemoryByte MemoryByte
public byte get Byte Array if f Byte Array null f Byte Array new byte f Bytes length for int i 0 i f Bytes length i f Byte Array i f Bytes i value return f Byte Array  getByteArray fByteArray fByteArray fBytes fBytes fByteArray fBytes fByteArray
public byte get Byte Array int start int end byte ret new byte end start int j 0 for int i start i end i ret j f Bytes i value j return ret  getByteArray fBytes
public void mark Deltas Memory View Line old Data if old Data null return if address is not the same no need to compare if old Data get Address equals this get Address return if the string representation is the same no need to compare if old Data get Raw Memory String equals get Raw Memory String return Memory Byte old Memory old Data get Bytes if old Memory length f Bytes length return for int i 0 i f Bytes length i if f Bytes i flags Memory Byte VALID old Memory i flags Memory Byte VALID f Bytes i flags Memory Byte CHANGED continue if f Bytes i flags Memory Byte VALID Memory Byte VALID old Memory i flags Memory Byte VALID Memory Byte VALID if f Bytes i value old Memory i value f Bytes i flags Memory Byte CHANGED  markDeltas MemoryViewLine oldData oldData oldData getAddress getAddress oldData getRawMemoryString getRawMemoryString MemoryByte oldMemory oldData getBytes oldMemory fBytes fBytes fBytes MemoryByte oldMemory MemoryByte fBytes MemoryByte fBytes MemoryByte MemoryByte oldMemory MemoryByte MemoryByte fBytes oldMemory fBytes MemoryByte
public void copy Deltas Memory View Line old Data if old Data null return if address is not the same do not copy if old Data get Address equals this get Address return reuse delta information from old data Memory Byte old Memory old Data get Bytes if old Memory length f Bytes length return for int i 0 i f Bytes length i f Bytes i flags old Memory i flags  copyDeltas MemoryViewLine oldData oldData oldData getAddress getAddress MemoryByte oldMemory oldData getBytes oldMemory fBytes fBytes fBytes oldMemory
public boolean is Line Changed Memory View Line old Data if old Data null return false if address is not the same no need to compare if old Data get Address equals this get Address return false if the string representation is not the same this line has changed if old Data get Raw Memory String equals get Raw Memory String return false else return true  isLineChanged MemoryViewLine oldData oldData oldData getAddress getAddress oldData getRawMemoryString getRawMemoryString
param offset param end Offset return true if the specified range of memory has changed false otherwise public boolean is Range Change int offset int end Offset byte ret f Bytes offset flags for int i offset i end Offset i ret f Bytes i flags if ret Memory Byte CHANGED Memory Byte CHANGED return true else return false  endOffset isRangeChange endOffset fBytes endOffset fBytes MemoryByte MemoryByte
public void unmark Deltas for int i 0 i f Bytes length i unset the change bit if f Bytes i flags Memory Byte CHANGED Memory Byte CHANGED f Bytes i flags Memory Byte CHANGED  unmarkDeltas fBytes fBytes MemoryByte MemoryByte fBytes MemoryByte
public String to String String Buffer buf new String Buffer buf append get Address buf append NON NLS 1 buf append get Raw Memory String return buf to String  toString StringBuffer StringBuffer getAddress getRawMemoryString toString
public int get Table Index return f Table Index  getTableIndex fTableIndex

Memory View Tab f View Tab Tab Folder Dispose Listener Memory View Tab view Tab f View Tab view Tab  MemoryViewTab fViewTab TabFolderDisposeListener MemoryViewTab viewTab fViewTab viewTab
public void widget Disposed Dispose Event e if f View Tab f Is Disposed remove listeners J Face Resources get Font Registry remove Listener f Font Change Listener remove Reference From Synchronizer get Memory Block View Synchronizer remove View f View Tab  widgetDisposed DisposeEvent fViewTab fIsDisposed JFaceResources getFontRegistry removeListener fFontChangeListener removeReferenceFromSynchronizer getMemoryBlockViewSynchronizer removeView fViewTab
public void property Change Property Change Event event if memory view table font has changed if event get Property equals I Internal DebugUI Constants FONT NAME if f Is Disposed Font memory View Font J Face Resources get Font I Internal DebugUI Constants FONT NAME set Font memory View Font  propertyChange PropertyChangeEvent getProperty IInternalDebugUIConstants FONT_NAME fIsDisposed memoryViewFont JFaceResources getFont IInternalDebugUIConstants FONT_NAME setFont memoryViewFont
Memory View Delegating Model Presentation I Extension Point point Platform get Extension Registry get Extension Point DebugUI Plugin get Unique Identifier I DebugUI Constants ID DEBUG MODEL PRESENTATION if point null I Extension extensions point get Extensions for int i 0 i extensions length i I Extension extension extensions i I Configuration Element config Elements extension get Configuration Elements for int j 0 j config Elements length j I Configuration Element elt config Elements j String id elt get Attribute id NON NLS 1 if id null I Debug Model Presentation lp new Memory View Lazy Model Presentation elt get Label Providers put id lp  MemoryViewDelegatingModelPresentation IExtensionPoint getExtensionRegistry getExtensionPoint DebugUIPlugin getUniqueIdentifier IDebugUIConstants ID_DEBUG_MODEL_PRESENTATION IExtension getExtensions IExtension IConfigurationElement configElements getConfigurationElements configElements IConfigurationElement configElements getAttribute IDebugModelPresentation MemoryViewLazyModelPresentation getLabelProviders
Memory View Lazy Model Presentation I Configuration Element element super element  MemoryViewLazyModelPresentation IConfigurationElement
public String get Tab Label I Memory Block blk String rendering Id I Debug Model Presentation presentation get Presentation if presentation instanceof I Memory Block Model Presentation return I Memory Block Model Presentation presentation get Tab Label blk get Rendering Id else return null  getTabLabel IMemoryBlock renderingId IDebugModelPresentation getPresentation IMemoryBlockModelPresentation IMemoryBlockModelPresentation getTabLabel getRenderingId
public String get Column Labels I Memory Block blk int bytes Per Line int column Size I Debug Model Presentation presentation get Presentation if presentation instanceof I Memory Block Model Presentation return I Memory Block Model Presentation presentation get Column Labels blk bytes Per Line column Size else return new String 0  getColumnLabels IMemoryBlock bytesPerLine columnSize IDebugModelPresentation getPresentation IMemoryBlockModelPresentation IMemoryBlockModelPresentation getColumnLabels bytesPerLine columnSize
public String get Address Presentation I Memory Block blk Big Integer address I Debug Model Presentation presentation get Presentation if presentation instanceof I Memory Block Model Presentation return I Memory Block Model Presentation presentation get Address Presentation blk address else return null  getAddressPresentation IMemoryBlock BigInteger IDebugModelPresentation getPresentation IMemoryBlockModelPresentation IMemoryBlockModelPresentation getAddressPresentation
public Memory View Tab I Memory Block new Memory Tab Item new Tab Menu Manager menu Mgr I Memory Rendering rendering Abstract Memory Renderer renderer super new Memory new Tab menu Mgr rendering set Tab Name new Memory true f Tab Item set Control create Folder Page renderer if new Memory instanceof I Extended Memory Block If not extended memory block do not create any buffer no scrolling TABLE PREBUFFER 0 TABLE POSTBUFFER 0 TABLE DEFAULTBUFFER 0 if f Table Viewer null f Table Viewer get Table set Top Index TABLE PREBUFFER add View Tab To Synchronizer otherwise this is a totally new synchronize info f Enabled true f Tab Created true synchronize synchronize create Actions Need to resize column after content is filled in Pack function does not work unless content is not filled in since the table is not able to compute the preferred size pack Columns add listeners in the end to make sure that the resize event does not affect synchronization if f Table Viewer null f Table Viewer get Table add Selection Listener this f Tab Folder Dispose Listener new Tab Folder Dispose Listener this f Tab Item add Dispose Listener f Tab Folder Dispose Listener if f Memory Block instanceof I Extended Memory Block if I Extended Memory Block f Memory Block get Big Base Address null Debug Exception e new Debug Exception DebugUI Plugin new Error Status DebugUI Messages get String UNABLE TO GET BASE ADDRESS null display Error e  MemoryViewTab IMemoryBlock newMemory TabItem newTab MenuManager menuMgr IMemoryRendering AbstractMemoryRenderer newMemory newTab menuMgr setTabName newMemory fTabItem setControl createFolderPage newMemory IExtendedMemoryBlock TABLE_PREBUFFER TABLE_POSTBUFFER TABLE_DEFAULTBUFFER fTableViewer fTableViewer getTable setTopIndex TABLE_PREBUFFER addViewTabToSynchronizer fEnabled fTabCreated createActions packColumns fTableViewer fTableViewer getTable addSelectionListener fTabFolderDisposeListener TabFolderDisposeListener fTabItem addDisposeListener fTabFolderDisposeListener fMemoryBlock IExtendedMemoryBlock IExtendedMemoryBlock fMemoryBlock getBigBaseAddress DebugException DebugException DebugUIPlugin newErrorStatus DebugUIMessages getString UNABLE_TO_GET_BASE_ADDRESS displayError
private void add View Tab To Synchronizer get Memory Block View Synchronizer add View this null check if there is already synchronization info available Object selected Address get Synchronized Property I Memory View Constants PROPERTY SELECTED ADDRESS Object size get Synchronized Property I Memory View Constants PROPERTY COL SIZE Object top Address get Synchronized Property I Memory View Constants PROPERTY TOP ADDRESS if info is available some other view tab has already been created do not overwirte info int he synchronizer if that s the case if selected Address null update Sync Selected Address true if size null update Sync Col Size if top Address null update Sync Top Address true  addViewTabToSynchronizer getMemoryBlockViewSynchronizer addView selectedAddress getSynchronizedProperty IMemoryViewConstants PROPERTY_SELECTED_ADDRESS getSynchronizedProperty IMemoryViewConstants PROPERTY_COL_SIZE topAddress getSynchronizedProperty IMemoryViewConstants PROPERTY_TOP_ADDRESS selectedAddress updateSyncSelectedAddress updateSyncColSize topAddress updateSyncTopAddress
update selected address in synchronizer if update is true private void update Sync Selected Address boolean update if update get Memory Block View Synchronizer set Synchronized Property get Memory Block I Memory View Constants PROPERTY SELECTED ADDRESS f Selected Address  updateSyncSelectedAddress getMemoryBlockViewSynchronizer setSynchronizedProperty getMemoryBlock IMemoryViewConstants PROPERTY_SELECTED_ADDRESS fSelectedAddress
update column size in synchronizer private void update Sync Col Size get Memory Block View Synchronizer set Synchronized Property get Memory Block I Memory View Constants PROPERTY COL SIZE new Integer f Column Size  updateSyncColSize getMemoryBlockViewSynchronizer setSynchronizedProperty getMemoryBlock IMemoryViewConstants PROPERTY_COL_SIZE fColumnSize
update top visible address in synchronizer protected void update Sync Top Address boolean update To Synchronizer if update To Synchronizer get Memory Block View Synchronizer set Synchronized Property get Memory Block I Memory View Constants PROPERTY TOP ADDRESS get Top Visible Address  updateSyncTopAddress updateToSynchronizer updateToSynchronizer getMemoryBlockViewSynchronizer setSynchronizedProperty getMemoryBlock IMemoryViewConstants PROPERTY_TOP_ADDRESS getTopVisibleAddress
protected void set Tab Name I Memory Block new Memory boolean show Address String tab Name null if get Memory Block Presentation null tab Name get Memory Block Presentation get Tab Label new Memory get Rendering Id if tab Name null tab Name NON NLS 1 try if new Memory instanceof I Extended Memory Block tab Name I Extended Memory Block new Memory get Expression if tab Name starts With NON NLS 1 tab Name tab Name NON NLS 1 if tab Name null tab Name DebugUI Messages get String UNKNOWN if show Address I Extended Memory Block new Memory get Big Base Address null tab Name 0x NON NLS 1 tab Name I Extended Memory Block new Memory get Big Base Address to String 16 else long address new Memory get Start Address tab Name Long to Hex String address catch Debug Exception e tab Name DebugUI Messages get String UNKNOWN DebugUI Plugin log e get Status String pre Name Memory Block Manager get Memory Rendering Manager get Rendering Info get Rendering Id get Name if pre Name null tab Name pre Name NON NLS 1 NON NLS 2 f Tab Item set Text tab Name  setTabName IMemoryBlock newMemory showAddress tabName getMemoryBlockPresentation tabName getMemoryBlockPresentation getTabLabel newMemory getRenderingId tabName tabName newMemory IExtendedMemoryBlock tabName IExtendedMemoryBlock newMemory getExpression tabName startsWith tabName tabName tabName tabName DebugUIMessages getString showAddress IExtendedMemoryBlock newMemory getBigBaseAddress tabName tabName IExtendedMemoryBlock newMemory getBigBaseAddress toString newMemory getStartAddress tabName toHexString DebugException tabName DebugUIMessages getString DebugUIPlugin getStatus preName MemoryBlockManager getMemoryRenderingManager getRenderingInfo getRenderingId getName preName tabName preName fTabItem setText tabName
Create actions for the view tab protected void create Actions f Copy To Clipboard Action new Copy View Tab To Clipboard Context Action this f Go To Address Action new Go To Address Action this f Reset Memory Block Action new Reset Memory Block Context Action this f Print View Tab Action new Print View Tab Context Action this f Format Column Actions new Action 6 f Format Column Actions 0 new Format Column Action 1 this f Format Column Actions 1 new Format Column Action 2 this f Format Column Actions 2 new Format Column Action 4 this f Format Column Actions 3 new Format Column Action 8 this f Format Column Actions 4 new Format Column Action 16 this f Format Column Actions 5 new Set Column Size Default Action this f Reformat Action new Reformat Action this  createActions fCopyToClipboardAction CopyViewTabToClipboardContextAction fGoToAddressAction GoToAddressAction fResetMemoryBlockAction ResetMemoryBlockContextAction fPrintViewTabAction PrintViewTabContextAction fFormatColumnActions fFormatColumnActions FormatColumnAction fFormatColumnActions FormatColumnAction fFormatColumnActions FormatColumnAction fFormatColumnActions FormatColumnAction fFormatColumnActions FormatColumnAction fFormatColumnActions SetColumnSizeDefaultAction fReformatAction ReformatAction
public void fill Context Menu I Menu Manager menu menu add new Separator MEMORY ACTIONS GROUP menu add f Reset Memory Block Action menu add f Go To Address Action menu add new Separator if f Format Column Actions length 0 Format view tab actions I Menu Manager format Menu new Menu Manager DebugUI Messages get String COLUMN SIZE MEMORY ACTIONS FORMAT GROUP menu append To Group MEMORY ACTIONS GROUP format Menu for int i 0 i f Format Column Actions length i format Menu add f Format Column Actions i add check mark to the action to reflect current format of the view tab if f Format Column Actions i instanceof Format Column Action if Format Column Action f Format Column Actions i get Column Size get Column Size f Format Column Actions i set Checked true else f Format Column Actions i set Checked false menu add new Separator menu add f Reformat Action menu add f Copy To Clipboard Action menu add f Print View Tab Action  fillContextMenu IMenuManager MEMORY_ACTIONS_GROUP fResetMemoryBlockAction fGoToAddressAction fFormatColumnActions IMenuManager formatMenu MenuManager DebugUIMessages getString COLUMN_SIZE MEMORY_ACTIONS_FORMAT_GROUP appendToGroup MEMORY_ACTIONS_GROUP formatMenu fFormatColumnActions formatMenu fFormatColumnActions fFormatColumnActions FormatColumnAction FormatColumnAction fFormatColumnActions getColumnSize getColumnSize fFormatColumnActions setChecked fFormatColumnActions setChecked fReformatAction fCopyToClipboardAction fPrintViewTabAction
private Control create Folder Page Abstract Memory Renderer renderer content Provider new Memory View Content Provider f Memory Block f Tab Item f Table Viewer new Table Viewer f Tab Item get Parent SWT FULL SELECTION SWT SINGLE SWT H SCROLL SWT V SCROLL SWT HIDE SELECTION SWT BORDER f Table Viewer set Content Provider content Provider if renderer null renderer set Rendering Id f Rendering Id Memory View Tab Label Provider label Provider new Memory View Tab Label Provider this renderer f Table Viewer set Label Provider label Provider Abstract Table View Tab Label Provider label Provider set View Tab this else renderer new Empty Renderer renderer set Rendering Id f Rendering Id renderer set View Tab this Memory View Tab Label Provider label Provider new Memory View Tab Label Provider this renderer f Table Viewer set Label Provider label Provider DebugUI Plugin log DebugUI Plugin new Error Status Renderer property is not defined for f Rendering Id null NON NLS 1 content Provider set Viewer f Table Viewer Scroll Bar scroll Table f Table Viewer get Control get Vertical Bar scroll add Selection Listener this scroll set Minimum 100 scroll set Maximum 200 f Table Viewer get Control add Control Listener this f Table Viewer get Control add Key Listener this f Table Viewer get Table set Header Visible true f Table Viewer get Table set Lines Visible true int byte Per Line I Internal DebugUI Constants BYTES PER LINE get default column size from preference store I Preference Store pref Store DebugUI Plugin get Default get Preference Store int column Size pref Store get Int I Debug Preference Constants PREF COLUMN SIZE check synchronized col size Integer col Size Integer get Synchronized Property I Memory View Constants PROPERTY COL SIZE if col Size null int sync Col Size col Size int Value if sync Col Size 0 column Size sync Col Size format memory block with specified bytes Per Line and column Size boolean ok format byte Per Line column Size if ok Debug Exception e new Debug Exception DebugUI Plugin new Error Status DebugUI Messages get String FORMAT IS INVALID null display Error e return f Text Viewer get Control f Table Viewer set Input f Memory Block f Cell Modifier new Memory View Cell Modifier this f Table Viewer set Cell Modifier f Cell Modifier set to a non proportional font f Table Viewer get Table set Font J Face Resources get Font I Internal DebugUI Constants FONT NAME int row 0 int col 1 set up cursor manager manager sets up initial position of the cursor f Cursor Manager new View Tab Cursor Manager this row col f Menu Mgr if f Memory Block instanceof I Extended Memory Block Big Integer address I Extended Memory Block f Memory Block get Big Base Address if address null address new Big Integer 0 NON NLS 1 Big Integer sync Address Big Integer get Synchronized Property I Memory View Constants PROPERTY SELECTED ADDRESS set initial selected address if sync Address null set Selected Address sync Address false else set Selected Address address true update Cursor Position else long address f Memory Block get Start Address Big Integer sync Address Big Integer get Synchronized Property I Memory View Constants PROPERTY SELECTED ADDRESS if sync Address null set initial selected address set Selected Address sync Address false else set Selected Address Big Integer value Of address true update Cursor Position add font change listener and update font when the font has been changed f Font Change Listener new Font Change Listener J Face Resources get Font Registry add Listener f Font Change Listener finish initialization and return text viewer as the control if error Occurred return f Text Viewer get Control return f Table Viewer get Control  createFolderPage AbstractMemoryRenderer contentProvider MemoryViewContentProvider fMemoryBlock fTabItem fTableViewer TableViewer fTabItem getParent FULL_SELECTION H_SCROLL V_SCROLL HIDE_SELECTION fTableViewer setContentProvider contentProvider setRenderingId fRenderingId MemoryViewTabLabelProvider labelProvider MemoryViewTabLabelProvider fTableViewer setLabelProvider labelProvider AbstractTableViewTabLabelProvider labelProvider setViewTab EmptyRenderer setRenderingId fRenderingId setViewTab MemoryViewTabLabelProvider labelProvider MemoryViewTabLabelProvider fTableViewer setLabelProvider labelProvider DebugUIPlugin DebugUIPlugin newErrorStatus fRenderingId contentProvider setViewer fTableViewer ScrollBar fTableViewer getControl getVerticalBar addSelectionListener setMinimum setMaximum fTableViewer getControl addControlListener fTableViewer getControl addKeyListener fTableViewer getTable setHeaderVisible fTableViewer getTable setLinesVisible bytePerLine IInternalDebugUIConstants BYTES_PER_LINE IPreferenceStore prefStore DebugUIPlugin getDefault getPreferenceStore columnSize prefStore getInt IDebugPreferenceConstants PREF_COLUMN_SIZE colSize getSynchronizedProperty IMemoryViewConstants PROPERTY_COL_SIZE colSize syncColSize colSize intValue syncColSize columnSize syncColSize bytesPerLine columnSize bytePerLine columnSize DebugException DebugException DebugUIPlugin newErrorStatus DebugUIMessages getString FORMAT_IS_INVALID displayError fTextViewer getControl fTableViewer setInput fMemoryBlock fCellModifier MemoryViewCellModifier fTableViewer setCellModifier fCellModifier fTableViewer getTable setFont JFaceResources getFont IInternalDebugUIConstants FONT_NAME fCursorManager ViewTabCursorManager fMenuMgr fMemoryBlock IExtendedMemoryBlock BigInteger IExtendedMemoryBlock fMemoryBlock getBigBaseAddress BigInteger BigInteger syncAddress BigInteger getSynchronizedProperty IMemoryViewConstants PROPERTY_SELECTED_ADDRESS syncAddress setSelectedAddress syncAddress setSelectedAddress updateCursorPosition fMemoryBlock getStartAddress BigInteger syncAddress BigInteger getSynchronizedProperty IMemoryViewConstants PROPERTY_SELECTED_ADDRESS syncAddress setSelectedAddress syncAddress setSelectedAddress BigInteger valueOf updateCursorPosition fFontChangeListener FontChangeListener JFaceResources getFontRegistry addListener fFontChangeListener errorOccurred fTextViewer getControl fTableViewer getControl
Format view tab based on parameters param bytes Per Line number of bytes per line possible values 16 param column Size number of bytes per column possible values 1 2 4 8 return true if format is successful false otherwise public boolean format int bytes Per Line int column Size check parameter bytes Per Line be 16 if bytes Per Line I Internal DebugUI Constants BYTES PER LINE return false bytes per cell must be divisible to bytes Per Line if bytes Per Line column Size 0 return false do not format if the view tab is already in that format if f Byte Per Line bytes Per Line f Column Size column Size return false f Byte Per Line bytes Per Line f Column Size column Size if the tab is already created and is being reformated if f Tab Created get Top Visible Address if f Table Viewer null return false if f Table Viewer get Table null return false clean up old columns Table Column old Columns f Table Viewer get Table get Columns for int i 0 i old Columns length i old Columns i dispose clean up old cell editors Cell Editor old Cell Editors f Table Viewer get Cell Editors for int i 0 i old Cell Editors length i old Cell Editors i dispose Table Column column0 new Table Column f Table Viewer get Table SWT LEFT 0 column0 set Text DebugUI Messages get String ADDRESS create new byte columns Table Column byte Columns new Table Column bytes Per Line column Size String column Labels new String 0 if get Memory Block Presentation null column Labels get Memory Block Presentation get Column Labels get Memory Block bytes Per Line column Size for int i 0 i byte Columns length i Table Column column new Table Column f Table Viewer get Table SWT LEFT i 1 if the number of column labels returned is correct use supplied column labels if column Labels length byte Columns length column set Text column Labels i else otherwise use default if get Column Size 4 column set Text Integer to Hex String i column Size to Upper Case Integer to Hex String i column Size column Size 1 to Upper Case NON NLS 1 else column set Text Integer to Hex String i column Size to Upper Case Empty column for cursor navigation Table Column empty Col new Table Column f Table Viewer get Table SWT LEFT byte Columns length 1 empty Col set Text NON NLS 1 empty Col set Width 1 empty Col set Resizable false 2 to include properties for address and navigation column String column Properties new String byte Columns length 2 column Properties 0 Memory View Line P ADDRESS use column beginning offset to the row address as properties for int i 1 i column Properties length 1 i column Properties i Integer to Hex String i 1 column Size Empty column for cursor navigation column Properties column Properties length 1 NON NLS 1 f Table Viewer set Column Properties column Properties create and set cell editors f Table Viewer set Cell Editors get Cell Editors if f Tab Created refresh Table Viewer after refresh make sure cursor position is up to date if is Address Visible f Selected Address update Cursor Position pack Columns update Sync Col Size return true  bytesPerLine columnSize bytesPerLine columnSize bytesPerLine bytesPerLine IInternalDebugUIConstants BYTES_PER_LINE bytesPerLine bytesPerLine columnSize fBytePerLine bytesPerLine fColumnSize columnSize fBytePerLine bytesPerLine fColumnSize columnSize fTabCreated getTopVisibleAddress fTableViewer fTableViewer getTable TableColumn oldColumns fTableViewer getTable getColumns oldColumns oldColumns CellEditor oldCellEditors fTableViewer getCellEditors oldCellEditors oldCellEditors TableColumn TableColumn fTableViewer getTable setText DebugUIMessages getString TableColumn byteColumns TableColumn bytesPerLine columnSize columnLabels getMemoryBlockPresentation columnLabels getMemoryBlockPresentation getColumnLabels getMemoryBlock bytesPerLine columnSize byteColumns TableColumn TableColumn fTableViewer getTable columnLabels byteColumns setText columnLabels getColumnSize setText toHexString columnSize toUpperCase toHexString columnSize columnSize toUpperCase setText toHexString columnSize toUpperCase TableColumn emptyCol TableColumn fTableViewer getTable byteColumns emptyCol setText emptyCol setWidth emptyCol setResizable columnProperties byteColumns columnProperties MemoryViewLine P_ADDRESS columnProperties columnProperties toHexString columnSize columnProperties columnProperties fTableViewer setColumnProperties columnProperties fTableViewer setCellEditors getCellEditors fTabCreated refreshTableViewer isAddressVisible fSelectedAddress updateCursorPosition packColumns updateSyncColSize
private void refresh Table Viewer int i f Table Viewer get Table get Top Index refresh if the view is already created f Table Viewer refresh if top index has changed restore it if i f Table Viewer get Table get Top Index f Table Viewer get Table set Top Index i  refreshTableViewer fTableViewer getTable getTopIndex fTableViewer fTableViewer getTable getTopIndex fTableViewer getTable setTopIndex
private void set Column Headings String column Labels new String 0 if get Memory Block Presentation null column Labels get Memory Block Presentation get Column Labels get Memory Block f Byte Per Line f Column Size int num Byte Columns f Byte Per Line f Column Size Table Column columns f Table Viewer get Table get Columns int j 0 for int i 1 i columns length 1 i if the number of column labels returned is correct use supplied column labels if column Labels length num Byte Columns columns i set Text column Labels j j else otherwise use default if f Column Size 4 columns i set Text Integer to Hex String i f Column Size to Upper Case Integer to Hex String i f Column Size f Column Size 1 to Upper Case NON NLS 1 else columns i set Text Integer to Hex String i f Column Size to Upper Case  setColumnHeadings columnLabels getMemoryBlockPresentation columnLabels getMemoryBlockPresentation getColumnLabels getMemoryBlock fBytePerLine fColumnSize numByteColumns fBytePerLine fColumnSize TableColumn fTableViewer getTable getColumns columnLabels numByteColumns setText columnLabels fColumnSize setText toHexString fColumnSize toUpperCase toHexString fColumnSize fColumnSize toUpperCase setText toHexString fColumnSize toUpperCase
Resize column to the preferred size public void pack Columns pack columns Table table f Table Viewer get Table Table Column columns table get Columns for int i 0 i columns length 1 i columns i pack if f Cursor Manager null if is Address Visible f Selected Address f Cursor Manager redraw Cursors  packColumns fTableViewer getTable TableColumn getColumns fCursorManager isAddressVisible fSelectedAddress fCursorManager redrawCursors
return tab item for the view tab protected Tab Item get Tab return f Tab Item  TabItem getTab fTabItem
Force focus on th ecursor if the selected address is not out of range Cursor cannot be shown if it s out of range Otherwise it messes up the top index of the table and affects scrolling protected void set Cursor Focus if is Address Out Of Range f Selected Address f Cursor Manager null f Cursor Manager set Cursor Focus  setCursorFocus isAddressOutOfRange fSelectedAddress fCursorManager fCursorManager setCursorFocus
public I Memory Block get Memory Block I Memory Block mem f Memory Block return mem  IMemoryBlock getMemoryBlock IMemoryBlock fMemoryBlock
public void dispose try f Is Disposed true clean up listeners if f Table Viewer null f Table Viewer get Control remove Control Listener this f Table Viewer get Control remove Key Listener this f Table Viewer get Table remove Selection Listener this if content Provider null content Provider dispose Scroll Bar scroll Table f Table Viewer get Control get Vertical Bar if scroll null scroll remove Selection Listener this dispose cursor if f Cursor Manager null f Cursor Manager dispose remove selection listener for tab folder f Tab Item remove Dispose Listener f Tab Folder Dispose Listener f Tab Item dispose f Text Viewer null f Table Viewer null clean up cell editors for int i 0 i f Editors length i f Editors i dispose remove font change listener when the view tab is disposed J Face Resources get Font Registry remove Listener f Font Change Listener remove the view tab from the synchronizer get Memory Block View Synchronizer remove View this super dispose catch Exception e  fIsDisposed fTableViewer fTableViewer getControl removeControlListener fTableViewer getControl removeKeyListener fTableViewer getTable removeSelectionListener contentProvider contentProvider ScrollBar fTableViewer getControl getVerticalBar removeSelectionListener fCursorManager fCursorManager fTabItem removeDisposeListener fTabFolderDisposeListener fTabItem fTextViewer fTableViewer fEditors fEditors JFaceResources getFontRegistry removeListener fFontChangeListener getMemoryBlockViewSynchronizer removeView
public void widget Selected Selection Event event if event get Source instanceof Scroll Bar handle Scroll Bar Selection event  widgetSelected SelectionEvent getSource ScrollBar handleScrollBarSelection
Based on cursor position update table selection If a lead cursor is not available the cursor is not visible Update will not be performed if the cursor is not visible protected void update Table Selection do not update selection if address is out of range otherwise screws up top index if is Address Out Of Range f Selected Address return int index find Address Index get Top Visible Address update table selection f Table Viewer get Table set Selection f Cursor Manager f Row if top index has changed restore if f Table Viewer get Table get Top Index index f Table Viewer get Table set Top Index index  updateTableSelection isAddressOutOfRange fSelectedAddress findAddressIndex getTopVisibleAddress fTableViewer getTable setSelection fCursorManager fRow fTableViewer getTable getTopIndex fTableViewer getTable setTopIndex
Calculate and set selected address based on provided row and column protected void update Selected Address Table Item row int col get row address String temp Memory View Line row get Data get Address Big Integer row Address new Big Integer temp 16 int offset if col 0 get address offset offset col 1 get Column Size else offset 0 update selected address set Selected Address row Address add Big Integer value Of offset true  updateSelectedAddress TableItem MemoryViewLine getData getAddress BigInteger rowAddress BigInteger getColumnSize setSelectedAddress rowAddress BigInteger valueOf
see org eclipse swt events Selection Listener widget Default Selected org eclipse swt events Selection Event public void widget Default Selected Selection Event e  SelectionListener widgetDefaultSelected SelectionEvent widgetDefaultSelected SelectionEvent
see org eclipse swt events Control Listener control Moved org eclipse swt events Control Event public void control Moved Control Event e  ControlListener controlMoved ControlEvent controlMoved ControlEvent
public void control Resized Control Event e this method gets called many times as the user drags the window to a new size TODO only refresh the data at the end of the resize if possible do not handle resize if the tab is not yet created completely if f Tab Created resize Table  controlResized ControlEvent fTabCreated resizeTable
Handles key events in viewer protected void handle Key Pressed Key Event evt final Key Event event evt Must run on UI Thread asynchronously Otherwise another event could have been recevied before the reload is completed Display get Default sync Exec new Runnable public void run if event state Mask 0 return if event get Source instanceof Text return allow edit if user hits return if event character r event get Source instanceof Table Cursor f Cursor Manager activate Cell Editor null return try switch event key Code case SWT HOME case SWT PAGE UP case SWT ARROW UP case SWT ARROW LEFT case SWT END case SWT PAGE DOWN case SWT ARROW DOWN case SWT ARROW RIGHT If blocking an extended memory block check to see if additional memory needs to be obtained if f Memory Block instanceof I Extended Memory Block User could have used scroll bar to scroll away from the highlighted address When user hits arrow keys or page up down keys we should go back to the selected address and moves the cursor based on the key pressed if is Address Out Of Range f Selected Address reload Table f Selected Address false update Sync Top Address true update Sync Selected Address true f Cursor Manager set Cursor Focus break if we are approaching the limits of the currently loaded memory reload the table if need More Lines Big Integer top Address get Top Visible Address if we re near 0 just go there immediately hard stop at 0 don t try to scroll wrap if top Address compare To Big Integer value Of 96 0 if top Address equals Big Integer value Of 0 do not reload if we are already at zero break reload Table Big Integer value Of 0 false f Cursor Manager set Cursor Focus else otherwise just load the next portion of the memory reload Table top Address false f Cursor Manager set Cursor Focus else if is Address Visible f Selected Address address is in range but not visible just go to the address and make sure that the cursor is in focus go To Address f Selected Address f Cursor Manager set Cursor Focus update Sync Top Address true else in place of the commented lines update Cursor Position f Cursor Manager set Cursor Focus since cursor is going to be visible synchronization event will be fired by the cursor when it is selected break default if it s a valid key for edit if is Valid Edit Event event key Code activate edit as soon as user types something at the cursor if event get Source instanceof Table Cursor String initial Value String value Of event character f Cursor Manager activate Cell Editor initial Value break catch Debug Exception e display Error e DebugUI Plugin log e get Status  handleKeyPressed KeyEvent KeyEvent getDefault syncExec stateMask getSource getSource TableCursor fCursorManager activateCellEditor keyCode PAGE_UP ARROW_UP ARROW_LEFT PAGE_DOWN ARROW_DOWN ARROW_RIGHT fMemoryBlock IExtendedMemoryBlock isAddressOutOfRange fSelectedAddress reloadTable fSelectedAddress updateSyncTopAddress updateSyncSelectedAddress fCursorManager setCursorFocus needMoreLines BigInteger topAddress getTopVisibleAddress topAddress compareTo BigInteger valueOf topAddress BigInteger valueOf reloadTable BigInteger valueOf fCursorManager setCursorFocus reloadTable topAddress fCursorManager setCursorFocus isAddressVisible fSelectedAddress goToAddress fSelectedAddress fCursorManager setCursorFocus updateSyncTopAddress updateCursorPosition fCursorManager setCursorFocus isValidEditEvent keyCode getSource TableCursor initialValue valueOf fCursorManager activateCellEditor initialValue DebugException displayError DebugUIPlugin getStatus
return top visible address of this view tab public Big Integer get Top Visible Address if f Table Viewer null return Big Integer value Of 0 Table table f Table Viewer get Table int top Index table get Top Index if top Index 1 top Index 0 if table get Item Count top Index Memory View Line top Item Memory View Line table get Item top Index get Data String calculated Address null if top Item null calculated Address table get Item top Index get Text else calculated Address top Item get Address Big Integer big Int new Big Integer calculated Address 16 return big Int else return Big Integer value Of 0  BigInteger getTopVisibleAddress fTableViewer BigInteger valueOf fTableViewer getTable topIndex getTopIndex topIndex topIndex getItemCount topIndex MemoryViewLine topItem MemoryViewLine getItem topIndex getData calculatedAddress topItem calculatedAddress getItem topIndex getText calculatedAddress topItem getAddress BigInteger bigInt BigInteger calculatedAddress bigInt BigInteger valueOf
Reload table at the top Address Delta will be re computed if update Delta is true param top Address param update Delta throws Debug Exception synchronized protected void reload Table Big Integer top Address boolean update Delta throws Debug Exception if f Table Viewer null return Table table Table f Table Viewer get Control Calculate top buffer address This is where we will start asking for memory from debug adapter Big Integer top Buffer Address top Address if top Buffer Address compare To Big Integer value Of 32 0 TABLE PREBUFFER 0 else TABLE PREBUFFER top Buffer Address divide Big Integer value Of 32 min Big Integer value Of TABLE DEFAULTBUFFER int Value top Buffer Address top Address subtract Big Integer value Of get Bytes Per Line TABLE PREBUFFER calculate number of lines needed long num Lines 0 if f Memory Block instanceof I Extended Memory Block number of lines is number of visible lines buffered lines num Lines get Number Of Visible Lines TABLE PREBUFFER TABLE POSTBUFFER tell content provider to get memory and refresh content Provider get Memory To Fit Table top Buffer Address num Lines update Delta content Provider force Refresh if f Memory Block instanceof I Extended Memory Block int top Idx find Address Index top Address if top Idx 1 table set Top Index top Idx TODO Revisit this part again if allow cursor update when the cursor is not visible causes flashing on the screen if not updated then cursor may not show properly table selection not hidden if selected address is not out of range restore cursor if is Address Visible f Selected Address find Address Index f Selected Address 1 get Top Visible Address get Top Visible Address add Big Integer value Of get Bytes Per Line get Number Of Visible Lines if the cursor is not visible but in buffered range updating and showing the cursor will move the top index of the table update Cursor Position int new Idx find Address Index get Top Visible Address if new Idx top Idx top Idx 1 table set Top Index top Idx if is Address Visible f Selected Address f Cursor Manager show Cursor else f Cursor Manager hide Cursor else f Cursor Manager hide Cursor try to display the table every time it s reloaded display Table  topAddress updateDelta topAddress updateDelta DebugException reloadTable BigInteger topAddress updateDelta DebugException fTableViewer fTableViewer getControl BigInteger topBufferAddress topAddress topBufferAddress compareTo BigInteger valueOf TABLE_PREBUFFER TABLE_PREBUFFER topBufferAddress BigInteger valueOf BigInteger valueOf TABLE_DEFAULTBUFFER intValue topBufferAddress topAddress BigInteger valueOf getBytesPerLine TABLE_PREBUFFER numLines fMemoryBlock IExtendedMemoryBlock numLines getNumberOfVisibleLines TABLE_PREBUFFER TABLE_POSTBUFFER contentProvider getMemoryToFitTable topBufferAddress numLines updateDelta contentProvider forceRefresh fMemoryBlock IExtendedMemoryBlock topIdx findAddressIndex topAddress topIdx setTopIndex topIdx isAddressVisible fSelectedAddress findAddressIndex fSelectedAddress getTopVisibleAddress getTopVisibleAddress BigInteger valueOf getBytesPerLine getNumberOfVisibleLines updateCursorPosition newIdx findAddressIndex getTopVisibleAddress newIdx topIdx topIdx setTopIndex topIdx isAddressVisible fSelectedAddress fCursorManager showCursor fCursorManager hideCursor fCursorManager hideCursor displayTable
private int find Address Index Big Integer address Table Item items f Table Viewer get Table get Items for int i 0 i items length i Again when the table resizes the table may have a null item at then end This is to handle that if items i null Memory View Line line Memory View Line items i get Data Big Integer line Address new Big Integer line get Address 16 Big Integer end Line Address line Address add Big Integer value Of get Bytes Per Line if line Address compare To address 0 end Line Address compare To address 0 return i return 1  findAddressIndex BigInteger TableItem fTableViewer getTable getItems MemoryViewLine MemoryViewLine getData BigInteger lineAddress BigInteger getAddress BigInteger endLineAddress lineAddress BigInteger valueOf getBytesPerLine lineAddress compareTo endLineAddress compareTo
Update cursor position based on selected address return true if cursor is visible false otherwise private boolean update Cursor Position selected address is out of range simply return false if f Selected Address compare To content Provider get Buffer Top Address 0 return false calculate selected row address int num Of Rows f Selected Address subtract content Provider get Buffer Top Address int Value get Bytes Per Line Big Integer row Address content Provider get Buffer Top Address add Big Integer value Of num Of Rows get Bytes Per Line try to find the row of the selected address int row find Address Index f Selected Address if row 1 return false calculate offset to the row address Big Integer offset f Selected Address subtract row Address locate column int col offset int Value get Column Size 1 setting cursor selection or table selection changes the top index of the table and may mess up top index in the talbe save up old top index int old Top f Table Viewer get Table get Top Index update cursor position and table selection f Cursor Manager update Cursor Position row col is Address Visible f Selected Address update Table Selection reset top index to make sure the table is not moved f Table Viewer get Table set Top Index old Top if is Address Visible f Selected Address f Cursor Manager show Cursor f Table Viewer get Table deselect All else f Cursor Manager hide Cursor return true  updateCursorPosition fSelectedAddress compareTo contentProvider getBufferTopAddress numOfRows fSelectedAddress contentProvider getBufferTopAddress intValue getBytesPerLine BigInteger rowAddress contentProvider getBufferTopAddress BigInteger valueOf numOfRows getBytesPerLine findAddressIndex fSelectedAddress BigInteger fSelectedAddress rowAddress intValue getColumnSize oldTop fTableViewer getTable getTopIndex fCursorManager updateCursorPosition isAddressVisible fSelectedAddress updateTableSelection fTableViewer getTable setTopIndex oldTop isAddressVisible fSelectedAddress fCursorManager showCursor fTableViewer getTable deselectAll fCursorManager hideCursor
public int get Number Of Visible Lines if f Table Viewer null return 1 Table table f Table Viewer get Table int height f Table Viewer get Table get Size y when table is not yet created height is zero if height 0 make use of the table viewer to estimate table size height f Table Viewer get Table get Parent get Size y height of border int border f Table Viewer get Table get Header Height height of scroll bar int scroll f Table Viewer get Table get Horizontal Bar get Size y height of table is table s area minus border and scroll bar height height height border scroll calculate number of visible lines int line Height table get Item Height int number Of Lines height line Height return number Of Lines  getNumberOfVisibleLines fTableViewer fTableViewer getTable fTableViewer getTable getSize fTableViewer getTable getParent getSize fTableViewer getTable getHeaderHeight fTableViewer getTable getHorizontalBar getSize lineHeight getItemHeight numberOfLines lineHeight numberOfLines
public void refresh try refresh at start address of this memory block address may change if expression is evaluated to a different value I Memory Block mem f Memory Block Big Integer address if mem instanceof I Extended Memory Block address I Extended Memory Block mem get Big Base Address if address null Debug Exception e new Debug Exception DebugUI Plugin new Error Status DebugUI Messages get String UNABLE TO GET BASE ADDRESS null display Error e return set Tab Name mem true base address has changed if address compare To content Provider get Content Base Address 0 get to new address reload Table address true else reload at top of table address content Provider get Buffer Top Address add Big Integer value Of get Bytes Per Line TABLE PREBUFFER address get Top Visible Address reload Table address true else address Big Integer value Of mem get Start Address reload Table address true if is Address Visible f Selected Address redraw cursors if cursor is visible get Cursor Manager redraw Cursors catch Debug Exception e display Error e DebugUI Plugin log e get Status  IMemoryBlock fMemoryBlock BigInteger IExtendedMemoryBlock IExtendedMemoryBlock getBigBaseAddress DebugException DebugException DebugUIPlugin newErrorStatus DebugUIMessages getString UNABLE_TO_GET_BASE_ADDRESS displayError setTabName compareTo contentProvider getContentBaseAddress reloadTable contentProvider getBufferTopAddress BigInteger valueOf getBytesPerLine TABLE_PREBUFFER getTopVisibleAddress reloadTable BigInteger valueOf getStartAddress reloadTable isAddressVisible fSelectedAddress getCursorManager redrawCursors DebugException displayError DebugUIPlugin getStatus
public void run boolean reloaded false this code is is running on the UI thread with a delay The view tab may have been disposed when this actually gets executed if f Table Viewer null return Table table f Table Viewer get Table make sure table is still valid if table is Disposed return int top Index table get Top Index if top Index 0 return Big Integer old Top Address get Top Visible Address if old Top Address compare To Big Integer value Of 32 0 TABLE PREBUFFER 0 else TABLE PREBUFFER old Top Address divide Big Integer value Of 32 min Big Integer value Of TABLE DEFAULTBUFFER int Value check pre condition before we can check on number of lines left in the table if table get Item Count top Index try if new window size exceeds the number of lines available in the table reload the table if need More Lines reload Table old Top Address false reloaded true if old Top Address compare To Big Integer value Of 96 0 reload Table Big Integer value Of 0 false reloaded true catch Debug Exception e display Error e DebugUI Plugin log e get Status if reloaded if not reload still need to update the cursor position since the position may change update Cursor Position f Table Viewer get Table deselect All if get Top Visible Address equals old Top Address int i find Address Index old Top Address if i 1 f Table Viewer get Table set Top Index i update Sync Top Address true  fTableViewer fTableViewer getTable isDisposed topIndex getTopIndex topIndex BigInteger oldTopAddress getTopVisibleAddress oldTopAddress compareTo BigInteger valueOf TABLE_PREBUFFER TABLE_PREBUFFER oldTopAddress BigInteger valueOf BigInteger valueOf TABLE_DEFAULTBUFFER intValue getItemCount topIndex needMoreLines reloadTable oldTopAddress oldTopAddress compareTo BigInteger valueOf reloadTable BigInteger valueOf DebugException displayError DebugUIPlugin getStatus updateCursorPosition fTableViewer getTable deselectAll getTopVisibleAddress oldTopAddress findAddressIndex oldTopAddress fTableViewer getTable setTopIndex updateSyncTopAddress
Handle resize of the table private void resize Table if f Memory Block instanceof I Extended Memory Block return if is Enabled return Display get Default sync Exec new Runnable public void run boolean reloaded false this code is is running on the UI thread with a delay The view tab may have been disposed when this actually gets executed if f Table Viewer null return Table table f Table Viewer get Table make sure table is still valid if table is Disposed return int top Index table get Top Index if top Index 0 return Big Integer old Top Address get Top Visible Address if old Top Address compare To Big Integer value Of 32 0 TABLE PREBUFFER 0 else TABLE PREBUFFER old Top Address divide Big Integer value Of 32 min Big Integer value Of TABLE DEFAULTBUFFER int Value check pre condition before we can check on number of lines left in the table if table get Item Count top Index try if new window size exceeds the number of lines available in the table reload the table if need More Lines reload Table old Top Address false reloaded true if old Top Address compare To Big Integer value Of 96 0 reload Table Big Integer value Of 0 false reloaded true catch Debug Exception e display Error e DebugUI Plugin log e get Status if reloaded if not reload still need to update the cursor position since the position may change update Cursor Position f Table Viewer get Table deselect All if get Top Visible Address equals old Top Address int i find Address Index old Top Address if i 1 f Table Viewer get Table set Top Index i update Sync Top Address true  resizeTable fMemoryBlock IExtendedMemoryBlock isEnabled getDefault syncExec fTableViewer fTableViewer getTable isDisposed topIndex getTopIndex topIndex BigInteger oldTopAddress getTopVisibleAddress oldTopAddress compareTo BigInteger valueOf TABLE_PREBUFFER TABLE_PREBUFFER oldTopAddress BigInteger valueOf BigInteger valueOf TABLE_DEFAULTBUFFER intValue getItemCount topIndex needMoreLines reloadTable oldTopAddress oldTopAddress compareTo BigInteger valueOf reloadTable BigInteger valueOf DebugException displayError DebugUIPlugin getStatus updateCursorPosition fTableViewer getTable deselectAll getTopVisibleAddress oldTopAddress findAddressIndex oldTopAddress fTableViewer getTable setTopIndex updateSyncTopAddress
Handle scrollling and reload table if necessary param event private void handle Scroll Bar Selection Selection Event event if f Memory Block instanceof I Extended Memory Block if not instance of extended memory block just get current top visible address and fire event update Sync Top Address true final Selection Event evt event Must run on UI Thread asynchronously Otherwise another event could have been recevied before the reload is completed Display get Default async Exec new Runnable public void run try switch evt detail case 0 the end of a drag case SWT END case SWT PAGE DOWN case SWT ARROW DOWN case SWT HOME case SWT PAGE UP case SWT ARROW UP if f Memory Block instanceof I Extended Memory Block update Sync Top Address true if we are approaching the limits of the currently loaded memory reload the table if need More Lines Big Integer top Address get Top Visible Address if we re near 0 just go there immediately hard stop at 0 don t try to scroll wrap if top Address compare To Big Integer value Of 96 0 if top Address equals Big Integer value Of 0 do not reload if we are already at zero break reload Table Big Integer value Of 0 false else otherwise just load the next portion of the memory reload Table top Address false if is Address Visible f Selected Address update Cursor Position f Cursor Manager set Cursor Focus break default break catch Debug Exception e display Error e DebugUI Plugin log e get Status  handleScrollBarSelection SelectionEvent fMemoryBlock IExtendedMemoryBlock updateSyncTopAddress SelectionEvent getDefault asyncExec PAGE_DOWN ARROW_DOWN PAGE_UP ARROW_UP fMemoryBlock IExtendedMemoryBlock updateSyncTopAddress needMoreLines BigInteger topAddress getTopVisibleAddress topAddress compareTo BigInteger valueOf topAddress BigInteger valueOf reloadTable BigInteger valueOf reloadTable topAddress isAddressVisible fSelectedAddress updateCursorPosition fCursorManager setCursorFocus DebugException displayError DebugUIPlugin getStatus
public void set Enabled boolean enable super set Enabled enable f Enabled enable I Memory Block mem f Memory Block if f Enabled Big Integer old Base content Provider get Content Base Address debug adapter may ignore the enable request some adapter does not block memory and may not do anything with the enable disable request As a result we need to force a refresh and to make sure content is updated refresh if mem instanceof I Extended Memory Block Big Integer base Address I Extended Memory Block mem get Big Base Address if base Address null base Address new Big Integer 0 NON NLS 1 Array List references Array List get Synchronized Property I Memory View Constants PROPERTY ENABLED REFERENCES if the base address has changed update cursor and this is the first time this memory block is enabled if base Address equals old Base references size 1 set Selected Address base Address true update Cursor Position update Sync Top Address true update Sync Selected Address true else otherwise take synchronized settings synchronize else synchronize else if mem instanceof I Extended Memory Block set Tab Name mem false once the view tab is disabled all deltas information becomes invalid reset changed information and recompute if data has really changed when user revisits the same tab content Provider reset Deltas  setEnabled setEnabled fEnabled IMemoryBlock fMemoryBlock fEnabled BigInteger oldBase contentProvider getContentBaseAddress IExtendedMemoryBlock BigInteger baseAddress IExtendedMemoryBlock getBigBaseAddress baseAddress baseAddress BigInteger ArrayList ArrayList getSynchronizedProperty IMemoryViewConstants PROPERTY_ENABLED_REFERENCES baseAddress oldBase setSelectedAddress baseAddress updateCursorPosition updateSyncTopAddress updateSyncSelectedAddress IExtendedMemoryBlock setTabName contentProvider resetDeltas
public boolean is Enabled return f Enabled  isEnabled fEnabled
Display an error in the view tab Make use of the text viewer instead of the table viewer param e protected void display Error Debug Exception e Styled Text style Text null error Occurred true if f Text Viewer null create text viewer f Text Viewer new Text Viewer f Tab Item get Parent SWT NONE f Tab Item set Control f Text Viewer get Control f Text Viewer set Document new Document style Text f Text Viewer get Text Widget style Text set Editable false style Text set Enabled false else if f Text Viewer get Control f Tab Item get Control switch to text viewer f Tab Item set Control f Text Viewer get Control style Text f Text Viewer get Text Widget if style Text null style Text set Text DebugUI Messages get String ERROR e  displayError DebugException StyledText styleText errorOccurred fTextViewer fTextViewer TextViewer fTabItem getParent fTabItem setControl fTextViewer getControl fTextViewer setDocument styleText fTextViewer getTextWidget styleText setEditable styleText setEnabled fTextViewer getControl fTabItem getControl fTabItem setControl fTextViewer getControl styleText fTextViewer getTextWidget styleText styleText setText DebugUIMessages getString
public boolean is Displaying Error if f Text Viewer null return false if f Tab Item get Control f Text Viewer get Control return true else return false  isDisplayingError fTextViewer fTabItem getControl fTextViewer getControl
public void display Table if f Table Viewer null f Tab Item get Control f Table Viewer get Control error Occurred false f Tab Item set Control f Table Viewer get Control  displayTable fTableViewer fTabItem getControl fTableViewer getControl errorOccurred fTabItem setControl fTableViewer getControl
see org eclipse swt events Key Listener key Pressed org eclipse swt events Key Event public void key Pressed Key Event e handle Key Pressed e  KeyListener keyPressed KeyEvent keyPressed KeyEvent handleKeyPressed
see org eclipse swt events Key Listener key Released org eclipse swt events Key Event public void key Released Key Event e  KeyListener keyReleased KeyEvent keyReleased KeyEvent
return cell editors for the table private Cell Editor get Cell Editors Table table f Table Viewer get Table f Editors new Cell Editor table get Column Count for int i 0 i f Editors length i f Editors i new Text Cell Editor table combine the listener validator interfaces so we can handle editing an address which really skips the table to that address class Cell Validator Listener implements I Cell Editor Validator Text Cell Editor text Editor boolean is Address Validator public Cell Validator Listener Cell Editor cell Editor boolean is Address text Editor Text Cell Editor cell Editor is Address Validator is Address public String is Valid Object value if value instanceof String if String value length 0 return null allow empty strings so hitting delete doesn t immediately pop up an error make sure the character is 0 9ABCDEF only try if is Address Validator don t validate address to allow input of variable in the address field Big Integer big Int new Big Integer String value 16 catch Number Format Exception ne return not valid return null editing an address skips the table to that address for int i 0 i f Editors length i f Editors i set Validator new Cell Validator Listener f Editors i true return f Editors  CellEditor getCellEditors fTableViewer getTable fEditors CellEditor getColumnCount fEditors fEditors TextCellEditor CellValidatorListener ICellEditorValidator TextCellEditor textEditor isAddressValidator CellValidatorListener CellEditor cellEditor isAddress textEditor TextCellEditor cellEditor isAddressValidator isAddress isValid isAddressValidator BigInteger bigInt BigInteger NumberFormatException fEditors fEditors setValidator CellValidatorListener fEditors fEditors
public Table Viewer get Table Viewer return f Table Viewer  TableViewer getTableViewer fTableViewer
protected View Tab Cursor Manager get Cursor Manager return f Cursor Manager  ViewTabCursorManager getCursorManager fCursorManager
This function must be made synchronized Otherwise another thread could modify the selected address while it is being updated It is the case when user scrolls up down the table using arrow key When the table reaches its limit it is being reloaded However cursor receives a selection event and update the selected address at the same time It messes up the selected address and causes cursor selection to behave unexpectedly param address synchronized protected void set Selected Address Big Integer address boolean update Synchronizer f Selected Address address update Sync Selected Address update Synchronizer  setSelectedAddress BigInteger updateSynchronizer fSelectedAddress updateSyncSelectedAddress updateSynchronizer
Return the offset from the base address of the memory block param memory param line Address param line Offset return TODO this method is never called protected long get Offset I Memory Block memory String line Address int line Offset Big Integer line Addr new Big Integer line Address 16 Big Integer memory Addr if memory instanceof I Extended Memory Block memory Addr I Extended Memory Block memory get Big Base Address else memory Addr Big Integer value Of memory get Start Address if memory Addr null memory Addr new Big Integer 0 NON NLS 1 long offset line Addr subtract memory Addr long Value return offset line Offset  lineAddress lineOffset getOffset IMemoryBlock lineAddress lineOffset BigInteger lineAddr BigInteger lineAddress BigInteger memoryAddr IExtendedMemoryBlock memoryAddr IExtendedMemoryBlock getBigBaseAddress memoryAddr BigInteger valueOf getStartAddress memoryAddr memoryAddr BigInteger lineAddr memoryAddr longValue lineOffset
Reset this view tab to the base address of the memory block public void reset At Base Address throws Debug Exception try I Memory Block mem get Memory Block if mem instanceof I Extended Memory Block if text editor is activated removes its focus and commit any changes made set Cursor Focus reload table at base address Big Integer address I Extended Memory Block mem get Big Base Address if address null address new Big Integer 0 NON NLS 1 set Selected Address address true reload Table address false make sure cursor has focus when the user chooses to reset set Cursor Focus else go to top of the table Big Integer address Big Integer value Of mem get Start Address set Selected Address address true get Table Viewer get Table set Top Index 0 update Cursor Position update Table Selection set Cursor Focus update Sync Top Address true catch Debug Exception e throw e  resetAtBaseAddress DebugException IMemoryBlock getMemoryBlock IExtendedMemoryBlock setCursorFocus BigInteger IExtendedMemoryBlock getBigBaseAddress BigInteger setSelectedAddress reloadTable setCursorFocus BigInteger BigInteger valueOf getStartAddress setSelectedAddress getTableViewer getTable setTopIndex updateCursorPosition updateTableSelection setCursorFocus updateSyncTopAddress DebugException
public void go To Address Big Integer address throws Debug Exception go To Address address true f Cursor Manager set Cursor Focus  goToAddress BigInteger DebugException goToAddress fCursorManager setCursorFocus
param address throws Debug Exception private void go To Address Big Integer address boolean update Synchronizer throws Debug Exception try if address is within the range highlight if is Address Out Of Range address Defer update so that top visible address is updated before the selected address This is to ensure that the other view tabs get the top visible address change events first in case the selected address is not already visible If this is not done the other view tab may not show selected address set Selected Address address false update Cursor Position update Table Selection force the cursor to be shown if is Address Visible f Selected Address int i find Address Index f Selected Address f Table Viewer get Table show Item f Table Viewer get Table get Item i get Cursor Manager show Cursor update Sync Top Address update Synchronizer update selected address in synchronizer update Sync Selected Address update Synchronizer else if not extended memory block do not allow user to go to an address that s out of range if f Memory Block instanceof I Extended Memory Block Status stat new Status I Status ERROR DebugUI Plugin get Unique Identifier Debug Exception NOT SUPPORTED DebugUI Messages get String ADDRESS IS OUT OF RANGE null Debug Exception e new Debug Exception stat throw e set Selected Address address update Synchronizer otherwise reload at the address reload Table address false update Sync Top Address update Synchronizer catch Debug Exception e throw e  DebugException goToAddress BigInteger updateSynchronizer DebugException isAddressOutOfRange setSelectedAddress updateCursorPosition updateTableSelection isAddressVisible fSelectedAddress findAddressIndex fSelectedAddress fTableViewer getTable showItem fTableViewer getTable getItem getCursorManager showCursor updateSyncTopAddress updateSynchronizer updateSyncSelectedAddress updateSynchronizer fMemoryBlock IExtendedMemoryBlock IStatus DebugUIPlugin getUniqueIdentifier DebugException NOT_SUPPORTED DebugUIMessages getString ADDRESS_IS_OUT_OF_RANGE DebugException DebugException setSelectedAddress updateSynchronizer reloadTable updateSyncTopAddress updateSynchronizer DebugException
return public int get Column Size return f Column Size  getColumnSize fColumnSize
return public int get Bytes Per Line return f Byte Per Line  getBytesPerLine fBytePerLine
public void set Font Font font int old Idx f Table Viewer get Table get Top Index BUG in table if font is changed when table is not starting from the top causes table gridline to be misaligned f Table Viewer get Table set Top Index 0 set font f Table Viewer get Table set Font font f Cursor Manager set Font font f Table Viewer get Table set Top Index old Idx pack Columns update table cursor and force redraw update Cursor Position  setFont oldIdx fTableViewer getTable getTopIndex fTableViewer getTable setTopIndex fTableViewer getTable setFont fCursorManager setFont fTableViewer getTable setTopIndex oldIdx packColumns updateCursorPosition
return memory block presentation to allow for customization protected I Memory Block Model Presentation get Memory Block Presentation only try to create a model presentation once if f Memory Block Presentation null f No Presentation create model presentation for memory block Delegating Model Presentation presentation new Memory View Delegating Model Presentation String id f Memory Block get Model Identifier f Memory Block Presentation Memory View Lazy Model Presentation presentation get Presentation id if a memory block presentation cannot be retrieved if f Memory Block Presentation null f No Presentation true return f Memory Block Presentation  IMemoryBlockModelPresentation getMemoryBlockPresentation fMemoryBlockPresentation fNoPresentation DelegatingModelPresentation MemoryViewDelegatingModelPresentation fMemoryBlock getModelIdentifier fMemoryBlockPresentation MemoryViewLazyModelPresentation getPresentation fMemoryBlockPresentation fNoPresentation fMemoryBlockPresentation
public void set Tab Label String label if label null f Tab Item set Text label  setTabLabel fTabItem setText
public String get Tab Label if f Tab Item null return f Tab Item get Text else return null  getTabLabel fTabItem fTabItem getText
see org eclipse debug ui I Memory View Tab get Rendering Id public String get Rendering Id return f Rendering Id  IMemoryViewTab getRenderingId getRenderingId fRenderingId
Display get Default async Exec new Runnable public void run format 16 new Column Size  getDefault asyncExec newColumnSize
Handle column size changed event from synchronizer param new Column Size private void column Size Changed final int new Column Size ignore event if view tab is disabled if is Enabled return Display get Default async Exec new Runnable public void run format 16 new Column Size  newColumnSize columnSizeChanged newColumnSize isEnabled getDefault asyncExec newColumnSize
public void scroll Bar Selection Changed int new Selection  scrollBarSelectionChanged newSelection
Handle selected address change event from synchronizer param address private void selected Address Changed final Big Integer address ignore event if view tab is disabled if is Enabled return try if f Selected Address equals address if get Memory Block instanceof I Extended Memory Block go To Address address false else if is Address Out Of Range address go To Address address false catch Debug Exception e display Error e  selectedAddressChanged BigInteger isEnabled fSelectedAddress getMemoryBlock IExtendedMemoryBlock goToAddress isAddressOutOfRange goToAddress DebugException displayError
Handle top visible address change event from synchronizer param address private void top Visible Address Changed final Big Integer address try do not handle event if view tab is disabled if is Enabled return if address equals get Top Visible Address if get Memory Block instanceof I Extended Memory Block if is Address Out Of Range address int index 1 within buffer range just set top index Table table get Table Viewer get Table for int i 0 i table get Item Count i Memory View Line line Memory View Line table get Item i get Data if line null Big Integer line Address new Big Integer line get Address 16 if line Address equals address index i break if index 3 table get Item Count index get Number Of Visible Lines 3 update cursor position table set Top Index index if is Address Visible f Selected Address f Cursor Manager hide Cursor else update Cursor Position update Table Selection table set Top Index index BUG 64831 to get around SWT problem with the table cursor not painted properly after table set Top Index is called f Cursor Manager get Lead Cursor set Visible false f Cursor Manager get Lead Cursor set Visible true else approaching limit reload table reload Table address false else approaching limit reload table reload Table address false else I Memory Block support int index 1 within buffer range just set top index Table table get Table Viewer get Table for int i 0 i table get Item Count i Memory View Line line Memory View Line table get Item i get Data if line null Big Integer line Address new Big Integer line get Address 16 if line Address equals address index i break if index 0 table set Top Index index if is Address Visible f Selected Address f Cursor Manager hide Cursor else update Cursor Position update Table Selection table set Top Index index BUG 64831 to get around SWT problem with the table cursor not painted properly after table set Top Index is called f Cursor Manager get Lead Cursor set Visible false f Cursor Manager get Lead Cursor set Visible true catch Debug Exception e display Error e  topVisibleAddressChanged BigInteger isEnabled getTopVisibleAddress getMemoryBlock IExtendedMemoryBlock isAddressOutOfRange getTableViewer getTable getItemCount MemoryViewLine MemoryViewLine getItem getData BigInteger lineAddress BigInteger getAddress lineAddress getItemCount getNumberOfVisibleLines setTopIndex isAddressVisible fSelectedAddress fCursorManager hideCursor updateCursorPosition updateTableSelection setTopIndex setTopIndex fCursorManager getLeadCursor setVisible fCursorManager getLeadCursor setVisible reloadTable reloadTable IMemoryBlock getTableViewer getTable getItemCount MemoryViewLine MemoryViewLine getItem getData BigInteger lineAddress BigInteger getAddress lineAddress setTopIndex isAddressVisible fSelectedAddress fCursorManager hideCursor updateCursorPosition updateTableSelection setTopIndex setTopIndex fCursorManager getLeadCursor setVisible fCursorManager getLeadCursor setVisible DebugException displayError
Check if address provided is out of buffered range param address return private boolean is Address Out Of Range Big Integer address return content Provider is Address Out Of Range address  isAddressOutOfRange BigInteger contentProvider isAddressOutOfRange
Check if address is visible param address return protected boolean is Address Visible Big Integer address if view tab is not yet created cursor should always be visible if f Tab Created return true Big Integer top Visible get Top Visible Address Big Integer last Visible get Top Visible Address add Big Integer value Of get Number Of Visible Lines get Bytes Per Line get Bytes Per Line if top Visible compare To address 0 last Visible compare To address 0 return true else return false  isAddressVisible BigInteger fTabCreated BigInteger topVisible getTopVisibleAddress BigInteger lastVisible getTopVisibleAddress BigInteger valueOf getNumberOfVisibleLines getBytesPerLine getBytesPerLine topVisible compareTo lastVisible compareTo
Get properties from synchronizer and synchronize settings private void synchronize Integer column Size Integer get Synchronized Property I Memory View Constants PROPERTY COL SIZE Big Integer selected Address Big Integer get Synchronized Property I Memory View Constants PROPERTY SELECTED ADDRESS Big Integer top Address Big Integer get Synchronized Property I Memory View Constants PROPERTY TOP ADDRESS if column Size null int col Size column Size int Value if col Size 0 col Size f Column Size column Size Changed col Size if top Address null if top Address equals get Top Visible Address if f Selected Address equals selected Address set Selected Address selected Address true top Visible Address Changed top Address if selected Address null if selected Address compare To f Selected Address 0 selected Address Changed selected Address  columnSize getSynchronizedProperty IMemoryViewConstants PROPERTY_COL_SIZE BigInteger selectedAddress BigInteger getSynchronizedProperty IMemoryViewConstants PROPERTY_SELECTED_ADDRESS BigInteger topAddress BigInteger getSynchronizedProperty IMemoryViewConstants PROPERTY_TOP_ADDRESS columnSize colSize columnSize intValue colSize colSize fColumnSize columnSizeChanged colSize topAddress topAddress getTopVisibleAddress fSelectedAddress selectedAddress setSelectedAddress selectedAddress topVisibleAddressChanged topAddress selectedAddress selectedAddress compareTo fSelectedAddress selectedAddressChanged selectedAddress
public void property Changed String property Name Object value if is Displaying Error return if property Name equals I Memory View Constants PROPERTY SELECTED ADDRESS value instanceof Big Integer try if need More Lines reload Table get Top Visible Address false catch Debug Exception e display Error e selected Address Changed Big Integer value else if property Name equals I Memory View Constants PROPERTY COL SIZE value instanceof Integer column Size Changed Integer value int Value else if property Name equals I Memory View Constants PROPERTY TOP ADDRESS value instanceof Big Integer try if need More Lines reload Table get Top Visible Address false catch Debug Exception e display Error e top Visible Address Changed Big Integer value return  propertyChanged propertyName isDisplayingError propertyName IMemoryViewConstants PROPERTY_SELECTED_ADDRESS BigInteger needMoreLines reloadTable getTopVisibleAddress DebugException displayError selectedAddressChanged BigInteger propertyName IMemoryViewConstants PROPERTY_COL_SIZE columnSizeChanged intValue propertyName IMemoryViewConstants PROPERTY_TOP_ADDRESS BigInteger needMoreLines reloadTable getTopVisibleAddress DebugException displayError topVisibleAddressChanged BigInteger
public Object get Property String property Id if property Id equals I Memory View Constants PROPERTY SELECTED ADDRESS return f Selected Address else if property Id equals I Memory View Constants PROPERTY COL SIZE return new Integer f Column Size else if property Id equals I Memory View Constants PROPERTY TOP ADDRESS return get Top Visible Address return null  getProperty propertyId propertyId IMemoryViewConstants PROPERTY_SELECTED_ADDRESS fSelectedAddress propertyId IMemoryViewConstants PROPERTY_COL_SIZE fColumnSize propertyId IMemoryViewConstants PROPERTY_TOP_ADDRESS getTopVisibleAddress
see org eclipse debug ui I Memory View Tab get Selected Address public Big Integer get Selected Address return f Selected Address  IMemoryViewTab getSelectedAddress BigInteger getSelectedAddress fSelectedAddress
public String get Selected Content check precondition if f Cursor Manager f Col 0 f Cursor Manager f Col get Bytes Per Line get Column Size return NON NLS 1 Table Item table Item get Table Viewer get Table get Item f Cursor Manager f Row return table Item get Text f Cursor Manager f Col  getSelectedContent fCursorManager fCol fCursorManager fCol getBytesPerLine getColumnSize TableItem tableItem getTableViewer getTable getItem fCursorManager fRow tableItem getText fCursorManager fCol
Update labels in the view tab protected void update Labels update tab labels set Tab Name get Memory Block true if f Table Viewer null update column labels set Column Headings refresh Table Viewer  updateLabels setTabName getMemoryBlock fTableViewer setColumnHeadings refreshTableViewer
protected boolean need More Lines if get Memory Block instanceof I Extended Memory Block Table table f Table Viewer get Table Table Item first Item table get Item 0 Table Item last Item table get Item table get Item Count 1 if first Item null last Item null return true Memory View Line first Memory View Line first Item get Data Memory View Line last Memory View Line last Item get Data if first null last null For some reason the table does not return the correct number of table items in table get Item Count causing last to be null This check is to ensure that we don t get a null pointer exception return true Big Integer start Address new Big Integer first get Address 16 Big Integer last Address new Big Integer last get Address 16 last Address last Address add Big Integer value Of get Bytes Per Line Big Integer top Visible Address get Top Visible Address long num Visible Lines get Number Of Visible Lines long num Of Bytes num Visible Lines get Bytes Per Line Big Integer last Visible Addrss top Visible Address add Big Integer value Of num Of Bytes if there are only 3 lines left at the top refresh Big Integer num Top Line top Visible Address subtract start Address divide Big Integer value Of get Bytes Per Line if num Top Line compare To Big Integer value Of 3 0 return true if there are only 3 lines left at the bottom refresh Big Integer num Bottom Line last Address subtract last Visible Addrss divide Big Integer value Of get Bytes Per Line if num Bottom Line compare To Big Integer value Of 3 0 return true return false else return false  needMoreLines getMemoryBlock IExtendedMemoryBlock fTableViewer getTable TableItem firstItem getItem TableItem lastItem getItem getItemCount firstItem lastItem MemoryViewLine MemoryViewLine firstItem getData MemoryViewLine MemoryViewLine lastItem getData getItemCount BigInteger startAddress BigInteger getAddress BigInteger lastAddress BigInteger getAddress lastAddress lastAddress BigInteger valueOf getBytesPerLine BigInteger topVisibleAddress getTopVisibleAddress numVisibleLines getNumberOfVisibleLines numOfBytes numVisibleLines getBytesPerLine BigInteger lastVisibleAddrss topVisibleAddress BigInteger valueOf numOfBytes BigInteger numTopLine topVisibleAddress startAddress BigInteger valueOf getBytesPerLine numTopLine compareTo BigInteger valueOf BigInteger numBottomLine lastAddress lastVisibleAddrss BigInteger valueOf getBytesPerLine numBottomLine compareTo BigInteger valueOf
private Object get Synchronized Property String property Id return get Memory Block View Synchronizer get Synchronized Property get Memory Block property Id  getSynchronizedProperty propertyId getMemoryBlockViewSynchronizer getSynchronizedProperty getMemoryBlock propertyId
Checks to see if the event is valid for activating cell editing in a view tab param event return public boolean is Valid Edit Event int event for int i 0 i Memory View Tab ignore Events length i if event Memory View Tab ignore Events i return false return true  isValidEditEvent MemoryViewTab ignoreEvents MemoryViewTab ignoreEvents
private I Memory Block View Synchronizer get Memory Block View Synchronizer return DebugUI Plugin get Default get Memory Block View Synchronizer  IMemoryBlockViewSynchronizer getMemoryBlockViewSynchronizer DebugUIPlugin getDefault getMemoryBlockViewSynchronizer

Constructor for Memory View Label Provider public Memory View Tab Label Provider super  MemoryViewLabelProvider MemoryViewTabLabelProvider
public Memory View Tab Label Provider I Table Memory View Tab view Tab Abstract Memory Renderer renderer super view Tab renderer  MemoryViewTabLabelProvider ITableMemoryViewTab viewTab AbstractMemoryRenderer viewTab
public String get Column Text Object element int column Index String label super get Column Text element column Index consult model presentation for address presentation if column Index 0 if f View Tab instanceof Memory View Tab get model presentation I Debug Model Presentation presentation Memory View Tab f View Tab get Memory Block Presentation if presentation instanceof I Memory Block Model Presentation I Memory Block Model Presentation mem Presentation I Memory Block Model Presentation presentation String address Memory View Line element get Address get address presentation String temp Label mem Presentation get Address Presentation f View Tab get Memory Block new Big Integer address 16 if temp Label null return temp Label return label return label  getColumnText columnIndex getColumnText columnIndex columnIndex fViewTab MemoryViewTab IDebugModelPresentation MemoryViewTab fViewTab getMemoryBlockPresentation IMemoryBlockModelPresentation IMemoryBlockModelPresentation memPresentation IMemoryBlockModelPresentation MemoryViewLine getAddress tempLabel memPresentation getAddressPresentation fViewTab getMemoryBlock BigInteger tempLabel tempLabel
public Color get Foreground Object element if element instanceof Memory View Line Memory View Line line Memory View Line element if line is Monitored return null return DebugUI Plugin get Preference Color I Debug Preference Constants MEMORY VIEW UNBUFFERED LINE COLOR return null  getForeground MemoryViewLine MemoryViewLine MemoryViewLine isMonitored DebugUIPlugin getPreferenceColor IDebugPreferenceConstants MEMORY_VIEW_UNBUFFERED_LINE_COLOR
see org eclipse jface viewers I Color Provider get Background java lang Object public Color get Background Object element return null  IColorProvider getBackground getBackground

public class Memory View Util Helper function to check if a given selection is valid for creating a memory block param selection return static public boolean is Valid Selection I Selection selection if selection instanceof I Structured Selection return false only single selection is allowed for this action if selection null selection is Empty I Structured Selection selection size 1 return false Object elem I Structured Selection selection get First Element if not debug element if elem instanceof I Debug Element return false I Debug Target debug Target I Debug Element elem get Debug Target I Memory Block Retrieval mem Retrieval I Memory Block Retrieval I Debug Element elem get Adapter I Memory Block Retrieval class if mem Retrieval null if debug element returns null from get Adapter assume its debug target is going to retrieve memory blocks mem Retrieval debug Target not valid if the debug target is already terminated if debug Target is Terminated debug Target is Disconnected return false if mem Retrieval supports Storage Retrieval return true else return false  MemoryViewUtil isValidSelection ISelection IStructuredSelection isEmpty IStructuredSelection IStructuredSelection getFirstElement IDebugElement IDebugTarget debugTarget IDebugElement getDebugTarget IMemoryBlockRetrieval memRetrieval IMemoryBlockRetrieval IDebugElement getAdapter IMemoryBlockRetrieval memRetrieval getAdapter memRetrieval debugTarget debugTarget isTerminated debugTarget isDisconnected memRetrieval supportsStorageRetrieval
Helper function to open an error dialog param title param message param e static public void open Error String title String message Exception e open error for the exception String detail NON NLS 1 if e null detail e get Message Shell shell DebugUI Plugin get Default get Workbench get Active Workbench Window get Shell Message Dialog open Error shell title message n detail NON NLS 1  openError getMessage DebugUIPlugin getDefault getWorkbench getActiveWorkbenchWindow getShell MessageDialog openError

param parent Shell public Monitor Memory Block Dialog Shell parent Shell I Memory Block Retrieval mem Retrieval super parent Shell if mem Retrieval instanceof I Extended Memory Block Retrieval need Length false Workbench Help set Help parent Shell I DebugUI Constants PLUGIN ID MonitorMemoryBlockDialog context NON NLS 1  parentShell MonitorMemoryBlockDialog parentShell IMemoryBlockRetrieval memRetrieval parentShell memRetrieval IExtendedMemoryBlockRetrieval needLength WorkbenchHelp setHelp parentShell IDebugUIConstants PLUGIN_ID MonitorMemoryBlockDialog_context
protected Control create Dialog Area Composite parent parent set Layout new Grid Layout Grid Data spec2 new Grid Data spec2 grab Excess Vertical Space true spec2 grab Excess Horizontal Space true spec2 horizontal Alignment Grid Data FILL spec2 vertical Alignment Grid Data CENTER parent set Layout Data spec2 Label text Label new Label parent SWT NONE text Label set Text DebugUI Messages get String ENTER EXPRESSION Grid Data text Layout new Grid Data text Layout width Hint 280 text Label set Layout Data text Layout expression Input new Combo parent SWT BORDER Grid Data spec new Grid Data spec grab Excess Vertical Space false spec grab Excess Horizontal Space true spec horizontal Alignment Grid Data FILL spec vertical Alignment Grid Data BEGINNING spec height Hint 50 expression Input set Layout Data spec add history String history Expression String history to Array new String history size for int i 0 i history Expression length i expression Input add history Expression i expression Input add Modify Listener this if need Length Label length Label new Label parent SWT NONE length Label set Text DebugUI Messages get String NUMBER OF BYTES Grid Data length Layout new Grid Data length Layout width Hint 280 length Label set Layout Data length Layout length Input new Text parent SWT BORDER Grid Data length Spec new Grid Data length Spec grab Excess Vertical Space false length Spec grab Excess Horizontal Space true length Spec horizontal Alignment Grid Data FILL length Input set Layout Data length Spec length Input add Modify Listener this return parent  createDialogArea setLayout GridLayout GridData GridData grabExcessVerticalSpace grabExcessHorizontalSpace horizontalAlignment GridData verticalAlignment GridData setLayoutData textLabel textLabel setText DebugUIMessages getString ENTER_EXPRESSION GridData textLayout GridData textLayout widthHint textLabel setLayoutData textLayout expressionInput GridData GridData grabExcessVerticalSpace grabExcessHorizontalSpace horizontalAlignment GridData verticalAlignment GridData heightHint expressionInput setLayoutData historyExpression toArray historyExpression expressionInput historyExpression expressionInput addModifyListener needLength lengthLabel lengthLabel setText DebugUIMessages getString NUMBER_OF_BYTES GridData lengthLayout GridData lengthLayout widthHint lengthLabel setLayoutData lengthLayout lengthInput GridData lengthSpec GridData lengthSpec grabExcessVerticalSpace lengthSpec grabExcessHorizontalSpace lengthSpec horizontalAlignment GridData lengthInput setLayoutData lengthSpec lengthInput addModifyListener
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text DebugUI Messages get String MONITOR MEMORY  configureShell newShell configureShell newShell newShell setText DebugUIMessages getString MONITOR_MEMORY
public String get Expression return expression  getExpression
public String get Length return length  getLength
protected void ok Pressed expression expression Input get Text add to history list if history contains expression history insert Element At expression 0 if need Length length length Input get Text super ok Pressed  okPressed expressionInput getText insertElementAt needLength lengthInput getText okPressed
public void modify Text Modify Event e if need Length String length Text length Input get Text String input expression Input get Text if input null input equals length Text null length Text equals NON NLS 1 NON NLS 2 get Button I Dialog Constants OK ID set Enabled false else get Button I Dialog Constants OK ID set Enabled true else String input expression Input get Text if input null input equals NON NLS 1 get Button I Dialog Constants OK ID set Enabled false else get Button I Dialog Constants OK ID set Enabled true  modifyText ModifyEvent needLength lengthText lengthInput getText expressionInput getText lengthText lengthText getButton IDialogConstants OK_ID setEnabled getButton IDialogConstants OK_ID setEnabled expressionInput getText getButton IDialogConstants OK_ID setEnabled getButton IDialogConstants OK_ID setEnabled
protected Control create Button Bar Composite parent Control ret super create Button Bar parent get Button I Dialog Constants OK ID set Enabled false return ret  createButtonBar createButtonBar getButton IDialogConstants OK_ID setEnabled

public Print View Tab Action super DebugUI Messages get String TITLE set Tool Tip Text DebugUI Messages get String TOOLTIP set Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG ELCL PRINT TOP VIEW TAB set Hover Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG LCL PRINT TOP VIEW TAB set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL PRINT TOP VIEW TAB  PrintViewTabAction DebugUIMessages getString setToolTipText DebugUIMessages getString setImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_ELCL_PRINT_TOP_VIEW_TAB setHoverImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_LCL_PRINT_TOP_VIEW_TAB setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_PRINT_TOP_VIEW_TAB
private void print Table Table Item item List GC printGC Printer printer if get View Tab instanceof I Table Memory View Tab return String table Contents new String int num Columns Table f Viewer get Control get Column Count I Table Label Provider label Provider I Table Label Provider f Viewer get Label Provider int line Num 1 int char Per Byte 4 if label Provider instanceof Abstract Table View Tab Label Provider Abstract Memory Renderer renderer Abstract Table View Tab Label Provider label Provider get Renderer if renderer instanceof I Fixed Length Output Renderer char Per Byte I Fixed Length Output Renderer renderer get Num Char Per Byte return line number after column labels are printed line Num print Column Labels printGC line Num for all items in the table for int i 0 i item List length i table Contents NON NLS 1 print all columns for this row for int j 0 j num Columns j String column Text label Provider get Column Text item List i get Data j while column Text length I Table Memory View Tab get View Tab get Column Size char Per Byte column Text NON NLS 1 table Contents COLUMN SEPERATOR column Text printGC draw String table Contents 10 10 line Num printGC get Font Metrics get Height line Num if we ve run over the end of a page start a new one if 20 line Num printGC get Font Metrics get Height printer get Client Area height line Num 1 printer end Page printer start Page line Num print Column Labels printGC line Num  printTable TableItem itemList getViewTab ITableMemoryViewTab tableContents numColumns fViewer getControl getColumnCount ITableLabelProvider labelProvider ITableLabelProvider fViewer getLabelProvider lineNum charPerByte labelProvider AbstractTableViewTabLabelProvider AbstractMemoryRenderer AbstractTableViewTabLabelProvider labelProvider getRenderer IFixedLengthOutputRenderer charPerByte IFixedLengthOutputRenderer getNumCharPerByte lineNum printColumnLabels lineNum itemList tableContents numColumns columnText labelProvider getColumnText itemList getData columnText ITableMemoryViewTab getViewTab getColumnSize charPerByte columnText tableContents COLUMN_SEPERATOR columnText drawString tableContents lineNum getFontMetrics getHeight lineNum lineNum getFontMetrics getHeight getClientArea lineNum endPage startPage lineNum printColumnLabels lineNum
private int print Column Labels GC printGC int line Num if get View Tab instanceof I Table Memory View Tab return line Num String table Contents NON NLS 1 int num Columns Table f Viewer get Control get Column Count I Table Label Provider label Provider I Table Label Provider f Viewer get Label Provider Table Column columns Table f Viewer get Control get Columns int char Per Byte 4 if label Provider instanceof Abstract Table View Tab Label Provider Abstract Memory Renderer renderer Abstract Table View Tab Label Provider label Provider get Renderer if renderer instanceof I Fixed Length Output Renderer char Per Byte I Fixed Length Output Renderer renderer get Num Char Per Byte get the column headers for int k 0 k num Columns k String Buffer column Label new String Buffer columns k get Text int num Bytes 0 if k 0 num Bytes I Table Memory View Tab get View Tab get Column Size else special for address column I Memory Block mem Block get View Tab get Memory Block if mem Block instanceof I Extended Memory Block num Bytes I Extended Memory Block mem Block get Address Size if num Bytes 0 num Bytes 4 else num Bytes 4 while column Label length num Bytes char Per Byte column Label append NON NLS 1 table Contents COLUMN SEPERATOR column Label printGC draw String table Contents 10 10 line Num printGC get Font Metrics get Height line Num return line Num  printColumnLabels lineNum getViewTab ITableMemoryViewTab lineNum tableContents numColumns fViewer getControl getColumnCount ITableLabelProvider labelProvider ITableLabelProvider fViewer getLabelProvider TableColumn fViewer getControl getColumns charPerByte labelProvider AbstractTableViewTabLabelProvider AbstractMemoryRenderer AbstractTableViewTabLabelProvider labelProvider getRenderer IFixedLengthOutputRenderer charPerByte IFixedLengthOutputRenderer getNumCharPerByte numColumns StringBuffer columnLabel StringBuffer getText numBytes numBytes ITableMemoryViewTab getViewTab getColumnSize IMemoryBlock memBlock getViewTab getMemoryBlock memBlock IExtendedMemoryBlock numBytes IExtendedMemoryBlock memBlock getAddressSize numBytes numBytes numBytes columnLabel numBytes charPerByte columnLabel tableContents COLUMN_SEPERATOR columnLabel drawString tableContents lineNum getFontMetrics getHeight lineNum lineNum
public void run f Viewer Memory View Tab get View Tab get Table Viewer if f Viewer null return if f Viewer get Control null return Print Dialog print Dialog new Print Dialog f Viewer get Control get Display get Active Shell Printer Data printer Data print Dialog open pop up a system print dialog if printer Data null set Checked false return Printer printer new Printer printer Data GC gc new GC printer Table Item table Items Table f Viewer get Control get Items start the print job and assign it a title printer start Job DebugUI Messages get String JOB TITLE get View Tab get Tab Label printer start Page start the first page print Table table Items gc printer print all rows of the table printer end Page end the last page printer end Job end the print job gc dispose printer dispose set Checked false  fViewer MemoryViewTab getViewTab getTableViewer fViewer fViewer getControl PrintDialog printDialog PrintDialog fViewer getControl getDisplay getActiveShell PrinterData printerData printDialog printerData setChecked printerData TableItem tableItems fViewer getControl getItems startJob DebugUIMessages getString JOB_TITLE getViewTab getTabLabel startPage printTable tableItems endPage endJob setChecked
see org eclipse debug ui internal actions Abstract Memory Action get View Tab I Memory View Tab get View Tab return get Top View Tab From View I Internal DebugUI Constants ID MEMORY VIEW  AbstractMemoryAction getViewTab IMemoryViewTab getViewTab getTopViewTabFromView IInternalDebugUIConstants ID_MEMORY_VIEW

public Print View Tab Context Action I Memory View Tab view Tab super f View Tab view Tab Workbench Help set Help this I DebugUI Constants PLUGIN ID PrintViewTabContextAction context NON NLS 1  PrintViewTabContextAction IMemoryViewTab viewTab fViewTab viewTab WorkbenchHelp setHelp IDebugUIConstants PLUGIN_ID PrintViewTabContextAction_context
see org eclipse debug ui internal actions Abstract Memory Action get View Tab I Memory View Tab get View Tab return f View Tab  AbstractMemoryAction getViewTab IMemoryViewTab getViewTab fViewTab

public Reformat Action I Table Memory View Tab view Tab super DebugUI Messages get String TITLE f View Tab view Tab  ReformatAction ITableMemoryViewTab viewTab DebugUIMessages getString fViewTab viewTab
public void run if f View Tab instanceof Memory View Tab Memory View Tab f View Tab pack Columns  fViewTab MemoryViewTab MemoryViewTab fViewTab packColumns

public Remove Memory Block Action set Text DebugUI Messages get String Remove Memory Block Action title NON NLS 1 set Tool Tip Text DebugUI Messages get String Remove Memory Block Action tooltip NON NLS 1 set Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG ELCL REMOVE MEMORY set Hover Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG LCL REMOVE MEMORY set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL REMOVE MEMORY Workbench Help set Help this I DebugUI Constants PLUGIN ID RemoveMemoryBlockAction context NON NLS 1  RemoveMemoryBlockAction setText DebugUIMessages getString RemoveMemoryBlockAction setToolTipText DebugUIMessages getString RemoveMemoryBlockAction setImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_ELCL_REMOVE_MEMORY setHoverImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_LCL_REMOVE_MEMORY setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_REMOVE_MEMORY WorkbenchHelp setHelp IDebugUIConstants PLUGIN_ID RemoveMemoryBlockAction_context
public void run if get View Tab null return get top view tab I Memory View Tab top Tab get View Tab remove memory block from memory block manager if top Tab null I Memory Block mem top Tab get Memory Block Memory Block Manager get Memory Block Manager remove Memory Block mem  getViewTab IMemoryViewTab topTab getViewTab topTab IMemoryBlock topTab getMemoryBlock MemoryBlockManager getMemoryBlockManager removeMemoryBlock
see org eclipse debug ui internal actions Abstract Memory Action get View Tab I Memory View Tab get View Tab return get Top View Tab From View I Internal DebugUI Constants ID MEMORY VIEW  AbstractMemoryAction getViewTab IMemoryViewTab getViewTab getTopViewTabFromView IInternalDebugUIConstants ID_MEMORY_VIEW

public Reset Memory Block Action set Text DebugUI Messages get String TITLE set Tool Tip Text DebugUI Messages get String TOOLTIP set Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG ELCL RESET MEMORY set Hover Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG LCL RESET MEMORY set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL RESET MEMORY  ResetMemoryBlockAction setText DebugUIMessages getString setToolTipText DebugUIMessages getString setImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_ELCL_RESET_MEMORY setHoverImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_LCL_RESET_MEMORY setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_RESET_MEMORY
public void run try I Memory View Tab top get View Tab if top null top reset At Base Address catch Debug Exception e Memory View Util open Error DebugUI Messages get String FAILED TO RESET DebugUI Messages get String FAILED TO RESET TO BASE ADD e  IMemoryViewTab getViewTab resetAtBaseAddress DebugException MemoryViewUtil openError DebugUIMessages getString FAILED_TO_RESET DebugUIMessages getString FAILED_TO_RESET_TO_BASE_ADD
see org eclipse debug ui internal actions Abstract Memory Action get View Tab I Memory View Tab get View Tab return get Top View Tab From View I Internal DebugUI Constants ID MEMORY VIEW  AbstractMemoryAction getViewTab IMemoryViewTab getViewTab getTopViewTabFromView IInternalDebugUIConstants ID_MEMORY_VIEW

public Reset Memory Block Context Action I Memory View Tab view Tab super f View Tab view Tab Workbench Help set Help this I DebugUI Constants PLUGIN ID ResetBaseAddressContextAction context NON NLS 1  ResetMemoryBlockContextAction IMemoryViewTab viewTab fViewTab viewTab WorkbenchHelp setHelp IDebugUIConstants PLUGIN_ID ResetBaseAddressContextAction_context
see org eclipse debug ui internal actions Abstract Memory Action get View Tab I Memory View Tab get View Tab return f View Tab  AbstractMemoryAction getViewTab IMemoryViewTab getViewTab fViewTab

public Set Column Size Default Action I Table Memory View Tab view Tab super DebugUI Messages get String LABEL f View Tab view Tab Workbench Help set Help this I DebugUI Constants PLUGIN ID SetColumnSizeDefaultAction context NON NLS 1  SetColumnSizeDefaultAction ITableMemoryViewTab viewTab DebugUIMessages getString fViewTab viewTab WorkbenchHelp setHelp IDebugUIConstants PLUGIN_ID SetColumnSizeDefaultAction_context
public void run int col Size f View Tab get Column Size I Preference Store pref Store DebugUI Plugin get Default get Preference Store pref Store set Value I Debug Preference Constants PREF COLUMN SIZE col Size  colSize fViewTab getColumnSize IPreferenceStore prefStore DebugUIPlugin getDefault getPreferenceStore prefStore setValue IDebugPreferenceConstants PREF_COLUMN_SIZE colSize

public Set Default Column Size Pref Action set Text DebugUI Messages get String DEFAULT COLUMN SIZE set Tool Tip Text DebugUI Messages get String SET DEFAULT COLUMN SIZE Workbench Help set Help this I DebugUI Constants PLUGIN ID DefaultColumnSizePrefAction context NON NLS 1  SetDefaultColumnSizePrefAction setText DebugUIMessages getString DEFAULT_COLUMN_SIZE setToolTipText DebugUIMessages getString SET_DEFAULT_COLUMN_SIZE WorkbenchHelp setHelp IDebugUIConstants PLUGIN_ID DefaultColumnSizePrefAction_context
public void run Shell shell DebugUI Plugin get Shell Default Column Size Dialog dialog new Default Column Size Dialog shell dialog open  DebugUIPlugin getShell DefaultColumnSizeDialog DefaultColumnSizeDialog

Property Change Notifier I Synchronized Memory Block View view String property Id Object value f View view f Property Id property Id f Value value  PropertyChangeNotifier ISynchronizedMemoryBlockView propertyId fView fPropertyId propertyId fValue
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception DebugUI Plugin log exception  ISafeRunnable handleException handleException DebugUIPlugin
see org eclipse core runtime I Safe Runnable run public void run throws Exception f View property Changed f Property Id f Value  ISafeRunnable fView propertyChanged fPropertyId fValue
public Property Listener I Synchronized Memory Block View view String properties f View view if properties null f Filters properties  PropertyListener ISynchronizedMemoryBlockView fView fFilters
If the property matches one of the filters the property is valid and the view should be notified about its change param property return public boolean is Valid Property String property if f Filters null return true else for int i 0 i f Filters length i if f Filters i equals property return true return false  isValidProperty fFilters fFilters fFilters
Add a property to the listener param property public void set Property Filters String filters f Filters filters  setPropertyFilters fFilters
return Returns the f View public I Synchronized Memory Block View get View return f View  fView ISynchronizedMemoryBlockView getView fView
Create a new synchronization info object for the memory block param block public Synchronize Info I Memory Block block f Block block f Properties new Hashtable f Property Listeners new Hashtable  SynchronizeInfo IMemoryBlock fBlock fProperties fPropertyListeners
Add an I Synchronized Memory Block View to the info object The view will be notified when any of the properties changes param view public void add Synchronized View I Synchronized Memory Block View view String property Ids Property Listener listener new Property Listener view property Ids if f Property Listeners contains listener f Property Listeners put view listener  ISynchronizedMemoryBlockView addSynchronizedView ISynchronizedMemoryBlockView propertyIds PropertyListener PropertyListener propertyIds fPropertyListeners fPropertyListeners
Remove an I Synchronized Memory Block View from the info object The view will no longer be notified about synchronized properties changes param view public void remove Synchronized View I Synchronized Memory Block View view if f Property Listeners contains Key view f Property Listeners remove view  ISynchronizedMemoryBlockView removeSynchronizedView ISynchronizedMemoryBlockView fPropertyListeners containsKey fPropertyListeners
Set a property and its value to the info object param property Id param value public void set Property String property Id Object value if property Id null return if value null return f Properties put property Id value  propertyId setProperty propertyId propertyId fProperties propertyId
Returns the value of the property from the info object param property Id return public Object get Property String property Id if property Id null return null Object value f Properties get property Id return value  propertyId getProperty propertyId propertyId fProperties propertyId
Fire property change events param property Id public void fire Property Changed final String property Id Make sure the synchronizer does not swallow any events Values of the properties are updated in the syncrhonizer immediately Change events are queued up on the UI Thread Display get Default async Exec new Runnable public void run if property Id null return Object value f Properties get property Id if value null Enumeration enum f Property Listeners elements while enum has More Elements Property Listener listener Property Listener enum next Element I Synchronized Memory Block View view listener get View if view is enabled and if it s a valid property if view is Enabled listener is Valid Property property Id Property Change Notifier notifier new Property Change Notifier view property Id value Platform run notifier  propertyId firePropertyChanged propertyId getDefault asyncExec propertyId fProperties propertyId fPropertyListeners hasMoreElements PropertyListener PropertyListener nextElement ISynchronizedMemoryBlockView getView isEnabled isValidProperty propertyId PropertyChangeNotifier PropertyChangeNotifier propertyId
return number of views being synchronized public int get Number Of Synchronized Views if f Property Listeners null return 0 return f Property Listeners size  getNumberOfSynchronizedViews fPropertyListeners fPropertyListeners
Set up property filter for the view param view param filters public void set Property Filters I Synchronized Memory Block View view String filters Property Listener listener Property Listener f Property Listeners get view if listener null listener set Property Filters filters  setPropertyFilters ISynchronizedMemoryBlockView PropertyListener PropertyListener fPropertyListeners setPropertyFilters
Clean up the synchronization info object public void delete if f Property Listeners null f Property Listeners clear f Property Listeners null if f Properties null f Properties clear f Properties null if f Block null f Block null  fPropertyListeners fPropertyListeners fPropertyListeners fProperties fProperties fProperties fBlock fBlock

see org eclipse swt events Mouse Listener mouse Double Click org eclipse swt events Mouse Event public void mouse Double Click Mouse Event e  MouseListener mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent
public void mouse Down Mouse Event e if e get Source instanceof Table handle Table Mouse Event e else if e get Source instanceof Table Cursor handle Cursor Mouse Event e  mouseDown MouseEvent getSource handleTableMouseEvent getSource TableCursor handleCursorMouseEvent
private void handle Cursor Mouse Event Mouse Event e if e button 1 if f Col 0 f Col get Num Col activate Cell Editor null  handleCursorMouseEvent MouseEvent fCol fCol getNumCol activateCellEditor
param e private void handle Table Mouse Event Mouse Event e figure out new cursor position based on here the mouse is pointing Table Item selections f Table Viewer get Table get Selection Table Item selected Row null int col Num 1 if selections length 0 selected Row selections 0 int num Col f Table Viewer get Column Properties length for int i 0 i num Col i Rectangle bound selected Row get Bounds i if bound contains e x e y col Num i break if column position cannot be determined return if col Num 1 return handle user mouse click onto table move cursor to new position if selected Row null int row f Table Viewer get Table index Of selected Row update Cursor Position row col Num true f View Tab update Sync Top Address true selected address changes because user has selected a new position f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column keep table selection up to date f View Tab update Table Selection set Cursor Focus  handleTableMouseEvent MouseEvent TableItem fTableViewer getTable getSelection TableItem selectedRow colNum selectedRow numCol fTableViewer getColumnProperties numCol selectedRow getBounds colNum colNum selectedRow fTableViewer getTable indexOf selectedRow updateCursorPosition colNum fViewTab updateSyncTopAddress fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection setCursorFocus
see org eclipse swt events Mouse Listener mouse Up org eclipse swt events Mouse Event public void mouse Up Mouse Event e  MouseListener mouseUp MouseEvent mouseUp MouseEvent
public void key Traversed Traverse Event event if event get Source instanceof Text handle Text Traverse Evt event else if event get Source instanceof Table Cursor handle Cursor Traverse Evt event  keyTraversed TraverseEvent getSource handleTextTraverseEvt getSource TableCursor handleCursorTraverseEvt
public void run try if cursor is at boundry reload if f View Tab get Memory Block instanceof I Extended Memory Block if f Row 1 f Table get Item Count f Row 1 0 Big Integer top Address f View Tab get Top Visible Address f View Tab reload Table top Address false catch Debug Exception e1 DebugUI Plugin log e1 return if e detail SWT TRAVERSE TAB NEXT if f View Tab get Memory Block instanceof I Extended Memory Block if f Row 1 f Table get Item Count f Col get Num Col return if the cursor is at the end of the line move to next line if f Col get Num Col f Col 1 f Row else f Col else if e detail SWT TRAVERSE TAB PREVIOUS if f View Tab get Memory Block instanceof I Extended Memory Block if f Row 1 0 f Col 1 return if the cursor is at the beginning of the line move to previous line if f Col 1 f Col get Num Col f Row else f Col else return update cursor location and selection in table update Cursor Position f Row f Col true f View Tab update Sync Top Address true f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection Text text Text e get Source remove Listeners text activate Cell Editor null  fViewTab getMemoryBlock IExtendedMemoryBlock fRow fTable getItemCount fRow BigInteger topAddress fViewTab getTopVisibleAddress fViewTab reloadTable topAddress DebugException DebugUIPlugin TRAVERSE_TAB_NEXT fViewTab getMemoryBlock IExtendedMemoryBlock fRow fTable getItemCount fCol getNumCol fCol getNumCol fCol fRow fCol TRAVERSE_TAB_PREVIOUS fViewTab getMemoryBlock IExtendedMemoryBlock fRow fCol fCol fCol getNumCol fRow fCol updateCursorPosition fRow fCol fViewTab updateSyncTopAddress fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection getSource removeListeners activateCellEditor
param event private void handle Text Traverse Evt Traverse Event event final Traverse Event e event Display get Default async Exec new Runnable public void run try if cursor is at boundry reload if f View Tab get Memory Block instanceof I Extended Memory Block if f Row 1 f Table get Item Count f Row 1 0 Big Integer top Address f View Tab get Top Visible Address f View Tab reload Table top Address false catch Debug Exception e1 DebugUI Plugin log e1 return if e detail SWT TRAVERSE TAB NEXT if f View Tab get Memory Block instanceof I Extended Memory Block if f Row 1 f Table get Item Count f Col get Num Col return if the cursor is at the end of the line move to next line if f Col get Num Col f Col 1 f Row else f Col else if e detail SWT TRAVERSE TAB PREVIOUS if f View Tab get Memory Block instanceof I Extended Memory Block if f Row 1 0 f Col 1 return if the cursor is at the beginning of the line move to previous line if f Col 1 f Col get Num Col f Row else f Col else return update cursor location and selection in table update Cursor Position f Row f Col true f View Tab update Sync Top Address true f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection Text text Text e get Source remove Listeners text activate Cell Editor null  handleTextTraverseEvt TraverseEvent TraverseEvent getDefault asyncExec fViewTab getMemoryBlock IExtendedMemoryBlock fRow fTable getItemCount fRow BigInteger topAddress fViewTab getTopVisibleAddress fViewTab reloadTable topAddress DebugException DebugUIPlugin TRAVERSE_TAB_NEXT fViewTab getMemoryBlock IExtendedMemoryBlock fRow fTable getItemCount fCol getNumCol fCol getNumCol fCol fRow fCol TRAVERSE_TAB_PREVIOUS fViewTab getMemoryBlock IExtendedMemoryBlock fRow fCol fCol fCol getNumCol fRow fCol updateCursorPosition fRow fCol fViewTab updateSyncTopAddress fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection getSource removeListeners activateCellEditor
private void handle Cursor Traverse Evt Traverse Event e if f Col get Num Col e key Code SWT ARROW RIGHT if f Row 1 f Table get Item Count return f Row f Row 1 f Col 0 update Cursor Position f Row f Col true if f Col 1 e key Code SWT ARROW LEFT if f Row 1 0 return f Row f Row 1 f Col get Num Col 1 update Cursor Position f Row f Col true  handleCursorTraverseEvt TraverseEvent fCol getNumCol keyCode ARROW_RIGHT fRow fTable getItemCount fRow fRow fCol updateCursorPosition fRow fCol fCol keyCode ARROW_LEFT fRow fRow fRow fCol getNumCol updateCursorPosition fRow fCol
see org eclipse swt events Focus Listener focus Gained org eclipse swt events Focus Event public void focus Gained Focus Event e  FocusListener focusGained FocusEvent focusGained FocusEvent
public void run try Text text Text e get Source remove Listeners text get new value String new Value text get Text modify memory at f Row and f Col modify Value f Row f Col new Value show cursor after modification is completed show Cursor catch Number Format Exception e1 Memory View Util open Error DebugUI Messages get String Memory View Cell Modifier TITLE DebugUI Messages get String Memory View Cell Modifier DATA IS INVALID null  getSource removeListeners newValue getText fRow fCol modifyValue fRow fCol newValue showCursor NumberFormatException MemoryViewUtil openError DebugUIMessages getString MemoryViewCellModifier DebugUIMessages getString MemoryViewCellModifier DATA_IS_INVALID
public void focus Lost Focus Event event final Focus Event e event Display get Default sync Exec new Runnable public void run try Text text Text e get Source remove Listeners text get new value String new Value text get Text modify memory at f Row and f Col modify Value f Row f Col new Value show cursor after modification is completed show Cursor catch Number Format Exception e1 Memory View Util open Error DebugUI Messages get String Memory View Cell Modifier TITLE DebugUI Messages get String Memory View Cell Modifier DATA IS INVALID null  focusLost FocusEvent FocusEvent getDefault syncExec getSource removeListeners newValue getText fRow fCol modifyValue fRow fCol newValue showCursor NumberFormatException MemoryViewUtil openError DebugUIMessages getString MemoryViewCellModifier DebugUIMessages getString MemoryViewCellModifier DATA_IS_INVALID
see java awt event Key Listener key Typed java awt event Key Event public void key Typed Key Event e  KeyListener keyTyped KeyEvent keyTyped KeyEvent
public void key Pressed Key Event event if event get Source instanceof Text handle Text Key Evt event  keyPressed KeyEvent getSource handleTextKeyEvt
public void run Text text Text e get Source try switch e key Code case SWT ARROW UP move text editor box up one row if f Row 1 0 return modify value for current cell modify Value f Row f Col text get Text f Row update cursor location and selection in table update Cursor Position f Row f Col true f View Tab update Sync Top Address true f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection remove listeners when focus is lost remove Listeners text activate Cell Editor null break case SWT ARROW DOWN move text editor box down one row if f Row 1 f Table get Item Count return modify value for current cell modify Value f Row f Col text get Text f Row update cursor location and selection in table update Cursor Position f Row f Col true f View Tab update Sync Top Address true f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection remove traverse listener when focus is lost remove Listeners text activate Cell Editor null break case 0 if user has entered the max number of characters allowed in a cell move to next cell Extra changes will be used as initial value for the next cell if f Renderer null if text get Text length f View Tab get Column Size f Renderer get Num Char Per Byte String new Value text get Text text set Text new Value substring 0 f View Tab get Column Size f Renderer get Num Char Per Byte modify Value f Row f Col text get Text if cursor is at the end of a line move to next line if f Col get Num Col f Col 1 f Row else move to next column f Col update cursor position and selected address update Cursor Position f Row f Col true f View Tab update Sync Top Address true f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection remove Listeners text activate text editor at next cell activate Cell Editor new Value substring f View Tab get Column Size f Renderer get Num Char Per Byte break case SWT ESC if user has pressed escape do not commit the changes that s why modify Value is not called update Cursor Position f Row f Col true f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection remove Listeners text cursor needs to have focus to remove focus from cell editor set Cursor Focus break default if f Renderer null if text get Text length f View Tab get Column Size f Renderer get Num Char Per Byte String new Value text get Text text set Text new Value substring 0 f View Tab get Column Size f Renderer get Num Char Per Byte modify Value f Row f Col text get Text if cursor is at the end of a line move to next line if f Col get Num Col f Col 1 f Row else f Col update Cursor Position f Row f Col true f View Tab update Sync Top Address true f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection remove Listeners text activate Cell Editor new Value substring f View Tab get Column Size f Renderer get Num Char Per Byte break catch Number Format Exception e1 Memory View Util open Error DebugUI Messages get String Memory View Cell Modifier TITLE DebugUI Messages get String Memory View Cell Modifier DATA IS INVALID null update Cursor Position f Row f Col true f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection remove Listeners text show Cursor  getSource keyCode ARROW_UP fRow modifyValue fRow fCol getText fRow updateCursorPosition fRow fCol fViewTab updateSyncTopAddress fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection removeListeners activateCellEditor ARROW_DOWN fRow fTable getItemCount modifyValue fRow fCol getText fRow updateCursorPosition fRow fCol fViewTab updateSyncTopAddress fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection removeListeners activateCellEditor fRenderer getText fViewTab getColumnSize fRenderer getNumCharPerByte newValue getText setText newValue fViewTab getColumnSize fRenderer getNumCharPerByte modifyValue fRow fCol getText fCol getNumCol fCol fRow fCol updateCursorPosition fRow fCol fViewTab updateSyncTopAddress fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection removeListeners activateCellEditor newValue fViewTab getColumnSize fRenderer getNumCharPerByte modifyValue updateCursorPosition fRow fCol fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection removeListeners setCursorFocus fRenderer getText fViewTab getColumnSize fRenderer getNumCharPerByte newValue getText setText newValue fViewTab getColumnSize fRenderer getNumCharPerByte modifyValue fRow fCol getText fCol getNumCol fCol fRow fCol updateCursorPosition fRow fCol fViewTab updateSyncTopAddress fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection removeListeners activateCellEditor newValue fViewTab getColumnSize fRenderer getNumCharPerByte NumberFormatException MemoryViewUtil openError DebugUIMessages getString MemoryViewCellModifier DebugUIMessages getString MemoryViewCellModifier DATA_IS_INVALID updateCursorPosition fRow fCol fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection removeListeners showCursor
param event private void handle Text Key Evt Key Event event final Key Event e event Display get Default async Exec new Runnable public void run Text text Text e get Source try switch e key Code case SWT ARROW UP move text editor box up one row if f Row 1 0 return modify value for current cell modify Value f Row f Col text get Text f Row update cursor location and selection in table update Cursor Position f Row f Col true f View Tab update Sync Top Address true f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection remove listeners when focus is lost remove Listeners text activate Cell Editor null break case SWT ARROW DOWN move text editor box down one row if f Row 1 f Table get Item Count return modify value for current cell modify Value f Row f Col text get Text f Row update cursor location and selection in table update Cursor Position f Row f Col true f View Tab update Sync Top Address true f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection remove traverse listener when focus is lost remove Listeners text activate Cell Editor null break case 0 if user has entered the max number of characters allowed in a cell move to next cell Extra changes will be used as initial value for the next cell if f Renderer null if text get Text length f View Tab get Column Size f Renderer get Num Char Per Byte String new Value text get Text text set Text new Value substring 0 f View Tab get Column Size f Renderer get Num Char Per Byte modify Value f Row f Col text get Text if cursor is at the end of a line move to next line if f Col get Num Col f Col 1 f Row else move to next column f Col update cursor position and selected address update Cursor Position f Row f Col true f View Tab update Sync Top Address true f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection remove Listeners text activate text editor at next cell activate Cell Editor new Value substring f View Tab get Column Size f Renderer get Num Char Per Byte break case SWT ESC if user has pressed escape do not commit the changes that s why modify Value is not called update Cursor Position f Row f Col true f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection remove Listeners text cursor needs to have focus to remove focus from cell editor set Cursor Focus break default if f Renderer null if text get Text length f View Tab get Column Size f Renderer get Num Char Per Byte String new Value text get Text text set Text new Value substring 0 f View Tab get Column Size f Renderer get Num Char Per Byte modify Value f Row f Col text get Text if cursor is at the end of a line move to next line if f Col get Num Col f Col 1 f Row else f Col update Cursor Position f Row f Col true f View Tab update Sync Top Address true f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection remove Listeners text activate Cell Editor new Value substring f View Tab get Column Size f Renderer get Num Char Per Byte break catch Number Format Exception e1 Memory View Util open Error DebugUI Messages get String Memory View Cell Modifier TITLE DebugUI Messages get String Memory View Cell Modifier DATA IS INVALID null update Cursor Position f Row f Col true f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection remove Listeners text show Cursor  handleTextKeyEvt KeyEvent KeyEvent getDefault asyncExec getSource keyCode ARROW_UP fRow modifyValue fRow fCol getText fRow updateCursorPosition fRow fCol fViewTab updateSyncTopAddress fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection removeListeners activateCellEditor ARROW_DOWN fRow fTable getItemCount modifyValue fRow fCol getText fRow updateCursorPosition fRow fCol fViewTab updateSyncTopAddress fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection removeListeners activateCellEditor fRenderer getText fViewTab getColumnSize fRenderer getNumCharPerByte newValue getText setText newValue fViewTab getColumnSize fRenderer getNumCharPerByte modifyValue fRow fCol getText fCol getNumCol fCol fRow fCol updateCursorPosition fRow fCol fViewTab updateSyncTopAddress fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection removeListeners activateCellEditor newValue fViewTab getColumnSize fRenderer getNumCharPerByte modifyValue updateCursorPosition fRow fCol fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection removeListeners setCursorFocus fRenderer getText fViewTab getColumnSize fRenderer getNumCharPerByte newValue getText setText newValue fViewTab getColumnSize fRenderer getNumCharPerByte modifyValue fRow fCol getText fCol getNumCol fCol fRow fCol updateCursorPosition fRow fCol fViewTab updateSyncTopAddress fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection removeListeners activateCellEditor newValue fViewTab getColumnSize fRenderer getNumCharPerByte NumberFormatException MemoryViewUtil openError DebugUIMessages getString MemoryViewCellModifier DebugUIMessages getString MemoryViewCellModifier DATA_IS_INVALID updateCursorPosition fRow fCol fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection removeListeners showCursor
see java awt event Key Listener key Released java awt event Key Event public void key Released Key Event e  KeyListener keyReleased KeyEvent keyReleased KeyEvent
Create cursor manager for view tab param view Tab param initial Row param initial Col param menu Manager public View Tab Cursor Manager Memory View Tab view Tab int initial Row int initial Col Menu Manager menu Manager f View Tab view Tab f Menu Manager menu Manager f Row initial Row f Col initial Col f Table Viewer view Tab get Table Viewer f Table f Table Viewer get Table editor new Table Editor f Table f Rendering Id f View Tab get Rendering Id I Base Label Provider label Provider f Table Viewer get Label Provider if label Provider instanceof Abstract Table View Tab Label Provider Abstract Memory Renderer renderer Abstract Table View Tab Label Provider label Provider get Renderer if renderer instanceof I Fixed Length Output Renderer f Renderer I Fixed Length Output Renderer renderer f Traverse Evt Listener new Traverse Event Listener f Text Focus Listener new Text Focus Listener f Text Key Listener new Text Key Listener f Mouse Event Listener new Mouse Event Listener f Table add Mouse Listener f Mouse Event Listener create Cursor  viewTab initialRow initialCol menuManager ViewTabCursorManager MemoryViewTab viewTab initialRow initialCol MenuManager menuManager fViewTab viewTab fMenuManager menuManager fRow initialRow fCol initialCol fTableViewer viewTab getTableViewer fTable fTableViewer getTable TableEditor fTable fRenderingId fViewTab getRenderingId IBaseLabelProvider labelProvider fTableViewer getLabelProvider labelProvider AbstractTableViewTabLabelProvider AbstractMemoryRenderer AbstractTableViewTabLabelProvider labelProvider getRenderer IFixedLengthOutputRenderer fRenderer IFixedLengthOutputRenderer fTraverseEvtListener TraverseEventListener fTextFocusListener TextFocusListener fTextKeyListener TextKeyListener fMouseEventListener MouseEventListener fTable addMouseListener fMouseEventListener createCursor
for keeping track of cursor positions public void widget Selected Selection Event e if f Table Cursor null f View Tab update Sync Top Address true f Row f Table index Of f Table Cursor get Row f Col f Table Cursor get Column cursor position has changed update selected address f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection  widgetSelected SelectionEvent fTableCursor fViewTab updateSyncTopAddress fRow fTable indexOf fTableCursor getRow fCol fTableCursor getColumn fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection
public void widget Default Selected Selection Event e  widgetDefaultSelected SelectionEvent
private void create Cursor f Table Cursor new Table Cursor f Table SWT NONE Display display f Table Cursor get Display set up cursor color f Table Cursor set Background display get System Color SWT COLOR LIST SELECTION f Table Cursor set Foreground display get System Color SWT COLOR LIST SELECTION TEXT update Cursor Position f Row f Col true f Table Cursor set Font J Face Resources get Font I Internal DebugUI Constants FONT NAME f Table Cursor set Visible true f Table Cursor set Focus f Table Cursor add Selection Listener new Selection Listener for keeping track of cursor positions public void widget Selected Selection Event e if f Table Cursor null f View Tab update Sync Top Address true f Row f Table index Of f Table Cursor get Row f Col f Table Cursor get Column cursor position has changed update selected address f View Tab update Selected Address f Table Cursor get Row f Table Cursor get Column f View Tab update Table Selection public void widget Default Selected Selection Event e f Table Cursor add Traverse Listener f Traverse Evt Listener set up context menu for the cursor otherwise cell will not show context menu when it is highlighted if f Menu Manager null create Context Menu TODO Moved this to view Tab Cursor Manager need to revisit this f Table Cursor add Key Listener f View Tab f Table Cursor add Mouse Listener f Mouse Event Listener  createCursor fTableCursor TableCursor fTable fTableCursor getDisplay fTableCursor setBackground getSystemColor COLOR_LIST_SELECTION fTableCursor setForeground getSystemColor COLOR_LIST_SELECTION_TEXT updateCursorPosition fRow fCol fTableCursor setFont JFaceResources getFont IInternalDebugUIConstants FONT_NAME fTableCursor setVisible fTableCursor setFocus fTableCursor addSelectionListener SelectionListener widgetSelected SelectionEvent fTableCursor fViewTab updateSyncTopAddress fRow fTable indexOf fTableCursor getRow fCol fTableCursor getColumn fViewTab updateSelectedAddress fTableCursor getRow fTableCursor getColumn fViewTab updateTableSelection widgetDefaultSelected SelectionEvent fTableCursor addTraverseListener fTraverseEvtListener fMenuManager createContextMenu viewTabCursorManager fTableCursor addKeyListener fViewTab fTableCursor addMouseListener fMouseEventListener
Hook up context menu with the cursor This is needed when user RMC at cursor Without this the context menu activation will not be detected by the cursor return private Menu create Context Menu f Menu Disposed false Menu menu f Menu Manager create Context Menu f Table f Table set Menu menu if f Table Cursor null Control menu Control f Table Cursor menu Control set Menu menu menu add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e f Menu Disposed true Menu disposed Menu Menu e get Source disposed Menu remove Dispose Listener this return menu  createContextMenu fMenuDisposed fMenuManager createContextMenu fTable fTable setMenu fTableCursor menuControl fTableCursor menuControl setMenu addDisposeListener DisposeListener widgetDisposed DisposeEvent fMenuDisposed disposedMenu getSource disposedMenu removeDisposeListener
Redraw cursors public void redraw Cursors if f Table Cursor null f Table Cursor is Visible f Table Cursor set Selection f Row f Col f Table Cursor redraw  redrawCursors fTableCursor fTableCursor isVisible fTableCursor setSelection fRow fCol fTableCursor
Clean up cursor manager public void dispose if f Table Cursor null Table Cursor changes the way how it is disposed SWT disposes the cursor when the view tab is dispose disposing the cursor now causes SWT error f Table Cursor dispose f Table Cursor null if editor null editor dispose editor null if f Table null f Table remove Mouse Listener f Mouse Event Listener  fTableCursor TableCursor fTableCursor fTableCursor fTable fTable removeMouseListener fMouseEventListener
return lead cursor public Table Cursor get Lead Cursor return f Table Cursor  TableCursor getLeadCursor fTableCursor
Hide cursor public void hide Cursor f Table Cursor set Visible false  hideCursor fTableCursor setVisible
When cursor is to be shown again if the cursor is previously dispose create a new cursor and position at last remembered position public void show Cursor if f Table Cursor null create Cursor if f Menu Disposed create Context Menu if f Table Cursor is Visible f Table Cursor set Visible true  showCursor fTableCursor createCursor fMenuDisposed createContextMenu fTableCursor isVisible fTableCursor setVisible
Causes the cursor to gain focus public void set Cursor Focus if f Table Cursor null f Table Cursor set Focus  setCursorFocus fTableCursor fTableCursor setFocus
Set new row col position in cursor If cursor is not visible cursor is null call show Cursor to create new cursor param row param col public void update Cursor Position int row int col boolean show Cursor if row 0 row f Table get Item Count col 0 col f Table get Column Count return this f Row row this f Col col f Table Cursor set Selection row col if show Cursor show Cursor  showCursor updateCursorPosition showCursor fTable getItemCount fTable getColumnCount fRow fCol fTableCursor setSelection showCursor showCursor
Activate celll editor and prefill it with initial value If initial Value is null use cell content as initial value param initial Value public void activate Cell Editor String initial Value do not allow user to edit address column if f Col 0 f Col get Num Col return I Cell Modifier cell Modifier null if f Table Viewer null cell Modifier f Table Viewer get Cell Modifier Table Item table Item f Table get Item f Row Object element table Item get Data Object property f Table Viewer get Column Properties f Col Object value cell Modifier get Value element String property The cell modifier can Modify function always returns false if the edit action is not invoked from here This is to prevent data to be modified when the table cursor loses focus from a cell By default data will be changed in a table when the cell loses focus This is to workaround this default behaviour and only change data when the cell editor is activated Memory View Cell Modifier cell Modifier set Edit Action Invoked true boolean can Edit cell Modifier can Modify element String property Memory View Cell Modifier cell Modifier set Edit Action Invoked false if can Edit return activate based on current cursor position Text Cell Editor selected Editor Text Cell Editor f Table Viewer get Cell Editors f Col if f Table Viewer null cell Modifier null selected Editor null table Item null The control that will be the editor must be a child of the Table Text text Text selected Editor get Control String cell Value null if initial Value null cell Value initial Value else cell Value String value if f Rendering Id equals I Memory View Constants RENDERING RAW MEMORY cell Value cell Value to Upper Case text set Text cell Value editor horizontal Alignment SWT LEFT editor grab Horizontal true Open the text editor in selected column of the selected row editor set Editor text table Item f Col Assign focus to the text control selected Editor set Focus if initial Value null text clear Selection text set Font J Face Resources get Font I Internal DebugUI Constants FONT NAME add listeners for the text control add Listeners text move cursor below text control f Table Cursor move Below text  initialValue initialValue activateCellEditor initialValue fCol fCol getNumCol ICellModifier cellModifier fTableViewer cellModifier fTableViewer getCellModifier TableItem tableItem fTable getItem fRow tableItem getData fTableViewer getColumnProperties fCol cellModifier getValue canModify MemoryViewCellModifier cellModifier setEditActionInvoked canEdit cellModifier canModify MemoryViewCellModifier cellModifier setEditActionInvoked canEdit TextCellEditor selectedEditor TextCellEditor fTableViewer getCellEditors fCol fTableViewer cellModifier selectedEditor tableItem selectedEditor getControl cellValue initialValue cellValue initialValue cellValue fRenderingId IMemoryViewConstants RENDERING_RAW_MEMORY cellValue cellValue toUpperCase setText cellValue horizontalAlignment grabHorizontal setEditor tableItem fCol selectedEditor setFocus initialValue clearSelection setFont JFaceResources getFont IInternalDebugUIConstants FONT_NAME addListeners fTableCursor moveBelow
return private int get Num Col int bytes Per Line f View Tab get Bytes Per Line int column Size f View Tab get Column Size return bytes Per Line column Size  getNumCol bytesPerLine fViewTab getBytesPerLine columnSize fViewTab getColumnSize bytesPerLine columnSize
Modify value and send new value to debug adapter param row param col param new Value throws Number Format Exception private void modify Value int row int col String new Value throws Number Format Exception if new Value length 0 do not do anything if user has not entered anything return Table Item table Item f Table get Item row Object property f Table Viewer get Column Properties col get old value Object element table Item get Data I Cell Modifier cell Modifier f Table Viewer get Cell Modifier String old Value String cell Modifier get Value element String property if f Rendering Id equals I Memory View Constants RENDERING RAW MEMORY old Value old Value to Upper Case new Value new Value to Upper Case only compare up to the length of new value leave the rest of the memory unchanged if new Value length old Value length old Value old Value substring 0 new Value length if old Value equals new Value f Table Viewer get Cell Modifier modify table Item String property new Value else just modify f Table Viewer get Cell Modifier modify table Item String property new Value  newValue NumberFormatException modifyValue newValue NumberFormatException newValue TableItem tableItem fTable getItem fTableViewer getColumnProperties tableItem getData ICellModifier cellModifier fTableViewer getCellModifier oldValue cellModifier getValue fRenderingId IMemoryViewConstants RENDERING_RAW_MEMORY oldValue oldValue toUpperCase newValue newValue toUpperCase newValue oldValue oldValue oldValue newValue oldValue newValue fTableViewer getCellModifier tableItem newValue fTableViewer getCellModifier tableItem newValue
param font protected void set Font Font font if f Table Cursor null f Table Cursor set Font font  setFont fTableCursor fTableCursor setFont
param text private void add Listeners Text text add listeners to text text add Focus Listener f Text Focus Listener text add Traverse Listener f Traverse Evt Listener text add Key Listener f Text Key Listener text add Key Listener f View Tab  addListeners addFocusListener fTextFocusListener addTraverseListener fTraverseEvtListener addKeyListener fTextKeyListener addKeyListener fViewTab
param text private void remove Listeners Text text remove traverse listener when focus is lost text remove Traverse Listener f Traverse Evt Listener text remove Focus Listener f Text Focus Listener text remove Key Listener f Text Key Listener text remove Key Listener f View Tab  removeListeners removeTraverseListener fTraverseEvtListener removeFocusListener fTextFocusListener removeKeyListener fTextKeyListener removeKeyListener fViewTab

public void widget Selected Selection Event e if e get Source instanceof Tab Folder handle Tab Folder Selection e  widgetSelected SelectionEvent getSource TabFolder handleTabFolderSelection
see org eclipse swt events Selection Listener widget Default Selected org eclipse swt events Selection Event public void widget Default Selected Selection Event e  SelectionListener widgetDefaultSelected SelectionEvent widgetDefaultSelected SelectionEvent
private void handle Tab Folder Selection Selection Event event Tab Folder folder Tab Folder event get Source Tab Item selected Items folder get Selection Tab Item selected Item I Memory View Tab selected View Tab get selected view tab if selected Items length 0 selected Item selected Items 0 Object obj selected Item get Data if obj instanceof I Memory View Tab selected View Tab I Memory View Tab obj else return else return get all tabs Tab Item all Tabs folder get Items check all tabs to make sure they are enabled disabled properly for int i 0 i all Tabs length i I Memory View Tab view Tab Object obj all Tabs i get Data if obj instanceof I Memory View Tab view Tab I Memory View Tab obj if view tab matches the selected item if view Tab selected View Tab view Tab is Enabled if the item has been selected and this tab is not enabled enable it view Tab set Enabled true else if view Tab selected View Tab view Tab is Enabled if the tab is not selected disable it view Tab set Enabled false  handleTabFolderSelection SelectionEvent TabFolder TabFolder getSource TabItem selectedItems getSelection TabItem selectedItem IMemoryViewTab selectedViewTab selectedItems selectedItem selectedItems selectedItem getData IMemoryViewTab selectedViewTab IMemoryViewTab TabItem allTabs getItems allTabs IMemoryViewTab viewTab allTabs getData IMemoryViewTab viewTab IMemoryViewTab viewTab selectedViewTab viewTab isEnabled viewTab setEnabled viewTab selectedViewTab viewTab isEnabled viewTab setEnabled

see org eclipse debug internal ui views variables Variables View create Content Provider protected I Content Provider create Content Provider Registers View Content Provider cp new Registers View Content Provider this cp set Exception Handler this return cp  VariablesView createContentProvider IContentProvider createContentProvider RegistersViewContentProvider RegistersViewContentProvider setExceptionHandler
see org eclipse debug ui Abstract Debug View get Help Context Id protected String get Help Context Id return I Debug Help Context Ids REGISTERS VIEW  AbstractDebugView getHelpContextId getHelpContextId IDebugHelpContextIds REGISTERS_VIEW
see org eclipse debug ui Abstract Debug View configure Tool Bar org eclipse jface action I Tool Bar Manager protected void configure Tool Bar I Tool Bar Manager tbm super configure Tool Bar tbm tbm add new Separator I DebugUI Constants EMPTY REGISTER GROUP tbm add new Separator I DebugUI Constants REGISTER GROUP  AbstractDebugView configureToolBar IToolBarManager configureToolBar IToolBarManager configureToolBar IDebugUIConstants EMPTY_REGISTER_GROUP IDebugUIConstants REGISTER_GROUP
see org eclipse debug internal ui views variables Variables View get Detail Pane Preference Key protected String get Detail Pane Preference Key return I Debug Preference Constants REGISTERS DETAIL PANE ORIENTATION  VariablesView getDetailPanePreferenceKey getDetailPanePreferenceKey IDebugPreferenceConstants REGISTERS_DETAIL_PANE_ORIENTATION
see org eclipse debug internal ui views variables Variables View get Toggle Action Label protected String get Toggle Action Label return Registers View Messages get String Registers View 0 NON NLS 1  VariablesView getToggleActionLabel getToggleActionLabel RegistersViewMessages getString RegistersView
see org eclipse debug internal ui views variables Variables View get Viewer State protected Abstract Viewer State get Viewer State return new Registers Viewer State get Variables Viewer  VariablesView getViewerState AbstractViewerState getViewerState RegistersViewerState getVariablesViewer

public class Registers View Content Provider extends Variables View Content Provider public Registers View Content Provider I Debug View view super view  RegistersViewContentProvider VariablesViewContentProvider RegistersViewContentProvider IDebugView
see org eclipse jface viewers I Tree Content Provider get Children java lang Object public Object get Children Object parent Object children null try if parent instanceof I Stack Frame children I Stack Frame parent get Register Groups else if parent instanceof I Register Group children I Register Group parent get Registers else if parent instanceof I Variable children super get Children parent if children null cache parent children return children catch Debug Exception de if get Exception Handler null get Exception Handler handle Exception de else DebugUI Plugin log de return new Object 0  ITreeContentProvider getChildren getChildren IStackFrame IStackFrame getRegisterGroups IRegisterGroup IRegisterGroup getRegisters IVariable getChildren DebugException getExceptionHandler getExceptionHandler handleException DebugUIPlugin
see org eclipse jface viewers I Tree Content Provider has Children java lang Object public boolean has Children Object element try if element instanceof I Stack Frame return I Stack Frame element has Register Groups if element instanceof I Register Group return I Register Group element has Registers catch Debug Exception de DebugUI Plugin log de return false return super has Children element  ITreeContentProvider hasChildren hasChildren IStackFrame IStackFrame hasRegisterGroups IRegisterGroup IRegisterGroup hasRegisters DebugException DebugUIPlugin hasChildren
see org eclipse debug internal ui views variables Variables View Content Provider set Exception Handler org eclipse debug internal ui views I Debug Exception Handler protected void set Exception Handler I Debug Exception Handler handler super set Exception Handler handler  VariablesViewContentProvider setExceptionHandler IDebugExceptionHandler setExceptionHandler IDebugExceptionHandler setExceptionHandler

public class Registers Viewer State extends Abstract Viewer State public Registers Viewer State Tree Viewer viewer super viewer  RegistersViewerState AbstractViewerState RegistersViewerState TreeViewer
public I Path encode Element Tree Item item throws Debug Exception Object obj item get Data String name obj instanceof I Register Group I Register Group obj get Name I Variable obj get Name I Path path new Path name Tree Item parent item get Parent Item while parent null obj parent get Data name obj instanceof I Register Group I Register Group obj get Name I Variable obj get Name path new Path name append path parent parent get Parent Item return path  IPath encodeElement TreeItem DebugException getData IRegisterGroup IRegisterGroup getName IVariable getName IPath TreeItem getParentItem getData IRegisterGroup IRegisterGroup getName IVariable getName getParentItem
public Object decode Path I Path path Tree Viewer viewer throws Debug Exception I Tree Content Provider content Provider I Tree Content Provider viewer get Content Provider String names path segments Object parent viewer get Input Object element null for int i 0 i names length i element null Object children content Provider get Children parent String name names i for int j 0 j children length j if children j instanceof I Register Group if name equals I Register Group children j get Name element children j break else if children j instanceof I Variable if name equals I Variable children j get Name element children j break if element null return null else parent element return element  decodePath IPath TreeViewer DebugException ITreeContentProvider contentProvider ITreeContentProvider getContentProvider getInput contentProvider getChildren IRegisterGroup IRegisterGroup getName IVariable IVariable getName

Resource Bundle get Bundle BUNDLE NAME private Registers View Messages  ResourceBundle getBundle BUNDLE_NAME RegistersViewMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public Available Logical Structures Action Variables View view set View view set Tool Tip Text Variables View Messages get String Available Logical Structures Action 0 NON NLS 1 set Text Variables View Messages get String Available Logical Structures Action 1 NON NLS 1 Workbench Help set Help this I Debug Help Context Ids VARIABLES SELECT LOGICAL STRUCTURE set Enabled false set Menu Creator this init  AvailableLogicalStructuresAction VariablesView setView setToolTipText VariablesViewMessages getString AvailableLogicalStructuresAction setText VariablesViewMessages getString AvailableLogicalStructuresAction WorkbenchHelp setHelp IDebugHelpContextIds VARIABLES_SELECT_LOGICAL_STRUCTURE setEnabled setMenuCreator
see org eclipse jface action I Action run public void run  IAction
protected Variables View get View return f View  VariablesView getView fView
protected void set View Variables View view f View view  setView VariablesView fView
public void dispose if f Menu null f Menu dispose f View null f Value null f Types null  fMenu fMenu fView fValue fTypes
see org eclipse jface action I Menu Creator get Menu org eclipse swt widgets Control public Menu get Menu Control parent return null  IMenuCreator getMenu getMenu
protected void add Action To Menu Menu parent Action action Action Contribution Item item new Action Contribution Item action item fill parent 1  addActionToMenu ActionContributionItem ActionContributionItem
public Menu get Menu Menu parent if f Menu null f Menu dispose f Menu new Menu parent I Logical Structure Type types get Types boolean exist false Action first Action null String first Key null I Preference Store store DebugUI Plugin get Default get Preference Store if types null types length 0 for int i 0 i types length i Action action new Select Logical Structure Action get View types i String Buffer label new String Buffer add the numerical accelerator if i 9 label append label append i 1 label append label append action get Text action set Text label to String String key Variables View LOGICAL STRUCTURE TYPE PREFIX types i get Id if i 0 first Action action first Key key int value store get Int key exist exist value 0 action set Checked value 1 add Action To Menu f Menu action if exist first Action null first Action set Checked true store set Value first Key 1 return f Menu  getMenu fMenu fMenu fMenu ILogicalStructureType getTypes firstAction firstKey IPreferenceStore DebugUIPlugin getDefault getPreferenceStore SelectLogicalStructureAction getView StringBuffer StringBuffer getText setText toString VariablesView LOGICAL_STRUCTURE_TYPE_PREFIX getId firstAction firstKey getInt setChecked addActionToMenu fMenu firstAction firstAction setChecked setValue firstKey fMenu
public void init set Value null set Types null if get View is Show Logical Structure I Selection s get View get Variables Viewer get Selection if s instanceof I Structured Selection I Structured Selection selection I Structured Selection s if selection size 1 Object obj selection get First Element I Value value null if obj instanceof I Variable I Variable var I Variable obj try value var get Value catch Debug Exception e else if obj instanceof I Expression I Expression expression I Expression obj value expression get Value if value null I Logical Structure Type types Debug Plugin get Logical Structure Types value if types length 0 set Types types set Value value set Enabled true return set Enabled false  setValue setTypes getView isShowLogicalStructure ISelection getView getVariablesViewer getSelection IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement IValue IVariable IVariable IVariable getValue DebugException IExpression IExpression IExpression getValue ILogicalStructureType DebugPlugin getLogicalStructureTypes setTypes setValue setEnabled setEnabled
protected I Logical Structure Type get Types return f Types  ILogicalStructureType getTypes fTypes
private void set Types I Logical Structure Type types f Types types  setTypes ILogicalStructureType fTypes
protected I Value get Value return f Value  IValue getValue fValue
private void set Value I Value value f Value value  setValue IValue fValue

see Variable Filter Action get Preference Key protected String get Preference Key return I Debug Preference Constants PREF DETAIL PANE WORD WRAP  VariableFilterAction getPreferenceKey getPreferenceKey IDebugPreferenceConstants PREF_DETAIL_PANE_WORD_WRAP
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action super run action Variables View get View toggle Detail Pane Word Wrap action is Checked  IActionDelegate IAction IAction VariablesView getView toggleDetailPaneWordWrap isChecked

Creates a parition for an indexed value param value indexed value param offset beginning offset of this partition into the value param length the length of this parition public Indexed Value Partition I Indexed Value value int offset int length f Value value f Offset offset f Length length  IndexedValuePartition IIndexedValue fValue fOffset fLength
see org eclipse debug core model I Indexed Value get Size public int get Size return f Length  IIndexedValue getSize getSize fLength
see org eclipse debug core model I Indexed Value get Variable int public I Variable get Variable int offset throws Debug Exception return f Value get Variable offset  IIndexedValue getVariable IVariable getVariable DebugException fValue getVariable
see org eclipse debug core model I Value get Reference Type Name public String get Reference Type Name throws Debug Exception return f Value get Reference Type Name  IValue getReferenceTypeName getReferenceTypeName DebugException fValue getReferenceTypeName
see org eclipse debug core model I Value get Value String public String get Value String return NON NLS 1  IValue getValueString getValueString
public I Variable get Variables throws Debug Exception I Variable vars new I Variable f Length int offset get Initial Offset for int i 0 i f Length i vars i get Variable offset offset return vars  IVariable getVariables DebugException IVariable IVariable fLength getInitialOffset fLength getVariable
see org eclipse debug core model I Value has Variables public boolean has Variables return f Length 0  IValue hasVariables hasVariables fLength
see org eclipse debug core model I Value is Allocated public boolean is Allocated throws Debug Exception return f Value is Allocated  IValue isAllocated isAllocated DebugException fValue isAllocated
see org eclipse debug core model I Debug Element get Debug Target public I Debug Target get Debug Target return f Value get Debug Target  IDebugElement getDebugTarget IDebugTarget getDebugTarget fValue getDebugTarget
see org eclipse debug core model I Debug Element get Launch public I Launch get Launch return f Value get Launch  IDebugElement getLaunch ILaunch getLaunch fValue getLaunch
see org eclipse debug core model I Debug Element get Model Identifier public String get Model Identifier return f Value get Model Identifier  IDebugElement getModelIdentifier getModelIdentifier fValue getModelIdentifier
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return f Value get Adapter adapter  IAdaptable getAdapter getAdapter fValue getAdapter
see org eclipse debug core model I Indexed Value get Variables int int public I Variable get Variables int offset int length throws Debug Exception return f Value get Variables f Offset offset length  IIndexedValue getVariables IVariable getVariables DebugException fValue getVariables fOffset
see org eclipse debug core model I Indexed Value get Initial Offset public int get Initial Offset return f Offset  IIndexedValue getInitialOffset getInitialOffset fOffset

Creates a parition for an indexed value param variable variable or expression containing the indexed value param value indexed value param offset beginning offset of this partition into the value param length the length of this parition public Indexed Variable Partition I Debug Element variable I Indexed Value value int offset int length f Original Variable variable f Original Value value f Offset offset f Length length f Value Partition new Indexed Value Partition value offset length  IndexedVariablePartition IDebugElement IIndexedValue fOriginalVariable fOriginalValue fOffset fLength fValuePartition IndexedValuePartition
see org eclipse debug core model I Variable get Value public I Value get Value return f Value Partition  IVariable getValue IValue getValue fValuePartition
public String get Name if f Name null String Buffer buf new String Buffer buf append NON NLS 1 buf append f Offset buf append NON NLS 1 buf append f Offset f Length 1 buf append NON NLS 1 f Name buf to String return f Name  getName fName StringBuffer StringBuffer fOffset fOffset fLength fName toString fName
public String get Reference Type Name throws Debug Exception if f Original Variable instanceof I Variable I Variable variable I Variable f Original Variable return variable get Reference Type Name return NON NLS 1  getReferenceTypeName DebugException fOriginalVariable IVariable IVariable IVariable fOriginalVariable getReferenceTypeName
see org eclipse debug core model I Variable has Value Changed public boolean has Value Changed return false  IVariable hasValueChanged hasValueChanged
see org eclipse debug core model I Debug Element get Model Identifier public String get Model Identifier return f Original Value get Model Identifier  IDebugElement getModelIdentifier getModelIdentifier fOriginalValue getModelIdentifier
see org eclipse debug core model I Debug Element get Debug Target public I Debug Target get Debug Target return f Original Value get Debug Target  IDebugElement getDebugTarget IDebugTarget getDebugTarget fOriginalValue getDebugTarget
see org eclipse debug core model I Debug Element get Launch public I Launch get Launch return f Original Value get Launch  IDebugElement getLaunch ILaunch getLaunch fOriginalValue getLaunch
see org eclipse debug core model I Value Modification set Value java lang String public void set Value String expression throws Debug Exception throw new Debug Exception new Status I Status ERROR I DebugUI Constants PLUGIN ID I DebugUI Constants INTERNAL ERROR Variables View Messages get String Indexed Variable Partition 4 null NON NLS 1  IValueModification setValue setValue DebugException DebugException IStatus IDebugUIConstants PLUGIN_ID IDebugUIConstants INTERNAL_ERROR VariablesViewMessages getString IndexedVariablePartition
see org eclipse debug core model I Value Modification set Value org eclipse debug core model I Value public void set Value I Value value throws Debug Exception throw new Debug Exception new Status I Status ERROR I DebugUI Constants PLUGIN ID I DebugUI Constants INTERNAL ERROR Variables View Messages get String Indexed Variable Partition 4 null NON NLS 1  IValueModification setValue IValue setValue IValue DebugException DebugException IStatus IDebugUIConstants PLUGIN_ID IDebugUIConstants INTERNAL_ERROR VariablesViewMessages getString IndexedVariablePartition
see org eclipse debug core model I Value Modification supports Value Modification public boolean supports Value Modification return false  IValueModification supportsValueModification supportsValueModification
see org eclipse debug core model I Value Modification verify Value java lang String public boolean verify Value String expression return false  IValueModification verifyValue verifyValue
see org eclipse debug core model I Value Modification verify Value org eclipse debug core model I Value public boolean verify Value I Value value return false  IValueModification verifyValue IValue verifyValue IValue
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return f Original Variable get Adapter adapter  IAdaptable getAdapter getAdapter fOriginalVariable getAdapter
public boolean equals Object obj if obj instanceof Indexed Variable Partition Indexed Variable Partition partition Indexed Variable Partition obj return f Original Variable equals partition f Original Variable f Offset partition f Offset f Length partition f Length return false  IndexedVariablePartition IndexedVariablePartition IndexedVariablePartition fOriginalVariable fOriginalVariable fOffset fOffset fLength fLength
see java lang Object hash Code public int hash Code return f Original Variable hash Code f Offset  hashCode hashCode fOriginalVariable hashCode fOffset

Returns a logical set of variables contained in the given value param value return 

param view Variables view param group group of applicable structures param index the offset into the given group that this action enables public Select Logical Structure Action Variables View view I Logical Structure Type group int index super group index get Description I Action AS CHECK BOX set View view f Types group f Index index  SelectLogicalStructureAction VariablesView ILogicalStructureType getDescription IAction AS_CHECK_BOX setView fTypes fIndex
see org eclipse jface action I Action run public void run value Changed  IAction valueChanged
Busy Indicator show While get View get Viewer get Control get Display new Runnable public void run I Preference Store store DebugUI Plugin get Default get Preference Store for int i 0 i f Types length i if i f Index is Checked store set Value Variables View LOGICAL STRUCTURE TYPE PREFIX f Types i get Id 1 else store set Value Variables View LOGICAL STRUCTURE TYPE PREFIX f Types i get Id 1 get View get Viewer refresh  BusyIndicator showWhile getView getViewer getControl getDisplay IPreferenceStore DebugUIPlugin getDefault getPreferenceStore fTypes fIndex isChecked setValue VariablesView LOGICAL_STRUCTURE_TYPE_PREFIX fTypes getId setValue VariablesView LOGICAL_STRUCTURE_TYPE_PREFIX fTypes getId getView getViewer
private void value Changed if get View is Available return Busy Indicator show While get View get Viewer get Control get Display new Runnable public void run I Preference Store store DebugUI Plugin get Default get Preference Store for int i 0 i f Types length i if i f Index is Checked store set Value Variables View LOGICAL STRUCTURE TYPE PREFIX f Types i get Id 1 else store set Value Variables View LOGICAL STRUCTURE TYPE PREFIX f Types i get Id 1 get View get Viewer refresh  valueChanged getView isAvailable BusyIndicator showWhile getView getViewer getControl getDisplay IPreferenceStore DebugUIPlugin getDefault getPreferenceStore fTypes fIndex isChecked setValue VariablesView LOGICAL_STRUCTURE_TYPE_PREFIX fTypes getId setValue VariablesView LOGICAL_STRUCTURE_TYPE_PREFIX fTypes getId getView getViewer
protected Variables View get View return f View  VariablesView getView fView
protected void set View Variables View view f View view  setView VariablesView fView

private int width Hint 1 public Status Line Contribution Item String id this id DEFAULT CHAR WIDTH  widthHint StatusLineContributionItem DEFAULT_CHAR_WIDTH
public Status Line Contribution Item String id int char Width super id this char Width char Width set Visible false no text to start with  StatusLineContributionItem charWidth charWidth charWidth setVisible
public void fill Composite parent status Line parent label new C Label status Line SWT NONE Status Line Layout Data status Line Layout Data new Status Line Layout Data if width Hint 0 GC gc new GC status Line gc set Font status Line get Font width Hint gc get Font Metrics get Average Char Width char Width gc dispose status Line Layout Data width Hint width Hint label set Layout Data status Line Layout Data label set Text text  statusLine CLabel statusLine StatusLineLayoutData statusLineLayoutData StatusLineLayoutData widthHint statusLine setFont statusLine getFont widthHint getFontMetrics getAverageCharWidth charWidth statusLineLayoutData widthHint widthHint setLayoutData statusLineLayoutData setText
An accessor for the current location of this status line contribution item relative to the display return The current location of this status line code null code if not yet initialized public Point get Display Location if label null status Line null return status Line to Display label get Location return null  getDisplayLocation statusLine statusLine toDisplay getLocation
public String get Text return text  getText
public void set Text String text if text null throw new Null Pointer Exception this text text if label null label is Disposed label set Text this text if this text length 0 if is Visible set Visible false I Contribution Manager contribution Manager get Parent if contribution Manager null contribution Manager update true else if is Visible set Visible true I Contribution Manager contribution Manager get Parent if contribution Manager null contribution Manager update true  setText NullPointerException isDisposed setText isVisible setVisible IContributionManager contributionManager getParent contributionManager contributionManager isVisible setVisible IContributionManager contributionManager getParent contributionManager contributionManager

public Toggle Logical Structure Action Variables View view super null I Action AS CHECK BOX set View view set Tool Tip Text Variables View Messages get String Toggle Object Browsers Action 1 NON NLS 1 set Hover Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG LCL SHOW LOGICAL STRUCTURE set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG DLCL SHOW LOGICAL STRUCTURE set Image Descriptor Debug Plugin Images get Image Descriptor I Internal DebugUI Constants IMG ELCL SHOW LOGICAL STRUCTURE set Id DebugUI Plugin get Unique Identifier Toggle Object Browsers Action NON NLS 1 Workbench Help set Help this I Debug Help Context Ids VARIABLES CONTENT PROVIDERS ACTION  ToggleLogicalStructureAction VariablesView IAction AS_CHECK_BOX setView setToolTipText VariablesViewMessages getString ToggleObjectBrowsersAction setHoverImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_LCL_SHOW_LOGICAL_STRUCTURE setDisabledImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_DLCL_SHOW_LOGICAL_STRUCTURE setImageDescriptor DebugPluginImages getImageDescriptor IInternalDebugUIConstants IMG_ELCL_SHOW_LOGICAL_STRUCTURE setId DebugUIPlugin getUniqueIdentifier ToggleObjectBrowsersAction WorkbenchHelp setHelp IDebugHelpContextIds VARIABLES_CONTENT_PROVIDERS_ACTION
see Action run public void run value Changed is Checked  valueChanged isChecked
get View set Show Logical Structure on Busy Indicator show While get View get Viewer get Control get Display new Runnable public void run get View get Viewer refresh  getView setShowLogicalStructure BusyIndicator showWhile getView getViewer getControl getDisplay getView getViewer
private void value Changed boolean on if get View is Available return get View set Show Logical Structure on Busy Indicator show While get View get Viewer get Control get Display new Runnable public void run get View get Viewer refresh  valueChanged getView isAvailable getView setShowLogicalStructure BusyIndicator showWhile getView getViewer getControl getDisplay getView getViewer
see Action set Checked boolean public void set Checked boolean value super set Checked value  setChecked setChecked setChecked
protected Variables View get View return f View  VariablesView getView fView
protected void set View Variables View view f View view  setView VariablesView fView

protected class Variables View Decorating Label Provider extends Debug View Decorating Label Provider implements I Color Provider public Variables View Decorating Label Provider Structured Viewer viewer I Label Provider provider Debug View Label Decorator decorator super viewer provider decorator  VariablesViewDecoratingLabelProvider DebugViewDecoratingLabelProvider IColorProvider VariablesViewDecoratingLabelProvider StructuredViewer ILabelProvider DebugViewLabelDecorator
public Color get Foreground Object element if element instanceof I Variable I Variable variable I Variable element try if variable has Value Changed return DebugUI Plugin get Preference Color I Debug Preference Constants CHANGED VARIABLE COLOR catch Debug Exception e DebugUI Plugin log e return null  getForeground IVariable IVariable IVariable hasValueChanged DebugUIPlugin getPreferenceColor IDebugPreferenceConstants CHANGED_VARIABLE_COLOR DebugException DebugUIPlugin
public Color get Background Object element return null  getBackground
private I Selection Provider f Underlying Selection Provider see I Selection Provider add Selection Changed Listener I Selection Changed Listener public void add Selection Changed Listener I Selection Changed Listener listener f Listeners add listener  ISelectionProvider fUnderlyingSelectionProvider ISelectionProvider addSelectionChangedListener ISelectionChangedListener addSelectionChangedListener ISelectionChangedListener fListeners
see I Selection Provider get Selection public I Selection get Selection return get Underlying Selection Provider get Selection  ISelectionProvider getSelection ISelection getSelection getUnderlyingSelectionProvider getSelection
see I Selection Provider remove Selection Changed Listener I Selection Changed Listener public void remove Selection Changed Listener I Selection Changed Listener listener f Listeners remove listener  ISelectionProvider removeSelectionChangedListener ISelectionChangedListener removeSelectionChangedListener ISelectionChangedListener fListeners
see I Selection Provider set Selection I Selection public void set Selection I Selection selection get Underlying Selection Provider set Selection selection  ISelectionProvider setSelection ISelection setSelection ISelection getUnderlyingSelectionProvider setSelection
protected I Selection Provider get Underlying Selection Provider return f Underlying Selection Provider  ISelectionProvider getUnderlyingSelectionProvider fUnderlyingSelectionProvider
protected void set Underlying Selection Provider I Selection Provider underlying Selection Provider f Underlying Selection Provider underlying Selection Provider  setUnderlyingSelectionProvider ISelectionProvider underlyingSelectionProvider fUnderlyingSelectionProvider underlyingSelectionProvider
protected void fire Selection Changed Selection Changed Event event Object listeners f Listeners get Listeners for int i 0 i listeners length i I Selection Changed Listener listener I Selection Changed Listener listeners i listener selection Changed event  fireSelectionChanged SelectionChangedEvent fListeners getListeners ISelectionChangedListener ISelectionChangedListener selectionChanged
public int f Value public String to String return String value Of f Value  fValue toString valueOf fValue
Remove myself as a selection listener and preference change listener see I Workbench Part dispose public void dispose get View Site get Action Bars get Status Line Manager remove f Status Line Item get Site get Page remove Selection Listener I DebugUI Constants ID DEBUG VIEW this DebugUI Plugin get Default get Preference Store remove Property Change Listener this J Face Resources get Font Registry remove Listener this Viewer viewer get Viewer if viewer null get Detail Document remove Document Listener get Detail Document Listener super dispose  IWorkbenchPart getViewSite getActionBars getStatusLineManager fStatusLineItem getSite getPage removeSelectionListener IDebugUIConstants ID_DEBUG_VIEW DebugUIPlugin getDefault getPreferenceStore removePropertyChangeListener JFaceResources getFontRegistry removeListener getViewer getDetailDocument removeDocumentListener getDetailDocumentListener
protected void set Viewer Input I Structured Selection ssel I Stack Frame frame null if ssel size 1 Object input ssel get First Element if input instanceof I Stack Frame frame I Stack Frame input get Detail Viewer set Editable frame null Object current get Viewer get Input if current null frame null return if current null current equals frame return if current null save state f Last State get Viewer State f Selection States put current f Last State if frame null set Debug Model frame get Model Identifier show Viewer get Viewer set Input frame restore state if frame null Abstract Viewer State state Abstract Viewer State f Selection States get frame if state null attempt to restore selection expansion based on last frame state f Last State if state null state restore State get Variables Viewer  setViewerInput IStructuredSelection IStackFrame getFirstElement IStackFrame IStackFrame getDetailViewer setEditable getViewer getInput fLastState getViewerState fSelectionStates fLastState setDebugModel getModelIdentifier showViewer getViewer setInput AbstractViewerState AbstractViewerState fSelectionStates fLastState restoreState getVariablesViewer
Returns the variables viewer for this view protected Variables Viewer get Variables Viewer return Variables Viewer get Viewer  VariablesViewer getVariablesViewer VariablesViewer getViewer
Clears expanded state for stack frames which are a child of the given thread or debug target protected void clear Expanded Variables Object parent List list null if parent instanceof I Thread list get Cached Frames I Thread parent else if parent instanceof I Debug Target list get Cached Frames I Debug Target parent if list null Iterator frames list iterator while frames has Next Object frame frames next f Selection States remove frame  clearExpandedVariables IThread getCachedFrames IThread IDebugTarget getCachedFrames IDebugTarget hasNext fSelectionStates
Returns a list of stack frames in the specified thread that have cached an expansion state return a list of stack frames in the specified thread that have cached an expansion state protected List get Cached Frames I Thread thread List list null Iterator frames f Selection States key Set iterator while frames has Next I Stack Frame frame I Stack Frame frames next if frame get Thread equals thread if list null list new Array List list add frame return list  getCachedFrames IThread fSelectionStates keySet hasNext IStackFrame IStackFrame getThread ArrayList
Returns a list of stack frames in the specified thread that have cached an expansion state return a list of stack frames in the specified thread that have cached an expansion state protected List get Cached Frames I Debug Target target List list null Iterator frames f Selection States key Set iterator while frames has Next I Stack Frame frame I Stack Frame frames next if frame get Debug Target equals target if list null list new Array List list add frame return list  getCachedFrames IDebugTarget fSelectionStates keySet hasNext IStackFrame IStackFrame getDebugTarget ArrayList
Configures the details viewer for the debug model currently being displayed protected void configure Details Viewer Lazy Model Presentation mp Lazy Model Presentation f Model Presentation get Presentation get Debug Model Source Viewer Configuration svc null if mp null try svc mp new Details Viewer Configuration catch Core Exception e DebugUI Plugin error Dialog get Site get Shell Variables View Messages get String Variables View Error 1 Variables View Messages get String Variables View Unable to configure variable details area  2 e NON NLS 1 NON NLS 2 if svc null svc new Source Viewer Configuration get Detail Viewer set Editable false get Detail Viewer configure svc update actions that depend on the configuration of the details viewer update Action Content Assist NON NLS 1 set Detail Viewer Configuration svc  configureDetailsViewer LazyModelPresentation LazyModelPresentation fModelPresentation getPresentation getDebugModel SourceViewerConfiguration newDetailsViewerConfiguration CoreException DebugUIPlugin errorDialog getSite getShell VariablesViewMessages getString VariablesView Error_1 VariablesViewMessages getString VariablesView Unable_to_configure_variable_details_area _2 SourceViewerConfiguration getDetailViewer setEditable getDetailViewer updateAction ContentAssist setDetailViewerConfiguration
see I Property Change Listener property Change Property Change Event public void property Change Property Change Event event String property Name event get Property if property Name equals I Debug Preference Constants CHANGED VARIABLE COLOR get Event Handler refresh else if property Name equals I Internal DebugUI Constants DETAIL PANE FONT get Detail Viewer get Text Widget set Font J Face Resources get Font I Internal DebugUI Constants DETAIL PANE FONT  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent propertyName getProperty propertyName IDebugPreferenceConstants CHANGED_VARIABLE_COLOR getEventHandler propertyName IInternalDebugUIConstants DETAIL_PANE_FONT getDetailViewer getTextWidget setFont JFaceResources getFont IInternalDebugUIConstants DETAIL_PANE_FONT
public Viewer create Viewer Composite parent Tree Viewer variables Viewer create Tree Viewer parent create Details Viewer get Sash Form set Maximized Control variables Viewer get Control create Orientation Actions I Preference Store pref Store DebugUI Plugin get Default get Preference Store String orientation pref Store get String get Detail Pane Preference Key for int i 0 i f Toggle Detail Pane Actions length i f Toggle Detail Pane Actions i set Checked f Toggle Detail Pane Actions i get Orientation equals orientation set Detail Pane Orientation orientation return variables Viewer  createViewer TreeViewer variablesViewer createTreeViewer createDetailsViewer getSashForm setMaximizedControl variablesViewer getControl createOrientationActions IPreferenceStore prefStore DebugUIPlugin getDefault getPreferenceStore prefStore getString getDetailPanePreferenceKey fToggleDetailPaneActions fToggleDetailPaneActions setChecked fToggleDetailPaneActions getOrientation setDetailPaneOrientation variablesViewer
public void init I View Site site I Memento memento throws Part Init Exception super init site memento if memento null Integer bigI memento get Integer SASH WEIGHTS Length NON NLS 1 if bigI null return int num Weights bigI int Value int weights new int num Weights for int i 0 i num Weights i bigI memento get Integer SASH WEIGHTS i NON NLS 1 if bigI null return weights i bigI int Value if weights length 0 set Last Sash Weights weights  IViewSite IMemento PartInitException getInteger SASH_WEIGHTS numWeights intValue numWeights numWeights getInteger SASH_WEIGHTS intValue setLastSashWeights
public void save State I Memento memento super save State memento int weights get Sash Form get Weights memento put Integer SASH WEIGHTS Length weights length NON NLS 1 for int i 0 i weights length i memento put Integer SASH WEIGHTS i weights i NON NLS 1  saveState IMemento saveState getSashForm getWeights putInteger SASH_WEIGHTS putInteger SASH_WEIGHTS
protected String get Detail Pane Preference Key return I Debug Preference Constants VARIABLES DETAIL PANE ORIENTATION  getDetailPanePreferenceKey IDebugPreferenceConstants VARIABLES_DETAIL_PANE_ORIENTATION
Create and return the main tree viewer that displays variable protected Tree Viewer create Tree Viewer Composite parent f Model Presentation new Variables View Model Presentation DebugUI Plugin get Default get Preference Store add Property Change Listener this J Face Resources get Font Registry add Listener this create the sash form that will contain the tree viewer text viewer set Sash Form new Sash Form parent SWT NONE add tree viewer final Tree Viewer variables Viewer new Variables Viewer get Sash Form SWT MULTI SWT V SCROLL SWT H SCROLL variables Viewer set Content Provider create Content Provider variables Viewer set Label Provider create Label Provider variables Viewer variables Viewer set Use Hashlookup true variables Viewer get Control add Focus Listener new Focus Adapter non Javadoc see org eclipse swt events Focus Listener focus Gained Focus Event public void focus Gained Focus Event e get Variables View Selection Provider set Underlying Selection Provider variables Viewer set Action SELECT ALL ACTION get Action VARIABLES SELECT ALL ACTION set Action COPY ACTION get Action VARIABLES COPY ACTION get View Site get Action Bars update Action Bars set Focus Viewer get Variables Viewer variables Viewer add Selection Changed Listener get Tree Selection Changed Listener get Variables View Selection Provider set Underlying Selection Provider variables Viewer get Site set Selection Provider get Variables View Selection Provider listen to selection in debug view get Site get Page add Selection Listener I DebugUI Constants ID DEBUG VIEW this set Event Handler create Event Handler return variables Viewer  TreeViewer createTreeViewer fModelPresentation VariablesViewModelPresentation DebugUIPlugin getDefault getPreferenceStore addPropertyChangeListener JFaceResources getFontRegistry addListener setSashForm SashForm TreeViewer variablesViewer VariablesViewer getSashForm V_SCROLL H_SCROLL variablesViewer setContentProvider createContentProvider variablesViewer setLabelProvider createLabelProvider variablesViewer variablesViewer setUseHashlookup variablesViewer getControl addFocusListener FocusAdapter FocusListener focusGained FocusEvent focusGained FocusEvent getVariablesViewSelectionProvider setUnderlyingSelectionProvider variablesViewer setAction SELECT_ALL_ACTION getAction VARIABLES_SELECT_ALL_ACTION setAction COPY_ACTION getAction VARIABLES_COPY_ACTION getViewSite getActionBars updateActionBars setFocusViewer getVariablesViewer variablesViewer addSelectionChangedListener getTreeSelectionChangedListener getVariablesViewSelectionProvider setUnderlyingSelectionProvider variablesViewer getSite setSelectionProvider getVariablesViewSelectionProvider getSite getPage addSelectionListener IDebugUIConstants ID_DEBUG_VIEW setEventHandler createEventHandler variablesViewer
Creates and returns a label provider for this view return a label provider for this view protected I Base Label Provider create Label Provider Structured Viewer viewer return new Variables View Decorating Label Provider viewer new Debug View Interim Label Provider get Model Presentation new Debug View Label Decorator get Model Presentation  IBaseLabelProvider createLabelProvider StructuredViewer VariablesViewDecoratingLabelProvider DebugViewInterimLabelProvider getModelPresentation DebugViewLabelDecorator getModelPresentation
public void focus Gained Focus Event e get Variables View Selection Provider set Underlying Selection Provider get Detail Viewer get Selection Provider set Action SELECT ALL ACTION get Action DETAIL SELECT ALL ACTION set Action COPY ACTION get Action DETAIL COPY ACTION get View Site get Action Bars update Action Bars set Focus Viewer Viewer get Detail Viewer  focusGained FocusEvent getVariablesViewSelectionProvider setUnderlyingSelectionProvider getDetailViewer getSelectionProvider setAction SELECT_ALL_ACTION getAction DETAIL_SELECT_ALL_ACTION setAction COPY_ACTION getAction DETAIL_COPY_ACTION getViewSite getActionBars updateActionBars setFocusViewer getDetailViewer
Create the widgetry for the details viewer protected void create Details Viewer Create configure a Source Viewer Source Viewer details Viewer new Source Viewer get Sash Form null SWT V SCROLL SWT H SCROLL set Detail Viewer details Viewer details Viewer set Document get Detail Document details Viewer get Text Widget set Font J Face Resources get Font I Internal DebugUI Constants DETAIL PANE FONT get Detail Document add Document Listener get Detail Document Listener details Viewer set Editable false Control control details Viewer get Control Grid Data gd new Grid Data Grid Data FILL BOTH control set Layout Data gd details Viewer get Selection Provider add Selection Changed Listener get Detail Selection Changed Listener details Viewer get Control add Focus Listener new Focus Adapter non Javadoc see org eclipse swt events Focus Listener focus Gained Focus Event public void focus Gained Focus Event e get Variables View Selection Provider set Underlying Selection Provider get Detail Viewer get Selection Provider set Action SELECT ALL ACTION get Action DETAIL SELECT ALL ACTION set Action COPY ACTION get Action DETAIL COPY ACTION get View Site get Action Bars update Action Bars set Focus Viewer Viewer get Detail Viewer add a context menu to the detail area create Detail Context Menu details Viewer get Text Widget details Viewer get Text Widget add Mouse Listener get Cursor Listener details Viewer get Text Widget add Key Listener get Cursor Listener  createDetailsViewer SourceViewer SourceViewer detailsViewer SourceViewer getSashForm V_SCROLL H_SCROLL setDetailViewer detailsViewer detailsViewer setDocument getDetailDocument detailsViewer getTextWidget setFont JFaceResources getFont IInternalDebugUIConstants DETAIL_PANE_FONT getDetailDocument addDocumentListener getDetailDocumentListener detailsViewer setEditable detailsViewer getControl GridData GridData GridData FILL_BOTH setLayoutData detailsViewer getSelectionProvider addSelectionChangedListener getDetailSelectionChangedListener detailsViewer getControl addFocusListener FocusAdapter FocusListener focusGained FocusEvent focusGained FocusEvent getVariablesViewSelectionProvider setUnderlyingSelectionProvider getDetailViewer getSelectionProvider setAction SELECT_ALL_ACTION getAction DETAIL_SELECT_ALL_ACTION setAction COPY_ACTION getAction DETAIL_COPY_ACTION getViewSite getActionBars updateActionBars setFocusViewer getDetailViewer createDetailContextMenu detailsViewer getTextWidget detailsViewer getTextWidget addMouseListener getCursorListener detailsViewer getTextWidget addKeyListener getCursorListener
Creates this view s content provider return a content provider protected I Content Provider create Content Provider Variables View Content Provider cp new Variables View Content Provider this cp set Exception Handler this return cp  IContentProvider createContentProvider VariablesViewContentProvider VariablesViewContentProvider setExceptionHandler
Creates this view s event handler return an event handler protected Abstract Debug Event Handler create Event Handler return new Variables View Event Handler this  AbstractDebugEventHandler createEventHandler VariablesViewEventHandler
see org eclipse debug ui Abstract Debug View get Help Context Id protected String get Help Context Id return I Debug Help Context Ids VARIABLE VIEW  AbstractDebugView getHelpContextId getHelpContextId IDebugHelpContextIds VARIABLE_VIEW
Set the orientation of the details pane so that is one of underneath the main tree view to the right of the main tree view not visible public void set Detail Pane Orientation String orientation if orientation equals f Current Detail Pane Orientation return if orientation equals I Debug Preference Constants VARIABLES DETAIL PANE HIDDEN hide Detail Pane else int vert Or Horiz orientation equals I Debug Preference Constants VARIABLES DETAIL PANE UNDERNEATH SWT VERTICAL SWT HORIZONTAL get Sash Form set Orientation vert Or Horiz if I Debug Preference Constants VARIABLES DETAIL PANE HIDDEN equals f Current Detail Pane Orientation show Detail Pane f Current Detail Pane Orientation orientation DebugUI Plugin get Default get Preference Store set Value get Detail Pane Preference Key orientation  setDetailPaneOrientation fCurrentDetailPaneOrientation IDebugPreferenceConstants VARIABLES_DETAIL_PANE_HIDDEN hideDetailPane vertOrHoriz IDebugPreferenceConstants VARIABLES_DETAIL_PANE_UNDERNEATH getSashForm setOrientation vertOrHoriz IDebugPreferenceConstants VARIABLES_DETAIL_PANE_HIDDEN fCurrentDetailPaneOrientation showDetailPane fCurrentDetailPaneOrientation DebugUIPlugin getDefault getPreferenceStore setValue getDetailPanePreferenceKey
private void hide Detail Pane if f Toggled Detail Once set Last Sash Weights get Sash Form get Weights get Sash Form set Maximized Control get Viewer get Control  hideDetailPane fToggledDetailOnce setLastSashWeights getSashForm getWeights getSashForm setMaximizedControl getViewer getControl
private void show Detail Pane get Sash Form set Maximized Control null get Sash Form set Weights get Last Sash Weights populate Detail Pane reveal Tree Selection f Toggled Detail Once true  showDetailPane getSashForm setMaximizedControl getSashForm setWeights getLastSashWeights populateDetailPane revealTreeSelection fToggledDetailOnce
Make sure the currently selected item in the tree is visible protected void reveal Tree Selection Variables Viewer viewer get Variables Viewer if viewer null I Selection selection viewer get Selection if selection instanceof I Structured Selection Object selected I Structured Selection selection get First Element if selected null viewer reveal selected  revealTreeSelection VariablesViewer getVariablesViewer ISelection getSelection IStructuredSelection IStructuredSelection getFirstElement
Set on or off the word wrap flag for the detail pane public void toggle Detail Pane Word Wrap boolean on f Detail Viewer get Text Widget set Word Wrap on  toggleDetailPaneWordWrap fDetailViewer getTextWidget setWordWrap
Return the relative weights that were in effect the last time both panes were visible in the sash form or the default weights if both panes have not yet been made visible protected int get Last Sash Weights if f Last Sash Weights null f Last Sash Weights DEFAULT SASH WEIGHTS return f Last Sash Weights  getLastSashWeights fLastSashWeights fLastSashWeights DEFAULT_SASH_WEIGHTS fLastSashWeights
Set the current relative weights of the controls in the sash form so that the sash form can be reset to this layout at a later time protected void set Last Sash Weights int weights f Last Sash Weights weights  setLastSashWeights fLastSashWeights
Create the context menu particular to the detail pane Note that anyone wishing to contribute an action to this menu must use code I DebugUI Constants VARIABLE VIEW DETAIL ID code as the code targetID code in the extension XML protected void create Detail Context Menu Control menu Control Menu Manager menu Mgr new Menu Manager NON NLS 1 menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr fill Detail Context Menu mgr Menu menu menu Mgr create Context Menu menu Control menu Control set Menu menu register the context menu such that other plugins may contribute to it get Site register Context Menu I DebugUI Constants VARIABLE VIEW DETAIL ID menu Mgr get Detail Viewer get Selection Provider add Context Menu Manager menu Mgr  IDebugUIConstants VARIABLE_VIEW_DETAIL_ID createDetailContextMenu menuControl MenuManager menuMgr MenuManager menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager fillDetailContextMenu menuMgr createContextMenu menuControl menuControl setMenu getSite registerContextMenu IDebugUIConstants VARIABLE_VIEW_DETAIL_ID menuMgr getDetailViewer getSelectionProvider addContextMenuManager menuMgr
protected void create Actions I Action action new Show Types Action this set Action Show Type Names action NON NLS 1 action new Toggle Logical Structure Action this set Action Toggle Content Providers action NON NLS 1 action new Collapse All Action get Variables Viewer set Action Collapse All action NON NLS 1 action new Change Variable Value Action get Viewer action set Enabled false set Action Change Variable Value action NON NLS 1 set Action DOUBLE CLICK ACTION action Text Viewer Action text Action new Text Viewer Action get Detail Viewer I Source Viewer CONTENTASSIST PROPOSALS text Action set Action Definition Id I Text Editor Action Definition Ids CONTENT ASSIST PROPOSALS text Action configure Action Variables View Messages get String Variables View Co ntent Assist 3 NON NLS 1 NON NLS 2 NON NLS 3 text Action set Image Descriptor Debug Plugin Images get Image Descriptor I DebugUI Constants IMG ELCL CONTENT ASSIST text Action set Hover Image Descriptor Debug Plugin Images get Image Descriptor I DebugUI Constants IMG LCL CONTENT ASSIST text Action set Disabled Image Descriptor Debug Plugin Images get Image Descriptor I DebugUI Constants IMG DLCL CONTENT ASSIST set Action Content Assist text Action NON NLS 1 get Site get Key Binding Service register Action text Action text Action new Text Viewer Action get Detail Viewer I Text Operation Target SELECT ALL text Action configure Action Variables View Messages get String Variables View Select  All 5 NON NLS 1 NON NLS 2 NON NLS 3 set Action DETAIL SELECT ALL ACTION text Action text Action new Text Viewer Action get Detail Viewer I Text Operation Target COPY text Action configure Action Variables View Messages get String Variables View Copy 8 NON NLS 1 NON NLS 2 NON NLS 3 set Action DETAIL COPY ACTION text Action text Action new Text Viewer Action get Detail Viewer I Text Operation Target CUT text Action configure Action Variables View Messages get String Variables View Cu t 11 NON NLS 1 NON NLS 2 NON NLS 3 set Action Action Factory CUT get Id text Action text Action new Text Viewer Action get Detail Viewer I Text Operation Target PASTE text Action configure Action Variables View Messages get String Variables View Paste 14 NON NLS 1 NON NLS 2 NON NLS 3 set Action Action Factory PASTE get Id text Action XXX Still using old resource access Resource Bundle bundle Resource Bundle get Bundle org eclipse debug internal ui views variables Variables View Messages NON NLS 1 set Action Action Factory FIND get Id new Find Replace Action bundle find replace action this NON NLS 1 f Selection Actions add Action Factory COPY get Id f Selection Actions add Action Factory CUT get Id f Selection Actions add Action Factory PASTE get Id update Action Action Factory FIND get Id action new Assign Value Action this f Detail Viewer set Action Assign Value action NON NLS 1 f Status Line Item new Status Line Contribution Item Mode Contribution Item NON NLS 1 I Action Bars action Bars get View Site get Action Bars I Status Line Manager manager action Bars get Status Line Manager manager add f Status Line Item  createActions IAction ShowTypesAction setAction ShowTypeNames ToggleLogicalStructureAction setAction ToggleContentProviders CollapseAllAction getVariablesViewer setAction CollapseAll ChangeVariableValueAction getViewer setEnabled setAction ChangeVariableValue setAction DOUBLE_CLICK_ACTION TextViewerAction textAction TextViewerAction getDetailViewer ISourceViewer CONTENTASSIST_PROPOSALS textAction setActionDefinitionId ITextEditorActionDefinitionIds CONTENT_ASSIST_PROPOSALS textAction configureAction VariablesViewMessages getString VariablesView ntent_Assist_3 textAction setImageDescriptor DebugPluginImages getImageDescriptor IDebugUIConstants IMG_ELCL_CONTENT_ASSIST textAction setHoverImageDescriptor DebugPluginImages getImageDescriptor IDebugUIConstants IMG_LCL_CONTENT_ASSIST textAction setDisabledImageDescriptor DebugPluginImages getImageDescriptor IDebugUIConstants IMG_DLCL_CONTENT_ASSIST setAction ContentAssist textAction getSite getKeyBindingService registerAction textAction textAction TextViewerAction getDetailViewer ITextOperationTarget SELECT_ALL textAction configureAction VariablesViewMessages getString VariablesView Select_ All_5 setAction DETAIL_SELECT_ALL_ACTION textAction textAction TextViewerAction getDetailViewer ITextOperationTarget textAction configureAction VariablesViewMessages getString VariablesView Copy_8 setAction DETAIL_COPY_ACTION textAction textAction TextViewerAction getDetailViewer ITextOperationTarget textAction configureAction VariablesViewMessages getString VariablesView t_11 setAction ActionFactory getId textAction textAction TextViewerAction getDetailViewer ITextOperationTarget textAction configureAction VariablesViewMessages getString VariablesView Paste_14 setAction ActionFactory getId textAction ResourceBundle ResourceBundle getBundle VariablesViewMessages setAction ActionFactory getId FindReplaceAction find_replace_action fSelectionActions ActionFactory getId fSelectionActions ActionFactory getId fSelectionActions ActionFactory getId updateAction ActionFactory getId AssignValueAction fDetailViewer setAction AssignValue fStatusLineItem StatusLineContributionItem ModeContributionItem IActionBars actionBars getViewSite getActionBars IStatusLineManager actionBars getStatusLineManager fStatusLineItem
private void create Orientation Actions I Action Bars action Bars get View Site get Action Bars I Menu Manager view Menu action Bars get Menu Manager f Toggle Detail Pane Actions new Toggle Detail Pane Action 3 f Toggle Detail Pane Actions 0 new Toggle Detail Pane Action this I Debug Preference Constants VARIABLES DETAIL PANE UNDERNEATH null f Toggle Detail Pane Actions 1 new Toggle Detail Pane Action this I Debug Preference Constants VARIABLES DETAIL PANE RIGHT null f Toggle Detail Pane Actions 2 new Toggle Detail Pane Action this I Debug Preference Constants VARIABLES DETAIL PANE HIDDEN get Toggle Action Label view Menu add new Separator view Menu add f Toggle Detail Pane Actions 0 view Menu add f Toggle Detail Pane Actions 1 view Menu add f Toggle Detail Pane Actions 2 view Menu add new Separator  createOrientationActions IActionBars actionBars getViewSite getActionBars IMenuManager viewMenu actionBars getMenuManager fToggleDetailPaneActions ToggleDetailPaneAction fToggleDetailPaneActions ToggleDetailPaneAction IDebugPreferenceConstants VARIABLES_DETAIL_PANE_UNDERNEATH fToggleDetailPaneActions ToggleDetailPaneAction IDebugPreferenceConstants VARIABLES_DETAIL_PANE_RIGHT fToggleDetailPaneActions ToggleDetailPaneAction IDebugPreferenceConstants VARIABLES_DETAIL_PANE_HIDDEN getToggleActionLabel viewMenu viewMenu fToggleDetailPaneActions viewMenu fToggleDetailPaneActions viewMenu fToggleDetailPaneActions viewMenu
protected String get Toggle Action Label return Variables View Messages get String Variables View 41 NON NLS 1  getToggleActionLabel VariablesViewMessages getString VariablesView
Configures the tool Bar param tbm The toolbar that will be configured protected void configure Tool Bar I Tool Bar Manager tbm tbm add new Separator this get Class get Name tbm add new Separator I DebugUI Constants RENDER GROUP tbm add get Action Show Type Names NON NLS 1 tbm add get Action Toggle Content Providers NON NLS 1 tbm add get Action Collapse All NON NLS 1  toolBar configureToolBar IToolBarManager getClass getName IDebugUIConstants RENDER_GROUP getAction ShowTypeNames getAction ToggleContentProviders getAction CollapseAll
Adds items to the tree viewer s context menu including any extension defined actions param menu The menu to add the item to protected void fill Context Menu I Menu Manager menu menu add new Separator I DebugUI Constants EMPTY VARIABLE GROUP menu add new Separator I DebugUI Constants VARIABLE GROUP menu add get Action Change Variable Value NON NLS 1 I Action action new Available Logical Structures Action this if action is Enabled menu add action menu add new Separator I DebugUI Constants EMPTY RENDER GROUP menu add new Separator I DebugUI Constants EMPTY NAVIGATION GROUP menu add new Separator I Workbench Action Constants MB ADDITIONS  fillContextMenu IMenuManager IDebugUIConstants EMPTY_VARIABLE_GROUP IDebugUIConstants VARIABLE_GROUP getAction ChangeVariableValue IAction AvailableLogicalStructuresAction isEnabled IDebugUIConstants EMPTY_RENDER_GROUP IDebugUIConstants EMPTY_NAVIGATION_GROUP IWorkbenchActionConstants MB_ADDITIONS
Adds items to the detail area s context menu including any extension defined actions param menu The menu to add the item to protected void fill Detail Context Menu I Menu Manager menu menu add new Separator I DebugUI Constants VARIABLE GROUP menu add get Action Assign Value NON NLS 1 menu add get Action Content Assist NON NLS 1 menu add new Separator menu add get Action Action Factory CUT get Id menu add get Action Action Factory COPY get Id Detail NON NLS 1 menu add get Action Action Factory PASTE get Id menu add get Action DETAIL SELECT ALL ACTION menu add new Separator FIND NON NLS 1 menu add get Action Action Factory FIND get Id menu add new Separator I Workbench Action Constants MB ADDITIONS  fillDetailContextMenu IMenuManager IDebugUIConstants VARIABLE_GROUP getAction AssignValue getAction ContentAssist getAction ActionFactory getId getAction ActionFactory getId getAction ActionFactory getId getAction DETAIL_SELECT_ALL_ACTION getAction ActionFactory getId IWorkbenchActionConstants MB_ADDITIONS
f Tree Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event if event get Selection Provider equals get Variables Viewer clear Status Line get Variables View Selection Provider fire Selection Changed event if the detail pane is not visible don t waste time retrieving details if get Sash Form get Maximized Control get Viewer get Control return I Structured Selection selection I Structured Selection event get Selection populate Detail Pane From Selection selection tree Selection Changed event  fTreeSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getSelectionProvider getVariablesViewer clearStatusLine getVariablesViewSelectionProvider fireSelectionChanged getSashForm getMaximizedControl getViewer getControl IStructuredSelection IStructuredSelection getSelection populateDetailPaneFromSelection treeSelectionChanged
Lazily instantiate and return a selection listener that populates the detail pane but only if the detail is currently visible protected I Selection Changed Listener get Tree Selection Changed Listener if f Tree Selection Changed Listener null f Tree Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event if event get Selection Provider equals get Variables Viewer clear Status Line get Variables View Selection Provider fire Selection Changed event if the detail pane is not visible don t waste time retrieving details if get Sash Form get Maximized Control get Viewer get Control return I Structured Selection selection I Structured Selection event get Selection populate Detail Pane From Selection selection tree Selection Changed event return f Tree Selection Changed Listener  ISelectionChangedListener getTreeSelectionChangedListener fTreeSelectionChangedListener fTreeSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getSelectionProvider getVariablesViewer clearStatusLine getVariablesViewSelectionProvider fireSelectionChanged getSashForm getMaximizedControl getViewer getControl IStructuredSelection IStructuredSelection getSelection populateDetailPaneFromSelection treeSelectionChanged fTreeSelectionChangedListener
Selection in the variable tree changed Perform any updates param event protected void tree Selection Changed Selection Changed Event event  treeSelectionChanged SelectionChangedEvent
Ask the variables tree for its current selection and use this to populate the detail pane public void populate Detail Pane if is Detail Pane Visible Viewer viewer get Viewer if viewer null I Structured Selection selection I Structured Selection viewer get Selection populate Detail Pane From Selection selection  populateDetailPane isDetailPaneVisible getViewer IStructuredSelection IStructuredSelection getSelection populateDetailPaneFromSelection
Show the details associated with the first of the selected variables in the detail pane protected void populate Detail Pane From Selection I Structured Selection selection try get Detail Document set NON NLS 1 if selection is Empty I Value val null Object obj selection get First Element if obj instanceof Indexed Variable Partition no details for parititions return if obj instanceof I Variable val I Variable obj get Value else if obj instanceof I Expression val I Expression obj get Value if val null return workaroud for bug 12938 if f Value Selection null f Value Selection equals selection return set Debug Model val get Model Identifier f Value Selection selection f Selection Iterator selection iterator f Selection Iterator next f Last Value Detail val get Model Presentation compute Detail val this catch Debug Exception de DebugUI Plugin log de get Detail Document set Variables View Messages get String Variables View error occurred retrieving value  18 NON NLS 1  populateDetailPaneFromSelection IStructuredSelection getDetailDocument isEmpty IValue getFirstElement IndexedVariablePartition IVariable IVariable getValue IExpression IExpression getValue fValueSelection fValueSelection setDebugModel getModelIdentifier fValueSelection fSelectionIterator fSelectionIterator fLastValueDetail getModelPresentation computeDetail DebugException DebugUIPlugin getDetailDocument VariablesViewMessages getString VariablesView error_occurred_retrieving_value _18
Runnable runnable new Runnable public void run if is Available bug 24862 don t display the result if an other detail has been requested if value f Last Value Detail String insert result int length get Detail Document get length if length 0 insert n result NON NLS 1 try get Detail Document replace length 0 insert catch Bad Location Exception e DebugUI Plugin log e f Last Value Detail null if f Selection Iterator null f Selection Iterator has Next Object obj f Selection Iterator next I Value val null try if obj instanceof I Variable val I Variable obj get Value else if obj instanceof I Expression val I Expression obj get Value f Last Value Detail val get Model Presentation compute Detail val Variables View this catch Debug Exception e DebugUI Plugin log e get Detail Document set Variables View Messages get String Variables View error occurred retrieving value  18 NON NLS 1 else f Value Selection null f Selection Iterator null  isAvailable fLastValueDetail getDetailDocument getDetailDocument BadLocationException DebugUIPlugin fLastValueDetail fSelectionIterator fSelectionIterator hasNext fSelectionIterator IValue IVariable IVariable getValue IExpression IExpression getValue fLastValueDetail getModelPresentation computeDetail VariablesView DebugException DebugUIPlugin getDetailDocument VariablesViewMessages getString VariablesView error_occurred_retrieving_value _18 fValueSelection fSelectionIterator
see I Value Detail Listener detail Computed I Value String public void detail Computed final I Value value final String result Runnable runnable new Runnable public void run if is Available bug 24862 don t display the result if an other detail has been requested if value f Last Value Detail String insert result int length get Detail Document get length if length 0 insert n result NON NLS 1 try get Detail Document replace length 0 insert catch Bad Location Exception e DebugUI Plugin log e f Last Value Detail null if f Selection Iterator null f Selection Iterator has Next Object obj f Selection Iterator next I Value val null try if obj instanceof I Variable val I Variable obj get Value else if obj instanceof I Expression val I Expression obj get Value f Last Value Detail val get Model Presentation compute Detail val Variables View this catch Debug Exception e DebugUI Plugin log e get Detail Document set Variables View Messages get String Variables View error occurred retrieving value  18 NON NLS 1 else f Value Selection null f Selection Iterator null async Exec runnable  IValueDetailListener detailComputed IValue detailComputed IValue isAvailable fLastValueDetail getDetailDocument getDetailDocument BadLocationException DebugUIPlugin fLastValueDetail fSelectionIterator fSelectionIterator hasNext fSelectionIterator IValue IVariable IVariable getValue IExpression IExpression getValue fLastValueDetail getModelPresentation computeDetail VariablesView DebugException DebugUIPlugin getDetailDocument VariablesViewMessages getString VariablesView error_occurred_retrieving_value _18 fValueSelection fSelectionIterator asyncExec
f Detail Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event if event get Selection Provider equals get Variables View Selection Provider get Underlying Selection Provider get Variables View Selection Provider fire Selection Changed event update Selection Dependent Actions  fDetailSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getSelectionProvider getVariablesViewSelectionProvider getUnderlyingSelectionProvider getVariablesViewSelectionProvider fireSelectionChanged updateSelectionDependentActions
Lazily instantiate and return a selection listener that updates the enabled state of the selection oriented actions in this view protected I Selection Changed Listener get Detail Selection Changed Listener if f Detail Selection Changed Listener null f Detail Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event if event get Selection Provider equals get Variables View Selection Provider get Underlying Selection Provider get Variables View Selection Provider fire Selection Changed event update Selection Dependent Actions return f Detail Selection Changed Listener  ISelectionChangedListener getDetailSelectionChangedListener fDetailSelectionChangedListener fDetailSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getSelectionProvider getVariablesViewSelectionProvider getUnderlyingSelectionProvider getVariablesViewSelectionProvider fireSelectionChanged updateSelectionDependentActions fDetailSelectionChangedListener
if f Detail Document Listener null f Detail Document Listener new I Document Listener public void document About To Be Changed Document Event event  fDetailDocumentListener fDetailDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent
public void document About To Be Changed Document Event event public void document Changed Document Event event update Action Action Factory FIND get Id  documentAboutToBeChanged DocumentEvent documentChanged DocumentEvent updateAction ActionFactory getId
Lazily instantiate and return a document listener that updates the enabled state of the Find Replace action protected I Document Listener get Detail Document Listener if f Detail Document Listener null f Detail Document Listener new I Document Listener public void document About To Be Changed Document Event event public void document Changed Document Event event update Action Action Factory FIND get Id return f Detail Document Listener  IDocumentListener getDetailDocumentListener fDetailDocumentListener fDetailDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent documentChanged DocumentEvent updateAction ActionFactory getId fDetailDocumentListener
Lazily instantiate and return a Document for the detail pane text viewer protected I Document get Detail Document if f Detail Document null f Detail Document new Document return f Detail Document  IDocument getDetailDocument fDetailDocument fDetailDocument fDetailDocument
protected I Debug Model Presentation get Model Presentation if f Model Presentation null f Model Presentation new Variables View Model Presentation return f Model Presentation  IDebugModelPresentation getModelPresentation fModelPresentation fModelPresentation VariablesViewModelPresentation fModelPresentation
Sets the viewer used to display value details param viewer source viewer private void set Detail Viewer I Source Viewer viewer f Detail Viewer viewer  setDetailViewer ISourceViewer fDetailViewer
Returns the viewer used to display value details return source viewer protected I Source Viewer get Detail Viewer return f Detail Viewer  ISourceViewer getDetailViewer fDetailViewer
protected Sash Form get Sash Form return f Sash Form  SashForm getSashForm fSashForm
private void set Sash Form Sash Form sash Form f Sash Form sash Form  setSashForm SashForm sashForm fSashForm sashForm
public Object get Adapter Class required if I Find Replace Target class equals required return get Detail Viewer get Find Replace Target if I Text Viewer class equals required return get Detail Viewer if I Debug Model Presentation class equals required return get Model Presentation return super get Adapter required  getAdapter IFindReplaceTarget getDetailViewer getFindReplaceTarget ITextViewer getDetailViewer IDebugModelPresentation getModelPresentation getAdapter
protected void update Selection Dependent Actions Iterator iterator f Selection Actions iterator while iterator has Next update Action String iterator next  updateSelectionDependentActions fSelectionActions hasNext updateAction
protected void update Action String action Id I Action action get Action action Id if action instanceof I Update I Update action update  updateAction actionId IAction getAction actionId IUpdate IUpdate
protected boolean is Detail Pane Visible return f Toggle Detail Pane Actions 2 is Checked  isDetailPaneVisible fToggleDetailPaneActions isChecked
Sets the identifier of the debug model being displayed in this view or code null code if none param id debug model identifier of the type of debug elements being displayed in this view protected void set Debug Model String id if id f Debug Model Identifier f Debug Model Identifier id configure Details Viewer else update Action Content Assist NON NLS 1  setDebugModel fDebugModelIdentifier fDebugModelIdentifier configureDetailsViewer updateAction ContentAssist
Returns the identifier of the debug model being displayed in this view or code null code if none return debug model identifier protected String get Debug Model return f Debug Model Identifier  getDebugModel fDebugModelIdentifier
Sets the current configuration being used in the details area param config source viewer configuration private void set Detail Viewer Configuration Source Viewer Configuration config f Source Viewer Configuration config  setDetailViewerConfiguration SourceViewerConfiguration fSourceViewerConfiguration
Returns the current configuration being used in the details area return source viewer configuration protected Source Viewer Configuration get Detail Viewer Configuration return f Source Viewer Configuration  SourceViewerConfiguration getDetailViewerConfiguration fSourceViewerConfiguration
see org eclipse debug ui Abstract Debug View get Default Control protected Control get Default Control return get Sash Form  AbstractDebugView getDefaultControl getDefaultControl getSashForm
see I Debug Exception Handler handle Exception Debug Exception public void handle Exception Debug Exception e show Message e get Message  IDebugExceptionHandler handleException DebugException handleException DebugException showMessage getMessage
protected Variables View Selection Provider get Variables View Selection Provider return f Selection Provider  VariablesViewSelectionProvider getVariablesViewSelectionProvider fSelectionProvider
The code Variables View code listens for selection changes in the code Launch View code see I Selection Listener selection Changed I Workbench Part I Selection public void selection Changed I Workbench Part part I Selection selection if is Available is Visible return if selection null set Viewer Input new Structured Selection else if selection instanceof I Structured Selection set Viewer Input I Structured Selection selection else get Detail Viewer set Editable false update Action Content Assist NON NLS 1  VariablesView LaunchView ISelectionListener selectionChanged IWorkbenchPart ISelection selectionChanged IWorkbenchPart ISelection isAvailable isVisible setViewerInput StructuredSelection IStructuredSelection setViewerInput IStructuredSelection getDetailViewer setEditable updateAction ContentAssist
Delegate to the code DOUBLE CLICK ACTION code if any see org eclipse jface viewers I Double Click Listener double Click Double Click Event public void double Click Double Click Event event I Action action get Action DOUBLE CLICK ACTION if action null action is Enabled action run else I Selection selection event get Selection if selection instanceof I Structured Selection return I Structured Selection ss I Structured Selection selection Object o ss get First Element if o null Tree Viewer t Viewer Tree Viewer get Viewer boolean expanded t Viewer get Expanded State o t Viewer set Expanded State o expanded  DOUBLE_CLICK_ACTION IDoubleClickListener doubleClick DoubleClickEvent doubleClick DoubleClickEvent IAction getAction DOUBLE_CLICK_ACTION isEnabled ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement TreeViewer tViewer TreeViewer getViewer tViewer getExpandedState tViewer setExpandedState
see org eclipse ui I Workbench Part set Focus public void set Focus if get Focus Viewer null super set Focus else get Focus Viewer get Control set Focus  IWorkbenchPart setFocus setFocus getFocusViewer setFocus getFocusViewer getControl setFocus
Sets the viewer that has focus param viewer protected void set Focus Viewer Viewer viewer f Focus Viewer viewer  setFocusViewer fFocusViewer
Returns the viewer that has focus or code null code return Viewer protected Viewer get Focus Viewer return f Focus Viewer  getFocusViewer fFocusViewer
public I Debug Model Presentation get Presentation String id if get Viewer instanceof Structured Viewer I Debug Model Presentation lp get Model Presentation if lp instanceof Delegating Model Presentation return Delegating Model Presentation lp get Presentation id if lp instanceof Lazy Model Presentation if Lazy Model Presentation lp get Debug Model Identifier equals id return lp return null  IDebugModelPresentation getPresentation getViewer StructuredViewer IDebugModelPresentation getModelPresentation DelegatingModelPresentation DelegatingModelPresentation getPresentation LazyModelPresentation LazyModelPresentation getDebugModelIdentifier
see org eclipse debug ui I Detail Site get Detail Viewer Parent public Composite get Detail Viewer Parent return get Sash Form  IDetailSite getDetailViewerParent getDetailViewerParent getSashForm
see org eclipse debug ui I Detail Site is Main Viewer Available public boolean is Main Viewer Available return is Available  IDetailSite isMainViewerAvailable isMainViewerAvailable isAvailable
Sets whether logical structures are being displayed public void set Show Logical Structure boolean flag Variables View Content Provider get Structured Viewer get Content Provider set Show Logical Structure flag  setShowLogicalStructure VariablesViewContentProvider getStructuredViewer getContentProvider setShowLogicalStructure
Returns whether logical structures are being displayed public boolean is Show Logical Structure return Variables View Content Provider get Structured Viewer get Content Provider is Show Logical Structure  isShowLogicalStructure VariablesViewContentProvider getStructuredViewer getContentProvider isShowLogicalStructure
Returns the number of entries that should be displayed in each partition of an indexed collection return the number of entries that should be displayed in each partition of an indexed collection protected int get Array Partition Size TODO this should be a view setting return 100  getArrayPartitionSize
see org eclipse debug ui Abstract Debug View becomes Hidden protected void becomes Hidden set Viewer Input new Structured Selection super becomes Hidden  AbstractDebugView becomesHidden becomesHidden setViewerInput StructuredSelection becomesHidden
protected void becomes Visible super becomes Visible I View Part part get Site get Page find View I DebugUI Constants ID DEBUG VIEW if part null I Selection selection get Site get Page get Selection I DebugUI Constants ID DEBUG VIEW selection Changed part selection  becomesVisible becomesVisible IViewPart getSite getPage findView IDebugUIConstants ID_DEBUG_VIEW ISelection getSite getPage getSelection IDebugUIConstants ID_DEBUG_VIEW selectionChanged
Returns the memento of the expanded and selected items in the viewer return the memento of the expanded and selected items in the viewer protected Abstract Viewer State get Viewer State return new Viewer State get Variables Viewer  AbstractViewerState getViewerState ViewerState getVariablesViewer
f Cursor Listener new I Cursor Listener public void key Pressed Key Event e f Status Line Item set Text get Cursor Position  fCursorListener ICursorListener keyPressed KeyEvent fStatusLineItem setText getCursorPosition
public void key Released Key Event e  keyReleased KeyEvent
public void mouse Double Click Mouse Event e  mouseDoubleClick MouseEvent
public void mouse Down Mouse Event e  mouseDown MouseEvent
public void mouse Up Mouse Event e f Status Line Item set Text get Cursor Position  mouseUp MouseEvent fStatusLineItem setText getCursorPosition
Returns this view s cursor listener to be installed on the view s associated details viewer This listener is listening to key and mouse button events It triggers the updating of the status line return the listener private I Cursor Listener get Cursor Listener if f Cursor Listener null f Cursor Listener new I Cursor Listener public void key Pressed Key Event e f Status Line Item set Text get Cursor Position public void key Released Key Event e public void mouse Double Click Mouse Event e public void mouse Down Mouse Event e public void mouse Up Mouse Event e f Status Line Item set Text get Cursor Position return f Cursor Listener  ICursorListener getCursorListener fCursorListener fCursorListener ICursorListener keyPressed KeyEvent fStatusLineItem setText getCursorPosition keyReleased KeyEvent mouseDoubleClick MouseEvent mouseDown MouseEvent mouseUp MouseEvent fStatusLineItem setText getCursorPosition fCursorListener
protected String get Cursor Position if get Detail Viewer null return NON NLS 1 Styled Text styled Text get Detail Viewer get Text Widget int caret styled Text get Caret Offset I Document document get Detail Viewer get Document if document null return NON NLS 1 try int line document get Line Of Offset caret int line Offset document get Line Offset line int tab Width styled Text get Tabs int column 0 for int i line Offset i caret i if t document get Char i column tab Width tab Width 0 0 column tab Width else column f Line Label f Value line 1 f Column Label f Value column 1 return Message Format format f Position Label Pattern f Position Label Pattern Arguments catch Bad Location Exception x return NON NLS 1  getCursorPosition getDetailViewer StyledText styledText getDetailViewer getTextWidget styledText getCaretOffset IDocument getDetailViewer getDocument getLineOfOffset lineOffset getLineOffset tabWidth styledText getTabs lineOffset getChar tabWidth tabWidth tabWidth fLineLabel fValue fColumnLabel fValue MessageFormat fPositionLabelPattern fPositionLabelPatternArguments BadLocationException

Constructs a new provider public Variables View Content Provider I Debug View view f Parent Cache new Hash Map 10 set Debug View view  VariablesViewContentProvider IDebugView fParentCache HashMap setDebugView
Returns the code I Variable code s for the given code I Debug Element code public Object get Elements Object parent return get Children parent  IVariable IDebugElement getElements getChildren
see I Tree Content Provider get Children Object public Object get Children Object parent Object children null try if parent instanceof I Stack Frame children I Stack Frame parent get Variables else if parent instanceof I Variable I Variable variable I Variable parent I Value value variable get Value children get Model Specific Children variable value if children null cache parent children return children catch Debug Exception de if get Exception Handler null get Exception Handler handle Exception de else DebugUI Plugin log de return new Object 0  ITreeContentProvider getChildren getChildren IStackFrame IStackFrame getVariables IVariable IVariable IVariable IValue getValue getModelSpecificChildren DebugException getExceptionHandler getExceptionHandler handleException DebugUIPlugin
protected I Variable get Model Specific Children I Debug Element parent I Value value throws Debug Exception if value null return new I Variable 0 return get Value Children parent value  IVariable getModelSpecificChildren IDebugElement IValue DebugException IVariable getValueChildren
Returns children for the given value creating array paritions if required param parent expression or variable containing the given value param value the value to retrieve children for return children for the given value creating array paritions if required throws Debug Exception protected I Variable get Value Children I Debug Element parent I Value value throws Debug Exception if value null return null I Value logical Value get Logical Value value if logical Value instanceof I Indexed Value I Indexed Value indexed Value I Indexed Value logical Value int partition Size compute Parition Size indexed Value if partition Size 1 int offset indexed Value get Initial Offset int length indexed Value get Size int num Partitions length partition Size int remainder length partition Size if remainder 0 num Partitions I Variable partitions new I Variable num Partitions for int i 0 i num Partitions 1 i partitions i new Indexed Variable Partition parent indexed Value offset partition Size offset offset partition Size if remainder 0 remainder partition Size partitions num Partitions 1 new Indexed Variable Partition parent indexed Value offset remainder return partitions if logical Value null safeguard against an structure type returning null logical Value value return logical Value get Variables  DebugException IVariable getValueChildren IDebugElement IValue DebugException IValue logicalValue getLogicalValue logicalValue IIndexedValue IIndexedValue indexedValue IIndexedValue logicalValue partitionSize computeParitionSize indexedValue partitionSize indexedValue getInitialOffset indexedValue getSize numPartitions partitionSize partitionSize numPartitions IVariable IVariable numPartitions numPartitions IndexedVariablePartition indexedValue partitionSize partitionSize partitionSize numPartitions IndexedVariablePartition indexedValue logicalValue logicalValue logicalValue getVariables
Returns the partition size to use for the given indexed value The partition size is computed by determining the number of levels that an indexed collection must be nested in order to partition the collection sub collections of the preferred partition size param value indexed value return size of paritions the value should be subdivided into private int compute Parition Size I Indexed Value value int partition Size 1 try int length value get Size int partition Depth 0 int preferred Size get Array Partition Size int remainder length preferred Size length length preferred Size while length 0 if remainder 0 length 1 break partition Depth remainder length preferred Size length length preferred Size for int i 0 i partition Depth i partition Size partition Size preferred Size catch Debug Exception e return partition Size  computeParitionSize IIndexedValue partitionSize getSize partitionDepth preferredSize getArrayPartitionSize preferredSize preferredSize partitionDepth preferredSize preferredSize partitionDepth partitionSize partitionSize preferredSize DebugException partitionSize
Returns any logical value for the raw value param value return private I Value get Logical Value I Value value if is Show Logical Structure I Logical Structure Type types Debug Plugin get Logical Structure Types value if types length 0 I Preference Store store DebugUI Plugin get Default get Preference Store I Logical Structure Type type null boolean exist false for int i 0 i types length i String key Variables View LOGICAL STRUCTURE TYPE PREFIX types i get Id int setting store get Int key 0 never used 1 on 1 off if setting 0 exist true if setting 1 type types i break else store set Value types i get Id 1 if type null exist type types 0 choose first by default store set Value Variables View LOGICAL STRUCTURE TYPE PREFIX type get Id 1 if type null try return type get Logical Structure value catch Core Exception e unable to display logical structure return value  IValue getLogicalValue IValue isShowLogicalStructure ILogicalStructureType DebugPlugin getLogicalStructureTypes IPreferenceStore DebugUIPlugin getDefault getPreferenceStore ILogicalStructureType VariablesView LOGICAL_STRUCTURE_TYPE_PREFIX getId getInt setValue getId setValue VariablesView LOGICAL_STRUCTURE_TYPE_PREFIX getId getLogicalStructure CoreException
Caches the given elememts as children of the given parent param parent parent element param children children elements protected void cache Object parent Object children for int i 0 i children length i Object child children i avoid cycles in the cache which can happen for recursive data structures if f Parent Cache contains Key child f Parent Cache put child parent  fParentCache containsKey fParentCache
see I Tree Content Provider get Parent Object public Object get Parent Object item return f Parent Cache get item  ITreeContentProvider getParent getParent fParentCache
Unregisters this content provider from the debug plugin so that this object can be garbage collected public void dispose f Parent Cache null set Exception Handler null  fParentCache setExceptionHandler
protected void clear Cache if f Parent Cache null f Parent Cache clear  clearCache fParentCache fParentCache
Remove the cached parent for the given children param children for which to remove cached parents public void remove Cache Object children if f Parent Cache null return for int i 0 i children length i f Parent Cache remove children i  removeCache fParentCache fParentCache
see I Tree Content Provider has Children Object public boolean has Children Object element try if element instanceof I Variable if element instanceof Indexed Variable Partition return true element I Variable element get Value if element instanceof I Value return I Value element has Variables if element instanceof I Stack Frame return I Stack Frame element has Variables catch Debug Exception de DebugUI Plugin log de return false return false  ITreeContentProvider hasChildren hasChildren IVariable IndexedVariablePartition IVariable getValue IValue IValue hasVariables IStackFrame IStackFrame hasVariables DebugException DebugUIPlugin
see I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input clear Cache  IContentProvider inputChanged inputChanged oldInput newInput clearCache
Return all cached decendants of the given parent param parent the element whose decendants are to be calculated return list of decendants that have been cached for the given parent public List get Cached Decendants Object parent Iterator children f Parent Cache key Set iterator List cached Children new Array List 10 while children has Next Object child children next if is Cached Decendant child parent cached Children add child return cached Children  getCachedDecendants fParentCache keySet cachedChildren ArrayList hasNext isCachedDecendant cachedChildren cachedChildren
Returns whether the given child is a cached descendant of the given parent return whether the given child is a cached descendant of the given parent protected boolean is Cached Decendant Object child Object parent Object p get Parent child while p null if p equals parent return true p get Parent p return false  isCachedDecendant getParent getParent
Extract the debug model id from the specified code I Debug Element code and return it protected String get Debug Model Id I Debug Element debug Element return debug Element get Model Identifier  IDebugElement getDebugModelId IDebugElement debugElement debugElement getModelIdentifier
Sets an exception handler for this content provider param handler debug exception handler or code null code protected void set Exception Handler I Debug Exception Handler handler f Exception Handler handler  setExceptionHandler IDebugExceptionHandler fExceptionHandler
Returns the exception handler for this content provider return debug exception handler or code null code protected I Debug Exception Handler get Exception Handler return f Exception Handler  IDebugExceptionHandler getExceptionHandler fExceptionHandler
Show logical structure of values public void set Show Logical Structure boolean flag f Use Object Browsers flag  setShowLogicalStructure fUseObjectBrowsers
public boolean is Show Logical Structure return f Use Object Browsers  isShowLogicalStructure fUseObjectBrowsers
private void set Debug View I Debug View view f Debug View view  setDebugView IDebugView fDebugView
protected I Debug View get Debug View return f Debug View  IDebugView getDebugView fDebugView
Returns the number of entries that should be displayed in each partition of an indexed collection return the number of entries that should be displayed in each partition of an indexed collection protected int get Array Partition Size if get Debug View null TODO should fix this with a user pref return 100 return Variables View get Debug View get Array Partition Size  getArrayPartitionSize getDebugView VariablesView getDebugView getArrayPartitionSize

Constructor for Variables Viewer param parent public Variables Viewer Composite parent super parent  VariablesViewer VariablesViewer
Constructor for Variables Viewer param parent param style public Variables Viewer Composite parent int style super parent style  VariablesViewer VariablesViewer
Constructor for Variables Viewer param tree public Variables Viewer Tree tree super tree  VariablesViewer VariablesViewer
Refresh the view and then do another pass to update the foreground color for values that have changed since the last refresh Values that have not changed are drawn with the default system foreground color If the viewer has no selection ensure that new items are visible see Viewer refresh public void refresh super refresh if get Selection is Empty get New Item null if get New Item is Disposed ensure that new items are visible show Item get New Item set New Item null  getSelection isEmpty getNewItem getNewItem isDisposed showItem getNewItem setNewItem
see Abstract Tree Viewer new Item Widget int int protected Item new Item Widget parent int style int index if index 1 ignore the dummy items set New Item super new Item parent style index return get New Item return super new Item parent style index  AbstractTreeViewer newItem newItem setNewItem newItem getNewItem newItem
protected Item get New Item return f New Item  getNewItem fNewItem
protected void set New Item Item new Item f New Item new Item  setNewItem newItem fNewItem newItem
see org eclipse jface viewers Abstract Tree Viewer set Expanded Elements Object public void set Expanded Elements Object elements get Control set Redraw false super set Expanded Elements elements get Control set Redraw true  AbstractTreeViewer setExpandedElements setExpandedElements getControl setRedraw setExpandedElements getControl setRedraw
public void collapse All see https bugs eclipse org bugs show bug cgi id 39449 if get Root null super collapse All  collapseAll show_bug getRoot collapseAll
protected void do Update Item Item item Object element update icon and label I Label Provider provider I Label Provider get Label Provider String text provider get Text element if equals item get Text Debug View Interim Label Provider PENDING LABEL equals text NON NLS 1 If an element already has a label don t set the label to the pending label This avoids labels flashing when they re updated item set Text text Image image provider get Image element if item get Image image item set Image image if provider instanceof I Color Provider I Color Provider cp I Color Provider provider Tree Item tree Item Tree Item item tree Item set Foreground cp get Foreground element tree Item set Background cp get Background element  doUpdateItem ILabelProvider ILabelProvider getLabelProvider getText getText DebugViewInterimLabelProvider PENDING_LABEL setText getImage getImage setImage IColorProvider IColorProvider IColorProvider TreeItem treeItem TreeItem treeItem setForeground getForeground treeItem setBackground getBackground

Constructs a new event handler on the given view param view variables view public Variables View Event Handler Abstract Debug View view super view  VariablesViewEventHandler AbstractDebugView
see Abstract Debug Event Handler handle Debug Events Debug Event protected void do Handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i switch event get Kind case Debug Event SUSPEND do Handle Suspend Event event break case Debug Event CHANGE do Handle Change Event event break case Debug Event RESUME do Handle Resume Event event break  AbstractDebugEventHandler handleDebugEvents DebugEvent doHandleDebugEvents DebugEvent DebugEvent getKind DebugEvent doHandleSuspendEvent DebugEvent doHandleChangeEvent DebugEvent doHandleResumeEvent
see Abstract Debug Event Handler update For Debug Events Debug Event protected void update For Debug Events Debug Event events for int i 0 i events length i Debug Event event events i switch event get Kind case Debug Event TERMINATE do Handle Terminate Event event break  AbstractDebugEventHandler updateForDebugEvents DebugEvent updateForDebugEvents DebugEvent DebugEvent getKind DebugEvent doHandleTerminateEvent
Clear cached variable expansion state protected void do Handle Resume Event Debug Event event if event is Step Start event is Evaluation clear variable expansion state get Variables View clear Expanded Variables event get Source  doHandleResumeEvent DebugEvent isStepStart isEvaluation getVariablesView clearExpandedVariables getSource
Clear any cached variable expansion state for the terminated thread target Also remove the part listener if there are no more active debug targets protected void do Handle Terminate Event Debug Event event get Variables View clear Expanded Variables event get Source  doHandleTerminateEvent DebugEvent getVariablesView clearExpandedVariables getSource
Process a SUSPEND event protected void do Handle Suspend Event Debug Event event if event get Detail Debug Event EVALUATION IMPLICIT Don t refresh everytime an implicit evaluation finishes if event get Source instanceof I Suspend Resume if I Suspend Resume event get Source is Suspended no longer suspended return refresh get Variables View populate Detail Pane  doHandleSuspendEvent DebugEvent getDetail DebugEvent EVALUATION_IMPLICIT getSource ISuspendResume ISuspendResume getSource isSuspended getVariablesView populateDetailPane
Process a CHANGE event protected void do Handle Change Event Debug Event event if event get Detail Debug Event STATE only process variable state changes if event get Source instanceof I Variable refresh event get Source else if event get Source instanceof I Expression refresh  doHandleChangeEvent DebugEvent getDetail DebugEvent getSource IVariable getSource getSource IExpression
Returns the view that event handler updates protected Variables View get Variables View return Variables View get View  VariablesView getVariablesView VariablesView getView
Also update the details area see org eclipse debug internal ui views Abstract Debug Event Handler view Becomes Visible protected void view Becomes Visible super view Becomes Visible get Variables View populate Detail Pane  AbstractDebugEventHandler viewBecomesVisible viewBecomesVisible viewBecomesVisible getVariablesView populateDetailPane

Resource Bundle get Bundle BUNDLE NAME private Variables View Messages  ResourceBundle getBundle BUNDLE_NAME VariablesViewMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

private I Action f Action public Variable View Toggle Action super  IAction fAction VariableViewToggleAction
public void init I View Part view f View view boolean checked get Preference Value view f Action set Checked checked run f Action  IViewPart fView getPreferenceValue fAction setChecked fAction
see org eclipse ui I Action Delegate2 init org eclipse jface action I Action public void init I Action action f Action action  IActionDelegate2 IAction IAction fAction
see org eclipse ui I Action Delegate2 dispose public void dispose  IActionDelegate2
see org eclipse ui I Action Delegate2 run With Event org eclipse jface action I Action org eclipse swt widgets Event public void run With Event I Action action Event event run action  IActionDelegate2 runWithEvent IAction runWithEvent IAction
public void run I Action action I Preference Store store get Preference Store String key get View get Site get Id get Preference Key NON NLS 1 store set Value key action is Checked DebugUI Plugin get Default save Plugin Preferences  IAction IPreferenceStore getPreferenceStore getView getSite getId getPreferenceKey setValue isChecked DebugUIPlugin getDefault savePluginPreferences
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection
protected I Preference Store get Preference Store return DebugUI Plugin get Default get Preference Store  IPreferenceStore getPreferenceStore DebugUIPlugin getDefault getPreferenceStore
Returns the value of this filters preference on off for the given view param part return boolean protected boolean get Preference Value I View Part part String base Key get Preference Key String view Key part get Site get Id String composite Key view Key base Key NON NLS 1 I Preference Store store get Preference Store boolean value false if store contains composite Key value store get Boolean composite Key else value store get Boolean base Key return value  getPreferenceValue IViewPart baseKey getPreferenceKey viewKey getSite getId compositeKey viewKey baseKey IPreferenceStore getPreferenceStore compositeKey getBoolean compositeKey getBoolean baseKey
Returns the key for this action s preference return String 
protected abstract String get Preference Key protected I View Part get View return f View  getPreferenceKey IViewPart getView fView
protected Structured Viewer get Structured Viewer I Debug View view I Debug View get View get Adapter I Debug View class if view null Viewer viewer view get Viewer if viewer instanceof Structured Viewer return Structured Viewer viewer return null  StructuredViewer getStructuredViewer IDebugView IDebugView getView getAdapter IDebugView getViewer StructuredViewer StructuredViewer

Constructs a memento for the given viewer public Viewer State Tree Viewer viewer super viewer  ViewerState TreeViewer
see org eclipse debug internal ui views Abstract Viewer State encode Element org eclipse swt widgets Tree Item protected I Path encode Element Tree Item item throws Debug Exception I Variable variable I Variable item get Data I Path path new Path variable get Name Tree Item parent item get Parent Item while parent null variable I Variable parent get Data path new Path variable get Name append path parent parent get Parent Item return path  AbstractViewerState encodeElement TreeItem IPath encodeElement TreeItem DebugException IVariable IVariable getData IPath getName TreeItem getParentItem IVariable getData getName getParentItem
see org eclipse debug internal ui views Abstract Viewer State decode Path org eclipse core runtime I Path org eclipse jface viewers Tree Viewer protected Object decode Path I Path path Tree Viewer viewer throws Debug Exception I Tree Content Provider content Provider I Tree Content Provider viewer get Content Provider String names path segments Object parent viewer get Input I Variable variable null for int i 0 i names length i variable null Object children content Provider get Children parent String name names i for int j 0 j children length j I Variable var I Variable children j if var get Name equals name variable var break if variable null return null else parent variable return variable  AbstractViewerState decodePath IPath TreeViewer decodePath IPath TreeViewer DebugException ITreeContentProvider contentProvider ITreeContentProvider getContentProvider getInput IVariable contentProvider getChildren IVariable IVariable getName

DebugUI Plugin get Standard Display sync Exec new Runnable public void run String title DebugUI Messages get String Working Directory Status Handler Eclipse Runtime 1 NON NLS 1 String message DebugUI Messages get String Working Directory Status Handler Eclipse is not able to set the working directory specified by the program being launched as the current runtime does not support working directories  nContinue launch without setting the working directory  2 NON NLS 1 result 0 Message Dialog open Question DebugUI Plugin get Shell title message  DebugUIPlugin getStandardDisplay syncExec DebugUIMessages getString WorkingDirectoryStatusHandler Eclipse_Runtime_1 DebugUIMessages getString WorkingDirectoryStatusHandler Eclipse_is_not_able_to_set_the_working_directory_specified_by_the_program_being_launched_as_the_current_runtime_does_not_support_working_directories _nContinue_launch_without_setting_the_working_directory__2 MessageDialog openQuestion DebugUIPlugin getShell
see I Status Handler handle Status I Status Object public Object handle Status I Status status Object source final boolean result new boolean 1 DebugUI Plugin get Standard Display sync Exec new Runnable public void run String title DebugUI Messages get String Working Directory Status Handler Eclipse Runtime 1 NON NLS 1 String message DebugUI Messages get String Working Directory Status Handler Eclipse is not able to set the working directory specified by the program being launched as the current runtime does not support working directories  nContinue launch without setting the working directory  2 NON NLS 1 result 0 Message Dialog open Question DebugUI Plugin get Shell title message return new Boolean result 0  IStatusHandler handleStatus IStatus handleStatus IStatus DebugUIPlugin getStandardDisplay syncExec DebugUIMessages getString WorkingDirectoryStatusHandler Eclipse_Runtime_1 DebugUIMessages getString WorkingDirectoryStatusHandler Eclipse_is_not_able_to_set_the_working_directory_specified_by_the_program_being_launched_as_the_current_runtime_does_not_support_working_directories _nContinue_launch_without_setting_the_working_directory__2 MessageDialog openQuestion DebugUIPlugin getShell

private class Debug View Part Listener implements I Part Listener2 see org eclipse ui I Part Listener2 part Visible I Workbench Part Reference public void part Visible I Workbench Part Reference ref I Workbench Part part ref get Part false if part Abstract Debug View this f Is Visible true becomes Visible  DebugViewPartListener IPartListener2 IPartListener2 partVisible IWorkbenchPartReference partVisible IWorkbenchPartReference IWorkbenchPart getPart AbstractDebugView fIsVisible becomesVisible
see org eclipse ui I Part Listener2 part Hidden I Workbench Part Reference public void part Hidden I Workbench Part Reference ref I Workbench Part part ref get Part false if part Abstract Debug View this f Is Visible false becomes Hidden  IPartListener2 partHidden IWorkbenchPartReference partHidden IWorkbenchPartReference IWorkbenchPart getPart AbstractDebugView fIsVisible becomesHidden
see org eclipse ui I Part Listener2 part Activated I Workbench Part Reference public void part Activated I Workbench Part Reference ref  IPartListener2 partActivated IWorkbenchPartReference partActivated IWorkbenchPartReference
see org eclipse ui I Part Listener2 part Brought To Top I Workbench Part Reference public void part Brought To Top I Workbench Part Reference ref  IPartListener2 partBroughtToTop IWorkbenchPartReference partBroughtToTop IWorkbenchPartReference
see org eclipse ui I Part Listener2 part Closed I Workbench Part Reference public void part Closed I Workbench Part Reference ref  IPartListener2 partClosed IWorkbenchPartReference partClosed IWorkbenchPartReference
see org eclipse ui I Part Listener2 part Deactivated I Workbench Part Reference public void part Deactivated I Workbench Part Reference ref  IPartListener2 partDeactivated IWorkbenchPartReference partDeactivated IWorkbenchPartReference
see org eclipse ui I Part Listener2 part Opened I Workbench Part Reference public void part Opened I Workbench Part Reference ref  IPartListener2 partOpened IWorkbenchPartReference partOpened IWorkbenchPartReference
see org eclipse ui I Part Listener2 part Input Changed I Workbench Part Reference public void part Input Changed I Workbench Part Reference ref  IPartListener2 partInputChanged IWorkbenchPartReference partInputChanged IWorkbenchPartReference
Constructs a new debug view public Abstract Debug View f Action Map new Hash Map 5 f Updateables new Array List 3  AbstractDebugView fActionMap HashMap fUpdateables ArrayList
Debug views implement the debug view adapter which provides access to a view s underlying viewer and debug model presentation for a specific debug model see org eclipse core runtime I Adaptable get Adapter java lang Class see I Debug View public Object get Adapter Class adapter if adapter I Debug View class return this if adapter I Debug Model Presentation class Structured Viewer viewer get Structured Viewer if viewer null I Base Label Provider label Provider viewer get Label Provider if label Provider instanceof I Debug Model Presentation return I Debug Model Presentation label Provider return super get Adapter adapter  IAdaptable getAdapter IDebugView getAdapter IDebugView IDebugModelPresentation StructuredViewer getStructuredViewer IBaseLabelProvider labelProvider getLabelProvider labelProvider IDebugModelPresentation IDebugModelPresentation labelProvider getAdapter
class Viewer Page extends Page see I Page create Control Composite public void create Control Composite parent Viewer viewer create Viewer parent set Viewer viewer  ViewerPage IPage createControl createControl createViewer setViewer
see I Page get Control public Control get Control return get Default Control  IPage getControl getControl getDefaultControl
see I Page set Focus public void set Focus Viewer viewer get Viewer if viewer null Control c viewer get Control if c is Focus Control c set Focus  IPage setFocus setFocus getViewer getControl isFocusControl setFocus
if viewer null get Viewer get Control add Key Listener new Key Adapter public void key Pressed Key Event e handle Key Pressed e  getViewer getControl addKeyListener KeyAdapter keyPressed KeyEvent handleKeyPressed
Creates this view s underlying viewer and actions Hooks a pop up menu to the underlying viewer s control as well as a key listener When the delete key is pressed the code REMOVE ACTION code is invoked Hooks help to this view Subclasses must implement the following methods which are called in the following order when a view is created ul li code create Viewer Composite code the context menu is hooked to the viewer s control li li code create Actions code li li code configure Tool Bar I Tool Bar Manager code li li code get Help Context Id code li ul see I Workbench Part create Part Control Composite see Abstract Debug View create Part Control Composite see Abstract Debug View create Actions see Abstract Debug View configure Tool Bar I Tool Bar Manager see Abstract Debug View get Help Context Id see Abstract Debug View fill Context Menu I Menu Manager public void create Part Control Composite parent register Part Listener super create Part Control parent create Actions initialize Tool Bar Viewer viewer get Viewer if viewer null create Context Menu viewer get Control String help Id get Help Context Id if help Id null Workbench Help set Help parent help Id if viewer null get Viewer get Control add Key Listener new Key Adapter public void key Pressed Key Event e handle Key Pressed e if get Viewer instanceof Structured Viewer Structured Viewer get Viewer add Double Click Listener this create the message page set Message Page new Message Page get Message Page create Control get Page Book init Page get Message Page if f Early Message null bug 28127 show Message f Early Message f Early Message null  REMOVE_ACTION createViewer createActions configureToolBar IToolBarManager getHelpContextId IWorkbenchPart createPartControl AbstractDebugView createPartControl AbstractDebugView createActions AbstractDebugView configureToolBar IToolBarManager AbstractDebugView getHelpContextId AbstractDebugView fillContextMenu IMenuManager createPartControl registerPartListener createPartControl createActions initializeToolBar getViewer createContextMenu getControl helpId getHelpContextId helpId WorkbenchHelp setHelp helpId getViewer getControl addKeyListener KeyAdapter keyPressed KeyEvent handleKeyPressed getViewer StructuredViewer StructuredViewer getViewer addDoubleClickListener setMessagePage MessagePage getMessagePage createControl getPageBook initPage getMessagePage fEarlyMessage showMessage fEarlyMessage fEarlyMessage
The default page for a debug view is its viewer see Page Book View create Default Page Page Book protected I Page create Default Page Page Book book Viewer Page page new Viewer Page page create Control book init Page page return page  PageBookView createDefaultPage PageBook IPage createDefaultPage PageBook ViewerPage ViewerPage createControl initPage
Creates and returns this view s underlying viewer The viewer s control will automatically be hooked to display a pop up menu that other plug ins may contribute to Subclasses must override this method param parent the parent control 
Creates this view s actions Subclasses must override this method which is called after code create Viewer Composite code  createViewer
Returns this view s help context id which is hooked to this view on creation return help context id 
see I Workbench Part dispose public void dispose save All Checked Action States deregister Part Listener if get Viewer instanceof Structured Viewer Structured Viewer get Viewer remove Double Click Listener this set Viewer null f Action Map clear super dispose  IWorkbenchPart saveAllCheckedActionStates deregisterPartListener getViewer StructuredViewer StructuredViewer getViewer removeDoubleClickListener setViewer fActionMap
Saves the checked state for all actions contributed to the toolbar manager that function as a toggleable action The states are saved in the Debug UI plugin s preference store since 2 1 protected void save All Checked Action States I Tool Bar Manager tbm get View Site get Action Bars get Tool Bar Manager I Contribution Item items tbm get Items for int i 0 i items length i I Contribution Item i Contribution Item items i if i Contribution Item instanceof Action Contribution Item Action Contribution Item item Action Contribution Item i Contribution Item I Action action item get Action if action get Style I Action AS CHECK BOX action is Enabled save Checked Action State action  saveAllCheckedActionStates IToolBarManager getViewSite getActionBars getToolBarManager IContributionItem getItems IContributionItem iContributionItem iContributionItem ActionContributionItem ActionContributionItem ActionContributionItem iContributionItem IAction getAction getStyle IAction AS_CHECK_BOX isEnabled saveCheckedActionState
Save the checked state of the specified action in the Debug UI plugin s preference store The specified action is expected to be enabled and support the style code I Action AS CHECK BOX code param action the enabled toggleable action whose checked state will be saved in preferences since 2 1 protected void save Checked Action State I Action action String pref Key generate Preference Key action I Preference Store pref Store get Preference Store pref Store set Value pref Key action is Checked  IAction AS_CHECK_BOX saveCheckedActionState IAction prefKey generatePreferenceKey IPreferenceStore prefStore getPreferenceStore prefStore setValue prefKey isChecked
Generate a String that can be used as a key into a preference store based on the specified action The resulting String will be unique across views return a String suitable for use as a preference store key for the given action since 2 1 protected String generate Preference Key I Action action return get View Site get Id action get Id  generatePreferenceKey IAction getViewSite getId getId
Convenience method to return the preference store for the Debug UI plugin return the preference store for the Debug UI plugin since 2 1 protected I Preference Store get Preference Store return DebugUI Plugin get Default get Preference Store  IPreferenceStore getPreferenceStore DebugUIPlugin getDefault getPreferenceStore
see I Debug View get Viewer public Viewer get Viewer return f Viewer  IDebugView getViewer getViewer fViewer
Returns this view s viewer as a structured viewer or code null code if none return this view s viewer as a structured viewer or code null code protected Structured Viewer get Structured Viewer if get Viewer instanceof Structured Viewer return Structured Viewer get Viewer return null  StructuredViewer getStructuredViewer getViewer StructuredViewer StructuredViewer getViewer
Returns this view s viewer as a text viewer or code null code if none return this view s viewer as a text viewer or code null code protected Text Viewer get Text Viewer if get Viewer instanceof Text Viewer return Text Viewer get Viewer return null  TextViewer getTextViewer getViewer TextViewer TextViewer getViewer
see I Debug View get Presentation String public I Debug Model Presentation get Presentation String id if get Viewer instanceof Structured Viewer I Base Label Provider lp Structured Viewer get Viewer get Label Provider if lp instanceof Delegating Model Presentation return Delegating Model Presentation lp get Presentation id if lp instanceof Lazy Model Presentation if Lazy Model Presentation lp get Debug Model Identifier equals id return I Debug Model Presentation lp return null  IDebugView getPresentation IDebugModelPresentation getPresentation getViewer StructuredViewer IBaseLabelProvider StructuredViewer getViewer getLabelProvider DelegatingModelPresentation DelegatingModelPresentation getPresentation LazyModelPresentation LazyModelPresentation getDebugModelIdentifier IDebugModelPresentation
menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr fill Context Menu mgr  menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu
Creates a pop up menu on the given control The menu is registered with this view s site such that other plug ins may contribute to the menu Subclasses should call this method specifying the menu control as the control used in their viewer for example tree viewer Subclasses must implement the method code fill Context Menu I Menu Manager code which will be called each time the context menu is realized param menu Control the control with which the pop up menu will be associated with protected void create Context Menu Control menu Control Menu Manager menu Mgr new Menu Manager Pop Up NON NLS 1 menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr fill Context Menu mgr Menu menu menu Mgr create Context Menu menu Control menu Control set Menu menu register the context menu such that other plugins may contribute to it if get Site null get Site register Context Menu menu Mgr get Viewer add Context Menu Manager menu Mgr  fillContextMenu IMenuManager menuControl createContextMenu menuControl MenuManager menuMgr MenuManager PopUp menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu menuMgr createContextMenu menuControl menuControl setMenu getSite getSite registerContextMenu menuMgr getViewer addContextMenuManager menuMgr
see I Debug View get Context Menu Manager deprecated see Abstract Debug View get Context Menu Managers public I Menu Manager get Context Menu Manager if f Context Menu Managers null f Context Menu Managers get f Context Menu Managers size 1 return null  IDebugView getContextMenuManager AbstractDebugView getContextMenuManagers IMenuManager getContextMenuManager fContextMenuManagers fContextMenuManagers fContextMenuManagers
Returns the context menu managers relevant to this view return the context menu managers relevant to this view since 2 1 public List get Context Menu Managers return f Context Menu Managers  getContextMenuManagers fContextMenuManagers
Subclasses must override this method to fill the context menu each time it is realized param menu the context menu 
Runnable r new Runnable public void run if is Available return I Contribution Item items tbm get Items if items null for int i 0 i items length i if items i instanceof Action Contribution Item I Action action Action Contribution Item items i get Action if action get Style I Action AS CHECK BOX init Action State action if action is Checked action run set Memento null update Objects  isAvailable IContributionItem getItems ActionContributionItem IAction ActionContributionItem getAction getStyle IAction AS_CHECK_BOX initActionState isChecked setMemento updateObjects
Configures this view s toolbar Subclasses implement code configure Tool Bar I Tool Bar Manager code to contribute actions to the toolbar p To properly initialize toggle actions that are contributed to this view state is restored for toggle actions that have a persisted state in the Debug UI plugin s preferences As well any toggle actions that have an initial state of checked are invoked The actions states are restored and the actions are invoked in a runnable after the view is created p protected void initialize Tool Bar final I Tool Bar Manager tbm get View Site get Action Bars get Tool Bar Manager configure Tool Bar tbm get View Site get Action Bars update Action Bars This is done in a runnable to be run after this view s pane is created Runnable r new Runnable public void run if is Available return I Contribution Item items tbm get Items if items null for int i 0 i items length i if items i instanceof Action Contribution Item I Action action Action Contribution Item items i get Action if action get Style I Action AS CHECK BOX init Action State action if action is Checked action run set Memento null update Objects async Exec r  configureToolBar IToolBarManager initializeToolBar IToolBarManager getViewSite getActionBars getToolBarManager configureToolBar getViewSite getActionBars updateActionBars isAvailable IContributionItem getItems ActionContributionItem IAction ActionContributionItem getAction getStyle IAction AS_CHECK_BOX initActionState isChecked setMemento updateObjects asyncExec
Restores the persisted checked state of the specified action that was stored in preferences If the action is disabled its persisted state is not restored because a disabled action cannot be run param action the action whose checked state will be restored since 2 1 protected void init Action State I Action action String id action get Id if id null action is Enabled String pref Key generate Preference Key action boolean checked get Preference Store get Boolean pref Key action set Checked checked  initActionState IAction getId isEnabled prefKey generatePreferenceKey getPreferenceStore getBoolean prefKey setChecked
see I View Part init I View Site I Memento public void init I View Site site I Memento memento throws Part Init Exception super init site memento store the memento to be used when this view is created set Memento memento  IViewPart IViewSite IMemento IViewSite IMemento PartInitException setMemento
Sets the viewer for this view param viewer viewer private void set Viewer Viewer viewer f Viewer viewer  setViewer fViewer
Subclasses implement this menu to contribute actions to the toolbar This method is called after code create Actions code param tbm the tool bar manager for this view s site see create Viewer Composite  createActions createViewer
see I Debug View set Action String I Action public void set Action String actionID I Action action if action null Object removed Action f Action Map remove actionID f Updateables remove removed Action else f Action Map put actionID action if action instanceof I Update f Updateables add action if actionID equals SELECT ALL ACTION I Action Bars action Bars get View Site get Action Bars action Bars set Global Action Handler actionID action else if actionID equals COPY ACTION I Action Bars action Bars get View Site get Action Bars action Bars set Global Action Handler actionID action else if actionID equals CUT ACTION I Action Bars action Bars get View Site get Action Bars action Bars set Global Action Handler actionID action else if actionID equals PASTE ACTION I Action Bars action Bars get View Site get Action Bars action Bars set Global Action Handler actionID action else if actionID equals FIND ACTION I Action Bars action Bars get View Site get Action Bars action Bars set Global Action Handler actionID action  IDebugView setAction IAction setAction IAction removedAction fActionMap fUpdateables removedAction fActionMap IUpdate fUpdateables SELECT_ALL_ACTION IActionBars actionBars getViewSite getActionBars actionBars setGlobalActionHandler COPY_ACTION IActionBars actionBars getViewSite getActionBars actionBars setGlobalActionHandler CUT_ACTION IActionBars actionBars getViewSite getActionBars actionBars setGlobalActionHandler PASTE_ACTION IActionBars actionBars getViewSite getActionBars actionBars setGlobalActionHandler FIND_ACTION IActionBars actionBars getViewSite getActionBars actionBars setGlobalActionHandler
see I Debug View get Action String public I Action get Action String actionID return I Action f Action Map get actionID  IDebugView getAction IAction getAction IAction fActionMap
Updates all the registered updatables public void update Objects Iterator actions f Updateables iterator while actions has Next I Update actions next update  updateObjects fUpdateables hasNext IUpdate
Handles key events in viewer Invokes ol li code REMOVE ACTION code when the delete key is pressed li protected void handle Key Pressed Key Event event if event character SWT DEL event state Mask 0 I Action action get Action REMOVE ACTION if action null action is Enabled action run  REMOVE_ACTION handleKeyPressed KeyEvent stateMask IAction getAction REMOVE_ACTION isEnabled
Delegate to the code DOUBLE CLICK ACTION code if any see I Double Click Listener double Click Double Click Event public void double Click Double Click Event event I Action action get Action DOUBLE CLICK ACTION if action null event get Selection is Empty action is Enabled action run  DOUBLE_CLICK_ACTION IDoubleClickListener doubleClick DoubleClickEvent doubleClick DoubleClickEvent IAction getAction DOUBLE_CLICK_ACTION getSelection isEmpty isEnabled
Registers the given runnable with the display associated with this view s control if any see org eclipse swt widgets Display async Exec java lang Runnable public void async Exec Runnable r if is Available get Control get Display async Exec r  asyncExec asyncExec isAvailable getControl getDisplay asyncExec
Returns the control for this view or code null code if none return the control for this view or code null code if none since 3 0 protected Control get Control return get Viewer get Control  getControl getViewer getControl
Registers the given runnable with the display associated with this view s control if any see org eclipse swt widgets Display sync Exec java lang Runnable public void sync Exec Runnable r if is Available get Control get Display sync Exec r  syncExec syncExec isAvailable getControl getDisplay syncExec
Returns the memento that contains the persisted state of the view May be code null code protected I Memento get Memento return f Memento  IMemento getMemento fMemento
Sets the memento that contains the persisted state of the view protected void set Memento I Memento memento f Memento memento  setMemento IMemento fMemento
Returns the specified view in this view s page or code null code if none param id view identifier return view part protected I View Part find View String id I Workbench Page page get Site get Page I View Part view null if page null view page find View id return view  IViewPart findView IWorkbenchPage getSite getPage IViewPart findView
see Page Book View is Important I Workbench Part protected boolean is Important I Workbench Part part return false  PageBookView isImportant IWorkbenchPart isImportant IWorkbenchPart
see Page Book View do Create Page I Workbench Part protected Page Rec do Create Page I Workbench Part part return null  PageBookView doCreatePage IWorkbenchPart PageRec doCreatePage IWorkbenchPart
see Page Book View do Destroy Page org eclipse ui I Workbench Part org eclipse ui part Page Book View Page Rec protected void do Destroy Page I Workbench Part part Page Rec page Record  PageBookView doDestroyPage IWorkbenchPart PageBookView PageRec doDestroyPage IWorkbenchPart PageRec pageRecord
see Page Book View get Bootstrap Part protected I Workbench Part get Bootstrap Part return null  PageBookView getBootstrapPart IWorkbenchPart getBootstrapPart
Returns the default control for this view By default this view s viewer s control is returned Subclasses should override if required for example if this view has its viewer nested inside other controls return this view s default control protected Control get Default Control Viewer viewer get Viewer if viewer null return viewer get Control return null  getDefaultControl getViewer getControl
Sets this view s message page param page message page private void set Message Page Message Page page f Message Page page  setMessagePage MessagePage fMessagePage
Returns this view s message page return message page protected Message Page get Message Page return f Message Page  MessagePage getMessagePage fMessagePage
Shows the given message in this view s message page Makes the message page the visible page param message the message to display public void show Message String message if get Page Book is Disposed return if get Message Page null not fully created yet f Early Message message return get Message Page set Message message get Page Book show Page get Message Page get Control  showMessage getPageBook isDisposed getMessagePage fEarlyMessage getMessagePage setMessage getPageBook showPage getMessagePage getControl
Shows this view s viewer page public void show Viewer if get Page Book is Disposed return get Page Book show Page get Default Page get Control  showViewer getPageBook isDisposed getPageBook showPage getDefaultPage getControl
Returns whether this view s viewer is currently available return whether this view s viewer is currently available public boolean is Available return get Viewer null get Viewer get Control null get Viewer get Control is Disposed  isAvailable getViewer getViewer getControl getViewer getControl isDisposed
see I Debug View add I Update public void add I Update updatable if f Updateables contains updatable f Updateables add updatable  IDebugView IUpdate IUpdate fUpdateables fUpdateables
see I Debug View remove I Update public void remove I Update updatable f Updateables remove updatable  IDebugView IUpdate IUpdate fUpdateables
Adds a context menu manager that is relevant to this view param context Menu Manager The context Menu Manager to add since 2 1 public void add Context Menu Manager I Menu Manager context Menu Manager if f Context Menu Managers null f Context Menu Managers new Array List f Context Menu Managers add context Menu Manager  contextMenuManager contextMenuManager addContextMenuManager IMenuManager contextMenuManager fContextMenuManagers fContextMenuManagers ArrayList fContextMenuManagers contextMenuManager
Notification this view is now visible since 2 1 protected void becomes Visible  becomesVisible
Notification this view is now hidden since 2 1 protected void becomes Hidden  becomesHidden
Returns whether this view is currently visible return whether this view is currently visbile since 2 1 public boolean is Visible return f Is Visible  isVisible fIsVisible
Creates and registers a part listener with this event handler s page if one does not already exist since 2 1 protected void register Part Listener if f Part Listener null f Part Listener new Debug View Part Listener get Site get Page add Part Listener f Part Listener  registerPartListener fPartListener fPartListener DebugViewPartListener getSite getPage addPartListener fPartListener
Deregisters and disposes this event handler s part listener since 2 1 protected void deregister Part Listener if f Part Listener null get Site get Page remove Part Listener f Part Listener f Part Listener null  deregisterPartListener fPartListener getSite getPage removePartListener fPartListener fPartListener
Returns a map of the current attribute settings in the model presentation in this view associated with the given debug model return a map of the current attribute settings in the model presentation in this view associated with the given debug model since 3 0 public Map get Presentation Attributes String model Id I Debug Model Presentation presentation get Presentation model Id if presentation instanceof Delegating Model Presentation return Delegating Model Presentation presentation get Attribute Map else if presentation instanceof Lazy Model Presentation return Lazy Model Presentation presentation get Attribute Map return new Hash Map  getPresentationAttributes modelId IDebugModelPresentation getPresentation modelId DelegatingModelPresentation DelegatingModelPresentation getAttributeMap LazyModelPresentation LazyModelPresentation getAttributeMap HashMap

Returns the dialog this tab is contained in or code null code if not yet set return launch configuration dialog or code null code protected I Launch Configuration Dialog get Launch Configuration Dialog return f Launch Configuration Dialog  ILaunchConfigurationDialog getLaunchConfigurationDialog fLaunchConfigurationDialog
Updates the buttons and message in this page s launch configuration dialog protected void update Launch Configuration Dialog if get Launch Configuration Dialog null order is important here due to the call to refresh the tab viewer in update Buttons which ensures that the messages are up to date get Launch Configuration Dialog update Buttons get Launch Configuration Dialog update Message  updateLaunchConfigurationDialog getLaunchConfigurationDialog updateButtons getLaunchConfigurationDialog updateButtons getLaunchConfigurationDialog updateMessage
see I Launch Configuration Tab get Control public Control get Control return f Control  ILaunchConfigurationTab getControl getControl fControl
Sets the control to be displayed in this tab param control the control for this tab protected void set Control Control control f Control control  setControl fControl
see I Launch Configuration Tab get Error Message public String get Error Message return f Error Message  ILaunchConfigurationTab getErrorMessage getErrorMessage fErrorMessage
see I Launch Configuration Tab get Message public String get Message return f Message  ILaunchConfigurationTab getMessage getMessage fMessage
By default do nothing see I Launch Configuration Tab launched I Launch deprecated public void launched I Launch launch  ILaunchConfigurationTab ILaunch ILaunch
see I Launch Configuration Tab set Launch Configuration Dialog I Launch Configuration Dialog public void set Launch Configuration Dialog I Launch Configuration Dialog dialog f Launch Configuration Dialog dialog  ILaunchConfigurationTab setLaunchConfigurationDialog ILaunchConfigurationDialog setLaunchConfigurationDialog ILaunchConfigurationDialog fLaunchConfigurationDialog
Sets this page s error message possibly code null code param error Message the error message or code null code protected void set Error Message String error Message f Error Message error Message  errorMessage setErrorMessage errorMessage fErrorMessage errorMessage
Sets this page s message possibly code null code param message the message or code null code protected void set Message String message f Message message  setMessage fMessage
Convenience method to return the launch manager return the launch manager protected I Launch Manager get Launch Manager return Debug Plugin get Default get Launch Manager  ILaunchManager getLaunchManager DebugPlugin getDefault getLaunchManager
By default do nothing see I Launch Configuration Tab dispose public void dispose  ILaunchConfigurationTab
Returns the shell this tab is contained in or code null code return the shell this tab is contained in or code null code protected Shell get Shell Control control get Control if control null return control get Shell return null  getShell getControl getShell
Creates and returns a new push button with the given label and or image param parent parent control param label button label or code null code param image image of code null code return a new push button protected Button create Push Button Composite parent String label Image image return SWT Util create Push Button parent label image  createPushButton SWTUtil createPushButton
Creates and returns a new radio button with the given label and or image param parent parent control param label button label or code null code return a new radio button protected Button create Radio Button Composite parent String label return SWT Util create Radio Button parent label  createRadioButton SWTUtil createRadioButton
Creates and returns a new check button with the given label param parent the parent composite param label the button label return a new check button since 3 0 protected Button create Check Button Composite parent String label Button button new Button parent SWT CHECK button set Text label Grid Data data new Grid Data button set Layout Data data button set Font parent get Font SWT Util set Button Dimension Hint button return button  createCheckButton setText GridData GridData setLayoutData setFont getFont SWTUtil setButtonDimensionHint
see I Launch Configuration Tab can Save public boolean can Save return true  ILaunchConfigurationTab canSave canSave
see I Launch Configuration Tab is Valid I Launch Configuration public boolean is Valid I Launch Configuration launch Config return true  ILaunchConfigurationTab isValid ILaunchConfiguration isValid ILaunchConfiguration launchConfig
Create some empty space protected void create Vertical Spacer Composite comp int col Span Label label new Label comp SWT NONE Grid Data gd new Grid Data gd horizontal Span col Span label set Layout Data gd label set Font comp get Font  createVerticalSpacer colSpan GridData GridData horizontalSpan colSpan setLayoutData setFont getFont
Create a horizontal separator param comp parent widget param col Span number of columns to span since 3 0 protected void create Separator Composite comp int col Span Label label new Label comp SWT SEPARATOR SWT HORIZONTAL Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span col Span label set Layout Data gd  colSpan createSeparator colSpan GridData GridData GridData FILL_HORIZONTAL horizontalSpan colSpan setLayoutData
see I Launch Configuration Tab get Image public Image get Image return null  ILaunchConfigurationTab getImage getImage
Convenience method to set a boolean attribute of on a launch configuration If the value being set is the default the attribute s value is set to code null code param attribute attribute identifier param configuration the configuration on which to set the attribute param value the value of the attribute param default Value the default value of the attribute since 2 1 protected void set Attribute String attribute I Launch Configuration Working Copy configuration boolean value boolean default Value if value default Value configuration set Attribute attribute String null else configuration set Attribute attribute value  defaultValue setAttribute ILaunchConfigurationWorkingCopy defaultValue defaultValue setAttribute setAttribute
Returns whether this tab is dirty It is up to clients to set reset and consult this attribute as required By default a tab is initialized to dirty return whether this tab is dirty since 2 1 protected boolean is Dirty return f Dirty  isDirty fDirty
Returns whether this tab is dirty It is up to clients to set reset and consult this attribute as required By default a tab is initialized to dirty param dirty whether this tab is dirty since 2 1 protected void set Dirty boolean dirty f Dirty dirty  setDirty fDirty
This method was added to the code I Launch Configuration Tab code interface in the 3 0 release to allow tabs to distinguish between a tab being activated and a tab group be initialized for the first time from a selected launch configuration To maintain backwards compatible behavior the default implementation provided calls this tab s code initialize From code method Tabs should override this method as required p The launch tab framework was originially designed to take care of inter tab communication by applying attributes from the active tab to the launch configuration being edited when a tab is exited and by initializing a tab when activated The addition of the methods code activated code and code deactivated code allow tabs to determine the appropriate course of action p see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy since 3 0 public void activated I Launch Configuration Working Copy working Copy initialize From working Copy  ILaunchConfigurationTab initializeFrom ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy initializeFrom workingCopy
This method was added to the code I Launch Configuration Tab code interface in the 3 0 release to allow tabs to distinguish between a tab being deactivated and saving its attributes to a launch configuration To maintain backwards compatible behavior the default implementation provided calls this tab s code perform Apply code method Tabs should override this method as required p The launch tab framework was originially designed to take care of inter tab communication by applying attributes from the active tab to the launch configuration being edited when a tab is exited and by initializing a tab when activated The addition of the methods code activated code and code deactivated code allow tabs to determine the appropriate course of action p see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy since 3 0 public void deactivated I Launch Configuration Working Copy working Copy perform Apply working Copy  ILaunchConfigurationTab performApply ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy performApply workingCopy

see I Launch Configuration Tab Group get Tabs public I Launch Configuration Tab get Tabs return f Tabs  ILaunchConfigurationTabGroup getTabs ILaunchConfigurationTab getTabs fTabs
Sets the tabs in this group param tabs the tabs in this group protected void set Tabs I Launch Configuration Tab tabs f Tabs tabs  setTabs ILaunchConfigurationTab fTabs
By default dispose all the tabs in this group see I Launch Configuration Tab Group dispose public void dispose I Launch Configuration Tab tabs get Tabs if tabs null for int i 0 i tabs length i tabs i dispose  ILaunchConfigurationTabGroup ILaunchConfigurationTab getTabs
By default delegate to all of the tabs in this group see I Launch Configuration Tab Group set Defaults I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration I Launch Configuration Tab tabs get Tabs for int i 0 i tabs length i tabs i set Defaults configuration  ILaunchConfigurationTabGroup setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy ILaunchConfigurationTab getTabs setDefaults
By default delegate to all of the tabs in this group see I Launch Configuration Tab Group initialize From I Launch Configuration public void initialize From I Launch Configuration configuration I Launch Configuration Tab tabs get Tabs for int i 0 i tabs length i tabs i initialize From configuration  ILaunchConfigurationTabGroup initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration ILaunchConfigurationTab getTabs initializeFrom
By default delegate to all of the tabs in this group see I Launch Configuration Tab Group perform Apply I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy configuration I Launch Configuration Tab tabs get Tabs for int i 0 i tabs length i tabs i perform Apply configuration  ILaunchConfigurationTabGroup performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy ILaunchConfigurationTab getTabs performApply
By default delegate to all of the tabs in this group see I Launch Configuration Tab Group launched I Launch deprecated public void launched I Launch launch I Launch Configuration Tab tabs get Tabs for int i 0 i tabs length i tabs i launched launch  ILaunchConfigurationTabGroup ILaunch ILaunch ILaunchConfigurationTab getTabs

Constructs a launch history action param launch Group Identifier unique identifier of the launch group extension that this action displays a launch history for public Abstract Launch History Action String launch Group Identifier f Launch Group Identifier launch Group Identifier  launchGroupIdentifier AbstractLaunchHistoryAction launchGroupIdentifier fLaunchGroupIdentifier launchGroupIdentifier
Sets the action used to render this delegate param action the action used to render this delegate private void set Action I Action action f Action action  setAction IAction fAction
Returns the action used to render this delegate return the action used to render this delegate protected I Action get Action return f Action  IAction getAction fAction
Adds the given action to the specified menu with an accelerator specified by the given number param menu the menu to add the action to param action the action to add param accelerator the number that should appear as an accelerator protected void add To Menu Menu menu I Action action int accelerator String Buffer label new String Buffer if accelerator 0 accelerator 10 add the numerical accelerator label append label append accelerator label append label append action get Text action set Text label to String Action Contribution Item item new Action Contribution Item action item fill menu 1  addToMenu IAction StringBuffer StringBuffer getText setText toString ActionContributionItem ActionContributionItem
Initialize this action so that it can dynamically set its tooltip Also set the enabled state of the underlying action based on whether there are any registered launch configuration types that understand how to launch in the mode of this action private void initialize I Action action get Launch Configuration Manager add Launch History Listener this set Action action update Tooltip action set Enabled exists Config Types For Mode  IAction getLaunchConfigurationManager addLaunchHistoryListener setAction updateTooltip setEnabled existsConfigTypesForMode
Return whether there are any registered launch configuration types for the mode of this action return whether there are any registered launch configuration types for the mode of this action private boolean exists Config Types For Mode I Launch Configuration Type config Types Debug Plugin get Default get Launch Manager get Launch Configuration Types for int i 0 i config Types length i I Launch Configuration Type config Type config Types i if config Type supports Mode get Mode return true return false  existsConfigTypesForMode ILaunchConfigurationType configTypes DebugPlugin getDefault getLaunchManager getLaunchConfigurationTypes configTypes ILaunchConfigurationType configType configTypes configType supportsMode getMode
Updates this action s tooltip to correspond to the most recent launch protected void update Tooltip I Launch Configuration last Launched get Last Launch String tooltip null if last Launched null tooltip DebugUI Plugin remove Accelerators get Launch History get Launch Group get Label else tooltip get Tool Tip last Launched get Action set Tool Tip Text tooltip  updateTooltip ILaunchConfiguration lastLaunched getLastLaunch lastLaunched DebugUIPlugin removeAccelerators getLaunchHistory getLaunchGroup getLabel getToolTip lastLaunched getAction setToolTipText
protected String get Tool Tip I Launch Configuration last Launched String launch Name last Launched get Name String mode get Mode String label if mode equals I Launch Manager RUN MODE label Action Messages get String Abstract Launch History Action 1 NON NLS 1 else if mode equals I Launch Manager DEBUG MODE label Action Messages get String Abstract Launch History Action 2 NON NLS 1 else if mode equals I Launch Manager PROFILE MODE label Action Messages get String Abstract Launch History Action 3 NON NLS 1 else label Action Messages get String Abstract Launch History Action 4 NON NLS 1 return Message Format format Action Messages get String Abstract Launch History Action 0 new String label launch Name NON NLS 1  getToolTip ILaunchConfiguration lastLaunched launchName lastLaunched getName getMode ILaunchManager RUN_MODE ActionMessages getString AbstractLaunchHistoryAction ILaunchManager DEBUG_MODE ActionMessages getString AbstractLaunchHistoryAction ILaunchManager PROFILE_MODE ActionMessages getString AbstractLaunchHistoryAction ActionMessages getString AbstractLaunchHistoryAction MessageFormat ActionMessages getString AbstractLaunchHistoryAction launchName
see I Launch History Changed Listener launch History Changed public void launch History Changed f Recreate Menu true update Tooltip  ILaunchHistoryChangedListener launchHistoryChanged launchHistoryChanged fRecreateMenu updateTooltip
see org eclipse ui I Workbench Window Action Delegate dispose public void dispose set Menu null get Launch Configuration Manager remove Launch History Listener this  IWorkbenchWindowActionDelegate setMenu getLaunchConfigurationManager removeLaunchHistoryListener
Return the last launch in this action s launch history protected I Launch Configuration get Last Launch return get Launch Configuration Manager get Last Launch get Launch Group Identifier  ILaunchConfiguration getLastLaunch getLaunchConfigurationManager getLastLaunch getLaunchGroupIdentifier
see org eclipse ui I Workbench Window Pulldown Delegate get Menu org eclipse swt widgets Control public Menu get Menu Control parent set Menu new Menu parent fill Menu f Menu init Menu return f Menu  IWorkbenchWindowPulldownDelegate getMenu getMenu setMenu fillMenu fMenu initMenu fMenu
see org eclipse jface action I Menu Creator get Menu org eclipse swt widgets Menu public Menu get Menu Menu parent set Menu new Menu parent fill Menu f Menu init Menu return f Menu  IMenuCreator getMenu getMenu setMenu fillMenu fMenu initMenu fMenu
f Menu add Menu Listener new Menu Adapter public void menu Shown Menu Event e if f Recreate Menu Menu m Menu e widget Menu Item items m get Items for int i 0 i items length i items i dispose fill Menu m f Recreate Menu false  fMenu addMenuListener MenuAdapter menuShown MenuEvent fRecreateMenu MenuItem getItems fillMenu fRecreateMenu
Creates the menu for the action private void init Menu Add listener to repopulate the menu each time it is shown because of dynamic history list f Menu add Menu Listener new Menu Adapter public void menu Shown Menu Event e if f Recreate Menu Menu m Menu e widget Menu Item items m get Items for int i 0 i items length i items i dispose fill Menu m f Recreate Menu false  initMenu fMenu addMenuListener MenuAdapter menuShown MenuEvent fRecreateMenu MenuItem getItems fillMenu fRecreateMenu
Sets this action s drop down menu disposing the previous menu param menu the new menu private void set Menu Menu menu if f Menu null f Menu dispose f Menu menu  setMenu fMenu fMenu fMenu
Fills the drop down menu with favorites and launch history param menu the menu to fill protected void fill Menu Menu menu I Launch Configuration history List Launch Configuration Manager filter Configs get Launch History get History I Launch Configuration favorite List Launch Configuration Manager filter Configs get Launch History get Favorites Add favorites int accelerator 1 for int i 0 i favorite List length i I Launch Configuration launch favorite List i Launch Action action new Launch Action launch get Mode add To Menu menu action accelerator accelerator Separator between favorites and history if favorite List length 0 history List length 0 add Separator menu Add history launches next for int i 0 i history List length i I Launch Configuration launch history List i Launch Action action new Launch Action launch get Mode add To Menu menu action accelerator accelerator  fillMenu ILaunchConfiguration historyList LaunchConfigurationManager filterConfigs getLaunchHistory getHistory ILaunchConfiguration favoriteList LaunchConfigurationManager filterConfigs getLaunchHistory getFavorites favoriteList ILaunchConfiguration favoriteList LaunchAction LaunchAction getMode addToMenu favoriteList historyList addSeparator historyList ILaunchConfiguration historyList LaunchAction LaunchAction getMode addToMenu
Adds a separator to the given menu param menu protected void add Separator Menu menu new Menu Item menu SWT SEPARATOR  addSeparator MenuItem
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action do nothing this is just a menu  IActionDelegate IAction IAction
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection if f Action null initialize action  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection fAction
see org eclipse ui I Workbench Window Action Delegate init org eclipse ui I Workbench Window public void init I Workbench Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow
Returns the launch history associated with this action s launch group return the launch history associated with this action s launch group protected Launch History get Launch History return get Launch Configuration Manager get Launch History get Launch Group Identifier  LaunchHistory getLaunchHistory getLaunchConfigurationManager getLaunchHistory getLaunchGroupIdentifier
Returns the mode e g run or debug of this drop down return the mode of this action protected String get Mode return get Launch History get Launch Group get Mode  getMode getLaunchHistory getLaunchGroup getMode
Returns the launch configuration manager return launch configuration manager private Launch Configuration Manager get Launch Configuration Manager return DebugUI Plugin get Default get Launch Configuration Manager  LaunchConfigurationManager getLaunchConfigurationManager DebugUIPlugin getDefault getLaunchConfigurationManager
Returns the identifier of the launch group this action is associated with return the identifier of the launch group this action is associated with protected String get Launch Group Identifier return f Launch Group Identifier  getLaunchGroupIdentifier fLaunchGroupIdentifier

Constructs a launch toolbar action param launch Group Identifier unique identifier of the launch group extension that this action displays a launch history shortcuts and launch configuration dialog for public Abstract Launch Toolbar Action String launch Group Identifier super launch Group Identifier  launchGroupIdentifier AbstractLaunchToolbarAction launchGroupIdentifier launchGroupIdentifier
Fills the drop down menu with favorites and launch history launch shortcuts and an action to open the launch configuration dialog param menu the menu to fill protected void fill Menu Menu menu super fill Menu menu Separator between history and common actions if menu get Item Count 0 add Separator menu add To Menu menu new Launch As Action get Launch Group Identifier 1 add To Menu menu new Open Launch Dialog Action get Launch Group Identifier 1 add To Menu menu new Organize Favorites Action get Launch Group Identifier 1  fillMenu fillMenu getItemCount addSeparator addToMenu LaunchAsAction getLaunchGroupIdentifier addToMenu OpenLaunchDialogAction getLaunchGroupIdentifier addToMenu OrganizeFavoritesAction getLaunchGroupIdentifier
Launch the last launch or open the launch config dialog if none see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action I Launch Configuration configuration get Last Launch if configuration null DebugUI Tools open Launch Configuration Dialog On Group DebugUI Plugin get Shell new Structured Selection get Launch Group Identifier else DebugUI Tools launch configuration get Mode  IActionDelegate IAction IAction ILaunchConfiguration getLastLaunch DebugUITools openLaunchConfigurationDialogOnGroup DebugUIPlugin getShell StructuredSelection getLaunchGroupIdentifier DebugUITools getMode

Constructs a contextual launch action for the given launch mode param mode launch mode public Contextual Launch Action String mode f Mode mode I Launch Group groups DebugUI Tools get Launch Groups f Groups By Category new Hash Map 3 for int i 0 i groups length i I Launch Group group groups i if group get Mode equals mode if group get Category null f Group group else f Groups By Category put group get Category group  ContextualLaunchAction fMode ILaunchGroup DebugUITools getLaunchGroups fGroupsByCategory HashMap ILaunchGroup getMode getCategory fGroup fGroupsByCategory getCategory
see org eclipse ui I Object Action Delegate set Active Part org eclipse jface action I Action org eclipse ui I Workbench Part public void set Active Part I Action action I Workbench Part target Part We don t have a need for the active part  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart
see org eclipse jface action I Menu Creator dispose public void dispose nothing to do  IMenuCreator
see org eclipse jface action I Menu Creator get Menu org eclipse swt widgets Control public Menu get Menu Control parent never called return null  IMenuCreator getMenu getMenu
public Menu get Menu Menu parent Create the new menu The menu will get filled when it is about to be shown see fill Menu Menu Menu menu new Menu parent Add listener to repopulate the menu each time it is shown because Menu Manager update boolean boolean doesn t dispose pulldown Action Contribution items for each popup menu menu add Menu Listener new Menu Adapter public void menu Shown Menu Event e if f Fill Menu Menu m Menu e widget Menu Item items m get Items for int i 0 i items length i items i dispose fill Menu m f Fill Menu false return menu  getMenu fillMenu MenuManager ActionContribution addMenuListener MenuAdapter menuShown MenuEvent fFillMenu MenuItem getItems fillMenu fFillMenu
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action Never called because we become a menu  IActionDelegate IAction IAction
public void selection Changed I Action action I Selection selection if the selection is an I Resource save it and enable our action if selection instanceof I Structured Selection f Fill Menu true if action null if f Delegate Action action f Delegate Action action f Delegate Action set Menu Creator this save selection and enable our menu f Selection I Structured Selection selection action set Enabled true return action set Enabled false  selectionChanged IAction ISelection IResource IStructuredSelection fFillMenu fDelegateAction fDelegateAction fDelegateAction setMenuCreator fSelection IStructuredSelection setEnabled setEnabled
Fill pull down menu with the pages of the J Tabbed Pane private void fill Menu Menu menu lookup appropriate launch config types and build launch actions for them Retrieve the current perspective and the registered shortcuts String active PerspID get Active PerspectiveID if active PerspID null f Selection null return I Evaluation Context context create Context gather all shortcuts and run their filters so that we only run the filters one time for each shortcut Running filters can be expensive Also only LOADED plugins get their filters run List Launch Shortcut Extension all Short Cuts get Launch Configuration Manager get Launch Shortcuts Iterator iter all Short Cuts iterator List filtered Short Cuts new Array List 10 while iter has Next Launch Shortcut Extension ext Launch Shortcut Extension iter next try if Workbench Activity Helper filter Item ext is Applicable ext context filtered Short Cuts add ext catch Core Exception e not supported iter filtered Short Cuts iterator int accelerator 1 String category null while iter has Next Launch Shortcut Extension ext Launch Shortcut Extension iter next Set modes ext get Modes supported launch modes Iterator mode Iter modes iterator while mode Iter has Next String mode String mode Iter next if mode equals f Mode category ext get Category populate Menu Item mode ext menu accelerator if accelerator 1 new Menu Item menu SWT SEPARATOR I Launch Group group f Group if category null group I Launch Group f Groups By Category get category I Action action new Open Launch Dialog Action group get Identifier Action Contribution Item item new Action Contribution Item action item fill menu 1  JTabbedPane fillMenu activePerspID getActivePerspectiveID activePerspID fSelection IEvaluationContext createContext LaunchShortcutExtension allShortCuts getLaunchConfigurationManager getLaunchShortcuts allShortCuts filteredShortCuts ArrayList hasNext LaunchShortcutExtension LaunchShortcutExtension WorkbenchActivityHelper filterItem isApplicable filteredShortCuts CoreException filteredShortCuts hasNext LaunchShortcutExtension LaunchShortcutExtension getModes modeIter modeIter hasNext modeIter fMode getCategory populateMenuItem MenuItem ILaunchGroup fGroup ILaunchGroup fGroupsByCategory IAction OpenLaunchDialogAction getIdentifier ActionContributionItem ActionContributionItem
return an Evaluation context with default variable selection private I Evaluation Context create Context create a default evaluation context with default variable of the user selection List selection get Selected Elements I Evaluation Context context new Evaluation Context null selection context add Variable selection selection NON NLS 1 return context  IEvaluationContext createContext getSelectedElements IEvaluationContext EvaluationContext addVariable
return current selection as a List private List get Selected Elements Array List result new Array List Iterator iter f Selection iterator while iter has Next result add iter next return result  getSelectedElements ArrayList ArrayList fSelection hasNext
Evaluate the enablement logic in the contextual Launch element description A true result means that we should include this shortcut in the context menu return true iff shortcut should appear in context menu private boolean is Applicable Launch Shortcut Extension ext I Evaluation Context context throws Core Exception Expression expr ext get Contextual Launch Enablement Expression return ext eval Enablement Expression context expr  contextualLaunch isApplicable LaunchShortcutExtension IEvaluationContext CoreException getContextualLaunchEnablementExpression evalEnablementExpression
Add the shortcut to the context menu s launch submenu private void populate Menu Item String mode Launch Shortcut Extension ext Menu menu int accelerator Launch Shortcut Action action new Launch Shortcut Action mode ext action set Action Definition Id ext get Id String help Context Id ext get Help Context Id if help Context Id null Workbench Help set Help action help Context Id String Buffer label new String Buffer if accelerator 0 accelerator 10 add the numerical accelerator label append label append accelerator label append String context Label ext get Context Label mode replace default action label with context label if specified label append context Label null context Label action get Text action set Text label to String Action Contribution Item item new Action Contribution Item action item fill menu 1  populateMenuItem LaunchShortcutExtension LaunchShortcutAction LaunchShortcutAction setActionDefinitionId getId helpContextId getHelpContextId helpContextId WorkbenchHelp setHelp helpContextId StringBuffer StringBuffer contextLabel getContextLabel contextLabel contextLabel getText setText toString ActionContributionItem ActionContributionItem
Return the ID of the currently active perspective return the active perspective ID or code null code if there is none private String get Active PerspectiveID I Workbench Window window DebugUI Plugin get Active Workbench Window if window null I Workbench Page page window get Active Page if page null I Perspective Descriptor persp page get Perspective if persp null return persp get Id return null  getActivePerspectiveID IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow IWorkbenchPage getActivePage IPerspectiveDescriptor getPerspective getId
Returns the launch configuration manager return launch configuration manager private Launch Configuration Manager get Launch Configuration Manager return DebugUI Plugin get Default get Launch Configuration Manager  LaunchConfigurationManager getLaunchConfigurationManager DebugUIPlugin getDefault getLaunchConfigurationManager

public final class Debug Action extends Execution Action public Debug Action super I DebugUI Constants ID DEBUG LAUNCH GROUP  DebugAction ExecutionAction DebugAction IDebugUIConstants ID_DEBUG_LAUNCH_GROUP
see Execution Action get Mode protected String get Mode return I Launch Manager DEBUG MODE  ExecutionAction getMode getMode ILaunchManager DEBUG_MODE

Perform a run to line operation on the given element that is currently selected and suspended in the Debug view Implementations must honor the user preference of whether to skip breakpoints during the operation see code I DebugUI Constants PREF SKIP BREAKPOINTS DURING RUN TO LINE code param part the part on which the action has been invoked param selection the selection on which the action has been invoked param target suspended element to perform the run to line action on throws Core Exception if unable to perform the action  IDebugUIConstants PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE CoreException
Returns whether a run to line operation can be performed on the given element that is currently selected and suspended in the Debug view param part the part on which the action has been invoked param selection the selection on which the action has been invoked param target suspended element to perform the run to line action on throws Core Exception if unable to perform the action  CoreException

Creates new line breakpoints or removes existing breakpoints The selection varies depending on the given part For example a text selection is provided for text editors and a structured selection is provided for tree views and may be a multi selection param part the part on which the action has been invoked param selection selection on which line breakpoints should be toggled throws Core Exception if unable to perform the action  CoreException
Returns whether line breakpoints can be toggled on the given selection The selection varies depending on the given part For example a text selection is provided for text editors and a structured selection is provided for tree views and may be a multi selection param part the part on which the action has been invoked param selection selection on which line breakpoints may be toggled return whether line breakpoints can be toggled on the given selection 
Creates new method breakpoints or removes existing breakpoints The selection varies depending on the given part For example a text selection is provided for text editors and a structured selection is provided for tree views and may be a multi selection param part the part on which the action has been invoked param selection selection on which method breakpoints should be toggled throws Core Exception if unable to perform the action  CoreException
Returns whether method breakpoints can be toggled on the given selection The selection varies depending on the given part For example a text selection is provided for text editors and a structured selection is provided for tree views and may be a multi selection param part the part on which the action has been invoked param selection selection on which method breakpoints may be toggled return whether method breakpoints can be toggled on the given selection 
Creates new watchpoints or removes existing breakpoints The selection varies depending on the given part For example a text selection is provided for text editors and a structured selection is provided for tree views and may be a multi selection param part the part on which the action has been invoked param selection selection on which watchpoints should be toggled throws Core Exception if unable to perform the action  CoreException
Returns whether watchpoints can be toggled on the given selection The selection varies depending on the given part For example a text selection is provided for text editors and a structured selection is provided for tree views and may be a multi selection param part the part on which the action has been invoked param selection selection on which watchpoints may be toggled return whether watchpoints can be toggled on the given selection 

Constucts an action that launches the specified launch configuration in the specified mode param configuration launch configuration param mode launch mode one of code I Launch Manager RUN MODE code or code I Launch Manager DEBUG MODE code public Launch Action I Launch Configuration configuration String mode f Configuration configuration f Mode mode set Text configuration get Name set Image Descriptor DebugUI Tools get Default Image Descriptor configuration Workbench Help set Help this I Debug Help Context Ids RELAUNCH HISTORY ACTION  ILaunchManager RUN_MODE ILaunchManager DEBUG_MODE LaunchAction ILaunchConfiguration fConfiguration fMode setText getName setImageDescriptor DebugUITools getDefaultImageDescriptor WorkbenchHelp setHelp IDebugHelpContextIds RELAUNCH_HISTORY_ACTION
see org eclipse jface action I Action run public void run DebugUI Tools launch f Configuration f Mode  IAction DebugUITools fConfiguration fMode
If the user has control clicked the launch history item open the launch configuration dialog on the launch configuration rather than running it see org eclipse jface action I Action run With Event org eclipse swt widgets Event public void run With Event Event event if event state Mask SWT MOD1 0 I Structured Selection selection new Structured Selection f Configuration String id DebugUI Tools get Launch Group f Configuration f Mode get Identifier DebugUI Tools open Launch Configuration Dialog On Group DebugUI Plugin get Shell selection id else run  IAction runWithEvent runWithEvent stateMask IStructuredSelection StructuredSelection fConfiguration DebugUITools getLaunchGroup fConfiguration fMode getIdentifier DebugUITools openLaunchConfigurationDialogOnGroup DebugUIPlugin getShell

Creates a cascading menu action to populate with shortcuts in the given launch group param launch Group Identifier launch group identifier public Launch As Action String launch Group Identifier super f Launch Group Identifier launch Group Identifier I Launch Mode launch Mode Debug Plugin get Default get Launch Manager get Launch Mode get Mode set Text Message Format format Action Messages get String Launch As Action 0 new String launch Mode get Label NON NLS 1 set Menu Creator this  launchGroupIdentifier LaunchAsAction launchGroupIdentifier fLaunchGroupIdentifier launchGroupIdentifier ILaunchMode launchMode DebugPlugin getDefault getLaunchManager getLaunchMode getMode setText MessageFormat ActionMessages getString LaunchAsAction launchMode getLabel setMenuCreator
Returns the launch group associatd with this action return the launch group associatd with this action private Launch Group Extension get Launch Group return get Launch Configuration Manager get Launch Group f Launch Group Identifier  LaunchGroupExtension getLaunchGroup getLaunchConfigurationManager getLaunchGroup fLaunchGroupIdentifier
see I Action run public void run do nothing this action just creates a cascading menu  IAction
private void create Action Menu parent I Action action int count String Buffer label new String Buffer add the numerical accelerator if count 10 label append label append count label append label append action get Text action set Text label to String Action Contribution Item item new Action Contribution Item action item fill parent 1  createAction IAction StringBuffer StringBuffer getText setText toString ActionContributionItem ActionContributionItem
see I Menu Creator dispose public void dispose if get Created Menu null get Created Menu dispose  IMenuCreator getCreatedMenu getCreatedMenu
see I Menu Creator get Menu Control public Menu get Menu Control parent return null  IMenuCreator getMenu getMenu
see I Menu Creator get Menu Menu public Menu get Menu Menu parent if get Created Menu null get Created Menu dispose set Created Menu new Menu parent fill Menu init Menu return get Created Menu  IMenuCreator getMenu getMenu getCreatedMenu getCreatedMenu setCreatedMenu fillMenu initMenu getCreatedMenu
private void fill Menu Retrieve the current perspective and the registered shortcuts List shortcuts null String active PerspID get Active PerspectiveID if active PerspID null shortcuts get Launch Configuration Manager get Launch Shortcuts active PerspID get Category If NO shortcuts are listed in the current perspective add ALL shortcuts to avoid an empty cascading menu if shortcuts null shortcuts is Empty shortcuts get Launch Configuration Manager get Launch Shortcuts get Category int menu Count 1 Iterator iter shortcuts iterator while iter has Next Launch Shortcut Extension ext Launch Shortcut Extension iter next if ext get Modes contains get Mode Workbench Activity Helper filter Item ext populate Menu ext get Created Menu menu Count menu Count  fillMenu activePerspID getActivePerspectiveID activePerspID getLaunchConfigurationManager getLaunchShortcuts activePerspID getCategory isEmpty getLaunchConfigurationManager getLaunchShortcuts getCategory menuCount hasNext LaunchShortcutExtension LaunchShortcutExtension getModes getMode WorkbenchActivityHelper filterItem populateMenu getCreatedMenu menuCount menuCount
f Created Menu add Menu Listener new Menu Adapter public void menu Shown Menu Event e Menu m Menu e widget Menu Item items m get Items for int i 0 i items length i items i dispose fill Menu  fCreatedMenu addMenuListener MenuAdapter menuShown MenuEvent MenuItem getItems fillMenu
Creates the menu for the action private void init Menu Add listener to repopulate the menu each time it is shown to reflect changes in selection or active perspective f Created Menu add Menu Listener new Menu Adapter public void menu Shown Menu Event e Menu m Menu e widget Menu Item items m get Items for int i 0 i items length i items i dispose fill Menu  initMenu fCreatedMenu addMenuListener MenuAdapter menuShown MenuEvent MenuItem getItems fillMenu
Add the shortcut to the menu private void populate Menu Launch Shortcut Extension ext Menu menu int menu Count Launch Shortcut Action action new Launch Shortcut Action get Mode ext action set Action Definition Id ext get Id String help Context Id ext get Help Context Id if help Context Id null Workbench Help set Help action help Context Id if f Key Binding Service null f Key Binding Service register Global Action action create Action menu action menu Count  populateMenu LaunchShortcutExtension menuCount LaunchShortcutAction LaunchShortcutAction getMode setActionDefinitionId getId helpContextId getHelpContextId helpContextId WorkbenchHelp setHelp helpContextId fKeyBindingService fKeyBindingService registerGlobalAction createAction menuCount
Return the ID of the currently active perspective or code null code if there is none private String get Active PerspectiveID I Workbench Window window DebugUI Plugin get Active Workbench Window if window null I Workbench Page page window get Active Page if page null I Perspective Descriptor persp page get Perspective if persp null return persp get Id return null  getActivePerspectiveID IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow IWorkbenchPage getActivePage IPerspectiveDescriptor getPerspective getId
Returns the mode of this action run or debug return the mode of this action run or debug private String get Mode return get Launch Group get Mode  getMode getLaunchGroup getMode
Returns the category of this action possibly code null code return the category of this action possibly code null code private String get Category return get Launch Group get Category  getCategory getLaunchGroup getCategory
private Menu get Created Menu return f Created Menu  getCreatedMenu fCreatedMenu
private void set Created Menu Menu created Menu f Created Menu created Menu  setCreatedMenu createdMenu fCreatedMenu createdMenu
Returns the launch configuration manager return launch configuration manager private Launch Configuration Manager get Launch Configuration Manager return DebugUI Plugin get Default get Launch Configuration Manager  LaunchConfigurationManager getLaunchConfigurationManager DebugUIPlugin getDefault getLaunchConfigurationManager
see org eclipse ui I Workbench Window Action Delegate init org eclipse ui I Workbench Window public void init I Workbench Window window if window instanceof Workbench Window f Key Binding Service Workbench Window window get Key Binding Service  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow WorkbenchWindow fKeyBindingService WorkbenchWindow getKeyBindingService
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action do nothing this is just a menu  IActionDelegate IAction IAction
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection if f Action null initialize action  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection fAction
Set the enabled state of the underlying action based on whether there are any registered launch shortcuts for this launch mode private void initialize I Action action f Action action action set Enabled exists Shortcuts For Mode  IAction fAction setEnabled existsShortcutsForMode
Return whether there are any registered launch shortcuts for the mode of this action return whether there are any registered launch shortcuts for the mode of this action private boolean exists Shortcuts For Mode List shortcuts get Launch Configuration Manager get Launch Shortcuts get Category Iterator iter shortcuts iterator while iter has Next Launch Shortcut Extension ext Launch Shortcut Extension iter next if ext get Modes contains get Mode return true return false  existsShortcutsForMode getLaunchConfigurationManager getLaunchShortcuts getCategory hasNext LaunchShortcutExtension LaunchShortcutExtension getModes getMode

Constructs an action that opens the launch configuration dialog in the context of the specified launch group param identifier unique identifier of a launch group extension public Open Launch Dialog Action String identifier f Identifier identifier Launch Group Extension extension DebugUI Plugin get Default get Launch Configuration Manager get Launch Group identifier if extension null set Text extension get Label NON NLS 1 set Image Descriptor extension get Image Descriptor Workbench Help set Help this I Debug Help Context Ids OPEN LAUNCH CONFIGURATION ACTION  OpenLaunchDialogAction fIdentifier LaunchGroupExtension DebugUIPlugin getDefault getLaunchConfigurationManager getLaunchGroup setText getLabel setImageDescriptor getImageDescriptor WorkbenchHelp setHelp IDebugHelpContextIds OPEN_LAUNCH_CONFIGURATION_ACTION
see org eclipse jface action I Action run public void run Launch History history DebugUI Plugin get Default get Launch Configuration Manager get Launch History f Identifier I Launch Configuration configuration history get Recent Launch I Structured Selection selection null if configuration null selection new Structured Selection else selection new Structured Selection configuration int result DebugUI Tools open Launch Configuration Dialog On Group DebugUI Plugin get Shell selection f Identifier notify Result result Window OK  IAction LaunchHistory DebugUIPlugin getDefault getLaunchConfigurationManager getLaunchHistory fIdentifier ILaunchConfiguration getRecentLaunch IStructuredSelection StructuredSelection StructuredSelection DebugUITools openLaunchConfigurationDialogOnGroup DebugUIPlugin getShell fIdentifier notifyResult
see org eclipse ui I Workbench Window Action Delegate dispose public void dispose  IWorkbenchWindowActionDelegate
see org eclipse ui I Workbench Window Action Delegate init org eclipse ui I Workbench Window public void init I Workbench Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action run  IActionDelegate IAction IAction
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection if f Action null initialize action  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection fAction
Set the enabled state of the underlying action based on whether there are any registered launch configuration types that understand how to launch in the mode of this action private void initialize I Action action f Action action action set Enabled exists Config Types For Mode  IAction fAction setEnabled existsConfigTypesForMode
Return whether there are any registered launch configuration types for the mode of this action return whether there are any registered launch configuration types for the mode of this action private boolean exists Config Types For Mode I Launch Configuration Type config Types Debug Plugin get Default get Launch Manager get Launch Configuration Types for int i 0 i config Types length i I Launch Configuration Type config Type config Types i if config Type supports Mode get Mode return true return false  existsConfigTypesForMode ILaunchConfigurationType configTypes DebugPlugin getDefault getLaunchManager getLaunchConfigurationTypes configTypes ILaunchConfigurationType configType configTypes configType supportsMode getMode
Returns the launch mode for this action return launch mode private String get Mode return DebugUI Plugin get Default get Launch Configuration Manager get Launch Group f Identifier get Mode  getMode DebugUIPlugin getDefault getLaunchConfigurationManager getLaunchGroup fIdentifier getMode

public final class Run Action extends Execution Action public Run Action super I DebugUI Constants ID RUN LAUNCH GROUP  RunAction ExecutionAction RunAction IDebugUIConstants ID_RUN_LAUNCH_GROUP
see Execution Action get Mode protected String get Mode return I Launch Manager RUN MODE  ExecutionAction getMode getMode ILaunchManager RUN_MODE

public void selection Changed I Workbench Part part I Selection selection f Target Element null if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection if ss size 1 Object object ss get First Element if object instanceof I Suspend Resume f Target Element I Suspend Resume object update  selectionChanged IWorkbenchPart ISelection fTargetElement IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement ISuspendResume fTargetElement ISuspendResume
public void dispose f Active Part get Site get Workbench Window get Selection Service remove Selection Listener I DebugUI Constants ID DEBUG VIEW f Selection Listener f Active Part null f Part Target null  fActivePart getSite getWorkbenchWindow getSelectionService removeSelectionListener IDebugUIConstants ID_DEBUG_VIEW fSelectionListener fActivePart fPartTarget
public void run I Action action if f Part Target null f Target Element null try f Part Target run To Line f Active Part f Active Part get Site get Selection Provider get Selection f Target Element catch Core Exception e DebugUI Plugin error Dialog f Active Part get Site get Workbench Window get Shell Action Messages get String Run To Line Action 0 Action Messages get String Run To Line Action 1 e get Status NON NLS 1 NON NLS 2  IAction fPartTarget fTargetElement fPartTarget runToLine fActivePart fActivePart getSite getSelectionProvider getSelection fTargetElement CoreException DebugUIPlugin errorDialog fActivePart getSite getWorkbenchWindow getShell ActionMessages getString RunToLineAction ActionMessages getString RunToLineAction getStatus
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection this f Action action update  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection fAction
public void update if f Action null return if f Part Target null f Target Element null f Action set Enabled f Target Element is Suspended f Part Target can Run To Line f Active Part f Active Part get Site get Selection Provider get Selection f Target Element else f Action set Enabled false  fAction fPartTarget fTargetElement fAction setEnabled fTargetElement isSuspended fPartTarget canRunToLine fActivePart fActivePart getSite getSelectionProvider getSelection fTargetElement fAction setEnabled
public void init I Action action this f Action action if action null action set Text Action Messages get String Run To Line Action Delegate 4 NON NLS 1 action set Image Descriptor DebugUI Tools get Image Descriptor I Internal DebugUI Constants IMG LCL RUN TO LINE action set Disabled Image Descriptor DebugUI Tools get Image Descriptor I Internal DebugUI Constants IMG DLCL RUN TO LINE  IAction fAction setText ActionMessages getString RunToLineActionDelegate setImageDescriptor DebugUITools getImageDescriptor IInternalDebugUIConstants IMG_LCL_RUN_TO_LINE setDisabledImageDescriptor DebugUITools getImageDescriptor IInternalDebugUIConstants IMG_DLCL_RUN_TO_LINE
see org eclipse ui I Action Delegate2 run With Event org eclipse jface action I Action org eclipse swt widgets Event public void run With Event I Action action Event event run action  IActionDelegate2 runWithEvent IAction runWithEvent IAction
public void set Active Editor I Action action I Editor Part target Editor init action if f Active Part null f Active Part equals target Editor f Active Part get Site get Workbench Window get Selection Service remove Selection Listener I DebugUI Constants ID DEBUG VIEW f Selection Listener f Part Target null f Active Part target Editor if target Editor null target Editor get Site get Workbench Window get Selection Service add Selection Listener I DebugUI Constants ID DEBUG VIEW f Selection Listener f Part Target I Run To Line Target target Editor get Adapter I Run To Line Target class if f Part Target null I Adapter Manager adapter Manager Platform get Adapter Manager TODO we could restrict loading to cases when the debugging context is on if adapter Manager has Adapter target Editor org eclipse debug internal ui actions I Run To Line Target NON NLS 1 f Part Target I Run To Line Target adapter Manager load Adapter target Editor org eclipse debug internal ui actions I Run To Line Target NON NLS 1 update  setActiveEditor IAction IEditorPart targetEditor fActivePart fActivePart targetEditor fActivePart getSite getWorkbenchWindow getSelectionService removeSelectionListener IDebugUIConstants ID_DEBUG_VIEW fSelectionListener fPartTarget fActivePart targetEditor targetEditor targetEditor getSite getWorkbenchWindow getSelectionService addSelectionListener IDebugUIConstants ID_DEBUG_VIEW fSelectionListener fPartTarget IRunToLineTarget targetEditor getAdapter IRunToLineTarget fPartTarget IAdapterManager adapterManager getAdapterManager adapterManager hasAdapter targetEditor IRunToLineTarget fPartTarget IRunToLineTarget adapterManager loadAdapter targetEditor IRunToLineTarget

see org eclipse debug internal ui actions Toggle Breakpoint Object Action Delegate perform Action org eclipse debug internal ui actions I Toggle Breakpoints Target org eclipse ui I Workbench Part org eclipse jface viewers I Selection protected void perform Action I Toggle Breakpoints Target target I Workbench Part part I Selection selection throws Core Exception target toggle Method Breakpoints part selection  ToggleBreakpointObjectActionDelegate performAction IToggleBreakpointsTarget IWorkbenchPart ISelection performAction IToggleBreakpointsTarget IWorkbenchPart ISelection CoreException toggleMethodBreakpoints

see org eclipse debug internal ui actions Toggle Breakpoint Object Action Delegate perform Action org eclipse debug internal ui actions I Toggle Breakpoints Target org eclipse ui I Workbench Part org eclipse jface viewers I Selection protected void perform Action I Toggle Breakpoints Target target I Workbench Part part I Selection selection throws Core Exception target toggle Watchpoints part selection  ToggleBreakpointObjectActionDelegate performAction IToggleBreakpointsTarget IWorkbenchPart ISelection performAction IToggleBreakpointsTarget IWorkbenchPart ISelection CoreException toggleWatchpoints

private Modify Listener f Basic Modify Listener new Modify Listener public void modify Text Modify Event evt update Launch Configuration Dialog  ModifyListener fBasicModifyListener ModifyListener modifyText ModifyEvent updateLaunchConfigurationDialog
get Shared Radio Button set Font font get Shared Radio Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Shared Radio Button Selected  getSharedRadioButton setFont getSharedRadioButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSharedRadioButtonSelected
set Shared Location Button create Push Button location Comp Launch Configurations Messages get String Common Tab Browse 6 null NON NLS 1 get Shared Location Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Shared Location Button Selected  setSharedLocationButton createPushButton locationComp LaunchConfigurationsMessages getString CommonTab Browse_6 getSharedLocationButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSharedLocationButtonSelected
new I Check State Listener see org eclipse jface viewers I Check State Listener check State Changed org eclipse jface viewers Check State Changed Event public void check State Changed Check State Changed Event event update Launch Configuration Dialog  ICheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent checkStateChanged CheckStateChangedEvent updateLaunchConfigurationDialog
see I Launch Configuration Tab create Control Composite public void create Control Composite parent Font font parent get Font Composite comp new Composite parent SWT NONE set Control comp Workbench Help set Help get Control I Debug Help Context Ids LAUNCH CONFIGURATION DIALOG COMMON TAB Grid Layout top Layout new Grid Layout comp set Layout top Layout comp set Font font Composite radio Comp new Composite comp SWT NONE Grid Layout radio Layout new Grid Layout radio Layout margin Height 0 radio Layout margin Width 0 radio Comp set Layout radio Layout set Local Shared Label new Label radio Comp SWT NONE get Local Shared Label set Text Launch Configurations Messages get String Common Tab Type of launch configuration  2 NON NLS 1 get Local Shared Label set Font font set Local Radio Button new Button radio Comp SWT RADIO get Local Radio Button set Text Launch Configurations Messages get String Common Tab L ocal 3 NON NLS 1 get Local Radio Button set Font font set Shared Radio Button new Button radio Comp SWT RADIO get Shared Radio Button set Text Launch Configurations Messages get String Common Tab S hared 4 NON NLS 1 get Shared Radio Button set Font font get Shared Radio Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Shared Radio Button Selected Composite location Comp new Composite comp SWT NONE Grid Layout location Layout new Grid Layout location Layout num Columns 2 location Layout margin Height 0 location Layout margin Width 0 location Comp set Layout location Layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL location Comp set Layout Data gd location Comp set Font font set Shared Location Label new Label location Comp SWT NONE get Shared Location Label set Text Launch Configurations Messages get String Common Tab Location of shared confi guration  5 NON NLS 1 gd new Grid Data gd horizontal Span 2 get Shared Location Label set Layout Data gd get Shared Location Label set Font font set Shared Location Text new Text location Comp SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL get Shared Location Text set Layout Data gd get Shared Location Text set Font font get Shared Location Text add Modify Listener f Basic Modify Listener set Shared Location Button create Push Button location Comp Launch Configurations Messages get String Common Tab Browse 6 null NON NLS 1 get Shared Location Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Shared Location Button Selected get Local Radio Button set Selection true set Shared Enabled false create Vertical Spacer comp 1 Composite fav Comp new Composite comp SWT NONE gd new Grid Data Grid Data FILL HORIZONTAL fav Comp set Layout Data gd Grid Layout fav Layout new Grid Layout fav Layout margin Height 0 fav Layout margin Width 0 fav Layout num Columns 2 fav Layout make Columns Equal Width true fav Comp set Layout fav Layout fav Comp set Font font Label fav Label new Label fav Comp SWT HORIZONTAL SWT LEFT fav Label set Text Launch Configurations Messages get String Common Tab Display in favorites menu  10 NON NLS 1 gd new Grid Data Grid Data BEGINNING gd horizontal Span 2 fav Label set Layout Data gd fav Label set Font font f Favorites Table Checkbox Table Viewer new Check List fav Comp SWT CHECK SWT BORDER SWT MULTI SWT FULL SELECTION Control table f Favorites Table get Control gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 1 table set Layout Data gd table set Font font f Favorites Table set Content Provider new Favorites Content Provider f Favorites Table set Label Provider new Favorites Label Provider f Favorites Table add Check State Listener new I Check State Listener see org eclipse jface viewers I Check State Listener check State Changed org eclipse jface viewers Check State Changed Event public void check State Changed Check State Changed Event event update Launch Configuration Dialog create Vertical Spacer comp 1 create Launch In Background Component comp  ILaunchConfigurationTab createControl createControl getFont setControl WorkbenchHelp setHelp getControl IDebugHelpContextIds LAUNCH_CONFIGURATION_DIALOG_COMMON_TAB GridLayout topLayout GridLayout setLayout topLayout setFont radioComp GridLayout radioLayout GridLayout radioLayout marginHeight radioLayout marginWidth radioComp setLayout radioLayout setLocalSharedLabel radioComp getLocalSharedLabel setText LaunchConfigurationsMessages getString CommonTab Type_of_launch_configuration__2 getLocalSharedLabel setFont setLocalRadioButton radioComp getLocalRadioButton setText LaunchConfigurationsMessages getString CommonTab ocal_3 getLocalRadioButton setFont setSharedRadioButton radioComp getSharedRadioButton setText LaunchConfigurationsMessages getString CommonTab hared_4 getSharedRadioButton setFont getSharedRadioButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSharedRadioButtonSelected locationComp GridLayout locationLayout GridLayout locationLayout numColumns locationLayout marginHeight locationLayout marginWidth locationComp setLayout locationLayout GridData GridData GridData FILL_HORIZONTAL locationComp setLayoutData locationComp setFont setSharedLocationLabel locationComp getSharedLocationLabel setText LaunchConfigurationsMessages getString CommonTab Location_of_shared_confi guration__5 GridData horizontalSpan getSharedLocationLabel setLayoutData getSharedLocationLabel setFont setSharedLocationText locationComp GridData GridData FILL_HORIZONTAL getSharedLocationText setLayoutData getSharedLocationText setFont getSharedLocationText addModifyListener fBasicModifyListener setSharedLocationButton createPushButton locationComp LaunchConfigurationsMessages getString CommonTab Browse_6 getSharedLocationButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSharedLocationButtonSelected getLocalRadioButton setSelection setSharedEnabled createVerticalSpacer favComp GridData GridData FILL_HORIZONTAL favComp setLayoutData GridLayout favLayout GridLayout favLayout marginHeight favLayout marginWidth favLayout numColumns favLayout makeColumnsEqualWidth favComp setLayout favLayout favComp setFont favLabel favComp favLabel setText LaunchConfigurationsMessages getString CommonTab Display_in_favorites_menu__10 GridData GridData horizontalSpan favLabel setLayoutData favLabel setFont fFavoritesTable CheckboxTableViewer newCheckList favComp FULL_SELECTION fFavoritesTable getControl GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan setLayoutData setFont fFavoritesTable setContentProvider FavoritesContentProvider fFavoritesTable setLabelProvider FavoritesLabelProvider fFavoritesTable addCheckStateListener ICheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent checkStateChanged CheckStateChangedEvent updateLaunchConfigurationDialog createVerticalSpacer createLaunchInBackgroundComponent
f Launch In Background Button set Font parent get Font f Launch In Background Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  fLaunchInBackgroundButton setFont getFont fLaunchInBackgroundButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
Creates the controls needed to edit the launch in background attribute of an external tool param parent the composite to create the controls in protected void create Launch In Background Component Composite parent f Launch In Background Button create Check Button parent Launch Configurations Messages get String Common Tab 10 NON NLS 1 Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL data horizontal Span 2 f Launch In Background Button set Layout Data data f Launch In Background Button set Font parent get Font f Launch In Background Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  createLaunchInBackgroundComponent fLaunchInBackgroundButton createCheckButton LaunchConfigurationsMessages getString CommonTab GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan fLaunchInBackgroundButton setLayoutData fLaunchInBackgroundButton setFont getFont fLaunchInBackgroundButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
private void set Shared Location Button Button shared Location Button this f Shared Location Button shared Location Button  setSharedLocationButton sharedLocationButton fSharedLocationButton sharedLocationButton
private Button get Shared Location Button return f Shared Location Button  getSharedLocationButton fSharedLocationButton
private void set Shared Location Text Text shared Location Text this f Shared Location Text shared Location Text  setSharedLocationText sharedLocationText fSharedLocationText sharedLocationText
private Text get Shared Location Text return f Shared Location Text  getSharedLocationText fSharedLocationText
private void set Shared Location Label Label shared Location Label this f Shared Location Label shared Location Label  setSharedLocationLabel sharedLocationLabel fSharedLocationLabel sharedLocationLabel
private Label get Shared Location Label return f Shared Location Label  getSharedLocationLabel fSharedLocationLabel
private void set Local Shared Label Label local Shared Label f Local Shared Label local Shared Label  setLocalSharedLabel localSharedLabel fLocalSharedLabel localSharedLabel
private Label get Local Shared Label return f Local Shared Label  getLocalSharedLabel fLocalSharedLabel
private void set Local Radio Button Button button f Local Radio Button button  setLocalRadioButton fLocalRadioButton
private Button get Local Radio Button return f Local Radio Button  getLocalRadioButton fLocalRadioButton
private void set Shared Radio Button Button button f Shared Radio Button button  setSharedRadioButton fSharedRadioButton
private Button get Shared Radio Button return f Shared Radio Button  getSharedRadioButton fSharedRadioButton
private void handle Shared Radio Button Selected set Shared Enabled is Shared update Launch Configuration Dialog  handleSharedRadioButtonSelected setSharedEnabled isShared updateLaunchConfigurationDialog
private void set Shared Enabled boolean enable get Shared Location Label set Enabled enable get Shared Location Text set Enabled enable get Shared Location Button set Enabled enable  setSharedEnabled getSharedLocationLabel setEnabled getSharedLocationText setEnabled getSharedLocationButton setEnabled
private boolean is Shared return get Shared Radio Button get Selection  isShared getSharedRadioButton getSelection
private void handle Shared Location Button Selected Container Selection Dialog dialog new Container Selection Dialog get Shell get Workspace Root false Launch Configurations Messages get String Common Tab Select a location for the launch configuration 13 NON NLS 1 String current Container String get Shared Location Text get Text I Container current Container get Container current Container String if current Container null I Path path current Container get Full Path dialog set Initial Selections new Object path dialog show Closed Projects false dialog open Object results dialog get Result if results null results length 0 results 0 instanceof I Path I Path path I Path results 0 String container Name path toOS String get Shared Location Text set Text container Name  handleSharedLocationButtonSelected ContainerSelectionDialog ContainerSelectionDialog getShell getWorkspaceRoot LaunchConfigurationsMessages getString CommonTab Select_a_location_for_the_launch_configuration_13 currentContainerString getSharedLocationText getText IContainer currentContainer getContainer currentContainerString currentContainer IPath currentContainer getFullPath setInitialSelections showClosedProjects getResult IPath IPath IPath containerName toOSString getSharedLocationText setText containerName
private I Container get Container String path Path container Path new Path path return I Container get Workspace Root find Member container Path  IContainer getContainer containerPath IContainer getWorkspaceRoot findMember containerPath
see I Launch Configuration Tab initialize From I Launch Configuration public void initialize From I Launch Configuration configuration update Local Shared From Config configuration update Shared Location From Config configuration update Favorites From Config configuration update Launch In Background configuration  ILaunchConfigurationTab initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration updateLocalSharedFromConfig updateSharedLocationFromConfig updateFavoritesFromConfig updateLaunchInBackground
protected void update Launch In Background I Launch Configuration configuration f Launch In Background Button set Selection is Launch In Background configuration  updateLaunchInBackground ILaunchConfiguration fLaunchInBackgroundButton setSelection isLaunchInBackground
Returns whether the given configuration should be launched in the background param configuration the configuration return whether the configuration is configured to launch in the background public static boolean is Launch In Background I Launch Configuration configuration boolean launch In Background true try launch In Background configuration get Attribute I DebugUI Constants ATTR LAUNCH IN BACKGROUND true catch Core Exception ce DebugUI Plugin log ce return launch In Background  isLaunchInBackground ILaunchConfiguration launchInBackground launchInBackground getAttribute IDebugUIConstants ATTR_LAUNCH_IN_BACKGROUND CoreException DebugUIPlugin launchInBackground
private void update Local Shared From Config I Launch Configuration config boolean is Shared config is Local get Shared Radio Button set Selection is Shared get Local Radio Button set Selection is Shared set Shared Enabled is Shared  updateLocalSharedFromConfig ILaunchConfiguration isShared isLocal getSharedRadioButton setSelection isShared getLocalRadioButton setSelection isShared setSharedEnabled isShared
private void update Shared Location From Config I Launch Configuration config I File file config get File if file null I Container parent file get Parent if parent null String container Name parent get Full Path toOS String get Shared Location Text set Text container Name  updateSharedLocationFromConfig ILaunchConfiguration IFile getFile IContainer getParent containerName getFullPath toOSString getSharedLocationText setText containerName
private void update Favorites From Config I Launch Configuration config f Favorites Table set Input config f Favorites Table set Checked Elements new Object try List groups config get Attribute I DebugUI Constants ATTR FAVORITE GROUPS new Array List if groups is Empty check old attributes for backwards compatible if config get Attribute I DebugUI Constants ATTR DEBUG FAVORITE false groups add I DebugUI Constants ID DEBUG LAUNCH GROUP if config get Attribute I DebugUI Constants ATTR RUN FAVORITE false groups add I DebugUI Constants ID RUN LAUNCH GROUP if groups is Empty List list new Array List Iterator iterator groups iterator while iterator has Next String id String iterator next Launch Group Extension extension get Launch Configuration Manager get Launch Group id list add extension f Favorites Table set Checked Elements list to Array catch Core Exception e DebugUI Plugin log e  updateFavoritesFromConfig ILaunchConfiguration fFavoritesTable setInput fFavoritesTable setCheckedElements getAttribute IDebugUIConstants ATTR_FAVORITE_GROUPS ArrayList isEmpty getAttribute IDebugUIConstants ATTR_DEBUG_FAVORITE IDebugUIConstants ID_DEBUG_LAUNCH_GROUP getAttribute IDebugUIConstants ATTR_RUN_FAVORITE IDebugUIConstants ID_RUN_LAUNCH_GROUP isEmpty ArrayList hasNext LaunchGroupExtension getLaunchConfigurationManager getLaunchGroup fFavoritesTable setCheckedElements toArray CoreException DebugUIPlugin
private void update Config From Local Shared I Launch Configuration Working Copy config if is Shared String container Path String get Shared Location Text get Text I Container container get Container container Path String config set Container container else config set Container null  updateConfigFromLocalShared ILaunchConfigurationWorkingCopy isShared containerPathString getSharedLocationText getText IContainer getContainer containerPathString setContainer setContainer
Update the favorite settings NOTE set to NULL instead of false for backwards compatibility when comparing if content is equal since false is default and will be missing for older configs private void update Config From Favorites I Launch Configuration Working Copy config try Object checked f Favorites Table get Checked Elements boolean debug config get Attribute I DebugUI Constants ATTR DEBUG FAVORITE false boolean run config get Attribute I DebugUI Constants ATTR RUN FAVORITE false if debug run old attributes List groups new Array List int num 0 if debug groups add get Launch Configuration Manager get Launch Group I DebugUI Constants ID DEBUG LAUNCH GROUP num if run num groups add get Launch Configuration Manager get Launch Group I DebugUI Constants ID DEBUG LAUNCH GROUP see if there are any changes if num checked length boolean different false for int i 0 i checked length i if groups contains checked i different true break if different return erase old attributes if any config set Attribute I DebugUI Constants ATTR DEBUG FAVORITE String null config set Attribute I DebugUI Constants ATTR RUN FAVORITE String null new attribute List groups null for int i 0 i checked length i Launch Group Extension group Launch Group Extension checked i if groups null groups new Array List groups add group get Identifier config set Attribute I DebugUI Constants ATTR FAVORITE GROUPS groups catch Core Exception e DebugUI Plugin log e  updateConfigFromFavorites ILaunchConfigurationWorkingCopy fFavoritesTable getCheckedElements getAttribute IDebugUIConstants ATTR_DEBUG_FAVORITE getAttribute IDebugUIConstants ATTR_RUN_FAVORITE ArrayList getLaunchConfigurationManager getLaunchGroup IDebugUIConstants ID_DEBUG_LAUNCH_GROUP getLaunchConfigurationManager getLaunchGroup IDebugUIConstants ID_DEBUG_LAUNCH_GROUP setAttribute IDebugUIConstants ATTR_DEBUG_FAVORITE setAttribute IDebugUIConstants ATTR_RUN_FAVORITE LaunchGroupExtension LaunchGroupExtension ArrayList getIdentifier setAttribute IDebugUIConstants ATTR_FAVORITE_GROUPS CoreException DebugUIPlugin
Convenience method for getting the workspace root private I Workspace Root get Workspace Root return Resources Plugin get Workspace get Root  IWorkspaceRoot getWorkspaceRoot ResourcesPlugin getWorkspace getRoot
see I Launch Configuration Tab is Valid I Launch Configuration public boolean is Valid I Launch Configuration config set Message null set Error Message null return validate Local Shared  ILaunchConfigurationTab isValid ILaunchConfiguration isValid ILaunchConfiguration setMessage setErrorMessage validateLocalShared
private boolean validate Local Shared if is Shared String path f Shared Location Text get Text trim I Container container get Container path if container null container equals Resources Plugin get Workspace get Root set Error Message Launch Configurations Messages get String Common Tab Invalid shared configuration location 14 NON NLS 1 return false else if container get Project is Open set Error Message Launch Configurations Messages get String Common Tab Cannot save launch configuration in a closed project  1 NON NLS 1 return false return true  validateLocalShared isShared fSharedLocationText getText IContainer getContainer ResourcesPlugin getWorkspace getRoot setErrorMessage LaunchConfigurationsMessages getString CommonTab Invalid_shared_configuration_location_14 getProject isOpen setErrorMessage LaunchConfigurationsMessages getString CommonTab Cannot_save_launch_configuration_in_a_closed_project _1
see I Launch Configuration Tab set Defaults I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy config config set Container null config set Attribute I DebugUI Constants ATTR LAUNCH IN BACKGROUND true  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy setContainer setAttribute IDebugUIConstants ATTR_LAUNCH_IN_BACKGROUND
see I Launch Configuration Tab perform Apply I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy configuration update Config From Local Shared configuration update Config From Favorites configuration set Attribute I DebugUI Constants ATTR LAUNCH IN BACKGROUND configuration f Launch In Background Button get Selection true  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy updateConfigFromLocalShared updateConfigFromFavorites setAttribute IDebugUIConstants ATTR_LAUNCH_IN_BACKGROUND fLaunchInBackgroundButton getSelection
see I Launch Configuration Tab get Name public String get Name return Launch Configurations Messages get String Common Tab Common 15 NON NLS 1  ILaunchConfigurationTab getName getName LaunchConfigurationsMessages getString CommonTab Common_15
see I Launch Configuration Tab can Save public boolean can Save return validate Local Shared  ILaunchConfigurationTab canSave canSave validateLocalShared
see I Launch Configuration Tab get Image public Image get Image return DebugUI Tools get Image I Internal DebugUI Constants IMG OBJS COMMON TAB  ILaunchConfigurationTab getImage getImage DebugUITools getImage IInternalDebugUIConstants IMG_OBJS_COMMON_TAB
class Favorites Content Provider implements I Structured Content Provider see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element I Launch Group groups DebugUI Tools get Launch Groups List possible Groups new Array List I Launch Configuration configuration I Launch Configuration input Element for int i 0 i groups length i I Launch Group extension groups i Launch History history get Launch Configuration Manager get Launch History extension get Identifier if history null history accepts configuration possible Groups add extension return possible Groups to Array  FavoritesContentProvider IStructuredContentProvider IStructuredContentProvider getElements getElements inputElement ILaunchGroup DebugUITools getLaunchGroups possibleGroups ArrayList ILaunchConfiguration ILaunchConfiguration inputElement ILaunchGroup LaunchHistory getLaunchConfigurationManager getLaunchHistory getIdentifier possibleGroups possibleGroups toArray
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
see org eclipse jface viewers I Table Label Provider get Column Image java lang Object int public Image get Column Image Object element int column Index Image image Image f Images get element if image null Image Descriptor descriptor Launch Group Extension element get Image Descriptor if descriptor null image descriptor create Image f Images put element image return image  ITableLabelProvider getColumnImage getColumnImage columnIndex fImages ImageDescriptor LaunchGroupExtension getImageDescriptor createImage fImages
see org eclipse jface viewers I Table Label Provider get Column Text java lang Object int public String get Column Text Object element int column Index String label Launch Group Extension element get Label strip out any accelerators int index label index Of if index 0 label label substring 1 else if index 0 index label length 1 String first label substring 0 index String last label substring index 1 label first last return label  ITableLabelProvider getColumnText getColumnText columnIndex LaunchGroupExtension getLabel indexOf
see org eclipse jface viewers I Base Label Provider add Listener org eclipse jface viewers I Label Provider Listener public void add Listener I Label Provider Listener listener  IBaseLabelProvider addListener ILabelProviderListener addListener ILabelProviderListener
see org eclipse jface viewers I Base Label Provider dispose public void dispose Iterator images f Images values iterator while images has Next Image image Image images next image dispose  IBaseLabelProvider fImages hasNext
see org eclipse jface viewers I Base Label Provider is Label Property java lang Object java lang String public boolean is Label Property Object element String property return false  IBaseLabelProvider isLabelProperty isLabelProperty
see org eclipse jface viewers I Base Label Provider remove Listener org eclipse jface viewers I Label Provider Listener public void remove Listener I Label Provider Listener listener  IBaseLabelProvider removeListener ILabelProviderListener removeListener ILabelProviderListener
Convenience accessor protected Launch Configuration Manager get Launch Configuration Manager return DebugUI Plugin get Default get Launch Configuration Manager  LaunchConfigurationManager getLaunchConfigurationManager DebugUIPlugin getDefault getLaunchConfigurationManager
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy do nothing when activated  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy do nothing when deactivated  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy

public void connect I Process process I Console console f Process process f Console console I Streams Proxy streams Proxy f Process get Streams Proxy if streams Proxy null f Console connect streams Proxy  IProcess IConsole fProcess fConsole IStreamsProxy streamsProxy fProcess getStreamsProxy streamsProxy fConsole streamsProxy
see org eclipse debug ui console I Console Color Provider disconnect public void disconnect f Console null f Process null  IConsoleColorProvider fConsole fProcess
see org eclipse debug ui console I Console Color Provider is Read Only public boolean is Read Only return f Process null f Process is Terminated  IConsoleColorProvider isReadOnly isReadOnly fProcess fProcess isTerminated
public Color get Color String stream Identifer if I DebugUI Constants ID STANDARD OUTPUT STREAM equals stream Identifer return DebugUI Plugin get Preference Color I Debug Preference Constants CONSOLE SYS OUT COLOR if I DebugUI Constants ID STANDARD ERROR STREAM equals stream Identifer return DebugUI Plugin get Preference Color I Debug Preference Constants CONSOLE SYS ERR COLOR if I DebugUI Constants ID STANDARD INPUT STREAM equals stream Identifer return DebugUI Plugin get Preference Color I Debug Preference Constants CONSOLE SYS IN COLOR return null  getColor streamIdentifer IDebugUIConstants ID_STANDARD_OUTPUT_STREAM streamIdentifer DebugUIPlugin getPreferenceColor IDebugPreferenceConstants CONSOLE_SYS_OUT_COLOR IDebugUIConstants ID_STANDARD_ERROR_STREAM streamIdentifer DebugUIPlugin getPreferenceColor IDebugPreferenceConstants CONSOLE_SYS_ERR_COLOR IDebugUIConstants ID_STANDARD_INPUT_STREAM streamIdentifer DebugUIPlugin getPreferenceColor IDebugPreferenceConstants CONSOLE_SYS_IN_COLOR
Returns the process this color provider is providing color for or code null code if none return the process this color provider is providing color for or code null code if none protected I Process get Process return f Process  IProcess getProcess fProcess
Returns the console this color provider is connected to or code null code if none return I Console the console this color provider is connected to or code null code if none protected I Console get Console return f Console  IConsole IConsole getConsole fConsole

Constructs a hyperlink to the specified file param file the file to open when activated param editor Id the identifier of the editor to open the file in or code null code if the default editor should be used param file Offset the offset in the file to select when activated or 1 param file Length the length of text to select in the file when activated or 1 param file Line Number the line number to select in the file when activated or 1 public File Link I File file String editor Id int file Offset int file Length int file Line Number f File file f File Offset file Offset f File Length file Length f File Line Number file Line Number f Editor Id editor Id  editorId fileOffset fileLength fileLineNumber FileLink IFile editorId fileOffset fileLength fileLineNumber fFile fFileOffset fileOffset fFileLength fileLength fFileLineNumber fileLineNumber fEditorId editorId
public void link Activated I Workbench Window window DebugUI Plugin get Active Workbench Window if window null I Workbench Page page window get Active Page if page null try I Editor Part editor Part page open Editor new File Editor Input f File get Editor Id false if f File Line Number 0 editor Part instanceof I Text Editor I Text Editor text Editor I Text Editor editor Part I Editor Input input editor Part get Editor Input if f File Offset 0 I Document Provider provider text Editor get Document Provider try provider connect input catch Core Exception e unable to link DebugUI Plugin log e return I Document document provider get Document input try f File Offset document get Line Offset f File Line Number 1 f File Length document get Line Length f File Line Number 1 catch Bad Location Exception e unable to link DebugUI Plugin log e provider disconnect input if f File Offset 0 f File Length 0 text Editor select And Reveal f File Offset f File Length catch Part Init Exception e DebugUI Plugin log e  linkActivated IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow IWorkbenchPage getActivePage IEditorPart editorPart openEditor FileEditorInput fFile getEditorId fFileLineNumber editorPart ITextEditor ITextEditor textEditor ITextEditor editorPart IEditorInput editorPart getEditorInput fFileOffset IDocumentProvider textEditor getDocumentProvider CoreException DebugUIPlugin IDocument getDocument fFileOffset getLineOffset fFileLineNumber fFileLength getLineLength fFileLineNumber BadLocationException DebugUIPlugin fFileOffset fFileLength textEditor selectAndReveal fFileOffset fFileLength PartInitException DebugUIPlugin
see org eclipse debug ui console I Console Hyperlink link Entered public void link Entered  IConsoleHyperlink linkEntered linkEntered
see org eclipse debug ui console I Console Hyperlink link Exited public void link Exited  IConsoleHyperlink linkExited linkExited
private String get Editor Id if f Editor Id null I Workbench workbench DebugUI Plugin get Default get Workbench If there is a registered editor for the file use it I Editor Descriptor desc workbench get Editor Registry get Default Editor f File get Name if desc null default editor desc workbench get Editor Registry find Editor I Editor Registry SYSTEM EXTERNAL EDITOR ID f Editor Id desc get Id return f Editor Id  getEditorId fEditorId IWorkbench DebugUIPlugin getDefault getWorkbench IEditorDescriptor getEditorRegistry getDefaultEditor fFile getName getEditorRegistry findEditor IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID fEditorId getId fEditorId

Connects this console to the given streams proxy This associates the standard in out and error streams with the console Keyboard input will be written to the given proxy param streams Proxy  streamsProxy
Connects this console to the given stream monitor uniquely identified by the given identifier This allows for more than the standard in out error streams to be connected to the console param stream Monitor param stream Identifer  streamMonitor streamIdentifer
Adds the given hyperlink to this console The link will be notified when entered exited and activated p If the link s region offset length is within the console s document current bounds it is added immediately Otherwise the link is added when the console s document grows to contain the link s region p param link the hyperlink to add param offset the character offset within the console document where the text assoicated with the hyperlink begins param length the length of the associated hyperlink text 
Returns the region of text associated with the given hyperlink or code null code if the given hyperlink is not contained in this console param link a console hyperlink return region of text associated with the hyperlink or code null code 
Returns the document associated with this console return document 
Returns the process associated with this console return the process associated with this console 

Returns whether the console associated with this color provider s process can currently accept keyboard input This attribute is dynamic and may change over the lifetime of a process document return whether the console associated with this color provider s process can currently accept keyboard input 
Returns the color to draw output associated with the given stream param stream Identifer the identifier of the stream return Color  streamIdentifer
Connects this color provider to the given process and console This color provider should connect its streams to the given console document param process the process to connect this color provider to param console the console to connect this color provider to 
public void connect I Process process I Console console Disconnects this color provider public void disconnect  IProcess IConsole

public interface I Console Hyperlink Notification that the mouse has entered this link s region public void link Entered  IConsoleHyperlink linkEntered
public void link Entered Notification that the mouse has exited this link s region public void link Exited  linkEntered linkExited
Notification that this link has been activated Performs context specific linking 

Notification that a console document has been created for which this listener is registered param console console that has been created 
Notification that a line of text has been appended to the console The given region describes the offset and length of the line appended to the console excluding the line delimiter param line region describing the offset and length of line appended to the console excluding the line delimiter 
public void line Appended I Region line Disposes this console line tracker public void dispose  lineAppended IRegion

Notification that all output streams connected to the console have been closed No more lines will be appended after this method is called 

Returns the shared image managed under the given key or code null code if none p Note that clients b MUST NOT b dispose the image returned by this method p p See code I DebugUI Constants code for available images p param key the image key return the image or code null code if none see I DebugUI Constants public static Image get Image String key return Debug Plugin Images get Image key  IDebugUIConstants IDebugUIConstants getImage DebugPluginImages getImage
Returns the shared image descriptor managed under the given key or code null code if none p See code I DebugUI Constants code for available image descriptors p param key the image descriptor key return the image descriptor or code null code if none see I DebugUI Constants public static Image Descriptor get Image Descriptor String key return Debug Plugin Images get Image Descriptor key  IDebugUIConstants IDebugUIConstants ImageDescriptor getImageDescriptor DebugPluginImages getImageDescriptor
Returns the default image descriptor for the given element or code null code if none is defined public static Image Descriptor get Default Image Descriptor Object element String image Key get Default Image Key element if image Key null return null return Debug Plugin Images get Image Descriptor image Key  ImageDescriptor getDefaultImageDescriptor imageKey getDefaultImageKey imageKey DebugPluginImages getImageDescriptor imageKey
private static String get Default Image Key Object element return Default Label Provider DebugUI Plugin get Default Label Provider get Image Key element  getDefaultImageKey DefaultLabelProvider DebugUIPlugin getDefaultLabelProvider getImageKey
Returns the preference store for the debug UI plugin return preference store public static I Preference Store get Preference Store return DebugUI Plugin get Default get Preference Store  IPreferenceStore getPreferenceStore DebugUIPlugin getDefault getPreferenceStore
Returns a new debug model presentation that delegates to appropriate debug models p It is the client s responsibility dispose the presentation p see org eclipse jface viewers I Base Label Provider dispose return a debug model presentation since 2 0 public static I Debug Model Presentation new Debug Model Presentation return new Delegating Model Presentation  IBaseLabelProvider IDebugModelPresentation newDebugModelPresentation DelegatingModelPresentation
Returns a new debug model presentation for specified debug model or code null code if a presentation does not exist p It is the client s responsibility dispose the presentation p param identifier debug model identifier see org eclipse jface viewers I Base Label Provider dispose return a debug model presentation or code null code since 2 0 public static I Debug Model Presentation new Debug Model Presentation String identifier I Extension Point point Platform get Extension Registry get Extension Point DebugUI Plugin get Unique Identifier I DebugUI Constants ID DEBUG MODEL PRESENTATION if point null I Extension extensions point get Extensions for int i 0 i extensions length i I Extension extension extensions i I Configuration Element config Elements extension get Configuration Elements for int j 0 j config Elements length j I Configuration Element elt config Elements j String id elt get Attribute id NON NLS 1 if id null id equals identifier return new Lazy Model Presentation elt return null  IBaseLabelProvider IDebugModelPresentation newDebugModelPresentation IExtensionPoint getExtensionRegistry getExtensionPoint DebugUIPlugin getUniqueIdentifier IDebugUIConstants ID_DEBUG_MODEL_PRESENTATION IExtension getExtensions IExtension IConfigurationElement configElements getConfigurationElements configElements IConfigurationElement configElements getAttribute LazyModelPresentation
Returns the currently selected element in the debug view of the current workbench page or code null code if there is no current debug context or if not called from the UI thread return the currently selected debug context or code null code since 2 0 public static I Adaptable get Debug Context I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null I Workbench Page page window get Active Page if page null I Workbench Part part page find View I DebugUI Constants ID DEBUG VIEW if part null I Debug View view I Debug View part get Adapter I Debug View class if view null Viewer viewer view get Viewer if viewer null I Selection s viewer get Selection if s null if s instanceof I Structured Selection I Structured Selection ss I Structured Selection s if ss size 1 Object element ss get First Element if element instanceof I Adaptable return I Adaptable element return null  IAdaptable getDebugContext IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IWorkbenchPage getActivePage IWorkbenchPart findView IDebugUIConstants ID_DEBUG_VIEW IDebugView IDebugView getAdapter IDebugView getViewer ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement IAdaptable IAdaptable
Returns the currently selected resource in the active workbench window or code null code if none If an editor is active the resource adapater assocaited with the editor is returned if any return selected resource or code null code since 3 0 public static I Resource get Selected Resource return Selected Resource Manager get Default get Selected Resource  IResource getSelectedResource SelectedResourceManager getDefault getSelectedResource
Returns the process associated with the current debug context If there is no debug context currently the most recently launched process is returned If there is no current process code null code is returned return the current process or code null code since 2 0 public static I Process get Current Process I Adaptable context get Debug Context if context null I Launch launches Debug Plugin get Default get Launch Manager get Launches if launches length 0 context launches launches length 1 if context instanceof I Debug Element return I Debug Element context get Debug Target get Process if context instanceof I Process return I Process context if context instanceof I Launch I Launch launch I Launch context I Debug Target target launch get Debug Target if target null I Process process target get Process if process null return process I Process ps launch get Processes if ps length 0 return ps ps length 1 return null  IProcess getCurrentProcess IAdaptable getDebugContext ILaunch DebugPlugin getDefault getLaunchManager getLaunches IDebugElement IDebugElement getDebugTarget getProcess IProcess IProcess ILaunch ILaunch ILaunch IDebugTarget getDebugTarget IProcess getProcess IProcess getProcesses
Open the launch configuration dialog with the specified initial selection The selection may be code null code or contain any mix of code I Launch Configuration code or code I Launch Configuration Type code elements p Before opening a new dialog this method checks if there is an existing open launch configuration dialog If there is this dialog is used with the specified selection If there is no existing dialog a new one is created p p Note that if an existing dialog is reused the code mode code argument is ignored and the existing dialog keeps its original mode p param shell the parent shell for the launch configuration dialog param selection the initial selection for the dialog param mode the mode run or debug in which to open the launch configuration dialog This should be one of the constants defined in code I Launch Manager code return the return code from opening the launch configuration dialog one of code Window OK code or code Window CANCEL code since 2 0 deprecated use open Launch Configuration Dialog On Group Shell I Structured Selection String to specify the launch group that the dialog should be opened on This method will open on the launch group with the specified mode and a code null code category public static int open Launch Configuration Dialog Shell shell I Structured Selection selection String mode I Launch Group groups get Launch Groups for int i 0 i groups length i I Launch Group group groups i if group get Mode equals mode group get Category null return open Launch Configuration Dialog On Group shell selection group get Identifier return Window CANCEL  ILaunchConfiguration ILaunchConfigurationType ILaunchManager openLaunchConfigurationDialogOnGroup IStructuredSelection openLaunchConfigurationDialog IStructuredSelection ILaunchGroup getLaunchGroups ILaunchGroup getMode getCategory openLaunchConfigurationDialogOnGroup getIdentifier
Open the launch configuration dialog with the specified initial selection The selection may be code null code or contain any mix of code I Launch Configuration code or code I Launch Configuration Type code elements p Before opening a new dialog this method checks if there is an existing open launch configuration dialog If there is this dialog is used with the specified selection If there is no existing dialog a new one is created p p Note that if an existing dialog is reused the code mode code argument is ignored and the existing dialog keeps its original mode p param shell the parent shell for the launch configuration dialog param selection the initial selection for the dialog param group Identifier the identifier of the launch group to display corresponds to the identifier of a launch group extension return the return code from opening the launch configuration dialog one of code Window OK code or code Window CANCEL code since 2 1 public static int open Launch Configuration Dialog On Group Shell shell I Structured Selection selection String group Identifier return open Launch Configuration Dialog On Group shell selection group Identifier null  ILaunchConfiguration ILaunchConfigurationType groupIdentifier openLaunchConfigurationDialogOnGroup IStructuredSelection groupIdentifier openLaunchConfigurationDialogOnGroup groupIdentifier
Runnable r new Runnable see java lang Runnable run public void run Launch Configurations Dialog dialog Launch Configurations Dialog Launch Configurations Dialog get Currently Visible Launch Configuration Dialog if dialog null dialog set Initial Selection selection dialog do Initial Tree Selection if status null dialog handle Status status result 0 Window OK else dialog new Launch Configurations Dialog shell DebugUI Plugin get Default get Launch Configuration Manager get Launch Group group Identifier dialog set Open Mode Launch Configurations Dialog LAUNCH CONFIGURATION DIALOG OPEN ON SELECTION dialog set Initial Selection selection dialog set Initial Status status result 0 dialog open  LaunchConfigurationsDialog LaunchConfigurationsDialog LaunchConfigurationsDialog getCurrentlyVisibleLaunchConfigurationDialog setInitialSelection doInitialTreeSelection handleStatus LaunchConfigurationsDialog DebugUIPlugin getDefault getLaunchConfigurationManager getLaunchGroup groupIdentifier setOpenMode LaunchConfigurationsDialog LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION setInitialSelection setInitialStatus
Open the launch configuration dialog with the specified initial selection The selection may be code null code or contain any mix of code I Launch Configuration code or code I Launch Configuration Type code elements p Before opening a new dialog this method checks if there is an existing open launch configuration dialog If there is this dialog is used with the specified selection If there is no existing dialog a new one is created p p Note that if an existing dialog is reused the code mode code argument is ignored and the existing dialog keeps its original mode p p If a status is specified a status handler is consulted to handle the status The status handler is passed the instance of the launch configuration dialog that is opened This gives the status handler an opportunity to perform error handling initialization as required p param shell the parent shell for the launch configuration dialog param selection the initial selection for the dialog param group Identifier the identifier of the launch group to display corresponds to the identifier of a launch group extension param status the status to display in the dialog or code null code if none return the return code from opening the launch configuration dialog one of code Window OK code or code Window CANCEL code see org eclipse debug core I Status Handler since 2 1 public static int open Launch Configuration Dialog On Group final Shell shell final I Structured Selection selection final String group Identifier final I Status status final int result new int 1 Runnable r new Runnable see java lang Runnable run public void run Launch Configurations Dialog dialog Launch Configurations Dialog Launch Configurations Dialog get Currently Visible Launch Configuration Dialog if dialog null dialog set Initial Selection selection dialog do Initial Tree Selection if status null dialog handle Status status result 0 Window OK else dialog new Launch Configurations Dialog shell DebugUI Plugin get Default get Launch Configuration Manager get Launch Group group Identifier dialog set Open Mode Launch Configurations Dialog LAUNCH CONFIGURATION DIALOG OPEN ON SELECTION dialog set Initial Selection selection dialog set Initial Status status result 0 dialog open Busy Indicator show While DebugUI Plugin get Standard Display r return result 0  ILaunchConfiguration ILaunchConfigurationType groupIdentifier IStatusHandler openLaunchConfigurationDialogOnGroup IStructuredSelection groupIdentifier IStatus LaunchConfigurationsDialog LaunchConfigurationsDialog LaunchConfigurationsDialog getCurrentlyVisibleLaunchConfigurationDialog setInitialSelection doInitialTreeSelection handleStatus LaunchConfigurationsDialog DebugUIPlugin getDefault getLaunchConfigurationManager getLaunchGroup groupIdentifier setOpenMode LaunchConfigurationsDialog LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION setInitialSelection setInitialStatus BusyIndicator showWhile DebugUIPlugin getStandardDisplay
Open the launch configuration properties dialog on the specified launch configuration param shell the parent shell for the launch configuration dialog param configuration the configuration to display param group Identifier group identifier of the launch group the launch configuration belongs to return the return code from opening the launch configuration dialog one of code Window OK code or code Window CANCEL code since 2 1 public static int open Launch Configuration Properties Dialog Shell shell I Launch Configuration configuration String group Identifier return open Launch Configuration Properties Dialog shell configuration group Identifier null  groupIdentifier openLaunchConfigurationPropertiesDialog ILaunchConfiguration groupIdentifier openLaunchConfigurationPropertiesDialog groupIdentifier
Open the launch configuration properties dialog on the specified launch configuration param shell the parent shell for the launch configuration dialog param configuration the configuration to display param group Identifier group identifier of the launch group the launch configuration belongs to param status the status to display or code null code if none return the return code from opening the launch configuration dialog one of code Window OK code or code Window CANCEL code since 3 0 public static int open Launch Configuration Properties Dialog Shell shell I Launch Configuration configuration String group Identifier I Status status Launch Group Extension group DebugUI Plugin get Default get Launch Configuration Manager get Launch Group group Identifier if group null Launch Configuration Properties Dialog dialog new Launch Configuration Properties Dialog shell configuration group dialog set Initial Status status return dialog open return Window CANCEL  groupIdentifier openLaunchConfigurationPropertiesDialog ILaunchConfiguration groupIdentifier IStatus LaunchGroupExtension DebugUIPlugin getDefault getLaunchConfigurationManager getLaunchGroup groupIdentifier LaunchConfigurationPropertiesDialog LaunchConfigurationPropertiesDialog setInitialStatus
Open the launch configuration dialog on the specified launch configuration The dialog displays the tabs for a single configuration only a tree of launch configuration is not displayed and provides a launch run or debug button p If a status is specified a status handler is consulted to handle the status The status handler is passed the instance of the launch configuration dialog that is opened This gives the status handler an opportunity to perform error handling initialization as required p param shell the parent shell for the launch configuration dialog param configuration the configuration to display param group Identifier group identifier of the launch group the launch configuration belongs to param status the status to display or code null code if none return the return code from opening the launch configuration dialog one of code Window OK code or code Window CANCEL code since 2 1 public static int open Launch Configuration Dialog Shell shell I Launch Configuration configuration String group Identifier I Status status Launch Group Extension group DebugUI Plugin get Default get Launch Configuration Manager get Launch Group group Identifier if group null Launch Configuration Dialog dialog new Launch Configuration Dialog shell configuration group dialog set Initial Status status return dialog open return Window CANCEL  groupIdentifier openLaunchConfigurationDialog ILaunchConfiguration groupIdentifier IStatus LaunchGroupExtension DebugUIPlugin getDefault getLaunchConfigurationManager getLaunchGroup groupIdentifier LaunchConfigurationDialog LaunchConfigurationDialog setInitialStatus
Saves all dirty editors and builds the workspace according to current preference settings and returns whether a launch should proceed p The following preferences effect whether dirty editors are saved and or if the user is prompted to save dirty edtiors ul li PREF NEVER SAVE DIRTY EDITORS BEFORE LAUNCH li li PREF PROMPT SAVE DIRTY EDITORS BEFORE LAUNCH li li PREF AUTOSAVE DIRTY EDITORS BEFORE LAUNCH li ul The following preference effects whether a build is performed before launching if required ul li PREF BUILD BEFORE LAUNCH li ul p return whether a launch should proceed since 2 0 public static boolean save And Build Before Launch return DebugUI Plugin save And Build  PREF_NEVER_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH PREF_PROMPT_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH PREF_AUTOSAVE_DIRTY_EDITORS_BEFORE_LAUNCH PREF_BUILD_BEFORE_LAUNCH saveAndBuildBeforeLaunch DebugUIPlugin saveAndBuild
Saves all dirty editors according to current preference settings and returns whether a launch should proceed p The following preferences effect whether dirty editors are saved and or if the user is prompted to save dirty edtiors ul li PREF NEVER SAVE DIRTY EDITORS BEFORE LAUNCH li li PREF PROMPT SAVE DIRTY EDITORS BEFORE LAUNCH li li PREF AUTOSAVE DIRTY EDITORS BEFORE LAUNCH li ul p return whether a launch should proceed since 2 1 public static boolean save Before Launch return DebugUI Plugin pre Launch Save  PREF_NEVER_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH PREF_PROMPT_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH PREF_AUTOSAVE_DIRTY_EDITORS_BEFORE_LAUNCH saveBeforeLaunch DebugUIPlugin preLaunchSave
Saves and builds the workspace according to current preference settings and launches the given launch configuration in the specified mode param configuration the configuration to launch param mode launch mode run or debug since 2 1 public static void launch final I Launch Configuration configuration final String mode boolean launch In Background true try launch In Background configuration get Attribute I DebugUI Constants ATTR LAUNCH IN BACKGROUND true catch Core Exception e DebugUI Plugin log e if launch In Background DebugUI Plugin launch In Background configuration mode else DebugUI Plugin launch In Foreground configuration mode  ILaunchConfiguration launchInBackground launchInBackground getAttribute IDebugUIConstants ATTR_LAUNCH_IN_BACKGROUND CoreException DebugUIPlugin launchInBackground DebugUIPlugin launchInBackground DebugUIPlugin launchInForeground
Builds the workspace according to current preference settings and launches the given configuration in the specified mode returning the resulting launch object p The following preference effects whether a build is performed before launching if required ul li PREF BUILD BEFORE LAUNCH li ul p param configuration the configuration to launch param mode the mode to launch in param monitor progress monitor return the resulting launch object throws Core Exception if building or launching fails since 2 1 public static I Launch build And Launch I Launch Configuration configuration String mode I Progress Monitor monitor throws Core Exception return DebugUI Plugin build And Launch configuration mode monitor  PREF_BUILD_BEFORE_LAUNCH CoreException ILaunch buildAndLaunch ILaunchConfiguration IProgressMonitor CoreException DebugUIPlugin buildAndLaunch
Returns the perspective to switch to when a configuration of the given type is launched in the given mode or code null code if no switch should take place param type launch configuration type param mode launch mode identifier return perspective identifier or code null code since 3 0 public static String get Launch Perspective I Launch Configuration Type type String mode return DebugUI Plugin get Default get Perspective Manager get Launch Perspective type mode  getLaunchPerspective ILaunchConfigurationType DebugUIPlugin getDefault getPerspectiveManager getLaunchPerspective
Sets the perspective to switch to when a configuration of the given type is launched in the given mode code PERSPECTIVE NONE code indicates no perspective switch should take place code PERSPECTIVE DEFAULT code indicates a default perspective switch should take place as defined by the associated launch tab group extension param type launch configuration type param mode launch mode identifier param perspective identifier code PERSPECTIVE NONE code or code PERSPECTIVE DEFAULT code since 3 0 public static void set Launch Perspective I Launch Configuration Type type String mode String perspective DebugUI Plugin get Default get Perspective Manager set Launch Perspective type mode perspective  PERSPECTIVE_NONE PERSPECTIVE_DEFAULT PERSPECTIVE_NONE PERSPECTIVE_DEFAULT setLaunchPerspective ILaunchConfigurationType DebugUIPlugin getDefault getPerspectiveManager setLaunchPerspective
Returns whether the given launch configuraiton is private Generally private launch configurations should not be displayed to the user The private status of a launch configuration is determined by the code I DebugUI Constants ATTR PRIVATE code attribute param configuration launch configuration return whether the given launch configuration is private since 3 0 public static boolean is Private I Launch Configuration configuration return Launch Configuration Manager is Visible configuration  IDebugUIConstants ATTR_PRIVATE isPrivate ILaunchConfiguration LaunchConfigurationManager isVisible
Sets whether step filters should be applied to step commands This setting is a global option applied to all registered debug targets param use Step Filters whether step filters should be applied to step commands since 3 0 see org eclipse debug core model I Step Filters public static void set Use Step Filters boolean use Step Filters DebugUI Plugin get Default get Step Filter Manager set Use Step Filters use Step Filters  useStepFilters IStepFilters setUseStepFilters useStepFilters DebugUIPlugin getDefault getStepFilterManager setUseStepFilters useStepFilters
Returns whether step filters are applied to step commands return whether step filters are applied to step commands since 3 0 see org eclipse debug core model I Step Filters public static boolean is Use Step Filters return DebugUI Plugin get Default get Step Filter Manager is Use Step Filters  IStepFilters isUseStepFilters DebugUIPlugin getDefault getStepFilterManager isUseStepFilters
Returns the console associated with the given process or code null code if none param process a process return console associated with the given process or code null code if none since 3 0 public static I Console get Console I Process process return DebugUI Plugin get Default get Console Document Manager get Console process  IConsole getConsole IProcess DebugUIPlugin getDefault getConsoleDocumentManager getConsole
Returns the console associated with the given debug element or code null code if none param element a debug model element return console associated with the given element or code null code if none since 3 0 public static I Console get Console I Debug Element element I Process process element get Debug Target get Process if process null return get Console process return null  IConsole getConsole IDebugElement IProcess getDebugTarget getProcess getConsole
Returns all registered launch group extensions return all registered launch group extensions since 3 0 public static I Launch Group get Launch Groups return DebugUI Plugin get Default get Launch Configuration Manager get Launch Groups  ILaunchGroup getLaunchGroups DebugUIPlugin getDefault getLaunchConfigurationManager getLaunchGroups
Returns the launch group that the given launch configuration belongs to for the specified mode or code null code if none param configuration param mode return the launch group the given launch configuration belongs to for the specified mode or code null code if none public static I Launch Group get Launch Group I Launch Configuration configuration String mode return DebugUI Plugin get Default get Launch Configuration Manager get Launch Group configuration mode  ILaunchGroup getLaunchGroup ILaunchConfiguration DebugUIPlugin getDefault getLaunchConfigurationManager getLaunchGroup

protected class Environment Variable Content Provider implements I Structured Content Provider public Object get Elements Object input Element Environment Variable elements new Environment Variable 0 I Launch Configuration config I Launch Configuration input Element Map m try m config get Attribute I Launch Manager ATTR ENVIRONMENT VARIABLES Map null catch Core Exception e DebugUI Plugin log new Status I Status ERROR DebugUI Plugin get Unique Identifier I Status ERROR Error reading configuration e NON NLS 1 return elements if m null m is Empty elements new Environment Variable m size String var Names new String m size m key Set to Array var Names for int i 0 i m size i elements i new Environment Variable var Names i String m get var Names i return elements  EnvironmentVariableContentProvider IStructuredContentProvider getElements inputElement EnvironmentVariable EnvironmentVariable ILaunchConfiguration ILaunchConfiguration inputElement getAttribute ILaunchManager ATTR_ENVIRONMENT_VARIABLES CoreException DebugUIPlugin IStatus DebugUIPlugin getUniqueIdentifier IStatus isEmpty EnvironmentVariable varNames keySet toArray varNames EnvironmentVariable varNames varNames
return elements public void dispose 
table Viewer set Sorter new Viewer Sorter public int compare Viewer iviewer Object e1 Object e2 if e1 null return 1 else if e2 null return 1 else return Environment Variable e1 get Name compare To Ignore Case Environment Variable e2 get Name  tableViewer setSorter ViewerSorter EnvironmentVariable getName compareToIgnoreCase EnvironmentVariable getName
public void input Changed Viewer viewer Object old Input Object new Input if new Input null return if viewer instanceof Table Viewer Table Viewer table Viewer Table Viewer viewer if table Viewer get Table is Disposed return table Viewer set Sorter new Viewer Sorter public int compare Viewer iviewer Object e1 Object e2 if e1 null return 1 else if e2 null return 1 else return Environment Variable e1 get Name compare To Ignore Case Environment Variable e2 get Name  inputChanged oldInput newInput newInput TableViewer TableViewer tableViewer TableViewer tableViewer getTable isDisposed tableViewer setSorter ViewerSorter EnvironmentVariable getName compareToIgnoreCase EnvironmentVariable getName
public class Environment Variable Label Provider extends Label Provider implements I Table Label Provider public String get Column Text Object element int column Index String result null if element null Environment Variable var Environment Variable element switch column Index case 0 variable result var get Name break case 1 value result var get Value break return result  EnvironmentVariableLabelProvider LabelProvider ITableLabelProvider getColumnText columnIndex EnvironmentVariable EnvironmentVariable columnIndex getName getValue
return result public Image get Column Image Object element int column Index return null  getColumnImage columnIndex
public void create Control Composite parent Create main composite Composite main Composite new Composite parent SWT NONE set Control main Composite Workbench Help set Help get Control I Debug Help Context Ids LAUNCH CONFIGURATION DIALOG ENVIRONMENT TAB Grid Layout layout new Grid Layout layout num Columns 2 Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL main Composite set Layout layout main Composite set Layout Data grid Data main Composite set Font parent get Font create Environment Table main Composite create Table Buttons main Composite create Append Replace main Composite Dialog apply Dialog Font main Composite  createControl mainComposite setControl mainComposite WorkbenchHelp setHelp getControl IDebugHelpContextIds LAUNCH_CONFIGURATION_DIALOG_ENVIRONMENT_TAB GridLayout GridLayout numColumns GridData gridData GridData GridData FILL_HORIZONTAL mainComposite setLayout mainComposite setLayoutData gridData mainComposite setFont getFont createEnvironmentTable mainComposite createTableButtons mainComposite createAppendReplace mainComposite applyDialogFont mainComposite
append Environment create Radio Button append Replace Composite Launch Configurations Messages get String Environment Tab 16 NON NLS 1 append Environment add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  appendEnvironment createRadioButton appendReplaceComposite LaunchConfigurationsMessages getString EnvironmentTab appendEnvironment addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
Creates and configures the widgets which allow the user to choose whether the specified environment should be appended to the native environment or if it should completely replace it param parent the composite in which the widgets should be created protected void create Append Replace Composite parent Composite append Replace Composite new Composite parent SWT NONE Grid Data grid Data new Grid Data grid Data horizontal Span 2 Grid Layout layout new Grid Layout append Replace Composite set Layout Data grid Data append Replace Composite set Layout layout append Replace Composite set Font parent get Font append Environment create Radio Button append Replace Composite Launch Configurations Messages get String Environment Tab 16 NON NLS 1 append Environment add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog replace Environment create Radio Button append Replace Composite Launch Configurations Messages get String Environment Tab 17 NON NLS 1  createAppendReplace appendReplaceComposite GridData gridData GridData gridData horizontalSpan GridLayout GridLayout appendReplaceComposite setLayoutData gridData appendReplaceComposite setLayout appendReplaceComposite setFont getFont appendEnvironment createRadioButton appendReplaceComposite LaunchConfigurationsMessages getString EnvironmentTab appendEnvironment addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog replaceEnvironment createRadioButton appendReplaceComposite LaunchConfigurationsMessages getString EnvironmentTab
Updates the enablement of the append replace widgets The widgets should disable when there are no environment variables specified protected void update Append Replace boolean enable environment Table get Table get Item Count 0 append Environment set Enabled enable replace Environment set Enabled enable  updateAppendReplace environmentTable getTable getItemCount appendEnvironment setEnabled replaceEnvironment setEnabled
environment Table set Column Properties env Table Column Properties environment Table add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Table Selection Changed event  environmentTable setColumnProperties envTableColumnProperties environmentTable addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleTableSelectionChanged
environment Table add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if environment Table get Selection is Empty handle Env Edit Button Selected  environmentTable addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent environmentTable getSelection isEmpty handleEnvEditButtonSelected
Creates and configures the table that displayed the key value pairs that comprise the environment param parent the composite in which the table should be created protected void create Environment Table Composite parent Font font parent get Font Create table composite Composite table Composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 1 Grid Data grid Data new Grid Data Grid Data FILL BOTH grid Data height Hint 150 table Composite set Layout layout table Composite set Layout Data grid Data table Composite set Font font Create label Label label new Label table Composite SWT NONE label set Font font label set Text Launch Configurations Messages get String Environment Tab Environment variables to set  3 NON NLS 1 Create table environment Table new Table Viewer table Composite SWT BORDER SWT H SCROLL SWT V SCROLL SWT MULTI SWT FULL SELECTION Table table environment Table get Table Table Layout table Layout new Table Layout table set Layout table Layout table set Header Visible true table set Font font grid Data new Grid Data Grid Data FILL BOTH environment Table get Control set Layout Data grid Data environment Table set Content Provider new Environment Variable Content Provider environment Table set Label Provider new Environment Variable Label Provider environment Table set Column Properties env Table Column Properties environment Table add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Table Selection Changed event environment Table add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if environment Table get Selection is Empty handle Env Edit Button Selected Create columns for int i 0 i env Table Column Headers length i table Layout add Column Data env Table Column Layouts i Table Column tc new Table Column table SWT NONE i tc set Resizable env Table Column Layouts i resizable tc set Text env Table Column Headers i  createEnvironmentTable getFont tableComposite GridLayout GridLayout marginHeight marginWidth numColumns GridData gridData GridData GridData FILL_BOTH gridData heightHint tableComposite setLayout tableComposite setLayoutData gridData tableComposite setFont tableComposite setFont setText LaunchConfigurationsMessages getString EnvironmentTab Environment_variables_to_set__3 environmentTable TableViewer tableComposite H_SCROLL V_SCROLL FULL_SELECTION environmentTable getTable TableLayout tableLayout TableLayout setLayout tableLayout setHeaderVisible setFont gridData GridData GridData FILL_BOTH environmentTable getControl setLayoutData gridData environmentTable setContentProvider EnvironmentVariableContentProvider environmentTable setLabelProvider EnvironmentVariableLabelProvider environmentTable setColumnProperties envTableColumnProperties environmentTable addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleTableSelectionChanged environmentTable addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent environmentTable getSelection isEmpty handleEnvEditButtonSelected envTableColumnHeaders tableLayout addColumnData envTableColumnLayouts TableColumn TableColumn setResizable envTableColumnLayouts setText envTableColumnHeaders
Responds to a selection changed event in the environment table param event the selection change event protected void handle Table Selection Changed Selection Changed Event event int size I Structured Selection event get Selection size env Edit Button set Enabled size 1 env Remove Button set Enabled size 0  handleTableSelectionChanged SelectionChangedEvent IStructuredSelection getSelection envEditButton setEnabled envRemoveButton setEnabled
env Add Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Env Add Button Selected  envAddButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleEnvAddButtonSelected
env Select Button create Push Button button Composite Launch Configurations Messages get String Environment Tab 18 null NON NLS 1 env Select Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Env Select Button Selected  envSelectButton createPushButton buttonComposite LaunchConfigurationsMessages getString EnvironmentTab envSelectButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleEnvSelectButtonSelected
env Edit Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Env Edit Button Selected  envEditButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleEnvEditButtonSelected
env Remove Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Env Remove Button Selected  envRemoveButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleEnvRemoveButtonSelected
Creates the add edit remove buttons for the environment table param parent the composite in which the buttons should be created protected void create Table Buttons Composite parent Create button composite Composite button Composite new Composite parent SWT NONE Grid Layout glayout new Grid Layout glayout margin Height 0 glayout margin Width 0 glayout num Columns 1 Grid Data gdata new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data HORIZONTAL ALIGN END button Composite set Layout glayout button Composite set Layout Data gdata button Composite set Font parent get Font create Vertical Spacer button Composite 1 Create buttons env Add Button create Push Button button Composite Launch Configurations Messages get String Environment Tab New 4 null NON NLS 1 env Add Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Env Add Button Selected env Select Button create Push Button button Composite Launch Configurations Messages get String Environment Tab 18 null NON NLS 1 env Select Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Env Select Button Selected env Edit Button create Push Button button Composite Launch Configurations Messages get String Environment Tab Edit 5 null NON NLS 1 env Edit Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Env Edit Button Selected env Edit Button set Enabled false env Remove Button create Push Button button Composite Launch Configurations Messages get String Environment Tab Remove 6 null NON NLS 1 env Remove Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Env Remove Button Selected env Remove Button set Enabled false  createTableButtons buttonComposite GridLayout GridLayout marginHeight marginWidth numColumns GridData GridData GridData VERTICAL_ALIGN_BEGINNING GridData HORIZONTAL_ALIGN_END buttonComposite setLayout buttonComposite setLayoutData buttonComposite setFont getFont createVerticalSpacer buttonComposite envAddButton createPushButton buttonComposite LaunchConfigurationsMessages getString EnvironmentTab New_4 envAddButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleEnvAddButtonSelected envSelectButton createPushButton buttonComposite LaunchConfigurationsMessages getString EnvironmentTab envSelectButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleEnvSelectButtonSelected envEditButton createPushButton buttonComposite LaunchConfigurationsMessages getString EnvironmentTab Edit_5 envEditButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleEnvEditButtonSelected envEditButton setEnabled envRemoveButton createPushButton buttonComposite LaunchConfigurationsMessages getString EnvironmentTab Remove_6 envRemoveButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleEnvRemoveButtonSelected envRemoveButton setEnabled
Adds a new environment variable to the table protected void handle Env Add Button Selected Multiple Input Dialog dialog new Multiple Input Dialog get Shell Launch Configurations Messages get String Environment Tab 22 NON NLS 1 dialog add Text Field NAME LABEL null false dialog add Variables Field VALUE LABEL null true if dialog open Window OK return String name dialog get String Value NAME LABEL String value dialog get String Value VALUE LABEL if name null value null name length 0 value length 0 add Variable new Environment Variable name trim value trim update Append Replace  handleEnvAddButtonSelected MultipleInputDialog MultipleInputDialog getShell LaunchConfigurationsMessages getString EnvironmentTab addTextField NAME_LABEL addVariablesField VALUE_LABEL getStringValue NAME_LABEL getStringValue VALUE_LABEL addVariable EnvironmentVariable updateAppendReplace
Attempts to add the given variable Returns whether the variable was added or not as when the user answers not to overwrite an existing variable param variable the variable to add return whether the variable was added protected boolean add Variable Environment Variable variable String name variable get Name Table Item items environment Table get Table get Items for int i 0 i items length i Environment Variable existing Variable Environment Variable items i get Data if existing Variable get Name equals name boolean over Write Message Dialog open Question get Shell Launch Configurations Messages get String Environment Tab 12 Message Format format Launch Configurations Messages get String Environment Tab 13 new String name NON NLS 1 NON NLS 2 if over Write return false environment Table remove existing Variable break environment Table add variable update Launch Configuration Dialog return true  addVariable EnvironmentVariable getName TableItem environmentTable getTable getItems EnvironmentVariable existingVariable EnvironmentVariable getData existingVariable getName overWrite MessageDialog openQuestion getShell LaunchConfigurationsMessages getString EnvironmentTab MessageFormat LaunchConfigurationsMessages getString EnvironmentTab overWrite environmentTable existingVariable environmentTable updateLaunchConfigurationDialog
Displays a dialog that allows user to select native environment variables to add to the table private void handle Env Select Button Selected get Environment Variables from the OS Map env Variables get Native Environment get Environment Variables from the table Table Item items environment Table get Table get Items for int i 0 i items length i Environment Variable var Environment Variable items i get Data env Variables remove var get Name List Selection Dialog dialog new Native Environment Dialog get Shell env Variables create Selection Dialog Content Provider create Selection Dialog Label Provider Launch Configurations Messages get String Environment Tab 19 NON NLS 1 dialog set Title Launch Configurations Messages get String Environment Tab 20 NON NLS 1 int button dialog open if button Window OK Object selected dialog get Result for int i 0 i selected length i environment Table add selected i update Append Replace update Launch Configuration Dialog  handleEnvSelectButtonSelected envVariables getNativeEnvironment TableItem environmentTable getTable getItems EnvironmentVariable EnvironmentVariable getData envVariables getName ListSelectionDialog NativeEnvironmentDialog getShell envVariables createSelectionDialogContentProvider createSelectionDialogLabelProvider LaunchConfigurationsMessages getString EnvironmentTab setTitle LaunchConfigurationsMessages getString EnvironmentTab getResult environmentTable updateAppendReplace updateLaunchConfigurationDialog
private I Label Provider create Selection Dialog Label Provider return new I Label Provider public Image get Image Object element return null  ILabelProvider createSelectionDialogLabelProvider ILabelProvider getImage
return null public String get Text Object element Environment Variable var Environment Variable element return var get Name var get Value NON NLS 1 NON NLS 2  getText EnvironmentVariable EnvironmentVariable getName getValue
return var get Name var get Value NON NLS 1 NON NLS 2 public void add Listener I Label Provider Listener listener  getName getValue addListener ILabelProviderListener
public void add Listener I Label Provider Listener listener public void dispose  addListener ILabelProviderListener
public void dispose public boolean is Label Property Object element String property return false  isLabelProperty
return false public void remove Listener I Label Provider Listener listener  removeListener ILabelProviderListener
Creates a label provider for the native native environment variable selection dialog return A label provider for the native native environment variable selection dialog private I Label Provider create Selection Dialog Label Provider return new I Label Provider public Image get Image Object element return null public String get Text Object element Environment Variable var Environment Variable element return var get Name var get Value NON NLS 1 NON NLS 2 public void add Listener I Label Provider Listener listener public void dispose public boolean is Label Property Object element String property return false public void remove Listener I Label Provider Listener listener  ILabelProvider createSelectionDialogLabelProvider ILabelProvider getImage getText EnvironmentVariable EnvironmentVariable getName getValue addListener ILabelProviderListener isLabelProperty removeListener ILabelProviderListener
Comparator comparator new Comparator public int compare Object o1 Object o2 String s1 String o1 String s2 String o2 return s1 compare To s2  compareTo
return new I Structured Content Provider public Object get Elements Object input Element Environment Variable elements null if input Element instanceof Hash Map Comparator comparator new Comparator public int compare Object o1 Object o2 String s1 String o1 String s2 String o2 return s1 compare To s2 Tree Map env Vars new Tree Map comparator env Vars put All Map input Element elements new Environment Variable env Vars size int index 0 for Iterator iterator env Vars key Set iterator iterator has Next index Object key iterator next elements index Environment Variable env Vars get key return elements  IStructuredContentProvider getElements inputElement EnvironmentVariable inputElement HashMap compareTo TreeMap envVars TreeMap envVars putAll inputElement EnvironmentVariable envVars envVars keySet hasNext EnvironmentVariable envVars
return elements public void dispose 
public void dispose public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
Creates a content provider for the native native environment variable selection dialog return A content provider for the native native environment variable selection dialog private I Structured Content Provider create Selection Dialog Content Provider return new I Structured Content Provider public Object get Elements Object input Element Environment Variable elements null if input Element instanceof Hash Map Comparator comparator new Comparator public int compare Object o1 Object o2 String s1 String o1 String s2 String o2 return s1 compare To s2 Tree Map env Vars new Tree Map comparator env Vars put All Map input Element elements new Environment Variable env Vars size int index 0 for Iterator iterator env Vars key Set iterator iterator has Next index Object key iterator next elements index Environment Variable env Vars get key return elements public void dispose public void input Changed Viewer viewer Object old Input Object new Input  IStructuredContentProvider createSelectionDialogContentProvider IStructuredContentProvider getElements inputElement EnvironmentVariable inputElement HashMap compareTo TreeMap envVars TreeMap envVars putAll inputElement EnvironmentVariable envVars envVars keySet hasNext EnvironmentVariable envVars inputChanged oldInput newInput
Gets native environment variable from the Launch Manager Creates Environment Variable objects return Map of name Environment Variable pairs based on native environment private Map get Native Environment Map string Vars Debug Plugin get Default get Launch Manager get Native Environment Hash Map vars new Hash Map for Iterator i string Vars key Set iterator i has Next String key String i next String value String string Vars get key vars put key new Environment Variable key value return vars  LaunchManager EnvironmentVariable EnvironmentVariable getNativeEnvironment stringVars DebugPlugin getDefault getLaunchManager getNativeEnvironment HashMap HashMap stringVars keySet hasNext stringVars EnvironmentVariable
Creates an editor for the value of the selected environment variable private void handle Env Edit Button Selected I Structured Selection sel I Structured Selection environment Table get Selection Environment Variable var Environment Variable sel get First Element if var null return String original Name var get Name String value var get Value Multiple Input Dialog dialog new Multiple Input Dialog get Shell Launch Configurations Messages get String Environment Tab 11 NON NLS 1 dialog add Text Field NAME LABEL original Name false dialog add Variables Field VALUE LABEL value true if dialog open Window OK return String name dialog get String Value NAME LABEL value dialog get String Value VALUE LABEL if original Name equals name if add Variable new Environment Variable name value environment Table remove var else var set Value value environment Table update var null update Launch Configuration Dialog  handleEnvEditButtonSelected IStructuredSelection IStructuredSelection environmentTable getSelection EnvironmentVariable EnvironmentVariable getFirstElement originalName getName getValue MultipleInputDialog MultipleInputDialog getShell LaunchConfigurationsMessages getString EnvironmentTab addTextField NAME_LABEL originalName addVariablesField VALUE_LABEL getStringValue NAME_LABEL getStringValue VALUE_LABEL originalName addVariable EnvironmentVariable environmentTable setValue environmentTable updateLaunchConfigurationDialog
Removes the selected environment variable from the table private void handle Env Remove Button Selected I Structured Selection sel I Structured Selection environment Table get Selection environment Table get Control set Redraw false for Iterator i sel iterator i has Next Environment Variable var Environment Variable i next environment Table remove var environment Table get Control set Redraw true update Append Replace update Launch Configuration Dialog  handleEnvRemoveButtonSelected IStructuredSelection IStructuredSelection environmentTable getSelection environmentTable getControl setRedraw hasNext EnvironmentVariable EnvironmentVariable environmentTable environmentTable getControl setRedraw updateAppendReplace updateLaunchConfigurationDialog
Updates the environment table for the given launch configuration param configuration protected void update Environment I Launch Configuration configuration environment Table set Input configuration  updateEnvironment ILaunchConfiguration environmentTable setInput
see org eclipse debug ui I Launch Configuration Tab set Defaults org eclipse debug core I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy
public void initialize From I Launch Configuration configuration boolean append true try append configuration get Attribute I Launch Manager ATTR APPEND ENVIRONMENT VARIABLES true catch Core Exception e DebugUI Plugin log e get Status if append append Environment set Selection true replace Environment set Selection false else replace Environment set Selection true append Environment set Selection false update Environment configuration update Append Replace  initializeFrom ILaunchConfiguration getAttribute ILaunchManager ATTR_APPEND_ENVIRONMENT_VARIABLES CoreException DebugUIPlugin getStatus appendEnvironment setSelection replaceEnvironment setSelection replaceEnvironment setSelection appendEnvironment setSelection updateEnvironment updateAppendReplace
Stores the environment in the given configuration see org eclipse debug ui I Launch Configuration Tab perform Apply org eclipse debug core I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy configuration Convert the table s items into a Map so that this can be saved in the configuration s attributes Table Item items environment Table get Table get Items Map map new Hash Map items length for int i 0 i items length i Environment Variable var Environment Variable items i get Data map put var get Name var get Value if map size 0 configuration set Attribute I Launch Manager ATTR ENVIRONMENT VARIABLES Map null else configuration set Attribute I Launch Manager ATTR ENVIRONMENT VARIABLES map configuration set Attribute I Launch Manager ATTR APPEND ENVIRONMENT VARIABLES append Environment get Selection  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy TableItem environmentTable getTable getItems HashMap EnvironmentVariable EnvironmentVariable getData getName getValue setAttribute ILaunchManager ATTR_ENVIRONMENT_VARIABLES setAttribute ILaunchManager ATTR_ENVIRONMENT_VARIABLES setAttribute ILaunchManager ATTR_APPEND_ENVIRONMENT_VARIABLES appendEnvironment getSelection
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Launch Configurations Messages get String Environment Tab Environment 7 NON NLS 1  ILaunchConfigurationTab getName getName LaunchConfigurationsMessages getString EnvironmentTab Environment_7
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return Debug Plugin Images get Image I DebugUI Constants IMG OBJS ENVIRONMENT  ILaunchConfigurationTab getImage getImage DebugPluginImages getImage IDebugUIConstants IMG_OBJS_ENVIRONMENT
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy do nothing when activated  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy do nothing when deactivated  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
private class Native Environment Dialog extends List Selection Dialog public Native Environment Dialog Shell parent Shell Object input I Structured Content Provider content Provider I Label Provider label Provider String message super parent Shell input content Provider label Provider message set Shell Style get Shell Style SWT RESIZE  NativeEnvironmentDialog ListSelectionDialog NativeEnvironmentDialog parentShell IStructuredContentProvider contentProvider ILabelProvider labelProvider parentShell contentProvider labelProvider setShellStyle getShellStyle
protected I Dialog Settings get Dialog Settings I Dialog Settings settings DebugUI Plugin get Default get Dialog Settings I Dialog Settings section settings get Section get Dialog Settings Section Name if section null section settings add New Section get Dialog Settings Section Name return section  IDialogSettings getDialogSettings IDialogSettings DebugUIPlugin getDefault getDialogSettings IDialogSettings getSection getDialogSettingsSectionName addNewSection getDialogSettingsSectionName
Returns the name of the section that this dialog stores its settings in return String protected String get Dialog Settings Section Name return I DebugUI Constants PLUGIN ID ENVIRONMENT TAB NATIVE ENVIROMENT DIALOG NON NLS 1  getDialogSettingsSectionName IDebugUIConstants PLUGIN_ID ENVIRONMENT_TAB NATIVE_ENVIROMENT_DIALOG
protected Point get Initial Location Point initial Size Point initial Location Dialog Settings Helper get Initial Location get Dialog Settings Section Name if initial Location null return initial Location return super get Initial Location initial Size  getInitialLocation initialSize initialLocation DialogSettingsHelper getInitialLocation getDialogSettingsSectionName initialLocation initialLocation getInitialLocation initialSize
see org eclipse jface window Window get Initial Size protected Point get Initial Size Point size super get Initial Size return Dialog Settings Helper get Initial Size get Dialog Settings Section Name size  getInitialSize getInitialSize getInitialSize DialogSettingsHelper getInitialSize getDialogSettingsSectionName
see org eclipse jface window Window close public boolean close Dialog Settings Helper persist Shell Geometry get Shell get Dialog Settings Section Name return super close  DialogSettingsHelper persistShellGeometry getShell getDialogSettingsSectionName

public interface I Debug Editor Presentation Positions and adds annotations to the given editor for the specified stack frame and returns whether any annotations were added When code true code is returned a call will be made to remove anntations when the source selection is cleared for the stack frame When code false code is returned the debugger will position and add standard annotations to the editor and a corresponding call to remove annotations will not be made This method is called when the debugger is has opened an editor to display source for the given stack frame param editor Part the editor the debugger has opened param frame the stack frame for which the debugger is displaying source  IDebugEditorPresentation editorPart
Removes any debug related annotations from the given editor This method is called when the debugger clears the source selection in an editor opened by the debugger For example when a debug session is resumed or terminated param editor Part an editor that annotations were added to for a stack frame param thread the thread for which stack frame annotations were added to the editor  editorPart

public final static String DISPLAY VARIABLE TYPE NAMES I DebugUI Constants PLUGIN ID display Variable Type Names NON NLS 1 Sets a presentation attribute of this label provider For example see the presentation attribute code DISPLAY VARIABLE TYPE NAMES code defined by this interface param attribute the presentation attribute identifier param value the value of the attribute  DISPLAY_VARIABLE_TYPE_NAMES IDebugUIConstants PLUGIN_ID displayVariableTypeNames DISPLAY_VARIABLE_TYPE_NAMES
void set Attribute String attribute Object value Returns an image for the element or code null code if a default image should be used param element the debug model element return an image for the element or code null code if a default image should be used see I Label Provider  setAttribute ILabelProvider
public Image get Image Object element Returns a label for the element or code null code if a default label should be used param element the debug model element return a label for the element or code null code if a default label should be used see I Label Provider  getImage ILabelProvider
Computes a detailed description of the given value reporting the result to the specified listener This allows a presentation to provide extra details about a selected value in the variable detail portion of the variables view Since this can be a long running operation the details are reported back to the specified listener asynchronously If code null code is reported the value s value string is displayed code I Value get Value String code param value the value for which a detailed description is required param listener the listener to report the details to asynchronously since 2 0  IValue getValueString

Returns the viewer contained in this debug view return viewer 
Returns the debug model presentation for this view specified by the debug model identifier param id the debug model identifier that corresponds to the code id code attribute of a debug model presentation extension return the debug model presentation or code null code if no presentation is registered for the specified id 
Installs the given action under the given action id If the action has an id that maps to one of the global action ids defined by this interface the action is registered as a global action handler If the action is an instance of code I Update code it is added remove from the collection of updateables associated with this view param actionID the action id param action the action or code null code to clear it see get Action  IUpdate getAction
Adds the given I Update to this view s collection of updatable objects Allows the view to periodically update these registered objects Has no effect if an identical I Update is already registered param updatable The I Update instance to be added  IUpdate IUpdate IUpdate
Removes the given I Update from this view s collection of updatable objects Has no effect if an identical I Update was not already registered param updatable The I Update instance to be removed  IUpdate IUpdate IUpdate
Returns the action installed under the given action id param actionID the action id return the action or code null code if none see set Action  setAction
Returns the context menu manager for this view return the context menu manager for this view or code null code if none deprecated See Abstract Debug View get Context Menu Managers  AbstractDebugView getContextMenuManagers

Adjusts the enable state of this dialog s buttons to reflect the state of the active tab group p This may be called by to force a button state update p 
Updates the message or error message shown in the message line to reflect the state of the currently active tab in this launch configuration dialog p This method may be called to force a message update p 
Sets the contents of the name field to the given name param name new name value 
Returns a unique launch configuration name using the given name as a seed param name seed from which to generate a new unique name 
Returns the tabs currently being displayed or code null code if none return currently displayed tabs or code null code 
Returns the currently active code I Launch Configuration Tab code being displayed or code null code if there is none return currently active code I Launch Configuration Tab code or code null code  ILaunchConfigurationTab ILaunchConfigurationTab
Returns the mode in which this dialog was opened run or debug return one of code RUN MODE code or code DEBUG MODE code defined in code I Launch Manager code see org eclipse debug core I Launch Manager  RUN_MODE DEBUG_MODE ILaunchManager ILaunchManager
Sets the displayed tab to the given tab Has no effect if the specified tab is not one of the tabs being displayed in the dialog currently param tab the tab to display activate since 2 1 
Sets the displayed tab to the tab with the given index Has no effect if the specified index is not within the limits of the tabs returned by code get Tabs code param index the index of the tab to dispay since 2 1  getTabs

Creates the top level control for this launch configuration tab under the given parent composite This method is called once on tab creation after code set Launch Configuration Dialog code is called p Implementors are responsible for ensuring that the created control can be accessed via code get Control code p param parent the parent composite  setLaunchConfigurationDialog getControl
Returns the top level control for this tab p May return code null code if the control has not been created yet p return the top level control or code null code 
Initializes the given launch configuration with default values for this tab This method is called when a new launch configuration is created such that the configuration can be initialized with meaningful values This method may be called before this tab s control is created param configuration launch configuration 
Initializes this tab s controls with values from the given launch configuration This method is called when a configuration is selected to view or edit after this tab s control has been created param configuration launch configuration 
Notifies this launch configuration tab that it has been disposed Marks the end of this tab s lifecycle allowing this tab to perform any cleanup required 
Copies values from this tab into the given launch configuration param configuration launch configuration 
Returns the current error message for this tab May be code null code to indicate no error message p An error message should describe some error state as opposed to a message which may simply provide instruction or information to the user p return the error message or code null code if none 
Returns the current message for this tab p A message provides instruction or information to the user as opposed to an error message which should describe some error state p return the message or code null code if none 
Returns whether this tab is in a valid state in the context of the specified launch configuration p This information is typically used by the launch configuration dialog to decide when it is okay to launch p param launch Config launch configuration which provides context for validating this tab This value must not be code null code return whether this tab is in a valid state  launchConfig
Returns whether this tab is in a state that allows the launch configuration whose values this tab is showing to be saved This differs from code is Valid code in that code can Save code determines if this tab prevents the current launch configuration from being saved whereas code is Valid code determines if this tab prevents the current launch configuration from being launched p This information is typically used by the launch configuration dialog to decide when it is okay to save a launch configuration p return whether this tab is in a state that allows the current launch configuration to be saved  isValid canSave isValid
Sets the launch configuration dialog that hosts this tab This is the first method called on a launch configuration tab and marks the beginning of this tab s lifecycle param dialog launch configuration dialog 
Notifies this tab that the specified configuration has been launched resulting in the given launch This method can be called when a tab s control does not exist to support single click launching param launch the result of launching the current launch configuration deprecated As of R3 0 this method is no longer called by the launch framework Since tabs do not exist when launching is performed elsewhere than the launch dialog this method cannot be relied upon for launching functionality 
Returns the name of this tab return the name of this tab 
Returns the image for this tab or code null code if none return the image for this tab or code null code if none 
Notification that this tab has become the active tab in the launch configuration dialog param working Copy the launch configuration being edited since 3 0  workingCopy
Notification that this tab is no longer the active tab in the launch configuration dialog param working Copy the launch configuration being edited since 3 0  workingCopy

Creates the tabs contained in this tab group for the specified launch mode The tabs control s are not created This is the fist method called in the lifecycle of a tab group param dialog the launch configuration dialog this tab group is contained in param mode the mode the launch configuration dialog was opened in 
Returns the tabs contained in this tab group return the tabs contained in this tab group 
Notifies this launch configuration tab group that it has been disposed and disposes this group s tabs Marks the end of this tab group s lifecycle allowing this tab group to perform any cleanup required 
Initializes the given launch configuration with default values for this tab group This method is called when a new launch configuration is created such that the configuration can be initialized with meaningful values This method may be called before tab controls are created param configuration launch configuration 
Initializes this group s tab controls with values from the given launch configuration This method is called when a configuration is selected to view or edit param configuration launch configuration 
Copies values from this group s tabs into the given launch configuration param configuration launch configuration 
Notifies this tab that a configuration has been launched resulting in the given launch This method can be called when a tab s control does not exist to support single click launching param launch the result of launching the current launch configuration deprecated As of R3 0 this method is no longer called by the launch framework Since tabs do not exist when launching is performed elsewhere than the launch dialog this method cannot be relied upon for launching functionality 

Returns the image for this launch group or code null code if none return the image for this launch group or code null code if none 
Returns the banner image for this launch group or code null code if none return the banner image for this launch group or code null code if none 
Returns the label for this launch group return the label for this launch group 
Returns the id for this launch group return the id for this launch group 
Returns the category for this launch group possibly code null code return the category for this launch group possibly code null code 
Returns the mode for this launch group return the mode for this launch group 
Returns whether this launch group is public return boolean 

Locates a launchable entity in the given selection and launches an application in the specified mode This launch configuration shortcut is responsible for progress reporting as well as error handling in the event that a launchable entity cannot be found or launching fails param selection workbench selection param mode one of the launch modes defined by the launch manager see org eclipse debug core I Launch Manager  ILaunchManager
Locates a launchable entity in the given active editor and launches an application in the specified mode This launch configuration shortcut is responsible for progress reporting as well as error handling in the event that a launchable entity cannot be found or launching fails param editor the active editor in the workbench param mode one of the launch modes defined by the launch manager see org eclipse debug core I Launch Manager  ILaunchManager

Returns an editor input that should be used to display the given object in an editor or code null code if unable to provide an editor input for the given object param element a debug model element breakpoint or a source element that was returned by a source locator s code get Source Element I Stack Frame code method return an editor input or code null code if none  getSourceElement IStackFrame
Returns the id of the editor to use to display the given editor input and object or code null code if unable to provide an editor id param input an editor input that was previously retrieved from this source presentation s code get Editor Input code method param element the object that was used in the call to code get Editor Input code that corresponds to the given editor input return an editor id or code null code if none  getEditorInput getEditorInput

public interface I Value Detail Listener Notifies this listener that the details for the given value have been computed as the specified result param value the value for which the detail is provided param result the detailed description of the given value  IValueDetailListener

f Refresh Button create Check Button main Composite String Substitution Messages get String Refresh Tab 31 NON NLS 1 f Refresh Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Enabled State update Launch Configuration Dialog  fRefreshButton createCheckButton mainComposite StringSubstitutionMessages getString RefreshTab fRefreshButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateEnabledState updateLaunchConfigurationDialog
Selection Adapter adapter new Selection Adapter public void widget Selected Selection Event e if Button e get Source get Selection update Enabled State update Launch Configuration Dialog  SelectionAdapter SelectionAdapter widgetSelected SelectionEvent getSource getSelection updateEnabledState updateLaunchConfigurationDialog
gd horizontal Alignment Grid Data HORIZONTAL ALIGN END f Select Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select Resources  horizontalAlignment GridData HORIZONTAL_ALIGN_END fSelectButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectResources
see org eclipse debug ui I Launch Configuration Tab create Control org eclipse swt widgets Composite public void create Control Composite parent Composite main Composite new Composite parent SWT NONE set Control main Composite Workbench Help set Help get Control I Debug Help Context Ids LAUNCH CONFIGURATION DIALOG REFRESH TAB Grid Layout layout new Grid Layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL main Composite set Layout layout main Composite set Layout Data gd main Composite set Font parent get Font f Refresh Button create Check Button main Composite String Substitution Messages get String Refresh Tab 31 NON NLS 1 f Refresh Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Enabled State update Launch Configuration Dialog f Group new Group main Composite SWT NONE f Group set Font main Composite get Font layout new Grid Layout layout num Columns 2 layout make Columns Equal Width false f Group set Layout layout gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 f Group set Layout Data gd Selection Adapter adapter new Selection Adapter public void widget Selected Selection Event e if Button e get Source get Selection update Enabled State update Launch Configuration Dialog f Workspace Button create Radio Button f Group String Substitution Messages get String Refresh Tab 32 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 f Workspace Button set Layout Data gd f Workspace Button add Selection Listener adapter f Resource Button create Radio Button f Group String Substitution Messages get String Refresh Tab 33 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 f Resource Button set Layout Data gd f Resource Button add Selection Listener adapter f Project Button create Radio Button f Group String Substitution Messages get String Refresh Tab 34 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 f Project Button set Layout Data gd f Project Button add Selection Listener adapter f Container Button create Radio Button f Group String Substitution Messages get String Refresh Tab 35 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 f Container Button set Layout Data gd f Container Button add Selection Listener adapter f Working Set Button create Radio Button f Group String Substitution Messages get String Refresh Tab 36 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 1 f Working Set Button set Layout Data gd f Working Set Button add Selection Listener adapter f Select Button create Push Button f Group String Substitution Messages get String Refresh Tab 37 null NON NLS 1 gd Grid Data f Select Button get Layout Data gd horizontal Alignment Grid Data HORIZONTAL ALIGN END f Select Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select Resources create Vertical Spacer f Group 2 create Recursive Component f Group  ILaunchConfigurationTab createControl createControl mainComposite setControl mainComposite WorkbenchHelp setHelp getControl IDebugHelpContextIds LAUNCH_CONFIGURATION_DIALOG_REFRESH_TAB GridLayout GridLayout GridData GridData GridData FILL_HORIZONTAL mainComposite setLayout mainComposite setLayoutData mainComposite setFont getFont fRefreshButton createCheckButton mainComposite StringSubstitutionMessages getString RefreshTab fRefreshButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateEnabledState updateLaunchConfigurationDialog fGroup mainComposite fGroup setFont mainComposite getFont GridLayout numColumns makeColumnsEqualWidth fGroup setLayout GridData GridData FILL_HORIZONTAL horizontalSpan fGroup setLayoutData SelectionAdapter SelectionAdapter widgetSelected SelectionEvent getSource getSelection updateEnabledState updateLaunchConfigurationDialog fWorkspaceButton createRadioButton fGroup StringSubstitutionMessages getString RefreshTab GridData GridData FILL_HORIZONTAL horizontalSpan fWorkspaceButton setLayoutData fWorkspaceButton addSelectionListener fResourceButton createRadioButton fGroup StringSubstitutionMessages getString RefreshTab GridData GridData FILL_HORIZONTAL horizontalSpan fResourceButton setLayoutData fResourceButton addSelectionListener fProjectButton createRadioButton fGroup StringSubstitutionMessages getString RefreshTab GridData GridData FILL_HORIZONTAL horizontalSpan fProjectButton setLayoutData fProjectButton addSelectionListener fContainerButton createRadioButton fGroup StringSubstitutionMessages getString RefreshTab GridData GridData FILL_HORIZONTAL horizontalSpan fContainerButton setLayoutData fContainerButton addSelectionListener fWorkingSetButton createRadioButton fGroup StringSubstitutionMessages getString RefreshTab GridData GridData FILL_HORIZONTAL horizontalSpan fWorkingSetButton setLayoutData fWorkingSetButton addSelectionListener fSelectButton createPushButton fGroup StringSubstitutionMessages getString RefreshTab GridData fSelectButton getLayoutData horizontalAlignment GridData HORIZONTAL_ALIGN_END fSelectButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectResources createVerticalSpacer fGroup createRecursiveComponent fGroup
Prompts the user to select the resources to refresh private void select Resources I Working Set Manager working Set Manager PlatformUI get Workbench get Working Set Manager if f Working Set null f Working Set working Set Manager create Working Set String Substitution Messages get String Refresh Tab 40 new I Adaptable 0 NON NLS 1 I Working Set Edit Wizard wizard working Set Manager create Working Set Edit Wizard f Working Set Wizard Dialog dialog new Wizard Dialog DebugUI Plugin get Standard Display get Active Shell wizard dialog create if dialog open Window CANCEL return f Working Set wizard get Selection update Launch Configuration Dialog  selectResources IWorkingSetManager workingSetManager getWorkbench getWorkingSetManager fWorkingSet fWorkingSet workingSetManager createWorkingSet StringSubstitutionMessages getString RefreshTab IAdaptable IWorkingSetEditWizard workingSetManager createWorkingSetEditWizard fWorkingSet WizardDialog WizardDialog DebugUIPlugin getStandardDisplay getActiveShell fWorkingSet getSelection updateLaunchConfigurationDialog
f Recursive Button set Layout Data data f Recursive Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  fRecursiveButton setLayoutData fRecursiveButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
Creates the controls needed to edit the refresh recursive attribute of a launch configuration param parent the composite to create the controls in private void create Recursive Component Composite parent f Recursive Button create Check Button parent String Substitution Messages get String Refresh Tab 0 NON NLS 1 Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL data horizontal Span 2 f Recursive Button set Layout Data data f Recursive Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  createRecursiveComponent fRecursiveButton createCheckButton StringSubstitutionMessages getString RefreshTab GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan fRecursiveButton setLayoutData fRecursiveButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
see org eclipse debug ui I Launch Configuration Tab set Defaults org eclipse debug core I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy
see org eclipse debug ui I Launch Configuration Tab initialize From org eclipse debug core I Launch Configuration public void initialize From I Launch Configuration configuration update Refresh configuration update Recursive configuration update Scope configuration update Enabled State  ILaunchConfigurationTab initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration updateRefresh updateRecursive updateScope updateEnabledState
Updates the tab to display the refresh scope specified by the launch config private void update Scope I Launch Configuration configuration String scope null try scope configuration get Attribute ATTR REFRESH SCOPE String null catch Core Exception ce DebugUI Plugin log DebugUI Plugin new Error Status Exception reading launch configuration ce NON NLS 1 f Workspace Button set Selection false f Resource Button set Selection false f Container Button set Selection false f Project Button set Selection false f Working Set Button set Selection false if scope null select the workspace by default f Workspace Button set Selection true else if scope equals workspace NON NLS 1 f Workspace Button set Selection true else if scope equals resource NON NLS 1 f Resource Button set Selection true else if scope equals container NON NLS 1 f Container Button set Selection true else if scope equals project NON NLS 1 f Project Button set Selection true else if scope starts With resource NON NLS 1 f Working Set Button set Selection true try I Resource resources get Refresh Resources scope I Working Set Manager working Set Manager PlatformUI get Workbench get Working Set Manager f Working Set working Set Manager create Working Set String Substitution Messages get String Refresh Tab 40 resources NON NLS 1 catch Core Exception e f Working Set null else if scope starts With working set NON NLS 1 f Working Set Button set Selection true String memento scope substring 14 scope length 1 f Working Set restore Working Set memento  updateScope ILaunchConfiguration getAttribute ATTR_REFRESH_SCOPE CoreException DebugUIPlugin DebugUIPlugin newErrorStatus fWorkspaceButton setSelection fResourceButton setSelection fContainerButton setSelection fProjectButton setSelection fWorkingSetButton setSelection fWorkspaceButton setSelection fWorkspaceButton setSelection fResourceButton setSelection fContainerButton setSelection fProjectButton setSelection startsWith fWorkingSetButton setSelection IResource getRefreshResources IWorkingSetManager workingSetManager getWorkbench getWorkingSetManager fWorkingSet workingSetManager createWorkingSet StringSubstitutionMessages getString RefreshTab CoreException fWorkingSet startsWith working_set fWorkingSetButton setSelection fWorkingSet restoreWorkingSet
Method update Recursive param configuration private void update Recursive I Launch Configuration configuration boolean recursive true try recursive configuration get Attribute ATTR REFRESH RECURSIVE true catch Core Exception ce DebugUI Plugin log DebugUI Plugin new Error Status Exception reading launch configuration ce NON NLS 1 f Recursive Button set Selection recursive  updateRecursive updateRecursive ILaunchConfiguration getAttribute ATTR_REFRESH_RECURSIVE CoreException DebugUIPlugin DebugUIPlugin newErrorStatus fRecursiveButton setSelection
Method update Refresh param configuration private void update Refresh I Launch Configuration configuration String scope null try scope configuration get Attribute ATTR REFRESH SCOPE String null catch Core Exception ce DebugUI Plugin log DebugUI Plugin new Error Status Exception reading launch configuration ce NON NLS 1 f Refresh Button set Selection scope null  updateRefresh updateRefresh ILaunchConfiguration getAttribute ATTR_REFRESH_SCOPE CoreException DebugUIPlugin DebugUIPlugin newErrorStatus fRefreshButton setSelection
see org eclipse debug ui I Launch Configuration Tab perform Apply org eclipse debug core I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy configuration if f Refresh Button get Selection String scope generate Scope Memento configuration set Attribute ATTR REFRESH SCOPE scope set Attribute ATTR REFRESH RECURSIVE configuration f Recursive Button get Selection true else clear the refresh attributes configuration set Attribute ATTR REFRESH SCOPE String null set Attribute ATTR REFRESH RECURSIVE configuration true true  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy fRefreshButton getSelection generateScopeMemento setAttribute ATTR_REFRESH_SCOPE setAttribute ATTR_REFRESH_RECURSIVE fRecursiveButton getSelection setAttribute ATTR_REFRESH_SCOPE setAttribute ATTR_REFRESH_RECURSIVE
Generates a memento for the refresh scope This is based on old refresh variables return a memento private String generate Scope Memento if f Workspace Button get Selection return workspace NON NLS 1 if f Resource Button get Selection return resource NON NLS 1 if f Container Button get Selection return container NON NLS 1 if f Project Button get Selection return project NON NLS 1 if f Working Set Button get Selection return get Refresh Attribute f Working Set return null  generateScopeMemento fWorkspaceButton getSelection fResourceButton getSelection fContainerButton getSelection fProjectButton getSelection fWorkingSetButton getSelection getRefreshAttribute fWorkingSet
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return String Substitution Messages get String Refresh Tab 6 NON NLS 1  ILaunchConfigurationTab getName getName StringSubstitutionMessages getString RefreshTab
Updates the enablement state of the fields private void update Enabled State boolean enabled f Refresh Button get Selection f Recursive Button set Enabled enabled f Group set Enabled enabled f Workspace Button set Enabled enabled f Resource Button set Enabled enabled f Container Button set Enabled enabled f Project Button set Enabled enabled f Working Set Button set Enabled enabled f Select Button set Enabled enabled f Working Set Button get Selection if enabled super set Error Message null  updateEnabledState fRefreshButton getSelection fRecursiveButton setEnabled fGroup setEnabled fWorkspaceButton setEnabled fResourceButton setEnabled fContainerButton setEnabled fProjectButton setEnabled fWorkingSetButton setEnabled fSelectButton setEnabled fWorkingSetButton getSelection setErrorMessage
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return Debug Plugin Images get Image I Internal DebugUI Constants IMG OBJS REFRESH TAB  ILaunchConfigurationTab getImage getImage DebugPluginImages getImage IInternalDebugUIConstants IMG_OBJS_REFRESH_TAB
public boolean is Valid I Launch Configuration launch Config set Error Message null set Message null if f Working Set Button get Selection f Working Set null f Working Set get Elements length 0 set Error Message String Substitution Messages get String Refresh Tab 42 NON NLS 1 return false return true  isValid ILaunchConfiguration launchConfig setErrorMessage setMessage fWorkingSetButton getSelection fWorkingSet fWorkingSet getElements setErrorMessage StringSubstitutionMessages getString RefreshTab
Refreshes the resources as specified by the given launch configuration param configuration launch configuration param monitor progress monitor which may be code null code throws Core Exception if an exception occurs while refreshing resources public static void refresh Resources I Launch Configuration configuration I Progress Monitor monitor throws Core Exception if monitor null monitor new Null Progress Monitor String scope get Refresh Scope configuration I Resource resources null if scope null resources get Refresh Resources scope if resources null resources length 0 return int depth I Resource DEPTH ONE if is Refresh Recursive configuration depth I Resource DEPTH INFINITE if monitor is Canceled return monitor begin Task String Substitution Messages get String Refresh Tab 7 NON NLS 1 resources length Multi Status status new Multi Status DebugUI Plugin get Unique Identifier 0 String Substitution Messages get String Refresh Tab 8 null NON NLS 1 for int i 0 i resources length i if monitor is Canceled break if resources i null resources i is Accessible try resources i refresh Local depth null catch Core Exception e status merge e get Status monitor worked 1 monitor done if status isOK throw new Core Exception status  CoreException refreshResources ILaunchConfiguration IProgressMonitor CoreException NullProgressMonitor getRefreshScope IResource getRefreshResources IResource DEPTH_ONE isRefreshRecursive IResource DEPTH_INFINITE isCanceled beginTask StringSubstitutionMessages getString RefreshTab MultiStatus MultiStatus DebugUIPlugin getUniqueIdentifier StringSubstitutionMessages getString RefreshTab isCanceled isAccessible refreshLocal CoreException getStatus CoreException
Returns a collection of resources referred to by a refresh scope attribute param scope refresh scope attribute code ATTR REFRESH SCOPE code return collection of resources referred to by the refresh scope attribute throws Core Exception if unable to resolve a set of resources public static I Resource get Refresh Resources String scope throws Core Exception if scope starts With resource NON NLS 1 This is an old format that is replaced with working set String path String scope substring 11 scope length 1 Path path new Path path String I Resource resource Resources Plugin get Workspace get Root find Member path if resource null throw new Core Exception new Status I Status ERROR DebugUI Plugin get Unique Identifier I DebugUI Constants INTERNAL ERROR Message Format format String Substitution Messages get String Refresh Tab 38 new String path String null NON NLS 1 else return new I Resource resource else if scope starts With working set NON NLS 1 I Working Set working Set get Working Set scope if working Set null throw new Core Exception new Status I Status ERROR DebugUI Plugin get Unique Identifier I DebugUI Constants INTERNAL ERROR String Substitution Messages get String Refresh Tab 39 null NON NLS 1 else I Adaptable elements working Set get Elements I Resource resources new I Resource elements length for int i 0 i elements length i I Adaptable adaptable elements i if adaptable instanceof I Resource resources i I Resource adaptable else resources i I Resource adaptable get Adapter I Resource class return resources else if scope equals workspace NON NLS 1 return new I Resource Resources Plugin get Workspace get Root else I Resource resource Selected Resource Manager get Default get Selected Resource if resource null empty selection return new I Resource if scope equals resource NON NLS 1 resource resource else if scope equals container NON NLS 1 resource resource get Parent else if scope equals project NON NLS 1 resource resource get Project return new I Resource resource  ATTR_REFRESH_SCOPE CoreException IResource getRefreshResources CoreException startsWith working_set pathString pathString IResource ResourcesPlugin getWorkspace getRoot findMember CoreException IStatus DebugUIPlugin getUniqueIdentifier IDebugUIConstants INTERNAL_ERROR MessageFormat StringSubstitutionMessages getString RefreshTab pathString IResource startsWith working_set IWorkingSet workingSet getWorkingSet workingSet CoreException IStatus DebugUIPlugin getUniqueIdentifier IDebugUIConstants INTERNAL_ERROR StringSubstitutionMessages getString RefreshTab IAdaptable workingSet getElements IResource IResource IAdaptable IResource IResource IResource getAdapter IResource IResource ResourcesPlugin getWorkspace getRoot IResource SelectedResourceManager getDefault getSelectedResource IResource getParent getProject IResource
Restores a working set based on the XML Memento represented within the memento String param memento String The string memento of the working set return the restored working set or code null code if problems occurred restoring the working set private static I Working Set restore Working Set String memento String if NO WORKING SET equals memento String return null String Reader reader new String Reader memento String XML Memento memento null try memento XML Memento create Read Root reader catch Workbench Exception e DebugUI Plugin log e return null I Working Set Manager working Set Manager PlatformUI get Workbench get Working Set Manager return working Set Manager create Working Set memento  XMLMemento mementoString mementoString IWorkingSet restoreWorkingSet mementoString NO_WORKING_SET mementoString StringReader StringReader mementoString XMLMemento XMLMemento createReadRoot WorkbenchException DebugUIPlugin IWorkingSetManager workingSetManager getWorkbench getWorkingSetManager workingSetManager createWorkingSet
Returns the refresh scope attribute specified by the given launch configuration or code null code if none param configuration launch configuration return refresh scope attribute code ATTR REFRESH SCOPE code throws Core Exception if unable to access the associated attribute public static String get Refresh Scope I Launch Configuration configuration throws Core Exception return configuration get Attribute ATTR REFRESH SCOPE String null  ATTR_REFRESH_SCOPE CoreException getRefreshScope ILaunchConfiguration CoreException getAttribute ATTR_REFRESH_SCOPE
Returns whether the refresh scope specified by the given launch configuration is recursive param configuration return whether the refresh scope is recursive throws Core Exception if unable to access the associated attribute public static boolean is Refresh Recursive I Launch Configuration configuration throws Core Exception return configuration get Attribute ATTR REFRESH RECURSIVE true  CoreException isRefreshRecursive ILaunchConfiguration CoreException getAttribute ATTR_REFRESH_RECURSIVE
Creates and returns a memento for the given working set to be used as a refresh attribute param working Set a working set or code null code return an equivalent refresh attribute public static String get Refresh Attribute I Working Set working Set String set null if working Set null working Set get Elements length 0 set NO WORKING SET else XML Memento working Set Memento XML Memento create Write Root TAG LAUNCH CONFIGURATION WORKING SET if working Set null working Set Memento put String Refresh Tab TAG FACTORY ID working Set get Factory Id working Set save State working Set Memento String Writer writer new String Writer try working Set Memento save writer catch IO Exception e DebugUI Plugin log e set writer to String if set null String Buffer memento new String Buffer memento append working set NON NLS 1 memento append set memento append NON NLS 1 return memento to String return null  workingSet getRefreshAttribute IWorkingSet workingSet workingSet workingSet getElements NO_WORKING_SET XMLMemento workingSetMemento XMLMemento createWriteRoot TAG_LAUNCH_CONFIGURATION_WORKING_SET workingSet workingSetMemento putString RefreshTab TAG_FACTORY_ID workingSet getFactoryId workingSet saveState workingSetMemento StringWriter StringWriter workingSetMemento IOException DebugUIPlugin toString StringBuffer StringBuffer working_set toString
Creates and returns a working set from the given refresh attribute created by the method code get Refresh Attribute I Working Set code or code null code if none param refresh Attribute a refresh attribute that represents a working set return equivalent working set or code null code public static I Working Set get Working Set String refresh Attribute if refresh Attribute starts With working set NON NLS 1 String memento refresh Attribute substring 14 refresh Attribute length 1 return restore Working Set memento return null  getRefreshAttribute IWorkingSet refreshAttribute IWorkingSet getWorkingSet refreshAttribute refreshAttribute startsWith working_set refreshAttribute refreshAttribute restoreWorkingSet
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy do nothing on activation  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy do nothing on deactivation  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy

see org eclipse debug internal ui sourcelookup I Source Container Browser add Source Containers org eclipse swt widgets Shell org eclipse debug core sourcelookup I Source Lookup Director public I Source Container add Source Containers Shell shell I Source Lookup Director director return new I Source Container 0  ISourceContainerBrowser addSourceContainers ISourceLookupDirector ISourceContainer addSourceContainers ISourceLookupDirector ISourceContainer
see org eclipse debug internal ui sourcelookup I Source Container Browser can Add Source Containers org eclipse debug core sourcelookup I Source Lookup Director public boolean can Add Source Containers I Source Lookup Director director return true  ISourceContainerBrowser canAddSourceContainers ISourceLookupDirector canAddSourceContainers ISourceLookupDirector
see org eclipse debug internal ui sourcelookup I Source Container Browser edit Source Containers org eclipse swt widgets Shell org eclipse debug core sourcelookup I Source Lookup Director org eclipse debug core sourcelookup I Source Container public I Source Container edit Source Containers Shell shell I Source Lookup Director director I Source Container containers return new I Source Container 0  ISourceContainerBrowser editSourceContainers ISourceLookupDirector ISourceContainer ISourceContainer editSourceContainers ISourceLookupDirector ISourceContainer ISourceContainer
see org eclipse debug internal ui sourcelookup I Source Container Browser can Edit Source Containers org eclipse debug core sourcelookup I Source Lookup Director org eclipse debug core sourcelookup I Source Container public boolean can Edit Source Containers I Source Lookup Director director I Source Container containers return false  ISourceContainerBrowser canEditSourceContainers ISourceLookupDirector ISourceContainer canEditSourceContainers ISourceLookupDirector ISourceContainer

public interface I Source Container Browser Creates and returns new source containers to add to the given source lookup director param shell the shell to use to parent any dialogs param director the director the new containers will be added to return the new source containers to add  ISourceContainerBrowser
Returns whether this browser can add any source containers to the given source lookup director param director source lookup director to potentially add source containers to return whether this browser can add any source containers to the given source lookup director 
Edits and returns source containers to replace the given source containers param shell the shell to use to parent any dialogs param director the director the new containers will be added to param containers the source containers to be edited return the replacement source containers 
Returns whether this browser can edit the given source containers param director source lookup director to potentially edit source containers for param containers the containers to edit return whether this browser can edit the given source containers 

Constructs a dialog to edit the source lookup path managed by the given source lookup director Persists the resulting source lookup path on the launch configuration associated with the given source lookup director param shell shell to parent the dialog param director source lookup director managing the source lookup path to be edited public Source Lookup Dialog Shell shell I Source Lookup Director director super shell f Director director  SourceLookupDialog ISourceLookupDirector fDirector
protected Control create Dialog Area Composite parent create a composite with standard margins and spacing set Title Source LookupUI Messages get String manage Source Dialog description NON NLS 1 set Title Image Debug Plugin Images get Image I Internal DebugUI Constants IMG EDIT SRC LOC WIZ Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING composite set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH composite set Layout Data data composite set Font parent get Font f Panel new Source Lookup Panel f Panel create Control composite f Panel initialize From f Director Dialog apply Dialog Font composite Workbench Help set Help get Shell I Debug Help Context Ids EDIT SOURCELOOKUP DIALOG return composite  createDialogArea setTitle SourceLookupUIMessages getString manageSourceDialog setTitleImage DebugPluginImages getImage IInternalDebugUIConstants IMG_EDIT_SRC_LOC_WIZ GridLayout GridLayout marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING setLayout GridData GridData GridData FILL_BOTH setLayoutData setFont getFont fPanel SourceLookupPanel fPanel createControl fPanel initializeFrom fDirector applyDialogFont WorkbenchHelp setHelp getShell IDebugHelpContextIds EDIT_SOURCELOOKUP_DIALOG
see org eclipse jface dialogs Dialog ok Pressed protected void ok Pressed f Panel perform Apply null super ok Pressed  okPressed okPressed fPanel performApply okPressed
see org eclipse jface window Window configure Shell org eclipse swt widgets Shell protected void configure Shell Shell shell super configure Shell shell shell set Text Source LookupUI Messages get String manage Source Dialog title NON NLS 1  configureShell configureShell configureShell setText SourceLookupUIMessages getString manageSourceDialog
see org eclipse jface window Window close public boolean close f Panel dispose return super close  fPanel

public void create Control Composite parent Composite comp new Composite parent SWT NONE set Control comp Grid Layout top Layout new Grid Layout top Layout margin Width 0 top Layout margin Height 0 top Layout num Columns 1 comp set Layout top Layout comp set Font parent get Font f Source Lookup Panel new Source Lookup Panel f Source Lookup Panel set Launch Configuration Dialog get Launch Configuration Dialog f Source Lookup Panel create Control comp Grid Data gd Grid Data f Source Lookup Panel get Control get Layout Data gd height Hint 200 gd width Hint 250 Dialog apply Dialog Font comp Workbench Help set Help comp I Debug Help Context Ids SOURCELOOKUP TAB  createControl setControl GridLayout topLayout GridLayout topLayout marginWidth topLayout marginHeight topLayout numColumns setLayout topLayout setFont getFont fSourceLookupPanel SourceLookupPanel fSourceLookupPanel setLaunchConfigurationDialog getLaunchConfigurationDialog fSourceLookupPanel createControl GridData GridData fSourceLookupPanel getControl getLayoutData heightHint widthHint applyDialogFont WorkbenchHelp setHelp IDebugHelpContextIds SOURCELOOKUP_TAB
see org eclipse debug ui I Launch Configuration Tab set Defaults org eclipse debug core I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy
see org eclipse debug ui I Launch Configuration Tab initialize From org eclipse debug core I Launch Configuration public void initialize From I Launch Configuration configuration f Source Lookup Panel initialize From configuration  ILaunchConfigurationTab initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration fSourceLookupPanel initializeFrom
see org eclipse debug ui I Launch Configuration Tab perform Apply org eclipse debug core I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy configuration f Source Lookup Panel perform Apply configuration  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy fSourceLookupPanel performApply
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Source LookupUI Messages get String source Tab tab Title NON NLS 1  ILaunchConfigurationTab getName getName SourceLookupUIMessages getString sourceTab tabTitle
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return Debug Plugin Images get Image I Internal DebugUI Constants IMG SRC LOOKUP TAB  ILaunchConfigurationTab getImage getImage DebugPluginImages getImage IInternalDebugUIConstants IMG_SRC_LOOKUP_TAB
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy f Source Lookup Panel activated working Copy  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy fSourceLookupPanel workingCopy
public void dispose if f Source Lookup Panel null if f Source Lookup Panel get Director null f Source Lookup Panel get Director dispose f Source Lookup Panel dispose f Source Lookup Panel null super dispose  fSourceLookupPanel fSourceLookupPanel getDirector fSourceLookupPanel getDirector fSourceLookupPanel fSourceLookupPanel
public String get Error Message if f Source Lookup Panel null return f Source Lookup Panel get Error Message return super get Error Message  getErrorMessage fSourceLookupPanel fSourceLookupPanel getErrorMessage getErrorMessage
public String get Message if f Source Lookup Panel null return f Source Lookup Panel get Message return super get Message  getMessage fSourceLookupPanel fSourceLookupPanel getMessage getMessage

Creates a source container for the working set param working Set the working set represented by this container public Working Set Source Container I Working Set working Set f Working Set working Set  workingSet WorkingSetSourceContainer IWorkingSet workingSet fWorkingSet workingSet
see org eclipse debug core sourcelookup I Source Container get Name public String get Name return f Working Set get Name  ISourceContainer getName getName fWorkingSet getName
public boolean equals Object obj if obj null obj instanceof Working Set Source Container return Working Set Source Container obj f Working Set equals f Working Set return false  WorkingSetSourceContainer WorkingSetSourceContainer fWorkingSet fWorkingSet
public int hash Code return f Working Set hash Code  hashCode fWorkingSet hashCode
see org eclipse debug core sourcelookup I Source Container get Type public I Source Container Type get Type return get Source Container Type TYPE ID  ISourceContainer getType ISourceContainerType getType getSourceContainerType TYPE_ID
protected I Source Container create Source Containers throws Core Exception I Adaptable elements f Working Set get Elements if elements null return new I Source Container 0 Array List location List new Array List for int i 0 i elements length i I Resource resource I Resource elements i get Adapter I Resource class if resource null switch resource get Type case I Resource FOLDER location List add new Folder Source Container I Folder resource true break case I Resource PROJECT location List add new Project Source Container I Project resource true break if the element corresponds to an I File do nothing return I Source Container location List to Array new I Source Container location List size  ISourceContainer createSourceContainers CoreException IAdaptable fWorkingSet getElements ISourceContainer ArrayList locationList ArrayList IResource IResource getAdapter IResource getType IResource locationList FolderSourceContainer IFolder IResource locationList ProjectSourceContainer IProject IFile ISourceContainer locationList toArray ISourceContainer locationList

public interface I Browser Closes the browser public void close  IBrowser
public void close Queries the browser if close method is supported return true if the method is fully implemented 
public boolean is Close Supported Displays document with the given URL and makes the browser visible This method starts the browser if necessary param url the URL to display in the browser  isCloseSupported
public void displayURL String url throws Exception Queries the browser if set Location method is supported return true if the method is fully implemented  setLocation
public boolean is Set Location Supported Queries the browser if set Size method is supported return true if the method is fully implemented  isSetLocationSupported setSize
public boolean is Set Size Supported Causes the browser to be moved to the specified location If the actual browser is not visible the next time it becomes visible it will be shown at the give location param x horizontal coordinates of the left top external corner param y vertical coordinates of the left top external corner  isSetSizeSupported
public void set Location int x int y Causes the browser to be resized to the specified size If the actual browser is not visible the next time it becomes visible it will be shown with the give size param width width in pixels param height height in pixels external corner  setLocation

public interface I Browser Factory Checks whether the factory can work on the user system return false if the factory cannot work on this system for example the required native browser required by browser adapters that it creates is not installed  IBrowserFactory
public boolean is Available Obtains a new instance of a web browser return instance of I Browser  isAvailable IBrowser

This class is not intended to be instantiated private Help System do nothing  HelpSystem
Computes and returns context information for the given context id param context Id the context id return the context or code null code if none public static I Context get Context String context Id return Help Plugin get Context Manager get Context context Id  contextId IContext getContext contextId HelpPlugin getContextManager getContext contextId
Returns the list of all integrated tables of contents available Each entry corresponds of a different help book return an array of TOC s public static I Toc get Tocs return Help Plugin get Toc Manager get Tocs Platform getNL  IToc getTocs HelpPlugin getTocManager getTocs
Returns an open input stream on the contents of the specified help resource The client is responsible for closing the stream when finished param href the URL as a string of the help resource p Valid href are as described in link org eclipse help I Help Resource get Href I Help Resource get Href p return an input stream containing the contents of the help resource or code null code if the help resource could not be found and opened public static Input Stream get Help Content String href try URL helpURL new URL help href URL helpURL new URL help NON NLS 1 null 1 href HelpURL Stream Handler get Default return helpURL open Stream catch IO Exception ioe return null  IHelpResource getHref IHelpResource getHref InputStream getHelpContent HelpURLStreamHandler getDefault openStream IOException

public interface I Context Returns a list of related topics for this help context return a list of related help topics since 2 0  IContext
public I Help Resource get Related Topics Returns the text description for this context return the text description  IHelpResource getRelatedTopics

Displays the entire help bookshelf p This method is called by the platform to launch the help system UI p since 2 0 deprecated Use Workbench Help display Help instead  WorkbenchHelp displayHelp
Displays context sensitive help for the given context p x y coordinates specify the location where the context sensitive help UI will be presented These coordinates are screen relative ie 0 0 is the top left most screen corner The platform is responsible for calling this method and supplying the appropriate location p param context the context to display param x horizontal position param y verifical position since 2 0 deprecated Use Workbench Help display Context context x y instead  WorkbenchHelp displayContext
Displays context sensitive help for context with the given context id p x y coordinates specify the location where the context sensitive help UI will be presented These coordinates are screen relative ie 0 0 is the top left most screen corner The platform is responsible for calling this method and supplying the appropriate location p param context Id the help context identifier the parameter needs to have a form pluginID plugin Context Id where pluginID is ID of plug in contributing a context and plugin ContextID is ID of context contributed in a plug in param x horizontal position param y verifical position see get Context String since 2 0 deprecated Use Workbench Help display Context Help System get Context context Id x y instead  contextId pluginContextId pluginContextID getContext WorkbenchHelp displayContext HelpSystem getContext contextId
Displays help content for the help resource with the given URL p This method is called by the platform to launch the help system UI displaying the documentation identified by the code href code parameter p p The help system makes no guarantee that all the help resources can be displayed or how they are displayed p param href the URL of the help resource p Valid href are as described in link org eclipse help I Help Resource get Href I Help Resource get Href p since 2 0 deprecated Use Workbench Help display Help Resource href instead  IHelpResource getHref IHelpResource getHref WorkbenchHelp displayHelpResource
Displays help content for the help resource p This method is called by the platform to launch the help system UI displaying the documentation identified by the code help Resource code parameter p The help system makes no guarantee that all the help resources can be displayed or how they are displayed p see I Help display Help Resource String param help Resource the help resource to display since 2 0 deprecated Use Workbench Help display Help Resource help Resource get Href instead  helpResource IHelp displayHelpResource helpResource WorkbenchHelp displayHelpResource helpResource getHref
Displays help content for the toc with the given URL p This method is called by the platform to launch the help system UI displaying the documentation identified by the code toc code parameter p p Valid toc are contributed through the code toc code element of the code org eclipse help toc code extension point p param toc the URL of the toc as specified in the code org eclipse help toc code extenstion point deprecated Use Workbench Help display Help Resource toc instead  WorkbenchHelp displayHelpResource
This method is an extension to the a href display Help java lang String display Help String toc a method providing the ability to open the specified help topic p code selected Topic code should be a valid help topic url contained in the specified code toc code and have the following format em pluginID path to document em br where dl dt em pluginID em is the unique identifier of the plugin containing the help topic dt dt em path to document em is the help topic path relative to the plugin directory dt dl p param toc the URL of the toc param selected Topic the help topic url see display Help java lang String deprecated Use Workbench Help display Help Resource selected Topic instead  displayHelp displayHelp selectedTopic path_to_document path_to_document selectedTopic displayHelp WorkbenchHelp displayHelpResource selectedTopic
Displays context sensitive help for context with the given context id p x y coordinates specify the location where the context sensitive help UI will be presented These coordinates are screen relative ie 0 0 is the top left most screen corner The platform is responsible for calling this method and supplying the appropriate location p param context Id the help context identifier param x horizontal position param y verifical position see get Context String deprecated Use Workbench Help display Context Help System get Context context Id x y instead  contextId getContext WorkbenchHelp displayContext HelpSystem getContext contextId
Displays context sensitive help for the given context p x y coordinates specify the location where the context sensitive help UI will be presented These coordinates are screen relative ie 0 0 is the top left most screen corner The platform is responsible for calling this method and supplying the appropriate location p param context the context to display param x horizontal position param y verifical position deprecated Use Workbench Help display Context context x y instead  WorkbenchHelp displayContext
Computes and returns context information for the given context id param context Id the context id return the context or code null code if none deprecated Use Help System get Context context Id instead  contextId HelpSystem getContext contextId
Returns the list of all integrated tables of contents available return an array of TOC s since 2 0 deprecated Use Help System get Tocs instead  HelpSystem getTocs
Returns code true code if the context sensitive help window is currently being displayed code false code if not deprecated Use Workbench Help is Context Help Displayed instead  WorkbenchHelp isContextHelpDisplayed

public interface I Help Content Producer Obtains content of a specified help resource If resource for a given path does not exist a null should be returned If topic content is static and corresponding file exist in a plug in directory or doc zip file null might be return as help system can read the file content itself param pluginID unique identifier of a plug in containing the resource param href path of the resource in a plug in p An href has a format em path to resource em or em path to resource parameter value1 parameter2 value2 em For example em references myclass html em may be passed p param locale used by the client In most cases content in a user language should be produced return Input Stream or null if specified resource is not dynamic and should be read from doc zip or plug in install location public Input Stream get Input Stream String pluginID String href  IHelpContentProducer InputStream InputStream getInputStream

Returns the URL as a string associated with this help resource return the URL as a string associated with the resource p Valid URL of a help resource is ul li a em pluginID path to resource em where ul li em pluginID em is the unique identifier of the plugin containing the help resource li em path to document em is the help resource path relative to the plugin directory ul For example em myplugin mytoc xml em or em myplugin references myclass html em are vaild li string representation of URI to an external document In this case all special characters have to be enoded such that the URI is appropriate to be opened with a web browser em http eclipse org documents my 20file html em and em jar file c my 20sources src zip mypackage My Class html em are examples of valid UR Is ul p  MyClass URIs
public String get Href Returns the label of this help resource return the label  getHref

public interface I Live Help Action extends Runnable This method will be called upon instantiation of the live help extension The data will be passed as specified in the help document live help link param data initialization data as a String  ILiveHelpAction

private int port public static Appserver Plugin get Default return plugin  AppserverPlugin getDefault
Returns the instance of Webapp Server public synchronized I Webapp Server get App Server throws Core Exception if app Server null create Webapp Server start Webapp Server return app Server  WebappServer IWebappServer getAppServer CoreException appServer createWebappServer startWebappServer appServer
public void stop Bundle Context context throws Exception if app Server null app Server stop plugin null bundle Context null super stop context  BundleContext appServer appServer bundleContext
public void start Bundle Context context throws Exception super start context plugin this bundle Context context  BundleContext bundleContext
Returns the plugin ID that contributes the server implementation return String public String get Contributing Server Plugin return contributing Server Plugin  getContributingServerPlugin contributingServerPlugin
private void create Webapp Server throws Core Exception initialized true Initializes the app server by getting an instance via app server the extension point get the app server extension from the system plugin registry I Extension Point point Platform get Extension Registry get Extension Point APP SERVER EXTENSION ID if point null I Extension extensions point get Extensions if extensions length 0 We need to pick up the non default configuration I Configuration Element elements extensions 0 get Configuration Elements if elements length 0 return I Configuration Element server Element null for int i 0 i elements length i String default Value elements i get Attribute APP SERVER DEFAULT ATTRIBUTE if default Value null default Value equals false NON NLS 1 server Element elements i break if all the servers are default then pick the first one if server Element null server Element elements 0 Instantiate the app server try app Server I Webapp Server server Element create Executable Extension APP SERVER CLASS ATTRIBUTE contributing Server Plugin server Element get Declaring Extension get Namespace catch Core Exception e get Log log e get Status throw e  createWebappServer CoreException IExtensionPoint getExtensionRegistry getExtensionPoint APP_SERVER_EXTENSION_ID IExtension getExtensions IConfigurationElement getConfigurationElements IConfigurationElement serverElement defaultValue getAttribute APP_SERVER_DEFAULT_ATTRIBUTE defaultValue defaultValue serverElement serverElement serverElement appServer IWebappServer serverElement createExecutableExtension APP_SERVER_CLASS_ATTRIBUTE contributingServerPlugin serverElement getDeclaringExtension getNamespace CoreException getLog getStatus
private void start Webapp Server throws Core Exception Initialize host and port from preferences host Address get Plugin Preferences get String HOST KEY if equals host Address NON NLS 1 host Address null port get Plugin Preferences get Int PORT KEY apply host and port overrides passed as command line arguments try String host Command Line Override System get Property server host NON NLS 1 if host Command Line Override null host Command Line Override trim length 0 host Address host Command Line Override catch Exception e try String port Command Line Override System get Property server port NON NLS 1 if port Command Line Override null port Command Line Override trim length 0 port Integer parse Int port Command Line Override catch Exception e if app Server null throw new Core Exception new Status I Status ERROR PLUGIN ID I Status OK Appserver Resources get String Appserver start null NON NLS 1 app Server start port host Address  startWebappServer CoreException hostAddress getPluginPreferences getString HOST_KEY hostAddress hostAddress getPluginPreferences getInt PORT_KEY hostCommandLineOverride getProperty server_host hostCommandLineOverride hostCommandLineOverride hostAddress hostCommandLineOverride portCommandLineOverride getProperty server_port portCommandLineOverride portCommandLineOverride parseInt portCommandLineOverride appServer CoreException IStatus PLUGIN_ID IStatus AppserverResources getString appServer hostAddress

Resources constructor public Appserver Resources super  AppserverResources
Returns a string from a property file public static String get String String name try return res Bundle get String name catch Exception e return name  getString resBundle getString
Returns a string from a property file public static String get String String name String replace0 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 String replace3 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 replace3 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 String replace3 String replace4 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 replace3 replace4 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 String replace3 String replace4 String replace5 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 replace3 replace4 replace5 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
private static Locale get Default Locale String nl Platform getNL sanity test if nl null return Locale get Default break the string into tokens to get the Locale object String Tokenizer locales new String Tokenizer nl   NON NLS 1 if locales count Tokens 1 return new Locale locales next Token NON NLS 1 else if locales count Tokens 2 return new Locale locales next Token locales next Token else if locales count Tokens 3 return new Locale locales next Token locales next Token locales next Token else return Locale get Default  getDefaultLocale getDefault StringTokenizer StringTokenizer _ countTokens nextToken countTokens nextToken nextToken countTokens nextToken nextToken nextToken getDefault

public static String get Dev Class Path String id String result null if id null dev Properties null String entry dev Properties get Property id if entry null result get Array From List entry if result null result dev Default Classpath return result  getDevClassPath devProperties devProperties getProperty getArrayFromList devDefaultClasspath
Returns the result of converting a list of comma separated tokens into an array return the array of string tokens param prop the initial comma separated string public static String get Array From List String prop if prop null prop trim equals NON NLS 1 return new String 0 Vector list new Vector String Tokenizer tokens new String Tokenizer prop NON NLS 1 while tokens has More Tokens String token tokens next Token trim if token equals NON NLS 1 list add Element token return list is Empty new String 0 String list to Array new String list size  getArrayFromList StringTokenizer StringTokenizer hasMoreTokens nextToken addElement isEmpty toArray
public static boolean in Development Mode return in Development Mode  inDevelopmentMode inDevelopmentMode
private static Properties load URL url Properties props new Properties try Input Stream is null try is url open Stream props load is finally is close catch IO Exception e TODO consider logging here return props  InputStream openStream IOException

public interface I Webapp Server Starts the server on specified host port Must be called before running a webapp param port port to listen to Pass 0 to let the system pick up a port param host server host Can be an IP address or a server name  IWebappServer
public void start int port String host throws Core Exception Stops the app server public void stop throws Core Exception  CoreException CoreException
public void stop throws Core Exception Checks if the app server is running public boolean is Running  CoreException isRunning
Runs a webapp on the server param webapp Name the name of the web app also knowns as application context param path path to the webapp directory or WAR file param custom Loader optional class loader to add to the default webapp class loader public void start String webapp Name I Path path Class Loader custom Loader  webappName customLoader webappName IPath ClassLoader customLoader
throws Core Exception Stops the specified webapp public void stop String webapp Name throws Core Exception  CoreException webappName CoreException
Returns the port number the app server listens on return integer port number 0 if server not started 
Returns the host name or ip the app server runs on return String representaion of host name of IP null if server not started yet 

private Bundle bundle public Plugin Class Loader Wrapper String plugin super new URL 0 this plugin plugin this bundle Platform get Bundle plugin  PluginClassLoaderWrapper getBundle
this bundle Platform get Bundle plugin public Class load Class String class Name throws Class Not Found Exception return bundle load Class class Name  getBundle loadClass className ClassNotFoundException loadClass className
return bundle load Class class Name public URL get Resource String res Name return bundle get Resource res Name  loadClass className getResource resName getResource resName
This is a workaround for the jsp compiler that needs to know the classpath public URL getUR Ls Set urls get Plugin Classpath plugin return URL urls to Array new URL urls size  getURLs getPluginClasspath toArray
private Set get Plugin Classpath String plugin Id Collect set of plug ins Set plugins new Hash Set add Plugin With Prereqs plugin Id plugins Collect UR Ls for each plug in Set urls new Hash Set for Iterator it plugins iterator it has Next String id String it next try Bundle b Platform get Bundle id if b null declared classpath String headers String b get Headers get Constants BUNDLE CLASSPATH Manifest Element paths Manifest Element parse Header Constants BUNDLE CLASSPATH headers if paths null for int i 0 i paths length i String path paths i get Value URL url b get Entry path if url null try urls add Platform as LocalURL url catch IO Exception ioe dev classpath String devpaths Dev Class Path Helper get Dev Class Path plugin Id if devpaths null for int i 0 i devpaths length i URL url b get Entry devpaths i if url null try urls add Platform as LocalURL url catch IO Exception ioe catch Bundle Exception e return urls  getPluginClasspath pluginId HashSet addPluginWithPrereqs pluginId URLs HashSet hasNext getBundle getHeaders BUNDLE_CLASSPATH ManifestElement ManifestElement parseHeader BUNDLE_CLASSPATH getValue getEntry asLocalURL IOException DevClassPathHelper getDevClassPath pluginId getEntry asLocalURL IOException BundleException
Ensures set contains plugin ID of given plugin and all its prereqs Does nothing if set contains given plug in private void add Plugin With Prereqs String plugin Id Set plugin Ids if plugin Ids contains plugin Id return String immidiate Prereqs get Direct Prereqs plugin Id for int i 0 i immidiate Prereqs length i add Plugin With Prereqs immidiate Prereqs i plugin Ids plugin Ids add plugin Id  addPluginWithPrereqs pluginId pluginIds pluginIds pluginId immidiatePrereqs getDirectPrereqs pluginId immidiatePrereqs addPluginWithPrereqs immidiatePrereqs pluginIds pluginIds pluginId
Obtain plug ins immidiately required by given plug in param plugin Id return private String get Direct Prereqs String plugin Id try Bundle bundle Platform get Bundle plugin Id if bundle null String header String bundle get Headers get Constants REQUIRE BUNDLE Manifest Element requires Manifest Element parse Header Constants REQUIRE BUNDLE header if requires null String reqs new String requires length for int i 0 i requires length i reqs i requires i get Value return reqs catch Bundle Exception e return new String 0  pluginId getDirectPrereqs pluginId getBundle pluginId getHeaders REQUIRE_BUNDLE ManifestElement ManifestElement parseHeader REQUIRE_BUNDLE getValue BundleException

Private constructor so no instances can be created see java lang Object Object private Webapp Manager  WebappManager
Runs a webapp on the server The webapp is defined in a plugin and the path is relative to the plugin directory p It is assumed that webapp names are unique It is suggested to create unique web app names by prefixing them with the plugin id p param webapp Name the name of the web app also knowns as application context param plugin Id plugin that defines the webapp param path webapp relative path to the plugin directory public static void start String webapp Name String plugin Id I Path path throws Core Exception I Path webapp Path get Webapp Path plugin Id path we get the server before constructing the class loader so class loader exposed by the server is available to the webapps I Webapp Server server Appserver Plugin get Default get App Server applications Started true server start webapp Name webapp Path new Plugin Class Loader Wrapper plugin Id  webappName pluginId webappName pluginId IPath CoreException IPath webappPath getWebappPath pluginId IWebappServer AppserverPlugin getDefault getAppServer applicationsStarted webappName webappPath PluginClassLoaderWrapper pluginId
Stops the specified webapp public static void stop String webapp Name throws Core Exception if applications Started do not obtain start appserver when no reason return Appserver Plugin get Default get App Server stop webapp Name  webappName CoreException applicationsStarted AppserverPlugin getDefault getAppServer webappName
Returns the port number the app server listens on return integer port number 0 if server not started public static int get Port try return Appserver Plugin get Default get App Server get Port catch Core Exception e return 0  getPort AppserverPlugin getDefault getAppServer getPort CoreException
Returns the host name or ip the app server runs on return String representaion of host name of IP null if server not started yet public static String get Host try return Appserver Plugin get Default get App Server get Host catch Core Exception e return null  getHost AppserverPlugin getDefault getAppServer getHost CoreException
param plugin Id param path webapp path relative to the plugin directory return String absolute webapp path private static I Path get Webapp Path String plugin Id I Path path throws Core Exception Bundle bundle Platform get Bundle plugin Id if bundle null throw new Core Exception new Status I Status ERROR Appserver Plugin PLUGIN ID I Status OK Appserver Resources get String Appserver cannot Find Plugin NON NLS 1 plugin Id null Note we just look for one webapp directory If needed may want to use the locale specific path URL webappURL Platform find bundle path if webappURL null throw new Core Exception new Status I Status ERROR Appserver Plugin PLUGIN ID I Status OK Appserver Resources get String Appserver cannot Find Path NON NLS 1 plugin Id path toOS String null try String webapp Location Platform as LocalURL Platform resolve webappURL get File return new Path webapp Location catch IO Exception ioe throw new Core Exception new Status I Status ERROR Appserver Plugin PLUGIN ID I Status OK Appserver Resources get String Appserver cannot Resolve Path NON NLS 1 plugin Id path toOS String ioe  pluginId IPath getWebappPath pluginId IPath CoreException getBundle pluginId CoreException IStatus AppserverPlugin PLUGIN_ID IStatus AppserverResources getString cannotFindPlugin pluginId CoreException IStatus AppserverPlugin PLUGIN_ID IStatus AppserverResources getString cannotFindPath pluginId toOSString webappLocation asLocalURL getFile webappLocation IOException CoreException IStatus AppserverPlugin PLUGIN_ID IStatus AppserverResources getString cannotResolvePath pluginId toOSString

Constructor private Base Help System super  BaseHelpSystem
super public static Base Help System get Instance return instance  BaseHelpSystem getInstance
Used to obtain Search Manager return instance of Search Manager public static Search Manager get Search Manager if get Instance search Manager null synchronized Base Help System class if get Instance search Manager null get Instance search Manager new Search Manager return get Instance search Manager  SearchManager SearchManager getSearchManager getInstance searchManager BaseHelpSystem getInstance searchManager getInstance searchManager SearchManager getInstance searchManager
Used to obtain Working Set Manager return instance of Working Set Manager public static synchronized Working Set Manager get Working Set Manager if get Instance working Set Manager null get Instance working Set Manager new Working Set Manager return get Instance working Set Manager  WorkingSetManager WorkingSetManager getWorkingSetManager getInstance workingSetManager getInstance workingSetManager WorkingSetManager getInstance workingSetManager
public static synchronized I Browser get Help Browser boolean force External if force External if get Instance internal Browser null get Instance internal Browser Browser Manager get Instance create Browser false return get Instance internal Browser else if get Instance browser null get Instance browser Browser Manager get Instance create Browser true return get Instance browser  IBrowser getHelpBrowser forceExternal forceExternal getInstance internalBrowser getInstance internalBrowser BrowserManager getInstance createBrowser getInstance internalBrowser getInstance getInstance BrowserManager getInstance createBrowser getInstance
public static synchronized Help Display get Help Display if get Instance help Display null get Instance help Display new Help Display return get Instance help Display  HelpDisplay getHelpDisplay getInstance helpDisplay getInstance helpDisplay HelpDisplay getInstance helpDisplay
public Base Help System new Instance return null  BaseHelpSystem newInstance
Shuts down the Base Help System exception Core Exception if this method fails to shut down this plug in public static void shutdown throws Core Exception if Help Base Plugin DEBUG System out println Base Help System is shutting down NON NLS 1 close any browsers created Browser Manager get Instance close All if get Instance search Manager null get Instance search Manager close if get Instance webapp Started stop the web apps Webapp Manager stop help NON NLS 1 if get Mode MODE WORKBENCH Webapp Manager stop help Control NON NLS 1 if Help Base Plugin DEBUG System out println Help System is shut down NON NLS 1  BaseHelpSystem CoreException CoreException HelpBasePlugin BrowserManager getInstance closeAll getInstance searchManager getInstance searchManager getInstance webappStarted WebappManager getMode MODE_WORKBENCH WebappManager helpControl HelpBasePlugin
try set Default Error Util new I Error Util public void display Error String msg System out println msg  setDefaultErrorUtil IErrorUtil displayError
public void display Error String msg Thread ui Thread System out println msg  displayError uiThread
Called by Platform after loading the plugin public static void startup try set Default Error Util new I Error Util public void display Error String msg System out println msg public void display Error String msg Thread ui Thread System out println msg Help Base Plugin get Default get Plugin Preferences catch Exception e Help Base Plugin get Default get Log log new Status I Status ERROR Help Base Plugin PLUGIN ID 0 Help Base Resources get String E005 NON NLS 1 e if Help Base Plugin DEBUG System out println Base Help System started NON NLS 1  setDefaultErrorUtil IErrorUtil displayError displayError uiThread HelpBasePlugin getDefault getPluginPreferences HelpBasePlugin getDefault getLog IStatus HelpBasePlugin PLUGIN_ID HelpBaseResources getString HelpBasePlugin
public static boolean ensure Webapp Running if get Instance webapp Started get Instance webapp Started true String webapp Plugin get Webapp Plugin if get Mode MODE WORKBENCH start the help control web app try Webapp Manager start help Control NON NLS 1 webapp Plugin Path EMPTY catch Core Exception e Help Base Plugin log Error Help Base Resources get String E042 NON NLS 1 e return false start the help web app try Webapp Manager start help webapp Plugin Path EMPTY NON NLS 1 catch Core Exception e Help Base Plugin log Error Help Base Resources get String E043 e NON NLS 1 Base Help System get Default Error Util display Error Help Base Resources get String E043 NON NLS 1 return false get Instance webapp Running true return get Instance webapp Running  ensureWebappRunning getInstance webappStarted getInstance webappStarted webappPlugin getWebappPlugin getMode MODE_WORKBENCH WebappManager helpControl webappPlugin CoreException HelpBasePlugin logError HelpBaseResources getString WebappManager webappPlugin CoreException HelpBasePlugin logError HelpBaseResources getString BaseHelpSystem getDefaultErrorUtil displayError HelpBaseResources getString getInstance webappRunning getInstance webappRunning
Returns the mode return int public static int get Mode return get Instance mode  getMode getInstance
Sets the mode param mode The mode to set public static void set Mode int mode get Instance mode mode  setMode getInstance
Sets the error messenger public static void set Default Error Util I Error Util em get Instance default Error Messenger em  setDefaultErrorUtil IErrorUtil getInstance defaultErrorMessenger
Returns the default error messenger When no UI is present all errors are sent to System out return I Error Messenger public static I Error Util get Default Error Util return get Instance default Error Messenger  IErrorMessenger IErrorUtil getDefaultErrorUtil getInstance defaultErrorMessenger
Returns the plugin id that defines the help webapp private static String get Webapp Plugin get the webapp extension from the system plugin registry I Extension Point point Platform get Extension Registry get Extension Point WEBAPP EXTENSION ID if point null I Extension extensions point get Extensions if extensions length 0 We need to pick up the non default configuration I Configuration Element elements extensions 0 get Configuration Elements for int i 0 i elements length i String default Value elements i get Attribute WEBAPP DEFAULT ATTRIBUTE if default Value null default Value equals false NON NLS 1 return elements i get Declaring Extension get Namespace if reached this point then then pick the first default webapp if elements length 0 return elements 0 get Declaring Extension get Namespace if all fails return org eclipse help webapp NON NLS 1  getWebappPlugin IExtensionPoint getExtensionRegistry getExtensionPoint WEBAPP_EXTENSION_ID IExtension getExtensions IConfigurationElement getConfigurationElements defaultValue getAttribute WEBAPP_DEFAULT_ATTRIBUTE defaultValue defaultValue getDeclaringExtension getNamespace getDeclaringExtension getNamespace
Obtains name of the Eclipse product return String public static String get Product Name I Product product Platform get Product if product null return NON NLS 1 String name product get Name return name null name NON NLS 1  getProductName IProduct getProduct getName

private static final String LOOP CLASS NAME org eclipse help ui internal HelpUI Event Loop NON NLS 1 static void runUI invoke run NON NLS 1  LOOP_CLASS_NAME HelpUIEventLoop
invoke run NON NLS 1 static void wakeupUI invoke wakeup NON NLS 1 
static void wait For Display invoke wait For NON NLS 1  waitForDisplay waitFor
private static void invoke String method try Bundle bundle Platform get Bundle HELP UI PLUGIN ID if bundle null return Class c bundle load Class LOOP CLASS NAME Method m c get Method method new Class NON NLS 1 m invoke null new Object catch Exception e  getBundle HELP_UI_PLUGIN_ID loadClass LOOP_CLASS_NAME getMethod

private File Lock lock Causes help service to stop and exit public static void stop status STATUS EXITTING if Base Help System MODE STANDALONE Base Help System get Mode UI loop may be sleeping if no SWT browser is up Display Utils wakeupUI  FileLock STATUS_EXITTING BaseHelpSystem MODE_STANDALONE BaseHelpSystem getMode DisplayUtils
Causes help service to exit and start again public static void restart if status STATUS EXITTING status STATUS RESTARTING  STATUS_EXITTING STATUS_RESTARTING
Runs help service application public Object run Object args throws Exception if status STATUS RESTARTING return EXIT RESTART metadata new File Platform get Location to File metadata NON NLS 1 if Base Help System ensure Webapp Running System out println Help Base Resources get String Help Application could Not Start Platform get Log File Location toOS String NON NLS 1 return EXIT OK if status STATUS RESTARTING return EXIT RESTART write Host And Port obtain Lock if Base Help System MODE STANDALONE Base Help System get Mode try running UI loop if possible Display Utils runUI run a headless loop while status STATUS RUNNING try Thread sleep 100 catch Interrupted Exception ie break release Lock if status STATUS RESTARTING return EXIT RESTART else return EXIT OK  STATUS_RESTARTING EXIT_RESTART getLocation toFile BaseHelpSystem ensureWebappRunning HelpBaseResources getString HelpApplication couldNotStart getLogFileLocation toOSString EXIT_OK STATUS_RESTARTING EXIT_RESTART writeHostAndPort obtainLock BaseHelpSystem MODE_STANDALONE BaseHelpSystem getMode DisplayUtils STATUS_RUNNING InterruptedException releaseLock STATUS_RESTARTING EXIT_RESTART EXIT_OK
see I Executable Extension public void set Initialization Data I Configuration Element config Element String property Name Object data String value String Map data get mode NON NLS 1 if infocenter equals Ignore Case value NON NLS 1 Base Help System set Mode Base Help System MODE INFOCENTER else if standalone equals Ignore Case value NON NLS 1 Base Help System set Mode Base Help System MODE STANDALONE  IExecutableExtension setInitializationData IConfigurationElement configElement propertyName equalsIgnoreCase BaseHelpSystem setMode BaseHelpSystem MODE_INFOCENTER equalsIgnoreCase BaseHelpSystem setMode BaseHelpSystem MODE_STANDALONE
private void write Host And Port throws IO Exception Properties p new Properties p put host Webapp Manager get Host NON NLS 1 p put port Webapp Manager get Port NON NLS 1 NON NLS 2 File host Port File new File metadata connection NON NLS 1 host Port File delete On Exit File Output Stream out null try out new File Output Stream host Port File p store out null finally if out null try out close catch IO Exception ioe2  writeHostAndPort IOException WebappManager getHost WebappManager getPort hostPortFile hostPortFile deleteOnExit FileOutputStream FileOutputStream hostPortFile IOException
private void obtain Lock File lock File new File metadata APPLICATION LOCK FILE try Random Access File raf new Random Access File lock File rw NON NLS 1 lock raf get Channel lock catch IO Exception ioe lock null  obtainLock lockFile APPLICATION_LOCK_FILE RandomAccessFile RandomAccessFile lockFile getChannel IOException
private void release Lock if lock null try lock channel close catch IO Exception ioe  releaseLock IOException
public static boolean is Running return status STATUS RUNNING  isRunning STATUS_RUNNING

private I Help Activity Support help Activity Support new I Help Activity Support public boolean is Enabled String href return true  IHelpActivitySupport helpActivitySupport IHelpActivitySupport isEnabled
return true public boolean is Enabled Topic String href String locale return true  isEnabledTopic
return true public void enable Activities String href  enableActivities
public void enable Activities String href public boolean is Filtering Enabled return false  enableActivities isFilteringEnabled
return false public void set Filtering Enabled boolean enabled  setFilteringEnabled
public void set Filtering Enabled boolean enabled public boolean is User Can Toggle Filtering return false  setFilteringEnabled isUserCanToggleFiltering
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 Help Base Plugin get Default get Log log error Status  getString logError errorStatus IStatus PLUGIN_ID IStatus HelpBasePlugin getDefault getLog errorStatus
Logs a Warning message with an exception Note that the message should already be localized to proper local ie Resources get String should already have been called public static synchronized void log Warning String message if Help Base Plugin DEBUG if message null message NON NLS 1 Status warning Status new Status I Status WARNING PLUGIN ID I Status OK message null Help Base Plugin get Default get Log log warning Status  getString logWarning HelpBasePlugin warningStatus IStatus PLUGIN_ID IStatus HelpBasePlugin getDefault getLog warningStatus
return the singleton instance of the Help Base plugin public static Help Base Plugin get Default return plugin  HelpBasePlugin getDefault
public void stop Bundle Context context throws Exception plugin save Plugin Preferences Base Help System shutdown plugin null bundle Context null super stop context  BundleContext savePluginPreferences BaseHelpSystem bundleContext
public void start Bundle Context context throws Exception super start context plugin this bundle Context context Setup debugging options DEBUG is Debugging if DEBUG DEBUG SEARCH true equals Ignore Case Platform get Debug Option PLUGIN ID debug search NON NLS 1 NON NLS 2 determine configuration location for this plug in Location location Platform get Configuration Location if location null URL configURL location getURL if configURL null configURL get Protocol starts With file NON NLS 1 configuration Directory new File configURL get File PLUGIN ID if configuration Directory null configuration Directory get State Location to File Base Help System startup  BundleContext bundleContext isDebugging DEBUG_SEARCH equalsIgnoreCase getDebugOption PLUGIN_ID getConfigurationLocation getProtocol startsWith configurationDirectory getFile PLUGIN_ID configurationDirectory configurationDirectory getStateLocation toFile BaseHelpSystem
Used to obtain directory where configuration like help index can be stored public static File get Configuration Directory return get Default configuration Directory  getConfigurationDirectory getDefault configurationDirectory
Used to obtain help activity support return instance of I Help Activity Support public static I Help Activity Support get Activity Support return get Default help Activity Support  IHelpActivitySupport IHelpActivitySupport getActivitySupport getDefault helpActivitySupport
Sets the activity support param activity Support public static void set Activity Support I Help Activity Support activity Support get Default help Activity Support activity Support  activitySupport setActivitySupport IHelpActivitySupport activitySupport getDefault helpActivitySupport activitySupport

public void initialize Default Preferences Preferences prefs Help Base Plugin get Default get Plugin Preferences String os System get Property os name to Lower Case NON NLS 1 boolean is Windows os index Of windows 1 NON NLS 1 if is Windows prefs set Default custom browser path NON NLS 1 C Program Files Internet Explorer IEXPLORE EXE 1 NON NLS 1 else prefs set Default custom browser path mozilla 1 NON NLS 1 NON NLS 2  initializeDefaultPreferences HelpBasePlugin getDefault getPluginPreferences getProperty toLowerCase isWindows indexOf isWindows setDefault custom_browser_path setDefault custom_browser_path

Resources constructor public Help Base Resources super  HelpBaseResources
Returns a string from a property file public static String get String String name try return res Bundle get String name catch Exception e return name  getString resBundle getString
Returns a string from a property file public static String get String String name String replace0 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 String replace3 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 replace3 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 String replace3 String replace4 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 replace3 replace4 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 String replace3 String replace4 String replace5 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 replace3 replace4 replace5 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile

Constructor public Help Display super  HelpDisplay
Displays help public void display Help boolean force External Do not start help view if documentaton is not available display error if Help System get Tocs length 0 There is no documentation Base Help System get Default Error Util display Error Help Base Resources get String WW001 NON NLS 1 Documentation is not installed return display HelpURL null force External  displayHelp forceExternal HelpSystem getTocs BaseHelpSystem getDefaultErrorUtil displayError HelpBaseResources getString displayHelpURL forceExternal
Displays a help resource specified as a url ul li a URL in a format that can be returned by link org eclipse help I Help Resource get Href I Help Resource get Href li a URL query in the format format em key value amp key value em The valid keys are tab toc topic context Id For example em toc myplugin mytoc xml amp topic myplugin references myclass html em is valid ul public void display Help Resource String href boolean force External check if this is a toc I Toc toc Help Plugin get Toc Manager get Toc href Platform getNL if toc null try display HelpURL toc URL Encoder encode toc get Href UTF 8 force External NON NLS 1 NON NLS 2 catch Unsupported Encoding Exception uee else if href null href starts With tab NON NLS 1 href starts With toc NON NLS 1 href starts With topic NON NLS 1 href starts With context Id NON NLS 1 assume it is a query string display HelpURL href force External else assume this is a topic if get NoframesURL href null try display HelpURL topic URL Encoder encode href UTF 8 force External NON NLS 1 NON NLS 2 catch Unsupported Encoding Exception uee else if href starts With jar file NON NLS 1 topic from a jar to display without frames display HelpURL get BaseURL nftopic get NoframesURL href true NON NLS 1 else display HelpURL get NoframesURL href true  IHelpResource getHref IHelpResource getHref contextId displayHelpResource forceExternal IToc HelpPlugin getTocManager getToc displayHelpURL URLEncoder getHref forceExternal UnsupportedEncodingException startsWith startsWith startsWith startsWith contextId displayHelpURL forceExternal getNoframesURL displayHelpURL URLEncoder forceExternal UnsupportedEncodingException startsWith displayHelpURL getBaseURL getNoframesURL displayHelpURL getNoframesURL
Display help for the a given topic and related topics param context context for which related topics will be displayed param topic related topic to be selected public void display Help I Context context I Help Resource topic boolean force External if context null topic null topic get Href null return String topicURL get TopicURL topic get Href if get NoframesURL topicURL null try String url tab links NON NLS 1 context Id NON NLS 1 URL Encoder encode get ContextID context UTF 8 NON NLS 1 topic NON NLS 1 URL Encoder encode topicURL UTF 8 NON NLS 1 display HelpURL url force External catch Unsupported Encoding Exception uee else if topicURL starts With jar file NON NLS 1 topic from a jar to display without frames display HelpURL get BaseURL nftopic get NoframesURL topicURL true NON NLS 1 else display HelpURL get NoframesURL topicURL true  displayHelp IContext IHelpResource forceExternal getHref getTopicURL getHref getNoframesURL contextId URLEncoder getContextID URLEncoder displayHelpURL forceExternal UnsupportedEncodingException startsWith displayHelpURL getBaseURL getNoframesURL displayHelpURL getNoframesURL
Display help to search view for given query and selected topic param search Query search query in URL format key value key value param topic selected from the search results public void display Search String search Query String topic boolean force External if search Query null topic null return if get NoframesURL topic null try String url tab search NON NLS 1 search Query topic NON NLS 1 URL Encoder encode get TopicURL topic UTF 8 NON NLS 1 display HelpURL url force External catch Unsupported Encoding Exception uee else display HelpURL get NoframesURL topic true  searchQuery displaySearch searchQuery forceExternal searchQuery getNoframesURL searchQuery URLEncoder getTopicURL displayHelpURL forceExternal UnsupportedEncodingException displayHelpURL getNoframesURL
Displays the specified url The url can contain query parameters to identify how help displays the document private void display HelpURL String helpURL boolean force External if Base Help System ensure Webapp Running return if Base Help System get Mode Base Help System MODE STANDALONE wait for Display to be created Display Utils wait For Display try if helpURL null helpURL length 0 Base Help System get Help Browser force External displayURL get FramesetURL else if helpURL starts With tab NON NLS 1 helpURL starts With toc NON NLS 1 helpURL starts With topic NON NLS 1 helpURL starts With context Id NON NLS 1 Base Help System get Help Browser force External displayURL get FramesetURL helpURL NON NLS 1 else Base Help System get Help Browser force External displayURL helpURL catch Exception e Base Help System get Default Error Util display Error Help Base Resources get String Help Display exception Message NON NLS 1 Help Base Plugin log Error Help Base Resources get String Help Display exception NON NLS 1 e get Message e  displayHelpURL forceExternal BaseHelpSystem ensureWebappRunning BaseHelpSystem getMode BaseHelpSystem MODE_STANDALONE DisplayUtils waitForDisplay BaseHelpSystem getHelpBrowser forceExternal getFramesetURL startsWith startsWith startsWith startsWith contextId BaseHelpSystem getHelpBrowser forceExternal getFramesetURL BaseHelpSystem getHelpBrowser forceExternal BaseHelpSystem getDefaultErrorUtil displayError HelpBaseResources getString HelpDisplay exceptionMessage HelpBasePlugin logError HelpBaseResources getString HelpDisplay getMessage
private String get ContextID I Context context if context instanceof Context return Context context getID return Help Plugin get Context Manager add Context context  getContextID IContext HelpPlugin getContextManager addContext
private String get BaseURL return http NON NLS 1 Webapp Manager get Host NON NLS 1 Webapp Manager get Port help NON NLS 1  getBaseURL WebappManager getHost WebappManager getPort
private String get FramesetURL return get BaseURL index jsp NON NLS 1  getFramesetURL getBaseURL
private String get TopicURL String topic if topic null return null if topic starts With NON NLS 1 topic topic substring 2 if topic starts With String base http App Server get Host App Server get Port base help content help topic base topic return topic  getTopicURL startsWith startsWith AppServer getHost AppServer getPort
If href contains URL parameter noframes true return href with that paramter removed otherwise returns null param href return String or null private String get NoframesURL String href if href null return null int ix href index Of noframes true NON NLS 1 if ix 0 remove noframes true return href substring 0 ix 1 href substring ix noframes true length NON NLS 1 ix href index Of noframes true NON NLS 1 if ix 0 remove noframes true return href substring 0 ix 1 href substring ix noframes true length NON NLS 1 can be displayed in frames return null  getNoframesURL indexOf indexOf

Checks if href is matches an enabled activity If it does not match any defined activites it is assumed to be enabled param href return 
public boolean is Enabled String href Checks whether topic belongs to a TOC that mathes enabled activity Enabled children TO Cs are searched if linked by also enabled TO Cs Additionally topic may match description topic of a root TOC return true if topic belongs to an enabled TOC param href param locale locale for which TO Cs are checked  isEnabled TOCs TOCs TOCs
Enables activities with patterns matching the href param href 
public void enable Activities String href public boolean is Filtering Enabled  enableActivities isFilteringEnabled
public void enable Activities String href public boolean is Filtering Enabled public void set Filtering Enabled boolean enabled  enableActivities isFilteringEnabled setFilteringEnabled
public boolean is Filtering Enabled public void set Filtering Enabled boolean enabled public boolean is User Can Toggle Filtering  isFilteringEnabled setFilteringEnabled isUserCanToggleFiltering

Constructor for Index Tool Application public Index Tool Application super  IndexToolApplication IndexToolApplication
see org eclipse core runtime I Executable Extension set Initialization Data org eclipse core runtime I Configuration Element java lang String java lang Object public void set Initialization Data I Configuration Element config String property Name Object data throws Core Exception  IExecutableExtension setInitializationData IConfigurationElement setInitializationData IConfigurationElement propertyName CoreException
see org eclipse core runtime I Platform Runnable run java lang Object public Object run Object args throws Exception try String directory System get Property index Output NON NLS 1 if directory null directory length 0 throw new Exception Help Base Resources get String Index Tool Application property Not Set index Output NON NLS 1 NON NLS 2 String locale Str System get Property index Locale NON NLS 1 if locale Str null locale Str length 2 throw new Exception Help Base Resources get String Index Tool Application property Not Set index Locale NON NLS 1 NON NLS 2 Locale locale if locale Str length 5 locale new Locale locale Str substring 0 2 locale Str substring 3 5 else locale new Locale locale Str substring 0 2 NON NLS 1 preindex directory locale catch Exception e System out println e e print Stack Trace Help Base Plugin log Error Help Base Resources get String Index Tool Application failed e NON NLS 1 return EXIT OK  IPlatformRunnable getProperty indexOutput HelpBaseResources getString IndexToolApplication propertyNotSet indexOutput localeStr getProperty indexLocale localeStr localeStr HelpBaseResources getString IndexToolApplication propertyNotSet indexLocale localeStr localeStr localeStr localeStr printStackTrace HelpBasePlugin logError HelpBaseResources getString IndexToolApplication EXIT_OK
private void preindex String output Dir Locale locale throws Exception File index Path new File Help Base Plugin get Configuration Directory index locale NON NLS 1 clean if index Path exists delete index Path index Base Help System get Search Manager ensure Index Updated new Null Progress Monitor Base Help System get Search Manager get Index locale to String zip up File d new File output Dir nl File separator locale get Language NON NLS 1 if locale get Country length 0 d new File d locale get Country if d exists d mkdirs Zip Output Stream zout new Zip Output Stream new File Output Stream new File d doc index zip NON NLS 1 try zip Directory index Path zout null finally zout close  outputDir indexPath HelpBasePlugin getConfigurationDirectory indexPath indexPath BaseHelpSystem getSearchManager ensureIndexUpdated NullProgressMonitor BaseHelpSystem getSearchManager getIndex toString outputDir getLanguage getCountry getCountry ZipOutputStream ZipOutputStream FileOutputStream doc_index zipDirectory indexPath
Recursively deletes directory and files param file throws IO Exception private static void delete File file throws IO Exception if file is Directory File files file list Files for int i 0 i files length i delete files i if file delete throw new IO Exception Help Base Resources get String Index Tool Application cannot Delete file get Absolute Path NON NLS 1  IOException IOException isDirectory listFiles IOException HelpBaseResources getString IndexToolApplication cannotDelete getAbsolutePath
Adds files in a directory to a zip stream param dir directory with files to zip param zout Zip Output Stream param base directory prefix for file entries inside the zip or null throws IO Exception private static void zip Directory File dir Zip Output Stream zout String base throws IO Exception byte buffer new byte 8192 String files dir list if files null files length 0 return for int i 0 i files length i String path if base null path files i else path base files i NON NLS 1 File f new File dir files i if f is Directory zip Directory f zout path else Zip Entry zentry new Zip Entry path zout put Next Entry zentry File Input Stream input Stream new File Input Stream f int len while len input Stream read buffer 1 zout write buffer 0 len input Stream close zout flush zout close Entry  ZipOutputStream IOException zipDirectory ZipOutputStream IOException isDirectory zipDirectory ZipEntry ZipEntry putNextEntry FileInputStream inputStream FileInputStream inputStream inputStream closeEntry

protected String name null Creates empty Properties for the specified plugin param name name of the file param plugin the plugin public Help Properties String name Plugin plugin this name plugin get State Location to File  HelpProperties getStateLocation toFile
Creates empty Properties persisted in the specified directory param name name of the file param dir directory to persist file in public Help Properties String name File dir super this name name file new File dir name  HelpProperties
Restores contents of the Properties from a file return true if persistant data was read in public boolean restore Input Stream in null boolean loaded false clear Test if we have a contribution file to start with If this is a clean start then we will not have a contribution file return false if file exists return loaded try in new File Input Stream file super load in loaded true catch IO Exception ioe00 Help Plugin log Error Help Base Resources get String File4 file get Name NON NLS 1 null finally if in null try in close catch IO Exception ioe10 return loaded  InputStream FileInputStream IOException HelpPlugin logError HelpBaseResources getString getName IOException
Saves contents of the table to a file return true if operation was successful public boolean save Output Stream out null boolean ret false try out new File Output Stream file super store out This is a generated file do not edit NON NLS 1 ret true catch IO Exception ioe00 Help Plugin log Error Help Base Resources get String Exception occurred NON NLS 1 name file get Absolute Path ioe00 finally try if out null out close catch IO Exception ioe01 return ret  OutputStream FileOutputStream IOException HelpPlugin logError HelpBaseResources getString Exception_occurred getAbsolutePath IOException

public interface I Error Util public void display Error String msg  IErrorUtil displayError
public interface I Error Util public void display Error String msg public void display Error String msg Thread ui Thread  IErrorUtil displayError displayError uiThread

change all occurrences of old Pat to new Pat public static String change String in String old Pat String new Pat if old Pat length 0 return in if old Pat length 1 new Pat length 1 return in replace old Pat char At 0 new Pat char At 0 if in index Of old Pat 0 return in int last Index 0 int new Index 0 String Buffer new String new String Buffer for new Index in index Of old Pat last Index if new Index 1 new String append in substring last Index new Index new Pat last Index new Index old Pat length else new String append in substring last Index break return new String to String  oldPat newPat oldPat newPat oldPat oldPat newPat oldPat charAt newPat charAt indexOf oldPat lastIndex newIndex StringBuffer newString StringBuffer newIndex indexOf oldPat lastIndex newIndex newString lastIndex newIndex newPat lastIndex newIndex oldPat newString lastIndex newString toString
Note the 1st char in the string has position of 0 public static String change String in String old Pat String new Pat int start Pos int num Changes if old Pat length 0 return in if old Pat length 1 new Pat length 1 return in replace old Pat char At 0 new Pat char At 0 int in Len in length if start Pos in Len return in int last Index start Pos int new Index 0 int count Changes 0 String Buffer new String new String Buffer for new Index in index Of old Pat last Index if new Index 1 new String append in substring last Index new Index new Pat last Index new Index old Pat length count Changes else new String append in substring last Index break if count Changes num Changes new String append in substring last Index break return new String to String  oldPat newPat startPos numChanges oldPat oldPat newPat oldPat charAt newPat charAt inLen startPos inLen lastIndex startPos newIndex countChanges StringBuffer newString StringBuffer newIndex indexOf oldPat lastIndex newIndex newString lastIndex newIndex newPat lastIndex newIndex oldPat countChanges newString lastIndex countChanges numChanges newString lastIndex newString toString
return true public static boolean contains Double Blanks String src String String bb NON NLS 1 char b bb char At 0 if src String length 0 for int i 0 i src String length 1 i if b src String char At i b src String char At i 1 return true return false  containsDoubleBlanks srcString charAt srcString srcString srcString charAt srcString charAt
return string abcabc public static String copy String src String int number Of Copies String Buffer result new String Buffer if number Of Copies 0 for int i 1 i number Of Copies i result append src String else result new String Buffer src String return result to String  srcString numberOfCopies StringBuffer StringBuffer numberOfCopies numberOfCopies srcString StringBuffer srcString toString
public static long get Long String str try return Long parse Long str catch Exception m return 0  getLong parseLong
return 0 i e char a is not in bcfg 1st index 0 public static int index Of Any But String src String String valid String int result 1 int src Len src String length walk backward to find if a char within src String is in valid String for int i 0 i src Len i not found stop it if valid String index Of src String char At i 1 result i break return result  indexOfAnyBut srcString validString srcLen srcString srcString validString srcLen validString indexOf srcString charAt
return true if all chars in src String are in a z or A Z public static boolean is Alphabetic String src String return last Index Of Any But src String ALPHABET 1  srcString isAlphabetic srcString lastIndexOfAnyBut srcString
return true if all chars in src String are in a z or A Z 0 9 public static boolean is Alphanumeric String src String return last Index Of Any But src String ALPHANUMERIC 1  srcString isAlphanumeric srcString lastIndexOfAnyBut srcString
return true if all chars are in 0 9 public static boolean is Digits String src String return last Index Of Any But src String NUMERIC 1  isDigits srcString lastIndexOfAnyBut srcString
return 4 i e char e is not in bcfg 1st index 0 public static int last Index Of Any But String src String String valid String int result 1 int src Len src String length walk backward to find if a char within src String is in valid String for int i src Len 1 i 0 i not found stop it if valid String index Of src String char At i 1 result i break return result  lastIndexOfAnyBut srcString validString srcLen srcString srcString validString srcLen validString indexOf srcString charAt
return the string after the matching token is removed public static String match String in String token throws Exception if in null return null in in trim if in starts With token return in substring token length in length else throw new Exception Help Base Resources get String E019 token word in 1 NON NLS 1 Expected 1 but got 2  startsWith HelpBaseResources getString
Expected 1 but got 2 public static int num Words String in String Tokenizer st new String Tokenizer in return st count Tokens  numWords StringTokenizer StringTokenizer countTokens
return 6 public static int occurrence Of String src String char search Char int result 0 walk backward to find if a char within src String is in valid String if src String length 0 for int i 0 i src String length i found increment the count if search Char src String char At i result return result  occurrenceOf srcString searchChar srcString validString srcString srcString searchChar srcString charAt
return f f g public static String strip Leading String src String String p String String result if src String starts With p String leading pat String found result src String substring p String length src String length else not found result src String return result  stripLeading srcString pString srcString startsWith pString patString srcString pString srcString srcString
public static String strip Space String src String String b1 NON NLS 1 int last Index 0 int new Index 0 String Buffer new String new String Buffer for new Index src String index Of b1 last Index if new Index 1 new String append src String substring last Index new Index last Index new Index 1 else new String append src String substring last Index break return new String to String  stripSpace srcString lastIndex newIndex StringBuffer newString StringBuffer newIndex srcString indexOf lastIndex newIndex newString srcString lastIndex newIndex lastIndex newIndex newString srcString lastIndex newString toString
return f f g public static String strip Trailing String src String String p String String result if src String ends With p String leading pat String found result src String substring 0 src String last Index Of p String else not found result src String return result  stripTrailing srcString pString srcString endsWith pString patString srcString srcString lastIndexOf pString srcString
strip the trailing blanks in the src public static String strip Trailing Blanks String src if src null while src length 0 if src ends With NON NLS 1 src src substring 0 src length 1 else break return src  stripTrailingBlanks endsWith
public static String word String in int i String Tokenizer st new String Tokenizer in if i 0 i st count Tokens return NON NLS 1 else String ret new String while st has More Tokens ret st next Token if i 0 return ret return NON NLS 1  StringTokenizer StringTokenizer countTokens hasMoreTokens nextToken
public static String words String in int i String Tokenizer st new String Tokenizer in if i 0 i st count Tokens return NON NLS 1 else while st has More Tokens if i 0 break st next Token if st has More Tokens return st next Token NON NLS 1 else return NON NLS 1  StringTokenizer StringTokenizer countTokens hasMoreTokens nextToken hasMoreTokens nextToken
Returns the unicode encoding of word public static String get Unicode Encoding String word int len word length if len 0 return word char chars new char len word get Chars 0 len chars 0 String Buffer encoded Chars new String Buffer for int j 0 j chars length j String char In Hex Integer to String chars j 16 to Upper Case switch char In Hex length case 1 encoded Chars append u000 append char In Hex NON NLS 1 break case 2 encoded Chars append u00 append char In Hex NON NLS 1 break case 3 encoded Chars append u0 append char In Hex NON NLS 1 break default encoded Chars append u append char In Hex NON NLS 1 break return encoded Chars to String  getUnicodeEncoding getChars StringBuffer encodedChars StringBuffer charInHex toString toUpperCase charInHex encodedChars charInHex encodedChars charInHex encodedChars charInHex encodedChars charInHex encodedChars toString
Returns the unicode encoding of word as u1 u2 u3 where u i is the unicode code decimal of the i th char of word public static String get Unicode Numbers String word int len word length if len 0 return word String Buffer buf new String Buffer len for int i 0 i len i if i 0 buf append int unicode word char At i buf append String value Of unicode return buf to String  u_i getUnicodeNumbers StringBuffer StringBuffer charAt valueOf toString

private I Browser Factory factory param id ID of a browser as specified in plugin xml param label name of the browser param factory the factory that creates instances of this browser public Browser Descriptor String id String label I Browser Factory factory this browserID id this browser Label label this factory factory  IBrowserFactory BrowserDescriptor IBrowserFactory browserLabel
this factory factory public String getID return browserID 
return browserID public String get Label return browser Label  getLabel browserLabel
return browser Label public I Browser Factory get Factory return factory  browserLabel IBrowserFactory getFactory
return factory public boolean is External return Browser Manager BROWSER ID EMBEDDED equals getID  isExternal BrowserManager BROWSER_ID_EMBEDDED

String LN System get Property line separator NON NLS 1 Constructor private Browser Log try new Session true log File Name Help Base Plugin get Default get State Location append browser log NON NLS 1 toOS String catch Exception e can get here if platform is shutting down  getProperty BrowserLog newSession logFileName HelpBasePlugin getDefault getStateLocation toOSString
Obtains singleton private static Browser Log get Instance if instance null instance new Browser Log return instance  BrowserLog getInstance BrowserLog
Appends a line to the browser log public static synchronized void log String message get Instance append message  getInstance
private void append String message if log File Name null return Writer out Writer null try out Writer new Buffered Writer new Output Stream Writer new File Output Stream log File Name true UTF 8 NON NLS 1 if new Session new Session false out Writer write LN formatter format new Date NEW SESSION LN NON NLS 1 out Writer write formatter format new Date message LN NON NLS 1 out Writer flush out Writer close catch Exception e if out Writer null try out Writer close catch IO Exception ioe  logFileName outWriter outWriter BufferedWriter OutputStreamWriter FileOutputStream logFileName newSession newSession outWriter outWriter outWriter outWriter outWriter outWriter IOException

private boolean always Use External false Private Constructor private Browser Manager  alwaysUseExternal BrowserManager
default Browser Desc new Browser Descriptor Null Browser NON NLS 1 NON NLS 2 new I Browser Factory public boolean is Available return true  defaultBrowserDesc BrowserDescriptor IBrowserFactory isAvailable
public I Browser create Browser return new I Browser public void close  IBrowser createBrowser IBrowser
public void displayURL String url String msg Help Base Resources get String no browsers url NON NLS 1 Help Base Plugin log Error msg null Base Help System get Default Error Util display Error msg  HelpBaseResources getString no_browsers HelpBasePlugin logError BaseHelpSystem getDefaultErrorUtil displayError
display Error msg public boolean is Close Supported return false  displayError isCloseSupported
return false public boolean is Set Location Supported return false  isSetLocationSupported
return false public boolean is Set Size Supported return false  isSetSizeSupported
return false public void set Location int width int height  setLocation
public void set Location int width int height public void set Size int x int y  setLocation setSize
public I Browser create Browser return new I Browser public void close public void displayURL String url String msg Help Base Resources get String no browsers url NON NLS 1 Help Base Plugin log Error msg null Base Help System get Default Error Util display Error msg public boolean is Close Supported return false public boolean is Set Location Supported return false public boolean is Set Size Supported return false public void set Location int width int height public void set Size int x int y  IBrowser createBrowser IBrowser HelpBaseResources getString no_browsers HelpBasePlugin logError BaseHelpSystem getDefaultErrorUtil displayError isCloseSupported isSetLocationSupported isSetSizeSupported setLocation setSize
Initialize private void init initialized true Find all available browsers browsers Descriptors create Browser Descriptors 1 set default browser from preferences String def BrowserID Help Base Plugin get Default get Plugin Preferences get Default String DEFAULT BROWSER ID KEY if def BrowserID null equals def BrowserID NON NLS 1 set Default BrowserID def BrowserID 2 set default browser to embedded if default Browser Desc null set Default BrowserID BROWSER ID EMBEDDED 3 set default browser to help implementation of system specific browser String os Platform getOS if default Browser Desc null if Constants WS WIN32 equals Ignore Case os set Default BrowserID BROWSER ID SYSTEM else if Constants OS AIX equals Ignore Case os Constants OS HPUX equals Ignore Case os Constants OS LINUX equals Ignore Case os Constants OS SOLARIS equals Ignore Case os set Default BrowserID BROWSER ID MOZILLA if default Browser Desc null set Default BrowserID BROWSER ID NETSCAPE else if Constants OS MACOSX equals Ignore Case os set Default BrowserID BROWSER ID MAC SYSTEM 4 set browser to one of externally contributed if default Browser Desc null for int i 0 i browsers Descriptors length i if BROWSER ID CUSTOM equals browsers Descriptors i getID default Browser Desc browsers Descriptors i 5 let user specify program if default Browser Desc null set Default BrowserID BROWSER ID CUSTOM 6 use null browser if default Browser Desc null If no browsers at all use the Null Browser Adapter default Browser Desc new Browser Descriptor Null Browser NON NLS 1 NON NLS 2 new I Browser Factory public boolean is Available return true public I Browser create Browser return new I Browser public void close public void displayURL String url String msg Help Base Resources get String no browsers url NON NLS 1 Help Base Plugin log Error msg null Base Help System get Default Error Util display Error msg public boolean is Close Supported return false public boolean is Set Location Supported return false public boolean is Set Size Supported return false public void set Location int width int height public void set Size int x int y initialize current browser String cur BrowserID Help Base Plugin get Default get Plugin Preferences get String DEFAULT BROWSER ID KEY if cur BrowserID null equals cur BrowserID NON NLS 1 set Current BrowserID cur BrowserID may fail if such browser does not exist if current Browser Desc null set Current BrowserID get Default BrowserID set Always Use External Help Base Plugin get Default get Plugin Preferences get Boolean ALWAYS EXTERNAL BROWSER KEY  browsersDescriptors createBrowserDescriptors defBrowserID HelpBasePlugin getDefault getPluginPreferences getDefaultString DEFAULT_BROWSER_ID_KEY defBrowserID defBrowserID setDefaultBrowserID defBrowserID defaultBrowserDesc setDefaultBrowserID BROWSER_ID_EMBEDDED defaultBrowserDesc WS_WIN32 equalsIgnoreCase setDefaultBrowserID BROWSER_ID_SYSTEM OS_AIX equalsIgnoreCase OS_HPUX equalsIgnoreCase OS_LINUX equalsIgnoreCase OS_SOLARIS equalsIgnoreCase setDefaultBrowserID BROWSER_ID_MOZILLA defaultBrowserDesc setDefaultBrowserID BROWSER_ID_NETSCAPE OS_MACOSX equalsIgnoreCase setDefaultBrowserID BROWSER_ID_MAC_SYSTEM defaultBrowserDesc browsersDescriptors BROWSER_ID_CUSTOM browsersDescriptors defaultBrowserDesc browsersDescriptors defaultBrowserDesc setDefaultBrowserID BROWSER_ID_CUSTOM defaultBrowserDesc defaultBrowserDesc BrowserDescriptor IBrowserFactory isAvailable IBrowser createBrowser IBrowser HelpBaseResources getString no_browsers HelpBasePlugin logError BaseHelpSystem getDefaultErrorUtil displayError isCloseSupported isSetLocationSupported isSetSizeSupported setLocation setSize curBrowserID HelpBasePlugin getDefault getPluginPreferences getString DEFAULT_BROWSER_ID_KEY curBrowserID curBrowserID setCurrentBrowserID curBrowserID currentBrowserDesc setCurrentBrowserID getDefaultBrowserID setAlwaysUseExternal HelpBasePlugin getDefault getPluginPreferences getBoolean ALWAYS_EXTERNAL_BROWSER_KEY
Obtains singleton instance public static Browser Manager get Instance if instance null instance new Browser Manager return instance  BrowserManager getInstance BrowserManager
Creates all adapters and returns available ones private Browser Descriptor create Browser Descriptors if this browsers Descriptors null return this browsers Descriptors Collection b Descriptors new Array List I Configuration Element config Elements Platform get Extension Registry get Configuration Elements For Help Base Plugin PLUGIN ID browser NON NLS 1 for int i 0 i config Elements length i if config Elements i get Name equals browser NON NLS 1 continue String id config Elements i get Attribute id NON NLS 1 if id null continue String label config Elements i get Attribute name NON NLS 1 if label null continue try Object adapter config Elements i create Executable Extension factoryclass NON NLS 1 if adapter instanceof I Browser Factory continue if I Browser Factory adapter is Available Browser Descriptor descriptor new Browser Descriptor id label I Browser Factory adapter if descriptor is External b Descriptors add descriptor else internal Browser Desc descriptor catch Core Exception ce this browsers Descriptors Browser Descriptor b Descriptors to Array new Browser Descriptor b Descriptors size return this browsers Descriptors  BrowserDescriptor createBrowserDescriptors browsersDescriptors browsersDescriptors bDescriptors ArrayList IConfigurationElement configElements getExtensionRegistry getConfigurationElementsFor HelpBasePlugin PLUGIN_ID configElements configElements getName configElements getAttribute configElements getAttribute configElements createExecutableExtension IBrowserFactory IBrowserFactory isAvailable BrowserDescriptor BrowserDescriptor IBrowserFactory isExternal bDescriptors internalBrowserDesc CoreException browsersDescriptors BrowserDescriptor bDescriptors toArray BrowserDescriptor bDescriptors browsersDescriptors
Obtains browsers descriptors public Browser Descriptor get Browser Descriptors if initialized init return this browsers Descriptors  BrowserDescriptor getBrowserDescriptors browsersDescriptors
Gets the current BrowserID return Returns a String or null if not set public String get Current BrowserID if initialized init if current Browser Desc null return null return current Browser Desc getID  currentBrowserID getCurrentBrowserID currentBrowserDesc currentBrowserDesc
Gets the current BrowserID return Returns a String or null if not set public String get Current Internal BrowserID if initialized init if is Embedded Browser Present always Use External return internal Browser Desc getID else return get Current BrowserID  currentBrowserID getCurrentInternalBrowserID isEmbeddedBrowserPresent alwaysUseExternal internalBrowserDesc getCurrentBrowserID
Gets the current BrowserID return Returns a String or null if not set public String get Default BrowserID if initialized init if default Browser Desc null return null return default Browser Desc getID  currentBrowserID getDefaultBrowserID defaultBrowserDesc defaultBrowserDesc
Sets the current BrowserID If browser of given ID does not exists the method does nothing param current AdapterID The ID of the adapter to to set as current public void set Current BrowserID String current AdapterID if initialized init for int i 0 i browsers Descriptors length i if browsers Descriptors i getID equals current AdapterID current Browser Desc browsers Descriptors i return  currentBrowserID currentAdapterID setCurrentBrowserID currentAdapterID browsersDescriptors browsersDescriptors currentAdapterID currentBrowserDesc browsersDescriptors
Sets the default BrowserID If browser of given ID does not exists the method does nothing param default AdapterID The ID of the adapter to to set as default private void set Default BrowserID String default AdapterID if initialized init for int i 0 i browsers Descriptors length i if browsers Descriptors i getID equals default AdapterID default Browser Desc browsers Descriptors i return  defaultBrowserID defaultAdapterID setDefaultBrowserID defaultAdapterID browsersDescriptors browsersDescriptors defaultAdapterID defaultBrowserDesc browsersDescriptors
Creates web browser If preferences specify to always use external the parameter will not be honored public I Browser create Browser boolean external if initialized init external external always Use External return create Browser Adapter force External if external return new Current Browser create Browser Adapter true get Current BrowserID true else return new Current Browser create Browser Adapter always Use External get Current Internal BrowserID false  IBrowser createBrowser alwaysUseExternal createBrowserAdapter forceExternal CurrentBrowser createBrowserAdapter getCurrentBrowserID CurrentBrowser createBrowserAdapter alwaysUseExternal getCurrentInternalBrowserID
Creates web browser public I Browser create Browser return create Browser true  IBrowser createBrowser createBrowser
Creates web browser for external false if no internal browsers are present it will create external one private I Browser create Browser Adapter boolean external if initialized init I Browser browser null if external is Embedded Browser Present browser internal Browser Desc get Factory create Browser else browser current Browser Desc get Factory create Browser browsers add browser return browser  IBrowser createBrowserAdapter IBrowser isEmbeddedBrowserPresent internalBrowserDesc getFactory createBrowser currentBrowserDesc getFactory createBrowser
Closes all browsers created public void close All if initialized nothing to do do not initialize return for Iterator it browsers iterator it has Next I Browser browser I Browser it next browser close  closeAll hasNext IBrowser IBrowser
public boolean is Embedded Browser Present if initialized init return internal Browser Desc null  isEmbeddedBrowserPresent internalBrowserDesc
public void set Always Use External boolean always External if initialized init always Use External always External is Embedded Browser Present  setAlwaysUseExternal alwaysExternal alwaysUseExternal alwaysExternal isEmbeddedBrowserPresent
private boolean is Always Use External if is Embedded Browser Present return true return always Use External  isAlwaysUseExternal isEmbeddedBrowserPresent alwaysUseExternal

boolean external public Current Browser I Browser browser Impl String browser Adapter Id boolean external Browser this browser Adapter browser Impl this browser Adapter Id browser Adapter Id this external external Browser  CurrentBrowser IBrowser browserImpl browserAdapterId externalBrowser browserAdapter browserImpl browserAdapterId browserAdapterId externalBrowser
see org eclipse help browser I Browser close public void close browser Adapter close  IBrowser browserAdapter
see org eclipse help browser I Browser is Close Supported public boolean is Close Supported return browser Adapter is Close Supported  IBrowser isCloseSupported isCloseSupported browserAdapter isCloseSupported
see org eclipse help browser I Browser displayURL java lang String public void displayURL String url throws Exception check Default Adapter if new Browser Adapter null browser Adapter close browser Adapter new Browser Adapter new Browser Adapter null browser Adapter Id new Browser Adapter Id new Browser Adapter Id null if location Set browser Adapter set Location x y if size Set browser Adapter set Size width height browser Adapter displayURL url  IBrowser checkDefaultAdapter newBrowserAdapter browserAdapter browserAdapter newBrowserAdapter newBrowserAdapter browserAdapterId newBrowserAdapterId newBrowserAdapterId locationSet browserAdapter setLocation sizeSet browserAdapter setSize browserAdapter
see org eclipse help browser I Browser is Set Location Supported public boolean is Set Location Supported check Default Adapter if new Browser Adapter Id null return browser Adapter is Set Location Supported else return browser Adapter is Set Location Supported new Browser Adapter is Set Location Supported  IBrowser isSetLocationSupported isSetLocationSupported checkDefaultAdapter newBrowserAdapterId browserAdapter isSetLocationSupported browserAdapter isSetLocationSupported newBrowserAdapter isSetLocationSupported
see org eclipse help browser I Browser is Set Size Supported public boolean is Set Size Supported check Default Adapter if new Browser Adapter Id null return browser Adapter is Set Size Supported else return browser Adapter is Set Size Supported new Browser Adapter is Set Size Supported  IBrowser isSetSizeSupported isSetSizeSupported checkDefaultAdapter newBrowserAdapterId browserAdapter isSetSizeSupported browserAdapter isSetSizeSupported newBrowserAdapter isSetSizeSupported
see org eclipse help browser I Browser set Location int int public void set Location int x int y check Default Adapter browser Adapter set Location x y location Set true this x x this y y  IBrowser setLocation setLocation checkDefaultAdapter browserAdapter setLocation locationSet
see org eclipse help browser I Browser set Size int int public void set Size int width int height check Default Adapter browser Adapter set Size width height size Set true this width width this height height  IBrowser setSize setSize checkDefaultAdapter browserAdapter setSize sizeSet
private void check Default Adapter if external if browser Adapter Id Browser Manager get Instance get Current BrowserID new Browser Adapter Browser Manager get Instance create Browser true new Browser Adapter Id Browser Manager get Instance get Current BrowserID else if browser Adapter Id Browser Manager get Instance get Current Internal BrowserID new Browser Adapter Browser Manager get Instance create Browser false new Browser Adapter Id Browser Manager get Instance get Current Internal BrowserID  checkDefaultAdapter browserAdapterId BrowserManager getInstance getCurrentBrowserID newBrowserAdapter BrowserManager getInstance createBrowser newBrowserAdapterId BrowserManager getInstance getCurrentBrowserID browserAdapterId BrowserManager getInstance getCurrentInternalBrowserID newBrowserAdapter BrowserManager getInstance createBrowser newBrowserAdapterId BrowserManager getInstance getCurrentInternalBrowserID

see org eclipse help browser I Browser close public void close  IBrowser
see org eclipse help browser I Browser is Close Supported public boolean is Close Supported return false  IBrowser isCloseSupported isCloseSupported
see org eclipse help browser I Browser displayURL java lang String public void displayURL String url throws Exception String path Help Base Plugin get Default get Plugin Preferences get String Custom Browser CUSTOM BROWSER PATH KEY String command prepare Command path url 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 Help Base Plugin log Error Help Base Resources get String Custom Browser error Launching url path NON NLS 1 e throw new Exception Help Base Resources get String Custom Browser error Launching url path NON NLS 1  IBrowser HelpBasePlugin getDefault getPluginPreferences getString CustomBrowser CUSTOM_BROWSER_PATH_KEY prepareCommand getRuntime outConsumer StreamConsumer getInputStream outConsumer setName outConsumer errConsumer StreamConsumer getErrorStream errConsumer setName errConsumer HelpBasePlugin logError HelpBaseResources getString CustomBrowser errorLaunching HelpBaseResources getString CustomBrowser errorLaunching
see org eclipse help browser I Browser is Set Location Supported public boolean is Set Location Supported return false  IBrowser isSetLocationSupported isSetLocationSupported
see org eclipse help browser I Browser is Set Size Supported public boolean is Set Size Supported return false  IBrowser isSetSizeSupported isSetSizeSupported
see org eclipse help browser I Browser set Location int int public void set Location int x int y  IBrowser setLocation setLocation
see org eclipse help browser I Browser set Size int int public void set Size int width int height  IBrowser setSize setSize
Creates the final command to launch param path param url return String private 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 qotes 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 if 1 equals token NON NLS 1 token List set i url substituted true else if 1 equals token NON NLS 1 token List set i url NON NLS 1 NON NLS 2 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 tokenList tokenList tokenList tokenList tokenList toArray

see org eclipse help browser I Browser Factory is Available public boolean is Available return true  IBrowserFactory isAvailable isAvailable
see org eclipse help browser I Browser Factory create Browser public I Browser create Browser return new Custom Browser  IBrowserFactory createBrowser IBrowser createBrowser CustomBrowser

static Default Browser Adapter get Instance if fg Instance null fg Instance new Default Browser Adapter return fg Instance  DefaultBrowserAdapter getInstance fgInstance fgInstance DefaultBrowserAdapter fgInstance
see org eclipse help browser I Browser close public void close  IBrowser
see org eclipse help browser I Browser displayURL String public void displayURL String url 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 Help Base Plugin log Error Help Base Resources get String Default Browser Adapter execute Failed NON NLS 1 ioe  IBrowser getRuntime IOException HelpBasePlugin logError HelpBaseResources getString DefaultBrowserAdapter executeFailed
see org eclipse help browser I Browser is Close Supported public boolean is Close Supported return false  IBrowser isCloseSupported isCloseSupported
see org eclipse help browser I Browser is Set Location Supported public boolean is Set Location Supported return false  IBrowser isSetLocationSupported isSetLocationSupported
see org eclipse help browser I Browser is Set Size Supported public boolean is Set Size Supported return false  IBrowser isSetSizeSupported isSetSizeSupported
see org eclipse help browser I Browser set Location int int public void set Location int x int y  IBrowser setLocation setLocation
see org eclipse help browser I Browser set Size int int public void set Size int width int height  IBrowser setSize setSize

public class Default Browser Factory implements I Browser Factory public Default Browser Factory super  DefaultBrowserFactory IBrowserFactory DefaultBrowserFactory
public boolean is Available return Constants OS MACOSX equals Ignore Case Platform getOS we assume that every Mac OS X has an usr bin osascript so we don t test any further  isAvailable OS_MACOSX equalsIgnoreCase
see I Browser Factory create Browser public I Browser create Browser return Default Browser Adapter get Instance  IBrowserFactory createBrowser IBrowser createBrowser DefaultBrowserAdapter getInstance

protected Thread ui Thread Constructor executable executable filename to launch executable Name name of the program to display when error occurs Mozilla Browser Adapter String executable String executable Name this ui Thread Thread current Thread this executable executable this executable Name executable Name  uiThread executableName MozillaBrowserAdapter executableName uiThread currentThread executableName executableName
see I Browser close public void close  IBrowser
public void displayURL String url if last Browser Thread null last Browser Thread exit Requested true if set Location Pending set Size Pending url create PositioningURL url last Browser Thread new Browser Thread url last Browser Thread start set Location Pending false set Size Pending false  lastBrowserThread lastBrowserThread exitRequested setLocationPending setSizePending createPositioningURL lastBrowserThread BrowserThread lastBrowserThread setLocationPending setSizePending
see I Browser is Close Supported public boolean is Close Supported return false  IBrowser isCloseSupported isCloseSupported
see I Browser is Set Location Supported public boolean is Set Location Supported return true  IBrowser isSetLocationSupported isSetLocationSupported
see I Browser is Set Size Supported public boolean is Set Size Supported return true  IBrowser isSetSizeSupported isSetSizeSupported
public void set Location int x int y this x x this y y set Location Pending true  setLocation setLocationPending
public void set Size int width int height this width width this height height set Size Pending true  setSize setSizePending
private synchronized String create PositioningURL String url I Path plugin Path Help Base Plugin get Default get State Location File out File plugin Path append mozilla Positon NON NLS 1 append position html NON NLS 1 to File try out File get Parent File mkdirs Print Writer writer new Print Writer new Buffered Writer new Output Stream Writer new File Output Stream out File UTF8 NON NLS 1 false writer println DOCTYPE HTML PUBLIC W3C DTD HTML 4 0 Transitional EN NON NLS 1 writer println html head NON NLS 1 writer println meta http equiv Content Type content text html charset iso 8859 1 NON NLS 1 writer print title title script language Java Script NON NLS 1 if set Size Pending writer print window resize To width height NON NLS 1 NON NLS 2 NON NLS 3 if set Location Pending writer print window move To x y NON NLS 1 NON NLS 2 NON NLS 3 writer print location replace url NON NLS 1 NON NLS 2 writer print script head body NON NLS 1 writer print a href url gt a NON NLS 1 NON NLS 2 writer print body html NON NLS 1 writer close return file out File get Absolute Path NON NLS 1 catch IO Exception ioe return the original url return url  createPositioningURL IPath pluginPath HelpBasePlugin getDefault getStateLocation outFile pluginPath mozillaPositon toFile outFile getParentFile PrintWriter PrintWriter BufferedWriter OutputStreamWriter FileOutputStream outFile JavaScript setSizePending resizeTo setLocationPending moveTo outFile getAbsolutePath IOException
public boolean exit Requested false private String url public Browser Thread String url Name this url url Name  exitRequested BrowserThread urlName urlName
param browser Cmd return int 0 if success private int open Browser String browser Cmd try Process pr Runtime get Runtime exec browser Cmd Stream Consumer outputs new Stream Consumer pr get Input Stream outputs start Stream Consumer errors new Stream Consumer pr get Error Stream errors start pr wait For int ret pr exit Value if ret 0 errors In Output outputs errors return 1 return ret catch Interrupted Exception e catch IO Exception e String msg Help Base Resources get String Mozilla Browser Adapter execute Failed NON NLS 1 executable Name Help Base Plugin log Error msg e Base Help System get Default Error Util display Error msg ui Thread return success so second command does not execute return 0 return 1  browserCmd openBrowser browserCmd getRuntime browserCmd StreamConsumer StreamConsumer getInputStream StreamConsumer StreamConsumer getErrorStream waitFor exitValue errorsInOutput InterruptedException IOException HelpBaseResources getString MozillaBrowserAdapter executeFailed executableName HelpBasePlugin logError BaseHelpSystem getDefaultErrorUtil displayError uiThread
On some O Ses 0 is always returned by netscape remote 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 running window found NON NLS 1 0 outputs get Last Line index Of not running on display NON NLS 1 0 return true errors join 1000 if errors get Last Line null errors get Last Line index Of No running window found NON NLS 1 0 errors get Last Line index Of not running on display NON NLS 1 0 return true catch Interrupted Exception ie ignore return false  OSes InterruptedException errorsInOutput StreamConsumer StreamConsumer getLastLine getLastLine indexOf getLastLine indexOf getLastLine getLastLine indexOf getLastLine indexOf InterruptedException
public void run If browser is opening wait until it fully opens wait For Browser if exit Requested return if open Browser executable remote openURL url NON NLS 1 NON NLS 2 0 return if exit Requested return browser Fully Opened At System current Time Millis DELAY open Browser executable url NON NLS 1  waitForBrowser exitRequested openBrowser exitRequested browserFullyOpenedAt currentTimeMillis openBrowser
private void wait For Browser while System current Time Millis browser Fully Opened At try if exit Requested return Thread sleep 100 catch Interrupted Exception ie  waitForBrowser currentTimeMillis browserFullyOpenedAt exitRequested InterruptedException

private Mozilla Browser Adapter browser Instance null Constructor public Mozilla Factory super  MozillaBrowserAdapter browserInstance MozillaFactory
public boolean is Available if is SupportedOS System get Property os name NON NLS 1 return false try Process pr Runtime get Runtime exec which executable NON NLS 1 Stream Consumer outputs new Stream Consumer pr get Input Stream outputs start Stream Consumer errors new Stream Consumer pr get Error Stream errors start pr wait For int ret pr exit Value if ret 0 return errors In Output outputs errors else return false catch Interrupted Exception e return false catch IO Exception e launching which failed assume browser executable is present return true  isAvailable isSupportedOS getProperty getRuntime StreamConsumer StreamConsumer getInputStream StreamConsumer StreamConsumer getErrorStream waitFor exitValue errorsInOutput InterruptedException IOException
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  OSes InterruptedException errorsInOutput StreamConsumer StreamConsumer getLastLine getLastLine indexOf getLastLine getLastLine indexOf InterruptedException
public I Browser create Browser Create single browser for all clients if browser Instance null browser Instance new Mozilla Browser Adapter executable executable Name return browser Instance  IBrowser createBrowser browserInstance browserInstance MozillaBrowserAdapter executableName browserInstance
see org eclipse core runtime I Executable Extension set Initialization Data org eclipse core runtime I Configuration Element java lang String java lang Object public void set Initialization Data I Configuration Element config String property Name Object data throws Core Exception try Hashtable params Hashtable data executable String params get executable NON NLS 1 executable Name String params get executable Name NON NLS 1 os List String params get os NON NLS 1 catch Exception e throw new Core Exception new Status I Status ERROR Help Base Plugin PLUGIN ID I Status OK Help Base Resources get String Mozilla Factory data Missing NON NLS 1 e  IExecutableExtension setInitializationData IConfigurationElement setInitializationData IConfigurationElement propertyName CoreException executableName executableName osList CoreException IStatus HelpBasePlugin PLUGIN_ID IStatus HelpBaseResources getString MozillaFactory dataMissing
private boolean is SupportedOS String os if os List null os List length 0 parameter missing return false String O Ses os List split s NON NLS 1 for int i 0 i O Ses length i if os to Lower Case starts With O Ses i to Lower Case return true return false  isSupportedOS osList osList OSes osList OSes toLowerCase startsWith OSes toLowerCase

private String last Line public Stream Consumer Input Stream input Stream super set Daemon true b Reader new Buffered Reader new Input Stream Reader input Stream  lastLine 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 Help Base Plugin log Error Help Base Resources get String WE001 ioe NON NLS 1  bReader readLine lastLine BrowserLog bReader IOException HelpBasePlugin logError HelpBaseResources getString
return last line obtained or null public String get Last Line return last Line  getLastLine lastLine

protected String shortID Context constructor public Context Attributes attrs super attrs if attrs null return shortID attrs get Value id NON NLS 1  getValue
return plain text without b or b bug 59541 public String get Text return text if there are spaces on any or both side of bold they need to be collapsed to one replace All s b s s b s NON NLS 1 NON NLS 2 replace All b NON NLS 1 NON NLS 2  getText replaceAll replaceAll
return styled text with b and b to mark bold range public String get Styled Text return text  getStyledText
public I Help Resource get Related Topics if children size 0 I Help Resource related new I Help Resource children size children to Array related return related else signal empty toc handled by calling class return null  IHelpResource getRelatedTopics IHelpResource IHelpResource toArray
public void set Styled Text String s text s  setStyledText
Obtains short id without plugin public String get Short Id return shortID  getShortId
return shortID public String getID return pluginID shortID NON NLS 1 
Sets the pluginID param pluginID The pluginID to set public void set PluginID String pluginID this pluginID pluginID  setPluginID
see Contexts Node build Contexts Builder public void build Contexts Builder builder builder build this  ContextsNode ContextsBuilder ContextsBuilder
Replaces children list public void set Children List children this children children  setChildren

private int id Counter 0 Help Context Manager constructor public Context Manager super create Contexts Files Platform get Extension Registry add Registry Change Listener this Help Plugin PLUGIN ID  idCounter HelpContextManager ContextManager createContextsFiles getExtensionRegistry addRegistryChangeListener HelpPlugin PLUGIN_ID
Finds the context given context ID public I Context get Context String context Id if Help Plugin DEBUG CONTEXT System out println Context Manager get Context context Id NON NLS 1 NON NLS 2 if context Id null return null String plugin context Id String id context Id int dot context Id last Index Of if dot 0 dot context Id length 1 no dot in the middle of context ID return null plugin context Id substring 0 dot id context Id substring dot 1 Plugin Contexts contexts plugins Contexts get plugin if contexts null contexts load Plugin Contexts plugin return contexts get id  IContext getContext contextId HelpPlugin DEBUG_CONTEXT ContextManager getContext contextId contextId contextId contextId contextId lastIndexOf contextId contextId contextId PluginContexts pluginsContexts loadPluginContexts
Loads context xml with context for a specified plugin creates context nodes and adds to plugin Context map private synchronized Plugin Contexts load Plugin Contexts String plugin Plugin Contexts contexts plugins Contexts get plugin if contexts null contexts new Plugin Contexts read the context info from the XML contributions List plugin Contexts Files List contexts Files get plugin if plugin Contexts Files null plugin Contexts Files new Array List Contexts Builder builder new Contexts Builder contexts builder build plugin Contexts Files plugins Contexts put plugin contexts return contexts  pluginContext PluginContexts loadPluginContexts PluginContexts pluginsContexts PluginContexts pluginContextsFiles contextsFiles pluginContextsFiles pluginContextsFiles ArrayList ContextsBuilder ContextsBuilder pluginContextsFiles pluginsContexts
Creates a list of context files private void create Contexts Files read extension point and retrieve all context contributions I Extension Point xpt Platform get Extension Registry get Extension Point CONTEXTS XP FULLNAME if xpt null return no contributions I Extension extensions xpt get Extensions for int i 0 i extensions length i create Context File extensions i  createContextsFiles IExtensionPoint getExtensionRegistry getExtensionPoint CONTEXTS_XP_FULLNAME IExtension getExtensions createContextFile
param extension return Collection of String plugin I Ds that have new contexts contributed private Collection create Context File I Extension extension Collection plugins new Hash Set String defining Plugin extension get Namespace I Configuration Element context Contributions extension get Configuration Elements for int j 0 j context Contributions length j if contexts equals context Contributions j get Name NON NLS 1 String plugin context Contributions j get Attribute plugin NON NLS 1 if plugin null equals plugin NON NLS 1 plugin defining Plugin String file Name context Contributions j get Attribute file NON NLS 1 in v1 file attribute was called name if file Name null file Name context Contributions j get Attribute name NON NLS 1 if file Name null String msg Help Resources get String Context Manager File Attribute NON NLS 1 CONTEXTS XP FULLNAME defining Plugin Help Plugin log Error msg null continue List plugin Contexts Files List contexts Files get plugin if plugin Contexts Files null plugin Contexts Files new Array List contexts Files put plugin plugin Contexts Files plugin Contexts Files add new Contexts File defining Plugin file Name plugin plugins add plugin return plugins  IDs createContextFile IExtension HashSet definingPlugin getNamespace IConfigurationElement contextContributions getConfigurationElements contextContributions contextContributions getName contextContributions getAttribute definingPlugin fileName contextContributions getAttribute fileName fileName contextContributions getAttribute fileName HelpResources getString ContextManager FileAttribute CONTEXTS_XP_FULLNAME definingPlugin HelpPlugin logError pluginContextsFiles contextsFiles pluginContextsFiles pluginContextsFiles ArrayList contextsFiles pluginContextsFiles pluginContextsFiles ContextsFile definingPlugin fileName
Registers context in the manager return context ID assigned to the context public String add Context I Context context String plugin Help Plugin PLUGIN ID String id String dynamic ContextI Ds get context if id null context already registered else generate ID and register the context id ID id Counter NON NLS 1 dynamic ContextI Ds put context id Plugin Contexts contexts plugins Contexts get plugin if contexts null contexts load Plugin Contexts plugin contexts put id context return plugin id NON NLS 1  addContext IContext HelpPlugin PLUGIN_ID dynamicContextIDs idCounter dynamicContextIDs PluginContexts pluginsContexts loadPluginContexts
public synchronized void registry Changed I Registry Change Event event I Extension Delta deltas event get Extension Deltas Help Plugin PLUGIN ID CONTEXTS XP NAME for int i 0 i deltas length i if deltas i get Kind I Extension Delta ADDED I Extension extension deltas i get Extension Collection affected Plugins create Context File extension reset contexts for affected plugins they will be recreated on demand for Iterator it affected Plugins iterator it has Next String plugin Id String it next plugins Contexts remove plugin Id  registryChanged IRegistryChangeEvent IExtensionDelta getExtensionDeltas HelpPlugin PLUGIN_ID CONTEXTS_XP_NAME getKind IExtensionDelta IExtension getExtension affectedPlugins createContextFile affectedPlugins hasNext pluginId pluginsContexts pluginId

public class Contexts extends Contexts Node Contexts constructor public Contexts Attributes attrs super attrs  ContextsNode
super attrs public void build Contexts Builder builder  ContextsBuilder

private String pluginID Contexts Builder Constructor public Contexts Builder Plugin Contexts plugin Contexts this contexts plugin Contexts  ContextsBuilder PluginContexts pluginContexts pluginContexts
public void build Related Topic related Topic set the href on the related topic String href related Topic get Href if href null related Topic set Href NON NLS 1 else if href equals no empty link NON NLS 1 href starts With no help url NON NLS 1 href index Of 1 no other protocols related Topic set Href defining PluginID href NON NLS 1 NON NLS 2  RelatedTopic relatedTopic relatedTopic getHref relatedTopic setHref startsWith indexOf relatedTopic setHref definingPluginID
public void build Context context context set PluginID pluginID if context with same Id exists merge them Context existing Context Context contexts get context get Short Id if existing Context null merge Contexts existing Context context else contexts put context get Short Id context  setPluginID existingContext getShortId existingContext mergeContexts existingContext getShortId
public void build Contexts File contexts File this pluginID contexts File get PluginID this defining PluginID contexts File get Defining PluginID Contexts File Parser parser new Contexts File Parser this parser parse contexts File  ContextsFile contextsFile contextsFile getPluginID definingPluginID contextsFile getDefiningPluginID ContextsFileParser ContextsFileParser contextsFile
public void build List plugin Contexts Files for Iterator context Files It plugin Contexts Files iterator context Files It has Next Contexts File contexts File Contexts File context Files It next contexts File build this  pluginContextsFiles contextFilesIt pluginContextsFiles contextFilesIt hasNext ContextsFile contextsFile ContextsFile contextFilesIt contextsFile
Merges Text and Links from new Context into an existing Context private void merge Contexts Context existing Context Context new Context Merge Text if new Context get Styled Text null if existing Context get Styled Text null existing Context set Styled Text existing Context get Styled Text n NON NLS 1 new Context get Styled Text else existing Context set Styled Text new Context get Styled Text Merge Related Links existing Context get Children add All new Context get Children remove Duplicate Links existing Context  mergeContexts existingContext newContext newContext getStyledText existingContext getStyledText existingContext setStyledText existingContext getStyledText newContext getStyledText existingContext setStyledText newContext getStyledText existingContext getChildren addAll newContext getChildren removeDuplicateLinks existingContext
Filters out the duplicate related topics in a Context private void remove Duplicate Links Context context List links context get Children if links null links size 0 return List filtered new Array List for Iterator it links iterator it has Next I Help Resource topic1 I Help Resource it next if is Valid Topic topic1 continue boolean dup false for int j 0 j filtered size j I Help Resource topic2 I Help Resource filtered get j if is Valid Topic topic2 continue if equal Topics topic1 topic2 dup true break if dup filtered add topic1 context set Children filtered  removeDuplicateLinks getChildren ArrayList hasNext IHelpResource IHelpResource isValidTopic IHelpResource IHelpResource isValidTopic equalTopics setChildren
Checks if topic labels and href are not null and not empty strings private boolean is Valid Topic I Help Resource topic return topic null topic get Href null equals topic get Href topic get Label null NON NLS 1 equals topic get Label NON NLS 1  isValidTopic IHelpResource getHref getHref getLabel getLabel
Check if two context topic are the same They are considered the same if both labels and href are equal private boolean equal Topics I Help Resource topic1 I Help Resource topic2 return topic1 get Href equals topic2 get Href topic1 get Label equals topic2 get Label  equalTopics IHelpResource IHelpResource getHref getHref getLabel getLabel

protected String pluginID Contexts File Constructor protected Contexts File String defining Plugin String href String plugin this href href this defining PluginID defining Plugin this pluginID plugin  ContextsFile definingPlugin definingPluginID definingPlugin
Gets the href return Returns a String protected String get Href return href  getHref
protected Input Stream get Input Stream Input Stream stream null try if defining PluginID null stream Resource Locator open From Plugin defining PluginID href Platform getNL else stream new File Input Stream href catch IO Exception e return stream  InputStream getInputStream InputStream definingPluginID ResourceLocator openFromPlugin definingPluginID FileInputStream IOException
Gets the defining PluginID return Returns a String public String get Defining PluginID return defining PluginID  definingPluginID getDefiningPluginID definingPluginID
Gets the plugin ID return Returns a String public String get PluginID return pluginID  getPluginID
return pluginID public void build Contexts Builder builder builder build this  ContextsBuilder

private final static SAX Parser Factory factory SAX Parser Factory new Instance public Contexts File Parser Contexts Builder builder super this builder builder  SAXParserFactory SAXParserFactory newInstance ContextsFileParser ContextsBuilder
Receive notification of character data public void characters char ch int start int length throws SAX Exception if seen Description buffer append ch start length if Help Plugin DEBUG CONTEXT System out println Contexts File Parser characters got char from parser NON NLS 1 new String Buffer append ch start length to String  SAXException seenDescription HelpPlugin DEBUG_CONTEXT ContextsFileParser StringBuffer toString
Receive notification of the end of an element public void end Element String namespaceURI String local Name String q Name throws SAX Exception make sure that no error has already occurred before adding to stack if q Name equals Contexts Node DESC ELEM seen Description false Context stack peek set Styled Text buffer to String buffer set Length 0 else if q Name equals Contexts Node DESC TXT BOLD pop the starting bold tag stack pop if stack peek equals Contexts Node BOLD TAG buffer append Contexts Node BOLD CLOSE TAG else Contexts Node node Contexts Node stack pop node build builder  endElement localName qName SAXException qName ContextsNode DESC_ELEM seenDescription setStyledText toString setLength qName ContextsNode DESC_TXT_BOLD ContextsNode BOLD_TAG ContextsNode BOLD_CLOSE_TAG ContextsNode ContextsNode
see Error Handler error SAX Parse Exception public void error SAX Parse Exception ex String message get Message E001 ex NON NLS 1 Help Plugin log Error message null Runtime Help Status get Instance add Parse Error message ex get System Id  ErrorHandler SAXParseException SAXParseException getMessage HelpPlugin logError RuntimeHelpStatus getInstance addParseError getSystemId
see Error Handler fatal Error SAX Parse Exception public void fatal Error SAX Parse Exception ex throws SAX Exception String message get Message E002 ex NON NLS 1 Help Plugin log Error message ex Runtime Help Status get Instance add Parse Error message ex get System Id  ErrorHandler fatalError SAXParseException fatalError SAXParseException SAXException getMessage HelpPlugin logError RuntimeHelpStatus getInstance addParseError getSystemId
public String get Message String messageID SAX Parse Exception ex String param0 ex get System Id Integer param1 new Integer ex get Line Number Integer param2 new Integer ex get Column Number String param3 ex get Message String message Message Format format Help Resources get String messageID new Object param0 param1 param2 param3 return message  getMessage SAXParseException getSystemId getLineNumber getColumnNumber getMessage MessageFormat HelpResources getString
Receive notification of the beginning of an element public void start Element String namespaceURI String local Name String q Name Attributes atts throws SAX Exception We don t create a description element if q Name equals Contexts Node DESC ELEM seen Description true else if q Name equals Contexts Node DESC TXT BOLD peek into stack to findout if a bold tag element already exists If we find one then we do not add the bold tag to the current String Buffer of description ie there are many bold start tags in the stack but we appended the tag only once to the description string eg b some text b more test b more text b will result in all of the sentence being bold if stack peek equals Contexts Node BOLD TAG buffer append Contexts Node BOLD TAG stack push Contexts Node BOLD TAG else Contexts Node e null NOTE we don t create an element for the description if q Name equals Contexts Node CONTEXTS ELEM e new Contexts atts else if q Name equals Contexts Node CONTEXT ELEM e new Context atts else if q Name equals Contexts Node RELATED ELEM e new Related Topic atts else return if stack empty Contexts Node stack peek add Child e stack push e  startElement localName qName SAXException qName ContextsNode DESC_ELEM seenDescription qName ContextsNode DESC_TXT_BOLD StringBuffer ContextsNode BOLD_TAG ContextsNode BOLD_TAG ContextsNode BOLD_TAG ContextsNode qName ContextsNode CONTEXTS_ELEM qName ContextsNode CONTEXT_ELEM qName ContextsNode RELATED_ELEM RelatedTopic ContextsNode addChild
public void warning SAX Parse Exception ex String message get Message E003 ex NON NLS 1 Help Plugin log Warning message  SAXParseException getMessage HelpPlugin logWarning
public void parse Contexts File contexts File this contexts File contexts File Input Stream is contexts File get Input Stream if is null return Input Source input Source new Input Source is String file contexts File get Defining PluginID NON NLS 1 NON NLS 2 contexts File get Href input Source set System Id file try SAX Parser parser factory newSAX Parser parser parse input Source this catch Parser Configuration Exception pce Help Plugin log Error Help Resources get String Contexts File Parser PCE pce NON NLS 1 catch SAX Exception se Help Plugin log Error se NON NLS 1 catch IO Exception ioe String msg Help Resources get String E009 file NON NLS 1 Help Plugin log Error msg ioe now pass it to the Runtime Help Status object explicitly because we still need to display errors even if Logging is turned off Runtime Help Status get Instance add Parse Error msg file finally if is null try is close catch IO Exception e  ContextsFile contextsFile contextsFile contextsFile InputStream contextsFile getInputStream InputSource inputSource InputSource contextsFile getDefiningPluginID contextsFile getHref inputSource setSystemId SAXParser newSAXParser inputSource ParserConfigurationException HelpPlugin logError HelpResources getString ContextsFileParser SAXException HelpPlugin logError IOException HelpResources getString HelpPlugin logError RuntimeHelpStatus RuntimeHelpStatus getInstance addParseError IOException
see Entity Resolver This method implementation prevents loading external entities instead of calling org apache xerces parsers Sax Parser set Feature http apache org xml features nonvalidating load external dtd false public Input Source resolve Entity String public Id String system Id Input Source source new Input Source new Byte Array Input Stream new byte 0 source set Public Id public Id source set System Id system Id return source  EntityResolver SaxParser setFeature InputSource resolveEntity publicId systemId InputSource InputSource ByteArrayInputStream setPublicId publicId setSystemId systemId

protected List children new Array List When a builder builds the contexts each node must accomodate the builder by responding to the build command  ArrayList
public abstract void build Contexts Builder builder Contexts Node constructor public Contexts Node Attributes attrs  ContextsBuilder ContextsNode ContextsNode
Adds a child param child I Contexts Node public void add Child Contexts Node child children add children size child  IContextsNode addChild ContextsNode
Obtains children public List get Children return children  getChildren

public interface I Styled Context extends I Context Returns the text description for this context with bold markers return String with b and b to mark bold range as I Context get Text used to in 2 x  IStyledContext IContext IContext getText

class Plugin Contexts private Map map new Hash Map public void put String short Id I Context context map put short Id context  PluginContexts HashMap shortId IContext shortId
map put short Id context public I Context get String short Id return I Context map get short Id  shortId IContext shortId IContext shortId

class Plugins Contexts private Map map new Hash Map public void put String plugin Id Plugin Contexts contexts map put plugin Id contexts  PluginsContexts HashMap pluginId PluginContexts pluginId
map put plugin Id contexts public Plugin Contexts get String plugin Id return Plugin Contexts map get plugin Id  pluginId PluginContexts pluginId PluginContexts pluginId
return Plugin Contexts map get plugin Id public void remove String plugin Id map remove plugin Id  PluginContexts pluginId pluginId pluginId

protected String label public Related Topic Attributes attrs super attrs if attrs null return href attrs get Value Contexts Node RELATED HREF this label attrs get Value Contexts Node RELATED LABEL if this label null this label NON NLS 1  RelatedTopic getValue ContextsNode RELATED_HREF getValue ContextsNode RELATED_LABEL
this label NON NLS 1 public String get Href return href  getHref
return href public void set Href String href this href href  setHref
Returns the label public String get Label return label  getLabel
see Contexts Node build Contexts Builder public void build Contexts Builder builder builder build this  ContextsNode ContextsBuilder ContextsBuilder

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 Help Plugin get Default get Log log error Status  getString logError errorStatus IStatus PLUGIN_ID IStatus HelpPlugin getDefault getLog errorStatus
Logs a Warning message with an exception Note that the message should already be localized to proper local ie Resources get String should already have been called public static synchronized void log Warning String message if Help Plugin DEBUG if message null message NON NLS 1 Status warning Status new Status I Status WARNING PLUGIN ID I Status OK message null Help Plugin get Default get Log log warning Status  getString logWarning HelpPlugin warningStatus IStatus PLUGIN_ID IStatus HelpPlugin getDefault getLog warningStatus
return the singleton instance of the plugin public static Help Plugin get Default return plugin  HelpPlugin getDefault
public void stop Bundle Context context throws Exception Platform get Extension Registry remove Registry Change Listener this context remove Bundle Listener this plugin null bundle Context null super stop context  BundleContext getExtensionRegistry removeRegistryChangeListener removeBundleListener bundleContext
public void start Bundle Context context throws Exception super start context plugin this bundle Context context context add Bundle Listener this Platform get Extension Registry add Registry Change Listener this Help Plugin PLUGIN ID Setup debugging options DEBUG is Debugging if DEBUG DEBUG CONTEXT true equals Ignore Case Platform get Debug Option PLUGIN ID debug context NON NLS 1 NON NLS 2 DEBUG PROTOCOLS true equals Ignore Case Platform get Debug Option PLUGIN ID debug protocols NON NLS 1 NON NLS 2  BundleContext bundleContext addBundleListener getExtensionRegistry addRegistryChangeListener HelpPlugin PLUGIN_ID isDebugging DEBUG_CONTEXT equalsIgnoreCase getDebugOption PLUGIN_ID DEBUG_PROTOCOLS equalsIgnoreCase getDebugOption PLUGIN_ID
Used to obtain Toc Naviagiont Manager return instance of Toc Manager public static Toc Manager get Toc Manager if get Default toc Manager null synchronized toc Manager Create Lock if get Default toc Manager null get Default toc Manager new Toc Manager return get Default toc Manager  TocManager TocManager getTocManager getDefault tocManager tocManagerCreateLock getDefault tocManager getDefault tocManager TocManager getDefault tocManager
Used to obtain Context Manager returns an instance of Context Manager public static Context Manager get Context Manager if get Default context Manager null get Default context Manager new Context Manager return get Default context Manager  ContextManager ContextManager getContextManager getDefault contextManager getDefault contextManager ContextManager getDefault contextManager
public void registry Changed I Registry Change Event event I Extension Delta deltas event get Extension Deltas Help Plugin PLUGIN ID Toc Manager TOC XP NAME if deltas length 0 toc Manager null notifiy listeners if deltas length 0 for Iterator it tocs Changed Listeners iterator it has Next I Tocs Changed Listener it next tocs Changed  registryChanged IRegistryChangeEvent IExtensionDelta getExtensionDeltas HelpPlugin PLUGIN_ID TocManager TOC_XP_NAME tocManager tocsChangedListeners hasNext ITocsChangedListener tocsChanged
public void add Tocs Changed Listener I Tocs Changed Listener listener if tocs Changed Listeners contains listener tocs Changed Listeners add listener  addTocsChangedListener ITocsChangedListener tocsChangedListeners tocsChangedListeners
public void remove Tocs Changed Listener I Tocs Changed Listener listener tocs Changed Listeners remove listener  removeTocsChangedListener ITocsChangedListener tocsChangedListeners
public void bundle Changed Bundle Event event int type event get Type if type Bundle Event RESOLVED type Bundle Event UNRESOLVED Resource Locator clear Zip Cache  bundleChanged BundleEvent getType BundleEvent BundleEvent ResourceLocator clearZipCache

Resources constructor public Help Resources super  HelpResources
Returns a string from a property file public static String get String String name try return res Bundle get String name catch Exception e return name  getString resBundle getString
Returns a string from a property file public static String get String String name String replace0 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
private static Locale get Default Locale String nl Platform getNL sanity test if nl null return Locale get Default break the string into tokens to get the Locale object String Tokenizer locales new String Tokenizer nl   NON NLS 1 if locales count Tokens 1 return new Locale locales next Token NON NLS 1 else if locales count Tokens 2 return new Locale locales next Token locales next Token else if locales count Tokens 3 return new Locale locales next Token locales next Token locales next Token else return Locale get Default  getDefaultLocale getDefault StringTokenizer StringTokenizer _ countTokens nextToken countTokens nextToken nextToken countTokens nextToken nextToken nextToken getDefault

public interface I Tocs Changed Listener public void tocs Changed  ITocsChangedListener tocsChanged

public interface I Navigation Element Returns child elements return List of I Navigation Element  INavigationElement INavigationElement

public interface I Toc Element extends I Toc I Navigation Element return the URL as a string of description topic public String get Toc Topic Href  ITocElement IToc INavigationElement getTocTopicHref
public String get Toc Topic Href Returns a topic with the specified href defined by this TOC without looking in children TO Cs br If the TOC contains multiple topics with the same href only of them arbitrarily chosen will be returned TOC Descritpion topic is ignored param href the topic s URL return I Topic or null  getTocTopicHref TOCs ITopic
public I Topic get Owned Topic String href Returns a topic with the specified href found in extra dir defined by this TOC without looking in children TO Cs param href the topic s URL return I Topic or null  ITopic getOwnedTopic TOCs ITopic
public I Topic get Owned Extra Topic String href Gets the children Tocs return Returns a List of I Toc Element  ITopic getOwnedExtraTopic childrenTocs ITocElement

private static String appserver Impl Plugin Id Constructor for HelpURL Connection public HelpURL Connection URL url super url String url File url get File Strip off the leading and the query if url File starts With NON NLS 1 url File url File substring 1 int indx url File index Of NON NLS 1 if indx 1 query url File substring indx 1 url File url File substring 0 indx this plugin And File url File parse Query set Default Use Caches is Cacheable if Help Plugin DEBUG PROTOCOLS System out println HelpURL Connection url url NON NLS 1  appserverImplPluginId HelpURLConnection HelpURLConnection urlFile getFile urlFile startsWith urlFile urlFile urlFile indexOf urlFile urlFile urlFile pluginAndFile urlFile parseQuery setDefaultUseCaches isCacheable HelpPlugin DEBUG_PROTOCOLS HelpURLConnection
see URL Connection connect public void connect throws IO Exception  URLConnection IOException
see URL Connection get Input Stream Note this method can throw IO Exception but should never return null public Input Stream get Input Stream throws IO Exception must override parent implementation since it does nothing Bundle plugin get Plugin if plugin null throw new IO Exception Resource not found NON NLS 1 if plugin get Symbolic Name equals get Appserver Impl Plugin Id Do not return documents from app server implementation plug in throw new IO Exception Resource not found NON NLS 1 if get File null equals get File NON NLS 1 throw new IO Exception Resource not found NON NLS 1 first try using content provider then find the file inside nl tree in doc zip and then in the file system Input Stream input Stream Resource Locator open From Producer plugin query null get File get File query NON NLS 1 get Locale if input Stream null input Stream Resource Locator open From Zip plugin doc zip NON NLS 1 get File get Locale if input Stream null input Stream Resource Locator open From Plugin plugin get File get Locale if input Stream null throw new IO Exception Resource not found NON NLS 1 return input Stream  URLConnection getInputStream IOException InputStream getInputStream IOException getPlugin IOException getSymbolicName getAppserverImplPluginId IOException getFile getFile IOException InputStream inputStream ResourceLocator openFromProducer getFile getFile getLocale inputStream inputStream ResourceLocator openFromZip getFile getLocale inputStream inputStream ResourceLocator openFromPlugin getFile getLocale inputStream IOException inputStream
public long get Expiration return is Cacheable new Date get Time 10000 0  getExpiration isCacheable getTime
NOTE need to add support for multi valued parameters like filtering Multiple values are added as vectors protected void parse Query if query null equals query NON NLS 1 if arguments null arguments new Hash Map 5 String Tokenizer stok new String Tokenizer query NON NLS 1 while stok has More Tokens String a Query stok next Token int equals Position a Query index Of NON NLS 1 if equals Position 1 well formed name value pair String arg a Query substring 0 equals Position String val a Query substring equals Position 1 Object existing arguments get arg if existing null arguments put arg val else if existing instanceof Vector Vector existing add val arguments put arg existing else Vector v new Vector 2 v add existing v add val arguments put arg v  parseQuery HashMap StringTokenizer StringTokenizer hasMoreTokens aQuery nextToken equalsPosition aQuery indexOf equalsPosition aQuery equalsPosition aQuery equalsPosition
public String get Content Type Check if the file is hypertext or plain text String file plugin And File to Lower Case Locale US if file ends With html file ends With htm NON NLS 1 NON NLS 2 return text html NON NLS 1 else if file ends With css NON NLS 1 return text css NON NLS 1 else if file ends With gif NON NLS 1 return image gif NON NLS 1 else if file ends With jpg NON NLS 1 return image jpeg NON NLS 1 else if file ends With pdf NON NLS 1 return application pdf NON NLS 1 else if file ends With xml NON NLS 1 return application xml NON NLS 1 else if file ends With xsl NON NLS 1 return application xsl NON NLS 1 return text plain NON NLS 1  getContentType pluginAndFile toLowerCase endsWith endsWith endsWith endsWith endsWith endsWith endsWith endsWith
public Vector get Multi Value String name if arguments null Object value arguments get name if value instanceof Vector return Vector value else return null return null  getMultiValue
public String get Value String name if arguments null return null Object value arguments get name String string Value null if value instanceof String string Value String value else if value instanceof Vector string Value String Vector value first Element else return null try return URL Coder decode string Value catch Exception e return null  getValue stringValue stringValue stringValue firstElement URLCoder stringValue
Returns the locale specified by client protected String get Locale if locale null locale get Value LANG if locale null locale Platform getNL return locale  getLocale getValue
protected String get File if file null Strip the plugin id int start plugin And File index Of 1 NON NLS 1 Strip query string or anchor bookmark int end plugin And File index Of NON NLS 1 if end 1 end plugin And File index Of NON NLS 1 if end 1 end plugin And File length file plugin And File substring start end file URL Coder decode file return file  getFile pluginAndFile indexOf pluginAndFile indexOf pluginAndFile indexOf pluginAndFile pluginAndFile URLCoder
protected Bundle get Plugin if plugin null Assume the url is pluginID path to topic html int i plugin And File index Of String plugin Id i 1 plugin And File substring 0 i NON NLS 1 plugin Id URL Coder decode plugin Id plugin Platform get Bundle plugin Id return plugin  getPlugin path_to_topic pluginAndFile indexOf pluginId pluginAndFile pluginId URLCoder pluginId getBundle pluginId
public boolean is Cacheable if get Value resultof null NON NLS 1 return false else return caching Enabled  isCacheable getValue cachingEnabled
return caching Enabled public String to String return plugin And File  cachingEnabled toString pluginAndFile
Obtains ID of plugin that contributes appserver implementation return plug in ID or null private static String get Appserver Impl Plugin Id if appserver Impl Plugin Id null This part mimics Appserver Plugin create Webapp Server get the app server extension from the system plugin registry I Extension Registry plugin Registry Platform get Extension Registry I Extension Point point plugin Registry get Extension Point org eclipse help appserver server NON NLS 1 if point null I Extension extensions point get Extensions if extensions length 0 We need to pick up the non default configuration I Configuration Element elements extensions 0 get Configuration Elements if elements length 0 return null I Configuration Element server Element null for int i 0 i elements length i String default Value elements i get Attribute default NON NLS 1 if default Value null default Value equals false NON NLS 1 server Element elements i break if all the servers are default then pick the first one if server Element null server Element elements 0 appserver Impl Plugin Id server Element get Declaring Extension get Namespace return appserver Impl Plugin Id  getAppserverImplPluginId appserverImplPluginId AppserverPlugin createWebappServer IExtensionRegistry pluginRegistry getExtensionRegistry IExtensionPoint pluginRegistry getExtensionPoint IExtension getExtensions IConfigurationElement getConfigurationElements IConfigurationElement serverElement defaultValue getAttribute defaultValue defaultValue serverElement serverElement serverElement appserverImplPluginId serverElement getDeclaringExtension getNamespace appserverImplPluginId

private static HelpURL Stream Handler instance Constructor for URL Handler public HelpURL Stream Handler super  HelpURLStreamHandler URLHandler HelpURLStreamHandler
see java net URL Stream Handler open Connection java net URL protected URL Connection open Connection URL url throws IO Exception String protocol url get Protocol if protocol equals help NON NLS 1 return new HelpURL Connection url else return null  URLStreamHandler openConnection URLConnection openConnection IOException getProtocol HelpURLConnection
public static URL Stream Handler get Default if instance null instance new HelpURL Stream Handler return instance  URLStreamHandler getDefault HelpURLStreamHandler

Runtime Help Status constructor comment public Runtime Help Status super  RuntimeHelpStatus RuntimeHelpStatus
public synchronized void add Parse Error String message String invalid File Name add the Exception to the files list only once These exceptions will be used to produce the list of files with errors if bad Files List contains invalid File Name bad Files List add invalid File Name now add the message All parser messages are added parser Error Messages List add message  addParseError invalidFileName badFilesList invalidFileName badFilesList invalidFileName parserErrorMessagesList
public boolean errors Exist if error List is Empty parser Error Messages List is Empty bad Files List is Empty return false else return true  errorsExist errorList isEmpty parserErrorMessagesList isEmpty badFilesList isEmpty
public static synchronized Runtime Help Status get Instance if inst null create instance inst new Runtime Help Status return inst  RuntimeHelpStatus getInstance RuntimeHelpStatus
clears Runtime Help Status object public void reset error List clear bad Files List clear parser Error Messages List clear  RuntimeHelpStatus errorList badFilesList parserErrorMessagesList
public synchronized String to String String Buffer full Text new String Buffer if error List is Empty full Text append Help Resources get String E006 NON NLS 1 full Text append n NON NLS 1 for int i 0 i error List size i full Text append Status error List get i get Message full Text append n NON NLS 1 if full Text length 0 full Text append n NON NLS 1 if parser Error Messages List is Empty display the files that failed to parse full Text append Help Resources get String E007 NON NLS 1 full Text append n NON NLS 1 for int i 0 i bad Files List size i full Text append String bad Files List get i full Text append n NON NLS 1 full Text append n NON NLS 1 and the parse error message full Text append Help Resources get String E008 NON NLS 1 full Text append n NON NLS 1 for int i 0 i parser Error Messages List size i full Text append String parser Error Messages List get i full Text append n NON NLS 1 if full Text length 0 return full Text to String else return NON NLS 1  toString StringBuffer fullText StringBuffer errorList isEmpty fullText HelpResources getString fullText errorList fullText errorList getMessage fullText fullText fullText parserErrorMessagesList isEmpty fullText HelpResources getString fullText badFilesList fullText badFilesList fullText fullText fullText HelpResources getString fullText parserErrorMessagesList fullText parserErrorMessagesList fullText fullText fullText toString

Constructor public Analyzer Descriptor String locale try creating the analyzer for the specified locale usually lang country this lucene Analyzer create Analyzer locale try creating configured analyzer for the language only if this lucene Analyzer null String language null if locale length 2 language locale substring 0 2 this lucene Analyzer create Analyzer language if all fails create default analyzer if this lucene Analyzer null this id Help Base Plugin PLUGIN ID NON NLS 1 Help Base Plugin get Default get Bundle get Headers get Constants BUNDLE VERSION this lucene Analyzer new Default Analyzer locale this lang locale  AnalyzerDescriptor lang_country luceneAnalyzer createAnalyzer luceneAnalyzer luceneAnalyzer createAnalyzer luceneAnalyzer HelpBasePlugin PLUGIN_ID HelpBasePlugin getDefault getBundle getHeaders BUNDLE_VERSION luceneAnalyzer DefaultAnalyzer
Gets the analyzer return Returns a Analyzer public Analyzer get Analyzer return new Smart Analyzer lang lucene Analyzer  getAnalyzer SmartAnalyzer luceneAnalyzer
Gets the id return Returns a String public String get Id return id  getId
Gets the language for the analyzer return Returns a String public String get Lang return lang  getLang
Creates analyzer for a locale if it is configured in the org eclipse help lucene Analyzer extension point The identifier of the analyzer and locale and lang are also set return Analyzer or null if no analyzer is configured for given locale private Analyzer create Analyzer String locale find extension point I Configuration Element config Elements Platform get Extension Registry get Configuration Elements For Help Base Plugin PLUGIN ID lucene Analyzer NON NLS 1 for int i 0 i config Elements length i if config Elements i get Name equals analyzer NON NLS 1 continue String analyzer Locale config Elements i get Attribute locale NON NLS 1 if analyzer Locale null analyzer Locale equals locale continue try Object analyzer config Elements i create Executable Extension class NON NLS 1 if analyzer instanceof Analyzer continue else String plugin Id config Elements i get Declaring Extension get Namespace String plugin Version String Platform get Bundle plugin Id get Headers get Constants BUNDLE VERSION this lucene Analyzer Analyzer analyzer this id plugin Id plugin Version NON NLS 1 this lang locale if Help Base Plugin PLUGIN ID equals plugin Id The analyzer is contributed by help plugin Continue in case there is another analyzer for the same locale let another analyzer take precendence over one from help else the analyzer does not come from help return this lucene Analyzer catch Core Exception ce Help Base Plugin log Error Help Base Resources get String ES23 NON NLS 1 config Elements i get Attribute class NON NLS 1 locale ce return this lucene Analyzer  luceneAnalyzer createAnalyzer IConfigurationElement configElements getExtensionRegistry getConfigurationElementsFor HelpBasePlugin PLUGIN_ID luceneAnalyzer configElements configElements getName analyzerLocale configElements getAttribute analyzerLocale analyzerLocale configElements createExecutableExtension pluginId configElements getDeclaringExtension getNamespace pluginVersion getBundle pluginId getHeaders BUNDLE_VERSION luceneAnalyzer pluginId pluginVersion HelpBasePlugin PLUGIN_ID pluginId luceneAnalyzer CoreException HelpBasePlugin logError HelpBaseResources getString configElements getAttribute luceneAnalyzer
Checks whether analyzer is compatible with a given analyzer param analyzer Id id of analyzer used in the past by the index id has a form pluginID plugin Version return true when it is known that given analyzer is compatible with this analyzer public boolean is Compatible String analyzer Id if id equals analyzer Id return true analyzers between some versions of org eclipse help plugin are compatible logic unchanged index can be preserved between them in 3 0 index has been moved so cannot be reused if analyzer Id compare To Help Base Plugin PLUGIN ID 2 0 1 0 analyzer Id compare To Help Base Plugin PLUGIN ID 3 0 0 0 id compare To Help Base Plugin PLUGIN ID 2 0 1 0 id compare To Help Base Plugin PLUGIN ID 3 0 0 0 return true return false  analyzerId pluginVersion isCompatible analyzerId analyzerId analyzerId compareTo HelpBasePlugin PLUGIN_ID analyzerId compareTo HelpBasePlugin PLUGIN_ID compareTo HelpBasePlugin PLUGIN_ID compareTo HelpBasePlugin PLUGIN_ID

Analyzer stop Analyzer Constructor for Analyzer en public Analyzer en super stop Analyzer new Stop Analyzer STOP WORDS  stopAnalyzer Analyzer_en Analyzer_en stopAnalyzer StopAnalyzer STOP_WORDS
Creates a Token Stream which tokenizes all the text in the provided Reader public final Token Stream token Stream String field Name Reader reader return new Porter Stem Filter stop Analyzer token Stream field Name reader  TokenStream TokenStream tokenStream fieldName PorterStemFilter stopAnalyzer tokenStream fieldName

byte buf param stream Input Stream param buf Size size of internal buffer public ASCII Reader Input Stream stream int buf Size this stream stream this buf Size buf Size buf new byte buf Size  InputStream bufSize ASCIIReader InputStream bufSize bufSize bufSize bufSize
see java io Reader read char int int public int read char cbuf int off int len throws IO Exception int n stream read buf 0 Math min buf Size len for int i 0 i n i cbuf off i char buf i return n  IOException bufSize
see java io Reader close public void close throws IO Exception stream close  IOException

private Locale locale public Default Analyzer String locale String super Create a locale object for a given locale string Locale user Locale get Locale locale String Check if the locale is supported by Break Iterator check here to do it only once Locale available Locales Break Iterator get Available Locales for int i 0 i available Locales length i if user Locale equals available Locales i locale user Locale break if locale null user Locale get Display Variant length 0 Check if the locale without variant is supported by Break Iterator Locale country Locale new Locale user Locale get Language user Locale get Country for int i 0 i available Locales length i if country Locale equals available Locales i locale country Locale break if locale null user Locale get Country length 0 Check if at least the language is supported by Break Iterator Locale language new Locale user Locale get Language NON NLS 1 for int i 0 i available Locales length i if language equals available Locales i locale language break if locale null Locale is not supported will use en US Help Base Plugin log Error Help Base Resources get String ES24 locale String NON NLS 1 null locale new Locale en US NON NLS 1 NON NLS 2  DefaultAnalyzer localeString userLocale getLocale localeString BreakIterator availableLocales BreakIterator getAvailableLocales availableLocales userLocale availableLocales userLocale userLocale getDisplayVariant BreakIterator countryLocale userLocale getLanguage userLocale getCountry availableLocales countryLocale availableLocales countryLocale userLocale getCountry BreakIterator userLocale getLanguage availableLocales availableLocales en_US HelpBasePlugin logError HelpBaseResources getString localeString
Creates a Token Stream which tokenizes all the text in the provided Reader public final Token Stream token Stream String field Name Reader reader return new Lower Case Filter new Word Token Stream field Name reader locale  TokenStream TokenStream tokenStream fieldName LowerCaseFilter WordTokenStream fieldName
Creates a Locale object out of a string representation private Locale get Locale String client Locale if client Locale null client Locale Platform getNL if client Locale null client Locale Locale get Default to String break the string into tokens to get the Locale object String Tokenizer locales new String Tokenizer client Locale   NON NLS 1 if locales count Tokens 1 return new Locale locales next Token NON NLS 1 else if locales count Tokens 2 return new Locale locales next Token locales next Token else if locales count Tokens 3 return new Locale locales next Token locales next Token locales next Token else return Locale get Default  getLocale clientLocale clientLocale clientLocale clientLocale clientLocale getDefault toString StringTokenizer StringTokenizer clientLocale _ countTokens nextToken countTokens nextToken nextToken countTokens nextToken nextToken nextToken getDefault

private Input Stream input Stream null param url throws IO Exception public void open Document URL url throws IO Exception input Stream url open Stream String encoding get Charset FromHTML input Stream try input Stream close catch IO Exception closeIOE input Stream url open Stream if encoding null try html Parser new HTML Parser new Input Stream Reader input Stream encoding catch Unsupported Encoding Exception uee if Help Base Plugin DEBUG SEARCH System out println this get Class get Name JVM does not support encoding NON NLS 1 encoding specified in document NON NLS 1 url get Path Default encoding will be used during indexing NON NLS 1 html Parser new HTML Parser new Input Stream Reader input Stream else if Help Base Plugin DEBUG SEARCH System out println this get Class get Name Encoding not found in document NON NLS 1 url get Path Default encoding will be used during indexing NON NLS 1 html Parser new HTML Parser new Input Stream Reader input Stream  InputStream inputStream IOException openDocument IOException inputStream openStream getCharsetFromHTML inputStream inputStream IOException inputStream openStream htmlParser HTMLParser InputStreamReader inputStream UnsupportedEncodingException HelpBasePlugin DEBUG_SEARCH getClass getName getPath htmlParser HTMLParser InputStreamReader inputStream HelpBasePlugin DEBUG_SEARCH getClass getName getPath htmlParser HTMLParser InputStreamReader inputStream
Releases resources closes streams public void close Document if input Stream null try input Stream close catch IO Exception closeIOE  closeDocument inputStream inputStream IOException
public String get Title throws IO Exception if html Parser null throw new Null Pointer Exception try return html Parser get Title catch Interrupted Exception ie return NON NLS 1  getTitle IOException htmlParser NullPointerException htmlParser getTitle InterruptedException
public String get Summary throws IO Exception if html Parser null throw new Null Pointer Exception try return html Parser get Summary catch Interrupted Exception ie return NON NLS 1  getSummary IOException htmlParser NullPointerException htmlParser getSummary InterruptedException
public Reader get Content Reader throws IO Exception if html Parser null throw new Null Pointer Exception return html Parser get Reader  getContentReader IOException htmlParser NullPointerException htmlParser getReader
Private Parses HTML to extract document encoding specified in HTTP equivalent META tag in the document header Example of such META tag is META HTTP EQUIV content type CONTENT text html charset UTF 8 return String or null if encoding not found public String get Charset FromHTML Input Stream is Set up an ascii reader for the document documents should not use other characters before encoding is defined Reader ascii Reader new ASCII Reader is MAX OFFSET Stream Tokenizer tokenizer new Stream Tokenizer ascii Reader tokenizer eol Is Significant false default false tokenizer slash Slash Comments false default false tokenizer slash Star Comments false default false tokenizer lower Case Mode false tokenizer quote Char default quote char tokenizer ordinary Char default quote char tokenizer ordinary Char default comment character String charset get Charset FromHTML Tokens tokenizer if ascii Reader null try ascii Reader close catch IO Exception ioe return charset  getCharsetFromHTML InputStream asciiReader ASCIIReader MAX_OFFSET StreamTokenizer StreamTokenizer asciiReader eolIsSignificant slashSlashComments slashStarComments lowerCaseMode quoteChar ordinaryChar ordinaryChar getCharsetFromHTMLTokens asciiReader asciiReader IOException
public String get Charset FromHTML Tokens Stream Tokenizer tokenizer keeps track of content attribute attribute until parsing of the meta tag is complete String content Value null initialize states int state Content STATE HTTP START int state Element STATE ELEMENT START int state Http STATE HTTP START try in the worst case process tokens until end of file for int token tokenizer next Token token Stream Tokenizer TT EOF token tokenizer next Token debug tokens if token Stream Tokenizer TT WORD System out println word tokenizer sval else if token Stream Tokenizer TT NUMBER System out println number tokenizer nval else if token Stream Tokenizer TT EOL System out println endofline else if char token System out println tokenizer sval else System out println else char token process input based depending on current state switch state Element case STATE ELEMENT START if token state Element STATE ELEMENT AFTER LT else do nothing cannot be beginning of META tag break case STATE ELEMENT AFTER LT if token Stream Tokenizer TT WORD some element opened if ELEMENT META equals Ignore Case tokenizer sval META element opened state Element STATE ELEMENT META initialize state of attributes state Http STATE HTTP START state Content STATE CONTENT START content Value null else if ELEMENT BODY equals Ignore Case tokenizer sval body element opened we are too far stop processing input return null else some other element opened start from initial state state Element STATE ELEMENT START else if token can be begging of head closing state Element STATE ELEMENT AFTER LT SLASH else not an element opened could be openning of declaration or element closing e t c state Element STATE ELEMENT START break case STATE ELEMENT AFTER LT SLASH if token Stream Tokenizer TT WORD ELEMENT HEAD equals Ignore Case tokenizer sval head element closed we are too far stop processing input return null else state Element STATE ELEMENT START break default STATE META IN switch token case no longer inside META start from initial state state Element STATE ELEMENT START break case Stream Tokenizer TT WORD string inside META tag can be attribute name if ATTRIBUTE HTTP equals Ignore Case tokenizer sval found HTTP EQUIV attribute name state Http STATE HTTP AFTER NAME else if ATTRIBUTE CONTENT equals Ignore Case tokenizer sval found CONTENT attribute name state Content STATE CONTENT AFTER NAME else if state Http STATE HTTP AFTER EQ ATTRIBUTE HTTP VALUE equals Ignore Case tokenizer sval value of HTTP EQUIV attribute unquoted we found META HTTP EQUIV content type state Http STATE HTTP DONE else some other attribute name or string reset states of seeked attributes unless successfully processed earlier if state Http STATE HTTP DONE state Http STATE HTTP START if state Content STATE CONTENT DONE state Content STATE CONTENT START break case inside META tag can separate interesing us attribute names from values if state Http STATE HTTP AFTER NAME we have HTTP EQUIV state Http STATE HTTP AFTER EQ else if state Content STATE CONTENT AFTER NAME we have CONTENT state Content STATE CONTENT AFTER EQ else equal sign after some other attribute name or string reset states of seeked attributes unless successfully processed earlier if state Http STATE HTTP DONE state Http STATE HTTP START if state Content STATE CONTENT DONE state Content STATE CONTENT START break case quoted string inside META tag can be attribute value if state Http STATE HTTP AFTER EQ value of HTTP EQUIV attribute if ATTRIBUTE HTTP VALUE equals Ignore Case tokenizer sval we found META HTTP EQUIV content type state Http STATE HTTP DONE else if state Content STATE CONTENT AFTER EQ value of CONTENT attribute state Content STATE CONTENT DONE save the value of the attribute if attribue HTTP EQUIV content type is found in the same META tag this value might have Content type entity header content Value tokenizer sval else value for the attribute is missing reset states of seeked attributes unless successfully processed earlier if state Http STATE HTTP DONE state Http STATE HTTP START if state Content STATE CONTENT DONE state Content STATE CONTENT START break default other unexpected token inside META tag reset states of seeked attributes unless successfully processed earlier if state Http STATE HTTP DONE state Http STATE HTTP START if state Content STATE CONTENT DONE state Content STATE CONTENT START break break if content Value null state Http STATE HTTP DONE state Content STATE CONTENT DONE META HTTP EQUIV content type CONTENT parse vale of content attribute to extract encoding return get Charset FromHTTP content Value catch IO Exception ioe return null end of file return null  getCharsetFromHTMLTokens StreamTokenizer contentValue stateContent STATE_HTTP_START stateElement STATE_ELEMENT_START stateHttp STATE_HTTP_START nextToken StreamTokenizer TT_EOF nextToken StreamTokenizer TT_WORD StreamTokenizer TT_NUMBER StreamTokenizer TT_EOL stateElement STATE_ELEMENT_START stateElement STATE_ELEMENT_AFTER_LT STATE_ELEMENT_AFTER_LT StreamTokenizer TT_WORD ELEMENT_META equalsIgnoreCase stateElement STATE_ELEMENT_META stateHttp STATE_HTTP_START stateContent STATE_CONTENT_START contentValue ELEMENT_BODY equalsIgnoreCase stateElement STATE_ELEMENT_START stateElement STATE_ELEMENT_AFTER_LT_SLASH stateElement STATE_ELEMENT_START STATE_ELEMENT_AFTER_LT_SLASH StreamTokenizer TT_WORD ELEMENT_HEAD equalsIgnoreCase stateElement STATE_ELEMENT_START STATE_META_IN stateElement STATE_ELEMENT_START StreamTokenizer TT_WORD ATTRIBUTE_HTTP equalsIgnoreCase stateHttp STATE_HTTP_AFTER_NAME ATTRIBUTE_CONTENT equalsIgnoreCase stateContent STATE_CONTENT_AFTER_NAME stateHttp STATE_HTTP_AFTER_EQ ATTRIBUTE_HTTP_VALUE equalsIgnoreCase stateHttp STATE_HTTP_DONE stateHttp STATE_HTTP_DONE stateHttp STATE_HTTP_START stateContent STATE_CONTENT_DONE stateContent STATE_CONTENT_START stateHttp STATE_HTTP_AFTER_NAME stateHttp STATE_HTTP_AFTER_EQ stateContent STATE_CONTENT_AFTER_NAME stateContent STATE_CONTENT_AFTER_EQ stateHttp STATE_HTTP_DONE stateHttp STATE_HTTP_START stateContent STATE_CONTENT_DONE stateContent STATE_CONTENT_START stateHttp STATE_HTTP_AFTER_EQ ATTRIBUTE_HTTP_VALUE equalsIgnoreCase stateHttp STATE_HTTP_DONE stateContent STATE_CONTENT_AFTER_EQ stateContent STATE_CONTENT_DONE contentValue stateHttp STATE_HTTP_DONE stateHttp STATE_HTTP_START stateContent STATE_CONTENT_DONE stateContent STATE_CONTENT_START stateHttp STATE_HTTP_DONE stateHttp STATE_HTTP_START stateContent STATE_CONTENT_DONE stateContent STATE_CONTENT_START contentValue stateHttp STATE_HTTP_DONE stateContent STATE_CONTENT_DONE getCharsetFromHTTP contentValue IOException
Parses HTTP1 1 Content Type entity header field for example Content Type text html charset ISO 8859 4 and extracts charset parameter value of the media sub type return value of charset parameter for example ISO 8859 4 or null if parameter does not exist public String get Charset FromHTTP String content Value String Tokenizer t new String Tokenizer content Value NON NLS 1 while t has More Tokens String parameter t next Token trim if parameter to Lower Case starts With charset NON NLS 1 String charset parameter substring charset length trim NON NLS 1 if charset length 0 return charset return null  getCharsetFromHTTP contentValue StringTokenizer StringTokenizer contentValue hasMoreTokens nextToken toLowerCase startsWith

private int work Total Construct indexing operation param ix I Search Index already opened public Indexing Operation Search Index ix this index ix  workTotal ISearchIndex IndexingOperation SearchIndex
private void check Cancelled I Progress Monitor pm throws Operation Canceled Exception if pm is Canceled throw new Operation Canceled Exception  checkCancelled IProgressMonitor OperationCanceledException isCanceled OperationCanceledException
Executes indexing given the progress monitor param pm progres monitor to be used during this long operation for reporting progress throws Operation Canceled Exception if indexing was cancelled protected void execute I Progress Monitor pm throws Operation Canceled Exception Indexing Exception Collection removed Docs get Removed Documents index num Removed removed Docs size Collection added Docs get Added Documents index num Added added Docs size work Total num Removed num Added WORK PREPARE num Added WORK INDEXDOC num Removed num Added WORK SAVEINDEX if num Removed 0 work Total num Removed num Added WORK PREPARE num Removed WORK DELETEDOC num Removed num Added WORK SAVEINDEX if collection is empty we may return right away need to check if we have to do anything to the progress monitor if num Removed num Added 0 pm done return Lazy Progress Monitor monitor new Lazy Progress Monitor pm monitor begin Task work Total NON NLS 1 remove Documents monitor removed Docs add Documents monitor added Docs monitor done  OperationCanceledException IProgressMonitor OperationCanceledException IndexingException removedDocs getRemovedDocuments numRemoved removedDocs addedDocs getAddedDocuments numAdded addedDocs workTotal numRemoved numAdded WORK_PREPARE numAdded WORK_INDEXDOC numRemoved numAdded WORK_SAVEINDEX numRemoved workTotal numRemoved numAdded WORK_PREPARE numRemoved WORK_DELETEDOC numRemoved numAdded WORK_SAVEINDEX numRemoved numAdded LazyProgressMonitor LazyProgressMonitor beginTask workTotal removeDocuments removedDocs addDocuments addedDocs
private void add Documents I Progress Monitor pm Collection added Docs throws Indexing Exception Do not check here if added Docs size 0 always perform add batch to ensure that index is created and saved even if no new documents exist now add all the new documents if index begin Add Batch throw new Indexing Exception try check Cancelled pm pm worked num Removed num Added WORK PREPARE pm sub Task Help Base Resources get String Updating Index NON NLS 1 for Iterator it added Docs iterator it has Next URL doc URL it next index add Document get Name doc doc check Cancelled pm pm worked WORK INDEXDOC catch Operation Canceled Exception oce Need to perform rollback on the index pm sub Task Help Base Resources get String Undoing document adds NON NLS 1 if index abort Update throw new Exception throw oce pm sub Task Help Base Resources get String Writing index NON NLS 1 if index end Add Batch throw new Indexing Exception  addDocuments IProgressMonitor addedDocs IndexingException addedDocs beginAddBatch IndexingException checkCancelled numRemoved numAdded WORK_PREPARE subTask HelpBaseResources getString UpdatingIndex addedDocs hasNext addDocument getName checkCancelled WORK_INDEXDOC OperationCanceledException subTask HelpBaseResources getString Undoing_document_adds abortUpdate subTask HelpBaseResources getString Writing_index endAddBatch IndexingException
private void remove Documents I Progress Monitor pm Collection removed Docs throws Indexing Exception pm sub Task Help Base Resources get String Preparing for indexing NON NLS 1 check Cancelled pm if num Removed 0 if index begin Delete Batch throw new Indexing Exception try check Cancelled pm pm worked num Removed num Added WORK PREPARE pm sub Task Help Base Resources get String Updating Index NON NLS 1 for Iterator it removed Docs iterator it has Next URL doc URL it next index remove Document get Name doc check Cancelled pm pm worked WORK DELETEDOC catch Operation Canceled Exception oce Need to perform rollback on the index pm sub Task Help Base Resources get String Undoing document deletions NON NLS 1 if index abort Update throw new Exception throw oce if index end Delete Batch throw new Indexing Exception pm worked num Removed num Added WORK SAVEINDEX  removeDocuments IProgressMonitor removedDocs IndexingException subTask HelpBaseResources getString Preparing_for_indexing checkCancelled numRemoved beginDeleteBatch IndexingException checkCancelled numRemoved numAdded WORK_PREPARE subTask HelpBaseResources getString UpdatingIndex removedDocs hasNext removeDocument getName checkCancelled WORK_DELETEDOC OperationCanceledException subTask HelpBaseResources getString Undoing_document_deletions abortUpdate endDeleteBatch IndexingException numRemoved numAdded WORK_SAVEINDEX
Returns the document identifier Currently we use the document file name as identifier private String get Name URL doc String name doc get File remove query string if any int i name index Of if i 1 name name substring 0 i return name  getName getFile indexOf
Returns the documents to be added to index The collection consists of the associated PluginURL objects private Collection get Added Documents Search Index index Get the list of added plugins Collection added Plugins index get Doc Plugins get Added if added Plugins null added Plugins is Empty return new Array List 0 get the list of all navigation urls Set urls get All Documents index get Locale Set added Docs new Hash Set urls size for Iterator docs urls iterator docs has Next String doc String docs next Assume the url is pluginID path to topic html int i doc index Of 1 String plugin i 1 doc substring 1 i NON NLS 1 if added Plugins contains plugin continue URL url get IndexableURL doc if url null added Docs add url return added Docs  getAddedDocuments SearchIndex addedPlugins getDocPlugins getAdded addedPlugins addedPlugins isEmpty ArrayList getAllDocuments getLocale addedDocs HashSet hasNext path_to_topic indexOf addedPlugins getIndexableURL addedDocs addedDocs
Returns the documents to be removed from index The collection consists of the associated PluginURL objects private Collection get Removed Documents Search Index index Get the list of removed plugins Collection removed Plugins index get Doc Plugins get Removed if removed Plugins null removed Plugins is Empty return new Array List 0 get the list of indexed docs This is a hashtable url plugin Help Properties indexed Docs index get Indexed Docs Set removed Docs new Hash Set indexed Docs size for Iterator docs indexed Docs key Set iterator docs has Next String doc String docs next Assume the url is pluginID path to topic html int i doc index Of 1 String plugin i 1 doc substring 1 i NON NLS 1 if removed Plugins contains plugin continue URL url get IndexableURL doc if url null removed Docs add url return removed Docs  getRemovedDocuments SearchIndex removedPlugins getDocPlugins getRemoved removedPlugins removedPlugins isEmpty ArrayList HelpProperties indexedDocs getIndexedDocs removedDocs HashSet indexedDocs indexedDocs keySet hasNext path_to_topic indexOf removedPlugins getIndexableURL removedDocs removedDocs
Adds the topic and its subtopics to the list of documents private void add I Topic topic Set hrefs String href topic get Href if href null href equals href starts With http NON NLS 1 NON NLS 2 hrefs add href I Topic subtopics topic get Subtopics for int i 0 i subtopics length i add subtopics i hrefs  ITopic getHref startsWith ITopic getSubtopics
Returns the collection of href s for all the help topics private Set get All Documents String locale Hash Set hrefs new Hash Set I Toc tocs index get Toc Manager get Tocs locale for int i 0 i tocs length i I Topic topics tocs i get Topics for int j 0 j topics length j add topics j hrefs if tocs i instanceof Toc topics Toc tocs i get Extra Topics for int j 0 j topics length j add topics j hrefs I Topic toc Description Topic tocs i get Topic null if toc Description Topic null add toc Description Topic hrefs return hrefs  getAllDocuments HashSet HashSet IToc getTocManager getTocs ITopic getTopics getExtraTopics ITopic tocDescriptionTopic getTopic tocDescriptionTopic tocDescriptionTopic
Checks if document is indexable and creates a URL to obtain contents param url specified in the navigation return URL to obtain document content or null private URL get IndexableURL String url String file Name url to Lower Case if file Name ends With htm NON NLS 1 file Name ends With html NON NLS 1 file Name ends With txt NON NLS 1 file Name ends With xml NON NLS 1 indexable else if file Name index Of htm 0 NON NLS 1 file Name index Of html 0 NON NLS 1 file Name index Of xml 0 NON NLS 1 url url substring 0 url last Index Of its a fragment index whole document else not indexable return null try return new URL help url lang index get Locale return new URL help NON NLS 1 null 1 url lang index get Locale NON NLS 1 HelpURL Stream Handler get Default catch MalformedURL Exception mue return null  getIndexableURL fileName toLowerCase fileName endsWith fileName endsWith fileName endsWith fileName endsWith fileName indexOf fileName indexOf fileName indexOf lastIndexOf getLocale getLocale HelpURLStreamHandler getDefault MalformedURLException

public interface I Search Hit Collector Adds hits to the result param hits Hits  ISearchHitCollector

public interface I Search Query Obtains names of fields in addition to default field public Collection get Field Names  ISearchQuery getFieldNames
public Collection get Field Names Obtains search word user query public String get Search Word  getFieldNames getSearchWord
public String get Search Word return true if search only in specified fields not the default field public boolean is Field Search  getSearchWord isFieldSearch
public boolean is Field Search Obtains locale public String get Locale  isFieldSearch getLocale

private int last Worked private int treshold protected Lazy Progress Monitor I Progress Monitor monitor super monitor this monitor monitor  lastWorked LazyProgressMonitor IProgressMonitor
see I Progress Monitor begin Task public void begin Task String name int total Work if total Work 0 this total Work total Work monitor begin Task name total Work work 0 last Worked 0 treshold 1 total Work MAX STEPS  IProgressMonitor beginTask beginTask totalWork totalWork totalWork totalWork beginTask totalWork lastWorked totalWork MAX_STEPS
see I Progress Monitor worked public void worked int new Work this work new Work if work treshold monitor worked work last Worked last Worked work treshold work 1 total Work MAX STEPS  IProgressMonitor newWork newWork lastWorked lastWorked totalWork MAX_STEPS

Constructor for Parsed Document param reader reader obtained from the parser public Parsed Document Reader reader this reader reader this read false  ParsedDocument ParsedDocument
public Reader new Content Reader if read read true read Document return new Char Array Reader doc Chars  newContentReader readDocument CharArrayReader docChars
private void read Document Char Array Writer writer new Char Array Writer char buf new char 4096 int n int chars Written 0 try while 0 n reader read buf if chars Written chars Limit if n chars Limit chars Written do not exceed the specified limit of characters writer write buf 0 chars Limit chars Written chars Written chars Limit else writer write buf 0 n chars Written n else do not break out of the loop keep reading to avoid breaking pipes catch IO Exception ioe do not do anything will use characters read so far finally try reader close catch IO Exception ioe2 doc Chars writer to Char Array  readDocument CharArrayWriter CharArrayWriter charsWritten charsWritten charsLimit charsLimit charsWritten charsLimit charsWritten charsWritten charsLimit charsWritten IOException IOException docChars toCharArray

Collection removed new Array List Creates table of current contributing plugins and their fragments with versions param name the name of the file to serialize the data to param doc Bundle Ids Collection of String param dir location to store the data param ignore Saved Versions if true will cause detect change to ignore saved plugin version and behave like there was nothing saved public Plugin Version Info String name Collection doc Bundle Ids File dir boolean ignore Saved Versions super name dir this dir dir this ignore Saved Versions ignore Saved Versions create table of current contributions for Iterator it doc Bundle Ids iterator it has Next String bundle Id String it next Bundle plugin Bundle Platform get Bundle bundle Id if plugin Bundle null continue String Buffer plugin Version And Fragments new String Buffer plugin Version And Fragments append bundle Id plugin Version And Fragments append SEPARATOR plugin Version And Fragments append plugin Bundle get Headers get Constants BUNDLE VERSION Bundle fragment Bundles Platform get Fragments plugin Bundle if fragment Bundles null for int f 0 f fragment Bundles length f if fragment Bundles f get State Bundle INSTALLED fragment Bundles f get State Bundle UNINSTALLED continue plugin Version And Fragments append SEPARATOR plugin Version And Fragments append fragment Bundles f get Symbolic Name plugin Version And Fragments append SEPARATOR plugin Version And Fragments append fragment Bundles f get Headers get Constants BUNDLE VERSION this put bundle Id plugin Version And Fragments to String  ArrayList docBundleIds ignoreSavedVersions PluginVersionInfo docBundleIds ignoreSavedVersions ignoreSavedVersions ignoreSavedVersions docBundleIds hasNext bundleId pluginBundle getBundle bundleId pluginBundle StringBuffer pluginVersionAndFragments StringBuffer pluginVersionAndFragments bundleId pluginVersionAndFragments pluginVersionAndFragments pluginBundle getHeaders BUNDLE_VERSION fragmentBundles getFragments pluginBundle fragmentBundles fragmentBundles fragmentBundles getState fragmentBundles getState pluginVersionAndFragments pluginVersionAndFragments fragmentBundles getSymbolicName pluginVersionAndFragments pluginVersionAndFragments fragmentBundles getHeaders BUNDLE_VERSION bundleId pluginVersionAndFragments toString
Detects changes in contributions or their version since last time the contribution table was saved return true if contributions have changed public boolean detect Change if do Comparison return has Changed Create table of contributions present before last save Help Properties old Contrs new Help Properties this name dir if ignore Saved Versions old Contrs restore check if contributions changed has Changed false for Enumeration keys Enum this keys keys Enum has More Elements String one Contr String keys Enum next Element if old Contrs contains Key one Contr plugin has been added added add one Contr else String versions String this get one Contr String old Versions String old Contrs get one Contr if compare versions old Versions plugin version changed or fragments changed added add one Contr for Enumeration keys Enum old Contrs keys keys Enum has More Elements String one Contr String keys Enum next Element if this contains Key one Contr plugin has been removed removed add one Contr else String versions String this get one Contr String old Versions String old Contrs get one Contr if compare versions old Versions plugin version changed or fragments changed removed add one Contr has Changed added size 0 removed size 0 do Comparison false return has Changed  detectChange doComparison hasChanged HelpProperties oldContrs HelpProperties ignoreSavedVersions oldContrs hasChanged keysEnum keysEnum hasMoreElements oneContr keysEnum nextElement oldContrs containsKey oneContr oneContr oneContr oldVersions oldContrs oneContr oldVersions oneContr keysEnum oldContrs keysEnum hasMoreElements oneContr keysEnum nextElement containsKey oneContr oneContr oneContr oldVersions oldContrs oneContr oldVersions oneContr hasChanged doComparison hasChanged
return String Collection of I Ds of contributions that were added or upgraded public Collection get Added if do Comparison detect Change return added  IDs getAdded doComparison detectChange
return String Collection of I Ds of contributions that were removed or upgraded public Collection get Removed if do Comparison detect Change return removed  IDs getRemoved doComparison detectChange
Saves contributions to a file After this method is called calls to detect Change will return false return true if operation was successful public boolean save if super save do Comparison false has Changed false ignore Saved Versions false added new Array List removed new Array List return true return false  detectChange doComparison hasChanged ignoreSavedVersions ArrayList ArrayList
Compares plugins and versions represented as a string for equality String have form id1 nverison1 nid2 nversion2 String are equal of they contain the same set of I Ds and their corresponding version equal return true if plugins and versions match private boolean compare String versions String old Versions Map version Map new Hash Map for String Tokenizer t new String Tokenizer versions SEPARATOR false t has More Tokens String plugin Or Fragment t next Token if t has More Tokens version Map put plugin Or Fragment t next Token Map old Version Map new Hash Map for String Tokenizer t new String Tokenizer old Versions SEPARATOR false t has More Tokens String plugin Or Fragment t next Token if t has More Tokens old Version Map put plugin Or Fragment t next Token return version Map equals old Version Map  IDs oldVersions versionMap HashMap StringTokenizer StringTokenizer hasMoreTokens pluginOrFragment nextToken hasMoreTokens versionMap pluginOrFragment nextToken oldVersionMap HashMap StringTokenizer StringTokenizer oldVersions hasMoreTokens pluginOrFragment nextToken hasMoreTokens oldVersionMap pluginOrFragment nextToken versionMap oldVersionMap

see I Progress Monitor begin Task String int public synchronized void begin Task String name int total Work this total Work total Work this worked 0 this done false for Iterator it monitors iterator it has Next I Progress Monitor m I Progress Monitor it next m begin Task name total Work  IProgressMonitor beginTask beginTask totalWork totalWork totalWork hasNext IProgressMonitor IProgressMonitor beginTask totalWork
see I Progress Monitor done public synchronized void done done true for Iterator it monitors iterator it has Next I Progress Monitor m I Progress Monitor it next m done  IProgressMonitor hasNext IProgressMonitor IProgressMonitor
see I Progress Monitor internal Worked double public void internal Worked double work  IProgressMonitor internalWorked internalWorked
see I Progress Monitor is Canceled public synchronized boolean is Canceled for Iterator it monitors iterator it has Next I Progress Monitor m I Progress Monitor it next if m is Canceled return true return false  IProgressMonitor isCanceled isCanceled hasNext IProgressMonitor IProgressMonitor isCanceled
see I Progress Monitor set Canceled boolean public void set Canceled boolean value  IProgressMonitor setCanceled setCanceled
see I Progress Monitor set Task Name String public synchronized void set Task Name String name task Name name for Iterator it monitors iterator it has Next I Progress Monitor m I Progress Monitor it next m set Task Name name  IProgressMonitor setTaskName setTaskName taskName hasNext IProgressMonitor IProgressMonitor setTaskName
see I Progress Monitor sub Task String public synchronized void sub Task String name sub Task Name name for Iterator it monitors iterator it has Next I Progress Monitor m I Progress Monitor it next m sub Task name  IProgressMonitor subTask subTask subTaskName hasNext IProgressMonitor IProgressMonitor subTask
see I Progress Monitor worked int public synchronized void worked int work worked work for Iterator it monitors iterator it has Next I Progress Monitor m I Progress Monitor it next m worked work  IProgressMonitor hasNext IProgressMonitor IProgressMonitor
public synchronized void add Monitor I Progress Monitor m if total Work 1 m begin Task task Name total Work if sub Task Name null m sub Task sub Task Name if worked 0 m worked worked if done m done monitors add m  addMonitor IProgressMonitor totalWork beginTask taskName totalWork subTaskName subTask subTaskName
monitors add m public synchronized void remove Monitor I Progress Monitor m monitors remove m  removeMonitor IProgressMonitor
public synchronized void operation Canceled total Work 1 worked 0 done false  operationCanceled totalWork

private Locale locale Creates a query builder for the search word The search word is processed by a lexical analyzer public Query Builder String search Words Analyzer Descriptor analyzer Desc this search Words search Words String language analyzer Desc get Lang if language length 5 this locale new Locale language substring 0 2 language substring 3 5 else this locale new Locale language substring 0 2 NON NLS 1 this analyzer Desc analyzer Desc this analyzer analyzer Desc get Analyzer  QueryBuilder searchWords AnalyzerDescriptor analyzerDesc searchWords searchWords analyzerDesc getLang analyzerDesc analyzerDesc analyzerDesc getAnalyzer
Splits user query into tokens and returns a list of Query Words Token s private List tokenize User Query String search Words List token List new Array List Divide along quotation marks String Tokenizer q Tokenizer new String Tokenizer search Words trim true NON NLS 1 boolean within Quotation false String quoted String NON NLS 1 int term Count 0 keep track of number of terms to disallow too many int or Count 0 keep track of number of O Rs to disallow too many while q Tokenizer has More Tokens String cur Token q Tokenizer next Token if cur Token equals NON NLS 1 if within Quotation check for too many terms if Base Help System get Mode Base Help System MODE INFOCENTER term Count MAX TERMS throw new Query Too Complex Exception token List add Query Words Token exact Phrase 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 String token parser next Token if token equals Ignore Case Query Words Token AND value token List add Query Words Token AND else if token equals Ignore Case Query Words Token OR value Check for too many OR terms if Base Help System get Mode Base Help System MODE INFOCENTER or Count MAX UNIONS throw new Query Too Complex Exception token List add Query Words Token OR else if token equals Ignore Case Query Words Token NOT value token List add Query Words Token NOT else check for too many terms if Base Help System get Mode Base Help System MODE INFOCENTER term Count MAX TERMS throw new Query Too Complex Exception token List add Query Words Token word token return token List  QueryWordsToken tokenizeUserQuery searchWords tokenList ArrayList StringTokenizer qTokenizer StringTokenizer searchWords withinQuotation quotedString termCount orCount ORs qTokenizer hasMoreTokens curToken qTokenizer nextToken curToken withinQuotation BaseHelpSystem getMode BaseHelpSystem MODE_INFOCENTER termCount MAX_TERMS QueryTooComplexException tokenList QueryWordsToken exactPhrase quotedString quotedString withinQuotation withinQuotation withinQuotation quotedString curToken StringTokenizer StringTokenizer curToken hasMoreTokens nextToken equalsIgnoreCase QueryWordsToken tokenList QueryWordsToken equalsIgnoreCase QueryWordsToken BaseHelpSystem getMode BaseHelpSystem MODE_INFOCENTER orCount MAX_UNIONS QueryTooComplexException tokenList QueryWordsToken equalsIgnoreCase QueryWordsToken tokenList QueryWordsToken BaseHelpSystem getMode BaseHelpSystem MODE_INFOCENTER termCount MAX_TERMS QueryTooComplexException tokenList QueryWordsToken tokenList
Apply the Analyzer to the search tokens and return the list of processed Query Words Token s private List analyze Tokens List tokens List new Tokens new Array List int wild Card Term Count 0 for int i 0 i tokens size i Query Words Token token Query Words Token tokens get i if token type Query Words Token WORD int questionM Index token value index Of int star Index token value index Of if star Index 0 questionM Index 0 if Base Help System get Mode Base Help System MODE INFOCENTER wild Card Term Count MAX WILD TERMS throw new Query Too Complex Exception if questionM Index 0 star Index 0 new Tokens add Query Words Token word token value to Lower Case locale add word to the list of words to highlight if highlight Words contains token value highlight Words add token value else wild card not allowed as the first character else List word List analyze Text analyzer contents NON NLS 1 token value if word List size 0 if highlight Words contains token value add original word to the list of words to highlight highlight Words add token value if word List size 1 String word String word List get 0 new Tokens add Query Words Token word word add analyzed word to the list of words to highlight this is required to highlight stemmed words if highlight Words contains word highlight Words add word else Query Words Phrase phrase Query Words Token phrase for Iterator it word List iterator it has Next String word String it next phrase add Word word add each analyzed word to the list of words to highlight this is only required to highlight stemmed words Adding words should not be done when Default Analyzer is used because it does not perform stemming and common words removal which would result in common characters highlighted all over bug 30263 if analyzer Desc get Id starts With Help Base Plugin PLUGIN ID NON NLS 1 if highlight Words contains word highlight Words add word new Tokens add phrase else if forget AN Ds token type Search Query Token AND token type Query Words Token OR token type Query Words Token NOT new Tokens add token else if token type Query Words Token EXACT PHRASE List word List analyze Text analyzer exact contents NON NLS 1 token value if word List size 0 if highlight Words contains token value add original word to the list of words to highlight highlight Words add token value Query Words Exact Phrase phrase Query Words Token exact Phrase for Iterator it word List iterator it has Next String word String it next phrase add Word word add analyzed word to the list of words to highlight if highlight Words contains word highlight Words add word add phrase only if not empty if phrase get Words size 0 new Tokens add phrase return new Tokens  QueryWordsToken analyzeTokens newTokens ArrayList wildCardTermCount QueryWordsToken QueryWordsToken QueryWordsToken questionMIndex indexOf starIndex indexOf starIndex questionMIndex BaseHelpSystem getMode BaseHelpSystem MODE_INFOCENTER wildCardTermCount MAX_WILD_TERMS QueryTooComplexException questionMIndex starIndex newTokens QueryWordsToken toLowerCase highlightWords highlightWords wordList analyzeText wordList highlightWords highlightWords wordList wordList newTokens QueryWordsToken highlightWords highlightWords QueryWordsPhrase QueryWordsToken wordList hasNext addWord DefaultAnalyzer analyzerDesc getId startsWith HelpBasePlugin PLUGIN_ID highlightWords highlightWords newTokens ANDs SearchQueryToken QueryWordsToken QueryWordsToken newTokens QueryWordsToken EXACT_PHRASE wordList analyzeText exact_contents wordList highlightWords highlightWords QueryWordsExactPhrase QueryWordsToken exactPhrase wordList hasNext addWord highlightWords highlightWords getWords newTokens newTokens
Get a list of tokens corresponding to a search word or phrase return List of String private List analyze Text Analyzer analyzer String field Name String text List words new Array List 1 Reader reader new String Reader text Token Stream t Stream analyzer token Stream field Name reader Token tok try while null tok t Stream next words add tok term Text reader close catch IO Exception ioe return words  analyzeText fieldName ArrayList StringReader TokenStream tStream tokenStream fieldName tStream termText IOException
Obtains Lucene Query from tokens return Query or null if no query could be created private Query create Lucene Query List search Tokens String field Names float boosts Get queries for parts separated by OR List required Queries get Required Queries search Tokens field Names boosts if required Queries size 0 return null else if required Queries size 1 return Query required Queries get 0 else if required Queries size 1 OR queries return or Queries required Queries  createLuceneQuery searchTokens fieldNames requiredQueries getRequiredQueries searchTokens fieldNames requiredQueries requiredQueries requiredQueries requiredQueries orQueries requiredQueries
Obtains Lucene queries for token sequences separated at OR return List of Query could be empty private List get Required Queries List tokens String field Names float boosts List ored Queries new Array List Array List required Query Tokens new Array List for int i 0 i tokens size i Query Words Token token Query Words Token tokens get i if token type Query Words Token OR required Query Tokens add token else Query req Query get Required Query required Query Tokens field Names boosts if req Query null ored Queries add req Query required Query Tokens new Array List Query req Query get Required Query required Query Tokens field Names boosts if req Query null ored Queries add req Query return ored Queries  getRequiredQueries fieldNames oredQueries ArrayList ArrayList requiredQueryTokens ArrayList QueryWordsToken QueryWordsToken QueryWordsToken requiredQueryTokens reqQuery getRequiredQuery requiredQueryTokens fieldNames reqQuery oredQueries reqQuery requiredQueryTokens ArrayList reqQuery getRequiredQuery requiredQueryTokens fieldNames reqQuery oredQueries reqQuery oredQueries
private Query or Queries Collection queries Boolean Query bq new Boolean Query for Iterator it queries iterator it has Next Query q Query it next bq add q false false return bq  orQueries BooleanQuery BooleanQuery hasNext
Obtains Lucene Query for tokens containing only AND and NOT operators return Boolean Query or null if no query could be created from the tokens private Query get Required Query List required Tokens String field Names float boosts Boolean Query ret Query new Boolean Query boolean required Term Exist false Parse tokens left to right Query Words Token operator null for int i 0 i required Tokens size i Query Words Token token Query Words Token required Tokens get i if token type Query Words Token AND token type Query Words Token NOT operator token continue Creates queries for all fields Query qs new Query field Names length for int f 0 f field Names length f qs f token create Lucene Query field Names f boosts f creates the boolean query of all fields Query q qs 0 if field Names length 1 Boolean Query all Fields Query new Boolean Query for int f 0 f field Names length f all Fields Query add qs f false false q all Fields Query if operator null operator type Query Words Token NOT ret Query add q false true add as prohibited else ret Query add q true false add as required required Term Exist true if required Term Exist return null cannot search for prohibited only return ret Query  BooleanQuery getRequiredQuery requiredTokens fieldNames BooleanQuery retQuery BooleanQuery requiredTermExist QueryWordsToken requiredTokens QueryWordsToken QueryWordsToken requiredTokens QueryWordsToken QueryWordsToken fieldNames fieldNames createLuceneQuery fieldNames fieldNames BooleanQuery allFieldsQuery BooleanQuery fieldNames allFieldsQuery allFieldsQuery QueryWordsToken retQuery retQuery requiredTermExist requiredTermExist retQuery
private Query get Lucene Query String field Names float boosts Query lucene Query create Lucene Query analyzed Tokens field Names boosts return lucene Query  getLuceneQuery fieldNames luceneQuery createLuceneQuery analyzedTokens fieldNames luceneQuery
param field Names Collection of field names of type String e g h1 the search will be performed on the given fields param field Search Only boolean indicating if field only search should be performed if set to false default field contents and all other fields will be searched public Query get Lucene Query Collection field Names boolean field Search Only throws Query Too Complex Exception split search query into tokens List user Tokens tokenize User Query search Words analyzed Tokens analyze Tokens user Tokens return build Lucene Query field Names field Search Only  fieldNames fieldSearchOnly getLuceneQuery fieldNames fieldSearchOnly QueryTooComplexException userTokens tokenizeUserQuery searchWords analyzedTokens analyzeTokens userTokens buildLuceneQuery fieldNames fieldSearchOnly
param field Names Collection of field names of type String e g h1 the search will be performed on the given fields param field Search Only boolean indicating if field only search should be performed if set to false default field contents and all other fields will be searched private Query build Lucene Query Collection field Names boolean field Search Only String fields float boosts if field Search Only fields new String field Names size boosts new float field Names size Iterator field Names It field Names iterator for int i 0 i field Names size i fields i String field Names It next boosts i 5 0f else fields new String field Names size 1 boosts new float field Names size 1 Iterator field Names It field Names iterator for int i 0 i field Names size i fields i String field Names It next boosts i 5 0f fields field Names size contents NON NLS 1 boosts field Names size 1 0f Query query get Lucene Query fields boosts query improve Ranking For Unqoted Phrase query fields boosts return query  fieldNames fieldSearchOnly buildLuceneQuery fieldNames fieldSearchOnly fieldSearchOnly fieldNames fieldNames fieldNamesIt fieldNames fieldNames fieldNamesIt fieldNames fieldNames fieldNamesIt fieldNames fieldNames fieldNamesIt fieldNames fieldNames getLuceneQuery improveRankingForUnqotedPhrase
If user query contained only words no quotaions nor operators extends query with term phrase representing entire user query i e for user string a b the query a AND b will be extended to a b OR a AND b private Query improve Ranking For Unqoted Phrase Query query String fields float boosts if query null return query check if all tokens are words for int i 0 i analyzed Tokens size i if Query Words Token analyzed Tokens get i type Query Words Token WORD return query Create phrase query for all tokens and OR with original query Boolean Query boolean Query new Boolean Query boolean Query add query false false Phrase Query phrase Queries new Phrase Query fields length for int f 0 f fields length f phrase Queries f new Phrase Query for int i 0 i analyzed Tokens size i Term t new Term fields f Query Words Token analyzed Tokens get i value phrase Queries f add t phrase Queries f set Boost 10 boosts f boolean Query add phrase Queries f false false return boolean Query  improveRankingForUnqotedPhrase analyzedTokens QueryWordsToken analyzedTokens QueryWordsToken BooleanQuery booleanQuery BooleanQuery booleanQuery PhraseQuery phraseQueries PhraseQuery phraseQueries PhraseQuery analyzedTokens QueryWordsToken analyzedTokens phraseQueries phraseQueries setBoost booleanQuery phraseQueries booleanQuery
Obtains analyzed terms from query as one string Words are double quoted and separated by space The analyzed words are needed for highlighting word roots public String gethighlight Terms String Buffer buf new String Buffer for Iterator it highlight Words iterator it has Next buf append buf append it next buf append NON NLS 1 return buf to String  gethighlightTerms StringBuffer StringBuffer highlightWords hasNext toString

public class Query Words Exact Phrase extends Query Words Token private List words public Query Words Exact Phrase super Query Words Token EXACT PHRASE NON NLS 1 words new Array List  QueryWordsExactPhrase QueryWordsToken QueryWordsExactPhrase QueryWordsToken EXACT_PHRASE ArrayList
public void add Word String word words add word if words size 1 value word else value word NON NLS 1  addWord
value word NON NLS 1 public List get Words return words  getWords
Creates a lucene query for a field public Query create Lucene Query String field float boost Phrase Query q new Phrase Query for Iterator it get Words iterator it has Next String word String it next Term t new Term exact  field word NON NLS 1 q add t q set Boost boost return q  createLuceneQuery PhraseQuery PhraseQuery getWords hasNext exact_ setBoost

public class Query Words Phrase extends Query Words Token private List words public Query Words Phrase super Query Words Token PHRASE NON NLS 1 words new Array List  QueryWordsPhrase QueryWordsToken QueryWordsPhrase QueryWordsToken ArrayList
public void add Word String word words add word if words size 1 value word else value word NON NLS 1  addWord
value word NON NLS 1 public List get Words return words  getWords
Creates a lucene query for a field public Query create Lucene Query String field float boost Phrase Query q new Phrase Query for Iterator it get Words iterator it has Next String word String it next Term t new Term field word q add t q set Boost boost return q  createLuceneQuery PhraseQuery PhraseQuery getWords hasNext setBoost

public int type public String value protected Query Words Token int type String value this type type this value value  QueryWordsToken
Creates a lucene query for a field public Query create Lucene Query String field float boost Query q int question Pos value index Of int star Pos value index Of if question Pos 0 star Pos 0 if question Pos 1 star Pos value length 1 Term t new Term exact  field value substring 0 star Pos NON NLS 1 q new Prefix Query t Prefix Query q set Boost boost else Term t new Term exact  field value NON NLS 1 q new Wildcard Query t Wildcard Query q set Boost boost else Term t new Term field value q new Term Query t Term Query q set Boost boost after updating Lucene set boost on a Query class return q  createLuceneQuery questionPos indexOf starPos indexOf questionPos starPos questionPos starPos exact_ starPos PrefixQuery PrefixQuery setBoost exact_ WildcardQuery WildcardQuery setBoost TermQuery TermQuery setBoost
return q public static Query Words Token AND return fAND  QueryWordsToken
return fAND public static Query Words Token OR return fOR  QueryWordsToken
return fOR public static Query Words Token NOT return fNOT  QueryWordsToken
return fNOT public static Query Words Token word String word return new Query Words Token Query Words Token WORD word  QueryWordsToken QueryWordsToken QueryWordsToken
return new Query Words Token Query Words Token WORD word public static Query Words Phrase phrase return new Query Words Phrase  QueryWordsToken QueryWordsToken QueryWordsPhrase QueryWordsPhrase
return new Query Words Phrase public static Query Words Exact Phrase exact Phrase return new Query Words Exact Phrase  QueryWordsPhrase QueryWordsExactPhrase exactPhrase QueryWordsExactPhrase
public static Query Words Exact Phrase exact Phrase String word Query Words Exact Phrase token new Query Words Exact Phrase token add Word word return token  QueryWordsExactPhrase exactPhrase QueryWordsExactPhrase QueryWordsExactPhrase addWord

private I Toc toc Constructor param toc TOC containing topic or null public Search Hit String href String label float score I Toc toc this href href this label label this score score this toc toc  IToc SearchHit IToc
Gets the href return Returns a String public String get Href return href  getHref
Gets the label return Returns a String public String get Label return label  getLabel
Gets the score return Returns a float public float get Score return score  getScore
Gets the toc return Returns I Toc or null public I Toc get Toc return toc  IToc IToc getToc
public void set Label String label this label label  setLabel
public void set Href String href this href href  setHref
public void set Score float score this score score  setScore
public void set Toc I Toc toc this toc toc  setToc IToc

private File Lock lock Constructor param locale the locale this index uses param analyzer Desc the analyzer used to index public Search Index String locale Analyzer Descriptor analyzer Desc Toc Manager toc Manager this locale locale this analyzer Descriptor analyzer Desc this toc Manager toc Manager index Dir new File Help Base Plugin get Configuration Directory index locale NON NLS 1 inconsistency File new File index Dir get Parent File locale inconsistent NON NLS 1 parser new HTML Doc Parser if exists try if try Lock don t block or unzip when another instance is indexing try unzip Product Index finally release Lock catch Overlapping File Lock Exception ofle another thread in this process is unzipping should never be here one index instance per locale exists in vm  FileLock analyzerDesc SearchIndex AnalyzerDescriptor analyzerDesc TocManager tocManager analyzerDescriptor analyzerDesc tocManager tocManager indexDir HelpBasePlugin getConfigurationDirectory inconsistencyFile indexDir getParentFile HTMLDocParser tryLock unzipProductIndex releaseLock OverlappingFileLockException
Indexes one document from a stream Index has to be open and close outside of this method param name the document identifier could be a URL param url the URL of the document return true if success public boolean add Document String name URL url if Help Base Plugin DEBUG SEARCH System out println Search Index add Document name url NON NLS 1 NON NLS 2 NON NLS 1 try Document doc new Document doc add Field Keyword name name NON NLS 1 try try parser open Document url catch IO Exception ioe Help Base Plugin log Error Help Base Resources get String ES25 NON NLS 1 name null return false Parsed Document parsed new Parsed Document parser get Content Reader doc add Field Text contents parsed new Content Reader NON NLS 1 doc add Field Text exact contents parsed NON NLS 1 new Content Reader String title parser get Title doc add Field Un Stored title title NON NLS 1 doc add Field Un Stored exact title title NON NLS 1 doc add Field Un Indexed raw title title NON NLS 1 doc add Field Un Indexed summary parser get Summary iw add Document doc finally parser close Document indexed Docs put name 0 NON NLS 1 return true catch IO Exception e Help Base Plugin log Error Help Base Resources get String ES16 name NON NLS 1 index Dir get Absolute Path e return false  addDocument HelpBasePlugin DEBUG_SEARCH SearchIndex addDocument openDocument IOException HelpBasePlugin logError HelpBaseResources getString ParsedDocument ParsedDocument getContentReader newContentReader exact_contents newContentReader getTitle UnStored UnStored exact_title UnIndexed raw_title UnIndexed getSummary addDocument closeDocument indexedDocs IOException HelpBasePlugin logError HelpBaseResources getString indexDir getAbsolutePath
Starts additions To be called before adding documents public synchronized boolean begin Add Batch try if iw null iw close boolean create false if exists create true index Dir mkdirs if index Dir exists return false unable to setup index directory indexed Docs new Help Properties INDEXED DOCS FILE index Dir indexed Docs restore set Inconsistent true iw new Index Writer index Dir analyzer Descriptor get Analyzer create iw merge Factor 20 iw max Field Length 1000000 return true catch IO Exception e Help Base Plugin log Error Help Base Resources get String ES17 e NON NLS 1 return false  beginAddBatch indexDir indexDir indexedDocs HelpProperties INDEXED_DOCS_FILE indexDir indexedDocs setInconsistent IndexWriter indexDir analyzerDescriptor getAnalyzer mergeFactor maxFieldLength IOException HelpBasePlugin logError HelpBaseResources getString
Starts deletions To be called before deleting documents public synchronized boolean begin Delete Batch try if ir null ir close indexed Docs new Help Properties INDEXED DOCS FILE index Dir indexed Docs restore set Inconsistent true ir Index Reader open index Dir return true catch IO Exception e Help Base Plugin log Error Help Base Resources get String ES18 e NON NLS 1 return false  beginDeleteBatch indexedDocs HelpProperties INDEXED_DOCS_FILE indexDir indexedDocs setInconsistent IndexReader indexDir IOException HelpBasePlugin logError HelpBaseResources getString
Deletes a single document from the index param name document name return true if success public boolean remove Document String name if Help Base Plugin DEBUG SEARCH System out println Search Index remove Document name NON NLS 1 NON NLS 2 Term term new Term name name NON NLS 1 try ir delete term indexed Docs remove name catch IO Exception e Help Base Plugin log Error Help Base Resources get String ES22 name NON NLS 1 index Dir get Absolute Path e return false return true  removeDocument HelpBasePlugin DEBUG_SEARCH SearchIndex removeDocument indexedDocs IOException HelpBasePlugin logError HelpBaseResources getString indexDir getAbsolutePath
Finish additions To be called after adding documents public synchronized boolean end Add Batch try if iw null return false iw optimize iw close save the update info all the docs plugins and their version that were indexed indexed Docs save indexed Docs null get Doc Plugins save save Dependencies set Inconsistent false return true catch IO Exception e Help Base Plugin log Error Help Base Resources get String ES19 e NON NLS 1 return false  endAddBatch indexedDocs indexedDocs getDocPlugins saveDependencies setInconsistent IOException HelpBasePlugin logError HelpBaseResources getString
Finish deletions To be called after deleting documents public synchronized boolean end Delete Batch try if ir null return false ir close save the update info all the docs plugins and their version that were indexed indexed Docs save indexed Docs null get Doc Plugins save save Dependencies set Inconsistent false return true catch IO Exception e Help Base Plugin log Error Help Base Resources get String ES20 e NON NLS 1 return false  endDeleteBatch indexedDocs indexedDocs getDocPlugins saveDependencies setInconsistent IOException HelpBasePlugin logError HelpBaseResources getString
Checks if index exists and is usable return true if index exists public boolean exists return index Dir exists is Inconsistent assume index exists if directory does  indexDir isInconsistent
Performs a query search on this index public void search I Search Query search Query I Search Hit Collector collector throws Query Too Complex Exception try if closed return register Search Thread current Thread if closed return Query Builder query Builder new Query Builder search Query get Search Word analyzer Descriptor Query lucene Query query Builder get Lucene Query search Query get Field Names search Query is Field Search String highlight Terms query Builder gethighlight Terms if lucene Query null if searcher null open Searcher Hits hits searcher search lucene Query collector add Hits hits highlight Terms catch Query Too Complex Exception qe throw qe catch Exception e Help Base Plugin log Error Help Base Resources get String ES21 NON NLS 1 search Query get Search Word e finally unregister Search Thread current Thread  ISearchQuery searchQuery ISearchHitCollector QueryTooComplexException registerSearch currentThread QueryBuilder queryBuilder QueryBuilder searchQuery getSearchWord analyzerDescriptor luceneQuery queryBuilder getLuceneQuery searchQuery getFieldNames searchQuery isFieldSearch highlightTerms queryBuilder gethighlightTerms luceneQuery openSearcher luceneQuery addHits highlightTerms QueryTooComplexException HelpBasePlugin logError HelpBaseResources getString searchQuery getSearchWord unregisterSearch currentThread
public String get Locale return locale  getLocale
Returns the list of all the plugins in this session that have declared a help contribution public Plugin Version Info get Doc Plugins if doc Plugins null Collection doc Plugins Ids toc Manager get Contributing Plugins doc Plugins new Plugin Version Info INDEXED CONTRIBUTION INFO FILE doc Plugins Ids index Dir exists return doc Plugins  PluginVersionInfo getDocPlugins docPlugins docPluginsIds tocManager getContributingPlugins docPlugins PluginVersionInfo INDEXED_CONTRIBUTION_INFO_FILE docPluginsIds indexDir docPlugins
We use Help Properties but a list would suffice We only need the key values return Help Properties keys are UR Ls of indexed documents public Help Properties get Indexed Docs Help Properties indexed Docs new Help Properties INDEXED DOCS FILE index Dir if exists indexed Docs restore return indexed Docs  HelpProperties HelpProperties URLs HelpProperties getIndexedDocs HelpProperties indexedDocs HelpProperties INDEXED_DOCS_FILE indexDir indexedDocs indexedDocs
Gets properties with versions of Lucene plugin and Analyzer used for indexing private Help Properties get Dependencies if dependencies null dependencies new Help Properties DEPENDENCIES VERSION FILENAME index Dir dependencies restore return dependencies  HelpProperties getDependencies HelpProperties DEPENDENCIES_VERSION_FILENAME indexDir
Gets analyzer identifier from a file private String read Analyzer Id String analyzer Version get Dependencies get Property analyzer NON NLS 1 if analyzer Version null return NON NLS 1 return analyzer Version  readAnalyzerId analyzerVersion getDependencies getProperty analyzerVersion analyzerVersion
Gets Lucene plugin version from a file private boolean is Lucene Compatible String used Lucene Version get Dependencies get Property lucene NON NLS 1 String current Lucene Version NON NLS 1 Bundle lucene Plugin Descriptor Platform get Bundle LUCENE PLUGIN ID if lucene Plugin Descriptor null current Lucene Version String lucene Plugin Descriptor get Headers get Constants BUNDLE VERSION Later might add code to return true for other known cases of compatibility between post 1 2 1 versions return current Lucene Version equals used Lucene Version  isLuceneCompatible usedLuceneVersion getDependencies getProperty currentLuceneVersion lucenePluginDescriptor getBundle LUCENE_PLUGIN_ID lucenePluginDescriptor currentLuceneVersion lucenePluginDescriptor getHeaders BUNDLE_VERSION currentLuceneVersion usedLuceneVersion
Saves Lucene version and analyzer identifier to a file private void save Dependencies get Dependencies put analyzer analyzer Descriptor get Id NON NLS 1 Bundle lucene Bundle Platform get Bundle LUCENE PLUGIN ID if lucene Bundle null String lucene Bundle Version NON NLS 1 lucene Bundle get Headers get Constants BUNDLE VERSION get Dependencies put lucene lucene Bundle Version NON NLS 1 else get Dependencies put lucene NON NLS 1 NON NLS 2 get Dependencies save  saveDependencies getDependencies analyzerDescriptor getId luceneBundle getBundle LUCENE_PLUGIN_ID luceneBundle luceneBundleVersion luceneBundle getHeaders BUNDLE_VERSION getDependencies luceneBundleVersion getDependencies getDependencies
return Returns true if index has been left in inconsistent state If analyzer has changed to incompatible one index is treated as inconsistent as well public boolean is Inconsistent if inconsistency File exists return true return is Lucene Compatible analyzer Descriptor is Compatible read Analyzer Id  isInconsistent inconsistencyFile isLuceneCompatible analyzerDescriptor isCompatible readAnalyzerId
Writes or deletes inconsistency flag file public void set Inconsistent boolean inconsistent if inconsistent try parent directory already created by begin Add Batch on new index File Output Stream fos new File Output Stream inconsistency File fos close catch IO Exception ioe else inconsistency File delete  setInconsistent beginAddBatch FileOutputStream FileOutputStream inconsistencyFile IOException inconsistencyFile
public void open Searcher throws IO Exception synchronized searcher Create Lock if searcher null searcher new Index Searcher index Dir get Absolute Path  openSearcher IOException searcherCreateLock IndexSearcher indexDir getAbsolutePath
Closes Index Reader used by Searcher Should be called on platform shutdown or when TO Cs have changed when no more reading from this index is to be performed public void close closed true wait for all sarches to finish synchronized searches while searches size 0 try Thread sleep 50 catch Interrupted Exception ie if searcher null try searcher close catch IO Exception ioe  IndexReader TOCs InterruptedException IOException
Finds and unzips prebuild index specified in preferences private void unzip Product Index String index Plugin Id Help Base Plugin get Default get Plugin Preferences get String product Index NON NLS 1 if index Plugin Id null index Plugin Id length 0 return Input Stream zip In Resource Locator open From Plugin index Plugin Id doc index zip get Locale NON NLS 1 if zip In null return byte buf new byte 8192 File dest Dir index Dir Zip Input Stream zis new Zip Input Stream zip In File Output Stream fos null try Zip Entry z Entry while z Entry zis get Next Entry null if it is empty directory create it if z Entry is Directory new File dest Dir z Entry get Name mkdirs continue if it is a file extract it String file Path z Entry get Name int last Separator file Path last Index Of NON NLS 1 String file Dir NON NLS 1 if last Separator 0 file Dir file Path substring 0 last Separator create directory for a file new File dest Dir file Dir mkdirs write file File out File new File dest Dir file Path fos new File Output Stream out File int n 0 while n zis read buf 0 fos write buf 0 n fos close if Help Base Plugin DEBUG SEARCH System out println Search Index Prebuilt index restored to NON NLS 1 dest Dir NON NLS 1 catch IO Exception ioe if fos null try fos close catch IO Exception ioe2 finally try zip In close if zis null zis close catch IO Exception ioe  unzipProductIndex indexPluginId HelpBasePlugin getDefault getPluginPreferences getString productIndex indexPluginId indexPluginId InputStream zipIn ResourceLocator openFromPlugin indexPluginId doc_index getLocale zipIn destDir indexDir ZipInputStream ZipInputStream zipIn FileOutputStream ZipEntry zEntry zEntry getNextEntry zEntry isDirectory destDir zEntry getName filePath zEntry getName lastSeparator filePath lastIndexOf fileDir lastSeparator fileDir filePath lastSeparator destDir fileDir outFile destDir filePath FileOutputStream outFile HelpBasePlugin DEBUG_SEARCH SearchIndex destDir IOException IOException zipIn IOException
Returns true when the index must be updated public synchronized boolean needs Updating if exists return true return get Doc Plugins detect Change  needsUpdating getDocPlugins detectChange
return Returns the toc Manager public Toc Manager get Toc Manager return toc Manager  tocManager TocManager getTocManager tocManager
private void register Search Thread t synchronized searches searches add t  registerSearch
private void unregister Search Thread t synchronized searches searches remove t  unregisterSearch
return Returns the closed public boolean is Closed return closed  isClosed
return true if lock obtained for this Eclipse instance throws Overlapping File Lock Exception if lock already obtained public synchronized boolean try Lock throws Overlapping File Lock Exception if lock null throw new Overlapping File Lock Exception File lock File new File index Dir get Parent File locale lock NON NLS 1 lock File get Parent File mkdirs try Random Access File raf new Random Access File lock File rw NON NLS 1 File Lock l raf get Channel try Lock if l null lock l return true catch IO Exception ioe lock null return false  OverlappingFileLockException tryLock OverlappingFileLockException OverlappingFileLockException lockFile indexDir getParentFile lockFile getParentFile RandomAccessFile RandomAccessFile lockFile FileLock getChannel tryLock IOException
public synchronized void release Lock if lock null try lock channel close catch IO Exception ioe lock null  releaseLock IOException

private Progress Distributor progress Distributor param locale param analyzer Desc param toc Manager public Search Index With Indexing Progress String locale Analyzer Descriptor analyzer Desc Toc Manager toc Manager super locale analyzer Desc toc Manager progress Distributor new Progress Distributor  ProgressDistributor progressDistributor analyzerDesc tocManager SearchIndexWithIndexingProgress AnalyzerDescriptor analyzerDesc TocManager tocManager analyzerDesc tocManager progressDistributor ProgressDistributor
return Returns the progress Distributor public Progress Distributor get Progress Distributor return progress Distributor  progressDistributor ProgressDistributor getProgressDistributor progressDistributor

private Map analyzer Descriptors new Hash Map Constructs a Search manager public Search Manager super Help Plugin get Default add Tocs Changed Listener this  analyzerDescriptors HashMap SearchManager HelpPlugin getDefault addTocsChangedListener
Public for use by indexing tool public Search Index With Indexing Progress get Index String locale synchronized indexes Object index indexes get locale if index null index new Search Index With Indexing Progress locale get Analyzer locale Help Plugin get Toc Manager indexes put locale index return Search Index With Indexing Progress index  SearchIndexWithIndexingProgress getIndex SearchIndexWithIndexingProgress getAnalyzer HelpPlugin getTocManager SearchIndexWithIndexingProgress
Obtains Analyzer Descriptor that indexing and search should use for a given locale param locale 2 or 5 character locale representation private Analyzer Descriptor get Analyzer String locale get an analyzer from cache Analyzer Descriptor analyzer Desc Analyzer Descriptor analyzer Descriptors get locale if analyzer Desc null return analyzer Desc obtain configured analyzer for this locale analyzer Desc new Analyzer Descriptor locale save analyzer in the cache analyzer Descriptors put locale analyzer Desc String lang analyzer Desc get Lang if locale null locale equals lang analyzer Descriptors put lang analyzer Desc return analyzer Desc  AnalyzerDescriptor AnalyzerDescriptor getAnalyzer AnalyzerDescriptor analyzerDesc AnalyzerDescriptor analyzerDescriptors analyzerDesc analyzerDesc analyzerDesc AnalyzerDescriptor analyzerDescriptors analyzerDesc analyzerDesc getLang analyzerDescriptors analyzerDesc analyzerDesc
Searches index for documents containing an expression public void search I Search Query search Query I Search Hit Collector collector I Progress Monitor pm throws Query Too Complex Exception Search Index With Indexing Progress index get Index search Query get Locale try ensure Index Updated pm index if index exists no indexable documents hence no index or index is corrupted return catch Indexing Operation Indexing Exception ie if Help Base Plugin DEBUG SEARCH System out println this get Class get Name Index Update Exception occurred NON NLS 1 index search search Query collector  ISearchQuery searchQuery ISearchHitCollector IProgressMonitor QueryTooComplexException SearchIndexWithIndexingProgress getIndex searchQuery getLocale ensureIndexUpdated IndexingOperation IndexingException HelpBasePlugin DEBUG_SEARCH getClass getName IndexUpdateException searchQuery
Updates index Checks if all contributions were indexed If not it indexes them throws Operation Canceled Exception if indexing was cancelled public void ensure Index Updated I Progress Monitor pm Search Index With Indexing Progress index throws Operation Canceled Exception Indexing Operation Indexing Exception Progress Distributor progress Distrib index get Progress Distributor progress Distrib add Monitor pm boolean configuration Locked false try Prevent two workbench or stand alone help instances from updating index concurently Lock is created for every search request so do not use it in infocenter for performance administrator will need to ensure index is updated before launching another infocenter instance on the same configuration if Base Help System MODE INFOCENTER Base Help System get Mode try configuration Locked index try Lock if configuration Locked Index is being updated by another proces do not update or wait just continue with search pm begin Task 1 NON NLS 1 pm worked 1 pm done return catch Overlapping File Lock Exception ofle Another thread in this process is indexing and using the lock Only one index update occurs in VM at a time but progress Search Progress Monitor for other locales are waiting until we know if indexing is needed to prevent showing progress on first search after launch if no indexing is needed if index is Closed index needs Updating very good can search pm begin Task 1 NON NLS 1 pm worked 1 pm done return else if pm instanceof Search Progress Monitor Search Progress Monitor pm started update Index pm index progress Distrib finally progress Distrib remove Monitor pm if configuration Locked index release Lock  OperationCanceledException ensureIndexUpdated IProgressMonitor SearchIndexWithIndexingProgress OperationCanceledException IndexingOperation IndexingException ProgressDistributor progressDistrib getProgressDistributor progressDistrib addMonitor configurationLocked BaseHelpSystem MODE_INFOCENTER BaseHelpSystem getMode configurationLocked tryLock configurationLocked beginTask OverlappingFileLockException SearchProgressMonitor isClosed needsUpdating beginTask SearchProgressMonitor SearchProgressMonitor updateIndex progressDistrib progressDistrib removeMonitor configurationLocked releaseLock
param pm param index param progress Distrib throws Indexing Exception private synchronized void update Index I Progress Monitor pm Search Index index Progress Distributor progress Distrib throws Indexing Exception if index is Closed index needs Updating pm begin Task 1 NON NLS 1 pm worked 1 pm done return if Help Base Plugin DEBUG SEARCH System out println Search Manager indexing index get Locale NON NLS 1 Perform indexing try Plugin Version Info versions index get Doc Plugins if versions null pm begin Task 1 NON NLS 1 pm worked 1 pm done return Indexing Operation indexer new Indexing Operation index indexer execute progress Distrib return catch Operation Canceled Exception oce progress Distrib operation Canceled Help Base Plugin log Warning Help Base Resources get String Search cancelled NON NLS 1 throw oce  progressDistrib IndexingException updateIndex IProgressMonitor SearchIndex ProgressDistributor progressDistrib IndexingException isClosed needsUpdating beginTask HelpBasePlugin DEBUG_SEARCH SearchManager getLocale PluginVersionInfo getDocPlugins beginTask IndexingOperation IndexingOperation progressDistrib OperationCanceledException progressDistrib operationCanceled HelpBasePlugin logWarning HelpBaseResources getString Search_cancelled
Closes all indexes public void close synchronized indexes for Iterator it indexes values iterator it has Next Search Index it next close  hasNext SearchIndex
public synchronized void tocs Changed Collection active Indexes new Array List synchronized indexes active Indexes add All indexes values for Iterator it active Indexes iterator it has Next Search Index With Indexing Progress ix Search Index With Indexing Progress it next ix close synchronized indexes indexes remove ix get Locale Progress Distributor pm ix get Progress Distributor pm begin Task 1 NON NLS 1 pm worked 1 pm done Search Progress Monitor reinit ix get Locale  tocsChanged activeIndexes ArrayList activeIndexes addAll activeIndexes hasNext SearchIndexWithIndexingProgress SearchIndexWithIndexingProgress getLocale ProgressDistributor getProgressDistributor beginTask SearchProgressMonitor getLocale

static dummy collector new I Search Hit Collector public void add Hits Hits h String s  dummy_collector ISearchHitCollector addHits
Constructor public Search Progress Monitor started done canceled false  SearchProgressMonitor
started done canceled false public void begin Task String name int total Work this total Work total Work this started true  beginTask totalWork totalWork totalWork
public void done curr Work total Work this done true this started true  currWork totalWork
public void set Task Name String name  setTaskName
public void sub Task String name  subTask
public void worked int work curr Work work if curr Work total Work curr Work total Work else if curr Work 0 curr Work 0  currWork currWork totalWork currWork totalWork currWork currWork
public void internal Worked double work  internalWorked
public int get Percentage if done return 100 if total Work I Progress Monitor UNKNOWN return 0 if curr Work total Work return 100 return 100 curr Work total Work  getPercentage totalWork IProgressMonitor currWork totalWork currWork totalWork
Gets the is Cancelled return Returns a boolean public boolean is Canceled return canceled  isCancelled isCanceled
Sets the is Canceled param canceled The is Canceled to set public void set Cancelled boolean canceled this canceled canceled  isCanceled isCanceled setCancelled
Sets the is Started public void started this started true  isStarted
Gets the is Started return Returns a boolean public boolean is Started return started  isStarted isStarted
Gets the is Done return Returns a boolean public boolean is Done return done  isDone isDone
Sets the is Canceled param canceled The is Canceled to set public void set Canceled boolean canceled this canceled canceled  isCanceled isCanceled setCanceled
Thread indexer new Thread new Runnable public void run try Base Help System get Search Manager search new Dummy Search Query locale dummy collector pm catch Operation Canceled Exception oce operation cancelled throw out the progress monitor progress Monitors remove locale catch Exception e progress Monitors remove locale if Help Base Plugin get Default null Help Base Plugin log Error Help Base Resources get String search index update error e NON NLS 1 else Plugin has been shut down  BaseHelpSystem getSearchManager DummySearchQuery dummy_collector OperationCanceledException progressMonitors progressMonitors HelpBasePlugin getDefault HelpBasePlugin logError HelpBaseResources getString search_index_update_error
Returns a progress monitor for specified query and locale public static synchronized Search Progress Monitor get Progress Monitor final String locale return an existing progress monitor if there is one if progress Monitors get locale null return Search Progress Monitor progress Monitors get locale final Search Progress Monitor pm new Search Progress Monitor progress Monitors put locale pm spawn a thread that will cause indexing if needed Thread indexer new Thread new Runnable public void run try Base Help System get Search Manager search new Dummy Search Query locale dummy collector pm catch Operation Canceled Exception oce operation cancelled throw out the progress monitor progress Monitors remove locale catch Exception e progress Monitors remove locale if Help Base Plugin get Default null Help Base Plugin log Error Help Base Resources get String search index update error e NON NLS 1 else Plugin has been shut down indexer set Name Help Search Indexer NON NLS 1 indexer start give pm chance to start this will avoid seing progress if there is no work to do while pm is Started try Thread sleep 50 catch Interrupted Exception ie if progress Monitors get locale null operation got canceled break return pm  SearchProgressMonitor getProgressMonitor progressMonitors SearchProgressMonitor progressMonitors SearchProgressMonitor SearchProgressMonitor progressMonitors BaseHelpSystem getSearchManager DummySearchQuery dummy_collector OperationCanceledException progressMonitors progressMonitors HelpBasePlugin getDefault HelpBasePlugin logError HelpBaseResources getString search_index_update_error setName HelpSearchIndexer isStarted InterruptedException progressMonitors
static class Dummy Search Query implements I Search Query private String l Dummy Search Query String loc l loc  DummySearchQuery ISearchQuery DummySearchQuery
Obtains names of fields in addition to default field public Collection get Field Names return new Array List  getFieldNames ArrayList
Obtains search word user query public String get Search Word return dummy NON NLS 1  getSearchWord
return true if search only in specified fields not the default field public boolean is Field Search return false  isFieldSearch
Obtains locale public String get Locale return l  getLocale
public synchronized static void reinit String locale progress Monitors remove locale  progressMonitors

String locale String search Word public Search Query this false new Array List Platform getNL NON NLS 1  searchWord SearchQuery ArrayList
public Search Query String search Word boolean field Search Collection field Names String locale this search Word search Word this field Search field Search this field Names field Names this locale locale  SearchQuery searchWord fieldSearch fieldNames searchWord searchWord fieldSearch fieldSearch fieldNames fieldNames
Returns the field Names return Collection public Collection get Field Names return field Names  fieldNames getFieldNames fieldNames
Returns the field Search return boolean public boolean is Field Search return field Search  fieldSearch isFieldSearch fieldSearch
Returns the locale return String public String get Locale return locale  getLocale
Returns the search Word return String public String get Search Word return search Word  searchWord getSearchWord searchWord
Sets the field Names param field Names The field Names to set public void set Field Names Collection field Names this field Names field Names  fieldNames fieldNames fieldNames setFieldNames fieldNames fieldNames fieldNames
Sets the field Search param field Search The field Search to set public void set Field Search boolean field Search this field Search field Search  fieldSearch fieldSearch fieldSearch setFieldSearch fieldSearch fieldSearch fieldSearch
Sets the locale param locale The locale to set public void set Locale String locale this locale locale  setLocale
Sets the search Word param search Word The search Word to set public void set Search Word String search Word this search Word search Word  searchWord searchWord searchWord setSearchWord searchWord searchWord searchWord

protected Search Hit search Hits new Search Hit 0 Constructor param working Sets working sets or null if no filtering public Search Results Working Set working Sets int max Hits String locale this max Hits max Hits this locale locale this scopes get Scopes working Sets  SearchHit searchHits SearchHit workingSets SearchResults WorkingSet workingSets maxHits maxHits maxHits getScopes workingSets
Adds hits to the result param hits Hits public void add Hits Hits hits String highlight Terms String url Encoded Words URL Coder encode highlight Terms List search Hit List new Array List float score Scale 1 0f boolean score Scale Set false for int h 0 h hits length h max Hits h org apache lucene document Document doc float score try doc hits doc h score hits score h catch IO Exception ioe continue String href doc get name NON NLS 1 I Toc toc null the TOC containing the topic Adaptable Help Resource scope null the scope for the topic if any if scopes null toc get Toc For Topic href locale else scope get Scope For Topic href if scope null topic outside of scope continue else if scope instanceof Adaptable Toc toc I Toc scope get Adapter I Toc class else scope is Adaptable Topic toc I Toc scope get Parent get Adapter I Toc class adjust score if score Scale Set if score 0 score Scale 0 99f score score 1 score Scale Set true else score score score Scale 0 01f Set the document label String label doc get raw title NON NLS 1 if equals label toc null NON NLS 1 I Topic t if scope null t scope get Topic href else t toc get Topic href if t null label t get Label if label null equals label NON NLS 1 label href Set document href href href resultof url Encoded Words NON NLS 1 search Hit List add new Search Hit href label score toc search Hits Search Hit search Hit List to Array new Search Hit search Hit List size  addHits highlightTerms urlEncodedWords URLCoder highlightTerms searchHitList ArrayList scoreScale scoreScaleSet maxHits IOException IToc AdaptableHelpResource getTocForTopic getScopeForTopic AdaptableToc IToc getAdapter IToc AdaptableTopic IToc getParent getAdapter IToc scoreScaleSet scoreScale scoreScaleSet scoreScale raw_title ITopic getTopic getTopic getLabel urlEncodedWords searchHitList SearchHit searchHits SearchHit searchHitList toArray SearchHit searchHitList
Finds a topic within a scope private Adaptable Help Resource get Scope For Topic String href for int i 0 i scopes size i Adaptable Help Resource scope Adaptable Help Resource scopes get i if scope get Topic href null return scope return null  AdaptableHelpResource getScopeForTopic AdaptableHelpResource AdaptableHelpResource getTopic
Finds a topic in a toc or within a scope if specified private I Toc get Toc For Topic String href String locale I Toc tocs Help Plugin get Toc Manager get Tocs locale for int i 0 i tocs length i I Topic topic tocs i get Topic href if topic null return tocs i return null  IToc getTocForTopic IToc HelpPlugin getTocManager getTocs ITopic getTopic
Gets the search Hits return Returns a Search Hit public Search Hit get Search Hits return search Hits  searchHits SearchHit SearchHit getSearchHits searchHits
Returns a collection of adaptable help resources that are roots for filtering return Collection private Array List get Scopes Working Set w Sets if w Sets null return null scopes new Array List w Sets length for int w 0 w w Sets length w Adaptable Help Resource elements w Sets w get Elements for int i 0 i elements length i scopes add elements i return scopes  ArrayList getScopes WorkingSet wSets wSets ArrayList wSets wSets AdaptableHelpResource wSets getElements

Constructor for Smart Analyzer public Smart Analyzer String locale Analyzer plugged In Analyzer super this plugged In Analyzer plugged In Analyzer this exact Analyzer new Default Analyzer locale  SmartAnalyzer SmartAnalyzer pluggedInAnalyzer pluggedInAnalyzer pluggedInAnalyzer exactAnalyzer DefaultAnalyzer
Creates a Token Stream which tokenizes all the text in the provided Reader Delegates to Default Analyzer when field used to search for exact match and to plugged in analyzer for other fields public final Token Stream token Stream String field Name Reader reader if field Name null field Name starts With exact  NON NLS 1 return exact Analyzer token Stream field Name reader return plugged In Analyzer token Stream field Name reader  TokenStream DefaultAnalyzer TokenStream tokenStream fieldName fieldName fieldName startsWith exact_ exactAnalyzer tokenStream fieldName pluggedInAnalyzer tokenStream fieldName

private final char cbuf Constructor public Word Token Stream String field Name Reader reader Locale locale this field Name field Name this reader reader boundary Break Iterator get Word Instance locale cbuf new char BUF LEN tokens new Array List TOKENS LEN  WordTokenStream fieldName fieldName fieldName BreakIterator getWordInstance BUF_LEN ArrayList TOKENS_LEN
see Token Stream next public final Token next throws IO Exception while token no Tokens read BUF LEN of chars int l while l reader read cbuf 0 if l 0 EOF reader close return null String Buffer strbuf new String Buffer l 80 strbuf append cbuf 0 l read more until white space or EOF int c while 0 c reader read strbuf append char c if c c r c n c t break String str strbuf to String boundary set Text str int start boundary first tokens clear wordsbreak for int end boundary next end Break Iterator DONE start end end boundary next determine if it is a word any letter or digit between boundaries means it is a word for int i start i end i if Character is Letter Or Digit str char At i it is a word tokens add new Token str substring start end start end continue wordsbreak if c 0 reader close tokens add Token null no Tokens tokens size token 0 return Token tokens get token  TokenStream IOException noTokens BUF_LEN StringBuffer StringBuffer toString setText BreakIterator isLetterOrDigit charAt noTokens

private Eclipse Life Cycle Listener life Cycle Listener Constructor public Eclipse Eclipse Life Cycle Listener listener super this life Cycle Listener listener this set Name Eclipse NON NLS 1 this dir Options get Eclipse Home  EclipseLifeCycleListener lifeCycleListener EclipseLifeCycleListener lifeCycleListener setName getEclipseHome
private void prepare Command throws Exception if Options use Exe prepare Eclipse Command ensure Eclipse Exe Exists else prepare Java Command ensure Startup Jar Exists ensure Vm Exists  prepareCommand useExe prepareEclipseCommand ensureEclipseExeExists prepareJavaCommand ensureStartupJarExists ensureVmExists
private void prepare Eclipse Command List vm Args Options get Vm Args List eclipse Args Options get Eclipse Args cmdarray new String 3 vm Args size 1 eclipse Args size cmdarray 0 new File Options get Eclipse Home eclipse get Absolute Path NON NLS 1 cmdarray 1 vm NON NLS 1 cmdarray 2 Options get Vm for int i 0 i eclipse Args size i cmdarray 3 i String eclipse Args get i cmdarray 3 eclipse Args size vmargs NON NLS 1 for int i 0 i vm Args size i cmdarray 4 eclipse Args size i String vm Args get i  prepareEclipseCommand vmArgs getVmArgs eclipseArgs getEclipseArgs vmArgs eclipseArgs getEclipseHome getAbsolutePath getVm eclipseArgs eclipseArgs eclipseArgs vmArgs eclipseArgs vmArgs
private void prepare Java Command List vm Args Options get Vm Args List eclipse Args Options get Eclipse Args cmdarray new String 1 vm Args size 3 eclipse Args size cmdarray 0 Options get Vm for int i 0 i vm Args size i cmdarray 1 i String vm Args get i cmdarray 1 vm Args size cp NON NLS 1 cmdarray 2 vm Args size startup jar NON NLS 1 cmdarray 3 vm Args size org eclipse core launcher Main NON NLS 1 for int i 0 i eclipse Args size i cmdarray 4 vm Args size i String eclipse Args get i  prepareJavaCommand vmArgs getVmArgs eclipseArgs getEclipseArgs vmArgs eclipseArgs getVm vmArgs vmArgs vmArgs vmArgs vmArgs eclipseArgs vmArgs eclipseArgs
Launches Eclipse process and waits for it public void run try prepare Command if Options is Debug print Command do pr Runtime get Runtime exec cmdarray String null dir new Stream Consumer pr get Input Stream start new Stream Consumer pr get Error Stream start if status STATUS INIT started first time status STATUS STARTED try pr wait For catch Interrupted Exception e if Options is Debug System out println Eclipse exited with status code pr exit Value NON NLS 1 if pr exit Value NEEDS RESTART System out println Updates are installed Eclipse will be restarted NON NLS 1 while pr exit Value NEEDS RESTART catch Exception exc exception exc status STATUS ERROR finally if status STATUS INIT status STATUS ERROR if status STATUS ERROR exception new Exception Unknown exception life Cycle Listener eclipse Ended  prepareCommand isDebug printCommand getRuntime StreamConsumer getInputStream StreamConsumer getErrorStream STATUS_INIT STATUS_STARTED waitFor InterruptedException isDebug exitValue exitValue NEEDS_RESTART exitValue NEEDS_RESTART STATUS_ERROR STATUS_INIT STATUS_ERROR STATUS_ERROR lifeCycleListener eclipseEnded
Buffered Reader b Reader public Stream Consumer Input Stream input Stream super this set Name Eclipse out err consumer NON NLS 1 this set Daemon true b Reader new Buffered Reader new Input Stream Reader input Stream  BufferedReader bReader StreamConsumer InputStream inputStream setName setDaemon bReader BufferedReader InputStreamReader inputStream
public void run try String line while null line b Reader read Line System out println line b Reader close catch IO Exception ioe ioe print Stack Trace  bReader readLine bReader IOException printStackTrace
private void ensure Vm Exists throws Exception File vm Exe new File Options get Vm if vm Exe exists vm Exe is Directory return vm Exe new File Options get Vm exe NON NLS 1 if vm Exe exists vm Exe is Directory return throw new Exception File vm Exe get Absolute Path does not exists Pass a correct vm option  ensureVmExists vmExe getVm vmExe vmExe isDirectory vmExe getVm vmExe vmExe isDirectory vmExe getAbsolutePath
private void ensure Eclipse Exe Exists throws Exception File eclipse Exe new File Options get Eclipse Home eclipse NON NLS 1 System get Property os name starts With Win NON NLS 1 NON NLS 2 exe NON NLS 1 NON NLS 1 if eclipse Exe exists eclipse Exe is Directory return throw new Exception File eclipse Exe get Absolute Path does not exists Pass a correct eclipsehome option  ensureEclipseExeExists eclipseExe getEclipseHome getProperty startsWith eclipseExe eclipseExe isDirectory eclipseExe getAbsolutePath
private void ensure Startup Jar Exists throws Exception File startup Jar new File Options get Eclipse Home startup jar NON NLS 1 if startup Jar exists startup Jar is Directory return throw new Exception File startup Jar get Absolute Path does not exists Pass a correct eclipsehome option  ensureStartupJarExists startupJar getEclipseHome startupJar startupJar isDirectory startupJar getAbsolutePath
return Exception public Exception get Exception return exception  getException
return int public int get Status return status  getStatus
private void print Command System out println Launch command is NON NLS 1 for int i 0 i cmdarray length i System out println cmdarray i NON NLS 1  printCommand
Forcibly kill Eclipse process public void kill Process if pr null pr destroy  killProcess

private String port public Eclipse Connection  EclipseConnection
public String get Port return port  getPort
public String get Host return host  getHost
public void reset host null port null 
public boolean is Valid return host null port null  isValid
public void connect URL url throws Interrupted Exception Exception try HttpURL Connection connection HttpURL Connection url open Connection if Options is Debug System out println Connection to control servlet created NON NLS 1 connection connect if Options is Debug System out println Connection to control servlet connected NON NLS 1 int code connection get Response Code if Options is Debug System out println Response code from control servlet code NON NLS 1 connection disconnect return catch IO Exception ioe if Options is Debug ioe print Stack Trace  InterruptedException HttpURLConnection HttpURLConnection openConnection isDebug isDebug getResponseCode isDebug IOException isDebug printStackTrace
Obtains host and port from the file Retries several times if file does not exists and help might be starting up public void renew throws Exception Properties p new Properties File Input Stream is null try is new File Input Stream Options get Connection File p load is is close catch IO Exception ioe it is ok eclipse might have just exited throw ioe finally if is null try is close catch IO Exception ioe2 host String p get host NON NLS 1 port String p get port NON NLS 1 if Options is Debug System out println Help server host host NON NLS 1 if Options is Debug System out println Help server port port NON NLS 1  FileInputStream FileInputStream getConnectionFile IOException IOException isDebug isDebug

private boolean eclipse Ended false Constructs help system param application Id ID of Eclipse help application param args array of String options and their values Option code eclipse Home dir code specifies Eclipse installation directory It must be provided when current directory is not the same as Eclipse installation directory Additionally most options accepted by Eclipse execuable are supported public Eclipse Controller String application Id String args this application Id application Id Options init application Id args connection new Eclipse Connection  eclipseEnded applicationId eclipseHome EclipseController applicationId applicationId applicationId applicationId EclipseConnection
see org eclipse help standalone Help shutdown public final synchronized void shutdown throws Exception try obtain Lock send Help Command Internal shutdown new String 0 NON NLS 1 catch MalformedURL Exception mue mue print Stack Trace catch Interrupted Exception ie finally release Lock  obtainLock sendHelpCommandInternal MalformedURLException printStackTrace InterruptedException releaseLock
see org eclipse help standalone Help start public final synchronized void start throws Exception try obtain Lock start Eclipse finally release Lock  obtainLock startEclipse releaseLock
Ensures the application is running and sends command to the control servlet If connection fails retries several times in case webapp is starting up protected final synchronized void send Help Command String command String parameters throws Exception try obtain Lock send Help Command Internal command parameters finally release Lock  sendHelpCommand obtainLock sendHelpCommandInternal releaseLock
Starts Eclipse if not yet running private void start Eclipse throws Exception boolean fully Running is Application Running if fully Running return if Options is Debug System out println Using workspace Options get Workspace get Absolute Path NON NLS 1 delete old connection file Options get Connection File delete connection reset if Options is Debug System out println Ensured old connection file is deleted Launching Eclipse NON NLS 1 eclipse Ended false eclipse new Eclipse this eclipse start fully Running is Application Running while eclipse Ended fully Running try Thread sleep 250 catch Interrupted Exception ie fully Running is Application Running if eclipse Ended if eclipse get Status Eclipse STATUS ERROR throw eclipse get Exception return if Options is Debug System out println Eclipse launched NON NLS 1 in case controller is killed Runtime get Runtime add Shutdown Hook new Eclipse Cleaner  startEclipse fullyRunning isApplicationRunning fullyRunning isDebug getWorkspace getAbsolutePath getConnectionFile isDebug eclipseEnded fullyRunning isApplicationRunning eclipseEnded fullyRunning InterruptedException fullyRunning isApplicationRunning eclipseEnded getStatus STATUS_ERROR getException isDebug getRuntime addShutdownHook EclipseCleaner
private void send Help Command Internal String command String parameters throws Exception if shutdown equals Ignore Case command NON NLS 1 start Eclipse if is Application Running return if connection is Valid connection renew try URL url create CommandURL command parameters if shutdown equals Ignore Case command NON NLS 1 Options get Connection File exists connection connect url long time Limit System current Time Millis 60 1000 while Options get Connection File exists Thread sleep 200 if System current Time Millis time Limit System out println Shutting down is taking too long Will not wait break else connection connect url catch MalformedURL Exception mue mue print Stack Trace catch Interrupted Exception ie  sendHelpCommandInternal equalsIgnoreCase startEclipse isApplicationRunning isValid createCommandURL equalsIgnoreCase getConnectionFile timeLimit currentTimeMillis getConnectionFile currentTimeMillis timeLimit MalformedURLException printStackTrace InterruptedException
Builds a URL that communicates the specified command to help control servlet param command standalone help system command e g display Help param parameters array of parameters of the command e g http www eclipse org private URL create CommandURL String command String parameters throws MalformedURL Exception String Buffer url Str new String Buffer url Str append http NON NLS 1 url Str append connection get Host url Str append NON NLS 1 url Str append connection get Port url Str append CONTROL SERVLET PATH url Str append command NON NLS 1 url Str append command for int i 0 i parameters length i url Str append NON NLS 1 url Str append parameters i if Options is Debug System out println Control servlet URL url Str to String NON NLS 1 return new URL url Str to String  displayHelp createCommandURL MalformedURLException StringBuffer urlStr StringBuffer urlStr urlStr getHost urlStr urlStr getPort urlStr CONTROL_SERVLET_PATH urlStr urlStr urlStr urlStr isDebug urlStr toString urlStr toString
public void eclipse Ended eclipse Ended true connection reset  eclipseEnded eclipseEnded
private void obtain Lock throws IO Exception if lock null we already have lock return if Options get Lock File exists Options get Lock File get Parent File mkdirs Random Access File raf new Random Access File Options get Lock File rw NON NLS 1 lock raf get Channel lock if Options is Debug System out println Lock obtained NON NLS 1  obtainLock IOException getLockFile getLockFile getParentFile RandomAccessFile RandomAccessFile getLockFile getChannel isDebug
private void release Lock if lock null try lock channel close if Options is Debug System out println Lock released NON NLS 1 lock null catch IO Exception ioe  releaseLock isDebug IOException
Tests whether Help Application is running by testing if applicationlock is locked private boolean is Application Running File application Lock File new File Options get Lock File get Parent File applicationlock NON NLS 1 Random Access File random Access File null File Lock application Lock null try random Access File new Random Access File application Lock File rw NON NLS 1 application Lock random Access File get Channel try Lock catch IO Exception ioe finally if application Lock null try application Lock release catch IO Exception ioe if random Access File null try random Access File close catch IO Exception ioe if Options is Debug System out println is Application Running application Lock null NON NLS 1 return application Lock null  HelpApplication isApplicationRunning applicationLockFile getLockFile getParentFile RandomAccessFile randomAccessFile FileLock applicationLock randomAccessFile RandomAccessFile applicationLockFile applicationLock randomAccessFile getChannel tryLock IOException applicationLock applicationLock IOException randomAccessFile randomAccessFile IOException isDebug isApplicationRunning applicationLock applicationLock
public class Eclipse Cleaner extends Thread public void run if eclipse null eclipse kill Process  EclipseCleaner killProcess

public interface Eclipse Life Cycle Listener public void eclipse Ended  EclipseLifeCycleListener eclipseEnded

private static String port Initializes options param app Id eclipse application id param args array of String options and their values Option code eclipse Home dir code specifies Eclipse installation directory It must be provided when current directory is not the same as Eclipse installation directory Additionally most options accepted by Eclipse execuable are supported public static void init String app Id String args convert array of arguments to a list List list new Array List for int i 0 i args length i list add args i init app Id list  appId eclipseHome appId ArrayList appId
Initializes options param app Id eclipse application id param options list of options and their values Option code eclipse Home dir code specifies Eclipse installation directory It must be provided when current directory is not the same as Eclipse installation directory Additionally most options accepted by Eclipse execuable are supported public static void init String app Id List options Initialize eclipse Args with all passed options eclipse Args new Array List eclipse Args add All options consume command option help Command extract Option eclipse Args command NON NLS 1 if help Command null help Command new Array List 0 read debug option if get Option eclipse Args debug null NON NLS 1 debug true System out println Debugging is on NON NLS 1 consume noexec option if extract Option eclipse Args noexec null NON NLS 1 use Exe false consume eclipsehome accept eclipse home too option List homes extract Option eclipse Args eclipse Home NON NLS 1 if homes null homes is Empty homes extract Option eclipse Args eclipse Home NON NLS 1 if homes null homes is Empty eclipse Home new File String homes get 0 else eclipse Home new File System get Property user dir NON NLS 1 read data option List workspaces get Option eclipse Args data NON NLS 1 if workspaces null workspaces is Empty workspace new File String workspaces get 0 else workspace new File eclipse Home workspace NON NLS 1 lock File new File workspace metadata helplock NON NLS 1 host Port File new File workspace metadata connection NON NLS 1 consume host option List hosts extract Option eclipse Args host NON NLS 1 if hosts null hosts size 0 host String hosts get 0 consume port option List ports extract Option eclipse Args port NON NLS 1 if ports null ports size 0 port String ports get 0 consume vm option List vms extract Option eclipse Args vm NON NLS 1 if vms null vms is Empty vm String vms get 0 else String vm Name System get Property java vm name NON NLS 1 String executable J9 equals vm Name j9 java NON NLS 1 NON NLS 2 NON NLS 3 if System get Property os name starts With Win NON NLS 1 NON NLS 2 if debug executable w exe NON NLS 1 else executable exe NON NLS 1 vm System get Property java home NON NLS 1 File separator bin NON NLS 1 File separator executable consume vmargs option vm Args new Array List 0 List passed Vm Args extract Option eclipse Args vmargs NON NLS 1 if passed Vm Args null passed Vm Args size 0 vm Args passed Vm Args modify the options for passing them to eclipse add application option extract Option eclipse Args application NON NLS 1 eclipse Args add 0 application NON NLS 1 eclipse Args add 1 app Id add nosplash option prevent splash extract Option eclipse Args showsplash NON NLS 1 extract Option eclipse Args endsplash NON NLS 1 extract Option eclipse Args nosplash NON NLS 1 eclipse Args add 0 nosplash NON NLS 1 add server host and or port to vmargs option if host null port null if host null vm Args add Dserver host host NON NLS 1 if port null vm Args add Dserver port port NON NLS 1  appId eclipseHome appId eclipseArgs eclipseArgs ArrayList eclipseArgs addAll helpCommand extractOption eclipseArgs helpCommand helpCommand ArrayList getOption eclipseArgs extractOption eclipseArgs useExe eclipse_home extractOption eclipseArgs eclipseHome isEmpty extractOption eclipseArgs eclipse_Home isEmpty eclipseHome eclipseHome getProperty getOption eclipseArgs isEmpty eclipseHome lockFile hostPortFile extractOption eclipseArgs extractOption eclipseArgs extractOption eclipseArgs isEmpty vmName getProperty vmName getProperty startsWith getProperty vmArgs ArrayList passedVmArgs extractOption eclipseArgs passedVmArgs passedVmArgs vmArgs passedVmArgs extractOption eclipseArgs eclipseArgs eclipseArgs appId extractOption eclipseArgs extractOption eclipseArgs extractOption eclipseArgs eclipseArgs server_host vmArgs Dserver_host vmArgs Dserver_port
Returns true if debugging is enabled public static boolean is Debug return debug  isDebug
public static File get Connection File return host Port File  getConnectionFile hostPortFile
public static File get Lock File return lock File  getLockFile lockFile
public static File get Eclipse Home return eclipse Home  getEclipseHome eclipseHome
public static File get Workspace return workspace  getWorkspace
public static List get Help Command return help Command  getHelpCommand helpCommand
public static List get Eclipse Args return eclipse Args  getEclipseArgs eclipseArgs
Removes specified option and its list of values from a list of options param option Name name of the option e g data return List of String values of the specified option or null if option is not present private static List extract Option List options String option Name List values null for int i 0 i options size if option Name equals Ignore Case String options get i if values null values new Array List 1 found the option remove option options remove i remove option parameters while i options size if String options get i starts With NON NLS 1 option Name equals vmargs NON NLS 1 start of next option break note and remove option value values add options get i options remove i else i return values  optionName extractOption optionName optionName equalsIgnoreCase ArrayList startsWith optionName
Obtains specified option and its list of values from a list of options param option Name name of the option e g data param options List of Eclipse options return List of String values of the specified option or null if option is not present private static List get Option List options String option Name List values null for int i 0 i options size i if option Name equals Ignore Case String options get i if values null values new Array List 1 read option parameters for int j i 1 j options size j if String options get j starts With NON NLS 1 option Name equals vmargs NON NLS 1 start of next option i j break values add options get j return values  optionName getOption optionName optionName equalsIgnoreCase ArrayList startsWith optionName
return values public static String get Vm return vm  getVm
return vm public static List get Vm Args return vm Args  getVmArgs vmArgs
Returns the use Exe return boolean public static boolean use Exe return use Exe  useExe useExe useExe

Constructs help system param args array of String options and their values Option code eclipse Home dir code specifies Eclipse installation directory It must be provided when current directory is not the same as Eclipse installation directory Additionally most options accepted by Eclipse execuable are supported public Standalone Help String args super HELP APPLICATION ID args  eclipseHome StandaloneHelp HELP_APPLICATION_ID
see org eclipse help standalone Infocenter main String public static void main String args try Standalone Help help new Standalone Help args List help Command Options get Help Command if help execute Command help Command return else print Main Usage catch Exception e e print Stack Trace  StandaloneHelp StandaloneHelp helpCommand getHelpCommand executeCommand helpCommand printMainUsage printStackTrace
see org eclipse help standalone Help display Context java lang String int int public void display Context String context Id int x int y  displayContext displayContext contextId
see org eclipse help standalone Help display Context Infopop java lang String int int public void display Context Infopop String context Id int x int y  displayContextInfopop displayContextInfopop contextId
see org eclipse help standalone Help display Help public void display Help throws Exception send Help Command display Help new String 0 NON NLS 1  displayHelp displayHelp sendHelpCommand displayHelp
see org eclipse help standalone Help display Help java lang String public void display Help String href throws Exception send Help Command display Help new String href href NON NLS 1 NON NLS 2  displayHelp displayHelp sendHelpCommand displayHelp
return true if commands contained a known command and it was executed private boolean execute Command List help Commands throws Exception if help Commands size 0 return false String command String help Commands get 0 if start equals Ignore Case command NON NLS 1 start return true else if shutdown equals Ignore Case command NON NLS 1 shutdown return true else if display Help equals Ignore Case command NON NLS 1 if help Commands size 2 display Help String help Commands get 1 else display Help return true else if display Context equals Ignore Case command NON NLS 1 if help Commands size 4 display Context String help Commands get 1 Integer parse Int String help Commands get 2 Integer parse Int String help Commands get 3 return true else if display Context Infopop equals Ignore Case command NON NLS 1 if help Commands size 4 display Context Infopop String help Commands get 1 Integer parse Int String help Commands get 2 Integer parse Int String help Commands get 3 return true return false  executeCommand helpCommands helpCommands helpCommands equalsIgnoreCase equalsIgnoreCase displayHelp equalsIgnoreCase helpCommands displayHelp helpCommands displayHelp displayContext equalsIgnoreCase helpCommands displayContext helpCommands parseInt helpCommands parseInt helpCommands displayContextInfopop equalsIgnoreCase helpCommands displayContextInfopop helpCommands parseInt helpCommands parseInt helpCommands
Prints usage of this class as a program private static void print Main Usage System out println Parameters syntax System out println System out println command start shutdown display Help href eclipsehome eclipse Install Path host help Server Host port help Server Port platform options vmargs Java VM arguments NON NLS 1 System out println System out println where System out println href is the URL of the help resource to display System out println eclipse Install Path specifies Eclipse installation directory this directory is a parent to plugins directory and eclipse executable the option must be provided when current directory from which infocenter is launched is not the same as Eclipse installation directory System out println help Server Host specifies host name of the interface that help server will use System out println help Server Port specifies port number that help server will use System out println platform options are other options that are supported by Eclipse Executable  printMainUsage displayHelp eclipseInstallPath helpServerHost helpServerPort eclipseInstallPath helpServerHost helpServerPort

Constructs help system param args array of String options and their values Option code eclipse Home dir code specifies Eclipse installation directory It must be provided when current directory is not the same as Eclipse installation directory Additionally most options accepted by Eclipse execuable are supported public Standalone Infocenter String args super INFOCENTER APPLICATION ID args  eclipseHome StandaloneInfocenter INFOCENTER_APPLICATION_ID
see org eclipse help standalone Infocenter main String public static void main String args try Standalone Infocenter infocenter new Standalone Infocenter args List help Command Options get Help Command if infocenter execute Command help Command return else print Main Usage catch Exception e e print Stack Trace  StandaloneInfocenter StandaloneInfocenter helpCommand getHelpCommand executeCommand helpCommand printMainUsage printStackTrace
return true if commands contained a known command and it was executed private boolean execute Command List help Command throws Exception if help Command size 0 return false String command String help Command get 0 if start equals Ignore Case command NON NLS 1 start return true else if shutdown equals Ignore Case command NON NLS 1 shutdown return true return false  executeCommand helpCommand helpCommand helpCommand equalsIgnoreCase equalsIgnoreCase
Prints usage of this class as a program private static void print Main Usage System out println Parameters syntax System out println System out println command start shutdown eclipsehome eclipse Install Path host help Server Host port help Server Port noexec platform options vmargs Java VM arguments NON NLS 1 System out println System out println where System out println eclipse Install Path specifies Eclipse installation directory this directory is a parent to plugins directory and eclipse executable the option must be provided when current directory from which infocenter is launched is not the same as Eclipse installation directory System out println help Server Host specifies host name of the interface that help server will use System out println help Server Port specifies port number that help server will use System out println noexec option indicates that Eclipse executable should not be used System out println platform options are other options that are supported by Eclipse Executable  printMainUsage eclipseInstallPath helpServerHost helpServerPort eclipseInstallPath helpServerHost helpServerPort

protected Toc File toc File Constructor protected Anchor Toc File toc File Attributes attrs this toc File toc File if attrs null return id attrs get Value id NON NLS 1 id Href Util normalize Href toc File get PluginID toc File get Href id NON NLS 1 parent Toc toc File get Toc  TocFile tocFile TocFile tocFile tocFile tocFile getValue HrefUtil normalizeHref tocFile getPluginID tocFile getHref parentToc tocFile getToc
Implements abstract method public void build Toc Builder builder builder build Anchor this  TocBuilder buildAnchor
Obtains the ID protected String getID return id 
Returns the toc file public Toc File get Toc File return toc File  TocFile getTocFile tocFile
Adds another element as child of this element Modifies parents of a child as well public void add Child I Toc Node child super add Child child if child instanceof Toc parent Toc null parent Toc get Children Tocs add child  addChild ITocNode addChild parentToc parentToc getChildrenTocs
return I Topic list public List get Child Topics after build release Toc File toc File null return super get Child Topics  ITopic getChildTopics TocFile tocFile getChildTopics

private String locale Constructor protected Directory Toc Toc File toc File this toc File get PluginID toc File get Locale toc File get Extra Dir  DirectoryToc TocFile tocFile tocFile getPluginID tocFile getLocale tocFile getExtraDir
private Directory Toc String pluginID String locale String directory this locale locale Obtain extra search directory if provided this dir Href Util normalize Directory Href pluginID directory  DirectoryToc HrefUtil normalizeDirectoryHref
This public method is to be used after the build of TO Cs is finished With assumption that TOC model is not modifiable after the build this method caches topics in an array and releases objects used only during build return Map of I Topic public Map get Extra Topics if extra Topics null extra Topics create Extra Topics for memory foot print release Toc File and dir dir null return extra Topics  TOCs ITopic getExtraTopics extraTopics extraTopics createExtraTopics TocFile extraTopics
Obtains UR Ls of all documents inside given directory return Map of I Topic by href private Map create Extra Topics Map ret new Hash Map String pluginID Href Util get PluginID From Href dir if pluginID null return ret Bundle plugin Desc Platform get Bundle pluginID if plugin Desc null plugin Desc get State Bundle INSTALLED plugin Desc get State Bundle UNINSTALLED return ret String directory Href Util get Resource Path From Href dir if directory null the root all files in a zip should be indexed directory NON NLS 1 Find doc zip file I Path i Path new Path nl doc zip NON NLS 1 Map override new Hash Map 1 override put nl locale NON NLS 1 URL url Platform find plugin Desc i Path override if url null url Platform find plugin Desc new Path doc zip NON NLS 1 if url null collect topics from doc zip file ret put All create Extra Topics From Zip pluginID directory url Find directory on the filesystem i Path new Path nl directory NON NLS 1 url null url Platform find plugin Desc i Path override if url null url Platform find plugin Desc new Path directory if url null collect topics from directory ret put All create Extra Topics From Directory pluginID directory url return ret  URLs ITopic createExtraTopics HashMap HrefUtil getPluginIDFromHref pluginDesc getBundle pluginDesc pluginDesc getState pluginDesc getState HrefUtil getResourcePathFromHref IPath iPath HashMap pluginDesc iPath pluginDesc putAll createExtraTopicsFromZip iPath pluginDesc iPath pluginDesc putAll createExtraTopicsFromDirectory
param directory path in the form segment1 segment2 will return names of all files in a zip return Map of I Topic by href String private Map create Extra Topics From Zip String pluginID String directory URL url Map ret new Hash Map 0 URL real ZipURL try real ZipURL Platform as LocalURL Platform resolve url catch IO Exception ioe Help Plugin log Error Help Resources get String E036 url to String NON NLS 1 ioe return new Hash Map 0 Zip File zip File try zip File new Zip File real ZipURL get File ret create Extra Topics From Zip File pluginID zip File directory zip File close catch IO Exception ioe Help Plugin log Error Help Resources get String E037 real ZipURL get File NON NLS 1 ioe return new Hash Map 0 return ret  ITopic createExtraTopicsFromZip HashMap realZipURL realZipURL asLocalURL IOException HelpPlugin logError HelpResources getString toString HashMap ZipFile zipFile zipFile ZipFile realZipURL getFile createExtraTopicsFromZipFile zipFile zipFile IOException HelpPlugin logError HelpResources getString realZipURL getFile HashMap
Obtains names of files in a zip file that given directory in their path Files in subdirectories are included as well param directory path in the form segment1 segment2 will return names of all files in a zip return Map of I Topic by href String private Map create Extra Topics From Zip File String pluginID Zip File zip File String directory String constant Href Segment pluginID NON NLS 1 NON NLS 2 Map ret new Hash Map for Enumeration enum zip File entries enum has More Elements Zip Entry z Entry Zip Entry enum next Element if z Entry is Directory continue String doc Name z Entry get Name int l directory length if l 0 doc Name length l doc Name char At l directory equals doc Name substring 0 l String href constant Href Segment doc Name ret put href new Extra Topic href return ret  ITopic createExtraTopicsFromZipFile ZipFile zipFile constantHrefSegment HashMap zipFile hasMoreElements ZipEntry zEntry ZipEntry nextElement zEntry isDirectory docName zEntry getName docName docName charAt docName constantHrefSegment docName ExtraTopic
param directory path in the form segment1 segment2 will return names of all files in a directory return Map of I Topic by href String private Map create Extra Topics From Directory String pluginID String directory URL url Map m new Hash Map URL realURL try realURL Platform as LocalURL Platform resolve url catch IO Exception ioe Help Plugin log Error Help Resources get String E038 url to String NON NLS 1 ioe return m File dir File new File realURL get File if dir File exists dir File is Directory String prefix if directory length 0 prefix pluginID directory NON NLS 1 NON NLS 2 else prefix pluginID NON NLS 1 create Extra Topics From Directory File prefix dir File m return m  ITopic createExtraTopicsFromDirectory HashMap asLocalURL IOException HelpPlugin logError HelpResources getString toString dirFile getFile dirFile dirFile isDirectory createExtraTopicsFromDirectoryFile dirFile
prefix pluginID segment1 segment2 return Map of I Topic by href String private Map create Extra Topics From Directory File String prefix File dir Map m File files dir list Files for int i 0 i files length i String href prefix files i get Name NON NLS 1 if files i is Directory create Extra Topics From Directory File href files i m else m put href new Extra Topic href return m  ITopic createExtraTopicsFromDirectoryFile listFiles getName isDirectory createExtraTopicsFromDirectoryFile ExtraTopic
class Extra Topic implements I Topic private String topic Href public Extra Topic String href this topic Href href  ExtraTopic ITopic topicHref ExtraTopic topicHref
public String get Href return topic Href  getHref topicHref
return topic Href public String get Label return topic Href  topicHref getLabel topicHref
return topic Href public I Topic get Subtopics return new I Topic 0  topicHref ITopic getSubtopics ITopic

public class Href Util Creates pluginid directory from directory name public static String normalize Directory Href String pluginID String dir is treated as if extra directory was not provided if dir null dir length 0 return null means all the files in the plugin if equals dir NON NLS 1 dir NON NLS 1 remove not needed trailing separator if dir length 0 dir last Index Of dir length 1 dir dir substring 0 dir length 1 return normalize Href pluginID dir  HrefUtil normalizeDirectoryHref lastIndexOf normalizeHref
Creates pluginid href from href relative to the current plugin param pluginID id of a plugin to which href is relative param href relative href ex path anchorID ex pluginID path anchorID return String representation of href formatted as pluginID path anchorID public final static String normalize Href String pluginID String href if href null return null if href starts With NON NLS 1 already normalized return href if href starts With http NON NLS 1 href starts With file NON NLS 1 href starts With jar NON NLS 1 external doc return href if href starts With NON NLS 1 return href substring 2 else if href length 0 return pluginID href NON NLS 1 NON NLS 2 else return pluginID NON NLS 1  normalizeHref startsWith startsWith startsWith startsWith startsWith
Parses href and obtains plugin id param href String in format string1 string2 return plugin ID or null public static String get PluginID From Href String href if href null href length 2 href char At 0 return null int second Slash Ix href index Of 1 NON NLS 1 if second Slash Ix 0 href is pluginID return href substring 1 href is pluginID path anchorID return href substring 1 second Slash Ix  getPluginIDFromHref charAt secondSlashIx indexOf secondSlashIx secondSlashIx
Parses href and obtains resource path relative to the plugin param href String in format string1 string2 string3 return relative resource path or null public static String get Resource Path From Href String href if href null return null drop anchor id int anchor Ix href last Index Of NON NLS 1 if anchor Ix 0 anchor exists drop it href href substring 0 anchor Ix if href length 2 href char At 0 return null int second Slash Ix href index Of 1 NON NLS 1 if second Slash Ix 0 href is pluginID return null if second Slash Ix 1 href length href is pluginID path return href substring second Slash Ix 1 else href is pluginID return NON NLS 1  getResourcePathFromHref anchorIx lastIndexOf anchorIx anchorIx charAt secondSlashIx indexOf secondSlashIx secondSlashIx secondSlashIx

Adds another element as child of this element Modifies parents of a child as well param child node to add as child 
When a builder builds the navigation each node must accomodate the builder by responding to the build command 

protected String toc Contstructor Used when parsing help contributions protected Link Toc File toc File Attributes attrs if attrs null return toc attrs get Value toc NON NLS 1 toc Href Util normalize Href toc File get PluginID toc parent Toc toc File get Toc  TocFile tocFile getValue HrefUtil normalizeHref tocFile getPluginID parentToc tocFile getToc
Implements abstract method public void build Toc Builder builder builder build Link this  TocBuilder buildLink
Obtains URL of linked TOC protected String get Toc return toc  getToc
Adds another element as child of this element Modifies parents of a child as well public void add Child I Toc Node child super add Child child if child instanceof Toc parent Toc null parent Toc get Children Tocs add child  addChild ITocNode addChild parentToc parentToc getChildrenTocs

private int size SIZE UNINITIALIZED Constructor Used when parsing help contributions protected Toc Toc File toc File Attributes attrs if attrs null return this toc File toc File this label attrs get Value label NON NLS 1 if label null throw new Runtime Exception toc label null NON NLS 1 this link to attrs get Value link to NON NLS 1 this link to Href Util normalize Href toc File get PluginID link to this href Href Util normalize Href toc File get PluginID toc File get Href try create the description topic this description Topic new Topic toc File null this description Topic set Label this label String topic attrs get Value topic NON NLS 1 if topic null topic trim length 0 this description Topic set Href Href Util normalize Href toc File get PluginID topic else this description Topic set Href NON NLS 1 catch Exception e children Tocs new Array List directory Toc new Directory Toc toc File  SIZE_UNINITIALIZED TocFile tocFile tocFile tocFile getValue RuntimeException link_to getValue link_to link_to HrefUtil normalizeHref tocFile getPluginID link_to HrefUtil normalizeHref tocFile getPluginID tocFile getHref descriptionTopic tocFile descriptionTopic setLabel getValue descriptionTopic setHref HrefUtil normalizeHref tocFile getPluginID descriptionTopic setHref childrenTocs ArrayList directoryToc DirectoryToc tocFile
Implements abstract method public void build Toc Builder builder builder build Toc this  TocBuilder buildToc
Returns the toc file Returns null when the topic is read from a temp file public Toc File get Toc File return toc File  TocFile getTocFile tocFile
Gets the link to return Returns a String protected String getLink to return link to  link_to getLink_to link_to
Gets the href return Returns a String public String get Href return href  getHref
return href public String get Label return label  getLabel
Returns a topic with the specified href defined by this TOC br If the TOC contains multiple topics with the same href only of them arbitrarily chosen will be returned p If no topic is specified then the TOC description topic is returned or null if there is no description topic for the TOC p param href the topic s URL or null return I Topic or null public I Topic get Topic String href if href null href equals description Topic get Href return description Topic return get Topic No Descr href  ITopic ITopic getTopic descriptionTopic getHref descriptionTopic getTopicNoDescr
Similar to I Topic get Topic String but does not match and return description Topic param href the topic s URL return I Topic or null private I Topic get Topic No Descr String href I Topic result get Owned Topic href if result null return result check inside children TO Cs for Iterator it get Children Tocs iterator it has Next Toc child Toc Toc it next must not return description topic from children TO Cs result child Toc get Topic No Descr href if result null break return result  ITopic getTopic ITopic ITopic getTopicNoDescr ITopic getOwnedTopic TOCs getChildrenTocs hasNext childToc TOCs childToc getTopicNoDescr
This public method is to be used after the build of TO Cs is finished With assumption that TOC model is not modifiable after the build this method caches subtopics in an array and releases objects used only during build return I Topic public I Topic get Topics if topic Array null List topics get Child Topics create and cache array of children Topics only topic Array new I Topic topics size topics to Array topic Array after TOC is build Toc File no longer needed toc File null return topic Array  TOCs ITopic ITopic getTopics topicArray getChildTopics topicArray ITopic toArray topicArray TocFile tocFile topicArray
return I Topic or null public String get Toc Topic Href if description Topic null return description Topic get Href return null  ITopic getTocTopicHref descriptionTopic descriptionTopic getHref
Returns a topic with the specified href defined by this TOC without looking in children TO Cs br If the TOC contains multiple topics with the same href only of them arbitrarily chosen will be returned TOC Descritpion topic is ignored param href the topic s URL return I Topic or null public I Topic get Owned Topic String href return I Topic topic Map get href  TOCs ITopic ITopic getOwnedTopic ITopic topicMap
return I Topic public I Topic get Extra Topics Collection dir Topic Collection directory Toc get Extra Topics values I Topic dir Topics I Topic dir Topic Collection to Array new I Topic dir Topic Collection size add extra topics from children TO Cs for Iterator it children Tocs iterator it has Next I Toc toc I Toc it next if toc instanceof Toc I Topic more Dir Topics Toc toc get Extra Topics if more Dir Topics length 0 I Topic new Dir Topics new I Topic dir Topics length more Dir Topics length System arraycopy dir Topics 0 new Dir Topics 0 dir Topics length System arraycopy more Dir Topics 0 new Dir Topics dir Topics length more Dir Topics length dir Topics new Dir Topics return dir Topics  ITopic ITopic getExtraTopics dirTopicCollection directoryToc getExtraTopics ITopic dirTopics ITopic dirTopicCollection toArray ITopic dirTopicCollection TOCs childrenTocs hasNext IToc IToc ITopic moreDirTopics getExtraTopics moreDirTopics ITopic newDirTopics ITopic dirTopics moreDirTopics dirTopics newDirTopics dirTopics moreDirTopics newDirTopics dirTopics moreDirTopics dirTopics newDirTopics dirTopics
Returns a topic with the specified href found in extra dir defined by this TOC without looking in children TO Cs param href the topic s URL return I Topic or null public I Topic get Owned Extra Topic String href return I Topic directory Toc get Extra Topics get href  TOCs ITopic ITopic getOwnedExtraTopic ITopic directoryToc getExtraTopics
Used by debugger public String to String return href null href super to String  toString toString
Gets the children Tocs return Returns a Collection of Toc public List get Children Tocs return children Tocs  childrenTocs getChildrenTocs childrenTocs
public int size if size SIZE UNINITIALIZED size topic Map size for Iterator it children Tocs iterator it has Next size Toc it next size return size  SIZE_UNINITIALIZED topicMap childrenTocs hasNext
void register Topic I Topic topic String topic Href topic get Href if topic Href null topic Map put topic Href topic  registerTopic ITopic topicHref getHref topicHref topicMap topicHref

protected List unprocessed Tocs Constructor public Toc Builder unprocessed Toc Files new Array List unprocessed Tocs new Array List  unprocessedTocs TocBuilder unprocessedTocFiles ArrayList unprocessedTocs ArrayList
public Collection get Built Tocs returns the list of root Toc trees Collection toc Col new Array List contributed Toc Files size for Iterator it contributed Toc Files iterator it has Next Toc File toc File Toc File it next Toc toc toc File get Toc if toc null toc get Toc File is Primary is Integrated toc toc Col add toc return toc Col  getBuiltTocs tocCol ArrayList contributedTocFiles contributedTocFiles hasNext TocFile tocFile TocFile tocFile getToc getTocFile isPrimary isIntegrated tocCol tocCol
public void build Collection contributed Toc Files this contributed Toc Files contributed Toc Files unprocessed Toc Files add All contributed Toc Files process all the toc files A side effect is that linked files are also processed while unprocessed Toc Files is Empty Toc File toc File Toc File unprocessed Toc Files iterator next toc File build this At the end unprocessed Tocs may contain TO Cs that need be build All these toc could not be attached because the target node was not parsed at that time try processing as many toc link to as possible now int remaining unprocessed Tocs size for int i 0 i remaining i Toc toc Toc unprocessed Tocs get i build Toc toc  contributedTocFiles contributedTocFiles contributedTocFiles unprocessedTocFiles addAll contributedTocFiles unprocessedTocFiles isEmpty TocFile tocFile TocFile unprocessedTocFiles tocFile unprocessedTocs TOCs link_to unprocessedTocs unprocessedTocs buildToc
public void build Toc File Toc File toc File try unprocessed Toc Files remove toc File Toc File Parser parser new Toc File Parser this parser parse toc File catch Exception e String msg Help Resources get String E033 toc File get Href NON NLS 1 Help Plugin log Error msg e  buildTocFile TocFile tocFile unprocessedTocFiles tocFile TocFileParser TocFileParser tocFile HelpResources getString tocFile getHref HelpPlugin logError
public void build Anchor Anchor anchor cache the anchor in the toc file anchor get Toc File add Anchor anchor  buildAnchor getTocFile addAnchor
public void build Link Link link parse the linked file String linked Toc link get Toc Toc File included Toc File get Toc File linked Toc if included Toc File null return Toc toc included Toc File get Toc if toc null return link the two Toc objects link add Child toc  buildLink linkedToc getToc TocFile includedTocFile getTocFile linkedToc includedTocFile includedTocFile getToc addChild
link add Child toc public void build Topic Topic topic nothing to do  addChild buildTopic
public void build Toc Toc toc link toc if so specified String href toc getLink to if href null href equals NON NLS 1 return Toc File target Toc File get Toc File href if target Toc File null return Anchor anchor target Toc File get Anchor href if anchor null unprocessed Tocs add toc return link the two toc objects anchor add Child toc  buildToc getLink_to TocFile targetTocFile getTocFile targetTocFile targetTocFile getAnchor unprocessedTocs addChild
private Toc File get Toc File String href String plugin Href Util get PluginID From Href href if plugin null return null String path Href Util get Resource Path From Href href if path null return null Toc File toc File null for Iterator it contributed Toc Files iterator it has Next toc File Toc File it next if toc File get PluginID equals plugin toc File get Href equals path break else toc File null if toc File null return null if unprocessed Toc Files contains toc File build Toc File toc File return toc File  TocFile getTocFile HrefUtil getPluginIDFromHref HrefUtil getResourcePathFromHref TocFile tocFile contributedTocFiles hasNext tocFile TocFile tocFile getPluginID tocFile getHref tocFile tocFile unprocessedTocFiles tocFile buildTocFile tocFile tocFile
Checks if navigation element has been integrated into another TOC private boolean is Integrated Toc Node element check if there if there is TOC in ancestor hierarchy depth first for Iterator it element get Parents iterator it has Next Toc Node parent Toc Node it next if parent instanceof Toc Toc parent get Toc File is Primary return true else if is Integrated parent return true no ancestor is a TOC return false  isIntegrated TocNode getParents hasNext TocNode TocNode getTocFile isPrimary isIntegrated

Toc File Constructor protected Toc File String plugin String href boolean primary String locale String extra Dir this plugin plugin this href href this primary primary this locale locale this extra Dir extra Dir  TocFile extraDir extraDir extraDir
Gets the href return Returns a String protected String get Href return href  getHref
Gets the pluginID return Returns a String public final String get PluginID return plugin  getPluginID
protected Input Stream get Input Stream Input Stream stream null try if plugin null stream Resource Locator open From Plugin plugin href locale else stream new File Input Stream href catch IO Exception e return stream  InputStream getInputStream InputStream ResourceLocator openFromPlugin FileInputStream IOException
Parses file and gets the toc return Returns a Toc public Toc get Toc return toc  getToc
Sets the toc on this file It should happen during parsing public void set Toc Toc toc this toc toc  setToc
Registers a new anchor public void add Anchor Anchor a if anchors null anchors new Hash Map anchors put a getID a  addAnchor HashMap
Returns anchor by id public Anchor get Anchor String id if anchors null anchors get id null return null else return Anchor anchors get id  getAnchor
Builds the toc file if needed public void build Toc Builder builder builder build Toc File this  TocBuilder buildTocFile
Used by debugger public String to String return plugin href NON NLS 1  toString
Checks if this file specifies a TOC return Returns a boolean public boolean is Primary return primary  isPrimary
Gets the extra Dir return Returns a String public String get Extra Dir return extra Dir  extraDir getExtraDir extraDir
Gets the locale return Returns a String public String get Locale return locale  getLocale

private static XML Parser Pool parser Pool new XML Parser Pool Constructor public Toc File Parser Toc Builder builder super this builder builder  XMLParserPool parserPool XMLParserPool TocFileParser TocBuilder
see Error Handler error SAX Parse Exception public void error SAX Parse Exception ex throws SAX Exception String message get Message E024 ex NON NLS 1 Error parsing Table of Contents file URL 1 at Line 2 Column 3 4 Help Plugin log Error message null Runtime Help Status get Instance add Parse Error message ex get System Id  ErrorHandler SAXParseException SAXParseException SAXException getMessage HelpPlugin logError RuntimeHelpStatus getInstance addParseError getSystemId
see Error Handler fatal Error SAX Parse Exception public void fatal Error SAX Parse Exception ex throws SAX Exception create message string from exception String message get Message E025 ex NON NLS 1 Failed to parse Table of Contents file URL 1 at Line 2 Column 3 4 Help Plugin log Error message ex Runtime Help Status get Instance add Parse Error message ex get System Id  ErrorHandler fatalError SAXParseException fatalError SAXParseException SAXException getMessage HelpPlugin logError RuntimeHelpStatus getInstance addParseError getSystemId
protected String get Message String messageID SAX Parse Exception ex String param0 ex get System Id Integer param1 new Integer ex get Line Number Integer param2 new Integer ex get Column Number String param3 ex get Message String message Message Format format Help Resources get String messageID new Object param0 param1 param2 param3 return message  getMessage SAXParseException getSystemId getLineNumber getColumnNumber getMessage MessageFormat HelpResources getString
Gets the toc public void parse Toc File toc File this toc File toc File element Stack new Fast Stack Input Stream is toc File get Input Stream if is null return Input Source input Source new Input Source is String file toc File get PluginID toc File get Href NON NLS 1 NON NLS 2 input Source set System Id file try SAX Parser parser parser Pool obtain Parser try parser parse input Source this is close finally parser Pool release Parser parser catch Parser Configuration Exception pce String msg Help Resources get String Toc File Parser PCE NON NLS 1 SAX Parser implementation could not be loaded Help Plugin log Error msg pce catch SAX Exception se String msg Help Resources get String E026 file NON NLS 1 Error loading Table of Contents file 1 Help Plugin log Error msg se catch IO Exception ioe String msg Help Resources get String E026 file NON NLS 1 Error loading Table of Contents file 1 Help Plugin log Error msg ioe now pass it to the Runtime Help Status object explicitly because we still need to display errors even if Logging is turned off Runtime Help Status get Instance add Parse Error msg file  TocFile tocFile tocFile tocFile elementStack FastStack InputStream tocFile getInputStream InputSource inputSource InputSource tocFile getPluginID tocFile getHref inputSource setSystemId SAXParser parserPool obtainParser inputSource parserPool releaseParser ParserConfigurationException HelpResources getString TocFileParser SAXParser HelpPlugin logError SAXException HelpResources getString HelpPlugin logError IOException HelpResources getString HelpPlugin logError RuntimeHelpStatus RuntimeHelpStatus getInstance addParseError
see Content Handler start Element String String String Attributes public final void start Element String namespaceURI String local Name String q Name Attributes atts throws SAX Exception Toc Node node null if q Name equals toc NON NLS 1 node new Toc toc File atts toc File set Toc Toc node else if q Name equals topic NON NLS 1 node new Topic toc File atts else if q Name equals link NON NLS 1 node new Link toc File atts else if q Name equals anchor NON NLS 1 node new Anchor toc File atts else return perhaps throw some exception if element Stack empty Toc Node element Stack peek add Child node element Stack push node do any builder specific actions in the node node build builder  ContentHandler startElement startElement localName qName SAXException TocNode qName tocFile tocFile setToc qName tocFile qName tocFile qName tocFile elementStack TocNode elementStack addChild elementStack
see Content Handler end Element String String String public final void end Element String namespaceURI String local Name String q Name throws SAX Exception element Stack pop  ContentHandler endElement endElement localName qName SAXException elementStack
see Entity Resolver This method implementation prevents loading external entities instead of calling org apache xerces parsers Sax Parser set Feature http apache org xml features nonvalidating load external dtd false public Input Source resolve Entity String public Id String system Id Input Source source new Input Source new Byte Array Input Stream new byte 0 source set Public Id public Id source set System Id system Id return source  EntityResolver SaxParser setFeature InputSource resolveEntity publicId systemId InputSource InputSource ByteArrayInputStream setPublicId publicId setSystemId systemId
private Array List pool new Array List SAX Parser obtain Parser throws Parser Configuration Exception SAX Exception SAX Parser p int free pool size if free 0 p SAX Parser pool remove free 1 else p factory newSAX Parser return p  ArrayList ArrayList SAXParser obtainParser ParserConfigurationException SAXException SAXParser SAXParser newSAXParser
return p void release Parser SAX Parser parser pool add parser  releaseParser SAXParser

Help Navigation Manager constructor public Toc Manager super try tocs By Lang new Hash Map build TO Cs for machine locale at startup Note this can be removed and build on first invocation build Platform getNL catch Exception e Help Plugin log Error e NON NLS 1  HelpNavigationManager TocManager tocsByLang HashMap TOCs HelpPlugin logError
Returns the list of TOC s available in the help system public I Toc Element get Tocs String locale if locale null return new I Toc Element 0 I Toc Element tocs I Toc Element tocs By Lang get locale if tocs null synchronized this if tocs null build locale tocs I Toc Element tocs By Lang get locale one more sanity test if tocs null tocs new I Toc Element 0 return tocs  ITocElement getTocs ITocElement ITocElement ITocElement tocsByLang ITocElement tocsByLang ITocElement
Returns the navigation model for specified toc public I Toc Element get Toc String href String locale if href null href equals NON NLS 1 return null I Toc Element tocs get Tocs locale for int i 0 i tocs length i if tocs i get Href equals href return tocs i return null  ITocElement getToc ITocElement getTocs getHref
Returns the list of contributing Bundle I Ds public Collection get Contributing Plugins if contributing Plugins null get Contributed Toc Files Locale get Default to String return contributing Plugins  IDs getContributingPlugins contributingPlugins getContributedTocFiles getDefault toString contributingPlugins
Builds the toc from the contribution files private void build String locale I Toc tocs try Collection contributed Toc Files get Contributed Toc Files locale Toc Builder builder new Toc Builder builder build contributed Toc Files Collection built Tocs builder get Built Tocs tocs new I Toc Element built Tocs size int i 0 for Iterator it built Tocs iterator it has Next tocs i I Toc Element it next List ordered Tocs order Tocs built Tocs tocs new I Toc Element ordered Tocs size ordered Tocs to Array tocs catch Exception e tocs new I Toc 0 Help Plugin log Error e NON NLS 1 tocs By Lang put locale tocs  IToc contributedTocFiles getContributedTocFiles TocBuilder TocBuilder contributedTocFiles builtTocs getBuiltTocs ITocElement builtTocs builtTocs hasNext ITocElement orderedTocs orderTocs builtTocs ITocElement orderedTocs orderedTocs toArray IToc HelpPlugin logError tocsByLang
Orders the TO Cs according to a product wide preference private List order Tocs Collection unordered Tocs Array List ordered Hrefs get Preferred Toc Order Array List ordered Tocs new Array List unordered Tocs size add the tocs from the preferred order for Iterator it ordered Hrefs iterator it has Next String href String it next I Toc Element toc get Toc unordered Tocs href if toc null ordered Tocs add toc add the remaining tocs for Iterator it unordered Tocs iterator it has Next I Toc Element toc I Toc Element it next if ordered Tocs contains toc ordered Tocs add toc return ordered Tocs  TOCs orderTocs unorderedTocs ArrayList orderedHrefs getPreferredTocOrder ArrayList orderedTocs ArrayList unorderedTocs orderedHrefs hasNext ITocElement getToc unorderedTocs orderedTocs unorderedTocs hasNext ITocElement ITocElement orderedTocs orderedTocs orderedTocs
Reads product ini to determine toc ordering It works in current drivers but will not if location name of product ini change Return the list of href s private Array List get Preferred Toc Order Array List ordered Tocs new Array List try Preferences pref Help Plugin get Default get Plugin Preferences String preferred Tocs pref get String Help Plugin BASE TOCS KEY if preferred Tocs null String Tokenizer suggestd Ordered Infosets new String Tokenizer preferred Tocs NON NLS 1 while suggestd Ordered Infosets has More Elements ordered Tocs add suggestd Ordered Infosets next Element catch Exception e Help Plugin log Error Help Resources get String E039 e NON NLS 1 return ordered Tocs  ArrayList getPreferredTocOrder ArrayList orderedTocs ArrayList HelpPlugin getDefault getPluginPreferences preferredTocs getString HelpPlugin BASE_TOCS_KEY preferredTocs StringTokenizer suggestdOrderedInfosets StringTokenizer preferredTocs suggestdOrderedInfosets hasMoreElements orderedTocs suggestdOrderedInfosets nextElement HelpPlugin logError HelpResources getString orderedTocs
Returns the toc from a list of I Toc by identifying it with its unique href private I Toc Element get Toc Collection list String href for Iterator it list iterator it has Next I Toc Element toc I Toc Element it next if toc get Href equals href return toc return null  IToc ITocElement getToc hasNext ITocElement ITocElement getHref
Returns a collection of Toc File that were not processed protected Collection get Contributed Toc Files String locale contributing Plugins new Hash Set Collection contributed Toc Files new Array List find extension point I Extension Point xpt Platform get Extension Registry get Extension Point Help Plugin PLUGIN ID TOC XP NAME if xpt null return contributed Toc Files get all extensions I Extension extensions xpt get Extensions for int i 0 i extensions length i contributing Plugins add extensions i get Namespace add to Topic Files declared in this extension I Configuration Element config Elements extensions i get Configuration Elements for int j 0 j config Elements length j if config Elements j get Name equals TOC XP NAME String plugin Id config Elements j get Declaring Extension get Namespace String href config Elements j get Attribute file NON NLS 1 boolean is Primary true equals NON NLS 1 config Elements j get Attribute primary NON NLS 1 String extra Dir config Elements j get Attribute extradir NON NLS 1 if href null contributed Toc Files add new Toc File plugin Id href is Primary locale extra Dir return contributed Toc Files  TocFile getContributedTocFiles contributingPlugins HashSet contributedTocFiles ArrayList IExtensionPoint getExtensionRegistry getExtensionPoint HelpPlugin PLUGIN_ID TOC_XP_NAME contributedTocFiles IExtension getExtensions contributingPlugins getNamespace TopicFiles IConfigurationElement configElements getConfigurationElements configElements configElements getName TOC_XP_NAME pluginId configElements getDeclaringExtension getNamespace configElements getAttribute isPrimary configElements getAttribute extraDir configElements getAttribute contributedTocFiles TocFile pluginId isPrimary extraDir contributedTocFiles

Adds another element as child of this element Modifies parents of a child as well public void add Child I Toc Node child if children null children new Array List children add child if child instanceof Toc Node Toc Node child add Parent this  addChild ITocNode ArrayList TocNode TocNode addParent
Adds parent parents of this element called by add Child method protected void add Parent I Toc Node parent if parents null parents new Array List parents add parent  addChild addParent ITocNode ArrayList
Obtains children return I Toc Node List public List get Children if children null return Collections EMPTY LIST return children  ITocNode getChildren EMPTY_LIST
Obtains parents return I Toc Node List protected List get Parents if parents null return Collections EMPTY LIST return parents  ITocNode getParents EMPTY_LIST
return I Topic list public List get Child Topics if children null return Collections EMPTY LIST List child Topics new Array List children size for Iterator children It children iterator children It has Next Toc Node c Toc Node children It next if c instanceof Topic child Topics add c else it is a Toc Anchor or Link which may have children attached to it child Topics add All c get Child Topics return child Topics  ITopic getChildTopics EMPTY_LIST childTopics ArrayList childrenIt childrenIt hasNext TocNode TocNode childrenIt childTopics childTopics addAll getChildTopics childTopics

private I Topic topic Array Constructor protected Topic Toc File toc File Attributes attrs if attrs null return href attrs get Value href NON NLS 1 if href null href length 0 href Href Util normalize Href toc File get PluginID href label attrs get Value label NON NLS 1 if label null throw new Runtime Exception topic label null NON NLS 1 toc File get Toc register Topic this  ITopic topicArray TocFile tocFile getValue HrefUtil normalizeHref tocFile getPluginID getValue RuntimeException tocFile getToc registerTopic
Implements abstract method public final void build Toc Builder builder builder build Topic this  TocBuilder buildTopic
builder build Topic this public String get Href return href  buildTopic getHref
return href public String get Label return label  getLabel
This public method is to be used after the build of TO Cs is finished With assumption that TOC model is not modifiable after the build this method caches subtopics in an array and releases objects used only during build return I Topic list public I Topic get Subtopics if topic Array null List topics get Child Topics create and cache array of children Topics only topic Array new I Topic topics size topics to Array topic Array return topic Array  TOCs ITopic ITopic getSubtopics topicArray getChildTopics topicArray ITopic toArray topicArray topicArray
void set Label String label this label label  setLabel
void set Href String href this href href  setHref
Obtains shortest path leading to this topic in a given TOC param toc return I Topic or null path excludes TOC and includes this topic public I Topic get Path In Toc I Toc toc List of Toc Node ancestors get Topic Path In Toc toc this if ancestors null return null return I Topic ancestors to Array new I Topic ancestors size  ITopic ITopic getPathInToc IToc TocNode getTopicPathInToc ITopic toArray ITopic
Obtains List of ancestors Toc Nodes leading to specific topic or null param toc param topic return List with Toc Elements topic1 topic2 topic static List get Topic Path In Toc I Toc toc Topic topic List topic Parents new Array List topic get Parents for List Iterator it topic Parents list Iterator it has Next Toc Node toc Node Toc Node it next if toc Node instanceof Topic Check if any parent is the needed TOC if toc Node toc success found the correct TOC List ancestors new Array List ancestors add topic return ancestors else substitute real topics for toc link and anchor parent nodes because we are looking for the shortest path List grand Parents toc Node get Parents it remove for Iterator it2 grand Parents iterator it2 has Next it add it2 next it previous for Iterator it topic Parents iterator it has Next delegate to ancestors first List a get Topic Path In Toc toc Topic it next if a null then add this topic to the path a add topic return a return null  TocNodes TocElements getTopicPathInToc IToc topicParents ArrayList getParents ListIterator topicParents listIterator hasNext TocNode tocNode TocNode tocNode tocNode ArrayList grandParents tocNode getParents grandParents hasNext topicParents hasNext getTopicPathInToc

private int last 1 public Fast Stack super  FastStack
public final Object push Object item super add item last return item 
public final Object pop return super remove last 
public final Object peek return super get last 
public final boolean empty return last 0 

public void registry Changed I Registry Change Event event I Extension Delta deltas event get Extension Deltas Help Plugin PLUGIN ID CONTENTPRODUCER XP NAME for int i 0 i deltas length i I Extension extension deltas i get Extension String affected Plugin extension get Namespace reset producer for the affected plugin it will be recreated on demand synchronized content Producers content Producers remove affected Plugin  registryChanged IRegistryChangeEvent IExtensionDelta getExtensionDeltas HelpPlugin PLUGIN_ID CONTENTPRODUCER_XP_NAME IExtension getExtension affectedPlugin getNamespace contentProducers contentProducers affectedPlugin
Obtains content proivider for a documentation plug in creates one if necessary param plugin Id return I Topic Content Provider or null private static I Help Content Producer get Content Producer String plugin Id synchronized content Producers Object producer content Producers get plugin Id if producer null first time for the plug in so attempt to find and instantiate provider producer create Content Producer plugin Id if producer null producer STATIC DOCS ONLY content Producers put plugin Id producer if producer STATIC DOCS ONLY return null else return I Help Content Producer producer  pluginId ITopicContentProvider IHelpContentProducer getContentProducer pluginId contentProducers contentProducers pluginId createContentProducer pluginId STATIC_DOCS_ONLY contentProducers pluginId STATIC_DOCS_ONLY IHelpContentProducer
Creates content proivider for a documentation plug in param plugin Id return I Topic Content Provider or null private static I Help Content Producer create Content Producer String plugin Id I Extension Point xp Platform get Extension Registry get Extension Point CONTENTPRODUCER XP FULLNAME if xp null return null I Extension extensions xp get Extensions for int i 0 i extensions length i if extensions i get Namespace equals plugin Id continue I Configuration Element elements extensions i get Configuration Elements for int j 0 j elements length j if CONTENTPRODUCER XP NAME equals elements j get Name continue try Object o elements j create Executable Extension producer NON NLS 1 if o instanceof I Help Content Producer return I Help Content Producer o catch Core Exception ce Help Plugin log Error Help Resources get String E044 plugin Id ce NON NLS 1 return null  pluginId ITopicContentProvider IHelpContentProducer createContentProducer pluginId IExtensionPoint getExtensionRegistry getExtensionPoint CONTENTPRODUCER_XP_FULLNAME IExtension getExtensions getNamespace pluginId IConfigurationElement getConfigurationElements CONTENTPRODUCER_XP_NAME getName createExecutableExtension IHelpContentProducer IHelpContentProducer CoreException HelpPlugin logError HelpResources getString pluginId
Opens an input stream to a file contained in a plugin This includes NL lookup public static Input Stream open From Producer Bundle plugin Desc String file String locale I Help Content Producer producer get Content Producer plugin Desc get Symbolic Name if producer null return null if locale null locale length 0 locale Platform getNL Locale l if locale length 5 l new Locale locale substring 0 2 locale substring 3 5 else if locale length 2 l new Locale locale substring 0 2 NON NLS 1 else l Locale get Default return producer get Input Stream plugin Desc get Symbolic Name file l  InputStream openFromProducer pluginDesc IHelpContentProducer getContentProducer pluginDesc getSymbolicName getDefault getInputStream pluginDesc getSymbolicName
Opens an input stream to a file contained in a plugin This includes NL lookup public static Input Stream open From Plugin String plugin Id String file String locale Bundle bundle Platform get Bundle plugin Id if bundle null return open From Plugin Platform get Bundle plugin Id file locale else return null  InputStream openFromPlugin pluginId getBundle pluginId openFromPlugin getBundle pluginId
Opens an input stream to a file contained in a zip in a plugin This includes NL lookup public static Input Stream open From Zip Bundle plugin Desc String zip String file String locale First try the NL lookup Input Stream is do Open From Zip plugin Desc nl zip file locale NON NLS 1 if is null Default location plugin doc zip is do Open From Zip plugin Desc zip file locale return is  InputStream openFromZip pluginDesc InputStream doOpenFromZip pluginDesc doOpenFromZip pluginDesc
Opens an input stream to a file contained in a plugin This includes NL lookup public static Input Stream open From Plugin Bundle plugin Desc String file String locale Input Stream is do Open From Plugin plugin Desc nl file locale NON NLS 1 if is null Default location is do Open From Plugin plugin Desc file locale return is  InputStream openFromPlugin pluginDesc InputStream doOpenFromPlugin pluginDesc doOpenFromPlugin pluginDesc
Opens an input stream to a file contained in doc zip in a plugin private static Input Stream do Open From Zip Bundle plugin Desc String zip String file String locale String real ZipURL find Zip plugin Desc zip locale if real ZipURL null return null try URL jurl new URL jar real ZipURL file NON NLS 1 NON NLS 2 NON NLS 3 URL Connection jconnection jurl open Connection jconnection set Default Use Caches false jconnection set Use Caches false return jconnection get Input Stream catch IO Exception ioe return null  InputStream doOpenFromZip pluginDesc realZipURL findZip pluginDesc realZipURL realZipURL URLConnection openConnection setDefaultUseCaches setUseCaches getInputStream IOException
Opens an input stream to a file contained in a plugin private static Input Stream do Open From Plugin Bundle plugin Desc String file String locale I Path flat File Path new Path file Map override new Hash Map 1 override put nl locale NON NLS 1 URL flat FileURL Platform find plugin Desc flat File Path override if flat FileURL null try return flat FileURL open Stream catch IO Exception e return null return null  InputStream doOpenFromPlugin pluginDesc IPath flatFilePath HashMap flatFileURL pluginDesc flatFilePath flatFileURL flatFileURL openStream IOException
param plugin Desc param zip zip file path as required by Plugin find param locale return String form of resolved URL of a zip or null private static String find Zip Bundle plugin Desc String zip String locale String pluginID plugin Desc get Symbolic Name check cache Map cache zip Cache Object cached cache get pluginID zip locale if cached null not in cache find on filesystem I Path zip File Path new Path zip Map override new Hash Map 1 override put nl locale NON NLS 1 try URL zip FileURL Platform find plugin Desc zip File Path override PASCAL This will not activate the plugin if zip FileURL null URL real ZipURL Platform as LocalURL Platform resolve zip FileURL cached real ZipURL to External Form else cached ZIP NOT FOUND catch IO Exception ioe cached ZIP NOT FOUND cache it cache put pluginID zip locale cached if cached ZIP NOT FOUND return null return String cached  pluginDesc findZip pluginDesc pluginDesc getSymbolicName zipCache IPath zipFilePath HashMap zipFileURL pluginDesc zipFilePath zipFileURL realZipURL asLocalURL zipFileURL realZipURL toExternalForm ZIP_NOT_FOUND IOException ZIP_NOT_FOUND ZIP_NOT_FOUND
return String cached public static void clear Zip Cache zip Cache new Hashtable  clearZipCache zipCache

public class URL Coder public static String encode String s try return url Encode s get Bytes UTF8 NON NLS 1 catch Unsupported Encoding Exception uee return null  URLCoder urlEncode getBytes UnsupportedEncodingException
public static String decode String s try return new String url Decode s UTF8 NON NLS 1 catch Unsupported Encoding Exception uee return null  urlDecode UnsupportedEncodingException
private static String url Encode byte data String Buffer buf new String Buffer data length for int i 0 i data length i buf append buf append Character for Digit data i 240 4 16 buf append Character for Digit data i 15 16 return buf to String  urlEncode StringBuffer StringBuffer forDigit forDigit toString
private static byte url Decode String encodedURL int len encodedURL length Byte Array Output Stream os new Byte Array Output Stream len for int i 0 i len switch encodedURL char At i case if len i 3 os write Integer parse Int encodedURL substring i 1 i 3 16 i 3 break case exception from standard os write i break default os write encodedURL char At i break return os to Byte Array  urlDecode ByteArrayOutputStream ByteArrayOutputStream charAt parseInt charAt toByteArray

public class Activities Data extends Request Data Constructs the data for a request param context param request public Activities Data Servlet Context context Http Servlet Request request Http Servlet Response response super context request response String change Show All request get Parameter show All NON NLS 1 if change Show All null if off equals Ignore Case change Show All NON NLS 1 Help Base Plugin get Activity Support set Filtering Enabled true else if on equals Ignore Case change Show All NON NLS 1 Help Base Plugin get Activity Support set Filtering Enabled false else not supported value else no change to afilter String confirm Show All request get Parameter showconfirm NON NLS 1 if false equals Ignore Case confirm Show All NON NLS 1 preferences set Dont Confirm Show All true  ActivitiesData RequestData ActivitiesData ServletContext HttpServletRequest HttpServletResponse changeShowAll getParameter showAll changeShowAll equalsIgnoreCase changeShowAll HelpBasePlugin getActivitySupport setFilteringEnabled equalsIgnoreCase changeShowAll HelpBasePlugin getActivitySupport setFilteringEnabled confirmShowAll getParameter equalsIgnoreCase confirmShowAll setDontConfirmShowAll
return Checks if filtering is enabled public boolean is Activity Filtering return Help Base Plugin get Activity Support is Filtering Enabled  isActivityFiltering HelpBasePlugin getActivitySupport isFilteringEnabled
Gives state of show all topics button return hidden off or on public String get Button State if Help Base Plugin get Activity Support is User Can Toggle Filtering return hidden NON NLS 1 else if Help Base Plugin get Activity Support is Filtering Enabled return off NON NLS 1 else return on NON NLS 1  getButtonState HelpBasePlugin getActivitySupport isUserCanToggleFiltering HelpBasePlugin getActivitySupport isFilteringEnabled

public Bookmarks Data Servlet Context context Http Servlet Request request Http Servlet Response response super context request response switch get Operation case ADD add Bookmark break case REMOVE remove Bookmark break case REMOVE ALL remove All Bookmarks break default break  BookmarksData ServletContext HttpServletRequest HttpServletResponse getOperation addBookmark removeBookmark REMOVE_ALL removeAllBookmarks
public void add Bookmark String bookmarkURL request get Parameter bookmark NON NLS 1 if bookmarkURL null bookmarkURL length 0 bookmarkURL equals about blank NON NLS 1 String title request get Parameter title NON NLS 1 if title null return Preferences prefs Help Base Plugin get Default get Plugin Preferences String bookmarks prefs get String Base Help System BOOKMARKS separate the url and title by vertical bar check for duplicates if bookmarks index Of encode bookmarkURL 1 NON NLS 1 NON NLS 2 return bookmarks bookmarks encode bookmarkURL encode title NON NLS 1 NON NLS 2 prefs set Value Base Help System BOOKMARKS bookmarks Help Base Plugin get Default save Plugin Preferences  addBookmark getParameter getParameter HelpBasePlugin getDefault getPluginPreferences getString BaseHelpSystem indexOf setValue BaseHelpSystem HelpBasePlugin getDefault savePluginPreferences
public void remove Bookmark String bookmarkURL request get Parameter bookmark NON NLS 1 if bookmarkURL null bookmarkURL length 0 bookmarkURL equals about blank NON NLS 1 String title request get Parameter title NON NLS 1 if title null return Preferences prefs Help Base Plugin get Default get Plugin Preferences String bookmarks prefs get String Base Help System BOOKMARKS String remove String encode bookmarkURL encode title NON NLS 1 NON NLS 2 int i bookmarks index Of remove String if i 1 return bookmarks bookmarks substring 0 i bookmarks substring i remove String length prefs set Value Base Help System BOOKMARKS bookmarks Help Base Plugin get Default save Plugin Preferences  removeBookmark getParameter getParameter HelpBasePlugin getDefault getPluginPreferences getString BaseHelpSystem removeString indexOf removeString removeString setValue BaseHelpSystem HelpBasePlugin getDefault savePluginPreferences
public void remove All Bookmarks Preferences prefs Help Base Plugin get Default get Plugin Preferences prefs set Value Base Help System BOOKMARKS NON NLS 1 Help Base Plugin get Default save Plugin Preferences  removeAllBookmarks HelpBasePlugin getDefault getPluginPreferences setValue BaseHelpSystem HelpBasePlugin getDefault savePluginPreferences
public Topic get Bookmarks sanity test for infocenter but this could not work anyway if Base Help System get Mode Base Help System MODE INFOCENTER this is workbench Preferences prefs Help Base Plugin get Default get Plugin Preferences String bookmarks prefs get String Base Help System BOOKMARKS String Tokenizer tokenizer new String Tokenizer bookmarks NON NLS 1 Topic topics new Topic tokenizer count Tokens for int i 0 tokenizer has More Tokens i String bookmark tokenizer next Token url and title are separated by vertical bar int separator bookmark index Of String label decode bookmark substring separator 1 String href separator 0 NON NLS 1 decode bookmark substring 0 separator topics i new Topic label href return topics return new Topic 0  getBookmarks BaseHelpSystem getMode BaseHelpSystem MODE_INFOCENTER HelpBasePlugin getDefault getPluginPreferences getString BaseHelpSystem StringTokenizer StringTokenizer countTokens hasMoreTokens nextToken indexOf
private int get Operation String op request get Parameter operation NON NLS 1 if add equals op NON NLS 1 return ADD else if remove equals op NON NLS 1 return REMOVE else if remove All equals op NON NLS 1 return REMOVE ALL else return NONE  getOperation getParameter removeAll REMOVE_ALL
Ensures that string does not contains or characters param s return String private static String encode String s s T String change s escape NON NLS 1 NON NLS 2 s T String change s comma NON NLS 1 NON NLS 2 return T String change s pipe NON NLS 1 NON NLS 2  TString TString TString
private static String decode String s s T String change s pipe NON NLS 1 NON NLS 2 s T String change s comma NON NLS 1 NON NLS 2 return T String change s escape NON NLS 1 NON NLS 2  TString TString TString

public Layout Data Servlet Context context Http Servlet Request request Http Servlet Response response super context request response initialize the query string String qs request get Query String if qs null qs length 0 query qs NON NLS 1  LayoutData ServletContext HttpServletRequest HttpServletResponse getQueryString
public String get Query return query  getQuery
public String get BannerURL String banner preferences get Banner if banner null banner trim length 0 banner about blank NON NLS 1 else if banner starts With http NON NLS 1 else if banner starts With file banner starts With jar file NON NLS 1 NON NLS 2 banner topic banner NON NLS 1 else banner topic banner NON NLS 1 return banner  getBannerURL getBanner startsWith startsWith startsWith
public String get Banner Height String height preferences get Banner Height if height null height length 0 height 0 NON NLS 1 return height  getBannerHeight getBannerHeight
public String get ContentURL Toc Data toc Data new Toc Data context request response String topic toc Data get Selected Topic String help home preferences get Help Home if topic null help home topic else help home Url Util get HelpURL help home return help home  getContentURL TocData tocData TocData tocData getSelectedTopic help_home getHelpHome help_home help_home UrlUtil getHelpURL help_home help_home
Return array of length 0 if no views public View get Views if views null return views View tocview new View toc NON NLS 1 NON NLS 1 preferences get Images Directory contents view gif NON NLS 1 View searchview new View search NON NLS 1 NON NLS 1 preferences get Images Directory search results view gif NON NLS 1 View linksview null View bookmarksview null if preferences is Links View linksview new View links NON NLS 1 NON NLS 1 preferences get Images Directory links view gif NON NLS 1 if preferences is Bookmarks View bookmarksview new View bookmarks NON NLS 1 NON NLS 1 preferences get Images Directory bookmarks view gif NON NLS 1 if linksview null bookmarksview null views new View tocview searchview linksview bookmarksview else if linksview null views new View tocview searchview linksview else if bookmarksview null views new View tocview searchview bookmarksview else views new View tocview searchview return views  getViews getImagesDirectory contents_view getImagesDirectory search_results_view isLinksView getImagesDirectory links_view isBookmarksView getImagesDirectory bookmarks_view
public String get Visible View String requested View request get Parameter tab NON NLS 1 View all Views get Views for int i 0 i all Views length i if all Views i get Name equals requested View return requested View return toc NON NLS 1  getVisibleView requestedView getParameter allViews getViews allViews allViews getName requestedView requestedView
public View get Current View String name request get Parameter view NON NLS 1 views get Views for int i 0 i views length i if views i get Name equals name return views i return null  getCurrentView getParameter getViews getName
public String get Window Title if preferences is Window Title Prefix return Servlet Resources get String browser Title NON NLS 1 Base Help System get Product Name request else return Base Help System get Product Name  getWindowTitle isWindowTitlePrefix ServletResources getString browserTitle BaseHelpSystem getProductName BaseHelpSystem getProductName

Constructs data for the links page param context param request public Links Data Servlet Context context Http Servlet Request request Http Servlet Response response super context request response this topic Href request get Parameter topic NON NLS 1 if topic Href null topic Href length 0 topic Href null if is Links Request load Links  LinksData ServletContext HttpServletRequest HttpServletResponse topicHref getParameter topicHref topicHref topicHref isLinksRequest loadLinks
Returns true when there is a search request return boolean public boolean is Links Request return request get Parameter context Id null NON NLS 1  isLinksRequest getParameter contextId
Return the number of links return int public int get Links Count return links length  getLinksCount
public String get Selected Topic Id return selected Topic Id  getSelectedTopicId selectedTopicId
public String get Topic Href int i return Url Util get HelpURL links i get Href  getTopicHref UrlUtil getHelpURL getHref
public String get Topic Label int i return Url Util html Encode links i get Label  getTopicLabel UrlUtil htmlEncode getLabel
public String get Topic Toc Label int i I Toc toc find Toc For Topic links i get Href if toc null return Url Util html Encode toc get Label else return NON NLS 1  getTopicTocLabel IToc findTocForTopic getHref UrlUtil htmlEncode getLabel
Finds a topic in a toc or within a scope if specified private I Toc find Toc For Topic String href I Toc tocs Help Plugin get Toc Manager get Tocs get Locale for int i 0 i tocs length i I Topic topic tocs i get Topic href if topic null return tocs i return null  IToc findTocForTopic IToc HelpPlugin getTocManager getTocs getLocale ITopic getTopic
private void load Links String context Id request get Parameter context Id NON NLS 1 I Context context Help System get Context context Id if context null links new I Help Resource 0 return links context get Related Topics if links null links new I Help Resource 0 return for int i 0 i links length i the following assume topic numbering as in links View jsp if links i get Href equals topic Href selected Topic Id a i NON NLS 1 break  loadLinks contextId getParameter contextId IContext HelpSystem getContext contextId IHelpResource getRelatedTopics IHelpResource linksView getHref topicHref selectedTopicId

protected boolean advancedUI Constructs the data for a request param context param request public Request Data Servlet Context context Http Servlet Request request Http Servlet Response response this context context this request request this response response preferences new Webapp Preferences locale Url Util get Locale request response advancedUI isIE 5 5 compare To getIE Version 0 is Mozilla is Gecko is Safari 120 compare To get Safari Version 0  RequestData ServletContext HttpServletRequest HttpServletResponse WebappPreferences UrlUtil getLocale compareTo getIEVersion isMozilla isGecko isSafari compareTo getSafariVersion
Returns the preferences object public Webapp Preferences get Prefs return preferences  WebappPreferences getPrefs
public boolean is Gecko return Url Util is Gecko request  isGecko UrlUtil isGecko
public boolean isIE return Url Util isIE request  UrlUtil
public String getIE Version return Url Util getIE Version request  getIEVersion UrlUtil getIEVersion
public boolean is Konqueror return Url Util is Konqueror request  isKonqueror UrlUtil isKonqueror
public boolean is Mozilla return Url Util is Mozilla request  isMozilla UrlUtil isMozilla
public String get Mozilla Version return Url Util get Mozilla Version request  getMozillaVersion UrlUtil getMozillaVersion
public boolean is Safari return Url Util is Safari request  isSafari UrlUtil isSafari
public String get Safari Version return Url Util get Safari Version request  getSafariVersion UrlUtil getSafariVersion
public boolean is Opera return Url Util is Opera request  isOpera UrlUtil isOpera
public String get Locale return locale  getLocale
public int get Mode return Base Help System get Mode  getMode BaseHelpSystem getMode
return Base Help System get Mode public boolean is AdvancedUI return advancedUI  BaseHelpSystem getMode isAdvancedUI

Constructs the xml data for the search resuls page param context param request public Search Data Servlet Context context Http Servlet Request request Http Servlet Response response super context request response wsmgr new Webapp Working Set Manager request response get Locale this topic Href request get Parameter topic NON NLS 1 if topic Href null topic Href length 0 topic Href null search Word request get Parameter search Word NON NLS 1 try loading search results or get the indexing progress info if is Search Request is Scope Request load Search Results if query Exception null return if is Progress Request for int i 0 i hits length i the following assume topic numbering as in search View jsp if hits i get Href equals topic Href selected Topic Id a i NON NLS 1 break  SearchData ServletContext HttpServletRequest HttpServletResponse WebappWorkingSetManager getLocale topicHref getParameter topicHref topicHref topicHref searchWord getParameter searchWord isSearchRequest isScopeRequest loadSearchResults queryException isProgressRequest searchView getHref topicHref selectedTopicId
Returns true when there is a search request return boolean public boolean is Search Request return request get Parameter search Word null NON NLS 1  isSearchRequest getParameter searchWord
Return indexed completion percentage public boolean is Progress Request return hits null index Completion 100  isProgressRequest indexCompletion
Returns true when there is a request to change the scope working set public boolean is Scope Request return request get Parameter working Set null NON NLS 1  isScopeRequest getParameter workingSet
Return the number of links return int public int get Results Count return hits length  getResultsCount
public String get Selected Topic Id return selected Topic Id  getSelectedTopicId selectedTopicId
public String get Topic Href int i return Url Util get HelpURL hits i get Href  getTopicHref UrlUtil getHelpURL getHref
public String get Topic Label int i return Url Util html Encode hits i get Label  getTopicLabel UrlUtil htmlEncode getLabel
public String get Topic Score int i try float score hits i get Score Number Format percent Format Number Format get Percent Instance Url Util get Locale Obj request response return percent Format format score catch Number Format Exception nfe will display original score string return String value Of hits i get Score  getTopicScore getScore NumberFormat percentFormat NumberFormat getPercentInstance UrlUtil getLocaleObj percentFormat NumberFormatException valueOf getScore
public String get Topic Toc Label int i if hits i get Toc null return Url Util html Encode hits i get Toc get Label else return NON NLS 1  getTopicTocLabel getToc UrlUtil htmlEncode getToc getLabel
param i return true of result belong to an enabled TOC public boolean is Enabled int i String href hits i get Href return Help Base Plugin get Activity Support is Enabled Topic href get Locale  isEnabled getHref HelpBasePlugin getActivitySupport isEnabledTopic getLocale
Return indexed completion percentage public String get Indexed Percentage return String value Of index Completion  getIndexedPercentage valueOf indexCompletion
Returns the search query public String get Search Word if search Word null return NON NLS 1 else return search Word  getSearchWord searchWord searchWord
Returns the list of selected TOC s public String get Selected Tocs String books request get Parameter Values scope NON NLS 1 if books null select all books Toc Data toc Data new Toc Data context request response books new String toc Data get Toc Count for int i 0 i books length i books i toc Data get Toc Href i return books  getSelectedTocs getParameterValues TocData tocData TocData tocData getTocCount tocData getTocHref
Returns true if book is within a search scope public boolean is Toc Selected int toc Toc Data toc Data new Toc Data context request response String href toc Data get Toc Href toc String books request get Parameter Values scope NON NLS 1 if books null return false for int i 0 i books length i if books i equals href return true return false  isTocSelected TocData tocData TocData tocData getTocHref getParameterValues
Returns the working set selected This is used to display the working set name in the search banner return String public String get Scope if working Set Name null return working Set Name if is Scope Request working Set Name request get Parameter working Set NON NLS 1 else if is Search Request working Set Name request get Parameter scope NON NLS 1 if we have already set the working set then use it if working Set Name null working Set Name request get Parameter working Set NON NLS 1 else working Set Name wsmgr get Current Working Set if working Set Name null working Set Name length 0 get Mode Request Data MODE INFOCENTER wsmgr get Working Set working Set Name null working Set Name Servlet Resources get String All request NON NLS 1 return working Set Name  getScope workingSetName workingSetName isScopeRequest workingSetName getParameter workingSet isSearchRequest workingSetName getParameter workingSetName workingSetName getParameter workingSet workingSetName getCurrentWorkingSet workingSetName workingSetName getMode RequestData MODE_INFOCENTER getWorkingSet workingSetName workingSetName ServletResources getString workingSetName
This method is used to persist the working set name and is called from the search view after each search public void save Scope if a working set is defined set it in the preferences String working Set request get Parameter scope NON NLS 1 String lastWS wsmgr get Current Working Set if working Set null working Set equals lastWS wsmgr set Current Working Set working Set else if working Set null lastWS null lastWS length 0 wsmgr set Current Working Set NON NLS 1  saveScope workingSet getParameter getCurrentWorkingSet workingSet workingSet setCurrentWorkingSet workingSet workingSet setCurrentWorkingSet
Call the search engine and get results or the percentage of indexed documents private void load Search Results try Search Progress Monitor pm Search Progress Monitor get Progress Monitor get Locale if pm is Done this index Completion 100 Search Results results create Hit Collector Base Help System get Search Manager search create Search Query results pm hits results get Search Hits if hits null Help Webapp Plugin log Error Help Base Resources get String index is busy NON NLS 1 null return else progress index Completion pm get Percentage if index Completion 100 38573 We do not have results so index cannot be 100 index Completion 100 1 return catch Query Too Complex Exception qe query Exception qe catch Exception e this index Completion 0  loadSearchResults SearchProgressMonitor SearchProgressMonitor getProgressMonitor getLocale isDone indexCompletion SearchResults createHitCollector BaseHelpSystem getSearchManager createSearchQuery getSearchHits HelpWebappPlugin logError HelpBaseResources getString index_is_busy indexCompletion getPercentage indexCompletion indexCompletion QueryTooComplexException queryException indexCompletion
private I Search Query create Search Query String field Search Str request get Parameter field Search NON NLS 1 boolean field Search field Search Str null new Boolean field Search Str boolean Value false return new Search Query search Word field Search new Array List get Locale  ISearchQuery createSearchQuery fieldSearchStr getParameter fieldSearch fieldSearch fieldSearchStr fieldSearchStr booleanValue SearchQuery searchWord fieldSearch ArrayList getLocale
private Search Results create Hit Collector Working Set working Sets if request get Parameter Values scoped Search null NON NLS 1 scopes are working set names working Sets get Working Sets else scopes are books advanced search working Sets create Temp Working Sets int max Hits 500 String max Hits Str request get Parameter max Hits NON NLS 1 if max Hits Str null try int clientmax Hits Integer parse Int max Hits Str if 0 clientmax Hits clientmax Hits 500 max Hits clientmax Hits catch Number Format Exception nfe return new Search Results working Sets max Hits get Locale  SearchResults createHitCollector WorkingSet workingSets getParameterValues scopedSearch workingSets getWorkingSets workingSets createTempWorkingSets maxHits maxHitsStr getParameter maxHits maxHitsStr clientmaxHits parseInt maxHitsStr clientmaxHits clientmaxHits maxHits clientmaxHits NumberFormatException SearchResults workingSets maxHits getLocale
return Working Set or null private Working Set get Working Sets String scopes request get Parameter Values scope NON NLS 1 if scopes null return null confirm working set exists and use it Array List working Set Col new Array List scopes length for int s 0 s scopes length s Working Set ws wsmgr get Working Set scopes s if ws null working Set Col add ws if working Set Col size 0 return null return Working Set working Set Col to Array new Working Set working Set Col size  WorkingSet WorkingSet getWorkingSets getParameterValues ArrayList workingSetCol ArrayList WorkingSet getWorkingSet workingSetCol workingSetCol WorkingSet workingSetCol toArray WorkingSet workingSetCol
return Working Set or null private Working Set create Temp Working Sets String scopes request get Parameter Values scope NON NLS 1 if scopes null it is possible that filtering is used but all books are deselected return new Working Set 0 if scopes length Help Plugin get Toc Manager get Tocs get Locale length do not filter if all books are selected return null create working set from books Array List tocs new Array List scopes length for int s 0 s scopes length s Adaptable Toc toc wsmgr get Adaptable Toc scopes s if toc null tocs add toc Adaptable Toc adaptable Tocs Adaptable Toc tocs to Array new Adaptable Toc tocs size Working Set working Sets new Working Set 1 working Sets 0 wsmgr create Working Set temp adaptable Tocs NON NLS 1 return working Sets  WorkingSet WorkingSet createTempWorkingSets getParameterValues WorkingSet HelpPlugin getTocManager getTocs getLocale ArrayList ArrayList AdaptableToc getAdaptableToc AdaptableToc adaptableTocs AdaptableToc toArray AdaptableToc WorkingSet workingSets WorkingSet workingSets createWorkingSet adaptableTocs workingSets
public String get Query Exception Message if query Exception null return null return Servlet Resources get String search Too Complex request NON NLS 1  getQueryExceptionMessage queryException ServletResources getString searchTooComplex

Resources constructor protected Servlet Resources super  ServletResources
Returns a string from a property file It uses name as a the key to retrieve from the webapp properties file param request Http Servlet Request or null default locale will be used if null passed public static String get String String name Http Servlet Request request String property Webapp Resources get String name Url Util get Locale Obj request null if property null property length 0 return property int amp property index Of if amp 0 return property return property substring 0 amp property substring amp 1 property length  HttpServletRequest getString HttpServletRequest WebappResources getString UrlUtil getLocaleObj indexOf
Returns a string from a property file It uses name as a the key to retrieve from the webapp properties file param request Http Servlet Request or null default locale will be used if null passed public static String get String String name String replace0 Http Servlet Request request String property Webapp Resources get String name Url Util get Locale Obj request null replace0 if property null property length 0 return property int amp property index Of if amp 0 return property return property substring 0 amp 1 property substring amp 1 property length  HttpServletRequest getString HttpServletRequest WebappResources getString UrlUtil getLocaleObj indexOf
Returns a string from a property file with underlined access key Access key can be specified in the label by amp character following character in the label that is to serve as access key It uses name as a the key to retrieve from the webapp properties file param request Http Servlet Request or null default locale will be used if null passed public static String get Label String name Http Servlet Request request String property Webapp Resources get String name Url Util get Locale Obj request null if property null property length 0 return property int amp property index Of if amp 0 return property return property substring 0 amp 1 u STYLE ACCELERATOR true NON NLS 1 property char At amp 1 u NON NLS 1 property substring amp 1 property length  HttpServletRequest getLabel HttpServletRequest WebappResources getString UrlUtil getLocaleObj indexOf charAt
Returns access key for a named label from property file It uses name as a the key to retrieve from the webapp properties file param request Http Servlet Request or null default locale will be used if null passed public static String get Access Key String name Http Servlet Request request String property Webapp Resources get String name Url Util get Locale Obj request null if property null property length 0 return null int amp property index Of if amp 0 return null return property char At amp 1 to Lower Case NON NLS 1  HttpServletRequest getAccessKey HttpServletRequest WebappResources getString UrlUtil getLocaleObj indexOf charAt toLowerCase

Constructs the xml data for the contents page param context param request public Toc Data Servlet Context context Http Servlet Request request Http Servlet Response response super context request response if dynamic Load Depths 1 Webapp Preferences pref new Webapp Preferences load Book At Once Limit pref get Book At Once Limit dynamic Load Depths pref get Load Depth honor Levels Limit load Book At Once Limit 4 this toc Href request get Parameter toc NON NLS 1 this topic Href request get Parameter topic NON NLS 1 if toc Href null toc Href length 0 toc Href null if topic Href null topic Href length 0 topic Href null initialize root Path String path Str request get Parameter path NON NLS 1 if path Str null path Str length 0 String paths path Str split   1 NON NLS 1 int indexes new int paths length boolean indexesOK true for int i 0 i paths length i try indexes i Integer parse Int paths i catch Number Format Exception nfe indexesOK false break if indexesOK root Path indexes images Directory preferences get Images Directory load Tocs  TocData ServletContext HttpServletRequest HttpServletResponse dynamicLoadDepths WebappPreferences WebappPreferences loadBookAtOnceLimit getBookAtOnceLimit dynamicLoadDepths getLoadDepth honorLevelsLimit loadBookAtOnceLimit tocHref getParameter topicHref getParameter tocHref tocHref tocHref topicHref topicHref topicHref rootPath pathStr getParameter pathStr pathStr pathStr _ parseInt NumberFormatException rootPath imagesDirectory getImagesDirectory loadTocs
and allow help classes in JSP s public int get Toc Count return tocs length  getTocCount
public String get Toc Label int i return tocs i get Label  getTocLabel getLabel
public String get Toc Href int i return tocs i get Href  getTocHref getHref
public String get Toc Description Topic int i return Url Util get HelpURL tocs i get Topic null get Href  getTocDescriptionTopic UrlUtil getHelpURL getTopic getHref
Returns the selected TOC return int public int get Selected Toc return selected Toc  getSelectedToc selectedToc
Returns the topic to display If there is a TOC return its topic description Return null if no topic is specified and there is no toc description return String public String get Selected Topic if topic Href null topic Href length 0 return Url Util get HelpURL topic Href else if selected Toc 1 return null I Toc toc tocs selected Toc I Topic toc Description toc get Topic null if toc Description null return Url Util get HelpURL toc Description get Href else return Url Util get HelpURL null  getSelectedTopic topicHref topicHref UrlUtil getHelpURL topicHref selectedToc IToc selectedToc ITopic tocDescription getTopic tocDescription UrlUtil getHelpURL tocDescription getHref UrlUtil getHelpURL
Returns a list of all the TOC s as xml elements Individual TOC s are not loaded yet return Element public I Toc Element get Tocs return tocs  ITocElement getTocs
Check if given TOC is visible belongs to an enabled activity param toc return true if TOC should be visible public boolean is Enabled int toc if is Enabled tocs toc return false do not generate toc when there are no leaf topics return get Enabled Subtopic List tocs toc size 0  isEnabled isEnabled getEnabledSubtopicList
Check if given TOC is visible belongs to an enabled activity param toc return true if TOC should be visible private boolean is Enabled I Toc Element toc if is AdvancedUI activities never filtered for basic browsers return true return Help Base Plugin get Activity Support is Enabled toc get Href  isEnabled ITocElement isAdvancedUI HelpBasePlugin getActivitySupport isEnabled getHref
private void load Tocs tocs Help Plugin get Toc Manager get Tocs get Locale Find the requested TOC selected Toc 1 if toc Href null toc Href length 0 tocs get Tocs for int i 0 selected Toc 1 i tocs length i if toc Href equals tocs i get Href selected Toc i else try obtaining the TOC from the topic selected Toc find Toc Containing Topic topic Href I Topic topic find Topic if topic null topic instanceof org eclipse help internal toc Topic topic Path org eclipse help internal toc Topic topic get Path In Toc tocs selected Toc  loadTocs HelpPlugin getTocManager getTocs getLocale selectedToc tocHref tocHref getTocs selectedToc tocHref getHref selectedToc selectedToc findTocContainingTopic topicHref ITopic findTopic topicPath getPathInToc selectedToc
Finds a TOC that contains specified topic param topic the topic href private int find Toc Containing Topic String topic if topic null topic equals NON NLS 1 return 1 int index topic index Of topic NON NLS 1 if index 1 topic topic substring index 6 index topic index Of if index 1 topic topic substring 0 index if topic null topic equals NON NLS 1 return 1 tocs get Tocs try to find in enabled tocs first for int i 0 i tocs length i if is Enabled i if tocs i get Topic topic null return i try disabled tocs second for int i 0 i tocs length i if is Enabled i if tocs i get Topic topic null return i nothing found return 1  findTocContainingTopic indexOf indexOf getTocs isEnabled getTopic isEnabled getTopic
Finds topic in a TOC return I Topic or null private I Topic find Topic String topic get Selected Topic if topic null topic equals NON NLS 1 return null int index topic index Of topic NON NLS 1 if index 1 topic topic substring index 6 index topic index Of if index 1 topic topic substring 0 index if topic null topic equals NON NLS 1 return null if get Selected Toc 0 return null I Toc selected Toc get Tocs get Selected Toc if selected Toc null return null return selected Toc get Topic topic  ITopic ITopic findTopic getSelectedTopic indexOf indexOf getSelectedToc IToc selectedToc getTocs getSelectedToc selectedToc selectedToc getTopic
Generates the HTML code a tree for a TOC param toc param out throws IO Exception public void generate Toc int toc Writer out throws IO Exception I Topic Element topics get Enabled Subtopics tocs toc if topics length 0 do not generate toc when there are no leaf topics return int max Levels dynamic Load Depths if tocs toc instanceof Toc Toc tocs toc size load Book At Once Limit max Levels 1 Construct ID of subtree root String Buffer id new String Buffer if root Path null navigate to root topic skipping parents for int p 0 p root Path length p if id length 0 id append   topics get Enabled Subtopics topics root Path p id append root Path p out write ul class expanded id id to String n NON NLS 1 NON NLS 2 for int i 0 i topics length i String id Prefix id to String if id Prefix length 0 id Prefix id Prefix   Integer to String i NON NLS 1 else id Prefix Integer to String i generate Topic topics i out id Prefix max Levels root Path null 0 root Path length if root Path null out write ul n NON NLS 1  IOException generateToc IOException ITopicElement getEnabledSubtopics maxLevels dynamicLoadDepths loadBookAtOnceLimit maxLevels StringBuffer StringBuffer rootPath rootPath _ getEnabledSubtopics rootPath rootPath toString idPrefix toString idPrefix idPrefix idPrefix _ toString idPrefix toString generateTopic idPrefix maxLevels rootPath rootPath rootPath
param topic param out param max Levels relative number of topic levels to generate pass 0 for inifinite 1 generates this topic as last level topic param current Level current level of topic 0 is first Level under TOC throws IO Exception private void generate Topic I Topic Element topic Writer out String id int max Levels int current Level throws IO Exception if max Levels 0 return topics Generated if max Levels 1 topics Generated honor Levels Limit max Levels 1 I Topic Element topics get Enabled Subtopics topic boolean has Nodes topics length 0 if has Nodes out write li NON NLS 1 out write img src NON NLS 1 out write images Directory out write plus gif class collapsed alt Servlet Resources get String topic Closed request NON NLS 1 NON NLS 2 NON NLS 3 out write a href Url Util get HelpURL topic get Href NON NLS 1 NON NLS 2 out write img src NON NLS 1 out write images Directory out write container obj gif alt NON NLS 1 out write Url Util html Encode topic get Label out write a NON NLS 1 is it ancestor of topic to reveal boolean is Ancestor topic Path null topic Path length current Level 1 topic Path current Level topic if max Levels 1 is Ancestor out write ul class collapsed n NON NLS 1 else children will not be generated out write ul class collapsed id id n NON NLS 1 NON NLS 2 if 1 max Levels max Levels dynamic Load Depths is Ancestor ignore max levels show children for int i 0 i topics length i generate Topic topics i out id   i NON NLS 1 dynamic Load Depths current Level 1 else for int i 0 i topics length i generate Topic topics i out id   i NON NLS 1 max Levels 1 current Level 1 out write ul n NON NLS 1 else out write li NON NLS 1 out write img src NON NLS 1 out write images Directory out write plus gif class h alt NON NLS 1 out write a href Url Util get HelpURL topic get Href NON NLS 1 NON NLS 2 out write img src NON NLS 1 out write images Directory out write topic gif alt NON NLS 1 out write Url Util html Encode topic get Label out write a NON NLS 1 out write li n NON NLS 1  maxLevels currentLevel IOException generateTopic ITopicElement maxLevels currentLevel IOException maxLevels topicsGenerated maxLevels topicsGenerated honorLevelsLimit maxLevels ITopicElement getEnabledSubtopics hasNodes hasNodes imagesDirectory ServletResources getString topicClosed UrlUtil getHelpURL getHref imagesDirectory container_obj UrlUtil htmlEncode getLabel isAncestor topicPath topicPath currentLevel topicPath currentLevel maxLevels isAncestor maxLevels maxLevels dynamicLoadDepths isAncestor generateTopic _ dynamicLoadDepths currentLevel generateTopic _ maxLevels currentLevel imagesDirectory UrlUtil getHelpURL getHref imagesDirectory UrlUtil htmlEncode getLabel
Generates the HTML code a tree for a TOC param toc param out throws IO Exception public void generate Basic Toc int toc Writer out throws IO Exception I Topic Element topics get Enabled Subtopics tocs toc for int i 0 i topics length i generate Basic Topic topics i out  IOException generateBasicToc IOException ITopicElement getEnabledSubtopics generateBasicTopic
private void generate Basic Topic I Topic Element topic Writer out throws IO Exception out write li NON NLS 1 I Topic Element topics get Enabled Subtopics topic boolean has Nodes topics length 0 if has Nodes out write nobr NON NLS 1 out write a NON NLS 1 if get Selected Topic Help Href equals topic get Href out write name selected Item NON NLS 1 out write href Url Util get HelpURL topic get Href NON NLS 1 NON NLS 2 out write img src NON NLS 1 out write images Directory out write container obj gif alt border 0 nbsp NON NLS 1 out write Url Util html Encode topic get Label out write a NON NLS 1 out write nobr NON NLS 1 out write ul n NON NLS 1 for int i 0 i topics length i generate Basic Topic topics i out out write ul n NON NLS 1 else out write nobr NON NLS 1 out write a NON NLS 1 if get Selected Topic Help Href equals topic get Href out write name selected Item NON NLS 1 out write href Url Util get HelpURL topic get Href NON NLS 1 NON NLS 2 out write img src NON NLS 1 out write images Directory out write topic gif alt border 0 nbsp NON NLS 1 out write Url Util html Encode topic get Label out write a NON NLS 1 out write nobr NON NLS 1 out write li n NON NLS 1  generateBasicTopic ITopicElement IOException ITopicElement getEnabledSubtopics hasNodes hasNodes getSelectedTopicHelpHref getHref selectedItem UrlUtil getHelpURL getHref imagesDirectory container_obj UrlUtil htmlEncode getLabel generateBasicTopic getSelectedTopicHelpHref getHref selectedItem UrlUtil getHelpURL getHref imagesDirectory UrlUtil htmlEncode getLabel
return String help form of selected topic URL or private String get Selected Topic Help Href if topic Help Href null String topic get Selected Topic if topic null topic length 0 topic Help Href NON NLS 1 return topic Help Href int index topic index Of topic NON NLS 1 if index 1 topic topic substring index 6 index topic index Of if index 1 topic topic substring 0 index topic Help Href topic if topic null topic Help Href NON NLS 1 return topic Help Href  getSelectedTopicHelpHref topicHelpHref getSelectedTopic topicHelpHref topicHelpHref indexOf indexOf topicHelpHref topicHelpHref topicHelpHref
Obtains children topics for a given navigation element Topics from TO Cs not matching enabled activities are filtered out param navigation Element return I Topic private I Topic Element get Enabled Subtopics I Navigation Element navigation Element List topics get Enabled Subtopic List navigation Element return I Topic Element topics to Array new I Topic Element topics size  TOCs navigationElement ITopic ITopicElement getEnabledSubtopics INavigationElement navigationElement getEnabledSubtopicList navigationElement ITopicElement toArray ITopicElement
Obtains children topics for a given navigation element Topics from TO Cs not matching enabled activities are filtered out param navigation Element return List of I Topic Element private List get Enabled Subtopic List I Navigation Element navigation Element if navigation Element instanceof I Toc Element is Enabled I Toc Element navigation Element return Collections EMPTY LIST List children navigation Element get Children List child Topics new Array List children size for Iterator children It children iterator children It has Next I Navigation Element c I Navigation Element children It next if c instanceof I Topic Element add topic only if it will not end up being an empty container if I Topic Element c get Href null I Topic Element c get Href length 0 get Enabled Subtopic List c size 0 child Topics add c else it is a Toc Anchor or Link which may have children attached to it child Topics add All get Enabled Subtopic List c return child Topics  TOCs navigationElement ITopicElement getEnabledSubtopicList INavigationElement navigationElement navigationElement ITocElement isEnabled ITocElement navigationElement EMPTY_LIST navigationElement getChildren childTopics ArrayList childrenIt childrenIt hasNext INavigationElement INavigationElement childrenIt ITopicElement ITopicElement getHref ITopicElement getHref getEnabledSubtopicList childTopics childTopics addAll getEnabledSubtopicList childTopics

private boolean is Separator public Toolbar Button is Separator true  isSeparator ToolbarButton isSeparator
public Toolbar Button String name String tooltip String image String action boolean state this name name this tooltip tooltip this image image this action action this state state  ToolbarButton
public boolean is Separator return is Separator  isSeparator isSeparator
public String get Name return name  getName
public String get Tooltip return tooltip  getTooltip
Returns the enabled gray image return String public String get Image int i image last Index Of return image substring 0 i e  image substring i 1 NON NLS 1  getImage lastIndexOf e_
Returns the image when selected return String public String get On Image return get Image  getOnImage getImage
public String get Action return action  getAction
public boolean is On return state  isOn

public Toolbar Data Servlet Context context Http Servlet Request request Http Servlet Response response super context request response load Buttons  ToolbarData ServletContext HttpServletRequest HttpServletResponse loadButtons
private void load Buttons String names request get Parameter Values name NON NLS 1 String tooltips request get Parameter Values tooltip NON NLS 1 String images request get Parameter Values image NON NLS 1 String actions request get Parameter Values action NON NLS 1 String states request get Parameter Values state NON NLS 1 if names null tooltips null images null actions null states null names length tooltips length names length images length names length actions length names length states length buttons new Toolbar Button 0 return List button List new Array List for int i 0 i names length i if states i starts With hid NON NLS 1 continue if equals names i NON NLS 1 button List add new Toolbar Button else button List add new Toolbar Button names i Servlet Resources get String tooltips i request preferences get Images Directory images i NON NLS 1 actions i on equals Ignore Case states i NON NLS 1 add implicit maximize restore button on all toolbars if isIE is Mozilla 1 2 1 compare To get Mozilla Version 0 is Safari 120 compare To get Safari Version 0 NON NLS 1 button List add new Toolbar Button maximize restore NON NLS 1 get Maximize Tooltip preferences get Images Directory maximize gif NON NLS 1 NON NLS 2 restore maximize false NON NLS 1 buttons Toolbar Button button List to Array new Toolbar Button button List size  loadButtons getParameterValues getParameterValues getParameterValues getParameterValues getParameterValues ToolbarButton buttonList ArrayList startsWith buttonList ToolbarButton buttonList ToolbarButton ServletResources getString getImagesDirectory equalsIgnoreCase isMozilla compareTo getMozillaVersion isSafari compareTo getSafariVersion buttonList ToolbarButton maximize_restore getMaximizeTooltip getImagesDirectory restore_maximize ToolbarButton buttonList toArray ToolbarButton buttonList
public Toolbar Button get Buttons return buttons  ToolbarButton getButtons
public String get Name if request get Parameter view null NON NLS 1 return NON NLS 1 else return request get Parameter view NON NLS 1  getName getParameter getParameter
public String get Title if request get Parameter view null NON NLS 1 return NON NLS 1 else return Servlet Resources get String request get Parameter view NON NLS 1 request  getTitle getParameter ServletResources getString getParameter
public String get Script return request get Parameter script NON NLS 1  getScript getParameter
return request get Parameter script NON NLS 1 public String get Maximize Image return preferences get Images Directory e maximize gif NON NLS 1  getParameter getMaximizeImage getImagesDirectory e_maximize
return preferences get Images Directory e maximize gif NON NLS 1 public String get Restore Image return preferences get Images Directory e restore gif NON NLS 1  getImagesDirectory e_maximize getRestoreImage getImagesDirectory e_restore
return preferences get Images Directory e restore gif NON NLS 1 public String get Maximize Tooltip return Servlet Resources get String maximize request NON NLS 1  getImagesDirectory e_restore getMaximizeTooltip ServletResources getString
return Servlet Resources get String maximize request NON NLS 1 public String get Restore Tooltip return Servlet Resources get String restore request NON NLS 1  ServletResources getString getRestoreTooltip ServletResources getString

private String href public Topic String label String href this label label this href href 
public String get Label return label  getLabel
public String get Href return Url Util get HelpURL href  getHref UrlUtil getHelpURL

Encodes string for embedding in Java Script source public static String Java Script Encode String str char word Chars new char str length str get Chars 0 str length word Chars 0 String Buffer js Encoded new String Buffer for int j 0 j word Chars length j int unicode word Chars j to enhance readability do not encode A Z a z if A unicode unicode Z a unicode unicode z js Encoded append word Chars j continue encode the character String char In Hex Integer to String unicode 16 to Upper Case switch char In Hex length case 1 js Encoded append u000 append char In Hex NON NLS 1 break case 2 js Encoded append u00 append char In Hex NON NLS 1 break case 3 js Encoded append u0 append char In Hex NON NLS 1 break default js Encoded append u append char In Hex NON NLS 1 break return js Encoded to String  JavaScript JavaScriptEncode wordChars getChars wordChars StringBuffer jsEncoded StringBuffer wordChars wordChars jsEncoded wordChars charInHex toString toUpperCase charInHex jsEncoded charInHex jsEncoded charInHex jsEncoded charInHex jsEncoded charInHex jsEncoded toString
Encodes string for embedding in html source public static String html Encode String str for int i 0 i invalidXML length i str T String change str invalidXML i escapedXML i return str  htmlEncode TString
public static boolean is Local Request Http Servlet Request request String reqIP request get Remote Addr if 127 0 0 1 equals reqIP NON NLS 1 return true try String hostname Inet Address get Local Host get Host Name Inet Address addr Inet Address get All By Name hostname for int i 0 i addr length i test all addresses retrieved from the local machine if addr i get Host Address equals reqIP return true catch IO Exception ioe return false  isLocalRequest HttpServletRequest getRemoteAddr InetAddress getLocalHost getHostName InetAddress InetAddress getAllByName getHostAddress IOException
Returns a URL that can be loaded from a browser This method is used for all url s except those from the webapp plugin param url return String public static String get HelpURL String url if url null url length 0 url about blank NON NLS 1 else if url starts With http NON NLS 1 else if url starts With file url starts With jar file NON NLS 1 NON NLS 2 url topic url NON NLS 1 else url topic url NON NLS 1 return url  getHelpURL startsWith startsWith startsWith
public static boolean is Gecko Http Servlet Request request String agent request get Header User Agent to Lower Case NON NLS 1 sample substring Gecko 20020508 search for gecko not to react to like Gecko return agent index Of gecko 0 NON NLS 1  isGecko HttpServletRequest getHeader toLowerCase indexOf
public static boolean isIE Http Servlet Request request String agent request get Header User Agent to Lower Case NON NLS 1 When accessing with Bobby identified Bobby return 5 5 to allow testing advanced UI as bobby cannot identifiy as IE 5 5 if agent starts With bobby NON NLS 1 return true return agent index Of msie 0 NON NLS 1  HttpServletRequest getHeader toLowerCase startsWith indexOf
public static String getIE Version Http Servlet Request request String agent request get Header User Agent to Lower Case NON NLS 1 When accessing with Bobby identified Bobby return 5 5 to allow testing advanced UI as bobby cannot identifiy as IE 5 5 if agent starts With bobby NON NLS 1 return 5 5 NON NLS 1 int start agent index Of msie msie length NON NLS 1 NON NLS 2 if start msie length start agent length NON NLS 1 return 0 NON NLS 1 int end agent index Of start NON NLS 1 if end start return 0 NON NLS 1 return agent substring start end  getIEVersion HttpServletRequest getHeader toLowerCase startsWith indexOf indexOf
public static boolean is Konqueror Http Servlet Request request String agent request get Header User Agent to Lower Case NON NLS 1 return agent index Of konqueror 0 NON NLS 1  isKonqueror HttpServletRequest getHeader toLowerCase indexOf
public static boolean is Mozilla Http Servlet Request request String agent request get Header User Agent to Lower Case NON NLS 1 return agent index Of mozilla 5 0 NON NLS 1  isMozilla HttpServletRequest getHeader toLowerCase indexOf
public static String get Mozilla Version Http Servlet Request request String agent request get Header User Agent to Lower Case NON NLS 1 if agent index Of mozilla 5 0 NON NLS 1 return 0 NON NLS 1 int start agent index Of rv rv length NON NLS 1 NON NLS 2 if start rv length start agent length NON NLS 1 return 0 NON NLS 1 int end agent index Of start NON NLS 1 if end start return 0 NON NLS 1 return agent substring start end  getMozillaVersion HttpServletRequest getHeader toLowerCase indexOf indexOf indexOf
public static boolean is Opera Http Servlet Request request String agent request get Header User Agent to Lower Case NON NLS 1 return agent index Of opera 0 NON NLS 1  isOpera HttpServletRequest getHeader toLowerCase indexOf
public static boolean is Safari Http Servlet Request request String agent request get Header User Agent to Lower Case NON NLS 1 return agent index Of safari 0 NON NLS 1  isSafari HttpServletRequest getHeader toLowerCase indexOf
public static String get Safari Version Http Servlet Request request String agent request get Header User Agent to Lower Case NON NLS 1 Matcher m safari Patern matcher agent boolean matched m find if matched return m group 1 return 0 NON NLS 1  getSafariVersion HttpServletRequest getHeader toLowerCase safariPatern
param request param response Http Servlet Response or null locale will not be persisted in session cookie return public static Locale get Locale Obj Http Servlet Request request Http Servlet Response response String locale Str get Locale request response if locale Str length 5 return new Locale locale Str substring 0 2 locale Str substring 3 5 else if locale Str length 2 return new Locale locale Str substring 0 2 NON NLS 1 else return Locale get Default  HttpServletResponse getLocaleObj HttpServletRequest HttpServletResponse localeStr getLocale localeStr localeStr localeStr localeStr localeStr getDefault
param request param response Http Servlet Response or null locale will not be persisted in session cookie return public static String get Locale Http Servlet Request request Http Servlet Response response if default Locale null initializeNL if Base Help System get Mode Base Help System MODE INFOCENTER request null return default Locale use locale passed in a request in current user session String forced Locale get Forced Locale request response if forced Locale null if locales null infocenter set up to serve any locale return forced Locale match forced locale with one of infocenter locales if locales contains forced Locale return forced Locale match language of forced locale with one of infocenter locales if forced Locale length 2 String ll forced Locale substring 0 2 if locales contains ll return ll use one of the browser locales if locales null infocenter set up to serve any locale return request get Locale to String match client browser locales with one of infocenter locales for Enumeration e request get Locales e has More Elements String locale Locale e next Element to String if locale length 5 String ll CC locale substring 0 5 if locales contains ll CC client locale available return ll CC if locale length 2 String ll locale substring 0 2 if locales contains ll client language available return ll no match return default Locale  HttpServletResponse getLocale HttpServletRequest HttpServletResponse defaultLocale BaseHelpSystem getMode BaseHelpSystem MODE_INFOCENTER defaultLocale forcedLocale getForcedLocale forcedLocale forcedLocale forcedLocale forcedLocale forcedLocale forcedLocale getLocale toString getLocales hasMoreElements nextElement toString ll_CC ll_CC ll_CC defaultLocale
Obtains locale passed as lang parameter with a request during user session param request param response response or null if null locale will not be persisted in session cookie return ll CC or ll or null private static String get Forced Locale Http Servlet Request request Http Servlet Response response get locale passed in this request String forced Locale request get Parameter lang NON NLS 1 if forced Locale null save locale in session cookie for later use in a user session if response null Cookie cookie Test new Cookie lang forced Locale NON NLS 1 response add Cookie cookie Test else check if locale was passed earlier in this session Cookie cookies request get Cookies for int c 0 cookies null c cookies length c if lang equals cookies c get Name NON NLS 1 forced Locale cookies c get Value break format forced locale if forced Locale null if forced Locale length 5 forced Locale forced Locale substring 0 2   NON NLS 1 forced Locale substring 3 5 else if forced Locale length 2 forced Locale forced Locale substring 0 2 return forced Locale  ll_CC getForcedLocale HttpServletRequest HttpServletResponse forcedLocale getParameter forcedLocale cookieTest forcedLocale addCookie cookieTest getCookies getName forcedLocale getValue forcedLocale forcedLocale forcedLocale forcedLocale _ forcedLocale forcedLocale forcedLocale forcedLocale forcedLocale
If locales for infocenter specified in prefernces or as command line parameters this methods stores these locales in locales local variable for later access private static synchronized void initializeNL if default Locale null already initialized return initialize Locales initializeRTL  defaultLocale initializeLocales
private static void initialize Locales initialize default locale default Locale Platform getNL if default Locale null default Locale Locale get Default to String if Base Help System get Mode Base Help System MODE INFOCENTER return locale strings as passed in command line or in preferences List infocenter Locales null first check if locales passed as command line arguments String args Platform get Command Line Args boolean locale Option false for int i 0 i args length i if locales equals Ignore Case args i NON NLS 1 locale Option true infocenter Locales new Array List continue else if args i starts With NON NLS 1 locale Option false continue if locale Option infocenter Locales add args i if no locales from command line get them from preferences if infocenter Locales null String Tokenizer tokenizer new String Tokenizer Help Base Plugin get Default get Plugin Preferences get String locales NON NLS 1 t NON NLS 1 while tokenizer has More Tokens if infocenter Locales null infocenter Locales new Array List infocenter Locales add tokenizer next Token format locales and collect in a set for lookup if infocenter Locales null locales new Hash Set 10 0 4f for Iterator it infocenter Locales iterator it has Next String locale String it next if locale length 5 locales add locale substring 0 2 to Lower Case   NON NLS 1 locale substring 3 5 to Upper Case else if locale length 2 locales add locale substring 0 2 to Lower Case  initializeLocales defaultLocale defaultLocale defaultLocale getDefault toString BaseHelpSystem getMode BaseHelpSystem MODE_INFOCENTER infocenterLocales getCommandLineArgs localeOption equalsIgnoreCase localeOption infocenterLocales ArrayList startsWith localeOption localeOption infocenterLocales infocenterLocales StringTokenizer StringTokenizer HelpBasePlugin getDefault getPluginPreferences getString hasMoreTokens infocenterLocales infocenterLocales ArrayList infocenterLocales nextToken infocenterLocales HashSet infocenterLocales hasNext toLowerCase _ toUpperCase toLowerCase
private static void initializeRTL String args Platform get Command Line Args for int i 0 i args length i if dir equals Ignore Case args i NON NLS 1 i 1 args length rtl equals Ignore Case args i 1 NON NLS 1 rtl true break  getCommandLineArgs equalsIgnoreCase equalsIgnoreCase
public static boolean isRTL Http Servlet Request request Http Servlet Response response if default Locale null initializeNL TODO the RTL variable is set from command line all clients get the same return rtl  HttpServletRequest HttpServletResponse defaultLocale

public View String name String url String imageURL this name name this url url this imageURL imageURL 
public String get Name return name  getName
public String getURL return url 
Returns the enabled gray image return String public String get Image int i imageURL last Index Of return imageURL substring 0 i e  imageURL substring i 1 NON NLS 1  getImage lastIndexOf e_
Returns the image when selected return String public String get On Image return get Image  getOnImage getImage

Preferences prefs Constructor public Webapp Preferences prefs Help Base Plugin get Default get Plugin Preferences  WebappPreferences HelpBasePlugin getDefault getPluginPreferences
return String URL of banner page or null public String get Banner return prefs get String banner NON NLS 1  getBanner getString
public String get Banner Height return prefs get String banner height NON NLS 1  getBannerHeight getString banner_height
public String get Help Home return prefs get String help home NON NLS 1  getHelpHome getString help_home
public boolean is Bookmarks View return Base Help System get Mode Base Help System MODE INFOCENTER true equals prefs get String bookmarks View NON NLS 1 NON NLS 2  isBookmarksView BaseHelpSystem getMode BaseHelpSystem MODE_INFOCENTER getString bookmarksView
public boolean is Bookmarks Action return true equals prefs get String bookmarks View NON NLS 1 NON NLS 2  isBookmarksAction getString bookmarksView
public boolean is Links View return Base Help System get Mode Base Help System MODE INFOCENTER true equals prefs get String links View NON NLS 1 NON NLS 2  isLinksView BaseHelpSystem getMode BaseHelpSystem MODE_INFOCENTER getString linksView
public String get Images Directory String images Directory prefs get String images Directory NON NLS 1 if images Directory null images Directory starts With NON NLS 1 images Directory Url Util get HelpURL images Directory return images Directory  getImagesDirectory imagesDirectory getString imagesDirectory imagesDirectory imagesDirectory startsWith imagesDirectory UrlUtil getHelpURL imagesDirectory imagesDirectory
public String get Toolbar Background return prefs get String advanced toolbar Background NON NLS 1  getToolbarBackground getString toolbarBackground
public String get Basic Toolbar Background return prefs get String basic toolbar Background NON NLS 1  getBasicToolbarBackground getString toolbarBackground
public String get Toolbar Font return prefs get String advanced toolbar Font NON NLS 1  getToolbarFont getString toolbarFont
public String get View Background return prefs get String advanced view Background NON NLS 1  getViewBackground getString viewBackground
public String get Basic View Background return prefs get String basic view Background NON NLS 1  getBasicViewBackground getString viewBackground
public String get View Font return prefs get String advanced view Font NON NLS 1  getViewFont getString viewFont
public int get Book At Once Limit return prefs get Int load Book At Once Limit NON NLS 1  getBookAtOnceLimit getInt loadBookAtOnceLimit
public int get Load Depth int value prefs get Int dynamic Load Depths Hint NON NLS 1 if value 1 return 1 return value  getLoadDepth getInt dynamicLoadDepthsHint
return value public boolean is Window Title Prefix return true equals Ignore Case prefs get String window Title Prefix NON NLS 1 NON NLS 2  isWindowTitlePrefix equalsIgnoreCase getString windowTitlePrefix
return true equals Ignore Case prefs get String window Title Prefix NON NLS 1 NON NLS 2 public boolean is Dont Confirm Show All return prefs get Boolean dont Confirm Show All NON NLS 1  equalsIgnoreCase getString windowTitlePrefix isDontConfirmShowAll getBoolean dontConfirmShowAll
return prefs get Boolean dont Confirm Show All NON NLS 1 public void set Dont Confirm Show All boolean dontconfirm prefs set Value dont Confirm Show All dontconfirm NON NLS 1  getBoolean dontConfirmShowAll setDontConfirmShowAll setValue dontConfirmShowAll
prefs set Value dont Confirm Show All dontconfirm NON NLS 1 public boolean is Active Help return true equals Ignore Case prefs get String active Help NON NLS 1 NON NLS 2  setValue dontConfirmShowAll isActiveHelp equalsIgnoreCase getString activeHelp

public Working Set Data Servlet Context context Http Servlet Request request Http Servlet Response response super context request response wsmgr new Webapp Working Set Manager request response get Locale Adaptable Tocs Array adaptable Tocs wsmgr get Root tocs Adaptable Toc adaptable Tocs get Children is Edit Mode edit equals get Operation NON NLS 1  WorkingSetData ServletContext HttpServletRequest HttpServletResponse WebappWorkingSetManager getLocale AdaptableTocsArray adaptableTocs getRoot AdaptableToc adaptableTocs getChildren isEditMode getOperation
public boolean is Edit Mode return is Edit Mode  isEditMode isEditMode
public String get Working Set Name String name request get Parameter working Set NON NLS 1 if name null name NON NLS 1 return name  getWorkingSetName getParameter workingSet
public Working Set get Working Set String name get Working Set Name if name null name length 0 return wsmgr get Working Set name else return null  WorkingSet getWorkingSet getWorkingSetName getWorkingSet
Returns the state of the TOC return boolean public short get Toc State int toc if is Edit Mode return STATE UNCHECKED Working Set ws get Working Set if ws null return STATE UNCHECKED if toc 0 toc tocs length return STATE UNCHECKED See if the toc is in the working set Adaptable Toc adaptable Toc tocs toc Adaptable Help Resource elements ws get Elements for int i 0 i elements length i if elements i adaptable Toc return STATE CHECKED Check if it is grayed out int topics adaptable Toc get Children length boolean all The Same true short base Value STATE UNCHECKED base value is that of the first topic if topics 0 base Value get Topic State toc 0 for int i 1 all The Same i topics i all The Same all The Same get Topic State toc i base Value if all The Same return STATE GRAYED else return STATE UNCHECKED  getTocState isEditMode STATE_UNCHECKED WorkingSet getWorkingSet STATE_UNCHECKED STATE_UNCHECKED AdaptableToc adaptableToc AdaptableHelpResource getElements adaptableToc STATE_CHECKED adaptableToc getChildren allTheSame baseValue STATE_UNCHECKED baseValue getTopicState allTheSame allTheSame allTheSame getTopicState baseValue allTheSame STATE_GRAYED STATE_UNCHECKED
Returns the state of the topic The state is not dependent on the parent toc but only whether it was part of the working set To get the real state the caller must use the parent state as well This is not done here for performance reasons In the JSP by the time one looks at the topic the parent toc has already been processed param toc param topic return short public short get Topic State int toc int topic if is Edit Mode return STATE UNCHECKED Working Set ws get Working Set if ws null return STATE UNCHECKED if toc 0 toc tocs length return STATE UNCHECKED Adaptable Toc parent tocs toc Adaptable Topic topics Adaptable Topic parent get Children if topic 0 topic topics length return STATE UNCHECKED Adaptable Topic adaptable Topic topics topic Adaptable Help Resource elements ws get Elements for int i 0 i elements length i if elements i adaptable Topic return STATE CHECKED return STATE UNCHECKED  getTopicState isEditMode STATE_UNCHECKED WorkingSet getWorkingSet STATE_UNCHECKED STATE_UNCHECKED AdaptableToc AdaptableTopic AdaptableTopic getChildren STATE_UNCHECKED AdaptableTopic adaptableTopic AdaptableHelpResource getElements adaptableTopic STATE_CHECKED STATE_UNCHECKED
public String get Operation return request get Parameter operation NON NLS 1  getOperation getParameter
and allow help classes in JSP s public int get Toc Count return tocs length  getTocCount
public String get Toc Label int i return tocs i get Label  getTocLabel getLabel
public String get Toc Href int i return tocs i get Href  getTocHref getHref
public int get Topic Count int toc return tocs toc get Topics length  getTopicCount getTopics
public String get Topic Label int toc int topic return tocs toc get Topics topic get Label  getTopicLabel getTopics getLabel

public Working Set Manager Data Servlet Context context Http Servlet Request request Http Servlet Response response super context request response wsmgr new Webapp Working Set Manager request response get Locale name request get Parameter working Set NON NLS 1 try switch get Operation case ADD add Working Set break case REMOVE remove Working Set break case EDIT edit Working Set break default break catch IO Exception ioe saved false  WorkingSetManagerData ServletContext HttpServletRequest HttpServletResponse WebappWorkingSetManager getLocale getParameter workingSet getOperation addWorkingSet removeWorkingSet editWorkingSet IOException
public void add Working Set throws IO Exception if name null name length 0 String hrefs request get Parameter Values hrefs NON NLS 1 if hrefs null hrefs new String 0 Array List selected Elements new Array List hrefs length for int i 0 i hrefs length i Adaptable Help Resource res get Adaptable Help Resource hrefs i if res null selected Elements add res Adaptable Help Resource elements new Adaptable Help Resource selected Elements size selected Elements to Array elements Working Set ws wsmgr create Working Set name elements wsmgr add Working Set ws  addWorkingSet IOException getParameterValues ArrayList selectedElements ArrayList AdaptableHelpResource getAdaptableHelpResource selectedElements AdaptableHelpResource AdaptableHelpResource selectedElements selectedElements toArray WorkingSet createWorkingSet addWorkingSet
public void remove Working Set if name null name length 0 Working Set ws wsmgr get Working Set name if ws null wsmgr remove Working Set ws  removeWorkingSet WorkingSet getWorkingSet removeWorkingSet
public void edit Working Set throws IO Exception if name null name length 0 String old Name request get Parameter old Name NON NLS 1 if old Name null old Name length 0 old Name name Working Set ws wsmgr get Working Set old Name if ws null String hrefs request get Parameter Values hrefs NON NLS 1 if hrefs null hrefs new String 0 Array List selected Elements new Array List hrefs length for int i 0 i hrefs length i Adaptable Help Resource res get Adaptable Help Resource hrefs i if res null selected Elements add res Adaptable Help Resource elements new Adaptable Help Resource selected Elements size selected Elements to Array elements ws set Elements elements ws set Name name should also change the name We send this notification so that the manager fires to its listeners wsmgr working Set Changed ws  editWorkingSet IOException oldName getParameter oldName oldName oldName oldName WorkingSet getWorkingSet oldName getParameterValues ArrayList selectedElements ArrayList AdaptableHelpResource getAdaptableHelpResource selectedElements AdaptableHelpResource AdaptableHelpResource selectedElements selectedElements toArray setElements setName workingSetChanged
public String get Working Sets Working Set working Sets wsmgr get Working Sets String sets new String working Sets length for int i 0 i working Sets length i sets i working Sets i get Name return sets  getWorkingSets WorkingSet workingSets getWorkingSets workingSets workingSets workingSets getName
public String get Working Set Name if name null name length 0 See if anything is set in the preferences name wsmgr get Current Working Set if name null name length 0 wsmgr get Working Set name null name Servlet Resources get String All request NON NLS 1 return name  getWorkingSetName getCurrentWorkingSet getWorkingSet ServletResources getString
public Working Set get Working Set if name null name length 0 return wsmgr get Working Set name else return null  WorkingSet getWorkingSet getWorkingSet
public boolean is Current Working Set int i Working Set working Sets wsmgr get Working Sets return working Sets i get Name equals name  isCurrentWorkingSet WorkingSet workingSets getWorkingSets workingSets getName
private int get Operation String op request get Parameter operation NON NLS 1 if add equals op NON NLS 1 return ADD else if remove equals op NON NLS 1 return REMOVE else if edit equals op NON NLS 1 return EDIT else return NONE  getOperation getParameter
private Adaptable Help Resource get Adaptable Help Resource String internal Id Adaptable Help Resource res wsmgr get Adaptable Toc internal Id if res null res wsmgr get Adaptable Topic internal Id return res  AdaptableHelpResource getAdaptableHelpResource internalId AdaptableHelpResource getAdaptableToc internalId getAdaptableTopic internalId
return null or error message if saving saved public String get Save Error if saved return null return Url Util Java Script Encode Servlet Resources get String cookie Save Failed request NON NLS 1  getSaveError UrlUtil JavaScriptEncode ServletResources getString cookieSaveFailed

private static Bundle Context bundle Context Logs an Error message with an exception Note that the message should already be localized to proper locale ie Webapp 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 Help Webapp Plugin get Default get Log log error Status  BundleContext bundleContext WebappResources getString logError errorStatus IStatus PLUGIN_ID IStatus HelpWebappPlugin getDefault getLog errorStatus
Logs a Warning message with an exception Note that the message should already be localized to proper local ie Webapp Resources get String should already have been called public static synchronized void log Warning String message if Help Plugin DEBUG if message null message NON NLS 1 Status warning Status new Status I Status WARNING PLUGIN ID I Status OK message null Help Webapp Plugin get Default get Log log warning Status  WebappResources getString logWarning HelpPlugin warningStatus IStatus PLUGIN_ID IStatus HelpWebappPlugin getDefault getLog warningStatus
return the singleton instance of the help webapp plugin public static Help Webapp Plugin get Default return plugin  HelpWebappPlugin getDefault
public void start Bundle Context context throws Exception super start context plugin this bundle Context context Setup debugging options Setup debugging options DEBUG is Debugging if DEBUG DEBUG WORKINGSETS true equals Ignore Case Platform get Debug Option org eclipse help webapp debug workingsets NON NLS 1 NON NLS 2  BundleContext bundleContext isDebugging DEBUG_WORKINGSETS equalsIgnoreCase getDebugOption
public void stop Bundle Context context throws Exception plugin null bundle Context null super stop context  BundleContext bundleContext

public void init throws Servlet Exception try connector new Eclipse Connector get Servlet Context catch Throwable e throw new Servlet Exception e  ServletException EclipseConnector getServletContext ServletException
Called by the server via the code service code method to allow a servlet to handle a GET request protected void do Get Http Servlet Request req Http Servlet Response resp throws Servlet Exception IO Exception req set Character Encoding UTF 8 NON NLS 1 if connector null connector transfer req resp  doGet HttpServletRequest HttpServletResponse ServletException IOException setCharacterEncoding
Called by the server via the code service code method to allow a servlet to handle a POST request Handle the search requests protected void do Post Http Servlet Request req Http Servlet Response resp throws Servlet Exception IO Exception if connector null connector transfer req resp  doPost HttpServletRequest HttpServletResponse ServletException IOException

Called by the server via the code service code method to allow a servlet to handle a GET request protected void do Get Http Servlet Request req Http Servlet Response resp throws Servlet Exception IO Exception locale Url Util get Locale req resp req set Character Encoding UTF 8 NON NLS 1 resp set Content Type application xml charset UTF 8 NON NLS 1 resp set Header Cache Control max age 0 NON NLS 1 NON NLS 2 String context Id req get Path Info if context Id null context Id length 2 throw new Servlet Exception context Id context Id substring 1 I Context context Help System get Context context Id if context null throw new Servlet Exception Context Writer results Writer new Context Writer resp get Writer locale results Writer generate context Id context resp results Writer close  doGet HttpServletRequest HttpServletResponse ServletException IOException UrlUtil getLocale setCharacterEncoding setContentType setHeader contextId getPathInfo contextId contextId ServletException contextId contextId IContext HelpSystem getContext contextId ServletException ContextWriter resultsWriter ContextWriter getWriter resultsWriter contextId resultsWriter
Called by the server via the code service code method to allow a servlet to handle a POST request Handle the search requests protected void do Post Http Servlet Request req Http Servlet Response resp throws Servlet Exception IO Exception do Get req resp  doPost HttpServletRequest HttpServletResponse ServletException IOException doGet
private class Context Writer extends XML Generator public Context Writer Writer writer String locale super writer  ContextWriter XMLGenerator ContextWriter
XML representation of context info public void generate String context Id I Context context Http Servlet Response resp println context id context Id NON NLS 1 NON NLS 2 pad print Pad print description NON NLS 1 print context get Text println description NON NLS 1 I Help Resource links context get Related Topics if links null links new I Help Resource 0 for int i 0 i links length i print Pad print topic label NON NLS 1 xml Escape links i get Label NON NLS 1 href NON NLS 1 links i get Href NON NLS 1 I Toc toc find Toc For Topic links i get Href if toc null print toc NON NLS 1 toc get Href NON NLS 1 toclabel NON NLS 1 toc get Label NON NLS 1 print NON NLS 1 pad println context NON NLS 1  contextId IContext HttpServletResponse contextId printPad getText IHelpResource getRelatedTopics IHelpResource printPad xmlEscape getLabel getHref IToc findTocForTopic getHref getHref getLabel
Finds a topic in a bookshelf or within a scope if specified I Toc find Toc For Topic String href I Toc tocs Help Plugin get Toc Manager get Tocs locale for int i 0 i tocs length i I Topic topic tocs i get Topic href if topic null return tocs i return null  IToc findTocForTopic IToc HelpPlugin getTocManager getTocs ITopic getTopic

Called by the servlet container to indicate to a servlet that the servlet is being placed into service public void init throws Servlet Exception super init if Base Help System get Mode Base Help System MODE STANDALONE help Display Base Help System get Help Display  ServletException BaseHelpSystem getMode BaseHelpSystem MODE_STANDALONE helpDisplay BaseHelpSystem getHelpDisplay
Called by the server via the code service code method to allow a servlet to handle a GET request protected void do Get Http Servlet Request req Http Servlet Response resp throws Servlet Exception IO Exception process Request req resp  doGet HttpServletRequest HttpServletResponse ServletException IOException processRequest
Called by the server via the code service code method to allow a servlet to handle a POST request protected void do Post Http Servlet Request req Http Servlet Response resp throws Servlet Exception IO Exception process Request req resp  doPost HttpServletRequest HttpServletResponse ServletException IOException processRequest
private void process Request Http Servlet Request req Http Servlet Response resp throws Servlet Exception IO Exception req set Character Encoding UTF 8 NON NLS 1 for HTTP 1 1 resp set Header Cache Control no cache NON NLS 1 NON NLS 2 for HTTP 1 0 resp set Header Pragma no cache NON NLS 1 NON NLS 2 resp set Date Header Expires 0 NON NLS 1 prevents caching at the proxy server if Url Util is Local Request req do not allow remote clients to execute this servlet return if help Control equals req get Context Path NON NLS 1 control html equals req get Servlet Path NON NLS 1 do not allow arbitrary UR Ls to execute this servlet resp send Error Http Servlet Response SC FORBIDDEN NON NLS 1 return if shutting Down return String command req get Parameter command NON NLS 1 if command null this should never happen and is invisible to the user resp get Writer print No command NON NLS 1 return if shutdown equals Ignore Case command NON NLS 1 shutdown else if display Help equals Ignore Case command NON NLS 1 if Base Help System get Mode Base Help System MODE STANDALONE display Help req else this should never happen and is invisible to the user resp get Writer print Unrecognized command NON NLS 1  processRequest HttpServletRequest HttpServletResponse ServletException IOException setCharacterEncoding setHeader setHeader setDateHeader UrlUtil isLocalRequest helpControl getContextPath getServletPath URLs sendError HttpServletResponse SC_FORBIDDEN shuttingDown getParameter getWriter equalsIgnoreCase displayHelp equalsIgnoreCase BaseHelpSystem getMode BaseHelpSystem MODE_STANDALONE displayHelp getWriter
Shuts down Eclipse help Application private void shutdown shutting Down true Help Application stop  helpApplication shuttingDown HelpApplication
Displays help param req Http Servlet Request that might contain href parameter which is the resource to display private void display Help Http Servlet Request req String href req get Parameter href NON NLS 1 if href null help Display display Help Resource href false else help Display display Help false  HttpServletRequest displayHelp HttpServletRequest getParameter helpDisplay displayHelpResource helpDisplay displayHelp

return null or String public static String get Cookie Value String name Http Servlet Request request String ret null Cookie cookies request get Cookies if cookies null for int i 0 i cookies length i if name equals cookies i get Name ret cookies i get Value break if Help Webapp Plugin DEBUG WORKINGSETS System out println Cookie Util get Cookie Value NON NLS 1 name NON NLS 1 request get RequestURI returning NON NLS 1 ret return ret  getCookieValue HttpServletRequest getCookies getName getValue HelpWebappPlugin DEBUG_WORKINGSETS CookieUtil getCookieValue getRequestURI
public static void set Cookie Value String name String value Http Servlet Response response Cookie cookie new Cookie name value cookie set Max Age COOKIE LIFE response add Cookie cookie if Help Webapp Plugin DEBUG WORKINGSETS System out println Cookie Util set Cookie Value name value NON NLS 1 NON NLS 2 NON NLS 3  setCookieValue HttpServletResponse setMaxAge COOKIE_LIFE addCookie HelpWebappPlugin DEBUG_WORKINGSETS CookieUtil setCookieValue
public static void delete Cookie String name Http Servlet Response response Cookie cookie new Cookie name NON NLS 1 cookie set Max Age 0 response add Cookie cookie  deleteCookie HttpServletResponse setMaxAge addCookie
Saves string in multiple browser cookies Cookies can store limited length string This method will attemt to split string among multiple cookies The following cookies will be set name1 length substing1 name2 substrging2 namen substringn param data a string containing legal characters for cookie value throws IO Exception when data is too long public static void save String String name String data int max Cookies Http Servlet Request request Http Servlet Response response throws IO Exception int len data length int n len MAX COOKIE PAYLOAD if n max Cookies throw new IO Exception Webapp Resources get String Cookie Util too Many Cookies Needed Url Util get Locale Obj NON NLS 1 request response for int i 1 i n i if i 1 set Cookie Value name 1 NON NLS 1 len data substring 0 MAX COOKIE PAYLOAD NON NLS 1 response else set Cookie Value name i data substring MAX COOKIE PAYLOAD i 1 MAX COOKIE PAYLOAD i response if len MAX COOKIE PAYLOAD 0 if n 0 set Cookie Value name 1 NON NLS 1 len data substring 0 len NON NLS 1 response else set Cookie Value name n 1 data substring MAX COOKIE PAYLOAD n len response if using less cookies than maximum delete not needed cookies from last time for int i n 1 i max Cookies i if i n 1 len MAX COOKIE PAYLOAD 0 continue if get Cookie Value name i request null delete Cookie name i response else break  IOException saveString maxCookies HttpServletRequest HttpServletResponse IOException MAX_COOKIE_PAYLOAD maxCookies IOException WebappResources getString CookieUtil tooManyCookiesNeeded UrlUtil getLocaleObj setCookieValue MAX_COOKIE_PAYLOAD setCookieValue MAX_COOKIE_PAYLOAD MAX_COOKIE_PAYLOAD MAX_COOKIE_PAYLOAD setCookieValue setCookieValue MAX_COOKIE_PAYLOAD maxCookies MAX_COOKIE_PAYLOAD getCookieValue deleteCookie
return null or String public static String restore String String name Http Servlet Request request String value1 Cookie Util get Cookie Value name 1 request NON NLS 1 if value1 null no cookie return null String length And Substring1 value1 split NON NLS 1 if length And Substring1 length 2 return null int len 0 try len Integer parse Int length And Substring1 0 catch Number Format Exception nfe return null if len 0 return null String Buffer data new String Buffer len data append length And Substring1 1 int n len MAX COOKIE PAYLOAD for int i 2 i n i String substring Cookie Util get Cookie Value name i request if substring null return null data append substring if len MAX COOKIE PAYLOAD 0 n 0 String substring Cookie Util get Cookie Value name n 1 request if substring null return null data append substring if data length len return null return data to String  restoreString HttpServletRequest CookieUtil getCookieValue lengthAndSubstring1 lengthAndSubstring1 parseInt lengthAndSubstring1 NumberFormatException StringBuffer StringBuffer lengthAndSubstring1 MAX_COOKIE_PAYLOAD CookieUtil getCookieValue MAX_COOKIE_PAYLOAD CookieUtil getCookieValue toString

Constructor public Eclipse Connector Servlet Context context this context context  EclipseConnector ServletContext
public void transfer Http Servlet Request req Http Servlet Response resp throws IO Exception try String url getURL req if url null return if url to Lower Case starts With file NON NLS 1 url to Lower Case starts With jar file NON NLS 1 int i url index Of if i 1 url url substring 0 i ensure the file is only accessed from a local installation if Base Help System get Mode Base Help System MODE INFOCENTER Url Util is Local Request req return else enable activities matching url Help Base Plugin get Activity Support enable Activities url url help url NON NLS 1 URL Connection con open Connection url req resp resp set Content Type con get Content Type long max Age 0 try get Expiration throws Null Pointer Exception when URL is jar file long expiration con get Expiration max Age expiration System current Time Millis 1000 if max Age 0 max Age 0 catch Exception e resp set Header Cache Control max age max Age NON NLS 1 NON NLS 2 Input Stream is try is con get Input Stream catch IO Exception ioe if url to Lower Case ends With htm NON NLS 1 url to Lower Case ends With html NON NLS 1 String error error Page Begin Servlet Resources get String no Topic req NON NLS 1 error Page End is new Byte Array Input Stream error get Bytes UTF8 NON NLS 1 else return Output Stream out resp get Output Stream for int i 0 i filters length i out filters i filter req out transfer Content is out out flush is close catch Exception e e print Stack Trace  HttpServletRequest HttpServletResponse IOException toLowerCase startsWith toLowerCase startsWith indexOf BaseHelpSystem getMode BaseHelpSystem MODE_INFOCENTER UrlUtil isLocalRequest HelpBasePlugin getActivitySupport enableActivities URLConnection openConnection setContentType getContentType maxAge getExpiration NullPointerException getExpiration maxAge currentTimeMillis maxAge maxAge setHeader maxAge InputStream getInputStream IOException toLowerCase endsWith toLowerCase endsWith errorPageBegin ServletResources getString noTopic errorPageEnd ByteArrayInputStream getBytes OutputStream getOutputStream transferContent printStackTrace
Write the body to the response private void transfer Content Input Stream input Stream Output Stream out throws IO Exception try Prepare the input stream for reading Buffered Input Stream data Stream new Buffered Input Stream input Stream Create a fixed sized buffer for reading We could create one with the size of availabe data byte buffer new byte 4096 int len 0 while true len data Stream read buffer Read file into the byte array if len 1 break out write buffer 0 len catch Exception e e print Stack Trace  transferContent InputStream inputStream OutputStream IOException BufferedInputStream dataStream BufferedInputStream inputStream dataStream printStackTrace
Gets content from the named url this could be and eclipse defined url private URL Connection open Connection String url Http Servlet Request request Http Servlet Response response throws Exception System out println help content for url URL Connection con null if Base Help System get Mode Base Help System MODE INFOCENTER it is an infocentre add client locale to url String locale Url Util get Locale request response if url index Of 0 url url lang locale NON NLS 1 else url url lang locale NON NLS 1 URL helpURL new URL url URL helpURL if url starts With help NON NLS 1 helpURL new URL help NON NLS 1 null 1 url substring help length NON NLS 1 HelpURL Stream Handler get Default else helpURL new URL url String protocol helpURL get Protocol if help equals protocol NON NLS 1 file equals protocol NON NLS 1 jar equals protocol NON NLS 1 throw new IO Exception con helpURL open Connection con set Allow User Interaction false con set Do Input true con connect return con  URLConnection openConnection HttpServletRequest HttpServletResponse URLConnection BaseHelpSystem getMode BaseHelpSystem MODE_INFOCENTER UrlUtil getLocale indexOf startsWith HelpURLStreamHandler getDefault getProtocol IOException openConnection setAllowUserInteraction setDoInput
Extracts the url from a request private String getURL Http Servlet Request req String query NON NLS 1 boolean first Param true for Enumeration params req get Parameter Names params has More Elements String param String params next Element String values req get Parameter Values param if values null continue for int i 0 i values length i if first Param query param values i NON NLS 1 NON NLS 2 first Param false else query param values i NON NLS 1 NON NLS 2 the request contains the eclipse url help or search String url req get Path Info query if url starts With NON NLS 1 url url substring 1 return url  HttpServletRequest firstParam getParameterNames hasMoreElements nextElement getParameterValues firstParam firstParam getPathInfo startsWith

Constructor param out sink output stream param bytes To Insert bytes to insert in head of HTML public FilterHTML Head Output Stream Output Stream out byte bytes To Insert super out to Insert bytes To Insert  bytesToInsert FilterHTMLHeadOutputStream OutputStream bytesToInsert toInsert bytesToInsert
Writes the specified code byte code to this output stream p The underlying stream might have a more bytes written to it following the lt head gt HTML element p Implements the abstract tt write tt method of tt Output Stream tt param b the code byte code exception IO Exception if an I O error occurs public final void write int b throws IO Exception out write b switch state case STATE START if b state STATE LT break case STATE LT if b h b H state STATE LT H else state STATE START break case STATE LT H if b e b E state STATE LT HE else state STATE START break case STATE LT HE if b a b A state STATE LT HEA else state STATE START break case STATE LT HEA if b d b D state STATE LT HEAD else state STATE START break case STATE LT HEAD if b insert extra bytes here out write to Insert state STATE DONE else if b state STATE START break default case STATE DONE break  OutputStream IOException IOException STATE_START STATE_LT STATE_LT STATE_LT_H STATE_START STATE_LT_H STATE_LT_HE STATE_START STATE_LT_HE STATE_LT_HEA STATE_START STATE_LT_HEA STATE_LT_HEAD STATE_START STATE_LT_HEAD toInsert STATE_DONE STATE_START STATE_DONE
public void write byte b int off int len throws IO Exception if state STATE DONE out write b off len else for int i 0 i len i write b off i  IOException STATE_DONE

public Output Stream filter Http Servlet Request req Output Stream out String uri req get RequestURI if uri null uri ends With html uri ends With htm NON NLS 1 NON NLS 2 return out if nftopic equals req get Servlet Path NON NLS 1 return out String noframes req get Parameter noframes NON NLS 1 if true equals noframes NON NLS 1 return out String path req get Path Info if path null return out String Buffer script new String Buffer script Part1 for int i 0 i path index Of path path substring i 1 script append NON NLS 1 script append topic NON NLS 1 script append req get Path Info script append script Part3 return new FilterHTML Head Output Stream out script to String get Bytes  OutputStream HttpServletRequest OutputStream getRequestURI endsWith endsWith getServletPath getParameter getPathInfo StringBuffer StringBuffer scriptPart1 indexOf getPathInfo scriptPart3 FilterHTMLHeadOutputStream toString getBytes

public Output Stream filter Http Servlet Request req Output Stream out String uri req get RequestURI if uri null uri ends With html uri ends With htm NON NLS 1 NON NLS 2 return out if Url Util isIE req Url Util is Mozilla req return out Collection keywords get Words req if keywords size 0 return out keywords remove Wild Cards keywords keywords encode Key Words keywords byte script createJ Script req keywords if script null return out return new FilterHTML Head Output Stream out script  OutputStream HttpServletRequest OutputStream getRequestURI endsWith endsWith UrlUtil UrlUtil isMozilla getWords removeWildCards encodeKeyWords createJScript FilterHTMLHeadOutputStream
Creates Java Script that does highlighting param keywords return byte private byte createJ Script Http Servlet Request req Collection keywords String Buffer buf new String Buffer script Part1 append comma separated list of keywords Iterator it keywords iterator if it has Next return null String keyword String it next buf append append keyword append NON NLS 1 NON NLS 2 while it has Next keyword String it next buf append append keyword append NON NLS 1 NON NLS 2 buf append script Part3 append to get to the webapp String path req get Path Info if path null for int i 0 i path index Of path path substring i 1 buf append NON NLS 1 buf append script Part5 return buf to String get Bytes  createJScript HttpServletRequest StringBuffer StringBuffer scriptPart1 hasNext hasNext scriptPart3 getPathInfo indexOf scriptPart5 toString getBytes
Extracts keywords from query that contains keywords dobule quoted and separated by space return Collection of String private Collection get Words Http Servlet Request req Collect words to hash set to eliminate duplcates Collection tokens new Array List String search Word req get Parameter resultof NON NLS 1 if search Word null return tokens Divide along quotation marks String Tokenizer q Tokenizer new String Tokenizer search Word 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 beginning of quoted string quoted String NON NLS 1 else end of quoted string tokens add quoted String within Quotation within Quotation continue if within Quotation tokens add cur Token return tokens  getWords HttpServletRequest ArrayList searchWord getParameter searchWord StringTokenizer qTokenizer StringTokenizer searchWord withinQuotation quotedString qTokenizer hasMoreTokens curToken qTokenizer nextToken curToken withinQuotation quotedString quotedString withinQuotation withinQuotation withinQuotation curToken
Encodes strings inside collection for embedding in HTML source return Collection of String private Collection encode Key Words Collection col if col null return col Collection result new Array List for Iterator it col iterator it has Next String word String it next int l word length if l 1 continue result add Url Util Java Script Encode word return result  encodeKeyWords ArrayList hasNext UrlUtil JavaScriptEncode
Removes wildcard characters from words by splitting words around wild cards return Collection of String private Collection remove Wild Cards Collection col if col null return col Split words into parts before and after Collection result Pass1 new Array List for Iterator it col iterator it has Next String word String it next int index while index word index Of 0 NON NLS 1 if index 0 result Pass1 add word substring 0 index if word length index word word substring index 1 if word length 0 result Pass1 add word Split words into parts before and after Collection result Pass2 new Array List for Iterator it result Pass1 iterator it has Next String word String it next int index while index word index Of 0 NON NLS 1 if index 0 result Pass2 add word substring 0 index if word length index word word substring index 1 if word length 0 result Pass2 add word return result Pass2  removeWildCards resultPass1 ArrayList hasNext indexOf resultPass1 resultPass1 resultPass2 ArrayList resultPass1 hasNext indexOf resultPass2 resultPass2 resultPass2

public interface I Filter Filters Output Stream out param req HTTP Servlet Request for resource being filtered filter s logic might differ depending on the request param out original Output Stream return filtered Output Stream  IFilter OutputStream HTTPServletRequest OutputStream OutputStream

Constructor param locale public Infocenter Working Set Manager Http Servlet Request request Http Servlet Response response String locale this request request this response response this locale locale restore State  InfocenterWorkingSetManager HttpServletRequest HttpServletResponse restoreState
public Adaptable Tocs Array get Root if root null root new Adaptable Tocs Array Help Plugin get Toc Manager get Tocs locale return root  AdaptableTocsArray getRoot AdaptableTocsArray HelpPlugin getTocManager getTocs
Adds a new working set and saves it public void add Working Set Working Set working Set throws IO Exception if working Set null working Sets contains working Set return working Sets add working Set save State  addWorkingSet WorkingSet workingSet IOException workingSet workingSets workingSet workingSets workingSet saveState
Creates a new working set public Working Set create Working Set String name Adaptable Help Resource elements return new Working Set name elements  WorkingSet createWorkingSet AdaptableHelpResource WorkingSet
Returns a working set by name public Working Set get Working Set String name if name null working Sets null return null Iterator iter working Sets iterator while iter has Next Working Set working Set Working Set iter next if name equals working Set get Name return working Set return null  WorkingSet getWorkingSet workingSets workingSets hasNext WorkingSet workingSet WorkingSet workingSet getName workingSet
Implements I Working Set Manager see org eclipse help internal workingset I Help Working Set Manager get Working Sets public Working Set get Working Sets return Working Set working Sets to Array new Working Set working Sets size  IWorkingSetManager IHelpWorkingSetManager getWorkingSets WorkingSet getWorkingSets WorkingSet workingSets toArray WorkingSet workingSets
Removes specified working set public void remove Working Set Working Set working Set working Sets remove working Set try save State catch IO Exception ioe  removeWorkingSet WorkingSet workingSet workingSets workingSet saveState IOException
private void restore State String data Cookie Util restore String COOKIE NAME request if data null return String values data split 1 NON NLS 1 if values length 1 return current Working Set URL Coder decode values 0 UTF8 i for int i 1 i values length i String name And Hrefs values i split 1 NON NLS 1 String name URL Coder decode name And Hrefs 0 UTF8 Adaptable Help Resource elements new Adaptable Help Resource name And Hrefs length 1 for each href working set resource for int e 0 e name And Hrefs length 1 e int h e 1 elements e get Adaptable Toc URL Coder decode name And Hrefs h UTF8 if elements e null elements e get Adaptable Topic URL Coder decode name And Hrefs h UTF8 if elements e null working set cannot be restored continue i Working Set ws create Working Set name elements working Sets add ws  restoreState CookieUtil restoreString COOKIE_NAME currentWorkingSet URLCoder nameAndHrefs URLCoder nameAndHrefs AdaptableHelpResource AdaptableHelpResource nameAndHrefs nameAndHrefs getAdaptableToc URLCoder nameAndHrefs getAdaptableTopic URLCoder nameAndHrefs WorkingSet createWorkingSet workingSets
Persists all working sets Should only be called by the webapp working set dialog Saves the working sets in the persistence store cookie format curent Working Set Name name1 href11 href12 name2 href22 private void save State throws IO Exception String Buffer data new String Buffer data append URL Coder encode current Working Set UTF8 for Iterator i working Sets iterator i has Next data append Working Set ws Working Set i next data append URL Coder encode ws get Name UTF8 Adaptable Help Resource resources ws get Elements for int j 0 j resources length j data append I Adaptable parent resources j get Parent if parent get Root saving toc data append URL Coder encode resources j get Href UTF8 else saving topic as tochref topic   Adaptable Toc toc Adaptable Toc parent Adaptable Help Resource siblings toc get Children for int t 0 t siblings length t if siblings t resources j data append URL Coder encode toc get Href UTF8 data append   data append t data append   break try Cookie Util save String COOKIE NAME data to String MAX COOKIES request response catch IO Exception ioe if Help Webapp Plugin DEBUG WORKINGSETS System out println Infocenter Working Set Manager save State Too much data to save NON NLS 1 data to String throw ioe  curentWorkingSetName saveState IOException StringBuffer StringBuffer URLCoder currentWorkingSet workingSets hasNext WorkingSet WorkingSet URLCoder getName AdaptableHelpResource getElements IAdaptable getParent getRoot URLCoder getHref tochref_topic _ AdaptableToc AdaptableToc AdaptableHelpResource getChildren URLCoder getHref _ _ CookieUtil saveString COOKIE_NAME toString MAX_COOKIES IOException HelpWebappPlugin DEBUG_WORKINGSETS InfocenterWorkingSetManager saveState toString
param changed Working Set the working set that has changed public void working Set Changed Working Set changed Working Set throws IO Exception save State  changedWorkingSet workingSetChanged WorkingSet changedWorkingSet IOException saveState
public Adaptable Toc get Adaptable Toc String href return get Root get Adaptable Toc href  AdaptableToc getAdaptableToc getRoot getAdaptableToc
public Adaptable Topic get Adaptable Topic String id if id null id length 0 return null toc id s are hrefs plugin Id path to toc xml topic id s are based on parent toc id and index of topic plugin Id path to toc xml index  int len id length if id char At len 1   This is a first level topic String index Str id substring id last Index Of   len 2 1 len 1 int index 0 try index Integer parse Int index Str catch Exception e String toc Str id substring 0 id last Index Of   len 2 Adaptable Toc toc get Adaptable Toc toc Str if toc null return null I Adaptable topics toc get Children if index 0 index topics length return null else return Adaptable Topic topics index return null  AdaptableTopic getAdaptableTopic pluginId pluginId xml_index_ charAt _ indexStr lastIndexOf _ parseInt indexStr tocStr lastIndexOf _ AdaptableToc getAdaptableToc tocStr IAdaptable getChildren AdaptableTopic
public String get Current Working Set return current Working Set  getCurrentWorkingSet currentWorkingSet
public void set Current Working Set String working Set current Working Set working Set try save State catch IO Exception ioe  setCurrentWorkingSet workingSet currentWorkingSet workingSet saveState IOException

public class Live Help Servlet extends Http Servlet public void init throws Servlet Exception if Base Help System get Mode Base Help System MODE INFOCENTER throw new Servlet Exception  LiveHelpServlet HttpServlet ServletException BaseHelpSystem getMode BaseHelpSystem MODE_INFOCENTER ServletException
Called by the server via the code service code method to allow a servlet to handle a GET request protected void do Get Http Servlet Request req Http Servlet Response resp throws Servlet Exception IO Exception if Base Help System get Mode Base Help System MODE INFOCENTER return if new Webapp Preferences is Active Help return req set Character Encoding UTF 8 NON NLS 1 String pluginID req get Parameter pluginID NON NLS 1 if pluginID null return String class Name req get Parameter class NON NLS 1 if class Name null return String arg req get Parameter arg NON NLS 1 Bundle bundle Platform get Bundle pluginID if bundle null return try Class c bundle load Class class Name Object o c new Instance if o null o instanceof I Live Help Action I Live Help Action help Ext I Live Help Action o if arg null help Ext set Initialization String arg Thread runnable Live Help new Thread help Ext runnable Live Help set Daemon true runnable Live Help start catch Thread Death td throw td catch Exception e  doGet HttpServletRequest HttpServletResponse ServletException IOException BaseHelpSystem getMode BaseHelpSystem MODE_INFOCENTER WebappPreferences isActiveHelp setCharacterEncoding getParameter className getParameter className getParameter getBundle loadClass className newInstance ILiveHelpAction ILiveHelpAction helpExt ILiveHelpAction helpExt setInitializationString runnableLiveHelp helpExt runnableLiveHelp setDaemon runnableLiveHelp ThreadDeath
Called by the server via the code service code method to allow a servlet to handle a POST request Handle the search requests protected void do Post Http Servlet Request req Http Servlet Response resp throws Servlet Exception IO Exception do Get req resp  doPost HttpServletRequest HttpServletResponse ServletException IOException doGet

Called by the server via the code service code method to allow a servlet to handle a GET request protected void do Get Http Servlet Request req Http Servlet Response resp throws Servlet Exception IO Exception locale Url Util get Locale req resp req set Character Encoding UTF 8 NON NLS 1 resp set Content Type application xml charset UTF 8 NON NLS 1 resp set Header Cache Control max age 0 NON NLS 1 NON NLS 2 Search Hit hits load Search Results req resp Results Writer results Writer new Results Writer resp get Writer results Writer generate hits resp results Writer close  doGet HttpServletRequest HttpServletResponse ServletException IOException UrlUtil getLocale setCharacterEncoding setContentType setHeader SearchHit loadSearchResults ResultsWriter resultsWriter ResultsWriter getWriter resultsWriter resultsWriter
Called by the server via the code service code method to allow a servlet to handle a POST request Handle the search requests protected void do Post Http Servlet Request req Http Servlet Response resp throws Servlet Exception IO Exception do Get req resp  doPost HttpServletRequest HttpServletResponse ServletException IOException doGet
Call the search engine and get results or the percentage of indexed documents private Search Hit load Search Results Http Servlet Request request Http Servlet Response response Search Hit hits null try Null Progress Monitor pm new Null Progress Monitor Search Results results create Hit Collector request response Base Help System get Search Manager search create Search Query request results pm hits results get Search Hits catch Query Too Complex Exception qe hits new Search Hit 0 catch Exception e Help Webapp Plugin log Error e NON NLS 1 finally if hits null hits new Search Hit 0 return hits  SearchHit loadSearchResults HttpServletRequest HttpServletResponse SearchHit NullProgressMonitor NullProgressMonitor SearchResults createHitCollector BaseHelpSystem getSearchManager createSearchQuery getSearchHits QueryTooComplexException SearchHit HelpWebappPlugin logError SearchHit
private I Search Query create Search Query Http Servlet Request request String search Word request get Parameter search Word NON NLS 1 String field Search Str request get Parameter field Search NON NLS 1 boolean field Search field Search Str null new Boolean field Search Str boolean Value false return new Search Query search Word field Search new Array List locale  ISearchQuery createSearchQuery HttpServletRequest searchWord getParameter searchWord fieldSearchStr getParameter fieldSearch fieldSearch fieldSearchStr fieldSearchStr booleanValue SearchQuery searchWord fieldSearch ArrayList
private Search Results create Hit Collector Http Servlet Request request Http Servlet Response response Working Set working Sets if request get Parameter Values scoped Search null NON NLS 1 scopes are working set names working Sets get Working Sets request response else scopes are books advanced search working Sets create Temp Working Sets request response int max Hits 500 String max Hits Str request get Parameter max Hits NON NLS 1 if max Hits Str null try int clientmax Hits Integer parse Int max Hits Str if 0 clientmax Hits clientmax Hits 500 max Hits clientmax Hits catch Number Format Exception nfe return new Search Results working Sets max Hits locale  SearchResults createHitCollector HttpServletRequest HttpServletResponse WorkingSet workingSets getParameterValues scopedSearch workingSets getWorkingSets workingSets createTempWorkingSets maxHits maxHitsStr getParameter maxHits maxHitsStr clientmaxHits parseInt maxHitsStr clientmaxHits clientmaxHits maxHits clientmaxHits NumberFormatException SearchResults workingSets maxHits
return Working Set or null private Working Set get Working Sets Http Servlet Request request Http Servlet Response response String scopes request get Parameter Values scope NON NLS 1 if scopes null return null confirm working set exists and use it Webapp Working Set Manager wsmgr new Webapp Working Set Manager request response locale Array List working Set Col new Array List scopes length for int s 0 s scopes length s Working Set ws wsmgr get Working Set scopes s if ws null working Set Col add ws if working Set Col size 0 return null return Working Set working Set Col to Array new Working Set working Set Col size  WorkingSet WorkingSet getWorkingSets HttpServletRequest HttpServletResponse getParameterValues WebappWorkingSetManager WebappWorkingSetManager ArrayList workingSetCol ArrayList WorkingSet getWorkingSet workingSetCol workingSetCol WorkingSet workingSetCol toArray WorkingSet workingSetCol
return Working Set or null private Working Set create Temp Working Sets Http Servlet Request request Http Servlet Response response String scopes request get Parameter Values scope NON NLS 1 if scopes null it is possible that filtering is used but all books are deselected return new Working Set 0 if scopes length Help Plugin get Toc Manager get Tocs locale length do not filter if all books are selected return null create working set from books Webapp Working Set Manager wsmgr new Webapp Working Set Manager request response locale Array List tocs new Array List scopes length for int s 0 s scopes length s Adaptable Toc toc wsmgr get Adaptable Toc scopes s if toc null tocs add toc Adaptable Toc adaptable Tocs Adaptable Toc tocs to Array new Adaptable Toc tocs size Working Set working Sets new Working Set 1 working Sets 0 wsmgr create Working Set temp adaptable Tocs NON NLS 1 return working Sets  WorkingSet WorkingSet createTempWorkingSets HttpServletRequest HttpServletResponse getParameterValues WorkingSet HelpPlugin getTocManager getTocs WebappWorkingSetManager WebappWorkingSetManager ArrayList ArrayList AdaptableToc getAdaptableToc AdaptableToc adaptableTocs AdaptableToc toArray AdaptableToc WorkingSet workingSets WorkingSet workingSets createWorkingSet adaptableTocs workingSets
private static class Results Writer extends XML Generator param writer java io Writer public Results Writer Writer writer super writer  ResultsWriter XMLGenerator ResultsWriter
XML representation of search results lt pre gt lt hits gt lt topic label score toc toclabel gt public void generate Search Hit hits Http Servlet Response resp println hits length hits length NON NLS 1 NON NLS 2 pad for int i 0 i hits length i print Pad print topic label NON NLS 1 xml Escape hits i get Label NON NLS 1 href NON NLS 1 hits i get Href NON NLS 1 score NON NLS 1 Float to String hits i get Score NON NLS 1 if hits i get Toc null print toc NON NLS 1 hits i get Toc get Href NON NLS 1 toclabel NON NLS 1 hits i get Toc get Label NON NLS 1 print NON NLS 1 pad println hits NON NLS 1  SearchHit HttpServletResponse printPad xmlEscape getLabel getHref toString getScore getToc getToc getHref getToc getLabel

Called by the server via the code service code method to allow a servlet to handle a GET request protected void do Get Http Servlet Request req Http Servlet Response resp throws Servlet Exception IO Exception locale Url Util get Locale req resp req set Character Encoding UTF 8 NON NLS 1 resp set Content Type application xml charset UTF 8 NON NLS 1 resp set Header Cache Control max age 10000 NON NLS 1 NON NLS 2 if equals req get Path Info NON NLS 1 if req get Parameter topic null NON NLS 1 serialize Tocs resp else serialize Tocs find Toc Containing Topic req get Parameter topic NON NLS 1 resp else serialize Toc req get Path Info resp  doGet HttpServletRequest HttpServletResponse ServletException IOException UrlUtil getLocale setCharacterEncoding setContentType setHeader getPathInfo getParameter serializeTocs serializeTocs findTocContainingTopic getParameter serializeToc getPathInfo
Called by the server via the code service code method to allow a servlet to handle a POST request Handle the search requests protected void do Post Http Servlet Request req Http Servlet Response resp throws Servlet Exception IO Exception do Get req resp  doPost HttpServletRequest HttpServletResponse ServletException IOException doGet
XML representation of TOC private void serialize Toc String tocID Http Servlet Response resp throws Servlet Exception IO Exception I Toc toc Help Plugin get Toc Manager get Toc tocID locale serialize Toc toc resp  serializeToc HttpServletResponse ServletException IOException IToc HelpPlugin getTocManager getToc serializeToc
XML representation of TOC private void serialize Toc I Toc toc Http Servlet Response resp throws Servlet Exception IO Exception if toc null throw new Servlet Exception Toc Writer toc Writer new Toc Writer resp get Writer toc Writer generate toc true toc Writer close  serializeToc IToc HttpServletResponse ServletException IOException ServletException TocWriter tocWriter TocWriter getWriter tocWriter tocWriter
XML representation of TOC list private void serialize Tocs Http Servlet Response resp throws Servlet Exception IO Exception Toc Manager toc Manager Help Plugin get Toc Manager I Toc tocs toc Manager get Tocs locale Toc Writer gen new Toc Writer resp get Writer gen println tocs NON NLS 1 gen pad for int i 0 i tocs length i gen print Pad gen generate tocs i false gen pad gen println tocs NON NLS 1 gen close  serializeTocs HttpServletResponse ServletException IOException TocManager tocManager HelpPlugin getTocManager IToc tocManager getTocs TocWriter TocWriter getWriter printPad
private void serialize Tocs I Toc toc Http Servlet Response resp throws Servlet Exception IO Exception if toc null throw new Servlet Exception Toc Writer gen new Toc Writer resp get Writer gen println tocs NON NLS 1 gen pad gen print Pad gen generate toc false gen pad gen println tocs NON NLS 1 gen close  serializeTocs IToc HttpServletResponse ServletException IOException ServletException TocWriter TocWriter getWriter printPad
Finds a TOC that contains specified topic param topic the topic href private I Toc find Toc Containing Topic String topic if topic null topic equals NON NLS 1 return null int index topic index Of topic NON NLS 1 if index 1 topic topic substring index 6 index topic index Of if index 1 topic topic substring 0 index if topic null topic equals NON NLS 1 return null I Toc tocs Help Plugin get Toc Manager get Tocs locale for int i 0 i tocs length i if tocs i get Topic topic null return tocs i nothing found return null  IToc findTocContainingTopic indexOf indexOf IToc HelpPlugin getTocManager getTocs getTopic
private static class Toc Writer extends XML Generator param writer java io Writer public Toc Writer Writer writer super writer  TocWriter XMLGenerator TocWriter
Writes out xml data for a toc public void generate I Toc toc boolean gen Topics get the topic description String topic Description NON NLS 1 I Topic topic toc get Topic null if topic null topic Description topic get Href println toc label NON NLS 1 xml Escape toc get Label href NON NLS 1 reduceURL toc get Href topic NON NLS 1 reduceURL topic Description NON NLS 1 if gen Topics I Topic topics toc get Topics for int i 0 i topics length i generate topics i println toc NON NLS 1  IToc genTopics topicDescription ITopic getTopic topicDescription getHref xmlEscape getLabel getHref topicDescription genTopics ITopic getTopics
Generates part of navigation for a given Topic and it children Topic protected void generate I Topic topic pad print Pad String href topic get Href print topic label NON NLS 1 xml Escape topic get Label NON NLS 1 href null href reduceURL href NON NLS 1 NON NLS 2 NON NLS 3 I Topic subtopics topic get Subtopics if subtopics length 0 println NON NLS 1 for int i 0 i subtopics length i generate subtopics i print Pad println topic NON NLS 1 else println NON NLS 1 pad  ITopic printPad getHref xmlEscape getLabel ITopic getSubtopics printPad
Simplifies url path by removing string from the path return reduced url String param url String protected static String reduceURL String url if url null return url while true int index url index Of 1 NON NLS 1 if index 0 break there is no or nothing before to simplify String part1 url substring 0 index String part2 url substring index length NON NLS 1 index part1 last Index Of NON NLS 1 if index 0 url part1 substring 0 index part2 else url part2 return url  indexOf lastIndexOf

Constructor param locale public Webapp Working Set Manager Http Servlet Request request Http Servlet Response response String locale if Base Help System get Mode Base Help System MODE INFOCENTER w Set Manager new Infocenter Working Set Manager request response locale else w Set Manager Base Help System get Working Set Manager upon startup in workbench mode make sure working sets are in synch with those from UI if Base Help System get Mode Base Help System MODE WORKBENCH synchronized working Sets Sync Lock if working Sets Synchronized working Sets Synchronized true Bundle b Platform get Bundle org eclipse help ide NON NLS 1 if b null try b load Class org eclipse help ui internal ide Help Ide Plugin NON NLS 1 catch Class Not Found Exception cnfe Working Set Manager w Set Manager synchronize Working Sets  WebappWorkingSetManager HttpServletRequest HttpServletResponse BaseHelpSystem getMode BaseHelpSystem MODE_INFOCENTER wSetManager InfocenterWorkingSetManager wSetManager BaseHelpSystem getWorkingSetManager BaseHelpSystem getMode BaseHelpSystem MODE_WORKBENCH workingSetsSyncLock workingSetsSynchronized workingSetsSynchronized getBundle loadClass HelpIdePlugin ClassNotFoundException WorkingSetManager wSetManager synchronizeWorkingSets
public Adaptable Tocs Array get Root return w Set Manager get Root  AdaptableTocsArray getRoot wSetManager getRoot
Adds a new working set and saves it public void add Working Set Working Set working Set throws IO Exception w Set Manager add Working Set working Set  addWorkingSet WorkingSet workingSet IOException wSetManager addWorkingSet workingSet
Creates a new working set public Working Set create Working Set String name Adaptable Help Resource elements return w Set Manager create Working Set name elements  WorkingSet createWorkingSet AdaptableHelpResource wSetManager createWorkingSet
Returns a working set by name public Working Set get Working Set String name return w Set Manager get Working Set name  WorkingSet getWorkingSet wSetManager getWorkingSet
Implements I Working Set Manager see org eclipse ui I Working Set Manager get Working Sets public Working Set get Working Sets return w Set Manager get Working Sets  IWorkingSetManager IWorkingSetManager getWorkingSets WorkingSet getWorkingSets wSetManager getWorkingSets
Removes specified working set public void remove Working Set Working Set working Set w Set Manager remove Working Set working Set  removeWorkingSet WorkingSet workingSet wSetManager removeWorkingSet workingSet
Persists all working sets Should only be called by the webapp working set dialog param changed Working Set the working set that has changed public void working Set Changed Working Set changed Working Set throws IO Exception w Set Manager working Set Changed changed Working Set  changedWorkingSet workingSetChanged WorkingSet changedWorkingSet IOException wSetManager workingSetChanged changedWorkingSet
public Adaptable Toc get Adaptable Toc String href return w Set Manager get Adaptable Toc href  AdaptableToc getAdaptableToc wSetManager getAdaptableToc
public Adaptable Topic get Adaptable Topic String id return w Set Manager get Adaptable Topic id  AdaptableTopic getAdaptableTopic wSetManager getAdaptableTopic
public String get Current Working Set return w Set Manager get Current Working Set  getCurrentWorkingSet wSetManager getCurrentWorkingSet
public void set Current Working Set String scope w Set Manager set Current Working Set scope  setCurrentWorkingSet wSetManager setCurrentWorkingSet

amp gt lt quot apos NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 Constructor public XML Generator Writer writer if writer instanceof Print Writer this out Print Writer writer else this out new Print Writer writer  XMLGenerator PrintWriter PrintWriter PrintWriter
Constructor public XML Generator File out File super this out File out File try out new Print Writer new Buffered Writer new Output Stream Writer new File Output Stream out File UTF8 NON NLS 1 false no aoto Flush println xml version 1 0 encoding UTF 8 NON NLS 1 catch IO Exception ioe Help Webapp Plugin log Error Help Base Resources get String E014 out File get Absolute Path NON NLS 1 ioe  XMLGenerator outFile outFile outFile PrintWriter BufferedWriter OutputStreamWriter FileOutputStream outFile aotoFlush IOException HelpWebappPlugin logError HelpBaseResources getString outFile getAbsolutePath
by XML escaping special characters public static String xml Escape String cdata for int i 0 i invalidXML length i cdata T String change cdata invalidXML i escapedXML i return cdata  xmlEscape TString
public void close out flush out close if out check Error if out File null Help Webapp Plugin log Error Help Base Resources get String E015 out File get Absolute Path NON NLS 1 null out null  checkError outFile HelpWebappPlugin logError HelpBaseResources getString outFile getAbsolutePath
out null public void print Object o if out null out print o 
out print o public void println Object o print o print n NON NLS 1 
print n NON NLS 1 public void print Pad for int i 0 i pad i print NON NLS 1  printPad

Returns a string from a property file It uses name as a the key to retrieve from the webapp properties file public static String get String String name Locale locale get bundle Resource Bundle bundle get Bundle locale if bundle null return name get value try return bundle get String name catch Missing Resource Exception mre return name  getString ResourceBundle getBundle getString MissingResourceException
Returns a string from a property file public static String get String String name Locale locale String replace0 get bundle Resource Bundle bundle get Bundle locale if bundle null return name get value try String string From Properties File bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 return string From Properties File catch Exception e return name  getString ResourceBundle getBundle stringFromPropertiesFile getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Obtains resource bundle for specified locale Loads bundle if necessary param locale Locale or null to use default locale return Resource Bundle or null if not found private static Resource Bundle get Bundle Locale locale if locale null locale get Default Locale check cache Resource Bundle bundle Resource Bundle resource Bundle Table get locale load bundle if bundle null bundle Resource Bundle get Bundle Webapp Resources class get Name locale if bundle null resource Bundle Table put locale bundle return bundle  ResourceBundle ResourceBundle getBundle getDefaultLocale ResourceBundle ResourceBundle resourceBundleTable ResourceBundle getBundle WebappResources getName resourceBundleTable
private static Locale get Default Locale String nl Platform getNL sanity test if nl null return Locale get Default break the string into tokens to get the Locale object String Tokenizer locales new String Tokenizer nl   NON NLS 1 if locales count Tokens 1 return new Locale locales next Token NON NLS 1 else if locales count Tokens 2 return new Locale locales next Token locales next Token else if locales count Tokens 3 return new Locale locales next Token locales next Token locales next Token else return Locale get Default  getDefaultLocale getDefault StringTokenizer StringTokenizer _ countTokens nextToken countTokens nextToken nextToken countTokens nextToken nextToken nextToken getDefault

This constructor will be called when wrapping help resources public Adaptable Help Resource I Help Resource element this element element  AdaptableHelpResource IHelpResource
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter if adapter I Help Resource class return element else return null  IAdaptable getAdapter getAdapter IHelpResource
public abstract void save State Element element  saveState
public abstract void save State Element element public abstract Adaptable Help Resource get Children  saveState AdaptableHelpResource getChildren
public abstract Adaptable Help Resource get Children public I Adaptable get Parent return parent  AdaptableHelpResource getChildren IAdaptable getParent
protected void set Parent I Adaptable parent this parent parent  setParent IAdaptable
Tests the receiver and the object for equality param object object to compare the receiver to return true the object equals the receiver the name is the same false otherwise public boolean equals Object object if this object return true else if object instanceof Adaptable Help Resource return element Adaptable Help Resource object element else if object instanceof I Help Resource return element object else return false  AdaptableHelpResource AdaptableHelpResource IHelpResource
Returns the hash code return the hash code public int hash Code if element null return 1 else return element hash Code  hashCode hashCode
Returns a descendant topic with a specified href public abstract I Topic get Topic String href  ITopic getTopic
see org eclipse help I Help Resource get Href public String get Href return element get Href  IHelpResource getHref getHref getHref
see org eclipse help I Help Resource get Label public String get Label return element get Label  IHelpResource getLabel getLabel getLabel

This constructor will be called when wrapping help resources Adaptable Toc I Toc element super element  AdaptableToc IToc
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter if adapter I Toc class return element else return super get Adapter adapter  IAdaptable getAdapter getAdapter IToc getAdapter
public Adaptable Help Resource get Children if children null I Topic topics I Toc element get Topics children new Adaptable Topic topics length for int i 0 i topics length i children i new Adaptable Topic topics i children i set Parent this return children  AdaptableHelpResource getChildren ITopic IToc getTopics AdaptableTopic AdaptableTopic setParent
see org eclipse help I Toc get Topic java lang String public I Topic get Topic String href return I Toc element get Topic href  IToc getTopic ITopic getTopic IToc getTopic
see org eclipse help I Toc get Topics public I Topic get Topics return I Toc element get Topics  IToc getTopics ITopic getTopics IToc getTopics
public void save State Element element element set Attribute toc get Href NON NLS 1  saveState setAttribute getHref

This constructor will be called when wrapping help resources public Adaptable Tocs Array I Toc tocs this element tocs  AdaptableTocsArray IToc
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter if adapter I Toc class return element else return null  IAdaptable getAdapter getAdapter IToc
public I Adaptable get Children if children null children new Adaptable Toc element length for int i 0 i element length i children i new Adaptable Toc element i children i set Parent this return children  IAdaptable getChildren AdaptableToc AdaptableToc setParent
public Adaptable Toc get Adaptable Toc String href if map null get Children make sure children are initialized map new Hash Map children length for int i 0 i children length i map put children i get Href children i return Adaptable Toc map get href  AdaptableToc getAdaptableToc getChildren HashMap getHref AdaptableToc
I Toc as Array return element  IToc asArray
Tests the receiver and the object for equality param object object to compare the receiver to return true the object equals the receiver the name is the same false otherwise public boolean equals Object object if this object return true if object instanceof Adaptable Tocs Array return false Adaptable Tocs Array res Adaptable Tocs Array object return Arrays equals as Array res as Array  AdaptableTocsArray AdaptableTocsArray AdaptableTocsArray asArray asArray
Returns the hash code return the hash code public int hash Code if element null return 1 else return element hash Code  hashCode hashCode

This constructor will be called when wrapping help resources Adaptable Topic I Topic element super element  AdaptableTopic ITopic
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter if adapter I Topic class return element else return super get Adapter adapter  IAdaptable getAdapter getAdapter ITopic getAdapter
public Adaptable Help Resource get Children return new Adaptable Help Resource 0  AdaptableHelpResource getChildren AdaptableHelpResource
see org eclipse help I Topic get Subtopics public I Topic get Subtopics return I Topic element get Subtopics  ITopic getSubtopics ITopic getSubtopics ITopic getSubtopics
Returns a topic with the specified href br It is possible that multiple tocs have the same href in which case there is no guarantee which one is returned param href The topic s href value public I Topic get Topic String href if href null return null if topic Map null traverse TOC and fill in the topic Map topic Map new Hash Map topic Map put get Href element Fast Stack stack new Fast Stack I Topic topics get Subtopics for int i 0 i topics length i stack push topics i while stack is Empty I Topic topic I Topic stack pop if topic null String topic Href topic get Href if topic Href null topic Map put topic Href topic I Topic subtopics topic get Subtopics for int i 0 i subtopics length i stack push subtopics i return I Topic topic Map get href  ITopic getTopic topicMap topicMap topicMap HashMap topicMap getHref FastStack FastStack ITopic getSubtopics isEmpty ITopic ITopic topicHref getHref topicHref topicMap topicHref ITopic getSubtopics ITopic topicMap
public void save State Element element Adaptable Toc toc Adaptable Toc get Parent toc save State element Adaptable Help Resource topics toc get Children for int i 0 i topics length i if topics i this element set Attribute topic String value Of i NON NLS 1  saveState AdaptableToc AdaptableToc getParent saveState AdaptableHelpResource getChildren setAttribute valueOf

public interface I Help Working Set Manager public Adaptable Tocs Array get Root  IHelpWorkingSetManager AdaptableTocsArray getRoot
public Adaptable Tocs Array get Root Adds a new working set and saves it public void add Working Set Working Set working Set throws IO Exception  AdaptableTocsArray getRoot addWorkingSet WorkingSet workingSet IOException
Creates a new working set public Working Set create Working Set String name  WorkingSet createWorkingSet
Returns a working set by name 
Implements I Working Set Manager see org eclipse ui I Working Set Manager get Working Sets  IWorkingSetManager IWorkingSetManager getWorkingSets
public Working Set get Working Sets Removes specified working set public void remove Working Set Working Set working Set  WorkingSet getWorkingSets removeWorkingSet WorkingSet workingSet
Persists all working sets Should only be called by the webapp working set dialog param changed Working Set the working set that has changed public void working Set Changed Working Set changed Working Set  changedWorkingSet workingSetChanged WorkingSet changedWorkingSet
throws IO Exception public Adaptable Toc get Adaptable Toc String href  IOException AdaptableToc getAdaptableToc
public Adaptable Toc get Adaptable Toc String href public Adaptable Topic get Adaptable Topic String id  AdaptableToc getAdaptableToc AdaptableTopic getAdaptableTopic
public Adaptable Topic get Adaptable Topic String id public String get Current Working Set  AdaptableTopic getAdaptableTopic getCurrentWorkingSet
public String get Current Working Set public void set Current Working Set String working Set  getCurrentWorkingSet setCurrentWorkingSet workingSet

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 
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 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
Creates a listener list with an initial capacity of 3 public Listener List this 3  ListenerList
Creates a listener list with the given initial capacity param capacity the number of listeners which this list can initially accept without growing its internal representation must be at least 1 public Listener List int capacity if capacity 1 throw new Illegal Argument Exception this capacity capacity  ListenerList IllegalArgumentException
Adds the given listener to this list Has no effect if an identical listener is already registered param listener the listener public void add Object listener if listener null throw new Illegal Argument Exception if size 0 listeners new Object capacity else check for duplicates using identity for int i 0 i size i if listeners i listener return grow array if necessary if size listeners length System arraycopy listeners 0 listeners new Object size 2 1 0 size listeners size listener  IllegalArgumentException
Returns an array containing all the registered listeners The resulting array is unaffected by subsequent adds or removes If there are no listeners registered the result is an empty array singleton instance no garbage is created Use this method when notifying listeners so that any modifications to the listener list during the notification will have no effect on the notification itself return the list of registered listeners public Object get Listeners if size 0 return Empty Array Object result new Object size System arraycopy listeners 0 result 0 size return result  getListeners EmptyArray
Returns whether this listener list is empty return code true code if there are no registered listeners and code false code otherwise public boolean is Empty return size 0  isEmpty
Removes the given listener from this list Has no effect if an identical listener was not already registered param listener the listener public void remove Object listener if listener null throw new Illegal Argument Exception for int i 0 i size i if listeners i listener if size 1 listeners null size 0 else System arraycopy listeners i 1 listeners i size i listeners size null return  IllegalArgumentException
Returns the number of registered listeners return the number of registered listeners public int size return size 

private List elements public Working Set String name this name List null  WorkingSet
public Working Set String name List elements this name name if elements null elements new Array List this elements elements  WorkingSet ArrayList
public Working Set String name Adaptable Help Resource elements this name name if elements null elements new Adaptable Help Resource 0 this elements new Array List elements length for int i 0 i elements length i this elements add elements i  WorkingSet AdaptableHelpResource AdaptableHelpResource ArrayList
public void remove Element Adaptable Help Resource element Note this is based on equality of I Help Resource and Adaptable Help Resource elements remove element  removeElement AdaptableHelpResource IHelpResource AdaptableHelpResource
public String get Name return name  getName
public void set Name String new Name if new Name null return name new Name  setName newName newName newName
public Adaptable Help Resource get Elements Adaptable Help Resource array new Adaptable Help Resource elements size elements to Array array return array  AdaptableHelpResource getElements AdaptableHelpResource AdaptableHelpResource toArray
public void set Elements Adaptable Help Resource elements this elements new Array List elements length for int i 0 i elements length i this elements add elements i  setElements AdaptableHelpResource ArrayList
public void save State Element parent Document doc parent get Owner Document Element ws doc create Element working Set NON NLS 1 ws set Attribute name name NON NLS 1 parent append Child ws for Iterator it elements iterator it has Next Element child doc create Element item NON NLS 1 Adaptable Help Resource help Resource Adaptable Help Resource it next help Resource save State child ws append Child child  saveState getOwnerDocument createElement workingSet setAttribute appendChild hasNext createElement AdaptableHelpResource helpResource AdaptableHelpResource helpResource saveState appendChild

Implements Comparator see Comparator compare Object Object public int compare Object o1 Object o2 String name1 null String name2 null if o1 instanceof Working Set name1 Working Set o1 get Name if o2 instanceof Working Set name2 Working Set o2 get Name if name1 null name2 null return 1 return f Collator compare name1 name2  WorkingSet WorkingSet getName WorkingSet WorkingSet getName fCollator

Constructor public Working Set Manager restore State Help Plugin get Default add Tocs Changed Listener this  WorkingSetManager restoreState HelpPlugin getDefault addTocsChangedListener
public Adaptable Tocs Array get Root if root null root new Adaptable Tocs Array Help Plugin get Toc Manager get Tocs Platform getNL return root  AdaptableTocsArray getRoot AdaptableTocsArray HelpPlugin getTocManager getTocs
Adds a new working set and saves it public void add Working Set Working Set working Set if working Set null working Sets contains working Set return working Sets add working Set save State fire Property Change CHANGE WORKING SET ADD null working Set  addWorkingSet WorkingSet workingSet workingSet workingSets workingSet workingSets workingSet saveState firePropertyChange CHANGE_WORKING_SET_ADD workingSet
public void add Property Change Listener Property Change I Property Change Listener listener property Change Listeners add listener  addPropertyChangeListener PropertyChange IPropertyChangeListener propertyChangeListeners
Creates a new working set public Working Set create Working Set String name Adaptable Help Resource elements return new Working Set name elements  WorkingSet createWorkingSet AdaptableHelpResource WorkingSet
Tests the receiver and the object for equality param object object to compare the receiver to return true the object equals the receiver it has the same working sets false otherwise public boolean equals Object object if this object return true if object instanceof Working Set Manager Working Set Manager working Set Manager Working Set Manager object return working Set Manager working Sets equals working Sets return false  WorkingSetManager WorkingSetManager workingSetManager WorkingSetManager workingSetManager workingSets workingSets
Notify property change listeners about a change to the list of working sets param change Id one of CHANGE WORKING SET ADD CHANGE WORKING SET REMOVE CHANGE WORKING SET CONTENT CHANGE CHANGE WORKING SET NAME CHANGE param old Value the removed working set or null if a working set was added or changed param new Value the new or changed working set or null if a working set was removed private void fire Property Change String change Id Object old Value Object new Value final Property Change Property Change Event event new Property Change Property Change Event this change Id old Value new Value Object listeners property Change Listeners get Listeners for int i 0 i listeners length i Property Change I Property Change Listener listeners i property Change event  changeId CHANGE_WORKING_SET_ADD CHANGE_WORKING_SET_REMOVE CHANGE_WORKING_SET_CONTENT_CHANGE CHANGE_WORKING_SET_NAME_CHANGE oldValue newValue firePropertyChange changeId oldValue newValue PropertyChange PropertyChangeEvent PropertyChange PropertyChangeEvent changeId oldValue newValue propertyChangeListeners getListeners PropertyChange IPropertyChangeListener propertyChange
Returns a working set by name public Working Set get Working Set String name if name null working Sets null return null Iterator iter working Sets iterator while iter has Next Working Set working Set Working Set iter next if name equals working Set get Name return working Set return null  WorkingSet getWorkingSet workingSets workingSets hasNext WorkingSet workingSet WorkingSet workingSet getName workingSet
Returns the hash code return the hash code public int hash Code return working Sets hash Code  hashCode workingSets hashCode
Implements I Working Set Manager see org eclipse ui I Working Set Manager get Working Sets public Working Set get Working Sets return Working Set working Sets to Array new Working Set working Sets size  IWorkingSetManager IWorkingSetManager getWorkingSets WorkingSet getWorkingSets WorkingSet workingSets toArray WorkingSet workingSets
Returns the file used as the persistence store return the file used as the persistence store private File get Working Set State File I Path path Help Base Plugin get Default get State Location path path append WORKING SET STATE FILENAME return path to File  getWorkingSetStateFile IPath HelpBasePlugin getDefault getStateLocation WORKING_SET_STATE_FILENAME toFile
Removes specified working set public void remove Working Set Working Set working Set working Sets remove working Set save State fire Property Change CHANGE WORKING SET REMOVE working Set null  removeWorkingSet WorkingSet workingSet workingSets workingSet saveState firePropertyChange CHANGE_WORKING_SET_REMOVE workingSet
Reads the persistence store and creates the working sets stored in it public boolean restore State File state File get Working Set State File if state File exists try File Input Stream input new File Input Stream state File Input Stream Reader reader new Input Stream Reader input utf 8 NON NLS 1 Input Source input Source new Input Source reader input Source set System Id state File to String Document Builder parser document Builder Factory new Document Builder Document d parser parse input Source Element root Element d get Document Element restore Working Set State root Element input close return true catch Parser Configuration Exception pce String msg Help Base Resources get String Working Set Manager PCE NON NLS 1 Help Plugin log Error msg pce Help Plugin log Error Help Base Resources get String E041 pce NON NLS 1 return false catch SAX Exception se String msg Help Base Resources get String E018 state File to String NON NLS 1 Help Base Plugin log Error msg se Help Base Plugin log Error Help Base Resources get String E041 se NON NLS 1 return false catch IO Exception ioe String msg Help Base Resources get String E018 state File to String NON NLS 1 Help Base Plugin log Error msg ioe Help Base Plugin log Error Help Base Resources get String E041 ioe NON NLS 1 return false return false  restoreState stateFile getWorkingSetStateFile stateFile FileInputStream FileInputStream stateFile InputStreamReader InputStreamReader InputSource inputSource InputSource inputSource setSystemId stateFile toString DocumentBuilder documentBuilderFactory newDocumentBuilder inputSource rootElement getDocumentElement restoreWorkingSetState rootElement ParserConfigurationException HelpBaseResources getString WorkingSetManager HelpPlugin logError HelpPlugin logError HelpBaseResources getString SAXException HelpBaseResources getString stateFile toString HelpBasePlugin logError HelpBasePlugin logError HelpBaseResources getString IOException HelpBaseResources getString stateFile toString HelpBasePlugin logError HelpBasePlugin logError HelpBaseResources getString
Recreates all working sets from the persistence store and adds them to the receiver param parent the xml element containing serialized working sets private void restore Working Set State Element parent Node List working Sets parent get Child Nodes for int i 0 i working Sets get Length i if working Sets item i get Node Type Node ELEMENT NODE continue Working Set working Set restore Working Set Element working Sets item i if working Set null this working Sets add working Set  restoreWorkingSetState NodeList workingSets getChildNodes workingSets getLength workingSets getNodeType ELEMENT_NODE WorkingSet workingSet restoreWorkingSet workingSets workingSet workingSets workingSet
Recreates a working set from the persistence store return the working set created from the memento or null if creation failed private Working Set restore Working Set Element working Set Node String name working Set Node get Attribute name NON NLS 1 Node List items working Set Node get Elements By Tag Name item NON NLS 1 List help Resources new Array List items get Length for int i 0 i items get Length i Element item Element items item i String href item get Attribute toc NON NLS 1 if href null href length 0 continue String child pos item get Attribute topic NON NLS 1 int pos 1 if child pos null try pos Integer parse Int child pos catch Exception e Adaptable Help Resource toc get Adaptable Toc href if toc null return null if pos 1 Create the adaptable toc help Resources add toc else Create the adaptable topic Adaptable Topic topics Adaptable Topic toc get Children if pos 0 topics length pos help Resources add topics pos Adaptable Help Resource elements new Adaptable Help Resource help Resources size help Resources to Array elements Working Set ws create Working Set name elements return ws  WorkingSet restoreWorkingSet workingSetNode workingSetNode getAttribute NodeList workingSetNode getElementsByTagName helpResources ArrayList getLength getLength getAttribute child_pos getAttribute child_pos parseInt child_pos AdaptableHelpResource getAdaptableToc helpResources AdaptableTopic AdaptableTopic getChildren helpResources AdaptableHelpResource AdaptableHelpResource helpResources helpResources toArray WorkingSet createWorkingSet
public void remove Property Change Listener Property Change I Property Change Listener listener property Change Listeners remove listener  removePropertyChangeListener PropertyChange IPropertyChangeListener propertyChangeListeners
Saves the working sets in the persistence store public synchronized boolean save State File state File null try Document Builder doc Builder document Builder Factory new Document Builder Document doc doc Builder new Document Element root Element doc create Element working Sets NON NLS 1 doc append Child root Element save Working Set State root Element state File get Working Set State File state File get Parent File mkdir File Output Stream stream new File Output Stream state File Transformer transformer transformer Factory new Transformer transformer set Output Property Output Keys METHOD xml NON NLS 1 transformer set Output Property Output Keys ENCODING UTF 8 NON NLS 1 DOM Source source new DOM Source doc Stream Result result new Stream Result stream transformer transform source result stream close return true catch Parser Configuration Exception pce String msg Help Base Resources get String Working Set Manager PCE NON NLS 1 Help Plugin log Error msg pce return false catch Transformer Exception e String message Help Base Resources get String Working Set Manager transformer NON NLS 1 Help Plugin log Error message null return false catch IO Exception e state File delete String message Help Base Resources get String E40 NON NLS 1 Help Base Plugin log Error message null return false  saveState stateFile DocumentBuilder docBuilder documentBuilderFactory newDocumentBuilder docBuilder newDocument rootElement createElement workingSets appendChild rootElement saveWorkingSetState rootElement stateFile getWorkingSetStateFile stateFile getParentFile FileOutputStream FileOutputStream stateFile transformerFactory newTransformer setOutputProperty OutputKeys setOutputProperty OutputKeys DOMSource DOMSource StreamResult StreamResult ParserConfigurationException HelpBaseResources getString WorkingSetManager HelpPlugin logError TransformerException HelpBaseResources getString WorkingSetManager HelpPlugin logError IOException stateFile HelpBaseResources getString HelpBasePlugin logError
Saves all persistable working sets in the persistence store param parent the xml node to save to private void save Working Set State Element parent Iterator iterator working Sets iterator while iterator has Next Working Set working Set Working Set iterator next working Set save State parent  saveWorkingSetState workingSets hasNext WorkingSet workingSet WorkingSet workingSet saveState
Persists all working sets Should only be called by the webapp working set dialog param changed Working Set the working set that has changed public void working Set Changed Working Set changed Working Set save State fire Property Change CHANGE WORKING SET NAME CHANGE null changed Working Set fire Property Change CHANGE WORKING SET CONTENT CHANGE null changed Working Set  changedWorkingSet workingSetChanged WorkingSet changedWorkingSet saveState firePropertyChange CHANGE_WORKING_SET_NAME_CHANGE changedWorkingSet firePropertyChange CHANGE_WORKING_SET_CONTENT_CHANGE changedWorkingSet
Synchronizes the working sets Should only be called by the webapp working set manager dialog public void synchronize Working Sets fire Property Change CHANGE WORKING SETS SYNCH null null  synchronizeWorkingSets firePropertyChange CHANGE_WORKING_SETS_SYNCH
public Adaptable Toc get Adaptable Toc String href return get Root get Adaptable Toc href  AdaptableToc getAdaptableToc getRoot getAdaptableToc
public Adaptable Topic get Adaptable Topic String id if id null id length 0 return null toc id s are hrefs plugin Id path to toc xml topic id s are based on parent toc id and index of topic plugin Id path to toc xml index  int len id length if id char At len 1   This is a first level topic String index Str id substring id last Index Of   len 2 1 len 1 int index 0 try index Integer parse Int index Str catch Exception e String toc Str id substring 0 id last Index Of   len 2 Adaptable Toc toc get Adaptable Toc toc Str if toc null return null I Adaptable topics toc get Children if index 0 index topics length return null else return Adaptable Topic topics index return null  AdaptableTopic getAdaptableTopic pluginId pluginId xml_index_ charAt _ indexStr lastIndexOf _ parseInt indexStr tocStr lastIndexOf _ AdaptableToc getAdaptableToc tocStr IAdaptable getChildren AdaptableTopic
return null public String get Current Working Set return Help Base Plugin get Default get Plugin Preferences get String Base Help System WORKING SET  getCurrentWorkingSet HelpBasePlugin getDefault getPluginPreferences getString BaseHelpSystem WORKING_SET
public void set Current Working Set String working Set Help Base Plugin get Default get Plugin Preferences set Value Base Help System WORKING SET working Set Help Base Plugin get Default save Plugin Preferences  setCurrentWorkingSet workingSet HelpBasePlugin getDefault getPluginPreferences setValue BaseHelpSystem WORKING_SET workingSet HelpBasePlugin getDefault savePluginPreferences
public void tocs Changed save State List old Working Sets new Array List working Sets root null working Sets new Tree Set new Working Set Comparator restore State List new Working Sets new Array List working Sets for Iterator it old Working Sets iterator it has Next Working Set ws Working Set it next fire Property Change CHANGE WORKING SET REMOVE ws null for Iterator it new Working Sets iterator it has Next Working Set ws Working Set it next fire Property Change CHANGE WORKING SET ADD null ws  tocsChanged saveState oldWorkingSets ArrayList workingSets workingSets TreeSet WorkingSetComparator restoreState newWorkingSets ArrayList workingSets oldWorkingSets hasNext WorkingSet WorkingSet firePropertyChange CHANGE_WORKING_SET_REMOVE newWorkingSets hasNext WorkingSet WorkingSet firePropertyChange CHANGE_WORKING_SET_ADD

Obtains the topics directly contained by a toc return Array of I Topic  ITopic
Returns a topic with the specified href defined by this TOC br If the TOC contains multiple topics with the same href only of them arbitrarily chosen will be returned p If no topic is specified then the TOC description topic is returned or null if there is no description topic for the TOC p param href the topic s URL or null return I Topic or null  ITopic

Obtains the topics contained in this node return Array of I Topic  ITopic

Constructs help system param options array of String options and their values p Option code eclipse Home dir code specifies Eclipse installation directory This directory is a parent to plugins directory and eclipse executable The option must be provided when current directory from which infocenter is launched is not the same as Eclipse installation directory p Option code host help Server Host code specifies host name of the interface that help server will use It overrides host name specified in the application server plugin preferences p Option code port help Server Port code specifies port number that help server will use It overrides port number specified in the application server plugin preferences p Option code dir rtl code sets right to left rendering direction of help UI in the browser p Additionally most options accepted by Eclipse execuable are supported public Help String options help new Standalone Help options  eclipseHome helpServerHost helpServerPort StandaloneHelp
This contstructs the stand alone help param plugins Dir directory containing Eclipse plugins deprecated use Help Help String public Help String plugins Dir File plugins new File plugins Dir String install plugins get Parent Array List options new Array List 2 if install null options new Array List 2 options add eclipse Home NON NLS 1 options add install String args new String options size options to Array args help new Standalone Help args  pluginsDir pluginsDir pluginsDir getParent ArrayList ArrayList ArrayList eclipseHome toArray StandaloneHelp
Starts the stand alone help system public void start throws Exception help start 
Shuts down the stand alone help system public void shutdown throws Exception help shutdown 
Displays help public void display Help throws Exception help display Help  displayHelp displayHelp
Displays specified help resource param href the href of the table of contents public void display Help String href throws Exception help display Help href  displayHelp displayHelp
Displays context sensitive help param context Id context id param x x coordinate param y y coordinate public void display Context String context Id int x int y throws Exception help display Context context Id x y  contextId displayContext contextId displayContext contextId
Displays context sensitive help in infopop param context Id context id param x x coordinate param y y coordinate public void display Context Infopop String context Id int x int y throws Exception help display Context Infopop context Id x y  contextId displayContextInfopop contextId displayContextInfopop contextId
Controls standalone help system from command line param args array of String containing options Options are code command start shutdown display Help href eclipsehome eclipse Install Path host help Server Host port help Server Port dir rtl platform options vmargs JavaV Marguments code where ul li code href code is the URL of the help resource to display li li code eclipse Install Path code specifies Eclipse installation directory it must be provided when current directory is not the same as Eclipse installation directory li li code help Server Host code specifies host name of the interface that help server will use it overrides host name specified the application server plugin preferences li li code help Server Port code specifies port number that help server will use it overrides port number specified the application server plugin preferences li li code dir rtl code sets right to left rendering direction of help UI in the browser li code platform options code are other options that are supported by Eclipse Executable li ul public static void main String args Standalone Help main args  displayHelp eclipseInstallPath helpServerHost helpServerPort JavaVMarguments eclipseInstallPath helpServerHost helpServerPort StandaloneHelp

private Standalone Infocenter infocenter Constructs Infocenter param options array of String options and their values p Option code eclipse Home dir code specifies Eclipse installation directory This directory is a parent to plugins directory and eclipse executable The option must be provided when current directory from which infocenter is launched is not the same as Eclipse installation directory p Option code host help Server Host code specifies host name of the interface that help server will use It overrides host name specified in the application server plugin preferences p Option code port help Server Port code specifies port number that help server will use It overrides port number specified in the application server plugin preferences p Option code dir rtl code sets right to left rendering direction of help UI in the browser p Option code noexec code indicates that Eclipse executable should not be used p Additionally most options accepted by Eclipse execuable are supported public Infocenter String options infocenter new Standalone Infocenter options  StandaloneInfocenter eclipseHome helpServerHost helpServerPort StandaloneInfocenter
Starts the stand alone infocenter public void start throws Exception infocenter start 
Shuts down the stand alone infocenter public void shutdown throws Exception infocenter shutdown 
Controls start up and shut down of infocenter from command line param args array of String containing options Options are code command start shutdown eclipsehome eclipse Install Path host help Server Host port help Server Port dir rtl noexec platform options vmargs JavaV Marguments code where ul li code eclipse Install Path code specifies Eclipse installation directory it must be provided when current directory is not the same as Eclipse installation directory li li code help Server Host code specifies host name of the interface that help server will use it overrides host name specified the application server plugin preferences li li code help Server Port code specifies port number that help server will use it overrides port number specified the application server plugin preferences li li code dir rtl code sets right to left rendering direction of help UI in the browser li code noexec code option indicates that Eclipse executable should not be used li li code platform options code are other options that are supported by Eclipse Executable li ul public static void main String args Standalone Infocenter main args  eclipseInstallPath helpServerHost helpServerPort JavaVMarguments eclipseInstallPath helpServerHost helpServerPort StandaloneInfocenter

see I Workbench Window Action Delegate dispose public void dispose  IWorkbenchWindowActionDelegate
see I Workbench Window Action Delegate init I Workbench Window public void init I Workbench Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow
see I Executable Extension set Initialization Data I Configuration Element String Object public void set Initialization Data I Configuration Element config String property Name Object data throws Core Exception url config get Attribute url NON NLS 1  IExecutableExtension setInitializationData IConfigurationElement setInitializationData IConfigurationElement propertyName CoreException getAttribute
see I Action Delegate run I Action public void run I Action action if url null equals url NON NLS 1 return I Browser browser Browser Manager get Instance create Browser true try browser displayURL url catch Exception e Error Util display Error Dialog e get Message  IActionDelegate IAction IAction IBrowser BrowserManager getInstance createBrowser ErrorUtil displayErrorDialog getMessage
see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection

text Server Port add Modify Listener new Modify Listener public void modify Text Modify Event e try int num Integer value Of text Server Port get Text int Value if 0 num num 0xFFFF port is valid Appserver Preference Page this set Valid true set Error Message null return port is invalid catch Number Format Exception nfe Appserver Preference Page this set Valid false set Error Message HelpUI Resources get String Appserver Preference Page invalid Port NON NLS 1  textServerPort addModifyListener ModifyListener modifyText ModifyEvent valueOf textServerPort getText intValue AppserverPreferencePage setValid setErrorMessage NumberFormatException AppserverPreferencePage setValid setErrorMessage HelpUIResources getString AppserverPreferencePage invalidPort
label set Font bold Font label add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e bold Font dispose  setFont boldFont addDisposeListener DisposeListener widgetDisposed DisposeEvent boldFont
protected Text text Server Port Creates preference page controls on demand param parent the parent for the preference page protected Control create Contents Composite parent Font font parent get Font Workbench Help set Help parent I HelpUI Constants PREF PAGE APPSERVER Composite main Composite new Composite parent SWT NULL main Composite set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 2 main Composite set Layout layout Label label new Label main Composite SWT NONE label set Text HelpUI Resources get String Appserver Preference Page description NON NLS 1 Grid Data data new Grid Data data horizontal Span 2 label set Layout Data data label set Font font Spacer label new Label main Composite SWT NONE data new Grid Data data horizontal Span 2 label set Layout Data data label set Font font label new Label main Composite SWT NONE label set Font font label set Text HelpUI Resources get String Appserver Preference Page host Description NON NLS 1 data new Grid Data data horizontal Span 2 label set Layout Data data Label label Host new Label main Composite SWT LEFT label Host set Text Workbench Resources get String Appserver Preference Page host data new Grid Data label Host set Layout Data data label Host set Font font text Server Addr new Text main Composite SWT SINGLE SWT BORDER text add Listener SWT Modify this data new Grid Data data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true data horizontal Span 2 text Server Addr set Layout Data data text Server Addr set Font font Spacer label new Label main Composite SWT NONE data new Grid Data data horizontal Span 2 label set Layout Data data label set Font font label new Label main Composite SWT NONE label set Font font label set Text HelpUI Resources get String Appserver Preference Page port Description NON NLS 1 data new Grid Data data horizontal Span 2 label set Layout Data data label set Font font Label label Port new Label main Composite SWT LEFT label Port set Text Workbench Resources get String Appserver Preference Page port data new Grid Data label Port set Layout Data data label Port set Font font text Server Port new Text main Composite SWT SINGLE SWT BORDER text Server Port set Text Limit 5 data new Grid Data data width Hint convert Width In Chars To Pixels 8 data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true data horizontal Span 2 text Server Port set Layout Data data text Server Port set Font font Validation of port field text Server Port add Modify Listener new Modify Listener public void modify Text Modify Event e try int num Integer value Of text Server Port get Text int Value if 0 num num 0xFFFF port is valid Appserver Preference Page this set Valid true set Error Message null return port is invalid catch Number Format Exception nfe Appserver Preference Page this set Valid false set Error Message HelpUI Resources get String Appserver Preference Page invalid Port NON NLS 1 Spacer label new Label main Composite SWT NONE data new Grid Data data horizontal Span 2 label set Layout Data data label set Font font label new Label main Composite SWT NONE label set Text HelpUI Resources get String Appserver Preference Page Note NON NLS 1 Make this bold Font Data font Data font get Font Data for int i 0 i font Data length i font Data i set Style font Data i get Style SWT BOLD final Font bold Font new Font label get Display font Data label set Font bold Font label add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e bold Font dispose data new Grid Data Grid Data VERTICAL ALIGN BEGINNING data horizontal Span 2 label set Layout Data data label new Label main Composite SWT NONE label set Text HelpUI Resources get String Appserver Preference Page require Restart NON NLS 1 data new Grid Data data horizontal Span 2 label set Layout Data data label set Font font Preferences pref Appserver Plugin get Default get Plugin Preferences text Server Addr set Text pref get String Appserver Plugin HOST KEY text Server Port set Text pref get String Appserver Plugin PORT KEY return main Composite  textServerPort createContents getFont WorkbenchHelp setHelp IHelpUIConstants PREF_PAGE_APPSERVER mainComposite mainComposite setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout marginHeight marginWidth numColumns mainComposite setLayout mainComposite setText HelpUIResources getString AppserverPreferencePage GridData GridData horizontalSpan setLayoutData setFont mainComposite GridData horizontalSpan setLayoutData setFont mainComposite setFont setText HelpUIResources getString AppserverPreferencePage hostDescription GridData horizontalSpan setLayoutData labelHost mainComposite labelHost setText WorkbenchResources getString AppserverPreferencePage GridData labelHost setLayoutData labelHost setFont textServerAddr mainComposite addListener GridData horizontalAlignment GridData grabExcessHorizontalSpace horizontalSpan textServerAddr setLayoutData textServerAddr setFont mainComposite GridData horizontalSpan setLayoutData setFont mainComposite setFont setText HelpUIResources getString AppserverPreferencePage portDescription GridData horizontalSpan setLayoutData setFont labelPort mainComposite labelPort setText WorkbenchResources getString AppserverPreferencePage GridData labelPort setLayoutData labelPort setFont textServerPort mainComposite textServerPort setTextLimit GridData widthHint convertWidthInCharsToPixels horizontalAlignment GridData grabExcessHorizontalSpace horizontalSpan textServerPort setLayoutData textServerPort setFont textServerPort addModifyListener ModifyListener modifyText ModifyEvent valueOf textServerPort getText intValue AppserverPreferencePage setValid setErrorMessage NumberFormatException AppserverPreferencePage setValid setErrorMessage HelpUIResources getString AppserverPreferencePage invalidPort mainComposite GridData horizontalSpan setLayoutData setFont mainComposite setText HelpUIResources getString AppserverPreferencePage FontData fontData getFontData fontData fontData setStyle fontData getStyle boldFont getDisplay fontData setFont boldFont addDisposeListener DisposeListener widgetDisposed DisposeEvent boldFont GridData GridData VERTICAL_ALIGN_BEGINNING horizontalSpan setLayoutData mainComposite setText HelpUIResources getString AppserverPreferencePage requireRestart GridData horizontalSpan setLayoutData setFont AppserverPlugin getDefault getPluginPreferences textServerAddr setText getString AppserverPlugin HOST_KEY textServerPort setText getString AppserverPlugin PORT_KEY mainComposite
see I Workbench Preference Page public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench
Performs special processing when this page s Defaults button has been pressed p This is a framework hook method for sublcasses 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 Preferences pref Appserver Plugin get Default get Plugin Preferences text Server Addr set Text pref get Default String Appserver Plugin HOST KEY text Server Port set Text pref get Default String Appserver Plugin PORT KEY super perform Defaults  performDefaults performDefaults AppserverPlugin getDefault getPluginPreferences textServerAddr setText getDefaultString AppserverPlugin HOST_KEY textServerPort setText getDefaultString AppserverPlugin PORT_KEY performDefaults
see I Preference Page public boolean perform Ok Preferences pref Appserver Plugin get Default get Plugin Preferences pref set Value Appserver Plugin HOST KEY text Server Addr get Text pref set Value Appserver Plugin PORT KEY text Server Port get Text Appserver Plugin get Default save Plugin Preferences return true  IPreferencePage performOk AppserverPlugin getDefault getPluginPreferences setValue AppserverPlugin HOST_KEY textServerAddr getText setValue AppserverPlugin PORT_KEY textServerPort getText AppserverPlugin getDefault savePluginPreferences

custom Browser Radio radio radio add Selection Listener new Selection Listener public void widget Selected Selection Event sel Event set Custom Browser Path Enabled  customBrowserRadio addSelectionListener SelectionListener widgetSelected SelectionEvent selEvent setCustomBrowserPathEnabled
set Custom Browser Path Enabled public void widget Default Selected Selection Event sel Event widget Selected sel Event  setCustomBrowserPathEnabled widgetDefaultSelected SelectionEvent selEvent widgetSelected selEvent
private Button custom Browser Browse Creates preference page controls on demand param parent the parent for the preference page protected Control create Contents Composite parent Workbench Help set Help parent I HelpUI Constants PREF PAGE BROWSERS Composite main Composite new Composite parent SWT NULL Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL main Composite set Layout Data data Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 main Composite set Layout layout Label description new Label main Composite SWT NULL description set Text HelpUI Resources get String select browser NON NLS 1 create Spacer main Composite if Browser Manager get Instance is Embedded Browser Present always External new Button main Composite SWT CHECK always External set Layout Data new Grid Data Grid Data GRAB HORIZONTAL always External set Text HelpUI Resources get String use only external browser NON NLS 1 always External set Selection Help Base Plugin get Default get Plugin Preferences get Boolean Browser Manager ALWAYS EXTERNAL BROWSER KEY create Spacer main Composite Label table Description new Label main Composite SWT NULL table Description set Text HelpUI Resources get String current browser NON NLS 1 data new Grid Data Grid Data VERTICAL ALIGN BEGINNING description set Layout Data data Color bg Color parent get Display get System Color SWT COLOR LIST BACKGROUND Color fg Color parent get Display get System Color SWT COLOR LIST FOREGROUND final Scrolled Composite external Browsers Scrollable new Scrolled Composite main Composite SWT BORDER SWT H SCROLL SWT V SCROLL Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint convert Height In Chars To Pixels 2 external Browsers Scrollable set Layout Data gd external Browsers Scrollable set Background bg Color external Browsers Scrollable set Foreground fg Color Composite external Browsers Composite new Composite external Browsers Scrollable SWT NONE external Browsers Scrollable set Content external Browsers Composite Grid Layout layout2 new Grid Layout external Browsers Composite set Layout layout2 external Browsers Composite set Background bg Color external Browsers Composite set Foreground fg Color Browser Descriptor descriptors Browser Manager get Instance get Browser Descriptors external Browsers new Button descriptors length for int i 0 i descriptors length i Button radio new Button external Browsers Composite SWT RADIO org eclipse jface dialogs Dialog apply Dialog Font radio radio set Background bg Color radio set Foreground fg Color radio set Text descriptors i get Label if Browser Manager get Instance get Current BrowserID equals descriptors i getID radio set Selection true else radio set Selection false radio set Data descriptors i external Browsers i radio if Browser Manager BROWSER ID CUSTOM equals descriptors i getID custom Browser Radio radio radio add Selection Listener new Selection Listener public void widget Selected Selection Event sel Event set Custom Browser Path Enabled public void widget Default Selected Selection Event sel Event widget Selected sel Event external Browsers Composite set Size external Browsers Composite compute Size SWT DEFAULT SWT DEFAULT create Custom Browser Path Part main Composite org eclipse jface dialogs Dialog apply Dialog Font main Composite create Spacer main Composite return main Composite  customBrowserBrowse createContents WorkbenchHelp setHelp IHelpUIConstants PREF_PAGE_BROWSERS mainComposite GridData GridData verticalAlignment GridData horizontalAlignment GridData mainComposite setLayoutData GridLayout GridLayout marginHeight marginWidth mainComposite setLayout mainComposite setText HelpUIResources getString select_browser createSpacer mainComposite BrowserManager getInstance isEmbeddedBrowserPresent alwaysExternal mainComposite alwaysExternal setLayoutData GridData GridData GRAB_HORIZONTAL alwaysExternal setText HelpUIResources getString use_only_external_browser alwaysExternal setSelection HelpBasePlugin getDefault getPluginPreferences getBoolean BrowserManager ALWAYS_EXTERNAL_BROWSER_KEY createSpacer mainComposite tableDescription mainComposite tableDescription setText HelpUIResources getString current_browser GridData GridData VERTICAL_ALIGN_BEGINNING setLayoutData bgColor getDisplay getSystemColor COLOR_LIST_BACKGROUND fgColor getDisplay getSystemColor COLOR_LIST_FOREGROUND ScrolledComposite externalBrowsersScrollable ScrolledComposite mainComposite H_SCROLL V_SCROLL GridData GridData GridData FILL_BOTH heightHint convertHeightInCharsToPixels externalBrowsersScrollable setLayoutData externalBrowsersScrollable setBackground bgColor externalBrowsersScrollable setForeground fgColor externalBrowsersComposite externalBrowsersScrollable externalBrowsersScrollable setContent externalBrowsersComposite GridLayout GridLayout externalBrowsersComposite setLayout externalBrowsersComposite setBackground bgColor externalBrowsersComposite setForeground fgColor BrowserDescriptor BrowserManager getInstance getBrowserDescriptors externalBrowsers externalBrowsersComposite applyDialogFont setBackground bgColor setForeground fgColor setText getLabel BrowserManager getInstance getCurrentBrowserID setSelection setSelection setData externalBrowsers BrowserManager BROWSER_ID_CUSTOM customBrowserRadio addSelectionListener SelectionListener widgetSelected SelectionEvent selEvent setCustomBrowserPathEnabled widgetDefaultSelected SelectionEvent selEvent widgetSelected selEvent externalBrowsersComposite setSize externalBrowsersComposite computeSize createCustomBrowserPathPart mainComposite applyDialogFont mainComposite createSpacer mainComposite mainComposite
custom Browser Browse set Layout Data data custom Browser Browse add Selection Listener new Selection Listener public void widget Default Selected Selection Event event  customBrowserBrowse setLayoutData customBrowserBrowse addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Selected Selection Event event File Dialog d new File Dialog get Shell d set Text HelpUI Resources get String Custom Browser Preference Page Details NON NLS 1 String file d open if file null custom Browser Path set Text file 1 NON NLS 1 NON NLS 2  widgetSelected SelectionEvent FileDialog FileDialog getShell setText HelpUIResources getString CustomBrowserPreferencePage customBrowserPath setText
private void create Custom Browser Path Part Composite main Composite Font font main Composite get Font vertical space new Label main Composite SWT NULL Composite b Path Composite new Composite main Composite SWT NULL Workbench Help set Help b Path Composite I HelpUI Constants PREF PAGE CUSTOM BROWSER PATH Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 layout num Columns 3 b Path Composite set Layout layout b Path Composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL custom Browser Path Label new Label b Path Composite SWT LEFT custom Browser Path Label set Font font custom Browser Path Label set Text HelpUI Resources get String Custom Browser Preference Page Program NON NLS 1 custom Browser Path new Text b Path Composite SWT BORDER custom Browser Path set Layout Data new Grid Data Grid Data FILL HORIZONTAL custom Browser Path set Font font custom Browser Path set Text Help Base Plugin get Default get Plugin Preferences get String Custom Browser CUSTOM BROWSER PATH KEY Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Alignment Grid Data FILL data width Hint convert Width In Chars To Pixels 10 custom Browser Path set Layout Data data custom Browser Browse new Button b Path Composite SWT NONE custom Browser Browse set Font font custom Browser Browse set Text HelpUI Resources get String Custom Browser Preference Page Browse NON NLS 1 data new Grid Data data horizontal Alignment Grid Data FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint custom Browser Browse compute Size SWT DEFAULT SWT DEFAULT true x custom Browser Browse set Layout Data data custom Browser Browse add Selection Listener new Selection Listener public void widget Default Selected Selection Event event public void widget Selected Selection Event event File Dialog d new File Dialog get Shell d set Text HelpUI Resources get String Custom Browser Preference Page Details NON NLS 1 String file d open if file null custom Browser Path set Text file 1 NON NLS 1 NON NLS 2 set Custom Browser Path Enabled  createCustomBrowserPathPart mainComposite mainComposite getFont mainComposite bPathComposite mainComposite WorkbenchHelp setHelp bPathComposite IHelpUIConstants PREF_PAGE_CUSTOM_BROWSER_PATH GridLayout GridLayout marginWidth marginHeight numColumns bPathComposite setLayout bPathComposite setLayoutData GridData GridData FILL_HORIZONTAL customBrowserPathLabel bPathComposite customBrowserPathLabel setFont customBrowserPathLabel setText HelpUIResources getString CustomBrowserPreferencePage customBrowserPath bPathComposite customBrowserPath setLayoutData GridData GridData FILL_HORIZONTAL customBrowserPath setFont customBrowserPath setText HelpBasePlugin getDefault getPluginPreferences getString CustomBrowser CUSTOM_BROWSER_PATH_KEY GridData GridData GridData FILL_HORIZONTAL horizontalAlignment GridData widthHint convertWidthInCharsToPixels customBrowserPath setLayoutData customBrowserBrowse bPathComposite customBrowserBrowse setFont customBrowserBrowse setText HelpUIResources getString CustomBrowserPreferencePage GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint customBrowserBrowse computeSize customBrowserBrowse setLayoutData customBrowserBrowse addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent FileDialog FileDialog getShell setText HelpUIResources getString CustomBrowserPreferencePage customBrowserPath setText setCustomBrowserPathEnabled
see I Workbench Preference Page public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench
Performs special processing when this page s Defaults button has been pressed p This is a framework hook method for sublcasses 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 String default BrowserID Browser Manager get Instance get Default BrowserID for int i 0 i external Browsers length i Browser Descriptor descriptor Browser Descriptor external Browsers i get Data external Browsers i set Selection descriptor getID default BrowserID custom Browser Path set Text Help Base Plugin get Default get Plugin Preferences get Default String Custom Browser CUSTOM BROWSER PATH KEY set Custom Browser Path Enabled if always External null always External set Selection Help Base Plugin get Default get Plugin Preferences get Default Boolean Browser Manager ALWAYS EXTERNAL BROWSER KEY super perform Defaults  performDefaults performDefaults defaultBrowserID BrowserManager getInstance getDefaultBrowserID externalBrowsers BrowserDescriptor BrowserDescriptor externalBrowsers getData externalBrowsers setSelection defaultBrowserID customBrowserPath setText HelpBasePlugin getDefault getPluginPreferences getDefaultString CustomBrowser CUSTOM_BROWSER_PATH_KEY setCustomBrowserPathEnabled alwaysExternal alwaysExternal setSelection HelpBasePlugin getDefault getPluginPreferences getDefaultBoolean BrowserManager ALWAYS_EXTERNAL_BROWSER_KEY performDefaults
see I Preference Page public boolean perform Ok Preferences pref Help Base Plugin get Default get Plugin Preferences for int i 0 i external Browsers length i if external Browsers i get Selection set new current browser String browserID Browser Descriptor external Browsers i get Data getID Browser Manager get Instance set Current BrowserID browserID save id in help preferences pref set Value Browser Manager DEFAULT BROWSER ID KEY browserID break pref set Value Custom Browser CUSTOM BROWSER PATH KEY custom Browser Path get Text if always External null pref set Value Browser Manager ALWAYS EXTERNAL BROWSER KEY always External get Selection Browser Manager get Instance set Always Use External always External get Selection Help Base Plugin get Default save Plugin Preferences return true  IPreferencePage performOk HelpBasePlugin getDefault getPluginPreferences externalBrowsers externalBrowsers getSelection BrowserDescriptor externalBrowsers getData BrowserManager getInstance setCurrentBrowserID setValue BrowserManager DEFAULT_BROWSER_ID_KEY setValue CustomBrowser CUSTOM_BROWSER_PATH_KEY customBrowserPath getText alwaysExternal setValue BrowserManager ALWAYS_EXTERNAL_BROWSER_KEY alwaysExternal getSelection BrowserManager getInstance setAlwaysUseExternal alwaysExternal getSelection HelpBasePlugin getDefault savePluginPreferences
Creates a horizontal spacer line that fills the width of its container param parent the parent control private void create Spacer Composite parent Label spacer new Label parent SWT NONE Grid Data data new Grid Data data horizontal Alignment Grid Data FILL data vertical Alignment Grid Data BEGINNING spacer set Layout Data data  createSpacer GridData GridData horizontalAlignment GridData verticalAlignment GridData setLayoutData
private void set Custom Browser Path Enabled boolean enabled custom Browser Radio get Selection custom Browser Path Label set Enabled enabled custom Browser Path set Enabled enabled custom Browser Browse set Enabled enabled  setCustomBrowserPathEnabled customBrowserRadio getSelection customBrowserPathLabel setEnabled customBrowserPath setEnabled customBrowserBrowse setEnabled

shell add Control Listener new Control Listener public void control Moved Control Event e if shell get Maximized Point location shell get Location x location x y location y  addControlListener ControlListener controlMoved ControlEvent getMaximized getLocation
public void control Resized Control Event e if shell get Maximized Point size shell get Size w size x h size y  controlResized ControlEvent getMaximized getSize
shell add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e save position store set Value BROWSER X Integer to String x store set Value BROWSER Y Integer to String y store set Value BROWSER WIDTH Integer to String w store set Value BROWSER HEIGTH Integer to String h store set Value BROWSER MAXIMIZED new Boolean shell get Maximized to String  addDisposeListener DisposeListener widgetDisposed DisposeEvent setValue BROWSER_X toString setValue BROWSER_Y toString setValue BROWSER_WIDTH toString setValue BROWSER_HEIGTH toString setValue BROWSER_MAXIMIZED getMaximized toString
shell add Control Listener new Control Listener public void control Moved Control Event e if shell get Maximized Point location shell get Location x location x y location y  addControlListener ControlListener controlMoved ControlEvent getMaximized getLocation
public void control Resized Control Event e if shell get Maximized Point size shell get Size w size x h size y  controlResized ControlEvent getMaximized getSize
browser add Location Listener new Location Listener public void changing Location Event e hack to know when help webapp needs modal window modal Request Time 0 if e location null e location starts With javascript need Modal NON NLS 1 modal Request Time System current Time Millis  addLocationListener LocationListener LocationEvent modalRequestTime startsWith needModal modalRequestTime currentTimeMillis
public void changed Location Event e  LocationEvent
private long modal Request Time 0 Constructor for main help window intance public Embedded Browser store HelpUI Plugin get Default get Plugin Preferences shell new Shell initialize Shell shell shell add Control Listener new Control Listener public void control Moved Control Event e if shell get Maximized Point location shell get Location x location x y location y public void control Resized Control Event e if shell get Maximized Point size shell get Size w size x h size y shell add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e save position store set Value BROWSER X Integer to String x store set Value BROWSER Y Integer to String y store set Value BROWSER WIDTH Integer to String w store set Value BROWSER HEIGTH Integer to String h store set Value BROWSER MAXIMIZED new Boolean shell get Maximized to String browser new Browser shell SWT NONE initialize shell get Display browser use saved location and size x store get Int BROWSER X y store get Int BROWSER Y w store get Int BROWSER WIDTH h store get Int BROWSER HEIGTH if w 0 h 0 first launch use default size w 1024 h 768 x shell get Location x y shell get Location y set Safe Bounds shell x y w h if store get Boolean BROWSER MAXIMIZED shell set Maximized true shell add Control Listener new Control Listener public void control Moved Control Event e if shell get Maximized Point location shell get Location x location x y location y public void control Resized Control Event e if shell get Maximized Point size shell get Size w size x h size y shell open browser set Url about blank browser add Location Listener new Location Listener public void changing Location Event e hack to know when help webapp needs modal window modal Request Time 0 if e location null e location starts With javascript need Modal NON NLS 1 modal Request Time System current Time Millis public void changed Location Event e  modalRequestTime EmbeddedBrowser HelpUIPlugin getDefault getPluginPreferences initializeShell addControlListener ControlListener controlMoved ControlEvent getMaximized getLocation controlResized ControlEvent getMaximized getSize addDisposeListener DisposeListener widgetDisposed DisposeEvent setValue BROWSER_X toString setValue BROWSER_Y toString setValue BROWSER_WIDTH toString setValue BROWSER_HEIGTH toString setValue BROWSER_MAXIMIZED getMaximized toString getDisplay getInt BROWSER_X getInt BROWSER_Y getInt BROWSER_WIDTH getInt BROWSER_HEIGTH getLocation getLocation setSafeBounds getBoolean BROWSER_MAXIMIZED setMaximized addControlListener ControlListener controlMoved ControlEvent getMaximized getLocation controlResized ControlEvent getMaximized getSize setUrl addLocationListener LocationListener LocationEvent modalRequestTime startsWith needModal modalRequestTime currentTimeMillis LocationEvent
browser add Location Listener new Location Listener public void changing Location Event e hack to know when help webapp needs modal window modal Request Time 0 if e location null e location starts With javascript need Modal NON NLS 1 modal Request Time System current Time Millis  addLocationListener LocationListener LocationEvent modalRequestTime startsWith needModal modalRequestTime currentTimeMillis
public void changed Location Event e  LocationEvent
Constructor for derived help window It is either secondary browser or a help dialog param event param parent Shell or null public Embedded Browser Window Event event Shell parent if parent null shell new Shell else shell new Shell parent SWT PRIMARY MODAL SWT DIALOG TRIM initialize Shell shell Browser browser new Browser shell SWT NONE initialize shell get Display browser event browser browser browser add Location Listener new Location Listener public void changing Location Event e hack to know when help webapp needs modal window modal Request Time 0 if e location null e location starts With javascript need Modal NON NLS 1 modal Request Time System current Time Millis public void changed Location Event e  EmbeddedBrowser WindowEvent PRIMARY_MODAL DIALOG_TRIM initializeShell getDisplay addLocationListener LocationListener LocationEvent modalRequestTime startsWith needModal modalRequestTime currentTimeMillis LocationEvent
private static void initialize Shell Shell s s set Text initial Title Image shell Images create Images if shell Images null s set Images shell Images s set Layout new Fill Layout  initializeShell setText initialTitle shellImages createImages shellImages setImages shellImages setLayout FillLayout
browser add Open Window Listener new Open Window Listener public void open Window Event event if System current Time Millis modal Request Time 1000 new Embedded Browser event shell else new Embedded Browser event null  addOpenWindowListener OpenWindowListener WindowEvent currentTimeMillis modalRequestTime EmbeddedBrowser EmbeddedBrowser
browser add Visibility Window Listener new Visibility Window Listener public void hide Window Event event Browser browser Browser event widget Shell shell browser get Shell shell set Visible false  addVisibilityWindowListener VisibilityWindowListener WindowEvent getShell setVisible
public void show Window Event event Browser browser Browser event widget Shell shell browser get Shell if event location null shell set Location event location if event size null Point size event size shell set Size shell compute Size size x size y shell open  WindowEvent getShell setLocation setSize computeSize
browser add Close Window Listener new Close Window Listener public void close Window Event event Browser browser Browser event widget Shell shell browser get Shell shell close  addCloseWindowListener CloseWindowListener WindowEvent getShell
public void changed Title Event event if event title null event title length 0 Browser browser Browser event widget Shell shell browser get Shell shell set Text event title  TitleEvent getShell setText
private void initialize final Display display Browser browser browser add Open Window Listener new Open Window Listener public void open Window Event event if System current Time Millis modal Request Time 1000 new Embedded Browser event shell else new Embedded Browser event null browser add Visibility Window Listener new Visibility Window Listener public void hide Window Event event Browser browser Browser event widget Shell shell browser get Shell shell set Visible false public void show Window Event event Browser browser Browser event widget Shell shell browser get Shell if event location null shell set Location event location if event size null Point size event size shell set Size shell compute Size size x size y shell open browser add Close Window Listener new Close Window Listener public void close Window Event event Browser browser Browser event widget Shell shell browser get Shell shell close browser add Title Listener new Title Listener non Javadoc see org eclipse swt browser Title Listener changed org eclipse swt browser Title Event public void changed Title Event event if event title null event title length 0 Browser browser Browser event widget Shell shell browser get Shell shell set Text event title  addOpenWindowListener OpenWindowListener WindowEvent currentTimeMillis modalRequestTime EmbeddedBrowser EmbeddedBrowser addVisibilityWindowListener VisibilityWindowListener WindowEvent getShell setVisible WindowEvent getShell setLocation setSize computeSize addCloseWindowListener CloseWindowListener WindowEvent getShell addTitleListener TitleListener TitleListener TitleEvent TitleEvent getShell setText
public void display Url String url browser set Url url shell set Minimized false shell force Active  displayUrl setUrl setMinimized forceActive
shell force Active public boolean is Disposed return shell is Disposed  forceActive isDisposed isDisposed
private static String get Window Title if true equals Ignore Case Help Base Plugin get Default NON NLS 1 get Plugin Preferences get String window Title Prefix NON NLS 1 return HelpUI Resources get String browser Title Base Help System NON NLS 1 get Product Name else return Base Help System get Product Name  getWindowTitle equalsIgnoreCase HelpBasePlugin getDefault getPluginPreferences getString windowTitlePrefix HelpUIResources getString browserTitle BaseHelpSystem getProductName BaseHelpSystem getProductName
Create shell images private static Image create Images String product ImageUR Ls get Product ImageUR Ls if product ImageUR Ls null Array List shell Imgs new Array List for int i 0 i product ImageUR Ls length i if equals product ImageUR Ls i NON NLS 1 continue URL imageURL null try imageURL new URL product ImageUR Ls i catch MalformedURL Exception mue must be a path relative to the product bundle I Product product Platform get Product if product null Bundle product Bundle product get Defining Bundle if product Bundle null imageURL Platform find product Bundle new Path product ImageUR Ls i Image image null if imageURL null image Image Descriptor create FromURL imageURL create Image if image null shell Imgs add image return Image shell Imgs to Array new Image shell Imgs size return new Image 0  createImages productImageURLs getProductImageURLs productImageURLs ArrayList shellImgs ArrayList productImageURLs productImageURLs productImageURLs MalformedURLException IProduct getProduct productBundle getDefiningBundle productBundle productBundle productImageURLs ImageDescriptor createFromURL createImage shellImgs shellImgs toArray shellImgs
Obtains UR Ls to product image return String with UR Ls as Strings or null private static String get Product ImageUR Ls I Product product Platform get Product if product null String url product get Property window Images NON NLS 1 if url null url length 0 return url split s NON NLS 1 url product get Property window Image NON NLS 1 if url null url length 0 return new String url return null  URLs URLs getProductImageURLs IProduct getProduct getProperty windowImages getProperty windowImage
Closes the browser public void close if shell is Disposed shell dispose  isDisposed
private static void set Safe Bounds Shell s int x int y int width int height Rectangle client Area s get Display get Client Area width Math min client Area width width height Math min client Area height height x Math min x width client Area x client Area width width y Math min y height client Area y client Area height height x Math max x client Area x y Math max y client Area y s set Bounds x y width height  setSafeBounds clientArea getDisplay getClientArea clientArea clientArea clientArea clientArea clientArea clientArea clientArea clientArea setBounds
s set Bounds x y width height public void set Location int x int y shell set Location x y  setBounds setLocation setLocation
shell set Location x y public void set Size int width int height shell set Size w h  setLocation setSize setSize

private Embedded Browser browser Adapter constructor public Embedded Browser Adapter  EmbeddedBrowser EmbeddedBrowserAdapter
else default Display sync Exec new Runnable public void run ui DisplayURL url  defaultDisplay syncExec uiDisplayURL
public synchronized void displayURL final String url Display default Display Display get Default if default Display Display get Current ui DisplayURL url else default Display sync Exec new Runnable public void run ui DisplayURL url  defaultDisplay getDefault defaultDisplay getCurrent uiDisplayURL defaultDisplay syncExec uiDisplayURL
Must be run on UI thread param url private void ui DisplayURL final String url ui Close get Browser display Url url  uiDisplayURL uiClose getBrowser displayUrl
else default Display sync Exec new Runnable public void run ui Close  defaultDisplay syncExec uiClose
public void close Display default Display Display get Default if default Display Display get Current ui Close else default Display sync Exec new Runnable public void run ui Close  defaultDisplay getDefault defaultDisplay getCurrent uiClose defaultDisplay syncExec uiClose
Must be run on UI thread private void ui Close if browser null browser is Disposed browser close  uiClose isDisposed
private Embedded Browser get Browser if browser null browser is Disposed browser new Embedded Browser return browser  EmbeddedBrowser getBrowser isDisposed EmbeddedBrowser
see I Browser is Close Supported public boolean is Close Supported return true  IBrowser isCloseSupported isCloseSupported
see I Browser is Set Location Supported public boolean is Set Location Supported return true  IBrowser isSetLocationSupported isSetLocationSupported
see I Browser is Set Size Supported public boolean is Set Size Supported return true  IBrowser isSetSizeSupported isSetSizeSupported
else default Display sync Exec new Runnable public void run ui Set Location x y  defaultDisplay syncExec uiSetLocation
public void set Location final int x final int y Display default Display Display get Default if default Display Display get Current ui Set Location x y else default Display sync Exec new Runnable public void run ui Set Location x y  setLocation defaultDisplay getDefault defaultDisplay getCurrent uiSetLocation defaultDisplay syncExec uiSetLocation
Must be run on UI thread private void ui Set Location int x int y get Browser set Location x y  uiSetLocation getBrowser setLocation
else default Display sync Exec new Runnable public void run ui Set Size width height  defaultDisplay syncExec uiSetSize
public void set Size final int width final int height Display default Display Display get Default if default Display Display get Current ui Set Size width height else default Display sync Exec new Runnable public void run ui Set Size width height  setSize defaultDisplay getDefault defaultDisplay getCurrent uiSetSize defaultDisplay syncExec uiSetSize
Must be run on UI thread private void ui Set Size int width int height get Browser set Size width height  uiSetSize getBrowser setSize

private boolean available false Constructor public Embedded Browser Factory super  EmbeddedBrowserFactory
if HelpUI Event Loop is Running Display get Default sync Exec new Runnable public void run test  HelpUIEventLoop isRunning getDefault syncExec
public boolean is Available if Base Help System get Mode Base Help System MODE STANDALONE try if HelpUI Event Loop is Running Display get Default sync Exec new Runnable public void run test catch Exception e just in case else test tested true return available  isAvailable BaseHelpSystem getMode BaseHelpSystem MODE_STANDALONE HelpUIEventLoop isRunning getDefault syncExec
Must run on UI thread return private boolean test if Constants OS WIN32 equals Ignore Case Platform getOS Constants OS LINUX equals Ignore Case Platform getOS return false if tested tested true Shell sh new Shell try new Browser sh SWT NONE available true catch SWT Error se if se code SWT ERROR NO HANDLES Browser not implemented available false else HelpUI Plugin log Error HelpUI Resources get String Embedded Browser Factory error se NON NLS 1 if sh null sh is Disposed sh dispose return available  OS_WIN32 equalsIgnoreCase OS_LINUX equalsIgnoreCase SWTError ERROR_NO_HANDLES HelpUIPlugin logError HelpUIResources getString EmbeddedBrowserFactory isDisposed
see I Browser Factory create Browser public I Browser create Browser return new Embedded Browser Adapter  IBrowserFactory createBrowser IBrowser createBrowser EmbeddedBrowserAdapter

String cmdarray Adapter constructor public System Browser Adapter  SystemBrowserAdapter
see I Browser close public void close  IBrowser
public void displayURL String url if Constants WS WIN32 equals Ignore Case Platform getOS if Program launch url Error Util display Error Dialog HelpUI Resources get String System Browser no Program ForURL NON NLS 1 url else Program b Program find Program html if b null b execute url Error Util display Error Dialog HelpUI Resources get String System Browser no Program ForHTML url  WS_WIN32 equalsIgnoreCase ErrorUtil displayErrorDialog HelpUIResources getString SystemBrowser noProgramForURL findProgram ErrorUtil displayErrorDialog HelpUIResources getString SystemBrowser noProgramForHTML
see I Browser is Close Supported public boolean is Close Supported return false  IBrowser isCloseSupported isCloseSupported
see I Browser is Set Location Supported public boolean is Set Location Supported return false  IBrowser isSetLocationSupported isSetLocationSupported
see I Browser is Set Size Supported public boolean is Set Size Supported return false  IBrowser isSetSizeSupported isSetSizeSupported
see I Browser set Location int int public void set Location int x int y  IBrowser setLocation setLocation
see I Browser set Size int int public void set Size int width int height  IBrowser setSize setSize

public class System Browser Factory implements I Browser Factory Constructor public System Browser Factory super  SystemBrowserFactory IBrowserFactory SystemBrowserFactory
see I Browser Factory is Available public boolean is Available return Constants WS WIN32 equals Ignore Case Platform getOS  IBrowserFactory isAvailable isAvailable WS_WIN32 equalsIgnoreCase
see I Browser Factory create Browser public I Browser create Browser return new System Browser Adapter  IBrowserFactory createBrowser IBrowser createBrowser SystemBrowserAdapter

class Link Listener extends Hyperlink Adapter I Help Resource topic public Link Listener I Help Resource topic this topic topic  LinkListener HyperlinkAdapter IHelpResource LinkListener IHelpResource
this topic topic public void link Activated Control c launch Links topic  linkActivated launchLinks
shell add Listener SWT Deactivate new Listener public void handle Event Event e if HelpUI Plugin DEBUG INFOPOP System out println Context Help Dialog shell deactivate listener SWT Deactivate called NON NLS 1 close  addListener handleEvent HelpUIPlugin DEBUG_INFOPOP ContextHelpDialog
shell add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE if HelpUI Plugin DEBUG INFOPOP System out println Context Help Dialog shell traverse listener SWT TRAVERSE ESCAPE called NON NLS 1 e doit true  addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE HelpUIPlugin DEBUG_INFOPOP ContextHelpDialog TRAVERSE_ESCAPE
shell add Control Listener new Control Adapter public void control Moved Control Event e if HelpUI Plugin DEBUG INFOPOP System out println Context Help Dialog shell control adapter called NON NLS 1 Rectangle client Area shell get Client Area shell redraw client Area x client Area y client Area width client Area height true shell update  addControlListener ControlAdapter controlMoved ControlEvent HelpUIPlugin DEBUG_INFOPOP ContextHelpDialog clientArea getClientArea clientArea clientArea clientArea clientArea
Constructor param context an array of String or an array of I Context param x the x mouse location in the current display param y the y mouse location in the current display Context Help Dialog I Context context int x int y this context context Display display Display get Current if display null return background Colour display get System Color SWT COLOR INFO BACKGROUND foreground Colour display get System Color SWT COLOR INFO FOREGROUND link Colour display get System Color SWT COLOR BLUE parent Shell display get Active Shell if parent Shell null boolean is Modal 0 parent Shell get Style SWT APPLICATION MODAL SWT PRIMARY MODAL SWT SYSTEM MODAL if HelpUI Plugin DEBUG INFOPOP System out println Context Help Dialog Context Help Dialog Parent Shell NON NLS 1 shell to String is NON NLS 1 is Modal modal modeless NON NLS 1 NON NLS 2 shell new Shell parent Shell SWT NONE if HelpUI Plugin DEBUG INFOPOP System out println Context Help Dialog Context Help Dialog Shell is NON NLS 1 shell to String Workbench Help set Help shell I HelpUI Constants F1 SHELL shell add Listener SWT Deactivate new Listener public void handle Event Event e if HelpUI Plugin DEBUG INFOPOP System out println Context Help Dialog shell deactivate listener SWT Deactivate called NON NLS 1 close shell add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE if HelpUI Plugin DEBUG INFOPOP System out println Context Help Dialog shell traverse listener SWT TRAVERSE ESCAPE called NON NLS 1 e doit true shell add Control Listener new Control Adapter public void control Moved Control Event e if HelpUI Plugin DEBUG INFOPOP System out println Context Help Dialog shell control adapter called NON NLS 1 Rectangle client Area shell get Client Area shell redraw client Area x client Area y client Area width client Area height true shell update if HelpUI Plugin DEBUG INFOPOP System out println Context Help Dialog Context Help Dialog Focus owner is NON NLS 1 Display get Current get Focus Control to String link Manager set Hyperlink Underline Mode Hyperlink Handler UNDERLINE ALWAYS create Contents shell shell pack Correct x and y of the shell if it not contained within the screen int width shell get Bounds width int height shell get Bounds height check lower boundaries x x 0 x 0 y y 0 y 0 check upper boundaries Rectangle screen display get Client Area x x width screen width x screen width width y y height screen height y screen height height shell set Location x y init Accessible shell  IContext ContextHelpDialog IContext getCurrent backgroundColour getSystemColor COLOR_INFO_BACKGROUND foregroundColour getSystemColor COLOR_INFO_FOREGROUND linkColour getSystemColor COLOR_BLUE parentShell getActiveShell parentShell isModal parentShell getStyle APPLICATION_MODAL PRIMARY_MODAL SYSTEM_MODAL HelpUIPlugin DEBUG_INFOPOP ContextHelpDialog ContextHelpDialog ParentShell toString isModal parentShell HelpUIPlugin DEBUG_INFOPOP ContextHelpDialog ContextHelpDialog toString WorkbenchHelp setHelp IHelpUIConstants F1_SHELL addListener handleEvent HelpUIPlugin DEBUG_INFOPOP ContextHelpDialog addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE HelpUIPlugin DEBUG_INFOPOP ContextHelpDialog TRAVERSE_ESCAPE addControlListener ControlAdapter controlMoved ControlEvent HelpUIPlugin DEBUG_INFOPOP ContextHelpDialog clientArea getClientArea clientArea clientArea clientArea clientArea HelpUIPlugin DEBUG_INFOPOP ContextHelpDialog ContextHelpDialog getCurrent getFocusControl toString linkManager setHyperlinkUnderlineMode HyperlinkHandler UNDERLINE_ALWAYS createContents getBounds getBounds getClientArea setLocation initAccessible
public synchronized void close try if HelpUI Plugin DEBUG INFOPOP System out println Context Help Dialog close NON NLS 1 if shell null shell close if shell is Disposed shell dispose shell null catch Throwable ex  HelpUIPlugin DEBUG_INFOPOP ContextHelpDialog isDisposed
protected Control create Contents Composite contents init Accessible contents contents set Background background Colour Grid Layout layout new Grid Layout layout margin Height 5 layout margin Width 5 contents set Layout layout contents set Layout Data new Grid Data Grid Data FILL BOTH create the dialog area and button bar create Info Area contents Control c create Links Area contents if c null links exist make them the only focusable controls contents set Tab List new Control c return contents  createContents initAccessible setBackground backgroundColour GridLayout GridLayout marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_BOTH createInfoArea createLinksArea setTabList
text add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE if HelpUI Plugin DEBUG INFOPOP System out println Context Help Dialog text Traverse Listener handle Event SWT TRAVERSE ESCAPE NON NLS 1 e doit true  addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE HelpUIPlugin DEBUG_INFOPOP ContextHelpDialog TraverseListener handleEvent TRAVERSE_ESCAPE
private Control create Info Area Composite parent Create the text field String styled Text if context instanceof I Styled Context styled Text I Styled Context context get Styled Text else styled Text context get Text if styled Text null no description found in context objects styled Text HelpUI Resources get String WW002 NON NLS 1 Description text new Description parent SWT MULTI SWT READ ONLY text add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE if HelpUI Plugin DEBUG INFOPOP System out println Context Help Dialog text Traverse Listener handle Event SWT TRAVERSE ESCAPE NON NLS 1 e doit true text get Caret set Visible false text set Background background Colour text set Foreground foreground Colour text set Font parent get Font Styled Line Wrapper content new Styled Line Wrapper styled Text text set Content content text set Style Ranges content get Styles infopop Text text get Text init Accessible text return text  createInfoArea styledText IStyledContext styledText IStyledContext getStyledText styledText getText styledText styledText HelpUIResources getString READ_ONLY addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE HelpUIPlugin DEBUG_INFOPOP ContextHelpDialog TraverseListener handleEvent TRAVERSE_ESCAPE getCaret setVisible setBackground backgroundColour setForeground foregroundColour setFont getFont StyledLineWrapper StyledLineWrapper styledText setContent setStyleRanges getStyles infopopText getText initAccessible
private Control create Link Composite parent I Help Resource topic Label image new Label parent SWT NONE image set Image get Image image set Background background Colour Grid Data data new Grid Data data horizontal Alignment Grid Data HORIZONTAL ALIGN BEGINNING data vertical Alignment Grid Data VERTICAL ALIGN BEGINNING data horizontal Indent 4 image set Layout Data data Hyperlink Label link new Hyperlink Label parent SWT NONE link set Text topic get Label link set Background background Colour link set Foreground link Colour link set Font parent get Font link Manager register Hyperlink link new Link Listener topic return link  createLink IHelpResource setImage getImage setBackground backgroundColour GridData GridData horizontalAlignment GridData HORIZONTAL_ALIGN_BEGINNING verticalAlignment GridData VERTICAL_ALIGN_BEGINNING horizontalIndent setLayoutData HyperlinkLabel HyperlinkLabel setText getLabel setBackground backgroundColour setForeground linkColour setFont getFont linkManager registerHyperlink LinkListener
private Control create Links Area Composite parent I Help Resource related Topics context get Related Topics if related Topics null return null Create control Composite composite new Composite parent SWT NONE init Accessible composite composite set Background background Colour Grid Layout layout new Grid Layout layout margin Height 2 layout margin Width 0 layout vertical Spacing 3 layout horizontal Spacing 2 layout num Columns 2 composite set Layout layout composite set Font parent get Font Grid Data data new Grid Data Grid Data FILL BOTH Grid Data HORIZONTAL ALIGN BEGINNING Grid Data VERTICAL ALIGN CENTER composite set Layout Data data Create separator Label label new Label composite SWT SEPARATOR SWT HORIZONTAL label set Background background Colour label set Foreground foreground Colour data new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING Grid Data VERTICAL ALIGN BEGINNING Grid Data FILL HORIZONTAL data horizontal Span 2 label set Layout Data data Create related links for int i 0 i related Topics length i create Link composite related Topics i return composite  createLinksArea IHelpResource relatedTopics getRelatedTopics relatedTopics initAccessible setBackground backgroundColour GridLayout GridLayout marginHeight marginWidth verticalSpacing horizontalSpacing numColumns setLayout setFont getFont GridData GridData GridData FILL_BOTH GridData HORIZONTAL_ALIGN_BEGINNING GridData VERTICAL_ALIGN_CENTER setLayoutData setBackground backgroundColour setForeground foregroundColour GridData GridData HORIZONTAL_ALIGN_BEGINNING GridData VERTICAL_ALIGN_BEGINNING GridData FILL_HORIZONTAL horizontalSpan setLayoutData relatedTopics createLink relatedTopics
Called when related link has been chosen Opens help viewer with list of all related topics protected void launch Links I Help Resource selected Topic close if HelpUI Plugin DEBUG INFOPOP System out println Context Help Dialog launch Links closed shell NON NLS 1 Base Help System get Help Display display Help context selected Topic is Parent Modal  launchLinks IHelpResource selectedTopic HelpUIPlugin DEBUG_INFOPOP ContextHelpDialog launchLinks BaseHelpSystem getHelpDisplay displayHelp selectedTopic isParentModal
public synchronized void open try shell open if HelpUI Plugin DEBUG INFOPOP System out println Context Help Dialog open Focus owner after open is NON NLS 1 Display get Current get Focus Control to String catch Throwable e HelpUI Plugin log Error HelpUI Resources get String Context Help Dialog open NON NLS 1 e  HelpUIPlugin DEBUG_INFOPOP ContextHelpDialog getCurrent getFocusControl toString HelpUIPlugin logError HelpUIResources getString ContextHelpDialog
private Image get Image if img Registry null img Registry HelpUI Plugin get Default get Image Registry img Registry put I HelpUI Constants IMAGE KEY F1TOPIC Image Descriptor create FromURL HelpUI Resources get Image Path I HelpUI Constants IMAGE FILE F1TOPIC return img Registry get I HelpUI Constants IMAGE KEY F1TOPIC  getImage imgRegistry imgRegistry HelpUIPlugin getDefault getImageRegistry imgRegistry IHelpUIConstants IMAGE_KEY_F1TOPIC ImageDescriptor createFromURL HelpUIResources getImagePath IHelpUIConstants IMAGE_FILE_F1TOPIC imgRegistry IHelpUIConstants IMAGE_KEY_F1TOPIC
return img Registry get I HelpUI Constants IMAGE KEY F1TOPIC public boolean is Showing return shell null shell is Disposed shell is Visible  imgRegistry IHelpUIConstants IMAGE_KEY_F1TOPIC isShowing isDisposed isVisible
Accessible accessible control get Accessible accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e e result infopop Text  getAccessible addAccessibleListener AccessibleAdapter getName AccessibleEvent infopopText
public void get Help Accessible Event e e result control get Tool Tip Text  getHelp AccessibleEvent getToolTipText
accessible add Accessible Control Listener new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point pt control to Control new Point e x e y e childID control get Bounds contains pt ACC CHILDID MULTIPLE ACC CHILDID NONE  addAccessibleControlListener AccessibleControlAdapter getChildAtPoint AccessibleControlEvent toControl getBounds CHILDID_MULTIPLE CHILDID_NONE
public void get Location Accessible Control Event e Rectangle location control get Bounds Point pt control to Display new Point location x location y e x pt x e y pt y e width location width e height location height  getLocation AccessibleControlEvent getBounds toDisplay
public void get Child Count Accessible Control Event e e detail 1  getChildCount AccessibleControlEvent
public void get Role Accessible Control Event e e detail ACC ROLE LABEL  getRole AccessibleControlEvent ROLE_LABEL
public void get State Accessible Control Event e e detail ACC STATE READONLY  getState AccessibleControlEvent STATE_READONLY
private void init Accessible final Control control Accessible accessible control get Accessible accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e e result infopop Text public void get Help Accessible Event e e result control get Tool Tip Text accessible add Accessible Control Listener new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point pt control to Control new Point e x e y e childID control get Bounds contains pt ACC CHILDID MULTIPLE ACC CHILDID NONE public void get Location Accessible Control Event e Rectangle location control get Bounds Point pt control to Display new Point location x location y e x pt x e y pt y e width location width e height location height public void get Child Count Accessible Control Event e e detail 1 public void get Role Accessible Control Event e e detail ACC ROLE LABEL public void get State Accessible Control Event e e detail ACC STATE READONLY  initAccessible getAccessible addAccessibleListener AccessibleAdapter getName AccessibleEvent infopopText getHelp AccessibleEvent getToolTipText addAccessibleControlListener AccessibleControlAdapter getChildAtPoint AccessibleControlEvent toControl getBounds CHILDID_MULTIPLE CHILDID_NONE getLocation AccessibleControlEvent getBounds toDisplay getChildCount AccessibleControlEvent getRole AccessibleControlEvent ROLE_LABEL getState AccessibleControlEvent STATE_READONLY
public class Description extends Styled Text param parent param style public Description Composite parent int style super parent style  StyledText
super parent style public boolean set Focus return false  setFocus
return false public boolean is Focus Control return false  isFocusControl
private boolean is Parent Modal if parent Shell null boolean is Modal 0 parent Shell get Style SWT APPLICATION MODAL SWT PRIMARY MODAL SWT SYSTEM MODAL return is Modal return false  isParentModal parentShell isModal parentShell getStyle APPLICATION_MODAL PRIMARY_MODAL SYSTEM_MODAL isModal

Constructor public Default HelpUI super  DefaultHelpUI
Displays help public void display Help Base Help System get Help Display display Help use External Browser null  displayHelp BaseHelpSystem getHelpDisplay displayHelp useExternalBrowser
Displays a help resource specified as a url ul li a URL in a format that can be returned by link org eclipse help I Help Resource get Href I Help Resource get Href li a URL query in the format format em key value amp key value em The valid keys are tab toc topic context Id For example em toc myplugin mytoc xml amp topic myplugin references myclass html em is valid ul public void display Help Resource String href Base Help System get Help Display display Help Resource href use External Browser href  IHelpResource getHref IHelpResource getHref contextId displayHelpResource BaseHelpSystem getHelpDisplay displayHelpResource useExternalBrowser
Displays context sensitive help for specified context param context the context to display param x int positioning information param y int positioning information public void display Context I Context context int x int y if f1 Dialog null f1 Dialog close if context null return f1 Dialog new Context Help Dialog context x y f1 Dialog open if any errors or parsing errors have occurred display them in a pop up Error Util display Status  displayContext IContext f1Dialog f1Dialog f1Dialog ContextHelpDialog f1Dialog ErrorUtil displayStatus
Returns code true code if the context sensitive help window is currently being displayed code false code if not public boolean is Context Help Displayed if f1 Dialog null return false return f1 Dialog is Showing  isContextHelpDisplayed f1Dialog f1Dialog isShowing
private boolean use External Browser String url Use external when modal window is displayed Display display Display get Current if display null Shell active Shell display get Active Shell if active Shell null if active Shell get Style SWT APPLICATION MODAL SWT PRIMARY MODAL SWT SYSTEM MODAL 0 return true Use external when no help frames are to be displayed otherwise no navigation buttons if url null if url index Of noframes true 0 url index Of noframes true 0 return true return false  useExternalBrowser getCurrent activeShell getActiveShell activeShell activeShell getStyle APPLICATION_MODAL PRIMARY_MODAL SYSTEM_MODAL indexOf indexOf

public Help Activity Support I Workbench workbench activity Support workbench get Activity Support pref Help Base Plugin get Default get Plugin Preferences String show Disabled Activities pref get String PREF KEY SHOW DISABLED ACTIVITIES user Can Toggle Filtering SHOW DISABLED ACTIVITIES OFF equals Ignore Case show Disabled Activities SHOW DISABLED ACTIVITIES ON equals Ignore Case show Disabled Activities user Can Toggle Filtering user Can Toggle Filtering is Workbench Filtering filtering Enabled SHOW DISABLED ACTIVITIES OFF equals Ignore Case show Disabled Activities SHOW DISABLED ACTIVITIES NEVER equals Ignore Case show Disabled Activities filtering Enabled filtering Enabled is Workbench Filtering  HelpActivitySupport IWorkbench activitySupport getActivitySupport HelpBasePlugin getDefault getPluginPreferences showDisabledActivities getString PREF_KEY_SHOW_DISABLED_ACTIVITIES userCanToggleFiltering SHOW_DISABLED_ACTIVITIES_OFF equalsIgnoreCase showDisabledActivities SHOW_DISABLED_ACTIVITIES_ON equalsIgnoreCase showDisabledActivities userCanToggleFiltering userCanToggleFiltering isWorkbenchFiltering filteringEnabled SHOW_DISABLED_ACTIVITIES_OFF equalsIgnoreCase showDisabledActivities SHOW_DISABLED_ACTIVITIES_NEVER equalsIgnoreCase showDisabledActivities filteringEnabled filteringEnabled isWorkbenchFiltering
filtering Enabled filtering Enabled is Workbench Filtering public boolean is Filtering Enabled return filtering Enabled  filteringEnabled filteringEnabled isWorkbenchFiltering isFilteringEnabled filteringEnabled
public void set Filtering Enabled boolean enabled if user Can Toggle Filtering filtering Enabled enabled if enabled pref set Value PREF KEY SHOW DISABLED ACTIVITIES SHOW DISABLED ACTIVITIES OFF else pref set Value PREF KEY SHOW DISABLED ACTIVITIES SHOW DISABLED ACTIVITIES ON  setFilteringEnabled userCanToggleFiltering filteringEnabled setValue PREF_KEY_SHOW_DISABLED_ACTIVITIES SHOW_DISABLED_ACTIVITIES_OFF setValue PREF_KEY_SHOW_DISABLED_ACTIVITIES SHOW_DISABLED_ACTIVITIES_ON
public boolean is User Can Toggle Filtering return user Can Toggle Filtering  isUserCanToggleFiltering userCanToggleFiltering
public boolean is Enabled String href if is Filtering Enabled return true if href starts With NON NLS 1 href href substring 1 return activity Support get Activity Manager get Identifier href is Enabled  isEnabled isFilteringEnabled startsWith activitySupport getActivityManager getIdentifier isEnabled
Checks whether topic belongs to a TOC that mathes enabled activity Enabled children TO Cs are searched if linked by also enabled TO Cs Additionally topic may match description topic of a root TOC return true if topic belongs to an enabled TOC param href param locale locale for which TO Cs are checked public boolean is Enabled Topic String href String locale if href null return false if is Filtering Enabled return true int ix href index Of resultof NON NLS 1 if ix 0 href href substring 0 ix Find out if description topic for enabled top level TO Cs matches the topic I Toc Element tocs Help Plugin get Toc Manager get Tocs locale for int t 0 t tocs length t String description Href tocs t get Toc Topic Href if description Href null description Href length 0 description Href equals href Help Base Plugin get Activity Support is Enabled tocs t get Href return true Find out if any contributed toc that is enabled contains the topic return is In Toc Subtree href Arrays as List tocs  TOCs TOCs TOCs isEnabledTopic isFilteringEnabled indexOf TOCs ITocElement HelpPlugin getTocManager getTocs descriptionHref getTocTopicHref descriptionHref descriptionHref descriptionHref HelpBasePlugin getActivitySupport isEnabled getHref isInTocSubtree asList
param href href of a topic param toc List List of I Toc Element return true if given topic belongs to one of enabled I Toc Elements or their children private boolean is In Toc Subtree String href List toc List for Iterator it toc List iterator it has Next I Toc Element toc I Toc Element it next if Help Base Plugin get Activity Support is Enabled toc get Href TOC is not enabled check other TO Cs continue Check topics in navigation if toc get Owned Topic href null return true Check extra dir if toc get Owned Extra Topic href null return true check children TO Cs if is In Toc Subtree href toc get Children Tocs return true else try other TO Cs at this level return false  tocList ITocElement ITocElements isInTocSubtree tocList tocList hasNext ITocElement ITocElement HelpBasePlugin getActivitySupport isEnabled getHref TOCs getOwnedTopic getOwnedExtraTopic TOCs isInTocSubtree getChildrenTocs TOCs
public void enable Activities String href if href starts With NON NLS 1 href href substring 1 I Identifier identifier activity Support get Activity Manager get Identifier href Set activitity Ids identifier get Activity Ids if activitity Ids is Empty if there are no activities that match this identifier do nothing return Set enabled Ids new Hash Set activity Support get Activity Manager get Enabled Activity Ids enabled Ids add All activitity Ids activity Support set Enabled Activity Ids enabled Ids  enableActivities startsWith IIdentifier activitySupport getActivityManager getIdentifier activitityIds getActivityIds activitityIds isEmpty enabledIds HashSet activitySupport getActivityManager getEnabledActivityIds enabledIds addAll activitityIds activitySupport setEnabledActivityIds enabledIds
return whether the UI is set up to filter contributions has defined activity categories private static boolean is Workbench Filtering return PlatformUI get Workbench get Activity Support get Activity Manager get Defined Activity Ids is Empty  isWorkbenchFiltering getWorkbench getActivitySupport getActivityManager getDefinedActivityIds isEmpty

private static Display display Called by base in stand alone help since it cannot run event loop public static void run try if display null display Display get Current if display null display new Display finally started true try running true while Help Application is Running try if display read And Dispatch display sleep catch Throwable t Help Base Plugin log Error t get Message t display dispose display null finally running false  getCurrent HelpApplication isRunning readAndDispatch HelpBasePlugin logError getMessage
public static void wakeup Display d display if d null try d wake catch Exception e 
Blocks until the loop is started Display created public static void wait For while started Help Application is Running try Thread sleep 100 catch Interrupted Exception ie  waitFor HelpApplication isRunning InterruptedException
return Returns if loop is running public static boolean is Running return running  isRunning

private static Bundle Context bundle Context 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 Help Plugin get Default get Log log error Status  BundleContext bundleContext getString logError errorStatus IStatus PLUGIN_ID IStatus HelpPlugin getDefault getLog errorStatus
Logs a Warning message with an exception Note that the message should already be localized to proper local ie Resources get String should already have been called public static synchronized void log Warning String message if Help Plugin DEBUG if message null message NON NLS 1 Status warning Status new Status I Status WARNING PLUGIN ID I Status OK message null Help Plugin get Default get Log log warning Status  getString logWarning HelpPlugin warningStatus IStatus PLUGIN_ID IStatus HelpPlugin getDefault getLog warningStatus
Provides access to singleton return HelpUI Plugin public static HelpUI Plugin get Default return plugin  HelpUIPlugin HelpUIPlugin getDefault
public void stop Bundle Context context throws Exception plugin null bundle Context null super stop context  BundleContext bundleContext
public void start Bundle Context context throws Exception super start context plugin this bundle Context context Setup debugging options DEBUG is Debugging if DEBUG DEBUG INFOPOP true equals Ignore Case Platform get Debug Option PLUGIN ID debug infopop NON NLS 1 NON NLS 2 if Base Help System get Mode Base Help System MODE WORKBENCH UI may get activated during standalone Base Help System set Default Error Util new Error Util if PlatformUI is Workbench Running This is workbench scenario Set activity support of base help to use workbench activity support I Workbench workbench PlatformUI get Workbench if workbench null Help Base Plugin set Activity Support new Help Activity Support workbench  BundleContext bundleContext isDebugging DEBUG_INFOPOP equalsIgnoreCase getDebugOption PLUGIN_ID BaseHelpSystem getMode BaseHelpSystem MODE_WORKBENCH BaseHelpSystem setDefaultErrorUtil ErrorUtil isWorkbenchRunning IWorkbench getWorkbench HelpBasePlugin setActivitySupport HelpActivitySupport

Workbench Resources constructor comment public HelpUI Resources super  WorkbenchResources HelpUIResources
Returns a string from a property file public static URL get Image Path String name I Path path new Path icons append name NON NLS 1 return Platform find HelpUI Plugin get Default get Bundle path  getImagePath IPath HelpUIPlugin getDefault getBundle
Returns a string from a property file public static String get String String name try return res Bundle get String name catch Exception e return name  getString resBundle getString
Returns a string from a property file public static String get String String name String replace0 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 String replace3 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 replace3 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 String replace3 String replace4 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 replace3 replace4 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 String replace3 String replace4 String replace5 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 replace3 replace4 replace5 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile

public class Hyperlink Adapter implements I Hyperlink Listener Hyperlink Adapter constructor comment public Hyperlink Adapter super  HyperlinkAdapter IHyperlinkListener HyperlinkAdapter HyperlinkAdapter
param link Label org eclipse swt widgets Label public void link Activated Control link Label  linkLabel linkActivated linkLabel
param link Label org eclipse swt widgets Label public void link Entered Control link Label  linkLabel linkEntered linkLabel
param link Label org eclipse swt widgets Label public void link Exited Control link Label  linkLabel linkExited linkLabel

private Control last Link Hyperlink Handler constructor comment public Hyperlink Handler hyperlink Listeners new Hashtable hyperlink Cursor new Cursor Display get Current SWT CURSOR HAND busy Cursor new Cursor Display get Current SWT CURSOR WAIT  lastLink HyperlinkHandler HyperlinkHandler hyperlinkListeners hyperlinkCursor getCurrent CURSOR_HAND busyCursor getCurrent CURSOR_WAIT
public void dispose hyperlink Cursor dispose busy Cursor dispose  hyperlinkCursor busyCursor
return org eclipse swt graphics Color public Color get Active Background return active Background  getActiveBackground activeBackground
return org eclipse swt graphics Color public Color get Active Foreground return active Foreground  getActiveForeground activeForeground
return org eclipse swt graphics Color public Color get Background return background  getBackground
return org eclipse swt graphics Cursor public Cursor get Busy Cursor return busy Cursor  getBusyCursor busyCursor
return org eclipse swt graphics Color public Color get Foreground return foreground  getForeground
return org eclipse swt graphics Cursor public Cursor get Hyperlink Cursor return hyperlink Cursor  getHyperlinkCursor hyperlinkCursor
return int public int get Hyperlink Underline Mode return hyperlink Underline Mode  getHyperlinkUnderlineMode hyperlinkUnderlineMode
return org eclipse swt widgets Control public Control get Last Link return last Link  getLastLink lastLink
return boolean public boolean is Hyperlink Cursor Used return hyperlink Cursor Used  isHyperlinkCursorUsed hyperlinkCursorUsed
return hyperlink Cursor Used public void mouse Double Click Mouse Event e  hyperlinkCursorUsed mouseDoubleClick MouseEvent
public void mouse Down Mouse Event e if e button 1 return last Link Control e widget  mouseDown MouseEvent lastLink
public void mouse Enter Mouse Event e Control control Control e widget if is Hyperlink Cursor Used control set Cursor hyperlink Cursor if active Background null control set Background active Background if active Foreground null control set Foreground active Foreground if hyperlink Underline Mode UNDERLINE ROLLOVER underline control true I Hyperlink Listener action get Link Listener control if action null action link Entered control  mouseEnter MouseEvent isHyperlinkCursorUsed setCursor hyperlinkCursor activeBackground setBackground activeBackground activeForeground setForeground activeForeground hyperlinkUnderlineMode UNDERLINE_ROLLOVER IHyperlinkListener getLinkListener linkEntered
public void mouse Exit Mouse Event e Control control Control e widget if is Hyperlink Cursor Used control set Cursor null if hyperlink Underline Mode UNDERLINE ROLLOVER underline control false if background null control set Background background if foreground null control set Foreground foreground I Hyperlink Listener action get Link Listener control if action null action link Exited control  mouseExit MouseEvent isHyperlinkCursorUsed setCursor hyperlinkUnderlineMode UNDERLINE_ROLLOVER setBackground setForeground IHyperlinkListener getLinkListener linkExited
action link Exited control public void mouse Hover Mouse Event e  linkExited mouseHover MouseEvent
public void mouse Up Mouse Event e if e button 1 return I Hyperlink Listener action get Link Listener Control e widget if action null Control c Control e widget c set Cursor busy Cursor action link Activated c if c is Disposed c set Cursor is Hyperlink Cursor Used hyperlink Cursor null  mouseUp MouseEvent IHyperlinkListener getLinkListener setCursor busyCursor linkActivated isDisposed setCursor isHyperlinkCursorUsed hyperlinkCursor
public void paint Control Paint Event e Control control Control e widget if hyperlink Underline Mode UNDERLINE ALWAYS Hyperlink Handler underline control true  paintControl PaintEvent hyperlinkUnderlineMode UNDERLINE_ALWAYS HyperlinkHandler
param control org eclipse swt widgets Control param listener org eclipse help ui internal I Hyperlink Listener public void register Hyperlink Control control I Hyperlink Listener listener if background null control set Background background if foreground null control set Foreground foreground control add Mouse Listener this control add Mouse Track Listener this control add Listener SWT Default Selection this if hyperlink Underline Mode UNDERLINE ALWAYS control add Paint Listener this hyperlink Listeners put control listener remove Disposed Links  IHyperlinkListener registerHyperlink IHyperlinkListener setBackground setForeground addMouseListener addMouseTrackListener addListener DefaultSelection hyperlinkUnderlineMode UNDERLINE_ALWAYS addPaintListener hyperlinkListeners removeDisposedLinks
public I Hyperlink Listener get Link Listener Control c if c instanceof Label c c get Parent return I Hyperlink Listener hyperlink Listeners get c  IHyperlinkListener getLinkListener getParent IHyperlinkListener hyperlinkListeners
private void remove Disposed Links for Enumeration keys hyperlink Listeners keys keys has More Elements Control control Control keys next Element if control is Disposed hyperlink Listeners remove control  removeDisposedLinks hyperlinkListeners hasMoreElements nextElement isDisposed hyperlinkListeners
public void reset hyperlink Listeners clear  hyperlinkListeners
param new Active Background org eclipse swt graphics Color public void set Active Background Color new Active Background active Background new Active Background  newActiveBackground setActiveBackground newActiveBackground activeBackground newActiveBackground
param new Active Foreground org eclipse swt graphics Color public void set Active Foreground Color new Active Foreground active Foreground new Active Foreground  newActiveForeground setActiveForeground newActiveForeground activeForeground newActiveForeground
param new Background org eclipse swt graphics Color public void set Background Color new Background background new Background  newBackground setBackground newBackground newBackground
param new Foreground org eclipse swt graphics Color public void set Foreground Color new Foreground foreground new Foreground  newForeground setForeground newForeground newForeground
param new Hyperlink Cursor Used boolean public void set Hyperlink Cursor Used boolean new Hyperlink Cursor Used hyperlink Cursor Used new Hyperlink Cursor Used  newHyperlinkCursorUsed setHyperlinkCursorUsed newHyperlinkCursorUsed hyperlinkCursorUsed newHyperlinkCursorUsed
param new Hyperlink Underline Mode int public void set Hyperlink Underline Mode int new Hyperlink Underline Mode hyperlink Underline Mode new Hyperlink Underline Mode  newHyperlinkUnderlineMode setHyperlinkUnderlineMode newHyperlinkUnderlineMode hyperlinkUnderlineMode newHyperlinkUnderlineMode
param control org eclipse swt widgets Control param inside boolean public static void underline Control control boolean inside if control instanceof Hyperlink Label control Hyperlink Label control get Label Composite parent control get Parent Rectangle bounds control get Bounds GC gc new GC parent Color color inside control get Foreground control get Background gc set Foreground color int y bounds y bounds height gc draw Line bounds x y bounds x bounds width y gc dispose  HyperlinkLabel HyperlinkLabel getLabel getParent getBounds getForeground getBackground setForeground drawLine
Sent when an event that the receiver has registered for occurs param event the event which occurred public void handle Event Event event I Hyperlink Listener listener get Link Listener Control event widget listener link Activated Control event widget  handleEvent IHyperlinkListener getLinkListener linkActivated

add Paint Listener new Paint Listener public void paint Control Paint Event e paint e  addPaintListener PaintListener paintControl PaintEvent
add Key Listener new Key Adapter public void key Pressed Key Event e if e character r Activation notify Listeners SWT Default Selection  addKeyListener KeyAdapter keyPressed KeyEvent notifyListeners DefaultSelection
add Listener SWT Traverse new Listener public void handle Event Event e switch e detail let arrows move focus case SWT TRAVERSE ARROW NEXT e detail SWT TRAVERSE TAB NEXT break case SWT TRAVERSE ARROW PREVIOUS e detail SWT TRAVERSE TAB PREVIOUS break case SWT TRAVERSE PAGE NEXT case SWT TRAVERSE PAGE PREVIOUS case SWT TRAVERSE RETURN e doit false return e doit true  addListener handleEvent TRAVERSE_ARROW_NEXT TRAVERSE_TAB_NEXT TRAVERSE_ARROW_PREVIOUS TRAVERSE_TAB_PREVIOUS TRAVERSE_PAGE_NEXT TRAVERSE_PAGE_PREVIOUS TRAVERSE_RETURN
add Focus Listener new Focus Listener public void focus Gained Focus Event e if has Focus has Focus true notify Listeners SWT Selection redraw  addFocusListener FocusListener focusGained FocusEvent hasFocus hasFocus notifyListeners
public void focus Lost Focus Event e if has Focus has Focus false notify Listeners SWT Selection redraw  focusLost FocusEvent hasFocus hasFocus notifyListeners
Constructor for Hyperlink param parent param style public Hyperlink Label Composite parent int style super parent style Grid Layout layout new Grid Layout layout margin Height 3 layout margin Width 2 layout num Columns 1 this set Layout layout this label new Label this style add Paint Listener new Paint Listener public void paint Control Paint Event e paint e add Key Listener new Key Adapter public void key Pressed Key Event e if e character r Activation notify Listeners SWT Default Selection add Listener SWT Traverse new Listener public void handle Event Event e switch e detail let arrows move focus case SWT TRAVERSE ARROW NEXT e detail SWT TRAVERSE TAB NEXT break case SWT TRAVERSE ARROW PREVIOUS e detail SWT TRAVERSE TAB PREVIOUS break case SWT TRAVERSE PAGE NEXT case SWT TRAVERSE PAGE PREVIOUS case SWT TRAVERSE RETURN e doit false return e doit true add Focus Listener new Focus Listener public void focus Gained Focus Event e if has Focus has Focus true notify Listeners SWT Selection redraw public void focus Lost Focus Event e if has Focus has Focus false notify Listeners SWT Selection redraw Grid Data data new Grid Data data horizontal Alignment Grid Data HORIZONTAL ALIGN BEGINNING data vertical Alignment Grid Data VERTICAL ALIGN BEGINNING label set Layout Data data init Accessible Link init Accessible Label  HyperlinkLabel GridLayout GridLayout marginHeight marginWidth numColumns setLayout addPaintListener PaintListener paintControl PaintEvent addKeyListener KeyAdapter keyPressed KeyEvent notifyListeners DefaultSelection addListener handleEvent TRAVERSE_ARROW_NEXT TRAVERSE_TAB_NEXT TRAVERSE_ARROW_PREVIOUS TRAVERSE_TAB_PREVIOUS TRAVERSE_PAGE_NEXT TRAVERSE_PAGE_PREVIOUS TRAVERSE_RETURN addFocusListener FocusListener focusGained FocusEvent hasFocus hasFocus notifyListeners focusLost FocusEvent hasFocus hasFocus notifyListeners GridData GridData horizontalAlignment GridData HORIZONTAL_ALIGN_BEGINNING verticalAlignment GridData VERTICAL_ALIGN_BEGINNING setLayoutData initAccessibleLink initAccessibleLabel
public void set Text String text label set Text text  setText setText
public boolean get Selection return has Focus  getSelection hasFocus
public Label get Label return label  getLabel
void notify Listeners int event Type Event event new Event event type event Type event widget this notify Listeners event Type event  notifyListeners eventType eventType notifyListeners eventType
protected void paint Paint Event e if has Focus GC gc e gc Point size get Size gc set Foreground get Foreground gc draw Focus 0 0 size x size y  PaintEvent hasFocus getSize setForeground getForeground drawFocus
public void add Selection Listener Selection Listener listener check Widget if listener null return Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  addSelectionListener SelectionListener checkWidget TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
public void remove Selection Listener Selection Listener listener check Widget if listener null return remove Listener SWT Selection listener remove Listener SWT Default Selection listener  removeSelectionListener SelectionListener checkWidget removeListener removeListener DefaultSelection
public Point compute Size int w Hint int h Hint boolean changed int inner Width w Hint if inner Width SWT DEFAULT inner Width 4 Point text Size label compute Size w Hint h Hint changed compute Text Size inner Width h Hint int text Width text Size x 4 int text Height text Size y 6 return new Point text Width text Height  computeSize wHint hHint innerWidth wHint innerWidth innerWidth textSize computeSize wHint hHint computeTextSize innerWidth hHint textWidth textSize textHeight textSize textWidth textHeight
public void add Mouse Listener Mouse Listener l super add Mouse Listener l label add Mouse Listener l  addMouseListener MouseListener addMouseListener addMouseListener
public void add Mouse Track Listener Mouse Track Listener l super add Mouse Track Listener l label add Mouse Track Listener l  addMouseTrackListener MouseTrackListener addMouseTrackListener addMouseTrackListener
public void add Paint Listener Paint Listener l super add Paint Listener l label add Paint Listener l  addPaintListener PaintListener addPaintListener addPaintListener
public void add Listener int e Listener l super add Listener e l label add Listener e l  addListener addListener addListener
public void set Background Color c super set Background c label set Background c  setBackground setBackground setBackground
public void set Foreground Color c super set Foreground c label set Foreground c  setForeground setForeground setForeground
public void set Cursor Cursor c super set Cursor c label set Cursor c  setCursor setCursor setCursor
Accessible accessible this get Accessible accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e e result label get Text  getAccessible addAccessibleListener AccessibleAdapter getName AccessibleEvent getText
public void get Help Accessible Event e e result label get Tool Tip Text  getHelp AccessibleEvent getToolTipText
accessible add Accessible Control Listener new Accessible Control Adapter public void get Role Accessible Control Event e e detail ACC ROLE LINK  addAccessibleControlListener AccessibleControlAdapter getRole AccessibleControlEvent ROLE_LINK
public void get State Accessible Control Event e if has Focus e detail ACC STATE FOCUSABLE ACC STATE LINKED ACC STATE FOCUSED else e detail ACC STATE FOCUSABLE ACC STATE LINKED  getState AccessibleControlEvent hasFocus STATE_FOCUSABLE STATE_LINKED STATE_FOCUSED STATE_FOCUSABLE STATE_LINKED
private void init Accessible Link Accessible accessible this get Accessible accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e e result label get Text public void get Help Accessible Event e e result label get Tool Tip Text accessible add Accessible Control Listener new Accessible Control Adapter public void get Role Accessible Control Event e e detail ACC ROLE LINK public void get State Accessible Control Event e if has Focus e detail ACC STATE FOCUSABLE ACC STATE LINKED ACC STATE FOCUSED else e detail ACC STATE FOCUSABLE ACC STATE LINKED  initAccessibleLink getAccessible addAccessibleListener AccessibleAdapter getName AccessibleEvent getText getHelp AccessibleEvent getToolTipText addAccessibleControlListener AccessibleControlAdapter getRole AccessibleControlEvent ROLE_LINK getState AccessibleControlEvent hasFocus STATE_FOCUSABLE STATE_LINKED STATE_FOCUSED STATE_FOCUSABLE STATE_LINKED
accessible add Accessible Control Listener new Accessible Control Adapter public void get State Accessible Control Event e if has Focus e detail ACC STATE READONLY ACC STATE FOCUSABLE ACC STATE SELECTABLE ACC STATE LINKED ACC STATE FOCUSED else e detail ACC STATE READONLY ACC STATE FOCUSABLE ACC STATE SELECTABLE ACC STATE LINKED  addAccessibleControlListener AccessibleControlAdapter getState AccessibleControlEvent hasFocus STATE_READONLY STATE_FOCUSABLE STATE_SELECTABLE STATE_LINKED STATE_FOCUSED STATE_READONLY STATE_FOCUSABLE STATE_SELECTABLE STATE_LINKED
private void init Accessible Label Accessible accessible label get Accessible accessible add Accessible Control Listener new Accessible Control Adapter public void get State Accessible Control Event e if has Focus e detail ACC STATE READONLY ACC STATE FOCUSABLE ACC STATE SELECTABLE ACC STATE LINKED ACC STATE FOCUSED else e detail ACC STATE READONLY ACC STATE FOCUSABLE ACC STATE SELECTABLE ACC STATE LINKED  initAccessibleLabel getAccessible addAccessibleControlListener AccessibleControlAdapter getState AccessibleControlEvent hasFocus STATE_READONLY STATE_FOCUSABLE STATE_SELECTABLE STATE_LINKED STATE_FOCUSED STATE_READONLY STATE_FOCUSABLE STATE_SELECTABLE STATE_LINKED

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 Help Base Plugin get Default get Log log error Status  getString logError errorStatus IStatus PLUGIN_ID IStatus HelpBasePlugin getDefault getLog errorStatus
Logs a Warning message with an exception Note that the message should already be localized to proper local ie Resources get String should already have been called public static synchronized void log Warning String message if Help Base Plugin DEBUG if message null message NON NLS 1 Status warning Status new Status I Status WARNING PLUGIN ID I Status OK message null Help Base Plugin get Default get Log log warning Status  getString logWarning HelpBasePlugin warningStatus IStatus PLUGIN_ID IStatus HelpBasePlugin getDefault getLog warningStatus
Provides access to singleton return HelpIDE Plugin public static Help Ide Plugin get Default return plugin  HelpIDEPlugin HelpIdePlugin getDefault
public void stop Bundle Context context throws Exception if Base Help System get Mode Base Help System MODE WORKBENCH if PlatformUI is Workbench Running PlatformUI get Workbench get Working Set Manager remove Property Change Listener working Set Listener Base Help System get Working Set Manager remove Property Change Listener working Set Listener plugin null bundle Context null super stop context  BundleContext BaseHelpSystem getMode BaseHelpSystem MODE_WORKBENCH isWorkbenchRunning getWorkbench getWorkingSetManager removePropertyChangeListener workingSetListener BaseHelpSystem getWorkingSetManager removePropertyChangeListener workingSetListener bundleContext
public void start Bundle Context context throws Exception super start context plugin this bundle Context context Setup debugging options DEBUG is Debugging Base Help System set Default Error Util new Error Util if Base Help System get Mode Base Help System MODE WORKBENCH if PlatformUI is Workbench Running register the working set listener to keep the ui and the help working sets in sych working Set Listener new Help Working Set Synchronizer PlatformUI get Workbench get Working Set Manager add Property Change Listener working Set Listener Base Help System get Working Set Manager add Property Change Listener working Set Listener else running tests workbench not running  BundleContext bundleContext isDebugging BaseHelpSystem setDefaultErrorUtil ErrorUtil BaseHelpSystem getMode BaseHelpSystem MODE_WORKBENCH isWorkbenchRunning workingSetListener HelpWorkingSetSynchronizer getWorkbench getWorkingSetManager addPropertyChangeListener workingSetListener BaseHelpSystem getWorkingSetManager addPropertyChangeListener workingSetListener
public Help Working Set Synchronizer get Working Set Synchronizer return working Set Listener  HelpWorkingSetSynchronizer getWorkingSetSynchronizer workingSetListener

Workbench Resources constructor comment public Help Ide Resources super  WorkbenchResources HelpIdeResources
Returns a string from a property file public static URL get Image Path String name I Path path new Path icons append name NON NLS 1 return Platform find Help Ide Plugin get Default get Bundle path  getImagePath IPath HelpIdePlugin getDefault getBundle
Returns a string from a property file public static String get String String name try return res Bundle get String name catch Exception e return name  getString resBundle getString
Returns a string from a property file public static String get String String name String replace0 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 String replace3 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 replace3 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 String replace3 String replace4 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 replace3 replace4 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 String replace3 String replace4 String replace5 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 replace3 replace4 replace5 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile

public interface I Hyperlink Listener param link Label org eclipse swt widgets Label  IHyperlinkListener linkLabel
public void link Activated Control link Label param link Label org eclipse swt widgets Label  linkActivated linkLabel linkLabel
public void link Entered Control link Label param link Label org eclipse swt widgets Label  linkEntered linkLabel linkLabel

protected Button include Disabled Activities Search Page public Help Search Page super search Query Data new Search Query Data  includeDisabledActivities HelpSearchPage searchQueryData SearchQueryData
search Word Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e if search Word Combo get Selection Index 0 return int index previous Search Query Data size 1 search Word Combo get Selection Index search Query Data Search Query Data previous Search Query Data get index search Word Combo set Text search Query Data get Search Word all set Selection search Query Data is Book Filtering selected set Selection search Query Data is Book Filtering include Disabled Activities set Selection search Query Data is Activity Filtering display Selected Books headings Button set Selection search Operation get Query Data is Fields Search  searchWordCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent searchWordCombo getSelectionIndex previousSearchQueryData searchWordCombo getSelectionIndex searchQueryData SearchQueryData previousSearchQueryData searchWordCombo setText searchQueryData getSearchWord setSelection searchQueryData isBookFiltering setSelection searchQueryData isBookFiltering includeDisabledActivities setSelection searchQueryData isActivityFiltering displaySelectedBooks headingsButton setSelection searchOperation getQueryData isFieldsSearch
search Word Combo add Modify Listener new Modify Listener public void modify Text Modify Event e update Search Button State  searchWordCombo addModifyListener ModifyListener modifyText ModifyEvent updateSearchButtonState
all set Layout Data gd all add Selection Listener new Selection Adapter public void widget Selected Selection Event e search Query Data set Book Filtering false  setLayoutData addSelectionListener SelectionAdapter widgetSelected SelectionEvent searchQueryData setBookFiltering
get String Help Search Page selected Books NON NLS 1 selected add Selection Listener new Selection Adapter public void widget Selected Selection Event e search Query Data set Book Filtering true update Search Button State  getString HelpSearchPage selectedBooks addSelectionListener SelectionAdapter widgetSelected SelectionEvent searchQueryData setBookFiltering updateSearchButtonState
choose Working Set add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Working Set Selection Dialog dialog PlatformUI get Workbench get Working Set Manager create Working Set Selection Dialog selected get Shell false no multiple selection if dialog open Window OK all set Selection false selected set Selection true search Query Data set Book Filtering true search Query Data set Selected Working Sets dialog get Selection display Selected Books  chooseWorkingSet addSelectionListener SelectionAdapter widgetSelected SelectionEvent IWorkingSetSelectionDialog getWorkbench getWorkingSetManager createWorkingSetSelectionDialog getShell setSelection setSelection searchQueryData setBookFiltering searchQueryData setSelectedWorkingSets getSelection displaySelectedBooks
get String search Disabled Activities NON NLS 1 include Disabled Activities add Selection Listener new Selection Listener public void widget Selected Selection Event e search Query Data set Activity Filtering include Disabled Activities get Selection  getString searchDisabledActivities includeDisabledActivities addSelectionListener SelectionListener widgetSelected SelectionEvent searchQueryData setActivityFiltering includeDisabledActivities getSelection
get Selection public void widget Default Selected Selection Event e widget Selected e  getSelection widgetDefaultSelected SelectionEvent widgetSelected
public void create Control Composite parent Composite control new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 control set Layout layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL control set Layout Data gd Search Expression Label expression Label new Label control SWT LEFT expression Label set Text Help Ide Resources get String expression NON NLS 1 Pattern combo search Word Combo new Combo control SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint convert Width In Chars To Pixels 30 search Word Combo set Layout Data gd Not done here to prevent page from resizing f Pattern set Items get Previous Search Patterns search Word Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e if search Word Combo get Selection Index 0 return int index previous Search Query Data size 1 search Word Combo get Selection Index search Query Data Search Query Data previous Search Query Data get index search Word Combo set Text search Query Data get Search Word all set Selection search Query Data is Book Filtering selected set Selection search Query Data is Book Filtering include Disabled Activities set Selection search Query Data is Activity Filtering display Selected Books headings Button set Selection search Operation get Query Data is Fields Search search Word Combo add Modify Listener new Modify Listener public void modify Text Modify Event e update Search Button State Space new Label control SWT NONE Syntax description Label label new Label control SWT LEFT gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 1 label set Layout Data gd label set Text Help Ide Resources get String expression label NON NLS 1 Headings only button headings Button new Button control SWT CHECK gd new Grid Data gd horizontal Alignment gd BEGINNING gd new Grid Data gd vertical Alignment gd VERTICAL ALIGN BEGINNING headings Button set Layout Data gd headings Button set Font font headings Button set Text Workbench Resources get String Search headers only Filtering group Group filtering Group new Group control SWT NONE filtering Group set Layout layout gd new Grid Data Grid Data FILL BOTH gd horizontal Span 2 gd grab Excess Horizontal Space true gd grab Excess Vertical Space true filtering Group set Layout Data gd filtering Group set Text Help Ide Resources get String limit to NON NLS 1 layout new Grid Layout layout num Columns 3 filtering Group set Layout layout all new Button filtering Group SWT RADIO all set Selection search Query Data is Book Filtering all set Text Help Ide Resources get String Help Search Page all Books NON NLS 1 gd new Grid Data gd horizontal Span 3 all set Layout Data gd all add Selection Listener new Selection Adapter public void widget Selected Selection Event e search Query Data set Book Filtering false selected new Button filtering Group SWT RADIO selected set Selection search Query Data is Book Filtering selected set Text Help Ide Resources get String Help Search Page selected Books NON NLS 1 selected add Selection Listener new Selection Adapter public void widget Selected Selection Event e search Query Data set Book Filtering true update Search Button State selected Working Sets Text new Text filtering Group SWT SINGLE SWT BORDER SWT READ ONLY display Selected Books Button choose Working Set new Button filtering Group SWT PUSH org eclipse jface dialogs Dialog apply Dialog Font choose Working Set set Button Layout Data choose Working Set choose Working Set set Text Help Ide Resources get String Help Search Page choose NON NLS 1 SWT Util set Button Dimension Hint choose Working Set gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Indent 8 gd width Hint SWT Util convert Width In Chars To Pixels 30 selected Working Sets Text selected Working Sets Text set Layout Data gd choose Working Set add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Working Set Selection Dialog dialog PlatformUI get Workbench get Working Set Manager create Working Set Selection Dialog selected get Shell false no multiple selection if dialog open Window OK all set Selection false selected set Selection true search Query Data set Book Filtering true search Query Data set Selected Working Sets dialog get Selection display Selected Books include Disabled Activities new Button filtering Group SWT CHECK gd new Grid Data gd horizontal Span 3 include Disabled Activities set Layout Data gd include Disabled Activities set Text Help Ide Resources get String search Disabled Activities NON NLS 1 include Disabled Activities add Selection Listener new Selection Listener public void widget Selected Selection Event e search Query Data set Activity Filtering include Disabled Activities get Selection public void widget Default Selected Selection Event e widget Selected e org eclipse jface dialogs Dialog apply Dialog Font control set Control control Workbench Help set Help control I Help Ide Constants SEARCH PAGE  createControl GridLayout GridLayout numColumns setLayout GridData GridData GridData FILL_HORIZONTAL setLayoutData expressionLabel expressionLabel setText HelpIdeResources getString searchWordCombo GridData GridData FILL_HORIZONTAL widthHint convertWidthInCharsToPixels searchWordCombo setLayoutData fPattern setItems getPreviousSearchPatterns searchWordCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent searchWordCombo getSelectionIndex previousSearchQueryData searchWordCombo getSelectionIndex searchQueryData SearchQueryData previousSearchQueryData searchWordCombo setText searchQueryData getSearchWord setSelection searchQueryData isBookFiltering setSelection searchQueryData isBookFiltering includeDisabledActivities setSelection searchQueryData isActivityFiltering displaySelectedBooks headingsButton setSelection searchOperation getQueryData isFieldsSearch searchWordCombo addModifyListener ModifyListener modifyText ModifyEvent updateSearchButtonState GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData setText HelpIdeResources getString expression_label headingsButton GridData horizontalAlignment GridData verticalAlignment VERTICAL_ALIGN_BEGINNING headingsButton setLayoutData headingsButton setFont headingsButton setText WorkbenchResources getString Search_headers_only filteringGroup filteringGroup setLayout GridData GridData FILL_BOTH horizontalSpan grabExcessHorizontalSpace grabExcessVerticalSpace filteringGroup setLayoutData filteringGroup setText HelpIdeResources getString limit_to GridLayout numColumns filteringGroup setLayout filteringGroup setSelection searchQueryData isBookFiltering setText HelpIdeResources getString HelpSearchPage allBooks GridData horizontalSpan setLayoutData addSelectionListener SelectionAdapter widgetSelected SelectionEvent searchQueryData setBookFiltering filteringGroup setSelection searchQueryData isBookFiltering setText HelpIdeResources getString HelpSearchPage selectedBooks addSelectionListener SelectionAdapter widgetSelected SelectionEvent searchQueryData setBookFiltering updateSearchButtonState selectedWorkingSetsText filteringGroup READ_ONLY displaySelectedBooks chooseWorkingSet filteringGroup applyDialogFont chooseWorkingSet setButtonLayoutData chooseWorkingSet chooseWorkingSet setText HelpIdeResources getString HelpSearchPage SWTUtil setButtonDimensionHint chooseWorkingSet GridData GridData FILL_HORIZONTAL horizontalIndent widthHint SWTUtil convertWidthInCharsToPixels selectedWorkingSetsText selectedWorkingSetsText setLayoutData chooseWorkingSet addSelectionListener SelectionAdapter widgetSelected SelectionEvent IWorkingSetSelectionDialog getWorkbench getWorkingSetManager createWorkingSetSelectionDialog getShell setSelection setSelection searchQueryData setBookFiltering searchQueryData setSelectedWorkingSets getSelection displaySelectedBooks includeDisabledActivities filteringGroup GridData horizontalSpan includeDisabledActivities setLayoutData includeDisabledActivities setText HelpIdeResources getString searchDisabledActivities includeDisabledActivities addSelectionListener SelectionListener widgetSelected SelectionEvent searchQueryData setActivityFiltering includeDisabledActivities getSelection widgetDefaultSelected SelectionEvent widgetSelected applyDialogFont setControl WorkbenchHelp setHelp IHelpIdeConstants SEARCH_PAGE
see I Search Page perform Action public boolean perform Action search Query Data set Search Word search Word Combo get Text search Query Data set Fields Search false Save working set Preferences prefs Help Base Plugin get Default get Plugin Preferences String lastWS prefs get String Base Help System WORKING SET I Working Set iws search Query Data get Selected Working Sets if search Query Data is Book Filtering iws null iws length 0 iws 0 get Name equals lastWS prefs set Value Base Help System WORKING SET iws 0 get Name Help Base Plugin get Default save Plugin Preferences else if search Query Data is Book Filtering lastWS null lastWS length 0 prefs set Value Base Help System WORKING SET NON NLS 1 Help Base Plugin get Default save Plugin Preferences if previous Search Query Data contains search Query Data previous Search Query Data add search Query Data I Search Query searchUI Query new Help Search Query search Query Data New SearchUI activate Search Result View New SearchUI run Query searchUI Query return true  ISearchPage performAction performAction searchQueryData setSearchWord searchWordCombo getText searchQueryData setFieldsSearch HelpBasePlugin getDefault getPluginPreferences getString BaseHelpSystem WORKING_SET IWorkingSet searchQueryData getSelectedWorkingSets searchQueryData isBookFiltering getName setValue BaseHelpSystem WORKING_SET getName HelpBasePlugin getDefault savePluginPreferences searchQueryData isBookFiltering setValue BaseHelpSystem WORKING_SET HelpBasePlugin getDefault savePluginPreferences previousSearchQueryData searchQueryData previousSearchQueryData searchQueryData ISearchQuery searchUIQuery HelpSearchQuery searchQueryData NewSearchUI activateSearchResultView NewSearchUI runQuery searchUIQuery
return true public void set Container I Search Page Container container scontainer container  setContainer ISearchPageContainer
public void set Visible boolean visible if visible search Word Combo null if first Time first Time false Set item and text here to prevent page from resizing String patterns new String previous Search Query Data size for int i 0 i previous Search Query Data size i patterns previous Search Query Data size 1 i Search Query Data previous Search Query Data get i get Search Word search Word Combo set Items patterns search Word Combo set Focus update Search Button State super set Visible visible  setVisible searchWordCombo firstTime firstTime previousSearchQueryData previousSearchQueryData previousSearchQueryData SearchQueryData previousSearchQueryData getSearchWord searchWordCombo setItems searchWordCombo setFocus updateSearchButtonState setVisible
Lists selected books in the selection field If filtering dissabled or all books are selected it will display All protected void display Selected Books String working Set Names NON NLS 1 if search Query Data is Book Filtering I Working Set working Sets search Query Data get Selected Working Sets for int i 0 i working Sets length i String working Set working Sets i get Name if working Set Names length 0 working Set Names working Set else working Set Names Help Ide Resources get String Help Search Page book Label Separator NON NLS 1 working Set else working Set Names NON NLS 1 selected Working Sets Text set Text working Set Names update Search Button State  displaySelectedBooks workingSetNames searchQueryData isBookFiltering IWorkingSet workingSets searchQueryData getSelectedWorkingSets workingSets workingSet workingSets getName workingSetNames workingSetNames workingSet workingSetNames HelpIdeResources getString HelpSearchPage bookLabelSeparator workingSet workingSetNames selectedWorkingSetsText setText workingSetNames updateSearchButtonState
protected void update Search Button State boolean search Word Valid search Word Combo get Text null search Word Combo get Text trim length 0 boolean working Set Valid selected Working Sets Text get Text null selected Working Sets Text get Text length 0 scontainer set Perform Action Enabled search Word Valid all get Selection working Set Valid  updateSearchButtonState searchWordValid searchWordCombo getText searchWordCombo getText workingSetValid selectedWorkingSetsText getText selectedWorkingSetsText getText setPerformActionEnabled searchWordValid getSelection workingSetValid

private Help Search Result help Search Result public Help Search Query Search Query Data data super query Data data singular Label Help Ide Resources get String single Search Result NON NLS 1 query Data get Search Word plural Labelpattern Help Ide Resources get String multiple Search Result NON NLS 1 query Data get Search Word 0 NON NLS 1  HelpSearchResult helpSearchResult HelpSearchQuery SearchQueryData queryData singularLabel HelpIdeResources getString singleSearchResult queryData getSearchWord pluralLabelpattern HelpIdeResources getString multipleSearchResult queryData getSearchWord
public I Status run I Progress Monitor monitor try Working Set working Sets null no filtering if query Data is Book Filtering I Working Set all Working Sets query Data get Selected Working Sets Array List help Working Sets new Array List Working Set Manager wsmgr Base Help System get Working Set Manager for int i 0 i all Working Sets length i Working Set ws wsmgr get Working Set all Working Sets i get Name if ws null help Working Sets add ws working Sets Working Set help Working Sets to Array new Working Set help Working Sets size Search Results results new Search Results working Sets query Data get Max Hits query Data get Locale try Base Help System get Search Manager search query Data get Search Query results monitor catch Query Too Complex Exception qe ignore post Results results catch Operation Canceled Exception oce allowed no logging monitor done throw oce catch Exception e Help Ide Plugin log Error Help Ide Resources get String WE021 e NON NLS 1 monitor done return new Status I Status OK Help Ide Plugin PLUGIN ID 0 null NON NLS 1  IStatus IProgressMonitor WorkingSet workingSets queryData isBookFiltering IWorkingSet allWorkingSets queryData getSelectedWorkingSets ArrayList helpWorkingSets ArrayList WorkingSetManager BaseHelpSystem getWorkingSetManager allWorkingSets WorkingSet getWorkingSet allWorkingSets getName helpWorkingSets workingSets WorkingSet helpWorkingSets toArray WorkingSet helpWorkingSets SearchResults SearchResults workingSets queryData getMaxHits queryData getLocale BaseHelpSystem getSearchManager queryData getSearchQuery QueryTooComplexException postResults OperationCanceledException HelpIdePlugin logError HelpIdeResources getString IStatus HelpIdePlugin PLUGIN_ID
return new Status I Status OK Help Ide Plugin PLUGIN ID 0 null NON NLS 1 public String get Label return Help Ide Resources get String Searching for query Data NON NLS 1 get Search Word  IStatus HelpIdePlugin PLUGIN_ID getLabel HelpIdeResources getString Searching_for queryData getSearchWord
get Search Word public boolean can Rerun return true  getSearchWord canRerun
return true public boolean can Run In Background return true  canRunInBackground
public I Search Result get Search Result if help Search Result null help Search Result new Help Search Result this return help Search Result  ISearchResult getSearchResult helpSearchResult helpSearchResult HelpSearchResult helpSearchResult
private void post Results Search Results results Search Hit search Hits results get Search Hits Filtering of results by activities Array List enabled Hits new Array List for int i 0 i search Hits length i if query Data is Activity Filtering Help Base Plugin get Activity Support is Enabled Topic search Hits i get Href query Data get Locale enabled Hits add search Hits i Match matches new Match enabled Hits size for int i 0 i enabled Hits size i matches i new Match enabled Hits get i 0 0 Help Search Result get Search Result remove All in case it is rerun Help Search Result get Search Result add Matches matches  postResults SearchResults SearchHit searchHits getSearchHits ArrayList enabledHits ArrayList searchHits queryData isActivityFiltering HelpBasePlugin getActivitySupport isEnabledTopic searchHits getHref queryData getLocale enabledHits searchHits enabledHits enabledHits enabledHits HelpSearchResult getSearchResult removeAll HelpSearchResult getSearchResult addMatches
return Returns the plural Labelpattern String get Plural Labelpattern return plural Labelpattern  pluralLabelpattern getPluralLabelpattern pluralLabelpattern
return Returns the singular Label String get Singular Label return singular Label  singularLabel getSingularLabel singularLabel
return Returns the query Data Search Query Data get Query Data return query Data  queryData SearchQueryData getQueryData queryData

get Image Path I Help Ide Constants IMAGE FILE SEARCH private Help Search Query query public Help Search Result Help Search Query query super this query query  getImagePath IHelpIdeConstants IMAGE_FILE_SEARCH HelpSearchQuery HelpSearchResult HelpSearchQuery
public String get Label if get Match Count 1 return query get Singular Label else return Message Format format query get Plural Labelpattern new Object new Integer get Match Count  getLabel getMatchCount getSingularLabel MessageFormat getPluralLabelpattern getMatchCount
new Object new Integer get Match Count public String get Tooltip return get Label  getMatchCount getTooltip getLabel
return get Label public Image Descriptor get Image Descriptor return IMAGE DSCR SEARCH  getLabel ImageDescriptor getImageDescriptor IMAGE_DSCR_SEARCH
return IMAGE DSCR SEARCH public org eclipse search ui I Search Query get Query return query  IMAGE_DSCR_SEARCH ISearchQuery getQuery
return query public I Editor Match Adapter get Editor Match Adapter return null  IEditorMatchAdapter getEditorMatchAdapter
return null public I File Match Adapter get File Match Adapter return null  IFileMatchAdapter getFileMatchAdapter

private Sort Action sort By Title Action public Result Page super Abstract Text Search View Page FLAG LAYOUT FLAT sort By Score Action new Sort Action Help Ide Resources get String Help Search Result Page score this SORT BY SCORE NON NLS 1 sort By Title Action new Sort Action Help Ide Resources get String Help Search Result Page title this SORT BY TITLE NON NLS 1 current Sort Action sort By Score Action  SortAction sortByTitleAction ResultPage AbstractTextSearchViewPage FLAG_LAYOUT_FLAT sortByScoreAction SortAction HelpIdeResources getString HelpSearchResultPage SORT_BY_SCORE sortByTitleAction SortAction HelpIdeResources getString HelpSearchResultPage SORT_BY_TITLE currentSortAction sortByScoreAction
Busy Indicator show While null new Runnable public void run try Base Help System get Help Display display Search url Query hit get Href false catch Exception e  BusyIndicator showWhile BaseHelpSystem getHelpDisplay displaySearch urlQuery getHref
protected void show Match Match match int current Offset int current Length boolean activate throws Part Init Exception TODO honor activate flag ref bug 51345 Object element match get Element try final Search Hit hit Search Hit element Help Search Query query Help Search Query Help Search Result get Input get Query final String url Query query get Query Data toURL Query Busy Indicator show While null new Runnable public void run try Base Help System get Help Display display Search url Query hit get Href false catch Exception e catch Exception e  showMatch currentOffset currentLength PartInitException getElement SearchHit SearchHit HelpSearchQuery HelpSearchQuery HelpSearchResult getInput getQuery urlQuery getQueryData toURLQuery BusyIndicator showWhile BaseHelpSystem getHelpDisplay displaySearch urlQuery getHref
protected void elements Changed Object objects if content Provider null content Provider elements Changed objects  elementsChanged contentProvider contentProvider elementsChanged
content Provider elements Changed objects protected void clear if content Provider null content Provider clear  contentProvider elementsChanged contentProvider contentProvider
content Provider clear protected void configure Tree Viewer Tree Viewer viewer throw new Illegal State Exception this get Class get Name doesn t support tree mode NON NLS 1  contentProvider configureTreeViewer TreeViewer IllegalStateException getClass getName
protected void configure Table Viewer Table Viewer viewer viewer set Sorter new Sorter By Score viewer set Label Provider new Result Table Label Provider content Provider new Result Table Content Provider viewer set Content Provider content Provider  configureTableViewer TableViewer setSorter SorterByScore setLabelProvider ResultTableLabelProvider contentProvider ResultTableContentProvider setContentProvider contentProvider
viewer set Content Provider content Provider protected void fill Context Menu I Menu Manager mgr super fill Context Menu mgr add Sort Actions mgr  setContentProvider contentProvider fillContextMenu IMenuManager fillContextMenu addSortActions
private void add Sort Actions I Menu Manager mgr if get Layout FLAG LAYOUT FLAT return Menu Manager sort Menu new Menu Manager Help Ide Resources get String Help Search Result Page sort By NON NLS 1 sort Menu add sort By Score Action sort Menu add sort By Title Action sort By Score Action set Checked current Sort Action sort By Score Action sort By Title Action set Checked current Sort Action sort By Title Action mgr append To Group I Context Menu Constants GROUP VIEWER SETUP sort Menu  addSortActions IMenuManager getLayout FLAG_LAYOUT_FLAT MenuManager sortMenu MenuManager HelpIdeResources getString HelpSearchResultPage sortBy sortMenu sortByScoreAction sortMenu sortByTitleAction sortByScoreAction setChecked currentSortAction sortByScoreAction sortByTitleAction setChecked currentSortAction sortByTitleAction appendToGroup IContextMenuConstants GROUP_VIEWER_SETUP sortMenu
public void set Sort Order Sort Action action current Sort Action action Structured Viewer viewer get Viewer if action get Sort Order SORT BY SCORE viewer set Sorter new Sorter By Score else viewer set Sorter new Sorter By Title  setSortOrder SortAction currentSortAction StructuredViewer getViewer getSortOrder SORT_BY_SCORE setSorter SorterByScore setSorter SorterByTitle

private Table Viewer table Viewer public Object get Elements Object input Element if input Element instanceof Abstract Text Search Result return Abstract Text Search Result input Element get Elements return EMPTY ARRAY  TableViewer tableViewer getElements inputElement inputElement AbstractTextSearchResult AbstractTextSearchResult inputElement getElements EMPTY_ARRAY
return EMPTY ARRAY public void dispose  EMPTY_ARRAY
public void dispose public void input Changed Viewer viewer Object old Input Object new Input table Viewer Table Viewer viewer search Result Abstract Text Search Result new Input  inputChanged oldInput newInput tableViewer TableViewer searchResult AbstractTextSearchResult newInput
public void elements Changed Object updated Elements for int i 0 i updated Elements length i if search Result get Match Count updated Elements i 0 if table Viewer test Find Item updated Elements i null table Viewer refresh updated Elements i else table Viewer add updated Elements i else table Viewer remove updated Elements i  elementsChanged updatedElements updatedElements searchResult getMatchCount updatedElements tableViewer testFindItem updatedElements tableViewer updatedElements tableViewer updatedElements tableViewer updatedElements
public void clear table Viewer refresh  tableViewer

static Image Registry img Registry null Result Table Label Provider super if img Registry null img Registry Help Ide Plugin get Default get Image Registry img Registry put I Help Ide Constants IMAGE KEY TOPIC IMAGE DSCR TOPIC  ImageRegistry imgRegistry ResultTableLabelProvider imgRegistry imgRegistry HelpIdePlugin getDefault getImageRegistry imgRegistry IHelpIdeConstants IMAGE_KEY_TOPIC IMAGE_DSCR_TOPIC
public String get Text Object o if o instanceof Search Hit Search Hit search Hit Search Hit o Use Score percentage and label as topic label float score search Hit get Score Number Format percent Format Number Format get Percent Instance String score String percent Format format score return score String search Hit get Label NON NLS 1 return super get Text o  getText SearchHit SearchHit searchHit SearchHit searchHit getScore NumberFormat percentFormat NumberFormat getPercentInstance scoreString percentFormat scoreString searchHit getLabel getText
public Image get Image Object o if o instanceof Search Hit return img Registry get I Help Ide Constants IMAGE KEY TOPIC return super get Image o  getImage SearchHit imgRegistry IHelpIdeConstants IMAGE_KEY_TOPIC getImage

Help Search Query constructor public Search Query Data search Query new Search Query max Hits MAX HITS String working Set Name Help Base Plugin get Default get Plugin Preferences get String Base Help System WORKING SET if working Set Name null working Set Name length 0 book Filtering false working Sets new I Working Set 0 else Assumption we only remember one working set no multi selection I Working Set iws PlatformUI get Workbench get Working Set Manager get Working Set working Set Name if iws null book Filtering false working Sets new I Working Set 0 else book Filtering true working Sets new I Working Set iws  HelpSearchQuery SearchQueryData searchQuery SearchQuery maxHits MAX_HITS workingSetName HelpBasePlugin getDefault getPluginPreferences getString BaseHelpSystem WORKING_SET workingSetName workingSetName bookFiltering workingSets IWorkingSet IWorkingSet getWorkbench getWorkingSetManager getWorkingSet workingSetName bookFiltering workingSets IWorkingSet bookFiltering workingSets IWorkingSet
public I Search Query get Search Query return search Query  ISearchQuery getSearchQuery searchQuery
Returns the list of books to be included in search or null if book Filtering is off public I Working Set get Selected Working Sets if book Filtering return working Sets return null  bookFiltering IWorkingSet getSelectedWorkingSets bookFiltering workingSets
Returns the locale in which the search will be performed public String get Locale return search Query get Locale  getLocale searchQuery getLocale
Returns true if books filtering is enabled public boolean is Book Filtering return book Filtering  isBookFiltering bookFiltering
Enables book filtering param enable true if book filtering is turned on public void set Book Filtering boolean enable this book Filtering enable if enable working Sets length 0 selected Books new Array List I Toc tocs Help System get Toc Manager get Tocs search Query get Locale for int i 0 i tocs length i selected Books add tocs i  setBookFiltering bookFiltering workingSets selectedBooks ArrayList IToc HelpSystem getTocManager getTocs searchQuery getLocale selectedBooks
Sets the working sets to be included in search param working Sets public void set Selected Working Sets I Working Set working Sets this working Sets working Sets  workingSets setSelectedWorkingSets IWorkingSet workingSets workingSets workingSets
Sets search to be performed on the fields only param field Search true if field only search public void set Fields Search boolean field Search search Query set Field Search field Search  fieldSearch setFieldsSearch fieldSearch searchQuery setFieldSearch fieldSearch
Sets the max Hits param max Hits The max Hits to set public void set Max Hits int max Hits this max Hits max Hits  maxHits maxHits maxHits setMaxHits maxHits maxHits maxHits
public String toURL Query String q search Word NON NLS 1 URL Coder encode search Query get Search Word max Hits NON NLS 1 max Hits lang NON NLS 1 search Query get Locale if search Query get Field Names is Empty for Iterator iterator search Query get Field Names iterator iterator has Next String field String iterator next try q field URL Encoder encode field UTF 8 NON NLS 1 NON NLS 2 catch Unsupported Encoding Exception uee if search Query is Field Search q field Search true NON NLS 1 else q field Search false NON NLS 1 if book Filtering for int i 0 i working Sets length i q scope URL Coder encode working Sets i get Name NON NLS 1 return q  toURLQuery searchWord URLCoder searchQuery getSearchWord maxHits maxHits searchQuery getLocale searchQuery getFieldNames isEmpty searchQuery getFieldNames hasNext URLEncoder UnsupportedEncodingException searchQuery isFieldSearch fieldSearch fieldSearch bookFiltering workingSets URLCoder workingSets getName
Gets the search Word return Returns a String public String get Search Word return search Query get Search Word  searchWord getSearchWord searchQuery getSearchWord
Sets the search Word param search Word The search word to set public void set Search Word String search Word search Query set Search Word search Word  searchWord searchWord setSearchWord searchWord searchQuery setSearchWord searchWord
Gets the max Hits return Returns a int public int get Max Hits return max Hits  maxHits getMaxHits maxHits
Sets whether results should be filtered by enabled activities public void set Activity Filtering boolean filter activity Filtering filter  setActivityFiltering activityFiltering
Gets the max Hits return Returns true if results should be filter by enabled activites public boolean is Activity Filtering return activity Filtering  maxHits isActivityFiltering activityFiltering

private Result Page f Page public Sort Action String label Result Page page int sort Order super label f Page page f Sort Order sort Order  ResultPage fPage SortAction ResultPage sortOrder fPage fSortOrder sortOrder
f Sort Order sort Order public void run f Page set Sort Order this  fSortOrder sortOrder fPage setSortOrder
f Page set Sort Order this public int get Sort Order return f Sort Order  fPage setSortOrder getSortOrder fSortOrder

public class Sorter By Score extends Viewer Sorter see org eclipse jface viewers Viewer Sorter compare org eclipse jface viewers Viewer java lang Object java lang Object public int compare Viewer viewer Object e1 Object e2 try float rank1 Search Hit e1 get Score float rank2 Search Hit e2 get Score if rank1 rank2 0 return 1 else if rank1 rank2 return 0 else return 1 catch Exception e return super compare viewer e1 e2  SorterByScore ViewerSorter ViewerSorter SearchHit getScore SearchHit getScore

public class Sorter By Title extends Viewer Sorter see org eclipse jface viewers Viewer Sorter compare org eclipse jface viewers Viewer java lang Object java lang Object public int compare Viewer viewer Object e1 Object e2 try String title1 Search Hit e1 get Label String title2 Search Hit e2 get Label return super get Collator compare title1 title2 catch Exception e return super compare viewer e1 e2  SorterByTitle ViewerSorter ViewerSorter SearchHit getLabel SearchHit getLabel getCollator

private static double fg Vertical Dialog Unit Size 0 0 private static void initialize Dialog Units Control control GC gc new GC control gc set Font control get Font int average Width gc get Font Metrics get Average Char Width int height gc get Font Metrics get Height gc dispose fg Horizontal Dialog Unit Size average Width 0 25 fg Vertical Dialog Unit Size height 0 125  fgVerticalDialogUnitSize initializeDialogUnits setFont getFont averageWidth getFontMetrics getAverageCharWidth getFontMetrics getHeight fgHorizontalDialogUnitSize averageWidth fgVerticalDialogUnitSize
see Dialog Page convert HorizontalDL Us To Pixels private static int convert HorizontalDL Us To Pixels int dlus return int Math round dlus fg Horizontal Dialog Unit Size  DialogPage convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels fgHorizontalDialogUnitSize
see Dialog Page convert VerticalDL Us To Pixels private static int convert VerticalDL Us To Pixels int dlus return int Math round dlus fg Vertical Dialog Unit Size  DialogPage convertVerticalDLUsToPixels convertVerticalDLUsToPixels fgVerticalDialogUnitSize
see Dialog Page convert Width In Chars To Pixels public static int convert Width In Chars To Pixels int chars Text text if fg Horizontal Dialog Unit Size 0 0 initialize Dialog Units text return convert HorizontalDL Us To Pixels chars 4  DialogPage convertWidthInCharsToPixels convertWidthInCharsToPixels fgHorizontalDialogUnitSize initializeDialogUnits convertHorizontalDLUsToPixels
Returns a width hint for a button control public static int get Button Width Hint Button button if fg Horizontal Dialog Unit Size 0 0 initialize Dialog Units button int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH return Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x  getButtonWidthHint fgHorizontalDialogUnitSize initializeDialogUnits widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint computeSize
Returns a height hint for a button control public static int get Button Heigth Hint Button button if fg Horizontal Dialog Unit Size 0 0 initialize Dialog Units button return convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT  getButtonHeigthHint fgHorizontalDialogUnitSize initializeDialogUnits convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT
Sets width and height hint for the button control b Note b This is a NOP if the button s layout data is not an instance of code Grid Data code param button the button for which to set the dimension hint public static void set Button Dimension Hint Button button Assert is Not Null button Object gd button get Layout Data if gd instanceof Grid Data Grid Data gd height Hint SWT Util get Button Heigth Hint button Grid Data gd width Hint SWT Util get Button Width Hint button  GridData setButtonDimensionHint isNotNull getLayoutData GridData GridData heightHint SWTUtil getButtonHeigthHint GridData widthHint SWTUtil getButtonWidthHint

public final static int MAX LINE LENGTH 72 Constructor public Styled Line Wrapper String text if text null text length 0 text use one blank space NON NLS 1 set Text text  MAX_LINE_LENGTH StyledLineWrapper setText
see Styled Text Content add Text Change Listener Text Change Listener public void add Text Change Listener Text Change Listener l do nothing  StyledTextContent addTextChangeListener TextChangeListener addTextChangeListener TextChangeListener
see Styled Text Content get Char Count public int get Char Count if char Count 1 return char Count char Count 0 for Iterator i lines iterator i has Next char Count String i next length return char Count  StyledTextContent getCharCount getCharCount charCount charCount charCount hasNext charCount charCount
see Styled Text Content get Line int public String get Line int i if i lines size i 0 SWT error SWT ERROR INVALID ARGUMENT return String lines get i  StyledTextContent getLine getLine ERROR_INVALID_ARGUMENT
see Styled Text Content get Line At Offset int public int get Line At Offset int offset if offset get Char Count return get Line Count 1 int count 0 int line 1 while count offset count get Line line length return line  StyledTextContent getLineAtOffset getLineAtOffset getCharCount getLineCount getLine
see Styled Text Content get Line Count public int get Line Count if lines size 0 return 1 else return lines size  StyledTextContent getLineCount getLineCount
see Styled Text Content get Line Delimiter public String get Line Delimiter return null  StyledTextContent getLineDelimiter getLineDelimiter
see Styled Text Content get Offset At Line int public int get Offset At Line int line if lines size 0 return 0 int offset 0 for int i 0 i line i offset get Line i length return offset  StyledTextContent getOffsetAtLine getOffsetAtLine getLine
see Styled Text Content get Text Range int int public String get Text Range int start int end int l1 get Line At Offset start int l2 get Line At Offset end if l1 l2 return get Line l1 substring start get Offset At Line l1 end start else String Buffer range new String Buffer get Line l1 substring start get Offset At Line l1 for int i l1 1 i l2 i range append get Line i range append get Line l2 substring 0 end get Offset At Line l2 return range to String  StyledTextContent getTextRange getTextRange getLineAtOffset getLineAtOffset getLine getOffsetAtLine StringBuffer StringBuffer getLine getOffsetAtLine getLine getLine getOffsetAtLine toString
see Styled Text Content remove Text Change Listener Text Change Listener public void remove Text Change Listener Text Change Listener arg0 do nothing  StyledTextContent removeTextChangeListener TextChangeListener removeTextChangeListener TextChangeListener
see Styled Text Content replace Text Range int int String public void replace Text Range int arg0 int arg1 String arg2 do nothing  StyledTextContent replaceTextRange replaceTextRange
see Styled Text Content set Text String public void set Text String text if text null text NON NLS 1 process Line Breaks text process Styles text  StyledTextContent setText setText processLineBreaks processStyles
Returns the array of styles public Style Range get Styles Style Range array new Style Range line Style Ranges size line Style Ranges to Array array return array  StyleRange getStyles StyleRange StyleRange lineStyleRanges lineStyleRanges toArray
Create an array of lines with sytles stripped off Each lines is at most MAX LINE LENGTH characters private void process Line Breaks String text Create the original lines with style stripped lines new Array List char text Chars get Unstyled Text text to Char Array int start 0 for int i start i text Chars length i char ch text Chars i if ch SWT CR lines add new String text Chars start i start start i 1 if we reached the end stop if start text Chars length break else see if the next character is an LF ch text Chars start if ch SWT LF start i if start text Chars length break else if ch SWT LF lines add new String text Chars start i start start i 1 if start text Chars length break else if i text Chars length 1 lines add new String text Chars start i start 1 Break long lines for int i 0 i lines size i String line String lines get i while line length 0 int linebreak get Line Break line if linebreak 0 linebreak line length break String newline line substring 0 linebreak lines remove i lines add i newline line line substring linebreak lines add i line  MAX_LINE_LENGTH processLineBreaks ArrayList textChars getUnstyledText toCharArray textChars textChars textChars textChars textChars textChars textChars textChars textChars textChars getLineBreak
Returns the text without the style private static String get Unstyled Text String styled Text String s T String change styled Text Contexts Node BOLD TAG NON NLS 1 s T String change s Contexts Node BOLD CLOSE TAG NON NLS 1 return s  getUnstyledText styledText TString styledText ContextsNode BOLD_TAG TString ContextsNode BOLD_CLOSE_TAG
Finds a good line breaking point private static int get Line Break String line line Breaker set Text line int last Good Index 0 int current Index line Breaker first while current Index MAX LINE LENGTH current Index Break Iterator DONE last Good Index current Index current Index line Breaker next return last Good Index  getLineBreak lineBreaker setText lastGoodIndex currentIndex lineBreaker currentIndex MAX_LINE_LENGTH currentIndex BreakIterator lastGoodIndex currentIndex currentIndex lineBreaker lastGoodIndex
Creates all the bold style ranges for the text It is assumed that the text has been split across lines private void process Styles String text create a new array of styles line Style Ranges new Array List first remove the line breaks text T String change text r NON NLS 1 NON NLS 2 text T String change text n NON NLS 1 NON NLS 2 int offset 0 do create a style Style Range style new Style Range style font Style SWT BOLD the index of the starting style in styled text int start text index Of Contexts Node BOLD TAG offset if start 1 break String prefix get Unstyled Text text substring 0 start style start prefix length the index of the ending style in styled text offset start 1 int end text index Of Contexts Node BOLD CLOSE TAG offset if end 1 break prefix get Unstyled Text text substring 0 end style length prefix length style start line Style Ranges add style offset end 1 while offset text length  processStyles lineStyleRanges ArrayList TString TString StyleRange StyleRange fontStyle indexOf ContextsNode BOLD_TAG getUnstyledText indexOf ContextsNode BOLD_CLOSE_TAG getUnstyledText lineStyleRanges

public class Error Util implements I Error Util public void display Error String msg display Error Dialog msg  ErrorUtil IErrorUtil displayError displayErrorDialog
try Display find Display ui Thread async Exec new Runnable public void run display Error Dialog msg  findDisplay uiThread asyncExec displayErrorDialog
public void display Error final String msg Thread ui Thread try Display find Display ui Thread async Exec new Runnable public void run display Error Dialog msg catch Exception e2  displayError uiThread findDisplay uiThread asyncExec displayErrorDialog
Immidiately displays error dialog with a given string also logs the error using Logger log Error msg error message to display and log public static void display Error Dialog String msg String title HelpUI Resources get String Help Error NON NLS 1 I Workbench Window workbench Window get Active Workbench Window Shell shell if workbench Window null shell workbench Window get Shell else shell new Shell Message Dialog open Error shell title msg HelpUI Plugin log Error msg null  logError displayErrorDialog HelpUIResources getString Help_Error IWorkbenchWindow workbenchWindow getActiveWorkbenchWindow workbenchWindow workbenchWindow getShell MessageDialog openError HelpUIPlugin logError
Immidiately displays error dialog with a given string also logs the error using Logger log Error msg error message to display and log ex the exception to be passed to Logger log Error public static void display Error Dialog String msg Throwable ex String title HelpUI Resources get String Help Error NON NLS 1 I Workbench Window workbench Window get Active Workbench Window Shell shell if workbench Window null shell workbench Window get Shell else shell new Shell Message Dialog open Error shell title msg HelpUI Plugin log Error msg ex  logError logError displayErrorDialog HelpUIResources getString Help_Error IWorkbenchWindow workbenchWindow getActiveWorkbenchWindow workbenchWindow workbenchWindow getShell MessageDialog openError HelpUIPlugin logError
Immidiately displays an Information dialog with a given string also logs the info using Logger log Info msg error message to display and log public static void display Info Dialog String msg String title HelpUI Resources get String Help Info NON NLS 1 I Workbench Window workbench Window get Active Workbench Window Shell shell if workbench Window null shell workbench Window get Shell else shell new Shell Message Dialog open Information shell title msg if Help Plugin DEBUG System out println msg  logInfo displayInfoDialog HelpUIResources getString Help_Info IWorkbenchWindow workbenchWindow getActiveWorkbenchWindow workbenchWindow workbenchWindow getShell MessageDialog openInformation HelpPlugin
Immidiately displays a Question dialog with a given string question No logging is done returns which button Yes No was pressed by user public static boolean display Question Dialog String msg String title HelpUI Resources get String Help Question NON NLS 1 I Workbench Window workbench Window get Active Workbench Window Shell shell if workbench Window null shell workbench Window get Shell else shell new Shell return Message Dialog open Question shell title msg  displayQuestionDialog HelpUIResources getString Help_Question IWorkbenchWindow workbenchWindow getActiveWorkbenchWindow workbenchWindow workbenchWindow getShell MessageDialog openQuestion
Display all errors in the Help Status object If no errors occurred or if errors have already been displayed return public static void display Status show error dialog box if errors have occurred if Runtime Help Status get Instance errors Exist String title HelpUI Resources get String Help Error NON NLS 1 String msg HelpUI Resources get String WE005 NON NLS 1 Errors encountered while displaying help String error Message Runtime Help Status get Instance to String Shell parent get Active Workbench Window get Shell Runtime Error Dialog open parent title msg error Message for now reset status object so that errors are not displayed again Runtime Help Status get Instance reset return  displayStatus RuntimeHelpStatus getInstance errorsExist HelpUIResources getString Help_Error HelpUIResources getString errorMessage RuntimeHelpStatus getInstance toString getActiveWorkbenchWindow getShell RuntimeErrorDialog errorMessage RuntimeHelpStatus getInstance
return protected static I Workbench Window get Active Workbench Window return PlatformUI get Workbench get Active Workbench Window  IWorkbenchWindow getActiveWorkbenchWindow getWorkbench getActiveWorkbenchWindow

private static String error String To Display null Runtime Error Dialog constructor comment param dialog Title java lang String param dialog Title Image org eclipse swt graphics Image param dialog Message java lang String param dialog Image Type int param dialog Button Labels java lang String param default Index int public Runtime Error Dialog Shell parent Shell String dialog Title org eclipse swt graphics Image dialog Title Image String dialog Message int dialog Image Type java lang String dialog Button Labels int default Index super parent Shell dialog Title dialog Title Image dialog Message dialog Image Type dialog Button Labels default Index  errorStringToDisplay RuntimeErrorDialog dialogTitle dialogTitleImage dialogMessage dialogImageType dialogButtonLabels defaultIndex RuntimeErrorDialog parentShell dialogTitle dialogTitleImage dialogMessage dialogImageType dialogButtonLabels defaultIndex parentShell dialogTitle dialogTitleImage dialogMessage dialogImageType dialogButtonLabels defaultIndex
protected Control create Custom Area Composite parent Composite composite new Composite parent SWT RESIZE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH set error message if error String To Display null Text text new Text composite SWT BORDER SWT H SCROLL SWT V SCROLL SWT READ ONLY SWT MULTI text set Text error String To Display Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER data width Hint get Minimum Message Width set the default height on linux Note on Windows the default height is fine if System get Property os name starts With Linux NON NLS 1 NON NLS 2 data height Hint convert VerticalDL Us To Pixels 100 text set Layout Data data text set Font parent get Font text set Background composite get Display get System Color SWT COLOR WHITE return composite  createCustomArea GridLayout GridLayout numColumns marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING setLayout setLayoutData GridData GridData FILL_BOTH errorStringToDisplay H_SCROLL V_SCROLL READ_ONLY setText errorStringToDisplay GridData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER widthHint getMinimumMessageWidth getProperty startsWith heightHint convertVerticalDLUsToPixels setLayoutData setFont getFont setBackground getDisplay getSystemColor COLOR_WHITE
public static void open Shell parent Shell String title String message String error String error String To Display error String Runtime Error Dialog dialog new Runtime Error Dialog parent Shell title null accept the default window icon message ERROR new String I Dialog Constants OK LABEL 0 ok is the default dialog open return  parentShell errorString errorStringToDisplay errorString RuntimeErrorDialog RuntimeErrorDialog parentShell IDialogConstants OK_LABEL

Constructor for Help Working Set param name param elements public Help Working Set String name I Adaptable elements this Base Help System get Working Set Manager create Working Set name Adaptable Help Resource elements  HelpWorkingSet HelpWorkingSet IAdaptable BaseHelpSystem getWorkingSetManager createWorkingSet AdaptableHelpResource
public Help Working Set Working Set ws this working Set ws this iworking Set PlatformUI get Workbench get Working Set Manager create Working Set ws get Name ws get Elements iworking Set set Id Help Working Set Page PAGE ID Help System get Working Set Manager add Working Set working Set PlatformUI get Workbench get Working Set Manager add Working Set iworking Set  HelpWorkingSet WorkingSet workingSet iworkingSet getWorkbench getWorkingSetManager createWorkingSet getName getElements iworkingSet setId HelpWorkingSetPage PAGE_ID HelpSystem getWorkingSetManager addWorkingSet workingSet getWorkbench getWorkingSetManager addWorkingSet iworkingSet
public Help Working Set I Working Set iws this iworking Set iws Adaptable Help Resource elements new Adaptable Help Resource iws get Elements length System arraycopy iws get Elements 0 elements 0 elements length this working Set Base Help System get Working Set Manager create Working Set iws get Name elements Help System get Working Set Manager add Working Set working Set PlatformUI get Workbench get Working Set Manager add Working Set iworking Set  HelpWorkingSet IWorkingSet iworkingSet AdaptableHelpResource AdaptableHelpResource getElements getElements workingSet BaseHelpSystem getWorkingSetManager createWorkingSet getName HelpSystem getWorkingSetManager addWorkingSet workingSet getWorkbench getWorkingSetManager addWorkingSet iworkingSet
public Help Working Set Working Set ws I Working Set iws this working Set ws this iworking Set iws  HelpWorkingSet WorkingSet IWorkingSet workingSet iworkingSet
public I Working Set getI Working Set return iworking Set  IWorkingSet getIWorkingSet iworkingSet
public Working Set get Working Set return working Set  WorkingSet getWorkingSet workingSet
Tests the receiver and the object for equality param object object to compare the receiver to return true the object equals the receiver the name is the same false otherwise public boolean equals Object object if this object return true if object instanceof Help Working Set Help Working Set ws Help Working Set object return this working Set ws working Set else return false  HelpWorkingSet HelpWorkingSet HelpWorkingSet workingSet workingSet

Constructor for Help Working Set Element Label Provider public Help Working Set Element Label Provider super  HelpWorkingSetElementLabelProvider HelpWorkingSetElementLabelProvider
see org eclipse jface viewers I Label Provider get Image java lang Object public Image get Image Object element return null  ILabelProvider getImage getImage
see org eclipse jface viewers I Label Provider get Text java lang Object public String get Text Object element if element instanceof Adaptable Toc return Adaptable Toc element get Label else if element instanceof Adaptable Topic return Adaptable Topic element get Label else return null  ILabelProvider getText getText AdaptableToc AdaptableToc getLabel AdaptableTopic AdaptableTopic getLabel

Default constructor public Help Working Set Page super PAGE ID PAGE TITLE null set Description PAGE DESCRIPTION first Check true  HelpWorkingSetPage PAGE_ID PAGE_TITLE setDescription PAGE_DESCRIPTION firstCheck
Grid Data HORIZONTAL ALIGN FILL working Set Name add Modify Listener new Modify Listener public void modify Text Modify Event e validate Input  GridData HORIZONTAL_ALIGN_FILL workingSetName addModifyListener ModifyListener modifyText ModifyEvent validateInput
tree add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event handle Check State Change event  addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent handleCheckStateChange
tree add Tree Listener new I Tree Viewer Listener public void tree Collapsed Tree Expansion Event event  addTreeListener ITreeViewerListener treeCollapsed TreeExpansionEvent
Busy Indicator show While get Shell get Display new Runnable public void run set Subtree Checked element tree get Checked element false  BusyIndicator showWhile getShell getDisplay setSubtreeChecked getChecked
public void tree Expanded Tree Expansion Event event final Object element event get Element if tree get Grayed element false Busy Indicator show While get Shell get Display new Runnable public void run set Subtree Checked element tree get Checked element false  treeExpanded TreeExpansionEvent getElement getGrayed BusyIndicator showWhile getShell getDisplay setSubtreeChecked getChecked
see org eclipse jface dialogs I Dialog Page create Control org eclipse swt widgets Composite public void create Control Composite parent Font font parent get Font initialize Dialog Units parent Composite composite new Composite parent SWT NONE composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL set Control composite Label label new Label composite SWT WRAP label set Font font label set Text Help Ide Resources get String Working Set Name NON NLS 1 Grid Data gd new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER label set Layout Data gd working Set Name new Text composite SWT SINGLE SWT BORDER working Set Name set Layout Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL working Set Name add Modify Listener new Modify Listener public void modify Text Modify Event e validate Input working Set Name set Focus working Set Name set Font font label new Label composite SWT WRAP label set Font font label set Text Help Ide Resources get String Working Set Content NON NLS 1 gd new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER label set Layout Data gd tree new Checkbox Tree Viewer composite SWT BORDER SWT H SCROLL SWT V SCROLL gd new Grid Data Grid Data FILL BOTH Grid Data GRAB VERTICAL gd height Hint convert Height In Chars To Pixels 15 tree get Control set Layout Data gd tree get Control set Font font tree Content Provider new Help Working Set Tree Content Provider tree set Content Provider tree Content Provider element Label Provider new Help Working Set Element Label Provider tree set Label Provider element Label Provider tree set Use Hashlookup true tree set Input Base Help System get Working Set Manager get Root tree add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event handle Check State Change event tree add Tree Listener new I Tree Viewer Listener public void tree Collapsed Tree Expansion Event event public void tree Expanded Tree Expansion Event event final Object element event get Element if tree get Grayed element false Busy Indicator show While get Shell get Display new Runnable public void run set Subtree Checked element tree get Checked element false if working Set null working Set Name set Text working Set get Name May need to reconcile working sets Help Ide Plugin get Default get Working Set Synchronizer add Working Set working Set initialize Checked State validate Input Set help for the page Workbench Help set Help tree help workingset page  IDialogPage createControl createControl getFont initializeDialogUnits setLayout GridLayout setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL setControl setFont setText HelpIdeResources getString WorkingSetName GridData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER setLayoutData workingSetName workingSetName setLayoutData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL workingSetName addModifyListener ModifyListener modifyText ModifyEvent validateInput workingSetName setFocus workingSetName setFont setFont setText HelpIdeResources getString WorkingSetContent GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER setLayoutData CheckboxTreeViewer H_SCROLL V_SCROLL GridData GridData FILL_BOTH GridData GRAB_VERTICAL heightHint convertHeightInCharsToPixels getControl setLayoutData getControl setFont treeContentProvider HelpWorkingSetTreeContentProvider setContentProvider treeContentProvider elementLabelProvider HelpWorkingSetElementLabelProvider setLabelProvider elementLabelProvider setUseHashlookup setInput BaseHelpSystem getWorkingSetManager getRoot addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent handleCheckStateChange addTreeListener ITreeViewerListener treeCollapsed TreeExpansionEvent treeExpanded TreeExpansionEvent getElement getGrayed BusyIndicator showWhile getShell getDisplay setSubtreeChecked getChecked workingSet workingSetName setText workingSet getName HelpIdePlugin getDefault getWorkingSetSynchronizer addWorkingSet workingSet initializeCheckedState validateInput WorkbenchHelp setHelp help_workingset_page
see org eclipse ui dialogs I Working Set Page finish public void finish String working Set Name this working Set Name get Text Array List elements new Array List 10 find Checked Elements elements tree get Input if working Set null Help Working Set ws new Help Working Set working Set Name Adaptable Help Resource elements to Array new Adaptable Help Resource elements size working Set ws getI Working Set else working Set set Name working Set Name working Set set Elements I Adaptable elements to Array new I Adaptable elements size  IWorkingSetPage workingSetName workingSetName getText ArrayList ArrayList findCheckedElements getInput workingSet HelpWorkingSet HelpWorkingSet workingSetName AdaptableHelpResource toArray AdaptableHelpResource workingSet getIWorkingSet workingSet setName workingSetName workingSet setElements IAdaptable toArray IAdaptable
see org eclipse ui dialogs I Working Set Page get Selection public I Working Set get Selection return working Set  IWorkingSetPage getSelection IWorkingSet getSelection workingSet
see org eclipse ui dialogs I Working Set Page set Selection org eclipse ui I Working Set public void set Selection I Working Set working Set Assert is Not Null working Set Working set must not be null NON NLS 1 this working Set working Set if get Container null get Shell null working Set Name null first Check false working Set Name set Text working Set get Name initialize Checked State validate Input  IWorkingSetPage setSelection IWorkingSet setSelection IWorkingSet workingSet isNotNull workingSet workingSet workingSet getContainer getShell workingSetName firstCheck workingSetName setText workingSet getName initializeCheckedState validateInput
void validate Input String error Message null String new Text working Set Name get Text if new Text equals new Text trim false error Message Help Ide Resources get String WE030 NON NLS 1 if new Text equals NON NLS 1 if first Check set Page Complete false first Check false return else error Message Help Ide Resources get String WE031 NON NLS 1 first Check false if error Message null working Set null new Text equals working Set get Name false I Working Set working Sets PlatformUI get Workbench get Working Set Manager get Working Sets for int i 0 i working Sets length i if new Text equals working Sets i get Name error Message Help Ide Resources get String WE032 NON NLS 1 if error Message null tree get Checked Elements length 0 error Message Help Ide Resources get String WE033 NON NLS 1 set Error Message error Message set Page Complete error Message null  validateInput errorMessage newText workingSetName getText newText newText errorMessage HelpIdeResources getString newText firstCheck setPageComplete firstCheck errorMessage HelpIdeResources getString firstCheck errorMessage workingSet newText workingSet getName IWorkingSet workingSets getWorkbench getWorkingSetManager getWorkingSets workingSets newText workingSets getName errorMessage HelpIdeResources getString errorMessage getCheckedElements errorMessage HelpIdeResources getString setErrorMessage errorMessage setPageComplete errorMessage
Busy Indicator show While get Shell get Display new Runnable public void run Object elements working Set get Elements tree set Checked Elements elements for int i 0 i elements length i Object element elements i if is Expandable element set Subtree Checked element true true update Parent State element true  BusyIndicator showWhile getShell getDisplay workingSet getElements setCheckedElements isExpandable setSubtreeChecked updateParentState
private void initialize Checked State if working Set null return Busy Indicator show While get Shell get Display new Runnable public void run Object elements working Set get Elements tree set Checked Elements elements for int i 0 i elements length i Object element elements i if is Expandable element set Subtree Checked element true true update Parent State element true  initializeCheckedState workingSet BusyIndicator showWhile getShell getDisplay workingSet getElements setCheckedElements isExpandable setSubtreeChecked updateParentState
boolean is Expandable Object element return tree Content Provider has Children element  isExpandable treeContentProvider hasChildren
void update Parent State Object child boolean base Child State if child null return Object parent tree Content Provider get Parent child if parent null return boolean all Same State true Object children null children tree Content Provider get Children parent for int i children length 1 i 0 i if tree get Checked children i base Child State tree get Grayed children i all Same State false break tree set Grayed parent all Same State tree set Checked parent all Same State base Child State update Parent State parent base Child State  updateParentState baseChildState treeContentProvider getParent allSameState treeContentProvider getChildren getChecked baseChildState getGrayed allSameState setGrayed allSameState setChecked allSameState baseChildState updateParentState baseChildState
void set Subtree Checked Object parent boolean state boolean check Expanded State Object children tree Content Provider get Children parent for int i children length 1 i 0 i Object element children i if state tree set Checked element true tree set Grayed element false else tree set Gray Checked element false if is Expandable element set Subtree Checked element state check Expanded State  setSubtreeChecked checkExpandedState treeContentProvider getChildren setChecked setGrayed setGrayChecked isExpandable setSubtreeChecked checkExpandedState
private void find Checked Elements java util List checked Resources Object parent Object children tree Content Provider get Children parent for int i 0 i children length i if tree get Grayed children i find Checked Elements checked Resources children i else if tree get Checked children i checked Resources add children i  findCheckedElements checkedResources treeContentProvider getChildren getGrayed findCheckedElements checkedResources getChecked checkedResources
Busy Indicator show While get Shell get Display new Runnable public void run Object element event get Element boolean state event get Checked tree set Grayed element false if is Expandable element set Subtree Checked element state state only check subtree if state is set to true update Parent State element state validate Input  BusyIndicator showWhile getShell getDisplay getElement getChecked setGrayed isExpandable setSubtreeChecked updateParentState validateInput
void handle Check State Change final Check State Changed Event event Busy Indicator show While get Shell get Display new Runnable public void run Object element event get Element boolean state event get Checked tree set Grayed element false if is Expandable element set Subtree Checked element state state only check subtree if state is set to true update Parent State element state validate Input  handleCheckStateChange CheckStateChangedEvent BusyIndicator showWhile getShell getDisplay getElement getChecked setGrayed isExpandable setSubtreeChecked updateParentState validateInput

Constructor public Help Working Set Synchronizer working Sets new Array List  HelpWorkingSetSynchronizer workingSets ArrayList
see org eclipse jface util I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event if event get Property equals I Working Set Manager CHANGE WORKING SET ADD add the help working set I Working Set iws I Working Set event get New Value add Working Set iws else if event get Property equals I Working Set Manager CHANGE WORKING SET REMOVE remove the help working set I Working Set iws I Working Set event get Old Value remove Working Set iws else if event get Property equals I Working Set Manager CHANGE WORKING SET NAME CHANGE rename the help working set I Working Set iws I Working Set event get New Value rename Working Set iws else if event get Property equals I Working Set Manager CHANGE WORKING SET CONTENT CHANGE change the content of the help working set I Working Set iws I Working Set event get New Value change Working Set iws  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent getProperty IWorkingSetManager CHANGE_WORKING_SET_ADD IWorkingSet IWorkingSet getNewValue addWorkingSet getProperty IWorkingSetManager CHANGE_WORKING_SET_REMOVE IWorkingSet IWorkingSet getOldValue removeWorkingSet getProperty IWorkingSetManager CHANGE_WORKING_SET_NAME_CHANGE IWorkingSet IWorkingSet getNewValue renameWorkingSet getProperty IWorkingSetManager CHANGE_WORKING_SET_CONTENT_CHANGE IWorkingSet IWorkingSet getNewValue changeWorkingSet
see org eclipse help internal workingset Property Change I Property Change Listener property Change org eclipse help internal workingset Property Change Property Change Event public void property Change Property Change Property Change Event event if event get Property equals Working Set Manager CHANGE WORKING SET ADD add an eclipse working set Working Set ws Working Set event get New Value add Working Set ws else if event get Property equals Working Set Manager CHANGE WORKING SET REMOVE remove the eclipse working set Working Set ws Working Set event get Old Value remove Working Set ws else if event get Property equals Working Set Manager CHANGE WORKING SET NAME CHANGE change the name of the eclipse working set Working Set ws Working Set event get New Value rename Working Set ws else if event get Property equals Working Set Manager CHANGE WORKING SET CONTENT CHANGE change the content of the eclipse working set Working Set ws Working Set event get New Value change Working Set ws else if event get Property equals Working Set Manager CHANGE WORKING SETS SYNCH remove working sets not present in the UI Working Set base Working Sets get Help Working Set Manager get Working Sets for int i 0 i base Working Sets length i I Working Set iws get Eclipse Working Set Manager get Working Set base Working Sets i get Name if iws null get Help Working Set Manager remove Working Set base Working Sets i  PropertyChange IPropertyChangeListener propertyChange PropertyChange PropertyChangeEvent propertyChange PropertyChange PropertyChangeEvent getProperty WorkingSetManager CHANGE_WORKING_SET_ADD WorkingSet WorkingSet getNewValue addWorkingSet getProperty WorkingSetManager CHANGE_WORKING_SET_REMOVE WorkingSet WorkingSet getOldValue removeWorkingSet getProperty WorkingSetManager CHANGE_WORKING_SET_NAME_CHANGE WorkingSet WorkingSet getNewValue renameWorkingSet getProperty WorkingSetManager CHANGE_WORKING_SET_CONTENT_CHANGE WorkingSet WorkingSet getNewValue changeWorkingSet getProperty WorkingSetManager CHANGE_WORKING_SETS_SYNCH WorkingSet baseWorkingSets getHelpWorkingSetManager getWorkingSets baseWorkingSets IWorkingSet getEclipseWorkingSetManager getWorkingSet baseWorkingSets getName getHelpWorkingSetManager removeWorkingSet baseWorkingSets
public void rename Working Set I Working Set iws Help Working Set hws find Working Set iws if hws null hws get Working Set set Name iws get Name  renameWorkingSet IWorkingSet HelpWorkingSet findWorkingSet getWorkingSet setName getName
public void change Working Set I Working Set iws Help Working Set hws find Working Set iws if hws null Adaptable Help Resource elements new Adaptable Help Resource iws get Elements length System arraycopy iws get Elements 0 elements 0 elements length hws get Working Set set Elements elements  changeWorkingSet IWorkingSet HelpWorkingSet findWorkingSet AdaptableHelpResource AdaptableHelpResource getElements getElements getWorkingSet setElements
public void add Working Set I Working Set iws Working Set ws get Help Working Set Manager get Working Set iws get Name if ws null is Help Working Set iws Help Working Set hws new Help Working Set iws working Sets add hws get Help Working Set Manager add Working Set hws get Working Set see if this is happening upon workbench startup if ws null find Working Set iws null Help Working Set hws new Help Working Set ws iws working Sets add hws iws set Elements ws get Elements  addWorkingSet IWorkingSet WorkingSet getHelpWorkingSetManager getWorkingSet getName isHelpWorkingSet HelpWorkingSet HelpWorkingSet workingSets getHelpWorkingSetManager addWorkingSet getWorkingSet findWorkingSet HelpWorkingSet HelpWorkingSet workingSets setElements getElements
public void remove Working Set I Working Set iws Working Set ws get Help Working Set Manager get Working Set iws get Name if ws null Help Working Set hws find Working Set iws if hws null working Sets remove hws get Help Working Set Manager remove Working Set ws  removeWorkingSet IWorkingSet WorkingSet getHelpWorkingSetManager getWorkingSet getName HelpWorkingSet findWorkingSet workingSets getHelpWorkingSetManager removeWorkingSet
public void rename Working Set Working Set ws Help Working Set hws find Working Set ws if hws null hws getI Working Set set Name ws get Name  renameWorkingSet WorkingSet HelpWorkingSet findWorkingSet getIWorkingSet setName getName
public void change Working Set Working Set ws Help Working Set hws find Working Set ws if hws null hws getI Working Set set Elements ws get Elements  changeWorkingSet WorkingSet HelpWorkingSet findWorkingSet getIWorkingSet setElements getElements
public void remove Working Set Working Set ws I Working Set iws get Eclipse Working Set Manager get Working Set ws get Name if iws null Help Working Set hws find Working Set ws if hws null working Sets remove hws get Eclipse Working Set Manager remove Working Set iws  removeWorkingSet WorkingSet IWorkingSet getEclipseWorkingSetManager getWorkingSet getName HelpWorkingSet findWorkingSet workingSets getEclipseWorkingSetManager removeWorkingSet
public void add Working Set Working Set ws I Working Set iws get Eclipse Working Set Manager get Working Set ws get Name if iws null Help Working Set hws new Help Working Set ws working Sets add hws get Eclipse Working Set Manager add Working Set hws getI Working Set else if find Working Set ws null Help Working Set hws new Help Working Set ws iws working Sets add hws  addWorkingSet WorkingSet IWorkingSet getEclipseWorkingSetManager getWorkingSet getName HelpWorkingSet HelpWorkingSet workingSets getEclipseWorkingSetManager addWorkingSet getIWorkingSet findWorkingSet HelpWorkingSet HelpWorkingSet workingSets
private boolean is Help Working Set I Working Set ws I Adaptable elements ws get Elements return elements length 0 elements 0 instanceof Adaptable Help Resource  isHelpWorkingSet IWorkingSet IAdaptable getElements AdaptableHelpResource
private Help Working Set find Working Set Working Set ws for Iterator it working Sets iterator it has Next Help Working Set hws Help Working Set it next if hws get Working Set ws return hws return null  HelpWorkingSet findWorkingSet WorkingSet workingSets hasNext HelpWorkingSet HelpWorkingSet getWorkingSet
private Help Working Set find Working Set I Working Set iws for Iterator it working Sets iterator it has Next Help Working Set hws Help Working Set it next if hws getI Working Set iws return hws return null  HelpWorkingSet findWorkingSet IWorkingSet workingSets hasNext HelpWorkingSet HelpWorkingSet getIWorkingSet
private I Working Set Manager get Eclipse Working Set Manager return PlatformUI get Workbench get Working Set Manager  IWorkingSetManager getEclipseWorkingSetManager getWorkbench getWorkingSetManager
private Working Set Manager get Help Working Set Manager return Base Help System get Working Set Manager  WorkingSetManager getHelpWorkingSetManager BaseHelpSystem getWorkingSetManager

Constructor for Help Working Set Tree Content Provider public Help Working Set Tree Content Provider super  HelpWorkingSetTreeContentProvider HelpWorkingSetTreeContentProvider
see org eclipse jface viewers I Tree Content Provider get Children java lang Object public Object get Children Object parent Element if parent Element instanceof Adaptable Tocs Array return Adaptable Tocs Array parent Element get Children else if parent Element instanceof Adaptable Toc return Adaptable Toc parent Element get Children else return new I Adaptable 0  ITreeContentProvider getChildren getChildren parentElement parentElement AdaptableTocsArray AdaptableTocsArray parentElement getChildren parentElement AdaptableToc AdaptableToc parentElement getChildren IAdaptable
see org eclipse jface viewers I Tree Content Provider get Parent java lang Object public Object get Parent Object element if element instanceof Adaptable Help Resource return Adaptable Help Resource element get Parent else return null  ITreeContentProvider getParent getParent AdaptableHelpResource AdaptableHelpResource getParent
see org eclipse jface viewers I Tree Content Provider has Children java lang Object public boolean has Children Object element return element instanceof Adaptable Toc element instanceof Adaptable Tocs Array  ITreeContentProvider hasChildren hasChildren AdaptableToc AdaptableTocsArray
see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return get Children input Element  IStructuredContentProvider getElements getElements inputElement getChildren inputElement
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput

private static com sun jdi Virtual Machine Manager f Virtual Machine Manager public Bootstrap  VirtualMachineManager fVirtualMachineManager
public static synchronized com sun jdi Virtual Machine Manager virtual Machine Manager if f Virtual Machine Manager null return f Virtual Machine Manager try String class Name Platform get Extension Registry get Extension Point JDI Debug Plugin get Unique Identifier jdiclient get Label NON NLS 1 Class clazz null if class Name null clazz Class for Name class Name if clazz null f Virtual Machine Manager com sun jdi Virtual Machine Manager clazz new Instance catch Class Not Found Exception e fall through catch No Class Def Found Error e catch Instantiation Exception e catch Illegal Access Exception e if f Virtual Machine Manager null If any exceptions occurred we ll end up here f Virtual Machine Manager new org eclipse jdi internal Virtual Machine Manager Impl return f Virtual Machine Manager  VirtualMachineManager virtualMachineManager fVirtualMachineManager fVirtualMachineManager className getExtensionRegistry getExtensionPoint JDIDebugPlugin getUniqueIdentifier getLabel className forName className fVirtualMachineManager VirtualMachineManager newInstance ClassNotFoundException NoClassDefFoundError InstantiationException IllegalAccessException fVirtualMachineManager fVirtualMachineManager VirtualMachineManagerImpl fVirtualMachineManager

public interface Event Request Manager extends com sun jdi Mirror Creates a new disabled link Reenter Step Request The new event request is added to the list managed by this Event Request Manager Use link Event Request enable to activate this event request p The returned request will control stepping only in the specified code thread code all other threads will be unaffected p Only one pending reenter step request is allowed per thread p Note that enabling such a request can throw an code Operation Refused Exception code if the VM refused to perform this operation This in recognition that the VM may be in an awkward state and unable to comply For example execution is suspended in a native method and the arguments would be unavailable on return param thread the thread in which to step return the created link Reenter Step Request throws Duplicate Request Exception if there is already a pending step request for the specified thread throws Object Collected Exception if the thread object has been garbage collected  EventRequestManager ReenterStepRequest EventRequestManager EventRequest OperationRefusedException ReenterStepRequest DuplicateRequestException ObjectCollectedException

public class Operation Refused Exception extends Runtime Exception public Operation Refused Exception  OperationRefusedException RuntimeException OperationRefusedException
public Operation Refused Exception String s super s  OperationRefusedException

public interface Reenter Step Request extends Step Request Restricts the events generated by this request to those whose location is in a class whose name does NOT match this restricted regular expression e g java or Foo param class Pattern the pattern String to filter against  ReenterStepRequest StepRequest classPattern
Restricts the events generated by this request to those whose location is in this class param clazz the class to filter on 
Restricts the events generated by this request to those whose location is in a class whose name matches this restricted regular expression e g java or Foo param class Pattern the pattern String to filter for  classPattern
public void add Class Filter String class Pattern return the thread on which the step event is being requested public Thread Reference thread  addClassFilter classPattern ThreadReference

public interface Reference Type An HCR eligible class file may now be loaded and reloaded at some later point s Methods on the stack may come from any of several versions of the same HCR eligible class The debugger can query any class file related object class method or field for information about the version of the class file from which it came p Classes loaded by a cooperating class loader are flagged as HCR eligible for hot code replacement p Class file versions are identified by the CRC 32 of the entire class file contents p The VM typically computes and remembers the CRC when it digests a class file Note this behavior is optional VM need not retain any CR Cs A debugger can query any class for its class CRC and eligibility ul li The query can be made at at time li This is not directed to any specific thread li Threads may be running at the time they are not stopped li Other JDI level operations may be in progress li If a debugger knows only about a method or a field it must first query its defining class first to find out what is the CRC for this method or field ul All information returned does not change over the lifetime of the reference type object replacing the class results in a new reference type object This info can therefore be cached client side with impunity p This simple mechanism allows the IDE to detect that an object does not belong to the current class file base debugger computes CRC of current class file and queries VM and compares to its CRC It also allows the debugger to quickly detect whether two objects come from the same class file debugger queries VM and compares CR Cs By checking the HCR eligibility bit the debugger can determine whether the class could be hot replaced in principle p Returns the CRC 32 of the entire class file contents for this reference type see org eclipse jdi hcr Virtual Machine classes Have Changed  ReferenceType CRCs CRCs VirtualMachine classesHaveChanged
Returns whether this reference type is eligible for hot code replacement see org eclipse jdi hcr Reference Type get Class File Version  ReferenceType getClassFileVersion
Returns whether this reference type knows its class file version Returns false for code Array Type code s  ArrayType

public interface Thread Reference Resumes the execution of this thread as if the next instruction was a return instruction with the given value This causes the top stack frame to be popped with the given value p A breakpoint instruction at the current instruction is not triggered that is this operation takes precedence over breakpoints code try finally code blocks enclosing the current location will be triggered in due course p The trigger Finally And Synchronized Blocks option on this operation controls whether code try finally code and code synchronized code blocks enclosing the current location should be triggered ul li If no the stack frame is popped the return value is returned and execution continues back in the caller Note that code finally code blocks are not run and that if the code is nested within a code synchronized code statement the monitor lock is not released however if the method is code synchronized code the monitor lock will be properly released This mechanism is sure fire but at the risk of not letting the target program clean itself up e g close its files li If yes the VM checks to see whether there might be a code finally code or code synchronized code block enclosing the current instruction ul li If there is no enclosing code finally code block the operation reduces to the above case li If there is an enclosing code finally code block the VM creates a VM exception and activates the code finally code block with it If this exception eventually causes the stack frame to be popped the exception is caught by the VM itself the return value is returned and execution continues back in the caller ul ul p Note that a code finally code block manifests itself as and is indistinguishable from a code catch Throwable code block code synchronized code statements also compile to a code catch Throwable block code The target program may inadventently end up catching this exception Since the choices each have their pros and cons making the decision is left to the debugger However the later option is the recommended choice p The reply to the operation contains a flag indicating whether any code finally code or code synchronized code blocks are enclosing the current instruction p This operation is ignored if the thread was not suspended If the thread was suspended multiple times wait for the same number of resumes before executing the return instruction p The returned value is ignored if the method returns void p Throws an code Operation Refused Exception code if the VM refused to perform this operation This in recognition that the VM may be in an awkward state and unable to comply ul li for example execution is suspended in a native method li for example execution is suspended during class preparation ul  ThreadReference triggerFinallyAndSynchronizedBlocks OperationRefusedException

Determines if this implementation supports the early return of the top stack frame of a thread return code true code if the feature is supported code false code otherwise 
Determines if this implementation supports the retrieval of a class file version return code true code if the feature is supported code false code otherwise 
Determines if this implementation supports the reenter stepping return code true code if the feature is supported code false code otherwise 
Determines if this implementation supports the replacement of classes on the fly return code true code if the feature is supported code false code otherwise 
Notifies the VM that the class file base that it is running from has changed Classes are given by their names p The class file base is the collection of class files available on the various VM s class paths consulted by the class loaders that are integral to the system In JDK 1 2 these would include all files on the boot class path used by the bootstrap class loader the extension directory used by the extension class loader and the regular class path used by the application class loader The notion is important because only those classes that the VM knows to be in the class file base will be eligible for hot code replacement Classes that are actually loaded by non standard class loaders cannot be replaced on the fly because the VM has no way of asking non standard class loaders to reload them Classes loaded from the class file base by cooperating class loaders are said to be HCR eligible p The VM is expected to ol li Suspend all running threads li For a given JNI signature try to find the definition of the corresponding class ul li If the class definition can be found then it replaces the previous definition for that class li If a definition for the class is not found then it is unloaded ul li This operation returns only when the classes have been reloaded and or deleted li If the suspend policy of the class unload event is not to suspend the VM then the VM resumes all the threads that it has suspended li Finally for each class that has been reloaded the VM is expected to ul li send a class unload event li note the VM is already suspended if the suspend policy of class unload event said so li when the frontend resumes the VM send a class prepare event li suspend the VM according to the suspend policy of the class prepare event request ul li For each class that has been unloaded the VM is expected to ul li send a class unload event li suspend the VM if it was requested by the class unload event request ul ol p Subsequent references to classes will work with the new class definition Note the existing code com sun jdi Reference Type code code com sun jdi Method code and code com sun jdi Field code still refer to the old class definition So they should be discarded when the class unload event come in p The VM does not discard stack frames automatically ul li methods on the stack are not affected and could therefore be referencing obsolete code li replacing a class does not affect anything on the stack li subsequent class and method lookups find the replacements ul p Installed breakpoints are not automatically carried over to the reloaded class ul li breakpoints are resolved to particular locations in particular classes and methods li the VM must clear breakpoints to methods in classes that have been reloaded or unloaded the debugger will reinstall them when it gets the class prepare event ul p A change notice encompasses changes to the content of a class file in the base the addition of a class files to the base and the removal of a class file from the base p Change notices apply to all classes that are HCR eligible i e loaded by one of the cooperative system class loaders other classes are never affected p Returns whether the operation could be completed as specified above whether it was ignored for example if the VM doesn t support this kind of replacement or whether the operation failed and the VM should be restarted  ReferenceType

Creates new instance public Accessible Impl String description Virtual Machine Impl vm Impl super description vm Impl  AccessibleImpl VirtualMachineImpl vmImpl vmImpl
return Returns true if object is package private public boolean is Package Private return is Private is Public is Protected  isPackagePrivate isPrivate isPublic isProtected
return Returns true if object is private public boolean is Private return modifiers MODIFIER ACC PRIVATE 0  isPrivate MODIFIER_ACC_PRIVATE
return Returns true if object is pubic public boolean is Public return modifiers MODIFIER ACC PUBLIC 0  isPublic MODIFIER_ACC_PUBLIC
return Returns true if object is protected public boolean is Protected return modifiers MODIFIER ACC PROTECTED 0  isProtected MODIFIER_ACC_PROTECTED
return Returns modifier bits public abstract int modifiers 
Retrieves constant mappings public static void get Constant Maps if fg Modifiers null return Field fields Accessible Impl class get Declared Fields fg Modifiers new String 32 for int i 0 i fields length i Field field fields i int modifiers field get Modifiers if modifiers Modifier PUBLIC 0 modifiers Modifier STATIC 0 modifiers Modifier FINAL 0 continue String name field get Name if name starts With MODIFIER  NON NLS 1 continue name name substring 9 try int value field get Int null for int j 0 j 32 j if 1 j value 0 fg Modifiers j name break catch Illegal Access Exception e Will not occur for own class catch Illegal Argument Exception e Should not occur We should take care that all public static final constants in this class are numbers that are convertible to int  getConstantMaps fgModifiers AccessibleImpl getDeclaredFields fgModifiers getModifiers getName startsWith MODIFIER_ getInt fgModifiers IllegalAccessException IllegalArgumentException
return Returns an array with string representations of tags public static String get Modifier Strings get Constant Maps return fg Modifiers  getModifierStrings getConstantMaps fgModifiers

Creates new Array Reference Impl public Array Reference Impl Virtual Machine Impl vm Impl Jdwp ObjectID objectID super Array Reference vm Impl objectID NON NLS 1  ArrayReferenceImpl ArrayReferenceImpl VirtualMachineImpl vmImpl JdwpObjectID ArrayReference vmImpl
returns tag public byte get Tag return tag  getTag
returns Returns an array component value public Value get Value int index throws Index Out Of Bounds Exception return Value get Values index 1 get 0  getValue IndexOutOfBoundsException getValues
returns Returns all of the components in this array public List get Values return get Values 0 1  getValues getValues
returns Returns a range of array components public List get Values int first Index int length throws Index Out Of Bounds Exception int array Length length if first Index 0 first Index array Length throw new Index Out Of Bounds Exception JDI Messages get String Array Reference Impl Invalid index 1 NON NLS 1 if length 1 length 1 means all elements to the end length array Length first Index else if length 1 throw new Index Out Of Bounds Exception JDI Messages get String Array Reference Impl Invalid number of value to get from array 1 NON NLS 1 else if first Index length array Length throw new Index Out Of Bounds Exception JDI Messages get String Array Reference Impl Attempted to get more values from array than length of array 2 NON NLS 1 Note that this information should not be cached init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write this out Data array Object write Int first Index first Index out Data NON NLS 1 write Int length length out Data NON NLS 1 Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet AR GET VALUES out Bytes switch reply Packet error Code case Jdwp Reply Packet INVALID INDEX throw new Index Out Of Bounds Exception JDI Messages get String Array Reference Impl Invalid index of array reference given 1 NON NLS 1 default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream NOTE The JDWP documentation is not clear on this it turns out that the following is received from the VM type tag length of array values of elements int type read Byte type JdwpID tag Map reply Data NON NLS 1 int read Length read Int length reply Data NON NLS 1 See also Value Impl switch type Multidimensional array case Array Reference Impl tag Object references case Class Loader Reference Impl tag case Class Object Reference Impl tag case String Reference Impl tag case Object Reference Impl tag case Thread Group Reference Impl tag case Thread Reference Impl tag return read Object Sequence read Length reply Data Primitive type case Boolean Value Impl tag case Byte Value Impl tag case Char Value Impl tag case Double Value Impl tag case Float Value Impl tag case Integer Value Impl tag case Long Value Impl tag case Short Value Impl tag return read Primitive Sequence read Length type reply Data case Void Value Impl tag case 0 default throw new Internal Exception JDI Messages get String Array Reference Impl Invalid ArrayReference Value tag encountered   2 type NON NLS 1 catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  getValues firstIndex IndexOutOfBoundsException arrayLength firstIndex firstIndex arrayLength IndexOutOfBoundsException JDIMessages getString ArrayReferenceImpl Invalid_index_1 arrayLength firstIndex IndexOutOfBoundsException JDIMessages getString ArrayReferenceImpl Invalid_number_of_value_to_get_from_array_1 firstIndex arrayLength IndexOutOfBoundsException JDIMessages getString ArrayReferenceImpl Attempted_to_get_more_values_from_array_than_length_of_array_2 initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes outData arrayObject writeInt firstIndex firstIndex outData writeInt outData JdwpReplyPacket replyPacket JdwpCommandPacket AR_GET_VALUES outBytes replyPacket errorCode JdwpReplyPacket INVALID_INDEX IndexOutOfBoundsException JDIMessages getString ArrayReferenceImpl Invalid_index_of_array_reference_given_1 defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream readByte tagMap replyData readLength readInt replyData ValueImpl ArrayReferenceImpl ClassLoaderReferenceImpl ClassObjectReferenceImpl StringReferenceImpl ObjectReferenceImpl ThreadGroupReferenceImpl ThreadReferenceImpl readObjectSequence readLength replyData BooleanValueImpl ByteValueImpl CharValueImpl DoubleValueImpl FloatValueImpl IntegerValueImpl LongValueImpl ShortValueImpl readPrimitiveSequence readLength replyData VoidValueImpl InternalException JDIMessages getString ArrayReferenceImpl Invalid_ArrayReference_Value_tag_encountered___2 IOException defaultIOExceptionHandler handledJdwpRequest
returns Returns sequence of object reference values private List read Object Sequence int length Data Input Stream in throws IO Exception List elements new Array List length for int i 0 i length i Value Impl value Object Reference Impl read Object Ref With Tag this in elements add value return elements  readObjectSequence DataInputStream IOException ArrayList ValueImpl ObjectReferenceImpl readObjectRefWithTag
returns Returns sequence of values of primitive type private List read Primitive Sequence int length int type Data Input Stream in throws IO Exception List elements new Array List length for int i 0 i length i Value Impl value Value Impl read Without Tag this type in elements add value return elements  readPrimitiveSequence DataInputStream IOException ArrayList ValueImpl ValueImpl readWithoutTag
returns Returns the number of components in this array public int length init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet AR LENGTH this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream return read Int length reply Data NON NLS 1 catch IO Exception e defaultIO Exception Handler e return 0 finally handled Jdwp Request  initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket AR_LENGTH defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream readInt replyData IOException defaultIOExceptionHandler handledJdwpRequest
Replaces an array component with another value public void set Value int index Value value throws Invalid Type Exception Class Not Loaded Exception Array List list new Array List 1 list add value set Values index list 0 1  setValue InvalidTypeException ClassNotLoadedException ArrayList ArrayList setValues
Replaces all array components with other values public void set Values List values throws Invalid Type Exception Class Not Loaded Exception set Values 0 values 0 1  setValues InvalidTypeException ClassNotLoadedException setValues
Replaces a range of array components with other values public void set Values int index List values int src Index int length throws Invalid Type Exception Class Not Loaded Exception int values Size values size int array Length length if index 0 index array Length throw new Index Out Of Bounds Exception JDI Messages get String Array Reference Impl Invalid index 1 NON NLS 1 if src Index 0 src Index values Size throw new Index Out Of Bounds Exception JDI Messages get String Array Reference Impl Invalid srcIndex 2 NON NLS 1 if length 1 throw new Index Out Of Bounds Exception JDI Messages get String Array Reference Impl Invalid number of value to set in array 3 NON NLS 1 else if length 1 length 1 indicates as much values as possible length array Length index int length Tmp values Size src Index if length Tmp length length length Tmp else if index length array Length throw new Index Out Of Bounds Exception JDI Messages get String Array Reference Impl Attempted to set more values in array than length of array 3 NON NLS 1 else if src Index length values Size Check if enough values are given throw new Index Out Of Bounds Exception JDI Messages get String Array Reference Impl Attempted to set more values in array than given 4 NON NLS 1 check and convert the values if needed List checked Values check Values values sub List src Index src Index length Array Type Impl reference Type component Type Note that this information should not be cached init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write this out Data write Int index index out Data NON NLS 1 write Int length length out Data NON NLS 1 Iterator iter Values checked Values iterator while iter Values has Next Value Impl value Value Impl iter Values next if value null value write this out Data else Value Impl write Null this out Data Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet AR SET VALUES out Bytes switch reply Packet error Code case Jdwp Reply Packet TYPE MISMATCH throw new Invalid Type Exception case Jdwp Reply Packet INVALID CLASS throw new Class Not Loaded Exception type name default Reply Error Handler reply Packet error Code catch IO Exception e defaultIO Exception Handler e finally handled Jdwp Request  setValues srcIndex InvalidTypeException ClassNotLoadedException valuesSize arrayLength arrayLength IndexOutOfBoundsException JDIMessages getString ArrayReferenceImpl Invalid_index_1 srcIndex srcIndex valuesSize IndexOutOfBoundsException JDIMessages getString ArrayReferenceImpl Invalid_srcIndex_2 IndexOutOfBoundsException JDIMessages getString ArrayReferenceImpl Invalid_number_of_value_to_set_in_array_3 arrayLength lengthTmp valuesSize srcIndex lengthTmp lengthTmp arrayLength IndexOutOfBoundsException JDIMessages getString ArrayReferenceImpl Attempted_to_set_more_values_in_array_than_length_of_array_3 srcIndex valuesSize IndexOutOfBoundsException JDIMessages getString ArrayReferenceImpl Attempted_to_set_more_values_in_array_than_given_4 checkedValues checkValues subList srcIndex srcIndex ArrayTypeImpl referenceType componentType initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes outData writeInt outData writeInt outData iterValues checkedValues iterValues hasNext ValueImpl ValueImpl iterValues outData ValueImpl writeNull outData JdwpReplyPacket replyPacket JdwpCommandPacket AR_SET_VALUES outBytes replyPacket errorCode JdwpReplyPacket TYPE_MISMATCH InvalidTypeException JdwpReplyPacket INVALID_CLASS ClassNotLoadedException defaultReplyErrorHandler replyPacket errorCode IOException defaultIOExceptionHandler handledJdwpRequest
Check the type and the vm of the values If the given type is a primitive type the values may be convert for match this type see Value Impl check Value Value Type Virtual Machine Impl private List check Values List values Type type throws Invalid Type Exception List checked Values new Array List values size Iterator iter Values values iterator while iter Values has Next checked Values add Value Impl check Value Value iter Values next type virtual Machine Impl return checked Values  ValueImpl checkValue VirtualMachineImpl checkValues InvalidTypeException checkedValues ArrayList iterValues iterValues hasNext checkedValues ValueImpl checkValue iterValues virtualMachineImpl checkedValues
return Returns description of Mirror object public String to String try String Buffer buf new String Buffer type name Insert length of string between last square braces buf insert buf length 1 length Append space and id String buf append buf append id String return buf to String catch Object Collected Exception e return JDI Messages get String Array Reference Impl Garbage Collected  ArrayReference 5 length id String NON NLS 1 NON NLS 2 NON NLS 3 catch Exception e return f Description  toString StringBuffer StringBuffer idString idString toString ObjectCollectedException JDIMessages getString ArrayReferenceImpl Garbage_Collected _ArrayReference_5 idString fDescription
return Reads JDWP representation and returns new instance public static Array Reference Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp ObjectID ID new Jdwp ObjectID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println array Reference ID value NON NLS 1 if ID is Null return null Array Reference Impl mirror new Array Reference Impl vm Impl ID return mirror  ArrayReferenceImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpObjectID JdwpObjectID vmImpl fVerboseWriter fVerboseWriter arrayReference isNull ArrayReferenceImpl ArrayReferenceImpl vmImpl

Creates new Array Type Impl public Array Type Impl Virtual Machine Impl vm Impl Jdwp ArrayID arrayID super Array Type vm Impl arrayID NON NLS 1  ArrayTypeImpl ArrayTypeImpl VirtualMachineImpl vmImpl JdwpArrayID ArrayType vmImpl
Creates new Array Type Impl public Array Type Impl Virtual Machine Impl vm Impl Jdwp ArrayID arrayID String signature String generic Signature super Array Type vm Impl arrayID signature generic Signature NON NLS 1  ArrayTypeImpl ArrayTypeImpl VirtualMachineImpl vmImpl JdwpArrayID genericSignature ArrayType vmImpl genericSignature
return Returns type tag public byte type Tag return type Tag  typeTag typeTag
return Create a null value instance of the type public Value create Null Value return new Array Reference Impl virtual Machine Impl new Jdwp ObjectID virtual Machine Impl  createNullValue ArrayReferenceImpl virtualMachineImpl JdwpObjectID virtualMachineImpl
return Returns the JNI signature of the components of this array class public String component Signature return signature substring 1  componentSignature
return Returns the type of the array components public Type component Type throws Class Not Loaded Exception return Type Impl create virtual Machine Impl component Signature class Loader  componentType ClassNotLoadedException TypeImpl virtualMachineImpl componentSignature classLoader
return Returns a text representation of the component type public String component Type Name return Generic Signature signature To Name component Signature  componentTypeName GenericSignature signatureToName componentSignature
return Creates and returns a new instance of this array class in the target VM public Array Reference new Instance int length Note that this information should not be cached init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write this out Data write Int length length out Data NON NLS 1 Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet AT NEW INSTANCE out Bytes default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream Array Reference Impl array Ref Array Reference Impl Object Reference Impl read Object Ref With Tag this reply Data return array Ref catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ArrayReference newInstance initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes outData writeInt outData JdwpReplyPacket replyPacket JdwpCommandPacket AT_NEW_INSTANCE outBytes defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream ArrayReferenceImpl arrayRef ArrayReferenceImpl ObjectReferenceImpl readObjectRefWithTag replyData arrayRef IOException defaultIOExceptionHandler handledJdwpRequest
return Returns a List filled with all Location objects that map to the given line number public List locations Of Line int line If this reference type is an Array Type the returned list is always empty return Collections EMPTY LIST  locationsOfLine ArrayType EMPTY_LIST
return Reads JDWP representation and returns new instance public static Array Type Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp ArrayID ID new Jdwp ArrayID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println array Type ID value NON NLS 1 if ID is Null return null Array Type Impl mirror Array Type Impl vm Impl get Cached Mirror ID if mirror null mirror new Array Type Impl vm Impl ID vm Impl add Cached Mirror mirror return mirror  ArrayTypeImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpArrayID JdwpArrayID vmImpl fVerboseWriter fVerboseWriter arrayType isNull ArrayTypeImpl ArrayTypeImpl vmImpl getCachedMirror ArrayTypeImpl vmImpl vmImpl addCachedMirror
return Returns modifier bits public int modifiers return MODIFIER ACC PUBLIC MODIFIER ACC FINAL  MODIFIER_ACC_PUBLIC MODIFIER_ACC_FINAL
return Returns a list containing each Field declared in this type public List fields return Collections EMPTY LIST  EMPTY_LIST
return Returns a list containing each Method declared in this type public List methods return Collections EMPTY LIST  EMPTY_LIST
return a Map of the requested static Field objects with their Value public Map get Values List fields if fields is Empty return new Hash Map throw new Illegal Argument Exception JDI Messages get String Array Type Impl getValues not allowed on array 1 NON NLS 1  getValues isEmpty HashMap IllegalArgumentException JDIMessages getString ArrayTypeImpl getValues_not_allowed_on_array_1
return Returns a List containing each Reference Type declared within this type public List nested Types return Collections EMPTY LIST  ReferenceType nestedTypes EMPTY_LIST
return Returns status of class interface protected int status return Reference Type Impl JDWP CLASS STATUS INITIALIZED Reference Type Impl JDWP CLASS STATUS PREPARED Reference Type Impl JDWP CLASS STATUS VERIFIED  ReferenceTypeImpl JDWP_CLASS_STATUS_INITIALIZED ReferenceTypeImpl JDWP_CLASS_STATUS_PREPARED ReferenceTypeImpl JDWP_CLASS_STATUS_VERIFIED
return Reads JDWP representation and returns new instance public static Array Type Impl read With Signature Mirror Impl target boolean with Generic Signature Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp ArrayID ID new Jdwp ArrayID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println array Type ID value NON NLS 1 String signature target read String signature in NON NLS 1 String generic Signature null if with Generic Signature generic Signature target read String generic signature in NON NLS 1 if ID is Null return null Array Type Impl mirror Array Type Impl vm Impl get Cached Mirror ID if mirror null mirror new Array Type Impl vm Impl ID vm Impl add Cached Mirror mirror mirror set Signature signature mirror set Generic Signature generic Signature return mirror  ArrayTypeImpl readWithSignature MirrorImpl withGenericSignature DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpArrayID JdwpArrayID vmImpl fVerboseWriter fVerboseWriter arrayType readString genericSignature withGenericSignature genericSignature readString isNull ArrayTypeImpl ArrayTypeImpl vmImpl getCachedMirror ArrayTypeImpl vmImpl vmImpl addCachedMirror setSignature setGenericSignature genericSignature
see com sun jdi Reference Type all Line Locations public List all Line Locations If this reference type is an Array Type the returned list is always empty return Collections EMPTY LIST  ReferenceType allLineLocations allLineLocations ArrayType EMPTY_LIST
see com sun jdi Reference Type all Methods public List all Methods return Collections EMPTY LIST  ReferenceType allMethods allMethods EMPTY_LIST
see com sun jdi Reference Type all Fields public List all Fields return Collections EMPTY LIST  ReferenceType allFields allFields EMPTY_LIST
return Returns an identifying name for the source corresponding to the declaration of this type public String source Name throws Absent Information Exception throw new Absent Information Exception JDI Messages get String Array Type Impl No source name for Arrays 1 NON NLS 1  sourceName AbsentInformationException AbsentInformationException JDIMessages getString ArrayTypeImpl No_source_name_for_Arrays_1
see com sun jdi Reference Type visible Fields public List visible Fields return Collections EMPTY LIST  ReferenceType visibleFields visibleFields EMPTY_LIST
see com sun jdi Reference Type visible Methods public List visible Methods return Collections EMPTY LIST  ReferenceType visibleMethods visibleMethods EMPTY_LIST
see com sun jdi Reference Type field By Name String public Field field By Name String arg1 return null  ReferenceType fieldByName fieldByName
see com sun jdi Reference Type methods By Name String public List methods By Name String arg1 return Collections EMPTY LIST  ReferenceType methodsByName methodsByName EMPTY_LIST
see com sun jdi Reference Type methods By Name String String public List methods By Name String arg1 String arg2 return Collections EMPTY LIST  ReferenceType methodsByName methodsByName EMPTY_LIST

public class Boolean Type Impl extends Primitive Type Impl implements Boolean Type Creates new instance public Boolean Type Impl Virtual Machine Impl vm Impl super Boolean Type vm Impl boolean Z NON NLS 1 NON NLS 2 NON NLS 3  BooleanTypeImpl PrimitiveTypeImpl BooleanType BooleanTypeImpl VirtualMachineImpl vmImpl BooleanType vmImpl
returns primitive type tag public byte tag return Boolean Value Impl tag  BooleanValueImpl
return Create a null value instance of the type public Value create Null Value return virtual Machine Impl mirror Of false  createNullValue virtualMachineImpl mirrorOf

Creates new instance public Boolean Value Impl Virtual Machine Impl vm Impl Boolean value super Boolean Value vm Impl value NON NLS 1  BooleanValueImpl VirtualMachineImpl vmImpl BooleanValue vmImpl
returns tag public byte get Tag return tag  getTag
returns type of value public Type type return virtual Machine Impl get Boolean Type  virtualMachineImpl getBooleanType
returns Value public boolean value return boolean Value  booleanValue
return Reads and returns new instance public static Boolean Value Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl boolean value target read Boolean boolean Value in NON NLS 1 return new Boolean Value Impl vm Impl new Boolean value  BooleanValueImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl readBoolean booleanValue BooleanValueImpl vmImpl
Writes value without value tag public void write Mirror Impl target Data Output Stream out throws IO Exception target write Boolean Boolean f Value boolean Value boolean Value out NON NLS 1  MirrorImpl DataOutputStream IOException writeBoolean fValue booleanValue booleanValue

public class Byte Type Impl extends Primitive Type Impl implements Byte Type Creates new instance public Byte Type Impl Virtual Machine Impl vm Impl super Byte Type vm Impl byte B NON NLS 1 NON NLS 2 NON NLS 3  ByteTypeImpl PrimitiveTypeImpl ByteType ByteTypeImpl VirtualMachineImpl vmImpl ByteType vmImpl
returns primitive type tag public byte tag return Byte Value Impl tag  ByteValueImpl
return Create a null value instance of the type public Value create Null Value return virtual Machine Impl mirror Of byte 0  createNullValue virtualMachineImpl mirrorOf

Creates new instance public Byte Value Impl Virtual Machine Impl vm Impl Byte value super Byte Value vm Impl value NON NLS 1  ByteValueImpl VirtualMachineImpl vmImpl ByteValue vmImpl
returns tag public byte get Tag return tag  getTag
returns type of value public Type type return virtual Machine Impl get Byte Type  virtualMachineImpl getByteType
returns Value public byte value return byte Value  byteValue
return Reads and returns new instance public static Byte Value Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl byte value target read Byte byte Value in NON NLS 1 return new Byte Value Impl vm Impl new Byte value  ByteValueImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl readByte byteValue ByteValueImpl vmImpl
Writes value without value tag public void write Mirror Impl target Data Output Stream out throws IO Exception target write Byte Byte f Value byte Value byte Value out NON NLS 1  MirrorImpl DataOutputStream IOException writeByte fValue byteValue byteValue

public class Char Type Impl extends Primitive Type Impl implements Char Type Creates new instance public Char Type Impl Virtual Machine Impl vm Impl super Char Type vm Impl char C NON NLS 1 NON NLS 2 NON NLS 3  CharTypeImpl PrimitiveTypeImpl CharType CharTypeImpl VirtualMachineImpl vmImpl CharType vmImpl
returns primitive type tag public byte tag return Char Value Impl tag  CharValueImpl
return Create a null value instance of the type public Value create Null Value return virtual Machine Impl mirror Of char 0  createNullValue virtualMachineImpl mirrorOf

Creates new instance public Char Value Impl Virtual Machine Impl vm Impl Character value super Char Value vm Impl value NON NLS 1  CharValueImpl VirtualMachineImpl vmImpl CharValue vmImpl
returns tag public byte get Tag return tag  getTag
returns type of value public Type type return virtual Machine Impl get Char Type  virtualMachineImpl getCharType
returns Value public char value return char Value  charValue
return Reads and returns new instance public static Char Value Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl char value target read Char char Value in NON NLS 1 return new Char Value Impl vm Impl new Character value  CharValueImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl readChar charValue CharValueImpl vmImpl
Writes value without value tag public void write Mirror Impl target Data Output Stream out throws IO Exception target write Char Character f Value char Value char Value out NON NLS 1  MirrorImpl DataOutputStream IOException writeChar fValue charValue charValue

Creates new Class Loader Reference Impl public Class Loader Reference Impl Virtual Machine Impl vm Impl Jdwp Class LoaderID class LoaderID super Class Loader Reference vm Impl class LoaderID NON NLS 1  ClassLoaderReferenceImpl ClassLoaderReferenceImpl VirtualMachineImpl vmImpl JdwpClassLoaderID classLoaderID ClassLoaderReference vmImpl classLoaderID
returns Value tag public byte get Tag return tag  getTag
returns Returns a list of all loaded classes that were defined by this class loader public List defined Classes Note that this information should not be cached List visible Classes visible Classes List result new Array List visible Classes size Iterator iter visible Classes iterator while iter has Next try Reference Type type Reference Type iter next Note that class Loader is null for the bootstrap classloader if type class Loader null type class Loader equals this result add type catch Class Not Prepared Exception e continue return result  definedClasses visibleClasses visibleClasses ArrayList visibleClasses visibleClasses hasNext ReferenceType ReferenceType classLoader classLoader classLoader ClassNotPreparedException
returns Returns a list of all loaded classes that are visible by this class loader public List visible Classes Note that this information should not be cached init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet CLR VISIBLE CLASSES this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream int nr Of Elements read Int elements reply Data NON NLS 1 List elements new Array List nr Of Elements for int i 0 i nr Of Elements i Reference Type Impl elt Reference Type Impl read With Type Tag this reply Data if elt null continue elements add elt return elements catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  visibleClasses initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket CLR_VISIBLE_CLASSES defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream nrOfElements readInt replyData ArrayList nrOfElements nrOfElements ReferenceTypeImpl ReferenceTypeImpl readWithTypeTag replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Reads JDWP representation and returns new instance public static Class Loader Reference Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp Class LoaderID ID new Jdwp Class LoaderID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println class Loader Reference ID value NON NLS 1 if ID is Null return null Class Loader Reference Impl mirror new Class Loader Reference Impl vm Impl ID return mirror  ClassLoaderReferenceImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpClassLoaderID JdwpClassLoaderID vmImpl fVerboseWriter fVerboseWriter classLoaderReference isNull ClassLoaderReferenceImpl ClassLoaderReferenceImpl vmImpl

Creates new Class Object Reference Impl public Class Object Reference Impl Virtual Machine Impl vm Impl Jdwp Class ObjectID class ObjectID super Class Object Reference vm Impl class ObjectID NON NLS 1  ClassObjectReferenceImpl ClassObjectReferenceImpl VirtualMachineImpl vmImpl JdwpClassObjectID classObjectID ClassObjectReference vmImpl classObjectID
returns Returns Value tag public byte get Tag return tag  getTag
returns Returns the Reference Type corresponding to this class object public Reference Type reflected Type init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet COR REFLECTED TYPE this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream return Reference Type Impl read With Type Tag this reply Data catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ReferenceType ReferenceType reflectedType initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket COR_REFLECTED_TYPE defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream ReferenceTypeImpl readWithTypeTag replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Reads JDWP representation and returns new instance public static Class Object Reference Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp Class ObjectID ID new Jdwp Class ObjectID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println class Object Reference ID value NON NLS 1 if ID is Null return null Class Object Reference Impl mirror new Class Object Reference Impl vm Impl ID return mirror  ClassObjectReferenceImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpClassObjectID JdwpClassObjectID vmImpl fVerboseWriter fVerboseWriter classObjectReference isNull ClassObjectReferenceImpl ClassObjectReferenceImpl vmImpl

Creates new Class Type Impl public Class Type Impl Virtual Machine Impl vm Impl Jdwp ClassID classID super Class Type vm Impl classID NON NLS 1  ClassTypeImpl ClassTypeImpl VirtualMachineImpl vmImpl JdwpClassID ClassType vmImpl
Creates new Class Type Impl public Class Type Impl Virtual Machine Impl vm Impl Jdwp ClassID classID String signature String generic Signature super Class Type vm Impl classID signature generic Signature NON NLS 1  ClassTypeImpl ClassTypeImpl VirtualMachineImpl vmImpl JdwpClassID genericSignature ClassType vmImpl genericSignature
return Returns type tag public byte type Tag return type Tag  typeTag typeTag
return Create a null value instance of the type public Value create Null Value return new Class Object Reference Impl virtual Machine Impl new Jdwp Class ObjectID virtual Machine Impl  createNullValue ClassObjectReferenceImpl virtualMachineImpl JdwpClassObjectID virtualMachineImpl
Flushes all stored Jdwp results public void flush Stored Jdwp Results super flush Stored Jdwp Results For all classes that have this class cached as superclass this cache must be undone Iterator itr virtual Machine Impl all Cached Ref Types while itr has Next Reference Type Impl ref Type Reference Type Impl itr next if ref Type instanceof Class Type Impl Class Type Impl class Type Class Type Impl ref Type if class Type f Superclass null class Type f Superclass equals this class Type flush Stored Jdwp Results f Superclass null  flushStoredJdwpResults flushStoredJdwpResults virtualMachineImpl allCachedRefTypes hasNext ReferenceTypeImpl refType ReferenceTypeImpl refType ClassTypeImpl ClassTypeImpl classType ClassTypeImpl refType classType fSuperclass classType fSuperclass classType flushStoredJdwpResults fSuperclass
return Returns Jdwp version of given options private int options To Jdwp Options int options int jdwp Options 0 if options INVOKE SINGLE THREADED 0 jdwp Options Method Impl INVOKE SINGLE THREADED JDWP return jdwp Options  optionsToJdwpOptions jdwpOptions INVOKE_SINGLE_THREADED jdwpOptions MethodImpl INVOKE_SINGLE_THREADED_JDWP jdwpOptions
return Returns a the single non abstract Method visible from this class that has the given name and signature public Method concrete Method By Name String name String signature Recursion is used to find the method The methods of its own own methods command The methods of it s superclass Iterator methods methods iterator Method Impl method while methods has Next method Method Impl methods next if method name equals name method signature equals signature if method is Abstract return null else return method if superclass null return superclass concrete Method By Name name signature return null  concreteMethodByName MethodImpl hasNext MethodImpl isAbstract concreteMethodByName
Invokes the specified static Method in the target VM return Returns a Value mirror of the invoked method s return value public Value invoke Method Thread Reference thread Method method List arguments int options throws Invalid Type Exception Class Not Loaded Exception Incompatible Thread State Exception Invocation Exception checkVM thread checkVM method Thread Reference Impl thread Impl Thread Reference Impl thread Method Impl method Impl Method Impl method Perform some checks for Illegal Argument Exception if visible Methods contains method throw new Illegal Argument Exception JDI Messages get String Class Type Impl Class does not contain given method 1 NON NLS 1 if method argument Type Names size arguments size throw new Illegal Argument Exception JDI Messages get String Class Type Impl Number of arguments doesn  t match 2 NON NLS 1 if method is Constructor method is Static Initializer throw new Illegal Argument Exception JDI Messages get String Class Type Impl Method is constructor or intitializer 3 NON NLS 1 check the type and the vm of the arguments Convert the values if needed List checked Arguments Value Impl check Values arguments method argument Types virtual Machine Impl init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write this out Data thread Impl write this out Data method Impl write this out Data write Int checked Arguments size size out Data NON NLS 1 Iterator iter checked Arguments iterator while iter has Next Value Impl elt Value Impl iter next if elt null elt write With Tag this out Data else Value Impl write Null With Tag this out Data write Int options To Jdwp Options options options Method Impl get Invoke Options out Data NON NLS 1 Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet CT INVOKE METHOD out Bytes switch reply Packet error Code case Jdwp Reply Packet INVALID METHODID throw new Illegal Argument Exception case Jdwp Reply Packet TYPE MISMATCH throw new Invalid Type Exception case Jdwp Reply Packet INVALID CLASS throw new Class Not Loaded Exception name case Jdwp Reply Packet INVALID THREAD throw new Incompatible Thread State Exception case Jdwp Reply Packet THREAD NOT SUSPENDED throw new Incompatible Thread State Exception default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream Value Impl value Value Impl read With Tag this reply Data Object Reference Impl exception Object Reference Impl read Object Ref With Tag this reply Data if exception null throw new Invocation Exception exception return value catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  invokeMethod ThreadReference InvalidTypeException ClassNotLoadedException IncompatibleThreadStateException InvocationException ThreadReferenceImpl threadImpl ThreadReferenceImpl MethodImpl methodImpl MethodImpl IllegalArgumentException visibleMethods IllegalArgumentException JDIMessages getString ClassTypeImpl Class_does_not_contain_given_method_1 argumentTypeNames IllegalArgumentException JDIMessages getString ClassTypeImpl Number_of_arguments_doesn__t_match_2 isConstructor isStaticInitializer IllegalArgumentException JDIMessages getString ClassTypeImpl Method_is_constructor_or_intitializer_3 checkedArguments ValueImpl checkValues argumentTypes virtualMachineImpl initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes outData threadImpl outData methodImpl outData writeInt checkedArguments outData checkedArguments hasNext ValueImpl ValueImpl writeWithTag outData ValueImpl writeNullWithTag outData writeInt optionsToJdwpOptions MethodImpl getInvokeOptions outData JdwpReplyPacket replyPacket JdwpCommandPacket CT_INVOKE_METHOD outBytes replyPacket errorCode JdwpReplyPacket INVALID_METHODID IllegalArgumentException JdwpReplyPacket TYPE_MISMATCH InvalidTypeException JdwpReplyPacket INVALID_CLASS ClassNotLoadedException JdwpReplyPacket INVALID_THREAD IncompatibleThreadStateException JdwpReplyPacket THREAD_NOT_SUSPENDED IncompatibleThreadStateException defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream ValueImpl ValueImpl readWithTag replyData ObjectReferenceImpl ObjectReferenceImpl readObjectRefWithTag replyData InvocationException IOException defaultIOExceptionHandler handledJdwpRequest
Constructs a new instance of this type using the given constructor Method in the target VM return Returns Mirror of this type public Object Reference new Instance Thread Reference thread Method method List arguments int options throws Invalid Type Exception Class Not Loaded Exception Incompatible Thread State Exception Invocation Exception checkVM thread checkVM method Thread Reference Impl thread Impl Thread Reference Impl thread Method Impl method Impl Method Impl method Perform some checks for Illegal Argument Exception if methods contains method throw new Illegal Argument Exception JDI Messages get String Class Type Impl Class does not contain given method 4 NON NLS 1 if method argument Type Names size arguments size throw new Illegal Argument Exception JDI Messages get String Class Type Impl Number of arguments doesn  t match 5 NON NLS 1 if method is Constructor throw new Illegal Argument Exception JDI Messages get String Class Type Impl Method is not a constructor 6 NON NLS 1 List checked Arguments Value Impl check Values arguments method argument Types virtual Machine Impl init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write this out Data thread Impl write this out Data method Impl write this out Data write Int checked Arguments size size out Data NON NLS 1 Iterator iter checked Arguments iterator while iter has Next Value Impl elt Value Impl iter next if elt null checkVM elt elt write With Tag this out Data else Value Impl write Null With Tag this out Data write Int options To Jdwp Options options options Method Impl get Invoke Options out Data NON NLS 1 Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet CT NEW INSTANCE out Bytes switch reply Packet error Code case Jdwp Reply Packet INVALID METHODID throw new Illegal Argument Exception case Jdwp Reply Packet TYPE MISMATCH throw new Invalid Type Exception case Jdwp Reply Packet INVALID CLASS throw new Class Not Loaded Exception name case Jdwp Reply Packet INVALID THREAD throw new Incompatible Thread State Exception case Jdwp Reply Packet THREAD NOT SUSPENDED throw new Incompatible Thread State Exception default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream Object Reference Impl object Object Reference Impl read Object Ref With Tag this reply Data Object Reference Impl exception Object Reference Impl read Object Ref With Tag this reply Data if exception null throw new Invocation Exception exception return object catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ObjectReference newInstance ThreadReference InvalidTypeException ClassNotLoadedException IncompatibleThreadStateException InvocationException ThreadReferenceImpl threadImpl ThreadReferenceImpl MethodImpl methodImpl MethodImpl IllegalArgumentException IllegalArgumentException JDIMessages getString ClassTypeImpl Class_does_not_contain_given_method_4 argumentTypeNames IllegalArgumentException JDIMessages getString ClassTypeImpl Number_of_arguments_doesn__t_match_5 isConstructor IllegalArgumentException JDIMessages getString ClassTypeImpl Method_is_not_a_constructor_6 checkedArguments ValueImpl checkValues argumentTypes virtualMachineImpl initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes outData threadImpl outData methodImpl outData writeInt checkedArguments outData checkedArguments hasNext ValueImpl ValueImpl writeWithTag outData ValueImpl writeNullWithTag outData writeInt optionsToJdwpOptions MethodImpl getInvokeOptions outData JdwpReplyPacket replyPacket JdwpCommandPacket CT_NEW_INSTANCE outBytes replyPacket errorCode JdwpReplyPacket INVALID_METHODID IllegalArgumentException JdwpReplyPacket TYPE_MISMATCH InvalidTypeException JdwpReplyPacket INVALID_CLASS ClassNotLoadedException JdwpReplyPacket INVALID_THREAD IncompatibleThreadStateException JdwpReplyPacket THREAD_NOT_SUSPENDED IncompatibleThreadStateException defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream ObjectReferenceImpl ObjectReferenceImpl readObjectRefWithTag replyData ObjectReferenceImpl ObjectReferenceImpl readObjectRefWithTag replyData InvocationException IOException defaultIOExceptionHandler handledJdwpRequest
Assigns a value to a static field public void set Value Field field Value value throws Invalid Type Exception Class Not Loaded Exception Note that this information should not be cached init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write this out Data write Int 1 size out Data We only set one field NON NLS 1 checkVM field Field Impl field write this out Data check the type and the vm of the value Convert the value if needed Value Impl checked Value Value Impl check Value value field type virtual Machine Impl if checked Value null checked Value write this out Data else Value Impl write Null this out Data Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet CT SET VALUES out Bytes switch reply Packet error Code case Jdwp Reply Packet TYPE MISMATCH throw new Invalid Type Exception case Jdwp Reply Packet INVALID CLASS throw new Class Not Loaded Exception name default Reply Error Handler reply Packet error Code catch IO Exception e defaultIO Exception Handler e finally handled Jdwp Request  setValue InvalidTypeException ClassNotLoadedException initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes outData writeInt outData FieldImpl outData ValueImpl checkedValue ValueImpl checkValue virtualMachineImpl checkedValue checkedValue outData ValueImpl writeNull outData JdwpReplyPacket replyPacket JdwpCommandPacket CT_SET_VALUES outBytes replyPacket errorCode JdwpReplyPacket TYPE_MISMATCH InvalidTypeException JdwpReplyPacket INVALID_CLASS ClassNotLoadedException defaultReplyErrorHandler replyPacket errorCode IOException defaultIOExceptionHandler handledJdwpRequest
return Returns the the currently loaded direct subclasses of this class public List subclasses Note that this information should not be cached List subclasses new Array List Iterator itr virtual Machine Impl all Ref Types while itr has Next try Reference Type Impl ref Type Reference Type Impl itr next if ref Type instanceof Class Type Impl Class Type Impl class Type Class Type Impl ref Type if class Type superclass null class Type superclass equals this subclasses add class Type catch Class Not Prepared Exception e continue return subclasses  ArrayList virtualMachineImpl allRefTypes hasNext ReferenceTypeImpl refType ReferenceTypeImpl refType ClassTypeImpl ClassTypeImpl classType ClassTypeImpl refType classType classType classType ClassNotPreparedException
return Returns the superclass of this class public Class Type superclass if f Superclass null return f Superclass init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet CT SUPERCLASS this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f Superclass Class Type Impl read this reply Data return f Superclass catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ClassType fSuperclass fSuperclass initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket CT_SUPERCLASS defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fSuperclass ClassTypeImpl replyData fSuperclass IOException defaultIOExceptionHandler handledJdwpRequest
public static Class Type Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp ClassID ID new Jdwp ClassID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println class Type ID value NON NLS 1 if ID is Null return null Class Type Impl mirror Class Type Impl vm Impl get Cached Mirror ID if mirror null mirror new Class Type Impl vm Impl ID vm Impl add Cached Mirror mirror return mirror  ClassTypeImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpClassID JdwpClassID vmImpl fVerboseWriter fVerboseWriter classType isNull ClassTypeImpl ClassTypeImpl vmImpl getCachedMirror ClassTypeImpl vmImpl vmImpl addCachedMirror
public static Class Type Impl read With Signature Mirror Impl target boolean with Generic Signature Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp ClassID ID new Jdwp ClassID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println class Type ID value NON NLS 1 String signature target read String signature in NON NLS 1 String generic Signature null if with Generic Signature generic Signature target read String generic signature in NON NLS 1 if ID is Null return null Class Type Impl mirror Class Type Impl vm Impl get Cached Mirror ID if mirror null mirror new Class Type Impl vm Impl ID vm Impl add Cached Mirror mirror mirror set Signature signature mirror set Generic Signature generic Signature return mirror  ClassTypeImpl readWithSignature MirrorImpl withGenericSignature DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpClassID JdwpClassID vmImpl fVerboseWriter fVerboseWriter classType readString genericSignature withGenericSignature genericSignature readString isNull ClassTypeImpl ClassTypeImpl vmImpl getCachedMirror ClassTypeImpl vmImpl vmImpl addCachedMirror setSignature setGenericSignature genericSignature
public boolean is Enum if virtual Machine Impl is Jdwp Version Greater Or Equal 1 5 there is no modifier for this Class Type super Class superclass return super Class null E Ljava lang Enum TE Ljava lang Object Ljava lang Comparable TE Ljava io Serializable equals super Class generic Signature NON NLS 1 jdwp 1 5 only option return false  isEnum virtualMachineImpl isJdwpVersionGreaterOrEqual ClassType superClass superClass superClass genericSignature

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Connect Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME ConnectMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Creates a new Connector public Connector Impl Virtual Machine Manager Impl virtual Machine Manager f Virtual Machine Manager virtual Machine Manager  ConnectorImpl VirtualMachineManagerImpl virtualMachineManager fVirtualMachineManager virtualMachineManager
return Returns Virtual Machine Manager public Virtual Machine Manager Impl virtual Machine Manager return f Virtual Machine Manager  VirtualMachineManagerImpl virtualMachineManager fVirtualMachineManager
return Returns Virtual Machine Manager public Virtual Machine Impl virtual Machine return f Virtual Machine  VirtualMachineImpl virtualMachine fVirtualMachine
return Returns a human readable description of this connector and its purpose public abstract String description 
public abstract String description return Returns a short identifier for the connector public abstract String name 
Assigns Transport package void set Transport Transport Impl transport f Transport transport  setTransport TransportImpl fTransport
return Returns the transport mechanism used by this connector to establish connections with a target VM public Transport transport return f Transport  fTransport
return Returns the manager for receiving packets from the Virtual Machine public Packet Receive Manager packet Receive Manager return f Packet Receive Manager  PacketReceiveManager packetReceiveManager fPacketReceiveManager
return Returns the manager for sending packets to the Virtual Machine public Packet Send Manager packet Send Manager return f Packet Send Manager  PacketSendManager packetSendManager fPacketSendManager
Closes connection with Virtual Machine package synchronized void close virtual Machine Manager remove ConnectedVM f Virtual Machine f Transport close  virtualMachineManager removeConnectedVM fVirtualMachine fTransport
return Returns Input Stream from Virtual Machine protected Input Stream get Input Stream throws IO Exception return f Transport get Input Stream  InputStream InputStream getInputStream IOException fTransport getInputStream
return Returns Output Stream to Virtual Machine protected Output Stream get Output Stream throws IO Exception return f Transport get Output Stream  OutputStream OutputStream getOutputStream IOException fTransport getOutputStream
Initializes receiving and sending threads protected void startIO Managers f Packet Receive Manager new Packet Receive Manager this f Packet Send Manager new Packet Send Manager this f Thread Receive Mgr new Thread f Packet Receive Manager Connect Messages get String Connector Impl Packet Receive Manager 1 NON NLS 1 f Thread Send Mgr new Thread f Packet Send Manager Connect Messages get String Connector Impl Packet Send Manager 2 NON NLS 1 f Packet Receive Manager set Partner Thread f Thread Send Mgr f Packet Send Manager set Partner Thread f Thread Receive Mgr f Thread Receive Mgr start f Thread Send Mgr start  startIOManagers fPacketReceiveManager PacketReceiveManager fPacketSendManager PacketSendManager fThreadReceiveMgr fPacketReceiveManager ConnectMessages getString ConnectorImpl Packet_Receive_Manager_1 fThreadSendMgr fPacketSendManager ConnectMessages getString ConnectorImpl Packet_Send_Manager_2 fPacketReceiveManager setPartnerThread fThreadSendMgr fPacketSendManager setPartnerThread fThreadReceiveMgr fThreadReceiveMgr fThreadSendMgr
return Returns a connected Virtual Machine protected Virtual Machine established Connection f Virtual Machine new Virtual Machine Impl this startIO Managers virtual Machine Manager add ConnectedVM f Virtual Machine return f Virtual Machine  VirtualMachine establishedConnection fVirtualMachine VirtualMachineImpl startIOManagers virtualMachineManager addConnectedVM fVirtualMachine fVirtualMachine
protected Argument Impl String name String description String label boolean must Specify f Name name f Label label f Description description f Must Specify must Specify  ArgumentImpl mustSpecify fName fLabel fDescription fMustSpecify mustSpecify
public String name return f Name  fName
public String description return f Description  fDescription
public String label return f Label  fLabel
public boolean must Specify return f Must Specify  mustSpecify fMustSpecify
public abstract String value 
public abstract String value public abstract void set Value String value  setValue
public abstract String value public abstract void set Value String value public abstract boolean is Valid String value  setValue isValid
public abstract void set Value String value public abstract boolean is Valid String value public abstract String to String  setValue isValid toString
private String f Value protected String Argument Impl String name String description String label boolean must Specify super name description label must Specify  fValue StringArgumentImpl mustSpecify mustSpecify
public String value return f Value  fValue
public void set Value String value f Value value  setValue fValue
public boolean is Valid String value return true  isValid
public String to String return f Value  toString fValue
protected Integer Argument Impl String name String description String label boolean must Specify int min int max super name description label must Specify f Min min f Max max  IntegerArgumentImpl mustSpecify mustSpecify fMin fMax
public String value return f Value to String  fValue toString
public void set Value String value f Value new Integer value  setValue fValue
public boolean is Valid String value Integer val try val new Integer value catch Number Format Exception e return false return is Valid val int Value  isValid NumberFormatException isValid intValue
public String to String return value  toString
public int int Value return f Value int Value  intValue fValue intValue
public void set Value int value f Value new Integer value  setValue fValue
public int min return f Min  fMin
public int max return f Max  fMax
public boolean is Valid int value return f Min value value f Max  isValid fMin fMax
public String string Value Of int value return new Integer value to String  stringValueOf toString
private Boolean f Value protected Boolean Argument Impl String name String description String label boolean must Specify super name description label must Specify  fValue BooleanArgumentImpl mustSpecify mustSpecify
public String value return f Value to String  fValue toString
public void set Value String value f Value new Boolean value  setValue fValue
public boolean is Valid String value return true  isValid
public String to String return value  toString
public boolean boolean Value return f Value boolean Value  booleanValue fValue booleanValue
public void set Value boolean value f Value new Boolean value  setValue fValue
public String string Value Of boolean value return new Boolean value to String  stringValueOf toString
private List f Choices protected Selected Argument Impl String name String description String label boolean must Specify List choices super name description label must Specify f Choices choices  fChoices SelectedArgumentImpl mustSpecify mustSpecify fChoices
public List choices return f Choices  fChoices
public boolean is Valid java lang String value return f Choices contains value  isValid fChoices

Creates new Packet Manager protected Packet Manager Connector Impl connector f Connector connector  PacketManager PacketManager ConnectorImpl fConnector
Used to indicate that an IO exception occurred closes connection to Virtual Machine param disconnect Exception the IO Exception that occurred public synchronized void disconnectVM IO Exception disconnect Exception f Disconnect Exception disconnect Exception disconnectVM  disconnectException IOException IOException disconnectException fDisconnectException disconnectException
Closes connection to Virtual Machine public synchronized void disconnectVM Virtual Machine Impl vm f Connector virtual Machine vm set Disconnected true f Connector close Notify any waiting threads notify All Interrupt the sending thread if we are the receiving thread and vice versa f Partner Thread interrupt  VirtualMachineImpl fConnector virtualMachine setDisconnected fConnector notifyAll fPartnerThread
return Returns whether an IO exception has occurred public boolean VM Is Disconnected return f Connector virtual Machine is Disconnected  VMIsDisconnected fConnector virtualMachine isDisconnected
Returns the IO Exception that caused this packet manager to disconnect or code null code if none public IO Exception get Disconnect Exception return f Disconnect Exception  IOException IOException getDisconnectException fDisconnectException
Assigns thread of partner to be notified if we have an IO exception public void set Partner Thread Thread thread f Partner Thread thread  setPartnerThread fPartnerThread

Create a new thread that receives packets from the Virtual Machine public Packet Receive Manager Connector Impl connector super connector try fVM connector virtual Machine f In Stream connector get Input Stream f Command Packets new Linked List f Reply Packets new Linked List catch IO Exception e disconnectVM e  PacketReceiveManager ConnectorImpl virtualMachine fInStream getInputStream fCommandPackets LinkedList fReplyPackets LinkedList IOException
Thread s run method public void run try while true Read a packet from the input stream read Available Packet catch InterruptedIO Exception e Stop running catch IO Exception e disconnectVM e  readAvailablePacket InterruptedIOException IOException
return Returns a specified Command Packet from the Virtual Machine public synchronized Jdwp Command Packet get Command int command long time To Wait throws Interrupted Exception Jdwp Command Packet packet null long remaining Time time To Wait long time Before Wait long waited Time Wait until command is available while VM Is Disconnected packet remove Command Packet command null time To Wait 0 remaining Time 0 time Before Wait System current Time Millis wait For Packet Available remaining Time waited Time System current Time Millis time Before Wait remaining Time waited Time Check for an IO Exception if VM Is Disconnected String message if get Disconnect Exception null message Connect Messages get String Packet Receive Manager Got IOException from Virtual Machine 1 NON NLS 1 else String ex Message get Disconnect Exception get Message if ex Message null message Message Format format Connect Messages get String Packet Receive Manager Got  0  from Virtual Machine 1 new String get Disconnect Exception get Class get Name NON NLS 1 else message Message Format format Connect Messages get String Packet Receive Manager Got  0  from Virtual Machine   1  1 new String get Disconnect Exception get Class get Name ex Message NON NLS 1 throw new VM Disconnected Exception message Check for a timeout if packet null throw new Timeout Exception return packet  JdwpCommandPacket getCommand timeToWait InterruptedException JdwpCommandPacket remainingTime timeToWait timeBeforeWait waitedTime VMIsDisconnected removeCommandPacket timeToWait remainingTime timeBeforeWait currentTimeMillis waitForPacketAvailable remainingTime waitedTime currentTimeMillis timeBeforeWait remainingTime waitedTime VMIsDisconnected getDisconnectException ConnectMessages getString PacketReceiveManager Got_IOException_from_Virtual_Machine_1 exMessage getDisconnectException getMessage exMessage MessageFormat ConnectMessages getString PacketReceiveManager Got_ _from_Virtual_Machine_1 getDisconnectException getClass getName MessageFormat ConnectMessages getString PacketReceiveManager Got_ _from_Virtual_Machine__ _1 getDisconnectException getClass getName exMessage VMDisconnectedException TimeoutException
return Returns a specified Reply Packet from the Virtual Machine public synchronized Jdwp Reply Packet get Reply int id long time To Wait Jdwp Reply Packet packet null long remaining Time time To Wait long time Before Wait long waited Time Wait until reply is available while VM Is Disconnected packet remove Reply Packet id null time To Wait 0 remaining Time 0 time Before Wait System current Time Millis try wait For Packet Available remaining Time catch Interrupted Exception e waited Time System current Time Millis time Before Wait remaining Time waited Time Check for an IO Exception if VM Is Disconnected throw new VM Disconnected Exception Connect Messages get String Packet Receive Manager Got IOException from Virtual Machine 2 NON NLS 1 Check for a timeout if packet null throw new Timeout Exception return packet  JdwpReplyPacket getReply timeToWait JdwpReplyPacket remainingTime timeToWait timeBeforeWait waitedTime VMIsDisconnected removeReplyPacket timeToWait remainingTime timeBeforeWait currentTimeMillis waitForPacketAvailable remainingTime InterruptedException waitedTime currentTimeMillis timeBeforeWait remainingTime waitedTime VMIsDisconnected VMDisconnectedException ConnectMessages getString PacketReceiveManager Got_IOException_from_Virtual_Machine_2 TimeoutException
return Returns a specified Reply Packet from the Virtual Machine public Jdwp Reply Packet get Reply Jdwp Command Packet command Packet return get Reply command Packet get Id fVM get Request Timeout  JdwpReplyPacket getReply JdwpCommandPacket commandPacket getReply commandPacket getId getRequestTimeout
Wait for an available packet from the Virtual Machine private void wait For Packet Available long time To Wait throws Interrupted Exception if time To Wait 0 return else if time To Wait 0 wait else wait time To Wait  waitForPacketAvailable timeToWait InterruptedException timeToWait timeToWait timeToWait
return Returns and removes a specified command packet from the command packet list private Jdwp Command Packet remove Command Packet int command List Iterator iter f Command Packets list Iterator while iter has Next Jdwp Command Packet packet Jdwp Command Packet iter next if packet get Command command iter remove return packet return null  JdwpCommandPacket removeCommandPacket ListIterator fCommandPackets listIterator hasNext JdwpCommandPacket JdwpCommandPacket getCommand
return Returns a specified reply packet from the reply packet list private Jdwp Reply Packet remove Reply Packet int id List Iterator iter f Reply Packets list Iterator while iter has Next Jdwp Reply Packet packet Jdwp Reply Packet iter next if packet get Id id iter remove return packet return null  JdwpReplyPacket removeReplyPacket ListIterator fReplyPackets listIterator hasNext JdwpReplyPacket JdwpReplyPacket getId
Add a command packet to the command packet list private synchronized void add Command Packet Jdwp Command Packet packet f Command Packets add packet notify All  addCommandPacket JdwpCommandPacket fCommandPackets notifyAll
Add a reply packet to the reply packet list private synchronized void add Reply Packet Jdwp Reply Packet packet f Reply Packets add packet notify All  addReplyPacket JdwpReplyPacket fReplyPackets notifyAll
Read a packet from the input stream and add it to the appropriate packet list private void read Available Packet throws IO Exception Read a packet from the Input Stream Jdwp Packet packet Jdwp Packet read f In Stream Add packet to command or reply queue if packet instanceof Jdwp Command Packet add Command Packet Jdwp Command Packet packet else add Reply Packet Jdwp Reply Packet packet  readAvailablePacket IOException JdwpPacket JdwpPacket fInStream JdwpCommandPacket addCommandPacket JdwpCommandPacket addReplyPacket JdwpReplyPacket

Create a new thread that send packets to the Virtual Machine public Packet Send Manager Connector Impl connector super connector try f Out Stream connector get Output Stream f Outgoing Packets new Linked List catch IO Exception e disconnectVM e  PacketSendManager ConnectorImpl fOutStream getOutputStream fOutgoingPackets LinkedList IOException
Thread s run method public void run while VM Is Disconnected try send Available Packets catch Interrupted Exception e catch InterruptedIO Exception e catch IO Exception e disconnectVM e  VMIsDisconnected sendAvailablePackets InterruptedException InterruptedIOException IOException
Add a packet to be sent to the Virtual Machine public synchronized void send Packet Jdwp Packet packet if VM Is Disconnected String message if get Disconnect Exception null message Connect Messages get String Packet Send Manager Got IOException from Virtual Machine 1 NON NLS 1 else String ex Message get Disconnect Exception get Message if ex Message null message Message Format format Connect Messages get String Packet Send Manager Got  0  from Virtual Machine 1 new String get Disconnect Exception get Class get Name NON NLS 1 else message Message Format format Connect Messages get String Packet Send Manager Got  0  from Virtual Machine   1  1 new String get Disconnect Exception get Class get Name ex Message NON NLS 1 throw new VM Disconnected Exception message Add packet to list of packets to send f Outgoing Packets add packet Notify Packet Send Thread that data is available notify All  sendPacket JdwpPacket VMIsDisconnected getDisconnectException ConnectMessages getString PacketSendManager Got_IOException_from_Virtual_Machine_1 exMessage getDisconnectException getMessage exMessage MessageFormat ConnectMessages getString PacketSendManager Got_ _from_Virtual_Machine_1 getDisconnectException getClass getName MessageFormat ConnectMessages getString PacketSendManager Got_ _from_Virtual_Machine__ _1 getDisconnectException getClass getName exMessage VMDisconnectedException fOutgoingPackets PacketSendThread notifyAll
Send available packets to the Virtual Machine private synchronized void send Available Packets throws Interrupted Exception IO Exception while f Outgoing Packets size 0 wait Put available packets on Output Stream while f Outgoing Packets size 0 Note that only Jdwp Packets are added to the list so a Class Cast Exception can t occur Jdwp Packet packet Jdwp Packet f Outgoing Packets remove First Buffer the output until a complete packet is available Buffered Output Stream buffer Out Stream new Buffered Output Stream f Out Stream packet get Length packet write buffer Out Stream buffer Out Stream flush  sendAvailablePackets InterruptedException IOException fOutgoingPackets fOutgoingPackets JdwpPackets ClassCastException JdwpPacket JdwpPacket fOutgoingPackets removeFirst BufferedOutputStream bufferOutStream BufferedOutputStream fOutStream getLength bufferOutStream bufferOutStream

Creates new Socket Attaching Connector Impl public Socket Attaching Connector Impl Virtual Machine Manager Impl virtual Machine Manager super virtual Machine Manager Create communication protocol specific transport Socket Transport Impl transport new Socket Transport Impl set Transport transport  SocketAttachingConnectorImpl SocketAttachingConnectorImpl VirtualMachineManagerImpl virtualMachineManager virtualMachineManager SocketTransportImpl SocketTransportImpl setTransport
return Returns the default arguments public Map default Arguments Hash Map arguments new Hash Map 2 Hostname String Argument Impl str Arg new String Argument Impl hostname Connect Messages get String Socket Attaching Connector Impl Machine name to which to attach for VM connections 1 Connect Messages get String Socket Attaching Connector Impl Host 2 false NON NLS 1 NON NLS 2 NON NLS 3 str Arg set Value localhost NON NLS 1 arguments put str Arg name str Arg Port Integer Argument Impl int Arg new Integer Argument Impl port Connect Messages get String Socket Attaching Connector Impl Port number to which to attach for VM connections 3 Connect Messages get String Socket Attaching Connector Impl Port 4 true Socket Transport Impl MIN PORTNR Socket Transport Impl MAX PORTNR NON NLS 1 NON NLS 2 NON NLS 3 arguments put int Arg name int Arg return arguments  defaultArguments HashMap HashMap StringArgumentImpl strArg StringArgumentImpl ConnectMessages getString SocketAttachingConnectorImpl Machine_name_to_which_to_attach_for_VM_connections_1 ConnectMessages getString SocketAttachingConnectorImpl Host_2 strArg setValue strArg strArg IntegerArgumentImpl intArg IntegerArgumentImpl ConnectMessages getString SocketAttachingConnectorImpl Port_number_to_which_to_attach_for_VM_connections_3 ConnectMessages getString SocketAttachingConnectorImpl Port_4 SocketTransportImpl MIN_PORTNR SocketTransportImpl MAX_PORTNR intArg intArg
return Returns a short identifier for the connector public String name return com sun jdi Socket Attach NON NLS 1  SocketAttach
return Returns a human readable description of this connector and its purpose public String description return Connect Messages get String Socket Attaching Connector Impl Attaches by socket to other VMs 5 NON NLS 1  ConnectMessages getString SocketAttachingConnectorImpl Attaches_by_socket_to_other_VMs_5
Retrieves connection arguments private void get Connection Arguments Map connection Args throws Illegal Connector Arguments Exception String attribute NON NLS 1 try attribute hostname NON NLS 1 f Hostname Connector String Argument connection Args get attribute value attribute port NON NLS 1 f Port Connector Integer Argument connection Args get attribute int Value TODO new timeout attribute catch Class Cast Exception e throw new Illegal Connector Arguments Exception Connect Messages get String Socket Attaching Connector Impl Connection argument is not of the right type 6 attribute NON NLS 1 catch Null Pointer Exception e throw new Illegal Connector Arguments Exception Connect Messages get String Socket Attaching Connector Impl Necessary connection argument is null 7 attribute NON NLS 1 catch Number Format Exception e throw new Illegal Connector Arguments Exception Connect Messages get String Socket Attaching Connector Impl Connection argument is not a number 8 attribute NON NLS 1  getConnectionArguments connectionArgs IllegalConnectorArgumentsException fHostname StringArgument connectionArgs fPort IntegerArgument connectionArgs intValue ClassCastException IllegalConnectorArgumentsException ConnectMessages getString SocketAttachingConnectorImpl Connection_argument_is_not_of_the_right_type_6 NullPointerException IllegalConnectorArgumentsException ConnectMessages getString SocketAttachingConnectorImpl Necessary_connection_argument_is_null_7 NumberFormatException IllegalConnectorArgumentsException ConnectMessages getString SocketAttachingConnectorImpl Connection_argument_is_not_a_number_8
Establishes a connection to a virtual machine return Returns a connected Virtual Machine public Virtual Machine attach Map connection Args throws IO Exception Illegal Connector Arguments Exception get Connection Arguments connection Args try Socket Transport Impl f Transport attach f Hostname f Port catch Illegal Argument Exception e List args new Array List args add hostname NON NLS 1 args add port NON NLS 1 throw new Illegal Connector Arguments Exception e get Message args return established Connection  VirtualMachine connectionArgs IOException IllegalConnectorArgumentsException getConnectionArguments connectionArgs SocketTransportImpl fTransport fHostname fPort IllegalArgumentException ArrayList IllegalConnectorArgumentsException getMessage establishedConnection

Creates new Socket Attaching Connector Impl public Socket Launching Connector Impl Virtual Machine Manager Impl virtual Machine Manager super virtual Machine Manager Create communication protocol specific transport Socket Transport Impl transport new Socket Transport Impl set Transport transport  SocketAttachingConnectorImpl SocketLaunchingConnectorImpl VirtualMachineManagerImpl virtualMachineManager virtualMachineManager SocketTransportImpl SocketTransportImpl setTransport
return Returns the default arguments public Map default Arguments Hash Map arguments new Hash Map 6 Home String Argument Impl str Arg new String Argument Impl home Connect Messages get String Socket Launching Connector Impl Home directory of the SDK or runtime environment used to launch the application 1 Connect Messages get String Socket Launching Connector Impl Home 2 false NON NLS 1 NON NLS 2 NON NLS 3 str Arg set Value System get Property java home NON NLS 1 arguments put str Arg name str Arg Options str Arg new String Argument Impl options Connect Messages get String Socket Launching Connector Impl Launched VM options 3 Connect Messages get String Socket Launching Connector Impl Options 4 false NON NLS 1 NON NLS 2 NON NLS 3 arguments put str Arg name str Arg Main str Arg new String Argument Impl main Connect Messages get String Socket Launching Connector Impl Main class and arguments  or if  jar is an option  the main jar file and arguments 5 Connect Messages get String Socket Launching Connector Impl Main 6 true NON NLS 1 NON NLS 2 NON NLS 3 arguments put str Arg name str Arg Suspend Boolean Argument Impl bool Arg new Boolean Argument Impl suspend Connect Messages get String Socket Launching Connector Impl All threads will be suspended before execution of main 7 Connect Messages get String Socket Launching Connector Impl Suspend 8 false NON NLS 1 NON NLS 2 NON NLS 3 bool Arg set Value true arguments put bool Arg name bool Arg Quote str Arg new String Argument Impl quote Connect Messages get String Socket Launching Connector Impl Character used to combine space delimited text into a single command line argument 9 Connect Messages get String Socket Launching Connector Impl Quote 10 true NON NLS 1 NON NLS 2 NON NLS 3 str Arg set Value NON NLS 1 arguments put str Arg name str Arg Launcher str Arg new String Argument Impl vmexec Connect Messages get String Socket Launching Connector Impl Name of the Java VM launcher 11 Connect Messages get String Socket Launching Connector Impl Launcher 12 true NON NLS 1 NON NLS 2 NON NLS 3 str Arg set Value java NON NLS 1 arguments put str Arg name str Arg return arguments  defaultArguments HashMap HashMap StringArgumentImpl strArg StringArgumentImpl ConnectMessages getString SocketLaunchingConnectorImpl Home_directory_of_the_SDK_or_runtime_environment_used_to_launch_the_application_1 ConnectMessages getString SocketLaunchingConnectorImpl Home_2 strArg setValue getProperty strArg strArg strArg StringArgumentImpl ConnectMessages getString SocketLaunchingConnectorImpl Launched_VM_options_3 ConnectMessages getString SocketLaunchingConnectorImpl Options_4 strArg strArg strArg StringArgumentImpl ConnectMessages getString SocketLaunchingConnectorImpl Main_class_and_arguments _or_if_ jar_is_an_option _the_main_jar_file_and_arguments_5 ConnectMessages getString SocketLaunchingConnectorImpl Main_6 strArg strArg BooleanArgumentImpl boolArg BooleanArgumentImpl ConnectMessages getString SocketLaunchingConnectorImpl All_threads_will_be_suspended_before_execution_of_main_7 ConnectMessages getString SocketLaunchingConnectorImpl Suspend_8 boolArg setValue boolArg boolArg strArg StringArgumentImpl ConnectMessages getString SocketLaunchingConnectorImpl Character_used_to_combine_space delimited_text_into_a_single_command_line_argument_9 ConnectMessages getString SocketLaunchingConnectorImpl Quote_10 strArg setValue strArg strArg strArg StringArgumentImpl ConnectMessages getString SocketLaunchingConnectorImpl Name_of_the_Java_VM_launcher_11 ConnectMessages getString SocketLaunchingConnectorImpl Launcher_12 strArg setValue strArg strArg
return Returns a short identifier for the connector public String name return com sun jdi Command Line Launch NON NLS 1  CommandLineLaunch
return Returns a human readable description of this connector and its purpose public String description return Connect Messages get String Socket Launching Connector Impl Launches target using Sun Java VM command line and attaches to it 13 NON NLS 1  ConnectMessages getString SocketLaunchingConnectorImpl Launches_target_using_Sun_Java_VM_command_line_and_attaches_to_it_13
Retrieves connection arguments private void get Connection Arguments Map connection Args throws Illegal Connector Arguments Exception String attribute NON NLS 1 try attribute home NON NLS 1 f Home Connector String Argument connection Args get attribute value attribute options NON NLS 1 f Options Connector String Argument connection Args get attribute value attribute main NON NLS 1 f Main Connector String Argument connection Args get attribute value attribute suspend NON NLS 1 f Suspend Connector Boolean Argument connection Args get attribute boolean Value attribute quote NON NLS 1 Connector String Argument connection Args get attribute value attribute vmexec NON NLS 1 f Launcher Connector String Argument connection Args get attribute value catch Class Cast Exception e throw new Illegal Connector Arguments Exception Connect Messages get String Socket Launching Connector Impl Connection argument is not of the right type 14 attribute NON NLS 1 catch Null Pointer Exception e throw new Illegal Connector Arguments Exception Connect Messages get String Socket Launching Connector Impl Necessary connection argument is null 15 attribute NON NLS 1 catch Number Format Exception e throw new Illegal Connector Arguments Exception Connect Messages get String Socket Launching Connector Impl Connection argument is not a number 16 attribute NON NLS 1  getConnectionArguments connectionArgs IllegalConnectorArgumentsException fHome StringArgument connectionArgs fOptions StringArgument connectionArgs fMain StringArgument connectionArgs fSuspend BooleanArgument connectionArgs booleanValue StringArgument connectionArgs fLauncher StringArgument connectionArgs ClassCastException IllegalConnectorArgumentsException ConnectMessages getString SocketLaunchingConnectorImpl Connection_argument_is_not_of_the_right_type_14 NullPointerException IllegalConnectorArgumentsException ConnectMessages getString SocketLaunchingConnectorImpl Necessary_connection_argument_is_null_15 NumberFormatException IllegalConnectorArgumentsException ConnectMessages getString SocketLaunchingConnectorImpl Connection_argument_is_not_a_number_16
Launches an application and connects to its VM return Returns a connected Virtual Machine public Virtual Machine launch Map connection Args throws IO Exception Illegal Connector Arguments Exception VM Start Exception get Connection Arguments connection Args A listening connector is used that waits for a connection of the VM that is started up Note that port number zero means that a free port is chosen Socket Listening Connector Impl listen Connector new Socket Listening Connector Impl virtual Machine Manager Map args listen Connector default Arguments Connector Integer Argument args get port set Value 0 NON NLS 1 Connector Integer Argument args get timeout set Value ACCEPT TIMEOUT NON NLS 1 listen Connector start Listening args String for Executable String slash System get Property file separator NON NLS 1 String exec String f Home slash bin slash f Launcher NON NLS 1 Add Debug options exec String Xdebug Xnoagent Djava compiler NONE NON NLS 1 exec String Xrunjdwp transport dt socket address localhost listen Connector listening Port server n suspend f Suspend y n NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 Add User specified options if f Options null exec String f Options NON NLS 1 Add Main class exec String f Main NON NLS 1 Start VM Process proc Runtime get Runtime exec exec String The accept times out if the VM does not connect Virtual Machine Impl virtual Machine try virtual Machine Virtual Machine Impl listen Connector accept args catch InterruptedIO Exception e proc destroy String message Message Format format Connect Messages get String Socket Launching Connector Impl VM did not connect within given time   0  ms 1 new String Connector Integer Argument args get timeout value NON NLS 1 NON NLS 2 throw new VM Start Exception message proc virtual Machine set Launced Process proc return virtual Machine  VirtualMachine connectionArgs IOException IllegalConnectorArgumentsException VMStartException getConnectionArguments connectionArgs SocketListeningConnectorImpl listenConnector SocketListeningConnectorImpl virtualMachineManager listenConnector defaultArguments IntegerArgument setValue IntegerArgument setValue ACCEPT_TIMEOUT listenConnector startListening getProperty execString fHome fLauncher execString execString dt_socket listenConnector listeningPort fSuspend fOptions execString fOptions execString fMain getRuntime execString VirtualMachineImpl virtualMachine virtualMachine VirtualMachineImpl listenConnector InterruptedIOException MessageFormat ConnectMessages getString SocketLaunchingConnectorImpl VM_did_not_connect_within_given_time__ _ms_1 IntegerArgument VMStartException virtualMachine setLauncedProcess virtualMachine

Creates new Socket Attaching Connector Impl public Socket Listening Connector Impl Virtual Machine Manager Impl virtual Machine Manager super virtual Machine Manager Create communication protocol specific transport Socket Transport Impl transport new Socket Transport Impl set Transport transport  SocketAttachingConnectorImpl SocketListeningConnectorImpl VirtualMachineManagerImpl virtualMachineManager virtualMachineManager SocketTransportImpl SocketTransportImpl setTransport
return Returns the default arguments public Map default Arguments Hash Map arguments new Hash Map 1 Port Integer Argument Impl int Arg new Integer Argument Impl port Connect Messages get String Socket Listening Connector Impl Port number at which to listen for VM connections 1 Connect Messages get String Socket Listening Connector Impl Port 2 true Socket Transport Impl MIN PORTNR Socket Transport Impl MAX PORTNR NON NLS 1 NON NLS 2 NON NLS 3 arguments put int Arg name int Arg Timeout int Arg new Integer Argument Impl timeout Connect Messages get String Socket Listening Connector Impl Timeout before accept returns 3 Connect Messages get String Socket Listening Connector Impl Timeout 4 false 0 Integer MAX VALUE NON NLS 1 NON NLS 2 NON NLS 3 arguments put int Arg name int Arg return arguments  defaultArguments HashMap HashMap IntegerArgumentImpl intArg IntegerArgumentImpl ConnectMessages getString SocketListeningConnectorImpl Port_number_at_which_to_listen_for_VM_connections_1 ConnectMessages getString SocketListeningConnectorImpl Port_2 SocketTransportImpl MIN_PORTNR SocketTransportImpl MAX_PORTNR intArg intArg intArg IntegerArgumentImpl ConnectMessages getString SocketListeningConnectorImpl Timeout_before_accept_returns_3 ConnectMessages getString SocketListeningConnectorImpl Timeout_4 MAX_VALUE intArg intArg
return Returns a short identifier for the connector public String name return com sun jdi Socket Listen NON NLS 1  SocketListen
return Returns a human readable description of this connector and its purpose public String description return Connect Messages get String Socket Listening Connector Impl Accepts socket connections initiated by other VMs 5 NON NLS 1  ConnectMessages getString SocketListeningConnectorImpl Accepts_socket_connections_initiated_by_other_VMs_5
Retrieves connection arguments private void get Connection Arguments Map connection Args throws Illegal Connector Arguments Exception String attribute port NON NLS 1 try f Port Connector Integer Argument connection Args get attribute int Value Note that timeout is not used in SUN s Listening Connector but is used by our Launching Connector attribute timeout NON NLS 1 f Timeout Connector Integer Argument connection Args get attribute int Value catch Class Cast Exception e throw new Illegal Connector Arguments Exception Connect Messages get String Socket Listening Connector Impl Connection argument is not of the right type 6 attribute NON NLS 1 catch Null Pointer Exception e throw new Illegal Connector Arguments Exception Connect Messages get String Socket Listening Connector Impl Necessary connection argument is null 7 attribute NON NLS 1 catch Number Format Exception e throw new Illegal Connector Arguments Exception Connect Messages get String Socket Listening Connector Impl Connection argument is not a number 8 attribute NON NLS 1  getConnectionArguments connectionArgs IllegalConnectorArgumentsException fPort IntegerArgument connectionArgs intValue ListeningConnector LaunchingConnector fTimeout IntegerArgument connectionArgs intValue ClassCastException IllegalConnectorArgumentsException ConnectMessages getString SocketListeningConnectorImpl Connection_argument_is_not_of_the_right_type_6 NullPointerException IllegalConnectorArgumentsException ConnectMessages getString SocketListeningConnectorImpl Necessary_connection_argument_is_null_7 NumberFormatException IllegalConnectorArgumentsException ConnectMessages getString SocketListeningConnectorImpl Connection_argument_is_not_a_number_8
Listens for one or more connections initiated by target V Ms return Returns the address at which the connector is listening for a connection public String start Listening Map connection Args throws IO Exception Illegal Connector Arguments Exception get Connection Arguments connection Args String result Connect Messages get String Socket Listening Connector Impl ListeningConnector Socket Port f Port NON NLS 1 try Socket Transport Impl f Transport listen f Port catch Illegal Argument Exception e throw new Illegal Connector Arguments Exception e get Message port NON NLS 1 return result  VMs startListening connectionArgs IOException IllegalConnectorArgumentsException getConnectionArguments connectionArgs ConnectMessages getString SocketListeningConnectorImpl ListeningConnector_Socket_Port fPort SocketTransportImpl fTransport fPort IllegalArgumentException IllegalConnectorArgumentsException getMessage
Cancels listening for connections public void stop Listening Map connection Args throws IO Exception Socket Transport Impl f Transport close Listen  stopListening connectionArgs IOException SocketTransportImpl fTransport closeListen
Waits for a target VM to attach to this connector return Returns a connected Virtual Machine public Virtual Machine accept Map connection Args throws IO Exception TODO Transport Timeout Exception Socket Transport Impl f Transport set Accept Timeout f Timeout Socket Transport Impl f Transport accept if f Transport is Open return established Connection else return null  VirtualMachine connectionArgs IOException TransportTimeoutException SocketTransportImpl fTransport setAcceptTimeout fTimeout SocketTransportImpl fTransport fTransport isOpen establishedConnection
return Returns whether this listening connector supports multiple connections for a single argument map public boolean supports Multiple Connections return true  supportsMultipleConnections
return Returns port number that is listened to public int listening Port return Socket Transport Impl f Transport listening Port  listeningPort SocketTransportImpl fTransport listeningPort

Creates new Socket Attaching Connector Impl public Socket Raw Launching Connector Impl Virtual Machine Manager Impl virtual Machine Manager super virtual Machine Manager Create communication protocol specific transport Socket Transport Impl transport new Socket Transport Impl set Transport transport  SocketAttachingConnectorImpl SocketRawLaunchingConnectorImpl VirtualMachineManagerImpl virtualMachineManager virtualMachineManager SocketTransportImpl SocketTransportImpl setTransport
return Returns the default arguments public Map default Arguments Hash Map arguments new Hash Map 3 Command String Argument Impl str Arg new String Argument Impl command Connect Messages get String Socket Raw Launching Connector Impl Raw command to start the debugged application VM 1 Connect Messages get String Socket Raw Launching Connector Impl Command 2 true NON NLS 1 NON NLS 2 NON NLS 3 arguments put str Arg name str Arg Address str Arg new String Argument Impl address Connect Messages get String Socket Raw Launching Connector Impl Address from which to listen for a connection after the raw command is run 3 Connect Messages get String Socket Raw Launching Connector Impl Address 4 true NON NLS 1 NON NLS 2 NON NLS 3 arguments put str Arg name str Arg Quote str Arg new String Argument Impl quote Connect Messages get String Socket Raw Launching Connector Impl Character used to combine space delimited text into a single command line argument 5 Connect Messages get String Socket Raw Launching Connector Impl Quote 6 true NON NLS 1 NON NLS 2 NON NLS 3 str Arg set Value NON NLS 1 arguments put str Arg name str Arg return arguments  defaultArguments HashMap HashMap StringArgumentImpl strArg StringArgumentImpl ConnectMessages getString SocketRawLaunchingConnectorImpl Raw_command_to_start_the_debugged_application_VM_1 ConnectMessages getString SocketRawLaunchingConnectorImpl Command_2 strArg strArg strArg StringArgumentImpl ConnectMessages getString SocketRawLaunchingConnectorImpl Address_from_which_to_listen_for_a_connection_after_the_raw_command_is_run_3 ConnectMessages getString SocketRawLaunchingConnectorImpl Address_4 strArg strArg strArg StringArgumentImpl ConnectMessages getString SocketRawLaunchingConnectorImpl Character_used_to_combine_space delimited_text_into_a_single_command_line_argument_5 ConnectMessages getString SocketRawLaunchingConnectorImpl Quote_6 strArg setValue strArg strArg
return Returns a short identifier for the connector public String name return com sun jdi Raw Command Line Launch NON NLS 1  RawCommandLineLaunch
return Returns a human readable description of this connector and its purpose public String description return Connect Messages get String Socket Raw Launching Connector Impl Launches target using user specified command line and attaches to it 7 NON NLS 1  ConnectMessages getString SocketRawLaunchingConnectorImpl Launches_target_using_user specified_command_line_and_attaches_to_it_7
Retrieves connection arguments private void get Connection Arguments Map connection Args throws Illegal Connector Arguments Exception String attribute NON NLS 1 try attribute command NON NLS 1 f Command Connector String Argument connection Args get attribute value attribute address NON NLS 1 f Address Connector String Argument connection Args get attribute value attribute quote NON NLS 1 Connector String Argument connection Args get attribute value catch Class Cast Exception e throw new Illegal Connector Arguments Exception Connect Messages get String Socket Raw Launching Connector Impl Connection argument is not of the right type 8 attribute NON NLS 1 catch Null Pointer Exception e throw new Illegal Connector Arguments Exception Connect Messages get String Socket Raw Launching Connector Impl Necessary connection argument is null 9 attribute NON NLS 1 catch Number Format Exception e throw new Illegal Connector Arguments Exception Connect Messages get String Socket Raw Launching Connector Impl Connection argument is not a number 10 attribute NON NLS 1  getConnectionArguments connectionArgs IllegalConnectorArgumentsException fCommand StringArgument connectionArgs fAddress StringArgument connectionArgs StringArgument connectionArgs ClassCastException IllegalConnectorArgumentsException ConnectMessages getString SocketRawLaunchingConnectorImpl Connection_argument_is_not_of_the_right_type_8 NullPointerException IllegalConnectorArgumentsException ConnectMessages getString SocketRawLaunchingConnectorImpl Necessary_connection_argument_is_null_9 NumberFormatException IllegalConnectorArgumentsException ConnectMessages getString SocketRawLaunchingConnectorImpl Connection_argument_is_not_a_number_10
Launches an application and connects to its VM return Returns a connected Virtual Machine public Virtual Machine launch Map connection Args throws IO Exception Illegal Connector Arguments Exception VM Start Exception get Connection Arguments connection Args A listening connector is used that waits for a connection of the VM that is started up Note that port number zero means that a free port is chosen Socket Listening Connector Impl listen Connector new Socket Listening Connector Impl virtual Machine Manager Map args listen Connector default Arguments Connector Integer Argument args get port set Value f Address NON NLS 1 Connector Integer Argument args get timeout set Value ACCEPT TIMEOUT NON NLS 1 listen Connector start Listening args Start VM Process proc Runtime get Runtime exec f Command The accept times out it the VM does not connect Virtual Machine Impl virtual Machine try virtual Machine Virtual Machine Impl listen Connector accept args catch InterruptedIO Exception e proc destroy String message Message Format format Connect Messages get String Socket Launching Connector Impl VM did not connect within given time   0  ms 1 new String Connector Integer Argument args get timeout value NON NLS 1 NON NLS 2 throw new VM Start Exception message proc virtual Machine set Launced Process proc return virtual Machine  VirtualMachine connectionArgs IOException IllegalConnectorArgumentsException VMStartException getConnectionArguments connectionArgs SocketListeningConnectorImpl listenConnector SocketListeningConnectorImpl virtualMachineManager listenConnector defaultArguments IntegerArgument setValue fAddress IntegerArgument setValue ACCEPT_TIMEOUT listenConnector startListening getRuntime fCommand VirtualMachineImpl virtualMachine virtualMachine VirtualMachineImpl listenConnector InterruptedIOException MessageFormat ConnectMessages getString SocketLaunchingConnectorImpl VM_did_not_connect_within_given_time__ _ms_1 IntegerArgument VMStartException virtualMachine setLauncedProcess virtualMachine

Constructs new Socket Transport Impl public Socket Transport Impl super dt socket NON NLS 1  SocketTransportImpl SocketTransportImpl dt_socket
Establishes a client connection to a virtual machine public void attach String hostname int port throws IO Exception f Socket new Socket hostname port Perform Handshake  IOException fSocket PerformHandshake
Listens for connections initiated by target V Ms public void listen int port throws IO Exception close Listen f Server Socket new Server Socket port  VMs IOException closeListen fServerSocket ServerSocket
return Returns port number that is listened to public int listening Port if f Server Socket null return f Server Socket get Local Port else return 0  listeningPort fServerSocket fServerSocket getLocalPort
Closes socket connection public void close Listen throws IO Exception if f Server Socket null return f Server Socket close f Server Socket null  closeListen IOException fServerSocket fServerSocket fServerSocket
Accepts connections initiated by target V Ms public void accept throws IO Exception if f Server Socket null return f Socket f Server Socket accept Perform Handshake  VMs IOException fServerSocket fSocket fServerSocket PerformHandshake
Sets timeout on accept public void set Accept Timeout int timeout throws Socket Exception if f Server Socket null return f Server Socket set So Timeout timeout  setAcceptTimeout SocketException fServerSocket fServerSocket setSoTimeout
return Returns true if we have an open connection public boolean is Open return f Socket null  isOpen fSocket
Closes socket connection public void close if f Socket null return try f Socket close catch IO Exception e finally f Socket null  fSocket fSocket IOException fSocket
return Returns Input Stream from Virtual Machine public Input Stream get Input Stream throws IO Exception return f Socket get Input Stream  InputStream InputStream getInputStream IOException fSocket getInputStream
return Returns Output Stream to Virtual Machine public Output Stream get Output Stream throws IO Exception return f Socket get Output Stream  OutputStream OutputStream getOutputStream IOException fSocket getOutputStream
Performs handshake protocol private void Perform Handshake throws IO Exception Data Output Stream out new Data Output Stream f Socket get Output Stream out write handshake Bytes try Data Input Stream in new Data Input Stream f Socket get Input Stream byte handshake Input new byte handshake Bytes length in read Fully handshake Input if Arrays equals handshake Input handshake Bytes throw new IO Exception Connect Messages get String Socket Transport Impl Incorrect handshake reply received   1 new String handshake Input NON NLS 1 catch EOF Exception e throw new IO Exception Connect Messages get String Socket Transport Impl EOF encoutered during handshake 2 NON NLS 1  PerformHandshake IOException DataOutputStream DataOutputStream fSocket getOutputStream handshakeBytes DataInputStream DataInputStream fSocket getInputStream handshakeInput handshakeBytes readFully handshakeInput handshakeInput handshakeBytes IOException ConnectMessages getString SocketTransportImpl Incorrect_handshake_reply_received___1 handshakeInput EOFException IOException ConnectMessages getString SocketTransportImpl EOF_encoutered_during_handshake_2

Constructs new Socket Transport Impl public Transport Impl String name f Name name  SocketTransportImpl TransportImpl fName
return Returns a short identifier for the transport public String name return f Name  fName
return Returns true if we have an open connection public abstract boolean is Open  isOpen
public abstract boolean is Open Closes connection public abstract void close  isOpen
public abstract void close return Returns Input Stream from Virtual Machine public abstract Input Stream get Input Stream throws IO Exception  InputStream InputStream getInputStream IOException
public abstract Input Stream get Input Stream throws IO Exception return Returns Output Stream to Virtual Machine public abstract Output Stream get Output Stream throws IO Exception  InputStream getInputStream IOException OutputStream OutputStream getOutputStream IOException

public class Double Type Impl extends Primitive Type Impl implements Double Type Creates new instance public Double Type Impl Virtual Machine Impl vm Impl super Double Type vm Impl double D NON NLS 1 NON NLS 2 NON NLS 3  DoubleTypeImpl PrimitiveTypeImpl DoubleType DoubleTypeImpl VirtualMachineImpl vmImpl DoubleType vmImpl
returns primitive type tag public byte tag return Double Value Impl tag  DoubleValueImpl
return Create a null value instance of the type public Value create Null Value return virtual Machine Impl mirror Of 0 0D  createNullValue virtualMachineImpl mirrorOf

Creates new instance public Double Value Impl Virtual Machine Impl vm Impl Double value super Double Value vm Impl value NON NLS 1  DoubleValueImpl VirtualMachineImpl vmImpl DoubleValue vmImpl
returns tag public byte get Tag return tag  getTag
returns type of value public Type type return virtual Machine Impl get Double Type  virtualMachineImpl getDoubleType
returns Value public double value return double Value  doubleValue
return Reads and returns new instance public static Double Value Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl double value target read Double double Value in NON NLS 1 return new Double Value Impl vm Impl new Double value  DoubleValueImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl readDouble doubleValue DoubleValueImpl vmImpl
Writes value without value tag public void write Mirror Impl target Data Output Stream out throws IO Exception target write Double Double f Value double Value double Value out NON NLS 1  MirrorImpl DataOutputStream IOException writeDouble fValue doubleValue doubleValue

Creates new Access Watchpoint Event Impl protected Access Watchpoint Event Impl Virtual Machine Impl vm Impl RequestID requestID super Access Watchpoint Event vm Impl requestID NON NLS 1  AccessWatchpointEventImpl AccessWatchpointEventImpl VirtualMachineImpl vmImpl AccessWatchpointEvent vmImpl
return Creates reads and returns new Event Impl of which requestID has already been read public static Watchpoint Event Impl read Mirror Impl target RequestID requestID Data Input Stream data In Stream throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Access Watchpoint Event Impl event new Access Watchpoint Event Impl vm Impl requestID event read Watchpoint Event Fields target data In Stream return event  EventImpl WatchpointEventImpl MirrorImpl DataInputStream dataInStream IOException VirtualMachineImpl vmImpl virtualMachineImpl AccessWatchpointEventImpl AccessWatchpointEventImpl vmImpl readWatchpointEventFields dataInStream

Creates new Breakpoint Event Impl private Breakpoint Event Impl Virtual Machine Impl vm Impl RequestID requestID super Breakpoint Event vm Impl requestID NON NLS 1  BreakpointEventImpl BreakpointEventImpl VirtualMachineImpl vmImpl BreakpointEvent vmImpl
return Creates reads and returns new Event Impl of which requestID has already been read public static Breakpoint Event Impl read Mirror Impl target RequestID requestID Data Input Stream data In Stream throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Breakpoint Event Impl event new Breakpoint Event Impl vm Impl requestID event read Thread And Location target data In Stream Thread Reference Impl event thread set Is At Breakpoint return event  EventImpl BreakpointEventImpl MirrorImpl DataInputStream dataInStream IOException VirtualMachineImpl vmImpl virtualMachineImpl BreakpointEventImpl BreakpointEventImpl vmImpl readThreadAndLocation dataInStream ThreadReferenceImpl setIsAtBreakpoint

Creates new Breakpoint Event Impl private Class Prepare Event Impl Virtual Machine Impl vm Impl RequestID requestID super Class Prepare Event vm Impl requestID NON NLS 1  BreakpointEventImpl ClassPrepareEventImpl VirtualMachineImpl vmImpl ClassPrepareEvent vmImpl
return Creates reads and returns new Event Impl of which requestID has already been read public static Class Prepare Event Impl read Mirror Impl target RequestID requestID Data Input Stream data In Stream throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Class Prepare Event Impl event new Class Prepare Event Impl vm Impl requestID event f Thread Ref Thread Reference Impl read target data In Stream event f Reference Type Reference Type Impl read With Type Tag And Signature target false data In Stream target read Int class status Reference Type Impl class Status Strings data In Stream NON NLS 1 return event  EventImpl ClassPrepareEventImpl MirrorImpl DataInputStream dataInStream IOException VirtualMachineImpl vmImpl virtualMachineImpl ClassPrepareEventImpl ClassPrepareEventImpl vmImpl fThreadRef ThreadReferenceImpl dataInStream fReferenceType ReferenceTypeImpl readWithTypeTagAndSignature dataInStream readInt ReferenceTypeImpl classStatusStrings dataInStream
return Returns the reference type for which this event was generated public Reference Type reference Type return f Reference Type  ReferenceType referenceType fReferenceType
return Returns the JNI style signature of the class that has been unloaded public String class Signature return reference Type signature  classSignature referenceType

Creates new Class Unload Event Impl private Class Unload Event Impl Virtual Machine Impl vm Impl RequestID requestID super Class Unload Event vm Impl requestID NON NLS 1  ClassUnloadEventImpl ClassUnloadEventImpl VirtualMachineImpl vmImpl ClassUnloadEvent vmImpl
return Creates reads and returns new Event Impl of which requestID has already been read public static Class Unload Event Impl read Mirror Impl target RequestID requestID Data Input Stream data In Stream throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Class Unload Event Impl event new Class Unload Event Impl vm Impl requestID event f Signature target read String signature data In Stream NON NLS 1 Remove the class from classes that are known by the application to be loaded in the VM vm Impl remove Known Ref Type event f Signature return event  EventImpl ClassUnloadEventImpl MirrorImpl DataInputStream dataInStream IOException VirtualMachineImpl vmImpl virtualMachineImpl ClassUnloadEventImpl ClassUnloadEventImpl vmImpl fSignature readString dataInStream vmImpl removeKnownRefType fSignature
return Returns the name of the class that has been unloaded public String class Name return Generic Signature signature To Name f Signature  className GenericSignature signatureToName fSignature
return Returns the JNI style signature of the class that has been unloaded public String class Signature return f Signature  classSignature fSignature

Creates new Event Impl only used by subclasses protected Event Impl String description Virtual Machine Impl vm Impl RequestID requestID super description vm Impl f RequestID requestID  EventImpl EventImpl VirtualMachineImpl vmImpl vmImpl fRequestID
return Returns Thread Reference of thread that generated this event public Thread Reference thread return f Thread Ref  ThreadReference ThreadReference fThreadRef
return Returns requestID public RequestID requestID return f RequestID  fRequestID
return Returns string representation public String to String return super to String f RequestID NON NLS 1  toString toString fRequestID
return Creates reads and returns new Event Impl public static Event Impl read Mirror Impl target Data Input Stream data In Stream throws IO Exception byte event Kind target read Byte event kind event Kind Map data In Stream NON NLS 1 RequestID requestID RequestID read target data In Stream Create read and return Event of event Kind Event Impl result switch event Kind case 0 return null case Access Watchpoint Event Impl EVENT KIND result Access Watchpoint Event Impl read target requestID data In Stream break case Breakpoint Event Impl EVENT KIND result Breakpoint Event Impl read target requestID data In Stream break case Class Prepare Event Impl EVENT KIND result Class Prepare Event Impl read target requestID data In Stream break case Class Unload Event Impl EVENT KIND result Class Unload Event Impl read target requestID data In Stream break case Exception Event Impl EVENT KIND result Exception Event Impl read target requestID data In Stream break case Method Entry Event Impl EVENT KIND result Method Entry Event Impl read target requestID data In Stream break case Method Exit Event Impl EVENT KIND result Method Exit Event Impl read target requestID data In Stream break case Modification Watchpoint Event Impl EVENT KIND result Modification Watchpoint Event Impl read target requestID data In Stream break case Step Event Impl EVENT KIND result Step Event Impl read target requestID data In Stream break case Thread Death Event Impl EVENT KIND result Thread Death Event Impl read target requestID data In Stream break case Thread Start Event Impl EVENT KIND result Thread Start Event Impl read target requestID data In Stream break case VM Death Event Impl EVENT KIND result VM Death Event Impl read target requestID data In Stream break case VM Disconnect Event Impl EVENT KIND result VM Disconnect Event Impl read target requestID data In Stream break case VM Start Event Impl EVENT KIND result VM Start Event Impl read target requestID data In Stream break default throw new IO Exception Event Messages get String Event Impl Read invalid EventKind   1 event Kind NON NLS 1 Find and store original request if requestID is Null result f Request target virtual Machine Impl event Request Manager Impl find Request result return result  EventImpl EventImpl MirrorImpl DataInputStream dataInStream IOException eventKind readByte eventKindMap dataInStream dataInStream eventKind EventImpl eventKind AccessWatchpointEventImpl EVENT_KIND AccessWatchpointEventImpl dataInStream BreakpointEventImpl EVENT_KIND BreakpointEventImpl dataInStream ClassPrepareEventImpl EVENT_KIND ClassPrepareEventImpl dataInStream ClassUnloadEventImpl EVENT_KIND ClassUnloadEventImpl dataInStream ExceptionEventImpl EVENT_KIND ExceptionEventImpl dataInStream MethodEntryEventImpl EVENT_KIND MethodEntryEventImpl dataInStream MethodExitEventImpl EVENT_KIND MethodExitEventImpl dataInStream ModificationWatchpointEventImpl EVENT_KIND ModificationWatchpointEventImpl dataInStream StepEventImpl EVENT_KIND StepEventImpl dataInStream ThreadDeathEventImpl EVENT_KIND ThreadDeathEventImpl dataInStream ThreadStartEventImpl EVENT_KIND ThreadStartEventImpl dataInStream VMDeathEventImpl EVENT_KIND VMDeathEventImpl dataInStream VMDisconnectEventImpl EVENT_KIND VMDisconnectEventImpl dataInStream VMStartEventImpl EVENT_KIND VMStartEventImpl dataInStream IOException EventMessages getString EventImpl Read_invalid_EventKind___1 eventKind isNull fRequest virtualMachineImpl eventRequestManagerImpl findRequest
return Returns Event Request that caused this event to be generated by the Virtual Machine public Event Request request return f Request  EventRequest EventRequest fRequest
Retrieves constant mappings public static void get Constant Maps if f Event Kind Map null return java lang reflect Field fields Event Impl class get Declared Fields f Event Kind Map new Hash Map for int i 0 i fields length i java lang reflect Field field fields i if field get Modifiers java lang reflect Modifier PUBLIC 0 field get Modifiers java lang reflect Modifier STATIC 0 field get Modifiers java lang reflect Modifier FINAL 0 continue try String name field get Name Integer int Value new Integer field get Int null if name starts With EVENT  NON NLS 1 name name substring 6 f Event Kind Map put int Value name catch Illegal Access Exception e Will not occur for own class catch Illegal Argument Exception e Should not occur We should take care that all public static final constants in this class are numbers that are convertible to int  getConstantMaps fEventKindMap EventImpl getDeclaredFields fEventKindMap HashMap getModifiers getModifiers getModifiers getName intValue getInt startsWith EVENT_ fEventKindMap intValue IllegalAccessException IllegalArgumentException
return Returns a map with string representations of tags public static Map event Kind Map get Constant Maps return f Event Kind Map  eventKindMap getConstantMaps fEventKindMap

Creates new Event Iterator Impl public Event Iterator Impl List Iterator iter f Iterator iter  EventIteratorImpl EventIteratorImpl ListIterator fIterator
return Returns next Event from Event Set public Event next Event return Event f Iterator next  EventSet nextEvent fIterator
see java util Iterator has Next public boolean has Next return f Iterator has Next  hasNext hasNext fIterator hasNext
see java util Iterator next public Object next return f Iterator next  fIterator
see java util Iterator remove exception Unsupported Operation Exception always thrown since Event Sets are unmodifiable public void remove throw new Unsupported Operation Exception Event Messages get String Event Iterator Impl EventSets are unmodifiable 1 NON NLS 1  UnsupportedOperationException EventSets UnsupportedOperationException EventMessages getString EventIteratorImpl EventSets_are_unmodifiable_1

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Event Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME EventMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Creates new Event Queue Impl public Event Queue Impl Virtual Machine Impl vm Impl super Event Queue vm Impl NON NLS 1  EventQueueImpl EventQueueImpl VirtualMachineImpl vmImpl EventQueue vmImpl
return Returns next Event Set from Virtual Machine public Event Set remove throws Interrupted Exception return remove Packet Receive Manager TIMEOUT INFINITE  EventSet EventSet InterruptedException PacketReceiveManager TIMEOUT_INFINITE
public Event Set remove long timeout throws Interrupted Exception Return a received Event Set or null if no Event Set is received in time Note that handled Jdwp Event Set is not don in a finally clause because it must also be done when an empty set is read i e a set composed of internal events only try We remove elements from event sets that are generated from inside therefore the set may become empty Event Set Impl set do Jdwp Command Packet packet get CommandVM Jdwp Command Packet E COMPOSITE timeout init Jdwp Event Set packet set Event Set Impl read this packet data In Stream handled Jdwp Event Set while set is Empty return set catch Timeout Exception e Timeout in get Command JDI spec says return null handled Jdwp Event Set return null catch IO Exception e This means the already received data is invalid handled Jdwp Event Set defaultIO Exception Handler e return null catch VM Disconnected Exception e JDI spec says that a VM Disconnected Exception must always be preceeded by a VM Disconnect Event handled Jdwp Event Set if genereatedVM Disconnect Event genereatedVM Disconnect Event true return new Event Set Impl virtual Machine Impl new VM Disconnect Event Impl virtual Machine Impl RequestID nullID else throw e  EventSet InterruptedException EventSet EventSet handledJdwpEventSet EventSetImpl JdwpCommandPacket getCommandVM JdwpCommandPacket E_COMPOSITE initJdwpEventSet EventSetImpl dataInStream handledJdwpEventSet isEmpty TimeoutException getCommand handledJdwpEventSet IOException handledJdwpEventSet defaultIOExceptionHandler VMDisconnectedException VMDisconnectedException VMDisconnectEvent handledJdwpEventSet genereatedVMDisconnectEvent genereatedVMDisconnectEvent EventSetImpl virtualMachineImpl VMDisconnectEventImpl virtualMachineImpl

Creates new Event Set Impl private Event Set Impl Virtual Machine Impl vm Impl super Event Set vm Impl NON NLS 1  EventSetImpl EventSetImpl VirtualMachineImpl vmImpl EventSet vmImpl
Creates new Event Set Impl with events in a given array public Event Set Impl Virtual Machine Impl vm Impl Event Impl events this vm Impl f Events new Array List events length for int i 0 i events length i f Events add events i  EventSetImpl EventSetImpl VirtualMachineImpl vmImpl EventImpl vmImpl fEvents ArrayList fEvents
Creates new Event Set Impl with given event public Event Set Impl Virtual Machine Impl vm Impl Event Impl event this vm Impl f Events new Array List 1 f Events add event  EventSetImpl EventSetImpl VirtualMachineImpl vmImpl EventImpl vmImpl fEvents ArrayList fEvents
return Returns iterator over events public Event Iterator event Iterator return new Event Iterator Impl f Events list Iterator  EventIterator eventIterator EventIteratorImpl fEvents listIterator
return Returns which threads were suspended by this composite event public int suspend Policy switch f Suspend Policy case Event Request Impl SUSPENDPOL NONE JDWP return Event Request SUSPEND NONE case Event Request Impl SUSPENDPOL EVENT THREAD JDWP return Event Request SUSPEND EVENT THREAD case Event Request Impl SUSPENDPOL ALL JDWP return Event Request SUSPEND ALL default throw new Internal Exception Event Messages get String Event Set Impl Invalid suspend policy encountered   1 f Suspend Policy NON NLS 1  suspendPolicy fSuspendPolicy EventRequestImpl SUSPENDPOL_NONE_JDWP EventRequest SUSPEND_NONE EventRequestImpl SUSPENDPOL_EVENT_THREAD_JDWP EventRequest SUSPEND_EVENT_THREAD EventRequestImpl SUSPENDPOL_ALL_JDWP EventRequest SUSPEND_ALL InternalException EventMessages getString EventSetImpl Invalid_suspend_policy_encountered___1 fSuspendPolicy
Resumes threads that were suspended by this event set public void resume switch f Suspend Policy case Event Request Impl SUSPENDPOL NONE JDWP break case Event Request Impl SUSPENDPOL EVENT THREAD JDWP resume Threads break case Event Request Impl SUSPENDPOL ALL JDWP virtual Machine Impl resume break default throw new Internal Exception Event Messages get String Event Set Impl Invalid suspend policy encountered   1 f Suspend Policy NON NLS 1  fSuspendPolicy EventRequestImpl SUSPENDPOL_NONE_JDWP EventRequestImpl SUSPENDPOL_EVENT_THREAD_JDWP resumeThreads EventRequestImpl SUSPENDPOL_ALL_JDWP virtualMachineImpl InternalException EventMessages getString EventSetImpl Invalid_suspend_policy_encountered___1 fSuspendPolicy
Resumes threads that were suspended by this event set private void resume Threads if f Events size 1 Most event sets have only one event Avoid expensive object creation Thread Reference ref Event Impl f Events get 0 thread if ref null ref resume else Event Impl f Events get 0 virtual Machine resume return Iterator iter f Events iterator List resumed Threads new Array List f Events size while iter has Next Event Impl event Event Impl iter next Thread Reference thread event thread if thread null event virtual Machine resume return if resumed Threads contains thread resumed Threads add thread Iterator resume Iter resumed Threads iterator while resume Iter has Next Thread Reference resume Iter next resume  resumeThreads fEvents ThreadReference EventImpl fEvents EventImpl fEvents virtualMachine fEvents resumedThreads ArrayList fEvents hasNext EventImpl EventImpl ThreadReference virtualMachine resumedThreads resumedThreads resumeIter resumedThreads resumeIter hasNext ThreadReference resumeIter
return Returns Event Set Impl that was read from Input Stream public static Event Set Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Event Set Impl event Set new Event Set Impl vm Impl Read suspend policy event Set f Suspend Policy target read Byte suspend Policy Event Request Impl suspend Policy Map in NON NLS 1 Read size int size target read Int size in NON NLS 1 Create event list event Set f Events new Array List size while size 0 Event Impl event Event Impl read target in If event null than it is an event that must not be given to the application See Class Prepare Event if event null continue Event Request Impl request Event Request Impl event request Check if the request corresponding to the event was not generated from inside this JDI implementation if request null request is Generated Inside event Set f Events add event return event Set  EventSetImpl InputStream EventSetImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl EventSetImpl eventSet EventSetImpl vmImpl eventSet fSuspendPolicy readByte suspendPolicy EventRequestImpl suspendPolicyMap readInt eventSet fEvents ArrayList EventImpl EventImpl ClassPrepareEvent EventRequestImpl EventRequestImpl isGeneratedInside eventSet fEvents eventSet
see java util Collection public boolean contains Object event return f Events contains event  fEvents
see java util Collection public boolean contains All Collection events return f Events contains All events  containsAll fEvents containsAll
see java util Collection public boolean equals Object object return object null object get Class equals this get Class f Events equals Event Set Impl object f Events  getClass getClass fEvents EventSetImpl fEvents
see java util Collection public int hash Code return f Events hash Code  hashCode fEvents hashCode
see java util Collection public boolean is Empty return f Events is Empty  isEmpty fEvents isEmpty
see java util Collection iterator public Iterator iterator return f Events iterator  fEvents
see java util Collection size public int size return f Events size  fEvents
see java util Collection to Array public Object to Array return f Events to Array  toArray toArray fEvents toArray
see java util Collection to Array Object public Object to Array Object events return f Events to Array events  toArray toArray fEvents toArray
see java util Collection add Object exception Unsupported Operation Exception always thrown since Event Sets are unmodifiable public boolean add Object arg1 throw new Unsupported Operation Exception Event Messages get String Event Set Impl EventSets are unmodifiable 3 NON NLS 1  UnsupportedOperationException EventSets UnsupportedOperationException EventMessages getString EventSetImpl EventSets_are_unmodifiable_3
see java util Collection add All Collection exception Unsupported Operation Exception always thrown since Event Sets are unmodifiable public boolean add All Collection arg1 throw new Unsupported Operation Exception Event Messages get String Event Set Impl EventSets are unmodifiable 3 NON NLS 1  addAll UnsupportedOperationException EventSets addAll UnsupportedOperationException EventMessages getString EventSetImpl EventSets_are_unmodifiable_3
see java util Collection clear exception Unsupported Operation Exception always thrown since Event Sets are unmodifiable public void clear throw new Unsupported Operation Exception Event Messages get String Event Set Impl EventSets are unmodifiable 3 NON NLS 1  UnsupportedOperationException EventSets UnsupportedOperationException EventMessages getString EventSetImpl EventSets_are_unmodifiable_3
see java util Collection remove Object exception Unsupported Operation Exception always thrown since Event Sets are unmodifiable public boolean remove Object arg1 throw new Unsupported Operation Exception Event Messages get String Event Set Impl EventSets are unmodifiable 3 NON NLS 1  UnsupportedOperationException EventSets UnsupportedOperationException EventMessages getString EventSetImpl EventSets_are_unmodifiable_3
see java util Collection remove All Collection exception Unsupported Operation Exception always thrown since Event Sets are unmodifiable public boolean remove All Collection arg1 throw new Unsupported Operation Exception Event Messages get String Event Set Impl EventSets are unmodifiable 3 NON NLS 1  removeAll UnsupportedOperationException EventSets removeAll UnsupportedOperationException EventMessages getString EventSetImpl EventSets_are_unmodifiable_3
see java util Collection retain All Collection exception Unsupported Operation Exception always thrown since Event Sets are unmodifiable public boolean retain All Collection arg1 throw new Unsupported Operation Exception Event Messages get String Event Set Impl EventSets are unmodifiable 3 NON NLS 1  retainAll UnsupportedOperationException EventSets retainAll UnsupportedOperationException EventMessages getString EventSetImpl EventSets_are_unmodifiable_3

Creates new Exception Event Impl private Exception Event Impl Virtual Machine Impl vm Impl RequestID requestID super Exception Event vm Impl requestID NON NLS 1  ExceptionEventImpl ExceptionEventImpl VirtualMachineImpl vmImpl ExceptionEvent vmImpl
return Creates reads and returns new Event Impl of which requestID has already been read public static Exception Event Impl read Mirror Impl target RequestID requestID Data Input Stream data In Stream throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Exception Event Impl event new Exception Event Impl vm Impl requestID event read Thread And Location target data In Stream event f Exception Object Reference Impl read Object Ref With Tag target data In Stream event f Catch Location Location Impl read target data In Stream return event  EventImpl ExceptionEventImpl MirrorImpl DataInputStream dataInStream IOException VirtualMachineImpl vmImpl virtualMachineImpl ExceptionEventImpl ExceptionEventImpl vmImpl readThreadAndLocation dataInStream fException ObjectReferenceImpl readObjectRefWithTag dataInStream fCatchLocation LocationImpl dataInStream
return Returns the location where the exception will be caught public Location catch Location return f Catch Location  catchLocation fCatchLocation
return Returns the thrown exception object public Object Reference exception return f Exception  ObjectReference fException

Creates new Locatable Event Impl only used by subclasses protected Locatable Event Impl String description Virtual Machine Impl vm Impl RequestID requestID super description vm Impl requestID  LocatableEventImpl LocatableEventImpl VirtualMachineImpl vmImpl vmImpl
Reads Thread and Location public void read Thread And Location Mirror Impl target Data Input Stream data In Stream throws IO Exception f Thread Ref Thread Reference Impl read target data In Stream f Location Location Impl read target data In Stream  readThreadAndLocation MirrorImpl DataInputStream dataInStream IOException fThreadRef ThreadReferenceImpl dataInStream fLocation LocationImpl dataInStream
return Returns Location where event occurred public Location location return f Location  fLocation

Creates new Method Entry Event Impl private Method Entry Event Impl Virtual Machine Impl vm Impl RequestID requestID super Method Entry Event vm Impl requestID NON NLS 1  MethodEntryEventImpl MethodEntryEventImpl VirtualMachineImpl vmImpl MethodEntryEvent vmImpl
return Creates reads and returns new Event Impl of which requestID has already been read public static Method Entry Event Impl read Mirror Impl target RequestID requestID Data Input Stream data In Stream throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Method Entry Event Impl event new Method Entry Event Impl vm Impl requestID event read Thread And Location target data In Stream return event  EventImpl MethodEntryEventImpl MirrorImpl DataInputStream dataInStream IOException VirtualMachineImpl vmImpl virtualMachineImpl MethodEntryEventImpl MethodEntryEventImpl vmImpl readThreadAndLocation dataInStream
return Returns the method that was entered public Method method return f Location method  fLocation

Creates new Method Exit Event Impl private Method Exit Event Impl Virtual Machine Impl vm Impl RequestID requestID super Method Exit Event vm Impl requestID NON NLS 1  MethodExitEventImpl MethodExitEventImpl VirtualMachineImpl vmImpl MethodExitEvent vmImpl
return Creates reads and returns new Event Impl of which requestID has already been read public static Method Exit Event Impl read Mirror Impl target RequestID requestID Data Input Stream data In Stream throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Method Exit Event Impl event new Method Exit Event Impl vm Impl requestID event read Thread And Location target data In Stream return event  EventImpl MethodExitEventImpl MirrorImpl DataInputStream dataInStream IOException VirtualMachineImpl vmImpl virtualMachineImpl MethodExitEventImpl MethodExitEventImpl vmImpl readThreadAndLocation dataInStream
return Returns the method that was entered public Method method return f Location method  fLocation

Creates new Modification Watchpoint Event Impl private Modification Watchpoint Event Impl Virtual Machine Impl vm Impl RequestID requestID super Modification Watchpoint Event vm Impl requestID NON NLS 1  ModificationWatchpointEventImpl ModificationWatchpointEventImpl VirtualMachineImpl vmImpl ModificationWatchpointEvent vmImpl
return Creates reads and returns new Event Impl of which requestID has already been read public static Watchpoint Event Impl read Mirror Impl target RequestID requestID Data Input Stream data In Stream throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Modification Watchpoint Event Impl event new Modification Watchpoint Event Impl vm Impl requestID event read Watchpoint Event Fields target data In Stream event f Value To Be Value Impl read With Tag target data In Stream return event  EventImpl WatchpointEventImpl MirrorImpl DataInputStream dataInStream IOException VirtualMachineImpl vmImpl virtualMachineImpl ModificationWatchpointEventImpl ModificationWatchpointEventImpl vmImpl readWatchpointEventFields dataInStream fValueToBe ValueImpl readWithTag dataInStream
return Returns value that will be assigned to the field when the instruction completes public Value value To Be return f Value To Be  valueToBe fValueToBe

Creates new Step Event Impl private Step Event Impl Virtual Machine Impl vm Impl RequestID requestID super Step Event vm Impl requestID NON NLS 1  StepEventImpl StepEventImpl VirtualMachineImpl vmImpl StepEvent vmImpl
return Creates reads and returns new Event Impl of which requestID has already been read public static Step Event Impl read Mirror Impl target RequestID requestID Data Input Stream data In Stream throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Step Event Impl event new Step Event Impl vm Impl requestID event read Thread And Location target data In Stream return event  EventImpl StepEventImpl MirrorImpl DataInputStream dataInStream IOException VirtualMachineImpl vmImpl virtualMachineImpl StepEventImpl StepEventImpl vmImpl readThreadAndLocation dataInStream

Creates new Thread Death Event Impl private Thread Death Event Impl Virtual Machine Impl vm Impl RequestID requestID super Thread Death Event vm Impl requestID NON NLS 1  ThreadDeathEventImpl ThreadDeathEventImpl VirtualMachineImpl vmImpl ThreadDeathEvent vmImpl
return Creates reads and returns new Event Impl of which requestID has already been read public static Thread Death Event Impl read Mirror Impl target RequestID requestID Data Input Stream data In Stream throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Thread Death Event Impl event new Thread Death Event Impl vm Impl requestID event f Thread Ref Thread Reference Impl read target data In Stream return event  EventImpl ThreadDeathEventImpl MirrorImpl DataInputStream dataInStream IOException VirtualMachineImpl vmImpl virtualMachineImpl ThreadDeathEventImpl ThreadDeathEventImpl vmImpl fThreadRef ThreadReferenceImpl dataInStream

Creates new Thread Death Event Impl private Thread Start Event Impl Virtual Machine Impl vm Impl RequestID requestID super Thread Start Event vm Impl requestID NON NLS 1  ThreadDeathEventImpl ThreadStartEventImpl VirtualMachineImpl vmImpl ThreadStartEvent vmImpl
return Creates reads and returns new Event Impl of which requestID has already been read public static Thread Start Event Impl read Mirror Impl target RequestID requestID Data Input Stream data In Stream throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Thread Start Event Impl event new Thread Start Event Impl vm Impl requestID event f Thread Ref Thread Reference Impl read target data In Stream return event  EventImpl ThreadStartEventImpl MirrorImpl DataInputStream dataInStream IOException VirtualMachineImpl vmImpl virtualMachineImpl ThreadStartEventImpl ThreadStartEventImpl vmImpl fThreadRef ThreadReferenceImpl dataInStream

Creates new VM Death Event Impl public VM Death Event Impl Virtual Machine Impl vm Impl RequestID requestID super VM Death Event vm Impl requestID NON NLS 1  VMDeathEventImpl VMDeathEventImpl VirtualMachineImpl vmImpl VMDeathEvent vmImpl
return Creates reads and returns new Event Impl of which requestID has already been read public static VM Death Event Impl read Mirror Impl target RequestID requestID Data Input Stream data In Stream Virtual Machine Impl vm Impl target virtual Machine Impl VM Death Event Impl event new VM Death Event Impl vm Impl requestID return event  EventImpl VMDeathEventImpl MirrorImpl DataInputStream dataInStream VirtualMachineImpl vmImpl virtualMachineImpl VMDeathEventImpl VMDeathEventImpl vmImpl

Creates new VM Disconnect Event Impl public VM Disconnect Event Impl Virtual Machine Impl vm Impl RequestID requestID super VM Disconnect Event vm Impl requestID NON NLS 1  VMDisconnectEventImpl VMDisconnectEventImpl VirtualMachineImpl vmImpl VMDisconnectEvent vmImpl
return Creates reads and returns new Event Impl of which requestID has already been read public static VM Disconnect Event Impl read Mirror Impl target RequestID requestID Data Input Stream data In Stream Virtual Machine Impl vm Impl target virtual Machine Impl VM Disconnect Event Impl event new VM Disconnect Event Impl vm Impl requestID return event  EventImpl VMDisconnectEventImpl MirrorImpl DataInputStream dataInStream VirtualMachineImpl vmImpl virtualMachineImpl VMDisconnectEventImpl VMDisconnectEventImpl vmImpl

Creates new VM Start Event Impl private VM Start Event Impl Virtual Machine Impl vm Impl RequestID requestID super VM Start Event vm Impl requestID NON NLS 1  VMStartEventImpl VMStartEventImpl VirtualMachineImpl vmImpl VMStartEvent vmImpl
return Creates reads and returns new Event Impl of which requestID has already been read public static VM Start Event Impl read Mirror Impl target RequestID requestID Data Input Stream data In Stream throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl VM Start Event Impl event new VM Start Event Impl vm Impl requestID event f Thread Ref Thread Reference Impl read target data In Stream return event  EventImpl VMStartEventImpl MirrorImpl DataInputStream dataInStream IOException VirtualMachineImpl vmImpl virtualMachineImpl VMStartEventImpl VMStartEventImpl vmImpl fThreadRef ThreadReferenceImpl dataInStream

Creates new Watchpoint Event Impl protected Watchpoint Event Impl String description Virtual Machine Impl vm Impl RequestID requestID super description vm Impl requestID  WatchpointEventImpl WatchpointEventImpl VirtualMachineImpl vmImpl vmImpl
return Creates reads and returns new Event Impl of which requestID has already been read public void read Watchpoint Event Fields Mirror Impl target Data Input Stream data In Stream throws IO Exception read Thread And Location target data In Stream f Field Field Impl read With Reference Type With Tag target data In Stream f Object Reference Object Reference Impl read Object Ref With Tag target data In Stream  EventImpl readWatchpointEventFields MirrorImpl DataInputStream dataInStream IOException readThreadAndLocation dataInStream fField FieldImpl readWithReferenceTypeWithTag dataInStream fObjectReference ObjectReferenceImpl readObjectRefWithTag dataInStream
Returns the field that is about to be accessed modified public Field field return f Field  fField
Returns the object whose field is about to be accessed modified public Object Reference object return f Object Reference  ObjectReference fObjectReference
Current value of the field public Value value Current Note if field is static f Object Reference will be null if f Object Reference null return f Field declaring Type get Value f Field return f Object Reference get Value f Field  valueCurrent fObjectReference fObjectReference fField declaringType getValue fField fObjectReference getValue fField

Creates new Field Impl public Field Impl Virtual Machine Impl vm Impl Reference Type Impl declaring Type Jdwp FieldID ID String name String signature String generic Signature int modifier Bits super Field vm Impl declaring Type name signature generic Signature modifier Bits NON NLS 1 f FieldID ID  FieldImpl FieldImpl VirtualMachineImpl vmImpl ReferenceTypeImpl declaringType JdwpFieldID genericSignature modifierBits vmImpl declaringType genericSignature modifierBits fFieldID
Flushes all stored Jdwp results public void flush Stored Jdwp Results Note that no results are cached  flushStoredJdwpResults
return Returns fieldID of field public Jdwp FieldID get FieldID return f FieldID  JdwpFieldID getFieldID fFieldID
return Returns true if two mirrors refer to the same entity in the target VM see java lang Object equals Object public boolean equals Object object return object null object get Class equals this get Class f FieldID equals Field Impl object f FieldID reference Type Impl equals Field Impl object reference Type Impl  getClass getClass fFieldID FieldImpl fFieldID referenceTypeImpl FieldImpl referenceTypeImpl
return Returns a negative integer zero or a positive integer as this object is less than equal to or greater than the specified object public int compare To Object object if object null object get Class equals this get Class throw new Class Cast Exception JDI Messages get String Field Impl Can  t compare field to given object 1 NON NLS 1 See if declaring types are the same if not return comparison between declaring types Field type2 Field object if declaring Type equals type2 declaring Type return declaring Type compare To type2 declaring Type Return comparison of position within declaring type int index1 declaring Type fields index Of this int index2 type2 declaring Type fields index Of type2 if index1 index2 return 1 else if index1 index2 return 1 else return 0  compareTo getClass getClass ClassCastException JDIMessages getString FieldImpl Can__t_compare_field_to_given_object_1 declaringType declaringType declaringType compareTo declaringType declaringType indexOf declaringType indexOf
return Returns the hash code value public int hash Code return f FieldID hash Code  hashCode fFieldID hashCode
return Returns a text representation of the declared type public String type Name String signature generic Signature if signature null signature signature return Generic Signature signature To Name signature  typeName genericSignature GenericSignature signatureToName
return Returns the type of the this Field public Type type throws Class Not Loaded Exception return Type Impl create virtual Machine Impl signature declaring Type class Loader  ClassNotLoadedException TypeImpl virtualMachineImpl declaringType classLoader
return Returns true if object is transient public boolean is Transient return f Modifier Bits MODIFIER ACC TRANSIENT 0  isTransient fModifierBits MODIFIER_ACC_TRANSIENT
return Returns true if object is volitile public boolean is Volatile return f Modifier Bits MODIFIER ACC VOLITILE 0  isVolatile fModifierBits MODIFIER_ACC_VOLITILE
Writes JDWP representation public void write Mirror Impl target Data Output Stream out throws IO Exception f FieldID write out if target f Verbose Writer null target f Verbose Writer println field f FieldID value NON NLS 1  MirrorImpl DataOutputStream IOException fFieldID fVerboseWriter fVerboseWriter fFieldID
Writes JDWP representation including Reference Type public void write With Reference Type Mirror Impl target Data Output Stream out throws IO Exception See Event Request case Field Only reference Type Impl write target out write target out  ReferenceType writeWithReferenceType MirrorImpl DataOutputStream IOException EventRequest FieldOnly referenceTypeImpl
return Reads JDWP representation and returns new instance public static Field Impl read With Reference Type With Tag Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl See Events FIELD ACCESS and FIELD MODIFICATION ref Type Tag typeID fieldID Reference Type Impl reference Type Reference Type Impl read With Type Tag target in if reference Type null return null Jdwp FieldID ID new Jdwp FieldID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println field ID value NON NLS 1 if ID is Null return null Field Impl field reference Type find Field ID if field null throw new Internal Error JDI Messages get String Field Impl Got FieldID of ReferenceType that is not a member of the ReferenceType 2 NON NLS 1 return field  FieldImpl readWithReferenceTypeWithTag MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl FIELD_ACCESS FIELD_MODIFICATION refTypeTag ReferenceTypeImpl referenceType ReferenceTypeImpl readWithTypeTag referenceType JdwpFieldID JdwpFieldID vmImpl fVerboseWriter fVerboseWriter isNull FieldImpl referenceType findField InternalError JDIMessages getString FieldImpl Got_FieldID_of_ReferenceType_that_is_not_a_member_of_the_ReferenceType_2
return Reads JDWP representation and returns new instance public static Field Impl read With Name Signature Modifiers Reference Type Impl target Reference Type Impl reference Type boolean with Generic Signature Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp FieldID ID new Jdwp FieldID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println field ID value NON NLS 1 if ID is Null return null String name target read String name in NON NLS 1 String signature target read String signature in NON NLS 1 String generic Signature null if with Generic Signature generic Signature target read String generic signature in NON NLS 1 if equals generic Signature NON NLS 1 generic Signature null int modifier Bits target read Int modifiers Accessible Impl get Modifier Strings in NON NLS 1 Field Impl mirror new Field Impl vm Impl reference Type ID name signature generic Signature modifier Bits return mirror  FieldImpl readWithNameSignatureModifiers ReferenceTypeImpl ReferenceTypeImpl referenceType withGenericSignature DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpFieldID JdwpFieldID vmImpl fVerboseWriter fVerboseWriter isNull readString readString genericSignature withGenericSignature genericSignature readString genericSignature genericSignature modifierBits readInt AccessibleImpl getModifierStrings FieldImpl FieldImpl vmImpl referenceType genericSignature modifierBits
public boolean is Enum Constant return f Modifier Bits MODIFIER ACC ENUM 0  isEnumConstant fModifierBits MODIFIER_ACC_ENUM

public class Float Type Impl extends Primitive Type Impl implements Float Type Creates new instance public Float Type Impl Virtual Machine Impl vm Impl super Float Type vm Impl float F NON NLS 1 NON NLS 2 NON NLS 3  FloatTypeImpl PrimitiveTypeImpl FloatType FloatTypeImpl VirtualMachineImpl vmImpl FloatType vmImpl
returns primitive type tag public byte tag return Float Value Impl tag  FloatValueImpl
return Create a null value instance of the type public Value create Null Value return virtual Machine Impl mirror Of 0 0f  createNullValue virtualMachineImpl mirrorOf

Creates new instance public Float Value Impl Virtual Machine Impl vm Impl Float value super Float Value vm Impl value NON NLS 1  FloatValueImpl VirtualMachineImpl vmImpl FloatValue vmImpl
returns tag public byte get Tag return tag  getTag
returns type of value public Type type return virtual Machine Impl get Float Type  virtualMachineImpl getFloatType
returns Value public float value return float Value  floatValue
return Reads and returns new instance public static Float Value Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl float value target read Float float Value in NON NLS 1 return new Float Value Impl vm Impl new Float value  FloatValueImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl readFloat floatValue FloatValueImpl vmImpl
Writes value without value tag public void write Mirror Impl target Data Output Stream out throws IO Exception target write Float Float f Value float Value float Value out NON NLS 1  MirrorImpl DataOutputStream IOException writeFloat fValue floatValue floatValue

public static String get Return Type String method Signature int parameters End method Signature last Index Of C PARAMETERS END if parameters End 1 throw new Illegal Argument Exception int exception Start method Signature index Of C EXCEPTION START parameters End 1 if exception Start 1 return method Signature substring parameters End 1 else return method Signature substring parameters End 1 exception Start  getReturnType methodSignature parametersEnd methodSignature lastIndexOf C_PARAMETERS_END parametersEnd IllegalArgumentException exceptionStart methodSignature indexOf C_EXCEPTION_START parametersEnd exceptionStart methodSignature parametersEnd methodSignature parametersEnd exceptionStart
public static List get Arguments Signature String method Signature int parameter Start method Signature index Of C PARAMETERS START int parameters End method Signature last Index Of C PARAMETERS END if parameter Start 1 parameters End 1 throw new Illegal Argument Exception return get Type Signature List method Signature substring parameter Start 1 parameters End  getArgumentsSignature methodSignature parameterStart methodSignature indexOf C_PARAMETERS_START parametersEnd methodSignature lastIndexOf C_PARAMETERS_END parameterStart parametersEnd IllegalArgumentException getTypeSignatureList methodSignature parameterStart parametersEnd
public static List get Type Parameters String generic Class Signature List parameters new Array List if generic Class Signature char At 0 C TYPE PARAMETERS START int pos 1 while generic Class Signature char At pos C TYPE PARAMETERS END int ident End generic Class Signature index Of C TYPE PARAMETERS COLON pos parameters add generic Class Signature substring pos ident End pos ident End 1 jump class bound can be empty if generic Class Signature char At pos C TYPE PARAMETERS COLON pos next Type Signature Length generic Class Signature pos jump interface bounds while generic Class Signature char At pos C TYPE PARAMETERS COLON pos next Type Signature Length generic Class Signature pos return parameters  getTypeParameters genericClassSignature ArrayList genericClassSignature charAt C_TYPE_PARAMETERS_START genericClassSignature charAt C_TYPE_PARAMETERS_END identEnd genericClassSignature indexOf C_TYPE_PARAMETERS_COLON genericClassSignature identEnd identEnd genericClassSignature charAt C_TYPE_PARAMETERS_COLON nextTypeSignatureLength genericClassSignature genericClassSignature charAt C_TYPE_PARAMETERS_COLON nextTypeSignatureLength genericClassSignature
public static String signature To Name String type Signature String name null char char0 type Signature char At 0 int length type Signature length switch char0 case C BOOLEAN check Length type Signature 1 name boolean NON NLS 1 break case C BYTE check Length type Signature 1 name byte NON NLS 1 break case C CHAR check Length type Signature 1 name char NON NLS 1 break case C SHORT check Length type Signature 1 name short NON NLS 1 break case C DOUBLE check Length type Signature 1 name double NON NLS 1 break case C FLOAT check Length type Signature 1 name float NON NLS 1 break case C INT check Length type Signature 1 name int NON NLS 1 break case C LONG check Length type Signature 1 name long NON NLS 1 break case C VOID check Length type Signature 1 name void NON NLS 1 break case C ARRAY name signature To Name type Signature substring 1 NON NLS 1 break case C WILDCARD PLUS name extends signature To Name type Signature substring 1 NON NLS 1 break case C WILDCARD MINUS name super signature To Name type Signature substring 1 NON NLS 1 break case C CLASS TYPE check Char type Signature length 1 C TYPE END int argument Start type Signature index Of C TYPE ARGUMENTS START 1 if argument Start 1 check Char type Signature length 2 C TYPE ARGUMENTS END name type Signature substring 1 argument Start replace C TYPE ARGUMENTS START name List To String list Signatureto List Name get Type Signature List type Signature substring argument Start 1 length 2 C TYPE ARGUMENTS END else name type Signature substring 1 length 1 replace break case C TYPE VARIABLE check Char type Signature length 1 C TYPE END name type Signature substring 1 length 1 break default throw new Illegal Argument Exception return name  signatureToName typeSignature typeSignature charAt typeSignature C_BOOLEAN checkLength typeSignature C_BYTE checkLength typeSignature C_CHAR checkLength typeSignature C_SHORT checkLength typeSignature C_DOUBLE checkLength typeSignature C_FLOAT checkLength typeSignature C_INT checkLength typeSignature C_LONG checkLength typeSignature C_VOID checkLength typeSignature C_ARRAY signatureToName typeSignature C_WILDCARD_PLUS signatureToName typeSignature C_WILDCARD_MINUS signatureToName typeSignature C_CLASS_TYPE checkChar typeSignature C_TYPE_END argumentStart typeSignature indexOf C_TYPE_ARGUMENTS_START argumentStart checkChar typeSignature C_TYPE_ARGUMENTS_END typeSignature argumentStart C_TYPE_ARGUMENTS_START nameListToString listSignaturetoListName getTypeSignatureList typeSignature argumentStart C_TYPE_ARGUMENTS_END typeSignature C_TYPE_VARIABLE checkChar typeSignature C_TYPE_END typeSignature IllegalArgumentException
public static String name List To String List names String Buffer string new String Buffer Iterator iterator names iterator if iterator has Next string append iterator next while iterator has Next string append append iterator next return string to String  nameListToString StringBuffer StringBuffer hasNext hasNext toString
public static List list Signatureto List Name List signatures List names new Array List signatures size for Iterator iterator signatures iterator iterator has Next names add signature To Name String iterator next return names  listSignaturetoListName ArrayList hasNext signatureToName
private static List get Type Signature List String type Signature List List list new Array List int pos 0 while pos type Signature List length int signature Length next Type Signature Length type Signature List pos list add type Signature List substring pos pos signature Length return list  getTypeSignatureList typeSignatureList ArrayList typeSignatureList signatureLength nextTypeSignatureLength typeSignatureList typeSignatureList signatureLength
private static int next Type Signature Length String signature int start Pos int inclusion Level 0 for int i start Pos length signature length i length i if inclusion Level 0 switch signature char At i case C CLASS TYPE case C TYPE VARIABLE case C WILDCARD PLUS case C WILDCARD MINUS inclusion Level 1 break case C ARRAY break default return i start Pos 1 else switch signature char At i case C TYPE END if inclusion Level 1 return i start Pos 1 break case C TYPE ARGUMENTS START inclusion Level break case C TYPE ARGUMENTS END inclusion Level break throw new Illegal Argument Exception  nextTypeSignatureLength startPos inclusionLevel startPos inclusionLevel charAt C_CLASS_TYPE C_TYPE_VARIABLE C_WILDCARD_PLUS C_WILDCARD_MINUS inclusionLevel C_ARRAY startPos charAt C_TYPE_END inclusionLevel startPos C_TYPE_ARGUMENTS_START inclusionLevel C_TYPE_ARGUMENTS_END inclusionLevel IllegalArgumentException
private static void check Char String string int index char character if string char At index character throw new Illegal Argument Exception  checkChar charAt IllegalArgumentException
private static void check Length String string int length if string length length throw new Illegal Argument Exception  checkLength IllegalArgumentException
returns Returns true if signature is a class signature public static boolean is Class Signature String signature return signature char At 0 C CLASS TYPE  isClassSignature charAt C_CLASS_TYPE
returns Returns true if signature is an array signature public static boolean is Array Signature String signature return signature char At 0 C ARRAY  isArraySignature charAt C_ARRAY
returns Returns true if signature is an primitive signature public static boolean is Primitive Signature String signature switch signature char At 0 case C BOOLEAN case C BYTE case C CHAR case C SHORT case C INT case C LONG case C FLOAT case C DOUBLE return true default return false  isPrimitiveSignature charAt C_BOOLEAN C_BYTE C_CHAR C_SHORT C_INT C_LONG C_FLOAT C_DOUBLE
returns Returns true if signature is void signature public static boolean is Void Signature String signature return signature char At 0 C VOID  isVoidSignature charAt C_VOID

public class Integer Type Impl extends Primitive Type Impl implements Integer Type Creates new instance public Integer Type Impl Virtual Machine Impl vm Impl super Integer Type vm Impl int I NON NLS 1 NON NLS 2 NON NLS 3  IntegerTypeImpl PrimitiveTypeImpl IntegerType IntegerTypeImpl VirtualMachineImpl vmImpl IntegerType vmImpl
returns primitive type tag public byte tag return Integer Value Impl tag  IntegerValueImpl
return Create a null value instance of the type public Value create Null Value return virtual Machine Impl mirror Of 0  createNullValue virtualMachineImpl mirrorOf

Creates new instance public Integer Value Impl Virtual Machine Impl vm Impl Integer value super Integer Value vm Impl value NON NLS 1  IntegerValueImpl VirtualMachineImpl vmImpl IntegerValue vmImpl
returns tag public byte get Tag return tag  getTag
returns type of value public Type type return virtual Machine Impl get Integer Type  virtualMachineImpl getIntegerType
returns Value public int value return int Value  intValue
return Reads and returns new instance public static Integer Value Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl int value target read Int integer Value in NON NLS 1 return new Integer Value Impl vm Impl new Integer value  IntegerValueImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl readInt integerValue IntegerValueImpl vmImpl
Writes value without value tag public void write Mirror Impl target Data Output Stream out throws IO Exception target write Int Integer f Value int Value int Value out NON NLS 1  MirrorImpl DataOutputStream IOException writeInt fValue intValue intValue

Creates new Interface Type Impl public Interface Type Impl Virtual Machine Impl vm Impl Jdwp InterfaceID interfaceID super Interface Type vm Impl interfaceID NON NLS 1  InterfaceTypeImpl InterfaceTypeImpl VirtualMachineImpl vmImpl JdwpInterfaceID InterfaceType vmImpl
Creates new Interface Type Impl public Interface Type Impl Virtual Machine Impl vm Impl Jdwp InterfaceID interfaceID String signature String generic Signature super Interface Type vm Impl interfaceID signature generic Signature NON NLS 1  InterfaceTypeImpl InterfaceTypeImpl VirtualMachineImpl vmImpl JdwpInterfaceID genericSignature InterfaceType vmImpl genericSignature
return Create a null value instance of the type public Value create Null Value return new Class Object Reference Impl virtual Machine Impl new Jdwp Class ObjectID virtual Machine Impl  createNullValue ClassObjectReferenceImpl virtualMachineImpl JdwpClassObjectID virtualMachineImpl
return Returns type tag public byte type Tag return type Tag  typeTag typeTag
Flushes all stored Jdwp results public void flush Stored Jdwp Results super flush Stored Jdwp Results For all reftypes that have this interface cached this cache must be undone Iterator itr virtual Machine Impl all Cached Ref Types while itr has Next Reference Type Impl ref Type Reference Type Impl itr next if ref Type f Interfaces null ref Type f Interfaces contains this ref Type flush Stored Jdwp Results  flushStoredJdwpResults flushStoredJdwpResults virtualMachineImpl allCachedRefTypes hasNext ReferenceTypeImpl refType ReferenceTypeImpl refType fInterfaces refType fInterfaces refType flushStoredJdwpResults
return Returns the currently prepared classes which directly implement this interface public List implementors Note that this information should not be cached List implementors new Array List Iterator itr virtual Machine Impl all Ref Types while itr has Next Reference Type Impl ref Type Reference Type Impl itr next if ref Type instanceof Class Type Impl try Class Type Impl class Type Class Type Impl ref Type List interfaces class Type interfaces if interfaces contains this implementors add class Type catch Class Not Prepared Exception e continue return implementors  ArrayList virtualMachineImpl allRefTypes hasNext ReferenceTypeImpl refType ReferenceTypeImpl refType ClassTypeImpl ClassTypeImpl classType ClassTypeImpl refType classType classType ClassNotPreparedException
return Returns the currently prepared interfaces which directly extend this interface public List subinterfaces Note that this information should not be cached List implementors new Array List Iterator itr virtual Machine Impl all Ref Types while itr has Next try Reference Type Impl ref Type Reference Type Impl itr next if ref Type instanceof Interface Type Impl Interface Type Impl inter Face Type Interface Type Impl ref Type List interfaces inter Face Type superinterfaces if interfaces contains this implementors add inter Face Type catch Class Not Prepared Exception e continue return implementors  ArrayList virtualMachineImpl allRefTypes hasNext ReferenceTypeImpl refType ReferenceTypeImpl refType InterfaceTypeImpl InterfaceTypeImpl interFaceType InterfaceTypeImpl refType interFaceType interFaceType ClassNotPreparedException
return Returns the interfaces directly extended by this interface public List superinterfaces return interfaces 
return Returns true if this type has been initialized public boolean is Initialized return is Prepared  isInitialized isPrepared
return Reads ID and returns known Reference Type Impl with that ID or if ID is unknown a newly created Reference Type Impl public static Interface Type Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp InterfaceID ID new Jdwp InterfaceID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println interface Type ID value NON NLS 1 if ID is Null return null Interface Type Impl mirror Interface Type Impl vm Impl get Cached Mirror ID if mirror null mirror new Interface Type Impl vm Impl ID vm Impl add Cached Mirror mirror return mirror  ReferenceTypeImpl ReferenceTypeImpl InterfaceTypeImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpInterfaceID JdwpInterfaceID vmImpl fVerboseWriter fVerboseWriter interfaceType isNull InterfaceTypeImpl InterfaceTypeImpl vmImpl getCachedMirror InterfaceTypeImpl vmImpl vmImpl addCachedMirror
return Reads ID and returns known Reference Type Impl with that ID or if ID is unknown a newly created Reference Type Impl public static Interface Type Impl read With Signature Mirror Impl target boolean with Generic Signature Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp InterfaceID ID new Jdwp InterfaceID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println interface Type ID value NON NLS 1 String signature target read String signature in NON NLS 1 String generic Signature null if with Generic Signature generic Signature target read String generic signature in NON NLS 1 if ID is Null return null Interface Type Impl mirror Interface Type Impl vm Impl get Cached Mirror ID if mirror null mirror new Interface Type Impl vm Impl ID vm Impl add Cached Mirror mirror mirror set Signature signature mirror set Generic Signature generic Signature return mirror  ReferenceTypeImpl ReferenceTypeImpl InterfaceTypeImpl readWithSignature MirrorImpl withGenericSignature DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpInterfaceID JdwpInterfaceID vmImpl fVerboseWriter fVerboseWriter interfaceType readString genericSignature withGenericSignature genericSignature readString isNull InterfaceTypeImpl InterfaceTypeImpl vmImpl getCachedMirror InterfaceTypeImpl vmImpl vmImpl addCachedMirror setSignature setGenericSignature genericSignature

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private JDI Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME JDIMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public class Jdwp ArrayID extends Jdwp Reference TypeID Creates new JdwpID public Jdwp ArrayID Virtual Machine Impl vm Impl super vm Impl  JdwpArrayID JdwpReferenceTypeID JdwpArrayID VirtualMachineImpl vmImpl vmImpl

public class Jdwp ClassID extends Jdwp Reference TypeID Creates new JdwpID public Jdwp ClassID Virtual Machine Impl vm Impl super vm Impl  JdwpClassID JdwpReferenceTypeID JdwpClassID VirtualMachineImpl vmImpl vmImpl

public class Jdwp Class LoaderID extends Jdwp ObjectID Creates new JdwpID public Jdwp Class LoaderID Virtual Machine Impl vm Impl super vm Impl  JdwpClassLoaderID JdwpObjectID JdwpClassLoaderID VirtualMachineImpl vmImpl vmImpl

public class Jdwp Class ObjectID extends Jdwp ObjectID Creates new JdwpID public Jdwp Class ObjectID Virtual Machine Impl vm Impl super vm Impl  JdwpClassObjectID JdwpObjectID JdwpClassObjectID VirtualMachineImpl vmImpl vmImpl

Creates new Jdwp Command Packet protected Jdwp Command Packet  JdwpCommandPacket JdwpCommandPacket
Creates new Jdwp Command Packet public Jdwp Command Packet int command set Command command set Id get New Id  JdwpCommandPacket JdwpCommandPacket setCommand setId getNewId
return Returns unique id for command packet public static synchronized int get New Id return fg Next Id  getNewId fgNextId
return Returns JDWP command set of packet public byte get Command Set return byte f Command 8  getCommandSet fCommand
return Returns 256 JDWP Command Set unsigned JDWP Command public int get Command return f Command  CommandSet getCommand fCommand
Assigns command 256 JDWP Command Set unsigned JDWP Command public void set Command int command f Command command  CommandSet setCommand fCommand
Reads header fields that are specific for this type of packet protected void read Specific Header Fields Data Input Stream data In Stream throws IO Exception byte command Set data In Stream read Byte f Command data In Stream read Byte command Set 8  readSpecificHeaderFields DataInputStream dataInStream IOException commandSet dataInStream readByte fCommand dataInStream readByte commandSet
Writes header fields that are specific for this type of packet protected void write Specific Header Fields Data Output Stream data Out Stream throws IO Exception data Out Stream write Byte get Command Set data Out Stream write Byte byte f Command  writeSpecificHeaderFields DataOutputStream dataOutStream IOException dataOutStream writeByte getCommandSet dataOutStream writeByte fCommand
Retrieves constant mappings public static void get Constant Maps if fg Command Map null return Field fields Jdwp Command Packet class get Declared Fields First get the set names Map set Names new Hash Map fields length for int i 0 i fields length i Field field fields i if field get Modifiers Modifier PUBLIC 0 field get Modifiers Modifier STATIC 0 field get Modifiers Modifier FINAL 0 continue try String name field get Name If it is not a set continue if name starts With CSET  NON NLS 1 continue int value field get Int null set Names put new Integer value remove Prefix name catch Illegal Access Exception e Will not occur for own class catch Illegal Argument Exception e Should not occur We should take care that all public static final constants in this class are numbers that are convertible to int Get the commands fg Command Map new Hash Map for int i 0 i fields length i Field field fields i if field get Modifiers Modifier PUBLIC 0 field get Modifiers Modifier STATIC 0 field get Modifiers Modifier FINAL 0 continue try String name field get Name If it is a set continue if name starts With CSET  NON NLS 1 continue Integer val Integer field get null int value val int Value int set value 8 String set Name String set Names get new Integer set String entry Name set Name remove Prefix name NON NLS 1 fg Command Map put val entry Name catch Illegal Access Exception e Will not occur for own class  getConstantMaps fgCommandMap JdwpCommandPacket getDeclaredFields setNames HashMap getModifiers getModifiers getModifiers getName startsWith CSET_ getInt setNames removePrefix IllegalAccessException IllegalArgumentException fgCommandMap HashMap getModifiers getModifiers getModifiers getName startsWith CSET_ intValue setName setNames entryName setName removePrefix fgCommandMap entryName IllegalAccessException
return Returns a map with string representations of error codes public static Map command Map get Constant Maps return fg Command Map  commandMap getConstantMaps fgCommandMap
return Returns string without XXX  prefix public static String remove Prefix String str int i str index Of   if i 0 return str else return str substring i 1  XXX_ removePrefix indexOf _

public class Jdwp FieldID extends JdwpID Creates new JdwpID public Jdwp FieldID Virtual Machine Impl vm Impl super vm Impl  JdwpFieldID JdwpFieldID VirtualMachineImpl vmImpl vmImpl
return Returns VM specific size of ID public int get Size return f Virtual Machine fieldID Size  getSize fVirtualMachine fieldIDSize
return Returns true if ID is null public boolean is Null return false  isNull

public class Jdwp FrameID extends JdwpID Creates new JdwpID public Jdwp FrameID Virtual Machine Impl vm Impl super vm Impl  JdwpFrameID JdwpFrameID VirtualMachineImpl vmImpl vmImpl
return Returns VM specific size of ID public int get Size return f Virtual Machine frameID Size  getSize fVirtualMachine frameIDSize
return Returns true if ID is null public boolean is Null return false  isNull

Creates new JdwpID public JdwpID Virtual Machine Impl vm Impl f Virtual Machine vm Impl  VirtualMachineImpl vmImpl fVirtualMachine vmImpl
return Returns true if two I Ds refer to the same entity in the target VM see java lang Object equals Object public boolean equals Object object return object null object get Class equals this get Class f Value JdwpID object f Value  IDs getClass getClass fValue fValue
return Returns a has code for this object see java lang Object hash Code public int hash Code return int f Value  hashCode hashCode fValue
return Returns value of ID public final long value return f Value  fValue
return Returns string representation public String to String return new Long f Value to String  toString fValue toString
return Returns VM specific size of ID protected abstract int get Size  getSize
protected abstract int get Size return Returns true if ID is null public abstract boolean is Null  getSize isNull
Reads ID public void read Data Input Stream in Stream throws IO Exception f Value 0 int size get Size for int i 0 i size i int b in Stream read Unsigned Byte Note that the byte must be treated as unsigned f Value f Value 8 b  DataInputStream inStream IOException fValue getSize inStream readUnsignedByte fValue fValue
Writes ID public void write Data Output Stream out Stream throws IO Exception int size get Size for int i size 1 i 0 i byte b byte f Value 8 i Note that must be used because f Value must be treated as unsigned out Stream write b  DataOutputStream outStream IOException getSize fValue fValue outStream
Retrieves constant mappings public static void get Constant Maps if f Tag Map null return java lang reflect Field fields JdwpID class get Declared Fields f Tag Map new Hash Map f Type Tag Map new Hash Map for int i 0 i fields length i java lang reflect Field field fields i if field get Modifiers java lang reflect Modifier PUBLIC 0 field get Modifiers java lang reflect Modifier STATIC 0 field get Modifiers java lang reflect Modifier FINAL 0 continue try String name field get Name Integer int Value new Integer field get Int null if name starts With TYPE TAG  NON NLS 1 name name substring 9 f Type Tag Map put int Value name else if name ends With  TAG NON NLS 1 f Tag Map put int Value name catch Illegal Access Exception e Will not occur for own class catch Illegal Argument Exception e Should not occur We should take care that all public static final constants in this class are numbers that are convertible to int  getConstantMaps fTagMap getDeclaredFields fTagMap HashMap fTypeTagMap HashMap getModifiers getModifiers getModifiers getName intValue getInt startsWith TYPE_TAG_ fTypeTagMap intValue endsWith _TAG fTagMap intValue IllegalAccessException IllegalArgumentException
return Returns a map with string representations of tags public static Map tag Map get Constant Maps return f Tag Map  tagMap getConstantMaps fTagMap
return Returns a map with string representations of type tags public static Map type Tag Map get Constant Maps return f Type Tag Map  typeTagMap getConstantMaps fTypeTagMap

public class Jdwp InterfaceID extends Jdwp Reference TypeID Creates new JdwpID public Jdwp InterfaceID Virtual Machine Impl vm Impl super vm Impl  JdwpInterfaceID JdwpReferenceTypeID JdwpInterfaceID VirtualMachineImpl vmImpl vmImpl

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private JDWP Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME JDWPMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public class Jdwp MethodID extends JdwpID Creates new JdwpID public Jdwp MethodID Virtual Machine Impl vm Impl super vm Impl  JdwpMethodID JdwpMethodID VirtualMachineImpl vmImpl vmImpl
return Returns VM specific size of ID public int get Size return f Virtual Machine methodID Size  getSize fVirtualMachine methodIDSize
return Returns true if ID is null public boolean is Null return false  isNull

public class Jdwp ObjectID extends JdwpID Creates new JdwpID public Jdwp ObjectID Virtual Machine Impl vm Impl super vm Impl  JdwpObjectID JdwpObjectID VirtualMachineImpl vmImpl vmImpl
return Returns VM specific size of ID public int get Size return f Virtual Machine objectID Size  getSize fVirtualMachine objectIDSize
return Returns true if ID is null public boolean is Null return f Value VALUE NULL  isNull fValue VALUE_NULL

Set Id package void set Id int id f Id id  setId fId
return Returns Id public int get Id return f Id  getId fId
Set Flags package void set Flags byte flags f Flags flags  setFlags fFlags
return Returns Flags public byte get Flags return f Flags  getFlags fFlags
return Returns total length of packet public int get Length return MIN PACKET LENGTH get Data Length  getLength MIN_PACKET_LENGTH getDataLength
return Returns length of data in packet public int get Data Length return f Data Buf null 0 f Data Buf length  getDataLength fDataBuf fDataBuf
return Returns data of packet public byte data return f Data Buf  fDataBuf
return Returns Data Input Stream with reply data or an empty stream if there is none public Data Input Stream data In Stream if f Data Buf null return new Data Input Stream new Byte Array Input Stream f Data Buf else return new Data Input Stream new Byte Array Input Stream new byte 0  DataInputStream DataInputStream dataInStream fDataBuf DataInputStream ByteArrayInputStream fDataBuf DataInputStream ByteArrayInputStream
Assigns data to packet public void set Data byte data f Data Buf data  setData fDataBuf
Reads header fields that are specific for a type of packet protected abstract void read Specific Header Fields Data Input Stream data In Stream throws IO Exception  readSpecificHeaderFields DataInputStream dataInStream IOException
protected abstract void read Specific Header Fields Data Input Stream data In Stream throws IO Exception Writes header fields that are specific for a type of packet protected abstract void write Specific Header Fields Data Output Stream data Out Stream throws IO Exception  readSpecificHeaderFields DataInputStream dataInStream IOException writeSpecificHeaderFields DataOutputStream dataOutStream IOException
Reads complete packet public static Jdwp Packet read Input Stream in Stream throws IO Exception Data Input Stream data In Stream new Data Input Stream in Stream Read header int packet Length data In Stream read Int int id data In Stream read Int byte flags data In Stream read Byte Determine type command or reply Jdwp Packet packet if flags FLAG REPLY PACKET 0 packet new Jdwp Reply Packet else packet new Jdwp Command Packet Assign generic header fields packet set Id id packet set Flags flags Read specific header fields and data packet read Specific Header Fields data In Stream if packet Length MIN PACKET LENGTH 0 packet f Data Buf new byte packet Length MIN PACKET LENGTH data In Stream read Fully packet f Data Buf return packet  JdwpPacket InputStream inStream IOException DataInputStream dataInStream DataInputStream inStream packetLength dataInStream readInt dataInStream readInt dataInStream readByte JdwpPacket FLAG_REPLY_PACKET JdwpReplyPacket JdwpCommandPacket setId setFlags readSpecificHeaderFields dataInStream packetLength MIN_PACKET_LENGTH fDataBuf packetLength MIN_PACKET_LENGTH dataInStream readFully fDataBuf
Writes complete packet public void write Output Stream out Stream throws IO Exception Data Output Stream data Out Stream new Data Output Stream out Stream write Header data Out Stream write Data data Out Stream  OutputStream outStream IOException DataOutputStream dataOutStream DataOutputStream outStream writeHeader dataOutStream writeData dataOutStream
Writes header of packet protected void write Header Data Output Stream data Out Stream throws IO Exception data Out Stream write Int get Length data Out Stream write Int get Id data Out Stream write Byte get Flags write Specific Header Fields data Out Stream  writeHeader DataOutputStream dataOutStream IOException dataOutStream writeInt getLength dataOutStream writeInt getId dataOutStream writeByte getFlags writeSpecificHeaderFields dataOutStream
Writes data of packet protected void write Data Data Output Stream data Out Stream throws IO Exception if f Data Buf null data Out Stream write f Data Buf  writeData DataOutputStream dataOutStream IOException fDataBuf dataOutStream fDataBuf
Retrieves constant mappings public static void get Constant Maps if fg Flag Strings null return Field fields Jdwp Packet class get Declared Fields fg Flag Strings new String 8 for int i 0 i fields length i Field field fields i if field get Modifiers Modifier PUBLIC 0 field get Modifiers Modifier STATIC 0 field get Modifiers Modifier FINAL 0 continue String name field get Name if name starts With FLAG  NON NLS 1 continue name name substring 5 try byte value field get Byte null for int j 0 j fg Flag Strings length j if 1 j value 0 fg Flag Strings j name break catch Illegal Access Exception e Will not occur for own class catch Illegal Argument Exception e Should not occur We should take care that all public static final constants in this class are bytes  getConstantMaps fgFlagStrings JdwpPacket getDeclaredFields fgFlagStrings getModifiers getModifiers getModifiers getName startsWith FLAG_ getByte fgFlagStrings fgFlagStrings IllegalAccessException IllegalArgumentException
return Returns a mapping with string representations of flags public static String get Flag Map get Constant Maps return fg Flag Strings  getFlagMap getConstantMaps fgFlagStrings

public class Jdwp Reference TypeID extends JdwpID Creates new JdwpID public Jdwp Reference TypeID Virtual Machine Impl vm Impl super vm Impl  JdwpReferenceTypeID JdwpReferenceTypeID VirtualMachineImpl vmImpl vmImpl
return Returns VM specific size of ID public int get Size return f Virtual Machine reference TypeID Size  getSize fVirtualMachine referenceTypeIDSize
return Returns true if ID is null public boolean is Null return f Value VALUE NULL  isNull fValue VALUE_NULL

private short f Error Code Creates new Jdwp Reply Packet public Jdwp Reply Packet set Flags FLAG REPLY PACKET  fErrorCode JdwpReplyPacket JdwpReplyPacket setFlags FLAG_REPLY_PACKET
return Returns JDWP Error code public short error Code return f Error Code  errorCode fErrorCode
Assigns JDWP Error code public void set Error Code short new Value f Error Code new Value  setErrorCode newValue fErrorCode newValue
Reads header fields that are specific for this type of packet protected void read Specific Header Fields Data Input Stream data In Stream throws IO Exception f Error Code data In Stream read Short  readSpecificHeaderFields DataInputStream dataInStream IOException fErrorCode dataInStream readShort
Writes header fields that are specific for this type of packet protected void write Specific Header Fields Data Output Stream data Out Stream throws IO Exception data Out Stream write Short f Error Code  writeSpecificHeaderFields DataOutputStream dataOutStream IOException dataOutStream writeShort fErrorCode
Retrieves constant mappings public static void get Constant Maps if f Error Map null return Field fields Jdwp Reply Packet class get Declared Fields f Error Map new Hash Map fields length for int i 0 i fields length i Field field fields i if field get Modifiers Modifier PUBLIC 0 field get Modifiers Modifier STATIC 0 field get Modifiers Modifier FINAL 0 continue try Integer int Value new Integer field get Int null f Error Map put int Value field get Name catch Illegal Access Exception e Will not occur for own class catch Illegal Argument Exception e Should not occur We should take care that all public static final constants in this class are numbers that are convertible to int  getConstantMaps fErrorMap JdwpReplyPacket getDeclaredFields fErrorMap HashMap getModifiers getModifiers getModifiers intValue getInt fErrorMap intValue getName IllegalAccessException IllegalArgumentException
return Returns a map with string representations of error codes public static Map error Map get Constant Maps return f Error Map  errorMap getConstantMaps fErrorMap

public class Jdwp String Reads String from Jdwp stream Read a UTF where length has 4 bytes and not just 2 This code was based on the OTI Retysin source for readUTF public static String read Data Input Stream in throws IO Exception int utf Size in read Int byte utf Bytes new byte utf Size in read Fully utf Bytes Guess at buffer size String Buffer str Buffer new String Buffer utf Size 3 2 for int i 0 i utf Size int a utf Bytes i 0xFF if a 4 12 str Buffer append char a i else int b utf Bytes i 1 0xFF if a 4 14 if b 0xBF 0 throw new UTF Data Format Exception JDWP Messages get String Jdwp String Second byte input does not match UTF Specification 1 NON NLS 1 str Buffer append char a 0x1F 6 b 0x3F i 2 else int c utf Bytes i 2 0xFF if a 0xEF 0 if b 0xBF 0 c 0xBF 0 throw new UTF Data Format Exception JDWP Messages get String Jdwp String Second or third byte input does not mach UTF Specification 2 NON NLS 1 str Buffer append char a 0x0F 12 b 0x3F 6 c 0x3F i 3 else throw new UTF Data Format Exception JDWP Messages get String Jdwp String Input does not match UTF Specification 3 NON NLS 1 return str Buffer to String  JdwpString DataInputStream IOException utfSize readInt utfBytes utfSize readFully utfBytes StringBuffer strBuffer StringBuffer utfSize utfSize utfBytes strBuffer utfBytes UTFDataFormatException JDWPMessages getString JdwpString Second_byte_input_does_not_match_UTF_Specification_1 strBuffer utfBytes UTFDataFormatException JDWPMessages getString JdwpString Second_or_third_byte_input_does_not_mach_UTF_Specification_2 strBuffer UTFDataFormatException JDWPMessages getString JdwpString Input_does_not_match_UTF_Specification_3 strBuffer toString
Writes String to Jdwp stream Write a UTF where length has 4 bytes and not just 2 This code was based on OTI Retsin source for writeUTF public static void write String str Data Output Stream out throws IO Exception if str null throw new Null Pointer Exception JDWP Messages get String Jdwp String str is null 4 NON NLS 1 int utf Count 0 for int i 0 i str length i int char Value str char At i if char Value 0 char Value 127 utf Count 1 else if char Value 2047 utf Count 2 else utf Count 3 byte utf Bytes new byte utf Count int utf Index 0 for int i 0 i str length i int char Value str char At i if char Value 0 char Value 127 utf Bytes utf Index byte char Value else if char Value 2047 utf Bytes utf Index byte 0xc0 0x1f char Value 6 utf Bytes utf Index byte 0x80 0x3f char Value else utf Bytes utf Index byte 0xe0 0x0f char Value 12 utf Bytes utf Index byte 0x80 0x3f char Value 6 utf Bytes utf Index byte 0x80 0x3f char Value out write Int utf Count if utf Count 0 out write utf Bytes  DataOutputStream IOException NullPointerException JDWPMessages getString JdwpString str_is_null_4 utfCount charValue charAt charValue charValue utfCount charValue utfCount utfCount utfBytes utfCount utfIndex charValue charAt charValue charValue utfBytes utfIndex charValue charValue utfBytes utfIndex charValue utfBytes utfIndex charValue utfBytes utfIndex charValue utfBytes utfIndex charValue utfBytes utfIndex charValue writeInt utfCount utfCount utfBytes

public class Jdwp StringID extends Jdwp ObjectID Creates new JdwpID public Jdwp StringID Virtual Machine Impl vm Impl super vm Impl  JdwpStringID JdwpObjectID JdwpStringID VirtualMachineImpl vmImpl vmImpl

public class Jdwp Thread GroupID extends Jdwp ObjectID Creates new JdwpID public Jdwp Thread GroupID Virtual Machine Impl vm Impl super vm Impl  JdwpThreadGroupID JdwpObjectID JdwpThreadGroupID VirtualMachineImpl vmImpl vmImpl

public class Jdwp ThreadID extends Jdwp ObjectID Creates new JdwpID public Jdwp ThreadID Virtual Machine Impl vm Impl super vm Impl  JdwpThreadID JdwpObjectID JdwpThreadID VirtualMachineImpl vmImpl vmImpl

public Local Variable Impl Virtual Machine Impl vm Impl Method Impl method long code Index String name String signature String generic Signature int length int slot boolean is Argument super Local Variable vm Impl NON NLS 1 f Method method f Code Index code Index f Name name f Signature signature f Generic Signature generic Signature f Length length f Slot slot f Is Argument is Argument  LocalVariableImpl VirtualMachineImpl vmImpl MethodImpl codeIndex genericSignature isArgument LocalVariable vmImpl fMethod fCodeIndex codeIndex fName fSignature fGenericSignature genericSignature fLength fSlot fIsArgument isArgument
return Returns local variable s index in its frame public int slot return f Slot  fSlot
return Returns the hash code value public int hash Code return f Method hash Code int f Code Index f Slot  hashCode fMethod hashCode fCodeIndex fSlot
return Returns true if two mirrors refer to the same entity in the target VM see java lang Object equals Object public boolean equals Object object if object null object get Class equals this get Class Local Variable Impl loc Local Variable Impl object return f Method equals loc f Method f Code Index loc f Code Index f Slot loc f Slot return false  getClass getClass LocalVariableImpl LocalVariableImpl fMethod fMethod fCodeIndex fCodeIndex fSlot fSlot
return Returns a negative integer zero or a positive integer as this object is less than equal to or greater than the specified object public int compare To Object object if object null object get Class equals this get Class throw new Class Cast Exception JDI Messages get String Local Variable Impl Can  t compare local variable to given object 1 NON NLS 1 See if methods are the same if not return comparison between methods Local Variable Impl var2 Local Variable Impl object if method equals var2 method return method compare To var2 method Return comparison between the index of each local variable in its stack frame Code indexes must be treated as unsigned This matters if you have to compare them if f Code Index 0 var2 f Code Index 0 throw new Internal Error JDI Messages get String Local Variable Impl Code indexes are assumed to be always positive 2 NON NLS 1 long index2 var2 f Code Index if f Code Index index2 return 1 else if f Code Index index2 return 1 else return 0  compareTo getClass getClass ClassCastException JDIMessages getString LocalVariableImpl Can__t_compare_local_variable_to_given_object_1 LocalVariableImpl LocalVariableImpl compareTo fCodeIndex fCodeIndex InternalError JDIMessages getString LocalVariableImpl Code_indexes_are_assumed_to_be_always_positive_2 fCodeIndex fCodeIndex fCodeIndex
return Returns true if this variable is an argument to its method public boolean is Argument return f Is Argument  isArgument fIsArgument
public boolean is Visible Stack Frame frame throws Illegal Argument Exception VM Mismatch Exception checkVM frame Stack Frame Impl frame Impl Stack Frame Impl frame if f Method equals frame Impl location method throw new Illegal Argument Exception JDI Messages get String Local Variable Impl The stack frame  s method does not match this variable  s method 3 NON NLS 1 if f Length 1 inferred argument assume visible for entire method return true long current Index frame Impl location code Index Code indexes must be treated as unsigned This matters if you have to compare them if current Index 0 f Code Index 0 f Code Index f Length 0 return f Code Index current Index current Index f Code Index f Length throw new Internal Error JDI Messages get String Local Variable Impl Code indexes are assumed to be always positive 4 NON NLS 1  isVisible StackFrame IllegalArgumentException VMMismatchException StackFrameImpl frameImpl StackFrameImpl fMethod frameImpl IllegalArgumentException JDIMessages getString LocalVariableImpl The_stack_frame__s_method_does_not_match_this_variable__s_method_3 fLength currentIndex frameImpl codeIndex currentIndex fCodeIndex fCodeIndex fLength fCodeIndex currentIndex currentIndex fCodeIndex fLength InternalError JDIMessages getString LocalVariableImpl Code_indexes_are_assumed_to_be_always_positive_4
return Returns the name of the local variable public String name return f Name  fName
return Returns the signature of the local variable public String signature return f Signature  fSignature
return Returns the type of the this Local Variable public Type type throws Class Not Loaded Exception return Type Impl create virtual Machine Impl f Signature method declaring Type class Loader  LocalVariable ClassNotLoadedException TypeImpl virtualMachineImpl fSignature declaringType classLoader
return Returns a text representation of the declared type of this variable public String type Name String signature generic Signature if signature null signature signature return Generic Signature signature To Name signature  typeName genericSignature GenericSignature signatureToName
return Returns the tag of the declared type of this variable public byte tag return Type Impl signature To Tag f Signature  TypeImpl signatureToTag fSignature
return Returns the method that holds the local variable public Method Impl method return f Method  MethodImpl fMethod
return Returns true if the local variable is the this pointer public boolean is This return slot 0 method is Static  isThis isStatic
return Returns description of Mirror object public String to String return f Name  toString fName
public String generic Signature return f Generic Signature  genericSignature fGenericSignature

Creates new instance public Location Impl Virtual Machine Impl vm Impl Method Impl method long index super Location vm Impl NON NLS 1 f Method method f Index index  LocationImpl VirtualMachineImpl vmImpl MethodImpl vmImpl fMethod fIndex
return Returns the code position within this location s method public long code Index return f Index  codeIndex fIndex
return Returns the type to which this Location belongs public Reference Type declaring Type return f Method declaring Type  ReferenceType declaringType fMethod declaringType
return Returns the hash code value public int hash Code return f Method hash Code int f Index  hashCode fMethod hashCode fIndex
return Returns true if two mirrors refer to the same entity in the target VM see java lang Object equals Object public boolean equals Object object if object null object get Class equals this get Class Location Impl loc Location Impl object return f Method equals loc f Method f Index loc f Index return false  getClass getClass LocationImpl LocationImpl fMethod fMethod fIndex fIndex
return Returns a negative integer zero or a positive integer as this object is less than equal to or greater than the specified object public int compare To Object object if object null object get Class equals this get Class throw new Class Cast Exception JDI Messages get String Location Impl Can  t compare location to given object 1 NON NLS 1 See if methods are the same if not return comparison between methods Location Impl location2 Location Impl object if method equals location2 method return method compare To location2 method Return comparison between code indexes Code indexes must be treated as unsigned This matters if you have to compare them if code Index 0 location2 code Index 0 throw new Internal Error JDI Messages get String Location Impl Code indexes are assumed to be always positive 2 NON NLS 1 if code Index location2 code Index return 1 else if code Index location2 code Index return 1 else return 0  compareTo getClass getClass ClassCastException JDIMessages getString LocationImpl Can__t_compare_location_to_given_object_1 LocationImpl LocationImpl compareTo codeIndex codeIndex InternalError JDIMessages getString LocationImpl Code_indexes_are_assumed_to_be_always_positive_2 codeIndex codeIndex codeIndex codeIndex
return Returns an int specifying the line in the source return 1 if the information is not available public int line Number return line Number virtual Machine get Default Stratum  lineNumber lineNumber virtualMachine getDefaultStratum
return Returns the Method if this location is in a method public Method method return f Method  fMethod
return a string specifying the source public String source Name throws Absent Information Exception return source Name virtual Machine get Default Stratum  sourceName AbsentInformationException sourceName virtualMachine getDefaultStratum
return Returns description of Mirror object public String to String try return Message Format format JDI Messages get String Location Impl sourcename   0  line   1  3 new String source Name Integer to String line Number NON NLS 1 catch Exception e return f Description  toString MessageFormat JDIMessages getString LocationImpl sourcename__ _line__ _3 sourceName toString lineNumber fDescription
Writes JDWP representation public void write Mirror Impl target Data Output Stream out throws IO Exception f Method write With Reference Type With Tag target out target write Long f Index index out NON NLS 1  MirrorImpl DataOutputStream IOException fMethod writeWithReferenceTypeWithTag writeLong fIndex
return Reads JDWP representation and returns new instance public static Location Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Notice that Locations are not stored or cached because they don t remember any information Method Impl method Method Impl read With Reference Type With Tag target in long index target read Long index in NON NLS 1 if method null return null return new Location Impl vm Impl method index  LocationImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl MethodImpl MethodImpl readWithReferenceTypeWithTag readLong LocationImpl vmImpl
see Location line Number String public int line Number String stratum return f Method reference Type Impl line Number f Index f Method stratum  lineNumber lineNumber fMethod referenceTypeImpl lineNumber fIndex fMethod
see Location source Name String public String source Name String stratum throws Absent Information Exception return f Method reference Type Impl source Name f Index f Method stratum  sourceName sourceName AbsentInformationException fMethod referenceTypeImpl sourceName fIndex fMethod
see Location source Path String public String source Path String stratum throws Absent Information Exception return f Method reference Type Impl source Path f Index f Method stratum  sourcePath sourcePath AbsentInformationException fMethod referenceTypeImpl sourcePath fIndex fMethod
see Location source Path public String source Path throws Absent Information Exception return source Path virtual Machine get Default Stratum  sourcePath sourcePath AbsentInformationException sourcePath virtualMachine getDefaultStratum

public class Long Type Impl extends Primitive Type Impl implements Long Type Creates new instance public Long Type Impl Virtual Machine Impl vm Impl super Long Type vm Impl long J NON NLS 1 NON NLS 2 NON NLS 3  LongTypeImpl PrimitiveTypeImpl LongType LongTypeImpl VirtualMachineImpl vmImpl LongType vmImpl
returns primitive type tag public byte tag return Long Value Impl tag  LongValueImpl
return Create a null value instance of the type public Value create Null Value return virtual Machine Impl mirror Of 0L  createNullValue virtualMachineImpl mirrorOf

Creates new instance public Long Value Impl Virtual Machine Impl vm Impl Long value super Long Value vm Impl value NON NLS 1  LongValueImpl VirtualMachineImpl vmImpl LongValue vmImpl
returns tag public byte get Tag return tag  getTag
returns type of value public Type type return virtual Machine Impl get Long Type  virtualMachineImpl getLongType
returns Value public long value return long Value  longValue
return Reads and returns new instance public static Long Value Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl long value target read Long long Value in NON NLS 1 return new Long Value Impl vm Impl new Long value  LongValueImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl readLong longValue LongValueImpl vmImpl
Writes value without value tag public void write Mirror Impl target Data Output Stream out throws IO Exception target write Long Long f Value long Value long Value out NON NLS 1  MirrorImpl DataOutputStream IOException writeLong fValue longValue longValue

Creates new Method Impl public Method Impl Virtual Machine Impl vm Impl Reference Type Impl declaring Type Jdwp MethodID methodID String name String signature String generic Signature int modifier Bits super Method vm Impl declaring Type name signature generic Signature modifier Bits NON NLS 1 f MethodID methodID  MethodImpl MethodImpl VirtualMachineImpl vmImpl ReferenceTypeImpl declaringType JdwpMethodID genericSignature modifierBits vmImpl declaringType genericSignature modifierBits fMethodID
Flushes all stored Jdwp results protected void flush Stored Jdwp Results f Variables null f Lowest Valid Code Index 1 f Highest Valid Code Index 1 f Code Index To Line null f Line To Code Indexes null f Stratum All Line Locations null f Code Index Table null f Java Stratum Line Number Table null f Argument Slots Count 1 f Arguments null f Argument Types null f Argument Type Names null f Argument Type Signatures null f Byte Codes null  flushStoredJdwpResults fVariables fLowestValidCodeIndex fHighestValidCodeIndex fCodeIndexToLine fLineToCodeIndexes fStratumAllLineLocations fCodeIndexTable fJavaStratumLineNumberTable fArgumentSlotsCount fArguments fArgumentTypes fArgumentTypeNames fArgumentTypeSignatures fByteCodes
return Returns methodID of method protected Jdwp MethodID get MethodID return f MethodID  JdwpMethodID getMethodID fMethodID
return Returns map of location to line number protected Map java Stratum Code Index To Line throws Absent Information Exception if is Abstract return Collections EMPTY MAP get Line Table return f Code Index To Line  javaStratumCodeIndexToLine AbsentInformationException isAbstract EMPTY_MAP getLineTable fCodeIndexToLine
return Returns map of line number to locations protected List java Stratum Line To Code Indexes int line throws Absent Information Exception if is Abstract is Native return null get Line Table return List f Line To Code Indexes get new Integer line  javaStratumLineToCodeIndexes AbsentInformationException isAbstract isNative getLineTable fLineToCodeIndexes
Gets line table from VM private void get Line Table throws Absent Information Exception if is Obsolete return if f Code Index To Line null if f Code Index To Line is Empty throw new Absent Information Exception JDI Messages get String Method Impl Got empty line number table for this method 1 NON NLS 1 return init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write With Reference Type this out Data Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet M LINE TABLE out Bytes switch reply Packet error Code case Jdwp Reply Packet ABSENT INFORMATION throw new Absent Information Exception JDI Messages get String Method Impl No line number information available 2 NON NLS 1 case Jdwp Reply Packet NATIVE METHOD throw new Absent Information Exception JDI Messages get String Method Impl No line number information available 2 NON NLS 1 default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f Lowest Valid Code Index read Long lowest index reply Data NON NLS 1 f Highest Valid Code Index read Long highest index reply Data NON NLS 1 int nr Of Elements read Int elements reply Data NON NLS 1 f Code Index To Line new Hash Map f Line To Code Indexes new Hash Map if nr Of Elements 0 throw new Absent Information Exception JDI Messages get String Method Impl Got empty line number table for this method 3 NON NLS 1 f Code Index Table new long nr Of Elements f Java Stratum Line Number Table new int nr Of Elements for int i 0 i nr Of Elements i long line Code Index read Long code index reply Data NON NLS 1 Long line Code Index Long new Long line Code Index int line Nr read Int line nr reply Data NON NLS 1 Integer line Nr Int new Integer line Nr Add entry to code index to line mapping f Code Index To Line put line Code Index Long line Nr Int f Code Index Table i line Code Index f Java Stratum Line Number Table i line Nr List line Nr Entry List f Line To Code Indexes get line Nr Int if line Nr Entry null line Nr Entry new Array List f Line To Code Indexes put line Nr Int line Nr Entry line Nr Entry add line Code Index Long catch IO Exception e f Code Index To Line null f Line To Code Indexes null defaultIO Exception Handler e finally handled Jdwp Request  getLineTable AbsentInformationException isObsolete fCodeIndexToLine fCodeIndexToLine isEmpty AbsentInformationException JDIMessages getString MethodImpl Got_empty_line_number_table_for_this_method_1 initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes writeWithReferenceType outData JdwpReplyPacket replyPacket JdwpCommandPacket M_LINE_TABLE outBytes replyPacket errorCode JdwpReplyPacket ABSENT_INFORMATION AbsentInformationException JDIMessages getString MethodImpl No_line_number_information_available_2 JdwpReplyPacket NATIVE_METHOD AbsentInformationException JDIMessages getString MethodImpl No_line_number_information_available_2 defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fLowestValidCodeIndex readLong replyData fHighestValidCodeIndex readLong replyData nrOfElements readInt replyData fCodeIndexToLine HashMap fLineToCodeIndexes HashMap nrOfElements AbsentInformationException JDIMessages getString MethodImpl Got_empty_line_number_table_for_this_method_3 fCodeIndexTable nrOfElements fJavaStratumLineNumberTable nrOfElements nrOfElements lineCodeIndex readLong replyData lineCodeIndexLong lineCodeIndex lineNr readInt replyData lineNrInt lineNr fCodeIndexToLine lineCodeIndexLong lineNrInt fCodeIndexTable lineCodeIndex fJavaStratumLineNumberTable lineNr lineNrEntry fLineToCodeIndexes lineNrInt lineNrEntry lineNrEntry ArrayList fLineToCodeIndexes lineNrInt lineNrEntry lineNrEntry lineCodeIndexLong IOException fCodeIndexToLine fLineToCodeIndexes defaultIOExceptionHandler handledJdwpRequest
return Returns the line number that corresponds to the given line Code Index protected int java Stratum Line Number long line Code Index throws Absent Information Exception if is Abstract is Native is Obsolete return 1 get Line Table if line Code Index f Highest Valid Code Index throw new Invalid Code Index Exception JDI Messages get String Method Impl Invalid code index of a location given 4 NON NLS 1 Long line Code Index Obj Integer line Nr Obj long index line Code Index Search for the line where this code index is located do line Code Index Obj new Long index line Nr Obj Integer java Stratum Code Index To Line get line Code Index Obj while line Nr Obj null index f Lowest Valid Code Index if line Nr Obj null if line Code Index f Lowest Valid Code Index index line Code Index do line Code Index Obj new Long index line Nr Obj Integer java Stratum Code Index To Line get line Code Index Obj while line Nr Obj null index f Highest Valid Code Index if line Nr Obj null return line Nr Obj int Value throw new Invalid Code Index Exception JDI Messages get String Method Impl Invalid code index of a location given 4 NON NLS 1 return line Nr Obj int Value  lineCodeIndex javaStratumLineNumber lineCodeIndex AbsentInformationException isAbstract isNative isObsolete getLineTable lineCodeIndex fHighestValidCodeIndex InvalidCodeIndexException JDIMessages getString MethodImpl Invalid_code_index_of_a_location_given_4 lineCodeIndexObj lineNrObj lineCodeIndex lineCodeIndexObj lineNrObj javaStratumCodeIndexToLine lineCodeIndexObj lineNrObj fLowestValidCodeIndex lineNrObj lineCodeIndex fLowestValidCodeIndex lineCodeIndex lineCodeIndexObj lineNrObj javaStratumCodeIndexToLine lineCodeIndexObj lineNrObj fHighestValidCodeIndex lineNrObj lineNrObj intValue InvalidCodeIndexException JDIMessages getString MethodImpl Invalid_code_index_of_a_location_given_4 lineNrObj intValue
see com sun jdi Method all Line Locations public List all Line Locations throws Absent Information Exception return all Line Locations virtual Machine get Default Stratum null  allLineLocations allLineLocations AbsentInformationException allLineLocations virtualMachine getDefaultStratum
see com sun jdi Method arguments public List arguments throws Absent Information Exception if is Native is Abstract throw new Absent Information Exception JDI Messages get String Method Impl No local variable information available 9 NON NLS 1 if f Arguments null return f Arguments List result new Array List Iterator iter variables iterator while iter has Next Local Variable Impl var Local Variable Impl iter next if var is Argument result add var f Arguments result return f Arguments  AbsentInformationException isNative isAbstract AbsentInformationException JDIMessages getString MethodImpl No_local_variable_information_available_9 fArguments fArguments ArrayList hasNext LocalVariableImpl LocalVariableImpl isArgument fArguments fArguments
return Returns a text representation of all declared argument types of this method public List argument Type Names if f Argument Type Names null return f Argument Type Names List result Generic Signature list Signatureto List Name argument Type Signatures if is Varargs add to the last argument if the method has variable arguments String last Argument String result remove result size 1 result add last Argument substring 0 last Argument length 2 NON NLS 1 f Argument Type Names result return f Argument Type Names  argumentTypeNames fArgumentTypeNames fArgumentTypeNames GenericSignature listSignaturetoListName argumentTypeSignatures isVarargs lastArgument lastArgument lastArgument fArgumentTypeNames fArgumentTypeNames
return Returns a signatures of all declared argument types of this method private List argument Type Signatures if f Argument Type Signatures null return f Argument Type Signatures String signature generic Signature if signature null signature signature f Argument Type Signatures Generic Signature get Arguments Signature signature return f Argument Type Signatures  argumentTypeSignatures fArgumentTypeSignatures fArgumentTypeSignatures genericSignature fArgumentTypeSignatures GenericSignature getArgumentsSignature fArgumentTypeSignatures
return Returns the list containing the type of each argument public List argument Types throws Class Not Loaded Exception if f Argument Types null return f Argument Types List result new Array List Iterator iter argument Type Signatures iterator Class Loader Reference class Loader Ref declaring Type class Loader Virtual Machine Impl vm virtual Machine Impl while iter has Next String argument Type Signature String iter next result add Type Impl create vm argument Type Signature class Loader Ref f Argument Types result return f Argument Types  argumentTypes ClassNotLoadedException fArgumentTypes fArgumentTypes ArrayList argumentTypeSignatures ClassLoaderReference classLoaderRef declaringType classLoader VirtualMachineImpl virtualMachineImpl hasNext argumentTypeSignature TypeImpl argumentTypeSignature classLoaderRef fArgumentTypes fArgumentTypes
return Returns an array containing the bytecodes for this method public byte bytecodes if f Byte Codes null return f Byte Codes init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write With Reference Type this out Data Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet M BYTECODES out Bytes default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream int length read Int length reply Data NON NLS 1 f Byte Codes read Byte Array length bytecodes reply Data NON NLS 1 return f Byte Codes catch IO Exception e f Byte Codes null defaultIO Exception Handler e return null finally handled Jdwp Request  fByteCodes fByteCodes initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes writeWithReferenceType outData JdwpReplyPacket replyPacket JdwpCommandPacket M_BYTECODES outBytes defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream readInt replyData fByteCodes readByteArray replyData fByteCodes IOException fByteCodes defaultIOExceptionHandler handledJdwpRequest
return Returns the hash code value public int hash Code return f MethodID hash Code  hashCode fMethodID hashCode
return Returns true if two mirrors refer to the same entity in the target VM see java lang Object equals Object public boolean equals Object object return object null object get Class equals this get Class f MethodID equals Method Impl object f MethodID reference Type Impl equals Method Impl object reference Type Impl  getClass getClass fMethodID MethodImpl fMethodID referenceTypeImpl MethodImpl referenceTypeImpl
return Returns a negative integer zero or a positive integer as this object is less than equal to or greater than the specified object public int compare To Object object if object null object get Class equals this get Class throw new Class Cast Exception JDI Messages get String Method Impl Can  t compare method to given object 6 NON NLS 1 See if declaring types are the same if not return comparison between declaring types Method type2 Method object if declaring Type equals type2 declaring Type return declaring Type compare To type2 declaring Type Return comparison of position within declaring type int index1 declaring Type methods index Of this int index2 type2 declaring Type methods index Of type2 if index1 index2 return 1 else if index1 index2 return 1 else return 0  compareTo getClass getClass ClassCastException JDIMessages getString MethodImpl Can__t_compare_method_to_given_object_6 declaringType declaringType declaringType compareTo declaringType declaringType indexOf declaringType indexOf
see com sun jdi Method is Abstract public boolean is Abstract return f Modifier Bits MODIFIER ACC ABSTRACT 0  isAbstract isAbstract fModifierBits MODIFIER_ACC_ABSTRACT
see com sun jdi Method is Constructor public boolean is Constructor return name equals init NON NLS 1  isConstructor isConstructor
see com sun jdi Method is Native public boolean is Native return f Modifier Bits MODIFIER ACC NATIVE 0  isNative isNative fModifierBits MODIFIER_ACC_NATIVE
see com sun jdi Method is Static Initializer public boolean is Static Initializer return name equals clinit NON NLS 1  isStaticInitializer isStaticInitializer
see com sun jdi Method is Synchronized public boolean is Synchronized return f Modifier Bits MODIFIER ACC SYNCHRONIZED 0  isSynchronized isSynchronized fModifierBits MODIFIER_ACC_SYNCHRONIZED
see com sun jdi Method location Of Code Index long public Location location Of Code Index long index if is Abstract is Native return null try Integer line Nr Int Integer java Stratum Code Index To Line get new Long index if line Nr Int null throw new Invalid Code Index Exception Message Format format JDI Messages get String Method Impl No valid location at the specified code index  0  2 new Object Long to String index NON NLS 1 catch Absent Information Exception e return new Location Impl virtual Machine Impl this index  locationOfCodeIndex locationOfCodeIndex isAbstract isNative lineNrInt javaStratumCodeIndexToLine lineNrInt InvalidCodeIndexException MessageFormat JDIMessages getString MethodImpl No_valid_location_at_the_specified_code_index_ _2 toString AbsentInformationException LocationImpl virtualMachineImpl
see com sun jdi Method locations Of Line int public List locations Of Line int line throws Absent Information Exception Invalid Line Number Exception return locations Of Line virtual Machine get Default Stratum null line  locationsOfLine locationsOfLine AbsentInformationException InvalidLineNumberException locationsOfLine virtualMachine getDefaultStratum
see com sun jdi Method return Type public Type return Type throws Class Not Loaded Exception int start Index signature last Index Of 1 Signature position is just after ending brace return Type Impl create virtual Machine Impl signature substring start Index declaring Type class Loader  returnType returnType ClassNotLoadedException startIndex lastIndexOf TypeImpl virtualMachineImpl startIndex declaringType classLoader
see com sun jdi Method return Type Name public String return Type Name if f Return Type Name null return f Return Type Name String signature generic Signature if signature null signature signature f Return Type Name Generic Signature signature To Name Generic Signature get Return Type signature return f Return Type Name  returnTypeName returnTypeName fReturnTypeName fReturnTypeName genericSignature fReturnTypeName GenericSignature signatureToName GenericSignature getReturnType fReturnTypeName
see com sun jdi Method variables public List variables throws Absent Information Exception if is Native is Abstract throw new Absent Information Exception JDI Messages get String Method Impl No local variable information available 9 NON NLS 1 if f Variables null return f Variables init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write With Reference Type this out Data boolean with Generic Signature virtual Machine Impl is Jdwp Version Greater Or Equal 1 5 int jdwp Command with Generic Signature Jdwp Command Packet M VARIABLE TABLE WITH GENERIC Jdwp Command Packet M VARIABLE TABLE Jdwp Reply Packet reply Packet requestVM jdwp Command out Bytes switch reply Packet error Code case Jdwp Reply Packet ABSENT INFORMATION return infer Arguments default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f Argument Slots Count read Int arg count reply Data NON NLS 1 int nr Of Elements read Int elements reply Data NON NLS 1 List variables new Array List nr Of Elements for int i 0 i nr Of Elements i long code Index read Long code index reply Data NON NLS 1 String name read String name reply Data NON NLS 1 String signature read String signature reply Data NON NLS 1 String generic Signature null if with Generic Signature generic Signature read String generic signature reply Data NON NLS 1 if equals generic Signature NON NLS 1 generic Signature null int length read Int length reply Data NON NLS 1 int slot read Int slot reply Data NON NLS 1 boolean is Argument slot f Argument Slots Count Note that for instance methods the first slot contains the this reference if is Static slot 0 Local Variable Impl local Var new Local Variable Impl virtual Machine Impl this code Index name signature generic Signature length slot is Argument variables add local Var f Variables variables return f Variables catch IO Exception e f Argument Slots Count 1 f Variables null defaultIO Exception Handler e return null finally handled Jdwp Request  AbsentInformationException isNative isAbstract AbsentInformationException JDIMessages getString MethodImpl No_local_variable_information_available_9 fVariables fVariables initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes writeWithReferenceType outData withGenericSignature virtualMachineImpl isJdwpVersionGreaterOrEqual jdwpCommand withGenericSignature JdwpCommandPacket M_VARIABLE_TABLE_WITH_GENERIC JdwpCommandPacket M_VARIABLE_TABLE JdwpReplyPacket replyPacket jdwpCommand outBytes replyPacket errorCode JdwpReplyPacket ABSENT_INFORMATION inferArguments defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fArgumentSlotsCount readInt replyData nrOfElements readInt replyData ArrayList nrOfElements nrOfElements codeIndex readLong replyData readString replyData readString replyData genericSignature withGenericSignature genericSignature readString replyData genericSignature genericSignature readInt replyData readInt replyData isArgument fArgumentSlotsCount isStatic LocalVariableImpl localVar LocalVariableImpl virtualMachineImpl codeIndex genericSignature isArgument localVar fVariables fVariables IOException fArgumentSlotsCount fVariables defaultIOExceptionHandler handledJdwpRequest
throws Absent Information Exception private List infer Arguments throws Absent Information Exception infer arguments if possible try to generate the right generic signature for each argument String generic Signature generic Signature List parameter Signatures Generic Signature get Arguments Signature signature String signatures String parameter Signatures to Array new String parameter Signatures size String generic Signatures if generic Signature null generic Signatures new String signatures length else List parameter Generic Signatures Generic Signature get Arguments Signature generic Signature generic Signatures String parameter Generic Signatures to Array new String parameter Generic Signatures size for int i 0 i generic Signatures length i if generic Signatures i equals signatures i generic Signatures i null int slot 0 if is Static slot if signatures length 0 f Argument Slots Count signatures length f Variables new Array List f Argument Slots Count for int i 0 i signatures length i String name arg i NON NLS 1 Local Variable Impl local Var new Local Variable Impl virtual Machine Impl this 0 name signatures i generic Signatures i 1 slot true f Variables add local Var slot return f Variables throw new Absent Information Exception JDI Messages get String Method Impl No local variable information available 9 NON NLS 1  AbsentInformationException inferArguments AbsentInformationException genericSignature genericSignature parameterSignatures GenericSignature getArgumentsSignature parameterSignatures toArray parameterSignatures genericSignatures genericSignature genericSignatures parameterGenericSignatures GenericSignature getArgumentsSignature genericSignature genericSignatures parameterGenericSignatures toArray parameterGenericSignatures genericSignatures genericSignatures genericSignatures isStatic fArgumentSlotsCount fVariables ArrayList fArgumentSlotsCount LocalVariableImpl localVar LocalVariableImpl virtualMachineImpl genericSignatures fVariables localVar fVariables AbsentInformationException JDIMessages getString MethodImpl No_local_variable_information_available_9
see com sun jdi Method variables By Name String public List variables By Name String name throws Absent Information Exception Iterator iter variables iterator List result new Array List while iter has Next Local Variable Impl var Local Variable Impl iter next if var name equals name result add var return result  variablesByName variablesByName AbsentInformationException ArrayList hasNext LocalVariableImpl LocalVariableImpl
see com sun jdi Locatable location public Location location if is Abstract return null if is Native return new Location Impl virtual Machine Impl this 1 First retrieve line code table try get Line Table catch Absent Information Exception e return new Location Impl virtual Machine Impl this 1 Return location with Lowest Valid Code Index return new Location Impl virtual Machine Impl this f Lowest Valid Code Index  isAbstract isNative LocationImpl virtualMachineImpl getLineTable AbsentInformationException LocationImpl virtualMachineImpl LocationImpl virtualMachineImpl fLowestValidCodeIndex
Writes JDWP representation public void write Mirror Impl target Data Output Stream out throws IO Exception f MethodID write out if target f Verbose Writer null target f Verbose Writer println method f MethodID value NON NLS 1  MirrorImpl DataOutputStream IOException fMethodID fVerboseWriter fVerboseWriter fMethodID
Writes JDWP representation including Reference Type protected void write With Reference Type Mirror Impl target Data Output Stream out throws IO Exception reference Type Impl write target out write target out  ReferenceType writeWithReferenceType MirrorImpl DataOutputStream IOException referenceTypeImpl
Writes JDWP representation including Reference Type with Tag protected void write With Reference Type With Tag Mirror Impl target Data Output Stream out throws IO Exception reference Type Impl write With Tag target out write target out  ReferenceType writeWithReferenceTypeWithTag MirrorImpl DataOutputStream IOException referenceTypeImpl writeWithTag
return Reads JDWP representation and returns new instance protected static Method Impl read With Reference Type With Tag Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl See Location Reference Type Impl reference Type Reference Type Impl read With Type Tag target in if reference Type null return null Jdwp MethodID ID new Jdwp MethodID vm Impl if target f Verbose Writer null target f Verbose Writer println method ID value NON NLS 1 ID read in if ID is Null return null The method must be part of a known reference type Method Impl method reference Type find Method ID if method null throw new Internal Error JDI Messages get String Method Impl Got MethodID of ReferenceType that is not a member of the ReferenceType 10 NON NLS 1 return method  MethodImpl readWithReferenceTypeWithTag MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl ReferenceTypeImpl referenceType ReferenceTypeImpl readWithTypeTag referenceType JdwpMethodID JdwpMethodID vmImpl fVerboseWriter fVerboseWriter isNull MethodImpl referenceType findMethod InternalError JDIMessages getString MethodImpl Got_MethodID_of_ReferenceType_that_is_not_a_member_of_the_ReferenceType_10
return Reads JDWP representation and returns new instance protected static Method Impl read With Name Signature Modifiers Reference Type Impl target Reference Type Impl reference Type boolean with Generic Signature Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp MethodID ID new Jdwp MethodID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println method ID value NON NLS 1 if ID is Null return null String name target read String name in NON NLS 1 String signature target read String signature in NON NLS 1 String generic Signature null if with Generic Signature generic Signature target read String generic signature in NON NLS 1 if equals generic Signature NON NLS 1 generic Signature null int modifier Bits target read Int modifiers Accessible Impl get Modifier Strings in NON NLS 1 Method Impl mirror new Method Impl vm Impl reference Type ID name signature generic Signature modifier Bits return mirror  MethodImpl readWithNameSignatureModifiers ReferenceTypeImpl ReferenceTypeImpl referenceType withGenericSignature DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpMethodID JdwpMethodID vmImpl fVerboseWriter fVerboseWriter isNull readString readString genericSignature withGenericSignature genericSignature readString genericSignature genericSignature modifierBits readInt AccessibleImpl getModifierStrings MethodImpl MethodImpl vmImpl referenceType genericSignature modifierBits
Retrieves constant mappings public static void get Constant Maps if fg Invoke Options null return Field fields Method Impl class get Declared Fields fg Invoke Options new String 32 for int i 0 i fields length i Field field fields i if field get Modifiers Modifier PUBLIC 0 field get Modifiers java lang reflect Modifier STATIC 0 field get Modifiers Modifier FINAL 0 continue try String name field get Name if name starts With INVOKE  NON NLS 1 int value field get Int null for int j 0 j fg Invoke Options length j if 1 j value 0 fg Invoke Options j name break catch Illegal Access Exception e Will not occur for own class catch Illegal Argument Exception e Should not occur We should take care that all public static final constants in this class are numbers that are convertible to int  getConstantMaps fgInvokeOptions MethodImpl getDeclaredFields fgInvokeOptions getModifiers getModifiers getModifiers getName startsWith INVOKE_ getInt fgInvokeOptions fgInvokeOptions IllegalAccessException IllegalArgumentException
return Returns a map with string representations of tags protected static String get Invoke Options get Constant Maps return fg Invoke Options  getInvokeOptions getConstantMaps fgInvokeOptions
see Method is Obsolete The JDK 1 4 0 specification states that obsolete methods are given an ID of zero It also states that when a method is redefined the new method gets the ID of the old method Thus the JDWP query for is Obsolete on JDK 1 4 will never return true for a non zero method ID The query is therefore not needed public boolean is Obsolete if virtual Machine Impl is Jdwp Version Greater Or Equal 1 4 return f MethodID value 0 return false  isObsolete isObsolete isObsolete virtualMachineImpl isJdwpVersionGreaterOrEqual fMethodID
see Method all Line Locations String String public List all Line Locations String stratum String source Name throws Absent Information Exception if is Abstract is Native return Collections EMPTY LIST if stratum null if stratum not defined use the default stratum for the declaring type stratum declaring Type default Stratum List all Line Locations null Map source Name All Line Locations null if f Stratum All Line Locations null the stratum map doesn t exist create it f Stratum All Line Locations new Hash Map else get the source name map source Name All Line Locations Map f Stratum All Line Locations get stratum if source Name All Line Locations null the source name map doesn t exist create it source Name All Line Locations new Hash Map f Stratum All Line Locations put stratum source Name All Line Locations else get the line locations all Line Locations List source Name All Line Locations get source Name if all Line Locations null the line locations are not know compute and store them get Line Table all Line Locations reference Type Impl all Line Locations stratum source Name this f Code Index Table f Java Stratum Line Number Table source Name All Line Locations put source Name all Line Locations return all Line Locations  allLineLocations allLineLocations sourceName AbsentInformationException isAbstract isNative EMPTY_LIST declaringType defaultStratum allLineLocations sourceNameAllLineLocations fStratumAllLineLocations fStratumAllLineLocations HashMap sourceNameAllLineLocations fStratumAllLineLocations sourceNameAllLineLocations sourceNameAllLineLocations HashMap fStratumAllLineLocations sourceNameAllLineLocations allLineLocations sourceNameAllLineLocations sourceName allLineLocations getLineTable allLineLocations referenceTypeImpl allLineLocations sourceName fCodeIndexTable fJavaStratumLineNumberTable sourceNameAllLineLocations sourceName allLineLocations allLineLocations
see Method locations Of Line String String int public List locations Of Line String stratum String source Name int line Number throws Absent Information Exception if is Abstract is Native return Collections EMPTY LIST return reference Type Impl locations Of Line stratum source Name line Number this  locationsOfLine locationsOfLine sourceName lineNumber AbsentInformationException isAbstract isNative EMPTY_LIST referenceTypeImpl locationsOfLine sourceName lineNumber
Return a list which contains a location for the each disjoin range of code indice that have bean assigned to the given lines by the compiler or and the VM Return an empty list if there is not executable code at the specified lines protected List java Stratum Locations Of Lines List java Lines throws Absent Information Exception Set tmp Locations new Tree Set for Iterator iter java Lines iterator iter has Next Integer key Integer iter next List indexes java Stratum Line To Code Indexes key int Value if indexes null tmp Locations add All indexes List locations new Array List for Iterator iter tmp Locations iterator iter has Next long index Long iter next long Value int position Arrays binary Search f Code Index Table index if position 0 tmp Locations contains new Long f Code Index Table position 1 locations add new Location Impl virtual Machine Impl this index return locations  javaStratumLocationsOfLines javaLines AbsentInformationException tmpLocations TreeSet javaLines hasNext javaStratumLineToCodeIndexes intValue tmpLocations addAll ArrayList tmpLocations hasNext longValue binarySearch fCodeIndexTable tmpLocations fCodeIndexTable LocationImpl virtualMachineImpl
public boolean is Bridge return f Modifier Bits MODIFIER ACC BRIDGE 0  isBridge fModifierBits MODIFIER_ACC_BRIDGE
public boolean is Varargs TODO remove this test when j9 solve its problem it returns invalid 1 5 flags for 1 4 classes see bug 53870 return virtual Machine name equals j9 f Modifier Bits MODIFIER ACC VARARGS 0 NON NLS 1  isVarargs virtualMachine fModifierBits MODIFIER_ACC_VARARGS

Constructor only to be used by Virtual Machine objects stores description of Mirror object and Virtual Machine public Mirror Impl String description f Description description f Virtual Machine Impl Virtual Machine Impl this Print Writer writer Virtual Machine Manager Impl org eclipse jdi Bootstrap virtual Machine Manager verbose Print Writer if writer null f Verbose Writer new Verbose Writer writer  MirrorImpl fDescription fVirtualMachineImpl VirtualMachineImpl PrintWriter VirtualMachineManagerImpl virtualMachineManager verbosePrintWriter fVerboseWriter VerboseWriter
Constructor stores description of Mirror object and its Virtual Machine public Mirror Impl String description Virtual Machine Impl virtual Machine Impl f Virtual Machine Impl virtual Machine Impl f Description description Print Writer writer Virtual Machine Manager Impl org eclipse jdi Bootstrap virtual Machine Manager verbose Print Writer if writer null f Verbose Writer new Verbose Writer writer  MirrorImpl VirtualMachineImpl virtualMachineImpl fVirtualMachineImpl virtualMachineImpl fDescription PrintWriter VirtualMachineManagerImpl virtualMachineManager verbosePrintWriter fVerboseWriter VerboseWriter
return Returns description of Mirror object public String to String return f Description  toString fDescription
return Returns Virtual Machine of Mirror object public Virtual Machine virtual Machine return f Virtual Machine Impl  VirtualMachine virtualMachine fVirtualMachineImpl
return Returns Virtual Machine implementation of Mirror object public Virtual Machine Impl virtual Machine Impl return f Virtual Machine Impl  VirtualMachineImpl virtualMachineImpl fVirtualMachineImpl
Processing before each Jdwp event public void init Jdwp Event Set Jdwp Command Packet command Packet if f Verbose Writer null f Verbose Writer println Received event set NON NLS 1 f Verbose Writer println length command Packet get Length NON NLS 1 f Verbose Writer println id command Packet get Id NON NLS 1 f Verbose Writer println flags command Packet get Flags Jdwp Packet get Flag Map NON NLS 1 f Verbose Writer println command set byte command Packet get Command 8 NON NLS 1 f Verbose Writer println command byte command Packet get Command NON NLS 1  initJdwpEventSet JdwpCommandPacket commandPacket fVerboseWriter fVerboseWriter fVerboseWriter commandPacket getLength fVerboseWriter commandPacket getId fVerboseWriter commandPacket getFlags JdwpPacket getFlagMap fVerboseWriter commandPacket getCommand fVerboseWriter commandPacket getCommand
Processing after each Jdwp Event public void handled Jdwp Event Set if f Verbose Writer null f Verbose Writer println f Verbose Writer flush  handledJdwpEventSet fVerboseWriter fVerboseWriter fVerboseWriter
Processing before each Jdwp request Note that this includes building the request message and parsing the response public void init Jdwp Request if f Verbose Writer null f Verbose Writer goto Position 6  initJdwpRequest fVerboseWriter fVerboseWriter gotoPosition
Writes command packet header if verbose is on public void write Verbose Command Packet Header Jdwp Command Packet command Packet if f Verbose Writer null int command command Packet get Command int current Position f Verbose Writer position f Verbose Writer goto Position 0 f Verbose Writer print Sending command NON NLS 1 f Verbose Writer print Value command Jdwp Command Packet command Map f Verbose Writer println NON NLS 1 f Verbose Writer println length command Packet get Length NON NLS 1 f Verbose Writer println id command Packet get Id NON NLS 1 f Verbose Writer println flags command Packet get Flags Jdwp Packet get Flag Map NON NLS 1 f Verbose Writer println command set byte command 8 NON NLS 1 f Verbose Writer println command byte command NON NLS 1 f Verbose Writer goto Position current Position  writeVerboseCommandPacketHeader JdwpCommandPacket commandPacket fVerboseWriter commandPacket getCommand currentPosition fVerboseWriter fVerboseWriter gotoPosition fVerboseWriter fVerboseWriter printValue JdwpCommandPacket commandMap fVerboseWriter fVerboseWriter commandPacket getLength fVerboseWriter commandPacket getId fVerboseWriter commandPacket getFlags JdwpPacket getFlagMap fVerboseWriter fVerboseWriter fVerboseWriter gotoPosition currentPosition
Processing after each Jdwp Request public void handled Jdwp Request if f Verbose Writer null f Pending Jdwp Request f Verbose Writer println f Verbose Writer flush f Pending Jdwp Request false  handledJdwpRequest fVerboseWriter fPendingJdwpRequest fVerboseWriter fVerboseWriter fPendingJdwpRequest
Performs a VM request return Returns reply data public Jdwp Reply Packet requestVM int command byte out Data Jdwp Command Packet command Packet new Jdwp Command Packet command command Packet set Data out Data f Virtual Machine Impl packet Send Manager send Packet command Packet f Pending Jdwp Request true write Verbose Command Packet Header command Packet Jdwp Reply Packet reply f Virtual Machine Impl packet Receive Manager get Reply command Packet if f Verbose Writer null f Verbose Writer println f Verbose Writer println Received reply NON NLS 1 f Verbose Writer println length reply get Length NON NLS 1 f Verbose Writer println id reply get Id NON NLS 1 f Verbose Writer println flags reply get Flags Jdwp Packet get Flag Map NON NLS 1 f Verbose Writer println error code reply error Code Jdwp Reply Packet error Map NON NLS 1 return reply  JdwpReplyPacket outData JdwpCommandPacket commandPacket JdwpCommandPacket commandPacket setData outData fVirtualMachineImpl packetSendManager sendPacket commandPacket fPendingJdwpRequest writeVerboseCommandPacketHeader commandPacket JdwpReplyPacket fVirtualMachineImpl packetReceiveManager getReply commandPacket fVerboseWriter fVerboseWriter fVerboseWriter fVerboseWriter getLength fVerboseWriter getId fVerboseWriter getFlags JdwpPacket getFlagMap fVerboseWriter errorCode JdwpReplyPacket errorMap
Performs a VM request return Returns reply data public Jdwp Reply Packet requestVM int command Byte Array Output Stream out Data return requestVM command out Data to Byte Array  JdwpReplyPacket ByteArrayOutputStream outData outData toByteArray
Performs a VM request for a specified object return Returns reply data public Jdwp Reply Packet requestVM int command Object Reference Impl object Byte Array Output Stream byte Out Stream new Byte Array Output Stream Data Output Stream data Out Stream new Data Output Stream byte Out Stream try object write this data Out Stream catch IO Exception e defaultIO Exception Handler e return requestVM command byte Out Stream  JdwpReplyPacket ObjectReferenceImpl ByteArrayOutputStream byteOutStream ByteArrayOutputStream DataOutputStream dataOutStream DataOutputStream byteOutStream dataOutStream IOException defaultIOExceptionHandler byteOutStream
Performs a VM request for a specified object return Returns reply data public Jdwp Reply Packet requestVM int command Reference Type Impl ref Type Byte Array Output Stream byte Out Stream new Byte Array Output Stream Data Output Stream data Out Stream new Data Output Stream byte Out Stream try ref Type write this data Out Stream catch IO Exception e defaultIO Exception Handler e return requestVM command byte Out Stream  JdwpReplyPacket ReferenceTypeImpl refType ByteArrayOutputStream byteOutStream ByteArrayOutputStream DataOutputStream dataOutStream DataOutputStream byteOutStream refType dataOutStream IOException defaultIOExceptionHandler byteOutStream
Performs a VM request return Returns reply data public Jdwp Reply Packet requestVM int command return requestVM command byte null  JdwpReplyPacket
Performs default error handling public void default Reply Error Handler int error switch error case Jdwp Reply Packet NONE break case Jdwp Reply Packet INVALID OBJECT throw new Object Collected Exception case Jdwp Reply Packet INVALID CLASS throw new Class Not Prepared Exception case Jdwp Reply Packet CLASS NOT PREPARED throw new Class Not Prepared Exception case Jdwp Reply Packet OUT OF MEMORY throw new VM Out Of Memory Exception case Jdwp Reply Packet ILLEGAL ARGUMENT throw new Illegal Argument Exception case Jdwp Reply Packet NATIVE METHOD throw new Native Method Exception case Jdwp Reply Packet INVALID FRAMEID throw new Invalid Stack Frame Exception case Jdwp Reply Packet NOT IMPLEMENTED throw new Unsupported Operation Exception case Jdwp Reply Packet HCR OPERATION REFUSED throw new org eclipse jdi hcr Operation Refused Exception case Jdwp Reply Packet VM DEAD throw new VM Disconnected Exception default throw new Internal Exception JDI Messages get String Mirror Impl Got error code in reply   1 error NON NLS 1  defaultReplyErrorHandler JdwpReplyPacket JdwpReplyPacket INVALID_OBJECT ObjectCollectedException JdwpReplyPacket INVALID_CLASS ClassNotPreparedException JdwpReplyPacket CLASS_NOT_PREPARED ClassNotPreparedException JdwpReplyPacket OUT_OF_MEMORY VMOutOfMemoryException JdwpReplyPacket ILLEGAL_ARGUMENT IllegalArgumentException JdwpReplyPacket NATIVE_METHOD NativeMethodException JdwpReplyPacket INVALID_FRAMEID InvalidStackFrameException JdwpReplyPacket NOT_IMPLEMENTED UnsupportedOperationException JdwpReplyPacket HCR_OPERATION_REFUSED OperationRefusedException JdwpReplyPacket VM_DEAD VMDisconnectedException InternalException JDIMessages getString MirrorImpl Got_error_code_in_reply___1
Performs default handling of IO Exception in creating or interpreting a Jdwp packet public void defaultIO Exception Handler Exception e throw new Internal Exception JDI Messages get String Mirror Impl Got invalid data   2 e NON NLS 1  IOException defaultIOExceptionHandler InternalException JDIMessages getString MirrorImpl Got_invalid_data___2
Waits for a specified command packet from the VM return Returns Command Packet from VM public final Jdwp Command Packet get CommandVM int command long timeout throws Interrupted Exception return f Virtual Machine Impl packet Receive Manager get Command command timeout  JdwpCommandPacket getCommandVM InterruptedException fVirtualMachineImpl packetReceiveManager getCommand
exception VM Mismatch Exception is thrown if the Mirror argument and this mirror do not belong to the same Virtual Machine public void checkVM Mirror mirror throws VM Mismatch Exception if Mirror Impl mirror virtual Machine Impl this virtual Machine Impl throw new VM Mismatch Exception  VMMismatchException VirtualMachine VMMismatchException MirrorImpl virtualMachineImpl virtualMachineImpl VMMismatchException
Disconnects VM public void disconnectVM f Virtual Machine Impl packet Send Manager disconnectVM  fVirtualMachineImpl packetSendManager
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public byte read Byte String description Data Input Stream in throws IO Exception byte result in read Byte if f Verbose Writer null f Verbose Writer println description result return result  readByte DataInputStream IOException readByte fVerboseWriter fVerboseWriter
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public short read Short String description Data Input Stream in throws IO Exception short result in read Short if f Verbose Writer null f Verbose Writer println description result return result  readShort DataInputStream IOException readShort fVerboseWriter fVerboseWriter
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public int read Int String description Data Input Stream in throws IO Exception int result in read Int if f Verbose Writer null f Verbose Writer println description result return result  readInt DataInputStream IOException readInt fVerboseWriter fVerboseWriter
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public long read Long String description Data Input Stream in throws IO Exception long result in read Long if f Verbose Writer null f Verbose Writer println description result return result  readLong DataInputStream IOException readLong fVerboseWriter fVerboseWriter
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public byte read Byte String description Map value To String Data Input Stream in throws IO Exception byte result in read Byte if f Verbose Writer null f Verbose Writer println description result value To String return result  readByte valueToString DataInputStream IOException readByte fVerboseWriter fVerboseWriter valueToString
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public short read Short String description Map value To String Data Input Stream in throws IO Exception short result in read Short if f Verbose Writer null f Verbose Writer println description result value To String return result  readShort valueToString DataInputStream IOException readShort fVerboseWriter fVerboseWriter valueToString
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public int read Int String description Map value To String Data Input Stream in throws IO Exception int result in read Int if f Verbose Writer null f Verbose Writer println description result value To String return result  readInt valueToString DataInputStream IOException readInt fVerboseWriter fVerboseWriter valueToString
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public String read String String description Data Input Stream in throws IO Exception String result Jdwp String read in if f Verbose Writer null f Verbose Writer println description result return result  readString DataInputStream IOException JdwpString fVerboseWriter fVerboseWriter
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public boolean read Boolean String description Data Input Stream in throws IO Exception boolean result in read Boolean if f Verbose Writer null f Verbose Writer println description result return result  readBoolean DataInputStream IOException readBoolean fVerboseWriter fVerboseWriter
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public char read Char String description Data Input Stream in throws IO Exception char result in read Char if f Verbose Writer null f Verbose Writer println description result return result  readChar DataInputStream IOException readChar fVerboseWriter fVerboseWriter
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public double read Double String description Data Input Stream in throws IO Exception double result in read Double if f Verbose Writer null f Verbose Writer println description result return result  readDouble DataInputStream IOException readDouble fVerboseWriter fVerboseWriter
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public float read Float String description Data Input Stream in throws IO Exception float result in read Float if f Verbose Writer null f Verbose Writer println description result return result  readFloat DataInputStream IOException readFloat fVerboseWriter fVerboseWriter
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public byte read Byte Array int length String description Data Input Stream in throws IO Exception byte result new byte length in read Fully result if f Verbose Writer null f Verbose Writer println description result return result  readByteArray DataInputStream IOException readFully fVerboseWriter fVerboseWriter
Writes Jdwp data and if verbose is on outputs verbose info public void write Byte byte value String description Data Output Stream out throws IO Exception out write Byte value if f Verbose Writer null f Verbose Writer println description value  writeByte DataOutputStream IOException writeByte fVerboseWriter fVerboseWriter
Writes Jdwp data and if verbose is on outputs verbose info public void write Short short value String description Data Output Stream out throws IO Exception out write Short value if f Verbose Writer null f Verbose Writer println description value  writeShort DataOutputStream IOException writeShort fVerboseWriter fVerboseWriter
Writes Jdwp data and if verbose is on outputs verbose info public void write Int int value String description Data Output Stream out throws IO Exception out write Int value if f Verbose Writer null f Verbose Writer println description value  writeInt DataOutputStream IOException writeInt fVerboseWriter fVerboseWriter
Writes Jdwp data and if verbose is on outputs verbose info public void write Long long value String description Data Output Stream out throws IO Exception out write Long value if f Verbose Writer null f Verbose Writer println description value  writeLong DataOutputStream IOException writeLong fVerboseWriter fVerboseWriter
Writes Jdwp data and if verbose is on outputs verbose info public void write Byte byte value String description Map value To String Data Output Stream out throws IO Exception out write Byte value if f Verbose Writer null f Verbose Writer println description value value To String  writeByte valueToString DataOutputStream IOException writeByte fVerboseWriter fVerboseWriter valueToString
Writes Jdwp data and if verbose is on outputs verbose info public void write Short short value String description Map value To String Data Output Stream out throws IO Exception out write Short value if f Verbose Writer null f Verbose Writer println description value value To String  writeShort valueToString DataOutputStream IOException writeShort fVerboseWriter fVerboseWriter valueToString
Writes Jdwp data and if verbose is on outputs verbose info public void write Int int value String description Map value To String Data Output Stream out throws IO Exception out write Int value if f Verbose Writer null f Verbose Writer println description value value To String  writeInt valueToString DataOutputStream IOException writeInt fVerboseWriter fVerboseWriter valueToString
Writes Jdwp data and if verbose is on outputs verbose info public void write String String value String description Data Output Stream out throws IO Exception Jdwp String write value out if f Verbose Writer null f Verbose Writer println description value  writeString DataOutputStream IOException JdwpString fVerboseWriter fVerboseWriter
Writes Jdwp data and if verbose is on outputs verbose info public void write Boolean boolean value String description Data Output Stream out throws IO Exception out write Boolean value if f Verbose Writer null f Verbose Writer println description value  writeBoolean DataOutputStream IOException writeBoolean fVerboseWriter fVerboseWriter
Writes Jdwp data and if verbose is on outputs verbose info public void write Char char value String description Data Output Stream out throws IO Exception out write Char value if f Verbose Writer null f Verbose Writer println description value  writeChar DataOutputStream IOException writeChar fVerboseWriter fVerboseWriter
Writes Jdwp data and if verbose is on outputs verbose info public void write Double double value String description Data Output Stream out throws IO Exception out write Double value if f Verbose Writer null f Verbose Writer println description value  writeDouble DataOutputStream IOException writeDouble fVerboseWriter fVerboseWriter
Writes Jdwp data and if verbose is on outputs verbose info public void write Float float value String description Data Output Stream out throws IO Exception out write Float value if f Verbose Writer null f Verbose Writer println description value  writeFloat DataOutputStream IOException writeFloat fVerboseWriter fVerboseWriter
Writes Jdwp data and if verbose is on outputs verbose info public void write Short short value String description String bit Names Data Output Stream out throws IO Exception out write Short value if f Verbose Writer null f Verbose Writer println description value bit Names  writeShort bitNames DataOutputStream IOException writeShort fVerboseWriter fVerboseWriter bitNames
Writes Jdwp data and if verbose is on outputs verbose info public void write Int int value String description String bit Names Data Output Stream out throws IO Exception out write Int value if f Verbose Writer null f Verbose Writer println description value bit Names  writeInt bitNames DataOutputStream IOException writeInt fVerboseWriter fVerboseWriter bitNames
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public byte read Byte String description String bit Names Data Input Stream in throws IO Exception byte result in read Byte if f Verbose Writer null f Verbose Writer println description result bit Names return result  readByte bitNames DataInputStream IOException readByte fVerboseWriter fVerboseWriter bitNames
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public short read Short String description String bit Names Data Input Stream in throws IO Exception short result in read Short if f Verbose Writer null f Verbose Writer println description result bit Names return result  readShort bitNames DataInputStream IOException readShort fVerboseWriter fVerboseWriter bitNames
Reads Jdwp data and if verbose is on outputs verbose info return Returns value that has been read public int read Int String description String bit Names Data Input Stream in throws IO Exception int result in read Int if f Verbose Writer null f Verbose Writer println description result bit Names return result  readInt bitNames DataInputStream IOException readInt fVerboseWriter fVerboseWriter bitNames
Writes Jdwp data and if verbose is on outputs verbose info public void write Byte byte value String description String bit Names Data Output Stream out throws IO Exception out write Byte value if f Verbose Writer null f Verbose Writer println description value bit Names  writeByte bitNames DataOutputStream IOException writeByte fVerboseWriter fVerboseWriter bitNames
return Returns Verbose Writer where verbose info is written to null if no verbose must be given public Verbose Writer verbose Writer return f Verbose Writer  VerboseWriter VerboseWriter verboseWriter fVerboseWriter

Creates new Object Reference Impl public Object Reference Impl Virtual Machine Impl vm Impl Jdwp ObjectID objectID this Object Reference vm Impl objectID NON NLS 1  ObjectReferenceImpl ObjectReferenceImpl VirtualMachineImpl vmImpl JdwpObjectID ObjectReference vmImpl
Creates new Object Reference Impl public Object Reference Impl String description Virtual Machine Impl vm Impl Jdwp ObjectID objectID super description vm Impl f ObjectID objectID  ObjectReferenceImpl ObjectReferenceImpl VirtualMachineImpl vmImpl JdwpObjectID vmImpl fObjectID
returns tag public byte get Tag return tag  getTag
return Returns Jdwp Object ID public Jdwp ObjectID get ObjectID return f ObjectID  JdwpObjectID getObjectID fObjectID
Prevents garbage collection for this object public void disable Collection init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet OR DISABLE COLLECTION this default Reply Error Handler reply Packet error Code finally handled Jdwp Request  disableCollection initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket OR_DISABLE_COLLECTION defaultReplyErrorHandler replyPacket errorCode handledJdwpRequest
Permits garbage collection for this object public void enable Collection init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet OR ENABLE COLLECTION this default Reply Error Handler reply Packet error Code finally handled Jdwp Request  enableCollection initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket OR_ENABLE_COLLECTION defaultReplyErrorHandler replyPacket errorCode handledJdwpRequest
return Returns monitor info private Monitor Info monitor Info throws Incompatible Thread State Exception if virtual Machine can Get Monitor Info throw new Unsupported Operation Exception Note that this information should not be cached init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet OR MONITOR INFO this switch reply Packet error Code case Jdwp Reply Packet INVALID THREAD throw new Incompatible Thread State Exception case Jdwp Reply Packet THREAD NOT SUSPENDED throw new Incompatible Thread State Exception default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream Monitor Info result new Monitor Info result owner Thread Reference Impl read this reply Data result entry Count read Int entry count reply Data NON NLS 1 int nr Of Waiters read Int nr of waiters reply Data NON NLS 1 result waiters new Array List nr Of Waiters for int i 0 i nr Of Waiters i result waiters add Thread Reference Impl read this reply Data return result catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  MonitorInfo monitorInfo IncompatibleThreadStateException virtualMachine canGetMonitorInfo UnsupportedOperationException initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket OR_MONITOR_INFO replyPacket errorCode JdwpReplyPacket INVALID_THREAD IncompatibleThreadStateException JdwpReplyPacket THREAD_NOT_SUSPENDED IncompatibleThreadStateException defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream MonitorInfo MonitorInfo ThreadReferenceImpl replyData entryCount readInt replyData nrOfWaiters readInt replyData ArrayList nrOfWaiters nrOfWaiters ThreadReferenceImpl replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Returns an Thread Reference for the thread if any which currently owns this object s monitor public Thread Reference owning Thread throws Incompatible Thread State Exception return monitor Info owner  ThreadReference ThreadReference owningThread IncompatibleThreadStateException monitorInfo
return Returns the number times this object s monitor has been entered by the current owning thread public int entry Count throws Incompatible Thread State Exception return monitor Info entry Count  entryCount IncompatibleThreadStateException monitorInfo entryCount
return Returns a List containing a Thread Reference for each thread currently waiting for this object s monitor public List waiting Threads throws Incompatible Thread State Exception return monitor Info waiters  ThreadReference waitingThreads IncompatibleThreadStateException monitorInfo
return Returns the value of a given instance or static field in this object public Value get Value Field field Array List list new Array List 1 list add field return Value Impl get Values list get field  getValue ArrayList ArrayList ValueImpl getValues
return Returns the value of multiple instance and or static fields in this object public Map get Values List all Fields if the field list is empty nothing to do if all Fields is Empty return new Hash Map Note that this information should not be cached init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes Distinguish static fields from non static fields For static fields Reference Type Impl get Values must be used List static Fields new Array List List non Static Fields new Array List Separate static and non static fields int all Fields Size all Fields size for int i 0 i all Fields Size i Field Impl field Field Impl all Fields get i checkVM field if field is Static static Fields add field else non Static Fields add field First get values for the static fields Map result Map if static Fields is Empty result Map new Hash Map else result Map reference Type get Values static Fields if no non static fields are requested return directly the result if non Static Fields is Empty return result Map Then get the values for the non static fields int non Static Fields Size non Static Fields size write this out Data write Int non Static Fields Size size out Data NON NLS 1 for int i 0 i non Static Fields Size i Field Impl field Field Impl non Static Fields get i field write this out Data Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet OR GET VALUES out Bytes default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream int nr Of Elements read Int elements reply Data NON NLS 1 if nr Of Elements non Static Fields Size throw new Internal Error JDI Messages get String Object Reference Impl Retrieved a different number of values from the VM than requested 1 NON NLS 1 for int i 0 i nr Of Elements i result Map put non Static Fields get i Value Impl read With Tag this reply Data return result Map catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  getValues allFields allFields isEmpty HashMap initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes ReferenceTypeImpl getValues staticFields ArrayList nonStaticFields ArrayList allFieldsSize allFields allFieldsSize FieldImpl FieldImpl allFields isStatic staticFields nonStaticFields resultMap staticFields isEmpty resultMap HashMap resultMap referenceType getValues staticFields nonStaticFields isEmpty resultMap nonStaticFieldsSize nonStaticFields outData writeInt nonStaticFieldsSize outData nonStaticFieldsSize FieldImpl FieldImpl nonStaticFields outData JdwpReplyPacket replyPacket JdwpCommandPacket OR_GET_VALUES outBytes defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream nrOfElements readInt replyData nrOfElements nonStaticFieldsSize InternalError JDIMessages getString ObjectReferenceImpl Retrieved_a_different_number_of_values_from_the_VM_than_requested_1 nrOfElements resultMap nonStaticFields ValueImpl readWithTag replyData resultMap IOException defaultIOExceptionHandler handledJdwpRequest
return Returns the hash code value public int hash Code return f ObjectID hash Code  hashCode fObjectID hashCode
return Returns true if two mirrors refer to the same entity in the target VM see java lang Object equals Object public boolean equals Object object return object null object get Class equals this get Class f ObjectID equals Object Reference Impl object f ObjectID virtual Machine equals Mirror Impl object virtual Machine  getClass getClass fObjectID ObjectReferenceImpl fObjectID virtualMachine MirrorImpl virtualMachine
return Returns Jdwp version of given options private int options To Jdwp Options int options int jdwp Options 0 if options INVOKE SINGLE THREADED 0 jdwp Options Method Impl INVOKE SINGLE THREADED JDWP if options INVOKE NONVIRTUAL 0 jdwp Options Method Impl INVOKE NONVIRTUAL JDWP return jdwp Options  optionsToJdwpOptions jdwpOptions INVOKE_SINGLE_THREADED jdwpOptions MethodImpl INVOKE_SINGLE_THREADED_JDWP INVOKE_NONVIRTUAL jdwpOptions MethodImpl INVOKE_NONVIRTUAL_JDWP jdwpOptions
Invokes the specified static Method in the target VM return Returns a Value mirror of the invoked method s return value public Value invoke Method Thread Reference thread Method method List arguments int options throws Invalid Type Exception Class Not Loaded Exception Incompatible Thread State Exception Invocation Exception checkVM thread checkVM method Thread Reference Impl thread Impl Thread Reference Impl thread Method Impl method Impl Method Impl method Perform some checks for Illegal Argument Exception if isA Valid Method method throw new Illegal Argument Exception JDI Messages get String Object Reference Impl Class does not contain given method 2 NON NLS 1 if method argument Type Names size arguments size throw new Illegal Argument Exception JDI Messages get String Object Reference Impl Number of arguments doesn  t match 3 NON NLS 1 if method is Constructor method is Static Initializer throw new Illegal Argument Exception JDI Messages get String Object Reference Impl Method is constructor or intitializer 4 NON NLS 1 if options INVOKE NONVIRTUAL 0 method is Abstract throw new Illegal Argument Exception JDI Messages get String Object Reference Impl Method is abstract and can therefore not be invoked nonvirtual 5 NON NLS 1 check the type and the vm of the argument convert the value if needed List checked Arguments Value Impl check Values arguments method argument Types virtual Machine Impl init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write this out Data thread Impl write this out Data Reference Type Impl reference Type write this out Data method Impl write this out Data write Int checked Arguments size size out Data NON NLS 1 Iterator iter checked Arguments iterator while iter has Next Value Impl elt Value Impl iter next if elt null elt write With Tag this out Data else Value Impl write Null With Tag this out Data write Int options To Jdwp Options options options Method Impl get Invoke Options out Data NON NLS 1 Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet OR INVOKE METHOD out Bytes switch reply Packet error Code case Jdwp Reply Packet TYPE MISMATCH throw new Invalid Type Exception case Jdwp Reply Packet INVALID CLASS throw new Class Not Loaded Exception JDI Messages get String Object Reference Impl One of the arguments of ObjectReference invoke Method  6 NON NLS 1 case Jdwp Reply Packet INVALID THREAD throw new Incompatible Thread State Exception case Jdwp Reply Packet THREAD NOT SUSPENDED throw new Incompatible Thread State Exception case Jdwp Reply Packet INVALID TYPESTATE throw new Incompatible Thread State Exception default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream Value Impl value Value Impl read With Tag this reply Data Object Reference Impl exception Object Reference Impl read Object Ref With Tag this reply Data if exception null throw new Invocation Exception exception return value catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  invokeMethod ThreadReference InvalidTypeException ClassNotLoadedException IncompatibleThreadStateException InvocationException ThreadReferenceImpl threadImpl ThreadReferenceImpl MethodImpl methodImpl MethodImpl IllegalArgumentException isAValidMethod IllegalArgumentException JDIMessages getString ObjectReferenceImpl Class_does_not_contain_given_method_2 argumentTypeNames IllegalArgumentException JDIMessages getString ObjectReferenceImpl Number_of_arguments_doesn__t_match_3 isConstructor isStaticInitializer IllegalArgumentException JDIMessages getString ObjectReferenceImpl Method_is_constructor_or_intitializer_4 INVOKE_NONVIRTUAL isAbstract IllegalArgumentException JDIMessages getString ObjectReferenceImpl Method_is_abstract_and_can_therefore_not_be_invoked_nonvirtual_5 checkedArguments ValueImpl checkValues argumentTypes virtualMachineImpl initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes outData threadImpl outData ReferenceTypeImpl referenceType outData methodImpl outData writeInt checkedArguments outData checkedArguments hasNext ValueImpl ValueImpl writeWithTag outData ValueImpl writeNullWithTag outData writeInt optionsToJdwpOptions MethodImpl getInvokeOptions outData JdwpReplyPacket replyPacket JdwpCommandPacket OR_INVOKE_METHOD outBytes replyPacket errorCode JdwpReplyPacket TYPE_MISMATCH InvalidTypeException JdwpReplyPacket INVALID_CLASS ClassNotLoadedException JDIMessages getString ObjectReferenceImpl One_of_the_arguments_of_ObjectReference invokeMethod _6 JdwpReplyPacket INVALID_THREAD IncompatibleThreadStateException JdwpReplyPacket THREAD_NOT_SUSPENDED IncompatibleThreadStateException JdwpReplyPacket INVALID_TYPESTATE IncompatibleThreadStateException defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream ValueImpl ValueImpl readWithTag replyData ObjectReferenceImpl ObjectReferenceImpl readObjectRefWithTag replyData InvocationException IOException defaultIOExceptionHandler handledJdwpRequest
private boolean isA Valid Method Method method Reference Type ref Type reference Type if ref Type instanceof Array Type if the object is an array check if the method is declared in java lang Object return java lang Object equals method declaring Type name NON NLS 1 return ref Type all Methods contains method  isAValidMethod ReferenceType refType referenceType refType ArrayType declaringType refType allMethods
return Returns if this object has been garbage collected in the target VM public boolean is Collected Note that this information should not be cached init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet OR IS COLLECTED this switch reply Packet error Code case Jdwp Reply Packet INVALID OBJECT return true case Jdwp Reply Packet NOT IMPLEMENTED Workaround for problem in J2ME WTK wireless toolkit see Bug 12966 try reference Type catch Object Collected Exception e return true return false default default Reply Error Handler reply Packet error Code break Data Input Stream reply Data reply Packet data In Stream boolean result read Boolean is collected reply Data NON NLS 1 return result catch IO Exception e defaultIO Exception Handler e return false finally handled Jdwp Request  isCollected initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket OR_IS_COLLECTED replyPacket errorCode JdwpReplyPacket INVALID_OBJECT JdwpReplyPacket NOT_IMPLEMENTED referenceType ObjectCollectedException defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream readBoolean replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Returns the Reference Type that mirrors the type of this object public Reference Type reference Type if f Reference Type null return f Reference Type init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet OR REFERENCE TYPE this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f Reference Type Reference Type Impl read With Type Tag this reply Data return f Reference Type catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ReferenceType ReferenceType referenceType fReferenceType fReferenceType initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket OR_REFERENCE_TYPE defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fReferenceType ReferenceTypeImpl readWithTypeTag replyData fReferenceType IOException defaultIOExceptionHandler handledJdwpRequest
return Returns the Type that mirrors the type of this object public Type type return reference Type  referenceType
Sets the value of a given instance or static field in this object public void set Value Field field Value value throws Invalid Type Exception Class Not Loaded Exception Note that this information should not be cached init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write this out Data write Int 1 size out Data We only set one field NON NLS 1 checkVM field Field Impl field write this out Data check the type and the vm of the value Convert the value if needed Value Impl checked Value Value Impl check Value value field type virtual Machine Impl if checked Value null checked Value write this out Data else Value Impl write Null this out Data Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet OR SET VALUES out Bytes switch reply Packet error Code case Jdwp Reply Packet TYPE MISMATCH throw new Invalid Type Exception case Jdwp Reply Packet INVALID CLASS throw new Class Not Loaded Exception reference Type name default Reply Error Handler reply Packet error Code catch IO Exception e defaultIO Exception Handler e finally handled Jdwp Request  setValue InvalidTypeException ClassNotLoadedException initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes outData writeInt outData FieldImpl outData ValueImpl checkedValue ValueImpl checkValue virtualMachineImpl checkedValue checkedValue outData ValueImpl writeNull outData JdwpReplyPacket replyPacket JdwpCommandPacket OR_SET_VALUES outBytes replyPacket errorCode JdwpReplyPacket TYPE_MISMATCH InvalidTypeException JdwpReplyPacket INVALID_CLASS ClassNotLoadedException referenceType defaultReplyErrorHandler replyPacket errorCode IOException defaultIOExceptionHandler handledJdwpRequest
return Returns a unique identifier for this Object Reference public long uniqueID if is Collected throw new Object Collected Exception return f ObjectID value  ObjectReference isCollected ObjectCollectedException fObjectID
return Returns string with value of ID public String id String return id f ObjectID NON NLS 1 NON NLS 2  idString fObjectID
return Returns description of Mirror object public String to String try return type to String id String NON NLS 1 catch Object Collected Exception e return JDI Messages get String Object Reference Impl Garbage Collected  ObjectReference  8 id String NON NLS 1 catch Exception e return f Description  toString toString idString ObjectCollectedException JDIMessages getString ObjectReferenceImpl Garbage_Collected _ObjectReference__8 idString fDescription
return Reads JDWP representation and returns new instance public static Object Reference Impl read Object Ref Without Tag Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp ObjectID ID new Jdwp ObjectID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println object Reference ID value NON NLS 1 if ID is Null return null Object Reference Impl mirror new Object Reference Impl vm Impl ID return mirror  ObjectReferenceImpl readObjectRefWithoutTag MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpObjectID JdwpObjectID vmImpl fVerboseWriter fVerboseWriter objectReference isNull ObjectReferenceImpl ObjectReferenceImpl vmImpl
return Reads JDWP representation and returns new instance public static Object Reference Impl read Object Ref With Tag Mirror Impl target Data Input Stream in throws IO Exception byte object Tag target read Byte object tag JdwpID tag Map in NON NLS 1 switch object Tag case 0 return null case Object Reference Impl tag return Object Reference Impl read Object Ref Without Tag target in case Array Reference Impl tag return Array Reference Impl read target in case Class Loader Reference Impl tag return Class Loader Reference Impl read target in case Class Object Reference Impl tag return Class Object Reference Impl read target in case String Reference Impl tag return String Reference Impl read target in case Thread Group Reference Impl tag return Thread Group Reference Impl read target in case Thread Reference Impl tag return Thread Reference Impl read target in throw new Internal Exception JDI Messages get String Object Reference Impl Invalid ObjectID tag encountered   9 object Tag NON NLS 1  ObjectReferenceImpl readObjectRefWithTag MirrorImpl DataInputStream IOException objectTag readByte tagMap objectTag ObjectReferenceImpl ObjectReferenceImpl readObjectRefWithoutTag ArrayReferenceImpl ArrayReferenceImpl ClassLoaderReferenceImpl ClassLoaderReferenceImpl ClassObjectReferenceImpl ClassObjectReferenceImpl StringReferenceImpl StringReferenceImpl ThreadGroupReferenceImpl ThreadGroupReferenceImpl ThreadReferenceImpl ThreadReferenceImpl InternalException JDIMessages getString ObjectReferenceImpl Invalid_ObjectID_tag_encountered___9 objectTag
Writes JDWP representation without tag public void write Mirror Impl target Data Output Stream out throws IO Exception f ObjectID write out if target f Verbose Writer null target f Verbose Writer println object Reference f ObjectID value NON NLS 1  MirrorImpl DataOutputStream IOException fObjectID fVerboseWriter fVerboseWriter objectReference fObjectID

public abstract class Primitive Type Impl extends Type Impl implements Primitive Type Creates new instance public Primitive Type Impl String description Virtual Machine Impl vm Impl String name String signature super description vm Impl name signature  PrimitiveTypeImpl TypeImpl PrimitiveType PrimitiveTypeImpl VirtualMachineImpl vmImpl vmImpl
Creates new instance based on primitive signature public static Primitive Type Impl create Virtual Machine Impl vm Impl String signature Notice that Primitive Types are not stored or cached because they don t remember any information See JNI 1 1 Specification Table 3 2 Java VM Type Signatures switch signature char At 0 case Z return new Boolean Type Impl vm Impl case B return new Byte Type Impl vm Impl case C return new Char Type Impl vm Impl case S return new Short Type Impl vm Impl case I return new Integer Type Impl vm Impl case J return new Long Type Impl vm Impl case F return new Float Type Impl vm Impl case D return new Double Type Impl vm Impl throw new Internal Error JDI Messages get String Primitive Type Impl Invalid primitive signature    1 signature JDI Messages get String Primitive Type Impl   2 NON NLS 1 NON NLS 2  PrimitiveTypeImpl VirtualMachineImpl vmImpl charAt BooleanTypeImpl vmImpl ByteTypeImpl vmImpl CharTypeImpl vmImpl ShortTypeImpl vmImpl IntegerTypeImpl vmImpl LongTypeImpl vmImpl FloatTypeImpl vmImpl DoubleTypeImpl vmImpl InternalError JDIMessages getString PrimitiveTypeImpl Invalid_primitive_signature____1 JDIMessages getString PrimitiveTypeImpl __2
returns primitive type tag public abstract byte tag 
return Returns modifier bits public int modifiers throw new Internal Error JDI Messages get String Primitive Type Impl A PrimitiveType does not have modifiers 3 NON NLS 1  InternalError JDIMessages getString PrimitiveTypeImpl A_PrimitiveType_does_not_have_modifiers_3

Creates new Value Impl public Primitive Value Impl String description Virtual Machine Impl vm Impl Object value super description vm Impl f Value value  ValueImpl PrimitiveValueImpl VirtualMachineImpl vmImpl vmImpl fValue
return Returns Primitive Value converted to required type public boolean boolean Value if f Value instanceof Boolean return Boolean f Value boolean Value else if f Value instanceof Character return Character f Value char Value 0 else return Number f Value double Value 0  booleanValue fValue fValue booleanValue fValue fValue charValue fValue doubleValue
return Returns Primitive Value converted to required type public char char Value if f Value instanceof Boolean return Boolean f Value boolean Value char 1 char 0 else if f Value instanceof Character return Character f Value char Value else return char Number f Value int Value  charValue fValue fValue booleanValue fValue fValue charValue fValue intValue
return Returns Primitive Value converted to required type public byte byte Value if f Value instanceof Boolean return Boolean f Value boolean Value byte 1 byte 0 else if f Value instanceof Character return byte Character f Value char Value else return Number f Value byte Value  byteValue fValue fValue booleanValue fValue fValue charValue fValue byteValue
return Returns Primitive Value converted to required type public double double Value if f Value instanceof Boolean return Boolean f Value boolean Value double 1 double 0 else if f Value instanceof Character return Character f Value char Value else return Number f Value double Value  doubleValue fValue fValue booleanValue fValue fValue charValue fValue doubleValue
return Returns Primitive Value converted to required type public float float Value if f Value instanceof Boolean return Boolean f Value boolean Value float 1 float 0 else if f Value instanceof Character return Character f Value char Value else return Number f Value float Value  floatValue fValue fValue booleanValue fValue fValue charValue fValue floatValue
return Returns Primitive Value converted to required type public int int Value if f Value instanceof Boolean return Boolean f Value boolean Value int 1 int 0 else if f Value instanceof Character return Character f Value char Value else return Number f Value int Value  intValue fValue fValue booleanValue fValue fValue charValue fValue intValue
return Returns Primitive Value converted to required type public long long Value if f Value instanceof Boolean return Boolean f Value boolean Value long 1 long 0 else if f Value instanceof Character return Character f Value char Value else return Number f Value long Value  longValue fValue fValue booleanValue fValue fValue charValue fValue longValue
return Returns Primitive Value converted to required type public short short Value if f Value instanceof Boolean return Boolean f Value boolean Value short 1 short 0 else if f Value instanceof Character return short Character f Value char Value else return Number f Value short Value  shortValue fValue fValue booleanValue fValue fValue charValue fValue shortValue
return Returns true if two values are equal see java lang Object equals Object public boolean equals Object object return object null object get Class equals this get Class f Value equals Primitive Value Impl object f Value  getClass getClass fValue PrimitiveValueImpl fValue
return Returns a has code for this object see java lang Object hash Code public int hash Code return f Value hash Code  hashCode hashCode fValue hashCode
Compares this object with the specified object for order Returns a negative integer zero or a positive integer as this object is less than equal to or greater than the specified object public int compare To Object obj if f Value instanceof Character return Character f Value compare To obj else if f Value instanceof Byte return Byte f Value compare To obj else if f Value instanceof Double return Double f Value compare To obj else if f Value instanceof Float return Float f Value compare To obj else if f Value instanceof Integer return Integer f Value compare To obj else if f Value instanceof Long return Long f Value compare To obj else if f Value instanceof Short return Short f Value compare To obj throw new Internal Exception JDI Messages get String Primitive Value Impl Invalid Primitive Value encountered 1 NON NLS 1  compareTo fValue fValue compareTo fValue fValue compareTo fValue fValue compareTo fValue fValue compareTo fValue fValue compareTo fValue fValue compareTo fValue fValue compareTo InternalException JDIMessages getString PrimitiveValueImpl Invalid_Primitive_Value_encountered_1
return Returns description of Mirror object public String to String return f Value to String  toString fValue toString
Writes value without value tag public abstract void write Mirror Impl target Data Output Stream out throws IO Exception  MirrorImpl DataOutputStream IOException
return Reads JDWP representation and returns new instance public static Primitive Value Impl read Without Tag Mirror Impl target Primitive Type type Data Input Stream in throws IO Exception switch Primitive Type Impl type tag case 0 return null case Boolean Value Impl tag return Boolean Value Impl read target in case Byte Value Impl tag return Byte Value Impl read target in case Char Value Impl tag return Char Value Impl read target in case Double Value Impl tag return Double Value Impl read target in case Float Value Impl tag return Float Value Impl read target in case Integer Value Impl tag return Integer Value Impl read target in case Long Value Impl tag return Long Value Impl read target in case Short Value Impl tag return Short Value Impl read target in throw new Internal Exception JDI Messages get String Primitive Value Impl Invalid Primitive Value tag encountered   2 type NON NLS 1  PrimitiveValueImpl readWithoutTag MirrorImpl PrimitiveType DataInputStream IOException PrimitiveTypeImpl BooleanValueImpl BooleanValueImpl ByteValueImpl ByteValueImpl CharValueImpl CharValueImpl DoubleValueImpl DoubleValueImpl FloatValueImpl FloatValueImpl IntegerValueImpl IntegerValueImpl LongValueImpl LongValueImpl ShortValueImpl ShortValueImpl InternalException JDIMessages getString PrimitiveValueImpl Invalid_Primitive_Value_tag_encountered___2

File Info constructor param file Id the id param file Name the name of the source file param absolute File Name the path of the source file can be code null code public File Info int file Id String file Name String absolute File Name f File Id file Id f File Name file Name f Absolute File Name absolute File Name f Line Info new Hash Map  FileInfo fileId fileName absoluteFileName FileInfo fileId fileName absoluteFileName fFileId fileId fFileName fileName fAbsoluteFileName absoluteFileName fLineInfo HashMap
Add information about the mapping of one line Associate a line in the input source file to a snippet of code in the output source file param input Line the line number in the input source file param output Start Line the number of the first line of the corresponding snippet in the output source file param output Line Range the size of the corresponding snippet in the output source file public void add Line Info int input Line int output Start Line int output Line Range Integer key new Integer input Line List output Lines List f Line Info get key if output Lines null output Lines new Array List f Line Info put key output Lines output Lines add new int output Start Line output Line Range  inputLine outputStartLine outputLineRange addLineInfo inputLine outputStartLine outputLineRange inputLine outputLines fLineInfo outputLines outputLines ArrayList fLineInfo outputLines outputLines outputStartLine outputLineRange
Return a list of line information about the code in the output source file associated to the given line in the input source file param line Number the line number in the input source file return a List of int 2 public List get Output Lines For Line int line Number List list new Array List List output Lines List f Line Info get new Integer line Number if output Lines null for Iterator iter output Lines iterator iter has Next int info int iter next int output Line Number info 0 for int i 0 length info 1 i length i list add new Integer output Line Number return list  lineNumber getOutputLinesForLine lineNumber ArrayList outputLines fLineInfo lineNumber outputLines outputLines hasNext outputLineNumber outputLineNumber
see java lang Object equals java lang Object public boolean equals Object object if object instanceof File Info return false return f File Id File Info object f File Id  FileInfo fFileId FileInfo fFileId
Stratum constructor param id The id of this stratum public Stratum String id f Id id f File Infos new Array List f Output Line To Input Line new Hash Map f Primary File Id 1  fId fFileInfos ArrayList fOutputLineToInputLine HashMap fPrimaryFileId
Add a file info to this stratum param file Id the id param file Name the name of the source file public void add File Info int file Id String file Name throws Absent Information Exception add File Info file Id file Name null  fileId fileName addFileInfo fileId fileName AbsentInformationException addFileInfo fileId fileName
Add a file info to this stratum param file Id the id param file Name the name of the source file param absolute File Name the path of the source file public void add File Info int file Id String file Name String absolute File Name throws Absent Information Exception if f Primary File Id 1 f Primary File Id file Id File Info file Info new File Info file Id file Name absolute File Name if f File Infos contains file Info throw new Absent Information Exception Message Format format JDI Messages get String Reference Type Impl 28 new String Integer to String file Id f Id NON NLS 1 f File Infos add file Info  fileId fileName absoluteFileName addFileInfo fileId fileName absoluteFileName AbsentInformationException fPrimaryFileId fPrimaryFileId fileId FileInfo fileInfo FileInfo fileId fileName absoluteFileName fFileInfos fileInfo AbsentInformationException MessageFormat JDIMessages getString ReferenceTypeImpl toString fileId fId fFileInfos fileInfo
Add line mapping information param input Start Line number of the first line in the input source file param line File Id id of the input source file param repeat Count number of iterations param output Start Line number of the first line in the output source file param output Line Increment number of line to increment at each iteration throws Absent Information Exception public void add Line Info int input Start Line int line File Id int repeat Count int output Start Line int output Line Increment throws Absent Information Exception File Info file Info null get the File Info object for Iterator iter f File Infos iterator iter has Next File Info element File Info iter next if element f File Id line File Id file Info element if file Info null throw new Absent Information Exception Message Format format JDI Messages get String Reference Type Impl 29 new String Integer to String line File Id NON NLS 1 add the data to the different hash maps for int i 0 i repeat Count i input Start Line file Info add Line Info input Start Line output Start Line output Line Increment if output Line Increment 0 see bug 40022 add Line Info To Map input Start Line line File Id output Start Line else for int j 0 j output Line Increment j output Start Line add Line Info To Map input Start Line line File Id output Start Line  inputStartLine lineFileId repeatCount outputStartLine outputLineIncrement AbsentInformationException addLineInfo inputStartLine lineFileId repeatCount outputStartLine outputLineIncrement AbsentInformationException FileInfo fileInfo FileInfo fFileInfos hasNext FileInfo FileInfo fFileId lineFileId fileInfo fileInfo AbsentInformationException MessageFormat JDIMessages getString ReferenceTypeImpl toString lineFileId repeatCount inputStartLine fileInfo addLineInfo inputStartLine outputStartLine outputLineIncrement outputLineIncrement addLineInfoToMap inputStartLine lineFileId outputStartLine outputLineIncrement outputStartLine addLineInfoToMap inputStartLine lineFileId outputStartLine
Add the data to the map private void add Line Info To Map int input Start Line int line File Id int output Start Line Integer key new Integer output Start Line List input Lines List f Output Line To Input Line get key if input Lines null input Lines new Array List f Output Line To Input Line put key input Lines input Lines add new int line File Id input Start Line  addLineInfoToMap inputStartLine lineFileId outputStartLine outputStartLine inputLines fOutputLineToInputLine inputLines inputLines ArrayList fOutputLineToInputLine inputLines inputLines lineFileId inputStartLine
Return the File Info object for the specified source name Return code null code if the specified name is the source name of no file info param source Name the source name to search public File Info get File Info String source Name for Iterator iter f File Infos iterator iter has Next File Info file Info File Info iter next if file Info f File Name equals source Name return file Info return null  FileInfo sourceName FileInfo getFileInfo sourceName fFileInfos hasNext FileInfo fileInfo FileInfo fileInfo fFileName sourceName fileInfo
param output Line Number return public List get Input Line Infos int output Line Number List result null do result List f Output Line To Input Line get new Integer output Line Number while result null output Line Number 0 return result  outputLineNumber getInputLineInfos outputLineNumber fOutputLineToInputLine outputLineNumber outputLineNumber
Creates new instance protected Reference Type Impl String description Virtual Machine Impl vm Impl Jdwp Reference TypeID reference TypeID super description vm Impl f Reference TypeID reference TypeID  ReferenceTypeImpl VirtualMachineImpl vmImpl JdwpReferenceTypeID referenceTypeID vmImpl fReferenceTypeID referenceTypeID
Creates new instance protected Reference Type Impl String description Virtual Machine Impl vm Impl Jdwp Reference TypeID reference TypeID String signature String generic Signature super description vm Impl f Reference TypeID reference TypeID set Signature signature set Generic Signature generic Signature  ReferenceTypeImpl VirtualMachineImpl vmImpl JdwpReferenceTypeID referenceTypeID genericSignature vmImpl fReferenceTypeID referenceTypeID setSignature setGenericSignature genericSignature
return Returns type tag public abstract byte type Tag  typeTag
Flushes all stored Jdwp results public void flush Stored Jdwp Results Iterator iter Flush Methods if f Methods null iter f Methods iterator while iter has Next Method Impl method Method Impl iter next method flush Stored Jdwp Results f Methods null f Method Table null Flush Fields if f Fields null iter f Fields iterator while iter has Next Field Impl field Field Impl iter next field flush Stored Jdwp Results f Fields null f Interfaces null f All Methods null f Visible Methods null f All Fields null f Visible Fields null f All Interfaces null f Stratum All Line Locations null f Source Name null f Modifier Bits 1 f Class Loader null f Class Object null f Got Class File Version false java 1 5 f Generic Signature null f Generic Signature Known false JSR 045 f Source Debug Extension Available true f Default Stratum Id null f Strata null f Smap null The following cached results are stored higher up in the class hierarchy f Signature null f Source Name null  flushStoredJdwpResults fMethods fMethods hasNext MethodImpl MethodImpl flushStoredJdwpResults fMethods fMethodTable fFields fFields hasNext FieldImpl FieldImpl flushStoredJdwpResults fFields fInterfaces fAllMethods fVisibleMethods fAllFields fVisibleFields fAllInterfaces fStratumAllLineLocations fSourceName fModifierBits fClassLoader fClassObject fGotClassFileVersion fGenericSignature fGenericSignatureKnown fSourceDebugExtensionAvailable fDefaultStratumId fStrata fSmap fSignature fSourceName
return Returns the interfaces declared as implemented by this class Interfaces indirectly implemented extended by the implemented interface or implemented by a superclass are not included public List all Interfaces if f All Interfaces null return f All Interfaces Recursion The interfaces that it directly implements All interfaces that are implemented by its interfaces If it is a class all interfaces that are implemented by its superclass The interfaces are maintained in a set to avoid duplicates The interfaces of its own own interfaces command are first inserted Hash Set all Interfaces Set new Hash Set interfaces All interfaces of the interfaces it implements Iterator interfaces interfaces iterator Interface Type Impl inter while interfaces has Next inter Interface Type Impl interfaces next all Interfaces Set add All inter all Interfaces If it is a class all interfaces of it s superclass if this instanceof Class Type Class Type superclass Class Type this superclass if superclass null all Interfaces Set add All superclass all Interfaces f All Interfaces new Array List all Interfaces Set return f All Interfaces  allInterfaces fAllInterfaces fAllInterfaces HashSet allInterfacesSet HashSet InterfaceTypeImpl hasNext InterfaceTypeImpl allInterfacesSet addAll allInterfaces ClassType ClassType ClassType allInterfacesSet addAll allInterfaces fAllInterfaces ArrayList allInterfacesSet fAllInterfaces
return Returns Jdwp Reference ID public Jdwp Reference TypeID get Ref TypeID return f Reference TypeID  JdwpReferenceTypeID getRefTypeID fReferenceTypeID
return Returns modifier bits public int modifiers if f Modifier Bits 1 return f Modifier Bits init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet RT MODIFIERS this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f Modifier Bits read Int modifiers Accessible Impl get Modifier Strings reply Data NON NLS 1 return f Modifier Bits catch IO Exception e defaultIO Exception Handler e return 0 finally handled Jdwp Request  fModifierBits fModifierBits initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket RT_MODIFIERS defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fModifierBits readInt AccessibleImpl getModifierStrings replyData fModifierBits IOException defaultIOExceptionHandler handledJdwpRequest
Add methods to a set of methods if they are not overriden add new names signature combinations to set of names signature combinations private void add Visible Methods List inherited Methods Set name And Signatures List result Methods Iterator iter inherited Methods iterator Method Impl inherited Method while iter has Next inherited Method Method Impl iter next if name And Signatures contains inherited Method name inherited Method signature result Methods add inherited Method  addVisibleMethods inheritedMethods nameAndSignatures resultMethods inheritedMethods MethodImpl inheritedMethod hasNext inheritedMethod MethodImpl nameAndSignatures inheritedMethod inheritedMethod resultMethods inheritedMethod
return Returns a list containing each unhidden and unambiguous Method in this type public List visible Methods if f Visible Methods null return f Visible Methods Recursion The methods of its own own methods command All methods of the interfaces it implements If it is a class all methods of it s superclass The name signature combinations of methods are maintained in a set to avoid including methods that have been overriden Set names And Signatures new Hash Set List visible Methods new Array List The methods of its own own methods command for Iterator iter methods iterator iter has Next Method Impl method Method Impl iter next names And Signatures add method name method signature visible Methods add method All methods of the interfaces it implements Iterator interfaces interfaces iterator Interface Type Impl inter while interfaces has Next inter Interface Type Impl interfaces next add Visible Methods inter visible Methods names And Signatures visible Methods If it is a class all methods of it s superclass if this instanceof Class Type Class Type superclass Class Type this superclass if superclass null add Visible Methods superclass visible Methods names And Signatures visible Methods f Visible Methods visible Methods return f Visible Methods  visibleMethods fVisibleMethods fVisibleMethods namesAndSignatures HashSet visibleMethods ArrayList hasNext MethodImpl MethodImpl namesAndSignatures visibleMethods InterfaceTypeImpl hasNext InterfaceTypeImpl addVisibleMethods visibleMethods namesAndSignatures visibleMethods ClassType ClassType ClassType addVisibleMethods visibleMethods namesAndSignatures visibleMethods fVisibleMethods visibleMethods fVisibleMethods
return Returns a list containing each Method declared in this type and its superclasses implemented interfaces and or superinterfaces public List all Methods if f All Methods null return f All Methods Recursion The methods of its own own methods command All methods of the interfaces it implements If it is a class all methods of it s superclass The name signature combinations of methods are maintained in a set Hash Set result Set new Hash Set The methods of its own own methods command result Set add All methods All methods of the interfaces it implements Iterator interfaces interfaces iterator Interface Type Impl inter while interfaces has Next inter Interface Type Impl interfaces next result Set add All inter all Methods If it is a class all methods of it s superclass if this instanceof Class Type Class Type superclass Class Type this superclass if superclass null result Set add All superclass all Methods f All Methods new Array List result Set return f All Methods  allMethods fAllMethods fAllMethods HashSet resultSet HashSet resultSet addAll InterfaceTypeImpl hasNext InterfaceTypeImpl resultSet addAll allMethods ClassType ClassType ClassType resultSet addAll allMethods fAllMethods ArrayList resultSet fAllMethods
return Returns the interfaces declared as implemented by this class Interfaces indirectly implemented extended by the implemented interface or implemented by a superclass are not included public List interfaces if f Interfaces null return f Interfaces init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet RT INTERFACES this switch reply Packet error Code case Jdwp Reply Packet NOT FOUND Workaround for problem in J2ME WTK wireless toolkit see Bug 12966 return Collections EMPTY LIST default default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream List elements new Array List int nr Of Elements read Int elements reply Data NON NLS 1 for int i 0 i nr Of Elements i Interface Type Impl ref Interface Type Impl read this reply Data if ref null continue elements add ref f Interfaces elements return elements catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  fInterfaces fInterfaces initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket RT_INTERFACES replyPacket errorCode JdwpReplyPacket NOT_FOUND EMPTY_LIST defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream ArrayList nrOfElements readInt replyData nrOfElements InterfaceTypeImpl InterfaceTypeImpl replyData fInterfaces IOException defaultIOExceptionHandler handledJdwpRequest
Add fields to a set of fields if they are not overriden add new fieldnames to set of fieldnames private void add Visible Fields List new Fields Set names List result Fields Iterator iter new Fields iterator Field Impl field while iter has Next field Field Impl iter next String name field name if names contains name result Fields add field names add name  addVisibleFields newFields resultFields newFields FieldImpl hasNext FieldImpl resultFields
return Returns a list containing each unhidden and unambiguous Field in this type public List visible Fields if f Visible Fields null return f Visible Fields Recursion The fields of its own own fields command All fields of the interfaces it implements If it is a class all fields of it s superclass The names of fields are maintained in a set to avoid including fields that have been overriden Hash Set field Names new Hash Set The fields of its own own fields command List visible Fields new Array List add Visible Fields fields field Names visible Fields All fields of the interfaces it implements Iterator interfaces interfaces iterator Interface Type Impl inter while interfaces has Next inter Interface Type Impl interfaces next add Visible Fields inter visible Fields field Names visible Fields If it is a class all fields of it s superclass if this instanceof Class Type Class Type superclass Class Type this superclass if superclass null add Visible Fields superclass visible Fields field Names visible Fields f Visible Fields visible Fields return f Visible Fields  visibleFields fVisibleFields fVisibleFields HashSet fieldNames HashSet visibleFields ArrayList addVisibleFields fieldNames visibleFields InterfaceTypeImpl hasNext InterfaceTypeImpl addVisibleFields visibleFields fieldNames visibleFields ClassType ClassType ClassType addVisibleFields visibleFields fieldNames visibleFields fVisibleFields visibleFields fVisibleFields
return Returns a list containing each Field declared in this type and its superclasses implemented interfaces and or superinterfaces public List all Fields if f All Fields null return f All Fields Recursion The fields of its own own fields command All fields of the interfaces it implements If it is a class all fields of it s superclass The names of fields are maintained in a set to avoid including fields that have been inherited double Hash Set result Set new Hash Set The fields of its own own fields command result Set add All fields All fields of the interfaces it implements Iterator interfaces interfaces iterator Interface Type Impl inter while interfaces has Next inter Interface Type Impl interfaces next result Set add All inter all Fields If it is a class all fields of it s superclass if this instanceof Class Type Class Type superclass Class Type this superclass if superclass null result Set add All superclass all Fields f All Fields new Array List result Set return f All Fields  allFields fAllFields fAllFields HashSet resultSet HashSet resultSet addAll InterfaceTypeImpl hasNext InterfaceTypeImpl resultSet addAll allFields ClassType ClassType ClassType resultSet addAll allFields fAllFields ArrayList resultSet fAllFields
return Returns the classloader object which loaded the class corresponding to this type public Class Loader Reference class Loader if f Class Loader null return f Class Loader init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet RT CLASS LOADER this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f Class Loader Class Loader Reference Impl read this reply Data return f Class Loader catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ClassLoaderReference classLoader fClassLoader fClassLoader initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket RT_CLASS_LOADER defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fClassLoader ClassLoaderReferenceImpl replyData fClassLoader IOException defaultIOExceptionHandler handledJdwpRequest
return Returns the class object that corresponds to this type in the target VM public Class Object Reference class Object if f Class Object null return f Class Object init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet RT CLASS OBJECT this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f Class Object Class Object Reference Impl read this reply Data return f Class Object catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ClassObjectReference classObject fClassObject fClassObject initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket RT_CLASS_OBJECT defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fClassObject ClassObjectReferenceImpl replyData fClassObject IOException defaultIOExceptionHandler handledJdwpRequest
return Returns status of class interface protected int status Note that this information should not be cached init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet RT STATUS this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream int status read Int status class Status Strings reply Data NON NLS 1 return status catch IO Exception e defaultIO Exception Handler e return 0 finally handled Jdwp Request  initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket RT_STATUS defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream readInt classStatusStrings replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Returns true if initialization failed for this class public boolean failed To Initialize return status JDWP CLASS STATUS ERROR 0  failedToInitialize JDWP_CLASS_STATUS_ERROR
return Returns true if this type has been initialized public boolean is Initialized return status JDWP CLASS STATUS INITIALIZED 0  isInitialized JDWP_CLASS_STATUS_INITIALIZED
return Returns true if this type has been prepared public boolean is Prepared return status JDWP CLASS STATUS PREPARED 0  isPrepared JDWP_CLASS_STATUS_PREPARED
return Returns true if this type has been verified public boolean is Verified return status JDWP CLASS STATUS VERIFIED 0  isVerified JDWP_CLASS_STATUS_VERIFIED
return Returns the visible Field with the given non ambiguous name public Field field By Name String name Iterator iter visible Fields iterator while iter has Next Field Impl field Field Impl iter next if field name equals name return field return null  fieldByName visibleFields hasNext FieldImpl FieldImpl
return Returns a list containing each Field declared in this type public List fields if f Fields null return f Fields Note Fields are returned in the order they occur in the class file therefore their order in this list can be used for comparisons init Jdwp Request try boolean with Generic Signature virtual Machine Impl is Jdwp Version Greater Or Equal 1 5 int jdwp Command with Generic Signature Jdwp Command Packet RT FIELDS WITH GENERIC Jdwp Command Packet RT FIELDS Jdwp Reply Packet reply Packet requestVM jdwp Command this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream List elements new Array List int nr Of Elements read Int elements reply Data NON NLS 1 for int i 0 i nr Of Elements i Field Impl elt Field Impl read With Name Signature Modifiers this this with Generic Signature reply Data if elt null continue elements add elt f Fields elements return f Fields catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  fFields fFields initJdwpRequest withGenericSignature virtualMachineImpl isJdwpVersionGreaterOrEqual jdwpCommand withGenericSignature JdwpCommandPacket RT_FIELDS_WITH_GENERIC JdwpCommandPacket RT_FIELDS JdwpReplyPacket replyPacket jdwpCommand defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream ArrayList nrOfElements readInt replyData nrOfElements FieldImpl FieldImpl readWithNameSignatureModifiers withGenericSignature replyData fFields fFields IOException defaultIOExceptionHandler handledJdwpRequest
return Returns Field Impl of a field in the reference specified by a given fieldID or null if not found public Field Impl find Field Jdwp FieldID fieldID Iterator iter fields iterator while iter has Next Field Impl field Field Impl iter next if field get FieldID equals fieldID return field return null  FieldImpl FieldImpl findField JdwpFieldID hasNext FieldImpl FieldImpl getFieldID
return Returns Method Impl of a method in the reference specified by a given methodID or null if not found public Method Impl find Method Jdwp MethodID methodID if methodID value 0 return new Method Impl virtual Machine Impl this methodID JDI Messages get String Reference Type Impl Obsolete method 1 null 1 NON NLS 1 NON NLS 2 if f Method Table null f Method Table new Hashtable Iterator iter methods iterator while iter has Next Method Impl method Method Impl iter next f Method Table put method get MethodID method return Method Impl f Method Table get methodID  MethodImpl MethodImpl findMethod JdwpMethodID MethodImpl virtualMachineImpl JDIMessages getString ReferenceTypeImpl Obsolete_method_1 fMethodTable fMethodTable hasNext MethodImpl MethodImpl fMethodTable getMethodID MethodImpl fMethodTable
return Returns the Value of a given static Field in this type public Value get Value Field field Array List list new Array List 1 list add field return Value Impl get Values list get field  getValue ArrayList ArrayList ValueImpl getValues
return a Map of the requested static Field objects with their Value public Map get Values List fields if the field list is empty nothing to do if fields is Empty return new Hash Map Note that this information should not be cached init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes int fields Size fields size write this out Data write Int fields Size size out Data NON NLS 1 for int i 0 i fields Size i Field Impl field Field Impl fields get i checkVM field field get FieldID write out Data Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet RT GET VALUES out Bytes default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream Hash Map map new Hash Map int nr Of Elements read Int elements reply Data NON NLS 1 if nr Of Elements fields Size throw new Internal Error JDI Messages get String Reference Type Impl Retrieved a different number of values from the VM than requested 3 NON NLS 1 for int i 0 i nr Of Elements i map put fields get i Value Impl read With Tag this reply Data return map catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  getValues isEmpty HashMap initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes fieldsSize outData writeInt fieldsSize outData fieldsSize FieldImpl FieldImpl getFieldID outData JdwpReplyPacket replyPacket JdwpCommandPacket RT_GET_VALUES outBytes defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream HashMap HashMap nrOfElements readInt replyData nrOfElements fieldsSize InternalError JDIMessages getString ReferenceTypeImpl Retrieved_a_different_number_of_values_from_the_VM_than_requested_3 nrOfElements ValueImpl readWithTag replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Returns the hash code value public int hash Code return f Reference TypeID hash Code  hashCode fReferenceTypeID hashCode
return Returns true if two mirrors refer to the same entity in the target VM see java lang Object equals Object public boolean equals Object object return object null object get Class equals this get Class f Reference TypeID equals Reference Type Impl object f Reference TypeID virtual Machine equals Mirror Impl object virtual Machine  getClass getClass fReferenceTypeID ReferenceTypeImpl fReferenceTypeID virtualMachine MirrorImpl virtualMachine
return Returns a negative integer zero or a positive integer as this object is less than equal to or greater than the specified object public int compare To Object object if object null object get Class equals this get Class throw new Class Cast Exception JDI Messages get String Reference Type Impl Can  t compare reference type to given object 4 NON NLS 1 return name compare To Reference Type object name  compareTo getClass getClass ClassCastException JDIMessages getString ReferenceTypeImpl Can__t_compare_reference_type_to_given_object_4 compareTo ReferenceType
return Returns true if the type was declared abstract public boolean is Abstract return modifiers MODIFIER ACC ABSTRACT 0  isAbstract MODIFIER_ACC_ABSTRACT
return Returns true if the type was declared final public boolean is Final return modifiers MODIFIER ACC FINAL 0  isFinal MODIFIER_ACC_FINAL
return Returns true if the type was declared static public boolean is Static return modifiers MODIFIER ACC STATIC 0  isStatic MODIFIER_ACC_STATIC
return Returns a List filled with all Location objects that map to the given line number public List locations Of Line int line throws Absent Information Exception return locations Of Line virtual Machine get Default Stratum null line  locationsOfLine AbsentInformationException locationsOfLine virtualMachine getDefaultStratum
return Returns a list containing each Method declared directly in this type public List methods Note that Array Reference overwrites this method by returning an empty list if f Methods null return f Methods Note Methods are returned in the order they occur in the class file therefore their order in this list can be used for comparisons init Jdwp Request try boolean with Generic Signature virtual Machine Impl is Jdwp Version Greater Or Equal 1 5 int jdwp Command with Generic Signature Jdwp Command Packet RT METHODS WITH GENERIC Jdwp Command Packet RT METHODS Jdwp Reply Packet reply Packet requestVM jdwp Command this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream List elements new Array List int nr Of Elements read Int elements reply Data NON NLS 1 for int i 0 i nr Of Elements i Method Impl elt Method Impl read With Name Signature Modifiers this this with Generic Signature reply Data if elt null continue elements add elt f Methods elements return f Methods catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ArrayReference fMethods fMethods initJdwpRequest withGenericSignature virtualMachineImpl isJdwpVersionGreaterOrEqual jdwpCommand withGenericSignature JdwpCommandPacket RT_METHODS_WITH_GENERIC JdwpCommandPacket RT_METHODS JdwpReplyPacket replyPacket jdwpCommand defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream ArrayList nrOfElements readInt replyData nrOfElements MethodImpl MethodImpl readWithNameSignatureModifiers withGenericSignature replyData fMethods fMethods IOException defaultIOExceptionHandler handledJdwpRequest
return Returns a List containing each visible Method that has the given name public List methods By Name String name List elements new Array List Iterator iter visible Methods iterator while iter has Next Method Impl method Method Impl iter next if method name equals name elements add method return elements  methodsByName ArrayList visibleMethods hasNext MethodImpl MethodImpl
return Returns a List containing each visible Method that has the given name and signature public List methods By Name String name String signature List elements new Array List Iterator iter visible Methods iterator while iter has Next Method Impl method Method Impl iter next if method name equals name method signature equals signature elements add method return elements  methodsByName ArrayList visibleMethods hasNext MethodImpl MethodImpl
return Returns the fully qualified name of this type public String name Make sure that we know the signature from which the name is derived if f Name null String generic Signature generic Signature String Buffer name new String Buffer Generic Signature signature To Name signature if generic Signature null List parameters Generic Signature get Type Parameters generic Signature Iterator iterator parameters iterator if iterator has Next name append append iterator next while iterator has Next name append append iterator next name append set Name name to String return f Name  fName genericSignature genericSignature StringBuffer StringBuffer GenericSignature signatureToName genericSignature GenericSignature getTypeParameters genericSignature hasNext hasNext setName toString fName
return Returns the JNI style signature for this type public String signature if f Signature null return f Signature init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet RT SIGNATURE this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream set Signature read String signature reply Data NON NLS 1 return f Signature catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  fSignature fSignature initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket RT_SIGNATURE defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream setSignature readString replyData fSignature IOException defaultIOExceptionHandler handledJdwpRequest
return Returns a List containing each Reference Type declared within this type public List nested Types Note that the VM gives an empty reply on RT NESTED TYPES therefore we search for the nested types in the loaded types List result new Array List Iterator itr virtual Machine Impl all Ref Types while itr has Next try Reference Type Impl ref Type Reference Type Impl itr next String ref Name ref Type name if ref Name length name length ref Name starts With name ref Name char At name length result add ref Type catch Class Not Prepared Exception e continue return result  ReferenceType nestedTypes RT_NESTED_TYPES ArrayList virtualMachineImpl allRefTypes hasNext ReferenceTypeImpl refType ReferenceTypeImpl refName refType refName refName startsWith refName charAt refType ClassNotPreparedException
return Returns an identifing name for the source corresponding to the declaration of this type public String source Name throws Absent Information Exception source Names list in never empty an Absent Information Exception is thrown if the source name is not known return String source Names virtual Machine get Default Stratum get 0  sourceName AbsentInformationException sourceNames AbsentInformationException sourceNames virtualMachine getDefaultStratum
return Returns the CRC 32 of the given reference type undefined if unknown public int get Class File Version virtual Machine Impl checkHCR Supported if f Got Class File Version return f Class File Version init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet HCR GET CLASS VERSION this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f IsHCR Eligible read Boolean HCR eligible reply Data NON NLS 1 f Is Version Known read Boolean version known reply Data NON NLS 1 f Class File Version read Int class file version reply Data NON NLS 1 f Got Class File Version true return f Class File Version catch IO Exception e defaultIO Exception Handler e return 0 finally handled Jdwp Request  getClassFileVersion virtualMachineImpl checkHCRSupported fGotClassFileVersion fClassFileVersion initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket HCR_GET_CLASS_VERSION defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fIsHCREligible readBoolean replyData fIsVersionKnown readBoolean replyData fClassFileVersion readInt replyData fGotClassFileVersion fClassFileVersion IOException defaultIOExceptionHandler handledJdwpRequest
return Returns whether the CRC 32 of the given reference type is known public boolean is Version Known get Class File Version return f Is Version Known  isVersionKnown getClassFileVersion fIsVersionKnown
return Returns whether the reference type is HCR eligible public boolean isHCR Eligible get Class File Version return f IsHCR Eligible  isHCREligible getClassFileVersion fIsHCREligible
Writes JDWP representation public void write Mirror Impl target Data Output Stream out throws IO Exception f Reference TypeID write out if target f Verbose Writer null target f Verbose Writer println reference Type f Reference TypeID value NON NLS 1  MirrorImpl DataOutputStream IOException fReferenceTypeID fVerboseWriter fVerboseWriter referenceType fReferenceTypeID
Writes representation of null reference Type public static void write Null Mirror Impl target Data Output Stream out throws IO Exception create null id Jdwp Reference TypeID ID new Jdwp Reference TypeID target virtual Machine Impl ID write out if target f Verbose Writer null target f Verbose Writer println reference Type ID value NON NLS 1  referenceType writeNull MirrorImpl DataOutputStream IOException JdwpReferenceTypeID JdwpReferenceTypeID virtualMachineImpl fVerboseWriter fVerboseWriter referenceType
Writes JDWP representation public void write With Tag Mirror Impl target Data Output Stream out throws IO Exception target write Byte type Tag type tag JdwpID type Tag Map out NON NLS 1 write target out  writeWithTag MirrorImpl DataOutputStream IOException writeByte typeTag typeTagMap
return Reads JDWP representation and returns new or cached instance public static Reference Type Impl read With Type Tag Mirror Impl target Data Input Stream in throws IO Exception byte type Tag target read Byte type tag JdwpID type Tag Map in NON NLS 1 switch type Tag case 0 return null case Array Type Impl type Tag return Array Type Impl read target in case Class Type Impl type Tag return Class Type Impl read target in case Interface Type Impl type Tag return Interface Type Impl read target in throw new Internal Exception JDI Messages get String Reference Type Impl Invalid ReferenceTypeID tag encountered   8 type Tag NON NLS 1  ReferenceTypeImpl readWithTypeTag MirrorImpl DataInputStream IOException typeTag readByte typeTagMap typeTag ArrayTypeImpl typeTag ArrayTypeImpl ClassTypeImpl typeTag ClassTypeImpl InterfaceTypeImpl typeTag InterfaceTypeImpl InternalException JDIMessages getString ReferenceTypeImpl Invalid_ReferenceTypeID_tag_encountered___8 typeTag
return Returns the Location objects for each executable source line in this reference type public List all Line Locations throws Absent Information Exception return all Line Locations virtual Machine get Default Stratum null  allLineLocations AbsentInformationException allLineLocations virtualMachine getDefaultStratum
return Reads JDWP representation and returns new or cached instance public static Reference Type Impl read With Type Tag And Signature Mirror Impl target boolean with Generic Signature Data Input Stream in throws IO Exception byte type Tag target read Byte type tag JdwpID type Tag Map in NON NLS 1 switch type Tag case 0 return null case Array Type Impl type Tag return Array Type Impl read With Signature target with Generic Signature in case Class Type Impl type Tag return Class Type Impl read With Signature target with Generic Signature in case Interface Type Impl type Tag return Interface Type Impl read With Signature target with Generic Signature in throw new Internal Exception JDI Messages get String Reference Type Impl Invalid ReferenceTypeID tag encountered   8 type Tag NON NLS 1  ReferenceTypeImpl readWithTypeTagAndSignature MirrorImpl withGenericSignature DataInputStream IOException typeTag readByte typeTagMap typeTag ArrayTypeImpl typeTag ArrayTypeImpl readWithSignature withGenericSignature ClassTypeImpl typeTag ClassTypeImpl readWithSignature withGenericSignature InterfaceTypeImpl typeTag InterfaceTypeImpl readWithSignature withGenericSignature InternalException JDIMessages getString ReferenceTypeImpl Invalid_ReferenceTypeID_tag_encountered___8 typeTag
return Returns new instance based on signature and class Loader throws Class Not Loaded Exception when the Reference Type has not been loaded by the specified class loader public static Type Impl create Virtual Machine Impl vm Impl String signature Class Loader Reference class Loader throws Class Not Loaded Exception Reference Type Impl ref Type Bootstrap null List classes vm Impl classes By Signature signature Reference Type Impl type Iterator iter classes iterator while iter has Next First pass Look for a class loaded by the given class loader type Reference Type Impl iter next if type class Loader null bootstrap classloader if class Loader null return type else ref Type Bootstrap type if class Loader null class Loader equals type class Loader return type If no Reference Type is found with the specified classloader but there is one with the bootstrap classloader the latter is returned if ref Type Bootstrap null return ref Type Bootstrap List visible Types iter classes iterator while iter has Next Second pass Look for a class that is visible to the given class loader type Reference Type Impl iter next visible Types class Loader visible Classes Iterator visible Iter visible Types iterator while visible Iter has Next if type equals visible Iter next return type throw new Class Not Loaded Exception Generic Signature signature To Name signature JDI Messages get String Reference Type Impl Type has not been loaded 10 NON NLS 1  classLoader ClassNotLoadedException ReferenceType TypeImpl VirtualMachineImpl vmImpl ClassLoaderReference classLoader ClassNotLoadedException ReferenceTypeImpl refTypeBootstrap vmImpl classesBySignature ReferenceTypeImpl hasNext ReferenceTypeImpl classLoader classLoader refTypeBootstrap classLoader classLoader classLoader ReferenceType refTypeBootstrap refTypeBootstrap visibleTypes hasNext ReferenceTypeImpl visibleTypes classLoader visibleClasses visibleIter visibleTypes visibleIter hasNext visibleIter ClassNotLoadedException GenericSignature signatureToName JDIMessages getString ReferenceTypeImpl Type_has_not_been_loaded_10
Retrieves constant mappings public static void get Constant Maps if fg Class Status Strings null return java lang reflect Field fields Reference Type Impl class get Declared Fields fg Class Status Strings new String 32 for int i 0 i fields length i java lang reflect Field field fields i if field get Modifiers Modifier PUBLIC 0 field get Modifiers Modifier STATIC 0 field get Modifiers Modifier FINAL 0 continue String name field get Name if name starts With JDWP CLASS STATUS  NON NLS 1 continue name name substring 18 try int value field get Int null for int j 0 j fg Class Status Strings length j if 1 j value 0 fg Class Status Strings j name break catch Illegal Access Exception e Will not occur for own class catch Illegal Argument Exception e Should not occur We should take care that all public static final constants in this class are numbers that are convertible to int  getConstantMaps fgClassStatusStrings ReferenceTypeImpl getDeclaredFields fgClassStatusStrings getModifiers getModifiers getModifiers getName startsWith JDWP_CLASS_STATUS_ getInt fgClassStatusStrings fgClassStatusStrings IllegalAccessException IllegalArgumentException
return Returns a map with string representations of tags public static String class Status Strings get Constant Maps return fg Class Status Strings  classStatusStrings getConstantMaps fgClassStatusStrings
see Type Impl create Null Value public Value create Null Value return null  TypeImpl createNullValue createNullValue
see Reference Type source Names String public List source Names String stratum Id throws Absent Information Exception List list new Array List Stratum stratum get Stratum stratum Id if stratum null return the source names defined for this stratum in the Smap List file Infos stratum f File Infos if file Infos is Empty throw new Absent Information Exception JDI Messages get String Reference Type Impl 30 NON NLS 1 for Iterator iter stratum f File Infos iterator iter has Next list add File Info iter next f File Name return list Java stratum if f Source Name null get Source Name list add f Source Name return list  ReferenceType sourceNames sourceNames stratumId AbsentInformationException ArrayList getStratum stratumId fileInfos fFileInfos fileInfos isEmpty AbsentInformationException JDIMessages getString ReferenceTypeImpl fFileInfos hasNext FileInfo fFileName fSourceName getSourceName fSourceName
see Reference Type source Paths String public List source Paths String stratum Id throws Absent Information Exception List list new Array List Stratum stratum get Stratum stratum Id if stratum null return the source paths defined for this stratum in the Smap for Iterator iter stratum f File Infos iterator iter has Next File Info file Info File Info iter next String path file Info f Absolute File Name if path null path get Path file Info f File Name list add path return list Java stratum if f Source Name null get Source Name list add get Path f Source Name return list  ReferenceType sourcePaths sourcePaths stratumId AbsentInformationException ArrayList getStratum stratumId fFileInfos hasNext FileInfo fileInfo FileInfo fileInfo fAbsoluteFileName getPath fileInfo fFileName fSourceName getSourceName getPath fSourceName
see Reference Type source Debug Extension public String source Debug Extension throws Absent Information Exception if is Source Debug Extension Available return f Smap if virtual Machine can Get Source Debug Extension throw new Unsupported Operation Exception throw new Absent Information Exception  ReferenceType sourceDebugExtension sourceDebugExtension AbsentInformationException isSourceDebugExtensionAvailable fSmap virtualMachine canGetSourceDebugExtension UnsupportedOperationException AbsentInformationException
see Reference Type all Line Locations String String public List all Line Locations String stratum String source Name throws Absent Information Exception Iterator all Methods methods iterator if stratum null if stratum not defined use the default stratum stratum default Stratum List all Line Locations null Map source Name All Line Locations null if f Stratum All Line Locations null the stratum map doesn t exist create it f Stratum All Line Locations new Hash Map else get the source name map source Name All Line Locations Map f Stratum All Line Locations get stratum if source Name All Line Locations null the source name map doesn t exist create it source Name All Line Locations new Hash Map f Stratum All Line Locations put stratum source Name All Line Locations else get the line locations all Line Locations List source Name All Line Locations get source Name if all Line Locations null the line locations are not know compute and store them all Line Locations new Array List while all Methods has Next Method Impl method Method Impl all Methods next if method is Abstract method is Native continue all Line Locations add All method all Line Locations stratum source Name source Name All Line Locations put source Name all Line Locations return all Line Locations  ReferenceType allLineLocations allLineLocations sourceName AbsentInformationException allMethods defaultStratum allLineLocations sourceNameAllLineLocations fStratumAllLineLocations fStratumAllLineLocations HashMap sourceNameAllLineLocations fStratumAllLineLocations sourceNameAllLineLocations sourceNameAllLineLocations HashMap fStratumAllLineLocations sourceNameAllLineLocations allLineLocations sourceNameAllLineLocations sourceName allLineLocations allLineLocations ArrayList allMethods hasNext MethodImpl MethodImpl allMethods isAbstract isNative allLineLocations addAll allLineLocations sourceName sourceNameAllLineLocations sourceName allLineLocations allLineLocations
see Reference Type locations Of Line String String int public List locations Of Line String stratum String source Name int line Number throws Absent Information Exception Iterator all Methods methods iterator List locations new Array List boolean has Line Information false Absent Information Exception exception null while all Methods has Next Method Impl method Method Impl all Methods next if method is Abstract method is Native continue one line in the input source can be translate in multiple lines in different methods in the output source We need all these locations try locations add All locations Of Line stratum source Name line Number method has Line Information true catch Absent Information Exception e exception e if has Line Information exception null throw exception return locations  ReferenceType locationsOfLine locationsOfLine sourceName lineNumber AbsentInformationException allMethods ArrayList hasLineInformation AbsentInformationException allMethods hasNext MethodImpl MethodImpl allMethods isAbstract isNative addAll locationsOfLine sourceName lineNumber hasLineInformation AbsentInformationException hasLineInformation
see Reference Type available Strata public List available Strata List list new Array List The strata defined in the Smap if is Source Debug Extension Available list add f Strata key Set plus the Java stratum list add Virtual Machine Impl JAVA STRATUM NAME return list  ReferenceType availableStrata availableStrata ArrayList isSourceDebugExtensionAvailable fStrata keySet VirtualMachineImpl JAVA_STRATUM_NAME
see Reference Type default Stratum public String default Stratum if is Source Debug Extension Available return f Default Stratum Id if not defined return Java return Virtual Machine Impl JAVA STRATUM NAME  ReferenceType defaultStratum defaultStratum isSourceDebugExtensionAvailable fDefaultStratumId VirtualMachineImpl JAVA_STRATUM_NAME
Generate a source path from the given source name The returned string is the package name of this type converted to a platform dependent path followed by the given source name For example on a Unix platform the type org my Test Jsp with the source name test jsp would return org my test jsp private String get Path String source Name String name name int last Dot Offset name last Index Of if last Dot Offset 1 return source Name char file Separator System get Property file separator char At 0 NON NLS 1 return name substring 0 last Dot Offset replace file Separator file Separator source Name  TestJsp getPath sourceName lastDotOffset lastIndexOf lastDotOffset sourceName fileSeparator getProperty charAt lastDotOffset fileSeparator fileSeparator sourceName
Return the stratum object for this stratum Id If the the specified stratum id is not defined for this reference type return the stratum object for the default stratum If the specified stratum id or the default stratum id if the specified stratum id is not defined is code Java code return code null code private Stratum get Stratum String stratum Id if Virtual Machine Impl JAVA STRATUM NAME equals stratum Id is Source Debug Extension Available if stratum Id null f Strata key Set contains stratum Id stratum Id f Default Stratum Id if Virtual Machine Impl JAVA STRATUM NAME equals stratum Id return Stratum f Strata get stratum Id return null  getStratum stratumId VirtualMachineImpl JAVA_STRATUM_NAME stratumId isSourceDebugExtensionAvailable stratumId fStrata keySet stratumId stratumId fDefaultStratumId VirtualMachineImpl JAVA_STRATUM_NAME stratumId fStrata stratumId
Get the source debug extension from the VM throws Absent Information Exception private void get Source Debug Extension throws Absent Information Exception init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet RT SOURCE DEBUG EXTENSION this if reply Packet error Code Jdwp Reply Packet ABSENT INFORMATION throw new Absent Information Exception JDI Messages get String Reference Type Impl 31 NON NLS 1 default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f Smap read String JDI Messages get String Reference Type Impl 32 reply Data NON NLS 1 catch IO Exception e defaultIO Exception Handler e finally handled Jdwp Request TODO remove the workaround when the J9SC20030415 bug is fixed see bug 96485 of the vendor bug system Workaround to a J9SC bug It returns an empty string instead of a ABSENT INFORMATION error if the source debug extension is not available if equals f Smap NON NLS 1 throw new Absent Information Exception JDI Messages get String Reference Type Impl 33 NON NLS 1 parse the source map f Strata new Hash Map Source Debug Extension Parser parse f Smap this  AbsentInformationException getSourceDebugExtension AbsentInformationException initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket RT_SOURCE_DEBUG_EXTENSION replyPacket errorCode JdwpReplyPacket ABSENT_INFORMATION AbsentInformationException JDIMessages getString ReferenceTypeImpl defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fSmap readString JDIMessages getString ReferenceTypeImpl replyData IOException defaultIOExceptionHandler handledJdwpRequest ABSENT_INFORMATION fSmap AbsentInformationException JDIMessages getString ReferenceTypeImpl fStrata HashMap SourceDebugExtensionParser fSmap
Get the name of the Java source file from the VM throws Absent Information Exception private void get Source Name throws Absent Information Exception if f Source Name null is Source Debug Extension Available return init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet RT SOURCE FILE this if reply Packet error Code Jdwp Reply Packet ABSENT INFORMATION throw new Absent Information Exception JDI Messages get String Reference Type Impl Source name is not known 7 NON NLS 1 else default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f Source Name read String source name reply Data NON NLS 1 catch IO Exception e defaultIO Exception Handler e finally handled Jdwp Request  AbsentInformationException getSourceName AbsentInformationException fSourceName isSourceDebugExtensionAvailable initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket RT_SOURCE_FILE replyPacket errorCode JdwpReplyPacket ABSENT_INFORMATION AbsentInformationException JDIMessages getString ReferenceTypeImpl Source_name_is_not_known_7 defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fSourceName readString replyData IOException defaultIOExceptionHandler handledJdwpRequest
Check in the source debug extension is available To call before doing operations which need data from the Smap Return code false code if the source debug extension is not available for any reason code true code indicates that the source debug extension is available and the information has been parsed and stored in the maps and lists private synchronized boolean is Source Debug Extension Available if f Source Debug Extension Available return false if virtual Machine can Get Source Debug Extension f Source Debug Extension Available false return false if f Smap null try get Source Debug Extension catch Absent Information Exception e f Source Debug Extension Available false return false return true  isSourceDebugExtensionAvailable fSourceDebugExtensionAvailable virtualMachine canGetSourceDebugExtension fSourceDebugExtensionAvailable fSmap getSourceDebugExtension AbsentInformationException fSourceDebugExtensionAvailable
Set the output file name i e the java file used to generate the bytecode protected void set Output File Name String output File Name f Source Name output File Name  setOutputFileName outputFileName fSourceName outputFileName
Set the default stratum This stratum will be used for the method on strata related data but with no stratum parameter protected void set Default Stratum Id String default Stratum Id f Default Stratum Id default Stratum Id  setDefaultStratumId defaultStratumId fDefaultStratumId defaultStratumId
Add a new stratum to this type protected void add Stratum Stratum stratum f Strata put stratum f Id stratum  addStratum fStrata fId
Return the name of the input source file of which the given code index is part of the translation for this stratum If the code at the given index is not a part of the translation of the given stratum code return the name of the primary input source file param code Index the index of the code param method the method where is the code param stratum Id protected String source Name long code Index Method Impl method String stratum Id throws Absent Information Exception Stratum stratum get Stratum stratum Id if stratum null File Info file Info file Info code Index method stratum if file Info null return file Info f File Name Java stratum if f Source Name null get Source Name return f Source Name  codeIndex stratumId sourceName codeIndex MethodImpl stratumId AbsentInformationException getStratum stratumId FileInfo fileInfo fileInfo codeIndex fileInfo fileInfo fFileName fSourceName getSourceName fSourceName
Return the File Info object of the input source file of which the given code index is part of the translation for this stratum If the code at the given index is not a part of the translation of the given stratum code return the File Info of the primary input source file param code Index the index of the code param method the method where is the code param stratum private File Info file Info long code Index Method Impl method Stratum stratum int file Id stratum f Primary File Id if stratum f File Infos size 1 List line Infos null try line Infos line Infos code Index method stratum catch Absent Information Exception e nothing to do use the primary file id if line Infos null file Id int line Infos get 0 0 for Iterator iter stratum f File Infos iterator iter has Next File Info file Info File Info iter next if file Info f File Id file Id return file Info should never return null return null  FileInfo FileInfo codeIndex FileInfo fileInfo codeIndex MethodImpl fileId fPrimaryFileId fFileInfos lineInfos lineInfos lineInfos codeIndex AbsentInformationException lineInfos fileId lineInfos fFileInfos hasNext FileInfo fileInfo FileInfo fileInfo fFileId fileId fileInfo
Return the list of line number in the input files of the stratum associated with the code at the given address param code Index the index of the code param method the method where is the code param stratum return List of int 2 file Id input Line Number private List line Infos long code Index Method Impl method Stratum stratum throws Absent Information Exception int output Line Number 1 try output Line Number method java Stratum Line Number code Index catch Native Method Exception e Occurs in SUN VM return null if output Line Number 1 return stratum get Input Line Infos output Line Number return null  codeIndex fileId inputLineNumber lineInfos codeIndex MethodImpl AbsentInformationException outputLineNumber outputLineNumber javaStratumLineNumber codeIndex NativeMethodException outputLineNumber getInputLineInfos outputLineNumber
Return the path of the input source file of which the given code index is part of the translation for this stratum If the code at the given index is not a part of the translation of the given stratum code return the path of the primary input source file param code Index the index of the code param method the method where is the code param stratum Id protected String source Path long code Index Method Impl method String stratum Id throws Absent Information Exception Stratum stratum get Stratum stratum Id if stratum null File Info file Info file Info code Index method stratum if file Info null String path file Info f Absolute File Name if path null return get Path file Info f File Name return path Java stratum if f Source Name null get Source Name return get Path f Source Name  codeIndex stratumId sourcePath codeIndex MethodImpl stratumId AbsentInformationException getStratum stratumId FileInfo fileInfo fileInfo codeIndex fileInfo fileInfo fAbsoluteFileName getPath fileInfo fFileName fSourceName getSourceName getPath fSourceName
Return the number of the line of which the given code index is part of the translation for this stratum param code Index the index of the code param method the method where is the code param stratum Id protected int line Number long code Index Method Impl method String stratum Id Stratum stratum get Stratum stratum Id try if stratum null List line Infos line Infos code Index method stratum if line Infos null return int line Infos get 0 1 return Location Impl LINE NR NOT AVAILABLE Java stratum try return method java Stratum Line Number code Index catch Native Method Exception e Occurs in SUN VM return Location Impl LINE NR NOT AVAILABLE catch Absent Information Exception e return Location Impl LINE NR NOT AVAILABLE  codeIndex stratumId lineNumber codeIndex MethodImpl stratumId getStratum stratumId lineInfos lineInfos codeIndex lineInfos lineInfos LocationImpl LINE_NR_NOT_AVAILABLE javaStratumLineNumber codeIndex NativeMethodException LocationImpl LINE_NR_NOT_AVAILABLE AbsentInformationException LocationImpl LINE_NR_NOT_AVAILABLE
Return the location which are part of the translation of the given line in the given stratum in the source file with the given source name If source Name is code null code return the locations for all source file in the given stratum The returned location are in the given method param stratum Id the stratum id param source Name the name of the source file param line Number the number of the line param method throws Absent Information Exception if the specified source Name is not valid public List locations Of Line String stratum Id String source Name int line Number Method Impl method throws Absent Information Exception Stratum stratum get Stratum stratum Id List java Lines new Array List if stratum null boolean found false for Iterator iter stratum f File Infos iterator iter has Next found File Info file Info File Info iter next if source Name null found source Name equals file Info f File Name java Lines add All file Info get Output Lines For Line line Number if source Name null found throw new Absent Information Exception JDI Messages get String Reference Type Impl 34 NON NLS 1 else Java stratum java Lines add new Integer line Number return method java Stratum Locations Of Lines java Lines  sourceName stratumId sourceName lineNumber AbsentInformationException sourceName locationsOfLine stratumId sourceName lineNumber MethodImpl AbsentInformationException getStratum stratumId javaLines ArrayList fFileInfos hasNext FileInfo fileInfo FileInfo sourceName sourceName fileInfo fFileName javaLines addAll fileInfo getOutputLinesForLine lineNumber sourceName AbsentInformationException JDIMessages getString ReferenceTypeImpl javaLines lineNumber javaStratumLocationsOfLines javaLines
Return the locations of all lines in the given source file of the given stratum which are included in the given method If source Name is code null code return the locations for all source file in the given stratum param stratum Id the stratum id param source Name the name of the source file param method param code Index Table the list of code indexes for the method as get from the VM JDWP param java Stratum Line Number Table the list of line numbers in the java stratum for the method as get from the VM JDWP return public List all Line Locations String stratum Id String source Name Method Impl method long code Index Table int java Stratum Line Number Table throws Absent Information Exception Stratum stratum get Stratum stratum Id if stratum null int line Info Table new int code Index Table length if source Name null int last Index 0 for int i 0 length java Stratum Line Number Table length i length i for each executable line in the java source get the associated lines in the stratum source List line Infos stratum get Input Line Infos java Stratum Line Number Table i if line Infos null int line Info int line Infos get 0 if line Info equals line Info Table last Index line Info Table i line Info last Index i else source Name null File Info file Info stratum get File Info source Name if file Info null throw new Absent Information Exception JDI Messages get String Reference Type Impl 35 NON NLS 1 int file Id file Info f File Id int last Index 0 for int i 0 length java Stratum Line Number Table length i length i List line Infos stratum get Input Line Infos java Stratum Line Number Table i if line Infos null for Iterator iter line Infos iterator iter has Next int line Info int iter next if line Info 0 file Id if line Info equals line Info Table last Index line Info Table i line Info last Index i break List locations new Array List for int i 0 length line Info Table length i length i if line Info Table i null locations add new Location Impl virtual Machine Impl method code Index Table i return locations Java stratum List result new Array List for int i 0 i code Index Table length i result add new Location Impl virtual Machine Impl method code Index Table i return result  sourceName stratumId sourceName codeIndexTable javaStratumLineNumberTable allLineLocations stratumId sourceName MethodImpl codeIndexTable javaStratumLineNumberTable AbsentInformationException getStratum stratumId lineInfoTable codeIndexTable sourceName lastIndex javaStratumLineNumberTable lineInfos getInputLineInfos javaStratumLineNumberTable lineInfos lineInfo lineInfos lineInfo lineInfoTable lastIndex lineInfoTable lineInfo lastIndex sourceName FileInfo fileInfo getFileInfo sourceName fileInfo AbsentInformationException JDIMessages getString ReferenceTypeImpl fileId fileInfo fFileId lastIndex javaStratumLineNumberTable lineInfos getInputLineInfos javaStratumLineNumberTable lineInfos lineInfos hasNext lineInfo lineInfo fileId lineInfo lineInfoTable lastIndex lineInfoTable lineInfo lastIndex ArrayList lineInfoTable lineInfoTable LocationImpl virtualMachineImpl codeIndexTable ArrayList codeIndexTable LocationImpl virtualMachineImpl codeIndexTable
public String generic Signature if f Generic Signature Known return f Generic Signature if virtual Machine Impl is Jdwp Version Greater Or Equal 1 5 init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet RT SIGNATURE WITH GENERIC this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream set Signature read String signature reply Data NON NLS 1 f Generic Signature read String generic signature reply Data NON NLS 1 if f Generic Signature length 0 f Generic Signature null f Generic Signature Known true catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request else f Generic Signature Known true return f Generic Signature  genericSignature fGenericSignatureKnown fGenericSignature virtualMachineImpl isJdwpVersionGreaterOrEqual initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket RT_SIGNATURE_WITH_GENERIC defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream setSignature readString replyData fGenericSignature readString replyData fGenericSignature fGenericSignature fGenericSignatureKnown IOException defaultIOExceptionHandler handledJdwpRequest fGenericSignatureKnown fGenericSignature
if generic Signature is code null code the generic signature is set to not known generic Signature will ask the VM for the generic signature if generic Signature is an empty String the generic signature is set to no generic signature generic Signature will return null if generic Signature is an non empty String the generic signature is set to the specified value generic Signature will return the specified value since 3 0 public void set Generic Signature String generic Signature if generic Signature null f Generic Signature null f Generic Signature Known false else if generic Signature length 0 f Generic Signature null else f Generic Signature generic Signature f Generic Signature Known true  genericSignature genericSignature genericSignature genericSignature genericSignature genericSignature setGenericSignature genericSignature genericSignature fGenericSignature fGenericSignatureKnown genericSignature fGenericSignature fGenericSignature genericSignature fGenericSignatureKnown

public class Access Watchpoint Request Impl extends Watchpoint Request Impl implements Access Watchpoint Request Creates new Access Watchpoint Request public Access Watchpoint Request Impl Virtual Machine Impl vm Impl super Access Watchpoint Request vm Impl NON NLS 1  AccessWatchpointRequestImpl WatchpointRequestImpl AccessWatchpointRequest AccessWatchpointRequest AccessWatchpointRequestImpl VirtualMachineImpl vmImpl AccessWatchpointRequest vmImpl
return Returns JDWP Event Kind protected final byte event Kind return Access Watchpoint Event Impl EVENT KIND  EventKind eventKind AccessWatchpointEventImpl EVENT_KIND

public class Breakpoint Request Impl extends Event Request Impl implements Breakpoint Request Locatable Creates new Breakpoint Request public Breakpoint Request Impl Virtual Machine Impl vm Impl super Breakpoint Request vm Impl NON NLS 1  BreakpointRequestImpl EventRequestImpl BreakpointRequest BreakpointRequest BreakpointRequestImpl VirtualMachineImpl vmImpl BreakpointRequest vmImpl
return Returns location of Breakpoint Request public Location location return Location f Location Filters get 0  fLocationFilters
return Returns JDWP Event Kind protected final byte event Kind return Breakpoint Event Impl EVENT KIND  EventKind eventKind BreakpointEventImpl EVENT_KIND

public class Class Prepare Request Impl extends Event Request Impl implements Class Prepare Request Creates new Class Prepare Request public Class Prepare Request Impl Virtual Machine Impl vm Impl super Class Prepare Request vm Impl NON NLS 1  ClassPrepareRequestImpl EventRequestImpl ClassPrepareRequest ClassPrepareRequest ClassPrepareRequestImpl VirtualMachineImpl vmImpl ClassPrepareRequest vmImpl
return Returns JDWP Event Kind protected final byte event Kind return Class Prepare Event Impl EVENT KIND  EventKind eventKind ClassPrepareEventImpl EVENT_KIND

public class Class Unload Request Impl extends Event Request Impl implements Class Unload Request Creates new Class Unload Request public Class Unload Request Impl Virtual Machine Impl vm Impl super Class Unload Request vm Impl NON NLS 1  ClassUnloadRequestImpl EventRequestImpl ClassUnloadRequest ClassUnloadRequest ClassUnloadRequestImpl VirtualMachineImpl vmImpl ClassUnloadRequest vmImpl
return Returns JDWP Event Kind protected final byte event Kind return Class Unload Event Impl EVENT KIND  EventKind eventKind ClassUnloadEventImpl EVENT_KIND

Creates new Event Request protected Event Request Impl String description Virtual Machine Impl vm Impl super description vm Impl  EventRequest EventRequestImpl VirtualMachineImpl vmImpl vmImpl
return Returns string representation public String to String return super to String f RequestID null Request Messages get String Event Request Impl   not enabled  1 Request Messages get String Event Request Impl    2 f RequestID NON NLS 1 NON NLS 2  toString toString fRequestID RequestMessages getString EventRequestImpl _ not_enabled _1 RequestMessages getString EventRequestImpl ___2 fRequestID
return Returns the value of the property with the specified key public Object get Property Object key if f Property Map null return null else return f Property Map get key  getProperty fPropertyMap fPropertyMap
Add an arbitrary key value property to this request public void put Property Object key Object value if f Property Map null f Property Map new Hash Map if value null f Property Map remove key else f Property Map put key value  putProperty fPropertyMap fPropertyMap HashMap fPropertyMap fPropertyMap
Sets the generated inside flag Used for requests that are not generated by JDI requests from outside public void set Generated Inside f Generated Inside true  setGeneratedInside fGeneratedInside
return Returns whether the event request was generated from inside of this JDI implementation public final boolean is Generated Inside return f Generated Inside  isGeneratedInside fGeneratedInside
Disables event request public void disable if is Enabled return init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write Byte event Kind event kind Event Impl event Kind Map out Data NON NLS 1 f RequestID write this out Data Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet ER CLEAR out Bytes switch reply Packet error Code case Jdwp Reply Packet NOT FOUND throw new Invalid Request State Exception default Reply Error Handler reply Packet error Code f RequestID null catch IO Exception e defaultIO Exception Handler e finally handled Jdwp Request  isEnabled initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes writeByte eventKind EventImpl eventKindMap outData fRequestID outData JdwpReplyPacket replyPacket JdwpCommandPacket ER_CLEAR outBytes replyPacket errorCode JdwpReplyPacket NOT_FOUND InvalidRequestStateException defaultReplyErrorHandler replyPacket errorCode fRequestID IOException defaultIOExceptionHandler handledJdwpRequest
Enables event request public void enable if is Enabled return init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write Byte event Kind event kind Event Impl event Kind Map out Data NON NLS 1 write Byte suspend PolicyJDWP suspend policy Event Request Impl suspend Policy Map out Data NON NLS 1 write Int modifier Count modifiers out Data NON NLS 1 write Modifiers out Data Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet ER SET out Bytes default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f RequestID RequestID read this reply Data virtual Machine Impl event Request Manager Impl add RequestID Mapping this catch IO Exception e defaultIO Exception Handler e finally handled Jdwp Request  isEnabled initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes writeByte eventKind EventImpl eventKindMap outData writeByte suspendPolicyJDWP EventRequestImpl suspendPolicyMap outData writeInt modifierCount outData writeModifiers outData JdwpReplyPacket replyPacket JdwpCommandPacket ER_SET outBytes defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fRequestID replyData virtualMachineImpl eventRequestManagerImpl addRequestIDMapping IOException defaultIOExceptionHandler handledJdwpRequest
Clear all breakpoints used by Event Request Manager public static void clear All Breakpoints Mirror Impl mirror mirror init Jdwp Request try Jdwp Reply Packet reply Packet mirror requestVM Jdwp Command Packet ER CLEAR ALL BREAKPOINTS mirror default Reply Error Handler reply Packet error Code finally mirror handled Jdwp Request  EventRequestManager clearAllBreakpoints MirrorImpl initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket ER_CLEAR_ALL_BREAKPOINTS defaultReplyErrorHandler replyPacket errorCode handledJdwpRequest
return Returns whether event request is enabled public final boolean is Enabled return f RequestID null  isEnabled fRequestID
Disables or enables event request public void set Enabled boolean enable if enable enable else disable  setEnabled
exception Invalid Request State Exception is thrown if this request is enabled public void check Disabled throws Invalid Request State Exception if is Enabled throw new Invalid Request State Exception  InvalidRequestStateException checkDisabled InvalidRequestStateException isEnabled InvalidRequestStateException
Sets suspend policy public void set Suspend Policy int suspend Policy f Suspend Policy byte suspend Policy if is Enabled disable enable  setSuspendPolicy suspendPolicy fSuspendPolicy suspendPolicy isEnabled
return Returns suspend policy public int suspend Policy return f Suspend Policy  suspendPolicy fSuspendPolicy
return Returns requestID or null if request ID is not yet assigned public final RequestID requestID return f RequestID  fRequestID
Sets countfilter public void add Count Filter int count throws Invalid Request State Exception check Disabled if f Count Filters null f Count Filters new Array List f Count Filters add new Integer count  addCountFilter InvalidRequestStateException checkDisabled fCountFilters fCountFilters ArrayList fCountFilters
Restricts reported events to those in the given thread public void add Thread Filter Thread Reference thread Filter throws Object Collected Exception VM Mismatch Exception Invalid Request State Exception checkVM thread Filter check Disabled if thread Filter is Collected throw new Object Collected Exception if f Thread Filters null f Thread Filters new Array List f Thread Filters add thread Filter  addThreadFilter ThreadReference threadFilter ObjectCollectedException VMMismatchException InvalidRequestStateException threadFilter checkDisabled threadFilter isCollected ObjectCollectedException fThreadFilters fThreadFilters ArrayList fThreadFilters threadFilter
Restricts the events generated by this request to the preparation of reference types whose name matches this restricted regular expression public void add Class Filter Reference Type filter throws VM Mismatch Exception Invalid Request State Exception checkVM filter check Disabled if f Class Filter Refs null f Class Filter Refs new Array List f Class Filter Refs add filter  addClassFilter ReferenceType VMMismatchException InvalidRequestStateException checkDisabled fClassFilterRefs fClassFilterRefs ArrayList fClassFilterRefs
Restricts the events generated by this request to be the preparation of the given reference type and any subtypes public void add Class Filter String filter throws Invalid Request State Exception check Disabled if f Class Filters null f Class Filters new Array List f Class Filters add filter  addClassFilter InvalidRequestStateException checkDisabled fClassFilters fClassFilters ArrayList fClassFilters
Restricts the events generated by this request to the preparation of reference types whose name does not match this restricted regular expression public void add Class Exclusion Filter String filter throws Invalid Request State Exception check Disabled if f Class Exclusion Filters null f Class Exclusion Filters new Array List f Class Exclusion Filters add filter  addClassExclusionFilter InvalidRequestStateException checkDisabled fClassExclusionFilters fClassExclusionFilters ArrayList fClassExclusionFilters
Restricts the events generated by this request to those that occur at the given location public void add Location Filter Location Impl location throws VM Mismatch Exception check Disabled Used in create Breakpoint Request checkVM location if f Location Filters null f Location Filters new Array List f Location Filters add location  addLocationFilter LocationImpl VMMismatchException checkDisabled createBreakpointRequest fLocationFilters fLocationFilters ArrayList fLocationFilters
Restricts reported exceptions by their class and whether they are caught or uncaught public void add Exception Filter Reference Type Impl ref Type boolean notify Caught boolean notify Uncaught throws VM Mismatch Exception check Disabled ref Type Null means report exceptions of all types if ref Type null checkVM ref Type if f Exception Filters null f Exception Filters new Array List Exception Filter filter new Exception Filter filter f Exception ref Type filter f Notify Caught notify Caught filter f Notify Uncaught notify Uncaught f Exception Filters add filter  addExceptionFilter ReferenceTypeImpl refType notifyCaught notifyUncaught VMMismatchException checkDisabled refType refType refType fExceptionFilters fExceptionFilters ArrayList ExceptionFilter ExceptionFilter fException refType fNotifyCaught notifyCaught fNotifyUncaught notifyUncaught fExceptionFilters
Restricts reported events to those that occur for a given field public void add Field Filter Field Impl field throws VM Mismatch Exception check Disabled Used in createX Watchpoint Request methods checkVM field if f Field Filters null f Field Filters new Array List f Field Filters add field  addFieldFilter FieldImpl VMMismatchException checkDisabled createXWatchpointRequest fFieldFilters fFieldFilters ArrayList fFieldFilters
Restricts reported step events to those which satisfy depth and size constraints public void add Step Filter Thread Reference Impl thread int size int depth throws VM Mismatch Exception Object Collected Exception check Disabled Used in create Step Request checkVM thread if thread is Collected throw new Object Collected Exception if f Thread Step Filters null f Thread Step Filters new Array List Thread Step Filter filter new Thread Step Filter filter f Thread thread filter f Thread Step Size size filter f Thread Step Depth depth f Thread Step Filters add filter  addStepFilter ThreadReferenceImpl VMMismatchException ObjectCollectedException checkDisabled createStepRequest isCollected ObjectCollectedException fThreadStepFilters fThreadStepFilters ArrayList ThreadStepFilter ThreadStepFilter fThread fThreadStepSize fThreadStepDepth fThreadStepFilters
public void add Instance Filter Object Reference instance check Disabled checkVM instance if f Instance Filters null f Instance Filters new Array List f Instance Filters add instance  addInstanceFilter ObjectReference checkDisabled fInstanceFilters fInstanceFilters ArrayList fInstanceFilters
return Returns JDWP constant for suspend policy public byte suspend PolicyJDWP switch f Suspend Policy case SUSPEND NONE return SUSPENDPOL NONE JDWP case SUSPEND EVENT THREAD return SUSPENDPOL EVENT THREAD JDWP case SUSPEND ALL return SUSPENDPOL ALL JDWP default throw new Internal Exception Request Messages get String Event Request Impl Invalid suspend policy encountered   3 f Suspend Policy NON NLS 1  suspendPolicyJDWP fSuspendPolicy SUSPEND_NONE SUSPENDPOL_NONE_JDWP SUSPEND_EVENT_THREAD SUSPENDPOL_EVENT_THREAD_JDWP SUSPEND_ALL SUSPENDPOL_ALL_JDWP InternalException RequestMessages getString EventRequestImpl Invalid_suspend_policy_encountered___3 fSuspendPolicy
return Returns JDWP constant for step size public int thread Step SizeJDWP int thread Step Size switch thread Step Size case Step Request STEP MIN return STEP SIZE MIN JDWP case Step Request STEP LINE return STEP SIZE LINE JDWP default throw new Internal Exception Request Messages get String Event Request Impl Invalid step size encountered   4 thread Step Size NON NLS 1  threadStepSizeJDWP threadStepSize threadStepSize StepRequest STEP_MIN STEP_SIZE_MIN_JDWP StepRequest STEP_LINE STEP_SIZE_LINE_JDWP InternalException RequestMessages getString EventRequestImpl Invalid_step_size_encountered___4 threadStepSize
return Returns JDWP constant for step depth public int thread Step DepthJDWP int thread Step Depth switch thread Step Depth case Step Request STEP INTO return STEP DEPTH INTO JDWP case Step Request STEP OVER return STEP DEPTH OVER JDWP case Step Request STEP OUT return STEP DEPTH OUT JDWP default throw new Internal Exception Request Messages get String Event Request Impl Invalid step depth encountered   5 thread Step Depth NON NLS 1  threadStepDepthJDWP threadStepDepth threadStepDepth StepRequest STEP_INTO STEP_DEPTH_INTO_JDWP StepRequest STEP_OVER STEP_DEPTH_OVER_JDWP StepRequest STEP_OUT STEP_DEPTH_OUT_JDWP InternalException RequestMessages getString EventRequestImpl Invalid_step_depth_encountered___5 threadStepDepth
return Returns JDWP Event Kind protected abstract byte event Kind  EventKind eventKind
return Returns number of modifiers protected int modifier Count int count 0 if f Count Filters null count f Count Filters size if f Thread Filters null count f Thread Filters size if f Class Filter Refs null count f Class Filter Refs size if f Class Filters null count f Class Filters size if f Class Exclusion Filters null count f Class Exclusion Filters size if f Location Filters null count f Location Filters size if f Exception Filters null count f Exception Filters size if f Field Filters null count f Field Filters size if f Thread Step Filters null count f Thread Step Filters size if f Instance Filters null count f Instance Filters size return count  modifierCount fCountFilters fCountFilters fThreadFilters fThreadFilters fClassFilterRefs fClassFilterRefs fClassFilters fClassFilters fClassExclusionFilters fClassExclusionFilters fLocationFilters fLocationFilters fExceptionFilters fExceptionFilters fFieldFilters fFieldFilters fThreadStepFilters fThreadStepFilters fInstanceFilters fInstanceFilters
Writes JDWP bytestream representation of modifiers protected void write Modifiers Data Output Stream out Data throws IO Exception Note for some reason the order of these modifiers matters when communicating with SUN s VM It seems to expect them the wrong way around if f Thread Step Filters null for int i 0 i f Thread Step Filters size i Thread Step Filter filter Thread Step Filter f Thread Step Filters get i write Byte MODIF KIND STEP modifier modifier Kind Map out Data NON NLS 1 filter f Thread write this out Data write Int thread Step SizeJDWP filter f Thread Step Size step size out Data NON NLS 1 write Int thread Step DepthJDWP filter f Thread Step Depth step depth out Data NON NLS 1 if f Field Filters null for int i 0 i f Field Filters size i write Byte MODIF KIND FIELDONLY modifier modifier Kind Map out Data NON NLS 1 Field Impl f Field Filters get i write With Reference Type this out Data if f Exception Filters null for int i 0 i f Exception Filters size i Exception Filter filter Exception Filter f Exception Filters get i write Byte MODIF KIND EXCEPTIONONLY modifier modifier Kind Map out Data NON NLS 1 if filter f Exception null filter f Exception write this out Data else Reference Type Impl write Null this out Data write Boolean filter f Notify Caught notify caught out Data NON NLS 1 write Boolean filter f Notify Uncaught notify uncaught out Data NON NLS 1 if f Location Filters null for int i 0 i f Location Filters size i write Byte MODIF KIND LOCATIONONLY modifier modifier Kind Map out Data NON NLS 1 Location Impl f Location Filters get i write this out Data if f Class Exclusion Filters null for int i 0 i f Class Exclusion Filters size i write Byte MODIF KIND CLASSEXCLUDE modifier modifier Kind Map out Data NON NLS 1 write String String f Class Exclusion Filters get i class excl filter out Data NON NLS 1 if f Class Filters null for int i 0 i f Class Filters size i write Byte MODIF KIND CLASSMATCH modifier modifier Kind Map out Data NON NLS 1 write String String f Class Filters get i class filter out Data NON NLS 1 if f Class Filter Refs null for int i 0 i f Class Filter Refs size i write Byte MODIF KIND CLASSONLY modifier modifier Kind Map out Data NON NLS 1 Reference Type Impl f Class Filter Refs get i write this out Data if f Thread Filters null for int i 0 i f Thread Filters size i write Byte MODIF KIND THREADONLY modifier modifier Kind Map out Data NON NLS 1 Thread Reference Impl f Thread Filters get i write this out Data if f Count Filters null for int i 0 i f Count Filters size i write Byte MODIF KIND COUNT modifier modifier Kind Map out Data NON NLS 1 write Int Integer f Count Filters get i int Value count filter out Data NON NLS 1 if f Instance Filters null for int i 0 i f Instance Filters size i write Byte MODIF KIND INSTANCE modifier modifier Kind Map out Data NON NLS 1 Object Reference Impl f Instance Filters get i write this out Data  writeModifiers DataOutputStream outData IOException fThreadStepFilters fThreadStepFilters ThreadStepFilter ThreadStepFilter fThreadStepFilters writeByte MODIF_KIND_STEP modifierKindMap outData fThread outData writeInt threadStepSizeJDWP fThreadStepSize outData writeInt threadStepDepthJDWP fThreadStepDepth outData fFieldFilters fFieldFilters writeByte MODIF_KIND_FIELDONLY modifierKindMap outData FieldImpl fFieldFilters writeWithReferenceType outData fExceptionFilters fExceptionFilters ExceptionFilter ExceptionFilter fExceptionFilters writeByte MODIF_KIND_EXCEPTIONONLY modifierKindMap outData fException fException outData ReferenceTypeImpl writeNull outData writeBoolean fNotifyCaught outData writeBoolean fNotifyUncaught outData fLocationFilters fLocationFilters writeByte MODIF_KIND_LOCATIONONLY modifierKindMap outData LocationImpl fLocationFilters outData fClassExclusionFilters fClassExclusionFilters writeByte MODIF_KIND_CLASSEXCLUDE modifierKindMap outData writeString fClassExclusionFilters outData fClassFilters fClassFilters writeByte MODIF_KIND_CLASSMATCH modifierKindMap outData writeString fClassFilters outData fClassFilterRefs fClassFilterRefs writeByte MODIF_KIND_CLASSONLY modifierKindMap outData ReferenceTypeImpl fClassFilterRefs outData fThreadFilters fThreadFilters writeByte MODIF_KIND_THREADONLY modifierKindMap outData ThreadReferenceImpl fThreadFilters outData fCountFilters fCountFilters writeByte MODIF_KIND_COUNT modifierKindMap outData writeInt fCountFilters intValue outData fInstanceFilters fInstanceFilters writeByte MODIF_KIND_INSTANCE modifierKindMap outData ObjectReferenceImpl fInstanceFilters outData
Retrieves constant mappings public static void get Constant Maps if f Step Size Map null return java lang reflect Field fields Event Request Impl class get Declared Fields f Step Size Map new Hash Map f Step Depth Map new Hash Map f Suspend Policy Map new Hash Map f Modifier Kind Map new Hash Map for int i 0 i fields length i java lang reflect Field field fields i if field get Modifiers java lang reflect Modifier PUBLIC 0 field get Modifiers java lang reflect Modifier STATIC 0 field get Modifiers java lang reflect Modifier FINAL 0 continue try String name field get Name Integer int Value new Integer field get Int null if name starts With STEP SIZE  NON NLS 1 name name substring 10 f Step Size Map put int Value name else if name starts With STEP DEPTH  NON NLS 1 name name substring 11 f Step Depth Map put int Value name else if name starts With SUSPENDPOL  NON NLS 1 name name substring 11 f Suspend Policy Map put int Value name else if name starts With MODIF KIND  NON NLS 1 name name substring 11 f Modifier Kind Map put int Value name catch Illegal Access Exception e Will not occur for own class catch Illegal Argument Exception e Should not occur We should take care that all public static final constants in this class are numbers that are convertible to int  getConstantMaps fStepSizeMap EventRequestImpl getDeclaredFields fStepSizeMap HashMap fStepDepthMap HashMap fSuspendPolicyMap HashMap fModifierKindMap HashMap getModifiers getModifiers getModifiers getName intValue getInt startsWith STEP_SIZE_ fStepSizeMap intValue startsWith STEP_DEPTH_ fStepDepthMap intValue startsWith SUSPENDPOL_ fSuspendPolicyMap intValue startsWith MODIF_KIND_ fModifierKindMap intValue IllegalAccessException IllegalArgumentException
return Returns a map with string representations of tags public static Map step Size Map get Constant Maps return f Step Size Map  stepSizeMap getConstantMaps fStepSizeMap
return Returns a map with string representations of tags public static Map step Depth Map get Constant Maps return f Step Depth Map  stepDepthMap getConstantMaps fStepDepthMap
return Returns a map with string representations of type tags public static Map suspend Policy Map get Constant Maps return f Suspend Policy Map  suspendPolicyMap getConstantMaps fSuspendPolicyMap
return Returns a map with string representations of type tags public static Map modifier Kind Map get Constant Maps return f Modifier Kind Map  modifierKindMap getConstantMaps fModifierKindMap

Creates new Event Request Manager public Event Request Manager Impl Virtual Machine Impl vm Impl super Event Request Manager vm Impl NON NLS 1 Initialize list of requests f Requests new Hash Set THREAD START INDEX 1 for int i 0 i f Requests length i f Requests i new Hash Set Initialize map of request I Ds to enabled requests f Enabled Requests new Hashtable THREAD START INDEX 1 for int i 0 i f Enabled Requests length i f Enabled Requests i new Hashtable  EventRequestManager EventRequestManagerImpl VirtualMachineImpl vmImpl EventRequestManager vmImpl fRequests HashSet THREAD_START_INDEX fRequests fRequests HashSet IDs fEnabledRequests THREAD_START_INDEX fEnabledRequests fEnabledRequests
Creates Access Watchpoint Request public Access Watchpoint Request create Access Watchpoint Request Field field Field Impl field Impl Field Impl field Access Watchpoint Request Impl req new Access Watchpoint Request Impl virtual Machine Impl req add Field Filter field Impl add Event Request ACCESS WATCHPOINT INDEX req return req  AccessWatchpointRequest AccessWatchpointRequest createAccessWatchpointRequest FieldImpl fieldImpl FieldImpl AccessWatchpointRequestImpl AccessWatchpointRequestImpl virtualMachineImpl addFieldFilter fieldImpl addEventRequest ACCESS_WATCHPOINT_INDEX
Creates Breakpoint Request public Breakpoint Request create Breakpoint Request Location location throws VM Mismatch Exception Location Impl loc Impl Location Impl location Breakpoint Request Impl req new Breakpoint Request Impl virtual Machine Impl req add Location Filter loc Impl add Event Request BREAKPOINT INDEX req return req  BreakpointRequest BreakpointRequest createBreakpointRequest VMMismatchException LocationImpl locImpl LocationImpl BreakpointRequestImpl BreakpointRequestImpl virtualMachineImpl addLocationFilter locImpl addEventRequest BREAKPOINT_INDEX
Creates Class Prepare Request public Class Prepare Request create Class Prepare Request Class Prepare Request Impl req new Class Prepare Request Impl virtual Machine Impl add Event Request CLASS PREPARE INDEX req return req  ClassPrepareRequest ClassPrepareRequest createClassPrepareRequest ClassPrepareRequestImpl ClassPrepareRequestImpl virtualMachineImpl addEventRequest CLASS_PREPARE_INDEX
Creates Class Unload Request public Class Unload Request create Class Unload Request Class Unload Request Impl req new Class Unload Request Impl virtual Machine Impl add Event Request CLASS UNLOAD INDEX req return req  ClassUnloadRequest ClassUnloadRequest createClassUnloadRequest ClassUnloadRequestImpl ClassUnloadRequestImpl virtualMachineImpl addEventRequest CLASS_UNLOAD_INDEX
Creates Exception Request public Exception Request create Exception Request Reference Type ref Type boolean notify Caught boolean notify Uncaught Reference Type Impl ref Type Impl Reference Type Impl ref Type Exception Request Impl req new Exception Request Impl virtual Machine Impl req add Exception Filter ref Type Impl notify Caught notify Uncaught add Event Request EXCEPTION INDEX req return req  ExceptionRequest ExceptionRequest createExceptionRequest ReferenceType refType notifyCaught notifyUncaught ReferenceTypeImpl refTypeImpl ReferenceTypeImpl refType ExceptionRequestImpl ExceptionRequestImpl virtualMachineImpl addExceptionFilter refTypeImpl notifyCaught notifyUncaught addEventRequest EXCEPTION_INDEX
Creates Method Entry Request public Method Entry Request create Method Entry Request Method Entry Request Impl req new Method Entry Request Impl virtual Machine Impl add Event Request METHOD ENTRY INDEX req return req  MethodEntryRequest MethodEntryRequest createMethodEntryRequest MethodEntryRequestImpl MethodEntryRequestImpl virtualMachineImpl addEventRequest METHOD_ENTRY_INDEX
Creates Method Exit Request public Method Exit Request create Method Exit Request Method Exit Request Impl req new Method Exit Request Impl virtual Machine Impl add Event Request METHOD EXIT INDEX req return req  MethodExitRequest MethodExitRequest createMethodExitRequest MethodExitRequestImpl MethodExitRequestImpl virtualMachineImpl addEventRequest METHOD_EXIT_INDEX
Creates Modification Watchpoint Request public Modification Watchpoint Request create Modification Watchpoint Request Field field Field Impl field Impl Field Impl field Modification Watchpoint Request Impl req new Modification Watchpoint Request Impl virtual Machine Impl req add Field Filter field Impl add Event Request MODIFICATION WATCHPOINT INDEX req return req  ModificationWatchpointRequest ModificationWatchpointRequest createModificationWatchpointRequest FieldImpl fieldImpl FieldImpl ModificationWatchpointRequestImpl ModificationWatchpointRequestImpl virtualMachineImpl addFieldFilter fieldImpl addEventRequest MODIFICATION_WATCHPOINT_INDEX
Creates Step Request public Step Request create Step Request Thread Reference thread int size int depth throws Duplicate Request Exception Object Collected Exception Thread Reference Impl thread Impl Thread Reference Impl thread Step Request Impl req new Step Request Impl virtual Machine Impl req add Step Filter thread Impl size depth add Event Request STEP INDEX req return req  StepRequest StepRequest createStepRequest ThreadReference DuplicateRequestException ObjectCollectedException ThreadReferenceImpl threadImpl ThreadReferenceImpl StepRequestImpl StepRequestImpl virtualMachineImpl addStepFilter threadImpl addEventRequest STEP_INDEX
Creates Thread Death Request public Thread Death Request create Thread Death Request Thread Death Request Impl req new Thread Death Request Impl virtual Machine Impl add Event Request THREAD DEATH INDEX req return req  ThreadDeathRequest ThreadDeathRequest createThreadDeathRequest ThreadDeathRequestImpl ThreadDeathRequestImpl virtualMachineImpl addEventRequest THREAD_DEATH_INDEX
Creates Thread Start Request public Thread Start Request create Thread Start Request Thread Start Request Impl req new Thread Start Request Impl virtual Machine Impl add Event Request THREAD START INDEX req return req  ThreadStartRequest ThreadStartRequest createThreadStartRequest ThreadStartRequestImpl ThreadStartRequestImpl virtualMachineImpl addEventRequest THREAD_START_INDEX
public VM Death Request createVM Death Request VM Death Request Impl req new VM Death Request Impl virtual Machine Impl add Event Request VM DEATH INDEX req return req  VMDeathRequest createVMDeathRequest VMDeathRequestImpl VMDeathRequestImpl virtualMachineImpl addEventRequest VM_DEATH_INDEX
Creates Reenter Step Request for OTI specific Hot Code Replacement public org eclipse jdi hcr Reenter Step Request create Reenter Step Request Thread Reference thread virtual Machine Impl checkHCR Supported Thread Reference Impl thread Impl Thread Reference Impl thread Reenter Step Request Impl req new Reenter Step Request Impl virtual Machine Impl Note that the Step Filter is only used to specify the thread The size is ignored and the depth will always be writter as HCR STEP DEPTH REENTER JDWP req add Step Filter thread Impl Step Request STEP MIN 0 Since this is a special case of a step request we use the same request list add Event Request STEP INDEX req return req  ReenterStepRequest ReenterStepRequest createReenterStepRequest ThreadReference virtualMachineImpl checkHCRSupported ThreadReferenceImpl threadImpl ThreadReferenceImpl ReenterStepRequestImpl ReenterStepRequestImpl virtualMachineImpl StepFilter HCR_STEP_DEPTH_REENTER_JDWP addStepFilter threadImpl StepRequest STEP_MIN addEventRequest STEP_INDEX
Enables class prepare requests for all loaded classes This is necessary for current versions of the KVM to function correctly This method is only called when the remote VM is determined to be the KVM public void enable Internal Class Prepare Event Note that these requests are not stored in the set of outstanding requests because they must be invisible from outside Class Prepare Request Impl request Prepare new Class Prepare Request Impl virtual Machine Impl request Prepare set Generated Inside request Prepare set Suspend Policy Event Request SUSPEND NONE request Prepare enable  enableInternalClassPrepareEvent ClassPrepareRequestImpl requestPrepare ClassPrepareRequestImpl virtualMachineImpl requestPrepare setGeneratedInside requestPrepare setSuspendPolicy EventRequest SUSPEND_NONE requestPrepare
Creates Class Unload Request for maintaining class information for within JDI Needed to known when to flush the cache public void enable Internal Clas Unload Event tbd Reference Type Impl ref Type Note that these requests are not stored in the set of outstanding requests because they must be invisible from outside Class Unload Request Impl req Unload new Class Unload Request Impl virtual Machine Impl req Unload set Generated Inside tbd It is now yet possible to only ask for unload events for classes that we know of due to a limitation in the J9 VM req Unload add Class Filter ref Type req Unload set Suspend Policy Event Request SUSPEND NONE req Unload enable  ClassUnloadRequest enableInternalClasUnloadEvent ReferenceTypeImpl refType ClassUnloadRequestImpl reqUnload ClassUnloadRequestImpl virtualMachineImpl reqUnload setGeneratedInside reqUnload addClassFilter refType reqUnload setSuspendPolicy EventRequest SUSPEND_NONE reqUnload
Checks if a steprequest is for the given thread is already enabled boolean exists Enabled Step Request Thread Reference Impl thread Impl Enumeration enumeration f Enabled Requests STEP INDEX elements Step Request Impl step while enumeration has More Elements step Step Request Impl enumeration next Element if step thread thread Impl return true return false  existsEnabledStepRequest ThreadReferenceImpl threadImpl fEnabledRequests STEP_INDEX StepRequestImpl hasMoreElements StepRequestImpl nextElement threadImpl
Deletes all Breakpoints public void delete All Breakpoints Event Request Impl clear All Breakpoints this f Requests BREAKPOINT INDEX clear f Enabled Requests BREAKPOINT INDEX clear  deleteAllBreakpoints EventRequestImpl clearAllBreakpoints fRequests BREAKPOINT_INDEX fEnabledRequests BREAKPOINT_INDEX
Adds an Event Requests to the given list public void add Event Request int index Event Request req f Requests index add req  EventRequests addEventRequest EventRequest fRequests
Deletes an Event Request private void delete Event Request int index Event Request req throws VM Mismatch Exception Remove request from list of requests and from the mapping of requestI Ds to requests checkVM req Event Request Impl request Impl Event Request Impl req f Requests index remove request Impl if request Impl requestID null f Enabled Requests index remove request Impl requestID  EventRequest deleteEventRequest EventRequest VMMismatchException requestIDs EventRequestImpl requestImpl EventRequestImpl fRequests requestImpl requestImpl fEnabledRequests requestImpl
Deletes an Event Request public void delete Event Request Event Request req Disable request note that this also causes the event request to be removed from f Enabled Requests try req disable catch Invalid Request State Exception exception The event has already been removed from the VM Remove request from list if req instanceof Access Watchpoint Request Impl delete Event Request ACCESS WATCHPOINT INDEX req else if req instanceof Breakpoint Request Impl delete Event Request BREAKPOINT INDEX req else if req instanceof Class Prepare Request Impl delete Event Request CLASS PREPARE INDEX req else if req instanceof Class Unload Request Impl delete Event Request CLASS UNLOAD INDEX req else if req instanceof Exception Request Impl delete Event Request EXCEPTION INDEX req else if req instanceof Method Entry Request Impl delete Event Request METHOD ENTRY INDEX req else if req instanceof Method Exit Request Impl delete Event Request METHOD EXIT INDEX req else if req instanceof Modification Watchpoint Request Impl delete Event Request MODIFICATION WATCHPOINT INDEX req else if req instanceof Step Request Impl delete Event Request STEP INDEX req else if req instanceof Thread Death Request Impl delete Event Request THREAD DEATH INDEX req else if req instanceof Thread Start Request Impl delete Event Request THREAD START INDEX req else throw new Internal Error Message Format format Request Messages get String Event Request Manager Impl EventRequest type of  0  is unknown 1 new String req to String NON NLS 1  EventRequest deleteEventRequest EventRequest fEnabledRequests InvalidRequestStateException AccessWatchpointRequestImpl deleteEventRequest ACCESS_WATCHPOINT_INDEX BreakpointRequestImpl deleteEventRequest BREAKPOINT_INDEX ClassPrepareRequestImpl deleteEventRequest CLASS_PREPARE_INDEX ClassUnloadRequestImpl deleteEventRequest CLASS_UNLOAD_INDEX ExceptionRequestImpl deleteEventRequest EXCEPTION_INDEX MethodEntryRequestImpl deleteEventRequest METHOD_ENTRY_INDEX MethodExitRequestImpl deleteEventRequest METHOD_EXIT_INDEX ModificationWatchpointRequestImpl deleteEventRequest MODIFICATION_WATCHPOINT_INDEX StepRequestImpl deleteEventRequest STEP_INDEX ThreadDeathRequestImpl deleteEventRequest THREAD_DEATH_INDEX ThreadStartRequestImpl deleteEventRequest THREAD_START_INDEX InternalError MessageFormat RequestMessages getString EventRequestManagerImpl EventRequest_type_of_ _is_unknown_1 toString
Deletes all Event Requests from the given list public void delete Event Requests List requests throws VM Mismatch Exception Iterator iter requests iterator while iter has Next Object obj iter next delete Event Request Event Request obj  EventRequests deleteEventRequests VMMismatchException hasNext deleteEventRequest EventRequest
return Returns list of Access Watchpoint Requests For changes the appropriate Event Request Manager methods should be used public List access Watchpoint Requests return new Array List f Requests ACCESS WATCHPOINT INDEX  AccessWatchpointRequests EventRequestManager accessWatchpointRequests ArrayList fRequests ACCESS_WATCHPOINT_INDEX
return Returns list of Breakpoint Requests For changes the appropriate Event Request Manager methods should be used public List breakpoint Requests return new Array List f Requests BREAKPOINT INDEX  BreakpointRequests EventRequestManager breakpointRequests ArrayList fRequests BREAKPOINT_INDEX
return Returns list of Class Prepare Requests For changes the appropriate Event Request Manager methods should be used public List class Prepare Requests return new Array List f Requests CLASS PREPARE INDEX  ClassPrepareRequests EventRequestManager classPrepareRequests ArrayList fRequests CLASS_PREPARE_INDEX
return Returns list of Class Unload Requests For changes the appropriate Event Request Manager methods should be used public List class Unload Requests return new Array List f Requests CLASS UNLOAD INDEX  ClassUnloadRequests EventRequestManager classUnloadRequests ArrayList fRequests CLASS_UNLOAD_INDEX
return Returns list of Exception Requests For changes the appropriate Event Request Manager methods should be used public List exception Requests return new Array List f Requests EXCEPTION INDEX  ExceptionRequests EventRequestManager exceptionRequests ArrayList fRequests EXCEPTION_INDEX
return Returns list of Method Entry Requests For changes the appropriate Event Request Manager methods should be used public List method Entry Requests return new Array List f Requests METHOD ENTRY INDEX  MethodEntryRequests EventRequestManager methodEntryRequests ArrayList fRequests METHOD_ENTRY_INDEX
return Returns list of Method Exit Requests For changes the appropriate Event Request Manager methods should be used public List method Exit Requests return new Array List f Requests METHOD EXIT INDEX  MethodExitRequests EventRequestManager methodExitRequests ArrayList fRequests METHOD_EXIT_INDEX
return Returns list of Modification Watchpoint Requests For changes the appropriate Event Request Manager methods should be used public List modification Watchpoint Requests return new Array List f Requests MODIFICATION WATCHPOINT INDEX  ModificationWatchpointRequests EventRequestManager modificationWatchpointRequests ArrayList fRequests MODIFICATION_WATCHPOINT_INDEX
return Returns list of Step Requests For changes the appropriate Event Request Manager methods should be used public List step Requests return new Array List f Requests STEP INDEX  StepRequests EventRequestManager stepRequests ArrayList fRequests STEP_INDEX
return Returns list of Thread Death Requests For changes the appropriate Event Request Manager methods should be used public List thread Death Requests return new Array List f Requests THREAD DEATH INDEX  ThreadDeathRequests EventRequestManager threadDeathRequests ArrayList fRequests THREAD_DEATH_INDEX
return Returns list of Thread Start Requests For changes the appropriate Event Request Manager methods should be used public List thread Start Requests return new Array List f Requests THREAD START INDEX  ThreadStartRequests EventRequestManager threadStartRequests ArrayList fRequests THREAD_START_INDEX
return Returns list of VM Death Requests For changes the appropriate Event Request Manager methods should be used public List vm Death Requests return new Array List f Requests VM DEATH INDEX  VMDeathRequests EventRequestManager vmDeathRequests ArrayList fRequests VM_DEATH_INDEX
Maps a reuqest ID to requests public void add RequestID Mapping Event Request Impl req if req instanceof Access Watchpoint Request Impl f Enabled Requests ACCESS WATCHPOINT INDEX put req requestID req else if req instanceof Breakpoint Request Impl f Enabled Requests BREAKPOINT INDEX put req requestID req else if req instanceof Class Prepare Request Impl f Enabled Requests CLASS PREPARE INDEX put req requestID req else if req instanceof Class Unload Request Impl f Enabled Requests CLASS UNLOAD INDEX put req requestID req else if req instanceof Exception Request Impl f Enabled Requests EXCEPTION INDEX put req requestID req else if req instanceof Method Entry Request Impl f Enabled Requests METHOD ENTRY INDEX put req requestID req else if req instanceof Method Exit Request Impl f Enabled Requests METHOD EXIT INDEX put req requestID req else if req instanceof Modification Watchpoint Request Impl f Enabled Requests MODIFICATION WATCHPOINT INDEX put req requestID req else if req instanceof Step Request Impl f Enabled Requests STEP INDEX put req requestID req else if req instanceof Thread Death Request Impl f Enabled Requests THREAD DEATH INDEX put req requestID req else if req instanceof Thread Start Request Impl f Enabled Requests THREAD START INDEX put req requestID req  addRequestIDMapping EventRequestImpl AccessWatchpointRequestImpl fEnabledRequests ACCESS_WATCHPOINT_INDEX BreakpointRequestImpl fEnabledRequests BREAKPOINT_INDEX ClassPrepareRequestImpl fEnabledRequests CLASS_PREPARE_INDEX ClassUnloadRequestImpl fEnabledRequests CLASS_UNLOAD_INDEX ExceptionRequestImpl fEnabledRequests EXCEPTION_INDEX MethodEntryRequestImpl fEnabledRequests METHOD_ENTRY_INDEX MethodExitRequestImpl fEnabledRequests METHOD_EXIT_INDEX ModificationWatchpointRequestImpl fEnabledRequests MODIFICATION_WATCHPOINT_INDEX StepRequestImpl fEnabledRequests STEP_INDEX ThreadDeathRequestImpl fEnabledRequests THREAD_DEATH_INDEX ThreadStartRequestImpl fEnabledRequests THREAD_START_INDEX
Find Request that matches event public Event Request Impl find Request Event Impl event if event instanceof Access Watchpoint Event Impl return Event Request Impl f Enabled Requests ACCESS WATCHPOINT INDEX get event requestID else if event instanceof Breakpoint Event Impl return Event Request Impl f Enabled Requests BREAKPOINT INDEX get event requestID else if event instanceof Class Prepare Event Impl return Class Prepare Request Impl f Enabled Requests CLASS PREPARE INDEX get event requestID else if event instanceof Class Unload Event Impl return Event Request Impl f Enabled Requests CLASS UNLOAD INDEX get event requestID else if event instanceof Exception Event Impl return Event Request Impl f Enabled Requests EXCEPTION INDEX get event requestID else if event instanceof Method Entry Event Impl return Event Request Impl f Enabled Requests METHOD ENTRY INDEX get event requestID else if event instanceof Method Exit Event Impl return Event Request Impl f Enabled Requests METHOD EXIT INDEX get event requestID else if event instanceof Modification Watchpoint Event Impl return Event Request Impl f Enabled Requests MODIFICATION WATCHPOINT INDEX get event requestID else if event instanceof Step Event Impl return Event Request Impl f Enabled Requests STEP INDEX get event requestID else if event instanceof Thread Death Event Impl return Event Request Impl f Enabled Requests THREAD DEATH INDEX get event requestID else if event instanceof Thread Start Event Impl return Event Request Impl f Enabled Requests THREAD START INDEX get event requestID else if event instanceof VM Death Event Impl return Event Request Impl f Enabled Requests VM DEATH INDEX get event requestID else throw new Internal Error Request Messages get String Event Request Manager Impl Got event of unknown type 2 NON NLS 1  EventRequestImpl findRequest EventImpl AccessWatchpointEventImpl EventRequestImpl fEnabledRequests ACCESS_WATCHPOINT_INDEX BreakpointEventImpl EventRequestImpl fEnabledRequests BREAKPOINT_INDEX ClassPrepareEventImpl ClassPrepareRequestImpl fEnabledRequests CLASS_PREPARE_INDEX ClassUnloadEventImpl EventRequestImpl fEnabledRequests CLASS_UNLOAD_INDEX ExceptionEventImpl EventRequestImpl fEnabledRequests EXCEPTION_INDEX MethodEntryEventImpl EventRequestImpl fEnabledRequests METHOD_ENTRY_INDEX MethodExitEventImpl EventRequestImpl fEnabledRequests METHOD_EXIT_INDEX ModificationWatchpointEventImpl EventRequestImpl fEnabledRequests MODIFICATION_WATCHPOINT_INDEX StepEventImpl EventRequestImpl fEnabledRequests STEP_INDEX ThreadDeathEventImpl EventRequestImpl fEnabledRequests THREAD_DEATH_INDEX ThreadStartEventImpl EventRequestImpl fEnabledRequests THREAD_START_INDEX VMDeathEventImpl EventRequestImpl fEnabledRequests VM_DEATH_INDEX InternalError RequestMessages getString EventRequestManagerImpl Got_event_of_unknown_type_2

public class Exception Request Impl extends Event Request Impl implements Exception Request Creates new Event Request Manager public Exception Request Impl Virtual Machine Impl vm Impl super Exception Request vm Impl NON NLS 1  ExceptionRequestImpl EventRequestImpl ExceptionRequest EventRequestManager ExceptionRequestImpl VirtualMachineImpl vmImpl ExceptionRequest vmImpl
Returns exception type for which exception events are requested public Reference Type exception return Event Request Impl Exception Filter f Exception Filters get 0 f Exception  ReferenceType EventRequestImpl ExceptionFilter fExceptionFilters fException
return Returns true if caught exceptions will be reported public boolean notify Caught return Event Request Impl Exception Filter f Exception Filters get 0 f Notify Caught  notifyCaught EventRequestImpl ExceptionFilter fExceptionFilters fNotifyCaught
return Returns true if uncaught exceptions will be reported public boolean notify Uncaught return Event Request Impl Exception Filter f Exception Filters get 0 f Notify Uncaught  notifyUncaught EventRequestImpl ExceptionFilter fExceptionFilters fNotifyUncaught
return Returns JDWP Event Kind protected final byte event Kind return Exception Event Impl EVENT KIND  EventKind eventKind ExceptionEventImpl EVENT_KIND

public class Method Entry Request Impl extends Event Request Impl implements Method Entry Request Creates new Method Entry Request public Method Entry Request Impl Virtual Machine Impl vm Impl super Method Entry Request vm Impl NON NLS 1  MethodEntryRequestImpl EventRequestImpl MethodEntryRequest MethodEntryRequest MethodEntryRequestImpl VirtualMachineImpl vmImpl MethodEntryRequest vmImpl
return Returns JDWP Event Kind protected final byte event Kind return Method Entry Event Impl EVENT KIND  EventKind eventKind MethodEntryEventImpl EVENT_KIND

public class Method Exit Request Impl extends Event Request Impl implements Method Exit Request Creates new Method Exit Request public Method Exit Request Impl Virtual Machine Impl vm Impl super Method Exit Request vm Impl NON NLS 1  MethodExitRequestImpl EventRequestImpl MethodExitRequest MethodExitRequest MethodExitRequestImpl VirtualMachineImpl vmImpl MethodExitRequest vmImpl
return Returns JDWP Event Kind protected final byte event Kind return Method Exit Event Impl EVENT KIND  EventKind eventKind MethodExitEventImpl EVENT_KIND

public class Modification Watchpoint Request Impl extends Watchpoint Request Impl implements Modification Watchpoint Request Creates new Modification Watchpoint Request public Modification Watchpoint Request Impl Virtual Machine Impl vm Impl super Modification Watchpoint Request vm Impl NON NLS 1  ModificationWatchpointRequestImpl WatchpointRequestImpl ModificationWatchpointRequest ModificationWatchpointRequest ModificationWatchpointRequestImpl VirtualMachineImpl vmImpl ModificationWatchpointRequest vmImpl
return Returns JDWP Event Kind protected final byte event Kind return Modification Watchpoint Event Impl EVENT KIND  EventKind eventKind ModificationWatchpointEventImpl EVENT_KIND

public class Reenter Step Request Impl extends Step Request Impl implements org eclipse jdi hcr Reenter Step Request Creates new Reenter Step Request Impl public Reenter Step Request Impl Virtual Machine Impl vm Impl super Reenter Step Request vm Impl NON NLS 1  ReenterStepRequestImpl StepRequestImpl ReenterStepRequest ReenterStepRequestImpl ReenterStepRequestImpl VirtualMachineImpl vmImpl ReenterStepRequest vmImpl
return Returns JDWP constant for step depth public int thread Step DepthJDWP int thread Step Depth return STEP DEPTH REENTER JDWP HCR  threadStepDepthJDWP threadStepDepth STEP_DEPTH_REENTER_JDWP_HCR
Enables event request public void enable if is Enabled return init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write Byte event Kind event kind Event Impl event Kind Map out Data Always 01 for Step event NON NLS 1 write Byte suspend PolicyJDWP suspend policy out Data NON NLS 1 write Int modifier Count modifiers out Data NON NLS 1 write Modifiers out Data Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet HCR REENTER ON EXIT out Bytes default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f RequestID RequestID read this reply Data virtual Machine Impl event Request Manager Impl add RequestID Mapping this catch IO Exception e defaultIO Exception Handler e finally handled Jdwp Request  isEnabled initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes writeByte eventKind EventImpl eventKindMap outData writeByte suspendPolicyJDWP outData writeInt modifierCount outData writeModifiers outData JdwpReplyPacket replyPacket JdwpCommandPacket HCR_REENTER_ON_EXIT outBytes defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fRequestID replyData virtualMachineImpl eventRequestManagerImpl addRequestIDMapping IOException defaultIOExceptionHandler handledJdwpRequest

Creates new request ID private RequestID int ID f RequestID ID  fRequestID
return Returns whether the request ID is a NULL ID which means that there is no corresponding request public boolean is Null return f RequestID NULL REQUEST ID  isNull fRequestID NULL_REQUEST_ID
return Returns true if two RequestI Ds are the same see java lang Object equals Object public boolean equals Object object return object null object get Class equals this get Class f RequestID RequestID object f RequestID  RequestIDs getClass getClass fRequestID fRequestID
return Returns a has code for this object see java lang Object hash Code public int hash Code return f RequestID  hashCode hashCode fRequestID
return Returns string representation public String to String return new Long f RequestID to String  toString fRequestID toString
Writes I Dto stream public void write Mirror Impl target Data Output Stream out throws IO Exception target write Int f RequestID request ID out NON NLS 1  IDto MirrorImpl DataOutputStream IOException writeInt fRequestID
return Returns a new request ID read from stream public static RequestID read Mirror Impl target Data Input Stream in throws IO Exception int result target read Int request ID in NON NLS 1 return new RequestID result  MirrorImpl DataInputStream IOException readInt

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Request Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME RequestMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public class Step Request Impl extends Event Request Impl implements Step Request Creates new Step Request public Step Request Impl Virtual Machine Impl vm Impl super Step Request vm Impl NON NLS 1  StepRequestImpl EventRequestImpl StepRequest StepRequest StepRequestImpl VirtualMachineImpl vmImpl StepRequest vmImpl
Creates new Step Request used by subclasses protected Step Request Impl String description Virtual Machine Impl vm Impl super description vm Impl  StepRequest StepRequestImpl VirtualMachineImpl vmImpl vmImpl
return Returns the relative call stack limit public int depth return Event Request Impl Thread Step Filter f Thread Step Filters get 0 f Thread Step Depth  EventRequestImpl ThreadStepFilter fThreadStepFilters fThreadStepDepth
return Returns the size of each step public int size return Event Request Impl Thread Step Filter f Thread Step Filters get 0 f Thread Step Size  EventRequestImpl ThreadStepFilter fThreadStepFilters fThreadStepSize
return Returns Thread Reference of thread in which to step public Thread Reference thread return Event Request Impl Thread Step Filter f Thread Step Filters get 0 f Thread  ThreadReference ThreadReference EventRequestImpl ThreadStepFilter fThreadStepFilters fThread
return Returns JDWP Event Kind protected final byte event Kind return Step Event Impl EVENT KIND  EventKind eventKind StepEventImpl EVENT_KIND

public class Thread Death Request Impl extends Event Request Impl implements Thread Death Request Creates new Thread Death Request public Thread Death Request Impl Virtual Machine Impl vm Impl super Thread Death Request vm Impl NON NLS 1  ThreadDeathRequestImpl EventRequestImpl ThreadDeathRequest ThreadDeathRequest ThreadDeathRequestImpl VirtualMachineImpl vmImpl ThreadDeathRequest vmImpl
return Returns JDWP Event Kind protected final byte event Kind return Thread Death Event Impl EVENT KIND  EventKind eventKind ThreadDeathEventImpl EVENT_KIND

public class Thread Start Request Impl extends Event Request Impl implements Thread Start Request Creates new Thread Start Request public Thread Start Request Impl Virtual Machine Impl vm Impl super Thread Start Request vm Impl NON NLS 1  ThreadStartRequestImpl EventRequestImpl ThreadStartRequest ThreadStartRequest ThreadStartRequestImpl VirtualMachineImpl vmImpl ThreadStartRequest vmImpl
return Returns JDWP Event Kind protected final byte event Kind return Thread Start Event Impl EVENT KIND  EventKind eventKind ThreadStartEventImpl EVENT_KIND

public class VM Death Request Impl extends Event Request Impl implements VM Death Request public VM Death Request Impl Virtual Machine Impl vm Impl super VM Death Request vm Impl NON NLS 1  VMDeathRequestImpl EventRequestImpl VMDeathRequest VMDeathRequestImpl VirtualMachineImpl vmImpl VMDeathRequest vmImpl
return JDWP event kind protected byte event Kind return VM Death Event Impl EVENT KIND  eventKind VMDeathEventImpl EVENT_KIND

public abstract class Watchpoint Request Impl extends Event Request Impl implements Watchpoint Request Creates new Watchpoint Request only used by subclasses public Watchpoint Request Impl String description Virtual Machine Impl vm Impl super description vm Impl  WatchpointRequestImpl EventRequestImpl WatchpointRequest WatchpointRequest WatchpointRequestImpl VirtualMachineImpl vmImpl vmImpl
return Returns field for which Watchpoint requests is issued public Field field return Field f Field Filters get 0  fFieldFilters

public class Short Type Impl extends Primitive Type Impl implements Short Type Creates new instance public Short Type Impl Virtual Machine Impl vm Impl super Short Type vm Impl short S NON NLS 1 NON NLS 2 NON NLS 3  ShortTypeImpl PrimitiveTypeImpl ShortType ShortTypeImpl VirtualMachineImpl vmImpl ShortType vmImpl
returns primitive type tag public byte tag return Short Value Impl tag  ShortValueImpl
return Create a null value instance of the type public Value create Null Value return virtual Machine Impl mirror Of short 0  createNullValue virtualMachineImpl mirrorOf

Creates new instance public Short Value Impl Virtual Machine Impl vm Impl Short value super Short Value vm Impl value NON NLS 1  ShortValueImpl VirtualMachineImpl vmImpl ShortValue vmImpl
returns tag public byte get Tag return tag  getTag
returns type of value public Type type return virtual Machine Impl get Short Type  virtualMachineImpl getShortType
returns Value public short value return short Value  shortValue
return Reads and returns new instance public static Short Value Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl short value target read Short short Value in NON NLS 1 return new Short Value Impl vm Impl new Short value  ShortValueImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl readShort shortValue ShortValueImpl vmImpl
Writes value without value tag public void write Mirror Impl target Data Output Stream out throws IO Exception target write Short Short f Value short Value short Value out NON NLS 1  MirrorImpl DataOutputStream IOException writeShort fValue shortValue shortValue

public Lexer String smap f Smap smap to Char Array f Lexem Type UNKNOWN f Pointer 1 next Char  fSmap toCharArray fLexemType fPointer nextChar
Compute the next lexem return the type of the next lexem public int next Lexem throws Absent Information Exception if fEOF throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 0 NON NLS 1 else start With return f Lexem Type  nextLexem AbsentInformationException AbsentInformationException JDIMessages getString SourceDebugExtensionParser startWith fLexemType
private char next Char if f Pointer f Smap length fEOF true return 000 f Char f Smap f Pointer return f Char  nextChar fPointer fSmap fChar fSmap fPointer fChar
private void start With throws Absent Information Exception switch f Char case n case r start WithCR break case start With Asterisk break case f Lexem new char f Lexem Type COLON next Char break case f Lexem new char f Lexem Type COMMA next Char break case f Lexem new char f Lexem Type SHARP next Char break case f Lexem new char f Lexem Type PLUS next Char break default start With Other Char break  startWith AbsentInformationException fChar startWithCR startWithAsterisk fLexem fLexemType nextChar fLexem fLexemType nextChar fLexem fLexemType nextChar fLexem fLexemType nextChar startWithOtherChar
private void start With Other Char int lexem Start f Pointer consume White Space if f Char 0 f Char 9 a number number lexem Start else non Asterisk String lexem Start  startWithOtherChar lexemStart fPointer consumeWhiteSpace fChar fChar lexemStart nonAsteriskString lexemStart
param lexem Start private void non Asterisk String int lexem Start while f Char n f Char r fEOF next Char int length f Pointer lexem Start f Lexem new char length System arraycopy f Smap lexem Start f Lexem 0 length if length 4 f Lexem 0 S f Lexem 1 M f Lexem 2 A f Lexem 3 P f Lexem Type SMAP else f Lexem Type NON ASTERISK STRING  lexemStart nonAsteriskString lexemStart fChar fChar nextChar fPointer lexemStart fLexem fSmap lexemStart fLexem fLexem fLexem fLexem fLexem fLexemType fLexemType NON_ASTERISK_STRING
param lexem Start private void number int lexem Start while f Char 0 f Char 9 next Char consume White Space f Lexem Type NUMBER int length f Pointer lexem Start f Lexem new char length System arraycopy f Smap lexem Start f Lexem 0 length  lexemStart lexemStart fChar fChar nextChar consumeWhiteSpace fLexemType fPointer lexemStart fLexem fSmap lexemStart fLexem
private void start With Asterisk throws Absent Information Exception next Char if fEOF throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 1 NON NLS 1 switch f Char case C f Lexem Type ASTERISK C break case E f Lexem Type ASTERISK E break case F f Lexem Type ASTERISK F break case L f Lexem Type ASTERISK L break case O f Lexem Type ASTERISK O break case S f Lexem Type ASTERISK S break case V f Lexem Type ASTERISK V break default f Lexem Type ASTERISK CHAR break f Lexem new char f Char next Char  startWithAsterisk AbsentInformationException nextChar AbsentInformationException JDIMessages getString SourceDebugExtensionParser fChar fLexemType ASTERISK_C fLexemType ASTERISK_E fLexemType ASTERISK_F fLexemType ASTERISK_L fLexemType ASTERISK_O fLexemType ASTERISK_S fLexemType ASTERISK_V fLexemType ASTERISK_CHAR fLexem fChar nextChar
private void start WithCR if f Char r if next Char n f Lexem new char r n next Char else f Lexem new char r else f Lexem new char f Char next Char f Lexem Type CR  startWithCR fChar nextChar fLexem nextChar fLexem fLexem fChar nextChar fLexemType
private void consume White Space while f Char f Char t next Char  consumeWhiteSpace fChar fChar nextChar
return the value of the current lexem public char lexem return f Lexem  fLexem
return the type of the current lexem public int lexem Type return f Lexem Type  lexemType fLexemType
public static void parse String smap Reference Type Impl reference Type throws Absent Information Exception new Source Debug Extension Parser reference Type parse Smap smap  ReferenceTypeImpl referenceType AbsentInformationException SourceDebugExtensionParser referenceType parseSmap
Source Debug Extension constructor private Source Debug Extension Parser Reference Type Impl reference Type f Reference Type reference Type f Defined Strata new Array List f Defined Strata add Virtual Machine Impl JAVA STRATUM NAME  SourceDebugExtension SourceDebugExtensionParser ReferenceTypeImpl referenceType fReferenceType referenceType fDefinedStrata ArrayList fDefinedStrata VirtualMachineImpl JAVA_STRATUM_NAME
private void parse Smap String smap throws Absent Information Exception Lexer lexer new Lexer smap parse Header lexer parse Sections lexer if f Defined Strata contains f Reference Type default Stratum throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 2 NON NLS 1  parseSmap AbsentInformationException parseHeader parseSections fDefinedStrata fReferenceType defaultStratum AbsentInformationException JDIMessages getString SourceDebugExtensionParser
param lexer private void parse Header Lexer lexer throws Absent Information Exception int lexem Type lexer next Lexem if lexem Type Lexer SMAP throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 3 NON NLS 1 if lexer next Lexem Lexer CR throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 4 NON NLS 1 if is Asterisk Lexem lexer next Lexem throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 5 NON NLS 1 f Reference Type set Output File Name get Non Asterisk String lexer if is Asterisk Lexem lexer lexem Type throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 6 NON NLS 1 f Reference Type set Default Stratum Id get Non Asterisk String lexer  parseHeader AbsentInformationException lexemType nextLexem lexemType AbsentInformationException JDIMessages getString SourceDebugExtensionParser nextLexem AbsentInformationException JDIMessages getString SourceDebugExtensionParser isAsteriskLexem nextLexem AbsentInformationException JDIMessages getString SourceDebugExtensionParser fReferenceType setOutputFileName getNonAsteriskString isAsteriskLexem lexemType AbsentInformationException JDIMessages getString SourceDebugExtensionParser fReferenceType setDefaultStratumId getNonAsteriskString
param lexer private void parse Sections Lexer lexer throws Absent Information Exception while lexer lexem Type Lexer ASTERISK E parse Stratum Section lexer  parseSections AbsentInformationException lexemType ASTERISK_E parseStratumSection
param lexer private void parse Stratum Section Lexer lexer throws Absent Information Exception if lexer lexem Type Lexer ASTERISK S throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 7 NON NLS 1 if is Asterisk Lexem lexer next Lexem throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 8 NON NLS 1 String stratum Id get Non Asterisk String lexer if f Defined Strata contains stratum Id throw new Absent Information Exception Message Format format JDI Messages get String Source Debug Extension Parser 9 new String stratum Id NON NLS 1 f Current Stratum new Reference Type Impl Stratum stratum Id f File Section Defined For Current Stratum false f Line Section Defined For Current Stratum false int lexem Type lexer lexem Type while lexem Type Lexer ASTERISK E lexem Type Lexer ASTERISK S switch lexem Type case Lexer ASTERISK F if f File Section Defined For Current Stratum throw new Absent Information Exception Message Format format JDI Messages get String Source Debug Extension Parser 10 new String stratum Id NON NLS 1 parse File Section lexer f File Section Defined For Current Stratum true break case Lexer ASTERISK L if f Line Section Defined For Current Stratum throw new Absent Information Exception Message Format format JDI Messages get String Source Debug Extension Parser 11 new String stratum Id NON NLS 1 parse Line Section lexer f Line Section Defined For Current Stratum true break case Lexer ASTERISK V parse Vendor Section lexer break case Lexer ASTERISK CHAR parse Future Section lexer break default throw new Absent Information Exception Message Format format JDI Messages get String Source Debug Extension Parser 12 new String new String lexer lexem NON NLS 1 lexem Type lexer lexem Type if f File Section Defined For Current Stratum throw new Absent Information Exception Message Format format JDI Messages get String Source Debug Extension Parser 13 new String stratum Id NON NLS 1 if f Line Section Defined For Current Stratum throw new Absent Information Exception Message Format format JDI Messages get String Source Debug Extension Parser 14 new String stratum Id NON NLS 1 f Defined Strata add stratum Id f Reference Type add Stratum f Current Stratum  parseStratumSection AbsentInformationException lexemType ASTERISK_S AbsentInformationException JDIMessages getString SourceDebugExtensionParser isAsteriskLexem nextLexem AbsentInformationException JDIMessages getString SourceDebugExtensionParser stratumId getNonAsteriskString fDefinedStrata stratumId AbsentInformationException MessageFormat JDIMessages getString SourceDebugExtensionParser stratumId fCurrentStratum ReferenceTypeImpl stratumId fFileSectionDefinedForCurrentStratum fLineSectionDefinedForCurrentStratum lexemType lexemType lexemType ASTERISK_E lexemType ASTERISK_S lexemType ASTERISK_F fFileSectionDefinedForCurrentStratum AbsentInformationException MessageFormat JDIMessages getString SourceDebugExtensionParser stratumId parseFileSection fFileSectionDefinedForCurrentStratum ASTERISK_L fLineSectionDefinedForCurrentStratum AbsentInformationException MessageFormat JDIMessages getString SourceDebugExtensionParser stratumId parseLineSection fLineSectionDefinedForCurrentStratum ASTERISK_V parseVendorSection ASTERISK_CHAR parseFutureSection AbsentInformationException MessageFormat JDIMessages getString SourceDebugExtensionParser lexemType lexemType fFileSectionDefinedForCurrentStratum AbsentInformationException MessageFormat JDIMessages getString SourceDebugExtensionParser stratumId fLineSectionDefinedForCurrentStratum AbsentInformationException MessageFormat JDIMessages getString SourceDebugExtensionParser stratumId fDefinedStrata stratumId fReferenceType addStratum fCurrentStratum
param lexer private void parse File Section Lexer lexer throws Absent Information Exception if lexer next Lexem Lexer CR throw new Absent Information Exception Message Format format JDI Messages get String Source Debug Extension Parser 15 new String new String lexer lexem NON NLS 1 lexer next Lexem while is Asterisk Lexem lexer lexem Type parse File Info lexer  parseFileSection AbsentInformationException nextLexem AbsentInformationException MessageFormat JDIMessages getString SourceDebugExtensionParser nextLexem isAsteriskLexem lexemType parseFileInfo
param lexer private void parse File Info Lexer lexer throws Absent Information Exception int lexem Type lexer lexem Type if lexem Type Lexer NUMBER int file Id integer Value lexer lexem if is Asterisk Lexem lexer next Lexem throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 16 NON NLS 1 f Current Stratum add File Info file Id get Non Asterisk String lexer else if lexem Type Lexer PLUS if lexer next Lexem Lexer NUMBER throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 17 NON NLS 1 int file Id integer Value lexer lexem if is Asterisk Lexem lexer next Lexem throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 18 NON NLS 1 String file Name get Non Asterisk String lexer if is Asterisk Lexem lexer lexem Type throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 19 NON NLS 1 f Current Stratum add File Info file Id file Name get Non Asterisk String lexer else throw new Absent Information Exception Message Format format JDI Messages get String Source Debug Extension Parser 20 new String new String lexer lexem NON NLS 1  parseFileInfo AbsentInformationException lexemType lexemType lexemType fileId integerValue isAsteriskLexem nextLexem AbsentInformationException JDIMessages getString SourceDebugExtensionParser fCurrentStratum addFileInfo fileId getNonAsteriskString lexemType nextLexem AbsentInformationException JDIMessages getString SourceDebugExtensionParser fileId integerValue isAsteriskLexem nextLexem AbsentInformationException JDIMessages getString SourceDebugExtensionParser fileName getNonAsteriskString isAsteriskLexem lexemType AbsentInformationException JDIMessages getString SourceDebugExtensionParser fCurrentStratum addFileInfo fileId fileName getNonAsteriskString AbsentInformationException MessageFormat JDIMessages getString SourceDebugExtensionParser
param lexer private void parse Line Section Lexer lexer throws Absent Information Exception f Current Line File Id 0 if lexer next Lexem Lexer CR throw new Absent Information Exception Message Format format JDI Messages get String Source Debug Extension Parser 21 new String new String lexer lexem NON NLS 1 lexer next Lexem while is Asterisk Lexem lexer lexem Type parse Line Info lexer  parseLineSection AbsentInformationException fCurrentLineFileId nextLexem AbsentInformationException MessageFormat JDIMessages getString SourceDebugExtensionParser nextLexem isAsteriskLexem lexemType parseLineInfo
param lexer private void parse Line Info Lexer lexer throws Absent Information Exception if lexer lexem Type Lexer NUMBER throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 22 NON NLS 1 int input Start Line integer Value lexer lexem int lexem Type lexer next Lexem if lexem Type Lexer SHARP if lexer next Lexem Lexer NUMBER throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 23 NON NLS 1 f Current Line File Id integer Value lexer lexem lexem Type lexer next Lexem int repeat Count if lexem Type Lexer COMMA if lexer next Lexem Lexer NUMBER throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 24 NON NLS 1 repeat Count integer Value lexer lexem lexem Type lexer next Lexem else repeat Count 1 if lexem Type Lexer COLON throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 25 NON NLS 1 if lexer next Lexem Lexer NUMBER throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 26 NON NLS 1 int output Start Line integer Value lexer lexem lexem Type lexer next Lexem int output Line Increment if lexem Type Lexer COMMA if lexer next Lexem Lexer NUMBER throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 27 NON NLS 1 output Line Increment integer Value lexer lexem lexem Type lexer next Lexem else output Line Increment 1 if lexem Type Lexer CR throw new Absent Information Exception JDI Messages get String Source Debug Extension Parser 28 NON NLS 1 lexer next Lexem f Current Stratum add Line Info input Start Line f Current Line File Id repeat Count output Start Line output Line Increment  parseLineInfo AbsentInformationException lexemType AbsentInformationException JDIMessages getString SourceDebugExtensionParser inputStartLine integerValue lexemType nextLexem lexemType nextLexem AbsentInformationException JDIMessages getString SourceDebugExtensionParser fCurrentLineFileId integerValue lexemType nextLexem repeatCount lexemType nextLexem AbsentInformationException JDIMessages getString SourceDebugExtensionParser repeatCount integerValue lexemType nextLexem repeatCount lexemType AbsentInformationException JDIMessages getString SourceDebugExtensionParser nextLexem AbsentInformationException JDIMessages getString SourceDebugExtensionParser outputStartLine integerValue lexemType nextLexem outputLineIncrement lexemType nextLexem AbsentInformationException JDIMessages getString SourceDebugExtensionParser outputLineIncrement integerValue lexemType nextLexem outputLineIncrement lexemType AbsentInformationException JDIMessages getString SourceDebugExtensionParser nextLexem fCurrentStratum addLineInfo inputStartLine fCurrentLineFileId repeatCount outputStartLine outputLineIncrement
param lexer private void parse Vendor Section Lexer lexer throws Absent Information Exception if lexer next Lexem Lexer CR throw new Absent Information Exception Message Format format JDI Messages get String Source Debug Extension Parser 29 new String new String lexer lexem NON NLS 1 lexer next Lexem while is Asterisk Lexem lexer lexem Type do nothing in this case just consume the lexems get Non Asterisk String lexer  parseVendorSection AbsentInformationException nextLexem AbsentInformationException MessageFormat JDIMessages getString SourceDebugExtensionParser nextLexem isAsteriskLexem lexemType getNonAsteriskString
param lexer private void parse Future Section Lexer lexer throws Absent Information Exception if lexer next Lexem Lexer CR throw new Absent Information Exception Message Format format JDI Messages get String Source Debug Extension Parser 30 new String new String lexer lexem NON NLS 1 lexer next Lexem while is Asterisk Lexem lexer lexem Type do nothing in this case just consume the lexems get Non Asterisk String lexer  parseFutureSection AbsentInformationException nextLexem AbsentInformationException MessageFormat JDIMessages getString SourceDebugExtensionParser nextLexem isAsteriskLexem lexemType getNonAsteriskString
private String get Non Asterisk String Lexer lexer throws Absent Information Exception String Buffer string new String Buffer int lexem Type lexer lexem Type while lexem Type Lexer CR string append lexer lexem lexem Type lexer next Lexem lexer next Lexem remove the leading white spaces int i 1 length string length char c while i length c string char At i c t return string delete 0 i to String  getNonAsteriskString AbsentInformationException StringBuffer StringBuffer lexemType lexemType lexemType lexemType nextLexem nextLexem charAt toString
private int integer Value char lexem int i 0 char c lexem 0 while c c t c lexem i int value 0 while c 0 c 9 value value 10 c 0 if i lexem length break c lexem i return value  integerValue
private boolean is Asterisk Lexem int lexem Type switch lexem Type case Lexer ASTERISK C case Lexer ASTERISK E case Lexer ASTERISK F case Lexer ASTERISK L case Lexer ASTERISK O case Lexer ASTERISK S case Lexer ASTERISK V case Lexer ASTERISK CHAR return true default return false  isAsteriskLexem lexemType lexemType ASTERISK_C ASTERISK_E ASTERISK_F ASTERISK_L ASTERISK_O ASTERISK_S ASTERISK_V ASTERISK_CHAR

Creates new Jdwp Command Packet protected Jdwp Command Packet  JdwpCommandPacket JdwpCommandPacket
Creates new Jdwp Command Packet public Jdwp Command Packet int command set Command command set Id get New Id  JdwpCommandPacket JdwpCommandPacket setCommand setId getNewId
return Returns unique id for command packet public static synchronized int get New Id return fg Next Id  getNewId fgNextId
return Returns JDWP command set of packet public byte get Command Set return byte f Command 8  getCommandSet fCommand
return Returns 256 JDWP Command Set unsigned JDWP Command public int get Command return f Command  CommandSet getCommand fCommand
Assigns command 256 JDWP Command Set unsigned JDWP Command public void set Command int command f Command command  CommandSet setCommand fCommand
Reads header fields that are specific for this type of packet protected void read Specific Header Fields Data Input Stream data In Stream throws IO Exception byte command Set data In Stream read Byte f Command data In Stream read Byte command Set 8  readSpecificHeaderFields DataInputStream dataInStream IOException commandSet dataInStream readByte fCommand dataInStream readByte commandSet
Writes header fields that are specific for this type of packet protected void write Specific Header Fields Data Output Stream data Out Stream throws IO Exception data Out Stream write Byte get Command Set data Out Stream write Byte byte f Command  writeSpecificHeaderFields DataOutputStream dataOutStream IOException dataOutStream writeByte getCommandSet dataOutStream writeByte fCommand
Retrieves constant mappings public static void get Constant Maps if fg Command Map null return Field fields Jdwp Command Packet class get Declared Fields First get the set names Map set Names new Hash Map fields length for int i 0 i fields length i Field field fields i if field get Modifiers Modifier PUBLIC 0 field get Modifiers Modifier STATIC 0 field get Modifiers Modifier FINAL 0 continue try String name field get Name If it is not a set continue if name starts With CSET  NON NLS 1 continue int value field get Int null set Names put new Integer value remove Prefix name catch Illegal Access Exception e Will not occur for own class catch Illegal Argument Exception e Should not occur We should take care that all public static final constants in this class are numbers that are convertible to int Get the commands fg Command Map new Hash Map for int i 0 i fields length i Field field fields i if field get Modifiers Modifier PUBLIC 0 field get Modifiers Modifier STATIC 0 field get Modifiers Modifier FINAL 0 continue try String name field get Name If it is a set continue if name starts With CSET  NON NLS 1 continue Integer val Integer field get null int value val int Value int set value 8 String set Name String set Names get new Integer set String entry Name set Name remove Prefix name NON NLS 1 fg Command Map put val entry Name catch Illegal Access Exception e Will not occur for own class  getConstantMaps fgCommandMap JdwpCommandPacket getDeclaredFields setNames HashMap getModifiers getModifiers getModifiers getName startsWith CSET_ getInt setNames removePrefix IllegalAccessException IllegalArgumentException fgCommandMap HashMap getModifiers getModifiers getModifiers getName startsWith CSET_ intValue setName setNames entryName setName removePrefix fgCommandMap entryName IllegalAccessException
return Returns a map with string representations of error codes public static Map command Map get Constant Maps return fg Command Map  commandMap getConstantMaps fgCommandMap
return Returns string without XXX  prefix public static String remove Prefix String str int i str index Of   if i 0 return str else return str substring i 1  XXX_ removePrefix indexOf _

private Jdwp Reply Packet f Reply Jdwp Conversation int id f Id id  JdwpReplyPacket fReply JdwpConversation fId
void set Command Jdwp Command Packet command if f Command null throw new Illegal Argument Exception Message Format format Tcp Ip Spy Messages get String Jdwp Conversation Attempt to overwrite command with  0  1 new String command to String NON NLS 1 f Command command  setCommand JdwpCommandPacket fCommand IllegalArgumentException MessageFormat TcpIpSpyMessages getString JdwpConversation Attempt_to_overwrite_command_with_ _1 toString fCommand
void set Reply Jdwp Reply Packet reply if f Reply null throw new Illegal Argument Exception Message Format format Tcp Ip Spy Messages get String Jdwp Conversation Attempt to overwrite reply with  0  2 new String reply to String NON NLS 1 f Reply reply  setReply JdwpReplyPacket fReply IllegalArgumentException MessageFormat TcpIpSpyMessages getString JdwpConversation Attempt_to_overwrite_reply_with_ _2 toString fReply
public Jdwp Command Packet get Command return f Command  JdwpCommandPacket getCommand fCommand
public Jdwp Reply Packet get Reply return f Reply  JdwpReplyPacket getReply fReply
public int get Id return f Id  getId fId

Set Id package void set Id int id f Id id  setId fId
return Returns Id public int get Id return f Id  getId fId
Set Flags package void set Flags byte flags f Flags flags  setFlags fFlags
return Returns Flags public byte get Flags return f Flags  getFlags fFlags
return Returns total length of packet public int get Length return MIN PACKET LENGTH get Data Length  getLength MIN_PACKET_LENGTH getDataLength
return Returns length of data in packet public int get Data Length return f Data Buf null 0 f Data Buf length  getDataLength fDataBuf fDataBuf
return Returns data of packet public byte data return f Data Buf  fDataBuf
return Returns Data Input Stream with reply data or an empty stream if there is none public Data Input Stream data In Stream if f Data Buf null return new Data Input Stream new Byte Array Input Stream f Data Buf else return new Data Input Stream new Byte Array Input Stream new byte 0  DataInputStream DataInputStream dataInStream fDataBuf DataInputStream ByteArrayInputStream fDataBuf DataInputStream ByteArrayInputStream
Assigns data to packet public void set Data byte data f Data Buf data  setData fDataBuf
Reads header fields that are specific for a type of packet protected abstract void read Specific Header Fields Data Input Stream data In Stream throws IO Exception  readSpecificHeaderFields DataInputStream dataInStream IOException
protected abstract void read Specific Header Fields Data Input Stream data In Stream throws IO Exception Writes header fields that are specific for a type of packet protected abstract void write Specific Header Fields Data Output Stream data Out Stream throws IO Exception  readSpecificHeaderFields DataInputStream dataInStream IOException writeSpecificHeaderFields DataOutputStream dataOutStream IOException
Reads complete packet public static Jdwp Packet read Input Stream in Stream throws IO Exception Data Input Stream data In Stream new Data Input Stream in Stream Read header int packet Length data In Stream read Int int id data In Stream read Int byte flags data In Stream read Byte Determine type command or reply Jdwp Packet packet if flags FLAG REPLY PACKET 0 packet new Jdwp Reply Packet else packet new Jdwp Command Packet Assign generic header fields packet set Id id packet set Flags flags Read specific header fields and data packet read Specific Header Fields data In Stream if packet Length MIN PACKET LENGTH 0 packet f Data Buf new byte packet Length MIN PACKET LENGTH data In Stream read Fully packet f Data Buf return packet  JdwpPacket InputStream inStream IOException DataInputStream dataInStream DataInputStream inStream packetLength dataInStream readInt dataInStream readInt dataInStream readByte JdwpPacket FLAG_REPLY_PACKET JdwpReplyPacket JdwpCommandPacket setId setFlags readSpecificHeaderFields dataInStream packetLength MIN_PACKET_LENGTH fDataBuf packetLength MIN_PACKET_LENGTH dataInStream readFully fDataBuf
Writes complete packet public void write Output Stream out Stream throws IO Exception Data Output Stream data Out Stream new Data Output Stream out Stream write Header data Out Stream write Data data Out Stream  OutputStream outStream IOException DataOutputStream dataOutStream DataOutputStream outStream writeHeader dataOutStream writeData dataOutStream
Writes header of packet protected void write Header Data Output Stream data Out Stream throws IO Exception data Out Stream write Int get Length data Out Stream write Int get Id data Out Stream write Byte get Flags write Specific Header Fields data Out Stream  writeHeader DataOutputStream dataOutStream IOException dataOutStream writeInt getLength dataOutStream writeInt getId dataOutStream writeByte getFlags writeSpecificHeaderFields dataOutStream
Writes data of packet protected void write Data Data Output Stream data Out Stream throws IO Exception if f Data Buf null data Out Stream write f Data Buf  writeData DataOutputStream dataOutStream IOException fDataBuf dataOutStream fDataBuf
Retrieves constant mappings public static void get Constant Maps if fg Flag Strings null return Field fields Jdwp Packet class get Declared Fields fg Flag Strings new String 8 for int i 0 i fields length i Field field fields i if field get Modifiers Modifier PUBLIC 0 field get Modifiers Modifier STATIC 0 field get Modifiers Modifier FINAL 0 continue String name field get Name if name starts With FLAG  NON NLS 1 continue name name substring 5 try byte value field get Byte null for int j 0 j fg Flag Strings length j if 1 j value 0 fg Flag Strings j name break catch Illegal Access Exception e Will not occur for own class catch Illegal Argument Exception e Should not occur We should take care that all public static final constants in this class are bytes  getConstantMaps fgFlagStrings JdwpPacket getDeclaredFields fgFlagStrings getModifiers getModifiers getModifiers getName startsWith FLAG_ getByte fgFlagStrings fgFlagStrings IllegalAccessException IllegalArgumentException
return Returns a mapping with string representations of flags public static String get Flag Map get Constant Maps return fg Flag Strings  getFlagMap getConstantMaps fgFlagStrings

private short f Error Code Creates new Jdwp Reply Packet public Jdwp Reply Packet set Flags FLAG REPLY PACKET  fErrorCode JdwpReplyPacket JdwpReplyPacket setFlags FLAG_REPLY_PACKET
return Returns JDWP Error code public short error Code return f Error Code  errorCode fErrorCode
Assigns JDWP Error code public void set Error Code short new Value f Error Code new Value  setErrorCode newValue fErrorCode newValue
Reads header fields that are specific for this type of packet protected void read Specific Header Fields Data Input Stream data In Stream throws IO Exception f Error Code data In Stream read Short  readSpecificHeaderFields DataInputStream dataInStream IOException fErrorCode dataInStream readShort
Writes header fields that are specific for this type of packet protected void write Specific Header Fields Data Output Stream data Out Stream throws IO Exception data Out Stream write Short f Error Code  writeSpecificHeaderFields DataOutputStream dataOutStream IOException dataOutStream writeShort fErrorCode
Retrieves constant mappings public static void get Constant Maps if f Error Map null return Field fields Jdwp Reply Packet class get Declared Fields f Error Map new Hash Map fields length for int i 0 i fields length i Field field fields i if field get Modifiers Modifier PUBLIC 0 field get Modifiers Modifier STATIC 0 field get Modifiers Modifier FINAL 0 continue try Integer int Value new Integer field get Int null f Error Map put int Value field get Name catch Illegal Access Exception e Will not occur for own class catch Illegal Argument Exception e Should not occur We should take care that all public static final constants in this class are numbers that are convertible to int  getConstantMaps fErrorMap JdwpReplyPacket getDeclaredFields fErrorMap HashMap getModifiers getModifiers getModifiers intValue getInt fErrorMap intValue getName IllegalAccessException IllegalArgumentException
return Returns a map with string representations of error codes public static Map error Map get Constant Maps return f Error Map  errorMap getConstantMaps fErrorMap

public Tcpip Spy boolean V Mto Debugger Input Stream in Output Stream out fV Mto Debugger V Mto Debugger f Data In new Data Input Stream new Buffered Input Stream in f Data Out new Data Output Stream new Buffered Output Stream out f Has Sizes false  TcpipSpy VMtoDebugger InputStream OutputStream fVMtoDebugger VMtoDebugger fDataIn DataInputStream BufferedInputStream fDataOut DataOutputStream BufferedOutputStream fHasSizes
public static void main String args int in Port 0 String server Host null int out Port 0 String output File null try in Port Integer parse Int args 0 server Host args 1 out Port Integer parse Int args 2 if args length 3 output File args 3 catch Exception e out println Tcp Ip Spy Messages get String Tcpip Spy usage  TcpipSpy  client port   server host   server port   output file  1 NON NLS 1 System exit 1 if output File null File file new File output File out println Message Format format Tcp Ip Spy Messages get String Tcpip Spy Writing output to  0  2 new String file get Absolute Path NON NLS 1 try out new Verbose Packet Stream new Buffered Output Stream new File Output Stream file catch File Not Found Exception e out println Message Format format Tcp Ip Spy Messages get String Tcpip Spy Could not open  0   Using stdout instead 3 new String file get Absolute Path NON NLS 1 out println try Server Socket server Sock new Server Socket in Port Socket in Sock server Sock accept Socket out Sock new Socket Inet Address get By Name server Host out Port new Tcpip Spy false in Sock get Input Stream out Sock get Output Stream start NON NLS 1 new Tcpip Spy true out Sock get Input Stream in Sock get Output Stream start NON NLS 1 catch Exception e out println e  inPort serverHost outPort outputFile inPort parseInt serverHost outPort parseInt outputFile TcpIpSpyMessages getString TcpipSpy usage__TcpipSpy_ client_port _ server_host _ server_port _ output_file _1 outputFile outputFile MessageFormat TcpIpSpyMessages getString TcpipSpy Writing_output_to_ _2 getAbsolutePath VerbosePacketStream BufferedOutputStream FileOutputStream FileNotFoundException MessageFormat TcpIpSpyMessages getString TcpipSpy Could_not_open_ __Using_stdout_instead_3 getAbsolutePath ServerSocket serverSock ServerSocket inPort inSock serverSock outSock InetAddress getByName serverHost outPort TcpipSpy inSock getInputStream outSock getOutputStream TcpipSpy outSock getInputStream inSock getOutputStream
public void run try Skip handshake int handshake Length handshake Length handshake Bytes length while handshake Length 0 int b f Data In read f Data Out write b f Data Out flush Print all packages while true Jdwp Packet p Jdwp Packet read f Data In we need to store conversation only for command send by the debugger as there is no answer from the debugger to VM commands if fV Mto Debugger p get Flags Jdwp Packet FLAG REPLY PACKET 0 store p out print p fV Mto Debugger out flush p write f Data Out f Data Out flush catch EOF Exception e catch Socket Exception e catch IO Exception e out println Message Format format Tcp Ip Spy Messages get String Tcpip Spy Caught exception   0  5 new String e to String NON NLS 1 e print Stack Trace out finally try f Data In close f Data Out close catch IO Exception e out flush  handshakeLength handshakeLength handshakeBytes handshakeLength fDataIn fDataOut fDataOut JdwpPacket JdwpPacket fDataIn fVMtoDebugger getFlags JdwpPacket FLAG_REPLY_PACKET fVMtoDebugger fDataOut fDataOut EOFException SocketException IOException MessageFormat TcpIpSpyMessages getString TcpipSpy Caught_exception__ _5 toString printStackTrace fDataIn fDataOut IOException
public static Jdwp Command Packet get Command int id Jdwp Conversation conversation Jdwp Conversation f Packets get new Integer id if conversation null return conversation get Command return null  JdwpCommandPacket getCommand JdwpConversation JdwpConversation fPackets getCommand
protected static void store Jdwp Packet packet int id packet get Id Jdwp Conversation conversation Jdwp Conversation f Packets get new Integer id if conversation null conversation new Jdwp Conversation id f Packets put new Integer id conversation if packet get Flags Jdwp Packet FLAG REPLY PACKET 0 conversation set Reply Jdwp Reply Packet packet else conversation set Command Jdwp Command Packet packet  JdwpPacket getId JdwpConversation JdwpConversation fPackets JdwpConversation fPackets getFlags JdwpPacket FLAG_REPLY_PACKET setReply JdwpReplyPacket setCommand JdwpCommandPacket
public static int get Command Jdwp Packet packet throws Unable To Parse Data Exception Jdwp Command Packet command null if packet instanceof Jdwp Command Packet command Jdwp Command Packet packet else command get Command packet get Id if command null throw new Unable To Parse Data Exception Tcp Ip Spy Messages get String Tcp Ip Spy This packet is marked as reply  but there is no command with the same id  1 null NON NLS 1 return command get Command  getCommand JdwpPacket UnableToParseDataException JdwpCommandPacket JdwpCommandPacket JdwpCommandPacket getCommand getId UnableToParseDataException TcpIpSpyMessages getString TcpIpSpy This_packet_is_marked_as_reply _but_there_is_no_command_with_the_same_id _1 getCommand
public static boolean has Sizes return f Has Sizes  hasSizes fHasSizes
public static void set Has Sizes boolean value f Has Sizes value  setHasSizes fHasSizes
public static void set FieldID Size int fieldID Size f FieldID Size fieldID Size  setFieldIDSize fieldIDSize fFieldIDSize fieldIDSize
public static int get FieldID Size return f FieldID Size  getFieldIDSize fFieldIDSize
public static void set MethodID Size int methodID Size f MethodID Size methodID Size  setMethodIDSize methodIDSize fMethodIDSize methodIDSize
public static int get MethodID Size return f MethodID Size  getMethodIDSize fMethodIDSize
public static void set ObjectID Size int objectID Size f ObjectID Size objectID Size  setObjectIDSize objectIDSize fObjectIDSize objectIDSize
public static int get ObjectID Size return f ObjectID Size  getObjectIDSize fObjectIDSize
public static void set Reference TypeID Size int reference TypeID Size f Reference TypeID Size reference TypeID Size  setReferenceTypeIDSize referenceTypeIDSize fReferenceTypeIDSize referenceTypeIDSize
public static int get Reference TypeID Size return f Reference TypeID Size  getReferenceTypeIDSize fReferenceTypeIDSize
public static void set FrameID Size int frameID Size f FrameID Size frameID Size  setFrameIDSize frameIDSize fFrameIDSize frameIDSize
public static int get FrameID Size return f FrameID Size  getFrameIDSize fFrameIDSize

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Tcp Ip Spy Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME TcpIpSpyMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

private byte f Remaining Data public Unable To Parse Data Exception String message byte remaining Data super message f Remaining Data remaining Data  fRemainingData UnableToParseDataException remainingData fRemainingData remainingData
public byte get Remaining Data return f Remaining Data  getRemainingData fRemainingData

private static final String shift new String padding 0 32 public Verbose Packet Stream Output Stream out super out  VerbosePacketStream OutputStream
public synchronized void print Jdwp Packet packet boolean fromVM throws IO Exception try print Header packet fromVM print Data packet println catch Unable To Parse Data Exception e println n e get Message NON NLS 1 print Description Tcp Ip Spy Messages get String Verbose Packet Stream Remaining data  1 NON NLS 1 byte data e get Remaining Data if data null print Hex packet data else print Hex e get Remaining Data println  JdwpPacket IOException printHeader printData UnableToParseDataException getMessage printDescription TcpIpSpyMessages getString VerbosePacketStream Remaining_data__1 getRemainingData printHex printHex getRemainingData
protected void print Header Jdwp Packet packet boolean fromVM throws Unable To Parse Data Exception if fromVM println Tcp Ip Spy Messages get String Verbose Packet Stream From VM 1 NON NLS 1 else println Tcp Ip Spy Messages get String Verbose Packet Stream From Debugger 2 NON NLS 1 print Description Tcp Ip Spy Messages get String Verbose Packet Stream Packet ID  3 NON NLS 1 print Hex packet get Id println print Description Tcp Ip Spy Messages get String Verbose Packet Stream Length  4 NON NLS 1 print packet get Length println print Description Tcp Ip Spy Messages get String Verbose Packet Stream Flags  5 NON NLS 1 byte flags packet get Flags print Hex flags if flags Jdwp Packet FLAG REPLY PACKET 0 print Message Format format Tcp Ip Spy Messages get String Verbose Packet Stream   REPLY to  0  6 new String String Jdwp Command Packet command Map get new Integer Tcpip Spy get Command packet NON NLS 1 else print Tcp Ip Spy Messages get String Verbose Packet Stream   COMMAND  7 NON NLS 1 println print Specific Header Fields packet  printHeader JdwpPacket UnableToParseDataException TcpIpSpyMessages getString VerbosePacketStream From_VM_1 TcpIpSpyMessages getString VerbosePacketStream From_Debugger_2 printDescription TcpIpSpyMessages getString VerbosePacketStream Packet_ID__3 printHex getId printDescription TcpIpSpyMessages getString VerbosePacketStream Length__4 getLength printDescription TcpIpSpyMessages getString VerbosePacketStream Flags__5 getFlags printHex JdwpPacket FLAG_REPLY_PACKET MessageFormat TcpIpSpyMessages getString VerbosePacketStream _ REPLY_to_ _6 JdwpCommandPacket commandMap TcpipSpy getCommand TcpIpSpyMessages getString VerbosePacketStream _ _7 printSpecificHeaderFields
protected void print Specific Header Fields Jdwp Packet packet if packet instanceof Jdwp Reply Packet print Error Jdwp Reply Packet packet else if packet instanceof Jdwp Command Packet print Command Jdwp Command Packet packet  printSpecificHeaderFields JdwpPacket JdwpReplyPacket printError JdwpReplyPacket JdwpCommandPacket printCommand JdwpCommandPacket
protected void print Command Jdwp Command Packet command Packet print Description Tcp Ip Spy Messages get String Verbose Packet Stream Command set  8 NON NLS 1 int command And Set command Packet get Command byte set byte command And Set 8 byte command byte command And Set print Hex set print Paranthetical set println print Description Tcp Ip Spy Messages get String Verbose Packet Stream Command  9 NON NLS 1 print Hex command print Paranthetical command print NON NLS 1 print Jdwp Command Packet command Map get new Integer command And Set println  printCommand JdwpCommandPacket commandPacket printDescription TcpIpSpyMessages getString VerbosePacketStream Command_set__8 commandAndSet commandPacket getCommand commandAndSet commandAndSet printHex printParanthetical printDescription TcpIpSpyMessages getString VerbosePacketStream Command__9 printHex printParanthetical JdwpCommandPacket commandMap commandAndSet
protected void print Error Jdwp Reply Packet reply int error reply error Code print Description Tcp Ip Spy Messages get String Verbose Packet Stream Error  10 NON NLS 1 print Hex error if error 0 print NON NLS 1 print Jdwp Reply Packet error Map get new Integer error print println  printError JdwpReplyPacket errorCode printDescription TcpIpSpyMessages getString VerbosePacketStream Error__10 printHex JdwpReplyPacket errorMap
protected void print Data Jdwp Packet packet throws IO Exception Unable To Parse Data Exception if packet get Flags Jdwp Packet FLAG REPLY PACKET 0 print Reply Data Jdwp Reply Packet packet else print Command Data Jdwp Command Packet packet  printData JdwpPacket IOException UnableToParseDataException getFlags JdwpPacket FLAG_REPLY_PACKET printReplyData JdwpReplyPacket printCommandData JdwpCommandPacket
private void print Command Data Jdwp Command Packet command throws IO Exception Unable To Parse Data Exception byte data command data if data null return Data Input Stream in new Data Input Stream new Byte Array Input Stream data int command Id command get Command switch command Id Commands Virtual Machine case Jdwp Command Packet VM VERSION no data break case Jdwp Command Packet VM CLASSES BY SIGNATURE print Vm Classes By Signature Command in break case Jdwp Command Packet VM ALL CLASSES no data break case Jdwp Command Packet VM ALL THREADS no data break case Jdwp Command Packet VM TOP LEVEL THREAD GROUPS no data break case Jdwp Command Packet VM DISPOSE no data break case Jdwp Command Packet VM ID SIZES no data break case Jdwp Command Packet VM SUSPEND no data break case Jdwp Command Packet VM RESUME no data break case Jdwp Command Packet VM EXIT print Vm Exit Command in break case Jdwp Command Packet VM CREATE STRING print Vm Create String Command in break case Jdwp Command Packet VM CAPABILITIES no data break case Jdwp Command Packet VM CLASS PATHS no data break case Jdwp Command Packet VM DISPOSE OBJECTS print Vm Dispose Objects Command in break case Jdwp Command Packet VM HOLD EVENTS no data break case Jdwp Command Packet VM RELEASE EVENTS no data break case Jdwp Command Packet VM CAPABILITIES NEW no data break case Jdwp Command Packet VM REDEFINE CLASSES print Vm Redefine Class Command in break case Jdwp Command Packet VM SET DEFAULT STRATUM print Vm Set Default Stratum Command in break case Jdwp Command Packet VM ALL CLASSES WITH GENERIC no data break Commands Reference Type case Jdwp Command Packet RT SIGNATURE print Rt Default Command in break case Jdwp Command Packet RT CLASS LOADER print Rt Default Command in break case Jdwp Command Packet RT MODIFIERS print Rt Default Command in break case Jdwp Command Packet RT FIELDS print Rt Default Command in break case Jdwp Command Packet RT METHODS print Rt Default Command in break case Jdwp Command Packet RT GET VALUES print Rt Get Values Command in break case Jdwp Command Packet RT SOURCE FILE print Rt Default Command in break case Jdwp Command Packet RT NESTED TYPES print Rt Default Command in break case Jdwp Command Packet RT STATUS print Rt Default Command in break case Jdwp Command Packet RT INTERFACES print Rt Default Command in break case Jdwp Command Packet RT CLASS OBJECT print Rt Default Command in break case Jdwp Command Packet RT SOURCE DEBUG EXTENSION print Rt Default Command in break case Jdwp Command Packet RT SIGNATURE WITH GENERIC print Rt Default Command in break case Jdwp Command Packet RT FIELDS WITH GENERIC print Rt Default Command in break case Jdwp Command Packet RT METHODS WITH GENERIC print Rt Default Command in break Commands Class Type case Jdwp Command Packet CT SUPERCLASS print Ct Superclass Command in break case Jdwp Command Packet CT SET VALUES print Ct Set Values Command in break case Jdwp Command Packet CT INVOKE METHOD print Ct Invoke Method Command in break case Jdwp Command Packet CT NEW INSTANCE print Ct New Instance Command in break Commands Array Type case Jdwp Command Packet AT NEW INSTANCE print At New Instance Command in break Commands Method case Jdwp Command Packet M LINE TABLE printM Default Command in break case Jdwp Command Packet M VARIABLE TABLE printM Default Command in break case Jdwp Command Packet M BYTECODES printM Default Command in break case Jdwp Command Packet M IS OBSOLETE printM Default Command in break case Jdwp Command Packet M VARIABLE TABLE WITH GENERIC printM Default Command in break Commands Object Reference case Jdwp Command Packet OR REFERENCE TYPE print Or Default Command in break case Jdwp Command Packet OR GET VALUES print Or Get Values Command in break case Jdwp Command Packet OR SET VALUES print Or Set Values Command in break case Jdwp Command Packet OR MONITOR INFO print Or Default Command in break case Jdwp Command Packet OR INVOKE METHOD print Or Invoke Method Command in break case Jdwp Command Packet OR DISABLE COLLECTION print Or Default Command in break case Jdwp Command Packet OR ENABLE COLLECTION print Or Default Command in break case Jdwp Command Packet OR IS COLLECTED print Or Default Command in break Commands String Reference case Jdwp Command Packet SR VALUE print Sr Value Command in break Commands Thread Reference case Jdwp Command Packet TR NAME print Tr Default Command in break case Jdwp Command Packet TR SUSPEND print Tr Default Command in break case Jdwp Command Packet TR RESUME print Tr Default Command in break case Jdwp Command Packet TR STATUS print Tr Default Command in break case Jdwp Command Packet TR THREAD GROUP print Tr Default Command in break case Jdwp Command Packet TR FRAMES print Tr Frames Command in break case Jdwp Command Packet TR FRAME COUNT print Tr Default Command in break case Jdwp Command Packet TR OWNED MONITORS print Tr Default Command in break case Jdwp Command Packet TR CURRENT CONTENDED MONITOR print Tr Default Command in break case Jdwp Command Packet TR STOP print Tr Stop Command in break case Jdwp Command Packet TR INTERRUPT print Tr Default Command in break case Jdwp Command Packet TR SUSPEND COUNT print Tr Default Command in break no more in the jdwp spec case Jdwp Command Packet TR POP TOP FRAME break Commands Thread Group Reference case Jdwp Command Packet TGR NAME print Tgr Default Command in break case Jdwp Command Packet TGR PARENT print Tgr Default Command in break case Jdwp Command Packet TGR CHILDREN print Tgr Default Command in break Commands Array Reference case Jdwp Command Packet AR LENGTH print Ar Length Command in break case Jdwp Command Packet AR GET VALUES print Ar Get Values Command in break case Jdwp Command Packet AR SET VALUES print Ar Set Values Command in break Commands Class Loader Reference case Jdwp Command Packet CLR VISIBLE CLASSES print Clr Visible Classes Command in break Commands Event Request case Jdwp Command Packet ER SET print Er Set Command in break case Jdwp Command Packet ER CLEAR print Er Clear Command in break case Jdwp Command Packet ER CLEAR ALL BREAKPOINTS no data break Commands Stack Frame case Jdwp Command Packet SF GET VALUES print Sf Get Values Command in break case Jdwp Command Packet SF SET VALUES print Sf Set Values Command in break case Jdwp Command Packet SF THIS OBJECT print Sf Default Command in break case Jdwp Command Packet SF POP FRAME print Sf Default Command in break Commands Class Object Reference case Jdwp Command Packet COR REFLECTED TYPE print Cor Reflected Type Command in break Commands Event case Jdwp Command Packet E COMPOSITE printE Composite Command in break Commands Hot Code Replacement OTI specific case Jdwp Command Packet HCR CLASSES HAVE CHANGED case Jdwp Command Packet HCR GET CLASS VERSION case Jdwp Command Packet HCR DO RETURN case Jdwp Command Packet HCR REENTER ON EXIT case Jdwp Command Packet HCR CAPABILITIES throw new Unable To Parse Data Exception Tcp Ip Spy Messages get String Verbose Packet Stream NOT MANAGED COMMAND 11 remainder Data in NON NLS 1 default int cset command Id 8 int cmd command Id 0xFF println Message Format format Tcp Ip Spy Messages get String Verbose Packet Stream Unknown command    0   1  12 new String cset cmd NON NLS 1 NON NLS 2 NON NLS 3 break  printCommandData JdwpCommandPacket IOException UnableToParseDataException DataInputStream DataInputStream ByteArrayInputStream commandId getCommand commandId VirtualMachine JdwpCommandPacket VM_VERSION JdwpCommandPacket VM_CLASSES_BY_SIGNATURE printVmClassesBySignatureCommand JdwpCommandPacket VM_ALL_CLASSES JdwpCommandPacket VM_ALL_THREADS JdwpCommandPacket VM_TOP_LEVEL_THREAD_GROUPS JdwpCommandPacket VM_DISPOSE JdwpCommandPacket VM_ID_SIZES JdwpCommandPacket VM_SUSPEND JdwpCommandPacket VM_RESUME JdwpCommandPacket VM_EXIT printVmExitCommand JdwpCommandPacket VM_CREATE_STRING printVmCreateStringCommand JdwpCommandPacket VM_CAPABILITIES JdwpCommandPacket VM_CLASS_PATHS JdwpCommandPacket VM_DISPOSE_OBJECTS printVmDisposeObjectsCommand JdwpCommandPacket VM_HOLD_EVENTS JdwpCommandPacket VM_RELEASE_EVENTS JdwpCommandPacket VM_CAPABILITIES_NEW JdwpCommandPacket VM_REDEFINE_CLASSES printVmRedefineClassCommand JdwpCommandPacket VM_SET_DEFAULT_STRATUM printVmSetDefaultStratumCommand JdwpCommandPacket VM_ALL_CLASSES_WITH_GENERIC ReferenceType JdwpCommandPacket RT_SIGNATURE printRtDefaultCommand JdwpCommandPacket RT_CLASS_LOADER printRtDefaultCommand JdwpCommandPacket RT_MODIFIERS printRtDefaultCommand JdwpCommandPacket RT_FIELDS printRtDefaultCommand JdwpCommandPacket RT_METHODS printRtDefaultCommand JdwpCommandPacket RT_GET_VALUES printRtGetValuesCommand JdwpCommandPacket RT_SOURCE_FILE printRtDefaultCommand JdwpCommandPacket RT_NESTED_TYPES printRtDefaultCommand JdwpCommandPacket RT_STATUS printRtDefaultCommand JdwpCommandPacket RT_INTERFACES printRtDefaultCommand JdwpCommandPacket RT_CLASS_OBJECT printRtDefaultCommand JdwpCommandPacket RT_SOURCE_DEBUG_EXTENSION printRtDefaultCommand JdwpCommandPacket RT_SIGNATURE_WITH_GENERIC printRtDefaultCommand JdwpCommandPacket RT_FIELDS_WITH_GENERIC printRtDefaultCommand JdwpCommandPacket RT_METHODS_WITH_GENERIC printRtDefaultCommand ClassType JdwpCommandPacket CT_SUPERCLASS printCtSuperclassCommand JdwpCommandPacket CT_SET_VALUES printCtSetValuesCommand JdwpCommandPacket CT_INVOKE_METHOD printCtInvokeMethodCommand JdwpCommandPacket CT_NEW_INSTANCE printCtNewInstanceCommand ArrayType JdwpCommandPacket AT_NEW_INSTANCE printAtNewInstanceCommand JdwpCommandPacket M_LINE_TABLE printMDefaultCommand JdwpCommandPacket M_VARIABLE_TABLE printMDefaultCommand JdwpCommandPacket M_BYTECODES printMDefaultCommand JdwpCommandPacket M_IS_OBSOLETE printMDefaultCommand JdwpCommandPacket M_VARIABLE_TABLE_WITH_GENERIC printMDefaultCommand ObjectReference JdwpCommandPacket OR_REFERENCE_TYPE printOrDefaultCommand JdwpCommandPacket OR_GET_VALUES printOrGetValuesCommand JdwpCommandPacket OR_SET_VALUES printOrSetValuesCommand JdwpCommandPacket OR_MONITOR_INFO printOrDefaultCommand JdwpCommandPacket OR_INVOKE_METHOD printOrInvokeMethodCommand JdwpCommandPacket OR_DISABLE_COLLECTION printOrDefaultCommand JdwpCommandPacket OR_ENABLE_COLLECTION printOrDefaultCommand JdwpCommandPacket OR_IS_COLLECTED printOrDefaultCommand StringReference JdwpCommandPacket SR_VALUE printSrValueCommand ThreadReference JdwpCommandPacket TR_NAME printTrDefaultCommand JdwpCommandPacket TR_SUSPEND printTrDefaultCommand JdwpCommandPacket TR_RESUME printTrDefaultCommand JdwpCommandPacket TR_STATUS printTrDefaultCommand JdwpCommandPacket TR_THREAD_GROUP printTrDefaultCommand JdwpCommandPacket TR_FRAMES printTrFramesCommand JdwpCommandPacket TR_FRAME_COUNT printTrDefaultCommand JdwpCommandPacket TR_OWNED_MONITORS printTrDefaultCommand JdwpCommandPacket TR_CURRENT_CONTENDED_MONITOR printTrDefaultCommand JdwpCommandPacket TR_STOP printTrStopCommand JdwpCommandPacket TR_INTERRUPT printTrDefaultCommand JdwpCommandPacket TR_SUSPEND_COUNT printTrDefaultCommand JdwpCommandPacket TR_POP_TOP_FRAME ThreadGroupReference JdwpCommandPacket TGR_NAME printTgrDefaultCommand JdwpCommandPacket TGR_PARENT printTgrDefaultCommand JdwpCommandPacket TGR_CHILDREN printTgrDefaultCommand ArrayReference JdwpCommandPacket AR_LENGTH printArLengthCommand JdwpCommandPacket AR_GET_VALUES printArGetValuesCommand JdwpCommandPacket AR_SET_VALUES printArSetValuesCommand ClassLoaderReference JdwpCommandPacket CLR_VISIBLE_CLASSES printClrVisibleClassesCommand EventRequest JdwpCommandPacket ER_SET printErSetCommand JdwpCommandPacket ER_CLEAR printErClearCommand JdwpCommandPacket ER_CLEAR_ALL_BREAKPOINTS StackFrame JdwpCommandPacket SF_GET_VALUES printSfGetValuesCommand JdwpCommandPacket SF_SET_VALUES printSfSetValuesCommand JdwpCommandPacket SF_THIS_OBJECT printSfDefaultCommand JdwpCommandPacket SF_POP_FRAME printSfDefaultCommand ClassObjectReference JdwpCommandPacket COR_REFLECTED_TYPE printCorReflectedTypeCommand JdwpCommandPacket E_COMPOSITE printECompositeCommand JdwpCommandPacket HCR_CLASSES_HAVE_CHANGED JdwpCommandPacket HCR_GET_CLASS_VERSION JdwpCommandPacket HCR_DO_RETURN JdwpCommandPacket HCR_REENTER_ON_EXIT JdwpCommandPacket HCR_CAPABILITIES UnableToParseDataException TcpIpSpyMessages getString VerbosePacketStream NOT_MANAGED_COMMAND_11 remainderData commandId commandId MessageFormat TcpIpSpyMessages getString VerbosePacketStream Unknown_command___ _ _12
private void print Reply Data Jdwp Reply Packet reply throws IO Exception Unable To Parse Data Exception byte data reply data if data null return Data Input Stream in new Data Input Stream new Byte Array Input Stream data Jdwp Command Packet command Tcpip Spy get Command reply get Id int command Id command get Command switch command Id Commands Virtual Machine case Jdwp Command Packet VM VERSION print Vm Version Reply in break case Jdwp Command Packet VM CLASSES BY SIGNATURE print Vm Classes By Signature Reply in break case Jdwp Command Packet VM ALL CLASSES print Vm All Classes Reply in break case Jdwp Command Packet VM ALL THREADS print Vm All Threads Reply in break case Jdwp Command Packet VM TOP LEVEL THREAD GROUPS print Vm Top Level Thread Group Reply in break case Jdwp Command Packet VM DISPOSE no data break case Jdwp Command Packet VM ID SIZES print Vm Id Sizes Reply in break case Jdwp Command Packet VM SUSPEND no data break case Jdwp Command Packet VM RESUME no data break case Jdwp Command Packet VM EXIT no data break case Jdwp Command Packet VM CREATE STRING print Vm Create String Reply in break case Jdwp Command Packet VM CAPABILITIES print Vm Capabilities Reply in break case Jdwp Command Packet VM CLASS PATHS print Vm Class Paths Reply in break case Jdwp Command Packet VM DISPOSE OBJECTS no data break case Jdwp Command Packet VM HOLD EVENTS no data break case Jdwp Command Packet VM RELEASE EVENTS no data break case Jdwp Command Packet VM CAPABILITIES NEW print Vm Capabilities New Reply in break case Jdwp Command Packet VM REDEFINE CLASSES no data break case Jdwp Command Packet VM SET DEFAULT STRATUM no data break case Jdwp Command Packet VM ALL CLASSES WITH GENERIC print Vm All Classes With Generic Reply in break Commands Reference Type case Jdwp Command Packet RT SIGNATURE print Rt Signature Reply in break case Jdwp Command Packet RT CLASS LOADER print Rt Class Loader Reply in break case Jdwp Command Packet RT MODIFIERS print Rt Modifiers Reply in break case Jdwp Command Packet RT FIELDS print Rt Fields Reply in break case Jdwp Command Packet RT METHODS print Rt Methods Reply in break case Jdwp Command Packet RT GET VALUES print Rt Get Values Reply in break case Jdwp Command Packet RT SOURCE FILE print Rt Source File Reply in break case Jdwp Command Packet RT NESTED TYPES print Rt Nested Types Reply in break case Jdwp Command Packet RT STATUS print Rt Status Reply in break case Jdwp Command Packet RT INTERFACES print Rt Interfaces Reply in break case Jdwp Command Packet RT CLASS OBJECT print Rt Class Object Reply in break case Jdwp Command Packet RT SOURCE DEBUG EXTENSION print Rt Source Debug Extension Reply in break case Jdwp Command Packet RT SIGNATURE WITH GENERIC print Rt Signature With Generic Reply in break case Jdwp Command Packet RT FIELDS WITH GENERIC print Rt Fields With Generic Reply in break case Jdwp Command Packet RT METHODS WITH GENERIC print Rt Methods With Generic Reply in break Commands Class Type case Jdwp Command Packet CT SUPERCLASS print Ct Superclass Reply in break case Jdwp Command Packet CT SET VALUES no data break case Jdwp Command Packet CT INVOKE METHOD print Ct Invoke Method Reply in break case Jdwp Command Packet CT NEW INSTANCE print Ct New Instance Reply in break Commands Array Type case Jdwp Command Packet AT NEW INSTANCE print At New Instance Reply in break Commands Method case Jdwp Command Packet M LINE TABLE printM Line Table Reply in break case Jdwp Command Packet M VARIABLE TABLE printM Variable Table Reply in break case Jdwp Command Packet M BYTECODES printM Bytecodes Reply in break case Jdwp Command Packet M IS OBSOLETE printM Is Obsolete Reply in break case Jdwp Command Packet M VARIABLE TABLE WITH GENERIC printM Variable Table With Generic Reply in break Commands Object Reference case Jdwp Command Packet OR REFERENCE TYPE print Or Reference Type Reply in break case Jdwp Command Packet OR GET VALUES print Or Get Values Reply in break case Jdwp Command Packet OR SET VALUES no data break case Jdwp Command Packet OR MONITOR INFO print Or Monitor Info Reply in break case Jdwp Command Packet OR INVOKE METHOD print Or Invoke Method Reply in break case Jdwp Command Packet OR DISABLE COLLECTION no data break case Jdwp Command Packet OR ENABLE COLLECTION no data break case Jdwp Command Packet OR IS COLLECTED print Or Is Collected Reply in break Commands String Reference case Jdwp Command Packet SR VALUE print Sr Value Reply in break Commands Thread Reference case Jdwp Command Packet TR NAME print Tr Name Reply in break case Jdwp Command Packet TR SUSPEND no data break case Jdwp Command Packet TR RESUME no data break case Jdwp Command Packet TR STATUS print Tr Status Reply in break case Jdwp Command Packet TR THREAD GROUP print Tr Thread Group Reply in break case Jdwp Command Packet TR FRAMES print Tr Frames Reply in break case Jdwp Command Packet TR FRAME COUNT print Tr Frame Count Reply in break case Jdwp Command Packet TR OWNED MONITORS print Tr Owned Monitors Reply in break case Jdwp Command Packet TR CURRENT CONTENDED MONITOR print Tr Current Contended Monitor Reply in break case Jdwp Command Packet TR STOP no data break case Jdwp Command Packet TR INTERRUPT no data break case Jdwp Command Packet TR SUSPEND COUNT print Tr Suspend Count Reply in break no more in the jdwp spec case Jdwp Command Packet TR POP TOP FRAME break Commands Thread Group Reference case Jdwp Command Packet TGR NAME print Tgr Name Reply in break case Jdwp Command Packet TGR PARENT print Tgr Parent Reply in break case Jdwp Command Packet TGR CHILDREN print Tgr Children Reply in break Commands Array Reference case Jdwp Command Packet AR LENGTH print Ar Length Reply in break case Jdwp Command Packet AR GET VALUES print Ar Get Values Reply in break case Jdwp Command Packet AR SET VALUES no data break Commands Class Loader Reference case Jdwp Command Packet CLR VISIBLE CLASSES print Clr Visible Classes Reply in break Commands Event Request case Jdwp Command Packet ER SET print Er Set Reply in break case Jdwp Command Packet ER CLEAR no data break case Jdwp Command Packet ER CLEAR ALL BREAKPOINTS no data break Commands Stack Frame case Jdwp Command Packet SF GET VALUES print Sf Get Values Reply in break case Jdwp Command Packet SF SET VALUES no data break case Jdwp Command Packet SF THIS OBJECT print Sf This Object Reply in break case Jdwp Command Packet SF POP FRAME no data break Commands Class Object Reference case Jdwp Command Packet COR REFLECTED TYPE print Cor Reflected Type Reply in break Commands Event no reply case Jdwp Command Packet E COMPOSITE break Commands Hot Code Replacement OTI specific case Jdwp Command Packet HCR CLASSES HAVE CHANGED case Jdwp Command Packet HCR GET CLASS VERSION case Jdwp Command Packet HCR DO RETURN case Jdwp Command Packet HCR REENTER ON EXIT case Jdwp Command Packet HCR CAPABILITIES throw new Unable To Parse Data Exception Tcp Ip Spy Messages get String Verbose Packet Stream NOT MANAGED COMMAND 11 remainder Data in NON NLS 1 default int cset command Id 8 int cmd command Id 0xFF println Message Format format Tcp Ip Spy Messages get String Verbose Packet Stream Unknown command    0   1  12 new String cset cmd NON NLS 1 NON NLS 2 NON NLS 3 break  printReplyData JdwpReplyPacket IOException UnableToParseDataException DataInputStream DataInputStream ByteArrayInputStream JdwpCommandPacket TcpipSpy getCommand getId commandId getCommand commandId VirtualMachine JdwpCommandPacket VM_VERSION printVmVersionReply JdwpCommandPacket VM_CLASSES_BY_SIGNATURE printVmClassesBySignatureReply JdwpCommandPacket VM_ALL_CLASSES printVmAllClassesReply JdwpCommandPacket VM_ALL_THREADS printVmAllThreadsReply JdwpCommandPacket VM_TOP_LEVEL_THREAD_GROUPS printVmTopLevelThreadGroupReply JdwpCommandPacket VM_DISPOSE JdwpCommandPacket VM_ID_SIZES printVmIdSizesReply JdwpCommandPacket VM_SUSPEND JdwpCommandPacket VM_RESUME JdwpCommandPacket VM_EXIT JdwpCommandPacket VM_CREATE_STRING printVmCreateStringReply JdwpCommandPacket VM_CAPABILITIES printVmCapabilitiesReply JdwpCommandPacket VM_CLASS_PATHS printVmClassPathsReply JdwpCommandPacket VM_DISPOSE_OBJECTS JdwpCommandPacket VM_HOLD_EVENTS JdwpCommandPacket VM_RELEASE_EVENTS JdwpCommandPacket VM_CAPABILITIES_NEW printVmCapabilitiesNewReply JdwpCommandPacket VM_REDEFINE_CLASSES JdwpCommandPacket VM_SET_DEFAULT_STRATUM JdwpCommandPacket VM_ALL_CLASSES_WITH_GENERIC printVmAllClassesWithGenericReply ReferenceType JdwpCommandPacket RT_SIGNATURE printRtSignatureReply JdwpCommandPacket RT_CLASS_LOADER printRtClassLoaderReply JdwpCommandPacket RT_MODIFIERS printRtModifiersReply JdwpCommandPacket RT_FIELDS printRtFieldsReply JdwpCommandPacket RT_METHODS printRtMethodsReply JdwpCommandPacket RT_GET_VALUES printRtGetValuesReply JdwpCommandPacket RT_SOURCE_FILE printRtSourceFileReply JdwpCommandPacket RT_NESTED_TYPES printRtNestedTypesReply JdwpCommandPacket RT_STATUS printRtStatusReply JdwpCommandPacket RT_INTERFACES printRtInterfacesReply JdwpCommandPacket RT_CLASS_OBJECT printRtClassObjectReply JdwpCommandPacket RT_SOURCE_DEBUG_EXTENSION printRtSourceDebugExtensionReply JdwpCommandPacket RT_SIGNATURE_WITH_GENERIC printRtSignatureWithGenericReply JdwpCommandPacket RT_FIELDS_WITH_GENERIC printRtFieldsWithGenericReply JdwpCommandPacket RT_METHODS_WITH_GENERIC printRtMethodsWithGenericReply ClassType JdwpCommandPacket CT_SUPERCLASS printCtSuperclassReply JdwpCommandPacket CT_SET_VALUES JdwpCommandPacket CT_INVOKE_METHOD printCtInvokeMethodReply JdwpCommandPacket CT_NEW_INSTANCE printCtNewInstanceReply ArrayType JdwpCommandPacket AT_NEW_INSTANCE printAtNewInstanceReply JdwpCommandPacket M_LINE_TABLE printMLineTableReply JdwpCommandPacket M_VARIABLE_TABLE printMVariableTableReply JdwpCommandPacket M_BYTECODES printMBytecodesReply JdwpCommandPacket M_IS_OBSOLETE printMIsObsoleteReply JdwpCommandPacket M_VARIABLE_TABLE_WITH_GENERIC printMVariableTableWithGenericReply ObjectReference JdwpCommandPacket OR_REFERENCE_TYPE printOrReferenceTypeReply JdwpCommandPacket OR_GET_VALUES printOrGetValuesReply JdwpCommandPacket OR_SET_VALUES JdwpCommandPacket OR_MONITOR_INFO printOrMonitorInfoReply JdwpCommandPacket OR_INVOKE_METHOD printOrInvokeMethodReply JdwpCommandPacket OR_DISABLE_COLLECTION JdwpCommandPacket OR_ENABLE_COLLECTION JdwpCommandPacket OR_IS_COLLECTED printOrIsCollectedReply StringReference JdwpCommandPacket SR_VALUE printSrValueReply ThreadReference JdwpCommandPacket TR_NAME printTrNameReply JdwpCommandPacket TR_SUSPEND JdwpCommandPacket TR_RESUME JdwpCommandPacket TR_STATUS printTrStatusReply JdwpCommandPacket TR_THREAD_GROUP printTrThreadGroupReply JdwpCommandPacket TR_FRAMES printTrFramesReply JdwpCommandPacket TR_FRAME_COUNT printTrFrameCountReply JdwpCommandPacket TR_OWNED_MONITORS printTrOwnedMonitorsReply JdwpCommandPacket TR_CURRENT_CONTENDED_MONITOR printTrCurrentContendedMonitorReply JdwpCommandPacket TR_STOP JdwpCommandPacket TR_INTERRUPT JdwpCommandPacket TR_SUSPEND_COUNT printTrSuspendCountReply JdwpCommandPacket TR_POP_TOP_FRAME ThreadGroupReference JdwpCommandPacket TGR_NAME printTgrNameReply JdwpCommandPacket TGR_PARENT printTgrParentReply JdwpCommandPacket TGR_CHILDREN printTgrChildrenReply ArrayReference JdwpCommandPacket AR_LENGTH printArLengthReply JdwpCommandPacket AR_GET_VALUES printArGetValuesReply JdwpCommandPacket AR_SET_VALUES ClassLoaderReference JdwpCommandPacket CLR_VISIBLE_CLASSES printClrVisibleClassesReply EventRequest JdwpCommandPacket ER_SET printErSetReply JdwpCommandPacket ER_CLEAR JdwpCommandPacket ER_CLEAR_ALL_BREAKPOINTS StackFrame JdwpCommandPacket SF_GET_VALUES printSfGetValuesReply JdwpCommandPacket SF_SET_VALUES JdwpCommandPacket SF_THIS_OBJECT printSfThisObjectReply JdwpCommandPacket SF_POP_FRAME ClassObjectReference JdwpCommandPacket COR_REFLECTED_TYPE printCorReflectedTypeReply JdwpCommandPacket E_COMPOSITE JdwpCommandPacket HCR_CLASSES_HAVE_CHANGED JdwpCommandPacket HCR_GET_CLASS_VERSION JdwpCommandPacket HCR_DO_RETURN JdwpCommandPacket HCR_REENTER_ON_EXIT JdwpCommandPacket HCR_CAPABILITIES UnableToParseDataException TcpIpSpyMessages getString VerbosePacketStream NOT_MANAGED_COMMAND_11 remainderData commandId commandId MessageFormat TcpIpSpyMessages getString VerbosePacketStream Unknown_command___ _ _12
private void print Ref Type Tag byte ref Type Tag print Description Tcp Ip Spy Messages get String Verbose Packet Stream Type tag  19 NON NLS 1 print Ref Type Tag Value ref Type Tag println  printRefTypeTag refTypeTag printDescription TcpIpSpyMessages getString VerbosePacketStream Type_tag__19 printRefTypeTagValue refTypeTag
private void print Ref Type Tag Value byte ref Type Tag print Hex ref Type Tag print NON NLS 1 switch ref Type Tag case TYPE TAG CLASS print CLASS NON NLS 1 break case TYPE TAG INTERFACE print INTERFACE NON NLS 1 break case TYPE TAG ARRAY print ARRAY NON NLS 1 break default print Tcp Ip Spy Messages get String Verbose Packet Stream unknow 20 NON NLS 1 print  printRefTypeTagValue refTypeTag printHex refTypeTag refTypeTag TYPE_TAG_CLASS TYPE_TAG_INTERFACE TYPE_TAG_ARRAY TcpIpSpyMessages getString VerbosePacketStream unknow_20
private void print Class Status int status print Description Tcp Ip Spy Messages get String Verbose Packet Stream Status  21 NON NLS 1 print Hex status print NON NLS 1 boolean space Needed false if status JDWP CLASS STATUS VERIFIED 0 print VERIFIED NON NLS 1 space Needed true if status JDWP CLASS STATUS PREPARED 0 if space Needed print else space Needed true print PREPARED NON NLS 1 if status JDWP CLASS STATUS INITIALIZED 0 if space Needed print else space Needed true print INITIALIZED NON NLS 1 if status JDWP CLASS STATUS ERROR 0 if space Needed print print Tcp Ip Spy Messages get String Verbose Packet Stream unknow 20 NON NLS 1 println  printClassStatus printDescription TcpIpSpyMessages getString VerbosePacketStream Status__21 printHex spaceNeeded JDWP_CLASS_STATUS_VERIFIED spaceNeeded JDWP_CLASS_STATUS_PREPARED spaceNeeded spaceNeeded JDWP_CLASS_STATUS_INITIALIZED spaceNeeded spaceNeeded JDWP_CLASS_STATUS_ERROR spaceNeeded TcpIpSpyMessages getString VerbosePacketStream unknow_20
private void print Class Modifiers int modifiers print Description Tcp Ip Spy Messages get String Verbose Packet Stream Modifiers  23 NON NLS 1 print Hex modifiers print NON NLS 1 boolean space Needed false if modifiers ACC PUBLIC 0 print PUBLIC NON NLS 1 space Needed true if modifiers ACC PRIVATE 0 if space Needed print else space Needed true print PRIVATE NON NLS 1 if modifiers ACC PROTECTED 0 if space Needed print else space Needed true print PROTECTED NON NLS 1 if modifiers ACC STATIC 0 if space Needed print else space Needed true print STATIC NON NLS 1 if modifiers ACC FINAL 0 if space Needed print else space Needed true print FINAL NON NLS 1 if modifiers ACC SUPER 0 if space Needed print else space Needed true print SUPER NON NLS 1 if modifiers ACC INTERFACE 0 if space Needed print else space Needed true print INTERFACE NON NLS 1 if modifiers ACC ABSTRACT 0 if space Needed print else space Needed true print ABSTRACT NON NLS 1 if modifiers ACC EXT SYNTHETIC ACC SYNTHETIC 0 if space Needed print else space Needed true print SYNTHETIC NON NLS 1 println  printClassModifiers printDescription TcpIpSpyMessages getString VerbosePacketStream Modifiers__23 printHex spaceNeeded ACC_PUBLIC spaceNeeded ACC_PRIVATE spaceNeeded spaceNeeded ACC_PROTECTED spaceNeeded spaceNeeded ACC_STATIC spaceNeeded spaceNeeded ACC_FINAL spaceNeeded spaceNeeded ACC_SUPER spaceNeeded spaceNeeded ACC_INTERFACE spaceNeeded spaceNeeded ACC_ABSTRACT spaceNeeded spaceNeeded ACC_EXT_SYNTHETIC ACC_SYNTHETIC spaceNeeded spaceNeeded
private void print Method Modifiers int modifiers print Description Tcp Ip Spy Messages get String Verbose Packet Stream Modifiers  23 NON NLS 1 print Hex modifiers print NON NLS 1 boolean space Needed false if modifiers ACC PUBLIC 0 print PUBLIC NON NLS 1 space Needed true if modifiers ACC PRIVATE 0 if space Needed print else space Needed true print PRIVATE NON NLS 1 if modifiers ACC PROTECTED 0 if space Needed print else space Needed true print PROTECTED NON NLS 1 if modifiers ACC STATIC 0 if space Needed print else space Needed true print STATIC NON NLS 1 if modifiers ACC FINAL 0 if space Needed print else space Needed true print FINAL NON NLS 1 if modifiers ACC SYNCHRONIZED 0 if space Needed print else space Needed true print SYNCHRONIZED NON NLS 1 if modifiers ACC BRIDGE 0 if space Needed print else space Needed true print BRIDGE NON NLS 1 if modifiers ACC VARARGS 0 if space Needed print else space Needed true print VARARGS NON NLS 1 if modifiers ACC NATIVE 0 if space Needed print else space Needed true print NATIVE NON NLS 1 if modifiers ACC ABSTRACT 0 if space Needed print else space Needed true print ABSTRACT NON NLS 1 if modifiers ACC STRICT 0 if space Needed print else space Needed true print STRICT NON NLS 1 if modifiers ACC EXT SYNTHETIC ACC SYNTHETIC 0 if space Needed print else space Needed true print SYNTHETIC NON NLS 1 println  printMethodModifiers printDescription TcpIpSpyMessages getString VerbosePacketStream Modifiers__23 printHex spaceNeeded ACC_PUBLIC spaceNeeded ACC_PRIVATE spaceNeeded spaceNeeded ACC_PROTECTED spaceNeeded spaceNeeded ACC_STATIC spaceNeeded spaceNeeded ACC_FINAL spaceNeeded spaceNeeded ACC_SYNCHRONIZED spaceNeeded spaceNeeded ACC_BRIDGE spaceNeeded spaceNeeded ACC_VARARGS spaceNeeded spaceNeeded ACC_NATIVE spaceNeeded spaceNeeded ACC_ABSTRACT spaceNeeded spaceNeeded ACC_STRICT spaceNeeded spaceNeeded ACC_EXT_SYNTHETIC ACC_SYNTHETIC spaceNeeded spaceNeeded
private void print Field Modifiers int modifiers print Description Tcp Ip Spy Messages get String Verbose Packet Stream Modifiers  23 NON NLS 1 print Hex modifiers print NON NLS 1 boolean space Needed false if modifiers ACC PUBLIC 0 print PUBLIC NON NLS 1 space Needed true if modifiers ACC PRIVATE 0 if space Needed print else space Needed true print PRIVATE NON NLS 1 if modifiers ACC PROTECTED 0 if space Needed print else space Needed true print PROTECTED NON NLS 1 if modifiers ACC STATIC 0 if space Needed print else space Needed true print STATIC NON NLS 1 if modifiers ACC FINAL 0 if space Needed print else space Needed true print FINAL NON NLS 1 if modifiers ACC VOLATILE 0 if space Needed print else space Needed true print VOLATILE NON NLS 1 if modifiers ACC TRANSIENT 0 if space Needed print else space Needed true print TRANSIENT NON NLS 1 if modifiers ACC ENUM 0 if space Needed print else space Needed true print ENUM NON NLS 1 if modifiers ACC EXT SYNTHETIC ACC SYNTHETIC 0 if space Needed print else space Needed true print SYNTHETIC NON NLS 1 println  printFieldModifiers printDescription TcpIpSpyMessages getString VerbosePacketStream Modifiers__23 printHex spaceNeeded ACC_PUBLIC spaceNeeded ACC_PRIVATE spaceNeeded spaceNeeded ACC_PROTECTED spaceNeeded spaceNeeded ACC_STATIC spaceNeeded spaceNeeded ACC_FINAL spaceNeeded spaceNeeded ACC_VOLATILE spaceNeeded spaceNeeded ACC_TRANSIENT spaceNeeded spaceNeeded ACC_ENUM spaceNeeded spaceNeeded ACC_EXT_SYNTHETIC ACC_SYNTHETIC spaceNeeded spaceNeeded
private void print Invocation Options int invocation Options print Description Tcp Ip Spy Messages get String Verbose Packet Stream Invocation Options  24 NON NLS 1 print Hex invocation Options print NON NLS 1 boolean space Needed false if invocation Options INVOKE SINGLE THREADED 0 print SINGLE THREADED NON NLS 1 space Needed true if invocation Options INVOKE NONVIRTUAL 0 if space Needed print print NONVIRTUAL NON NLS 1 println  printInvocationOptions invocationOptions printDescription TcpIpSpyMessages getString VerbosePacketStream Invocation_Options__24 printHex invocationOptions spaceNeeded invocationOptions INVOKE_SINGLE_THREADED SINGLE_THREADED spaceNeeded invocationOptions INVOKE_NONVIRTUAL spaceNeeded
private void print Thread Status int thread Status print Description Tcp Ip Spy Messages get String Verbose Packet Stream Thread status  25 NON NLS 1 print Hex thread Status print NON NLS 1 switch thread Status case THREAD STATUS ZOMBIE print ZOMBIE NON NLS 1 break case THREAD STATUS RUNNING print RUNNING NON NLS 1 break case THREAD STATUS SLEEPING print SLEEPING NON NLS 1 break case THREAD STATUS MONITOR print MONITOR NON NLS 1 break case THREAD STATUS WAIT print WAIT NON NLS 1 break default print Tcp Ip Spy Messages get String Verbose Packet Stream unknow 20 NON NLS 1 break println  printThreadStatus threadStatus printDescription TcpIpSpyMessages getString VerbosePacketStream Thread_status__25 printHex threadStatus threadStatus THREAD_STATUS_ZOMBIE THREAD_STATUS_RUNNING THREAD_STATUS_SLEEPING THREAD_STATUS_MONITOR THREAD_STATUS_WAIT TcpIpSpyMessages getString VerbosePacketStream unknow_20
private void print Suspend Status int suspend Status print Description Tcp Ip Spy Messages get String Verbose Packet Stream Suspend status  27 NON NLS 1 print Hex suspend Status print NON NLS 1 if suspend Status SUSPEND STATUS SUSPENDED 0 print SUSPENDED NON NLS 1 println  printSuspendStatus suspendStatus printDescription TcpIpSpyMessages getString VerbosePacketStream Suspend_status__27 printHex suspendStatus suspendStatus SUSPEND_STATUS_SUSPENDED
private void print Event Kind byte event Kind print Description Tcp Ip Spy Messages get String Verbose Packet Stream Event kind  28 NON NLS 1 print Hex event Kind print NON NLS 1 switch event Kind case EVENTKIND SINGLE STEP print SINGLE STEP NON NLS 1 break case EVENTKIND BREAKPOINT print BREAKPOINT NON NLS 1 break case EVENTKIND FRAME POP print FRAME POP NON NLS 1 break case EVENTKIND EXCEPTION print EXCEPTION NON NLS 1 break case EVENTKIND USER DEFINED print USER DEFINED NON NLS 1 break case EVENTKIND THREAD START print THREAD START NON NLS 1 break case EVENTKIND THREAD END print THREAD END NON NLS 1 break case EVENTKIND CLASS PREPARE print CLASS PREPARE NON NLS 1 break case EVENTKIND CLASS UNLOAD print CLASS UNLOAD NON NLS 1 break case EVENTKIND CLASS LOAD print CLASS LOAD NON NLS 1 break case EVENTKIND FIELD ACCESS print FIELD ACCESS NON NLS 1 break case EVENTKIND FIELD MODIFICATION print FIELD MODIFICATION NON NLS 1 break case EVENTKIND EXCEPTION CATCH print EXCEPTION CATCH NON NLS 1 break case EVENTKIND METHOD ENTRY print METHOD ENTRY NON NLS 1 break case EVENTKIND METHOD EXIT print METHOD EXIT NON NLS 1 break case EVENTKIND VM INIT print VM INIT NON NLS 1 break case EVENTKIND VM DEATH print VM DEATH NON NLS 1 break case EVENTKIND VM DISCONNECTED print VM DISCONNECTED NON NLS 1 break default print Tcp Ip Spy Messages get String Verbose Packet Stream unknow 20 NON NLS 1 break println  printEventKind eventKind printDescription TcpIpSpyMessages getString VerbosePacketStream Event_kind__28 printHex eventKind eventKind EVENTKIND_SINGLE_STEP SINGLE_STEP EVENTKIND_BREAKPOINT EVENTKIND_FRAME_POP FRAME_POP EVENTKIND_EXCEPTION EVENTKIND_USER_DEFINED USER_DEFINED EVENTKIND_THREAD_START THREAD_START EVENTKIND_THREAD_END THREAD_END EVENTKIND_CLASS_PREPARE CLASS_PREPARE EVENTKIND_CLASS_UNLOAD CLASS_UNLOAD EVENTKIND_CLASS_LOAD CLASS_LOAD EVENTKIND_FIELD_ACCESS FIELD_ACCESS EVENTKIND_FIELD_MODIFICATION FIELD_MODIFICATION EVENTKIND_EXCEPTION_CATCH EXCEPTION_CATCH EVENTKIND_METHOD_ENTRY METHOD_ENTRY EVENTKIND_METHOD_EXIT METHOD_EXIT EVENTKIND_VM_INIT VM_INIT EVENTKIND_VM_DEATH VM_DEATH EVENTKIND_VM_DISCONNECTED VM_DISCONNECTED TcpIpSpyMessages getString VerbosePacketStream unknow_20
private void print Suspend Policy byte suspend Policy print Description Tcp Ip Spy Messages get String Verbose Packet Stream Suspend policy  30 NON NLS 1 print Hex suspend Policy print NON NLS 1 switch suspend Policy case SUSPENDPOLICY NONE print NONE NON NLS 1 break case SUSPENDPOLICY EVENT THREAD print EVENT THREAD NON NLS 1 break case SUSPENDPOLICY ALL print ALL NON NLS 1 break default print Tcp Ip Spy Messages get String Verbose Packet Stream unknow 20 NON NLS 1 break println  printSuspendPolicy suspendPolicy printDescription TcpIpSpyMessages getString VerbosePacketStream Suspend_policy__30 printHex suspendPolicy suspendPolicy SUSPENDPOLICY_NONE SUSPENDPOLICY_EVENT_THREAD EVENT_THREAD SUSPENDPOLICY_ALL TcpIpSpyMessages getString VerbosePacketStream unknow_20
private void print Step Depth int set Depth print Description Tcp Ip Spy Messages get String Verbose Packet Stream Step depth  32 NON NLS 1 print Hex set Depth print NON NLS 1 switch set Depth case STEPDEPTH INTO print INTO NON NLS 1 break case STEPDEPTH OVER print OVER NON NLS 1 break case STEPDEPTH OUT print OUT NON NLS 1 break default print Tcp Ip Spy Messages get String Verbose Packet Stream unknow 20 NON NLS 1 break println  printStepDepth setDepth printDescription TcpIpSpyMessages getString VerbosePacketStream Step_depth__32 printHex setDepth setDepth STEPDEPTH_INTO STEPDEPTH_OVER STEPDEPTH_OUT TcpIpSpyMessages getString VerbosePacketStream unknow_20
private void print Step Size int set Size print Description Tcp Ip Spy Messages get String Verbose Packet Stream Step size  34 NON NLS 1 print Hex set Size print NON NLS 1 switch set Size case STEPSIZE MIN print MIN NON NLS 1 break case STEPSIZE LINE print LINE NON NLS 1 break default print Tcp Ip Spy Messages get String Verbose Packet Stream unknow 20 NON NLS 1 break println  printStepSize setSize printDescription TcpIpSpyMessages getString VerbosePacketStream Step_size__34 printHex setSize setSize STEPSIZE_MIN STEPSIZE_LINE TcpIpSpyMessages getString VerbosePacketStream unknow_20
private void print Vm Version Reply Data Input Stream in throws IO Exception String description read String in int jdwp Major in read Int int jdwp Minor in read Int String vm Version read String in String vm Name read String in println Tcp Ip Spy Messages get String Verbose Packet Stream VM Description  36 description NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream JDWP Major Version  37 jdwp Major NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream JDWP Minor Version  38 jdwp Minor NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream VM Version  39 vm Version NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream VM Name  40 vm Name NON NLS 1  printVmVersionReply DataInputStream IOException readString jdwpMajor readInt jdwpMinor readInt vmVersion readString vmName readString TcpIpSpyMessages getString VerbosePacketStream VM_Description__36 TcpIpSpyMessages getString VerbosePacketStream JDWP_Major_Version__37 jdwpMajor TcpIpSpyMessages getString VerbosePacketStream JDWP_Minor_Version__38 jdwpMinor TcpIpSpyMessages getString VerbosePacketStream VM_Version__39 vmVersion TcpIpSpyMessages getString VerbosePacketStream VM_Name__40 vmName
private void print Vm Classes By Signature Command Data Input Stream in throws IO Exception String signature read String in println Tcp Ip Spy Messages get String Verbose Packet Stream Class signature  41 signature NON NLS 1  printVmClassesBySignatureCommand DataInputStream IOException readString TcpIpSpyMessages getString VerbosePacketStream Class_signature__41
private void print Vm Classes By Signature Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int classes Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Classes count  42 classes Count NON NLS 1 for int i 0 i classes Count i byte ref Type Tag in read Byte long type Id read Reference TypeID in int status in read Int print Ref Type Tag ref Type Tag println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Type id  43 type Id NON NLS 1 print Class Status status  printVmClassesBySignatureReply DataInputStream IOException UnableToParseDataException classesCount readInt TcpIpSpyMessages getString VerbosePacketStream Classes_count__42 classesCount classesCount refTypeTag readByte typeId readReferenceTypeID readInt printRefTypeTag refTypeTag printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Type_id__43 typeId printClassStatus
private void print Vm All Classes Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int classes Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Classes count  42 classes Count NON NLS 1 for int i 0 i classes Count i byte ref Type Tag in read Byte long type Id read Reference TypeID in String signature read String in int status in read Int print Ref Type Tag ref Type Tag println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Type id  43 type Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Class signature  41 signature NON NLS 1 print Class Status status  printVmAllClassesReply DataInputStream IOException UnableToParseDataException classesCount readInt TcpIpSpyMessages getString VerbosePacketStream Classes_count__42 classesCount classesCount refTypeTag readByte typeId readReferenceTypeID readString readInt printRefTypeTag refTypeTag printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Type_id__43 typeId TcpIpSpyMessages getString VerbosePacketStream Class_signature__41 printClassStatus
private void print Vm All Threads Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int threads Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Threads count  47 threads Count NON NLS 1 for int i 0 i threads Count i long thread Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread id  48 thread Id NON NLS 1  printVmAllThreadsReply DataInputStream IOException UnableToParseDataException threadsCount readInt TcpIpSpyMessages getString VerbosePacketStream Threads_count__47 threadsCount threadsCount threadId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_id__48 threadId
private void print Vm Top Level Thread Group Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int groups Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Threads count  47 groups Count NON NLS 1 for int i 0 i groups Count i long thread Group Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread id  48 thread Group Id NON NLS 1  printVmTopLevelThreadGroupReply DataInputStream IOException UnableToParseDataException groupsCount readInt TcpIpSpyMessages getString VerbosePacketStream Threads_count__47 groupsCount groupsCount threadGroupId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_id__48 threadGroupId
private void print Vm Id Sizes Reply Data Input Stream in throws IO Exception int fieldID Size in read Int int methodID Size in read Int int objectID Size in read Int int reference TypeID Size in read Int int frameID Size in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Field ID size  51 fieldID Size NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Method ID size  52 methodID Size NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Object ID size  53 objectID Size NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reference type ID size  54 reference TypeID Size NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Frame ID size  55 frameID Size NON NLS 1 Tcpip Spy set FieldID Size fieldID Size Tcpip Spy set MethodID Size methodID Size Tcpip Spy set ObjectID Size objectID Size Tcpip Spy set Reference TypeID Size reference TypeID Size Tcpip Spy set FrameID Size frameID Size Tcpip Spy set Has Sizes true  printVmIdSizesReply DataInputStream IOException fieldIDSize readInt methodIDSize readInt objectIDSize readInt referenceTypeIDSize readInt frameIDSize readInt TcpIpSpyMessages getString VerbosePacketStream Field_ID_size__51 fieldIDSize TcpIpSpyMessages getString VerbosePacketStream Method_ID_size__52 methodIDSize TcpIpSpyMessages getString VerbosePacketStream Object_ID_size__53 objectIDSize TcpIpSpyMessages getString VerbosePacketStream Reference_type_ID_size__54 referenceTypeIDSize TcpIpSpyMessages getString VerbosePacketStream Frame_ID_size__55 frameIDSize TcpipSpy setFieldIDSize fieldIDSize TcpipSpy setMethodIDSize methodIDSize TcpipSpy setObjectIDSize objectIDSize TcpipSpy setReferenceTypeIDSize referenceTypeIDSize TcpipSpy setFrameIDSize frameIDSize TcpipSpy setHasSizes
private void print Vm Exit Command Data Input Stream in throws IO Exception int exit Code in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Exit code  56 exit Code NON NLS 1  printVmExitCommand DataInputStream IOException exitCode readInt TcpIpSpyMessages getString VerbosePacketStream Exit_code__56 exitCode
private void print Vm Create String Command Data Input Stream in throws IO Exception String string read String in println Tcp Ip Spy Messages get String Verbose Packet Stream String  57 string NON NLS 1  printVmCreateStringCommand DataInputStream IOException readString TcpIpSpyMessages getString VerbosePacketStream String__57
private void print Vm Create String Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception long string Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream String id  58 string Id NON NLS 1  printVmCreateStringReply DataInputStream IOException UnableToParseDataException stringId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream String_id__58 stringId
private void print Vm Capabilities Reply Data Input Stream in throws IO Exception boolean can Watch Field Modification in read Boolean boolean can Watch Field Access in read Boolean boolean can Get Bytecodes in read Boolean boolean can Get Synthetic Attribute in read Boolean boolean can Get Owned Monitor Info in read Boolean boolean can Get Current Contended Monitor in read Boolean boolean can Get Monitor Info in read Boolean println Tcp Ip Spy Messages get String Verbose Packet Stream Can watch field modification  59 can Watch Field Modification NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream can watch field access  60 can Watch Field Access NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Can get bytecodes  61 can Get Bytecodes NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Can get synthetic attribute  62 can Get Synthetic Attribute NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Can get owned monitor info  63 can Get Owned Monitor Info NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Can get cur  contended monitor  64 can Get Current Contended Monitor NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Can get monitor info  65 can Get Monitor Info NON NLS 1  printVmCapabilitiesReply DataInputStream IOException canWatchFieldModification readBoolean canWatchFieldAccess readBoolean canGetBytecodes readBoolean canGetSyntheticAttribute readBoolean canGetOwnedMonitorInfo readBoolean canGetCurrentContendedMonitor readBoolean canGetMonitorInfo readBoolean TcpIpSpyMessages getString VerbosePacketStream Can_watch_field_modification__59 canWatchFieldModification TcpIpSpyMessages getString VerbosePacketStream can_watch_field_access__60 canWatchFieldAccess TcpIpSpyMessages getString VerbosePacketStream Can_get_bytecodes__61 canGetBytecodes TcpIpSpyMessages getString VerbosePacketStream Can_get_synthetic_attribute__62 canGetSyntheticAttribute TcpIpSpyMessages getString VerbosePacketStream Can_get_owned_monitor_info__63 canGetOwnedMonitorInfo TcpIpSpyMessages getString VerbosePacketStream Can_get_cur _contended_monitor__64 canGetCurrentContendedMonitor TcpIpSpyMessages getString VerbosePacketStream Can_get_monitor_info__65 canGetMonitorInfo
private void print Vm Class Paths Reply Data Input Stream in throws IO Exception String base Dir read String in println Tcp Ip Spy Messages get String Verbose Packet Stream Base directory  66 base Dir NON NLS 1 int classpath Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Classpaths count  67 classpath Count NON NLS 1 for int i 0 i classpath Count i String path read String in println Tcp Ip Spy Messages get String Verbose Packet Stream Classpath  68 path NON NLS 1 int bootclasspath Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Bootclasspaths count  69 bootclasspath Count NON NLS 1 for int i 0 i bootclasspath Count i String path read String in println Tcp Ip Spy Messages get String Verbose Packet Stream Bootclasspath  70 path NON NLS 1  printVmClassPathsReply DataInputStream IOException baseDir readString TcpIpSpyMessages getString VerbosePacketStream Base_directory__66 baseDir classpathCount readInt TcpIpSpyMessages getString VerbosePacketStream Classpaths_count__67 classpathCount classpathCount readString TcpIpSpyMessages getString VerbosePacketStream Classpath__68 bootclasspathCount readInt TcpIpSpyMessages getString VerbosePacketStream Bootclasspaths_count__69 bootclasspathCount bootclasspathCount readString TcpIpSpyMessages getString VerbosePacketStream Bootclasspath__70
private void print Vm Dispose Objects Command Data Input Stream in throws IO Exception Unable To Parse Data Exception int requests Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Requests Count  71 requests Count NON NLS 1 for int i 0 i requests Count i long object Id read ObjectID in int refs Counts in read Int println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Object id  72 object Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream References count  73 refs Counts NON NLS 1  printVmDisposeObjectsCommand DataInputStream IOException UnableToParseDataException requestsCount readInt TcpIpSpyMessages getString VerbosePacketStream Requests_Count__71 requestsCount requestsCount objectId readObjectID refsCounts readInt printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Object_id__72 objectId TcpIpSpyMessages getString VerbosePacketStream References_count__73 refsCounts
private void print Vm Capabilities New Reply Data Input Stream in throws IO Exception print Vm Capabilities Reply in boolean can Redefine Classes in read Boolean boolean can Add Method in read Boolean boolean can Unrestrictedly Redefine Classes in read Boolean boolean can Pop Frames in read Boolean boolean can Use Instance Filters in read Boolean boolean can Get Source Debug Extension in read Boolean boolean can RequestVM Death Event in read Boolean boolean can Set Default Stratum in read Boolean boolean reserved16 in read Boolean boolean reserved17 in read Boolean boolean reserved18 in read Boolean boolean reserved19 in read Boolean boolean reserved20 in read Boolean boolean reserved21 in read Boolean boolean reserved22 in read Boolean boolean reserved23 in read Boolean boolean reserved24 in read Boolean boolean reserved25 in read Boolean boolean reserved26 in read Boolean boolean reserved27 in read Boolean boolean reserved28 in read Boolean boolean reserved29 in read Boolean boolean reserved30 in read Boolean boolean reserved31 in read Boolean boolean reserved32 in read Boolean println Tcp Ip Spy Messages get String Verbose Packet Stream Can redefine classes  74 can Redefine Classes NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Can add method  75 can Add Method NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Can unrestrictedly rd  classes  76 can Unrestrictedly Redefine Classes NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Can pop frames  77 can Pop Frames NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Can use instance filters  78 can Use Instance Filters NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Can get source debug extension  79 can Get Source Debug Extension NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Can request VMDeath event  80 can RequestVM Death Event NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Can set default stratum  81 can Set Default Stratum NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved16 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved17 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved18 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved19 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved20 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved21 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved22 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved23 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved24 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved25 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved26 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved27 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved28 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved29 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved30 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved31 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Reserved  82 reserved32 NON NLS 1  printVmCapabilitiesNewReply DataInputStream IOException printVmCapabilitiesReply canRedefineClasses readBoolean canAddMethod readBoolean canUnrestrictedlyRedefineClasses readBoolean canPopFrames readBoolean canUseInstanceFilters readBoolean canGetSourceDebugExtension readBoolean canRequestVMDeathEvent readBoolean canSetDefaultStratum readBoolean readBoolean readBoolean readBoolean readBoolean readBoolean readBoolean readBoolean readBoolean readBoolean readBoolean readBoolean readBoolean readBoolean readBoolean readBoolean readBoolean readBoolean TcpIpSpyMessages getString VerbosePacketStream Can_redefine_classes__74 canRedefineClasses TcpIpSpyMessages getString VerbosePacketStream Can_add_method__75 canAddMethod TcpIpSpyMessages getString VerbosePacketStream Can_unrestrictedly_rd _classes__76 canUnrestrictedlyRedefineClasses TcpIpSpyMessages getString VerbosePacketStream Can_pop_frames__77 canPopFrames TcpIpSpyMessages getString VerbosePacketStream Can_use_instance_filters__78 canUseInstanceFilters TcpIpSpyMessages getString VerbosePacketStream Can_get_source_debug_extension__79 canGetSourceDebugExtension TcpIpSpyMessages getString VerbosePacketStream Can_request_VMDeath_event__80 canRequestVMDeathEvent TcpIpSpyMessages getString VerbosePacketStream Can_set_default_stratum__81 canSetDefaultStratum TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82 TcpIpSpyMessages getString VerbosePacketStream Reserved__82
private void print Vm Redefine Class Command Data Input Stream in throws IO Exception Unable To Parse Data Exception int types Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Types count  99 types Count NON NLS 1 for int i 0 i types Count i long type Id read Reference TypeID in int classfile Length in read Int println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Type id  43 type Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Classfile length  101 classfile Length NON NLS 1 while classfile Length in skip Bytes classfile Length 0 print Description Tcp Ip Spy Messages get String Verbose Packet Stream Class bytes  102 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream skipped 103 NON NLS 1  printVmRedefineClassCommand DataInputStream IOException UnableToParseDataException typesCount readInt TcpIpSpyMessages getString VerbosePacketStream Types_count__99 typesCount typesCount typeId readReferenceTypeID classfileLength readInt printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Type_id__43 typeId TcpIpSpyMessages getString VerbosePacketStream Classfile_length__101 classfileLength classfileLength skipBytes classfileLength printDescription TcpIpSpyMessages getString VerbosePacketStream Class_bytes__102 TcpIpSpyMessages getString VerbosePacketStream skipped_103
private void print Vm Set Default Stratum Command Data Input Stream in throws IO Exception String stratum Id read String in println Tcp Ip Spy Messages get String Verbose Packet Stream Stratum id  104 stratum Id NON NLS 1  printVmSetDefaultStratumCommand DataInputStream IOException stratumId readString TcpIpSpyMessages getString VerbosePacketStream Stratum_id__104 stratumId
private void print Vm All Classes With Generic Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int classes Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Classes count  42 classes Count NON NLS 1 for int i 0 i classes Count i byte ref Type Tag in read Byte long type Id read Reference TypeID in String signature read String in String generic Signature read String in int status in read Int print Ref Type Tag ref Type Tag println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Type id  43 type Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Class signature  41 signature NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Generic class signature  405 generic Signature NON NLS 1 print Class Status status  printVmAllClassesWithGenericReply DataInputStream IOException UnableToParseDataException classesCount readInt TcpIpSpyMessages getString VerbosePacketStream Classes_count__42 classesCount classesCount refTypeTag readByte typeId readReferenceTypeID readString genericSignature readString readInt printRefTypeTag refTypeTag printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Type_id__43 typeId TcpIpSpyMessages getString VerbosePacketStream Class_signature__41 TcpIpSpyMessages getString VerbosePacketStream Generic_class_signature__405 genericSignature printClassStatus
private void print Rt Default Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long type Id read Reference TypeID in println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Type id  43 type Id NON NLS 1  printRtDefaultCommand DataInputStream IOException UnableToParseDataException typeId readReferenceTypeID printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Type_id__43 typeId
private void print Rt Signature Reply Data Input Stream in throws IO Exception String signature read String in println Tcp Ip Spy Messages get String Verbose Packet Stream Signature  106 signature NON NLS 1  printRtSignatureReply DataInputStream IOException readString TcpIpSpyMessages getString VerbosePacketStream Signature__106
private void print Rt Class Loader Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception long class Loader Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream ClassLoader id  107 class Loader Id NON NLS 1  printRtClassLoaderReply DataInputStream IOException UnableToParseDataException classLoaderId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream ClassLoader_id__107 classLoaderId
private void print Rt Modifiers Reply Data Input Stream in throws IO Exception int modifiers in read Int print Class Modifiers modifiers  printRtModifiersReply DataInputStream IOException readInt printClassModifiers
private void print Rt Fields Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int fields Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Fields count  108 fields Count NON NLS 1 for int i 0 i fields Count i long field Id read FieldID in String name read String in String signature read String in int modifiers in read Int println Field Id Tcp Ip Spy Messages get String Verbose Packet Stream Field id  109 field Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Name  110 name NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Signature  106 signature NON NLS 1 print Field Modifiers modifiers  printRtFieldsReply DataInputStream IOException UnableToParseDataException fieldsCount readInt TcpIpSpyMessages getString VerbosePacketStream Fields_count__108 fieldsCount fieldsCount fieldId readFieldID readString readString readInt printlnFieldId TcpIpSpyMessages getString VerbosePacketStream Field_id__109 fieldId TcpIpSpyMessages getString VerbosePacketStream Name__110 TcpIpSpyMessages getString VerbosePacketStream Signature__106 printFieldModifiers
private void print Rt Methods Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int methods Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Methods count  112 methods Count NON NLS 1 for int i 0 i methods Count i long method Id read MethodID in String name read String in String signature read String in int modifiers in read Int println Method Id Tcp Ip Spy Messages get String Verbose Packet Stream Method id  113 method Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Name  110 name NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Signature  106 signature NON NLS 1 print Method Modifiers modifiers  printRtMethodsReply DataInputStream IOException UnableToParseDataException methodsCount readInt TcpIpSpyMessages getString VerbosePacketStream Methods_count__112 methodsCount methodsCount methodId readMethodID readString readString readInt printlnMethodId TcpIpSpyMessages getString VerbosePacketStream Method_id__113 methodId TcpIpSpyMessages getString VerbosePacketStream Name__110 TcpIpSpyMessages getString VerbosePacketStream Signature__106 printMethodModifiers
private void print Rt Get Values Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long type Id read Reference TypeID in int fields Count in read Int println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Type id  43 type Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Fields count  108 fields Count NON NLS 1 for int i 0 i fields Count i long field Id read FieldID in println Field Id Tcp Ip Spy Messages get String Verbose Packet Stream Field id  109 field Id NON NLS 1  printRtGetValuesCommand DataInputStream IOException UnableToParseDataException typeId readReferenceTypeID fieldsCount readInt printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Type_id__43 typeId TcpIpSpyMessages getString VerbosePacketStream Fields_count__108 fieldsCount fieldsCount fieldId readFieldID printlnFieldId TcpIpSpyMessages getString VerbosePacketStream Field_id__109 fieldId
private void print Rt Get Values Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int values Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Values count  119 values Count NON NLS 1 for int i 0 i values Count i read And Println Tagged Value Tcp Ip Spy Messages get String Verbose Packet Stream Value  120 in NON NLS 1  printRtGetValuesReply DataInputStream IOException UnableToParseDataException valuesCount readInt TcpIpSpyMessages getString VerbosePacketStream Values_count__119 valuesCount valuesCount readAndPrintlnTaggedValue TcpIpSpyMessages getString VerbosePacketStream Value__120
private void print Rt Source File Reply Data Input Stream in throws IO Exception String source File read String in println Tcp Ip Spy Messages get String Verbose Packet Stream Source file  121 source File NON NLS 1  printRtSourceFileReply DataInputStream IOException sourceFile readString TcpIpSpyMessages getString VerbosePacketStream Source_file__121 sourceFile
private void print Rt Nested Types Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int types Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Types count  99 types Count NON NLS 1 for int i 0 i types Count i byte type Tag in read Byte long type Id read Reference TypeID in print Ref Type Tag type Tag println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Type id  43 type Id NON NLS 1  printRtNestedTypesReply DataInputStream IOException UnableToParseDataException typesCount readInt TcpIpSpyMessages getString VerbosePacketStream Types_count__99 typesCount typesCount typeTag readByte typeId readReferenceTypeID printRefTypeTag typeTag printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Type_id__43 typeId
private void print Rt Status Reply Data Input Stream in throws IO Exception int status in read Int print Class Status status  printRtStatusReply DataInputStream IOException readInt printClassStatus
private void print Rt Interfaces Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int interfaces Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Interfaces count  124 interfaces Count NON NLS 1 for int i 0 i interfaces Count i long interface Id read Reference TypeID in println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Interface type id  125 interface Id NON NLS 1  printRtInterfacesReply DataInputStream IOException UnableToParseDataException interfacesCount readInt TcpIpSpyMessages getString VerbosePacketStream Interfaces_count__124 interfacesCount interfacesCount interfaceId readReferenceTypeID printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Interface_type_id__125 interfaceId
private void print Rt Class Object Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception long class Object Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Class object id  126 class Object Id NON NLS 1  printRtClassObjectReply DataInputStream IOException UnableToParseDataException classObjectId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Class_object_id__126 classObjectId
private void print Rt Source Debug Extension Reply Data Input Stream in throws IO Exception String extension read String in println Tcp Ip Spy Messages get String Verbose Packet Stream Extension  127 extension NON NLS 1  printRtSourceDebugExtensionReply DataInputStream IOException readString TcpIpSpyMessages getString VerbosePacketStream Extension__127
private void print Rt Signature With Generic Reply Data Input Stream in throws IO Exception String signature read String in String generic Signature read String in println Tcp Ip Spy Messages get String Verbose Packet Stream Signature  106 signature NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Generic signature  422 generic Signature NON NLS 1  printRtSignatureWithGenericReply DataInputStream IOException readString genericSignature readString TcpIpSpyMessages getString VerbosePacketStream Signature__106 TcpIpSpyMessages getString VerbosePacketStream Generic_signature__422 genericSignature
private void print Rt Fields With Generic Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int fields Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Fields count  108 fields Count NON NLS 1 for int i 0 i fields Count i long field Id read FieldID in String name read String in String signature read String in String generic Signature read String in int modifiers in read Int println Field Id Tcp Ip Spy Messages get String Verbose Packet Stream Field id  109 field Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Name  110 name NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Signature  106 signature NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Generic signature  422 generic Signature NON NLS 1 print Field Modifiers modifiers  printRtFieldsWithGenericReply DataInputStream IOException UnableToParseDataException fieldsCount readInt TcpIpSpyMessages getString VerbosePacketStream Fields_count__108 fieldsCount fieldsCount fieldId readFieldID readString readString genericSignature readString readInt printlnFieldId TcpIpSpyMessages getString VerbosePacketStream Field_id__109 fieldId TcpIpSpyMessages getString VerbosePacketStream Name__110 TcpIpSpyMessages getString VerbosePacketStream Signature__106 TcpIpSpyMessages getString VerbosePacketStream Generic_signature__422 genericSignature printFieldModifiers
private void print Rt Methods With Generic Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int methods Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Methods count  112 methods Count NON NLS 1 for int i 0 i methods Count i long method Id read MethodID in String name read String in String signature read String in String generic Signature read String in int modifiers in read Int println Method Id Tcp Ip Spy Messages get String Verbose Packet Stream Method id  113 method Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Name  110 name NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Signature  106 signature NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Generic signature  422 generic Signature NON NLS 1 print Method Modifiers modifiers  printRtMethodsWithGenericReply DataInputStream IOException UnableToParseDataException methodsCount readInt TcpIpSpyMessages getString VerbosePacketStream Methods_count__112 methodsCount methodsCount methodId readMethodID readString readString genericSignature readString readInt printlnMethodId TcpIpSpyMessages getString VerbosePacketStream Method_id__113 methodId TcpIpSpyMessages getString VerbosePacketStream Name__110 TcpIpSpyMessages getString VerbosePacketStream Signature__106 TcpIpSpyMessages getString VerbosePacketStream Generic_signature__422 genericSignature printMethodModifiers
private void print Ct Superclass Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long class Type Id read Reference TypeID in println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Class type id  128 class Type Id NON NLS 1  printCtSuperclassCommand DataInputStream IOException UnableToParseDataException classTypeId readReferenceTypeID printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Class_type_id__128 classTypeId
private void print Ct Superclass Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception long superclass Type Id read Reference TypeID in println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Superclass type id  129 superclass Type Id NON NLS 1  printCtSuperclassReply DataInputStream IOException UnableToParseDataException superclassTypeId readReferenceTypeID printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Superclass_type_id__129 superclassTypeId
private void print Ct Set Values Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long class Type Id read Reference TypeID in int fields Count in read Int println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Class type id  128 class Type Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Fields count  108 fields Count NON NLS 1 throw new Unable To Parse Data Exception Tcp Ip Spy Messages get String Verbose Packet Stream List of values  NOT MANAGED 132 remainder Data in NON NLS 1  printCtSetValuesCommand DataInputStream IOException UnableToParseDataException classTypeId readReferenceTypeID fieldsCount readInt printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Class_type_id__128 classTypeId TcpIpSpyMessages getString VerbosePacketStream Fields_count__108 fieldsCount UnableToParseDataException TcpIpSpyMessages getString VerbosePacketStream List_of_values__NOT_MANAGED_132 remainderData
private void print Ct Invoke Method Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long class Type Id read Reference TypeID in long thread Id read ObjectID in long method Id read MethodID in int arguments Count in read Int println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Class type id  128 class Type Id NON NLS 1 println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread id  48 thread Id NON NLS 1 println Method Id Tcp Ip Spy Messages get String Verbose Packet Stream Method id  113 method Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Arguments count  136 arguments Count NON NLS 1 for int i 0 i arguments Count i read And Println Tagged Value Tcp Ip Spy Messages get String Verbose Packet Stream Argument  137 in NON NLS 1 int invocation Options in read Int print Invocation Options invocation Options  printCtInvokeMethodCommand DataInputStream IOException UnableToParseDataException classTypeId readReferenceTypeID threadId readObjectID methodId readMethodID argumentsCount readInt printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Class_type_id__128 classTypeId printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_id__48 threadId printlnMethodId TcpIpSpyMessages getString VerbosePacketStream Method_id__113 methodId TcpIpSpyMessages getString VerbosePacketStream Arguments_count__136 argumentsCount argumentsCount readAndPrintlnTaggedValue TcpIpSpyMessages getString VerbosePacketStream Argument__137 invocationOptions readInt printInvocationOptions invocationOptions
private void print Ct Invoke Method Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception read And Println Tagged Value Tcp Ip Spy Messages get String Verbose Packet Stream Return value  138 in NON NLS 1 byte signature Byte in read Byte long exception read ObjectID in println Tagged Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Exception object id  139 exception signature Byte NON NLS 1  printCtInvokeMethodReply DataInputStream IOException UnableToParseDataException readAndPrintlnTaggedValue TcpIpSpyMessages getString VerbosePacketStream Return_value__138 signatureByte readByte readObjectID printlnTaggedObjectId TcpIpSpyMessages getString VerbosePacketStream Exception_object_id__139 signatureByte
private void print Ct New Instance Command Data Input Stream in throws IO Exception Unable To Parse Data Exception print Ct Invoke Method Command in  printCtNewInstanceCommand DataInputStream IOException UnableToParseDataException printCtInvokeMethodCommand
private void print Ct New Instance Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception byte object Signature Byte in read Byte long new Object Id read ObjectID in byte exception Signature Byte in read Byte long exception read ObjectID in println Tagged Object Id Tcp Ip Spy Messages get String Verbose Packet Stream New object id  140 new Object Id object Signature Byte NON NLS 1 println Tagged Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Exception object id  139 exception exception Signature Byte NON NLS 1  printCtNewInstanceReply DataInputStream IOException UnableToParseDataException objectSignatureByte readByte newObjectId readObjectID exceptionSignatureByte readByte readObjectID printlnTaggedObjectId TcpIpSpyMessages getString VerbosePacketStream New_object_id__140 newObjectId objectSignatureByte printlnTaggedObjectId TcpIpSpyMessages getString VerbosePacketStream Exception_object_id__139 exceptionSignatureByte
private void print At New Instance Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long array Type Id read Reference TypeID in int length in read Int println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Array type id  142 array Type Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Length  143 length NON NLS 1  printAtNewInstanceCommand DataInputStream IOException UnableToParseDataException arrayTypeId readReferenceTypeID readInt printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Array_type_id__142 arrayTypeId TcpIpSpyMessages getString VerbosePacketStream Length__143
private void print At New Instance Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception byte signature Byte in read Byte long new Array Id read ObjectID in println Tagged Object Id Tcp Ip Spy Messages get String Verbose Packet Stream New array id  144 new Array Id signature Byte NON NLS 1  printAtNewInstanceReply DataInputStream IOException UnableToParseDataException signatureByte readByte newArrayId readObjectID printlnTaggedObjectId TcpIpSpyMessages getString VerbosePacketStream New_array_id__144 newArrayId signatureByte
private void printM Default Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long class Type Id read Reference TypeID in long method Id read MethodID in println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Class type id  128 class Type Id NON NLS 1 println Method Id Tcp Ip Spy Messages get String Verbose Packet Stream Method id  113 method Id NON NLS 1  printMDefaultCommand DataInputStream IOException UnableToParseDataException classTypeId readReferenceTypeID methodId readMethodID printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Class_type_id__128 classTypeId printlnMethodId TcpIpSpyMessages getString VerbosePacketStream Method_id__113 methodId
private void printM Line Table Reply Data Input Stream in throws IO Exception long start in read Long long end in read Long int lines in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Lowest valid code index  147 start NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Highest valid code index  148 end NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Number of lines  149 lines NON NLS 1 for int i 0 i lines i long line Code Index in read Long int line Number in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Line code Index  150 line Code Index NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Line number  151 line Number NON NLS 1  printMLineTableReply DataInputStream IOException readLong readLong readInt TcpIpSpyMessages getString VerbosePacketStream Lowest_valid_code_index__147 TcpIpSpyMessages getString VerbosePacketStream Highest_valid_code_index__148 TcpIpSpyMessages getString VerbosePacketStream Number_of_lines__149 lineCodeIndex readLong lineNumber readInt TcpIpSpyMessages getString VerbosePacketStream Line_code_Index__150 lineCodeIndex TcpIpSpyMessages getString VerbosePacketStream Line_number__151 lineNumber
private void printM Variable Table Reply Data Input Stream in throws IO Exception int slots Used By Args in read Int int variables Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Nb of slots used by all args  152 slots Used By Args NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Nb of variables  153 variables Count NON NLS 1 for int i 0 i variables Count i long code Index in read Long String name read String in String signature read String in int length in read Int int slot Id in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream First code index  154 code Index NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Variable name  155 name NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Variable type signature  156 signature NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Code index length  157 length NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Slot id  158 slot Id NON NLS 1  printMVariableTableReply DataInputStream IOException slotsUsedByArgs readInt variablesCount readInt TcpIpSpyMessages getString VerbosePacketStream Nb_of_slots_used_by_all_args__152 slotsUsedByArgs TcpIpSpyMessages getString VerbosePacketStream Nb_of_variables__153 variablesCount variablesCount codeIndex readLong readString readString readInt slotId readInt TcpIpSpyMessages getString VerbosePacketStream First_code_index__154 codeIndex TcpIpSpyMessages getString VerbosePacketStream Variable_name__155 TcpIpSpyMessages getString VerbosePacketStream Variable_type_signature__156 TcpIpSpyMessages getString VerbosePacketStream Code_index_length__157 TcpIpSpyMessages getString VerbosePacketStream Slot_id__158 slotId
private void printM Bytecodes Reply Data Input Stream in throws IO Exception int bytes in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Nb of bytes  159 bytes NON NLS 1 while bytes in skip Bytes bytes 0 print Description Tcp Ip Spy Messages get String Verbose Packet Stream Method bytes  160 NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream skipped 103 NON NLS 1  printMBytecodesReply DataInputStream IOException readInt TcpIpSpyMessages getString VerbosePacketStream Nb_of_bytes__159 skipBytes printDescription TcpIpSpyMessages getString VerbosePacketStream Method_bytes__160 TcpIpSpyMessages getString VerbosePacketStream skipped_103
private void printM Is Obsolete Reply Data Input Stream in throws IO Exception boolean is Obsolete in read Boolean println Tcp Ip Spy Messages get String Verbose Packet Stream Is obsolete  162 is Obsolete NON NLS 1  printMIsObsoleteReply DataInputStream IOException isObsolete readBoolean TcpIpSpyMessages getString VerbosePacketStream Is_obsolete__162 isObsolete
private void printM Variable Table With Generic Reply Data Input Stream in throws IO Exception int slots Used By Args in read Int int variables Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Nb of slots used by all args  152 slots Used By Args NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Nb of variables  153 variables Count NON NLS 1 for int i 0 i variables Count i long code Index in read Long String name read String in String signature read String in String generic Signature read String in int length in read Int int slot Id in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream First code index  154 code Index NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Variable name  155 name NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Variable type signature  156 signature NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Variable type generic signature  425 generic Signature NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Code index length  157 length NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Slot id  158 slot Id NON NLS 1  printMVariableTableWithGenericReply DataInputStream IOException slotsUsedByArgs readInt variablesCount readInt TcpIpSpyMessages getString VerbosePacketStream Nb_of_slots_used_by_all_args__152 slotsUsedByArgs TcpIpSpyMessages getString VerbosePacketStream Nb_of_variables__153 variablesCount variablesCount codeIndex readLong readString readString genericSignature readString readInt slotId readInt TcpIpSpyMessages getString VerbosePacketStream First_code_index__154 codeIndex TcpIpSpyMessages getString VerbosePacketStream Variable_name__155 TcpIpSpyMessages getString VerbosePacketStream Variable_type_signature__156 TcpIpSpyMessages getString VerbosePacketStream Variable_type_generic_signature__425 genericSignature TcpIpSpyMessages getString VerbosePacketStream Code_index_length__157 TcpIpSpyMessages getString VerbosePacketStream Slot_id__158 slotId
private void print Or Default Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long object Id read ObjectID in println Tcp Ip Spy Messages get String Verbose Packet Stream Object id  72 object Id NON NLS 1  printOrDefaultCommand DataInputStream IOException UnableToParseDataException objectId readObjectID TcpIpSpyMessages getString VerbosePacketStream Object_id__72 objectId
private void print Or Reference Type Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception byte ref Type Tag in read Byte long type Id read Reference TypeID in print Ref Type Tag ref Type Tag println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Type id  43 type Id NON NLS 1  printOrReferenceTypeReply DataInputStream IOException UnableToParseDataException refTypeTag readByte typeId readReferenceTypeID printRefTypeTag refTypeTag printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Type_id__43 typeId
private void print Or Get Values Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long object Id read ObjectID in int fields Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Object id  72 object Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Fields count  108 fields Count NON NLS 1 for int i 0 i fields Count i long field Id read FieldID in println Tcp Ip Spy Messages get String Verbose Packet Stream Field id  109 field Id NON NLS 1  printOrGetValuesCommand DataInputStream IOException UnableToParseDataException objectId readObjectID fieldsCount readInt TcpIpSpyMessages getString VerbosePacketStream Object_id__72 objectId TcpIpSpyMessages getString VerbosePacketStream Fields_count__108 fieldsCount fieldsCount fieldId readFieldID TcpIpSpyMessages getString VerbosePacketStream Field_id__109 fieldId
private void print Or Get Values Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int values Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Values count  119 values Count NON NLS 1 for int i 0 i values Count i read And Println Tagged Value Tcp Ip Spy Messages get String Verbose Packet Stream Value  120 in NON NLS 1  printOrGetValuesReply DataInputStream IOException UnableToParseDataException valuesCount readInt TcpIpSpyMessages getString VerbosePacketStream Values_count__119 valuesCount valuesCount readAndPrintlnTaggedValue TcpIpSpyMessages getString VerbosePacketStream Value__120
private void print Or Set Values Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long object Id read ObjectID in int fields Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Object id  72 object Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Fields count  108 fields Count NON NLS 1 throw new Unable To Parse Data Exception Tcp Ip Spy Messages get String Verbose Packet Stream List of values  NOT MANAGED 132 remainder Data in NON NLS 1  printOrSetValuesCommand DataInputStream IOException UnableToParseDataException objectId readObjectID fieldsCount readInt TcpIpSpyMessages getString VerbosePacketStream Object_id__72 objectId TcpIpSpyMessages getString VerbosePacketStream Fields_count__108 fieldsCount UnableToParseDataException TcpIpSpyMessages getString VerbosePacketStream List_of_values__NOT_MANAGED_132 remainderData
private void print Or Monitor Info Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception long owner Thread Id read ObjectID in int entry Count in read Int int waiters in read Int println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Owner thread id  173 owner Thread Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Entry count  174 entry Count NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Nb of waiters  175 waiters NON NLS 1 long waiter Thread Id for int i 0 i waiters i waiter Thread Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Waiting thread id  176 waiter Thread Id NON NLS 1  printOrMonitorInfoReply DataInputStream IOException UnableToParseDataException ownerThreadId readObjectID entryCount readInt readInt printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Owner_thread_id__173 ownerThreadId TcpIpSpyMessages getString VerbosePacketStream Entry_count__174 entryCount TcpIpSpyMessages getString VerbosePacketStream Nb_of_waiters__175 waiterThreadId waiterThreadId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Waiting_thread_id__176 waiterThreadId
private void print Or Invoke Method Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long object Id read ObjectID in long thread Id read ObjectID in long class Type Id read Reference TypeID in long method Id read MethodID in int args Count in read Int println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Object id  72 object Id NON NLS 1 println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread id  48 thread Id NON NLS 1 println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Class type id  128 class Type Id NON NLS 1 println Method Id Tcp Ip Spy Messages get String Verbose Packet Stream Method id  113 method Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Arguments count  136 args Count NON NLS 1 for int i 0 i args Count i read And Println Tagged Value Tcp Ip Spy Messages get String Verbose Packet Stream Argument  137 in NON NLS 1 int invocation Option in read Int print Invocation Options invocation Option  printOrInvokeMethodCommand DataInputStream IOException UnableToParseDataException objectId readObjectID threadId readObjectID classTypeId readReferenceTypeID methodId readMethodID argsCount readInt printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Object_id__72 objectId printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_id__48 threadId printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Class_type_id__128 classTypeId printlnMethodId TcpIpSpyMessages getString VerbosePacketStream Method_id__113 methodId TcpIpSpyMessages getString VerbosePacketStream Arguments_count__136 argsCount argsCount readAndPrintlnTaggedValue TcpIpSpyMessages getString VerbosePacketStream Argument__137 invocationOption readInt printInvocationOptions invocationOption
private void print Or Invoke Method Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception read And Println Tagged Value Tcp Ip Spy Messages get String Verbose Packet Stream Return value  138 in NON NLS 1 byte signature Byte in read Byte long exception read ObjectID in println Tagged Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Exception object id  139 exception signature Byte NON NLS 1  printOrInvokeMethodReply DataInputStream IOException UnableToParseDataException readAndPrintlnTaggedValue TcpIpSpyMessages getString VerbosePacketStream Return_value__138 signatureByte readByte readObjectID printlnTaggedObjectId TcpIpSpyMessages getString VerbosePacketStream Exception_object_id__139 signatureByte
private void print Or Is Collected Reply Data Input Stream in throws IO Exception boolean is Collected in read Boolean println Tcp Ip Spy Messages get String Verbose Packet Stream Is collected  185 is Collected NON NLS 1  printOrIsCollectedReply DataInputStream IOException isCollected readBoolean TcpIpSpyMessages getString VerbosePacketStream Is_collected__185 isCollected
private void print Sr Value Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long string Object Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream String object id  186 string Object Id NON NLS 1  printSrValueCommand DataInputStream IOException UnableToParseDataException stringObjectId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream String_object_id__186 stringObjectId
private void print Sr Value Reply Data Input Stream in throws IO Exception String value read String in println Tcp Ip Spy Messages get String Verbose Packet Stream Value  120 value NON NLS 1  printSrValueReply DataInputStream IOException readString TcpIpSpyMessages getString VerbosePacketStream Value__120
private void print Tr Default Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long thread Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread id  48 thread Id NON NLS 1  printTrDefaultCommand DataInputStream IOException UnableToParseDataException threadId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_id__48 threadId
private void print Tr Name Reply Data Input Stream in throws IO Exception String thread Name read String in println Tcp Ip Spy Messages get String Verbose Packet Stream Name  110 thread Name NON NLS 1  printTrNameReply DataInputStream IOException threadName readString TcpIpSpyMessages getString VerbosePacketStream Name__110 threadName
private void print Tr Status Reply Data Input Stream in throws IO Exception int thread Status in read Int int suspend Status in read Int print Thread Status thread Status print Suspend Status suspend Status  printTrStatusReply DataInputStream IOException threadStatus readInt suspendStatus readInt printThreadStatus threadStatus printSuspendStatus suspendStatus
private void print Tr Thread Group Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception long thread Group Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread group id  190 thread Group Id NON NLS 1  printTrThreadGroupReply DataInputStream IOException UnableToParseDataException threadGroupId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_group_id__190 threadGroupId
private void print Tr Frames Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long thread Id read ObjectID in int start Frame in read Int int length in read Int println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread id  48 thread Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream First frame  192 start Frame NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Number of frame  193 length NON NLS 1  printTrFramesCommand DataInputStream IOException UnableToParseDataException threadId readObjectID startFrame readInt readInt printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_id__48 threadId TcpIpSpyMessages getString VerbosePacketStream First_frame__192 startFrame TcpIpSpyMessages getString VerbosePacketStream Number_of_frame__193
private void print Tr Frames Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int frames Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Frames count  194 frames Count NON NLS 1 for int i 0 i frames Count i long frame Id read FrameID in println Frame Id Tcp Ip Spy Messages get String Verbose Packet Stream Frame id  195 frame Id NON NLS 1 read And Print Location in  printTrFramesReply DataInputStream IOException UnableToParseDataException framesCount readInt TcpIpSpyMessages getString VerbosePacketStream Frames_count__194 framesCount framesCount frameId readFrameID printlnFrameId TcpIpSpyMessages getString VerbosePacketStream Frame_id__195 frameId readAndPrintLocation
private void print Tr Frame Count Reply Data Input Stream in throws IO Exception int frames Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Frames count  194 frames Count NON NLS 1  printTrFrameCountReply DataInputStream IOException framesCount readInt TcpIpSpyMessages getString VerbosePacketStream Frames_count__194 framesCount
private void print Tr Owned Monitors Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int monitors Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Monitors count  197 monitors Count NON NLS 1 for int i 0 i monitors Count i byte signature Byte in read Byte long monitor Object Id read ObjectID in println Tagged Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Monitor object id  198 monitor Object Id signature Byte NON NLS 1  printTrOwnedMonitorsReply DataInputStream IOException UnableToParseDataException monitorsCount readInt TcpIpSpyMessages getString VerbosePacketStream Monitors_count__197 monitorsCount monitorsCount signatureByte readByte monitorObjectId readObjectID printlnTaggedObjectId TcpIpSpyMessages getString VerbosePacketStream Monitor_object_id__198 monitorObjectId signatureByte
private void print Tr Current Contended Monitor Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception byte signature Byte in read Byte long monitor Object Id read ObjectID in println Tagged Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Monitor object id  198 monitor Object Id signature Byte NON NLS 1  printTrCurrentContendedMonitorReply DataInputStream IOException UnableToParseDataException signatureByte readByte monitorObjectId readObjectID printlnTaggedObjectId TcpIpSpyMessages getString VerbosePacketStream Monitor_object_id__198 monitorObjectId signatureByte
private void print Tr Stop Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long thread Id read ObjectID in long exception Object Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread id  48 thread Id NON NLS 1 println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Exception object id  139 exception Object Id NON NLS 1  printTrStopCommand DataInputStream IOException UnableToParseDataException threadId readObjectID exceptionObjectId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_id__48 threadId printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Exception_object_id__139 exceptionObjectId
private void print Tr Suspend Count Reply Data Input Stream in throws IO Exception int suspend Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Suspend count  202 suspend Count NON NLS 1  printTrSuspendCountReply DataInputStream IOException suspendCount readInt TcpIpSpyMessages getString VerbosePacketStream Suspend_count__202 suspendCount
private void print Tgr Default Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long thread Group Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread group id  190 thread Group Id NON NLS 1  printTgrDefaultCommand DataInputStream IOException UnableToParseDataException threadGroupId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_group_id__190 threadGroupId
private void print Tgr Name Reply Data Input Stream in throws IO Exception String name read String in println Tcp Ip Spy Messages get String Verbose Packet Stream Name  110 name NON NLS 1  printTgrNameReply DataInputStream IOException readString TcpIpSpyMessages getString VerbosePacketStream Name__110
private void print Tgr Parent Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception long parent Thread Group Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Parent thread group id  205 parent Thread Group Id NON NLS 1  printTgrParentReply DataInputStream IOException UnableToParseDataException parentThreadGroupId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Parent_thread_group_id__205 parentThreadGroupId
private void print Tgr Children Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int child Threads Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Child threads count  206 child Threads Count NON NLS 1 for int i 0 i child Threads Count i long child Thread Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Child thread id  207 child Thread Id NON NLS 1 int child Group Threads Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Child group threads count  208 child Group Threads Count NON NLS 1 for int i 0 i child Group Threads Count i long child Group Thread Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Child group thread id  209 child Group Thread Id NON NLS 1  printTgrChildrenReply DataInputStream IOException UnableToParseDataException childThreadsCount readInt TcpIpSpyMessages getString VerbosePacketStream Child_threads_count__206 childThreadsCount childThreadsCount childThreadId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Child_thread_id__207 childThreadId childGroupThreadsCount readInt TcpIpSpyMessages getString VerbosePacketStream Child_group_threads_count__208 childGroupThreadsCount childGroupThreadsCount childGroupThreadId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Child_group_thread_id__209 childGroupThreadId
private void print Ar Length Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long array Object Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Array object id  210 array Object Id NON NLS 1  printArLengthCommand DataInputStream IOException UnableToParseDataException arrayObjectId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Array_object_id__210 arrayObjectId
private void print Ar Length Reply Data Input Stream in throws IO Exception int length in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Length  143 length NON NLS 1  printArLengthReply DataInputStream IOException readInt TcpIpSpyMessages getString VerbosePacketStream Length__143
private void print Ar Get Values Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long array Object Id read ObjectID in int first Index in read Int int length in read Int println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Array object id  210 array Object Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream First index  213 first Index NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Length  214 length NON NLS 1  printArGetValuesCommand DataInputStream IOException UnableToParseDataException arrayObjectId readObjectID firstIndex readInt readInt printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Array_object_id__210 arrayObjectId TcpIpSpyMessages getString VerbosePacketStream First_index__213 firstIndex TcpIpSpyMessages getString VerbosePacketStream Length__214
private void print Ar Get Values Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception read And Print Array Region in  printArGetValuesReply DataInputStream IOException UnableToParseDataException readAndPrintArrayRegion
private void print Ar Set Values Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long array Object Id read ObjectID in int first Index in read Int int length in read Int println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Array object id  210 array Object Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream First index  213 first Index NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Length  214 length NON NLS 1 throw new Unable To Parse Data Exception Tcp Ip Spy Messages get String Verbose Packet Stream List of values  NOT MANAGED 132 remainder Data in NON NLS 1  printArSetValuesCommand DataInputStream IOException UnableToParseDataException arrayObjectId readObjectID firstIndex readInt readInt printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Array_object_id__210 arrayObjectId TcpIpSpyMessages getString VerbosePacketStream First_index__213 firstIndex TcpIpSpyMessages getString VerbosePacketStream Length__214 UnableToParseDataException TcpIpSpyMessages getString VerbosePacketStream List_of_values__NOT_MANAGED_132 remainderData
private void print Clr Visible Classes Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long class Loader Object Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Class loader object id  219 class Loader Object Id NON NLS 1  printClrVisibleClassesCommand DataInputStream IOException UnableToParseDataException classLoaderObjectId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Class_loader_object_id__219 classLoaderObjectId
private void print Clr Visible Classes Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int classes Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Classes count  42 classes Count NON NLS 1 for int i 0 i classes Count i byte ref Type Tag in read Byte long type Id read Reference TypeID in print Ref Type Tag ref Type Tag println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Type id  43 type Id NON NLS 1  printClrVisibleClassesReply DataInputStream IOException UnableToParseDataException classesCount readInt TcpIpSpyMessages getString VerbosePacketStream Classes_count__42 classesCount classesCount refTypeTag readByte typeId readReferenceTypeID printRefTypeTag refTypeTag printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Type_id__43 typeId
private void print Er Set Command Data Input Stream in throws IO Exception Unable To Parse Data Exception byte event Kind in read Byte byte suspend Policy in read Byte int modifiers Count in read Int print Event Kind event Kind print Suspend Policy suspend Policy println Tcp Ip Spy Messages get String Verbose Packet Stream Modifiers count  222 modifiers Count NON NLS 1 for int i 0 i modifiers Count i byte mod Kind in read Byte print Description Tcp Ip Spy Messages get String Verbose Packet Stream Modifier kind  223 NON NLS 1 print Hex mod Kind switch mod Kind case 1 count println Tcp Ip Spy Messages get String Verbose Packet Stream   Count  224 NON NLS 1 int count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Count  225 count NON NLS 1 break case 2 conditional println Tcp Ip Spy Messages get String Verbose Packet Stream   Conditional  226 NON NLS 1 int expr Id in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Expression id  227 expr Id NON NLS 1 break case 3 thread only println Tcp Ip Spy Messages get String Verbose Packet Stream   Thread Only  228 NON NLS 1 long thread Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread id  48 thread Id NON NLS 1 break case 4 class only println Tcp Ip Spy Messages get String Verbose Packet Stream   Class Only  230 NON NLS 1 long class Id read Reference TypeID in println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Class type id  128 class Id NON NLS 1 break case 5 class match println Tcp Ip Spy Messages get String Verbose Packet Stream   Class Match  232 NON NLS 1 String class Patern read String in println Tcp Ip Spy Messages get String Verbose Packet Stream Class patern  233 class Patern NON NLS 1 break case 6 class exclude println Tcp Ip Spy Messages get String Verbose Packet Stream   Class Exclude  234 NON NLS 1 class Patern read String in println Tcp Ip Spy Messages get String Verbose Packet Stream Class patern  235 class Patern NON NLS 1 break case 7 location only println Tcp Ip Spy Messages get String Verbose Packet Stream   Location Only  236 NON NLS 1 read And Print Location in break case 8 exception only println Tcp Ip Spy Messages get String Verbose Packet Stream   Exception Only  237 NON NLS 1 long type Id read Reference TypeID in boolean caught in read Boolean boolean uncaught in read Boolean println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Exception type id  238 type Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Caught  239 caught NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Uncaught  240 uncaught NON NLS 1 break case 9 field only println Tcp Ip Spy Messages get String Verbose Packet Stream   Field Only  241 NON NLS 1 long declaring Type Id read Reference TypeID in long field Id read FieldID in println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Declaring type id  242 declaring Type Id NON NLS 1 println Field Id Tcp Ip Spy Messages get String Verbose Packet Stream Field id  109 field Id NON NLS 1 break case 10 step println Tcp Ip Spy Messages get String Verbose Packet Stream   Step  244 NON NLS 1 thread Id read ObjectID in int step Size in read Int int step Depth in read Int println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread id  48 thread Id NON NLS 1 print Step Size step Size print Step Depth step Depth break case 11 instance only println Tcp Ip Spy Messages get String Verbose Packet Stream   Instance Only  246 NON NLS 1 long object Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Object id  72 object Id NON NLS 1 break  printErSetCommand DataInputStream IOException UnableToParseDataException eventKind readByte suspendPolicy readByte modifiersCount readInt printEventKind eventKind printSuspendPolicy suspendPolicy TcpIpSpyMessages getString VerbosePacketStream Modifiers_count__222 modifiersCount modifiersCount modKind readByte printDescription TcpIpSpyMessages getString VerbosePacketStream Modifier_kind__223 printHex modKind modKind TcpIpSpyMessages getString VerbosePacketStream _ _224 readInt TcpIpSpyMessages getString VerbosePacketStream Count__225 TcpIpSpyMessages getString VerbosePacketStream _ _226 exprId readInt TcpIpSpyMessages getString VerbosePacketStream Expression_id__227 exprId TcpIpSpyMessages getString VerbosePacketStream _ ThreadOnly _228 threadId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_id__48 threadId TcpIpSpyMessages getString VerbosePacketStream _ ClassOnly _230 classId readReferenceTypeID printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Class_type_id__128 classId TcpIpSpyMessages getString VerbosePacketStream _ ClassMatch _232 classPatern readString TcpIpSpyMessages getString VerbosePacketStream Class_patern__233 classPatern TcpIpSpyMessages getString VerbosePacketStream _ ClassExclude _234 classPatern readString TcpIpSpyMessages getString VerbosePacketStream Class_patern__235 classPatern TcpIpSpyMessages getString VerbosePacketStream _ LocationOnly _236 readAndPrintLocation TcpIpSpyMessages getString VerbosePacketStream _ ExceptionOnly _237 typeId readReferenceTypeID readBoolean readBoolean printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Exception_type_id__238 typeId TcpIpSpyMessages getString VerbosePacketStream Caught__239 TcpIpSpyMessages getString VerbosePacketStream Uncaught__240 TcpIpSpyMessages getString VerbosePacketStream _ FieldOnly _241 declaringTypeId readReferenceTypeID fieldId readFieldID printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Declaring_type_id__242 declaringTypeId printlnFieldId TcpIpSpyMessages getString VerbosePacketStream Field_id__109 fieldId TcpIpSpyMessages getString VerbosePacketStream _ _244 threadId readObjectID stepSize readInt stepDepth readInt printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_id__48 threadId printStepSize stepSize printStepDepth stepDepth TcpIpSpyMessages getString VerbosePacketStream _ InstanceOnly _246 objectId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Object_id__72 objectId
private void print Er Set Reply Data Input Stream in throws IO Exception int request Id in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Request id  248 request Id NON NLS 1  printErSetReply DataInputStream IOException requestId readInt TcpIpSpyMessages getString VerbosePacketStream Request_id__248 requestId
private void print Er Clear Command Data Input Stream in throws IO Exception byte event Kind in read Byte int request Id in read Int print Event Kind event Kind println Tcp Ip Spy Messages get String Verbose Packet Stream Request id  248 request Id NON NLS 1  printErClearCommand DataInputStream IOException eventKind readByte requestId readInt printEventKind eventKind TcpIpSpyMessages getString VerbosePacketStream Request_id__248 requestId
private void print Sf Default Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long thread Id read ObjectID in long frame Id read FrameID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread object id  250 thread Id NON NLS 1 println Frame Id Tcp Ip Spy Messages get String Verbose Packet Stream Frame id  195 frame Id NON NLS 1  printSfDefaultCommand DataInputStream IOException UnableToParseDataException threadId readObjectID frameId readFrameID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_object_id__250 threadId printlnFrameId TcpIpSpyMessages getString VerbosePacketStream Frame_id__195 frameId
private void print Sf Get Values Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long thread Id read ObjectID in long frame Id read FrameID in int slots Count in read Int println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread object id  250 thread Id NON NLS 1 println Frame Id Tcp Ip Spy Messages get String Verbose Packet Stream Frame id  195 frame Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Slots count  254 slots Count NON NLS 1 for int i 0 i slots Count i int slot Index in read Int byte signature Tag in read Byte println Tcp Ip Spy Messages get String Verbose Packet Stream Slot index  255 slot Index NON NLS 1 print Description Tcp Ip Spy Messages get String Verbose Packet Stream Signature tag  256 NON NLS 1 print Signature Byte signature Tag true println  printSfGetValuesCommand DataInputStream IOException UnableToParseDataException threadId readObjectID frameId readFrameID slotsCount readInt printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_object_id__250 threadId printlnFrameId TcpIpSpyMessages getString VerbosePacketStream Frame_id__195 frameId TcpIpSpyMessages getString VerbosePacketStream Slots_count__254 slotsCount slotsCount slotIndex readInt signatureTag readByte TcpIpSpyMessages getString VerbosePacketStream Slot_index__255 slotIndex printDescription TcpIpSpyMessages getString VerbosePacketStream Signature_tag__256 printSignatureByte signatureTag
private void print Sf Get Values Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception int values Count in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Values count  119 values Count NON NLS 1 for int i 0 i values Count i read And Println Tagged Value Tcp Ip Spy Messages get String Verbose Packet Stream Value  120 in NON NLS 1  printSfGetValuesReply DataInputStream IOException UnableToParseDataException valuesCount readInt TcpIpSpyMessages getString VerbosePacketStream Values_count__119 valuesCount valuesCount readAndPrintlnTaggedValue TcpIpSpyMessages getString VerbosePacketStream Value__120
private void print Sf Set Values Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long thread Id read ObjectID in long frame Id read FrameID in int slots Count in read Int println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread object id  250 thread Id NON NLS 1 println Frame Id Tcp Ip Spy Messages get String Verbose Packet Stream Frame id  195 frame Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Slots count  254 slots Count NON NLS 1 for int i 0 i slots Count i int slot Index in read Int println Tcp Ip Spy Messages get String Verbose Packet Stream Slot index  255 slot Index NON NLS 1 read And Println Tagged Value Tcp Ip Spy Messages get String Verbose Packet Stream Values  263 in NON NLS 1  printSfSetValuesCommand DataInputStream IOException UnableToParseDataException threadId readObjectID frameId readFrameID slotsCount readInt printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_object_id__250 threadId printlnFrameId TcpIpSpyMessages getString VerbosePacketStream Frame_id__195 frameId TcpIpSpyMessages getString VerbosePacketStream Slots_count__254 slotsCount slotsCount slotIndex readInt TcpIpSpyMessages getString VerbosePacketStream Slot_index__255 slotIndex readAndPrintlnTaggedValue TcpIpSpyMessages getString VerbosePacketStream Values__263
private void print Sf This Object Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception byte signature Byte in read Byte long object Id read ObjectID in println Tagged Object Id Tcp Ip Spy Messages get String Verbose Packet Stream   this   object id  264 object Id signature Byte NON NLS 1  printSfThisObjectReply DataInputStream IOException UnableToParseDataException signatureByte readByte objectId readObjectID printlnTaggedObjectId TcpIpSpyMessages getString VerbosePacketStream __this___object_id__264 objectId signatureByte
private void print Cor Reflected Type Command Data Input Stream in throws IO Exception Unable To Parse Data Exception long class Object Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Class object id  126 class Object Id NON NLS 1  printCorReflectedTypeCommand DataInputStream IOException UnableToParseDataException classObjectId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Class_object_id__126 classObjectId
private void print Cor Reflected Type Reply Data Input Stream in throws IO Exception Unable To Parse Data Exception byte ref Type Tag in read Byte long type Id read Reference TypeID in print Ref Type Tag ref Type Tag println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Type id  43 type Id NON NLS 1  printCorReflectedTypeReply DataInputStream IOException UnableToParseDataException refTypeTag readByte typeId readReferenceTypeID printRefTypeTag refTypeTag printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Type_id__43 typeId
private void printE Composite Command Data Input Stream in throws IO Exception Unable To Parse Data Exception byte suspend Policy in read Byte int events Count in read Int print Suspend Policy suspend Policy println Tcp Ip Spy Messages get String Verbose Packet Stream Events count  267 events Count NON NLS 1 for int i 0 i events Count i byte event Kind in read Byte int request Id in read Int print Event Kind event Kind println Tcp Ip Spy Messages get String Verbose Packet Stream Request id  248 request Id NON NLS 1 switch event Kind case EVENTKIND VM START long thread Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Initial thread object id  269 thread Id NON NLS 1 break case EVENTKIND SINGLE STEP case EVENTKIND BREAKPOINT case EVENTKIND METHOD ENTRY case EVENTKIND METHOD EXIT thread Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread object id  250 thread Id NON NLS 1 read And Print Location in break case EVENTKIND EXCEPTION thread Id read ObjectID in read And Print Location in byte signature Byte in read Byte long object Id read ObjectID in println Tagged Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Exception object id  139 object Id signature Byte NON NLS 1 read And Print Location in break case EVENTKIND THREAD START case EVENTKIND THREAD DEATH thread Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread object id  250 thread Id NON NLS 1 break case EVENTKIND CLASS PREPARE thread Id read ObjectID in byte ref Type Tag in read Byte long type Id read Reference TypeID in String type Signature read String in int status in read Int println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread object id  250 thread Id NON NLS 1 print Ref Type Tag ref Type Tag println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Type id  43 type Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Type signature  275 type Signature NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream Status  276 status NON NLS 1 break case EVENTKIND CLASS UNLOAD type Signature read String in println Tcp Ip Spy Messages get String Verbose Packet Stream Type signature  275 type Signature NON NLS 1 break case EVENTKIND FIELD ACCESS thread Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread object id  250 thread Id NON NLS 1 read And Print Location in ref Type Tag in read Byte type Id read Reference TypeID in long field Id read FieldID in signature Byte in read Byte object Id read ObjectID in print Ref Type Tag ref Type Tag println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Type id  43 type Id NON NLS 1 println Field Id Tcp Ip Spy Messages get String Verbose Packet Stream Field id  109 field Id NON NLS 1 println Tagged Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Object id  72 object Id signature Byte NON NLS 1 break case EVENTKIND FIELD MODIFICATION thread Id read ObjectID in println Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Thread object id  250 thread Id NON NLS 1 read And Print Location in ref Type Tag in read Byte type Id read Reference TypeID in field Id read FieldID in signature Byte in read Byte object Id read ObjectID in print Ref Type Tag ref Type Tag println Reference Type Id Tcp Ip Spy Messages get String Verbose Packet Stream Type id  43 type Id NON NLS 1 println Field Id Tcp Ip Spy Messages get String Verbose Packet Stream Field id  109 field Id NON NLS 1 println Tagged Object Id Tcp Ip Spy Messages get String Verbose Packet Stream Object id  72 object Id signature Byte NON NLS 1 read And Println Tagged Value Tcp Ip Spy Messages get String Verbose Packet Stream Value  120 in NON NLS 1 break case EVENTKIND VM DEATH break  printECompositeCommand DataInputStream IOException UnableToParseDataException suspendPolicy readByte eventsCount readInt printSuspendPolicy suspendPolicy TcpIpSpyMessages getString VerbosePacketStream Events_count__267 eventsCount eventsCount eventKind readByte requestId readInt printEventKind eventKind TcpIpSpyMessages getString VerbosePacketStream Request_id__248 requestId eventKind EVENTKIND_VM_START threadId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Initial_thread_object_id__269 threadId EVENTKIND_SINGLE_STEP EVENTKIND_BREAKPOINT EVENTKIND_METHOD_ENTRY EVENTKIND_METHOD_EXIT threadId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_object_id__250 threadId readAndPrintLocation EVENTKIND_EXCEPTION threadId readObjectID readAndPrintLocation signatureByte readByte objectId readObjectID printlnTaggedObjectId TcpIpSpyMessages getString VerbosePacketStream Exception_object_id__139 objectId signatureByte readAndPrintLocation EVENTKIND_THREAD_START EVENTKIND_THREAD_DEATH threadId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_object_id__250 threadId EVENTKIND_CLASS_PREPARE threadId readObjectID refTypeTag readByte typeId readReferenceTypeID typeSignature readString readInt printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_object_id__250 threadId printRefTypeTag refTypeTag printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Type_id__43 typeId TcpIpSpyMessages getString VerbosePacketStream Type_signature__275 typeSignature TcpIpSpyMessages getString VerbosePacketStream Status__276 EVENTKIND_CLASS_UNLOAD typeSignature readString TcpIpSpyMessages getString VerbosePacketStream Type_signature__275 typeSignature EVENTKIND_FIELD_ACCESS threadId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_object_id__250 threadId readAndPrintLocation refTypeTag readByte typeId readReferenceTypeID fieldId readFieldID signatureByte readByte objectId readObjectID printRefTypeTag refTypeTag printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Type_id__43 typeId printlnFieldId TcpIpSpyMessages getString VerbosePacketStream Field_id__109 fieldId printlnTaggedObjectId TcpIpSpyMessages getString VerbosePacketStream Object_id__72 objectId signatureByte EVENTKIND_FIELD_MODIFICATION threadId readObjectID printlnObjectId TcpIpSpyMessages getString VerbosePacketStream Thread_object_id__250 threadId readAndPrintLocation refTypeTag readByte typeId readReferenceTypeID fieldId readFieldID signatureByte readByte objectId readObjectID printRefTypeTag refTypeTag printlnReferenceTypeId TcpIpSpyMessages getString VerbosePacketStream Type_id__43 typeId printlnFieldId TcpIpSpyMessages getString VerbosePacketStream Field_id__109 fieldId printlnTaggedObjectId TcpIpSpyMessages getString VerbosePacketStream Object_id__72 objectId signatureByte readAndPrintlnTaggedValue TcpIpSpyMessages getString VerbosePacketStream Value__120 EVENTKIND_VM_DEATH
Reads String from Jdwp stream Read a UTF where length has 4 bytes and not just 2 This code was based on the OTI Retysin source for readUTF private static String read String Data Input Stream in throws IO Exception int utf Size in read Int byte utf Bytes new byte utf Size in read Fully utf Bytes Guess at buffer size String Buffer str Buffer new String Buffer utf Size 3 2 for int i 0 i utf Size int a utf Bytes i 0xFF if a 4 12 str Buffer append char a i else int b utf Bytes i 1 0xFF if a 4 14 if b 0xBF 0 throw new UTF Data Format Exception Tcp Ip Spy Messages get String Verbose Packet Stream Second byte input does not match UTF Specification 287 NON NLS 1 str Buffer append char a 0x1F 6 b 0x3F i 2 else int c utf Bytes i 2 0xFF if a 0xEF 0 if b 0xBF 0 c 0xBF 0 throw new UTF Data Format Exception Tcp Ip Spy Messages get String Verbose Packet Stream Second or third byte input does not mach UTF Specification  288 NON NLS 1 str Buffer append char a 0x0F 12 b 0x3F 6 c 0x3F i 3 else throw new UTF Data Format Exception Tcp Ip Spy Messages get String Verbose Packet Stream Input does not match UTF Specification 289 NON NLS 1 return str Buffer to String  readString DataInputStream IOException utfSize readInt utfBytes utfSize readFully utfBytes StringBuffer strBuffer StringBuffer utfSize utfSize utfBytes strBuffer utfBytes UTFDataFormatException TcpIpSpyMessages getString VerbosePacketStream Second_byte_input_does_not_match_UTF_Specification_287 strBuffer utfBytes UTFDataFormatException TcpIpSpyMessages getString VerbosePacketStream Second_or_third_byte_input_does_not_mach_UTF_Specification__288 strBuffer UTFDataFormatException TcpIpSpyMessages getString VerbosePacketStream Input_does_not_match_UTF_Specification_289 strBuffer toString
private byte remainder Data Data Input Stream in throws IO Exception byte buffer new byte 100 byte res new byte 0 new Res int res Length 0 length while length in read buffer 1 new Res new byte res Length length System arraycopy res 0 new Res 0 res Length System arraycopy buffer 0 new Res res Length length res new Res res Length length return res  remainderData DataInputStream IOException newRes resLength newRes resLength newRes resLength newRes resLength newRes resLength
private long read ObjectID Data Input Stream in throws IO Exception Unable To Parse Data Exception if Tcpip Spy has Sizes throw new Unable To Parse Data Exception Tcp Ip Spy Messages get String Verbose Packet Stream Unable to parse remaining data 290 remainder Data in NON NLS 1 return readID in Tcpip Spy get ObjectID Size  readObjectID DataInputStream IOException UnableToParseDataException TcpipSpy hasSizes UnableToParseDataException TcpIpSpyMessages getString VerbosePacketStream Unable_to_parse_remaining_data_290 remainderData TcpipSpy getObjectIDSize
private long read Reference TypeID Data Input Stream in throws IO Exception Unable To Parse Data Exception if Tcpip Spy has Sizes throw new Unable To Parse Data Exception Tcp Ip Spy Messages get String Verbose Packet Stream Unable to parse remaining data 290 remainder Data in NON NLS 1 return readID in Tcpip Spy get Reference TypeID Size  readReferenceTypeID DataInputStream IOException UnableToParseDataException TcpipSpy hasSizes UnableToParseDataException TcpIpSpyMessages getString VerbosePacketStream Unable_to_parse_remaining_data_290 remainderData TcpipSpy getReferenceTypeIDSize
private long read FieldID Data Input Stream in throws IO Exception Unable To Parse Data Exception if Tcpip Spy has Sizes throw new Unable To Parse Data Exception Tcp Ip Spy Messages get String Verbose Packet Stream Unable to parse remaining data 290 remainder Data in NON NLS 1 return readID in Tcpip Spy get FieldID Size  readFieldID DataInputStream IOException UnableToParseDataException TcpipSpy hasSizes UnableToParseDataException TcpIpSpyMessages getString VerbosePacketStream Unable_to_parse_remaining_data_290 remainderData TcpipSpy getFieldIDSize
private long read MethodID Data Input Stream in throws IO Exception Unable To Parse Data Exception if Tcpip Spy has Sizes throw new Unable To Parse Data Exception Tcp Ip Spy Messages get String Verbose Packet Stream Unable to parse remaining data 290 remainder Data in NON NLS 1 return readID in Tcpip Spy get MethodID Size  readMethodID DataInputStream IOException UnableToParseDataException TcpipSpy hasSizes UnableToParseDataException TcpIpSpyMessages getString VerbosePacketStream Unable_to_parse_remaining_data_290 remainderData TcpipSpy getMethodIDSize
private long read FrameID Data Input Stream in throws IO Exception Unable To Parse Data Exception if Tcpip Spy has Sizes throw new Unable To Parse Data Exception Tcp Ip Spy Messages get String Verbose Packet Stream Unable to parse remaining data 290 remainder Data in NON NLS 1 return readID in Tcpip Spy get FrameID Size  readFrameID DataInputStream IOException UnableToParseDataException TcpipSpy hasSizes UnableToParseDataException TcpIpSpyMessages getString VerbosePacketStream Unable_to_parse_remaining_data_290 remainderData TcpipSpy getFrameIDSize
private long readID Data Input Stream in int size throws IO Exception long id 0 for int i 0 i size i int b in read Unsigned Byte Note that the byte must be treated as unsigned id id 8 b return id  DataInputStream IOException readUnsignedByte
private void read And Println Tagged Value String description Data Input Stream in throws IO Exception Unable To Parse Data Exception byte tag in read Byte read And Println Untagged Value description in tag true  readAndPrintlnTaggedValue DataInputStream IOException UnableToParseDataException readByte readAndPrintlnUntaggedValue
private void read And Println Untagged Value String description Data Input Stream in byte tag boolean print Tag Value throws IO Exception Unable To Parse Data Exception print Description description int size boolean is Id false switch tag case VOID TAG print Signature Byte tag print Tag Value println return case BOOLEAN TAG if print Tag Value print Signature Byte tag true print println in read Boolean else println in read Boolean print print Signature Byte tag false return case BYTE TAG size 1 break case CHAR TAG case SHORT TAG size 2 break case INT TAG case FLOAT TAG size 4 break case DOUBLE TAG case LONG TAG size 8 break case ARRAY TAG case OBJECT TAG case STRING TAG case THREAD TAG case THREAD GROUP TAG case CLASS LOADER TAG case CLASS OBJECT TAG if Tcpip Spy has Sizes throw new Unable To Parse Data Exception Tcp Ip Spy Messages get String Verbose Packet Stream Unable to parse remaining data 290 remainder Data in NON NLS 1 size Tcpip Spy get ObjectID Size is Id true break default size 0 break long value readID in size if print Tag Value print Signature Byte tag true print print Hex value size if is Id print Paranthetical value else switch tag case BYTE TAG print Paranthetical byte value break case CHAR TAG print Paranthetical char value break case SHORT TAG print Paranthetical short value break case INT TAG print Paranthetical int value break case FLOAT TAG print Paranthetical Float int Bits To Float int value break case DOUBLE TAG print Paranthetical Double long Bits To Double value break case LONG TAG print Paranthetical value break if print Tag Value print print Signature Byte tag false println  readAndPrintlnUntaggedValue DataInputStream printTagValue IOException UnableToParseDataException printDescription isId VOID_TAG printSignatureByte printTagValue BOOLEAN_TAG printTagValue printSignatureByte readBoolean readBoolean printSignatureByte BYTE_TAG CHAR_TAG SHORT_TAG INT_TAG FLOAT_TAG DOUBLE_TAG LONG_TAG ARRAY_TAG OBJECT_TAG STRING_TAG THREAD_TAG THREAD_GROUP_TAG CLASS_LOADER_TAG CLASS_OBJECT_TAG TcpipSpy hasSizes UnableToParseDataException TcpIpSpyMessages getString VerbosePacketStream Unable_to_parse_remaining_data_290 remainderData TcpipSpy getObjectIDSize isId printTagValue printSignatureByte printHex isId printParanthetical BYTE_TAG printParanthetical CHAR_TAG printParanthetical SHORT_TAG printParanthetical INT_TAG printParanthetical FLOAT_TAG printParanthetical intBitsToFloat DOUBLE_TAG printParanthetical longBitsToDouble LONG_TAG printParanthetical printTagValue printSignatureByte
private void print Signature Byte byte signature Byte boolean print Value String type switch signature Byte case VOID TAG type void NON NLS 1 break case BOOLEAN TAG type boolean NON NLS 1 break case BYTE TAG type byte NON NLS 1 break case CHAR TAG type char NON NLS 1 break case SHORT TAG type short NON NLS 1 break case INT TAG type int NON NLS 1 break case FLOAT TAG type float NON NLS 1 break case DOUBLE TAG type double NON NLS 1 break case LONG TAG type long NON NLS 1 break case ARRAY TAG type array id NON NLS 1 break case OBJECT TAG type object id NON NLS 1 break case STRING TAG type string id NON NLS 1 break case THREAD TAG type thread id NON NLS 1 break case THREAD GROUP TAG type thread group id NON NLS 1 break case CLASS LOADER TAG type class loader id NON NLS 1 break case CLASS OBJECT TAG type class object id NON NLS 1 break default type Tcp Ip Spy Messages get String Verbose Packet Stream unknow 20 NON NLS 1 break if print Value print Hex signature Byte print NON NLS 1 print signature Byte print NON NLS 1 else print NON NLS 1 print type  printSignatureByte signatureByte printValue signatureByte VOID_TAG BOOLEAN_TAG BYTE_TAG CHAR_TAG SHORT_TAG INT_TAG FLOAT_TAG DOUBLE_TAG LONG_TAG ARRAY_TAG OBJECT_TAG STRING_TAG THREAD_TAG THREAD_GROUP_TAG CLASS_LOADER_TAG CLASS_OBJECT_TAG TcpIpSpyMessages getString VerbosePacketStream unknow_20 printValue printHex signatureByte signatureByte
private void read And Print Location Data Input Stream in throws IO Exception Unable To Parse Data Exception byte type Tag in read Byte long class Id read Reference TypeID in long method Id read MethodID in long index in read Long println Reference Type Id With Type Tag Tcp Ip Spy Messages get String Verbose Packet Stream Location  class id  297 class Id type Tag NON NLS 1 println Method Id Tcp Ip Spy Messages get String Verbose Packet Stream           method id  298 method Id NON NLS 1 println Tcp Ip Spy Messages get String Verbose Packet Stream           index  299 index NON NLS 1  readAndPrintLocation DataInputStream IOException UnableToParseDataException typeTag readByte classId readReferenceTypeID methodId readMethodID readLong printlnReferenceTypeIdWithTypeTag TcpIpSpyMessages getString VerbosePacketStream Location__class_id__297 classId typeTag printlnMethodId TcpIpSpyMessages getString VerbosePacketStream __________method_id__298 methodId TcpIpSpyMessages getString VerbosePacketStream __________index__299
private void read And Print Array Region Data Input Stream in throws IO Exception Unable To Parse Data Exception byte signature Byte in read Byte int values Count in read Int print Description Tcp Ip Spy Messages get String Verbose Packet Stream Signature byte  300 NON NLS 1 print Signature Byte signature Byte true println println Tcp Ip Spy Messages get String Verbose Packet Stream Values count  119 values Count NON NLS 1 switch signature Byte case ARRAY TAG case OBJECT TAG case STRING TAG case THREAD TAG case THREAD GROUP TAG case CLASS LOADER TAG case CLASS OBJECT TAG for int i 0 i values Count i read And Println Tagged Value Tcp Ip Spy Messages get String Verbose Packet Stream Value 302 in NON NLS 1 break default for int i 0 i values Count i read And Println Untagged Value Tcp Ip Spy Messages get String Verbose Packet Stream Value 302 in signature Byte false NON NLS 1 break  readAndPrintArrayRegion DataInputStream IOException UnableToParseDataException signatureByte readByte valuesCount readInt printDescription TcpIpSpyMessages getString VerbosePacketStream Signature_byte__300 printSignatureByte signatureByte TcpIpSpyMessages getString VerbosePacketStream Values_count__119 valuesCount signatureByte ARRAY_TAG OBJECT_TAG STRING_TAG THREAD_TAG THREAD_GROUP_TAG CLASS_LOADER_TAG CLASS_OBJECT_TAG valuesCount readAndPrintlnTaggedValue TcpIpSpyMessages getString VerbosePacketStream Value_302 valuesCount readAndPrintlnUntaggedValue TcpIpSpyMessages getString VerbosePacketStream Value_302 signatureByte
protected void println String description int value print Description description print Hex value print Paranthetical value println  printDescription printHex printParanthetical
protected void println String description long value print Description description print Hex value print Paranthetical value println  printDescription printHex printParanthetical
protected void println String description String value print Description description print String Buffer val new String Buffer int pos 0 last Pos 0 while pos value index Of n last Pos 1 pos val append value substring last Pos pos val append shift last Pos pos val append value substring last Pos value length print val println  printDescription StringBuffer StringBuffer lastPos indexOf lastPos lastPos lastPos lastPos
protected void println String description boolean value print Description description println value  printDescription
protected void println Reference Type Id String description long value println description value Tcpip Spy get Reference TypeID Size  printlnReferenceTypeId TcpipSpy getReferenceTypeIDSize
protected void println Reference Type Id With Type Tag String description long value byte type Tag print Description description print Ref Type Tag Value type Tag print NON NLS 1 print Hex value Tcpip Spy get Reference TypeID Size print Paranthetical value println  printlnReferenceTypeIdWithTypeTag typeTag printDescription printRefTypeTagValue typeTag printHex TcpipSpy getReferenceTypeIDSize printParanthetical
protected void println Object Id String description long value print Description description print Hex value Tcpip Spy get ObjectID Size if value 0 println NULL NON NLS 1 else print Paranthetical value println  printlnObjectId printDescription printHex TcpipSpy getObjectIDSize printParanthetical
protected void println Tagged Object Id String description long value byte signature Byte print Description description print Signature Byte signature Byte true print print Hex value Tcpip Spy get Reference TypeID Size if value 0 println NULL NON NLS 1 else print Paranthetical value println  printlnTaggedObjectId signatureByte printDescription printSignatureByte signatureByte printHex TcpipSpy getReferenceTypeIDSize printParanthetical
protected void println Field Id String description long value println description value Tcpip Spy get FieldID Size  printlnFieldId TcpipSpy getFieldIDSize
protected void println Method Id String description long value println description value Tcpip Spy get MethodID Size  printlnMethodId TcpipSpy getMethodIDSize
protected void println Frame Id String description long value println description value Tcpip Spy get FrameID Size  printlnFrameId TcpipSpy getFrameIDSize
protected void println String description long value int size print Description description print Hex value size print Paranthetical value println  printDescription printHex printParanthetical
protected void print Description String description int width 32 description length print description write padding 0 width  printDescription
protected void print Hex String String hex int width width hex length print 0x NON NLS 1 write zeros 0 width print hex  printHexString
protected void print Hex long l int byte Number print Hex String Long to Hex String l to Upper Case byte Number 2  printHex byteNumber printHexString toHexString toUpperCase byteNumber
protected void print Hex byte b print Hex String Integer to Hex String b 0xFF to Upper Case 2  printHex printHexString toHexString toUpperCase
protected void print Hex int i print Hex String Integer to Hex String i to Upper Case 8  printHex printHexString toHexString toUpperCase
protected void print Hex long l print Hex String Long to Hex String l to Upper Case 16  printHex printHexString toHexString toUpperCase
protected void print Hex byte b if b null println NULL NON NLS 1 return int i length for i 0 length b length i length i String hexa Integer to Hex String b i to Upper Case if hexa length 1 print 0 print hexa if i 32 0 i 0 println print shift else print println  printHex toHexString toUpperCase
protected void print Paranthetical byte i print NON NLS 1 print i print  printParanthetical
protected void print Paranthetical char i print NON NLS 1 print i print  printParanthetical
protected void print Paranthetical short i print NON NLS 1 print i print  printParanthetical
protected void print Paranthetical int i print NON NLS 1 print i print  printParanthetical
protected void print Paranthetical long l print NON NLS 1 print l print  printParanthetical
protected void print Paranthetical float f print NON NLS 1 print f print  printParanthetical
protected void print Paranthetical double d print NON NLS 1 print d print  printParanthetical
protected void print Paranthetical String s print NON NLS 1 print s print  printParanthetical

Creates new Stack Frame Impl public Stack Frame Impl Virtual Machine Impl vm Impl Jdwp FrameID ID Thread Reference Impl thread Location Impl location super Stack Frame vm Impl NON NLS 1 f FrameID ID f Thread thread f Location location  StackFrameImpl StackFrameImpl VirtualMachineImpl vmImpl JdwpFrameID ThreadReferenceImpl LocationImpl StackFrame vmImpl fFrameID fThread fLocation
return Returns the Value of a Local Variable in this frame public Value get Value Local Variable variable throws Illegal Argument Exception Invalid Stack Frame Exception VM Mismatch Exception Array List list new Array List 1 list add variable return Value Impl get Values list get variable  LocalVariable getValue LocalVariable IllegalArgumentException InvalidStackFrameException VMMismatchException ArrayList ArrayList ValueImpl getValues
return Returns the values of multiple local variables in this frame public Map get Values List variables throws Illegal Argument Exception Invalid Stack Frame Exception VM Mismatch Exception Note that this information should not be cached Map map new Hash Map variables size if the variable list is empty nothing to do if variables is Empty return map If this is requested we have to use a special JDWP request Therefore we remember the positions in the list of requests for this int size All variables size int size This 0 boolean is This Value new boolean size All for int i 0 i size All i Local Variable Impl var Local Variable Impl variables get i is This Value i var is This if is This Value i size This int size Not This size All size This if size This 0 Value this Value this Object for int i 0 i size All i if is This Value i map put variables get i this Value If only this was requested we re finished if size Not This 0 return map Request values for local variables other than this init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write With Thread this out Data write Int size Not This size out Data NON NLS 1 for int i 0 i size All i if is This Value i Local Variable Impl var Local Variable Impl variables get i checkVM var write Int var slot slot out Data NON NLS 1 write Byte var tag tag JdwpID tag Map out Data NON NLS 1 Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet SF GET VALUES out Bytes default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream int nr Of Elements read Int elements reply Data NON NLS 1 if nr Of Elements size Not This throw new Internal Error JDI Messages get String Stack Frame Impl Retrieved a different number of values from the VM than requested 1 NON NLS 1 for int i 0 j 0 i size All i if is This Value i map put variables get j Value Impl read With Tag this reply Data return map catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  getValues IllegalArgumentException InvalidStackFrameException VMMismatchException HashMap isEmpty sizeAll sizeThis isThisValue sizeAll sizeAll LocalVariableImpl LocalVariableImpl isThisValue isThis isThisValue sizeThis sizeNotThis sizeAll sizeThis sizeThis thisValue thisObject sizeAll isThisValue thisValue sizeNotThis initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes writeWithThread outData writeInt sizeNotThis outData sizeAll isThisValue LocalVariableImpl LocalVariableImpl writeInt outData writeByte tagMap outData JdwpReplyPacket replyPacket JdwpCommandPacket SF_GET_VALUES outBytes defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream nrOfElements readInt replyData nrOfElements sizeNotThis InternalError JDIMessages getString StackFrameImpl Retrieved_a_different_number_of_values_from_the_VM_than_requested_1 sizeAll isThisValue ValueImpl readWithTag replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Returns the Location of the current instruction in the frame public Location location return f Location  fLocation
Sets the Value of a Local Variable in this frame public void set Value Local Variable var Value value throws Invalid Type Exception Class Not Loaded Exception Note that this information should not be cached init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes Thread Reference Impl thread write this out Data write this out Data write Int 1 size out Data We only set one field NON NLS 1 checkVM var write Int Local Variable Impl var slot slot out Data NON NLS 1 check the type and the vm of the value convert the value if needed Value Impl checked Value Value Impl check Value value var type virtual Machine Impl if checked Value null checked Value write With Tag this out Data else Value Impl write Null With Tag this out Data Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet SF SET VALUES out Bytes switch reply Packet error Code case Jdwp Reply Packet TYPE MISMATCH throw new Invalid Type Exception case Jdwp Reply Packet INVALID CLASS throw new Class Not Loaded Exception var type Name default Reply Error Handler reply Packet error Code catch IO Exception e defaultIO Exception Handler e finally handled Jdwp Request  LocalVariable setValue LocalVariable InvalidTypeException ClassNotLoadedException initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes ThreadReferenceImpl outData outData writeInt outData writeInt LocalVariableImpl outData ValueImpl checkedValue ValueImpl checkValue virtualMachineImpl checkedValue checkedValue writeWithTag outData ValueImpl writeNullWithTag outData JdwpReplyPacket replyPacket JdwpCommandPacket SF_SET_VALUES outBytes replyPacket errorCode JdwpReplyPacket TYPE_MISMATCH InvalidTypeException JdwpReplyPacket INVALID_CLASS ClassNotLoadedException typeName defaultReplyErrorHandler replyPacket errorCode IOException defaultIOExceptionHandler handledJdwpRequest
return Returns the value of this for the current frame public Object Reference this Object throws Invalid Stack Frame Exception Note that this information should not be cached init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write With Thread this out Data Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet SF THIS OBJECT out Bytes default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream Object Reference result Object Reference Impl read Object Ref With Tag this reply Data return result catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ObjectReference thisObject InvalidStackFrameException initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes writeWithThread outData JdwpReplyPacket replyPacket JdwpCommandPacket SF_THIS_OBJECT outBytes defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream ObjectReference ObjectReferenceImpl readObjectRefWithTag replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Returns the thread under which this frame s method is running public Thread Reference thread return f Thread  ThreadReference fThread
return Returns a Local Variable that matches the given name and is visible at the current frame location public Local Variable visible Variable By Name String name throws Absent Information Exception Iterator iter visible Variables iterator while iter has Next Local Variable Impl var Local Variable Impl iter next if var name equals name return var return null  LocalVariable LocalVariable visibleVariableByName AbsentInformationException visibleVariables hasNext LocalVariableImpl LocalVariableImpl
return Returns the values of multiple local variables in this frame public List visible Variables throws Absent Information Exception List variables f Location method variables Iterator iter variables iterator List visible Vars new Array List variables size while iter has Next Local Variable Impl var Local Variable Impl iter next Only return local variables other than the this pointer if var is Visible this var is This visible Vars add var return visible Vars  visibleVariables AbsentInformationException fLocation visibleVars ArrayList hasNext LocalVariableImpl LocalVariableImpl isVisible isThis visibleVars visibleVars
return Returns the hash code value public int hash Code return f Thread hash Code f FrameID hash Code  hashCode fThread hashCode fFrameID hashCode
return Returns true if two mirrors refer to the same entity in the target VM see java lang Object equals Object public boolean equals Object object return object null object get Class equals this get Class f Thread equals Stack Frame Impl object f Thread f FrameID equals Stack Frame Impl object f FrameID  getClass getClass fThread StackFrameImpl fThread fFrameID StackFrameImpl fFrameID
Writes JDWP representation public void write Mirror Impl target Data Output Stream out throws IO Exception f FrameID write out if target f Verbose Writer null target f Verbose Writer println stack Frame f FrameID value NON NLS 1  MirrorImpl DataOutputStream IOException fFrameID fVerboseWriter fVerboseWriter stackFrame fFrameID
Writes JDWP representation public void write With Thread Mirror Impl target Data Output Stream out throws IO Exception f Thread write target out write target out  writeWithThread MirrorImpl DataOutputStream IOException fThread
return Reads JDWP representation and returns new instance public static Stack Frame Impl read With Location Mirror Impl target Thread Reference Impl thread Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp FrameID ID new Jdwp FrameID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println stack Frame ID value NON NLS 1 if ID is Null return null Location Impl location Location Impl read target in if location null return null return new Stack Frame Impl vm Impl ID thread location  StackFrameImpl readWithLocation MirrorImpl ThreadReferenceImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpFrameID JdwpFrameID vmImpl fVerboseWriter fVerboseWriter stackFrame isNull LocationImpl LocationImpl StackFrameImpl vmImpl

Creates new String Reference Impl public String Reference Impl Virtual Machine Impl vm Impl Jdwp StringID stringID super String Reference vm Impl stringID NON NLS 1  StringReferenceImpl StringReferenceImpl VirtualMachineImpl vmImpl JdwpStringID StringReference vmImpl
returns Value tag public byte get Tag return tag  getTag
returns Returns the String Reference as a String public String value Note that this information should not be cached init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet SR VALUE this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream String result read String value reply Data NON NLS 1 return result catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  StringReference initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket SR_VALUE defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream readString replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Reads JDWP representation and returns new instance public static String Reference Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp StringID ID new Jdwp StringID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println string Reference ID value NON NLS 1 if ID is Null return null String Reference Impl mirror new String Reference Impl vm Impl ID return mirror  StringReferenceImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpStringID JdwpStringID vmImpl fVerboseWriter fVerboseWriter stringReference isNull StringReferenceImpl StringReferenceImpl vmImpl
return Returns description of Mirror object public String to String try return value NON NLS 1 NON NLS 2 catch Object Collected Exception e return JDI Messages get String String Reference Impl Garbage Collected  StringReference  3 id String NON NLS 1 catch Exception e return f Description  toString ObjectCollectedException JDIMessages getString StringReferenceImpl Garbage_Collected _StringReference__3 idString fDescription

Creates new Thread Group Reference Impl public Thread Group Reference Impl Virtual Machine Impl vm Impl Jdwp Thread GroupID thread GroupID super Thread Group Reference vm Impl thread GroupID NON NLS 1  ThreadGroupReferenceImpl ThreadGroupReferenceImpl VirtualMachineImpl vmImpl JdwpThreadGroupID threadGroupID ThreadGroupReference vmImpl threadGroupID
returns Value tag public byte get Tag return tag  getTag
return Returns the name of this thread group public String name if f Name null return f Name init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet TGR NAME this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f Name read String name reply Data NON NLS 1 return f Name catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  fName fName initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket TGR_NAME defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fName readString replyData fName IOException defaultIOExceptionHandler handledJdwpRequest
return Returns the parent of this thread group or null if there isn t public Thread Group Reference parent if f Parent fg Unset Parent return f Parent init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet TGR PARENT this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f Parent Thread Group Reference Impl read this reply Data return f Parent catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ThreadGroupReference fParent fgUnsetParent fParent initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket TGR_PARENT defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fParent ThreadGroupReferenceImpl replyData fParent IOException defaultIOExceptionHandler handledJdwpRequest
Resumes all threads in this thread group including subgroups public void resume Iterator iter all Threads iterator while iter has Next Thread Reference Impl thr Thread Reference Impl iter next thr resume  allThreads hasNext ThreadReferenceImpl ThreadReferenceImpl
Suspends all threads in this thread group including subgroups public void suspend Iterator iter all Threads iterator while iter has Next Thread Reference Impl thr Thread Reference Impl iter next thr suspend  allThreads hasNext ThreadReferenceImpl ThreadReferenceImpl
return Returns a List containing each Thread Reference in this thread group public Children Info children Info Note that this information should not be cached init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet TGR CHILDREN this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream Children Info result new Children Info int nr Threads read Int nr threads reply Data NON NLS 1 result child Threads new Array List nr Threads for int i 0 i nr Threads i result child Threads add Thread Reference Impl read this reply Data int nr Thread Groups read Int nr thread groups reply Data NON NLS 1 result child Thread Groups new Array List nr Thread Groups for int i 0 i nr Thread Groups i result child Threads add Thread Group Reference Impl read this reply Data return result catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ThreadReference ChildrenInfo childrenInfo initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket TGR_CHILDREN defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream ChildrenInfo ChildrenInfo nrThreads readInt replyData childThreads ArrayList nrThreads nrThreads childThreads ThreadReferenceImpl replyData nrThreadGroups readInt replyData childThreadGroups ArrayList nrThreadGroups nrThreadGroups childThreads ThreadGroupReferenceImpl replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Returns a List containing each Thread Group Reference in this thread group public List thread Groups return children Info child Thread Groups  ThreadGroupReference threadGroups childrenInfo childThreadGroups
return Returns a List containing each Thread Reference in this thread group public List threads return children Info child Threads  ThreadReference childrenInfo childThreads
return Returns a List containing each Thread Group Reference in this thread group and all of its subgroups private List all Threads Children Info info children Info List result info child Threads Iterator iter info child Thread Groups iterator while iter has Next Thread Group Reference Impl tg Thread Group Reference Impl iter next result add All tg all Threads return result  ThreadGroupReference allThreads ChildrenInfo childrenInfo childThreads childThreadGroups hasNext ThreadGroupReferenceImpl ThreadGroupReferenceImpl addAll allThreads
return Returns description of Mirror object public String to String try return name catch Exception e return f Description  toString fDescription
return Reads JDWP representation and returns new instance public static Thread Group Reference Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp Thread GroupID ID new Jdwp Thread GroupID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println thread Group Reference ID value NON NLS 1 if ID is Null return null Thread Group Reference Impl mirror Thread Group Reference Impl vm Impl get Cached Mirror ID if mirror null mirror new Thread Group Reference Impl vm Impl ID vm Impl add Cached Mirror mirror return mirror  ThreadGroupReferenceImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpThreadGroupID JdwpThreadGroupID vmImpl fVerboseWriter fVerboseWriter threadGroupReference isNull ThreadGroupReferenceImpl ThreadGroupReferenceImpl vmImpl getCachedMirror ThreadGroupReferenceImpl vmImpl vmImpl addCachedMirror

Creates new Thread Reference Impl public Thread Reference Impl Virtual Machine Impl vm Impl Jdwp ThreadID threadID super Thread Reference vm Impl threadID NON NLS 1  ThreadReferenceImpl ThreadReferenceImpl VirtualMachineImpl vmImpl JdwpThreadID ThreadReference vmImpl
Sets at breakpoint flag public void set Is At Breakpoint f Is At Breakpoint true  setIsAtBreakpoint fIsAtBreakpoint
Reset flags that can be set when event occurs public void reset Event Flags f Is At Breakpoint false  resetEventFlags fIsAtBreakpoint
returns Value tag public byte get Tag return tag  getTag
returns Returns an Object Reference for the monitor if any for which this thread is currently waiting public Object Reference current Contended Monitor throws Incompatible Thread State Exception if virtual Machine can Get Current Contended Monitor throw new Unsupported Operation Exception Note that this information should not be cached init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet TR CURRENT CONTENDED MONITOR this switch reply Packet error Code case Jdwp Reply Packet INVALID THREAD throw new Object Collected Exception case Jdwp Reply Packet THREAD NOT SUSPENDED throw new Incompatible Thread State Exception JDI Messages get String Thread Reference Impl Thread was not suspended 1 NON NLS 1 default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream Object Reference result Object Reference Impl read Object Ref With Tag this reply Data return result catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ObjectReference ObjectReference currentContendedMonitor IncompatibleThreadStateException virtualMachine canGetCurrentContendedMonitor UnsupportedOperationException initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket TR_CURRENT_CONTENDED_MONITOR replyPacket errorCode JdwpReplyPacket INVALID_THREAD ObjectCollectedException JdwpReplyPacket THREAD_NOT_SUSPENDED IncompatibleThreadStateException JDIMessages getString ThreadReferenceImpl Thread_was_not_suspended_1 defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream ObjectReference ObjectReferenceImpl readObjectRefWithTag replyData IOException defaultIOExceptionHandler handledJdwpRequest
returns Returns the Stack Frame at the given index in the thread s current call stack public Stack Frame frame int index throws Incompatible Thread State Exception return Stack Frame Impl frames index 1 get 0  StackFrame StackFrame IncompatibleThreadStateException StackFrameImpl
public int frame Count throws Incompatible Thread State Exception Note that this information should not be cached init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet TR FRAME COUNT this switch reply Packet error Code case Jdwp Reply Packet INVALID THREAD throw new Object Collected Exception case Jdwp Reply Packet THREAD NOT SUSPENDED throw new Incompatible Thread State Exception JDI Messages get String Thread Reference Impl Thread was not suspended 1 NON NLS 1 default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream int result read Int frame count reply Data NON NLS 1 return result catch IO Exception e defaultIO Exception Handler e return 0 finally handled Jdwp Request  frameCount IncompatibleThreadStateException initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket TR_FRAME_COUNT replyPacket errorCode JdwpReplyPacket INVALID_THREAD ObjectCollectedException JdwpReplyPacket THREAD_NOT_SUSPENDED IncompatibleThreadStateException JDIMessages getString ThreadReferenceImpl Thread_was_not_suspended_1 defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream readInt replyData IOException defaultIOExceptionHandler handledJdwpRequest
returns Returns a List containing each Stack Frame in the thread s current call stack public List frames throws Incompatible Thread State Exception return frames 0 1  StackFrame IncompatibleThreadStateException
returns Returns a List containing each Stack Frame in the thread s current call stack public List frames int start int length throws Index Out Of Bounds Exception Incompatible Thread State Exception Note that this information should not be cached init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write this out Data write Int start start out Data NON NLS 1 write Int length length out Data NON NLS 1 Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet TR FRAMES out Bytes switch reply Packet error Code case Jdwp Reply Packet INVALID THREAD throw new Object Collected Exception case Jdwp Reply Packet THREAD NOT SUSPENDED throw new Incompatible Thread State Exception JDI Messages get String Thread Reference Impl Thread was not suspended 1 NON NLS 1 case Jdwp Reply Packet INVALID INDEX throw new Index Out Of Bounds Exception JDI Messages get String Thread Reference Impl Invalid index of stack frames given 4 NON NLS 1 default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream int nr Of Elements read Int elements reply Data NON NLS 1 List frames new Array List nr Of Elements for int i 0 i nr Of Elements i Stack Frame Impl frame Stack Frame Impl read With Location this this reply Data if frame null continue frames add frame return frames catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  StackFrame IndexOutOfBoundsException IncompatibleThreadStateException initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes outData writeInt outData writeInt outData JdwpReplyPacket replyPacket JdwpCommandPacket TR_FRAMES outBytes replyPacket errorCode JdwpReplyPacket INVALID_THREAD ObjectCollectedException JdwpReplyPacket THREAD_NOT_SUSPENDED IncompatibleThreadStateException JDIMessages getString ThreadReferenceImpl Thread_was_not_suspended_1 JdwpReplyPacket INVALID_INDEX IndexOutOfBoundsException JDIMessages getString ThreadReferenceImpl Invalid_index_of_stack_frames_given_4 defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream nrOfElements readInt replyData ArrayList nrOfElements nrOfElements StackFrameImpl StackFrameImpl readWithLocation replyData IOException defaultIOExceptionHandler handledJdwpRequest
Interrupts this thread public void interrupt Note that this information should not be cached init Jdwp Request try requestVM Jdwp Command Packet TR INTERRUPT this finally handled Jdwp Request  initJdwpRequest JdwpCommandPacket TR_INTERRUPT handledJdwpRequest
return Returns whether the thread is suspended at a breakpoint public boolean is At Breakpoint return is Suspended f Is At Breakpoint  isAtBreakpoint isSuspended fIsAtBreakpoint
return Returns whether the thread has been suspended by the the debugger public boolean is Suspended Note that this information should not be cached init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet TR STATUS this switch reply Packet error Code case Jdwp Reply Packet INVALID THREAD throw new Object Collected Exception default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream remove the thread status reply read Int thread status thread Status Map reply Data NON NLS 1 int suspend Status read Int suspend status suspend Status Strings reply Data NON NLS 1 boolean result suspend Status SUSPEND STATUS SUSPENDED return result catch IO Exception e defaultIO Exception Handler e return false finally handled Jdwp Request  isSuspended initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket TR_STATUS replyPacket errorCode JdwpReplyPacket INVALID_THREAD ObjectCollectedException defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream readInt threadStatusMap replyData suspendStatus readInt suspendStatusStrings replyData suspendStatus SUSPEND_STATUS_SUSPENDED IOException defaultIOExceptionHandler handledJdwpRequest
return Returns the name of this thread public String name init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet TR NAME this switch reply Packet error Code case Jdwp Reply Packet INVALID THREAD throw new Object Collected Exception default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream return read String name reply Data NON NLS 1 catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket TR_NAME replyPacket errorCode JdwpReplyPacket INVALID_THREAD ObjectCollectedException defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream readString replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Returns a List containing an Object Reference for each monitor owned by the thread public List owned Monitors throws Incompatible Thread State Exception if virtual Machine can Get Owned Monitor Info throw new Unsupported Operation Exception Note that this information should not be cached init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet TR OWNED MONITORS this switch reply Packet error Code case Jdwp Reply Packet INVALID THREAD throw new Object Collected Exception case Jdwp Reply Packet THREAD NOT SUSPENDED throw new Incompatible Thread State Exception JDI Messages get String Thread Reference Impl Thread was not suspended 5 NON NLS 1 default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream int nr Of Monitors read Int nr of monitors reply Data NON NLS 1 List result new Array List nr Of Monitors for int i 0 i nr Of Monitors i result add Object Reference Impl read Object Ref With Tag this reply Data return result catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ObjectReference ownedMonitors IncompatibleThreadStateException virtualMachine canGetOwnedMonitorInfo UnsupportedOperationException initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket TR_OWNED_MONITORS replyPacket errorCode JdwpReplyPacket INVALID_THREAD ObjectCollectedException JdwpReplyPacket THREAD_NOT_SUSPENDED IncompatibleThreadStateException JDIMessages getString ThreadReferenceImpl Thread_was_not_suspended_5 defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream nrOfMonitors readInt replyData ArrayList nrOfMonitors nrOfMonitors ObjectReferenceImpl readObjectRefWithTag replyData IOException defaultIOExceptionHandler handledJdwpRequest
Resumes this thread public void resume init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet TR RESUME this switch reply Packet error Code case Jdwp Reply Packet INVALID THREAD throw new Object Collected Exception default Reply Error Handler reply Packet error Code reset Event Flags finally handled Jdwp Request  initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket TR_RESUME replyPacket errorCode JdwpReplyPacket INVALID_THREAD ObjectCollectedException defaultReplyErrorHandler replyPacket errorCode resetEventFlags handledJdwpRequest
return Returns the thread s status public int status Note that this information should not be cached init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet TR STATUS this switch reply Packet error Code case Jdwp Reply Packet ABSENT INFORMATION return THREAD STATUS UNKNOWN case Jdwp Reply Packet INVALID THREAD return THREAD STATUS NOT STARTED default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream int thread Status read Int thread status thread Status Map reply Data NON NLS 1 read Int suspend status suspend Status Strings reply Data NON NLS 1 switch thread Status case JDWP THREAD STATUS ZOMBIE return THREAD STATUS ZOMBIE case JDWP THREAD STATUS RUNNING return THREAD STATUS RUNNING case JDWP THREAD STATUS SLEEPING return THREAD STATUS SLEEPING case JDWP THREAD STATUS MONITOR return THREAD STATUS MONITOR case JDWP THREAD STATUS WAIT return THREAD STATUS WAIT case 1 see bug 30816 return THREAD STATUS UNKNOWN throw new Internal Exception JDI Messages get String Thread Reference Impl Unknown thread status received   6 thread Status NON NLS 1 catch IO Exception e defaultIO Exception Handler e return 0 finally handled Jdwp Request  initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket TR_STATUS replyPacket errorCode JdwpReplyPacket ABSENT_INFORMATION THREAD_STATUS_UNKNOWN JdwpReplyPacket INVALID_THREAD THREAD_STATUS_NOT_STARTED defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream threadStatus readInt threadStatusMap replyData readInt suspendStatusStrings replyData threadStatus JDWP_THREAD_STATUS_ZOMBIE THREAD_STATUS_ZOMBIE JDWP_THREAD_STATUS_RUNNING THREAD_STATUS_RUNNING JDWP_THREAD_STATUS_SLEEPING THREAD_STATUS_SLEEPING JDWP_THREAD_STATUS_MONITOR THREAD_STATUS_MONITOR JDWP_THREAD_STATUS_WAIT THREAD_STATUS_WAIT THREAD_STATUS_UNKNOWN InternalException JDIMessages getString ThreadReferenceImpl Unknown_thread_status_received___6 threadStatus IOException defaultIOExceptionHandler handledJdwpRequest
Stops this thread with an asynchronous exception public void stop Object Reference throwable throws Invalid Type Exception checkVM throwable Object Reference Impl throwable Impl Object Reference Impl throwable init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write this out Data throwable Impl write this out Data Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet TR STOP out Bytes switch reply Packet error Code case Jdwp Reply Packet INVALID THREAD throw new Object Collected Exception case Jdwp Reply Packet INVALID CLASS throw new Invalid Type Exception JDI Messages get String Thread Reference Impl Stop argument not an instance of java lang Throwable in the target VM 7 NON NLS 1 default Reply Error Handler reply Packet error Code catch IO Exception e defaultIO Exception Handler e finally handled Jdwp Request  ObjectReference InvalidTypeException ObjectReferenceImpl throwableImpl ObjectReferenceImpl initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes outData throwableImpl outData JdwpReplyPacket replyPacket JdwpCommandPacket TR_STOP outBytes replyPacket errorCode JdwpReplyPacket INVALID_THREAD ObjectCollectedException JdwpReplyPacket INVALID_CLASS InvalidTypeException JDIMessages getString ThreadReferenceImpl Stop_argument_not_an_instance_of_java Throwable_in_the_target_VM_7 defaultReplyErrorHandler replyPacket errorCode IOException defaultIOExceptionHandler handledJdwpRequest
Suspends this thread public void suspend init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet TR SUSPEND this switch reply Packet error Code case Jdwp Reply Packet INVALID THREAD throw new Object Collected Exception default Reply Error Handler reply Packet error Code finally handled Jdwp Request  initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket TR_SUSPEND replyPacket errorCode JdwpReplyPacket INVALID_THREAD ObjectCollectedException defaultReplyErrorHandler replyPacket errorCode handledJdwpRequest
return Returns the number of pending suspends for this thread public int suspend Count Note that this information should not be cached init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet TR SUSPEND COUNT this default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream int result read Int suspend count reply Data NON NLS 1 return result catch IO Exception e defaultIO Exception Handler e return 0 finally handled Jdwp Request  suspendCount initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket TR_SUSPEND_COUNT defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream readInt replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Returns this thread s thread group public Thread Group Reference thread Group if f Thread Group null return f Thread Group init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet TR THREAD GROUP this switch reply Packet error Code case Jdwp Reply Packet INVALID THREAD throw new Object Collected Exception default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f Thread Group Thread Group Reference Impl read this reply Data return f Thread Group catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ThreadGroupReference threadGroup fThreadGroup fThreadGroup initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket TR_THREAD_GROUP replyPacket errorCode JdwpReplyPacket INVALID_THREAD ObjectCollectedException defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fThreadGroup ThreadGroupReferenceImpl replyData fThreadGroup IOException defaultIOExceptionHandler handledJdwpRequest
Simulate the execution of a return instruction instead of executing the next bytecode in a method return Returns whether any finally or synchronized blocks are enclosing the current instruction public boolean do Return Value return Value boolean trigger Finally And Synchronized throws org eclipse jdi hcr Operation Refused Exception virtual Machine Impl checkHCR Supported Value Impl value Impl if return Value null null is used if no value is returned checkVM return Value value Impl Value Impl return Value else try Type Impl return Type Type Impl frame 0 location method return Type value Impl Value Impl return Type create Null Value catch Incompatible Thread State Exception e throw new org eclipse jdi hcr Operation Refused Exception e to String catch Class Not Loaded Exception e throw new org eclipse jdi hcr Operation Refused Exception e to String Note that this information should not be cached init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write this out Data value Impl write With Tag this out Data write Boolean trigger Finally And Synchronized trigger finaly sync out Data NON NLS 1 Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet HCR DO RETURN out Bytes switch reply Packet error Code case Jdwp Reply Packet INVALID THREAD throw new Object Collected Exception default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream boolean result read Boolean is enclosed reply Data NON NLS 1 return result catch IO Exception e defaultIO Exception Handler e return false finally handled Jdwp Request  doReturn returnValue triggerFinallyAndSynchronized OperationRefusedException virtualMachineImpl checkHCRSupported ValueImpl valueImpl returnValue returnValue valueImpl ValueImpl returnValue TypeImpl returnType TypeImpl returnType valueImpl ValueImpl returnType createNullValue IncompatibleThreadStateException OperationRefusedException toString ClassNotLoadedException OperationRefusedException toString initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes outData valueImpl writeWithTag outData writeBoolean triggerFinallyAndSynchronized outData JdwpReplyPacket replyPacket JdwpCommandPacket HCR_DO_RETURN outBytes replyPacket errorCode JdwpReplyPacket INVALID_THREAD ObjectCollectedException defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream readBoolean replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Returns description of Mirror object public String to String try return Message Format format JDI Messages get String Thread Reference Impl 8 new String type to String name get ObjectID to String NON NLS 1 catch Object Collected Exception e return JDI Messages get String Thread Reference Impl Garbage Collected  ThreadReference  9 id String NON NLS 1 catch Exception e return f Description  toString MessageFormat JDIMessages getString ThreadReferenceImpl toString getObjectID toString ObjectCollectedException JDIMessages getString ThreadReferenceImpl Garbage_Collected _ThreadReference__9 idString fDescription
return Reads JDWP representation and returns new instance public static Thread Reference Impl read Mirror Impl target Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl Jdwp ThreadID ID new Jdwp ThreadID vm Impl ID read in if target f Verbose Writer null target f Verbose Writer println thread Reference ID value NON NLS 1 if ID is Null return null Thread Reference Impl mirror Thread Reference Impl vm Impl get Cached Mirror ID if mirror null mirror new Thread Reference Impl vm Impl ID vm Impl add Cached Mirror mirror return mirror  ThreadReferenceImpl MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl JdwpThreadID JdwpThreadID vmImpl fVerboseWriter fVerboseWriter threadReference isNull ThreadReferenceImpl ThreadReferenceImpl vmImpl getCachedMirror ThreadReferenceImpl vmImpl vmImpl addCachedMirror
Retrieves constant mappings public static void get Constant Maps if fg Thread Status Map null return Field fields Thread Reference Impl class get Declared Fields fg Thread Status Map new Hash Map fg Suspend Status Strings new String 32 Int for int i 0 i fields length i Field field fields i if field get Modifiers Modifier PUBLIC 0 field get Modifiers Modifier STATIC 0 field get Modifiers Modifier FINAL 0 continue try String name field get Name int value field get Int null Integer int Value new Integer value if name starts With JDWP THREAD STATUS  NON NLS 1 name name substring 19 fg Thread Status Map put int Value name else if name starts With SUSPEND STATUS  NON NLS 1 name name substring 15 for int j 0 j fg Suspend Status Strings length j if 1 j value 0 fg Suspend Status Strings j name break catch Illegal Access Exception e Will not occur for own class catch Illegal Argument Exception e Should not occur We should take care that all public static final constants in this class are numbers that are convertible to int  getConstantMaps fgThreadStatusMap ThreadReferenceImpl getDeclaredFields fgThreadStatusMap HashMap fgSuspendStatusStrings getModifiers getModifiers getModifiers getName getInt intValue startsWith JDWP_THREAD_STATUS_ fgThreadStatusMap intValue startsWith SUSPEND_STATUS_ fgSuspendStatusStrings fgSuspendStatusStrings IllegalAccessException IllegalArgumentException
return Returns a map with string representations of tags public static Map thread Status Map get Constant Maps return fg Thread Status Map  threadStatusMap getConstantMaps fgThreadStatusMap
return Returns a map with string representations of tags public static String suspend Status Strings get Constant Maps return fg Suspend Status Strings  suspendStatusStrings getConstantMaps fgSuspendStatusStrings
see Thread Reference pop Frames Stack Frame public void pop Frames Stack Frame frame To Pop throws Incompatible Thread State Exception if is Suspended throw new Incompatible Thread State Exception if virtual Machine Impl can Pop Frames throw new Unsupported Operation Exception Stack Frame Impl frame Stack Frame Impl frame To Pop init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes frame write With Thread frame out Data Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet SF POP FRAME out Bytes switch reply Packet error Code case Jdwp Reply Packet INVALID THREAD throw new Invalid Stack Frame Exception case Jdwp Reply Packet INVALID FRAMEID throw new Invalid Stack Frame Exception JDI Messages get String Thread Reference Impl Unable to pop the requested stack frame from the call stack  Reasons include  The frame id was invalid  The thread was resumed  10 NON NLS 1 case Jdwp Reply Packet THREAD NOT SUSPENDED throw new Incompatible Thread State Exception JDI Messages get String Thread Reference Impl Unable to pop the requested stack frame  The requested stack frame is not suspended 11 NON NLS 1 case Jdwp Reply Packet NO MORE FRAMES throw new Invalid Stack Frame Exception JDI Messages get String Thread Reference Impl Unable to pop the requested stack frame from the call stack  Reasons include  The requested frame was the last frame on the call stack  The requested frame was the last frame above a native frame  12 NON NLS 1 default default Reply Error Handler reply Packet error Code catch IO Exception ioe defaultIO Exception Handler ioe finally handled Jdwp Request  ThreadReference popFrames StackFrame popFrames StackFrame frameToPop IncompatibleThreadStateException isSuspended IncompatibleThreadStateException virtualMachineImpl canPopFrames UnsupportedOperationException StackFrameImpl StackFrameImpl frameToPop initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes writeWithThread outData JdwpReplyPacket replyPacket JdwpCommandPacket SF_POP_FRAME outBytes replyPacket errorCode JdwpReplyPacket INVALID_THREAD InvalidStackFrameException JdwpReplyPacket INVALID_FRAMEID InvalidStackFrameException JDIMessages getString ThreadReferenceImpl Unable_to_pop_the_requested_stack_frame_from_the_call_stack_ Reasons_include__The_frame_id_was_invalid _The_thread_was_resumed _10 JdwpReplyPacket THREAD_NOT_SUSPENDED IncompatibleThreadStateException JDIMessages getString ThreadReferenceImpl Unable_to_pop_the_requested_stack_frame _The_requested_stack_frame_is_not_suspended_11 JdwpReplyPacket NO_MORE_FRAMES InvalidStackFrameException JDIMessages getString ThreadReferenceImpl Unable_to_pop_the_requested_stack_frame_from_the_call_stack_ Reasons_include__The_requested_frame_was_the_last_frame_on_the_call_stack _The_requested_frame_was_the_last_frame_above_a_native_frame _12 defaultReplyErrorHandler replyPacket errorCode IOException defaultIOExceptionHandler handledJdwpRequest

Creates new instance public Type Component Impl String description Virtual Machine Impl vm Impl Reference Type Impl declaring Type String name String signature String generic Signature int modifier Bits super description vm Impl f Name name f Signature signature f Generic Signature generic Signature f Declaring Type declaring Type f Modifier Bits modifier Bits  TypeComponentImpl VirtualMachineImpl vmImpl ReferenceTypeImpl declaringType genericSignature modifierBits vmImpl fName fSignature fGenericSignature genericSignature fDeclaringType declaringType fModifierBits modifierBits
return Returns modifier bits public int modifiers return f Modifier Bits  fModifierBits
return Returns the Reference Type Impl in which this component was declared public Reference Type Impl reference Type Impl return f Declaring Type  ReferenceTypeImpl ReferenceTypeImpl referenceTypeImpl fDeclaringType
return Returns the type in which this component was declared public Reference Type declaring Type return f Declaring Type  ReferenceType declaringType fDeclaringType
return Returns true if type component is final public boolean is Final return f Modifier Bits MODIFIER ACC FINAL 0  isFinal fModifierBits MODIFIER_ACC_FINAL
return Returns true if type component is static public boolean is Static return f Modifier Bits MODIFIER ACC STATIC 0  isStatic fModifierBits MODIFIER_ACC_STATIC
return Returns true if type component is synthetic public boolean is Synthetic return f Modifier Bits MODIFIER SYNTHETIC MODIFIER ACC SYNTHETIC 0  isSynthetic fModifierBits MODIFIER_SYNTHETIC MODIFIER_ACC_SYNTHETIC
return Returns text representation of this type public String name return f Name  fName
return JNI style signature for this type public String signature return f Signature  fSignature
return Returns description of Mirror object public String to String return f Name  toString fName
public String generic Signature return f Generic Signature  genericSignature fGenericSignature

Creates new instance used for REFERENCE types protected Type Impl String description Virtual Machine Impl vm Impl super description vm Impl  TypeImpl VirtualMachineImpl vmImpl vmImpl
Creates new instance used for PRIMITIVE types or VOID protected Type Impl String description Virtual Machine Impl vm Impl String name String signature super description vm Impl set Name name set Signature signature  TypeImpl VirtualMachineImpl vmImpl vmImpl setName setSignature
return Returns new instance based on signature and if it is a Reference Type class Loader throws Class Not Loaded Exception when type is a Reference Type and it has not been loaded by the specified class loader public static Type Impl create Virtual Machine Impl vm Impl String signature Class Loader Reference class Loader throws Class Not Loaded Exception For void values a Void Type is always returned if Generic Signature is Void Signature signature return new Void Type Impl vm Impl For primitive variables an appropriate Primitive Type is always returned if Generic Signature is Primitive Signature signature return Primitive Type Impl create vm Impl signature For object variables the appropriate Reference Type is returned if it has been loaded through the enclosing type s class loader return Reference Type Impl create vm Impl signature class Loader  ReferenceType classLoader ClassNotLoadedException ReferenceType TypeImpl VirtualMachineImpl vmImpl ClassLoaderReference classLoader ClassNotLoadedException VoidType GenericSignature isVoidSignature VoidTypeImpl vmImpl PrimitiveType GenericSignature isPrimitiveSignature PrimitiveTypeImpl vmImpl ReferenceType ReferenceTypeImpl vmImpl classLoader
Assigns name public void set Name String name f Name name  setName fName
Assigns signature public void set Signature String signature f Signature signature  setSignature fSignature
return Returns description of Mirror object public String to String try return name catch Class Not Prepared Exception e return JDI Messages get String Type Impl Unloaded Type  1 NON NLS 1 catch Exception e return f Description  toString ClassNotPreparedException JDIMessages getString TypeImpl Unloaded_Type _1 fDescription
return Create a null value instance of the type public abstract Value create Null Value  createNullValue
return Returns text representation of this type public String name return f Name  fName
return JNI style signature for this type public String signature return f Signature  fSignature
return Returns modifier bits public abstract int modifiers 
Converts a class name to a JNI signature public static String class Name To Signature String qualified Name L classname fully qualified class JNI signature examples int I long J java lang String Ljava lang String java lang String Ljava lang String String Buffer signature new String Buffer int first Brace qualified Name index Of if first Brace 0 Not an array type Must be class type signature append L signature append qualified Name replace signature append return signature to String int index 0 while index qualified Name index Of index 1 0 signature append String name qualified Name substring 0 first Brace switch name char At 0 Check for primitive array type case b if name equals byte NON NLS 1 signature append B return signature to String else if name equals boolean NON NLS 1 signature append Z return signature to String break case i if name equals int NON NLS 1 signature append I return signature to String break case d if name equals double NON NLS 1 signature append D return signature to String break case s if name equals short NON NLS 1 signature append S return signature to String break case c if name equals char NON NLS 1 signature append C return signature to String break case l if name equals long NON NLS 1 signature append J return signature to String break case f if name equals float NON NLS 1 signature append F return signature to String break Class type array signature append L signature append name replace signature append return signature to String  classNameToSignature qualifiedName StringBuffer StringBuffer firstBrace qualifiedName indexOf firstBrace qualifiedName toString qualifiedName indexOf qualifiedName firstBrace charAt toString toString toString toString toString toString toString toString toString
returns Returns Jdwp Tag converted from a JNI signature public static byte signature To Tag String signature switch signature char At 0 case Z return Boolean Value Impl tag case B return Byte Value Impl tag case C return Char Value Impl tag case S return Short Value Impl tag case I return Integer Value Impl tag case J return Long Value Impl tag case F return Float Value Impl tag case D return Double Value Impl tag case V return Void Value Impl tag case L return Object Reference Impl tag case return Array Reference Impl tag case throw new Internal Error JDI Messages get String Type Impl Can  t covert method signature to tag   9 signature NON NLS 1 throw new Internal Error JDI Messages get String Type Impl Invalid signature    10 signature JDI Messages get String Type Impl   11 NON NLS 1 NON NLS 2  signatureToTag charAt BooleanValueImpl ByteValueImpl CharValueImpl ShortValueImpl IntegerValueImpl LongValueImpl FloatValueImpl DoubleValueImpl VoidValueImpl ObjectReferenceImpl ArrayReferenceImpl InternalError JDIMessages getString TypeImpl Can__t_covert_method_signature_to_tag___9 InternalError JDIMessages getString TypeImpl Invalid_signature____10 JDIMessages getString TypeImpl __11

Clean up all entries from the table for which the values were garbage collected private void cleanup Reference ref while ref ref Queue poll null Object key ref Table get ref if key null cache Table remove key ref Table remove ref  refQueue refTable cacheTable refTable
Put a new entry in the cache under the given key public void put Object key Object value cleanup Soft Reference ref new Soft Reference value ref Queue cache Table put key ref ref Table put ref key  SoftReference SoftReference refQueue cacheTable refTable
Get entry from the cache return Returns value that is cached under the given key or null of one of the following is true The value has not been cached The value had been cached but is garbage collected public Object get Object key cleanup Object value null Soft Reference ref Soft Reference cache Table get key if ref null value ref get return value  SoftReference SoftReference cacheTable
Returns a Collection view of the values contained in this cache public Collection values cleanup List return Values new Array List synchronized cache Table Iterator iter cache Table values iterator Soft Reference ref Object value while iter has Next ref Soft Reference iter next value ref get if value null return Values add value return return Values  returnValues ArrayList cacheTable cacheTable SoftReference hasNext SoftReference returnValues returnValues
Returns a Collection view of the values contained in this cache that have the same runtime class as the given Class public Collection values With Type Class type cleanup List return Values new Array List synchronized cache Table Iterator iter cache Table values iterator Soft Reference ref Object value while iter has Next ref Soft Reference iter next value ref get if value null value get Class equals type return Values add value return return Values  valuesWithType returnValues ArrayList cacheTable cacheTable SoftReference hasNext SoftReference getClass returnValues returnValues
Removes the key and its corresponding value from this cache return Returns The value to which the key had been mapped in this hashtable or null if the key did not have a mapping public Object remove Object key cleanup Object value null Soft Reference ref Soft Reference cache Table get key if ref null value ref get ref Table remove ref cache Table remove key return value  SoftReference SoftReference cacheTable refTable cacheTable

public abstract class Value Impl extends Mirror Impl implements Value Creates new Value Impl protected Value Impl String description Virtual Machine Impl vm Impl super description vm Impl  ValueImpl MirrorImpl ValueImpl ValueImpl VirtualMachineImpl vmImpl vmImpl
returns type of value public abstract Type type 
public abstract Type type returns type of value public abstract byte get Tag  getTag
return Reads JDWP representation and returns new instance public static Value Impl read With Tag Mirror Impl target Data Input Stream in throws IO Exception byte tag target read Byte object tag JdwpID tag Map in NON NLS 1 return read Without Tag target tag in  ValueImpl readWithTag MirrorImpl DataInputStream IOException readByte tagMap readWithoutTag
return Reads JDWP representation and returns new instance public static Value Impl read Without Tag Mirror Impl target int type Data Input Stream in throws IO Exception Virtual Machine Impl vm Impl target virtual Machine Impl See also Array Reference Impl switch type case Array Reference Impl tag return Array Reference Impl read target in case Class Loader Reference Impl tag return Class Loader Reference Impl read target in case Class Object Reference Impl tag return Class Object Reference Impl read target in case String Reference Impl tag return String Reference Impl read target in case Object Reference Impl tag return Object Reference Impl read Object Ref Without Tag target in case Thread Group Reference Impl tag return Thread Group Reference Impl read target in case Thread Reference Impl tag return Thread Reference Impl read target in case Boolean Value Impl tag return Boolean Value Impl read target in case Byte Value Impl tag return Byte Value Impl read target in case Char Value Impl tag return Char Value Impl read target in case Double Value Impl tag return Double Value Impl read target in case Float Value Impl tag return Float Value Impl read target in case Integer Value Impl tag return Integer Value Impl read target in case Long Value Impl tag return Long Value Impl read target in case Short Value Impl tag return Short Value Impl read target in case Void Value Impl tag return new Void Value Impl vm Impl case 0 return null default throw new Internal Exception JDI Messages get String Value Impl Invalid Value tag encountered   1 type NON NLS 1  ValueImpl readWithoutTag MirrorImpl DataInputStream IOException VirtualMachineImpl vmImpl virtualMachineImpl ArrayReference ArrayReferenceImpl ArrayReferenceImpl ClassLoaderReferenceImpl ClassLoaderReferenceImpl ClassObjectReferenceImpl ClassObjectReferenceImpl StringReferenceImpl StringReferenceImpl ObjectReferenceImpl ObjectReferenceImpl readObjectRefWithoutTag ThreadGroupReferenceImpl ThreadGroupReferenceImpl ThreadReferenceImpl ThreadReferenceImpl BooleanValueImpl BooleanValueImpl ByteValueImpl ByteValueImpl CharValueImpl CharValueImpl DoubleValueImpl DoubleValueImpl FloatValueImpl FloatValueImpl IntegerValueImpl IntegerValueImpl LongValueImpl LongValueImpl ShortValueImpl ShortValueImpl VoidValueImpl VoidValueImpl vmImpl InternalException JDIMessages getString ValueImpl Invalid_Value_tag_encountered___1
Writes value with value tag public void write With Tag Mirror Impl target Data Output Stream out throws IO Exception target write Byte get Tag tag JdwpID tag Map out NON NLS 1 write target out  writeWithTag MirrorImpl DataOutputStream IOException writeByte getTag tagMap
Writes value without value tag public abstract void write Mirror Impl target Data Output Stream out throws IO Exception  MirrorImpl DataOutputStream IOException
Writes null value without value tag public static void write Null Mirror Impl target Data Output Stream out throws IO Exception Jdwp ObjectID nullID new Jdwp ObjectID target virtual Machine Impl nullID write out if target f Verbose Writer null target f Verbose Writer println object Reference nullID value NON NLS 1  writeNull MirrorImpl DataOutputStream IOException JdwpObjectID JdwpObjectID virtualMachineImpl fVerboseWriter fVerboseWriter objectReference
Writes null value with value tag public static void write Null With Tag Mirror Impl target Data Output Stream out throws IO Exception target write Byte Object Reference Impl tag tag JdwpID tag Map out NON NLS 1 write Null target out  writeNullWithTag MirrorImpl DataOutputStream IOException writeByte ObjectReferenceImpl tagMap writeNull
Check the type and the vm of each values according to the associated type For primitive values convert the value for match the given type if needed The two list must have the same size return the converted values see check Value Value Type Virtual Machine Impl protected static List check Values List values List types Virtual Machine Impl vm throws Invalid Type Exception List result new Array List values size Iterator iter Values values iterator Iterator iter Types types iterator while iter Values has Next Value value Value iter Values next Type type Type iter Types next result add check Value value type vm return result  checkValue VirtualMachineImpl checkValues VirtualMachineImpl InvalidTypeException ArrayList iterValues iterTypes iterValues hasNext iterValues iterTypes checkValue
Check the type and the vm of the given value In case of primitive value the value is converted if needed return the converted value throws Invalid Type Exception if the value and the type are not both primitive or not primitive or in case of primitive if the given value is no assignment compatible with the given type see check Primitive Value Primitive Value Impl Primitive Type Impl Primitive Type Impl protected static Value Impl check Value Value value Type type Virtual Machine Impl vm throws Invalid Type Exception if value null if type instanceof Primitive Type throw new Invalid Type Exception JDI Messages get String Value Impl Type of the value not compatible with the expected type  1 NON NLS 1 return null else vm checkVM value Type Impl value Type Type Impl value type if type instanceof Primitive Type value Type instanceof Primitive Type throw new Invalid Type Exception JDI Messages get String Value Impl Type of the value not compatible with the expected type  1 NON NLS 1 if type instanceof Primitive Type return check Primitive Value Primitive Value Impl value Primitive Type Impl value Type Primitive Type Impl type else return Value Impl value  InvalidTypeException checkPrimitiveValue PrimitiveValueImpl PrimitiveTypeImpl PrimitiveTypeImpl ValueImpl checkValue VirtualMachineImpl InvalidTypeException PrimitiveType InvalidTypeException JDIMessages getString ValueImpl Type_of_the_value_not_compatible_with_the_expected_type _1 TypeImpl valueType TypeImpl PrimitiveType valueType PrimitiveType InvalidTypeException JDIMessages getString ValueImpl Type_of_the_value_not_compatible_with_the_expected_type _1 PrimitiveType checkPrimitiveValue PrimitiveValueImpl PrimitiveTypeImpl valueType PrimitiveTypeImpl ValueImpl
Check the type of the given value and convert the value to the given type if needed see Java Language Spec section 5 2 return the converted value throws Invalid Type Exception if the given value is no assignment compatible with the given type protected static Value Impl check Primitive Value Primitive Value Impl value Primitive Type Impl value Type Primitive Type Impl type throws Invalid Type Exception char value Type Signature value Type signature char At 0 char type Signature type signature char At 0 if value Type Signature type Signature return value Virtual Machine Impl vm value virtual Machine Impl switch type Signature case D if value Type Signature Z return new Double Value Impl vm new Double value double Value break case F if value Type Signature Z value Type Signature D return new Float Value Impl vm new Float value float Value break case J if value Type Signature Z value Type Signature D value Type Signature F return new Long Value Impl vm new Long value long Value break case I if value Type Signature B value Type Signature C value Type Signature S return new Integer Value Impl vm new Integer value int Value break case S if value Type Signature B return new Short Value Impl vm new Short value short Value break throw new Invalid Type Exception JDI Messages get String Value Impl Type of the value not compatible with the expected type  1 NON NLS 1  InvalidTypeException ValueImpl checkPrimitiveValue PrimitiveValueImpl PrimitiveTypeImpl valueType PrimitiveTypeImpl InvalidTypeException valueTypeSignature valueType charAt typeSignature charAt valueTypeSignature typeSignature VirtualMachineImpl virtualMachineImpl typeSignature valueTypeSignature DoubleValueImpl doubleValue valueTypeSignature valueTypeSignature FloatValueImpl floatValue valueTypeSignature valueTypeSignature valueTypeSignature LongValueImpl longValue valueTypeSignature valueTypeSignature valueTypeSignature IntegerValueImpl intValue valueTypeSignature ShortValueImpl shortValue InvalidTypeException JDIMessages getString ValueImpl Type_of_the_value_not_compatible_with_the_expected_type _1

Creates new Verbose Writer that writes to the given Print Writer Output is buffered and previous entries in the buffer can be rewritten public Verbose Writer Print Writer out f Output out f Line Buffer new Array List f Position 0 f Line Buffer add new String Buffer  VerboseWriter PrintWriter VerboseWriter PrintWriter fOutput fLineBuffer ArrayList fPosition fLineBuffer StringBuffer
Terminate the current line by writing the line separator string If autoflush is set and there are extra vebose lines caused by print Hex these lines are also printed public void println while f Extra Verbose Lines 0 f Extra Verbose Lines mark Ln mark Ln  printHex fExtraVerboseLines fExtraVerboseLines markLn markLn
Prints verbose line public void println String description byte value print Description description print Hex value println  printDescription printHex
Prints verbose line public void println String description short value print Description description print Hex value println  printDescription printHex
Prints verbose line public void println String description int value print Description description print Hex value println  printDescription printHex
Prints verbose line public void println String description long value print Description description print Hex value println  printDescription printHex
Prints verbose line public void println String description byte value Map value To String print Description description print Hex value print Value value value To String println  valueToString printDescription printHex printValue valueToString
Prints verbose line public void println String description short value Map value To String print Description description print Hex value print Value value value To String println  valueToString printDescription printHex printValue valueToString
Prints verbose line public void println String description int value Map value To String print Description description print Hex value print Value value value To String println  valueToString printDescription printHex printValue valueToString
Prints verbose line public void println String description byte value String bit Names print Description description print Hex value print Value value bit Names println  bitNames printDescription printHex printValue bitNames
Prints verbose line public void println String description short value String bit Names print Description description print Hex value print Value value bit Names println  bitNames printDescription printHex printValue bitNames
Prints verbose line public void println String description int value String bit Names print Description description print Hex value print Value value bit Names println  bitNames printDescription printHex printValue bitNames
Prints verbose line public void println String description String value print Description description print Hex value print value println  printDescription printHex
Prints verbose line public void println String description boolean value print Description description print Hex value print new Boolean value to String println  printDescription printHex toString
Prints verbose line public void println String description char value print Description description print Hex value print value println  printDescription printHex
Prints verbose line public void println String description double value print Description description print Hex value print new Double value to String println  printDescription printHex toString
Prints verbose line public void println String description float value print Description description print Hex value print new Float value to String println  printDescription printHex toString
Prints verbose line public void println String description byte value print Description description print Hex value println  printDescription printHex
Prints string with right size public void print Width String str int width print str int spaces width str length if spaces 0 for int i 0 i spaces i print  printWidth
Prints description string with right size plus its seperator spaces public void print Description String str print Width str VERBOSE DESCRIPTION LENGTH  printDescription printWidth VERBOSE_DESCRIPTION_LENGTH
Prints hex substitution string with right size plus its seperator spaces public void print Hex Substitution String str Note that bytes also start with a space print print Width str VERBOSE HEX WIDTH 1  printHexSubstitution printWidth VERBOSE_HEX_WIDTH
Appends hex representation of given byte to an array private static void append Hex Byte byte b char buffer int pos int count 2 int abspos 3 pos buffer abspos do int t b 15 if t 9 t t 10 a else t 0 buffer count abspos char t b 4 while count 0  appendHexByte
Appends remaining spaces to hex dump private static void append Hex Spaces char buffer int pos for int i 3 pos i VERBOSE HEX WIDTH 3 i 3 buffer i buffer i 1 buffer i 2 Two extra spaces as seperator buffer VERBOSE HEX WIDTH 1 buffer VERBOSE HEX WIDTH 2  appendHexSpaces VERBOSE_HEX_WIDTH VERBOSE_HEX_WIDTH VERBOSE_HEX_WIDTH
Prints hex representation of a byte public void print Hex byte b char buffer new char VERBOSE HEX WIDTH append Hex Byte b buffer 0 append Hex Spaces buffer 1 print buffer  printHex VERBOSE_HEX_WIDTH appendHexByte appendHexSpaces
Prints hex representation of an int public void print Hex short s char buffer new char VERBOSE HEX WIDTH for int i 1 i 0 i append Hex Byte byte s i 8 buffer 1 i append Hex Spaces buffer 2 print buffer  printHex VERBOSE_HEX_WIDTH appendHexByte appendHexSpaces
Prints hex representation of an int public void print Hex int integer char buffer new char VERBOSE HEX WIDTH for int i 3 i 0 i append Hex Byte byte integer i 8 buffer 3 i append Hex Spaces buffer 4 print buffer  printHex VERBOSE_HEX_WIDTH appendHexByte appendHexSpaces
Prints hex representation of a long public void print Hex long l char buffer new char VERBOSE HEX WIDTH for int i 7 i 0 i append Hex Byte byte l i 8 buffer 7 i append Hex Spaces buffer 8 print buffer  printHex VERBOSE_HEX_WIDTH appendHexByte appendHexSpaces
Prints hex representation of a long public void print Hex boolean b print Hex Substitution boolean NON NLS 1  printHex printHexSubstitution
Prints hex representation of a long public void print Hex char c print Hex Substitution char NON NLS 1  printHex printHexSubstitution
Prints hex representation of a long public void print Hex double d print Hex Substitution double NON NLS 1  printHex printHexSubstitution
Prints hex representation of a long public void print Hex float f print Hex Substitution float NON NLS 1  printHex printHexSubstitution
Prints hex representation of a String public void print Hex String str print Hex Substitution string NON NLS 1  printHex printHexSubstitution
Prints hex representation of a byte array Note that this can span more than one line but is considered to be part of one verbose line Therefore a println after a print Hex can result in more than one line being printed to the Print Writer public void print Hex byte bytes int start Position position char linebuf new char VERBOSE HEX WIDTH int extra Lines 0 int byte On Line 0 for int i 0 i bytes length i if byte On Line VERBOSE HEX BYTES PER LINE append Hex Spaces linebuf VERBOSE HEX BYTES PER LINE if extra Lines 0 print Description NON NLS 1 print linebuf mark Ln byte On Line 0 append Hex Byte bytes i linebuf byte On Line append Hex Spaces linebuf byte On Line if extra Lines 0 print Description NON NLS 1 f Extra Verbose Lines extra Lines print linebuf if extra Lines 0 goto Position start Position  printHex PrintWriter printHex startPosition VERBOSE_HEX_WIDTH extraLines byteOnLine byteOnLine VERBOSE_HEX_BYTES_PER_LINE appendHexSpaces VERBOSE_HEX_BYTES_PER_LINE extraLines printDescription markLn byteOnLine appendHexByte byteOnLine appendHexSpaces byteOnLine extraLines printDescription fExtraVerboseLines extraLines extraLines gotoPosition startPosition
Prints string representation of a value given a Map from values to strings public void print Value int value Map value To String Integer val new Integer value if value To String null print val to String String result String value To String get val if result null print val to String JDI Messages get String Verbose Writer   unknown value  1 NON NLS 1 else print result  printValue valueToString valueToString toString valueToString toString JDIMessages getString VerboseWriter _ unknown_value _1
Prints string representation of a value given a Vector with the names of the bits public void print Value byte value String bit Names print Value value 0xff bit Names  printValue bitNames printValue bitNames
Prints string representation of a value given a Vector with the names of the bits public void print Value short value String bit Names print Value value 0xffff bit Names  printValue bitNames printValue bitNames
Prints string representation of a value given a Vector with the names of the bits public void print Value int value String bit Names Integer val new Integer value if bit Names null print val to String boolean bits Set false for int i 0 i bit Names length i Test if bit is set in value if 1 i value 0 continue See if we have a desciption for the bit String bit String bit Names i if bit String null bit String JDI Messages get String Verbose Writer unknown bit  2 NON NLS 1 if bits Set print bit String else print NON NLS 1 print bit String bits Set true if bits Set print JDI Messages get String Verbose Writer none  4 NON NLS 1  printValue bitNames bitNames toString bitsSet bitNames bitString bitNames bitString bitString JDIMessages getString VerboseWriter unknown_bit _2 bitsSet bitString bitString bitsSet bitsSet JDIMessages getString VerboseWriter _4
Checks if a new line is written to If so first erase any data on that line Line is marked not new after this command private void check For New Line if f New Line String Buffer f Line Buffer get f Position set Length 0 f New Line false  checkForNewLine fNewLine StringBuffer fLineBuffer fPosition setLength fNewLine
Print a String public void print String str check For New Line String Buffer f Line Buffer get f Position append str  checkForNewLine StringBuffer fLineBuffer fPosition
Print a Character public void print char c check For New Line String Buffer f Line Buffer get f Position append c  checkForNewLine StringBuffer fLineBuffer fPosition
Print array of Characters public void print char c check For New Line String Buffer f Line Buffer get f Position append c  checkForNewLine StringBuffer fLineBuffer fPosition
Print a String and then terminate the line public void println String str print str println 
Flush buffer If autoflush is off this method is synchronized on the Print Writer given in the constructor public void flush synchronized f Output int buf Size f Line Buffer size for int i 0 i buf Size 1 i f Output println new String String Buffer f Line Buffer get i The last line should be printed without an extra newline String Buffer last Line String Buffer f Line Buffer get buf Size 1 if last Line length 0 f Output print new String last Line f Output flush f Line Buffer clear f Position 0 f Line Buffer add new String Buffer  PrintWriter fOutput bufSize fLineBuffer bufSize fOutput StringBuffer fLineBuffer StringBuffer lastLine StringBuffer fLineBuffer bufSize lastLine fOutput lastLine fOutput fLineBuffer fPosition fLineBuffer StringBuffer
Go to the given position in the buffer If the given position is smaller than the current position subsequent print commands overwrite existing lines in the buffer Else new lines are added to the buffer public void goto Position int pos int delta pos f Position if delta 0 f Position pos else while delta 0 println  gotoPosition fPosition fPosition
Prints given number of lines public void print Lines int lines goto Position f Position lines  printLines gotoPosition fPosition
return Returns current position in buffer public int position return f Position  fPosition
Terminate the current line by writing the line separator string start at end of next line public void mark Ln if f Position f Line Buffer size f Line Buffer add new String Buffer f New Line true  markLn fPosition fLineBuffer fLineBuffer StringBuffer fNewLine

Creates a new Virtual Machine public Virtual Machine Impl Connector Impl connector super Virtual Machine NON NLS 1 f Event Req Mgr new Event Request Manager Impl this f Event Queue new Event Queue Impl this f Connector connector f Request Timeout connector virtual Machine Manager get Global Request Timeout  VirtualMachineImpl ConnectorImpl VirtualMachine fEventReqMgr EventRequestManagerImpl fEventQueue EventQueueImpl fConnector fRequestTimeout virtualMachineManager getGlobalRequestTimeout
return Returns size of JDWP ID public final int fieldID Size return f FieldID Size  fieldIDSize fFieldIDSize
return Returns size of JDWP ID public final int methodID Size return f MethodID Size  methodIDSize fMethodIDSize
return Returns size of JDWP ID public final int objectID Size return f ObjectID Size  objectIDSize fObjectIDSize
return Returns size of JDWP ID public final int reference TypeID Size return f Reference TypeID Size  referenceTypeIDSize fReferenceTypeIDSize
return Returns size of JDWP ID public final int frameID Size return f FrameID Size  frameIDSize fFrameIDSize
return Returns cached mirror object or null if method is not in cache public Reference Type Impl get Cached Mirror Jdwp Reference TypeID ID return Reference Type Impl f Cached Reftypes get ID  ReferenceTypeImpl getCachedMirror JdwpReferenceTypeID ReferenceTypeImpl fCachedReftypes
return Returns cached mirror object or null if method is not in cache public Object Reference Impl get Cached Mirror Jdwp ObjectID ID return Object Reference Impl f Cached Objects get ID  ObjectReferenceImpl getCachedMirror JdwpObjectID ObjectReferenceImpl fCachedObjects
Adds mirror object to cache public void add Cached Mirror Reference Type Impl mirror f Cached Reftypes put mirror get Ref TypeID mirror tbd It is now yet possible to only ask for unload events for classes that we know of due to a limitation in the J9 VM event Request Manager Impl enable Internal Clas Unload Event mirror  addCachedMirror ReferenceTypeImpl fCachedReftypes getRefTypeID eventRequestManagerImpl enableInternalClasUnloadEvent
Adds mirror object to cache public void add Cached Mirror Object Reference Impl mirror f Cached Objects put mirror get ObjectID mirror  addCachedMirror ObjectReferenceImpl fCachedObjects getObjectID
Flushes all stored Jdwp results public void flush Stored Jdwp Results All known classes also become invalid Iterator iter f Cached Reftypes values iterator while iter has Next Reference Type Impl ref Type Reference Type Impl iter next ref Type flush Stored Jdwp Results f Version Description null f GotID Sizes false f Hcr Capabilities null  flushStoredJdwpResults fCachedReftypes hasNext ReferenceTypeImpl refType ReferenceTypeImpl refType flushStoredJdwpResults fVersionDescription fGotIDSizes fHcrCapabilities
public final void remove Known Ref Type String signature List ref Type List classes By Signature signature if ref Type List is Empty return If we have only one known class for this signature we known that this is the class to be removed if ref Type List size 1 Reference Type Impl ref Type Reference Type Impl ref Type List get 0 ref Type flush Stored Jdwp Results f Cached Reftypes remove ref Type get Ref TypeID return We have more than one known class for the signature let s find the unloaded one s Iterator iter ref Type List iterator while iter has Next Reference Type Impl ref Type Reference Type Impl iter next boolean prepared false try prepared ref Type is Prepared catch Object Collected Exception exception The type is unloaded Fall through if prepared ref Type flush Stored Jdwp Results iter remove f Cached Reftypes remove ref Type get Ref TypeID  removeKnownRefType refTypeList classesBySignature refTypeList isEmpty refTypeList ReferenceTypeImpl refType ReferenceTypeImpl refTypeList refType flushStoredJdwpResults fCachedReftypes refType getRefTypeID refTypeList hasNext ReferenceTypeImpl refType ReferenceTypeImpl refType isPrepared ObjectCollectedException refType flushStoredJdwpResults fCachedReftypes refType getRefTypeID
exception Throws Unsupported Operation Exception if VM does not support J9 HCR public void checkHCR Supported throws Unsupported Operation Exception if isHCR Supported throw new Unsupported Operation Exception Message Format format JDI Messages get String Virtual Machine Impl Target VM  0  does not support Hot Code Replacement 1 new String name NON NLS 1  UnsupportedOperationException checkHCRSupported UnsupportedOperationException isHCRSupported UnsupportedOperationException MessageFormat JDIMessages getString VirtualMachineImpl Target_VM_ _does_not_support_Hot_Code_Replacement_1
Returns whether J9 HCR is supported public boolean isHCR Supported throws Unsupported Operation Exception return name equals j9 NON NLS 1  isHCRSupported UnsupportedOperationException
return Returns Manager for receiving packets from the Virtual Machine public final Packet Receive Manager packet Receive Manager return f Connector packet Receive Manager  PacketReceiveManager packetReceiveManager fConnector packetReceiveManager
public final Packet Send Manager packet Send Manager Before we send out first bytes to the VM by JDI calls we need some initial requests Get the sizes of the I Ds fieldID method ID etc that the VM uses Request class prepare and unload events We used these to cache classes interfaces and map their signatures if f GotID Sizes getID Sizes if f GotID Sizes We can t do much without them disconnectVM throw new VM Disconnected Exception JDI Messages get String Virtual Machine Impl Failed to get ID sizes 2 NON NLS 1 tbd This call should be moved to add Known Ref Type when it can be made specific for a referencetype event Request Manager Impl enable Internal Clas Unload Event return f Connector packet Send Manager  PacketSendManager packetSendManager IDs fGotIDSizes getIDSizes fGotIDSizes VMDisconnectedException JDIMessages getString VirtualMachineImpl Failed_to_get_ID_sizes_2 addKnownRefType eventRequestManagerImpl enableInternalClasUnloadEvent fConnector packetSendManager
Returns all loaded types classes interfaces and array types For each loaded type in the target VM a Reference Type will be placed in the returned list public List all Classes Note that this information should not be cached init Jdwp Request try boolean with Generic Signature virtual Machine Impl is Jdwp Version Greater Or Equal 1 5 int jdwp Command with Generic Signature Jdwp Command Packet VM ALL CLASSES WITH GENERIC Jdwp Command Packet VM ALL CLASSES Jdwp Reply Packet reply Packet requestVM jdwp Command default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream int nr Of Elements read Int elements reply Data NON NLS 1 List elements new Array List nr Of Elements for int i 0 i nr Of Elements i Reference Type Impl elt Reference Type Impl read With Type Tag And Signature this with Generic Signature reply Data if elt null continue read Int status Reference Type Impl class Status Strings reply Data NON NLS 1 elements add elt return elements catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ReferenceType allClasses initJdwpRequest withGenericSignature virtualMachineImpl isJdwpVersionGreaterOrEqual jdwpCommand withGenericSignature JdwpCommandPacket VM_ALL_CLASSES_WITH_GENERIC JdwpCommandPacket VM_ALL_CLASSES JdwpReplyPacket replyPacket jdwpCommand defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream nrOfElements readInt replyData ArrayList nrOfElements nrOfElements ReferenceTypeImpl ReferenceTypeImpl readWithTypeTagAndSignature withGenericSignature replyData readInt ReferenceTypeImpl classStatusStrings replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Returns an iterator over all loaded classes protected final Iterator all Ref Types return all Classes iterator  allRefTypes allClasses
return Returns an iterator over all cached classes protected final Iterator all Cached Ref Types return f Cached Reftypes values iterator  allCachedRefTypes fCachedReftypes
Returns a list of the currently running threads For each running thread in the target VM a Thread Reference that mirrors it is placed in the list public List all Threads Note that this information should not be cached init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet VM ALL THREADS default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream int nr Of Elements read Int elements reply Data NON NLS 1 List elements new Array List nr Of Elements for int i 0 i nr Of Elements i Thread Reference Impl elt Thread Reference Impl read this reply Data if elt null continue elements add elt return elements catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  ThreadReference allThreads initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket VM_ALL_THREADS defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream nrOfElements readInt replyData ArrayList nrOfElements nrOfElements ThreadReferenceImpl ThreadReferenceImpl replyData IOException defaultIOExceptionHandler handledJdwpRequest
Retrieve this VM s capabilities public void get Capabilities if f Got Capabilities return int command Jdwp Command Packet VM CAPABILITIES if is Jdwp Version Greater Or Equal 1 4 command Jdwp Command Packet VM CAPABILITIES NEW init Jdwp Request try Jdwp Reply Packet reply Packet requestVM command default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f Can Watch Field Modification read Boolean watch field modification reply Data NON NLS 1 f Can Watch Field Access read Boolean watch field access reply Data NON NLS 1 f Can Get Bytecodes read Boolean get bytecodes reply Data NON NLS 1 f Can Get Synthetic Attribute read Boolean synth attr reply Data NON NLS 1 f Can Get Owned Monitor Info read Boolean owned monitor info reply Data NON NLS 1 f Can Get Current Contended Monitor read Boolean curr contended monitor reply Data NON NLS 1 f Can Get Monitor Info read Boolean monitor info reply Data NON NLS 1 if command Jdwp Command Packet VM CAPABILITIES NEW extended capabilities f Can Redefine Classes read Boolean redefine classes reply Data NON NLS 1 f Can Add Method read Boolean add method reply Data NON NLS 1 f Can Unrestrictedly Redefine Classes read Boolean unrestrictedly redefine classes reply Data NON NLS 1 f Can Pop Frames read Boolean pop frames reply Data NON NLS 1 f Can Use Instance Filters read Boolean use instance filters reply Data NON NLS 1 f Can Get Source Debug Extension read Boolean get source debug extension reply Data NON NLS 1 f Can RequestVM Death Event read Boolean request vm death reply Data NON NLS 1 f Can Set Default Stratum read Boolean set default stratum reply Data NON NLS 1 else f Can Redefine Classes false f Can Add Method false f Can Unrestrictedly Redefine Classes false f Can Pop Frames false f Can Use Instance Filters false f Can Get Source Debug Extension false f Can RequestVM Death Event false f Can Set Default Stratum false f Got Capabilities true catch IO Exception e f GotID Sizes false defaultIO Exception Handler e finally handled Jdwp Request  getCapabilities fGotCapabilities JdwpCommandPacket VM_CAPABILITIES isJdwpVersionGreaterOrEqual JdwpCommandPacket VM_CAPABILITIES_NEW initJdwpRequest JdwpReplyPacket replyPacket defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fCanWatchFieldModification readBoolean replyData fCanWatchFieldAccess readBoolean replyData fCanGetBytecodes readBoolean replyData fCanGetSyntheticAttribute readBoolean replyData fCanGetOwnedMonitorInfo readBoolean replyData fCanGetCurrentContendedMonitor readBoolean replyData fCanGetMonitorInfo readBoolean replyData JdwpCommandPacket VM_CAPABILITIES_NEW fCanRedefineClasses readBoolean replyData fCanAddMethod readBoolean replyData fCanUnrestrictedlyRedefineClasses readBoolean replyData fCanPopFrames readBoolean replyData fCanUseInstanceFilters readBoolean replyData fCanGetSourceDebugExtension readBoolean replyData fCanRequestVMDeathEvent readBoolean replyData fCanSetDefaultStratum readBoolean replyData fCanRedefineClasses fCanAddMethod fCanUnrestrictedlyRedefineClasses fCanPopFrames fCanUseInstanceFilters fCanGetSourceDebugExtension fCanRequestVMDeathEvent fCanSetDefaultStratum fGotCapabilities IOException fGotIDSizes defaultIOExceptionHandler handledJdwpRequest
return Returns true if this implementation supports the retrieval of a method s bytecodes public boolean can Get Bytecodes get Capabilities return f Can Get Bytecodes  canGetBytecodes getCapabilities fCanGetBytecodes
return Returns true if this implementation supports the retrieval of the monitor for which a thread is currently waiting public boolean can Get Current Contended Monitor get Capabilities return f Can Get Current Contended Monitor  canGetCurrentContendedMonitor getCapabilities fCanGetCurrentContendedMonitor
return Returns true if this implementation supports the retrieval of the monitor information for an object public boolean can Get Monitor Info get Capabilities return f Can Get Monitor Info  canGetMonitorInfo getCapabilities fCanGetMonitorInfo
return Returns true if this implementation supports the retrieval of the monitors owned by a thread public boolean can Get Owned Monitor Info get Capabilities return f Can Get Owned Monitor Info  canGetOwnedMonitorInfo getCapabilities fCanGetOwnedMonitorInfo
return Returns true if this implementation supports the query of the synthetic attribute of a method or field public boolean can Get Synthetic Attribute get Capabilities return f Can Get Synthetic Attribute  canGetSyntheticAttribute getCapabilities fCanGetSyntheticAttribute
return Returns true if this implementation supports watchpoints for field access public boolean can Watch Field Access get Capabilities return f Can Watch Field Access  canWatchFieldAccess getCapabilities fCanWatchFieldAccess
return Returns true if this implementation supports watchpoints for field modification public boolean can Watch Field Modification get Capabilities return f Can Watch Field Modification  canWatchFieldModification getCapabilities fCanWatchFieldModification
return Returns the loaded reference types that match a given signature public List classes By Signature String signature Note that this information should not be cached init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write String signature signature out Data NON NLS 1 Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet VM CLASSES BY SIGNATURE out Bytes default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream int nr Of Elements read Int elements reply Data NON NLS 1 List elements new Array List nr Of Elements for int i 0 i nr Of Elements i Reference Type Impl elt Reference Type Impl read With Type Tag this reply Data read Int status Reference Type Impl class Status Strings reply Data NON NLS 1 if elt null continue elements add elt return elements catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  classesBySignature initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes writeString outData JdwpReplyPacket replyPacket JdwpCommandPacket VM_CLASSES_BY_SIGNATURE outBytes defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream nrOfElements readInt replyData ArrayList nrOfElements nrOfElements ReferenceTypeImpl ReferenceTypeImpl readWithTypeTag replyData readInt ReferenceTypeImpl classStatusStrings replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Returns the loaded reference types that match a given name public List classes By Name String name String signature Type Impl class Name To Signature name return classes By Signature signature  classesByName TypeImpl classNameToSignature classesBySignature
Invalidates this virtual machine mirror public void dispose init Jdwp Request try requestVM Jdwp Command Packet VM DISPOSE disconnectVM catch VM Disconnected Exception e The VM can exit before we receive the reply finally handled Jdwp Request  initJdwpRequest JdwpCommandPacket VM_DISPOSE VMDisconnectedException handledJdwpRequest
return Returns Event Queue that returns Event Sets from the Virtual Manager public Event Queue event Queue return f Event Queue  EventQueue EventSets EventQueue eventQueue fEventQueue
return Returns Event Request Manager that creates all event objects on request public Event Request Manager event Request Manager return f Event Req Mgr  EventRequestManager EventRequestManager eventRequestManager fEventReqMgr
return Returns Event Request Manager Impl that creates all event objects on request public Event Request Manager Impl event Request Manager Impl return f Event Req Mgr  EventRequestManagerImpl EventRequestManagerImpl eventRequestManagerImpl fEventReqMgr
Causes the mirrored VM to terminate with the given error code public void exit int exit Code init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write Int exit Code exit code out Data NON NLS 1 requestVM Jdwp Command Packet VM EXIT out Bytes disconnectVM catch VM Disconnected Exception e The VM can exit before we receive the reply catch IO Exception e defaultIO Exception Handler e finally handled Jdwp Request  exitCode initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes writeInt exitCode outData JdwpCommandPacket VM_EXIT outBytes VMDisconnectedException IOException defaultIOExceptionHandler handledJdwpRequest
return Returns newly created Byte Value for the given value public Byte Value mirror Of byte value return new Byte Value Impl virtual Machine Impl new Byte value  ByteValue ByteValue mirrorOf ByteValueImpl virtualMachineImpl
return Returns newly created Char Value for the given value public Char Value mirror Of char value return new Char Value Impl virtual Machine Impl new Character value  CharValue CharValue mirrorOf CharValueImpl virtualMachineImpl
return Returns newly created Double Value for the given value public Double Value mirror Of double value return new Double Value Impl virtual Machine Impl new Double value  DoubleValue DoubleValue mirrorOf DoubleValueImpl virtualMachineImpl
return Returns newly created Float Value for the given value public Float Value mirror Of float value return new Float Value Impl virtual Machine Impl new Float value  FloatValue FloatValue mirrorOf FloatValueImpl virtualMachineImpl
return Returns newly created Integer Value for the given value public Integer Value mirror Of int value return new Integer Value Impl virtual Machine Impl new Integer value  IntegerValue IntegerValue mirrorOf IntegerValueImpl virtualMachineImpl
return Returns newly created Long Value for the given value public Long Value mirror Of long value return new Long Value Impl virtual Machine Impl new Long value  LongValue LongValue mirrorOf LongValueImpl virtualMachineImpl
return Returns newly created Short Value for the given value public Short Value mirror Of short value return new Short Value Impl virtual Machine Impl new Short value  ShortValue ShortValue mirrorOf ShortValueImpl virtualMachineImpl
return Returns newly created Boolean Value for the given value public Boolean Value mirror Of boolean value return new Boolean Value Impl virtual Machine Impl new Boolean value  BooleanValue BooleanValue mirrorOf BooleanValueImpl virtualMachineImpl
return Returns newly created String Reference for the given value public String Reference mirror Of String value init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write String value string value out Data NON NLS 1 Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet VM CREATE STRING out Bytes default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream String Reference result String Reference Impl read this reply Data return result catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  StringReference StringReference mirrorOf initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes writeString outData JdwpReplyPacket replyPacket JdwpCommandPacket VM_CREATE_STRING outBytes defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream StringReference StringReferenceImpl replyData IOException defaultIOExceptionHandler handledJdwpRequest
return Returns the Process object for this virtual machine if launched by a Launching Connector public Process process return f Launched Process  LaunchingConnector fLaunchedProcess
Sets Process object for this virtual machine if launched by a Launching Connector public void set Launced Process Process proc f Launched Process proc  LaunchingConnector setLauncedProcess fLaunchedProcess
Continues the execution of the application running in this virtual machine public void resume init Jdwp Request try reset Thread Event Flags Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet VM RESUME default Reply Error Handler reply Packet error Code finally handled Jdwp Request  initJdwpRequest resetThreadEventFlags JdwpReplyPacket replyPacket JdwpCommandPacket VM_RESUME defaultReplyErrorHandler replyPacket errorCode handledJdwpRequest
public void set Debug Trace Mode int trace Flags We don t have trace info  setDebugTraceMode traceFlags
Suspends all threads public void suspend init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet VM SUSPEND default Reply Error Handler reply Packet error Code finally handled Jdwp Request  initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket VM_SUSPEND defaultReplyErrorHandler replyPacket errorCode handledJdwpRequest
public List top Level Thread Groups Note that this information should not be cached init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet VM TOP LEVEL THREAD GROUPS default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream int nr Groups read Int nr of groups reply Data NON NLS 1 Array List result new Array List nr Groups for int i 0 i nr Groups i Thread Group Reference Impl thread Group Thread Group Reference Impl read this reply Data result add thread Group return result catch IO Exception e defaultIO Exception Handler e return null finally handled Jdwp Request  topLevelThreadGroups initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket VM_TOP_LEVEL_THREAD_GROUPS defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream nrGroups readInt replyData ArrayList ArrayList nrGroups nrGroups ThreadGroupReferenceImpl threadGroup ThreadGroupReferenceImpl replyData threadGroup IOException defaultIOExceptionHandler handledJdwpRequest
return Returns the name of the target VM as reported by the property java vm name public String name get Version Info return fVM Name  getVersionInfo fVMName
return Returns the version of the Java Runtime Environment in the target VM as reported by the property java version public String version get Version Info return fVM Version  getVersionInfo fVMVersion
return Returns text information on the target VM and the debugger support that mirrors it public String description get Version Info return f Version Description  getVersionInfo fVersionDescription
Reset event flags of all threads private void reset Thread Event Flags Iterator iter all Threads iterator Thread Reference Impl thread while iter has Next thread Thread Reference Impl iter next thread reset Event Flags  resetThreadEventFlags allThreads ThreadReferenceImpl hasNext ThreadReferenceImpl resetEventFlags
Request and fetch ID sizes of Virtual Machine private void getID Sizes if f GotID Sizes return f GotID Sizes must first be assigned true to prevent an invinite loop because getID Sizes calls requestVM which calls packet Send Manager f GotID Sizes true We use a different mirror to avoid having verbose output mixed with the initiating command Mirror Impl mirror new Void Value Impl this mirror init Jdwp Request try Jdwp Reply Packet reply Packet mirror requestVM Jdwp Command Packet VM ID SIZES mirror default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f FieldID Size mirror read Int field ID size reply Data NON NLS 1 f MethodID Size mirror read Int method ID size reply Data NON NLS 1 f ObjectID Size mirror read Int object ID size reply Data NON NLS 1 f Reference TypeID Size mirror read Int ref Type ID size reply Data NON NLS 1 f FrameID Size mirror read Int frame ID size reply Data NON NLS 1 catch IO Exception e f GotID Sizes false mirror defaultIO Exception Handler e finally mirror handled Jdwp Request  getIDSizes fGotIDSizes fGotIDSizes getIDSizes packetSendManager fGotIDSizes MirrorImpl VoidValueImpl initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket VM_ID_SIZES defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fFieldIDSize readInt replyData fMethodIDSize readInt replyData fObjectIDSize readInt replyData fReferenceTypeIDSize readInt refType replyData fFrameIDSize readInt replyData IOException fGotIDSizes defaultIOExceptionHandler handledJdwpRequest
Retrieves version info of the VM public void get Version Info if f Version Description null return init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet VM VERSION default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f Version Description read String version descr reply Data NON NLS 1 f Jdwp Major Version read Int major version reply Data NON NLS 1 f Jdwp Minor Version read Int minor version reply Data NON NLS 1 fVM Version read String version reply Data NON NLS 1 fVM Name read String name reply Data NON NLS 1 if fVM Name null fVM Name equals KVM NON NLS 1 KVM requires class preparation events in order to resolve things correctly event Request Manager Impl enable Internal Class Prepare Event catch IO Exception e f Version Description null defaultIO Exception Handler e finally handled Jdwp Request  getVersionInfo fVersionDescription initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket VM_VERSION defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fVersionDescription readString replyData fJdwpMajorVersion readInt replyData fJdwpMinorVersion readInt replyData fVMVersion readString replyData fVMName readString replyData fVMName fVMName eventRequestManagerImpl enableInternalClassPrepareEvent IOException fVersionDescription defaultIOExceptionHandler handledJdwpRequest
Retrieves the HCR capabilities of the VM public void getHCR Capabilities if f Hcr Capabilities null return f Hcr Capabilities new boolean HCR CAN REENTER ON EXIT 1 if isHCR Supported init Jdwp Request try Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet HCR CAPABILITIES default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream f Hcr Capabilities HCR CAN RELOAD CLASSES read Boolean reload classes reply Data NON NLS 1 f Hcr Capabilities HCR CAN GET CLASS VERSION read Boolean get class version reply Data NON NLS 1 f Hcr Capabilities HCR CAN DO RETURN read Boolean do return reply Data NON NLS 1 f Hcr Capabilities HCR CAN REENTER ON EXIT read Boolean reenter on exit reply Data NON NLS 1 catch IO Exception e f Hcr Capabilities null defaultIO Exception Handler e finally handled Jdwp Request else for int i 0 i f Hcr Capabilities length i f Hcr Capabilities i false  getHCRCapabilities fHcrCapabilities fHcrCapabilities HCR_CAN_REENTER_ON_EXIT isHCRSupported initJdwpRequest JdwpReplyPacket replyPacket JdwpCommandPacket HCR_CAPABILITIES defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream fHcrCapabilities HCR_CAN_RELOAD_CLASSES readBoolean replyData fHcrCapabilities HCR_CAN_GET_CLASS_VERSION readBoolean replyData fHcrCapabilities HCR_CAN_DO_RETURN readBoolean replyData fHcrCapabilities HCR_CAN_REENTER_ON_EXIT readBoolean replyData IOException fHcrCapabilities defaultIOExceptionHandler handledJdwpRequest fHcrCapabilities fHcrCapabilities
return Returns Whether VM can deal with the Classes have Changed command public boolean can Reload Classes getHCR Capabilities return f Hcr Capabilities HCR CAN RELOAD CLASSES  canReloadClasses getHCRCapabilities fHcrCapabilities HCR_CAN_RELOAD_CLASSES
return Returns Whether VM can get the version of a given class file public boolean can Get Class File Version getHCR Capabilities return f Hcr Capabilities HCR CAN GET CLASS VERSION  canGetClassFileVersion getHCRCapabilities fHcrCapabilities HCR_CAN_GET_CLASS_VERSION
return Returns Whether VM can do a return in the middle of executing a method public boolean can Do Return getHCR Capabilities return f Hcr Capabilities HCR CAN DO RETURN  canDoReturn getHCRCapabilities fHcrCapabilities HCR_CAN_DO_RETURN
return Returns Whether VM can reenter a method on exit public boolean can Reenter On Exit getHCR Capabilities return f Hcr Capabilities HCR CAN REENTER ON EXIT  canReenterOnExit getHCRCapabilities fHcrCapabilities HCR_CAN_REENTER_ON_EXIT
Notify the VM that classes have changed due to Hot Code Replacement return Returns RELOAD SUCCESS RELOAD FAILURE or RELOAD IGNORED public int classes Have Changed String names checkHCR Supported We convert the class interface names to signatures String signatures new String names length init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write Int names length length out Data NON NLS 1 for int i 0 i names length i signatures i Type Impl class Name To Signature names i write String signatures i signature out Data NON NLS 1 Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet HCR CLASSES HAVE CHANGED out Bytes default Reply Error Handler reply Packet error Code Data Input Stream reply Data reply Packet data In Stream byte result Flag read Byte result resultHCR Map reply Data NON NLS 1 switch result Flag case HCR RELOAD SUCCESS return RELOAD SUCCESS case HCR RELOAD FAILURE return RELOAD FAILURE case HCR RELOAD IGNORED return RELOAD IGNORED throw new Internal Error JDI Messages get String Virtual Machine Impl Invalid result flag in Classes Have Changed response   3 result Flag JDI Messages get String Virtual Machine Impl  4 NON NLS 1 NON NLS 2 catch IO Exception e defaultIO Exception Handler e return 0 finally handled Jdwp Request  RELOAD_SUCCESS RELOAD_FAILURE RELOAD_IGNORED classesHaveChanged checkHCRSupported initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes writeInt outData TypeImpl classNameToSignature writeString outData JdwpReplyPacket replyPacket JdwpCommandPacket HCR_CLASSES_HAVE_CHANGED outBytes defaultReplyErrorHandler replyPacket errorCode DataInputStream replyData replyPacket dataInStream resultFlag readByte resultHCRMap replyData resultFlag HCR_RELOAD_SUCCESS RELOAD_SUCCESS HCR_RELOAD_FAILURE RELOAD_FAILURE HCR_RELOAD_IGNORED RELOAD_IGNORED InternalError JDIMessages getString VirtualMachineImpl Invalid_result_flag_in_Classes_Have_Changed_response___3 resultFlag JDIMessages getString VirtualMachineImpl _4 IOException defaultIOExceptionHandler handledJdwpRequest
return Returns description of Mirror object public String to String try return name catch Exception e return f Description  toString fDescription
Retrieves constant mappings public static void get Constant Maps if fgHCR Result Map null return Field fields Virtual Machine Impl class get Declared Fields fgHCR Result Map new Hash Map for int i 0 i fields length i Field field fields i if field get Modifiers Modifier PUBLIC 0 field get Modifiers Modifier STATIC 0 field get Modifiers Modifier FINAL 0 continue try String name field get Name if name starts With HCR RELOAD  NON NLS 1 Integer int Value new Integer field get Int null name name substring 4 fgHCR Result Map put int Value name catch Illegal Access Exception e Will not occur for own class catch Illegal Argument Exception e Should not occur We should take care that all public static final constants in this class are numbers that are convertible to int  getConstantMaps fgHCRResultMap VirtualMachineImpl getDeclaredFields fgHCRResultMap HashMap getModifiers getModifiers getModifiers getName startsWith HCR_RELOAD_ intValue getInt fgHCRResultMap intValue IllegalAccessException IllegalArgumentException
return Returns a map with string representations of tags public static Map resultHCR Map get Constant Maps return fgHCR Result Map  resultHCRMap getConstantMaps fgHCRResultMap
Sets request timeout in ms public void set Request Timeout int timeout f Request Timeout timeout  setRequestTimeout fRequestTimeout
return Returns request timeout in ms public int get Request Timeout return f Request Timeout  getRequestTimeout fRequestTimeout
Returns whether the JDWP version is greater than or equal to the specified major minor version numbers return whether the JDWP version is greater than or equal to the specified major minor version numbers public boolean is Jdwp Version Greater Or Equal int major int minor get Version Info return f Jdwp Major Version major f Jdwp Major Version major f Jdwp Minor Version minor  isJdwpVersionGreaterOrEqual getVersionInfo fJdwpMajorVersion fJdwpMajorVersion fJdwpMinorVersion
public void redefine Classes Map types To Bytes if can Redefine Classes throw new Unsupported Operation Exception init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write Int types To Bytes size classes out Data NON NLS 1 Set types types To Bytes key Set Iterator iter types iterator while iter has Next Reference Type Impl type Reference Type Impl iter next type write this out Data byte bytes byte types To Bytes get type write Int bytes length classfile out Data NON NLS 1 for int i 0 i bytes length i write Byte bytes i class Byte out Data NON NLS 1 f Cached Reftypes remove type get Ref TypeID flush local cache of redefined types Jdwp Reply Packet reply requestVM Jdwp Command Packet VM REDEFINE CLASSES out Bytes switch reply error Code case Jdwp Reply Packet UNSUPPORTED VERSION throw new Unsupported Class Version Error case Jdwp Reply Packet INVALID CLASS FORMAT throw new Class Format Error case Jdwp Reply Packet CIRCULAR CLASS DEFINITION throw new Class Circularity Error case Jdwp Reply Packet FAILS VERIFICATION throw new Verify Error case Jdwp Reply Packet NAMES DONT MATCH throw new No Class Def Found Error case Jdwp Reply Packet ADD METHOD NOT IMPLEMENTED throw new Unsupported Operation Exception JDI Messages get String Virtual Machine Impl Add method not implemented 1 NON NLS 1 case Jdwp Reply Packet SCHEMA CHANGE NOT IMPLEMENTED throw new Unsupported Operation Exception JDI Messages get String Virtual Machine Impl Scheme change not implemented 2 NON NLS 1 case Jdwp Reply Packet HIERARCHY CHANGE NOT IMPLEMENTED throw new Unsupported Operation Exception JDI Messages get String Virtual Machine Impl Hierarchy change not implemented 3 NON NLS 1 case Jdwp Reply Packet DELETE METHOD NOT IMPLEMENTED throw new Unsupported Operation Exception JDI Messages get String Virtual Machine Impl Delete method not implemented 4 NON NLS 1 case Jdwp Reply Packet CLASS MODIFIERS CHANGE NOT IMPLEMENTED throw new Unsupported Operation Exception JDI Messages get String Virtual Machine Impl Class modifiers change not implemented 5 NON NLS 1 case Jdwp Reply Packet METHOD MODIFIERS CHANGE NOT IMPLEMENTED throw new Unsupported Operation Exception JDI Messages get String Virtual Machine Impl Method modifiers change not implemented 6 NON NLS 1 default default Reply Error Handler reply error Code catch IO Exception ioe defaultIO Exception Handler ioe return finally handled Jdwp Request  redefineClasses typesToBytes canRedefineClasses UnsupportedOperationException initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes writeInt typesToBytes outData typesToBytes keySet hasNext ReferenceTypeImpl ReferenceTypeImpl outData typesToBytes writeInt outData writeByte classByte outData fCachedReftypes getRefTypeID JdwpReplyPacket JdwpCommandPacket VM_REDEFINE_CLASSES outBytes errorCode JdwpReplyPacket UNSUPPORTED_VERSION UnsupportedClassVersionError JdwpReplyPacket INVALID_CLASS_FORMAT ClassFormatError JdwpReplyPacket CIRCULAR_CLASS_DEFINITION ClassCircularityError JdwpReplyPacket FAILS_VERIFICATION VerifyError JdwpReplyPacket NAMES_DONT_MATCH NoClassDefFoundError JdwpReplyPacket ADD_METHOD_NOT_IMPLEMENTED UnsupportedOperationException JDIMessages getString VirtualMachineImpl Add_method_not_implemented_1 JdwpReplyPacket SCHEMA_CHANGE_NOT_IMPLEMENTED UnsupportedOperationException JDIMessages getString VirtualMachineImpl Scheme_change_not_implemented_2 JdwpReplyPacket HIERARCHY_CHANGE_NOT_IMPLEMENTED UnsupportedOperationException JDIMessages getString VirtualMachineImpl Hierarchy_change_not_implemented_3 JdwpReplyPacket DELETE_METHOD_NOT_IMPLEMENTED UnsupportedOperationException JDIMessages getString VirtualMachineImpl Delete_method_not_implemented_4 JdwpReplyPacket CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED UnsupportedOperationException JDIMessages getString VirtualMachineImpl Class_modifiers_change_not_implemented_5 JdwpReplyPacket METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED UnsupportedOperationException JDIMessages getString VirtualMachineImpl Method_modifiers_change_not_implemented_6 defaultReplyErrorHandler errorCode IOException defaultIOExceptionHandler handledJdwpRequest
see Virtual Machine can Redefine Classes public boolean can Redefine Classes get Capabilities return f Can Redefine Classes  VirtualMachine canRedefineClasses canRedefineClasses getCapabilities fCanRedefineClasses
see Virtual Machine can Use Instance Filters public boolean can Use Instance Filters get Capabilities return f Can Use Instance Filters  VirtualMachine canUseInstanceFilters canUseInstanceFilters getCapabilities fCanUseInstanceFilters
see Virtual Machine can Add Method public boolean can Add Method get Capabilities return f Can Add Method  VirtualMachine canAddMethod canAddMethod getCapabilities fCanAddMethod
see Virtual Machine can Unrestrictedly Redefine Classes public boolean can Unrestrictedly Redefine Classes get Capabilities return f Can Unrestrictedly Redefine Classes  VirtualMachine canUnrestrictedlyRedefineClasses canUnrestrictedlyRedefineClasses getCapabilities fCanUnrestrictedlyRedefineClasses
see Virtual Machine can Pop Frames public boolean can Pop Frames get Capabilities return f Can Pop Frames  VirtualMachine canPopFrames canPopFrames getCapabilities fCanPopFrames
see Virtual Machine can Get Source Debug Extension public boolean can Get Source Debug Extension get Capabilities return f Can Get Source Debug Extension  VirtualMachine canGetSourceDebugExtension canGetSourceDebugExtension getCapabilities fCanGetSourceDebugExtension
see Virtual Machine can RequestVM Death Event public boolean can RequestVM Death Event get Capabilities return f Can RequestVM Death Event  VirtualMachine canRequestVMDeathEvent canRequestVMDeathEvent getCapabilities fCanRequestVMDeathEvent
public boolean can Set Default Stratum get Capabilities return f Can Set Default Stratum  canSetDefaultStratum getCapabilities fCanSetDefaultStratum
public void set Default Stratum String stratum f Default Stratum stratum if can Set Default Stratum TODO how to inform the user that the VM doesn t manage set Default Startum return if stratum null stratum NON NLS 1 init Jdwp Request try Byte Array Output Stream out Bytes new Byte Array Output Stream Data Output Stream out Data new Data Output Stream out Bytes write String stratum stratum ID out Data NON NLS 1 Jdwp Reply Packet reply Packet requestVM Jdwp Command Packet VM SET DEFAULT STRATUM out Bytes default Reply Error Handler reply Packet error Code catch IO Exception e defaultIO Exception Handler e finally handled Jdwp Request  setDefaultStratum fDefaultStratum canSetDefaultStratum setDefaultStartum initJdwpRequest ByteArrayOutputStream outBytes ByteArrayOutputStream DataOutputStream outData DataOutputStream outBytes writeString outData JdwpReplyPacket replyPacket JdwpCommandPacket VM_SET_DEFAULT_STRATUM outBytes defaultReplyErrorHandler replyPacket errorCode IOException defaultIOExceptionHandler handledJdwpRequest
see Virtual Machine get Default Stratum public String get Default Stratum return f Default Stratum  VirtualMachine getDefaultStratum getDefaultStratum fDefaultStratum
Returns whether this VM is disconnected return whether this VM is disconnected public boolean is Disconnected return f Is Disconnected  isDisconnected fIsDisconnected
Sets whether this VM is disconnected param disconected whether this VM is disconnected public synchronized void set Disconnected boolean disconnected f Is Disconnected disconnected  setDisconnected fIsDisconnected
Return the boolean type for this VM protected Boolean Type Impl get Boolean Type if f Boolean Type null f Boolean Type new Boolean Type Impl this return f Boolean Type  BooleanTypeImpl getBooleanType fBooleanType fBooleanType BooleanTypeImpl fBooleanType
Return the byte type for this VM protected Byte Type Impl get Byte Type if f Byte Type null f Byte Type new Byte Type Impl this return f Byte Type  ByteTypeImpl getByteType fByteType fByteType ByteTypeImpl fByteType
Return the char type for this VM protected Char Type Impl get Char Type if f Char Type null f Char Type new Char Type Impl this return f Char Type  CharTypeImpl getCharType fCharType fCharType CharTypeImpl fCharType
Return the double type for this VM protected Double Type Impl get Double Type if f Double Type null f Double Type new Double Type Impl this return f Double Type  DoubleTypeImpl getDoubleType fDoubleType fDoubleType DoubleTypeImpl fDoubleType
Return the float type for this VM protected Float Type Impl get Float Type if f Float Type null f Float Type new Float Type Impl this return f Float Type  FloatTypeImpl getFloatType fFloatType fFloatType FloatTypeImpl fFloatType
Return the integer type for this VM protected Integer Type Impl get Integer Type if f Integer Type null f Integer Type new Integer Type Impl this return f Integer Type  IntegerTypeImpl getIntegerType fIntegerType fIntegerType IntegerTypeImpl fIntegerType
Return the long type for this VM protected Long Type Impl get Long Type if f Long Type null f Long Type new Long Type Impl this return f Long Type  LongTypeImpl getLongType fLongType fLongType LongTypeImpl fLongType
Return the short type for this VM protected Short Type Impl get Short Type if f Short Type null f Short Type new Short Type Impl this return f Short Type  ShortTypeImpl getShortType fShortType fShortType ShortTypeImpl fShortType
public boolean can Be Modified return true  canBeModified

Creates new Virtual Machine Manager Impl public Virtual Machine Manager Impl get Preferences See if verbose info must be given if f Verbose Output Stream out if f Verbose File null f Verbose File length 0 try out new File Output Stream f Verbose File catch IO Exception e out System out System out println JDI Messages get String Virtual Machine Manager Impl Could not open verbose file   1 f Verbose File JDI Messages get String Virtual Machine Manager Impl     2 e NON NLS 1 NON NLS 2 else out System out f Verbose Print Writer new Print Writer out  VirtualMachineManagerImpl VirtualMachineManagerImpl getPreferences fVerbose OutputStream fVerboseFile fVerboseFile FileOutputStream fVerboseFile IOException JDIMessages getString VirtualMachineManagerImpl Could_not_open_verbose_file___1 fVerboseFile JDIMessages getString VirtualMachineManagerImpl ____2 fVerbosePrintWriter PrintWriter
Returns the major version number of the JDI interface public int major Interface Version return MAJOR INTERFACE VERSION  majorInterfaceVersion MAJOR_INTERFACE_VERSION
Returns the minor version number of the JDI interface public int minor Interface Version return MINOR INTERFACE VERSION  minorInterfaceVersion MINOR_INTERFACE_VERSION
Loads the user preferences from the jdi ini file private void get Preferences Get jdi ini info URL url get Class get Resource jdi ini NON NLS 1 if url null return try Input Stream stream url open Stream Property Resource Bundle prefs new Property Resource Bundle stream try f Verbose Boolean value Of prefs get String User verbose boolean Value NON NLS 1 catch Missing Resource Exception e try f Verbose File prefs get String Verbose out NON NLS 1 catch Missing Resource Exception e catch IO Exception e  getPreferences getClass getResource InputStream openStream PropertyResourceBundle PropertyResourceBundle fVerbose valueOf getString booleanValue MissingResourceException fVerboseFile getString MissingResourceException IOException
return Returns Timeout value for requests to VM if not overridden for the VM This value is used to throw the exception Timeout Exception in JDI calls NOTE This is not in compliance with the Sun s JDI public int get Global Request Timeout try if JDI Debug Model get Preferences null return JDI Debug Model get Preferences get Int JDI Debug Model PREF REQUEST TIMEOUT else JDI plug in is not loaded return JDI Debug Model DEF REQUEST TIMEOUT catch No Class Def Found Error e return the hard coded preference if the jdi debug plug in does not exist return 3000  TimeoutException getGlobalRequestTimeout JDIDebugModel getPreferences JDIDebugModel getPreferences getInt JDIDebugModel PREF_REQUEST_TIMEOUT JDIDebugModel DEF_REQUEST_TIMEOUT NoClassDefFoundError
Adds a VM to the connected VM list public void add ConnectedVM Virtual Machine Impl vm f ConnectedV Ms add vm  addConnectedVM VirtualMachineImpl fConnectedVMs
Removes a VM from the connected VM list public void remove ConnectedVM Virtual Machine Impl vm f ConnectedV Ms remove vm  removeConnectedVM VirtualMachineImpl fConnectedVMs
return Returns all target V Ms which are connected to the debugger public List connected Virtual Machines return f ConnectedV Ms  VMs connectedVirtualMachines fConnectedVMs
return Returns all connectors public List all Connectors List result new Array List attaching Connectors result add All launching Connectors result add All listening Connectors return result  allConnectors ArrayList attachingConnectors addAll launchingConnectors addAll listeningConnectors
return Returns attaching connectors public List attaching Connectors Array List list new Array List 1 list add new Socket Attaching Connector Impl this return list  attachingConnectors ArrayList ArrayList SocketAttachingConnectorImpl
return Returns launching connectors public List launching Connectors Array List list new Array List 2 list add new Socket Launching Connector Impl this list add new Socket Raw Launching Connector Impl this return list  launchingConnectors ArrayList ArrayList SocketLaunchingConnectorImpl SocketRawLaunchingConnectorImpl
return Returns listening connectors public List listening Connectors Array List list new Array List 1 list add new Socket Listening Connector Impl this return list  listeningConnectors ArrayList ArrayList SocketListeningConnectorImpl
return Returns default connector public Launching Connector default Connector return new Socket Launching Connector Impl this  LaunchingConnector defaultConnector SocketLaunchingConnectorImpl
return Returns Print Writer to which verbose info must be written or null if no verbose must be given public Print Writer verbose Print Writer return f Verbose Print Writer  PrintWriter PrintWriter verbosePrintWriter fVerbosePrintWriter
public Virtual Machine create Virtual Machine Connection arg1 throws IO Exception return null  VirtualMachine createVirtualMachine IOException
public Virtual Machine create Virtual Machine Connection arg1 Process arg2 throws IO Exception return null  VirtualMachine createVirtualMachine IOException

public class Void Type Impl extends Type Impl implements Void Type Creates new instance public Void Type Impl Virtual Machine Impl vm Impl super Void Type vm Impl void V NON NLS 1 NON NLS 2 NON NLS 3  VoidTypeImpl TypeImpl VoidType VoidTypeImpl VirtualMachineImpl vmImpl VoidType vmImpl
return Returns modifier bits public int modifiers throw new Internal Error JDI Messages get String Void Type Impl A VoidType does not have modifiers 1 NON NLS 1  InternalError JDIMessages getString VoidTypeImpl A_VoidType_does_not_have_modifiers_1
return Create a null value instance of the type public Value create Null Value return new Void Value Impl virtual Machine Impl  createNullValue VoidValueImpl virtualMachineImpl

Creates new instance public Void Value Impl Virtual Machine Impl vm Impl super Void Value vm Impl NON NLS 1  VoidValueImpl VirtualMachineImpl vmImpl VoidValue vmImpl
returns tag public byte get Tag return tag  getTag
returns type of value public Type type return new Void Type Impl virtual Machine Impl  VoidTypeImpl virtualMachineImpl
return Returns true if two values are equal see java lang Object equals Object public boolean equals Object object return object null object get Class equals this get Class  getClass getClass
return Returns a has code for this object see java lang Object hash Code public int hash Code return 0  hashCode hashCode
Writes value without value tag public void write Mirror Impl target Data Output Stream out Nothing to write  MirrorImpl DataOutputStream
return Returns description of Mirror object public String to String return void NON NLS 1  toString

public class Timeout Exception extends Runtime Exception public Timeout Exception  TimeoutException RuntimeException TimeoutException

public interface Virtual Machine Sets request timeout in ms public void set Request Timeout int timeout  VirtualMachine setRequestTimeout
public void set Request Timeout int timeout return Returns request timeout in ms public int get Request Timeout  setRequestTimeout getRequestTimeout

Creates a new buffer changed event indicating that the given buffer has changed param buffer the given buffer param offset the given offset param length the given length param text the given text public Buffer Changed Event I Buffer buffer int offset int length String text super buffer this offset offset this length length this text text  BufferChangedEvent IBuffer
Returns the buffer which has changed return the buffer affected by the change public I Buffer get Buffer return I Buffer this source  IBuffer getBuffer IBuffer
Returns the length of text removed or replaced in the buffer or 0 if text has been inserted into the buffer return the length of the original text fragment modified by the buffer change code 0 code in case of insertion public int get Length return this length  getLength
Returns the index of the first character inserted removed or replaced in the buffer return the source offset of the textual manipulation in the buffer public int get Offset return this offset  getOffset
Returns the text that was inserted the replacement text or code null code if text has been removed return the text corresponding to the buffer change code null code in case of deletion public String get Text return this text  getText

public void execute throws Build Exception if this file null throw new Build Exception Ant Adapter Messages get String check Debug Attributes file argument cannot be null NON NLS 1 if this property null throw new Build Exception Ant Adapter Messages get String check Debug Attributes property argument cannot be null NON NLS 1 try boolean has Debug Attributes false if org eclipse jdt internal compiler util Util is Archive File Name this file Zip File jar File new Zip File this file for Enumeration entries jar File entries has Debug Attributes entries has More Elements Zip Entry entry Zip Entry entries next Element if org eclipse jdt internal compiler util Util is Class File Name entry get Name I Class File Reader class File Reader Tool Factory create Default Class File Reader this file entry get Name I Class File Reader ALL has Debug Attributes check Class File class File Reader else if org eclipse jdt internal compiler util Util is Class File Name this file I Class File Reader class File Reader Tool Factory create Default Class File Reader this file I Class File Reader ALL has Debug Attributes check Class File class File Reader else throw new Build Exception Ant Adapter Messages get String check Debug Attributes file argument must be a classfile or a jarfile NON NLS 1 if has Debug Attributes get Project set User Property this property has debug NON NLS 1 catch IO Exception e throw new Build Exception Ant Adapter Messages get String check Debug Attributes ioexception occured this file NON NLS 1  BuildException BuildException AntAdapterMessages getString checkDebugAttributes BuildException AntAdapterMessages getString checkDebugAttributes hasDebugAttributes isArchiveFileName ZipFile jarFile ZipFile jarFile hasDebugAttributes hasMoreElements ZipEntry ZipEntry nextElement isClassFileName getName IClassFileReader classFileReader ToolFactory createDefaultClassFileReader getName IClassFileReader hasDebugAttributes checkClassFile classFileReader isClassFileName IClassFileReader classFileReader ToolFactory createDefaultClassFileReader IClassFileReader hasDebugAttributes checkClassFile classFileReader BuildException AntAdapterMessages getString checkDebugAttributes hasDebugAttributes getProject setUserProperty IOException BuildException AntAdapterMessages getString checkDebugAttributes
private boolean check Class File I Class File Reader class File Reader I Method Info method Infos class File Reader get Method Infos for int i 0 max method Infos length i max i I Code Attribute code Attribute method Infos i get Code Attribute if code Attribute null code Attribute get Line Number Attribute null return true return false  checkClassFile IClassFileReader classFileReader IMethodInfo methodInfos classFileReader getMethodInfos methodInfos ICodeAttribute codeAttribute methodInfos getCodeAttribute codeAttribute codeAttribute getLineNumberAttribute
public void set File String value this file value  setFile
public void set Property String value this property value  setProperty

Creates a new classpath container initializer public Classpath Container Initializer a classpath container initializer must have a public 0 argument constructor  ClasspathContainerInitializer
Binds a classpath container to a code I Classpath Container code for a given project or silently fails if unable to do so p A container is identified by a container path which must be formed of two segments The first segment is used as a unique identifier which this initializer did register onto and the second segment can be used as an additional hint when performing the resolution p The initializer is invoked if a container path needs to be resolved for a given project and no value for it was recorded so far The implementation of the initializer would typically set the corresponding container using code Java Core set Classpath Container code p A container initialization can be indirectly performed while attempting to resolve a project classpath using code I Java Project get Resolved Classpath code or directly when using code Java Core get Classpath Container code During the initialization process any attempt to further obtain the same container will simply return code null code so as to avoid an infinite regression of initializations p A container initialization may also occur indirectly when setting a project classpath as the operation needs to resolve the classpath for validation purpose While the operation is in progress a referenced container initializer may be invoked If the initializer further tries to access the referring project classpath it will not see the new assigned classpath until the operation has completed Note that once the Java change notification occurs at the end of the operation the model has been updated and the project classpath can be queried normally p This method is called by the Java model to give the party that defined this particular kind of classpath container the chance to install classpath container objects that will be used to convert classpath container entries into simpler classpath entries The method is typically called exactly once for a given Java project and classpath container entry This method must not be called by other clients p There are a wide variety of conditions under which this method may be invoked To ensure that the implementation does not interfere with correct functioning of the Java model the implementation should use only the following Java model AP Is ul li link Java Core set Classpath Container I Path I Java Project I Classpath Container org eclipse core runtime I Progress Monitor li li link Java Core get Classpath Container I Path I Java Project li li link Java Core create org eclipse core resources I Workspace Root li li link Java Core create org eclipse core resources I Project li li link I Java Model get Java Projects li li Java element operations marked as handle only li ul The effects of using other Java model AP Is are unspecified p param container Path a two segment path ID hint identifying the container that needs to be resolved param project the Java project in which context the container is to be resolved This allows generic containers to be bound with project specific values throws Core Exception if an exception occurs during the initialization see Java Core get Classpath Container I Path I Java Project see Java Core set Classpath Container I Path I Java Project I Classpath Container org eclipse core runtime I Progress Monitor see I Classpath Container  IClasspathContainer JavaCore setClasspathContainer IJavaProject getResolvedClasspath JavaCore getClasspathContainer APIs JavaCore setClasspathContainer IPath IJavaProject IClasspathContainer IProgressMonitor JavaCore getClasspathContainer IPath IJavaProject JavaCore IWorkspaceRoot JavaCore IProject IJavaModel getJavaProjects APIs containerPath CoreException JavaCore getClasspathContainer IPath IJavaProject JavaCore setClasspathContainer IPath IJavaProject IClasspathContainer IProgressMonitor IClasspathContainer
Returns code true code if this container initializer can be requested to perform updates on its own container values If so then an update request will be performed using code Classpath Container Initializer request Classpath Container Update code p param container Path the path of the container which requires to be updated param project the project for which the container is to be updated return returns code true code if the container can be updated since 2 1 public boolean can Update Classpath Container I Path container Path I Java Project project By default classpath container initializers do not accept updating containers return false  ClasspathContainerInitializer requestClasspathContainerUpdate containerPath canUpdateClasspathContainer IPath containerPath IJavaProject
Request a registered container definition to be updated according to a container suggestion The container suggestion only acts as a place holder to pass along the information to update the matching container definition s held by the container initializer In particular it is not expected to store the container suggestion as is but rather adjust the actual container definition based on suggested changes p IMPORTANT In reaction to receiving an update request a container initializer will update the corresponding container definition after reconciling changes at its earliest convenience using code Java Core set Classpath Container I Path I Java Project I Classpath Container I Progress Monitor code Until it does so the update will not be reflected in the Java Model p In order to anticipate whether the container initializer allows to update its containers the predicate code Java Core can Update Classpath Container code should be used p param container Path the path of the container which requires to be updated param project the project for which the container is to be updated param container Suggestion a suggestion to update the corresponding container definition throws Core Exception when code Java Core set Classpath Container code would throw any see Java Core set Classpath Container I Path I Java Project I Classpath Container org eclipse core runtime I Progress Monitor see Classpath Container Initializer can Update Classpath Container I Path I Java Project since 2 1 public void request Classpath Container Update I Path container Path I Java Project project I Classpath Container container Suggestion throws Core Exception By default classpath container initializers do not accept updating containers  JavaCore setClasspathContainer IPath IJavaProject IClasspathContainer IProgressMonitor JavaCore canUpdateClasspathContainer containerPath containerSuggestion CoreException JavaCore setClasspathContainer JavaCore setClasspathContainer IPath IJavaProject IClasspathContainer IProgressMonitor ClasspathContainerInitializer canUpdateClasspathContainer IPath IJavaProject requestClasspathContainerUpdate IPath containerPath IJavaProject IClasspathContainer containerSuggestion CoreException
Returns a readable description for a container path A readable description for a container path can be used for improving the display of references to container without actually needing to resolve them A good implementation should answer a description consistent with the description of the associated target container see code I Classpath Container get Description code param container Path the path of the container which requires a readable description param project the project from which the container is referenced return a string description of the container since 2 1 public String get Description I Path container Path I Java Project project By default a container path is the only available description return container Path make Relative to String  IClasspathContainer getDescription containerPath getDescription IPath containerPath IJavaProject containerPath makeRelative toString
Returns an object which identifies a container for comparison purpose This allows to eliminate redundant containers when accumulating classpath entries e g runtime classpath computation When requesting a container comparison ID one should ensure using its corresponding container initializer Indeed a random container initializer cannot be held responsible for determining comparison I Ds for arbitrary containers p param container Path the path of the container which is being checked param project the project for which the container is to being checked return returns an Object identifying the container for comparison since 3 0 public Object get ComparisonID I Path container Path I Java Project project By default containers are identical if they have the same container Path first segment but this may be refined by other container initializer implementations if container Path null return null else return container Path segment 0  IDs containerPath getComparisonID IPath containerPath IJavaProject containerPath containerPath containerPath

Creates a new classpath variable initializer public Classpath Variable Initializer a classpath variable initializer must have a public 0 argument constructor  ClasspathVariableInitializer
Binds a value to the workspace classpath variable with the given name or fails silently if this cannot be done p A variable initializer is automatically activated whenever a variable value is needed and none has been recorded so far The implementation of the initializer can set the corresponding variable using code Java Core set Classpath Variable code param variable the name of the workspace classpath variable that requires a binding see Java Core get Classpath Variable String see Java Core set Classpath Variable String org eclipse core runtime I Path org eclipse core runtime I Progress Monitor see Java Core set Classpath Variables String org eclipse core runtime I Path org eclipse core runtime I Progress Monitor  JavaCore setClasspathVariable JavaCore getClasspathVariable JavaCore setClasspathVariable IPath IProgressMonitor JavaCore setClasspathVariables IPath IProgressMonitor

Answers a new array with appending the suffix character at the end of the array br br For example br ol li pre array a b suffix c result a b c pre li li pre array null suffix c result c pre li ol param array the array that is concanated with the suffix character param suffix the suffix character return the new array public static final char append char array char suffix if array null return new char suffix int length array length System arraycopy array 0 array new char length 1 0 length array length suffix return array 
Append the given subarray to the target array starting at the given index in the target array The start of the subarray is inclusive the end is exclusive Answers a new target array if it needs to grow otherwise answers the same target array br For example br ol li pre target a b 0 index 2 array c d start 0 end 1 result a b c pre li li pre target a b index 2 array c d start 0 end 1 result a b c 0 0 0 new array pre li li pre target a b c index 1 array c d e f start 1 end 4 result a d e f 0 0 0 0 new array pre li ol param target the given target param index the given index param array the given array param start the given start index param end the given end index return the new array throws Null Pointer Exception if the target array is null public static final char append char target int index char array int start int end int target Length target length int sub Length end start int new Target Length sub Length index if new Target Length target Length System arraycopy target 0 target new char new Target Length 2 0 index System arraycopy array start target index sub Length return target  NullPointerException targetLength subLength newTargetLength subLength newTargetLength targetLength newTargetLength subLength
Answers the concatenation of the two arrays It answers null if the two arrays are null If the first array is null then the second array is returned If the second array is null then the first array is returned br br For example ol li pre first null second null result null pre li li pre first a second null result a pre li li pre first null second a result a pre li li pre first b second a result b a pre li ol param first the first array to concatenate param second the second array to concatenate return the concatenation of the two arrays or null if the two arrays are null public static final char array Concat char first char second if first null return second if second null return first int length1 first length int length2 second length char result new char length1 length2 System arraycopy first 0 result 0 length1 System arraycopy second 0 result length1 length2 return result  arrayConcat
Returns the char arrays as an array of Strings param char Arrays the char array to convert return the char arrays as an array of Strings or null if the given char arrays is null since 3 0 public static String char Array To String Array char char Arrays if char Arrays null return null String strings new String char Arrays length for int i 0 i char Arrays length i strings i new String char Arrays i return strings  charArrays charArrayToStringArray charArrays charArrays charArrays charArrays charArrays
Returns the char array as a String param char Array the char array to convert return the char array as a String or null if the given char array is null since 3 0 public static String char To String char char Array if char Array null return null return new String char Array  charArray charToString charArray charArray charArray
Answers a new array adding the second array at the end of first array It answers null if the first and second are null If the first array is null then a new array char is created with second If the second array is null then the first array is returned br br For example ol li pre first null second a result a pre li pre first a second null result a pre li li pre first a second b result a b pre li ol param first the first array to concatenate param second the array to add at the end of the first array return a new array adding the second array at the end of first array or null if the two arrays are null public static final char array Concat char first char second if second null return first if first null return new char second int length first length char result new char length 1 System arraycopy first 0 result 0 length result length second return result  arrayConcat
Compares the contents of the two arrays array and prefix Returns ul li zero if the array starts with the prefix contents li li the difference between the first two characters that are not equal li li one if array length is lower than the prefix length and that the prefix starts with the array contents li ul p For example ol li pre array null prefix null result Null Pointer Exception pre li li pre array a b c d e prefix a b c result 0 pre li li pre array a b c d e prefix a B c result 32 pre li li pre array d b c d e prefix a b c result 3 pre li li pre array a b c d e prefix d b c result 3 pre li li pre array a a c d e prefix a e c result 4 pre li ol p param array the given array param prefix the given prefix return the result of the comparison 0 if array prefix throws Null Pointer Exception if either array or prefix is null public static final int compare With char array char prefix int array Length array length int prefix Length prefix length int min Math min array Length prefix Length int i 0 while min 0 char c1 array i char c2 prefix i if c1 c2 return c1 c2 if prefix Length i return 0 return 1 array is shorter than prefix e g array ab prefix abc  NullPointerException NullPointerException compareWith arrayLength prefixLength arrayLength prefixLength prefixLength
Answers the concatenation of the two arrays It answers null if the two arrays are null If the first array is null then the second array is returned If the second array is null then the first array is returned br br For example ol li pre first null second a result a pre li li pre first a second null result a pre li li pre first a second b result a b pre li ol param first the first array to concatenate param second the second array to concatenate return the concatenation of the two arrays or null if the two arrays are null public static final char concat char first char second if first null return second if second null return first int length1 first length int length2 second length char result new char length1 length2 System arraycopy first 0 result 0 length1 System arraycopy second 0 result length1 length2 return result 
Answers the concatenation of the three arrays It answers null if the three arrays are null If first is null it answers the concatenation of second and third If second is null it answers the concatenation of first and third If third is null it answers the concatenation of first and second br br For example ol li pre first null second a third b result a b pre li li pre first a second null third b result a b pre li li pre first a second b third null result a b pre li li pre first null second null third null result null pre li li pre first a second b third c result a b c pre li ol param first the first array to concatenate param second the second array to concatenate param third the third array to concatenate return the concatenation of the three arrays or null if the three arrays are null public static final char concat char first char second char third if first null return concat second third if second null return concat first third if third null return concat first second int length1 first length int length2 second length int length3 third length char result new char length1 length2 length3 System arraycopy first 0 result 0 length1 System arraycopy second 0 result length1 length2 System arraycopy third 0 result length1 length2 length3 return result 
Answers the concatenation of the two arrays inserting the separator character between the two arrays It answers null if the two arrays are null If the first array is null then the second array is returned If the second array is null then the first array is returned br br For example ol li pre first null second a separator result a pre li li pre first a second null separator result a pre li li pre first a second b separator result a b pre li ol param first the first array to concatenate param second the second array to concatenate param separator the character to insert return the concatenation of the two arrays inserting the separator character between the two arrays or null if the two arrays are null public static final char concat char first char second char separator if first null return second if second null return first int length1 first length if length1 0 return second int length2 second length if length2 0 return first char result new char length1 length2 1 System arraycopy first 0 result 0 length1 result length1 separator System arraycopy second 0 result length1 1 length2 return result 
Answers the concatenation of the three arrays inserting the sep1 character between the two arrays and sep2 between the last two It answers null if the three arrays are null If the first array is null then it answers the concatenation of second and third inserting the sep2 character between them If the second array is null then it answers the concatenation of first and third inserting the sep1 character between them If the third array is null then it answers the concatenation of first and second inserting the sep1 character between them br br For example ol li pre first null sep1 second a sep2 third b result a b pre li li pre first a sep1 second null sep2 third b result a b pre li li pre first a sep1 second b sep2 third null result a b pre li li pre first a sep1 second b sep2 third c result a b c pre li ol param first the first array to concatenate param sep1 the character to insert param second the second array to concatenate param sep2 the character to insert param third the second array to concatenate return the concatenation of the three arrays inserting the sep1 character between the two arrays and sep2 between the last two public static final char concat char first char sep1 char second char sep2 char third if first null return concat second third sep2 if second null return concat first third sep1 if third null return concat first second sep1 int length1 first length int length2 second length int length3 third length char result new char length1 length2 length3 2 System arraycopy first 0 result 0 length1 result length1 sep1 System arraycopy second 0 result length1 1 length2 result length1 length2 1 sep2 System arraycopy third 0 result length1 length2 2 length3 return result 
Answers a new array with prepending the prefix character and appending the suffix character at the end of the array If array is null it answers a new array containing the prefix and the suffix characters br br For example br ol li pre prefix a array b suffix c result a b c pre li li pre prefix a array null suffix c result a c pre li ol param prefix the prefix character param array the array that is concanated with the prefix and suffix characters param suffix the suffix character return the new array public static final char concat char prefix char array char suffix if array null return new char prefix suffix int length array length char result new char length 2 result 0 prefix System arraycopy array 0 result 1 length result length 1 suffix return result 
Answers the concatenation of the given array parts using the given separator between each part and appending the given name at the end br br For example br ol li pre name c array a b separator result a b c pre li li pre name null array a b separator result a b pre li li pre name c array null separator result c pre li ol param name the given name param array the given array param separator the given separator return the concatenation of the given array parts using the given separator between each part and appending the given name at the end public static final char concat With char name char array char separator int name Length name null 0 name length if name Length 0 return concat With array separator int length array null 0 array length if length 0 return name int size name Length int index length while index 0 if array index length 0 size array index length 1 char result new char size index size for int i length 1 i 0 i int sub Length array i length if sub Length 0 index sub Length System arraycopy array i 0 result index sub Length result index separator System arraycopy name 0 result 0 name Length return result  concatWith nameLength nameLength concatWith nameLength subLength subLength subLength subLength nameLength
Answers the concatenation of the given array parts using the given separator between each part and appending the given name at the end br br For example br ol li pre name c array a b separator result a b c pre li li pre name null array a b separator result a b pre li li pre name c array null separator result c pre li ol param array the given array param name the given name param separator the given separator return the concatenation of the given array parts using the given separator between each part and appending the given name at the end public static final char concat With char array char name char separator int name Length name null 0 name length if name Length 0 return concat With array separator int length array null 0 array length if length 0 return name int size name Length int index length while index 0 if array index length 0 size array index length 1 char result new char size index 0 for int i 0 i length i int sub Length array i length if sub Length 0 System arraycopy array i 0 result index sub Length index sub Length result index separator System arraycopy name 0 result index name Length return result  concatWith nameLength nameLength concatWith nameLength subLength subLength subLength subLength nameLength
Answers the concatenation of the given array parts using the given separator between each part br br For example br ol li pre array a b separator result a b pre li li pre array null separator result pre li ol param array the given array param separator the given separator return the concatenation of the given array parts using the given separator between each part public static final char concat With char array char separator int length array null 0 array length if length 0 return Char Operation NO CHAR int size length 1 int index length while index 0 if array index length 0 size else size array index length if size 0 return Char Operation NO CHAR char result new char size index length while index 0 length array index length if length 0 System arraycopy array index 0 result size length length if size 0 result size separator return result  concatWith CharOperation NO_CHAR CharOperation NO_CHAR
Answers true if the array contains an occurrence of character false otherwise br br For example ol li pre character c array a b result false pre li li pre character a array a b result true pre li ol param character the character to search param array the array in which the search is done return true if the array contains an occurrence of character false otherwise throws Null Pointer Exception if array is null public static final boolean contains char character char array for int i array length i 0 char subarray array i for int j subarray length j 0 if subarray j character return true return false  NullPointerException
Answers true if the array contains an occurrence of character false otherwise br br For example ol li pre character c array b result false pre li li pre character a array a b result true pre li ol param character the character to search param array the array in which the search is done return true if the array contains an occurrence of character false otherwise throws Null Pointer Exception if array is null public static final boolean contains char character char array for int i array length i 0 if array i character return true return false  NullPointerException
Answers a deep copy of the to Copy array param to Copy the array to copy return a deep copy of the to Copy array public static final char deep Copy char to Copy int to Copy Length to Copy length char result new char to Copy Length for int i 0 i to Copy Length i char to Element to Copy i int to Element Length to Element length char result Element new char to Element Length System arraycopy to Element 0 result Element 0 to Element Length result i result Element return result  toCopy toCopy toCopy deepCopy toCopy toCopyLength toCopy toCopyLength toCopyLength toElement toCopy toElementLength toElement resultElement toElementLength toElement resultElement toElementLength resultElement
Return true if array ends with the sequence of characters contained in to Be Found otherwise false br br For example ol li pre array a b c d to Be Found b c result false pre li li pre array a b c to Be Found b c result true pre li ol param array the array to check param to Be Found the array to find return true if array ends with the sequence of characters contained in to Be Found otherwise false throws Null Pointer Exception if array is null or to Be Found is null public static final boolean ends With char array char to Be Found int i to Be Found length int j array length i if j 0 return false while i 0 if to Be Found i array i j return false return true  toBeFound toBeFound toBeFound toBeFound toBeFound NullPointerException toBeFound endsWith toBeFound toBeFound toBeFound
Answers true if the two arrays are identical character by character otherwise false The equality is case sensitive br br For example ol li pre first null second null result true pre li li pre first second null result false pre li li pre first a second a result true pre li li pre first A second a result false pre li ol param first the first array param second the second array return true if the two arrays are identical character by character otherwise false public static final boolean equals char first char second if first second return true if first null second null return false if first length second length return false for int i first length i 0 if equals first i second i return false return true 
If is Case Sensite is true answers true if the two arrays are identical character by character otherwise false If it is false answers true if the two arrays are identical character by character without checking the case otherwise false br br For example ol li pre first null second null is Case Sensitive true result true pre li li pre first second null is Case Sensitive true result false pre li li pre first A second a is Case Sensitive true result false pre li li pre first A second a is Case Sensitive false result true pre li ol param first the first array param second the second array param is Case Sensitive check whether or not the equality should be case sensitive return true if the two arrays are identical character by character according to the value of is Case Sensitive otherwise false public static final boolean equals char first char second boolean is Case Sensitive if is Case Sensitive return equals first second if first second return true if first null second null return false if first length second length return false for int i first length i 0 if equals first i second i false return false return true  isCaseSensite isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive
Answers true if the two arrays are identical character by character otherwise false The equality is case sensitive br br For example ol li pre first null second null result true pre li li pre first second null result false pre li li pre first a second a result true pre li li pre first a second A result false pre li ol param first the first array param second the second array return true if the two arrays are identical character by character otherwise false public static final boolean equals char first char second if first second return true if first null second null return false if first length second length return false for int i first length i 0 if first i second i return false return true 
Answers true if the first array is identical character by character to a portion of the second array delimited from position second Start inclusive to second End exclusive otherwise false The equality is case sensitive br br For example ol li pre first null second null second Start 0 second End 0 result true pre li li pre first second null second Start 0 second End 0 result false pre li li pre first a second a second Start 0 second End 1 result true pre li li pre first a second A second Start 0 second End 1 result false pre li ol param first the first array param second the second array param second Start inclusive start position in the second array to compare param second End exclusive end position in the second array to compare return true if the first array is identical character by character to fragment of second array ranging from second Start to second End 1 otherwise false since 3 0 public static final boolean equals char first char second int second Start int second End if first second return true if first null second null return false if first length second End second Start return false for int i first length i 0 if first i second i second Start return false return true  secondStart secondEnd secondStart secondEnd secondStart secondEnd secondStart secondEnd secondStart secondEnd secondStart secondEnd secondStart secondEnd secondStart secondEnd secondEnd secondStart secondStart
If is Case Sensite is true answers true if the two arrays are identical character by character otherwise false If it is false answers true if the two arrays are identical character by character without checking the case otherwise false br br For example ol li pre first null second null is Case Sensitive true result true pre li li pre first second null is Case Sensitive true result false pre li li pre first A second a is Case Sensitive true result false pre li li pre first A second a is Case Sensitive false result true pre li ol param first the first array param second the second array param is Case Sensitive check whether or not the equality should be case sensitive return true if the two arrays are identical character by character according to the value of is Case Sensitive otherwise false public static final boolean equals char first char second boolean is Case Sensitive if is Case Sensitive return equals first second if first second return true if first null second null return false if first length second length return false for int i first length i 0 if Character to Lower Case first i Character to Lower Case second i return false return true  isCaseSensite isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive toLowerCase toLowerCase
If is Case Sensite is true the equality is case sensitive otherwise it is case insensitive Answers true if the name contains the fragment at the starting index start Index otherwise false br br For example ol li pre fragment b c d name a b c d start Index 1 is Case Sensitive true result true pre li li pre fragment b c d name a b C d start Index 1 is Case Sensitive true result false pre li li pre fragment b c d name a b C d start Index 0 is Case Sensitive false result false pre li li pre fragment b c d name a b start Index 0 is Case Sensitive true result false pre li ol param fragment the fragment to check param name the array to check param start Index the starting index param is Case Sensitive check whether or not the equality should be case sensitive return true if the name contains the fragment at the starting index start Index according to the value of is Case Sensitive otherwise false throws Null Pointer Exception if fragment or name is null public static final boolean fragment Equals char fragment char name int start Index boolean is Case Sensitive int max fragment length if name length max start Index return false if is Case Sensitive for int i max i 0 assumes the prefix is not larger than the name if fragment i name i start Index return false return true for int i max i 0 assumes the prefix is not larger than the name if Character to Lower Case fragment i Character to Lower Case name i start Index return false return true  isCaseSensite startIndex startIndex isCaseSensitive startIndex isCaseSensitive startIndex isCaseSensitive startIndex isCaseSensitive startIndex isCaseSensitive startIndex isCaseSensitive NullPointerException fragmentEquals startIndex isCaseSensitive startIndex isCaseSensitive startIndex toLowerCase toLowerCase startIndex
Answers a hashcode for the array param array the array for which a hashcode is required return the hashcode throws Null Pointer Exception if array is null public static final int hash Code char array int hash 0 int offset 0 int length array length if length 16 for int i length i 0 i hash hash 37 array offset else only sample some characters int skip length 8 for int i length i 0 i skip offset skip hash hash 39 array offset return hash 0x7FFFFFFF  NullPointerException hashCode
Answers true if c is a whitespace according to the JLS 92 u000a 92 u000c 92 u000d 92 u0009 otherwise false br br For example ol li pre c result true pre li li pre c 92 u3000 result false pre li ol param c the character to check return true if c is a whitespace according to the JLS otherwise false public static boolean is Whitespace char c switch c case 10 u000a LINE FEED case 12 u000c FORM FEED case 13 u000d CARRIAGE RETURN case 32 u0020 SPACE case 9 u0009 HORIZONTAL TABULATION return true default return false  isWhitespace
Answers the first index in the array for which the corresponding character is equal to to Be Found Answers 1 if no occurrence of this character is found br br For example ol li pre to Be Found c array a b c d result 2 pre li li pre to Be Found e array a b c d result 1 pre li ol param to Be Found the character to search param array the array to be searched return the first index in the array for which the corresponding character is equal to to Be Found 1 otherwise throws Null Pointer Exception if array is null public static final int index Of char to Be Found char array for int i 0 i array length i if to Be Found array i return i return 1  toBeFound toBeFound toBeFound toBeFound toBeFound NullPointerException indexOf toBeFound toBeFound
Answers the first index in the array for which the corresponding character is equal to to Be Found starting the search at index start Answers 1 if no occurrence of this character is found br br For example ol li pre to Be Found c array a b c d start 2 result 2 pre li li pre to Be Found c array a b c d start 3 result 1 pre li li pre to Be Found e array a b c d start 1 result 1 pre li ol param to Be Found the character to search param array the array to be searched param start the starting index return the first index in the array for which the corresponding character is equal to to Be Found 1 otherwise throws Null Pointer Exception if array is null throws Array Index Out Of Bounds Exception if start is lower than 0 public static final int index Of char to Be Found char array int start for int i start i array length i if to Be Found array i return i return 1  toBeFound toBeFound toBeFound toBeFound toBeFound toBeFound NullPointerException ArrayIndexOutOfBoundsException indexOf toBeFound toBeFound
Answers the last index in the array for which the corresponding character is equal to to Be Found starting from the end of the array Answers 1 if no occurrence of this character is found br br For example ol li pre to Be Found c array a b c d c e result 4 pre li li pre to Be Found e array a b c d result 1 pre li ol param to Be Found the character to search param array the array to be searched return the last index in the array for which the corresponding character is equal to to Be Found starting from the end of the array 1 otherwise throws Null Pointer Exception if array is null public static final int last Index Of char to Be Found char array for int i array length i 0 if to Be Found array i return i return 1  toBeFound toBeFound toBeFound toBeFound toBeFound NullPointerException lastIndexOf toBeFound toBeFound
Answers the last index in the array for which the corresponding character is equal to to Be Found stopping at the index start Index Answers 1 if no occurrence of this character is found br br For example ol li pre to Be Found c array a b c d start Index 2 result 2 pre li li pre to Be Found c array a b c d e start Index 3 result 1 pre li li pre to Be Found e array a b c d start Index 0 result 1 pre li ol param to Be Found the character to search param array the array to be searched param start Index the stopping index return the last index in the array for which the corresponding character is equal to to Be Found stopping at the index start Index 1 otherwise throws Null Pointer Exception if array is null throws Array Index Out Of Bounds Exception if start Index is lower than 0 public static final int last Index Of char to Be Found char array int start Index for int i array length i start Index if to Be Found array i return i return 1  toBeFound startIndex toBeFound startIndex toBeFound startIndex toBeFound startIndex toBeFound startIndex toBeFound startIndex NullPointerException ArrayIndexOutOfBoundsException startIndex lastIndexOf toBeFound startIndex startIndex toBeFound
Answers the last index in the array for which the corresponding character is equal to to Be Found starting from end Index to start Index Answers 1 if no occurrence of this character is found br br For example ol li pre to Be Found c array a b c d start Index 2 end Index 2 result 2 pre li li pre to Be Found c array a b c d e start Index 3 end Index 4 result 1 pre li li pre to Be Found e array a b c d start Index 0 end Index 3 result 1 pre li ol param to Be Found the character to search param array the array to be searched param start Index the stopping index param end Index the starting index return the last index in the array for which the corresponding character is equal to to Be Found starting from end Index to start Index 1 otherwise throws Null Pointer Exception if array is null throws Array Index Out Of Bounds Exception if end Index is greater or equals to array length or starting is lower than 0 public static final int last Index Of char to Be Found char array int start Index int end Index for int i end Index i start Index if to Be Found array i return i return 1  toBeFound endIndex startIndex toBeFound startIndex endIndex toBeFound startIndex endIndex toBeFound startIndex endIndex toBeFound startIndex endIndex toBeFound endIndex startIndex NullPointerException ArrayIndexOutOfBoundsException endIndex lastIndexOf toBeFound startIndex endIndex endIndex startIndex toBeFound
Answers the last portion of a name given a separator br br For example pre last Segment java lang Object to Char Array Object pre param array the array param separator the given separator return the last portion of a name given a separator throws Null Pointer Exception if array is null final static public char last Segment char array char separator int pos last Index Of separator array if pos 0 return array return subarray array pos 1 array length  lastSegment toCharArray NullPointerException lastSegment lastIndexOf
Answers true if the pattern matches the given name false otherwise This char pattern matching accepts wild cards and When not case sensitive the pattern is assumed to already be lowercased the name will be lowercased character per character as comparing If name is null the answer is false If pattern is null the answer is true if name is not null br br For example ol li pre pattern b name a b c d is Case Sensitive true result true pre li li pre pattern b name a b c d is Case Sensitive true result false pre li li pre pattern b name a b c d is Case Sensitive true result false pre li ol param pattern the given pattern param name the given name param is Case Sensitive flag to know whether or not the matching should be case sensitive return true if the pattern matches the given name false otherwise public static final boolean match char pattern char name boolean is Case Sensitive if name null return false null name cannot match if pattern null return true null pattern is equivalent to return match pattern 0 pattern length name 0 name length is Case Sensitive  isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive
Answers true if the a sub pattern matches the subpart of the given name false otherwise char pattern matching accepting wild cards and Can match only subset of name pattern end positions are non inclusive The subpattern is defined by the pattern Start and patttern End positions When not case sensitive the pattern is assumed to already be lowercased the name will be lowercased character per character as comparing br br For example ol li pre pattern b pattern Start 1 pattern End 3 name a b c d name Start 1 name End 4 is Case Sensitive true result true pre li li pre pattern b pattern Start 1 pattern End 2 name a b c d name Start 1 name End 2 is Case Sensitive true result false pre li ol param pattern the given pattern param pattern Start the given pattern start param pattern End the given pattern end param name the given name param name Start the given name start param name End the given name end param is Case Sensitive flag to know if the matching should be case sensitive return true if the a sub pattern matches the subpart of the given name false otherwise public static final boolean match char pattern int pattern Start int pattern End char name int name Start int name End boolean is Case Sensitive if name null return false null name cannot match if pattern null return true null pattern is equivalent to int i Pattern pattern Start int i Name name Start if pattern End 0 pattern End pattern length if name End 0 name End name length check first segment char pattern Char 0 while i Pattern pattern End pattern Char pattern i Pattern if i Name name End return false if pattern Char is Case Sensitive name i Name Character to Lower Case name i Name pattern Char return false i Name i Pattern check sequence of star segment int segment Start if pattern Char segment Start i Pattern skip star else segment Start 0 force i Name check int prefix Start i Name check Segment while i Name name End if i Pattern pattern End i Pattern segment Start mismatch restart current segment i Name prefix Start continue check Segment segment is ending if pattern Char pattern i Pattern segment Start i Pattern skip start if segment Start pattern End return true prefix Start i Name continue check Segment check current name character if is Case Sensitive name i Name Character to Lower Case name i Name pattern Char pattern Char i Pattern segment Start mismatch restart current segment i Name prefix Start continue check Segment i Name i Pattern return segment Start pattern End i Name name End i Pattern pattern End i Pattern pattern End 1 pattern i Pattern  patternStart pattternEnd patternStart patternEnd nameStart nameEnd isCaseSensitive patternStart patternEnd nameStart nameEnd isCaseSensitive patternStart patternEnd nameStart nameEnd isCaseSensitive patternStart patternEnd nameStart nameEnd isCaseSensitive iPattern patternStart iName nameStart patternEnd patternEnd nameEnd nameEnd patternChar iPattern patternEnd patternChar iPattern iName nameEnd patternChar isCaseSensitive iName toLowerCase iName patternChar iName iPattern segmentStart patternChar segmentStart iPattern segmentStart iName prefixStart iName checkSegment iName nameEnd iPattern patternEnd iPattern segmentStart iName prefixStart checkSegment patternChar iPattern segmentStart iPattern segmentStart patternEnd prefixStart iName checkSegment isCaseSensitive iName toLowerCase iName patternChar patternChar iPattern segmentStart iName prefixStart checkSegment iName iPattern segmentStart patternEnd iName nameEnd iPattern patternEnd iPattern patternEnd iPattern
Answers true if the pattern matches the filepath using the path Sepatator false otherwise Path char pattern matching accepting wild cards and using Ant directory tasks conventions also see http jakarta apache org ant manual dirtasks html defaultexcludes Path pattern matching is enhancing regular pattern matching in supporting extra rule where represent any folder combination Special rule foo is equivalent to foo When not case sensitive the pattern is assumed to already be lowercased the name will be lowercased character per character as comparing param pattern the given pattern param filepath the given path param is Case Sensitive to find out whether or not the matching should be case sensitive param path Separator the given path separator return true if the pattern matches the filepath using the path Sepatator false otherwise public static final boolean path Match char pattern char filepath boolean is Case Sensitive char path Separator if filepath null return false null name cannot match if pattern null return true null pattern is equivalent to offsets inside pattern int p Segment Start pattern 0 path Separator 1 0 int p Length pattern length int p Segment End Char Operation index Of path Separator pattern p Segment Start 1 if p Segment End 0 p Segment End p Length special case pattern foo is equivalent to foo boolean free Trailing Double Star pattern p Length 1 path Separator offsets inside filepath int f Segment Start f Length filepath length if filepath 0 path Separator f Segment Start 0 else f Segment Start 1 if f Segment Start p Segment Start return false both must start with a separator or none int f Segment End Char Operation index Of path Separator filepath f Segment Start 1 if f Segment End 0 f Segment End f Length first segments while p Segment Start p Length p Segment End p Length free Trailing Double Star p Segment End p Segment Start 2 pattern p Segment Start pattern p Segment Start 1 if f Segment Start f Length return false if Char Operation match pattern p Segment Start p Segment End filepath f Segment Start f Segment End is Case Sensitive return false jump to next segment p Segment End Char Operation index Of path Separator pattern p Segment Start p Segment End 1 skip separator if p Segment End 0 p Segment End p Length f Segment End Char Operation index Of path Separator filepath f Segment Start f Segment End 1 skip separator if f Segment End 0 f Segment End f Length check sequence of double Star segment int p Segment Restart if p Segment Start p Length free Trailing Double Star p Segment End p Segment Start 2 pattern p Segment Start pattern p Segment Start 1 p Segment End Char Operation index Of path Separator pattern p Segment Start p Segment End 1 skip separator if p Segment End 0 p Segment End p Length p Segment Restart p Segment Start else if p Segment Start p Length return f Segment Start f Length true if filepath is done too p Segment Restart 0 force f Segment Start check int f Segment Restart f Segment Start check Segment while f Segment Start f Length if p Segment Start p Length if free Trailing Double Star return true mismatch restart current path segment p Segment End Char Operation index Of path Separator pattern p Segment Start p Segment Restart if p Segment End 0 p Segment End p Length f Segment Restart Char Operation index Of path Separator filepath f Segment Restart 1 skip separator if f Segment Restart 0 f Segment Restart f Length else f Segment Restart f Segment End Char Operation index Of path Separator filepath f Segment Start f Segment Restart if f Segment End 0 f Segment End f Length continue check Segment path segment is ending if p Segment End p Segment Start 2 pattern p Segment Start pattern p Segment Start 1 p Segment End Char Operation index Of path Separator pattern p Segment Start p Segment End 1 skip separator if p Segment End 0 p Segment End p Length p Segment Restart p Segment Start f Segment Restart f Segment Start if p Segment Start p Length return true continue check Segment chech current path segment if Char Operation match pattern p Segment Start p Segment End filepath f Segment Start f Segment End is Case Sensitive mismatch restart current path segment p Segment End Char Operation index Of path Separator pattern p Segment Start p Segment Restart if p Segment End 0 p Segment End p Length f Segment Restart Char Operation index Of path Separator filepath f Segment Restart 1 skip separator if f Segment Restart 0 f Segment Restart f Length else f Segment Restart f Segment End Char Operation index Of path Separator filepath f Segment Start f Segment Restart if f Segment End 0 f Segment End f Length continue check Segment jump to next segment p Segment End Char Operation index Of path Separator pattern p Segment Start p Segment End 1 skip separator if p Segment End 0 p Segment End p Length f Segment End Char Operation index Of path Separator filepath f Segment Start f Segment End 1 skip separator if f Segment End 0 f Segment End f Length return p Segment Restart p Segment End f Segment Start f Length p Segment Start p Length p Segment Start p Length 2 pattern p Segment Start pattern p Segment Start 1 p Segment Start p Length free Trailing Double Star  pathSepatator isCaseSensitive pathSeparator pathSepatator pathMatch isCaseSensitive pathSeparator pSegmentStart pathSeparator pLength pSegmentEnd CharOperation indexOf pathSeparator pSegmentStart pSegmentEnd pSegmentEnd pLength freeTrailingDoubleStar pLength pathSeparator fSegmentStart fLength pathSeparator fSegmentStart fSegmentStart fSegmentStart pSegmentStart fSegmentEnd CharOperation indexOf pathSeparator fSegmentStart fSegmentEnd fSegmentEnd fLength pSegmentStart pLength pSegmentEnd pLength freeTrailingDoubleStar pSegmentEnd pSegmentStart pSegmentStart pSegmentStart fSegmentStart fLength CharOperation pSegmentStart pSegmentEnd fSegmentStart fSegmentEnd isCaseSensitive pSegmentEnd CharOperation indexOf pathSeparator pSegmentStart pSegmentEnd pSegmentEnd pSegmentEnd pLength fSegmentEnd CharOperation indexOf pathSeparator fSegmentStart fSegmentEnd fSegmentEnd fSegmentEnd fLength doubleStar pSegmentRestart pSegmentStart pLength freeTrailingDoubleStar pSegmentEnd pSegmentStart pSegmentStart pSegmentStart pSegmentEnd CharOperation indexOf pathSeparator pSegmentStart pSegmentEnd pSegmentEnd pSegmentEnd pLength pSegmentRestart pSegmentStart pSegmentStart pLength fSegmentStart fLength pSegmentRestart fSegmentStart fSegmentRestart fSegmentStart checkSegment fSegmentStart fLength pSegmentStart pLength freeTrailingDoubleStar pSegmentEnd CharOperation indexOf pathSeparator pSegmentStart pSegmentRestart pSegmentEnd pSegmentEnd pLength fSegmentRestart CharOperation indexOf pathSeparator fSegmentRestart fSegmentRestart fSegmentRestart fLength fSegmentRestart fSegmentEnd CharOperation indexOf pathSeparator fSegmentStart fSegmentRestart fSegmentEnd fSegmentEnd fLength checkSegment pSegmentEnd pSegmentStart pSegmentStart pSegmentStart pSegmentEnd CharOperation indexOf pathSeparator pSegmentStart pSegmentEnd pSegmentEnd pSegmentEnd pLength pSegmentRestart pSegmentStart fSegmentRestart fSegmentStart pSegmentStart pLength checkSegment CharOperation pSegmentStart pSegmentEnd fSegmentStart fSegmentEnd isCaseSensitive pSegmentEnd CharOperation indexOf pathSeparator pSegmentStart pSegmentRestart pSegmentEnd pSegmentEnd pLength fSegmentRestart CharOperation indexOf pathSeparator fSegmentRestart fSegmentRestart fSegmentRestart fLength fSegmentRestart fSegmentEnd CharOperation indexOf pathSeparator fSegmentStart fSegmentRestart fSegmentEnd fSegmentEnd fLength checkSegment pSegmentEnd CharOperation indexOf pathSeparator pSegmentStart pSegmentEnd pSegmentEnd pSegmentEnd pLength fSegmentEnd CharOperation indexOf pathSeparator fSegmentStart fSegmentEnd fSegmentEnd fSegmentEnd fLength pSegmentRestart pSegmentEnd fSegmentStart fLength pSegmentStart pLength pSegmentStart pLength pSegmentStart pSegmentStart pSegmentStart pLength freeTrailingDoubleStar
Answers the number of occurrences of the given character in the given array 0 if any br br For example ol li pre to Be Found b array a b b a b a result 3 pre li li pre to Be Found c array a b b a b a result 0 pre li ol param to Be Found the given character param array the given array return the number of occurrences of the given character in the given array 0 if any throws Null Pointer Exception if array is null public static final int occurences Of char to Be Found char array int count 0 for int i 0 i array length i if to Be Found array i count return count  toBeFound toBeFound toBeFound NullPointerException occurencesOf toBeFound toBeFound
Answers the number of occurrences of the given character in the given array starting at the given index 0 if any br br For example ol li pre to Be Found b array a b b a b a start 2 result 2 pre li li pre to Be Found c array a b b a b a start 0 result 0 pre li ol param to Be Found the given character param array the given array param start the given index return the number of occurrences of the given character in the given array 0 if any throws Null Pointer Exception if array is null throws Array Index Out Of Bounds Exception if start is lower than 0 public static final int occurences Of char to Be Found char array int start int count 0 for int i start i array length i if to Be Found array i count return count  toBeFound toBeFound toBeFound NullPointerException ArrayIndexOutOfBoundsException occurencesOf toBeFound toBeFound
Answers true if the given name starts with the given prefix false otherwise The comparison is case sensitive br br For example ol li pre prefix a b name a b b a b a result true pre li li pre prefix a c name a b b a b a result false pre li ol param prefix the given prefix param name the given name return true if the given name starts with the given prefix false otherwise throws Null Pointer Exception if the given name is null or if the given prefix is null public static final boolean prefix Equals char prefix char name int max prefix length if name length max return false for int i max i 0 assumes the prefix is not larger than the name if prefix i name i return false return true  NullPointerException prefixEquals
Answers true if the given name starts with the given prefix false otherwise is Case Sensitive is used to find out whether or not the comparison should be case sensitive br br For example ol li pre prefix a B name a b b a b a is Case Sensitive false result true pre li li pre prefix a B name a b b a b a is Case Sensitive true result false pre li ol param prefix the given prefix param name the given name param is Case Sensitive to find out whether or not the comparison should be case sensitive return true if the given name starts with the given prefix false otherwise throws Null Pointer Exception if the given name is null or if the given prefix is null public static final boolean prefix Equals char prefix char name boolean is Case Sensitive int max prefix length if name length max return false if is Case Sensitive for int i max i 0 assumes the prefix is not larger than the name if prefix i name i return false return true for int i max i 0 assumes the prefix is not larger than the name if Character to Lower Case prefix i Character to Lower Case name i return false return true  isCaseSensitive isCaseSensitive isCaseSensitive isCaseSensitive NullPointerException prefixEquals isCaseSensitive isCaseSensitive toLowerCase toLowerCase
Replace all occurrence of the character to be replaced with the remplacement character in the given array br br For example ol li pre array a b b a b a to Be Replaced b replacement Char a result No returned value but array is now equals to a a a a a a pre li li pre array a b b a b a to Be Replaced c replacement Char a result No returned value but array is now equals to a b b a b a pre li ol param array the given array param to Be Replaced the character to be replaced param replacement Char the replacement character throws Null Pointer Exception if the given array is null public static final void replace char array char to Be Replaced char replacement Char if to Be Replaced replacement Char for int i 0 max array length i max i if array i to Be Replaced array i replacement Char  toBeReplaced replacementChar toBeReplaced replacementChar toBeReplaced replacementChar NullPointerException toBeReplaced replacementChar toBeReplaced replacementChar toBeReplaced replacementChar
Answers a new array of characters with substitutions No side effect is operated on the original array in case no substitution happened then the result is the same as the original one br br For example ol li pre array a b b a b a to Be Replaced b replacement Char a a result a a a a a a a a a pre li li pre array a b b a b a to Be Replaced c replacement Char a result a b b a b a pre li ol param array the given array param to Be Replaced characters to be replaced param replacement Chars the replacement characters return a new array of characters with substitutions or the given array if none throws Null Pointer Exception if the given array is null public static final char replace char array char to Be Replaced char replacement Chars int max array length int replaced Length to Be Replaced length int replacement Length replacement Chars length int starts new int 5 int occurrence Count 0 if equals to Be Replaced replacement Chars next for int i 0 i max i int j 0 while j replaced Length if i j max continue next if array i j to Be Replaced j continue next if occurrence Count starts length System arraycopy starts 0 starts new int occurrence Count 2 0 occurrence Count starts occurrence Count i if occurrence Count 0 return array char result new char max occurrence Count replacement Length replaced Length int in Start 0 out Start 0 for int i 0 i occurrence Count i int offset starts i in Start System arraycopy array in Start result out Start offset in Start offset out Start offset System arraycopy replacement Chars 0 result out Start replacement Length in Start replaced Length out Start replacement Length System arraycopy array in Start result out Start max in Start return result  toBeReplaced replacementChar toBeReplaced replacementChar toBeReplaced replacementChars NullPointerException toBeReplaced replacementChars replacedLength toBeReplaced replacementLength replacementChars occurrenceCount toBeReplaced replacementChars replacedLength toBeReplaced occurrenceCount occurrenceCount occurrenceCount occurrenceCount occurrenceCount occurrenceCount replacementLength replacedLength inStart outStart occurrenceCount inStart inStart outStart inStart outStart replacementChars outStart replacementLength inStart replacedLength outStart replacementLength inStart outStart inStart
Return a new array which is the split of the given array using the given divider and triming each subarray to remove whitespaces equals to br br For example ol li pre divider b array a b b a b a result a a a pre li li pre divider c array a b b a b a result a b b a b a pre li li pre divider b array a b b a b a result a a a pre li li pre divider c array a b b a b a result a b b a b a pre li ol param divider the given divider param array the given array return a new array which is the split of the given array using the given divider and triming each subarray to remove whitespaces equals to public static final char split And Trim On char divider char array int length array null 0 array length if length 0 return NO CHAR CHAR int word Count 1 for int i 0 i length i if array i divider word Count char split new char word Count int last 0 current Word 0 for int i 0 i length i if array i divider int start last end i 1 while start i array start start while end start array end end split current Word new char end start 1 System arraycopy array start split current Word 0 end start 1 last i 1 int start last end length 1 while start length array start start while end start array end end split current Word new char end start 1 System arraycopy array start split current Word 0 end start 1 return split  splitAndTrimOn NO_CHAR_CHAR wordCount wordCount wordCount currentWord currentWord currentWord currentWord currentWord
Return a new array which is the split of the given array using the given divider br br For example ol li pre divider b array a b b a b a result a a a pre li li pre divider c array a b b a b a result a b b a b a pre li li pre divider c array a b b a b a result a b b a b a pre li ol param divider the given divider param array the given array return a new array which is the split of the given array using the given divider public static final char split On char divider char array int length array null 0 array length if length 0 return NO CHAR CHAR int word Count 1 for int i 0 i length i if array i divider word Count char split new char word Count int last 0 current Word 0 for int i 0 i length i if array i divider split current Word new char i last System arraycopy array last split current Word 0 i last last i 1 split current Word new char length last System arraycopy array last split current Word 0 length last return split  splitOn NO_CHAR_CHAR wordCount wordCount wordCount currentWord currentWord currentWord currentWord currentWord
Return a new array which is the split of the given array using the given divider The given end is exclusive and the given start is inclusive br br For example ol li pre divider b array a b b a b a start 2 end 5 result a pre li ol param divider the given divider param array the given array param start the given starting index param end the given ending index return a new array which is the split of the given array using the given divider throws Array Index Out Of Bounds Exception if start is lower than 0 or end is greater than the array length public static final char split On char divider char array int start int end int length array null 0 array length if length 0 start end return NO CHAR CHAR int word Count 1 for int i start i end i if array i divider word Count char split new char word Count int last start current Word 0 for int i start i end i if array i divider split current Word new char i last System arraycopy array last split current Word 0 i last last i 1 split current Word new char end last System arraycopy array last split current Word 0 end last return split  ArrayIndexOutOfBoundsException splitOn NO_CHAR_CHAR wordCount wordCount wordCount currentWord currentWord currentWord currentWord currentWord
Answers a new array which is a copy of the given array starting at the given start and ending at the given end The given start is inclusive and the given end is exclusive Answers null if start is greater than end if start is lower than 0 or if end is greater than the length of the given array If end equals 1 it is converted to the array length br br For example ol li pre array a b start 0 end 1 result a pre li li pre array a b start 0 end 1 result a b pre li ol param array the given array param start the given starting index param end the given ending index return a new array which is a copy of the given array starting at the given start and ending at the given end throws Null Pointer Exception if the given array is null public static final char subarray char array int start int end if end 1 end array length if start end return null if start 0 return null if end array length return null char result new char end start System arraycopy array start result 0 end start return result  NullPointerException
Answers a new array which is a copy of the given array starting at the given start and ending at the given end The given start is inclusive and the given end is exclusive Answers null if start is greater than end if start is lower than 0 or if end is greater than the length of the given array If end equals 1 it is converted to the array length br br For example ol li pre array a b start 0 end 1 result a pre li li pre array a b start 0 end 1 result a b pre li ol param array the given array param start the given starting index param end the given ending index return a new array which is a copy of the given array starting at the given start and ending at the given end throws Null Pointer Exception if the given array is null public static final char subarray char array int start int end if end 1 end array length if start end return null if start 0 return null if end array length return null char result new char end start System arraycopy array start result 0 end start return result  NullPointerException
Answers the result of a char conversion to lowercase Answers null if the given chars array is null br NOTE If no conversion was necessary then answers back the argument one br br For example ol li pre chars a b result a b pre li li pre array A b result a b pre li ol param chars the chars to convert return the result of a char conversion to lowercase final static public char to Lower Case char chars if chars null return null int length chars length char lower Chars null for int i 0 i length i char c chars i char lc Character to Lower Case c if c lc lower Chars null if lower Chars null System arraycopy chars 0 lower Chars new char length 0 i lower Chars i lc return lower Chars null chars lower Chars  toLowerCase lowerChars toLowerCase lowerChars lowerChars lowerChars lowerChars lowerChars lowerChars
Answers a new array removing leading and trailing spaces Answers the given array if there is no space characters to remove br br For example ol li pre chars a b result a b pre li li pre array A b result A b pre li ol param chars the given array return a new array removing leading and trailing spaces final static public char trim char chars if chars null return null int start 0 length chars length end length 1 while start length chars start start while end start chars end end if start 0 end length 1 return subarray chars start end 1 return chars 
Answers a string which is the concatenation of the given array using the as a separator br br For example ol li pre array a b result a b pre li li pre array a b result a b pre li ol param array the given array return a string which is the concatenation of the given array using the as a separator final static public String to String char array char result concat With array return new String result  toString concatWith
Answers an array of strings from the given array of char array param array the given array return an array of strings since 3 0 final static public String to Strings char array int length array length String result new String length for int i 0 i length i result i new String array i return result  toStrings

Creates a new exception with no detail message public Invalid Input Exception super  InvalidInputException
Creates a new exception with the given detail message param message the detail message public Invalid Input Exception String message super message  InvalidInputException

Answer back the original arguments recorded into the problem return the original arguments recorded into the problem 
Returns the problem id return the problem id 
Answer a localized human readable message string which describes the problem return a localized human readable message string which describes the problem 
Answer the file name in which the problem was found return the file name in which the problem was found 
Answer the end position of the problem inclusive or 1 if unknown return the end position of the problem inclusive or 1 if unknown 
Answer the line number in source where the problem begins return the line number in source where the problem begins 
Answer the start position of the problem inclusive or 1 if unknown return the start position of the problem inclusive or 1 if unknown 
Checks the severity to see if the Error bit is set return true if the Error bit is set for the severity false otherwise 
Checks the severity to see if the Error bit is not set return true if the Error bit is not set for the severity false otherwise 
Set the end position of the problem inclusive or 1 if unknown Used for shifting problem positions param source End the given end position  sourceEnd
Set the line number in source where the problem begins param line Number the given line number  lineNumber
Set the start position of the problem inclusive or 1 if unknown Used for shifting problem positions param source Start the given start position  sourceStart

Answers the current identifier source after unicode escape sequences have been translated into unicode characters For example if original source was code u0061bc code then it will answer code abc code return the current identifier source after unicode escape sequences have been translated into unicode characters 
Answers the current identifier source before unicode escape sequences have been translated into unicode characters For example if original source was code u0061bc code then it will answer code u0061bc code return the current identifier source before unicode escape sequences have been translated into unicode characters since 2 1 
Answers the starting position of the current token inside the original source This position is zero based and inclusive It corresponds to the position of the first character which is part of this token If this character was a unicode escape sequence it points at the first character of this sequence return the starting position of the current token inside the original source 
Answers the ending position of the current token inside the original source This position is zero based and inclusive It corresponds to the position of the last character which is part of this token If this character was a unicode escape sequence it points at the last character of this sequence return the ending position of the current token inside the original source 
Answers the starting position of a given line number This line has to have been encountered already in the tokenization process in other words it cannot be used to compute positions of lines beyond current token Once the entire source has been processed it can be used without any limit Line starting positions are zero based and start immediately after the previous line separator if any param line Number the given line number return the starting position of a given line number  lineNumber
Answers the ending position of a given line number This line has to have been encountered already in the tokenization process in other words it cannot be used to compute positions of lines beyond current token Once the entire source has been processed it can be used without any limit Line ending positions are zero based and correspond to the last character of the line separator in case multi character line separators param line Number the given line number return the ending position of a given line number  lineNumber
Answers an array of the ending positions of the lines encountered so far Line ending positions are zero based and correspond to the last character of the line separator in case multi character line separators return an array of the ending positions of the lines encountered so far 
Answers a 1 based line number using the lines which have been encountered so far If the position is located beyond the current scanned line then the last line number will be answered param char Position the given character position return a 1 based line number using the lines which have been encountered so far  charPosition
Read the next token in the source and answers its ID as specified by code I Terminal Symbols code Note that the actual token ID values are subject to change if new keywords were added to the language for instance assert is a keyword in 1 4 throws Invalid Input Exception in case a lexical error was detected while reading the current token return the next token  ITerminalSymbols InvalidInputException
Answers the original source being processed not a copy of it return the original source being processed 
Reposition the scanner on some portion of the original source The given end Position is the last valid position Beyond this position the scanner will answer EOF tokens code I Terminal Symbols Token NameEOF code param start Position the given start position param end Position the given end position  endPosition ITerminalSymbols TokenNameEOF startPosition endPosition
Set the scanner source to process By default the scanner will consider starting at the beginning of the source until it reaches its end param source the given source 

Creates a basic completion proposal All instance field have plausible default values unless otherwise noted p Note that the constructors for this class are internal to the Java model implementation Clients cannot directly create Completion Proposal objects p param kind one of the kind constants declared on this class param completion Offset original offset of code completion request return a new completion proposal public static Completion Proposal create int kind int completion Offset return new Completion Proposal kind completion Offset  CompletionProposal completionOffset CompletionProposal completionOffset CompletionProposal completionOffset
Creates a basic completion proposal All instance field have plausible default values unless otherwise noted p Note that the constructors for this class are internal to the Java model implementation Clients cannot directly create Completion Proposal objects p param kind one of the kind constants declared on this class param completion Location original offset of code completion request Completion Proposal int kind int completion Location if kind Completion Proposal ANONYMOUS CLASS DECLARATION kind Completion Proposal VARIABLE DECLARATION throw new Illegal Argument Exception if this completion null completion Location 0 throw new Illegal Argument Exception this completion Kind kind this completion Location completion Location  CompletionProposal completionLocation CompletionProposal completionLocation CompletionProposal ANONYMOUS_CLASS_DECLARATION CompletionProposal VARIABLE_DECLARATION IllegalArgumentException completionLocation IllegalArgumentException completionKind completionLocation completionLocation
Returns the kind of completion being proposed p The set of different kinds of completion proposals is expected to change over time It is strongly recommended that clients do b not b assume that the kind is one of the ones they know about and code defensively for the possibility of unexpected future growth p return the kind one of the kind constants declared on this class or possibly a kind unknown to the caller public int get Kind return this completion Kind  getKind completionKind
Returns the character index in the source file buffer where source completion was requested the code offset code parameter to code I Code Assist code Complete code return character index in source file buffer see I Code Assist code Complete int Completion Requestor public int get Completion Location return this completion Location  ICodeAssist codeComplete ICodeAssist codeComplete CompletionRequestor getCompletionLocation completionLocation
Returns the character index of the start of the subrange in the source file buffer containing the relevant token being completed This token is either the identifier or Java language keyword under or immediately preceding the original request offset If the original request offset is not within or immediately after an identifier or keyword then the position returned is original request offset and the token range is empty return character index of token start position inclusive public int get Token Start return this token Start  getTokenStart tokenStart
Returns the character index of the end exclusive of the subrange in the source file buffer containing the relevant token When there is no relevant token the range is empty code get End Token get Start Token code return character index of token end position exclusive public int get Token End return this token End  getEndToken getStartToken getTokenEnd tokenEnd
Sets the character indices of the subrange in the source file buffer containing the relevant token being completed This token is either the identifier or Java language keyword under or immediately preceding the original request offset If the original request offset is not within or immediately after an identifier or keyword then the source range begins at original request offset and is empty p If not set defaults to empty subrange at 0 0 p param start Index character index of token start position inclusive param end Index character index of token end position exclusive public void set Token Range int start Index int end Index if start Index 0 end Index start Index throw new Illegal Argument Exception this token Start start Index this token End end Index  startIndex endIndex setTokenRange startIndex endIndex startIndex endIndex startIndex IllegalArgumentException tokenStart startIndex tokenEnd endIndex
Returns the proposed sequence of characters to insert into the source file buffer replacing the characters at the specified source range The string can be arbitrary for example it might include not only the name of a method but a set of parentheses p The client must not modify the array returned p return the completion string public char get Completion return this completion  getCompletion
Sets the proposed sequence of characters to insert into the source file buffer replacing the characters at the specified source range The string can be arbitrary for example it might include not only the name of a method but a set of parentheses p If not set defaults to an empty character array p p The completion engine creates instances of this class and sets its properties this method is not intended to be used by other clients p param completion the completion string public void set Completion char completion this completion completion  setCompletion
Returns the character index of the start of the subrange in the source file buffer to be replaced by the completion string If the subrange is empty code get Replace End get Replace Start code the completion string is to be inserted at this index p Note that while the token subrange is precisely specified the replacement range is loosely constrained and may not bear any direct relation to the original request offset For example a it would be possible for a type completion to propose inserting an import declaration at the top of the compilation unit or the completion might include trailing parentheses and punctuation for a method completion p return replacement start position inclusive public int get Replace Start return this replace Start  getReplaceEnd getReplaceStart getReplaceStart replaceStart
Returns the character index of the end of the subrange in the source file buffer to be replaced by the completion string If the subrange is empty code get Replace End get Replace Start code the completion string is to be inserted at this index return replacement end position exclusive public int get Replace End return this replace End  getReplaceEnd getReplaceStart getReplaceEnd replaceEnd
Sets the character indices of the subrange in the source file buffer to be replaced by the completion string If the subrange is empty code start Index end Index code the completion string is to be inserted at this index p If not set defaults to empty subrange at 0 0 p p The completion engine creates instances of this class and sets its properties this method is not intended to be used by other clients p param start Index character index of replacement start position inclusive param end Index character index of replacement end position exclusive public void set Replace Range int start Index int end Index if start Index 0 end Index start Index throw new Illegal Argument Exception this replace Start start Index this replace End end Index  startIndex endIndex startIndex endIndex setReplaceRange startIndex endIndex startIndex endIndex startIndex IllegalArgumentException replaceStart startIndex replaceEnd endIndex
Returns the relative relevance rating of this proposal return relevance rating of this proposal ratings are positive higher means better public int get Relevance return this relevance  getRelevance
Sets the relative relevance rating of this proposal p If not set defaults to the lowest possible rating 1 p p The completion engine creates instances of this class and sets its properties this method is not intended to be used by other clients p param rating relevance rating of this proposal ratings are positive higher means better public void set Relevance int rating if rating 0 throw new Illegal Argument Exception this relevance rating  setRelevance IllegalArgumentException
Returns the type or package signature of the relevant declaration in the context or code null code if none p This field is available for the following kinds of completion proposals ul li code ANONYMOUS CLASS DECLARATION code type signature of the type that is being subclassed or implemented li li code FIELD REF code type signature of the type that declares the field that is referenced li li code METHOD REF code type signature of the type that declares the method that is referenced li li code METHOD DECLARATION code type signature of the type that declares the method that is being implemented or overridden li li code PACKAGE REF code dot based package signature of the package that is referenced li li code TYPE REF code dot based package signature of the package containing the type that is referenced li ul For kinds of completion proposals this method returns code null code Clients must not modify the array returned p return the declaration signature or code null code if none see Signature public char get Declaration Signature return this declaration Signature  ANONYMOUS_CLASS_DECLARATION FIELD_REF METHOD_REF METHOD_DECLARATION PACKAGE_REF TYPE_REF getDeclarationSignature declarationSignature
Sets the type or package signature of the relevant declaration in the context or code null code if none p If not set defaults to none p p The completion engine creates instances of this class and sets its properties this method is not intended to be used by other clients p param signature the type or package signature or code null code if none public void set Declaration Signature char signature this declaration Signature signature  setDeclarationSignature declarationSignature
Returns the simple name of the method field member or variable relevant in the context or code null code if none p This field is available for the following kinds of completion proposals ul li code FIELD REF code the name of the field li li code KEYWORD code the keyword li li code LABEL REF code the name of the label li li code LOCAL VARIABLE REF code the name of the local variable li li code METHOD REF code the name of the method li li code METHOD DECLARATION code the name of the method li li code VARIABLE DECLARATION code the name of the variable li ul For kinds of completion proposals this method returns code null code Clients must not modify the array returned p return the keyword field method local variable or member name or code null code if none public char get Name return this name  FIELD_REF LABEL_REF LOCAL_VARIABLE_REF METHOD_REF METHOD_DECLARATION VARIABLE_DECLARATION getName
Sets the simple name of the method field member or variable relevant in the context or code null code if none p If not set defaults to none p p The completion engine creates instances of this class and sets its properties this method is not intended to be used by other clients p param name the keyword field method local variable or member name or code null code if none public void set Name char name this name name  setName
Returns the signature of the method or type relevant in the context or code null code if none p This field is available for the following kinds of completion proposals ul li code ANONYMOUS CLASS DECLARATION code method signature of the constructor that is being invoked li li code FIELD REF code the type signature of the referenced field s type li li code LOCAL VARIABLE REF code the type signature of the referenced local variable s type li li code METHOD REF code method signature of the method that is referenced li li code METHOD DECLARATION code method signature of the method that is being implemented or overridden li li code TYPE REF code type signature of the type that is referenced li li code VARIABLE DECLARATION code the type signature of the type of the variable being declared li ul For kinds of completion proposals this method returns code null code Clients must not modify the array returned p return the signature or code null code if none see Signature public char get Signature return this signature  ANONYMOUS_CLASS_DECLARATION FIELD_REF LOCAL_VARIABLE_REF METHOD_REF METHOD_DECLARATION TYPE_REF VARIABLE_DECLARATION getSignature
Sets the signature of the method field type member type relevant in the context or code null code if none p If not set defaults to none p p The completion engine creates instances of this class and sets its properties this method is not intended to be used by other clients p param signature the signature or code null code if none public void set Signature char signature this signature signature  setSignature
Returns the modifier flags relevant in the context or code Flags Acc Default code if none p This field is available for the following kinds of completion proposals ul li code ANONYMOUS CLASS DECLARATION code modifier flags of the constructor that is referenced li li code FIELD REF code modifier flags of the field that is referenced code Flags Acc Enum code can be used to recognize references to enum constants li li code KEYWORD code modifier flag corrresponding to the modifier keyword li li code LOCAL VARIABLE REF code modifier flags of the local variable that is referenced li li code METHOD REF code modifier flags of the method that is referenced code Flags Acc Annotation code can be used to recognize references to annotation type members li li code METHOD DECLARATION code modifier flags for the method that is being implemented or overridden li li code TYPE REF code modifier flags of the type that is referenced code Flags Acc Interface code can be used to recognize references to interfaces code Flags Acc Enum code enum types and code Flags Acc Annotation code annotation types li li code VARIABLE DECLARATION code modifier flags for the variable being declared li ul For kinds of completion proposals this method returns code Flags Acc Default code p return the modifier flags or code Flags Acc Default code if none see Flags public int get Flags return this flags  AccDefault ANONYMOUS_CLASS_DECLARATION FIELD_REF AccEnum LOCAL_VARIABLE_REF METHOD_REF AccAnnotation METHOD_DECLARATION TYPE_REF AccInterface AccEnum AccAnnotation VARIABLE_DECLARATION AccDefault AccDefault getFlags
Sets the modifier flags relevant in the context p If not set defaults to none p p The completion engine creates instances of this class and sets its properties this method is not intended to be used by other clients p param flags the modifier flags or code Flags Acc Default code if none public void set Flags int flags this flags flags  AccDefault setFlags
Finds the method parameter names This information is relevant to method reference and method declaration proposals Returns code null code if not available or not relevant p The client must not modify the array returned p p b Note that this is an expensive thing to compute which may require parsing Java source files etc Use sparingly p param monitor the progress monitor or code null code if none return the parameter names or code null code if none or not available or not relevant public char find Parameter Names I Progress Monitor monitor if this parameter Names Computed this parameter Names Computed true TODO jerome Missing implementation return this parameter Names  findParameterNames IProgressMonitor parameterNamesComputed parameterNamesComputed parameterNames
Sets the method parameter names This information is relevant to method reference and method declaration proposals p The completion engine creates instances of this class and sets its properties this method is not intended to be used by other clients p param parameter Names the parameter names or code null code if none public void set Parameter Names char parameter Names this parameter Names parameter Names this parameter Names Computed true  parameterNames setParameterNames parameterNames parameterNames parameterNames parameterNamesComputed

Creates a new completion requestor The requestor is interested in all kinds of completion proposals none will be ignored public Completion Requestor do nothing  CompletionRequestor
Returns whether the given kind of completion proposal is ignored param completion Proposal Kind one of the kind constants declared on code Completion Proposal code return code true code if the given kind of completion proposal is ignored by this requestor and code false code if it is of interest see set Ignored int boolean see Completion Proposal get Kind public final boolean is Ignored int completion Proposal Kind if completion Proposal Kind Completion Proposal ANONYMOUS CLASS DECLARATION completion Proposal Kind Completion Proposal VARIABLE DECLARATION throw new Illegal Argument Exception return 0 this ignore Set 1 completion Proposal Kind  completionProposalKind CompletionProposal setIgnored CompletionProposal getKind isIgnored completionProposalKind completionProposalKind CompletionProposal ANONYMOUS_CLASS_DECLARATION completionProposalKind CompletionProposal VARIABLE_DECLARATION IllegalArgumentException ignoreSet completionProposalKind
Sets whether the given kind of completion proposal is ignored param completion Proposal Kind one of the kind constants declared on code Completion Proposal code param ignore code true code if the given kind of completion proposal is ignored by this requestor and code false code if it is of interest see is Ignored int see Completion Proposal get Kind public final void set Ignored int completion Proposal Kind boolean ignore if completion Proposal Kind Completion Proposal ANONYMOUS CLASS DECLARATION completion Proposal Kind Completion Proposal VARIABLE DECLARATION throw new Illegal Argument Exception if ignore this ignore Set 1 completion Proposal Kind else this ignore Set 1 completion Proposal Kind  completionProposalKind CompletionProposal isIgnored CompletionProposal getKind setIgnored completionProposalKind completionProposalKind CompletionProposal ANONYMOUS_CLASS_DECLARATION completionProposalKind CompletionProposal VARIABLE_DECLARATION IllegalArgumentException ignoreSet completionProposalKind ignoreSet completionProposalKind
Pro forma notification sent before reporting a batch of completion proposals p The default implementation of this method does nothing Clients may override p public void begin Reporting do nothing  beginReporting
Pro forma notification sent after reporting a batch of completion proposals p The default implementation of this method does nothing Clients may override p public void end Reporting do nothing  endReporting
Notification of failure to produce any completions The problem object explains what prevented completing p The default implementation of this method does nothing Clients may override to receive this kind of notice p param problem the problem object public void completion Failure I Problem problem default behavior is to ignore  completionFailure IProblem
Proposes a completion Has no effect if the kind of proposal is being ignored by this requestor Callers should consider checking link is Ignored int before avoid creating proposal objects that would only be ignored p Similarly implementers should check link is Ignored int is Ignored proposal get Kind and ignore proposals that have been declared as uninteresting The proposal object passed in only valid for the duration of this call implementors must not hang on to these objects param proposal the completion proposal exception Illegal Argument Exception if the proposal is null  isIgnored isIgnored isIgnored getKind IllegalArgumentException

public void accept Anonymous Type char super Type Package Name char super Type Name char parameter Package Names char parameter Type Names char parameter Names char completion Name int modifiers int completion Start int completion End int relevance default behavior is to ignore  acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart completionEnd
public void accept Class char package Name char class Name char completion Name int modifiers int completion Start int completion End int relevance default behavior is to ignore  acceptClass packageName className completionName completionStart completionEnd
see I Completion Requestor accept Error I Problem public void accept Error I Problem error default behavior is to ignore  ICompletionRequestor acceptError IProblem acceptError IProblem
public void accept Field char declaring Type Package Name char declaring Type Name char name char type Package Name char type Name char completion Name int modifiers int completion Start int completion End int relevance default behavior is to ignore  acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart completionEnd
public void accept Interface char package Name char interface Name char completion Name int modifiers int completion Start int completion End int relevance default behavior is to ignore  acceptInterface packageName interfaceName completionName completionStart completionEnd
public void accept Keyword char keyword Name int completion Start int completion End int relevance default behavior is to ignore  acceptKeyword keywordName completionStart completionEnd
public void accept Label char label Name int completion Start int completion End int relevance default behavior is to ignore  acceptLabel labelName completionStart completionEnd
public void accept Local Variable char name char type Package Name char type Name int modifiers int completion Start int completion End int relevance default behavior is to ignore  acceptLocalVariable typePackageName typeName completionStart completionEnd
public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance default behavior is to ignore  acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd
public void accept Method Declaration char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance default behavior is to ignore  acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd
public void accept Modifier char modifier Name int completion Start int completion End int relevance default behavior is to ignore  acceptModifier modifierName completionStart completionEnd
public void accept Package char package Name char completion Name int completion Start int completion End int relevance default behavior is to ignore  acceptPackage packageName completionName completionStart completionEnd
public void accept Type char package Name char type Name char completion Name int completion Start int completion End int relevance default behavior is to ignore  acceptType packageName typeName completionName completionStart completionEnd
public void accept Variable Name char type Package Name char type Name char name char completion Name int completion Start int completion End int relevance default behavior is to ignore  acceptVariableName typePackageName typeName completionName completionStart completionEnd

The Correction Engine is responsible for computing problem corrections param setting java util Map set of options used to configure the code correction engine CURRENTLY THERE IS NO CORRECTION SPECIFIC SETTINGS public Correction Engine Map setting settings ignored for now  CorrectionEngine CorrectionEngine
Performs code correction for the given marker reporting results to the given correction requestor Correction results are answered through a requestor param marker the marker which describe the problem to correct param target Unit replace the compilation unit given by the marker Ignored if null param position Offset the offset of position given by the marker param requestor the given correction requestor exception Illegal Argument Exception if code requestor code is code null code exception Java Model Exception currently this exception is never thrown but the opportunity to thrown an exception when the correction failed is kept for later since 2 0 public void compute Corrections I Marker marker I Compilation Unit target Unit int position Offset I Correction Requestor requestor throws Java Model Exception I Java Element element target Unit null Java Core create marker get Resource target Unit if element instanceof I Compilation Unit return I Compilation Unit unit I Compilation Unit element int id marker get Attribute I Java Model Marker ID 1 String args Util get Problem Arguments From Marker marker get Attribute I Java Model Marker ARGUMENTS NON NLS 1 int start marker get Attribute I Marker CHAR START 1 int end marker get Attribute I Marker CHAR END 1 compute Corrections unit id start position Offset end position Offset args requestor  targetUnit positionOffset IllegalArgumentException JavaModelException computeCorrections IMarker ICompilationUnit targetUnit positionOffset ICorrectionRequestor JavaModelException IJavaElement targetUnit JavaCore getResource targetUnit ICompilationUnit ICompilationUnit ICompilationUnit getAttribute IJavaModelMarker getProblemArgumentsFromMarker getAttribute IJavaModelMarker getAttribute IMarker CHAR_START getAttribute IMarker CHAR_END computeCorrections positionOffset positionOffset
Performs code correction for the given I Problem reporting results to the given correction requestor Correction results are answered through a requestor param problem the problem which describe the problem to correct param target Unit denote the compilation unit in which correction occurs Cannot be null param requestor the given correction requestor exception Illegal Argument Exception if code target Unit code or code requestor code is code null code exception Java Model Exception currently this exception is never thrown but the opportunity to thrown an exception when the correction failed is kept for later since 2 0 public void compute Corrections I Problem problem I Compilation Unit target Unit I Correction Requestor requestor throws Java Model Exception if requestor null throw new Illegal Argument Exception Util bind correction null Unit NON NLS 1 this compute Corrections target Unit problem getID problem get Source Start problem get Source End problem get Arguments requestor  IProblem targetUnit IllegalArgumentException targetUnit JavaModelException computeCorrections IProblem ICompilationUnit targetUnit ICorrectionRequestor JavaModelException IllegalArgumentException nullUnit computeCorrections targetUnit getSourceStart getSourceEnd getArguments
private void compute Corrections I Compilation Unit unit int id int start int end String arguments I Correction Requestor requestor if id 1 arguments null start 1 end 1 return if requestor null throw new Illegal Argument Exception Util bind correction null Requestor NON NLS 1 this correction Requestor requestor this correction Start start this correction End end this compilation Unit unit String argument null try switch id Type correction case I Problem Field Type Not Found case I Problem Argument Type Not Found this filter CLASSES INTERFACES argument arguments 2 break case I Problem Superclass Not Found this filter CLASSES argument arguments 0 break case I Problem Interface Not Found this filter INTERFACES argument arguments 0 break case I Problem Exception Type Not Found this filter CLASSES argument arguments 1 break case I Problem Return Type Not Found this filter CLASSES INTERFACES argument arguments 1 break case I Problem Import Not Found this filter IMPORT argument arguments 0 break case I Problem Undefined Type this filter CLASSES INTERFACES argument arguments 0 break Method correction case I Problem Undefined Method this filter METHOD argument arguments 1 break Field and local variable correction case I Problem Undefined Field this filter FIELD argument arguments 0 break case I Problem Undefined Name this filter FIELD LOCAL argument arguments 0 break catch Array Index Out Of Bounds Exception e return if argument null correct argument to Char Array  computeCorrections ICompilationUnit ICorrectionRequestor IllegalArgumentException nullRequestor correctionRequestor correctionStart correctionEnd compilationUnit IProblem FieldTypeNotFound IProblem ArgumentTypeNotFound IProblem SuperclassNotFound IProblem InterfaceNotFound IProblem ExceptionTypeNotFound IProblem ReturnTypeNotFound IProblem ImportNotFound IProblem UndefinedType IProblem UndefinedMethod IProblem UndefinedField IProblem UndefinedName ArrayIndexOutOfBoundsException toCharArray
private void correct char argument try String source this compilation Unit get Source Scanner scanner new Scanner scanner set Source source to Char Array scanner reset To this correction Start this correction End int token 0 char argument Source Char Operation NO CHAR search last segment position while true token scanner get Next Token if token Terminal Tokens Token NameEOF return char token Source scanner get Current Token Source argument Source Char Operation concat argument Source token Source if Char Operation prefix Equals argument Source argument return if Char Operation equals argument argument Source this correction Start scanner start Position this correction End scanner current Position this prefix Length Char Operation last Index Of argument 1 break search completion position int completion Position this correction Start scanner reset To completion Position this correction End int position completion Position for int i 0 i 4 i if scanner get Next Char As Java Identifier Part completion Position position position scanner current Position else break this compilation Unit code Complete completion Position this completion Requestor catch Java Model Exception e return catch Invalid Input Exception e return  compilationUnit getSource setSource toCharArray resetTo correctionStart correctionEnd argumentSource CharOperation NO_CHAR getNextToken TerminalTokens TokenNameEOF tokenSource getCurrentTokenSource argumentSource CharOperation argumentSource tokenSource CharOperation prefixEquals argumentSource CharOperation argumentSource correctionStart startPosition correctionEnd currentPosition prefixLength CharOperation lastIndexOf completionPosition correctionStart resetTo completionPosition correctionEnd completionPosition getNextCharAsJavaIdentifierPart completionPosition currentPosition compilationUnit codeComplete completionPosition completionRequestor JavaModelException InvalidInputException
protected I Completion Requestor completion Requestor new I Completion Requestor public void accept Anonymous Type char super Type Package Name char super Type Name char parameter Package Names char parameter Type Names char parameter Names char completion Name int modifiers int completion Start int completion End int relevance  ICompletionRequestor completionRequestor ICompletionRequestor acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart completionEnd
public void accept Anonymous Type char super Type Package Name char super Type Name char parameter Package Names char parameter Type Names char parameter Names char completion Name int modifiers int completion Start int completion End int relevance public void accept Class char package Name char class Name char completion Name int modifiers int completion Start int completion End int relevance if Correction Engine this filter CLASSES INTERFACES 0 Correction Engine this correction Requestor accept Class package Name class Name Char Operation subarray completion Name Correction Engine this prefix Length completion Name length modifiers Correction Engine this correction Start Correction Engine this correction End else if Correction Engine this filter IMPORT 0 char full Name Char Operation concat package Name class Name Correction Engine this correction Requestor accept Class package Name class Name Char Operation subarray full Name Correction Engine this prefix Length full Name length modifiers Correction Engine this correction Start Correction Engine this correction End  acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart completionEnd acceptClass packageName className completionName completionStart completionEnd CorrectionEngine CorrectionEngine correctionRequestor acceptClass packageName className CharOperation completionName CorrectionEngine prefixLength completionName CorrectionEngine correctionStart CorrectionEngine correctionEnd CorrectionEngine fullName CharOperation packageName className CorrectionEngine correctionRequestor acceptClass packageName className CharOperation fullName CorrectionEngine prefixLength fullName CorrectionEngine correctionStart CorrectionEngine correctionEnd
public void accept Error I Problem error  acceptError IProblem
public void accept Error I Problem error public void accept Field char declaring Type Package Name char declaring Type Name char name char type Package Name char type Name char completion Name int modifiers int completion Start int completion End int relevance if Correction Engine this filter FIELD 0 Correction Engine this correction Requestor accept Field declaring Type Package Name declaring Type Name name type Package Name type Name name modifiers Correction Engine this correction Start Correction Engine this correction End  acceptError IProblem acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart completionEnd CorrectionEngine CorrectionEngine correctionRequestor acceptField declaringTypePackageName declaringTypeName typePackageName typeName CorrectionEngine correctionStart CorrectionEngine correctionEnd
public void accept Interface char package Name char interface Name char completion Name int modifiers int completion Start int completion End int relevance if Correction Engine this filter CLASSES INTERFACES 0 Correction Engine this correction Requestor accept Interface package Name interface Name Char Operation subarray completion Name Correction Engine this prefix Length completion Name length modifiers Correction Engine this correction Start Correction Engine this correction End else if Correction Engine this filter IMPORT 0 char full Name Char Operation concat package Name interface Name Correction Engine this correction Requestor accept Interface package Name interface Name Char Operation subarray full Name Correction Engine this prefix Length full Name length modifiers Correction Engine this correction Start Correction Engine this correction End  acceptInterface packageName interfaceName completionName completionStart completionEnd CorrectionEngine CorrectionEngine correctionRequestor acceptInterface packageName interfaceName CharOperation completionName CorrectionEngine prefixLength completionName CorrectionEngine correctionStart CorrectionEngine correctionEnd CorrectionEngine fullName CharOperation packageName interfaceName CorrectionEngine correctionRequestor acceptInterface packageName interfaceName CharOperation fullName CorrectionEngine prefixLength fullName CorrectionEngine correctionStart CorrectionEngine correctionEnd
public void accept Keyword char keyword Name int completion Start int completion End int relevance  acceptKeyword keywordName completionStart completionEnd
public void accept Keyword char keyword Name int completion Start int completion End int relevance public void accept Label char label Name int completion Start int completion End int relevance  acceptKeyword keywordName completionStart completionEnd acceptLabel labelName completionStart completionEnd
public void accept Label char label Name int completion Start int completion End int relevance public void accept Local Variable char name char type Package Name char type Name int modifiers int completion Start int completion End int relevance if Correction Engine this filter LOCAL 0 Correction Engine this correction Requestor accept Local Variable name type Package Name type Name modifiers Correction Engine this correction Start Correction Engine this correction End  acceptLabel labelName completionStart completionEnd acceptLocalVariable typePackageName typeName completionStart completionEnd CorrectionEngine CorrectionEngine correctionRequestor acceptLocalVariable typePackageName typeName CorrectionEngine correctionStart CorrectionEngine correctionEnd
public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance if Correction Engine this filter METHOD 0 Correction Engine this correction Requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names parameter Names return Type Package Name return Type Name selector modifiers Correction Engine this correction Start Correction Engine this correction End  acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd CorrectionEngine CorrectionEngine correctionRequestor acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName CorrectionEngine correctionStart CorrectionEngine correctionEnd
public void accept Method Declaration char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance  acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd
public void accept Method Declaration char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance public void accept Modifier char modifier Name int completion Start int completion End int relevance  acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptModifier modifierName completionStart completionEnd
public void accept Modifier char modifier Name int completion Start int completion End int relevance public void accept Package char package Name char completion Name int completion Start int completion End int relevance if Correction Engine this filter CLASSES INTERFACES IMPORT 0 Correction Engine this correction Requestor accept Package package Name Char Operation subarray package Name Correction Engine this prefix Length package Name length Correction Engine this correction Start Correction Engine this correction End  acceptModifier modifierName completionStart completionEnd acceptPackage packageName completionName completionStart completionEnd CorrectionEngine CorrectionEngine correctionRequestor acceptPackage packageName CharOperation packageName CorrectionEngine prefixLength packageName CorrectionEngine correctionStart CorrectionEngine correctionEnd
public void accept Type char package Name char type Name char completion Name int completion Start int completion End int relevance  acceptType packageName typeName completionName completionStart completionEnd
public void accept Type char package Name char type Name char completion Name int completion Start int completion End int relevance public void accept Variable Name char type Package Name char type Name char name char completion Name int completion Start int completion End int relevance  acceptType packageName typeName completionName completionStart completionEnd acceptVariableName typePackageName typeName completionName completionStart completionEnd
Helper method for decoding problem marker attributes Returns an array of String arguments extracted from the problem marker arguments attribute or code null code if the marker arguments attribute is missing or ill formed param problem Marker the problem marker to decode arguments from return an array of String arguments or code null code if unable to extract arguments since 2 1 public static String get Problem Arguments I Marker problem Marker String arguments String problem Marker get Attribute I Java Model Marker ARGUMENTS null return Util get Problem Arguments From Marker arguments String  problemMarker getProblemArguments IMarker problemMarker argumentsString problemMarker getAttribute IJavaModelMarker getProblemArgumentsFromMarker argumentsString

Returns structural property descriptor for the body Declarations property of this node return the property descriptor  bodyDeclarations
Returns structural property descriptor for the name property of this node return the property descriptor 
Creates and returns a structural property descriptor for the body Declaration property declared on the given concrete node type return the property descriptor static final Child List Property Descriptor internal Body Declaration Property Factory Class node Class return new Child List Property Descriptor node Class body Declarations Body Declaration class CYCLE RISK NON NLS 1  bodyDeclaration ChildListPropertyDescriptor internalBodyDeclarationPropertyFactory nodeClass ChildListPropertyDescriptor nodeClass bodyDeclarations BodyDeclaration CYCLE_RISK
Creates and returns a structural property descriptor for the name property declared on the given concrete node type return the property descriptor static final Child Property Descriptor internal Name Property Factory Class node Class return new Child Property Descriptor node Class name Name class MANDATORY NO CYCLE RISK NON NLS 1  ChildPropertyDescriptor internalNamePropertyFactory nodeClass ChildPropertyDescriptor nodeClass NO_CYCLE_RISK
Creates a new AST node for an abstract type declaration owned by the given AST p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Abstract Type Declaration AST ast super ast this body Declarations new AST Node Node List internal Body Declarations Property  AbstractTypeDeclaration bodyDeclarations ASTNode NodeList internalBodyDeclarationsProperty
Returns the name of the type declared in this type declaration return the type name node since 2 0 originally declared on code Type Declaration code public Simple Name get Name if this type Name null lazy init must be thread safe for readers synchronized this if this type Name null pre Lazy Init this type Name new Simple Name this ast post Lazy Init this type Name internal Name Property return this type Name  TypeDeclaration SimpleName getName typeName typeName preLazyInit typeName SimpleName postLazyInit typeName internalNameProperty typeName
Sets the name of the type declared in this type declaration to the given name param type Name the new type name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul since 2 0 originally declared on code Type Declaration code public void set Name Simple Name type Name if type Name null throw new Illegal Argument Exception Child Property Descriptor p internal Name Property AST Node old Child this type Name pre Replace Child old Child type Name p this type Name type Name post Replace Child old Child type Name p  typeName IllegalArgumentException TypeDeclaration setName SimpleName typeName typeName IllegalArgumentException ChildPropertyDescriptor internalNameProperty ASTNode oldChild typeName preReplaceChild oldChild typeName typeName typeName postReplaceChild oldChild typeName
Returns the live ordered list of body declarations of this type declaration return the live list of body declarations element type code Body Declaration code since 2 0 originally declared on code Type Declaration code public List body Declarations return this body Declarations  BodyDeclaration TypeDeclaration bodyDeclarations bodyDeclarations
Returns whether this type declaration is a package member that is a top level type p Note that this is a convenience method that simply checks whether this node s parent is a compilation unit node p return code true code if this type declaration is a child of a compilation unit node and code false code otherwise since 2 0 originally declared on code Type Declaration code public boolean is Package Member Type Declaration AST Node parent get Parent return parent instanceof Compilation Unit  TypeDeclaration isPackageMemberTypeDeclaration ASTNode getParent CompilationUnit
Returns whether this type declaration is a type member p Note that this is a convenience method that simply checks whether this node s parent is a type declaration node an anonymous class declaration or an enumeration constant declaration p return code true code if this type declaration is a child of a type declaration node a class instance creation node or an enum constant declaration and code false code otherwise since 2 0 originally declared on code Type Declaration code public boolean is Member Type Declaration AST Node parent get Parent return parent instanceof Abstract Type Declaration parent instanceof Anonymous Class Declaration parent instanceof Enum Constant Declaration  TypeDeclaration isMemberTypeDeclaration ASTNode getParent AbstractTypeDeclaration AnonymousClassDeclaration EnumConstantDeclaration
Returns whether this type declaration is a local type p Note that this is a convenience method that simply checks whether this node s parent is a type declaration statement node p return code true code if this type declaration is a child of a type declaration statement node and code false code otherwise since 2 0 originally declared on code Type Declaration code public boolean is Local Type Declaration AST Node parent get Parent return parent instanceof Type Declaration Statement  TypeDeclaration isLocalTypeDeclaration ASTNode getParent TypeDeclarationStatement
Method declared on AST Node int mem Size return super mem Size 2 4  ASTNode memSize memSize

Returns structural property descriptor for the type Name property of this node return the property descriptor  typeName
Creates and returns a structural property descriptor for the type Name property declared on the given concrete node type return the property descriptor static final Child Property Descriptor internal Type Name Property Factory Class node Class return new Child Property Descriptor node Class type Name Name class MANDATORY NO CYCLE RISK NON NLS 1  typeName ChildPropertyDescriptor internalTypeNamePropertyFactory nodeClass ChildPropertyDescriptor nodeClass typeName NO_CYCLE_RISK
Creates a new AST node for an annotation node owned by the given AST p N B This constructor is package private p param ast the AST that is to own this node Annotation AST ast super ast 
see I Extended Modifier is Modifier public boolean is Modifier return false  IExtendedModifier isModifier isModifier
see I Extended Modifier is Annotation public boolean is Annotation return true  IExtendedModifier isAnnotation isAnnotation
Returns the annotation type name of this annotation return the annotation type name public Name get Type Name if this type Name null lazy init must be thread safe for readers synchronized this if this type Name null pre Lazy Init this type Name new Simple Name this ast post Lazy Init this type Name internal Type Name Property return this type Name  getTypeName typeName typeName preLazyInit typeName SimpleName postLazyInit typeName internalTypeNameProperty typeName
Sets the annotation type name of this annotation param type Name the annotation type name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Type Name Name type Name if type Name null throw new Illegal Argument Exception Child Property Descriptor p internal Type Name Property AST Node old Child this type Name pre Replace Child old Child type Name p this type Name type Name post Replace Child old Child type Name p  typeName IllegalArgumentException setTypeName typeName typeName IllegalArgumentException ChildPropertyDescriptor internalTypeNameProperty ASTNode oldChild typeName preReplaceChild oldChild typeName typeName typeName postReplaceChild oldChild typeName
Returns whether this is a normal annotation link Normal Annotation return code true code if this is a normal annotation and code false code otherwise public boolean is Normal Annotation return this instanceof Normal Annotation  NormalAnnotation isNormalAnnotation NormalAnnotation
Returns whether this is a marker annotation link Marker Annotation return code true code if this is a marker annotation and code false code otherwise public boolean is Marker Annotation return this instanceof Marker Annotation  MarkerAnnotation isMarkerAnnotation MarkerAnnotation
Returns whether this is a single member annotation link Single Member Annotation return code true code if this is a single member annotation and code false code otherwise public boolean is Single Member Annotation return this instanceof Single Member Annotation  SingleMemberAnnotation isSingleMemberAnnotation SingleMemberAnnotation
Method declared on AST Node int mem Size return BASE NODE SIZE 1 4  ASTNode memSize BASE_NODE_SIZE

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for an annotation type declaration owned by the given AST By default the type declaration is for an annotation type of an unspecified but legal name no modifiers no javadoc and an empty list of body declarations p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Annotation Type Declaration AST ast super ast unsupported In2  AnnotationTypeDeclaration unsupportedIn2
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property JAVADOC PROPERTY if get return get Javadoc else set Javadoc Javadoc child return null if property NAME PROPERTY if get return get Name else set Name Simple Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode JAVADOC_PROPERTY getJavadoc setJavadoc NAME_PROPERTY getName setName SimpleName internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property MODIFIERS2 PROPERTY return modifiers if property BODY DECLARATIONS PROPERTY return body Declarations allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor MODIFIERS2_PROPERTY BODY_DECLARATIONS_PROPERTY bodyDeclarations internalGetChildListProperty
Method declared on Body Declaration final Child Property Descriptor internal Javadoc Property return JAVADOC PROPERTY  BodyDeclaration ChildPropertyDescriptor internalJavadocProperty JAVADOC_PROPERTY
Method declared on Body Declaration final Child List Property Descriptor internal Modifiers2 Property return MODIFIERS2 PROPERTY  BodyDeclaration ChildListPropertyDescriptor internalModifiers2Property MODIFIERS2_PROPERTY
Method declared on Body Declaration final Simple Property Descriptor internal Modifiers Property this property will not be asked for node type did not exist in JLS2 return null  BodyDeclaration SimplePropertyDescriptor internalModifiersProperty
Method declared on Abstract Type Declaration final Child Property Descriptor internal Name Property return NAME PROPERTY  AbstractTypeDeclaration ChildPropertyDescriptor internalNameProperty NAME_PROPERTY
Method declared on Abstract Type Declaration final Child List Property Descriptor internal Body Declarations Property return BODY DECLARATIONS PROPERTY  AbstractTypeDeclaration ChildListPropertyDescriptor internalBodyDeclarationsProperty BODY_DECLARATIONS_PROPERTY
Method declared on AST Node final int get Node Type0 return ANNOTATION TYPE DECLARATION  ASTNode getNodeType0 ANNOTATION_TYPE_DECLARATION
AST Node clone0 AST target Annotation Type Declaration result new Annotation Type Declaration target result set Source Range this get Start Position this get Length result set Javadoc Javadoc AST Node copy Subtree target get Javadoc result modifiers add All AST Node copy Subtrees target modifiers result set Name Simple Name get Name clone target result body Declarations add All AST Node copy Subtrees target body Declarations return result  ASTNode AnnotationTypeDeclaration AnnotationTypeDeclaration setSourceRange getStartPosition getLength setJavadoc ASTNode copySubtree getJavadoc addAll ASTNode copySubtrees setName SimpleName getName bodyDeclarations addAll ASTNode copySubtrees bodyDeclarations
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Javadoc accept Children visitor this modifiers accept Child visitor get Name accept Children visitor this body Declarations visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getJavadoc acceptChildren acceptChild getName acceptChildren bodyDeclarations endVisit
Resolves and returns the binding for the annotation type declared in this annotation type declaration p Note that bindings are generally unavailable unless requested when the AST is being built p return the binding or code null code if the binding cannot be resolved public I Type Binding resolve Binding return this ast get Binding Resolver resolve Type this  ITypeBinding resolveBinding getBindingResolver resolveType
Method declared on AST Node int mem Size return super mem Size  ASTNode memSize memSize
int tree Size return mem Size this optional Doc Comment null 0 get Javadoc tree Size this modifiers list Size this type Name null 0 get Name tree Size this body Declarations list Size  treeSize memSize optionalDocComment getJavadoc treeSize listSize typeName getName treeSize bodyDeclarations listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for an annotation type member declaration owned by the given AST By default the declaration is for a member of an unspecified but legal name no modifiers no javadoc an unspecified value type and no default value p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Annotation Type Member Declaration AST ast super ast unsupported In2  AnnotationTypeMemberDeclaration unsupportedIn2
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property JAVADOC PROPERTY if get return get Javadoc else set Javadoc Javadoc child return null if property NAME PROPERTY if get return get Name else set Name Simple Name child return null if property NAME PROPERTY if get return get Name else set Name Simple Name child return null if property TYPE PROPERTY if get return get Type else set Type Type child return null if property DEFAULT PROPERTY if get return get Default else set Default Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode JAVADOC_PROPERTY getJavadoc setJavadoc NAME_PROPERTY getName setName SimpleName NAME_PROPERTY getName setName SimpleName TYPE_PROPERTY getType setType DEFAULT_PROPERTY getDefault setDefault internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property MODIFIERS2 PROPERTY return modifiers allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor MODIFIERS2_PROPERTY internalGetChildListProperty
Method declared on Body Declaration final Child Property Descriptor internal Javadoc Property return JAVADOC PROPERTY  BodyDeclaration ChildPropertyDescriptor internalJavadocProperty JAVADOC_PROPERTY
Method declared on Body Declaration final Child List Property Descriptor internal Modifiers2 Property return MODIFIERS2 PROPERTY  BodyDeclaration ChildListPropertyDescriptor internalModifiers2Property MODIFIERS2_PROPERTY
Method declared on Body Declaration final Simple Property Descriptor internal Modifiers Property this property will not be asked for node type did not exist in JLS2 return null  BodyDeclaration SimplePropertyDescriptor internalModifiersProperty
Method declared on AST Node final int get Node Type0 return ANNOTATION TYPE MEMBER DECLARATION  ASTNode getNodeType0 ANNOTATION_TYPE_MEMBER_DECLARATION
AST Node clone0 AST target Annotation Type Member Declaration result new Annotation Type Member Declaration target result set Source Range this get Start Position this get Length result set Javadoc Javadoc AST Node copy Subtree target get Javadoc result modifiers add All AST Node copy Subtrees target modifiers result set Type Type AST Node copy Subtree target get Type result set Name Simple Name get Name clone target result set Default Expression AST Node copy Subtree target get Default return result  ASTNode AnnotationTypeMemberDeclaration AnnotationTypeMemberDeclaration setSourceRange getStartPosition getLength setJavadoc ASTNode copySubtree getJavadoc addAll ASTNode copySubtrees setType ASTNode copySubtree getType setName SimpleName getName setDefault ASTNode copySubtree getDefault
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Javadoc accept Children visitor this modifiers accept Child visitor get Type accept Child visitor get Name accept Child visitor get Default visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getJavadoc acceptChildren acceptChild getType acceptChild getName acceptChild getDefault endVisit
Returns the name of the annotation type member declared in this declaration return the member name node public Simple Name get Name if this member Name null lazy init must be thread safe for readers synchronized this if this member Name null pre Lazy Init this member Name new Simple Name this ast post Lazy Init this member Name NAME PROPERTY return this member Name  SimpleName getName memberName memberName preLazyInit memberName SimpleName postLazyInit memberName NAME_PROPERTY memberName
Sets the name of the annotation type member declared in this declaration to the given name param member Name the new member name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Name Simple Name member Name if member Name null throw new Illegal Argument Exception AST Node old Child this member Name pre Replace Child old Child member Name NAME PROPERTY this member Name member Name post Replace Child old Child member Name NAME PROPERTY  memberName IllegalArgumentException setName SimpleName memberName memberName IllegalArgumentException ASTNode oldChild memberName preReplaceChild oldChild memberName NAME_PROPERTY memberName memberName postReplaceChild oldChild memberName NAME_PROPERTY
Returns the type of the annotation type member declared in this declaration return the type of the member public Type get Type if this member Type null lazy init must be thread safe for readers synchronized this if this member Type null pre Lazy Init this member Type this ast new Primitive Type Primitive Type INT post Lazy Init this member Type TYPE PROPERTY return this member Type  getType memberType memberType preLazyInit memberType newPrimitiveType PrimitiveType postLazyInit memberType TYPE_PROPERTY memberType
Sets the type of the annotation type member declared in this declaration to the given type param type the new member type exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Type Type type if type null throw new Illegal Argument Exception AST Node old Child this member Type pre Replace Child old Child type TYPE PROPERTY this member Type type post Replace Child old Child type TYPE PROPERTY  IllegalArgumentException setType IllegalArgumentException ASTNode oldChild memberType preReplaceChild oldChild TYPE_PROPERTY memberType postReplaceChild oldChild TYPE_PROPERTY
Returns the default value of this annotation type member or code null code if there is none return the expression node or code null code if there is none public Expression get Default return this optional Default Value  getDefault optionalDefaultValue
Sets or clears the default value of this annotation type member param default Value the expression node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Default Expression default Value a Annotation Type Member Declaration may occur inside an Expression must check cycles AST Node old Child this optional Default Value pre Replace Child old Child default Value DEFAULT PROPERTY this optional Default Value default Value post Replace Child old Child default Value DEFAULT PROPERTY  defaultValue IllegalArgumentException setDefault defaultValue AnnotationTypeMemberDeclaration ASTNode oldChild optionalDefaultValue preReplaceChild oldChild defaultValue DEFAULT_PROPERTY optionalDefaultValue defaultValue postReplaceChild oldChild defaultValue DEFAULT_PROPERTY
Resolves and returns the binding for the annotation type member declared in this declaration p Note that bindings are generally unavailable unless requested when the AST is being built p return the binding or code null code if the binding cannot be resolved public I Variable Binding resolve Binding return this ast get Binding Resolver resolve Member this  IVariableBinding resolveBinding getBindingResolver resolveMember
Method declared on AST Node int mem Size return super mem Size 3 4  ASTNode memSize memSize
int tree Size return mem Size this optional Doc Comment null 0 get Javadoc tree Size this modifiers list Size this member Name null 0 get Name tree Size this member Type null 0 get Type tree Size this optional Default Value null 0 get Default tree Size  treeSize memSize optionalDocComment getJavadoc treeSize listSize memberName getName treeSize memberType getType treeSize optionalDefaultValue getDefault treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for an anonymous class declaration owned by the given AST By default the list of body declarations is empty p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Anonymous Class Declaration AST ast super ast  AnonymousClassDeclaration
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final List internal Get Child List Property Child List Property Descriptor property if property BODY DECLARATIONS PROPERTY return body Declarations allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor BODY_DECLARATIONS_PROPERTY bodyDeclarations internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return ANONYMOUS CLASS DECLARATION  ASTNode getNodeType0 ANONYMOUS_CLASS_DECLARATION
AST Node clone0 AST target Anonymous Class Declaration result new Anonymous Class Declaration target result set Source Range this get Start Position this get Length result body Declarations add All AST Node copy Subtrees target body Declarations return result  ASTNode AnonymousClassDeclaration AnonymousClassDeclaration setSourceRange getStartPosition getLength bodyDeclarations addAll ASTNode copySubtrees bodyDeclarations
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Children visitor body Declarations visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChildren bodyDeclarations endVisit
Returns the live ordered list of body declarations of this anonymous class declaration return the live list of body declarations element type code Body Declaration code public List body Declarations return this body Declarations  BodyDeclaration bodyDeclarations bodyDeclarations
Resolves and returns the binding for the anonymous class declared in this declaration p Note that bindings are generally unavailable unless requested when the AST is being built p return the binding or code null code if the binding cannot be resolved public I Type Binding resolve Binding return this ast get Binding Resolver resolve Type this  ITypeBinding resolveBinding getBindingResolver resolveType
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this body Declarations list Size  treeSize memSize bodyDeclarations listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented array access expression node owned by the given AST By default the array and index expresssions are unspecified but legal p N B This constructor is package private p param ast the AST that is to own this node Array Access AST ast super ast  ArrayAccess
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property ARRAY PROPERTY if get return get Array else set Array Expression child return null if property INDEX PROPERTY if get return get Index else set Index Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode ARRAY_PROPERTY getArray setArray INDEX_PROPERTY getIndex setIndex internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return ARRAY ACCESS  ASTNode getNodeType0 ARRAY_ACCESS
AST Node clone0 AST target Array Access result new Array Access target result set Source Range this get Start Position this get Length result set Array Expression get Array clone target result set Index Expression get Index clone target return result  ASTNode ArrayAccess ArrayAccess setSourceRange getStartPosition getLength setArray getArray setIndex getIndex
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Array accept Child visitor get Index visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getArray acceptChild getIndex endVisit
Returns the array expression of this array access expression return the array expression node public Expression get Array if this array Expression null lazy init must be thread safe for readers synchronized this if this array Expression null pre Lazy Init this array Expression new Simple Name this ast post Lazy Init this array Expression ARRAY PROPERTY return this array Expression  getArray arrayExpression arrayExpression preLazyInit arrayExpression SimpleName postLazyInit arrayExpression ARRAY_PROPERTY arrayExpression
Sets the array expression of this array access expression param expression the array expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Array Expression expression if expression null throw new Illegal Argument Exception an Array Access may occur inside an Expression must check cycles AST Node old Child this array Expression pre Replace Child old Child expression ARRAY PROPERTY this array Expression expression post Replace Child old Child expression ARRAY PROPERTY  IllegalArgumentException setArray IllegalArgumentException ArrayAccess ASTNode oldChild arrayExpression preReplaceChild oldChild ARRAY_PROPERTY arrayExpression postReplaceChild oldChild ARRAY_PROPERTY
Returns the index expression of this array access expression return the index expression node public Expression get Index if this index Expression null lazy init must be thread safe for readers synchronized this if this index Expression null pre Lazy Init this index Expression new Simple Name this ast post Lazy Init this index Expression INDEX PROPERTY return this index Expression  getIndex indexExpression indexExpression preLazyInit indexExpression SimpleName postLazyInit indexExpression INDEX_PROPERTY indexExpression
Sets the index expression of this array access expression param expression the index expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Index Expression expression if expression null throw new Illegal Argument Exception an Array Access may occur inside an Expression must check cycles AST Node old Child this index Expression pre Replace Child old Child expression INDEX PROPERTY this index Expression expression post Replace Child old Child expression INDEX PROPERTY  IllegalArgumentException setIndex IllegalArgumentException ArrayAccess ASTNode oldChild indexExpression preReplaceChild oldChild INDEX_PROPERTY indexExpression postReplaceChild oldChild INDEX_PROPERTY
Method declared on AST Node int mem Size return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this array Expression null 0 get Array tree Size this index Expression null 0 get Index tree Size  treeSize memSize arrayExpression getArray treeSize indexExpression getIndex treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for an array creation expression owned by the given AST By default the array type is an unspecified 1 dimensional array the list of dimensions is empty and there is no array initializer param ast the AST that is to own this node Array Creation AST ast super ast  ArrayCreation
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property INITIALIZER PROPERTY if get return get Initializer else set Initializer Array Initializer child return null if property TYPE PROPERTY if get return get Type else set Type Array Type child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode INITIALIZER_PROPERTY getInitializer setInitializer ArrayInitializer TYPE_PROPERTY getType setType ArrayType internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property DIMENSIONS PROPERTY return dimensions allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor DIMENSIONS_PROPERTY internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return ARRAY CREATION  ASTNode getNodeType0 ARRAY_CREATION
AST Node clone0 AST target Array Creation result new Array Creation target result set Source Range this get Start Position this get Length result set Type Array Type get Type clone target result dimensions add All AST Node copy Subtrees target dimensions result set Initializer Array Initializer AST Node copy Subtree target get Initializer return result  ASTNode ArrayCreation ArrayCreation setSourceRange getStartPosition getLength setType ArrayType getType addAll ASTNode copySubtrees setInitializer ArrayInitializer ASTNode copySubtree getInitializer
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Type accept Children visitor this dimensions accept Child visitor get Initializer visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getType acceptChildren acceptChild getInitializer endVisit
Returns the array type in this array creation expression return the array type public Array Type get Type if this array Type null lazy init must be thread safe for readers synchronized this if this array Type null pre Lazy Init this array Type this ast new Array Type this ast new Primitive Type Primitive Type INT post Lazy Init this array Type TYPE PROPERTY return this array Type  ArrayType getType arrayType arrayType preLazyInit arrayType newArrayType newPrimitiveType PrimitiveType postLazyInit arrayType TYPE_PROPERTY arrayType
Sets the array type in this array creation expression param type the new array type exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Type Array Type type if type null throw new Illegal Argument Exception an Array Creation cannot occur inside a Array Type cycles not possible AST Node old Child this array Type pre Replace Child old Child type TYPE PROPERTY this array Type type post Replace Child old Child type TYPE PROPERTY  IllegalArgumentException setType ArrayType IllegalArgumentException ArrayCreation ArrayType ASTNode oldChild arrayType preReplaceChild oldChild TYPE_PROPERTY arrayType postReplaceChild oldChild TYPE_PROPERTY
Returns the live ordered list of dimension expressions in this array initializer return the live list of dimension expressions element type code Expression code public List dimensions return this dimensions 
Returns the array initializer of this array creation expression or code null code if there is none return the array initializer node or code null code if there is none public Array Initializer get Initializer return optional Initializer  ArrayInitializer getInitializer optionalInitializer
Sets or clears the array initializer of this array creation expression param initializer the array initializer node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Initializer Array Initializer initializer an Array Creation may occur inside an Array Initializer must check cycles AST Node old Child this optional Initializer pre Replace Child old Child initializer INITIALIZER PROPERTY this optional Initializer initializer post Replace Child old Child initializer INITIALIZER PROPERTY  IllegalArgumentException setInitializer ArrayInitializer ArrayCreation ArrayInitializer ASTNode oldChild optionalInitializer preReplaceChild oldChild INITIALIZER_PROPERTY optionalInitializer postReplaceChild oldChild INITIALIZER_PROPERTY
Method declared on AST Node int mem Size return BASE NODE SIZE 3 4  ASTNode memSize BASE_NODE_SIZE
int tree Size int size mem Size this array Type null 0 get Type tree Size this optional Initializer null 0 get Initializer tree Size this dimensions list Size return size  treeSize memSize arrayType getType treeSize optionalInitializer getInitializer treeSize listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for an array initializer owned by the given AST By default the list of expressions is empty param ast the AST that is to own this node Array Initializer AST ast super ast  ArrayInitializer
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final List internal Get Child List Property Child List Property Descriptor property if property EXPRESSIONS PROPERTY return expressions allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor EXPRESSIONS_PROPERTY internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return ARRAY INITIALIZER  ASTNode getNodeType0 ARRAY_INITIALIZER
AST Node clone0 AST target Array Initializer result new Array Initializer target result set Source Range this get Start Position this get Length result expressions add All AST Node copy Subtrees target expressions return result  ASTNode ArrayInitializer ArrayInitializer setSourceRange getStartPosition getLength addAll ASTNode copySubtrees
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Children visitor this expressions visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChildren endVisit
Returns the live ordered list of expressions in this array initializer return the live list of expressions element type code Expression code public List expressions return this expressions 
Method declared on AST Node int mem Size return BASE NODE SIZE 1 4  ASTNode memSize BASE_NODE_SIZE
Method declared on AST Node int tree Size return mem Size this expressions list Size  ASTNode treeSize memSize listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented node for an array type owned by the given AST By default a 1 dimensional array of an unspecified simple type p N B This constructor is package private p param ast the AST that is to own this node Array Type AST ast super ast  ArrayType
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property COMPONENT TYPE PROPERTY if get return get Component Type else set Component Type Type child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode COMPONENT_TYPE_PROPERTY getComponentType setComponentType internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return ARRAY TYPE  ASTNode getNodeType0 ARRAY_TYPE
AST Node clone0 AST target Array Type result new Array Type target result set Source Range this get Start Position this get Length result set Component Type Type get Component Type clone target return result  ASTNode ArrayType ArrayType setSourceRange getStartPosition getLength setComponentType getComponentType
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Child visitor get Component Type visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getComponentType endVisit
Returns the component type of this array type The component type may be another array type return the component type node public Type get Component Type if this component Type null lazy init must be thread safe for readers synchronized this if this component Type null pre Lazy Init this component Type new Simple Type this ast post Lazy Init this component Type COMPONENT TYPE PROPERTY return this component Type  getComponentType componentType componentType preLazyInit componentType SimpleType postLazyInit componentType COMPONENT_TYPE_PROPERTY componentType
Sets the component type of this array type The component type may be another array type param component Type the component type exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Component Type Type component Type if component Type null throw new Illegal Argument Exception AST Node old Child this component Type pre Replace Child old Child component Type COMPONENT TYPE PROPERTY this component Type component Type post Replace Child old Child component Type COMPONENT TYPE PROPERTY  componentType IllegalArgumentException setComponentType componentType componentType IllegalArgumentException ASTNode oldChild componentType preReplaceChild oldChild componentType COMPONENT_TYPE_PROPERTY componentType componentType postReplaceChild oldChild componentType COMPONENT_TYPE_PROPERTY
Returns the element type of this array type The element type is never an array type p This is a convenience method that descends a chain of nested array types until it reaches a non array type p return the component type node public Type get Element Type Type t get Component Type while t is Array Type t Array Type t get Component Type return t  getElementType getComponentType isArrayType ArrayType getComponentType
Returns the number of dimensions in this array type p This is a convenience method that descends a chain of nested array types until it reaches a non array type p return the number of dimensions always positive public int get Dimensions Type t get Component Type int dimensions 1 always include this array type while t is Array Type dimensions t Array Type t get Component Type return dimensions  getDimensions getComponentType isArrayType ArrayType getComponentType
Method declared on AST Node int mem Size return BASE NODE SIZE 1 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this component Type null 0 get Component Type tree Size  treeSize memSize componentType getComponentType treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented assert statement node owned by the given AST By default the assert statement has an unspecified but legal expression and not message expression p N B This constructor is package private p param ast the AST that is to own this node Assert Statement AST ast super ast  AssertStatement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null if property MESSAGE PROPERTY if get return get Message else set Message Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression MESSAGE_PROPERTY getMessage setMessage internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return ASSERT STATEMENT  ASTNode getNodeType0 ASSERT_STATEMENT
AST Node clone0 AST target Assert Statement result new Assert Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Expression Expression AST Node copy Subtree target get Expression result set Message Expression AST Node copy Subtree target get Message return result  ASTNode AssertStatement AssertStatement setSourceRange getStartPosition getLength copyLeadingComment setExpression ASTNode copySubtree getExpression setMessage ASTNode copySubtree getMessage
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Expression accept Child visitor get Message visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getExpression acceptChild getMessage endVisit
Returns the first expression of this assert statement return the expression node public Expression get Expression if this expression null lazy init must be thread safe for readers synchronized this if this expression null pre Lazy Init this expression new Simple Name this ast post Lazy Init this expression EXPRESSION PROPERTY return expression  getExpression preLazyInit SimpleName postLazyInit EXPRESSION_PROPERTY
Sets the first expression of this assert statement param expression the new expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression if expression null throw new Illegal Argument Exception an Assert Statement may occur inside an Expression must check cycles AST Node old Child this expression pre Replace Child old Child expression EXPRESSION PROPERTY this expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression IllegalArgumentException AssertStatement ASTNode oldChild preReplaceChild oldChild EXPRESSION_PROPERTY postReplaceChild oldChild EXPRESSION_PROPERTY
Returns the message expression of this assert statement or code null code if there is none return the message expression node or code null code if there is none public Expression get Message return this optional Message Expression  getMessage optionalMessageExpression
Sets or clears the message expression of this assert statement param expression the message expression node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Message Expression expression an Asert Statement may occur inside an Expression must check cycles AST Node old Child this optional Message Expression pre Replace Child old Child expression MESSAGE PROPERTY this optional Message Expression expression post Replace Child old Child expression MESSAGE PROPERTY  IllegalArgumentException setMessage AsertStatement ASTNode oldChild optionalMessageExpression preReplaceChild oldChild MESSAGE_PROPERTY optionalMessageExpression postReplaceChild oldChild MESSAGE_PROPERTY
Method declared on AST Node int mem Size return super mem Size 2 4  ASTNode memSize memSize
int tree Size return mem Size this expression null 0 get Expression tree Size this optional Message Expression null 0 get Message tree Size  treeSize memSize getExpression treeSize optionalMessageExpression getMessage treeSize

Creates a new assignment operator with the given name p Note this constructor is private The only instances ever created are the ones for the standard operators p param op the character sequence for the operator private Operator String op this op op 
Returns the character sequence for the operator return the character sequence for the operator public String to String return op  toString
Returns the assignment operator corresponding to the given string or code null code if none p code to Operator code is the converse of code to String code that is code Operator to Operator op to String op code for all operators code op code p param token the character sequence for the operator return the assignment operator or code null code if none public static Operator to Operator String token return Operator CODES get token  toOperator toString toOperator toString toOperator
Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for an assignment expression owned by the given AST By default the node has an assignment operator and unspecified left and right hand sides param ast the AST that is to own this node Assignment AST ast super ast 
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final Object internal Get Set Object Property Simple Property Descriptor property boolean get Object value if property OPERATOR PROPERTY if get return get Operator else set Operator Operator value return null allow default implementation to flag the error return super internal Get Set Object Property property get value  internalGetSetObjectProperty SimplePropertyDescriptor OPERATOR_PROPERTY getOperator setOperator internalGetSetObjectProperty
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property LEFT HAND SIDE PROPERTY if get return get Left Hand Side else set Left Hand Side Expression child return null if property RIGHT HAND SIDE PROPERTY if get return get Right Hand Side else set Right Hand Side Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode LEFT_HAND_SIDE_PROPERTY getLeftHandSide setLeftHandSide RIGHT_HAND_SIDE_PROPERTY getRightHandSide setRightHandSide internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return ASSIGNMENT  ASTNode getNodeType0
AST Node clone0 AST target Assignment result new Assignment target result set Source Range this get Start Position this get Length result set Operator get Operator result set Left Hand Side Expression get Left Hand Side clone target result set Right Hand Side Expression get Right Hand Side clone target return result  ASTNode setSourceRange getStartPosition getLength setOperator getOperator setLeftHandSide getLeftHandSide setRightHandSide getRightHandSide
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Left Hand Side accept Child visitor get Right Hand Side visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getLeftHandSide acceptChild getRightHandSide endVisit
Returns the operator of this assignment expression return the assignment operator public Assignment Operator get Operator return this assignment Operator  getOperator assignmentOperator
Sets the operator of this assignment expression param assignment Operator the assignment operator exception Illegal Argument Exception if the argument is incorrect public void set Operator Assignment Operator assignment Operator if assignment Operator null throw new Illegal Argument Exception pre Value Change OPERATOR PROPERTY this assignment Operator assignment Operator post Value Change OPERATOR PROPERTY  assignmentOperator IllegalArgumentException setOperator assignmentOperator assignmentOperator IllegalArgumentException preValueChange OPERATOR_PROPERTY assignmentOperator assignmentOperator postValueChange OPERATOR_PROPERTY
Returns the left hand side of this assignment expression return the left hand side node public Expression get Left Hand Side if this left Hand Side null lazy init must be thread safe for readers synchronized this if this left Hand Side null pre Lazy Init this left Hand Side new Simple Name this ast post Lazy Init this left Hand Side LEFT HAND SIDE PROPERTY return this left Hand Side  getLeftHandSide leftHandSide leftHandSide preLazyInit leftHandSide SimpleName postLazyInit leftHandSide LEFT_HAND_SIDE_PROPERTY leftHandSide
Sets the left hand side of this assignment expression param expression the left hand side node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Left Hand Side Expression expression if expression null throw new Illegal Argument Exception an Assignment may occur inside a Expression must check cycles AST Node old Child this left Hand Side pre Replace Child old Child expression LEFT HAND SIDE PROPERTY this left Hand Side expression post Replace Child old Child expression LEFT HAND SIDE PROPERTY  IllegalArgumentException setLeftHandSide IllegalArgumentException ASTNode oldChild leftHandSide preReplaceChild oldChild LEFT_HAND_SIDE_PROPERTY leftHandSide postReplaceChild oldChild LEFT_HAND_SIDE_PROPERTY
Returns the right hand side of this assignment expression return the right hand side node public Expression get Right Hand Side if this right Hand Side null lazy init must be thread safe for readers synchronized this if this right Hand Side null pre Lazy Init this right Hand Side new Simple Name this ast post Lazy Init this right Hand Side RIGHT HAND SIDE PROPERTY return this right Hand Side  getRightHandSide rightHandSide rightHandSide preLazyInit rightHandSide SimpleName postLazyInit rightHandSide RIGHT_HAND_SIDE_PROPERTY rightHandSide
Sets the right hand side of this assignment expression param expression the right hand side node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Right Hand Side Expression expression if expression null throw new Illegal Argument Exception an Assignment may occur inside a Expression must check cycles AST Node old Child this right Hand Side pre Replace Child old Child expression RIGHT HAND SIDE PROPERTY this right Hand Side expression post Replace Child old Child expression RIGHT HAND SIDE PROPERTY  IllegalArgumentException setRightHandSide IllegalArgumentException ASTNode oldChild rightHandSide preReplaceChild oldChild RIGHT_HAND_SIDE_PROPERTY rightHandSide postReplaceChild oldChild RIGHT_HAND_SIDE_PROPERTY
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 3 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this left Hand Side null 0 get Left Hand Side tree Size this right Hand Side null 0 get Right Hand Side tree Size  treeSize memSize leftHandSide getLeftHandSide treeSize rightHandSide getRightHandSide treeSize

Creates a new Java abstract syntax tree AST following the specified set of API rules param level the API level one of the LEVEL constants since 3 0 private AST int level if level AST JLS2 level AST JLS3 throw new Illegal Argument Exception this api Level level initialize a scanner this scanner new Scanner true comment true whitespace false nls Class File Constants JDK1 3 source Level null task Tag null task Priorities true task Case Sensitive  IllegalArgumentException apiLevel ClassFileConstants JDK1_3 sourceLevel taskTag taskPriorities taskCaseSensitive
Creates a new empty abstract syntax tree using default options see Java Core get Default Options TODO jeem When JLS3 support is complete post 3 0 deprecated Clients should port their code to use the new JLS3 API and call link newAST int instead of using this constructor public AST this Java Core get Default Options  JavaCore getDefaultOptions JavaCore getDefaultOptions
Internal method p This method converts the given internal compiler AST for the given source string into a compilation unit This method is not intended to be called by clients p param level the API level one of the LEVEL constants param compilation Unit Declaration an internal AST node for a compilation unit declaration param source the string of the Java compilation unit param options compiler options param monitor the progress monitor used to report progress and request cancelation or code null code if none param is Resolved whether the given compilation unit declaration is resolved return the compilation unit node public static Compilation Unit convert Compilation Unit int level org eclipse jdt internal compiler ast Compilation Unit Declaration compilation Unit Declaration char source Map options boolean is Resolved I Progress Monitor monitor AST Converter converter new AST Converter options is Resolved monitor AST ast AST newAST level int saved Default Node Flag ast get Default Node Flag ast set Default Node Flag AST Node ORIGINAL Binding Resolver resolver is Resolved new Default Binding Resolver compilation Unit Declaration scope new Binding Resolver ast set Binding Resolver resolver converter setAST ast Compilation Unit cu converter convert compilation Unit Declaration source cu set Line End Table compilation Unit Declaration compilation Result line Separator Positions resolver store Modification Count ast modification Count ast set Default Node Flag saved Default Node Flag return cu  compilationUnitDeclaration isResolved CompilationUnit convertCompilationUnit CompilationUnitDeclaration compilationUnitDeclaration isResolved IProgressMonitor ASTConverter ASTConverter isResolved savedDefaultNodeFlag getDefaultNodeFlag setDefaultNodeFlag ASTNode BindingResolver isResolved DefaultBindingResolver compilationUnitDeclaration BindingResolver setBindingResolver CompilationUnit compilationUnitDeclaration setLineEndTable compilationUnitDeclaration compilationResult lineSeparatorPositions storeModificationCount modificationCount setDefaultNodeFlag savedDefaultNodeFlag
Creates a new empty abstract syntax tree using the given options p Following option keys are significant ul li code org eclipse jdt core compiler source code indicates source compatibility mode as per code Java Core code code 1 3 code means the source code is as per JDK 1 3 code 1 4 code means the source code is as per JDK 1 4 code assert code is now a keyword code 1 5 code means the source code is as per JDK 1 5 code enum code is now a keyword additional legal values may be added later li ul Options other than the above are ignored p param options the table of options key type code String code value type code String code see Java Core get Default Options TODO jeem When JLS3 support is complete post 3 0 deprecated Clients should port their code to use the new JLS3 API and call link newAST int instead of using this constructor public AST Map options this JLS2 override scanner if 1 4 asked for if Java Core VERSION 1 4 equals options get Java Core COMPILER SOURCE this scanner new Scanner true comment true whitespace false nls Class File Constants JDK1 4 source Level null task Tag null task Priorities true task Case Sensitive  JavaCore JavaCore getDefaultOptions JavaCore VERSION_1_4 JavaCore COMPILER_SOURCE ClassFileConstants JDK1_4 sourceLevel taskTag taskPriorities taskCaseSensitive
Creates a new Java abstract syntax tree AST following the specified set of API rules p Clients should use this method It is provided only so that test suites can create AST instances that employ the JLS2 AP Is p param level the API level one of the LEVEL constants return new AST instance following the specified set of API rules since 3 0 public static AST newAST int level if level AST JLS2 level AST JLS3 throw new Illegal Argument Exception return new AST level  APIs IllegalArgumentException
Returns the modification count for this AST The modification count is a non negative value that increases by 1 or perhaps by more as this AST or its nodes are changed The initial value is unspecified p The following things count as modifying an AST ul li creating a new node owned by this AST li li adding a child to a node owned by this AST li li removing a child from a node owned by this AST li li setting a non node attribute of a node owned by this AST li ul p Operations which do not entail creating or modifying existing nodes do not increase the modification count p N B This method may be called several times in the course of a single client operation The only promise is that the modification count increases monotonically as the AST or its nodes change there is no promise that a modifying operation increases the count by exactly 1 p return the current value non negative of the modification counter of this AST public long modification Count return this modification Count  modificationCount modificationCount
Return the API level supported by this AST return level the API level one of the code JLS code LEVEL declared on code AST code assume this set is open ended since 3 0 public int api Level return this api Level  apiLevel apiLevel
Indicates that this AST is about to be modified p The following things count as modifying an AST ul li creating a new node owned by this AST li li adding a child to a node owned by this AST li li removing a child from a node owned by this AST li li setting a non node attribute of a node owned by this AST li ul p p N B This method may be called several times in the course of a single client operation p void modifying when this method is called during lazy init events are disabled and the modification count will not be increased if this disable Events 0 return increase the modification count this modification Count  disableEvents modificationCount
Disable events This method is thread safe for AST readers see reenable Events since 3 0 final void disable Events synchronized this internalAST Lock guard against concurrent access by another reader this disable Events while disable Events 0 no events will be reported and mod count will stay fixed  reenableEvents disableEvents internalASTLock disableEvents disableEvents
Reenable events This method is thread safe for AST readers see disable Events since 3 0 final void reenable Events synchronized this internalAST Lock guard against concurrent access by another reader this disable Events  disableEvents reenableEvents internalASTLock disableEvents
Reports that the given node is about to lose a child param node the node about to be modified param child the node about to be removed param property the child or child list property descriptor since 3 0 void pre Remove Child Event AST Node node AST Node child Structural Property Descriptor property IMPORTANT this method is called by readers during lazy init synchronized this internalAST Lock guard against concurrent access by a reader doing lazy init if this disable Events 0 doing lazy init OR already processing an event System out println BOUNCE DEL NON NLS 1 return else disable Events try this event Handler pre Remove Child Event node child property N B even if event handler blows up the AST is not corrupted since node has not been changed yet finally reenable Events  preRemoveChildEvent ASTNode ASTNode StructuralPropertyDescriptor internalASTLock disableEvents disableEvents eventHandler preRemoveChildEvent reenableEvents
Reports that the given node jsut lost a child param node the node that was modified param child the child node that was removed param property the child or child list property descriptor since 3 0 void post Remove Child Event AST Node node AST Node child Structural Property Descriptor property IMPORTANT this method is called by readers during lazy init synchronized this internalAST Lock guard against concurrent access by a reader doing lazy init if this disable Events 0 doing lazy init OR already processing an event System out println BOUNCE DEL NON NLS 1 return else disable Events try this event Handler post Remove Child Event node child property N B even if event handler blows up the AST is not corrupted since node has not been changed yet finally reenable Events  postRemoveChildEvent ASTNode ASTNode StructuralPropertyDescriptor internalASTLock disableEvents disableEvents eventHandler postRemoveChildEvent reenableEvents
Reports that the given node is about have a child replaced param node the node about to be modified param child the child node about to be removed param new Child the replacement child param property the child or child list property descriptor since 3 0 void pre Replace Child Event AST Node node AST Node child AST Node new Child Structural Property Descriptor property IMPORTANT this method is called by readers during lazy init synchronized this internalAST Lock guard against concurrent access by a reader doing lazy init if this disable Events 0 doing lazy init OR already processing an event System out println BOUNCE REP NON NLS 1 return else disable Events try this event Handler pre Replace Child Event node child new Child property N B even if event handler blows up the AST is not corrupted since node has not been changed yet finally reenable Events  newChild preReplaceChildEvent ASTNode ASTNode ASTNode newChild StructuralPropertyDescriptor internalASTLock disableEvents disableEvents eventHandler preReplaceChildEvent newChild reenableEvents
Reports that the given node has just had a child replaced param node the node modified param child the child removed param new Child the replacement child param property the child or child list property descriptor since 3 0 void post Replace Child Event AST Node node AST Node child AST Node new Child Structural Property Descriptor property IMPORTANT this method is called by readers during lazy init synchronized this internalAST Lock guard against concurrent access by a reader doing lazy init if this disable Events 0 doing lazy init OR already processing an event System out println BOUNCE REP NON NLS 1 return else disable Events try this event Handler post Replace Child Event node child new Child property N B even if event handler blows up the AST is not corrupted since node has not been changed yet finally reenable Events  newChild postReplaceChildEvent ASTNode ASTNode ASTNode newChild StructuralPropertyDescriptor internalASTLock disableEvents disableEvents eventHandler postReplaceChildEvent newChild reenableEvents
Reports that the given node is about to gain a child param node the node that to be modified param child the node that to be added as a child param property the child or child list property descriptor since 3 0 void pre Add Child Event AST Node node AST Node child Structural Property Descriptor property IMPORTANT this method is called by readers during lazy init synchronized this internalAST Lock guard against concurrent access by a reader doing lazy init if this disable Events 0 doing lazy init OR already processing an event System out println BOUNCE ADD NON NLS 1 return else disable Events try this event Handler pre Add Child Event node child property N B even if event handler blows up the AST is not corrupted since node has already been changed finally reenable Events  preAddChildEvent ASTNode ASTNode StructuralPropertyDescriptor internalASTLock disableEvents disableEvents eventHandler preAddChildEvent reenableEvents
Reports that the given node has just gained a child param node the node that was modified param child the node that was added as a child param property the child or child list property descriptor since 3 0 void post Add Child Event AST Node node AST Node child Structural Property Descriptor property IMPORTANT this method is called by readers during lazy init synchronized this internalAST Lock guard against concurrent access by a reader doing lazy init if this disable Events 0 doing lazy init OR already processing an event System out println BOUNCE ADD NON NLS 1 return else disable Events try this event Handler post Add Child Event node child property N B even if event handler blows up the AST is not corrupted since node has already been changed finally reenable Events  postAddChildEvent ASTNode ASTNode StructuralPropertyDescriptor internalASTLock disableEvents disableEvents eventHandler postAddChildEvent reenableEvents
Reports that the given node is about to change the value of a non child property param node the node to be modified param property the property descriptor since 3 0 void pre Value Change Event AST Node node Simple Property Descriptor property IMPORTANT this method is called by readers during lazy init synchronized this internalAST Lock guard against concurrent access by a reader doing lazy init if this disable Events 0 doing lazy init OR already processing an event System out println BOUNCE CHANGE NON NLS 1 return else disable Events try this event Handler pre Value Change Event node property N B even if event handler blows up the AST is not corrupted since node has already been changed finally reenable Events  preValueChangeEvent ASTNode SimplePropertyDescriptor internalASTLock disableEvents disableEvents eventHandler preValueChangeEvent reenableEvents
Reports that the given node has just changed the value of a non child property param node the node that was modified param property the property descriptor since 3 0 void post Value Change Event AST Node node Simple Property Descriptor property IMPORTANT this method is called by readers during lazy init synchronized this internalAST Lock guard against concurrent access by a reader doing lazy init if this disable Events 0 doing lazy init OR already processing an event System out println BOUNCE CHANGE NON NLS 1 return else disable Events try this event Handler post Value Change Event node property N B even if event handler blows up the AST is not corrupted since node has already been changed finally reenable Events  postValueChangeEvent ASTNode SimplePropertyDescriptor internalASTLock disableEvents disableEvents eventHandler postValueChangeEvent reenableEvents
Reports that the given node is about to be cloned param node the node to be cloned since 3 0 void pre Clone Node Event AST Node node synchronized this internalAST Lock guard against concurrent access by a reader doing lazy init if this disable Events 0 doing lazy init OR already processing an event System out println BOUNCE CLONE NON NLS 1 return else disable Events try this event Handler pre Clone Node Event node N B even if event handler blows up the AST is not corrupted since node has already been changed finally reenable Events  preCloneNodeEvent ASTNode internalASTLock disableEvents disableEvents eventHandler preCloneNodeEvent reenableEvents
Reports that the given node has just been cloned param node the node that was cloned param clone the clone of code node code since 3 0 void post Clone Node Event AST Node node AST Node clone synchronized this internalAST Lock guard against concurrent access by a reader doing lazy init if this disable Events 0 doing lazy init OR already processing an event System out println BOUNCE CLONE NON NLS 1 return else disable Events try this event Handler post Clone Node Event node clone N B even if event handler blows up the AST is not corrupted since node has already been changed finally reenable Events  postCloneNodeEvent ASTNode ASTNode internalASTLock disableEvents disableEvents eventHandler postCloneNodeEvent reenableEvents
Parses the source string of the given Java model compilation unit element and creates and returns a corresponding abstract syntax tree The source string is obtained from the Java model element using code I Compilation Unit get Source code p The returned compilation unit node is the root node of a new AST Each node in the subtree carries source range s information relating back to positions in the source string the source string is not remembered with the AST The source range usually begins at the first character of the first token corresponding to the node leading whitespace and comments are b not b included The source range usually extends through the last character of the last token corresponding to the node trailing whitespace and comments are b not b included There are a handful of exceptions including compilation units and the various body declarations the specification for these node type spells out the details Source ranges nest properly the source range for a child is always within the source range of its parent and the source ranges of sibling nodes never overlap If a syntax error is detected while parsing the relevant node s of the tree will be flagged as code MALFORMED code p p If code resolve Bindings code is code true code the various names and types appearing in the compilation unit can be resolved to bindings by calling the code resolve Binding code methods These bindings draw connections between the different parts of a program and generally afford a more powerful vantage point for clients who wish to analyze a program s structure more deeply These bindings come at a considerable cost in both time and space however and should not be requested frivolously The additional space is not reclaimed until the AST all its nodes and all its bindings become garbage So it is very important to not retain any of these objects longer than absolutely necessary Bindings are resolved at the time the AST is created Subsequent modifications to the AST do not affect the bindings returned by code resolve Binding code methods in any way these methods return the same binding as before the AST was modified including modifications that rearrange subtrees by reparenting nodes If code resolve Bindings code is code false code the analysis does not go beyond parsing and building the tree and all code resolve Binding code methods return code null code from the outset p param unit the Java model compilation unit whose source code is to be parsed param resolve Bindings code true code if bindings are wanted and code false code if bindings are not of interest return the compilation unit node exception Illegal Argument Exception if the given Java element does not exist or if its source string cannot be obtained see AST Node get Flags see AST Node MALFORMED see AST Node get Start Position see AST Node get Length since 2 0 deprecated Use link AST Parser instead public static Compilation Unit parse Compilation Unit I Compilation Unit unit boolean resolve Bindings try AST Parser c AST Parser new Parser AST JLS2 c set Source unit c set Resolve Bindings resolve Bindings AST Node result c createAST null return Compilation Unit result catch Illegal State Exception e convert AST Parser s complaints into old form throw new Illegal Argument Exception  ICompilationUnit getSource resolveBindings resolveBinding resolveBinding resolveBindings resolveBinding resolveBindings IllegalArgumentException ASTNode getFlags ASTNode ASTNode getStartPosition ASTNode getLength ASTParser CompilationUnit parseCompilationUnit ICompilationUnit resolveBindings ASTParser ASTParser newParser setSource setResolveBindings resolveBindings ASTNode CompilationUnit IllegalStateException ASTParser IllegalArgumentException
Parses the source string corresponding to the given Java class file element and creates and returns a corresponding abstract syntax tree The source string is obtained from the Java model element using code I Class File get Source code and is only available for a class files with attached source p The returned compilation unit node is the root node of a new AST Each node in the subtree carries source range s information relating back to positions in the source string the source string is not remembered with the AST The source range usually begins at the first character of the first token corresponding to the node leading whitespace and comments are b not b included The source range usually extends through the last character of the last token corresponding to the node trailing whitespace and comments are b not b included There are a handful of exceptions including compilation units and the various body declarations the specification for these node type spells out the details Source ranges nest properly the source range for a child is always within the source range of its parent and the source ranges of sibling nodes never overlap If a syntax error is detected while parsing the relevant node s of the tree will be flagged as code MALFORMED code p p If code resolve Bindings code is code true code the various names and types appearing in the compilation unit can be resolved to bindings by calling the code resolve Binding code methods These bindings draw connections between the different parts of a program and generally afford a more powerful vantage point for clients who wish to analyze a program s structure more deeply These bindings come at a considerable cost in both time and space however and should not be requested frivolously The additional space is not reclaimed until the AST all its nodes and all its bindings become garbage So it is very important to not retain any of these objects longer than absolutely necessary Bindings are resolved at the time the AST is created Subsequent modifications to the AST do not affect the bindings returned by code resolve Binding code methods in any way these methods return the same binding as before the AST was modified including modifications that rearrange subtrees by reparenting nodes If code resolve Bindings code is code false code the analysis does not go beyond parsing and building the tree and all code resolve Binding code methods return code null code from the outset p param class File the Java model class file whose corresponding source code is to be parsed param resolve Bindings code true code if bindings are wanted and code false code if bindings are not of interest return the compilation unit node exception Illegal Argument Exception if the given Java element does not exist or if its source string cannot be obtained see AST Node get Flags see AST Node MALFORMED see AST Node get Start Position see AST Node get Length since 2 1 deprecated Use link AST Parser instead public static Compilation Unit parse Compilation Unit I Class File class File boolean resolve Bindings if class File null throw new Illegal Argument Exception try AST Parser c AST Parser new Parser AST JLS2 c set Source class File c set Resolve Bindings resolve Bindings AST Node result c createAST null return Compilation Unit result catch Illegal State Exception e convert AST Parser s complaints into old form throw new Illegal Argument Exception  IClassFile getSource resolveBindings resolveBinding resolveBinding resolveBindings resolveBinding classFile resolveBindings IllegalArgumentException ASTNode getFlags ASTNode ASTNode getStartPosition ASTNode getLength ASTParser CompilationUnit parseCompilationUnit IClassFile classFile resolveBindings classFile IllegalArgumentException ASTParser ASTParser newParser setSource classFile setResolveBindings resolveBindings ASTNode CompilationUnit IllegalStateException ASTParser IllegalArgumentException
Parses the given string as the hypothetical contents of the named compilation unit and creates and returns a corresponding abstract syntax tree p The returned compilation unit node is the root node of a new AST Each node in the subtree carries source range s information relating back to positions in the given source string the given source string itself is not remembered with the AST The source range usually begins at the first character of the first token corresponding to the node leading whitespace and comments are b not b included The source range usually extends through the last character of the last token corresponding to the node trailing whitespace and comments are b not b included There are a handful of exceptions including compilation units and the various body declarations the specification for these node type spells out the details Source ranges nest properly the source range for a child is always within the source range of its parent and the source ranges of sibling nodes never overlap If a syntax error is detected while parsing the relevant node s of the tree will be flagged as code MALFORMED code p p If the given project is not code null code the various names and types appearing in the compilation unit can be resolved to bindings by calling the code resolve Binding code methods These bindings draw connections between the different parts of a program and generally afford a more powerful vantage point for clients who wish to analyze a program s structure more deeply These bindings come at a considerable cost in both time and space however and should not be requested frivolously The additional space is not reclaimed until the AST all its nodes and all its bindings become garbage So it is very important to not retain any of these objects longer than absolutely necessary Bindings are resolved at the time the AST is created Subsequent modifications to the AST do not affect the bindings returned by code resolve Binding code methods in any way these methods return the same binding as before the AST was modified including modifications that rearrange subtrees by reparenting nodes If the given project is code null code the analysis does not go beyond parsing and building the tree and all code resolve Binding code methods return code null code from the outset p p The name of the compilation unit must be supplied for resolving bindings This name should include the java suffix and match the name of the main public class or interface declared in the source For example if the source declares a public class named Foo the name of the compilation should be Foo java For the purposes of resolving bindings types declared in the source string hide types by the same name available through the classpath of the given project p param source the string to be parsed as a Java compilation unit param unit Name the name of the compilation unit that would contain the source string or code null code if code java Project code is also code null code param project the Java project used to resolve names or code null code if bindings are not resolved return the compilation unit node see AST Node get Flags see AST Node MALFORMED see AST Node get Start Position see AST Node get Length since 2 0 deprecated Use link AST Parser instead public static Compilation Unit parse Compilation Unit char source String unit Name I Java Project project if source null throw new Illegal Argument Exception AST Parser c AST Parser new Parser AST JLS2 c set Source source c set Unit Name unit Name c set Project project AST Node result c createAST null return Compilation Unit result  resolveBinding resolveBinding resolveBinding unitName javaProject ASTNode getFlags ASTNode ASTNode getStartPosition ASTNode getLength ASTParser CompilationUnit parseCompilationUnit unitName IJavaProject IllegalArgumentException ASTParser ASTParser newParser setSource setUnitName unitName setProject ASTNode CompilationUnit
Parses the given string as a Java compilation unit and creates and returns a corresponding abstract syntax tree p The returned compilation unit node is the root node of a new AST Each node in the subtree carries source range s information relating back to positions in the given source string the given source string itself is not remembered with the AST The source range usually begins at the first character of the first token corresponding to the node leading whitespace and comments are b not b included The source range usually extends through the last character of the last token corresponding to the node trailing whitespace and comments are b not b included There are a handful of exceptions including compilation units and the various body declarations the specification for these node type spells out the details Source ranges nest properly the source range for a child is always within the source range of its parent and the source ranges of sibling nodes never overlap If a syntax error is detected while parsing the relevant node s of the tree will be flagged as code MALFORMED code p p This method does not compute binding information all code resolve Binding code methods applied to nodes of the resulting AST return code null code p param source the string to be parsed as a Java compilation unit return the compilation unit node see AST Node get Flags see AST Node MALFORMED see AST Node get Start Position see AST Node get Length since 2 0 deprecated Use link AST Parser instead public static Compilation Unit parse Compilation Unit char source if source null throw new Illegal Argument Exception AST Parser c AST Parser new Parser AST JLS2 c set Source source AST Node result c createAST null return Compilation Unit result  resolveBinding ASTNode getFlags ASTNode ASTNode getStartPosition ASTNode getLength ASTParser CompilationUnit parseCompilationUnit IllegalArgumentException ASTParser ASTParser newParser setSource ASTNode CompilationUnit
Returns the binding resolver for this AST return the binding resolver for this AST Binding Resolver get Binding Resolver return this resolver  BindingResolver getBindingResolver
Returns the event handler for this AST return the event handler for this AST since 3 0 Node Event Handler get Event Handler return this event Handler  NodeEventHandler getEventHandler eventHandler
Sets the event handler for this AST param event Handler the event handler for this AST since 3 0 void set Event Handler Node Event Handler event Handler if this event Handler null throw new Illegal Argument Exception this event Handler event Handler  eventHandler setEventHandler NodeEventHandler eventHandler eventHandler IllegalArgumentException eventHandler eventHandler
Returns default node flags of new nodes of this AST return the default node flags of new nodes of this AST since 3 0 int get Default Node Flag return this default Node Flag  getDefaultNodeFlag defaultNodeFlag
Sets default node flags of new nodes of this AST param flag node flags of new nodes of this AST since 3 0 void set Default Node Flag int flag this default Node Flag flag  setDefaultNodeFlag defaultNodeFlag
Set code original Modification Count code to the current modification count since 3 0 void set Original Modification Count long count this original Modification Count count  originalModificationCount setOriginalModificationCount originalModificationCount
Returns the type binding for a well known type p Note that bindings are generally unavailable unless requested when the AST is being built p p The following type names are supported ul li code boolean code li li code char code li li code byte code li li code short code li li code int code li li code long code li li code float code li li code double code li li code void code li li code java lang Class code li li code java lang Cloneable code li li code java lang Error code li li code java lang Exception code li li code java lang Object code li li code java lang Runtime Exception code li li code java lang String code li li code java lang String Buffer code li li code java lang Throwable code li li code java io Serializable code li ul p param name the name of a well known type return the corresponding type binding or code null code if the named type is not considered well known or if no binding can be found for it public I Type Binding resolve Well Known Type String name if name null throw new Illegal Argument Exception return get Binding Resolver resolve Well Known Type name  RuntimeException StringBuffer ITypeBinding resolveWellKnownType IllegalArgumentException getBindingResolver resolveWellKnownType
Sets the binding resolver for this AST param resolver the new binding resolver for this AST void set Binding Resolver Binding Resolver resolver if resolver null throw new Illegal Argument Exception this resolver resolver  setBindingResolver BindingResolver IllegalArgumentException
Checks that this AST operation is not used when building level JLS2 AS Ts exception Unsupported Operation Exception since 3 0 void unsupported In2 if this api Level AST JLS2 throw new Unsupported Operation Exception Operation not supported in JLS2 AST NON NLS 1  ASTs UnsupportedOperationException unsupportedIn2 apiLevel UnsupportedOperationException
Checks that this AST operation is only used when building level JLS2 AS Ts exception Unsupported Operation Exception since 3 0 void supported Only In2 if this api Level AST JLS2 throw new Unsupported Operation Exception Operation not supported in JLS2 AST NON NLS 1  ASTs UnsupportedOperationException supportedOnlyIn2 apiLevel UnsupportedOperationException
Creates an unparented node of the given node class non abstract subclass of link AST Node param node Class AST node class return a new unparented node owned by this AST exception Illegal Argument Exception if code node Class code is code null code or is not a concrete node type class since 3 0 public AST Node create Instance Class node Class if node Class null throw new Illegal Argument Exception try invoke constructor with signature Foo AST Constructor c node Class get Declared Constructor AST CLASS Object result c new Instance this THIS AST return AST Node result catch No Such Method Exception e all AST node classes have a Foo AST constructor therefore node Class is not legit throw new Illegal Argument Exception catch Instantiation Exception e all concrete AST node classes can be instantiated therefore node Class is not legit throw new Illegal Argument Exception catch Illegal Access Exception e all AST node classes have an accessible Foo AST constructor therefore node Class is not legit throw new Illegal Argument Exception catch Invocation Target Exception e concrete AST node classes do not die in the constructor therefore node Class is not legit throw new Illegal Argument Exception  ASTNode nodeClass IllegalArgumentException nodeClass ASTNode createInstance nodeClass nodeClass IllegalArgumentException nodeClass getDeclaredConstructor AST_CLASS newInstance THIS_AST ASTNode NoSuchMethodException nodeClass IllegalArgumentException InstantiationException nodeClass IllegalArgumentException IllegalAccessException nodeClass IllegalArgumentException InvocationTargetException nodeClass IllegalArgumentException
Creates an unparented node of the given node type This convenience method is equivalent to pre create Instance AST Node node Class For Type node Type pre param node Type AST node type one of the node type constants declared on link AST Node return a new unparented node owned by this AST exception Illegal Argument Exception if code node Type code is not a legal AST node type since 3 0 public AST Node create Instance int node Type node Class For Type throws Illegal Argument Exception if node Type is bogus Class node Class AST Node node Class For Type node Type return create Instance node Class  createInstance ASTNode nodeClassForType nodeType nodeType ASTNode IllegalArgumentException nodeType ASTNode createInstance nodeType nodeClassForType IllegalArgumentException nodeType nodeClass ASTNode nodeClassForType nodeType createInstance nodeClass
NAMES Creates and returns a new unparented simple name node for the given identifier The identifier should be a legal Java identifier but not a keyword boolean literal true false or null literal null param identifier the identifier return a new unparented simple name node exception Illegal Argument Exception if the identifier is invalid public Simple Name new Simple Name String identifier if identifier null throw new Illegal Argument Exception Simple Name result new Simple Name this result set Identifier identifier return result  IllegalArgumentException SimpleName newSimpleName IllegalArgumentException SimpleName SimpleName setIdentifier
Creates and returns a new unparented qualified name node for the given qualifier and simple name child node param qualifier the qualifier name node param name the simple name being qualified return a new unparented qualified name node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public Qualified Name new Qualified Name Name qualifier Simple Name name Qualified Name result new Qualified Name this result set Qualifier qualifier result set Name name return result  IllegalArgumentException QualifiedName newQualifiedName SimpleName QualifiedName QualifiedName setQualifier setName
Creates and returns a new unparented name node for the given name segments Returns a simple name if there is only one name segment and a qualified name if there are multiple name segments Each of the name segments should be legal Java identifiers this constraint may or may not be enforced and there must be at least one name segment param identifiers a list of 1 or more name segments each of which is a legal Java identifier return a new unparented name node exception Illegal Argument Exception if ul li the identifier is invalid li li the list of identifiers is empty li ul public Name new Name String identifiers int count identifiers length if count 0 throw new Illegal Argument Exception Name result new Simple Name identifiers 0 for int i 1 i count i Simple Name name new Simple Name identifiers i result new Qualified Name result name return result  IllegalArgumentException newName IllegalArgumentException newSimpleName SimpleName newSimpleName newQualifiedName
TYPES Creates and returns a new unparented simple type node with the given type name p This method can be used to convert a name code Name code into a type code Type code by wrapping it p param type Name the name of the class or interface return a new unparented simple type node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public Simple Type new Simple Type Name type Name Simple Type result new Simple Type this result set Name type Name return result  typeName IllegalArgumentException SimpleType newSimpleType typeName SimpleType SimpleType setName typeName
Creates and returns a new unparented array type node with the given component type which may be another array type param component Type the component type possibly another array type return a new unparented array type node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public Array Type new Array Type Type component Type Array Type result new Array Type this result set Component Type component Type return result  componentType IllegalArgumentException ArrayType newArrayType componentType ArrayType ArrayType setComponentType componentType
Creates and returns a new unparented array type node with the given element type and number of dimensions p Note that if the element type passed in is an array type the element type of the result will not be the same as what was passed in p param element Type the element type never an array type param dimensions the number of dimensions a positive number return a new unparented array type node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public Array Type new Array Type Type element Type int dimensions if element Type null element Type is Array Type throw new Illegal Argument Exception if dimensions 1 dimensions 1000 we would blow our stacks anyway with a 1000 D array throw new Illegal Argument Exception Array Type result new Array Type this result set Component Type element Type for int i 2 i dimensions i result new Array Type result return result  elementType IllegalArgumentException ArrayType newArrayType elementType elementType elementType isArrayType IllegalArgumentException IllegalArgumentException ArrayType ArrayType setComponentType elementType newArrayType
Creates and returns a new unparented primitive type node with the given type code param type Code one of the primitive type code constants declared in code Primitive Type code return a new unparented primitive type node exception Illegal Argument Exception if the primitive type code is invalid public Primitive Type new Primitive Type Primitive Type Code type Code Primitive Type result new Primitive Type this result set Primitive Type Code type Code return result  typeCode PrimitiveType IllegalArgumentException PrimitiveType newPrimitiveType PrimitiveType typeCode PrimitiveType PrimitiveType setPrimitiveTypeCode typeCode
Creates and returns a new unparented parameterized type node with the given type and an empty list of type arguments param type the type that is parameterized return a new unparented parameterized type node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Parameterized Type new Parameterized Type Type type Parameterized Type result new Parameterized Type this result set Type type return result  IllegalArgumentException UnsupportedOperationException ParameterizedType newParameterizedType ParameterizedType ParameterizedType setType
Creates and returns a new unparented qualified type node with the given qualifier type and name param qualifier the qualifier type node param name the simple name being qualified return a new unparented qualified type node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Qualified Type new Qualified Type Type qualifier Simple Name name Qualified Type result new Qualified Type this result set Qualifier qualifier result set Name name return result  IllegalArgumentException UnsupportedOperationException QualifiedType newQualifiedType SimpleName QualifiedType QualifiedType setQualifier setName
Creates and returns a new unparented wildcard type node with no type bound return a new unparented wildcard type node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Wildcard Type new Wildcard Type Wildcard Type result new Wildcard Type this return result  IllegalArgumentException UnsupportedOperationException WildcardType newWildcardType WildcardType WildcardType
DECLARATIONS Creates an unparented compilation unit node owned by this AST The compilation unit initially has no package declaration no import declarations and no type declarations p Note that the new compilation unit is b not b automatically made the root node of this AST This must be done explicitly by calling code set Root code p return the new unparented compilation unit node public Compilation Unit new Compilation Unit return new Compilation Unit this  setRoot CompilationUnit newCompilationUnit CompilationUnit
Creates an unparented package declaration node owned by this AST The package declaration initially declares a package with an unspecified name return the new unparented package declaration node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public Package Declaration new Package Declaration Package Declaration result new Package Declaration this return result  IllegalArgumentException PackageDeclaration newPackageDeclaration PackageDeclaration PackageDeclaration
Creates an unparented import declaration node owned by this AST The import declaration initially contains a single type import of a type with an unspecified name return the new unparented import declaration node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public Import Declaration new Import Declaration Import Declaration result new Import Declaration this return result  IllegalArgumentException ImportDeclaration newImportDeclaration ImportDeclaration ImportDeclaration
Creates an unparented class declaration node owned by this AST The name of the class is an unspecified but legal name no modifiers no doc comment no superclass or superinterfaces and an empty class body p To create an interface use this method and then call code Type Declaration set Interface true code p p To create an enum declaration use this method and then call code Type Declaration set Enumeration true code p return a new unparented type declaration node public Type Declaration new Type Declaration Type Declaration result new Type Declaration this result set Interface false return result  TypeDeclaration setInterface TypeDeclaration setEnumeration TypeDeclaration newTypeDeclaration TypeDeclaration TypeDeclaration setInterface
Creates an unparented method declaration node owned by this AST By default the declaration is for a method of an unspecified but legal name no modifiers no doc comment no parameters return type void no extra array dimensions no thrown exceptions and no body as opposed to an empty body p To create a constructor use this method and then call code Method Declaration set Constructor true code and code Method Declaration set Name class Name code p return a new unparented method declaration node public Method Declaration new Method Declaration Method Declaration result new Method Declaration this result set Constructor false return result  MethodDeclaration setConstructor MethodDeclaration setName className MethodDeclaration newMethodDeclaration MethodDeclaration MethodDeclaration setConstructor
Creates an unparented single variable declaration node owned by this AST By default the declaration is for a variable with an unspecified but legal name and type no modifiers no array dimensions after the variable no initializer not variable arity return a new unparented single variable declaration node public Single Variable Declaration new Single Variable Declaration Single Variable Declaration result new Single Variable Declaration this return result  SingleVariableDeclaration newSingleVariableDeclaration SingleVariableDeclaration SingleVariableDeclaration
Creates an unparented variable declaration fragment node owned by this AST By default the fragment is for a variable with an unspecified but legal name no extra array dimensions and no initializer return a new unparented variable declaration fragment node public Variable Declaration Fragment new Variable Declaration Fragment Variable Declaration Fragment result new Variable Declaration Fragment this return result  VariableDeclarationFragment newVariableDeclarationFragment VariableDeclarationFragment VariableDeclarationFragment
Creates an unparented initializer node owned by this AST with an empty block By default the initializer has no modifiers and an empty block return a new unparented initializer node public Initializer new Initializer Initializer result new Initializer this return result  newInitializer
Creates an unparented enum constant declaration node owned by this AST The name of the constant is an unspecified but legal name no doc comment no modifiers or annotations no arguments and an empty class body return a new unparented enum constant declaration node exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Enum Constant Declaration new Enum Constant Declaration Enum Constant Declaration result new Enum Constant Declaration this return result  UnsupportedOperationException EnumConstantDeclaration newEnumConstantDeclaration EnumConstantDeclaration EnumConstantDeclaration
Creates an unparented enum declaration node owned by this AST The name of the enum is an unspecified but legal name no doc comment no modifiers or annotations no superinterfaces and no body declarations return a new unparented enum declaration node exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Enum Declaration new Enum Declaration Enum Declaration result new Enum Declaration this return result  UnsupportedOperationException EnumDeclaration newEnumDeclaration EnumDeclaration EnumDeclaration
Creates and returns a new unparented type parameter type node with an unspecified type variable name and an empty list of type bounds return a new unparented type parameter node exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Type Parameter new Type Parameter Type Parameter result new Type Parameter this return result  UnsupportedOperationException TypeParameter newTypeParameter TypeParameter TypeParameter
Creates and returns a new unparented annotation type declaration node for an unspecified but legal name no modifiers no javadoc and an empty list of member declarations return a new unparented annotation type declaration node exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Annotation Type Declaration new Annotation Type Declaration Annotation Type Declaration result new Annotation Type Declaration this return result  UnsupportedOperationException AnnotationTypeDeclaration newAnnotationTypeDeclaration AnnotationTypeDeclaration AnnotationTypeDeclaration
Creates and returns a new unparented annotation type member declaration node for an unspecified but legal member name and type no modifiers no javadoc and no default value return a new unparented annotation type member declaration node exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Annotation Type Member Declaration new Annotation Type Member Declaration Annotation Type Member Declaration result new Annotation Type Member Declaration this return result  UnsupportedOperationException AnnotationTypeMemberDeclaration newAnnotationTypeMemberDeclaration AnnotationTypeMemberDeclaration AnnotationTypeMemberDeclaration
Creates and returns a new unparented modifier node for the given modifier param keyword one of the modifier keyword constants return a new unparented modifier node exception Illegal Argument Exception if the primitive type code is invalid exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Modifier new Modifier Modifier Modifier Keyword keyword Modifier result new Modifier this result set Keyword keyword return result  IllegalArgumentException UnsupportedOperationException newModifier ModifierKeyword setKeyword
Creates and returns a new block comment placeholder node p Note that this node type is used to recording the source range where a comment was found in the source string These comment nodes are normally found only in linkplain Compilation Unit get Comment List the comment table for parsed compilation units p return a new unparented block comment node since 3 0 public Block Comment new Block Comment Block Comment result new Block Comment this return result  CompilationUnit getCommentList BlockComment newBlockComment BlockComment BlockComment
Creates and returns a new line comment placeholder node p Note that this node type is used to recording the source range where a comment was found in the source string These comment nodes are normally found only in linkplain Compilation Unit get Comment List the comment table for parsed compilation units p return a new unparented line comment node since 3 0 public Line Comment new Line Comment Line Comment result new Line Comment this return result  CompilationUnit getCommentList LineComment newLineComment LineComment LineComment
Creates and returns a new doc comment node Initially the new node has an empty list of tag elements and for backwards compatability an unspecified but legal doc comment string return a new unparented doc comment node public Javadoc new Javadoc Javadoc result new Javadoc this return result  newJavadoc
Creates and returns a new tag element node Initially the new node has no tag name and an empty list of fragments p Note that this node type is used only inside doc comments link Javadoc p return a new unparented tag element node since 3 0 public Tag Element new Tag Element Tag Element result new Tag Element this return result  TagElement newTagElement TagElement TagElement
Creates and returns a new text element node Initially the new node has an empty text string p Note that this node type is used only inside doc comments link Javadoc Javadoc p return a new unparented text element node since 3 0 public Text Element new Text Element Text Element result new Text Element this return result  TextElement newTextElement TextElement TextElement
Creates and returns a new member reference node Initially the new node has no qualifier name and an unspecified but legal member name p Note that this node type is used only inside doc comments link Javadoc p return a new unparented member reference node since 3 0 public Member Ref new Member Ref Member Ref result new Member Ref this return result  MemberRef newMemberRef MemberRef MemberRef
Creates and returns a new method reference node Initially the new node has no qualifier name an unspecified but legal method name and an empty parameter list p Note that this node type is used only inside doc comments link Javadoc Javadoc p return a new unparented method reference node since 3 0 public Method Ref new Method Ref Method Ref result new Method Ref this return result  MethodRef newMethodRef MethodRef MethodRef
Creates and returns a new method reference node Initially the new node has an unspecified but legal type and no parameter name p Note that this node type is used only inside doc comments link Javadoc p return a new unparented method reference parameter node since 3 0 public Method Ref Parameter new Method Ref Parameter Method Ref Parameter result new Method Ref Parameter this return result  MethodRefParameter newMethodRefParameter MethodRefParameter MethodRefParameter
STATEMENTS Creates a new unparented local variable declaration statement node owned by this AST for the given variable declaration fragment By default there are no modifiers and the base type is unspecified but legal p This method can be used to convert a variable declaration fragment code Variable Declaration Fragment code into a statement code Statement code by wrapping it Additional variable declaration fragments can be added afterwards p param fragment the variable declaration fragment return a new unparented variable declaration statement node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public Variable Declaration Statement new Variable Declaration Statement Variable Declaration Fragment fragment if fragment null throw new Illegal Argument Exception Variable Declaration Statement result new Variable Declaration Statement this result fragments add fragment return result  VariableDeclarationFragment IllegalArgumentException VariableDeclarationStatement newVariableDeclarationStatement VariableDeclarationFragment IllegalArgumentException VariableDeclarationStatement VariableDeclarationStatement
Creates a new unparented local type declaration statement node owned by this AST for the given type declaration p This method can be used to convert a type declaration code Type Declaration code into a statement code Statement code by wrapping it p param decl the type declaration return a new unparented local type declaration statement node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public Type Declaration Statement new Type Declaration Statement Type Declaration decl Type Declaration Statement result new Type Declaration Statement this result set Declaration decl return result  TypeDeclaration IllegalArgumentException TypeDeclarationStatement newTypeDeclarationStatement TypeDeclaration TypeDeclarationStatement TypeDeclarationStatement setDeclaration
Creates a new unparented local type declaration statement node owned by this AST for the given type declaration p This method can be used to convert any kind of type declaration code Abstract Type Declaration code into a statement code Statement code by wrapping it p param decl the type declaration return a new unparented local type declaration statement node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul since 3 0 public Type Declaration Statement new Type Declaration Statement Abstract Type Declaration decl Type Declaration Statement result new Type Declaration Statement this if this api Level AST JLS2 result set Type Declaration Type Declaration decl if this api Level AST JLS3 result set Declaration decl return result  AbstractTypeDeclaration IllegalArgumentException TypeDeclarationStatement newTypeDeclarationStatement AbstractTypeDeclaration TypeDeclarationStatement TypeDeclarationStatement apiLevel setTypeDeclaration TypeDeclaration apiLevel setDeclaration
Creates an unparented block node owned by this AST for an empty list of statements return a new unparented empty block node public Block new Block return new Block this  newBlock
Creates an unparented continue statement node owned by this AST The continue statement has no label return a new unparented continue statement node public Continue Statement new Continue Statement return new Continue Statement this  ContinueStatement newContinueStatement ContinueStatement
Creates an unparented break statement node owned by this AST The break statement has no label return a new unparented break statement node public Break Statement new Break Statement return new Break Statement this  BreakStatement newBreakStatement BreakStatement
Creates a new unparented expression statement node owned by this AST for the given expression p This method can be used to convert an expression code Expression code into a statement code Type code by wrapping it Note however that the result is only legal for limited expression types including method invocations assignments and increment decrement operations p param expression the expression return a new unparented statement node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public Expression Statement new Expression Statement Expression expression Expression Statement result new Expression Statement this result set Expression expression return result  IllegalArgumentException ExpressionStatement newExpressionStatement ExpressionStatement ExpressionStatement setExpression
Creates a new unparented if statement node owned by this AST By default the expression is unspecified but legal the then statement is an empty block and there is no else statement return a new unparented if statement node public If Statement new If Statement return new If Statement this  IfStatement newIfStatement IfStatement
Creates a new unparented while statement node owned by this AST By default the expression is unspecified but legal and the body statement is an empty block return a new unparented while statement node public While Statement new While Statement return new While Statement this  WhileStatement newWhileStatement WhileStatement
Creates a new unparented do statement node owned by this AST By default the expression is unspecified but legal and the body statement is an empty block return a new unparented do statement node public Do Statement new Do Statement return new Do Statement this  DoStatement newDoStatement DoStatement
Creates a new unparented try statement node owned by this AST By default the try statement has an empty block no catch clauses and no finally block return a new unparented try statement node public Try Statement new Try Statement return new Try Statement this  TryStatement newTryStatement TryStatement
Creates a new unparented catch clause node owned by this AST By default the catch clause declares an unspecified but legal exception declaration and has an empty block return a new unparented catch clause node public Catch Clause new Catch Clause return new Catch Clause this  CatchClause newCatchClause CatchClause
Creates a new unparented return statement node owned by this AST By default the return statement has no expression return a new unparented return statement node public Return Statement new Return Statement return new Return Statement this  ReturnStatement newReturnStatement ReturnStatement
Creates a new unparented throw statement node owned by this AST By default the expression is unspecified but legal return a new unparented throw statement node public Throw Statement new Throw Statement return new Throw Statement this  ThrowStatement newThrowStatement ThrowStatement
Creates a new unparented assert statement node owned by this AST By default the first expression is unspecified but legal and has no message expression return a new unparented assert statement node public Assert Statement new Assert Statement return new Assert Statement this  AssertStatement newAssertStatement AssertStatement
Creates a new unparented empty statement node owned by this AST return a new unparented empty statement node public Empty Statement new Empty Statement return new Empty Statement this  EmptyStatement newEmptyStatement EmptyStatement
Creates a new unparented labeled statement node owned by this AST By default the label and statement are both unspecified but legal return a new unparented labeled statement node public Labeled Statement new Labeled Statement return new Labeled Statement this  LabeledStatement newLabeledStatement LabeledStatement
Creates a new unparented switch statement node owned by this AST By default the expression is unspecified but legal and there are no statements or switch cases return a new unparented labeled statement node public Switch Statement new Switch Statement return new Switch Statement this  SwitchStatement newSwitchStatement SwitchStatement
Creates a new unparented switch case statement node owned by this AST By default the expression is unspecified but legal return a new unparented switch case node public Switch Case new Switch Case return new Switch Case this  SwitchCase newSwitchCase SwitchCase
Creates a new unparented synchronized statement node owned by this AST By default the expression is unspecified but legal and the body is an empty block return a new unparented synchronized statement node public Synchronized Statement new Synchronized Statement return new Synchronized Statement this  SynchronizedStatement newSynchronizedStatement SynchronizedStatement
Creates a new unparented for statement node owned by this AST By default there are no initializers no condition expression no updaters and the body is an empty block return a new unparented for statement node public For Statement new For Statement return new For Statement this  ForStatement newForStatement ForStatement
Creates a new unparented enhanced for statement node owned by this AST By default the paramter and expression are unspecified but legal subtrees and the body is an empty block return a new unparented throw statement node exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Enhanced For Statement new Enhanced For Statement return new Enhanced For Statement this  UnsupportedOperationException EnhancedForStatement newEnhancedForStatement EnhancedForStatement
EXPRESSIONS Creates and returns a new unparented string literal node for the empty string literal return a new unparented string literal node public String Literal new String Literal return new String Literal this  StringLiteral newStringLiteral StringLiteral
Creates and returns a new unparented character literal node Initially the node has an unspecified character literal return a new unparented character literal node public Character Literal new Character Literal return new Character Literal this  CharacterLiteral newCharacterLiteral CharacterLiteral
Creates and returns a new unparented number literal node param literal the token for the numeric literal as it would appear in Java source code return a new unparented number literal node public Number Literal new Number Literal String literal if literal null throw new Illegal Argument Exception Number Literal result new Number Literal this result set Token literal return result  NumberLiteral newNumberLiteral IllegalArgumentException NumberLiteral NumberLiteral setToken
Creates and returns a new unparented number literal node Initially the number literal token is code 0 code return a new unparented number literal node public Number Literal new Number Literal Number Literal result new Number Literal this return result  NumberLiteral newNumberLiteral NumberLiteral NumberLiteral
Creates and returns a new unparented null literal node return a new unparented null literal node public Null Literal new Null Literal return new Null Literal this  NullLiteral newNullLiteral NullLiteral
Creates and returns a new unparented boolean literal node p For example the assignment expression code foo true code is generated by the following snippet code pre Assignment e ast new Assignment e set Left Hand Side ast new Simple Name foo e set Right Hand Side ast new Boolean Literal true pre code p param value the boolean value return a new unparented boolean literal node public Boolean Literal new Boolean Literal boolean value Boolean Literal result new Boolean Literal this result set Boolean Value value return result  newAssignment setLeftHandSide newSimpleName setRightHandSide newBooleanLiteral BooleanLiteral newBooleanLiteral BooleanLiteral BooleanLiteral setBooleanValue
Creates and returns a new unparented assignment expression node owned by this AST By default the assignment operator is and the left and right hand side expressions are unspecified but legal names return a new unparented assignment expression node public Assignment new Assignment Assignment result new Assignment this return result  newAssignment
Creates an unparented method invocation expression node owned by this AST By default the name of the method is unspecified but legal there is no receiver expression no type arguments and the list of arguments is empty return a new unparented method invocation expression node public Method Invocation new Method Invocation Method Invocation result new Method Invocation this return result  MethodInvocation newMethodInvocation MethodInvocation MethodInvocation
Creates an unparented super method invocation expression node owned by this AST By default the name of the method is unspecified but legal there is no qualifier no type arguments and the list of arguments is empty return a new unparented super method invocation expression node public Super Method Invocation new Super Method Invocation Super Method Invocation result new Super Method Invocation this return result  SuperMethodInvocation newSuperMethodInvocation SuperMethodInvocation SuperMethodInvocation
Creates an unparented alternate constructor this invocation statement node owned by this AST By default the lists of arguments and type arguments are both empty p Note that this type of node is a Statement whereas a regular method invocation is an Expression The only valid use of these statements are as the first statement of a constructor body p return a new unparented alternate constructor invocation statement node public Constructor Invocation new Constructor Invocation Constructor Invocation result new Constructor Invocation this return result  ConstructorInvocation newConstructorInvocation ConstructorInvocation ConstructorInvocation
Creates an unparented alternate super constructor super invocation statement node owned by this AST By default there is no qualifier no type arguments and the list of arguments is empty p Note that this type of node is a Statement whereas a regular super method invocation is an Expression The only valid use of these statements are as the first statement of a constructor body p return a new unparented super constructor invocation statement node public Super Constructor Invocation new Super Constructor Invocation Super Constructor Invocation result new Super Constructor Invocation this return result  SuperConstructorInvocation newSuperConstructorInvocation SuperConstructorInvocation SuperConstructorInvocation
Creates a new unparented local variable declaration expression node owned by this AST for the given variable declaration fragment By default there are no modifiers and the base type is unspecified but legal p This method can be used to convert a variable declaration fragment code Variable Declaration Fragment code into an expression code Expression code by wrapping it Additional variable declaration fragments can be added afterwards p param fragment the first variable declaration fragment return a new unparented variable declaration expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public Variable Declaration Expression new Variable Declaration Expression Variable Declaration Fragment fragment if fragment null throw new Illegal Argument Exception Variable Declaration Expression result new Variable Declaration Expression this result fragments add fragment return result  VariableDeclarationFragment IllegalArgumentException VariableDeclarationExpression newVariableDeclarationExpression VariableDeclarationFragment IllegalArgumentException VariableDeclarationExpression VariableDeclarationExpression
Creates a new unparented field declaration node owned by this AST for the given variable declaration fragment By default there are no modifiers no doc comment and the base type is unspecified but legal p This method can be used to wrap a variable declaration fragment code Variable Declaration Fragment code into a field declaration suitable for inclusion in the body of a type declaration code Field Declaration code implements code Body Declaration code Additional variable declaration fragments can be added afterwards p param fragment the variable declaration fragment return a new unparented field declaration node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public Field Declaration new Field Declaration Variable Declaration Fragment fragment if fragment null throw new Illegal Argument Exception Field Declaration result new Field Declaration this result fragments add fragment return result  VariableDeclarationFragment FieldDeclaration BodyDeclaration IllegalArgumentException FieldDeclaration newFieldDeclaration VariableDeclarationFragment IllegalArgumentException FieldDeclaration FieldDeclaration
Creates and returns a new unparented this expression node owned by this AST By default there is no qualifier return a new unparented this expression node public This Expression new This Expression This Expression result new This Expression this return result  ThisExpression newThisExpression ThisExpression ThisExpression
Creates and returns a new unparented field access expression node owned by this AST By default the expression and field are both unspecified but legal names return a new unparented field access expression node public Field Access new Field Access Field Access result new Field Access this return result  FieldAccess newFieldAccess FieldAccess FieldAccess
Creates and returns a new unparented super field access expression node owned by this AST By default the expression and field are both unspecified but legal names return a new unparented super field access expression node public Super Field Access new Super Field Access Super Field Access result new Super Field Access this return result  SuperFieldAccess newSuperFieldAccess SuperFieldAccess SuperFieldAccess
Creates and returns a new unparented type literal expression node owned by this AST By default the type is unspecified but legal return a new unparented type literal node public Type Literal new Type Literal Type Literal result new Type Literal this return result  TypeLiteral newTypeLiteral TypeLiteral TypeLiteral
Creates and returns a new unparented cast expression node owned by this AST By default the type and expression are unspecified but legal return a new unparented cast expression node public Cast Expression new Cast Expression Cast Expression result new Cast Expression this return result  CastExpression newCastExpression CastExpression CastExpression
Creates and returns a new unparented parenthesized expression node owned by this AST By default the expression is unspecified but legal return a new unparented parenthesized expression node public Parenthesized Expression new Parenthesized Expression Parenthesized Expression result new Parenthesized Expression this return result  ParenthesizedExpression newParenthesizedExpression ParenthesizedExpression ParenthesizedExpression
Creates and returns a new unparented infix expression node owned by this AST By default the operator and left and right operand are unspecified but legal and there are no extended operands return a new unparented infix expression node public Infix Expression new Infix Expression Infix Expression result new Infix Expression this return result  InfixExpression newInfixExpression InfixExpression InfixExpression
Creates and returns a new unparented instanceof expression node owned by this AST By default the operator and left and right operand are unspecified but legal return a new unparented instanceof expression node public Instanceof Expression new Instanceof Expression Instanceof Expression result new Instanceof Expression this return result  InstanceofExpression newInstanceofExpression InstanceofExpression InstanceofExpression
Creates and returns a new unparented postfix expression node owned by this AST By default the operator and operand are unspecified but legal return a new unparented postfix expression node public Postfix Expression new Postfix Expression Postfix Expression result new Postfix Expression this return result  PostfixExpression newPostfixExpression PostfixExpression PostfixExpression
Creates and returns a new unparented prefix expression node owned by this AST By default the operator and operand are unspecified but legal return a new unparented prefix expression node public Prefix Expression new Prefix Expression Prefix Expression result new Prefix Expression this return result  PrefixExpression newPrefixExpression PrefixExpression PrefixExpression
Creates and returns a new unparented array access expression node owned by this AST By default the array and index expression are both unspecified but legal return a new unparented array access expression node public Array Access new Array Access Array Access result new Array Access this return result  ArrayAccess newArrayAccess ArrayAccess ArrayAccess
Creates and returns a new unparented array creation expression node owned by this AST By default the array type is an unspecified 1 dimensional array the list of dimensions is empty and there is no array initializer p Examples code pre new String len Array Creation ac1 ast new Array Creation ac1 set Type ast new Array Type ast new Simple Type ast new Simple Name String ac1 dimensions add ast new Simple Name len new double 7 24 Array Creation ac2 ast new Array Creation ac2 set Type ast new Array Type ast new Primitive Type Primitive Type DOUBLE 3 ac2 dimensions add ast new Number Literal 7 ac2 dimensions add ast new Number Literal 24 new int 1 2 Array Creation ac3 ast new Array Creation ac3 set Type ast new Array Type ast new Primitive Type Primitive Type INT Array Initializer ai ast new Array Initializer ac3 set Initializer ai ai expressions add ast new Number Literal 1 ai expressions add ast new Number Literal 2 pre code p return a new unparented array creation expression node public Array Creation new Array Creation Array Creation result new Array Creation this return result  ArrayCreation newArrayCreation setType newArrayType newSimpleType newSimpleName newSimpleName ArrayCreation newArrayCreation setType newArrayType newPrimitiveType PrimitiveType newNumberLiteral newNumberLiteral ArrayCreation newArrayCreation setType newArrayType newPrimitiveType PrimitiveType ArrayInitializer newArrayInitializer setInitializer newNumberLiteral newNumberLiteral ArrayCreation newArrayCreation ArrayCreation ArrayCreation
Creates and returns a new unparented class instance creation new expression node owned by this AST By default there is no qualifying expression no type parameters an unspecified but legal type name an empty list of arguments and does not declare an anonymous class declaration return a new unparented class instance creation expression node public Class Instance Creation new Class Instance Creation Class Instance Creation result new Class Instance Creation this return result  ClassInstanceCreation newClassInstanceCreation ClassInstanceCreation ClassInstanceCreation
Creates and returns a new unparented anonymous class declaration node owned by this AST By default the body declaration list is empty return a new unparented anonymous class declaration node public Anonymous Class Declaration new Anonymous Class Declaration Anonymous Class Declaration result new Anonymous Class Declaration this return result  AnonymousClassDeclaration newAnonymousClassDeclaration AnonymousClassDeclaration AnonymousClassDeclaration
Creates and returns a new unparented array initializer node owned by this AST By default the initializer has no expressions return a new unparented array initializer node public Array Initializer new Array Initializer Array Initializer result new Array Initializer this return result  ArrayInitializer newArrayInitializer ArrayInitializer ArrayInitializer
Creates and returns a new unparented conditional expression node owned by this AST By default the condition and both expressions are unspecified but legal return a new unparented array conditional expression node public Conditional Expression new Conditional Expression Conditional Expression result new Conditional Expression this return result  ConditionalExpression newConditionalExpression ConditionalExpression ConditionalExpression
Creates and returns a new unparented normal annotation node with an unspecified type name and an empty list of member value pairs return a new unparented normal annotation node exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Normal Annotation new Normal Annotation Normal Annotation result new Normal Annotation this return result  UnsupportedOperationException NormalAnnotation newNormalAnnotation NormalAnnotation NormalAnnotation
Creates and returns a new unparented marker annotation node with an unspecified type name return a new unparented marker annotation node exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Marker Annotation new Marker Annotation Marker Annotation result new Marker Annotation this return result  UnsupportedOperationException MarkerAnnotation newMarkerAnnotation MarkerAnnotation MarkerAnnotation
Creates and returns a new unparented single member annotation node with an unspecified type name and value return a new unparented single member annotation node exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Single Member Annotation new Single Member Annotation Single Member Annotation result new Single Member Annotation this return result  UnsupportedOperationException SingleMemberAnnotation newSingleMemberAnnotation SingleMemberAnnotation SingleMemberAnnotation
Creates and returns a new unparented member value pair node with an unspecified member name and value return a new unparented member value pair node exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Member Value Pair new Member Value Pair Member Value Pair result new Member Value Pair this return result  UnsupportedOperationException MemberValuePair newMemberValuePair MemberValuePair MemberValuePair
Enables the recording of changes to the given compilation unit and its descendents The compilation unit must have been created by code AST Parser code and still be in its original state Once recording is on arbitrary changes to the subtree rooted at the compilation unit are recorded internally Once the modification has been completed call code rewrite code to get an object representing the corresponding edits to the original source code string exception Illegal Argument Exception if this compilation unit is marked as unmodifiable or if this compilation unit has already been tampered with or if recording has already been enabled or if code root code is not owned by this AST see Compilation Unit record Modifications since 3 0 void record Modifications Compilation Unit root if this modification Count this original Modification Count throw new Illegal Argument Exception AST is already modified NON NLS 1 else if this rewriter null throw new Illegal Argument Exception AST modifications are already recorded NON NLS 1 else if root get Flags AST Node PROTECT 0 throw new Illegal Argument Exception Root node is unmodifiable NON NLS 1 else if root getAST this throw new Illegal Argument Exception Root node is not owned by this ast NON NLS 1 this rewriter new InternalAST Rewrite root this set Event Handler this rewriter  ASTParser IllegalArgumentException CompilationUnit recordModifications recordModifications CompilationUnit modificationCount originalModificationCount IllegalArgumentException IllegalArgumentException getFlags ASTNode IllegalArgumentException IllegalArgumentException InternalASTRewrite setEventHandler
Converts all modifications recorded into an object representing the corresponding text edits to the given document containing the original source code for the compilation unit that gave rise to this AST param document original document containing source code for the compilation unit param options the table of formatter options key type code String code value type code String code or code null code to use the standard global options link Java Core get Options Java Core get Options return text edit object describing the changes to the document corresponding to the recorded AST modifications exception Illegal Argument Exception if the document passed is code null code or does not correspond to this AST exception Illegal State Exception if code record Modifications code was not called to enable recording see Compilation Unit rewrite I Document Map since 3 0 Text Edit rewrite I Document document Map options if document null throw new Illegal Argument Exception if this rewriter null throw new Illegal State Exception Modifications record is not enabled NON NLS 1 return this rewriter rewriteAST document options  JavaCore getOptions JavaCore getOptions IllegalArgumentException IllegalStateException recordModifications CompilationUnit IDocument TextEdit IDocument IllegalArgumentException IllegalStateException

public AST Converter Map options boolean resolve Bindings I Progress Monitor monitor this resolve Bindings resolve Bindings this scanner new Scanner true comment false whitespace false nls Java Core VERSION 1 4 equals options get Java Core COMPILER SOURCE Class File Constants JDK1 4 Class File Constants JDK1 3 source Level null task Tags null task Priorities true task Case Sensitive this monitor monitor this inside Comments Java Core ENABLED equals options get Java Core COMPILER DOC COMMENT SUPPORT  ASTConverter resolveBindings IProgressMonitor resolveBindings resolveBindings JavaCore VERSION_1_4 JavaCore COMPILER_SOURCE ClassFileConstants JDK1_4 ClassFileConstants JDK1_3 sourceLevel taskTags taskPriorities taskCaseSensitive insideComments JavaCore JavaCore COMPILER_DOC_COMMENT_SUPPORT
public void setAST AST ast this ast ast this doc Parser new Doc Comment Parser this ast this scanner this inside Comments  docParser DocCommentParser insideComments
public Type Declaration convert org eclipse jdt internal compiler ast AST Node nodes Type Declaration type Decl this ast new Type Declaration int nodes Length nodes length for int i 0 i nodes Length i org eclipse jdt internal compiler ast AST Node node nodes i if node instanceof org eclipse jdt internal compiler ast Initializer org eclipse jdt internal compiler ast Initializer old Initializer org eclipse jdt internal compiler ast Initializer node Initializer initializer this ast new Initializer initializer set Body convert old Initializer block initializer set Modifiers old Initializer modifiers initializer set Source Range old Initializer declaration Source Start old Initializer source End old Initializer declaration Source Start 1 set Java Doc Comment initializer initializer set Javadoc convert old Initializer javadoc convert old Initializer javadoc initializer type Decl body Declarations add initializer else if node instanceof org eclipse jdt internal compiler ast Field Declaration org eclipse jdt internal compiler ast Field Declaration field Declaration org eclipse jdt internal compiler ast Field Declaration node if i 0 nodes i 1 instanceof org eclipse jdt internal compiler ast Field Declaration org eclipse jdt internal compiler ast Field Declaration nodes i 1 declaration Source Start field Declaration declaration Source Start we have a multiple field declaration We retrieve the existing field Declaration to add the new Variable Declaration Fragment Field Declaration current Field Declaration Field Declaration type Decl body Declarations get type Decl body Declarations size 1 current Field Declaration fragments add convert To Variable Declaration Fragment field Declaration else we can create a new Field Declaration type Decl body Declarations add convert To Field Declaration field Declaration else if node instanceof org eclipse jdt internal compiler ast Abstract Method Declaration Abstract Method Declaration next Method Declaration Abstract Method Declaration node if next Method Declaration is Default Constructor next Method Declaration is Clinit type Decl body Declarations add convert next Method Declaration else if node instanceof org eclipse jdt internal compiler ast Type Declaration org eclipse jdt internal compiler ast Type Declaration next Member Declaration org eclipse jdt internal compiler ast Type Declaration node type Decl body Declarations add convert next Member Declaration return type Decl  TypeDeclaration ASTNode TypeDeclaration typeDecl newTypeDeclaration nodesLength nodesLength ASTNode oldInitializer newInitializer setBody oldInitializer setModifiers oldInitializer setSourceRange oldInitializer declarationSourceStart oldInitializer sourceEnd oldInitializer declarationSourceStart setJavaDocComment setJavadoc oldInitializer oldInitializer typeDecl bodyDeclarations FieldDeclaration FieldDeclaration fieldDeclaration FieldDeclaration FieldDeclaration FieldDeclaration declarationSourceStart fieldDeclaration declarationSourceStart fieldDeclaration VariableDeclarationFragment FieldDeclaration currentFieldDeclaration FieldDeclaration typeDecl bodyDeclarations typeDecl bodyDeclarations currentFieldDeclaration convertToVariableDeclarationFragment fieldDeclaration FieldDeclaration typeDecl bodyDeclarations convertToFieldDeclaration fieldDeclaration AbstractMethodDeclaration AbstractMethodDeclaration nextMethodDeclaration AbstractMethodDeclaration nextMethodDeclaration isDefaultConstructor nextMethodDeclaration isClinit typeDecl bodyDeclarations nextMethodDeclaration TypeDeclaration TypeDeclaration nextMemberDeclaration TypeDeclaration typeDecl bodyDeclarations nextMemberDeclaration typeDecl
public Compilation Unit convert org eclipse jdt internal compiler ast Compilation Unit Declaration unit char source this compilation Unit Source source this scanner set Source source this scanner line Ends unit compilation Result line Separator Positions Compilation Unit compilation Unit this ast new Compilation Unit handle the package declaration immediately There is no node corresponding to the package declaration if this resolve Bindings record Nodes compilation Unit unit if unit current Package null Package Declaration package Declaration convert Package unit compilation Unit set Package package Declaration org eclipse jdt internal compiler ast Import Reference imports unit imports if imports null int import Length imports length for int i 0 i import Length i compilation Unit imports add convert Import imports i Parse comments int comments unit comments if comments null build Comments Table compilation Unit comments org eclipse jdt internal compiler ast Type Declaration types unit types if types null int types Length types length for int i 0 i types Length i compilation Unit types add convert types i compilation Unit set Source Range unit source Start unit source End unit source Start 1 int problem Length unit compilation Result problem Count if problem Length 0 I Problem resized Problems null final I Problem problems unit compilation Result problems if problems length problem Length resized Problems problems else System arraycopy problems 0 resized Problems new I Problem problem Length 0 problem Length propagate Errors compilation Unit resized Problems compilation Unit set Problems resized Problems if this resolve Bindings lookup For Scopes compilation Unit init Comment Mapper this scanner return compilation Unit  CompilationUnit CompilationUnitDeclaration compilationUnitSource setSource lineEnds compilationResult lineSeparatorPositions CompilationUnit compilationUnit newCompilationUnit resolveBindings recordNodes compilationUnit currentPackage PackageDeclaration packageDeclaration convertPackage compilationUnit setPackage packageDeclaration ImportReference importLength importLength compilationUnit convertImport buildCommentsTable compilationUnit TypeDeclaration typesLength typesLength compilationUnit compilationUnit setSourceRange sourceStart sourceEnd sourceStart problemLength compilationResult problemCount problemLength IProblem resizedProblems IProblem compilationResult problemLength resizedProblems resizedProblems IProblem problemLength problemLength propagateErrors compilationUnit resizedProblems compilationUnit setProblems resizedProblems resolveBindings lookupForScopes compilationUnit initCommentMapper compilationUnit
param compilation Unit param comments void build Comments Table Compilation Unit compilation Unit int comments Build comment table this comments Table new Comment comments length int nbr 0 for int i 0 i comments length i Comment comment create Comment comments i if comment null comment set Alternate Root compilation Unit this comments Table nbr comment Resize table if necessary if nbr comments length Comment new Comments Table new Comment nbr System arraycopy this comments Table 0 new Comments Table 0 nbr this comments Table new Comments Table compilation Unit set Comment Table this comments Table  compilationUnit buildCommentsTable CompilationUnit compilationUnit commentsTable createComment setAlternateRoot compilationUnit commentsTable newCommentsTable commentsTable newCommentsTable commentsTable newCommentsTable compilationUnit setCommentTable commentsTable
public Package Declaration convert Package org eclipse jdt internal compiler ast Compilation Unit Declaration compilation Unit Declaration org eclipse jdt internal compiler ast Import Reference import Reference compilation Unit Declaration current Package Package Declaration package Declaration this ast new Package Declaration char tokens import Reference tokens int length import Reference tokens length long positions import Reference source Positions int start int positions 0 32 int end int positions length 1 0xFFFFFFFF Name name null if length 1 name set Qualified Name Name And Source Ranges tokens positions import Reference else name this ast new Simple Name new String tokens 0 name set Source Range start end start 1 package Declaration set Source Range import Reference declaration Source Start import Reference declaration End import Reference declaration Source Start 1 package Declaration set Name name if this resolve Bindings record Nodes package Declaration import Reference record Nodes name compilation Unit Declaration return package Declaration  PackageDeclaration convertPackage CompilationUnitDeclaration compilationUnitDeclaration ImportReference importReference compilationUnitDeclaration currentPackage PackageDeclaration packageDeclaration newPackageDeclaration importReference importReference importReference sourcePositions setQualifiedNameNameAndSourceRanges importReference newSimpleName setSourceRange packageDeclaration setSourceRange importReference declarationSourceStart importReference declarationEnd importReference declarationSourceStart packageDeclaration setName resolveBindings recordNodes packageDeclaration importReference recordNodes compilationUnitDeclaration packageDeclaration
public Import Declaration convert Import org eclipse jdt internal compiler ast Import Reference import Reference Import Declaration import Declaration this ast new Import Declaration boolean on Demand import Reference on Demand char tokens import Reference tokens int length import Reference tokens length long positions import Reference source Positions Name name null if length 1 name set Qualified Name Name And Source Ranges tokens positions import Reference else name this ast new Simple Name new String tokens 0 int start int positions 0 32 int end int positions 0 0xFFFFFFFF name set Source Range start end start 1 import Declaration set Source Range import Reference declaration Source Start import Reference declaration End import Reference declaration Source Start 1 import Declaration set Name name import Declaration set On Demand on Demand if this resolve Bindings record Nodes import Declaration import Reference return import Declaration  ImportDeclaration convertImport ImportReference importReference ImportDeclaration importDeclaration newImportDeclaration onDemand importReference onDemand importReference importReference importReference sourcePositions setQualifiedNameNameAndSourceRanges importReference newSimpleName setSourceRange importDeclaration setSourceRange importReference declarationSourceStart importReference declarationEnd importReference declarationSourceStart importDeclaration setName importDeclaration setOnDemand onDemand resolveBindings recordNodes importDeclaration importReference importDeclaration
public Type Declaration convert org eclipse jdt internal compiler ast Type Declaration type Declaration check Canceled Type Declaration type Decl this ast new Type Declaration int modifiers type Declaration modifiers modifiers I Constants Acc Interface remove Acc Interface flags modifiers Compiler Modifiers Acc Just Flag type Decl set Modifiers modifiers type Decl set Interface type Declaration is Interface Simple Name type Name this ast new Simple Name new String type Declaration name type Name set Source Range type Declaration source Start type Declaration source End type Declaration source Start 1 type Decl set Name type Name type Decl set Source Range type Declaration declaration Source Start type Declaration body End type Declaration declaration Source Start 1 need to set the superclass and super interfaces here since we cannot distinguish them at the type references level if type Declaration superclass null type Decl set Superclass convert type Declaration superclass org eclipse jdt internal compiler ast Type Reference super Interfaces type Declaration super Interfaces if super Interfaces null for int index 0 length super Interfaces length index length index type Decl super Interfaces add convert super Interfaces index build Body Declarations type Declaration type Decl The javadoc comment is now got from list store in compilation unit declaration set Java Doc Comment type Decl if this resolve Bindings record Nodes type Decl type Declaration record Nodes type Name type Declaration type Decl resolve Binding return type Decl  TypeDeclaration TypeDeclaration typeDeclaration checkCanceled TypeDeclaration typeDecl newTypeDeclaration typeDeclaration IConstants AccInterface AccInterface CompilerModifiers AccJustFlag typeDecl setModifiers typeDecl setInterface typeDeclaration isInterface SimpleName typeName newSimpleName typeDeclaration typeName setSourceRange typeDeclaration sourceStart typeDeclaration sourceEnd typeDeclaration sourceStart typeDecl setName typeName typeDecl setSourceRange typeDeclaration declarationSourceStart typeDeclaration bodyEnd typeDeclaration declarationSourceStart typeDeclaration typeDecl setSuperclass typeDeclaration TypeReference superInterfaces typeDeclaration superInterfaces superInterfaces superInterfaces typeDecl superInterfaces superInterfaces buildBodyDeclarations typeDeclaration typeDecl setJavaDocComment typeDecl resolveBindings recordNodes typeDecl typeDeclaration recordNodes typeName typeDeclaration typeDecl resolveBinding typeDecl
private void build Body Declarations org eclipse jdt internal compiler ast Type Declaration type Declaration Type Declaration type Decl add body declaration in the lexical order org eclipse jdt internal compiler ast Type Declaration members type Declaration member Types org eclipse jdt internal compiler ast Field Declaration fields type Declaration fields org eclipse jdt internal compiler ast Abstract Method Declaration methods type Declaration methods int fields Length fields null 0 fields length int methods Length methods null 0 methods length int members Length members null 0 members length int fields Index 0 int methods Index 0 int members Index 0 while fields Index fields Length members Index members Length methods Index methods Length org eclipse jdt internal compiler ast Field Declaration next Field Declaration null org eclipse jdt internal compiler ast Abstract Method Declaration next Method Declaration null org eclipse jdt internal compiler ast Type Declaration next Member Declaration null int position Integer MAX VALUE int next Declaration Type 1 if fields Index fields Length next Field Declaration fields fields Index if next Field Declaration declaration Source Start position position next Field Declaration declaration Source Start next Declaration Type 0 FIELD if methods Index methods Length next Method Declaration methods methods Index if next Method Declaration declaration Source Start position position next Method Declaration declaration Source Start next Declaration Type 1 METHOD if members Index members Length next Member Declaration members members Index if next Member Declaration declaration Source Start position position next Member Declaration declaration Source Start next Declaration Type 2 MEMBER switch next Declaration Type case 0 check And Add Multiple Field Declaration fields fields Index type Decl body Declarations fields Index break case 1 methods Index if next Method Declaration is Default Constructor next Method Declaration is Clinit type Decl body Declarations add convert next Method Declaration break case 2 members Index type Decl body Declarations add convert next Member Declaration Convert javadoc type Decl set Javadoc convert type Declaration javadoc convert type Declaration javadoc type Decl  buildBodyDeclarations TypeDeclaration typeDeclaration TypeDeclaration typeDecl TypeDeclaration typeDeclaration memberTypes FieldDeclaration typeDeclaration AbstractMethodDeclaration typeDeclaration fieldsLength methodsLength membersLength fieldsIndex methodsIndex membersIndex fieldsIndex fieldsLength membersIndex membersLength methodsIndex methodsLength FieldDeclaration nextFieldDeclaration AbstractMethodDeclaration nextMethodDeclaration TypeDeclaration nextMemberDeclaration MAX_VALUE nextDeclarationType fieldsIndex fieldsLength nextFieldDeclaration fieldsIndex nextFieldDeclaration declarationSourceStart nextFieldDeclaration declarationSourceStart nextDeclarationType methodsIndex methodsLength nextMethodDeclaration methodsIndex nextMethodDeclaration declarationSourceStart nextMethodDeclaration declarationSourceStart nextDeclarationType membersIndex membersLength nextMemberDeclaration membersIndex nextMemberDeclaration declarationSourceStart nextMemberDeclaration declarationSourceStart nextDeclarationType nextDeclarationType checkAndAddMultipleFieldDeclaration fieldsIndex typeDecl bodyDeclarations fieldsIndex methodsIndex nextMethodDeclaration isDefaultConstructor nextMethodDeclaration isClinit typeDecl bodyDeclarations nextMethodDeclaration membersIndex typeDecl bodyDeclarations nextMemberDeclaration typeDecl setJavadoc typeDeclaration typeDeclaration typeDecl
private void check And Add Multiple Field Declaration org eclipse jdt internal compiler ast Field Declaration fields int index List body Declarations if fields index instanceof org eclipse jdt internal compiler ast Initializer org eclipse jdt internal compiler ast Initializer old Initializer org eclipse jdt internal compiler ast Initializer fields index Initializer initializer this ast new Initializer initializer set Body convert old Initializer block initializer set Modifiers old Initializer modifiers initializer set Source Range old Initializer declaration Source Start old Initializer source End old Initializer declaration Source Start 1 The javadoc comment is now got from list store in compilation unit declaration set Java Doc Comment initializer initializer set Javadoc convert old Initializer javadoc convert old Initializer javadoc initializer body Declarations add initializer return if index 0 fields index 1 declaration Source Start fields index declaration Source Start we have a multiple field declaration We retrieve the existing field Declaration to add the new Variable Declaration Fragment Field Declaration field Declaration Field Declaration body Declarations get body Declarations size 1 field Declaration fragments add convert To Variable Declaration Fragment fields index else we can create a new Field Declaration body Declarations add convert To Field Declaration fields index  checkAndAddMultipleFieldDeclaration FieldDeclaration bodyDeclarations oldInitializer newInitializer setBody oldInitializer setModifiers oldInitializer setSourceRange oldInitializer declarationSourceStart oldInitializer sourceEnd oldInitializer declarationSourceStart setJavaDocComment setJavadoc oldInitializer oldInitializer bodyDeclarations declarationSourceStart declarationSourceStart fieldDeclaration VariableDeclarationFragment FieldDeclaration fieldDeclaration FieldDeclaration bodyDeclarations bodyDeclarations fieldDeclaration convertToVariableDeclarationFragment FieldDeclaration bodyDeclarations convertToFieldDeclaration
private void check And Add Multiple Local Declaration org eclipse jdt internal compiler ast Statement stmts int index List block Statements if index 0 stmts index 1 instanceof org eclipse jdt internal compiler ast Local Declaration org eclipse jdt internal compiler ast Local Declaration local1 org eclipse jdt internal compiler ast Local Declaration stmts index 1 org eclipse jdt internal compiler ast Local Declaration local2 org eclipse jdt internal compiler ast Local Declaration stmts index if local1 declaration Source Start local2 declaration Source Start we have a multiple local declarations We retrieve the existing Variable Declaration Statement to add the new Variable Declaration Fragment Variable Declaration Statement variable Declaration Statement Variable Declaration Statement block Statements get block Statements size 1 variable Declaration Statement fragments add convert To Variable Declaration Fragment org eclipse jdt internal compiler ast Local Declaration stmts index else we can create a new Field Declaration block Statements add convert To Variable Declaration Statement org eclipse jdt internal compiler ast Local Declaration stmts index else we can create a new Field Declaration block Statements add convert To Variable Declaration Statement org eclipse jdt internal compiler ast Local Declaration stmts index  checkAndAddMultipleLocalDeclaration blockStatements LocalDeclaration LocalDeclaration LocalDeclaration LocalDeclaration LocalDeclaration declarationSourceStart declarationSourceStart VariableDeclarationStatement VariableDeclarationFragment VariableDeclarationStatement variableDeclarationStatement VariableDeclarationStatement blockStatements blockStatements variableDeclarationStatement convertToVariableDeclarationFragment LocalDeclaration FieldDeclaration blockStatements convertToVariableDeclarationStatement LocalDeclaration FieldDeclaration blockStatements convertToVariableDeclarationStatement LocalDeclaration
private void check Canceled if this monitor null this monitor is Canceled throw new Operation Canceled Exception  checkCanceled isCanceled OperationCanceledException
public Name convert org eclipse jdt internal compiler ast Type Reference type Reference char type Name type Reference get Type Name int length type Name length Name name null if length 1 Qualified Name org eclipse jdt internal compiler ast Qualified Type Reference qualified Type Reference org eclipse jdt internal compiler ast Qualified Type Reference type Reference long positions qualified Type Reference source Positions name set Qualified Name Name And Source Ranges type Name positions type Reference else name this ast new Simple Name new String type Name 0 name set Source Range type Reference source Start type Reference source End type Reference source Start 1 if this resolve Bindings record Nodes name type Reference return name  TypeReference typeReference typeName typeReference getTypeName typeName QualifiedName QualifiedTypeReference qualifiedTypeReference QualifiedTypeReference typeReference qualifiedTypeReference sourcePositions setQualifiedNameNameAndSourceRanges typeName typeReference newSimpleName typeName setSourceRange typeReference sourceStart typeReference sourceEnd typeReference sourceStart resolveBindings recordNodes typeReference
public Simple Name convert org eclipse jdt internal compiler ast Single Name Reference name Reference Simple Name name this ast new Simple Name new String name Reference token if this resolve Bindings record Nodes name name Reference name set Source Range name Reference source Start name Reference source End name Reference source Start 1 return name  SimpleName SingleNameReference nameReference SimpleName newSimpleName nameReference resolveBindings recordNodes nameReference setSourceRange nameReference sourceStart nameReference sourceEnd nameReference sourceStart
public Name convert org eclipse jdt internal compiler ast Qualified Name Reference name Reference return set Qualified Name Name And Source Ranges name Reference tokens name Reference source Positions name Reference  QualifiedNameReference nameReference setQualifiedNameNameAndSourceRanges nameReference nameReference sourcePositions nameReference
private Qualified Name set Qualified Name Name And Source Ranges char type Name long positions org eclipse jdt internal compiler ast AST Node node int length type Name length Simple Name first Token this ast new Simple Name new String type Name 0 first Token index length 1 int start0 int positions 0 32 int start start0 int end int positions 0 0xFFFFFFFF first Token set Source Range start end start 1 Simple Name second Token this ast new Simple Name new String type Name 1 second Token index length 2 start int positions 1 32 end int positions 1 0xFFFFFFFF second Token set Source Range start end start 1 Qualified Name qualified Name this ast new Qualified Name first Token second Token if this resolve Bindings record Nodes qualified Name node record Pending Name Scope Resolution qualified Name record Nodes first Token node record Nodes second Token node record Pending Name Scope Resolution first Token record Pending Name Scope Resolution second Token qualified Name index length 2 qualified Name set Source Range start0 end start0 1 Simple Name new Part null for int i 2 i length i new Part this ast new Simple Name new String type Name i new Part index length i 1 start int positions i 32 end int positions i 0xFFFFFFFF new Part set Source Range start end start 1 qualified Name this ast new Qualified Name qualified Name new Part qualified Name index new Part index qualified Name set Source Range start0 end start0 1 if this resolve Bindings record Nodes qualified Name node record Nodes new Part node record Pending Name Scope Resolution qualified Name record Pending Name Scope Resolution new Part Qualified Name name qualified Name if this resolve Bindings record Nodes name node record Pending Name Scope Resolution name return name  QualifiedName setQualifiedNameNameAndSourceRanges typeName ASTNode typeName SimpleName firstToken newSimpleName typeName firstToken firstToken setSourceRange SimpleName secondToken newSimpleName typeName secondToken secondToken setSourceRange QualifiedName qualifiedName newQualifiedName firstToken secondToken resolveBindings recordNodes qualifiedName recordPendingNameScopeResolution qualifiedName recordNodes firstToken recordNodes secondToken recordPendingNameScopeResolution firstToken recordPendingNameScopeResolution secondToken qualifiedName qualifiedName setSourceRange SimpleName newPart newPart newSimpleName typeName newPart newPart setSourceRange qualifiedName newQualifiedName qualifiedName newPart qualifiedName newPart qualifiedName setSourceRange resolveBindings recordNodes qualifiedName recordNodes newPart recordPendingNameScopeResolution qualifiedName recordPendingNameScopeResolution newPart QualifiedName qualifiedName resolveBindings recordNodes recordPendingNameScopeResolution
public Expression convert org eclipse jdt internal compiler ast This Reference reference if reference is Implicit This There is no source associated with an implicit this return null else if reference instanceof org eclipse jdt internal compiler ast Qualified Super Reference return convert org eclipse jdt internal compiler ast Qualified Super Reference reference else if reference instanceof org eclipse jdt internal compiler ast Qualified This Reference return convert org eclipse jdt internal compiler ast Qualified This Reference reference else This Expression this Expression this ast new This Expression this Expression set Source Range reference source Start reference source End reference source Start 1 if this resolve Bindings record Nodes this Expression reference record Pending This Expression Scope Resolution this Expression return this Expression  ThisReference isImplicitThis QualifiedSuperReference QualifiedSuperReference QualifiedThisReference QualifiedThisReference ThisExpression thisExpression newThisExpression thisExpression setSourceRange sourceStart sourceEnd sourceStart resolveBindings recordNodes thisExpression recordPendingThisExpressionScopeResolution thisExpression thisExpression
public This Expression convert org eclipse jdt internal compiler ast Qualified This Reference reference This Expression this Expression this ast new This Expression this Expression set Source Range reference source Start reference source End reference source Start 1 this Expression set Qualifier convert reference qualification if this resolve Bindings record Nodes this Expression reference record Pending This Expression Scope Resolution this Expression return this Expression  ThisExpression QualifiedThisReference ThisExpression thisExpression newThisExpression thisExpression setSourceRange sourceStart sourceEnd sourceStart thisExpression setQualifier resolveBindings recordNodes thisExpression recordPendingThisExpressionScopeResolution thisExpression thisExpression
public Name convert org eclipse jdt internal compiler ast Qualified Super Reference reference return convert reference qualification  QualifiedSuperReference
public Array Access convert org eclipse jdt internal compiler ast Array Reference reference Array Access array Access this ast new Array Access if this resolve Bindings record Nodes array Access reference array Access set Source Range reference source Start reference source End reference source Start 1 array Access set Array convert reference receiver array Access set Index convert reference position return array Access  ArrayAccess ArrayReference ArrayAccess arrayAccess newArrayAccess resolveBindings recordNodes arrayAccess arrayAccess setSourceRange sourceStart sourceEnd sourceStart arrayAccess setArray arrayAccess setIndex arrayAccess
public Expression convert org eclipse jdt internal compiler ast Field Reference reference if reference receiver is Super Super Field Access super Field Access this ast new Super Field Access if this resolve Bindings record Nodes super Field Access reference if reference receiver instanceof org eclipse jdt internal compiler ast Qualified Super Reference Name qualifier convert org eclipse jdt internal compiler ast Qualified Super Reference reference receiver super Field Access set Qualifier qualifier if this resolve Bindings record Nodes qualifier reference receiver Simple Name simple Name this ast new Simple Name new String reference token int source Start int reference name Source Position 32 int length int reference name Source Position 0xFFFFFFFF source Start 1 simple Name set Source Range source Start length super Field Access set Name simple Name if this resolve Bindings record Nodes simple Name reference super Field Access set Source Range reference receiver source Start reference source End reference receiver source Start 1 return super Field Access else Field Access field Access this ast new Field Access if this resolve Bindings record Nodes field Access reference Expression receiver convert reference receiver field Access set Expression receiver Simple Name simple Name this ast new Simple Name new String reference token int source Start int reference name Source Position 32 int length int reference name Source Position 0xFFFFFFFF source Start 1 simple Name set Source Range source Start length field Access set Name simple Name if this resolve Bindings record Nodes simple Name reference field Access set Source Range receiver get Start Position reference source End receiver get Start Position 1 return field Access  FieldReference isSuper SuperFieldAccess superFieldAccess newSuperFieldAccess resolveBindings recordNodes superFieldAccess QualifiedSuperReference QualifiedSuperReference superFieldAccess setQualifier resolveBindings recordNodes SimpleName simpleName newSimpleName sourceStart nameSourcePosition nameSourcePosition sourceStart simpleName setSourceRange sourceStart superFieldAccess setName simpleName resolveBindings recordNodes simpleName superFieldAccess setSourceRange sourceStart sourceEnd sourceStart superFieldAccess FieldAccess fieldAccess newFieldAccess resolveBindings recordNodes fieldAccess fieldAccess setExpression SimpleName simpleName newSimpleName sourceStart nameSourcePosition nameSourcePosition sourceStart simpleName setSourceRange sourceStart fieldAccess setName simpleName resolveBindings recordNodes simpleName fieldAccess setSourceRange getStartPosition sourceEnd getStartPosition fieldAccess
public Expression convert org eclipse jdt internal compiler ast Reference reference if reference instanceof org eclipse jdt internal compiler ast Name Reference return convert org eclipse jdt internal compiler ast Name Reference reference if reference instanceof org eclipse jdt internal compiler ast This Reference return convert org eclipse jdt internal compiler ast This Reference reference if reference instanceof org eclipse jdt internal compiler ast Array Reference return convert org eclipse jdt internal compiler ast Array Reference reference if reference instanceof org eclipse jdt internal compiler ast Field Reference return convert org eclipse jdt internal compiler ast Field Reference reference throw new Illegal Argument Exception Not yet implemented convert reference get Class NON NLS 1 NON NLS 2  NameReference NameReference ThisReference ThisReference ArrayReference ArrayReference FieldReference FieldReference IllegalArgumentException getClass
public Name convert org eclipse jdt internal compiler ast Name Reference reference if reference instanceof org eclipse jdt internal compiler ast Qualified Name Reference return convert org eclipse jdt internal compiler ast Qualified Name Reference reference if reference instanceof org eclipse jdt internal compiler ast Single Name Reference return convert org eclipse jdt internal compiler ast Single Name Reference reference throw new Illegal Argument Exception Not yet implemented convert reference get Class NON NLS 1 NON NLS 2  NameReference QualifiedNameReference QualifiedNameReference SingleNameReference SingleNameReference IllegalArgumentException getClass
private void complete Record Array Type array Type org eclipse jdt internal compiler ast AST Node ast Node Array Type array array Type int dimensions array get Dimensions for int i 0 i dimensions i Type component Type array get Component Type this record Nodes component Type ast Node if component Type is Array Type array Array Type component Type  completeRecord ArrayType arrayType ASTNode astNode ArrayType arrayType getDimensions componentType getComponentType recordNodes componentType astNode componentType isArrayType ArrayType componentType
public Type convert Type org eclipse jdt internal compiler ast Type Reference type Reference Type type null int source Start 1 int length 0 int dimensions type Reference dimensions if type Reference instanceof org eclipse jdt internal compiler ast Single Type Reference this is either an Array Type Reference or a Single Type Reference char name org eclipse jdt internal compiler ast Single Type Reference type Reference get Type Name 0 source Start type Reference source Start length type Reference source End type Reference source Start 1 if dimensions 0 need to find out if this is an array type of primitive types or not if is Primitive Type name int end retrieve End Of Element Type Name Position source Start source Start length if end 1 end source Start length 1 Primitive Type primitive Type this ast new Primitive Type get Primitive Type Code name primitive Type set Source Range source Start end source Start 1 type this ast new Array Type primitive Type dimensions if this resolve Bindings store keys for inner types complete Record Array Type type type Reference type set Source Range source Start length else Simple Name simple Name this ast new Simple Name new String name we need to search for the starting position of the first brace in order to set the proper length PR http dev eclipse org bugs show bug cgi id 10759 int end retrieve End Of Element Type Name Position source Start source Start length if end 1 end source Start length 1 simple Name set Source Range source Start end source Start 1 Simple Type simple Type this ast new Simple Type simple Name simple Type set Source Range source Start end source Start 1 type this ast new Array Type simple Type dimensions type set Source Range source Start length if this resolve Bindings complete Record Array Type type type Reference this record Nodes simple Name type Reference else if is Primitive Type name type this ast new Primitive Type get Primitive Type Code name type set Source Range source Start length else Simple Name simple Name this ast new Simple Name new String name simple Name set Source Range source Start length type this ast new Simple Type simple Name type set Source Range source Start length if this resolve Bindings this record Nodes simple Name type Reference else char name org eclipse jdt internal compiler ast Qualified Type Reference type Reference get Type Name int name Length name length long positions org eclipse jdt internal compiler ast Qualified Type Reference type Reference source Positions source Start int positions 0 32 length int positions name Length 1 0xFFFFFFFF source Start 1 Name qualified Name this set Qualified Name Name And Source Ranges name positions type Reference if dimensions 0 need to find out if this is an array type of primitive types or not Simple Type simple Type this ast new Simple Type qualified Name simple Type set Source Range source Start length type this ast new Array Type simple Type dimensions if this resolve Bindings complete Record Array Type type type Reference int end retrieve End Of Dimensions Position source Start length this compilation Unit Source length if end 1 type set Source Range source Start end source Start 1 else type set Source Range source Start length else type this ast new Simple Type qualified Name type set Source Range source Start length if this resolve Bindings this record Nodes type type Reference return type  convertType TypeReference typeReference sourceStart typeReference typeReference SingleTypeReference ArrayTypeReference SingleTypeReference SingleTypeReference typeReference getTypeName sourceStart typeReference sourceStart typeReference sourceEnd typeReference sourceStart isPrimitiveType retrieveEndOfElementTypeNamePosition sourceStart sourceStart sourceStart PrimitiveType primitiveType newPrimitiveType getPrimitiveTypeCode primitiveType setSourceRange sourceStart sourceStart newArrayType primitiveType resolveBindings completeRecord ArrayType typeReference setSourceRange sourceStart SimpleName simpleName newSimpleName show_bug retrieveEndOfElementTypeNamePosition sourceStart sourceStart sourceStart simpleName setSourceRange sourceStart sourceStart SimpleType simpleType newSimpleType simpleName simpleType setSourceRange sourceStart sourceStart newArrayType simpleType setSourceRange sourceStart resolveBindings completeRecord ArrayType typeReference recordNodes simpleName typeReference isPrimitiveType newPrimitiveType getPrimitiveTypeCode setSourceRange sourceStart SimpleName simpleName newSimpleName simpleName setSourceRange sourceStart newSimpleType simpleName setSourceRange sourceStart resolveBindings recordNodes simpleName typeReference QualifiedTypeReference typeReference getTypeName nameLength QualifiedTypeReference typeReference sourcePositions sourceStart nameLength sourceStart qualifiedName setQualifiedNameNameAndSourceRanges typeReference SimpleType simpleType newSimpleType qualifiedName simpleType setSourceRange sourceStart newArrayType simpleType resolveBindings completeRecord ArrayType typeReference retrieveEndOfDimensionsPosition sourceStart compilationUnitSource setSourceRange sourceStart sourceStart setSourceRange sourceStart newSimpleType qualifiedName setSourceRange sourceStart resolveBindings recordNodes typeReference
public Method Declaration convert org eclipse jdt internal compiler ast Abstract Method Declaration method Declaration check Canceled Method Declaration method Decl this ast new Method Declaration method Decl set Modifiers method Declaration modifiers org eclipse jdt internal compiler lookup Compiler Modifiers Acc Just Flag boolean is Constructor method Declaration is Constructor method Decl set Constructor is Constructor Simple Name method Name this ast new Simple Name new String method Declaration selector int start method Declaration source Start int end retrieve Identifier End Position start method Declaration source End method Name set Source Range start end start 1 method Decl set Name method Name org eclipse jdt internal compiler ast Type Reference thrown Exceptions method Declaration thrown Exceptions if thrown Exceptions null int thrown Exceptions Length thrown Exceptions length for int i 0 i thrown Exceptions Length i method Decl thrown Exceptions add convert thrown Exceptions i org eclipse jdt internal compiler ast Argument parameters method Declaration arguments if parameters null int parameters Length parameters length for int i 0 i parameters Length i method Decl parameters add convert parameters i org eclipse jdt internal compiler ast Explicit Constructor Call explicit Constructor Call null if is Constructor set the return type to VOID Primitive Type return Type this ast new Primitive Type Primitive Type VOID return Type set Source Range method Declaration source Start 0 method Decl set Return Type return Type org eclipse jdt internal compiler ast Constructor Declaration constructor Declaration org eclipse jdt internal compiler ast Constructor Declaration method Declaration explicit Constructor Call constructor Declaration constructor Call else org eclipse jdt internal compiler ast Method Declaration method org eclipse jdt internal compiler ast Method Declaration method Declaration org eclipse jdt internal compiler ast Type Reference type Reference method return Type if type Reference null Type return Type convert Type type Reference get the positions of the right parenthesis int right Parenthesis Position retrieve End Of Right Parenthesis Position end method body End int extra Dimensions retrieve Extra Dimension right Parenthesis Position method body End method Decl set Extra Dimensions extra Dimensions set Type For Method Declaration method Decl return Type extra Dimensions int declaration Source Start method Declaration declaration Source Start int declaration Source End method Declaration body End method Decl set Source Range declaration Source Start declaration Source End declaration Source Start 1 int closing Position retrieve Right Brace Or Semi Colon Position method Decl method Declaration if closing Position 1 int start Position method Decl get Start Position method Decl set Source Range start Position closing Position start Position org eclipse jdt internal compiler ast Statement statements method Declaration statements start retrieve Start Block Position method Declaration source Start declaration Source End end retrieve End Block Position method Declaration source Start method Declaration declaration Source End Block block null if start 1 end 1 start or end can be equal to 1 if we have an interface s method block this ast new Block block set Source Range start end start 1 method Decl set Body block if block null statements null explicit Constructor Call null if explicit Constructor Call null explicit Constructor Call access Mode org eclipse jdt internal compiler ast Explicit Constructor Call Implicit Super block statements add convert explicit Constructor Call int statements Length statements null 0 statements length for int i 0 i statements Length i if statements i instanceof org eclipse jdt internal compiler ast Local Declaration check And Add Multiple Local Declaration statements i block statements else block statements add convert statements i if block null Modifier is Abstract method Decl get Modifiers Modifier is Native method Decl get Modifiers method Decl set Flags method Decl get Flags AST Node MALFORMED else syntax error in this method declaration if method Declaration is Native method Declaration is Abstract start retrieve Start Block Position method Declaration source Start declaration Source End end method Declaration body End try to get the best end position I Problem problems method Declaration compilation Result problems if problems null for int i 0 max method Declaration compilation Result problem Count i max i I Problem current Problem problems i if current Problem get Source Start start current Problem getID I Problem Parsing Error Insert To Complete end current Problem get Source End break int start Position method Decl get Start Position method Decl set Source Range start Position end start Position 1 if start 1 end 1 start or end can be equal to 1 if we have an interface s method Block block this ast new Block block set Source Range start end start 1 method Decl set Body block The javadoc comment is now got from list store in compilation unit declaration set Java Doc Comment method Decl method Decl set Javadoc convert method Declaration javadoc convert method Declaration javadoc method Decl if this resolve Bindings record Nodes method Decl method Declaration record Nodes method Name method Declaration method Decl resolve Binding return method Decl  MethodDeclaration AbstractMethodDeclaration methodDeclaration checkCanceled MethodDeclaration methodDecl newMethodDeclaration methodDecl setModifiers methodDeclaration CompilerModifiers AccJustFlag isConstructor methodDeclaration isConstructor methodDecl setConstructor isConstructor SimpleName methodName newSimpleName methodDeclaration methodDeclaration sourceStart retrieveIdentifierEndPosition methodDeclaration sourceEnd methodName setSourceRange methodDecl setName methodName TypeReference thrownExceptions methodDeclaration thrownExceptions thrownExceptions thrownExceptionsLength thrownExceptions thrownExceptionsLength methodDecl thrownExceptions thrownExceptions methodDeclaration parametersLength parametersLength methodDecl ExplicitConstructorCall explicitConstructorCall isConstructor PrimitiveType returnType newPrimitiveType PrimitiveType returnType setSourceRange methodDeclaration sourceStart methodDecl setReturnType returnType ConstructorDeclaration constructorDeclaration ConstructorDeclaration methodDeclaration explicitConstructorCall constructorDeclaration constructorCall MethodDeclaration MethodDeclaration methodDeclaration TypeReference typeReference returnType typeReference returnType convertType typeReference rightParenthesisPosition retrieveEndOfRightParenthesisPosition bodyEnd extraDimensions retrieveExtraDimension rightParenthesisPosition bodyEnd methodDecl setExtraDimensions extraDimensions setTypeForMethodDeclaration methodDecl returnType extraDimensions declarationSourceStart methodDeclaration declarationSourceStart declarationSourceEnd methodDeclaration bodyEnd methodDecl setSourceRange declarationSourceStart declarationSourceEnd declarationSourceStart closingPosition retrieveRightBraceOrSemiColonPosition methodDecl methodDeclaration closingPosition startPosition methodDecl getStartPosition methodDecl setSourceRange startPosition closingPosition startPosition methodDeclaration retrieveStartBlockPosition methodDeclaration sourceStart declarationSourceEnd retrieveEndBlockPosition methodDeclaration sourceStart methodDeclaration declarationSourceEnd newBlock setSourceRange methodDecl setBody explicitConstructorCall explicitConstructorCall explicitConstructorCall accessMode ExplicitConstructorCall ImplicitSuper explicitConstructorCall statementsLength statementsLength LocalDeclaration checkAndAddMultipleLocalDeclaration isAbstract methodDecl getModifiers isNative methodDecl getModifiers methodDecl setFlags methodDecl getFlags ASTNode methodDeclaration isNative methodDeclaration isAbstract retrieveStartBlockPosition methodDeclaration sourceStart declarationSourceEnd methodDeclaration bodyEnd IProblem methodDeclaration compilationResult methodDeclaration compilationResult problemCount IProblem currentProblem currentProblem getSourceStart currentProblem IProblem ParsingErrorInsertToComplete currentProblem getSourceEnd startPosition methodDecl getStartPosition methodDecl setSourceRange startPosition startPosition newBlock setSourceRange methodDecl setBody setJavaDocComment methodDecl methodDecl setJavadoc methodDeclaration methodDeclaration methodDecl resolveBindings recordNodes methodDecl methodDeclaration recordNodes methodName methodDeclaration methodDecl resolveBinding methodDecl
public Expression convert org eclipse jdt internal compiler ast Expression expression if expression bits org eclipse jdt internal compiler ast AST Node ParenthesizedMASK 0 return convert To Parenthesized Expression expression if expression instanceof org eclipse jdt internal compiler ast Cast Expression return convert org eclipse jdt internal compiler ast Cast Expression expression switch between all types of expression if expression instanceof org eclipse jdt internal compiler ast Array Allocation Expression return convert org eclipse jdt internal compiler ast Array Allocation Expression expression if expression instanceof org eclipse jdt internal compiler ast Qualified Allocation Expression return convert org eclipse jdt internal compiler ast Qualified Allocation Expression expression if expression instanceof org eclipse jdt internal compiler ast Allocation Expression return convert org eclipse jdt internal compiler ast Allocation Expression expression if expression instanceof org eclipse jdt internal compiler ast Array Initializer return convert org eclipse jdt internal compiler ast Array Initializer expression if expression instanceof org eclipse jdt internal compiler ast Prefix Expression return convert org eclipse jdt internal compiler ast Prefix Expression expression if expression instanceof org eclipse jdt internal compiler ast Postfix Expression return convert org eclipse jdt internal compiler ast Postfix Expression expression if expression instanceof org eclipse jdt internal compiler ast Compound Assignment return convert org eclipse jdt internal compiler ast Compound Assignment expression if expression instanceof org eclipse jdt internal compiler ast Assignment return convert org eclipse jdt internal compiler ast Assignment expression if expression instanceof org eclipse jdt internal compiler ast Class Literal Access return convert org eclipse jdt internal compiler ast Class Literal Access expression if expression instanceof org eclipse jdt internal compiler ast False Literal return convert org eclipse jdt internal compiler ast False Literal expression if expression instanceof org eclipse jdt internal compiler ast True Literal return convert org eclipse jdt internal compiler ast True Literal expression if expression instanceof org eclipse jdt internal compiler ast Null Literal return convert org eclipse jdt internal compiler ast Null Literal expression if expression instanceof org eclipse jdt internal compiler ast Char Literal return convert org eclipse jdt internal compiler ast Char Literal expression if expression instanceof org eclipse jdt internal compiler ast Double Literal return convert org eclipse jdt internal compiler ast Double Literal expression if expression instanceof org eclipse jdt internal compiler ast Float Literal return convert org eclipse jdt internal compiler ast Float Literal expression if expression instanceof org eclipse jdt internal compiler ast Int Literal Min Value return convert org eclipse jdt internal compiler ast Int Literal Min Value expression if expression instanceof org eclipse jdt internal compiler ast Int Literal return convert org eclipse jdt internal compiler ast Int Literal expression if expression instanceof org eclipse jdt internal compiler ast Long Literal Min Value return convert org eclipse jdt internal compiler ast Long Literal Min Value expression if expression instanceof org eclipse jdt internal compiler ast Long Literal return convert org eclipse jdt internal compiler ast Long Literal expression if expression instanceof String Literal Concatenation return convert String Literal Concatenation expression if expression instanceof org eclipse jdt internal compiler ast Extended String Literal return convert org eclipse jdt internal compiler ast Extended String Literal expression if expression instanceof org eclipse jdt internal compiler ast String Literal return convert org eclipse jdt internal compiler ast String Literal expression if expression instanceof org eclipse jdt internal compiler ast AND AND Expression return convert org eclipse jdt internal compiler ast AND AND Expression expression if expression instanceof org eclipse jdt internal compiler ast OR OR Expression return convert org eclipse jdt internal compiler ast OR OR Expression expression if expression instanceof org eclipse jdt internal compiler ast Equal Expression return convert org eclipse jdt internal compiler ast Equal Expression expression if expression instanceof org eclipse jdt internal compiler ast Binary Expression return convert org eclipse jdt internal compiler ast Binary Expression expression if expression instanceof org eclipse jdt internal compiler ast Instance Of Expression return convert org eclipse jdt internal compiler ast Instance Of Expression expression if expression instanceof org eclipse jdt internal compiler ast Unary Expression return convert org eclipse jdt internal compiler ast Unary Expression expression if expression instanceof org eclipse jdt internal compiler ast Conditional Expression return convert org eclipse jdt internal compiler ast Conditional Expression expression if expression instanceof org eclipse jdt internal compiler ast Message Send return convert org eclipse jdt internal compiler ast Message Send expression if expression instanceof org eclipse jdt internal compiler ast Reference return convert org eclipse jdt internal compiler ast Reference expression if expression instanceof org eclipse jdt internal compiler ast Type Reference return convert org eclipse jdt internal compiler ast Type Reference expression throw new Illegal Argument Exception Not yet implemented convert expression get Class NON NLS 1 NON NLS 2  ASTNode convertToParenthesizedExpression CastExpression CastExpression ArrayAllocationExpression ArrayAllocationExpression QualifiedAllocationExpression QualifiedAllocationExpression AllocationExpression AllocationExpression ArrayInitializer ArrayInitializer PrefixExpression PrefixExpression PostfixExpression PostfixExpression CompoundAssignment CompoundAssignment ClassLiteralAccess ClassLiteralAccess FalseLiteral FalseLiteral TrueLiteral TrueLiteral NullLiteral NullLiteral CharLiteral CharLiteral DoubleLiteral DoubleLiteral FloatLiteral FloatLiteral IntLiteralMinValue IntLiteralMinValue IntLiteral IntLiteral LongLiteralMinValue LongLiteralMinValue LongLiteral LongLiteral StringLiteralConcatenation StringLiteralConcatenation ExtendedStringLiteral ExtendedStringLiteral StringLiteral StringLiteral AND_AND_Expression AND_AND_Expression OR_OR_Expression OR_OR_Expression EqualExpression EqualExpression BinaryExpression BinaryExpression InstanceOfExpression InstanceOfExpression UnaryExpression UnaryExpression ConditionalExpression ConditionalExpression MessageSend MessageSend TypeReference TypeReference IllegalArgumentException getClass
public Parenthesized Expression convert To Parenthesized Expression org eclipse jdt internal compiler ast Expression expression Parenthesized Expression parenthesized Expression this ast new Parenthesized Expression if this resolve Bindings record Nodes parenthesized Expression expression parenthesized Expression set Source Range expression source Start expression source End expression source Start 1 adjust Source Positions For Parent expression trim White Spaces And Comments expression decrement the number of parenthesis int number Of Parenthesis expression bits org eclipse jdt internal compiler ast AST Node ParenthesizedMASK org eclipse jdt internal compiler ast AST Node ParenthesizedSHIFT expression bits org eclipse jdt internal compiler ast AST Node ParenthesizedMASK expression bits number Of Parenthesis 1 org eclipse jdt internal compiler ast AST Node ParenthesizedSHIFT parenthesized Expression set Expression convert expression return parenthesized Expression  ParenthesizedExpression convertToParenthesizedExpression ParenthesizedExpression parenthesizedExpression newParenthesizedExpression resolveBindings recordNodes parenthesizedExpression parenthesizedExpression setSourceRange sourceStart sourceEnd sourceStart adjustSourcePositionsForParent trimWhiteSpacesAndComments numberOfParenthesis ASTNode ASTNode ASTNode numberOfParenthesis ASTNode parenthesizedExpression setExpression parenthesizedExpression
public Class Instance Creation convert org eclipse jdt internal compiler ast Allocation Expression expression Class Instance Creation class Instance Creation this ast new Class Instance Creation if this resolve Bindings record Nodes class Instance Creation expression class Instance Creation set Name convert expression type class Instance Creation set Source Range expression source Start expression source End expression source Start 1 org eclipse jdt internal compiler ast Expression arguments expression arguments if arguments null int length arguments length for int i 0 i length i class Instance Creation arguments add convert arguments i remove Trailing Comment From Expression Ending WithA Paren class Instance Creation return class Instance Creation  ClassInstanceCreation AllocationExpression ClassInstanceCreation classInstanceCreation newClassInstanceCreation resolveBindings recordNodes classInstanceCreation classInstanceCreation setName classInstanceCreation setSourceRange sourceStart sourceEnd sourceStart classInstanceCreation removeTrailingCommentFromExpressionEndingWithAParen classInstanceCreation classInstanceCreation
private void build Body Declarations org eclipse jdt internal compiler ast Type Declaration expression Anonymous Class Declaration anonymous Class Declaration add body declaration in the lexical order org eclipse jdt internal compiler ast Type Declaration members expression member Types org eclipse jdt internal compiler ast Field Declaration fields expression fields org eclipse jdt internal compiler ast Abstract Method Declaration methods expression methods int fields Length fields null 0 fields length int methods Length methods null 0 methods length int members Length members null 0 members length int fields Index 0 int methods Index 0 int members Index 0 while fields Index fields Length members Index members Length methods Index methods Length org eclipse jdt internal compiler ast Field Declaration next Field Declaration null org eclipse jdt internal compiler ast Abstract Method Declaration next Method Declaration null org eclipse jdt internal compiler ast Type Declaration next Member Declaration null int position Integer MAX VALUE int next Declaration Type 1 if fields Index fields Length next Field Declaration fields fields Index if next Field Declaration declaration Source Start position position next Field Declaration declaration Source Start next Declaration Type 0 FIELD if methods Index methods Length next Method Declaration methods methods Index if next Method Declaration declaration Source Start position position next Method Declaration declaration Source Start next Declaration Type 1 METHOD if members Index members Length next Member Declaration members members Index if next Member Declaration declaration Source Start position position next Member Declaration declaration Source Start next Declaration Type 2 MEMBER switch next Declaration Type case 0 check And Add Multiple Field Declaration fields fields Index anonymous Class Declaration body Declarations fields Index break case 1 methods Index if next Method Declaration is Default Constructor next Method Declaration is Clinit anonymous Class Declaration body Declarations add convert next Method Declaration break case 2 members Index anonymous Class Declaration body Declarations add convert next Member Declaration  buildBodyDeclarations TypeDeclaration AnonymousClassDeclaration anonymousClassDeclaration TypeDeclaration memberTypes FieldDeclaration AbstractMethodDeclaration fieldsLength methodsLength membersLength fieldsIndex methodsIndex membersIndex fieldsIndex fieldsLength membersIndex membersLength methodsIndex methodsLength FieldDeclaration nextFieldDeclaration AbstractMethodDeclaration nextMethodDeclaration TypeDeclaration nextMemberDeclaration MAX_VALUE nextDeclarationType fieldsIndex fieldsLength nextFieldDeclaration fieldsIndex nextFieldDeclaration declarationSourceStart nextFieldDeclaration declarationSourceStart nextDeclarationType methodsIndex methodsLength nextMethodDeclaration methodsIndex nextMethodDeclaration declarationSourceStart nextMethodDeclaration declarationSourceStart nextDeclarationType membersIndex membersLength nextMemberDeclaration membersIndex nextMemberDeclaration declarationSourceStart nextMemberDeclaration declarationSourceStart nextDeclarationType nextDeclarationType checkAndAddMultipleFieldDeclaration fieldsIndex anonymousClassDeclaration bodyDeclarations fieldsIndex methodsIndex nextMethodDeclaration isDefaultConstructor nextMethodDeclaration isClinit anonymousClassDeclaration bodyDeclarations nextMethodDeclaration membersIndex anonymousClassDeclaration bodyDeclarations nextMemberDeclaration
public Array Creation convert org eclipse jdt internal compiler ast Array Allocation Expression expression Array Creation array Creation this ast new Array Creation if this resolve Bindings record Nodes array Creation expression array Creation set Source Range expression source Start expression source End expression source Start 1 org eclipse jdt internal compiler ast Expression dimensions expression dimensions int dimensions Length dimensions length for int i 0 i dimensions Length i if dimensions i null Expression dimension convert dimensions i if this resolve Bindings record Nodes dimension dimensions i array Creation dimensions add dimension Type type convert Type expression type if this resolve Bindings record Nodes type expression type Array Type array Type null if type is Array Type array Type Array Type type else array Type this ast new Array Type type dimensions Length if this resolve Bindings complete Record array Type expression int start type get Start Position int end type get Start Position type get Length int previous Search Start end Array Type component Type Array Type type get Parent for int i 0 i dimensions Length i previous Search Start retrieve Right Bracket Position previous Search Start 1 this compilation Unit Source length component Type set Source Range start previous Search Start start 1 component Type Array Type component Type get Parent array Creation set Type array Type if this resolve Bindings record Nodes array Type expression if expression initializer null array Creation set Initializer convert expression initializer return array Creation  ArrayCreation ArrayAllocationExpression ArrayCreation arrayCreation newArrayCreation resolveBindings recordNodes arrayCreation arrayCreation setSourceRange sourceStart sourceEnd sourceStart dimensionsLength dimensionsLength resolveBindings recordNodes arrayCreation convertType resolveBindings recordNodes ArrayType arrayType isArrayType arrayType ArrayType arrayType newArrayType dimensionsLength resolveBindings completeRecord arrayType getStartPosition getStartPosition getLength previousSearchStart ArrayType componentType ArrayType getParent dimensionsLength previousSearchStart retrieveRightBracketPosition previousSearchStart compilationUnitSource componentType setSourceRange previousSearchStart componentType ArrayType componentType getParent arrayCreation setType arrayType resolveBindings recordNodes arrayType arrayCreation setInitializer arrayCreation
public Single Variable Declaration convert org eclipse jdt internal compiler ast Argument argument Single Variable Declaration variable Decl this ast new Single Variable Declaration variable Decl set Modifiers argument modifiers Simple Name name this ast new Simple Name new String argument name int start argument source Start int name End argument source End name set Source Range start name End start 1 variable Decl set Name name final int extra Dimensions retrieve Extra Dimension name End 1 argument type source End variable Decl set Extra Dimensions extra Dimensions Type type convert Type argument type int type End type get Start Position type get Length 1 int right End Math max type End argument declaration Source End There is extra work to do to set the proper type positions See PR http bugs eclipse org bugs show bug cgi id 23284 set Type For Single Variable Declaration variable Decl type extra Dimensions variable Decl set Source Range argument declaration Source Start right End argument declaration Source Start 1 if this resolve Bindings record Nodes name argument record Nodes variable Decl argument variable Decl resolve Binding return variable Decl  SingleVariableDeclaration SingleVariableDeclaration variableDecl newSingleVariableDeclaration variableDecl setModifiers SimpleName newSimpleName sourceStart nameEnd sourceEnd setSourceRange nameEnd variableDecl setName extraDimensions retrieveExtraDimension nameEnd sourceEnd variableDecl setExtraDimensions extraDimensions convertType typeEnd getStartPosition getLength rightEnd typeEnd declarationSourceEnd show_bug setTypeForSingleVariableDeclaration variableDecl extraDimensions variableDecl setSourceRange declarationSourceStart rightEnd declarationSourceStart resolveBindings recordNodes recordNodes variableDecl variableDecl resolveBinding variableDecl
public Array Initializer convert org eclipse jdt internal compiler ast Array Initializer expression Array Initializer array Initializer this ast new Array Initializer if this resolve Bindings record Nodes array Initializer expression array Initializer set Source Range expression source Start expression source End expression source Start 1 org eclipse jdt internal compiler ast Expression expressions expression expressions if expressions null int length expressions length for int i 0 i length i Expression expr convert expressions i if this resolve Bindings record Nodes expr expressions i array Initializer expressions add expr return array Initializer  ArrayInitializer ArrayInitializer ArrayInitializer arrayInitializer newArrayInitializer resolveBindings recordNodes arrayInitializer arrayInitializer setSourceRange sourceStart sourceEnd sourceStart resolveBindings recordNodes arrayInitializer arrayInitializer
public Expression convert org eclipse jdt internal compiler ast Qualified Allocation Expression allocation if allocation anonymous Type null Class Instance Creation class Instance Creation this ast new Class Instance Creation class Instance Creation set Name convert allocation type if allocation enclosing Instance null class Instance Creation set Expression convert allocation enclosing Instance int declaration Source Start allocation source Start class Instance Creation set Source Range declaration Source Start allocation anonymous Type body End declaration Source Start 1 org eclipse jdt internal compiler ast Expression arguments allocation arguments if arguments null int length arguments length for int i 0 i length i class Instance Creation arguments add convert arguments i Anonymous Class Declaration anonymous Class Declaration this ast new Anonymous Class Declaration int start retrieve Start Block Position allocation anonymous Type source End allocation anonymous Type body End anonymous Class Declaration set Source Range start allocation anonymous Type body End start 1 class Instance Creation set Anonymous Class Declaration anonymous Class Declaration build Body Declarations allocation anonymous Type anonymous Class Declaration if this resolve Bindings record Nodes class Instance Creation allocation anonymous Type record Nodes anonymous Class Declaration allocation anonymous Type anonymous Class Declaration resolve Binding return class Instance Creation else Class Instance Creation class Instance Creation this ast new Class Instance Creation class Instance Creation set Expression convert allocation enclosing Instance class Instance Creation set Name convert allocation type class Instance Creation set Source Range allocation source Start allocation source End allocation source Start 1 org eclipse jdt internal compiler ast Expression arguments allocation arguments if arguments null int length arguments length for int i 0 i length i Expression argument convert arguments i if this resolve Bindings record Nodes argument arguments i class Instance Creation arguments add argument if this resolve Bindings record Nodes class Instance Creation allocation remove Trailing Comment From Expression Ending WithA Paren class Instance Creation return class Instance Creation  QualifiedAllocationExpression anonymousType ClassInstanceCreation classInstanceCreation newClassInstanceCreation classInstanceCreation setName enclosingInstance classInstanceCreation setExpression enclosingInstance declarationSourceStart sourceStart classInstanceCreation setSourceRange declarationSourceStart anonymousType bodyEnd declarationSourceStart classInstanceCreation AnonymousClassDeclaration anonymousClassDeclaration newAnonymousClassDeclaration retrieveStartBlockPosition anonymousType sourceEnd anonymousType bodyEnd anonymousClassDeclaration setSourceRange anonymousType bodyEnd classInstanceCreation setAnonymousClassDeclaration anonymousClassDeclaration buildBodyDeclarations anonymousType anonymousClassDeclaration resolveBindings recordNodes classInstanceCreation anonymousType recordNodes anonymousClassDeclaration anonymousType anonymousClassDeclaration resolveBinding classInstanceCreation ClassInstanceCreation classInstanceCreation newClassInstanceCreation classInstanceCreation setExpression enclosingInstance classInstanceCreation setName classInstanceCreation setSourceRange sourceStart sourceEnd sourceStart resolveBindings recordNodes classInstanceCreation resolveBindings recordNodes classInstanceCreation removeTrailingCommentFromExpressionEndingWithAParen classInstanceCreation classInstanceCreation
public Assignment convert org eclipse jdt internal compiler ast Assignment expression Assignment assignment this ast new Assignment if this resolve Bindings record Nodes assignment expression Expression lhs convert expression lhs assignment set Left Hand Side lhs assignment set Operator Assignment Operator ASSIGN assignment set Right Hand Side convert expression expression int start lhs get Start Position assignment set Source Range start expression source End start 1 return assignment  newAssignment resolveBindings recordNodes setLeftHandSide setOperator setRightHandSide getStartPosition setSourceRange sourceEnd
public Assignment convert org eclipse jdt internal compiler ast Compound Assignment expression Assignment assignment this ast new Assignment Expression lhs convert expression lhs assignment set Left Hand Side lhs int start lhs get Start Position assignment set Source Range start expression source End start 1 switch expression operator case org eclipse jdt internal compiler ast Operator Ids PLUS assignment set Operator Assignment Operator PLUS ASSIGN break case org eclipse jdt internal compiler ast Operator Ids MINUS assignment set Operator Assignment Operator MINUS ASSIGN break case org eclipse jdt internal compiler ast Operator Ids MULTIPLY assignment set Operator Assignment Operator TIMES ASSIGN break case org eclipse jdt internal compiler ast Operator Ids DIVIDE assignment set Operator Assignment Operator DIVIDE ASSIGN break case org eclipse jdt internal compiler ast Operator Ids AND assignment set Operator Assignment Operator BIT AND ASSIGN break case org eclipse jdt internal compiler ast Operator Ids OR assignment set Operator Assignment Operator BIT OR ASSIGN break case org eclipse jdt internal compiler ast Operator Ids XOR assignment set Operator Assignment Operator BIT XOR ASSIGN break case org eclipse jdt internal compiler ast Operator Ids REMAINDER assignment set Operator Assignment Operator REMAINDER ASSIGN break case org eclipse jdt internal compiler ast Operator Ids LEFT SHIFT assignment set Operator Assignment Operator LEFT SHIFT ASSIGN break case org eclipse jdt internal compiler ast Operator Ids RIGHT SHIFT assignment set Operator Assignment Operator RIGHT SHIFT SIGNED ASSIGN break case org eclipse jdt internal compiler ast Operator Ids UNSIGNED RIGHT SHIFT assignment set Operator Assignment Operator RIGHT SHIFT UNSIGNED ASSIGN break assignment set Right Hand Side convert expression expression return assignment  CompoundAssignment newAssignment setLeftHandSide getStartPosition setSourceRange sourceEnd OperatorIds setOperator PLUS_ASSIGN OperatorIds setOperator MINUS_ASSIGN OperatorIds setOperator TIMES_ASSIGN OperatorIds setOperator DIVIDE_ASSIGN OperatorIds setOperator BIT_AND_ASSIGN OperatorIds setOperator BIT_OR_ASSIGN OperatorIds setOperator BIT_XOR_ASSIGN OperatorIds setOperator REMAINDER_ASSIGN OperatorIds LEFT_SHIFT setOperator LEFT_SHIFT_ASSIGN OperatorIds RIGHT_SHIFT setOperator RIGHT_SHIFT_SIGNED_ASSIGN OperatorIds UNSIGNED_RIGHT_SHIFT setOperator RIGHT_SHIFT_UNSIGNED_ASSIGN setRightHandSide
public Prefix Expression convert org eclipse jdt internal compiler ast Prefix Expression expression Prefix Expression prefix Expression this ast new Prefix Expression if this resolve Bindings record Nodes prefix Expression expression prefix Expression set Source Range expression source Start expression source End expression source Start 1 prefix Expression set Operand convert expression lhs switch expression operator case org eclipse jdt internal compiler ast Operator Ids PLUS prefix Expression set Operator Prefix Expression Operator INCREMENT break case org eclipse jdt internal compiler ast Operator Ids MINUS prefix Expression set Operator Prefix Expression Operator DECREMENT break return prefix Expression  PrefixExpression PrefixExpression PrefixExpression prefixExpression newPrefixExpression resolveBindings recordNodes prefixExpression prefixExpression setSourceRange sourceStart sourceEnd sourceStart prefixExpression setOperand OperatorIds prefixExpression setOperator PrefixExpression OperatorIds prefixExpression setOperator PrefixExpression prefixExpression
public Postfix Expression convert org eclipse jdt internal compiler ast Postfix Expression expression Postfix Expression postfix Expression this ast new Postfix Expression if this resolve Bindings record Nodes postfix Expression expression postfix Expression set Source Range expression source Start expression source End expression source Start 1 postfix Expression set Operand convert expression lhs switch expression operator case org eclipse jdt internal compiler ast Operator Ids PLUS postfix Expression set Operator Postfix Expression Operator INCREMENT break case org eclipse jdt internal compiler ast Operator Ids MINUS postfix Expression set Operator Postfix Expression Operator DECREMENT break return postfix Expression  PostfixExpression PostfixExpression PostfixExpression postfixExpression newPostfixExpression resolveBindings recordNodes postfixExpression postfixExpression setSourceRange sourceStart sourceEnd sourceStart postfixExpression setOperand OperatorIds postfixExpression setOperator PostfixExpression OperatorIds postfixExpression setOperator PostfixExpression postfixExpression
public Cast Expression convert org eclipse jdt internal compiler ast Cast Expression expression Cast Expression cast Expression this ast new Cast Expression cast Expression set Source Range expression source Start expression source End expression source Start 1 org eclipse jdt internal compiler ast Expression type expression type trim White Spaces And Comments type if type instanceof org eclipse jdt internal compiler ast Type Reference cast Expression set Type convert Type org eclipse jdt internal compiler ast Type Reference type else if type instanceof org eclipse jdt internal compiler ast Name Reference cast Expression set Type convert To Type org eclipse jdt internal compiler ast Name Reference type cast Expression set Expression convert expression expression if this resolve Bindings record Nodes cast Expression expression return cast Expression  CastExpression CastExpression CastExpression castExpression newCastExpression castExpression setSourceRange sourceStart sourceEnd sourceStart trimWhiteSpacesAndComments TypeReference castExpression setType convertType TypeReference NameReference castExpression setType convertToType NameReference castExpression setExpression resolveBindings recordNodes castExpression castExpression
public Type convert To Type org eclipse jdt internal compiler ast Name Reference reference Name name convert reference Simple Type type this ast new Simple Type name type set Source Range name get Start Position name get Length if this resolve Bindings this record Nodes type reference return type  convertToType NameReference SimpleType newSimpleType setSourceRange getStartPosition getLength resolveBindings recordNodes
public Expression convert org eclipse jdt internal compiler ast Class Literal Access expression Type Literal type Literal this ast new Type Literal if this resolve Bindings this record Nodes type Literal expression type Literal set Source Range expression source Start expression source End expression source Start 1 type Literal set Type convert Type expression type return type Literal  ClassLiteralAccess TypeLiteral typeLiteral newTypeLiteral resolveBindings recordNodes typeLiteral typeLiteral setSourceRange sourceStart sourceEnd sourceStart typeLiteral setType convertType typeLiteral
public Boolean Literal convert org eclipse jdt internal compiler ast False Literal expression Boolean Literal literal this ast new Boolean Literal false if this resolve Bindings this record Nodes literal expression literal set Source Range expression source Start expression source End expression source Start 1 return literal  BooleanLiteral FalseLiteral BooleanLiteral newBooleanLiteral resolveBindings recordNodes setSourceRange sourceStart sourceEnd sourceStart
public Boolean Literal convert org eclipse jdt internal compiler ast True Literal expression Boolean Literal literal this ast new Boolean Literal true if this resolve Bindings this record Nodes literal expression literal set Source Range expression source Start expression source End expression source Start 1 return literal  BooleanLiteral TrueLiteral BooleanLiteral newBooleanLiteral resolveBindings recordNodes setSourceRange sourceStart sourceEnd sourceStart
public Infix Expression convert String Literal Concatenation expression expression compute Constant Infix Expression infix Expression this ast new Infix Expression infix Expression set Operator Infix Expression Operator PLUS org eclipse jdt internal compiler ast String Literal string Literals expression literals infix Expression set Left Operand convert string Literals 0 infix Expression set Right Operand convert string Literals 1 for int i 2 i expression counter i infix Expression extended Operands add convert string Literals i if this resolve Bindings this record Nodes infix Expression expression infix Expression set Source Range expression source Start expression source End expression source Start 1 return infix Expression  InfixExpression StringLiteralConcatenation computeConstant InfixExpression infixExpression newInfixExpression infixExpression setOperator InfixExpression StringLiteral stringLiterals infixExpression setLeftOperand stringLiterals infixExpression setRightOperand stringLiterals infixExpression extendedOperands stringLiterals resolveBindings recordNodes infixExpression infixExpression setSourceRange sourceStart sourceEnd sourceStart infixExpression
public org eclipse jdt core dom Null Literal convert org eclipse jdt internal compiler ast Null Literal expression org eclipse jdt core dom Null Literal literal this ast new Null Literal if this resolve Bindings this record Nodes literal expression literal set Source Range expression source Start expression source End expression source Start 1 return literal  NullLiteral NullLiteral NullLiteral newNullLiteral resolveBindings recordNodes setSourceRange sourceStart sourceEnd sourceStart
public Character Literal convert org eclipse jdt internal compiler ast Char Literal expression int length expression source End expression source Start 1 int source Start expression source Start char tokens new char length System arraycopy this compilation Unit Source source Start tokens 0 length Character Literal literal this ast new Character Literal if this resolve Bindings this record Nodes literal expression literal set Escaped Value new String tokens literal set Source Range source Start length remove Leading And Trailing Comments From Literal literal return literal  CharacterLiteral CharLiteral sourceEnd sourceStart sourceStart sourceStart compilationUnitSource sourceStart CharacterLiteral newCharacterLiteral resolveBindings recordNodes setEscapedValue setSourceRange sourceStart removeLeadingAndTrailingCommentsFromLiteral
public Number Literal convert org eclipse jdt internal compiler ast Double Literal expression int length expression source End expression source Start 1 int source Start expression source Start char tokens new char length System arraycopy this compilation Unit Source source Start tokens 0 length Number Literal literal this ast new Number Literal new String tokens if this resolve Bindings this record Nodes literal expression literal set Source Range source Start length remove Leading And Trailing Comments From Literal literal return literal  NumberLiteral DoubleLiteral sourceEnd sourceStart sourceStart sourceStart compilationUnitSource sourceStart NumberLiteral newNumberLiteral resolveBindings recordNodes setSourceRange sourceStart removeLeadingAndTrailingCommentsFromLiteral
public Number Literal convert org eclipse jdt internal compiler ast Float Literal expression int length expression source End expression source Start 1 int source Start expression source Start char tokens new char length System arraycopy this compilation Unit Source source Start tokens 0 length Number Literal literal this ast new Number Literal new String tokens if this resolve Bindings this record Nodes literal expression literal set Source Range source Start length remove Leading And Trailing Comments From Literal literal return literal  NumberLiteral FloatLiteral sourceEnd sourceStart sourceStart sourceStart compilationUnitSource sourceStart NumberLiteral newNumberLiteral resolveBindings recordNodes setSourceRange sourceStart removeLeadingAndTrailingCommentsFromLiteral
public Number Literal convert org eclipse jdt internal compiler ast Int Literal expression int length expression source End expression source Start 1 int source Start expression source Start char tokens new char length System arraycopy this compilation Unit Source source Start tokens 0 length Number Literal literal this ast new Number Literal new String tokens if this resolve Bindings this record Nodes literal expression literal set Source Range source Start length remove Leading And Trailing Comments From Literal literal return literal  NumberLiteral IntLiteral sourceEnd sourceStart sourceStart sourceStart compilationUnitSource sourceStart NumberLiteral newNumberLiteral resolveBindings recordNodes setSourceRange sourceStart removeLeadingAndTrailingCommentsFromLiteral
public Number Literal convert org eclipse jdt internal compiler ast Int Literal Min Value expression int length expression source End expression source Start 1 int source Start expression source Start char tokens new char length System arraycopy this compilation Unit Source source Start tokens 0 length Number Literal literal this ast new Number Literal new String tokens if this resolve Bindings this record Nodes literal expression literal set Source Range source Start length remove Leading And Trailing Comments From Literal literal return literal  NumberLiteral IntLiteralMinValue sourceEnd sourceStart sourceStart sourceStart compilationUnitSource sourceStart NumberLiteral newNumberLiteral resolveBindings recordNodes setSourceRange sourceStart removeLeadingAndTrailingCommentsFromLiteral
public Number Literal convert org eclipse jdt internal compiler ast Long Literal expression int length expression source End expression source Start 1 int source Start expression source Start char tokens new char length System arraycopy this compilation Unit Source source Start tokens 0 length Number Literal literal this ast new Number Literal new String tokens if this resolve Bindings this record Nodes literal expression literal set Source Range source Start length remove Leading And Trailing Comments From Literal literal return literal  NumberLiteral LongLiteral sourceEnd sourceStart sourceStart sourceStart compilationUnitSource sourceStart NumberLiteral newNumberLiteral resolveBindings recordNodes setSourceRange sourceStart removeLeadingAndTrailingCommentsFromLiteral
public Number Literal convert org eclipse jdt internal compiler ast Long Literal Min Value expression int length expression source End expression source Start 1 int source Start expression source Start char tokens new char length System arraycopy this compilation Unit Source source Start tokens 0 length Number Literal literal this ast new Number Literal new String tokens if this resolve Bindings this record Nodes literal expression literal set Source Range source Start length remove Leading And Trailing Comments From Literal literal return literal  NumberLiteral LongLiteralMinValue sourceEnd sourceStart sourceStart sourceStart compilationUnitSource sourceStart NumberLiteral newNumberLiteral resolveBindings recordNodes setSourceRange sourceStart removeLeadingAndTrailingCommentsFromLiteral
public String Literal convert org eclipse jdt internal compiler ast String Literal expression int length expression source End expression source Start 1 int source Start expression source Start char tokens new char length System arraycopy this compilation Unit Source source Start tokens 0 length String Literal literal this ast new String Literal if this resolve Bindings this record Nodes literal expression literal set Escaped Value new String tokens literal set Source Range expression source Start expression source End expression source Start 1 return literal  StringLiteral StringLiteral sourceEnd sourceStart sourceStart sourceStart compilationUnitSource sourceStart StringLiteral newStringLiteral resolveBindings recordNodes setEscapedValue setSourceRange sourceStart sourceEnd sourceStart
public String Literal convert org eclipse jdt internal compiler ast Extended String Literal expression expression compute Constant String Literal literal this ast new String Literal if this resolve Bindings this record Nodes literal expression literal set Literal Value expression constant string Value literal set Source Range expression source Start expression source End expression source Start 1 return literal  StringLiteral ExtendedStringLiteral computeConstant StringLiteral newStringLiteral resolveBindings recordNodes setLiteralValue stringValue setSourceRange sourceStart sourceEnd sourceStart
public Expression convert org eclipse jdt internal compiler ast Binary Expression expression Infix Expression infix Expression this ast new Infix Expression if this resolve Bindings this record Nodes infix Expression expression int expression OperatorID expression bits org eclipse jdt internal compiler ast AST Node OperatorMASK org eclipse jdt internal compiler ast AST Node OperatorSHIFT switch expression OperatorID case org eclipse jdt internal compiler ast Operator Ids EQUAL EQUAL infix Expression set Operator Infix Expression Operator EQUALS break case org eclipse jdt internal compiler ast Operator Ids LESS EQUAL infix Expression set Operator Infix Expression Operator LESS EQUALS break case org eclipse jdt internal compiler ast Operator Ids GREATER EQUAL infix Expression set Operator Infix Expression Operator GREATER EQUALS break case org eclipse jdt internal compiler ast Operator Ids NOT EQUAL infix Expression set Operator Infix Expression Operator NOT EQUALS break case org eclipse jdt internal compiler ast Operator Ids LEFT SHIFT infix Expression set Operator Infix Expression Operator LEFT SHIFT break case org eclipse jdt internal compiler ast Operator Ids RIGHT SHIFT infix Expression set Operator Infix Expression Operator RIGHT SHIFT SIGNED break case org eclipse jdt internal compiler ast Operator Ids UNSIGNED RIGHT SHIFT infix Expression set Operator Infix Expression Operator RIGHT SHIFT UNSIGNED break case org eclipse jdt internal compiler ast Operator Ids OR OR infix Expression set Operator Infix Expression Operator CONDITIONAL OR break case org eclipse jdt internal compiler ast Operator Ids AND AND infix Expression set Operator Infix Expression Operator CONDITIONAL AND break case org eclipse jdt internal compiler ast Operator Ids PLUS infix Expression set Operator Infix Expression Operator PLUS break case org eclipse jdt internal compiler ast Operator Ids MINUS infix Expression set Operator Infix Expression Operator MINUS break case org eclipse jdt internal compiler ast Operator Ids REMAINDER infix Expression set Operator Infix Expression Operator REMAINDER break case org eclipse jdt internal compiler ast Operator Ids XOR infix Expression set Operator Infix Expression Operator XOR break case org eclipse jdt internal compiler ast Operator Ids AND infix Expression set Operator Infix Expression Operator AND break case org eclipse jdt internal compiler ast Operator Ids MULTIPLY infix Expression set Operator Infix Expression Operator TIMES break case org eclipse jdt internal compiler ast Operator Ids OR infix Expression set Operator Infix Expression Operator OR break case org eclipse jdt internal compiler ast Operator Ids DIVIDE infix Expression set Operator Infix Expression Operator DIVIDE break case org eclipse jdt internal compiler ast Operator Ids GREATER infix Expression set Operator Infix Expression Operator GREATER break case org eclipse jdt internal compiler ast Operator Ids LESS infix Expression set Operator Infix Expression Operator LESS if expression left instanceof org eclipse jdt internal compiler ast Binary Expression expression left bits org eclipse jdt internal compiler ast AST Node ParenthesizedMASK 0 create an extended string literal equivalent use the extended operands list infix Expression extended Operands add convert expression right org eclipse jdt internal compiler ast Expression left Operand expression left org eclipse jdt internal compiler ast Expression right Operand null do right Operand org eclipse jdt internal compiler ast Binary Expression left Operand right if left Operand bits org eclipse jdt internal compiler ast AST Node OperatorMASK org eclipse jdt internal compiler ast AST Node OperatorSHIFT expression OperatorID left Operand bits org eclipse jdt internal compiler ast AST Node ParenthesizedMASK 0 right Operand instanceof org eclipse jdt internal compiler ast Binary Expression right Operand bits org eclipse jdt internal compiler ast AST Node OperatorMASK org eclipse jdt internal compiler ast AST Node OperatorSHIFT expression OperatorID right Operand bits org eclipse jdt internal compiler ast AST Node ParenthesizedMASK 0 List extended Operands infix Expression extended Operands Infix Expression temp this ast new Infix Expression if this resolve Bindings this record Nodes temp expression temp set Operator get Operator For expression OperatorID Expression left Side convert left Operand temp set Left Operand left Side temp set Source Range left Side get Start Position left Side get Length int size extended Operands size for int i 0 i size 1 i Expression expr temp temp this ast new Infix Expression if this resolve Bindings this record Nodes temp expression temp set Left Operand expr temp set Operator get Operator For expression OperatorID temp set Source Range expr get Start Position expr get Length infix Expression temp for int i 0 i size i Expression extended Operand Expression extended Operands remove size 1 i temp set Right Operand extended Operand int start Position temp get Left Operand get Start Position temp set Source Range start Position extended Operand get Start Position extended Operand get Length start Position if temp get Left Operand get Node Type AST Node INFIX EXPRESSION temp Infix Expression temp get Left Operand int start Position infix Expression get Left Operand get Start Position infix Expression set Source Range start Position expression source End start Position 1 if this resolve Bindings this record Nodes infix Expression expression return infix Expression infix Expression extended Operands add 0 convert right Operand left Operand org eclipse jdt internal compiler ast Binary Expression left Operand left while left Operand instanceof org eclipse jdt internal compiler ast Binary Expression left Operand bits org eclipse jdt internal compiler ast AST Node ParenthesizedMASK 0 Expression left Expression convert left Operand infix Expression set Left Operand left Expression infix Expression set Right Operand Expression infix Expression extended Operands remove 0 int start Position left Expression get Start Position infix Expression set Source Range start Position expression source End start Position 1 return infix Expression else if expression left instanceof String Literal Concatenation expression left bits org eclipse jdt internal compiler ast AST Node ParenthesizedMASK 0 String Literal Concatenation literal String Literal Concatenation expression left final org eclipse jdt internal compiler ast String Literal string Literals literal literals infix Expression set Left Operand convert string Literals 0 infix Expression set Right Operand convert string Literals 1 for int i 2 i literal counter i infix Expression extended Operands add convert string Literals i infix Expression extended Operands add convert expression right int start Position literal source Start infix Expression set Source Range start Position expression source End start Position 1 return infix Expression Expression left Expression convert expression left infix Expression set Left Operand left Expression infix Expression set Right Operand convert expression right int start Position left Expression get Start Position infix Expression set Source Range start Position expression source End start Position 1 return infix Expression  BinaryExpression InfixExpression infixExpression newInfixExpression resolveBindings recordNodes infixExpression expressionOperatorID ASTNode ASTNode expressionOperatorID OperatorIds EQUAL_EQUAL infixExpression setOperator InfixExpression OperatorIds LESS_EQUAL infixExpression setOperator InfixExpression LESS_EQUALS OperatorIds GREATER_EQUAL infixExpression setOperator InfixExpression GREATER_EQUALS OperatorIds NOT_EQUAL infixExpression setOperator InfixExpression NOT_EQUALS OperatorIds LEFT_SHIFT infixExpression setOperator InfixExpression LEFT_SHIFT OperatorIds RIGHT_SHIFT infixExpression setOperator InfixExpression RIGHT_SHIFT_SIGNED OperatorIds UNSIGNED_RIGHT_SHIFT infixExpression setOperator InfixExpression RIGHT_SHIFT_UNSIGNED OperatorIds OR_OR infixExpression setOperator InfixExpression CONDITIONAL_OR OperatorIds AND_AND infixExpression setOperator InfixExpression CONDITIONAL_AND OperatorIds infixExpression setOperator InfixExpression OperatorIds infixExpression setOperator InfixExpression OperatorIds infixExpression setOperator InfixExpression OperatorIds infixExpression setOperator InfixExpression OperatorIds infixExpression setOperator InfixExpression OperatorIds infixExpression setOperator InfixExpression OperatorIds infixExpression setOperator InfixExpression OperatorIds infixExpression setOperator InfixExpression OperatorIds infixExpression setOperator InfixExpression OperatorIds infixExpression setOperator InfixExpression BinaryExpression ASTNode infixExpression extendedOperands leftOperand rightOperand rightOperand BinaryExpression leftOperand leftOperand ASTNode ASTNode expressionOperatorID leftOperand ASTNode rightOperand BinaryExpression rightOperand ASTNode ASTNode expressionOperatorID rightOperand ASTNode extendedOperands infixExpression extendedOperands InfixExpression newInfixExpression resolveBindings recordNodes setOperator getOperatorFor expressionOperatorID leftSide leftOperand setLeftOperand leftSide setSourceRange leftSide getStartPosition leftSide getLength extendedOperands newInfixExpression resolveBindings recordNodes setLeftOperand setOperator getOperatorFor expressionOperatorID setSourceRange getStartPosition getLength infixExpression extendedOperand extendedOperands setRightOperand extendedOperand startPosition getLeftOperand getStartPosition setSourceRange startPosition extendedOperand getStartPosition extendedOperand getLength startPosition getLeftOperand getNodeType ASTNode INFIX_EXPRESSION InfixExpression getLeftOperand startPosition infixExpression getLeftOperand getStartPosition infixExpression setSourceRange startPosition sourceEnd startPosition resolveBindings recordNodes infixExpression infixExpression infixExpression extendedOperands rightOperand leftOperand BinaryExpression leftOperand leftOperand BinaryExpression leftOperand ASTNode leftExpression leftOperand infixExpression setLeftOperand leftExpression infixExpression setRightOperand infixExpression extendedOperands startPosition leftExpression getStartPosition infixExpression setSourceRange startPosition sourceEnd startPosition infixExpression StringLiteralConcatenation ASTNode StringLiteralConcatenation StringLiteralConcatenation StringLiteral stringLiterals infixExpression setLeftOperand stringLiterals infixExpression setRightOperand stringLiterals infixExpression extendedOperands stringLiterals infixExpression extendedOperands startPosition sourceStart infixExpression setSourceRange startPosition sourceEnd startPosition infixExpression leftExpression infixExpression setLeftOperand leftExpression infixExpression setRightOperand startPosition leftExpression getStartPosition infixExpression setSourceRange startPosition sourceEnd startPosition infixExpression
public Prefix Expression convert org eclipse jdt internal compiler ast Unary Expression expression Prefix Expression prefix Expression this ast new Prefix Expression if this resolve Bindings this record Nodes prefix Expression expression prefix Expression set Source Range expression source Start expression source End expression source Start 1 prefix Expression set Operand convert expression expression switch expression bits org eclipse jdt internal compiler ast AST Node OperatorMASK org eclipse jdt internal compiler ast AST Node OperatorSHIFT case org eclipse jdt internal compiler ast Operator Ids PLUS prefix Expression set Operator Prefix Expression Operator PLUS break case org eclipse jdt internal compiler ast Operator Ids MINUS prefix Expression set Operator Prefix Expression Operator MINUS break case org eclipse jdt internal compiler ast Operator Ids NOT prefix Expression set Operator Prefix Expression Operator NOT break case org eclipse jdt internal compiler ast Operator Ids TWIDDLE prefix Expression set Operator Prefix Expression Operator COMPLEMENT return prefix Expression  PrefixExpression UnaryExpression PrefixExpression prefixExpression newPrefixExpression resolveBindings recordNodes prefixExpression prefixExpression setSourceRange sourceStart sourceEnd sourceStart prefixExpression setOperand ASTNode ASTNode OperatorIds prefixExpression setOperator PrefixExpression OperatorIds prefixExpression setOperator PrefixExpression OperatorIds prefixExpression setOperator PrefixExpression OperatorIds prefixExpression setOperator PrefixExpression prefixExpression
public Instanceof Expression convert org eclipse jdt internal compiler ast Instance Of Expression expression Instanceof Expression instance Of Expression this ast new Instanceof Expression if this resolve Bindings record Nodes instance Of Expression expression Expression left Expression convert expression expression instance Of Expression set Left Operand left Expression instance Of Expression set Right Operand convert Type expression type int start Position left Expression get Start Position instance Of Expression set Source Range start Position expression source End start Position 1 return instance Of Expression  InstanceofExpression InstanceOfExpression InstanceofExpression instanceOfExpression newInstanceofExpression resolveBindings recordNodes instanceOfExpression leftExpression instanceOfExpression setLeftOperand leftExpression instanceOfExpression setRightOperand convertType startPosition leftExpression getStartPosition instanceOfExpression setSourceRange startPosition sourceEnd startPosition instanceOfExpression
public Conditional Expression convert org eclipse jdt internal compiler ast Conditional Expression expression Conditional Expression conditional Expression this ast new Conditional Expression if this resolve Bindings record Nodes conditional Expression expression conditional Expression set Source Range expression source Start expression source End expression source Start 1 conditional Expression set Expression convert expression condition conditional Expression set Then Expression convert expression value If True conditional Expression set Else Expression convert expression value If False return conditional Expression  ConditionalExpression ConditionalExpression ConditionalExpression conditionalExpression newConditionalExpression resolveBindings recordNodes conditionalExpression conditionalExpression setSourceRange sourceStart sourceEnd sourceStart conditionalExpression setExpression conditionalExpression setThenExpression valueIfTrue conditionalExpression setElseExpression valueIfFalse conditionalExpression
public Expression convert Message Send expression will return a Method Invocation or a Super Method Invocation or Expression expr int source Start expression source Start if expression is Super Access returns a Super Method Invocation Super Method Invocation super Method Invocation this ast new Super Method Invocation if this resolve Bindings record Nodes super Method Invocation expression Simple Name name this ast new Simple Name new String expression selector int name Source Start int expression name Source Position 32 int name Source Length int expression name Source Position 0xFFFFFFFF name Source Start 1 name set Source Range name Source Start name Source Length if this resolve Bindings record Nodes name expression super Method Invocation set Name name expression receiver is either a Qualified Super Reference or a Super Reference so the casting cannot fail if expression receiver instanceof org eclipse jdt internal compiler ast Qualified Super Reference Name qualifier convert org eclipse jdt internal compiler ast Qualified Super Reference expression receiver super Method Invocation set Qualifier qualifier if this resolve Bindings record Nodes qualifier expression receiver if qualifier null source Start qualifier get Start Position org eclipse jdt internal compiler ast Expression arguments expression arguments if arguments null int arguments Length arguments length for int i 0 i arguments Length i Expression expri convert arguments i if this resolve Bindings record Nodes expri arguments i super Method Invocation arguments add expri expr super Method Invocation else returns a Method Invocation Method Invocation method Invocation this ast new Method Invocation if this resolve Bindings record Nodes method Invocation expression Simple Name name this ast new Simple Name new String expression selector int name Source Start int expression name Source Position 32 int name Source Length int expression name Source Position 0xFFFFFFFF name Source Start 1 name set Source Range name Source Start name Source Length method Invocation set Name name if this resolve Bindings record Nodes name expression org eclipse jdt internal compiler ast Expression arguments expression arguments if arguments null int arguments Length arguments length for int i 0 i arguments Length i Expression expri convert arguments i if this resolve Bindings record Nodes expri arguments i method Invocation arguments add expri Expression qualifier null org eclipse jdt internal compiler ast Expression receiver expression receiver if receiver instanceof Message Send if receiver bits org eclipse jdt internal compiler ast AST Node ParenthesizedMASK 0 qualifier convert To Parenthesized Expression receiver else qualifier convert Message Send receiver else qualifier convert receiver if qualifier instanceof Name this resolve Bindings record Nodes qualifier receiver method Invocation set Expression qualifier if qualifier null source Start qualifier get Start Position expr method Invocation expr set Source Range source Start expression source End source Start 1 remove Trailing Comment From Expression Ending WithA Paren expr return expr  MessageSend MethodInvocation SuperMethodInvocation sourceStart sourceStart isSuperAccess SuperMethodInvocation SuperMethodInvocation superMethodInvocation newSuperMethodInvocation resolveBindings recordNodes superMethodInvocation SimpleName newSimpleName nameSourceStart nameSourcePosition nameSourceLength nameSourcePosition nameSourceStart setSourceRange nameSourceStart nameSourceLength resolveBindings recordNodes superMethodInvocation setName QualifiedSuperReference SuperReference QualifiedSuperReference QualifiedSuperReference superMethodInvocation setQualifier resolveBindings recordNodes sourceStart getStartPosition argumentsLength argumentsLength resolveBindings recordNodes superMethodInvocation superMethodInvocation MethodInvocation MethodInvocation methodInvocation newMethodInvocation resolveBindings recordNodes methodInvocation SimpleName newSimpleName nameSourceStart nameSourcePosition nameSourceLength nameSourcePosition nameSourceStart setSourceRange nameSourceStart nameSourceLength methodInvocation setName resolveBindings recordNodes argumentsLength argumentsLength resolveBindings recordNodes methodInvocation MessageSend ASTNode convertToParenthesizedExpression MessageSend resolveBindings recordNodes methodInvocation setExpression sourceStart getStartPosition methodInvocation setSourceRange sourceStart sourceEnd sourceStart removeTrailingCommentFromExpressionEndingWithAParen
public Expression convert org eclipse jdt internal compiler ast AND AND Expression expression Infix Expression infix Expression this ast new Infix Expression if this resolve Bindings record Nodes infix Expression expression Expression left Expression convert expression left infix Expression set Left Operand left Expression infix Expression set Right Operand convert expression right infix Expression set Operator Infix Expression Operator CONDITIONAL AND int start Position left Expression get Start Position infix Expression set Source Range start Position expression source End start Position 1 return infix Expression  AND_AND_Expression InfixExpression infixExpression newInfixExpression resolveBindings recordNodes infixExpression leftExpression infixExpression setLeftOperand leftExpression infixExpression setRightOperand infixExpression setOperator InfixExpression CONDITIONAL_AND startPosition leftExpression getStartPosition infixExpression setSourceRange startPosition sourceEnd startPosition infixExpression
public Expression convert org eclipse jdt internal compiler ast Equal Expression expression Infix Expression infix Expression this ast new Infix Expression if this resolve Bindings record Nodes infix Expression expression Expression left Expression convert expression left infix Expression set Left Operand left Expression infix Expression set Right Operand convert expression right int start Position left Expression get Start Position infix Expression set Source Range start Position expression source End start Position 1 switch expression bits org eclipse jdt internal compiler ast AST Node OperatorMASK org eclipse jdt internal compiler ast AST Node OperatorSHIFT case org eclipse jdt internal compiler ast Operator Ids EQUAL EQUAL infix Expression set Operator Infix Expression Operator EQUALS break case org eclipse jdt internal compiler ast Operator Ids NOT EQUAL infix Expression set Operator Infix Expression Operator NOT EQUALS return infix Expression  EqualExpression InfixExpression infixExpression newInfixExpression resolveBindings recordNodes infixExpression leftExpression infixExpression setLeftOperand leftExpression infixExpression setRightOperand startPosition leftExpression getStartPosition infixExpression setSourceRange startPosition sourceEnd startPosition ASTNode ASTNode OperatorIds EQUAL_EQUAL infixExpression setOperator InfixExpression OperatorIds NOT_EQUAL infixExpression setOperator InfixExpression NOT_EQUALS infixExpression
public Expression convert org eclipse jdt internal compiler ast OR OR Expression expression Infix Expression infix Expression this ast new Infix Expression if this resolve Bindings record Nodes infix Expression expression Expression left Expression convert expression left infix Expression set Left Operand left Expression infix Expression set Right Operand convert expression right infix Expression set Operator Infix Expression Operator CONDITIONAL OR int source Start left Expression get Start Position infix Expression set Source Range source Start expression source End source Start 1 return infix Expression  OR_OR_Expression InfixExpression infixExpression newInfixExpression resolveBindings recordNodes infixExpression leftExpression infixExpression setLeftOperand leftExpression infixExpression setRightOperand infixExpression setOperator InfixExpression CONDITIONAL_OR sourceStart leftExpression getStartPosition infixExpression setSourceRange sourceStart sourceEnd sourceStart infixExpression
public Statement convert org eclipse jdt internal compiler ast Statement statement if statement instanceof org eclipse jdt internal compiler ast Local Declaration return convert To Variable Declaration Statement org eclipse jdt internal compiler ast Local Declaration statement if statement instanceof org eclipse jdt internal compiler ast Assert Statement return convert org eclipse jdt internal compiler ast Assert Statement statement if statement instanceof org eclipse jdt internal compiler ast Block return convert org eclipse jdt internal compiler ast Block statement if statement instanceof org eclipse jdt internal compiler ast Break Statement return convert org eclipse jdt internal compiler ast Break Statement statement if statement instanceof org eclipse jdt internal compiler ast Continue Statement return convert org eclipse jdt internal compiler ast Continue Statement statement if statement instanceof org eclipse jdt internal compiler ast Case Statement return convert org eclipse jdt internal compiler ast Case Statement statement if statement instanceof org eclipse jdt internal compiler ast Do Statement return convert org eclipse jdt internal compiler ast Do Statement statement if statement instanceof org eclipse jdt internal compiler ast Empty Statement return convert org eclipse jdt internal compiler ast Empty Statement statement if statement instanceof org eclipse jdt internal compiler ast Explicit Constructor Call return convert org eclipse jdt internal compiler ast Explicit Constructor Call statement if statement instanceof org eclipse jdt internal compiler ast For Statement return convert org eclipse jdt internal compiler ast For Statement statement if statement instanceof org eclipse jdt internal compiler ast If Statement return convert org eclipse jdt internal compiler ast If Statement statement if statement instanceof org eclipse jdt internal compiler ast Labeled Statement return convert org eclipse jdt internal compiler ast Labeled Statement statement if statement instanceof org eclipse jdt internal compiler ast Return Statement return convert org eclipse jdt internal compiler ast Return Statement statement if statement instanceof org eclipse jdt internal compiler ast Switch Statement return convert org eclipse jdt internal compiler ast Switch Statement statement if statement instanceof org eclipse jdt internal compiler ast Synchronized Statement return convert org eclipse jdt internal compiler ast Synchronized Statement statement if statement instanceof org eclipse jdt internal compiler ast Throw Statement return convert org eclipse jdt internal compiler ast Throw Statement statement if statement instanceof org eclipse jdt internal compiler ast Try Statement return convert org eclipse jdt internal compiler ast Try Statement statement if statement instanceof org eclipse jdt internal compiler ast Type Declaration statement bits org eclipse jdt internal compiler ast AST Node Is Local TypeMASK 0 Type Declaration Statement type Declaration Statement this ast new Type Declaration Statement convert org eclipse jdt internal compiler ast Type Declaration statement Type Declaration type Decl type Declaration Statement get Type Declaration type Declaration Statement set Source Range type Decl get Start Position type Decl get Length return type Declaration Statement if statement instanceof org eclipse jdt internal compiler ast Type Declaration Type Declaration Statement type Declaration Statement this ast new Type Declaration Statement convert org eclipse jdt internal compiler ast Type Declaration statement Type Declaration type Decl type Declaration Statement get Type Declaration type Declaration Statement set Source Range type Decl get Start Position type Decl get Length return type Declaration Statement if statement instanceof org eclipse jdt internal compiler ast While Statement return convert org eclipse jdt internal compiler ast While Statement statement if statement instanceof org eclipse jdt internal compiler ast Expression Expression expr convert org eclipse jdt internal compiler ast Expression statement Statement stmt this ast new Expression Statement expr stmt set Source Range expr get Start Position expr get Length retrieve Semi Colon Position stmt return stmt throw new Illegal Argument Exception Not yet implemented convert statement get Class NON NLS 1 NON NLS 2  LocalDeclaration convertToVariableDeclarationStatement LocalDeclaration AssertStatement AssertStatement BreakStatement BreakStatement ContinueStatement ContinueStatement CaseStatement CaseStatement DoStatement DoStatement EmptyStatement EmptyStatement ExplicitConstructorCall ExplicitConstructorCall ForStatement ForStatement IfStatement IfStatement LabeledStatement LabeledStatement ReturnStatement ReturnStatement SwitchStatement SwitchStatement SynchronizedStatement SynchronizedStatement ThrowStatement ThrowStatement TryStatement TryStatement TypeDeclaration ASTNode IsLocalTypeMASK TypeDeclarationStatement typeDeclarationStatement newTypeDeclarationStatement TypeDeclaration TypeDeclaration typeDecl typeDeclarationStatement getTypeDeclaration typeDeclarationStatement setSourceRange typeDecl getStartPosition typeDecl getLength typeDeclarationStatement TypeDeclaration TypeDeclarationStatement typeDeclarationStatement newTypeDeclarationStatement TypeDeclaration TypeDeclaration typeDecl typeDeclarationStatement getTypeDeclaration typeDeclarationStatement setSourceRange typeDecl getStartPosition typeDecl getLength typeDeclarationStatement WhileStatement WhileStatement newExpressionStatement setSourceRange getStartPosition getLength retrieveSemiColonPosition IllegalArgumentException getClass
public Assert Statement convert org eclipse jdt internal compiler ast Assert Statement statement Assert Statement assert Statement this ast new Assert Statement int end statement assert Expression source End 1 assert Statement set Expression convert statement assert Expression org eclipse jdt internal compiler ast Expression exception Argument statement exception Argument if exception Argument null assert Statement set Message convert exception Argument end exception Argument source End 1 int start statement source Start int source End retrieve Ending Semi Colon Position end this compilation Unit Source length assert Statement set Source Range start source End start 1 return assert Statement  AssertStatement AssertStatement AssertStatement assertStatement newAssertStatement assertExpression sourceEnd assertStatement setExpression assertExpression exceptionArgument exceptionArgument exceptionArgument assertStatement setMessage exceptionArgument exceptionArgument sourceEnd sourceStart sourceEnd retrieveEndingSemiColonPosition compilationUnitSource assertStatement setSourceRange sourceEnd assertStatement
public Block convert org eclipse jdt internal compiler ast Block statement Block block this ast new Block if statement source End 0 block set Source Range statement source Start statement source End statement source Start 1 org eclipse jdt internal compiler ast Statement statements statement statements if statements null int statements Length statements length for int i 0 i statements Length i if statements i instanceof org eclipse jdt internal compiler ast Local Declaration check And Add Multiple Local Declaration statements i block statements else block statements add convert statements i return block  newBlock sourceEnd setSourceRange sourceStart sourceEnd sourceStart statementsLength statementsLength LocalDeclaration checkAndAddMultipleLocalDeclaration
public Break Statement convert org eclipse jdt internal compiler ast Break Statement statement Break Statement break Statement this ast new Break Statement break Statement set Source Range statement source Start statement source End statement source Start 1 if statement label null Simple Name name this ast new Simple Name new String statement label retrieve Identifier And Set Positions statement source Start statement source End name break Statement set Label name retrieve Semi Colon Position break Statement return break Statement  BreakStatement BreakStatement BreakStatement breakStatement newBreakStatement breakStatement setSourceRange sourceStart sourceEnd sourceStart SimpleName newSimpleName retrieveIdentifierAndSetPositions sourceStart sourceEnd breakStatement setLabel retrieveSemiColonPosition breakStatement breakStatement
public Continue Statement convert org eclipse jdt internal compiler ast Continue Statement statement Continue Statement continue Statement this ast new Continue Statement continue Statement set Source Range statement source Start statement source End statement source Start 1 if statement label null Simple Name name this ast new Simple Name new String statement label retrieve Identifier And Set Positions statement source Start statement source End name continue Statement set Label name retrieve Semi Colon Position continue Statement return continue Statement  ContinueStatement ContinueStatement ContinueStatement continueStatement newContinueStatement continueStatement setSourceRange sourceStart sourceEnd sourceStart SimpleName newSimpleName retrieveIdentifierAndSetPositions sourceStart sourceEnd continueStatement setLabel retrieveSemiColonPosition continueStatement continueStatement
public Switch Case convert org eclipse jdt internal compiler ast Case Statement statement Switch Case switch Case this ast new Switch Case org eclipse jdt internal compiler ast Expression constant Expression statement constant Expression if constant Expression null switch Case set Expression null else switch Case set Expression convert constant Expression switch Case set Source Range statement source Start statement source End statement source Start 1 retrieve Colon Position switch Case return switch Case  SwitchCase CaseStatement SwitchCase switchCase newSwitchCase constantExpression constantExpression constantExpression switchCase setExpression switchCase setExpression constantExpression switchCase setSourceRange sourceStart sourceEnd sourceStart retrieveColonPosition switchCase switchCase
public Do Statement convert org eclipse jdt internal compiler ast Do Statement statement Do Statement do Statement this ast new Do Statement do Statement set Source Range statement source Start statement source End statement source Start 1 do Statement set Expression convert statement condition do Statement set Body convert statement action retrieve Semi Colon Position do Statement return do Statement  DoStatement DoStatement DoStatement doStatement newDoStatement doStatement setSourceRange sourceStart sourceEnd sourceStart doStatement setExpression doStatement setBody retrieveSemiColonPosition doStatement doStatement
public Empty Statement convert org eclipse jdt internal compiler ast Empty Statement statement Empty Statement empty Statement this ast new Empty Statement empty Statement set Source Range statement source Start statement source End statement source Start 1 return empty Statement  EmptyStatement EmptyStatement EmptyStatement emptyStatement newEmptyStatement emptyStatement setSourceRange sourceStart sourceEnd sourceStart emptyStatement
public Statement convert org eclipse jdt internal compiler ast Explicit Constructor Call statement Statement new Statement if statement is Super Access statement is Super Super Constructor Invocation super Constructor Invocation this ast new Super Constructor Invocation if statement qualification null super Constructor Invocation set Expression convert statement qualification org eclipse jdt internal compiler ast Expression arguments statement arguments if arguments null int length arguments length for int i 0 i length i super Constructor Invocation arguments add convert arguments i new Statement super Constructor Invocation else Constructor Invocation constructor Invocation this ast new Constructor Invocation org eclipse jdt internal compiler ast Expression arguments statement arguments if arguments null int length arguments length for int i 0 i length i constructor Invocation arguments add convert arguments i new Statement constructor Invocation new Statement set Source Range statement source Start statement source End statement source Start 1 retrieve Semi Colon Position new Statement if this resolve Bindings record Nodes new Statement statement return new Statement  ExplicitConstructorCall newStatement isSuperAccess isSuper SuperConstructorInvocation superConstructorInvocation newSuperConstructorInvocation superConstructorInvocation setExpression superConstructorInvocation newStatement superConstructorInvocation ConstructorInvocation constructorInvocation newConstructorInvocation constructorInvocation newStatement constructorInvocation newStatement setSourceRange sourceStart sourceEnd sourceStart retrieveSemiColonPosition newStatement resolveBindings recordNodes newStatement newStatement
public For Statement convert org eclipse jdt internal compiler ast For Statement statement For Statement for Statement this ast new For Statement for Statement set Source Range statement source Start statement source End statement source Start 1 org eclipse jdt internal compiler ast Statement initializations statement initializations if initializations null we know that we have at least one initialization if initializations 0 instanceof org eclipse jdt internal compiler ast Local Declaration Variable Declaration Expression variable Declaration Expression convert To Variable Declaration Expression org eclipse jdt internal compiler ast Local Declaration initializations 0 int initializations Length initializations length for int i 1 i initializations Length i variable Declaration Expression fragments add convert To Variable Declaration Fragment org eclipse jdt internal compiler ast Local Declaration initializations i if initializations Length 1 int start variable Declaration Expression get Start Position int end org eclipse jdt internal compiler ast Local Declaration initializations initializations Length 1 declaration Source End variable Declaration Expression set Source Range start end start 1 for Statement initializers add variable Declaration Expression else int initializations Length initializations length for int i 0 i initializations Length i for Statement initializers add convert To Expression initializations i if statement condition null for Statement set Expression convert statement condition org eclipse jdt internal compiler ast Statement increments statement increments if increments null int increments Length increments length for int i 0 i increments Length i for Statement updaters add convert To Expression increments i for Statement set Body convert statement action return for Statement  ForStatement ForStatement ForStatement forStatement newForStatement forStatement setSourceRange sourceStart sourceEnd sourceStart LocalDeclaration VariableDeclarationExpression variableDeclarationExpression convertToVariableDeclarationExpression LocalDeclaration initializationsLength initializationsLength variableDeclarationExpression convertToVariableDeclarationFragment LocalDeclaration initializationsLength variableDeclarationExpression getStartPosition LocalDeclaration initializationsLength declarationSourceEnd variableDeclarationExpression setSourceRange forStatement variableDeclarationExpression initializationsLength initializationsLength forStatement convertToExpression forStatement setExpression incrementsLength incrementsLength forStatement convertToExpression forStatement setBody forStatement
public Expression convert To Expression org eclipse jdt internal compiler ast Statement statement if statement instanceof org eclipse jdt internal compiler ast Expression return convert org eclipse jdt internal compiler ast Expression statement unsupported throw new Illegal Argument Exception Not yet implemented convert statement get Class NON NLS 1 NON NLS 2  convertToExpression IllegalArgumentException getClass
public If Statement convert org eclipse jdt internal compiler ast If Statement statement If Statement if Statement this ast new If Statement if Statement set Source Range statement source Start statement source End statement source Start 1 if Statement set Expression convert statement condition if Statement set Then Statement convert statement then Statement if statement else Statement null if Statement set Else Statement convert statement else Statement return if Statement  IfStatement IfStatement IfStatement ifStatement newIfStatement ifStatement setSourceRange sourceStart sourceEnd sourceStart ifStatement setExpression ifStatement setThenStatement thenStatement elseStatement ifStatement setElseStatement elseStatement ifStatement
public Labeled Statement convert org eclipse jdt internal compiler ast Labeled Statement statement Labeled Statement labeled Statement this ast new Labeled Statement labeled Statement set Source Range statement source Start statement source End statement source Start 1 org eclipse jdt internal compiler ast Statement body statement statement labeled Statement set Body convert body Simple Name name this ast new Simple Name new String statement label retrieve Identifier And Set Positions statement source Start statement source End name labeled Statement set Label name return labeled Statement  LabeledStatement LabeledStatement LabeledStatement labeledStatement newLabeledStatement labeledStatement setSourceRange sourceStart sourceEnd sourceStart labeledStatement setBody SimpleName newSimpleName retrieveIdentifierAndSetPositions sourceStart sourceEnd labeledStatement setLabel labeledStatement
public Return Statement convert org eclipse jdt internal compiler ast Return Statement statement Return Statement return Statement this ast new Return Statement return Statement set Source Range statement source Start statement source End statement source Start 1 if statement expression null return Statement set Expression convert statement expression retrieve Semi Colon Position return Statement return return Statement  ReturnStatement ReturnStatement ReturnStatement returnStatement newReturnStatement returnStatement setSourceRange sourceStart sourceEnd sourceStart returnStatement setExpression retrieveSemiColonPosition returnStatement returnStatement
public Switch Statement convert org eclipse jdt internal compiler ast Switch Statement statement Switch Statement switch Statement this ast new Switch Statement switch Statement set Source Range statement source Start statement source End statement source Start 1 switch Statement set Expression convert statement expression org eclipse jdt internal compiler ast Statement statements statement statements if statements null int statements Length statements length for int i 0 i statements Length i switch Statement statements add convert statements i return switch Statement  SwitchStatement SwitchStatement SwitchStatement switchStatement newSwitchStatement switchStatement setSourceRange sourceStart sourceEnd sourceStart switchStatement setExpression statementsLength statementsLength switchStatement switchStatement
public Synchronized Statement convert org eclipse jdt internal compiler ast Synchronized Statement statement Synchronized Statement synchronized Statement this ast new Synchronized Statement synchronized Statement set Source Range statement source Start statement source End statement source Start 1 synchronized Statement set Body convert statement block synchronized Statement set Expression convert statement expression return synchronized Statement  SynchronizedStatement SynchronizedStatement SynchronizedStatement synchronizedStatement newSynchronizedStatement synchronizedStatement setSourceRange sourceStart sourceEnd sourceStart synchronizedStatement setBody synchronizedStatement setExpression synchronizedStatement
public Throw Statement convert org eclipse jdt internal compiler ast Throw Statement statement Throw Statement throw Statement this ast new Throw Statement throw Statement set Source Range statement source Start statement source End statement source Start 1 throw Statement set Expression convert statement exception retrieve Semi Colon Position throw Statement return throw Statement  ThrowStatement ThrowStatement ThrowStatement throwStatement newThrowStatement throwStatement setSourceRange sourceStart sourceEnd sourceStart throwStatement setExpression retrieveSemiColonPosition throwStatement throwStatement
public Try Statement convert org eclipse jdt internal compiler ast Try Statement statement Try Statement try Statement this ast new Try Statement try Statement set Source Range statement source Start statement source End statement source Start 1 try Statement set Body convert statement try Block org eclipse jdt internal compiler ast Argument catch Arguments statement catch Arguments if catch Arguments null int catch Arguments Length catch Arguments length org eclipse jdt internal compiler ast Block catch Blocks statement catch Blocks int start statement try Block source End for int i 0 i catch Arguments Length i Catch Clause catch Clause this ast new Catch Clause int catch Clause Source Start retrieve Starting Catch Position start catch Arguments i source Start catch Clause set Source Range catch Clause Source Start catch Blocks i source End catch Clause Source Start 1 catch Clause set Body convert catch Blocks i catch Clause set Exception convert catch Arguments i try Statement catch Clauses add catch Clause start catch Blocks i source End if statement finally Block null try Statement set Finally convert statement finally Block return try Statement  TryStatement TryStatement TryStatement tryStatement newTryStatement tryStatement setSourceRange sourceStart sourceEnd sourceStart tryStatement setBody tryBlock catchArguments catchArguments catchArguments catchArgumentsLength catchArguments catchBlocks catchBlocks tryBlock sourceEnd catchArgumentsLength CatchClause catchClause newCatchClause catchClauseSourceStart retrieveStartingCatchPosition catchArguments sourceStart catchClause setSourceRange catchClauseSourceStart catchBlocks sourceEnd catchClauseSourceStart catchClause setBody catchBlocks catchClause setException catchArguments tryStatement catchClauses catchClause catchBlocks sourceEnd finallyBlock tryStatement setFinally finallyBlock tryStatement
public While Statement convert org eclipse jdt internal compiler ast While Statement statement While Statement while Statement this ast new While Statement while Statement set Source Range statement source Start statement source End statement source Start 1 while Statement set Expression convert statement condition org eclipse jdt internal compiler ast Statement action statement action while Statement set Body convert action return while Statement  WhileStatement WhileStatement WhileStatement whileStatement newWhileStatement whileStatement setSourceRange sourceStart sourceEnd sourceStart whileStatement setExpression whileStatement setBody whileStatement
private boolean is Primitive Type char name switch name 0 case i if name length 3 name 1 n name 2 t return true return false case l if name length 4 name 1 o name 2 n name 3 g return true return false case d if name length 6 name 1 o name 2 u name 3 b name 4 l name 5 e return true return false case f if name length 5 name 1 l name 2 o name 3 a name 4 t return true return false case b if name length 4 name 1 y name 2 t name 3 e return true else if name length 7 name 1 o name 2 o name 3 l name 4 e name 5 a name 6 n return true return false case c if name length 4 name 1 h name 2 a name 3 r return true return false case s if name length 5 name 1 h name 2 o name 3 r name 4 t return true return false case v if name length 4 name 1 o name 2 i name 3 d return true return false return false  isPrimitiveType
private Primitive Type Code get Primitive Type Code char name switch name 0 case i if name length 3 name 1 n name 2 t return Primitive Type INT break case l if name length 4 name 1 o name 2 n name 3 g return Primitive Type LONG break case d if name length 6 name 1 o name 2 u name 3 b name 4 l name 5 e return Primitive Type DOUBLE break case f if name length 5 name 1 l name 2 o name 3 a name 4 t return Primitive Type FLOAT break case b if name length 4 name 1 y name 2 t name 3 e return Primitive Type BYTE else if name length 7 name 1 o name 2 o name 3 l name 4 e name 5 a name 6 n return Primitive Type BOOLEAN break case c if name length 4 name 1 h name 2 a name 3 r return Primitive Type CHAR break case s if name length 5 name 1 h name 2 o name 3 r name 4 t return Primitive Type SHORT break case v if name length 4 name 1 o name 2 i name 3 d return Primitive Type VOID throw new Illegal Argument Exception Not a primitive type NON NLS 1  PrimitiveType getPrimitiveTypeCode PrimitiveType PrimitiveType PrimitiveType PrimitiveType PrimitiveType PrimitiveType PrimitiveType PrimitiveType PrimitiveType IllegalArgumentException
private void retrieve Semi Colon Position AST Node node int start node get Start Position int length node get Length int end start length int count 0 this scanner reset To end this compilation Unit Source length try int token while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameSEMICOLON if count 0 node set Source Range start this scanner current Position start return break case Terminal Tokens Token NameLBRACE count break case Terminal Tokens Token NameRBRACE count break case Terminal Tokens Token NameLPAREN count break case Terminal Tokens Token NameRPAREN count break case Terminal Tokens Token NameLBRACKET count break case Terminal Tokens Token NameRBRACKET count catch Invalid Input Exception e ignore  retrieveSemiColonPosition ASTNode getStartPosition getLength resetTo compilationUnitSource getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameSEMICOLON setSourceRange currentPosition TerminalTokens TokenNameLBRACE TerminalTokens TokenNameRBRACE TerminalTokens TokenNameLPAREN TerminalTokens TokenNameRPAREN TerminalTokens TokenNameLBRACKET TerminalTokens TokenNameRBRACKET InvalidInputException
This method is used to set the right end position for expression statement The actual AST nodes don t include the trailing semicolon This method fixes the length of the corresponding node private void retrieve Colon Position AST Node node int start node get Start Position int length node get Length int end start length this scanner reset To end this compilation Unit Source length try int token while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameCOLON node set Source Range start this scanner current Position start return catch Invalid Input Exception e ignore  retrieveColonPosition ASTNode getStartPosition getLength resetTo compilationUnitSource getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameCOLON setSourceRange currentPosition InvalidInputException
private int retrieve Ending Semi Colon Position int start int end int count 0 this scanner reset To start end try int token while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameSEMICOLON if count 0 return this scanner current Position 1 break case Terminal Tokens Token NameLBRACE count break case Terminal Tokens Token NameRBRACE count break case Terminal Tokens Token NameLPAREN count break case Terminal Tokens Token NameRPAREN count break case Terminal Tokens Token NameLBRACKET count break case Terminal Tokens Token NameRBRACKET count catch Invalid Input Exception e ignore return 1  retrieveEndingSemiColonPosition resetTo getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameSEMICOLON currentPosition TerminalTokens TokenNameLBRACE TerminalTokens TokenNameRBRACE TerminalTokens TokenNameLPAREN TerminalTokens TokenNameRPAREN TerminalTokens TokenNameLBRACKET TerminalTokens TokenNameRBRACKET InvalidInputException
This method is used to retrieve the array dimension declared after the name of a local or a field declaration For example int i j null k It should return 0 for i 1 for j and 2 for k return int the dimension found private int retrieve Extra Dimension int start int end this scanner reset To start end int dimensions 0 try int token while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameRBRACKET 166 dimensions break case Terminal Tokens Token NameLBRACE 90 case Terminal Tokens Token NameCOMMA 90 case Terminal Tokens Token NameEQUAL 167 case Terminal Tokens Token NameSEMICOLON 64 case Terminal Tokens Token NameRPAREN 86 return dimensions catch Invalid Input Exception e ignore return dimensions  retrieveExtraDimension resetTo getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameRBRACKET TerminalTokens TokenNameLBRACE TerminalTokens TokenNameCOMMA TerminalTokens TokenNameEQUAL TerminalTokens TokenNameSEMICOLON TerminalTokens TokenNameRPAREN InvalidInputException
This method is used to retrieve the ending position for a type declaration when the dimension is right after the type name For example int i return 5 but int i return 1 return int the dimension found private int retrieve End Of Dimensions Position int start int end this scanner reset To start end int found Position 1 try int token while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameLBRACKET case Terminal Tokens TokenNameCOMMENT BLOCK case Terminal Tokens TokenNameCOMMENT JAVADOC case Terminal Tokens TokenNameCOMMENT LINE break case Terminal Tokens Token NameRBRACKET 166 found Position this scanner current Position 1 break default return found Position catch Invalid Input Exception e ignore return found Position  retrieveEndOfDimensionsPosition resetTo foundPosition getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameLBRACKET TerminalTokens TokenNameCOMMENT_BLOCK TerminalTokens TokenNameCOMMENT_JAVADOC TerminalTokens TokenNameCOMMENT_LINE TerminalTokens TokenNameRBRACKET foundPosition currentPosition foundPosition InvalidInputException foundPosition
This method is used to retrieve the starting position of the catch keyword return int the dimension found 1 if none private int retrieve Starting Catch Position int start int end this scanner reset To start end try int token while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token Namecatch 225 return this scanner start Position catch Invalid Input Exception e ignore return 1  retrieveStartingCatchPosition resetTo getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNamecatch startPosition InvalidInputException
This method is used to retrieve the position just before the left bracket return int the dimension found 1 if none private int retrieve End Of Element Type Name Position int start int end this scanner reset To start end try int token while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token Name Identifier case Terminal Tokens Token Namebyte case Terminal Tokens Token Namechar case Terminal Tokens Token Namedouble case Terminal Tokens Token Namefloat case Terminal Tokens Token Nameint case Terminal Tokens Token Namelong case Terminal Tokens Token Nameshort return this scanner current Position 1 catch Invalid Input Exception e ignore return 1  retrieveEndOfElementTypeNamePosition resetTo getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameIdentifier TerminalTokens TokenNamebyte TerminalTokens TokenNamechar TerminalTokens TokenNamedouble TerminalTokens TokenNamefloat TerminalTokens TokenNameint TerminalTokens TokenNamelong TerminalTokens TokenNameshort currentPosition InvalidInputException
This method is used to retrieve the position of the right bracket return int the dimension found 1 if none private int retrieve Right Bracket Position int start int end this scanner reset To start end try int token while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameRBRACKET return this scanner current Position 1 catch Invalid Input Exception e ignore return 1  retrieveRightBracketPosition resetTo getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameRBRACKET currentPosition InvalidInputException
This method is used to retrieve the position after the right parenthesis return int the position found private int retrieve End Of Right Parenthesis Position int start int end this scanner reset To start end try int token while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameRPAREN return this scanner current Position catch Invalid Input Exception e ignore return 1  retrieveEndOfRightParenthesisPosition resetTo getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameRPAREN currentPosition InvalidInputException
private int retrieve Proper Right Bracket Position int bracket Number int start int end this scanner reset To start end try int token count 0 while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameRBRACKET count if count bracket Number return this scanner current Position 1 catch Invalid Input Exception e ignore return 1  retrieveProperRightBracketPosition bracketNumber resetTo getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameRBRACKET bracketNumber currentPosition InvalidInputException
This method is used to retrieve the start position of the block return int the dimension found 1 if none private int retrieve Start Block Position int start int end this scanner reset To start end try int token while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameLBRACE 110 return this scanner start Position catch Invalid Input Exception e ignore return 1  retrieveStartBlockPosition resetTo getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameLBRACE startPosition InvalidInputException
This method is used to retrieve the start position of the block return int the dimension found 1 if none private int retrieve Identifier End Position int start int end this scanner reset To start end try int token while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token Name Identifier 110 return this scanner get Current Token End Position catch Invalid Input Exception e ignore return 1  retrieveIdentifierEndPosition resetTo getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameIdentifier getCurrentTokenEndPosition InvalidInputException
This method is used to retrieve the end position of the block return int the dimension found 1 if none private int retrieve End Block Position int start int end this scanner reset To start end int count 0 try int token while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameLBRACE 110 count break case Terminal Tokens Token NameRBRACE 95 count if count 0 return this scanner current Position 1 catch Invalid Input Exception e ignore return 1  retrieveEndBlockPosition resetTo getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameLBRACE TerminalTokens TokenNameRBRACE currentPosition InvalidInputException
This method is used to retrieve position before the next right brace or semi colon return int the position found private int retrieve Right Brace Or Semi Colon Position Method Declaration node org eclipse jdt internal compiler ast Abstract Method Declaration method Declaration int start node get Start Position this scanner reset To start method Declaration declaration Source End try int token int brace Counter 0 while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameLBRACE brace Counter break case Terminal Tokens Token NameRBRACE brace Counter if brace Counter 0 return this scanner current Position break case Terminal Tokens Token NameSEMICOLON if brace Counter 0 return this scanner current Position catch Invalid Input Exception e ignore return 1  retrieveRightBraceOrSemiColonPosition MethodDeclaration AbstractMethodDeclaration methodDeclaration getStartPosition resetTo methodDeclaration declarationSourceEnd braceCounter getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameLBRACE braceCounter TerminalTokens TokenNameRBRACE braceCounter braceCounter currentPosition TerminalTokens TokenNameSEMICOLON braceCounter currentPosition InvalidInputException
This method is used to retrieve position before the next comma or semi colon return int the position found private int retrieve Position Before Next Comma Or Semi Colon int start int end this scanner reset To start end int brace Counter 0 try int token while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameLBRACE brace Counter break case Terminal Tokens Token NameRBRACE brace Counter break case Terminal Tokens Token NameLPAREN brace Counter break case Terminal Tokens Token NameRPAREN brace Counter break case Terminal Tokens Token NameLBRACKET brace Counter break case Terminal Tokens Token NameRBRACKET brace Counter break case Terminal Tokens Token NameCOMMA case Terminal Tokens Token NameSEMICOLON if brace Counter 0 return this scanner start Position 1 catch Invalid Input Exception e ignore return 1  retrievePositionBeforeNextCommaOrSemiColon resetTo braceCounter getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameLBRACE braceCounter TerminalTokens TokenNameRBRACE braceCounter TerminalTokens TokenNameLPAREN braceCounter TerminalTokens TokenNameRPAREN braceCounter TerminalTokens TokenNameLBRACKET braceCounter TerminalTokens TokenNameRBRACKET braceCounter TerminalTokens TokenNameCOMMA TerminalTokens TokenNameSEMICOLON braceCounter startPosition InvalidInputException
private Variable Declaration Fragment convert To Variable Declaration Fragment org eclipse jdt internal compiler ast Field Declaration field Declaration Variable Declaration Fragment variable Declaration Fragment this ast new Variable Declaration Fragment Simple Name name this ast new Simple Name new String field Declaration name name set Source Range field Declaration source Start field Declaration source End field Declaration source Start 1 variable Declaration Fragment set Name name int end retrieve Position Before Next Comma Or Semi Colon field Declaration source End field Declaration declaration Source End if end 1 variable Declaration Fragment set Source Range field Declaration source Start field Declaration declaration Source End field Declaration source Start 1 variable Declaration Fragment set Flags variable Declaration Fragment get Flags AST Node MALFORMED else variable Declaration Fragment set Source Range field Declaration source Start end field Declaration source Start 1 if field Declaration initialization null variable Declaration Fragment set Initializer convert field Declaration initialization variable Declaration Fragment set Extra Dimensions retrieve Extra Dimension field Declaration source End 1 field Declaration declaration Source End if this resolve Bindings record Nodes name field Declaration record Nodes variable Declaration Fragment field Declaration variable Declaration Fragment resolve Binding return variable Declaration Fragment  VariableDeclarationFragment convertToVariableDeclarationFragment FieldDeclaration fieldDeclaration VariableDeclarationFragment variableDeclarationFragment newVariableDeclarationFragment SimpleName newSimpleName fieldDeclaration setSourceRange fieldDeclaration sourceStart fieldDeclaration sourceEnd fieldDeclaration sourceStart variableDeclarationFragment setName retrievePositionBeforeNextCommaOrSemiColon fieldDeclaration sourceEnd fieldDeclaration declarationSourceEnd variableDeclarationFragment setSourceRange fieldDeclaration sourceStart fieldDeclaration declarationSourceEnd fieldDeclaration sourceStart variableDeclarationFragment setFlags variableDeclarationFragment getFlags ASTNode variableDeclarationFragment setSourceRange fieldDeclaration sourceStart fieldDeclaration sourceStart fieldDeclaration variableDeclarationFragment setInitializer fieldDeclaration variableDeclarationFragment setExtraDimensions retrieveExtraDimension fieldDeclaration sourceEnd fieldDeclaration declarationSourceEnd resolveBindings recordNodes fieldDeclaration recordNodes variableDeclarationFragment fieldDeclaration variableDeclarationFragment resolveBinding variableDeclarationFragment
private Variable Declaration Fragment convert To Variable Declaration Fragment org eclipse jdt internal compiler ast Local Declaration local Declaration Variable Declaration Fragment variable Declaration Fragment this ast new Variable Declaration Fragment Simple Name name this ast new Simple Name new String local Declaration name name set Source Range local Declaration source Start local Declaration source End local Declaration source Start 1 variable Declaration Fragment set Name name int end retrieve Position Before Next Comma Or Semi Colon local Declaration source End this compilation Unit Source length if end 1 if local Declaration initialization null variable Declaration Fragment set Source Range local Declaration source Start local Declaration initialization source End local Declaration source Start 1 else variable Declaration Fragment set Source Range local Declaration source Start local Declaration source End local Declaration source Start 1 else variable Declaration Fragment set Source Range local Declaration source Start end local Declaration source Start 1 if local Declaration initialization null variable Declaration Fragment set Initializer convert local Declaration initialization variable Declaration Fragment set Extra Dimensions retrieve Extra Dimension local Declaration source End 1 this compilation Unit Source length if this resolve Bindings record Nodes variable Declaration Fragment local Declaration record Nodes name local Declaration variable Declaration Fragment resolve Binding return variable Declaration Fragment  VariableDeclarationFragment convertToVariableDeclarationFragment LocalDeclaration localDeclaration VariableDeclarationFragment variableDeclarationFragment newVariableDeclarationFragment SimpleName newSimpleName localDeclaration setSourceRange localDeclaration sourceStart localDeclaration sourceEnd localDeclaration sourceStart variableDeclarationFragment setName retrievePositionBeforeNextCommaOrSemiColon localDeclaration sourceEnd compilationUnitSource localDeclaration variableDeclarationFragment setSourceRange localDeclaration sourceStart localDeclaration sourceEnd localDeclaration sourceStart variableDeclarationFragment setSourceRange localDeclaration sourceStart localDeclaration sourceEnd localDeclaration sourceStart variableDeclarationFragment setSourceRange localDeclaration sourceStart localDeclaration sourceStart localDeclaration variableDeclarationFragment setInitializer localDeclaration variableDeclarationFragment setExtraDimensions retrieveExtraDimension localDeclaration sourceEnd compilationUnitSource resolveBindings recordNodes variableDeclarationFragment localDeclaration recordNodes localDeclaration variableDeclarationFragment resolveBinding variableDeclarationFragment
private Field Declaration convert To Field Declaration org eclipse jdt internal compiler ast Field Declaration field Decl Variable Declaration Fragment variable Declaration Fragment convert To Variable Declaration Fragment field Decl Field Declaration field Declaration this ast new Field Declaration variable Declaration Fragment if this resolve Bindings record Nodes variable Declaration Fragment field Decl variable Declaration Fragment resolve Binding field Declaration set Source Range field Decl declaration Source Start field Decl declaration End field Decl declaration Source Start 1 Type type convert Type field Decl type set Type For Field field Declaration type variable Declaration Fragment get Extra Dimensions field Declaration set Modifiers field Decl modifiers org eclipse jdt internal compiler lookup Compiler Modifiers Acc Just Flag convert field Decl javadoc field Declaration return field Declaration  FieldDeclaration convertToFieldDeclaration FieldDeclaration fieldDecl VariableDeclarationFragment variableDeclarationFragment convertToVariableDeclarationFragment fieldDecl FieldDeclaration fieldDeclaration newFieldDeclaration variableDeclarationFragment resolveBindings recordNodes variableDeclarationFragment fieldDecl variableDeclarationFragment resolveBinding fieldDeclaration setSourceRange fieldDecl declarationSourceStart fieldDecl declarationEnd fieldDecl declarationSourceStart convertType fieldDecl setTypeForField fieldDeclaration variableDeclarationFragment getExtraDimensions fieldDeclaration setModifiers fieldDecl CompilerModifiers AccJustFlag fieldDecl fieldDeclaration fieldDeclaration
private Variable Declaration Statement convert To Variable Declaration Statement org eclipse jdt internal compiler ast Local Declaration local Declaration Variable Declaration Fragment variable Declaration Fragment convert To Variable Declaration Fragment local Declaration Variable Declaration Statement variable Declaration Statement this ast new Variable Declaration Statement variable Declaration Fragment if this resolve Bindings record Nodes variable Declaration Fragment local Declaration variable Declaration Statement set Source Range local Declaration declaration Source Start local Declaration declaration Source End local Declaration declaration Source Start 1 Type type convert Type local Declaration type set Type For Variable Declaration Statement variable Declaration Statement type variable Declaration Fragment get Extra Dimensions variable Declaration Statement set Modifiers local Declaration modifiers Compiler Modifiers Acc Blank Final return variable Declaration Statement  VariableDeclarationStatement convertToVariableDeclarationStatement LocalDeclaration localDeclaration VariableDeclarationFragment variableDeclarationFragment convertToVariableDeclarationFragment localDeclaration VariableDeclarationStatement variableDeclarationStatement newVariableDeclarationStatement variableDeclarationFragment resolveBindings recordNodes variableDeclarationFragment localDeclaration variableDeclarationStatement setSourceRange localDeclaration declarationSourceStart localDeclaration declarationSourceEnd localDeclaration declarationSourceStart convertType localDeclaration setTypeForVariableDeclarationStatement variableDeclarationStatement variableDeclarationFragment getExtraDimensions variableDeclarationStatement setModifiers localDeclaration CompilerModifiers AccBlankFinal variableDeclarationStatement
private Variable Declaration Expression convert To Variable Declaration Expression org eclipse jdt internal compiler ast Local Declaration local Declaration Variable Declaration Fragment variable Declaration Fragment convert To Variable Declaration Fragment local Declaration Variable Declaration Expression variable Declaration Expression this ast new Variable Declaration Expression variable Declaration Fragment if this resolve Bindings record Nodes variable Declaration Fragment local Declaration variable Declaration Expression set Source Range local Declaration declaration Source Start local Declaration declaration Source End local Declaration declaration Source Start 1 Type type convert Type local Declaration type set Type For Variable Declaration Expression variable Declaration Expression type variable Declaration Fragment get Extra Dimensions variable Declaration Expression set Modifiers local Declaration modifiers Compiler Modifiers Acc Blank Final return variable Declaration Expression  VariableDeclarationExpression convertToVariableDeclarationExpression LocalDeclaration localDeclaration VariableDeclarationFragment variableDeclarationFragment convertToVariableDeclarationFragment localDeclaration VariableDeclarationExpression variableDeclarationExpression newVariableDeclarationExpression variableDeclarationFragment resolveBindings recordNodes variableDeclarationFragment localDeclaration variableDeclarationExpression setSourceRange localDeclaration declarationSourceStart localDeclaration declarationSourceEnd localDeclaration declarationSourceStart convertType localDeclaration setTypeForVariableDeclarationExpression variableDeclarationExpression variableDeclarationFragment getExtraDimensions variableDeclarationExpression setModifiers localDeclaration CompilerModifiers AccBlankFinal variableDeclarationExpression
private void set Type For Field Field Declaration field Declaration Type type int extra Dimension if extra Dimension 0 if type is Array Type Array Type array Type Array Type type int remaining Dimensions array Type get Dimensions extra Dimension if remaining Dimensions 0 the dimensions are after the name so the type of the field Declaration is a simple Type Type element Type array Type get Element Type cut the child loose from its parent without creating garbage element Type set Parent null null this ast get Binding Resolver update Key type element Type field Declaration set Type element Type else int start type get Start Position int length type get Length Array Type subarray Type array Type int index extra Dimension while index 0 subarray Type Array Type subarray Type get Component Type index int end retrieve Proper Right Bracket Position remaining Dimensions start start length subarray Type set Source Range start end start 1 cut the child loose from its parent without creating garbage subarray Type set Parent null null field Declaration set Type subarray Type update Inner Positions subarray Type remaining Dimensions this ast get Binding Resolver update Key type subarray Type else field Declaration set Type type else if type is Array Type update positions of the component types of the array type int dimensions Array Type type get Dimensions update Inner Positions type dimensions field Declaration set Type type  setTypeForField FieldDeclaration fieldDeclaration extraDimension extraDimension isArrayType ArrayType arrayType ArrayType remainingDimensions arrayType getDimensions extraDimension remainingDimensions fieldDeclaration simpleType elementType arrayType getElementType elementType setParent getBindingResolver updateKey elementType fieldDeclaration setType elementType getStartPosition getLength ArrayType subarrayType arrayType extraDimension subarrayType ArrayType subarrayType getComponentType retrieveProperRightBracketPosition remainingDimensions subarrayType setSourceRange subarrayType setParent fieldDeclaration setType subarrayType updateInnerPositions subarrayType remainingDimensions getBindingResolver updateKey subarrayType fieldDeclaration setType isArrayType ArrayType getDimensions updateInnerPositions fieldDeclaration setType
private void update Inner Positions Type type int dimensions if dimensions 1 need to set positions for intermediate array type see 42839 int start type get Start Position int length type get Length Type current Component Type Array Type type get Component Type int searched Dimension dimensions 1 int right Bracket End Position start while current Component Type is Array Type right Bracket End Position retrieve Proper Right Bracket Position searched Dimension start start length current Component Type set Source Range start right Bracket End Position start 1 current Component Type Array Type current Component Type get Component Type searched Dimension  updateInnerPositions getStartPosition getLength currentComponentType ArrayType getComponentType searchedDimension rightBracketEndPosition currentComponentType isArrayType rightBracketEndPosition retrieveProperRightBracketPosition searchedDimension currentComponentType setSourceRange rightBracketEndPosition currentComponentType ArrayType currentComponentType getComponentType searchedDimension
private void set Type For Single Variable Declaration Single Variable Declaration single Variable Declaration Type type int extra Dimension if extra Dimension 0 if type is Array Type Array Type array Type Array Type type int remaining Dimensions array Type get Dimensions extra Dimension if remaining Dimensions 0 the dimensions are after the name so the type of the field Declaration is a simple Type Type element Type array Type get Element Type cut the child loose from its parent without creating garbage element Type set Parent null null this ast get Binding Resolver update Key type element Type single Variable Declaration set Type element Type else int start type get Start Position int length type get Length Array Type subarray Type array Type int index extra Dimension while index 0 subarray Type Array Type subarray Type get Component Type index int end retrieve Proper Right Bracket Position remaining Dimensions start start length subarray Type set Source Range start end start 1 cut the child loose from its parent without creating garbage subarray Type set Parent null null update Inner Positions subarray Type remaining Dimensions single Variable Declaration set Type subarray Type this ast get Binding Resolver update Key type subarray Type else single Variable Declaration set Type type else single Variable Declaration set Type type  setTypeForSingleVariableDeclaration SingleVariableDeclaration singleVariableDeclaration extraDimension extraDimension isArrayType ArrayType arrayType ArrayType remainingDimensions arrayType getDimensions extraDimension remainingDimensions fieldDeclaration simpleType elementType arrayType getElementType elementType setParent getBindingResolver updateKey elementType singleVariableDeclaration setType elementType getStartPosition getLength ArrayType subarrayType arrayType extraDimension subarrayType ArrayType subarrayType getComponentType retrieveProperRightBracketPosition remainingDimensions subarrayType setSourceRange subarrayType setParent updateInnerPositions subarrayType remainingDimensions singleVariableDeclaration setType subarrayType getBindingResolver updateKey subarrayType singleVariableDeclaration setType singleVariableDeclaration setType
private void set Type For Method Declaration Method Declaration method Declaration Type type int extra Dimension if extra Dimension 0 if type is Array Type Array Type array Type Array Type type int remaining Dimensions array Type get Dimensions extra Dimension if remaining Dimensions 0 the dimensions are after the name so the type of the field Declaration is a simple Type Type element Type array Type get Element Type cut the child loose from its parent without creating garbage element Type set Parent null null this ast get Binding Resolver update Key type element Type method Declaration set Return Type element Type else int start type get Start Position int length type get Length Array Type subarray Type array Type int index extra Dimension while index 0 subarray Type Array Type subarray Type get Component Type index int end retrieve Proper Right Bracket Position remaining Dimensions start start length subarray Type set Source Range start end start 1 cut the child loose from its parent without creating garbage subarray Type set Parent null null update Inner Positions subarray Type remaining Dimensions method Declaration set Return Type subarray Type this ast get Binding Resolver update Key type subarray Type else method Declaration set Return Type type else method Declaration set Return Type type  setTypeForMethodDeclaration MethodDeclaration methodDeclaration extraDimension extraDimension isArrayType ArrayType arrayType ArrayType remainingDimensions arrayType getDimensions extraDimension remainingDimensions fieldDeclaration simpleType elementType arrayType getElementType elementType setParent getBindingResolver updateKey elementType methodDeclaration setReturnType elementType getStartPosition getLength ArrayType subarrayType arrayType extraDimension subarrayType ArrayType subarrayType getComponentType retrieveProperRightBracketPosition remainingDimensions subarrayType setSourceRange subarrayType setParent updateInnerPositions subarrayType remainingDimensions methodDeclaration setReturnType subarrayType getBindingResolver updateKey subarrayType methodDeclaration setReturnType methodDeclaration setReturnType
private void set Type For Variable Declaration Statement Variable Declaration Statement variable Declaration Statement Type type int extra Dimension if extra Dimension 0 if type is Array Type Array Type array Type Array Type type int remaining Dimensions array Type get Dimensions extra Dimension if remaining Dimensions 0 the dimensions are after the name so the type of the field Declaration is a simple Type Type element Type array Type get Element Type cut the child loose from its parent without creating garbage element Type set Parent null null this ast get Binding Resolver update Key type element Type variable Declaration Statement set Type element Type else int start type get Start Position int length type get Length Array Type subarray Type array Type int index extra Dimension while index 0 subarray Type Array Type subarray Type get Component Type index int end retrieve Proper Right Bracket Position remaining Dimensions start start length subarray Type set Source Range start end start 1 cut the child loose from its parent without creating garbage subarray Type set Parent null null update Inner Positions subarray Type remaining Dimensions variable Declaration Statement set Type subarray Type this ast get Binding Resolver update Key type subarray Type else variable Declaration Statement set Type type else variable Declaration Statement set Type type  setTypeForVariableDeclarationStatement VariableDeclarationStatement variableDeclarationStatement extraDimension extraDimension isArrayType ArrayType arrayType ArrayType remainingDimensions arrayType getDimensions extraDimension remainingDimensions fieldDeclaration simpleType elementType arrayType getElementType elementType setParent getBindingResolver updateKey elementType variableDeclarationStatement setType elementType getStartPosition getLength ArrayType subarrayType arrayType extraDimension subarrayType ArrayType subarrayType getComponentType retrieveProperRightBracketPosition remainingDimensions subarrayType setSourceRange subarrayType setParent updateInnerPositions subarrayType remainingDimensions variableDeclarationStatement setType subarrayType getBindingResolver updateKey subarrayType variableDeclarationStatement setType variableDeclarationStatement setType
private void set Type For Variable Declaration Expression Variable Declaration Expression variable Declaration Expression Type type int extra Dimension if extra Dimension 0 if type is Array Type Array Type array Type Array Type type int remaining Dimensions array Type get Dimensions extra Dimension if remaining Dimensions 0 the dimensions are after the name so the type of the field Declaration is a simple Type Type element Type array Type get Element Type cut the child loose from its parent without creating garbage element Type set Parent null null this ast get Binding Resolver update Key type element Type variable Declaration Expression set Type element Type else int start type get Start Position int length type get Length Array Type subarray Type array Type int index extra Dimension while index 0 subarray Type Array Type subarray Type get Component Type index int end retrieve Proper Right Bracket Position remaining Dimensions start start length subarray Type set Source Range start end start 1 cut the child loose from its parent without creating garbage subarray Type set Parent null null update Inner Positions subarray Type remaining Dimensions variable Declaration Expression set Type subarray Type this ast get Binding Resolver update Key type subarray Type else variable Declaration Expression set Type type else variable Declaration Expression set Type type  setTypeForVariableDeclarationExpression VariableDeclarationExpression variableDeclarationExpression extraDimension extraDimension isArrayType ArrayType arrayType ArrayType remainingDimensions arrayType getDimensions extraDimension remainingDimensions fieldDeclaration simpleType elementType arrayType getElementType elementType setParent getBindingResolver updateKey elementType variableDeclarationExpression setType elementType getStartPosition getLength ArrayType subarrayType arrayType extraDimension subarrayType ArrayType subarrayType getComponentType retrieveProperRightBracketPosition remainingDimensions subarrayType setSourceRange subarrayType setParent updateInnerPositions subarrayType remainingDimensions variableDeclarationExpression setType subarrayType getBindingResolver updateKey subarrayType variableDeclarationExpression setType variableDeclarationExpression setType
public void convert org eclipse jdt internal compiler ast Javadoc javadoc Body Declaration body Declaration if body Declaration get Javadoc null if javadoc null if this comment Mapper null this comment Mapper has Same Table this comments Table this comment Mapper new Default Comment Mapper this comments Table Comment comment this comment Mapper get Comment javadoc source Start if comment null comment is Doc Comment comment get Parent null Javadoc doc Comment Javadoc comment if this resolve Bindings record Nodes doc Comment javadoc resolve member and method references binding Iterator tags doc Comment tags list Iterator while tags has Next record Nodes javadoc Tag Element tags next body Declaration set Javadoc doc Comment  BodyDeclaration bodyDeclaration bodyDeclaration getJavadoc commentMapper commentMapper hasSameTable commentsTable commentMapper DefaultCommentMapper commentsTable commentMapper getComment sourceStart isDocComment getParent docComment resolveBindings recordNodes docComment docComment listIterator hasNext recordNodes TagElement bodyDeclaration setJavadoc docComment
private void record Nodes org eclipse jdt internal compiler ast Javadoc javadoc Tag Element tag Element Iterator fragments tag Element fragments list Iterator int size tag Element fragments size int replace Index new int size int idx 0 while fragments has Next AST Node node AST Node fragments next replace Index idx 0 if node get Node Type AST Node MEMBER REF Member Ref member Ref Member Ref node Name name member Ref get Name get compiler node and record nodes int start name get Start Position org eclipse jdt internal compiler ast AST Node compiler Node javadoc get Node Starting At start if compiler Node instanceof Javadoc Message Send replace Index idx 1 if compiler Node null record Nodes name compiler Node record Nodes node compiler Node Replace qualifier to have all nodes recorded if member Ref get Qualifier null org eclipse jdt internal compiler ast Type Reference type Ref null if compiler Node instanceof Javadoc Field Reference org eclipse jdt internal compiler ast Expression expression Javadoc Field Reference compiler Node receiver if expression instanceof org eclipse jdt internal compiler ast Type Reference type Ref org eclipse jdt internal compiler ast Type Reference expression else if compiler Node instanceof Javadoc Message Send org eclipse jdt internal compiler ast Expression expression Javadoc Message Send compiler Node receiver if expression instanceof org eclipse jdt internal compiler ast Type Reference type Ref org eclipse jdt internal compiler ast Type Reference expression if type Ref null record Name member Ref get Qualifier type Ref else if node get Node Type AST Node METHOD REF Method Ref method Ref Method Ref node Name name method Ref get Name get compiler node and record nodes int start name get Start Position get compiler node and record nodes org eclipse jdt internal compiler ast AST Node compiler Node javadoc get Node Starting At start record nodes if compiler Node null record Nodes method Ref compiler Node get type ref org eclipse jdt internal compiler ast Type Reference type Ref null if compiler Node instanceof org eclipse jdt internal compiler ast Javadoc Allocation Expression type Ref org eclipse jdt internal compiler ast Javadoc Allocation Expression compiler Node type if type Ref null record Nodes name type Ref else if compiler Node instanceof org eclipse jdt internal compiler ast Javadoc Message Send org eclipse jdt internal compiler ast Expression expression org eclipse jdt internal compiler ast Javadoc Message Send compiler Node receiver if expression instanceof org eclipse jdt internal compiler ast Type Reference type Ref org eclipse jdt internal compiler ast Type Reference expression TODO frederic remove following line to fix bug https bugs eclipse org bugs show bug cgi id 62650 record Nodes name compiler Node record name and qualifier if type Ref null method Ref get Qualifier null record Name method Ref get Qualifier type Ref Resolve parameters Iterator parameters method Ref parameters list Iterator while parameters has Next Method Ref Parameter param Method Ref Parameter parameters next org eclipse jdt internal compiler ast Expression expression org eclipse jdt internal compiler ast Expression javadoc get Node Starting At param get Start Position if expression null record Nodes param expression if expression instanceof Javadoc Argument Expression Javadoc Argument Expression arg Expr Javadoc Argument Expression expression org eclipse jdt internal compiler ast Type Reference type Ref arg Expr argument type record Nodes param get Type type Ref if param get Type is Simple Type Simple Type type Simple Type param get Type record Name type get Name type Ref else if param get Type is Array Type Type type Array Type param get Type get Element Type if type is Simple Type record Name Simple Type type get Name type Ref else if node get Node Type AST Node SIMPLE NAME node get Node Type AST Node QUALIFIED NAME org eclipse jdt internal compiler ast AST Node compiler Node javadoc get Node Starting At node get Start Position record Name Name node compiler Node else if node get Node Type AST Node TAG ELEMENT resolve member and method references binding record Nodes javadoc Tag Element node for int i 0 i size i if replace Index i 1 Member Ref member Ref Member Ref tag Element fragments remove i Method Ref method Ref this ast new Method Ref method Ref set Name Simple Name member Ref get Name clone this ast if member Ref get Qualifier null method Ref set Qualifier Name member Ref get Qualifier clone this ast method Ref set Source Range member Ref get Start Position member Ref get Length tag Element fragments add i method Ref  recordNodes TagElement tagElement tagElement listIterator tagElement replaceIndex hasNext ASTNode ASTNode replaceIndex getNodeType ASTNode MEMBER_REF MemberRef memberRef MemberRef memberRef getName getStartPosition ASTNode compilerNode getNodeStartingAt compilerNode JavadocMessageSend replaceIndex compilerNode recordNodes compilerNode recordNodes compilerNode memberRef getQualifier TypeReference typeRef compilerNode JavadocFieldReference JavadocFieldReference compilerNode TypeReference typeRef TypeReference compilerNode JavadocMessageSend JavadocMessageSend compilerNode TypeReference typeRef TypeReference typeRef recordName memberRef getQualifier typeRef getNodeType ASTNode METHOD_REF MethodRef methodRef MethodRef methodRef getName getStartPosition ASTNode compilerNode getNodeStartingAt compilerNode recordNodes methodRef compilerNode TypeReference typeRef compilerNode JavadocAllocationExpression typeRef JavadocAllocationExpression compilerNode typeRef recordNodes typeRef compilerNode JavadocMessageSend JavadocMessageSend compilerNode TypeReference typeRef TypeReference show_bug recordNodes compilerNode typeRef methodRef getQualifier recordName methodRef getQualifier typeRef methodRef listIterator hasNext MethodRefParameter MethodRefParameter getNodeStartingAt getStartPosition recordNodes JavadocArgumentExpression JavadocArgumentExpression argExpr JavadocArgumentExpression TypeReference typeRef argExpr recordNodes getType typeRef getType isSimpleType SimpleType SimpleType getType recordName getName typeRef getType isArrayType ArrayType getType getElementType isSimpleType recordName SimpleType getName typeRef getNodeType ASTNode SIMPLE_NAME getNodeType ASTNode QUALIFIED_NAME ASTNode compilerNode getNodeStartingAt getStartPosition recordName compilerNode getNodeType ASTNode TAG_ELEMENT recordNodes TagElement replaceIndex MemberRef memberRef MemberRef tagElement MethodRef methodRef newMethodRef methodRef setName SimpleName memberRef getName memberRef getQualifier methodRef setQualifier memberRef getQualifier methodRef setSourceRange memberRef getStartPosition memberRef getLength tagElement methodRef
private void record Name Name name org eclipse jdt internal compiler ast AST Node compiler Node if compiler Node null record Nodes name compiler Node if compiler Node instanceof org eclipse jdt internal compiler ast Type Reference org eclipse jdt internal compiler ast Type Reference type Ref org eclipse jdt internal compiler ast Type Reference compiler Node if name is Qualified Name int count 0 Simple Name simple Name null while name is Qualified Name simple Name Qualified Name name get Name record Nodes simple Name type Ref simple Name index count name Qualified Name name get Qualifier name index count record Nodes name type Ref  recordName ASTNode compilerNode compilerNode recordNodes compilerNode compilerNode TypeReference TypeReference typeRef TypeReference compilerNode isQualifiedName SimpleName simpleName isQualifiedName simpleName QualifiedName getName recordNodes simpleName typeRef simpleName QualifiedName getQualifier recordNodes typeRef
private Comment create Comment int positions Create comment node Comment comment null int start positions 0 int end positions 1 if positions 1 0 Javadoc comments have positive end position this ast new Javadoc Javadoc doc Comment this doc Parser parse positions if doc Comment null return null comment doc Comment else end end if positions 0 0 Block comment have positive start position comment this ast new Block Comment else Line comment have negative start and end position start start comment this ast new Line Comment comment set Source Range start end start return comment  createComment newJavadoc docComment docParser docComment docComment newBlockComment newLineComment setSourceRange
void propagate Errors AST Node ast Node I Problem problems AST Syntax Error Propagator syntax Error Propagator new AST Syntax Error Propagator problems ast Node accept syntax Error Propagator  propagateErrors ASTNode astNode IProblem ASTSyntaxErrorPropagator syntaxErrorPropagator ASTSyntaxErrorPropagator astNode syntaxErrorPropagator
private void record Nodes AST Node node org eclipse jdt internal compiler ast AST Node oldAST Node this ast get Binding Resolver store node oldAST Node  recordNodes ASTNode ASTNode oldASTNode getBindingResolver oldASTNode
Remove whitespaces and comments before and after the expression private void trim White Spaces And Comments org eclipse jdt internal compiler ast Expression expression int start expression source Start int end expression source End int token int trim Left Position expression source Start int trim Right Position expression source End boolean first true Scanner remove Blank Scanner this ast scanner try remove Blank Scanner set Source this compilation Unit Source remove Blank Scanner reset To start end while true token remove Blank Scanner get Next Token switch token case Terminal Tokens TokenNameCOMMENT JAVADOC case Terminal Tokens TokenNameCOMMENT LINE case Terminal Tokens TokenNameCOMMENT BLOCK if first trim Left Position remove Blank Scanner current Position break case Terminal Tokens Token NameWHITESPACE if first trim Left Position remove Blank Scanner current Position break case Terminal Tokens Token NameEOF expression source Start trim Left Position expression source End trim Right Position return default if we find something else than a whitespace or a comment then we reset the trim Rigth Position to the expression source end trim Right Position remove Blank Scanner current Position 1 first false catch Invalid Input Exception e ignore  trimWhiteSpacesAndComments sourceStart sourceEnd trimLeftPosition sourceStart trimRightPosition sourceEnd removeBlankScanner removeBlankScanner setSource compilationUnitSource removeBlankScanner resetTo removeBlankScanner getNextToken TerminalTokens TokenNameCOMMENT_JAVADOC TerminalTokens TokenNameCOMMENT_LINE TerminalTokens TokenNameCOMMENT_BLOCK trimLeftPosition removeBlankScanner currentPosition TerminalTokens TokenNameWHITESPACE trimLeftPosition removeBlankScanner currentPosition TerminalTokens TokenNameEOF sourceStart trimLeftPosition sourceEnd trimRightPosition trimRigthPosition trimRightPosition removeBlankScanner currentPosition InvalidInputException
private void adjust Source Positions For Parent org eclipse jdt internal compiler ast Expression expression int start expression source Start int end expression source End int left Parent Count 1 int right Parent Count 0 this scanner reset To start end try int token this scanner get Next Token expression source Start this scanner current Position boolean stop false while stop token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameLPAREN left Parent Count break case Terminal Tokens Token NameRPAREN right Parent Count if right Parent Count left Parent Count we found the matching parenthesis stop true expression source End this scanner start Position 1 catch Invalid Input Exception e ignore  adjustSourcePositionsForParent sourceStart sourceEnd leftParentCount rightParentCount resetTo getNextToken sourceStart currentPosition getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameLPAREN leftParentCount TerminalTokens TokenNameRPAREN rightParentCount rightParentCount leftParentCount sourceEnd startPosition InvalidInputException
private void retrieve Identifier And Set Positions int start int end Name name this scanner reset To start end int token try while token this scanner get Next Token Terminal Tokens Token NameEOF if token Terminal Tokens Token Name Identifier int start Name this scanner start Position int end Name this scanner current Position 1 name set Source Range start Name end Name start Name 1 return catch Invalid Input Exception e ignore  retrieveIdentifierAndSetPositions resetTo getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameIdentifier startName startPosition endName currentPosition setSourceRange startName endName startName InvalidInputException
Remove potential trailing comment by settings the source end on the closing parenthesis private void remove Trailing Comment From Expression Ending WithA Paren AST Node node int start node get Start Position this scanner reset To start start node get Length int token int paren Counter 0 try while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameLPAREN paren Counter break case Terminal Tokens Token NameRPAREN paren Counter if paren Counter 0 int end this scanner current Position 1 node set Source Range start end start 1 catch Invalid Input Exception e ignore  removeTrailingCommentFromExpressionEndingWithAParen ASTNode getStartPosition resetTo getLength parenCounter getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameLPAREN parenCounter TerminalTokens TokenNameRPAREN parenCounter parenCounter currentPosition setSourceRange InvalidInputException
Remove potential trailing comment by settings the source end on the closing parenthesis private void remove Leading And Trailing Comments From Literal AST Node node int start node get Start Position this scanner reset To start start node get Length int token int start Position 1 try while token this scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token Name Integer Literal case Terminal Tokens Token Name Floating Point Literal case Terminal Tokens Token Name Long Literal case Terminal Tokens Token Name Double Literal case Terminal Tokens Token Name Character Literal if start Position 1 start Position this scanner start Position int end this scanner current Position node set Source Range start Position end start Position return case Terminal Tokens Token NameMINUS start Position this scanner start Position break catch Invalid Input Exception e ignore  removeLeadingAndTrailingCommentsFromLiteral ASTNode getStartPosition resetTo getLength startPosition getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameIntegerLiteral TerminalTokens TokenNameFloatingPointLiteral TerminalTokens TokenNameLongLiteral TerminalTokens TokenNameDoubleLiteral TerminalTokens TokenNameCharacterLiteral startPosition startPosition startPosition currentPosition setSourceRange startPosition startPosition TerminalTokens TokenNameMINUS startPosition startPosition InvalidInputException
private void record Pending This Expression Scope Resolution This Expression this Expression if this pending This Expression Scope Resolution null this pending This Expression Scope Resolution new Hash Set this pending This Expression Scope Resolution add this Expression  recordPendingThisExpressionScopeResolution ThisExpression thisExpression pendingThisExpressionScopeResolution pendingThisExpressionScopeResolution HashSet pendingThisExpressionScopeResolution thisExpression
private void record Pending Name Scope Resolution Name name if this pending Name Scope Resolution null this pending Name Scope Resolution new Hash Set this pending Name Scope Resolution add name  recordPendingNameScopeResolution pendingNameScopeResolution pendingNameScopeResolution HashSet pendingNameScopeResolution
private void lookup For Scopes if this pending Name Scope Resolution null for Iterator iterator this pending Name Scope Resolution iterator iterator has Next Name name Name iterator next this ast get Binding Resolver record Scope name lookup Scope name if this pending This Expression Scope Resolution null for Iterator iterator this pending This Expression Scope Resolution iterator iterator has Next This Expression this Expression This Expression iterator next this ast get Binding Resolver record Scope this Expression lookup Scope this Expression  lookupForScopes pendingNameScopeResolution pendingNameScopeResolution hasNext getBindingResolver recordScope lookupScope pendingThisExpressionScopeResolution pendingThisExpressionScopeResolution hasNext ThisExpression thisExpression ThisExpression getBindingResolver recordScope thisExpression lookupScope thisExpression
private Block Scope lookup Scope AST Node node AST Node current Node node while current Node null current Node instanceof Method Declaration current Node instanceof Initializer current Node instanceof Field Declaration current Node current Node get Parent if current Node null return null if current Node instanceof Initializer Initializer initializer Initializer current Node while current Node instanceof Type Declaration current Node current Node get Parent org eclipse jdt internal compiler ast Type Declaration type Decl org eclipse jdt internal compiler ast Type Declaration this ast get Binding Resolver get Corresponding Node current Node if initializer get Modifiers Modifier STATIC 0 return type Decl static Initializer Scope else return type Decl initializer Scope else if current Node instanceof Field Declaration Field Declaration field Declaration Field Declaration current Node while current Node instanceof Type Declaration current Node current Node get Parent org eclipse jdt internal compiler ast Type Declaration type Decl org eclipse jdt internal compiler ast Type Declaration this ast get Binding Resolver get Corresponding Node current Node if field Declaration get Modifiers Modifier STATIC 0 return type Decl static Initializer Scope else return type Decl initializer Scope Abstract Method Declaration abstract Method Declaration Abstract Method Declaration this ast get Binding Resolver get Corresponding Node current Node return abstract Method Declaration scope  BlockScope lookupScope ASTNode ASTNode currentNode currentNode currentNode MethodDeclaration currentNode currentNode FieldDeclaration currentNode currentNode getParent currentNode currentNode currentNode currentNode TypeDeclaration currentNode currentNode getParent TypeDeclaration typeDecl TypeDeclaration getBindingResolver getCorrespondingNode currentNode getModifiers typeDecl staticInitializerScope typeDecl initializerScope currentNode FieldDeclaration FieldDeclaration fieldDeclaration FieldDeclaration currentNode currentNode TypeDeclaration currentNode currentNode getParent TypeDeclaration typeDecl TypeDeclaration getBindingResolver getCorrespondingNode currentNode fieldDeclaration getModifiers typeDecl staticInitializerScope typeDecl initializerScope AbstractMethodDeclaration abstractMethodDeclaration AbstractMethodDeclaration getBindingResolver getCorrespondingNode currentNode abstractMethodDeclaration
private Infix Expression Operator get Operator For int operatorID switch operatorID case org eclipse jdt internal compiler ast Operator Ids EQUAL EQUAL return Infix Expression Operator EQUALS case org eclipse jdt internal compiler ast Operator Ids LESS EQUAL return Infix Expression Operator LESS EQUALS case org eclipse jdt internal compiler ast Operator Ids GREATER EQUAL return Infix Expression Operator GREATER EQUALS case org eclipse jdt internal compiler ast Operator Ids NOT EQUAL return Infix Expression Operator NOT EQUALS case org eclipse jdt internal compiler ast Operator Ids LEFT SHIFT return Infix Expression Operator LEFT SHIFT case org eclipse jdt internal compiler ast Operator Ids RIGHT SHIFT return Infix Expression Operator RIGHT SHIFT SIGNED case org eclipse jdt internal compiler ast Operator Ids UNSIGNED RIGHT SHIFT return Infix Expression Operator RIGHT SHIFT UNSIGNED case org eclipse jdt internal compiler ast Operator Ids OR OR return Infix Expression Operator CONDITIONAL OR case org eclipse jdt internal compiler ast Operator Ids AND AND return Infix Expression Operator CONDITIONAL AND case org eclipse jdt internal compiler ast Operator Ids PLUS return Infix Expression Operator PLUS case org eclipse jdt internal compiler ast Operator Ids MINUS return Infix Expression Operator MINUS case org eclipse jdt internal compiler ast Operator Ids REMAINDER return Infix Expression Operator REMAINDER case org eclipse jdt internal compiler ast Operator Ids XOR return Infix Expression Operator XOR case org eclipse jdt internal compiler ast Operator Ids AND return Infix Expression Operator AND case org eclipse jdt internal compiler ast Operator Ids MULTIPLY return Infix Expression Operator TIMES case org eclipse jdt internal compiler ast Operator Ids OR return Infix Expression Operator OR case org eclipse jdt internal compiler ast Operator Ids DIVIDE return Infix Expression Operator DIVIDE case org eclipse jdt internal compiler ast Operator Ids GREATER return Infix Expression Operator GREATER case org eclipse jdt internal compiler ast Operator Ids LESS return Infix Expression Operator LESS return null  InfixExpression getOperatorFor OperatorIds EQUAL_EQUAL InfixExpression OperatorIds LESS_EQUAL InfixExpression LESS_EQUALS OperatorIds GREATER_EQUAL InfixExpression GREATER_EQUALS OperatorIds NOT_EQUAL InfixExpression NOT_EQUALS OperatorIds LEFT_SHIFT InfixExpression LEFT_SHIFT OperatorIds RIGHT_SHIFT InfixExpression RIGHT_SHIFT_SIGNED OperatorIds UNSIGNED_RIGHT_SHIFT InfixExpression RIGHT_SHIFT_UNSIGNED OperatorIds OR_OR InfixExpression CONDITIONAL_OR OperatorIds AND_AND InfixExpression CONDITIONAL_AND OperatorIds InfixExpression OperatorIds InfixExpression OperatorIds InfixExpression OperatorIds InfixExpression OperatorIds InfixExpression OperatorIds InfixExpression OperatorIds InfixExpression OperatorIds InfixExpression OperatorIds InfixExpression OperatorIds InfixExpression

Creates a new AST matcher instance p For backwards compatibility the matcher ignores tag elements below doc comments by default Use link AST Matcher boolean AST Matcher true for a matcher that compares doc tags by default p public AST Matcher this false  ASTMatcher ASTMatcher ASTMatcher
Creates a new AST matcher instance param match Doc Tags code true code if doc comment tags are to be compared by default and code false code otherwise see match Javadoc Object since 3 0 public AST Matcher boolean match Doc Tags this match Doc Tags match Doc Tags  matchDocTags ASTMatcher matchDocTags matchDocTags matchDocTags
Returns whether the given lists of AST nodes match pair wise according to code AST Node subtree Match code p Note that this is a convenience method useful for writing recursive subtree matchers p param list1 the first list of AST nodes element type code AST Node code param list2 the second list of AST nodes element type code AST Node code return code true code if the lists have the same number of elements and match pair wise according to code AST Node subtree Match code see AST Node subtree Match AST Matcher matcher Object other public final boolean safe Subtree List Match List list1 List list2 int size1 list1 size int size2 list2 size if size1 size2 return false for Iterator it1 list1 iterator it2 list2 iterator it1 has Next AST Node n1 AST Node it1 next AST Node n2 AST Node it2 next if n1 subtree Match this n2 return false return true  ASTNode subtreeMatch ASTNode ASTNode ASTNode subtreeMatch ASTNode subtreeMatch ASTMatcher safeSubtreeListMatch hasNext ASTNode ASTNode ASTNode ASTNode subtreeMatch
Returns whether the given nodes match according to code AST subtree Match code Returns code false code if one or the other of the nodes are code null code Returns code true code if both nodes are code null code p Note that this is a convenience method useful for writing recursive subtree matchers p param node1 the first AST node or code null code must be an instance of code AST Node code param node2 the second AST node or code null code must be an instance of code AST Node code return code true code if the nodes match according to code AST subtree Match code or both are code null code and code false code otherwise see AST Node subtree Match AST Matcher Object public final boolean safe Subtree Match Object node1 Object node2 if node1 null node2 null return true if node1 null node2 null return false N B call subtree Match even node1 node2 null return AST Node node1 subtree Match this node2  subtreeMatch ASTNode ASTNode subtreeMatch ASTNode subtreeMatch ASTMatcher safeSubtreeMatch subtreeMatch ASTNode subtreeMatch
Returns whether the given objects are equal according to code equals code Returns code false code if either node is code null code param o1 the first object or code null code param o2 the second object or code null code return code true code if the nodes are equal according to code equals code or both code null code and code false code otherwise public static boolean safe Equals Object o1 Object o2 if o1 o2 return true if o1 null o2 null return false return o1 equals o2  safeEquals
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Annotation Type Declaration node Object other if other instanceof Annotation Type Declaration return false Annotation Type Declaration o Annotation Type Declaration other node type added in JLS3 ignore old JLS2 style modifiers return safe Subtree Match node get Javadoc o get Javadoc safe Subtree List Match node modifiers o modifiers safe Subtree Match node get Name o get Name safe Subtree List Match node body Declarations o body Declarations  AnnotationTypeDeclaration AnnotationTypeDeclaration AnnotationTypeDeclaration AnnotationTypeDeclaration safeSubtreeMatch getJavadoc getJavadoc safeSubtreeListMatch safeSubtreeMatch getName getName safeSubtreeListMatch bodyDeclarations bodyDeclarations
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Annotation Type Member Declaration node Object other if other instanceof Annotation Type Member Declaration return false Annotation Type Member Declaration o Annotation Type Member Declaration other node type added in JLS3 ignore old JLS2 style modifiers return safe Subtree Match node get Javadoc o get Javadoc safe Subtree List Match node modifiers o modifiers safe Subtree Match node get Type o get Type safe Subtree Match node get Name o get Name safe Subtree Match node get Default o get Default  AnnotationTypeMemberDeclaration AnnotationTypeMemberDeclaration AnnotationTypeMemberDeclaration AnnotationTypeMemberDeclaration safeSubtreeMatch getJavadoc getJavadoc safeSubtreeListMatch safeSubtreeMatch getType getType safeSubtreeMatch getName getName safeSubtreeMatch getDefault getDefault
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Anonymous Class Declaration node Object other if other instanceof Anonymous Class Declaration return false Anonymous Class Declaration o Anonymous Class Declaration other return safe Subtree List Match node body Declarations o body Declarations  AnonymousClassDeclaration AnonymousClassDeclaration AnonymousClassDeclaration AnonymousClassDeclaration safeSubtreeListMatch bodyDeclarations bodyDeclarations
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Array Access node Object other if other instanceof Array Access return false Array Access o Array Access other return safe Subtree Match node get Array o get Array safe Subtree Match node get Index o get Index  ArrayAccess ArrayAccess ArrayAccess ArrayAccess safeSubtreeMatch getArray getArray safeSubtreeMatch getIndex getIndex
Returns whether the given node and the other object object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Array Creation node Object other if other instanceof Array Creation return false Array Creation o Array Creation other return safe Subtree Match node get Type o get Type safe Subtree List Match node dimensions o dimensions safe Subtree Match node get Initializer o get Initializer  ArrayCreation ArrayCreation ArrayCreation ArrayCreation safeSubtreeMatch getType getType safeSubtreeListMatch safeSubtreeMatch getInitializer getInitializer
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Array Initializer node Object other if other instanceof Array Initializer return false Array Initializer o Array Initializer other return safe Subtree List Match node expressions o expressions  ArrayInitializer ArrayInitializer ArrayInitializer ArrayInitializer safeSubtreeListMatch
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Array Type node Object other if other instanceof Array Type return false Array Type o Array Type other return safe Subtree Match node get Component Type o get Component Type  ArrayType ArrayType ArrayType ArrayType safeSubtreeMatch getComponentType getComponentType
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Assert Statement node Object other if other instanceof Assert Statement return false Assert Statement o Assert Statement other return safe Subtree Match node get Expression o get Expression safe Subtree Match node get Message o get Message  AssertStatement AssertStatement AssertStatement AssertStatement safeSubtreeMatch getExpression getExpression safeSubtreeMatch getMessage getMessage
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Assignment node Object other if other instanceof Assignment return false Assignment o Assignment other return node get Operator equals o get Operator safe Subtree Match node get Left Hand Side o get Left Hand Side safe Subtree Match node get Right Hand Side o get Right Hand Side  getOperator getOperator safeSubtreeMatch getLeftHandSide getLeftHandSide safeSubtreeMatch getRightHandSide getRightHandSide
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Block node Object other if other instanceof Block return false Block o Block other return safe Subtree List Match node statements o statements  safeSubtreeListMatch
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Block Comment node Object other if other instanceof Block Comment return false return true  BlockComment BlockComment
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Boolean Literal node Object other if other instanceof Boolean Literal return false Boolean Literal o Boolean Literal other return node boolean Value o boolean Value  BooleanLiteral BooleanLiteral BooleanLiteral BooleanLiteral booleanValue booleanValue
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Break Statement node Object other if other instanceof Break Statement return false Break Statement o Break Statement other return safe Subtree Match node get Label o get Label  BreakStatement BreakStatement BreakStatement BreakStatement safeSubtreeMatch getLabel getLabel
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Cast Expression node Object other if other instanceof Cast Expression return false Cast Expression o Cast Expression other return safe Subtree Match node get Type o get Type safe Subtree Match node get Expression o get Expression  CastExpression CastExpression CastExpression CastExpression safeSubtreeMatch getType getType safeSubtreeMatch getExpression getExpression
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Catch Clause node Object other if other instanceof Catch Clause return false Catch Clause o Catch Clause other return safe Subtree Match node get Exception o get Exception safe Subtree Match node get Body o get Body  CatchClause CatchClause CatchClause CatchClause safeSubtreeMatch getException getException safeSubtreeMatch getBody getBody
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Character Literal node Object other if other instanceof Character Literal return false Character Literal o Character Literal other return safe Equals node get Escaped Value o get Escaped Value  CharacterLiteral CharacterLiteral CharacterLiteral CharacterLiteral safeEquals getEscapedValue getEscapedValue
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Class Instance Creation node Object other if other instanceof Class Instance Creation return false Class Instance Creation o Class Instance Creation other int level node getAST api Level if level AST JLS2 if safe Subtree Match node get Name o get Name return false if level AST JLS3 if safe Subtree List Match node type Arguments o type Arguments return false if safe Subtree Match node get Type o get Type return false return safe Subtree Match node get Expression o get Expression safe Subtree List Match node arguments o arguments safe Subtree Match node get Anonymous Class Declaration o get Anonymous Class Declaration  ClassInstanceCreation ClassInstanceCreation ClassInstanceCreation ClassInstanceCreation apiLevel safeSubtreeMatch getName getName safeSubtreeListMatch typeArguments typeArguments safeSubtreeMatch getType getType safeSubtreeMatch getExpression getExpression safeSubtreeListMatch safeSubtreeMatch getAnonymousClassDeclaration getAnonymousClassDeclaration
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Compilation Unit node Object other if other instanceof Compilation Unit return false Compilation Unit o Compilation Unit other return safe Subtree Match node get Package o get Package safe Subtree List Match node imports o imports safe Subtree List Match node types o types  CompilationUnit CompilationUnit CompilationUnit CompilationUnit safeSubtreeMatch getPackage getPackage safeSubtreeListMatch safeSubtreeListMatch
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Conditional Expression node Object other if other instanceof Conditional Expression return false Conditional Expression o Conditional Expression other return safe Subtree Match node get Expression o get Expression safe Subtree Match node get Then Expression o get Then Expression safe Subtree Match node get Else Expression o get Else Expression  ConditionalExpression ConditionalExpression ConditionalExpression ConditionalExpression safeSubtreeMatch getExpression getExpression safeSubtreeMatch getThenExpression getThenExpression safeSubtreeMatch getElseExpression getElseExpression
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Constructor Invocation node Object other if other instanceof Constructor Invocation return false Constructor Invocation o Constructor Invocation other if node getAST api Level AST JLS3 if safe Subtree List Match node type Arguments o type Arguments return false return safe Subtree List Match node arguments o arguments  ConstructorInvocation ConstructorInvocation ConstructorInvocation ConstructorInvocation apiLevel safeSubtreeListMatch typeArguments typeArguments safeSubtreeListMatch
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Continue Statement node Object other if other instanceof Continue Statement return false Continue Statement o Continue Statement other return safe Subtree Match node get Label o get Label  ContinueStatement ContinueStatement ContinueStatement ContinueStatement safeSubtreeMatch getLabel getLabel
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Do Statement node Object other if other instanceof Do Statement return false Do Statement o Do Statement other return safe Subtree Match node get Expression o get Expression safe Subtree Match node get Body o get Body  DoStatement DoStatement DoStatement DoStatement safeSubtreeMatch getExpression getExpression safeSubtreeMatch getBody getBody
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Empty Statement node Object other if other instanceof Empty Statement return false return true  EmptyStatement EmptyStatement
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Enhanced For Statement node Object other if other instanceof Enhanced For Statement return false Enhanced For Statement o Enhanced For Statement other return safe Subtree Match node get Parameter o get Parameter safe Subtree Match node get Expression o get Expression safe Subtree Match node get Body o get Body  EnhancedForStatement EnhancedForStatement EnhancedForStatement EnhancedForStatement safeSubtreeMatch getParameter getParameter safeSubtreeMatch getExpression getExpression safeSubtreeMatch getBody getBody
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Enum Constant Declaration node Object other if other instanceof Enum Constant Declaration return false Enum Constant Declaration o Enum Constant Declaration other return safe Subtree Match node get Javadoc o get Javadoc safe Subtree List Match node modifiers o modifiers safe Subtree Match node get Name o get Name safe Subtree List Match node arguments o arguments safe Subtree List Match node body Declarations o body Declarations  EnumConstantDeclaration EnumConstantDeclaration EnumConstantDeclaration EnumConstantDeclaration safeSubtreeMatch getJavadoc getJavadoc safeSubtreeListMatch safeSubtreeMatch getName getName safeSubtreeListMatch safeSubtreeListMatch bodyDeclarations bodyDeclarations
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Enum Declaration node Object other if other instanceof Enum Declaration return false Enum Declaration o Enum Declaration other return safe Subtree Match node get Javadoc o get Javadoc safe Subtree List Match node modifiers o modifiers safe Subtree Match node get Name o get Name safe Subtree List Match node super Interface Types o super Interface Types safe Subtree List Match node body Declarations o body Declarations  EnumDeclaration EnumDeclaration EnumDeclaration EnumDeclaration safeSubtreeMatch getJavadoc getJavadoc safeSubtreeListMatch safeSubtreeMatch getName getName safeSubtreeListMatch superInterfaceTypes superInterfaceTypes safeSubtreeListMatch bodyDeclarations bodyDeclarations
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Expression Statement node Object other if other instanceof Expression Statement return false Expression Statement o Expression Statement other return safe Subtree Match node get Expression o get Expression  ExpressionStatement ExpressionStatement ExpressionStatement ExpressionStatement safeSubtreeMatch getExpression getExpression
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Field Access node Object other if other instanceof Field Access return false Field Access o Field Access other return safe Subtree Match node get Expression o get Expression safe Subtree Match node get Name o get Name  FieldAccess FieldAccess FieldAccess FieldAccess safeSubtreeMatch getExpression getExpression safeSubtreeMatch getName getName
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Field Declaration node Object other if other instanceof Field Declaration return false Field Declaration o Field Declaration other int level node getAST api Level if level AST JLS2 if node get Modifiers o get Modifiers return false if level AST JLS3 if safe Subtree List Match node modifiers o modifiers return false return safe Subtree Match node get Javadoc o get Javadoc safe Subtree Match node get Type o get Type safe Subtree List Match node fragments o fragments  FieldDeclaration FieldDeclaration FieldDeclaration FieldDeclaration apiLevel getModifiers getModifiers safeSubtreeListMatch safeSubtreeMatch getJavadoc getJavadoc safeSubtreeMatch getType getType safeSubtreeListMatch
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match For Statement node Object other if other instanceof For Statement return false For Statement o For Statement other return safe Subtree List Match node initializers o initializers safe Subtree Match node get Expression o get Expression safe Subtree List Match node updaters o updaters safe Subtree Match node get Body o get Body  ForStatement ForStatement ForStatement ForStatement safeSubtreeListMatch safeSubtreeMatch getExpression getExpression safeSubtreeListMatch safeSubtreeMatch getBody getBody
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match If Statement node Object other if other instanceof If Statement return false If Statement o If Statement other return safe Subtree Match node get Expression o get Expression safe Subtree Match node get Then Statement o get Then Statement safe Subtree Match node get Else Statement o get Else Statement  IfStatement IfStatement IfStatement IfStatement safeSubtreeMatch getExpression getExpression safeSubtreeMatch getThenStatement getThenStatement safeSubtreeMatch getElseStatement getElseStatement
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Import Declaration node Object other if other instanceof Import Declaration return false Import Declaration o Import Declaration other if node getAST api Level AST JLS3 if node is Static o is Static return false return safe Subtree Match node get Name o get Name node is On Demand o is On Demand  ImportDeclaration ImportDeclaration ImportDeclaration ImportDeclaration apiLevel isStatic isStatic safeSubtreeMatch getName getName isOnDemand isOnDemand
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Infix Expression node Object other if other instanceof Infix Expression return false Infix Expression o Infix Expression other be careful not to trigger lazy creation of extended operand lists if node has Extended Operands o has Extended Operands if safe Subtree List Match node extended Operands o extended Operands return false if node has Extended Operands o has Extended Operands return false return node get Operator equals o get Operator safe Subtree Match node get Left Operand o get Left Operand safe Subtree Match node get Right Operand o get Right Operand  InfixExpression InfixExpression InfixExpression InfixExpression hasExtendedOperands hasExtendedOperands safeSubtreeListMatch extendedOperands extendedOperands hasExtendedOperands hasExtendedOperands getOperator getOperator safeSubtreeMatch getLeftOperand getLeftOperand safeSubtreeMatch getRightOperand getRightOperand
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Instanceof Expression node Object other if other instanceof Instanceof Expression return false Instanceof Expression o Instanceof Expression other return safe Subtree Match node get Left Operand o get Left Operand safe Subtree Match node get Right Operand o get Right Operand  InstanceofExpression InstanceofExpression InstanceofExpression InstanceofExpression safeSubtreeMatch getLeftOperand getLeftOperand safeSubtreeMatch getRightOperand getRightOperand
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Initializer node Object other if other instanceof Initializer return false Initializer o Initializer other int level node getAST api Level if level AST JLS2 if node get Modifiers o get Modifiers return false if level AST JLS3 if safe Subtree List Match node modifiers o modifiers return false return safe Subtree Match node get Javadoc o get Javadoc safe Subtree Match node get Body o get Body  apiLevel getModifiers getModifiers safeSubtreeListMatch safeSubtreeMatch getJavadoc getJavadoc safeSubtreeMatch getBody getBody
Returns whether the given node and the other object match p Unlike other node types the behavior of the default implementation is controlled by a constructor supplied parameter link AST Matcher boolean AST Matcher boolean which is code false code if not specified When this parameter is code true code the implementation tests whether the other object is also a code Javadoc code with structurally isomorphic child subtrees the comment string link Javadoc get Comment Javadoc get Comment is ignored Conversely when the parameter is code false code the implementation tests whether the other object is also a code Javadoc code with exactly the same comment string the tag elements link Javadoc tags Javadoc tags are ignored Subclasses may reimplement p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code see AST Matcher see AST Matcher boolean public boolean match Javadoc node Object other if other instanceof Javadoc return false Javadoc o Javadoc other if this match Doc Tags return safe Subtree List Match node tags o tags else return compare Deprecated Comment node o  ASTMatcher ASTMatcher getComment getComment ASTMatcher ASTMatcher matchDocTags safeSubtreeListMatch compareDeprecatedComment
Return whether the deprecated comment strings of the given java doc are equals p Note the only purpose of this method is to hide deprecated warnings deprecated mark deprecated to hide deprecated usage private boolean compare Deprecated Comment Javadoc first Javadoc second if first getAST api Level AST JLS2 return safe Equals first get Comment second get Comment else return true  compareDeprecatedComment apiLevel safeEquals getComment getComment
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Labeled Statement node Object other if other instanceof Labeled Statement return false Labeled Statement o Labeled Statement other return safe Subtree Match node get Label o get Label safe Subtree Match node get Body o get Body  LabeledStatement LabeledStatement LabeledStatement LabeledStatement safeSubtreeMatch getLabel getLabel safeSubtreeMatch getBody getBody
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Line Comment node Object other if other instanceof Line Comment return false return true  LineComment LineComment
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Marker Annotation node Object other if other instanceof Marker Annotation return false Marker Annotation o Marker Annotation other return safe Subtree Match node get Type Name o get Type Name  MarkerAnnotation MarkerAnnotation MarkerAnnotation MarkerAnnotation safeSubtreeMatch getTypeName getTypeName
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Member Ref node Object other if other instanceof Member Ref return false Member Ref o Member Ref other return safe Subtree Match node get Qualifier o get Qualifier safe Subtree Match node get Name o get Name  MemberRef MemberRef MemberRef MemberRef safeSubtreeMatch getQualifier getQualifier safeSubtreeMatch getName getName
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Member Value Pair node Object other if other instanceof Member Value Pair return false Member Value Pair o Member Value Pair other return safe Subtree Match node get Name o get Name safe Subtree Match node get Value o get Value  MemberValuePair MemberValuePair MemberValuePair MemberValuePair safeSubtreeMatch getName getName safeSubtreeMatch getValue getValue
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Method Ref node Object other if other instanceof Method Ref return false Method Ref o Method Ref other return safe Subtree Match node get Qualifier o get Qualifier safe Subtree Match node get Name o get Name safe Subtree List Match node parameters o parameters  MethodRef MethodRef MethodRef MethodRef safeSubtreeMatch getQualifier getQualifier safeSubtreeMatch getName getName safeSubtreeListMatch
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Method Ref Parameter node Object other if other instanceof Method Ref Parameter return false Method Ref Parameter o Method Ref Parameter other return safe Subtree Match node get Type o get Type safe Subtree Match node get Name o get Name  MethodRefParameter MethodRefParameter MethodRefParameter MethodRefParameter safeSubtreeMatch getType getType safeSubtreeMatch getName getName
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p p Note that extra array dimensions are compared since they are an important part of the method declaration p p Note that the method return types are compared even for constructor declarations p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Method Declaration node Object other if other instanceof Method Declaration return false Method Declaration o Method Declaration other int level node getAST api Level if level AST JLS2 if node get Modifiers o get Modifiers return false if safe Subtree Match node get Return Type o get Return Type return false if level AST JLS3 if safe Subtree List Match node modifiers o modifiers return false if safe Subtree Match node get Return Type2 o get Return Type2 return false n b compare type parameters even for constructors if safe Subtree List Match node type Parameters o type Parameters return false return node is Constructor o is Constructor safe Subtree Match node get Javadoc o get Javadoc safe Subtree Match node get Name o get Name n b compare return type even for constructors safe Subtree List Match node parameters o parameters node get Extra Dimensions o get Extra Dimensions safe Subtree List Match node thrown Exceptions o thrown Exceptions safe Subtree Match node get Body o get Body  MethodDeclaration MethodDeclaration MethodDeclaration MethodDeclaration apiLevel getModifiers getModifiers safeSubtreeMatch getReturnType getReturnType safeSubtreeListMatch safeSubtreeMatch getReturnType2 getReturnType2 safeSubtreeListMatch typeParameters typeParameters isConstructor isConstructor safeSubtreeMatch getJavadoc getJavadoc safeSubtreeMatch getName getName safeSubtreeListMatch getExtraDimensions getExtraDimensions safeSubtreeListMatch thrownExceptions thrownExceptions safeSubtreeMatch getBody getBody
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Method Invocation node Object other if other instanceof Method Invocation return false Method Invocation o Method Invocation other if node getAST api Level AST JLS3 if safe Subtree List Match node type Arguments o type Arguments return false return safe Subtree Match node get Expression o get Expression safe Subtree Match node get Name o get Name safe Subtree List Match node arguments o arguments  MethodInvocation MethodInvocation MethodInvocation MethodInvocation apiLevel safeSubtreeListMatch typeArguments typeArguments safeSubtreeMatch getExpression getExpression safeSubtreeMatch getName getName safeSubtreeListMatch
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Modifier node Object other if other instanceof Modifier return false Modifier o Modifier other return node get Keyword o get Keyword  getKeyword getKeyword
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Normal Annotation node Object other if other instanceof Normal Annotation return false Normal Annotation o Normal Annotation other return safe Subtree Match node get Type Name o get Type Name safe Subtree List Match node values o values  NormalAnnotation NormalAnnotation NormalAnnotation NormalAnnotation safeSubtreeMatch getTypeName getTypeName safeSubtreeListMatch
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Null Literal node Object other if other instanceof Null Literal return false return true  NullLiteral NullLiteral
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Number Literal node Object other if other instanceof Number Literal return false Number Literal o Number Literal other return safe Equals node get Token o get Token  NumberLiteral NumberLiteral NumberLiteral NumberLiteral safeEquals getToken getToken
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Package Declaration node Object other if other instanceof Package Declaration return false Package Declaration o Package Declaration other if node getAST api Level AST JLS3 if safe Subtree Match node get Javadoc o get Javadoc return false if safe Subtree List Match node annotations o annotations return false return safe Subtree Match node get Name o get Name  PackageDeclaration PackageDeclaration PackageDeclaration PackageDeclaration apiLevel safeSubtreeMatch getJavadoc getJavadoc safeSubtreeListMatch safeSubtreeMatch getName getName
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Parameterized Type node Object other if other instanceof Parameterized Type return false Parameterized Type o Parameterized Type other return safe Subtree Match node get Type o get Type safe Subtree List Match node type Arguments o type Arguments  ParameterizedType ParameterizedType ParameterizedType ParameterizedType safeSubtreeMatch getType getType safeSubtreeListMatch typeArguments typeArguments
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Parenthesized Expression node Object other if other instanceof Parenthesized Expression return false Parenthesized Expression o Parenthesized Expression other return safe Subtree Match node get Expression o get Expression  ParenthesizedExpression ParenthesizedExpression ParenthesizedExpression ParenthesizedExpression safeSubtreeMatch getExpression getExpression
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Postfix Expression node Object other if other instanceof Postfix Expression return false Postfix Expression o Postfix Expression other return node get Operator equals o get Operator safe Subtree Match node get Operand o get Operand  PostfixExpression PostfixExpression PostfixExpression PostfixExpression getOperator getOperator safeSubtreeMatch getOperand getOperand
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Prefix Expression node Object other if other instanceof Prefix Expression return false Prefix Expression o Prefix Expression other return node get Operator equals o get Operator safe Subtree Match node get Operand o get Operand  PrefixExpression PrefixExpression PrefixExpression PrefixExpression getOperator getOperator safeSubtreeMatch getOperand getOperand
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Primitive Type node Object other if other instanceof Primitive Type return false Primitive Type o Primitive Type other return node get Primitive Type Code o get Primitive Type Code  PrimitiveType PrimitiveType PrimitiveType PrimitiveType getPrimitiveTypeCode getPrimitiveTypeCode
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Qualified Name node Object other if other instanceof Qualified Name return false Qualified Name o Qualified Name other return safe Subtree Match node get Qualifier o get Qualifier safe Subtree Match node get Name o get Name  QualifiedName QualifiedName QualifiedName QualifiedName safeSubtreeMatch getQualifier getQualifier safeSubtreeMatch getName getName
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Qualified Type node Object other if other instanceof Qualified Type return false Qualified Type o Qualified Type other return safe Subtree Match node get Qualifier o get Qualifier safe Subtree Match node get Name o get Name  QualifiedType QualifiedType QualifiedType QualifiedType safeSubtreeMatch getQualifier getQualifier safeSubtreeMatch getName getName
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Return Statement node Object other if other instanceof Return Statement return false Return Statement o Return Statement other return safe Subtree Match node get Expression o get Expression  ReturnStatement ReturnStatement ReturnStatement ReturnStatement safeSubtreeMatch getExpression getExpression
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Simple Name node Object other if other instanceof Simple Name return false Simple Name o Simple Name other return node get Identifier equals o get Identifier  SimpleName SimpleName SimpleName SimpleName getIdentifier getIdentifier
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Simple Type node Object other if other instanceof Simple Type return false Simple Type o Simple Type other return safe Subtree Match node get Name o get Name  SimpleType SimpleType SimpleType SimpleType safeSubtreeMatch getName getName
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Single Member Annotation node Object other if other instanceof Single Member Annotation return false Single Member Annotation o Single Member Annotation other return safe Subtree Match node get Type Name o get Type Name safe Subtree Match node get Value o get Value  SingleMemberAnnotation SingleMemberAnnotation SingleMemberAnnotation SingleMemberAnnotation safeSubtreeMatch getTypeName getTypeName safeSubtreeMatch getValue getValue
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p p Note that extra array dimensions and the variable arity flag are compared since they are both important parts of the declaration p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Single Variable Declaration node Object other if other instanceof Single Variable Declaration return false Single Variable Declaration o Single Variable Declaration other int level node getAST api Level if level AST JLS2 if node get Modifiers o get Modifiers return false if level AST JLS3 if safe Subtree List Match node modifiers o modifiers return false if node is Varargs o is Varargs return false return safe Subtree Match node get Type o get Type safe Subtree Match node get Name o get Name node get Extra Dimensions o get Extra Dimensions safe Subtree Match node get Initializer o get Initializer  SingleVariableDeclaration SingleVariableDeclaration SingleVariableDeclaration SingleVariableDeclaration apiLevel getModifiers getModifiers safeSubtreeListMatch isVarargs isVarargs safeSubtreeMatch getType getType safeSubtreeMatch getName getName getExtraDimensions getExtraDimensions safeSubtreeMatch getInitializer getInitializer
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match String Literal node Object other if other instanceof String Literal return false String Literal o String Literal other return safe Equals node get Escaped Value o get Escaped Value  StringLiteral StringLiteral StringLiteral StringLiteral safeEquals getEscapedValue getEscapedValue
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Super Constructor Invocation node Object other if other instanceof Super Constructor Invocation return false Super Constructor Invocation o Super Constructor Invocation other if node getAST api Level AST JLS3 if safe Subtree List Match node type Arguments o type Arguments return false return safe Subtree Match node get Expression o get Expression safe Subtree List Match node arguments o arguments  SuperConstructorInvocation SuperConstructorInvocation SuperConstructorInvocation SuperConstructorInvocation apiLevel safeSubtreeListMatch typeArguments typeArguments safeSubtreeMatch getExpression getExpression safeSubtreeListMatch
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Super Field Access node Object other if other instanceof Super Field Access return false Super Field Access o Super Field Access other return safe Subtree Match node get Name o get Name safe Subtree Match node get Qualifier o get Qualifier  SuperFieldAccess SuperFieldAccess SuperFieldAccess SuperFieldAccess safeSubtreeMatch getName getName safeSubtreeMatch getQualifier getQualifier
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Super Method Invocation node Object other if other instanceof Super Method Invocation return false Super Method Invocation o Super Method Invocation other if node getAST api Level AST JLS3 if safe Subtree List Match node type Arguments o type Arguments return false return safe Subtree Match node get Qualifier o get Qualifier safe Subtree Match node get Name o get Name safe Subtree List Match node arguments o arguments  SuperMethodInvocation SuperMethodInvocation SuperMethodInvocation SuperMethodInvocation apiLevel safeSubtreeListMatch typeArguments typeArguments safeSubtreeMatch getQualifier getQualifier safeSubtreeMatch getName getName safeSubtreeListMatch
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Switch Case node Object other if other instanceof Switch Case return false Switch Case o Switch Case other return safe Subtree Match node get Expression o get Expression  SwitchCase SwitchCase SwitchCase SwitchCase safeSubtreeMatch getExpression getExpression
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Switch Statement node Object other if other instanceof Switch Statement return false Switch Statement o Switch Statement other return safe Subtree Match node get Expression o get Expression safe Subtree List Match node statements o statements  SwitchStatement SwitchStatement SwitchStatement SwitchStatement safeSubtreeMatch getExpression getExpression safeSubtreeListMatch
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Synchronized Statement node Object other if other instanceof Synchronized Statement return false Synchronized Statement o Synchronized Statement other return safe Subtree Match node get Expression o get Expression safe Subtree Match node get Body o get Body  SynchronizedStatement SynchronizedStatement SynchronizedStatement SynchronizedStatement safeSubtreeMatch getExpression getExpression safeSubtreeMatch getBody getBody
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Tag Element node Object other if other instanceof Tag Element return false Tag Element o Tag Element other return safe Equals node get Tag Name o get Tag Name safe Subtree List Match node fragments o fragments  TagElement TagElement TagElement TagElement safeEquals getTagName getTagName safeSubtreeListMatch
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Text Element node Object other if other instanceof Text Element return false Text Element o Text Element other return safe Equals node get Text o get Text  TextElement TextElement TextElement TextElement safeEquals getText getText
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match This Expression node Object other if other instanceof This Expression return false This Expression o This Expression other return safe Subtree Match node get Qualifier o get Qualifier  ThisExpression ThisExpression ThisExpression ThisExpression safeSubtreeMatch getQualifier getQualifier
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Throw Statement node Object other if other instanceof Throw Statement return false Throw Statement o Throw Statement other return safe Subtree Match node get Expression o get Expression  ThrowStatement ThrowStatement ThrowStatement ThrowStatement safeSubtreeMatch getExpression getExpression
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Try Statement node Object other if other instanceof Try Statement return false Try Statement o Try Statement other return safe Subtree Match node get Body o get Body safe Subtree List Match node catch Clauses o catch Clauses safe Subtree Match node get Finally o get Finally  TryStatement TryStatement TryStatement TryStatement safeSubtreeMatch getBody getBody safeSubtreeListMatch catchClauses catchClauses safeSubtreeMatch getFinally getFinally
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Type Declaration node Object other if other instanceof Type Declaration return false Type Declaration o Type Declaration other int level node getAST api Level if level AST JLS2 if node get Modifiers o get Modifiers return false if safe Subtree Match node get Superclass o get Superclass return false if safe Subtree List Match node super Interfaces o super Interfaces return false if level AST JLS3 if safe Subtree List Match node modifiers o modifiers return false if safe Subtree List Match node type Parameters o type Parameters return false if safe Subtree Match node get Superclass Type o get Superclass Type return false if safe Subtree List Match node super Interface Types o super Interface Types return false return node is Interface o is Interface safe Subtree Match node get Javadoc o get Javadoc safe Subtree Match node get Name o get Name safe Subtree List Match node body Declarations o body Declarations  TypeDeclaration TypeDeclaration TypeDeclaration TypeDeclaration apiLevel getModifiers getModifiers safeSubtreeMatch getSuperclass getSuperclass safeSubtreeListMatch superInterfaces superInterfaces safeSubtreeListMatch safeSubtreeListMatch typeParameters typeParameters safeSubtreeMatch getSuperclassType getSuperclassType safeSubtreeListMatch superInterfaceTypes superInterfaceTypes isInterface isInterface safeSubtreeMatch getJavadoc getJavadoc safeSubtreeMatch getName getName safeSubtreeListMatch bodyDeclarations bodyDeclarations
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Type Declaration Statement node Object other if other instanceof Type Declaration Statement return false Type Declaration Statement o Type Declaration Statement other return safe Subtree Match node get Declaration o get Declaration  TypeDeclarationStatement TypeDeclarationStatement TypeDeclarationStatement TypeDeclarationStatement safeSubtreeMatch getDeclaration getDeclaration
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Type Literal node Object other if other instanceof Type Literal return false Type Literal o Type Literal other return safe Subtree Match node get Type o get Type  TypeLiteral TypeLiteral TypeLiteral TypeLiteral safeSubtreeMatch getType getType
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Type Parameter node Object other if other instanceof Type Parameter return false Type Parameter o Type Parameter other return safe Subtree Match node get Name o get Name safe Subtree List Match node type Bounds o type Bounds  TypeParameter TypeParameter TypeParameter TypeParameter safeSubtreeMatch getName getName safeSubtreeListMatch typeBounds typeBounds
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Variable Declaration Expression node Object other if other instanceof Variable Declaration Expression return false Variable Declaration Expression o Variable Declaration Expression other int level node getAST api Level if level AST JLS2 if node get Modifiers o get Modifiers return false if level AST JLS3 if safe Subtree List Match node modifiers o modifiers return false return safe Subtree Match node get Type o get Type safe Subtree List Match node fragments o fragments  VariableDeclarationExpression VariableDeclarationExpression VariableDeclarationExpression VariableDeclarationExpression apiLevel getModifiers getModifiers safeSubtreeListMatch safeSubtreeMatch getType getType safeSubtreeListMatch
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p p Note that extra array dimensions are compared since they are an important part of the type of the variable p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Variable Declaration Fragment node Object other if other instanceof Variable Declaration Fragment return false Variable Declaration Fragment o Variable Declaration Fragment other return safe Subtree Match node get Name o get Name node get Extra Dimensions o get Extra Dimensions safe Subtree Match node get Initializer o get Initializer  VariableDeclarationFragment VariableDeclarationFragment VariableDeclarationFragment VariableDeclarationFragment safeSubtreeMatch getName getName getExtraDimensions getExtraDimensions safeSubtreeMatch getInitializer getInitializer
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match Variable Declaration Statement node Object other if other instanceof Variable Declaration Statement return false Variable Declaration Statement o Variable Declaration Statement other int level node getAST api Level if level AST JLS2 if node get Modifiers o get Modifiers return false if level AST JLS3 if safe Subtree List Match node modifiers o modifiers return false return safe Subtree Match node get Type o get Type safe Subtree List Match node fragments o fragments  VariableDeclarationStatement VariableDeclarationStatement VariableDeclarationStatement VariableDeclarationStatement apiLevel getModifiers getModifiers safeSubtreeListMatch safeSubtreeMatch getType getType safeSubtreeListMatch
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code public boolean match While Statement node Object other if other instanceof While Statement return false While Statement o While Statement other return safe Subtree Match node get Expression o get Expression safe Subtree Match node get Body o get Body  WhileStatement WhileStatement WhileStatement WhileStatement safeSubtreeMatch getExpression getExpression safeSubtreeMatch getBody getBody
Returns whether the given node and the other object match p The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees Subclasses may override this method as needed p param node the node param other the other object or code null code return code true code if the subtree matches or code false code if they do not match or the other object has a different node type or is code null code since 3 0 public boolean match Wildcard Type node Object other if other instanceof Wildcard Type return false Wildcard Type o Wildcard Type other return node is Upper Bound o is Upper Bound safe Subtree Match node get Bound o get Bound  WildcardType WildcardType WildcardType WildcardType isUpperBound isUpperBound safeSubtreeMatch getBound getBound

Returns the node class for the corresponding node type param node Type AST node type return the corresponding code AST Node code subclass exception Illegal Argument Exception if code node Type code is not a legal AST node type see get Node Type since 3 0 public static Class node Class For Type int node Type switch node Type case ANNOTATION TYPE DECLARATION return Annotation Type Declaration class case ANNOTATION TYPE MEMBER DECLARATION return Annotation Type Member Declaration class case ANONYMOUS CLASS DECLARATION return Anonymous Class Declaration class case ARRAY ACCESS return Array Access class case ARRAY CREATION return Array Creation class case ARRAY INITIALIZER return Array Initializer class case ARRAY TYPE return Array Type class case ASSERT STATEMENT return Assert Statement class case ASSIGNMENT return Assignment class case BLOCK return Block class case BLOCK COMMENT return Block Comment class case BOOLEAN LITERAL return Boolean Literal class case BREAK STATEMENT return Break Statement class case CAST EXPRESSION return Cast Expression class case CATCH CLAUSE return Catch Clause class case CHARACTER LITERAL return Character Literal class case CLASS INSTANCE CREATION return Class Instance Creation class case COMPILATION UNIT return Compilation Unit class case CONDITIONAL EXPRESSION return Conditional Expression class case CONSTRUCTOR INVOCATION return Constructor Invocation class case CONTINUE STATEMENT return Continue Statement class case DO STATEMENT return Do Statement class case EMPTY STATEMENT return Empty Statement class case ENHANCED FOR STATEMENT return Enhanced For Statement class case ENUM CONSTANT DECLARATION return Enum Constant Declaration class case ENUM DECLARATION return Enum Declaration class case EXPRESSION STATEMENT return Expression Statement class case FIELD ACCESS return Field Access class case FIELD DECLARATION return Field Declaration class case FOR STATEMENT return For Statement class case IF STATEMENT return If Statement class case IMPORT DECLARATION return Import Declaration class case INFIX EXPRESSION return Infix Expression class case INITIALIZER return Initializer class case INSTANCEOF EXPRESSION return Instanceof Expression class case JAVADOC return Javadoc class case LABELED STATEMENT return Labeled Statement class case LINE COMMENT return Line Comment class case MARKER ANNOTATION return Marker Annotation class case MEMBER REF return Member Ref class case MEMBER VALUE PAIR return Member Value Pair class case METHOD DECLARATION return Method Declaration class case METHOD INVOCATION return Method Invocation class case METHOD REF return Method Ref class case METHOD REF PARAMETER return Method Ref Parameter class case MODIFIER return Modifier class case NORMAL ANNOTATION return Normal Annotation class case NULL LITERAL return Null Literal class case NUMBER LITERAL return Number Literal class case PACKAGE DECLARATION return Package Declaration class case PARAMETERIZED TYPE return Parameterized Type class case PARENTHESIZED EXPRESSION return Parenthesized Expression class case POSTFIX EXPRESSION return Postfix Expression class case PREFIX EXPRESSION return Prefix Expression class case PRIMITIVE TYPE return Primitive Type class case QUALIFIED NAME return Qualified Name class case QUALIFIED TYPE return Qualified Type class case RETURN STATEMENT return Return Statement class case SIMPLE NAME return Simple Name class case SIMPLE TYPE return Simple Type class case SINGLE MEMBER ANNOTATION return Single Member Annotation class case SINGLE VARIABLE DECLARATION return Single Variable Declaration class case STRING LITERAL return String Literal class case SUPER CONSTRUCTOR INVOCATION return Super Constructor Invocation class case SUPER FIELD ACCESS return Super Field Access class case SUPER METHOD INVOCATION return Super Method Invocation class case SWITCH CASE return Switch Case class case SWITCH STATEMENT return Switch Statement class case SYNCHRONIZED STATEMENT return Synchronized Statement class case TAG ELEMENT return Tag Element class case TEXT ELEMENT return Text Element class case THIS EXPRESSION return This Expression class case THROW STATEMENT return Throw Statement class case TRY STATEMENT return Try Statement class case TYPE DECLARATION return Type Declaration class case TYPE DECLARATION STATEMENT return Type Declaration Statement class case TYPE LITERAL return Type Literal class case TYPE PARAMETER return Type Parameter class case VARIABLE DECLARATION EXPRESSION return Variable Declaration Expression class case VARIABLE DECLARATION FRAGMENT return Variable Declaration Fragment class case VARIABLE DECLARATION STATEMENT return Variable Declaration Statement class case WHILE STATEMENT return While Statement class case WILDCARD TYPE return Wildcard Type class throw new Illegal Argument Exception  nodeType ASTNode IllegalArgumentException nodeType getNodeType nodeClassForType nodeType nodeType ANNOTATION_TYPE_DECLARATION AnnotationTypeDeclaration ANNOTATION_TYPE_MEMBER_DECLARATION AnnotationTypeMemberDeclaration ANONYMOUS_CLASS_DECLARATION AnonymousClassDeclaration ARRAY_ACCESS ArrayAccess ARRAY_CREATION ArrayCreation ARRAY_INITIALIZER ArrayInitializer ARRAY_TYPE ArrayType ASSERT_STATEMENT AssertStatement BLOCK_COMMENT BlockComment BOOLEAN_LITERAL BooleanLiteral BREAK_STATEMENT BreakStatement CAST_EXPRESSION CastExpression CATCH_CLAUSE CatchClause CHARACTER_LITERAL CharacterLiteral CLASS_INSTANCE_CREATION ClassInstanceCreation COMPILATION_UNIT CompilationUnit CONDITIONAL_EXPRESSION ConditionalExpression CONSTRUCTOR_INVOCATION ConstructorInvocation CONTINUE_STATEMENT ContinueStatement DO_STATEMENT DoStatement EMPTY_STATEMENT EmptyStatement ENHANCED_FOR_STATEMENT EnhancedForStatement ENUM_CONSTANT_DECLARATION EnumConstantDeclaration ENUM_DECLARATION EnumDeclaration EXPRESSION_STATEMENT ExpressionStatement FIELD_ACCESS FieldAccess FIELD_DECLARATION FieldDeclaration FOR_STATEMENT ForStatement IF_STATEMENT IfStatement IMPORT_DECLARATION ImportDeclaration INFIX_EXPRESSION InfixExpression INSTANCEOF_EXPRESSION InstanceofExpression LABELED_STATEMENT LabeledStatement LINE_COMMENT LineComment MARKER_ANNOTATION MarkerAnnotation MEMBER_REF MemberRef MEMBER_VALUE_PAIR MemberValuePair METHOD_DECLARATION MethodDeclaration METHOD_INVOCATION MethodInvocation METHOD_REF MethodRef METHOD_REF_PARAMETER MethodRefParameter NORMAL_ANNOTATION NormalAnnotation NULL_LITERAL NullLiteral NUMBER_LITERAL NumberLiteral PACKAGE_DECLARATION PackageDeclaration PARAMETERIZED_TYPE ParameterizedType PARENTHESIZED_EXPRESSION ParenthesizedExpression POSTFIX_EXPRESSION PostfixExpression PREFIX_EXPRESSION PrefixExpression PRIMITIVE_TYPE PrimitiveType QUALIFIED_NAME QualifiedName QUALIFIED_TYPE QualifiedType RETURN_STATEMENT ReturnStatement SIMPLE_NAME SimpleName SIMPLE_TYPE SimpleType SINGLE_MEMBER_ANNOTATION SingleMemberAnnotation SINGLE_VARIABLE_DECLARATION SingleVariableDeclaration STRING_LITERAL StringLiteral SUPER_CONSTRUCTOR_INVOCATION SuperConstructorInvocation SUPER_FIELD_ACCESS SuperFieldAccess SUPER_METHOD_INVOCATION SuperMethodInvocation SWITCH_CASE SwitchCase SWITCH_STATEMENT SwitchStatement SYNCHRONIZED_STATEMENT SynchronizedStatement TAG_ELEMENT TagElement TEXT_ELEMENT TextElement THIS_EXPRESSION ThisExpression THROW_STATEMENT ThrowStatement TRY_STATEMENT TryStatement TYPE_DECLARATION TypeDeclaration TYPE_DECLARATION_STATEMENT TypeDeclarationStatement TYPE_LITERAL TypeLiteral TYPE_PARAMETER TypeParameter VARIABLE_DECLARATION_EXPRESSION VariableDeclarationExpression VARIABLE_DECLARATION_FRAGMENT VariableDeclarationFragment VARIABLE_DECLARATION_STATEMENT VariableDeclarationStatement WHILE_STATEMENT WhileStatement WILDCARD_TYPE WildcardType IllegalArgumentException
Method declared on code Iterator code public boolean has Next return this position Node List this store size  hasNext NodeList
public Object next Object result Node List this store get this position this position return result  NodeList
Method declared on code Iterator code public void remove throw new Unsupported Operation Exception  UnsupportedOperationException
Adjusts this cursor to accomodate an add remove at the given index param index the position at which the element was added or removed param delta 1 for add and 1 for remove void update int index int delta if this position index the cursor has passed the added or removed element this position delta 
Creates a new empty list of nodes owned by this node This node will be the common parent of all nodes added to this list param property the property descriptor since 3 0 Node List Child List Property Descriptor property super this property Descriptor property  NodeList ChildListPropertyDescriptor propertyDescriptor
see java util Abstract Collection size public int size return this store size  AbstractCollection
see Abstract List get int public Object get int index return this store get index  AbstractList
public Object set int index Object element if element null throw new Illegal Argument Exception if AST Node this type And Flags PROTECT 0 this node is protected cannot gain or lose children throw new Illegal Argument Exception AST node cannot be modified NON NLS 1 delink old child from parent and link new child to parent AST Node new Child AST Node element AST Node old Child AST Node this store get index if old Child new Child return old Child if old Child type And Flags PROTECT 0 old child is protected cannot be unparented throw new Illegal Argument Exception AST node cannot be modified NON NLS 1 AST Node check New Child AST Node this new Child this property Descriptor cycle Risk this property Descriptor element Type AST Node this ast pre Replace Child Event AST Node this old Child new Child this property Descriptor Object result this store set index new Child n b set Parent will call ast modifying old Child set Parent null null new Child set Parent AST Node this this property Descriptor AST Node this ast post Replace Child Event AST Node this old Child new Child this property Descriptor return result  IllegalArgumentException ASTNode typeAndFlags IllegalArgumentException ASTNode newChild ASTNode ASTNode oldChild ASTNode oldChild newChild oldChild oldChild typeAndFlags IllegalArgumentException ASTNode checkNewChild ASTNode newChild propertyDescriptor cycleRisk propertyDescriptor elementType ASTNode preReplaceChildEvent ASTNode oldChild newChild propertyDescriptor newChild setParent oldChild setParent newChild setParent ASTNode propertyDescriptor ASTNode postReplaceChildEvent ASTNode oldChild newChild propertyDescriptor
public void add int index Object element if element null throw new Illegal Argument Exception if AST Node this type And Flags PROTECT 0 this node is protected cannot gain or lose children throw new Illegal Argument Exception AST node cannot be modified NON NLS 1 link new child to parent AST Node new Child AST Node element AST Node check New Child AST Node this new Child this property Descriptor cycle Risk this property Descriptor element Type AST Node this ast pre Add Child Event AST Node this new Child this property Descriptor this store add index element update Cursors index 1 n b set Parent will call ast modifying new Child set Parent AST Node this this property Descriptor AST Node this ast post Add Child Event AST Node this new Child this property Descriptor  IllegalArgumentException ASTNode typeAndFlags IllegalArgumentException ASTNode newChild ASTNode ASTNode checkNewChild ASTNode newChild propertyDescriptor cycleRisk propertyDescriptor elementType ASTNode preAddChildEvent ASTNode newChild propertyDescriptor updateCursors setParent newChild setParent ASTNode propertyDescriptor ASTNode postAddChildEvent ASTNode newChild propertyDescriptor
public Object remove int index if AST Node this type And Flags PROTECT 0 this node is protected cannot gain or lose children throw new Illegal Argument Exception AST node cannot be modified NON NLS 1 delink old child from parent AST Node old Child AST Node this store get index if old Child type And Flags PROTECT 0 old child is protected cannot be unparented throw new Illegal Argument Exception AST node cannot be modified NON NLS 1 AST Node this ast pre Remove Child Event AST Node this old Child this property Descriptor n b set Parent will call ast modifying old Child set Parent null null Object result this store remove index update Cursors index 1 AST Node this ast post Remove Child Event AST Node this old Child this property Descriptor return result  ASTNode typeAndFlags IllegalArgumentException ASTNode oldChild ASTNode oldChild typeAndFlags IllegalArgumentException ASTNode preRemoveChildEvent ASTNode oldChild propertyDescriptor setParent oldChild setParent updateCursors ASTNode postRemoveChildEvent ASTNode oldChild propertyDescriptor
Allocate a cursor to use for a visit The client must call code release Cursor code when done p This method is internally synchronized on this Node List It is thread safe to create a cursor p return a new cursor positioned before the first element of the list Cursor new Cursor synchronized this serialize cursor management on this Node List if this cursors null convert null to empty list this cursors new Array List 1 Cursor result new Cursor this cursors add result return result  releaseCursor NodeList newCursor NodeList ArrayList
Releases the given cursor at the end of a visit p This method is internally synchronized on this Node List It is thread safe to release a cursor p param cursor the cursor void release Cursor Cursor cursor synchronized this serialize cursor management on this Node List this cursors remove cursor if this cursors is Empty important convert empty list back to null otherwise the node will hang on to needless junk this cursors null  NodeList releaseCursor NodeList isEmpty
Adjusts all cursors to accomodate an add remove at the given index p This method is only used when the list is being modified The AST is not thread safe if any of the clients are modifying it p param index the position at which the element was added or removed param delta 1 for add and 1 for remove private void update Cursors int index int delta if this cursors null there are no cursors to worry about return for Iterator it this cursors iterator it has Next Cursor c Cursor it next c update index delta  updateCursors hasNext
Returns an estimate of the memory footprint of this node list instance in bytes ul li 1 object header for the Node List instance li li 5 4 byte fields of the Node List instance li li 0 for cursors since null unless walk in progress li li 1 object header for the Array List instance li li 2 4 byte fields of the Array List instance li li 1 object header for an Object instance li li 4 bytes in array for each element li ul return the size of this node list in bytes int mem Size int result HEADERS 5 4 result HEADERS 2 4 result HEADERS 4 size return result  NodeList NodeList ArrayList ArrayList memSize
Returns an estimate of the memory footprint in bytes of this node list and all its subtrees return the size of this list of subtrees in bytes int list Size int result mem Size for Iterator it iterator it has Next AST Node child AST Node it next result child tree Size return result  listSize memSize hasNext ASTNode ASTNode treeSize
Creates a new AST node owned by the given AST Once established the relationship between an AST node and its owning AST does not change over the lifetime of the node The new node has no parent node and no properties p N B This constructor is package private all subclasses my be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node AST Node AST ast if ast null throw new Illegal Argument Exception this ast ast set Node Type get Node Type0 set Flags ast get Default Node Flag set Flags calls modifying  ASTNode IllegalArgumentException setNodeType getNodeType0 setFlags getDefaultNodeFlag setFlags
Returns this node s AST p Note that the relationship between an AST node and its owing AST does not change over the lifetime of a node p return the AST that owns this node public final AST getAST return this ast 
Returns this node s parent node or code null code if this is the root node p Note that the relationship between an AST node and its parent node may change over the lifetime of a node p return the parent of this node or code null code if none public final AST Node get Parent return this parent  ASTNode getParent
Returns the location of this node within its parent or code null code if this is a root node p pre AST Node node AST Node parent node get Parent Structural Property Descriptor location node get Location In Parent assert parent null location null if location null location is Child Property assert parent get Structural Property location node if location null location is Child List Property assert List parent get Structural Property location contains node pre p p Note that the relationship between an AST node and its parent node may change over the lifetime of a node p return the location of this node in its parent or code null code if this node has no parent since 3 0 public final Structural Property Descriptor get Location In Parent return this location  ASTNode ASTNode getParent StructuralPropertyDescriptor getLocationInParent isChildProperty getStructuralProperty isChildListProperty getStructuralProperty StructuralPropertyDescriptor getLocationInParent
Returns the root node at or above this node returns this node if it is a root return the root node at or above this node public final AST Node get Root AST Node candidate this while true AST Node p candidate get Parent if p null candidate has no parent that s the guy return candidate candidate p  ASTNode getRoot ASTNode ASTNode getParent
Returns the value of the given structural property for this node The value returned depends on the kind of property ul li link Simple Property Descriptor the value of the given simple property or code null code if none primitive values are boxed li li link Child Property Descriptor the child node type code AST Node code or code null code if none li li link Child List Property Descriptor the list element type link AST Node li ul param property the property return the value or code null code if none exception Runtime Exception if this node does not have the given property since 3 0 public final Object get Structural Property Structural Property Descriptor property if property instanceof Simple Property Descriptor Simple Property Descriptor p Simple Property Descriptor property if p get Value Type int class int result internal Get Set Int Property p true 0 return new Integer result else if p get Value Type boolean class boolean result internal Get Set Boolean Property p true false return Boolean value Of result else return internal Get Set Object Property p true null if property instanceof Child Property Descriptor return internal Get Set Child Property Child Property Descriptor property true null if property instanceof Child List Property Descriptor return internal Get Child List Property Child List Property Descriptor property throw new Illegal Argument Exception  SimplePropertyDescriptor ChildPropertyDescriptor ASTNode ChildListPropertyDescriptor ASTNode RuntimeException getStructuralProperty StructuralPropertyDescriptor SimplePropertyDescriptor SimplePropertyDescriptor SimplePropertyDescriptor getValueType internalGetSetIntProperty getValueType internalGetSetBooleanProperty valueOf internalGetSetObjectProperty ChildPropertyDescriptor internalGetSetChildProperty ChildPropertyDescriptor ChildListPropertyDescriptor internalGetChildListProperty ChildListPropertyDescriptor IllegalArgumentException
Sets the value of the given structural property for this node The value passed depends on the kind of property ul li link Simple Property Descriptor the new value of the given simple property or code null code if none primitive values are boxed li li link Child Property Descriptor the new child node type code AST Node code or code null code if none li li link Child List Property Descriptor not allowed li ul param property the property param value the property value exception Runtime Exception if this node does not have the given property or if the given property cannot be set since 3 0 public final void set Structural Property Structural Property Descriptor property Object value if property instanceof Simple Property Descriptor Simple Property Descriptor p Simple Property Descriptor property if p get Value Type int class int arg Integer value int Value internal Get Set Int Property p false arg return else if p get Value Type boolean class boolean arg Boolean value boolean Value internal Get Set Boolean Property p false arg return else if value null p is Mandatory throw new Illegal Argument Exception internal Get Set Object Property p false value return if property instanceof Child Property Descriptor Child Property Descriptor p Child Property Descriptor property AST Node child AST Node value if child null p is Mandatory throw new Illegal Argument Exception internal Get Set Child Property p false child return if property instanceof Child List Property Descriptor throw new Illegal Argument Exception Cannot set the list of child list property NON NLS 1  SimplePropertyDescriptor ChildPropertyDescriptor ASTNode ChildListPropertyDescriptor RuntimeException setStructuralProperty StructuralPropertyDescriptor SimplePropertyDescriptor SimplePropertyDescriptor SimplePropertyDescriptor getValueType intValue internalGetSetIntProperty getValueType booleanValue internalGetSetBooleanProperty isMandatory IllegalArgumentException internalGetSetObjectProperty ChildPropertyDescriptor ChildPropertyDescriptor ChildPropertyDescriptor ASTNode ASTNode isMandatory IllegalArgumentException internalGetSetChildProperty ChildListPropertyDescriptor IllegalArgumentException
Sets the value of the given int valued property for this node The default implementation of this method throws an exception explaining that this node does not have such a property This method should be extended in subclasses that have at leasy one simple property whose value type is int param property the property param get code true code for a get operation and code false code for a set operation param value the new property value ignored for get operations return the value always returns code 0 code for set operations exception Runtime Exception if this node does not have the given property or if the given value cannot be set as specified since 3 0 int internal Get Set Int Property Simple Property Descriptor property boolean get int value throw new Runtime Exception Node does not have this property NON NLS 1  RuntimeException internalGetSetIntProperty SimplePropertyDescriptor RuntimeException
Sets the value of the given boolean valued property for this node The default implementation of this method throws an exception explaining that this node does not have such a property This method should be extended in subclasses that have at leasy one simple property whose value type is boolean param property the property param get code true code for a get operation and code false code for a set operation param value the new property value ignored for get operations return the value always returns code false code for set operations exception Runtime Exception if this node does not have the given property or if the given value cannot be set as specified since 3 0 boolean internal Get Set Boolean Property Simple Property Descriptor property boolean get boolean value throw new Runtime Exception Node does not have this property NON NLS 1  RuntimeException internalGetSetBooleanProperty SimplePropertyDescriptor RuntimeException
Sets the value of the given property for this node The default implementation of this method throws an exception explaining that this node does not have such a property This method should be extended in subclasses that have at leasy one simple property whose value type is a reference type param property the property param get code true code for a get operation and code false code for a set operation param value the new property value or code null code if none ignored for get operations return the value or code null code if none always returns code null code for set operations exception Runtime Exception if this node does not have the given property or if the given value cannot be set as specified since 3 0 Object internal Get Set Object Property Simple Property Descriptor property boolean get Object value throw new Runtime Exception Node does not have this property NON NLS 1  RuntimeException internalGetSetObjectProperty SimplePropertyDescriptor RuntimeException
Sets the child value of the given property for this node The default implementation of this method throws an exception explaining that this node does not have such a property This method should be extended in subclasses that have at leasy one child property param property the property param get code true code for a get operation and code false code for a set operation param child the new child value or code null code if none always code null code for get operations return the child or code null code if none always returns code null code for set operations exception Runtime Exception if this node does not have the given property or if the given child cannot be set as specified since 3 0 AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child throw new Runtime Exception Node does not have this property NON NLS 1  RuntimeException ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode RuntimeException
Returns the list value of the given property for this node The default implementation of this method throws an exception explaining that this noed does not have such a property This method should be extended in subclasses that have at leasy one child list property param property the property return the list element type link AST Node exception Runtime Exception if the given node does not have the given property since 3 0 List internal Get Child List Property Child List Property Descriptor property throw new Runtime Exception Node does not have this property NON NLS 1  ASTNode RuntimeException internalGetChildListProperty ChildListPropertyDescriptor RuntimeException
Returns a list of structural property descriptors for nodes of the same type as this node Clients must not modify the result p Note that property descriptors are a meta level mechanism for manipulating AST Nodes in a generic way They are unrelated to code get set Property code p return a list of property descriptors element type link Structural Property Descriptor since 3 0 public final List structural Properties For Type return internal Structural Properties For Type this ast api Level  ASTNodes setProperty StructuralPropertyDescriptor structuralPropertiesForType internalStructuralPropertiesForType apiLevel
Returns a list of property descriptors for this node type Clients must not modify the result This abstract method must be implemented in each concrete AST node type p N B This method is package private so that the implementations of this method in each of the concrete AST node types do not clutter up the API doc p param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0  apiLevel StructuralPropertyDescriptor
Internal helper method that starts the building a list of property descriptors for the given node type param node Class the class for a concrete node type static void create Property List Class node Class tempPDL new Array List 5 stuff node Class at head of list for future ref tempPDL add node Class  nodeClass createPropertyList nodeClass ArrayList nodeClass nodeClass
Internal helper method that adding a property descriptor param property the structural property descriptor static void add Property Structural Property Descriptor property Class node Class Class tempPDL get 0 if property get Node Class node Class easily made cut and paste mistake throw new Runtime Exception Structural property descriptor has wrong node class NON NLS 1 tempPDL add property  addProperty StructuralPropertyDescriptor nodeClass getNodeClass nodeClass RuntimeException
Internal helper method that completes the building of a node type s structural property descriptor list return unmodifiable list of structural property descriptors element type code Structural Property Descriptor code static List reap Property List tempPDL remove 0 remove node Class compact Array List a new Array List tempPDL size a add All tempPDL clear global tempPDL null return Collections unmodifiable List a  StructuralPropertyDescriptor reapPropertyList nodeClass ArrayList ArrayList addAll unmodifiableList
Checks that this AST operation is not used when building JLS2 level AS Ts exception Unsupported Operation Exception since 3 0 final void unsupported In2 if this ast api Level AST JLS2 throw new Unsupported Operation Exception Operation not supported in JLS2 AST NON NLS 1  ASTs UnsupportedOperationException unsupportedIn2 apiLevel UnsupportedOperationException
Checks that this AST operation is only used when building JLS2 level AS Ts exception Unsupported Operation Exception since 3 0 final void supported Only In2 if this ast api Level AST JLS2 throw new Unsupported Operation Exception Operation only supported in JLS2 AST NON NLS 1  ASTs UnsupportedOperationException supportedOnlyIn2 apiLevel UnsupportedOperationException
Sets or clears this node s parent node and location p Note that this method is package private The pointer from a node to its parent is set implicitly as a side effect of inserting or removing the node as a child of another node This method calls code ast modifying code p param parent the new parent of this node or code null code if none param property the location of this node in its parent or code null code if code parent code is code null code see get Location In Parent see get Parent since 3 0 final void set Parent AST Node parent Structural Property Descriptor property this ast modifying this parent parent this location property  getLocationInParent getParent setParent ASTNode StructuralPropertyDescriptor
Removes this node from its parent Has no effect if this node is unparented If this node appears as an element of a child list property of its parent then this node is removed from the list using code List remove code If this node appears as the value of a child property of its parent then this node is detached from its parent by passing code null code to the appropriate setter method this operation fails if this node is in a mandatory property since 3 0 public final void delete Structural Property Descriptor p get Location In Parent if p null node is unparented return if p is Child Property get Parent set Structural Property this location null return if p is Child List Property List l List get Parent get Structural Property this location l remove this  StructuralPropertyDescriptor getLocationInParent isChildProperty getParent setStructuralProperty isChildListProperty getParent getStructuralProperty
Checks whether the given new child node is a node in a different AST from its parent to be whether it is already has a parent whether adding it to its parent to be would create a cycle and whether the child is of the right type The parent to be is the enclosing instance param node the parent to be node param new Child the new child of the parent param cycle Check code true code if cycles are possible and need to be checked code false code if cycles are impossible and do not need to be checked param node Type a type constraint on child nodes or code null code if no special check is required exception Illegal Argument Exception if ul li the child is null li li the node belongs to a different AST li li the child has the incorrect node type li li the node already has a parent li li a cycle in would be created li ul static void check New Child AST Node node AST Node new Child boolean cycle Check Class node Type if new Child ast node ast new child is from a different AST throw new Illegal Argument Exception if new Child get Parent null new child currently has a different parent throw new Illegal Argument Exception if cycle Check new Child node get Root inserting new child would create a cycle throw new Illegal Argument Exception Class child Class new Child get Class if node Type null node Type is Assignable From child Class new child is not of the right type throw new Class Cast Exception if new Child type And Flags PROTECT 0 new child node is protected cannot be parented throw new Illegal Argument Exception AST node cannot be modified NON NLS 1  newChild cycleCheck nodeType IllegalArgumentException checkNewChild ASTNode ASTNode newChild cycleCheck nodeType newChild IllegalArgumentException newChild getParent IllegalArgumentException cycleCheck newChild getRoot IllegalArgumentException childClass newChild getClass nodeType nodeType isAssignableFrom childClass ClassCastException newChild typeAndFlags IllegalArgumentException
Prelude portion of the 3 step program for replacing the old child of this node with another node Here is the code pattern found in all AST node subclasses pre AST Node old Child this foo pre Replace Child old Child new Foo FOO PROPERTY this foo new Foo post Replace Child old Child new Foo FOO PROPERTY pre The first part pre Replace Child does all the precondition checks reports pre delete events and changes parent links The old child is delinked from its parent making it a root node and the new child node is linked to its parent The new child node must be a root node in the same AST as its new parent and must not be an ancestor of this node All three nodes must be modifiable not PROTECTED The replace operation must fail atomically so it is crucial that all precondition checks be done before any linking and delinking happens The final part post Replace Child reports post add events p This method calls code ast modifying code for the nodes affected p param old Child the old child of this node or code null code if there was no old child to replace param new Child the new child of this node or code null code if there is no replacement child param property the property descriptor of this node describing the relationship between node and child exception Runtime Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li li any of the nodes involved are unmodifiable li ul since 3 0 final void pre Replace Child AST Node old Child AST Node new Child Child Property Descriptor property if this type And Flags PROTECT 0 this node is protected cannot gain or lose children throw new Illegal Argument Exception AST node cannot be modified NON NLS 1 if new Child null check New Child this new Child property cycle Risk null delink old child from parent if old Child null if old Child type And Flags PROTECT 0 old child node is protected cannot be unparented throw new Illegal Argument Exception AST node cannot be modified NON NLS 1 if new Child null this ast pre Replace Child Event this old Child new Child property else this ast pre Remove Child Event this old Child property old Child set Parent null null else if new Child null this ast pre Add Child Event this new Child property link new child to parent if new Child null new Child set Parent this property cannot notify post Add Child Event until parent is linked to child too  ASTNode oldChild preReplaceChild oldChild newFoo FOO_PROPERTY newFoo postReplaceChild oldChild newFoo FOO_PROPERTY preReplaceChild postReplaceChild oldChild newChild RuntimeException preReplaceChild ASTNode oldChild ASTNode newChild ChildPropertyDescriptor typeAndFlags IllegalArgumentException newChild checkNewChild newChild cycleRisk oldChild oldChild typeAndFlags IllegalArgumentException newChild preReplaceChildEvent oldChild newChild preRemoveChildEvent oldChild oldChild setParent newChild preAddChildEvent newChild newChild newChild setParent postAddChildEvent
Postlude portion of the 3 step program for replacing the old child of this node with another node See link pre Replace Child AST Node AST Node Child Property Descriptor for details since 3 0 final void post Replace Child AST Node old Child AST Node new Child Child Property Descriptor property link new child to parent if new Child null if old Child null this ast post Replace Child Event this old Child new Child property else this ast post Add Child Event this new Child property else this ast post Remove Child Event this old Child property  preReplaceChild ASTNode ASTNode ChildPropertyDescriptor postReplaceChild ASTNode oldChild ASTNode newChild ChildPropertyDescriptor newChild oldChild postReplaceChildEvent oldChild newChild postAddChildEvent newChild postRemoveChildEvent oldChild
Prelude portion of the 3 step program for changing the value of a simple property of this node Here is the code pattern found in all AST node subclasses pre pre Value Change FOO PROPERTY this foo new Foo post Value Change FOO PROPERTY pre The first part pre Value Change does the precondition check to make sure the node is modifiable not PROTECTED The change operation must fail atomically so it is crucial that the precondition checks are done before the field is hammered The final part post Value Change reports post change events p This method calls code ast modifying code for the node affected p param property the property descriptor of this node exception Runtime Exception if ul li this node is unmodifiable li ul since 3 0 final void pre Value Change Simple Property Descriptor property if this type And Flags PROTECT 0 this node is protected cannot change valure of properties throw new Illegal Argument Exception AST node cannot be modified NON NLS 1 this ast pre Value Change Event this property this ast modifying  preValueChange FOO_PROPERTY newFoo postValueChange FOO_PROPERTY preValueChange postValueChange RuntimeException preValueChange SimplePropertyDescriptor typeAndFlags IllegalArgumentException preValueChangeEvent
Postlude portion of the 3 step program for replacing the old child of this node with another node See link pre Value Change Simple Property Descriptor for details since 3 0 final void post Value Change Simple Property Descriptor property this ast post Value Change Event this property  preValueChange SimplePropertyDescriptor postValueChange SimplePropertyDescriptor postValueChangeEvent
Ensures that this node is modifiable that is not marked PROTECTED If successful calls ast modifying exception Runtime Exception is not modifiable final void check Modifiable if this type And Flags PROTECT 0 throw new Illegal Argument Exception AST node cannot be modified NON NLS 1 this ast modifying  RuntimeException checkModifiable typeAndFlags IllegalArgumentException
Begin lazy initialization of this node Here is the code pattern found in all AST node subclasses pre if this foo null lazy init must be thread safe for readers synchronized this if this foo null pre Lazy Init this foo code to create new node post Lazy Init this foo FOO PROPERTY pre since 3 0 final void pre Lazy Init IMPORTANT this method is called by readers AST Node this is locked at this point this ast disable Events will turn events back on in post Lasy Init  preLazyInit postLazyInit FOO_PROPERTY preLazyInit ASTNode disableEvents postLasyInit
End lazy initialization of this node param new Child the new child of this node or code null code if there is no replacement child param property the property descriptor of this node describing the relationship between node and child since 3 0 final void post Lazy Init AST Node new Child Child Property Descriptor property IMPORTANT this method is called by readers AST Node this is locked at this point new Child is brand new so no chance of concurrent access new Child set Parent this property turn events back on they were turned off in corresponding pre Lazy Init this ast reenable Events  newChild postLazyInit ASTNode newChild ChildPropertyDescriptor ASTNode newChild newChild setParent preLazyInit reenableEvents
Returns the named property of this node or code null code if none param property Name the property name return the property value or code null code if none see set Property String Object public final Object get Property String property Name if property Name null throw new Illegal Argument Exception if this property1 null node has no properties at all return null if this property1 instanceof String node has only a single property if property Name equals this property1 return this property2 else return null otherwise node has table of properties Map m Map this property1 return m get property Name  propertyName setProperty getProperty propertyName propertyName IllegalArgumentException propertyName propertyName
Sets the named property of this node to the given value or to code null code to clear it p Clients should employ property names that are sufficiently unique to avoid inadvertent conflicts with other clients that might also be setting properties on the same node p p Note that modifying a property is not considered a modification to the AST itself This is to allow clients to decorate existing nodes with their own properties without jeopardizing certain things like the validity of bindings which rely on the underlying tree remaining static p param property Name the property name param data the new property value or code null code if none see get Property String public final void set Property String property Name Object data if property Name null throw new Illegal Argument Exception N B DO NOT CALL ast modifying if this property1 null node has no properties at all if data null we already know this return node gets its fist property this property1 property Name this property2 data return if this property1 instanceof String node has only a single property if property Name equals this property1 we re in luck this property2 data if data null just deleted last property this property1 null this property2 null return if data null we already know this return node already has one property getting its second convert to more flexible representation Hash Map m new Hash Map 2 m put this property1 this property2 m put property Name data this property1 m this property2 null return node has two or more properties Hash Map m Hash Map this property1 if data null m remove property Name check for just one property left if m size 1 convert to more efficient representation Map Entry entries Map Entry m entry Set to Array new Map Entry 1 this property1 entries 0 get Key this property2 entries 0 get Value return else m put property Name data still has two or more properties return  propertyName getProperty setProperty propertyName propertyName IllegalArgumentException propertyName propertyName HashMap HashMap propertyName HashMap HashMap propertyName entrySet toArray getKey getValue propertyName
Returns an unmodifiable table of the properties of this node with non code null code values return the table of property values keyed by property name key type code String code value type code Object code public final Map properties if this property1 null node has no properties at all return UNMODIFIABLE EMPTY MAP if this property1 instanceof String node has a single property return Collections singleton Map this property1 this property2 node has two or more properties if this property2 null this property2 Collections unmodifiable Map Map this property1 property2 is unmodifiable wrapper for map in property1 return Map this property2  UNMODIFIABLE_EMPTY_MAP singletonMap unmodifiableMap
Returns the flags associated with this node p No flags are associated with newly created nodes p p The flags are the bitwise or of individual flags The following flags are currently defined ul li link MALFORMED indicates node is syntactically malformed li li link ORIGINAL indicates original node created by AST Parser li li link PROTECT indicates node is protected from further modification li ul Other bit positions are reserved for future use p return the bitwise or of individual flags see set Flags int public final int get Flags return this type And Flags 0xFFFF  ASTParser setFlags getFlags typeAndFlags
Sets the flags associated with this node to the given value p The flags are the bitwise or of individual flags The following flags are currently defined ul li link MALFORMED indicates node is syntactically malformed li li link ORIGINAL indicates original node created by AST Parser li li link PROTECT indicates node is protected from further modification li ul Other bit positions are reserved for future use p p Note that the flags are em not em considered a structural property of the node and can be changed even if the node is marked as protected p param flags the bitwise or of individual flags see get Flags public final void set Flags int flags this ast modifying int old this type And Flags 0xFFFF0000 this type And Flags old flags 0xFFFF  ASTParser getFlags setFlags typeAndFlags typeAndFlags
Returns an integer value identifying the type of this concrete AST node The values are small positive integers suitable for use in switch statements p For each concrete node type there is a unique node type constant name and value The unique node type constant for a concrete node type such as code Cast Expression code is code AST Node CAST EXPRESSION code p return one of the node type constants public final int get Node Type return this type And Flags 16  CastExpression ASTNode CAST_EXPRESSION getNodeType typeAndFlags
Sets the integer value identifying the type of this concrete AST node The values are small positive integers suitable for use in switch statements param node Type one of the node type constants private void set Node Type int node Type int old this type And Flags 0xFFFF0000 this type And Flags old node Type 16  nodeType setNodeType nodeType typeAndFlags typeAndFlags nodeType
Returns an integer value identifying the type of this concrete AST node p This internal method is implemented in each of the concrete node subclasses p return one of the node type constants 
The code AST Node code implementation of this code Object code method uses object identity Use code subtree Match code to compare two subtrees for equality param obj inherit Doc return inherit Doc see subtree Match AST Matcher matcher Object other public final boolean equals Object obj return this obj equivalent to Object equals  ASTNode subtreeMatch inheritDoc inheritDoc subtreeMatch ASTMatcher
Returns whether the subtree rooted at the given node matches the given other object as decided by the given matcher param matcher the matcher param other the other object or code null code return code true code if the subtree matches or code false code if they do not match public final boolean subtree Match AST Matcher matcher Object other return subtree Match0 matcher other  subtreeMatch ASTMatcher subtreeMatch0
Returns whether the subtree rooted at the given node matches the given other object as decided by the given matcher p This internal method is implemented in each of the concrete node subclasses p param matcher the matcher param other the other object or code null code return code true code if the subtree matches or code false code if they do not match 
Returns a deep copy of the subtree of AST nodes rooted at the given node The resulting nodes are owned by the given AST which may be different from the AS Ts of the given node Even if the given node has a parent the result node will be unparented p Source range information on the original nodes is automatically copied to the new nodes Client properties code properties code are not carried over p p The node s code AST code and the target code AST code must support the same API level p param target the AST that is to own the nodes in the result param node the node to copy or code null code if none return the copied node or code null code if code node code is code null code public static AST Node copy Subtree AST target AST Node node if node null return null if target null throw new Illegal Argument Exception if target api Level node getAST api Level throw new Unsupported Operation Exception AST Node new Node node clone target return new Node  ASTs ASTNode copySubtree ASTNode IllegalArgumentException apiLevel apiLevel UnsupportedOperationException ASTNode newNode newNode
Returns a deep copy of the subtrees of AST nodes rooted at the given list of nodes The resulting nodes are owned by the given AST which may be different from the AS Ts of the nodes in the list Even if the nodes in the list have parents the nodes in the result will be unparented p Source range information on the original nodes is automatically copied to the new nodes Client properties code properties code are not carried over p param target the AST that is to own the nodes in the result param nodes the list of nodes to copy element type code AST Node code return the list of copied subtrees element type code AST Node code public static List copy Subtrees AST target List nodes List result new Array List nodes size for Iterator it nodes iterator it has Next AST Node old Node AST Node it next AST Node new Node old Node clone target result add new Node return result  ASTs ASTNode ASTNode copySubtrees ArrayList hasNext ASTNode oldNode ASTNode ASTNode newNode oldNode newNode
Returns a deep copy of the subtree of AST nodes rooted at this node The resulting nodes are owned by the given AST which may be different from the AST of this node Even if this node has a parent the result node will be unparented p This method reports pre and post clone events and dispatches to code clone0 AST code which is reimplemented in node subclasses p param target the AST that is to own the nodes in the result return the root node of the copies subtree final AST Node clone AST target this ast pre Clone Node Event this AST Node c this clone0 target this ast post Clone Node Event this c return c  ASTNode preCloneNodeEvent ASTNode postCloneNodeEvent
Returns a deep copy of the subtree of AST nodes rooted at this node The resulting nodes are owned by the given AST which may be different from the AST of this node Even if this node has a parent the result node will be unparented p This method must be implemented in subclasses p p This method does not report pre and post clone events All callers should instead call code clone AST code to ensure that pre and post clone events are reported p p N B This method is package private so that the implementations of this method in each of the concrete AST node types do not clutter up the API doc p param target the AST that is to own the nodes in the result return the root node of the copies subtree 
Accepts the given visitor on a visit of the current node param visitor the visitor object exception Illegal Argument Exception if the visitor is null public final void accept AST Visitor visitor if visitor null throw new Illegal Argument Exception begin with the generic pre visit visitor pre Visit this dynamic dispatch to internal method for type specific visit end Visit accept0 visitor end with the generic post visit visitor post Visit this  IllegalArgumentException ASTVisitor IllegalArgumentException preVisit endVisit postVisit
Accepts the given visitor on a type specific visit of the current node This method must be implemented in all concrete AST node types p General template for implementation on each concrete AST Node class pre code boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Property1 accept Children visitor raw List Property accept Child visitor get Property2 visitor end Visit this code pre Note that the caller code accept code take cares of invoking code visitor pre Visit this code and code visitor post Visit this code p param visitor the visitor object  ASTNode visitChildren visitChildren acceptChild getProperty1 acceptChildren rawListProperty acceptChild getProperty2 endVisit preVisit postVisit
Accepts the given visitor on a visit of the current node p This method should be used by the concrete implementations of code accept0 code to traverse optional properties Equivalent to code child accept visitor code if code child code is not code null code p param visitor the visitor object param child the child AST node to dispatch too or code null code if none final void accept Child AST Visitor visitor AST Node child if child null return child accept visitor  acceptChild ASTVisitor ASTNode
Accepts the given visitor on a visit of the given live list of child nodes p This method must be used by the concrete implementations of code accept code to traverse list values properties it encapsulates the proper handling of on the fly changes to the list p param visitor the visitor object param children the child AST node to dispatch too or code null code if none final void accept Children AST Visitor visitor AST Node Node List children use a cursor to keep track of where we are up to the list may be changing under foot Node List Cursor cursor children new Cursor try while cursor has Next AST Node child AST Node cursor next child accept visitor finally children release Cursor cursor  acceptChildren ASTVisitor ASTNode NodeList NodeList newCursor hasNext ASTNode ASTNode releaseCursor
Returns the character index into the original source file indicating where the source fragment corresponding to this node begins p The parser supplies useful well defined source ranges to the nodes it creates See link AST Parser for details on precisely where source ranges begin and end p return the 0 based character index or code 1 code if no source position information is recorded for this node see get Length see AST Parser public final int get Start Position return this start Position  ASTParser getLength ASTParser getStartPosition startPosition
Returns the length in characters of the original source file indicating where the source fragment corresponding to this node ends p The parser supplies useful well defined source ranges to the nodes it creates See link AST Parser methods for details on precisely where source ranges begin and end p return a possibly 0 length or code 0 code if no source position information is recorded for this node see get Start Position see AST Parser public final int get Length return this length  ASTParser getStartPosition ASTParser getLength
Sets the source range of the original source file where the source fragment corresponding to this node was found p See link AST Parser for details on precisely where source ranges begin and end p param start Position a 0 based character index or code 1 code if no source position information is available for this node param length a possibly 0 length or code 0 code if no source position information is recorded for this node see get Start Position see get Length see AST Parser public final void set Source Range int start Position int length if start Position 0 length 0 throw new Illegal Argument Exception if start Position 0 length 0 throw new Illegal Argument Exception source positions are not considered a structural property but we protect them nevertheless check Modifiable this start Position start Position this length length  ASTParser startPosition getStartPosition getLength ASTParser setSourceRange startPosition startPosition IllegalArgumentException startPosition IllegalArgumentException checkModifiable startPosition startPosition
Returns a string representation of this node suitable for debugging purposes only return a debug string public final String to String String Buffer buffer new String Buffer int p buffer length try append Debug String buffer catch Runtime Exception e since debugger sometimes call to String methods problems can easily happen when to String is called on an instance that is being initialized buffer set Length p buffer append NON NLS 1 buffer append standard To String return buffer to String  toString StringBuffer StringBuffer appendDebugString RuntimeException toString toString setLength standardToString toString
Returns the string representation of this node produced by the standard code Object to String code method return a debug string final String standard To String return super to String  toString standardToString toString
Appends a debug representation of this node to the given string buffer p The code AST Node code implementation of this method prints out the entire subtree Subclasses may override to provide a more succinct representation p param buffer the string buffer to append to void append Debug String String Buffer buffer print the subtree by default append Print String buffer  ASTNode appendDebugString StringBuffer appendPrintString
Appends a standard Java source code representation of this subtree to the given string buffer param buffer the string buffer to append to final void append Print String String Buffer buffer NaiveAST Flattener printer new NaiveAST Flattener this accept printer buffer append printer get Result  appendPrintString StringBuffer NaiveASTFlattener NaiveASTFlattener getResult
Returns an estimate of the memory footprint in bytes of the given string param string the string to measure or code null code return the size of this string object in bytes or 0 if the string is code null code since 3 0 static int string Size String string int size 0 if string null Strings usually have 4 instance fields one of which is a char size HEADERS 4 4 char has 2 bytes per character size HEADERS 2 string length return size  stringSize
Returns an estimate of the memory footprint in bytes of the entire subtree rooted at this node return the size of this subtree in bytes public final int subtree Bytes return tree Size  subtreeBytes treeSize
Returns an estimate of the memory footprint in bytes of the entire subtree rooted at this node p N B This method is package private so that the implementations of this method in each of the concrete AST node types do not clutter up the API doc p return the size of this subtree in bytes 
Returns an estimate of the memory footprint of this node in bytes The estimate does not include the space occupied by child nodes return the size of this node in bytes 

Creates a new object for creating a Java abstract syntax tree AST following the specified set of API rules p b NOTE b In Eclipse 3 0 there is no parser support for AST JLS3 This support is planned for the follow on release of Eclipse which includes support for J2SE 1 5 p param level the API level one of the LEVEL constants declared on code AST code return new AST Parser instance public static AST Parser new Parser int level return new AST Parser level  ASTParser ASTParser newParser ASTParser
Creates a new AST parser for the given API level p N B This constructor is package private p param level the API level one of the LEVEL constants declared on code AST code AST Parser int level if level AST JLS2 level AST JLS3 throw new Illegal Argument Exception this api Level level initialize Defaults  ASTParser IllegalArgumentException apiLevel initializeDefaults
Sets all the setting to their default values private void initialize Defaults this ast Kind K COMPILATION UNIT this raw Source null this class File Source null this compilation Unit Source null this resolve Bindings false this source Length 1 this source Offset 0 this working Copy Owner Default Working Copy Owner PRIMARY this unit Name null this project null this partial false this compiler Options Java Core get Options  initializeDefaults astKind K_COMPILATION_UNIT rawSource classFileSource compilationUnitSource resolveBindings sourceLength sourceOffset workingCopyOwner DefaultWorkingCopyOwner unitName compilerOptions JavaCore getOptions
Sets the compiler options to be used when parsing p The compiler options default to link Java Core get Options p param options the table of options key type code String code value type code String code or code null code to set it back to the default public void set Compiler Options Map options if options null this compiler Options Java Core get Options this compiler Options options  JavaCore getOptions setCompilerOptions compilerOptions JavaCore getOptions compilerOptions
Requests that the compiler should provide binding information for the AST nodes it creates p Default to code false code no bindings p p If code set Resolve Bindings true code the various names and types appearing in the AST can be resolved to bindings by calling the code resolve Binding code methods These bindings draw connections between the different parts of a program and generally afford a more powerful vantage point for clients who wish to analyze a program s structure more deeply These bindings come at a considerable cost in both time and space however and should not be requested frivolously The additional space is not reclaimed until the AST all its nodes and all its bindings become garbage So it is very important to not retain any of these objects longer than absolutely necessary Bindings are resolved at the time the AST is created Subsequent modifications to the AST do not affect the bindings returned by code resolve Binding code methods in any way these methods return the same binding as before the AST was modified including modifications that rearrange subtrees by reparenting nodes If code set Resolve Bindings false code the default the analysis does not go beyond parsing and building the tree and all code resolve Binding code methods return code null code from the outset p p When bindings are requested instead of considering compilation units on disk only one can supply a code Working Copy Owner code Working copies owned by this owner take precedence over the underlying compilation units when looking up names and drawing the connections p p Binding information is obtained from the Java model This means that the compilation unit must be located relative to the Java model This happens automatically when the source code comes from either link set Source I Compilation Unit set Source I Compilation Unit or link set Source I Class File set Source I Class File When source is supplied by link set Source char set Source char the location must be extablished explicitly by calling link set Project I Java Project and link set Unit Name String Note that the compiler options that affect doc comment checking may also affect whether any bindings are resolved for nodes within doc comments p param bindings code true code if bindings are wanted and code false code if bindings are not of interest public void set Resolve Bindings boolean bindings this resolve Bindings bindings  setResolveBindings resolveBinding resolveBinding setResolveBindings resolveBinding WorkingCopyOwner setSource ICompilationUnit setSource ICompilationUnit setSource IClassFile setSource IClassFile setSource setSource setProject IJavaProject setUnitName setResolveBindings resolveBindings
Requests an abridged abstract syntax tree By default complete AS Ts are returned When code true code the resulting AST does not have nodes for the entire compilation unit Rather the AST is only fleshed out for the node that include the given source position This kind of limited AST is sufficient for certain purposes but totally unsuitable for others In places where it can be used the limited AST offers the advantage of being smaller and faster to construct p p The AST will include nodes for all of the compilation unit s package import and top level type declarations It will also always contain nodes for all the body declarations for those top level types as well as body declarations for any member types However some of the body declarations may be abridged In particular the statements ordinarily found in the body of a method declaration node will not be included the block will be empty unless the source position falls somewhere within the source range of that method declaration node The same is true for initializer declarations the statements ordinarily found in the body of initializer node will not be included unless the source position falls somewhere within the source range of that initializer declaration node Field declarations are never abridged Note that the AST for the body of that one unabridged method or initializer is 100 complete it has all its statements including any local or anonymous type declarations embedded within them When the the given position is not located within the source range of any body declaration of a top level type the AST returned will be a skeleton that includes nodes for all and only the major declarations this kind of AST is still quite useful because it contains all the constructs that introduce names visible to the world outside the compilation unit p param position a position into the corresponding body declaration public void set Focal Position int position this partial true this focal Point Position position  ASTs setFocalPosition focalPointPosition
Sets the kind of constructs to be parsed from the source Defaults to an entire compilation unit p When the parse is successful the result returned includes the AS Ts for the requested source ul li link K COMPILATION UNIT The result node is a link Compilation Unit li li link K CLASS BODY DECLARATIONS The result node is a link Type Declaration whose link Type Declaration body Declarations body Declarations are the new trees Other aspects of the type declaration are unspecified li li link K STATEMENTS The result node is a link Block Block whose link Block statements statements are the new trees Other aspects of the block are unspecified li li link K EXPRESSION The result node is a subclass of link Expression Expression Other aspects of the expression are unspecified li ul The resulting AST node is rooted under possibly contrived link Compilation Unit Compilation Unit node to allow the client to retrieve the following pieces of information available there ul li linkplain Compilation Unit line Number int Line number map Line numbers start at 1 and only cover the subrange scanned code source offset code through code source offset length 1 code li li linkplain Compilation Unit get Messages Compiler messages and linkplain Compilation Unit get Problems detailed problem reports Character positions are relative to the start of code source code line positions are for the subrange scanned li li linkplain Compilation Unit get Comment List Comment list for the subrange scanned li ul The contrived nodes do not have source positions Other aspects of the link Compilation Unit Compilation Unit node are unspecified including the exact arrangment of intervening nodes p p Lexical or syntax errors detected while parsing can result in a result node being marked as link AST Node MALFORMED MALFORMED In more severe failure cases where the parser is unable to recognize the input this method returns a link Compilation Unit Compilation Unit node with at least the compiler messages p p Each node in the subtree other than the contrived nodes carries source range s information relating back to positions in the given source the given source itself is not remembered with the AST The source range usually begins at the first character of the first token corresponding to the node leading whitespace and comments are b not b included The source range usually extends through the last character of the last token corresponding to the node trailing whitespace and comments are b not b included There are a handful of exceptions including the various body declarations the specification for these node type spells out the details Source ranges nest properly the source range for a child is always within the source range of its parent and the source ranges of sibling nodes never overlap p p Binding information is only computed when code kind code is code K COMPILATION UNIT code p param kind the kind of construct to parse one of link K COMPILATION UNIT link K CLASS BODY DECLARATIONS link K EXPRESSION link K STATEMENTS public void set Kind int kind if kind K COMPILATION UNIT kind K CLASS BODY DECLARATIONS kind K EXPRESSION kind K STATEMENTS throw new Illegal Argument Exception this ast Kind kind  ASTs K_COMPILATION_UNIT CompilationUnit K_CLASS_BODY_DECLARATIONS TypeDeclaration TypeDeclaration bodyDeclarations bodyDeclarations K_STATEMENTS K_EXPRESSION CompilationUnit CompilationUnit CompilationUnit lineNumber CompilationUnit getMessages CompilationUnit getProblems CompilationUnit getCommentList CompilationUnit CompilationUnit ASTNode CompilationUnit CompilationUnit K_COMPILATION_UNIT K_COMPILATION_UNIT K_CLASS_BODY_DECLARATIONS K_EXPRESSION K_STATEMENTS setKind K_COMPILATION_UNIT K_CLASS_BODY_DECLARATIONS K_EXPRESSION K_STATEMENTS IllegalArgumentException astKind
Sets the source code to be parsed param source the source string to be parsed or code null code if none public void set Source char source this raw Source source clear the others this compilation Unit Source null this class File Source null  setSource rawSource compilationUnitSource classFileSource
Sets the source code to be parsed This method automatically sets the project and compiler options based on the given compilation unit in a manner equivalent to code set Project source get Java Project code param source the Java model compilation unit whose source code is to be parsed or code null code if none public void set Source I Compilation Unit source this compilation Unit Source source clear the others this raw Source null this class File Source null if source null this project source get Java Project this compiler Options this project get Options true  setProject getJavaProject setSource ICompilationUnit compilationUnitSource rawSource classFileSource getJavaProject compilerOptions getOptions
Sets the source code to be parsed This method automatically sets the project and compiler options based on the given compilation unit in a manner equivalent to code set Project source get Java Project code param source the Java model class file whose corresponding source code is to be parsed or code null code if none public void set Source I Class File source this class File Source source clear the others this raw Source null this compilation Unit Source null if source null this project source get Java Project this compiler Options this project get Options true  setProject getJavaProject setSource IClassFile classFileSource rawSource compilationUnitSource getJavaProject compilerOptions getOptions
Sets the subrange of the source code to be parsed By default the entire source string will be parsed code offset code 0 and code length code 1 param offset the index of the first character to parse param length the number of characters to parse or 1 if the remainder of the source string is public void set Source Range int offset int length if offset 0 length 1 throw new Illegal Argument Exception this source Offset offset this source Length length  setSourceRange IllegalArgumentException sourceOffset sourceLength
Sets the working copy owner using when resolving bindings where code null code means the primary owner Defaults to the primary owner param owner the owner of working copies that take precedence over underlying compilation units or code null code if the primary owner should be used public void set Working Copy Owner Working Copy Owner owner if owner null this working Copy Owner Default Working Copy Owner PRIMARY else this working Copy Owner owner  setWorkingCopyOwner WorkingCopyOwner workingCopyOwner DefaultWorkingCopyOwner workingCopyOwner
Sets the name of the compilation unit that would hypothetically contains the source string This is used in conjunction with code set Source char code and code set Project code to locate the compilation unit relative to a Java project Defaults to none code null code p The name of the compilation unit must be supplied for resolving bindings This name should include the java suffix and match the name of the main public class or interface declared in the source For example if the source declares a public class named Foo the name of the compilation should be Foo java p param unit Name the name of the compilation unit that would contain the source string or code null code if none public void set Unit Name String unit Name this unit Name unit Name  setSource setProject unitName setUnitName unitName unitName unitName
Sets the Java project used when resolving bindings This method automatically sets the compiler options based on the given project pre set Compiler Options project get Options true pre This setting is used in conjunction with code set Source char code For the purposes of resolving bindings types declared in the source string will hide types by the same name available through the classpath of the given project Defaults to none code null code param project the Java project used to resolve names or code null code if none public void set Project I Java Project project this project project if project null this compiler Options project get Options true  setCompilerOptions getOptions setSource setProject IJavaProject compilerOptions getOptions
Creates an abstract syntax tree p A successful call to this method returns all settings to their default values so the object is ready to be reused p param monitor the progress monitor used to report progress and request cancelation or code null code if none return an AST node whose type depends on the kind of parse requested with a fallback to a code Compilation Unit code in the case of severe parsing errors exception Illegal State Exception if the settings provided are insufficient contradictory or otherwise unsupported public AST Node createAST I Progress Monitor monitor AST Node result null try if this raw Source null this compilation Unit Source null this class File Source null throw new Illegal State Exception source not specified NON NLS 1 result internal CreateAST monitor finally re init defaults to allow reuse and avoid leaking initialize Defaults return result  CompilationUnit IllegalStateException ASTNode IProgressMonitor ASTNode rawSource compilationUnitSource classFileSource IllegalStateException internalCreateAST initializeDefaults
private AST Node internal CreateAST I Progress Monitor monitor boolean need To Resolve Bindings this resolve Bindings switch this ast Kind case K CLASS BODY DECLARATIONS case K EXPRESSION case K STATEMENTS if this raw Source null if this source Offset this source Length this raw Source length throw new Illegal State Exception return internal CreateAST For Kind break case K COMPILATION UNIT Compilation Unit Declaration compilation Unit Declaration null try char source null Node Searcher searcher null char package Name null String file Name null if this compilation Unit Source null try source this compilation Unit Source get Source to Char Array catch Java Model Exception e no source then we cannot build anything throw new Illegal State Exception I Package Fragment package Fragment I Package Fragment this compilation Unit Source get Ancestor I Java Element PACKAGE FRAGMENT if package Fragment null package Name Char Operation split On package Fragment get Element Name to Char Array file Name this compilation Unit Source get Element Name else if this class File Source null String source String null try source String this class File Source get Source catch Java Model Exception e nothing to do if source String null throw new Illegal State Exception source source String to Char Array try package Name Char Operation split On this class File Source get Type get Package Fragment get Element Name to Char Array String Buffer buffer new String Buffer Suffix Constants SUFFIX STRING java String class File Name this class File Source get Element Name this includes the trailing class buffer insert 0 class File Name to Char Array 0 class File Name index Of file Name String value Of buffer catch Java Model Exception e need To Resolve Bindings false else if this raw Source null source this raw Source if this unit Name null this project null this compiler Options null need To Resolve Bindings false else file Name this unit Name need To Resolve Bindings true if source null throw new Illegal State Exception if this source Length 1 this source Length source length if this partial searcher new Node Searcher this focal Point Position if need To Resolve Bindings this project null try parse and resolve compilation Unit Declaration Compilation Unit Resolver resolve source package Name file Name this project searcher this compiler Options false this working Copy Owner monitor catch Java Model Exception e compilation Unit Declaration Compilation Unit Resolver parse source searcher this compiler Options need To Resolve Bindings false else compilation Unit Declaration Compilation Unit Resolver parse source searcher this compiler Options need To Resolve Bindings false return convert monitor compilation Unit Declaration source need To Resolve Bindings finally if compilation Unit Declaration null this resolve Bindings compilation Unit Declaration clean Up throw new Illegal State Exception  ASTNode internalCreateAST IProgressMonitor needToResolveBindings resolveBindings astKind K_CLASS_BODY_DECLARATIONS K_EXPRESSION K_STATEMENTS rawSource sourceOffset sourceLength rawSource IllegalStateException internalCreateASTForKind K_COMPILATION_UNIT CompilationUnitDeclaration compilationUnitDeclaration NodeSearcher packageName fileName compilationUnitSource compilationUnitSource getSource toCharArray JavaModelException IllegalStateException IPackageFragment packageFragment IPackageFragment compilationUnitSource getAncestor IJavaElement PACKAGE_FRAGMENT packageFragment packageName CharOperation splitOn packageFragment getElementName toCharArray fileName compilationUnitSource getElementName classFileSource sourceString sourceString classFileSource getSource JavaModelException sourceString IllegalStateException sourceString toCharArray packageName CharOperation splitOn classFileSource getType getPackageFragment getElementName toCharArray StringBuffer StringBuffer SuffixConstants SUFFIX_STRING_java classFileName classFileSource getElementName classFileName toCharArray classFileName indexOf fileName valueOf JavaModelException needToResolveBindings rawSource rawSource unitName compilerOptions needToResolveBindings fileName unitName needToResolveBindings IllegalStateException sourceLength sourceLength NodeSearcher focalPointPosition needToResolveBindings compilationUnitDeclaration CompilationUnitResolver packageName fileName compilerOptions workingCopyOwner JavaModelException compilationUnitDeclaration CompilationUnitResolver compilerOptions needToResolveBindings compilationUnitDeclaration CompilationUnitResolver compilerOptions needToResolveBindings compilationUnitDeclaration needToResolveBindings compilationUnitDeclaration resolveBindings compilationUnitDeclaration cleanUp IllegalStateException
param monitor param compilation Unit Declaration param source return private AST Node convert I Progress Monitor monitor Compilation Unit Declaration compilation Unit Declaration char source boolean need To Resolve Bindings Binding Resolver resolver null AST ast AST newAST this api Level ast set Default Node Flag AST Node ORIGINAL Compilation Unit compilation Unit null if AST JLS2 this api Level AST Converter converter new AST Converter this compiler Options need To Resolve Bindings monitor if need To Resolve Bindings resolver new Default Binding Resolver compilation Unit Declaration scope else resolver new Binding Resolver ast set Binding Resolver resolver converter setAST ast compilation Unit converter convert compilation Unit Declaration source compilation Unit set Line End Table compilation Unit Declaration compilation Result line Separator Positions else throw new Runtime Exception J2SE 1 5 parser not implemented yet NON NLS 1 ast set Default Node Flag 0 ast set Original Modification Count ast modification Count return compilation Unit  compilationUnitDeclaration ASTNode IProgressMonitor CompilationUnitDeclaration compilationUnitDeclaration needToResolveBindings BindingResolver apiLevel setDefaultNodeFlag ASTNode CompilationUnit compilationUnit apiLevel ASTConverter ASTConverter compilerOptions needToResolveBindings needToResolveBindings DefaultBindingResolver compilationUnitDeclaration BindingResolver setBindingResolver compilationUnit compilationUnitDeclaration compilationUnit setLineEndTable compilationUnitDeclaration compilationResult lineSeparatorPositions RuntimeException setDefaultNodeFlag setOriginalModificationCount modificationCount compilationUnit
Parses the given source between the bounds specified by the given offset inclusive and the given length and creates and returns a corresponding abstract syntax tree p When the parse is successful the result returned includes the AS Ts for the requested source ul li link K CLASS BODY DECLARATIONS K CLASS BODY DECLARATIONS The result node is a link Type Declaration Type Declaration whose link Type Declaration body Declarations body Declarations are the new trees Other aspects of the type declaration are unspecified li li link K STATEMENTS K STATEMENTS The result node is a link Block Block whose link Block statements statements are the new trees Other aspects of the block are unspecified li li link K EXPRESSION K EXPRESSION The result node is a subclass of link Expression Expression Other aspects of the expression are unspecified li ul The resulting AST node is rooted under an contrived link Compilation Unit Compilation Unit node to allow the client to retrieve the following pieces of information available there ul li linkplain Compilation Unit line Number int Line number map Line numbers start at 1 and only cover the subrange scanned code source offset code through code source offset length 1 code li li linkplain Compilation Unit get Messages Compiler messages and linkplain Compilation Unit get Problems detailed problem reports Character positions are relative to the start of code source code line positions are for the subrange scanned li li linkplain Compilation Unit get Comment List Comment list for the subrange scanned li ul The contrived nodes do not have source positions Other aspects of the link Compilation Unit Compilation Unit node are unspecified including the exact arrangment of intervening nodes p p Lexical or syntax errors detected while parsing can result in a result node being marked as link AST Node MALFORMED MALFORMED In more severe failure cases where the parser is unable to recognize the input this method returns a link Compilation Unit Compilation Unit node with at least the compiler messages p p Each node in the subtree other than the contrived nodes carries source range s information relating back to positions in the given source the given source itself is not remembered with the AST The source range usually begins at the first character of the first token corresponding to the node leading whitespace and comments are b not b included The source range usually extends through the last character of the last token corresponding to the node trailing whitespace and comments are b not b included There are a handful of exceptions including the various body declarations the specification for these node type spells out the details Source ranges nest properly the source range for a child is always within the source range of its parent and the source ranges of sibling nodes never overlap p p This method does not compute binding information all code resolve Binding code methods applied to nodes of the resulting AST return code null code p return an AST node whose type depends on the kind of parse requested with a fallback to a code Compilation Unit code in the case of severe parsing errors see AST Node get Start Position see AST Node get Length private AST Node internal CreateAST For Kind AST Converter converter new AST Converter this compiler Options false null converter compilation Unit Source this raw Source converter scanner set Source this raw Source AST ast AST newAST this api Level ast set Default Node Flag AST Node ORIGINAL ast set Binding Resolver new Binding Resolver converter setAST ast Code Snippet Parsing Util code Snippet Parsing Util new Code Snippet Parsing Util Compilation Unit compilation Unit ast new Compilation Unit if this source Length 1 this source Length this raw Source length switch this ast Kind case K STATEMENTS Constructor Declaration constructor Declaration code Snippet Parsing Util parse Statements this raw Source this source Offset this source Length this compiler Options true Recorded Parsing Information recorded Parsing Information code Snippet Parsing Util recorded Parsing Information int comments recorded Parsing Information comment Positions if comments null converter build Comments Table compilation Unit comments compilation Unit set Line End Table recorded Parsing Information line Ends if constructor Declaration null Block block ast new Block Statement statements constructor Declaration statements if statements null int statements Length statements length for int i 0 i statements Length i block statements add converter convert statements i root Node To Compilation Unit ast compilation Unit block recorded Parsing Information ast set Default Node Flag 0 ast set Original Modification Count ast modification Count return block else I Problem problems recorded Parsing Information problems if problems null compilation Unit set Problems problems ast set Default Node Flag 0 ast set Original Modification Count ast modification Count return compilation Unit case K EXPRESSION org eclipse jdt internal compiler ast Expression expression code Snippet Parsing Util parse Expression this raw Source this source Offset this source Length this compiler Options true recorded Parsing Information code Snippet Parsing Util recorded Parsing Information comments recorded Parsing Information comment Positions if comments null converter build Comments Table compilation Unit comments compilation Unit set Line End Table recorded Parsing Information line Ends if expression null Expression expression2 converter convert expression root Node To Compilation Unit expression2 getAST compilation Unit expression2 code Snippet Parsing Util recorded Parsing Information ast set Default Node Flag 0 ast set Original Modification Count ast modification Count return expression2 else I Problem problems recorded Parsing Information problems if problems null compilation Unit set Problems problems ast set Default Node Flag 0 ast set Original Modification Count ast modification Count return compilation Unit case K CLASS BODY DECLARATIONS final org eclipse jdt internal compiler ast AST Node nodes code Snippet Parsing Util parse Class Body Declarations this raw Source this source Offset this source Length this compiler Options true recorded Parsing Information code Snippet Parsing Util recorded Parsing Information comments recorded Parsing Information comment Positions if comments null converter build Comments Table compilation Unit comments compilation Unit set Line End Table recorded Parsing Information line Ends if nodes null Type Declaration type Declaration converter convert nodes root Node To Compilation Unit type Declaration getAST compilation Unit type Declaration code Snippet Parsing Util recorded Parsing Information ast set Default Node Flag 0 ast set Original Modification Count ast modification Count return type Declaration else I Problem problems recorded Parsing Information problems if problems null compilation Unit set Problems problems ast set Default Node Flag 0 ast set Original Modification Count ast modification Count return compilation Unit throw new Illegal State Exception  ASTs K_CLASS_BODY_DECLARATIONS K_CLASS_BODY_DECLARATIONS TypeDeclaration TypeDeclaration TypeDeclaration bodyDeclarations bodyDeclarations K_STATEMENTS K_STATEMENTS K_EXPRESSION K_EXPRESSION CompilationUnit CompilationUnit CompilationUnit lineNumber CompilationUnit getMessages CompilationUnit getProblems CompilationUnit getCommentList CompilationUnit CompilationUnit ASTNode CompilationUnit CompilationUnit resolveBinding CompilationUnit ASTNode getStartPosition ASTNode getLength ASTNode internalCreateASTForKind ASTConverter ASTConverter compilerOptions compilationUnitSource rawSource setSource rawSource apiLevel setDefaultNodeFlag ASTNode setBindingResolver BindingResolver CodeSnippetParsingUtil codeSnippetParsingUtil CodeSnippetParsingUtil CompilationUnit compilationUnit newCompilationUnit sourceLength sourceLength rawSource astKind K_STATEMENTS ConstructorDeclaration constructorDeclaration codeSnippetParsingUtil parseStatements rawSource sourceOffset sourceLength compilerOptions RecordedParsingInformation recordedParsingInformation codeSnippetParsingUtil recordedParsingInformation recordedParsingInformation commentPositions buildCommentsTable compilationUnit compilationUnit setLineEndTable recordedParsingInformation lineEnds constructorDeclaration newBlock constructorDeclaration statementsLength statementsLength rootNodeToCompilationUnit compilationUnit recordedParsingInformation setDefaultNodeFlag setOriginalModificationCount modificationCount IProblem recordedParsingInformation compilationUnit setProblems setDefaultNodeFlag setOriginalModificationCount modificationCount compilationUnit K_EXPRESSION codeSnippetParsingUtil parseExpression rawSource sourceOffset sourceLength compilerOptions recordedParsingInformation codeSnippetParsingUtil recordedParsingInformation recordedParsingInformation commentPositions buildCommentsTable compilationUnit compilationUnit setLineEndTable recordedParsingInformation lineEnds rootNodeToCompilationUnit compilationUnit codeSnippetParsingUtil recordedParsingInformation setDefaultNodeFlag setOriginalModificationCount modificationCount IProblem recordedParsingInformation compilationUnit setProblems setDefaultNodeFlag setOriginalModificationCount modificationCount compilationUnit K_CLASS_BODY_DECLARATIONS ASTNode codeSnippetParsingUtil parseClassBodyDeclarations rawSource sourceOffset sourceLength compilerOptions recordedParsingInformation codeSnippetParsingUtil recordedParsingInformation recordedParsingInformation commentPositions buildCommentsTable compilationUnit compilationUnit setLineEndTable recordedParsingInformation lineEnds TypeDeclaration typeDeclaration rootNodeToCompilationUnit typeDeclaration compilationUnit typeDeclaration codeSnippetParsingUtil recordedParsingInformation setDefaultNodeFlag setOriginalModificationCount modificationCount typeDeclaration IProblem recordedParsingInformation compilationUnit setProblems setDefaultNodeFlag setOriginalModificationCount modificationCount compilationUnit IllegalStateException
private void propagate Errors AST Node ast Node I Problem problems AST Syntax Error Propagator syntax Error Propagator new AST Syntax Error Propagator problems ast Node accept syntax Error Propagator  propagateErrors ASTNode astNode IProblem ASTSyntaxErrorPropagator syntaxErrorPropagator ASTSyntaxErrorPropagator astNode syntaxErrorPropagator
private void root Node To Compilation Unit AST ast Compilation Unit compilation Unit AST Node node Recorded Parsing Information recorded Parsing Information final int problems Count recorded Parsing Information problems Count switch node get Node Type case AST Node BLOCK Block block Block node if problems Count 0 propagate and record problems final I Problem problems recorded Parsing Information problems for int i 0 max block statements size i max i propagate Errors AST Node block statements get i problems compilation Unit set Problems problems Type Declaration type Declaration ast new Type Declaration Initializer initializer ast new Initializer initializer set Body block type Declaration body Declarations add initializer compilation Unit types add type Declaration break case AST Node TYPE DECLARATION Type Declaration type Declaration Type Declaration node if problems Count 0 propagate and record problems final I Problem problems recorded Parsing Information problems for int i 0 max type Declaration body Declarations size i max i propagate Errors AST Node type Declaration body Declarations get i problems compilation Unit set Problems problems compilation Unit types add type Declaration break default if node instanceof Expression Expression expression Expression node if problems Count 0 propagate and record problems final I Problem problems recorded Parsing Information problems propagate Errors expression problems compilation Unit set Problems problems Expression Statement expression Statement ast new Expression Statement expression Block block ast new Block block statements add expression Statement Initializer initializer ast new Initializer initializer set Body block Type Declaration type Declaration ast new Type Declaration type Declaration body Declarations add initializer compilation Unit types add type Declaration  rootNodeToCompilationUnit CompilationUnit compilationUnit ASTNode RecordedParsingInformation recordedParsingInformation problemsCount recordedParsingInformation problemsCount getNodeType ASTNode problemsCount IProblem recordedParsingInformation propagateErrors ASTNode compilationUnit setProblems TypeDeclaration typeDeclaration newTypeDeclaration newInitializer setBody typeDeclaration bodyDeclarations compilationUnit typeDeclaration ASTNode TYPE_DECLARATION TypeDeclaration typeDeclaration TypeDeclaration problemsCount IProblem recordedParsingInformation typeDeclaration bodyDeclarations propagateErrors ASTNode typeDeclaration bodyDeclarations compilationUnit setProblems compilationUnit typeDeclaration problemsCount IProblem recordedParsingInformation propagateErrors compilationUnit setProblems ExpressionStatement expressionStatement newExpressionStatement newBlock expressionStatement newInitializer setBody TypeDeclaration typeDeclaration newTypeDeclaration typeDeclaration bodyDeclarations compilationUnit typeDeclaration

AST Syntax Error Propagator I Problem problems visit Javadoc tags as well super true this problems problems  ASTSyntaxErrorPropagator IProblem
private boolean check And Tag As Malformed AST Node node boolean tag With Errors false search for int i 0 max this problems length i max i I Problem problem this problems i switch problem getID case I Problem Parsing Error On Keyword No Suggestion case I Problem Parsing Error On Keyword case I Problem Parsing Error case I Problem Parsing Error No Suggestion break case I Problem Parsing Error Insert Token Before case I Problem Parsing Error Insert Token After case I Problem Parsing Error Delete Token case I Problem Parsing Error Delete Tokens case I Problem Parsing Error Merge Tokens case I Problem Parsing Error Invalid Token case I Problem Parsing Error Misplaced Construct case I Problem Parsing Error Replace Tokens case I Problem Parsing Error No Suggestion For Tokens case I Problem Parsing Error UnexpectedEOF case I Problem Parsing Error Insert To Complete case I Problem Parsing Error Insert To Complete Scope case I Problem Parsing Error Insert To Complete Phrase break default continue search int position problem get Source Start int start node get Start Position int end start node get Length if start position position end node set Flags node get Flags AST Node MALFORMED clear the bits on parent AST Node current Node node get Parent while current Node null current Node set Flags current Node get Flags AST Node MALFORMED current Node current Node get Parent tag With Errors true return tag With Errors  checkAndTagAsMalformed ASTNode tagWithErrors IProblem IProblem ParsingErrorOnKeywordNoSuggestion IProblem ParsingErrorOnKeyword IProblem ParsingError IProblem ParsingErrorNoSuggestion IProblem ParsingErrorInsertTokenBefore IProblem ParsingErrorInsertTokenAfter IProblem ParsingErrorDeleteToken IProblem ParsingErrorDeleteTokens IProblem ParsingErrorMergeTokens IProblem ParsingErrorInvalidToken IProblem ParsingErrorMisplacedConstruct IProblem ParsingErrorReplaceTokens IProblem ParsingErrorNoSuggestionForTokens IProblem ParsingErrorUnexpectedEOF IProblem ParsingErrorInsertToComplete IProblem ParsingErrorInsertToCompleteScope IProblem ParsingErrorInsertToCompletePhrase getSourceStart getStartPosition getLength setFlags getFlags ASTNode ASTNode currentNode getParent currentNode currentNode setFlags currentNode getFlags ASTNode currentNode currentNode getParent tagWithErrors tagWithErrors
Method declared on AST Visitor public boolean visit Field Declaration node return check And Tag As Malformed node  ASTVisitor FieldDeclaration checkAndTagAsMalformed
Method declared on AST Visitor public boolean visit Method Declaration node return check And Tag As Malformed node  ASTVisitor MethodDeclaration checkAndTagAsMalformed
Method declared on AST Visitor public boolean visit Package Declaration node return check And Tag As Malformed node  ASTVisitor PackageDeclaration checkAndTagAsMalformed
Method declared on AST Visitor public boolean visit Import Declaration node return check And Tag As Malformed node  ASTVisitor ImportDeclaration checkAndTagAsMalformed
Method declared on AST Visitor public boolean visit Compilation Unit node return check And Tag As Malformed node  ASTVisitor CompilationUnit checkAndTagAsMalformed
Method declared on AST Visitor public boolean visit Initializer node return check And Tag As Malformed node  ASTVisitor checkAndTagAsMalformed

Creates a new AST visitor instance p For backwards compatibility the visitor does not visit tag elements below doc comments by default Use link AST Visitor boolean AST Visitor true for an visitor that includes doc comments by default p public AST Visitor this false  ASTVisitor ASTVisitor ASTVisitor
Creates a new AST visitor instance param visit Doc Tags code true code if doc comment tags are to be visited by default and code false code otherwise see Javadoc tags see visit Javadoc since 3 0 public AST Visitor boolean visit Doc Tags this visit Doc Tags visit Doc Tags  visitDocTags ASTVisitor visitDocTags visitDocTags visitDocTags
Visits the given AST node prior to the type specific visit before code visit code p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void pre Visit AST Node node default implementation do nothing  preVisit ASTNode
Visits the given AST node following the type specific visit after code end Visit code p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void post Visit AST Node node default implementation do nothing  endVisit postVisit ASTNode
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Annotation Type Declaration node return true  AnnotationTypeDeclaration
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Annotation Type Member Declaration node return true  AnnotationTypeMemberDeclaration
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Anonymous Class Declaration node return true  AnonymousClassDeclaration
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Array Access node return true  ArrayAccess
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Array Creation node return true  ArrayCreation
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Array Initializer node return true  ArrayInitializer
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Array Type node return true  ArrayType
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Assert Statement node return true  AssertStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Assignment node return true 
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Block node return true 
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Block Comment node return true  BlockComment
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Boolean Literal node return true  BooleanLiteral
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Break Statement node return true  BreakStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Cast Expression node return true  CastExpression
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Catch Clause node return true  CatchClause
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Character Literal node return true  CharacterLiteral
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Class Instance Creation node return true  ClassInstanceCreation
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Compilation Unit node return true  CompilationUnit
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Conditional Expression node return true  ConditionalExpression
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Constructor Invocation node return true  ConstructorInvocation
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Continue Statement node return true  ContinueStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Do Statement node return true  DoStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Empty Statement node return true  EmptyStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Enhanced For Statement node return true  EnhancedForStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Enum Constant Declaration node return true  EnumConstantDeclaration
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Enum Declaration node return true  EnumDeclaration
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Expression Statement node return true  ExpressionStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Field Access node return true  FieldAccess
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Field Declaration node return true  FieldDeclaration
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit For Statement node return true  ForStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit If Statement node return true  IfStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Import Declaration node return true  ImportDeclaration
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Infix Expression node return true  InfixExpression
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Instanceof Expression node return true  InstanceofExpression
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Initializer node return true 
Visits the given AST node p Unlike other node types the boolean returned by the default implementation is controlled by a constructor supplied parameter link AST Visitor boolean AST Visitor boolean which is code false code by default Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped see AST Visitor see AST Visitor boolean public boolean visit Javadoc node visit tag elements inside doc comments only if requested return this visit Doc Tags  ASTVisitor ASTVisitor ASTVisitor ASTVisitor visitDocTags
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Labeled Statement node return true  LabeledStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Line Comment node return true  LineComment
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Marker Annotation node return true  MarkerAnnotation
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Member Ref node return true  MemberRef
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Member Value Pair node return true  MemberValuePair
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Method Ref node return true  MethodRef
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Method Ref Parameter node return true  MethodRefParameter
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Method Declaration node return true  MethodDeclaration
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Method Invocation node return true  MethodInvocation
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Modifier node return true 
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Normal Annotation node return true  NormalAnnotation
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Null Literal node return true  NullLiteral
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Number Literal node return true  NumberLiteral
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Package Declaration node return true  PackageDeclaration
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Parameterized Type node return true  ParameterizedType
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Parenthesized Expression node return true  ParenthesizedExpression
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Postfix Expression node return true  PostfixExpression
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Prefix Expression node return true  PrefixExpression
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Primitive Type node return true  PrimitiveType
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Qualified Name node return true  QualifiedName
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Qualified Type node return true  QualifiedType
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Return Statement node return true  ReturnStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Simple Name node return true  SimpleName
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Simple Type node return true  SimpleType
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Single Member Annotation node return true  SingleMemberAnnotation
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Single Variable Declaration node return true  SingleVariableDeclaration
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit String Literal node return true  StringLiteral
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Super Constructor Invocation node return true  SuperConstructorInvocation
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Super Field Access node return true  SuperFieldAccess
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Super Method Invocation node return true  SuperMethodInvocation
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Switch Case node return true  SwitchCase
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Switch Statement node return true  SwitchStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Synchronized Statement node return true  SynchronizedStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Tag Element node return true  TagElement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Text Element node return true  TextElement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit This Expression node return true  ThisExpression
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Throw Statement node return true  ThrowStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Try Statement node return true  TryStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Type Declaration node return true  TypeDeclaration
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Type Declaration Statement node return true  TypeDeclarationStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Type Literal node return true  TypeLiteral
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Type Parameter node return true  TypeParameter
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Variable Declaration Expression node return true  VariableDeclarationExpression
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Variable Declaration Statement node return true  VariableDeclarationStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit Variable Declaration Fragment node return true  VariableDeclarationFragment
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped public boolean visit While Statement node return true  WhileStatement
Visits the given type specific AST node p The default implementation does nothing and return true Subclasses may reimplement p param node the node to visit return code true code if the children of this node should be visited and code false code if the children of this node should be skipped since 3 0 public boolean visit Wildcard Type node return true  WildcardType
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Annotation Type Declaration node default implementation do nothing  endVisit AnnotationTypeDeclaration
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Annotation Type Member Declaration node default implementation do nothing  endVisit AnnotationTypeMemberDeclaration
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Anonymous Class Declaration node default implementation do nothing  endVisit AnonymousClassDeclaration
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Array Access node default implementation do nothing  endVisit ArrayAccess
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Array Creation node default implementation do nothing  endVisit ArrayCreation
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Array Initializer node default implementation do nothing  endVisit ArrayInitializer
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Array Type node default implementation do nothing  endVisit ArrayType
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Assert Statement node default implementation do nothing  endVisit AssertStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Assignment node default implementation do nothing  endVisit
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Block node default implementation do nothing  endVisit
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Block Comment node default implementation do nothing  endVisit BlockComment
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Boolean Literal node default implementation do nothing  endVisit BooleanLiteral
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Break Statement node default implementation do nothing  endVisit BreakStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Cast Expression node default implementation do nothing  endVisit CastExpression
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Catch Clause node default implementation do nothing  endVisit CatchClause
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Character Literal node default implementation do nothing  endVisit CharacterLiteral
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Class Instance Creation node default implementation do nothing  endVisit ClassInstanceCreation
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Compilation Unit node default implementation do nothing  endVisit CompilationUnit
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Conditional Expression node default implementation do nothing  endVisit ConditionalExpression
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Constructor Invocation node default implementation do nothing  endVisit ConstructorInvocation
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Continue Statement node default implementation do nothing  endVisit ContinueStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Do Statement node default implementation do nothing  endVisit DoStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Empty Statement node default implementation do nothing  endVisit EmptyStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Enhanced For Statement node default implementation do nothing  endVisit EnhancedForStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Enum Constant Declaration node default implementation do nothing  endVisit EnumConstantDeclaration
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Enum Declaration node default implementation do nothing  endVisit EnumDeclaration
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Expression Statement node default implementation do nothing  endVisit ExpressionStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Field Access node default implementation do nothing  endVisit FieldAccess
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Field Declaration node default implementation do nothing  endVisit FieldDeclaration
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit For Statement node default implementation do nothing  endVisit ForStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit If Statement node default implementation do nothing  endVisit IfStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Import Declaration node default implementation do nothing  endVisit ImportDeclaration
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Infix Expression node default implementation do nothing  endVisit InfixExpression
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Instanceof Expression node default implementation do nothing  endVisit InstanceofExpression
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Initializer node default implementation do nothing  endVisit
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Javadoc node default implementation do nothing  endVisit
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Labeled Statement node default implementation do nothing  endVisit LabeledStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Line Comment node default implementation do nothing  endVisit LineComment
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Marker Annotation node default implementation do nothing  endVisit MarkerAnnotation
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Member Ref node default implementation do nothing  endVisit MemberRef
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Member Value Pair node default implementation do nothing  endVisit MemberValuePair
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Method Ref node default implementation do nothing  endVisit MethodRef
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Method Ref Parameter node default implementation do nothing  endVisit MethodRefParameter
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Method Declaration node default implementation do nothing  endVisit MethodDeclaration
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Method Invocation node default implementation do nothing  endVisit MethodInvocation
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Modifier node default implementation do nothing  endVisit
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Normal Annotation node default implementation do nothing  endVisit NormalAnnotation
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Null Literal node default implementation do nothing  endVisit NullLiteral
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Number Literal node default implementation do nothing  endVisit NumberLiteral
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Package Declaration node default implementation do nothing  endVisit PackageDeclaration
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Parameterized Type node default implementation do nothing  endVisit ParameterizedType
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Parenthesized Expression node default implementation do nothing  endVisit ParenthesizedExpression
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Postfix Expression node default implementation do nothing  endVisit PostfixExpression
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Prefix Expression node default implementation do nothing  endVisit PrefixExpression
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Primitive Type node default implementation do nothing  endVisit PrimitiveType
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Qualified Name node default implementation do nothing  endVisit QualifiedName
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Qualified Type node default implementation do nothing  endVisit QualifiedType
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Return Statement node default implementation do nothing  endVisit ReturnStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Simple Name node default implementation do nothing  endVisit SimpleName
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Simple Type node default implementation do nothing  endVisit SimpleType
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Single Member Annotation node default implementation do nothing  endVisit SingleMemberAnnotation
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Single Variable Declaration node default implementation do nothing  endVisit SingleVariableDeclaration
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit String Literal node default implementation do nothing  endVisit StringLiteral
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Super Constructor Invocation node default implementation do nothing  endVisit SuperConstructorInvocation
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Super Field Access node default implementation do nothing  endVisit SuperFieldAccess
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Super Method Invocation node default implementation do nothing  endVisit SuperMethodInvocation
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Switch Case node default implementation do nothing  endVisit SwitchCase
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Switch Statement node default implementation do nothing  endVisit SwitchStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Synchronized Statement node default implementation do nothing  endVisit SynchronizedStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Tag Element node default implementation do nothing  endVisit TagElement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Text Element node default implementation do nothing  endVisit TextElement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit This Expression node default implementation do nothing  endVisit ThisExpression
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Throw Statement node default implementation do nothing  endVisit ThrowStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Try Statement node default implementation do nothing  endVisit TryStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Type Declaration node default implementation do nothing  endVisit TypeDeclaration
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Type Declaration Statement node default implementation do nothing  endVisit TypeDeclarationStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Type Literal node default implementation do nothing  endVisit TypeLiteral
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Type Parameter node default implementation do nothing  endVisit TypeParameter
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Variable Declaration Expression node default implementation do nothing  endVisit VariableDeclarationExpression
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Variable Declaration Statement node default implementation do nothing  endVisit VariableDeclarationStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit Variable Declaration Fragment node default implementation do nothing  endVisit VariableDeclarationFragment
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit public void end Visit While Statement node default implementation do nothing  endVisit WhileStatement
End of visit the given type specific AST node p The default implementation does nothing Subclasses may reimplement p param node the node to visit since 3 0 public void end Visit Wildcard Type node default implementation do nothing  endVisit WildcardType

protected long modification Count Creates a binding resolver Binding Resolver default implementation do nothing  modificationCount BindingResolver
Store the number of modifications done using the ast This is used to validate resolve Binding methods If the number changed all resolve bindings methods simply return null protected void store Modification Count long modification Counter this modification Count modification Counter  resolveBinding storeModificationCount modificationCounter modificationCount modificationCounter
Allows the user to store information about the given old new pair of AST nodes p The default implementation of this method does nothing Subclasses may reimplement p param new Node the new AST node param oldAST Node the old AST node void store AST Node new Node org eclipse jdt internal compiler ast AST Node oldAST Node default implementation do nothing  newNode oldASTNode ASTNode newNode ASTNode oldASTNode
Resolves the given name and returns the type binding for it p The implementation of code Name resolve Binding code forwards to this method How the name resolves is often a function of the context in which the name node is embedded as well as the name itself p p The default implementation of this method returns code null code Subclasses may reimplement p param name the name of interest return the binding for the name or code null code if no binding is available I Binding resolve Name Name name return null  resolveBinding IBinding resolveName
Resolves the given type and returns the type binding for it p The implementation of code Type resolve Binding code forwards to this method How the type resolves is often a function of the context in which the type node is embedded as well as the type subtree itself p p The default implementation of this method returns code null code Subclasses may reimplement p param type the type of interest return the binding for the given type or code null code if no binding is available I Type Binding resolve Type Type type return null  resolveBinding ITypeBinding resolveType
Resolves the given well known type by name and returns the type binding for it p The implementation of code AST resolve Well Known Type code forwards to this method p p The default implementation of this method returns code null code Subclasses may reimplement p param name the name of a well known type return the corresponding type binding or code null code if the named type is not considered well known or if no binding can be found for it I Type Binding resolve Well Known Type String name return null  resolveWellKnownType ITypeBinding resolveWellKnownType
Resolves the given class or interface declaration and returns the binding for it p The implementation of code Type Declaration resolve Binding code and code Type Declaration Statement resolve Binding code forwards to this method How the type declaration resolves is often a function of the context in which the type declaration node is embedded as well as the type declaration subtree itself p p The default implementation of this method returns code null code Subclasses may reimplement p param type the class or interface declaration of interest return the binding for the given type declaration or code null code if no binding is available I Type Binding resolve Type Type Declaration type return null  TypeDeclaration resolveBinding TypeDeclarationStatement resolveBinding ITypeBinding resolveType TypeDeclaration
Resolves the given enum declaration and returns the binding for it p The implementation of code Enum Declaration resolve Binding code forwards to this method How the enum declaration resolves is often a function of the context in which the declaration node is embedded as well as the enum declaration subtree itself p p The default implementation of this method returns code null code Subclasses may reimplement p param type the enum declaration of interest return the binding for the given enum declaration or code null code if no binding is available since 3 0 I Type Binding resolve Type Enum Declaration type return null  EnumDeclaration resolveBinding ITypeBinding resolveType EnumDeclaration
Resolves the given anonymous class declaration and returns the binding for it p The implementation of code Anonymous Class Declaration resolve Binding code forwards to this method How the declaration resolves is often a function of the context in which the declaration node is embedded as well as the declaration subtree itself p p The default implementation of this method returns code null code Subclasses may reimplement p param type the anonymous class declaration of interest return the binding for the given class declaration or code null code if no binding is available I Type Binding resolve Type Anonymous Class Declaration type return null  AnonymousClassDeclaration resolveBinding ITypeBinding resolveType AnonymousClassDeclaration
Resolves the given annotation type declaration and returns the binding for it p The implementation of code Annotation Type Declaration resolve Binding code forwards to this method How the declaration resolves is often a function of the context in which the declaration node is embedded as well as the declaration subtree itself p p The default implementation of this method returns code null code Subclasses may reimplement p param type the annotation type declaration of interest return the binding for the given annotation type declaration or code null code if no binding is available since 3 0 I Type Binding resolve Type Annotation Type Declaration type return null  AnnotationTypeDeclaration resolveBinding ITypeBinding resolveType AnnotationTypeDeclaration
Resolves the given method declaration and returns the binding for it p The implementation of code Method Declaration resolve Binding code forwards to this method How the method resolves is often a function of the context in which the method declaration node is embedded as well as the method declaration subtree itself p p The default implementation of this method returns code null code Subclasses may reimplement p param method the method or constructor declaration of interest return the binding for the given method declaration or code null code if no binding is available I Method Binding resolve Method Method Declaration method return null  MethodDeclaration resolveBinding IMethodBinding resolveMethod MethodDeclaration
Resolves the given method invocation and returns the binding for it p The implementation of code Method Invocation resolve Method Binding code forwards to this method How the method resolves is often a function of the context in which the method invocation node is embedded as well as the method invocation subtree itself p p The default implementation of this method returns code null code Subclasses may reimplement p param method the method invocation of interest return the binding for the given method invocation or code null code if no binding is available I Method Binding resolve Method Method Invocation method return null  MethodInvocation resolveMethodBinding IMethodBinding resolveMethod MethodInvocation
Resolves the given method invocation and returns the binding for it p The implementation of code Method Invocation resolve Method Binding code forwards to this method How the method resolves is often a function of the context in which the method invocation node is embedded as well as the method invocation subtree itself p p The default implementation of this method returns code null code Subclasses may reimplement p param method the method invocation of interest return the binding for the given method invocation or code null code if no binding is available I Method Binding resolve Method Super Method Invocation method return null  MethodInvocation resolveMethodBinding IMethodBinding resolveMethod SuperMethodInvocation
Resolves the given variable declaration and returns the binding for it p The implementation of code Variable Declaration resolve Binding code forwards to this method How the variable declaration resolves is often a function of the context in which the variable declaration node is embedded as well as the variable declaration subtree itself Variable Declaration declarations used as local variable formal parameter and exception variables resolve to local variable bindings variable declarations used to declare fields resolve to field bindings p p The default implementation of this method returns code null code Subclasses may reimplement p param variable the variable declaration of interest return the binding for the given variable declaration or code null code if no binding is available I Variable Binding resolve Variable Variable Declaration variable return null  VariableDeclaration resolveBinding VariableDeclaration IVariableBinding resolveVariable VariableDeclaration
Resolves the loop variable of the given enhanced for statement and returns the binding for it p The default implementation of this method returns code null code Subclasses may reimplement p param statement the enhanced for statement of interest return the binding for the loop variable for the given enhanced for statement or code null code if no binding is available since 3 0 I Variable Binding resolve Variable Enhanced For Statement statement return null  IVariableBinding resolveVariable EnhancedForStatement
Resolves the given enum constant declaration and returns the binding for the field p The implementation of code Enum Constant Declaration resolve Variable code forwards to this method p p The default implementation of this method returns code null code Subclasses may reimplement p param enum Constant the enum constant declaration of interest return the field binding for the given enum constant declaration or code null code if no binding is available since 3 0 I Variable Binding resolve Variable Enum Constant Declaration enum Constant return null  EnumConstantDeclaration resolveVariable enumConstant IVariableBinding resolveVariable EnumConstantDeclaration enumConstant
Resolves the given annotation type declaration and returns the binding for it p The implementation of code Annotation Type Member Declaration resolve Binding code forwards to this method How the declaration resolves is often a function of the context in which the declaration node is embedded as well as the declaration subtree itself p p The default implementation of this method returns code null code Subclasses may reimplement p param member the annotation type member declaration of interest return the binding for the given annotation type member declaration or code null code if no binding is available since 3 0 I Variable Binding resolve Member Annotation Type Member Declaration member return null  AnnotationTypeMemberDeclaration resolveBinding IVariableBinding resolveMember AnnotationTypeMemberDeclaration
Resolves the type of the given expression and returns the type binding for it p The implementation of code Expression resolve Type Binding code forwards to this method The result is often a function of the context in which the expression node is embedded as well as the expression subtree itself p p The default implementation of this method returns code null code Subclasses may reimplement p param expression the expression whose type is of interest return the binding for the type of the given expression or code null code if no binding is available I Type Binding resolve Expression Type Expression expression return null  resolveTypeBinding ITypeBinding resolveExpressionType
Resolves the given field access and returns the binding for it p The implementation of code Field Access resolve Field Binding code forwards to this method How the field resolves is often a function of the context in which the field access node is embedded as well as the field access subtree itself p p The default implementation of this method returns code null code Subclasses may reimplement p param field Access the field access of interest return the binding for the given field access or code null code if no binding is available I Variable Binding resolve Field Field Access field Access return null  FieldAccess resolveFieldBinding fieldAccess IVariableBinding resolveField FieldAccess fieldAccess
Resolves the given super field access and returns the binding for it p The implementation of code Super Field Access resolve Field Binding code forwards to this method How the field resolves is often a function of the context in which the super field access node is embedded as well as the super field access subtree itself p p The default implementation of this method returns code null code Subclasses may reimplement p param field Access the super field access of interest return the binding for the given field access or code null code if no binding is available I Variable Binding resolve Field Super Field Access field Access return null  SuperFieldAccess resolveFieldBinding fieldAccess IVariableBinding resolveField SuperFieldAccess fieldAccess
Resolves the given import declaration and returns the binding for it p The implementation of code Import Declaration resolve Binding code forwards to this method p p The default implementation of this method returns code null code Subclasses may reimplement p param import Declaration the import declaration of interest return the binding for the given package declaration or the package binding for on demand imports or type binding for single type imports or code null code if no binding is available I Binding resolve Import Import Declaration import Declaration return null  ImportDeclaration resolveBinding importDeclaration IBinding resolveImport ImportDeclaration importDeclaration
Resolves the given package declaration and returns the binding for it p The implementation of code Package Declaration resolve Binding code forwards to this method p p The default implementation of this method returns code null code Subclasses may reimplement p param pkg the package declaration of interest return the binding for the given package declaration or code null code if no binding is available I Package Binding resolve Package Package Declaration pkg return null  PackageDeclaration resolveBinding IPackageBinding resolvePackage PackageDeclaration
Resolves and returns the binding for the constructor being invoked p The implementation of code Constructor Invocation resolve Constructor code forwards to this method Which constructor is invoked is often a function of the context in which the expression node is embedded as well as the expression subtree itself p p The default implementation of this method returns code null code Subclasses may reimplement p param expression the expression of interest return the binding for the constructor being invoked or code null code if no binding is available I Method Binding resolve Constructor Constructor Invocation expression return null  ConstructorInvocation resolveConstructor IMethodBinding resolveConstructor ConstructorInvocation
Resolves and returns the binding for the constructor being invoked p The implementation of code Super Constructor Invocation resolve Constructor code forwards to this method Which constructor is invoked is often a function of the context in which the expression node is embedded as well as the expression subtree itself p p The default implementation of this method returns code null code Subclasses may reimplement p param expression the expression of interest return the binding for the constructor being invoked or code null code if no binding is available I Method Binding resolve Constructor Super Constructor Invocation expression return null  SuperConstructorInvocation resolveConstructor IMethodBinding resolveConstructor SuperConstructorInvocation
Resolves and returns the binding for the constructor being invoked p The implementation of code Class Instance Creation resolve Constructor code forwards to this method Which constructor is invoked is often a function of the context in which the expression node is embedded as well as the expression subtree itself p p The default implementation of this method returns code null code Subclasses may reimplement p param expression the expression of interest return the binding for the constructor being invoked or code null code if no binding is available I Method Binding resolve Constructor Class Instance Creation expression return null  ClassInstanceCreation resolveConstructor IMethodBinding resolveConstructor ClassInstanceCreation
Resolves the given reference and returns the binding for it p The implementation of code Member Ref resolve Binding code forwards to this method How the name resolves is often a function of the context in which the name node is embedded as well as the name itself p p The default implementation of this method returns code null code Subclasses may reimplement p param ref the reference of interest return the binding for the reference or code null code if no binding is available since 3 0 I Binding resolve Reference Member Ref ref return null  MemberRef resolveBinding IBinding resolveReference MemberRef
Resolves the given reference and returns the binding for it p The implementation of code Method Ref resolve Binding code forwards to this method How the name resolves is often a function of the context in which the name node is embedded as well as the name itself p p The default implementation of this method returns code null code Subclasses may reimplement p param ref the reference of interest return the binding for the reference or code null code if no binding is available since 3 0 I Binding resolve Reference Method Ref ref return null  MethodRef resolveBinding IBinding resolveReference MethodRef
Finds the corresponding AST node from which the given binding originated Returns code null code if the binding does not correspond to any node in the compilation unit p The following table indicates the expected node type for the various different kinds of bindings ul li li li package a code Package Declaration code li li class or interface a code Type Declaration code or a code Class Instance Creation code for anonymous classes li li primitive type none li li array type none li li field a code Variable Declaration Fragment code in a code Field Declaration code li li local variable a code Single Variable Declaration code or a code Variable Declaration Fragment code in a code Variable Declaration Statement code or code Variable Declaration Expression code li li method a code Method Declaration code li li constructor a code Method Declaration code li li annotation type an code Annotation Type Declaration code li annotation type member an code Annotation Type Member Declaration code ul p p The implementation of code Compilation Unit find Declaring Node code forwards to this method p p The default implementation of this method returns code null code Subclasses may reimplement p param binding the binding return the corresponding node where the bindings is declared or code null code if none AST Node find Declaring Node I Binding binding return null  PackageDeclaration TypeDeclaration ClassInstanceCreation VariableDeclarationFragment FieldDeclaration SingleVariableDeclaration VariableDeclarationFragment VariableDeclarationStatement VariableDeclarationExpression MethodDeclaration MethodDeclaration AnnotationTypeDeclaration AnnotationTypeMemberDeclaration CompilationUnit findDeclaringNode ASTNode findDeclaringNode IBinding
Finds the corresponding AST node from which the given binding key originated The default implementation of this method returns code null code Subclasses may reimplement p param binding Key the binding key return the corresponding node where the bindings is declared or code null code if none AST Node find Declaring Node String binding Key return null  bindingKey ASTNode findDeclaringNode bindingKey
Returns the new type binding corresponding to the given old type binding p The default implementation of this method returns code null code Subclasses may reimplement p param reference Binding the old type binding return the new type binding I Type Binding get Type Binding org eclipse jdt internal compiler lookup Type Binding reference Binding return null  referenceBinding ITypeBinding getTypeBinding TypeBinding referenceBinding
Returns the new package binding corresponding to the given old package binding p The default implementation of this method returns code null code Subclasses may reimplement p param package Binding the old package binding return the new package binding I Package Binding get Package Binding org eclipse jdt internal compiler lookup Package Binding package Binding return null  packageBinding IPackageBinding getPackageBinding PackageBinding packageBinding
Returns the new method binding corresponding to the given old method binding p The default implementation of this method returns code null code Subclasses may reimplement p param method Binding the old method binding return the new method binding I Method Binding get Method Binding org eclipse jdt internal compiler lookup Method Binding method Binding return null  methodBinding IMethodBinding getMethodBinding MethodBinding methodBinding
Returns the new variable binding corresponding to the given old variable binding p The default implementation of this method returns code null code Subclasses may reimplement p param binding the old variable binding return the new variable binding I Variable Binding get Variable Binding org eclipse jdt internal compiler lookup Variable Binding binding return null  IVariableBinding getVariableBinding VariableBinding
Allows the user to update information about the given old new pair of AST nodes p The default implementation of this method does nothing Subclasses may reimplement p param node the old AST node param new Node the new AST node void update Key AST Node node AST Node new Node default implementation do nothing  newNode updateKey ASTNode ASTNode newNode
Allows the user to get information about the given old new pair of AST nodes p The default implementation of this method does nothing Subclasses may reimplement p param current Node the new node return org eclipse jdt internal compiler ast AST Node org eclipse jdt internal compiler ast AST Node get Corresponding Node AST Node current Node return null  currentNode ASTNode ASTNode getCorrespondingNode ASTNode currentNode
This method is used to record the scope and its corresponding node p The default implementation of this method does nothing Subclasses may reimplement p param ast Node void record Scope AST Node ast Node Block Scope block Scope default implementation do nothing  astNode recordScope ASTNode astNode BlockScope blockScope

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented block node owned by the given AST By default the block is empty p N B This constructor is package private p param ast the AST that is to own this node Block AST ast super ast 
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final List internal Get Child List Property Child List Property Descriptor property if property STATEMENTS PROPERTY return statements allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor STATEMENTS_PROPERTY internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return BLOCK  ASTNode getNodeType0
AST Node clone0 AST target Block result new Block target result set Source Range this get Start Position this get Length result copy Leading Comment this result statements add All AST Node copy Subtrees target statements return result  ASTNode setSourceRange getStartPosition getLength copyLeadingComment addAll ASTNode copySubtrees
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Children visitor this statements visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChildren endVisit
Returns the live list of statements in this block Adding and removing nodes from this list affects this node dynamically All nodes in this list must be code Statement code s attempts to add any other type of node will trigger an exception return the live list of statements in this block element type code Statement code public List statements return this statements 
Method declared on AST Node int mem Size return super mem Size 1 4  ASTNode memSize memSize
Method declared on AST Node int tree Size return mem Size this statements list Size  ASTNode treeSize memSize listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new block comment node owned by the given AST p N B This constructor is package private p param ast the AST that is to own this node Block Comment AST ast super ast  BlockComment
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
Method declared on AST Node final int get Node Type0 return BLOCK COMMENT  ASTNode getNodeType0 BLOCK_COMMENT
AST Node clone0 AST target Block Comment result new Block Comment target result set Source Range this get Start Position this get Length return result  ASTNode BlockComment BlockComment setSourceRange getStartPosition getLength
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
Method declared on AST Node void accept0 AST Visitor visitor visitor visit this visitor end Visit this  ASTNode ASTVisitor endVisit
Method declared on AST Node int mem Size return super mem Size  ASTNode memSize memSize
Method declared on AST Node int tree Size return mem Size  ASTNode treeSize memSize

Returns structural property descriptor for the modifiers property of this node return the property descriptor 
Returns structural property descriptor for the modifiers property of this node return the property descriptor 
Returns structural property descriptor for the javadoc property of this node return the property descriptor 
Creates and returns a structural property descriptor for the javadoc property declared on the given concrete node type return the property descriptor static final Child Property Descriptor internal Javadoc Property Factory Class node Class return new Child Property Descriptor node Class javadoc Javadoc class OPTIONAL NO CYCLE RISK NON NLS 1  ChildPropertyDescriptor internalJavadocPropertyFactory nodeClass ChildPropertyDescriptor nodeClass NO_CYCLE_RISK
Creates and returns a structural property descriptor for the modifiers property declared on the given concrete node type return the property descriptor static final Simple Property Descriptor internal Modifiers Property Factory Class node Class return new Simple Property Descriptor node Class modifiers int class MANDATORY NON NLS 1  SimplePropertyDescriptor internalModifiersPropertyFactory nodeClass SimplePropertyDescriptor nodeClass
Creates and returns a structural property descriptor for the modifiers property declared on the given concrete node type return the property descriptor static final Child List Property Descriptor internal Modifiers2 Property Factory Class node Class return new Child List Property Descriptor node Class modifiers I Extended Modifier class CYCLE RISK NON NLS 1  ChildListPropertyDescriptor internalModifiers2PropertyFactory nodeClass ChildListPropertyDescriptor nodeClass IExtendedModifier CYCLE_RISK
Creates a new AST node for a body declaration node owned by the given AST p N B This constructor is package private p param ast the AST that is to own this node Body Declaration AST ast super ast if ast api Level AST JLS3 this modifiers new AST Node Node List internal Modifiers2 Property  BodyDeclaration apiLevel ASTNode NodeList internalModifiers2Property
Returns the doc comment node return the doc comment node or code null code if none public Javadoc get Javadoc return this optional Doc Comment  getJavadoc optionalDocComment
Sets or clears the doc comment node param doc Comment the doc comment node or code null code if none exception Illegal Argument Exception if the doc comment string is invalid public void set Javadoc Javadoc doc Comment Child Property Descriptor p internal Javadoc Property AST Node old Child this optional Doc Comment pre Replace Child old Child doc Comment p this optional Doc Comment doc Comment post Replace Child old Child doc Comment p  docComment IllegalArgumentException setJavadoc docComment ChildPropertyDescriptor internalJavadocProperty ASTNode oldChild optionalDocComment preReplaceChild oldChild docComment optionalDocComment docComment postReplaceChild oldChild docComment
Returns the modifiers explicitly specified on this declaration p In the JLS3 API this method is a convenience method that computes these flags from code modifiers code p return the bit wise or of code Modifier code constants see Modifier public int get Modifiers more efficient than checking getAST API LEVEL if this modifiers null JLS2 behavior bona fide property return this modifier Flags else JLS3 behavior convenience method performance could be improved by caching computed flags but this would require tracking changes to this modifiers int computedmodifier Flags Modifier NONE for Iterator it modifiers iterator it has Next Object x it next if x instanceof Modifier computedmodifier Flags Modifier x get Keyword to Flag Value return computedmodifier Flags  getModifiers API_LEVEL modifierFlags computedmodifierFlags hasNext computedmodifierFlags getKeyword toFlagValue computedmodifierFlags
Sets the modifiers explicitly specified on this declaration JLS2 API only param modifiers the given modifiers bit wise or of code Modifier code constants exception Unsupported Operation Exception if this operation is used in an AST later than JLS2 see Modifier TODO jeem When JLS3 support is complete post 3 0 deprecated In the JLS3 API this method is replaced by code modifiers code which contains a list of a code Modifier code nodes public void set Modifiers int modifiers more efficient than just calling supported Only In2 to check if this modifiers null supported Only In2 Simple Property Descriptor p internal Modifiers Property pre Value Change p this modifier Flags modifiers post Value Change p  UnsupportedOperationException setModifiers supportedOnlyIn2 supportedOnlyIn2 SimplePropertyDescriptor internalModifiersProperty preValueChange modifierFlags postValueChange
Returns the live ordered list of modifiers and annotations of this declaration added in JLS3 API return the live list of modifiers and annotations element type code I Extended Modifier code exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public List modifiers more efficient than just calling unsupported In2 to check if this modifiers null unsupported In2 return this modifiers  IExtendedModifier UnsupportedOperationException unsupportedIn2 unsupportedIn2
Method declared on AST Node int mem Size return BASE NODE SIZE 3 4  ASTNode memSize BASE_NODE_SIZE

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented boolean literal node owned by the given AST p N B This constructor is package private p param ast the AST that is to own this node Boolean Literal AST ast super ast  BooleanLiteral
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final boolean internal Get Set Boolean Property Simple Property Descriptor property boolean get boolean new Value if property BOOLEAN VALUE PROPERTY if get return boolean Value else set Boolean Value new Value return false allow default implementation to flag the error return super internal Get Set Boolean Property property get new Value  internalGetSetBooleanProperty SimplePropertyDescriptor newValue BOOLEAN_VALUE_PROPERTY booleanValue setBooleanValue newValue internalGetSetBooleanProperty newValue
Method declared on AST Node final int get Node Type0 return BOOLEAN LITERAL  ASTNode getNodeType0 BOOLEAN_LITERAL
AST Node clone0 AST target Boolean Literal result new Boolean Literal target result set Source Range this get Start Position this get Length result set Boolean Value boolean Value return result  ASTNode BooleanLiteral BooleanLiteral setSourceRange getStartPosition getLength setBooleanValue booleanValue
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
Method declared on AST Node void accept0 AST Visitor visitor visitor visit this visitor end Visit this  ASTNode ASTVisitor endVisit
Returns the boolean value of this boolean literal node return code true code for the boolean literal spelled code true code and code false code for the boolean literal spelled code false code public boolean boolean Value return this value  booleanValue
Sets the boolean value of this boolean literal node param value code true code for the boolean literal spelled code true code and code false code for the boolean literal spelled code false code public void set Boolean Value boolean value pre Value Change BOOLEAN VALUE PROPERTY this value value post Value Change BOOLEAN VALUE PROPERTY  setBooleanValue preValueChange BOOLEAN_VALUE_PROPERTY postValueChange BOOLEAN_VALUE_PROPERTY
Method declared on AST Node int mem Size return BASE NODE SIZE 1 4  ASTNode memSize BASE_NODE_SIZE
Method declared on AST Node int tree Size return mem Size  ASTNode treeSize memSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented break statement node owned by the given AST By default the break statement has no label p N B This constructor is package private p param ast the AST that is to own this node Break Statement AST ast super ast  BreakStatement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property LABEL PROPERTY if get return get Label else set Label Simple Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode LABEL_PROPERTY getLabel setLabel SimpleName internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return BREAK STATEMENT  ASTNode getNodeType0 BREAK_STATEMENT
AST Node clone0 AST target Break Statement result new Break Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Label Simple Name AST Node copy Subtree target get Label return result  ASTNode BreakStatement BreakStatement setSourceRange getStartPosition getLength copyLeadingComment setLabel SimpleName ASTNode copySubtree getLabel
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Child visitor get Label visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getLabel endVisit
Returns the label of this break statement or code null code if there is none return the label or code null code if there is none public Simple Name get Label return this optional Label  SimpleName getLabel optionalLabel
Sets or clears the label of this break statement param label the label or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Label Simple Name label AST Node old Child this optional Label pre Replace Child old Child label LABEL PROPERTY this optional Label label post Replace Child old Child label LABEL PROPERTY  IllegalArgumentException setLabel SimpleName ASTNode oldChild optionalLabel preReplaceChild oldChild LABEL_PROPERTY optionalLabel postReplaceChild oldChild LABEL_PROPERTY
Method declared on AST Node int mem Size return super mem Size 1 4  ASTNode memSize memSize
int tree Size return mem Size this optional Label null 0 get Label tree Size  treeSize memSize optionalLabel getLabel treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a cast expression owned by the given AST By default the type and expression are unspecified but legal p N B This constructor is package private p param ast the AST that is to own this node Cast Expression AST ast super ast  CastExpression
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null if property TYPE PROPERTY if get return get Type else set Type Type child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression TYPE_PROPERTY getType setType internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return CAST EXPRESSION  ASTNode getNodeType0 CAST_EXPRESSION
AST Node clone0 AST target Cast Expression result new Cast Expression target result set Source Range this get Start Position this get Length result set Type Type get Type clone target result set Expression Expression get Expression clone target return result  ASTNode CastExpression CastExpression setSourceRange getStartPosition getLength setType getType setExpression getExpression
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Type accept Child visitor get Expression visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getType acceptChild getExpression endVisit
Returns the type in this cast expression return the type public Type get Type if this type null lazy init must be thread safe for readers synchronized this if this type null pre Lazy Init this type this ast new Primitive Type Primitive Type INT post Lazy Init this type TYPE PROPERTY return this type  getType preLazyInit newPrimitiveType PrimitiveType postLazyInit TYPE_PROPERTY
Sets the type in this cast expression to the given type param type the new type exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Type Type type if type null throw new Illegal Argument Exception AST Node old Child this type pre Replace Child old Child type TYPE PROPERTY this type type post Replace Child old Child type TYPE PROPERTY  IllegalArgumentException setType IllegalArgumentException ASTNode oldChild preReplaceChild oldChild TYPE_PROPERTY postReplaceChild oldChild TYPE_PROPERTY
Returns the expression of this cast expression return the expression node public Expression get Expression if this expression null lazy init must be thread safe for readers synchronized this if this expression null pre Lazy Init this expression new Simple Name this ast post Lazy Init this expression EXPRESSION PROPERTY return this expression  getExpression preLazyInit SimpleName postLazyInit EXPRESSION_PROPERTY
Sets the expression of this cast expression param expression the new expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this expression pre Replace Child old Child expression EXPRESSION PROPERTY this expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression IllegalArgumentException ASTNode oldChild preReplaceChild oldChild EXPRESSION_PROPERTY postReplaceChild oldChild EXPRESSION_PROPERTY
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this expression null 0 get Expression tree Size this type null 0 get Type tree Size  treeSize memSize getExpression treeSize getType treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a catch clause owned by the given AST By default the catch clause declares an unspecified but legal exception declaration and has an empty block p N B This constructor is package private p param ast the AST that is to own this node Catch Clause AST ast super ast  CatchClause
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXCEPTION PROPERTY if get return get Exception else set Exception Single Variable Declaration child return null if property BODY PROPERTY if get return get Body else set Body Block child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXCEPTION_PROPERTY getException setException SingleVariableDeclaration BODY_PROPERTY getBody setBody internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return CATCH CLAUSE  ASTNode getNodeType0 CATCH_CLAUSE
AST Node clone0 AST target Catch Clause result new Catch Clause target result set Source Range this get Start Position this get Length result set Body Block get Body clone target result set Exception Single Variable Declaration AST Node copy Subtree target get Exception return result  ASTNode CatchClause CatchClause setSourceRange getStartPosition getLength setBody getBody setException SingleVariableDeclaration ASTNode copySubtree getException
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Exception accept Child visitor get Body visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getException acceptChild getBody endVisit
Returns the exception variable declaration of this catch clause return the exception variable declaration node public Single Variable Declaration get Exception if this exception Decl null lazy init must be thread safe for readers synchronized this if this exception Decl null pre Lazy Init this exception Decl new Single Variable Declaration this ast post Lazy Init this exception Decl EXCEPTION PROPERTY return this exception Decl  SingleVariableDeclaration getException exceptionDecl exceptionDecl preLazyInit exceptionDecl SingleVariableDeclaration postLazyInit exceptionDecl EXCEPTION_PROPERTY exceptionDecl
Sets the variable declaration of this catch clause param exception the exception variable declaration node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Exception Single Variable Declaration exception if exception null throw new Illegal Argument Exception AST Node old Child this exception Decl pre Replace Child old Child exception EXCEPTION PROPERTY this exception Decl exception post Replace Child old Child exception EXCEPTION PROPERTY  IllegalArgumentException setException SingleVariableDeclaration IllegalArgumentException ASTNode oldChild exceptionDecl preReplaceChild oldChild EXCEPTION_PROPERTY exceptionDecl postReplaceChild oldChild EXCEPTION_PROPERTY
Returns the body of this catch clause return the catch clause body public Block get Body if this body null lazy init must be thread safe for readers synchronized this if this body null pre Lazy Init this body new Block this ast post Lazy Init this body BODY PROPERTY return this body  getBody preLazyInit postLazyInit BODY_PROPERTY
Sets the body of this catch clause param body the catch clause block node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Body Block body if body null throw new Illegal Argument Exception AST Node old Child this body pre Replace Child old Child body BODY PROPERTY this body body post Replace Child old Child body BODY PROPERTY  IllegalArgumentException setBody IllegalArgumentException ASTNode oldChild preReplaceChild oldChild BODY_PROPERTY postReplaceChild oldChild BODY_PROPERTY
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this exception Decl null 0 get Exception tree Size this body null 0 get Body tree Size  treeSize memSize exceptionDecl getException treeSize getBody treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented character literal node owned by the given AST By default the character literal denotes an unspecified character p N B This constructor is package private p param ast the AST that is to own this node Character Literal AST ast super ast  CharacterLiteral
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final Object internal Get Set Object Property Simple Property Descriptor property boolean get Object value if property ESCAPED VALUE PROPERTY if get return get Escaped Value else set Escaped Value String value return null allow default implementation to flag the error return super internal Get Set Object Property property get value  internalGetSetObjectProperty SimplePropertyDescriptor ESCAPED_VALUE_PROPERTY getEscapedValue setEscapedValue internalGetSetObjectProperty
Method declared on AST Node final int get Node Type0 return CHARACTER LITERAL  ASTNode getNodeType0 CHARACTER_LITERAL
AST Node clone0 AST target Character Literal result new Character Literal target result set Source Range this get Start Position this get Length result set Escaped Value get Escaped Value return result  ASTNode CharacterLiteral CharacterLiteral setSourceRange getStartPosition getLength setEscapedValue getEscapedValue
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
Method declared on AST Node void accept0 AST Visitor visitor visitor visit this visitor end Visit this  ASTNode ASTVisitor endVisit
Returns the string value of this literal node The value is the sequence of characters that would appear in the source program including enclosing single quotes and embedded escapes return the escaped string value including enclosing single quotes and embedded escapes public String get Escaped Value return this escaped Value  getEscapedValue escapedValue
Sets the string value of this literal node The value is the sequence of characters that would appear in the source program including enclosing single quotes and embedded escapes For example ul li code a code code set Escaped Value a code li li code n code code set Escaped Value n code li ul param value the string value including enclosing single quotes and embedded escapes exception Illegal Argument Exception if the argument is incorrect public void set Escaped Value String value if value null throw new Illegal Argument Exception Scanner scanner this ast scanner char source value to Char Array scanner set Source source scanner reset To 0 source length try int token Type scanner get Next Token switch token Type case Terminal Tokens Token Name Character Literal break default throw new Illegal Argument Exception catch Invalid Input Exception e throw new Illegal Argument Exception pre Value Change ESCAPED VALUE PROPERTY this escaped Value value post Value Change ESCAPED VALUE PROPERTY  setEscapedValue setEscapedValue IllegalArgumentException setEscapedValue IllegalArgumentException toCharArray setSource resetTo tokenType getNextToken tokenType TerminalTokens TokenNameCharacterLiteral IllegalArgumentException InvalidInputException IllegalArgumentException preValueChange ESCAPED_VALUE_PROPERTY escapedValue postValueChange ESCAPED_VALUE_PROPERTY
Returns the value of this literal node p For example pre Character Literal s s set Escaped Value x assert s char Value x pre p return the character value without enclosing quotes and embedded escapes exception Illegal Argument Exception if the literal value cannot be converted public char char Value String s get Escaped Value int len s length if len 2 s char At 0 s char At len 1 throw new Illegal Argument Exception char c s char At 1 if c throw new Illegal Argument Exception if c if len 4 char next Char s char At 2 switch next Char case b return b case t return t case n return n case f return f case r return r case return case return case return case 0 return 0 case 1 return 1 case 2 return 2 case 3 return 3 case 4 return 4 case 5 return 5 case 6 return 6 case 7 return 7 default throw new Illegal Argument Exception illegal character literal NON NLS 1 else if len 8 handle the case of unicode int current Position 2 int c1 0 c2 0 c3 0 c4 0 if s char At current Position u if c1 Character get Numeric Value s char At current Position 15 c1 0 c2 Character get Numeric Value s char At current Position 15 c2 0 c3 Character get Numeric Value s char At current Position 15 c3 0 c4 Character get Numeric Value s char At current Position 15 c4 0 throw new Illegal Argument Exception illegal character literal NON NLS 1 else return char c1 16 c2 16 c3 16 c4 else throw new Illegal Argument Exception illegal character literal NON NLS 1 else throw new Illegal Argument Exception illegal character literal NON NLS 1 return c  CharacterLiteral setEscapedValue charValue IllegalArgumentException charValue getEscapedValue charAt charAt IllegalArgumentException charAt IllegalArgumentException nextChar charAt nextChar IllegalArgumentException currentPosition charAt currentPosition getNumericValue charAt currentPosition getNumericValue charAt currentPosition getNumericValue charAt currentPosition getNumericValue charAt currentPosition IllegalArgumentException IllegalArgumentException IllegalArgumentException
Sets the value of this character literal node to the given character p For example pre Character Literal s s set Char Value x assert s char Value x assert s get Escaped Value x pre p param value the character value public void set Char Value char value String Buffer b new String Buffer 3 b append opening delimiter switch value case b b append b NON NLS 1 break case t b append t NON NLS 1 break case n b append n NON NLS 1 break case f b append f NON NLS 1 break case r b append r NON NLS 1 break case b append NON NLS 1 break case b append NON NLS 1 break case b append NON NLS 1 break case 0 b append 0 NON NLS 1 break case 1 b append 1 NON NLS 1 break case 2 b append 2 NON NLS 1 break case 3 b append 3 NON NLS 1 break case 4 b append 4 NON NLS 1 break case 5 b append 5 NON NLS 1 break case 6 b append 6 NON NLS 1 break case 7 b append 7 NON NLS 1 break default b append value b append closing delimiter set Escaped Value b to String  CharacterLiteral setCharValue charValue getEscapedValue setCharValue StringBuffer StringBuffer setEscapedValue toString
Method declared on AST Node int mem Size int size BASE NODE SIZE 1 4 string Size escaped Value return size  ASTNode memSize BASE_NODE_SIZE stringSize escapedValue
Method declared on AST Node int tree Size return mem Size  ASTNode treeSize memSize

Creates a new child list property descriptor with the given property id Note that this constructor is declared package private so that property descriptors can only be created by the AST implementation param node Class concrete AST node type that owns this property param property Id the property id param element Type the element type of this property param cycle Risk code true code if this property is at risk of cycles and code false code if there is no worry about cycles Child List Property Descriptor Class node Class String property Id Class element Type boolean cycle Risk super node Class property Id if element Type null throw new Illegal Argument Exception this element Type element Type this cycle Risk cycle Risk  nodeClass propertyId elementType cycleRisk ChildListPropertyDescriptor nodeClass propertyId elementType cycleRisk nodeClass propertyId elementType IllegalArgumentException elementType elementType cycleRisk cycleRisk
Returns the element type of this list property p For example for a node type like Compilation Unit the imports property returns code Import Declaration class code p return the element type of the property public final Class get Element Type return this element Type  CompilationUnit ImportDeclaration getElementType elementType
Returns whether this property is vulnerable to cycles p A property is vulnerable to cycles if a node of the owning type that is the type that owns this property could legally appear in the AST subtree below this property For example the body property of a link Method Declaration node admits a body which might include statement that embeds another link Method Declaration node On the other hand the name property of a Method Declaration node admits only names and thereby excludes another Method Declaration node p return code true code if cycles are possible and code false code if cycles are impossible public final boolean cycle Risk return this cycle Risk  MethodDeclaration MethodDeclaration MethodDeclaration MethodDeclaration cycleRisk cycleRisk

Creates a new child property descriptor with the given property id Note that this constructor is declared package private so that property descriptors can only be created by the AST implementation param node Class concrete AST node type that owns this property param property Id the property id param child Type the child type of this property param mandatory code true code if the property is mandatory and code false code if it is may be code null code param cycle Risk code true code if this property is at risk of cycles and code false code if there is no worry about cycles Child Property Descriptor Class node Class String property Id Class child Type boolean mandatory boolean cycle Risk super node Class property Id if child Type null AST Node class is Assignable From child Type throw new Illegal Argument Exception this child Class child Type this mandatory mandatory this cycle Risk cycle Risk  nodeClass propertyId childType cycleRisk ChildPropertyDescriptor nodeClass propertyId childType cycleRisk nodeClass propertyId childType ASTNode isAssignableFrom childType IllegalArgumentException childClass childType cycleRisk cycleRisk
Returns the child type of this property p For example for a node type like Compilation Unit the package property returns code Package Declaration class code p return the child type of the property public final Class get Child Type return this child Class  CompilationUnit PackageDeclaration getChildType childClass
Returns whether this property is mandatory A property value is not allowed to be code null code if it is mandatory return code true code if the property is mandatory and code false code if it is may be code null code public final boolean is Mandatory return this mandatory  isMandatory
Returns whether this property is vulnerable to cycles p A property is vulnerable to cycles if a node of the owning type that is the type that owns this property could legally appear in the AST subtree below this property For example the body property of a link Method Declaration node admits a body which might include statement that embeds another link Method Declaration node On the other hand the name property of a Method Declaration node admits only names and thereby excludes another Method Declaration node p return code true code if cycles are possible and code false code if cycles are impossible public final boolean cycle Risk return this cycle Risk  MethodDeclaration MethodDeclaration MethodDeclaration MethodDeclaration cycleRisk cycleRisk

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new AST node for a class instance creation expression owned by the given AST By default there is no qualifying expression an empty list of type parameters an unspecified type an empty list of arguments and does not declare an anonymous class p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Class Instance Creation AST ast super ast if ast api Level AST JLS3 this type Arguments new AST Node Node List TYPE ARGUMENTS PROPERTY  ClassInstanceCreation apiLevel typeArguments ASTNode NodeList TYPE_ARGUMENTS_PROPERTY
since 3 0 final List internal Structural Properties For Type int api Level return property Descriptors api Level  internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null if property NAME PROPERTY if get return get Name else set Name Name child return null if property TYPE PROPERTY if get return get Type else set Type Type child return null if property ANONYMOUS CLASS DECLARATION PROPERTY if get return get Anonymous Class Declaration else set Anonymous Class Declaration Anonymous Class Declaration child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression NAME_PROPERTY getName setName TYPE_PROPERTY getType setType ANONYMOUS_CLASS_DECLARATION_PROPERTY getAnonymousClassDeclaration setAnonymousClassDeclaration AnonymousClassDeclaration internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property ARGUMENTS PROPERTY return arguments if property TYPE ARGUMENTS PROPERTY return type Arguments allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor ARGUMENTS_PROPERTY TYPE_ARGUMENTS_PROPERTY typeArguments internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return CLASS INSTANCE CREATION  ASTNode getNodeType0 CLASS_INSTANCE_CREATION
AST Node clone0 AST target Class Instance Creation result new Class Instance Creation target result set Source Range this get Start Position this get Length result set Expression Expression AST Node copy Subtree target get Expression if this ast api Level AST JLS2 result set Name Name get Name clone target if this ast api Level AST JLS3 result type Arguments add All AST Node copy Subtrees target type Arguments result set Type Type get Type clone target result arguments add All AST Node copy Subtrees target arguments result set Anonymous Class Declaration Anonymous Class Declaration AST Node copy Subtree target get Anonymous Class Declaration return result  ASTNode ClassInstanceCreation ClassInstanceCreation setSourceRange getStartPosition getLength setExpression ASTNode copySubtree getExpression apiLevel setName getName apiLevel typeArguments addAll ASTNode copySubtrees typeArguments setType getType addAll ASTNode copySubtrees setAnonymousClassDeclaration AnonymousClassDeclaration ASTNode copySubtree getAnonymousClassDeclaration
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Expression if this ast api Level AST JLS2 accept Child visitor get Name if this ast api Level AST JLS3 accept Children visitor this type Arguments accept Child visitor get Type accept Children visitor this arguments accept Child visitor get Anonymous Class Declaration visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getExpression apiLevel acceptChild getName apiLevel acceptChildren typeArguments acceptChild getType acceptChildren acceptChild getAnonymousClassDeclaration endVisit
Returns the expression of this class instance creation expression or code null code if there is none return the expression node or code null code if there is none public Expression get Expression return this optional Expression  getExpression optionalExpression
Sets or clears the expression of this class instance creation expression param expression the expression node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression a Class Instance Creation may occur inside an Expression must check cycles AST Node old Child this optional Expression pre Replace Child old Child expression EXPRESSION PROPERTY this optional Expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression ClassInstanceCreation ASTNode oldChild optionalExpression preReplaceChild oldChild EXPRESSION_PROPERTY optionalExpression postReplaceChild oldChild EXPRESSION_PROPERTY
Returns the live ordered list of type arguments of this class instance creation added in JLS3 API p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p return the live list of type arguments element type code Type code exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public List type Arguments more efficient than just calling unsupported In2 to check if this type Arguments null unsupported In2 return this type Arguments  UnsupportedOperationException typeArguments unsupportedIn2 typeArguments unsupportedIn2 typeArguments
Returns the name of the type instantiated in this class instance creation expression JLS2 API only return the type name node exception Unsupported Operation Exception if this operation is used in an AST later than JLS2 TODO jeem When JLS3 support is complete post 3 0 deprecated In the JLS3 API this method is replaced by code get Type code which returns a code Type code instead of a code Name code public Name get Name supported Only In2 if this type Name null lazy init must be thread safe for readers synchronized this if this type Name null pre Lazy Init this type Name new Simple Name this ast post Lazy Init this type Name NAME PROPERTY return type Name  UnsupportedOperationException getType getName supportedOnlyIn2 typeName typeName preLazyInit typeName SimpleName postLazyInit typeName NAME_PROPERTY typeName
Sets the name of the type instantiated in this class instance creation expression JLS2 API only param name the new type name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul exception Unsupported Operation Exception if this operation is used in an AST later than JLS2 TODO jeem When JLS3 support is complete post 3 0 deprecated In the JLS3 API this method is replaced by code set Type code which expects a code Type code instead of a code Name code public void set Name Name name supported Only In2 if name null throw new Illegal Argument Exception AST Node old Child this type Name pre Replace Child old Child name NAME PROPERTY this type Name name post Replace Child old Child name NAME PROPERTY  IllegalArgumentException UnsupportedOperationException setType setName supportedOnlyIn2 IllegalArgumentException ASTNode oldChild typeName preReplaceChild oldChild NAME_PROPERTY typeName postReplaceChild oldChild NAME_PROPERTY
Returns the type instantiated in this class instance creation expression added in JLS3 API return the type node exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Type get Type unsupported In2 if this type null lazy init must be thread safe for readers synchronized this if this type null pre Lazy Init this type new Simple Type this ast post Lazy Init this type TYPE PROPERTY return this type  UnsupportedOperationException getType unsupportedIn2 preLazyInit SimpleType postLazyInit TYPE_PROPERTY
Sets the type instantiated in this class instance creation expression added in JLS3 API param type the new type exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public void set Type Type type unsupported In2 if type null throw new Illegal Argument Exception AST Node old Child this type pre Replace Child old Child type TYPE PROPERTY this type type post Replace Child old Child type TYPE PROPERTY  IllegalArgumentException UnsupportedOperationException setType unsupportedIn2 IllegalArgumentException ASTNode oldChild preReplaceChild oldChild TYPE_PROPERTY postReplaceChild oldChild TYPE_PROPERTY
Returns the live ordered list of argument expressions in this class instance creation expression return the live list of argument expressions possibly empty element type code Expression code public List arguments return this arguments 
Returns the anonymous class declaration introduced by this class instance creation expression if it has one return the anonymous class declaration or code null code if none public Anonymous Class Declaration get Anonymous Class Declaration return this optional Anonymous Class Declaration  AnonymousClassDeclaration getAnonymousClassDeclaration optionalAnonymousClassDeclaration
Sets whether this class instance creation expression declares an anonymous class that is has class body declarations param decl the anonymous class declaration or code null code if none public void set Anonymous Class Declaration Anonymous Class Declaration decl AST Node old Child this optional Anonymous Class Declaration pre Replace Child old Child decl ANONYMOUS CLASS DECLARATION PROPERTY this optional Anonymous Class Declaration decl post Replace Child old Child decl ANONYMOUS CLASS DECLARATION PROPERTY  setAnonymousClassDeclaration AnonymousClassDeclaration ASTNode oldChild optionalAnonymousClassDeclaration preReplaceChild oldChild ANONYMOUS_CLASS_DECLARATION_PROPERTY optionalAnonymousClassDeclaration postReplaceChild oldChild ANONYMOUS_CLASS_DECLARATION_PROPERTY
Resolves and returns the binding for the constructor invoked by this expression For anonymous classes the binding is that of the anonymous constructor p Note that bindings are generally unavailable unless requested when the AST is being built p return the constructor binding or code null code if the binding cannot be resolved public I Method Binding resolve Constructor Binding return this ast get Binding Resolver resolve Constructor this  IMethodBinding resolveConstructorBinding getBindingResolver resolveConstructor
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 6 4  ASTNode memSize BASE_NODE_SIZE
int tree Size n b type null for ast API LEVEL JLS2 n b type Arguments null for ast API LEVEL JLS2 n b type Name null for ast API LEVEL JLS3 return mem Size this type Name null 0 get Name tree Size this type null 0 get Type tree Size this optional Expression null 0 get Expression tree Size this type Arguments null 0 this type Arguments list Size this arguments null 0 this arguments list Size this optional Anonymous Class Declaration null 0 get Anonymous Class Declaration tree Size  treeSize API_LEVEL typeArguments API_LEVEL typeName API_LEVEL memSize typeName getName treeSize getType treeSize optionalExpression getExpression treeSize typeArguments typeArguments listSize listSize optionalAnonymousClassDeclaration getAnonymousClassDeclaration treeSize

Creates a new AST node for a comment owned by the given AST p N B This constructor is package private p param ast the AST that is to own this node Comment AST ast super ast 
Returns whether this comment is a block comment code Block Comment code return code true code if this is a block comment and code false code otherwise public final boolean is Block Comment return this instanceof Block Comment  BlockComment isBlockComment BlockComment
Returns whether this comment is a line comment code Line Comment code return code true code if this is a line comment and code false code otherwise public final boolean is Line Comment return this instanceof Line Comment  LineComment isLineComment LineComment
Returns whether this comment is a doc comment code Javadoc code return code true code if this is a doc comment and code false code otherwise public final boolean is Doc Comment return this instanceof Javadoc  isDocComment
Returns the root AST node that this comment occurs within or code null code if none or not recorded p Typically the comment nodes created while parsing a compilation unit are not considered descendents of the normal AST root namely an link Compilation Unit Instead these comment nodes exist outside the normal AST and each is a root in its own right This optional property provides a well known way to navigate from the comment to the compilation unit in such cases Note that the alternate root property is not one of the comment node s children It is simply a reference to a node p return the alternate root node or code null code if none see set Alternate Root AST Node public final AST Node get Alternate Root return this alternate Root  CompilationUnit setAlternateRoot ASTNode ASTNode getAlternateRoot alternateRoot
Returns the root AST node that this comment occurs within or code null code if none or not recorded p p param root the alternate root node or code null code if none see get Alternate Root public final void set Alternate Root AST Node root alternate root is not considered a structural property but we protect them nevertheless check Modifiable this alternate Root root  getAlternateRoot setAlternateRoot ASTNode checkModifiable alternateRoot
Method declared on AST Node int mem Size return BASE NODE SIZE 1 4  ASTNode memSize BASE_NODE_SIZE

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Sets the line end table for this compilation unit If code line End Table i p code then line number code i 1 code ends at character position code p code Except for the last line the positions are that of the last character of the line delimiter For example the source string code A nB nC code has line end table 1 3 4 param line End Table the line end table void set Line End Table int line End Table if line End Table null throw new Null Pointer Exception alternate root is not considered a structural property but we protect them nevertheless check Modifiable this line End Table line End Table  lineEndTable lineEndTable setLineEndTable lineEndTable lineEndTable NullPointerException checkModifiable lineEndTable lineEndTable
Creates a new AST node for a compilation owned by the given AST The compilation unit initially has no package declaration no import declarations and no type declarations p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Compilation Unit AST ast super ast  CompilationUnit
since 3 0 final List internal Structural Properties For Type int api Level return property Descriptors api Level  internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property PACKAGE PROPERTY if get return get Package else set Package Package Declaration child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode PACKAGE_PROPERTY getPackage setPackage PackageDeclaration internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property IMPORTS PROPERTY return imports if property TYPES PROPERTY return types allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor IMPORTS_PROPERTY TYPES_PROPERTY internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return COMPILATION UNIT  ASTNode getNodeType0 COMPILATION_UNIT
AST Node clone0 AST target Compilation Unit result new Compilation Unit target n b do not copy line number table or messages result set Source Range this get Start Position this get Length result set Package Package Declaration AST Node copy Subtree target get Package result imports add All AST Node copy Subtrees target imports result types add All AST Node copy Subtrees target types return result  ASTNode CompilationUnit CompilationUnit setSourceRange getStartPosition getLength setPackage PackageDeclaration ASTNode copySubtree getPackage addAll ASTNode copySubtrees addAll ASTNode copySubtrees
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Package accept Children visitor this imports accept Children visitor this types visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getPackage acceptChildren acceptChildren endVisit
Returns the node for the package declaration of this compilation unit or code null code if this compilation unit is in the default package return the package declaration node or code null code if none public Package Declaration get Package return this optional Package Declaration  PackageDeclaration getPackage optionalPackageDeclaration
Sets or clears the package declaration of this compilation unit node to the given package declaration node param pkg Decl the new package declaration node or code null code if this compilation unit does not have a package declaration that is in the default package exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Package Package Declaration pkg Decl AST Node old Child this optional Package Declaration pre Replace Child old Child pkg Decl PACKAGE PROPERTY this optional Package Declaration pkg Decl post Replace Child old Child pkg Decl PACKAGE PROPERTY  pkgDecl IllegalArgumentException setPackage PackageDeclaration pkgDecl ASTNode oldChild optionalPackageDeclaration preReplaceChild oldChild pkgDecl PACKAGE_PROPERTY optionalPackageDeclaration pkgDecl postReplaceChild oldChild pkgDecl PACKAGE_PROPERTY
Returns the live list of nodes for the import declarations of this compilation unit in order of appearance return the live list of import declaration nodes element Type code Import Declaration code public List imports return this imports  elementType ImportDeclaration
Returns the live list of nodes for the top level type declarations of this compilation unit in order of appearance p Note that in JLS3 the types may include both enum declarations and annotation type declarations introduced in J2SE 1 5 For JLS2 the elements are always code Type Declaration code p return the live list of top level type declaration nodes element Type code Abstract Type Declaration code public List types return this types  TypeDeclaration elementType AbstractTypeDeclaration
Finds the corresponding AST node in the given compilation unit from which the given binding originated Returns code null code if the binding does not correspond to any node in this compilation unit This method always returns code null code if bindings were not requested when this AST was built p The following table indicates the expected node type for the various different kinds of bindings ul li li li package a code Package Declaration code li li class or interface a code Type Declaration code or a code Anonymous Class Declaration code for anonymous classes li li primitive type none li li array type none li li field a code Variable Declaration Fragment code in a code Field Declaration code li li local variable a code Single Variable Declaration code or a code Variable Declaration Fragment code in a code Variable Declaration Statement code or code Variable Declaration Expression code li li method a code Method Declaration code li li constructor a code Method Declaration code li li annotation type an code Annotation Type Declaration code li li annotation type member an code Annotation Type Member Declaration code li li enum type an code Enum Declaration code li li enum constant an code Enum Constant Declaration code li ul p p Each call to link AST Parser createAST org eclipse core runtime I Progress Monitor with a request for bindings gives rise to separate universe of binding objects This method always returns code null code when the binding object comes from a different AST Use code find Declaring Node binding get Key code when the binding comes from a different AST p param binding the binding return the corresponding node where the given binding is declared or code null code if the binding does not correspond to a node in this compilation unit or if bindings were not requested when this AST was built see find Declaring Node String public AST Node find Declaring Node I Binding binding return this ast get Binding Resolver find Declaring Node binding  PackageDeclaration TypeDeclaration AnonymousClassDeclaration VariableDeclarationFragment FieldDeclaration SingleVariableDeclaration VariableDeclarationFragment VariableDeclarationStatement VariableDeclarationExpression MethodDeclaration MethodDeclaration AnnotationTypeDeclaration AnnotationTypeMemberDeclaration EnumDeclaration EnumConstantDeclaration ASTParser IProgressMonitor findDeclaringNode getKey findDeclaringNode ASTNode findDeclaringNode IBinding getBindingResolver findDeclaringNode
Finds the corresponding AST node in the given compilation unit from which the binding with the given key originated Returns code null code if the corresponding node cannot be determined This method always returns code null code if bindings were not requested when this AST was built p The following table indicates the expected node type for the various different kinds of binding keys ul li li li package a code Package Declaration code li li class or interface a code Type Declaration code or a code Anonymous Class Declaration code for anonymous classes li li primitive type none li li array type none li li field a code Variable Declaration Fragment code in a code Field Declaration code li li local variable a code Single Variable Declaration code or a code Variable Declaration Fragment code in a code Variable Declaration Statement code or code Variable Declaration Expression code li li method a code Method Declaration code li li constructor a code Method Declaration code li li annotation type an code Annotation Type Declaration code li li annotation type member an code Annotation Type Member Declaration code li li enum type an code Enum Declaration code li li enum constant an code Enum Constant Declaration code li ul p p Note that as explained in link I Binding get Key I Binding getkey there may be no keys for finding the declaring node for local variables local or anonymous classes etc p param key the binding key or code null code return the corresponding node where a binding with the given key is declared or code null code if the key is code null code or if the key does not correspond to a node in this compilation unit or if bindings were not requested when this AST was built see I Binding get Key since 2 1 public AST Node find Declaring Node String key return this ast get Binding Resolver find Declaring Node key  PackageDeclaration TypeDeclaration AnonymousClassDeclaration VariableDeclarationFragment FieldDeclaration SingleVariableDeclaration VariableDeclarationFragment VariableDeclarationStatement VariableDeclarationExpression MethodDeclaration MethodDeclaration AnnotationTypeDeclaration AnnotationTypeMemberDeclaration EnumDeclaration EnumConstantDeclaration IBinding getKey IBinding IBinding getKey ASTNode findDeclaringNode getBindingResolver findDeclaringNode
Returns the internal comment mapper return the comment mapper or code null code if none since 3 0 Default Comment Mapper get Comment Mapper return this comment Mapper  DefaultCommentMapper getCommentMapper commentMapper
Initializes the internal comment mapper with the given scanner param scanner the scanner since 3 0 void init Comment Mapper Scanner scanner this comment Mapper new Default Comment Mapper this optional Comment Table this comment Mapper initialize this scanner  initCommentMapper commentMapper DefaultCommentMapper optionalCommentTable commentMapper
Returns the extended start position of the given node Unlike link AST Node get Start Position and link AST Node get Length the extended source range may include comments and whitespace immediately before or after the normal source range for the node param node the node return the 0 based character index or code 1 code if no source position information is recorded for this node see get Extended Length AST Node since 3 0 public int get Extended Start Position AST Node node if this comment Mapper null return 1 else return this comment Mapper get Extended Start Position node  ASTNode getStartPosition ASTNode getLength getExtendedLength ASTNode getExtendedStartPosition ASTNode commentMapper commentMapper getExtendedStartPosition
Returns the extended source length of the given node Unlike link AST Node get Start Position and link AST Node get Length the extended source range may include comments and whitespace immediately before or after the normal source range for the node param node the node return a possibly 0 length or code 0 code if no source position information is recorded for this node see get Extended Start Position AST Node since 3 0 public int get Extended Length AST Node node if this comment Mapper null return 0 else return this comment Mapper get Extended Length node  ASTNode getStartPosition ASTNode getLength getExtendedStartPosition ASTNode getExtendedLength ASTNode commentMapper commentMapper getExtendedLength
Returns the line number corresponding to the given source character position in the original source string The initial line of the compilation unit is numbered 1 and each line extends through the last character of the end of line delimiter The very last line extends through the end of the source string and has no line delimiter For example the source string code class A n n code has 3 lines corresponding to inclusive character ranges 0 7 8 9 and 10 10 Returns 1 for a character position that does not correspond to any source line or if no line number information is available for this compilation unit param position a 0 based character position possibly negative or out of range return the 1 based line number or code 1 code if the character position does not correspond to a source line in the original source file or if line number information is not known for this compilation unit see AST Parser public int line Number int position int length line End Table length if length 0 no line number info return 1 int low 0 if position line End Table low position illegal or before the first line delimiter return 1 assert position line End Table low 1 low 0 int hi length 1 if position line End Table hi position beyond the last line separator if position get Start Position get Length this is beyond the end of the source length return 1 else return length 1 assert line End Table low position line End Table hi low 0 hi length 1 low hi binary search line end table while true invariant line End Table low position line End Table hi 0 low hi length 1 reducing measure hi low if low 1 hi assert line End Table low position line End Table low 1 position is on line low 1 line number is low 2 return low 2 assert hi low 2 so average is truly in between int mid low hi 2 assert 0 low mid hi length 1 if position line End Table mid assert line End Table low position line End Table mid 0 low mid hi length 1 hi mid else position line End Table mid assert line End Table mid position line End Table hi 0 low mid hi length 1 low mid in both cases invariant reachieved with reduced measure  ASTParser lineNumber lineEndTable lineEndTable lineEndTable lineEndTable getStartPosition getLength lineEndTable lineEndTable lineEndTable lineEndTable lineEndTable lineEndTable lineEndTable lineEndTable lineEndTable lineEndTable lineEndTable lineEndTable
Returns the list of messages reported by the compiler during the parsing or the type checking of this compilation unit This list might be a subset of errors detected and reported by a Java compiler p This list of messages is suitable for simple clients that do little more than log the messages or display them to the user Clients that need further details should call code get Problems code to get compiler problem objects p return the list of messages possibly empty see get Problems see AST Parser public Message get Messages if this messages null int problem Length this problems length if problem Length 0 this messages EMPTY MESSAGES else this messages new Message problem Length for int i 0 i problem Length i I Problem problem this problems i int start problem get Source Start int end problem get Source End messages i new Message problem get Message start end start 1 return this messages  getProblems getProblems ASTParser getMessages problemLength problemLength EMPTY_MESSAGES problemLength problemLength IProblem getSourceStart getSourceEnd getMessage
Returns the list of detailed problem reports noted by the compiler during the parsing or the type checking of this compilation unit This list might be a subset of errors detected and reported by a Java compiler p Simple clients that do little more than log the messages or display them to the user should probably call code get Messages code instead p return the list of detailed problem objects possibly empty see get Messages see AST Parser since 2 1 public I Problem get Problems return this problems  getMessages getMessages ASTParser IProblem getProblems
Sets the array of problems reported by the compiler during the parsing or name resolution of this compilation unit param problems the list of problems void set Problems I Problem problems if problems null throw new Illegal Argument Exception this problems problems  setProblems IProblem IllegalArgumentException
Returns a list of the comments encountered while parsing this compilation unit p Since the Java language allows comments to appear most anywhere in the source text it is problematic to locate comments in relation to the structure of an AST The one exception is doc comments which by convention immediately precede type field and method declarations these comments are located in the AST by link Body Declaration get Javadoc Body Declaration get Javadoc Other comments do not show up in the AST The table of comments is provided for clients that need to find the source ranges of all comments in the original source string It includes entries for comments of all kinds line block and doc arranged in order of increasing source position p Note on comment parenting The link AST Node get Parent get Parent of a doc comment associated with a body declaration is the body declaration node for these comment nodes link AST Node get Root get Root will return the compilation unit assuming an unmodified AST reflecting the fact that these nodes are property located in the AST for the compilation unit However for other comment nodes link AST Node get Parent get Parent will return code null code and link AST Node get Root get Root will return the comment node itself indicating that these comment nodes are not directly connected to the AST for the compilation unit The link Comment get Alternate Root Comment get Alternate Root method provides a way to navigate from a comment to its compilation unit p p A note on visitors The only comment nodes that will be visited when visiting a compilation unit are the doc comments parented by body declarations To visit all comments in normal reading order iterate over the comment table and call link AST Node accept AST Visitor accept on each element p p Clients cannot modify the resulting list p return an unmodifiable list of comments in increasing order of source start position or code null code if comment information for this compilation unit is not available see AST Parser since 3 0 public List get Comment List return this optional Comment List  BodyDeclaration getJavadoc BodyDeclaration getJavadoc ASTNode getParent getParent ASTNode getRoot getRoot ASTNode getParent getParent ASTNode getRoot getRoot getAlternateRoot getAlternateRoot ASTNode ASTVisitor ASTParser getCommentList optionalCommentList
Sets the list of the comments encountered while parsing this compilation unit param comment Table a list of comments in increasing order of source start position or code null code if comment information for this compilation unit is not available exception Illegal Argument Exception if the comment table is not in increasing order of source position see get Comment List see AST Parser since 3 0 void set Comment Table Comment comment Table double check table to ensure that all comments have source positions and are in strictly increasing order if comment Table null this optional Comment List null this optional Comment Table null else int next Available Position 0 for int i 0 i comment Table length i Comment comment comment Table i if comment null throw new Illegal Argument Exception int start comment get Start Position int length comment get Length if start 0 length 0 start next Available Position throw new Illegal Argument Exception next Available Position comment get Start Position comment get Length this optional Comment Table comment Table List comment List Arrays as List comment Table protect the list from further modification this optional Comment List Collections unmodifiable List comment List  commentTable IllegalArgumentException getCommentList ASTParser setCommentTable commentTable commentTable optionalCommentList optionalCommentTable nextAvailablePosition commentTable commentTable IllegalArgumentException getStartPosition getLength nextAvailablePosition IllegalArgumentException nextAvailablePosition getStartPosition getLength optionalCommentTable commentTable commentList asList commentTable optionalCommentList unmodifiableList commentList
void append Debug String String Buffer buffer buffer append Compilation Unit NON NLS 1 include the type names buffer append NON NLS 1 for Iterator it types iterator it has Next Abstract Type Declaration d Abstract Type Declaration it next buffer append d get Name get Identifier if it has Next buffer append NON NLS 1 buffer append NON NLS 1  appendDebugString StringBuffer CompilationUnit hasNext AbstractTypeDeclaration AbstractTypeDeclaration getName getIdentifier hasNext
int mem Size int size BASE NODE SIZE 8 4 if this line End Table null size HEADERS 4 this line End Table length if this optional Comment Table null size HEADERS 4 this optional Comment Table length ignore the space taken up by optional Comment List return size  memSize BASE_NODE_SIZE lineEndTable lineEndTable optionalCommentTable optionalCommentTable optionalCommentList
int tree Size int size mem Size if this optional Package Declaration null size get Package tree Size size this imports list Size size this types list Size include disconnected comments if this optional Comment List null for int i 0 i this optional Comment List size i Comment comment Comment this optional Comment List get i if comment null comment get Parent null size comment tree Size return size  treeSize memSize optionalPackageDeclaration getPackage treeSize listSize listSize optionalCommentList optionalCommentList optionalCommentList getParent treeSize
Enables the recording of changes to this compilation unit and its descendents The compilation unit must have been created by code AST Parser code and still be in its original state Once recording is on arbitrary changes to the subtree rooted at this compilation unit are recorded internally Once the modification has been completed call code rewrite code to get an object representing the corresponding edits to the original source code string exception Illegal Argument Exception if this compilation unit is marked as unmodifiable or if this compilation unit has already been tampered with or recording has already been enabled since 3 0 public void record Modifications getAST record Modifications this  ASTParser IllegalArgumentException recordModifications recordModifications
Converts all modifications recorded for this compilation unit into an object representing the corresponding text edits to the given document containing the original source code for this compilation unit p The compilation unit must have been created by code AST Parser code from the source code string in the given document and recording must have been turned on with a prior call to code record Modifications code while the AST was still in its original state p p Calling this methods does not discard the modifications on record Subsequence modifications made to the AST are added to the ones already on record If this method is called again later the resulting text edit object will accurately reflect the net cumulative affect of all those changes p param document original document containing source code for this compilation unit param options the table of formatter options key type code String code value type code String code or code null code to use the standard global options link org eclipse jdt core Java Core get Options Java Core get Options return text edit object describing the changes to the document corresponding to the recorded AST modifications exception Illegal Argument Exception if the document passed is code null code or does not correspond to this AST exception Illegal State Exception if code record Modifications code was not called to enable recording see record Modifications since 3 0 public Text Edit rewrite I Document document Map options return getAST rewrite document options  ASTParser recordModifications JavaCore getOptions JavaCore getOptions IllegalArgumentException IllegalStateException recordModifications recordModifications TextEdit IDocument

I Progress Monitor monitor Cancelable Name Environment Java Project project Working Copy Owner owner I Progress Monitor monitor throws Java Model Exception super project owner this monitor monitor  IProgressMonitor CancelableNameEnvironment JavaProject WorkingCopyOwner IProgressMonitor JavaModelException
private void check Canceled if monitor null monitor is Canceled throw new Abort Compilation true silent new Operation Canceled Exception  checkCanceled isCanceled AbortCompilation OperationCanceledException
public void find Packages char prefix I Search Requestor requestor check Canceled super find Packages prefix requestor  findPackages ISearchRequestor checkCanceled findPackages
public Name Environment Answer find Type char name char package Name check Canceled return super find Type name package Name  NameEnvironmentAnswer findType packageName checkCanceled findType packageName
public Name Environment Answer find Type char compound Type Name check Canceled return super find Type compound Type Name  NameEnvironmentAnswer findType compoundTypeName checkCanceled findType compoundTypeName
public void find Types char prefix I Search Requestor storage check Canceled super find Types prefix storage  findTypes ISearchRequestor checkCanceled findTypes
I Progress Monitor monitor Cancelable Problem Factory I Progress Monitor monitor super this monitor monitor  IProgressMonitor CancelableProblemFactory IProgressMonitor
public I Problem create Problem char originating File Name int problem Id String problem Arguments String message Arguments int severity int start Position int end Position int line Number if monitor null monitor is Canceled throw new Abort Compilation true silent new Operation Canceled Exception return super create Problem originating File Name problem Id problem Arguments message Arguments severity start Position end Position line Number  IProblem createProblem originatingFileName problemId problemArguments messageArguments startPosition endPosition lineNumber isCanceled AbortCompilation OperationCanceledException createProblem originatingFileName problemId problemArguments messageArguments startPosition endPosition lineNumber
Answer a new Compilation Unit Visitor using the given name environment and compiler options The environment and options will be in effect for the lifetime of the compiler When the compiler is run compilation results are sent to the given requestor param environment org eclipse jdt internal compiler api env I Name Environment Environment used by the compiler in order to resolve type and package names The name environment implements the actual connection of the compiler to the outside world for example in batch mode the name environment is performing pure file accesses reuse previous build state or connection to repositories Note the name environment is responsible for implementing the actual classpath rules param policy org eclipse jdt internal compiler api problem I Error Handling Policy Configurable part for problem handling allowing the compiler client to specify the rules for handling problems stop on first error or accumulate them all and at the same time perform some actions such as opening a dialog in UI when compiling interactively see org eclipse jdt internal compiler Default Error Handling Policies param settings The settings to use for the resolution param requestor org eclipse jdt internal compiler api I Compiler Requestor Component which will receive and persist all compilation results and is intended to consume them as they are produced Typically in a batch compiler it is responsible for writing out the actual class files to the file system see org eclipse jdt internal compiler Compilation Result param problem Factory org eclipse jdt internal compiler api problem I Problem Factory Factory used inside the compiler to create problem descriptors It allows the compiler client to supply its own representation of compilation problems in order to avoid object conversions Note that the factory is not supposed to accumulate the created problems the compiler will gather them all and hand them back as part of the compilation unit result public Compilation Unit Resolver I Name Environment environment I Error Handling Policy policy Map settings I Compiler Requestor requestor I Problem Factory problem Factory super environment policy settings requestor problem Factory false  CompilationUnitVisitor INameEnvironment IErrorHandlingPolicy DefaultErrorHandlingPolicies ICompilerRequestor CompilationResult problemFactory IProblemFactory CompilationUnitResolver INameEnvironment IErrorHandlingPolicy ICompilerRequestor IProblemFactory problemFactory problemFactory
public void accept I Source Type source Types Package Binding package Binding Compilation Result result new Compilation Result source Types 0 get File Name 1 1 this options max Problems Per Unit need to hold onto this Compilation Unit Declaration unit Source Type Converter build Compilation Unit source Types source Types 0 is always toplevel here Source Type Converter FIELD AND METHOD need field and methods Source Type Converter MEMBER TYPE need member types Source Type Converter FIELD INITIALIZATION need field initialization see bug 40476 this lookup Environment problem Reporter result if unit null this lookup Environment build Type Bindings unit this lookup Environment complete Type Bindings unit true  ISourceType sourceTypes PackageBinding packageBinding CompilationResult CompilationResult sourceTypes getFileName maxProblemsPerUnit CompilationUnitDeclaration SourceTypeConverter buildCompilationUnit sourceTypes sourceTypes SourceTypeConverter FIELD_AND_METHOD SourceTypeConverter MEMBER_TYPE SourceTypeConverter FIELD_INITIALIZATION lookupEnvironment problemReporter lookupEnvironment buildTypeBindings lookupEnvironment completeTypeBindings
protected static I Error Handling Policy get Handling Policy passes the initial set of files to the batch oracle to avoid finding more than once the same units when case insensitive match return new I Error Handling Policy public boolean stop On First Error return false public boolean proceed On Errors return false stop if there are some errors  IErrorHandlingPolicy getHandlingPolicy IErrorHandlingPolicy stopOnFirstError proceedOnErrors
protected static I Compiler Requestor get Requestor return new I Compiler Requestor public void accept Result Compilation Result compilation Result do nothing  ICompilerRequestor getRequestor ICompilerRequestor acceptResult CompilationResult compilationResult
see org eclipse jdt internal compiler Compiler initialize Parser public void initialize Parser this parser new Comment Recorder Parser this problem Reporter false  initializeParser initializeParser CommentRecorderParser problemReporter
protected void handle Internal Exception Throwable internal Exception Compilation Unit Declaration unit Compilation Result result super handle Internal Exception internal Exception unit result if unit null remove Unresolved Bindings unit  handleInternalException internalException CompilationUnitDeclaration CompilationResult handleInternalException internalException removeUnresolvedBindings
protected void handle Internal Exception Abort Compilation abort Exception Compilation Unit Declaration unit super handle Internal Exception abort Exception unit if unit null remove Unresolved Bindings unit  handleInternalException AbortCompilation abortException CompilationUnitDeclaration handleInternalException abortException removeUnresolvedBindings
public static Compilation Unit Declaration parse char source Node Searcher node Searcher Map settings if source null throw new Illegal Argument Exception Compiler Options compiler Options new Compiler Options settings Parser parser new Comment Recorder Parser new Problem Reporter Default Error Handling Policies proceed With All Problems compiler Options new Default Problem Factory false org eclipse jdt internal compiler env I Compilation Unit source Unit new org eclipse jdt internal compiler batch Compilation Unit source NON NLS 1 compiler Options default Encoding Compilation Unit Declaration compilation Unit Declaration parser diet Parse source Unit new Compilation Result source Unit 0 0 compiler Options max Problems Per Unit if compilation Unit Declaration ignore Method Bodies compilation Unit Declaration ignore Further Investigation true if initial diet parse did not work no need to dig into method bodies return null if node Searcher null int search Position node Searcher position if search Position 0 search Position source length the position is out of range There is no need to search for a node return compilation Unit Declaration compilation Unit Declaration traverse node Searcher compilation Unit Declaration scope org eclipse jdt internal compiler ast AST Node node node Searcher found if node null return compilation Unit Declaration org eclipse jdt internal compiler ast Type Declaration enclosing Type Declaration node Searcher enclosing Type if node instanceof Abstract Method Declaration Abstract Method Declaration node parse Statements parser compilation Unit Declaration else if enclosing Type Declaration null if node instanceof org eclipse jdt internal compiler ast Initializer org eclipse jdt internal compiler ast Initializer node parse Statements parser enclosing Type Declaration compilation Unit Declaration else org eclipse jdt internal compiler ast Type Declaration node parse Method parser compilation Unit Declaration else fill the methods bodies in order for the code to be generated real parse of the method parser scanner set Source source org eclipse jdt internal compiler ast Type Declaration types compilation Unit Declaration types if types null for int i types length i 0 types i parse Method parser compilation Unit Declaration return compilation Unit Declaration  CompilationUnitDeclaration NodeSearcher nodeSearcher IllegalArgumentException CompilerOptions compilerOptions CompilerOptions CommentRecorderParser ProblemReporter DefaultErrorHandlingPolicies proceedWithAllProblems compilerOptions DefaultProblemFactory ICompilationUnit sourceUnit CompilationUnit compilerOptions defaultEncoding CompilationUnitDeclaration compilationUnitDeclaration dietParse sourceUnit CompilationResult sourceUnit compilerOptions maxProblemsPerUnit compilationUnitDeclaration ignoreMethodBodies compilationUnitDeclaration ignoreFurtherInvestigation nodeSearcher searchPosition nodeSearcher searchPosition searchPosition compilationUnitDeclaration compilationUnitDeclaration nodeSearcher compilationUnitDeclaration ASTNode nodeSearcher compilationUnitDeclaration TypeDeclaration enclosingTypeDeclaration nodeSearcher enclosingType AbstractMethodDeclaration AbstractMethodDeclaration parseStatements compilationUnitDeclaration enclosingTypeDeclaration parseStatements enclosingTypeDeclaration compilationUnitDeclaration TypeDeclaration parseMethod compilationUnitDeclaration setSource TypeDeclaration compilationUnitDeclaration parseMethod compilationUnitDeclaration compilationUnitDeclaration
public static Compilation Unit Declaration resolve char source char package Name String unit Name I Java Project java Project Node Searcher node Searcher Map options boolean clean Up Working Copy Owner owner I Progress Monitor monitor throws Java Model Exception Compilation Unit Declaration unit null Cancelable Name Environment environment null Cancelable Problem Factory problem Factory null try environment new Cancelable Name Environment Java Project java Project owner monitor problem Factory new Cancelable Problem Factory monitor Compilation Unit Resolver resolver new Compilation Unit Resolver environment get Handling Policy options get Requestor problem Factory unit resolver resolve null no existing compilation unit declaration new Basic Compilation Unit source package Name unit Name java Project node Searcher true method verification true analyze code true generate code return unit finally if environment null environment monitor null don t hold a reference to this external object if problem Factory null problem Factory monitor null don t hold a reference to this external object if clean Up unit null unit clean Up  CompilationUnitDeclaration packageName unitName IJavaProject javaProject NodeSearcher nodeSearcher cleanUp WorkingCopyOwner IProgressMonitor JavaModelException CompilationUnitDeclaration CancelableNameEnvironment CancelableProblemFactory problemFactory CancelableNameEnvironment JavaProject javaProject problemFactory CancelableProblemFactory CompilationUnitResolver CompilationUnitResolver getHandlingPolicy getRequestor problemFactory BasicCompilationUnit packageName unitName javaProject nodeSearcher problemFactory problemFactory cleanUp cleanUp
public void remove Unresolved Bindings Compilation Unit Declaration compilation Unit Declaration final org eclipse jdt internal compiler ast Type Declaration types compilation Unit Declaration types if types null for int i 0 max types length i max i remove Unresolved Bindings types i  removeUnresolvedBindings CompilationUnitDeclaration compilationUnitDeclaration TypeDeclaration compilationUnitDeclaration removeUnresolvedBindings
private void remove Unresolved Bindings org eclipse jdt internal compiler ast Type Declaration type final org eclipse jdt internal compiler ast Type Declaration member Types type member Types if member Types null for int i 0 max member Types length i max i remove Unresolved Bindings member Types i if type binding null type binding modifiers Compiler Modifiers Acc Unresolved 0 type binding null final org eclipse jdt internal compiler ast Field Declaration fields type fields if fields null for int i 0 max fields length i max i if fields i binding null fields i binding modifiers Compiler Modifiers Acc Unresolved 0 fields i binding null final Abstract Method Declaration methods type methods if methods null for int i 0 max methods length i max i if methods i binding null methods i binding modifiers Compiler Modifiers Acc Unresolved 0 methods i binding null  removeUnresolvedBindings TypeDeclaration TypeDeclaration memberTypes memberTypes memberTypes memberTypes removeUnresolvedBindings memberTypes CompilerModifiers AccUnresolved FieldDeclaration CompilerModifiers AccUnresolved AbstractMethodDeclaration CompilerModifiers AccUnresolved
private Compilation Unit Declaration resolve Compilation Unit Declaration unit org eclipse jdt internal compiler env I Compilation Unit source Unit Node Searcher node Searcher boolean verify Methods boolean analyze Code boolean generate Code try if unit null build and record parsed units this parse Threshold 0 will request a full parse begin To Compile new org eclipse jdt internal compiler env I Compilation Unit source Unit process all units some more could be injected in the loop by the lookup environment unit this units To Process 0 else initial type binding creation this lookup Environment build Type Bindings unit binding resolution this lookup Environment complete Type Bindings if node Searcher null this parser get Method Bodies unit no op if method bodies have already been parsed else int search Position node Searcher position if search Position 0 search Position source Unit get Contents length unit traverse node Searcher unit scope org eclipse jdt internal compiler ast AST Node node node Searcher found if node null org eclipse jdt internal compiler ast Type Declaration enclosing Type Declaration node Searcher enclosing Type if node instanceof Abstract Method Declaration Abstract Method Declaration node parse Statements this parser unit else if enclosing Type Declaration null if node instanceof org eclipse jdt internal compiler ast Initializer org eclipse jdt internal compiler ast Initializer node parse Statements this parser enclosing Type Declaration unit else if node instanceof org eclipse jdt internal compiler ast Type Declaration org eclipse jdt internal compiler ast Type Declaration node parse Method this parser unit if unit scope null fault in fields methods unit scope fault In Types if unit scope null verify Methods http dev eclipse org bugs show bug cgi id 23117 verify inherited methods unit scope verify Methods this lookup Environment method Verifier type checking unit resolve flow analysis if analyze Code unit analyse Code code generation if generate Code unit generate Code if this units To Process null this units To Process 0 null release reference to processed unit declaration this requestor accept Result unit compilation Result tag As Accepted return unit catch Abort Compilation e this handle Internal Exception e unit return unit null this units To Process 0 unit catch Error e this handle Internal Exception e unit null throw e rethrow catch Runtime Exception e this handle Internal Exception e unit null throw e rethrow finally No reset is performed there anymore since within the Code Assist or related tools the compiler may be called after a call to this resolve method And such a call needs to have a compiler with a non empty environment this reset  CompilationUnitDeclaration CompilationUnitDeclaration ICompilationUnit sourceUnit NodeSearcher nodeSearcher verifyMethods analyzeCode generateCode parseThreshold beginToCompile ICompilationUnit sourceUnit unitsToProcess lookupEnvironment buildTypeBindings lookupEnvironment completeTypeBindings nodeSearcher getMethodBodies searchPosition nodeSearcher searchPosition searchPosition sourceUnit getContents nodeSearcher ASTNode nodeSearcher TypeDeclaration enclosingTypeDeclaration nodeSearcher enclosingType AbstractMethodDeclaration AbstractMethodDeclaration parseStatements enclosingTypeDeclaration parseStatements enclosingTypeDeclaration TypeDeclaration TypeDeclaration parseMethod faultInTypes verifyMethods show_bug verifyMethods lookupEnvironment methodVerifier analyzeCode analyseCode generateCode generateCode unitsToProcess unitsToProcess acceptResult compilationResult tagAsAccepted AbortCompilation handleInternalException unitsToProcess handleInternalException RuntimeException handleInternalException CodeAssist
public Compilation Unit Declaration resolve org eclipse jdt internal compiler env I Compilation Unit source Unit boolean verify Methods boolean analyze Code boolean generate Code return resolve null no existing compilation unit declaration source Unit null no node searcher verify Methods analyze Code generate Code  CompilationUnitDeclaration ICompilationUnit sourceUnit verifyMethods analyzeCode generateCode sourceUnit verifyMethods analyzeCode generateCode
public Compilation Unit Declaration resolve Compilation Unit Declaration unit org eclipse jdt internal compiler env I Compilation Unit source Unit boolean verify Methods boolean analyze Code boolean generate Code return resolve unit source Unit null no node searcher verify Methods analyze Code generate Code  CompilationUnitDeclaration CompilationUnitDeclaration ICompilationUnit sourceUnit verifyMethods analyzeCode generateCode sourceUnit verifyMethods analyzeCode generateCode

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented conditional expression node owned by the given AST By default the condition then and else expresssions are unspecified but legal p N B This constructor is package private p param ast the AST that is to own this node Conditional Expression AST ast super ast  ConditionalExpression
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null if property THEN EXPRESSION PROPERTY if get return get Then Expression else set Then Expression Expression child return null if property ELSE EXPRESSION PROPERTY if get return get Else Expression else set Else Expression Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression THEN_EXPRESSION_PROPERTY getThenExpression setThenExpression ELSE_EXPRESSION_PROPERTY getElseExpression setElseExpression internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return CONDITIONAL EXPRESSION  ASTNode getNodeType0 CONDITIONAL_EXPRESSION
AST Node clone0 AST target Conditional Expression result new Conditional Expression target result set Source Range this get Start Position this get Length result set Expression Expression get Expression clone target result set Then Expression Expression get Then Expression clone target result set Else Expression Expression get Else Expression clone target return result  ASTNode ConditionalExpression ConditionalExpression setSourceRange getStartPosition getLength setExpression getExpression setThenExpression getThenExpression setElseExpression getElseExpression
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Expression accept Child visitor get Then Expression accept Child visitor get Else Expression visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getExpression acceptChild getThenExpression acceptChild getElseExpression endVisit
Returns the condition of this conditional expression return the condition node public Expression get Expression if this condition Expression null lazy init must be thread safe for readers synchronized this if this condition Expression null pre Lazy Init this condition Expression new Simple Name this ast post Lazy Init this condition Expression EXPRESSION PROPERTY return this condition Expression  getExpression conditionExpression conditionExpression preLazyInit conditionExpression SimpleName postLazyInit conditionExpression EXPRESSION_PROPERTY conditionExpression
Sets the condition of this conditional expression param expression the condition node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this condition Expression pre Replace Child old Child expression EXPRESSION PROPERTY this condition Expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression IllegalArgumentException ASTNode oldChild conditionExpression preReplaceChild oldChild EXPRESSION_PROPERTY conditionExpression postReplaceChild oldChild EXPRESSION_PROPERTY
Returns the then part of this conditional expression return the then expression node public Expression get Then Expression if this then Expression null lazy init must be thread safe for readers synchronized this if this then Expression null pre Lazy Init this then Expression new Simple Name this ast post Lazy Init this then Expression THEN EXPRESSION PROPERTY return this then Expression  getThenExpression thenExpression thenExpression preLazyInit thenExpression SimpleName postLazyInit thenExpression THEN_EXPRESSION_PROPERTY thenExpression
Sets the then part of this conditional expression param expression the then expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Then Expression Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this then Expression pre Replace Child old Child expression THEN EXPRESSION PROPERTY this then Expression expression post Replace Child old Child expression THEN EXPRESSION PROPERTY  IllegalArgumentException setThenExpression IllegalArgumentException ASTNode oldChild thenExpression preReplaceChild oldChild THEN_EXPRESSION_PROPERTY thenExpression postReplaceChild oldChild THEN_EXPRESSION_PROPERTY
Returns the else part of this conditional expression return the else expression node public Expression get Else Expression if this else Expression null lazy init must be thread safe for readers synchronized this if this else Expression null pre Lazy Init this else Expression new Simple Name this ast post Lazy Init this else Expression ELSE EXPRESSION PROPERTY return this else Expression  getElseExpression elseExpression elseExpression preLazyInit elseExpression SimpleName postLazyInit elseExpression ELSE_EXPRESSION_PROPERTY elseExpression
Sets the else part of this conditional expression param expression the else expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Else Expression Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this else Expression pre Replace Child old Child expression ELSE EXPRESSION PROPERTY this else Expression expression post Replace Child old Child expression ELSE EXPRESSION PROPERTY  IllegalArgumentException setElseExpression IllegalArgumentException ASTNode oldChild elseExpression preReplaceChild oldChild ELSE_EXPRESSION_PROPERTY elseExpression postReplaceChild oldChild ELSE_EXPRESSION_PROPERTY
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 3 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this condition Expression null 0 get Expression tree Size this then Expression null 0 get Then Expression tree Size this else Expression null 0 get Else Expression tree Size  treeSize memSize conditionExpression getExpression treeSize thenExpression getThenExpression treeSize elseExpression getElseExpression treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new AST node for an alternate constructor invocation statement owned by the given AST By default an empty list of arguments param ast the AST that is to own this node Constructor Invocation AST ast super ast if ast api Level AST JLS3 this type Arguments new AST Node Node List TYPE ARGUMENTS PROPERTY  ConstructorInvocation apiLevel typeArguments ASTNode NodeList TYPE_ARGUMENTS_PROPERTY
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final List internal Get Child List Property Child List Property Descriptor property if property ARGUMENTS PROPERTY return arguments if property TYPE ARGUMENTS PROPERTY return type Arguments allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor ARGUMENTS_PROPERTY TYPE_ARGUMENTS_PROPERTY typeArguments internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return CONSTRUCTOR INVOCATION  ASTNode getNodeType0 CONSTRUCTOR_INVOCATION
AST Node clone0 AST target Constructor Invocation result new Constructor Invocation target result set Source Range this get Start Position this get Length result copy Leading Comment this if this ast api Level AST JLS3 result type Arguments add All AST Node copy Subtrees target type Arguments result arguments add All AST Node copy Subtrees target arguments return result  ASTNode ConstructorInvocation ConstructorInvocation setSourceRange getStartPosition getLength copyLeadingComment apiLevel typeArguments addAll ASTNode copySubtrees typeArguments addAll ASTNode copySubtrees
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children if this ast api Level AST JLS3 accept Children visitor this type Arguments accept Children visitor this arguments visitor end Visit this  ASTVisitor visitChildren visitChildren apiLevel acceptChildren typeArguments acceptChildren endVisit
Returns the live ordered list of type arguments of this constructor invocation added in JLS3 API p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p return the live list of type arguments element type code Type code exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public List type Arguments more efficient than just calling unsupported In2 to check if this type Arguments null unsupported In2 return this type Arguments  UnsupportedOperationException typeArguments unsupportedIn2 typeArguments unsupportedIn2 typeArguments
Returns the live ordered list of argument expressions in this alternate constructor invocation statement return the live list of argument expressions element type code Expression code public List arguments return this arguments 
Resolves and returns the binding for the constructor invoked by this expression p Note that bindings are generally unavailable unless requested when the AST is being built p return the constructor binding or code null code if the binding cannot be resolved public I Method Binding resolve Constructor Binding return this ast get Binding Resolver resolve Constructor this  IMethodBinding resolveConstructorBinding getBindingResolver resolveConstructor
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this type Arguments null 0 this type Arguments list Size this arguments null 0 this arguments list Size  treeSize memSize typeArguments typeArguments listSize listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented continue statement node owned by the given AST By default the continue statement has no label p N B This constructor is package private p param ast the AST that is to own this node Continue Statement AST ast super ast  ContinueStatement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property LABEL PROPERTY if get return get Label else set Label Simple Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode LABEL_PROPERTY getLabel setLabel SimpleName internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return CONTINUE STATEMENT  ASTNode getNodeType0 CONTINUE_STATEMENT
AST Node clone0 AST target Continue Statement result new Continue Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Label Simple Name AST Node copy Subtree target get Label return result  ASTNode ContinueStatement ContinueStatement setSourceRange getStartPosition getLength copyLeadingComment setLabel SimpleName ASTNode copySubtree getLabel
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Child visitor get Label visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getLabel endVisit
Returns the label of this continue statement or code null code if there is none return the label or code null code if there is none public Simple Name get Label return this optional Label  SimpleName getLabel optionalLabel
Sets or clears the label of this continue statement param label the label or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Label Simple Name label AST Node old Child this optional Label pre Replace Child old Child label LABEL PROPERTY this optional Label label post Replace Child old Child label LABEL PROPERTY  IllegalArgumentException setLabel SimpleName ASTNode oldChild optionalLabel preReplaceChild oldChild LABEL_PROPERTY optionalLabel postReplaceChild oldChild LABEL_PROPERTY
Method declared on AST Node int mem Size return super mem Size 1 4  ASTNode memSize memSize
int tree Size return mem Size optional Label null 0 get Label tree Size  treeSize memSize optionalLabel getLabel treeSize

class DefaultAST Visitor extends AST Visitor public DefaultAST Visitor super  DefaultASTVisitor ASTVisitor DefaultASTVisitor
super protected boolean visit Node AST Node node return true  visitNode ASTNode
protected void end Visit Node AST Node node do nothing  endVisitNode ASTNode
public boolean visit Anonymous Class Declaration node return visit Node node  AnonymousClassDeclaration visitNode
return visit Node node public boolean visit Array Access node return visit Node node  visitNode ArrayAccess visitNode
return visit Node node public boolean visit Array Creation node return visit Node node  visitNode ArrayCreation visitNode
return visit Node node public boolean visit Array Initializer node return visit Node node  visitNode ArrayInitializer visitNode
return visit Node node public boolean visit Array Type node visit Node node return false  visitNode ArrayType visitNode
return false public boolean visit Assert Statement node return visit Node node  AssertStatement visitNode
return visit Node node public boolean visit Assignment node return visit Node node  visitNode visitNode
return visit Node node public boolean visit Block node return visit Node node  visitNode visitNode
return visit Node node public boolean visit Boolean Literal node return visit Node node  visitNode BooleanLiteral visitNode
return visit Node node public boolean visit Break Statement node return visit Node node  visitNode BreakStatement visitNode
return visit Node node public boolean visit Cast Expression node return visit Node node  visitNode CastExpression visitNode
return visit Node node public boolean visit Catch Clause node return visit Node node  visitNode CatchClause visitNode
return visit Node node public boolean visit Character Literal node return visit Node node  visitNode CharacterLiteral visitNode
return visit Node node public boolean visit Class Instance Creation node return visit Node node  visitNode ClassInstanceCreation visitNode
return visit Node node public boolean visit Compilation Unit node return visit Node node  visitNode CompilationUnit visitNode
return visit Node node public boolean visit Conditional Expression node return visit Node node  visitNode ConditionalExpression visitNode
return visit Node node public boolean visit Constructor Invocation node return visit Node node  visitNode ConstructorInvocation visitNode
return visit Node node public boolean visit Continue Statement node return visit Node node  visitNode ContinueStatement visitNode
return visit Node node public boolean visit Do Statement node return visit Node node  visitNode DoStatement visitNode
return visit Node node public boolean visit Empty Statement node return visit Node node  visitNode EmptyStatement visitNode
return visit Node node public boolean visit Expression Statement node return visit Node node  visitNode ExpressionStatement visitNode
return visit Node node public boolean visit Field Access node return visit Node node  visitNode FieldAccess visitNode
return visit Node node public boolean visit Field Declaration node return visit Node node  visitNode FieldDeclaration visitNode
return visit Node node public boolean visit For Statement node return visit Node node  visitNode ForStatement visitNode
return visit Node node public boolean visit If Statement node return visit Node node  visitNode IfStatement visitNode
return visit Node node public boolean visit Import Declaration node return visit Node node  visitNode ImportDeclaration visitNode
return visit Node node public boolean visit Infix Expression node return visit Node node  visitNode InfixExpression visitNode
return visit Node node public boolean visit Instanceof Expression node return visit Node node  visitNode InstanceofExpression visitNode
return visit Node node public boolean visit Initializer node return visit Node node  visitNode visitNode
public boolean visit Javadoc node do not visit Javadoc tags by default Use constructor with boolean to enable if super visit node return visit Node node return false  visitNode
return false public boolean visit Labeled Statement node return visit Node node  LabeledStatement visitNode
return visit Node node public boolean visit Method Declaration node return visit Node node  visitNode MethodDeclaration visitNode
return visit Node node public boolean visit Method Invocation node return visit Node node  visitNode MethodInvocation visitNode
return visit Node node public boolean visit Null Literal node return visit Node node  visitNode NullLiteral visitNode
return visit Node node public boolean visit Number Literal node return visit Node node  visitNode NumberLiteral visitNode
return visit Node node public boolean visit Package Declaration node return visit Node node  visitNode PackageDeclaration visitNode
return visit Node node public boolean visit Parenthesized Expression node return visit Node node  visitNode ParenthesizedExpression visitNode
return visit Node node public boolean visit Postfix Expression node return visit Node node  visitNode PostfixExpression visitNode
return visit Node node public boolean visit Prefix Expression node return visit Node node  visitNode PrefixExpression visitNode
return visit Node node public boolean visit Primitive Type node return visit Node node  visitNode PrimitiveType visitNode
return visit Node node public boolean visit Qualified Name node return visit Node node  visitNode QualifiedName visitNode
return visit Node node public boolean visit Return Statement node return visit Node node  visitNode ReturnStatement visitNode
return visit Node node public boolean visit Simple Name node return visit Node node  visitNode SimpleName visitNode
return visit Node node public boolean visit Simple Type node return visit Node node  visitNode SimpleType visitNode
return visit Node node public boolean visit String Literal node return visit Node node  visitNode StringLiteral visitNode
return visit Node node public boolean visit Super Constructor Invocation node return visit Node node  visitNode SuperConstructorInvocation visitNode
return visit Node node public boolean visit Super Field Access node return visit Node node  visitNode SuperFieldAccess visitNode
return visit Node node public boolean visit Super Method Invocation node return visit Node node  visitNode SuperMethodInvocation visitNode
return visit Node node public boolean visit Switch Case node return visit Node node  visitNode SwitchCase visitNode
return visit Node node public boolean visit Switch Statement node return visit Node node  visitNode SwitchStatement visitNode
return visit Node node public boolean visit Synchronized Statement node return visit Node node  visitNode SynchronizedStatement visitNode
return visit Node node public boolean visit This Expression node return visit Node node  visitNode ThisExpression visitNode
return visit Node node public boolean visit Throw Statement node return visit Node node  visitNode ThrowStatement visitNode
return visit Node node public boolean visit Try Statement node return visit Node node  visitNode TryStatement visitNode
return visit Node node public boolean visit Type Declaration node return visit Node node  visitNode TypeDeclaration visitNode
return visit Node node public boolean visit Type Declaration Statement node return visit Node node  visitNode TypeDeclarationStatement visitNode
return visit Node node public boolean visit Type Literal node return visit Node node  visitNode TypeLiteral visitNode
return visit Node node public boolean visit Single Variable Declaration node return visit Node node  visitNode SingleVariableDeclaration visitNode
return visit Node node public boolean visit Variable Declaration Expression node return visit Node node  visitNode VariableDeclarationExpression visitNode
return visit Node node public boolean visit Variable Declaration Statement node return visit Node node  visitNode VariableDeclarationStatement visitNode
return visit Node node public boolean visit Variable Declaration Fragment node return visit Node node  visitNode VariableDeclarationFragment visitNode
return visit Node node public boolean visit While Statement node return visit Node node  visitNode WhileStatement visitNode
since 3 0 public boolean visit Block Comment node return visit Node node  BlockComment visitNode
return visit Node node public boolean visit Line Comment node return visit Node node  visitNode LineComment visitNode
return visit Node node public boolean visit Member Ref node return visit Node node  visitNode MemberRef visitNode
return visit Node node public boolean visit Method Ref node return visit Node node  visitNode MethodRef visitNode
return visit Node node public boolean visit Method Ref Parameter node return visit Node node  visitNode MethodRefParameter visitNode
return visit Node node public boolean visit Tag Element node return visit Node node  visitNode TagElement visitNode
return visit Node node public boolean visit Text Element node return visit Node node  visitNode TextElement visitNode
public void end Visit Anonymous Class Declaration node end Visit Node node  endVisit AnonymousClassDeclaration endVisitNode
end Visit Node node public void end Visit Array Access node end Visit Node node  endVisitNode endVisit ArrayAccess endVisitNode
end Visit Node node public void end Visit Array Creation node end Visit Node node  endVisitNode endVisit ArrayCreation endVisitNode
end Visit Node node public void end Visit Array Initializer node end Visit Node node  endVisitNode endVisit ArrayInitializer endVisitNode
end Visit Node node public void end Visit Array Type node end Visit Node node  endVisitNode endVisit ArrayType endVisitNode
end Visit Node node public void end Visit Assert Statement node end Visit Node node  endVisitNode endVisit AssertStatement endVisitNode
end Visit Node node public void end Visit Assignment node end Visit Node node  endVisitNode endVisit endVisitNode
end Visit Node node public void end Visit Block node end Visit Node node  endVisitNode endVisit endVisitNode
end Visit Node node public void end Visit Boolean Literal node end Visit Node node  endVisitNode endVisit BooleanLiteral endVisitNode
end Visit Node node public void end Visit Break Statement node end Visit Node node  endVisitNode endVisit BreakStatement endVisitNode
end Visit Node node public void end Visit Cast Expression node end Visit Node node  endVisitNode endVisit CastExpression endVisitNode
end Visit Node node public void end Visit Catch Clause node end Visit Node node  endVisitNode endVisit CatchClause endVisitNode
end Visit Node node public void end Visit Character Literal node end Visit Node node  endVisitNode endVisit CharacterLiteral endVisitNode
end Visit Node node public void end Visit Class Instance Creation node end Visit Node node  endVisitNode endVisit ClassInstanceCreation endVisitNode
end Visit Node node public void end Visit Compilation Unit node end Visit Node node  endVisitNode endVisit CompilationUnit endVisitNode
end Visit Node node public void end Visit Conditional Expression node end Visit Node node  endVisitNode endVisit ConditionalExpression endVisitNode
end Visit Node node public void end Visit Constructor Invocation node end Visit Node node  endVisitNode endVisit ConstructorInvocation endVisitNode
end Visit Node node public void end Visit Continue Statement node end Visit Node node  endVisitNode endVisit ContinueStatement endVisitNode
end Visit Node node public void end Visit Do Statement node end Visit Node node  endVisitNode endVisit DoStatement endVisitNode
end Visit Node node public void end Visit Empty Statement node end Visit Node node  endVisitNode endVisit EmptyStatement endVisitNode
end Visit Node node public void end Visit Expression Statement node end Visit Node node  endVisitNode endVisit ExpressionStatement endVisitNode
end Visit Node node public void end Visit Field Access node end Visit Node node  endVisitNode endVisit FieldAccess endVisitNode
end Visit Node node public void end Visit Field Declaration node end Visit Node node  endVisitNode endVisit FieldDeclaration endVisitNode
end Visit Node node public void end Visit For Statement node end Visit Node node  endVisitNode endVisit ForStatement endVisitNode
end Visit Node node public void end Visit If Statement node end Visit Node node  endVisitNode endVisit IfStatement endVisitNode
end Visit Node node public void end Visit Import Declaration node end Visit Node node  endVisitNode endVisit ImportDeclaration endVisitNode
end Visit Node node public void end Visit Infix Expression node end Visit Node node  endVisitNode endVisit InfixExpression endVisitNode
end Visit Node node public void end Visit Instanceof Expression node end Visit Node node  endVisitNode endVisit InstanceofExpression endVisitNode
end Visit Node node public void end Visit Initializer node end Visit Node node  endVisitNode endVisit endVisitNode
end Visit Node node public void end Visit Javadoc node end Visit Node node  endVisitNode endVisit endVisitNode
end Visit Node node public void end Visit Labeled Statement node end Visit Node node  endVisitNode endVisit LabeledStatement endVisitNode
end Visit Node node public void end Visit Method Declaration node end Visit Node node  endVisitNode endVisit MethodDeclaration endVisitNode
end Visit Node node public void end Visit Method Invocation node end Visit Node node  endVisitNode endVisit MethodInvocation endVisitNode
end Visit Node node public void end Visit Null Literal node end Visit Node node  endVisitNode endVisit NullLiteral endVisitNode
end Visit Node node public void end Visit Number Literal node end Visit Node node  endVisitNode endVisit NumberLiteral endVisitNode
end Visit Node node public void end Visit Package Declaration node end Visit Node node  endVisitNode endVisit PackageDeclaration endVisitNode
end Visit Node node public void end Visit Parenthesized Expression node end Visit Node node  endVisitNode endVisit ParenthesizedExpression endVisitNode
end Visit Node node public void end Visit Postfix Expression node end Visit Node node  endVisitNode endVisit PostfixExpression endVisitNode
end Visit Node node public void end Visit Prefix Expression node end Visit Node node  endVisitNode endVisit PrefixExpression endVisitNode
end Visit Node node public void end Visit Primitive Type node end Visit Node node  endVisitNode endVisit PrimitiveType endVisitNode
end Visit Node node public void end Visit Qualified Name node end Visit Node node  endVisitNode endVisit QualifiedName endVisitNode
end Visit Node node public void end Visit Return Statement node end Visit Node node  endVisitNode endVisit ReturnStatement endVisitNode
end Visit Node node public void end Visit Simple Name node end Visit Node node  endVisitNode endVisit SimpleName endVisitNode
end Visit Node node public void end Visit Simple Type node end Visit Node node  endVisitNode endVisit SimpleType endVisitNode
end Visit Node node public void end Visit String Literal node end Visit Node node  endVisitNode endVisit StringLiteral endVisitNode
end Visit Node node public void end Visit Super Constructor Invocation node end Visit Node node  endVisitNode endVisit SuperConstructorInvocation endVisitNode
end Visit Node node public void end Visit Super Field Access node end Visit Node node  endVisitNode endVisit SuperFieldAccess endVisitNode
end Visit Node node public void end Visit Super Method Invocation node end Visit Node node  endVisitNode endVisit SuperMethodInvocation endVisitNode
end Visit Node node public void end Visit Switch Case node end Visit Node node  endVisitNode endVisit SwitchCase endVisitNode
end Visit Node node public void end Visit Switch Statement node end Visit Node node  endVisitNode endVisit SwitchStatement endVisitNode
end Visit Node node public void end Visit Synchronized Statement node end Visit Node node  endVisitNode endVisit SynchronizedStatement endVisitNode
end Visit Node node public void end Visit This Expression node end Visit Node node  endVisitNode endVisit ThisExpression endVisitNode
end Visit Node node public void end Visit Throw Statement node end Visit Node node  endVisitNode endVisit ThrowStatement endVisitNode
end Visit Node node public void end Visit Try Statement node end Visit Node node  endVisitNode endVisit TryStatement endVisitNode
end Visit Node node public void end Visit Type Declaration node end Visit Node node  endVisitNode endVisit TypeDeclaration endVisitNode
end Visit Node node public void end Visit Type Declaration Statement node end Visit Node node  endVisitNode endVisit TypeDeclarationStatement endVisitNode
end Visit Node node public void end Visit Type Literal node end Visit Node node  endVisitNode endVisit TypeLiteral endVisitNode
end Visit Node node public void end Visit Single Variable Declaration node end Visit Node node  endVisitNode endVisit SingleVariableDeclaration endVisitNode
end Visit Node node public void end Visit Variable Declaration Expression node end Visit Node node  endVisitNode endVisit VariableDeclarationExpression endVisitNode
end Visit Node node public void end Visit Variable Declaration Statement node end Visit Node node  endVisitNode endVisit VariableDeclarationStatement endVisitNode
end Visit Node node public void end Visit Variable Declaration Fragment node end Visit Node node  endVisitNode endVisit VariableDeclarationFragment endVisitNode
end Visit Node node public void end Visit While Statement node end Visit Node node  endVisitNode endVisit WhileStatement endVisitNode
since 3 0 public void end Visit Block Comment node end Visit Node node  endVisit BlockComment endVisitNode
end Visit Node node public void end Visit Line Comment node end Visit Node node  endVisitNode endVisit LineComment endVisitNode
end Visit Node node public void end Visit Member Ref node end Visit Node node  endVisitNode endVisit MemberRef endVisitNode
end Visit Node node public void end Visit Method Ref node end Visit Node node  endVisitNode endVisit MethodRef endVisitNode
end Visit Node node public void end Visit Method Ref Parameter node end Visit Node node  endVisitNode endVisit MethodRefParameter endVisitNode
end Visit Node node public void end Visit Tag Element node end Visit Node node  endVisitNode endVisit TagElement endVisitNode
end Visit Node node public void end Visit Text Element node end Visit Node node  endVisitNode endVisit TextElement endVisitNode

Constructor for Default Binding Resolver Default Binding Resolver this new Ast To Old Ast new Hash Map this compiler Bindings ToAST Bindings new Hash Map this bindings To Ast Nodes new Hash Map this ast Nodes To Block Scope new Hash Map this binding Keys To Ast Nodes new Hash Map  DefaultBindingResolver DefaultBindingResolver newAstToOldAst HashMap compilerBindingsToASTBindings HashMap bindingsToAstNodes HashMap astNodesToBlockScope HashMap bindingKeysToAstNodes HashMap
Constructor for Default Binding Resolver Default Binding Resolver Compilation Unit Scope scope this this scope scope  DefaultBindingResolver DefaultBindingResolver CompilationUnitScope
synchronized I Binding resolve Name Name name org eclipse jdt internal compiler ast AST Node node org eclipse jdt internal compiler ast AST Node this new Ast To Old Ast get name int index name index if node instanceof Qualified Name Reference Qualified Name Reference qualified Name Reference Qualified Name Reference node final char tokens qualified Name Reference tokens int qualified Name Length tokens length int index In Qualified Name qualified Name Length index one based int index Of First Field Binding qualified Name Reference index Of First Field Binding one based int other Binding Length qualified Name Length index Of First Field Binding if index In Qualified Name index Of First Field Binding a extra lookup is required Block Scope internal Scope Block Scope this ast Nodes To Block Scope get name Binding binding null try if internal Scope null binding this scope get Type Or Package Char Operation subarray tokens 0 index In Qualified Name else binding internal Scope get Type Or Package Char Operation subarray tokens 0 index In Qualified Name catch Runtime Exception e see https bugs eclipse org bugs show bug cgi id 53357 see https bugs eclipse org bugs show bug cgi id 63550 see https bugs eclipse org bugs show bug cgi id 64299 if binding instanceof org eclipse jdt internal compiler lookup Package Binding return this get Package Binding org eclipse jdt internal compiler lookup Package Binding binding else if binding instanceof org eclipse jdt internal compiler lookup Type Binding it is a type return this get Type Binding org eclipse jdt internal compiler lookup Type Binding binding else if index In Qualified Name index Of First Field Binding if qualified Name Reference is Type Reference return this get Type Binding Reference Binding qualified Name Reference binding else Binding binding qualified Name Reference binding if binding null if binding is Valid Binding return this get Variable Binding org eclipse jdt internal compiler lookup Variable Binding binding else if binding instanceof Problem Field Binding Problem Field Binding problem Field Binding Problem Field Binding binding switch problem Field Binding problem Id case Problem Reasons Not Visible case Problem Reasons Non Static Reference In Static Context Reference Binding declaring Class problem Field Binding declaring Class if declaring Class null Field Binding exact Binding declaring Class get Field tokens tokens length 1 true resolve if exact Binding null I Variable Binding variable Binding I Variable Binding this compiler Bindings ToAST Bindings get exact Binding if variable Binding null return variable Binding variable Binding new Variable Binding this exact Binding this compiler Bindings ToAST Bindings put exact Binding variable Binding return variable Binding break else This is the case for a name which is part of a qualified name that cannot be resolved See PR 13063 if qualified Name Reference other Bindings null other Binding Length index 1 0 return null else return this get Variable Binding qualified Name Reference other Bindings other Binding Length index 1 else if node instanceof Qualified Type Reference Qualified Type Reference qualified Type Reference Qualified Type Reference node if qualified Type Reference resolved Type null return null if index 0 if qualified Type Reference resolved Type is Valid Binding qualified Type Reference instanceof Javadoc Qualified Type Reference Javadoc Qualified Type Reference type Ref Javadoc Qualified Type Reference node if type Ref package Binding null return get Package Binding type Ref package Binding return this get Type Binding qualified Type Reference resolved Type leaf Component Type else int qualified Type Length qualified Type Reference tokens length int index In Qualified Name qualified Type Length index one based if index In Qualified Name 0 Block Scope internal Scope Block Scope this ast Nodes To Block Scope get name Binding binding null try if internal Scope null binding this scope get Type Or Package Char Operation subarray qualified Type Reference tokens 0 index In Qualified Name else binding internal Scope get Type Or Package Char Operation subarray qualified Type Reference tokens 0 index In Qualified Name catch Runtime Exception e see https bugs eclipse org bugs show bug cgi id 53357 if binding instanceof org eclipse jdt internal compiler lookup Package Binding return this get Package Binding org eclipse jdt internal compiler lookup Package Binding binding else if binding instanceof org eclipse jdt internal compiler lookup Type Binding it is a type return this get Type Binding org eclipse jdt internal compiler lookup Type Binding binding else return null else if node instanceof Import Reference Import Reference import Reference Import Reference node int import Reference Length import Reference tokens length int index In Import Reference import Reference Length index one based if index In Import Reference 0 Binding binding null try binding this scope get Type Or Package Char Operation subarray import Reference tokens 0 index In Import Reference catch Runtime Exception e see https bugs eclipse org bugs show bug cgi id 53357 if binding null if binding instanceof org eclipse jdt internal compiler lookup Package Binding return this get Package Binding org eclipse jdt internal compiler lookup Package Binding binding else if binding instanceof org eclipse jdt internal compiler lookup Type Binding it is a type return this get Type Binding org eclipse jdt internal compiler lookup Type Binding binding else return null else if node instanceof Compilation Unit Declaration Compilation Unit Declaration compilation Unit Declaration Compilation Unit Declaration node org eclipse jdt internal compiler ast Type Declaration types compilation Unit Declaration types if types null types length 0 return null org eclipse jdt internal compiler ast Type Declaration type types 0 if type null I Type Binding type Binding this get Type Binding type binding if type Binding null return type Binding get Package else if node instanceof Abstract Method Declaration Abstract Method Declaration method Declaration Abstract Method Declaration node if method Declaration null I Method Binding method Binding this get Method Binding method Declaration binding if method Binding null return method Binding else if node instanceof org eclipse jdt internal compiler ast Type Declaration org eclipse jdt internal compiler ast Type Declaration type Declaration org eclipse jdt internal compiler ast Type Declaration node I Type Binding type Binding this get Type Binding type Declaration binding if type Binding null return type Binding if node instanceof Single Name Reference Single Name Reference single Name Reference Single Name Reference node if single Name Reference is Type Reference return this get Type Binding Reference Binding single Name Reference binding else this is a variable or a field Binding binding single Name Reference binding if binding null if binding is Valid Binding return this get Variable Binding org eclipse jdt internal compiler lookup Variable Binding binding else http dev eclipse org bugs show bug cgi id 24449 if binding instanceof Problem Field Binding Problem Field Binding problem Field Binding Problem Field Binding binding switch problem Field Binding problem Id case Problem Reasons Not Visible case Problem Reasons Non Static Reference In Static Context case Problem Reasons Non Static Reference In Constructor Invocation Reference Binding declaring Class problem Field Binding declaring Class Field Binding exact Binding declaring Class get Field problem Field Binding name true resolve if exact Binding null I Variable Binding variable Binding2 I Variable Binding this compiler Bindings ToAST Bindings get exact Binding if variable Binding2 null return variable Binding2 variable Binding2 new Variable Binding this exact Binding this compiler Bindings ToAST Bindings put exact Binding variable Binding2 return variable Binding2 break else if node instanceof Qualified Super Reference Qualified Super Reference qualified Super Reference Qualified Super Reference node return this get Type Binding qualified Super Reference qualification resolved Type else if node instanceof Local Declaration return this get Variable Binding Local Declaration node binding else if node instanceof Field Reference return get Variable Binding Field Reference node binding else if node instanceof Single Type Reference Single Type Reference single Type Refe IBinding resolveName ASTNode ASTNode newAstToOldAst QualifiedNameReference QualifiedNameReference qualifiedNameReference QualifiedNameReference qualifiedNameReference qualifiedNameLength indexInQualifiedName qualifiedNameLength indexOfFirstFieldBinding qualifiedNameReference indexOfFirstFieldBinding otherBindingLength qualifiedNameLength indexOfFirstFieldBinding indexInQualifiedName indexOfFirstFieldBinding BlockScope internalScope BlockScope astNodesToBlockScope internalScope getTypeOrPackage CharOperation indexInQualifiedName internalScope getTypeOrPackage CharOperation indexInQualifiedName RuntimeException show_bug show_bug show_bug PackageBinding getPackageBinding PackageBinding TypeBinding getTypeBinding TypeBinding indexInQualifiedName indexOfFirstFieldBinding qualifiedNameReference isTypeReference getTypeBinding ReferenceBinding qualifiedNameReference qualifiedNameReference isValidBinding getVariableBinding VariableBinding ProblemFieldBinding ProblemFieldBinding problemFieldBinding ProblemFieldBinding problemFieldBinding problemId ProblemReasons NotVisible ProblemReasons NonStaticReferenceInStaticContext ReferenceBinding declaringClass problemFieldBinding declaringClass declaringClass FieldBinding exactBinding declaringClass getField exactBinding IVariableBinding variableBinding IVariableBinding compilerBindingsToASTBindings exactBinding variableBinding variableBinding variableBinding VariableBinding exactBinding compilerBindingsToASTBindings exactBinding variableBinding variableBinding qualifiedNameReference otherBindings otherBindingLength getVariableBinding qualifiedNameReference otherBindings otherBindingLength QualifiedTypeReference QualifiedTypeReference qualifiedTypeReference QualifiedTypeReference qualifiedTypeReference resolvedType qualifiedTypeReference resolvedType isValidBinding qualifiedTypeReference JavadocQualifiedTypeReference JavadocQualifiedTypeReference typeRef JavadocQualifiedTypeReference typeRef packageBinding getPackageBinding typeRef packageBinding getTypeBinding qualifiedTypeReference resolvedType leafComponentType qualifiedTypeLength qualifiedTypeReference indexInQualifiedName qualifiedTypeLength indexInQualifiedName BlockScope internalScope BlockScope astNodesToBlockScope internalScope getTypeOrPackage CharOperation qualifiedTypeReference indexInQualifiedName internalScope getTypeOrPackage CharOperation qualifiedTypeReference indexInQualifiedName RuntimeException show_bug PackageBinding getPackageBinding PackageBinding TypeBinding getTypeBinding TypeBinding ImportReference ImportReference importReference ImportReference importReferenceLength importReference indexInImportReference importReferenceLength indexInImportReference getTypeOrPackage CharOperation importReference indexInImportReference RuntimeException show_bug PackageBinding getPackageBinding PackageBinding TypeBinding getTypeBinding TypeBinding CompilationUnitDeclaration CompilationUnitDeclaration compilationUnitDeclaration CompilationUnitDeclaration TypeDeclaration compilationUnitDeclaration TypeDeclaration ITypeBinding typeBinding getTypeBinding typeBinding typeBinding getPackage AbstractMethodDeclaration AbstractMethodDeclaration methodDeclaration AbstractMethodDeclaration methodDeclaration IMethodBinding methodBinding getMethodBinding methodDeclaration methodBinding methodBinding TypeDeclaration TypeDeclaration typeDeclaration TypeDeclaration ITypeBinding typeBinding getTypeBinding typeDeclaration typeBinding typeBinding SingleNameReference SingleNameReference singleNameReference SingleNameReference singleNameReference isTypeReference getTypeBinding ReferenceBinding singleNameReference singleNameReference isValidBinding getVariableBinding VariableBinding show_bug ProblemFieldBinding ProblemFieldBinding problemFieldBinding ProblemFieldBinding problemFieldBinding problemId ProblemReasons NotVisible ProblemReasons NonStaticReferenceInStaticContext ProblemReasons NonStaticReferenceInConstructorInvocation ReferenceBinding declaringClass problemFieldBinding declaringClass FieldBinding exactBinding declaringClass getField problemFieldBinding exactBinding IVariableBinding variableBinding2 IVariableBinding compilerBindingsToASTBindings exactBinding variableBinding2 variableBinding2 variableBinding2 VariableBinding exactBinding compilerBindingsToASTBindings exactBinding variableBinding2 variableBinding2 QualifiedSuperReference QualifiedSuperReference qualifiedSuperReference QualifiedSuperReference getTypeBinding qualifiedSuperReference resolvedType LocalDeclaration getVariableBinding LocalDeclaration FieldReference getVariableBinding FieldReference SingleTypeReference SingleTypeReference singleTypeRefe
synchronized I Type Binding resolve Type Type type retrieve the old ast node org eclipse jdt internal compiler ast AST Node node org eclipse jdt internal compiler ast AST Node this new Ast To Old Ast get type org eclipse jdt internal compiler lookup Type Binding binding null if node null if node instanceof Type Reference Type Reference type Reference Type Reference node binding type Reference resolved Type else if node instanceof Single Name Reference Single Name Reference node is Type Reference binding org eclipse jdt internal compiler lookup Type Binding Single Name Reference node binding else if node instanceof Qualified Name Reference Qualified Name Reference node is Type Reference binding org eclipse jdt internal compiler lookup Type Binding Qualified Name Reference node binding else if node instanceof Array Allocation Expression binding Array Allocation Expression node resolved Type if binding null if type is Array Type Array Type array Type Array Type type if binding is Array Type Array Binding array Binding Array Binding binding return get Type Binding this scope create Array array Binding leaf Component Type array Type get Dimensions else return get Type Binding this scope create Array binding array Type get Dimensions else if binding is Array Type Array Binding array Binding Array Binding binding return get Type Binding array Binding leaf Component Type else return get Type Binding binding else if type is Primitive Type Handle the void primitive type returned by get Return Type for a method declaration that is a constructor declaration It prevents null from being returned if Primitive Type type get Primitive Type Code Primitive Type VOID return this get Type Binding Base Types Void Binding return null  ITypeBinding resolveType ASTNode ASTNode newAstToOldAst TypeBinding TypeReference TypeReference typeReference TypeReference typeReference resolvedType SingleNameReference SingleNameReference isTypeReference TypeBinding SingleNameReference QualifiedNameReference QualifiedNameReference isTypeReference TypeBinding QualifiedNameReference ArrayAllocationExpression ArrayAllocationExpression resolvedType isArrayType ArrayType arrayType ArrayType isArrayType ArrayBinding arrayBinding ArrayBinding getTypeBinding createArray arrayBinding leafComponentType arrayType getDimensions getTypeBinding createArray arrayType getDimensions isArrayType ArrayBinding arrayBinding ArrayBinding getTypeBinding arrayBinding leafComponentType getTypeBinding isPrimitiveType getReturnType PrimitiveType getPrimitiveTypeCode PrimitiveType getTypeBinding BaseTypes VoidBinding
synchronized I Type Binding resolve Well Known Type String name if boolean equals name NON NLS 1 char equals name NON NLS 1 byte equals name NON NLS 1 short equals name NON NLS 1 int equals name NON NLS 1 long equals name NON NLS 1 float equals name NON NLS 1 double equals name NON NLS 1 void equals name NON NLS 1 return this get Type Binding this scope get Base Type name to Char Array else if java lang Object equals name NON NLS 1 return this get Type Binding this scope get Java Lang Object else if java lang String equals name NON NLS 1 return this get Type Binding this scope get Java Lang String else if java lang String Buffer equals name NON NLS 1 return this get Type Binding this scope get Type JAVA LANG STRINGBUFFER else if java lang Throwable equals name NON NLS 1 return this get Type Binding this scope get Java Lang Throwable else if java lang Exception equals name NON NLS 1 return this get Type Binding this scope get Type JAVA LANG EXCEPTION else if java lang Runtime Exception equals name NON NLS 1 return this get Type Binding this scope get Java Lang Runtime Exception else if java lang Error equals name NON NLS 1 return this get Type Binding this scope get Java Lang Error else if java lang Class equals name NON NLS 1 return this get Type Binding this scope get Java Lang Class else if java lang Cloneable equals name NON NLS 1 return this get Type Binding this scope get Java Lang Cloneable else if java io Serializable equals name NON NLS 1 return this get Type Binding this scope get Java Io Serializable else return null  ITypeBinding resolveWellKnownType getTypeBinding getBaseType toCharArray getTypeBinding getJavaLangObject getTypeBinding getJavaLangString StringBuffer getTypeBinding getType JAVA_LANG_STRINGBUFFER getTypeBinding getJavaLangThrowable getTypeBinding getType JAVA_LANG_EXCEPTION RuntimeException getTypeBinding getJavaLangRuntimeException getTypeBinding getJavaLangError getTypeBinding getJavaLangClass getTypeBinding getJavaLangCloneable getTypeBinding getJavaIoSerializable
synchronized I Type Binding resolve Type Type Declaration type final Object node this new Ast To Old Ast get type if node instanceof org eclipse jdt internal compiler ast Type Declaration org eclipse jdt internal compiler ast Type Declaration type Declaration org eclipse jdt internal compiler ast Type Declaration node if type Declaration null I Type Binding type Binding this get Type Binding type Declaration binding if type Binding null return null this bindings To Ast Nodes put type Binding type String key type Binding get Key if key null this binding Keys To Ast Nodes put key type return type Binding return null  ITypeBinding resolveType TypeDeclaration newAstToOldAst TypeDeclaration TypeDeclaration typeDeclaration TypeDeclaration typeDeclaration ITypeBinding typeBinding getTypeBinding typeDeclaration typeBinding bindingsToAstNodes typeBinding typeBinding getKey bindingKeysToAstNodes typeBinding
synchronized I Method Binding resolve Method Method Declaration method Object old Node this new Ast To Old Ast get method if old Node instanceof Abstract Method Declaration Abstract Method Declaration method Declaration Abstract Method Declaration old Node if method Declaration null I Method Binding method Binding this get Method Binding method Declaration binding if method Binding null return null this bindings To Ast Nodes put method Binding method String key method Binding get Key if key null this binding Keys To Ast Nodes put key method return method Binding return null  IMethodBinding resolveMethod MethodDeclaration oldNode newAstToOldAst oldNode AbstractMethodDeclaration AbstractMethodDeclaration methodDeclaration AbstractMethodDeclaration oldNode methodDeclaration IMethodBinding methodBinding getMethodBinding methodDeclaration methodBinding bindingsToAstNodes methodBinding methodBinding getKey bindingKeysToAstNodes methodBinding
synchronized I Method Binding resolve Method Method Invocation method Object old Node this new Ast To Old Ast get method if old Node instanceof Message Send Message Send message Send Message Send old Node if message Send null return this get Method Binding message Send binding return null  IMethodBinding resolveMethod MethodInvocation oldNode newAstToOldAst oldNode MessageSend MessageSend messageSend MessageSend oldNode messageSend getMethodBinding messageSend
synchronized I Method Binding resolve Method Super Method Invocation method Object old Node this new Ast To Old Ast get method if old Node instanceof Message Send Message Send message Send Message Send old Node if message Send null return this get Method Binding message Send binding return null  IMethodBinding resolveMethod SuperMethodInvocation oldNode newAstToOldAst oldNode MessageSend MessageSend messageSend MessageSend oldNode messageSend getMethodBinding messageSend
synchronized I Variable Binding resolve Variable Variable Declaration variable final Object node this new Ast To Old Ast get variable if node instanceof Abstract Variable Declaration Abstract Variable Declaration abstract Variable Declaration Abstract Variable Declaration node if abstract Variable Declaration instanceof org eclipse jdt internal compiler ast Field Declaration org eclipse jdt internal compiler ast Field Declaration field Declaration org eclipse jdt internal compiler ast Field Declaration abstract Variable Declaration I Variable Binding variable Binding this get Variable Binding field Declaration binding if variable Binding null return null this bindings To Ast Nodes put variable Binding variable String key variable Binding get Key if key null this binding Keys To Ast Nodes put key variable return variable Binding I Variable Binding variable Binding this get Variable Binding Local Declaration abstract Variable Declaration binding if variable Binding null return null this bindings To Ast Nodes put variable Binding variable String key variable Binding get Key if key null this binding Keys To Ast Nodes put key variable return variable Binding return null  IVariableBinding resolveVariable VariableDeclaration newAstToOldAst AbstractVariableDeclaration AbstractVariableDeclaration abstractVariableDeclaration AbstractVariableDeclaration abstractVariableDeclaration FieldDeclaration FieldDeclaration fieldDeclaration FieldDeclaration abstractVariableDeclaration IVariableBinding variableBinding getVariableBinding fieldDeclaration variableBinding bindingsToAstNodes variableBinding variableBinding getKey bindingKeysToAstNodes variableBinding IVariableBinding variableBinding getVariableBinding LocalDeclaration abstractVariableDeclaration variableBinding bindingsToAstNodes variableBinding variableBinding getKey bindingKeysToAstNodes variableBinding
synchronized I Type Binding resolve Expression Type Expression expression if expression instanceof Class Instance Creation org eclipse jdt internal compiler ast AST Node ast Node org eclipse jdt internal compiler ast AST Node this new Ast To Old Ast get expression if ast Node instanceof org eclipse jdt internal compiler ast Type Declaration org eclipse jdt internal compiler ast Type Declaration type Declaration org eclipse jdt internal compiler ast Type Declaration ast Node if type Declaration null I Type Binding type Binding this get Type Binding type Declaration binding if type Binding null return null return type Binding else should be an Allocation Expression Allocation Expression allocation Expression Allocation Expression ast Node I Method Binding method Binding this get Method Binding allocation Expression binding if method Binding null return null else return method Binding get Declaring Class else if expression instanceof Name I Binding binding this resolve Name Name expression if binding null return null switch binding get Kind case I Binding TYPE return I Type Binding binding case I Binding VARIABLE return I Variable Binding binding get Type else if expression instanceof Array Initializer org eclipse jdt internal compiler ast Array Initializer old Ast org eclipse jdt internal compiler ast Array Initializer this new Ast To Old Ast get expression if old Ast null old Ast binding null return null return this get Type Binding old Ast binding else if expression instanceof Array Creation Array Allocation Expression array Allocation Expression Array Allocation Expression this new Ast To Old Ast get expression return this get Type Binding array Allocation Expression resolved Type else if expression instanceof Assignment Assignment assignment Assignment expression return this resolve Expression Type assignment get Left Hand Side else if expression instanceof Postfix Expression Postfix Expression post Fix Expression Postfix Expression expression return this resolve Expression Type post Fix Expression get Operand else if expression instanceof Prefix Expression Prefix Expression pre Fix Expression Prefix Expression expression return this resolve Expression Type pre Fix Expression get Operand else if expression instanceof Cast Expression org eclipse jdt internal compiler ast Cast Expression cast Expression org eclipse jdt internal compiler ast Cast Expression this new Ast To Old Ast get expression return this get Type Binding cast Expression resolved Type else if expression instanceof String Literal return this get Type Binding this scope get Java Lang String else if expression instanceof Type Literal return this get Type Binding this scope get Java Lang Class else if expression instanceof Boolean Literal Boolean Literal boolean Literal Boolean Literal expression if boolean Literal boolean Value True Literal true Literal True Literal this new Ast To Old Ast get boolean Literal return this get Type Binding true Literal literal Type null else False Literal false Literal False Literal this new Ast To Old Ast get boolean Literal return this get Type Binding false Literal literal Type null else if expression instanceof Null Literal org eclipse jdt internal compiler ast Null Literal null Literal org eclipse jdt internal compiler ast Null Literal this new Ast To Old Ast get expression return this get Type Binding null Literal literal Type null else if expression instanceof Character Literal Char Literal char Literal Char Literal this new Ast To Old Ast get expression return this get Type Binding char Literal literal Type null else if expression instanceof Number Literal Literal literal Literal this new Ast To Old Ast get expression return this get Type Binding literal literal Type null else if expression instanceof Infix Expression Object node this new Ast To Old Ast get expression if node instanceof Operator Expression Operator Expression operator Expression Operator Expression node return this get Type Binding operator Expression resolved Type else if node instanceof String Literal Concatenation String Literal Concatenation string Literal Concatenation String Literal Concatenation node return this get Type Binding string Literal Concatenation resolved Type else if expression instanceof Instanceof Expression org eclipse jdt internal compiler ast Instance Of Expression instance Of Expression org eclipse jdt internal compiler ast Instance Of Expression this new Ast To Old Ast get expression return this get Type Binding instance Of Expression resolved Type else if expression instanceof Field Access Field Reference field Reference Field Reference this new Ast To Old Ast get expression I Variable Binding variable Binding this get Variable Binding field Reference binding if variable Binding null return null else return variable Binding get Type else if expression instanceof Super Field Access Field Reference field Reference Field Reference this new Ast To Old Ast get expression I Variable Binding variable Binding this get Variable Binding field Reference binding if variable Binding null return null else return variable Binding get Type else if expression instanceof Array Access Array Reference array Reference Array Reference this new Ast To Old Ast get expression return this get Type Binding array Reference resolved Type else if expression instanceof This Expression This Reference this Reference This Reference this new Ast To Old Ast get expression Block Scope block Scope Block Scope this ast Nodes To Block Scope get expression if block Scope null return null return this get Type Binding this Reference resolve Type block Scope else if expression instanceof Method Invocation expression instanceof Super Method Invocation Message Send message Send Message Send this new Ast To Old Ast get expression I Method Binding method Binding this get Method Binding message Send binding if method Binding null return null else return method Binding get Return Type else if expression instanceof Parenthesized Expression Parenthesized Expression parenthesized Expression Parenthesized Expression expression return this resolve Expression Type parenthesized Expression get Expression else if expression instanceof Conditional Expression org eclipse jdt internal compiler ast Conditional Expression conditional Expression org eclipse jdt internal compiler ast Conditional Expression this new Ast To Old Ast get expression return this get Type Binding conditional Expression resolved Type else if expression instanceof Variable Declaration Expression Variable Declaration Expression variable Declaration Expression Variable Declaration Expression expression Type type variable Declaration Expression get Type if type null return type resolve Binding return null  ITypeBinding resolveExpressionType ClassInstanceCreation ASTNode astNode ASTNode newAstToOldAst astNode TypeDeclaration TypeDeclaration typeDeclaration TypeDeclaration astNode typeDeclaration ITypeBinding typeBinding getTypeBinding typeDeclaration typeBinding typeBinding AllocationExpression AllocationExpression allocationExpression AllocationExpression astNode IMethodBinding methodBinding getMethodBinding allocationExpression methodBinding methodBinding getDeclaringClass IBinding resolveName getKind IBinding ITypeBinding IBinding IVariableBinding getType ArrayInitializer ArrayInitializer oldAst ArrayInitializer newAstToOldAst oldAst oldAst getTypeBinding oldAst ArrayCreation ArrayAllocationExpression arrayAllocationExpression ArrayAllocationExpression newAstToOldAst getTypeBinding arrayAllocationExpression resolvedType resolveExpressionType getLeftHandSide PostfixExpression PostfixExpression postFixExpression PostfixExpression resolveExpressionType postFixExpression getOperand PrefixExpression PrefixExpression preFixExpression PrefixExpression resolveExpressionType preFixExpression getOperand CastExpression CastExpression castExpression CastExpression newAstToOldAst getTypeBinding castExpression resolvedType StringLiteral getTypeBinding getJavaLangString TypeLiteral getTypeBinding getJavaLangClass BooleanLiteral BooleanLiteral booleanLiteral BooleanLiteral booleanLiteral booleanValue TrueLiteral trueLiteral TrueLiteral newAstToOldAst booleanLiteral getTypeBinding trueLiteral literalType FalseLiteral falseLiteral FalseLiteral newAstToOldAst booleanLiteral getTypeBinding falseLiteral literalType NullLiteral NullLiteral nullLiteral NullLiteral newAstToOldAst getTypeBinding nullLiteral literalType CharacterLiteral CharLiteral charLiteral CharLiteral newAstToOldAst getTypeBinding charLiteral literalType NumberLiteral newAstToOldAst getTypeBinding literalType InfixExpression newAstToOldAst OperatorExpression OperatorExpression operatorExpression OperatorExpression getTypeBinding operatorExpression resolvedType StringLiteralConcatenation StringLiteralConcatenation stringLiteralConcatenation StringLiteralConcatenation getTypeBinding stringLiteralConcatenation resolvedType InstanceofExpression InstanceOfExpression instanceOfExpression InstanceOfExpression newAstToOldAst getTypeBinding instanceOfExpression resolvedType FieldAccess FieldReference fieldReference FieldReference newAstToOldAst IVariableBinding variableBinding getVariableBinding fieldReference variableBinding variableBinding getType SuperFieldAccess FieldReference fieldReference FieldReference newAstToOldAst IVariableBinding variableBinding getVariableBinding fieldReference variableBinding variableBinding getType ArrayAccess ArrayReference arrayReference ArrayReference newAstToOldAst getTypeBinding arrayReference resolvedType ThisExpression ThisReference thisReference ThisReference newAstToOldAst BlockScope blockScope BlockScope astNodesToBlockScope blockScope getTypeBinding thisReference resolveType blockScope MethodInvocation SuperMethodInvocation MessageSend messageSend MessageSend newAstToOldAst IMethodBinding methodBinding getMethodBinding messageSend methodBinding methodBinding getReturnType ParenthesizedExpression ParenthesizedExpression parenthesizedExpression ParenthesizedExpression resolveExpressionType parenthesizedExpression getExpression ConditionalExpression ConditionalExpression conditionalExpression ConditionalExpression newAstToOldAst getTypeBinding conditionalExpression resolvedType VariableDeclarationExpression VariableDeclarationExpression variableDeclarationExpression VariableDeclarationExpression variableDeclarationExpression getType resolveBinding
synchronized I Variable Binding resolve Field Field Access field Access Object old Node this new Ast To Old Ast get field Access if old Node instanceof Field Reference Field Reference field Reference Field Reference old Node if field Reference null return this get Variable Binding field Reference binding return null  IVariableBinding resolveField FieldAccess fieldAccess oldNode newAstToOldAst fieldAccess oldNode FieldReference FieldReference fieldReference FieldReference oldNode fieldReference getVariableBinding fieldReference
synchronized I Variable Binding resolve Field Super Field Access field Access Object old Node this new Ast To Old Ast get field Access if old Node instanceof Field Reference Field Reference field Reference Field Reference old Node if field Reference null return this get Variable Binding field Reference binding return null  IVariableBinding resolveField SuperFieldAccess fieldAccess oldNode newAstToOldAst fieldAccess oldNode FieldReference FieldReference fieldReference FieldReference oldNode fieldReference getVariableBinding fieldReference
synchronized I Binding resolve Import Import Declaration import Declaration try org eclipse jdt internal compiler ast AST Node node org eclipse jdt internal compiler ast AST Node this new Ast To Old Ast get import Declaration if node instanceof Import Reference Import Reference import Reference Import Reference node if import Reference on Demand Binding binding this scope get Type Or Package Char Operation subarray import Reference tokens 0 import Reference tokens length if binding null if binding binding Type Binding Ids PACKAGE I Package Binding package Binding this get Package Binding org eclipse jdt internal compiler lookup Package Binding binding if package Binding null return null return package Binding else if it is not a package it has to be a type I Type Binding type Binding this get Type Binding org eclipse jdt internal compiler lookup Type Binding binding if type Binding null return null return type Binding else Binding binding this scope get Type Or Package import Reference tokens if binding null binding instanceof org eclipse jdt internal compiler lookup Type Binding I Type Binding type Binding this get Type Binding org eclipse jdt internal compiler lookup Type Binding binding return type Binding null null type Binding catch Runtime Exception e see https bugs eclipse org bugs show bug cgi id 53357 see https bugs eclipse org bugs show bug cgi id 63550 see https bugs eclipse org bugs show bug cgi id 64299 return null  IBinding resolveImport ImportDeclaration importDeclaration ASTNode ASTNode newAstToOldAst importDeclaration ImportReference ImportReference importReference ImportReference importReference onDemand getTypeOrPackage CharOperation importReference importReference bindingType BindingIds IPackageBinding packageBinding getPackageBinding PackageBinding packageBinding packageBinding ITypeBinding typeBinding getTypeBinding TypeBinding typeBinding typeBinding getTypeOrPackage importReference TypeBinding ITypeBinding typeBinding getTypeBinding TypeBinding typeBinding typeBinding RuntimeException show_bug show_bug show_bug
synchronized I Package Binding resolve Package Package Declaration pkg try org eclipse jdt internal compiler ast AST Node node org eclipse jdt internal compiler ast AST Node this new Ast To Old Ast get pkg if node instanceof Import Reference Import Reference import Reference Import Reference node Binding binding this scope get Type Or Package Char Operation subarray import Reference tokens 0 import Reference tokens length if binding null binding is Valid Binding I Package Binding package Binding this get Package Binding org eclipse jdt internal compiler lookup Package Binding binding if package Binding null return null this bindings To Ast Nodes put package Binding pkg String key package Binding get Key if key null this binding Keys To Ast Nodes put key pkg return package Binding catch Runtime Exception e see https bugs eclipse org bugs show bug cgi id 53357 see https bugs eclipse org bugs show bug cgi id 63550 see https bugs eclipse org bugs show bug cgi id 64299 return null  IPackageBinding resolvePackage PackageDeclaration ASTNode ASTNode newAstToOldAst ImportReference ImportReference importReference ImportReference getTypeOrPackage CharOperation importReference importReference isValidBinding IPackageBinding packageBinding getPackageBinding PackageBinding packageBinding bindingsToAstNodes packageBinding packageBinding getKey bindingKeysToAstNodes packageBinding RuntimeException show_bug show_bug show_bug
synchronized AST Node find Declaring Node I Binding binding if binding null return null return AST Node this bindings To Ast Nodes get binding  ASTNode findDeclaringNode IBinding ASTNode bindingsToAstNodes
synchronized AST Node find Declaring Node String binding Key if binding Key null return null return AST Node this binding Keys To Ast Nodes get binding Key  ASTNode findDeclaringNode bindingKey bindingKey ASTNode bindingKeysToAstNodes bindingKey
Method declared on Binding Resolver synchronized void store AST Node node org eclipse jdt internal compiler ast AST Node oldAST Node this new Ast To Old Ast put node oldAST Node  BindingResolver ASTNode ASTNode oldASTNode newAstToOldAst oldASTNode
synchronized void update Key AST Node node AST Node new Node Object ast Node this new Ast To Old Ast remove node if ast Node null this new Ast To Old Ast put new Node ast Node  updateKey ASTNode ASTNode newNode astNode newAstToOldAst astNode newAstToOldAst newNode astNode
synchronized I Type Binding get Type Binding org eclipse jdt internal compiler lookup Type Binding reference Binding if reference Binding null return null else if reference Binding is Valid Binding switch reference Binding problem Id case Problem Reasons Not Visible case Problem Reasons Non Static Reference In Static Context if reference Binding instanceof Problem Reference Binding Problem Reference Binding problem Reference Binding Problem Reference Binding reference Binding Binding binding2 problem Reference Binding original if binding2 null binding2 instanceof org eclipse jdt internal compiler lookup Type Binding Type Binding binding Type Binding this compiler Bindings ToAST Bindings get binding2 if binding null return binding binding new Type Binding this org eclipse jdt internal compiler lookup Type Binding binding2 this compiler Bindings ToAST Bindings put binding2 binding return binding return null else Type Binding binding Type Binding this compiler Bindings ToAST Bindings get reference Binding if binding null return binding binding new Type Binding this reference Binding this compiler Bindings ToAST Bindings put reference Binding binding return binding  ITypeBinding getTypeBinding TypeBinding referenceBinding referenceBinding referenceBinding isValidBinding referenceBinding problemId ProblemReasons NotVisible ProblemReasons NonStaticReferenceInStaticContext referenceBinding ProblemReferenceBinding ProblemReferenceBinding problemReferenceBinding ProblemReferenceBinding referenceBinding problemReferenceBinding TypeBinding TypeBinding TypeBinding compilerBindingsToASTBindings TypeBinding TypeBinding compilerBindingsToASTBindings TypeBinding TypeBinding compilerBindingsToASTBindings referenceBinding TypeBinding referenceBinding compilerBindingsToASTBindings referenceBinding
synchronized I Package Binding get Package Binding org eclipse jdt internal compiler lookup Package Binding package Binding if package Binding null package Binding is Valid Binding return null I Package Binding binding I Package Binding this compiler Bindings ToAST Bindings get package Binding if binding null return binding binding new Package Binding package Binding this compiler Bindings ToAST Bindings put package Binding binding return binding  IPackageBinding getPackageBinding PackageBinding packageBinding packageBinding packageBinding isValidBinding IPackageBinding IPackageBinding compilerBindingsToASTBindings packageBinding PackageBinding packageBinding compilerBindingsToASTBindings packageBinding
synchronized I Variable Binding get Variable Binding org eclipse jdt internal compiler lookup Variable Binding variable Binding if variable Binding null if variable Binding is Valid Binding I Variable Binding binding I Variable Binding this compiler Bindings ToAST Bindings get variable Binding if binding null return binding binding new Variable Binding this variable Binding this compiler Bindings ToAST Bindings put variable Binding binding return binding else http dev eclipse org bugs show bug cgi id 24449 if variable Binding instanceof Problem Field Binding Problem Field Binding problem Field Binding Problem Field Binding variable Binding switch problem Field Binding problem Id case Problem Reasons Not Visible case Problem Reasons Non Static Reference In Static Context case Problem Reasons Non Static Reference In Constructor Invocation Reference Binding declaring Class problem Field Binding declaring Class Field Binding exact Binding declaring Class get Field problem Field Binding name true resolve if exact Binding null I Variable Binding variable Binding2 I Variable Binding this compiler Bindings ToAST Bindings get exact Binding if variable Binding2 null return variable Binding2 variable Binding2 new Variable Binding this exact Binding this compiler Bindings ToAST Bindings put exact Binding variable Binding2 return variable Binding2 break return null  IVariableBinding getVariableBinding VariableBinding variableBinding variableBinding variableBinding isValidBinding IVariableBinding IVariableBinding compilerBindingsToASTBindings variableBinding VariableBinding variableBinding compilerBindingsToASTBindings variableBinding show_bug variableBinding ProblemFieldBinding ProblemFieldBinding problemFieldBinding ProblemFieldBinding variableBinding problemFieldBinding problemId ProblemReasons NotVisible ProblemReasons NonStaticReferenceInStaticContext ProblemReasons NonStaticReferenceInConstructorInvocation ReferenceBinding declaringClass problemFieldBinding declaringClass FieldBinding exactBinding declaringClass getField problemFieldBinding exactBinding IVariableBinding variableBinding2 IVariableBinding compilerBindingsToASTBindings exactBinding variableBinding2 variableBinding2 variableBinding2 VariableBinding exactBinding compilerBindingsToASTBindings exactBinding variableBinding2 variableBinding2
synchronized I Method Binding get Method Binding org eclipse jdt internal compiler lookup Method Binding method Binding if method Binding null if method Binding is Valid Binding I Method Binding binding I Method Binding this compiler Bindings ToAST Bindings get method Binding if binding null return binding binding new Method Binding this method Binding this compiler Bindings ToAST Bindings put method Binding binding return binding else http dev eclipse org bugs show bug cgi id 23597 switch method Binding problem Id case Problem Reasons Not Visible case Problem Reasons Non Static Reference In Static Context case Problem Reasons Non Static Reference In Constructor Invocation Reference Binding declaring Class method Binding declaring Class if declaring Class null org eclipse jdt internal compiler lookup Method Binding exact Binding declaring Class get Exact Method method Binding selector method Binding parameters if exact Binding null I Method Binding binding I Method Binding this compiler Bindings ToAST Bindings get exact Binding if binding null return binding binding new Method Binding this exact Binding this compiler Bindings ToAST Bindings put exact Binding binding return binding break return null  IMethodBinding getMethodBinding MethodBinding methodBinding methodBinding methodBinding isValidBinding IMethodBinding IMethodBinding compilerBindingsToASTBindings methodBinding MethodBinding methodBinding compilerBindingsToASTBindings methodBinding show_bug methodBinding problemId ProblemReasons NotVisible ProblemReasons NonStaticReferenceInStaticContext ProblemReasons NonStaticReferenceInConstructorInvocation ReferenceBinding declaringClass methodBinding declaringClass declaringClass MethodBinding exactBinding declaringClass getExactMethod methodBinding methodBinding exactBinding IMethodBinding IMethodBinding compilerBindingsToASTBindings exactBinding MethodBinding exactBinding compilerBindingsToASTBindings exactBinding
synchronized I Method Binding resolve Constructor Class Instance Creation expression org eclipse jdt internal compiler ast AST Node node org eclipse jdt internal compiler ast AST Node this new Ast To Old Ast get expression if node null node bits org eclipse jdt internal compiler ast AST Node Is Anonymous TypeMASK 0 org eclipse jdt internal compiler ast Type Declaration anonymous Local Type Declaration org eclipse jdt internal compiler ast Type Declaration node return this get Method Binding anonymous Local Type Declaration allocation binding else if node instanceof Allocation Expression return this get Method Binding Allocation Expression node binding return null  IMethodBinding resolveConstructor ClassInstanceCreation ASTNode ASTNode newAstToOldAst ASTNode IsAnonymousTypeMASK TypeDeclaration anonymousLocalTypeDeclaration TypeDeclaration getMethodBinding anonymousLocalTypeDeclaration AllocationExpression getMethodBinding AllocationExpression
synchronized I Method Binding resolve Constructor Constructor Invocation expression org eclipse jdt internal compiler ast AST Node node org eclipse jdt internal compiler ast AST Node this new Ast To Old Ast get expression if node instanceof Explicit Constructor Call Explicit Constructor Call explicit Constructor Call Explicit Constructor Call node return this get Method Binding explicit Constructor Call binding return null  IMethodBinding resolveConstructor ConstructorInvocation ASTNode ASTNode newAstToOldAst ExplicitConstructorCall ExplicitConstructorCall explicitConstructorCall ExplicitConstructorCall getMethodBinding explicitConstructorCall
synchronized I Method Binding resolve Constructor Super Constructor Invocation expression org eclipse jdt internal compiler ast AST Node node org eclipse jdt internal compiler ast AST Node this new Ast To Old Ast get expression if node instanceof Explicit Constructor Call Explicit Constructor Call explicit Constructor Call Explicit Constructor Call node return this get Method Binding explicit Constructor Call binding return null  IMethodBinding resolveConstructor SuperConstructorInvocation ASTNode ASTNode newAstToOldAst ExplicitConstructorCall ExplicitConstructorCall explicitConstructorCall ExplicitConstructorCall getMethodBinding explicitConstructorCall
synchronized I Type Binding resolve Type Anonymous Class Declaration type org eclipse jdt internal compiler ast AST Node node org eclipse jdt internal compiler ast AST Node this new Ast To Old Ast get type if node null node bits org eclipse jdt internal compiler ast AST Node Is Anonymous TypeMASK 0 org eclipse jdt internal compiler ast Type Declaration anonymous Local Type Declaration org eclipse jdt internal compiler ast Type Declaration node if anonymous Local Type Declaration null I Type Binding type Binding this get Type Binding anonymous Local Type Declaration binding if type Binding null return null this bindings To Ast Nodes put type Binding type String key type Binding get Key if key null this binding Keys To Ast Nodes put key type return type Binding return null  ITypeBinding resolveType AnonymousClassDeclaration ASTNode ASTNode newAstToOldAst ASTNode IsAnonymousTypeMASK TypeDeclaration anonymousLocalTypeDeclaration TypeDeclaration anonymousLocalTypeDeclaration ITypeBinding typeBinding getTypeBinding anonymousLocalTypeDeclaration typeBinding bindingsToAstNodes typeBinding typeBinding getKey bindingKeysToAstNodes typeBinding
synchronized org eclipse jdt internal compiler ast AST Node get Corresponding Node AST Node current Node return org eclipse jdt internal compiler ast AST Node this new Ast To Old Ast get current Node  ASTNode getCorrespondingNode ASTNode currentNode ASTNode newAstToOldAst currentNode
see org eclipse jdt core dom Binding Resolver record Scope AST Node Block Scope synchronized void record Scope AST Node ast Node Block Scope block Scope this ast Nodes To Block Scope put ast Node block Scope  BindingResolver recordScope ASTNode BlockScope recordScope ASTNode astNode BlockScope blockScope astNodesToBlockScope astNode blockScope
synchronized I Binding resolve Reference Member Ref ref if ref get Parent null Javadoc doc Comment ref get Javadoc if doc Comment null org eclipse jdt internal compiler ast Javadoc javadoc org eclipse jdt internal compiler ast Javadoc this new Ast To Old Ast get doc Comment if javadoc null int start ref get Start Position search for compiler ast nodes with same position if ref get Name null for int i 0 i javadoc thrown Exceptions length i Type Reference type Ref javadoc thrown Exceptions i if type Ref source Start start return get Type Binding type Ref resolved Type for int i 0 i javadoc references length i org eclipse jdt internal compiler ast Expression expression javadoc references i if expression source Start start if expression instanceof Type Reference return get Type Binding expression resolved Type else if expression instanceof Javadoc Field Reference return get Variable Binding Javadoc Field Reference expression binding org eclipse jdt internal compiler ast Expression expression org eclipse jdt internal compiler ast Expression this new Ast To Old Ast get ref if expression instanceof Type Reference return get Type Binding expression resolved Type else if expression instanceof Javadoc Field Reference return get Variable Binding Javadoc Field Reference expression binding return null  IBinding resolveReference MemberRef getParent docComment getJavadoc docComment newAstToOldAst docComment getStartPosition getName thrownExceptions TypeReference typeRef thrownExceptions typeRef sourceStart getTypeBinding typeRef resolvedType sourceStart TypeReference getTypeBinding resolvedType JavadocFieldReference getVariableBinding JavadocFieldReference newAstToOldAst TypeReference getTypeBinding resolvedType JavadocFieldReference getVariableBinding JavadocFieldReference
synchronized I Binding resolve Reference Method Ref ref if ref get Parent null Javadoc doc Comment ref get Javadoc if doc Comment null org eclipse jdt internal compiler ast Javadoc javadoc org eclipse jdt internal compiler ast Javadoc this new Ast To Old Ast get doc Comment if javadoc null int start ref get Start Position search for compiler ast nodes with same position org eclipse jdt internal compiler lookup Method Binding binding null for int i 0 binding null i javadoc references length i org eclipse jdt internal compiler ast Expression expression javadoc references i if expression source Start start if expression instanceof Javadoc Message Send return this get Method Binding Javadoc Message Send expression binding else if expression instanceof Javadoc Allocation Expression return this get Method Binding Javadoc Allocation Expression expression binding org eclipse jdt internal compiler ast Expression expression org eclipse jdt internal compiler ast Expression this new Ast To Old Ast get ref if expression instanceof Javadoc Message Send return this get Method Binding Javadoc Message Send expression binding else if expression instanceof Javadoc Allocation Expression return this get Method Binding Javadoc Allocation Expression expression binding return null  IBinding resolveReference MethodRef getParent docComment getJavadoc docComment newAstToOldAst docComment getStartPosition MethodBinding sourceStart JavadocMessageSend getMethodBinding JavadocMessageSend JavadocAllocationExpression getMethodBinding JavadocAllocationExpression newAstToOldAst JavadocMessageSend getMethodBinding JavadocMessageSend JavadocAllocationExpression getMethodBinding JavadocAllocationExpression

param table the given table of comments Default Comment Mapper Comment table this comments table  DefaultCommentMapper
boolean has Same Table Comment table return this comments table  hasSameTable
Get comment of the list which includes a given position param position The position belonging to the looked up comment return comment which includes the given position or null if none was found Comment get Comment int position if this comments null return null int size this comments length if size 0 return null int index get Comment Index 0 position 0 if index 0 return null return this comments index  getComment getCommentIndex
private int get Comment Index int start int position int exact if position 0 if this comments length 0 this comments 0 get Start Position 0 return 0 return 1 int bottom start top this comments length 1 int i 0 index 1 Comment comment null while bottom top i bottom top 2 comment this comments i int comment Start comment get Start Position if position comment Start top i 1 else if position comment Start comment get Length bottom i 1 else index i break if index 0 exact 0 comment this comments i if position comment get Start Position return exact 0 i 1 i else return exact 0 i i 1 return index  getCommentIndex getStartPosition commentStart getStartPosition commentStart commentStart getLength getStartPosition
Return all leading comments of a given node param node return an array of Comment or null if there s no leading comment Comment get Leading Comments AST Node node if this leading Comments null int range int this leading Comments get node if range null int length range 1 range 0 1 Comment lead Comments new Comment length System arraycopy this comments range 0 lead Comments 0 length return lead Comments return null  getLeadingComments ASTNode leadingComments leadingComments leadComments leadComments leadComments
Return all trailing comments of a given node param node return an array of Comment or null if there s no trailing comment Comment get Trailing Comments AST Node node if this trailing Comments null int range int this trailing Comments get node if range null int length range 1 range 0 1 Comment trail Comments new Comment length System arraycopy this comments range 0 trail Comments 0 length return trail Comments return null  getTrailingComments ASTNode trailingComments trailingComments trailComments trailComments trailComments
Returns the extended start position of the given node Unlike link AST Node get Start Position and link AST Node get Length the extended source range may include comments and whitespace immediately before or after the normal source range for the node param node the node return the 0 based character index or code 1 code if no source position information is recorded for this node see get Extended Length AST Node since 3 0 public int get Extended Start Position AST Node node if this leading Comments null int range int this leading Comments get node if range null return this comments range 0 get Start Position return node get Start Position  ASTNode getStartPosition ASTNode getLength getExtendedLength ASTNode getExtendedStartPosition ASTNode leadingComments leadingComments getStartPosition getStartPosition
public int get Extended End AST Node node int end node get Start Position node get Length if this trailing Comments null int range int this trailing Comments get node if range null if range 0 1 range 1 1 AST Node parent node get Parent if parent null return get Extended End parent else Comment last Comment this comments range 1 end last Comment get Start Position last Comment get Length return end 1  getExtendedEnd ASTNode getStartPosition getLength trailingComments trailingComments ASTNode getParent getExtendedEnd lastComment lastComment getStartPosition lastComment getLength
Returns the extended source length of the given node Unlike link AST Node get Start Position and link AST Node get Length the extended source range may include comments and whitespace immediately before or after the normal source range for the node param node the node return a possibly 0 length or code 0 code if no source position information is recorded for this node see get Extended Start Position AST Node see get Extended End AST Node since 3 0 public int get Extended Length AST Node node return get Extended End node get Extended Start Position node 1  ASTNode getStartPosition ASTNode getLength getExtendedStartPosition ASTNode getExtendedEnd ASTNode getExtendedLength ASTNode getExtendedEnd getExtendedStartPosition
void initialize Compilation Unit unit Scanner sc Init comments this comments unit optional Comment Table if this comments null return int size this comments length if size 0 return Init tables this leading Comments new Hash Map this trailing Comments new Hash Map Init scanner and start ranges computing this scanner sc this scanner line Ptr this scanner line Ends length 1 this scanner tokenize White Space true Start unit visit DefaultAST Visitor comment Visitor new Comment Mapper Visitor unit accept comment Visitor  CompilationUnit optionalCommentTable leadingComments HashMap trailingComments HashMap linePtr lineEnds tokenizeWhiteSpace DefaultASTVisitor commentVisitor CommentMapperVisitor commentVisitor
Search and store node leading comments Comments are searched in position range from previous extended position to node start position If one or several comment are found returns first comment start position otherwise returns node start position First look after first comment before node start position using global comment index to reduce range of search Obviously returns if no comment is found before the node see do Extra Ranges For Children AST Node Scanner When first comment was found before node goes up in comment list until one of following condition becomes true 1 comment end is before previous end 2 comment start and previous end is on the same line but not on same line of node start 3 there s other than white characters between current node and comment 4 there s more than 1 line between current node and comment If at least one potential comment has been found then no token should be on on the same line before so remove all comments which do not verify this assumption If finally there is a subset of comments then store start and end indexes in leading comments table int store Leading Comments AST Node node int previous End Init extended position int node Start node get Start Position int extended node Start Get line of node start position int previous End Line this scanner get Line Number previous End int node Start Line this scanner get Line Number node Start Find first comment index int idx get Comment Index 0 node Start 1 if idx 1 return node Start Look after potential comments int start Idx 1 int end Idx idx int previous Start node Start while idx 0 previous Start previous End Verify for each comment that there s only white spaces between end and start of following comment node Comment comment this comments idx int comment Start comment get Start Position int end comment Start comment get Length 1 int comment Line this scanner get Line Number comment Start if end previous End comment Line previous End Line comment Line node Start Line stop search on condition 1 and 2 break else if end 1 previous Start may be equals then no scan is necessary this scanner reset To end 1 previous Start try int token this scanner get Next Token if token Terminal Tokens Token NameWHITESPACE this scanner current Position previous Start stop search on condition 3 if first comment fails then there s no extended position in fact if idx end Idx return node Start break catch Invalid Input Exception e Should not happen but return no extended position return node Start verify that there s no more than one line between node comments char gap this scanner get Current Identifier Source int nbr Line 0 int pos 1 while pos Char Operation index Of n gap pos 1 0 nbr Line if nbr Line 1 stop search on condition 4 break Store previous infos previous Start comment Start start Idx idx if start Idx 1 Verify that there s no token on the same line before first leading comment int comment Start this comments start Idx get Start Position if previous End comment Start previous End Line node Start Line int last Token End previous End this scanner reset To previous End comment Start try while this scanner current Position comment Start if this scanner get Next Token Terminal Tokens Token NameWHITESPACE last Token End this scanner get Current Token End Position catch Invalid Input Exception e do nothing int last Token Line this scanner get Line Number last Token End int length this comments length while start Idx length last Token Line this scanner get Line Number this comments start Idx get Start Position node Start Line last Token Line start Idx Store leading comments indexes if start Idx end Idx this leading Comments put node new int start Idx end Idx extended this comments end Idx get Start Position return extended  doExtraRangesForChildren ASTNode storeLeadingComments ASTNode previousEnd nodeStart getStartPosition nodeStart previousEndLine getLineNumber previousEnd nodeStartLine getLineNumber nodeStart getCommentIndex nodeStart nodeStart startIdx endIdx previousStart nodeStart previousStart previousEnd commentStart getStartPosition commentStart getLength commentLine getLineNumber commentStart previousEnd commentLine previousEndLine commentLine nodeStartLine previousStart resetTo previousStart getNextToken TerminalTokens TokenNameWHITESPACE currentPosition previousStart endIdx nodeStart InvalidInputException nodeStart getCurrentIdentifierSource nbrLine CharOperation indexOf nbrLine nbrLine previousStart commentStart startIdx startIdx commentStart startIdx getStartPosition previousEnd commentStart previousEndLine nodeStartLine lastTokenEnd previousEnd resetTo previousEnd commentStart currentPosition commentStart getNextToken TerminalTokens TokenNameWHITESPACE lastTokenEnd getCurrentTokenEndPosition InvalidInputException lastTokenLine getLineNumber lastTokenEnd startIdx lastTokenLine getLineNumber startIdx getStartPosition nodeStartLine lastTokenLine startIdx startIdx endIdx leadingComments startIdx endIdx endIdx getStartPosition
Search and store node trailing comments Comments are searched in position range from node end position to specified next start If one or several comment are found returns last comment end position otherwise returns node end position First look after first comment after node end position using global comment index to reduce range of search Obviously returns if no comment is found after the node see do Extra Ranges For Children AST Node Scanner When first comment was found after node goes down in comment list until one of following condition becomes true 1 comment start is after next start 2 there s other than white characters between current node and comment 3 there s more than 1 line between current node and comment If at least one potential comment has been found then all of them has to be separated from following node So remove all comments which do not verify this assumption Note that this verification is not applicable on last node If finally there is a subset of comments then store start and end indexes in trailing comments table int store Trailing Comments AST Node node int next Start boolean last Child Init extended position int node End node get Start Position node get Length 1 if node End next Start special case for last child of its parent this trailing Comments put node new int 1 1 return node End int extended node End Get line number int node End Line this scanner get Line Number node End Find comments range index int idx get Comment Index 0 node End 1 if idx 1 return node End Look after potential comments int start Idx idx int end Idx 1 int length this comments length int comment Start extended 1 int previous End node End 1 int same Line Idx 1 while idx length comment Start next Start get comment and leave if next starting position has been reached Comment comment this comments idx comment Start comment get Start Position verify that there s nothing else than white spaces between node comments if comment Start next Start stop search on condition 1 break else if previous End comment Start this scanner reset To previous End comment Start try int token this scanner get Next Token if token Terminal Tokens Token NameWHITESPACE this scanner current Position comment Start stop search on condition 2 if first index fails then there s no extended position in fact if idx start Idx return node End otherwise we get the last index of trailing comment break break catch Invalid Input Exception e Should not happen but return no extended position return node End verify that there s no more than one line between node comments char gap this scanner get Current Identifier Source int nbr Line 0 int pos 1 while pos Char Operation index Of n gap pos 1 0 nbr Line if nbr Line 1 stop search on condition 3 break Store index if we re on the same line than node end int comment Line this scanner get Line Number comment Start if comment Line node End Line same Line Idx idx Store previous infos previous End comment Start comment get Length end Idx idx if end Idx 1 Verify that following node start is separated if last Child int next Line this scanner get Line Number next Start int previous Line this scanner get Line Number previous End if next Line previous Line 1 if same Line Idx 1 return node End end Idx same Line Idx Store trailing comments indexes this trailing Comments put node new int start Idx end Idx extended this comments end Idx get Start Position this comments end Idx get Length 1 return extended  doExtraRangesForChildren ASTNode storeTrailingComments ASTNode nextStart lastChild nodeEnd getStartPosition getLength nodeEnd nextStart trailingComments nodeEnd nodeEnd nodeEndLine getLineNumber nodeEnd getCommentIndex nodeEnd nodeEnd startIdx endIdx commentStart previousEnd nodeEnd sameLineIdx commentStart nextStart commentStart getStartPosition commentStart nextStart previousEnd commentStart resetTo previousEnd commentStart getNextToken TerminalTokens TokenNameWHITESPACE currentPosition commentStart startIdx nodeEnd InvalidInputException nodeEnd getCurrentIdentifierSource nbrLine CharOperation indexOf nbrLine nbrLine commentLine getLineNumber commentStart commentLine nodeEndLine sameLineIdx previousEnd commentStart getLength endIdx endIdx lastChild nextLine getLineNumber nextStart previousLine getLineNumber previousEnd nextLine previousLine sameLineIdx nodeEnd endIdx sameLineIdx trailingComments startIdx endIdx endIdx getStartPosition endIdx getLength
protected boolean visit Node AST Node node Get default previous end AST Node parent node get Parent int previous End parent get Start Position Look for sibling node AST Node sibling AST Node this waiting Siblings get parent if sibling null Found one previous sibling so compute its trailing comments using current node start position try previous End store Trailing Comments sibling node get Start Position false catch Exception ex Give up extended ranges at this level if unexpected exception happens Compute leading comments for current node try store Leading Comments node previous End catch Exception ex Give up extended ranges at this level if unexpected exception happens Store current node as waiting sibling for its parent this waiting Siblings put parent node We re always ok to visit sub levels return true  visitNode ASTNode ASTNode getParent previousEnd getStartPosition ASTNode ASTNode waitingSiblings previousEnd storeTrailingComments getStartPosition storeLeadingComments previousEnd waitingSiblings
protected void end Visit Node AST Node node Look if a child node is waiting for trailing comments computing AST Node sibling AST Node this waiting Siblings get node if sibling null try store Trailing Comments sibling node get Start Position node get Length 1 true catch Exception ex Give up extended ranges at this level if unexpected exception happens  endVisitNode ASTNode ASTNode ASTNode waitingSiblings storeTrailingComments getStartPosition getLength
public boolean visit Compilation Unit node do nothing special just go down in sub levels return true  CompilationUnit

Doc Comment Parser AST ast Scanner scanner boolean check super null this ast ast this scanner scanner this check Doc Comment check this kind DOM PARSER  DocCommentParser checkDocComment DOM_PARSER
slot for being consumed later on public Javadoc parse int positions return parse positions 0 positions 1 positions 0 
public Javadoc parse int start int length Init this source this scanner source this line Ends this scanner line Ends this doc Comment this ast new Javadoc Parse if this check Doc Comment parse Comment start start length 1 this doc Comment set Source Range start length set Comment start length backward compatibility return this doc Comment  lineEnds lineEnds docComment newJavadoc checkDocComment parseComment docComment setSourceRange setComment docComment
Sets the comment starting at the given position and with the given length p Note the only purpose of this method is to hide deprecated warnings deprecated mark deprecated to hide deprecated usage private void set Comment int start int length this doc Comment set Comment new String this source start length  setComment docComment setComment
public String to String String Buffer buffer new String Buffer buffer append javadoc append this doc Comment append n NON NLS 1 NON NLS 2 buffer append super to String return buffer to String  toString StringBuffer StringBuffer docComment toString toString
protected Object create Argument Reference char name int dim Object type Ref long dim Positions long arg Name Pos throws Invalid Input Exception try Method Ref Parameter argument this ast new Method Ref Parameter AST Node node AST Node type Ref int arg Start node get Start Position int arg End node get Start Position node get Length 1 if dim 0 arg End int dim Positions dim 1 if arg Name Pos 0 arg End int arg Name Pos if name length 0 Simple Name arg Name this ast new Simple Name new String name argument set Name arg Name int arg Name Start int arg Name Pos 32 arg Name set Source Range arg Name Start arg End arg Name Start 1 Type arg Type null if node get Node Type AST Node PRIMITIVE TYPE arg Type Primitive Type node if dim 0 arg Type this ast new Array Type arg Type dim arg Type set Source Range arg Start int dim Positions dim 1 arg Start 1 else Name arg Type Name Name node arg Type this ast new Simple Type arg Type Name arg Type set Source Range arg Start node get Length if dim 0 for int i 0 i dim i arg Type this ast new Array Type arg Type arg Type set Source Range arg Start int dim Positions i arg Start 1 argument set Type arg Type argument set Source Range arg Start arg End arg Start 1 return argument catch Class Cast Exception ex throw new Invalid Input Exception  createArgumentReference typeRef dimPositions argNamePos InvalidInputException MethodRefParameter newMethodRefParameter ASTNode ASTNode typeRef argStart getStartPosition argEnd getStartPosition getLength argEnd dimPositions argNamePos argEnd argNamePos SimpleName argName newSimpleName setName argName argNameStart argNamePos argName setSourceRange argNameStart argEnd argNameStart argType getNodeType ASTNode PRIMITIVE_TYPE argType PrimitiveType argType newArrayType argType argType setSourceRange argStart dimPositions argStart argTypeName argType newSimpleType argTypeName argType setSourceRange argStart getLength argType newArrayType argType argType setSourceRange argStart dimPositions argStart setType argType setSourceRange argStart argEnd argStart ClassCastException InvalidInputException
protected Object create Field Reference Object receiver throws Invalid Input Exception try Member Ref field Ref this ast new Member Ref Simple Name field Name this ast new Simple Name new String this identifier Stack 0 field Ref set Name field Name int start int this identifier Position Stack 0 32 int end int this identifier Position Stack 0 field Name set Source Range start end start 1 if receiver null start this member Start field Ref set Source Range start end start 1 else Name type Ref Name receiver field Ref set Qualifier type Ref start type Ref get Start Position end field Name get Start Position field Name get Length 1 field Ref set Source Range start end start 1 return field Ref catch Class Cast Exception ex throw new Invalid Input Exception  createFieldReference InvalidInputException MemberRef fieldRef newMemberRef SimpleName fieldName newSimpleName identifierStack fieldRef setName fieldName identifierPositionStack identifierPositionStack fieldName setSourceRange memberStart fieldRef setSourceRange typeRef fieldRef setQualifier typeRef typeRef getStartPosition fieldName getStartPosition fieldName getLength fieldRef setSourceRange fieldRef ClassCastException InvalidInputException
protected Object create Method Reference Object receiver List arguments throws Invalid Input Exception try Create method ref Method Ref method Ref this ast new Method Ref Simple Name method Name this ast new Simple Name new String this identifier Stack 0 method Ref set Name method Name int start int this identifier Position Stack 0 32 int end int this identifier Position Stack 0 method Name set Source Range start end start 1 Set qualifier int end method Name get Start Position method Name get Length 1 if receiver null start this member Start method Ref set Source Range start end start 1 else Name type Ref Name receiver method Ref set Qualifier type Ref start type Ref get Start Position Add arguments if arguments null Iterator parameters arguments list Iterator while parameters has Next Method Ref Parameter param Method Ref Parameter parameters next method Ref parameters add param end param get Start Position param get Length 1 method Ref set Source Range start end start 1 method Ref set Source Range start this scanner get Current Token End Position start 1 return method Ref catch Class Cast Exception ex throw new Invalid Input Exception  createMethodReference InvalidInputException MethodRef methodRef newMethodRef SimpleName methodName newSimpleName identifierStack methodRef setName methodName identifierPositionStack identifierPositionStack methodName setSourceRange methodName getStartPosition methodName getLength memberStart methodRef setSourceRange typeRef methodRef setQualifier typeRef typeRef getStartPosition listIterator hasNext MethodRefParameter MethodRefParameter methodRef getStartPosition getLength methodRef setSourceRange methodRef setSourceRange getCurrentTokenEndPosition methodRef ClassCastException InvalidInputException
protected Object create Type Reference int primitive Token int size this identifier Length Stack this identifier Length Ptr String identifiers new String size int pos this identifier Ptr size 1 for int i 0 i size i identifiers i new String this identifier Stack pos i AST Node type Ref null if primitive Token 1 type Ref this ast new Name identifiers else switch primitive Token case Terminal Tokens Token Namevoid type Ref this ast new Primitive Type Primitive Type VOID break case Terminal Tokens Token Nameboolean type Ref this ast new Primitive Type Primitive Type BOOLEAN break case Terminal Tokens Token Namebyte type Ref this ast new Primitive Type Primitive Type BYTE break case Terminal Tokens Token Namechar type Ref this ast new Primitive Type Primitive Type CHAR break case Terminal Tokens Token Namedouble type Ref this ast new Primitive Type Primitive Type DOUBLE break case Terminal Tokens Token Namefloat type Ref this ast new Primitive Type Primitive Type FLOAT break case Terminal Tokens Token Nameint type Ref this ast new Primitive Type Primitive Type INT break case Terminal Tokens Token Namelong type Ref this ast new Primitive Type Primitive Type LONG break case Terminal Tokens Token Nameshort type Ref this ast new Primitive Type Primitive Type SHORT break default should not happen return null Update ref for whole name int start int this identifier Position Stack pos 32 int end int this identifier Position Stack this identifier Ptr type Ref set Source Range start end start 1 Update references of each simple name if size 1 Name name Name type Ref for int i this identifier Ptr i pos i int s int this identifier Position Stack i 32 int e int this identifier Position Stack i Simple Name simple Name Qualified Name name get Name simple Name set Source Range s e s 1 name set Source Range start e start 1 name Qualified Name name get Qualifier int end int this identifier Position Stack pos name set Source Range start end start 1 else int end int this identifier Position Stack pos type Ref set Source Range start end start 1 this identifier Ptr size return type Ref  createTypeReference primitiveToken identifierLengthStack identifierLengthPtr identifierPtr identifierStack ASTNode typeRef primitiveToken typeRef newName primitiveToken TerminalTokens TokenNamevoid typeRef newPrimitiveType PrimitiveType TerminalTokens TokenNameboolean typeRef newPrimitiveType PrimitiveType TerminalTokens TokenNamebyte typeRef newPrimitiveType PrimitiveType TerminalTokens TokenNamechar typeRef newPrimitiveType PrimitiveType TerminalTokens TokenNamedouble typeRef newPrimitiveType PrimitiveType TerminalTokens TokenNamefloat typeRef newPrimitiveType PrimitiveType TerminalTokens TokenNameint typeRef newPrimitiveType PrimitiveType TerminalTokens TokenNamelong typeRef newPrimitiveType PrimitiveType TerminalTokens TokenNameshort typeRef newPrimitiveType PrimitiveType identifierPositionStack identifierPositionStack identifierPtr typeRef setSourceRange typeRef identifierPtr identifierPositionStack identifierPositionStack SimpleName simpleName QualifiedName getName simpleName setSourceRange setSourceRange QualifiedName getQualifier identifierPositionStack setSourceRange identifierPositionStack typeRef setSourceRange identifierPtr typeRef
Parse return tag declaration protected boolean parse Return return parse Tag  parseReturn parseTag
protected boolean parse Tag Tag Element tag this ast new Tag Element int start this tag Source Start tag set Tag Name new String this source start this tag Source End start 1 if this inline Tag Started start this inline Tag Start Tag Element previous Tag null if this ast Ptr 1 previous Tag this ast new Tag Element previous Tag set Source Range start this tag Source End start 1 push On Ast Stack previous Tag true else previous Tag Tag Element this ast Stack this ast Ptr int previous Start previous Tag get Start Position previous Tag fragments add tag previous Tag set Source Range previous Start this tag Source End previous Start 1 else push On Ast Stack tag true tag set Source Range start this tag Source End start 1 return true  parseTag TagElement newTagElement tagSourceStart setTagName tagSourceEnd inlineTagStarted inlineTagStart TagElement previousTag astPtr previousTag newTagElement previousTag setSourceRange tagSourceEnd pushOnAstStack previousTag previousTag TagElement astStack astPtr previousStart previousTag getStartPosition previousTag previousTag setSourceRange previousStart tagSourceEnd previousStart pushOnAstStack setSourceRange tagSourceEnd
protected boolean push Param Name Simple Name name this ast new Simple Name new String this scanner get Current Identifier Source name set Source Range this scanner get Current Token Start Position this scanner get Current Token End Position this scanner get Current Token Start Position 1 Tag Element param Tag this ast new Tag Element param Tag set Tag Name Tag Element TAG PARAM param Tag set Source Range this tag Source Start this scanner get Current Token End Position this tag Source Start 1 param Tag fragments add name push On Ast Stack param Tag true return true  pushParamName SimpleName newSimpleName getCurrentIdentifierSource setSourceRange getCurrentTokenStartPosition getCurrentTokenEndPosition getCurrentTokenStartPosition TagElement paramTag newTagElement paramTag setTagName TagElement TAG_PARAM paramTag setSourceRange tagSourceStart getCurrentTokenEndPosition tagSourceStart paramTag pushOnAstStack paramTag
protected boolean push See Ref Object statement boolean plain Tag Element see Tag this ast new Tag Element AST Node node AST Node statement see Tag fragments add node int end node get Start Position node get Length 1 if this inline Tag Started see Tag set Source Range this inline Tag Start end this inline Tag Start 1 if plain see Tag set Tag Name Tag Element TAG LINKPLAIN else see Tag set Tag Name Tag Element TAG LINK Tag Element previous Tag null int previous Start this inline Tag Start if this ast Ptr 1 previous Tag this ast new Tag Element push On Ast Stack previous Tag true else previous Tag Tag Element this ast Stack this ast Ptr previous Start previous Tag get Start Position previous Tag fragments add see Tag previous Tag set Source Range previous Start end previous Start 1 else see Tag set Tag Name Tag Element TAG SEE see Tag set Source Range this tag Source Start end this tag Source Start 1 push On Ast Stack see Tag true return true  pushSeeRef TagElement seeTag newTagElement ASTNode ASTNode seeTag getStartPosition getLength inlineTagStarted seeTag setSourceRange inlineTagStart inlineTagStart seeTag setTagName TagElement TAG_LINKPLAIN seeTag setTagName TagElement TAG_LINK TagElement previousTag previousStart inlineTagStart astPtr previousTag newTagElement pushOnAstStack previousTag previousTag TagElement astStack astPtr previousStart previousTag getStartPosition previousTag seeTag previousTag setSourceRange previousStart previousStart seeTag setTagName TagElement TAG_SEE seeTag setSourceRange tagSourceStart tagSourceStart pushOnAstStack seeTag
protected void push Text int start int end Text Element text this ast new Text Element text set Text new String this source start end start text set Source Range start end start Tag Element previous Tag null int previous Start start if this ast Ptr 1 previous Tag this ast new Tag Element previous Tag set Source Range start end start push On Ast Stack previous Tag true else previous Tag Tag Element this ast Stack this ast Ptr previous Start previous Tag get Start Position if this inline Tag Started if previous Tag fragments size 0 Tag Element inline Tag this ast new Tag Element previous Tag fragments add inline Tag previous Tag inline Tag else AST Node inline Tag AST Node previous Tag fragments get previous Tag fragments size 1 if inline Tag get Node Type AST Node TAG ELEMENT previous Tag Tag Element inline Tag previous Start previous Tag get Start Position previous Tag fragments add text previous Tag set Source Range previous Start end previous Start this text Start 1  pushText TextElement newTextElement setText setSourceRange TagElement previousTag previousStart astPtr previousTag newTagElement previousTag setSourceRange pushOnAstStack previousTag previousTag TagElement astStack astPtr previousStart previousTag getStartPosition inlineTagStarted previousTag TagElement inlineTag newTagElement previousTag inlineTag previousTag inlineTag ASTNode inlineTag ASTNode previousTag previousTag inlineTag getNodeType ASTNode TAG_ELEMENT previousTag TagElement inlineTag previousStart previousTag getStartPosition previousTag previousTag setSourceRange previousStart previousStart textStart
protected void refresh Inline Tag Position int previous Position if this ast Ptr 1 Tag Element previous Tag Tag Element this ast Stack this ast Ptr if this inline Tag Started int previous Start previous Tag get Start Position previous Tag set Source Range previous Start previous Position previous Start 1 if previous Tag fragments size 0 AST Node inline Tag AST Node previous Tag fragments get previous Tag fragments size 1 if inline Tag get Node Type AST Node TAG ELEMENT int inline Start inline Tag get Start Position inline Tag set Source Range inline Start previous Position inline Start 1  refreshInlineTagPosition previousPosition astPtr TagElement previousTag TagElement astStack astPtr inlineTagStarted previousStart previousTag getStartPosition previousTag setSourceRange previousStart previousPosition previousStart previousTag ASTNode inlineTag ASTNode previousTag previousTag inlineTag getNodeType ASTNode TAG_ELEMENT inlineStart inlineTag getStartPosition inlineTag setSourceRange inlineStart previousPosition inlineStart
protected boolean push Throw Name Object type Ref boolean real Tag Element throws Tag this ast new Tag Element if real throws Tag set Tag Name Tag Element TAG THROWS else throws Tag set Tag Name Tag Element TAG EXCEPTION throws Tag set Source Range this tag Source Start this scanner get Current Token End Position this tag Source Start 1 throws Tag fragments add type Ref push On Ast Stack throws Tag true return true  pushThrowName typeRef TagElement throwsTag newTagElement throwsTag setTagName TagElement TAG_THROWS throwsTag setTagName TagElement TAG_EXCEPTION throwsTag setSourceRange tagSourceStart getCurrentTokenEndPosition tagSourceStart throwsTag typeRef pushOnAstStack throwsTag
protected void update Doc Comment for int idx 0 idx this ast Ptr idx this doc Comment tags add this ast Stack idx  updateDocComment astPtr docComment astStack

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented do statement node owned by the given AST By default the expresssion is unspecified but legal and the body statement is an empty block p N B This constructor is package private p param ast the AST that is to own this node Do Statement AST ast super ast  DoStatement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null if property BODY PROPERTY if get return get Body else set Body Statement child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression BODY_PROPERTY getBody setBody internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return DO STATEMENT  ASTNode getNodeType0 DO_STATEMENT
AST Node clone0 AST target Do Statement result new Do Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Expression Expression get Expression clone target result set Body Statement get Body clone target return result  ASTNode DoStatement DoStatement setSourceRange getStartPosition getLength copyLeadingComment setExpression getExpression setBody getBody
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Body accept Child visitor get Expression visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getBody acceptChild getExpression endVisit
Returns the expression of this do statement return the expression node public Expression get Expression if this expression null lazy init must be thread safe for readers synchronized this if this expression null pre Lazy Init this expression new Simple Name this ast post Lazy Init this expression EXPRESSION PROPERTY return this expression  getExpression preLazyInit SimpleName postLazyInit EXPRESSION_PROPERTY
Sets the expression of this do statement param expression the expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this expression pre Replace Child old Child expression EXPRESSION PROPERTY this expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression IllegalArgumentException ASTNode oldChild preReplaceChild oldChild EXPRESSION_PROPERTY postReplaceChild oldChild EXPRESSION_PROPERTY
Returns the body of this do statement return the body statement node public Statement get Body if this body null lazy init must be thread safe for readers synchronized this if this body null pre Lazy Init this body new Block this ast post Lazy Init this body BODY PROPERTY return this body  getBody preLazyInit postLazyInit BODY_PROPERTY
Sets the body of this do statement p Special note The Java language does not allow a local variable declaration to appear as the body of a do statement they may only appear within a block However the AST will allow a code Variable Declaration Statement code as the body of a code Do Statement code To get something that will compile be sure to embed the code Variable Declaration Statement code inside a code Block code p param statement the body statement node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Body Statement statement if statement null throw new Illegal Argument Exception AST Node old Child this body pre Replace Child old Child statement BODY PROPERTY this body statement post Replace Child old Child statement BODY PROPERTY  VariableDeclarationStatement DoStatement VariableDeclarationStatement IllegalArgumentException setBody IllegalArgumentException ASTNode oldChild preReplaceChild oldChild BODY_PROPERTY postReplaceChild oldChild BODY_PROPERTY
Method declared on AST Node int mem Size return super mem Size 2 4  ASTNode memSize memSize
int tree Size return mem Size this expression null 0 get Expression tree Size this body null 0 get Body tree Size  treeSize memSize getExpression treeSize getBody treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented null statement node owned by the given AST p N B This constructor is package private p param ast the AST that is to own this node Empty Statement AST ast super ast  EmptyStatement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
Method declared on AST Node final int get Node Type0 return EMPTY STATEMENT  ASTNode getNodeType0 EMPTY_STATEMENT
AST Node clone0 AST target Empty Statement result new Empty Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this return result  ASTNode EmptyStatement EmptyStatement setSourceRange getStartPosition getLength copyLeadingComment
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
Method declared on AST Node void accept0 AST Visitor visitor visitor visit this visitor end Visit this  ASTNode ASTVisitor endVisit
Method declared on AST Node int tree Size return mem Size  ASTNode treeSize memSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for an enchanced for statement owned by the given AST By default the parameter and expression are unspecified but legal subtrees and the body is an empty block param ast the AST that is to own this node Enhanced For Statement AST ast super ast unsupported In2  EnhancedForStatement unsupportedIn2
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property PARAMETER PROPERTY if get return get Parameter else set Parameter Single Variable Declaration child return null if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null if property BODY PROPERTY if get return get Body else set Body Statement child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode PARAMETER_PROPERTY getParameter setParameter SingleVariableDeclaration EXPRESSION_PROPERTY getExpression setExpression BODY_PROPERTY getBody setBody internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return ENHANCED FOR STATEMENT  ASTNode getNodeType0 ENHANCED_FOR_STATEMENT
AST Node clone0 AST target Enhanced For Statement result new Enhanced For Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Parameter Single Variable Declaration get Parameter clone target result set Expression Expression get Expression clone target result set Body Statement AST Node copy Subtree target get Body return result  ASTNode EnhancedForStatement EnhancedForStatement setSourceRange getStartPosition getLength copyLeadingComment setParameter SingleVariableDeclaration getParameter setExpression getExpression setBody ASTNode copySubtree getBody
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Parameter accept Child visitor get Expression accept Child visitor get Body visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getParameter acceptChild getExpression acceptChild getBody endVisit
Returns the formal parameter in this enhanced for statement return the parameter public Single Variable Declaration get Parameter if this parameter null lazy init must be thread safe for readers synchronized this if this parameter null pre Lazy Init this parameter this ast new Single Variable Declaration post Lazy Init this parameter PARAMETER PROPERTY return this parameter  SingleVariableDeclaration getParameter preLazyInit newSingleVariableDeclaration postLazyInit PARAMETER_PROPERTY
Sets the formal parameter in this enhanced for statement param parameter the new parameter exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Parameter Single Variable Declaration parameter if parameter null throw new Illegal Argument Exception AST Node old Child this parameter pre Replace Child old Child parameter PARAMETER PROPERTY this parameter parameter post Replace Child old Child parameter PARAMETER PROPERTY  IllegalArgumentException setParameter SingleVariableDeclaration IllegalArgumentException ASTNode oldChild preReplaceChild oldChild PARAMETER_PROPERTY postReplaceChild oldChild PARAMETER_PROPERTY
Returns the expression of this enhanced for statement return the expression node public Expression get Expression if this expression null lazy init must be thread safe for readers synchronized this if this expression null pre Lazy Init this expression new Simple Name this ast post Lazy Init this expression EXPRESSION PROPERTY return this expression  getExpression preLazyInit SimpleName postLazyInit EXPRESSION_PROPERTY
Sets the expression of this enhanced for statement param expression the new expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this expression pre Replace Child old Child expression EXPRESSION PROPERTY this expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression IllegalArgumentException ASTNode oldChild preReplaceChild oldChild EXPRESSION_PROPERTY postReplaceChild oldChild EXPRESSION_PROPERTY
Returns the body of this enchanced for statement return the body statement node public Statement get Body if this body null lazy init must be thread safe for readers synchronized this if this body null pre Lazy Init this body new Block this ast post Lazy Init this body BODY PROPERTY return this body  getBody preLazyInit postLazyInit BODY_PROPERTY
Sets the body of this enhanced for statement param statement the body statement node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Body Statement statement if statement null throw new Illegal Argument Exception AST Node old Child this body pre Replace Child old Child statement BODY PROPERTY this body statement post Replace Child old Child statement BODY PROPERTY  IllegalArgumentException setBody IllegalArgumentException ASTNode oldChild preReplaceChild oldChild BODY_PROPERTY postReplaceChild oldChild BODY_PROPERTY
Resolves and returns the binding for the loop variable of this enhanced for statement p Note that bindings are generally unavailable unless requested when the AST is being built p return the binding or code null code if the binding cannot be resolved public I Variable Binding resolve Binding return this ast get Binding Resolver resolve Variable this  IVariableBinding resolveBinding getBindingResolver resolveVariable
Method declared on AST Node int mem Size return super mem Size 3 4  ASTNode memSize memSize
int tree Size return mem Size this parameter null 0 get Parameter tree Size this expression null 0 get Expression tree Size this body null 0 get Body tree Size  treeSize memSize getParameter treeSize getExpression treeSize getBody treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for an enumeration constants declaration owned by the given AST By default the enumeration constant has an unspecified but legal name no javadoc an empty list of modifiers and annotations an empty list of arguments and an empty list of body declarations p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Enum Constant Declaration AST ast super ast unsupported In2  EnumConstantDeclaration unsupportedIn2
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property JAVADOC PROPERTY if get return get Javadoc else set Javadoc Javadoc child return null if property NAME PROPERTY if get return get Name else set Name Simple Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode JAVADOC_PROPERTY getJavadoc setJavadoc NAME_PROPERTY getName setName SimpleName internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property MODIFIERS2 PROPERTY return modifiers if property ARGUMENTS PROPERTY return arguments if property BODY DECLARATIONS PROPERTY return body Declarations allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor MODIFIERS2_PROPERTY ARGUMENTS_PROPERTY BODY_DECLARATIONS_PROPERTY bodyDeclarations internalGetChildListProperty
Method declared on Body Declaration final Child Property Descriptor internal Javadoc Property return JAVADOC PROPERTY  BodyDeclaration ChildPropertyDescriptor internalJavadocProperty JAVADOC_PROPERTY
Method declared on Body Declaration final Child List Property Descriptor internal Modifiers2 Property return MODIFIERS2 PROPERTY  BodyDeclaration ChildListPropertyDescriptor internalModifiers2Property MODIFIERS2_PROPERTY
Method declared on Body Declaration final Simple Property Descriptor internal Modifiers Property this property will not be asked for node type did not exist in JLS2 return null  BodyDeclaration SimplePropertyDescriptor internalModifiersProperty
Method declared on AST Node final int get Node Type0 return ENUM CONSTANT DECLARATION  ASTNode getNodeType0 ENUM_CONSTANT_DECLARATION
AST Node clone0 AST target Enum Constant Declaration result new Enum Constant Declaration target result set Source Range this get Start Position this get Length result set Javadoc Javadoc AST Node copy Subtree target get Javadoc result modifiers add All AST Node copy Subtrees target modifiers result set Name Simple Name get Name clone target result arguments add All AST Node copy Subtrees target arguments result body Declarations add All AST Node copy Subtrees target body Declarations return result  ASTNode EnumConstantDeclaration EnumConstantDeclaration setSourceRange getStartPosition getLength setJavadoc ASTNode copySubtree getJavadoc addAll ASTNode copySubtrees setName SimpleName getName addAll ASTNode copySubtrees bodyDeclarations addAll ASTNode copySubtrees bodyDeclarations
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Javadoc accept Children visitor this modifiers accept Child visitor get Name accept Children visitor this arguments accept Children visitor this body Declarations visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getJavadoc acceptChildren acceptChild getName acceptChildren acceptChildren bodyDeclarations endVisit
Returns the name of the constant declared in this enum declaration return the constant name node public Simple Name get Name if this constant Name null lazy init must be thread safe for readers synchronized this if this constant Name null pre Lazy Init this constant Name new Simple Name this ast post Lazy Init this constant Name NAME PROPERTY return this constant Name  SimpleName getName constantName constantName preLazyInit constantName SimpleName postLazyInit constantName NAME_PROPERTY constantName
Sets the name of the constant declared in this enum declaration to the given name param constant Name the new constant name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Name Simple Name constant Name if constant Name null throw new Illegal Argument Exception AST Node old Child this constant Name pre Replace Child old Child constant Name NAME PROPERTY this constant Name constant Name post Replace Child old Child constant Name NAME PROPERTY  constantName IllegalArgumentException setName SimpleName constantName constantName IllegalArgumentException ASTNode oldChild constantName preReplaceChild oldChild constantName NAME_PROPERTY constantName constantName postReplaceChild oldChild constantName NAME_PROPERTY
Returns the live ordered list of argument expressions in this enumeration constant declaration Note that an empty list of arguments is equivalent to not explicitly specifying arguments return the live list of argument expressions element type code Expression code public List arguments return this arguments 
Returns the live ordered list of body declarations of this enumeration constant declaration Note that an empty list is equivalent to not explicitly specifying any body declarations return the live list of body declarations element type code Body Declaration code public List body Declarations return this body Declarations  BodyDeclaration bodyDeclarations bodyDeclarations
Resolves and returns the field binding for this enum constant p Note that bindings are generally unavailable unless requested when the AST is being built p return the binding or code null code if the binding cannot be resolved public I Variable Binding resolve Variable return this ast get Binding Resolver resolve Variable this  IVariableBinding resolveVariable getBindingResolver resolveVariable
void append Debug String String Buffer buffer buffer append Enum Constant Declaration NON NLS 1 buffer append get Name get Identifier buffer append NON NLS 1 if arguments is Empty buffer append NON NLS 1 for Iterator it arguments iterator it has Next Expression e Expression it next e append Debug String buffer if it has Next buffer append NON NLS 1 buffer append NON NLS 1 if body Declarations is Empty buffer append NON NLS 1 for Iterator it body Declarations iterator it has Next Body Declaration d Body Declaration it next d append Debug String buffer if it has Next buffer append NON NLS 1 buffer append NON NLS 1 buffer append NON NLS 1  appendDebugString StringBuffer EnumConstantDeclaration getName getIdentifier isEmpty hasNext appendDebugString hasNext bodyDeclarations isEmpty bodyDeclarations hasNext BodyDeclaration BodyDeclaration appendDebugString hasNext
Method declared on AST Node int mem Size return super mem Size 3 4  ASTNode memSize memSize
int tree Size return mem Size this optional Doc Comment null 0 get Javadoc tree Size this modifiers list Size this constant Name null 0 get Name tree Size this arguments list Size this body Declarations list Size  treeSize memSize optionalDocComment getJavadoc treeSize listSize constantName getName treeSize listSize bodyDeclarations listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for an enum declaration owned by the given AST By default the enum declaration has an unspecified but legal name no modifiers no javadoc no superinterfaces and an empty list of body declarations p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Enum Declaration AST ast super ast unsupported In2  EnumDeclaration unsupportedIn2
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property JAVADOC PROPERTY if get return get Javadoc else set Javadoc Javadoc child return null if property NAME PROPERTY if get return get Name else set Name Simple Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode JAVADOC_PROPERTY getJavadoc setJavadoc NAME_PROPERTY getName setName SimpleName internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property MODIFIERS2 PROPERTY return modifiers if property SUPER INTERFACE TYPES PROPERTY return super Interface Types if property BODY DECLARATIONS PROPERTY return body Declarations allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor MODIFIERS2_PROPERTY SUPER_INTERFACE_TYPES_PROPERTY superInterfaceTypes BODY_DECLARATIONS_PROPERTY bodyDeclarations internalGetChildListProperty
Method declared on Body Declaration final Child Property Descriptor internal Javadoc Property return JAVADOC PROPERTY  BodyDeclaration ChildPropertyDescriptor internalJavadocProperty JAVADOC_PROPERTY
Method declared on Body Declaration final Child List Property Descriptor internal Modifiers2 Property return MODIFIERS2 PROPERTY  BodyDeclaration ChildListPropertyDescriptor internalModifiers2Property MODIFIERS2_PROPERTY
Method declared on Body Declaration final Simple Property Descriptor internal Modifiers Property this property will not be asked for node type did not exist in JLS2 return null  BodyDeclaration SimplePropertyDescriptor internalModifiersProperty
Method declared on Abstract Type Declaration final Child Property Descriptor internal Name Property return NAME PROPERTY  AbstractTypeDeclaration ChildPropertyDescriptor internalNameProperty NAME_PROPERTY
Method declared on Abstract Type Declaration final Child List Property Descriptor internal Body Declarations Property return BODY DECLARATIONS PROPERTY  AbstractTypeDeclaration ChildListPropertyDescriptor internalBodyDeclarationsProperty BODY_DECLARATIONS_PROPERTY
Method declared on AST Node final int get Node Type0 return ENUM DECLARATION  ASTNode getNodeType0 ENUM_DECLARATION
AST Node clone0 AST target Enum Declaration result new Enum Declaration target result set Source Range this get Start Position this get Length result set Javadoc Javadoc AST Node copy Subtree target get Javadoc result modifiers add All AST Node copy Subtrees target modifiers result set Name Simple Name get Name clone target result super Interface Types add All AST Node copy Subtrees target super Interface Types result body Declarations add All AST Node copy Subtrees target body Declarations return result  ASTNode EnumDeclaration EnumDeclaration setSourceRange getStartPosition getLength setJavadoc ASTNode copySubtree getJavadoc addAll ASTNode copySubtrees setName SimpleName getName superInterfaceTypes addAll ASTNode copySubtrees superInterfaceTypes bodyDeclarations addAll ASTNode copySubtrees bodyDeclarations
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Javadoc accept Children visitor this modifiers accept Child visitor get Name accept Children visitor this super Interface Types accept Children visitor this body Declarations visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getJavadoc acceptChildren acceptChild getName acceptChildren superInterfaceTypes acceptChildren bodyDeclarations endVisit
Returns the live ordered list of superinterfaces of this enum declaration return the live list of super interface types element type code Type code public List super Interface Types return this super Interface Types  superInterfaceTypes superInterfaceTypes
Returns the ordered list of enum constant declarations of this enum declaration p This convenience method returns this node s enum constant declarations with non enum constants filtered out Unlike code body Declarations code this method does not return a live result p return the possibly empty list of enum constant declarations public Enum Constant Declaration get Enum Constants List bd body Declarations int enum Count 0 for Iterator it bd list Iterator it has Next if it next instanceof Enum Constant Declaration enum Count Enum Constant Declaration enum Constants new Enum Constant Declaration enum Count int next 0 for Iterator it bd list Iterator it has Next Object decl it next if decl instanceof Enum Constant Declaration enum Constants next Enum Constant Declaration decl return enum Constants  bodyDeclarations EnumConstantDeclaration getEnumConstants bodyDeclarations enumCount listIterator hasNext EnumConstantDeclaration enumCount EnumConstantDeclaration enumConstants EnumConstantDeclaration enumCount listIterator hasNext EnumConstantDeclaration enumConstants EnumConstantDeclaration enumConstants
Resolves and returns the binding for the enum declared in this enum declaration p Note that bindings are generally unavailable unless requested when the AST is being built p return the binding or code null code if the binding cannot be resolved public I Type Binding resolve Binding return this ast get Binding Resolver resolve Type this  ITypeBinding resolveBinding getBindingResolver resolveType
Method declared on AST Node int mem Size return super mem Size 1 4  ASTNode memSize memSize
int tree Size return mem Size this optional Doc Comment null 0 get Javadoc tree Size this modifiers list Size this type Name null 0 get Name tree Size this super Interface Types list Size this body Declarations list Size  treeSize memSize optionalDocComment getJavadoc treeSize listSize typeName getName treeSize superInterfaceTypes listSize bodyDeclarations listSize

Creates a new AST node for an expression owned by the given AST p N B This constructor is package private p param ast the AST that is to own this node Expression AST ast super ast 
Resolves and returns the binding for the type of this expression p Note that bindings are generally unavailable unless requested when the AST is being built p return the binding for the type of this expression or code null code if the type cannot be resolved public I Type Binding resolve Type Binding return this ast get Binding Resolver resolve Expression Type this  ITypeBinding resolveTypeBinding getBindingResolver resolveExpressionType

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented expression statement node owned by the given AST By default the expression statement is unspecified but legal method invocation expression p N B This constructor is package private p param ast the AST that is to own this node Expression Statement AST ast super ast  ExpressionStatement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return EXPRESSION STATEMENT  ASTNode getNodeType0 EXPRESSION_STATEMENT
AST Node clone0 AST target Expression Statement result new Expression Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Expression Expression get Expression clone target return result  ASTNode ExpressionStatement ExpressionStatement setSourceRange getStartPosition getLength copyLeadingComment setExpression getExpression
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Child visitor get Expression visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getExpression endVisit
Returns the expression of this expression statement return the expression node public Expression get Expression if this expression null lazy init must be thread safe for readers synchronized this if this expression null pre Lazy Init this expression new Method Invocation this ast post Lazy Init this expression EXPRESSION PROPERTY return this expression  getExpression preLazyInit MethodInvocation postLazyInit EXPRESSION_PROPERTY
Sets the expression of this expression statement param expression the new expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this expression pre Replace Child old Child expression EXPRESSION PROPERTY this expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression IllegalArgumentException ASTNode oldChild preReplaceChild oldChild EXPRESSION_PROPERTY postReplaceChild oldChild EXPRESSION_PROPERTY
Method declared on AST Node int mem Size return super mem Size 1 4  ASTNode memSize memSize
int tree Size return mem Size this expression null 0 get Expression tree Size  treeSize memSize getExpression treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented node for a field access expression owned by the given AST By default the expression and field are both unspecified but legal names p N B This constructor is package private p param ast the AST that is to own this node Field Access AST ast super ast  FieldAccess
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null if property NAME PROPERTY if get return get Name else set Name Simple Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression NAME_PROPERTY getName setName SimpleName internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return FIELD ACCESS  ASTNode getNodeType0 FIELD_ACCESS
AST Node clone0 AST target Field Access result new Field Access target result set Source Range this get Start Position this get Length result set Expression Expression get Expression clone target result set Name Simple Name get Name clone target return result  ASTNode FieldAccess FieldAccess setSourceRange getStartPosition getLength setExpression getExpression setName SimpleName getName
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Expression accept Child visitor get Name visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getExpression acceptChild getName endVisit
Returns the expression of this field access expression return the expression node public Expression get Expression if this expression null lazy init must be thread safe for readers synchronized this if this expression null pre Lazy Init this expression new Simple Name this ast post Lazy Init this expression EXPRESSION PROPERTY return this expression  getExpression preLazyInit SimpleName postLazyInit EXPRESSION_PROPERTY
Sets the expression of this field access expression param expression the new expression exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this expression pre Replace Child old Child expression EXPRESSION PROPERTY this expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression IllegalArgumentException ASTNode oldChild preReplaceChild oldChild EXPRESSION_PROPERTY postReplaceChild oldChild EXPRESSION_PROPERTY
Returns the name of the field accessed in this field access expression return the field name public Simple Name get Name if this field Name null lazy init must be thread safe for readers synchronized this if this field Name null pre Lazy Init this field Name new Simple Name this ast post Lazy Init this field Name NAME PROPERTY return this field Name  SimpleName getName fieldName fieldName preLazyInit fieldName SimpleName postLazyInit fieldName NAME_PROPERTY fieldName
Sets the name of the field accessed in this field access expression param field Name the field name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Name Simple Name field Name if field Name null throw new Illegal Argument Exception AST Node old Child this field Name pre Replace Child old Child field Name NAME PROPERTY this field Name field Name post Replace Child old Child field Name NAME PROPERTY  fieldName IllegalArgumentException setName SimpleName fieldName fieldName IllegalArgumentException ASTNode oldChild fieldName preReplaceChild oldChild fieldName NAME_PROPERTY fieldName fieldName postReplaceChild oldChild fieldName NAME_PROPERTY
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
Resolves and returns the binding for the field accessed by this expression p Note that bindings are generally unavailable unless requested when the AST is being built p return the variable binding or code null code if the binding cannot be resolved since 3 0 public I Variable Binding resolve Field Binding return this ast get Binding Resolver resolve Field this  IVariableBinding resolveFieldBinding getBindingResolver resolveField
int tree Size return mem Size this expression null 0 get Expression tree Size this field Name null 0 get Name tree Size  treeSize memSize getExpression treeSize fieldName getName treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new unparented field declaration statement node owned by the given AST By default the field declaration has no modifiers an unspecified but legal type and an empty list of variable declaration fragments which is syntactically illegal p N B This constructor is package private p param ast the AST that is to own this node Field Declaration AST ast super ast  FieldDeclaration
since 3 0 final List internal Structural Properties For Type int api Level return property Descriptors api Level  internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final int internal Get Set Int Property Simple Property Descriptor property boolean get int value if property MODIFIERS PROPERTY if get return get Modifiers else set Modifiers value return 0 allow default implementation to flag the error return super internal Get Set Int Property property get value  internalGetSetIntProperty SimplePropertyDescriptor MODIFIERS_PROPERTY getModifiers setModifiers internalGetSetIntProperty
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property JAVADOC PROPERTY if get return get Javadoc else set Javadoc Javadoc child return null if property TYPE PROPERTY if get return get Type else set Type Type child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode JAVADOC_PROPERTY getJavadoc setJavadoc TYPE_PROPERTY getType setType internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property MODIFIERS2 PROPERTY return modifiers if property FRAGMENTS PROPERTY return fragments allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor MODIFIERS2_PROPERTY FRAGMENTS_PROPERTY internalGetChildListProperty
Method declared on Body Declaration final Child Property Descriptor internal Javadoc Property return JAVADOC PROPERTY  BodyDeclaration ChildPropertyDescriptor internalJavadocProperty JAVADOC_PROPERTY
Method declared on Body Declaration final Simple Property Descriptor internal Modifiers Property return MODIFIERS PROPERTY  BodyDeclaration SimplePropertyDescriptor internalModifiersProperty MODIFIERS_PROPERTY
Method declared on Body Declaration final Child List Property Descriptor internal Modifiers2 Property return MODIFIERS2 PROPERTY  BodyDeclaration ChildListPropertyDescriptor internalModifiers2Property MODIFIERS2_PROPERTY
Method declared on AST Node final int get Node Type0 return FIELD DECLARATION  ASTNode getNodeType0 FIELD_DECLARATION
AST Node clone0 AST target Field Declaration result new Field Declaration target result set Source Range this get Start Position this get Length result set Javadoc Javadoc AST Node copy Subtree target get Javadoc if this ast api Level AST JLS2 result set Modifiers get Modifiers if this ast api Level AST JLS3 result modifiers add All AST Node copy Subtrees target modifiers result set Type Type get Type clone target result fragments add All AST Node copy Subtrees target fragments return result  ASTNode FieldDeclaration FieldDeclaration setSourceRange getStartPosition getLength setJavadoc ASTNode copySubtree getJavadoc apiLevel setModifiers getModifiers apiLevel addAll ASTNode copySubtrees setType getType addAll ASTNode copySubtrees
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Javadoc if this ast api Level AST JLS3 accept Children visitor this modifiers accept Child visitor get Type accept Children visitor this variable Declaration Fragments visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getJavadoc apiLevel acceptChildren acceptChild getType acceptChildren variableDeclarationFragments endVisit
Returns the base type declared in this field declaration p N B The individual child variable declaration fragments may specify additional array dimensions So the type of the variable are not necessarily exactly this type p return the base type public Type get Type if this base Type null lazy init must be thread safe for readers synchronized this if this base Type null pre Lazy Init this base Type this ast new Primitive Type Primitive Type INT post Lazy Init this base Type TYPE PROPERTY return this base Type  getType baseType baseType preLazyInit baseType newPrimitiveType PrimitiveType postLazyInit baseType TYPE_PROPERTY baseType
Sets the base type declared in this field declaration to the given type param type the new base type exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Type Type type if type null throw new Illegal Argument Exception AST Node old Child this base Type pre Replace Child old Child type TYPE PROPERTY this base Type type post Replace Child old Child type TYPE PROPERTY  IllegalArgumentException setType IllegalArgumentException ASTNode oldChild baseType preReplaceChild oldChild TYPE_PROPERTY baseType postReplaceChild oldChild TYPE_PROPERTY
Returns the live list of variable declaration fragments in this field declaration Adding and removing nodes from this list affects this node dynamically All nodes in this list must be code Variable Declaration Fragment code s attempts to add any other type of node will trigger an exception return the live list of variable declaration fragments in this statement element type code Variable Declaration Fragment code public List fragments return this variable Declaration Fragments  VariableDeclarationFragment VariableDeclarationFragment variableDeclarationFragments
void append Debug String String Buffer buffer buffer append Field Declaration NON NLS 1 buffer append field NON NLS 1 get Type append Print String buffer buffer append NON NLS 1 for Iterator it fragments iterator it has Next Variable Declaration Fragment d Variable Declaration Fragment it next d get Name append Print String buffer if it has Next buffer append NON NLS 1 buffer append NON NLS 1  appendDebugString StringBuffer FieldDeclaration getType appendPrintString hasNext VariableDeclarationFragment VariableDeclarationFragment getName appendPrintString hasNext
Method declared on AST Node int mem Size return super mem Size 2 4  ASTNode memSize memSize
int tree Size return mem Size this optional Doc Comment null 0 get Javadoc tree Size this modifiers null 0 this modifiers list Size this base Type null 0 get Type tree Size this variable Declaration Fragments list Size  treeSize memSize optionalDocComment getJavadoc treeSize listSize baseType getType treeSize variableDeclarationFragments listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a for statement owned by the given AST By default there are no initializers no condition expression no updaters and the body is an empty block param ast the AST that is to own this node For Statement AST ast super ast  ForStatement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null if property BODY PROPERTY if get return get Body else set Body Statement child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression BODY_PROPERTY getBody setBody internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property INITIALIZERS PROPERTY return initializers if property UPDATERS PROPERTY return updaters allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor INITIALIZERS_PROPERTY UPDATERS_PROPERTY internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return FOR STATEMENT  ASTNode getNodeType0 FOR_STATEMENT
AST Node clone0 AST target For Statement result new For Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this result initializers add All AST Node copy Subtrees target initializers result set Expression Expression AST Node copy Subtree target get Expression result updaters add All AST Node copy Subtrees target updaters result set Body Statement AST Node copy Subtree target get Body return result  ASTNode ForStatement ForStatement setSourceRange getStartPosition getLength copyLeadingComment addAll ASTNode copySubtrees setExpression ASTNode copySubtree getExpression addAll ASTNode copySubtrees setBody ASTNode copySubtree getBody
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Children visitor this initializers accept Child visitor get Expression accept Children visitor this updaters accept Child visitor get Body visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChildren acceptChild getExpression acceptChildren acceptChild getBody endVisit
Returns the live ordered list of initializer expressions in this for statement p The list should consist of either a list of so called statement expressions JLS2 14 8 or a single code Variable Declaration Expression code Otherwise the for statement would have no Java source equivalent p return the live list of initializer expressions element type code Expression code public List initializers return this initializers  VariableDeclarationExpression
Returns the condition expression of this for statement or code null code if there is none return the condition expression node or code null code if there is none public Expression get Expression return this optional Condition Expression  getExpression optionalConditionExpression
Sets or clears the condition expression of this return statement param expression the condition expression node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression AST Node old Child this optional Condition Expression pre Replace Child old Child expression EXPRESSION PROPERTY this optional Condition Expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression ASTNode oldChild optionalConditionExpression preReplaceChild oldChild EXPRESSION_PROPERTY optionalConditionExpression postReplaceChild oldChild EXPRESSION_PROPERTY
Returns the live ordered list of update expressions in this for statement p The list should consist of so called statement expressions Otherwise the for statement would have no Java source equivalent p return the live list of update expressions element type code Expression code public List updaters return this updaters 
Returns the body of this for statement return the body statement node public Statement get Body if this body null lazy init must be thread safe for readers synchronized this if this body null pre Lazy Init this body new Block this ast post Lazy Init this body BODY PROPERTY return this body  getBody preLazyInit postLazyInit BODY_PROPERTY
Sets the body of this for statement p Special note The Java language does not allow a local variable declaration to appear as the body of a for statement they may only appear within a block However the AST will allow a code Variable Declaration Statement code as the body of a code For Statement code To get something that will compile be sure to embed the code Variable Declaration Statement code inside a code Block code p param statement the body statement node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Body Statement statement if statement null throw new Illegal Argument Exception AST Node old Child this body pre Replace Child old Child statement BODY PROPERTY this body statement post Replace Child old Child statement BODY PROPERTY  VariableDeclarationStatement ForStatement VariableDeclarationStatement IllegalArgumentException setBody IllegalArgumentException ASTNode oldChild preReplaceChild oldChild BODY_PROPERTY postReplaceChild oldChild BODY_PROPERTY
Method declared on AST Node int mem Size return super mem Size 4 4  ASTNode memSize memSize
int tree Size return mem Size this initializers list Size this updaters list Size this optional Condition Expression null 0 get Expression tree Size this body null 0 get Body tree Size  treeSize memSize listSize listSize optionalConditionExpression getExpression treeSize getBody treeSize

Returns the kind of bindings this is return one of the kind constants code PACKAGE code code TYPE code code VARIABLE code or code METHOD code 
Returns the name of this binding Details of the name are specified with each specific kind of binding return the name of this binding 
Returns the modifiers for this binding p Note that deprecated is not included among the modifiers Use code is Deprecated code to find out whether a binding is deprecated p return the bit wise or of code Modifier code constants see Modifier  isDeprecated
Return whether this binding is for something that is deprecated A deprecated class interface field method or constructor is one that is marked with the deprecated tag in its Javadoc comment return code true code if this binding is deprecated and code false code otherwise 
Returns whether this binding is synthetic A synthetic binding is one that was made up by the compiler rather than something declared in the source code Note that default constructors the 0 argument constructor that the compiler generates for class declarations with no explicit constructors declarations are not generally considered synthetic although they may be if the class itself is synthetic But see link I Method Binding is Default Constructor I Method Binding is Default Constructor for cases where the compiled generated default constructor can be recognized instead return code true code if this binding is synthetic and code false code otherwise see I Method Binding is Default Constructor  IMethodBinding isDefaultConstructor IMethodBinding isDefaultConstructor IMethodBinding isDefaultConstructor
Returns the key for this binding p Within a connected cluster of bindings for example all bindings reachable from a given AST each binding will have a distinct keys The keys are generated in a manner that is predictable and as stable as possible This last property makes these keys useful for comparing bindings between disconnected clusters of bindings for example the bindings between the before and after AS Ts of the same compilation unit p p The exact details of how the keys are generated is unspecified However it is a function of the following information ul li packages the name of the package for an unnamed package some internal id li li classes or interfaces the VM name of the type and the key of its package li li array types the key of the component type and number of dimensions li li primitive types the name of the primitive type li li fields the name of the field and the key of its declaring type li li methods the name of the method the key of its declaring type and the keys of the parameter types li li constructors the key of its declaring class and the keys of the parameter types li li local variables the name of the local variable the index of the declaring block relative to its parent the key of its method li li local types the name of the type the index of the declaring block relative to its parent the key of its method li li anonymous types the occurence count of the anonymous type relative to its declaring type the key of its declaring type li ul p return the key for this binding or code null code if none  ASTs
There is no special definition of equality for bindings equality is simply object identity Within the context of a single cluster of bindings each binding is represented by a distinct object However between different clusters of bindings the binding objects may or may not be different in these cases the client should compare bindings via their binding keys code get Key code if available param obj inherit Doc return inherit Doc see get Key  getKey inheritDoc inheritDoc getKey
Returns a string representation of this binding suitable for debugging purposes only return a debug string 

Returns whether this extended modifier is a standard modifier return code true code if this is a standard modifier instance of link Modifier and code false code otherwise 
Returns whether this extended modifier is an annotation return code true code if this is an annotation instance of a subclass of link Annotation and code false code otherwise 

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented if statement node owned by the given AST By default the expresssion is unspecified but legal the then statement is an empty block and there is no else statement p N B This constructor is package private p param ast the AST that is to own this node If Statement AST ast super ast  IfStatement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null if property THEN STATEMENT PROPERTY if get return get Then Statement else set Then Statement Statement child return null if property ELSE STATEMENT PROPERTY if get return get Else Statement else set Else Statement Statement child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression THEN_STATEMENT_PROPERTY getThenStatement setThenStatement ELSE_STATEMENT_PROPERTY getElseStatement setElseStatement internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return IF STATEMENT  ASTNode getNodeType0 IF_STATEMENT
AST Node clone0 AST target If Statement result new If Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Expression Expression get Expression clone target result set Then Statement Statement get Then Statement clone target result set Else Statement Statement AST Node copy Subtree target get Else Statement return result  ASTNode IfStatement IfStatement setSourceRange getStartPosition getLength copyLeadingComment setExpression getExpression setThenStatement getThenStatement setElseStatement ASTNode copySubtree getElseStatement
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Expression accept Child visitor get Then Statement accept Child visitor get Else Statement visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getExpression acceptChild getThenStatement acceptChild getElseStatement endVisit
Returns the expression of this if statement return the expression node public Expression get Expression if this expression null lazy init must be thread safe for readers synchronized this if this expression null pre Lazy Init this expression new Simple Name this ast post Lazy Init this expression EXPRESSION PROPERTY return this expression  getExpression preLazyInit SimpleName postLazyInit EXPRESSION_PROPERTY
Sets the condition of this if statement param expression the expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this expression pre Replace Child old Child expression EXPRESSION PROPERTY this expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression IllegalArgumentException ASTNode oldChild preReplaceChild oldChild EXPRESSION_PROPERTY postReplaceChild oldChild EXPRESSION_PROPERTY
Returns the then part of this if statement return the then statement node public Statement get Then Statement if this then Statement null lazy init must be thread safe for readers synchronized this if this then Statement null pre Lazy Init this then Statement new Block this ast post Lazy Init this then Statement THEN STATEMENT PROPERTY return this then Statement  getThenStatement thenStatement thenStatement preLazyInit thenStatement postLazyInit thenStatement THEN_STATEMENT_PROPERTY thenStatement
Sets the then part of this if statement p Special note The Java language does not allow a local variable declaration to appear as the then part of an if statement they may only appear within a block However the AST will allow a code Variable Declaration Statement code as the then Statement of a code If Statement code To get something that will compile be sure to embed the code Variable Declaration Statement code inside a code Block code p param statement the then statement node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Then Statement Statement statement if statement null throw new Illegal Argument Exception AST Node old Child this then Statement pre Replace Child old Child statement THEN STATEMENT PROPERTY this then Statement statement post Replace Child old Child statement THEN STATEMENT PROPERTY  VariableDeclarationStatement thenStatement IfStatement VariableDeclarationStatement IllegalArgumentException setThenStatement IllegalArgumentException ASTNode oldChild thenStatement preReplaceChild oldChild THEN_STATEMENT_PROPERTY thenStatement postReplaceChild oldChild THEN_STATEMENT_PROPERTY
Returns the else part of this if statement or code null code if this if statement has b no b else part p Note that there is a subtle difference between having no else statement and having an empty statement or null statement p return the else statement node or code null code if none public Statement get Else Statement return this optional Else Statement  getElseStatement optionalElseStatement
Sets or clears the else part of this if statement p Note that there is a subtle difference between having no else part as in code if true code and having an empty block as in if true else or null statement as in if true else p p Special note The Java language does not allow a local variable declaration to appear as the else part of an if statement they may only appear within a block However the AST will allow a code Variable Declaration Statement code as the else Statement of a code If Statement code To get something that will compile be sure to embed the code Variable Declaration Statement code inside a code Block code p param statement the else statement node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Else Statement Statement statement AST Node old Child this optional Else Statement pre Replace Child old Child statement ELSE STATEMENT PROPERTY this optional Else Statement statement post Replace Child old Child statement ELSE STATEMENT PROPERTY  VariableDeclarationStatement elseStatement IfStatement VariableDeclarationStatement IllegalArgumentException setElseStatement ASTNode oldChild optionalElseStatement preReplaceChild oldChild ELSE_STATEMENT_PROPERTY optionalElseStatement postReplaceChild oldChild ELSE_STATEMENT_PROPERTY
Method declared on AST Node int mem Size return super mem Size 3 4  ASTNode memSize memSize
int tree Size return mem Size this expression null 0 get Expression tree Size this then Statement null 0 get Then Statement tree Size this optional Else Statement null 0 get Else Statement tree Size  treeSize memSize getExpression treeSize thenStatement getThenStatement treeSize optionalElseStatement getElseStatement treeSize

Returns whether this binding is for a constructor or a method return code true code if this is the binding for a constructor and code false code if this is the binding for a method 
Returns whether this binding is known to be a compiler generated default constructor p This method returns code false code for ul li methods li li constructors with more than one parameter li li 0 argument constructors where the binding information was obtained from a Java source file containing an explicit 0 argument constructor declaration li li 0 argument constructors where the binding information was obtained from a Java class file it is not possible to determine from a class file whether a 0 argument constructor was present in the source code versus generated automatically by a Java compiler li ul return code true code if this is known to be the binding for a compiler generated default constructor and code false code otherwise since 3 0 
Returns the name of the method declared in this binding The method name is always a simple identifier The name of a constructor is always the same as the declared name of its declaring class return the name of this method or the declared name of this constructor s declaring class 
Returns the type binding representing the class or interface that declares this method or constructor return the binding of the class or interface that declares this method or constructor 
Returns a list of type bindings representing the formal parameter types in declaration order of this method or constructor Returns an array of length 0 if this method or constructor does not takes any parameters p Note The result does not include synthetic parameters introduced by inner class emulation p return a possibly empty list of type bindings for the formal parameters of this method or constructor 
Returns the binding for the return type of this method Returns the special primitive code void code return type for constructors return the binding for the return type of this method or the code void code return type for constructors 
Returns a list of type bindings representing the types of the exceptions thrown by this method or constructor Returns an array of length 0 if this method throws no exceptions The resulting types are in no particular order return a list of type bindings for exceptions thrown by this method or constructor 
Returns the type parameters of this method or constructor binding p Note Support for new language features proposed for the upcoming 1 5 release of J2SE is tentative and subject to change p return the list of binding for the type variables for the type parameters of this method or otherwise the empty list see I Type Binding is Type Variable since 3 0  ITypeBinding isTypeVariable

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new AST node for an import declaration owned by the given AST The import declaration initially is a regular non static single type import for an unspecified but legal Java type name p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Import Declaration AST ast super ast  ImportDeclaration
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final boolean internal Get Set Boolean Property Simple Property Descriptor property boolean get boolean value if property ON DEMAND PROPERTY if get return is On Demand else set On Demand value return false if property STATIC PROPERTY if get return is Static else set Static value return false allow default implementation to flag the error return super internal Get Set Boolean Property property get value  internalGetSetBooleanProperty SimplePropertyDescriptor ON_DEMAND_PROPERTY isOnDemand setOnDemand STATIC_PROPERTY isStatic setStatic internalGetSetBooleanProperty
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property NAME PROPERTY if get return get Name else set Name Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode NAME_PROPERTY getName setName internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return IMPORT DECLARATION  ASTNode getNodeType0 IMPORT_DECLARATION
AST Node clone0 AST target Import Declaration result new Import Declaration target result set Source Range this get Start Position this get Length result set On Demand is On Demand if this ast api Level AST JLS3 result set Static is Static result set Name Name get Name clone target return result  ASTNode ImportDeclaration ImportDeclaration setSourceRange getStartPosition getLength setOnDemand isOnDemand apiLevel setStatic isStatic setName getName
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Child visitor get Name visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getName endVisit
Returns the name imported by this declaration p For a regular on demand import this is the name of a package For a static on demand import this is the qualified name of a type For a regular single type import this is the qualified name of a type For a static single type import this is the qualified name of a static member of a type p return the imported name node public Name get Name if this import Name null lazy init must be thread safe for readers synchronized this if this import Name null pre Lazy Init this import Name this ast new Qualified Name new Simple Name this ast new Simple Name this ast post Lazy Init this import Name NAME PROPERTY return import Name  getName importName importName preLazyInit importName newQualifiedName SimpleName SimpleName postLazyInit importName NAME_PROPERTY importName
Sets the name of this import declaration to the given name p For a regular on demand import this is the name of a package For a static on demand import this is the qualified name of a type For a regular single type import this is the qualified name of a type For a static single type import this is the qualified name of a static member of a type p param name the new import name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Name Name name if name null throw new Illegal Argument Exception AST Node old Child this import Name pre Replace Child old Child name NAME PROPERTY this import Name name post Replace Child old Child name NAME PROPERTY  IllegalArgumentException setName IllegalArgumentException ASTNode oldChild importName preReplaceChild oldChild NAME_PROPERTY importName postReplaceChild oldChild NAME_PROPERTY
Returns whether this import declaration is an on demand or a single type import return code true code if this is an on demand import and code false code if this is a single type import public boolean is On Demand return on Demand  isOnDemand onDemand
Sets whether this import declaration is an on demand or a single type import param on Demand code true code if this is an on demand import and code false code if this is a single type import public void set On Demand boolean on Demand pre Value Change ON DEMAND PROPERTY this on Demand on Demand post Value Change ON DEMAND PROPERTY  onDemand setOnDemand onDemand preValueChange ON_DEMAND_PROPERTY onDemand onDemand postValueChange ON_DEMAND_PROPERTY
Returns whether this import declaration is a static import added in JLS3 API p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p return code true code if this is a static import and code false code if this is a regular import exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public boolean is Static unsupported In2 return is Static  UnsupportedOperationException isStatic unsupportedIn2 isStatic
Sets whether this import declaration is a static import added in JLS3 API p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p param is Static code true code if this is a static import and code false code if this is a regular import exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public void set Static boolean is Static unsupported In2 pre Value Change STATIC PROPERTY this is Static is Static post Value Change STATIC PROPERTY  isStatic UnsupportedOperationException setStatic isStatic unsupportedIn2 preValueChange STATIC_PROPERTY isStatic isStatic postValueChange STATIC_PROPERTY
Resolves and returns the binding for the package or type imported by this import declaration p Note that bindings are generally unavailable unless requested when the AST is being built p return the package binding for on demand imports or type binding for single type imports or code null code if the binding cannot be resolved public I Binding resolve Binding return this ast get Binding Resolver resolve Import this  IBinding resolveBinding getBindingResolver resolveImport
Method declared on AST Node int mem Size return BASE NODE SIZE 3 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size import Name null 0 get Name tree Size  treeSize memSize importName getName treeSize

Creates a new infix operator with the given token p Note this constructor is private The only instances ever created are the ones for the standard operators p param token the character sequence for the operator private Operator String token this token token 
Returns the character sequence for the operator return the character sequence for the operator public String to String return token  toString
Returns the infix operator corresponding to the given string or code null code if none p code to Operator code is the converse of code to String code that is code Operator to Operator op to String op code for all operators code op code p param token the character sequence for the operator return the infix operator or code null code if none public static Operator to Operator String token return Operator CODES get token  toOperator toString toOperator toString toOperator
Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for an infix expression owned by the given AST By default the node has unspecified but legal operator left and right operands and an empty list of additional operands param ast the AST that is to own this node Infix Expression AST ast super ast  InfixExpression
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final Object internal Get Set Object Property Simple Property Descriptor property boolean get Object value if property OPERATOR PROPERTY if get return get Operator else set Operator Operator value return null allow default implementation to flag the error return super internal Get Set Object Property property get value  internalGetSetObjectProperty SimplePropertyDescriptor OPERATOR_PROPERTY getOperator setOperator internalGetSetObjectProperty
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property LEFT OPERAND PROPERTY if get return get Left Operand else set Left Operand Expression child return null if property RIGHT OPERAND PROPERTY if get return get Right Operand else set Right Operand Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode LEFT_OPERAND_PROPERTY getLeftOperand setLeftOperand RIGHT_OPERAND_PROPERTY getRightOperand setRightOperand internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property EXTENDED OPERANDS PROPERTY return extended Operands allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor EXTENDED_OPERANDS_PROPERTY extendedOperands internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return INFIX EXPRESSION  ASTNode getNodeType0 INFIX_EXPRESSION
AST Node clone0 AST target Infix Expression result new Infix Expression target result set Source Range this get Start Position this get Length result set Operator get Operator result set Left Operand Expression get Left Operand clone target result set Right Operand Expression get Right Operand clone target if this extended Operands null be careful not to trigger lazy creation of list result extended Operands add All AST Node copy Subtrees target this extended Operands return result  ASTNode InfixExpression InfixExpression setSourceRange getStartPosition getLength setOperator getOperator setLeftOperand getLeftOperand setRightOperand getRightOperand extendedOperands extendedOperands addAll ASTNode copySubtrees extendedOperands
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Left Operand accept Child visitor get Right Operand if this extended Operands null be careful not to trigger lazy creation of list accept Children visitor this extended Operands visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getLeftOperand acceptChild getRightOperand extendedOperands acceptChildren extendedOperands endVisit
Returns the operator of this infix expression return the infix operator public Infix Expression Operator get Operator return this operator  InfixExpression getOperator
Sets the operator of this infix expression param operator the infix operator exception Illegal Argument Exception if the argument is incorrect public void set Operator Infix Expression Operator operator if operator null throw new Illegal Argument Exception pre Value Change OPERATOR PROPERTY this operator operator post Value Change OPERATOR PROPERTY  IllegalArgumentException setOperator InfixExpression IllegalArgumentException preValueChange OPERATOR_PROPERTY postValueChange OPERATOR_PROPERTY
Returns the left operand of this infix expression return the left operand node public Expression get Left Operand if this left Operand null lazy init must be thread safe for readers synchronized this if this left Operand null pre Lazy Init this left Operand new Simple Name this ast post Lazy Init this left Operand LEFT OPERAND PROPERTY return this left Operand  getLeftOperand leftOperand leftOperand preLazyInit leftOperand SimpleName postLazyInit leftOperand LEFT_OPERAND_PROPERTY leftOperand
Sets the left operand of this infix expression param expression the left operand node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Left Operand Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this left Operand pre Replace Child old Child expression LEFT OPERAND PROPERTY this left Operand expression post Replace Child old Child expression LEFT OPERAND PROPERTY  IllegalArgumentException setLeftOperand IllegalArgumentException ASTNode oldChild leftOperand preReplaceChild oldChild LEFT_OPERAND_PROPERTY leftOperand postReplaceChild oldChild LEFT_OPERAND_PROPERTY
Returns the right operand of this infix expression return the right operand node public Expression get Right Operand if this right Operand null lazy init must be thread safe for readers synchronized this if this right Operand null pre Lazy Init this right Operand new Simple Name this ast post Lazy Init this right Operand RIGHT OPERAND PROPERTY return this right Operand  getRightOperand rightOperand rightOperand preLazyInit rightOperand SimpleName postLazyInit rightOperand RIGHT_OPERAND_PROPERTY rightOperand
Sets the right operand of this infix expression param expression the right operand node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Right Operand Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this right Operand pre Replace Child old Child expression RIGHT OPERAND PROPERTY this right Operand expression post Replace Child old Child expression RIGHT OPERAND PROPERTY  IllegalArgumentException setRightOperand IllegalArgumentException ASTNode oldChild rightOperand preReplaceChild oldChild RIGHT_OPERAND_PROPERTY rightOperand postReplaceChild oldChild RIGHT_OPERAND_PROPERTY
Returns where there are any extended operands return code true code if there are one or more extended operands and code false code if there are no extended operands public boolean has Extended Operands return this extended Operands null this extended Operands size 0  hasExtendedOperands extendedOperands extendedOperands
Returns the live list of extended operands p The extended operands is the preferred way of representing deeply nested expressions of the form code L op R op R2 op R3 code where the same operator appears between all the operands the most common case being lengthy string concatenation expressions Using the extended operands keeps the trees from getting too deep this decreases the risk is running out of thread stack space at runtime when traversing such trees a b c d would be translated to left Operand a right Operand b extended Operands c d operator p return the live list of extended operands element type code Expression code public List extended Operands if this extended Operands null lazily initialize this extended Operands new AST Node Node List EXTENDED OPERANDS PROPERTY return this extended Operands  leftOperand rightOperand extendedOperands extendedOperands extendedOperands extendedOperands ASTNode NodeList EXTENDED_OPERANDS_PROPERTY extendedOperands
Method declared on AST Node int mem Size treat Operator as free return BASE NODE SIZE 4 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this left Operand null 0 get Left Operand tree Size this right Operand null 0 get Right Operand tree Size this extended Operands null 0 extended Operands list Size  treeSize memSize leftOperand getLeftOperand treeSize rightOperand getRightOperand treeSize extendedOperands extendedOperands listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new AST node for an initializer declaration owned by the given AST By default the initializer has no modifiers and an empty block The javadoc comment is not used for initializers p N B This constructor is package private p param ast the AST that is to own this node Initializer AST ast super ast 
since 3 0 final List internal Structural Properties For Type int api Level return property Descriptors api Level  internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final int internal Get Set Int Property Simple Property Descriptor property boolean get int value if property MODIFIERS PROPERTY if get return get Modifiers else set Modifiers value return 0 allow default implementation to flag the error return super internal Get Set Int Property property get value  internalGetSetIntProperty SimplePropertyDescriptor MODIFIERS_PROPERTY getModifiers setModifiers internalGetSetIntProperty
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property JAVADOC PROPERTY if get return get Javadoc else set Javadoc Javadoc child return null if property BODY PROPERTY if get return get Body else set Body Block child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode JAVADOC_PROPERTY getJavadoc setJavadoc BODY_PROPERTY getBody setBody internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property MODIFIERS2 PROPERTY return modifiers allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor MODIFIERS2_PROPERTY internalGetChildListProperty
Method declared on Body Declaration final Child Property Descriptor internal Javadoc Property return JAVADOC PROPERTY  BodyDeclaration ChildPropertyDescriptor internalJavadocProperty JAVADOC_PROPERTY
Method declared on Body Declaration final Child List Property Descriptor internal Modifiers2 Property return MODIFIERS2 PROPERTY  BodyDeclaration ChildListPropertyDescriptor internalModifiers2Property MODIFIERS2_PROPERTY
Method declared on Body Declaration final Simple Property Descriptor internal Modifiers Property return MODIFIERS PROPERTY  BodyDeclaration SimplePropertyDescriptor internalModifiersProperty MODIFIERS_PROPERTY
Method declared on AST Node final int get Node Type0 return INITIALIZER  ASTNode getNodeType0
AST Node clone0 AST target Initializer result new Initializer target result set Source Range this get Start Position this get Length if this ast api Level AST JLS2 result set Modifiers get Modifiers if this ast api Level AST JLS3 result modifiers add All AST Node copy Subtrees target modifiers result set Javadoc Javadoc AST Node copy Subtree target get Javadoc result set Body Block get Body clone target return result  ASTNode setSourceRange getStartPosition getLength apiLevel setModifiers getModifiers apiLevel addAll ASTNode copySubtrees setJavadoc ASTNode copySubtree getJavadoc setBody getBody
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Child visitor get Javadoc if this ast api Level AST JLS3 accept Children visitor this modifiers accept Child visitor get Body visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getJavadoc apiLevel acceptChildren acceptChild getBody endVisit
Returns the body of this initializer declaration return the initializer body public Block get Body if this body null lazy init must be thread safe for readers synchronized this if this body null pre Lazy Init this body new Block this ast post Lazy Init this body BODY PROPERTY return this body  getBody preLazyInit postLazyInit BODY_PROPERTY
Sets the body of this initializer declaration param body the block node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Body Block body if body null throw new Illegal Argument Exception AST Node old Child this body pre Replace Child old Child body BODY PROPERTY this body body post Replace Child old Child body BODY PROPERTY  IllegalArgumentException setBody IllegalArgumentException ASTNode oldChild preReplaceChild oldChild BODY_PROPERTY postReplaceChild oldChild BODY_PROPERTY
Method declared on AST Node int mem Size return super mem Size 1 4  ASTNode memSize memSize
int tree Size return mem Size this optional Doc Comment null 0 get Javadoc tree Size this modifiers null 0 this modifiers list Size this body null 0 get Body tree Size  treeSize memSize optionalDocComment getJavadoc treeSize listSize getBody treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for an instanceof expression owned by the given AST By default the node has unspecified but legal operator left and right operands param ast the AST that is to own this node Instanceof Expression AST ast super ast  InstanceofExpression
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property LEFT OPERAND PROPERTY if get return get Left Operand else set Left Operand Expression child return null if property RIGHT OPERAND PROPERTY if get return get Right Operand else set Right Operand Type child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode LEFT_OPERAND_PROPERTY getLeftOperand setLeftOperand RIGHT_OPERAND_PROPERTY getRightOperand setRightOperand internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return INSTANCEOF EXPRESSION  ASTNode getNodeType0 INSTANCEOF_EXPRESSION
AST Node clone0 AST target Instanceof Expression result new Instanceof Expression target result set Source Range this get Start Position this get Length result set Left Operand Expression get Left Operand clone target result set Right Operand Type get Right Operand clone target return result  ASTNode InstanceofExpression InstanceofExpression setSourceRange getStartPosition getLength setLeftOperand getLeftOperand setRightOperand getRightOperand
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Left Operand accept Child visitor get Right Operand visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getLeftOperand acceptChild getRightOperand endVisit
Returns the left operand of this instanceof expression return the left operand node public Expression get Left Operand if this left Operand null lazy init must be thread safe for readers synchronized this if this left Operand null pre Lazy Init this left Operand new Simple Name this ast post Lazy Init this left Operand LEFT OPERAND PROPERTY return this left Operand  getLeftOperand leftOperand leftOperand preLazyInit leftOperand SimpleName postLazyInit leftOperand LEFT_OPERAND_PROPERTY leftOperand
Sets the left operand of this instanceof expression param expression the left operand node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Left Operand Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this left Operand pre Replace Child old Child expression LEFT OPERAND PROPERTY this left Operand expression post Replace Child old Child expression LEFT OPERAND PROPERTY  IllegalArgumentException setLeftOperand IllegalArgumentException ASTNode oldChild leftOperand preReplaceChild oldChild LEFT_OPERAND_PROPERTY leftOperand postReplaceChild oldChild LEFT_OPERAND_PROPERTY
Returns the right operand of this instanceof expression return the right operand node public Type get Right Operand if this right Operand null lazy init must be thread safe for readers synchronized this if this right Operand null pre Lazy Init this right Operand new Simple Type this ast post Lazy Init this right Operand RIGHT OPERAND PROPERTY return this right Operand  getRightOperand rightOperand rightOperand preLazyInit rightOperand SimpleType postLazyInit rightOperand RIGHT_OPERAND_PROPERTY rightOperand
Sets the right operand of this instanceof expression param reference Type the right operand node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Right Operand Type reference Type if reference Type null throw new Illegal Argument Exception AST Node old Child this right Operand pre Replace Child old Child reference Type RIGHT OPERAND PROPERTY this right Operand reference Type post Replace Child old Child reference Type RIGHT OPERAND PROPERTY  referenceType IllegalArgumentException setRightOperand referenceType referenceType IllegalArgumentException ASTNode oldChild rightOperand preReplaceChild oldChild referenceType RIGHT_OPERAND_PROPERTY rightOperand referenceType postReplaceChild oldChild referenceType RIGHT_OPERAND_PROPERTY
Method declared on AST Node int mem Size treat Operator as free return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this left Operand null 0 get Left Operand tree Size this right Operand null 0 get Right Operand tree Size  treeSize memSize leftOperand getLeftOperand treeSize rightOperand getRightOperand treeSize

Constructor param root root node of the recorded ast public InternalAST Rewrite Compilation Unit root this root root this event Store new Rewrite Event Store this node Store new Node Info Store root getAST this cloned Nodes new Hashtable  InternalASTRewrite CompilationUnit eventStore RewriteEventStore nodeStore NodeInfoStore clonedNodes
Performs the rewrite The rewrite events are translated to the corresponding in text changes param document Document which describes the code of the AST that is passed in in the constructor This document is accessed read only param options options throws Illegal Argument Exception if the rewrite fails return Returns the edit describing the text changes public Text Edit rewriteAST I Document document Map options Text Edit result new Multi Text Edit Compilation Unit root Node get Root Node if root Node null AST Rewrite Analyzer visitor new AST Rewrite Analyzer document root Node result this event Store this node Store options root Node accept visitor return result  IllegalArgumentException TextEdit IDocument TextEdit MultiTextEdit CompilationUnit rootNode getRootNode rootNode ASTRewriteAnalyzer ASTRewriteAnalyzer rootNode eventStore nodeStore rootNode
private void mark As Move Or Copy Target AST Node node AST Node new Child AST Node source AST Node this cloned Nodes get new Child if source null if this clone Depth 0 Property Location property Location this event Store get Property Location source Rewrite Event Store ORIGINAL Copy Source Info source Info this event Store mark As Copy Source property Location get Parent property Location get Property source false this node Store mark As Copy Target new Child source Info else if new Child get Flags AST Node ORIGINAL 0 Property Location property Location this event Store get Property Location new Child Rewrite Event Store ORIGINAL Copy Source Info source Info this event Store mark As Copy Source property Location get Parent property Location get Property new Child true this node Store mark As Copy Target new Child source Info  markAsMoveOrCopyTarget ASTNode ASTNode newChild ASTNode ASTNode clonedNodes newChild cloneDepth PropertyLocation propertyLocation eventStore getPropertyLocation RewriteEventStore CopySourceInfo sourceInfo eventStore markAsCopySource propertyLocation getParent propertyLocation getProperty nodeStore markAsCopyTarget newChild sourceInfo newChild getFlags ASTNode PropertyLocation propertyLocation eventStore getPropertyLocation newChild RewriteEventStore CopySourceInfo sourceInfo eventStore markAsCopySource propertyLocation getParent propertyLocation getProperty newChild nodeStore markAsCopyTarget newChild sourceInfo
private Compilation Unit get Root Node return this root  CompilationUnit getRootNode
public String to String String Buffer buf new String Buffer buf append Events n NON NLS 1 buf append this event Store to String return buf to String  toString StringBuffer StringBuffer eventStore toString toString
void pre Value Change Event AST Node node Simple Property Descriptor property force event creation this get Node Event node property  preValueChangeEvent ASTNode SimplePropertyDescriptor getNodeEvent
void post Value Change Event AST Node node Simple Property Descriptor property Node Rewrite Event event this get Node Event node property event set New Value node get Structural Property property  postValueChangeEvent ASTNode SimplePropertyDescriptor NodeRewriteEvent getNodeEvent setNewValue getStructuralProperty
void pre Add Child Event AST Node node AST Node child Structural Property Descriptor property if property is Child Property Node Rewrite Event event this get Node Event node property event set New Value child if child null this mark As Move Or Copy Target node child else if property is Child List Property force event creation this get List Event node property  preAddChildEvent ASTNode ASTNode StructuralPropertyDescriptor isChildProperty NodeRewriteEvent getNodeEvent setNewValue markAsMoveOrCopyTarget isChildListProperty getListEvent
void post Add Child Event AST Node node AST Node child Structural Property Descriptor property if property is Child List Property List Rewrite Event event this get List Event node property List list List node get Structural Property property int i list index Of child int s list size int index if i 1 s AST Node next Node AST Node list get i 1 index event get Index next Node List Rewrite Event NEW else index 1 event insert child index if child null this mark As Move Or Copy Target node child  postAddChildEvent ASTNode ASTNode StructuralPropertyDescriptor isChildListProperty ListRewriteEvent getListEvent getStructuralProperty indexOf ASTNode nextNode ASTNode getIndex nextNode ListRewriteEvent markAsMoveOrCopyTarget
void pre Remove Child Event AST Node node AST Node child Structural Property Descriptor property if property is Child Property Node Rewrite Event event get Node Event node property event set New Value null else if property is Child List Property List Rewrite Event event this get List Event node property int i event get Index child List Rewrite Event NEW Node Rewrite Event node Event Node Rewrite Event event get Children i if node Event get Original Value null event revert Change node Event else node Event set New Value null  preRemoveChildEvent ASTNode ASTNode StructuralPropertyDescriptor isChildProperty NodeRewriteEvent getNodeEvent setNewValue isChildListProperty ListRewriteEvent getListEvent getIndex ListRewriteEvent NodeRewriteEvent nodeEvent NodeRewriteEvent getChildren nodeEvent getOriginalValue revertChange nodeEvent nodeEvent setNewValue
void pre Replace Child Event AST Node node AST Node child AST Node new Child Structural Property Descriptor property if property is Child Property Node Rewrite Event event get Node Event node property event set New Value new Child if new Child null this mark As Move Or Copy Target node new Child else if property is Child List Property List Rewrite Event event this get List Event node property int i event get Index child List Rewrite Event NEW Node Rewrite Event node Event Node Rewrite Event event get Children i node Event set New Value new Child if new Child null this mark As Move Or Copy Target node new Child  preReplaceChildEvent ASTNode ASTNode ASTNode newChild StructuralPropertyDescriptor isChildProperty NodeRewriteEvent getNodeEvent setNewValue newChild newChild markAsMoveOrCopyTarget newChild isChildListProperty ListRewriteEvent getListEvent getIndex ListRewriteEvent NodeRewriteEvent nodeEvent NodeRewriteEvent getChildren nodeEvent setNewValue newChild newChild markAsMoveOrCopyTarget newChild
void pre Clone Node Event AST Node node this clone Depth  preCloneNodeEvent ASTNode cloneDepth
void post Clone Node Event AST Node node AST Node clone this cloned Nodes put clone node this clone Depth  postCloneNodeEvent ASTNode ASTNode clonedNodes cloneDepth
private Node Rewrite Event get Node Event AST Node node Structural Property Descriptor property return this event Store get Node Event node property true  NodeRewriteEvent getNodeEvent ASTNode StructuralPropertyDescriptor eventStore getNodeEvent
private List Rewrite Event get List Event AST Node node Structural Property Descriptor property return this event Store get List Event node property true  ListRewriteEvent getListEvent ASTNode StructuralPropertyDescriptor eventStore getListEvent

Returns the name of the package represented by this binding For named packages this is the fully qualified package name using for separators For unnamed packages this is a distinctive string that can be used to refer to this unnamed package since there may in fact be multiple unnamed packages return the name of the package represented by this binding or an internal identifier for an unnamed package 
Returns whether this package is an unnamed package See em The Java Language Specification em section 7 4 2 for details return code true code if this is an unnamed package and code false code otherwise 
Returns the list of name component making up the name of the package represented by this binding For example for the package named com example tool this method returns com example tool Returns the empty list for unnamed packages return the name of the package represented by this binding or the empty list for unnamed packages 

Returns the binary name of this type binding The binary name of a class is defined in the Java Language Specification 2nd edition section 13 1 p Note that in some cases the binary name may be unavailable This may happen for example for a local type declared in unreachable code p return the binary name of this type or code null code if the binary name is unknown since 3 0 
Returns whether this type binding represents a primitive type p There are nine predefined type bindings to represent the eight primitive types and code void code These have the same names as the primitive types that they represent namely boolean byte char short int long float and double and void p return code true code if this type binding is for a primitive type and code false code otherwise 
Returns whether this type binding represents the null type p The null type is the type of a code Null Literal code node p return code true code if this type binding is for the null type and code false code otherwise  NullLiteral
Returns whether this type binding represents an array type return code true code if this type binding is for an array type and code false code otherwise see get Element Type see get Dimensions  getElementType getDimensions
Returns the binding representing the element type of this array type or code null code if this is not an array type binding The element type of an array is never itself an array type return the element type binding or code null code if this is not an array type 
Returns the dimensionality of this array type or code 0 code if this is not an array type binding return the number of dimension of this array type binding or code 0 code if this is not an array type 
Returns whether this type binding represents a class type return code true code if this object represents a class and code false code otherwise 
Returns whether this type binding represents an interface type return code true code if this object represents an interface and code false code otherwise 
Returns whether this type binding represents an enum type p Note Support for new language features proposed for the upcoming 1 5 release of J2SE is tentative and subject to change p return code true code if this object represents an enum type and code false code otherwise since 3 0 
Returns whether this type binding represents an annotation type p Note Support for new language features proposed for the upcoming 1 5 release of J2SE is tentative and subject to change p return code true code if this object represents an annotation type and code false code otherwise since 3 0 
Returns the type parameters of this class or interface type binding p Note that type parameters only occur on the declaring class or interface e g code Collection lt T gt code Do not confuse them with type arguments which only occur on references e g code Collection lt String gt code p p Note Support for new language features proposed for the upcoming 1 5 release of J2SE is tentative and subject to change p return the list of binding for the type variables for the type parameters of this type or otherwise the empty list see is Type Variable since 3 0  isTypeVariable
Returns whether this type binding represents a type variable Type variables bindings carry the type variable s bounds p Note Support for new language features proposed for the upcoming 1 5 release of J2SE is tentative and subject to change p return code true code if this type binding is for a type variable and code false code otherwise see get Type Bounds since 3 0  getTypeBounds
Returns the type bounds of this type variable p Note Support for new language features proposed for the upcoming 1 5 release of J2SE is tentative and subject to change p return the list of type bindings for this type variable or otherwise the empty list see is Type Variable since 3 0  isTypeVariable
Returns whether this type binding represents a parameterized type reference p For example a AST type like code Collection lt String gt code typically resolves to a parameterized type binding whose erasure is a type binding for the class code java util Collection code and whose type argument is a type binding for the class code java util Collection code p p Note Support for new language features proposed for the upcoming 1 5 release of J2SE is tentative and subject to change p return code true code if this object represents a parameterized type reference and code false code otherwise see get Type Arguments see get Erasure since 3 0  getTypeArguments getErasure
Returns the type arguments of the parameterized type reference p Note that type arguments only occur on type references e g code Collection lt String gt code Do not confuse with type parameters which only occur on the declaring class or interface e g code Collection lt T gt code p p Note Support for new language features proposed for the upcoming 1 5 release of J2SE is tentative and subject to change p return the list of type bindings for the type arguments of this parameterized type or otherwise the empty list since 3 0 
Returns the erasure of this type reference For a parameterized type reference or a raw type reference returns the type binding for the class or interface where the referenced type is declared Returns this type binding for types other than parameterized types p Note Support for new language features proposed for the upcoming 1 5 release of J2SE is tentative and subject to change p return the erasure type see is Raw Type see is Parameterized Type since 3 0  isRawType isParameterizedType
Returns whether this type binding represents a raw type reference A raw type is a unparameterized legacy reference to a type declared with type parameters p For example a AST type like code Collection code typically resolves to a raw type binding whose erasure is a type binding for the class code java util Collection code p p Note Support for new language features proposed for the upcoming 1 5 release of J2SE is tentative and subject to change p return code true code if this object represents a raw type and code false code otherwise see get Erasure since 3 0  getErasure
Returns whether this type binding represents a wildcard type A wildcard type occus only as an argument to a parameterized type reference p For example a AST type like code Collection lt extends Object gt code typically resolves to a parameterized type binding whose type argument is a wildcard type with upper type bound code java util Object code p p Note Support for new language features proposed for the upcoming 1 5 release of J2SE is tentative and subject to change p return code true code if this object represents a wildcard type and code false code otherwise since 3 0 see get Bound see is Upperbound  getBound isUpperbound
Returns the bound of this wildcard type if it has one Returns code null code if this is not a wildcard type p Note Support for new language features proposed for the upcoming 1 5 release of J2SE is tentative and subject to change p return the bound of this wildcard type or code null code if none see is Wildcard Type see is Upperbound since 3 0  isWildcardType isUpperbound
Returns whether this wildcard type is an upper bound extends as opposed to a lower bound super Note that this property is only relevant for wildcards that have a bound p Note Support for new language features proposed for the upcoming 1 5 release of J2SE is tentative and subject to change p return code true code if this wildcard type has a bound that is an upper bound and code false code in all other cases see is Wildcard Type see get Bound since 3 0  isWildcardType getBound
Returns the unqualified name of the type represented by this binding if it has one p For named classes interfaces enums and annotation types this is the simple name of the type if the type is parameterized the name is followed by the simple names of the type variables surrounded by lt gt and separated by the type bounds are not included For primitive types the name is the keyword for the primitive type For array types the name is the name of the component type as computed by this method followed by If this represents an anonymous class it returns an empty string note that it is impossible to have an array type with an anonymous class as element type For the null type it returns null For type variables this is the name of the type variable For parameterized type references this is the simple name of the erasure type followed by the names of the type arguments as computed by this method surrounded by lt gt and separated by For raw type references this is the simple name of the erasure type For wildcard types this is followed by the name of the bound as computed by this method when present p return the unqualified name of the type represented by this binding or the empty string if it has none see get Qualified Name  getQualifiedName
Returns the binding for the package in which this type is declared return the binding for the package in which this class interface enum or annotation type is declared or code null code if this type binding represents a primitive type an array type the null type a type variable a parameterized type reference a raw type reference or a wildcard type 
Returns the type binding representing the class interface or enum that declares this binding p The declaring class of a member class interface enum annotation type is the class interface or enum type of which it is a member The declaring class of a local class or interface including anonymous classes is the innermost class or interface containing the expression or statement in which this type is declared Array types primitive types the null type top level types type variables parameterized type references raw type references and wildcard types have no declaring class p return the binding of the type that declares this type or code null code if none 
Returns the type binding for the superclass of the type represented by this class binding p If this type binding represents any class other than the class code java lang Object code then the type binding for the direct superclass of this class is returned If this type binding represents the class code java lang Object code then code null code is returned p Loops that ascend the class hierarchy need a suitable termination test Rather than test the superclass for code null code it is more transparent to check whether the class is code Object code by comparing whether the class binding is identical to code ast resolve Well Known Type java lang Object code p p If this type binding represents an interface an array type a primitive type the null type a type variable an enum type an annotation type a parameterized type reference a raw type reference or a wildcard type then code null code is returned p return the superclass of the class represented by this type binding or code null code if none see AST resolve Well Known Type String  resolveWellKnownType resolveWellKnownType
Returns a list of type bindings representing the direct superinterfaces of the class interface or enum type represented by this type binding p If this type binding represents a class or enum type the return value is an array containing type bindings representing all interfaces directly implemented by this class The number and order of the interface objects in the array corresponds to the number and order of the interface names in the code implements code clause of the original declaration of this type p p If this type binding represents an interface the array contains type bindings representing all interfaces directly extended by this interface The number and order of the interface objects in the array corresponds to the number and order of the interface names in the code extends code clause of the original declaration of this interface p p If the class or enum implements no interfaces or the interface extends no interfaces or if this type binding represents an array type a primitive type the null type a type variable an annotation type a parameterized type reference a raw type reference or a wildcard type this method returns an array of length 0 p return the list of type bindings for the interfaces extended by this class or enum or interfaces extended by this interface or otherwise the empty list 
Returns the compiled modifiers for this class interface enum or annotation type binding The result may not correspond to the modifiers as declared in the original source since the compiler may change them in particular for inner class emulation The code get Declared Modifiers code method should be used if the original modifiers are needed Returns 0 if this type does not represent a class or interface return the compiled modifiers for this type binding or 0 if this type does not represent a class interface enum or annotation type see get Declared Modifiers  getDeclaredModifiers getDeclaredModifiers
Returns the declared modifiers for this class or interface binding as specified in the original source declaration of the class or interface The result may not correspond to the modifiers in the compiled binary since the compiler may change them in particular for inner class emulation The code get Modifiers code method should be used if the compiled modifiers are needed Returns 1 if this type does not represent a class or interface return the bit wise or of code Modifier code constants see get Modifiers see Modifier  getModifiers getModifiers
Returns whether this type binding represents a top level class interface enum or annotation type p A top level type is any type whose declaration does not occur within the body of another type declaration The set of top level types is disjoint from the set of nested types p return code true code if this type binding is for a top level class interface enum or annotation type and code false code otherwise 
Returns whether this type binding represents a nested class interface enum or annotation type p A nested type is any type whose declaration occurs within the body of another The set of nested types is disjoint from the set of top level types Nested types further subdivide into member types local types and anonymous types p return code true code if this type binding is for a nested class interface enum or annotation type and code false code otherwise 
Returns whether this type binding represents a member class or interface p A member type is any type declared as a member of another type A member type is a subspecies of nested type and mutually exclusive with local types p return code true code if this type binding is for a member class interface enum or annotation type and code false code otherwise 
Returns whether this type binding represents a local class p A local class is any nested class or enum type not declared as a member of another class or interface A local class is a subspecies of nested type and mutually exclusive with member types Note that anonymous classes are a subspecies of local classes p p Also note that interfaces and annotation types cannot be local p return code true code if this type binding is for a local class or enum type and code false code otherwise 
Returns whether this type binding represents an anonymous class p An anonymous class is a subspecies of local class and therefore mutually exclusive with member types Note that anonymous classes have no name code get Name code returns the empty string p return code true code if this type binding is for an anonymous class and code false code otherwise  getName
Returns a list of type bindings representing all the types declared as members of this class interface or enum type These include public protected default package private access and private classes interfaces enum types and annotation types declared by the type but excludes inherited types Returns an empty list if the type declares no type members or if this type binding represents an array type a primitive type a wildcard type a parameterized type reference a raw type reference or the null type The resulting bindings are in no particular order return the list of type bindings for the member types of this type or the empty list if this type does not have member types 
Returns a list of bindings representing all the fields declared as members of this class interface or enum type These include public protected default package private access and private fields declared by the class but excludes inherited fields Synthetic fields may or may not be included Returns an empty list if the class interface or enum declares no fields and for other kinds of type bindings that do not directly have members The resulting bindings are in no particular order return the list of bindings for the field members of this type or the empty list if this type does not have field members 
Returns a list of method bindings representing all the methods and constructors declared for this class interface or enum These include public protected default package private access and private methods Synthetic methods and constructors may or may not be included Returns an empty list if the class interface or enum declares no methods or constructors or if this type binding represents some other kind of type bindings The resulting bindings are in no particular order return the list of method bindings for the methods and constructors declared by this class interface or enum type or the empty list if this type does not declare any methods or constructors TODO jeem should result include bindings for annotation type members 
Returns whether this type binding originated in source code Returns code false code for all primitive types the null type array types and for all classes interfaces enums annotation types type variables parameterized type references raw type references and wildcard types whose information came from a pre compiled binary class file return code true code if the type is in source code and code false code otherwise 
Returns the fully qualified name of the type represented by this binding if it has one ul li For top level types the fully qualified name is the name of the type as computed by link get Name preceded by the package name or unqualified if in a default package and a Example code java lang String code li li For members of top level types the fully qualified name is the simple name of the type preceded by the fully qualified name of the enclosing type as computed by this method and a Example code java io Object Input Stream Get Field code li li For primitive types the fully qualified name is the keyword for the primitive type Example code int code li li For array types whose component type has a fully qualified name the fully qualified name is the fully qualified name of the component type as computed by this method followed by Example code java lang String code li li For the null type the fully qualified name is the string null li li Local types including anonymous classes and members of local types do not have a fully qualified name For these types and array types thereof this method returns an empty string li li For type variables the fully qualified name is just the name of the type variable type bounds are not included Example code X code li li For raw type references the fully qualified name is the fully qualified name of the type but with the type parameters omitted Example code java util Collection code li li For parameterized type references the fully qualified name is the fully qualified name of the erasure type followed by the fully qualified names of the type arguments surrounded by lt gt and separated by Example code java util Collection lt java lang String gt code li li For wildcard types the fully qualified name is followed by the fully qualified name of the bound as computed by this method when present Example code extends java lang Object code li ul return the fully qualified name of the type represented by this binding or the empty string if it has none see get Name since 2 1  getName ObjectInputStream GetField getName

Returns whether this binding is for a field or for a local variable return code true code if this is the binding for a field and code false code if this is the binding for a local variable 
Returns the name of the field or local variable declared in this binding The name is always a simple identifier return the name of this field or local variable 
Returns the type binding representing the class or interface that declares this field p The declaring class of a field is the class or interface of which it is a member Local variables have no declaring class The field length of an array type has no declaring class p return the binding of the class or interface that declares this field or code null code if none 
Returns the binding for the type of this field or local variable return the binding for the type of this field or local variable 
Returns a small integer variable id for this variable binding p b Local variables inside methods b Local variables and parameters declared within a single method are assigned ascending ids in normal code reading order var1 get Variable Id lt var2 get Variable Id means that var1 is declared before var2 p p b Local variables outside methods b Local variables declared in a type s static initializers or initializer expressions of static fields are assigned ascending ids in normal code reading order Local variables declared in a type s instance initializers or initializer expressions of non static fields are assigned ascending ids in normal code reading order These ids are useful when checking definite assignment for static initializers JLS 16 7 and instance initializers JLS 16 8 respectively p p b Fields b Fields declared as members of a type are assigned ascending ids in normal code reading order field1 get Variable Id lt field2 get Variable Id means that field1 is declared before field2 p return a small non negative variable id  getVariableId getVariableId getVariableId getVariableId
Returns this binding s constant value if it has one Some variables may have a value computed at compile time If the type of the value is a primitive type the result is the boxed equivalent i e int returned as an code Integer code If the type of the value is code String code the result is the string itself If the variable has no compile time computed value the result is code null code Note compile time constant expressions cannot denote code null code JLS2 15 28 return the constant value or code null code if none since 3 0 

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new AST node for a doc comment owned by the given AST The new node has an empty list of tag elements and for backwards compatability an unspecified but legal doc comment string p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Javadoc AST ast super ast 
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final Object internal Get Set Object Property Simple Property Descriptor property boolean get Object value if property COMMENT PROPERTY if get return get Comment else set Comment String value return null allow default implementation to flag the error return super internal Get Set Object Property property get value  internalGetSetObjectProperty SimplePropertyDescriptor COMMENT_PROPERTY getComment setComment internalGetSetObjectProperty
final List internal Get Child List Property Child List Property Descriptor property if property TAGS PROPERTY return tags allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor TAGS_PROPERTY internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return JAVADOC  ASTNode getNodeType0
AST Node clone0 AST target Javadoc result new Javadoc target result set Source Range this get Start Position this get Length if this ast api Level AST JLS2 result set Comment get Comment result tags add All AST Node copy Subtrees target tags return result  ASTNode setSourceRange getStartPosition getLength apiLevel setComment getComment addAll ASTNode copySubtrees
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Children visitor this tags visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChildren endVisit
Returns the doc comment string including the starting and ending comment delimiters and any embedded line breaks return the doc comment string exception Unsupported Operation Exception if this operation is used in an AST later than JLS2 deprecated The comment string was replaced in the 3 0 release by a representation of the structure of the doc comment See link tags tags public String get Comment supported Only In2 return this comment  UnsupportedOperationException getComment supportedOnlyIn2
Sets or clears the doc comment string The documentation string must include the starting and ending comment delimiters and any embedded line breaks param doc Comment the doc comment string exception Illegal Argument Exception if the Java comment string is invalid exception Unsupported Operation Exception if this operation is used in an AST later than JLS2 deprecated The comment string was replaced in the 3 0 release by a representation of the structure of the doc comment See link tags tags public void set Comment String doc Comment supported Only In2 if doc Comment null throw new Illegal Argument Exception char source doc Comment to Char Array Scanner scanner this ast scanner scanner reset To 0 source length scanner set Source source try int token boolean only One Comment false while token scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens TokenNameCOMMENT JAVADOC if only One Comment throw new Illegal Argument Exception only One Comment true break default only One Comment false if only One Comment throw new Illegal Argument Exception catch Invalid Input Exception e throw new Illegal Argument Exception pre Value Change COMMENT PROPERTY this comment doc Comment post Value Change COMMENT PROPERTY  docComment IllegalArgumentException UnsupportedOperationException setComment docComment supportedOnlyIn2 docComment IllegalArgumentException docComment toCharArray resetTo setSource onlyOneComment getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameCOMMENT_JAVADOC onlyOneComment IllegalArgumentException onlyOneComment onlyOneComment onlyOneComment IllegalArgumentException InvalidInputException IllegalArgumentException preValueChange COMMENT_PROPERTY docComment postValueChange COMMENT_PROPERTY
Returns the live list of tag elements that make up this doc comment p The tag elements cover everything except the starting and ending comment delimiters and generally omit leading whitespace including a leading ast and embedded line breaks The first tag element of a typical doc comment represents all the material before the first explicit doc tag this first tag element has a code null code tag name and generally contains 1 or more link Text Element s and possibly interspersed with tag elements for nested tags like link String String Subsequent tag elements represent successive top level doc tag e g param return see p p Adding and removing nodes from this list affects this node dynamically p return the live list of tag elements in this doc comment element type code Tag Element code since 3 0 public List tags return this tags  TextElement TagElement
int mem Size int size super mem Size 2 4 if this comment MINIMAL DOC COMMENT anything other than the default string takes space size string Size this comment return size  memSize memSize MINIMAL_DOC_COMMENT stringSize
Method declared on AST Node int tree Size return mem Size this tags list Size  ASTNode treeSize memSize listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a labeled statement owned by the given AST By default the statement has an unspecified but legal label and an unspecified but legal statement p N B This constructor is package private p param ast the AST that is to own this node Labeled Statement AST ast super ast  LabeledStatement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property LABEL PROPERTY if get return get Label else set Label Simple Name child return null if property BODY PROPERTY if get return get Body else set Body Statement child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode LABEL_PROPERTY getLabel setLabel SimpleName BODY_PROPERTY getBody setBody internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return LABELED STATEMENT  ASTNode getNodeType0 LABELED_STATEMENT
AST Node clone0 AST target Labeled Statement result new Labeled Statement target result set Source Range this get Start Position this get Length result set Label Simple Name AST Node copy Subtree target get Label result set Body Statement AST Node copy Subtree target get Body return result  ASTNode LabeledStatement LabeledStatement setSourceRange getStartPosition getLength setLabel SimpleName ASTNode copySubtree getLabel setBody ASTNode copySubtree getBody
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Label accept Child visitor get Body visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getLabel acceptChild getBody endVisit
Returns the label of this labeled statement return the variable name node public Simple Name get Label if this label Name null lazy init must be thread safe for readers synchronized this if this label Name null pre Lazy Init this label Name new Simple Name this ast post Lazy Init this label Name LABEL PROPERTY return this label Name  SimpleName getLabel labelName labelName preLazyInit labelName SimpleName postLazyInit labelName LABEL_PROPERTY labelName
Sets the label of this labeled statement param label the new label exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Label Simple Name label if label null throw new Illegal Argument Exception AST Node old Child this label Name pre Replace Child old Child label LABEL PROPERTY this label Name label post Replace Child old Child label LABEL PROPERTY  IllegalArgumentException setLabel SimpleName IllegalArgumentException ASTNode oldChild labelName preReplaceChild oldChild LABEL_PROPERTY labelName postReplaceChild oldChild LABEL_PROPERTY
Returns the body of this labeled statement return the body statement node public Statement get Body if this body null lazy init must be thread safe for readers synchronized this if this body null pre Lazy Init this body new Empty Statement this ast post Lazy Init this body BODY PROPERTY return this body  getBody preLazyInit EmptyStatement postLazyInit BODY_PROPERTY
Sets the body of this labeled statement p Special note The Java language does not allow a local variable declaration to appear as the body of a labeled statement they may only appear within a block However the AST will allow a code Variable Declaration Statement code as the body of a code Labeled Statement code To get something that will compile be sure to embed the code Variable Declaration Statement code inside a code Block code p param statement the body statement node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Body Statement statement if statement null throw new Illegal Argument Exception AST Node old Child this body pre Replace Child old Child statement BODY PROPERTY this body statement post Replace Child old Child statement BODY PROPERTY  VariableDeclarationStatement LabeledStatement VariableDeclarationStatement IllegalArgumentException setBody IllegalArgumentException ASTNode oldChild preReplaceChild oldChild BODY_PROPERTY postReplaceChild oldChild BODY_PROPERTY
Method declared on AST Node int mem Size return super mem Size 2 4  ASTNode memSize memSize
int tree Size return mem Size this label Name null 0 get Label tree Size this body null 0 get Body tree Size  treeSize memSize labelName getLabel treeSize getBody treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new line comment node owned by the given AST p N B This constructor is package private p param ast the AST that is to own this node Line Comment AST ast super ast  LineComment
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
Method declared on AST Node final int get Node Type0 return LINE COMMENT  ASTNode getNodeType0 LINE_COMMENT
AST Node clone0 AST target Line Comment result new Line Comment target result set Source Range this get Start Position this get Length return result  ASTNode LineComment LineComment setSourceRange getStartPosition getLength
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
Method declared on AST Node void accept0 AST Visitor visitor visitor visit this visitor end Visit this  ASTNode ASTVisitor endVisit
Method declared on AST Node int mem Size return super mem Size  ASTNode memSize memSize
Method declared on AST Node int tree Size return mem Size  ASTNode treeSize memSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the AST JLS constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented marker annotation node owned by the given AST By default the annotation has an unspecified type name p N B This constructor is package private p param ast the AST that is to own this node Marker Annotation AST ast super ast unsupported In2  MarkerAnnotation unsupportedIn2
since 3 0 final List internal Structural Properties For Type int api Level return property Descriptors api Level  internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property TYPE NAME PROPERTY if get return get Type Name else set Type Name Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode TYPE_NAME_PROPERTY getTypeName setTypeName internalGetSetChildProperty
Method declared on Body Declaration final Child Property Descriptor internal Type Name Property return TYPE NAME PROPERTY  BodyDeclaration ChildPropertyDescriptor internalTypeNameProperty TYPE_NAME_PROPERTY
Method declared on AST Node final int get Node Type0 return MARKER ANNOTATION  ASTNode getNodeType0 MARKER_ANNOTATION
AST Node clone0 AST target Marker Annotation result new Marker Annotation target result set Source Range this get Start Position this get Length result set Type Name Name AST Node copy Subtree target get Type Name return result  ASTNode MarkerAnnotation MarkerAnnotation setSourceRange getStartPosition getLength setTypeName ASTNode copySubtree getTypeName
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Type Name visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getTypeName endVisit
Method declared on AST Node int mem Size return super mem Size  ASTNode memSize memSize
int tree Size return mem Size this type Name null 0 get Type Name tree Size  treeSize memSize typeName getTypeName treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the AST JLS constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a member reference owned by the given AST By default the method reference is for a member with an unspecified but legal name and no qualifier p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Member Ref AST ast super ast  MemberRef
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property QUALIFIER PROPERTY if get return get Qualifier else set Qualifier Name child return null if property NAME PROPERTY if get return get Name else set Name Simple Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode QUALIFIER_PROPERTY getQualifier setQualifier NAME_PROPERTY getName setName SimpleName internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return MEMBER REF  ASTNode getNodeType0 MEMBER_REF
AST Node clone0 AST target Member Ref result new Member Ref target result set Source Range this get Start Position this get Length result set Qualifier Name AST Node copy Subtree target get Qualifier result set Name Simple Name AST Node copy Subtree target get Name return result  ASTNode MemberRef MemberRef setSourceRange getStartPosition getLength setQualifier ASTNode copySubtree getQualifier setName SimpleName ASTNode copySubtree getName
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Qualifier accept Child visitor get Name visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getQualifier acceptChild getName endVisit
Returns the qualifier of this member reference or code null code if there is none return the qualifier name node or code null code if there is none public Name get Qualifier return this optional Qualifier  getQualifier optionalQualifier
Sets or clears the qualifier of this member reference param name the qualifier name node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Qualifier Name name AST Node old Child this optional Qualifier pre Replace Child old Child name QUALIFIER PROPERTY this optional Qualifier name post Replace Child old Child name QUALIFIER PROPERTY  IllegalArgumentException setQualifier ASTNode oldChild optionalQualifier preReplaceChild oldChild QUALIFIER_PROPERTY optionalQualifier postReplaceChild oldChild QUALIFIER_PROPERTY
Returns the name of the referenced member return the member name node public Simple Name get Name if this member Name null lazy init must be thread safe for readers synchronized this if this member Name null pre Lazy Init this member Name new Simple Name this ast post Lazy Init this member Name NAME PROPERTY return this member Name  SimpleName getName memberName memberName preLazyInit memberName SimpleName postLazyInit memberName NAME_PROPERTY memberName
Sets the name of the referenced member to the given name param name the new member name node exception Illegal Argument Exception if ul li the name is code null code li li the node belongs to a different AST li li the node already has a parent li ul public void set Name Simple Name name if name null throw new Illegal Argument Exception AST Node old Child this member Name pre Replace Child old Child name NAME PROPERTY this member Name name post Replace Child old Child name NAME PROPERTY  IllegalArgumentException setName SimpleName IllegalArgumentException ASTNode oldChild memberName preReplaceChild oldChild NAME_PROPERTY memberName postReplaceChild oldChild NAME_PROPERTY
Resolves and returns the binding for the entity referred to by this member reference p Note that bindings are generally unavailable unless requested when the AST is being built p return the binding or code null code if the binding cannot be resolved public final I Binding resolve Binding return this ast get Binding Resolver resolve Reference this  IBinding resolveBinding getBindingResolver resolveReference
Method declared on AST Node int mem Size return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this optional Qualifier null 0 get Qualifier tree Size this member Name null 0 get Name tree Size  treeSize memSize optionalQualifier getQualifier treeSize memberName getName treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the AST JLS constants return a list of property descriptors element type link Structural Property Descriptor public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a member value pair owned by the given AST By default the node has an unspecified but legal member name and value p N B This constructor is package private p param ast the AST that is to own this node Member Value Pair AST ast super ast unsupported In2  MemberValuePair unsupportedIn2
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property NAME PROPERTY if get return get Name else set Name Simple Name child return null if property VALUE PROPERTY if get return get Value else set Value Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode NAME_PROPERTY getName setName SimpleName VALUE_PROPERTY getValue setValue internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return MEMBER VALUE PAIR  ASTNode getNodeType0 MEMBER_VALUE_PAIR
AST Node clone0 AST target Member Value Pair result new Member Value Pair target result set Source Range this get Start Position this get Length result set Name Simple Name AST Node copy Subtree target get Name result set Value Expression AST Node copy Subtree target get Value return result  ASTNode MemberValuePair MemberValuePair setSourceRange getStartPosition getLength setName SimpleName ASTNode copySubtree getName setValue ASTNode copySubtree getValue
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Name accept Child visitor get Value visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getName acceptChild getValue endVisit
Returns the member name return the member name node public Simple Name get Name if this name null lazy init must be thread safe for readers synchronized this if this name null pre Lazy Init this name new Simple Name this ast post Lazy Init this name NAME PROPERTY return this name  SimpleName getName preLazyInit SimpleName postLazyInit NAME_PROPERTY
Sets the member name param name the member name node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Name Simple Name name if name null throw new Illegal Argument Exception AST Node old Child this name pre Replace Child old Child name NAME PROPERTY this name name post Replace Child old Child name NAME PROPERTY  IllegalArgumentException setName SimpleName IllegalArgumentException ASTNode oldChild preReplaceChild oldChild NAME_PROPERTY postReplaceChild oldChild NAME_PROPERTY
Returns the value expression return the value expression public Expression get Value if this value null lazy init must be thread safe for readers synchronized this if this value null pre Lazy Init this value new Simple Name this ast post Lazy Init this value VALUE PROPERTY return this value  getValue preLazyInit SimpleName postLazyInit VALUE_PROPERTY
Sets the value of this pair param value the new value exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Value Expression value if value null throw new Illegal Argument Exception AST Node old Child this value pre Replace Child old Child value VALUE PROPERTY this value value post Replace Child old Child value VALUE PROPERTY  IllegalArgumentException setValue IllegalArgumentException ASTNode oldChild preReplaceChild oldChild VALUE_PROPERTY postReplaceChild oldChild VALUE_PROPERTY
Method declared on AST Node int mem Size return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this name null 0 get Name tree Size this value null 0 get Value tree Size  treeSize memSize getName treeSize getValue treeSize

Creates a message param message the localized message reported by the compiler param start Position the 0 based character index into the original source file or code 1 code if no source position information is to be recorded for this message throws Illegal Argument Exception if the message is null throws Illegal Argument Exception if the start Position is lower than 1 public Message String message int start Position if message null throw new Illegal Argument Exception if start Position 1 throw new Illegal Argument Exception this message message this start Position start Position this length 0  startPosition IllegalArgumentException IllegalArgumentException startPosition startPosition IllegalArgumentException startPosition IllegalArgumentException startPosition startPosition
Creates a message param message the localized message reported by the compiler param start Position the 0 based character index into the original source file or code 1 code if no source position information is to be recorded for this message param length the length in character of the original source file indicating where the source fragment corresponding to this message ends 0 or a negative number if none A negative number will be converted to a 0 length throws Illegal Argument Exception if the message is null throws Illegal Argument Exception if the start Position is lower than 1 public Message String message int start Position int length if message null throw new Illegal Argument Exception if start Position 1 throw new Illegal Argument Exception this message message this start Position start Position if length 0 this length 0 else this length length  startPosition IllegalArgumentException IllegalArgumentException startPosition startPosition IllegalArgumentException startPosition IllegalArgumentException startPosition startPosition
Returns the localized message return the localized message public String get Message return message  getMessage
Returns the character index into the original source file return the 0 based character index or code 1 code if no source position information is recorded for this message deprecated Use get Start Position instead see get Length public int get Source Position return get Start Position  getStartPosition getLength getSourcePosition getStartPosition
Returns the character index into the original source file return the 0 based character index or code 1 code if no source position information is recorded for this message see get Length public int get Start Position return start Position  getLength getStartPosition startPosition
Returns the length in characters of the original source file indicating where the source fragment corresponding to this message ends return a length or code 0 code if no source length information is recorded for this message see get Start Position public int get Length return length  getStartPosition getLength

private I Type Binding return Type Method Binding Binding Resolver resolver org eclipse jdt internal compiler lookup Method Binding binding this resolver resolver this binding binding  ITypeBinding returnType MethodBinding BindingResolver MethodBinding
see I Method Binding is Constructor public boolean is Constructor return this binding is Constructor  IMethodBinding isConstructor isConstructor isConstructor
public boolean is Default Constructor if this binding declaring Class is Binary Binding return false return this binding modifiers Compiler Modifiers Acc Is Default Constructor 0  isDefaultConstructor declaringClass isBinaryBinding CompilerModifiers AccIsDefaultConstructor
public String get Name if name null if this binding is Constructor name this get Declaring Class get Name else name new String this binding selector return name  getName isConstructor getDeclaringClass getName
public I Type Binding get Declaring Class if this declaring Class null this declaring Class this resolver get Type Binding this binding declaring Class return declaring Class  ITypeBinding getDeclaringClass declaringClass declaringClass getTypeBinding declaringClass declaringClass
public I Type Binding get Parameter Types if this parameter Types null return parameter Types org eclipse jdt internal compiler lookup Type Binding parameters this binding parameters int length parameters length if length 0 return NO TYPE BINDINGS this parameter Types new I Type Binding length for int i 0 i length i this parameter Types i this resolver get Type Binding parameters i return this parameter Types  ITypeBinding getParameterTypes parameterTypes parameterTypes TypeBinding NO_TYPE_BINDINGS parameterTypes ITypeBinding parameterTypes getTypeBinding parameterTypes
public I Type Binding get Return Type if this return Type null this return Type this resolver get Type Binding this binding return Type return this return Type  ITypeBinding getReturnType returnType returnType getTypeBinding returnType returnType
public I Type Binding get Exception Types if this exception Types null return exception Types org eclipse jdt internal compiler lookup Type Binding exceptions this binding thrown Exceptions int length exceptions length if length 0 return NO TYPE BINDINGS this exception Types new I Type Binding length for int i 0 i length i this exception Types i this resolver get Type Binding exceptions i return this exception Types  ITypeBinding getExceptionTypes exceptionTypes exceptionTypes TypeBinding thrownExceptions NO_TYPE_BINDINGS exceptionTypes ITypeBinding exceptionTypes getTypeBinding exceptionTypes
see I Binding get Kind public int get Kind return I Binding METHOD  IBinding getKind getKind IBinding
see I Binding get Modifiers public int get Modifiers return this binding get Access Flags  IBinding getModifiers getModifiers getAccessFlags
see I Binding is Deprecated public boolean is Deprecated return this binding is Deprecated  IBinding isDeprecated isDeprecated isDeprecated
see I Binding is Synthetic public boolean is Synthetic return this binding is Synthetic  IBinding isSynthetic isSynthetic isSynthetic
public String get Key String Buffer buffer new String Buffer buffer append this get Declaring Class get Key buffer append I Type Binding  returnType get Return Type if  returnType null buffer append  returnType get Key if is Constructor buffer append this get Name I Type Binding parameters get Parameter Types buffer append for int i 0 max parameters length i max i I Type Binding parameter parameters i if parameter null buffer append parameter get Key buffer append I Type Binding thrown Exceptions get Exception Types for int i 0 max thrown Exceptions length i max i if thrown Exceptions i null buffer append thrown Exceptions i get Key return buffer to String  getKey StringBuffer StringBuffer getDeclaringClass getKey ITypeBinding _returnType getReturnType _returnType _returnType getKey isConstructor getName ITypeBinding getParameterTypes ITypeBinding getKey ITypeBinding thrownExceptions getExceptionTypes thrownExceptions thrownExceptions thrownExceptions getKey toString
see org eclipse jdt core dom I Type Binding get Type Parameters public I Type Binding get Type Parameters TODO olivier missing implementation of J2SE 1 5 language feature return NO TYPE BINDINGS  ITypeBinding getTypeParameters ITypeBinding getTypeParameters NO_TYPE_BINDINGS
see java lang Object to String public String to String return this binding to String  toString toString toString

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the AST JLS constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new AST node for a method declaration owned by the given AST By default the declaration is for a method of an unspecified but legal name no modifiers no javadoc no type parameters void return type no parameters no array dimensions after the parameters no thrown exceptions and no body as opposed to an empty body p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Method Declaration AST ast super ast if ast api Level AST JLS3 this type Parameters new AST Node Node List TYPE PARAMETERS PROPERTY  MethodDeclaration apiLevel typeParameters ASTNode NodeList TYPE_PARAMETERS_PROPERTY
since 3 0 final List internal Structural Properties For Type int api Level return property Descriptors api Level  internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final int internal Get Set Int Property Simple Property Descriptor property boolean get int value if property MODIFIERS PROPERTY if get return get Modifiers else set Modifiers value return 0 if property EXTRA DIMENSIONS PROPERTY if get return get Extra Dimensions else set Extra Dimensions value return 0 allow default implementation to flag the error return super internal Get Set Int Property property get value  internalGetSetIntProperty SimplePropertyDescriptor MODIFIERS_PROPERTY getModifiers setModifiers EXTRA_DIMENSIONS_PROPERTY getExtraDimensions setExtraDimensions internalGetSetIntProperty
final boolean internal Get Set Boolean Property Simple Property Descriptor property boolean get boolean value if property CONSTRUCTOR PROPERTY if get return is Constructor else set Constructor value return false allow default implementation to flag the error return super internal Get Set Boolean Property property get value  internalGetSetBooleanProperty SimplePropertyDescriptor CONSTRUCTOR_PROPERTY isConstructor setConstructor internalGetSetBooleanProperty
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property JAVADOC PROPERTY if get return get Javadoc else set Javadoc Javadoc child return null if property NAME PROPERTY if get return get Name else set Name Simple Name child return null if property RETURN TYPE PROPERTY if get return get Return Type else set Return Type Type child return null if property RETURN TYPE2 PROPERTY if get return get Return Type2 else set Return Type2 Type child return null if property BODY PROPERTY if get return get Body else set Body Block child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode JAVADOC_PROPERTY getJavadoc setJavadoc NAME_PROPERTY getName setName SimpleName RETURN_TYPE_PROPERTY getReturnType setReturnType RETURN_TYPE2_PROPERTY getReturnType2 setReturnType2 BODY_PROPERTY getBody setBody internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property MODIFIERS2 PROPERTY return modifiers if property TYPE PARAMETERS PROPERTY return type Parameters if property PARAMETERS PROPERTY return parameters if property THROWN EXCEPTIONS PROPERTY return thrown Exceptions allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor MODIFIERS2_PROPERTY TYPE_PARAMETERS_PROPERTY typeParameters PARAMETERS_PROPERTY THROWN_EXCEPTIONS_PROPERTY thrownExceptions internalGetChildListProperty
Method declared on Body Declaration final Child Property Descriptor internal Javadoc Property return JAVADOC PROPERTY  BodyDeclaration ChildPropertyDescriptor internalJavadocProperty JAVADOC_PROPERTY
Method declared on Body Declaration final Child List Property Descriptor internal Modifiers2 Property return MODIFIERS2 PROPERTY  BodyDeclaration ChildListPropertyDescriptor internalModifiers2Property MODIFIERS2_PROPERTY
Method declared on Body Declaration final Simple Property Descriptor internal Modifiers Property return MODIFIERS PROPERTY  BodyDeclaration SimplePropertyDescriptor internalModifiersProperty MODIFIERS_PROPERTY
Method declared on AST Node final int get Node Type0 return METHOD DECLARATION  ASTNode getNodeType0 METHOD_DECLARATION
AST Node clone0 AST target Method Declaration result new Method Declaration target result set Source Range this get Start Position this get Length result set Javadoc Javadoc AST Node copy Subtree target get Javadoc if this ast api Level AST JLS2 result set Modifiers get Modifiers result set Return Type Type AST Node copy Subtree target get Return Type if this ast api Level AST JLS3 result modifiers add All AST Node copy Subtrees target modifiers result type Parameters add All AST Node copy Subtrees target type Parameters result set Return Type2 Type AST Node copy Subtree target get Return Type2 result set Constructor is Constructor result set Extra Dimensions get Extra Dimensions result set Name Simple Name get Name clone target result parameters add All AST Node copy Subtrees target parameters result thrown Exceptions add All AST Node copy Subtrees target thrown Exceptions result set Body Block AST Node copy Subtree target get Body return result  ASTNode MethodDeclaration MethodDeclaration setSourceRange getStartPosition getLength setJavadoc ASTNode copySubtree getJavadoc apiLevel setModifiers getModifiers setReturnType ASTNode copySubtree getReturnType apiLevel addAll ASTNode copySubtrees typeParameters addAll ASTNode copySubtrees typeParameters setReturnType2 ASTNode copySubtree getReturnType2 setConstructor isConstructor setExtraDimensions getExtraDimensions setName SimpleName getName addAll ASTNode copySubtrees thrownExceptions addAll ASTNode copySubtrees thrownExceptions setBody ASTNode copySubtree getBody
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Javadoc if this ast api Level AST JLS2 accept Child visitor get Return Type else accept Children visitor this modifiers accept Children visitor this type Parameters accept Child visitor get Return Type2 n b visit return type even for constructors accept Child visitor get Name accept Children visitor this parameters accept Children visitor this thrown Exceptions accept Child visitor get Body visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getJavadoc apiLevel acceptChild getReturnType acceptChildren acceptChildren typeParameters acceptChild getReturnType2 acceptChild getName acceptChildren acceptChildren thrownExceptions acceptChild getBody endVisit
Returns whether this declaration declares a constructor or a method return code true code if this is a constructor declaration and code false code if this is a method declaration public boolean is Constructor return this is Constructor  isConstructor isConstructor
Sets whether this declaration declares a constructor or a method param is Constructor code true code for a constructor declaration and code false code for a method declaration public void set Constructor boolean is Constructor pre Value Change CONSTRUCTOR PROPERTY this is Constructor is Constructor post Value Change CONSTRUCTOR PROPERTY  isConstructor setConstructor isConstructor preValueChange CONSTRUCTOR_PROPERTY isConstructor isConstructor postValueChange CONSTRUCTOR_PROPERTY
Returns the live ordered list of type parameters of this method declaration added in JLS3 API This list is non empty for parameterized methods p Note that these children are not relevant for constructor declarations although it does still figure in subtree equality comparisons and visits and is devoid of the binding information ordinarily available p p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p return the live list of type parameters element type code Type Parameter code exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public List type Parameters more efficient than just calling unsupported In2 to check if this type Parameters null unsupported In2 return this type Parameters  TypeParameter UnsupportedOperationException typeParameters unsupportedIn2 typeParameters unsupportedIn2 typeParameters
Returns the name of the method declared in this method declaration For a constructor declaration this should be the same as the name of the class return the method name node public Simple Name get Name if this method Name null lazy init must be thread safe for readers synchronized this if this method Name null pre Lazy Init this method Name new Simple Name this ast post Lazy Init this method Name NAME PROPERTY return this method Name  SimpleName getName methodName methodName preLazyInit methodName SimpleName postLazyInit methodName NAME_PROPERTY methodName
Sets the name of the method declared in this method declaration to the given name For a constructor declaration this should be the same as the name of the class param method Name the new method name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Name Simple Name method Name if method Name null throw new Illegal Argument Exception AST Node old Child this method Name pre Replace Child old Child method Name NAME PROPERTY this method Name method Name post Replace Child old Child method Name NAME PROPERTY  methodName IllegalArgumentException setName SimpleName methodName methodName IllegalArgumentException ASTNode oldChild methodName preReplaceChild oldChild methodName NAME_PROPERTY methodName methodName postReplaceChild oldChild methodName NAME_PROPERTY
Returns the live ordered list of method parameter declarations for this method declaration return the live list of method parameter declarations element type code Single Variable Declaration code public List parameters return this parameters  SingleVariableDeclaration
Returns whether this method declaration declares a variable arity method added in JLS3 API The convenience method checks whether the last parameter is so marked p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p return code true code if this is a variable arity method declaration and code false code otherwise exception Unsupported Operation Exception if this operation is used in a JLS2 AST see Single Variable Declaration is Varargs since 3 0 public boolean is Varargs more efficient than just calling unsupported In2 to check if this modifiers null unsupported In2 if parameters is Empty return false else Single Variable Declaration v Single Variable Declaration parameters get parameters size 1 return v is Varargs  UnsupportedOperationException SingleVariableDeclaration isVarargs isVarargs unsupportedIn2 unsupportedIn2 isEmpty SingleVariableDeclaration SingleVariableDeclaration isVarargs
Returns the live ordered list of thrown exception names in this method declaration return the live list of exception names element type code Name code public List thrown Exceptions return this thrown Exceptions  thrownExceptions thrownExceptions
Returns the return type of the method declared in this method declaration exclusive of any extra array dimensions JLS2 API only This is one of the few places where the void type is meaningful p Note that this child is not relevant for constructor declarations although it does still figure in subtree equality comparisons and visits and is devoid of the binding information ordinarily available p return the return type possibly the void primitive type exception Unsupported Operation Exception if this operation is used in an AST later than JLS2 TODO jeem When JLS3 support is complete post 3 0 deprecated In the JLS3 API this method is replaced by code get Return Type2 code which may return code null code public Type get Return Type supported Only In2 if this return Type null lazy init must be thread safe for readers synchronized this if this return Type null pre Lazy Init this return Type this ast new Primitive Type Primitive Type VOID post Lazy Init this return Type RETURN TYPE PROPERTY return this return Type  UnsupportedOperationException getReturnType2 getReturnType supportedOnlyIn2 returnType returnType preLazyInit returnType newPrimitiveType PrimitiveType postLazyInit returnType RETURN_TYPE_PROPERTY returnType
Sets the return type of the method declared in this method declaration to the given type exclusive of any extra array dimensions JLS2 API only This is one of the few places where the void type is meaningful p Note that this child is not relevant for constructor declarations although it does still figure in subtree equality comparisons and visits p param type the new return type possibly the void primitive type exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul exception Unsupported Operation Exception if this operation is used in an AST later than JLS2 TODO jeem When JLS3 support is complete post 3 0 deprecated In the JLS3 API this method is replaced by code set Return Type2 code which accepts code null code public void set Return Type Type type supported Only In2 if type null throw new Illegal Argument Exception AST Node old Child this return Type pre Replace Child old Child type RETURN TYPE PROPERTY this return Type type post Replace Child old Child type RETURN TYPE PROPERTY  IllegalArgumentException UnsupportedOperationException setReturnType2 setReturnType supportedOnlyIn2 IllegalArgumentException ASTNode oldChild returnType preReplaceChild oldChild RETURN_TYPE_PROPERTY returnType postReplaceChild oldChild RETURN_TYPE_PROPERTY
Returns the return type of the method declared in this method declaration exclusive of any extra array dimensions added in JLS3 API This is one of the few places where the void type is meaningful p Note that this child is not relevant for constructor declarations although if present it does still figure in subtree equality comparisons and visits and is devoid of the binding information ordinarily available In the JLS2 API the return type is mandatory In the JLS3 API the return type is optional p return the return type possibly the void primitive type or code null code if none exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Type get Return Type2 unsupported In2 if this return Type null this return Type2 Initialized lazy init must be thread safe for readers synchronized this if this return Type null this return Type2 Initialized pre Lazy Init this return Type this ast new Primitive Type Primitive Type VOID this return Type2 Initialized true post Lazy Init this return Type RETURN TYPE2 PROPERTY return this return Type  UnsupportedOperationException getReturnType2 unsupportedIn2 returnType returnType2Initialized returnType returnType2Initialized preLazyInit returnType newPrimitiveType PrimitiveType returnType2Initialized postLazyInit returnType RETURN_TYPE2_PROPERTY returnType
Sets the return type of the method declared in this method declaration to the given type exclusive of any extra array dimensions added in JLS3 API This is one of the few places where the void type is meaningful p Note that this child is not relevant for constructor declarations although it does still figure in subtree equality comparisons and visits In the JLS2 API the return type is mandatory In the JLS3 API the return type is optional p param type the new return type possibly the void primitive type or code null code if none exception Unsupported Operation Exception if this operation is used in a JLS2 AST exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul since 3 0 public void set Return Type2 Type type unsupported In2 this return Type2 Initialized true AST Node old Child this return Type pre Replace Child old Child type RETURN TYPE2 PROPERTY this return Type type post Replace Child old Child type RETURN TYPE2 PROPERTY  UnsupportedOperationException IllegalArgumentException setReturnType2 unsupportedIn2 returnType2Initialized ASTNode oldChild returnType preReplaceChild oldChild RETURN_TYPE2_PROPERTY returnType postReplaceChild oldChild RETURN_TYPE2_PROPERTY
Returns the number of extra array dimensions over and above the explicitly specified return type p For example code int foo code has a return type of code int code and two extra array dimensions code int foo code has a return type of code int code and zero extra array dimensions The two constructs have different AS Ts even though there are really syntactic variants of the same method declaration p return the number of extra array dimensions since 2 1 public int get Extra Dimensions return this extra Array Dimensions  ASTs getExtraDimensions extraArrayDimensions
Sets the number of extra array dimensions over and above the explicitly specified return type p For example code int foo code is rendered as a return type of code int code with two extra array dimensions code int foo code is rendered as a return type of code int code with zero extra array dimensions The two constructs have different AS Ts even though there are really syntactic variants of the same method declaration p param dimensions the number of array dimensions exception Illegal Argument Exception if the number of dimensions is negative since 2 1 public void set Extra Dimensions int dimensions if dimensions 0 throw new Illegal Argument Exception pre Value Change EXTRA DIMENSIONS PROPERTY this extra Array Dimensions dimensions post Value Change EXTRA DIMENSIONS PROPERTY  ASTs IllegalArgumentException setExtraDimensions IllegalArgumentException preValueChange EXTRA_DIMENSIONS_PROPERTY extraArrayDimensions postValueChange EXTRA_DIMENSIONS_PROPERTY
Returns the body of this method declaration or code null code if this method has b no b body p Note that there is a subtle difference between having no body and having an empty body p return the method body or code null code if this method has no body public Block get Body return this optional Body  getBody optionalBody
Sets or clears the body of this method declaration p Note that there is a subtle difference between having no body as in code void foo code and having an empty body as in void foo Abstract methods and methods declared in interfaces have no body Non abstract methods and all constructors have a body p param body the block node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Body Block body a Method Declaration may occur in a Block must check cycles AST Node old Child this optional Body pre Replace Child old Child body BODY PROPERTY this optional Body body post Replace Child old Child body BODY PROPERTY  IllegalArgumentException setBody MethodDeclaration ASTNode oldChild optionalBody preReplaceChild oldChild BODY_PROPERTY optionalBody postReplaceChild oldChild BODY_PROPERTY
Resolves and returns the binding for the method or constructor declared in this method or constructor declaration p Note that bindings are generally unavailable unless requested when the AST is being built p return the binding or code null code if the binding cannot be resolved public I Method Binding resolve Binding return this ast get Binding Resolver resolve Method this  IMethodBinding resolveBinding getBindingResolver resolveMethod
void append Debug String String Buffer buffer buffer append Method Declaration NON NLS 1 buffer append is Constructor constructor method NON NLS 2 NON NLS 1 buffer append get Name get Identifier buffer append NON NLS 1 for Iterator it parameters iterator it has Next Single Variable Declaration d Single Variable Declaration it next d get Type append Print String buffer if it has Next buffer append NON NLS 1 buffer append NON NLS 1 buffer append NON NLS 1  appendDebugString StringBuffer MethodDeclaration isConstructor getName getIdentifier hasNext SingleVariableDeclaration SingleVariableDeclaration getType appendPrintString hasNext
Method declared on AST Node int mem Size return super mem Size 9 4  ASTNode memSize memSize
int tree Size return mem Size this optional Doc Comment null 0 get Javadoc tree Size this modifiers null 0 this modifiers list Size this type Parameters null 0 this type Parameters list Size this method Name null 0 get Name tree Size this return Type null 0 this return Type tree Size this parameters list Size this thrown Exceptions list Size this optional Body null 0 get Body tree Size  treeSize memSize optionalDocComment getJavadoc treeSize listSize typeParameters typeParameters listSize methodName getName treeSize returnType returnType treeSize listSize thrownExceptions listSize optionalBody getBody treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new AST node for a method invocation expression owned by the given AST By default no expression no type arguments an unspecified but legal method name and an empty list of arguments param ast the AST that is to own this node Method Invocation AST ast super ast if ast api Level AST JLS3 this type Arguments new AST Node Node List TYPE ARGUMENTS PROPERTY  MethodInvocation apiLevel typeArguments ASTNode NodeList TYPE_ARGUMENTS_PROPERTY
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property NAME PROPERTY if get return get Name else set Name Simple Name child return null if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode NAME_PROPERTY getName setName SimpleName EXPRESSION_PROPERTY getExpression setExpression internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property ARGUMENTS PROPERTY return arguments if property TYPE ARGUMENTS PROPERTY return type Arguments allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor ARGUMENTS_PROPERTY TYPE_ARGUMENTS_PROPERTY typeArguments internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return METHOD INVOCATION  ASTNode getNodeType0 METHOD_INVOCATION
AST Node clone0 AST target Method Invocation result new Method Invocation target result set Source Range this get Start Position this get Length result set Name Simple Name get Name clone target result set Expression Expression AST Node copy Subtree target get Expression if this ast api Level AST JLS3 result type Arguments add All AST Node copy Subtrees target type Arguments result arguments add All AST Node copy Subtrees target arguments return result  ASTNode MethodInvocation MethodInvocation setSourceRange getStartPosition getLength setName SimpleName getName setExpression ASTNode copySubtree getExpression apiLevel typeArguments addAll ASTNode copySubtrees typeArguments addAll ASTNode copySubtrees
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Expression if this ast api Level AST JLS3 accept Children visitor this type Arguments accept Child visitor get Name accept Children visitor this arguments visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getExpression apiLevel acceptChildren typeArguments acceptChild getName acceptChildren endVisit
Returns the expression of this method invocation expression or code null code if there is none return the expression node or code null code if there is none public Expression get Expression return this optional Expression  getExpression optionalExpression
Sets or clears the expression of this method invocation expression param expression the expression node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression AST Node old Child this optional Expression pre Replace Child old Child expression EXPRESSION PROPERTY this optional Expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression ASTNode oldChild optionalExpression preReplaceChild oldChild EXPRESSION_PROPERTY optionalExpression postReplaceChild oldChild EXPRESSION_PROPERTY
Returns the live ordered list of type arguments of this method invocation added in JLS3 API p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p return the live list of type arguments element type code Type code exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public List type Arguments more efficient than just calling unsupported In2 to check if this type Arguments null unsupported In2 return this type Arguments  UnsupportedOperationException typeArguments unsupportedIn2 typeArguments unsupportedIn2 typeArguments
Returns the name of the method invoked in this expression return the method name node public Simple Name get Name if this method Name null lazy init must be thread safe for readers synchronized this if this method Name null pre Lazy Init this method Name new Simple Name this ast post Lazy Init this method Name NAME PROPERTY return this method Name  SimpleName getName methodName methodName preLazyInit methodName SimpleName postLazyInit methodName NAME_PROPERTY methodName
Sets the name of the method invoked in this expression to the given name param name the new method name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Name Simple Name name if name null throw new Illegal Argument Exception AST Node old Child this method Name pre Replace Child old Child name NAME PROPERTY this method Name name post Replace Child old Child name NAME PROPERTY  IllegalArgumentException setName SimpleName IllegalArgumentException ASTNode oldChild methodName preReplaceChild oldChild NAME_PROPERTY methodName postReplaceChild oldChild NAME_PROPERTY
Returns the live ordered list of argument expressions in this method invocation expression return the live list of argument expressions element type code Expression code public List arguments return this arguments 
Resolves and returns the binding for the method invoked by this expression p Note that bindings are generally unavailable unless requested when the AST is being built p return the method binding or code null code if the binding cannot be resolved since 2 1 public I Method Binding resolve Method Binding return this ast get Binding Resolver resolve Method this  IMethodBinding resolveMethodBinding getBindingResolver resolveMethod
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 4 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this optional Expression null 0 get Expression tree Size this type Arguments null 0 this type Arguments list Size this method Name null 0 get Name tree Size this arguments null 0 this arguments list Size  treeSize memSize optionalExpression getExpression treeSize typeArguments typeArguments listSize methodName getName treeSize listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the AST JLS constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a method reference owned by the given AST By default the method reference is for a method with an unspecified but legal name no qualifier and an empty parameter list p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Method Ref AST ast super ast  MethodRef
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property QUALIFIER PROPERTY if get return get Qualifier else set Qualifier Name child return null if property NAME PROPERTY if get return get Name else set Name Simple Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode QUALIFIER_PROPERTY getQualifier setQualifier NAME_PROPERTY getName setName SimpleName internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property PARAMETERS PROPERTY return parameters allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor PARAMETERS_PROPERTY internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return METHOD REF  ASTNode getNodeType0 METHOD_REF
AST Node clone0 AST target Method Ref result new Method Ref target result set Source Range this get Start Position this get Length result set Qualifier Name AST Node copy Subtree target get Qualifier result set Name Simple Name AST Node copy Subtree target get Name result parameters add All AST Node copy Subtrees target parameters return result  ASTNode MethodRef MethodRef setSourceRange getStartPosition getLength setQualifier ASTNode copySubtree getQualifier setName SimpleName ASTNode copySubtree getName addAll ASTNode copySubtrees
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Qualifier accept Child visitor get Name accept Children visitor this parameters visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getQualifier acceptChild getName acceptChildren endVisit
Returns the qualifier of this method reference or code null code if there is none return the qualifier name node or code null code if there is none public Name get Qualifier return this optional Qualifier  getQualifier optionalQualifier
Sets or clears the qualifier of this method reference param name the qualifier name node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Qualifier Name name AST Node old Child this optional Qualifier pre Replace Child old Child name QUALIFIER PROPERTY this optional Qualifier name post Replace Child old Child name QUALIFIER PROPERTY  IllegalArgumentException setQualifier ASTNode oldChild optionalQualifier preReplaceChild oldChild QUALIFIER_PROPERTY optionalQualifier postReplaceChild oldChild QUALIFIER_PROPERTY
Returns the name of the referenced method or constructor return the method or constructor name node public Simple Name get Name if this method Name null lazy init must be thread safe for readers synchronized this if this method Name null pre Lazy Init this method Name new Simple Name this ast post Lazy Init this method Name NAME PROPERTY return this method Name  SimpleName getName methodName methodName preLazyInit methodName SimpleName postLazyInit methodName NAME_PROPERTY methodName
Sets the name of the referenced method or constructor to the given name param name the new method or constructor name node exception Illegal Argument Exception if ul li the name is code null code li li the node belongs to a different AST li li the node already has a parent li ul public void set Name Simple Name name if name null throw new Illegal Argument Exception AST Node old Child this method Name pre Replace Child old Child name NAME PROPERTY this method Name name post Replace Child old Child name NAME PROPERTY  IllegalArgumentException setName SimpleName IllegalArgumentException ASTNode oldChild methodName preReplaceChild oldChild NAME_PROPERTY methodName postReplaceChild oldChild NAME_PROPERTY
Returns the live ordered list of method parameter references for this method reference return the live list of method parameter references element type code Method Ref Parameter code public List parameters return this parameters  MethodRefParameter
Resolves and returns the binding for the entity referred to by this method reference p Note that bindings are generally unavailable unless requested when the AST is being built p return the binding or code null code if the binding cannot be resolved public final I Binding resolve Binding return this ast get Binding Resolver resolve Reference this  IBinding resolveBinding getBindingResolver resolveReference
Method declared on AST Node int mem Size return BASE NODE SIZE 3 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this optional Qualifier null 0 get Qualifier tree Size this method Name null 0 get Name tree Size this parameters list Size  treeSize memSize optionalQualifier getQualifier treeSize methodName getName treeSize listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the AST JLS constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a method referenece parameter owned by the given AST By default the node has an unspecified but legal type and no parameter name p N B This constructor is package private p param ast the AST that is to own this node Method Ref Parameter AST ast super ast  MethodRefParameter
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property TYPE PROPERTY if get return get Type else set Type Type child return null if property NAME PROPERTY if get return get Name else set Name Simple Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode TYPE_PROPERTY getType setType NAME_PROPERTY getName setName SimpleName internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return METHOD REF PARAMETER  ASTNode getNodeType0 METHOD_REF_PARAMETER
AST Node clone0 AST target Method Ref Parameter result new Method Ref Parameter target result set Source Range this get Start Position this get Length result set Type Type AST Node copy Subtree target get Type result set Name Simple Name AST Node copy Subtree target get Name return result  ASTNode MethodRefParameter MethodRefParameter setSourceRange getStartPosition getLength setType ASTNode copySubtree getType setName SimpleName ASTNode copySubtree getName
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Type accept Child visitor get Name visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getType acceptChild getName endVisit
Returns the paramter type return the parameter type public Type get Type if this type null lazy init must be thread safe for readers synchronized this if this type null pre Lazy Init this type this ast new Primitive Type Primitive Type INT post Lazy Init this type TYPE PROPERTY return this type  getType preLazyInit newPrimitiveType PrimitiveType postLazyInit TYPE_PROPERTY
Sets the paramter type to the given type param type the new type exception Illegal Argument Exception if ul li the type is code null code li li the node belongs to a different AST li li the node already has a parent li ul public void set Type Type type if type null throw new Illegal Argument Exception AST Node old Child this type pre Replace Child old Child type TYPE PROPERTY this type type post Replace Child old Child type TYPE PROPERTY  IllegalArgumentException setType IllegalArgumentException ASTNode oldChild preReplaceChild oldChild TYPE_PROPERTY postReplaceChild oldChild TYPE_PROPERTY
Returns the parameter name or code null code if there is none return the parameter name node or code null code if there is none public Simple Name get Name return this optional Parameter Name  SimpleName getName optionalParameterName
Sets or clears the parameter name param name the parameter name node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Name Simple Name name AST Node old Child this optional Parameter Name pre Replace Child old Child name NAME PROPERTY this optional Parameter Name name post Replace Child old Child name NAME PROPERTY  IllegalArgumentException setName SimpleName ASTNode oldChild optionalParameterName preReplaceChild oldChild NAME_PROPERTY optionalParameterName postReplaceChild oldChild NAME_PROPERTY
Method declared on AST Node int mem Size return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this type null 0 get Type tree Size this optional Parameter Name null 0 get Name tree Size  treeSize memSize getType treeSize optionalParameterName getName treeSize

Returns whether the given flags includes the public modifier Applicable to types methods constructors and fields param flags the modifier flags return code true code if the code PUBLIC code bit is set and code false code otherwise since 2 0 public static boolean is Public int flags return flags PUBLIC 0  isPublic
Returns whether the given flags includes the private modifier Applicable to types methods constructors and fields param flags the modifier flags return code true code if the code PRIVATE code bit is set and code false code otherwise since 2 0 public static boolean is Private int flags return flags PRIVATE 0  isPrivate
Returns whether the given flags includes the protected modifier Applicable to types methods constructors and fields param flags the modifier flags return code true code if the code PROTECTED code bit is set and code false code otherwise since 2 0 public static boolean is Protected int flags return flags PROTECTED 0  isProtected
Returns whether the given flags includes the static modifier Applicable to types methods fields and initializers param flags the modifier flags return code true code if the code STATIC code bit is set and code false code otherwise since 2 0 public static boolean is Static int flags return flags STATIC 0  isStatic
Returns whether the given flags includes the final modifier Applicable to types methods fields and variables param flags the modifier flags return code true code if the code FINAL code bit is set and code false code otherwise since 2 0 public static boolean is Final int flags return flags FINAL 0  isFinal
Returns whether the given flags includes the synchronized modifier Applicable only to methods param flags the modifier flags return code true code if the code SYNCHRONIZED code bit is set and code false code otherwise since 2 0 public static boolean is Synchronized int flags return flags SYNCHRONIZED 0  isSynchronized
Returns whether the given flags includes the volatile modifier Applicable only to fields param flags the modifier flags return code true code if the code VOLATILE code bit is set and code false code otherwise since 2 0 public static boolean is Volatile int flags return flags VOLATILE 0  isVolatile
Returns whether the given flags includes the transient modifier Applicable only to fields param flags the modifier flags return code true code if the code TRANSIENT code bit is set and code false code otherwise since 2 0 public static boolean is Transient int flags return flags TRANSIENT 0  isTransient
Returns whether the given flags includes the native modifier Applicable only to methods param flags the modifier flags return code true code if the code NATIVE code bit is set and code false code otherwise since 2 0 public static boolean is Native int flags return flags NATIVE 0  isNative
Returns whether the given flags includes the abstract modifier Applicable to types and methods param flags the modifier flags return code true code if the code ABSTRACT code bit is set and code false code otherwise since 2 0 public static boolean is Abstract int flags return flags ABSTRACT 0  isAbstract
Returns whether the given flags includes the strictfp modifier Applicable to types and methods param flags the modifier flags return code true code if the code STRICTFP code bit is set and code false code otherwise since 2 0 public static boolean is Strictfp int flags return flags STRICTFP 0  isStrictfp
Creates a new modifier with the given keyword p Note this constructor is private The only instances ever created are the ones for the standard modifiers p param keyword the character sequence for the modifier param flag Value flag value as described in the Java Virtual Machine Specification private Modifier Keyword String keyword int flag Value this keyword keyword this flag Value flag Value  flagValue ModifierKeyword flagValue flagValue flagValue
Returns the keyword for the modifier return the keyword for the modifier see to Keyword String public String to String return this keyword  toKeyword toString
Returns the modifier corresponding to the given string or code null code if none p code to Keyword code is the converse of code to String code that is code Modifier Kind to Keyword k to String k code for all modifier keywords code k code p param keyword the lowercase string name for the modifier return the modifier keyword or code null code if none see to String public static Modifier Keyword to Keyword String keyword return Modifier Keyword KEYWORDS get keyword  toKeyword toString ModifierKind toKeyword toString toString ModifierKeyword toKeyword ModifierKeyword
Returns the modifier flag value corresponding to this modifier keyword These flag values are as described in the Java Virtual Machine Specification return one of the code Modifier code constants see from Flag Value int public int to Flag Value return this flag Value  fromFlagValue toFlagValue flagValue
Returns the modifier corresponding to the given single bit flag value or code null code if none or if more than one bit is set p code from Flag Value code is the converse of code to Flag Value code that is code Modifier Kind from Flag Value k to Flag Value k code for all modifier keywords code k code p param flag Value the single bit flag value for the modifier return the modifier keyword or code null code if none see to Flag Value public static Modifier Keyword from Flag Value int flag Value for Iterator it KEYWORDS values iterator it has Next Modifier Keyword k Modifier Keyword it next if k to Flag Value flag Value return k return null  fromFlagValue toFlagValue ModifierKind fromFlagValue toFlagValue flagValue toFlagValue ModifierKeyword fromFlagValue flagValue hasNext ModifierKeyword ModifierKeyword toFlagValue flagValue
Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented modifier node owned by the given AST By default the node has unspecified but legal modifier p N B This constructor is package private p param ast the AST that is to own this node since 3 0 Modifier AST ast super ast unsupported In2  unsupportedIn2
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final Object internal Get Set Object Property Simple Property Descriptor property boolean get Object value if property KEYWORD PROPERTY if get return get Keyword else set Keyword Modifier Keyword value return null allow default implementation to flag the error return super internal Get Set Object Property property get value  internalGetSetObjectProperty SimplePropertyDescriptor KEYWORD_PROPERTY getKeyword setKeyword ModifierKeyword internalGetSetObjectProperty
since 3 0 final int get Node Type0 return MODIFIER  getNodeType0
see I Extended Modifier is Modifier public boolean is Modifier return true  IExtendedModifier isModifier isModifier
see I Extended Modifier is Annotation public boolean is Annotation return false  IExtendedModifier isAnnotation isAnnotation
AST Node clone0 AST target Modifier result new Modifier target result set Source Range this get Start Position this get Length result set Keyword get Keyword return result  ASTNode setSourceRange getStartPosition getLength setKeyword getKeyword
since 3 0 final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  subtreeMatch0 ASTMatcher
since 3 0 void accept0 AST Visitor visitor visitor visit this visitor end Visit this  ASTVisitor endVisit
Returns the modifier keyword of this modifier node return the modifier keyword since 3 0 public Modifier Keyword get Keyword return this modifier Keyword  ModifierKeyword getKeyword modifierKeyword
Sets the modifier keyword of this modifier node param modifier Keyord the modifier keyword exception Illegal Argument Exception if the argument is code null code since 3 0 public void set Keyword Modifier Keyword modifier Keyord if modifier Keyord null throw new Illegal Argument Exception pre Value Change KEYWORD PROPERTY this modifier Keyword modifier Keyord post Value Change KEYWORD PROPERTY  modifierKeyord IllegalArgumentException setKeyword ModifierKeyword modifierKeyord modifierKeyord IllegalArgumentException preValueChange KEYWORD_PROPERTY modifierKeyword modifierKeyord postValueChange KEYWORD_PROPERTY
since 3 0 int mem Size treat Modifier Keyword as free return BASE NODE SIZE 1 4  memSize ModifierKeyword BASE_NODE_SIZE
since 3 0 int tree Size return mem Size  treeSize memSize

Creates a new AST printer NaiveAST Flattener this buffer new String Buffer  NaiveASTFlattener StringBuffer
Returns the string accumulated in the visit return the serialized public String get Result return this buffer to String  getResult toString
Resets this printer so that it can be used again public void reset this buffer set Length 0  setLength
Appends the text representation of the given modifier flags followed by a single space Used for 3 0 modifiers and annotations param ext the list of modifier and annotation nodes element type code I Extended Modifiers code void print Modifiers List ext for Iterator it ext iterator it has Next AST Node p AST Node it next p accept this this buffer append NON NLS 1  IExtendedModifiers printModifiers hasNext ASTNode ASTNode
Appends the text representation of the given modifier flags followed by a single space Used for JLS2 modifiers param modifiers the modifier flags void print Modifiers int modifiers if Modifier is Public modifiers this buffer append public NON NLS 1 if Modifier is Protected modifiers this buffer append protected NON NLS 1 if Modifier is Private modifiers this buffer append private NON NLS 1 if Modifier is Static modifiers this buffer append static NON NLS 1 if Modifier is Abstract modifiers this buffer append abstract NON NLS 1 if Modifier is Final modifiers this buffer append final NON NLS 1 if Modifier is Synchronized modifiers this buffer append synchronized NON NLS 1 if Modifier is Volatile modifiers this buffer append volatile NON NLS 1 if Modifier is Native modifiers this buffer append native NON NLS 1 if Modifier is Strictfp modifiers this buffer append strictfp NON NLS 1 if Modifier is Transient modifiers this buffer append transient NON NLS 1  printModifiers isPublic isProtected isPrivate isStatic isAbstract isFinal isSynchronized isVolatile isNative isStrictfp isTransient
public boolean visit Annotation Type Declaration node if node get Javadoc null node get Javadoc accept this print Modifiers node modifiers this buffer append interface NON NLS 1 node get Name accept this this buffer append NON NLS 1 for Iterator it node body Declarations iterator it has Next Body Declaration d Body Declaration it next d accept this this buffer append NON NLS 1 return false  AnnotationTypeDeclaration getJavadoc getJavadoc printModifiers getName bodyDeclarations hasNext BodyDeclaration BodyDeclaration
public boolean visit Annotation Type Member Declaration node if node get Javadoc null node get Javadoc accept this print Modifiers node modifiers node get Type accept this this buffer append NON NLS 1 node get Name accept this this buffer append NON NLS 1 if node get Default null this buffer append default NON NLS 1 node get Default accept this this buffer append NON NLS 1 return false  AnnotationTypeMemberDeclaration getJavadoc getJavadoc printModifiers getType getName getDefault getDefault
public boolean visit Anonymous Class Declaration node this buffer append NON NLS 1 for Iterator it node body Declarations iterator it has Next Body Declaration b Body Declaration it next b accept this this buffer append NON NLS 1 return false  AnonymousClassDeclaration bodyDeclarations hasNext BodyDeclaration BodyDeclaration
public boolean visit Array Access node node get Array accept this this buffer append NON NLS 1 node get Index accept this this buffer append NON NLS 1 return false  ArrayAccess getArray getIndex
public boolean visit Array Creation node this buffer append new NON NLS 1 Array Type at node get Type int dims at get Dimensions Type element Type at get Element Type element Type accept this for Iterator it node dimensions iterator it has Next this buffer append NON NLS 1 Expression e Expression it next e accept this this buffer append NON NLS 1 dims add empty for each extra array dimension for int i 0 i dims i this buffer append NON NLS 1 if node get Initializer null node get Initializer accept this return false  ArrayCreation ArrayType getType getDimensions elementType getElementType elementType hasNext getInitializer getInitializer
public boolean visit Array Initializer node this buffer append NON NLS 1 for Iterator it node expressions iterator it has Next Expression e Expression it next e accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 return false  ArrayInitializer hasNext hasNext
public boolean visit Array Type node node get Component Type accept this this buffer append NON NLS 1 return false  ArrayType getComponentType
public boolean visit Assert Statement node this buffer append assert NON NLS 1 node get Expression accept this if node get Message null this buffer append NON NLS 1 node get Message accept this this buffer append NON NLS 1 return false  AssertStatement getExpression getMessage getMessage
public boolean visit Assignment node node get Left Hand Side accept this this buffer append node get Operator to String node get Right Hand Side accept this return false  getLeftHandSide getOperator toString getRightHandSide
public boolean visit Block node this buffer append NON NLS 1 for Iterator it node statements iterator it has Next Statement s Statement it next s accept this this buffer append NON NLS 1 return false  hasNext
since 3 0 public boolean visit Block Comment node this buffer append NON NLS 1 return false  BlockComment
public boolean visit Boolean Literal node if node boolean Value true this buffer append true NON NLS 1 else this buffer append false NON NLS 1 return false  BooleanLiteral booleanValue
public boolean visit Break Statement node this buffer append break NON NLS 1 if node get Label null this buffer append NON NLS 1 node get Label accept this this buffer append NON NLS 1 return false  BreakStatement getLabel getLabel
public boolean visit Cast Expression node this buffer append NON NLS 1 node get Type accept this this buffer append NON NLS 1 node get Expression accept this return false  CastExpression getType getExpression
public boolean visit Catch Clause node this buffer append catch NON NLS 1 node get Exception accept this this buffer append NON NLS 1 node get Body accept this return false  CatchClause getException getBody
see AST Visitor visit Character Literal public boolean visit Character Literal node this buffer append node get Escaped Value return false  ASTVisitor CharacterLiteral CharacterLiteral getEscapedValue
public boolean visit Class Instance Creation node if node get Expression null node get Expression accept this this buffer append NON NLS 1 this buffer append new NON NLS 1 if node getAST api Level AST JLS2 node get Name accept this if node getAST api Level AST JLS3 if node type Arguments is Empty this buffer append NON NLS 1 for Iterator it node type Arguments iterator it has Next Type t Type it next t accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 node get Type accept this this buffer append NON NLS 1 for Iterator it node arguments iterator it has Next Expression e Expression it next e accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 if node get Anonymous Class Declaration null node get Anonymous Class Declaration accept this return false  ClassInstanceCreation getExpression getExpression apiLevel getName apiLevel typeArguments isEmpty typeArguments hasNext hasNext getType hasNext hasNext getAnonymousClassDeclaration getAnonymousClassDeclaration
public boolean visit Compilation Unit node if node get Package null node get Package accept this for Iterator it node imports iterator it has Next Import Declaration d Import Declaration it next d accept this for Iterator it node types iterator it has Next Abstract Type Declaration d Abstract Type Declaration it next d accept this return false  CompilationUnit getPackage getPackage hasNext ImportDeclaration ImportDeclaration hasNext AbstractTypeDeclaration AbstractTypeDeclaration
public boolean visit Conditional Expression node node get Expression accept this this buffer append NON NLS 1 node get Then Expression accept this this buffer append NON NLS 1 node get Else Expression accept this return false  ConditionalExpression getExpression getThenExpression getElseExpression
public boolean visit Constructor Invocation node if node getAST api Level AST JLS3 if node type Arguments is Empty this buffer append NON NLS 1 for Iterator it node type Arguments iterator it has Next Type t Type it next t accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 this buffer append this NON NLS 1 for Iterator it node arguments iterator it has Next Expression e Expression it next e accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 return false  ConstructorInvocation apiLevel typeArguments isEmpty typeArguments hasNext hasNext hasNext hasNext
public boolean visit Continue Statement node this buffer append continue NON NLS 1 if node get Label null this buffer append NON NLS 1 node get Label accept this this buffer append NON NLS 1 return false  ContinueStatement getLabel getLabel
public boolean visit Do Statement node this buffer append do NON NLS 1 node get Body accept this this buffer append while NON NLS 1 node get Expression accept this this buffer append NON NLS 1 return false  DoStatement getBody getExpression
see AST Visitor visit Empty Statement public boolean visit Empty Statement node this buffer append NON NLS 1 return false  ASTVisitor EmptyStatement EmptyStatement
public boolean visit Enhanced For Statement node this buffer append for NON NLS 1 node get Parameter accept this this buffer append NON NLS 1 node get Expression accept this this buffer append NON NLS 1 node get Body accept this return false  EnhancedForStatement getParameter getExpression getBody
public boolean visit Enum Constant Declaration node if node get Javadoc null node get Javadoc accept this print Modifiers node modifiers node get Name accept this if node arguments is Empty this buffer append NON NLS 1 for Iterator it node arguments iterator it has Next Expression e Expression it next e accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 if node body Declarations is Empty this buffer append NON NLS 1 for Iterator it node body Declarations iterator it has Next Body Declaration d Body Declaration it next d accept this this buffer append NON NLS 1 return false  EnumConstantDeclaration getJavadoc getJavadoc printModifiers getName isEmpty hasNext hasNext bodyDeclarations isEmpty bodyDeclarations hasNext BodyDeclaration BodyDeclaration
public boolean visit Enum Declaration node if node get Javadoc null node get Javadoc accept this print Modifiers node modifiers this buffer append enum NON NLS 1 node get Name accept this this buffer append NON NLS 1 if node super Interface Types is Empty this buffer append implements NON NLS 1 for Iterator it node super Interface Types iterator it has Next Type t Type it next t accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 this buffer append NON NLS 1 Body Declaration prev null for Iterator it node body Declarations iterator it has Next Body Declaration d Body Declaration it next if prev instanceof Enum Constant Declaration enum constant declarations do not include punctuation if d instanceof Enum Constant Declaration enum constant declarations are separated by commas this buffer append NON NLS 1 else semicolon separates last enum constant declaration from first class body declarations this buffer append NON NLS 1 d accept this this buffer append NON NLS 1 return false  EnumDeclaration getJavadoc getJavadoc printModifiers getName superInterfaceTypes isEmpty superInterfaceTypes hasNext hasNext BodyDeclaration bodyDeclarations hasNext BodyDeclaration BodyDeclaration EnumConstantDeclaration EnumConstantDeclaration
public boolean visit Expression Statement node node get Expression accept this this buffer append NON NLS 1 return false  ExpressionStatement getExpression
public boolean visit Field Access node node get Expression accept this this buffer append NON NLS 1 node get Name accept this return false  FieldAccess getExpression getName
public boolean visit Field Declaration node if node get Javadoc null node get Javadoc accept this if node getAST api Level AST JLS2 print Modifiers node get Modifiers if node getAST api Level AST JLS3 print Modifiers node modifiers node get Type accept this this buffer append NON NLS 1 for Iterator it node fragments iterator it has Next Variable Declaration Fragment f Variable Declaration Fragment it next f accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 return false  FieldDeclaration getJavadoc getJavadoc apiLevel printModifiers getModifiers apiLevel printModifiers getType hasNext VariableDeclarationFragment VariableDeclarationFragment hasNext
public boolean visit For Statement node this buffer append for NON NLS 1 for Iterator it node initializers iterator it has Next Expression e Expression it next e accept this this buffer append NON NLS 1 if node get Expression null node get Expression accept this this buffer append NON NLS 1 for Iterator it node updaters iterator it has Next Expression e Expression it next e accept this this buffer append NON NLS 1 node get Body accept this return false  ForStatement hasNext getExpression getExpression hasNext getBody
public boolean visit If Statement node this buffer append if NON NLS 1 node get Expression accept this this buffer append NON NLS 1 node get Then Statement accept this if node get Else Statement null this buffer append else NON NLS 1 node get Else Statement accept this return false  IfStatement getExpression getThenStatement getElseStatement getElseStatement
public boolean visit Import Declaration node this buffer append import NON NLS 1 if node getAST api Level AST JLS3 if node is Static this buffer append static NON NLS 1 node get Name accept this if node is On Demand this buffer append NON NLS 1 this buffer append NON NLS 1 return false  ImportDeclaration apiLevel isStatic getName isOnDemand
public boolean visit Infix Expression node node get Left Operand accept this this buffer append for cases like x i 1 or x i i this buffer append node get Operator to String this buffer append node get Right Operand accept this for Iterator it node extended Operands iterator it has Next this buffer append node get Operator to String Expression e Expression it next e accept this return false  InfixExpression getLeftOperand getOperator toString getRightOperand extendedOperands hasNext getOperator toString
public boolean visit Instanceof Expression node node get Left Operand accept this this buffer append instanceof NON NLS 1 node get Right Operand accept this return false  InstanceofExpression getLeftOperand getRightOperand
public boolean visit Initializer node if node get Javadoc null node get Javadoc accept this if node getAST api Level AST JLS2 print Modifiers node get Modifiers if node getAST api Level AST JLS3 print Modifiers node modifiers node get Body accept this return false  getJavadoc getJavadoc apiLevel printModifiers getModifiers apiLevel printModifiers getBody
public boolean visit Javadoc node this buffer append NON NLS 1 for Iterator it node tags iterator it has Next AST Node e AST Node it next e accept this this buffer append n NON NLS 1 return false  hasNext ASTNode ASTNode
public boolean visit Labeled Statement node node get Label accept this this buffer append NON NLS 1 node get Body accept this return false  LabeledStatement getLabel getBody
since 3 0 public boolean visit Line Comment node this buffer append n NON NLS 1 return false  LineComment
public boolean visit Marker Annotation node this buffer append NON NLS 1 node get Type Name accept this return false  MarkerAnnotation getTypeName
public boolean visit Member Ref node if node get Qualifier null node get Qualifier accept this this buffer append NON NLS 1 node get Name accept this return false  MemberRef getQualifier getQualifier getName
public boolean visit Member Value Pair node node get Name accept this this buffer append NON NLS 1 node get Value accept this return false  MemberValuePair getName getValue
public boolean visit Method Ref node if node get Qualifier null node get Qualifier accept this this buffer append NON NLS 1 node get Name accept this this buffer append NON NLS 1 for Iterator it node parameters iterator it has Next Method Ref Parameter e Method Ref Parameter it next e accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 return false  MethodRef getQualifier getQualifier getName hasNext MethodRefParameter MethodRefParameter hasNext
public boolean visit Method Ref Parameter node node get Type accept this if node get Name null this buffer append NON NLS 1 node get Name accept this return false  MethodRefParameter getType getName getName
public boolean visit Method Declaration node if node get Javadoc null node get Javadoc accept this if node getAST api Level AST JLS2 print Modifiers node get Modifiers if node getAST api Level AST JLS3 print Modifiers node modifiers if node type Parameters is Empty this buffer append NON NLS 1 for Iterator it node type Parameters iterator it has Next Type Parameter t Type Parameter it next t accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 if node is Constructor if node getAST api Level AST JLS2 node get Return Type accept this else if node get Return Type2 null node get Return Type2 accept this else methods really ought to have a return type this buffer append void NON NLS 1 this buffer append NON NLS 1 node get Name accept this this buffer append NON NLS 1 for Iterator it node parameters iterator it has Next Single Variable Declaration v Single Variable Declaration it next v accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 for int i 0 i node get Extra Dimensions i this buffer append NON NLS 1 if node thrown Exceptions is Empty this buffer append throws NON NLS 1 for Iterator it node thrown Exceptions iterator it has Next Name n Name it next n accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 if node get Body null this buffer append NON NLS 1 else node get Body accept this return false  MethodDeclaration getJavadoc getJavadoc apiLevel printModifiers getModifiers apiLevel printModifiers typeParameters isEmpty typeParameters hasNext TypeParameter TypeParameter hasNext isConstructor apiLevel getReturnType getReturnType2 getReturnType2 getName hasNext SingleVariableDeclaration SingleVariableDeclaration hasNext getExtraDimensions thrownExceptions isEmpty thrownExceptions hasNext hasNext getBody getBody
public boolean visit Method Invocation node if node get Expression null node get Expression accept this this buffer append NON NLS 1 if node getAST api Level AST JLS3 if node type Arguments is Empty this buffer append NON NLS 1 for Iterator it node type Arguments iterator it has Next Type t Type it next t accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 node get Name accept this this buffer append NON NLS 1 for Iterator it node arguments iterator it has Next Expression e Expression it next e accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 return false  MethodInvocation getExpression getExpression apiLevel typeArguments isEmpty typeArguments hasNext hasNext getName hasNext hasNext
since 3 0 public boolean visit Modifier node this buffer append node get Keyword to String return false  getKeyword toString
public boolean visit Normal Annotation node this buffer append NON NLS 1 node get Type Name accept this this buffer append NON NLS 1 for Iterator it node values iterator it has Next Member Value Pair p Member Value Pair it next p accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 return false  NormalAnnotation getTypeName hasNext MemberValuePair MemberValuePair hasNext
see AST Visitor visit Null Literal public boolean visit Null Literal node this buffer append null NON NLS 1 return false  ASTVisitor NullLiteral NullLiteral
see AST Visitor visit Number Literal public boolean visit Number Literal node this buffer append node get Token return false  ASTVisitor NumberLiteral NumberLiteral getToken
public boolean visit Package Declaration node if node getAST api Level AST JLS3 if node get Javadoc null node get Javadoc accept this for Iterator it node annotations iterator it has Next Annotation p Annotation it next p accept this this buffer append NON NLS 1 this buffer append package NON NLS 1 node get Name accept this this buffer append NON NLS 1 return false  PackageDeclaration apiLevel getJavadoc getJavadoc hasNext getName
public boolean visit Parameterized Type node node get Type accept this this buffer append NON NLS 1 for Iterator it node type Arguments iterator it has Next Type t Type it next t accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 return false  ParameterizedType getType typeArguments hasNext hasNext
public boolean visit Parenthesized Expression node this buffer append NON NLS 1 node get Expression accept this this buffer append NON NLS 1 return false  ParenthesizedExpression getExpression
public boolean visit Postfix Expression node node get Operand accept this this buffer append node get Operator to String return false  PostfixExpression getOperand getOperator toString
public boolean visit Prefix Expression node this buffer append node get Operator to String node get Operand accept this return false  PrefixExpression getOperator toString getOperand
see AST Visitor visit Primitive Type public boolean visit Primitive Type node this buffer append node get Primitive Type Code to String return false  ASTVisitor PrimitiveType PrimitiveType getPrimitiveTypeCode toString
public boolean visit Qualified Name node node get Qualifier accept this this buffer append NON NLS 1 node get Name accept this return false  QualifiedName getQualifier getName
public boolean visit Qualified Type node node get Qualifier accept this this buffer append NON NLS 1 node get Name accept this return false  QualifiedType getQualifier getName
public boolean visit Return Statement node this buffer append return NON NLS 1 if node get Expression null this buffer append NON NLS 1 node get Expression accept this this buffer append NON NLS 1 return false  ReturnStatement getExpression getExpression
see AST Visitor visit Simple Name public boolean visit Simple Name node this buffer append node get Identifier return false  ASTVisitor SimpleName SimpleName getIdentifier
see AST Visitor visit Simple Type public boolean visit Simple Type node return true  ASTVisitor SimpleType SimpleType
public boolean visit Single Member Annotation node this buffer append NON NLS 1 node get Type Name accept this this buffer append NON NLS 1 node get Value accept this this buffer append NON NLS 1 return false  SingleMemberAnnotation getTypeName getValue
public boolean visit Single Variable Declaration node if node getAST api Level AST JLS2 print Modifiers node get Modifiers if node getAST api Level AST JLS3 print Modifiers node modifiers node get Type accept this if node getAST api Level AST JLS3 if node is Varargs this buffer append NON NLS 1 this buffer append NON NLS 1 node get Name accept this for int i 0 i node get Extra Dimensions i this buffer append NON NLS 1 if node get Initializer null this buffer append NON NLS 1 node get Initializer accept this return false  SingleVariableDeclaration apiLevel printModifiers getModifiers apiLevel printModifiers getType apiLevel isVarargs getName getExtraDimensions getInitializer getInitializer
see AST Visitor visit String Literal public boolean visit String Literal node this buffer append node get Escaped Value return false  ASTVisitor StringLiteral StringLiteral getEscapedValue
public boolean visit Super Constructor Invocation node if node get Expression null node get Expression accept this this buffer append NON NLS 1 if node getAST api Level AST JLS3 if node type Arguments is Empty this buffer append NON NLS 1 for Iterator it node type Arguments iterator it has Next Type t Type it next t accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 this buffer append super NON NLS 1 for Iterator it node arguments iterator it has Next Expression e Expression it next e accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 return false  SuperConstructorInvocation getExpression getExpression apiLevel typeArguments isEmpty typeArguments hasNext hasNext hasNext hasNext
public boolean visit Super Field Access node if node get Qualifier null node get Qualifier accept this this buffer append NON NLS 1 this buffer append super NON NLS 1 node get Name accept this return false  SuperFieldAccess getQualifier getQualifier getName
public boolean visit Super Method Invocation node if node get Qualifier null node get Qualifier accept this this buffer append NON NLS 1 this buffer append super NON NLS 1 if node getAST api Level AST JLS3 if node type Arguments is Empty this buffer append NON NLS 1 for Iterator it node type Arguments iterator it has Next Type t Type it next t accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 node get Name accept this this buffer append NON NLS 1 for Iterator it node arguments iterator it has Next Expression e Expression it next e accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 return false  SuperMethodInvocation getQualifier getQualifier apiLevel typeArguments isEmpty typeArguments hasNext hasNext getName hasNext hasNext
public boolean visit Switch Case node if node is Default this buffer append default NON NLS 1 else this buffer append case NON NLS 1 node get Expression accept this this buffer append NON NLS 1 return false  SwitchCase isDefault getExpression
public boolean visit Switch Statement node this buffer append switch NON NLS 1 node get Expression accept this this buffer append NON NLS 1 this buffer append NON NLS 1 for Iterator it node statements iterator it has Next Statement s Statement it next s accept this this buffer append NON NLS 1 return false  SwitchStatement getExpression hasNext
public boolean visit Synchronized Statement node this buffer append synchronized NON NLS 1 node get Expression accept this this buffer append NON NLS 1 node get Body accept this return false  SynchronizedStatement getExpression getBody
public boolean visit Tag Element node if node is Nested nested tags are always enclosed in braces this buffer append NON NLS 1 else top level tags always begin on a new line this buffer append n NON NLS 1 boolean previous Requires White Space false if node get Tag Name null this buffer append node get Tag Name previous Requires White Space true boolean previous Requires New Line false for Iterator it node fragments iterator it has Next AST Node e AST Node it next assume text elements include necessary leading and trailing whitespace but Name Member Ref Method Ref and nested Tag Element do not include white space boolean current Includes White Space e instanceof Text Element if previous Requires New Line current Includes White Space this buffer append n NON NLS 1 previous Requires New Line current Includes White Space add space if required to separate if previous Requires White Space current Includes White Space this buffer append NON NLS 1 e accept this previous Requires White Space current Includes White Space e instanceof Tag Element if node is Nested this buffer append NON NLS 1 return false  TagElement isNested previousRequiresWhiteSpace getTagName getTagName previousRequiresWhiteSpace previousRequiresNewLine hasNext ASTNode ASTNode MemberRef MethodRef TagElement currentIncludesWhiteSpace TextElement previousRequiresNewLine currentIncludesWhiteSpace previousRequiresNewLine currentIncludesWhiteSpace previousRequiresWhiteSpace currentIncludesWhiteSpace previousRequiresWhiteSpace currentIncludesWhiteSpace TagElement isNested
since 3 0 public boolean visit Text Element node this buffer append node get Text return false  TextElement getText
public boolean visit This Expression node if node get Qualifier null node get Qualifier accept this this buffer append NON NLS 1 this buffer append this NON NLS 1 return false  ThisExpression getQualifier getQualifier
public boolean visit Throw Statement node this buffer append throw NON NLS 1 node get Expression accept this this buffer append NON NLS 1 return false  ThrowStatement getExpression
public boolean visit Try Statement node this buffer append try NON NLS 1 node get Body accept this this buffer append NON NLS 1 for Iterator it node catch Clauses iterator it has Next Catch Clause cc Catch Clause it next cc accept this if node get Finally null this buffer append finally NON NLS 1 node get Finally accept this return false  TryStatement getBody catchClauses hasNext CatchClause CatchClause getFinally getFinally
public boolean visit Type Declaration node if node get Javadoc null node get Javadoc accept this if node getAST api Level AST JLS2 print Modifiers node get Modifiers if node getAST api Level AST JLS3 print Modifiers node modifiers this buffer append node is Interface interface class NON NLS 2 NON NLS 1 node get Name accept this if node getAST api Level AST JLS3 if node type Parameters is Empty this buffer append NON NLS 1 for Iterator it node type Parameters iterator it has Next Type Parameter t Type Parameter it next t accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 this buffer append NON NLS 1 if node getAST api Level AST JLS2 if node get Superclass null this buffer append extends NON NLS 1 node get Superclass accept this this buffer append NON NLS 1 if node super Interfaces is Empty this buffer append node is Interface extends implements NON NLS 2 NON NLS 1 for Iterator it node super Interfaces iterator it has Next Name n Name it next n accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 if node getAST api Level AST JLS3 if node get Superclass Type null this buffer append extends NON NLS 1 node get Superclass Type accept this this buffer append NON NLS 1 if node super Interface Types is Empty this buffer append node is Interface extends implements NON NLS 2 NON NLS 1 for Iterator it node super Interface Types iterator it has Next Type t Type it next t accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 this buffer append NON NLS 1 Body Declaration prev null for Iterator it node body Declarations iterator it has Next Body Declaration d Body Declaration it next if prev instanceof Enum Constant Declaration enum constant declarations do not include punctuation if d instanceof Enum Constant Declaration enum constant declarations are separated by commas this buffer append NON NLS 1 else semicolon separates last enum constant declaration from first class body declarations this buffer append NON NLS 1 d accept this this buffer append NON NLS 1 return false  TypeDeclaration getJavadoc getJavadoc apiLevel printModifiers getModifiers apiLevel printModifiers isInterface getName apiLevel typeParameters isEmpty typeParameters hasNext TypeParameter TypeParameter hasNext apiLevel getSuperclass getSuperclass superInterfaces isEmpty isInterface superInterfaces hasNext hasNext apiLevel getSuperclassType getSuperclassType superInterfaceTypes isEmpty isInterface superInterfaceTypes hasNext hasNext BodyDeclaration bodyDeclarations hasNext BodyDeclaration BodyDeclaration EnumConstantDeclaration EnumConstantDeclaration
public boolean visit Type Declaration Statement node if node getAST api Level AST JLS2 node get Type Declaration accept this if node getAST api Level AST JLS3 node get Declaration accept this return false  TypeDeclarationStatement apiLevel getTypeDeclaration apiLevel getDeclaration
public boolean visit Type Literal node node get Type accept this this buffer append class NON NLS 1 return false  TypeLiteral getType
public boolean visit Type Parameter node node get Name accept this if node type Bounds is Empty this buffer append extends NON NLS 1 for Iterator it node type Bounds iterator it has Next Type t Type it next t accept this if it has Next this buffer append NON NLS 1 return false  TypeParameter getName typeBounds isEmpty typeBounds hasNext hasNext
public boolean visit Variable Declaration Expression node if node getAST api Level AST JLS2 print Modifiers node get Modifiers if node getAST api Level AST JLS3 print Modifiers node modifiers node get Type accept this this buffer append NON NLS 1 for Iterator it node fragments iterator it has Next Variable Declaration Fragment f Variable Declaration Fragment it next f accept this if it has Next this buffer append NON NLS 1 return false  VariableDeclarationExpression apiLevel printModifiers getModifiers apiLevel printModifiers getType hasNext VariableDeclarationFragment VariableDeclarationFragment hasNext
public boolean visit Variable Declaration Fragment node node get Name accept this for int i 0 i node get Extra Dimensions i this buffer append NON NLS 1 if node get Initializer null this buffer append NON NLS 1 node get Initializer accept this return false  VariableDeclarationFragment getName getExtraDimensions getInitializer getInitializer
public boolean visit Variable Declaration Statement node if node getAST api Level AST JLS2 print Modifiers node get Modifiers if node getAST api Level AST JLS3 print Modifiers node modifiers node get Type accept this this buffer append NON NLS 1 for Iterator it node fragments iterator it has Next Variable Declaration Fragment f Variable Declaration Fragment it next f accept this if it has Next this buffer append NON NLS 1 this buffer append NON NLS 1 return false  VariableDeclarationStatement apiLevel printModifiers getModifiers apiLevel printModifiers getType hasNext VariableDeclarationFragment VariableDeclarationFragment hasNext
public boolean visit Wildcard Type node this buffer append NON NLS 1 Type bound node get Bound if bound null if node is Upper Bound this buffer append extends NON NLS 1 else this buffer append super NON NLS 1 bound accept this return false  WildcardType getBound isUpperBound
public boolean visit While Statement node this buffer append while NON NLS 1 node get Expression accept this this buffer append NON NLS 1 node get Body accept this return false  WhileStatement getExpression getBody

Creates a new AST node for a name owned by the given AST p N B This constructor is package private p param ast the AST that is to own this node Name AST ast super ast 
Returns whether this name is a simple name code Simple Name code return code true code if this is a simple name and code false code otherwise public final boolean is Simple Name return this instanceof Simple Name  SimpleName isSimpleName SimpleName
Returns whether this name is a qualified name code Qualified Name code return code true code if this is a qualified name and code false code otherwise public final boolean is Qualified Name return this instanceof Qualified Name  QualifiedName isQualifiedName QualifiedName
Resolves and returns the binding for the entity referred to by this name p Note that bindings are generally unavailable unless requested when the AST is being built p return the binding or code null code if the binding cannot be resolved public final I Binding resolve Binding return this ast get Binding Resolver resolve Name this  IBinding resolveBinding getBindingResolver resolveName
Returns the standard dot separated representation of this name If the name is a simple name the result is the name s identifier If the name is a qualified name the result is the name of the qualifier as computed by this method followed by followed by the name s identifier return the fully qualified name since 3 0 public final String get Fully Qualified Name if is Simple Name avoid creating garbage for common case return Simple Name this get Identifier else String Buffer buffer new String Buffer 50 append Name buffer return new String buffer  getFullyQualifiedName isSimpleName SimpleName getIdentifier StringBuffer StringBuffer appendName
Appends the standard representation of this name to the given string buffer param buffer the buffer since 3 0 

Creates a node event handler Node Event Handler default implementation do nothing  NodeEventHandler
Reports that the given node is about to lose a child The first half of an event pair The default implementation does nothing param node the node about to be modified param child the node about to be removed param property the child or child list property descriptor see post Remove Child Event AST Node AST Node Structural Property Descriptor since 3 0 void pre Remove Child Event AST Node node AST Node child Structural Property Descriptor property do nothing System out println DEL1 property NON NLS 1  postRemoveChildEvent ASTNode ASTNode StructuralPropertyDescriptor preRemoveChildEvent ASTNode ASTNode StructuralPropertyDescriptor
Reports that the given node has just lose a child The second half of an event pair The default implementation does nothing param node the node that was modified param child the child that was removed note that this node is unparented param property the child or child list property descriptor see pre Remove Child Event AST Node AST Node Structural Property Descriptor since 3 0 void post Remove Child Event AST Node node AST Node child Structural Property Descriptor property do nothing System out println DEL2 property NON NLS 1  preRemoveChildEvent ASTNode ASTNode StructuralPropertyDescriptor postRemoveChildEvent ASTNode ASTNode StructuralPropertyDescriptor
Reports that the given node is about to have a child replaced The first half of an event pair The default implementation does nothing param node the node about to be modified param child the node about to be replaced param new Child the replacement child note that this node is unparented param property the child or child list property descriptor see pre Replace Child Event AST Node AST Node AST Node Structural Property Descriptor since 3 0 void pre Replace Child Event AST Node node AST Node child AST Node new Child Structural Property Descriptor property do nothing System out println REP1 property NON NLS 1  newChild preReplaceChildEvent ASTNode ASTNode ASTNode StructuralPropertyDescriptor preReplaceChildEvent ASTNode ASTNode ASTNode newChild StructuralPropertyDescriptor
Reports that the given node has had its child replaced The second half of an event pair The default implementation does nothing param node the node that was modified param child the node that was replaced note that this node is unparented param new Child the replacement child param property the child or child list property descriptor see post Replace Child Event AST Node AST Node AST Node Structural Property Descriptor since 3 0 void post Replace Child Event AST Node node AST Node child AST Node new Child Structural Property Descriptor property do nothing System out println REP2 property NON NLS 1  newChild postReplaceChildEvent ASTNode ASTNode ASTNode StructuralPropertyDescriptor postReplaceChildEvent ASTNode ASTNode ASTNode newChild StructuralPropertyDescriptor
Reports that the given node is about to gain a child The first half of an event pair The default implementation does nothing param node the node that to be modified param child the node that is to be added as a child note that this node is unparented in the case of a child list property the exact location of insertion is not supplied but is known on the corresponding code post Add Child Event code to follow param property the child or child list property descriptor see post Add Child Event AST Node AST Node Structural Property Descriptor since 3 0 void pre Add Child Event AST Node node AST Node child Structural Property Descriptor property do nothing System out println ADD1 property NON NLS 1  postAddChildEvent postAddChildEvent ASTNode ASTNode StructuralPropertyDescriptor preAddChildEvent ASTNode ASTNode StructuralPropertyDescriptor
Reports that the given node has just gained a child The second half of an event pair The default implementation does nothing param node the node that was modified param child the node that was added as a child param property the child or child list property descriptor see pre Add Child Event AST Node AST Node Structural Property Descriptor since 3 0 void post Add Child Event AST Node node AST Node child Structural Property Descriptor property do nothing System out println ADD2 property NON NLS 1  preAddChildEvent ASTNode ASTNode StructuralPropertyDescriptor postAddChildEvent ASTNode ASTNode StructuralPropertyDescriptor
Reports that the given node is about to change the value of a non child property The first half of an event pair The default implementation does nothing param node the node to be modified param property the property descriptor see post Value Change Event AST Node Simple Property Descriptor since 3 0 void pre Value Change Event AST Node node Simple Property Descriptor property do nothing System out println MOD1 property NON NLS 1  postValueChangeEvent ASTNode SimplePropertyDescriptor preValueChangeEvent ASTNode SimplePropertyDescriptor
Reports that the given node has just changed the value of a non child property The second half of an event pair The default implementation does nothing param node the node that was modified param property the property descriptor see pre Value Change Event AST Node Simple Property Descriptor since 3 0 void post Value Change Event AST Node node Simple Property Descriptor property do nothing System out println MOD2 property NON NLS 1  preValueChangeEvent ASTNode SimplePropertyDescriptor postValueChangeEvent ASTNode SimplePropertyDescriptor
Reports that the given node is about to be cloned The first half of an event pair The default implementation does nothing param node the node to be modified see post Clone Node Event AST Node AST Node since 3 0 void pre Clone Node Event AST Node node do nothing System out println CLONE1 NON NLS 1  postCloneNodeEvent ASTNode ASTNode preCloneNodeEvent ASTNode
Reports that the given node has just been cloned The second half of an event pair The default implementation does nothing param node the node that was modified param clone the clone of code node code see pre Clone Node Event AST Node since 3 0 void post Clone Node Event AST Node node AST Node clone do nothing System out println CLONE2 NON NLS 1  preCloneNodeEvent ASTNode postCloneNodeEvent ASTNode ASTNode

public int position Node Searcher int position this position position  NodeSearcher
public boolean visit Constructor Declaration constructor Declaration Class Scope scope if constructor Declaration declaration Source Start position position constructor Declaration declaration Source End found constructor Declaration return false return true  ConstructorDeclaration constructorDeclaration ClassScope constructorDeclaration declarationSourceStart constructorDeclaration declarationSourceEnd constructorDeclaration
public boolean visit Field Declaration field Declaration Method Scope scope if field Declaration declaration Source Start position position field Declaration declaration Source End found field Declaration return false return true  FieldDeclaration fieldDeclaration MethodScope fieldDeclaration declarationSourceStart fieldDeclaration declarationSourceEnd fieldDeclaration
public boolean visit Initializer initializer Method Scope scope if initializer declaration Source Start position position initializer declaration Source End found initializer return false return true  MethodScope declarationSourceStart declarationSourceEnd
public boolean visit Type Declaration member Type Declaration Class Scope scope if member Type Declaration declaration Source Start position position member Type Declaration declaration Source End enclosing Type member Type Declaration return true return false  TypeDeclaration memberTypeDeclaration ClassScope memberTypeDeclaration declarationSourceStart memberTypeDeclaration declarationSourceEnd enclosingType memberTypeDeclaration
public boolean visit Method Declaration method Declaration Class Scope scope if method Declaration declaration Source Start position position method Declaration declaration Source End found method Declaration return false return true  MethodDeclaration methodDeclaration ClassScope methodDeclaration declarationSourceStart methodDeclaration declarationSourceEnd methodDeclaration
public boolean visit Type Declaration type Declaration Compilation Unit Scope scope if type Declaration declaration Source Start position position type Declaration declaration Source End enclosing Type type Declaration return true return false  TypeDeclaration typeDeclaration CompilationUnitScope typeDeclaration declarationSourceStart typeDeclaration declarationSourceEnd enclosingType typeDeclaration

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the AST JLS constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented normal annotation node owned by the given AST By default the annotation has an unspecified type name and an empty list of member value pairs p N B This constructor is package private p param ast the AST that is to own this node Normal Annotation AST ast super ast unsupported In2  NormalAnnotation unsupportedIn2
since 3 0 final List internal Structural Properties For Type int api Level return property Descriptors api Level  internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property TYPE NAME PROPERTY if get return get Type Name else set Type Name Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode TYPE_NAME_PROPERTY getTypeName setTypeName internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property VALUES PROPERTY return values allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor VALUES_PROPERTY internalGetChildListProperty
Method declared on Body Declaration final Child Property Descriptor internal Type Name Property return TYPE NAME PROPERTY  BodyDeclaration ChildPropertyDescriptor internalTypeNameProperty TYPE_NAME_PROPERTY
Method declared on AST Node final int get Node Type0 return NORMAL ANNOTATION  ASTNode getNodeType0 NORMAL_ANNOTATION
AST Node clone0 AST target Normal Annotation result new Normal Annotation target result set Source Range this get Start Position this get Length result set Type Name Name AST Node copy Subtree target get Type Name result values add All AST Node copy Subtrees target values return result  ASTNode NormalAnnotation NormalAnnotation setSourceRange getStartPosition getLength setTypeName ASTNode copySubtree getTypeName addAll ASTNode copySubtrees
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Type Name accept Children visitor this values visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getTypeName acceptChildren endVisit
Returns the live list of member value pairs in this annotation Adding and removing nodes from this list affects this node dynamically All nodes in this list must be link Member Value Pair s attempts to add any other type of node will trigger an exception return the live list of member value pairs in this annotation element type code Member Value Pair code public List values return this values  MemberValuePair MemberValuePair
Method declared on AST Node int mem Size return super mem Size 1 4  ASTNode memSize memSize
int tree Size return mem Size this type Name null 0 get Type Name tree Size this values list Size  treeSize memSize typeName getTypeName treeSize listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented null literal node owned by the given AST p N B This constructor is package private p param ast the AST that is to own this node Null Literal AST ast super ast  NullLiteral
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
Method declared on AST Node final int get Node Type0 return NULL LITERAL  ASTNode getNodeType0 NULL_LITERAL
AST Node clone0 AST target Null Literal result new Null Literal target result set Source Range this get Start Position this get Length return result  ASTNode NullLiteral NullLiteral setSourceRange getStartPosition getLength
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
Method declared on AST Node void accept0 AST Visitor visitor visitor visit this visitor end Visit this  ASTNode ASTVisitor endVisit
Method declared on AST Node int mem Size return BASE NODE SIZE  ASTNode memSize BASE_NODE_SIZE
Method declared on AST Node int tree Size return mem Size  ASTNode treeSize memSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented number literal node owned by the given AST By default the number literal is the token code 0 code p N B This constructor is package private p param ast the AST that is to own this node Number Literal AST ast super ast  NumberLiteral
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final Object internal Get Set Object Property Simple Property Descriptor property boolean get Object value if property TOKEN PROPERTY if get return get Token else set Token String value return null allow default implementation to flag the error return super internal Get Set Object Property property get value  internalGetSetObjectProperty SimplePropertyDescriptor TOKEN_PROPERTY getToken setToken internalGetSetObjectProperty
Method declared on AST Node final int get Node Type0 return NUMBER LITERAL  ASTNode getNodeType0 NUMBER_LITERAL
AST Node clone0 AST target Number Literal result new Number Literal target result set Source Range this get Start Position this get Length result set Token get Token return result  ASTNode NumberLiteral NumberLiteral setSourceRange getStartPosition getLength setToken getToken
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
Method declared on AST Node void accept0 AST Visitor visitor visitor visit this visitor end Visit this  ASTNode ASTVisitor endVisit
Returns the token of this number literal node The value is the sequence of characters that would appear in the source program return the numeric literal token public String get Token return this token Value  getToken tokenValue
Sets the token of this number literal node The value is the sequence of characters that would appear in the source program param token the numeric literal token exception Illegal Argument Exception if the argument is incorrect public void set Token String token if token null token length 0 throw new Illegal Argument Exception Scanner scanner this ast scanner char source token to Char Array scanner set Source source scanner reset To 0 source length scanner tokenize Comments false scanner tokenize White Space false try int token Type scanner get Next Token switch token Type case Terminal Tokens Token Name Double Literal case Terminal Tokens Token Name Integer Literal case Terminal Tokens Token Name Floating Point Literal case Terminal Tokens Token Name Long Literal break case Terminal Tokens Token NameMINUS token Type scanner get Next Token switch token Type case Terminal Tokens Token Name Double Literal case Terminal Tokens Token Name Integer Literal case Terminal Tokens Token Name Floating Point Literal case Terminal Tokens Token Name Long Literal break default throw new Illegal Argument Exception Invalid number literal token NON NLS 1 NON NLS 2 break default throw new Illegal Argument Exception Invalid number literal token NON NLS 1 NON NLS 2 catch Invalid Input Exception e throw new Illegal Argument Exception finally scanner tokenize Comments true scanner tokenize White Space true pre Value Change TOKEN PROPERTY this token Value token post Value Change TOKEN PROPERTY  IllegalArgumentException setToken IllegalArgumentException toCharArray setSource resetTo tokenizeComments tokenizeWhiteSpace tokenType getNextToken tokenType TerminalTokens TokenNameDoubleLiteral TerminalTokens TokenNameIntegerLiteral TerminalTokens TokenNameFloatingPointLiteral TerminalTokens TokenNameLongLiteral TerminalTokens TokenNameMINUS tokenType getNextToken tokenType TerminalTokens TokenNameDoubleLiteral TerminalTokens TokenNameIntegerLiteral TerminalTokens TokenNameFloatingPointLiteral TerminalTokens TokenNameLongLiteral IllegalArgumentException IllegalArgumentException InvalidInputException IllegalArgumentException tokenizeComments tokenizeWhiteSpace preValueChange TOKEN_PROPERTY tokenValue postValueChange TOKEN_PROPERTY
Method declared on AST Node int mem Size int size BASE NODE SIZE 1 4 string Size token Value return size  ASTNode memSize BASE_NODE_SIZE stringSize tokenValue
Method declared on AST Node int tree Size return mem Size  ASTNode treeSize memSize

private String components Package Binding org eclipse jdt internal compiler lookup Package Binding binding this binding binding  PackageBinding PackageBinding
public String get Name if name null compute Name And Components return name  getName computeNameAndComponents
see I Package Binding is Unnamed public boolean is Unnamed return get Name equals UNNAMED  IPackageBinding isUnnamed isUnnamed getName
public String get Name Components if components null compute Name And Components return components  getNameComponents computeNameAndComponents
see I Binding get Kind public int get Kind return I Binding PACKAGE  IBinding getKind getKind IBinding
see I Binding get Modifiers public int get Modifiers return 1  IBinding getModifiers getModifiers
see I Binding is Deprecated public boolean is Deprecated return false  IBinding isDeprecated isDeprecated
see I Binding is Synthetic public boolean is Synthetic return false  IBinding isSynthetic isSynthetic
see I Binding get Key public String get Key return get Name  IBinding getKey getKey getName
private void compute Name And Components char compound Name this binding compound Name if compound Name Char Operation NO CHAR CHAR compound Name null name UNNAMED components NO NAME COMPONENTS else int length compound Name length components new String length String Buffer buffer new String Buffer for int i 0 i length 1 i components i new String compound Name i buffer append compound Name i append PACKAGE NAME SEPARATOR components length 1 new String compound Name length 1 buffer append compound Name length 1 name buffer to String  computeNameAndComponents compoundName compoundName compoundName CharOperation NO_CHAR_CHAR compoundName NO_NAME_COMPONENTS compoundName StringBuffer StringBuffer compoundName compoundName PACKAGE_NAME_SEPARATOR compoundName compoundName toString
see java lang Object to String public String to String return this binding to String  toString toString toString

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new AST node for a package declaration owned by the given AST The package declaration initially has an unspecified but legal Java identifier and an empty list of annotations p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Package Declaration AST ast super ast if ast api Level AST JLS3 this annotations new AST Node Node List ANNOTATIONS PROPERTY  PackageDeclaration apiLevel ASTNode NodeList ANNOTATIONS_PROPERTY
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property JAVADOC PROPERTY if get return get Javadoc else set Javadoc Javadoc child return null if property NAME PROPERTY if get return get Name else set Name Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode JAVADOC_PROPERTY getJavadoc setJavadoc NAME_PROPERTY getName setName internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property ANNOTATIONS PROPERTY return annotations allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor ANNOTATIONS_PROPERTY internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return PACKAGE DECLARATION  ASTNode getNodeType0 PACKAGE_DECLARATION
AST Node clone0 AST target Package Declaration result new Package Declaration target result set Source Range this get Start Position this get Length if this ast api Level AST JLS3 result set Javadoc Javadoc AST Node copy Subtree target get Javadoc result annotations add All AST Node copy Subtrees target annotations result set Name Name get Name clone target return result  ASTNode PackageDeclaration PackageDeclaration setSourceRange getStartPosition getLength apiLevel setJavadoc ASTNode copySubtree getJavadoc addAll ASTNode copySubtrees setName getName
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children if this ast api Level AST JLS3 accept Child visitor get Javadoc accept Children visitor this annotations accept Child visitor get Name visitor end Visit this  ASTVisitor visitChildren visitChildren apiLevel acceptChild getJavadoc acceptChildren acceptChild getName endVisit
Returns the live ordered list of annotations of this package declaration added in JLS3 API p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p return the live list of annotations element type code Annotation code exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public List annotations more efficient than just calling unsupported In2 to check if this annotations null unsupported In2 return this annotations  UnsupportedOperationException unsupportedIn2 unsupportedIn2
Returns the doc comment node return the doc comment node or code null code if none exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Javadoc get Javadoc more efficient than just calling unsupported In2 to check if this annotations null unsupported In2 return this optional Doc Comment  UnsupportedOperationException getJavadoc unsupportedIn2 unsupportedIn2 optionalDocComment
Sets or clears the doc comment node param doc Comment the doc comment node or code null code if none exception Illegal Argument Exception if the doc comment string is invalid exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public void set Javadoc Javadoc doc Comment more efficient than just calling unsupported In2 to check if this annotations null unsupported In2 AST Node old Child this optional Doc Comment pre Replace Child old Child doc Comment JAVADOC PROPERTY this optional Doc Comment doc Comment post Replace Child old Child doc Comment JAVADOC PROPERTY  docComment IllegalArgumentException UnsupportedOperationException setJavadoc docComment unsupportedIn2 unsupportedIn2 ASTNode oldChild optionalDocComment preReplaceChild oldChild docComment JAVADOC_PROPERTY optionalDocComment docComment postReplaceChild oldChild docComment JAVADOC_PROPERTY
Returns the package name of this package declaration return the package name node public Name get Name if this package Name null lazy init must be thread safe for readers synchronized this if this package Name null pre Lazy Init this package Name new Simple Name this ast post Lazy Init this package Name NAME PROPERTY return this package Name  getName packageName packageName preLazyInit packageName SimpleName postLazyInit packageName NAME_PROPERTY packageName
Sets the package name of this package declaration to the given name param name the new package name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Name Name name if name null throw new Illegal Argument Exception AST Node old Child this package Name pre Replace Child old Child name NAME PROPERTY this package Name name post Replace Child old Child name NAME PROPERTY  IllegalArgumentException setName IllegalArgumentException ASTNode oldChild packageName preReplaceChild oldChild NAME_PROPERTY packageName postReplaceChild oldChild NAME_PROPERTY
Resolves and returns the binding for the package declared in this package declaration p Note that bindings are generally unavailable unless requested when the AST is being built p return the binding or code null code if the binding cannot be resolved public I Package Binding resolve Binding return this ast get Binding Resolver resolve Package this  IPackageBinding resolveBinding getBindingResolver resolvePackage
Method declared on AST Node int mem Size return BASE NODE SIZE 3 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this optional Doc Comment null 0 get Javadoc tree Size this annotations null 0 this annotations list Size this package Name null 0 get Name tree Size  treeSize memSize optionalDocComment getJavadoc treeSize listSize packageName getName treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented node for a parameterized type owned by the given AST By default an unspecified but legal type and no type arguments p N B This constructor is package private p param ast the AST that is to own this node Parameterized Type AST ast super ast unsupported In2  ParameterizedType unsupportedIn2
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property TYPE PROPERTY if get return get Type else set Type Type child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode TYPE_PROPERTY getType setType internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property TYPE ARGUMENTS PROPERTY return type Arguments allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY typeArguments internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return PARAMETERIZED TYPE  ASTNode getNodeType0 PARAMETERIZED_TYPE
AST Node clone0 AST target Parameterized Type result new Parameterized Type target result set Source Range this get Start Position this get Length result set Type Type AST Node get Type clone target result type Arguments add All AST Node copy Subtrees target type Arguments return result  ASTNode ParameterizedType ParameterizedType setSourceRange getStartPosition getLength setType ASTNode getType typeArguments addAll ASTNode copySubtrees typeArguments
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Type accept Children visitor this type Arguments visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getType acceptChildren typeArguments endVisit
Returns the type of this parameterized type return the type of this parameterized type public Type get Type if this type null lazy init must be thread safe for readers synchronized this if this type null pre Lazy Init this type new Simple Type this ast post Lazy Init this type TYPE PROPERTY return this type  getType preLazyInit SimpleType postLazyInit TYPE_PROPERTY
Sets the type of this parameterized type param type the new type of this parameterized type exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Type Type type if type null throw new Illegal Argument Exception AST Node old Child this type pre Replace Child old Child type TYPE PROPERTY this type type post Replace Child old Child type TYPE PROPERTY  IllegalArgumentException setType IllegalArgumentException ASTNode oldChild preReplaceChild oldChild TYPE_PROPERTY postReplaceChild oldChild TYPE_PROPERTY
Returns the live ordered list of type arguments of this parameterized type For the parameterized type to be plausible the list should contain at least one element and not contain primitive types return the live list of type arguments element type code Type code public List type Arguments return this type Arguments  typeArguments typeArguments
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this type null 0 get Type tree Size this type Arguments list Size  treeSize memSize getType treeSize typeArguments listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented parenthesized expression node owned by the given AST By default the parenthesized expression has an unspecified but legal expression p N B This constructor is package private p param ast the AST that is to own this node Parenthesized Expression AST ast super ast  ParenthesizedExpression
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return PARENTHESIZED EXPRESSION  ASTNode getNodeType0 PARENTHESIZED_EXPRESSION
AST Node clone0 AST target Parenthesized Expression result new Parenthesized Expression target result set Source Range this get Start Position this get Length result set Expression Expression get Expression clone target return result  ASTNode ParenthesizedExpression ParenthesizedExpression setSourceRange getStartPosition getLength setExpression getExpression
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Child visitor get Expression visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getExpression endVisit
Returns the expression of this parenthesized expression return the expression node public Expression get Expression if this expression null lazy init must be thread safe for readers synchronized this if this expression null pre Lazy Init this expression new Simple Name this ast post Lazy Init this expression EXPRESSION PROPERTY return this expression  getExpression preLazyInit SimpleName postLazyInit EXPRESSION_PROPERTY
Sets the expression of this parenthesized expression param expression the new expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this expression pre Replace Child old Child expression EXPRESSION PROPERTY this expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression IllegalArgumentException ASTNode oldChild preReplaceChild oldChild EXPRESSION_PROPERTY postReplaceChild oldChild EXPRESSION_PROPERTY
Method declared on AST Node int mem Size return BASE NODE SIZE 1 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this expression null 0 get Expression tree Size  treeSize memSize getExpression treeSize

Creates a new postfix operator with the given token p Note this constructor is private The only instances ever created are the ones for the standard operators p param token the character sequence for the operator private Operator String token this token token 
Returns the character sequence for the operator return the character sequence for the operator public String to String return token  toString
Returns the postfix operator corresponding to the given string or code null code if none p code to Operator code is the converse of code to String code that is code Operator to Operator op to String op code for all operators code op code p param token the character sequence for the operator return the postfix operator or code null code if none public static Operator to Operator String token return Operator CODES get token  toOperator toString toOperator toString toOperator
Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for an postfix expression owned by the given AST By default the node has unspecified but legal operator and operand param ast the AST that is to own this node Postfix Expression AST ast super ast  PostfixExpression
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final Object internal Get Set Object Property Simple Property Descriptor property boolean get Object value if property OPERATOR PROPERTY if get return get Operator else set Operator Operator value return null allow default implementation to flag the error return super internal Get Set Object Property property get value  internalGetSetObjectProperty SimplePropertyDescriptor OPERATOR_PROPERTY getOperator setOperator internalGetSetObjectProperty
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property OPERAND PROPERTY if get return get Operand else set Operand Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode OPERAND_PROPERTY getOperand setOperand internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return POSTFIX EXPRESSION  ASTNode getNodeType0 POSTFIX_EXPRESSION
AST Node clone0 AST target Postfix Expression result new Postfix Expression target result set Source Range this get Start Position this get Length result set Operator get Operator result set Operand Expression get Operand clone target return result  ASTNode PostfixExpression PostfixExpression setSourceRange getStartPosition getLength setOperator getOperator setOperand getOperand
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Child visitor get Operand visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getOperand endVisit
Returns the operator of this postfix expression return the operator public Postfix Expression Operator get Operator return this operator  PostfixExpression getOperator
Sets the operator of this postfix expression param operator the operator exception Illegal Argument Exception if the argument is incorrect public void set Operator Postfix Expression Operator operator if operator null throw new Illegal Argument Exception pre Value Change OPERATOR PROPERTY this operator operator post Value Change OPERATOR PROPERTY  IllegalArgumentException setOperator PostfixExpression IllegalArgumentException preValueChange OPERATOR_PROPERTY postValueChange OPERATOR_PROPERTY
Returns the operand of this postfix expression return the operand expression node public Expression get Operand if this operand null lazy init must be thread safe for readers synchronized this if this operand null pre Lazy Init this operand new Simple Name this ast post Lazy Init this operand OPERAND PROPERTY return this operand  getOperand preLazyInit SimpleName postLazyInit OPERAND_PROPERTY
Sets the operand of this postfix expression param expression the operand expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Operand Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this operand pre Replace Child old Child expression OPERAND PROPERTY this operand expression post Replace Child old Child expression OPERAND PROPERTY  IllegalArgumentException setOperand IllegalArgumentException ASTNode oldChild preReplaceChild oldChild OPERAND_PROPERTY postReplaceChild oldChild OPERAND_PROPERTY
Method declared on AST Node int mem Size treat Operator as free return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this operand null 0 get Operand tree Size  treeSize memSize getOperand treeSize

Creates a new prefix operator with the given token p Note this constructor is private The only instances ever created are the ones for the standard operators p param token the character sequence for the operator private Operator String token this token token 
Returns the character sequence for the operator return the character sequence for the operator public String to String return token  toString
Returns the prefix operator corresponding to the given string or code null code if none p code to Operator code is the converse of code to String code that is code Operator to Operator op to String op code for all operators code op code p param token the character sequence for the operator return the prefix operator or code null code if none public static Operator to Operator String token return Operator CODES get token  toOperator toString toOperator toString toOperator
Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for an prefix expression owned by the given AST By default the node has unspecified but legal operator and operand param ast the AST that is to own this node Prefix Expression AST ast super ast  PrefixExpression
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final Object internal Get Set Object Property Simple Property Descriptor property boolean get Object value if property OPERATOR PROPERTY if get return get Operator else set Operator Operator value return null allow default implementation to flag the error return super internal Get Set Object Property property get value  internalGetSetObjectProperty SimplePropertyDescriptor OPERATOR_PROPERTY getOperator setOperator internalGetSetObjectProperty
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property OPERAND PROPERTY if get return get Operand else set Operand Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode OPERAND_PROPERTY getOperand setOperand internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return PREFIX EXPRESSION  ASTNode getNodeType0 PREFIX_EXPRESSION
AST Node clone0 AST target Prefix Expression result new Prefix Expression target result set Source Range this get Start Position this get Length result set Operator get Operator result set Operand Expression get Operand clone target return result  ASTNode PrefixExpression PrefixExpression setSourceRange getStartPosition getLength setOperator getOperator setOperand getOperand
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Operand visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getOperand endVisit
Returns the operator of this prefix expression return the operator public Prefix Expression Operator get Operator return this operator  PrefixExpression getOperator
Sets the operator of this prefix expression param operator the operator exception Illegal Argument Exception if the argument is incorrect public void set Operator Prefix Expression Operator operator if operator null throw new Illegal Argument Exception pre Value Change OPERATOR PROPERTY this operator operator post Value Change OPERATOR PROPERTY  IllegalArgumentException setOperator PrefixExpression IllegalArgumentException preValueChange OPERATOR_PROPERTY postValueChange OPERATOR_PROPERTY
Returns the operand of this prefix expression return the operand expression node public Expression get Operand if this operand null lazy init must be thread safe for readers synchronized this if this operand null pre Lazy Init this operand new Simple Name this ast post Lazy Init this operand OPERAND PROPERTY return this operand  getOperand preLazyInit SimpleName postLazyInit OPERAND_PROPERTY
Sets the operand of this prefix expression param expression the operand expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Operand Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this operand pre Replace Child old Child expression OPERAND PROPERTY this operand expression post Replace Child old Child expression OPERAND PROPERTY  IllegalArgumentException setOperand IllegalArgumentException ASTNode oldChild preReplaceChild oldChild OPERAND_PROPERTY postReplaceChild oldChild OPERAND_PROPERTY
Method declared on AST Node int mem Size treat Operator as free return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this operand null 0 get Operand tree Size  treeSize memSize getOperand treeSize

Creates a new primitive type code with the given name p Note this constructor is package private The only instances ever created are the ones for the standard primitive types p param name the standard name of the primitive type Code String name this name name 
Returns the standard name of the primitive type return the standard name of the primitive type public String to String return name  toString
Returns the primitive type code corresponding to the given string or code null code if none p code to Code code is the converse of code to String code that is code Primitive Type Code to Code code to String code code for all type code code code code p param token the standard name of the primitive type return the primitive type code or code null code if none public static Primitive Type Code to Code String token return Primitive Type Code CODES get token  toCode toString PrimitiveType toCode toString PrimitiveType toCode PrimitiveType
Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented node for a primitive type owned by the given AST By default the node has type int p N B This constructor is package private p param ast the AST that is to own this node Primitive Type AST ast super ast  PrimitiveType
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final Object internal Get Set Object Property Simple Property Descriptor property boolean get Object value if property PRIMITIVE TYPE CODE PROPERTY if get return get Primitive Type Code else set Primitive Type Code Code value return null allow default implementation to flag the error return super internal Get Set Object Property property get value  internalGetSetObjectProperty SimplePropertyDescriptor PRIMITIVE_TYPE_CODE_PROPERTY getPrimitiveTypeCode setPrimitiveTypeCode internalGetSetObjectProperty
Method declared on AST Node final int get Node Type0 return PRIMITIVE TYPE  ASTNode getNodeType0 PRIMITIVE_TYPE
AST Node clone0 AST target Primitive Type result new Primitive Type target result set Source Range this get Start Position this get Length result set Primitive Type Code get Primitive Type Code return result  ASTNode PrimitiveType PrimitiveType setSourceRange getStartPosition getLength setPrimitiveTypeCode getPrimitiveTypeCode
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
Method declared on AST Node void accept0 AST Visitor visitor visitor visit this visitor end Visit this  ASTNode ASTVisitor endVisit
Returns the primitive type code return one of the primitive type code constants declared in this class public Primitive Type Code get Primitive Type Code return this type Code  PrimitiveType getPrimitiveTypeCode typeCode
Sets the primitive type code param type Code one of the primitive type code constants declared in this class exception Illegal Argument Exception if the argument is incorrect public void set Primitive Type Code Primitive Type Code type Code if type Code null throw new Illegal Argument Exception pre Value Change PRIMITIVE TYPE CODE PROPERTY this type Code type Code post Value Change PRIMITIVE TYPE CODE PROPERTY  typeCode IllegalArgumentException setPrimitiveTypeCode PrimitiveType typeCode typeCode IllegalArgumentException preValueChange PRIMITIVE_TYPE_CODE_PROPERTY typeCode typeCode postValueChange PRIMITIVE_TYPE_CODE_PROPERTY
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 1 4  ASTNode memSize BASE_NODE_SIZE
Method declared on AST Node int tree Size return mem Size  ASTNode treeSize memSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a qualified name owned by the given AST p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Qualified Name AST ast super ast  QualifiedName
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property QUALIFIER PROPERTY if get return get Qualifier else set Qualifier Name child return null if property NAME PROPERTY if get return get Name else set Name Simple Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode QUALIFIER_PROPERTY getQualifier setQualifier NAME_PROPERTY getName setName SimpleName internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return QUALIFIED NAME  ASTNode getNodeType0 QUALIFIED_NAME
AST Node clone0 AST target Qualified Name result new Qualified Name target result set Source Range this get Start Position this get Length result set Qualifier Name get Qualifier clone target result set Name Simple Name get Name clone target return result  ASTNode QualifiedName QualifiedName setSourceRange getStartPosition getLength setQualifier getQualifier setName SimpleName getName
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Qualifier accept Child visitor get Name visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getQualifier acceptChild getName endVisit
Returns the qualifier part of this qualified name return the qualifier part of this qualified name public Name get Qualifier if this qualifier null lazy init must be thread safe for readers synchronized this if this qualifier null pre Lazy Init this qualifier new Simple Name this ast post Lazy Init this qualifier QUALIFIER PROPERTY return this qualifier  getQualifier preLazyInit SimpleName postLazyInit QUALIFIER_PROPERTY
Sets the qualifier of this qualified name to the given name param qualifier the qualifier of this qualified name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Qualifier Name qualifier if qualifier null throw new Illegal Argument Exception AST Node old Child this qualifier pre Replace Child old Child qualifier QUALIFIER PROPERTY this qualifier qualifier post Replace Child old Child qualifier QUALIFIER PROPERTY  IllegalArgumentException setQualifier IllegalArgumentException ASTNode oldChild preReplaceChild oldChild QUALIFIER_PROPERTY postReplaceChild oldChild QUALIFIER_PROPERTY
Returns the name part of this qualified name return the name being qualified public Simple Name get Name if this name null lazy init must be thread safe for readers synchronized this if this name null pre Lazy Init this name new Simple Name this ast post Lazy Init this name NAME PROPERTY return this name  SimpleName getName preLazyInit SimpleName postLazyInit NAME_PROPERTY
Sets the name part of this qualified name to the given simple name param name the identifier of this qualified name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Name Simple Name name if name null throw new Illegal Argument Exception AST Node old Child this name pre Replace Child old Child name NAME PROPERTY this name name post Replace Child old Child name NAME PROPERTY  IllegalArgumentException setName SimpleName IllegalArgumentException ASTNode oldChild preReplaceChild oldChild NAME_PROPERTY postReplaceChild oldChild NAME_PROPERTY
void append Name String Buffer buffer get Qualifier append Name buffer buffer append get Name append Name buffer  appendName StringBuffer getQualifier appendName getName appendName
Method declared on AST Node int mem Size return BASE NAME NODE SIZE 2 4  ASTNode memSize BASE_NAME_NODE_SIZE
int tree Size return mem Size this name null 0 get Name tree Size this qualifier null 0 get Qualifier tree Size  treeSize memSize getName treeSize getQualifier treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented node for a qualified type owned by the given AST By default an unspecified but legal qualifier and name p N B This constructor is package private p param ast the AST that is to own this node Qualified Type AST ast super ast unsupported In2  QualifiedType unsupportedIn2
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property QUALIFIER PROPERTY if get return get Qualifier else set Qualifier Type child return null if property NAME PROPERTY if get return get Name else set Name Simple Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode QUALIFIER_PROPERTY getQualifier setQualifier NAME_PROPERTY getName setName SimpleName internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return QUALIFIED TYPE  ASTNode getNodeType0 QUALIFIED_TYPE
AST Node clone0 AST target Qualified Type result new Qualified Type target result set Source Range this get Start Position this get Length result set Qualifier Type AST Node get Qualifier clone target result set Name Simple Name AST Node get Name clone target return result  ASTNode QualifiedType QualifiedType setSourceRange getStartPosition getLength setQualifier ASTNode getQualifier setName SimpleName ASTNode getName
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Qualifier accept Child visitor get Name visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getQualifier acceptChild getName endVisit
Returns the qualifier of this qualified type return the qualifier of this qualified type public Type get Qualifier if this qualifier null lazy init must be thread safe for readers synchronized this if this qualifier null pre Lazy Init this qualifier new Simple Type this ast post Lazy Init this qualifier QUALIFIER PROPERTY return this qualifier  getQualifier preLazyInit SimpleType postLazyInit QUALIFIER_PROPERTY
Sets the qualifier of this qualified type to the given type param type the new qualifier of this qualified type exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Qualifier Type type if type null throw new Illegal Argument Exception AST Node old Child this qualifier pre Replace Child old Child type QUALIFIER PROPERTY this qualifier type post Replace Child old Child type QUALIFIER PROPERTY  IllegalArgumentException setQualifier IllegalArgumentException ASTNode oldChild preReplaceChild oldChild QUALIFIER_PROPERTY postReplaceChild oldChild QUALIFIER_PROPERTY
Returns the name part of this qualified type return the name being qualified public Simple Name get Name if this name null lazy init must be thread safe for readers synchronized this if this name null pre Lazy Init this name new Simple Name this ast post Lazy Init this name NAME PROPERTY return this name  SimpleName getName preLazyInit SimpleName postLazyInit NAME_PROPERTY
Sets the name part of this qualified type to the given simple name param name the identifier of this qualified name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Name Simple Name name if name null throw new Illegal Argument Exception AST Node old Child this name pre Replace Child old Child name NAME PROPERTY this name name post Replace Child old Child name NAME PROPERTY  IllegalArgumentException setName SimpleName IllegalArgumentException ASTNode oldChild preReplaceChild oldChild NAME_PROPERTY postReplaceChild oldChild NAME_PROPERTY
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this qualifier null 0 get Qualifier tree Size this name null 0 get Name tree Size  treeSize memSize getQualifier treeSize getName treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a return statement owned by the given AST By default the statement has no expression param ast the AST that is to own this node Return Statement AST ast super ast  ReturnStatement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return RETURN STATEMENT  ASTNode getNodeType0 RETURN_STATEMENT
AST Node clone0 AST target Return Statement result new Return Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Expression Expression AST Node copy Subtree target get Expression return result  ASTNode ReturnStatement ReturnStatement setSourceRange getStartPosition getLength copyLeadingComment setExpression ASTNode copySubtree getExpression
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Child visitor get Expression visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getExpression endVisit
Returns the expression of this return statement or code null code if there is none return the expression node or code null code if there is none public Expression get Expression return this optional Expression  getExpression optionalExpression
Sets or clears the expression of this return statement param expression the expression node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression AST Node old Child this optional Expression pre Replace Child old Child expression EXPRESSION PROPERTY this optional Expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression ASTNode oldChild optionalExpression preReplaceChild oldChild EXPRESSION_PROPERTY optionalExpression postReplaceChild oldChild EXPRESSION_PROPERTY
Method declared on AST Node int mem Size return super mem Size 1 4  ASTNode memSize memSize
int tree Size return mem Size this optional Expression null 0 get Expression tree Size  treeSize memSize optionalExpression getExpression treeSize

Creates a new instance for describing manipulations of the given AST param ast the AST whose nodes will be rewritten return the new rewriter instance public static AST Rewrite create AST ast return new AST Rewrite ast  ASTRewrite ASTRewrite
Internal constructor Creates a new instance for the given AST Clients should use link create AST to create instances param ast the AST being rewritten protected AST Rewrite AST ast this ast ast this event Store new Rewrite Event Store this node Store new Node Info Store ast  ASTRewrite eventStore RewriteEventStore nodeStore NodeInfoStore
Returns the AST the rewrite was set up on return the AST the rewrite was set up on public final AST getAST return this ast 
Internal method Returns the internal event store Clients should not use return Returns the internal event store Clients should not use protected final Rewrite Event Store get Rewrite Event Store return this event Store  RewriteEventStore getRewriteEventStore eventStore
Internal method Returns the internal node info store Clients should not use return Returns the internal info store Clients should not use protected final Node Info Store get Node Store return this node Store  NodeInfoStore getNodeStore nodeStore
Converts all modifications recorded by this rewriter into an object representing the corresponding text edits to the given document containing the original source code The document itself is not modified p Calling this methods does not discard the modifications on record Subsequence modifications are added to the ones already on record If this method is called again later the resulting text edit object will accurately reflect the net cumulative affect of all those changes p param document original document containing source code param options the table of formatter options key type code String code value type code String code or code null code to use the standard global options link Java Core get Options Java Core get Options return text edit object describing the changes to the document corresponding to the changes recorded by this rewriter throws Illegal Argument Exception An code Illegal Argument Exception code is thrown if the document passed does not correspond to the AST that is rewritten public Text Edit rewriteAST I Document document Map options throws Illegal Argument Exception if document null throw new Illegal Argument Exception Text Edit result new Multi Text Edit AST Node root Node get Root Node if root Node null validateAST Not Modified root Node get Rewrite Event Store mark Moved Nodes Removed Compilation Unit ast Root Compilation Unit root Node get Root AST Rewrite Analyzer visitor new AST Rewrite Analyzer document ast Root result this event Store this node Store options root Node accept visitor throws Illegal Argument Exception return result  JavaCore getOptions JavaCore getOptions IllegalArgumentException IllegalArgumentException TextEdit IDocument IllegalArgumentException IllegalArgumentException TextEdit MultiTextEdit ASTNode rootNode getRootNode rootNode validateASTNotModified rootNode getRewriteEventStore markMovedNodesRemoved CompilationUnit astRoot CompilationUnit rootNode getRoot ASTRewriteAnalyzer ASTRewriteAnalyzer astRoot eventStore nodeStore rootNode IllegalArgumentException
private AST Node get Root Node AST Node node null int start 1 int end 1 for Iterator iter get Rewrite Event Store get Change Root Iterator iter has Next AST Node curr AST Node iter next if Rewrite Event Store is New Node curr int curr Start curr get Start Position int curr End curr Start curr get Length if node null curr Start start curr End end start curr Start end curr End node curr else if curr Start start start curr Start else if curr End end end curr End if node null int curr Start node get Start Position int curr End curr Start node get Length while start curr Start end curr End go up until a node covers all node node get Parent curr Start node get Start Position curr End curr Start node get Length AST Node parent node get Parent go up until a parent has different range while parent null parent get Start Position node get Start Position parent get Length node get Length node parent parent node get Parent return node  ASTNode getRootNode ASTNode getRewriteEventStore getChangeRootIterator hasNext ASTNode ASTNode RewriteEventStore isNewNode currStart getStartPosition currEnd currStart getLength currStart currEnd currStart currEnd currStart currStart currEnd currEnd currStart getStartPosition currEnd currStart getLength currStart currEnd getParent currStart getStartPosition currEnd currStart getLength ASTNode getParent getStartPosition getStartPosition getLength getLength getParent
Removes the given node from its parent in this rewriter The AST itself is not actually modified in any way rather the rewriter just records a note that this node should not be there param node the node being removed param edit Group the edit group in which to collect the corresponding text edits or code null code if ungrouped throws Illegal Argument Exception if the node is null or if the node is not part of this rewriter s AST or if the described modification is invalid such as removing a required node public final void remove AST Node node Text Edit Group edit Group if node null throw new Illegal Argument Exception Structural Property Descriptor property node get Location In Parent if property is Child List Property get List Rewrite node get Parent Child List Property Descriptor property remove node edit Group else set node get Parent property null edit Group  editGroup IllegalArgumentException ASTNode TextEditGroup editGroup IllegalArgumentException StructuralPropertyDescriptor getLocationInParent isChildListProperty getListRewrite getParent ChildListPropertyDescriptor editGroup getParent editGroup
Replaces the given node in this rewriter The replacement node must either be brand new not part of the original AST or a placeholder node for example one created by link create Copy Target AST Node or link create String Placeholder String int The AST itself is not actually modified in any way rather the rewriter just records a note that this node has been replaced param node the node being replaced param replacement the replacement node or code null code if no replacement param edit Group the edit group in which to collect the corresponding text edits or code null code if ungrouped throws Illegal Argument Exception if the node is null or if the node is not part of this rewriter s AST or if the replacement node is not a new node or placeholder or if the described modification is otherwise invalid public final void replace AST Node node AST Node replacement Text Edit Group edit Group if node null throw new Illegal Argument Exception Structural Property Descriptor property node get Location In Parent if property is Child List Property get List Rewrite node get Parent Child List Property Descriptor property replace node replacement edit Group else set node get Parent property replacement edit Group  createCopyTarget ASTNode createStringPlaceholder editGroup IllegalArgumentException ASTNode ASTNode TextEditGroup editGroup IllegalArgumentException StructuralPropertyDescriptor getLocationInParent isChildListProperty getListRewrite getParent ChildListPropertyDescriptor editGroup getParent editGroup
Sets the given property of the given node If the given property is a child property the value must be a replacement node that is either be brand new not part of the original AST or a placeholder node for example one created by link create Copy Target AST Node or link create String Placeholder String int or it must be code null code indicating that the child should be deleted If the given property is a simple property the value must be the new value primitive types must be boxed or code null code The AST itself is not actually modified in any way rather the rewriter just records a note that this node has been changed in the specified way param node the node param property the node s property either a simple property or a child property param value the replacement child or new value or code null code if none param edit Group the edit group in which to collect the corresponding text edits or code null code if ungrouped throws Illegal Argument Exception if the node or property is null or if the node is not part of this rewriter s AST or if the property is not a node property or if the described modification is invalid public final void set AST Node node Structural Property Descriptor property Object value Text Edit Group edit Group if node null property null throw new Illegal Argument Exception validate Is InsideAST node validate Property Type property value Node Rewrite Event node Event this event Store get Node Event node property true node Event set New Value value if edit Group null this event Store set Event Edit Group node Event edit Group  createCopyTarget ASTNode createStringPlaceholder editGroup IllegalArgumentException ASTNode StructuralPropertyDescriptor TextEditGroup editGroup IllegalArgumentException validateIsInsideAST validatePropertyType NodeRewriteEvent nodeEvent eventStore getNodeEvent nodeEvent setNewValue editGroup eventStore setEventEditGroup nodeEvent editGroup
Creates and returns a new rewriter for describing modifications to the given list property of the given node param node the node param property the node s property the child list property return a new list rewriter object throws Illegal Argument Exception if the node or property is null or if the node is not part of this rewriter s AST or if the property is not a node property or if the described modification is invalid public final List Rewrite get List Rewrite AST Node node Child List Property Descriptor property if node null property null throw new Illegal Argument Exception validate Is InsideAST node validate Is List Property property return new List Rewrite this node property  IllegalArgumentException ListRewrite getListRewrite ASTNode ChildListPropertyDescriptor IllegalArgumentException validateIsInsideAST validateIsListProperty ListRewrite
Returns an object that tracks the source range of the given node across the rewrite to its AST Upon return the result object reflects the given node s current source range in the AST After code rewrite code is called the result object is updated to reflect the given node s source range in the rewritten AST param node the node to track return an object that tracks the source range of code node code throws Illegal Argument Exception if the node is null or if the node is not part of this rewriter s AST or if the node is already being tracked public final I Tracked Node Position track AST Node node if node null throw new Illegal Argument Exception Text Edit Group group this event Store get Tracked Node Data node if group null group new Text Edit Group internal NON NLS 1 this event Store set Tracked Node Data node group return new Tracked Node Position group node  IllegalArgumentException ITrackedNodePosition ASTNode IllegalArgumentException TextEditGroup eventStore getTrackedNodeData TextEditGroup eventStore setTrackedNodeData TrackedNodePosition
private void validate Is InsideAST AST Node node if node get Start Position 1 throw new Illegal Argument Exception Node is not an existing node NON NLS 1 if node getAST getAST throw new Illegal Argument Exception Node is not inside the AST NON NLS 1  validateIsInsideAST ASTNode getStartPosition IllegalArgumentException IllegalArgumentException
private void validate Is List Property Structural Property Descriptor property if property is Child List Property String message property get Id is not a list property NON NLS 1 throw new Illegal Argument Exception message  validateIsListProperty StructuralPropertyDescriptor isChildListProperty getId IllegalArgumentException
private void validate Property Type Structural Property Descriptor prop Object node if prop is Child List Property String message Can not modify a list property use a list rewriter NON NLS 1 throw new Illegal Argument Exception message if node null if prop is Simple Property prop is Child Property Child Property Descriptor prop is Mandatory String message Can not remove property prop get Id NON NLS 1 throw new Illegal Argument Exception message else if prop get Node Class is Instance node String message node get Class get Name is not a valid type for property prop get Id NON NLS 1 throw new Illegal Argument Exception message  validatePropertyType StructuralPropertyDescriptor isChildListProperty IllegalArgumentException isSimpleProperty isChildProperty ChildPropertyDescriptor isMandatory getId IllegalArgumentException getNodeClass isInstance getClass getName getId IllegalArgumentException
Creates and returns a placeholder node for a source string that is to be inserted into the output document at the position corresponding to the placeholder The string will be inserted without being reformatted beyond correcting the indentation level The placeholder node can either be inserted as new or used to replace an existing node param code the string to be inserted lines should should not have extra indentation param node Type the AST Node type that corresponds to the passed code return the new placeholder node throws Illegal Argument Exception if the code is null or if the node type is invalid public final AST Node create String Placeholder String code int node Type if code null throw new Illegal Argument Exception AST Node placeholder get Node Store new Placeholder Node node Type if placeholder null throw new Illegal Argument Exception String placeholder is not supported for type node Type NON NLS 1 get Node Store mark As String Placeholder placeholder code return placeholder  nodeType ASTNode IllegalArgumentException ASTNode createStringPlaceholder nodeType IllegalArgumentException ASTNode getNodeStore newPlaceholderNode nodeType IllegalArgumentException nodeType getNodeStore markAsStringPlaceholder
private AST Node create Target Node AST Node node boolean is Move if node null throw new Illegal Argument Exception validate Is InsideAST node Copy Source Info info get Rewrite Event Store mark As Copy Source node get Parent node get Location In Parent node is Move AST Node placeholder get Node Store new Placeholder Node node get Node Type if placeholder null throw new Illegal Argument Exception Creating a target node is not supported for nodes of type node get Class get Name NON NLS 1 get Node Store mark As Copy Target placeholder info return placeholder  ASTNode createTargetNode ASTNode isMove IllegalArgumentException validateIsInsideAST CopySourceInfo getRewriteEventStore markAsCopySource getParent getLocationInParent isMove ASTNode getNodeStore newPlaceholderNode getNodeType IllegalArgumentException getClass getName getNodeStore markAsCopyTarget
Creates and returns a placeholder node for a true copy of the given node The placeholder node can either be inserted as new or used to replace an existing node When the document is rewritten a copy of the source code for the given node is inserted into the output document at the position corresponding to the placeholder indentation is adjusted param node the node to create a copy placeholder for return the new placeholder node throws Illegal Argument Exception if the node is null or if the node is not part of this rewriter s AST public final AST Node create Copy Target AST Node node return create Target Node node false  IllegalArgumentException ASTNode createCopyTarget ASTNode createTargetNode
Creates and returns a placeholder node for the new locations of the given node After obtaining a placeholder the node should then to be removed or replaced The placeholder node can either be inserted as new or used to replace an existing node When the document is rewritten the source code for the given node is inserted into the output document at the position corresponding to the placeholder indentation is adjusted param node the node to create a move placeholder for return the new placeholder node throws Illegal Argument Exception if the node is null or if the node is not part of this rewriter s AST public final AST Node create Move Target AST Node node return create Target Node node true  IllegalArgumentException ASTNode createMoveTarget ASTNode createTargetNode
Returns a string suitable for debugging purposes only return a debug string public String to String String Buffer buf new String Buffer buf append Events n NON NLS 1 be extra careful of uninitialized or mangled instances if this event Store null buf append this event Store to String return buf to String  toString StringBuffer StringBuffer eventStore eventStore toString toString

Returns the original or modified start position of the tracked node depending if called before or after the rewrite is applied code 1 code is returned for removed nodes return the original or modified start position of the tracked node 
Returns the original or modified length of the tracked node depending if called before or after the rewrite is applied code 1 code is returned for removed nodes return the original or modified length of the tracked node 

package List Rewrite AST Rewrite rewriter AST Node parent Structural Property Descriptor child Property this rewriter rewriter this parent parent this child Property child Property  ListRewrite ASTRewrite ASTNode StructuralPropertyDescriptor childProperty childProperty childProperty
private Rewrite Event Store get Rewrite Store return this rewriter get Rewrite Event Store  RewriteEventStore getRewriteStore getRewriteEventStore
private List Rewrite Event get Event return get Rewrite Store get List Event this parent this child Property true  ListRewriteEvent getEvent getRewriteStore getListEvent childProperty
Removes the given node from its parent s list property in the rewriter The node must be contained in the list The AST itself is not actually modified in any way rather the rewriter just records a note that this node has been removed from this list param node the node being removed param edit Group the edit group in which to collect the corresponding text edits or code null code if ungrouped throws Illegal Argument Exception if the node is null or if the node is not part of this rewriter s AST or if the described modification is invalid not a member of this node s original list public void remove AST Node node Text Edit Group edit Group if node null throw new Illegal Argument Exception Rewrite Event event get Event remove Entry node if edit Group null get Rewrite Store set Event Edit Group event edit Group  editGroup IllegalArgumentException ASTNode TextEditGroup editGroup IllegalArgumentException RewriteEvent getEvent removeEntry editGroup getRewriteStore setEventEditGroup editGroup
Replaces the given node from its parent s list property in the rewriter The node must be contained in the list The replacement node must either be brand new not part of the original AST or a placeholder node for example one created by link AST Rewrite create Copy Target AST Node link AST Rewrite create Move Target AST Node or link AST Rewrite create String Placeholder String int The AST itself is not actually modified in any way rather the rewriter just records a note that this node has been replaced in this list param node the node being replaced param replacement the replacement node or code null code if no replacement param edit Group the edit group in which to collect the corresponding text edits or code null code if ungrouped throws Illegal Argument Exception if the node is null or if the node is not part of this rewriter s AST or if the replacement node is not a new node or placeholder or if the described modification is otherwise invalid not a member of this node s original list public void replace AST Node node AST Node replacement Text Edit Group edit Group if node null throw new Illegal Argument Exception Rewrite Event event get Event replace Entry node replacement if edit Group null get Rewrite Store set Event Edit Group event edit Group  ASTRewrite createCopyTarget ASTNode ASTRewrite createMoveTarget ASTNode ASTRewrite createStringPlaceholder editGroup IllegalArgumentException ASTNode ASTNode TextEditGroup editGroup IllegalArgumentException RewriteEvent getEvent replaceEntry editGroup getRewriteStore setEventEditGroup editGroup
Inserts the given node into the list after the given element The existing node must be in the list either as an original or as a new node that has been inserted The inserted node must either be brand new not part of the original AST or a placeholder node for example one created by link AST Rewrite create Copy Target AST Node link AST Rewrite create Move Target AST Node or link AST Rewrite create String Placeholder String int The AST itself is not actually modified in any way rather the rewriter just records a note that this node has been inserted into the list param node the node to insert param element the element after which the given node is to be inserted param edit Group the edit group in which to collect the corresponding text edits or code null code if ungrouped throws Illegal Argument Exception if the node or element is null or if the node is not part of this rewriter s AST or if the inserted node is not a new node or placeholder or if code element code is not a member of the list original or new or if the described modification is otherwise invalid public void insert After AST Node node AST Node element Text Edit Group edit Group if node null element null throw new Illegal Argument Exception int index get Event get Index element List Rewrite Event BOTH if index 1 throw new Illegal Argument Exception Node does not exist NON NLS 1 internal Insert At node index 1 true edit Group  ASTRewrite createCopyTarget ASTNode ASTRewrite createMoveTarget ASTNode ASTRewrite createStringPlaceholder editGroup IllegalArgumentException insertAfter ASTNode ASTNode TextEditGroup editGroup IllegalArgumentException getEvent getIndex ListRewriteEvent IllegalArgumentException internalInsertAt editGroup
Inserts the given node into the list before the given element The existing node must be in the list either as an original or as a new node that has been inserted The inserted node must either be brand new not part of the original AST or a placeholder node for example one created by link AST Rewrite create Copy Target AST Node link AST Rewrite create Move Target AST Node or link AST Rewrite create String Placeholder String int The AST itself is not actually modified in any way rather the rewriter just records a note that this node has been inserted into the list param node the node to insert param element the element before which the given node is to be inserted param edit Group the edit group in which to collect the corresponding text edits or code null code if ungrouped throws Illegal Argument Exception if the node or element is null or if the node is not part of this rewriter s AST or if the inserted node is not a new node or placeholder or if code element code is not a member of the list original or new or if the described modification is otherwise invalid public void insert Before AST Node node AST Node element Text Edit Group edit Group if node null element null throw new Illegal Argument Exception int index get Event get Index element List Rewrite Event BOTH if index 1 throw new Illegal Argument Exception Node does not exist NON NLS 1 internal Insert At node index false edit Group  ASTRewrite createCopyTarget ASTNode ASTRewrite createMoveTarget ASTNode ASTRewrite createStringPlaceholder editGroup IllegalArgumentException insertBefore ASTNode ASTNode TextEditGroup editGroup IllegalArgumentException getEvent getIndex ListRewriteEvent IllegalArgumentException internalInsertAt editGroup
Inserts the given node into the list at the start of the list Equivalent to code insert At node 0 edit Group code param node the node to insert param edit Group the edit group in which to collect the corresponding text edits or code null code if ungrouped throws Illegal Argument Exception if the node is null or if the node is not part of this rewriter s AST or if the inserted node is not a new node or placeholder or if the described modification is otherwise invalid not a member of this node s original list see insert At AST Node int Text Edit Group public void insert First AST Node node Text Edit Group edit Group if node null throw new Illegal Argument Exception internal Insert At node 0 false edit Group  insertAt editGroup editGroup IllegalArgumentException insertAt ASTNode TextEditGroup insertFirst ASTNode TextEditGroup editGroup IllegalArgumentException internalInsertAt editGroup
Inserts the given node into the list at the end of the list Equivalent to code insert At node 1 edit Group code param node the node to insert param edit Group the edit group in which to collect the corresponding text edits or code null code if ungrouped throws Illegal Argument Exception if the node is null or if the node is not part of this rewriter s AST or if the inserted node is not a new node or placeholder or if the described modification is otherwise invalid not a member of this node s original list see insert At AST Node int Text Edit Group public void insert Last AST Node node Text Edit Group edit Group if node null throw new Illegal Argument Exception internal Insert At node 1 true edit Group  insertAt editGroup editGroup IllegalArgumentException insertAt ASTNode TextEditGroup insertLast ASTNode TextEditGroup editGroup IllegalArgumentException internalInsertAt editGroup
Inserts the given node into the list at the given index The index corresponds to a combined list of original and new nodes removed or replaced nodes are still in the combined list The inserted node must either be brand new not part of the original AST or a placeholder node for example one created by link AST Rewrite create Copy Target AST Node link AST Rewrite create Move Target AST Node or link AST Rewrite create String Placeholder String int The AST itself is not actually modified in any way rather the rewriter just records a note that this node has been inserted into the list param node the node to insert param index insertion index in the combined list of original and inserted nodes code 1 code indicates insertion as the last element param edit Group the edit group in which to collect the corresponding text edits or code null code if ungrouped throws Illegal Argument Exception if the node is null or if the node is not part of this rewriter s AST or if the inserted node is not a new node or placeholder or if the described modification is otherwise invalid not a member of this node s original list throws Index Out Of Bounds Exception if the index is negative and not 1 or if it is larger than the size of the combined list public void insert At AST Node node int index Text Edit Group edit Group if node null throw new Illegal Argument Exception internal Insert At node index is Insert Bound To Previous By Default node edit Group  ASTRewrite createCopyTarget ASTNode ASTRewrite createMoveTarget ASTNode ASTRewrite createStringPlaceholder editGroup IllegalArgumentException IndexOutOfBoundsException insertAt ASTNode TextEditGroup editGroup IllegalArgumentException internalInsertAt isInsertBoundToPreviousByDefault editGroup
private void internal Insert At AST Node node int index boolean bound To Previous Text Edit Group edit Group Rewrite Event event get Event insert node index if bound To Previous get Rewrite Store set Insert Bound To Previous node if edit Group null get Rewrite Store set Event Edit Group event edit Group  internalInsertAt ASTNode boundToPrevious TextEditGroup editGroup RewriteEvent getEvent boundToPrevious getRewriteStore setInsertBoundToPrevious editGroup getRewriteStore setEventEditGroup editGroup
private AST Node create Target Node AST Node first AST Node last boolean is Move if first null last null throw new Illegal Argument Exception validate Is InsideAST node Copy Source Info info get Rewrite Store mark As Range Copy Source this parent this child Property first last is Move Node Info Store node Store this rewriter get Node Store AST Node placeholder node Store new Placeholder Node first get Node Type revisit could use list type if placeholder null throw new Illegal Argument Exception Creating a target node is not supported for nodes of type first get Class get Name NON NLS 1 node Store mark As Copy Target placeholder info return placeholder  ASTNode createTargetNode ASTNode ASTNode isMove IllegalArgumentException validateIsInsideAST CopySourceInfo getRewriteStore markAsRangeCopySource childProperty isMove NodeInfoStore nodeStore getNodeStore ASTNode nodeStore newPlaceholderNode getNodeType IllegalArgumentException getClass getName nodeStore markAsCopyTarget
Creates and returns a placeholder node for a true copy of a range of nodes of the current list The placeholder node can either be inserted as new or used to replace an existing node When the document is rewritten a copy of the source code for the given node range is inserted into the output document at the position corresponding to the placeholder indentation is adjusted param first the node that starts the range param last the node that ends the range return the new placeholder node throws Illegal Argument Exception if the node is null or if the node is not part of this rewriter s AST public final AST Node create Copy Target AST Node first AST Node last if first last return this rewriter create Copy Target first else return create Target Node first last false  IllegalArgumentException ASTNode createCopyTarget ASTNode ASTNode createCopyTarget createTargetNode
Heuristic to decide if a inserted node is bound to previous or the next sibling private boolean is Insert Bound To Previous By Default AST Node node return node instanceof Statement node instanceof Field Declaration  isInsertBoundToPreviousByDefault ASTNode FieldDeclaration
Returns the original nodes in the list property managed by this rewriter The returned list is unmodifiable return a list of all original nodes in the list public List get Original List List list List get Event get Original Value return Collections unmodifiable List list  getOriginalList getEvent getOriginalValue unmodifiableList
Returns the nodes in the revised list property managed by this rewriter The returned list is unmodifiable return a list of all nodes in the list taking into account all the described changes public List get Rewritten List List list List get Event get New Value return Collections unmodifiable List list  getRewrittenList getEvent getNewValue unmodifiableList

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the AST JLS constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a simple name owned by the given AST The new node has an unspecified legal Java identifier p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Simple Name AST ast super ast  SimpleName
since 3 0 final List internal Structural Properties For Type int api Level return property Descriptors api Level  internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final Object internal Get Set Object Property Simple Property Descriptor property boolean get Object value if property IDENTIFIER PROPERTY if get return get Identifier else set Identifier String value return null allow default implementation to flag the error return super internal Get Set Object Property property get value  internalGetSetObjectProperty SimplePropertyDescriptor IDENTIFIER_PROPERTY getIdentifier setIdentifier internalGetSetObjectProperty
Method declared on AST Node final int get Node Type0 return SIMPLE NAME  ASTNode getNodeType0 SIMPLE_NAME
AST Node clone0 AST target Simple Name result new Simple Name target result set Source Range this get Start Position this get Length result set Identifier get Identifier return result  ASTNode SimpleName SimpleName setSourceRange getStartPosition getLength setIdentifier getIdentifier
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
Method declared on AST Node void accept0 AST Visitor visitor visitor visit this visitor end Visit this  ASTNode ASTVisitor endVisit
Returns this node s identifier return the identifier of this node public String get Identifier return this identifier  getIdentifier
Sets the identifier of this node to the given value The identifier should be legal according to the rules of the Java language Note that keywords are not legal identifiers p Note that the list of keywords may depend on the version of the language determined when the AST object was created p param identifier the identifier of this node exception Illegal Argument Exception if the identifier is invalid public void set Identifier String identifier if identifier null throw new Illegal Argument Exception Scanner scanner this ast scanner char source identifier to Char Array scanner set Source source scanner reset To 0 source length try int token Type scanner get Next Token switch token Type case Terminal Tokens Token Name Identifier break default throw new Illegal Argument Exception catch Invalid Input Exception e throw new Illegal Argument Exception pre Value Change IDENTIFIER PROPERTY this identifier identifier post Value Change IDENTIFIER PROPERTY  IllegalArgumentException setIdentifier IllegalArgumentException toCharArray setSource resetTo tokenType getNextToken tokenType TerminalTokens TokenNameIdentifier IllegalArgumentException InvalidInputException IllegalArgumentException preValueChange IDENTIFIER_PROPERTY postValueChange IDENTIFIER_PROPERTY
Returns whether this simple name represents a name that is being defined as opposed to one being referenced The following positions are considered ones where a name is defined ul li The type name in a code Type Declaration code node li li The method name in a code Method Declaration code node providing code is Constructor code is code false code li li The variable name in any type of code Variable Declaration code node li li The enum type name in a code Enum Declaration code node li li The enum constant name in an code Enum Constant Declaration code node li li The variable name in an code Enhanced For Statement code node li li The type variable name in a code Type Parameter code node li li The type name in an code Annotation Type Declaration code node li li The member name in an code Annotation Type Member Declaration code node li ul p Note that this is a convenience method that simply checks whether this node appears in the declaration position relative to its parent It always returns code false code if this node is unparented p return code true code if this node declares a name and code false code otherwise public boolean is Declaration Structural Property Descriptor d get Location In Parent if d null unparented node return false AST Node parent get Parent if parent instanceof Type Declaration return d Type Declaration NAME PROPERTY if parent instanceof Method Declaration Method Declaration p Method Declaration parent could be the name of the method or constructor return p is Constructor d Method Declaration NAME PROPERTY if parent instanceof Single Variable Declaration return d Single Variable Declaration NAME PROPERTY if parent instanceof Variable Declaration Fragment return d Variable Declaration Fragment NAME PROPERTY if parent instanceof Enum Declaration return d Enum Declaration NAME PROPERTY if parent instanceof Enum Constant Declaration return d Enum Constant Declaration NAME PROPERTY if parent instanceof Type Parameter return d Type Parameter NAME PROPERTY if parent instanceof Annotation Type Declaration return d Annotation Type Declaration NAME PROPERTY if parent instanceof Annotation Type Member Declaration return d Annotation Type Member Declaration NAME PROPERTY return false  TypeDeclaration MethodDeclaration isConstructor VariableDeclaration EnumDeclaration EnumConstantDeclaration EnhancedForStatement TypeParameter AnnotationTypeDeclaration AnnotationTypeMemberDeclaration isDeclaration StructuralPropertyDescriptor getLocationInParent ASTNode getParent TypeDeclaration TypeDeclaration NAME_PROPERTY MethodDeclaration MethodDeclaration MethodDeclaration isConstructor MethodDeclaration NAME_PROPERTY SingleVariableDeclaration SingleVariableDeclaration NAME_PROPERTY VariableDeclarationFragment VariableDeclarationFragment NAME_PROPERTY EnumDeclaration EnumDeclaration NAME_PROPERTY EnumConstantDeclaration EnumConstantDeclaration NAME_PROPERTY TypeParameter TypeParameter NAME_PROPERTY AnnotationTypeDeclaration AnnotationTypeDeclaration NAME_PROPERTY AnnotationTypeMemberDeclaration AnnotationTypeMemberDeclaration NAME_PROPERTY
Method declared on Name void append Name String Buffer buffer buffer append get Identifier  appendName StringBuffer getIdentifier
int mem Size int size BASE NAME NODE SIZE 1 4 if identifier MISSING IDENTIFIER everything but our missing id costs size string Size identifier return size  memSize BASE_NAME_NODE_SIZE MISSING_IDENTIFIER stringSize
Method declared on AST Node int tree Size return mem Size  ASTNode treeSize memSize

Creates a new simple property descriptor with the given property id Note that this constructor is declared package private so that property descriptors can only be created by the AST implementation param node Class concrete AST node type that owns this property param property Id the property id param value Type the value type of this property param mandatory code true code if the property is mandatory and code false code if it is may be code null code Simple Property Descriptor Class node Class String property Id Class value Type boolean mandatory super node Class property Id if value Type null AST Node class is Assignable From value Type throw new Illegal Argument Exception this value Type value Type this mandatory mandatory  nodeClass propertyId valueType SimplePropertyDescriptor nodeClass propertyId valueType nodeClass propertyId valueType ASTNode isAssignableFrom valueType IllegalArgumentException valueType valueType
Returns the value type of this property p For example for a node type like Single Variable Declaration the modifiers property returns code int class code p return the value type of the property public Class get Value Type return this value Type  SingleVariableDeclaration getValueType valueType
Returns whether this property is mandatory A property value is not allowed to be code null code if it is mandatory return code true code if the property is mandatory and code false code if it is may be code null code public boolean is Mandatory return this mandatory  isMandatory

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented node for a simple type owned by the given AST By default an unspecified but legal name p N B This constructor is package private p param ast the AST that is to own this node Simple Type AST ast super ast  SimpleType
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property NAME PROPERTY if get return get Name else set Name Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode NAME_PROPERTY getName setName internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return SIMPLE TYPE  ASTNode getNodeType0 SIMPLE_TYPE
AST Node clone0 AST target Simple Type result new Simple Type target result set Source Range this get Start Position this get Length result set Name Name get Name clone target return result  ASTNode SimpleType SimpleType setSourceRange getStartPosition getLength setName getName
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Child visitor get Name visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getName endVisit
Returns the name of this simple type return the name of this simple type public Name get Name if this type Name null lazy init must be thread safe for readers synchronized this if this type Name null pre Lazy Init this type Name new Simple Name this ast post Lazy Init this type Name NAME PROPERTY return this type Name  getName typeName typeName preLazyInit typeName SimpleName postLazyInit typeName NAME_PROPERTY typeName
Sets the name of this simple type to the given name param type Name the new name of this simple type exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Name Name type Name if type Name null throw new Illegal Argument Exception AST Node old Child this type Name pre Replace Child old Child type Name NAME PROPERTY this type Name type Name post Replace Child old Child type Name NAME PROPERTY  typeName IllegalArgumentException setName typeName typeName IllegalArgumentException ASTNode oldChild typeName preReplaceChild oldChild typeName NAME_PROPERTY typeName typeName postReplaceChild oldChild typeName NAME_PROPERTY
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 1 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this type Name null 0 get Name tree Size  treeSize memSize typeName getName treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the AST JLS constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented normal annotation node owned by the given AST By default the annotation has an unspecified type name and an unspecified value p N B This constructor is package private p param ast the AST that is to own this node Single Member Annotation AST ast super ast unsupported In2  SingleMemberAnnotation unsupportedIn2
since 3 0 final List internal Structural Properties For Type int api Level return property Descriptors api Level  internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property TYPE NAME PROPERTY if get return get Type Name else set Type Name Name child return null if property VALUE PROPERTY if get return get Value else set Value Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode TYPE_NAME_PROPERTY getTypeName setTypeName VALUE_PROPERTY getValue setValue internalGetSetChildProperty
Method declared on Body Declaration final Child Property Descriptor internal Type Name Property return TYPE NAME PROPERTY  BodyDeclaration ChildPropertyDescriptor internalTypeNameProperty TYPE_NAME_PROPERTY
Method declared on AST Node final int get Node Type0 return SINGLE MEMBER ANNOTATION  ASTNode getNodeType0 SINGLE_MEMBER_ANNOTATION
AST Node clone0 AST target Single Member Annotation result new Single Member Annotation target result set Source Range this get Start Position this get Length result set Type Name Name AST Node copy Subtree target get Type Name result set Value Expression AST Node copy Subtree target get Value return result  ASTNode SingleMemberAnnotation SingleMemberAnnotation setSourceRange getStartPosition getLength setTypeName ASTNode copySubtree getTypeName setValue ASTNode copySubtree getValue
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Type Name accept Child visitor get Value visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getTypeName acceptChild getValue endVisit
Returns the value of this annotation return the value node public Expression get Value if this value null lazy init must be thread safe for readers synchronized this if this value null pre Lazy Init this value new Simple Name this ast post Lazy Init this value VALUE PROPERTY return this value  getValue preLazyInit SimpleName postLazyInit VALUE_PROPERTY
Sets the value of this annotation param value the new value exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Value Expression value if value null throw new Illegal Argument Exception AST Node old Child this value pre Replace Child old Child value VALUE PROPERTY this value value post Replace Child old Child value VALUE PROPERTY  IllegalArgumentException setValue IllegalArgumentException ASTNode oldChild preReplaceChild oldChild VALUE_PROPERTY postReplaceChild oldChild VALUE_PROPERTY
Method declared on AST Node int mem Size return super mem Size 1 4  ASTNode memSize memSize
int tree Size return mem Size this type Name null 0 get Type Name tree Size this value null 0 get Value tree Size  treeSize memSize typeName getTypeName treeSize getValue treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new AST node for a variable declaration owned by the given AST By default the variable declaration has no modifiers an unspecified but legal type an unspecified but legal variable name 0 dimensions after the variable no initializer not variable arity p N B This constructor is package private p param ast the AST that is to own this node Single Variable Declaration AST ast super ast if ast api Level AST JLS3 this modifiers new AST Node Node List MODIFIERS2 PROPERTY  SingleVariableDeclaration apiLevel ASTNode NodeList MODIFIERS2_PROPERTY
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final int internal Get Set Int Property Simple Property Descriptor property boolean get int value if property MODIFIERS PROPERTY if get return get Modifiers else set Modifiers value return 0 if property EXTRA DIMENSIONS PROPERTY if get return get Extra Dimensions else set Extra Dimensions value return 0 allow default implementation to flag the error return super internal Get Set Int Property property get value  internalGetSetIntProperty SimplePropertyDescriptor MODIFIERS_PROPERTY getModifiers setModifiers EXTRA_DIMENSIONS_PROPERTY getExtraDimensions setExtraDimensions internalGetSetIntProperty
final boolean internal Get Set Boolean Property Simple Property Descriptor property boolean get boolean value if property VARARGS PROPERTY if get return is Varargs else set Varargs value return false allow default implementation to flag the error return super internal Get Set Boolean Property property get value  internalGetSetBooleanProperty SimplePropertyDescriptor VARARGS_PROPERTY isVarargs setVarargs internalGetSetBooleanProperty
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property NAME PROPERTY if get return get Name else set Name Simple Name child return null if property TYPE PROPERTY if get return get Type else set Type Type child return null if property INITIALIZER PROPERTY if get return get Initializer else set Initializer Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode NAME_PROPERTY getName setName SimpleName TYPE_PROPERTY getType setType INITIALIZER_PROPERTY getInitializer setInitializer internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property MODIFIERS2 PROPERTY return modifiers allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor MODIFIERS2_PROPERTY internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return SINGLE VARIABLE DECLARATION  ASTNode getNodeType0 SINGLE_VARIABLE_DECLARATION
AST Node clone0 AST target Single Variable Declaration result new Single Variable Declaration target result set Source Range this get Start Position this get Length if this ast api Level AST JLS2 result set Modifiers get Modifiers else result modifiers add All AST Node copy Subtrees target modifiers result set Varargs is Varargs result set Type Type get Type clone target result set Extra Dimensions get Extra Dimensions result set Name Simple Name get Name clone target result set Initializer Expression AST Node copy Subtree target get Initializer return result  ASTNode SingleVariableDeclaration SingleVariableDeclaration setSourceRange getStartPosition getLength apiLevel setModifiers getModifiers addAll ASTNode copySubtrees setVarargs isVarargs setType getType setExtraDimensions getExtraDimensions setName SimpleName getName setInitializer ASTNode copySubtree getInitializer
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order if this ast api Level AST JLS3 accept Children visitor this modifiers accept Child visitor get Type accept Child visitor get Name accept Child visitor get Initializer visitor end Visit this  ASTVisitor visitChildren visitChildren apiLevel acceptChildren acceptChild getType acceptChild getName acceptChild getInitializer endVisit
Returns the live ordered list of modifiers and annotations of this declaration added in JLS3 API p Note that the final modifier is the only meaningful modifier for local variable and formal parameter declarations p return the live list of modifiers and annotations element type code I Extended Modifier code exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public List modifiers more efficient than just calling unsupported In2 to check if this modifiers null unsupported In2 return this modifiers  IExtendedModifier UnsupportedOperationException unsupportedIn2 unsupportedIn2
Returns the modifiers explicitly specified on this declaration p In the JLS3 API this method is a convenience method that computes these flags from code modifiers code p return the bit wise or of code Modifier code constants see Modifier public int get Modifiers more efficient than checking getAST API LEVEL if this modifiers null JLS2 behavior bona fide property return this modifier Flags else JLS3 behavior convenient method performance could be improved by caching computed flags but this would require tracking changes to this modifiers int computed Modifier Flags Modifier NONE for Iterator it modifiers iterator it has Next Object x it next if x instanceof Modifier computed Modifier Flags Modifier x get Keyword to Flag Value return computed Modifier Flags  getModifiers API_LEVEL modifierFlags computedModifierFlags hasNext computedModifierFlags getKeyword toFlagValue computedModifierFlags
Sets the modifiers explicitly specified on this declaration JLS2 API only p The following modifiers are meaningful for fields public private protected static final volatile and transient For local variable and formal parameter declarations the only meaningful modifier is final p param modifiers the given modifiers bit wise or of code Modifier code constants exception Unsupported Operation Exception if this operation is used in an AST later than JLS2 see Modifier TODO jeem When JLS3 support is complete post 3 0 deprecated In the JLS3 API this method is replaced by code modifiers code which contains a list of a code Modifier code nodes public void set Modifiers int modifiers supported Only In2 pre Value Change MODIFIERS PROPERTY this modifier Flags modifiers post Value Change MODIFIERS PROPERTY  UnsupportedOperationException setModifiers supportedOnlyIn2 preValueChange MODIFIERS_PROPERTY modifierFlags postValueChange MODIFIERS_PROPERTY
public Simple Name get Name if this variable Name null lazy init must be thread safe for readers synchronized this if this variable Name null pre Lazy Init this variable Name new Simple Name this ast post Lazy Init this variable Name NAME PROPERTY return this variable Name  SimpleName getName variableName variableName preLazyInit variableName SimpleName postLazyInit variableName NAME_PROPERTY variableName
public void set Name Simple Name variable Name if variable Name null throw new Illegal Argument Exception AST Node old Child this variable Name pre Replace Child old Child variable Name NAME PROPERTY this variable Name variable Name post Replace Child old Child variable Name NAME PROPERTY  setName SimpleName variableName variableName IllegalArgumentException ASTNode oldChild variableName preReplaceChild oldChild variableName NAME_PROPERTY variableName variableName postReplaceChild oldChild variableName NAME_PROPERTY
Returns the type of the variable declared in this variable declaration exclusive of any extra array dimensions return the type public Type get Type if this type null lazy init must be thread safe for readers synchronized this if this type null pre Lazy Init this type this ast new Primitive Type Primitive Type INT post Lazy Init this type TYPE PROPERTY return this type  getType preLazyInit newPrimitiveType PrimitiveType postLazyInit TYPE_PROPERTY
Sets the type of the variable declared in this variable declaration to the given type exclusive of any extra array dimensions param type the new type exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Type Type type if type null throw new Illegal Argument Exception AST Node old Child this type pre Replace Child old Child type TYPE PROPERTY this type type post Replace Child old Child type TYPE PROPERTY  IllegalArgumentException setType IllegalArgumentException ASTNode oldChild preReplaceChild oldChild TYPE_PROPERTY postReplaceChild oldChild TYPE_PROPERTY
Returns whether this declaration declares the last parameter of a variable arity method added in JLS3 API p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p return code true code if this is a variable arity parameter declaration and code false code otherwise exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public boolean is Varargs more efficient than just calling unsupported In2 to check if this modifiers null unsupported In2 return this variable Arity  UnsupportedOperationException isVarargs unsupportedIn2 unsupportedIn2 variableArity
Sets whether this declaration declares the last parameter of a variable arity method added in JLS3 API p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p param variable Arity code true code if this is a variable arity parameter declaration and code false code otherwise since 3 0 public void set Varargs boolean variable Arity more efficient than just calling unsupported In2 to check if this modifiers null unsupported In2 pre Value Change VARARGS PROPERTY this variable Arity variable Arity post Value Change VARARGS PROPERTY  variableArity setVarargs variableArity unsupportedIn2 unsupportedIn2 preValueChange VARARGS_PROPERTY variableArity variableArity postValueChange VARARGS_PROPERTY
since 2 1 public int get Extra Dimensions return this extra Array Dimensions  getExtraDimensions extraArrayDimensions
public void set Extra Dimensions int dimensions if dimensions 0 throw new Illegal Argument Exception pre Value Change EXTRA DIMENSIONS PROPERTY this extra Array Dimensions dimensions post Value Change EXTRA DIMENSIONS PROPERTY  setExtraDimensions IllegalArgumentException preValueChange EXTRA_DIMENSIONS_PROPERTY extraArrayDimensions postValueChange EXTRA_DIMENSIONS_PROPERTY
Method declared on Variable Declaration public Expression get Initializer return this optional Initializer  VariableDeclaration getInitializer optionalInitializer
public void set Initializer Expression initializer a Single Variable Declaration may occur inside an Expression must check cycles AST Node old Child this optional Initializer pre Replace Child old Child initializer INITIALIZER PROPERTY this optional Initializer initializer post Replace Child old Child initializer INITIALIZER PROPERTY  setInitializer SingleVariableDeclaration ASTNode oldChild optionalInitializer preReplaceChild oldChild INITIALIZER_PROPERTY optionalInitializer postReplaceChild oldChild INITIALIZER_PROPERTY
Method declared on AST Node int mem Size treat Operator as free return BASE NODE SIZE 7 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this modifiers null 0 this modifiers list Size this type null 0 get Type tree Size this variable Name null 0 get Name tree Size this optional Initializer null 0 get Initializer tree Size  treeSize memSize listSize getType treeSize variableName getName treeSize optionalInitializer getInitializer treeSize

Creates a new AST node for a statement owned by the given AST p N B This constructor is package private p param ast the AST that is to own this node Statement AST ast super ast 
Returns the leading comment string including the starting and ending comment delimiters and any embedded line breaks p A leading comment is a comment that appears before the statement It may be either a traditional comment or an end of line comment Traditional comments must begin with 42 may contain line breaks and must end with 42 End of line comments must begin with must end with a line delimiter as per JLS 3 7 and must not contain line breaks p return the comment string or code null code if none deprecated This feature was removed in the 2 1 release because it was only a partial and inadequate solution to the issue of associating comments with statements Furthermore AST parse Compilation Unit did not associate leading comments making this moot Clients that need to access comments preceding a statement should either consult the compilation unit s linkplain Compilation Unit get Comment List comment table or use a scanner to reanalyze the source text immediately preceding the statement s source range public String get Leading Comment return optional Leading Comment  parseCompilationUnit CompilationUnit getCommentList getLeadingComment optionalLeadingComment
Sets or clears the leading comment string The comment string must include the starting and ending comment delimiters and any embedded linebreaks p A leading comment is a comment that appears before the statement It may be either a traditional comment or an end of line comment Traditional comments must begin with 42 may contain line breaks and must end with 42 End of line comments must begin with as per JLS 3 7 and must not contain line breaks p p Examples code pre set Leading Comment 42 traditional comment 42 correct set Leading Comment missing comment delimiters wrong set Leading Comment 42 unterminated traditional comment wrong set Leading Comment 42 broken n traditional comment 42 correct set Leading Comment end of line comment n correct set Leading Comment end of line comment without line terminator correct set Leading Comment broken n end of line comment n wrong pre code p param comment the comment string or code null code if none exception Illegal Argument Exception if the comment string is invalid deprecated This feature was removed in the 2 1 release because it was only a partial and inadequate solution to the issue of associating comments with statements public void set Leading Comment String comment if comment null char source comment to Char Array Scanner scanner this ast scanner scanner reset To 0 source length scanner set Source source try int token boolean only One Comment false while token scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens TokenNameCOMMENT BLOCK case Terminal Tokens TokenNameCOMMENT JAVADOC case Terminal Tokens TokenNameCOMMENT LINE if only One Comment throw new Illegal Argument Exception only One Comment true break default only One Comment false if only One Comment throw new Illegal Argument Exception catch Invalid Input Exception e throw new Illegal Argument Exception we do not consider the obsolete comment as a structureal property but we protect them nevertheless check Modifiable this optional Leading Comment comment  setLeadingComment setLeadingComment setLeadingComment setLeadingComment setLeadingComment setLeadingComment setLeadingComment IllegalArgumentException setLeadingComment toCharArray resetTo setSource onlyOneComment getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameCOMMENT_BLOCK TerminalTokens TokenNameCOMMENT_JAVADOC TerminalTokens TokenNameCOMMENT_LINE onlyOneComment IllegalArgumentException onlyOneComment onlyOneComment onlyOneComment IllegalArgumentException InvalidInputException IllegalArgumentException checkModifiable optionalLeadingComment
Copies the leading comment from the given statement param source the statement that supplies the leading comment since 2 1 void copy Leading Comment Statement source set Leading Comment source get Leading Comment  copyLeadingComment setLeadingComment getLeadingComment
Method declared on AST Node int mem Size int size BASE NODE SIZE 1 4 string Size get Leading Comment return size  ASTNode memSize BASE_NODE_SIZE stringSize getLeadingComment

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented string literal node owned by the given AST By default the string literal denotes the empty string p N B This constructor is package private p param ast the AST that is to own this node String Literal AST ast super ast  StringLiteral
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final Object internal Get Set Object Property Simple Property Descriptor property boolean get Object value if property ESCAPED VALUE PROPERTY if get return get Escaped Value else set Escaped Value String value return null allow default implementation to flag the error return super internal Get Set Object Property property get value  internalGetSetObjectProperty SimplePropertyDescriptor ESCAPED_VALUE_PROPERTY getEscapedValue setEscapedValue internalGetSetObjectProperty
Method declared on AST Node final int get Node Type0 return STRING LITERAL  ASTNode getNodeType0 STRING_LITERAL
AST Node clone0 AST target String Literal result new String Literal target result set Source Range this get Start Position this get Length result set Escaped Value get Escaped Value return result  ASTNode StringLiteral StringLiteral setSourceRange getStartPosition getLength setEscapedValue getEscapedValue
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
Method declared on AST Node void accept0 AST Visitor visitor visitor visit this visitor end Visit this  ASTNode ASTVisitor endVisit
Returns the string value of this literal node to the given string literal token The token is the sequence of characters that would appear in the source program including enclosing double quotes and embedded escapes return the string literal token including enclosing double quotes and embedded escapes public String get Escaped Value return this escaped Value  getEscapedValue escapedValue
Sets the string value of this literal node to the given string literal token The token is the sequence of characters that would appear in the source program including enclosing double quotes and embedded escapes For example ul li code code code set Literal code li li code hello world code code set Literal hello world code li li code boo nhoo code code set Literal boo nhoo code li ul param token the string literal token including enclosing double quotes and embedded escapes exception Illegal Argument Exception if the argument is incorrect public void set Escaped Value String token if token null throw new Illegal Argument Exception Token cannot be null NON NLS 1 Scanner scanner this ast scanner char source token to Char Array scanner set Source source scanner reset To 0 source length try int token Type scanner get Next Token switch token Type case Terminal Tokens Token Name String Literal break default throw new Illegal Argument Exception Invalid string literal token NON NLS 1 NON NLS 2 catch Invalid Input Exception e throw new Illegal Argument Exception Invalid string literal token NON NLS 1 NON NLS 2 pre Value Change ESCAPED VALUE PROPERTY this escaped Value token post Value Change ESCAPED VALUE PROPERTY  setLiteral setLiteral setLiteral IllegalArgumentException setEscapedValue IllegalArgumentException toCharArray setSource resetTo tokenType getNextToken tokenType TerminalTokens TokenNameStringLiteral IllegalArgumentException InvalidInputException IllegalArgumentException preValueChange ESCAPED_VALUE_PROPERTY escapedValue postValueChange ESCAPED_VALUE_PROPERTY
Returns the value of this literal node p For example pre String Literal s s set Escaped Value hello nworld assert s get Literal Value equals hello nworld pre p p Note that this is a convenience method that converts from the stored string literal token returned by code get Escaped Literal code p return the string value without enclosing double quotes and embedded escapes exception Illegal Argument Exception if the literal value cannot be converted public String get Literal Value String s get Escaped Value int len s length if len 2 s char At 0 s char At len 1 throw new Illegal Argument Exception Scanner scanner this ast scanner char source s to Char Array scanner set Source source scanner reset To 0 source length try int token Type scanner get Next Token switch token Type case Terminal Tokens Token Name String Literal return new String scanner get Current Token Source String default throw new Illegal Argument Exception catch Invalid Input Exception e throw new Illegal Argument Exception  StringLiteral setEscapedValue getLiteralValue getEscapedLiteral IllegalArgumentException getLiteralValue getEscapedValue charAt charAt IllegalArgumentException toCharArray setSource resetTo tokenType getNextToken tokenType TerminalTokens TokenNameStringLiteral getCurrentTokenSourceString IllegalArgumentException InvalidInputException IllegalArgumentException
Sets the value of this literal node p For example pre String Literal s s set Literal Value hello nworld assert s get Escaped Value hello nworld assert s get Literal Value equals hello nworld pre p p Note that this is a convenience method that converts to the stored string literal token acceptable to code set Escaped Literal code p param value the string value without enclosing double quotes and embedded escapes exception Illegal Argument Exception if the argument is incorrect public void set Literal Value String value if value null throw new Illegal Argument Exception int len value length String Buffer b new String Buffer len 2 b append opening delimiter NON NLS 1 for int i 0 i len i char c value char At i switch c case b b append b NON NLS 1 break case t b append t NON NLS 1 break case n b append n NON NLS 1 break case f b append f NON NLS 1 break case r b append r NON NLS 1 break case b append NON NLS 1 break case b append NON NLS 1 break case b append NON NLS 1 break case 0 b append 0 NON NLS 1 break case 1 b append 1 NON NLS 1 break case 2 b append 2 NON NLS 1 break case 3 b append 3 NON NLS 1 break case 4 b append 4 NON NLS 1 break case 5 b append 5 NON NLS 1 break case 6 b append 6 NON NLS 1 break case 7 b append 7 NON NLS 1 break default b append c b append closing delimiter NON NLS 1 set Escaped Value b to String  StringLiteral setLiteralValue getEscapedValue getLiteralValue setEscapedLiteral IllegalArgumentException setLiteralValue IllegalArgumentException StringBuffer StringBuffer charAt setEscapedValue toString
Method declared on AST Node int mem Size int size BASE NODE SIZE 1 4 string Size escaped Value return size  ASTNode memSize BASE_NODE_SIZE stringSize escapedValue
Method declared on AST Node int tree Size return mem Size  ASTNode treeSize memSize

Creates a new property descriptor for the given node type with the given property id Note that this constructor is declared package private so that property descriptors can only be created by the AST implementation param node Class concrete AST node type that owns this property param property Id the property id Structural Property Descriptor Class node Class String property Id if node Class null property Id null throw new Illegal Argument Exception this property Id property Id this node Class node Class  nodeClass propertyId StructuralPropertyDescriptor nodeClass propertyId nodeClass propertyId IllegalArgumentException propertyId propertyId nodeClass nodeClass
Returns the id of this property return the property id public final String get Id return this property Id  getId propertyId
Returns the AST node type that owns this property p For example for all properties of the node type Type Declaration this method returns code Type Declaration class code p return the node type that owns this property public final Class get Node Class return this node Class  TypeDeclaration TypeDeclaration getNodeClass nodeClass
Returns whether this property is a simple property instance of link Simple Property Descriptor return code true code if this is a simple property and code false code otherwise public final boolean is Simple Property return this instanceof Simple Property Descriptor  SimplePropertyDescriptor isSimpleProperty SimplePropertyDescriptor
Returns whether this property is a child property instance of link Child Property Descriptor return code true code if this is a child property and code false code otherwise public final boolean is Child Property return this instanceof Child Property Descriptor  ChildPropertyDescriptor isChildProperty ChildPropertyDescriptor
Returns whether this property is a child list property instance of link Child List Property Descriptor return code true code if this is a child list property and code false code otherwise public final boolean is Child List Property return this instanceof Child List Property Descriptor  ChildListPropertyDescriptor isChildListProperty ChildListPropertyDescriptor
Returns a string suitable for debug purposes return inherit Doc public String to String String Buffer b new String Buffer if is Child List Property b append Child List NON NLS 1 if is Child Property b append Child NON NLS 1 if is Simple Property b append Simple NON NLS 1 b append Property NON NLS 1 if this node Class null b append this node Class get Name b append NON NLS 1 if this property Id null b append this property Id b append NON NLS 1 return b to String  inheritDoc toString StringBuffer StringBuffer isChildListProperty ChildList isChildProperty isSimpleProperty nodeClass nodeClass getName propertyId propertyId toString

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new AST node for an super constructor invocation statement owned by the given AST By default no type arguments and an empty list of arguments param ast the AST that is to own this node Super Constructor Invocation AST ast super ast if ast api Level AST JLS3 this type Arguments new AST Node Node List TYPE ARGUMENTS PROPERTY  SuperConstructorInvocation apiLevel typeArguments ASTNode NodeList TYPE_ARGUMENTS_PROPERTY
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property ARGUMENTS PROPERTY return arguments if property TYPE ARGUMENTS PROPERTY return type Arguments allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor ARGUMENTS_PROPERTY TYPE_ARGUMENTS_PROPERTY typeArguments internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return SUPER CONSTRUCTOR INVOCATION  ASTNode getNodeType0 SUPER_CONSTRUCTOR_INVOCATION
AST Node clone0 AST target Super Constructor Invocation result new Super Constructor Invocation target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Expression Expression AST Node copy Subtree target get Expression if this ast api Level AST JLS3 result type Arguments add All AST Node copy Subtrees target type Arguments result arguments add All AST Node copy Subtrees target arguments return result  ASTNode SuperConstructorInvocation SuperConstructorInvocation setSourceRange getStartPosition getLength copyLeadingComment setExpression ASTNode copySubtree getExpression apiLevel typeArguments addAll ASTNode copySubtrees typeArguments addAll ASTNode copySubtrees
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Expression if this ast api Level AST JLS3 accept Children visitor this type Arguments accept Children visitor this arguments visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getExpression apiLevel acceptChildren typeArguments acceptChildren endVisit
Returns the expression of this super constructor invocation statement or code null code if there is none return the expression node or code null code if there is none public Expression get Expression return this optional Expression  getExpression optionalExpression
Sets or clears the expression of this super constructor invocation statement param expression the expression node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression AST Node old Child this optional Expression pre Replace Child old Child expression EXPRESSION PROPERTY this optional Expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression ASTNode oldChild optionalExpression preReplaceChild oldChild EXPRESSION_PROPERTY optionalExpression postReplaceChild oldChild EXPRESSION_PROPERTY
Returns the live ordered list of type arguments of this constructor invocation added in JLS3 API p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p return the live list of type arguments element type code Type code exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public List type Arguments more efficient than just calling unsupported In2 to check if this type Arguments null unsupported In2 return this type Arguments  UnsupportedOperationException typeArguments unsupportedIn2 typeArguments unsupportedIn2 typeArguments
Returns the live ordered list of argument expressions in this super constructor invocation statement return the live list of argument expressions element type code Expression code public List arguments return this arguments 
Resolves and returns the binding for the constructor invoked by this expression p Note that bindings are generally unavailable unless requested when the AST is being built p return the constructor binding or code null code if the binding cannot be resolved public I Method Binding resolve Constructor Binding return this ast get Binding Resolver resolve Constructor this  IMethodBinding resolveConstructorBinding getBindingResolver resolveConstructor
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 3 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this optional Expression null 0 get Expression tree Size this type Arguments null 0 this type Arguments list Size this arguments null 0 this arguments list Size  treeSize memSize optionalExpression getExpression treeSize typeArguments typeArguments listSize listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented node for a super field access expression owned by the given AST By default field name is an unspecified but legal name and there is no qualifier p N B This constructor is package private p param ast the AST that is to own this node Super Field Access AST ast super ast  SuperFieldAccess
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property QUALIFIER PROPERTY if get return get Qualifier else set Qualifier Name child return null if property NAME PROPERTY if get return get Name else set Name Simple Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode QUALIFIER_PROPERTY getQualifier setQualifier NAME_PROPERTY getName setName SimpleName internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return SUPER FIELD ACCESS  ASTNode getNodeType0 SUPER_FIELD_ACCESS
AST Node clone0 AST target Super Field Access result new Super Field Access target result set Source Range this get Start Position this get Length result set Name Simple Name AST Node copy Subtree target get Name result set Qualifier Name AST Node copy Subtree target get Qualifier return result  ASTNode SuperFieldAccess SuperFieldAccess setSourceRange getStartPosition getLength setName SimpleName ASTNode copySubtree getName setQualifier ASTNode copySubtree getQualifier
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Qualifier accept Child visitor get Name visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getQualifier acceptChild getName endVisit
Returns the qualifier of this super field access expression or code null code if there is none return the qualifier name node or code null code if there is none public Name get Qualifier return this optional Qualifier  getQualifier optionalQualifier
Sets or clears the qualifier of this super field access expression param name the qualifier name node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Qualifier Name name AST Node old Child this optional Qualifier pre Replace Child old Child name QUALIFIER PROPERTY this optional Qualifier name post Replace Child old Child name QUALIFIER PROPERTY  IllegalArgumentException setQualifier ASTNode oldChild optionalQualifier preReplaceChild oldChild QUALIFIER_PROPERTY optionalQualifier postReplaceChild oldChild QUALIFIER_PROPERTY
Returns the name of the field accessed in this super field access expression return the field name public Simple Name get Name if this field Name null lazy init must be thread safe for readers synchronized this if this field Name null pre Lazy Init this field Name new Simple Name this ast post Lazy Init this field Name NAME PROPERTY return this field Name  SimpleName getName fieldName fieldName preLazyInit fieldName SimpleName postLazyInit fieldName NAME_PROPERTY fieldName
Resolves and returns the binding for the field accessed by this expression p Note that bindings are generally unavailable unless requested when the AST is being built p return the variable binding or code null code if the binding cannot be resolved since 3 0 public I Variable Binding resolve Field Binding return this ast get Binding Resolver resolve Field this  IVariableBinding resolveFieldBinding getBindingResolver resolveField
Sets the name of the field accessed in this super field access expression param field Name the field name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Name Simple Name field Name if field Name null throw new Illegal Argument Exception AST Node old Child this field Name pre Replace Child old Child field Name NAME PROPERTY this field Name field Name post Replace Child old Child field Name NAME PROPERTY  fieldName IllegalArgumentException setName SimpleName fieldName fieldName IllegalArgumentException ASTNode oldChild fieldName preReplaceChild oldChild fieldName NAME_PROPERTY fieldName fieldName postReplaceChild oldChild fieldName NAME_PROPERTY
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this optional Qualifier null 0 get Qualifier tree Size this field Name null 0 get Name tree Size  treeSize memSize optionalQualifier getQualifier treeSize fieldName getName treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new AST node for a super method invocation expression owned by the given AST By default no qualifier no type arguments an unspecified but legal method name and an empty list of arguments param ast the AST that is to own this node Super Method Invocation AST ast super ast if ast api Level AST JLS3 this type Arguments new AST Node Node List TYPE ARGUMENTS PROPERTY  SuperMethodInvocation apiLevel typeArguments ASTNode NodeList TYPE_ARGUMENTS_PROPERTY
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property QUALIFIER PROPERTY if get return get Qualifier else set Qualifier Name child return null if property NAME PROPERTY if get return get Name else set Name Simple Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode QUALIFIER_PROPERTY getQualifier setQualifier NAME_PROPERTY getName setName SimpleName internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property ARGUMENTS PROPERTY return arguments if property TYPE ARGUMENTS PROPERTY return type Arguments allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor ARGUMENTS_PROPERTY TYPE_ARGUMENTS_PROPERTY typeArguments internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return SUPER METHOD INVOCATION  ASTNode getNodeType0 SUPER_METHOD_INVOCATION
AST Node clone0 AST target Super Method Invocation result new Super Method Invocation target result set Source Range this get Start Position this get Length result set Name Simple Name get Name clone target result set Qualifier Name AST Node copy Subtree target get Qualifier if this ast api Level AST JLS3 result type Arguments add All AST Node copy Subtrees target type Arguments result arguments add All AST Node copy Subtrees target arguments return result  ASTNode SuperMethodInvocation SuperMethodInvocation setSourceRange getStartPosition getLength setName SimpleName getName setQualifier ASTNode copySubtree getQualifier apiLevel typeArguments addAll ASTNode copySubtrees typeArguments addAll ASTNode copySubtrees
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Qualifier if this ast api Level AST JLS3 accept Children visitor this type Arguments accept Child visitor get Name accept Children visitor this arguments visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getQualifier apiLevel acceptChildren typeArguments acceptChild getName acceptChildren endVisit
Returns the qualifier of this super method invocation expression or code null code if there is none return the qualifier name node or code null code if there is none public Name get Qualifier return this optional Qualifier  getQualifier optionalQualifier
Sets or clears the qualifier of this super method invocation expression param name the qualifier name node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Qualifier Name name AST Node old Child this optional Qualifier pre Replace Child old Child name QUALIFIER PROPERTY this optional Qualifier name post Replace Child old Child name QUALIFIER PROPERTY  IllegalArgumentException setQualifier ASTNode oldChild optionalQualifier preReplaceChild oldChild QUALIFIER_PROPERTY optionalQualifier postReplaceChild oldChild QUALIFIER_PROPERTY
Returns the live ordered list of type arguments of this method invocation added in JLS3 API p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p return the live list of type arguments element type code Type code exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public List type Arguments more efficient than just calling unsupported In2 to check if this type Arguments null unsupported In2 return this type Arguments  UnsupportedOperationException typeArguments unsupportedIn2 typeArguments unsupportedIn2 typeArguments
Returns the name of the method invoked in this expression return the method name node public Simple Name get Name if this method Name null lazy init must be thread safe for readers synchronized this if this method Name null pre Lazy Init this method Name new Simple Name this ast post Lazy Init this method Name NAME PROPERTY return this method Name  SimpleName getName methodName methodName preLazyInit methodName SimpleName postLazyInit methodName NAME_PROPERTY methodName
Sets the name of the method invoked in this expression to the given name param name the new method name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Name Simple Name name if name null throw new Illegal Argument Exception AST Node old Child this method Name pre Replace Child old Child name NAME PROPERTY this method Name name post Replace Child old Child name NAME PROPERTY  IllegalArgumentException setName SimpleName IllegalArgumentException ASTNode oldChild methodName preReplaceChild oldChild NAME_PROPERTY methodName postReplaceChild oldChild NAME_PROPERTY
Returns the live ordered list of argument expressions in this super method invocation expression return the live list of argument expressions element type code Expression code public List arguments return this arguments 
Resolves and returns the binding for the method invoked by this expression p Note that bindings are generally unavailable unless requested when the AST is being built p return the method binding or code null code if the binding cannot be resolved since 2 1 public I Method Binding resolve Method Binding return this ast get Binding Resolver resolve Method this  IMethodBinding resolveMethodBinding getBindingResolver resolveMethod
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 4 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this optional Qualifier null 0 get Qualifier tree Size this type Arguments null 0 this type Arguments list Size this method Name null 0 get Name tree Size this arguments null 0 this arguments list Size  treeSize memSize optionalQualifier getQualifier treeSize typeArguments typeArguments listSize methodName getName treeSize listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a switch case pseudo statement owned by the given AST By default there is an unspecified but legal expression param ast the AST that is to own this node Switch Case AST ast super ast  SwitchCase
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return SWITCH CASE  ASTNode getNodeType0 SWITCH_CASE
AST Node clone0 AST target Switch Case result new Switch Case target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Expression Expression AST Node copy Subtree target get Expression return result  ASTNode SwitchCase SwitchCase setSourceRange getStartPosition getLength copyLeadingComment setExpression ASTNode copySubtree getExpression
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Child visitor get Expression visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getExpression endVisit
Returns the expression of this switch case or code null code if there is none the default case return the expression node or code null code if there is none public Expression get Expression if this expression Initialized lazy init must be thread safe for readers synchronized this if this expression Initialized pre Lazy Init this optional Expression new Simple Name this ast this expression Initialized true post Lazy Init this optional Expression EXPRESSION PROPERTY return this optional Expression  getExpression expressionInitialized expressionInitialized preLazyInit optionalExpression SimpleName expressionInitialized postLazyInit optionalExpression EXPRESSION_PROPERTY optionalExpression
Sets the expression of this switch case or clears it turns it into the default case param expression the expression node or code null code to turn it into the default case exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression AST Node old Child this optional Expression pre Replace Child old Child expression EXPRESSION PROPERTY this optional Expression expression this expression Initialized true post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression ASTNode oldChild optionalExpression preReplaceChild oldChild EXPRESSION_PROPERTY optionalExpression expressionInitialized postReplaceChild oldChild EXPRESSION_PROPERTY
Returns whether this switch case represents the default case p This convenience method is equivalent to code get Expression null code p return code true code if this is the default switch case and code false code if this is a non default switch case public boolean is Default return get Expression null  getExpression isDefault getExpression
Method declared on AST Node int mem Size return super mem Size 2 4  ASTNode memSize memSize
int tree Size return mem Size this optional Expression null 0 optional Expression tree Size  treeSize memSize optionalExpression optionalExpression treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented switch statement node owned by the given AST By default the swicth statement has an unspecified but legal expression and an empty list of switch groups p N B This constructor is package private p param ast the AST that is to own this node Switch Statement AST ast super ast  SwitchStatement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property STATEMENTS PROPERTY return statements allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor STATEMENTS_PROPERTY internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return SWITCH STATEMENT  ASTNode getNodeType0 SWITCH_STATEMENT
AST Node clone0 AST target Switch Statement result new Switch Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Expression Expression get Expression clone target result statements add All AST Node copy Subtrees target statements return result  ASTNode SwitchStatement SwitchStatement setSourceRange getStartPosition getLength copyLeadingComment setExpression getExpression addAll ASTNode copySubtrees
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Expression accept Children visitor this statements visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getExpression acceptChildren endVisit
Returns the expression of this switch statement return the expression node public Expression get Expression if this expression null lazy init must be thread safe for readers synchronized this if this expression null pre Lazy Init this expression new Simple Name this ast post Lazy Init this expression EXPRESSION PROPERTY return this expression  getExpression preLazyInit SimpleName postLazyInit EXPRESSION_PROPERTY
Sets the expression of this switch statement param expression the new expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this expression pre Replace Child old Child expression EXPRESSION PROPERTY this expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression IllegalArgumentException ASTNode oldChild preReplaceChild oldChild EXPRESSION_PROPERTY postReplaceChild oldChild EXPRESSION_PROPERTY
Returns the live ordered list of statements for this switch statement Within this list code Switch Case code nodes mark the start of the switch groups return the live list of switch group nodes element type code Switch Groups code public List statements return this statements  SwitchCase SwitchGroups
Method declared on AST Node int mem Size return super mem Size 2 4  ASTNode memSize memSize
int tree Size return mem Size this expression null 0 get Expression tree Size this statements list Size  treeSize memSize getExpression treeSize listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented synchronized statement node owned by the given AST By default the expression is unspecified but legal and the blody is an empty block p N B This constructor is package private p param ast the AST that is to own this node Synchronized Statement AST ast super ast  SynchronizedStatement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null if property BODY PROPERTY if get return get Body else set Body Block child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression BODY_PROPERTY getBody setBody internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return SYNCHRONIZED STATEMENT  ASTNode getNodeType0 SYNCHRONIZED_STATEMENT
AST Node clone0 AST target Synchronized Statement result new Synchronized Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Expression Expression get Expression clone target result set Body Block get Body clone target return result  ASTNode SynchronizedStatement SynchronizedStatement setSourceRange getStartPosition getLength copyLeadingComment setExpression getExpression setBody getBody
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Expression accept Child visitor get Body visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getExpression acceptChild getBody endVisit
Returns the expression of this synchronized statement return the expression node public Expression get Expression if this expression null lazy init must be thread safe for readers synchronized this if this expression null pre Lazy Init this expression new Simple Name this ast post Lazy Init this expression EXPRESSION PROPERTY return this expression  getExpression preLazyInit SimpleName postLazyInit EXPRESSION_PROPERTY
Sets the expression of this synchronized statement param expression the expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this expression pre Replace Child old Child expression EXPRESSION PROPERTY this expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression IllegalArgumentException ASTNode oldChild preReplaceChild oldChild EXPRESSION_PROPERTY postReplaceChild oldChild EXPRESSION_PROPERTY
Returns the body of this synchronized statement return the body block node public Block get Body if this body null lazy init must be thread safe for readers synchronized this if this body null pre Lazy Init this body new Block this ast post Lazy Init this body BODY PROPERTY return this body  getBody preLazyInit postLazyInit BODY_PROPERTY
Sets the body of this synchronized statement param block the body statement node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Body Block block if block null throw new Illegal Argument Exception AST Node old Child this body pre Replace Child old Child block BODY PROPERTY this body block post Replace Child old Child block BODY PROPERTY  IllegalArgumentException setBody IllegalArgumentException ASTNode oldChild preReplaceChild oldChild BODY_PROPERTY postReplaceChild oldChild BODY_PROPERTY
Method declared on AST Node int mem Size return super mem Size 2 4  ASTNode memSize memSize
int tree Size return mem Size this expression null 0 get Expression tree Size this body null 0 get Body tree Size  treeSize memSize getExpression treeSize getBody treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a tag element owned by the given AST The new node has no name and an empty list of fragments p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Tag Element AST ast super ast  TagElement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final Object internal Get Set Object Property Simple Property Descriptor property boolean get Object value if property TAG NAME PROPERTY if get return get Tag Name else set Tag Name String value return null allow default implementation to flag the error return super internal Get Set Object Property property get value  internalGetSetObjectProperty SimplePropertyDescriptor TAG_NAME_PROPERTY getTagName setTagName internalGetSetObjectProperty
final List internal Get Child List Property Child List Property Descriptor property if property FRAGMENTS PROPERTY return fragments allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor FRAGMENTS_PROPERTY internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return TAG ELEMENT  ASTNode getNodeType0 TAG_ELEMENT
AST Node clone0 AST target Tag Element result new Tag Element target result set Source Range this get Start Position this get Length result set Tag Name get Tag Name result fragments add All AST Node copy Subtrees target fragments return result  ASTNode TagElement TagElement setSourceRange getStartPosition getLength setTagName getTagName addAll ASTNode copySubtrees
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Children visitor this fragments visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChildren endVisit
Returns this node s tag name or code null code if none For top level doc tags such as parameter tags the tag name includes the character param For inline doc tags such as link tags the tag name includes the character link The tag name may also be code null code this is used to represent the material at the start of a doc comment preceding the first explicit tag return the tag name or code null code if none public String get Tag Name return this optional Tag Name  getTagName optionalTagName
Sets the tag name of this node to the given value For top level doc tags such as parameter tags the tag name includes the character param For inline doc tags such as link tags the tag name includes the character link The tag name may also be code null code this is used to represent the material at the start of a doc comment preceding the first explicit tag param tag Name the tag name or code null code if none public void set Tag Name String tag Name pre Value Change TAG NAME PROPERTY this optional Tag Name tag Name post Value Change TAG NAME PROPERTY  tagName setTagName tagName preValueChange TAG_NAME_PROPERTY optionalTagName tagName postValueChange TAG_NAME_PROPERTY
Returns the live list of fragments in this tag element p The fragments cover everything following the tag name or everything if there is no tag name and generally omit embedded line breaks and leading whitespace on new lines including any leading ast link org eclipse jdt core dom Tag Element nodes are used to represent tag elements e g link nested within this tag element p p Here are some typical examples ul li see Foo bar Tag Element with tag name see fragments contains a single Method Ref node li li param args the program arguments Tag Element with tag name param 2 fragments Simple Name args Text Element the program arguments li li return See 64 link foo foo instead Tag Element with tag name return 3 fragments Text Element See Tag Element for 64 link foo foo Text Element instead li ul The use of Name Method Ref and Member Ref nodes within tag elements allows these fragments to be queried for binding information p p Adding and removing nodes from this list affects this node dynamically The nodes in this list may be of various types including link Text Element link org eclipse jdt core dom Tag Element link Name link Member Ref and link Method Ref Clients should assume that the list of types may grow in the future and write their code to deal with unexpected nodes types However attempts to add a non proscribed type of node will trigger an exception return the live list of doc elements in this tag element element type code AST Node code public List fragments return this fragments  TagElement TagElement MethodRef TagElement SimpleName TextElement TagElement TextElement TagElement TextElement MethodRef MemberRef TextElement TagElement MemberRef MethodRef ASTNode
Returns whether this tag element is nested within another tag element Nested tag elements appears enclosed in and certain doc tags including link and linkplain are only meaningful as nested tags Top level i e non nested doc tags begin on a new line certain doc tags including param and see are only meaningful as top level tags p This convenience methods checks to see whether the parent of this node is of type link org eclipse jdt core dom Tag Element p return code true code if this node is a nested tag element and false if this node is either parented by a doc comment node link Javadoc or is unparented public boolean is Nested return get Parent instanceof Tag Element  TagElement isNested getParent TagElement
Method declared on AST Node int mem Size int size BASE NODE SIZE 2 4 string Size this optional Tag Name return size  ASTNode memSize BASE_NODE_SIZE stringSize optionalTagName
Method declared on AST Node int tree Size return mem Size this fragments list Size  ASTNode treeSize memSize listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a text element owned by the given AST The new node has an empty text string p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Text Element AST ast super ast  TextElement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final Object internal Get Set Object Property Simple Property Descriptor property boolean get Object value if property TEXT PROPERTY if get return get Text else set Text String value return null allow default implementation to flag the error return super internal Get Set Object Property property get value  internalGetSetObjectProperty SimplePropertyDescriptor TEXT_PROPERTY getText setText internalGetSetObjectProperty
Method declared on AST Node final int get Node Type0 return TEXT ELEMENT  ASTNode getNodeType0 TEXT_ELEMENT
AST Node clone0 AST target Text Element result new Text Element target result set Source Range this get Start Position this get Length result set Text get Text return result  ASTNode TextElement TextElement setSourceRange getStartPosition getLength setText getText
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
Method declared on AST Node void accept0 AST Visitor visitor visitor visit this visitor end Visit this  ASTNode ASTVisitor endVisit
Returns this node s text return the text of this node public String get Text return this text  getText
Sets the text of this node to the given value p The text element typically includes leading and trailing whitespace that separates it from the immediately preceding or following elements The text element must not include a block comment closing delimiter p param text the text of this node exception Illegal Argument Exception if the text is null or contains a block comment closing delimiter public void set Text String text if text null throw new Illegal Argument Exception if text index Of 0 NON NLS 1 throw new Illegal Argument Exception pre Value Change TEXT PROPERTY this text text post Value Change TEXT PROPERTY  IllegalArgumentException setText IllegalArgumentException indexOf IllegalArgumentException preValueChange TEXT_PROPERTY postValueChange TEXT_PROPERTY
int mem Size int size BASE NODE SIZE 1 4 if this text EMPTY STRING everything but our empty string costs size string Size this text return size  memSize BASE_NODE_SIZE EMPTY_STRING stringSize
Method declared on AST Node int tree Size return mem Size  ASTNode treeSize memSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a this expression owned by the given AST By default there is no qualifier param ast the AST that is to own this node This Expression AST ast super ast  ThisExpression
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property QUALIFIER PROPERTY if get return get Qualifier else set Qualifier Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode QUALIFIER_PROPERTY getQualifier setQualifier internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return THIS EXPRESSION  ASTNode getNodeType0 THIS_EXPRESSION
AST Node clone0 AST target This Expression result new This Expression target result set Source Range this get Start Position this get Length result set Qualifier Name AST Node copy Subtree target get Qualifier return result  ASTNode ThisExpression ThisExpression setSourceRange getStartPosition getLength setQualifier ASTNode copySubtree getQualifier
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Child visitor get Qualifier visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getQualifier endVisit
Returns the qualifier of this this expression or code null code if there is none return the qualifier name node or code null code if there is none public Name get Qualifier return this optional Qualifier  getQualifier optionalQualifier
Sets or clears the qualifier of this this expression param name the qualifier name node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Qualifier Name name AST Node old Child this optional Qualifier pre Replace Child old Child name QUALIFIER PROPERTY this optional Qualifier name post Replace Child old Child name QUALIFIER PROPERTY  IllegalArgumentException setQualifier ASTNode oldChild optionalQualifier preReplaceChild oldChild QUALIFIER_PROPERTY optionalQualifier postReplaceChild oldChild QUALIFIER_PROPERTY
Method declared on AST Node int mem Size treat Operator as free return BASE NODE SIZE 1 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this optional Qualifier null 0 get Qualifier tree Size  treeSize memSize optionalQualifier getQualifier treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented throw statement node owned by the given AST By default the throw statement has an unspecified but legal expression p N B This constructor is package private p param ast the AST that is to own this node Throw Statement AST ast super ast  ThrowStatement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return THROW STATEMENT  ASTNode getNodeType0 THROW_STATEMENT
AST Node clone0 AST target Throw Statement result new Throw Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Expression Expression get Expression clone target return result  ASTNode ThrowStatement ThrowStatement setSourceRange getStartPosition getLength copyLeadingComment setExpression getExpression
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Child visitor get Expression visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getExpression endVisit
Returns the expression of this throw statement return the expression node public Expression get Expression if this expression null lazy init must be thread safe for readers synchronized this if this expression null pre Lazy Init this expression new Simple Name this ast post Lazy Init this expression EXPRESSION PROPERTY return this expression  getExpression preLazyInit SimpleName postLazyInit EXPRESSION_PROPERTY
Sets the expression of this throw statement param expression the new expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this expression pre Replace Child old Child expression EXPRESSION PROPERTY this expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression IllegalArgumentException ASTNode oldChild preReplaceChild oldChild EXPRESSION_PROPERTY postReplaceChild oldChild EXPRESSION_PROPERTY
Method declared on AST Node int mem Size return super mem Size 1 4  ASTNode memSize memSize
int tree Size return mem Size this expression null 0 get Expression tree Size  treeSize memSize getExpression treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a try statement owned by the given AST By default the try statement has an empty block no catch clauses and no finally block p N B This constructor is package private p param ast the AST that is to own this node Try Statement AST ast super ast  TryStatement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property BODY PROPERTY if get return get Body else set Body Block child return null if property FINALLY PROPERTY if get return get Finally else set Finally Block child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode BODY_PROPERTY getBody setBody FINALLY_PROPERTY getFinally setFinally internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property CATCH CLAUSES PROPERTY return catch Clauses allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor CATCH_CLAUSES_PROPERTY catchClauses internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return TRY STATEMENT  ASTNode getNodeType0 TRY_STATEMENT
AST Node clone0 AST target Try Statement result new Try Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Body Block get Body clone target result catch Clauses add All AST Node copy Subtrees target catch Clauses result set Finally Block AST Node copy Subtree target get Finally return result  ASTNode TryStatement TryStatement setSourceRange getStartPosition getLength copyLeadingComment setBody getBody catchClauses addAll ASTNode copySubtrees catchClauses setFinally ASTNode copySubtree getFinally
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Body accept Children visitor this catch Clauses accept Child visitor get Finally visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getBody acceptChildren catchClauses acceptChild getFinally endVisit
Returns the body of this try statement return the try body public Block get Body if this body null lazy init must be thread safe for readers synchronized this if this body null pre Lazy Init this body new Block this ast post Lazy Init this body BODY PROPERTY return this body  getBody preLazyInit postLazyInit BODY_PROPERTY
Sets the body of this try statement param body the block node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Body Block body if body null throw new Illegal Argument Exception AST Node old Child this body pre Replace Child old Child body BODY PROPERTY this body body post Replace Child old Child body BODY PROPERTY  IllegalArgumentException setBody IllegalArgumentException ASTNode oldChild preReplaceChild oldChild BODY_PROPERTY postReplaceChild oldChild BODY_PROPERTY
Returns the live ordered list of catch clauses for this try statement return the live list of catch clauses element type code Catch Clause code public List catch Clauses return this catch Clauses  CatchClause catchClauses catchClauses
Returns the finally block of this try statement or code null code if this try statement has b no b finally block return the finally block or code null code if this try statement has none public Block get Finally return this optional Finally Body  getFinally optionalFinallyBody
Sets or clears the finally block of this try statement param block the finally block node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Finally Block block AST Node old Child this optional Finally Body pre Replace Child old Child block FINALLY PROPERTY this optional Finally Body block post Replace Child old Child block FINALLY PROPERTY  IllegalArgumentException setFinally ASTNode oldChild optionalFinallyBody preReplaceChild oldChild FINALLY_PROPERTY optionalFinallyBody postReplaceChild oldChild FINALLY_PROPERTY
Method declared on AST Node int mem Size return super mem Size 3 4  ASTNode memSize memSize
int tree Size return mem Size this body null 0 get Body tree Size this catch Clauses list Size this optional Finally Body null 0 get Finally tree Size  treeSize memSize getBody treeSize catchClauses listSize optionalFinallyBody getFinally treeSize

Creates a new AST node for a type owned by the given AST p N B This constructor is package private p param ast the AST that is to own this node Type AST ast super ast 
Returns whether this type is a primitive type code Primitive Type code return code true code if this is a primitive type and code false code otherwise public final boolean is Primitive Type return this instanceof Primitive Type  PrimitiveType isPrimitiveType PrimitiveType
Returns whether this type is a simple type code Simple Type code return code true code if this is a simple type and code false code otherwise public final boolean is Simple Type return this instanceof Simple Type  SimpleType isSimpleType SimpleType
Returns whether this type is an array type code Array Type code return code true code if this is an array type and code false code otherwise public final boolean is Array Type return this instanceof Array Type  ArrayType isArrayType ArrayType
Returns whether this type is a parameterized type code Parameterized Type code return code true code if this is a parameterized type and code false code otherwise since 3 0 public final boolean is Parameterized Type return this instanceof Parameterized Type  ParameterizedType isParameterizedType ParameterizedType
Returns whether this type is a qualified type code Qualified Type code p Note that a type like A B can be represented either of two ways ol li code Qualified Type Simple Type Simple Name A Simple Name B code li li code Simple Type Qualified Name Simple Name A Simple Name B code li ol The first form is preferred when A is known to be a type However a parser cannot always determine this Clients should be prepared to handle either rather than make assumptions Note also that the first form became possible as of JLS3 only the second form existed in the JLS2 API p return code true code if this is a qualified type and code false code otherwise since 3 0 public final boolean is Qualified Type return this instanceof Qualified Type  QualifiedType QualifiedType SimpleType SimpleName SimpleName SimpleType QualifiedName SimpleName SimpleName isQualifiedType QualifiedType
Returns whether this type is a wildcard type code Wildcard Type code p Note that a wildcard type is only meaningful as a type argument of a code Parameterized Type code node p return code true code if this is a wildcard type and code false code otherwise since 3 0 public final boolean is Wildcard Type return this instanceof Wildcard Type  WildcardType ParameterizedType isWildcardType WildcardType
Resolves and returns the binding for this type p Note that bindings are generally unavailable unless requested when the AST is being built p return the type binding or code null code if the binding cannot be resolved public final I Type Binding resolve Binding return this ast get Binding Resolver resolve Type this  ITypeBinding resolveBinding getBindingResolver resolveType

private String key public Type Binding Binding Resolver resolver org eclipse jdt internal compiler lookup Type Binding binding this binding binding this resolver resolver  TypeBinding BindingResolver TypeBinding
see I Type Binding is Primitive public boolean is Primitive return is Null Type binding is Base Type  ITypeBinding isPrimitive isPrimitive isNullType isBaseType
see I Type Binding is Array public boolean is Array return binding is Array Type  ITypeBinding isArray isArray isArrayType
public I Type Binding get Element Type if this is Array return null Array Binding array Binding Array Binding binding return resolver get Type Binding array Binding leaf Component Type  ITypeBinding getElementType isArray ArrayBinding arrayBinding ArrayBinding getTypeBinding arrayBinding leafComponentType
public int get Dimensions if this is Array return 0 Array Binding array Binding Array Binding binding return array Binding dimensions  getDimensions isArray ArrayBinding arrayBinding ArrayBinding arrayBinding
see I Type Binding is Class public boolean is Class return this binding is Class  ITypeBinding isClass isClass isClass
see I Type Binding is Interface public boolean is Interface return this binding is Interface  ITypeBinding isInterface isInterface isInterface
see I Type Binding is Type Variable public boolean is Type Variable TODO olivier missing implementation of J2SE 1 5 language feature return false  ITypeBinding isTypeVariable isTypeVariable
public String get Name if this binding is Class this binding is Interface Reference Binding reference Binding Reference Binding this binding if reference Binding is Anonymous Type return NO NAME else if reference Binding is Member Type char name reference Binding compound Name reference Binding compound Name length 1 return new String Char Operation subarray name Char Operation last Index Of name 1 name length else if reference Binding is Local Type char name reference Binding compound Name reference Binding compound Name length 1 return new String Char Operation subarray name Char Operation last Index Of name 1 name length else return new String reference Binding compound Name reference Binding compound Name length 1 else if this binding is Array Type Array Binding array Binding Array Binding this binding int dimensions array Binding dimensions char brackets new char dimensions 2 for int i dimensions 2 1 i 0 i 2 brackets i brackets i 1 String Buffer buffer new String Buffer org eclipse jdt internal compiler lookup Type Binding leaf Component Type Binding array Binding leaf Component Type if leaf Component Type Binding is Class leaf Component Type Binding is Interface Reference Binding reference Binding2 Reference Binding leaf Component Type Binding if reference Binding2 is Member Type char name reference Binding2 compound Name reference Binding2 compound Name length 1 buffer append Char Operation subarray name Char Operation last Index Of name 1 name length else if reference Binding2 is Local Type char name reference Binding2 compound Name reference Binding2 compound Name length 1 buffer append Char Operation subarray name Char Operation last Index Of name 1 name length else buffer append reference Binding2 compound Name reference Binding2 compound Name length 1 else buffer append leaf Component Type Binding readable Name buffer append brackets return buffer to String else return new String this binding readable Name  getName isClass isInterface ReferenceBinding referenceBinding ReferenceBinding referenceBinding isAnonymousType NO_NAME referenceBinding isMemberType referenceBinding compoundName referenceBinding compoundName CharOperation CharOperation lastIndexOf referenceBinding isLocalType referenceBinding compoundName referenceBinding compoundName CharOperation CharOperation lastIndexOf referenceBinding compoundName referenceBinding compoundName isArrayType ArrayBinding arrayBinding ArrayBinding arrayBinding StringBuffer StringBuffer TypeBinding leafComponentTypeBinding arrayBinding leafComponentType leafComponentTypeBinding isClass leafComponentTypeBinding isInterface ReferenceBinding referenceBinding2 ReferenceBinding leafComponentTypeBinding referenceBinding2 isMemberType referenceBinding2 compoundName referenceBinding2 compoundName CharOperation CharOperation lastIndexOf referenceBinding2 isLocalType referenceBinding2 compoundName referenceBinding2 compoundName CharOperation CharOperation lastIndexOf referenceBinding2 compoundName referenceBinding2 compoundName leafComponentTypeBinding readableName toString readableName
public I Package Binding get Package if this binding is Base Type this binding is Array Type return null else Reference Binding reference Binding Reference Binding this binding return this resolver get Package Binding reference Binding get Package  IPackageBinding getPackage isBaseType isArrayType ReferenceBinding referenceBinding ReferenceBinding getPackageBinding referenceBinding getPackage
public I Type Binding get Declaring Class if this binding is Array Type this binding is Base Type return null Reference Binding reference Binding Reference Binding this binding if reference Binding is Nested Type try return this resolver get Type Binding reference Binding enclosing Type catch Runtime Exception e in case a method cannot be resolvable due to missing jars on the classpath see https bugs eclipse org bugs show bug cgi id 57871 https bugs eclipse org bugs show bug cgi id 63550 https bugs eclipse org bugs show bug cgi id 64299 return null  ITypeBinding getDeclaringClass isArrayType isBaseType ReferenceBinding referenceBinding ReferenceBinding referenceBinding isNestedType getTypeBinding referenceBinding enclosingType RuntimeException show_bug show_bug show_bug
public I Type Binding get Superclass if this binding null this binding is Array Type this binding is Base Type this binding is Interface return null Reference Binding reference Binding Reference Binding this binding Reference Binding superclass null try superclass reference Binding superclass catch Runtime Exception e in case a method cannot be resolvable due to missing jars on the classpath see https bugs eclipse org bugs show bug cgi id 57871 https bugs eclipse org bugs show bug cgi id 63550 https bugs eclipse org bugs show bug cgi id 64299 return this resolver resolve Well Known Type java lang Object NON NLS 1 if superclass null return null return this resolver get Type Binding superclass  ITypeBinding getSuperclass isArrayType isBaseType isInterface ReferenceBinding referenceBinding ReferenceBinding ReferenceBinding referenceBinding RuntimeException show_bug show_bug show_bug resolveWellKnownType getTypeBinding
public I Type Binding get Interfaces if this binding null this binding is Array Type this binding is Base Type return NO TYPE BINDINGS Reference Binding reference Binding Reference Binding this binding Reference Binding interfaces null try interfaces reference Binding super Interfaces catch Runtime Exception e in case a method cannot be resolvable due to missing jars on the classpath see https bugs eclipse org bugs show bug cgi id 57871 https bugs eclipse org bugs show bug cgi id 63550 https bugs eclipse org bugs show bug cgi id 64299 if interfaces null return NO TYPE BINDINGS int length interfaces length if length 0 return NO TYPE BINDINGS else I Type Binding new Interfaces new I Type Binding length for int i 0 i length i new Interfaces i this resolver get Type Binding interfaces i return new Interfaces  ITypeBinding getInterfaces isArrayType isBaseType NO_TYPE_BINDINGS ReferenceBinding referenceBinding ReferenceBinding ReferenceBinding referenceBinding superInterfaces RuntimeException show_bug show_bug show_bug NO_TYPE_BINDINGS NO_TYPE_BINDINGS ITypeBinding newInterfaces ITypeBinding newInterfaces getTypeBinding newInterfaces
public int get Modifiers if this binding is Class Reference Binding reference Binding Reference Binding this binding if reference Binding is Anonymous Type return reference Binding get Access Flags Modifier FINAL return reference Binding get Access Flags else if this binding is Interface Reference Binding reference Binding Reference Binding this binding clear the Acc Abstract and the Acc Interface bits return reference Binding get Access Flags Modifier ABSTRACT 0x200 else return 0  getModifiers isClass ReferenceBinding referenceBinding ReferenceBinding referenceBinding isAnonymousType referenceBinding getAccessFlags referenceBinding getAccessFlags isInterface ReferenceBinding referenceBinding ReferenceBinding AccAbstract AccInterface referenceBinding getAccessFlags
see I Type Binding get Declared Modifiers public int get Declared Modifiers return get Modifiers  ITypeBinding getDeclaredModifiers getDeclaredModifiers getModifiers
public boolean is Top Level if this binding is Class this binding is Interface Reference Binding reference Binding Reference Binding this binding return reference Binding is Nested Type return false  isTopLevel isClass isInterface ReferenceBinding referenceBinding ReferenceBinding referenceBinding isNestedType
public boolean is Nested if this binding is Class this binding is Interface Reference Binding reference Binding Reference Binding this binding return reference Binding is Nested Type return false  isNested isClass isInterface ReferenceBinding referenceBinding ReferenceBinding referenceBinding isNestedType
public boolean is Member if this binding is Class this binding is Interface Reference Binding reference Binding Reference Binding this binding return reference Binding is Member Type return false  isMember isClass isInterface ReferenceBinding referenceBinding ReferenceBinding referenceBinding isMemberType
public boolean is Local if this binding is Class this binding is Interface Reference Binding reference Binding Reference Binding this binding return reference Binding is Local Type reference Binding is Member Type return false  isLocal isClass isInterface ReferenceBinding referenceBinding ReferenceBinding referenceBinding isLocalType referenceBinding isMemberType
public boolean is Anonymous if this binding is Class this binding is Interface Reference Binding reference Binding Reference Binding this binding return reference Binding is Anonymous Type return false  isAnonymous isClass isInterface ReferenceBinding referenceBinding ReferenceBinding referenceBinding isAnonymousType
public I Type Binding get Declared Types try if this binding is Class this binding is Interface Reference Binding reference Binding Reference Binding this binding Reference Binding members reference Binding member Types int length members length I Type Binding new Members new I Type Binding length for int i 0 i length i new Members i this resolver get Type Binding members i return new Members catch Runtime Exception e in case a method cannot be resolvable due to missing jars on the classpath see https bugs eclipse org bugs show bug cgi id 57871 https bugs eclipse org bugs show bug cgi id 63550 https bugs eclipse org bugs show bug cgi id 64299 return NO TYPE BINDINGS  ITypeBinding getDeclaredTypes isClass isInterface ReferenceBinding referenceBinding ReferenceBinding ReferenceBinding referenceBinding memberTypes ITypeBinding newMembers ITypeBinding newMembers getTypeBinding newMembers RuntimeException show_bug show_bug show_bug NO_TYPE_BINDINGS
public String get Binary Name char constant Pool Name this binding constant Pool Name if constant Pool Name null return null int length constant Pool Name length char dot Separated new char length System arraycopy constant Pool Name 0 dot Separated 0 length Char Operation replace dot Separated return new String dot Separated  getBinaryName constantPoolName constantPoolName constantPoolName constantPoolName dotSeparated constantPoolName dotSeparated CharOperation dotSeparated dotSeparated
public I Variable Binding get Declared Fields try if this binding is Class this binding is Interface Reference Binding reference Binding Reference Binding this binding Field Binding fields reference Binding fields int length fields length I Variable Binding new Fields new I Variable Binding length for int i 0 i length i new Fields i this resolver get Variable Binding fields i return new Fields catch Runtime Exception e in case a method cannot be resolvable due to missing jars on the classpath see https bugs eclipse org bugs show bug cgi id 57871 https bugs eclipse org bugs show bug cgi id 63550 https bugs eclipse org bugs show bug cgi id 64299 return NO VARIABLE BINDINGS  IVariableBinding getDeclaredFields isClass isInterface ReferenceBinding referenceBinding ReferenceBinding FieldBinding referenceBinding IVariableBinding newFields IVariableBinding newFields getVariableBinding newFields RuntimeException show_bug show_bug show_bug NO_VARIABLE_BINDINGS
public I Method Binding get Declared Methods try if this binding is Class this binding is Interface Reference Binding reference Binding Reference Binding this binding org eclipse jdt internal compiler lookup Method Binding methods reference Binding methods int length methods length int remove Synthetics Counter 0 I Method Binding new Methods new I Method Binding length for int i 0 i length i org eclipse jdt internal compiler lookup Method Binding method Binding methods i if should Be Removed method Binding new Methods remove Synthetics Counter this resolver get Method Binding method Binding if remove Synthetics Counter length System arraycopy new Methods 0 new Methods new I Method Binding remove Synthetics Counter 0 remove Synthetics Counter return new Methods catch Runtime Exception e in case a method cannot be resolvable due to missing jars on the classpath see https bugs eclipse org bugs show bug cgi id 57871 https bugs eclipse org bugs show bug cgi id 63550 https bugs eclipse org bugs show bug cgi id 64299 return NO METHOD BINDINGS  IMethodBinding getDeclaredMethods isClass isInterface ReferenceBinding referenceBinding ReferenceBinding MethodBinding referenceBinding removeSyntheticsCounter IMethodBinding newMethods IMethodBinding MethodBinding methodBinding shouldBeRemoved methodBinding newMethods removeSyntheticsCounter getMethodBinding methodBinding removeSyntheticsCounter newMethods newMethods IMethodBinding removeSyntheticsCounter removeSyntheticsCounter newMethods RuntimeException show_bug show_bug show_bug NO_METHOD_BINDINGS
private boolean should Be Removed org eclipse jdt internal compiler lookup Method Binding method Binding return method Binding is Default Abstract method Binding is Synthetic method Binding is Constructor is Interface  shouldBeRemoved MethodBinding methodBinding methodBinding isDefaultAbstract methodBinding isSynthetic methodBinding isConstructor isInterface
public boolean is From Source if this binding is Class this binding is Interface Reference Binding reference Binding Reference Binding this binding return reference Binding is Binary Binding return false  isFromSource isClass isInterface ReferenceBinding referenceBinding ReferenceBinding referenceBinding isBinaryBinding
see I Binding get Kind public int get Kind return I Binding TYPE  IBinding getKind getKind IBinding
public boolean is Deprecated if this binding is Class this binding is Interface Reference Binding reference Binding Reference Binding this binding return reference Binding is Deprecated return false  isDeprecated isClass isInterface ReferenceBinding referenceBinding ReferenceBinding referenceBinding isDeprecated
see I Binding is Synthetic public boolean is Synthetic return false  IBinding isSynthetic isSynthetic
public String get Key if this key null if is Local String Buffer buffer new String Buffer declaring method or type Source Type Binding source Binding Source Type Binding this binding per construction a local type can only be defined in source Class Scope scope source Binding scope Reference Context reference Context if is Anonymous Class Scope class Scope scope enclosing Class Scope reference Context class Scope reference Context else Method Scope method Scope scope enclosing Method Scope reference Context method Scope reference Context if reference Context instanceof Abstract Method Declaration org eclipse jdt internal compiler lookup Method Binding internal Binding Abstract Method Declaration reference Context binding I Method Binding method Binding this resolver get Method Binding internal Binding if method Binding null buffer append method Binding get Key else if reference Context instanceof org eclipse jdt internal compiler ast Type Declaration org eclipse jdt internal compiler lookup Type Binding internal Binding org eclipse jdt internal compiler ast Type Declaration reference Context binding I Type Binding type Binding this resolver get Type Binding internal Binding if type Binding null buffer append type Binding get Key if is Anonymous buffer append Compilation Unit Scope compilation Unit Scope scope compilation Unit Scope Compilation Unit Declaration compilation Unit Declaration compilation Unit Scope reference Context Local Type Binding local Type Bindings compilation Unit Declaration local Types for int i 0 max compilation Unit Declaration local Type Count i max i if local Type Bindings i source Binding buffer append i 1 break else type name buffer append buffer append get Name this key buffer to String else if this binding is Class this binding is Interface String Buffer buffer new String Buffer char constant Pool Name this binding constant Pool Name if constant Pool Name null buffer append constant Pool Name else char qualified Source Name this binding qualified Source Name if qualified Source Name null Char Operation replace qualified Source Name buffer append get Package get Name append append qualified Source Name else buffer append get Package get Name append append get Name this key buffer to String else if this binding is Array Type if this get Element Type null this key this get Element Type get Key this get Dimensions else this key Integer to String this get Dimensions else this is a primitive type this key this get Name return this key  getKey isLocal StringBuffer StringBuffer SourceTypeBinding sourceBinding SourceTypeBinding ClassScope sourceBinding ReferenceContext referenceContext isAnonymous ClassScope classScope enclosingClassScope referenceContext classScope referenceContext MethodScope methodScope enclosingMethodScope referenceContext methodScope referenceContext referenceContext AbstractMethodDeclaration MethodBinding internalBinding AbstractMethodDeclaration referenceContext IMethodBinding methodBinding getMethodBinding internalBinding methodBinding methodBinding getKey referenceContext TypeDeclaration TypeBinding internalBinding TypeDeclaration referenceContext ITypeBinding typeBinding getTypeBinding internalBinding typeBinding typeBinding getKey isAnonymous CompilationUnitScope compilationUnitScope compilationUnitScope CompilationUnitDeclaration compilationUnitDeclaration compilationUnitScope referenceContext LocalTypeBinding localTypeBindings compilationUnitDeclaration localTypes compilationUnitDeclaration localTypeCount localTypeBindings sourceBinding getName toString isClass isInterface StringBuffer StringBuffer constantPoolName constantPoolName constantPoolName constantPoolName qualifiedSourceName qualifiedSourceName qualifiedSourceName CharOperation qualifiedSourceName getPackage getName qualifiedSourceName getPackage getName getName toString isArrayType getElementType getElementType getKey getDimensions toString getDimensions getName
see I Type Binding is Null Type public boolean is Null Type return this binding Base Types Null Binding  ITypeBinding isNullType isNullType BaseTypes NullBinding
see org eclipse jdt core dom I Type Binding get Qualified Name public String get Qualified Name if is Anonymous is Local return NO NAME if is Primitive is Null Type return get Name if is Array I Type Binding element Type get Element Type String element Type Qualified Name element Type get Qualified Name if element Type Qualified Name length 0 int dimensions get Dimensions char brackets new char dimensions 2 for int i dimensions 2 1 i 0 i 2 brackets i brackets i 1 String Buffer string Buffer new String Buffer element Type Qualified Name string Buffer append brackets return string Buffer to String else return NO NAME if is Top Level is Member Package Binding package Binding this binding get Package if package Binding null package Binding compound Name Char Operation NO CHAR CHAR return new String this binding qualified Source Name else String Buffer string Buffer new String Buffer string Buffer append this binding qualified Package Name append append this binding qualified Source Name return string Buffer to String return NO NAME  ITypeBinding getQualifiedName getQualifiedName isAnonymous isLocal NO_NAME isPrimitive isNullType getName isArray ITypeBinding elementType getElementType elementTypeQualifiedName elementType getQualifiedName elementTypeQualifiedName getDimensions StringBuffer stringBuffer StringBuffer elementTypeQualifiedName stringBuffer stringBuffer toString NO_NAME isTopLevel isMember PackageBinding packageBinding getPackage packageBinding packageBinding compoundName CharOperation NO_CHAR_CHAR qualifiedSourceName StringBuffer stringBuffer StringBuffer stringBuffer qualifiedPackageName qualifiedSourceName stringBuffer toString NO_NAME
see I Type Binding is Enum public boolean is Enum TODO olivier missing implementation of J2SE 1 5 language feature return false  ITypeBinding isEnum isEnum
see org eclipse jdt core dom I Type Binding is Annotation public boolean is Annotation TODO olivier missing implementation of J2SE 1 5 language feature return false  ITypeBinding isAnnotation isAnnotation
see org eclipse jdt core dom I Type Binding get Type Parameters public I Type Binding get Type Parameters TODO olivier missing implementation of J2SE 1 5 language feature return NO TYPE BINDINGS  ITypeBinding getTypeParameters ITypeBinding getTypeParameters NO_TYPE_BINDINGS
see org eclipse jdt core dom I Type Binding get Type Bounds public I Type Binding get Type Bounds TODO olivier missing implementation of J2SE 1 5 language feature return NO TYPE BINDINGS  ITypeBinding getTypeBounds ITypeBinding getTypeBounds NO_TYPE_BINDINGS
see org eclipse jdt core dom I Type Binding is Parameterized Type public boolean is Parameterized Type TODO olivier missing implementation of J2SE 1 5 language feature return false  ITypeBinding isParameterizedType isParameterizedType
see org eclipse jdt core dom I Type Binding get Type Arguments public I Type Binding get Type Arguments TODO olivier missing implementation of J2SE 1 5 language feature return NO TYPE BINDINGS  ITypeBinding getTypeArguments ITypeBinding getTypeArguments NO_TYPE_BINDINGS
see org eclipse jdt core dom I Type Binding get Erasure public I Type Binding get Erasure TODO olivier missing implementation of J2SE 1 5 language feature return this  ITypeBinding getErasure ITypeBinding getErasure
see org eclipse jdt core dom I Type Binding is Raw Type public boolean is Raw Type TODO olivier missing implementation of J2SE 1 5 language feature return false  ITypeBinding isRawType isRawType
see org eclipse jdt core dom I Type Binding is Wildcard Type public boolean is Wildcard Type TODO olivier missing implementation of J2SE 1 5 language feature return false  ITypeBinding isWildcardType isWildcardType
see org eclipse jdt core dom I Type Binding get Bound public I Type Binding get Bound TODO olivier missing implementation of J2SE 1 5 language feature return null  ITypeBinding getBound ITypeBinding getBound
see org eclipse jdt core dom I Type Binding is Upperbound public boolean is Upperbound TODO olivier missing implementation of J2SE 1 5 language feature return false  ITypeBinding isUpperbound isUpperbound
see java lang Object to String public String to String return this binding to String  toString toString toString

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new AST node for a type declaration owned by the given AST By default the type declaration is for a class of an unspecified but legal name no modifiers no javadoc no type parameters no superclass or superinterfaces and an empty list of body declarations p N B This constructor is package private all subclasses must be declared in the same package clients are unable to declare additional subclasses p param ast the AST that is to own this node Type Declaration AST ast super ast if ast api Level AST JLS2 this super Interface Names new AST Node Node List SUPER INTERFACES PROPERTY if ast api Level AST JLS3 this type Parameters new AST Node Node List TYPE PARAMETERS PROPERTY this super Interface Types new AST Node Node List SUPER INTERFACE TYPES PROPERTY  TypeDeclaration apiLevel superInterfaceNames ASTNode NodeList SUPER_INTERFACES_PROPERTY apiLevel typeParameters ASTNode NodeList TYPE_PARAMETERS_PROPERTY superInterfaceTypes ASTNode NodeList SUPER_INTERFACE_TYPES_PROPERTY
since 3 0 final List internal Structural Properties For Type int api Level return property Descriptors api Level  internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final int internal Get Set Int Property Simple Property Descriptor property boolean get int value if property MODIFIERS PROPERTY if get return get Modifiers else set Modifiers value return 0 allow default implementation to flag the error return super internal Get Set Int Property property get value  internalGetSetIntProperty SimplePropertyDescriptor MODIFIERS_PROPERTY getModifiers setModifiers internalGetSetIntProperty
final boolean internal Get Set Boolean Property Simple Property Descriptor property boolean get boolean value if property INTERFACE PROPERTY if get return is Interface else set Interface value return false allow default implementation to flag the error return super internal Get Set Boolean Property property get value  internalGetSetBooleanProperty SimplePropertyDescriptor INTERFACE_PROPERTY isInterface setInterface internalGetSetBooleanProperty
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property JAVADOC PROPERTY if get return get Javadoc else set Javadoc Javadoc child return null if property NAME PROPERTY if get return get Name else set Name Simple Name child return null if property SUPERCLASS PROPERTY if get return get Superclass else set Superclass Name child return null if property SUPERCLASS TYPE PROPERTY if get return get Superclass Type else set Superclass Type Type child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode JAVADOC_PROPERTY getJavadoc setJavadoc NAME_PROPERTY getName setName SimpleName SUPERCLASS_PROPERTY getSuperclass setSuperclass SUPERCLASS_TYPE_PROPERTY getSuperclassType setSuperclassType internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property MODIFIERS2 PROPERTY return modifiers if property TYPE PARAMETERS PROPERTY return type Parameters if property SUPER INTERFACES PROPERTY return super Interfaces if property SUPER INTERFACE TYPES PROPERTY return super Interface Types if property BODY DECLARATIONS PROPERTY return body Declarations allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor MODIFIERS2_PROPERTY TYPE_PARAMETERS_PROPERTY typeParameters SUPER_INTERFACES_PROPERTY superInterfaces SUPER_INTERFACE_TYPES_PROPERTY superInterfaceTypes BODY_DECLARATIONS_PROPERTY bodyDeclarations internalGetChildListProperty
Method declared on Body Declaration final Child Property Descriptor internal Javadoc Property return JAVADOC PROPERTY  BodyDeclaration ChildPropertyDescriptor internalJavadocProperty JAVADOC_PROPERTY
Method declared on Body Declaration final Child List Property Descriptor internal Modifiers2 Property return MODIFIERS2 PROPERTY  BodyDeclaration ChildListPropertyDescriptor internalModifiers2Property MODIFIERS2_PROPERTY
Method declared on Body Declaration final Simple Property Descriptor internal Modifiers Property return MODIFIERS PROPERTY  BodyDeclaration SimplePropertyDescriptor internalModifiersProperty MODIFIERS_PROPERTY
Method declared on Abstract Type Declaration final Child Property Descriptor internal Name Property return NAME PROPERTY  AbstractTypeDeclaration ChildPropertyDescriptor internalNameProperty NAME_PROPERTY
Method declared on Abstract Type Declaration final Child List Property Descriptor internal Body Declarations Property return BODY DECLARATIONS PROPERTY  AbstractTypeDeclaration ChildListPropertyDescriptor internalBodyDeclarationsProperty BODY_DECLARATIONS_PROPERTY
Method declared on AST Node final int get Node Type0 return TYPE DECLARATION  ASTNode getNodeType0 TYPE_DECLARATION
AST Node clone0 AST target Type Declaration result new Type Declaration target result set Source Range this get Start Position this get Length result set Javadoc Javadoc AST Node copy Subtree target get Javadoc if this ast api Level AST JLS2 result set Modifiers get Modifiers result set Superclass Name AST Node copy Subtree target get Superclass result super Interfaces add All AST Node copy Subtrees target super Interfaces result set Interface is Interface result set Name Simple Name get Name clone target if this ast api Level AST JLS3 result modifiers add All AST Node copy Subtrees target modifiers result type Parameters add All AST Node copy Subtrees target type Parameters result set Superclass Type Type AST Node copy Subtree target get Superclass Type result super Interface Types add All AST Node copy Subtrees target super Interface Types result body Declarations add All AST Node copy Subtrees target body Declarations return result  ASTNode TypeDeclaration TypeDeclaration setSourceRange getStartPosition getLength setJavadoc ASTNode copySubtree getJavadoc apiLevel setModifiers getModifiers setSuperclass ASTNode copySubtree getSuperclass superInterfaces addAll ASTNode copySubtrees superInterfaces setInterface isInterface setName SimpleName getName apiLevel addAll ASTNode copySubtrees typeParameters addAll ASTNode copySubtrees typeParameters setSuperclassType ASTNode copySubtree getSuperclassType superInterfaceTypes addAll ASTNode copySubtrees superInterfaceTypes bodyDeclarations addAll ASTNode copySubtrees bodyDeclarations
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order if this ast api Level AST JLS2 accept Child visitor get Javadoc accept Child visitor get Name accept Child visitor get Superclass accept Children visitor this super Interface Names accept Children visitor this body Declarations if this ast api Level AST JLS3 accept Child visitor get Javadoc accept Children visitor this modifiers accept Child visitor get Name accept Children visitor this type Parameters accept Child visitor get Superclass Type accept Children visitor this super Interface Types accept Children visitor this body Declarations visitor end Visit this  ASTVisitor visitChildren visitChildren apiLevel acceptChild getJavadoc acceptChild getName acceptChild getSuperclass acceptChildren superInterfaceNames acceptChildren bodyDeclarations apiLevel acceptChild getJavadoc acceptChildren acceptChild getName acceptChildren typeParameters acceptChild getSuperclassType acceptChildren superInterfaceTypes acceptChildren bodyDeclarations endVisit
Returns whether this type declaration declares a class or an interface return code true code if this is an interface declaration and code false code if this is a class declaration public boolean is Interface return this is Interface  isInterface isInterface
Sets whether this type declaration declares a class or an interface param is Interface code true code if this is an interface declaration and code false code if this is a class declaration public void set Interface boolean is Interface pre Value Change INTERFACE PROPERTY this is Interface is Interface post Value Change INTERFACE PROPERTY  isInterface setInterface isInterface preValueChange INTERFACE_PROPERTY isInterface isInterface postValueChange INTERFACE_PROPERTY
Returns the live ordered list of type parameters of this type declaration added in JLS3 API This list is non empty for parameterized types p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p return the live list of type parameters element type code Type Parameter code exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public List type Parameters more efficient than just calling unsupported In2 to check if this type Parameters null unsupported In2 return this type Parameters  TypeParameter UnsupportedOperationException typeParameters unsupportedIn2 typeParameters unsupportedIn2 typeParameters
Returns the name of the superclass declared in this type declaration or code null code if there is none JLS2 API only p Note that this child is not relevant for interface declarations although it does still figure in subtree equality comparisons p return the superclass name node or code null code if there is none exception Unsupported Operation Exception if this operation is used in an AST later than JLS2 TODO jeem When JLS3 support is complete post 3 0 deprecated In the JLS3 API this method is replaced by code get Superclass Type code which returns a code Type code instead of a code Name code public Name get Superclass supported Only In2 return this optional Superclass Name  UnsupportedOperationException getSuperclassType getSuperclass supportedOnlyIn2 optionalSuperclassName
Returns the superclass declared in this type declaration or code null code if there is none added in JLS3 API p Note that this child is not relevant for interface declarations although it does still figure in subtree equality comparisons p return the superclass type node or code null code if there is none exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public Type get Superclass Type unsupported In2 return this optional Superclass Type  UnsupportedOperationException getSuperclassType unsupportedIn2 optionalSuperclassType
Sets or clears the name of the superclass declared in this type declaration JLS2 API only p Note that this child is not relevant for interface declarations although it does still figure in subtree equality comparisons p param superclass Name the superclass name node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul exception Unsupported Operation Exception if this operation is used in an AST later than JLS2 TODO jeem When JLS3 support is complete post 3 0 deprecated In the JLS3 API this method is replaced by code set Type code which expects a code Type code instead of a code Name code public void set Superclass Name superclass Name supported Only In2 AST Node old Child this optional Superclass Name pre Replace Child old Child superclass Name SUPERCLASS PROPERTY this optional Superclass Name superclass Name post Replace Child old Child superclass Name SUPERCLASS PROPERTY  superclassName IllegalArgumentException UnsupportedOperationException setType setSuperclass superclassName supportedOnlyIn2 ASTNode oldChild optionalSuperclassName preReplaceChild oldChild superclassName SUPERCLASS_PROPERTY optionalSuperclassName superclassName postReplaceChild oldChild superclassName SUPERCLASS_PROPERTY
Sets or clears the superclass declared in this type declaration added in JLS3 API p Note that this child is not relevant for interface declarations although it does still figure in subtree equality comparisons p param superclass Type the superclass type node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public void set Superclass Type Type superclass Type unsupported In2 AST Node old Child this optional Superclass Type pre Replace Child old Child superclass Type SUPERCLASS TYPE PROPERTY this optional Superclass Type superclass Type post Replace Child old Child superclass Type SUPERCLASS TYPE PROPERTY  superclassType IllegalArgumentException UnsupportedOperationException setSuperclassType superclassType unsupportedIn2 ASTNode oldChild optionalSuperclassType preReplaceChild oldChild superclassType SUPERCLASS_TYPE_PROPERTY optionalSuperclassType superclassType postReplaceChild oldChild superclassType SUPERCLASS_TYPE_PROPERTY
Returns the live ordered list of names of superinterfaces of this type declaration JLS2 API only For a class declaration these are the names of the interfaces that this class implements for an interface declaration these are the names of the interfaces that this interface extends return the live list of interface names element type code Name code exception Unsupported Operation Exception if this operation is used in an AST later than JLS2 TODO jeem When JLS3 support is complete post 3 0 deprecated In the JLS3 API this method is replaced by code super Interface Types code public List super Interfaces more efficient than just calling supported Only In2 to check if this super Interface Names null supported Only In2 return this super Interface Names  UnsupportedOperationException superInterfaceTypes superInterfaces supportedOnlyIn2 superInterfaceNames supportedOnlyIn2 superInterfaceNames
Returns the live ordered list of superinterfaces of this type declaration added in JLS3 API For a class declaration these are the interfaces that this class implements for an interface declaration these are the interfaces that this interface extends return the live list of interface types element type code Type code exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public List super Interface Types more efficient than just calling unsupported In2 to check if this super Interface Types null unsupported In2 return this super Interface Types  UnsupportedOperationException superInterfaceTypes unsupportedIn2 superInterfaceTypes unsupportedIn2 superInterfaceTypes
Returns the ordered list of field declarations of this type declaration For a class declaration these are the field declarations for an interface declaration these are the constant declarations p This convenience method returns this node s body declarations with non fields filtered out Unlike code body Declarations code this method does not return a live result p return the possibly empty list of field declarations public Field Declaration get Fields List bd body Declarations int field Count 0 for Iterator it bd list Iterator it has Next if it next instanceof Field Declaration field Count Field Declaration fields new Field Declaration field Count int next 0 for Iterator it bd list Iterator it has Next Object decl it next if decl instanceof Field Declaration fields next Field Declaration decl return fields  bodyDeclarations FieldDeclaration getFields bodyDeclarations fieldCount listIterator hasNext FieldDeclaration fieldCount FieldDeclaration FieldDeclaration fieldCount listIterator hasNext FieldDeclaration FieldDeclaration
Returns the ordered list of method declarations of this type declaration p This convenience method returns this node s body declarations with non methods filtered out Unlike code body Declarations code this method does not return a live result p return the possibly empty list of method and constructor declarations public Method Declaration get Methods List bd body Declarations int method Count 0 for Iterator it bd list Iterator it has Next if it next instanceof Method Declaration method Count Method Declaration methods new Method Declaration method Count int next 0 for Iterator it bd list Iterator it has Next Object decl it next if decl instanceof Method Declaration methods next Method Declaration decl return methods  bodyDeclarations MethodDeclaration getMethods bodyDeclarations methodCount listIterator hasNext MethodDeclaration methodCount MethodDeclaration MethodDeclaration methodCount listIterator hasNext MethodDeclaration MethodDeclaration
Returns the ordered list of member type declarations of this type declaration p This convenience method returns this node s body declarations with non types filtered out Unlike code body Declarations code this method does not return a live result p return the possibly empty list of member type declarations public Type Declaration get Types List bd body Declarations int type Count 0 for Iterator it bd list Iterator it has Next if it next instanceof Type Declaration type Count Type Declaration member Types new Type Declaration type Count int next 0 for Iterator it bd list Iterator it has Next Object decl it next if decl instanceof Type Declaration member Types next Type Declaration decl return member Types  bodyDeclarations TypeDeclaration getTypes bodyDeclarations typeCount listIterator hasNext TypeDeclaration typeCount TypeDeclaration memberTypes TypeDeclaration typeCount listIterator hasNext TypeDeclaration memberTypes TypeDeclaration memberTypes
Resolves and returns the binding for the class or interface declared in this type declaration p Note that bindings are generally unavailable unless requested when the AST is being built p return the binding or code null code if the binding cannot be resolved public I Type Binding resolve Binding return this ast get Binding Resolver resolve Type this  ITypeBinding resolveBinding getBindingResolver resolveType
void append Debug String String Buffer buffer buffer append Type Declaration NON NLS 1 buffer append is Interface interface NON NLS 1 class NON NLS 2 NON NLS 1 buffer append get Name get Identifier buffer append NON NLS 1 for Iterator it body Declarations iterator it has Next Body Declaration d Body Declaration it next d append Debug String buffer if it has Next buffer append NON NLS 1 buffer append NON NLS 1  appendDebugString StringBuffer TypeDeclaration isInterface getName getIdentifier bodyDeclarations hasNext BodyDeclaration BodyDeclaration appendDebugString hasNext
Method declared on AST Node int mem Size return super mem Size 6 4  ASTNode memSize memSize
int tree Size return mem Size this optional Doc Comment null 0 get Javadoc tree Size this modifiers null 0 this modifiers list Size this type Name null 0 get Name tree Size this type Parameters null 0 this type Parameters list Size this optional Superclass Name null 0 get Superclass tree Size this optional Superclass Type null 0 get Superclass Type tree Size this super Interface Names null 0 this super Interface Names list Size this super Interface Types null 0 this super Interface Types list Size this body Declarations list Size  treeSize memSize optionalDocComment getJavadoc treeSize listSize typeName getName treeSize typeParameters typeParameters listSize optionalSuperclassName getSuperclass treeSize optionalSuperclassType getSuperclassType treeSize superInterfaceNames superInterfaceNames listSize superInterfaceTypes superInterfaceTypes listSize bodyDeclarations listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new unparented local type declaration statement node owned by the given AST By default the local type declaration is an unspecified but legal type declaration p N B This constructor is package private p param ast the AST that is to own this node Type Declaration Statement AST ast super ast  TypeDeclarationStatement
since 3 0 final List internal Structural Properties For Type int api Level return property Descriptors api Level  internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property TYPE DECLARATION PROPERTY if get return get Type Declaration else set Type Declaration Type Declaration child return null if property DECLARATION PROPERTY if get return get Declaration else set Declaration Abstract Type Declaration child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode TYPE_DECLARATION_PROPERTY getTypeDeclaration setTypeDeclaration TypeDeclaration DECLARATION_PROPERTY getDeclaration setDeclaration AbstractTypeDeclaration internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return TYPE DECLARATION STATEMENT  ASTNode getNodeType0 TYPE_DECLARATION_STATEMENT
AST Node clone0 AST target Type Declaration Statement result new Type Declaration Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Declaration Abstract Type Declaration get Declaration clone target return result  ASTNode TypeDeclarationStatement TypeDeclarationStatement setSourceRange getStartPosition getLength copyLeadingComment setDeclaration AbstractTypeDeclaration getDeclaration
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Child visitor get Declaration visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getDeclaration endVisit
Returns the abstract type declaration of this local type declaration statement JLS2 API only return the type declaration node since 3 0 public Abstract Type Declaration get Declaration if this type Decl null lazy init must be thread safe for readers synchronized this if this type Decl null pre Lazy Init this type Decl new Type Declaration this ast post Lazy Init this type Decl TYPE DECLARATION PROPERTY return this type Decl  AbstractTypeDeclaration getDeclaration typeDecl typeDecl preLazyInit typeDecl TypeDeclaration postLazyInit typeDecl TYPE_DECLARATION_PROPERTY typeDecl
Sets the abstract type declaration of this local type declaration statement JLS2 API only param decl the type declaration node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul since 3 0 public void set Declaration Abstract Type Declaration decl if decl null throw new Illegal Argument Exception a Type Declaration Statement may occur inside an Type Declaration must check cycles AST Node old Child this type Decl pre Replace Child old Child decl TYPE DECLARATION PROPERTY this type Decl decl post Replace Child old Child decl TYPE DECLARATION PROPERTY  IllegalArgumentException setDeclaration AbstractTypeDeclaration IllegalArgumentException TypeDeclarationStatement TypeDeclaration ASTNode oldChild typeDecl preReplaceChild oldChild TYPE_DECLARATION_PROPERTY typeDecl postReplaceChild oldChild TYPE_DECLARATION_PROPERTY
Returns the type declaration of this local type declaration statement added in JLS3 API return the type declaration node exception Unsupported Operation Exception if this operation is used in an AST later than JLS2 TODO jeem When JLS3 support is complete post 3 0 deprecated In the JLS3 API this method is replaced by code get Declaration code which returns code Abstract Type Declaration code instead of code Type Declaration code public Type Declaration get Type Declaration supported Only In2 return Type Declaration get Declaration  UnsupportedOperationException getDeclaration AbstractTypeDeclaration TypeDeclaration TypeDeclaration getTypeDeclaration supportedOnlyIn2 TypeDeclaration getDeclaration
Sets the type declaration of this local type declaration statement added in JLS3 API param decl the type declaration node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul exception Unsupported Operation Exception if this operation is used in an AST later than JLS2 TODO jeem When JLS3 support is complete post 3 0 deprecated In the JLS3 API this method is replaced by code set Declaration code which takes code Abstract Type Declaration code instead of code Type Declaration code public void set Type Declaration Type Declaration decl supported Only In2 forward to non deprecated replacement method set Declaration decl  IllegalArgumentException UnsupportedOperationException setDeclaration AbstractTypeDeclaration TypeDeclaration setTypeDeclaration TypeDeclaration supportedOnlyIn2 setDeclaration
Resolves and returns the binding for the class or interface declared in this type declaration statement p Note that bindings are generally unavailable unless requested when the AST is being built p return the binding or code null code if the binding cannot be resolved public I Type Binding resolve Binding forward request to the wrapped type declaration Abstract Type Declaration d get Declaration if d instanceof Type Declaration return Type Declaration d resolve Binding else if d instanceof Annotation Type Declaration return Annotation Type Declaration d resolve Binding else shouldn t happen return null  ITypeBinding resolveBinding AbstractTypeDeclaration getDeclaration TypeDeclaration TypeDeclaration resolveBinding AnnotationTypeDeclaration AnnotationTypeDeclaration resolveBinding
Method declared on AST Node int mem Size return super mem Size 1 4  ASTNode memSize memSize
int tree Size return mem Size this type Decl null 0 get Declaration tree Size  treeSize memSize typeDecl getDeclaration treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a type literal owned by the given AST By default the expression has an unspecified but legal type p N B This constructor is package private p param ast the AST that is to own this node Type Literal AST ast super ast  TypeLiteral
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property TYPE PROPERTY if get return get Type else set Type Type child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode TYPE_PROPERTY getType setType internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return TYPE LITERAL  ASTNode getNodeType0 TYPE_LITERAL
AST Node clone0 AST target Type Literal result new Type Literal target result set Source Range this get Start Position this get Length result set Type Type get Type clone target return result  ASTNode TypeLiteral TypeLiteral setSourceRange getStartPosition getLength setType getType
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children accept Child visitor get Type visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getType endVisit
Returns the type in this type literal expression return the type public Type get Type if this type null lazy init must be thread safe for readers synchronized this if this type null pre Lazy Init this type this ast new Primitive Type Primitive Type INT post Lazy Init this type TYPE PROPERTY return this type  getType preLazyInit newPrimitiveType PrimitiveType postLazyInit TYPE_PROPERTY
Sets the type in this type literal expression to the given type param type the new type exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Type Type type if type null throw new Illegal Argument Exception AST Node old Child this type pre Replace Child old Child type TYPE PROPERTY this type type post Replace Child old Child type TYPE PROPERTY  IllegalArgumentException setType IllegalArgumentException ASTNode oldChild preReplaceChild oldChild TYPE_PROPERTY postReplaceChild oldChild TYPE_PROPERTY
Method declared on AST Node int mem Size treat Operator as free return BASE NODE SIZE 1 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this type null 0 get Type tree Size  treeSize memSize getType treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented node for a parameterized type owned by the given AST By default an unspecified but legal type variable name and no type bounds p N B This constructor is package private p param ast the AST that is to own this node Type Parameter AST ast super ast unsupported In2  TypeParameter unsupportedIn2
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property NAME PROPERTY if get return get Name else set Name Simple Name child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode NAME_PROPERTY getName setName SimpleName internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property TYPE BOUNDS PROPERTY return type Bounds allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor TYPE_BOUNDS_PROPERTY typeBounds internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return TYPE PARAMETER  ASTNode getNodeType0 TYPE_PARAMETER
AST Node clone0 AST target Type Parameter result new Type Parameter target result set Source Range this get Start Position this get Length result set Name Simple Name AST Node get Name clone target result type Bounds add All AST Node copy Subtrees target type Bounds return result  ASTNode TypeParameter TypeParameter setSourceRange getStartPosition getLength setName SimpleName ASTNode getName typeBounds addAll ASTNode copySubtrees typeBounds
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Name accept Children visitor this type Bounds visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getName acceptChildren typeBounds endVisit
Returns the name of the type variable declared in this type parameter return the name of the type variable public Simple Name get Name if this type Variable Name null lazy init must be thread safe for readers synchronized this if this type Variable Name null pre Lazy Init this type Variable Name new Simple Name this ast post Lazy Init this type Variable Name NAME PROPERTY return this type Variable Name  SimpleName getName typeVariableName typeVariableName preLazyInit typeVariableName SimpleName postLazyInit typeVariableName NAME_PROPERTY typeVariableName
Sets the name of the type variable of this type parameter to the given name param type Name the new name of this type parameter exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Name Simple Name type Name if type Name null throw new Illegal Argument Exception AST Node old Child this type Variable Name pre Replace Child old Child type Name NAME PROPERTY this type Variable Name type Name post Replace Child old Child type Name NAME PROPERTY  typeName IllegalArgumentException setName SimpleName typeName typeName IllegalArgumentException ASTNode oldChild typeVariableName preReplaceChild oldChild typeName NAME_PROPERTY typeVariableName typeName postReplaceChild oldChild typeName NAME_PROPERTY
Returns the live ordered list of type bounds of this type parameter For the type parameter to be plausible there can be at most one class in the list and it must be first and the remaining ones must be interfaces the list should not contain primitive types but array types and parameterized types are allowed return the live list of type bounds element type code Type code public List type Bounds return this type Bounds  typeBounds typeBounds
Method declared on AST Node int mem Size treat Code as free return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this type Variable Name null 0 get Name tree Size this type Bounds list Size  treeSize memSize typeVariableName getName treeSize typeBounds listSize

private String key Variable Binding Binding Resolver resolver org eclipse jdt internal compiler lookup Variable Binding binding this resolver resolver this binding binding  VariableBinding BindingResolver VariableBinding
see I Variable Binding is Field public boolean is Field return this binding instanceof Field Binding  IVariableBinding isField isField FieldBinding
public String get Name if this name null this name new String this binding name return this name  getName
public I Type Binding get Declaring Class if is Field if this declaring Class null Field Binding field Binding Field Binding this binding this declaring Class this resolver get Type Binding field Binding declaring Class return this declaring Class else return null  ITypeBinding getDeclaringClass isField declaringClass FieldBinding fieldBinding FieldBinding declaringClass getTypeBinding fieldBinding declaringClass declaringClass
public I Type Binding get Type if type null type this resolver get Type Binding this binding type return type  ITypeBinding getType getTypeBinding
see I Binding get Kind public int get Kind return I Binding VARIABLE  IBinding getKind getKind IBinding
public int get Modifiers if is Field return Field Binding this binding get Access Flags if binding is Final return I Modifier Constants ACC FINAL return 0  getModifiers isField FieldBinding getAccessFlags isFinal IModifierConstants ACC_FINAL
public boolean is Deprecated if is Field return Field Binding this binding is Deprecated return false  isDeprecated isField FieldBinding isDeprecated
see I Binding is Synthetic public boolean is Synthetic if is Field return Field Binding this binding is Synthetic return false  IBinding isSynthetic isSynthetic isField FieldBinding isSynthetic
public String get Key if this key null if is Field String Buffer buffer new String Buffer if this get Declaring Class null buffer append this get Declaring Class get Key buffer append buffer append this get Name this key buffer to String else String Buffer buffer new String Buffer declaring method or type Local Variable Binding local Var Binding Local Variable Binding this binding Block Scope scope local Var Binding declaring Scope Method Scope method Scope scope instanceof Method Scope Method Scope scope scope enclosing Method Scope Reference Context reference Context method Scope reference Context if reference Context instanceof Abstract Method Declaration org eclipse jdt internal compiler lookup Method Binding internal Binding Abstract Method Declaration reference Context binding I Method Binding method Binding this resolver get Method Binding internal Binding if method Binding null buffer append method Binding get Key else if reference Context instanceof Type Declaration org eclipse jdt internal compiler lookup Type Binding internal Binding Type Declaration reference Context binding I Type Binding type Binding this resolver get Type Binding internal Binding if type Binding null buffer append type Binding get Key scope index get Key scope buffer variable name buffer append buffer append get Name this key buffer to String return this key  getKey isField StringBuffer StringBuffer getDeclaringClass getDeclaringClass getKey getName toString StringBuffer StringBuffer LocalVariableBinding localVarBinding LocalVariableBinding BlockScope localVarBinding declaringScope MethodScope methodScope MethodScope MethodScope enclosingMethodScope ReferenceContext referenceContext methodScope referenceContext referenceContext AbstractMethodDeclaration MethodBinding internalBinding AbstractMethodDeclaration referenceContext IMethodBinding methodBinding getMethodBinding internalBinding methodBinding methodBinding getKey referenceContext TypeDeclaration TypeBinding internalBinding TypeDeclaration referenceContext ITypeBinding typeBinding getTypeBinding internalBinding typeBinding typeBinding getKey getKey getName toString
private void get Key Block Scope scope String Buffer buffer int scope Index scope scope Index if scope Index 1 get Key Block Scope scope parent buffer buffer append buffer append scope Index  getKey BlockScope StringBuffer scopeIndex scopeIndex scopeIndex getKey BlockScope scopeIndex
see I Variable Binding get Variable Id public int get Variable Id return this binding id  IVariableBinding getVariableId getVariableId
public Object get Constant Value if this binding is Constant Value this binding constant null return null Constant c this binding constant switch c typeID case Type Ids T boolean return Boolean value Of c boolean Value case Type Ids T byte return new Byte c byte Value case Type Ids T char return new Character c char Value case Type Ids T double return new Double c double Value case Type Ids T float return new Float c float Value case Type Ids T int return new Integer c int Value case Type Ids T long return new Long c long Value case Type Ids T short return new Short c short Value case Type Ids T String return c string Value return null  getConstantValue isConstantValue TypeIds T_boolean valueOf booleanValue TypeIds T_byte byteValue TypeIds T_char charValue TypeIds T_double doubleValue TypeIds T_float floatValue TypeIds T_int intValue TypeIds T_long longValue TypeIds T_short shortValue TypeIds T_String stringValue
see java lang Object to String public String to String return this binding to String  toString toString toString

Creates a new AST node for a variable declaration owned by the given AST p N B This constructor is package private p param ast the AST that is to own this node Variable Declaration AST ast super ast  VariableDeclaration
Returns the name of the variable declared in this variable declaration return the variable name node 
Sets the name of the variable declared in this variable declaration to the given name param variable Name the new variable name exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul  variableName IllegalArgumentException
Returns the number of extra array dimensions over and above the explicitly specified type p For example code int x code has a type of code int code and two extra array dimensions code int x code has a type of code int code and zero extra array dimensions The two constructs have different AS Ts even though there are really syntactic variants of the same variable declaration p return the number of extra array dimensions since 2 1  ASTs
Sets the number of extra array dimensions over and above the explicitly specified type p For example code int x code has a type of code int code and two extra array dimensions code int x code has a type of code int code and zero extra array dimensions The two constructs have different AS Ts even though there are really syntactic variants of the same variable declaration p param dimensions the number of array dimensions exception Illegal Argument Exception if the number of dimensions is negative since 2 1  ASTs IllegalArgumentException
Returns the initializer of this variable declaration or code null code if there is none return the initializer expression node or code null code if there is none 
Sets or clears the initializer of this variable declaration param initializer the initializer expression node or code null code if there is none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul  IllegalArgumentException
Resolves and returns the binding for the variable declared in this variable declaration p Note that bindings are generally unavailable unless requested when the AST is being built p return the binding or code null code if the binding cannot be resolved public I Variable Binding resolve Binding return this ast get Binding Resolver resolve Variable this  IVariableBinding resolveBinding getBindingResolver resolveVariable

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new unparented local variable declaration expression node owned by the given AST By default the variable declaration has no modifiers an unspecified but legal type and an empty list of variable declaration fragments which is syntactically illegal p N B This constructor is package private p param ast the AST that is to own this node Variable Declaration Expression AST ast super ast if ast api Level AST JLS3 this modifiers new AST Node Node List MODIFIERS2 PROPERTY  VariableDeclarationExpression apiLevel ASTNode NodeList MODIFIERS2_PROPERTY
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final int internal Get Set Int Property Simple Property Descriptor property boolean get int value if property MODIFIERS PROPERTY if get return get Modifiers else set Modifiers value return 0 allow default implementation to flag the error return super internal Get Set Int Property property get value  internalGetSetIntProperty SimplePropertyDescriptor MODIFIERS_PROPERTY getModifiers setModifiers internalGetSetIntProperty
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property TYPE PROPERTY if get return get Type else set Type Type child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode TYPE_PROPERTY getType setType internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property MODIFIERS2 PROPERTY return modifiers if property FRAGMENTS PROPERTY return fragments allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor MODIFIERS2_PROPERTY FRAGMENTS_PROPERTY internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return VARIABLE DECLARATION EXPRESSION  ASTNode getNodeType0 VARIABLE_DECLARATION_EXPRESSION
AST Node clone0 AST target Variable Declaration Expression result new Variable Declaration Expression target result set Source Range this get Start Position this get Length if this ast api Level AST JLS2 result set Modifiers get Modifiers if this ast api Level AST JLS3 result modifiers add All AST Node copy Subtrees target modifiers result set Type Type get Type clone target result fragments add All AST Node copy Subtrees target fragments return result  ASTNode VariableDeclarationExpression VariableDeclarationExpression setSourceRange getStartPosition getLength apiLevel setModifiers getModifiers apiLevel addAll ASTNode copySubtrees setType getType addAll ASTNode copySubtrees
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order if this ast api Level AST JLS3 accept Children visitor this modifiers accept Child visitor get Type accept Children visitor variable Declaration Fragments visitor end Visit this  ASTVisitor visitChildren visitChildren apiLevel acceptChildren acceptChild getType acceptChildren variableDeclarationFragments endVisit
Returns the live ordered list of modifiers and annotations of this declaration added in JLS3 API p Note that the final modifier is the only meaningful modifier for local variable declarations p p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p return the live list of modifiers and annotations element type code I Extended Modifier code exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public List modifiers more efficient than just calling unsupported In2 to check if this modifiers null unsupported In2 return this modifiers  IExtendedModifier UnsupportedOperationException unsupportedIn2 unsupportedIn2
Returns the modifiers explicitly specified on this declaration p In the JLS3 API this method is a convenience method that computes these flags from code modifiers code p return the bit wise or of code Modifier code constants see Modifier public int get Modifiers more efficient than checking getAST API LEVEL if this modifiers null JLS2 behavior bona fide property return this modifier Flags else JLS3 behavior convenient method performance could be improved by caching computed flags but this would require tracking changes to this modifiers int computed Modifier Flags Modifier NONE for Iterator it modifiers iterator it has Next Object x it next if x instanceof Modifier computed Modifier Flags Modifier x get Keyword to Flag Value return computed Modifier Flags  getModifiers API_LEVEL modifierFlags computedModifierFlags hasNext computedModifierFlags getKeyword toFlagValue computedModifierFlags
Sets the modifiers explicitly specified on this declaration JLS2 API only p Note that the final modifier is the only meaningful modifier for local variable declarations p param modifiers the given modifiers bit wise or of code Modifier code constants exception Unsupported Operation Exception if this operation is used in an AST later than JLS2 see Modifier TODO jeem When JLS3 support is complete post 3 0 deprecated In the JLS3 API this method is replaced by code modifiers code which contains a list of a code Modifier code nodes public void set Modifiers int modifiers supported Only In2 pre Value Change MODIFIERS PROPERTY this modifier Flags modifiers post Value Change MODIFIERS PROPERTY  UnsupportedOperationException setModifiers supportedOnlyIn2 preValueChange MODIFIERS_PROPERTY modifierFlags postValueChange MODIFIERS_PROPERTY
Returns the base type declared in this variable declaration p N B The individual child variable declaration fragments may specify additional array dimensions So the type of the variable are not necessarily exactly this type p return the base type public Type get Type if this base Type null lazy init must be thread safe for readers synchronized this if this base Type null pre Lazy Init this base Type this ast new Primitive Type Primitive Type INT post Lazy Init this base Type TYPE PROPERTY return this base Type  getType baseType baseType preLazyInit baseType newPrimitiveType PrimitiveType postLazyInit baseType TYPE_PROPERTY baseType
Sets the base type declared in this variable declaration to the given type param type the new base type exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Type Type type if type null throw new Illegal Argument Exception AST Node old Child this base Type pre Replace Child old Child type TYPE PROPERTY this base Type type post Replace Child old Child type TYPE PROPERTY  IllegalArgumentException setType IllegalArgumentException ASTNode oldChild baseType preReplaceChild oldChild TYPE_PROPERTY baseType postReplaceChild oldChild TYPE_PROPERTY
Returns the live list of variable declaration fragments in this expression Adding and removing nodes from this list affects this node dynamically All nodes in this list must be code Variable Declaration Fragment code s attempts to add any other type of node will trigger an exception return the live list of variable declaration fragments in this expression element type code Variable Declaration Fragment code public List fragments return this variable Declaration Fragments  VariableDeclarationFragment VariableDeclarationFragment variableDeclarationFragments
Method declared on AST Node int mem Size treat Operator as free return BASE NODE SIZE 4 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this modifiers null 0 this modifiers list Size this base Type null 0 get Type tree Size this variable Declaration Fragments list Size  treeSize memSize listSize baseType getType treeSize variableDeclarationFragments listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new AST node for a variable declaration fragment owned by the given AST By default the variable declaration has an unspecified but legal variable name no initializer and no extra array dimensions p N B This constructor is package private p param ast the AST that is to own this node Variable Declaration Fragment AST ast super ast  VariableDeclarationFragment
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final int internal Get Set Int Property Simple Property Descriptor property boolean get int value if property EXTRA DIMENSIONS PROPERTY if get return get Extra Dimensions else set Extra Dimensions value return 0 allow default implementation to flag the error return super internal Get Set Int Property property get value  internalGetSetIntProperty SimplePropertyDescriptor EXTRA_DIMENSIONS_PROPERTY getExtraDimensions setExtraDimensions internalGetSetIntProperty
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property NAME PROPERTY if get return get Name else set Name Simple Name child return null if property INITIALIZER PROPERTY if get return get Initializer else set Initializer Expression child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode NAME_PROPERTY getName setName SimpleName INITIALIZER_PROPERTY getInitializer setInitializer internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return VARIABLE DECLARATION FRAGMENT  ASTNode getNodeType0 VARIABLE_DECLARATION_FRAGMENT
AST Node clone0 AST target Variable Declaration Fragment result new Variable Declaration Fragment target result set Source Range this get Start Position this get Length result set Name Simple Name get Name clone target result set Extra Dimensions get Extra Dimensions result set Initializer Expression AST Node copy Subtree target get Initializer return result  ASTNode VariableDeclarationFragment VariableDeclarationFragment setSourceRange getStartPosition getLength setName SimpleName getName setExtraDimensions getExtraDimensions setInitializer ASTNode copySubtree getInitializer
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Name accept Child visitor get Initializer visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getName acceptChild getInitializer endVisit
public Simple Name get Name if this variable Name null lazy init must be thread safe for readers synchronized this if this variable Name null pre Lazy Init this variable Name new Simple Name this ast post Lazy Init this variable Name NAME PROPERTY return this variable Name  SimpleName getName variableName variableName preLazyInit variableName SimpleName postLazyInit variableName NAME_PROPERTY variableName
public void set Name Simple Name variable Name if variable Name null throw new Illegal Argument Exception AST Node old Child this variable Name pre Replace Child old Child variable Name NAME PROPERTY this variable Name variable Name post Replace Child old Child variable Name NAME PROPERTY  setName SimpleName variableName variableName IllegalArgumentException ASTNode oldChild variableName preReplaceChild oldChild variableName NAME_PROPERTY variableName variableName postReplaceChild oldChild variableName NAME_PROPERTY
Returns the number of extra array dimensions this variable has over and above the type specified in the enclosing declaration p For example in the AST for code int i j k code the variable declaration fragments for the variables code i code code j code and code k code have 0 1 and 2 extra array dimensions respectively p return the number of extra array dimensions this variable has over and above the type specified in the enclosing declaration since 2 0 public int get Extra Dimensions return this extra Array Dimensions  getExtraDimensions extraArrayDimensions
Sets the number of extra array dimensions this variable has over and above the type specified in the enclosing declaration p For example in the AST for code int i j k code the variable declaration fragments for the variables code i code code j code and code k code have 0 1 and 2 extra array dimensions respectively p param dimensions the given dimensions since 2 0 public void set Extra Dimensions int dimensions if dimensions 0 throw new Illegal Argument Exception pre Value Change EXTRA DIMENSIONS PROPERTY this extra Array Dimensions dimensions post Value Change EXTRA DIMENSIONS PROPERTY  setExtraDimensions IllegalArgumentException preValueChange EXTRA_DIMENSIONS_PROPERTY extraArrayDimensions postValueChange EXTRA_DIMENSIONS_PROPERTY
Method declared on Variable Declaration public Expression get Initializer return this optional Initializer  VariableDeclaration getInitializer optionalInitializer
public void set Initializer Expression initializer AST Node old Child this optional Initializer pre Replace Child old Child initializer INITIALIZER PROPERTY this optional Initializer initializer post Replace Child old Child initializer INITIALIZER PROPERTY  setInitializer ASTNode oldChild optionalInitializer preReplaceChild oldChild INITIALIZER_PROPERTY optionalInitializer postReplaceChild oldChild INITIALIZER_PROPERTY
Method declared on AST Node int mem Size treat Operator as free return BASE NODE SIZE 3 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this variable Name null 0 get Name tree Size this optional Initializer null 0 get Initializer tree Size  treeSize memSize variableName getName treeSize optionalInitializer getInitializer treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level if api Level AST JLS2 return PROPERTY DESCRIPTORS 2 0 else return PROPERTY DESCRIPTORS 3 0  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel apiLevel PROPERTY_DESCRIPTORS_2_0 PROPERTY_DESCRIPTORS_3_0
Creates a new unparented local variable declaration statement node owned by the given AST By default the variable declaration has no modifiers an unspecified but legal type and an empty list of variable declaration fragments which is syntactically illegal p N B This constructor is package private p param ast the AST that is to own this node Variable Declaration Statement AST ast super ast if ast api Level AST JLS3 this modifiers new AST Node Node List MODIFIERS2 PROPERTY  VariableDeclarationStatement apiLevel ASTNode NodeList MODIFIERS2_PROPERTY
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final int internal Get Set Int Property Simple Property Descriptor property boolean get int value if property MODIFIERS PROPERTY if get return get Modifiers else set Modifiers value return 0 allow default implementation to flag the error return super internal Get Set Int Property property get value  internalGetSetIntProperty SimplePropertyDescriptor MODIFIERS_PROPERTY getModifiers setModifiers internalGetSetIntProperty
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property TYPE PROPERTY if get return get Type else set Type Type child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode TYPE_PROPERTY getType setType internalGetSetChildProperty
final List internal Get Child List Property Child List Property Descriptor property if property MODIFIERS2 PROPERTY return modifiers if property FRAGMENTS PROPERTY return fragments allow default implementation to flag the error return super internal Get Child List Property property  internalGetChildListProperty ChildListPropertyDescriptor MODIFIERS2_PROPERTY FRAGMENTS_PROPERTY internalGetChildListProperty
Method declared on AST Node final int get Node Type0 return VARIABLE DECLARATION STATEMENT  ASTNode getNodeType0 VARIABLE_DECLARATION_STATEMENT
AST Node clone0 AST target Variable Declaration Statement result new Variable Declaration Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this if this ast api Level AST JLS2 result set Modifiers get Modifiers if this ast api Level AST JLS3 result modifiers add All AST Node copy Subtrees target modifiers result set Type Type get Type clone target result fragments add All AST Node copy Subtrees target fragments return result  ASTNode VariableDeclarationStatement VariableDeclarationStatement setSourceRange getStartPosition getLength copyLeadingComment apiLevel setModifiers getModifiers apiLevel addAll ASTNode copySubtrees setType getType addAll ASTNode copySubtrees
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order if this ast api Level AST JLS3 accept Children visitor this modifiers accept Child visitor get Type accept Children visitor this variable Declaration Fragments visitor end Visit this  ASTVisitor visitChildren visitChildren apiLevel acceptChildren acceptChild getType acceptChildren variableDeclarationFragments endVisit
Returns the live ordered list of modifiers and annotations of this declaration added in JLS3 API p Note that the final modifier is the only meaningful modifier for local variable declarations p return the live list of modifiers and annotations element type code I Extended Modifier code exception Unsupported Operation Exception if this operation is used in a JLS2 AST since 3 0 public List modifiers more efficient than just calling unsupported In2 to check if this modifiers null unsupported In2 return this modifiers  IExtendedModifier UnsupportedOperationException unsupportedIn2 unsupportedIn2
Returns the modifiers explicitly specified on this declaration p In the JLS3 API this method is a convenience method that computes these flags from code modifiers code p return the bit wise or of code Modifier code constants see Modifier public int get Modifiers more efficient than checking getAST API LEVEL if this modifiers null JLS2 behavior bona fide property return this modifier Flags else JLS3 behavior convenience method performance could be improved by caching computed flags but this would require tracking changes to this modifiers int computed Modifier Flags Modifier NONE for Iterator it modifiers iterator it has Next Object x it next if x instanceof Modifier computed Modifier Flags Modifier x get Keyword to Flag Value return computed Modifier Flags  getModifiers API_LEVEL modifierFlags computedModifierFlags hasNext computedModifierFlags getKeyword toFlagValue computedModifierFlags
Sets the modifiers explicitly specified on this declaration JLS2 API only p Note that the final modifier is the only meaningful modifier for local variable declarations p param modifiers the given modifiers bit wise or of code Modifier code constants exception Unsupported Operation Exception if this operation is used in an AST later than JLS2 see Modifier TODO jeem When JLS3 support is complete post 3 0 deprecated In the JLS3 API this method is replaced by code modifiers code which contains a list of a code Modifier code nodes public void set Modifiers int modifiers supported Only In2 pre Value Change MODIFIERS PROPERTY this modifier Flags modifiers post Value Change MODIFIERS PROPERTY  UnsupportedOperationException setModifiers supportedOnlyIn2 preValueChange MODIFIERS_PROPERTY modifierFlags postValueChange MODIFIERS_PROPERTY
Returns the base type declared in this variable declaration statement p N B The individual child variable declaration fragments may specify additional array dimensions So the type of the variable are not necessarily exactly this type p return the base type public Type get Type if this base Type null lazy init must be thread safe for readers synchronized this if this base Type null pre Lazy Init this base Type this ast new Primitive Type Primitive Type INT post Lazy Init this base Type TYPE PROPERTY return this base Type  getType baseType baseType preLazyInit baseType newPrimitiveType PrimitiveType postLazyInit baseType TYPE_PROPERTY baseType
Sets the base type declared in this variable declaration statement to the given type param type the new base type exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul public void set Type Type type if type null throw new Illegal Argument Exception AST Node old Child this base Type pre Replace Child old Child type TYPE PROPERTY this base Type type post Replace Child old Child type TYPE PROPERTY  IllegalArgumentException setType IllegalArgumentException ASTNode oldChild baseType preReplaceChild oldChild TYPE_PROPERTY baseType postReplaceChild oldChild TYPE_PROPERTY
Returns the live list of variable declaration fragments in this statement Adding and removing nodes from this list affects this node dynamically All nodes in this list must be code Variable Declaration Fragment code s attempts to add any other type of node will trigger an exception return the live list of variable declaration fragments in this statement element type code Variable Declaration Fragment code public List fragments return this variable Declaration Fragments  VariableDeclarationFragment VariableDeclarationFragment variableDeclarationFragments
Method declared on AST Node int mem Size return super mem Size 4 4  ASTNode memSize memSize
int tree Size return mem Size this modifiers null 0 this modifiers list Size this base Type null 0 get Type tree Size this variable Declaration Fragments list Size  treeSize memSize listSize baseType getType treeSize variableDeclarationFragments listSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented while statement node owned by the given AST By default the expresssion is unspecified but legal and the body statement is an empty block p N B This constructor is package private p param ast the AST that is to own this node While Statement AST ast super ast  WhileStatement
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property EXPRESSION PROPERTY if get return get Expression else set Expression Expression child return null if property BODY PROPERTY if get return get Body else set Body Statement child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode EXPRESSION_PROPERTY getExpression setExpression BODY_PROPERTY getBody setBody internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return WHILE STATEMENT  ASTNode getNodeType0 WHILE_STATEMENT
AST Node clone0 AST target While Statement result new While Statement target result set Source Range this get Start Position this get Length result copy Leading Comment this result set Expression Expression get Expression clone target result set Body Statement get Body clone target return result  ASTNode WhileStatement WhileStatement setSourceRange getStartPosition getLength copyLeadingComment setExpression getExpression setBody getBody
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Expression accept Child visitor get Body visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getExpression acceptChild getBody endVisit
Returns the expression of this while statement return the expression node public Expression get Expression if this expression null lazy init must be thread safe for readers synchronized this if this expression null pre Lazy Init this expression new Simple Name this ast post Lazy Init this expression EXPRESSION PROPERTY return this expression  getExpression preLazyInit SimpleName postLazyInit EXPRESSION_PROPERTY
Sets the expression of this while statement param expression the expression node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Expression Expression expression if expression null throw new Illegal Argument Exception AST Node old Child this expression pre Replace Child old Child expression EXPRESSION PROPERTY this expression expression post Replace Child old Child expression EXPRESSION PROPERTY  IllegalArgumentException setExpression IllegalArgumentException ASTNode oldChild preReplaceChild oldChild EXPRESSION_PROPERTY postReplaceChild oldChild EXPRESSION_PROPERTY
Returns the body of this while statement return the body statement node public Statement get Body if this body null lazy init must be thread safe for readers synchronized this if this body null pre Lazy Init this body new Block this ast post Lazy Init this body BODY PROPERTY return this body  getBody preLazyInit postLazyInit BODY_PROPERTY
Sets the body of this while statement p Special note The Java language does not allow a local variable declaration to appear as the body of a while statement they may only appear within a block However the AST will allow a code Variable Declaration Statement code as the body of a code While Statement code To get something that will compile be sure to embed the code Variable Declaration Statement code inside a code Block code p param statement the body statement node exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li li a cycle in would be created li ul public void set Body Statement statement if statement null throw new Illegal Argument Exception AST Node old Child this body pre Replace Child old Child statement BODY PROPERTY this body statement post Replace Child old Child statement BODY PROPERTY  VariableDeclarationStatement WhileStatement VariableDeclarationStatement IllegalArgumentException setBody IllegalArgumentException ASTNode oldChild preReplaceChild oldChild BODY_PROPERTY postReplaceChild oldChild BODY_PROPERTY
Method declared on AST Node int mem Size return super mem Size 2 4  ASTNode memSize memSize
int tree Size return mem Size this expression null 0 get Expression tree Size this body null 0 get Body tree Size  treeSize memSize getExpression treeSize getBody treeSize

Returns a list of structural property descriptors for this node type Clients must not modify the result param api Level the API level one of the code AST JLS ast code constants return a list of property descriptors element type link Structural Property Descriptor since 3 0 public static List property Descriptors int api Level return PROPERTY DESCRIPTORS  apiLevel StructuralPropertyDescriptor propertyDescriptors apiLevel PROPERTY_DESCRIPTORS
Creates a new unparented node for a wildcard type owned by the given AST By default no upper bound p N B This constructor is package private p param ast the AST that is to own this node Wildcard Type AST ast super ast unsupported In2  WildcardType unsupportedIn2
Method declared on AST Node final List internal Structural Properties For Type int api Level return property Descriptors api Level  ASTNode internalStructuralPropertiesForType apiLevel propertyDescriptors apiLevel
final boolean internal Get Set Boolean Property Simple Property Descriptor property boolean get boolean value if property UPPER BOUND PROPERTY if get return is Upper Bound else set Upper Bound value return false allow default implementation to flag the error return super internal Get Set Boolean Property property get value  internalGetSetBooleanProperty SimplePropertyDescriptor UPPER_BOUND_PROPERTY isUpperBound setUpperBound internalGetSetBooleanProperty
final AST Node internal Get Set Child Property Child Property Descriptor property boolean get AST Node child if property BOUND PROPERTY if get return get Bound else set Bound Type child return null allow default implementation to flag the error return super internal Get Set Child Property property get child  ASTNode internalGetSetChildProperty ChildPropertyDescriptor ASTNode BOUND_PROPERTY getBound setBound internalGetSetChildProperty
Method declared on AST Node final int get Node Type0 return WILDCARD TYPE  ASTNode getNodeType0 WILDCARD_TYPE
AST Node clone0 AST target Wildcard Type result new Wildcard Type target result set Source Range this get Start Position this get Length result set Bound Type AST Node copy Subtree target get Bound is Upper Bound return result  ASTNode WildcardType WildcardType setSourceRange getStartPosition getLength setBound ASTNode copySubtree getBound isUpperBound
Method declared on AST Node final boolean subtree Match0 AST Matcher matcher Object other dispatch to correct overloaded match method return matcher match this other  ASTNode subtreeMatch0 ASTMatcher
void accept0 AST Visitor visitor boolean visit Children visitor visit this if visit Children visit children in normal left to right reading order accept Child visitor get Bound visitor end Visit this  ASTVisitor visitChildren visitChildren acceptChild getBound endVisit
Returns whether this wildcard type is an upper bound extends as opposed to a lower bound super p Note that this property is irrelevant for wildcards that do not have a bound p return code true code if an upper bound and code false code if a lower bound see set Bound Type public boolean is Upper Bound return this is Upper Bound  setBound isUpperBound isUpperBound
Returns the bound of this wildcard type if it has one If link is Upper Bound is Upper Bound returns true this is an upper bound extends B if it returns false this is a lower bound super B return the bound of this wildcard type or code null code if none see set Bound Type public Type get Bound return this optional Bound  isUpperBound isUpperBound setBound getBound optionalBound
Sets the bound of this wildcard type to the given type and marks it as an upper or a lower bound The method is equivalent to calling code set Bound type set Upper Bound is Upper Bound code param type the new bound of this wildcard type or code null code if none param is Upper Bound code true code for an upper bound extends B and code false code for a lower bound super B exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul see get Bound see is Upper Bound public void set Bound Type type boolean is Upper Bound set Bound type set Upper Bound is Upper Bound  setBound setUpperBound isUpperBound isUpperBound IllegalArgumentException getBound isUpperBound setBound isUpperBound setBound setUpperBound isUpperBound
Sets the bound of this wildcard type to the given type param type the new bound of this wildcard type or code null code if none exception Illegal Argument Exception if ul li the node belongs to a different AST li li the node already has a parent li ul see get Bound public void set Bound Type type AST Node old Child this optional Bound pre Replace Child old Child type BOUND PROPERTY this optional Bound type post Replace Child old Child type BOUND PROPERTY  IllegalArgumentException getBound setBound ASTNode oldChild optionalBound preReplaceChild oldChild BOUND_PROPERTY optionalBound postReplaceChild oldChild BOUND_PROPERTY
Sets whether this wildcard type is an upper bound extends as opposed to a lower bound super param is Upper Bound code true code if an upper bound and code false code if a lower bound see is Upper Bound public void set Upper Bound boolean is Upper Bound pre Value Change UPPER BOUND PROPERTY this is Upper Bound is Upper Bound post Value Change UPPER BOUND PROPERTY  isUpperBound isUpperBound setUpperBound isUpperBound preValueChange UPPER_BOUND_PROPERTY isUpperBound isUpperBound postValueChange UPPER_BOUND_PROPERTY
Method declared on AST Node int mem Size return BASE NODE SIZE 2 4  ASTNode memSize BASE_NODE_SIZE
int tree Size return mem Size this optional Bound null 0 get Bound tree Size  treeSize memSize optionalBound getBound treeSize

Creates an new element changed event based on a code I Java Element Delta code param delta the Java element delta param type the type of delta ADDED REMOVED CHANGED this event contains public Element Changed Event I Java Element Delta delta int type super delta this type type  IJavaElementDelta ElementChangedEvent IJavaElementDelta
Returns the delta describing the change return the delta describing the change public I Java Element Delta get Delta return I Java Element Delta this source  IJavaElementDelta getDelta IJavaElementDelta
Returns the type of event being reported return one of the event type constants see POST CHANGE see PRE AUTO BUILD see POST RECONCILE since 2 0 public int get Type return this type  POST_CHANGE PRE_AUTO_BUILD POST_RECONCILE getType

public static final int INTERNAL 5 Sends the given class files to the target and loads them If the given class name is not code null code run the code snippet with this class name Returns whether the code snippet could be deployed Note it must return code true code even if running the code snippet threw an exception p The details of sending and loading the class files are left up to implementations p p To run a code snippet an implementation should create a new instance of the given code snippet class and call directly or using another means its code RUN METHOD code p p Also before the call the implementation should copy the values of the local variables if any into the corresponding fields of the code snippet instance A field name is formed of code LOCAL VAR PREFIX code preceded the name of the local variable For example the field name for local variable code my Local code is code val my Local code assuming the value of code LOCAL VAR PREFIX code is val In the same way the implementation should copy the value of the this object into the field called code DELEGATE THIS code p p After calling the code RUN METHOD code the values of the local variables may have been modified The implementation must copy the values of the fields back into the local variables p p Finally the overall value returned by the code snippet can be retrieved from the special field code RESULT VALUE FIELD code on the code snippet instance The code Class code that is the runtime type of the returned value can be retrieved from the special field code RESULT TYPE FIELD code p param class File Bytes the list of class file bytes param class File Compound Names the corresponding list of class file type compound names example of a compound name java lang Object param code Snippet Class Name name of the actual class to instantiate and run or code null code if none return code true code if the code snippet was successfully deployed  RUN_METHOD LOCAL_VAR_PREFIX myLocal myLocal LOCAL_VAR_PREFIX DELEGATE_THIS RUN_METHOD RESULT_VALUE_FIELD RESULT_TYPE_FIELD classFileBytes classFileCompoundNames codeSnippetClassName
public boolean accept Class Files byte class File Bytes String class File Compound Names String code Snippet Class Name Notifies of an evaluation problem Problems can arise for source of the following kinds p ul li global variable code VARIABLE code fragment source is name of variable li li code snippet code CODE SNIPPET code fragment source is code snippet li li import declaration code IMPORT code fragment source is import li li package declaration code PACKAGE code fragment source is package declaration li li other code INTERNAL code no fragment source is involved internal error occurred li ul p param problem Marker the problem marker cannot be null param fragment Source the fragment source param fragment Kind the kind of source fragment one of code VARIABLE code code CODE SNIPPET code code IMPORT code code PACKAGE code or code INTERNAL code  acceptClassFiles classFileBytes classFileCompoundNames codeSnippetClassName CODE_SNIPPET problemMarker fragmentSource fragmentKind CODE_SNIPPET

public interface I Evaluation Context Returns the global variables declared in this evaluation context The variables are maintained in the order they are created in return the list of global variables  IEvaluationContext
public I Global Variable all Variables Performs a code completion at the given position in the given code snippet reporting results to the given completion requestor p Note that code completion does not involve evaluation p param code Snippet the code snippet to complete in param position the character position in the code snippet to complete at or 1 indicating the beginning of the snippet param requestor the code completion requestor capable of accepting all possible types of completions exception Java Model Exception if code completion could not be performed Reasons include ul li The position specified is less than 1 or is greater than the snippet s length INDEX OUT OF BOUNDS li ul since 2 0 public void code Complete String code Snippet int position I Completion Requestor requestor  IGlobalVariable allVariables codeSnippet JavaModelException INDEX_OUT_OF_BOUNDS codeComplete codeSnippet ICompletionRequestor
throws Java Model Exception Performs a code completion at the given position in the given code snippet reporting results to the given completion requestor It considers types in the working copies with the given owner first In other words the owner s working copies will take precedence over their original compilation units in the workspace p Note that if a working copy is empty it will be as if the original compilation unit had been deleted p p Note that code completion does not involve evaluation p param code Snippet the code snippet to complete in param position the character position in the code snippet to complete at or 1 indicating the beginning of the snippet param requestor the code completion requestor capable of accepting all possible types of completions param owner the owner of working copies that take precedence over their original compilation units exception Java Model Exception if code completion could not be performed Reasons include ul li The position specified is less than 1 or is greater than the snippet s length INDEX OUT OF BOUNDS li ul since 3 0 public void code Complete String code Snippet int position I Completion Requestor requestor Working Copy Owner owner  JavaModelException codeSnippet JavaModelException INDEX_OUT_OF_BOUNDS codeComplete codeSnippet ICompletionRequestor WorkingCopyOwner
throws Java Model Exception Resolves and returns a collection of Java elements corresponding to the source code at the given positions in the given code snippet p Note that code select does not involve evaluation and problems are never reported p param code Snippet the code snippet to resolve in param offset the position in the code snippet of the first character of the code to resolve param length the length of the selected code to resolve return the possibly empty list of selection Java elements exception Java Model Exception if code resolve could not be performed Reasons include ul li The position specified is less than 1 or is greater than the snippet s length INDEX OUT OF BOUNDS li ul public I Java Element code Select String code Snippet int offset int length  JavaModelException codeSnippet JavaModelException INDEX_OUT_OF_BOUNDS IJavaElement codeSelect codeSnippet
throws Java Model Exception Resolves and returns a collection of Java elements corresponding to the source code at the given positions in the given code snippet It considers types in the working copies with the given owner first In other words the owner s working copies will take precedence over their original compilation units in the workspace p Note that if a working copy is empty it will be as if the original compilation unit had been deleted p p Note that code select does not involve evaluation and problems are never reported p param code Snippet the code snippet to resolve in param offset the position in the code snippet of the first character of the code to resolve param length the length of the selected code to resolve param owner the owner of working copies that take precedence over their original compilation units return the possibly empty list of selection Java elements exception Java Model Exception if code resolve could not be performed Reasons include ul li The position specified is less than 1 or is greater than the snippet s length INDEX OUT OF BOUNDS li ul since 3 0 public I Java Element code Select String code Snippet int offset int length Working Copy Owner owner  JavaModelException codeSnippet JavaModelException INDEX_OUT_OF_BOUNDS IJavaElement codeSelect codeSnippet WorkingCopyOwner
throws Java Model Exception Deletes the given variable from this evaluation context Does nothing if the given variable has already been deleted param variable the global variable  JavaModelException
public void delete Variable I Global Variable variable Evaluates the given code snippet in the context of a suspended thread The code snippet is compiled along with this context s package declaration imports and global variables The given requestor s code accept Problem code method is called for each compilation problem that is detected Then the resulting class files are handed to the given requestor s code accept Class Files code method to deploy and run p The requestor is expected to ol li send the class files to the target VM li load them starting with the code snippet class li create a new instance of the code snippet class li run the method code run code of the code snippet li retrieve the values of the local variables li retrieve the returned value of the code snippet ol p p This method is long running progress and cancellation are provided by the given progress monitor p param code Snippet the code snippet param local Variable Type Names the dot separated fully qualified names of the types of the local variables param local Variable Names the names of the local variables as they are declared in the user s code param local Variable Modifiers the modifiers of the local variables default modifier or final modifier param declaring Type the type in which the code snippet is evaluated param is Static whether the code snippet is evaluated in a static member of the declaring type param is Constructor Call whether the code snippet is evaluated in a constructor of the declaring type param requestor the code snippet requestor param progress Monitor a progress monitor exception Java Model Exception if a runtime problem occurred or if this context s project has no build state public void evaluate Code Snippet String code Snippet String local Variable Type Names String local Variable Names int local Variable Modifiers I Type declaring Type boolean is Static boolean is Constructor Call I Code Snippet Requestor requestor I Progress Monitor progress Monitor  deleteVariable IGlobalVariable acceptProblem acceptClassFiles codeSnippet localVariableTypeNames localVariableNames localVariableModifiers declaringType isStatic isConstructorCall progressMonitor JavaModelException evaluateCodeSnippet codeSnippet localVariableTypeNames localVariableNames localVariableModifiers IType declaringType isStatic isConstructorCall ICodeSnippetRequestor IProgressMonitor progressMonitor
throws Java Model Exception Evaluates the given code snippet The code snippet is compiled along with this context s package declaration imports and global variables The given requestor s code accept Problem code method is called for each compilation problem that is detected Then the resulting class files are handed to the given requestor s code accept Class Files code method to deploy and run The requestor is also responsible for getting the result back p This method is long running progress and cancellation are provided by the given progress monitor p param code Snippet the code snippet param requestor the code snippet requestor param progress Monitor a progress monitor exception Java Model Exception if a runtime problem occurred or if this context s project has no build state public void evaluate Code Snippet String code Snippet I Code Snippet Requestor requestor I Progress Monitor progress Monitor  JavaModelException acceptProblem acceptClassFiles codeSnippet progressMonitor JavaModelException evaluateCodeSnippet codeSnippet ICodeSnippetRequestor IProgressMonitor progressMonitor
throws Java Model Exception Evaluates the given global variable During this operation this context s package declaration imports and it all it its declared variables are verified The given requestor s code accept Problem code method will be called for each problem that is detected p This method is long running progress and cancellation are provided by the given progress monitor p param variable the global variable param requestor the code snippet requestor param progress Monitor a progress monitor exception Java Model Exception if a runtime problem occurred or if this context s project has no build state public void evaluate Variable I Global Variable variable I Code Snippet Requestor requestor I Progress Monitor progress Monitor  JavaModelException acceptProblem progressMonitor JavaModelException evaluateVariable IGlobalVariable ICodeSnippetRequestor IProgressMonitor progressMonitor
throws Java Model Exception Returns the import declarations for this evaluation context Returns and empty list if there are no imports the default if the imports have never been set The syntax for the import corresponds to a fully qualified type name or to an on demand package name as defined by Import Declaration JLS2 7 5 For example code java util Hashtable code or code java util code return the list of import names  JavaModelException ImportDeclaration
public String get Imports Returns the name of the package in which code snippets are to be compiled and run Returns an empty string for the default package the default if the package name has never been set For example code com example myapp code return the dot separated package name or the empty string indicating the default package  getImports
public String get Package Name Returns the Java project this evaluation context was created for return the Java project  getPackageName
public I Java Project get Project Creates a new global variable with the given name type and initializer p The code type Name code and code initializer code are interpreted in the context of this context s package and import declarations p p The syntax for a type name corresponds to Type in Field Declaration JLS2 8 3 p param type Name the type name param name the name of the global variable param initializer the initializer expression or code null code if the variable is not initialized return a new global variable with the given name type and initializer public I Global Variable new Variable String type Name String name  IJavaProject getProject typeName typeName IGlobalVariable newVariable typeName
String initializer Sets the import declarations for this evaluation context An empty list indicates there are no imports The syntax for the import corresponds to a fully qualified type name or to an on demand package name as defined by Import Declaration JLS2 7 5 For example code java util Hashtable code or code java util code param imports the list of import names  ImportDeclaration
public void set Imports String imports Sets the dot separated name of the package in which code snippets are to be compiled and run For example code com example myapp code param package Name the dot separated package name or the empty string indicating the default package  setImports packageName
public void set Package Name String package Name Validates this evaluation context s import declarations The given requestor s code accept Problem code method is called for each problem that is detected param requestor the code snippet requestor exception Java Model Exception if this context s project has no build state public void validate Imports I Code Snippet Requestor requestor  setPackageName packageName acceptProblem JavaModelException validateImports ICodeSnippetRequestor
Performs a code completion at the given position in the given code snippet reporting results to the given completion requestor p Note that code completion does not involve evaluation p param code Snippet the code snippet to complete in param position the character position in the code snippet to complete at or 1 indicating the beginning of the snippet param requestor the code completion requestor capable of accepting all possible types of completions exception Java Model Exception if code completion could not be performed Reasons include ul li The position specified is less than 1 or is greater than the snippet s length INDEX OUT OF BOUNDS li ul deprecated use code Complete String int I Completion Requestor instead public void code Complete String code Snippet int position org eclipse jdt core I Code Completion Requestor requestor  codeSnippet JavaModelException INDEX_OUT_OF_BOUNDS codeComplete ICompletionRequestor codeComplete codeSnippet ICodeCompletionRequestor

public interface I Global Variable Returns the initializer of this global variable The syntax for an initializer corresponds to Variable Initializer JLS2 8 3 return the initializer expression or code null code if this global does not have an initializer  IGlobalVariable VariableInitializer
public String get Initializer Returns the name of this global variable return the name of the global variable  getInitializer
public String get Name Returns the fully qualified name of the type of this global variable or its simple representation if it is a primitive type code int code code boolean code etc p The syntax for a type name corresponds to Type in Field Declaration JLS2 8 3 p return the type name  getName

Not instantiable private Flags Not instantiable 
Returns whether the given integer includes the code abstract code modifier param flags the flags return code true code if the code abstract code modifier is included public static boolean is Abstract int flags return flags Acc Abstract 0  isAbstract AccAbstract
Returns whether the given integer includes the indication that the element is deprecated code deprecated code tag in Javadoc comment param flags the flags return code true code if the element is marked as deprecated public static boolean is Deprecated int flags return flags Acc Deprecated 0  isDeprecated AccDeprecated
Returns whether the given integer includes the code final code modifier param flags the flags return code true code if the code final code modifier is included public static boolean is Final int flags return flags Acc Final 0  isFinal AccFinal
Returns whether the given integer includes the code interface code modifier param flags the flags return code true code if the code interface code modifier is included since 2 0 public static boolean is Interface int flags return flags Acc Interface 0  isInterface AccInterface
Returns whether the given integer includes the code native code modifier param flags the flags return code true code if the code native code modifier is included public static boolean is Native int flags return flags Acc Native 0  isNative AccNative
Returns whether the given integer includes the code private code modifier param flags the flags return code true code if the code private code modifier is included public static boolean is Private int flags return flags Acc Private 0  isPrivate AccPrivate
Returns whether the given integer includes the code protected code modifier param flags the flags return code true code if the code protected code modifier is included public static boolean is Protected int flags return flags Acc Protected 0  isProtected AccProtected
Returns whether the given integer includes the code public code modifier param flags the flags return code true code if the code public code modifier is included public static boolean is Public int flags return flags Acc Public 0  isPublic AccPublic
Returns whether the given integer includes the code static code modifier param flags the flags return code true code if the code static code modifier is included public static boolean is Static int flags return flags Acc Static 0  isStatic AccStatic
Returns whether the given integer includes the code strictfp code modifier param flags the flags return code true code if the code strictfp code modifier is included public static boolean is Strictfp int flags return flags Acc Strictfp 0  isStrictfp AccStrictfp
Returns whether the given integer includes the code synchronized code modifier param flags the flags return code true code if the code synchronized code modifier is included public static boolean is Synchronized int flags return flags Acc Synchronized 0  isSynchronized AccSynchronized
Returns whether the given integer includes the indication that the element is synthetic param flags the flags return code true code if the element is marked synthetic public static boolean is Synthetic int flags return flags Acc Synthetic 0  isSynthetic AccSynthetic
Returns whether the given integer includes the code transient code modifier param flags the flags return code true code if the code transient code modifier is included public static boolean is Transient int flags return flags Acc Transient 0  isTransient AccTransient
Returns whether the given integer includes the code volatile code modifier param flags the flags return code true code if the code volatile code modifier is included public static boolean is Volatile int flags return flags Acc Volatile 0  isVolatile AccVolatile
Returns whether the given integer has the code Acc Bridge code bit set param flags the flags return code true code if the code Acc Bridge code flag is included see Acc Bridge since 3 0 public static boolean is Bridge int flags return flags Acc Bridge 0  AccBridge AccBridge AccBridge isBridge AccBridge
Returns whether the given integer has the code Acc Varargs code bit set param flags the flags return code true code if the code Acc Varargs code flag is included see Acc Varargs since 3 0 public static boolean is Varargs int flags return flags Acc Varargs 0  AccVarargs AccVarargs AccVarargs isVarargs AccVarargs
Returns whether the given integer has the code Acc Enum code bit set param flags the flags return code true code if the code Acc Enum code flag is included see Acc Enum since 3 0 public static boolean is Enum int flags return flags Acc Enum 0  AccEnum AccEnum AccEnum isEnum AccEnum
Returns whether the given integer has the code Acc Annotation code bit set param flags the flags return code true code if the code Acc Annotation code flag is included see Acc Annotation since 3 0 public static boolean is Annotation int flags return flags Acc Annotation 0  AccAnnotation AccAnnotation AccAnnotation isAnnotation AccAnnotation
Returns a standard string describing the given modifier flags Only modifier flags are included in the output deprecated synthetic bridge etc flags are ignored p The flags are output in the following order pre code public code code protected code code private code code static code code abstract code code final code code native code code synchronized code code transient code code volatile code code strictfp code pre This is a compromise between the orders specified in sections 8 1 1 8 3 1 8 4 3 8 8 3 9 1 1 and 9 3 of em The Java Language Specification Second Edition em JLS2 p p Examples results pre code public static final code code private native code pre p param flags the flags return the standard string representation of the given flags public static String to String int flags String Buffer sb new String Buffer if is Public flags sb append public NON NLS 1 if is Protected flags sb append protected NON NLS 1 if is Private flags sb append private NON NLS 1 if is Static flags sb append static NON NLS 1 if is Abstract flags sb append abstract NON NLS 1 if is Final flags sb append final NON NLS 1 if is Native flags sb append native NON NLS 1 if is Synchronized flags sb append synchronized NON NLS 1 if is Transient flags sb append transient NON NLS 1 if is Volatile flags sb append volatile NON NLS 1 if is Strictfp flags sb append strictfp NON NLS 1 int len sb length if len 0 return NON NLS 1 sb set Length len 1 return sb to String  toString StringBuffer StringBuffer isPublic isProtected isPrivate isStatic isAbstract isFinal isNative isSynchronized isTransient isVolatile isStrictfp setLength toString

Format code source code and returns a text edit that correspond to the difference between the given string and the formatted string It returns null if the given string cannot be formatted If the offset position is matching a whitespace the result can include whitespaces It would be up to the caller to get rid of preceeding whitespaces param kind Use to specify the kind of the code snippet to format It can be any of these K EXPRESSION K STATEMENTS K CLASS BODY DECLARATIONS K COMPILATION UNIT K UNKNOWN param source the source to format param offset the given offset to start recording the edits inclusive param length the given length to stop recording the edits exclusive param indentation Level the initial indentation level used to shift left right the entire source fragment An initial indentation level of zero or below has no effect param line Separator the line separator to use in formatted source if set to code null code then the platform default one will be used return the text edit throws Illegal Argument Exception if offset is lower than 0 length is lower than 0 or length is greater than source length  K_EXPRESSION K_STATEMENTS K_CLASS_BODY_DECLARATIONS K_COMPILATION_UNIT K_UNKNOWN indentationLevel lineSeparator IllegalArgumentException

Returns the formatter settings that most closely approximate the default formatter settings of Eclipse version 2 1 return the Eclipse 2 1 settings since 3 0 public static Map get Eclipse21 Settings return Default Code Formatter Options get Default Settings get Map  getEclipse21Settings DefaultCodeFormatterOptions getDefaultSettings getMap
Returns the settings according to the Java conventions return the settings according to the Java conventions since 3 0 public static Map get Java Conventions Settings return Default Code Formatter Options get Java Conventions Settings get Map  getJavaConventionsSettings DefaultCodeFormatterOptions getJavaConventionsSettings getMap
p Return the force value of the given alignment value The given alignment value should be created using the code create Alignment Value boolean int int code API p param value the given alignment value return the force value of the given alignment value see create Alignment Value boolean int int exception Illegal Argument Exception if the given alignment value is null or if it doesn t have a valid format public static boolean get Force Wrapping String value if value null throw WRONG ARGUMENT try int existing Value Integer parse Int value return existing Value Alignment M FORCE 0 catch Number Format Exception e throw WRONG ARGUMENT  createAlignmentValue createAlignmentValue IllegalArgumentException getForceWrapping WRONG_ARGUMENT existingValue parseInt existingValue M_FORCE NumberFormatException WRONG_ARGUMENT
p Return the indentation style of the given alignment value The given alignment value should be created using the code create Alignment Value boolean int int code API p param value the given alignment value return the indentation style of the given alignment value see create Alignment Value boolean int int exception Illegal Argument Exception if the given alignment value is null or if it doesn t have a valid format public static int get Indent Style String value if value null throw WRONG ARGUMENT try int existing Value Integer parse Int value if existing Value Alignment M INDENT BY ONE 0 return INDENT BY ONE else if existing Value Alignment M INDENT ON COLUMN 0 return INDENT ON COLUMN else return INDENT DEFAULT catch Number Format Exception e throw WRONG ARGUMENT  createAlignmentValue createAlignmentValue IllegalArgumentException getIndentStyle WRONG_ARGUMENT existingValue parseInt existingValue M_INDENT_BY_ONE INDENT_BY_ONE existingValue M_INDENT_ON_COLUMN INDENT_ON_COLUMN INDENT_DEFAULT NumberFormatException WRONG_ARGUMENT
p Return the wrapping style of the given alignment value The given alignment value should be created using the code create Alignment Value boolean int int code API p param value the given alignment value return the wrapping style of the given alignment value see create Alignment Value boolean int int exception Illegal Argument Exception if the given alignment value is null or if it doesn t have a valid format public static int get Wrapping Style String value if value null throw WRONG ARGUMENT try int existing Value Integer parse Int value Alignment SPLIT MASK switch existing Value case Alignment M COMPACT SPLIT return WRAP COMPACT case Alignment M COMPACT FIRST BREAK SPLIT return WRAP COMPACT FIRST BREAK case Alignment M NEXT PER LINE SPLIT return WRAP NEXT PER LINE case Alignment M NEXT SHIFTED SPLIT return WRAP NEXT SHIFTED case Alignment M ONE PER LINE SPLIT return WRAP ONE PER LINE default return WRAP NO SPLIT catch Number Format Exception e throw WRONG ARGUMENT  createAlignmentValue createAlignmentValue IllegalArgumentException getWrappingStyle WRONG_ARGUMENT existingValue parseInt SPLIT_MASK existingValue M_COMPACT_SPLIT WRAP_COMPACT M_COMPACT_FIRST_BREAK_SPLIT WRAP_COMPACT_FIRST_BREAK M_NEXT_PER_LINE_SPLIT WRAP_NEXT_PER_LINE M_NEXT_SHIFTED_SPLIT WRAP_NEXT_SHIFTED M_ONE_PER_LINE_SPLIT WRAP_ONE_PER_LINE WRAP_NO_SPLIT NumberFormatException WRONG_ARGUMENT
p Set the indentation style of the given alignment value and return the new value The given value should be created using the code create Alignment Value boolean int int code API p param value the given alignment value param indent Style the given indentation style return the new alignment value see INDENT BY ONE see INDENT DEFAULT see INDENT ON COLUMN see create Alignment Value boolean int int exception Illegal Argument Exception if the given alignment value is null if the given indentation style is not one of the possible indentation styles or if the given alignment value doesn t have a valid format public static String set Indent Style String value int indent Style if value null throw WRONG ARGUMENT switch indent Style case INDENT BY ONE case INDENT DEFAULT case INDENT ON COLUMN break default throw WRONG ARGUMENT try int existing Value Integer parse Int value clear existing indent bits existing Value Alignment M INDENT BY ONE Alignment M INDENT ON COLUMN switch indent Style case INDENT BY ONE existing Value Alignment M INDENT BY ONE break case INDENT ON COLUMN existing Value Alignment M INDENT ON COLUMN return String value Of existing Value catch Number Format Exception e throw WRONG ARGUMENT  createAlignmentValue indentStyle INDENT_BY_ONE INDENT_DEFAULT INDENT_ON_COLUMN createAlignmentValue IllegalArgumentException setIndentStyle indentStyle WRONG_ARGUMENT indentStyle INDENT_BY_ONE INDENT_DEFAULT INDENT_ON_COLUMN WRONG_ARGUMENT existingValue parseInt existingValue M_INDENT_BY_ONE M_INDENT_ON_COLUMN indentStyle INDENT_BY_ONE existingValue M_INDENT_BY_ONE INDENT_ON_COLUMN existingValue M_INDENT_ON_COLUMN valueOf existingValue NumberFormatException WRONG_ARGUMENT
p Set the force value of the given alignment value and return the new value The given alignment value should be created using the code create Alignment Value boolean int int code API p param value the given alignment value param force the given force value return the new alignment value see create Alignment Value boolean int int exception Illegal Argument Exception if the given alignment value is null or if it doesn t have a valid format public static String set Force Wrapping String value boolean force if value null throw WRONG ARGUMENT try int existing Value Integer parse Int value clear existing force bit existing Value Alignment M FORCE if force existing Value Alignment M FORCE return String value Of existing Value catch Number Format Exception e throw WRONG ARGUMENT  createAlignmentValue createAlignmentValue IllegalArgumentException setForceWrapping WRONG_ARGUMENT existingValue parseInt existingValue M_FORCE existingValue M_FORCE valueOf existingValue NumberFormatException WRONG_ARGUMENT
p Set the wrapping style of the given alignment value and return the new value The given value should be created using the code create Alignment Value boolean int int code API p param value the given alignment value param wrapping Style the given wrapping style return the new alignment value see WRAP COMPACT see WRAP COMPACT FIRST BREAK see WRAP NEXT PER LINE see WRAP NEXT SHIFTED see WRAP NO SPLIT see WRAP ONE PER LINE see create Alignment Value boolean int int exception Illegal Argument Exception if the given alignment value is null if the given wrapping style is not one of the possible wrapping styles or if the given alignment value doesn t have a valid format public static String set Wrapping Style String value int wrapping Style if value null throw WRONG ARGUMENT switch wrapping Style case WRAP COMPACT case WRAP COMPACT FIRST BREAK case WRAP NEXT PER LINE case WRAP NEXT SHIFTED case WRAP NO SPLIT case WRAP ONE PER LINE break default throw WRONG ARGUMENT try int existing Value Integer parse Int value clear existing split bits existing Value Alignment SPLIT MASK switch wrapping Style case WRAP COMPACT existing Value Alignment M COMPACT SPLIT break case WRAP COMPACT FIRST BREAK existing Value Alignment M COMPACT FIRST BREAK SPLIT break case WRAP NEXT PER LINE existing Value Alignment M NEXT PER LINE SPLIT break case WRAP NEXT SHIFTED existing Value Alignment M NEXT SHIFTED SPLIT break case WRAP ONE PER LINE existing Value Alignment M ONE PER LINE SPLIT break return String value Of existing Value catch Number Format Exception e throw WRONG ARGUMENT  createAlignmentValue wrappingStyle WRAP_COMPACT WRAP_COMPACT_FIRST_BREAK WRAP_NEXT_PER_LINE WRAP_NEXT_SHIFTED WRAP_NO_SPLIT WRAP_ONE_PER_LINE createAlignmentValue IllegalArgumentException setWrappingStyle wrappingStyle WRONG_ARGUMENT wrappingStyle WRAP_COMPACT WRAP_COMPACT_FIRST_BREAK WRAP_NEXT_PER_LINE WRAP_NEXT_SHIFTED WRAP_NO_SPLIT WRAP_ONE_PER_LINE WRONG_ARGUMENT existingValue parseInt existingValue SPLIT_MASK wrappingStyle WRAP_COMPACT existingValue M_COMPACT_SPLIT WRAP_COMPACT_FIRST_BREAK existingValue M_COMPACT_FIRST_BREAK_SPLIT WRAP_NEXT_PER_LINE existingValue M_NEXT_PER_LINE_SPLIT WRAP_NEXT_SHIFTED existingValue M_NEXT_SHIFTED_SPLIT WRAP_ONE_PER_LINE existingValue M_ONE_PER_LINE_SPLIT valueOf existingValue NumberFormatException WRONG_ARGUMENT
Create a new alignment value according to the given values This must be used to set up the alignment options param force Split the given force value param wrap Style the given wrapping style param indent Style the given indent style return the new alignement value public static String create Alignment Value boolean force Split int wrap Style int indent Style int alignment Value 0 switch wrap Style case WRAP COMPACT alignment Value Alignment M COMPACT SPLIT break case WRAP COMPACT FIRST BREAK alignment Value Alignment M COMPACT FIRST BREAK SPLIT break case WRAP NEXT PER LINE alignment Value Alignment M NEXT PER LINE SPLIT break case WRAP NEXT SHIFTED alignment Value Alignment M NEXT SHIFTED SPLIT break case WRAP ONE PER LINE alignment Value Alignment M ONE PER LINE SPLIT break if force Split alignment Value Alignment M FORCE switch indent Style case INDENT BY ONE alignment Value Alignment M INDENT BY ONE break case INDENT ON COLUMN alignment Value Alignment M INDENT ON COLUMN return String value Of alignment Value  forceSplit wrapStyle indentStyle createAlignmentValue forceSplit wrapStyle indentStyle alignmentValue wrapStyle WRAP_COMPACT alignmentValue M_COMPACT_SPLIT WRAP_COMPACT_FIRST_BREAK alignmentValue M_COMPACT_FIRST_BREAK_SPLIT WRAP_NEXT_PER_LINE alignmentValue M_NEXT_PER_LINE_SPLIT WRAP_NEXT_SHIFTED alignmentValue M_NEXT_SHIFTED_SPLIT WRAP_ONE_PER_LINE alignmentValue M_ONE_PER_LINE_SPLIT forceSplit alignmentValue M_FORCE indentStyle INDENT_BY_ONE alignmentValue M_INDENT_BY_ONE INDENT_ON_COLUMN alignmentValue M_INDENT_ON_COLUMN valueOf alignmentValue

Adds the given listener for changes to this buffer Has no effect if an identical listener is already registered or if the buffer is closed param listener the listener of buffer changes 
public void add Buffer Changed Listener I Buffer Changed Listener listener Appends the given character array to the contents of the buffer This buffer will now have unsaved changes Any client can append to the contents of the buffer not just the owner of the buffer Reports a buffer changed event p Has no effect if this buffer is read only or if the buffer is closed param text the given character array to append to contents of the buffer  addBufferChangedListener IBufferChangedListener
public void append char text Appends the given string to the contents of the buffer This buffer will now have unsaved changes Any client can append to the contents of the buffer not just the owner of the buffer Reports a buffer changed event p Has no effect if this buffer is read only or if the buffer is closed param text the code String code to append to the contents of the buffer 
public void append String text Closes the buffer Any unsaved changes are lost Reports a buffer changed event with a 0 offset and a 0 length When this event is fired the buffer should already be closed p Further operations on the buffer are not allowed except for close If an attempt is made to close an already closed buffer the second attempt has no effect 
public void close Returns the character at the given position in this buffer p The returned value is undefined if the buffer is closed param position a zero based source offset in this buffer return the character at the given position in this buffer 
public char get Char int position Returns the contents of this buffer as a character array or code null code if the buffer has not been initialized p Callers should make no assumption about whether the returned character array is or is not the genuine article or a copy In other words if the client wishes to change this array they should make a copy Likewise if the client wishes to hang on to the array in its current state they should make a copy p p The returned value is undefined if the buffer is closed return the characters contained in this buffer  getChar
public char get Characters Returns the contents of this buffer as a code String code Like all strings the result is an immutable value object It can also answer code null code if the buffer has not been initialized p The returned value is undefined if the buffer is closed return the contents of this buffer as a code String code  getCharacters
public String get Contents Returns number of characters stored in this buffer p The returned value is undefined if the buffer is closed return the number of characters in this buffer  getContents
public int get Length Returns the Java openable element owning of this buffer return the openable element owning this buffer  getLength
public I Openable get Owner Returns the given range of text in this buffer p The returned value is undefined if the buffer is closed param offset the zero based starting offset param length the number of characters to retrieve return the given range of text in this buffer  IOpenable getOwner
public String get Text int offset int length Returns the underlying resource for which this buffer was opened or code null code if this buffer was not opened on a resource return the underlying resource for this buffer or code null code if none  getText
public I Resource get Underlying Resource Returns whether this buffer has been modified since it was opened or since it was last saved If a buffer does not have an underlying resource this method always returns code true code p NOTE when a buffer does not have unsaved changes the model may decide to close it to claim some memory back If the associated element needs to be reopened later on its buffer factory will be requested to create a new buffer p return a code boolean code indicating presence of unsaved changes in the absence of any underlying resource it will always return code true code  IResource getUnderlyingResource
public boolean has Unsaved Changes Returns whether this buffer has been closed return a code boolean code indicating whether this buffer is closed  hasUnsavedChanges
public boolean is Closed Returns whether this buffer is read only return a code boolean code indicating whether this buffer is read only  isClosed
public boolean is Read Only Removes the given listener from this buffer Has no affect if an identical listener is not registered or if the buffer is closed param listener the listener  isReadOnly
public void remove Buffer Changed Listener I Buffer Changed Listener listener Replaces the given range of characters in this buffer with the given text code position code and code position length code must be in the range 0 get Length code length code must not be negative p Has no effect if this buffer is read only or if the buffer is closed param position the zero based starting position of the affected text range in this buffer param length the length of the affected text range in this buffer param text the replacing text as a character array  removeBufferChangedListener IBufferChangedListener getLength
public void replace int position int length char text Replaces the given range of characters in this buffer with the given text code position code and code position length code must be in the range 0 get Length code length code must not be negative p Has no effect if this buffer is read only or if the buffer is closed param position the zero based starting position of the affected text range in this buffer param length the length of the affected text range in this buffer param text the replacing text as a code String code  getLength
public void replace int position int length String text Saves the contents of this buffer to its underlying resource If successful this buffer will have no unsaved changes The buffer is left open Saving a buffer with no unsaved changes has no effect the underlying resource is not changed If the buffer does not have an underlying resource or is read only this has no effect p The code force code parameter controls how this method deals with cases where the workbench is not completely in sync with the local file system If code false code is specified this method will only attempt to overwrite a corresponding file in the local file system provided it is in sync with the workbench This option ensures there is no unintended data loss it is the recommended setting However if code true code is specified an attempt will be made to write a corresponding file in the local file system overwriting any existing one if need be In either case if this method succeeds the resource will be marked as being local even if it wasn t before p Has no effect if this buffer is read only or if the buffer is closed param progress the progress monitor to notify param force a code boolean code flag indicating how to deal with resource inconsistencies exception Java Model Exception if an error occurs writing the buffer to the underlying resource see org eclipse core resources I File set Contents java io Input Stream boolean boolean org eclipse core runtime I Progress Monitor  JavaModelException IFile setContents InputStream IProgressMonitor
public void save I Progress Monitor progress boolean force throws Java Model Exception Sets the contents of this buffer to the given character array This buffer will now have unsaved changes Any client can set the contents of the buffer not just the owner of the buffer Reports a buffer changed event p Equivalent to code replace 0 get Length contents code p p Has no effect if this buffer is read only or if the buffer is closed param contents the new contents of this buffer as a character array  IProgressMonitor JavaModelException getLength
public void set Contents char contents Sets the contents of this buffer to the given code String code This buffer will now have unsaved changes Any client can set the contents of the buffer not just the owner of the buffer Reports a buffer changed event p Equivalent to code replace 0 get Length contents code p p Has no effect if this buffer is read only or if the buffer is closed param contents the new contents of this buffer as a code String code  setContents getLength

Notifies that the given event has occurred param event the change event 

Creates a buffer for the given owner The new buffer will be initialized with the contents of the owner if and only if it was not already initialized by the factory a buffer is uninitialized if its content is code null code param owner the owner of the buffer return the newly created buffer see I Buffer  IBuffer

public interface I Class File extends I Java Element I Parent I Openable I Source Reference I Code Assist Returns the smallest element within this class file that includes the given source position a method field etc or code null code if there is no element other than the class file itself at the given position or if the given position is not within the source range of this class file param position a source position inside the class file return the innermost Java element enclosing a given source position or code null code if none excluding the class file exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  IClassFile IJavaElement IParent IOpenable ISourceReference ICodeAssist JavaModelException
I Java Element get Element At int position throws Java Model Exception Returns the type contained in this class file return the type contained in this class file exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  IJavaElement getElementAt JavaModelException JavaModelException
I Type get Type throws Java Model Exception Returns a working copy on the source associated with this class file using the given owner to create the buffer or code null code if there is no source associated with the class file p The buffer will be automatically initialized with the source of the class file upon creation p The only valid operations on this working copy are code get Buffer code or code get Primary code param owner the owner that creates a buffer that is used to get the content of the working copy or code null code if the primary owner should be used param monitor a progress monitor used to report progress while opening this compilation unit or code null code if no progress should be reported return a a working copy on the source associated with this class file exception Java Model Exception if the source of this class file can not be determined Reasons include ul li This class file does not exist ELEMENT DOES NOT EXIST li ul since 3 0  IType getType JavaModelException getBuffer getPrimary JavaModelException ELEMENT_DOES_NOT_EXIST
I Compilation Unit get Working Copy Working Copy Owner owner I Progress Monitor monitor throws Java Model Exception Returns a working copy on the source associated with this class file using the given factory to create the buffer or code null code if there is no source associated with the class file p The buffer will be automatically initialized with the source of the class file upon creation p The only valid operations on this working copy are code get Buffer code or code get Original Element code param monitor a progress monitor used to report progress while opening this compilation unit or code null code if no progress should be reported param factory the factory that creates a buffer that is used to get the content of the working copy or code null code if the internal factory should be used return a a working copy on the source associated with this class file exception Java Model Exception if the source of this class file can not be determined Reasons include ul li This class file does not exist ELEMENT DOES NOT EXIST li ul since 2 0 deprecated Use get Working Copy Working Copy Owner I Progress Monitor instead  ICompilationUnit getWorkingCopy WorkingCopyOwner IProgressMonitor JavaModelException getBuffer getOriginalElement JavaModelException ELEMENT_DOES_NOT_EXIST getWorkingCopy WorkingCopyOwner IProgressMonitor
I Java Element get Working Copy I Progress Monitor monitor I Buffer Factory factory throws Java Model Exception Returns whether this type represents a class This is not guaranteed to be instantaneous as it may require parsing the underlying file return code true code if the class file represents a class exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  IJavaElement getWorkingCopy IProgressMonitor IBufferFactory JavaModelException JavaModelException
boolean is Class throws Java Model Exception Returns whether this type represents an interface This is not guaranteed to be instantaneous as it may require parsing the underlying file return code true code if the class file represents an interface exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  isClass JavaModelException JavaModelException

Answers the set of classpath entries this container is mapping to p The set of entries associated with a classpath container may contain any of the following ul li library entries code CPE LIBRARY code li li project entries code CPE PROJECT code li ul A classpath container can neither reference further classpath containers or classpath variables p p This method is called by the Java model when it needs to resolve this classpath container entry into a list of library and project entries The method is typically called exactly once for a given Java project and the resulting list of entries cached internally by the Java model This method must not be called by other clients p There are a wide variety of conditions under which this method may be invoked To ensure that the implementation does not interfere with correct functioning of the Java model the implementation should use only the following Java model AP Is ul li link Java Core new Library Entry I Path I Path I Path boolean and variants li li link Java Core new Project Entry I Path boolean and variants li li link Java Core create org eclipse core resources I Workspace Root li li link Java Core create org eclipse core resources I Project li li link I Java Model get Java Projects li li link I Java Project get Raw Classpath li li link I Java Project read Raw Classpath li li link I Java Project get Output Location li li link I Java Project read Output Location li li Java element operations marked as handle only li ul The effects of using other Java model AP Is are unspecified p return I Classpath Entry the classpath entries this container represents see I Classpath Entry  CPE_LIBRARY CPE_PROJECT APIs JavaCore newLibraryEntry IPath IPath IPath JavaCore newProjectEntry IPath JavaCore IWorkspaceRoot JavaCore IProject IJavaModel getJavaProjects IJavaProject getRawClasspath IJavaProject readRawClasspath IJavaProject getOutputLocation IJavaProject readOutputLocation APIs IClasspathEntry IClasspathEntry
Answers a readable description of this container return String a string description of the container 
Answers the kind of this container Can be either ul li code K APPLICATION code if this container maps to an application library li li code K SYSTEM code if this container maps to a system library li li code K DEFAULT SYSTEM code if this container maps to a default system library library implicitly contributed by the runtime li ul Typically system containers should be placed first on a build path return the kind of this container  K_APPLICATION K_SYSTEM K_DEFAULT_SYSTEM
Answers the container path identifying this container A container path is formed by a first ID segment followed with extra segments which can be used as additional hints for resolving to this container p The container ID is also used to identify a code Classpath Container Initializer code registered on the extension point org eclipse jdt core classpath Container Initializer which can be invoked if needing to resolve the container before it is explicitly set p return I Path the container path that is associated with this container  ClasspathContainerInitializer classpathContainerInitializer IPath

Returns the kind of files found in the package fragments identified by this classpath entry return code I Package Fragment Root K SOURCE code for files containing source code and code I Package Fragment Root K BINARY code for binary class files There is no specified value for an entry denoting a variable code CPE VARIABLE code or a classpath container code CPE CONTAINER code  IPackageFragmentRoot K_SOURCE IPackageFragmentRoot K_BINARY CPE_VARIABLE CPE_CONTAINER
Returns the kind of this classpath entry return one of ul li code CPE SOURCE code this entry describes a source root in its project li code CPE LIBRARY code this entry describes a folder or JAR containing binaries li code CPE PROJECT code this entry describes another project li code CPE VARIABLE code this entry describes a project or library indirectly via a classpath variable in the first segment of the path li code CPE CONTAINER code this entry describes set of entries referenced indirectly via a classpath container ul  CPE_SOURCE CPE_LIBRARY CPE_PROJECT CPE_VARIABLE CPE_CONTAINER
Returns the set of patterns used to exclude resources associated with this source entry p Exclusion patterns allow specified portions of the resource tree rooted at this source entry s path to be filtered out If no exclusion patterns are specified this source entry includes all relevent files Each path specified must be a relative path and will be interpreted relative to this source entry s path File patterns are case sensitive A file matched by one or more of these patterns is excluded from the corresponding package fragment root Exclusion patterns have higher precedence than inclusion patterns in other words exclusion patterns can remove files for the ones that are to be included not the other way around p p Note that there is no need to supply a pattern to exclude class files because a source entry filters these out automatically p p The pattern mechanism is similar to Ant s Each pattern is represented as a relative path The path segments can be regular file or folder names or simple patterns involving standard wildcard characters p p matches 0 or more characters within a segment So code java code matches code java code code a java code and code Foo java code but not code Foo properties code does not end with code java code p p matches 1 character within a segment So code java code matches code a java code code A java code but not code java code or code xyz java code neither have just one character before code java code p p Combinations of s and s are allowed p p The special pattern matches zero or more segments A path like code tests code that ends in a trailing separator is interpreted as code tests 42 42 code and would match all files under the the folder named code tests code p p Examples ul li code tests 42 42 code or simply code tests code matches all files under a root folder named code tests code This includes code tests Foo java code and code tests com example Foo java code but not code com example tests Foo java code not under a root folder named code tests code li li code tests 42 code matches all files directly below a root folder named code tests code This includes code tests Foo java code and code tests Foo Help java code but not code tests com example Foo java code not directly under a folder named code tests code or code com Foo java code not under a folder named code tests code li li code 42 42 tests 42 42 code matches all files under any folder named code tests code This includes code tests Foo java code code com examples tests Foo java code and code com examples tests unit Foo java code but not code com example Foo java code not under a folder named code tests code li ul p return the possibly empty list of resource exclusion patterns associated with this source entry and code null code for other kinds of classpath entries since 2 1  FooHelp
Returns the set of patterns used to explicitly define resources to be included with this source entry p When no inclusion patterns are specified the source entry includes all relevent files in the resource tree rooted at this source entry s path Specifying one or more inclusion patterns means that only the specified portions of the resource tree are to be included Each path specified must be a relative path and will be interpreted relative to this source entry s path File patterns are case sensitive A file matched by one or more of these patterns is included in the corresponding package fragment root unless it is excluded by one or more of this entrie s exclusion patterns Exclusion patterns have higher precedence than inclusion patterns in other words exclusion patterns can remove files for the ones that are to be included not the other way around p p See link get Exclusion Patterns for a discussion of the syntax and semantics of path patterns The absence of any inclusion patterns is semantically equivalent to the explicit inclusion pattern code 42 42 code p p Examples ul li The inclusion pattern code src 42 42 code by itself includes all files under a root folder named code src code li li The inclusion patterns code src 42 42 code and code tests 42 42 code includes all files under the root folders named code src code and code tests code li li The inclusion pattern code src 42 42 code together with the exclusion pattern code src 42 42 Foo java code includes all files under a root folder named code src code except for ones named code Foo java code li ul p return the possibly empty list of resource inclusion patterns associated with this source entry and code null code for other kinds of classpath entries since 3 0  getExclusionPatterns
Returns the full path to the specific location where the builder writes code class code files generated for this source entry entry kind code CPE SOURCE code p Source entries can optionally be associated with a specific output location If none is provided the source entry will be implicitly associated with its project default output location see code I Java Project get Output Location code p p NOTE A specific output location cannot coincidate with another source library entry p return the full path to the specific location where the builder writes code class code files for this source entry or code null code if using default output folder since 2 1  CPE_SOURCE IJavaProject getOutputLocation
Returns the path of this classpath entry The meaning of the path of a classpath entry depends on its entry kind ul li Source code in the current project code CPE SOURCE code The path associated with this entry is the absolute path to the root folder li li A binary library in the current project code CPE LIBRARY code the path associated with this entry is the absolute path to the JAR or root folder and in case it refers to an external JAR then there is no associated resource in the workbench li A required project code CPE PROJECT code the path of the entry denotes the path to the corresponding project resource li li A variable entry code CPE VARIABLE code the first segment of the path is the name of a classpath variable If this classpath variable is bound to the path it P it the path of the corresponding classpath entry is computed by appending to it P it the segments of the returned path without the variable li li A container entry code CPE CONTAINER code the path of the entry is the name of the classpath container which can be bound indirectly to a set of classpath entries after resolution The container Path is a formed by a first ID segment followed with extra segments that can be used as additional hints for resolving this container reference also see code I Classpath Container code li ul return the path of this classpath entry  CPE_SOURCE CPE_LIBRARY CPE_PROJECT CPE_VARIABLE CPE_CONTAINER containerPath IClasspathContainer
Returns the path to the source archive or folder associated with this classpath entry or code null code if this classpath entry has no source attachment p Only library and variable classpath entries may have source attachments For library classpath entries the result path if present locates a source archive or folder This archive or folder can be located in a project of the workspace or outside thr workspace For variable classpath entries the result path if present has an analogous form and meaning as the variable path namely the first segment is the name of a classpath variable p return the path to the source archive or folder or code null code if none 
Returns the path within the source archive or folder where package fragments are located An empty path indicates that packages are located at the root of the source archive or folder Returns a non code null code value if and only if code get Source Attachment Path code returns a non code null code value return the path within the source archive or folder or code null code if not applicable  getSourceAttachmentPath
Returns whether this entry is exported to dependent projects Always returns code false code for source entries kind code CPE SOURCE code which cannot be exported return code true code if exported and code false code otherwise since 2 0  CPE_SOURCE
This is a helper method which returns the resolved classpath entry denoted by an entry if it is a variable entry It is obtained by resolving the variable reference in the first segment Returns node null code if unable to resolve using the following algorithm ul li if variable segment cannot be resolved returns code null code li li finds a project JAR or binary folder in the workspace at the resolved path location li li if none finds an external JAR file or folder outside the workspace at the resolved path location li li if none returns code null code li ul p Variable source attachment is also resolved and recorded in the resulting classpath entry p return the resolved library or project classpath entry or code null code if the given path could not be resolved to a classpath entry p Note that this deprecated API doesn t handle CPE CONTAINER entries deprecated use Java Core get Resolved Classpath Entry  CPE_CONTAINER JavaCore getResolvedClasspathEntry

Performs code completion at the given offset position in this compilation unit reporting results to the given completion requestor The code offset code is the 0 based index of the character after which code assist is desired An code offset code of 1 indicates to code assist at the beginning of this compilation unit param offset the given offset position param requestor the given completion requestor exception Java Model Exception if code assist could not be performed Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li The position specified is 1 or is greater than this compilation unit s source length INDEX OUT OF BOUNDS ul exception Illegal Argument Exception if code requestor code is code null code deprecated Use link code Complete int I Completion Requestor instead void code Complete int offset I Code Completion Requestor requestor  JavaModelException ELEMENT_DOES_NOT_EXIST INDEX_OUT_OF_BOUNDS IllegalArgumentException codeComplete ICompletionRequestor codeComplete ICodeCompletionRequestor
throws Java Model Exception Performs code completion at the given offset position in this compilation unit reporting results to the given completion requestor The code offset code is the 0 based index of the character after which code assist is desired An code offset code of 1 indicates to code assist at the beginning of this compilation unit param offset the given offset position param requestor the given completion requestor exception Java Model Exception if code assist could not be performed Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li The position specified is 1 or is greater than this compilation unit s source length INDEX OUT OF BOUNDS ul exception Illegal Argument Exception if code requestor code is code null code since 2 0 TODO jerome once Completion Requestor is working deprecated Use link code Complete int Completion Requestor instead void code Complete int offset I Completion Requestor requestor  JavaModelException JavaModelException ELEMENT_DOES_NOT_EXIST INDEX_OUT_OF_BOUNDS IllegalArgumentException CompletionRequestor codeComplete CompletionRequestor codeComplete ICompletionRequestor
b DO NOT USE b This API element was added in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 It is currently unimplemented and the API may change slightly before reaching its final form p Performs code completion at the given offset position in this compilation unit reporting results to the given completion requestor The code offset code is the 0 based index of the character after which code assist is desired An code offset code of 1 indicates to code assist at the beginning of this compilation unit p param offset the given offset position param requestor the given completion requestor exception Java Model Exception if code assist could not be performed Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li The position specified is 1 or is greater than this compilation unit s source length INDEX OUT OF BOUNDS ul exception Illegal Argument Exception if code requestor code is code null code since 3 0 void code Complete int offset Completion Requestor requestor  JavaModelException ELEMENT_DOES_NOT_EXIST INDEX_OUT_OF_BOUNDS IllegalArgumentException codeComplete CompletionRequestor
Performs code completion at the given offset position in this compilation unit reporting results to the given completion requestor The code offset code is the 0 based index of the character after which code assist is desired An code offset code of 1 indicates to code assist at the beginning of this compilation unit It considers types in the working copies with the given owner first In other words the owner s working copies will take precedence over their original compilation units in the workspace p Note that if a working copy is empty it will be as if the original compilation unit had been deleted p param offset the given offset position param requestor the given completion requestor param owner the owner of working copies that take precedence over their original compilation units exception Java Model Exception if code assist could not be performed Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li The position specified is 1 or is greater than this compilation unit s source length INDEX OUT OF BOUNDS ul exception Illegal Argument Exception if code requestor code is code null code since 3 0 TODO jerome once Completion Requestor is working deprecated Use link code Complete int Completion Requestor Working Copy Owner instead void code Complete int offset I Completion Requestor requestor Working Copy Owner owner  JavaModelException ELEMENT_DOES_NOT_EXIST INDEX_OUT_OF_BOUNDS IllegalArgumentException CompletionRequestor codeComplete CompletionRequestor WorkingCopyOwner codeComplete ICompletionRequestor WorkingCopyOwner
b DO NOT USE b This API element was added in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 It is currently unimplemented and the API may change slightly before reaching its final form p Performs code completion at the given offset position in this compilation unit reporting results to the given completion requestor The code offset code is the 0 based index of the character after which code assist is desired An code offset code of 1 indicates to code assist at the beginning of this compilation unit It considers types in the working copies with the given owner first In other words the owner s working copies will take precedence over their original compilation units in the workspace p Note that if a working copy is empty it will be as if the original compilation unit had been deleted p param offset the given offset position param requestor the given completion requestor param owner the owner of working copies that take precedence over their original compilation units exception Java Model Exception if code assist could not be performed Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li The position specified is 1 or is greater than this compilation unit s source length INDEX OUT OF BOUNDS ul exception Illegal Argument Exception if code requestor code is code null code since 3 0 void code Complete int offset Completion Requestor requestor Working Copy Owner owner  JavaModelException ELEMENT_DOES_NOT_EXIST INDEX_OUT_OF_BOUNDS IllegalArgumentException codeComplete CompletionRequestor WorkingCopyOwner
Returns the Java elements correspondiing to the given selected text in this compilation unit The code offset code is the 0 based index of the first selected character The code length code is the number of selected characters param offset the given offset position param length the number of selected characters return the Java elements correspondiing to the given selected text exception Java Model Exception if code resolve could not be performed Reasons include li This Java element does not exist ELEMENT DOES NOT EXIST li li The range specified is not within this element s source range INDEX OUT OF BOUNDS ul  JavaModelException ELEMENT_DOES_NOT_EXIST INDEX_OUT_OF_BOUNDS
I Java Element code Select int offset int length throws Java Model Exception Returns the Java elements correspondiing to the given selected text in this compilation unit The code offset code is the 0 based index of the first selected character The code length code is the number of selected characters It considers types in the working copies with the given owner first In other words the owner s working copies will take precedence over their original compilation units in the workspace p Note that if a working copy is empty it will be as if the original compilation unit had been deleted p param offset the given offset position param length the number of selected characters param owner the owner of working copies that take precedence over their original compilation units return the Java elements correspondiing to the given selected text exception Java Model Exception if code resolve could not be performed Reasons include li This Java element does not exist ELEMENT DOES NOT EXIST li li The range specified is not within this element s source range INDEX OUT OF BOUNDS ul since 3 0  IJavaElement codeSelect JavaModelException JavaModelException ELEMENT_DOES_NOT_EXIST INDEX_OUT_OF_BOUNDS

public interface I Code Completion Requestor Code assist notification of a class completion param package Name Declaring package name of the class param class Name Name of the class param completion Name The completion for the class Can include for imported classes param modifiers The modifiers of the class param completion Start The start position of insertion of the name of the class param completion End The end position of insertion of the name of the class NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array void accept Class char package Name char class Name char completion Name int modifiers int completion Start  ICodeCompletionRequestor packageName className completionName completionStart completionEnd acceptClass packageName className completionName completionStart
int completion End Code assist notification of a compilation error detected during completion param marker Only problems which are categorized as errors are notified to the requestor warnings are silently ignored In case an error got signaled no other completions might be available therefore the problem message should be presented to the user The source positions of the problem are related to the source where it was detected might be in another compilation unit if it was indirectly requested during the code assist process Note the problem knows its originating file name  completionEnd
void accept Error I Marker marker Code assist notification of a field completion param declaring Type Package Name Name of the package in which the type that contains this field is declared param declaring Type Name Name of the type declaring this new field param name Name of the field param type Package Name Name of the package in which the type of this field is declared param type Name Name of the type of this field param completion Name The completion for the field param modifiers The modifiers of this field param completion Start The start position of insertion of the name of this field param completion End The end position of insertion of the name of this field NOTE All package and type names are presented in their readable form Package names are in the form a b c Base types are in the form int or boolean Array types are in the qualified form M or int Nested type names are in the qualified form A M The default package is represented by an empty array void accept Field char declaring Type Package Name char declaring Type Name char name char type Package Name char type Name char completion Name int modifiers int completion Start  acceptError IMarker declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart completionEnd acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart
int completion End Code assist notification of an interface completion param package Name Declaring package name of the interface param interface Name Name of the interface param completion Name The completion for the interface Can include for imported interfaces param modifiers The modifiers of the interface param completion Start The start position of insertion of the name of the interface param completion End The end position of insertion of the name of the interface NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array void accept Interface char package Name char interface Name char completion Name int modifiers int completion Start  completionEnd packageName interfaceName completionName completionStart completionEnd acceptInterface packageName interfaceName completionName completionStart
int completion End Code assist notification of a keyword completion param keyword Name The keyword source param completion Start The start position of insertion of the name of this keyword param completion End The end position of insertion of the name of this keyword  completionEnd keywordName completionStart completionEnd
void accept Keyword char keyword Name int completion Start int completion End Code assist notification of a label completion param label Name The label source param completion Start The start position of insertion of the name of this label param completion End The end position of insertion of the name of this label  acceptKeyword keywordName completionStart completionEnd labelName completionStart completionEnd
void accept Label char label Name int completion Start int completion End Code assist notification of a local variable completion param name Name of the new local variable param type Package Name Name of the package in which the type of this new local variable is declared param type Name Name of the type of this new local variable param modifiers The modifiers of this new local variable param completion Start The start position of insertion of the name of this new local variable param completion End The end position of insertion of the name of this new local variable NOTE All package and type names are presented in their readable form Package names are in the form a b c Base types are in the form int or boolean Array types are in the qualified form M or int Nested type names are in the qualified form A M The default package is represented by an empty array void accept Local Variable char name char type Package Name char type Name int modifiers int completion Start  acceptLabel labelName completionStart completionEnd typePackageName typeName completionStart completionEnd acceptLocalVariable typePackageName typeName completionStart
int completion End Code assist notification of a method completion param declaring Type Package Name Name of the package in which the type that contains this new method is declared param declaring Type Name Name of the type declaring this new method param selector Name of the new method param parameter Package Names Names of the packages in which the parameter types are declared Should contain as many elements as parameter Type Names param parameter Type Names Names of the parameters types Should contain as many elements as parameter Package Names param return Type Package Name Name of the package in which the return type is declared param return Type Name Name of the return type of this new method should be code null code for a constructor param completion Name The completion for the method Can include zero one or two brackets If the closing bracket is included then the cursor should be placed before it param modifiers The modifiers of this new method param completion Start The start position of insertion of the name of this new method param completion End The end position of insertion of the name of this new method NOTE All package and type names are presented in their readable form Package names are in the form a b c Base types are in the form int or boolean Array types are in the qualified form M or int Nested type names are in the qualified form A M The default package is represented by an empty array NOTE parameter names can be retrieved from the source model after the user selects a specific method void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start  completionEnd declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterTypeNames parameterPackageNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames returnTypePackageName returnTypeName completionName completionStart
int completion End Code assist notification of a modifier completion param modifier Name The new modifier param completion Start The start position of insertion of the name of this new modifier param completion End The end position of insertion of the name of this new modifier  completionEnd modifierName completionStart completionEnd
void accept Modifier char modifier Name int completion Start int completion End Code assist notification of a package completion param package Name The package name param completion Name The completion for the package Can include for imports param completion Start The start position of insertion of the name of this new package param completion End The end position of insertion of the name of this new package NOTE All package names are presented in their readable form Package names are in the form a b c The default package is represented by an empty array void accept Package char package Name char completion Name int completion Start  acceptModifier modifierName completionStart completionEnd packageName completionName completionStart completionEnd acceptPackage packageName completionName completionStart
int completion End Code assist notification of a type completion param package Name Declaring package name of the type param type Name Name of the type param completion Name The completion for the type Can include for imported types param completion Start The start position of insertion of the name of the type param completion End The end position of insertion of the name of the type NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array void accept Type char package Name char type Name char completion Name int completion Start  completionEnd packageName typeName completionName completionStart completionEnd acceptType packageName typeName completionName completionStart

Formats the String code source String code and returns a string containing the formatted version param string the string to format param indentation Level the initial indentation level used to shift left right the entire source fragment An initial indentation level of zero has no effect param positions an array of positions to map These are character based source positions inside the original source arranged in non decreasing order for which corresponding positions in the formatted source will be computed so as to relocate elements associated with the original source It updates the positions array with updated positions If set to code null code then no positions are mapped param line Separator the line separator to use in formatted source if set to code null code then the platform default one will be used return the formatted output string  sourceString indentationLevel lineSeparator

Changes this compilation unit handle into a working copy A new code I Buffer code is created using this compilation unit handle s owner Uses the primary owner is none was specified when this compilation unit handle was created p When switching to working copy mode problems are reported to given code I Problem Requestor code p p Once in working copy mode changes to this compilation unit or its children are done in memory Only the new buffer is affected Using code commit Working Copy boolean I Progress Monitor code will bring the underlying resource in sync with this compilation unit p p If this compilation unit was already in working copy mode an internal counter is incremented and no other action is taken on this compilation unit To bring this compilation unit back into the original mode where it reflects the underlying resource code discard Working Copy code must be call as many times as code become Working Copy code p param problem Requestor a requestor which will get notified of problems detected during reconciling as they are discovered The requestor can be set to code null code indicating that the client is not interested in problems param monitor a progress monitor used to report progress while opening this compilation unit or code null code if no progress should be reported throws Java Model Exception if this compilation unit could not become a working copy see discard Working Copy since 3 0  IBuffer IProblemRequestor commitWorkingCopy IProgressMonitor discardWorkingCopy becomeWorkingCopy problemRequestor JavaModelException discardWorkingCopy
void become Working Copy I Problem Requestor problem Requestor I Progress Monitor monitor throws Java Model Exception Commits the contents of this working copy to its underlying resource p It is possible that the contents of the original resource have changed since this working copy was created in which case there is an update conflict The value of the code force code parameter effects the resolution of such a conflict ul li code true code in this case the contents of this working copy are applied to the underlying resource even though this working copy was created before a subsequent change in the resource li li code false code in this case a code Java Model Exception code is thrown li ul p Since 2 1 a working copy can be created on a not yet existing compilation unit In particular such a working copy can then be committed in order to create the corresponding compilation unit p param force a flag to handle the cases when the contents of the original resource have changed since this working copy was created param monitor the given progress monitor throws Java Model Exception if this working copy could not commit Reasons include ul li A code Core Exception code occurred while updating an underlying resource li This element is not a working copy INVALID ELEMENT TYPES li A update conflict described above UPDATE CONFLICT ul since 3 0  becomeWorkingCopy IProblemRequestor problemRequestor IProgressMonitor JavaModelException JavaModelException JavaModelException CoreException INVALID_ELEMENT_TYPES UPDATE_CONFLICT
void commit Working Copy boolean force I Progress Monitor monitor throws Java Model Exception Creates and returns an non static import declaration in this compilation unit with the given name This method is equivalent to code create Import name Flags Acc Default sibling monitor code param name the name of the import declaration to add as defined by JLS2 7 5 For example code java io File code or code java awt code param sibling the existing element which the import declaration will be inserted immediately before if code null code then this import will be inserted as the last import declaration param monitor the progress monitor to notify return the newly inserted import declaration or the previously existing one in case attempting to create a duplicate throws Java Model Exception if the element could not be created Reasons include ul li This Java element does not exist or the specified sibling does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating an underlying resource li The specified sibling is not a child of this compilation unit INVALID SIBLING li The name is not a valid import name INVALID NAME ul see create Import String I Java Element int I Progress Monitor  commitWorkingCopy IProgressMonitor JavaModelException createImport AccDefault JavaModelException ELEMENT_DOES_NOT_EXIST CoreException INVALID_SIBLING INVALID_NAME createImport IJavaElement IProgressMonitor
Creates and returns an import declaration in this compilation unit with the given name p Optionally the new element can be positioned before the specified sibling If no sibling is specified the element will be inserted as the last import declaration in this compilation unit p If the compilation unit already includes the specified import declaration the import is not generated it does not generate duplicates Note that it is valid to specify both a single type import and an on demand import for the same package for example code java io File code and code java io code in which case both are preserved since the semantics of this are not the same as just importing code java io code Importing code java lang code or the package in which the compilation unit is defined are not treated as special cases If they are specified they are included in the result p Note This API element is only needed for dealing with Java code that uses new language features of J2SE 1 5 It is included in anticipation of J2SE 1 5 support which is planned for the next release of Eclipse after 3 0 and may change slightly before reaching its final form p param name the name of the import declaration to add as defined by JLS2 7 5 For example code java io File code or code java awt code param sibling the existing element which the import declaration will be inserted immediately before if code null code then this import will be inserted as the last import declaration param flags code Flags Acc Static code for static imports or code Flags Acc Default code for regular imports other modifier flags are ignored param monitor the progress monitor to notify return the newly inserted import declaration or the previously existing one in case attempting to create a duplicate throws Java Model Exception if the element could not be created Reasons include ul li This Java element does not exist or the specified sibling does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating an underlying resource li The specified sibling is not a child of this compilation unit INVALID SIBLING li The name is not a valid import name INVALID NAME ul see Flags since 3 0  AccStatic AccDefault JavaModelException ELEMENT_DOES_NOT_EXIST CoreException INVALID_SIBLING INVALID_NAME
Creates and returns a package declaration in this compilation unit with the given package name p If the compilation unit already includes the specified package declaration it is not generated it does not generate duplicates param name the name of the package declaration to add as defined by JLS2 7 4 For example code java lang code param monitor the progress monitor to notify return the newly inserted package declaration or the previously existing one in case attempting to create a duplicate throws Java Model Exception if the element could not be created Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating an underlying resource li The name is not a valid package name INVALID NAME ul  JavaModelException ELEMENT_DOES_NOT_EXIST CoreException INVALID_NAME
I Package Declaration create Package Declaration String name I Progress Monitor monitor throws Java Model Exception Creates and returns a type in this compilation unit with the given contents If this compilation unit does not exist one will be created with an appropriate package declaration p Optionally the new type can be positioned before the specified sibling If code sibling code is code null code the type will be appended to the end of this compilation unit p It is possible that a type with the same name already exists in this compilation unit The value of the code force code parameter effects the resolution of such a conflict ul li code true code in this case the type is created with the new contents li li code false code in this case a code Java Model Exception code is thrown li ul param contents the source contents of the type declaration to add param sibling the existing element which the type will be inserted immediately before if code null code then this type will be inserted as the last type declaration param force a code boolean code flag indicating how to deal with duplicates param monitor the progress monitor to notify return the newly inserted type throws Java Model Exception if the element could not be created Reasons include ul li The specified sibling element does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating an underlying resource li The specified sibling is not a child of this compilation unit INVALID SIBLING li The contents could not be recognized as a type declaration INVALID CONTENTS li There was a naming collision with an existing type NAME COLLISION ul  IPackageDeclaration createPackageDeclaration IProgressMonitor JavaModelException JavaModelException JavaModelException ELEMENT_DOES_NOT_EXIST CoreException INVALID_SIBLING INVALID_CONTENTS NAME_COLLISION
I Type create Type String contents I Java Element sibling boolean force I Progress Monitor monitor throws Java Model Exception Changes this compilation unit in working copy mode back to its original mode p This has no effect if this compilation unit was not in working copy mode p p If code become Working Copy code was called several times on this compilation unit code discard Working Copy code must be called as many times before it switches back to the original mode p throws Java Model Exception if this working copy could not return in its original mode see become Working Copy I Problem Requestor I Progress Monitor since 3 0  IType createType IJavaElement IProgressMonitor JavaModelException becomeWorkingCopy discardWorkingCopy JavaModelException becomeWorkingCopy IProblemRequestor IProgressMonitor
void discard Working Copy throws Java Model Exception Finds the elements in this compilation unit that correspond to the given element An element A corresponds to an element B if ul li A has the same element name as B li If A is a method A must have the same number of arguments as B and the simple names of the argument types must be equals li The parent of A corresponds to the parent of B recursively up to their respective compilation units li A exists ul Returns code null code if no such java elements can be found or if the given element is not included in a compilation unit param element the given element return the found elements in this compilation unit that correspond to the given element since 3 0  discardWorkingCopy JavaModelException
I Java Element find Elements I Java Element element Finds the primary type of this compilation unit that is the type with the same name as the compilation unit or code null code if no such a type exists return the found primary type of this compilation unit or code null code if no such a type exists since 3 0  IJavaElement findElements IJavaElement
I Type find Primary Type Finds the working copy for this compilation unit given a code Working Copy Owner code If no working copy has been created for this compilation unit associated with this working copy owner returns code null code p Users of this method must not destroy the resulting working copy param owner the given code Working Copy Owner code return the found working copy for this compilation unit code null code if none see Working Copy Owner since 3 0  IType findPrimaryType WorkingCopyOwner WorkingCopyOwner WorkingCopyOwner
I Compilation Unit find Working Copy Working Copy Owner owner Returns all types declared in this compilation unit in the order in which they appear in the source This includes all top level types and nested member types It does NOT include local types types defined in methods return the array of top level and member types defined in a compilation unit in declaration order throws Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  ICompilationUnit findWorkingCopy WorkingCopyOwner JavaModelException
I Type get All Types throws Java Model Exception Returns the smallest element within this compilation unit that includes the given source position that is a method field etc or code null code if there is no element other than the compilation unit itself at the given position or if the given position is not within the source range of this compilation unit param position a source position inside the compilation unit return the innermost Java element enclosing a given source position or code null code if none excluding the compilation unit throws Java Model Exception if the compilation unit does not exist or if an exception occurs while accessing its corresponding resource  IType getAllTypes JavaModelException JavaModelException
I Java Element get Element At int position throws Java Model Exception Returns the first import declaration in this compilation unit with the given name This is a handle only method The import declaration may or may not exist This is a convenience method imports can also be accessed from a compilation unit s import container param name the name of the import to find as defined by JLS2 7 5 For example code java io File code or code java awt code return a handle onto the corresponding import declaration The import declaration may or may not exist  IJavaElement getElementAt JavaModelException
I Import Declaration get Import String name Returns the import container for this compilation unit This is a handle only method The import container may or may not exist The import container can used to access the imports return a handle onto the corresponding import container The import contain may or may not exist  IImportDeclaration getImport
I Import Container get Import Container Returns the import declarations in this compilation unit in the order in which they appear in the source This is a convenience method import declarations can also be accessed from a compilation unit s import container return the import declarations in this compilation unit throws Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  IImportContainer getImportContainer JavaModelException
I Import Declaration get Imports throws Java Model Exception Returns the primary compilation unit whose owner is the primary owner this working copy was created from or this compilation unit if this a primary compilation unit p Note that the returned primary compilation unit can be in working copy mode p return the primary compilation unit this working copy was created from or this compilation unit if it is primary since 3 0  IImportDeclaration getImports JavaModelException
I Compilation Unit get Primary Returns the working copy owner of this working copy Returns null if it is not a working copy or if it has no owner return Working Copy Owner the owner of this working copy or code null code since 3 0  ICompilationUnit getPrimary WorkingCopyOwner
Working Copy Owner get Owner Returns the first package declaration in this compilation unit with the given package name there normally is at most one package declaration This is a handle only method The package declaration may or may not exist param name the name of the package declaration as defined by JLS2 7 4 For example code java lang code return the first package declaration in this compilation unit with the given package name  WorkingCopyOwner getOwner
I Package Declaration get Package Declaration String name Returns the package declarations in this compilation unit in the order in which they appear in the source There normally is at most one package declaration return an array of package declaration normally of size one throws Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  IPackageDeclaration getPackageDeclaration JavaModelException
I Package Declaration get Package Declarations throws Java Model Exception Returns the top level type declared in this compilation unit with the given simple type name The type name has to be a valid compilation unit name This is a handle only method The type may or may not exist param name the simple name of the requested type in the compilation unit return a handle onto the corresponding type The type may or may not exist see Java Conventions validate Compilation Unit Name String name  IPackageDeclaration getPackageDeclarations JavaModelException JavaConventions validateCompilationUnitName
I Type get Type String name Returns the top level types declared in this compilation unit in the order in which they appear in the source return the top level types declared in this compilation unit throws Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  IType getType JavaModelException
I Type get Types throws Java Model Exception Returns a new working copy of this compilation unit if it is a primary compilation unit or this compilation unit if it is already a non primary working copy p Note if intending to share a working copy amongst several clients then code get Working Copy Working Copy Owner I Problem Requestor I Progress Monitor code should be used instead p p When the working copy instance is created an ADDED I Java Element Delta is reported on this working copy p p Once done with the working copy users of this method must discard it using code discard Working Copy code p p Since 2 1 a working copy can be created on a not yet existing compilation unit In particular such a working copy can then be committed in order to create the corresponding compilation unit p param monitor a progress monitor used to report progress while opening this compilation unit or code null code if no progress should be reported throws Java Model Exception if the contents of this element can not be determined return a new working copy of this element if this element is not a working copy or this element if this element is already a working copy since 3 0  IType getTypes JavaModelException getWorkingCopy WorkingCopyOwner IProblemRequestor IProgressMonitor IJavaElementDelta discardWorkingCopy JavaModelException
I Compilation Unit get Working Copy I Progress Monitor monitor throws Java Model Exception Returns a shared working copy on this compilation unit using the given working copy owner to create the buffer or this compilation unit if it is already a non primary working copy This API can only answer an already existing working copy if it is based on the same original compilation unit AND was using the same working copy owner that is as defined by code Object equals code p The life time of a shared working copy is as follows ul li The first call to code get Working Copy Working Copy Owner I Problem Requestor I Progress Monitor code creates a new working copy for this element li li Subsequent calls increment an internal counter li li A call to code discard Working Copy code decrements the internal counter li li When this counter is 0 the working copy is discarded ul So users of this method must discard exactly once the working copy p Note that the working copy owner will be used for the life time of this working copy that is if the working copy is closed then reopened this owner will be used The buffer will be automatically initialized with the original s compilation unit content upon creation p When the shared working copy instance is created an ADDED I Java Element Delta is reported on this working copy p p Since 2 1 a working copy can be created on a not yet existing compilation unit In particular such a working copy can then be committed in order to create the corresponding compilation unit p param owner the working copy owner that creates a buffer that is used to get the content of the working copy param problem Requestor a requestor which will get notified of problems detected during reconciling as they are discovered The requestor can be set to code null code indicating that the client is not interested in problems param monitor a progress monitor used to report progress while opening this compilation unit or code null code if no progress should be reported throws Java Model Exception if the contents of this element can not be determined return a new working copy of this element using the given factory to create the buffer or this element if this element is already a working copy since 3 0  ICompilationUnit getWorkingCopy IProgressMonitor JavaModelException getWorkingCopy WorkingCopyOwner IProblemRequestor IProgressMonitor discardWorkingCopy IJavaElementDelta problemRequestor JavaModelException
I Compilation Unit get Working Copy Working Copy Owner owner I Problem Requestor problem Requestor I Progress Monitor monitor throws Java Model Exception Returns whether the resource of this working copy has changed since the inception of this working copy Returns code false code if this compilation unit is not in working copy mode return whether the resource has changed since 3 0  ICompilationUnit getWorkingCopy WorkingCopyOwner IProblemRequestor problemRequestor IProgressMonitor JavaModelException
public boolean has Resource Changed Returns whether this element is a working copy return true if this element is a working copy false otherwise since 3 0  hasResourceChanged
Reconciles the contents of this working copy sends out a Java delta notification indicating the nature of the change of the working copy since the last time it was either reconciled or made consistent see code I Openable make Consistent code and returns a compilation unit AST if requested p It performs the reconciliation by locally caching the contents of the working copy updating the contents then creating a delta over the cached contents and the new contents and finally firing this delta p The boolean argument allows to force problem detection even if the working copy is already consistent p p This functionality allows to specify a working copy owner which is used during problem detection All references contained in the working copy are resolved against other units for which corresponding owned working copies are going to take precedence over their original compilation units If code null code is passed in then the primary working copy owner is used p p Compilation problems found in the new contents are notified through the code I Problem Requestor code interface which was passed at creation and no longer as transient markers p p Note Since 3 0 added removed changed inner types generate change deltas p p If requested a DOM AST representing the compilation unit is returned Its bindings are computed only if the problem requestor is active or if the problem detection is forced This method returns code null code if the creation of the DOM AST was not requested or if the requested level of AST API is not supported or if the working copy was already consistent p b NOTE b In Eclipse 3 0 there is no reconciler support for level AST JLS3 This support is planned for the follow on release of Eclipse which includes support for J2SE 1 5 p param ast Level either link NO AST if no AST is wanted or the linkplain AST newAST int AST API level of the AST if one is wanted param force Problem Detection boolean indicating whether problem should be recomputed even if the source hasn t changed param owner the owner of working copies that take precedence over the original compilation units or code null code if the primary working copy owner should be used param monitor a progress monitor return the compilation unit AST or code null code if not requested or if the requested level of AST API is not supported or if the working copy was consistent throws Java Model Exception if the contents of the original element cannot be accessed Reasons include ul li The original Java element does not exist ELEMENT DOES NOT EXIST li ul since 3 0  IOpenable makeConsistent IProblemRequestor astLevel NO_AST forceProblemDetection JavaModelException ELEMENT_DOES_NOT_EXIST
Restores the contents of this working copy to the current contents of this working copy s original element Has no effect if this element is not a working copy p Note This is the inverse of committing the content of the working copy to the original element with code commit boolean I Progress Monitor code throws Java Model Exception if the contents of the original element cannot be accessed Reasons include ul li The original Java element does not exist ELEMENT DOES NOT EXIST li ul since 3 0  IProgressMonitor JavaModelException ELEMENT_DOES_NOT_EXIST

public interface I Completion Requestor Code assist notification of an anonymous type declaration completion param super Type Package Name Name of the package that contains the super type of this new anonymous type declaration param super Type Name Name of the super type of this new anonymous type declaration param parameter Package Names Names of the packages in which the parameter types are declared Should contain as many elements as parameter Type Names param parameter Type Names Names of the parameter types Should contain as many elements as parameter Package Names param parameter Names Names of the parameters Should contain as many elements as parameter Package Names param completion Name The completion for the anonymous type declaration Can include zero one or two brackets If the closing bracket is included then the cursor should be placed before it param modifiers The modifiers of the constructor param completion Start The start position of insertion of the name of this new anonymous type declaration param completion End The end position of insertion of the name of this new anonymous type declaration param relevance The relevance of the completion proposal It is a positive integer which are used for determine if this proposal is more relevant than another proposal This value can only be used for compare relevance A proposal is more relevant than another if his relevance value is higher NOTE All package and type names are presented in their readable form Package names are in the form a b c Base types are in the form int or boolean Array types are in the qualified form M or int Nested type names are in the qualified form A M The default package is represented by an empty array NOTE parameter names can be retrieved from the source model after the user selects a specific method TODO jerome once Completion Requestor is working deprecated Use link Completion Requestor accept Anonymous Type char char char char char char int int int int instead void accept Anonymous Type char super Type Package Name char super Type Name char parameter Package Names char parameter Type Names char parameter Names char completion Name int modifiers int completion Start int completion End  ICompletionRequestor superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterTypeNames parameterPackageNames parameterNames parameterPackageNames completionName completionStart completionEnd CompletionRequestor CompletionRequestor acceptAnonymousType acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart completionEnd
int relevance Code assist notification of a class completion param package Name Declaring package name of the class param class Name Name of the class param completion Name The completion for the class Can include for imported classes param modifiers The modifiers of the class param completion Start The start position of insertion of the name of the class param completion End The end position of insertion of the name of the class param relevance The relevance of the completion proposal It is a positive integer which are used for determine if this proposal is more relevant than another proposal This value can only be used for compare relevance A proposal is more relevant than another if his relevance value is higher NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array TODO jerome once Completion Requestor is working deprecated Use link Completion Requestor accept Class char char char int int int int instead void accept Class char package Name char class Name char completion Name int modifiers int completion Start int completion End  packageName className completionName completionStart completionEnd CompletionRequestor CompletionRequestor acceptClass acceptClass packageName className completionName completionStart completionEnd
int relevance Code assist notification of a compilation error detected during completion param error Only problems which are categorized as non syntax errors are notified to the requestor warnings are silently ignored In case an error got signalled no other completions might be available therefore the problem message should be presented to the user The source positions of the problem are related to the source where it was detected might be in another compilation unit if it was indirectly requested during the code assist process Note the problem knows its originating file name TODO jerome once Completion Requestor is working deprecated Use link Completion Requestor accept Error I Problem instead  CompletionRequestor CompletionRequestor acceptError IProblem
void accept Error I Problem error Code assist notification of a field completion param declaring Type Package Name Name of the package in which the type that contains this field is declared param declaring Type Name Name of the type declaring this new field param name Name of the field param type Package Name Name of the package in which the type of this field is declared param type Name Name of the type of this field param completion Name The completion for the field param modifiers The modifiers of this field param completion Start The start position of insertion of the name of this field param completion End The end position of insertion of the name of this field param relevance The relevance of the completion proposal It is a positive integer which are used for determine if this proposal is more relevant than another proposal This value can only be used for compare relevance A proposal is more relevant than another if his relevance value is higher NOTE All package and type names are presented in their readable form Package names are in the form a b c Base types are in the form int or boolean Array types are in the qualified form M or int Nested type names are in the qualified form A M The default package is represented by an empty array TODO jerome once Completion Requestor is working deprecated Use link Completion Requestor accept Field char char char char char char int int int int instead void accept Field char declaring Type Package Name char declaring Type Name char name char type Package Name char type Name char completion Name int modifiers int completion Start int completion End  acceptError IProblem declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart completionEnd CompletionRequestor CompletionRequestor acceptField acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart completionEnd
int relevance Code assist notification of an interface completion param package Name Declaring package name of the interface param interface Name Name of the interface param completion Name The completion for the interface Can include for imported interfaces param modifiers The modifiers of the interface param completion Start The start position of insertion of the name of the interface param completion End The end position of insertion of the name of the interface param relevance The relevance of the completion proposal It is a positive integer which are used for determine if this proposal is more relevant than another proposal This value can only be used for compare relevance A proposal is more relevant than another if his relevance value is higher NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array TODO jerome once Completion Requestor is working deprecated Use link Completion Requestor accept Interface char char char int int int int instead void accept Interface char package Name char interface Name char completion Name int modifiers int completion Start int completion End  packageName interfaceName completionName completionStart completionEnd CompletionRequestor CompletionRequestor acceptInterface acceptInterface packageName interfaceName completionName completionStart completionEnd
int relevance Code assist notification of a keyword completion param keyword Name The keyword source param completion Start The start position of insertion of the name of this keyword param completion End The end position of insertion of the name of this keyword param relevance The relevance of the completion proposal It is a positive integer which are used for determine if this proposal is more relevant than another proposal This value can only be used for compare relevance A proposal is more relevant than another if his relevance value is higher TODO jerome once Completion Requestor is working deprecated Use link Completion Requestor accept Keyword char int int int instead  keywordName completionStart completionEnd CompletionRequestor CompletionRequestor acceptKeyword
void accept Keyword char keyword Name int completion Start int completion End int relevance Code assist notification of a label completion param label Name The label source param completion Start The start position of insertion of the name of this label param completion End The end position of insertion of the name of this label param relevance The relevance of the completion proposal It is a positive integer which are used for determine if this proposal is more relevant than another proposal This value can only be used for compare relevance A proposal is more relevant than another if his relevance value is higher TODO jerome once Completion Requestor is working deprecated Use link Completion Requestor accept Label char int int int instead  acceptKeyword keywordName completionStart completionEnd labelName completionStart completionEnd CompletionRequestor CompletionRequestor acceptLabel
void accept Label char label Name int completion Start int completion End int relevance Code assist notification of a local variable completion param name Name of the new local variable param type Package Name Name of the package in which the type of this new local variable is declared param type Name Name of the type of this new local variable param modifiers The modifiers of this new local variable param completion Start The start position of insertion of the name of this new local variable param completion End The end position of insertion of the name of this new local variable param relevance The relevance of the completion proposal It is a positive integer which are used for determine if this proposal is more relevant than another proposal This value can only be used for compare relevance A proposal is more relevant than another if his relevance value is higher NOTE All package and type names are presented in their readable form Package names are in the form a b c Base types are in the form int or boolean Array types are in the qualified form M or int Nested type names are in the qualified form A M The default package is represented by an empty array TODO jerome once Completion Requestor is working deprecated Use link Completion Requestor accept Local Variable char char char int int int int instead void accept Local Variable char name char type Package Name char type Name int modifiers int completion Start int completion End  acceptLabel labelName completionStart completionEnd typePackageName typeName completionStart completionEnd CompletionRequestor CompletionRequestor acceptLocalVariable acceptLocalVariable typePackageName typeName completionStart completionEnd
int relevance Code assist notification of a method completion param declaring Type Package Name Name of the package in which the type that contains this new method is declared param declaring Type Name Name of the type declaring this new method param selector Name of the new method param parameter Package Names Names of the packages in which the parameter types are declared Should contain as many elements as parameter Type Names param parameter Type Names Names of the parameter types Should contain as many elements as parameter Package Names param parameter Names Names of the parameters Should contain as many elements as parameter Package Names param return Type Package Name Name of the package in which the return type is declared param return Type Name Name of the return type of this new method should be code null code for a constructor param completion Name The completion for the method Can include zero one or two brackets If the closing bracket is included then the cursor should be placed before it param modifiers The modifiers of this new method param completion Start The start position of insertion of the name of this new method param completion End The end position of insertion of the name of this new method param relevance The relevance of the completion proposal It is a positive integer which are used for determine if this proposal is more relevant than another proposal This value can only be used for compare relevance A proposal is more relevant than another if his relevance value is higher NOTE All package and type names are presented in their readable form Package names are in the form a b c Base types are in the form int or boolean Array types are in the qualified form M or int Nested type names are in the qualified form A M The default package is represented by an empty array NOTE parameter names can be retrieved from the source model after the user selects a specific method TODO jerome once Completion Requestor is working deprecated Use link Completion Requestor accept Method char char char char char char char char char int int int int instead void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End  declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterTypeNames parameterPackageNames parameterNames parameterPackageNames returnTypePackageName returnTypeName completionName completionStart completionEnd CompletionRequestor CompletionRequestor acceptMethod acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd
Code assist notification of a method completion param declaring Type Package Name Name of the package in which the type that contains this new method is declared param declaring Type Name Name of the type declaring this new method param selector Name of the new method param parameter Package Names Names of the packages in which the parameter types are declared Should contain as many elements as parameter Type Names param parameter Type Names Names of the parameter types Should contain as many elements as parameter Package Names param parameter Names Names of the parameters Should contain as many elements as parameter Package Names param return Type Package Name Name of the package in which the return type is declared param return Type Name Name of the return type of this new method should be code null code for a constructor param completion Name The completion for the method Can include zero one or two brackets If the closing bracket is included then the cursor should be placed before it param modifiers The modifiers of this new method param completion Start The start position of insertion of the name of this new method param completion End The end position of insertion of the name of this new method param relevance The relevance of the completion proposal It is a positive integer which are used for determine if this proposal is more relevant than another proposal This value can only be used for compare relevance A proposal is more relevant than another if his relevance value is higher NOTE All package and type names are presented in their readable form Package names are in the form a b c Base types are in the form int or boolean Array types are in the qualified form M or int Nested type names are in the qualified form A M The default package is represented by an empty array NOTE parameter names can be retrieved from the source model after the user selects a specific method TODO jerome once Completion Requestor is working deprecated Use link Completion Requestor accept Method Declaration char char char char char char char char char int int int int instead void accept Method Declaration char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End  declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterTypeNames parameterPackageNames parameterNames parameterPackageNames returnTypePackageName returnTypeName completionName completionStart completionEnd CompletionRequestor CompletionRequestor acceptMethodDeclaration acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd
int relevance Code assist notification of a modifier completion param modifier Name The new modifier param completion Start The start position of insertion of the name of this new modifier param completion End The end position of insertion of the name of this new modifier param relevance The relevance of the completion proposal It is a positive integer which are used for determine if this proposal is more relevant than another proposal This value can only be used for compare relevance A proposal is more relevant than another if his relevance value is higher TODO jerome once Completion Requestor is working deprecated Use link Completion Requestor accept Modifier char int int int instead  modifierName completionStart completionEnd CompletionRequestor CompletionRequestor acceptModifier
void accept Modifier char modifier Name int completion Start int completion End int relevance Code assist notification of a package completion param package Name The package name param completion Name The completion for the package Can include for imports param completion Start The start position of insertion of the name of this new package param completion End The end position of insertion of the name of this new package param relevance The relevance of the completion proposal It is a positive integer which are used for determine if this proposal is more relevant than another proposal This value can only be used for compare relevance A proposal is more relevant than another if his relevance value is higher NOTE All package names are presented in their readable form Package names are in the form a b c The default package is represented by an empty array TODO jerome once Completion Requestor is working deprecated Use link Completion Requestor accept Package char char int int int instead void accept Package char package Name char completion Name int completion Start int completion End  acceptModifier modifierName completionStart completionEnd packageName completionName completionStart completionEnd CompletionRequestor CompletionRequestor acceptPackage acceptPackage packageName completionName completionStart completionEnd
int relevance Code assist notification of a type completion param package Name Declaring package name of the type param type Name Name of the type param completion Name The completion for the type Can include for imported types param completion Start The start position of insertion of the name of the type param completion End The end position of insertion of the name of the type param relevance The relevance of the completion proposal It is a positive integer which are used for determine if this proposal is more relevant than another proposal This value can only be used for compare relevance A proposal is more relevant than another if his relevance value is higher NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array TODO jerome once Completion Requestor is working deprecated Use link Completion Requestor accept Type char char char int int int instead void accept Type char package Name char type Name char completion Name int completion Start int completion End  packageName typeName completionName completionStart completionEnd CompletionRequestor CompletionRequestor acceptType acceptType packageName typeName completionName completionStart completionEnd
Code assist notification of a variable name completion param type Package Name Name of the package in which the type of this variable is declared param type Name Name of the type of this variable param name Name of the variable param completion Name The completion for the variable param completion Start The start position of insertion of the name of this variable param completion End The end position of insertion of the name of this variable param relevance The relevance of the completion proposal It is a positive integer which are used for determine if this proposal is more relevant than another proposal This value can only be used for compare relevance A proposal is more relevant than another if his relevance value is higher NOTE All package and type names are presented in their readable form Package names are in the form a b c Base types are in the form int or boolean Array types are in the qualified form M or int Nested type names are in the qualified form A M The default package is represented by an empty array TODO jerome once Completion Requestor is working deprecated Use link Completion Requestor accept Type Variable char int int int instead void accept Variable Name char type Package Name char type Name char name char completion Name int completion Start int completion End  typePackageName typeName completionName completionStart completionEnd CompletionRequestor CompletionRequestor acceptTypeVariable acceptVariableName typePackageName typeName completionName completionStart completionEnd

public interface I Correction Requestor Notification of a class correction param package Name Declaring package name of the class param class Name Name of the class param correction Name The correction for the class param modifiers The modifiers of the class param correction Start The start position of insertion of the correction of the class param correction End The end position of insertion of the correction of the class NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array void accept Class char package Name char class Name char correction Name int modifiers int correction Start  ICorrectionRequestor packageName className correctionName correctionStart correctionEnd acceptClass packageName className correctionName correctionStart
int correction End Notification of a field correction param declaring Type Package Name Name of the package in which the type that contains this field is declared param declaring Type Name Name of the type declaring this field param name Name of the field param type Package Name Name of the package in which the type of this field is declared param type Name Name of the type of this field param correction Name The correction for the field param modifiers The modifiers of this field param correction Start The start position of insertion of the correction of this field param correction End The end position of insertion of the correction of this field NOTE All package and type names are presented in their readable form Package names are in the form a b c Base types are in the form int or boolean Array types are in the qualified form M or int Nested type names are in the qualified form A M The default package is represented by an empty array void accept Field char declaring Type Package Name char declaring Type Name char name char type Package Name char type Name char correction Name int modifiers int correction Start  correctionEnd declaringTypePackageName declaringTypeName typePackageName typeName correctionName correctionStart correctionEnd acceptField declaringTypePackageName declaringTypeName typePackageName typeName correctionName correctionStart
int correction End Notification of an interface correction param package Name Declaring package name of the interface param interface Name Name of the interface param correction Name The correction for the interface Can include for imported interfaces param modifiers The modifiers of the interface param correction Start The start position of insertion of the correction of the interface param correction End The end position of insertion of the correction of the interface NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array void accept Interface char package Name char interface Name char correction Name int modifiers int correction Start  correctionEnd packageName interfaceName correctionName correctionStart correctionEnd acceptInterface packageName interfaceName correctionName correctionStart
int correction End Notification of a local variable correction param name Name of the local variable param type Package Name Name of the package in which the type of this local variable is declared param type Name Name of the type of this local variable param modifiers The modifiers of this local variable param correction Start The start position of insertion of the correction of this local variable param correction End The end position of insertion of the correction of this local variable NOTE All package and type names are presented in their readable form Package names are in the form a b c Base types are in the form int or boolean Array types are in the qualified form M or int Nested type names are in the qualified form A M The default package is represented by an empty array void accept Local Variable char name char type Package Name char type Name int modifiers int correction Start  correctionEnd typePackageName typeName correctionStart correctionEnd acceptLocalVariable typePackageName typeName correctionStart
int correction End Notification of a method correction param declaring Type Package Name Name of the package in which the type that contains this method is declared param declaring Type Name Name of the type declaring this method param selector Name of the method param parameter Package Names Names of the packages in which the parameter types are declared Should contain as many elements as parameter Type Names param parameter Type Names Names of the parameter types Should contain as many elements as parameter Package Names param parameter Names Names of the parameters Should contain as many elements as parameter Package Names param return Type Package Name Name of the package in which the return type is declared param return Type Name Name of the return type of this method should be code null code for a constructor param correction Name The correction for the method Can include zero one or two brackets If the closing bracket is included then the cursor should be placed before it param modifiers The modifiers of this method param correction Start The start position of insertion of the correction of this method param correction End The end position of insertion of the correction of this method NOTE All package and type names are presented in their readable form Package names are in the form a b c Base types are in the form int or boolean Array types are in the qualified form M or int Nested type names are in the qualified form A M The default package is represented by an empty array NOTE parameter names can be retrieved from the source model after the user selects a specific method void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char correction Name int modifiers int correction Start  correctionEnd declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterTypeNames parameterPackageNames parameterNames parameterPackageNames returnTypePackageName returnTypeName correctionName correctionStart correctionEnd acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName correctionName correctionStart
int correction End Notification of a package correction param package Name The package name param correction Name The correction for the package Can include for imports param correction Start The start position of insertion of the correction of this package param correction End The end position of insertion of the correction of this package NOTE All package names are presented in their readable form Package names are in the form a b c The default package is represented by an empty array void accept Package char package Name char correction Name int correction Start  correctionEnd packageName correctionName correctionStart correctionEnd acceptPackage packageName correctionName correctionStart

Notifies that one or more attributes of one or more Java elements have changed The specific details of the change are described by the given event param event the change event 

public interface I Field extends I Member Returns the constant value associated with this field or code null code if this field has none The field needs to be static and final to have a constant value Returns an instance of the wrapper type corresponding to the the type of the field table border 1 tr th field type th th wrapper type th tr tr td int td td java lang Integer td tr tr td byte td td java lang Byte td tr tr td boolean td td java lang Boolean td tr tr td char td td java lang Character td tr tr td double td td java lang Double td tr tr td float td td java lang Float td tr tr td long td td java lang Long td tr tr td short td td java lang Short td tr tr td java lang String td td java lang String td tr table return the constant value associated with this field or code null code if this field has none exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  IField IMember JavaModelException
public Object get Constant throws Java Model Exception Returns the simple name of this field return the simple name of this field  getConstant JavaModelException
String get Element Name Returns the type signature of this field For enum constants this returns the signature of the declaring enum class p The type signature may be either unresolved for source types or resolved for binary types and either basic for basic types or rich for parameterized types See link Signature for details p return the type signature of this field exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource see Signature  getElementName JavaModelException

public interface I Import Container extends I Java Element I Parent I Source Reference Returns the first import declaration in this import container with the given name This is a handle only method The import declaration may or may not exist param name the given name return the first import declaration in this import container with the given name  IImportContainer IJavaElement IParent ISourceReference

public interface I Import Declaration extends I Java Element I Source Reference I Source Manipulation Returns the name that has been imported For an on demand import this includes the trailing code code For example for the statement code import java util code this returns code java util code For the statement code import java util Hashtable code this returns code java util Hashtable code return the name that has been imported  IImportDeclaration IJavaElement ISourceReference ISourceManipulation
String get Element Name Returns the modifier flags for this import The flags can be examined using class code Flags code Only the static flag is meaningful for import declarations return the modifier flags for this import exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource see Flags since 3 0  getElementName JavaModelException
Returns whether the import is on demand An import is on demand if it ends with code code return true if the import is on demand false otherwise 

Returns whether this Java element exists in the model p Java elements are handle objects that may or may not be backed by an actual element Java elements that are backed by an actual element are said to exist and this method returns code true code For Java elements that are not working copies it is always the case that if the element exists then its parent also exists provided it has one and includes the element as one of its children It is therefore possible to navigated to any existing Java element from the root of the Java model along a chain of existing Java elements On the other hand working copies are said to exist until they are destroyed with code I Working Copy destroy code Unlike regular Java elements a working copy never shows up among the children of its parent element which may or may not exist p return code true code if this element exists in the Java model and code false code if this element does not exist  IWorkingCopy
Returns the first ancestor of this Java element that has the given type Returns code null code if no such an ancestor can be found This is a handle only method param ancestor Type the given type return the first ancestor of this Java element that has the given type null if no such an ancestor can be found since 2 0  ancestorType
Returns the resource that corresponds directly to this element or code null code if there is no resource that corresponds to this element p For example the corresponding resource for an code I Compilation Unit code is its underlying code I File code The corresponding resource for an code I Package Fragment code that is not contained in an archive is its underlying code I Folder code An code I Package Fragment code contained in an archive has no corresponding resource Similarly there are no corresponding resources for code I Methods code code I Fields code etc p return the corresponding resource or code null code if none exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  ICompilationUnit IFile IPackageFragment IFolder IPackageFragment IMethods IFields JavaModelException
Returns the name of this element This is a handle only method return the element name 
Returns this element s kind encoded as an integer This is a handle only method return the kind of element one of the constants declared in code I Java Element code see I Java Element  IJavaElement IJavaElement
Returns a string representation of this element handle The format of the string is not specified however the identifier is stable across workspace sessions and can be used to recreate this handle via the code Java Core create String code method return the string handle identifier see Java Core create java lang String  JavaCore JavaCore
Returns the Java model This is a handle only method return the Java model 
Returns the Java project this element is contained in or code null code if this element is not contained in any Java project for instance the code I Java Model code is not contained in any Java project This is a handle only method return the containing Java project or code null code if this element is not contained in a Java project  IJavaModel
Returns the first openable parent If this element is openable the element itself is returned Returns code null code if this element doesn t have an openable parent This is a handle only method return the first openable parent or code null code if this element doesn t have an openable parent since 2 0 
Returns the element directly containing this element or code null code if this element has no parent This is a handle only method return the parent element or code null code if this element has no parent 
Returns the path to the innermost resource enclosing this element If this element is not included in an external archive the path returned is the full absolute path to the underlying resource relative to the workbench If this element is included in an external archive the path returned is the absolute path to the archive in the file system This is a handle only method return the path to the innermost resource enclosing this element since 2 0 
Returns the primary element whose compilation unit is the primary compilation unit this working copy element was created from or this element if it is a descendant of a primary compilation unit or if it is not a descendant of a working copy e g it is a binary member The returned element may or may not exist return the primary element this working copy element was created from or this element since 3 0 
Returns the innermost resource enclosing this element If this element is included in an archive and this archive is not external this is the underlying resource corresponding to the archive If this element is included in an external archive code null code is returned This is a handle only method return the innermost resource enclosing this element code null code if this element is included in an external archive since 2 0 
Returns the scheduling rule associated with this Java element This is a handle only method return the scheduling rule associated with this Java element since 3 0 
Returns the smallest underlying resource that contains this element or code null code if this element is not contained in a resource return the underlying resource or code null code if none exception Java Model Exception if this element does not exist or if an exception occurs while accessing its underlying resource  JavaModelException
Returns whether this Java element is read only An element is read only if its structure cannot be modified by the java model p Note this is different from I Resource is Read Only For example jar files are read only as the java model doesn t know how to add remove elements in this file but the underlying I File can be writable p This is a handle only method return code true code if this element is read only  IResource isReadOnly IFile
Returns whether the structure of this element is known For example for a compilation unit that could not be parsed code false code is returned If the structure of an element is unknown navigations will return reasonable defaults For example code get Children code will return an empty collection p Note This does not imply anything about consistency with the underlying resource buffer contents p return code true code if the structure of this element is known exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource TODO philippe predicate shouldn t throw an exception  getChildren JavaModelException

Returns deltas for the children that have been added return deltas for the children that have been added 
Returns deltas for the affected added removed or changed children return deltas for the affected added removed or changed children 
Returns deltas for the children which have changed return deltas for the children which have changed 
Returns the element that this delta describes a change to return the element that this delta describes a change to 
Returns flags that describe how an element has changed Such flags should be tested using the code code operand For example pre if delta get Flags I Java Element Delta F CONTENT 0 the delta indicates a content change pre return flags that describe how an element has changed  getFlags IJavaElementDelta F_CONTENT
Returns the kind of this delta one of code ADDED code code REMOVED code or code CHANGED code return the kind of this delta 
Returns an element describing this element before it was moved to its current location or code null code if the code F MOVED FROM code change flag is not set return an element describing this element before it was moved to its current location or code null code if the code F MOVED FROM code change flag is not set  F_MOVED_FROM F_MOVED_FROM
Returns an element describing this element in its new location or code null code if the code F MOVED TO code change flag is not set return an element describing this element in its new location or code null code if the code F MOVED TO code change flag is not set  F_MOVED_TO F_MOVED_TO
Returns deltas for the children which have been removed return deltas for the children which have been removed 
Returns the collection of resource deltas p Note that resource deltas like Java element deltas are generally only valid for the dynamic scope of an event notification Clients must not hang on to these objects p return the underlying resource deltas or code null code if none 

public interface I Java Model extends I Java Element I Openable I Parent Returns whether this Java model contains an code I Java Element code whose resource is the given resource or a non Java resource which is the given resource p Note no existency check is performed on the argument resource If it is not accessible see code I Resource is Accessible code yet but would be located in Java model range then it will return code true code p p If the resource is accessible it can be reached by navigating the Java model down using the code get Children code and or code get Non Java Resources code methods p param resource the resource to check return true if the resource is accessible through the Java model since 2 1  IJavaModel IJavaElement IOpenable IParent IJavaElement IResource isAccessible getChildren getNonJavaResources
boolean contains I Resource resource Copies the given elements to the specified container s If one container is specified all elements are copied to that container If more than one container is specified the number of elements and containers must match and each element is copied to its associated container p Optionally each copy can positioned before a sibling element If code null code is specified for a given sibling the copy is inserted as the last child of its associated container p p Optionally each copy can be renamed If code null code is specified for the new name the copy is not renamed p p Optionally any existing child in the destination container with the same name can be replaced by specifying code true code for force Otherwise an exception is thrown in the event that a name collision occurs p param elements the elements to copy param containers the container or list of containers param siblings the list of siblings element any of which may be code null code or code null code param renamings the list of new names any of which may be code null code or code null code param replace code true code if any existing child in a target container with the target name should be replaced and code false code to throw an exception in the event of a name collision param monitor a progress monitor exception Java Model Exception if an element could not be copied Reasons include ul li There is no element to process NO ELEMENTS TO PROCESS The given elements is null or empty li li A specified element container or sibling does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating an underlying resource li li A container is of an incompatible type code INVALID DESTINATION code li li A sibling is not a child of it associated container code INVALID SIBLING code li li A new name is invalid code INVALID NAME code li li A child in its associated container already exists with the same name and code replace code has been specified as code false code code NAME COLLISION code li li A container or element is read only code READ ONLY code li ul  IResource JavaModelException NO_ELEMENTS_TO_PROCESS ELEMENT_DOES_NOT_EXIST CoreException INVALID_DESTINATION INVALID_SIBLING INVALID_NAME NAME_COLLISION READ_ONLY
void copy I Java Element elements I Java Element containers I Java Element siblings String renamings boolean replace I Progress Monitor monitor throws Java Model Exception Deletes the given elements forcing the operation if necessary and specified param elements the elements to delete param force a flag controlling whether underlying resources that are not in sync with the local file system will be tolerated param monitor a progress monitor exception Java Model Exception if an element could not be deleted Reasons include ul li There is no element to process NO ELEMENTS TO PROCESS The given elements is null or empty li li A specified element does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating an underlying resource li li An element is read only code READ ONLY code li ul  IJavaElement IJavaElement IJavaElement IProgressMonitor JavaModelException JavaModelException NO_ELEMENTS_TO_PROCESS ELEMENT_DOES_NOT_EXIST CoreException READ_ONLY
void delete I Java Element elements boolean force I Progress Monitor monitor throws Java Model Exception Returns the Java project with the given name This is a handle only method The project may or may not exist param name the name of the Java project return the Java project with the given name  IJavaElement IProgressMonitor JavaModelException
I Java Project get Java Project String name Returns the Java projects in this Java model or an empty array if there are none return the Java projects in this Java model or an empty array if there are none exception Java Model Exception if this request fails  IJavaProject getJavaProject JavaModelException
I Java Project get Java Projects throws Java Model Exception Returns an array of non Java resources that is non Java projects in the workspace p Non Java projects include all projects that are closed even if they have the Java nature p return an array of non Java projects code I Project code s contained in the workspace throws Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource since 2 1  IJavaProject getJavaProjects JavaModelException IProject JavaModelException
Object get Non Java Resources throws Java Model Exception Returns the workspace associated with this Java model return the workspace associated with this Java model  getNonJavaResources JavaModelException
I Workspace get Workspace Moves the given elements to the specified container s If one container is specified all elements are moved to that container If more than one container is specified the number of elements and containers must match and each element is moved to its associated container p Optionally each element can positioned before a sibling element If code null code is specified for sibling the element is inserted as the last child of its associated container p p Optionally each element can be renamed If code null code is specified for the new name the element is not renamed p p Optionally any existing child in the destination container with the same name can be replaced by specifying code true code for force Otherwise an exception is thrown in the event that a name collision occurs p param elements the elements to move param containers the container or list of containers param siblings the list of siblings element any of which may be code null code or code null code param renamings the list of new names any of which may be code null code or code null code param replace code true code if any existing child in a target container with the target name should be replaced and code false code to throw an exception in the event of a name collision param monitor a progress monitor exception Java Model Exception if an element could not be moved Reasons include ul li There is no element to process NO ELEMENTS TO PROCESS The given elements is null or empty li li A specified element container or sibling does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating an underlying resource li li A container is of an incompatible type code INVALID DESTINATION code li li A sibling is not a child of it associated container code INVALID SIBLING code li li A new name is invalid code INVALID NAME code li li A child in its associated container already exists with the same name and code replace code has been specified as code false code code NAME COLLISION code li li A container or element is read only code READ ONLY code li ul exception Illegal Argument Exception any element or container is code null code  IWorkspace getWorkspace JavaModelException NO_ELEMENTS_TO_PROCESS ELEMENT_DOES_NOT_EXIST CoreException INVALID_DESTINATION INVALID_SIBLING INVALID_NAME NAME_COLLISION READ_ONLY IllegalArgumentException
Triggers an update of the Java Model with respect to the referenced external archives This operation will issue a Java Model delta describing the discovered changes in term of Java element package fragment roots added removed or changed Note that a collection of elements can be passed so as to narrow the set of archives to refresh passing code null code along is equivalent to refreshing the entire mode The elements can be ul li package fragment roots corresponding to external archives li Java projects which referenced external archives will be refreshed li Java model all referenced external archives will be refreshed ul p In case an archive is used by multiple projects the delta issued will account for all of them This means that even if a project was not part of the elements scope it may still be notified of changes if it is referencing a library comprised in the scope p param elements Scope a collection of elements defining the scope of the refresh param monitor a progress monitor used to report progress exception Java Model Exception in one of the corresponding situation ul li an exception occurs while accessing project resources li ul see I Java Element Delta since 2 0  JavaModel JavaModel elementsScope JavaModelException IJavaElementDelta
Renames the given elements as specified If one container is specified all elements are renamed within that container If more than one container is specified the number of elements and containers must match and each element is renamed within its associated container param elements the elements to rename param destinations the container or list of containers param names the list of new names param replace code true code if an existing child in a target container with the target name should be replaced and code false code to throw an exception in the event of a name collision param monitor a progress monitor exception Java Model Exception if an element could not be renamed Reasons include ul li There is no element to process NO ELEMENTS TO PROCESS The given elements is null or empty li li A specified element does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating an underlying resource li A new name is invalid code INVALID NAME code li A child already exists with the same name and code replace code has been specified as code false code code NAME COLLISION code li An element is read only code READ ONLY code ul  JavaModelException NO_ELEMENTS_TO_PROCESS ELEMENT_DOES_NOT_EXIST CoreException INVALID_NAME NAME_COLLISION READ_ONLY

public interface I Java Model Status extends I Status Returns any Java elements associated with the failure see specification of the status code or an empty array if no elements are related to this particular status code return the list of Java element culprits see I Java Model Status Constants  IJavaModelStatus IStatus IJavaModelStatusConstants
I Java Element get Elements Returns the path associated with the failure see specification of the status code or code null code if the failure is not one of code DEVICE PATH code code INVALID PATH code code PATH OUTSIDE PROJECT code or code RELATIVE PATH code return the path that caused the failure or code null code if none see I Java Model Status Constants DEVICE PATH see I Java Model Status Constants INVALID PATH see I Java Model Status Constants PATH OUTSIDE PROJECT see I Java Model Status Constants RELATIVE PATH  IJavaElement getElements DEVICE_PATH INVALID_PATH PATH_OUTSIDE_PROJECT RELATIVE_PATH IJavaModelStatusConstants DEVICE_PATH IJavaModelStatusConstants INVALID_PATH IJavaModelStatusConstants PATH_OUTSIDE_PROJECT IJavaModelStatusConstants RELATIVE_PATH
I Path get Path Returns the string associated with the failure see specification of the status code or code null code if no string is related to this particular status code return the string culprit or code null code if none see I Java Model Status Constants deprecated Use I Status get Message instead  IPath getPath IJavaModelStatusConstants IStatus getMessage
String get String Returns whether this status indicates that a Java model element does not exist This convenience method is equivalent to code get Code I Java Model Status Constants ELEMENT DOES NOT EXIST code return code true code if the status code indicates that a Java model element does not exist see I Java Model Status Constants ELEMENT DOES NOT EXIST  getString getCode IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST

Returns the code I Java Element code corresponding to the given classpath relative path or code null code if no such code I Java Element code is found The result is one of an code I Compilation Unit code code I Class File code or code I Package Fragment code p When looking for a package fragment there might be several potential matches only one of them is returned p For example the path java lang Object java would result in the code I Compilation Unit code or code I Class File code corresponding to java lang Object The path java lang would result in the code I Package Fragment code for java lang param path the given classpath relative path exception Java Model Exception if the given path is code null code or absolute return the code I Java Element code corresponding to the given classpath relative path or code null code if no such code I Java Element code is found  IJavaElement IJavaElement ICompilationUnit IClassFile IPackageFragment ICompilationUnit IClassFile IPackageFragment JavaModelException IJavaElement IJavaElement
Returns the code I Java Element code corresponding to the given classpath relative path or code null code if no such code I Java Element code is found The result is one of an code I Compilation Unit code code I Class File code or code I Package Fragment code If it is an code I Compilation Unit code its owner is the given owner p When looking for a package fragment there might be several potential matches only one of them is returned p For example the path java lang Object java would result in the code I Compilation Unit code or code I Class File code corresponding to java lang Object The path java lang would result in the code I Package Fragment code for java lang param path the given classpath relative path param owner the owner of the returned compilation unit ignored if it is not a compilation unit exception Java Model Exception if the given path is code null code or absolute return the code I Java Element code corresponding to the given classpath relative path or code null code if no such code I Java Element code is found since 3 0  IJavaElement IJavaElement ICompilationUnit IClassFile IPackageFragment ICompilationUnit ICompilationUnit IClassFile IPackageFragment JavaModelException IJavaElement IJavaElement
Returns the first existing package fragment on this project s classpath whose path matches the given absolute path or code null code if none exist The path can be internal to the workbench Project src external to the workbench c jdk classes zip java lang param path the given absolute path exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the first existing package fragment on this project s classpath whose path matches the given absolute path or code null code if none exist  JavaModelException
Returns the existing package fragment root on this project s classpath whose path matches the given absolute path or code null code if one does not exist The path can be internal to the workbench Compiler src external to the workbench c jdk classes zip param path the given absolute path exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the existing package fragment root on this project s classpath whose path matches the given absolute path or code null code if one does not exist I Package Fragment Root find Package Fragment Root I Path path  JavaModelException IPackageFragmentRoot findPackageFragmentRoot IPath
throws Java Model Exception Returns the existing package fragment roots identified by the given entry Note that a classpath entry that refers to another project may have more than one root if that project has more than on root containing source and classpath entries within the current project identify a single root p If the classpath entry denotes a variable it will be resolved and return the roots of the target entry empty if not resolvable p If the classpath entry denotes a container it will be resolved and return the roots corresponding to the set of container entries empty if not resolvable param entry the given entry return the existing package fragment roots identified by the given entry see I Classpath Container since 2 1  JavaModelException IClasspathContainer
I Package Fragment Root find Package Fragment Roots I Classpath Entry entry Returns the first type found following this project s classpath with the given fully qualified name or code null code if none is found The fully qualified name is a dot separated name For example a class B defined as a member type of a class A in package x y should have a the fully qualified name x y A B Note that in order to be found a type name or its toplevel enclosing type name must match its corresponding compilation unit name As a consequence secondary types cannot be found using this functionality Secondary types can however be explicitely accessed through their enclosing unit or found by the code Search Engine code param fully Qualified Name the given fully qualified name exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the first type found following this project s classpath with the given fully qualified name or code null code if none is found see I Type get Fully Qualified Name char since 2 0  IPackageFragmentRoot findPackageFragmentRoots IClasspathEntry SearchEngine fullyQualifiedName JavaModelException IType getFullyQualifiedName
I Type find Type String fully Qualified Name throws Java Model Exception Returns the first type found following this project s classpath with the given fully qualified name or code null code if none is found The fully qualified name is a dot separated name For example a class B defined as a member type of a class A in package x y should have a the fully qualified name x y A B If the returned type is part of a compilation unit its owner is the given owner Note that in order to be found a type name or its toplevel enclosing type name must match its corresponding compilation unit name As a consequence secondary types cannot be found using this functionality Secondary types can however be explicitely accessed through their enclosing unit or found by the code Search Engine code param fully Qualified Name the given fully qualified name param owner the owner of the returned type s compilation unit exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the first type found following this project s classpath with the given fully qualified name or code null code if none is found see I Type get Fully Qualified Name char since 3 0  IType findType fullyQualifiedName JavaModelException SearchEngine fullyQualifiedName JavaModelException IType getFullyQualifiedName
I Type find Type String fully Qualified Name Working Copy Owner owner throws Java Model Exception Returns the first type found following this project s classpath with the given package name and type qualified name or code null code if none is found The package name is a dot separated name The type qualified name is also a dot separated name For example a class B defined as a member type of a class A should have the type qualified name A B Note that in order to be found a type name or its toplevel enclosing type name must match its corresponding compilation unit name As a consequence secondary types cannot be found using this functionality Secondary types can however be explicitely accessed through their enclosing unit or found by the code Search Engine code param package Name the given package name param type Qualified Name the given type qualified name exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the first type found following this project s classpath with the given package name and type qualified name or code null code if none is found see I Type get Type Qualified Name char since 2 0  IType findType fullyQualifiedName WorkingCopyOwner JavaModelException SearchEngine packageName typeQualifiedName JavaModelException IType getTypeQualifiedName
I Type find Type String package Name String type Qualified Name throws Java Model Exception Returns the first type found following this project s classpath with the given package name and type qualified name or code null code if none is found The package name is a dot separated name The type qualified name is also a dot separated name For example a class B defined as a member type of a class A should have the type qualified name A B If the returned type is part of a compilation unit its owner is the given owner Note that in order to be found a type name or its toplevel enclosing type name must match its corresponding compilation unit name As a consequence secondary types cannot be found using this functionality Secondary types can however be explicitely accessed through their enclosing unit or found by the code Search Engine code param package Name the given package name param type Qualified Name the given type qualified name param owner the owner of the returned type s compilation unit exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the first type found following this project s classpath with the given package name and type qualified name or code null code if none is found see I Type get Type Qualified Name char since 3 0  IType findType packageName typeQualifiedName JavaModelException SearchEngine packageName typeQualifiedName JavaModelException IType getTypeQualifiedName
Returns all of the existing package fragment roots that exist on the classpath in the order they are defined by the classpath return all of the existing package fragment roots that exist on the classpath exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  JavaModelException
Returns an array of non Java resources directly contained in this project It does not transitively answer non Java resources contained in folders these would have to be explicitly iterated over p Non Java resources includes other files and folders located in the project not accounted for by any of it source or binary package fragment roots If the project is a source folder itself resources excluded from the corresponding source classpath entry by one or more exclusion patterns are considered non Java resources and will appear in the result possibly in a folder p return an array of non Java resources code I File code s and or code I Folder code s directly contained in this project exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  IFile IFolder JavaModelException
Helper method for returning one option value only Equivalent to code String this get Options inherit Java Core Options get option Name code Note that it may answer code null code if this option does not exist or if there is no custom value for it p For a complete description of the configurable options see code Java Core get Default Options code p param option Name the name of an option param inherit Java Core Options boolean indicating whether Java Core options should be inherited as well return the String value of a given option see Java Core get Default Options since 2 1  getOptions inheritJavaCoreOptions optionName JavaCore getDefaultOptions optionName inheritJavaCoreOptions JavaCore JavaCore getDefaultOptions
Returns the table of the current custom options for this project Projects remember their custom options in other words only the options different from the the Java Core global options for the workspace A boolean argument allows to directly merge the project options with global ones from code Java Core code p For a complete description of the configurable options see code Java Core get Default Options code p param inherit Java Core Options boolean indicating whether Java Core options should be inherited as well return table of current settings of all options key type code String code value type code String code see Java Core get Default Options since 2 1  JavaCore JavaCore JavaCore getDefaultOptions inheritJavaCoreOptions JavaCore JavaCore getDefaultOptions
Returns the default output location for this project as a workspace relative absolute path p The default output location is where class files are ordinarily generated and resource files copied Each source classpath entry can also specify an output location for the generated class files and copied resource files corresponding to compilation units under that source folder This makes it possible to arrange generated class files for different source folders in different output folders and not necessarily the default output folder This means that the generated class files for the project may end up scattered across several folders rather than all in the default output folder which is more standard p return the workspace relative absolute path of the default output folder exception Java Model Exception if this element does not exist see set Output Location org eclipse core runtime I Path I Progress Monitor see I Classpath Entry get Output Location  JavaModelException setOutputLocation IPath IProgressMonitor IClasspathEntry getOutputLocation
Returns a package fragment root for the JAR at the specified file system path This is a handle only method The underlying code java io File code may or may not exist No resource is associated with this local JAR package fragment root param jar Path the jars s file system path return a package fragment root for the JAR at the specified file system path  jarPath
Returns a package fragment root for the given resource which must either be a folder representing the top of a package hierarchy or a code jar code or code zip code file This is a handle only method The underlying resource may or may not exist param resource the given resource return a package fragment root for the given resource which must either be a folder representing the top of a package hierarchy or a code jar code or code zip code file 
Returns all of the package fragment roots contained in this project identified on this project s resolved classpath The result does not include package fragment roots in other projects referenced on this project s classpath p NOTE This is equivalent to code get Children code return all of the package fragment roots contained in this project identified on this project s resolved classpath exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  getChildren JavaModelException
Returns the existing package fragment roots identified by the given entry Note that a classpath entry that refers to another project may have more than one root if that project has more than on root containing source and classpath entries within the current project identify a single root p If the classpath entry denotes a variable it will be resolved and return the roots of the target entry empty if not resolvable p If the classpath entry denotes a container it will be resolved and return the roots corresponding to the set of container entries empty if not resolvable param entry the given entry return the existing package fragment roots identified by the given entry see I Classpath Container deprecated Use I Java Project find Package Fragment Roots instead  IClasspathContainer IJavaProject findPackageFragmentRoots
Returns all package fragments in all package fragment roots contained in this project This is a convenience method Note that the package fragment roots corresponds to the resolved classpath of the project return all package fragments in all package fragment roots contained in this project exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  JavaModelException
Returns the code I Project code on which this code I Java Project code was created This is handle only method return the code I Project code on which this code I Java Project code was created  IProject IJavaProject IProject IJavaProject
Returns the raw classpath for the project as a list of classpath entries This corresponds to the exact set of entries which were assigned using code set Raw Classpath code in particular such a classpath may contain classpath variable and classpath container entries Classpath variable and classpath container entries can be resolved using the helper method code get Resolved Classpath code classpath variable entries also can be resolved individually using code Java Core get Classpath Variable code p Both classpath containers and classpath variables provides a level of indirection that can make the code classpath code file stable across workspaces As an example classpath variables allow a classpath to no longer refer directly to external JA Rs located in some user specific location The classpath can simply refer to some variables defining the proper locations of these external JA Rs Similarly classpath containers allows classpath entries to be computed dynamically by the plug in that defines that kind of classpath container p p Note that in case the project isn t yet opened the classpath will be read directly from the associated tt classpath tt file p return the raw classpath for the project as a list of classpath entries exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource see I Classpath Entry  setRawClasspath getResolvedClasspath JavaCore getClasspathVariable JARs JARs JavaModelException IClasspathEntry
Returns the names of the projects that are directly required by this project A project is required if it is in its classpath p The project names are returned in the order they appear on the classpath return the names of the projects that are directly required by this project in classpath order exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  JavaModelException
This is a helper method returning the resolved classpath for the project as a list of simple non variable non container classpath entries All classpath variable and classpath container entries in the project s raw classpath will be replaced by the simple classpath entries they resolve to p The resulting resolved classpath is accurate for the given point in time If the project s raw classpath is later modified or if classpath variables are changed the resolved classpath can become out of date Because of this hanging on resolved classpath is not recommended p param ignore Unresolved Entry indicates how to handle unresolvable variables and containers code true code indicates that missing variables and unresolvable classpath containers should be silently ignored and that the resulting list should consist only of the entries that could be successfully resolved code false code indicates that a code Java Model Exception code should be thrown for the first unresolved variable or container return the resolved classpath for the project as a list of simple classpath entries where all classpath variable and container entries have been resolved and substituted with their final target entries exception Java Model Exception in one of the corresponding situation ul li this element does not exist li li an exception occurs while accessing its corresponding resource li li a classpath variable or classpath container was not resolvable and code ignore Unresolved Entry code is code false code li ul see I Classpath Entry I Classpath Entry get Resolved Classpath boolean ignore Unresolved Entry  ignoreUnresolvedEntry JavaModelException JavaModelException ignoreUnresolvedEntry IClasspathEntry IClasspathEntry getResolvedClasspath ignoreUnresolvedEntry
Returns whether this project has been built at least once and thus whether it has a build state return true if this project has been built at least once false otherwise 
Returns whether setting this project s classpath to the given classpath entries would result in a cycle If the set of entries contains some variables those are resolved in order to determine cycles param entries the given classpath entries return true if the given classpath entries would result in a cycle false otherwise 
boolean has Classpath Cycle I Classpath Entry entries Returns whether the given element is on the classpath of this project that is referenced from a classpath entry and not explicitly excluded using an exclusion pattern param element the given element return code true code if the given element is on the classpath of this project code false code otherwise see I Classpath Entry get Inclusion Patterns see I Classpath Entry get Exclusion Patterns since 2 0  hasClasspathCycle IClasspathEntry IClasspathEntry getInclusionPatterns IClasspathEntry getExclusionPatterns
boolean is On Classpath I Java Element element Returns whether the given resource is on the classpath of this project that is referenced from a classpath entry and not explicitly excluded using an exclusion pattern param resource the given resource return code true code if the given resource is on the classpath of this project code false code otherwise see I Classpath Entry get Inclusion Patterns see I Classpath Entry get Exclusion Patterns since 2 1  isOnClasspath IJavaElement IClasspathEntry getInclusionPatterns IClasspathEntry getExclusionPatterns
Creates a new evaluation context return a new evaluation context 
Creates and returns a type hierarchy for all types in the given region considering subtypes within that region param monitor the given progress monitor param region the given region exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource exception Illegal Argument Exception if region is code null code return a type hierarchy for all types in the given region considering subtypes within that region I Type Hierarchy new Type Hierarchy I Region region I Progress Monitor monitor  JavaModelException IllegalArgumentException ITypeHierarchy newTypeHierarchy IRegion IProgressMonitor
Creates and returns a type hierarchy for all types in the given region considering subtypes within that region and considering types in the working copies with the given owner In other words the owner s working copies will take precedence over their original compilation units in the workspace p Note that if a working copy is empty it will be as if the original compilation unit had been deleted p param monitor the given progress monitor param region the given region param owner the owner of working copies that take precedence over their original compilation units exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource exception Illegal Argument Exception if region is code null code return a type hierarchy for all types in the given region considering subtypes within that region since 3 0 I Type Hierarchy new Type Hierarchy I Region region Working Copy Owner owner I Progress Monitor monitor  JavaModelException IllegalArgumentException ITypeHierarchy newTypeHierarchy IRegion WorkingCopyOwner IProgressMonitor
Creates and returns a type hierarchy for the given type considering subtypes in the specified region param type the given type param region the given region param monitor the given monitor exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource exception Illegal Argument Exception if type or region is code null code return a type hierarchy for the given type considering subtypes in the specified region I Type Hierarchy new Type Hierarchy I Type type I Region region I Progress Monitor monitor  JavaModelException IllegalArgumentException ITypeHierarchy newTypeHierarchy IType IRegion IProgressMonitor
Creates and returns a type hierarchy for the given type considering subtypes in the specified region and considering types in the working copies with the given owner In other words the owner s working copies will take precedence over their original compilation units in the workspace p Note that if a working copy is empty it will be as if the original compilation unit had been deleted p param type the given type param region the given region param monitor the given monitor param owner the owner of working copies that take precedence over their original compilation units exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource exception Illegal Argument Exception if type or region is code null code return a type hierarchy for the given type considering subtypes in the specified region since 3 0 I Type Hierarchy new Type Hierarchy I Type type I Region region Working Copy Owner owner I Progress Monitor monitor  JavaModelException IllegalArgumentException ITypeHierarchy newTypeHierarchy IType IRegion WorkingCopyOwner IProgressMonitor
Returns the default output location for the project as defined by its code classpath code file from disk or code null code if unable to read the file p This output location may differ from the in memory one returned by code get Output Location code in case the automatic reconciliation mechanism has not been performed yet Usually any change to the code classpath code file is automatically noticed and reconciled at the next resource change notification event However if the file is modified within an operation where this change needs to be taken into account before the operation ends then the output location from disk can be read using this method and further assigned to the project using code set Raw Classpath code p The default output location is where class files are ordinarily generated and resource files copied Each source classpath entry can also specify an output location for the generated class files and copied resource files corresponding to compilation units under that source folder This makes it possible to arrange generated class files for different source folders in different output folders and not necessarily the default output folder This means that the generated class files for the project may end up scattered across several folders rather than all in the default output folder which is more standard p In order to manually force a project classpath refresh one can simply assign the project classpath using the result of this method as follows code proj set Raw Classpath proj read Raw Classpath proj read Output Location monitor code note that the code read Raw Classpath read Output Location code methods could return code null code p return the workspace relative absolute path of the default output folder see get Output Location since 3 0  getOutputLocation setRawClasspath setRawClasspath readRawClasspath readOutputLocation readRawClasspath readOutputLocation getOutputLocation
Returns the raw classpath for the project as defined by its code classpath code file from disk or code null code if unable to read the file p This classpath may differ from the in memory classpath returned by code get Raw Classpath code in case the automatic reconciliation mechanism has not been performed yet Usually any change to the code classpath code file is automatically noticed and reconciled at the next resource change notification event However if the file is modified within an operation where this change needs to be taken into account before the operation ends then the classpath from disk can be read using this method and further assigned to the project using code set Raw Classpath code p p Classpath variable and classpath container entries can be resolved using the helper method code get Resolved Classpath code classpath variable entries also can be resolved individually using code Java Core get Classpath Variable code p p Note that no check is performed whether the project has the Java nature set allowing an existing code classpath code file to be considered independantly unlike code get Raw Classpath code which requires the Java nature to be associated with the project p p In order to manually force a project classpath refresh one can simply assign the project classpath using the result of this method as follows code proj set Raw Classpath proj read Raw Classpath proj read Output Location monitor code note that the code read Raw Classpath read Output Location code methods could return code null code p return the raw classpath from disk for the project as a list of classpath entries see get Raw Classpath see I Classpath Entry since 3 0  getRawClasspath setRawClasspath getResolvedClasspath JavaCore getClasspathVariable getRawClasspath setRawClasspath readRawClasspath readOutputLocation readRawClasspath readOutputLocation getRawClasspath IClasspathEntry
Helper method for setting one option value only Equivalent to code Map options this get Options false map put option Name option Value this set Options map code p For a complete description of the configurable options see code Java Core get Default Options code p param option Name the name of an option param option Value the value of the option to set see Java Core get Default Options since 3 0  getOptions optionName optionValue setOptions JavaCore getDefaultOptions optionName optionValue JavaCore getDefaultOptions
Sets the project custom options All and only the options explicitly included in the given table are remembered all previous option settings are forgotten including ones not explicitly mentioned p For a complete description of the configurable options see code Java Core get Default Options code p param new Options the new options key type code String code value type code String code or code null code to flush all custom options clients will automatically get the global Java Core options see Java Core get Default Options since 2 1  JavaCore getDefaultOptions newOptions JavaCore JavaCore getDefaultOptions
Sets the default output location of this project to the location described by the given workspace relative absolute path p The default output location is where class files are ordinarily generated and resource files copied Each source classpath entries can also specify an output location for the generated class files and copied resource files corresponding to compilation units under that source folder This makes it possible to arrange that generated class files for different source folders to end up in different output folders and not necessarily the default output folder This means that the generated class files for the project may end up scattered across several folders rather than all in the default output folder which is more standard p param path the workspace relative absolute path of the default output folder param monitor the progress monitor exception Java Model Exception if the classpath could not be set Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li The path refers to a location not contained in this project code PATH OUTSIDE PROJECT code li The path is not an absolute path code RELATIVE PATH code li The path is nested inside a package fragment root of this project code INVALID PATH code li The output location is being modified during resource change event notification CORE EXCEPTION ul see get Output Location see I Classpath Entry get Output Location void set Output Location I Path path I Progress Monitor monitor  JavaModelException ELEMENT_DOES_NOT_EXIST PATH_OUTSIDE_PROJECT RELATIVE_PATH INVALID_PATH CORE_EXCEPTION getOutputLocation IClasspathEntry getOutputLocation setOutputLocation IPath IProgressMonitor
Sets the classpath of this project using a list of classpath entries In particular such a classpath may contain classpath variable entries Classpath variable entries can be resolved individually see code Java Core get Classpath Variable code or the full classpath can be resolved at once using the helper method code get Resolved Classpath code p A classpath variable provides an indirection level for better sharing a classpath As an example it allows a classpath to no longer refer directly to external JA Rs located in some user specific location The classpath can simply refer to some variables defining the proper locations of these external JA Rs p Setting the classpath to code null code specifies a default classpath the project root Setting the classpath to an empty array specifies an empty classpath p If a cycle is detected while setting this classpath an error marker will be added to the project closing the cycle To avoid this problem use code has Classpath Cycle I Classpath Entry entries code before setting the classpath p This operation acquires a lock on the workspace s root param entries a list of classpath entries param monitor the given progress monitor exception Java Model Exception if the classpath could not be set Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li The classpath is being modified during resource change event notification CORE EXCEPTION li The classpath failed the validation check as defined by code Java Conventions validate Classpath code ul see I Classpath Entry void set Raw Classpath I Classpath Entry entries I Progress Monitor monitor  JavaCore getClasspathVariable getResolvedClasspath JARs JARs hasClasspathCycle IClasspathEntry JavaModelException ELEMENT_DOES_NOT_EXIST CORE_EXCEPTION JavaConventions validateClasspath IClasspathEntry setRawClasspath IClasspathEntry IProgressMonitor
Sets the both the classpath of this project and its default output location at once The classpath is defined using a list of classpath entries In particular such a classpath may contain classpath variable entries Classpath variable entries can be resolved individually see code Java Core get Classpath Variable code or the full classpath can be resolved at once using the helper method code get Resolved Classpath code p A classpath variable provides an indirection level for better sharing a classpath As an example it allows a classpath to no longer refer directly to external JA Rs located in some user specific location The classpath can simply refer to some variables defining the proper locations of these external JA Rs p p Setting the classpath to code null code specifies a default classpath the project root Setting the classpath to an empty array specifies an empty classpath p p If a cycle is detected while setting this classpath an error marker will be added to the project closing the cycle To avoid this problem use code has Classpath Cycle I Classpath Entry entries code before setting the classpath p p This operation acquires a lock on the workspace s root p param entries a list of classpath entries param monitor the progress monitor param output Location the default output location exception Java Model Exception if the classpath could not be set Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li Two or more entries specify source roots with the same or overlapping paths NAME COLLISION li A entry of kind code CPE PROJECT code refers to this project INVALID PATH li This Java element does not exist ELEMENT DOES NOT EXIST li li The output location path refers to a location not contained in this project code PATH OUTSIDE PROJECT code li The output location path is not an absolute path code RELATIVE PATH code li The output location path is nested inside a package fragment root of this project code INVALID PATH code li The classpath is being modified during resource change event notification CORE EXCEPTION ul see I Classpath Entry since 2 0 void set Raw Classpath I Classpath Entry entries I Path output Location I Progress Monitor monitor  JavaCore getClasspathVariable getResolvedClasspath JARs JARs hasClasspathCycle IClasspathEntry outputLocation JavaModelException ELEMENT_DOES_NOT_EXIST NAME_COLLISION CPE_PROJECT INVALID_PATH ELEMENT_DOES_NOT_EXIST PATH_OUTSIDE_PROJECT RELATIVE_PATH INVALID_PATH CORE_EXCEPTION IClasspathEntry setRawClasspath IClasspathEntry IPath outputLocation IProgressMonitor

Returns the name of this local variable return the name of this local variable 
Returns the source range of this local variable s name return the source range of this local variable s name 
Returns the type signature of this local variable p The type signature may be either unresolved for source types or resolved for binary types and either basic for basic types or rich for parameterized types See link Signature for details p return the type signature of this local variable see Signature 

public interface I Member extends I Java Element I Source Reference I Source Manipulation I Parent Returns the class file in which this member is declared or code null code if this member is not declared in a class file for example a source type This is a handle only method return the class file in which this member is declared or code null code if this member is not declared in a class file for example a source type  IMember IJavaElement ISourceReference ISourceManipulation IParent
I Class File get Class File Returns the compilation unit in which this member is declared or code null code if this member is not declared in a compilation unit for example a binary type This is a handle only method return the compilation unit in which this member is declared or code null code if this member is not declared in a compilation unit for example a binary type  IClassFile getClassFile
I Compilation Unit get Compilation Unit Returns the type in which this member is declared or code null code if this member is not declared in a type for example a top level type This is a handle only method return the type in which this member is declared or code null code if this member is not declared in a type for example a top level type  ICompilationUnit getCompilationUnit
I Type get Declaring Type Returns the modifier flags for this member The flags can be examined using class code Flags code p Note that only flags as indicated in the source are returned Thus if an interface defines a method code void my Method code the flags don t include the public flag exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the modifier flags for this member see Flags  IType getDeclaringType myMethod JavaModelException
int get Flags throws Java Model Exception Returns the source range of this member s simple name or code null code if this member does not have a name for example an initializer or if this member does not have associated source code for example a binary type exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the source range of this member s simple name or code null code if this member does not have a name for example an initializer or if this member does not have associated source code for example a binary type  getFlags JavaModelException JavaModelException
I Source Range get Name Range throws Java Model Exception Returns the local or anonymous type declared in this source member with the given simple name and or with the specified position relative to the order they are defined in the source The name is empty if it is an anonymous type Numbering starts at 1 thus the first occurrence is occurrence 1 not occurrence 0 This is a handle only method The type may or may not exist Throws a code Runtime Exception code if this member is not a source member param name the given simple name param occurrence Count the specified position return the type with the given name and or with the specified position relative to the order they are defined in the source since 3 0  ISourceRange getNameRange JavaModelException RuntimeException occurrenceCount
I Type get Type String name int occurrence Count Returns whether this member is from a class file This is a handle only method return code true code if from a class file and code false code if from a compilation unit  IType getType occurrenceCount

public interface I Method extends I Member Returns the simple name of this method For a constructor this returns the simple name of the declaring type Note This holds whether the constructor appears in a source or binary type even though class files internally define constructor names to be code lt init gt code For the class initialization methods in binary types this returns the special name code lt clinit gt code This is a handle only method return the simple name of this method  IMethod IMember
String get Element Name Returns the type signatures of the exceptions this method throws in the order declared in the source Returns an empty array if this method throws no exceptions p For example a source method declaring code throws IO Exception code would return the array code QIO Exception code p p The type signatures may be either unresolved for source types or resolved for binary types and either basic for basic types or rich for parameterized types See link Signature for details p exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the type signatures of the exceptions this method throws in the order declared in the source an empty array if this method throws no exceptions see Signature  getElementName IOException QIOException JavaModelException
Returns the formal type parameter signatures for this method Returns an empty array if this method has no formal type parameters p The formal type parameter signatures may be either unresolved for source types or resolved for binary types See link Signature for details p exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the formal type parameter signatures of this method in the order declared in the source an empty array if none see Signature since 3 0  JavaModelException
Returns the number of parameters of this method This is a handle only method return the number of parameters of this method 
int get Number Of Parameters Returns the names of parameters in this method For binary types these names are invented as arg i where i starts at 1 even if source is associated with the binary Returns an empty array if this method has no parameters p For example a method declared as code public void foo String text int length code would return the array code text length code p exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the names of parameters in this method an empty array if this method has no parameters  getNumberOfParameters JavaModelException
String get Parameter Names throws Java Model Exception Returns the type signatures for the parameters of this method Returns an empty array if this method has no parameters This is a handle only method p For example a source method declared as code public void foo String text int length code would return the array code Q String I code p p The type signatures may be either unresolved for source types or resolved for binary types and either basic for basic types or rich for parameterized types See link Signature for details p return the type signatures for the parameters of this method an empty array if this method has no parameters see Signature  getParameterNames JavaModelException QString
String get Parameter Types Returns the type signature of the return value of this method For constructors this returns the signature for void p For example a source method declared as code public String get Name code would return code Q String code p p The type signature may be either unresolved for source types or resolved for binary types and either basic for basic types or rich for parameterized types See link Signature for details p exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the type signature of the return value of this method void for constructors see Signature  getParameterTypes getName QString JavaModelException
String get Return Type throws Java Model Exception Returns the signature of this method This includes the signatures for the parameter types and return type but does not include the method name exception types or type parameters p For example a source method declared as code public void foo String text int length code would return code Q String I V code p p The type signatures embedded in the method signature may be either unresolved for source types or resolved for binary types and either basic for basic types or rich for parameterized types See link Signature for details p return the signature of this method exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource see Signature  getReturnType JavaModelException QString JavaModelException
String get Signature throws Java Model Exception Returns whether this method is a constructor exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return true if this method is a constructor false otherwise  getSignature JavaModelException JavaModelException
Returns whether this method is a main method It is a main method if ul li its name is equal to code main code li li its return type is code void code li li it is code static code and code public code li li it defines one parameter whose type s simple name is code String code li ul exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource since 2 0 return true if this method is a main method false otherwise  JavaModelException
boolean is Main Method throws Java Model Exception Returns whether this method is similar to the given method Two methods are similar if ul li their element names are equal li li they have the same number of parameters li li the simple names of their parameter types are equal li ul This is a handle only method param method the given method return true if this method is similar to the given method see Signature get Simple Name char since 2 0  isMainMethod JavaModelException getSimpleName

Closes this element and its buffer if any Closing an element which is not open has no effect p Note although code close code is exposed in the API clients are not expected to open and close elements the Java model does this automatically as elements are accessed exception Java Model Exception if an error occurs closing this element  JavaModelException
public void close throws Java Model Exception Returns the buffer opened for this element or code null code if this element does not have a buffer exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the buffer opened for this element or code null code if this element does not have a buffer  JavaModelException JavaModelException
public I Buffer get Buffer throws Java Model Exception Returns code true code if this element is open and ul li its buffer has unsaved changes or li one of its descendants has unsaved changes or li a working copy has been created on one of this element s children and has not yet destroyed ul exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return code true code if this element is open and ul li its buffer has unsaved changes or li one of its descendants has unsaved changes or li a working copy has been created on one of this element s children and has not yet destroyed ul  IBuffer getBuffer JavaModelException JavaModelException
boolean has Unsaved Changes throws Java Model Exception Returns whether the element is consistent with its underlying resource or buffer The element is consistent when opened and is consistent if the underlying resource or buffer has not been modified since it was last consistent p NOTE Child consistency is not considered For example a package fragment responds code true code when it knows about all of its compilation units present in its underlying folder However one or more of the compilation units could be inconsistent exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return true if the element is consistent with its underlying resource or buffer false otherwise see I Openable make Consistent I Progress Monitor  hasUnsavedChanges JavaModelException JavaModelException IOpenable makeConsistent IProgressMonitor
boolean is Consistent throws Java Model Exception Returns whether this openable is open This is a handle only method return true if this openable is open false otherwise  isConsistent JavaModelException
boolean is Open Makes this element consistent with its underlying resource or buffer by updating the element s structure and properties as necessary p Note Using this functionality on a working copy will interfere with any subsequent reconciling operation Indeed the next code I Compilation Unit reconcile code operation will not account for changes which occurred before an explicit use of code make Consistent I Progress Monitor code p param progress the given progress monitor exception Java Model Exception if the element is unable to access the contents of its underlying resource Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li ul see I Openable is Consistent see I Compilation Unit reconcile int boolean Working Copy Owner I Progress Monitor  isOpen ICompilationUnit makeConsistent IProgressMonitor JavaModelException ELEMENT_DOES_NOT_EXIST IOpenable isConsistent ICompilationUnit WorkingCopyOwner IProgressMonitor
void make Consistent I Progress Monitor progress throws Java Model Exception Opens this element and all parent elements that are not already open For compilation units a buffer is opened on the contents of the underlying resource p Note although code open code is exposed in the API clients are not expected to open and close elements the Java model does this automatically as elements are accessed param progress the given progress monitor exception Java Model Exception if an error occurs accessing the contents of its underlying resource Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li ul  makeConsistent IProgressMonitor JavaModelException JavaModelException ELEMENT_DOES_NOT_EXIST
public void open I Progress Monitor progress throws Java Model Exception Saves any changes in this element s buffer to its underlying resource via a workspace resource operation This has no effect if the element has no underlying buffer or if there are no unsaved changed in the buffer p The code force code parameter controls how this method deals with cases where the workbench is not completely in sync with the local file system If code false code is specified this method will only attempt to overwrite a corresponding file in the local file system provided it is in sync with the workbench This option ensures there is no unintended data loss it is the recommended setting However if code true code is specified an attempt will be made to write a corresponding file in the local file system overwriting any existing one if need be In either case if this method succeeds the resource will be marked as being local even if it wasn t before p As a result of this operation the element is consistent with its underlying resource or buffer param progress the given progress monitor param force it controls how this method deals with cases where the workbench is not completely in sync with the local file system exception Java Model Exception if an error occurs accessing the contents of its underlying resource Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li This Java element is read only READ ONLY li ul  IProgressMonitor JavaModelException JavaModelException ELEMENT_DOES_NOT_EXIST READ_ONLY

public interface I Package Declaration extends I Java Element I Source Reference Returns the name of the package the statement refers to This is a handle only method return the name of the package the statement  IPackageDeclaration IJavaElement ISourceReference

public static final String DEFAULT PACKAGE NAME NON NLS 1 Returns whether this fragment contains at least one Java resource return true if this fragment contains at least one Java resource false otherwise exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource  DEFAULT_PACKAGE_NAME JavaModelException
boolean contains Java Resources throws Java Model Exception Creates and returns a compilation unit in this package fragment with the specified name and contents No verification is performed on the contents p It is possible that a compilation unit with the same name already exists in this package fragment The value of the code force code parameter effects the resolution of such a conflict ul li code true code in this case the compilation is created with the new contents li li code false code in this case a code Java Model Exception code is thrown li ul param contents the given contents param force specify how to handle conflict is the same name already exists param monitor the given progress monitor param name the given name exception Java Model Exception if the element could not be created Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while creating an underlying resource li The name is not a valid compilation unit name INVALID NAME li The contents are code null code INVALID CONTENTS ul return a compilation unit in this package fragment with the specified name and contents  containsJavaResources JavaModelException JavaModelException JavaModelException ELEMENT_DOES_NOT_EXIST CoreException INVALID_NAME INVALID_CONTENTS
I Compilation Unit create Compilation Unit String name String contents boolean force I Progress Monitor monitor throws Java Model Exception Returns the class file with the specified name in this package for example code Object class code The class suffix is required This is a handle only method The class file may or may not be present param name the given name return the class file with the specified name in this package  ICompilationUnit createCompilationUnit IProgressMonitor JavaModelException
I Class File get Class File String name Returns all of the class files in this package fragment p Note it is possible that a package fragment contains only compilation units in other words its kind is code K SOURCE code in which case this method returns an empty collection exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return all of the class files in this package fragment  IClassFile getClassFile K_SOURCE JavaModelException
I Class File get Class Files throws Java Model Exception Returns the compilation unit with the specified name in this package for example code Object java code The name has to be a valid compilation unit name This is a handle only method The compilation unit may or may not be present param name the given name return the compilation unit with the specified name in this package see Java Conventions validate Compilation Unit Name String  IClassFile getClassFiles JavaModelException JavaConventions validateCompilationUnitName
I Compilation Unit get Compilation Unit String name Returns all of the compilation units in this package fragment p Note it is possible that a package fragment contains only class files in other words its kind is code K BINARY code in which case this method returns an empty collection p exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return all of the compilation units in this package fragment  ICompilationUnit getCompilationUnit K_BINARY JavaModelException
I Compilation Unit get Compilation Units throws Java Model Exception Returns all of the compilation units in this package fragment that are in working copy mode and that have the given owner p Only existing working copies are returned So a compilation unit handle that has no corresponding resource on disk will be included if and only if is in working copy mode p p Note it is possible that a package fragment contains only class files in other words its kind is code K BINARY code in which case this method returns an empty collection p param owner the owner of the returned compilation units exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return all of the compilation units in this package fragment since 3 0  ICompilationUnit getCompilationUnits JavaModelException K_BINARY JavaModelException
I Compilation Unit get Compilation Units Working Copy Owner owner throws Java Model Exception Returns the dot separated package name of this fragment for example code java lang code or code code the empty string for the default package return the dot separated package name of this fragment  ICompilationUnit getCompilationUnits WorkingCopyOwner JavaModelException
String get Element Name Returns this package fragment s root kind encoded as an integer A package fragment can contain code java code source files or code class code files This is a convenience method exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return this package fragment s root kind encoded as an integer see I Package Fragment Root K SOURCE see I Package Fragment Root K BINARY  getElementName JavaModelException IPackageFragmentRoot K_SOURCE IPackageFragmentRoot K_BINARY
int get Kind throws Java Model Exception Returns an array of non Java resources contained in this package fragment p Non Java resources includes other files and folders located in the same directory as the compilation units or class files for this package fragment Source files excluded from this package by virtue of inclusion exclusion patterns on the corresponding source classpath entry are considered non Java resources and will appear in the result possibly in a folder p exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return an array of non Java resources code I File code s code I Folder code s or code I Storage code s if the package fragment is in an archive contained in this package fragment see I Classpath Entry get Inclusion Patterns see I Classpath Entry get Exclusion Patterns  getKind JavaModelException JavaModelException IFile IFolder IStorage IClasspathEntry getInclusionPatterns IClasspathEntry getExclusionPatterns
Object get Non Java Resources throws Java Model Exception Returns whether this package fragment s name is a prefix of other package fragments in this package fragment s root exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return true if this package fragment s name is a prefix of other package fragments in this package fragment s root false otherwise  getNonJavaResources JavaModelException JavaModelException
boolean has Subpackages throws Java Model Exception Returns whether this package fragment is a default package This is a handle only method return true if this package fragment is a default package  hasSubpackages JavaModelException

int REPLACE 16 Attaches the source archive identified by the given absolute path to this binary package fragment root code root Path code specifies the location of the root within the archive or folder empty specifies the default root and code null code specifies the root path should be detected Once a source archive or folder is attached to the package fragment root the code get Source code and code get Source Range code methods become operational for binary types members To detach a source archive or folder from a package fragment root specify code null code as the source path param source Path the given absolute path to the source archive or folder param root Path specifies the location of the root within the archive empty specifies the default root and code null code specifies automatic detection of the root path param monitor the given progress monitor exception Java Model Exception if this operation fails Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating a server property li This package fragment root is not of kind binary INVALID ELEMENT TYPES li The path provided is not absolute RELATIVE PATH ul void attach Source I Path source Path I Path root Path I Progress Monitor monitor  rootPath getSource getSourceRange sourcePath rootPath JavaModelException ELEMENT_DOES_NOT_EXIST CoreException INVALID_ELEMENT_TYPES RELATIVE_PATH attachSource IPath sourcePath IPath rootPath IProgressMonitor
Copies the resource of this package fragment root to the destination path as specified by code I Resource copy I Path int I Progress Monitor code but excluding nested source folders p If code NO RESOURCE MODIFICATION code is specified in code update Model Flags code or if this package fragment root is external this operation doesn t copy the resource code update Resource Flags code is then ignored p p If code DESTINATION PROJECT CLASSPATH code is specified in code update Model Flags code updates the classpath of the destination s project if it is a Java project If a non code null code sibling is specified a copy of this root s classpath entry is inserted before the sibling on the destination project s raw classpath If code null code is specified the classpath entry is added at the end of the raw classpath p p If code REPLACE code is specified in code update Model Flags code overwrites the resource at the destination path if any If the same classpath entry already exists on the destination project s raw classpath then the sibling is ignored and the new classpath entry replaces the existing one p p If no flags is specified in code update Model Flags code using code I Resource NONE code the default behavior applies the resource is copied if this package fragment root is not external and the classpath is not updated p param destination the destination path param update Resource Flags bit wise or of update resource flag constants code I Resource FORCE code and code I Resource SHALLOW code param update Model Flags bit wise or of update resource flag constants code DESTINATION PROJECT CLASSPATH code and code NO RESOURCE MODIFICATION code param sibling the classpath entry before which a copy of the classpath entry should be inserted or code null code if the classpath entry should be inserted at the end param monitor a progress monitor exception Java Model Exception if this root could not be copied Reasons include ul li This root does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while copying the resource or updating a classpath li li The destination is not inside an existing project and code update Model Flags code has been specified as code DESTINATION PROJECT CLASSPATH code INVALID DESTINATION li li The sibling is not a classpath entry on the destination project s raw classpath INVALID SIBLING li li The same classpath entry already exists on the destination project s classpath NAME COLLISION and code update Model Flags code has not been specified as code REPLACE code li ul see org eclipse core resources I Resource copy I Path boolean I Progress Monitor since 2 1  IResource IPath IProgressMonitor NO_RESOURCE_MODIFICATION updateModelFlags updateResourceFlags DESTINATION_PROJECT_CLASSPATH updateModelFlags updateModelFlags updateModelFlags IResource updateResourceFlags IResource IResource updateModelFlags DESTINATION_PROJECT_CLASSPATH NO_RESOURCE_MODIFICATION JavaModelException ELEMENT_DOES_NOT_EXIST CoreException updateModelFlags DESTINATION_PROJECT_CLASSPATH INVALID_DESTINATION INVALID_SIBLING NAME_COLLISION updateModelFlags IResource IPath IProgressMonitor
void copy I Path destination int update Resource Flags int update Model Flags I Classpath Entry sibling I Progress Monitor monitor throws Java Model Exception Creates and returns a package fragment in this root with the given dot separated package name An empty string specifies the default package This has the side effect of creating all package fragments that are a prefix of the new package fragment which do not exist yet If the package fragment already exists this has no effect For a description of the code force code flag see code I Folder create code param name the given dot separated package name param force a flag controlling how to deal with resources that are not in sync with the local file system param monitor the given progress monitor exception Java Model Exception if the element could not be created Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while creating an underlying resource li This package fragment root is read only READ ONLY li The name is not a valid package name INVALID NAME ul return a package fragment in this root with the given dot separated package name see org eclipse core resources I Folder create boolean boolean I Progress Monitor I Package Fragment create Package Fragment String name boolean force I Progress Monitor monitor  IPath updateResourceFlags updateModelFlags IClasspathEntry IProgressMonitor JavaModelException IFolder JavaModelException ELEMENT_DOES_NOT_EXIST CoreException READ_ONLY INVALID_NAME IFolder IProgressMonitor IPackageFragment createPackageFragment IProgressMonitor
throws Java Model Exception Deletes the resource of this package fragment root as specified by code I Resource delete int I Progress Monitor code but excluding nested source folders p If code NO RESOURCE MODIFICATION code is specified in code update Model Flags code or if this package fragment root is external this operation doesn t delete the resource code update Resource Flags code is then ignored p p If code ORIGINATING PROJECT CLASSPATH code is specified in code update Model Flags code update the raw classpath of this package fragment root s project by removing the corresponding classpath entry p p If code OTHER REFERRING PROJECTS CLASSPATH code is specified in code update Model Flags code update the raw classpaths of all other Java projects referring to this root s resource by removing the corresponding classpath entries p p If no flags is specified in code update Model Flags code using code I Resource NONE code the default behavior applies the resource is deleted if this package fragment root is not external and no classpaths are updated p param update Resource Flags bit wise or of update resource flag constants code I Resource FORCE code and code I Resource KEEP HISTORY code param update Model Flags bit wise or of update resource flag constants code ORIGINATING PROJECT CLASSPATH code code OTHER REFERRING PROJECTS CLASSPATH code and code NO RESOURCE MODIFICATION code param monitor a progress monitor exception Java Model Exception if this root could not be deleted Reasons include ul li This root does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while deleting the resource or updating a classpath li ul see org eclipse core resources I Resource delete boolean I Progress Monitor since 2 1  JavaModelException IResource IProgressMonitor NO_RESOURCE_MODIFICATION updateModelFlags updateResourceFlags ORIGINATING_PROJECT_CLASSPATH updateModelFlags OTHER_REFERRING_PROJECTS_CLASSPATH updateModelFlags updateModelFlags IResource updateResourceFlags IResource IResource KEEP_HISTORY updateModelFlags ORIGINATING_PROJECT_CLASSPATH OTHER_REFERRING_PROJECTS_CLASSPATH NO_RESOURCE_MODIFICATION JavaModelException ELEMENT_DOES_NOT_EXIST CoreException IResource IProgressMonitor
void delete int update Resource Flags int update Model Flags I Progress Monitor monitor throws Java Model Exception Returns this package fragment root s kind encoded as an integer A package fragment root can contain code java code source files or code class code files but not both If the underlying folder or archive contains other kinds of files they are ignored In particular code class code files are ignored under a source package fragment root and code java code files are ignored under a binary package fragment root exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return this package fragment root s kind encoded as an integer see I Package Fragment Root K SOURCE see I Package Fragment Root K BINARY  updateResourceFlags updateModelFlags IProgressMonitor JavaModelException JavaModelException IPackageFragmentRoot K_SOURCE IPackageFragmentRoot K_BINARY
Returns an array of non Java resources contained in this package fragment root p Non Java resources includes other files and folders located in the same directories as the compilation units or class files under this package fragment root Resources excluded from this package fragment root by virtue of inclusion exclusion patterns on the corresponding source classpath entry are considered non Java resources and will appear in the result possibly in a folder Thus when a nested source folder is excluded it will appear in the non Java resources of the outer folder p return an array of non Java resources code I File code s code I Folder code s or code I Storage code s if the package fragment root is in archive contained in this package fragment root exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource see I Classpath Entry get Inclusion Patterns see I Classpath Entry get Exclusion Patterns  IFile IFolder IStorage JavaModelException IClasspathEntry getInclusionPatterns IClasspathEntry getExclusionPatterns
Returns the package fragment with the given package name An empty string indicates the default package This is a handle only operation The package fragment may or may not exist param package Name the given package name return the package fragment with the given package name  packageName
Returns the first raw classpath entry that corresponds to this package fragment root A raw classpath entry corresponds to a package fragment root if once resolved this entry s path is equal to the root s path exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the first raw classpath entry that corresponds to this package fragment root since 2 0  JavaModelException
Returns the absolute path to the source archive attached to this package fragment root s binary archive return the absolute path to the corresponding source archive or code null code if this package fragment root s binary archive has no corresponding source archive or if this package fragment root is not a binary archive exception Java Model Exception if this operation fails  JavaModelException
Returns the path within this package fragment root s source archive An empty path indicates that packages are located at the root of the source archive return the path within the corresponding source archive or code null code if this package fragment root s binary archive has no corresponding source archive or if this package fragment root is not a binary archive exception Java Model Exception if this operation fails  JavaModelException
Returns whether this package fragment root s underlying resource is a binary archive a JAR or zip file p This is a handle only method p return true if this package fragment root s underlying resource is a binary archive false otherwise 
Returns whether this package fragment root is external to the workbench that is a local file and has no underlying resource p This is a handle only method p return true if this package fragment root is external to the workbench that is a local file and has no underlying resource false otherwise 
Moves the resource of this package fragment root to the destination path as specified by code I Resource move I Path int I Progress Monitor code but excluding nested source folders p If code NO RESOURCE MODIFICATION code is specified in code update Model Flags code or if this package fragment root is external this operation doesn t move the resource code update Resource Flags code is then ignored p p If code DESTINATION PROJECT CLASSPATH code is specified in code update Model Flags code updates the classpath of the destination s project if it is a Java project If a non code null code sibling is specified a copy of this root s classpath entry is inserted before the sibling on the destination project s raw classpath If code null code is specified the classpath entry is added at the end of the raw classpath p p If code ORIGINATING PROJECT CLASSPATH code is specified in code update Model Flags code update the raw classpath of this package fragment root s project by removing the corresponding classpath entry p p If code OTHER REFERRING PROJECTS CLASSPATH code is specified in code update Model Flags code update the raw classpaths of all other Java projects referring to this root s resource by removing the corresponding classpath entries p p If code REPLACE code is specified in code update Model Flags code overwrites the resource at the destination path if any If the same classpath entry already exists on the destination project s raw classpath then the sibling is ignored and the new classpath entry replaces the existing one p p If no flags is specified in code update Model Flags code using code I Resource NONE code the default behavior applies the resource is moved if this package fragment root is not external and no classpaths are updated p param destination the destination path param update Resource Flags bit wise or of update flag constants code I Resource FORCE code code I Resource KEEP HISTORY code and code I Resource SHALLOW code param update Model Flags bit wise or of update resource flag constants code DESTINATION PROJECT CLASSPATH code code ORIGINATING PROJECT CLASSPATH code code OTHER REFERRING PROJECTS CLASSPATH code and code NO RESOURCE MODIFICATION code param sibling the classpath entry before which a copy of the classpath entry should be inserted or code null code if the classpath entry should be inserted at the end param monitor a progress monitor exception Java Model Exception if this root could not be moved Reasons include ul li This root does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while copying the resource or updating a classpath li li The destination is not inside an existing project and code update Model Flags code has been specified as code DESTINATION PROJECT CLASSPATH code INVALID DESTINATION li li The sibling is not a classpath entry on the destination project s raw classpath INVALID SIBLING li li The same classpath entry already exists on the destination project s classpath NAME COLLISION and code update Model Flags code has not been specified as code REPLACE code li ul see org eclipse core resources I Resource move I Path boolean I Progress Monitor since 2 1  IResource IPath IProgressMonitor NO_RESOURCE_MODIFICATION updateModelFlags updateResourceFlags DESTINATION_PROJECT_CLASSPATH updateModelFlags ORIGINATING_PROJECT_CLASSPATH updateModelFlags OTHER_REFERRING_PROJECTS_CLASSPATH updateModelFlags updateModelFlags updateModelFlags IResource updateResourceFlags IResource IResource KEEP_HISTORY IResource updateModelFlags DESTINATION_PROJECT_CLASSPATH ORIGINATING_PROJECT_CLASSPATH OTHER_REFERRING_PROJECTS_CLASSPATH NO_RESOURCE_MODIFICATION JavaModelException ELEMENT_DOES_NOT_EXIST CoreException updateModelFlags DESTINATION_PROJECT_CLASSPATH INVALID_DESTINATION INVALID_SIBLING NAME_COLLISION updateModelFlags IResource IPath IProgressMonitor

public interface I Parent Returns the immediate children of this element Unless otherwise specified by the implementing element the children are in no particular order exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the immediate children of this element  IParent JavaModelException
I Java Element get Children throws Java Model Exception Returns whether this element has one or more immediate children This is a convenience method and may be more efficient than testing whether code get Children code is an empty array exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return true if the immediate children of this element false otherwise  IJavaElement getChildren JavaModelException getChildren JavaModelException

Notification of a Java problem param problem I Problem The discovered Java problem  IProblem
Notification sent before starting the problem detection process Typically this would tell a problem collector to clear previously recorded problems 
Notification sent after having completed problem detection process Typically this would tell a problem collector that no more problems should be expected in this iteration 
Predicate allowing the problem requestor to signal whether or not it is currently interested by problem reports When answering code false false problem will not be discovered any more until the next iteration This predicate will be invoked once prior to each problem detection iteration return boolean indicates whether the requestor is currently interested by problems 

public interface I Region Adds the given element and all of its descendents to this region If the specified element is already included or one of its ancestors is already included this has no effect If the element being added is an ancestor of an element already contained in this region the ancestor subsumes the descendent param element the given element  IRegion
void add I Java Element element Returns whether the given element is contained in this region param element the given element return true if the given element is contained in this region false otherwise  IJavaElement
boolean contains I Java Element element Returns the top level elements in this region All descendents of these elements are also included in this region return the top level elements in this region  IJavaElement
I Java Element get Elements Removes the specified element from the region and returns code true code if successful code false code if the remove fails If an ancestor of the given element is included the remove fails in other words it is not possible to selectively exclude descendants of included ancestors param element the given element return code true code if successful code false code if the remove fails  IJavaElement getElements

public interface I Source Manipulation Copies this element to the given container param container the container param sibling the sibling element before which the copy should be inserted or code null code if the copy should be inserted as the last child of the container param rename the new name for the element or code null code if the copy retains the name of this element param replace code true code if any existing child in the container with the target name should be replaced and code false code to throw an exception in the event of a name collision param monitor a progress monitor exception Java Model Exception if this element could not be copied Reasons include ul li This Java element container element or sibling does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating an underlying resource li The container is of an incompatible type INVALID DESTINATION li The sibling is not a child of the given container INVALID SIBLING li The new name is invalid INVALID NAME li A child in the container already exists with the same name NAME COLLISION and code replace code has been specified as code false code li The container or this element is read only READ ONLY ul exception Illegal Argument Exception if container is code null code  ISourceManipulation JavaModelException ELEMENT_DOES_NOT_EXIST CoreException INVALID_DESTINATION INVALID_SIBLING INVALID_NAME NAME_COLLISION READ_ONLY IllegalArgumentException
void copy I Java Element container I Java Element sibling String rename boolean replace I Progress Monitor monitor throws Java Model Exception Deletes this element forcing if specified and necessary param force a flag controlling whether underlying resources that are not in sync with the local file system will be tolerated same as the force flag in I Resource operations param monitor a progress monitor exception Java Model Exception if this element could not be deleted Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating an underlying resource CORE EXCEPTION li li This element is read only READ ONLY li ul  IJavaElement IJavaElement IProgressMonitor JavaModelException IResource JavaModelException ELEMENT_DOES_NOT_EXIST CoreException CORE_EXCEPTION READ_ONLY
void delete boolean force I Progress Monitor monitor throws Java Model Exception Moves this element to the given container param container the container param sibling the sibling element before which the element should be inserted or code null code if the element should be inserted as the last child of the container param rename the new name for the element or code null code if the element retains its name param replace code true code if any existing child in the container with the target name should be replaced and code false code to throw an exception in the event of a name collision param monitor a progress monitor exception Java Model Exception if this element could not be moved Reasons include ul li This Java element container element or sibling does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating an underlying resource li The container is of an incompatible type INVALID DESTINATION li The sibling is not a child of the given container INVALID SIBLING li The new name is invalid INVALID NAME li A child in the container already exists with the same name NAME COLLISION and code replace code has been specified as code false code li The container or this element is read only READ ONLY ul exception Illegal Argument Exception if container is code null code  IProgressMonitor JavaModelException JavaModelException ELEMENT_DOES_NOT_EXIST CoreException INVALID_DESTINATION INVALID_SIBLING INVALID_NAME NAME_COLLISION READ_ONLY IllegalArgumentException
void move I Java Element container I Java Element sibling String rename boolean replace I Progress Monitor monitor throws Java Model Exception Renames this element to the given name param name the new name for the element param replace code true code if any existing element with the target name should be replaced and code false code to throw an exception in the event of a name collision param monitor a progress monitor exception Java Model Exception if this element could not be renamed Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating an underlying resource li The new name is invalid INVALID NAME li A child in the container already exists with the same name NAME COLLISION and code replace code has been specified as code false code li This element is read only READ ONLY ul  IJavaElement IJavaElement IProgressMonitor JavaModelException JavaModelException ELEMENT_DOES_NOT_EXIST CoreException INVALID_NAME NAME_COLLISION READ_ONLY

Returns the number of characters of the source code for this element relative to the source buffer in which this element is contained return the number of characters of the source code for this element relative to the source buffer in which this element is contained 
int get Length Returns the 0 based index of the first character of the source code for this element relative to the source buffer in which this element is contained return the 0 based index of the first character of the source code for this element relative to the source buffer in which this element is contained  getLength

public interface I Source Reference Returns whether this element exists in the model return code true code if this element exists in the Java model since 2 0  ISourceReference
Returns the source code associated with this element This extracts the substring from the source buffer containing this source element This corresponds to the source range that would be returned by code get Source Range code p For class files this returns the source of the entire compilation unit associated with the class file if there is one p return the source code or code null code if this element has no associated source code exception Java Model Exception if an exception occurs while accessing its corresponding resource  getSourceRange JavaModelException
String get Source throws Java Model Exception Returns the source range associated with this element p For class files this returns the range of the entire compilation unit associated with the class file if there is one p return the source range or code null code if this element has no associated source code exception Java Model Exception if an exception occurs while accessing its corresponding resource  getSource JavaModelException JavaModelException

public interface I Type extends I Member Do code completion inside a code snippet in the context of the current type If the type can access to his source code and the insertion position is valid then completion is performed against source Otherwise the completion is performed against type structure and given locals variables param snippet the code snippet param insertion the position with in source where the snippet is inserted This position must not be in comments A possible value is 1 if the position is not known param position the position within snippet where the user is performing code assist param local Variable Type Names an array possibly empty of fully qualified type names of local variables visible at the current scope param local Variable Names an array possibly empty of local variable names that are visible at the current scope param local Variable Modifiers an array possible empty of modifiers for local variables param is Static whether the current scope is in a static context param requestor the completion requestor exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource since 2 0 void code Complete char snippet int insertion int position char local Variable Type Names char local Variable Names int local Variable Modifiers boolean is Static I Completion Requestor requestor  IType IMember localVariableTypeNames localVariableNames localVariableModifiers isStatic JavaModelException codeComplete localVariableTypeNames localVariableNames localVariableModifiers isStatic ICompletionRequestor
Do code completion inside a code snippet in the context of the current type It considers types in the working copies with the given owner first In other words the owner s working copies will take precedence over their original compilation units in the workspace p Note that if a working copy is empty it will be as if the original compilation unit had been deleted p p If the type can access to his source code and the insertion position is valid then completion is performed against source Otherwise the completion is performed against type structure and given locals variables p param snippet the code snippet param insertion the position with in source where the snippet is inserted This position must not be in comments A possible value is 1 if the position is not known param position the position with in snippet where the user is performing code assist param local Variable Type Names an array possibly empty of fully qualified type names of local variables visible at the current scope param local Variable Names an array possibly empty of local variable names that are visible at the current scope param local Variable Modifiers an array possible empty of modifiers for local variables param is Static whether the current scope is in a static context param requestor the completion requestor param owner the owner of working copies that take precedence over their original compilation units exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource since 3 0 void code Complete char snippet int insertion int position char local Variable Type Names char local Variable Names int local Variable Modifiers boolean is Static I Completion Requestor requestor Working Copy Owner owner  localVariableTypeNames localVariableNames localVariableModifiers isStatic JavaModelException codeComplete localVariableTypeNames localVariableNames localVariableModifiers isStatic ICompletionRequestor WorkingCopyOwner
Creates and returns a field in this type with the given contents p Optionally the new element can be positioned before the specified sibling If no sibling is specified the element will be inserted as the last field declaration in this type p p It is possible that a field with the same name already exists in this type The value of the code force code parameter effects the resolution of such a conflict ul li code true code in this case the field is created with the new contents li li code false code in this case a code Java Model Exception code is thrown li ul p param contents the given contents param sibling the given sibling param force a flag in case the same name already exists in this type param monitor the given progress monitor exception Java Model Exception if the element could not be created Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating an underlying resource li The specified sibling is not a child of this type INVALID SIBLING li The contents could not be recognized as a field declaration INVALID CONTENTS li This type is read only binary READ ONLY li There was a naming collision with an existing field NAME COLLISION ul return a field in this type with the given contents I Field create Field String contents I Java Element sibling boolean force I Progress Monitor monitor  JavaModelException JavaModelException ELEMENT_DOES_NOT_EXIST CoreException INVALID_SIBLING INVALID_CONTENTS READ_ONLY NAME_COLLISION IField createField IJavaElement IProgressMonitor
Creates and returns a static initializer in this type with the given contents p Optionally the new element can be positioned before the specified sibling If no sibling is specified the new initializer is positioned after the last existing initializer declaration or as the first member in the type if there are no initializers p param contents the given contents param sibling the given sibling param monitor the given progress monitor exception Java Model Exception if the element could not be created Reasons include ul li This element does not exist li A code Core Exception code occurred while updating an underlying resource li The specified sibling is not a child of this type INVALID SIBLING li The contents could not be recognized as an initializer declaration INVALID CONTENTS li This type is read only binary READ ONLY ul return a static initializer in this type with the given contents I Initializer create Initializer String contents I Java Element sibling I Progress Monitor monitor  JavaModelException CoreException INVALID_SIBLING INVALID_CONTENTS READ_ONLY IInitializer createInitializer IJavaElement IProgressMonitor
Creates and returns a method or constructor in this type with the given contents p Optionally the new element can be positioned before the specified sibling If no sibling is specified the element will be appended to this type p It is possible that a method with the same signature already exists in this type The value of the code force code parameter effects the resolution of such a conflict ul li code true code in this case the method is created with the new contents li li code false code in this case a code Java Model Exception code is thrown li ul p param contents the given contents param sibling the given sibling param force a flag in case the same name already exists in this type param monitor the given progress monitor exception Java Model Exception if the element could not be created Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating an underlying resource li The specified sibling is not a child of this type INVALID SIBLING li The contents could not be recognized as a method or constructor declaration INVALID CONTENTS li This type is read only binary READ ONLY li There was a naming collision with an existing method NAME COLLISION ul return a method or constructor in this type with the given contents I Method create Method String contents I Java Element sibling boolean force I Progress Monitor monitor  JavaModelException JavaModelException ELEMENT_DOES_NOT_EXIST CoreException INVALID_SIBLING INVALID_CONTENTS READ_ONLY NAME_COLLISION IMethod createMethod IJavaElement IProgressMonitor
Creates and returns a type in this type with the given contents p Optionally the new type can be positioned before the specified sibling If no sibling is specified the type will be appended to this type p It is possible that a type with the same name already exists in this type The value of the code force code parameter effects the resolution of such a conflict ul li code true code in this case the type is created with the new contents li li code false code in this case a code Java Model Exception code is thrown li ul p param contents the given contents param sibling the given sibling param force a flag in case the same name already exists in this type param monitor the given progress monitor exception Java Model Exception if the element could not be created Reasons include ul li This Java element does not exist ELEMENT DOES NOT EXIST li li A code Core Exception code occurred while updating an underlying resource li The specified sibling is not a child of this type INVALID SIBLING li The contents could not be recognized as a type declaration INVALID CONTENTS li This type is read only binary READ ONLY li There was a naming collision with an existing field NAME COLLISION ul return a type in this type with the given contents I Type create Type String contents I Java Element sibling boolean force I Progress Monitor monitor  JavaModelException JavaModelException ELEMENT_DOES_NOT_EXIST CoreException INVALID_SIBLING INVALID_CONTENTS READ_ONLY NAME_COLLISION IType createType IJavaElement IProgressMonitor
Finds the methods in this type that correspond to the given method A method m1 corresponds to another method m2 if ul li m1 has the same element name as m2 li m1 has the same number of arguments as m2 and the simple names of the argument types must be equals li m1 exists ul param method the given method return the found method or code null code if no such methods can be found since 2 0 
Returns the simple name of this type unqualified by package or enclosing type This is a handle only method return the simple name of this type 
Returns the field with the specified name in this type for example code bar code This is a handle only method The field may or may not exist param name the given name return the field with the specified name in this type 
Returns the fields declared by this type If this is a source type the results are listed in the order in which they appear in the source otherwise the results are in no particular order For binary types this includes synthetic fields exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the fields declared by this type  JavaModelException
Returns the fully qualified name of this type including qualification for any containing types and packages This is the name of the package followed by code code followed by the type qualified name This is a handle only method see I Type get Type Qualified Name return the fully qualified name of this type  IType getTypeQualifiedName
Returns the fully qualified name of this type including qualification for any containing types and packages This is the name of the package followed by code code followed by the type qualified name using the code enclosing Type Separator code For example ul li the fully qualified name of a class B defined as a member of a class A in a compilation unit A java in a package x y using the separator is x y A B li li the fully qualified name of a class B defined as a member of a class A in a compilation unit A java in a package x y using the separator is x y A B li li the fully qualified name of a binary type whose class file is x y A B class using the separator is x y A B li li the fully qualified name of a binary type whose class file is x y A B class using the separator is x y A B li li the fully qualified name of an anonymous binary type whose class file is x y A 1 class using the separator is x y A 1 li ul This is a handle only method param enclosing Type Separator the given enclosing type separator return the fully qualified name of this type including qualification for any containing types and packages see I Type get Type Qualified Name char since 2 0  enclosingTypeSeparator enclosingTypeSeparator IType getTypeQualifiedName
Returns the initializer with the specified position relative to the order they are defined in the source Numbering starts at 1 thus the first occurrence is occurrence 1 not occurrence 0 This is a handle only method The initializer may or may not be present param occurrence Count the specified position return the initializer with the specified position relative to the order they are defined in the source  occurrenceCount
Returns the initializers declared by this type For binary types this is an empty collection If this is a source type the results are listed in the order in which they appear in the source exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the initializers declared by this type  JavaModelException
Returns the method with the specified name and parameter types in this type for example code foo I Q String code To get the handle for a constructor the name specified must be the simple name of the enclosing type This is a handle only method The method may or may not be present p The type signatures may be either unresolved for source types or resolved for binary types and either basic for basic types or rich for parameterized types See link Signature for details p param name the given name param parameter Type Signatures the given parameter types return the method with the specified name and parameter types in this type  QString parameterTypeSignatures
Returns the methods and constructors declared by this type For binary types this may include the special code lt clinit gt code method and synthetic methods If this is a source type the results are listed in the order in which they appear in the source otherwise the results are in no particular order exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the methods and constructors declared by this type  JavaModelException
Returns the package fragment in which this element is defined This is a handle only method return the package fragment in which this element is defined 
Returns the name of this type s superclass or code null code for source types that do not specify a superclass p For interfaces the superclass name is always code java lang Object code For source types the name as declared is returned for binary types the resolved qualified name is returned For anonymous types the superclass name is the name appearing after the new keyword If the superclass is a parameterized type the string may include its type arguments enclosed in lt gt If the returned string is needed for anything other than display purposes use link get Superclass Type Signature which returns a structured type signature string containing more precise information p exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the name of this type s superclass or code null code for source types that do not specify a superclass  getSuperclassTypeSignature JavaModelException
Returns the type signature of this type s superclass or code null code if none p The type signature may be either unresolved for source types or resolved for binary types and either basic for basic types or rich for parameterized types See link Signature for details p exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the type signature of this type s superclass or code null code if none since 3 0  JavaModelException
Returns the type signatures of the interfaces that this type implements or extends in the order in which they are listed in the source p For classes and enum types this gives the interfaces that this class implements For interfaces and annotation types this gives the interfaces that this interface extends An empty collection is returned if this type does not implement or extend any interfaces For anonymous types an empty collection is always returned p p The type signatures may be either unresolved for source types or resolved for binary types and either basic for basic types or rich for parameterized types See link Signature for details p exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the type signatures of interfaces that this type implements or extends in the order in which they are listed in the source an empty collection if none since 3 0  JavaModelException
Returns the names of interfaces that this type implements or extends in the order in which they are listed in the source p For classes this gives the interfaces that this class implements For interfaces this gives the interfaces that this interface extends An empty collection is returned if this type does not implement or extend any interfaces For source types simple names are returned for binary types qualified names are returned For anonymous types an empty collection is always returned If the list of supertypes includes parameterized types the string may include type arguments enclosed in lt gt If the result is needed for anything other than display purposes use link get Super Interface Type Signatures which returns structured signature strings containing more precise information p exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the names of interfaces that this type implements or extends in the order in which they are listed in the source an empty collection if none  getSuperInterfaceTypeSignatures JavaModelException
Returns the formal type parameter signatures for this type Returns an empty array if this type has no formal type parameters p The formal type parameter signatures may be either unresolved for source types or resolved for binary types See link Signature for details p exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the formal type parameter signatures of this type in the order declared in the source an empty array if none see Signature since 3 0  JavaModelException
Returns the member type declared in this type with the given simple name This is a handle only method The type may or may not exist param name the given simple name return the member type declared in this type with the given simple name 
Returns the type qualified name of this type including qualification for any enclosing types but not including package qualification For source types this consists of the simple names of any enclosing types separated by code code followed by the simple name of this type or the occurence count of this type if it is anonymous For binary types this is the name of the class file without the class suffix This is a handle only method return the type qualified name of this type 
Returns the type qualified name of this type including qualification for any enclosing types but not including package qualification For source types this consists of the simple names of any enclosing types separated by code enclosing Type Separator code followed by the simple name of this type or the occurence count of this type if it is anonymous For binary types this is the name of the class file without the class suffix For example ul li the type qualified name of a class B defined as a member of a class A using the separator is A B li li the type qualified name of a class B defined as a member of a class A using the separator is A B li li the type qualified name of a binary type whose class file is A B class using the separator is A B li li the type qualified name of a binary type whose class file is A B class using the separator is A B li li the type qualified name of an anonymous binary type whose class file is A 1 class using the separator is A 1 li ul This is a handle only method param enclosing Type Separator the specified enclosing type separator return the type qualified name of this type since 2 0  enclosingTypeSeparator enclosingTypeSeparator
Returns the immediate member types declared by this type The results are listed in the order in which they appear in the source or class file exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return the immediate member types declared by this type  JavaModelException
Returns whether this type represents an anonymous type exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return true if this type represents an anonymous type false otherwise since 2 0  JavaModelException
Returns whether this type represents a class p Note that code is Class code code is Interface code code is Enum code and code is Annotation code are mutually exclusive p exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return true if this type represents a class false otherwise  isClass isInterface isEnum isAnnotation JavaModelException
Returns whether this type represents an enumeration class p Note that code is Class code code is Interface code code is Enum code and code is Annotation code are mutually exclusive p exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return true if this type represents an enumeration class false otherwise since 3 0  isClass isInterface isEnum isAnnotation JavaModelException
Returns whether this type represents an interface p Note that code is Class code code is Interface code code is Enum code and code is Annotation code are mutually exclusive p exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return true if this type represents an interface false otherwise  isClass isInterface isEnum isAnnotation JavaModelException
Returns whether this type represents an annotation type p Note that code is Class code code is Interface code code is Enum code and code is Annotation code are mutually exclusive p exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return true if this type represents an annotation type false otherwise since 3 0  isClass isInterface isEnum isAnnotation JavaModelException
Returns whether this type represents a local type exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return true if this type represents a local type false otherwise since 2 0  JavaModelException
Returns whether this type represents a member type exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return true if this type represents a member type false otherwise since 2 0  JavaModelException
boolean is Member throws Java Model Exception Loads a previously saved I Type Hierarchy from an input stream A type hierarchy can be stored using I Type Hierachy store Output Stream Only hierarchies originally created by the following methods can be loaded ul li I Type new Supertype Hierarchy I Progress Monitor li li I Type new Type Hierarchy I Java Project I Progress Monitor li li I Type new Type Hierarchy I Progress Monitor li u param input stream where hierarchy will be read param monitor the given progress monitor return the stored hierarchy exception Java Model Exception if the hierarchy could not be restored reasons include type is not the focus of the hierarchy or unable to read the input stream wrong format IO Exception during reading see I Type Hierarchy store java io Output Stream I Progress Monitor since 2 1  isMember JavaModelException ITypeHierarchy ITypeHierachy OutputStream IType newSupertypeHierarchy IProgressMonitor IType newTypeHierarchy IJavaProject IProgressMonitor IType newTypeHierarchy IProgressMonitor JavaModelException IOException ITypeHierarchy OutputStream IProgressMonitor
I Type Hierarchy load Type Hierachy Input Stream input I Progress Monitor monitor throws Java Model Exception Creates and returns a type hierarchy for this type containing this type and all of its supertypes param monitor the given progress monitor exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return a type hierarchy for this type containing this type and all of its supertypes  ITypeHierarchy loadTypeHierachy InputStream IProgressMonitor JavaModelException JavaModelException
Creates and returns a type hierarchy for this type containing this type and all of its supertypes considering types in the given working copies In other words the list of working copies will take precedence over their original compilation units in the workspace p Note that passing an empty working copy will be as if the original compilation unit had been deleted p param working Copies the working copies that take precedence over their original compilation units param monitor the given progress monitor return a type hierarchy for this type containing this type and all of its supertypes exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource since 3 0 I Type Hierarchy new Supertype Hierarchy I Compilation Unit working Copies I Progress Monitor monitor  workingCopies JavaModelException ITypeHierarchy newSupertypeHierarchy ICompilationUnit workingCopies IProgressMonitor
Creates and returns a type hierarchy for this type containing this type and all of its supertypes considering types in the given working copies In other words the list of working copies will take precedence over their original compilation units in the workspace p Note that passing an empty working copy will be as if the original compilation unit had been deleted p param working Copies the working copies that take precedence over their original compilation units param monitor the given progress monitor return a type hierarchy for this type containing this type and all of its supertypes exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource since 2 0 deprecated use new Supertype Hierarchy I Compilation Unit I Progress Monitor instead I Type Hierarchy new Supertype Hierarchy I Working Copy working Copies I Progress Monitor monitor  workingCopies JavaModelException newSupertypeHierarchy ICompilationUnit IProgressMonitor ITypeHierarchy newSupertypeHierarchy IWorkingCopy workingCopies IProgressMonitor
Creates and returns a type hierarchy for this type containing this type and all of its supertypes considering types in the working copies with the given owner In other words the owner s working copies will take precedence over their original compilation units in the workspace p Note that if a working copy is empty it will be as if the original compilation unit had been deleted p param owner the owner of working copies that take precedence over their original compilation units param monitor the given progress monitor return a type hierarchy for this type containing this type and all of its supertypes exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource since 3 0 I Type Hierarchy new Supertype Hierarchy Working Copy Owner owner I Progress Monitor monitor  JavaModelException ITypeHierarchy newSupertypeHierarchy WorkingCopyOwner IProgressMonitor
Creates and returns a type hierarchy for this type containing this type all of its supertypes and all its subtypes in the context of the given project param project the given project param monitor the given progress monitor exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return a type hierarchy for this type containing this type all of its supertypes and all its subtypes in the context of the given project  JavaModelException
Creates and returns a type hierarchy for this type containing this type all of its supertypes and all its subtypes in the context of the given project considering types in the working copies with the given owner In other words the owner s working copies will take precedence over their original compilation units in the workspace p Note that if a working copy is empty it will be as if the original compilation unit had been deleted p param project the given project param owner the owner of working copies that take precedence over their original compilation units param monitor the given progress monitor exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return a type hierarchy for this type containing this type all of its supertypes and all its subtypes in the context of the given project since 3 0  JavaModelException
Creates and returns a type hierarchy for this type containing this type all of its supertypes and all its subtypes in the workspace param monitor the given progress monitor exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return a type hierarchy for this type containing this type all of its supertypes and all its subtypes in the workspace  JavaModelException
Creates and returns a type hierarchy for this type containing this type all of its supertypes and all its subtypes in the workspace considering types in the given working copies In other words the list of working copies that will take precedence over their original compilation units in the workspace p Note that passing an empty working copy will be as if the original compilation unit had been deleted param working Copies the working copies that take precedence over their original compilation units param monitor the given progress monitor return a type hierarchy for this type containing this type all of its supertypes and all its subtypes in the workspace exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource since 3 0  workingCopies JavaModelException
Creates and returns a type hierarchy for this type containing this type all of its supertypes and all its subtypes in the workspace considering types in the given working copies In other words the list of working copies that will take precedence over their original compilation units in the workspace p Note that passing an empty working copy will be as if the original compilation unit had been deleted param working Copies the working copies that take precedence over their original compilation units param monitor the given progress monitor return a type hierarchy for this type containing this type all of its supertypes and all its subtypes in the workspace exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource since 2 0 deprecated use new Type Hierarchy I Compilation Unit I Progress Monitor instead  workingCopies JavaModelException newTypeHierarchy ICompilationUnit IProgressMonitor
Creates and returns a type hierarchy for this type containing this type all of its supertypes and all its subtypes in the workspace considering types in the working copies with the given owner In other words the owner s working copies will take precedence over their original compilation units in the workspace p Note that if a working copy is empty it will be as if the original compilation unit had been deleted p param owner the owner of working copies that take precedence over their original compilation units param monitor the given progress monitor return a type hierarchy for this type containing this type all of its supertypes and all its subtypes in the workspace exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource since 3 0  JavaModelException
Resolves the given type name within the context of this type depending on the type hierarchy and its imports p Multiple answers might be found in case there are ambiguous matches p p Each matching type name is decomposed as an array of two strings the first denoting the package name dot separated and the second being the type name The package name is empty if it is the default package The type name is the type qualified name using a enclosing type separator p p Returns code null code if unable to find any matching type p p For example resolution of code Object code would typically return code java lang Object code Another resolution that returns code X Inner code represents the inner type Inner defined in type X in the default package p param type Name the given type name exception Java Model Exception if code resolve could not be performed return the resolved type names or code null code if unable to find any matching type see get Type Qualified Name char  typeName JavaModelException getTypeQualifiedName
Resolves the given type name within the context of this type depending on the type hierarchy and its imports and using the given owner s working copies considering types in the working copies with the given owner In other words the owner s working copies will take precedence over their original compilation units in the workspace p Note that if a working copy is empty it will be as if the original compilation unit had been deleted p p Multiple answers might be found in case there are ambiguous matches p p Each matching type name is decomposed as an array of two strings the first denoting the package name dot separated and the second being the type name The package name is empty if it is the default package The type name is the type qualified name using a enclosing type separator p p Returns code null code if unable to find any matching type p p For example resolution of code Object code would typically return code java lang Object code Another resolution that returns code X Inner code represents the inner type Inner defined in type X in the default package p param type Name the given type name param owner the owner of working copies that take precedence over their original compilation units exception Java Model Exception if code resolve could not be performed return the resolved type names or code null code if unable to find any matching type see get Type Qualified Name char since 3 0  typeName JavaModelException getTypeQualifiedName

public interface I Type Hierarchy Adds the given listener for changes to this type hierarchy Listeners are notified when this type hierarchy changes and needs to be refreshed Has no effect if an identical listener is already registered param listener the listener  ITypeHierarchy
void add Type Hierarchy Changed Listener I Type Hierarchy Changed Listener listener Returns whether the given type is part of this hierarchy param type the given type return true if the given type is part of this hierarchy false otherwise  addTypeHierarchyChangedListener ITypeHierarchyChangedListener
boolean contains I Type type Returns whether the type and project this hierarchy was created on exist return true if the type and project this hierarchy was created on exist false otherwise  IType
boolean exists Returns all classes in this type hierarchy s graph in no particular order Any classes in the creation region which were not resolved to have any subtypes or supertypes are not included in the result return all classes in this type hierarchy s graph 
I Type get All Classes Returns all interfaces in this type hierarchy s graph in no particular order Any interfaces in the creation region which were not resolved to have any subtypes or supertypes are not included in the result return all interfaces in this type hierarchy s graph  IType getAllClasses
I Type get All Interfaces Returns all resolved subtypes direct and indirect of the given type in no particular order limited to the types in this type hierarchy s graph An empty array is returned if there are no resolved subtypes for the given type param type the given type return all resolved subtypes direct and indirect of the given type  IType getAllInterfaces
I Type get All Subtypes I Type type Returns all resolved superclasses of the given class in bottom up order An empty array is returned if there are no resolved superclasses for the given class p NOTE once a type hierarchy has been created it is more efficient to query the hierarchy for superclasses than to query a class recursively up the superclass chain Querying an element performs a dynamic resolution whereas the hierarchy returns a pre computed result param type the given type return all resolved superclasses of the given class in bottom up order an empty array if none  IType getAllSubtypes IType
I Type get All Superclasses I Type type Returns all resolved superinterfaces direct and indirect of the given type If the given type is a class this includes all superinterfaces of all superclasses An empty array is returned if there are no resolved superinterfaces for the given type p NOTE once a type hierarchy has been created it is more efficient to query the hierarchy for superinterfaces than to query a type recursively Querying an element performs a dynamic resolution whereas the hierarchy returns a pre computed result param type the given type return all resolved superinterfaces direct and indirect of the given type an empty array if none  IType getAllSuperclasses IType
I Type get All Super Interfaces I Type type Returns all resolved supertypes of the given type in bottom up order An empty array is returned if there are no resolved supertypes for the given type p Note that code java lang Object code is NOT considered to be a supertype of any interface type p p NOTE once a type hierarchy has been created it is more efficient to query the hierarchy for supertypes than to query a type recursively up the supertype chain Querying an element performs a dynamic resolution whereas the hierarchy returns a pre computed result param type the given type return all resolved supertypes of the given class in bottom up order an empty array if none  IType getAllSuperInterfaces IType
I Type get All Supertypes I Type type Returns all types in this type hierarchy s graph in no particular order Any types in the creation region which were not resolved to have any subtypes or supertypes are not included in the result return all types in this type hierarchy s grap  IType getAllSupertypes IType
Return the flags associated with the given type would be equivalent to code I Member get Flags code or code 1 code if this information wasn t cached on the hierarchy during its computation param type the given type return the modifier flags for this member see Flags since 2 0  IMember getFlags
Returns all interfaces resolved to extend the given interface in no particular order limited to the interfaces in this hierarchy s graph Returns an empty collection if the given type is a class or if no interfaces were resolved to extend the given interface param type the given type return all interfaces resolved to extend the given interface limited to the interfaces in this hierarchy s graph an empty array if none 
I Type get Extending Interfaces I Type type Returns all classes resolved to implement the given interface in no particular order limited to the classes in this type hierarchy s graph Returns an empty collection if the given type is a class or if no classes were resolved to implement the given interface param type the given type return all classes resolved to implement the given interface limited to the classes in this type hierarchy s graph an empty array if none  IType getExtendingInterfaces IType
I Type get Implementing Classes I Type type Returns all classes in the graph which have no resolved superclass in no particular order return all classes in the graph which have no resolved superclass  IType getImplementingClasses IType
I Type get Root Classes Returns all interfaces in the graph which have no resolved superinterfaces in no particular order return all interfaces in the graph which have no resolved superinterfaces  IType getRootClasses
I Type get Root Interfaces Returns the direct resolved subclasses of the given class in no particular order limited to the classes in this type hierarchy s graph Returns an empty collection if the given type is an interface or if no classes were resolved to be subclasses of the given class param type the given type return the direct resolved subclasses of the given class limited to the classes in this type hierarchy s graph an empty collection if none  IType getRootInterfaces
I Type get Subclasses I Type type Returns the direct resolved subtypes of the given type in no particular order limited to the types in this type hierarchy s graph If the type is a class this returns the resolved subclasses If the type is an interface this returns both the classes which implement the interface and the interfaces which extend it param type the given type return the direct resolved subtypes of the given type limited to the types in this type hierarchy s graph  IType getSubclasses IType
I Type get Subtypes I Type type Returns the resolved superclass of the given class or code null code if the given class has no superclass the superclass could not be resolved or if the given type is an interface param type the given type return the resolved superclass of the given class or code null code if the given class has no superclass the superclass could not be resolved or if the given type is an interface  IType getSubtypes IType
I Type get Superclass I Type type Returns the direct resolved interfaces that the given type implements or extends in no particular order limited to the interfaces in this type hierarchy s graph For classes this gives the interfaces that the class implements For interfaces this gives the interfaces that the interface extends param type the given type return the direct resolved interfaces that the given type implements or extends limited to the interfaces in this type hierarchy s graph  IType getSuperclass IType
I Type get Super Interfaces I Type type Returns the resolved supertypes of the given type in no particular order limited to the types in this type hierarchy s graph For classes this returns its superclass and the interfaces that the class implements For interfaces this returns the interfaces that the interface extends As a consequence code java lang Object code is NOT considered to be a supertype of any interface type param type the given type return the resolved supertypes of the given type limited to the types in this type hierarchy s graph  IType getSuperInterfaces IType
I Type get Supertypes I Type type Returns the type this hierarchy was computed for Returns code null code if this hierarchy was computed for a region return the type this hierarchy was computed for  IType getSupertypes IType
I Type get Type Re computes the type hierarchy reporting progress param monitor the given progress monitor exception Java Model Exception if unable to refresh the hierarchy  IType getType JavaModelException
void refresh I Progress Monitor monitor throws Java Model Exception Removes the given listener from this type hierarchy Has no affect if an identical listener is not registered param listener the listener  IProgressMonitor JavaModelException
void remove Type Hierarchy Changed Listener I Type Hierarchy Changed Listener listener Stores the type hierarchy in an output stream This stored hierarchy can be load by I Type load Type Hierachy I Java Project Input Stream I Progress Monitor Listeners of this hierarchy are not stored Only hierarchies created by the following methods can be store ul li I Type new Supertype Hierarchy I Progress Monitor li li I Type new Type Hierarchy I Java Project I Progress Monitor li li I Type new Type Hierarchy I Progress Monitor li u param output Stream output stream where the hierarchy will be stored param monitor the given progress monitor exception Java Model Exception if unable to store the hierarchy in the ouput stream see I Type load Type Hierachy java io Input Stream I Progress Monitor since 2 1  removeTypeHierarchyChangedListener ITypeHierarchyChangedListener IType loadTypeHierachy IJavaProject InputStream IProgressMonitor IType newSupertypeHierarchy IProgressMonitor IType newTypeHierarchy IJavaProject IProgressMonitor IType newTypeHierarchy IProgressMonitor outputStream JavaModelException IType loadTypeHierachy InputStream IProgressMonitor

public interface I Type Hierarchy Changed Listener Notifies that the given type hierarchy has changed in some way and should be refreshed at some point to make it consistent with the current state of the Java model param type Hierarchy the given type hierarchy  ITypeHierarchyChangedListener typeHierarchy

Commits the contents of this working copy to its original element and underlying resource bringing the Java model up to date with the current contents of the working copy p It is possible that the contents of the original resource have changed since this working copy was created in which case there is an update conflict The value of the code force code parameter effects the resolution of such a conflict ul li code true code in this case the contents of this working copy are applied to the underlying resource even though this working copy was created before a subsequent change in the resource li li code false code in this case a code Java Model Exception code is thrown li ul p Since 2 1 a working copy can be created on a not yet existing compilation unit In particular such a working copy can then be committed in order to create the corresponding compilation unit p param force a flag to handle the cases when the contents of the original resource have changed since this working copy was created param monitor the given progress monitor exception Java Model Exception if this working copy could not commit Reasons include ul li A code Core Exception code occurred while updating an underlying resource li This element is not a working copy INVALID ELEMENT TYPES li A update conflict described above UPDATE CONFLICT ul  JavaModelException JavaModelException CoreException INVALID_ELEMENT_TYPES UPDATE_CONFLICT
Destroys this working copy closing its buffer and discarding its structure Subsequent attempts to access non handle information for this working copy will result in code I Java Model Exception code s Has no effect if this element is not a working copy p If this working copy is shared it is destroyed only when the number of calls to code destroy code is the same as the number of calls to code get Shared Working Copy I Progress Monitor I Buffer Factory code p p When it is destroyed a REMOVED I Java Element Delta is reported on this working copy p  IJavaModelException getSharedWorkingCopy IProgressMonitor IBufferFactory IJavaElementDelta
Finds the shared working copy for this element given a code I Buffer code factory If no working copy has been created for this element associated with this buffer factory returns code null code p Users of this method must not destroy the resulting working copy param buffer Factory the given code I Buffer code factory return the found shared working copy for this element code null code if none see I Buffer Factory since 2 0  IBuffer bufferFactory IBuffer IBufferFactory
Returns the original element the specified working copy element was created from or code null code if this is not a working copy element This is a handle only method the returned element may or may not exist param working Copy Element the specified working copy element return the original element the specified working copy element was created from or code null code if this is not a working copy element  workingCopyElement
Returns the original element this working copy was created from or code null code if this is not a working copy return the original element this working copy was created from or code null code if this is not a working copy 
Finds the elements in this compilation unit that correspond to the given element An element A corresponds to an element B if ul li A has the same element name as B li If A is a method A must have the same number of arguments as B and the simple names of the argument types must be equals li The parent of A corresponds to the parent of B recursively up to their respective compilation units li A exists ul Returns code null code if no such java elements can be found or if the given element is not included in a compilation unit param element the given element return the found elements in this compilation unit that correspond to the given element since 2 0 
Finds the primary type of this compilation unit that is the type with the same name as the compilation unit or code null code if no such a type exists return the found primary type of this compilation unit or code null code if no such a type exists since 2 0 
Returns a shared working copy on this element using the given factory to create the buffer or this element if this element is already a working copy This API can only answer an already existing working copy if it is based on the same original compilation unit AND was using the same buffer factory that is as defined by code Object equals code p The life time of a shared working copy is as follows ul li The first call to code get Shared Working Copy code creates a new working copy for this element li li Subsequent calls increment an internal counter li li A call to code destroy code decrements the internal counter li li When this counter is 0 the working copy is destroyed ul So users of this method must destroy exactly once the working copy p Note that the buffer factory will be used for the life time of this working copy that is if the working copy is closed then reopened this factory will be used The buffer will be automatically initialized with the original s compilation unit content upon creation p When the shared working copy instance is created an ADDED I Java Element Delta is reported on this working copy param monitor a progress monitor used to report progress while opening this compilation unit or code null code if no progress should be reported param factory the factory that creates a buffer that is used to get the content of the working copy or code null code if the internal factory should be used param problem Requestor a requestor which will get notified of problems detected during reconciling as they are discovered The requestor can be set to code null code indicating that the client is not interested in problems exception Java Model Exception if the contents of this element can not be determined return a shared working copy on this element using the given factory to create the buffer or this element if this element is already a working copy see I Buffer Factory see I Problem Requestor since 2 0 I Java Element get Shared Working Copy I Progress Monitor monitor I Buffer Factory factory I Problem Requestor problem Requestor  getSharedWorkingCopy IJavaElementDelta problemRequestor JavaModelException IBufferFactory IProblemRequestor IJavaElement getSharedWorkingCopy IProgressMonitor IBufferFactory IProblemRequestor problemRequestor
Returns a new working copy of this element if this element is not a working copy or this element if this element is already a working copy p Note if intending to share a working copy amongst several clients then code get Shared Working Copy code should be used instead p p When the working copy instance is created an ADDED I Java Element Delta is reported on this working copy p p Since 2 1 a working copy can be created on a not yet existing compilation unit In particular such a working copy can then be committed in order to create the corresponding compilation unit p exception Java Model Exception if the contents of this element can not be determined return a new working copy of this element if this element is not a working copy or this element if this element is already a working copy  getSharedWorkingCopy IJavaElementDelta JavaModelException
Returns a new working copy of this element using the given factory to create the buffer or this element if this element is already a working copy Note that this factory will be used for the life time of this working copy that is if the working copy is closed then reopened this factory will be reused The buffer will be automatically initialized with the original s compilation unit content upon creation p Note if intending to share a working copy amongst several clients then code get Shared Working Copy code should be used instead p p When the working copy instance is created an ADDED I Java Element Delta is reported on this working copy p p Since 2 1 a working copy can be created on a not yet existing compilation unit In particular such a working copy can then be committed in order to create the corresponding compilation unit p param monitor a progress monitor used to report progress while opening this compilation unit or code null code if no progress should be reported param factory the factory that creates a buffer that is used to get the content of the working copy or code null code if the internal factory should be used param problem Requestor a requestor which will get notified of problems detected during reconciling as they are discovered The requestor can be set to code null code indicating that the client is not interested in problems exception Java Model Exception if the contents of this element can not be determined return a new working copy of this element using the given factory to create the buffer or this element if this element is already a working copy since 2 0 I Java Element get Working Copy I Progress Monitor monitor I Buffer Factory factory I Problem Requestor problem Requestor  getSharedWorkingCopy IJavaElementDelta problemRequestor JavaModelException IJavaElement getWorkingCopy IProgressMonitor IBufferFactory IProblemRequestor problemRequestor
Returns whether this working copy s original element s content has not changed since the inception of this working copy param resource this working copy s resource return true if this working copy s original element s content has not changed since the inception of this working copy false otherwise 
Returns whether this element is a working copy return true if this element is a working copy false otherwise 
Reconciles the contents of this working copy It performs the reconciliation by locally caching the contents of the working copy updating the contents then creating a delta over the cached contents and the new contents and finally firing this delta p If the working copy hasn t changed then no problem will be detected this is equivalent to code I Working Copy reconcile false null code p p Compilation problems found in the new contents are notified through the code I Problem Requestor code interface which was passed at creation and no longer as transient markers Therefore this API will return code null code p p Note Since 3 0 added removed changed inner types generate change deltas p exception Java Model Exception if the contents of the original element cannot be accessed Reasons include ul li The original Java element does not exist ELEMENT DOES NOT EXIST li ul return code null code  IWorkingCopy IProblemRequestor JavaModelException ELEMENT_DOES_NOT_EXIST
Reconciles the contents of this working copy It performs the reconciliation by locally caching the contents of the working copy updating the contents then creating a delta over the cached contents and the new contents and finally firing this delta p The boolean argument allows to force problem detection even if the working copy is already consistent p p Compilation problems found in the new contents are notified through the code I Problem Requestor code interface which was passed at creation and no longer as transient markers Therefore this API answers nothing p p Note Since 3 0 added removed changed inner types generate change deltas p param force Problem Detection boolean indicating whether problem should be recomputed even if the source hasn t changed param monitor a progress monitor exception Java Model Exception if the contents of the original element cannot be accessed Reasons include ul li The original Java element does not exist ELEMENT DOES NOT EXIST li ul since 2 0  IProblemRequestor forceProblemDetection JavaModelException ELEMENT_DOES_NOT_EXIST
Restores the contents of this working copy to the current contents of this working copy s original element Has no effect if this element is not a working copy p Note This is the inverse of committing the content of the working copy to the original element with code commit boolean I Progress Monitor code exception Java Model Exception if the contents of the original element cannot be accessed Reasons include ul li The original Java element does not exist ELEMENT DOES NOT EXIST li ul  IProgressMonitor JavaModelException ELEMENT_DOES_NOT_EXIST

private final static Scanner SCANNER new Scanner private Java Conventions Not instantiable  JavaConventions
Returns whether the given package fragment root paths are considered to overlap p Two root paths overlap if one is a prefix of the other or they point to the same location However a JAR is allowed to be nested in a root param root Path1 the first root path param root Path2 the second root path return true if the given package fragment root paths are considered to overlap false otherwise deprecated Overlapping roots are allowed in 2 1 public static boolean is Overlapping Roots I Path root Path1 I Path root Path2 if root Path1 null root Path2 null return false String extension1 root Path1 get File Extension String extension2 root Path2 get File Extension if extension1 null extension1 equals Ignore Case Suffix Constants EXTENSION JAR extension1 equals Ignore Case Suffix Constants EXTENSION ZIP return false if extension2 null extension2 equals Ignore Case Suffix Constants EXTENSION JAR extension2 equals Ignore Case Suffix Constants EXTENSION ZIP return false return root Path1 is Prefix Of root Path2 root Path2 is Prefix Of root Path1  rootPath1 rootPath2 isOverlappingRoots IPath rootPath1 IPath rootPath2 rootPath1 rootPath2 rootPath1 getFileExtension rootPath2 getFileExtension equalsIgnoreCase SuffixConstants EXTENSION_JAR equalsIgnoreCase SuffixConstants EXTENSION_ZIP equalsIgnoreCase SuffixConstants EXTENSION_JAR equalsIgnoreCase SuffixConstants EXTENSION_ZIP rootPath1 isPrefixOf rootPath2 rootPath2 isPrefixOf rootPath1
private static synchronized char scanned Identifier String id if id null return null String trimmed id trim if trimmed equals id return null try SCANNER set Source id to Char Array int token SCANNER get Next Token char current Identifier try current Identifier SCANNER get Current Identifier Source catch Array Index Out Of Bounds Exception e return null int next Token SCANNER get Next Token if token Terminal Tokens Token Name Identifier next Token Terminal Tokens Token NameEOF SCANNER start Position SCANNER source length to handle case where we had an Array Index Out Of Bounds Exception while reading the last token return current Identifier else return null catch Invalid Input Exception e return null  scannedIdentifier setSource toCharArray getNextToken currentIdentifier currentIdentifier getCurrentIdentifierSource ArrayIndexOutOfBoundsException nextToken getNextToken TerminalTokens TokenNameIdentifier nextToken TerminalTokens TokenNameEOF startPosition ArrayIndexOutOfBoundsException currentIdentifier InvalidInputException
Validate the given compilation unit name A compilation unit name must obey the following rules ul li it must not be null li it must include the code java code suffix li its prefix must be a valid identifier li it must not contain any characters or substrings that are not valid on the file system on which workspace root is located ul p param name the name of a compilation unit return a status object with code code I Status OK code if the given name is valid as a compilation unit name otherwise a status object indicating what is wrong with the name public static I Status validate Compilation Unit Name String name if name null return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention unit null Name null NON NLS 1 if org eclipse jdt internal compiler util Util is Java File Name name return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention unit not Java Name null NON NLS 1 String identifier int index index name last Index Of if index 1 return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention unit not Java Name null NON NLS 1 identifier name substring 0 index JSR 175 metadata strongly recommends package info java as the file in which to store package annotations and the package level spec replaces package html if identifier equals package info NON NLS 1 I Status status validate Identifier identifier if status isOK return status I Status status Resources Plugin get Workspace validate Name name I Resource FILE if status isOK return status return Java Model Status VERIFIED OK  IStatus IStatus validateCompilationUnitName IStatus JavaCore PLUGIN_ID nullName isJavaFileName IStatus JavaCore PLUGIN_ID notJavaName lastIndexOf IStatus JavaCore PLUGIN_ID notJavaName IStatus validateIdentifier IStatus ResourcesPlugin getWorkspace validateName IResource JavaModelStatus VERIFIED_OK
Validate the given class file name A class file name must obey the following rules ul li it must not be null li it must include the code class code suffix li its prefix must be a valid identifier li it must not contain any characters or substrings that are not valid on the file system on which workspace root is located ul p param name the name of a class file return a status object with code code I Status OK code if the given name is valid as a class file name otherwise a status object indicating what is wrong with the name since 2 0 public static I Status validate Class File Name String name if name null return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention class File null Name null NON NLS 1 if org eclipse jdt internal compiler util Util is Class File Name name return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention class File not Class File Name null NON NLS 1 String identifier int index index name last Index Of if index 1 return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention class File not Class File Name null NON NLS 1 identifier name substring 0 index I Status status validate Identifier identifier if status isOK return status status Resources Plugin get Workspace validate Name name I Resource FILE if status isOK return status return Java Model Status VERIFIED OK  IStatus IStatus validateClassFileName IStatus JavaCore PLUGIN_ID classFile nullName isClassFileName IStatus JavaCore PLUGIN_ID classFile notClassFileName lastIndexOf IStatus JavaCore PLUGIN_ID classFile notClassFileName IStatus validateIdentifier ResourcesPlugin getWorkspace validateName IResource JavaModelStatus VERIFIED_OK
Validate the given field name p Syntax of a field name corresponds to Variable Declarator Id JLS2 8 3 For example code x code param name the name of a field return a status object with code code I Status OK code if the given name is valid as a field name otherwise a status object indicating what is wrong with the name public static I Status validate Field Name String name return validate Identifier name  VariableDeclaratorId IStatus IStatus validateFieldName validateIdentifier
Validate the given Java identifier The identifier must not have the same spelling as a Java keyword boolean literal code true code code false code or null literal code null code See section 3 8 of the em Java Language Specification Second Edition em JLS2 A valid identifier can act as a simple type name method name or field name param id the Java identifier return a status object with code code I Status OK code if the given identifier is a valid Java identifier otherwise a status object indicating what is wrong with the identifier public static I Status validate Identifier String id if scanned Identifier id null return Java Model Status VERIFIED OK else return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention illegal Identifier id null NON NLS 1  IStatus IStatus validateIdentifier scannedIdentifier JavaModelStatus VERIFIED_OK IStatus JavaCore PLUGIN_ID illegalIdentifier
Validate the given import declaration name p The name of an import corresponds to a fully qualified type name or an on demand package name as defined by Import Declaration JLS2 7 5 For example code java util code or code java util Hashtable code param name the import declaration return a status object with code code I Status OK code if the given name is valid as an import declaration otherwise a status object indicating what is wrong with the name public static I Status validate Import Declaration String name if name null name length 0 return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention import null Import null NON NLS 1 if name char At name length 1 if name char At name length 2 return validate Package Name name substring 0 name length 2 else return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention import unqualified Import null NON NLS 1 return validate Package Name name  ImportDeclaration IStatus IStatus validateImportDeclaration IStatus JavaCore PLUGIN_ID nullImport charAt charAt validatePackageName IStatus JavaCore PLUGIN_ID unqualifiedImport validatePackageName
Validate the given Java type name either simple or qualified For example code java lang Object code or code Object code p param name the name of a type return a status object with code code I Status OK code if the given name is valid as a Java type name a status with code code I Status WARNING code indicating why the given name is discouraged otherwise a status object indicating what is wrong with the name public static I Status validate Java Type Name String name if name null return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention type null Name null NON NLS 1 String trimmed name trim if name equals trimmed return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention type name With Blanks null NON NLS 1 int index name last Index Of char scannedID if index 1 simple name scannedID scanned Identifier name else qualified name String pkg name substring 0 index trim I Status status validate Package Name pkg if status isOK return status String type name substring index 1 trim scannedID scanned Identifier type if scannedID null I Status status Resources Plugin get Workspace validate Name new String scannedID I Resource FILE if status isOK return status if Char Operation contains scannedID return new Status I Status WARNING Java Core PLUGIN ID 1 Util bind convention type dollar Name null NON NLS 1 if scannedID length 0 Character is Lower Case scannedID 0 return new Status I Status WARNING Java Core PLUGIN ID 1 Util bind convention type lowercase Name null NON NLS 1 return Java Model Status VERIFIED OK else return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention type invalid Name name null NON NLS 1  IStatus IStatus IStatus validateJavaTypeName IStatus JavaCore PLUGIN_ID nullName IStatus JavaCore PLUGIN_ID nameWithBlanks lastIndexOf scannedIdentifier IStatus validatePackageName scannedIdentifier IStatus ResourcesPlugin getWorkspace validateName IResource CharOperation IStatus JavaCore PLUGIN_ID dollarName isLowerCase IStatus JavaCore PLUGIN_ID lowercaseName JavaModelStatus VERIFIED_OK IStatus JavaCore PLUGIN_ID invalidName
Validate the given method name The special names lt init gt and lt clinit gt are not valid p The syntax for a method name is defined by Identifier of Method Declarator JLS2 8 4 For example println param name the name of a method return a status object with code code I Status OK code if the given name is valid as a method name otherwise a status object indicating what is wrong with the name public static I Status validate Method Name String name return validate Identifier name  MethodDeclarator IStatus IStatus validateMethodName validateIdentifier
Validate the given package name p The syntax of a package name corresponds to Package Name as defined by Package Declaration JLS2 7 4 For example code java lang code p Note that the given name must be a non empty package name that is attempting to validate the default package will return an error status Also it must not contain any characters or substrings that are not valid on the file system on which workspace root is located param name the name of a package return a status object with code code I Status OK code if the given name is valid as a package name otherwise a status object indicating what is wrong with the name public static I Status validate Package Name String name if name null return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention package null Name null NON NLS 1 int length if length name length 0 return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention package empty Name null NON NLS 1 if name char At 0 DOT name char At length 1 DOT return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention package dot Name null NON NLS 1 if Char Operation is Whitespace name char At 0 Char Operation is Whitespace name char At name length 1 return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention package name With Blanks null NON NLS 1 int dot 0 while dot 1 dot length 1 if dot name index Of DOT dot 1 1 dot length 1 name char At dot 1 DOT return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention package consecutive Dots Name null NON NLS 1 I Workspace workspace Resources Plugin get Workspace String Tokenizer st new String Tokenizer name new String new char DOT boolean first Token true while st has More Tokens String type Name st next Token type Name type Name trim grammar allows spaces char scannedID scanned Identifier type Name if scannedID null return new Status I Status ERROR Java Core PLUGIN ID 1 Util bind convention illegal Identifier type Name null NON NLS 1 I Status status workspace validate Name new String scannedID I Resource FOLDER if status isOK return status if first Token scannedID length 0 Character is Upper Case scannedID 0 return new Status I Status WARNING Java Core PLUGIN ID 1 Util bind convention package uppercase Name null NON NLS 1 first Token false return Java Model Status VERIFIED OK  PackageName PackageDeclaration IStatus IStatus validatePackageName IStatus JavaCore PLUGIN_ID nullName IStatus JavaCore PLUGIN_ID emptyName charAt charAt IStatus JavaCore PLUGIN_ID dotName CharOperation isWhitespace charAt CharOperation isWhitespace charAt IStatus JavaCore PLUGIN_ID nameWithBlanks indexOf charAt IStatus JavaCore PLUGIN_ID consecutiveDotsName IWorkspace ResourcesPlugin getWorkspace StringTokenizer StringTokenizer firstToken hasMoreTokens typeName nextToken typeName typeName scannedIdentifier typeName IStatus JavaCore PLUGIN_ID illegalIdentifier typeName IStatus validateName IResource firstToken isUpperCase IStatus JavaCore PLUGIN_ID uppercaseName firstToken JavaModelStatus VERIFIED_OK
Validate a given classpath and output location for a project using the following rules ul li Classpath entries cannot collide with each other that is all entry paths must be unique li The project output location path cannot be null must be absolute and located inside the project li Specific output locations specified on source entries can be null if not they must be located inside the project li A project entry cannot refer to itself directly that is a project cannot prerequisite itself li Classpath entries or output locations cannot coincidate or be nested in each other except for the following scenarii listed below ul li A source folder can coincidate with its own output location in which case this output can then contain library archives However a specific output location cannot coincidate with any library or a distinct source folder than the one referring to it li li A source library folder can be nested in any source folder as long as the nested folder is excluded from the enclosing one li li An output location can be nested in a source folder if the source folder coincidates with the project itself or if the output location is excluded from the source folder ul ul Note that the classpath entries are not validated automatically Only bound variables or containers are considered in the checking process this allows to perform a consistency check on a classpath which has references to yet non existing projects folders p This validation is intended to anticipate classpath issues prior to assigning it to a project In particular it will automatically be performed during the classpath setting operation if validation fails the classpath setting will not complete p param java Project the given java project param raw Classpath the given classpath param project Output Location the given output location return a status object with code code I Status OK code if the given classpath and output location are compatible otherwise a status object indicating what is wrong with the classpath or output location since 2 0 public static I Java Model Status validate Classpath I Java Project java Project I Classpath Entry raw Classpath I Path project Output Location return Classpath Entry validate Classpath java Project raw Classpath project Output Location  javaProject rawClasspath projectOutputLocation IStatus IJavaModelStatus validateClasspath IJavaProject javaProject IClasspathEntry rawClasspath IPath projectOutputLocation ClasspathEntry validateClasspath javaProject rawClasspath projectOutputLocation
Returns a Java model status describing the problem related to this classpath entry if any a status object with code code I Status OK code if the entry is fine that is if the given classpath entry denotes a valid element to be referenced onto a classpath param project the given java project param entry the given classpath entry param check Source Attachment a flag to determine if source attachement should be checked return a java model status describing the problem related to this classpath entry if any a status object with code code I Status OK code if the entry is fine since 2 0 public static I Java Model Status validate Classpath Entry I Java Project project I Classpath Entry entry boolean check Source Attachment return Classpath Entry validate Classpath Entry project entry check Source Attachment true recurse in container  IStatus checkSourceAttachment IStatus IJavaModelStatus validateClasspathEntry IJavaProject IClasspathEntry checkSourceAttachment ClasspathEntry validateClasspathEntry checkSourceAttachment

Creates the Java core plug in p The plug in instance is created automatically by the Eclipse platform Clients must not call p since 3 0 public Java Core super JAVA CORE PLUGIN this  JavaCore JAVA_CORE_PLUGIN
Adds the given listener for changes to Java elements Has no effect if an identical listener is already registered This listener will only be notified during the POST CHANGE resource change notification and any reconcile operation POST RECONCILE For finer control of the notification use code add Element Changed Listener I Element Changed Listener int code which allows to specify a different event Mask param listener the listener see Element Changed Event public static void add Element Changed Listener I Element Changed Listener listener add Element Changed Listener listener Element Changed Event POST CHANGE Element Changed Event POST RECONCILE  POST_CHANGE POST_RECONCILE addElementChangedListener IElementChangedListener eventMask ElementChangedEvent addElementChangedListener IElementChangedListener addElementChangedListener ElementChangedEvent POST_CHANGE ElementChangedEvent POST_RECONCILE
Adds the given listener for changes to Java elements Has no effect if an identical listener is already registered After completion of this method the given listener will be registered for exactly the specified events If they were previously registered for other events they will be deregistered p Once registered a listener starts receiving notification of changes to java elements in the model The listener continues to receive notifications until it is replaced or removed p p Listeners can listen for several types of event as defined in code Element Change Event code Clients are free to register for any number of event types however if they register for more than one it is their responsibility to ensure they correctly handle the case where the same java element change shows up in multiple notifications Clients are guaranteed to receive only the events for which they are registered p param listener the listener param event Mask the bit wise OR of all event types of interest to the listener see I Element Changed Listener see Element Changed Event see remove Element Changed Listener I Element Changed Listener since 2 0 public static void add Element Changed Listener I Element Changed Listener listener int event Mask Java Model Manager get Java Model Manager delta State add Element Changed Listener listener event Mask  ElementChangeEvent eventMask IElementChangedListener ElementChangedEvent removeElementChangedListener IElementChangedListener addElementChangedListener IElementChangedListener eventMask JavaModelManager getJavaModelManager deltaState addElementChangedListener eventMask
Configures the given marker attribute map for the given Java element Used for markers which denote a Java element rather than a resource param attributes the mutable marker attribute map key type code String code value type code String code param element the Java element for which the marker needs to be configured public static void add Java Element Marker Attributes Map attributes I Java Element element if element instanceof I Member element I Member element get Class File if attributes null element null attributes put ATT HANDLE ID element get Handle Identifier  addJavaElementMarkerAttributes IJavaElement IMember IMember getClassFile ATT_HANDLE_ID getHandleIdentifier
Adds the given listener for POST CHANGE resource change events to the Java core The listener is guarantied to be notified of the POST CHANGE resource change event before the Java core starts processing the resource change event itself p Has no effect if an identical listener is already registered p param listener the listener see remove Pre Processing Resource Changed Listener I Resource Change Listener since 3 0 public static void add Pre Processing Resource Changed Listener I Resource Change Listener listener Java Model Manager get Java Model Manager delta State add Pre Resource Changed Listener listener  POST_CHANGE POST_CHANGE removePreProcessingResourceChangedListener IResourceChangeListener addPreProcessingResourceChangedListener IResourceChangeListener JavaModelManager getJavaModelManager deltaState addPreResourceChangedListener
Configures the given marker for the given Java element Used for markers which denote a Java element rather than a resource param marker the marker to be configured param element the Java element for which the marker needs to be configured exception Core Exception if the code I Marker set Attribute code on the marker fails public void configure Java Element Marker I Marker marker I Java Element element throws Core Exception if element instanceof I Member element I Member element get Class File if marker null element null marker set Attribute ATT HANDLE ID element get Handle Identifier  CoreException IMarker setAttribute configureJavaElementMarker IMarker IJavaElement CoreException IMember IMember getClassFile setAttribute ATT_HANDLE_ID getHandleIdentifier
Returns the Java model element corresponding to the given handle identifier generated by code I Java Element get Handle Identifier code or code null code if unable to create the associated element param handle Identifier the given handle identifier return the Java element corresponding to the handle identifier public static I Java Element create String handle Identifier return create handle Identifier Default Working Copy Owner PRIMARY  IJavaElement getHandleIdentifier handleIdentifier IJavaElement handleIdentifier handleIdentifier DefaultWorkingCopyOwner
Returns the Java model element corresponding to the given handle identifier generated by code I Java Element get Handle Identifier code or code null code if unable to create the associated element If the returned Java element is an code I Compilation Unit code its owner is the given owner if such a working copy exists otherwise the compilation unit is a primary compilation unit param handle Identifier the given handle identifier param owner the owner of the returned compilation unit ignored if the returned element is not a compilation unit return the Java element corresponding to the handle identifier since 3 0 public static I Java Element create String handle Identifier Working Copy Owner owner if handle Identifier null return null Memento Tokenizer memento new Memento Tokenizer handle Identifier Java Model model Java Model Manager get Java Model Manager get Java Model return model get Handle From Memento memento owner  IJavaElement getHandleIdentifier ICompilationUnit handleIdentifier IJavaElement handleIdentifier WorkingCopyOwner handleIdentifier MementoTokenizer MementoTokenizer handleIdentifier JavaModel JavaModelManager getJavaModelManager getJavaModel getHandleFromMemento
Returns the Java element corresponding to the given file or code null code if unable to associate the given file with a Java element p The file must be one of ul li a code java code file the element returned is the corresponding code I Compilation Unit code li li a code class code file the element returned is the corresponding code I Class File code li li a code jar code file the element returned is the corresponding code I Package Fragment Root code li ul p Creating a Java element has the side effect of creating and opening all of the element s parents if they are not yet open param file the given file return the Java element corresponding to the given file or code null code if unable to associate the given file with a Java element public static I Java Element create I File file return Java Model Manager create file null unknown java project  ICompilationUnit IClassFile IPackageFragmentRoot IJavaElement IFile JavaModelManager
Returns the package fragment or package fragment root corresponding to the given folder or code null code if unable to associate the given folder with a Java element p Note that a package fragment root is returned rather than a default package p Creating a Java element has the side effect of creating and opening all of the element s parents if they are not yet open param folder the given folder return the package fragment or package fragment root corresponding to the given folder or code null code if unable to associate the given folder with a Java element public static I Java Element create I Folder folder return Java Model Manager create folder null unknown java project  IJavaElement IFolder JavaModelManager
Returns the Java project corresponding to the given project p Creating a Java Project has the side effect of creating and opening all of the project s parents if they are not yet open p Note that no check is done at this time on the existence or the java nature of this project param project the given project return the Java project corresponding to the given project null if the given project is null public static I Java Project create I Project project if project null return null Java Model java Model Java Model Manager get Java Model Manager get Java Model return java Model get Java Project project  IJavaProject IProject JavaModel javaModel JavaModelManager getJavaModelManager getJavaModel javaModel getJavaProject
Returns the Java element corresponding to the given resource or code null code if unable to associate the given resource with a Java element p The resource must be one of ul li a project the element returned is the corresponding code I Java Project code li li a code java code file the element returned is the corresponding code I Compilation Unit code li li a code class code file the element returned is the corresponding code I Class File code li li a code jar code file the element returned is the corresponding code I Package Fragment Root code li li a folder the element returned is the corresponding code I Package Fragment Root code or code I Package Fragment code li li the workspace root resource the element returned is the code I Java Model code li ul p Creating a Java element has the side effect of creating and opening all of the element s parents if they are not yet open param resource the given resource return the Java element corresponding to the given resource or code null code if unable to associate the given resource with a Java element public static I Java Element create I Resource resource return Java Model Manager create resource null unknown java project  IJavaProject ICompilationUnit IClassFile IPackageFragmentRoot IPackageFragmentRoot IPackageFragment IJavaModel IJavaElement IResource JavaModelManager
Returns the Java model param root the given root return the Java model or code null code if the root is null public static I Java Model create I Workspace Root root if root null return null return Java Model Manager get Java Model Manager get Java Model  IJavaModel IWorkspaceRoot JavaModelManager getJavaModelManager getJavaModel
Creates and returns a class file element for the given code class code file Returns code null code if unable to recognize the class file param file the given code class code file return a class file element for the given code class code file or code null code if unable to recognize the class file public static I Class File create Class File From I File file return Java Model Manager create Class File From file null  IClassFile createClassFileFrom IFile JavaModelManager createClassFileFrom
Creates and returns a compilation unit element for the given code java code file Returns code null code if unable to recognize the compilation unit param file the given code java code file return a compilation unit element for the given code java code file or code null code if unable to recognize the compilation unit public static I Compilation Unit create Compilation Unit From I File file return Java Model Manager create Compilation Unit From file null unknown java project  ICompilationUnit createCompilationUnitFrom IFile JavaModelManager createCompilationUnitFrom
Creates and returns a handle for the given JAR file The Java model associated with the JAR s project may be created as a side effect param file the given JAR file return a handle for the given JAR file or code null code if unable to create a JAR package fragment root for example if the JAR file represents a non Java resource public static I Package Fragment Root create Jar Package Fragment Root From I File file return Java Model Manager create Jar Package Fragment Root From file null unknown java project  IPackageFragmentRoot createJarPackageFragmentRootFrom IFile JavaModelManager createJarPackageFragmentRootFrom
Answers the project specific value for a given classpath container In case this container path could not be resolved then will answer code null code Both the container path and the project context are supposed to be non null p The container Path is a formed by a first ID segment followed with extra segments which can be used as additional hints for resolution If no container was ever recorded for this container path onto this project using code set Classpath Container code then a code Classpath Container Initializer code will be activated if any was registered for this container ID onto the extension point org eclipse jdt core classpath Container Initializer p There is no assumption that the returned container must answer the exact same container Path when requested code I Classpath Container get Path code Indeed the container Path is just an indication for resolving it to an actual container object p Classpath container values are persisted locally to the workspace but are not preserved from a session to another It is thus highly recommended to register a code Classpath Container Initializer code for each referenced container through the extension point org eclipse jdt core Classpath Container Initializer p param container Path the name of the container which needs to be resolved param project a specific project in which the container is being resolved return the corresponding classpath container or code null code if unable to find one exception Java Model Exception if an exception occurred while resolving the container or if the resolved container contains illegal entries contains CPE CONTAINER entries or null entries see Classpath Container Initializer see I Classpath Container see set Classpath Container I Path I Java Project I Classpath Container I Progress Monitor since 2 0 public static I Classpath Container get Classpath Container I Path container Path I Java Project project throws Java Model Exception Java Model Manager manager Java Model Manager get Java Model Manager I Classpath Container container manager get Classpath Container container Path project if container Java Model Manager CONTAINER INITIALIZATION IN PROGRESS return manager get Previous Session Container container Path project return container  containerPath setClasspathContainer ClasspathContainerInitializer classpathContainerInitializer containerPath IClasspathContainer getPath containerPath ClasspathContainerInitializer ClasspathContainerInitializer containerPath JavaModelException CPE_CONTAINER ClasspathContainerInitializer IClasspathContainer setClasspathContainer IPath IJavaProject IClasspathContainer IProgressMonitor IClasspathContainer getClasspathContainer IPath containerPath IJavaProject JavaModelException JavaModelManager JavaModelManager getJavaModelManager IClasspathContainer getClasspathContainer containerPath JavaModelManager CONTAINER_INITIALIZATION_IN_PROGRESS getPreviousSessionContainer containerPath
Helper method finding the classpath container initializer registered for a given classpath container ID or code null code if none was found while iterating over the contributions to extension point to the extension point org eclipse jdt core classpath Container Initializer p A containerID is the first segment of any container path used to identify the registered container initializer p param containerID a containerID identifying a registered initializer return Classpath Container Initializer the registered classpath container initializer or code null code if none was found since 2 1 public static Classpath Container Initializer get Classpath Container Initializer String containerID Plugin jdt Core Plugin Java Core get Plugin if jdt Core Plugin null return null I Extension Point extension Platform get Extension Registry get Extension Point Java Core PLUGIN ID Java Model Manager CPCONTAINER INITIALIZER EXTPOINT ID if extension null I Extension extensions extension get Extensions for int i 0 i extensions length i I Configuration Element config Elements extensions i get Configuration Elements for int j 0 j config Elements length j String initializerID config Elements j get Attribute id NON NLS 1 if initializerID null initializerID equals containerID if Java Model Manager CP RESOLVE VERBOSE Util verbose CP Container INIT found initializer n NON NLS 1 container ID containerID n NON NLS 1 class config Elements j get Attribute class NON NLS 1 NON NLS 2 try Object exec Ext config Elements j create Executable Extension class NON NLS 1 if exec Ext instanceof Classpath Container Initializer return Classpath Container Initializer exec Ext catch Core Exception e executable extension could not be created ignore this initializer if Java Model Manager CP RESOLVE VERBOSE Util verbose CP Container INIT failed to instanciate initializer n NON NLS 1 container ID containerID n NON NLS 1 class config Elements j get Attribute class NON NLS 1 NON NLS 2 System err e print Stack Trace return null  classpathContainerInitializer ClasspathContainerInitializer ClasspathContainerInitializer getClasspathContainerInitializer jdtCorePlugin JavaCore getPlugin jdtCorePlugin IExtensionPoint getExtensionRegistry getExtensionPoint JavaCore PLUGIN_ID JavaModelManager CPCONTAINER_INITIALIZER_EXTPOINT_ID IExtension getExtensions IConfigurationElement configElements getConfigurationElements configElements configElements getAttribute JavaModelManager CP_RESOLVE_VERBOSE CPContainer configElements getAttribute execExt configElements createExecutableExtension execExt ClasspathContainerInitializer ClasspathContainerInitializer execExt CoreException JavaModelManager CP_RESOLVE_VERBOSE CPContainer configElements getAttribute printStackTrace
Returns the path held in the given classpath variable Returns node null code if unable to bind p Classpath variable values are persisted locally to the workspace and are preserved from session to session p Note that classpath variables can be contributed registered initializers for using the extension point org eclipse jdt core classpath Variable Initializer If an initializer is registered for a variable its persisted value will be ignored its initializer will thus get the opportunity to rebind the variable differently on each session param variable Name the name of the classpath variable return the path or code null code if none see set Classpath Variable String I Path public static I Path get Classpath Variable final String variable Name Java Model Manager manager Java Model Manager get Java Model Manager I Path variable Path manager variable Get variable Name if variable Path Java Model Manager VARIABLE INITIALIZATION IN PROGRESS return manager get Previous Session Variable variable Name if variable Path null return variable Path even if persisted value exists initializer is given priority only if no initializer is found the persisted value is reused final Classpath Variable Initializer initializer Java Core get Classpath Variable Initializer variable Name if initializer null if Java Model Manager CP RESOLVE VERBOSE Util verbose CP Variable INIT triggering initialization n NON NLS 1 variable variable Name n NON NLS 1 initializer initializer n NON NLS 1 invocation stack trace NON NLS 1 new Exception Fake exception print Stack Trace System out NON NLS 1 Java Model Manager get Java Model Manager variable Put variable Name Java Model Manager VARIABLE INITIALIZATION IN PROGRESS avoid initialization cycles boolean ok false try let Operation Canceled Exception go through see https bugs eclipse org bugs show bug cgi id 59363 initializer initialize variable Name variable Path Java Model Manager get Java Model Manager variable Get variable Name initializer should have performed side effect if variable Path Java Model Manager VARIABLE INITIALIZATION IN PROGRESS return null break cycle initializer did not init or reentering call if Java Model Manager CP RESOLVE VERBOSE Util verbose CP Variable INIT after initialization n NON NLS 1 variable variable Name n NON NLS 1 variable path variable Path NON NLS 1 ok true catch Runtime Exception e if Java Model Manager CP RESOLVE VERBOSE e print Stack Trace throw e catch Error e if Java Model Manager CP RESOLVE VERBOSE e print Stack Trace throw e finally if ok Java Model Manager get Java Model Manager variable Put variable Name null flush cache else if Java Model Manager CP RESOLVE VERBOSE Util verbose CP Variable INIT no initializer found n NON NLS 1 variable variable Name NON NLS 1 return variable Path  classpathVariableInitializer variableName setClasspathVariable IPath IPath getClasspathVariable variableName JavaModelManager JavaModelManager getJavaModelManager IPath variablePath variableGet variableName variablePath JavaModelManager VARIABLE_INITIALIZATION_IN_PROGRESS getPreviousSessionVariable variableName variablePath variablePath ClasspathVariableInitializer JavaCore getClasspathVariableInitializer variableName JavaModelManager CP_RESOLVE_VERBOSE CPVariable variableName printStackTrace JavaModelManager getJavaModelManager variablePut variableName JavaModelManager VARIABLE_INITIALIZATION_IN_PROGRESS OperationCanceledException show_bug variableName variablePath JavaModelManager getJavaModelManager variableGet variableName variablePath JavaModelManager VARIABLE_INITIALIZATION_IN_PROGRESS JavaModelManager CP_RESOLVE_VERBOSE CPVariable variableName variablePath RuntimeException JavaModelManager CP_RESOLVE_VERBOSE printStackTrace JavaModelManager CP_RESOLVE_VERBOSE printStackTrace JavaModelManager getJavaModelManager variablePut variableName JavaModelManager CP_RESOLVE_VERBOSE CPVariable variableName variablePath
Helper method finding the classpath variable initializer registered for a given classpath variable name or code null code if none was found while iterating over the contributions to extension point to the extension point org eclipse jdt core classpath Variable Initializer p param variable the given variable return Classpath Variable Initializer the registered classpath variable initializer or code null code if none was found since 2 1 public static Classpath Variable Initializer get Classpath Variable Initializer String variable Plugin jdt Core Plugin Java Core get Plugin if jdt Core Plugin null return null I Extension Point extension Platform get Extension Registry get Extension Point Java Core PLUGIN ID Java Model Manager CPVARIABLE INITIALIZER EXTPOINT ID if extension null I Extension extensions extension get Extensions for int i 0 i extensions length i I Configuration Element config Elements extensions i get Configuration Elements for int j 0 j config Elements length j try String var Attribute config Elements j get Attribute variable NON NLS 1 if variable equals var Attribute if Java Model Manager CP RESOLVE VERBOSE Util verbose CP Variable INIT found initializer n NON NLS 1 variable variable n NON NLS 1 class config Elements j get Attribute class NON NLS 1 NON NLS 2 Object exec Ext config Elements j create Executable Extension class NON NLS 1 if exec Ext instanceof Classpath Variable Initializer return Classpath Variable Initializer exec Ext catch Core Exception e executable extension could not be created ignore this initializer if Java Model Manager CP RESOLVE VERBOSE Util verbose CP Container INIT failed to instanciate initializer n NON NLS 1 variable variable n NON NLS 1 class config Elements j get Attribute class NON NLS 1 NON NLS 2 System err e print Stack Trace return null  classpathVariableInitializer ClasspathVariableInitializer ClasspathVariableInitializer getClasspathVariableInitializer jdtCorePlugin JavaCore getPlugin jdtCorePlugin IExtensionPoint getExtensionRegistry getExtensionPoint JavaCore PLUGIN_ID JavaModelManager CPVARIABLE_INITIALIZER_EXTPOINT_ID IExtension getExtensions IConfigurationElement configElements getConfigurationElements configElements varAttribute configElements getAttribute varAttribute JavaModelManager CP_RESOLVE_VERBOSE CPVariable configElements getAttribute execExt configElements createExecutableExtension execExt ClasspathVariableInitializer ClasspathVariableInitializer execExt CoreException JavaModelManager CP_RESOLVE_VERBOSE CPContainer configElements getAttribute printStackTrace
Returns the names of all known classpath variables p Classpath variable values are persisted locally to the workspace and are preserved from session to session p return the list of classpath variable names see set Classpath Variable String I Path public static String get Classpath Variable Names return Java Model Manager get Java Model Manager variable Names  setClasspathVariable IPath getClasspathVariableNames JavaModelManager getJavaModelManager variableNames
Returns a table of all known configurable options with their default values These options allow to configure the behaviour of the underlying components The client may safely use the result as a template that they can modify and then pass to code set Options code Helper constants have been defined on Java Core for each of the option ID and their possible constant values Note more options might be added in further releases pre RECOGNIZED OPTIONS COMPILER Generating Local Variable Debug Attribute When generated this attribute will enable local variable names to be displayed in debugger only in place where variables are definitely assigned class file is then bigger option id org eclipse jdt core compiler debug local Variable possible values generate do not generate default generate COMPILER Generating Line Number Debug Attribute When generated this attribute will enable source code highlighting in debugger class file is then bigger option id org eclipse jdt core compiler debug line Number possible values generate do not generate default generate COMPILER Generating Source Debug Attribute When generated this attribute will enable the debugger to present the corresponding source code option id org eclipse jdt core compiler debug source File possible values generate do not generate default generate COMPILER Preserving Unused Local Variables Unless requested to preserve unused local variables that is never read the compiler will optimize them out potentially altering debugging option id org eclipse jdt core compiler codegen unused Local possible values preserve optimize out default preserve COMPILER Defining Target Java Platform For binary compatibility reason class files can be tagged to with certain VM versions and later Note that 1 4 target require to toggle compliance mode to 1 4 too option id org eclipse jdt core compiler codegen target Platform possible values 1 1 1 2 1 3 1 4 default 1 2 COMPILER Inline JSR Bytecode Instruction When enabled the compiler will no longer generate JSR instructions but rather inline corresponding subroutine code sequences mostly corresponding to try finally blocks The generated code will thus get bigger but will load faster on virtual machines since the verification process is then much simpler This mode is anticipating support for the Java Specification Request 202 option id org eclipse jdt core compiler codegen inline Jsr Bytecode possible values enabled disabled default disabled COMPILER Javadoc Comment Support When this support is disabled the compiler will ignore all javadoc problems options settings and will not report any javadoc problem It will also not find any reference in javadoc comment and DOM AST Javadoc node will be only a flat text instead of having structured tag elements option id org eclipse jdt core compiler doc comment support possible values enabled disabled default enabled COMPILER Reporting Attempt to Override Package Default Method A package default method is not visible in a different package and thus cannot be overridden When enabling this option the compiler will signal such scenarii either as an error or a warning option id org eclipse jdt core compiler problem overriding Package Default Method possible values error warning ignore default warning COMPILER Reporting Method With Constructor Name Naming a method with a constructor name is generally considered poor style programming When enabling this option the compiler will signal such scenarii either as an error or a warning option id org eclipse jdt core compiler problem method With Constructor Name possible values error warning ignore default warning COMPILER Reporting Deprecation When enabled the compiler will signal use of deprecated API either as an error or a warning option id org eclipse jdt core compiler problem deprecation possible values error warning ignore default warning COMPILER Reporting Deprecation Inside Deprecated Code When enabled the compiler will signal use of deprecated API inside deprecated code The severity of the problem is controlled with option org eclipse jdt core compiler problem deprecation option id org eclipse jdt core compiler problem deprecation In Deprecated Code possible values enabled disabled default disabled COMPILER Reporting Deprecation When Overriding Deprecated Method When enabled the compiler will signal the declaration of a method overriding a deprecated one The severity of the problem is controlled with option org eclipse jdt core compiler problem deprecation option id org eclipse jdt core compiler problem deprecation When Overriding Deprecated Method possible values enabled disabled default disabled COMPILER Reporting Hidden Catch Block Locally to a try statement some catch blocks may hide others For example try throw new java io Char Conversion Exception catch java io Char Conversion Exception e catch java io IO Exception e When enabling this option the compiler will issue an error or a warning for hidden catch blocks corresponding to checked exceptions option id org eclipse jdt core compiler problem hidden Catch Block possible values error warning ignore default warning COMPILER Reporting Unused Local When enabled the compiler will issue an error or a warning for unused local variables that is variables never read from option id org eclipse jdt core compiler problem unused Local possible values error warning ignore default ignore COMPILER Reporting Unused Parameter When enabled the compiler will issue an error or a warning for unused method parameters that is parameters never read from option id org eclipse jdt core compiler problem unused Parameter possible values error warning ignore default ignore COMPILER Reporting Unused Parameter if Implementing Abstract Method When enabled the compiler will signal unused parameters in abstract method implementations The severity of the problem is controlled with option org eclipse jdt core compiler problem unused Parameter option id org eclipse jdt core compiler problem unused Parameter When Implementing Abstract possible values enabled disabled default disabled COMPILER Reporting Unused Parameter if Overriding Concrete Method When enabled the compiler will signal unused parameters in methods overriding concrete ones The severity of the problem is controlled with option org eclipse jdt core compiler problem unused Parameter option id org eclipse jdt core compiler problem unused Parameter When Overriding Concrete possible values enabled disabled default disabled COMPILER Reporting Unused Import When enabled the compiler will issue an error or a warning for unused import reference option id org eclipse jdt core compiler problem unused Import possible values error warning ignore default warning COMPILER Reporting Unused Private Members When enabled the compiler will issue an error or a warning whenever a private method or field is declared but never used within the same unit option id org eclipse jdt core compiler problem unused Private Member possible values error warning ignore default ignore COMPILER Reporting Assignment with no Effect When enabled the compiler will issue an error or a warning whenever an assignment has no effect e g x x option id org eclipse jdt core compiler problem no Effect Assignment possible values error warning ignore default warning COMPILER Reporting Empty Statements and Unnecessary Semicolons When enabled the compiler will issue an error or a warning if an empty statement or a unnecessary semicolon is encountered option id org eclipse jdt core compiler problem empty Statement possible values error warning ignore default ignore COMPILER Reporting Unnecessary Type Check When enabled the compiler will issue an error or a warning when a cast or an instanceof operation is unnecessary option id org eclipse jdt core compiler problem unne setOptions JavaCore localVariable lineNumber sourceFile unusedLocal targetPlatform inlineJsrBytecode overridingPackageDefaultMethod methodWithConstructorName deprecationInDeprecatedCode deprecationWhenOverridingDeprecatedMethod CharConversionException CharConversionException IOException hiddenCatchBlock unusedLocal unusedParameter unusedParameter unusedParameterWhenImplementingAbstract unusedParameter unusedParameterWhenOverridingConcrete unusedImport unusedPrivateMember noEffectAssignment emptyStatement
Returns the workspace root default charset encoding return the name of the default charset encoding for workspace root see I Container get Default Charset see Resources Plugin get Encoding since 3 0 public static String get Encoding Verify that workspace is not shutting down see bug https bugs eclipse org bugs show bug cgi id 60687 I Workspace workspace Resources Plugin get Workspace if workspace null try return workspace get Root get Default Charset catch Core Exception e fails silently and return plugin global encoding if core exception occurs return Resources Plugin get Encoding  IContainer getDefaultCharset ResourcesPlugin getEncoding getEncoding show_bug IWorkspace ResourcesPlugin getWorkspace getRoot getDefaultCharset CoreException ResourcesPlugin getEncoding
Returns the single instance of the Java core plug in runtime class Equivalent to code Java Core get Plugin code return the single instance of the Java core plug in runtime class public static Java Core get Java Core return Java Core get Plugin  JavaCore getPlugin JavaCore getJavaCore JavaCore getPlugin
Helper method for returning one option value only Equivalent to code String Java Core get Options get option Name code Note that it may answer code null code if this option does not exist p For a complete description of the configurable options see code get Default Options code p param option Name the name of an option return the String value of a given option see Java Core get Default Options since 2 0 public static String get Option String option Name if CORE ENCODING equals option Name return get Encoding backward compatibility if COMPILER PB INVALID IMPORT equals option Name COMPILER PB UNREACHABLE CODE equals option Name return ERROR String property Name option Name if Java Model Manager get Java Model Manager option Names contains property Name Preferences preferences get Plugin get Plugin Preferences return preferences get String property Name trim return null  JavaCore getOptions optionName getDefaultOptions optionName JavaCore getDefaultOptions getOption optionName CORE_ENCODING optionName getEncoding COMPILER_PB_INVALID_IMPORT optionName COMPILER_PB_UNREACHABLE_CODE optionName propertyName optionName JavaModelManager getJavaModelManager optionNames propertyName getPlugin getPluginPreferences getString propertyName
Returns the table of the current options Initially all options have their default values and this method returns a table that includes all known options p For a complete description of the configurable options see code get Default Options code p return table of current settings of all options key type code String code value type code String code see Java Core get Default Options public static Hashtable get Options Hashtable options new Hashtable 10 see initialize Default Plugin Preferences for changing default settings Plugin plugin get Plugin if plugin null Preferences preferences get Plugin get Plugin Preferences Hash Set option Names Java Model Manager get Java Model Manager option Names initialize preferences to their default Iterator iterator option Names iterator while iterator has Next String property Name String iterator next options put property Name preferences get Default String property Name get preferences not set to their default String property Names preferences property Names for int i 0 i property Names length i String property Name property Names i String value preferences get String property Name trim if option Names contains property Name options put property Name value get encoding through resource plugin options put CORE ENCODING get Encoding backward compatibility options put COMPILER PB INVALID IMPORT ERROR options put COMPILER PB UNREACHABLE CODE ERROR return options  getDefaultOptions JavaCore getDefaultOptions getOptions initializeDefaultPluginPreferences getPlugin getPlugin getPluginPreferences HashSet optionNames JavaModelManager getJavaModelManager optionNames optionNames hasNext propertyName propertyName getDefaultString propertyName propertyNames propertyNames propertyNames propertyName propertyNames getString propertyName optionNames propertyName propertyName CORE_ENCODING getEncoding COMPILER_PB_INVALID_IMPORT COMPILER_PB_UNREACHABLE_CODE
Returns the single instance of the Java core plug in runtime class return the single instance of the Java core plug in runtime class public static Plugin get Plugin return JAVA CORE PLUGIN  getPlugin JAVA_CORE_PLUGIN
This is a helper method which returns the resolved classpath entry denoted by a given entry if it is a variable entry It is obtained by resolving the variable reference in the first segment Returns node null code if unable to resolve using the following algorithm ul li if variable segment cannot be resolved returns code null code li li finds a project JAR or binary folder in the workspace at the resolved path location li li if none finds an external JAR file or folder outside the workspace at the resolved path location li li if none returns code null code li ul p Variable source attachment path and root path are also resolved and recorded in the resulting classpath entry p NOTE This helper method does not handle classpath containers for which should rather be used code Java Core get Classpath Container I Path I Java Project code p param entry the given variable entry return the resolved library or project classpath entry or code null code if the given variable entry could not be resolved to a valid classpath entry public static I Classpath Entry get Resolved Classpath Entry I Classpath Entry entry if entry get Entry Kind I Classpath Entry CPE VARIABLE return entry I Workspace Root workspace Root Resources Plugin get Workspace get Root I Path resolved Path Java Core get Resolved Variable Path entry get Path if resolved Path null return null Object target Java Model get Target workspace Root resolved Path false if target null return null inside the workspace if target instanceof I Resource I Resource resolved Resource I Resource target if resolved Resource null switch resolved Resource get Type case I Resource PROJECT internal project return Java Core new Project Entry resolved Path entry is Exported case I Resource FILE if org eclipse jdt internal compiler util Util is Archive File Name resolved Resource get Name internal binary archive return Java Core new Library Entry resolved Path get Resolved Variable Path entry get Source Attachment Path get Resolved Variable Path entry get Source Attachment Root Path entry is Exported break case I Resource FOLDER internal binary folder return Java Core new Library Entry resolved Path get Resolved Variable Path entry get Source Attachment Path get Resolved Variable Path entry get Source Attachment Root Path entry is Exported outside the workspace if target instanceof File File external File File target if external File is File String file Name external File get Name to Lower Case if file Name ends With Suffix Constants SUFFIX STRING jar file Name ends With Suffix Constants SUFFIX STRING zip external binary archive return Java Core new Library Entry resolved Path get Resolved Variable Path entry get Source Attachment Path get Resolved Variable Path entry get Source Attachment Root Path entry is Exported else external binary folder if resolved Path is Absolute return Java Core new Library Entry resolved Path get Resolved Variable Path entry get Source Attachment Path get Resolved Variable Path entry get Source Attachment Root Path entry is Exported return null  JavaCore getClasspathContainer IPath IJavaProject IClasspathEntry getResolvedClasspathEntry IClasspathEntry getEntryKind IClasspathEntry CPE_VARIABLE IWorkspaceRoot workspaceRoot ResourcesPlugin getWorkspace getRoot IPath resolvedPath JavaCore getResolvedVariablePath getPath resolvedPath JavaModel getTarget workspaceRoot resolvedPath IResource IResource resolvedResource IResource resolvedResource resolvedResource getType IResource JavaCore newProjectEntry resolvedPath isExported IResource isArchiveFileName resolvedResource getName JavaCore newLibraryEntry resolvedPath getResolvedVariablePath getSourceAttachmentPath getResolvedVariablePath getSourceAttachmentRootPath isExported IResource JavaCore newLibraryEntry resolvedPath getResolvedVariablePath getSourceAttachmentPath getResolvedVariablePath getSourceAttachmentRootPath isExported externalFile externalFile isFile fileName externalFile getName toLowerCase fileName endsWith SuffixConstants SUFFIX_STRING_jar fileName endsWith SuffixConstants SUFFIX_STRING_zip JavaCore newLibraryEntry resolvedPath getResolvedVariablePath getSourceAttachmentPath getResolvedVariablePath getSourceAttachmentRootPath isExported resolvedPath isAbsolute JavaCore newLibraryEntry resolvedPath getResolvedVariablePath getSourceAttachmentPath getResolvedVariablePath getSourceAttachmentRootPath isExported
Resolve a variable path helper method param variable Path the given variable path return the resolved variable path or code null code if none public static I Path get Resolved Variable Path I Path variable Path if variable Path null return null int count variable Path segment Count if count 0 return null lookup variable String variable Name variable Path segment 0 I Path resolved Path Java Core get Classpath Variable variable Name if resolved Path null return null append path suffix if count 1 resolved Path resolved Path append variable Path remove First Segments 1 return resolved Path  variablePath IPath getResolvedVariablePath IPath variablePath variablePath variablePath segmentCount variableName variablePath IPath resolvedPath JavaCore getClasspathVariable variableName resolvedPath resolvedPath resolvedPath variablePath removeFirstSegments resolvedPath
Answers the shared working copies currently registered for this buffer factory Working copies can be shared by several clients using the same buffer factory see code I Working Copy get Shared Working Copy code param factory the given buffer factory return the list of shared working copies for a given buffer factory see I Working Copy since 2 0 deprecated should use get Working Copies Working Copy Owner instead public static I Working Copy get Shared Working Copies I Buffer Factory factory if factory is null default factory must be used if factory null factory Buffer Manager get Default Buffer Manager get Default Buffer Factory return get Working Copies Buffer Factory Wrapper create factory  IWorkingCopy getSharedWorkingCopy IWorkingCopy getWorkingCopies WorkingCopyOwner IWorkingCopy getSharedWorkingCopies IBufferFactory BufferManager getDefaultBufferManager getDefaultBufferFactory getWorkingCopies BufferFactoryWrapper
Returns the names of all defined user libraries The corresponding classpath container path is the name appended to the USER LIBRARY CONTAINER ID return Return an array containing the names of all known user defined since 3 0 public static String get User Library Names return User Library Manager get User Library Names  USER_LIBRARY_CONTAINER_ID getUserLibraryNames UserLibraryManager getUserLibraryNames
Returns the working copies that have the given owner Only compilation units in working copy mode are returned If the owner is code null code primary working copies are returned param owner the given working copy owner or null for primary working copy owner return the list of working copies for a given owner since 3 0 public static I Compilation Unit get Working Copies Working Copy Owner owner Java Model Manager manager Java Model Manager get Java Model Manager if owner null owner Default Working Copy Owner PRIMARY I Compilation Unit result manager get Working Copies owner false don t add primary W Cs if result null return Java Model Manager NO WORKING COPY return result  ICompilationUnit getWorkingCopies WorkingCopyOwner JavaModelManager JavaModelManager getJavaModelManager DefaultWorkingCopyOwner ICompilationUnit getWorkingCopies WCs JavaModelManager NO_WORKING_COPY
Initializes the default preferences settings for this plug in protected void initialize Default Plugin Preferences Preferences preferences get Plugin Preferences Hash Set option Names Java Model Manager get Java Model Manager option Names Compiler settings Map compiler Options Map new Compiler Options get Map compiler defaults for Iterator iter compiler Options Map entry Set iterator iter has Next Map Entry entry Map Entry iter next String option Name String entry get Key preferences set Default option Name String entry get Value option Names add option Name override some compiler defaults preferences set Default COMPILER LOCAL VARIABLE ATTR GENERATE preferences set Default COMPILER CODEGEN UNUSED LOCAL PRESERVE preferences set Default COMPILER TASK TAGS DEFAULT TASK TAGS preferences set Default COMPILER TASK PRIORITIES DEFAULT TASK PRIORITIES preferences set Default COMPILER TASK CASE SENSITIVE ENABLED preferences set Default COMPILER DOC COMMENT SUPPORT ENABLED Builder settings preferences set Default CORE JAVA BUILD RESOURCE COPY FILTER NON NLS 1 option Names add CORE JAVA BUILD RESOURCE COPY FILTER preferences set Default CORE JAVA BUILD INVALID CLASSPATH ABORT option Names add CORE JAVA BUILD INVALID CLASSPATH preferences set Default CORE JAVA BUILD DUPLICATE RESOURCE WARNING option Names add CORE JAVA BUILD DUPLICATE RESOURCE preferences set Default CORE JAVA BUILD CLEAN OUTPUT FOLDER CLEAN option Names add CORE JAVA BUILD CLEAN OUTPUT FOLDER Java Core settings preferences set Default CORE JAVA BUILD ORDER IGNORE option Names add CORE JAVA BUILD ORDER preferences set Default CORE INCOMPLETE CLASSPATH ERROR option Names add CORE INCOMPLETE CLASSPATH preferences set Default CORE CIRCULAR CLASSPATH ERROR option Names add CORE CIRCULAR CLASSPATH preferences set Default CORE INCOMPATIBLE JDK LEVEL IGNORE option Names add CORE INCOMPATIBLE JDK LEVEL preferences set Default CORE ENABLE CLASSPATH EXCLUSION PATTERNS ENABLED option Names add CORE ENABLE CLASSPATH EXCLUSION PATTERNS preferences set Default CORE ENABLE CLASSPATH MULTIPLE OUTPUT LOCATIONS ENABLED option Names add CORE ENABLE CLASSPATH MULTIPLE OUTPUT LOCATIONS encoding setting comes from resource plug in option Names add CORE ENCODING Formatter settings Map code Formatter Options Map Default Code Formatter Constants get Java Conventions Settings code formatter defaults for Iterator iter code Formatter Options Map entry Set iterator iter has Next Map Entry entry Map Entry iter next String option Name String entry get Key preferences set Default option Name String entry get Value option Names add option Name preferences set Default FORMATTER NEWLINE OPENING BRACE DO NOT INSERT option Names add FORMATTER NEWLINE OPENING BRACE preferences set Default FORMATTER NEWLINE CONTROL DO NOT INSERT option Names add FORMATTER NEWLINE CONTROL preferences set Default FORMATTER CLEAR BLANK LINES PRESERVE ONE option Names add FORMATTER CLEAR BLANK LINES preferences set Default FORMATTER NEWLINE ELSE IF DO NOT INSERT option Names add FORMATTER NEWLINE ELSE IF preferences set Default FORMATTER NEWLINE EMPTY BLOCK INSERT option Names add FORMATTER NEWLINE EMPTY BLOCK preferences set Default FORMATTER LINE SPLIT 80 NON NLS 1 option Names add FORMATTER LINE SPLIT preferences set Default FORMATTER COMPACT ASSIGNMENT NORMAL option Names add FORMATTER COMPACT ASSIGNMENT preferences set Default FORMATTER TAB CHAR TAB option Names add FORMATTER TAB CHAR preferences set Default FORMATTER TAB SIZE 4 NON NLS 1 option Names add FORMATTER TAB SIZE preferences set Default FORMATTER SPACE CASTEXPRESSION INSERT NON NLS 1 option Names add FORMATTER SPACE CASTEXPRESSION Code Assist settings preferences set Default CODEASSIST VISIBILITY CHECK DISABLED NON NLS 1 option Names add CODEASSIST VISIBILITY CHECK preferences set Default CODEASSIST IMPLICIT QUALIFICATION DISABLED NON NLS 1 option Names add CODEASSIST IMPLICIT QUALIFICATION preferences set Default CODEASSIST FIELD PREFIXES NON NLS 1 option Names add CODEASSIST FIELD PREFIXES preferences set Default CODEASSIST STATIC FIELD PREFIXES NON NLS 1 option Names add CODEASSIST STATIC FIELD PREFIXES preferences set Default CODEASSIST LOCAL PREFIXES NON NLS 1 option Names add CODEASSIST LOCAL PREFIXES preferences set Default CODEASSIST ARGUMENT PREFIXES NON NLS 1 option Names add CODEASSIST ARGUMENT PREFIXES preferences set Default CODEASSIST FIELD SUFFIXES NON NLS 1 option Names add CODEASSIST FIELD SUFFIXES preferences set Default CODEASSIST STATIC FIELD SUFFIXES NON NLS 1 option Names add CODEASSIST STATIC FIELD SUFFIXES preferences set Default CODEASSIST LOCAL SUFFIXES NON NLS 1 option Names add CODEASSIST LOCAL SUFFIXES preferences set Default CODEASSIST ARGUMENT SUFFIXES NON NLS 1 option Names add CODEASSIST ARGUMENT SUFFIXES  initializeDefaultPluginPreferences getPluginPreferences HashSet optionNames JavaModelManager getJavaModelManager optionNames compilerOptionsMap CompilerOptions getMap compilerOptionsMap entrySet hasNext optionName getKey setDefault optionName getValue optionNames optionName setDefault COMPILER_LOCAL_VARIABLE_ATTR setDefault COMPILER_CODEGEN_UNUSED_LOCAL setDefault COMPILER_TASK_TAGS DEFAULT_TASK_TAGS setDefault COMPILER_TASK_PRIORITIES DEFAULT_TASK_PRIORITIES setDefault COMPILER_TASK_CASE_SENSITIVE setDefault COMPILER_DOC_COMMENT_SUPPORT setDefault CORE_JAVA_BUILD_RESOURCE_COPY_FILTER optionNames CORE_JAVA_BUILD_RESOURCE_COPY_FILTER setDefault CORE_JAVA_BUILD_INVALID_CLASSPATH optionNames CORE_JAVA_BUILD_INVALID_CLASSPATH setDefault CORE_JAVA_BUILD_DUPLICATE_RESOURCE optionNames CORE_JAVA_BUILD_DUPLICATE_RESOURCE setDefault CORE_JAVA_BUILD_CLEAN_OUTPUT_FOLDER optionNames CORE_JAVA_BUILD_CLEAN_OUTPUT_FOLDER JavaCore setDefault CORE_JAVA_BUILD_ORDER optionNames CORE_JAVA_BUILD_ORDER setDefault CORE_INCOMPLETE_CLASSPATH optionNames CORE_INCOMPLETE_CLASSPATH setDefault CORE_CIRCULAR_CLASSPATH optionNames CORE_CIRCULAR_CLASSPATH setDefault CORE_INCOMPATIBLE_JDK_LEVEL optionNames CORE_INCOMPATIBLE_JDK_LEVEL setDefault CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS optionNames CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS setDefault CORE_ENABLE_CLASSPATH_MULTIPLE_OUTPUT_LOCATIONS optionNames CORE_ENABLE_CLASSPATH_MULTIPLE_OUTPUT_LOCATIONS optionNames CORE_ENCODING codeFormatterOptionsMap DefaultCodeFormatterConstants getJavaConventionsSettings codeFormatterOptionsMap entrySet hasNext optionName getKey setDefault optionName getValue optionNames optionName setDefault FORMATTER_NEWLINE_OPENING_BRACE DO_NOT_INSERT optionNames FORMATTER_NEWLINE_OPENING_BRACE setDefault FORMATTER_NEWLINE_CONTROL DO_NOT_INSERT optionNames FORMATTER_NEWLINE_CONTROL setDefault FORMATTER_CLEAR_BLANK_LINES PRESERVE_ONE optionNames FORMATTER_CLEAR_BLANK_LINES setDefault FORMATTER_NEWLINE_ELSE_IF DO_NOT_INSERT optionNames FORMATTER_NEWLINE_ELSE_IF setDefault FORMATTER_NEWLINE_EMPTY_BLOCK optionNames FORMATTER_NEWLINE_EMPTY_BLOCK setDefault FORMATTER_LINE_SPLIT optionNames FORMATTER_LINE_SPLIT setDefault FORMATTER_COMPACT_ASSIGNMENT optionNames FORMATTER_COMPACT_ASSIGNMENT setDefault FORMATTER_TAB_CHAR optionNames FORMATTER_TAB_CHAR setDefault FORMATTER_TAB_SIZE optionNames FORMATTER_TAB_SIZE setDefault FORMATTER_SPACE_CASTEXPRESSION optionNames FORMATTER_SPACE_CASTEXPRESSION CodeAssist setDefault CODEASSIST_VISIBILITY_CHECK optionNames CODEASSIST_VISIBILITY_CHECK setDefault CODEASSIST_IMPLICIT_QUALIFICATION optionNames CODEASSIST_IMPLICIT_QUALIFICATION setDefault CODEASSIST_FIELD_PREFIXES optionNames CODEASSIST_FIELD_PREFIXES setDefault CODEASSIST_STATIC_FIELD_PREFIXES optionNames CODEASSIST_STATIC_FIELD_PREFIXES setDefault CODEASSIST_LOCAL_PREFIXES optionNames CODEASSIST_LOCAL_PREFIXES setDefault CODEASSIST_ARGUMENT_PREFIXES optionNames CODEASSIST_ARGUMENT_PREFIXES setDefault CODEASSIST_FIELD_SUFFIXES optionNames CODEASSIST_FIELD_SUFFIXES setDefault CODEASSIST_STATIC_FIELD_SUFFIXES optionNames CODEASSIST_STATIC_FIELD_SUFFIXES setDefault CODEASSIST_LOCAL_SUFFIXES optionNames CODEASSIST_LOCAL_SUFFIXES setDefault CODEASSIST_ARGUMENT_SUFFIXES optionNames CODEASSIST_ARGUMENT_SUFFIXES
Returns whether the given marker references the given Java element Used for markers which denote a Java element rather than a resource param element the element param marker the marker return code true code if the marker references the element false otherwise exception Core Exception if the code I Marker get Attribute code on the marker fails public static boolean is Referenced By I Java Element element I Marker marker throws Core Exception only match units or classfiles if element instanceof I Member I Member member I Member element if member is Binary element member get Class File else element member get Compilation Unit if element null return false if marker null return false String marker Handle Id String marker get Attribute ATT HANDLE ID if marker Handle Id null return false I Java Element marker Element Java Core create marker Handle Id while true if element equals marker Element return true external elements may still be equal with different handleI Ds cycle through enclosing types in case marker is associated with a classfile 15568 if marker Element instanceof I Class File I Type enclosing Type I Class File marker Element get Type get Declaring Type if enclosing Type null marker Element enclosing Type get Class File retry with immediate enclosing classfile continue break return false  CoreException IMarker getAttribute isReferencedBy IJavaElement IMarker CoreException IMember IMember IMember isBinary getClassFile getCompilationUnit markerHandleId getAttribute ATT_HANDLE_ID markerHandleId IJavaElement markerElement JavaCore markerHandleId markerElement handleIDs markerElement IClassFile IType enclosingType IClassFile markerElement getType getDeclaringType enclosingType markerElement enclosingType getClassFile
Returns whether the given marker delta references the given Java element Used for markers deltas which denote a Java element rather than a resource param element the element param marker Delta the marker delta return code true code if the marker delta references the element exception Core Exception if the code I Marker Delta get Attribute code on the marker delta fails public static boolean is Referenced By I Java Element element I Marker Delta marker Delta throws Core Exception only match units or classfiles if element instanceof I Member I Member member I Member element if member is Binary element member get Class File else element member get Compilation Unit if element null return false if marker Delta null return false String marker Deltar Handle Id String marker Delta get Attribute ATT HANDLE ID if marker Deltar Handle Id null return false I Java Element marker Element Java Core create marker Deltar Handle Id while true if element equals marker Element return true external elements may still be equal with different handleI Ds cycle through enclosing types in case marker is associated with a classfile 15568 if marker Element instanceof I Class File I Type enclosing Type I Class File marker Element get Type get Declaring Type if enclosing Type null marker Element enclosing Type get Class File retry with immediate enclosing classfile continue break return false  markerDelta CoreException IMarkerDelta getAttribute isReferencedBy IJavaElement IMarkerDelta markerDelta CoreException IMember IMember IMember isBinary getClassFile getCompilationUnit markerDelta markerDeltarHandleId markerDelta getAttribute ATT_HANDLE_ID markerDeltarHandleId IJavaElement markerElement JavaCore markerDeltarHandleId markerElement handleIDs markerElement IClassFile IType enclosingType IClassFile markerElement getType getDeclaringType enclosingType markerElement enclosingType getClassFile
Creates and returns a new classpath entry of kind code CPE CONTAINER code for the given path The path of the container will be used during resolution so as to map this container entry to a set of other classpath entries the container is acting for p A container entry allows to express indirect references to a set of libraries projects and variable entries which can be interpreted differently for each Java project where it is used A classpath container entry can be resolved using code Java Core get Resolved Classpath Container code and updated with code Java Core classpath Container Changed code p A container is exclusively resolved by a code Classpath Container Initializer code registered onto the extension point org eclipse jdt core classpath Container Initializer p A container path must be formed of at least one segment where ul li the first segment is a unique ID identifying the target container there must be a container initializer registered onto this ID through the extension point org eclipse jdt core classpath Container Initializer li li the remaining segments will be passed onto the initializer and can be used as additional hints during the initialization phase li ul p Example of an Classpath Container Initializer for a classpath container denoting a default JDK container container Entry Java Core new Container Entry new Path My ProvidedJDK default extension point org eclipse jdt core classpath Container Initializer container Initializer id My ProvidedJDK class com example My Initializer p Note that this operation does not attempt to validate classpath containers or access the resources at the given paths p The resulting entry is not exported to dependent projects This method is equivalent to code new Container Entry false code p param container Path the path identifying the container it must be formed of two segments return a new container classpath entry see Java Core get Classpath Container I Path I Java Project see Java Core new Container Entry I Path boolean since 2 0 public static I Classpath Entry new Container Entry I Path container Path return new Container Entry container Path false  CPE_CONTAINER JavaCore getResolvedClasspathContainer JavaCore classpathContainerChanged ClasspathContainerInitializer classpathContainerInitializer classpathContainerInitializer ClasspathContainerInitializer containerEntry JavaCore newContainerEntry MyProvidedJDK classpathContainerInitializer containerInitializer MyProvidedJDK MyInitializer newContainerEntry containerPath JavaCore getClasspathContainer IPath IJavaProject JavaCore newContainerEntry IPath IClasspathEntry newContainerEntry IPath containerPath newContainerEntry containerPath
Creates and returns a new classpath entry of kind code CPE CONTAINER code for the given path The path of the container will be used during resolution so as to map this container entry to a set of other classpath entries the container is acting for p A container entry allows to express indirect references to a set of libraries projects and variable entries which can be interpreted differently for each Java project where it is used A classpath container entry can be resolved using code Java Core get Resolved Classpath Container code and updated with code Java Core classpath Container Changed code p A container is exclusively resolved by a code Classpath Container Initializer code registered onto the extension point org eclipse jdt core classpath Container Initializer p A container path must be formed of at least one segment where ul li the first segment is a unique ID identifying the target container there must be a container initializer registered onto this ID through the extension point org eclipse jdt core classpath Container Initializer li li the remaining segments will be passed onto the initializer and can be used as additional hints during the initialization phase li ul p Example of an Classpath Container Initializer for a classpath container denoting a default JDK container container Entry Java Core new Container Entry new Path My ProvidedJDK default extension point org eclipse jdt core classpath Container Initializer container Initializer id My ProvidedJDK class com example My Initializer p Note that this operation does not attempt to validate classpath containers or access the resources at the given paths p param container Path the path identifying the container it must be formed of at least one segment ID hints param is Exported a boolean indicating whether this entry is contributed to dependent projects in addition to the output location return a new container classpath entry see Java Core get Classpath Container I Path I Java Project see Java Core set Classpath Container I Path I Java Project I Classpath Container I Progress Monitor see Java Core new Container Entry I Path boolean since 2 0 public static I Classpath Entry new Container Entry I Path container Path boolean is Exported if container Path null Assert is True false Container path cannot be null NON NLS 1 if container Path segment Count 1 Assert is True false Illegal classpath container path container Path make Relative to String must have at least one segment containerID hints NON NLS 1 NON NLS 2 return new Classpath Entry I Package Fragment Root K SOURCE I Classpath Entry CPE CONTAINER container Path Classpath Entry INCLUDE ALL Classpath Entry EXCLUDE NONE null source attachment null source attachment root null specific output folder is Exported  CPE_CONTAINER JavaCore getResolvedClasspathContainer JavaCore classpathContainerChanged ClasspathContainerInitializer classpathContainerInitializer classpathContainerInitializer ClasspathContainerInitializer containerEntry JavaCore newContainerEntry MyProvidedJDK classpathContainerInitializer containerInitializer MyProvidedJDK MyInitializer containerPath isExported JavaCore getClasspathContainer IPath IJavaProject JavaCore setClasspathContainer IPath IJavaProject IClasspathContainer IProgressMonitor JavaCore newContainerEntry IPath IClasspathEntry newContainerEntry IPath containerPath isExported containerPath isTrue containerPath segmentCount isTrue containerPath makeRelative toString ClasspathEntry IPackageFragmentRoot K_SOURCE IClasspathEntry CPE_CONTAINER containerPath ClasspathEntry INCLUDE_ALL ClasspathEntry EXCLUDE_NONE isExported
Creates and returns a new non exported classpath entry of kind code CPE LIBRARY code for the JAR or folder identified by the given absolute path This specifies that all package fragments within the root will have children of type code I Class File code p A library entry is used to denote a prerequisite JAR or root folder containing binaries The target JAR can either be defined internally to the workspace absolute path relative to the workspace root or externally to the workspace absolute path in the file system The target root folder can only be defined internally to the workspace absolute path relative to the workspace root To use a binary folder external to the workspace it must first be linked see I Folder create Link p e g Here are some examples of binary path usage ul li code c jdk1 2 2 jre lib rt jar code reference to an external JAR li li code Project some Lib jar code reference to an internal JAR li li code Project classes code reference to an internal binary folder li ul Note that this operation does not attempt to validate or access the resources at the given paths p The resulting entry is not exported to dependent projects This method is equivalent to code new Library Entry false code p param path the absolute path of the binary archive param source Attachment Path the absolute path of the corresponding source archive or folder or code null code if none Note since 3 0 an empty path is allowed to denote no source attachment and will be automatically converted to code null code param source Attachment Root Path the location of the root within the source archive or folder or code null code if this location should be automatically detected return a new library classpath entry see new Library Entry I Path I Path I Path boolean public static I Classpath Entry new Library Entry I Path path I Path source Attachment Path I Path source Attachment Root Path return new Library Entry path source Attachment Path source Attachment Root Path false  CPE_LIBRARY IClassFile IFolder createLink someLib newLibraryEntry sourceAttachmentPath sourceAttachmentRootPath newLibraryEntry IPath IPath IPath IClasspathEntry newLibraryEntry IPath IPath sourceAttachmentPath IPath sourceAttachmentRootPath newLibraryEntry sourceAttachmentPath sourceAttachmentRootPath
Creates and returns a new classpath entry of kind code CPE LIBRARY code for the JAR or folder identified by the given absolute path This specifies that all package fragments within the root will have children of type code I Class File code p A library entry is used to denote a prerequisite JAR or root folder containing binaries The target JAR can either be defined internally to the workspace absolute path relative to the workspace root or externally to the workspace absolute path in the file system The target root folder can only be defined internally to the workspace absolute path relative to the workspace root To use a binary folder external to the workspace it must first be linked see I Folder create Link p e g Here are some examples of binary path usage ul li code c jdk1 2 2 jre lib rt jar code reference to an external JAR li li code Project some Lib jar code reference to an internal JAR li li code Project classes code reference to an internal binary folder li ul Note that this operation does not attempt to validate or access the resources at the given paths p param path the absolute path of the binary archive param source Attachment Path the absolute path of the corresponding source archive or folder or code null code if none Note since 3 0 an empty path is allowed to denote no source attachment and will be automatically converted to code null code param source Attachment Root Path the location of the root within the source archive or folder or code null code if this location should be automatically detected param is Exported indicates whether this entry is contributed to dependent projects in addition to the output location return a new library classpath entry since 2 0 public static I Classpath Entry new Library Entry I Path path I Path source Attachment Path I Path source Attachment Root Path boolean is Exported if path null Assert is True false Library path cannot be null NON NLS 1 if path is Absolute Assert is True false Path for I Classpath Entry must be absolute NON NLS 1 if source Attachment Path null if source Attachment Path is Empty source Attachment Path null treat empty path as none else if source Attachment Path is Absolute Assert is True false Source attachment path NON NLS 1 source Attachment Path for I Classpath Entry must be absolute NON NLS 1 return new Classpath Entry I Package Fragment Root K BINARY I Classpath Entry CPE LIBRARY Java Project canonicalized Path path Classpath Entry INCLUDE ALL Classpath Entry EXCLUDE NONE source Attachment Path source Attachment Root Path null specific output folder is Exported  CPE_LIBRARY IClassFile IFolder createLink someLib sourceAttachmentPath sourceAttachmentRootPath isExported IClasspathEntry newLibraryEntry IPath IPath sourceAttachmentPath IPath sourceAttachmentRootPath isExported isTrue isAbsolute isTrue IClasspathEntry sourceAttachmentPath sourceAttachmentPath isEmpty sourceAttachmentPath sourceAttachmentPath isAbsolute isTrue sourceAttachmentPath IClasspathEntry ClasspathEntry IPackageFragmentRoot K_BINARY IClasspathEntry CPE_LIBRARY JavaProject canonicalizedPath ClasspathEntry INCLUDE_ALL ClasspathEntry EXCLUDE_NONE sourceAttachmentPath sourceAttachmentRootPath isExported
Creates and returns a new non exported classpath entry of kind code CPE PROJECT code for the project identified by the given absolute path p A project entry is used to denote a prerequisite project on a classpath The referenced project will be contributed as a whole either as sources in the Java Model it contributes all its package fragment roots or as binaries when building it contributes its whole output location p A project reference allows to indirect through another project independently from its internal layout p The prerequisite project is referred to using an absolute path relative to the workspace root p The resulting entry is not exported to dependent projects This method is equivalent to code new Project Entry   false code p param path the absolute path of the binary archive return a new project classpath entry see Java Core new Project Entry I Path boolean public static I Classpath Entry new Project Entry I Path path return new Project Entry path false  CPE_PROJECT newProjectEntry _ JavaCore newProjectEntry IPath IClasspathEntry newProjectEntry IPath newProjectEntry
Creates and returns a new classpath entry of kind code CPE PROJECT code for the project identified by the given absolute path p A project entry is used to denote a prerequisite project on a classpath The referenced project will be contributed as a whole either as sources in the Java Model it contributes all its package fragment roots or as binaries when building it contributes its whole output location p A project reference allows to indirect through another project independently from its internal layout p The prerequisite project is referred to using an absolute path relative to the workspace root p param path the absolute path of the prerequisite project param is Exported indicates whether this entry is contributed to dependent projects in addition to the output location return a new project classpath entry since 2 0 public static I Classpath Entry new Project Entry I Path path boolean is Exported if path is Absolute Assert is True false Path for I Classpath Entry must be absolute NON NLS 1 return new Classpath Entry I Package Fragment Root K SOURCE I Classpath Entry CPE PROJECT path Classpath Entry INCLUDE ALL Classpath Entry EXCLUDE NONE null source attachment null source attachment root null specific output folder is Exported  CPE_PROJECT isExported IClasspathEntry newProjectEntry IPath isExported isAbsolute isTrue IClasspathEntry ClasspathEntry IPackageFragmentRoot K_SOURCE IClasspathEntry CPE_PROJECT ClasspathEntry INCLUDE_ALL ClasspathEntry EXCLUDE_NONE isExported
Returns a new empty region return a new empty region public static I Region new Region return new Region  IRegion newRegion
Creates and returns a new classpath entry of kind code CPE SOURCE code for all files in the project s source folder identified by the given absolute workspace relative path p The convenience method is fully equivalent to pre new Source Entry path new I Path new I Path null pre p param path the absolute workspace relative path of a source folder return a new source classpath entry see new Source Entry I Path I Path I Path I Path public static I Classpath Entry new Source Entry I Path path return new Source Entry path Classpath Entry INCLUDE ALL Classpath Entry EXCLUDE NONE null output location  CPE_SOURCE newSourceEntry IPath IPath newSourceEntry IPath IPath IPath IPath IClasspathEntry newSourceEntry IPath newSourceEntry ClasspathEntry INCLUDE_ALL ClasspathEntry EXCLUDE_NONE
Creates and returns a new classpath entry of kind code CPE SOURCE code for the project s source folder identified by the given absolute workspace relative path but excluding all source files with paths matching any of the given patterns p The convenience method is fully equivalent to pre new Source Entry path new I Path exclusion Patterns null pre p param path the absolute workspace relative path of a source folder param exclusion Patterns the possibly empty list of exclusion patterns represented as relative paths return a new source classpath entry see new Source Entry I Path I Path I Path I Path since 2 1 public static I Classpath Entry new Source Entry I Path path I Path exclusion Patterns return new Source Entry path Classpath Entry INCLUDE ALL exclusion Patterns null output location  CPE_SOURCE newSourceEntry IPath exclusionPatterns exclusionPatterns newSourceEntry IPath IPath IPath IPath IClasspathEntry newSourceEntry IPath IPath exclusionPatterns newSourceEntry ClasspathEntry INCLUDE_ALL exclusionPatterns
Creates and returns a new classpath entry of kind code CPE SOURCE code for the project s source folder identified by the given absolute workspace relative path but excluding all source files with paths matching any of the given patterns and associated with a specific output location that is class files are not going to the project default output location p The convenience method is fully equivalent to pre new Source Entry path new I Path exclusion Patterns specific Output Location pre p param path the absolute workspace relative path of a source folder param exclusion Patterns the possibly empty list of exclusion patterns represented as relative paths param specific Output Location the specific output location for this source entry code null code if using project default ouput location return a new source classpath entry see new Source Entry I Path I Path I Path I Path since 2 1 public static I Classpath Entry new Source Entry I Path path I Path exclusion Patterns I Path specific Output Location return new Source Entry path Classpath Entry INCLUDE ALL exclusion Patterns specific Output Location  CPE_SOURCE newSourceEntry IPath exclusionPatterns specificOutputLocation exclusionPatterns specificOutputLocation newSourceEntry IPath IPath IPath IPath IClasspathEntry newSourceEntry IPath IPath exclusionPatterns IPath specificOutputLocation newSourceEntry ClasspathEntry INCLUDE_ALL exclusionPatterns specificOutputLocation
Creates and returns a new classpath entry of kind code CPE SOURCE code for the project s source folder identified by the given absolute workspace relative path using the given inclusion and exclusion patterns to determine which source files are included and the given output path to control the output location of generated files p The source folder is referred to using an absolute path relative to the workspace root e g code Project src code A project s source folders are located with that project That is a source classpath entry specifying the path code P1 src code is only usable for project code P1 code p p The inclusion patterns determines the initial set of source files that are to be included the exclusion patterns are then used to reduce this set When no inclusion patterns are specified the initial file set includes all relevent files in the resource tree rooted at the source entry s path On the other hand specifying one or more inclusion patterns means that all b and only b files matching at least one of the specified patterns are to be included If exclusion patterns are specified the initial set of files is then reduced by eliminating files matched by at least one of the exclusion patterns Inclusion and exclusion patterns look like relative file paths with wildcards and are interpreted relative to the source entry s path File patterns are case sensitive can contain or wildcards see link I Classpath Entry get Exclusion Patterns for the full description of their syntax and semantics The resulting set of files are included in the corresponding package fragment root all package fragments within the root will have children of type code I Compilation Unit code p p For example if the source folder path is code Project src code there are no inclusion filters and the exclusion pattern is code com xyz tests 42 42 code then source files like code Project src com xyz Foo java code and code Project src com xyz utils Bar java code would be included whereas code Project src com xyz tests T1 java code and code Project src com xyz tests quick T2 java code would be excluded p p Additionally a source entry can be associated with a specific output location By doing so the Java builder will ensure that the generated class files will be issued inside this output location as opposed to be generated into the project default output location when output location is code null code Note that multiple source entries may target the same output location The output location is referred to using an absolute path relative to the workspace root e g code Project bin code it must be located inside the same project as the source folder p p Also note that all sources binaries inside a project are contributed as a whole through a project entry see code Java Core new Project Entry code Particular source entries cannot be selectively exported p param path the absolute workspace relative path of a source folder param inclusion Patterns the possibly empty list of inclusion patterns represented as relative paths param exclusion Patterns the possibly empty list of exclusion patterns represented as relative paths param specific Output Location the specific output location for this source entry code null code if using project default ouput location return a new source classpath entry with the given exclusion patterns see I Classpath Entry get Inclusion Patterns see I Classpath Entry get Exclusion Patterns see I Classpath Entry get Output Location since 3 0 public static I Classpath Entry new Source Entry I Path path I Path inclusion Patterns I Path exclusion Patterns I Path specific Output Location if path null Assert is True false Source path cannot be null NON NLS 1 if path is Absolute Assert is True false Path for I Classpath Entry must be absolute NON NLS 1 if exclusion Patterns null Assert is True false Exclusion pattern set cannot be null NON NLS 1 if inclusion Patterns null Assert is True false Inclusion pattern set cannot be null NON NLS 1 return new Classpath Entry I Package Fragment Root K SOURCE I Classpath Entry CPE SOURCE path inclusion Patterns exclusion Patterns null source attachment null source attachment root specific Output Location custom output location false  CPE_SOURCE IClasspathEntry getExclusionPatterns ICompilationUnit JavaCore newProjectEntry inclusionPatterns exclusionPatterns specificOutputLocation IClasspathEntry getInclusionPatterns IClasspathEntry getExclusionPatterns IClasspathEntry getOutputLocation IClasspathEntry newSourceEntry IPath IPath inclusionPatterns IPath exclusionPatterns IPath specificOutputLocation isTrue isAbsolute isTrue IClasspathEntry exclusionPatterns isTrue inclusionPatterns isTrue ClasspathEntry IPackageFragmentRoot K_SOURCE IClasspathEntry CPE_SOURCE inclusionPatterns exclusionPatterns specificOutputLocation
Creates and returns a new non exported classpath entry of kind code CPE VARIABLE code for the given path The first segment of the path is the name of a classpath variable The trailing segments of the path will be appended to resolved variable path p A variable entry allows to express indirect references on a classpath to other projects or libraries depending on what the classpath variable is referring p It is possible to register an automatic initializer code Classpath Variable Initializer code which will be invoked through the extension point org eclipse jdt core classpath Variable Initializer After resolution a classpath variable entry may either correspond to a project or a library entry li p e g Here are some examples of variable path usage ul li JDTCORE where variable code JDTCORE code is bound to c jars jdtcore jar The resolved classpath entry is denoting the library c jars jdtcore jar li li JDTCORE where variable code JDTCORE code is bound to Project JDTCORE The resolved classpath entry is denoting the project Project JDTCORE li li PLUGINS com example example jar where variable code PLUGINS code is bound to c eclipse plugins The resolved classpath entry is denoting the library c eclipse plugins com example example jar li ul Note that this operation does not attempt to validate classpath variables or access the resources at the given paths p The resulting entry is not exported to dependent projects This method is equivalent to code new Variable Entry false code p param variable Path the path of the binary archive first segment is the name of a classpath variable param variable Source Attachment Path the path of the corresponding source archive or code null code if none if present the first segment is the name of a classpath variable not necessarily the same variable as the one that begins code variable Path code param source Attachment Root Path the location of the root within the source archive or code null code if code archive Path code is also code null code return a new library classpath entry see Java Core new Variable Entry I Path I Path I Path boolean public static I Classpath Entry new Variable Entry I Path variable Path I Path variable Source Attachment Path I Path source Attachment Root Path return new Variable Entry variable Path variable Source Attachment Path source Attachment Root Path false  CPE_VARIABLE ClasspathVariableInitializer classpathVariableInitializer Project_JDTCORE Project_JDTCORE newVariableEntry variablePath variableSourceAttachmentPath variablePath sourceAttachmentRootPath archivePath JavaCore newVariableEntry IPath IPath IPath IClasspathEntry newVariableEntry IPath variablePath IPath variableSourceAttachmentPath IPath sourceAttachmentRootPath newVariableEntry variablePath variableSourceAttachmentPath sourceAttachmentRootPath
Creates and returns a new non exported classpath entry of kind code CPE VARIABLE code for the given path The first segment of the path is the name of a classpath variable The trailing segments of the path will be appended to resolved variable path p A variable entry allows to express indirect references on a classpath to other projects or libraries depending on what the classpath variable is referring p It is possible to register an automatic initializer code Classpath Variable Initializer code which will be invoked through the extension point org eclipse jdt core classpath Variable Initializer After resolution a classpath variable entry may either correspond to a project or a library entry li p e g Here are some examples of variable path usage ul li JDTCORE where variable code JDTCORE code is bound to c jars jdtcore jar The resolved classpath entry is denoting the library c jars jdtcore jar li li JDTCORE where variable code JDTCORE code is bound to Project JDTCORE The resolved classpath entry is denoting the project Project JDTCORE li li PLUGINS com example example jar where variable code PLUGINS code is bound to c eclipse plugins The resolved classpath entry is denoting the library c eclipse plugins com example example jar li ul Note that this operation does not attempt to validate classpath variables or access the resources at the given paths p param variable Path the path of the binary archive first segment is the name of a classpath variable param variable Source Attachment Path the path of the corresponding source archive or code null code if none if present the first segment is the name of a classpath variable not necessarily the same variable as the one that begins code variable Path code param variable Source Attachment Root Path the location of the root within the source archive or code null code if code archive Path code is also code null code param is Exported indicates whether this entry is contributed to dependent projects in addition to the output location return a new variable classpath entry since 2 0 public static I Classpath Entry new Variable Entry I Path variable Path I Path variable Source Attachment Path I Path variable Source Attachment Root Path boolean is Exported if variable Path null Assert is True false Variable path cannot be null NON NLS 1 if variable Path segment Count 1 Assert is True false Illegal classpath variable path variable Path make Relative to String must have at least one segment NON NLS 1 NON NLS 2 return new Classpath Entry I Package Fragment Root K SOURCE I Classpath Entry CPE VARIABLE variable Path Classpath Entry INCLUDE ALL Classpath Entry EXCLUDE NONE variable Source Attachment Path source attachment variable Source Attachment Root Path source attachment root null specific output folder is Exported  CPE_VARIABLE ClasspathVariableInitializer classpathVariableInitializer Project_JDTCORE Project_JDTCORE variablePath variableSourceAttachmentPath variablePath variableSourceAttachmentRootPath archivePath isExported IClasspathEntry newVariableEntry IPath variablePath IPath variableSourceAttachmentPath IPath variableSourceAttachmentRootPath isExported variablePath isTrue variablePath segmentCount isTrue variablePath makeRelative toString ClasspathEntry IPackageFragmentRoot K_SOURCE IClasspathEntry CPE_VARIABLE variablePath ClasspathEntry INCLUDE_ALL ClasspathEntry EXCLUDE_NONE variableSourceAttachmentPath variableSourceAttachmentRootPath isExported
Removed the given classpath variable Does nothing if no value was set for this classpath variable p This functionality cannot be used while the resource tree is locked p Classpath variable values are persisted locally to the workspace and are preserved from session to session p param variable Name the name of the classpath variable see set Classpath Variable String I Path deprecated use version with extra I Progress Monitor public static void remove Classpath Variable String variable Name remove Classpath Variable variable Name null  variableName setClasspathVariable IPath IProgressMonitor removeClasspathVariable variableName removeClasspathVariable variableName
Removed the given classpath variable Does nothing if no value was set for this classpath variable p This functionality cannot be used while the resource tree is locked p Classpath variable values are persisted locally to the workspace and are preserved from session to session p param variable Name the name of the classpath variable param monitor the progress monitor to report progress see set Classpath Variable String I Path public static void remove Classpath Variable String variable Name I Progress Monitor monitor try Java Model Manager get Java Model Manager update Variable Values new String variable Name new I Path null monitor catch Java Model Exception e cannot happen ignore  variableName setClasspathVariable IPath removeClasspathVariable variableName IProgressMonitor JavaModelManager getJavaModelManager updateVariableValues variableName IPath JavaModelException
Removes the given element changed listener Has no affect if an identical listener is not registered param listener the listener public static void remove Element Changed Listener I Element Changed Listener listener Java Model Manager get Java Model Manager delta State remove Element Changed Listener listener  removeElementChangedListener IElementChangedListener JavaModelManager getJavaModelManager deltaState removeElementChangedListener
Removes the given pre processing resource changed listener p Has no affect if an identical listener is not registered param listener the listener since 3 0 public static void remove Pre Processing Resource Changed Listener I Resource Change Listener listener Java Model Manager get Java Model Manager delta State remove Pre Resource Changed Listener listener  removePreProcessingResourceChangedListener IResourceChangeListener JavaModelManager getJavaModelManager deltaState removePreResourceChangedListener
Runs the given action as an atomic Java model operation p After running a method that modifies java elements registered listeners receive after the fact notification of what just transpired in the form of a element changed event This method allows clients to call a number of methods that modify java elements and only have element changed event notifications reported at the end of the entire batch p p If this method is called outside the dynamic scope of another such call this method runs the action and then reports a single element changed event describing the net effect of all changes done to java elements by the action p p If this method is called in the dynamic scope of another such call this method simply runs the action p param action the action to perform param monitor a progress monitor or code null code if progress reporting and cancellation are not desired exception Core Exception if the operation failed since 2 1 public static void run I Workspace Runnable action I Progress Monitor monitor throws Core Exception run action Resources Plugin get Workspace get Root monitor  CoreException IWorkspaceRunnable IProgressMonitor CoreException ResourcesPlugin getWorkspace getRoot
Runs the given action as an atomic Java model operation p After running a method that modifies java elements registered listeners receive after the fact notification of what just transpired in the form of a element changed event This method allows clients to call a number of methods that modify java elements and only have element changed event notifications reported at the end of the entire batch p p If this method is called outside the dynamic scope of another such call this method runs the action and then reports a single element changed event describing the net effect of all changes done to java elements by the action p p If this method is called in the dynamic scope of another such call this method simply runs the action p p The supplied scheduling rule is used to determine whether this operation can be run simultaneously with workspace changes in other threads See code I Workspace run code for more details p param action the action to perform param rule the scheduling rule to use when running this operation or code null code if there are no scheduling restrictions for this operation param monitor a progress monitor or code null code if progress reporting and cancellation are not desired exception Core Exception if the operation failed since 3 0 public static void run I Workspace Runnable action I Scheduling Rule rule I Progress Monitor monitor throws Core Exception I Workspace workspace Resources Plugin get Workspace if workspace is Tree Locked new Batch Operation action run monitor else use I Workspace run to ensure that a build will be done in autobuild mode workspace run new Batch Operation action rule I Workspace AVOID UPDATE monitor  IWorkspace CoreException IWorkspaceRunnable ISchedulingRule IProgressMonitor CoreException IWorkspace ResourcesPlugin getWorkspace isTreeLocked BatchOperation IWorkspace BatchOperation IWorkspace AVOID_UPDATE
affected Projects new org eclipse jdt internal compiler util Util Displayable public String display String Object o return I Java Project o get Element Name  affectedProjects displayString IJavaProject getElementName
new org eclipse jdt internal compiler util Util Displayable public String display String Object o String Buffer buffer new String Buffer NON NLS 1 if o null buffer append null NON NLS 1 return buffer to String I Classpath Container container I Classpath Container o buffer append container get Description buffer append n NON NLS 1 I Classpath Entry entries container get Classpath Entries if entries null for int i 0 i entries length i buffer append NON NLS 1 buffer append entries i buffer append n buffer append NON NLS 1 return buffer to String  displayString StringBuffer StringBuffer toString IClasspathContainer IClasspathContainer getDescription IClasspathEntry getClasspathEntries toString
Java Core run new I Workspace Runnable public void run I Progress Monitor progress Monitor throws Core Exception for int i 0 i project Length i if progress Monitor null progress Monitor is Canceled return Java Project affected Project Java Project modified Projects i if affected Project null continue was filtered out if Java Model Manager CP RESOLVE VERBOSE Util verbose CP Container SET updating affected project due to setting container n NON NLS 1 project affected Project get Element Name n NON NLS 1 container path container Path NON NLS 1 force a refresh of the affected project will compute deltas affected Project set Raw Classpath affected Project get Raw Classpath Set Classpath Operation Reuse Output Location progress Monitor can Change Resources old Resolved Paths i false updating no need for early validation false updating no need to save  JavaCore IWorkspaceRunnable IProgressMonitor progressMonitor CoreException projectLength progressMonitor progressMonitor isCanceled JavaProject affectedProject JavaProject modifiedProjects affectedProject JavaModelManager CP_RESOLVE_VERBOSE CPContainer affectedProject getElementName containerPath affectedProject setRawClasspath affectedProject getRawClasspath SetClasspathOperation ReuseOutputLocation progressMonitor canChangeResources oldResolvedPaths
Bind a container reference path to some actual containers code I Classpath Container code This API must be invoked whenever changes in container need to be reflected onto the Java Model Containers can have distinct values in different projects therefore this API considers a set of projects with their respective containers p code container Path code is the path under which these values can be referenced through container classpath entries code I Classpath Entry CPE CONTAINER code A container path is formed by a first ID segment followed with extra segments which can be used as additional hints for the resolution The container ID is used to identify a code Classpath Container Initializer code registered on the extension point org eclipse jdt core classpath Container Initializer p There is no assumption that each individual container value passed in argument code respective Containers code must answer the exact same path when requested code I Classpath Container get Path code Indeed the container Path is just an indication for resolving it to an actual container object It can be delegated to a code Classpath Container Initializer code which can be activated through the extension point org eclipse jdt core Classpath Container Initializer p In reaction to changing container values the Java Model will be updated to reflect the new state of the updated container A combined Java element delta will be notified to describe the corresponding classpath changes resulting from the container update This operation is batched and automatically eliminates unnecessary updates new container is same as old one This operation acquires a lock on the workspace s root p This functionality cannot be used while the workspace is locked since it may create remove some resource markers p Classpath container values are persisted locally to the workspace but are not preserved from a session to another It is thus highly recommended to register a code Classpath Container Initializer code for each referenced container through the extension point org eclipse jdt core Classpath Container Initializer p Note setting a container to code null code will cause it to be lazily resolved again whenever its value is required In particular this will cause a registered initializer to be invoked again p param container Path the name of the container reference which is being updated param affected Projects the set of projects for which this container is being bound param respective Containers the set of respective containers for the affected projects param monitor a monitor to report progress throws Java Model Exception see Classpath Container Initializer see get Classpath Container I Path I Java Project see I Classpath Container since 2 0 public static void set Classpath Container final I Path container Path I Java Project affected Projects I Classpath Container respective Containers I Progress Monitor monitor throws Java Model Exception if affected Projects length respective Containers length Assert is True false Projects and containers collections should have the same size NON NLS 1 if monitor null monitor is Canceled return if Java Model Manager CP RESOLVE VERBOSE Util verbose CP Container SET setting container n NON NLS 1 container path container Path n NON NLS 1 projects NON NLS 1 org eclipse jdt internal compiler util Util to String affected Projects new org eclipse jdt internal compiler util Util Displayable public String display String Object o return I Java Project o get Element Name n values n NON NLS 1 org eclipse jdt internal compiler util Util to String respective Containers new org eclipse jdt internal compiler util Util Displayable public String display String Object o String Buffer buffer new String Buffer NON NLS 1 if o null buffer append null NON NLS 1 return buffer to String I Classpath Container container I Classpath Container o buffer append container get Description buffer append n NON NLS 1 I Classpath Entry entries container get Classpath Entries if entries null for int i 0 i entries length i buffer append NON NLS 1 buffer append entries i buffer append n buffer append NON NLS 1 return buffer to String n n invocation stack trace NON NLS 1 new Exception Fake exception print Stack Trace System out NON NLS 1 final int project Length affected Projects length final I Java Project modified Projects System arraycopy affected Projects 0 modified Projects new I Java Project project Length 0 project Length final I Classpath Entry old Resolved Paths new I Classpath Entry project Length filter out unmodified project containers int remaining 0 for int i 0 i project Length i if monitor null monitor is Canceled return Java Project affected Project Java Project affected Projects i I Classpath Container new Container respective Containers i if new Container null new Container Java Model Manager CONTAINER INITIALIZATION IN PROGRESS 30920 prevent infinite loop boolean found false if Java Project has Java Nature affected Project get Project I Classpath Entry raw Classpath affected Project get Raw Classpath for int j 0 cp Length raw Classpath length j cp Length j I Classpath Entry entry raw Classpath j if entry get Entry Kind I Classpath Entry CPE CONTAINER entry get Path equals container Path found true break if found modified Projects i null filter out this project does not reference the container path or isnt t yet Java project Java Model Manager get Java Model Manager container Put affected Project container Path new Container continue I Classpath Container old Container Java Model Manager get Java Model Manager container Get affected Project container Path if old Container Java Model Manager CONTAINER INITIALIZATION IN PROGRESS Map previous Container Values Map Java Model Manager get Java Model Manager previous Session Containers get affected Project if previous Container Values null I Classpath Container previous Container I Classpath Container previous Container Values get container Path if previous Container null if Java Model Manager CP RESOLVE VERBOSE String Buffer buffer new String Buffer buffer append CP Container INIT reentering access to project container during its initialization will see previous value n NON NLS 1 buffer append project affected Project get Element Name n NON NLS 1 buffer append container path container Path n NON NLS 1 buffer append previous value NON NLS 1 buffer append previous Container get Description buffer append n NON NLS 1 I Classpath Entry entries previous Container get Classpath Entries if entries null for int j 0 j entries length j buffer append NON NLS 1 buffer append entries j buffer append n buffer append NON NLS 1 Util verbose buffer to String Java Model Manager get Java Model Manager container Put affected Project container Path previous Container old Container null 33695 cannot filter out restored container must update affected project to reset cached CP else old Container null if old Container null old Container equals respective Containers i modified Projects i null filter out this project container did not change continue remaining old Resolved Paths i affected Project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress Java Model Manager get Java Model Manager container Put affected Project container Path new Container if remaining 0 return trigger model refresh try final boolean can Change Resources Resources Plugin get Workspace is Tree Locked Java Core run new I Workspace Runnable public void run I Progress Monitor progress Monitor throws Core Exception for int i 0 i project Length i if progress Monitor null progress Monitor is Canceled return Java Project affected Project Java Project modified Projects i if affected Project null continue was filtered out if Java Model Manager CP RESOLVE VERBOSE Util verbose CP Container SET updating affected project due to setting container n NON NLS 1 project affected Project get Element Name n NON NLS 1 container path container Path NON NLS 1 force a refresh of the affected project will compute deltas affected Project set Raw Classpath affected Project get Raw Classpath Set Classpath Operation Reuse Output Location progress Monitor can Change Resources old Resolved Paths i false updating no need for early validation false updating no need to save  IClasspathContainer JavaModel containerPath IClasspathEntry CPE_CONTAINER ClasspathContainerInitializer classpathContainerInitializer respectiveContainers IClasspathContainer getPath containerPath ClasspathContainerInitializer ClasspathContainerInitializer JavaModel ClasspathContainerInitializer ClasspathContainerInitializer containerPath affectedProjects respectiveContainers JavaModelException ClasspathContainerInitializer getClasspathContainer IPath IJavaProject IClasspathContainer setClasspathContainer IPath containerPath IJavaProject affectedProjects IClasspathContainer respectiveContainers IProgressMonitor JavaModelException affectedProjects respectiveContainers isTrue isCanceled JavaModelManager CP_RESOLVE_VERBOSE CPContainer containerPath toString affectedProjects displayString IJavaProject getElementName toString respectiveContainers displayString StringBuffer StringBuffer toString IClasspathContainer IClasspathContainer getDescription IClasspathEntry getClasspathEntries toString printStackTrace projectLength affectedProjects IJavaProject modifiedProjects affectedProjects modifiedProjects IJavaProject projectLength projectLength IClasspathEntry oldResolvedPaths IClasspathEntry projectLength projectLength isCanceled JavaProject affectedProject JavaProject affectedProjects IClasspathContainer newContainer respectiveContainers newContainer newContainer JavaModelManager CONTAINER_INITIALIZATION_IN_PROGRESS JavaProject hasJavaNature affectedProject getProject IClasspathEntry rawClasspath affectedProject getRawClasspath cpLength rawClasspath cpLength IClasspathEntry rawClasspath getEntryKind IClasspathEntry CPE_CONTAINER getPath containerPath modifiedProjects JavaModelManager getJavaModelManager containerPut affectedProject containerPath newContainer IClasspathContainer oldContainer JavaModelManager getJavaModelManager containerGet affectedProject containerPath oldContainer JavaModelManager CONTAINER_INITIALIZATION_IN_PROGRESS previousContainerValues JavaModelManager getJavaModelManager previousSessionContainers affectedProject previousContainerValues IClasspathContainer previousContainer IClasspathContainer previousContainerValues containerPath previousContainer JavaModelManager CP_RESOLVE_VERBOSE StringBuffer StringBuffer CPContainer affectedProject getElementName containerPath previousContainer getDescription IClasspathEntry previousContainer getClasspathEntries toString JavaModelManager getJavaModelManager containerPut affectedProject containerPath previousContainer oldContainer oldContainer oldContainer oldContainer respectiveContainers modifiedProjects oldResolvedPaths affectedProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress JavaModelManager getJavaModelManager containerPut affectedProject containerPath newContainer canChangeResources ResourcesPlugin getWorkspace isTreeLocked JavaCore IWorkspaceRunnable IProgressMonitor progressMonitor CoreException projectLength progressMonitor progressMonitor isCanceled JavaProject affectedProject JavaProject modifiedProjects affectedProject JavaModelManager CP_RESOLVE_VERBOSE CPContainer affectedProject getElementName containerPath affectedProject setRawClasspath affectedProject getRawClasspath SetClasspathOperation ReuseOutputLocation progressMonitor canChangeResources oldResolvedPaths
Sets the value of the given classpath variable The path must have at least one segment p This functionality cannot be used while the resource tree is locked p Classpath variable values are persisted locally to the workspace and are preserved from session to session p param variable Name the name of the classpath variable param path the path throws Java Model Exception see get Classpath Variable String deprecated use API with I Progress Monitor public static void set Classpath Variable String variable Name I Path path throws Java Model Exception set Classpath Variable variable Name path null  variableName JavaModelException getClasspathVariable IProgressMonitor setClasspathVariable variableName IPath JavaModelException setClasspathVariable variableName
Sets the value of the given classpath variable The path must not be null p This functionality cannot be used while the resource tree is locked p Classpath variable values are persisted locally to the workspace and are preserved from session to session p Updating a variable with the same value has no effect param variable Name the name of the classpath variable param path the path param monitor a monitor to report progress throws Java Model Exception see get Classpath Variable String public static void set Classpath Variable String variable Name I Path path I Progress Monitor monitor throws Java Model Exception if path null Assert is True false Variable path cannot be null NON NLS 1 set Classpath Variables new String variable Name new I Path path monitor  variableName JavaModelException getClasspathVariable setClasspathVariable variableName IPath IProgressMonitor JavaModelException isTrue setClasspathVariables variableName IPath
Sets the values of all the given classpath variables at once Null paths can be used to request corresponding variable removal p A combined Java element delta will be notified to describe the corresponding classpath changes resulting from the variables update This operation is batched and automatically eliminates unnecessary updates new variable is same as old one This operation acquires a lock on the workspace s root p This functionality cannot be used while the workspace is locked since it may create remove some resource markers p Classpath variable values are persisted locally to the workspace and are preserved from session to session p Updating a variable with the same value has no effect param variable Names an array of names for the updated classpath variables param paths an array of path updates for the modified classpath variables null meaning that the corresponding value will be removed param monitor a monitor to report progress throws Java Model Exception see get Classpath Variable String since 2 0 public static void set Classpath Variables String variable Names I Path paths I Progress Monitor monitor throws Java Model Exception if variable Names length paths length Assert is True false Variable names and paths collections should have the same size NON NLS 1 Java Model Manager get Java Model Manager update Variable Values variable Names paths monitor  variableNames JavaModelException getClasspathVariable setClasspathVariables variableNames IPath IProgressMonitor JavaModelException variableNames isTrue JavaModelManager getJavaModelManager updateVariableValues variableNames
Sets the current table of options All and only the options explicitly included in the given table are remembered all previous option settings are forgotten including ones not explicitly mentioned p For a complete description of the configurable options see code get Default Options code p param new Options the new options key type code String code value type code String code or code null code to reset all options to their default values see Java Core get Default Options public static void set Options Hashtable new Options see initialize Default Plugin Preferences for changing default settings Preferences preferences get Plugin get Plugin Preferences if new Options null new Options Java Core get Default Options Enumeration keys new Options keys while keys has More Elements String key String keys next Element if Java Model Manager get Java Model Manager option Names contains key continue unrecognized option if key equals CORE ENCODING continue skipped contributed by resource prefs String value String new Options get key preferences set Value key value persist options get Plugin save Plugin Preferences  getDefaultOptions newOptions JavaCore getDefaultOptions setOptions newOptions initializeDefaultPluginPreferences getPlugin getPluginPreferences newOptions newOptions JavaCore getDefaultOptions newOptions hasMoreElements nextElement JavaModelManager getJavaModelManager optionNames CORE_ENCODING newOptions setValue getPlugin savePluginPreferences
public void stop Bundle Context context throws Exception try save Plugin Preferences I Workspace workspace Resources Plugin get Workspace workspace remove Resource Change Listener Java Model Manager get Java Model Manager delta State workspace remove Save Participant this Java Model Manager get Java Model Manager shutdown finally ensure we call super stop as the last thing super stop context  BundleContext savePluginPreferences IWorkspace ResourcesPlugin getWorkspace removeResourceChangeListener JavaModelManager getJavaModelManager deltaState removeSaveParticipant JavaModelManager getJavaModelManager
Initiate the background indexing process This should be deferred after the plugin activation private void start Indexing Java Model Manager get Java Model Manager get Index Manager reset  startIndexing JavaModelManager getJavaModelManager getIndexManager
new I Workspace Runnable public void run I Progress Monitor progress throws Core Exception I Saved State saved State workspace add Save Participant Java Core this manager if saved State null the event type coming from the saved state is always POST AUTO BUILD force it to be POST CHANGE so that the delta processor can handle it manager delta State get Delta Processor overriden Event Type I Resource Change Event POST CHANGE saved State process Resource Change Events manager delta State  IWorkspaceRunnable IProgressMonitor CoreException ISavedState savedState addSaveParticipant JavaCore savedState POST_AUTO_BUILD POST_CHANGE deltaState getDeltaProcessor overridenEventType IResourceChangeEvent POST_CHANGE savedState processResourceChangeEvents deltaState
Job process Saved State new Job Util bind saved State job Name NON NLS 1 protected I Status run I Progress Monitor monitor try add save participant and process delta atomically see https bugs eclipse org bugs show bug cgi id 59937 workspace run new I Workspace Runnable public void run I Progress Monitor progress throws Core Exception I Saved State saved State workspace add Save Participant Java Core this manager if saved State null the event type coming from the saved state is always POST AUTO BUILD force it to be POST CHANGE so that the delta processor can handle it manager delta State get Delta Processor overriden Event Type I Resource Change Event POST CHANGE saved State process Resource Change Events manager delta State monitor catch Core Exception e return e get Status return Status OK STATUS  processSavedState savedState jobName IStatus IProgressMonitor show_bug IWorkspaceRunnable IProgressMonitor CoreException ISavedState savedState addSaveParticipant JavaCore savedState POST_AUTO_BUILD POST_CHANGE deltaState getDeltaProcessor overridenEventType IResourceChangeEvent POST_CHANGE savedState processResourceChangeEvents deltaState CoreException getStatus OK_STATUS
public void start Bundle Context context throws Exception super start context final Java Model Manager manager Java Model Manager get Java Model Manager try manager configure Plugin Debug Options request state folder creation workaround 19885 Java Core get Plugin get State Location retrieve variable values Java Core get Plugin get Plugin Preferences add Property Change Listener new Java Model Manager Plugin Preferences Listener manager load Variables And Containers final I Workspace workspace Resources Plugin get Workspace workspace add Resource Change Listener manager delta State I Resource Change Event PRE BUILD I Resource Change Event POST BUILD I Resource Change Event POST CHANGE I Resource Change Event PRE DELETE I Resource Change Event PRE CLOSE start Indexing process deltas since last activated in indexer thread so that indexes are up to date see https bugs eclipse org bugs show bug cgi id 38658 Job process Saved State new Job Util bind saved State job Name NON NLS 1 protected I Status run I Progress Monitor monitor try add save participant and process delta atomically see https bugs eclipse org bugs show bug cgi id 59937 workspace run new I Workspace Runnable public void run I Progress Monitor progress throws Core Exception I Saved State saved State workspace add Save Participant Java Core this manager if saved State null the event type coming from the saved state is always POST AUTO BUILD force it to be POST CHANGE so that the delta processor can handle it manager delta State get Delta Processor overriden Event Type I Resource Change Event POST CHANGE saved State process Resource Change Events manager delta State monitor catch Core Exception e return e get Status return Status OK STATUS process Saved State set System true process Saved State set Priority Job SHORT process asap process Saved State schedule catch Runtime Exception e manager shutdown throw e  BundleContext JavaModelManager JavaModelManager getJavaModelManager configurePluginDebugOptions JavaCore getPlugin getStateLocation JavaCore getPlugin getPluginPreferences addPropertyChangeListener JavaModelManager PluginPreferencesListener loadVariablesAndContainers IWorkspace ResourcesPlugin getWorkspace addResourceChangeListener deltaState IResourceChangeEvent PRE_BUILD IResourceChangeEvent POST_BUILD IResourceChangeEvent POST_CHANGE IResourceChangeEvent PRE_DELETE IResourceChangeEvent PRE_CLOSE startIndexing show_bug processSavedState savedState jobName IStatus IProgressMonitor show_bug IWorkspaceRunnable IProgressMonitor CoreException ISavedState savedState addSaveParticipant JavaCore savedState POST_AUTO_BUILD POST_CHANGE deltaState getDeltaProcessor overridenEventType IResourceChangeEvent POST_CHANGE savedState processResourceChangeEvents deltaState CoreException getStatus OK_STATUS processSavedState setSystem processSavedState setPriority processSavedState RuntimeException

Core Exception nested Core Exception Creates a Java model exception that wrappers the given code Throwable code The exception contains a Java specific status object with severity code I Status ERROR code and the given status code param e the code Throwable code param code one of the Java specific status codes declared in code I Java Model Status Constants code see I Java Model Status Constants see org eclipse core runtime I Status ERROR public Java Model Exception Throwable e int code this new Java Model Status code e  CoreException nestedCoreException IStatus IJavaModelStatusConstants IJavaModelStatusConstants IStatus JavaModelException JavaModelStatus
Creates a Java model exception for the given code Core Exception code Equivalent to code Java Model Exception exception I Java Model Status Constants CORE EXCEPTION code param exception the code Core Exception code public Java Model Exception Core Exception exception super exception get Status this nested Core Exception exception  CoreException JavaModelException IJavaModelStatusConstants CORE_EXCEPTION CoreException JavaModelException CoreException getStatus nestedCoreException
Creates a Java model exception for the given Java specific status object param status the Java specific status object public Java Model Exception I Java Model Status status super status  JavaModelException IJavaModelStatus
Returns the underlying code Throwable code that caused the failure return the wrappered code Throwable code or code null code if the direct case of the failure was at the Java model layer public Throwable get Exception if this nested Core Exception null return get Status get Exception else return this nested Core Exception  getException nestedCoreException getStatus getException nestedCoreException
Returns the Java model status object for this exception Equivalent to code I Java Model Status get Status code return a status object public I Java Model Status get Java Model Status I Status status this get Status if status instanceof I Java Model Status return I Java Model Status status else A regular I Status is created only in the case of a Core Exception See bug 13492 Should handle Java Model Exceptions that contains Core Exception more gracefully return new Java Model Status this nested Core Exception  IJavaModelStatus getStatus IJavaModelStatus getJavaModelStatus IStatus getStatus IJavaModelStatus IJavaModelStatus IStatus CoreException JavaModelExceptions CoreException JavaModelStatus nestedCoreException
Returns whether this exception indicates that a Java model element does not exist Such exceptions have a status with a code of code I Java Model Status Constants ELEMENT DOES NOT EXIST code This is a convenience method return code true code if this exception indicates that a Java model element does not exist see I Java Model Status is Does Not Exist see I Java Model Status Constants ELEMENT DOES NOT EXIST public boolean is Does Not Exist I Java Model Status java Model Status get Java Model Status return java Model Status null java Model Status is Does Not Exist  IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST IJavaModelStatus isDoesNotExist IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST isDoesNotExist IJavaModelStatus javaModelStatus getJavaModelStatus javaModelStatus javaModelStatus isDoesNotExist
Prints this exception s stack trace to the given print stream param output the print stream since 3 0 public void print Stack Trace Print Stream output synchronized output super print Stack Trace output Throwable throwable get Exception if throwable null output print Caused by NON NLS 1 throwable print Stack Trace output  printStackTrace PrintStream printStackTrace getException printStackTrace
Prints this exception s stack trace to the given print writer param output the print writer since 3 0 public void print Stack Trace Print Writer output synchronized output super print Stack Trace output Throwable throwable get Exception if throwable null output print Caused by NON NLS 1 throwable print Stack Trace output  printStackTrace PrintWriter printStackTrace getException printStackTrace
public String to String String Buffer buffer new String Buffer buffer append Java Model Exception NON NLS 1 if get Exception null if get Exception instanceof Core Exception Core Exception c Core Exception get Exception buffer append Core Exception code NON NLS 1 buffer append c get Status get Code buffer append NON NLS 1 buffer append c get Status get Message else buffer append get Exception to String else buffer append get Status to String return buffer to String  toString StringBuffer StringBuffer getException getException CoreException CoreException CoreException getException getStatus getCode getStatus getMessage getException toString getStatus toString toString

public class DOM Exception extends Runtime Exception Creates a new exception with no detail message public DOM Exception just create a new DOM Exception with no detail message  DOMException RuntimeException DOMException DOMException
Creates a new exception with the given detail message param message the detail message public DOM Exception String message super message  DOMException

public class DOM Factory implements IDOM Factory Creates a new DOM factory public DOM Factory constructor is explicitly API  DOMFactory IDOMFactory DOMFactory
Method declared on IDOM Factory public IDOM Compilation Unit create Compilation Unit return new DOM Builder create Compilation Unit  IDOMFactory IDOMCompilationUnit createCompilationUnit DOMBuilder createCompilationUnit
public IDOM Compilation Unit create Compilation Unit char source Code String name if source Code null return null return new SimpleDOM Builder create Compilation Unit source Code name to Char Array  IDOMCompilationUnit createCompilationUnit sourceCode sourceCode SimpleDOMBuilder createCompilationUnit sourceCode toCharArray
public IDOM Compilation Unit create Compilation Unit String source Code String name if source Code null return null return new SimpleDOM Builder create Compilation Unit source Code to Char Array name to Char Array  IDOMCompilationUnit createCompilationUnit sourceCode sourceCode SimpleDOMBuilder createCompilationUnit sourceCode toCharArray toCharArray
Method declared on IDOM Factory public IDOM Field create Field return create Field Object a Field Util LINE SEPARATOR NON NLS 1  IDOMFactory IDOMField createField createField aField LINE_SEPARATOR
public IDOM Field create Field String source Code if source Code null return null return new DOM Builder create Field source Code to Char Array  IDOMField createField sourceCode sourceCode DOMBuilder createField sourceCode toCharArray
Method declared on IDOM Factory public IDOM Import create Import return new DOM Builder create Import  IDOMFactory IDOMImport createImport DOMBuilder createImport
public IDOM Import create Import String source Code if source Code null return null return new DOM Builder create Import source Code to Char Array  IDOMImport createImport sourceCode sourceCode DOMBuilder createImport sourceCode toCharArray
Method declared on IDOM Factory public IDOM Initializer create Initializer return create Initializer static Util LINE SEPARATOR NON NLS 1  IDOMFactory IDOMInitializer createInitializer createInitializer LINE_SEPARATOR
public IDOM Initializer create Initializer String source Code if source Code null return null return new DOM Builder create Initializer source Code to Char Array  IDOMInitializer createInitializer sourceCode sourceCode DOMBuilder createInitializer sourceCode toCharArray
Method declared on IDOM Factory public IDOM Method create Method return create Method public void new Method Util LINE SEPARATOR Util LINE SEPARATOR NON NLS 2 NON NLS 1  IDOMFactory IDOMMethod createMethod createMethod newMethod LINE_SEPARATOR LINE_SEPARATOR
public IDOM Method create Method String source Code if source Code null return null return new DOM Builder create Method source Code to Char Array  IDOMMethod createMethod sourceCode sourceCode DOMBuilder createMethod sourceCode toCharArray
Method declared on IDOM Factory public IDOM Package create Package return new DOM Builder create Package  IDOMFactory IDOMPackage createPackage DOMBuilder createPackage
public IDOM Package create Package String source Code if source Code null return null return new DOM Builder create Package source Code to Char Array  IDOMPackage createPackage sourceCode sourceCode DOMBuilder createPackage sourceCode toCharArray
Method declared on IDOM Factory public IDOM Type create Type return create Type public class A Class Util LINE SEPARATOR Util LINE SEPARATOR NON NLS 2 NON NLS 1  IDOMFactory IDOMType createType createType AClass LINE_SEPARATOR LINE_SEPARATOR
Method declared on IDOM Factory public IDOM Type create Class return create Type public class A Class Util LINE SEPARATOR Util LINE SEPARATOR NON NLS 2 NON NLS 1  IDOMFactory IDOMType createClass createType AClass LINE_SEPARATOR LINE_SEPARATOR
Method declared on IDOM Factory public IDOM Type create Interface return create Type public interface An Interface Util LINE SEPARATOR Util LINE SEPARATOR NON NLS 2 NON NLS 1  IDOMFactory IDOMType createInterface createType AnInterface LINE_SEPARATOR LINE_SEPARATOR
public IDOM Type create Type String source Code if source Code null return null return new DOM Builder create Type source Code to Char Array  IDOMType createType sourceCode sourceCode DOMBuilder createType sourceCode toCharArray

public interface IDOM Compilation Unit extends IDOM Node Returns the header comment for this compilation unit The header comment appears before the first declaration in a compilation unit The syntax for a comment corresponds to Comments JLS2 3 7 b including b comment delimiters return the header comment for this compilation unit or code null code if no header comment is present  IDOMCompilationUnit IDOMNode
public String get Header The code IDOM Compilation Node code refinement of this code IDOM Node code method returns the name of this compilation unit p The name of a compilation unit is the name of the first top level public type defined in the compilation unit suffixed with java For example if the first top level public type defined in this compilation unit has the name Hanoi then name of this compilation unit is Hanoi java p p In the absence of a public top level type the name of the first top level type is used In the absence of any type the name of the compilation unit is code null code p return the name of this compilation unit or code null code if none  getHeader IDOMCompilationNode IDOMNode
public String get Name Sets the header comment for this compilation unit The header comment appears before the first declaration in a compilation unit The syntax for a comment corresponds to Comments JLS2 3 7 b including b comment delimiters param comment the header comment for this compilation unit or code null code if indicating no header comment  getName
public void set Header String comment The code IDOM Compilation Node code refinement of this code IDOM Node code method has no effect the name is computed from the types declared within it param name the given name  setHeader IDOMCompilationNode IDOMNode

public interface IDOM Factory Creates and return an empty JDOM The initial content is an empty string return the new compilation unit  IDOMFactory
public IDOM Compilation Unit create Compilation Unit Creates a JDOM on the given source code The syntax for the given source code corresponds to Compilation Unit JLS2 7 3 param source Code the source code character array or code null code param name the name of the compilation unit return the new compilation unit or code null code if unable to recognize the source code or if the source code is code null code  IDOMCompilationUnit createCompilationUnit CompilationUnit sourceCode
public IDOM Compilation Unit create Compilation Unit char source Code String name Creates a JDOM on the given source code The syntax for the given source code corresponds to Compilation Unit JLS2 7 3 param source Code the source code string or code null code param name the name of the compilation unit return the new compilation unit or code null code if unable to recognize the source code or if the source code is code null code  IDOMCompilationUnit createCompilationUnit sourceCode CompilationUnit sourceCode
public IDOM Compilation Unit create Compilation Unit String source Code String name Creates a default field document fragment Initially the field will have default protection type code Object code name code a Field code no comment and no initializer return the new field  IDOMCompilationUnit createCompilationUnit sourceCode aField
public IDOM Field create Field Creates a field document fragment on the given source code The given source string corresponds to Field Declaration JLS2 8 3 and Constant Declaration JLS2 9 3 restricted to a single Variable Declarator clause param source Code the source code return the new field or code null code if unable to recognize the source code if the source code is code null code or when the source contains more than one Variable Declarator clause  IDOMField createField FieldDeclaration ConstantDeclaration VariableDeclarator sourceCode VariableDeclarator
public IDOM Field create Field String source Code Creates an empty import document fragment Initially the import will have name code java lang code and be non static return the new import  IDOMField createField sourceCode
public IDOM Import create Import Creates an import document fragment on the given source code The syntax for the given source string corresponds to Import Declaration JLS2 7 5 param source Code the source code return the new import or code null code if unable to recognize the source code or if the source code is code null code  IDOMImport createImport ImportDeclaration sourceCode
public IDOM Import create Import String source Code Creates an empty initializer document fragment Initially the initializer will be static and have no body or comment return the new initializer  IDOMImport createImport sourceCode
public IDOM Initializer create Initializer Creates an initializer document fragment from the given source code The syntax for the given source string corresponds to Instance Initializer JLS2 8 6 and Static Declaration JLS2 8 7 param source Code the source code return the new initializer or code null code if unable to recognize the source code or if the source code is code null code  IDOMInitializer createInitializer InstanceInitializer StaticDeclaration sourceCode
public IDOM Initializer create Initializer String source Code Creates a default method document fragment Initially the method will have public visibility return type code void code be named code new Method code have no parameters no comment and an empty body return the new method  IDOMInitializer createInitializer sourceCode newMethod
public IDOM Method create Method Creates a method document fragment on the given source code The syntax for the given source string corresponds to Method Declaration JLS2 8 4 Constructor Declaration JLS2 8 8 and Abstract Method Declaration JLS2 9 4 param source Code the source code return the new method or code null code if unable to recognize the source code or if the source code is code null code  IDOMMethod createMethod MethodDeclaration ConstructorDeclaration AbstractMethodDeclaration sourceCode
public IDOM Method create Method String source Code Creates an empty package document fragment Initially the package declaration will have no name return the new package  IDOMMethod createMethod sourceCode
public IDOM Package create Package Creates a package document fragment on the given source code The syntax for the given source string corresponds to Package Declaration JLS2 7 4 param source Code the source code return the new package or code null code if unable to recognize the source code or if the source code is code null code  IDOMPackage createPackage PackageDeclaration sourceCode
public IDOM Package create Package String source Code Creates a default type document fragment Initially the type will be a public class named code A Class code with no members or comment return the new type  IDOMPackage createPackage sourceCode AClass
public IDOM Type create Type Creates a default type document fragment Initially the type will be a public class named code A Class code with no members or comment return the new class since 2 0  IDOMType createType AClass
public IDOM Type create Class Creates a default type document fragment Initially the type will be a public interface named code An Interface code with no members or comment return the new interface since 2 0  IDOMType createClass AnInterface
public IDOM Type create Interface Creates a type document fragment on the given source code The syntax for the given source string corresponds to Class Declaration JLS2 8 1 and Interface Declaration JLS2 9 1 param source Code the source code return the new type or code null code if unable to recognize the source code or if the source code is code null code  IDOMType createInterface ClassDeclaration InterfaceDeclaration sourceCode

public interface IDOM Field extends IDOM Member Returns the initializer expression for this field The syntax for an initializer corresponds to Variable Initializer JLS2 8 3 p Note The expression does not include a code code p return the initializer expression or code null code if this field does not have an initializer  IDOMField IDOMMember VariableInitializer
public String get Initializer The code IDOM Field code refinement of this code IDOM Node code method returns the name of this field The syntax for the name of a field corresponds to Variable Declarator Id JLS2 8 3 return the name of this field  getInitializer IDOMField IDOMNode VariableDeclaratorId
public String get Name Returns the type name of this field The syntax for a type name of a field corresponds to Type in Field Declaration JLS2 8 3 return the type name  getName
public String get Type Sets the initializer expression for this field The syntax for an initializer corresponds to Variable Initializer JLS2 8 3 p Note The expression does not include a code code p param initializer the initializer expression or code null code indicating the field does not have an initializer  getType VariableInitializer
public void set Initializer String initializer The code IDOM Field code refinement of this code IDOM Node code method sets the name of this field The syntax for the name of a field corresponds to Variable Declarator Id JLS2 8 3 param name the given name exception Illegal Argument Exception if code null code is specified  setInitializer IDOMField IDOMNode VariableDeclaratorId IllegalArgumentException
public void set Name String name throws Illegal Argument Exception Sets the type name of this field The syntax for a type name of a field corresponds to Type in Field Declaration JLS2 8 3 Type names must be specified as they should appear in source code For example code String code code int code or code java io File code param type Name the type name exception Illegal Argument Exception if code null code is specified  setName IllegalArgumentException typeName IllegalArgumentException

public interface IDOM Import extends IDOM Node The code IDOM Import code refinement of this code IDOM Node code method returns the name of this import The syntax for an import name corresponds to a fully qualified type name or to an on demand package name as defined by Import Declaration JLS2 7 5 return the name of this import  IDOMImport IDOMNode IDOMImport IDOMNode ImportDeclaration
public String get Name Returns whether this import declaration ends with code code return code true code if this in an on demand import  getName
Returns the modifier flags for this import The flags can be examined using class code Flags code Only the static flag is meaningful for import declarations return the modifier flags for this import see org eclipse jdt core Flags since 3 0 
Sets the modifier flags for this import The flags can be examined using class code Flags code Only the static flag is meaningful for import declarations p Note Static imports are an experimental language feature under discussion in JSR 201 and under consideration for inclusion in the 1 5 release of J2SE The support here is therefore tentative and subject to change p param flags the modifier flags for this import see org eclipse jdt core Flags since 3 0 
The code IDOM Import code refinement of this code IDOM Node code method sets the name of this import The syntax for an import name corresponds to a fully qualified type name or to an on demand package name as defined by Import Declaration JLS2 7 5 param name the given name exception Illegal Argument Exception if code null code is specified  IDOMImport IDOMNode ImportDeclaration IllegalArgumentException

public interface IDOM Initializer extends IDOM Member Returns the body of this initializer The syntax for a body corresponds to Instance Initializer JLS2 8 6 and Static Declaration JLS2 8 7 return an initializer body including braces or code null code if no body is present  IDOMInitializer IDOMMember InstanceInitializer StaticDeclaration
public String get Body The code IDOM Initializer code refinement of this code IDOM Node code method returns code null code An initializer does not have a name return code null code  getBody IDOMInitializer IDOMNode
public String get Name Sets the body of this initializer The syntax for a body corresponds to Instance Initializer JLS2 8 6 and Static Declaration JLS2 8 7 No formatting or syntax checking is performed on the body Braces b must b be included param body an initializer body including braces or code null code indicating no body  getName InstanceInitializer StaticDeclaration
public void set Body String body The code IDOM Initializer code refinement of this code IDOM Node code method does nothing param name the given name  setBody IDOMInitializer IDOMNode

public interface IDOM Member extends IDOM Node Returns the comment associated with this member including comment delimiters return the comment or code null code if this member has no associated comment  IDOMMember IDOMNode
public String get Comment Returns the flags for this member The flags can be examined using the code Flags code class return the flags see org eclipse jdt core Flags  getComment
public int get Flags Sets the comment associated with this member The comment will appear before the member in the source The comment must be properly formatted including delimiters A code null code comment indicates no comment This member s deprecated flag is automatically set to reflect the deprecated tag in the comment param comment the comment including comment delimiters or code null code indicating this member should have no associated comment see set Flags int  getFlags setFlags
public void set Comment String comment Sets the flags for this member The flags can be examined using the code Flags code class The deprecated flag passed in is ignored param flags the flags see org eclipse jdt core Flags  setComment

public interface IDOM Method extends IDOM Member Adds the given exception to the end of the list of exceptions this method is declared to throw The syntax for an exception type name is defined by Method Throws JLS2 8 4 4 Type names must be specified as they would appear in source code For example code IO Exception code or code java io IO Exception code This is a convenience method for code set Exceptions code param exception Type the exception type exception Illegal Argument Exception if code null code is specified see set Exceptions String  IDOMMethod IDOMMember IOException IOException setExceptions exceptionType IllegalArgumentException setExceptions
public void add Exception String exception Type throws Illegal Argument Exception Adds the given parameter to the end of the parameter list This is a convenience method for code set Parameters code The syntax for parameter names is defined by Formal Parameters JLS2 8 4 1 The syntax for type names is defined by Formal Parameters JLS2 8 4 1 Type names must be specified as they would appear in source code For example code File code code java io File code or code int code param type the type name param name the parameter name exception Illegal Argument Exception if code null code is specified for either the type or the name see set Parameters String String  addException exceptionType IllegalArgumentException setParameters IllegalArgumentException setParameters
public void add Parameter String type String name throws Illegal Argument Exception Returns the body of this method The method body includes all code following the method declaration including the enclosing braces return the body or code null code if the method has no body for example for an abstract or native method  addParameter IllegalArgumentException
Sets the default value expression for an annotation type member param default Value the default value expression or code null code indicating the member does not have a default value since 3 0  defaultValue
Returns the default value expression for an annotation type member return the default value expression or code null code indicating the member does not have a default value since 3 0 
Returns the names of the exception types this method throws in the order in which they are declared in the source or an empty array if this method declares no exception types The syntax for an exception type name is defined by Method Throws JLS2 8 4 4 Type names appear as they would in source code For example code IO Exception code or code java io IO Exception code return the list of exception types  IOException IOException
Returns the formal type parameters for this method Returns an empty array if this method has no formal type parameters p Formal type parameters are as they appear in the source code for example code X extends List lt String gt Serializable code p return the formal type parameters of this method in the order declared in the source an empty array if none since 3 0 
The code IDOM Method code refinement of this code IDOM Node code method returns the name of this method Returns code null code for constructors The syntax for a method name is defined by Identifier of Method Declarator JLS2 8 4 return the name of this method or code null code for constructors  IDOMMethod IDOMNode MethodDeclarator
public String get Name Returns the names of parameters in this method in the order they are declared or code null code if no parameters are declared The syntax for parameter names is defined by Formal Parameters JLS2 8 4 1 return the list of parameter names or code null code if no parameters are declared  getName
public String get Parameter Names Returns the type names for the parameters of this method in the order they are declared or code null code if no parameters are declared The syntax for type names is defined by Formal Parameters JLS2 8 4 1 Type names must be specified as they would appear in source code For example code File code code java io File code or code int code return the list of parameter types or code null code if no parameters are declared  getParameterNames
public String get Parameter Types Returns the return type name or code null code Returns code null code for constructors The syntax for return type name corresponds to Return Type in Method Declaration JLS2 8 4 Names are returned as they appear in the source code for example code File code code java io File code code int code or code void code return the return type  getParameterTypes ReturnType MethodDeclaration
Returns whether this method is a constructor return code true code for constructors and code false code for methods 
Sets the body of this method The method body includes all code following the method declaration including the enclosing braces No formatting or syntax checking is performed on the body param body the body or code null code indicating the method has no body for example for an abstract or native method 
public void set Body String body Sets whether this method represents a constructor param b code true code for constructors and code false code for methods  setBody
public void set Constructor boolean b Sets the names of the exception types this method throws in the order in which they are declared in the source An empty array indicates this method declares no exception types The syntax for an exception type name is defined by Method Throws JLS2 8 4 4 Type names must be specified as they would appear in source code For example code IO Exception code or code java io IO Exception code param exception Types the list of exception types  setConstructor IOException IOException exceptionTypes
Sets the formal type parameters for this method p Formal type parameters are given as they appear in the source code for example code X extends List lt String gt Serializable code p param type Parameters the formal type parameters of this method in the order to appear in the source an empty array if none since 3 0  typeParameters
The code IDOM Method code refinement of this code IDOM Node code method sets the name of this method The syntax for a method name is defined by Identifer of Method Declarator JLS2 8 4 p The name of a constructor is always code null code and thus it must not be set p param name the given name exception Illegal Argument Exception if code null code is specified  IDOMMethod IDOMNode MethodDeclarator IllegalArgumentException
public void set Name String name throws Illegal Argument Exception Sets the types and names of parameters in this method in the order they are to be declared If both code types code and code names code are code null code this indicates that this method has no parameters The syntax for parameter names is defined by Formal Parameters JLS2 8 4 1 The syntax for type names is defined by Formal Parameters JLS2 8 4 1 Type names must be specified as they would appear in source code For example code File code code java io File code or code int code param types the list of type names param names the list of parameter name exception Illegal Argument Exception if the number of types and names do not match or if either argument is code null code  setName IllegalArgumentException IllegalArgumentException
Sets the return type name This has no effect on constructors The syntax for return type name corresponds to Return Type in Method Declaration JLS2 8 4 Type names are specified as they appear in the source code for example code File code code java io File code code int code or code void code param type the return type exception Illegal Argument Exception if code null code is specified  ReturnType MethodDeclaration IllegalArgumentException

Adds the given un parented node document fragment as the last child of this node param child the new child node exception DOM Exception if any of the following conditions hold ul li this node is not allowed to have children li li the child is not of an allowable type li li the child already has a parent li li the child is an ancestor of this node li ul exception Illegal Argument Exception if the child is code null code see insert Sibling IDOM Node see remove  DOMException IllegalArgumentException insertSibling IDOMNode
public void add Child IDOM Node child throws DOM Exception Illegal Argument Exception Returns whether this node is allowed to have children return code true code if this node can have children  addChild IDOMNode DOMException IllegalArgumentException
public boolean can Have Children Returns a stand alone copy of the document fragment represented by this node that is in no way dependent on the document this node is part of return a copy of type code IDOM Node code see add Child IDOM Node see insert Sibling IDOM Node see remove  canHaveChildren IDOMNode addChild IDOMNode insertSibling IDOMNode
public Object clone Returns the current contents of this document fragment as a character array p Note To obtain complete source for the java file ask a compilation unit node for its contents p return the contents or code null code if this node has no contents 
public char get Characters Returns the first named child of this node with the given name param name the name return the child node or code null code if no such child exists  getCharacters
public IDOM Node get Child String name Returns an enumeration of children of this node Returns an empty enumeration if this node has no children including nodes that cannot have children Children appear in the order in which they are declared in the source code return an enumeration of the children  IDOMNode getChild
public Enumeration get Children Returns the current contents of this document fragment p Note To obtain complete source for the java file ask a compilation unit node for its contents p return the contents or code null code if this node has no contents  getChildren
public String get Contents Returns the first child of this node Children appear in the order in which they exist in the source code return the first child or code null code if this node has no children see get Children  getContents getChildren
public IDOM Node get First Child Returns a handle for the Java element associated with this document fragment based on the parent Java element param parent the parent Java element exception Illegal Argument Exception if the parent element is not of a valid parent type for this node return a handle for the Java element associated with this document fragment based on the parent Java element  IDOMNode getFirstChild IllegalArgumentException
public I Java Element get Java Element I Java Element parent throws Illegal Argument Exception Returns the name of this node More details are provided in each of the subtypes return the name or code null code if it has no name  IJavaElement getJavaElement IJavaElement IllegalArgumentException
public String get Name Returns the sibling node immediately following this node return the next node or code null code if there is no following node  getName
public IDOM Node get Next Node Returns the type of this node return one of the node type constants defined in code IDOM Node code  IDOMNode getNextNode IDOMNode
public int get Node Type Returns the parent of this node return the parent node or code null code if this node does not have a parent  getNodeType
public IDOM Node get Parent Returns the sibling node immediately preceding this node return the previous node or code null code if there is no preceding node  IDOMNode getParent
public IDOM Node get Previous Node Inserts the given un parented node as a sibling of this node immediately before this node param sibling the new sibling node exception DOM Exception if any of the following conditions hold ul li this node is a document fragment root li li the sibling is not of the correct type li li the sibling already has a parent li li this sibling is an ancestor of this node li ul exception Illegal Argument Exception if the sibling is code null code see add Child IDOM Node see clone see remove  IDOMNode getPreviousNode DOMException IllegalArgumentException addChild IDOMNode
public void insert Sibling IDOM Node sibling throws DOM Exception Illegal Argument Exception Returns whether the given node is an allowable child for this node param node the potential child node return code true code if the given node is an allowable child  insertSibling IDOMNode DOMException IllegalArgumentException
public boolean is Allowable Child IDOM Node node Returns whether this node s signature is equivalent to the given node s signature In other words if the nodes were siblings would the declarations collide because they represent the same declaration param node the other node return code true code if the nodes have equivalent signatures  isAllowableChild IDOMNode
public boolean is Signature Equal IDOM Node node Separates this node from its parent and siblings maintaining any ties that this node has to the underlying document fragment A document fragment that is removed from its host document may still be dependent on that host document until it is inserted into a different document Removing a root node has no effect see add Child IDOM Node see clone see insert Sibling IDOM Node  isSignatureEqual IDOMNode addChild IDOMNode insertSibling IDOMNode
public void remove Sets the name of this node Name format depends on node type More details are provided in each of the subtypes param name the name or code null code to clear the name 

public interface IDOM Package extends IDOM Node The code IDOM Package code refinement of this code IDOM Node code method returns the name of this package declaration or code null code if it has none The syntax for a package name corresponds to Package Name as defined by Package Declaration JLS2 7 4 return the name of this package declaration or code null code if it has none  IDOMPackage IDOMNode IDOMPackage IDOMNode PackageName PackageDeclaration
public String get Name The code IDOM Package code refinement of this code IDOM Node code method sets the name of this package declaration The syntax for a package name corresponds to Package Name as defined by Package Declaration JLS2 7 4 A code null code name indicates an empty package declaration that is code get Contents code returns the empty string param name the given name  getName IDOMPackage IDOMNode PackageName PackageDeclaration getContents

public interface IDOM Type extends IDOM Member Adds the given interface name to the names of interfaces that this type implements or extends the name will be added after the existing interface names This is a convenience method For classes this represents the interfaces that this class implements For interfaces this represents the interfaces that this interface extends The name may or may not be fully qualified param interface Name the syntax for an interface name is defined by Interfaces in Class Declaration JLS2 8 1 Type names must be specified as they would appear in source code For example Cloneable java io Serializable exception Illegal Argument Exception if code null code is specified  IDOMType IDOMMember interfaceName ClassDeclaration IllegalArgumentException
Returns the formal type parameters for this type Returns an empty array if this method has no formal type parameters p Formal type parameters are as they appear in the source code for example code X extends List lt String gt Serializable code p return the formal type parameters of this type in the order declared in the source an empty array if none since 3 0 
The code IDOM Type code refinement of this code IDOM Node code method returns the name of this type The name of a class is defined by Class Declaration JLS2 8 1 the name of an interface is defined by Interface Declaration JLS2 9 1 return the name of this type  IDOMType IDOMNode ClassDeclaration InterfaceDeclaration
public String get Name Returns the name of this type s superclass The syntax for a superclass name is specified by Super in Class Declaration JLS2 8 1 Type names must be specified as they would appear in source code For example code Object code or code java io File code As of J2SE 1 5 the superclass may also include parameterized types like code Array List lt String gt code return the superclass name or code null code if this type represents an interface or if no superclass has been assigned to this class  getName ClassDeclaration ArrayList
public String get Superclass Returns the names of interfaces that this type implements or extends in the order in which they are listed in the source or an empty array if no superinterfaces are present The syntax for interface names is defined by Interfaces in Class Declaration JLS2 8 1 Type names appear as they would in source code For example code Cloneable code or code java io Serializable code As of J2SE 1 5 superinterfaces may also include parameterized types like code List lt String gt code p For classes this method returns the interfaces that this class implements For interfaces this method returns the interfaces that this interface extends p return the list of interface names  getSuperclass ClassDeclaration
public String get Super Interfaces Returns whether this type is a class return code true code for classes and code false code for interfaces  getSuperInterfaces
Returns whether this type represents an enumeration class enum instead of class return true if this type represents an enumeration class false otherwise since 3 0 
Returns whether this type represents an annotation type interface instead of interface return true if this type represents an annotation type false otherwise since 3 0 
Sets whether this type is a class or an interface If this type is a class and is changed to an interface this type s superclass becomes code null code When a class becomes an interface or an interface becomes a class superinterfaces remain as part of an code implements code clause for classes or an code extends code clause for interfaces param b code true code for classes and code false code for interfaces 
Sets whether this type represents an enumeration class If this type is a class and is changed to an enum this type s superclass becomes code null code If this type is an interface including an annotation type and is changed to an enum this type is also changed to a class param b code true code for enum classes and code false code otherwise since 3 0 
Sets whether this type represents an annotation type interface instead of interface If this type is a interface and is changed to an enum this type s superclass becomes code null code and its superinterface list becomes empty If this type is an class including an enum and is changed to an annotation type this type is also changed to an interface param b code true code for an annotation type and code false code otherwise since 3 0 
Sets the formal type parameters for this type p Formal type parameters are given as they appear in the source code for example code X extends List lt String gt Serializable code p param type Parameters the formal type parameters of this type in the order to appear in the source an empty array if none since 3 0  typeParameters
The code IDOM Type code refinement of this code IDOM Node code method sets the name of this type The name of a class is defined by Class Declaration JLS2 8 1 the name of an interface is defined by Interface Declaration JLS2 9 1 param name the given name exception Illegal Argument Exception if code null code is specified  IDOMType IDOMNode ClassDeclaration InterfaceDeclaration IllegalArgumentException
public void set Name String name throws Illegal Argument Exception Sets the name of this type s superclass Has no effect if this type represents an interface A code null code name indicates that no superclass name extends clause should appear in the source code The syntax for a superclass name is specified by Super in Class Declaration JLS2 8 1 Type names must be specified as they would appear in source code For example code Object code or code java io File code As of J2SE 1 5 the superclass may also include parameterized types like code Array List lt String gt code param superclass Name the superclass name or code null code if this type should have to no explicitly specified superclass  setName IllegalArgumentException ClassDeclaration ArrayList superclassName
public void set Superclass String superclass Name Sets the names of interfaces that this type implements or extends in the order in which they are to be listed in the source An empty array parameter indicates that no superinterfaces are present The syntax for interface names is defined by Interfaces in Class Declaration JLS2 8 1 Type names appear as they would in source code For example code Cloneable code or code java io Serializable code As of J2SE 1 5 superinterfaces may also include parameterized types like code List lt String gt code p For classes this method sets the interfaces that this class implements For interfaces this method sets the interfaces that this interface extends p param interface Names the list of interface names  setSuperclass superclassName ClassDeclaration interfaceNames

Performs a compile using the JDT batch compiler throws Build Exception if anything wrong happen during the compilation return boolean true if the compilation is ok false otherwise public boolean execute throws Build Exception attributes log Ant Adapter Messages get String ant jdtadapter info usingJDT Compiler Project MSG VERBOSE NON NLS 1 Commandline cmd setup Javac Command try Class c Class for Name compiler Class Constructor batch Compiler Constructor c get Constructor new Class Print Writer class Print Writer class Boolean TYPE Object batch Compiler Instance batch Compiler Constructor new Instance new Object new Print Writer System out new Print Writer System err new Boolean true Method compile c get Method compile new Class String class NON NLS 1 Object result compile invoke batch Compiler Instance new Object cmd get Arguments final boolean result Value Boolean result boolean Value if result Value verbose System out println Ant Adapter Messages get String ant jdtadapter error compilation Failed this log File Name NON NLS 1 return result Value catch Class Not Found Exception cnfe throw new Build Exception Ant Adapter Messages get String ant jdtadapter error cannot FindJDT Compiler NON NLS 1 catch Exception ex throw new Build Exception ex  BuildException BuildException AntAdapterMessages getString usingJDTCompiler MSG_VERBOSE setupJavacCommand forName compilerClass batchCompilerConstructor getConstructor PrintWriter PrintWriter batchCompilerInstance batchCompilerConstructor newInstance PrintWriter PrintWriter getMethod batchCompilerInstance getArguments resultValue booleanValue resultValue AntAdapterMessages getString compilationFailed logFileName resultValue ClassNotFoundException BuildException AntAdapterMessages getString cannotFindJDTCompiler BuildException
protected Commandline setup Javac Command throws Build Exception Commandline cmd new Commandline This option is used to never exit at the end of the ant task cmd create Argument set Value no Exit NON NLS 1 if bootclasspath null bootclasspath size 0 Set the bootclasspath for the Eclipse compiler cmd create Argument set Value bootclasspath NON NLS 1 cmd create Argument set Path bootclasspath else include Java Runtime true Path classpath new Path project Eclipse compiler doesn t support extdirs It is emulated using the classpath We add extdirs entries after the bootclasspath add Extdirs extdirs classpath The java runtime is already handled so we simply want to retrieve the ant runtime and the compile classpath classpath append get Compile Classpath For sourcepath use the sourcepath value if present Otherwise default to the srcdir value Path sourcepath null retrieve the method get Sourcepath using reflect This is done to improve the compatibility to ant 1 5 Class javac Class Javac class Method get Sourcepath Method null try get Sourcepath Method javac Class get Method get Sourcepath null NON NLS 1 catch No Such Method Exception e if not found then we cannot use this method ant 1 5 Path compile Source Path null if get Sourcepath Method null try compile Source Path Path get Sourcepath Method invoke attributes null catch Illegal Access Exception e should never happen catch Invocation Target Exception e should never happen if compile Source Path null sourcepath compile Source Path else sourcepath src classpath append sourcepath Set the classpath for the Eclipse compiler cmd create Argument set Value classpath NON NLS 1 cmd create Argument set Path classpath String memory Parameter Prefix Java Env Utils get Java Version equals Java Env Utils JAVA 1 1 J J X NON NLS 1 NON NLS 2 if memory Initial Size null if attributes is Forked Javac attributes log Ant Adapter Messages get String ant jdtadapter info ignoring Memory Initial Size Project MSG WARN NON NLS 1 else cmd create Argument set Value memory Parameter Prefix ms memory Initial Size NON NLS 1 if memory Maximum Size null if attributes is Forked Javac attributes log Ant Adapter Messages get String ant jdtadapter info ignoring Memory Maximum Size Project MSG WARN NON NLS 1 else cmd create Argument set Value memory Parameter Prefix mx memory Maximum Size NON NLS 1 if debug retrieve the method get Sourcepath using reflect This is done to improve the compatibility to ant 1 5 Method get Debug Level Method null try get Debug Level Method javac Class get Method get Debug Level null NON NLS 1 catch No Such Method Exception e if not found then we cannot use this method ant 1 5 debug level is only available with ant 1 5 x String debug Level null if get Debug Level Method null try debug Level String get Debug Level Method invoke attributes null catch Illegal Access Exception e should never happen catch Invocation Target Exception e should never happen if debug Level null if debug Level length 0 cmd create Argument set Value g none NON NLS 1 else cmd create Argument set Value g debug Level NON NLS 1 else cmd create Argument set Value g NON NLS 1 else cmd create Argument set Value g none NON NLS 1 retrieve the method get Current Compiler Args using reflect This is done to improve the compatibility to ant 1 5 Method get Current Compiler Args Method null try get Current Compiler Args Method javac Class get Method get Current Compiler Args null NON NLS 1 catch No Such Method Exception e if not found then we cannot use this method ant 1 5 debug level is only available with ant 1 5 x String compiler Args null if get Current Compiler Args Method null try compiler Args String get Current Compiler Args Method invoke attributes null catch Illegal Access Exception e should never happen catch Invocation Target Exception e should never happen if compiler Args null Handle the nowarn option If none then we generate all warnings if attributes get Nowarn if deprecation cmd create Argument set Value warn all Deprecation NON NLS 1 else cmd create Argument set Value nowarn NON NLS 1 else if deprecation cmd create Argument set Value warn all Deprecation constructor Name package Default Method masked Catch Blocks unused Imports static Receiver NON NLS 1 else cmd create Argument set Value warn constructor Name package Default Method masked Catch Blocks unused Imports static Receiver NON NLS 1 else Handle the nowarn option If none then we generate all warnings if attributes get Nowarn if deprecation cmd create Argument set Value warn all Deprecation NON NLS 1 else cmd create Argument set Value nowarn NON NLS 1 else if deprecation cmd create Argument set Value warn all Deprecation NON NLS 1 else cmd create Argument set Value warn all Deprecation deprecation NON NLS 1 if compiler Args length 0 cmd create Argument set Value warn constructor Name package Default Method masked Catch Blocks unused Imports static Receiver NON NLS 1 Add extra argument on the command line if compiler Args length 0 cmd add Arguments compiler Args dest Dir option if dest Dir null cmd create Argument set Value d NON NLS 1 cmd create Argument set File dest Dir get Absolute File target option if target null cmd create Argument set Value target NON NLS 1 cmd create Argument set Value target verbose option if verbose cmd create Argument set Value verbose NON NLS 1 extra option allowed by the Eclipse compiler cmd create Argument set Value log NON NLS 1 log File Name dest Dir get Absolute Path log NON NLS 1 cmd create Argument set Value log File Name failnoerror option if attributes get Failonerror cmd create Argument set Value proceed On Error NON NLS 1 source option String source attributes get Source if source null cmd create Argument set Value source NON NLS 1 cmd create Argument set Value source if Java Env Utils get Java Version equals Java Env Utils JAVA 1 4 if target null target equals 1 1 NON NLS 1 cmd create Argument set Value 1 3 NON NLS 1 else cmd create Argument set Value 1 4 NON NLS 1 else cmd create Argument set Value 1 3 NON NLS 1 encoding option if encoding null cmd create Argument set Value encoding NON NLS 1 cmd create Argument set Value encoding Eclipse compiler doesn t have a sourcepath option This is handled through the javac task that collects all source files in srcdir option log And Add Files To Compile cmd return cmd  setupJavacCommand BuildException createArgument setValue noExit createArgument setValue createArgument setPath includeJavaRuntime addExtdirs getCompileClasspath getSourcepath javacClass getSourcepathMethod getSourcepathMethod javacClass getMethod getSourcepath NoSuchMethodException compileSourcePath getSourcepathMethod compileSourcePath getSourcepathMethod IllegalAccessException InvocationTargetException compileSourcePath compileSourcePath createArgument setValue createArgument setPath memoryParameterPrefix JavaEnvUtils getJavaVersion JavaEnvUtils JAVA_1_1 memoryInitialSize isForkedJavac AntAdapterMessages getString ignoringMemoryInitialSize MSG_WARN createArgument setValue memoryParameterPrefix memoryInitialSize memoryMaximumSize isForkedJavac AntAdapterMessages getString ignoringMemoryMaximumSize MSG_WARN createArgument setValue memoryParameterPrefix memoryMaximumSize getSourcepath getDebugLevelMethod getDebugLevelMethod javacClass getMethod getDebugLevel NoSuchMethodException debugLevel getDebugLevelMethod debugLevel getDebugLevelMethod IllegalAccessException InvocationTargetException debugLevel debugLevel createArgument setValue createArgument setValue debugLevel createArgument setValue createArgument setValue getCurrentCompilerArgs getCurrentCompilerArgsMethod getCurrentCompilerArgsMethod javacClass getMethod getCurrentCompilerArgs NoSuchMethodException compilerArgs getCurrentCompilerArgsMethod compilerArgs getCurrentCompilerArgsMethod IllegalAccessException InvocationTargetException compilerArgs getNowarn createArgument setValue allDeprecation createArgument setValue createArgument setValue allDeprecation constructorName packageDefaultMethod maskedCatchBlocks unusedImports staticReceiver createArgument setValue constructorName packageDefaultMethod maskedCatchBlocks unusedImports staticReceiver getNowarn createArgument setValue allDeprecation createArgument setValue createArgument setValue allDeprecation createArgument setValue allDeprecation compilerArgs createArgument setValue constructorName packageDefaultMethod maskedCatchBlocks unusedImports staticReceiver compilerArgs addArguments compilerArgs destDir destDir createArgument setValue createArgument setFile destDir getAbsoluteFile createArgument setValue createArgument setValue createArgument setValue createArgument setValue logFileName destDir getAbsolutePath createArgument setValue logFileName getFailonerror createArgument setValue proceedOnError getSource createArgument setValue createArgument setValue JavaEnvUtils getJavaVersion JavaEnvUtils JAVA_1_4 createArgument setValue createArgument setValue createArgument setValue createArgument setValue createArgument setValue logAndAddFilesToCompile
Emulation of extdirs feature in java 1 2 This method adds all files in the given directories but not in sub directories to the classpath so that you don t have to specify them all one by one param ext Dirs Path to append files to private void add Extdirs Path ext Dirs Path classpath if ext Dirs null String ext Prop System get Property java ext dirs NON NLS 1 if ext Prop null ext Dirs new Path classpath get Project ext Prop else return String dirs ext Dirs list for int i 0 i dirs length i File dir classpath get Project resolve File dirs i if dir exists dir is Directory File Set fs new File Set fs set Dir dir fs set Includes NON NLS 1 classpath add Fileset fs  extDirs addExtdirs extDirs extDirs extProp getProperty extProp extDirs getProject extProp extDirs getProject resolveFile isDirectory FileSet FileSet setDir setIncludes addFileset

private int other Results Count 0 public void accept Name With Prefix And Suffix char name boolean is First Prefix boolean is First Suffix if is First Prefix is First Suffix int length this first Prefix And First Suffix Results length if length this first Prefix And First Suffix Results Count System arraycopy this first Prefix And First Suffix Results 0 this first Prefix And First Suffix Results new char length 2 0 length this first Prefix And First Suffix Results this first Prefix And First Suffix Results Count name else if is First Prefix int length this first Prefix And Suffix Results length if length this first Prefix And Suffix Results Count System arraycopy this first Prefix And Suffix Results 0 this first Prefix And Suffix Results new char length 2 0 length this first Prefix And Suffix Results this first Prefix And Suffix Results Count name else if is First Suffix int length this prefix And First Suffix Results length if length this prefix And First Suffix Results Count System arraycopy this prefix And First Suffix Results 0 this prefix And First Suffix Results new char length 2 0 length this prefix And First Suffix Results this prefix And First Suffix Results Count name else int length this prefix And Suffix Results length if length this prefix And Suffix Results Count System arraycopy this prefix And Suffix Results 0 this prefix And Suffix Results new char length 2 0 length this prefix And Suffix Results this prefix And Suffix Results Count name  otherResultsCount acceptNameWithPrefixAndSuffix isFirstPrefix isFirstSuffix isFirstPrefix isFirstSuffix firstPrefixAndFirstSuffixResults firstPrefixAndFirstSuffixResultsCount firstPrefixAndFirstSuffixResults firstPrefixAndFirstSuffixResults firstPrefixAndFirstSuffixResults firstPrefixAndFirstSuffixResultsCount isFirstPrefix firstPrefixAndSuffixResults firstPrefixAndSuffixResultsCount firstPrefixAndSuffixResults firstPrefixAndSuffixResults firstPrefixAndSuffixResults firstPrefixAndSuffixResultsCount isFirstSuffix prefixAndFirstSuffixResults prefixAndFirstSuffixResultsCount prefixAndFirstSuffixResults prefixAndFirstSuffixResults prefixAndFirstSuffixResults prefixAndFirstSuffixResultsCount prefixAndSuffixResults prefixAndSuffixResultsCount prefixAndSuffixResults prefixAndSuffixResults prefixAndSuffixResults prefixAndSuffixResultsCount
public void accept Name With Prefix char name boolean is First Prefix if is First Prefix int length this first Prefix Results length if length this first Prefix Results Count System arraycopy this first Prefix Results 0 this first Prefix Results new char length 2 0 length this first Prefix Results this first Prefix Results Count name else int length this prefix Results length if length this prefix Results Count System arraycopy this prefix Results 0 this prefix Results new char length 2 0 length this prefix Results this prefix Results Count name  acceptNameWithPrefix isFirstPrefix isFirstPrefix firstPrefixResults firstPrefixResultsCount firstPrefixResults firstPrefixResults firstPrefixResults firstPrefixResultsCount prefixResults prefixResultsCount prefixResults prefixResults prefixResults prefixResultsCount
public void accept Name With Suffix char name boolean is First Suffix if is First Suffix int length this first Suffix Results length if length this first Suffix Results Count System arraycopy this first Suffix Results 0 this first Suffix Results new char length 2 0 length this first Suffix Results this first Suffix Results Count name else int length this suffix Results length if length this suffix Results Count System arraycopy this suffix Results 0 this suffix Results new char length 2 0 length this suffix Results this suffix Results Count name  acceptNameWithSuffix isFirstSuffix isFirstSuffix firstSuffixResults firstSuffixResultsCount firstSuffixResults firstSuffixResults firstSuffixResults firstSuffixResultsCount suffixResults suffixResultsCount suffixResults suffixResults suffixResults suffixResultsCount
public void accept Name Without Prefix And Suffix char name int length this other Results length if length this other Results Count System arraycopy this other Results 0 this other Results new char length 2 0 length this other Results this other Results Count name  acceptNameWithoutPrefixAndSuffix otherResults otherResultsCount otherResults otherResults otherResults otherResultsCount
public char get Results int count this first Prefix And First Suffix Results Count this first Prefix And Suffix Results Count this prefix And First Suffix Results Count this prefix And Suffix Results Count this first Prefix Results Count this prefix Results Count this first Suffix Results Count this suffix Results Count this other Results Count char results new char count int index 0 System arraycopy this first Prefix And First Suffix Results 0 results index this first Prefix And First Suffix Results Count index this first Prefix And First Suffix Results Count System arraycopy this first Prefix And Suffix Results 0 results index this first Prefix And Suffix Results Count index this first Prefix And Suffix Results Count System arraycopy this prefix And First Suffix Results 0 results index this prefix And First Suffix Results Count index this prefix And First Suffix Results Count System arraycopy this prefix And Suffix Results 0 results index this prefix And Suffix Results Count index this prefix And Suffix Results Count System arraycopy this first Prefix Results 0 results index this first Prefix Results Count index this first Prefix Results Count System arraycopy this prefix Results 0 results index this prefix Results Count index this prefix Results Count System arraycopy this first Suffix Results 0 results index this first Suffix Results Count index this first Suffix Results Count System arraycopy this suffix Results 0 results index this suffix Results Count index this suffix Results Count System arraycopy this other Results 0 results index this other Results Count return results  getResults firstPrefixAndFirstSuffixResultsCount firstPrefixAndSuffixResultsCount prefixAndFirstSuffixResultsCount prefixAndSuffixResultsCount firstPrefixResultsCount prefixResultsCount firstSuffixResultsCount suffixResultsCount otherResultsCount firstPrefixAndFirstSuffixResults firstPrefixAndFirstSuffixResultsCount firstPrefixAndFirstSuffixResultsCount firstPrefixAndSuffixResults firstPrefixAndSuffixResultsCount firstPrefixAndSuffixResultsCount prefixAndFirstSuffixResults prefixAndFirstSuffixResultsCount prefixAndFirstSuffixResultsCount prefixAndSuffixResults prefixAndSuffixResultsCount prefixAndSuffixResultsCount firstPrefixResults firstPrefixResultsCount firstPrefixResultsCount prefixResults prefixResultsCount prefixResultsCount firstSuffixResults firstSuffixResultsCount firstSuffixResultsCount suffixResults suffixResultsCount suffixResultsCount otherResults otherResultsCount
private Naming Conventions Not instantiable  NamingConventions
private static char remove Prefix And Suffix char name char prefixes char suffixes remove longer prefix char without Prefix Name name if prefixes null int best Length 0 for int i 0 i prefixes length i char prefix prefixes i if Char Operation prefix Equals prefix name int curr Len prefix length boolean last Char Is Letter Character is Letter prefix curr Len 1 if last Char Is Letter last Char Is Letter name length curr Len Character is Upper Case name curr Len if best Length curr Len name length curr Len without Prefix Name Char Operation subarray name curr Len name length best Length curr Len remove longer suffix char without Suffix Name without Prefix Name if suffixes null int best Length 0 for int i 0 i suffixes length i char suffix suffixes i if Char Operation ends With without Prefix Name suffix int curr Len suffix length if best Length curr Len without Prefix Name length curr Len without Suffix Name Char Operation subarray without Prefix Name 0 without Prefix Name length curr Len best Length curr Len without Suffix Name 0 Character to Lower Case without Suffix Name 0 return without Suffix Name  removePrefixAndSuffix withoutPrefixName bestLength CharOperation prefixEquals currLen lastCharIsLetter isLetter currLen lastCharIsLetter lastCharIsLetter currLen isUpperCase currLen bestLength currLen currLen withoutPrefixName CharOperation currLen bestLength currLen withoutSuffixName withoutPrefixName bestLength CharOperation endsWith withoutPrefixName currLen bestLength currLen withoutPrefixName currLen withoutSuffixName CharOperation withoutPrefixName withoutPrefixName currLen bestLength currLen withoutSuffixName toLowerCase withoutSuffixName withoutSuffixName
Remove prefix and suffix from an argument name p If argument name prefix is code pre code and argument name suffix is code suf code then for an argument named code pre Argsuf code the result of this method is code arg code If there is no prefix or suffix defined in Java Core options the result is the unchanged name code pre Argsuf code p p This method is affected by the following Java Core options CODEASSIST ARGUMENT PREFIXES and CODEASSIST ARGUMENT SUFFIXES p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param java Project project which contains the argument param argument Name argument s name return char the name without prefix and suffix see Java Core set Options java util Hashtable see Java Core get Default Options public static char remove Prefix And Suffix For Argument Name I Java Project java Project char argument Name Assist Options assist Options new Assist Options java Project get Options true return remove Prefix And Suffix argument Name assist Options argument Prefixes assist Options argument Suffixes  preArgsuf JavaCore preArgsuf JavaCore CODEASSIST_ARGUMENT_PREFIXES CODEASSIST_ARGUMENT_SUFFIXES getDefaultOptions JavaCore setOptions javaProject argumentName JavaCore setOptions JavaCore getDefaultOptions removePrefixAndSuffixForArgumentName IJavaProject javaProject argumentName AssistOptions assistOptions AssistOptions javaProject getOptions removePrefixAndSuffix argumentName assistOptions argumentPrefixes assistOptions argumentSuffixes
Remove prefix and suffix from an argument name p If argument name prefix is code pre code and argument name suffix is code suf code then for an argument named code pre Argsuf code the result of this method is code arg code If there is no prefix or suffix defined in Java Core options the result is the unchanged name code pre Argsuf code p p This method is affected by the following Java Core options CODEASSIST ARGUMENT PREFIXES and CODEASSIST ARGUMENT SUFFIXES p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param java Project project which contains the argument param argument Name argument s name return char the name without prefix and suffix see Java Core set Options java util Hashtable see Java Core get Default Options public static String remove Prefix And Suffix For Argument Name I Java Project java Project String argument Name return String value Of remove Prefix And Suffix For Argument Name java Project argument Name to Char Array  preArgsuf JavaCore preArgsuf JavaCore CODEASSIST_ARGUMENT_PREFIXES CODEASSIST_ARGUMENT_SUFFIXES getDefaultOptions JavaCore setOptions javaProject argumentName JavaCore setOptions JavaCore getDefaultOptions removePrefixAndSuffixForArgumentName IJavaProject javaProject argumentName valueOf removePrefixAndSuffixForArgumentName javaProject argumentName toCharArray
Remove prefix and suffix from a field name p If field name prefix is code pre code and field name suffix is code suf code then for a field named code pre Fieldsuf code the result of this method is code field code If there is no prefix or suffix defined in Java Core options the result is the unchanged name code pre Fieldsuf code p p This method is affected by the following Java Core options CODEASSIST FIELD PREFIXES CODEASSIST FIELD SUFFIXES for instance field and CODEASSIST STATIC FIELD PREFIXES CODEASSIST STATIC FIELD SUFFIXES for static field p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param java Project project which contains the field param field Name field s name param modifiers field s modifiers as defined by the class code Flags code return char the name without prefix and suffix see Flags see Java Core set Options java util Hashtable see Java Core get Default Options public static char remove Prefix And Suffix For Field Name I Java Project java Project char field Name int modifiers boolean is Static Flags is Static modifiers Assist Options assist Options new Assist Options java Project get Options true return remove Prefix And Suffix field Name is Static assist Options static Field Prefixes assist Options field Prefixes is Static assist Options static Field Suffixes assist Options field Suffixes  preFieldsuf JavaCore preFieldsuf JavaCore CODEASSIST_FIELD_PREFIXES CODEASSIST_FIELD_SUFFIXES CODEASSIST_STATIC_FIELD_PREFIXES CODEASSIST_STATIC_FIELD_SUFFIXES getDefaultOptions JavaCore setOptions javaProject fieldName JavaCore setOptions JavaCore getDefaultOptions removePrefixAndSuffixForFieldName IJavaProject javaProject fieldName isStatic isStatic AssistOptions assistOptions AssistOptions javaProject getOptions removePrefixAndSuffix fieldName isStatic assistOptions staticFieldPrefixes assistOptions fieldPrefixes isStatic assistOptions staticFieldSuffixes assistOptions fieldSuffixes
Remove prefix and suffix from a field name p If field name prefix is code pre code and field name suffix is code suf code then for a field named code pre Fieldsuf code the result of this method is code field code If there is no prefix or suffix defined in Java Core options the result is the unchanged name code pre Fieldsuf code p p This method is affected by the following Java Core options CODEASSIST FIELD PREFIXES CODEASSIST FIELD SUFFIXES for instance field and CODEASSIST STATIC FIELD PREFIXES CODEASSIST STATIC FIELD SUFFIXES for static field p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param java Project project which contains the field param field Name field s name param modifiers field s modifiers as defined by the class code Flags code return char the name without prefix and suffix see Flags see Java Core set Options java util Hashtable see Java Core get Default Options public static String remove Prefix And Suffix For Field Name I Java Project java Project String field Name int modifiers return String value Of remove Prefix And Suffix For Field Name java Project field Name to Char Array modifiers  preFieldsuf JavaCore preFieldsuf JavaCore CODEASSIST_FIELD_PREFIXES CODEASSIST_FIELD_SUFFIXES CODEASSIST_STATIC_FIELD_PREFIXES CODEASSIST_STATIC_FIELD_SUFFIXES getDefaultOptions JavaCore setOptions javaProject fieldName JavaCore setOptions JavaCore getDefaultOptions removePrefixAndSuffixForFieldName IJavaProject javaProject fieldName valueOf removePrefixAndSuffixForFieldName javaProject fieldName toCharArray
Remove prefix and suffix from a local variable name p If local variable name prefix is code pre code and local variable name suffix is code suf code then for a local variable named code pre Localsuf code the result of this method is code local code If there is no prefix or suffix defined in Java Core options the result is the unchanged name code pre Localsuf code p p This method is affected by the following Java Core options CODEASSIST LOCAL PREFIXES and CODEASSIST LOCAL SUFFIXES p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param java Project project which contains the variable param local Name variable s name return char the name without prefix and suffix see Java Core set Options java util Hashtable see Java Core get Default Options public static char remove Prefix And Suffix For Local Variable Name I Java Project java Project char local Name Assist Options assist Options new Assist Options java Project get Options true return remove Prefix And Suffix local Name assist Options argument Prefixes assist Options argument Suffixes  preLocalsuf JavaCore preLocalsuf JavaCore CODEASSIST_LOCAL_PREFIXES CODEASSIST_LOCAL_SUFFIXES getDefaultOptions JavaCore setOptions javaProject localName JavaCore setOptions JavaCore getDefaultOptions removePrefixAndSuffixForLocalVariableName IJavaProject javaProject localName AssistOptions assistOptions AssistOptions javaProject getOptions removePrefixAndSuffix localName assistOptions argumentPrefixes assistOptions argumentSuffixes
Remove prefix and suffix from a local variable name p If local variable name prefix is code pre code and local variable name suffix is code suf code then for a local variable named code pre Localsuf code the result of this method is code local code If there is no prefix or suffix defined in Java Core options the result is the unchanged name code pre Localsuf code p p This method is affected by the following Java Core options CODEASSIST LOCAL PREFIXES and CODEASSIST LOCAL SUFFIXES p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param java Project project which contains the variable param local Name variable s name return char the name without prefix and suffix see Java Core set Options java util Hashtable see Java Core get Default Options public static String remove Prefix And Suffix For Local Variable Name I Java Project java Project String local Name return String value Of remove Prefix And Suffix For Local Variable Name java Project local Name to Char Array  preLocalsuf JavaCore preLocalsuf JavaCore CODEASSIST_LOCAL_PREFIXES CODEASSIST_LOCAL_SUFFIXES getDefaultOptions JavaCore setOptions javaProject localName JavaCore setOptions JavaCore getDefaultOptions removePrefixAndSuffixForLocalVariableName IJavaProject javaProject localName valueOf removePrefixAndSuffixForLocalVariableName javaProject localName toCharArray
Suggest names for an argument The name is computed from argument s type and possible prefixes or suffixes are added p If the type of the argument is code Type Name code the prefix for argument is code pre code and the suffix for argument is code suf code then the proposed names are code pre Type Namesuf code and code pre Namesuf code If there is no prefix or suffix the proposals are code type Name code and code name code p p This method is affected by the following Java Core options CODEASSIST ARGUMENT PREFIXES and CODEASSIST ARGUMENT SUFFIXES p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param java Project project which contains the argument param package Name package of the argument s type param qualified Type Name argument s type param dim argument s dimension 0 if the argument is not an array param excluded Names a list of names which cannot be suggested already used names Can be code null code if there is no excluded names return char an array of names see Java Core set Options java util Hashtable see Java Core get Default Options public static char suggest Argument Names I Java Project java Project char package Name char qualified Type Name int dim char excluded Names Naming Requestor requestor new Naming Requestor Internal Naming Conventions suggest Argument Names java Project package Name qualified Type Name dim excluded Names requestor return requestor get Results  TypeName preTypeNamesuf preNamesuf typeName JavaCore CODEASSIST_ARGUMENT_PREFIXES CODEASSIST_ARGUMENT_SUFFIXES getDefaultOptions JavaCore setOptions javaProject packageName qualifiedTypeName excludedNames JavaCore setOptions JavaCore getDefaultOptions suggestArgumentNames IJavaProject javaProject packageName qualifiedTypeName excludedNames NamingRequestor NamingRequestor InternalNamingConventions suggestArgumentNames javaProject packageName qualifiedTypeName excludedNames getResults
Suggest names for an argument The name is computed from argument s type and possible prefixes or suffixes are added p If the type of the argument is code Type Name code the prefix for argument is code pre code and the suffix for argument is code suf code then the proposed names are code pre Type Namesuf code and code pre Namesuf code If there is no prefix or suffix the proposals are code type Name code and code name code p p This method is affected by the following Java Core options CODEASSIST ARGUMENT PREFIXES and CODEASSIST ARGUMENT SUFFIXES p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param java Project project which contains the argument param package Name package of the argument s type param qualified Type Name argument s type param dim argument s dimension 0 if the argument is not an array param excluded Names a list of names which cannot be suggested already used names Can be code null code if there is no excluded names return char an array of names see Java Core set Options java util Hashtable see Java Core get Default Options public static String suggest Argument Names I Java Project java Project String package Name String qualified Type Name int dim String excluded Names return convert Chars To String suggest Argument Names java Project package Name to Char Array qualified Type Name to Char Array dim convert String To Chars excluded Names  TypeName preTypeNamesuf preNamesuf typeName JavaCore CODEASSIST_ARGUMENT_PREFIXES CODEASSIST_ARGUMENT_SUFFIXES getDefaultOptions JavaCore setOptions javaProject packageName qualifiedTypeName excludedNames JavaCore setOptions JavaCore getDefaultOptions suggestArgumentNames IJavaProject javaProject packageName qualifiedTypeName excludedNames convertCharsToString suggestArgumentNames javaProject packageName toCharArray qualifiedTypeName toCharArray convertStringToChars excludedNames
Suggest names for a field The name is computed from field s type and possible prefixes or suffixes are added p If the type of the field is code Type Name code the prefix for field is code pre code and the suffix for field is code suf code then the proposed names are code pre Type Namesuf code and code pre Namesuf code If there is no prefix or suffix the proposals are code type Name code and code name code p p This method is affected by the following Java Core options CODEASSIST FIELD PREFIXES CODEASSIST FIELD SUFFIXES and for instance field and CODEASSIST STATIC FIELD PREFIXES CODEASSIST STATIC FIELD SUFFIXES for static field p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param java Project project which contains the field param package Name package of the field s type param qualified Type Name field s type param dim field s dimension 0 if the field is not an array param modifiers field s modifiers as defined by the class code Flags code param excluded Names a list of names which cannot be suggested already used names Can be code null code if there is no excluded names return char an array of names see Flags see Java Core set Options java util Hashtable see Java Core get Default Options public static char suggest Field Names I Java Project java Project char package Name char qualified Type Name int dim int modifiers char excluded Names Naming Requestor requestor new Naming Requestor Internal Naming Conventions suggest Field Names java Project package Name qualified Type Name dim modifiers excluded Names requestor return requestor get Results  TypeName preTypeNamesuf preNamesuf typeName JavaCore CODEASSIST_FIELD_PREFIXES CODEASSIST_FIELD_SUFFIXES CODEASSIST_STATIC_FIELD_PREFIXES CODEASSIST_STATIC_FIELD_SUFFIXES getDefaultOptions JavaCore setOptions javaProject packageName qualifiedTypeName excludedNames JavaCore setOptions JavaCore getDefaultOptions suggestFieldNames IJavaProject javaProject packageName qualifiedTypeName excludedNames NamingRequestor NamingRequestor InternalNamingConventions suggestFieldNames javaProject packageName qualifiedTypeName excludedNames getResults
Suggest names for a field The name is computed from field s type and possible prefixes or suffixes are added p If the type of the field is code Type Name code the prefix for field is code pre code and the suffix for field is code suf code then the proposed names are code pre Type Namesuf code and code pre Namesuf code If there is no prefix or suffix the proposals are code type Name code and code name code p p This method is affected by the following Java Core options CODEASSIST FIELD PREFIXES CODEASSIST FIELD SUFFIXES and for instance field and CODEASSIST STATIC FIELD PREFIXES CODEASSIST STATIC FIELD SUFFIXES for static field p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param java Project project which contains the field param package Name package of the field s type param qualified Type Name field s type param dim field s dimension 0 if the field is not an array param modifiers field s modifiers as defined by the class code Flags code param excluded Names a list of names which cannot be suggested already used names Can be code null code if there is no excluded names return char an array of names see Flags see Java Core set Options java util Hashtable see Java Core get Default Options public static String suggest Field Names I Java Project java Project String package Name String qualified Type Name int dim int modifiers String excluded Names return convert Chars To String suggest Field Names java Project package Name to Char Array qualified Type Name to Char Array dim modifiers convert String To Chars excluded Names  TypeName preTypeNamesuf preNamesuf typeName JavaCore CODEASSIST_FIELD_PREFIXES CODEASSIST_FIELD_SUFFIXES CODEASSIST_STATIC_FIELD_PREFIXES CODEASSIST_STATIC_FIELD_SUFFIXES getDefaultOptions JavaCore setOptions javaProject packageName qualifiedTypeName excludedNames JavaCore setOptions JavaCore getDefaultOptions suggestFieldNames IJavaProject javaProject packageName qualifiedTypeName excludedNames convertCharsToString suggestFieldNames javaProject packageName toCharArray qualifiedTypeName toCharArray convertStringToChars excludedNames
Suggest names for a local variable The name is computed from variable s type and possible prefixes or suffixes are added p If the type of the local variable is code Type Name code the prefix for local variable is code pre code and the suffix for local variable is code suf code then the proposed names are code pre Type Namesuf code and code pre Namesuf code If there is no prefix or suffix the proposals are code type Name code and code name code p p This method is affected by the following Java Core options CODEASSIST LOCAL PREFIXES and CODEASSIST LOCAL SUFFIXES p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param java Project project which contains the variable param package Name package of the variable s type param qualified Type Name variable s type param dim variable s dimension 0 if the variable is not an array param excluded Names a list of names which cannot be suggested already used names Can be code null code if there is no excluded names return char an array of names see Java Core set Options java util Hashtable see Java Core get Default Options public static char suggest Local Variable Names I Java Project java Project char package Name char qualified Type Name int dim char excluded Names Naming Requestor requestor new Naming Requestor Internal Naming Conventions suggest Local Variable Names java Project package Name qualified Type Name dim excluded Names requestor return requestor get Results  TypeName preTypeNamesuf preNamesuf typeName JavaCore CODEASSIST_LOCAL_PREFIXES CODEASSIST_LOCAL_SUFFIXES getDefaultOptions JavaCore setOptions javaProject packageName qualifiedTypeName excludedNames JavaCore setOptions JavaCore getDefaultOptions suggestLocalVariableNames IJavaProject javaProject packageName qualifiedTypeName excludedNames NamingRequestor NamingRequestor InternalNamingConventions suggestLocalVariableNames javaProject packageName qualifiedTypeName excludedNames getResults
Suggest names for a local variable The name is computed from variable s type and possible prefixes or suffixes are added p If the type of the local variable is code Type Name code the prefix for local variable is code pre code and the suffix for local variable is code suf code then the proposed names are code pre Type Namesuf code and code pre Namesuf code If there is no prefix or suffix the proposals are code type Name code and code name code p p This method is affected by the following Java Core options CODEASSIST LOCAL PREFIXES and CODEASSIST LOCAL SUFFIXES p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param java Project project which contains the variable param package Name package of the variable s type param qualified Type Name variable s type param dim variable s dimension 0 if the variable is not an array param excluded Names a list of names which cannot be suggested already used names Can be code null code if there is no excluded names return char an array of names see Java Core set Options java util Hashtable see Java Core get Default Options public static String suggest Local Variable Names I Java Project java Project String package Name String qualified Type Name int dim String excluded Names return convert Chars To String suggest Local Variable Names java Project package Name to Char Array qualified Type Name to Char Array dim convert String To Chars excluded Names  TypeName preTypeNamesuf preNamesuf typeName JavaCore CODEASSIST_LOCAL_PREFIXES CODEASSIST_LOCAL_SUFFIXES getDefaultOptions JavaCore setOptions javaProject packageName qualifiedTypeName excludedNames JavaCore setOptions JavaCore getDefaultOptions suggestLocalVariableNames IJavaProject javaProject packageName qualifiedTypeName excludedNames convertCharsToString suggestLocalVariableNames javaProject packageName toCharArray qualifiedTypeName toCharArray convertStringToChars excludedNames
Suggest name for a getter method The name is computed from field s name and possible prefixes or suffixes are removed p If the field name is code pre Field Namesuf code and the prefix for field is code pre code and the suffix for field is code suf code then the prosposed name is code is Field Name code for boolean field or code get Field Name code for others If there is no prefix and suffix the proposal is code is Pre Field Namesuf code for boolean field or code get Pre Field Namesuf code for others p p This method is affected by the following Java Core options CODEASSIST FIELD PREFIXES CODEASSIST FIELD SUFFIXES for instance field and CODEASSIST STATIC FIELD PREFIXES CODEASSIST STATIC FIELD SUFFIXES for static field p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param project project which contains the field param field Name field s name s param modifiers field s modifiers as defined by the class code Flags code param is Boolean code true code if the field s type is boolean param excluded Names a list of names which cannot be suggested already used names Can be code null code if there is no excluded names return char a name see Flags see Java Core set Options java util Hashtable see Java Core get Default Options public static char suggest Getter Name I Java Project project char field Name int modifiers boolean is Boolean char excluded Names if is Boolean char name remove Prefix And Suffix For Field Name project field Name modifiers int prefix Len GETTER BOOL NAME length if Char Operation prefix Equals GETTER BOOL NAME name name length prefix Len Character is Upper Case name prefix Len return suggest New Name name excluded Names else return suggest New Name Char Operation concat GETTER BOOL NAME suggest Accessor Name project field Name modifiers excluded Names else return suggest New Name Char Operation concat GETTER NAME suggest Accessor Name project field Name modifiers excluded Names  preFieldNamesuf isFieldName getFieldName isPreFieldNamesuf getPreFieldNamesuf JavaCore CODEASSIST_FIELD_PREFIXES CODEASSIST_FIELD_SUFFIXES CODEASSIST_STATIC_FIELD_PREFIXES CODEASSIST_STATIC_FIELD_SUFFIXES getDefaultOptions JavaCore setOptions fieldName isBoolean excludedNames JavaCore setOptions JavaCore getDefaultOptions suggestGetterName IJavaProject fieldName isBoolean excludedNames isBoolean removePrefixAndSuffixForFieldName fieldName prefixLen GETTER_BOOL_NAME CharOperation prefixEquals GETTER_BOOL_NAME prefixLen isUpperCase prefixLen suggestNewName excludedNames suggestNewName CharOperation GETTER_BOOL_NAME suggestAccessorName fieldName excludedNames suggestNewName CharOperation GETTER_NAME suggestAccessorName fieldName excludedNames
Suggest name for a getter method The name is computed from field s name and possible prefixes or suffixes are removed p If the field name is code pre Field Namesuf code and the prefix for field is code pre code and the suffix for field is code suf code then the prosposed name is code is Field Name code for boolean field or code get Field Name code for others If there is no prefix and suffix the proposal is code is Pre Field Namesuf code for boolean field or code get Pre Field Namesuf code for others p p This method is affected by the following Java Core options CODEASSIST FIELD PREFIXES CODEASSIST FIELD SUFFIXES for instance field and CODEASSIST STATIC FIELD PREFIXES CODEASSIST STATIC FIELD SUFFIXES for static field p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param project project which contains the field param field Name field s name s param modifiers field s modifiers as defined by the class code Flags code param is Boolean code true code if the field s type is boolean param excluded Names a list of names which cannot be suggested already used names Can be code null code if there is no excluded names return char a name see Flags see Java Core set Options java util Hashtable see Java Core get Default Options public static String suggest Getter Name I Java Project project String field Name int modifiers boolean is Boolean String excluded Names return String value Of suggest Getter Name project field Name to Char Array modifiers is Boolean convert String To Chars excluded Names  preFieldNamesuf isFieldName getFieldName isPreFieldNamesuf getPreFieldNamesuf JavaCore CODEASSIST_FIELD_PREFIXES CODEASSIST_FIELD_SUFFIXES CODEASSIST_STATIC_FIELD_PREFIXES CODEASSIST_STATIC_FIELD_SUFFIXES getDefaultOptions JavaCore setOptions fieldName isBoolean excludedNames JavaCore setOptions JavaCore getDefaultOptions suggestGetterName IJavaProject fieldName isBoolean excludedNames valueOf suggestGetterName fieldName toCharArray isBoolean convertStringToChars excludedNames
Suggest name for a setter method The name is computed from field s name and possible prefixes or suffixes are removed p If the field name is code pre Field Namesuf code and the prefix for field is code pre code and the suffix for field is code suf code then the proposed name is code set Field Name code If there is no prefix and suffix the proposal is code set Pre Field Namesuf code p p This method is affected by the following Java Core options CODEASSIST FIELD PREFIXES CODEASSIST FIELD SUFFIXES for instance field and CODEASSIST STATIC FIELD PREFIXES CODEASSIST STATIC FIELD SUFFIXES for static field p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param project project which contains the field param field Name field s name s param modifiers field s modifiers as defined by the class code Flags code param is Boolean code true code if the field s type is boolean param excluded Names a list of names which cannot be suggested already used names Can be code null code if there is no excluded names return char a name see Flags see Java Core set Options java util Hashtable see Java Core get Default Options public static char suggest Setter Name I Java Project project char field Name int modifiers boolean is Boolean char excluded Names if is Boolean char name remove Prefix And Suffix For Field Name project field Name modifiers int prefix Len GETTER BOOL NAME length if Char Operation prefix Equals GETTER BOOL NAME name name length prefix Len Character is Upper Case name prefix Len name Char Operation subarray name prefix Len name length return suggest New Name Char Operation concat SETTER NAME suggest Accessor Name project name modifiers excluded Names else return suggest New Name Char Operation concat SETTER NAME suggest Accessor Name project field Name modifiers excluded Names else return suggest New Name Char Operation concat SETTER NAME suggest Accessor Name project field Name modifiers excluded Names  preFieldNamesuf setFieldName setPreFieldNamesuf JavaCore CODEASSIST_FIELD_PREFIXES CODEASSIST_FIELD_SUFFIXES CODEASSIST_STATIC_FIELD_PREFIXES CODEASSIST_STATIC_FIELD_SUFFIXES getDefaultOptions JavaCore setOptions fieldName isBoolean excludedNames JavaCore setOptions JavaCore getDefaultOptions suggestSetterName IJavaProject fieldName isBoolean excludedNames isBoolean removePrefixAndSuffixForFieldName fieldName prefixLen GETTER_BOOL_NAME CharOperation prefixEquals GETTER_BOOL_NAME prefixLen isUpperCase prefixLen CharOperation prefixLen suggestNewName CharOperation SETTER_NAME suggestAccessorName excludedNames suggestNewName CharOperation SETTER_NAME suggestAccessorName fieldName excludedNames suggestNewName CharOperation SETTER_NAME suggestAccessorName fieldName excludedNames
Suggest name for a setter method The name is computed from field s name and possible prefixes or suffixes are removed p If the field name is code pre Field Namesuf code and the prefix for field is code pre code and the suffix for field is code suf code then the proposed name is code set Field Name code If there is no prefix and suffix the proposal is code set Pre Field Namesuf code p p This method is affected by the following Java Core options CODEASSIST FIELD PREFIXES CODEASSIST FIELD SUFFIXES for instance field and CODEASSIST STATIC FIELD PREFIXES CODEASSIST STATIC FIELD SUFFIXES for static field p p For a complete description of these configurable options see code get Default Options code For programmaticaly change these options see code Java Core set Options code p param project project which contains the field param field Name field s name s param modifiers field s modifiers as defined by the class code Flags code param is Boolean code true code if the field s type is boolean param excluded Names a list of names which cannot be suggested already used names Can be code null code if there is no excluded names return char a name see Flags see Java Core set Options java util Hashtable see Java Core get Default Options public static String suggest Setter Name I Java Project project String field Name int modifiers boolean is Boolean String excluded Names return String value Of suggest Setter Name project field Name to Char Array modifiers is Boolean convert String To Chars excluded Names  preFieldNamesuf setFieldName setPreFieldNamesuf JavaCore CODEASSIST_FIELD_PREFIXES CODEASSIST_FIELD_SUFFIXES CODEASSIST_STATIC_FIELD_PREFIXES CODEASSIST_STATIC_FIELD_SUFFIXES getDefaultOptions JavaCore setOptions fieldName isBoolean excludedNames JavaCore setOptions JavaCore getDefaultOptions suggestSetterName IJavaProject fieldName isBoolean excludedNames valueOf suggestSetterName fieldName toCharArray isBoolean convertStringToChars excludedNames
private static char suggest Accessor Name I Java Project project char field Name int modifiers char name remove Prefix And Suffix For Field Name project field Name modifiers if name length 0 Character is Lower Case name 0 name 0 Character to Upper Case name 0 return name  suggestAccessorName IJavaProject fieldName removePrefixAndSuffixForFieldName fieldName isLowerCase toUpperCase
private static char suggest New Name char name char excluded Names if excluded Names null return name char new Name name int count 2 int i 0 while i excluded Names length if Char Operation equals new Name excluded Names i false new Name Char Operation concat name String value Of count to Char Array i 0 else i return new Name  suggestNewName excludedNames excludedNames newName excludedNames CharOperation newName excludedNames newName CharOperation valueOf toCharArray newName
private static String convert Chars To String char c int length c null 0 c length String s new String length for int i 0 i length i s i String value Of c i return s  convertCharsToString valueOf
private static char convert String To Chars String s int length s null 0 s length char c new char length for int i 0 i length i if s i null c i Char Operation NO CHAR else c i s i to Char Array return c  convertStringToChars CharOperation NO_CHAR toCharArray

Creates a new field declaration match param element the field declaration param accuracy one of A ACCURATE or A INACCURATE param offset the offset the match starts at or 1 if unknown param length the length of the match or 1 if unknown param participant the search participant that created the match param resource the resource of the element public Field Declaration Match I Java Element element int accuracy int offset int length Search Participant participant I Resource resource super element accuracy offset length participant resource  A_ACCURATE A_INACCURATE FieldDeclarationMatch IJavaElement SearchParticipant IResource

Creates a new field reference match param enclosing Element the inner most enclosing member that references this field param accuracy one of link A ACCURATE or link A INACCURATE param offset the offset the match starts at or 1 if unknown param length the length of the match or 1 if unknown param is Read Access whether the match represents a read access param is Write Access whethre the match represents a write access param inside Doc Comment code true code if this search match is inside a doc comment and code false code otherwise param participant the search participant that created the match param resource the resource of the element public Field Reference Match I Java Element enclosing Element int accuracy int offset int length boolean is Read Access boolean is Write Access boolean inside Doc Comment Search Participant participant I Resource resource super enclosing Element accuracy offset length participant resource this is Read Access is Read Access this is Write Access is Write Access set Inside Doc Comment inside Doc Comment  enclosingElement A_ACCURATE A_INACCURATE isReadAccess isWriteAccess insideDocComment FieldReferenceMatch IJavaElement enclosingElement isReadAccess isWriteAccess insideDocComment SearchParticipant IResource enclosingElement isReadAccess isReadAccess isWriteAccess isWriteAccess setInsideDocComment insideDocComment
Returns whether the field reference is a read access to the field Note that a field reference can be read and written at once in case of compound assignments e g i 0 return whether the field reference is a read access to the field public final boolean is Read Access return this is Read Access  isReadAccess isReadAccess
Returns whether the field reference is a write access to the field Note that a field reference can be read and written at once in case of compound assignments e g i 0 return whether the field reference is a write access to the field public final boolean is Write Access return this is Write Access  isWriteAccess isWriteAccess

Called before the actual search starts deprecated Replaced by link Search Requestor begin Reporting  SearchRequestor beginReporting
public void about To Start Accepts the given search result param resource the resource in which the match has been found param start the start position of the match 1 if it is unknown param end the end position of the match 1 if it is unknown the ending offset is exclusive meaning that the actual range of characters covered is code start end code param enclosing Element the Java element that contains the character range code start end code the value can be code null code indicating that no enclosing Java element has been found param accuracy the level of accuracy the search result has either code EXACT MATCH code or code POTENTIAL MATCH code exception Core Exception if this collector had a problem accepting the search result deprecated Replaced by link Search Requestor accept Search Match Search Match public void accept I Resource resource int start int end I Java Element enclosing Element int accuracy  aboutToStart enclosingElement EXACT_MATCH POTENTIAL_MATCH CoreException SearchRequestor acceptSearchMatch SearchMatch IResource IJavaElement enclosingElement
throws Core Exception Called when the search has ended deprecated Replaced by link Search Requestor end Reporting  CoreException SearchRequestor endReporting
public void done Returns the progress monitor used to report progress return a progress monitor or null if no progress monitor is provided 

int REFERENCED PROJECTS 8 Checks whether the resource at the given path is enclosed by this scope param resource Path if the resource is contained in a JAR file the path is composed of 2 paths separated by code JAR FILE ENTRY SEPARATOR code the first path is the full OS path to the JAR if it is an external JAR or the workspace relative code I Path code to the JAR if it is an internal JAR the second path is the path to the resource inside the JAR return whether the resource is enclosed by this scope  REFERENCED_PROJECTS resourcePath JAR_FILE_ENTRY_SEPARATOR IPath
public boolean encloses String resource Path Checks whether this scope encloses the given element param element the given element return code true code if the element is in this scope  resourcePath
public boolean encloses I Java Element element Returns the paths to the enclosing projects and JA Rs for this search scope ul li If the path is a project path this is the full path of the project see code I Resource get Full Path code For example My Project li li If the path is a JAR path and this JAR is internal to the workspace this is the full path of the JAR file see code I Resource get Full Path code For example My Project mylib jar li li If the path is a JAR path and this JAR is external to the workspace this is the full OS path to the JAR file on the file system For example d libs mylib jar li ul return an array of paths to the enclosing projects and JARS  IJavaElement JARs IResource getFullPath MyProject IResource getFullPath MyProject
I Path enclosing Projects And Jars Returns whether this scope contains any code class code files either in folders or within JA Rs return whether this scope contains any code class code files deprecated Use link org eclipse jdt core search Search Engine create Java Search Scope I Java Element with the package fragment roots that correspond to the binaries instead  IPath enclosingProjectsAndJars JARs SearchEngine createJavaSearchScope IJavaElement
boolean includes Binaries Returns whether this scope includes classpaths defined by the projects of the resources of this search scope return whether this scope includes classpaths deprecated Use link org eclipse jdt core search Search Engine create Java Search Scope I Java Element with a Java project instead  includesBinaries SearchEngine createJavaSearchScope IJavaElement
boolean includes Classpaths Sets whether this scope contains any code class code files either in folders or within JA Rs param includes Binaries whether this scope contains any code class code files deprecated Use link org eclipse jdt core search Search Engine create Java Search Scope I Java Element with the package fragment roots that correspond to the binaries instead  includesClasspaths JARs includesBinaries SearchEngine createJavaSearchScope IJavaElement
public void set Includes Binaries boolean includes Binaries Sets whether this scope includes the classpaths defined by the projects of the resources of this search scope param includes Classpaths whether this scope includes classpaths deprecated Use link org eclipse jdt core search Search Engine create Java Search Scope I Java Element with a Java project instead  setIncludesBinaries includesBinaries includesClasspaths SearchEngine createJavaSearchScope IJavaElement

public interface I Type Name Requestor Accepts a top level or a member class param package Name the dot separated name of the package of the class param simple Type Name the simple name of the class param enclosing Type Names if the class is a member type the simple names of the enclosing types from the outer most to the direct parent of the class for example if the class is x y A B C then the enclosing types are A B This is an empty array if the class is a top level type param path the full path to the resource containing the class If the resource is a class file or a java file this is the full path in the workspace to this resource If the resource is an archive that is a zip or jar file the path is composed of 2 paths separated by code I Java Search Scope JAR FILE ENTRY SEPARATOR code the first path is the full OS path to the archive if it is an external archive or the workspace relative code I Path code to the archive if it is an internal archive the second path is the path to the resource inside the archive  ITypeNameRequestor packageName simpleTypeName enclosingTypeNames IJavaSearchScope JAR_FILE_ENTRY_SEPARATOR IPath
void accept Class char package Name char simple Type Name char enclosing Type Names String path Accepts a top level or a member interface param package Name the dot separated name of the package of the interface param simple Type Name the simple name of the interface param enclosing Type Names if the interface is a member type the simple names of the enclosing types from the outer most to the direct parent of the interface for example if the interface is x y A B I then the enclosing types are A B This is an empty array if the interface is a top level type param path the full path to the resource containing the interface If the resource is a class file or a java file this is the full path in the workspace to this resource If the resource is an archive that is a zip or jar file the path is composed of 2 paths separated by code I Java Search Scope JAR FILE ENTRY SEPARATOR code the first path is the full OS path to the archive if it is an external archive or the workspace relative code I Path code to the archive if it is an internal archive the second path is the path to the resource inside the archive  acceptClass packageName simpleTypeName enclosingTypeNames packageName simpleTypeName enclosingTypeNames IJavaSearchScope JAR_FILE_ENTRY_SEPARATOR IPath

Creates a new local variable declaration match param element the local variable declaration param accuracy one of A ACCURATE or A INACCURATE param offset the offset the match starts at or 1 if unknown param length the length of the match or 1 if unknown param participant the search participant that created the match param resource the resource of the element public Local Variable Declaration Match I Java Element element int accuracy int offset int length Search Participant participant I Resource resource super element accuracy offset length participant resource  A_ACCURATE A_INACCURATE LocalVariableDeclarationMatch IJavaElement SearchParticipant IResource

Creates a new local variable reference match param enclosing Element the inner most enclosing member that references this local variable param accuracy one of link A ACCURATE or link A INACCURATE param offset the offset the match starts at or 1 if unknown param length the length of the match or 1 if unknown param is Read Access whether the match represents a read access param is Write Access whethre the match represents a write access param inside Doc Comment code true code if this search match is inside a doc comment and code false code otherwise param participant the search participant that created the match param resource the resource of the element public Local Variable Reference Match I Java Element enclosing Element int accuracy int offset int length boolean is Read Access boolean is Write Access boolean inside Doc Comment Search Participant participant I Resource resource super enclosing Element accuracy offset length participant resource this is Read Access is Read Access this is Write Access is Write Access set Inside Doc Comment inside Doc Comment  enclosingElement A_ACCURATE A_INACCURATE isReadAccess isWriteAccess insideDocComment LocalVariableReferenceMatch IJavaElement enclosingElement isReadAccess isWriteAccess insideDocComment SearchParticipant IResource enclosingElement isReadAccess isReadAccess isWriteAccess isWriteAccess setInsideDocComment insideDocComment
Returns whether the local variable reference is a read access to the variable Note that a local variable reference can be read and written at once in case of compound assignments e g i 0 return whether the local variable reference is a read access to the variable public final boolean is Read Access return this is Read Access  isReadAccess isReadAccess
Returns whether the local variable reference is a write access to the variable Note that a local variable reference can be read and written at once in case of compound assignments e g i 0 return whether the local variable reference is a write access to the variable public final boolean is Write Access return this is Write Access  isWriteAccess isWriteAccess

Creates a new method declaration match param element the method declaration param accuracy one of A ACCURATE or A INACCURATE param offset the offset the match starts at or 1 if unknown param length the length of the match or 1 if unknown param participant the search participant that created the match param resource the resource of the element public Method Declaration Match I Java Element element int accuracy int offset int length Search Participant participant I Resource resource super element accuracy offset length participant resource  A_ACCURATE A_INACCURATE MethodDeclarationMatch IJavaElement SearchParticipant IResource

Creates a new method reference match param enclosing Element the inner most enclosing member that references this method param accuracy one of link A ACCURATE or link A INACCURATE param offset the offset the match starts at or 1 if unknown param length the length of the match or 1 if unknown param inside Doc Comment code true code if this search match is inside a doc comment and code false code otherwise param participant the search participant that created the match param resource the resource of the element public Method Reference Match I Java Element enclosing Element int accuracy int offset int length boolean inside Doc Comment Search Participant participant I Resource resource super enclosing Element accuracy offset length participant resource set Inside Doc Comment inside Doc Comment  enclosingElement A_ACCURATE A_INACCURATE insideDocComment MethodReferenceMatch IJavaElement enclosingElement insideDocComment SearchParticipant IResource enclosingElement setInsideDocComment insideDocComment

Creates a new package declaration match param element the package declaration param accuracy one of A ACCURATE or A INACCURATE param offset the offset the match starts at or 1 if unknown param length the length of the match or 1 if unknown param participant the search participant that created the match param resource the resource of the element public Package Declaration Match I Java Element element int accuracy int offset int length Search Participant participant I Resource resource super element accuracy offset length participant resource  A_ACCURATE A_INACCURATE PackageDeclarationMatch IJavaElement SearchParticipant IResource

Creates a new package reference match param enclosing Element the inner most enclosing member that references this package param accuracy one of link A ACCURATE or link A INACCURATE param offset the offset the match starts at or 1 if unknown param length the length of the match or 1 if unknown param inside Doc Comment code true code if this search match is inside a doc comment and code false code otherwise param participant the search participant that created the match param resource the resource of the element public Package Reference Match I Java Element enclosing Element int accuracy int offset int length boolean inside Doc Comment Search Participant participant I Resource resource super enclosing Element accuracy offset length participant resource set Inside Doc Comment inside Doc Comment  enclosingElement A_ACCURATE A_INACCURATE insideDocComment PackageReferenceMatch IJavaElement enclosingElement insideDocComment SearchParticipant IResource enclosingElement setInsideDocComment insideDocComment

Creates a new search document The given document path is a string that uniquely identifies the document Most of the time it is a workspace relative path but it can also be a file system path or a path inside a zip file param document Path the path to the document or code null code if none param participant the participant that creates the search document protected Search Document String document Path Search Participant participant this document Path document Path this participant participant  documentPath SearchDocument documentPath SearchParticipant documentPath documentPath
Adds the given index entry category and key coming from this document to the index This method must be called from link Search Participant index Document Search Document document org eclipse core runtime I Path index Path param category the category of the index entry param key the key of the index entry public void add Index Entry char category char key super add Index Entry category key  SearchParticipant indexDocument SearchDocument IPath indexPath addIndexEntry addIndexEntry
Returns the contents of this document Contents may be different from actual resource at corresponding document path in case of preprocessing p This method must be implemented in subclasses p p Note some implementation may choose to cache the contents directly on the document for performance reason However this could induce scalability issues due to the fact that collections of documents are manipulated throughout the search operation and cached contents would then consume lots of memory until they are all released at once in the end p return the contents of this document or code null code if none 
Returns the contents of this document Contents may be different from actual resource at corresponding document path due to preprocessing p This method must be implemented in subclasses p p Note some implementation may choose to cache the contents directly on the document for performance reason However this could induce scalability issues due to the fact that collections of documents are manipulated throughout the search operation and cached contents would then consume lots of memory until they are all released at once in the end p return the contents of this document or code null code if none 
Returns the encoding for this document p This method must be implemented in subclasses p return the encoding for this document or code null code if none 
Returns the participant that created this document return the participant that created this document public final Search Participant get Participant return this participant  SearchParticipant getParticipant
Returns the path to the original document to publicly mention in index or search results This path is a string that uniquely identifies the document Most of the time it is a workspace relative path but it can also be a file system path or a path inside a zip file return the path to the document public final String get Path return this document Path  getPath documentPath
Removes all index entries from the index for the given document This method must be called from link Search Participant index Document Search Document document org eclipse core runtime I Path index Path public void remove All Index Entries super remove All Index Entries  SearchParticipant indexDocument SearchDocument IPath indexPath removeAllIndexEntries removeAllIndexEntries

static class Search Pattern Adapter implements I Search Pattern Search Pattern pattern Search Pattern Adapter Search Pattern pattern this pattern pattern  SearchPatternAdapter ISearchPattern SearchPattern SearchPatternAdapter SearchPattern
class Result Collector Adapter extends Search Requestor I Java Search Result Collector result Collector Result Collector Adapter I Java Search Result Collector result Collector this result Collector result Collector  ResultCollectorAdapter SearchRequestor IJavaSearchResultCollector resultCollector ResultCollectorAdapter IJavaSearchResultCollector resultCollector resultCollector resultCollector
see org eclipse jdt core search Search Requestor accept Search Match org eclipse jdt core search Search Match public void accept Search Match Search Match match throws Core Exception this result Collector accept match get Resource match get Offset match get Offset match get Length I Java Element match get Element match get Accuracy  SearchRequestor acceptSearchMatch SearchMatch acceptSearchMatch SearchMatch CoreException resultCollector getResource getOffset getOffset getLength IJavaElement getElement getAccuracy
see org eclipse jdt core search Search Requestor begin Reporting public void begin Reporting this result Collector about To Start  SearchRequestor beginReporting beginReporting resultCollector aboutToStart
see org eclipse jdt core search Search Requestor end Reporting public void end Reporting this result Collector done  SearchRequestor endReporting endReporting resultCollector
Creates a new search engine public Search Engine will use working copies of PRIMARY owner  SearchEngine
Creates a new search engine with a list of working copies that will take precedence over their original compilation units in the subsequent search operations p Note that passing an empty working copy will be as if the original compilation unit had been deleted p p Since 3 0 the given working copies take precedence over primary working copies if any param working Copies the working copies that take precedence over their original compilation units since 3 0 public Search Engine I Compilation Unit working Copies this working Copies working Copies  workingCopies SearchEngine ICompilationUnit workingCopies workingCopies workingCopies
Creates a new search engine with a list of working copies that will take precedence over their original compilation units in the subsequent search operations p Note that passing an empty working copy will be as if the original compilation unit had been deleted p p Since 3 0 the given working copies take precedence over primary working copies if any param working Copies the working copies that take precedence over their original compilation units since 2 0 deprecated Use link Search Engine I Compilation Unit instead public Search Engine I Working Copy working Copies int length working Copies length System arraycopy working Copies 0 this working Copies new I Compilation Unit length 0 length  workingCopies SearchEngine ICompilationUnit SearchEngine IWorkingCopy workingCopies workingCopies workingCopies workingCopies ICompilationUnit
Creates a new search engine with the given working copy owner The working copies owned by this owner will take precedence over the primary compilation units in the subsequent search operations param working Copy Owner the owner of the working copies that take precedence over their original compilation units since 3 0 public Search Engine Working Copy Owner working Copy Owner this working Copy Owner working Copy Owner  workingCopyOwner SearchEngine WorkingCopyOwner workingCopyOwner workingCopyOwner workingCopyOwner
Returns a Java search scope limited to the hierarchy of the given type The Java elements resulting from a search with this scope will be types in this hierarchy or members of the types in this hierarchy param type the focus of the hierarchy scope return a new hierarchy scope exception Java Model Exception if the hierarchy could not be computed on the given type public static I Java Search Scope create Hierarchy Scope I Type type throws Java Model Exception return create Hierarchy Scope type Default Working Copy Owner PRIMARY  JavaModelException IJavaSearchScope createHierarchyScope IType JavaModelException createHierarchyScope DefaultWorkingCopyOwner
Returns a Java search scope limited to the hierarchy of the given type When the hierarchy is computed the types defined in the working copies owned by the given owner take precedence over the original compilation units The Java elements resulting from a search with this scope will be types in this hierarchy or members of the types in this hierarchy param type the focus of the hierarchy scope param owner the owner of working copies that take precedence over original compilation units return a new hierarchy scope exception Java Model Exception if the hierarchy could not be computed on the given type since 3 0 public static I Java Search Scope create Hierarchy Scope I Type type Working Copy Owner owner throws Java Model Exception return new Hierarchy Scope type owner  JavaModelException IJavaSearchScope createHierarchyScope IType WorkingCopyOwner JavaModelException HierarchyScope
Returns a Java search scope limited to the given resources The Java elements resulting from a search with this scope will have their underlying resource included in or equals to one of the given resources p Resources must not overlap for example one cannot include a folder and its children p param resources the resources the scope is limited to return a new Java search scope deprecated Use link create Java Search Scope I Java Element instead public static I Java Search Scope create Java Search Scope I Resource resources int length resources length I Java Element elements new I Java Element length for int i 0 i length i elements i Java Core create resources i return create Java Search Scope elements  createJavaSearchScope IJavaElement IJavaSearchScope createJavaSearchScope IResource IJavaElement IJavaElement JavaCore createJavaSearchScope
Returns a Java search scope limited to the given Java elements The Java elements resulting from a search with this scope will be children of the given elements p If an element is an I Java Project then the project s source folders its jars external and internal and its referenced projects with their source folders and jars recursively will be included If an element is an I Package Fragment Root then only the package fragments of this package fragment root will be included If an element is an I Package Fragment then only the compilation unit and class files of this package fragment will be included Subpackages will NOT be included p p In other words this is equivalent to using Search Engine create Java Search Scope elements true p param elements the Java elements the scope is limited to return a new Java search scope since 2 0 public static I Java Search Scope create Java Search Scope I Java Element elements return create Java Search Scope elements true  IJavaProject IPackageFragmentRoot IPackageFragment SearchEngine createJavaSearchScope IJavaSearchScope createJavaSearchScope IJavaElement createJavaSearchScope
Returns a Java search scope limited to the given Java elements The Java elements resulting from a search with this scope will be children of the given elements If an element is an I Java Project then the project s source folders its jars external and internal and if specified its referenced projects with their source folders and jars recursively will be included If an element is an I Package Fragment Root then only the package fragments of this package fragment root will be included If an element is an I Package Fragment then only the compilation unit and class files of this package fragment will be included Subpackages will NOT be included param elements the Java elements the scope is limited to param include Referenced Projects a flag indicating if referenced projects must be recursively included return a new Java search scope since 2 0 public static I Java Search Scope create Java Search Scope I Java Element elements boolean include Referenced Projects int include Mask I Java Search Scope SOURCES I Java Search Scope APPLICATION LIBRARIES I Java Search Scope SYSTEM LIBRARIES if include Referenced Projects include Mask I Java Search Scope REFERENCED PROJECTS return create Java Search Scope elements include Mask  IJavaProject IPackageFragmentRoot IPackageFragment includeReferencedProjects IJavaSearchScope createJavaSearchScope IJavaElement includeReferencedProjects includeMask IJavaSearchScope IJavaSearchScope APPLICATION_LIBRARIES IJavaSearchScope SYSTEM_LIBRARIES includeReferencedProjects includeMask IJavaSearchScope REFERENCED_PROJECTS createJavaSearchScope includeMask
Returns a Java search scope limited to the given Java elements The Java elements resulting from a search with this scope will be children of the given elements If an element is an I Java Project then it includes its source folders if I Java Search Scope SOURCES is specified its application libraries internal and external jars class folders that are on the raw classpath or the ones that are coming from a classpath path variable or the ones that are coming from a classpath container with the K APPLICATION kind if I Java Search Scope APPLICATION LIBRARIES is specified its system libraries internal and external jars class folders that are coming from an I Classpath Container with the K SYSTEM kind if I Java Search Scope APPLICATION LIBRARIES is specified its referenced projects with their source folders and jars recursively if I Java Search Scope REFERENCED PROJECTS is specified If an element is an I Package Fragment Root then only the package fragments of this package fragment root will be included If an element is an I Package Fragment then only the compilation unit and class files of this package fragment will be included Subpackages will NOT be included param elements the Java elements the scope is limited to param include Mask the bit wise OR of all include types of interest return a new Java search scope see I Java Search Scope SOURCES see I Java Search Scope APPLICATION LIBRARIES see I Java Search Scope SYSTEM LIBRARIES see I Java Search Scope REFERENCED PROJECTS since 3 0 public static I Java Search Scope create Java Search Scope I Java Element elements int include Mask Java Search Scope scope new Java Search Scope Hash Set visited Projects new Hash Set 2 for int i 0 length elements length i length i I Java Element element elements i if element null try if element instanceof Java Project scope add Java Project element include Mask visited Projects else scope add element catch Java Model Exception e ignore return scope  IJavaProject IJavaSearchScope K_APPLICATION IJavaSearchScope APPLICATION_LIBRARIES IClasspathContainer K_SYSTEM IJavaSearchScope APPLICATION_LIBRARIES IJavaSearchScope REFERENCED_PROJECTS IPackageFragmentRoot IPackageFragment includeMask IJavaSearchScope IJavaSearchScope APPLICATION_LIBRARIES IJavaSearchScope SYSTEM_LIBRARIES IJavaSearchScope REFERENCED_PROJECTS IJavaSearchScope createJavaSearchScope IJavaElement includeMask JavaSearchScope JavaSearchScope HashSet visitedProjects HashSet IJavaElement JavaProject JavaProject includeMask visitedProjects JavaModelException
Returns a search pattern that combines the given two patterns into a or pattern The search result will match either the left pattern or the right pattern param left Pattern the left pattern param right Pattern the right pattern return a or pattern deprecated Use link Search Pattern create Or Pattern Search Pattern Search Pattern instead public static I Search Pattern create Or Search Pattern I Search Pattern left Pattern I Search Pattern right Pattern Search Pattern left Search Pattern Adapter left Pattern pattern Search Pattern right Search Pattern Adapter right Pattern pattern Search Pattern pattern Search Pattern create Or Pattern left right return new Search Pattern Adapter pattern  leftPattern rightPattern SearchPattern createOrPattern SearchPattern SearchPattern ISearchPattern createOrSearchPattern ISearchPattern leftPattern ISearchPattern rightPattern SearchPattern SearchPatternAdapter leftPattern SearchPattern SearchPatternAdapter rightPattern SearchPattern SearchPattern createOrPattern SearchPatternAdapter
Returns a search pattern based on a given string pattern The string patterns support wild cards The remaining parameters are used to narrow down the type of expected results br Examples ul li search for case insensitive references to code Object code code create Search Pattern Object TYPE REFERENCES false code li li search for case sensitive references to exact code Object code constructor code create Search Pattern java lang Object CONSTRUCTOR REFERENCES true code li li search for implementers of code java lang Runnable code code create Search Pattern java lang Runnable TYPE IMPLEMENTORS true code li ul param string Pattern the given pattern param search For determines the nature of the searched elements ul li code I Java Search Constants CLASS code only look for classes li li code I Java Search Constants INTERFACE code only look for interfaces li li code I Java Search Constants TYPE code look for both classes and interfaces li li code I Java Search Constants FIELD code look for fields li li code I Java Search Constants METHOD code look for methods li li code I Java Search Constants CONSTRUCTOR code look for constructors li li code I Java Search Constants PACKAGE code look for packages li ul param limit To determines the nature of the expected matches ul li code I Java Search Constants DECLARATIONS code will search declarations matching with the corresponding element In case the element is a method declarations of matching methods in subtypes will also be found allowing to find declarations of abstract methods etc li li code I Java Search Constants REFERENCES code will search references to the given element li li code I Java Search Constants ALL OCCURRENCES code will search for either declarations or references as specified above li li code I Java Search Constants IMPLEMENTORS code for interface will find all types which implements a given interface li ul param is Case Sensitive indicates whether the search is case sensitive or not return a search pattern on the given string pattern or code null code if the string pattern is ill formed deprecated Use link Search Pattern create Pattern String int int int instead public static I Search Pattern create Search Pattern String string Pattern int search For int limit To boolean is Case Sensitive int match Mode string Pattern index Of 1 string Pattern index Of 1 Search Pattern R PATTERN MATCH Search Pattern R EXACT MATCH int match Rule is Case Sensitive match Mode Search Pattern R CASE SENSITIVE match Mode return new Search Pattern Adapter Search Pattern create Pattern string Pattern search For limit To match Rule  createSearchPattern createSearchPattern createSearchPattern stringPattern searchFor IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants limitTo IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants ALL_OCCURRENCES IJavaSearchConstants isCaseSensitive SearchPattern createPattern ISearchPattern createSearchPattern stringPattern searchFor limitTo isCaseSensitive matchMode stringPattern indexOf stringPattern indexOf SearchPattern R_PATTERN_MATCH SearchPattern R_EXACT_MATCH matchRule isCaseSensitive matchMode SearchPattern R_CASE_SENSITIVE matchMode SearchPatternAdapter SearchPattern createPattern stringPattern searchFor limitTo matchRule
Returns a search pattern based on a given Java element The pattern is used to trigger the appropriate search and can be parameterized as follows param element the Java element the search pattern is based on param limit To determines the nature of the expected matches ul li code I Java Search Constants DECLARATIONS code will search declarations matching with the corresponding element In case the element is a method declarations of matching methods in subtypes will also be found allowing to find declarations of abstract methods etc li li code I Java Search Constants REFERENCES code will search references to the given element li li code I Java Search Constants ALL OCCURRENCES code will search for either declarations or references as specified above li li code I Java Search Constants IMPLEMENTORS code for interface will find all types which implements a given interface li ul return a search pattern for a Java element or code null code if the given element is ill formed deprecated Use link Search Pattern create Pattern I Java Element int instead public static I Search Pattern create Search Pattern I Java Element element int limit To return new Search Pattern Adapter Search Pattern create Pattern element limit To  limitTo IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants ALL_OCCURRENCES IJavaSearchConstants SearchPattern createPattern IJavaElement ISearchPattern createSearchPattern IJavaElement limitTo SearchPatternAdapter SearchPattern createPattern limitTo
Returns a Java search scope with the workspace as the only limit return a new workspace scope public static I Java Search Scope create Workspace Scope return new Java Workspace Scope  IJavaSearchScope createWorkspaceScope JavaWorkspaceScope
Searches for matches to a given query Search queries can be created using helper methods from a String pattern or a Java element and encapsulate the description of what is being searched for example search method declarations in a case sensitive way param scope the search result has to be limited to the given scope param requestor a callback object to which each match is reported private void find Matches Search Pattern pattern Search Participant participants I Java Search Scope scope Search Requestor requestor I Progress Monitor monitor throws Core Exception if monitor null monitor is Canceled throw new Operation Canceled Exception initialize progress monitor if monitor null monitor begin Task Util bind engine searching 100 NON NLS 1 if Search Engine VERBOSE System out println Searching for this in scope NON NLS 1 NON NLS 2 Index Manager index Manager Java Model Manager get Java Model Manager get Index Manager try requestor begin Reporting for int i 0 l participants null 0 participants length i l i if monitor null monitor is Canceled throw new Operation Canceled Exception Search Participant participant participants i try participant begin Searching requestor enter Participant participant Path Collector path Collector new Path Collector index Manager perform Concurrent Job new Pattern Search Job pattern participant scope path Collector I Java Search Constants WAIT UNTIL READY TO SEARCH monitor if monitor null monitor is Canceled throw new Operation Canceled Exception locate index matches if any note that all search matches could have been issued during index querying String index Match Paths path Collector get Paths path Collector null release int index Match Length index Match Paths null 0 index Match Paths length Search Document index Matches new Search Document index Match Length for int j 0 j index Match Length j index Matches j participant get Document index Match Paths j Search Document matches Match Locator add Working Copies pattern index Matches get Working Copies participant participant locate Matches matches pattern scope requestor monitor finally requestor exit Participant participant participant done Searching finally requestor end Reporting if monitor null monitor done  findMatches SearchPattern SearchParticipant IJavaSearchScope SearchRequestor IProgressMonitor CoreException isCanceled OperationCanceledException beginTask SearchEngine IndexManager indexManager JavaModelManager getJavaModelManager getIndexManager beginReporting isCanceled OperationCanceledException SearchParticipant beginSearching enterParticipant PathCollector pathCollector PathCollector indexManager performConcurrentJob PatternSearchJob pathCollector IJavaSearchConstants WAIT_UNTIL_READY_TO_SEARCH isCanceled OperationCanceledException indexMatchPaths pathCollector getPaths pathCollector indexMatchLength indexMatchPaths indexMatchPaths SearchDocument indexMatches SearchDocument indexMatchLength indexMatchLength indexMatches getDocument indexMatchPaths SearchDocument MatchLocator addWorkingCopies indexMatches getWorkingCopies locateMatches exitParticipant doneSearching endReporting
Returns a new default Java search participant return a new default Java search participant since 3 0 public static Search Participant get Default Search Participant return new Java Search Participant  SearchParticipant getDefaultSearchParticipant JavaSearchParticipant
private Parser get Parser if this parser null this compiler Options new Compiler Options Java Core get Options Problem Reporter problem Reporter new Problem Reporter Default Error Handling Policies proceed With All Problems this compiler Options new Default Problem Factory this parser new Parser problem Reporter true return this parser  getParser compilerOptions CompilerOptions JavaCore getOptions ProblemReporter problemReporter ProblemReporter DefaultErrorHandlingPolicies proceedWithAllProblems compilerOptions DefaultProblemFactory problemReporter
Returns the underlying resource of the given element param element an I Java Element return an I Resource private I Resource get Resource I Java Element element if element instanceof I Member I Compilation Unit cu I Member element get Compilation Unit if cu null return cu get Resource return element get Resource  IJavaElement IResource IResource getResource IJavaElement IMember ICompilationUnit IMember getCompilationUnit getResource getResource
private I Compilation Unit get Working Copies I Compilation Unit copies if this working Copies null if this working Copy Owner null copies Java Model Manager get Java Model Manager get Working Copies Default Working Copy Owner PRIMARY false don t add primary W Cs a second time if copies null copies this working Copies else Hash Map path ToC Us new Hash Map for int i 0 length copies length i length i I Compilation Unit unit copies i path ToC Us put unit get Path unit for int i 0 length this working Copies length i length i I Compilation Unit unit this working Copies i path ToC Us put unit get Path unit int length path ToC Us size copies new I Compilation Unit length path ToC Us values to Array copies else copies this working Copies else if this working Copy Owner null copies Java Model Manager get Java Model Manager get Working Copies this working Copy Owner true add primary W Cs else copies Java Model Manager get Java Model Manager get Working Copies Default Working Copy Owner PRIMARY false don t add primary W Cs a second time if copies null return null filter out primary working copies that are saved I Compilation Unit result null int length copies length int index 0 for int i 0 i length i Compilation Unit copy Compilation Unit copies i try if copy is Primary copy has Unsaved Changes copy has Resource Changed if result null result new I Compilation Unit length result index copy catch Java Model Exception e copy doesn t exist ignore if index length result null System arraycopy result 0 result new I Compilation Unit index 0 index return result  ICompilationUnit getWorkingCopies ICompilationUnit workingCopies workingCopyOwner JavaModelManager getJavaModelManager getWorkingCopies DefaultWorkingCopyOwner WCs workingCopies HashMap pathToCUs HashMap ICompilationUnit pathToCUs getPath workingCopies ICompilationUnit workingCopies pathToCUs getPath pathToCUs ICompilationUnit pathToCUs toArray workingCopies workingCopyOwner JavaModelManager getJavaModelManager getWorkingCopies workingCopyOwner WCs JavaModelManager getJavaModelManager getWorkingCopies DefaultWorkingCopyOwner WCs ICompilationUnit CompilationUnit CompilationUnit isPrimary hasUnsavedChanges hasResourceChanged ICompilationUnit JavaModelException ICompilationUnit
Returns the list of working copies used to do the search on the given Java element param element an I Java Element return an array of I Compilation Unit private I Compilation Unit get Working Copies I Java Element element if element instanceof I Member I Compilation Unit cu I Member element get Compilation Unit if cu null cu is Working Copy I Compilation Unit copies get Working Copies int length copies null 0 copies length if length 0 I Compilation Unit new Working Copies new I Compilation Unit length 1 System arraycopy copies 0 new Working Copies 0 length new Working Copies length cu return new Working Copies return new I Compilation Unit cu return get Working Copies  IJavaElement ICompilationUnit ICompilationUnit getWorkingCopies IJavaElement IMember ICompilationUnit IMember getCompilationUnit isWorkingCopy ICompilationUnit getWorkingCopies ICompilationUnit newWorkingCopies ICompilationUnit newWorkingCopies newWorkingCopies newWorkingCopies ICompilationUnit getWorkingCopies
boolean match char class Or Interface char pattern Pkg char pattern Type Name int match Rule boolean is Class char pkg char type Name switch class Or Interface case I Index Constants CLASS SUFFIX if is Class return false case I Index Constants INTERFACE SUFFIX if is Class return false case I Index Constants TYPE SUFFIX nothing boolean is Case Sensitive match Rule Search Pattern R CASE SENSITIVE 0 if pattern Pkg null Char Operation equals pattern Pkg pkg is Case Sensitive return false if pattern Type Name null int match Mode match Rule is Case Sensitive Search Pattern R CASE SENSITIVE 0 switch match Mode case Search Pattern R EXACT MATCH return Char Operation equals pattern Type Name type Name is Case Sensitive case Search Pattern R PREFIX MATCH return Char Operation prefix Equals pattern Type Name type Name is Case Sensitive case Search Pattern R PATTERN MATCH return Char Operation match pattern Type Name type Name is Case Sensitive return true  classOrInterface patternPkg patternTypeName matchRule isClass typeName classOrInterface IIndexConstants CLASS_SUFFIX isClass IIndexConstants INTERFACE_SUFFIX isClass IIndexConstants TYPE_SUFFIX isCaseSensitive matchRule SearchPattern R_CASE_SENSITIVE patternPkg CharOperation patternPkg isCaseSensitive patternTypeName matchMode matchRule isCaseSensitive SearchPattern R_CASE_SENSITIVE matchMode SearchPattern R_EXACT_MATCH CharOperation patternTypeName typeName isCaseSensitive SearchPattern R_PREFIX_MATCH CharOperation prefixEquals patternTypeName typeName isCaseSensitive SearchPattern R_PATTERN_MATCH CharOperation patternTypeName typeName isCaseSensitive
Searches for the Java element determined by the given signature The signature can be incomplete For example a call like code search ws run METHOD REFERENCES col code searches for all references to the method code run code Note that by default the pattern will be case insensitive For specifying case s sensitive search use code search workspace create Search Pattern pattern String search For limit To true scope result Collector code param workspace the workspace param pattern String the pattern to be searched for param search For a hint what kind of Java element the string pattern represents Look into code I Java Search Constants code for valid values param limit To one of the following values ul li code I Java Search Constants DECLARATIONS code search for declarations only li li code I Java Search Constants REFERENCES code search for all references li li code I Java Search Constants ALL OCCURENCES code search for both declarations and all references li li code I Java Search Constants IMPLEMENTORS code search for all implementors of an interface the value is only valid if the Java element represents an interface li ul param scope the search result has to be limited to the given scope param result Collector a callback object to which each match is reported exception Java Model Exception if the search failed Reasons include ul li the classpath is incorrectly set li ul deprecated Use link search Search Pattern Search Participant I Java Search Scope Search Requestor I Progress Monitor instead public void search I Workspace workspace String pattern String int search For int limit To I Java Search Scope scope I Java Search Result Collector result Collector throws Java Model Exception try int match Mode pattern String index Of 1 pattern String index Of 1 Search Pattern R PATTERN MATCH Search Pattern R EXACT MATCH search Search Pattern create Pattern pattern String search For limit To match Mode Search Pattern R CASE SENSITIVE new Search Participant get Default Search Participant scope new Result Collector Adapter result Collector result Collector get Progress Monitor catch Core Exception e if e instanceof Java Model Exception throw Java Model Exception e throw new Java Model Exception e  createSearchPattern patternString searchFor limitTo resultCollector patternString searchFor IJavaSearchConstants limitTo IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants ALL_OCCURENCES IJavaSearchConstants resultCollector JavaModelException SearchPattern SearchParticipant IJavaSearchScope SearchRequestor IProgressMonitor IWorkspace patternString searchFor limitTo IJavaSearchScope IJavaSearchResultCollector resultCollector JavaModelException matchMode patternString indexOf patternString indexOf SearchPattern R_PATTERN_MATCH SearchPattern R_EXACT_MATCH SearchPattern createPattern patternString searchFor limitTo matchMode SearchPattern R_CASE_SENSITIVE SearchParticipant getDefaultSearchParticipant ResultCollectorAdapter resultCollector resultCollector getProgressMonitor CoreException JavaModelException JavaModelException JavaModelException
Searches for the given Java element param workspace the workspace param element the Java element to be searched for param limit To one of the following values ul li code I Java Search Constants DECLARATIONS code search for declarations only li li code I Java Search Constants REFERENCES code search for all references li li code I Java Search Constants ALL OCCURENCES code search for both declarations and all references li li code I Java Search Constants IMPLEMENTORS code search for all implementors of an interface the value is only valid if the Java element represents an interface li ul param scope the search result has to be limited to the given scope param result Collector a callback object to which each match is reported exception Java Model Exception if the search failed Reasons include ul li the element doesn t exist li li the classpath is incorrectly set li ul deprecated Use link search Search Pattern Search Participant I Java Search Scope Search Requestor I Progress Monitor instead public void search I Workspace workspace I Java Element element int limit To I Java Search Scope scope I Java Search Result Collector result Collector throws Java Model Exception search workspace create Search Pattern element limit To scope result Collector  limitTo IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants ALL_OCCURENCES IJavaSearchConstants resultCollector JavaModelException SearchPattern SearchParticipant IJavaSearchScope SearchRequestor IProgressMonitor IWorkspace IJavaElement limitTo IJavaSearchScope IJavaSearchResultCollector resultCollector JavaModelException createSearchPattern limitTo resultCollector
Searches for matches of a given search pattern Search patterns can be created using helper methods from a String pattern or a Java element and encapsulate the description of what is being searched for example search method declarations in a case sensitive way param workspace the workspace param search Pattern the pattern to be searched for param scope the search result has to be limited to the given scope param result Collector a callback object to which each match is reported exception Java Model Exception if the search failed Reasons include ul li the classpath is incorrectly set li ul deprecated Use link search Search Pattern Search Participant I Java Search Scope Search Requestor I Progress Monitor instead public void search I Workspace workspace I Search Pattern search Pattern I Java Search Scope scope I Java Search Result Collector result Collector throws Java Model Exception try search Search Pattern Adapter search Pattern pattern new Search Participant get Default Search Participant scope new Result Collector Adapter result Collector result Collector get Progress Monitor catch Core Exception e if e instanceof Java Model Exception throw Java Model Exception e throw new Java Model Exception e  searchPattern resultCollector JavaModelException SearchPattern SearchParticipant IJavaSearchScope SearchRequestor IProgressMonitor IWorkspace ISearchPattern searchPattern IJavaSearchScope IJavaSearchResultCollector resultCollector JavaModelException SearchPatternAdapter searchPattern SearchParticipant getDefaultSearchParticipant ResultCollectorAdapter resultCollector resultCollector getProgressMonitor CoreException JavaModelException JavaModelException JavaModelException
Searches for matches of a given search pattern Search patterns can be created using helper methods from a String pattern or a Java element and encapsulate the description of what is being searched for example search method declarations in a case sensitive way param pattern the pattern to search param participants the particpants in the search param scope the search scope param requestor the requestor to report the matches to param monitor the progress monitor used to report progress exception Core Exception if the search failed Reasons include ul li the classpath is incorrectly set li ul since 3 0 public void search Search Pattern pattern Search Participant participants I Java Search Scope scope Search Requestor requestor I Progress Monitor monitor throws Core Exception find Matches pattern participants scope requestor monitor  CoreException SearchPattern SearchParticipant IJavaSearchScope SearchRequestor IProgressMonitor CoreException findMatches
Index Query Requestor search Requestor new Index Query Requestor public boolean accept Index Match String document Path Search Pattern index Record Search Participant participant Type Declaration Pattern record Type Declaration Pattern index Record if record enclosing Type Names I Index Constants ONE ZERO CHAR filter out local and anonymous classes working Copy Paths contains document Path filter out working copies boolean is Class record class Or Interface I Index Constants INTERFACE SUFFIX if is Class name Requestor accept Class record pkg record simple Name record enclosing Type Names document Path else name Requestor accept Interface record pkg record simple Name record enclosing Type Names document Path return true  IndexQueryRequestor searchRequestor IndexQueryRequestor acceptIndexMatch documentPath SearchPattern indexRecord SearchParticipant TypeDeclarationPattern TypeDeclarationPattern indexRecord enclosingTypeNames IIndexConstants ONE_ZERO_CHAR workingCopyPaths documentPath isClass classOrInterface IIndexConstants INTERFACE_SUFFIX isClass nameRequestor acceptClass simpleName enclosingTypeNames documentPath nameRequestor acceptInterface simpleName enclosingTypeNames documentPath
final char contents working Copy get Buffer get Characters org eclipse jdt internal compiler env I Compilation Unit unit new org eclipse jdt internal compiler env I Compilation Unit public char get Contents return contents  workingCopy getBuffer getCharacters ICompilationUnit ICompilationUnit getContents
return contents public char get Main Type Name return null  getMainTypeName
return null public char get Package Name return null  getPackageName
return null public char get File Name return null  getFileName
final char package Declaration parsed Unit current Package null Char Operation NO CHAR Char Operation concat With parsed Unit current Package get Import Name class All Type Declarations Visitor extends AST Visitor public boolean visit Type Declaration type Declaration Block Scope block Scope return false no local anonymous type  packageDeclaration parsedUnit currentPackage CharOperation NO_CHAR CharOperation concatWith parsedUnit currentPackage getImportName AllTypeDeclarationsVisitor ASTVisitor TypeDeclaration typeDeclaration BlockScope blockScope
public boolean visit Type Declaration type Declaration Compilation Unit Scope compilation Unit Scope if match class Or Interface package Name type Name match Rule type Declaration is Interface package Declaration type Declaration name if type Declaration is Interface name Requestor accept Class package Declaration type Declaration name Char Operation NO CHAR CHAR path else name Requestor accept Interface package Declaration type Declaration name Char Operation NO CHAR CHAR path return true  TypeDeclaration typeDeclaration CompilationUnitScope compilationUnitScope classOrInterface packageName typeName matchRule typeDeclaration isInterface packageDeclaration typeDeclaration typeDeclaration isInterface nameRequestor acceptClass packageDeclaration typeDeclaration CharOperation NO_CHAR_CHAR nameRequestor acceptInterface packageDeclaration typeDeclaration CharOperation NO_CHAR_CHAR
public boolean visit Type Declaration member Type Declaration Class Scope class Scope if match class Or Interface package Name type Name match Rule member Type Declaration is Interface package Declaration member Type Declaration name compute encloising type names Type Declaration enclosing member Type Declaration enclosing Type char enclosing Type Names Char Operation NO CHAR CHAR while enclosing null enclosing Type Names Char Operation array Concat new char enclosing name enclosing Type Names if enclosing bits AST Node Is Member TypeMASK 0 enclosing enclosing enclosing Type else enclosing null report if member Type Declaration is Interface name Requestor accept Class package Declaration member Type Declaration name enclosing Type Names path else name Requestor accept Interface package Declaration member Type Declaration name enclosing Type Names path return true  TypeDeclaration memberTypeDeclaration ClassScope classScope classOrInterface packageName typeName matchRule memberTypeDeclaration isInterface packageDeclaration memberTypeDeclaration TypeDeclaration memberTypeDeclaration enclosingType enclosingTypeNames CharOperation NO_CHAR_CHAR enclosingTypeNames CharOperation arrayConcat enclosingTypeNames ASTNode IsMemberTypeMASK enclosingType memberTypeDeclaration isInterface nameRequestor acceptClass packageDeclaration memberTypeDeclaration enclosingTypeNames nameRequestor acceptInterface packageDeclaration memberTypeDeclaration enclosingTypeNames
Searches for all top level types and member types in the given scope The search can be selecting specific types given a package or a type name prefix and match modes param package Name the full name of the package of the searched types or a prefix for this package or a wild carded string for this package param type Name the dot separated qualified name of the searched type the qualification include the enclosing types if the searched type is a member type or a prefix for this type or a wild carded string for this type param match Rule one of ul li code Search Pattern R EXACT MATCH code if the package name and type name are the full names of the searched types li li code Search Pattern R PREFIX MATCH code if the package name and type name are prefixes of the names of the searched types li li code Search Pattern R PATTERN MATCH code if the package name and type name contain wild cards li ul combined with code Search Pattern R CASE SENSITIVE code e g code R EXACT MATCH R CASE SENSITIVE code if an exact and case sensitive match is requested or code R PREFIX MATCH code if a prefix non case sensitive match is requested param search For one of ul li code I Java Search Constants CLASS code if searching for classes only li li code I Java Search Constants INTERFACE code if searching for interfaces only li li code I Java Search Constants TYPE code if searching for both classes and interfaces li ul param scope the scope to search in param name Requestor the requestor that collects the results of the search param waiting Policy one of ul li code I Java Search Constants FORCE IMMEDIATE SEARCH code if the search should start immediately li li code I Java Search Constants CANCEL IF NOT READY TO SEARCH code if the search should be cancelled if the underlying indexer has not finished indexing the workspace li li code I Java Search Constants WAIT UNTIL READY TO SEARCH code if the search should wait for the underlying indexer to finish indexing the workspace li ul param progress Monitor the progress monitor to report progress to or code null code if no progress monitor is provided exception Java Model Exception if the search failed Reasons include ul li the classpath is incorrectly set li ul since 3 0 public void search All Type Names final char package Name final char type Name final int match Rule int search For I Java Search Scope scope final I Type Name Requestor name Requestor int waiting Policy I Progress Monitor progress Monitor throws Java Model Exception Index Manager index Manager Java Model Manager get Java Model Manager get Index Manager final char class Or Interface switch search For case I Java Search Constants CLASS class Or Interface I Index Constants CLASS SUFFIX break case I Java Search Constants INTERFACE class Or Interface I Index Constants INTERFACE SUFFIX break default class Or Interface I Index Constants TYPE SUFFIX break final Type Declaration Pattern pattern new Type Declaration Pattern package Name null do find member types type Name class Or Interface match Rule final Hash Set working Copy Paths new Hash Set I Compilation Unit copies get Working Copies if copies null for int i 0 length copies length i length i I Compilation Unit working Copy copies i working Copy Paths add working Copy get Path to String Index Query Requestor search Requestor new Index Query Requestor public boolean accept Index Match String document Path Search Pattern index Record Search Participant participant Type Declaration Pattern record Type Declaration Pattern index Record if record enclosing Type Names I Index Constants ONE ZERO CHAR filter out local and anonymous classes working Copy Paths contains document Path filter out working copies boolean is Class record class Or Interface I Index Constants INTERFACE SUFFIX if is Class name Requestor accept Class record pkg record simple Name record enclosing Type Names document Path else name Requestor accept Interface record pkg record simple Name record enclosing Type Names document Path return true try if progress Monitor null progress Monitor begin Task Util bind engine searching 100 NON NLS 1 add type names from indexes index Manager perform Concurrent Job new Pattern Search Job pattern get Default Search Participant Java search only scope search Requestor waiting Policy progress Monitor null null new Sub Progress Monitor progress Monitor 100 add type names from working copies if copies null for int i 0 length copies length i length i I Compilation Unit working Copy copies i final String path working Copy get Path to String if working Copy is Consistent I Package Declaration package Declarations working Copy get Package Declarations char package Declaration package Declarations length 0 Char Operation NO CHAR package Declarations 0 get Element Name to Char Array I Type all Types working Copy get All Types for int j 0 all Types Length all Types length j all Types Length j I Type type all Types j I Java Element parent type get Parent char enclosing Type Names if parent instanceof I Type char parent Qualified Name I Type parent get Type Qualified Name to Char Array enclosing Type Names Char Operation split On parent Qualified Name else enclosing Type Names Char Operation NO CHAR CHAR char simple Name type get Element Name to Char Array if match class Or Interface package Name type Name match Rule type is Class package Declaration simple Name if type is Class name Requestor accept Class package Declaration simple Name enclosing Type Names path else name Requestor accept Interface package Declaration simple Name enclosing Type Names path else Parser basic Parser get Parser final char contents working Copy get Buffer get Characters org eclipse jdt internal compiler env I Compilation Unit unit new org eclipse jdt internal compiler env I Compilation Unit public char get Contents return contents public char get Main Type Name return null public char get Package Name return null public char get File Name return null Compilation Result compilation Unit Result new Compilation Result unit 0 0 this compiler Options max Problems Per Unit Compilation Unit Declaration parsed Unit basic Parser diet Parse unit compilation Unit Result if parsed Unit null final char package Declaration parsed Unit current Package null Char Operation NO CHAR Char Operation concat With parsed Unit current Package get Import Name class All Type Declarations Visitor extends AST Visitor public boolean visit Type Declaration type Declaration Block Scope block Scope return false no local anonymous type public boolean visit Type Declaration type Declaration Compilation Unit Scope compilation Unit Scope if match class Or Interface package Name type Name match Rule type Declaration is Interface package Declaration type Declaration name if type Declaration is Interface name Requestor accept Class package Declaration type Declaration name Char Operation NO CHAR CHAR path else name Requestor accept Interface package Declaration type Declaration name Char Operation NO CHAR CHAR path return true public boolean visit Type Declaration member Type Declaration Class Scope class Scope if match class Or Interface package Name type Name match Rule member Type Declaration is Interface package Declaration member Type Declaration name compute encloising type names Type Declaration enclosing member Type Declaration enclosing Type char enclosing Type Names Char Operation NO CHAR CHAR while enclosing null enclosing Type Names Char Operation array Concat new char enclosing name enclosing Type Names if enclosing bits AST Node Is Member TypeMASK 0 enclosing enclosing enclosing Type else enclosing null report if member Type Declaration is Interface name Requestor accept Class package Declaration member Type Declaration name enclosing Type Names path else name Requestor accept Interface package Declaration member Type Declaration name enclosing Type Names path return true parsed Unit traverse new All Type Declarations Visitor parsed Unit scope finally if progress Monitor null progress Monitor done  packageName typeName matchRule SearchPattern R_EXACT_MATCH SearchPattern R_PREFIX_MATCH SearchPattern R_PATTERN_MATCH SearchPattern R_CASE_SENSITIVE R_EXACT_MATCH R_CASE_SENSITIVE R_PREFIX_MATCH searchFor IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants nameRequestor waitingPolicy IJavaSearchConstants FORCE_IMMEDIATE_SEARCH IJavaSearchConstants CANCEL_IF_NOT_READY_TO_SEARCH IJavaSearchConstants WAIT_UNTIL_READY_TO_SEARCH progressMonitor JavaModelException searchAllTypeNames packageName typeName matchRule searchFor IJavaSearchScope ITypeNameRequestor nameRequestor waitingPolicy IProgressMonitor progressMonitor JavaModelException IndexManager indexManager JavaModelManager getJavaModelManager getIndexManager classOrInterface searchFor IJavaSearchConstants classOrInterface IIndexConstants CLASS_SUFFIX IJavaSearchConstants classOrInterface IIndexConstants INTERFACE_SUFFIX classOrInterface IIndexConstants TYPE_SUFFIX TypeDeclarationPattern TypeDeclarationPattern packageName typeName classOrInterface matchRule HashSet workingCopyPaths HashSet ICompilationUnit getWorkingCopies ICompilationUnit workingCopy workingCopyPaths workingCopy getPath toString IndexQueryRequestor searchRequestor IndexQueryRequestor acceptIndexMatch documentPath SearchPattern indexRecord SearchParticipant TypeDeclarationPattern TypeDeclarationPattern indexRecord enclosingTypeNames IIndexConstants ONE_ZERO_CHAR workingCopyPaths documentPath isClass classOrInterface IIndexConstants INTERFACE_SUFFIX isClass nameRequestor acceptClass simpleName enclosingTypeNames documentPath nameRequestor acceptInterface simpleName enclosingTypeNames documentPath progressMonitor progressMonitor beginTask indexManager performConcurrentJob PatternSearchJob getDefaultSearchParticipant searchRequestor waitingPolicy progressMonitor SubProgressMonitor progressMonitor ICompilationUnit workingCopy workingCopy getPath toString workingCopy isConsistent IPackageDeclaration packageDeclarations workingCopy getPackageDeclarations packageDeclaration packageDeclarations CharOperation NO_CHAR packageDeclarations getElementName toCharArray IType allTypes workingCopy getAllTypes allTypesLength allTypes allTypesLength IType allTypes IJavaElement getParent enclosingTypeNames IType parentQualifiedName IType getTypeQualifiedName toCharArray enclosingTypeNames CharOperation splitOn parentQualifiedName enclosingTypeNames CharOperation NO_CHAR_CHAR simpleName getElementName toCharArray classOrInterface packageName typeName matchRule isClass packageDeclaration simpleName isClass nameRequestor acceptClass packageDeclaration simpleName enclosingTypeNames nameRequestor acceptInterface packageDeclaration simpleName enclosingTypeNames basicParser getParser workingCopy getBuffer getCharacters ICompilationUnit ICompilationUnit getContents getMainTypeName getPackageName getFileName CompilationResult compilationUnitResult CompilationResult compilerOptions maxProblemsPerUnit CompilationUnitDeclaration parsedUnit basicParser dietParse compilationUnitResult parsedUnit packageDeclaration parsedUnit currentPackage CharOperation NO_CHAR CharOperation concatWith parsedUnit currentPackage getImportName AllTypeDeclarationsVisitor ASTVisitor TypeDeclaration typeDeclaration BlockScope blockScope TypeDeclaration typeDeclaration CompilationUnitScope compilationUnitScope classOrInterface packageName typeName matchRule typeDeclaration isInterface packageDeclaration typeDeclaration typeDeclaration isInterface nameRequestor acceptClass packageDeclaration typeDeclaration CharOperation NO_CHAR_CHAR nameRequestor acceptInterface packageDeclaration typeDeclaration CharOperation NO_CHAR_CHAR TypeDeclaration memberTypeDeclaration ClassScope classScope classOrInterface packageName typeName matchRule memberTypeDeclaration isInterface packageDeclaration memberTypeDeclaration TypeDeclaration memberTypeDeclaration enclosingType enclosingTypeNames CharOperation NO_CHAR_CHAR enclosingTypeNames CharOperation arrayConcat enclosingTypeNames ASTNode IsMemberTypeMASK enclosingType memberTypeDeclaration isInterface nameRequestor acceptClass packageDeclaration memberTypeDeclaration enclosingTypeNames nameRequestor acceptInterface packageDeclaration memberTypeDeclaration enclosingTypeNames parsedUnit AllTypeDeclarationsVisitor parsedUnit progressMonitor progressMonitor
Searches for all top level types and member types in the given scope The search can be selecting specific types given a package or a type name prefix and match modes param workspace the workspace to search in param package Name the full name of the package of the searched types or a prefix for this package or a wild carded string for this package param type Name the dot separated qualified name of the searched type the qualification include the enclosing types if the searched type is a member type or a prefix for this type or a wild carded string for this type param match Mode one of ul li code I Java Search Constants EXACT MATCH code if the package name and type name are the full names of the searched types li li code I Java Search Constants PREFIX MATCH code if the package name and type name are prefixes of the names of the searched types li li code I Java Search Constants PATTERN MATCH code if the package name and type name contain wild cards li ul param is Case Sensitive whether the search should be case sensitive param search For one of ul li code I Java Search Constants CLASS code if searching for classes only li li code I Java Search Constants INTERFACE code if searching for interfaces only li li code I Java Search Constants TYPE code if searching for both classes and interfaces li ul param scope the scope to search in param name Requestor the requestor that collects the results of the search param waiting Policy one of ul li code I Java Search Constants FORCE IMMEDIATE SEARCH code if the search should start immediately li li code I Java Search Constants CANCEL IF NOT READY TO SEARCH code if the search should be cancelled if the underlying indexer has not finished indexing the workspace li li code I Java Search Constants WAIT UNTIL READY TO SEARCH code if the search should wait for the underlying indexer to finish indexing the workspace li ul param progress Monitor the progress monitor to report progress to or code null code if no progress monitor is provided exception Java Model Exception if the search failed Reasons include ul li the classpath is incorrectly set li ul deprecated Use link search All Type Names char char int int I Java Search Scope I Type Name Requestor int I Progress Monitor instead public void search All Type Names I Workspace workspace final char package Name final char type Name final int match Mode final boolean is Case Sensitive int search For I Java Search Scope scope final I Type Name Requestor name Requestor int waiting Policy I Progress Monitor progress Monitor throws Java Model Exception search All Type Names package Name type Name is Case Sensitive match Mode Search Pattern R CASE SENSITIVE match Mode search For scope name Requestor waiting Policy progress Monitor  packageName typeName matchMode IJavaSearchConstants EXACT_MATCH IJavaSearchConstants PREFIX_MATCH IJavaSearchConstants PATTERN_MATCH isCaseSensitive searchFor IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants nameRequestor waitingPolicy IJavaSearchConstants FORCE_IMMEDIATE_SEARCH IJavaSearchConstants CANCEL_IF_NOT_READY_TO_SEARCH IJavaSearchConstants WAIT_UNTIL_READY_TO_SEARCH progressMonitor JavaModelException searchAllTypeNames IJavaSearchScope ITypeNameRequestor IProgressMonitor searchAllTypeNames IWorkspace packageName typeName matchMode isCaseSensitive searchFor IJavaSearchScope ITypeNameRequestor nameRequestor waitingPolicy IProgressMonitor progressMonitor JavaModelException searchAllTypeNames packageName typeName isCaseSensitive matchMode SearchPattern R_CASE_SENSITIVE matchMode searchFor nameRequestor waitingPolicy progressMonitor
deprecated mark deprecated as it uses deprecated code private void search Declarations I Java Element enclosing Element I Java Search Result Collector result Collector Search Pattern pattern throws Java Model Exception search Declarations enclosing Element new Result Collector Adapter result Collector pattern result Collector get Progress Monitor  searchDeclarations IJavaElement enclosingElement IJavaSearchResultCollector resultCollector SearchPattern JavaModelException searchDeclarations enclosingElement ResultCollectorAdapter resultCollector resultCollector getProgressMonitor
private void search Declarations I Java Element enclosing Element Search Requestor requestor Search Pattern pattern I Progress Monitor monitor throws Java Model Exception I Java Search Scope scope create Java Search Scope new I Java Element enclosing Element I Resource resource this get Resource enclosing Element try if resource instanceof I File if VERBOSE System out println Searching for pattern in resource get Full Path NON NLS 1 NON NLS 2 Search Participant participant get Default Search Participant Search Document documents Match Locator add Working Copies pattern new Search Document new Java Search Document enclosing Element get Path to String participant get Working Copies enclosing Element participant participant locate Matches documents pattern scope requestor monitor else search pattern new Search Participant get Default Search Participant scope requestor monitor catch Core Exception e if e instanceof Java Model Exception throw Java Model Exception e throw new Java Model Exception e  searchDeclarations IJavaElement enclosingElement SearchRequestor SearchPattern IProgressMonitor JavaModelException IJavaSearchScope createJavaSearchScope IJavaElement enclosingElement IResource getResource enclosingElement IFile getFullPath SearchParticipant getDefaultSearchParticipant SearchDocument MatchLocator addWorkingCopies SearchDocument JavaSearchDocument enclosingElement getPath toString getWorkingCopies enclosingElement locateMatches SearchParticipant getDefaultSearchParticipant CoreException JavaModelException JavaModelException JavaModelException
Searches for all declarations of the fields accessed in the given element The element can be a compilation unit a source type or a source method Reports the field declarations using the given requestor p Consider the following code code pre class A int field1 class B extends A String value class X void test B b new B System out println b value b field1 pre code then searching for declarations of accessed fields in method code X test code would collect the fields code B value code and code A field1 code p param enclosing Element the method type or compilation unit to be searched in param requestor a callback object to which each match is reported param monitor the progress monitor used to report progress exception Java Model Exception if the search failed Reasons include ul li the element doesn t exist li li the classpath is incorrectly set li ul since 3 0 public void search Declarations Of Accessed Fields I Java Element enclosing Element Search Requestor requestor I Progress Monitor monitor throws Java Model Exception Search Pattern pattern new Declaration Of Accessed Fields Pattern enclosing Element search Declarations enclosing Element requestor pattern monitor  enclosingElement JavaModelException searchDeclarationsOfAccessedFields IJavaElement enclosingElement SearchRequestor IProgressMonitor JavaModelException SearchPattern DeclarationOfAccessedFieldsPattern enclosingElement searchDeclarations enclosingElement
Searches for all declarations of the fields accessed in the given element The element can be a compilation unit a source type or a source method Reports the field declarations using the given collector p Consider the following code code pre class A int field1 class B extends A String value class X void test B b new B System out println b value b field1 pre code then searching for declarations of accessed fields in method code X test code would collect the fields code B value code and code A field1 code p param workspace the workspace param enclosing Element the method type or compilation unit to be searched in param result Collector a callback object to which each match is reported exception Java Model Exception if the search failed Reasons include ul li the element doesn t exist li li the classpath is incorrectly set li ul deprecated Use link search Declarations Of Accessed Fields I Java Element Search Requestor I Progress Monitor instead public void search Declarations Of Accessed Fields I Workspace workspace I Java Element enclosing Element I Java Search Result Collector result Collector throws Java Model Exception Search Pattern pattern new Declaration Of Accessed Fields Pattern enclosing Element search Declarations enclosing Element result Collector pattern  enclosingElement resultCollector JavaModelException searchDeclarationsOfAccessedFields IJavaElement SearchRequestor IProgressMonitor searchDeclarationsOfAccessedFields IWorkspace IJavaElement enclosingElement IJavaSearchResultCollector resultCollector JavaModelException SearchPattern DeclarationOfAccessedFieldsPattern enclosingElement searchDeclarations enclosingElement resultCollector
Searches for all declarations of the types referenced in the given element The element can be a compilation unit a source type or a source method Reports the type declarations using the given requestor p Consider the following code code pre class A class B extends A interface I int VALUE 0 class X void test B b new B this foo b I VALUE pre code then searching for declarations of referenced types in method code X test code would collect the class code B code and the interface code I code p param enclosing Element the method type or compilation unit to be searched in param requestor a callback object to which each match is reported param monitor the progress monitor used to report progress exception Java Model Exception if the search failed Reasons include ul li the element doesn t exist li li the classpath is incorrectly set li ul since 3 0 public void search Declarations Of Referenced Types I Java Element enclosing Element Search Requestor requestor I Progress Monitor monitor throws Java Model Exception Search Pattern pattern new Declaration Of Referenced Types Pattern enclosing Element search Declarations enclosing Element requestor pattern monitor  enclosingElement JavaModelException searchDeclarationsOfReferencedTypes IJavaElement enclosingElement SearchRequestor IProgressMonitor JavaModelException SearchPattern DeclarationOfReferencedTypesPattern enclosingElement searchDeclarations enclosingElement
Searches for all declarations of the types referenced in the given element The element can be a compilation unit a source type or a source method Reports the type declarations using the given collector p Consider the following code code pre class A class B extends A interface I int VALUE 0 class X void test B b new B this foo b I VALUE pre code then searching for declarations of referenced types in method code X test code would collect the class code B code and the interface code I code p param workspace the workspace param enclosing Element the method type or compilation unit to be searched in param result Collector a callback object to which each match is reported exception Java Model Exception if the search failed Reasons include ul li the element doesn t exist li li the classpath is incorrectly set li ul deprecated Use link search Declarations Of Referenced Types I Java Element Search Requestor I Progress Monitor instead public void search Declarations Of Referenced Types I Workspace workspace I Java Element enclosing Element I Java Search Result Collector result Collector throws Java Model Exception Search Pattern pattern new Declaration Of Referenced Types Pattern enclosing Element search Declarations enclosing Element result Collector pattern  enclosingElement resultCollector JavaModelException searchDeclarationsOfReferencedTypes IJavaElement SearchRequestor IProgressMonitor searchDeclarationsOfReferencedTypes IWorkspace IJavaElement enclosingElement IJavaSearchResultCollector resultCollector JavaModelException SearchPattern DeclarationOfReferencedTypesPattern enclosingElement searchDeclarations enclosingElement resultCollector
Searches for all declarations of the methods invoked in the given element The element can be a compilation unit a source type or a source method Reports the method declarations using the given requestor p Consider the following code code pre class A void foo void bar class B extends A void foo class X void test A a new B a foo B b B a b bar pre code then searching for declarations of sent messages in method code X test code would collect the methods code A foo code code B foo code and code A bar code p param enclosing Element the method type or compilation unit to be searched in param requestor a callback object to which each match is reported param monitor the progress monitor used to report progress exception Java Model Exception if the search failed Reasons include ul li the element doesn t exist li li the classpath is incorrectly set li ul since 3 0 public void search Declarations Of Sent Messages I Java Element enclosing Element Search Requestor requestor I Progress Monitor monitor throws Java Model Exception Search Pattern pattern new Declaration Of Referenced Methods Pattern enclosing Element search Declarations enclosing Element requestor pattern monitor  enclosingElement JavaModelException searchDeclarationsOfSentMessages IJavaElement enclosingElement SearchRequestor IProgressMonitor JavaModelException SearchPattern DeclarationOfReferencedMethodsPattern enclosingElement searchDeclarations enclosingElement
Searches for all declarations of the methods invoked in the given element The element can be a compilation unit a source type or a source method Reports the method declarations using the given collector p Consider the following code code pre class A void foo void bar class B extends A void foo class X void test A a new B a foo B b B a b bar pre code then searching for declarations of sent messages in method code X test code would collect the methods code A foo code code B foo code and code A bar code p param workspace the workspace param enclosing Element the method type or compilation unit to be searched in param result Collector a callback object to which each match is reported exception Java Model Exception if the search failed Reasons include ul li the element doesn t exist li li the classpath is incorrectly set li ul deprecated Use link search Declarations Of Sent Messages I Java Element Search Requestor I Progress Monitor instead public void search Declarations Of Sent Messages I Workspace workspace I Java Element enclosing Element I Java Search Result Collector result Collector throws Java Model Exception Search Pattern pattern new Declaration Of Referenced Methods Pattern enclosing Element search Declarations enclosing Element result Collector pattern  enclosingElement resultCollector JavaModelException searchDeclarationsOfSentMessages IJavaElement SearchRequestor IProgressMonitor searchDeclarationsOfSentMessages IWorkspace IJavaElement enclosingElement IJavaSearchResultCollector resultCollector JavaModelException SearchPattern DeclarationOfReferencedMethodsPattern enclosingElement searchDeclarations enclosingElement resultCollector

Creates a new search match p Note that code is Inside Doc Comment code defaults to false p param element the element that encloses or corresponds to the match or code null code if none param accuracy one of link A ACCURATE or link A INACCURATE param offset the offset the match starts at or 1 if unknown param length the length of the match or 1 if unknown param participant the search participant that created the match param resource the resource of the element or code null code if none public Search Match I Java Element element int accuracy int offset int length Search Participant participant I Resource resource this element element this offset offset this length length this accuracy accuracy this participant participant this resource resource  isInsideDocComment A_ACCURATE A_INACCURATE SearchMatch IJavaElement SearchParticipant IResource
Returns the accuracy of this search match return one of link A ACCURATE or link A INACCURATE public final int get Accuracy return this accuracy  A_ACCURATE A_INACCURATE getAccuracy
Returns the element of this search match In case of a reference match this is the inner most enclosing element of the reference In case of a declaration match this is the declaration return the element of the search match or code null code if none public final Object get Element return this element  getElement
Returns the length of this search match return the length of this search match or 1 if unknown public final int get Length return this length  getLength
Returns the offset of this search match return the offset of this search match or 1 if unknown public final int get Offset return this offset  getOffset
Returns the search participant which issued this search match return the participant which issued this search match public final Search Participant get Participant return this participant  SearchParticipant getParticipant
Returns the resource containing this search match return the resource of the match or code null code if none public final I Resource get Resource return this resource  IResource getResource
Returns whether this search match is inside a doc comment of a Java source file return code true code if this search match is inside a doc comment and code false code otherwise public final boolean is Inside Doc Comment default is outside a doc comment return this inside Doc Comment  isInsideDocComment insideDocComment
Sets the accuracy of this match param accuracy one of link A ACCURATE or link A INACCURATE public final void set Accuracy int accuracy this accuracy accuracy  A_ACCURATE A_INACCURATE setAccuracy
Sets the element of this search match param element the element that encloses or corresponds to the match or code null code if none public final void set Element Object element this element element  setElement
Sets the length of this search match param length the length of the match or 1 if unknown public final void set Length int length this length length  setLength
Sets the offset of this search match param offset the offset the match starts at or 1 if unknown public final void set Offset int offset this offset offset  setOffset
Sets the participant of this match param participant the search participant that created this match public final void set Participant Search Participant participant this participant participant  setParticipant SearchParticipant
Sets the resource of this match param resource the resource of the match or code null code if none public final void set Resource I Resource resource this resource resource  setResource IResource
Sets whether this search match is inside a doc comment of a Java source file param inside Doc code true code if this search match is inside a doc comment and code false code otherwise public final void set Inside Doc Comment boolean inside Doc this inside Doc Comment inside Doc  insideDoc setInsideDocComment insideDoc insideDocComment insideDoc
public String to String String Buffer buffer new String Buffer buffer append Search match NON NLS 1 buffer append n accuracy NON NLS 1 buffer append this accuracy A ACCURATE ACCURATE INACCURATE NON NLS 1 NON NLS 2 buffer append n offset NON NLS 1 buffer append this offset buffer append n length NON NLS 1 buffer append this length if this element null buffer append n element NON NLS 1 buffer append Java Element get Element to String With Ancestors buffer append n NON NLS 1 return buffer to String  toString StringBuffer StringBuffer A_ACCURATE JavaElement getElement toStringWithAncestors toString

Creates a new search participant protected Search Participant do nothing  SearchParticipant
Notification that this participant s help is needed in a search p This method should be re implemented in subclasses that need to do something when the participant is needed in a search p public void begin Searching do nothing  beginSearching
Notification that this participant s help is no longer needed p This method should be re implemented in subclasses that need to do something when the participant is no longer needed in a search p public void done Searching do nothing  doneSearching
Returns a displayable name of this search participant p This method should be re implemented in subclasses that need to display a meaningfull name p return the displayable name of this search participant public String get Description return Search participant NON NLS 1  getDescription
Returns a search document for the given path The given document path is a string that uniquely identifies the document Most of the time it is a workspace relative path but it can also be a file system path or a path inside a zip file p Implementors of this method can either create an instance of their own subclass of link Search Document or return an existing instance of such a subclass p param document Path the path of the document return a search document  SearchDocument documentPath
Indexes the given document in the given index A search participant asked to index a document should parse it and call link Search Document add Index Entry char char as many times as needed to add index entries to the index If delegating to another participant it should use the original index location and not the delegatee s one In the particular case of delegating to the default search participant see link Search Engine get Default Search Participant the provided document s path must be a path ending with java or a class p The given index location must represent a path in the file system to a file that either already exists or is going to be created If it exists it must be an index file otherwise its data might be overwritten p p Clients are not expected to call this method p param document the document to index param index Location the location in the file system to the index  SearchDocument addIndexEntry SearchEngine getDefaultSearchParticipant indexLocation
Locates the matches in the given documents using the given search pattern and search scope and reports them to the givenn search requestor This method is called by the search engine once it has search documents matching the given pattern in the given search scope p Note that a participant e g a JSP participant can pre process the contents of the given documents create its own documents whose contents are Java compilation units and delegate the match location to the default participant see link Search Engine get Default Search Participant Passing its own link Search Requestor this particpant can then map the match positions back to the original contents create its own matches and report them to the original requestor p p Implementors of this method should check the progress monitor for cancelation when it is safe and appropriate to do so The cancelation request should be propagated to the caller by throwing code Operation Canceled Exception code p param documents the documents to locate matches in param pattern the search pattern to use when locating matches param scope the scope to limit the search to param requestor the requestor to report matches to param monitor the progress monitor to report progress to or code null code if no progress should be reported throws Core Exception if the requestor had problem accepting one of the matches  SearchEngine getDefaultSearchParticipant SearchRequestor OperationCanceledException CoreException
Schedules the indexing of the given document Once the document is ready to be indexed link index Document Search Document I Path index Document document index Path will be called in a different thread than the caller s thread p The given index location must represent a path in the file system to a file that either already exists or is going to be created If it exists it must be an index file otherwise its data might be overwritten p param document the document to index param index Location the location on the file system of the index public final void schedule Document Indexing Search Document document I Path index Location I Path document Path new Path document get Path I Workspace Root root Resources Plugin get Workspace get Root I Resource resource root find Member document Path I Path container Path resource null document Path resource get Project get Full Path Index Manager manager Java Model Manager get Java Model Manager get Index Manager String os Index Location index Location toOS String TODO jerome should not have to create index manually should expose API that recreates index instead manager ensure Index Exists os Index Location container Path manager schedule Document Indexing document container Path os Index Location this  indexDocument SearchDocument IPath indexDocument indexPath indexLocation scheduleDocumentIndexing SearchDocument IPath indexLocation IPath documentPath getPath IWorkspaceRoot ResourcesPlugin getWorkspace getRoot IResource findMember documentPath IPath containerPath documentPath getProject getFullPath IndexManager JavaModelManager getJavaModelManager getIndexManager osIndexLocation indexLocation toOSString ensureIndexExists osIndexLocation containerPath scheduleDocumentIndexing containerPath osIndexLocation
Returns the collection of index locations to consider when performing the given search query in the given scope The search engine calls this method before locating matches p An index location represents a path in the file system to a file that holds index information p p Clients are not expected to call this method p param query the search pattern to consider param scope the given search scope return the collection of index paths to consider 

Creates a search pattern with the rule to apply for matching index keys It can be exact match prefix match pattern match or regexp match Rule can also be combined with a case sensitivity flag param match Rule one of R EXACT MATCH R PREFIX MATCH R PATTERN MATCH R REGEXP MATCH combined with R CASE SENSITIVE e g R EXACT MATCH R CASE SENSITIVE if an exact and case sensitive match is requested or R PREFIX MATCH if a prefix non case sensitive match is requested public Search Pattern int match Rule this match Rule match Rule  matchRule R_EXACT_MATCH R_PREFIX_MATCH R_PATTERN_MATCH R_REGEXP_MATCH R_CASE_SENSITIVE R_EXACT_MATCH R_CASE_SENSITIVE R_PREFIX_MATCH SearchPattern matchRule matchRule matchRule
Returns a search pattern that combines the given two patterns into an and pattern The search result will match both the left pattern and the right pattern param left Pattern the left pattern param right Pattern the right pattern return an and pattern public static Search Pattern create And Pattern Search Pattern left Pattern Search Pattern right Pattern return Match Locator create And Pattern left Pattern right Pattern  leftPattern rightPattern SearchPattern createAndPattern SearchPattern leftPattern SearchPattern rightPattern MatchLocator createAndPattern leftPattern rightPattern
Constructor pattern are formed by declaring Qualification type parameter Types e g java lang Object Main private static Search Pattern create Constructor Pattern String pattern String int limit To int match Rule Scanner scanner new Scanner false comment true whitespace false nls Class File Constants JDK1 3 source Level null task Tags null task Priorities true task Case Sensitive scanner set Source pattern String to Char Array final int Inside Name 1 final int Inside Parameter 2 String declaring Qualification null type Name null parameter Type null String parameter Types null int parameter Count 1 boolean found Closing Parenthesis false int mode Inside Name int token try token scanner get Next Token catch Invalid Input Exception e return null while token Terminal Tokens Token NameEOF switch mode read declaring type and selector case Inside Name switch token case Terminal Tokens Token NameDOT if declaring Qualification null if type Name null return null declaring Qualification type Name else String token Source new String scanner get Current Token Source declaring Qualification token Source type Name type Name null break case Terminal Tokens Token NameLPAREN parameter Types new String 5 parameter Count 0 mode Inside Parameter break case Terminal Tokens Token NameWHITESPACE break default all other tokens are considered identifiers see bug 21763 Problem in Java search search if type Name null type Name new String scanner get Current Token Source else type Name new String scanner get Current Token Source break read parameter types case Inside Parameter switch token case Terminal Tokens Token NameWHITESPACE break case Terminal Tokens Token NameCOMMA if parameter Type null return null if parameter Types length parameter Count System arraycopy parameter Types 0 parameter Types new String parameter Count 2 0 parameter Count parameter Types parameter Count parameter Type parameter Type null break case Terminal Tokens Token NameRPAREN found Closing Parenthesis true if parameter Type null if parameter Types length parameter Count System arraycopy parameter Types 0 parameter Types new String parameter Count 2 0 parameter Count parameter Types parameter Count parameter Type break default all other tokens are considered identifiers see bug 21763 Problem in Java search search if parameter Type null parameter Type new String scanner get Current Token Source else parameter Type new String scanner get Current Token Source break try token scanner get Next Token catch Invalid Input Exception e return null parenthesis mismatch if parameter Count 0 found Closing Parenthesis return null if type Name null return null char type Name Chars type Name to Char Array if type Name Chars length 1 type Name Chars 0 type Name Chars null char declaring Qualification Chars null if declaring Qualification null declaring Qualification Chars declaring Qualification to Char Array char parameter Type Qualifications null parameter Type Simple Names null extract parameter types infos if parameter Count 0 parameter Type Qualifications new char parameter Count parameter Type Simple Names new char parameter Count for int i 0 i parameter Count i char parameter Type Part parameter Types i to Char Array int last Dot Position Char Operation last Index Of parameter Type Part if last Dot Position 0 parameter Type Qualifications i Char Operation subarray parameter Type Part 0 last Dot Position if parameter Type Qualifications i length 1 parameter Type Qualifications i 0 parameter Type Qualifications i null else prefix with a as the full qualification could be bigger because of an import parameter Type Qualifications i Char Operation concat I Index Constants ONE STAR parameter Type Qualifications i parameter Type Simple Names i Char Operation subarray parameter Type Part last Dot Position 1 parameter Type Part length else parameter Type Qualifications i null parameter Type Simple Names i parameter Type Part if parameter Type Simple Names i length 1 parameter Type Simple Names i 0 parameter Type Simple Names i null switch limit To case I Java Search Constants DECLARATIONS return new Constructor Pattern true false type Name Chars declaring Qualification Chars parameter Type Qualifications parameter Type Simple Names match Rule case I Java Search Constants REFERENCES return new Constructor Pattern false true type Name Chars declaring Qualification Chars parameter Type Qualifications parameter Type Simple Names match Rule case I Java Search Constants ALL OCCURRENCES return new Constructor Pattern true true type Name Chars declaring Qualification Chars parameter Type Qualifications parameter Type Simple Names match Rule return null  declaringQualification parameterTypes SearchPattern createConstructorPattern patternString limitTo matchRule ClassFileConstants JDK1_3 sourceLevel taskTags taskPriorities taskCaseSensitive setSource patternString toCharArray InsideName InsideParameter declaringQualification typeName parameterType parameterTypes parameterCount foundClosingParenthesis InsideName getNextToken InvalidInputException TerminalTokens TokenNameEOF InsideName TerminalTokens TokenNameDOT declaringQualification typeName declaringQualification typeName tokenSource getCurrentTokenSource declaringQualification tokenSource typeName typeName TerminalTokens TokenNameLPAREN parameterTypes parameterCount InsideParameter TerminalTokens TokenNameWHITESPACE typeName typeName getCurrentTokenSource typeName getCurrentTokenSource InsideParameter TerminalTokens TokenNameWHITESPACE TerminalTokens TokenNameCOMMA parameterType parameterTypes parameterCount parameterTypes parameterTypes parameterCount parameterCount parameterTypes parameterCount parameterType parameterType TerminalTokens TokenNameRPAREN foundClosingParenthesis parameterType parameterTypes parameterCount parameterTypes parameterTypes parameterCount parameterCount parameterTypes parameterCount parameterType parameterType parameterType getCurrentTokenSource parameterType getCurrentTokenSource getNextToken InvalidInputException parameterCount foundClosingParenthesis typeName typeNameChars typeName toCharArray typeNameChars typeNameChars typeNameChars declaringQualificationChars declaringQualification declaringQualificationChars declaringQualification toCharArray parameterTypeQualifications parameterTypeSimpleNames parameterCount parameterTypeQualifications parameterCount parameterTypeSimpleNames parameterCount parameterCount parameterTypePart parameterTypes toCharArray lastDotPosition CharOperation lastIndexOf parameterTypePart lastDotPosition parameterTypeQualifications CharOperation parameterTypePart lastDotPosition parameterTypeQualifications parameterTypeQualifications parameterTypeQualifications parameterTypeQualifications CharOperation IIndexConstants ONE_STAR parameterTypeQualifications parameterTypeSimpleNames CharOperation parameterTypePart lastDotPosition parameterTypePart parameterTypeQualifications parameterTypeSimpleNames parameterTypePart parameterTypeSimpleNames parameterTypeSimpleNames parameterTypeSimpleNames limitTo IJavaSearchConstants ConstructorPattern typeNameChars declaringQualificationChars parameterTypeQualifications parameterTypeSimpleNames matchRule IJavaSearchConstants ConstructorPattern typeNameChars declaringQualificationChars parameterTypeQualifications parameterTypeSimpleNames matchRule IJavaSearchConstants ALL_OCCURRENCES ConstructorPattern typeNameChars declaringQualificationChars parameterTypeQualifications parameterTypeSimpleNames matchRule
Field pattern are formed by declaring Type name type e g java lang String serial VersionUID long field private static Search Pattern create Field Pattern String pattern String int limit To int match Rule Scanner scanner new Scanner false comment true whitespace false nls Class File Constants JDK1 3 source Level null task Tags null task Priorities true task Case Sensitive scanner set Source pattern String to Char Array final int Inside Declaring Part 1 final int Inside Type 2 int last Token 1 String declaring Type null field Name null String type null int mode Inside Declaring Part int token try token scanner get Next Token catch Invalid Input Exception e return null while token Terminal Tokens Token NameEOF switch mode read declaring type and field Name case Inside Declaring Part switch token case Terminal Tokens Token NameDOT if declaring Type null if field Name null return null declaring Type field Name else String token Source new String scanner get Current Token Source declaring Type token Source field Name field Name null break case Terminal Tokens Token NameWHITESPACE if Terminal Tokens Token NameWHITESPACE last Token Terminal Tokens Token NameDOT last Token mode Inside Type break default all other tokens are considered identifiers see bug 21763 Problem in Java search search if field Name null field Name new String scanner get Current Token Source else field Name new String scanner get Current Token Source break read type case Inside Type switch token case Terminal Tokens Token NameWHITESPACE break default all other tokens are considered identifiers see bug 21763 Problem in Java search search if type null type new String scanner get Current Token Source else type new String scanner get Current Token Source break last Token token try token scanner get Next Token catch Invalid Input Exception e return null if field Name null return null char field Name Chars field Name to Char Array if field Name Chars length 1 field Name Chars 0 field Name Chars null char declaring Type Qualification null declaring Type Simple Name null char type Qualification null type Simple Name null extract declaring type infos if declaring Type null char declaring Type Part declaring Type to Char Array int last Dot Position Char Operation last Index Of declaring Type Part if last Dot Position 0 declaring Type Qualification Char Operation subarray declaring Type Part 0 last Dot Position if declaring Type Qualification length 1 declaring Type Qualification 0 declaring Type Qualification null declaring Type Simple Name Char Operation subarray declaring Type Part last Dot Position 1 declaring Type Part length else declaring Type Qualification null declaring Type Simple Name declaring Type Part if declaring Type Simple Name length 1 declaring Type Simple Name 0 declaring Type Simple Name null extract type infos if type null char type Part type to Char Array int last Dot Position Char Operation last Index Of type Part if last Dot Position 0 type Qualification Char Operation subarray type Part 0 last Dot Position if type Qualification length 1 type Qualification 0 type Qualification null else prefix with a as the full qualification could be bigger because of an import type Qualification Char Operation concat I Index Constants ONE STAR type Qualification type Simple Name Char Operation subarray type Part last Dot Position 1 type Part length else type Qualification null type Simple Name type Part if type Simple Name length 1 type Simple Name 0 type Simple Name null switch limit To case I Java Search Constants DECLARATIONS return new Field Pattern true false false field Name Chars declaring Type Qualification declaring Type Simple Name type Qualification type Simple Name match Rule case I Java Search Constants REFERENCES return new Field Pattern false true read access true write access field Name Chars declaring Type Qualification declaring Type Simple Name type Qualification type Simple Name match Rule case I Java Search Constants READ ACCESSES return new Field Pattern false true read access only false field Name Chars declaring Type Qualification declaring Type Simple Name type Qualification type Simple Name match Rule case I Java Search Constants WRITE ACCESSES return new Field Pattern false false true write access only field Name Chars declaring Type Qualification declaring Type Simple Name type Qualification type Simple Name match Rule case I Java Search Constants ALL OCCURRENCES return new Field Pattern true true read access true write access field Name Chars declaring Type Qualification declaring Type Simple Name type Qualification type Simple Name match Rule return null  declaringType serialVersionUID SearchPattern createFieldPattern patternString limitTo matchRule ClassFileConstants JDK1_3 sourceLevel taskTags taskPriorities taskCaseSensitive setSource patternString toCharArray InsideDeclaringPart InsideType lastToken declaringType fieldName InsideDeclaringPart getNextToken InvalidInputException TerminalTokens TokenNameEOF fieldName InsideDeclaringPart TerminalTokens TokenNameDOT declaringType fieldName declaringType fieldName tokenSource getCurrentTokenSource declaringType tokenSource fieldName fieldName TerminalTokens TokenNameWHITESPACE TerminalTokens TokenNameWHITESPACE lastToken TerminalTokens TokenNameDOT lastToken InsideType fieldName fieldName getCurrentTokenSource fieldName getCurrentTokenSource InsideType TerminalTokens TokenNameWHITESPACE getCurrentTokenSource getCurrentTokenSource lastToken getNextToken InvalidInputException fieldName fieldNameChars fieldName toCharArray fieldNameChars fieldNameChars fieldNameChars declaringTypeQualification declaringTypeSimpleName typeQualification typeSimpleName declaringType declaringTypePart declaringType toCharArray lastDotPosition CharOperation lastIndexOf declaringTypePart lastDotPosition declaringTypeQualification CharOperation declaringTypePart lastDotPosition declaringTypeQualification declaringTypeQualification declaringTypeQualification declaringTypeSimpleName CharOperation declaringTypePart lastDotPosition declaringTypePart declaringTypeQualification declaringTypeSimpleName declaringTypePart declaringTypeSimpleName declaringTypeSimpleName declaringTypeSimpleName typePart toCharArray lastDotPosition CharOperation lastIndexOf typePart lastDotPosition typeQualification CharOperation typePart lastDotPosition typeQualification typeQualification typeQualification typeQualification CharOperation IIndexConstants ONE_STAR typeQualification typeSimpleName CharOperation typePart lastDotPosition typePart typeQualification typeSimpleName typePart typeSimpleName typeSimpleName typeSimpleName limitTo IJavaSearchConstants FieldPattern fieldNameChars declaringTypeQualification declaringTypeSimpleName typeQualification typeSimpleName matchRule IJavaSearchConstants FieldPattern fieldNameChars declaringTypeQualification declaringTypeSimpleName typeQualification typeSimpleName matchRule IJavaSearchConstants READ_ACCESSES FieldPattern fieldNameChars declaringTypeQualification declaringTypeSimpleName typeQualification typeSimpleName matchRule IJavaSearchConstants WRITE_ACCESSES FieldPattern fieldNameChars declaringTypeQualification declaringTypeSimpleName typeQualification typeSimpleName matchRule IJavaSearchConstants ALL_OCCURRENCES FieldPattern fieldNameChars declaringTypeQualification declaringTypeSimpleName typeQualification typeSimpleName matchRule
Method pattern are formed by declaring Type selector parameter Types return Type e g java lang Runnable run void main private static Search Pattern create Method Pattern String pattern String int limit To int match Rule Scanner scanner new Scanner false comment true whitespace false nls Class File Constants JDK1 3 source Level null task Tags null task Priorities true task Case Sensitive scanner set Source pattern String to Char Array final int Inside Selector 1 final int Inside Parameter 2 final int Inside Return Type 3 int last Token 1 String declaring Type null selector null parameter Type null String parameter Types null int parameter Count 1 String return Type null boolean found Closing Parenthesis false int mode Inside Selector int token try token scanner get Next Token catch Invalid Input Exception e return null while token Terminal Tokens Token NameEOF switch mode read declaring type and selector case Inside Selector switch token case Terminal Tokens Token NameDOT if declaring Type null if selector null return null declaring Type selector else String token Source new String scanner get Current Token Source declaring Type token Source selector selector null break case Terminal Tokens Token NameLPAREN parameter Types new String 5 parameter Count 0 mode Inside Parameter break case Terminal Tokens Token NameWHITESPACE if Terminal Tokens Token NameWHITESPACE last Token Terminal Tokens Token NameDOT last Token mode Inside Return Type break default all other tokens are considered identifiers see bug 21763 Problem in Java search search if selector null selector new String scanner get Current Token Source else selector new String scanner get Current Token Source break break read parameter types case Inside Parameter switch token case Terminal Tokens Token NameWHITESPACE break case Terminal Tokens Token NameCOMMA if parameter Type null return null if parameter Types length parameter Count System arraycopy parameter Types 0 parameter Types new String parameter Count 2 0 parameter Count parameter Types parameter Count parameter Type parameter Type null break case Terminal Tokens Token NameRPAREN found Closing Parenthesis true if parameter Type null if parameter Types length parameter Count System arraycopy parameter Types 0 parameter Types new String parameter Count 2 0 parameter Count parameter Types parameter Count parameter Type mode Inside Return Type break default all other tokens are considered identifiers see bug 21763 Problem in Java search search if parameter Type null parameter Type new String scanner get Current Token Source else parameter Type new String scanner get Current Token Source break read return type case Inside Return Type switch token case Terminal Tokens Token NameWHITESPACE break default all other tokens are considered identifiers see bug 21763 Problem in Java search search if return Type null return Type new String scanner get Current Token Source else return Type new String scanner get Current Token Source break last Token token try token scanner get Next Token catch Invalid Input Exception e return null parenthesis mismatch if parameter Count 0 found Closing Parenthesis return null if selector null return null char selector Chars selector to Char Array if selector Chars length 1 selector Chars 0 selector Chars null char declaring Type Qualification null declaring Type Simple Name null char return Type Qualification null return Type Simple Name null char parameter Type Qualifications null parameter Type Simple Names null extract declaring type infos if declaring Type null char declaring Type Part declaring Type to Char Array int last Dot Position Char Operation last Index Of declaring Type Part if last Dot Position 0 declaring Type Qualification Char Operation subarray declaring Type Part 0 last Dot Position if declaring Type Qualification length 1 declaring Type Qualification 0 declaring Type Qualification null declaring Type Simple Name Char Operation subarray declaring Type Part last Dot Position 1 declaring Type Part length else declaring Type Qualification null declaring Type Simple Name declaring Type Part if declaring Type Simple Name length 1 declaring Type Simple Name 0 declaring Type Simple Name null extract parameter types infos if parameter Count 0 parameter Type Qualifications new char parameter Count parameter Type Simple Names new char parameter Count for int i 0 i parameter Count i char parameter Type Part parameter Types i to Char Array int last Dot Position Char Operation last Index Of parameter Type Part if last Dot Position 0 parameter Type Qualifications i Char Operation subarray parameter Type Part 0 last Dot Position if parameter Type Qualifications i length 1 parameter Type Qualifications i 0 parameter Type Qualifications i null else prefix with a as the full qualification could be bigger because of an import parameter Type Qualifications i Char Operation concat I Index Constants ONE STAR parameter Type Qualifications i parameter Type Simple Names i Char Operation subarray parameter Type Part last Dot Position 1 parameter Type Part length else parameter Type Qualifications i null parameter Type Simple Names i parameter Type Part if parameter Type Simple Names i length 1 parameter Type Simple Names i 0 parameter Type Simple Names i null extract return type infos if return Type null char return Type Part return Type to Char Array int last Dot Position Char Operation last Index Of return Type Part if last Dot Position 0 return Type Qualification Char Operation subarray return Type Part 0 last Dot Position if return Type Qualification length 1 return Type Qualification 0 return Type Qualification null else because of an import return Type Qualification Char Operation concat I Index Constants ONE STAR return Type Qualification return Type Simple Name Char Operation subarray return Type Part last Dot Position 1 return Type Part length else return Type Qualification null return Type Simple Name return Type Part if return Type Simple Name length 1 return Type Simple Name 0 return Type Simple Name null switch limit To case I Java Search Constants DECLARATIONS return new Method Pattern true false selector Chars declaring Type Qualification declaring Type Simple Name return Type Qualification return Type Simple Name parameter Type Qualifications parameter Type Simple Names null match Rule case I Java Search Constants REFERENCES return new Method Pattern false true selector Chars declaring Type Qualification declaring Type Simple Name return Type Qualification return Type Simple Name parameter Type Qualifications parameter Type Simple Names null match Rule case I Java Search Constants ALL OCCURRENCES return new Method Pattern true true selector Chars declaring Type Qualification declaring Type Simple Name return Type Qualification return Type Simple Name parameter Type Qualifications parameter Type Simple Names null match Rule return null  declaringType parameterTypes returnType SearchPattern createMethodPattern patternString limitTo matchRule ClassFileConstants JDK1_3 sourceLevel taskTags taskPriorities taskCaseSensitive setSource patternString toCharArray InsideSelector InsideParameter InsideReturnType lastToken declaringType parameterType parameterTypes parameterCount returnType foundClosingParenthesis InsideSelector getNextToken InvalidInputException TerminalTokens TokenNameEOF InsideSelector TerminalTokens TokenNameDOT declaringType declaringType tokenSource getCurrentTokenSource declaringType tokenSource TerminalTokens TokenNameLPAREN parameterTypes parameterCount InsideParameter TerminalTokens TokenNameWHITESPACE TerminalTokens TokenNameWHITESPACE lastToken TerminalTokens TokenNameDOT lastToken InsideReturnType getCurrentTokenSource getCurrentTokenSource InsideParameter TerminalTokens TokenNameWHITESPACE TerminalTokens TokenNameCOMMA parameterType parameterTypes parameterCount parameterTypes parameterTypes parameterCount parameterCount parameterTypes parameterCount parameterType parameterType TerminalTokens TokenNameRPAREN foundClosingParenthesis parameterType parameterTypes parameterCount parameterTypes parameterTypes parameterCount parameterCount parameterTypes parameterCount parameterType InsideReturnType parameterType parameterType getCurrentTokenSource parameterType getCurrentTokenSource InsideReturnType TerminalTokens TokenNameWHITESPACE returnType returnType getCurrentTokenSource returnType getCurrentTokenSource lastToken getNextToken InvalidInputException parameterCount foundClosingParenthesis selectorChars toCharArray selectorChars selectorChars selectorChars declaringTypeQualification declaringTypeSimpleName returnTypeQualification returnTypeSimpleName parameterTypeQualifications parameterTypeSimpleNames declaringType declaringTypePart declaringType toCharArray lastDotPosition CharOperation lastIndexOf declaringTypePart lastDotPosition declaringTypeQualification CharOperation declaringTypePart lastDotPosition declaringTypeQualification declaringTypeQualification declaringTypeQualification declaringTypeSimpleName CharOperation declaringTypePart lastDotPosition declaringTypePart declaringTypeQualification declaringTypeSimpleName declaringTypePart declaringTypeSimpleName declaringTypeSimpleName declaringTypeSimpleName parameterCount parameterTypeQualifications parameterCount parameterTypeSimpleNames parameterCount parameterCount parameterTypePart parameterTypes toCharArray lastDotPosition CharOperation lastIndexOf parameterTypePart lastDotPosition parameterTypeQualifications CharOperation parameterTypePart lastDotPosition parameterTypeQualifications parameterTypeQualifications parameterTypeQualifications parameterTypeQualifications CharOperation IIndexConstants ONE_STAR parameterTypeQualifications parameterTypeSimpleNames CharOperation parameterTypePart lastDotPosition parameterTypePart parameterTypeQualifications parameterTypeSimpleNames parameterTypePart parameterTypeSimpleNames parameterTypeSimpleNames parameterTypeSimpleNames returnType returnTypePart returnType toCharArray lastDotPosition CharOperation lastIndexOf returnTypePart lastDotPosition returnTypeQualification CharOperation returnTypePart lastDotPosition returnTypeQualification returnTypeQualification returnTypeQualification returnTypeQualification CharOperation IIndexConstants ONE_STAR returnTypeQualification returnTypeSimpleName CharOperation returnTypePart lastDotPosition returnTypePart returnTypeQualification returnTypeSimpleName returnTypePart returnTypeSimpleName returnTypeSimpleName returnTypeSimpleName limitTo IJavaSearchConstants MethodPattern selectorChars declaringTypeQualification declaringTypeSimpleName returnTypeQualification returnTypeSimpleName parameterTypeQualifications parameterTypeSimpleNames matchRule IJavaSearchConstants MethodPattern selectorChars declaringTypeQualification declaringTypeSimpleName returnTypeQualification returnTypeSimpleName parameterTypeQualifications parameterTypeSimpleNames matchRule IJavaSearchConstants ALL_OCCURRENCES MethodPattern selectorChars declaringTypeQualification declaringTypeSimpleName returnTypeQualification returnTypeSimpleName parameterTypeQualifications parameterTypeSimpleNames matchRule
Returns a search pattern that combines the given two patterns into an or pattern The search result will match either the left pattern or the right pattern param left Pattern the left pattern param right Pattern the right pattern return an or pattern public static Search Pattern create Or Pattern Search Pattern left Pattern Search Pattern right Pattern return new Or Pattern left Pattern right Pattern  leftPattern rightPattern SearchPattern createOrPattern SearchPattern leftPattern SearchPattern rightPattern OrPattern leftPattern rightPattern
private static Search Pattern create Package Pattern String pattern String int limit To int match Rule switch limit To case I Java Search Constants DECLARATIONS return new Package Declaration Pattern pattern String to Char Array match Rule case I Java Search Constants REFERENCES return new Package Reference Pattern pattern String to Char Array match Rule case I Java Search Constants ALL OCCURRENCES return new Or Pattern new Package Declaration Pattern pattern String to Char Array match Rule new Package Reference Pattern pattern String to Char Array match Rule return null  SearchPattern createPackagePattern patternString limitTo matchRule limitTo IJavaSearchConstants PackageDeclarationPattern patternString toCharArray matchRule IJavaSearchConstants PackageReferencePattern patternString toCharArray matchRule IJavaSearchConstants ALL_OCCURRENCES OrPattern PackageDeclarationPattern patternString toCharArray matchRule PackageReferencePattern patternString toCharArray matchRule
Returns a search pattern based on a given string pattern The string patterns support wild cards The remaining parameters are used to narrow down the type of expected results br Examples ul li search for case insensitive references to code Object code code create Search Pattern Object TYPE REFERENCES false code li li search for case sensitive references to exact code Object code constructor code create Search Pattern java lang Object CONSTRUCTOR REFERENCES true code li li search for implementers of code java lang Runnable code code create Search Pattern java lang Runnable TYPE IMPLEMENTORS true code li ul param string Pattern the given pattern param search For determines the nature of the searched elements ul li code I Java Search Constants CLASS code only look for classes li li code I Java Search Constants INTERFACE code only look for interfaces li li code I Java Search Constants TYPE code look for both classes and interfaces li li code I Java Search Constants FIELD code look for fields li li code I Java Search Constants METHOD code look for methods li li code I Java Search Constants CONSTRUCTOR code look for constructors li li code I Java Search Constants PACKAGE code look for packages li ul param limit To determines the nature of the expected matches ul li code I Java Search Constants DECLARATIONS code will search declarations matching with the corresponding element In case the element is a method declarations of matching methods in subtypes will also be found allowing to find declarations of abstract methods etc li li code I Java Search Constants REFERENCES code will search references to the given element li li code I Java Search Constants ALL OCCURRENCES code will search for either declarations or references as specified above li li code I Java Search Constants IMPLEMENTORS code for interface will find all types which implements a given interface li ul param match Rule one of R EXACT MATCH R PREFIX MATCH R PATTERN MATCH R REGEXP MATCH combined with R CASE SENSITIVE e g R EXACT MATCH R CASE SENSITIVE if an exact and case sensitive match is requested or R PREFIX MATCH if a prefix non case sensitive match is requested return a search pattern on the given string pattern or code null code if the string pattern is ill formed public static Search Pattern create Pattern String string Pattern int search For int limit To int match Rule if string Pattern null string Pattern length 0 return null switch search For case I Java Search Constants TYPE return create Type Pattern string Pattern limit To match Rule case I Java Search Constants METHOD return create Method Pattern string Pattern limit To match Rule case I Java Search Constants CONSTRUCTOR return create Constructor Pattern string Pattern limit To match Rule case I Java Search Constants FIELD return create Field Pattern string Pattern limit To match Rule case I Java Search Constants PACKAGE return create Package Pattern string Pattern limit To match Rule return null  createSearchPattern createSearchPattern createSearchPattern stringPattern searchFor IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants limitTo IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants ALL_OCCURRENCES IJavaSearchConstants matchRule R_EXACT_MATCH R_PREFIX_MATCH R_PATTERN_MATCH R_REGEXP_MATCH R_CASE_SENSITIVE R_EXACT_MATCH R_CASE_SENSITIVE R_PREFIX_MATCH SearchPattern createPattern stringPattern searchFor limitTo matchRule stringPattern stringPattern searchFor IJavaSearchConstants createTypePattern stringPattern limitTo matchRule IJavaSearchConstants createMethodPattern stringPattern limitTo matchRule IJavaSearchConstants createConstructorPattern stringPattern limitTo matchRule IJavaSearchConstants createFieldPattern stringPattern limitTo matchRule IJavaSearchConstants createPackagePattern stringPattern limitTo matchRule
Returns a search pattern based on a given Java element The pattern is used to trigger the appropriate search and can be parameterized as follows param element the Java element the search pattern is based on param limit To determines the nature of the expected matches ul li code I Java Search Constants DECLARATIONS code will search declarations matching with the corresponding element In case the element is a method declarations of matching methods in subtypes will also be found allowing to find declarations of abstract methods etc li li code I Java Search Constants REFERENCES code will search references to the given element li li code I Java Search Constants ALL OCCURRENCES code will search for either declarations or references as specified above li li code I Java Search Constants IMPLEMENTORS code for interface will find all types which implements a given interface li ul return a search pattern for a Java element or code null code if the given element is ill formed public static Search Pattern create Pattern I Java Element element int limit To Search Pattern search Pattern null int last Dot switch element get Element Type case I Java Element FIELD I Field field I Field element I Type declaring Class field get Declaring Type char declaring Simple Name declaring Class get Element Name to Char Array char declaring Qualification declaring Class get Package Fragment get Element Name to Char Array char enclosing Names enclosing Type Names declaring Class if enclosing Names length 0 declaring Qualification Char Operation concat declaring Qualification Char Operation concat With enclosing Names char name field get Element Name to Char Array char type Simple Name char type Qualification try String type Signature Signature to String field get Type Signature replace if last Dot type Signature last Index Of 1 type Simple Name type Signature to Char Array type Qualification null else type Simple Name type Signature substring last Dot 1 to Char Array type Qualification field is Binary type Signature substring 0 last Dot to Char Array prefix with a as the full qualification could be bigger because of an import Char Operation concat I Index Constants ONE STAR type Signature substring 0 last Dot to Char Array catch Java Model Exception e return null switch limit To case I Java Search Constants DECLARATIONS search Pattern new Field Pattern true false false name declaring Qualification declaring Simple Name type Qualification type Simple Name R EXACT MATCH R CASE SENSITIVE break case I Java Search Constants REFERENCES search Pattern new Field Pattern false true read access true write access name declaring Qualification declaring Simple Name type Qualification type Simple Name R EXACT MATCH R CASE SENSITIVE break case I Java Search Constants READ ACCESSES search Pattern new Field Pattern false true read access only false name declaring Qualification declaring Simple Name type Qualification type Simple Name R EXACT MATCH R CASE SENSITIVE break case I Java Search Constants WRITE ACCESSES search Pattern new Field Pattern false false true write access only name declaring Qualification declaring Simple Name type Qualification type Simple Name R EXACT MATCH R CASE SENSITIVE break case I Java Search Constants ALL OCCURRENCES search Pattern new Field Pattern true true read access true write access name declaring Qualification declaring Simple Name type Qualification type Simple Name R EXACT MATCH R CASE SENSITIVE break break case I Java Element IMPORT DECLARATION String element Name element get Element Name last Dot element Name last Index Of if last Dot 1 return null invalid import declaration I Import Declaration import Decl I Import Declaration element if import Decl is On Demand search Pattern create Package Pattern element Name substring 0 last Dot limit To R EXACT MATCH R CASE SENSITIVE else search Pattern create Type Pattern element Name substring last Dot 1 to Char Array element Name substring 0 last Dot to Char Array null limit To break case I Java Element LOCAL VARIABLE Local Variable local Var Local Variable element switch limit To case I Java Search Constants DECLARATIONS search Pattern new Local Variable Pattern true declarations false no read access false no write access local Var R EXACT MATCH R CASE SENSITIVE break case I Java Search Constants REFERENCES search Pattern new Local Variable Pattern false true read access true write access local Var R EXACT MATCH R CASE SENSITIVE break case I Java Search Constants READ ACCESSES search Pattern new Local Variable Pattern false true read access only false local Var R EXACT MATCH R CASE SENSITIVE break case I Java Search Constants WRITE ACCESSES search Pattern new Local Variable Pattern false false true write access only local Var R EXACT MATCH R CASE SENSITIVE break case I Java Search Constants ALL OCCURRENCES search Pattern new Local Variable Pattern true true read access true write access local Var R EXACT MATCH R CASE SENSITIVE break break case I Java Element METHOD I Method method I Method element boolean is Constructor try is Constructor method is Constructor catch Java Model Exception e return null declaring Class method get Declaring Type declaring Simple Name declaring Class get Element Name to Char Array declaring Qualification declaring Class get Package Fragment get Element Name to Char Array enclosing Names enclosing Type Names declaring Class if enclosing Names length 0 declaring Qualification Char Operation concat declaring Qualification Char Operation concat With enclosing Names char selector method get Element Name to Char Array char return Simple Name char return Qualification try String return Type Signature to String method get Return Type replace if last Dot return Type last Index Of 1 return Simple Name return Type to Char Array return Qualification null else return Simple Name return Type substring last Dot 1 to Char Array return Qualification method is Binary return Type substring 0 last Dot to Char Array prefix with a as the full qualification could be bigger because of an import Char Operation concat I Index Constants ONE STAR return Type substring 0 last Dot to Char Array catch Java Model Exception e return null String parameter Types method get Parameter Types int param Count parameter Types length char parameter Simple Names new char param Count char parameter Qualifications new char param Count for int i 0 i param Count i String signature Signature to String parameter Types i replace if last Dot signature last Index Of 1 parameter Simple Names i signature to Char Array parameter Qualifications i null else parameter Simple Names i signature substring last Dot 1 to Char Array parameter Qualifications i method is Binary signature substring 0 last Dot to Char Array prefix with a as the full qualification could be bigger because of an import Char Operation concat I Index Constants ONE STAR signature substring 0 last Dot to Char Array switch limit To case I Java Search Constants DECLARATIONS if is Constructor search Pattern new Constructor Pattern true false declaring Simple Name declaring Qualification parameter Qualifications parameter Simple Names R EXACT MATCH R CASE SENSITIVE else search Pattern new Method Pattern true false selector declaring Qualification declaring Simple Name return Qualification return Simple Name parameter Qualifications parameter Simple Names null R EXACT MATCH R CASE SENSITIVE break case I Java Search Constants REFERENCES if is Constructor search Pattern new Constructor Pattern false true declaring Simple Name declaring Qualification parameter Qualifications parameter Simple Names R EXACT MATCH R CASE SENSITIVE else search Pattern new Method Pattern false true  limitTo IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants ALL_OCCURRENCES IJavaSearchConstants SearchPattern createPattern IJavaElement limitTo SearchPattern searchPattern lastDot getElementType IJavaElement IField IField IType declaringClass getDeclaringType declaringSimpleName declaringClass getElementName toCharArray declaringQualification declaringClass getPackageFragment getElementName toCharArray enclosingNames enclosingTypeNames declaringClass enclosingNames declaringQualification CharOperation declaringQualification CharOperation concatWith enclosingNames getElementName toCharArray typeSimpleName typeQualification typeSignature toString getTypeSignature lastDot typeSignature lastIndexOf typeSimpleName typeSignature toCharArray typeQualification typeSimpleName typeSignature lastDot toCharArray typeQualification isBinary typeSignature lastDot toCharArray CharOperation IIndexConstants ONE_STAR typeSignature lastDot toCharArray JavaModelException limitTo IJavaSearchConstants searchPattern FieldPattern declaringQualification declaringSimpleName typeQualification typeSimpleName R_EXACT_MATCH R_CASE_SENSITIVE IJavaSearchConstants searchPattern FieldPattern declaringQualification declaringSimpleName typeQualification typeSimpleName R_EXACT_MATCH R_CASE_SENSITIVE IJavaSearchConstants READ_ACCESSES searchPattern FieldPattern declaringQualification declaringSimpleName typeQualification typeSimpleName R_EXACT_MATCH R_CASE_SENSITIVE IJavaSearchConstants WRITE_ACCESSES searchPattern FieldPattern declaringQualification declaringSimpleName typeQualification typeSimpleName R_EXACT_MATCH R_CASE_SENSITIVE IJavaSearchConstants ALL_OCCURRENCES searchPattern FieldPattern declaringQualification declaringSimpleName typeQualification typeSimpleName R_EXACT_MATCH R_CASE_SENSITIVE IJavaElement IMPORT_DECLARATION elementName getElementName lastDot elementName lastIndexOf lastDot IImportDeclaration importDecl IImportDeclaration importDecl isOnDemand searchPattern createPackagePattern elementName lastDot limitTo R_EXACT_MATCH R_CASE_SENSITIVE searchPattern createTypePattern elementName lastDot toCharArray elementName lastDot toCharArray limitTo IJavaElement LOCAL_VARIABLE LocalVariable localVar LocalVariable limitTo IJavaSearchConstants searchPattern LocalVariablePattern localVar R_EXACT_MATCH R_CASE_SENSITIVE IJavaSearchConstants searchPattern LocalVariablePattern localVar R_EXACT_MATCH R_CASE_SENSITIVE IJavaSearchConstants READ_ACCESSES searchPattern LocalVariablePattern localVar R_EXACT_MATCH R_CASE_SENSITIVE IJavaSearchConstants WRITE_ACCESSES searchPattern LocalVariablePattern localVar R_EXACT_MATCH R_CASE_SENSITIVE IJavaSearchConstants ALL_OCCURRENCES searchPattern LocalVariablePattern localVar R_EXACT_MATCH R_CASE_SENSITIVE IJavaElement IMethod IMethod isConstructor isConstructor isConstructor JavaModelException declaringClass getDeclaringType declaringSimpleName declaringClass getElementName toCharArray declaringQualification declaringClass getPackageFragment getElementName toCharArray enclosingNames enclosingTypeNames declaringClass enclosingNames declaringQualification CharOperation declaringQualification CharOperation concatWith enclosingNames getElementName toCharArray returnSimpleName returnQualification returnType toString getReturnType lastDot returnType lastIndexOf returnSimpleName returnType toCharArray returnQualification returnSimpleName returnType lastDot toCharArray returnQualification isBinary returnType lastDot toCharArray CharOperation IIndexConstants ONE_STAR returnType lastDot toCharArray JavaModelException parameterTypes getParameterTypes paramCount parameterTypes parameterSimpleNames paramCount parameterQualifications paramCount paramCount toString parameterTypes lastDot lastIndexOf parameterSimpleNames toCharArray parameterQualifications parameterSimpleNames lastDot toCharArray parameterQualifications isBinary lastDot toCharArray CharOperation IIndexConstants ONE_STAR lastDot toCharArray limitTo IJavaSearchConstants isConstructor searchPattern ConstructorPattern declaringSimpleName declaringQualification parameterQualifications parameterSimpleNames R_EXACT_MATCH R_CASE_SENSITIVE searchPattern MethodPattern declaringQualification declaringSimpleName returnQualification returnSimpleName parameterQualifications parameterSimpleNames R_EXACT_MATCH R_CASE_SENSITIVE IJavaSearchConstants isConstructor searchPattern ConstructorPattern declaringSimpleName declaringQualification parameterQualifications parameterSimpleNames R_EXACT_MATCH R_CASE_SENSITIVE searchPattern MethodPattern
private static Search Pattern create Type Pattern char simple Name char package Name char enclosing Type Names int limit To switch limit To case I Java Search Constants DECLARATIONS return new Type Declaration Pattern package Name enclosing Type Names simple Name I Index Constants TYPE SUFFIX R EXACT MATCH R CASE SENSITIVE case I Java Search Constants REFERENCES return new Type Reference Pattern Char Operation concat With package Name enclosing Type Names simple Name R EXACT MATCH R CASE SENSITIVE case I Java Search Constants IMPLEMENTORS return new Super Type Reference Pattern Char Operation concat With package Name enclosing Type Names simple Name true R EXACT MATCH R CASE SENSITIVE case I Java Search Constants ALL OCCURRENCES return new Or Pattern new Type Declaration Pattern package Name enclosing Type Names simple Name I Index Constants TYPE SUFFIX R EXACT MATCH R CASE SENSITIVE new Type Reference Pattern Char Operation concat With package Name enclosing Type Names simple Name R EXACT MATCH R CASE SENSITIVE return null  SearchPattern createTypePattern simpleName packageName enclosingTypeNames limitTo limitTo IJavaSearchConstants TypeDeclarationPattern packageName enclosingTypeNames simpleName IIndexConstants TYPE_SUFFIX R_EXACT_MATCH R_CASE_SENSITIVE IJavaSearchConstants TypeReferencePattern CharOperation concatWith packageName enclosingTypeNames simpleName R_EXACT_MATCH R_CASE_SENSITIVE IJavaSearchConstants SuperTypeReferencePattern CharOperation concatWith packageName enclosingTypeNames simpleName R_EXACT_MATCH R_CASE_SENSITIVE IJavaSearchConstants ALL_OCCURRENCES OrPattern TypeDeclarationPattern packageName enclosingTypeNames simpleName IIndexConstants TYPE_SUFFIX R_EXACT_MATCH R_CASE_SENSITIVE TypeReferencePattern CharOperation concatWith packageName enclosingTypeNames simpleName R_EXACT_MATCH R_CASE_SENSITIVE
Type pattern are formed by qualification type e g java lang Object Runnable private static Search Pattern create Type Pattern String pattern String int limit To int match Rule Scanner scanner new Scanner false comment true whitespace false nls Class File Constants JDK1 3 source Level null task Tags null task Priorities true task Case Sensitive scanner set Source pattern String to Char Array String type null int token try token scanner get Next Token catch Invalid Input Exception e return null while token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameWHITESPACE break default all other tokens are considered identifiers see bug 21763 Problem in Java search search if type null type new String scanner get Current Token Source else type new String scanner get Current Token Source try token scanner get Next Token catch Invalid Input Exception e return null if type null return null char qualification Chars null type Chars null extract declaring type infos if type null char type Part type to Char Array int last Dot Position Char Operation last Index Of type Part if last Dot Position 0 qualification Chars Char Operation subarray type Part 0 last Dot Position if qualification Chars length 1 qualification Chars 0 qualification Chars null type Chars Char Operation subarray type Part last Dot Position 1 type Part length else qualification Chars null type Chars type Part if type Chars length 1 type Chars 0 type Chars null switch limit To case I Java Search Constants DECLARATIONS cannot search for explicit member types return new Qualified Type Declaration Pattern qualification Chars type Chars I Index Constants TYPE SUFFIX match Rule case I Java Search Constants REFERENCES return new Type Reference Pattern qualification Chars type Chars match Rule case I Java Search Constants IMPLEMENTORS return new Super Type Reference Pattern qualification Chars type Chars true match Rule case I Java Search Constants ALL OCCURRENCES return new Or Pattern new Qualified Type Declaration Pattern qualification Chars type Chars I Index Constants TYPE SUFFIX match Rule cannot search for explicit member types new Type Reference Pattern qualification Chars type Chars match Rule return null  SearchPattern createTypePattern patternString limitTo matchRule ClassFileConstants JDK1_3 sourceLevel taskTags taskPriorities taskCaseSensitive setSource patternString toCharArray getNextToken InvalidInputException TerminalTokens TokenNameEOF TerminalTokens TokenNameWHITESPACE getCurrentTokenSource getCurrentTokenSource getNextToken InvalidInputException qualificationChars typeChars typePart toCharArray lastDotPosition CharOperation lastIndexOf typePart lastDotPosition qualificationChars CharOperation typePart lastDotPosition qualificationChars qualificationChars qualificationChars typeChars CharOperation typePart lastDotPosition typePart qualificationChars typeChars typePart typeChars typeChars typeChars limitTo IJavaSearchConstants QualifiedTypeDeclarationPattern qualificationChars typeChars IIndexConstants TYPE_SUFFIX matchRule IJavaSearchConstants TypeReferencePattern qualificationChars typeChars matchRule IJavaSearchConstants SuperTypeReferencePattern qualificationChars typeChars matchRule IJavaSearchConstants ALL_OCCURRENCES OrPattern QualifiedTypeDeclarationPattern qualificationChars typeChars IIndexConstants TYPE_SUFFIX matchRule TypeReferencePattern qualificationChars typeChars matchRule
Returns the enclosing type names of the given type private static char enclosing Type Names I Type type I Java Element parent type get Parent switch parent get Element Type case I Java Element CLASS FILE For a binary type the parent is not the enclosing type but the declaring type is see bug 20532 Declaration of member binary type not found I Type declaring Type type get Declaring Type if declaring Type null return Char Operation NO CHAR CHAR return Char Operation array Concat enclosing Type Names declaring Type declaring Type get Element Name to Char Array case I Java Element COMPILATION UNIT return Char Operation NO CHAR CHAR case I Java Element FIELD case I Java Element INITIALIZER case I Java Element METHOD I Type declaring Class I Member parent get Declaring Type return Char Operation array Concat enclosing Type Names declaring Class new char declaring Class get Element Name to Char Array I Index Constants ONE STAR case I Java Element TYPE return Char Operation array Concat enclosing Type Names I Type parent parent get Element Name to Char Array default return null  enclosingTypeNames IType IJavaElement getParent getElementType IJavaElement CLASS_FILE IType declaringType getDeclaringType declaringType CharOperation NO_CHAR_CHAR CharOperation arrayConcat enclosingTypeNames declaringType declaringType getElementName toCharArray IJavaElement COMPILATION_UNIT CharOperation NO_CHAR_CHAR IJavaElement IJavaElement IJavaElement IType declaringClass IMember getDeclaringType CharOperation arrayConcat enclosingTypeNames declaringClass declaringClass getElementName toCharArray IIndexConstants ONE_STAR IJavaElement CharOperation arrayConcat enclosingTypeNames IType getElementName toCharArray
Decode the given index key in this pattern The decoded index key is used by link matches Decoded Key Search Pattern to find out if the corresponding index entry should be considered p This method should be re implemented in subclasses that need to decode an index key p param key the given index key public void decode Index Key char key called from find Index Matches override as necessary  matchesDecodedKey SearchPattern decodeIndexKey findIndexMatches
Returns a blank pattern that can be used as a record to decode an index key p Implementors of this method should return a new search pattern that is going to be used to decode index keys p return a new blank pattern see decode Index Key char  decodeIndexKey
public abstract Search Pattern get Blank Pattern Returns a key to find in relevant index categories if null then all index entries are matched The key will be matched according to some match rule These potential matches will be further narrowed by the match locator but precise match locating can be expensive and index query should be as accurate as possible so as to eliminate obvious false hits p This method should be re implemented in subclasses that need to narrow down the index query p return an index key from this pattern or code null code if all index entries are matched public char get Index Key return null called from query In override as necessary  SearchPattern getBlankPattern getIndexKey queryIn
Returns an array of index categories to consider for this index query These potential matches will be further narrowed by the match locator but precise match locating can be expensive and index query should be as accurate as possible so as to eliminate obvious false hits p This method should be re implemented in subclasses that need to narrow down the index query p return an array of index categories public char get Index Categories return Char Operation NO CHAR CHAR called from query In override as necessary  getIndexCategories CharOperation NO_CHAR_CHAR queryIn
Returns the rule to apply for matching index keys Can be exact match prefix match pattern match or regexp match Rule can also be combined with a case sensitivity flag return one of R EXACT MATCH R PREFIX MATCH R PATTERN MATCH R REGEXP MATCH combined with R CASE SENSITIVE e g R EXACT MATCH R CASE SENSITIVE if an exact and case sensitive match is requested or R PREFIX MATCH if a prefix non case sensitive match is requested public final int get Match Rule return this match Rule  R_EXACT_MATCH R_PREFIX_MATCH R_PATTERN_MATCH R_REGEXP_MATCH R_CASE_SENSITIVE R_EXACT_MATCH R_CASE_SENSITIVE R_PREFIX_MATCH getMatchRule matchRule
Returns whether this pattern matches the given pattern representing a decoded index key p This method should be re implemented in subclasses that need to narrow down the index query p param decoded Pattern a pattern representing a decoded index key return whether this pattern matches the given pattern public boolean matches Decoded Key Search Pattern decoded Pattern return true called from find Index Matches override as necessary if index key is encoded  decodedPattern matchesDecodedKey SearchPattern decodedPattern findIndexMatches
Returns whether the given name matches the given pattern p This method should be re implemented in subclasses that need to define how a name matches a pattern p param pattern the given pattern or code null code to represent param name the given name return whether the given name matches the given pattern public boolean matches Name char pattern char name if pattern null return true null is as if it was if name null boolean is Case Sensitive this match Rule R CASE SENSITIVE 0 int match Mode this match Rule is Case Sensitive R CASE SENSITIVE 0 switch match Mode case R EXACT MATCH return Char Operation equals pattern name is Case Sensitive case R PREFIX MATCH return Char Operation prefix Equals pattern name is Case Sensitive case R PATTERN MATCH if is Case Sensitive pattern Char Operation to Lower Case pattern return Char Operation match pattern name is Case Sensitive case R REGEXP MATCH TODO jerome implement regular expression match return true return false  matchesName isCaseSensitive matchRule R_CASE_SENSITIVE matchMode matchRule isCaseSensitive R_CASE_SENSITIVE matchMode R_EXACT_MATCH CharOperation isCaseSensitive R_PREFIX_MATCH CharOperation prefixEquals isCaseSensitive R_PATTERN_MATCH isCaseSensitive CharOperation toLowerCase CharOperation isCaseSensitive R_REGEXP_MATCH
see java lang Object to String public String to String return Search Pattern NON NLS 1  toString toString SearchPattern

Accepts the given search match param match the found match throws Core Exception TODO jerome remove throws Core Exception  CoreException CoreException
Notification sent before starting the search action Typically this would tell a search requestor to clear previously recorded search results p The default implementation of this method does nothing Subclasses may override p public void begin Reporting do nothing  beginReporting
Notification sent after having completed the search action Typically this would tell a search requestor collector that no more results will be forthcomping in this search p The default implementation of this method does nothing Subclasses may override p public void end Reporting do nothing  endReporting
Intermediate notification sent when the given participant starts to contribute p The default implementation of this method does nothing Subclasses may override p param participant the participant that is starting to contribute public void enter Participant Search Participant participant do nothing  enterParticipant SearchParticipant
Intermediate notification sent when the given participant is finished contributing p The default implementation of this method does nothing Subclasses may override p param participant the participant that finished contributing public void exit Participant Search Participant participant do nothing  exitParticipant SearchParticipant

Creates a new type declaration match param element the type declaration param accuracy one of A ACCURATE or A INACCURATE param offset the offset the match starts at or 1 if unknown param length the length of the match or 1 if unknown param participant the search participant that created the match param resource the resource of the element public Type Declaration Match I Java Element element int accuracy int offset int length Search Participant participant I Resource resource super element accuracy offset length participant resource  A_ACCURATE A_INACCURATE TypeDeclarationMatch IJavaElement SearchParticipant IResource

Creates a new type reference match param enclosing Element the inner most enclosing member that references this type param accuracy one of link A ACCURATE or link A INACCURATE param offset the offset the match starts at or 1 if unknown param length the length of the match or 1 if unknown param inside Doc Comment code true code if this search match is inside a doc comment and code false code otherwise param participant the search participant that created the match param resource the resource of the element public Type Reference Match I Java Element enclosing Element int accuracy int offset int length boolean inside Doc Comment Search Participant participant I Resource resource super enclosing Element accuracy offset length participant resource set Inside Doc Comment inside Doc Comment  enclosingElement A_ACCURATE A_INACCURATE insideDocComment TypeReferenceMatch IJavaElement enclosingElement insideDocComment SearchParticipant IResource enclosingElement setInsideDocComment insideDocComment

private static final String EMPTY new String Char Operation NO CHAR private Signature Not instantiable  CharOperation NO_CHAR
private static boolean check Primitive Type char primitive Type Name char type Name return Char Operation fragment Equals primitive Type Name type Name 0 true type Name length primitive Type Name length Character is Whitespace type Name primitive Type Name length type Name primitive Type Name length C ARRAY type Name primitive Type Name length C DOT  checkPrimitiveType primitiveTypeName typeName CharOperation fragmentEquals primitiveTypeName typeName typeName primitiveTypeName isWhitespace typeName primitiveTypeName typeName primitiveTypeName C_ARRAY typeName primitiveTypeName C_DOT
Creates a new type signature with the given amount of array nesting added to the given type signature param type Signature the type signature param array Count the desired number of levels of array nesting return the encoded array type signature since 2 0 public static char create Array Signature char type Signature int array Count if array Count 0 return type Signature int sig Length type Signature length char result new char array Count sig Length for int i 0 i array Count i result i C ARRAY System arraycopy type Signature 0 result array Count sig Length return result  typeSignature arrayCount createArraySignature typeSignature arrayCount arrayCount typeSignature sigLength typeSignature arrayCount sigLength arrayCount C_ARRAY typeSignature arrayCount sigLength
Creates a new type signature with the given amount of array nesting added to the given type signature param type Signature the type signature param array Count the desired number of levels of array nesting return the encoded array type signature public static String create Array Signature String type Signature int array Count return new String create Array Signature type Signature to Char Array array Count  typeSignature arrayCount createArraySignature typeSignature arrayCount createArraySignature typeSignature toCharArray arrayCount
Creates a method signature from the given parameter and return type signatures The encoded method signature is dot based param parameter Types the list of parameter type signatures param return Type the return type signature return the encoded method signature since 2 0 public static char create Method Signature char parameter Types char return Type int parameter Types Length parameter Types length int parameter Length 0 for int i 0 i parameter Types Length i parameter Length parameter Types i length int return Type Length return Type length char result new char 1 parameter Length 1 return Type Length result 0 C PARAM START int index 1 for int i 0 i parameter Types Length i char parameter Type parameter Types i int length parameter Type length System arraycopy parameter Type 0 result index length index length result index C PARAM END System arraycopy return Type 0 result index 1 return Type Length return result  parameterTypes returnType createMethodSignature parameterTypes returnType parameterTypesLength parameterTypes parameterLength parameterTypesLength parameterLength parameterTypes returnTypeLength returnType parameterLength returnTypeLength C_PARAM_START parameterTypesLength parameterType parameterTypes parameterType parameterType C_PARAM_END returnType returnTypeLength
Creates a method signature from the given parameter and return type signatures The encoded method signature is dot based This method is equivalent to code create Method Signature parameter Types return Type code param parameter Types the list of parameter type signatures param return Type the return type signature return the encoded method signature see Signature create Method Signature char char public static String create Method Signature String parameter Types String return Type int parameter Types Lenth parameter Types length char parameters new char parameter Types Lenth for int i 0 i parameter Types Lenth i parameters i parameter Types i to Char Array return new String create Method Signature parameters return Type to Char Array  createMethodSignature parameterTypes returnType parameterTypes returnType createMethodSignature createMethodSignature parameterTypes returnType parameterTypesLenth parameterTypes parameterTypesLenth parameterTypesLenth parameterTypes toCharArray createMethodSignature returnType toCharArray
Creates a new type signature from the given type name encoded as a character array The type name may contain primitive types or array types However parameterized types are not supported This method is equivalent to code create Type Signature new String type Name is Resolved code although more efficient for callers with character arrays rather than strings If the type name is qualified then it is expected to be dot based param type Name the possibly qualified type name param is Resolved code true code if the type name is to be considered resolved for example a type name from a binary class file and code false code if the type name is to be considered unresolved for example a type name found in source code return the encoded type signature see create Type Signature java lang String boolean public static String create Type Signature char type Name boolean is Resolved return new String create Char Array Type Signature type Name is Resolved  createTypeSignature typeName isResolved typeName isResolved createTypeSignature createTypeSignature typeName isResolved createCharArrayTypeSignature typeName isResolved
Creates a new type signature from the given type name encoded as a character array The type name may contain primitive types or array types However parameterized types are not supported This method is equivalent to code create Type Signature new String type Name is Resolved to Char Array code although more efficient for callers with character arrays rather than strings If the type name is qualified then it is expected to be dot based param type Name the possibly qualified type name param is Resolved code true code if the type name is to be considered resolved for example a type name from a binary class file and code false code if the type name is to be considered unresolved for example a type name found in source code return the encoded type signature see create Type Signature java lang String boolean since 2 0 public static char create Char Array Type Signature char type Name boolean is Resolved if type Name null throw new Illegal Argument Exception null NON NLS 1 int length type Name length if length 0 throw new Illegal Argument Exception new String type Name int array Count Char Operation occurences Of type Name char sig switch type Name 0 primitive type case b if check Primitive Type BOOLEAN type Name sig new char array Count 1 sig array Count C BOOLEAN break else if check Primitive Type BYTE type Name sig new char array Count 1 sig array Count C BYTE break case c if check Primitive Type CHAR type Name sig new char array Count 1 sig array Count C CHAR break case d if check Primitive Type DOUBLE type Name sig new char array Count 1 sig array Count C DOUBLE break case f if check Primitive Type FLOAT type Name sig new char array Count 1 sig array Count C FLOAT break case i if check Primitive Type INT type Name sig new char array Count 1 sig array Count C INT break case l if check Primitive Type LONG type Name sig new char array Count 1 sig array Count C LONG break case s if check Primitive Type SHORT type Name sig new char array Count 1 sig array Count C SHORT break case v if check Primitive Type VOID type Name sig new char array Count 1 sig array Count C VOID break default non primitive type int sig Length array Count 1 length 1 for example Ljava lang String sig new char sig Length int sig Index array Count 1 index in sig int startID 0 start of current ID in type Name int index 0 index in type Name while index length char current Char type Name index switch current Char case if startID 1 throw new Illegal Argument Exception new String type Name if startID index sig Char Operation append sig sig Index type Name startID index sig Index index startID sig sig Index C DOT index startID index break case if startID 1 if startID index sig Char Operation append sig sig Index type Name startID index sig Index index startID startID 1 no more id after index break default if startID 1 Char Operation is Whitespace current Char if startID index sig Char Operation append sig sig Index type Name startID index sig Index index startID startID index 1 index break last id if startID 1 startID index sig Char Operation append sig sig Index type Name startID index sig Index index startID add L or Q at the beigininig and at the end sig array Count is Resolved C RESOLVED C UNRESOLVED sig sig Index C NAME END resize if needed if sig Length sig Index System arraycopy sig 0 sig new char sig Index 0 sig Index add array info for int i 0 i array Count i sig i C ARRAY return sig  createTypeSignature typeName isResolved toCharArray typeName isResolved createTypeSignature createCharArrayTypeSignature typeName isResolved typeName IllegalArgumentException typeName IllegalArgumentException typeName arrayCount CharOperation occurencesOf typeName typeName checkPrimitiveType typeName arrayCount arrayCount C_BOOLEAN checkPrimitiveType typeName arrayCount arrayCount C_BYTE checkPrimitiveType typeName arrayCount arrayCount C_CHAR checkPrimitiveType typeName arrayCount arrayCount C_DOUBLE checkPrimitiveType typeName arrayCount arrayCount C_FLOAT checkPrimitiveType typeName arrayCount arrayCount C_INT checkPrimitiveType typeName arrayCount arrayCount C_LONG checkPrimitiveType typeName arrayCount arrayCount C_SHORT checkPrimitiveType typeName arrayCount arrayCount C_VOID sigLength arrayCount sigLength sigIndex arrayCount typeName typeName currentChar typeName currentChar IllegalArgumentException typeName CharOperation sigIndex typeName sigIndex sigIndex C_DOT CharOperation sigIndex typeName sigIndex CharOperation isWhitespace currentChar CharOperation sigIndex typeName sigIndex CharOperation sigIndex typeName sigIndex arrayCount isResolved C_RESOLVED C_UNRESOLVED sigIndex C_NAME_END sigLength sigIndex sigIndex sigIndex arrayCount C_ARRAY
Creates a new type signature from the given type name If the type name is qualified then it is expected to be dot based The type name may contain primitive types or array types However parameterized types are not supported p For example pre code create Type Signature int hucairz I create Type Signature java lang String true Ljava lang String create Type Signature String false Q String create Type Signature java lang String false Qjava lang String create Type Signature int false I code pre p param type Name the possibly qualified type name param is Resolved code true code if the type name is to be considered resolved for example a type name from a binary class file and code false code if the type name is to be considered unresolved for example a type name found in source code return the encoded type signature public static String create Type Signature String type Name boolean is Resolved return create Type Signature type Name null null type Name to Char Array is Resolved  createTypeSignature createTypeSignature createTypeSignature QString createTypeSignature createTypeSignature typeName isResolved createTypeSignature typeName isResolved createTypeSignature typeName typeName toCharArray isResolved
Returns the array count array nesting depth of the given type signature param type Signature the type signature return the array nesting depth or 0 if not an array exception Illegal Argument Exception if the signature is not syntactically correct since 2 0 public static int get Array Count char type Signature throws Illegal Argument Exception try int count 0 while type Signature count C ARRAY count return count catch Array Index Out Of Bounds Exception e signature is syntactically incorrect if last character is C ARRAY throw new Illegal Argument Exception  typeSignature IllegalArgumentException getArrayCount typeSignature IllegalArgumentException typeSignature C_ARRAY ArrayIndexOutOfBoundsException C_ARRAY IllegalArgumentException
Returns the array count array nesting depth of the given type signature param type Signature the type signature return the array nesting depth or 0 if not an array exception Illegal Argument Exception if the signature is not syntactically correct public static int get Array Count String type Signature throws Illegal Argument Exception return get Array Count type Signature to Char Array  typeSignature IllegalArgumentException getArrayCount typeSignature IllegalArgumentException getArrayCount typeSignature toCharArray
Returns the type signature without any array nesting p For example pre code get Element Type I I code pre p param type Signature the type signature return the type signature without arrays exception Illegal Argument Exception if the signature is not syntactically correct since 2 0 public static char get Element Type char type Signature throws Illegal Argument Exception int count get Array Count type Signature if count 0 return type Signature int length type Signature length char result new char length count System arraycopy type Signature count result 0 length count return result  getElementType typeSignature IllegalArgumentException getElementType typeSignature IllegalArgumentException getArrayCount typeSignature typeSignature typeSignature typeSignature
Returns the type signature without any array nesting p For example pre code get Element Type I I code pre p param type Signature the type signature return the type signature without arrays exception Illegal Argument Exception if the signature is not syntactically correct public static String get Element Type String type Signature throws Illegal Argument Exception return new String get Element Type type Signature to Char Array  getElementType typeSignature IllegalArgumentException getElementType typeSignature IllegalArgumentException getElementType typeSignature toCharArray
Returns the number of parameter types in the given method signature param method Signature the method signature return the number of parameters exception Illegal Argument Exception if the signature is not syntactically correct since 2 0 public static int get Parameter Count char method Signature throws Illegal Argument Exception try int count 0 int i Char Operation index Of C PARAM START method Signature if i 0 throw new Illegal Argument Exception else i for if method Signature i C PARAM END return count int e scan Type Signature method Signature i if e 0 throw new Illegal Argument Exception else i e 1 count catch Array Index Out Of Bounds Exception e throw new Illegal Argument Exception  methodSignature IllegalArgumentException getParameterCount methodSignature IllegalArgumentException CharOperation indexOf C_PARAM_START methodSignature IllegalArgumentException methodSignature C_PARAM_END scanTypeSignature methodSignature IllegalArgumentException ArrayIndexOutOfBoundsException IllegalArgumentException
Returns the kind of type signature encoded by the given string param type Signature the type signature string return the kind of type signature one of the kind constants link ARRAY TYPE SIGNATURE link CLASS TYPE SIGNATURE link BASE TYPE SIGNATURE or link TYPE VARIABLE SIGNATURE exception Illegal Argument Exception if this is not a type signature since 3 0 public static int get Type Signature Kind char type Signature need a minimum 1 char if type Signature length 1 throw new Illegal Argument Exception char c type Signature 0 switch c case C ARRAY return ARRAY TYPE SIGNATURE case C RESOLVED case C UNRESOLVED return CLASS TYPE SIGNATURE case C TYPE VARIABLE return TYPE VARIABLE SIGNATURE case C BOOLEAN case C BYTE case C CHAR case C DOUBLE case C FLOAT case C INT case C LONG case C SHORT case C VOID return BASE TYPE SIGNATURE default throw new Illegal Argument Exception  typeSignature ARRAY_TYPE_SIGNATURE CLASS_TYPE_SIGNATURE BASE_TYPE_SIGNATURE TYPE_VARIABLE_SIGNATURE IllegalArgumentException getTypeSignatureKind typeSignature typeSignature IllegalArgumentException typeSignature C_ARRAY ARRAY_TYPE_SIGNATURE C_RESOLVED C_UNRESOLVED CLASS_TYPE_SIGNATURE C_TYPE_VARIABLE TYPE_VARIABLE_SIGNATURE C_BOOLEAN C_BYTE C_CHAR C_DOUBLE C_FLOAT C_INT C_LONG C_SHORT C_VOID BASE_TYPE_SIGNATURE IllegalArgumentException
Returns the kind of type signature encoded by the given string param type Signature the type signature string return the kind of type signature one of the kind constants link ARRAY TYPE SIGNATURE link CLASS TYPE SIGNATURE link BASE TYPE SIGNATURE or link TYPE VARIABLE SIGNATURE exception Illegal Argument Exception if this is not a type signature since 3 0 public static int get Type Signature Kind String type Signature need a minimum 1 char if type Signature length 1 throw new Illegal Argument Exception char c type Signature char At 0 switch c case C ARRAY return ARRAY TYPE SIGNATURE case C RESOLVED case C UNRESOLVED return CLASS TYPE SIGNATURE case C TYPE VARIABLE return TYPE VARIABLE SIGNATURE case C BOOLEAN case C BYTE case C CHAR case C DOUBLE case C FLOAT case C INT case C LONG case C SHORT case C VOID return BASE TYPE SIGNATURE default throw new Illegal Argument Exception  typeSignature ARRAY_TYPE_SIGNATURE CLASS_TYPE_SIGNATURE BASE_TYPE_SIGNATURE TYPE_VARIABLE_SIGNATURE IllegalArgumentException getTypeSignatureKind typeSignature typeSignature IllegalArgumentException typeSignature charAt C_ARRAY ARRAY_TYPE_SIGNATURE C_RESOLVED C_UNRESOLVED CLASS_TYPE_SIGNATURE C_TYPE_VARIABLE TYPE_VARIABLE_SIGNATURE C_BOOLEAN C_BYTE C_CHAR C_DOUBLE C_FLOAT C_INT C_LONG C_SHORT C_VOID BASE_TYPE_SIGNATURE IllegalArgumentException
Scans the given string for a type signature starting at the given index and returns the index of the last character pre Type Signature Base Type Signature Array Type Signature Class Type Signature Type Variable Signature pre param string the signature string param start the 0 based character index of the first character return the 0 based character index of the last character exception Illegal Argument Exception if this is not a type signature see append Type Signature char int boolean String Buffer private static int scan Type Signature char string int start need a minimum 1 char if start string length throw new Illegal Argument Exception char c string start switch c case C ARRAY return scan Array Type Signature string start case C RESOLVED case C UNRESOLVED return scan Class Type Signature string start case C TYPE VARIABLE return scan Type Variable Signature string start case C BOOLEAN case C BYTE case C CHAR case C DOUBLE case C FLOAT case C INT case C LONG case C SHORT case C VOID return scan Base Type Signature string start default throw new Illegal Argument Exception  TypeSignature BaseTypeSignature ArrayTypeSignature ClassTypeSignature TypeVariableSignature IllegalArgumentException appendTypeSignature StringBuffer scanTypeSignature IllegalArgumentException C_ARRAY scanArrayTypeSignature C_RESOLVED C_UNRESOLVED scanClassTypeSignature C_TYPE_VARIABLE scanTypeVariableSignature C_BOOLEAN C_BYTE C_CHAR C_DOUBLE C_FLOAT C_INT C_LONG C_SHORT C_VOID scanBaseTypeSignature IllegalArgumentException
Scans the given string for a base type signature starting at the given index and returns the index of the last character pre Base Type Signature b B b b C b b D b b F b b I b b J b b S b b V b b Z b pre Note that although the base type V is only allowed in method return types there is no syntactic ambiguity This method will accept them anywhere without complaint param string the signature string param start the 0 based character index of the first character return the 0 based character index of the last character exception Illegal Argument Exception if this is not a base type signature private static int scan Base Type Signature char string int start need a minimum 1 char if start string length throw new Illegal Argument Exception char c string start if BCDFIJSVZ index Of c 0 NON NLS 1 return start else throw new Illegal Argument Exception  BaseTypeSignature IllegalArgumentException scanBaseTypeSignature IllegalArgumentException indexOf IllegalArgumentException
Scans the given string for an array type signature starting at the given index and returns the index of the last character pre Array Type Signature b b Type Signature pre param string the signature string param start the 0 based character index of the first character return the 0 based character index of the last character exception Illegal Argument Exception if this is not an array type signature see append Array Type Signature char int boolean String Buffer private static int scan Array Type Signature char string int start need a minimum 2 char if start string length 1 throw new Illegal Argument Exception char c string start if c C ARRAY NON NLS 1 throw new Illegal Argument Exception return scan Type Signature string start 1  ArrayTypeSignature TypeSignature IllegalArgumentException appendArrayTypeSignature StringBuffer scanArrayTypeSignature IllegalArgumentException C_ARRAY IllegalArgumentException scanTypeSignature
Scans the given string for a type variable signature starting at the given index and returns the index of the last character pre Type Variable Signature b T b Identifier b b pre param string the signature string param start the 0 based character index of the first character return the 0 based character index of the last character exception Illegal Argument Exception if this is not a type variable signature private static int scan Type Variable Signature char string int start need a minimum 3 chars Tx if start string length 2 throw new Illegal Argument Exception must start in T char c string start if c C TYPE VARIABLE throw new Illegal Argument Exception int id scan Identifier string start 1 c string id 1 if c C SEMICOLON return id 1 else throw new Illegal Argument Exception  TypeVariableSignature IllegalArgumentException scanTypeVariableSignature IllegalArgumentException C_TYPE_VARIABLE IllegalArgumentException scanIdentifier C_SEMICOLON IllegalArgumentException
Scans the given string for an identifier starting at the given index and returns the index of the last character Stop characters are lt gt param string the signature string param start the 0 based character index of the first character return the 0 based character index of the last character exception Illegal Argument Exception if this is not an identifier private static int scan Identifier char string int start need a minimum 1 char if start string length throw new Illegal Argument Exception int p start while true char c string p if c c c c c c return p 1 p if p string length return p 1  IllegalArgumentException scanIdentifier IllegalArgumentException
Scans the given string for a class type signature starting at the given index and returns the index of the last character pre Class Type Signature b L b b Q b Identifier b b b b Identifier b lt b Type Argument Signature b gt b b b pre Note that although all identifiers most come before identifiers there is no syntactic ambiguity This method will accept them without complaint param string the signature string param start the 0 based character index of the first character return the 0 based character index of the last character exception Illegal Argument Exception if this is not a class type signature see append Class Type Signature char int boolean String Buffer private static int scan Class Type Signature char string int start need a minimum 3 chars Lx if start string length 2 throw new Illegal Argument Exception must start in L or Q char c string start if c C RESOLVED c C UNRESOLVED return 1 int p start 1 while true if p string length throw new Illegal Argument Exception c string p if c C SEMICOLON all done return p else if c C GENERIC START int e scan Type Argument Signatures string p p e else if c C DOT c int id scan Identifier string p 1 p id p  ClassTypeSignature TypeArgumentSignature IllegalArgumentException appendClassTypeSignature StringBuffer scanClassTypeSignature IllegalArgumentException C_RESOLVED C_UNRESOLVED IllegalArgumentException C_SEMICOLON C_GENERIC_START scanTypeArgumentSignatures C_DOT scanIdentifier
Scans the given string for a list of type argument signatures starting at the given index and returns the index of the last character pre Type Argument Signatures b lt b Type Argument Signature b gt b pre Note that although there is supposed to be at least one type argument there is no syntactic ambiguity if there are none This method will accept zero type argument signatures without complaint param string the signature string param start the 0 based character index of the first character return the 0 based character index of the last character exception Illegal Argument Exception if this is not a list of type arguments signatures see append Type Argument Signatures char int boolean String Buffer private static int scan Type Argument Signatures char string int start need a minimum 2 char if start string length 1 throw new Illegal Argument Exception char c string start if c C GENERIC START throw new Illegal Argument Exception int p start 1 while true if p string length throw new Illegal Argument Exception c string p if c C GENERIC END return p int e scan Type Argument Signature string p p e 1  TypeArgumentSignatures TypeArgumentSignature IllegalArgumentException appendTypeArgumentSignatures StringBuffer scanTypeArgumentSignatures IllegalArgumentException C_GENERIC_START IllegalArgumentException IllegalArgumentException C_GENERIC_END scanTypeArgumentSignature
Scans the given string for a type argument signature starting at the given index and returns the index of the last character pre Type Argument Signature b 42 b b b Type Signature b b Type Signature Type Signature pre Note that although base types are not allowed in type arguments there is no syntactic ambiguity This method will accept them without complaint param string the signature string param start the 0 based character index of the first character return the 0 based character index of the last character exception Illegal Argument Exception if this is not a type argument signature see append Type Argument Signature char int boolean String Buffer private static int scan Type Argument Signature char string int start need a minimum 1 char if start string length throw new Illegal Argument Exception char c string start if c C STAR return start if c c return scan Type Signature string start 1 else return scan Type Signature string start  TypeArgumentSignature TypeSignature TypeSignature TypeSignature IllegalArgumentException appendTypeArgumentSignature StringBuffer scanTypeArgumentSignature IllegalArgumentException C_STAR scanTypeSignature scanTypeSignature
Returns the number of parameter types in the given method signature param method Signature the method signature return the number of parameters exception Illegal Argument Exception if the signature is not syntactically correct public static int get Parameter Count String method Signature throws Illegal Argument Exception return get Parameter Count method Signature to Char Array  methodSignature IllegalArgumentException getParameterCount methodSignature IllegalArgumentException getParameterCount methodSignature toCharArray
Extracts the parameter type signatures from the given method signature The method signature is expected to be dot based param method Signature the method signature return the list of parameter type signatures exception Illegal Argument Exception if the signature is syntactically incorrect since 2 0 public static char get Parameter Types char method Signature throws Illegal Argument Exception try int count get Parameter Count method Signature char result new char count if count 0 return result int i Char Operation index Of C PARAM START method Signature if i 0 throw new Illegal Argument Exception else i int t 0 for if method Signature i C PARAM END return result int e scan Type Signature method Signature i if e 0 throw new Illegal Argument Exception result t Char Operation subarray method Signature i e 1 t i e 1 catch Array Index Out Of Bounds Exception e throw new Illegal Argument Exception  methodSignature IllegalArgumentException getParameterTypes methodSignature IllegalArgumentException getParameterCount methodSignature CharOperation indexOf C_PARAM_START methodSignature IllegalArgumentException methodSignature C_PARAM_END scanTypeSignature methodSignature IllegalArgumentException CharOperation methodSignature ArrayIndexOutOfBoundsException IllegalArgumentException
Extracts the parameter type signatures from the given method signature The method signature is expected to be dot based param method Signature the method signature return the list of parameter type signatures exception Illegal Argument Exception if the signature is syntactically incorrect public static String get Parameter Types String method Signature throws Illegal Argument Exception char parameter Types get Parameter Types method Signature to Char Array int length parameter Types length String result new String length for int i 0 i length i result i new String parameter Types i return result  methodSignature IllegalArgumentException getParameterTypes methodSignature IllegalArgumentException parameterTypes getParameterTypes methodSignature toCharArray parameterTypes parameterTypes
Extracts the type variable name from the given formal type parameter signature The signature is expected to be dot based param formal Type Parameter Signature the formal type parameter signature return the name of the type variable exception Illegal Argument Exception if the signature is syntactically incorrect since 3 0 public static String get Type Variable String formal Type Parameter Signature throws Illegal Argument Exception return new String get Type Variable formal Type Parameter Signature to Char Array  formalTypeParameterSignature IllegalArgumentException getTypeVariable formalTypeParameterSignature IllegalArgumentException getTypeVariable formalTypeParameterSignature toCharArray
Extracts the type variable name from the given formal type parameter signature The signature is expected to be dot based param formal Type Parameter Signature the formal type parameter signature return the name of the type variable exception Illegal Argument Exception if the signature is syntactically incorrect since 3 0 public static char get Type Variable char formal Type Parameter Signature throws Illegal Argument Exception int p Char Operation index Of C COLON formal Type Parameter Signature if p 0 no means can t be a formal type parameter signature throw new Illegal Argument Exception return Char Operation subarray formal Type Parameter Signature 0 p  formalTypeParameterSignature IllegalArgumentException getTypeVariable formalTypeParameterSignature IllegalArgumentException CharOperation indexOf C_COLON formalTypeParameterSignature IllegalArgumentException CharOperation formalTypeParameterSignature
Extracts the class and interface bounds from the given formal type parameter signature The class bound if present is listed before the interface bounds The signature is expected to be dot based param formal Type Parameter Signature the formal type parameter signature return the possibly empty list of type signatures for the bounds exception Illegal Argument Exception if the signature is syntactically incorrect since 3 0 public static char get Type Parameter Bounds char formal Type Parameter Signature throws Illegal Argument Exception int p1 Char Operation index Of C COLON formal Type Parameter Signature if p1 0 no means can t be a formal type parameter signature throw new Illegal Argument Exception if p1 formal Type Parameter Signature length 1 no class or interface bounds return Char Operation NO CHAR CHAR int p2 Char Operation index Of C COLON formal Type Parameter Signature p1 1 char class Bound if p2 0 no interface bounds class Bound Char Operation subarray formal Type Parameter Signature p1 1 formal Type Parameter Signature length return new char class Bound if p2 p1 1 no class bound but 1 or more interface bounds class Bound null else class Bound Char Operation subarray formal Type Parameter Signature p1 1 p2 char interface Bounds Char Operation split On C COLON formal Type Parameter Signature p2 1 formal Type Parameter Signature length if class Bound null return interface Bounds int result Length interface Bounds length 1 char result new char result Length result 0 class Bound System arraycopy interface Bounds 0 result 1 interface Bounds length return result  formalTypeParameterSignature IllegalArgumentException getTypeParameterBounds formalTypeParameterSignature IllegalArgumentException CharOperation indexOf C_COLON formalTypeParameterSignature IllegalArgumentException formalTypeParameterSignature CharOperation NO_CHAR_CHAR CharOperation indexOf C_COLON formalTypeParameterSignature classBound classBound CharOperation formalTypeParameterSignature formalTypeParameterSignature classBound classBound classBound CharOperation formalTypeParameterSignature interfaceBounds CharOperation splitOn C_COLON formalTypeParameterSignature formalTypeParameterSignature classBound interfaceBounds resultLength interfaceBounds resultLength classBound interfaceBounds interfaceBounds
Extracts the class and interface bounds from the given formal type parameter signature The class bound if present is listed before the interface bounds The signature is expected to be dot based param formal Type Parameter Signature the formal type parameter signature return the possibly empty list of type signatures for the bounds exception Illegal Argument Exception if the signature is syntactically incorrect since 3 0 public static String get Type Parameter Bounds String formal Type Parameter Signature throws Illegal Argument Exception char bounds get Type Parameter Bounds formal Type Parameter Signature to Char Array int length bounds length String result new String length for int i 0 i length i result i new String bounds i return result  formalTypeParameterSignature IllegalArgumentException getTypeParameterBounds formalTypeParameterSignature IllegalArgumentException getTypeParameterBounds formalTypeParameterSignature toCharArray
Returns a char array containing all but the last segment of the given dot separated qualified name Returns the empty char array if it is not qualified p For example pre code get Qualifier j a v a l a n g O b j e c t j a v a l a n g get Qualifier O u t e r I n n e r O u t e r code pre p param name the name return the qualifier prefix or the empty char array if the name contains no dots exception Null Pointer Exception if name is null since 2 0 public static char get Qualifier char name int last Dot Char Operation last Index Of C DOT name if last Dot 1 return Char Operation NO CHAR return Char Operation subarray name 0 last Dot  getQualifier getQualifier NullPointerException getQualifier lastDot CharOperation lastIndexOf C_DOT lastDot CharOperation NO_CHAR CharOperation lastDot
Returns a string containing all but the last segment of the given dot separated qualified name Returns the empty string if it is not qualified p For example pre code get Qualifier java lang Object java lang get Qualifier Outer Inner Outer code pre p param name the name return the qualifier prefix or the empty string if the name contains no dots exception Null Pointer Exception if name is null public static String get Qualifier String name int last Dot name last Index Of C DOT if last Dot 1 return EMPTY return name substring 0 last Dot  getQualifier getQualifier NullPointerException getQualifier lastDot lastIndexOf C_DOT lastDot lastDot
Extracts the return type from the given method signature The method signature is expected to be dot based param method Signature the method signature return the type signature of the return type exception Illegal Argument Exception if the signature is syntactically incorrect since 2 0 public static char get Return Type char method Signature throws Illegal Argument Exception skip type parameters int i Char Operation last Index Of C PARAM END method Signature if i 1 throw new Illegal Argument Exception ignore any thrown exceptions int j Char Operation index Of method Signature int last j 1 method Signature length j return Char Operation subarray method Signature i 1 last  methodSignature IllegalArgumentException getReturnType methodSignature IllegalArgumentException CharOperation lastIndexOf C_PARAM_END methodSignature IllegalArgumentException CharOperation indexOf methodSignature methodSignature CharOperation methodSignature
Extracts the return type from the given method signature The method signature is expected to be dot based param method Signature the method signature return the type signature of the return type exception Illegal Argument Exception if the signature is syntactically incorrect public static String get Return Type String method Signature throws Illegal Argument Exception return new String get Return Type method Signature to Char Array  methodSignature IllegalArgumentException getReturnType methodSignature IllegalArgumentException getReturnType methodSignature toCharArray
Returns the last segment of the given dot separated qualified name Returns the given name if it is not qualified p For example pre code get Simple Name j a v a l a n g O b j e c t O b j e c t code pre p param name the name return the last segment of the qualified name exception Null Pointer Exception if name is null since 2 0 public static char get Simple Name char name int last Dot Char Operation last Index Of C DOT name if last Dot 1 return name return Char Operation subarray name last Dot 1 name length  getSimpleName NullPointerException getSimpleName lastDot CharOperation lastIndexOf C_DOT lastDot CharOperation lastDot
Returns the last segment of the given dot separated qualified name Returns the given name if it is not qualified p For example pre code get Simple Name java lang Object Object code pre p param name the name return the last segment of the qualified name exception Null Pointer Exception if name is null public static String get Simple Name String name int last Dot name last Index Of C DOT if last Dot 1 return name return name substring last Dot 1 name length  getSimpleName NullPointerException getSimpleName lastDot lastIndexOf C_DOT lastDot lastDot
Returns all segments of the given dot separated qualified name Returns an array with only the given name if it is not qualified Returns an empty array if the name is empty p For example pre code get Simple Names j a v a l a n g O b j e c t j a v a l a n g O b j e c t get Simple Names O b j e c t O b j e c t get Simple Names code pre param name the name return the list of simple names possibly empty exception Null Pointer Exception if name is null since 2 0 public static char get Simple Names char name if name length 0 return Char Operation NO CHAR CHAR int dot Char Operation index Of C DOT name if dot 1 return new char name int n 1 while dot Char Operation index Of C DOT name dot 1 1 n char result new char n 1 int seg Start 0 for int i 0 i n i dot Char Operation index Of C DOT name seg Start result i Char Operation subarray name seg Start dot seg Start dot 1 result n Char Operation subarray name seg Start name length return result  getSimpleNames getSimpleNames getSimpleNames NullPointerException getSimpleNames CharOperation NO_CHAR_CHAR CharOperation indexOf C_DOT CharOperation indexOf C_DOT segStart CharOperation indexOf C_DOT segStart CharOperation segStart segStart CharOperation segStart
Returns all segments of the given dot separated qualified name Returns an array with only the given name if it is not qualified Returns an empty array if the name is empty p For example pre code get Simple Names java lang Object java lang Object get Simple Names Object Object get Simple Names code pre param name the name return the list of simple names possibly empty exception Null Pointer Exception if name is null public static String get Simple Names String name char simple Names get Simple Names name to Char Array int length simple Names length String result new String length for int i 0 i length i result i new String simple Names i return result  getSimpleNames getSimpleNames getSimpleNames NullPointerException getSimpleNames simpleNames getSimpleNames toCharArray simpleNames simpleNames
Converts the given method signature to a readable form The method signature is expected to be dot based p For example pre code to String Ljava lang String V main new String args false true void main String args code pre p param method Signature the method signature to convert param method Name the name of the method to insert in the result or code null code if no method name is to be included param parameter Names the parameter names to insert in the result or code null code if no parameter names are to be included if supplied the number of parameter names must match that of the method signature param fully Qualify Type Names code true code if type names should be fully qualified and code false code to use only simple names param include Return Type code true code if the return type is to be included return the char array representation of the method signature since 2 0 public static char to Char Array char method Signature char method Name char parameter Names boolean fully Qualify Type Names boolean include Return Type int first Paren Char Operation index Of C PARAM START method Signature if first Paren 1 throw new Illegal Argument Exception String Buffer buffer new String Buffer method Signature length 10 return type if include Return Type char rts get Return Type method Signature append Type Signature rts 0 fully Qualify Type Names buffer buffer append selector if method Name null buffer append method Name parameters buffer append char pts get Parameter Types method Signature for int i 0 i pts length i append Type Signature pts i 0 fully Qualify Type Names buffer if parameter Names null buffer append buffer append parameter Names i if i pts length 1 buffer append buffer append buffer append char result new char buffer length buffer get Chars 0 buffer length result 0 return result  toString methodSignature methodName parameterNames fullyQualifyTypeNames includeReturnType toCharArray methodSignature methodName parameterNames fullyQualifyTypeNames includeReturnType firstParen CharOperation indexOf C_PARAM_START methodSignature firstParen IllegalArgumentException StringBuffer StringBuffer methodSignature includeReturnType getReturnType methodSignature appendTypeSignature fullyQualifyTypeNames methodName methodName getParameterTypes methodSignature appendTypeSignature fullyQualifyTypeNames parameterNames parameterNames getChars
Converts the given type signature to a readable string The signature is expected to be dot based p For example pre code to String L j a v a l a n g S t r i n g j a v a l a n g S t r i n g to String I i n t code pre p p Note This method assumes that a type signature containing a code code is an inner type signature While this is correct in most cases someone could define a non inner type name containing a code code Handling this correctly in all cases would have required resolving the signature which generally not feasible p param signature the type signature return the string representation of the type exception Illegal Argument Exception if the signature is not syntactically correct since 2 0 public static char to Char Array char signature throws Illegal Argument Exception int sig Length signature length if sig Length 0 signature 0 C PARAM START signature 0 C GENERIC START return to Char Array signature Char Operation NO CHAR null true true String Buffer buffer new String Buffer signature length 10 append Type Signature signature 0 true buffer char result new char buffer length buffer get Chars 0 buffer length result 0 return result  toString toString IllegalArgumentException toCharArray IllegalArgumentException sigLength sigLength C_PARAM_START C_GENERIC_START toCharArray CharOperation NO_CHAR StringBuffer StringBuffer appendTypeSignature getChars
Scans the given string for a type signature starting at the given index and appends it to the given buffer and returns the index of the last character param string the signature string param start the 0 based character index of the first character param fully Qualify Type Names code true code if type names should be fully qualified and code false code to use only simple names param buffer the string buffer to append to return the 0 based character index of the last character exception Illegal Argument Exception if this is not a type signature see scan Type Signature char int private static int append Type Signature char string int start boolean fully Qualify Type Names String Buffer buffer need a minimum 1 char if start string length throw new Illegal Argument Exception char c string start switch c case C ARRAY return append Array Type Signature string start fully Qualify Type Names buffer case C RESOLVED case C UNRESOLVED return append Class Type Signature string start fully Qualify Type Names buffer case C TYPE VARIABLE int e scan Type Variable Signature string start buffer append Char Operation subarray string start 1 e return e case C BOOLEAN buffer append BOOLEAN return start case C BYTE buffer append BYTE return start case C CHAR buffer append CHAR return start case C DOUBLE buffer append DOUBLE return start case C FLOAT buffer append FLOAT return start case C INT buffer append INT return start case C LONG buffer append LONG return start case C SHORT buffer append SHORT return start case C VOID buffer append VOID return start default throw new Illegal Argument Exception  fullyQualifyTypeNames IllegalArgumentException scanTypeSignature appendTypeSignature fullyQualifyTypeNames StringBuffer IllegalArgumentException C_ARRAY appendArrayTypeSignature fullyQualifyTypeNames C_RESOLVED C_UNRESOLVED appendClassTypeSignature fullyQualifyTypeNames C_TYPE_VARIABLE scanTypeVariableSignature CharOperation C_BOOLEAN C_BYTE C_CHAR C_DOUBLE C_FLOAT C_INT C_LONG C_SHORT C_VOID IllegalArgumentException
Scans the given string for an array type signature starting at the given index and appends it to the given buffer and returns the index of the last character param string the signature string param start the 0 based character index of the first character param fully Qualify Type Names code true code if type names should be fully qualified and code false code to use only simple names return the 0 based character index of the last character exception Illegal Argument Exception if this is not an array type signature see scan Array Type Signature char int private static int append Array Type Signature char string int start boolean fully Qualify Type Names String Buffer buffer need a minimum 2 char if start string length 1 throw new Illegal Argument Exception char c string start if c C ARRAY NON NLS 1 throw new Illegal Argument Exception int e append Type Signature string start 1 fully Qualify Type Names buffer buffer append buffer append return e  fullyQualifyTypeNames IllegalArgumentException scanArrayTypeSignature appendArrayTypeSignature fullyQualifyTypeNames StringBuffer IllegalArgumentException C_ARRAY IllegalArgumentException appendTypeSignature fullyQualifyTypeNames
Scans the given string for a class type signature starting at the given index and appends it to the given buffer and returns the index of the last character param string the signature string param start the 0 based character index of the first character param fully Qualify Type Names code true code if type names should be fully qualified and code false code to use only simple names param buffer the string buffer to append to return the 0 based character index of the last character exception Illegal Argument Exception if this is not a class type signature see scan Class Type Signature char int private static int append Class Type Signature char string int start boolean fully Qualify Type Names String Buffer buffer need a minimum 3 chars Lx if start string length 2 throw new Illegal Argument Exception must start in L or Q char c string start if c C RESOLVED c C UNRESOLVED throw new Illegal Argument Exception boolean resolved c C RESOLVED boolean remove Package Qualifiers fully Qualify Type Names if resolved keep everything in an unresolved name remove Package Qualifiers false int p start 1 int checkpoint buffer length while true if p string length throw new Illegal Argument Exception c string p switch c case C SEMICOLON all done return p case C GENERIC START int e append Type Argument Signatures string p fully Qualify Type Names buffer once we hit type arguments there are no more package prefixes remove Package Qualifiers false p e break case C DOT if remove Package Qualifiers erase package prefix buffer set Length checkpoint else buffer append break case if remove Package Qualifiers erase package prefix buffer set Length checkpoint else buffer append break case C DOLLAR if resolved once we hit there are no more package prefixes remove Package Qualifiers false Convert in resolved type signatures into NOTE This assumes that the type signature is an inner type signature This is true in most cases but someone can define a non inner type name containing a buffer append break default buffer append c p  fullyQualifyTypeNames IllegalArgumentException scanClassTypeSignature appendClassTypeSignature fullyQualifyTypeNames StringBuffer IllegalArgumentException C_RESOLVED C_UNRESOLVED IllegalArgumentException C_RESOLVED removePackageQualifiers fullyQualifyTypeNames removePackageQualifiers IllegalArgumentException C_SEMICOLON C_GENERIC_START appendTypeArgumentSignatures fullyQualifyTypeNames removePackageQualifiers C_DOT removePackageQualifiers setLength removePackageQualifiers setLength C_DOLLAR removePackageQualifiers
Scans the given string for a list of type arguments signature starting at the given index and appends it to the given buffer and returns the index of the last character param string the signature string param start the 0 based character index of the first character param fully Qualify Type Names code true code if type names should be fully qualified and code false code to use only simple names param buffer the string buffer to append to return the 0 based character index of the last character exception Illegal Argument Exception if this is not a list of type argument signatures see scan Type Argument Signatures char int private static int append Type Argument Signatures char string int start boolean fully Qualify Type Names String Buffer buffer need a minimum 2 char if start string length 1 throw new Illegal Argument Exception char c string start if c C GENERIC START throw new Illegal Argument Exception buffer append int p start 1 int count 0 while true if p string length throw new Illegal Argument Exception c string p if c C GENERIC END buffer append return p if count 0 buffer append int e append Type Argument Signature string p fully Qualify Type Names buffer count p e 1  fullyQualifyTypeNames IllegalArgumentException scanTypeArgumentSignatures appendTypeArgumentSignatures fullyQualifyTypeNames StringBuffer IllegalArgumentException C_GENERIC_START IllegalArgumentException IllegalArgumentException C_GENERIC_END appendTypeArgumentSignature fullyQualifyTypeNames
Scans the given string for a type argument signature starting at the given index and appends it to the given buffer and returns the index of the last character param string the signature string param start the 0 based character index of the first character param fully Qualify Type Names code true code if type names should be fully qualified and code false code to use only simple names param buffer the string buffer to append to return the 0 based character index of the last character exception Illegal Argument Exception if this is not a type argument signature see scan Type Argument Signature char int private static int append Type Argument Signature char string int start boolean fully Qualify Type Names String Buffer buffer need a minimum 1 char if start string length throw new Illegal Argument Exception char c string start switch c case C STAR buffer append return start case buffer append extends NON NLS 1 return append Type Signature string start 1 fully Qualify Type Names buffer case buffer append super NON NLS 1 return append Type Signature string start 1 fully Qualify Type Names buffer default return append Type Signature string start fully Qualify Type Names buffer  fullyQualifyTypeNames IllegalArgumentException scanTypeArgumentSignature appendTypeArgumentSignature fullyQualifyTypeNames StringBuffer IllegalArgumentException C_STAR appendTypeSignature fullyQualifyTypeNames appendTypeSignature fullyQualifyTypeNames appendTypeSignature fullyQualifyTypeNames
Converts the given array of qualified name segments to a qualified name p For example pre code to Qualified Name j a v a l a n g O b j e c t j a v a l a n g O b j e c t to Qualified Name O b j e c t O b j e c t to Qualified Name code pre p param segments the list of name segments possibly empty return the dot separated qualified name or the empty string since 2 0 public static char to Qualified Name char segments int length segments length if length 0 return Char Operation NO CHAR if length 1 return segments 0 int result Length 0 for int i 0 i length i result Length segments i length 1 result Length char result new char result Length int index 0 for int i 0 i length i char segment segments i int segment Length segment length System arraycopy segment 0 result index segment Length index segment Length if i length 1 result index C DOT return result  toQualifiedName toQualifiedName toQualifiedName toQualifiedName CharOperation NO_CHAR resultLength resultLength resultLength resultLength segmentLength segmentLength segmentLength C_DOT
Converts the given array of qualified name segments to a qualified name p For example pre code to Qualified Name new String java lang Object java lang Object to Qualified Name new String Object Object to Qualified Name new String 0 code pre p param segments the list of name segments possibly empty return the dot separated qualified name or the empty string public static String to Qualified Name String segments int length segments length char char Arrays new char length for int i 0 i length i char Arrays i segments i to Char Array return new String to Qualified Name char Arrays  toQualifiedName toQualifiedName toQualifiedName toQualifiedName charArrays charArrays toCharArray toQualifiedName charArrays
Converts the given type signature to a readable string The signature is expected to be dot based p For example pre code to String Ljava lang String java lang String to String I int code pre p p Note This method assumes that a type signature containing a code code is an inner type signature While this is correct in most cases someone could define a non inner type name containing a code code Handling this correctly in all cases would have required resolving the signature which generally not feasible p param signature the type signature return the string representation of the type exception Illegal Argument Exception if the signature is not syntactically correct public static String to String String signature throws Illegal Argument Exception return new String to Char Array signature to Char Array  toString toString IllegalArgumentException toString IllegalArgumentException toCharArray toCharArray
Converts the given method signature to a readable string The method signature is expected to be dot based param method Signature the method signature to convert param method Name the name of the method to insert in the result or code null code if no method name is to be included param parameter Names the parameter names to insert in the result or code null code if no parameter names are to be included if supplied the number of parameter names must match that of the method signature param fully Qualify Type Names code true code if type names should be fully qualified and code false code to use only simple names param include Return Type code true code if the return type is to be included see to Char Array char char char boolean boolean return the string representation of the method signature public static String to String String method Signature String method Name String parameter Names boolean fully Qualify Type Names boolean include Return Type char params if parameter Names null params null else int param Length parameter Names length params new char param Length for int i 0 i param Length i params i parameter Names i to Char Array return new String to Char Array method Signature to Char Array method Name null null method Name to Char Array params fully Qualify Type Names include Return Type  methodSignature methodName parameterNames fullyQualifyTypeNames includeReturnType toCharArray toString methodSignature methodName parameterNames fullyQualifyTypeNames includeReturnType parameterNames paramLength parameterNames paramLength paramLength parameterNames toCharArray toCharArray methodSignature toCharArray methodName methodName toCharArray fullyQualifyTypeNames includeReturnType

Create an instance of a code formatter A code formatter implementation can be contributed via the extension point org eclipse jdt core code Formatter If unable to find a registered extension the factory will default to using the default code formatter return an instance of a code formatter see I Code Formatter see Tool Factory create Default Code Formatter Map deprecated should use create Code Formatter Map instead Extension point is discontinued public static I Code Formatter create Code Formatter Plugin jdt Core Plugin Java Core get Plugin if jdt Core Plugin null return null I Extension Point extension jdt Core Plugin get Descriptor get Extension Point Java Model Manager FORMATTER EXTPOINT ID if extension null I Extension extensions extension get Extensions for int i 0 i extensions length i I Configuration Element config Elements extensions i get Configuration Elements for int j 0 j config Elements length j try Object exec Ext config Elements j create Executable Extension class NON NLS 1 if exec Ext instanceof I Code Formatter use first contribution found return I Code Formatter exec Ext catch Core Exception e unable to instantiate extension will answer default formatter instead no proper contribution found use default formatter return create Default Code Formatter null  codeFormatter ICodeFormatter ToolFactory createDefaultCodeFormatter createCodeFormatter ICodeFormatter createCodeFormatter jdtCorePlugin JavaCore getPlugin jdtCorePlugin IExtensionPoint jdtCorePlugin getDescriptor getExtensionPoint JavaModelManager FORMATTER_EXTPOINT_ID IExtension getExtensions IConfigurationElement configElements getConfigurationElements configElements execExt configElements createExecutableExtension execExt ICodeFormatter ICodeFormatter execExt CoreException createDefaultCodeFormatter
Create an instance of the built in code formatter param options the options map to use for formatting with the default code formatter Recognized options are documented on code Java Core get Default Options code If set to code null code then use the current settings from code Java Core get Options code return an instance of the built in code formatter see Code Formatter see Java Core get Options since 3 0 public static Code Formatter create Code Formatter Map options if options null options Java Core get Options return new Default Code Formatter options  JavaCore getDefaultOptions JavaCore getOptions CodeFormatter JavaCore getOptions CodeFormatter createCodeFormatter JavaCore getOptions DefaultCodeFormatter
Create an instance of the built in code formatter A code formatter implementation can be contributed via the extension point org eclipse jdt core code Formatter If unable to find a registered extension the factory will default to using the default code formatter param options the options map to use for formatting with the default code formatter Recognized options are documented on code Java Core get Default Options code If set to code null code then use the current settings from code Java Core get Options code return an instance of the built in code formatter see I Code Formatter see Tool Factory create Code Formatter see Java Core get Options deprecated use create Code Formatter Map instead public static I Code Formatter create Default Code Formatter Map options if options null options Java Core get Options return new org eclipse jdt internal formatter old Code Formatter options  codeFormatter JavaCore getDefaultOptions JavaCore getOptions ICodeFormatter ToolFactory createCodeFormatter JavaCore getOptions createCodeFormatter ICodeFormatter createDefaultCodeFormatter JavaCore getOptions CodeFormatter
Create a classfile bytecode disassembler able to produce a String representation of a given classfile return a classfile bytecode disassembler see org eclipse jdt core util I Class File Disassembler deprecated should use factory method creating Class File Bytes Disassembler instead public static org eclipse jdt core util I Class File Disassembler create Default Class File Disassembler class Deprecated Disassembler extends Disassembler implements org eclipse jdt core util I Class File Disassembler for backward compatibility defines a disassembler which implements I Class File Disassembler return new Deprecated Disassembler  IClassFileDisassembler ClassFileBytesDisassembler IClassFileDisassembler createDefaultClassFileDisassembler DeprecatedDisassembler IClassFileDisassembler IClassFileDisassembler DeprecatedDisassembler
Create a classfile bytecode disassembler able to produce a String representation of a given classfile return a classfile bytecode disassembler see Class File Bytes Disassembler since 2 1 public static Class File Bytes Disassembler create Default Class File Bytes Disassembler return new Disassembler  ClassFileBytesDisassembler ClassFileBytesDisassembler createDefaultClassFileBytesDisassembler
Create a default classfile reader able to expose the internal representation of a given classfile according to the decoding flag used to initialize the reader Answer null if the file named file Name doesn t represent a valid class file The file Name has to be an absolute OS path to the given class file The decoding flags are described in I Class File Reader param file Name the name of the file to be read param decoding Flag the flag used to decode the class file reader return a default classfile reader see I Class File Reader public static I Class File Reader create Default Class File Reader String file Name int decoding Flag try return new Class File Reader Util get File Byte Content new File file Name decoding Flag catch Class Format Exception e return null catch IO Exception e return null  fileName fileName IClassFileReader fileName decodingFlag IClassFileReader IClassFileReader createDefaultClassFileReader fileName decodingFlag ClassFileReader getFileByteContent fileName decodingFlag ClassFormatException IOException
Create a classfile reader onto a classfile Java element Create a default classfile reader able to expose the internal representation of a given classfile according to the decoding flag used to initialize the reader Answer null if the file named file Name doesn t represent a valid class file The decoding flags are described in I Class File Reader param classfile the classfile element to introspect param decoding Flag the flag used to decode the class file reader return a default classfile reader see I Class File Reader public static I Class File Reader create Default Class File Reader I Class File classfile int decoding Flag I Package Fragment Root root I Package Fragment Root classfile get Ancestor I Java Element PACKAGE FRAGMENT ROOT if root null try if root instanceof Jar Package Fragment Root String archive Name Jar Package Fragment Root root get Jar get Name String entry Name classfile get Parent get Element Name entry Name entry Name replace if entry Name equals NON NLS 1 entry Name classfile get Element Name else entry Name classfile get Element Name return create Default Class File Reader archive Name entry Name decoding Flag else I Path location classfile get Resource get Location if location null return null return create Default Class File Reader location toOS String decoding Flag catch Core Exception e unable to read return null  fileName IClassFileReader decodingFlag IClassFileReader IClassFileReader createDefaultClassFileReader IClassFile decodingFlag IPackageFragmentRoot IPackageFragmentRoot getAncestor IJavaElement PACKAGE_FRAGMENT_ROOT JarPackageFragmentRoot archiveName JarPackageFragmentRoot getJar getName entryName getParent getElementName entryName entryName entryName entryName getElementName entryName getElementName createDefaultClassFileReader archiveName entryName decodingFlag IPath getResource getLocation createDefaultClassFileReader toOSString decodingFlag CoreException
Create a default classfile reader able to expose the internal representation of a given classfile according to the decoding flag used to initialize the reader Answer null if the file named zip File Name doesn t represent a valid zip file or if the zip Entry Name is not a valid entry name for the specified zip file or if the bytes don t represent a valid class file according to the JVM specifications The decoding flags are described in I Class File Reader param zip File Name the name of the zip file param zip Entry Name the name of the entry in the zip file to be read param decoding Flag the flag used to decode the class file reader return a default classfile reader see I Class File Reader public static I Class File Reader create Default Class File Reader String zip File Name String zip Entry Name int decoding Flag Zip File zip File null try if Java Model Manager ZIP ACCESS VERBOSE System out println Thread current Thread Tool Factory create Default Class File Reader Creating Zip File on zip File Name NON NLS 1 NON NLS 2 zip File new Zip File zip File Name Zip Entry zip Entry zip File get Entry zip Entry Name if zip Entry null return null if zip Entry Name to Lower Case ends With Suffix Constants SUFFIX STRING class return null byte class File Bytes Util get Zip Entry Byte Content zip Entry zip File return new Class File Reader class File Bytes decoding Flag catch Class Format Exception e return null catch IO Exception e return null finally if zip File null try zip File close catch IO Exception e ignore  zipFileName zipEntryName IClassFileReader zipFileName zipEntryName decodingFlag IClassFileReader IClassFileReader createDefaultClassFileReader zipFileName zipEntryName decodingFlag ZipFile zipFile JavaModelManager ZIP_ACCESS_VERBOSE currentThread ToolFactory createDefaultClassFileReader ZipFile zipFileName zipFile ZipFile zipFileName ZipEntry zipEntry zipFile getEntry zipEntryName zipEntry zipEntryName toLowerCase endsWith SuffixConstants SUFFIX_STRING_class classFileBytes getZipEntryByteContent zipEntry zipFile ClassFileReader classFileBytes decodingFlag ClassFormatException IOException zipFile zipFile IOException
Create a scanner indicating the level of detail requested for tokenizing The scanner can then be used to tokenize some source in a Java aware way Here is a typical scanning loop code pre I Scanner scanner Tool Factory create Scanner false false false false scanner set Source int i 0 to Char Array while true int token scanner get Next Token if token I Terminal Symbols Token NameEOF break System out println token new String scanner get Current Token Source pre code p The returned scanner will tolerate unterminated line comments missing line separator It can be made stricter by using API with extra boolean parameter code strict Comment Mode code p param tokenize Comments if set to code false code comments will be silently consumed param tokenize White Space if set to code false code white spaces will be silently consumed param assert Mode if set to code false code occurrences of assert will be reported as identifiers code I Terminal Symbols Token Name Identifier code whereas if set to code true code it would report assert keywords code I Terminal Symbols Token Nameassert code Java 1 4 has introduced a new assert keyword param record Line Separator if set to code true code the scanner will record positions of encountered line separator ends In case of multi character line separators the last character position is considered These positions can then be extracted using code I Scanner get Line Ends code Only non unicode escape sequences are considered as valid line separators return a scanner see org eclipse jdt core compiler I Scanner public static I Scanner create Scanner boolean tokenize Comments boolean tokenize White Space boolean assert Mode boolean record Line Separator Public Scanner scanner new Public Scanner tokenize Comments tokenize White Space false nls assert Mode Class File Constants JDK1 4 Class File Constants JDK1 3 source Level null task Tags null task Priorities true task Case Sensitive scanner record Line Separator record Line Separator return scanner  IScanner ToolFactory createScanner setSource toCharArray getNextToken ITerminalSymbols TokenNameEOF getCurrentTokenSource strictCommentMode tokenizeComments tokenizeWhiteSpace assertMode ITerminalSymbols TokenNameIdentifier ITerminalSymbols TokenNameassert recordLineSeparator IScanner getLineEnds IScanner IScanner createScanner tokenizeComments tokenizeWhiteSpace assertMode recordLineSeparator PublicScanner PublicScanner tokenizeComments tokenizeWhiteSpace assertMode ClassFileConstants JDK1_4 ClassFileConstants JDK1_3 sourceLevel taskTags taskPriorities taskCaseSensitive recordLineSeparator recordLineSeparator
Create a scanner indicating the level of detail requested for tokenizing The scanner can then be used to tokenize some source in a Java aware way Here is a typical scanning loop code pre I Scanner scanner Tool Factory create Scanner false false false false scanner set Source int i 0 to Char Array while true int token scanner get Next Token if token I Terminal Symbols Token NameEOF break System out println token new String scanner get Current Token Source pre code p The returned scanner will tolerate unterminated line comments missing line separator It can be made stricter by using API with extra boolean parameter code strict Comment Mode code p param tokenize Comments if set to code false code comments will be silently consumed param tokenize White Space if set to code false code white spaces will be silently consumed param record Line Separator if set to code true code the scanner will record positions of encountered line separator ends In case of multi character line separators the last character position is considered These positions can then be extracted using code I Scanner get Line Ends code Only non unicode escape sequences are considered as valid line separators param source Level if set to code quot 1 3 quot code or code null code occurrences of assert will be reported as identifiers code I Terminal Symbols Token Name Identifier code whereas if set to code quot 1 4 quot code it would report assert keywords code I Terminal Symbols Token Nameassert code Java 1 4 has introduced a new assert keyword return a scanner see org eclipse jdt core compiler I Scanner since 3 0 public static I Scanner create Scanner boolean tokenize Comments boolean tokenize White Space boolean record Line Separator String source Level Public Scanner scanner null long level Compiler Options version To Jdk Level source Level if level 0 level Class File Constants JDK1 3 fault tolerance scanner new Public Scanner tokenize Comments tokenize White Space false nls level source Level null task Tags null task Priorities true task Case Sensitive scanner record Line Separator record Line Separator return scanner  IScanner ToolFactory createScanner setSource toCharArray getNextToken ITerminalSymbols TokenNameEOF getCurrentTokenSource strictCommentMode tokenizeComments tokenizeWhiteSpace recordLineSeparator IScanner getLineEnds sourceLevel ITerminalSymbols TokenNameIdentifier ITerminalSymbols TokenNameassert IScanner IScanner createScanner tokenizeComments tokenizeWhiteSpace recordLineSeparator sourceLevel PublicScanner CompilerOptions versionToJdkLevel sourceLevel ClassFileConstants JDK1_3 PublicScanner tokenizeComments tokenizeWhiteSpace sourceLevel taskTags taskPriorities taskCaseSensitive recordLineSeparator recordLineSeparator

public class Byte Code Visitor Adapter implements I Bytecode Visitor see I Bytecode Visitor  aaload int public void  aaload int pc default behavior is to do nothing  ByteCodeVisitorAdapter IBytecodeVisitor IBytecodeVisitor _aaload _aaload
see I Bytecode Visitor  aastore int public void  aastore int pc default behavior is to do nothing  IBytecodeVisitor _aastore _aastore
see I Bytecode Visitor  aconst null int public void  aconst null int pc default behavior is to do nothing  IBytecodeVisitor _aconst_null _aconst_null
see I Bytecode Visitor  aload 0 int public void  aload 0 int pc default behavior is to do nothing  IBytecodeVisitor _aload_0 _aload_0
see I Bytecode Visitor  aload 1 int public void  aload 1 int pc default behavior is to do nothing  IBytecodeVisitor _aload_1 _aload_1
see I Bytecode Visitor  aload 2 int public void  aload 2 int pc default behavior is to do nothing  IBytecodeVisitor _aload_2 _aload_2
see I Bytecode Visitor  aload 3 int public void  aload 3 int pc default behavior is to do nothing  IBytecodeVisitor _aload_3 _aload_3
see I Bytecode Visitor  aload int int public void  aload int pc int index default behavior is to do nothing  IBytecodeVisitor _aload _aload
see I Bytecode Visitor  anewarray int int I Constant Pool Entry public void  anewarray int pc int index I Constant Pool Entry constant Class default behavior is to do nothing  IBytecodeVisitor _anewarray IConstantPoolEntry _anewarray IConstantPoolEntry constantClass
see I Bytecode Visitor  areturn int public void  areturn int pc default behavior is to do nothing  IBytecodeVisitor _areturn _areturn
see I Bytecode Visitor  arraylength int public void  arraylength int pc default behavior is to do nothing  IBytecodeVisitor _arraylength _arraylength
see I Bytecode Visitor  astore 0 int public void  astore 0 int pc default behavior is to do nothing  IBytecodeVisitor _astore_0 _astore_0
see I Bytecode Visitor  astore 1 int public void  astore 1 int pc default behavior is to do nothing  IBytecodeVisitor _astore_1 _astore_1
see I Bytecode Visitor  astore 2 int public void  astore 2 int pc default behavior is to do nothing  IBytecodeVisitor _astore_2 _astore_2
see I Bytecode Visitor  astore 3 int public void  astore 3 int pc default behavior is to do nothing  IBytecodeVisitor _astore_3 _astore_3
see I Bytecode Visitor  astore int int public void  astore int pc int index default behavior is to do nothing  IBytecodeVisitor _astore _astore
see I Bytecode Visitor  athrow int public void  athrow int pc default behavior is to do nothing  IBytecodeVisitor _athrow _athrow
see I Bytecode Visitor  baload int public void  baload int pc default behavior is to do nothing  IBytecodeVisitor _baload _baload
see I Bytecode Visitor  bastore int public void  bastore int pc default behavior is to do nothing  IBytecodeVisitor _bastore _bastore
see I Bytecode Visitor  bipush int byte public void  bipush int pc byte  byte default behavior is to do nothing  IBytecodeVisitor _bipush _bipush _byte
see I Bytecode Visitor  caload int public void  caload int pc default behavior is to do nothing  IBytecodeVisitor _caload _caload
see I Bytecode Visitor  castore int public void  castore int pc default behavior is to do nothing  IBytecodeVisitor _castore _castore
see I Bytecode Visitor  checkcast int int I Constant Pool Entry public void  checkcast int pc int index I Constant Pool Entry constant Class default behavior is to do nothing  IBytecodeVisitor _checkcast IConstantPoolEntry _checkcast IConstantPoolEntry constantClass
see I Bytecode Visitor  d2f int public void  d2f int pc default behavior is to do nothing  IBytecodeVisitor _d2f _d2f
see I Bytecode Visitor  d2i int public void  d2i int pc default behavior is to do nothing  IBytecodeVisitor _d2i _d2i
see I Bytecode Visitor  d2l int public void  d2l int pc default behavior is to do nothing  IBytecodeVisitor _d2l _d2l
see I Bytecode Visitor  dadd int public void  dadd int pc default behavior is to do nothing  IBytecodeVisitor _dadd _dadd
see I Bytecode Visitor  daload int public void  daload int pc default behavior is to do nothing  IBytecodeVisitor _daload _daload
see I Bytecode Visitor  dastore int public void  dastore int pc default behavior is to do nothing  IBytecodeVisitor _dastore _dastore
see I Bytecode Visitor  dcmpg int public void  dcmpg int pc default behavior is to do nothing  IBytecodeVisitor _dcmpg _dcmpg
see I Bytecode Visitor  dcmpl int public void  dcmpl int pc default behavior is to do nothing  IBytecodeVisitor _dcmpl _dcmpl
see I Bytecode Visitor  dconst 0 int public void  dconst 0 int pc default behavior is to do nothing  IBytecodeVisitor _dconst_0 _dconst_0
see I Bytecode Visitor  dconst 1 int public void  dconst 1 int pc default behavior is to do nothing  IBytecodeVisitor _dconst_1 _dconst_1
see I Bytecode Visitor  ddiv int public void  ddiv int pc default behavior is to do nothing  IBytecodeVisitor _ddiv _ddiv
see I Bytecode Visitor  dload 0 int public void  dload 0 int pc default behavior is to do nothing  IBytecodeVisitor _dload_0 _dload_0
see I Bytecode Visitor  dload 1 int public void  dload 1 int pc default behavior is to do nothing  IBytecodeVisitor _dload_1 _dload_1
see I Bytecode Visitor  dload 2 int public void  dload 2 int pc default behavior is to do nothing  IBytecodeVisitor _dload_2 _dload_2
see I Bytecode Visitor  dload 3 int public void  dload 3 int pc default behavior is to do nothing  IBytecodeVisitor _dload_3 _dload_3
see I Bytecode Visitor  dload int int public void  dload int pc int index default behavior is to do nothing  IBytecodeVisitor _dload _dload
see I Bytecode Visitor  dmul int public void  dmul int pc default behavior is to do nothing  IBytecodeVisitor _dmul _dmul
see I Bytecode Visitor  dneg int public void  dneg int pc default behavior is to do nothing  IBytecodeVisitor _dneg _dneg
see I Bytecode Visitor  drem int public void  drem int pc default behavior is to do nothing  IBytecodeVisitor _drem _drem
see I Bytecode Visitor  dreturn int public void  dreturn int pc default behavior is to do nothing  IBytecodeVisitor _dreturn _dreturn
see I Bytecode Visitor  dstore 0 int public void  dstore 0 int pc default behavior is to do nothing  IBytecodeVisitor _dstore_0 _dstore_0
see I Bytecode Visitor  dstore 1 int public void  dstore 1 int pc default behavior is to do nothing  IBytecodeVisitor _dstore_1 _dstore_1
see I Bytecode Visitor  dstore 2 int public void  dstore 2 int pc default behavior is to do nothing  IBytecodeVisitor _dstore_2 _dstore_2
see I Bytecode Visitor  dstore 3 int public void  dstore 3 int pc default behavior is to do nothing  IBytecodeVisitor _dstore_3 _dstore_3
see I Bytecode Visitor  dstore int int public void  dstore int pc int index default behavior is to do nothing  IBytecodeVisitor _dstore _dstore
see I Bytecode Visitor  dsub int public void  dsub int pc default behavior is to do nothing  IBytecodeVisitor _dsub _dsub
see I Bytecode Visitor  dup x1 int public void  dup x1 int pc default behavior is to do nothing  IBytecodeVisitor _dup_x1 _dup_x1
see I Bytecode Visitor  dup x2 int public void  dup x2 int pc default behavior is to do nothing  IBytecodeVisitor _dup_x2 _dup_x2
see I Bytecode Visitor  dup int public void  dup int pc default behavior is to do nothing  IBytecodeVisitor _dup _dup
see I Bytecode Visitor  dup2 x1 int public void  dup2 x1 int pc default behavior is to do nothing  IBytecodeVisitor _dup2_x1 _dup2_x1
see I Bytecode Visitor  dup2 x2 int public void  dup2 x2 int pc default behavior is to do nothing  IBytecodeVisitor _dup2_x2 _dup2_x2
see I Bytecode Visitor  dup2 int public void  dup2 int pc default behavior is to do nothing  IBytecodeVisitor _dup2 _dup2
see I Bytecode Visitor  f2d int public void  f2d int pc default behavior is to do nothing  IBytecodeVisitor _f2d _f2d
see I Bytecode Visitor  f2i int public void  f2i int pc default behavior is to do nothing  IBytecodeVisitor _f2i _f2i
see I Bytecode Visitor  f2l int public void  f2l int pc default behavior is to do nothing  IBytecodeVisitor _f2l _f2l
see I Bytecode Visitor  fadd int public void  fadd int pc default behavior is to do nothing  IBytecodeVisitor _fadd _fadd
see I Bytecode Visitor  faload int public void  faload int pc default behavior is to do nothing  IBytecodeVisitor _faload _faload
see I Bytecode Visitor  fastore int public void  fastore int pc default behavior is to do nothing  IBytecodeVisitor _fastore _fastore
see I Bytecode Visitor  fcmpg int public void  fcmpg int pc default behavior is to do nothing  IBytecodeVisitor _fcmpg _fcmpg
see I Bytecode Visitor  fcmpl int public void  fcmpl int pc default behavior is to do nothing  IBytecodeVisitor _fcmpl _fcmpl
see I Bytecode Visitor  fconst 0 int public void  fconst 0 int pc default behavior is to do nothing  IBytecodeVisitor _fconst_0 _fconst_0
see I Bytecode Visitor  fconst 1 int public void  fconst 1 int pc default behavior is to do nothing  IBytecodeVisitor _fconst_1 _fconst_1
see I Bytecode Visitor  fconst 2 int public void  fconst 2 int pc default behavior is to do nothing  IBytecodeVisitor _fconst_2 _fconst_2
see I Bytecode Visitor  fdiv int public void  fdiv int pc default behavior is to do nothing  IBytecodeVisitor _fdiv _fdiv
see I Bytecode Visitor  fload 0 int public void  fload 0 int pc default behavior is to do nothing  IBytecodeVisitor _fload_0 _fload_0
see I Bytecode Visitor  fload 1 int public void  fload 1 int pc default behavior is to do nothing  IBytecodeVisitor _fload_1 _fload_1
see I Bytecode Visitor  fload 2 int public void  fload 2 int pc default behavior is to do nothing  IBytecodeVisitor _fload_2 _fload_2
see I Bytecode Visitor  fload 3 int public void  fload 3 int pc default behavior is to do nothing  IBytecodeVisitor _fload_3 _fload_3
see I Bytecode Visitor  fload int int public void  fload int pc int index default behavior is to do nothing  IBytecodeVisitor _fload _fload
see I Bytecode Visitor  fmul int public void  fmul int pc default behavior is to do nothing  IBytecodeVisitor _fmul _fmul
see I Bytecode Visitor  fneg int public void  fneg int pc default behavior is to do nothing  IBytecodeVisitor _fneg _fneg
see I Bytecode Visitor  frem int public void  frem int pc default behavior is to do nothing  IBytecodeVisitor _frem _frem
see I Bytecode Visitor  freturn int public void  freturn int pc default behavior is to do nothing  IBytecodeVisitor _freturn _freturn
see I Bytecode Visitor  fstore 0 int public void  fstore 0 int pc default behavior is to do nothing  IBytecodeVisitor _fstore_0 _fstore_0
see I Bytecode Visitor  fstore 1 int public void  fstore 1 int pc default behavior is to do nothing  IBytecodeVisitor _fstore_1 _fstore_1
see I Bytecode Visitor  fstore 2 int public void  fstore 2 int pc default behavior is to do nothing  IBytecodeVisitor _fstore_2 _fstore_2
see I Bytecode Visitor  fstore 3 int public void  fstore 3 int pc default behavior is to do nothing  IBytecodeVisitor _fstore_3 _fstore_3
see I Bytecode Visitor  fstore int int public void  fstore int pc int index default behavior is to do nothing  IBytecodeVisitor _fstore _fstore
see I Bytecode Visitor  fsub int public void  fsub int pc default behavior is to do nothing  IBytecodeVisitor _fsub _fsub
see I Bytecode Visitor  getfield int int I Constant Pool Entry public void  getfield int pc int index I Constant Pool Entry constant Fieldref default behavior is to do nothing  IBytecodeVisitor _getfield IConstantPoolEntry _getfield IConstantPoolEntry constantFieldref
see I Bytecode Visitor  getstatic int int I Constant Pool Entry public void  getstatic int pc int index I Constant Pool Entry constant Fieldref default behavior is to do nothing  IBytecodeVisitor _getstatic IConstantPoolEntry _getstatic IConstantPoolEntry constantFieldref
see I Bytecode Visitor  goto w int int public void  goto w int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _goto_w _goto_w branchOffset
see I Bytecode Visitor  goto int int public void  goto int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _goto _goto branchOffset
see I Bytecode Visitor  i2b int public void  i2b int pc default behavior is to do nothing  IBytecodeVisitor _i2b _i2b
see I Bytecode Visitor  i2c int public void  i2c int pc default behavior is to do nothing  IBytecodeVisitor _i2c _i2c
see I Bytecode Visitor  i2d int public void  i2d int pc default behavior is to do nothing  IBytecodeVisitor _i2d _i2d
see I Bytecode Visitor  i2f int public void  i2f int pc default behavior is to do nothing  IBytecodeVisitor _i2f _i2f
see I Bytecode Visitor  i2l int public void  i2l int pc default behavior is to do nothing  IBytecodeVisitor _i2l _i2l
see I Bytecode Visitor  i2s int public void  i2s int pc default behavior is to do nothing  IBytecodeVisitor _i2s _i2s
see I Bytecode Visitor  iadd int public void  iadd int pc default behavior is to do nothing  IBytecodeVisitor _iadd _iadd
see I Bytecode Visitor  iaload int public void  iaload int pc default behavior is to do nothing  IBytecodeVisitor _iaload _iaload
see I Bytecode Visitor  iand int public void  iand int pc default behavior is to do nothing  IBytecodeVisitor _iand _iand
see I Bytecode Visitor  iastore int public void  iastore int pc default behavior is to do nothing  IBytecodeVisitor _iastore _iastore
see I Bytecode Visitor  iconst 0 int public void  iconst 0 int pc default behavior is to do nothing  IBytecodeVisitor _iconst_0 _iconst_0
see I Bytecode Visitor  iconst 1 int public void  iconst 1 int pc default behavior is to do nothing  IBytecodeVisitor _iconst_1 _iconst_1
see I Bytecode Visitor  iconst 2 int public void  iconst 2 int pc default behavior is to do nothing  IBytecodeVisitor _iconst_2 _iconst_2
see I Bytecode Visitor  iconst 3 int public void  iconst 3 int pc default behavior is to do nothing  IBytecodeVisitor _iconst_3 _iconst_3
see I Bytecode Visitor  iconst 4 int public void  iconst 4 int pc default behavior is to do nothing  IBytecodeVisitor _iconst_4 _iconst_4
see I Bytecode Visitor  iconst 5 int public void  iconst 5 int pc default behavior is to do nothing  IBytecodeVisitor _iconst_5 _iconst_5
see I Bytecode Visitor  iconst m1 int public void  iconst m1 int pc default behavior is to do nothing  IBytecodeVisitor _iconst_m1 _iconst_m1
see I Bytecode Visitor  idiv int public void  idiv int pc default behavior is to do nothing  IBytecodeVisitor _idiv _idiv
see I Bytecode Visitor  if acmpeq int int public void  if acmpeq int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _if_acmpeq _if_acmpeq branchOffset
see I Bytecode Visitor  if acmpne int int public void  if acmpne int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _if_acmpne _if_acmpne branchOffset
see I Bytecode Visitor  if icmpeq int int public void  if icmpeq int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _if_icmpeq _if_icmpeq branchOffset
see I Bytecode Visitor  if icmpge int int public void  if icmpge int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _if_icmpge _if_icmpge branchOffset
see I Bytecode Visitor  if icmpgt int int public void  if icmpgt int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _if_icmpgt _if_icmpgt branchOffset
see I Bytecode Visitor  if icmple int int public void  if icmple int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _if_icmple _if_icmple branchOffset
see I Bytecode Visitor  if icmplt int int public void  if icmplt int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _if_icmplt _if_icmplt branchOffset
see I Bytecode Visitor  if icmpne int int public void  if icmpne int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _if_icmpne _if_icmpne branchOffset
see I Bytecode Visitor  ifeq int int public void  ifeq int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _ifeq _ifeq branchOffset
see I Bytecode Visitor  ifge int int public void  ifge int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _ifge _ifge branchOffset
see I Bytecode Visitor  ifgt int int public void  ifgt int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _ifgt _ifgt branchOffset
see I Bytecode Visitor  ifle int int public void  ifle int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _ifle _ifle branchOffset
see I Bytecode Visitor  iflt int int public void  iflt int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _iflt _iflt branchOffset
see I Bytecode Visitor  ifne int int public void  ifne int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _ifne _ifne branchOffset
see I Bytecode Visitor  ifnonnull int int public void  ifnonnull int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _ifnonnull _ifnonnull branchOffset
see I Bytecode Visitor  ifnull int int public void  ifnull int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _ifnull _ifnull branchOffset
see I Bytecode Visitor  iinc int int int public void  iinc int pc int index int  const default behavior is to do nothing  IBytecodeVisitor _iinc _iinc _const
see I Bytecode Visitor  iload 0 int public void  iload 0 int pc default behavior is to do nothing  IBytecodeVisitor _iload_0 _iload_0
see I Bytecode Visitor  iload 1 int public void  iload 1 int pc default behavior is to do nothing  IBytecodeVisitor _iload_1 _iload_1
see I Bytecode Visitor  iload 2 int public void  iload 2 int pc default behavior is to do nothing  IBytecodeVisitor _iload_2 _iload_2
see I Bytecode Visitor  iload 3 int public void  iload 3 int pc default behavior is to do nothing  IBytecodeVisitor _iload_3 _iload_3
see I Bytecode Visitor  iload int int public void  iload int pc int index default behavior is to do nothing  IBytecodeVisitor _iload _iload
see I Bytecode Visitor  imul int public void  imul int pc default behavior is to do nothing  IBytecodeVisitor _imul _imul
see I Bytecode Visitor  ineg int public void  ineg int pc default behavior is to do nothing  IBytecodeVisitor _ineg _ineg
see I Bytecode Visitor  instanceof int int I Constant Pool Entry public void  instanceof int pc int index I Constant Pool Entry constant Class default behavior is to do nothing  IBytecodeVisitor _instanceof IConstantPoolEntry _instanceof IConstantPoolEntry constantClass
see I Bytecode Visitor  invokeinterface int int byte I Constant Pool Entry public void  invokeinterface int pc int index byte nargs I Constant Pool Entry constant Interface Methodref default behavior is to do nothing  IBytecodeVisitor _invokeinterface IConstantPoolEntry _invokeinterface IConstantPoolEntry constantInterfaceMethodref
see I Bytecode Visitor  invokespecial int int I Constant Pool Entry public void  invokespecial int pc int index I Constant Pool Entry constant Methodref default behavior is to do nothing  IBytecodeVisitor _invokespecial IConstantPoolEntry _invokespecial IConstantPoolEntry constantMethodref
see I Bytecode Visitor  invokestatic int int I Constant Pool Entry public void  invokestatic int pc int index I Constant Pool Entry constant Methodref default behavior is to do nothing  IBytecodeVisitor _invokestatic IConstantPoolEntry _invokestatic IConstantPoolEntry constantMethodref
see I Bytecode Visitor  invokevirtual int int I Constant Pool Entry public void  invokevirtual int pc int index I Constant Pool Entry constant Methodref default behavior is to do nothing  IBytecodeVisitor _invokevirtual IConstantPoolEntry _invokevirtual IConstantPoolEntry constantMethodref
see I Bytecode Visitor  ior int public void  ior int pc default behavior is to do nothing  IBytecodeVisitor _ior _ior
see I Bytecode Visitor  irem int public void  irem int pc default behavior is to do nothing  IBytecodeVisitor _irem _irem
see I Bytecode Visitor  ireturn int public void  ireturn int pc default behavior is to do nothing  IBytecodeVisitor _ireturn _ireturn
see I Bytecode Visitor  ishl int public void  ishl int pc default behavior is to do nothing  IBytecodeVisitor _ishl _ishl
see I Bytecode Visitor  ishr int public void  ishr int pc default behavior is to do nothing  IBytecodeVisitor _ishr _ishr
see I Bytecode Visitor  istore 0 int public void  istore 0 int pc default behavior is to do nothing  IBytecodeVisitor _istore_0 _istore_0
see I Bytecode Visitor  istore 1 int public void  istore 1 int pc default behavior is to do nothing  IBytecodeVisitor _istore_1 _istore_1
see I Bytecode Visitor  istore 2 int public void  istore 2 int pc default behavior is to do nothing  IBytecodeVisitor _istore_2 _istore_2
see I Bytecode Visitor  istore 3 int public void  istore 3 int pc default behavior is to do nothing  IBytecodeVisitor _istore_3 _istore_3
see I Bytecode Visitor  istore int int public void  istore int pc int index default behavior is to do nothing  IBytecodeVisitor _istore _istore
see I Bytecode Visitor  isub int public void  isub int pc default behavior is to do nothing  IBytecodeVisitor _isub _isub
see I Bytecode Visitor  iushr int public void  iushr int pc default behavior is to do nothing  IBytecodeVisitor _iushr _iushr
see I Bytecode Visitor  ixor int public void  ixor int pc default behavior is to do nothing  IBytecodeVisitor _ixor _ixor
see I Bytecode Visitor  jsr w int int public void  jsr w int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _jsr_w _jsr_w branchOffset
see I Bytecode Visitor  jsr int int public void  jsr int pc int branch Offset default behavior is to do nothing  IBytecodeVisitor _jsr _jsr branchOffset
see I Bytecode Visitor  l2d int public void  l2d int pc default behavior is to do nothing  IBytecodeVisitor _l2d _l2d
see I Bytecode Visitor  l2f int public void  l2f int pc default behavior is to do nothing  IBytecodeVisitor _l2f _l2f
see I Bytecode Visitor  l2i int public void  l2i int pc default behavior is to do nothing  IBytecodeVisitor _l2i _l2i
see I Bytecode Visitor  ladd int public void  ladd int pc default behavior is to do nothing  IBytecodeVisitor _ladd _ladd
see I Bytecode Visitor  laload int public void  laload int pc default behavior is to do nothing  IBytecodeVisitor _laload _laload
see I Bytecode Visitor  land int public void  land int pc default behavior is to do nothing  IBytecodeVisitor _land _land
see I Bytecode Visitor  lastore int public void  lastore int pc default behavior is to do nothing  IBytecodeVisitor _lastore _lastore
see I Bytecode Visitor  lcmp int public void  lcmp int pc default behavior is to do nothing  IBytecodeVisitor _lcmp _lcmp
see I Bytecode Visitor  lconst 0 int public void  lconst 0 int pc default behavior is to do nothing  IBytecodeVisitor _lconst_0 _lconst_0
see I Bytecode Visitor  lconst 1 int public void  lconst 1 int pc default behavior is to do nothing  IBytecodeVisitor _lconst_1 _lconst_1
see I Bytecode Visitor  ldc w int int I Constant Pool Entry public void  ldc w int pc int index I Constant Pool Entry constant Pool Entry default behavior is to do nothing  IBytecodeVisitor _ldc_w IConstantPoolEntry _ldc_w IConstantPoolEntry constantPoolEntry
see I Bytecode Visitor  ldc int int I Constant Pool Entry public void  ldc int pc int index I Constant Pool Entry constant Pool Entry default behavior is to do nothing  IBytecodeVisitor _ldc IConstantPoolEntry _ldc IConstantPoolEntry constantPoolEntry
see I Bytecode Visitor  ldc2 w int int I Constant Pool Entry public void  ldc2 w int pc int index I Constant Pool Entry constant Pool Entry default behavior is to do nothing  IBytecodeVisitor _ldc2_w IConstantPoolEntry _ldc2_w IConstantPoolEntry constantPoolEntry
see I Bytecode Visitor  ldiv int public void  ldiv int pc default behavior is to do nothing  IBytecodeVisitor _ldiv _ldiv
see I Bytecode Visitor  lload 0 int public void  lload 0 int pc default behavior is to do nothing  IBytecodeVisitor _lload_0 _lload_0
see I Bytecode Visitor  lload 1 int public void  lload 1 int pc default behavior is to do nothing  IBytecodeVisitor _lload_1 _lload_1
see I Bytecode Visitor  lload 2 int public void  lload 2 int pc default behavior is to do nothing  IBytecodeVisitor _lload_2 _lload_2
see I Bytecode Visitor  lload 3 int public void  lload 3 int pc default behavior is to do nothing  IBytecodeVisitor _lload_3 _lload_3
see I Bytecode Visitor  lload int int public void  lload int pc int index default behavior is to do nothing  IBytecodeVisitor _lload _lload
see I Bytecode Visitor  lmul int public void  lmul int pc default behavior is to do nothing  IBytecodeVisitor _lmul _lmul
see I Bytecode Visitor  lneg int public void  lneg int pc default behavior is to do nothing  IBytecodeVisitor _lneg _lneg
see I Bytecode Visitor  lookupswitch int int int int public void  lookupswitch int pc int defaultoffset int npairs int offset pairs default behavior is to do nothing  IBytecodeVisitor _lookupswitch _lookupswitch offset_pairs
see I Bytecode Visitor  lor int public void  lor int pc default behavior is to do nothing  IBytecodeVisitor _lor _lor
see I Bytecode Visitor  lrem int public void  lrem int pc default behavior is to do nothing  IBytecodeVisitor _lrem _lrem
see I Bytecode Visitor  lreturn int public void  lreturn int pc default behavior is to do nothing  IBytecodeVisitor _lreturn _lreturn
see I Bytecode Visitor  lshl int public void  lshl int pc default behavior is to do nothing  IBytecodeVisitor _lshl _lshl
see I Bytecode Visitor  lshr int public void  lshr int pc default behavior is to do nothing  IBytecodeVisitor _lshr _lshr
see I Bytecode Visitor  lstore 0 int public void  lstore 0 int pc default behavior is to do nothing  IBytecodeVisitor _lstore_0 _lstore_0
see I Bytecode Visitor  lstore 1 int public void  lstore 1 int pc default behavior is to do nothing  IBytecodeVisitor _lstore_1 _lstore_1
see I Bytecode Visitor  lstore 2 int public void  lstore 2 int pc default behavior is to do nothing  IBytecodeVisitor _lstore_2 _lstore_2
see I Bytecode Visitor  lstore 3 int public void  lstore 3 int pc default behavior is to do nothing  IBytecodeVisitor _lstore_3 _lstore_3
see I Bytecode Visitor  lstore int int public void  lstore int pc int index default behavior is to do nothing  IBytecodeVisitor _lstore _lstore
see I Bytecode Visitor  lsub int public void  lsub int pc default behavior is to do nothing  IBytecodeVisitor _lsub _lsub
see I Bytecode Visitor  lushr int public void  lushr int pc default behavior is to do nothing  IBytecodeVisitor _lushr _lushr
see I Bytecode Visitor  lxor int public void  lxor int pc default behavior is to do nothing  IBytecodeVisitor _lxor _lxor
see I Bytecode Visitor  monitorenter int public void  monitorenter int pc default behavior is to do nothing  IBytecodeVisitor _monitorenter _monitorenter
see I Bytecode Visitor  monitorexit int public void  monitorexit int pc default behavior is to do nothing  IBytecodeVisitor _monitorexit _monitorexit
see I Bytecode Visitor  multianewarray int int int I Constant Pool Entry public void  multianewarray int pc int index int dimensions I Constant Pool Entry constant Class default behavior is to do nothing  IBytecodeVisitor _multianewarray IConstantPoolEntry _multianewarray IConstantPoolEntry constantClass
see I Bytecode Visitor  new int int I Constant Pool Entry public void  new int pc int index I Constant Pool Entry constant Class default behavior is to do nothing  IBytecodeVisitor _new IConstantPoolEntry _new IConstantPoolEntry constantClass
see I Bytecode Visitor  newarray int int public void  newarray int pc int atype default behavior is to do nothing  IBytecodeVisitor _newarray _newarray
see I Bytecode Visitor  nop int public void  nop int pc default behavior is to do nothing  IBytecodeVisitor _nop _nop
see I Bytecode Visitor  pop int public void  pop int pc default behavior is to do nothing  IBytecodeVisitor _pop _pop
see I Bytecode Visitor  pop2 int public void  pop2 int pc default behavior is to do nothing  IBytecodeVisitor _pop2 _pop2
see I Bytecode Visitor  putfield int int I Constant Pool Entry public void  putfield int pc int index I Constant Pool Entry constant Fieldref default behavior is to do nothing  IBytecodeVisitor _putfield IConstantPoolEntry _putfield IConstantPoolEntry constantFieldref
see I Bytecode Visitor  putstatic int int I Constant Pool Entry public void  putstatic int pc int index I Constant Pool Entry constant Fieldref default behavior is to do nothing  IBytecodeVisitor _putstatic IConstantPoolEntry _putstatic IConstantPoolEntry constantFieldref
see I Bytecode Visitor  ret int int public void  ret int pc int index default behavior is to do nothing  IBytecodeVisitor _ret _ret
see I Bytecode Visitor  return int public void  return int pc default behavior is to do nothing  IBytecodeVisitor _return _return
see I Bytecode Visitor  saload int public void  saload int pc default behavior is to do nothing  IBytecodeVisitor _saload _saload
see I Bytecode Visitor  sastore int public void  sastore int pc default behavior is to do nothing  IBytecodeVisitor _sastore _sastore
see I Bytecode Visitor  sipush int short public void  sipush int pc short value default behavior is to do nothing  IBytecodeVisitor _sipush _sipush
see I Bytecode Visitor  swap int public void  swap int pc default behavior is to do nothing  IBytecodeVisitor _swap _swap
see I Bytecode Visitor  tableswitch int int int int int public void  tableswitch int pc int defaultoffset int low int high int jump offsets default behavior is to do nothing  IBytecodeVisitor _tableswitch _tableswitch jump_offsets
see I Bytecode Visitor  wide int int int int public void  wide int pc int iincopcode int index int  const default behavior is to do nothing  IBytecodeVisitor _wide _wide _const
see I Bytecode Visitor  wide int int int public void  wide int pc int opcode int index default behavior is to do nothing  IBytecodeVisitor _wide _wide
see I Bytecode Visitor  breakpoint int public void  breakpoint int pc default behavior is to do nothing  IBytecodeVisitor _breakpoint _breakpoint
see I Bytecode Visitor  impdep1 int public void  impdep1 int pc default behavior is to do nothing  IBytecodeVisitor _impdep1 _impdep1
see I Bytecode Visitor  impdep2 int public void  impdep2 int pc default behavior is to do nothing  IBytecodeVisitor _impdep2 _impdep2

Answers back the disassembled string of the classfile bytes using the default mode This is an output quite similar to the javap tool using DEFAULT mode param class File Bytes The bytes of the classfile param line Separator the line separator to use return the disassembled string of the I Class File Reader using the default mode exception Class Format Exception if the classfile bytes are ill formed  classFileBytes lineSeparator IClassFileReader ClassFormatException
Answers back the disassembled string of the classfile bytes according to the mode This is an output quite similar to the javap tool param class File Bytes The bytes of the classfile param line Separator the line separator to use param mode the mode used to disassemble the I Class File Reader return the disassembled string of the I Class File Reader according to the mode exception Class Format Exception if the classfile bytes are ill formed  classFileBytes lineSeparator IClassFileReader IClassFileReader ClassFormatException
Answers a readable short description of this disassembler return String a string description of the disassembler 

Constructor for Class Format Exception param errorID the given error ID public Class Format Exception int errorID TODO what is the errorID  ClassFormatException ClassFormatException
Constructor for Class Format Exception param message the message for the exception public Class Format Exception String message super message  ClassFormatException ClassFormatException

Private constructor to prevent instantiation private Compilation Unit Sorter Not instantiable  CompilationUnitSorter
Reorders the declarations in the given compilation unit The caller is responsible for arranging in advance that the given compilation unit is a working copy and for saving the changes afterwards p b Note b Reordering the members within a type declaration might be more than a cosmetic change and could have potentially serious repercussions Firstly the order in which the fields of a type are initialized is significant in the Java language reordering fields and initializers may result in compilation errors or change the execution behavior of the code Secondly reordering a class s members may affect how its instances are serialized This operation should therefore be used with caution and due concern for potential negative side effects p p The optional code positions code array contains a non decreasing ordered list of character based source positions within the compilation unit s source code string Upon return from this method the positions in the array reflect the corresponding new locations in the modified source code string Note that this operation modifies the given array in place p p The code compare code method of the given comparator is passed pairs of AST body declarations subclasses of code Body Declaration code representing body declarations at the same level The comparator is called on body declarations of nested classes including anonymous and local classes but always at the same level Clients need to provide a comparator implementation there is no standard comparator The code RELATIVE ORDER code property attached to these AST nodes afforts the comparator a way to preserve the original relative order p p The body declarations passed as parameters to the comparator always carry at least the following minimal signature information br table border 1 width 80 cellpadding 5 tr td width 20 code Type Declaration code td td width 50 code modifiers is Interface name superclass super Interfaces br RELATIVE ORDER property code td tr tr td width 20 code Field Declaration code td td width 50 code modifiers type fragments Variable Declaration Fragments with name only br RELATIVE ORDER property code td tr tr td width 20 code Method Declaration code td td width 50 code modifiers is Constructor return Type name parameters Single Variable Declarations with name and type only thrown Exceptions br RELATIVE ORDER property code td tr tr td width 20 code Initializer code td td width 50 code modifiers br RELATIVE ORDER property code td tr table Clients should not rely on the AST nodes being properly parented or on having source range information Future releases may provide options for requesting additional information like source positions full AS Ts non recursive sorting etc p param compilation Unit the given compilation unit which must be a working copy param positions an array of source positions to map or code null code if none If supplied the positions must character based source positions within the original source code for the given compilation unit arranged in non decreasing order The array is updated in place when this method returns to reflect the corresponding source positions in the permuted source code string but not necessarily any longer in non decreasing order param comparator the comparator capable of ordering code Body Declaration code s param options bitwise or of option flags code 0 code for default behavior reserved for future growth param monitor the progress monitor to notify or code null code if none exception Java Model Exception if the compilation unit could not be sorted Reasons include ul li The given compilation unit does not exist ELEMENT DOES NOT EXIST li li The given compilation unit is not a working copy INVALID ELEMENT TYPES li li A code Core Exception code occurred while accessing the underlying resource ul exception Illegal Argument Exception if the given compilation unit is null or if the given comparator is null see org eclipse jdt core dom Body Declaration see RELATIVE ORDER public static void sort I Compilation Unit compilation Unit int positions Comparator comparator int options I Progress Monitor monitor throws Java Model Exception if compilation Unit null comparator null throw new Illegal Argument Exception I Compilation Unit compilation Units new I Compilation Unit compilation Unit Sort Elements Operation operation new Sort Elements Operation compilation Units positions comparator operation run Operation monitor  BodyDeclaration RELATIVE_ORDER TypeDeclaration isInterface superInterfaces RELATIVE_ORDER FieldDeclaration VariableDeclarationFragments RELATIVE_ORDER MethodDeclaration isConstructor returnType SingleVariableDeclarations thrownExceptions RELATIVE_ORDER RELATIVE_ORDER ASTs compilationUnit BodyDeclaration JavaModelException ELEMENT_DOES_NOT_EXIST INVALID_ELEMENT_TYPES CoreException IllegalArgumentException BodyDeclaration RELATIVE_ORDER ICompilationUnit compilationUnit IProgressMonitor JavaModelException compilationUnit IllegalArgumentException ICompilationUnit compilationUnits ICompilationUnit compilationUnit SortElementsOperation SortElementsOperation compilationUnits runOperation

public interface I Annotation Answer back the type index as described in the JVM specifications return the type index  IAnnotation
Answer back the number of components as described in the JVM specifications return the type index 
Answer back the components as described in the JVM specifications Answer an empty collection if none return the components 

public interface I Annotation Component Answer back the component name index as described in the JVM specifications return the component name index  IAnnotationComponent
Answer back the component name as described in the JVM specifications return the component name 
Answer back the component value as described in the JVM specifications return the component value 

Answer back the annotation component values as described in the JVM specifications This is initialized only of the tag item is return the annotation component values 
Answer back the attribute value as described in the JVM specifications This is initialized only of the tag item is return the attribute value 
Answer back the class info as described in the JVM specifications This is initialized only of the tag item is c return the class info 
Answer back the class info index as described in the JVM specifications This is initialized only of the tag item is c return the class info index 
Answer back the constant value as described in the JVM specifications This is initialized only of the tag item is one of B C D F I J S Z or s return the constant value 
Answer back the constant value index as described in the JVM specifications This is initialized only of the tag item is one of B C D F I J S Z or s return the constant value index 
Answer back the enum constant as described in the JVM specifications This is initialized only of the tag item is e return the enum constant 
Answer back the enum constant index as described in the JVM specifications This is initialized only of the tag item is e return the enum constant index 
int get Enum Constant Index Answer back the tag as described in the JVM specifications return the tag  getEnumConstantIndex
Answer back the number of values as described in the JVM specifications This is initialized only of the tag item is return the number of values 

Answer back the member value as described in the JVM specifications return the member value 

public interface I Bytecode Visitor void  aaload int pc  IBytecodeVisitor _aaload
void  aaload int pc void  aastore int pc  _aaload _aastore
void  aaload int pc void  aastore int pc void  aconst null int pc  _aaload _aastore _aconst_null
void  aastore int pc void  aconst null int pc void  aload int pc int index  _aastore _aconst_null _aload
void  aconst null int pc void  aload int pc int index void  aload 0 int pc  _aconst_null _aload _aload_0
void  aload int pc int index void  aload 0 int pc void  aload 1 int pc  _aload _aload_0 _aload_1
void  aload 0 int pc void  aload 1 int pc void  aload 2 int pc  _aload_0 _aload_1 _aload_2
void  aload 1 int pc void  aload 2 int pc void  aload 3 int pc  _aload_1 _aload_2 _aload_3
void  aload 2 int pc void  aload 3 int pc void  anewarray int pc int index I Constant Pool Entry constant Class  _aload_2 _aload_3 _anewarray IConstantPoolEntry constantClass
int index I Constant Pool Entry constant Class void  areturn int pc  IConstantPoolEntry constantClass _areturn
I Constant Pool Entry constant Class void  areturn int pc void  arraylength int pc  IConstantPoolEntry constantClass _areturn _arraylength
void  areturn int pc void  arraylength int pc void  astore int pc int index  _areturn _arraylength _astore
void  arraylength int pc void  astore int pc int index void  astore 0 int pc  _arraylength _astore _astore_0
void  astore int pc int index void  astore 0 int pc void  astore 1 int pc  _astore _astore_0 _astore_1
void  astore 0 int pc void  astore 1 int pc void  astore 2 int pc  _astore_0 _astore_1 _astore_2
void  astore 1 int pc void  astore 2 int pc void  astore 3 int pc  _astore_1 _astore_2 _astore_3
void  astore 2 int pc void  astore 3 int pc void  athrow int pc  _astore_2 _astore_3 _athrow
void  astore 3 int pc void  athrow int pc void  baload int pc  _astore_3 _athrow _baload
void  athrow int pc void  baload int pc void  bastore int pc  _athrow _baload _bastore
void  baload int pc void  bastore int pc void  bipush int pc byte  byte  _baload _bastore _bipush _byte
void  bastore int pc void  bipush int pc byte  byte void  caload int pc  _bastore _bipush _byte _caload
void  bipush int pc byte  byte void  caload int pc void  castore int pc  _bipush _byte _caload _castore
void  caload int pc void  castore int pc void  checkcast int pc int index I Constant Pool Entry constant Class  _caload _castore _checkcast IConstantPoolEntry constantClass
int index I Constant Pool Entry constant Class void  d2f int pc  IConstantPoolEntry constantClass _d2f
I Constant Pool Entry constant Class void  d2f int pc void  d2i int pc  IConstantPoolEntry constantClass _d2f _d2i
void  d2f int pc void  d2i int pc void  d2l int pc  _d2f _d2i _d2l
void  d2i int pc void  d2l int pc void  dadd int pc  _d2i _d2l _dadd
void  d2l int pc void  dadd int pc void  daload int pc  _d2l _dadd _daload
void  dadd int pc void  daload int pc void  dastore int pc  _dadd _daload _dastore
void  daload int pc void  dastore int pc void  dcmpg int pc  _daload _dastore _dcmpg
void  dastore int pc void  dcmpg int pc void  dcmpl int pc  _dastore _dcmpg _dcmpl
void  dcmpg int pc void  dcmpl int pc void  dconst 0 int pc  _dcmpg _dcmpl _dconst_0
void  dcmpl int pc void  dconst 0 int pc void  dconst 1 int pc  _dcmpl _dconst_0 _dconst_1
void  dconst 0 int pc void  dconst 1 int pc void  ddiv int pc  _dconst_0 _dconst_1 _ddiv
void  dconst 1 int pc void  ddiv int pc void  dload int pc int index  _dconst_1 _ddiv _dload
void  ddiv int pc void  dload int pc int index void  dload 0 int pc  _ddiv _dload _dload_0
void  dload int pc int index void  dload 0 int pc void  dload 1 int pc  _dload _dload_0 _dload_1
void  dload 0 int pc void  dload 1 int pc void  dload 2 int pc  _dload_0 _dload_1 _dload_2
void  dload 1 int pc void  dload 2 int pc void  dload 3 int pc  _dload_1 _dload_2 _dload_3
void  dload 2 int pc void  dload 3 int pc void  dmul int pc  _dload_2 _dload_3 _dmul
void  dload 3 int pc void  dmul int pc void  dneg int pc  _dload_3 _dmul _dneg
void  dmul int pc void  dneg int pc void  drem int pc  _dmul _dneg _drem
void  dneg int pc void  drem int pc void  dreturn int pc  _dneg _drem _dreturn
void  drem int pc void  dreturn int pc void  dstore int pc int index  _drem _dreturn _dstore
void  dreturn int pc void  dstore int pc int index void  dstore 0 int pc  _dreturn _dstore _dstore_0
void  dstore int pc int index void  dstore 0 int pc void  dstore 1 int pc  _dstore _dstore_0 _dstore_1
void  dstore 0 int pc void  dstore 1 int pc void  dstore 2 int pc  _dstore_0 _dstore_1 _dstore_2
void  dstore 1 int pc void  dstore 2 int pc void  dstore 3 int pc  _dstore_1 _dstore_2 _dstore_3
void  dstore 2 int pc void  dstore 3 int pc void  dsub int pc  _dstore_2 _dstore_3 _dsub
void  dstore 3 int pc void  dsub int pc void  dup int pc  _dstore_3 _dsub _dup
void  dsub int pc void  dup int pc void  dup x1 int pc  _dsub _dup _dup_x1
void  dup int pc void  dup x1 int pc void  dup x2 int pc  _dup _dup_x1 _dup_x2
void  dup x1 int pc void  dup x2 int pc void  dup2 int pc  _dup_x1 _dup_x2 _dup2
void  dup x2 int pc void  dup2 int pc void  dup2 x1 int pc  _dup_x2 _dup2 _dup2_x1
void  dup2 int pc void  dup2 x1 int pc void  dup2 x2 int pc  _dup2 _dup2_x1 _dup2_x2
void  dup2 x1 int pc void  dup2 x2 int pc void  f2d int pc  _dup2_x1 _dup2_x2 _f2d
void  dup2 x2 int pc void  f2d int pc void  f2i int pc  _dup2_x2 _f2d _f2i
void  f2d int pc void  f2i int pc void  f2l int pc  _f2d _f2i _f2l
void  f2i int pc void  f2l int pc void  fadd int pc  _f2i _f2l _fadd
void  f2l int pc void  fadd int pc void  faload int pc  _f2l _fadd _faload
void  fadd int pc void  faload int pc void  fastore int pc  _fadd _faload _fastore
void  faload int pc void  fastore int pc void  fcmpg int pc  _faload _fastore _fcmpg
void  fastore int pc void  fcmpg int pc void  fcmpl int pc  _fastore _fcmpg _fcmpl
void  fcmpg int pc void  fcmpl int pc void  fconst 0 int pc  _fcmpg _fcmpl _fconst_0
void  fcmpl int pc void  fconst 0 int pc void  fconst 1 int pc  _fcmpl _fconst_0 _fconst_1
void  fconst 0 int pc void  fconst 1 int pc void  fconst 2 int pc  _fconst_0 _fconst_1 _fconst_2
void  fconst 1 int pc void  fconst 2 int pc void  fdiv int pc  _fconst_1 _fconst_2 _fdiv
void  fconst 2 int pc void  fdiv int pc void  fload int pc int index  _fconst_2 _fdiv _fload
void  fdiv int pc void  fload int pc int index void  fload 0 int pc  _fdiv _fload _fload_0
void  fload int pc int index void  fload 0 int pc void  fload 1 int pc  _fload _fload_0 _fload_1
void  fload 0 int pc void  fload 1 int pc void  fload 2 int pc  _fload_0 _fload_1 _fload_2
void  fload 1 int pc void  fload 2 int pc void  fload 3 int pc  _fload_1 _fload_2 _fload_3
void  fload 2 int pc void  fload 3 int pc void  fmul int pc  _fload_2 _fload_3 _fmul
void  fload 3 int pc void  fmul int pc void  fneg int pc  _fload_3 _fmul _fneg
void  fmul int pc void  fneg int pc void  frem int pc  _fmul _fneg _frem
void  fneg int pc void  frem int pc void  freturn int pc  _fneg _frem _freturn
void  frem int pc void  freturn int pc void  fstore int pc int index  _frem _freturn _fstore
void  freturn int pc void  fstore int pc int index void  fstore 0 int pc  _freturn _fstore _fstore_0
void  fstore int pc int index void  fstore 0 int pc void  fstore 1 int pc  _fstore _fstore_0 _fstore_1
void  fstore 0 int pc void  fstore 1 int pc void  fstore 2 int pc  _fstore_0 _fstore_1 _fstore_2
void  fstore 1 int pc void  fstore 2 int pc void  fstore 3 int pc  _fstore_1 _fstore_2 _fstore_3
void  fstore 2 int pc void  fstore 3 int pc void  fsub int pc  _fstore_2 _fstore_3 _fsub
void  fstore 3 int pc void  fsub int pc void  getfield int pc int index I Constant Pool Entry constant Fieldref  _fstore_3 _fsub _getfield IConstantPoolEntry constantFieldref
int index I Constant Pool Entry constant Fieldref void  getstatic int pc int index I Constant Pool Entry constant Fieldref  IConstantPoolEntry constantFieldref _getstatic IConstantPoolEntry constantFieldref
int index I Constant Pool Entry constant Fieldref void  goto int pc int branch Offset  IConstantPoolEntry constantFieldref _goto branchOffset
I Constant Pool Entry constant Fieldref void  goto int pc int branch Offset void  goto w int pc int branch Offset  IConstantPoolEntry constantFieldref _goto branchOffset _goto_w branchOffset
void  goto int pc int branch Offset void  goto w int pc int branch Offset void  i2b int pc  _goto branchOffset _goto_w branchOffset _i2b
void  goto w int pc int branch Offset void  i2b int pc void  i2c int pc  _goto_w branchOffset _i2b _i2c
void  i2b int pc void  i2c int pc void  i2d int pc  _i2b _i2c _i2d
void  i2c int pc void  i2d int pc void  i2f int pc  _i2c _i2d _i2f
void  i2d int pc void  i2f int pc void  i2l int pc  _i2d _i2f _i2l
void  i2f int pc void  i2l int pc void  i2s int pc  _i2f _i2l _i2s
void  i2l int pc void  i2s int pc void  iadd int pc  _i2l _i2s _iadd
void  i2s int pc void  iadd int pc void  iaload int pc  _i2s _iadd _iaload
void  iadd int pc void  iaload int pc void  iand int pc  _iadd _iaload _iand
void  iaload int pc void  iand int pc void  iastore int pc  _iaload _iand _iastore
void  iand int pc void  iastore int pc void  iconst m1 int pc  _iand _iastore _iconst_m1
void  iastore int pc void  iconst m1 int pc void  iconst 0 int pc  _iastore _iconst_m1 _iconst_0
void  iconst m1 int pc void  iconst 0 int pc void  iconst 1 int pc  _iconst_m1 _iconst_0 _iconst_1
void  iconst 0 int pc void  iconst 1 int pc void  iconst 2 int pc  _iconst_0 _iconst_1 _iconst_2
void  iconst 1 int pc void  iconst 2 int pc void  iconst 3 int pc  _iconst_1 _iconst_2 _iconst_3
void  iconst 2 int pc void  iconst 3 int pc void  iconst 4 int pc  _iconst_2 _iconst_3 _iconst_4
void  iconst 3 int pc void  iconst 4 int pc void  iconst 5 int pc  _iconst_3 _iconst_4 _iconst_5
void  iconst 4 int pc void  iconst 5 int pc void  idiv int pc  _iconst_4 _iconst_5 _idiv
void  iconst 5 int pc void  idiv int pc void  if acmpeq int pc int branch Offset  _iconst_5 _idiv _if_acmpeq branchOffset
void  idiv int pc void  if acmpeq int pc int branch Offset void  if acmpne int pc int branch Offset  _idiv _if_acmpeq branchOffset _if_acmpne branchOffset
void  if acmpeq int pc int branch Offset void  if acmpne int pc int branch Offset void  if icmpeq int pc int branch Offset  _if_acmpeq branchOffset _if_acmpne branchOffset _if_icmpeq branchOffset
void  if acmpne int pc int branch Offset void  if icmpeq int pc int branch Offset void  if icmpne int pc int branch Offset  _if_acmpne branchOffset _if_icmpeq branchOffset _if_icmpne branchOffset
void  if icmpeq int pc int branch Offset void  if icmpne int pc int branch Offset void  if icmplt int pc int branch Offset  _if_icmpeq branchOffset _if_icmpne branchOffset _if_icmplt branchOffset
void  if icmpne int pc int branch Offset void  if icmplt int pc int branch Offset void  if icmpge int pc int branch Offset  _if_icmpne branchOffset _if_icmplt branchOffset _if_icmpge branchOffset
void  if icmplt int pc int branch Offset void  if icmpge int pc int branch Offset void  if icmpgt int pc int branch Offset  _if_icmplt branchOffset _if_icmpge branchOffset _if_icmpgt branchOffset
void  if icmpge int pc int branch Offset void  if icmpgt int pc int branch Offset void  if icmple int pc int branch Offset  _if_icmpge branchOffset _if_icmpgt branchOffset _if_icmple branchOffset
void  if icmpgt int pc int branch Offset void  if icmple int pc int branch Offset void  ifeq int pc int branch Offset  _if_icmpgt branchOffset _if_icmple branchOffset _ifeq branchOffset
void  if icmple int pc int branch Offset void  ifeq int pc int branch Offset void  ifne int pc int branch Offset  _if_icmple branchOffset _ifeq branchOffset _ifne branchOffset
void  ifeq int pc int branch Offset void  ifne int pc int branch Offset void  iflt int pc int branch Offset  _ifeq branchOffset _ifne branchOffset _iflt branchOffset
void  ifne int pc int branch Offset void  iflt int pc int branch Offset void  ifge int pc int branch Offset  _ifne branchOffset _iflt branchOffset _ifge branchOffset
void  iflt int pc int branch Offset void  ifge int pc int branch Offset void  ifgt int pc int branch Offset  _iflt branchOffset _ifge branchOffset _ifgt branchOffset
void  ifge int pc int branch Offset void  ifgt int pc int branch Offset void  ifle int pc int branch Offset  _ifge branchOffset _ifgt branchOffset _ifle branchOffset
void  ifgt int pc int branch Offset void  ifle int pc int branch Offset void  ifnonnull int pc int branch Offset  _ifgt branchOffset _ifle branchOffset _ifnonnull branchOffset
void  ifle int pc int branch Offset void  ifnonnull int pc int branch Offset void  ifnull int pc int branch Offset  _ifle branchOffset _ifnonnull branchOffset _ifnull branchOffset
void  ifnonnull int pc int branch Offset void  ifnull int pc int branch Offset void  iinc int pc int index int  const  _ifnonnull branchOffset _ifnull branchOffset _iinc _const
void  ifnull int pc int branch Offset void  iinc int pc int index int  const void  iload int pc int index  _ifnull branchOffset _iinc _const _iload
void  iinc int pc int index int  const void  iload int pc int index void  iload 0 int pc  _iinc _const _iload _iload_0
void  iload int pc int index void  iload 0 int pc void  iload 1 int pc  _iload _iload_0 _iload_1
void  iload 0 int pc void  iload 1 int pc void  iload 2 int pc  _iload_0 _iload_1 _iload_2
void  iload 1 int pc void  iload 2 int pc void  iload 3 int pc  _iload_1 _iload_2 _iload_3
void  iload 2 int pc void  iload 3 int pc void  imul int pc  _iload_2 _iload_3 _imul
void  iload 3 int pc void  imul int pc void  ineg int pc  _iload_3 _imul _ineg
void  imul int pc void  ineg int pc void  instanceof int pc int index I Constant Pool Entry constant Class  _imul _ineg _instanceof IConstantPoolEntry constantClass
I Constant Pool Entry constant Class void  invokeinterface int pc int index byte nargs  IConstantPoolEntry constantClass _invokeinterface
byte nargs I Constant Pool Entry constant Interface Methodref void  invokespecial int pc int index I Constant Pool Entry constant Methodref  IConstantPoolEntry constantInterfaceMethodref _invokespecial IConstantPoolEntry constantMethodref
int index I Constant Pool Entry constant Methodref void  invokestatic int pc int index I Constant Pool Entry constant Methodref  IConstantPoolEntry constantMethodref _invokestatic IConstantPoolEntry constantMethodref
int index I Constant Pool Entry constant Methodref void  invokevirtual int pc int index I Constant Pool Entry constant Methodref  IConstantPoolEntry constantMethodref _invokevirtual IConstantPoolEntry constantMethodref
int index I Constant Pool Entry constant Methodref void  ior int pc  IConstantPoolEntry constantMethodref _ior
I Constant Pool Entry constant Methodref void  ior int pc void  irem int pc  IConstantPoolEntry constantMethodref _ior _irem
void  ior int pc void  irem int pc void  ireturn int pc  _ior _irem _ireturn
void  irem int pc void  ireturn int pc void  ishl int pc  _irem _ireturn _ishl
void  ireturn int pc void  ishl int pc void  ishr int pc  _ireturn _ishl _ishr
void  ishl int pc void  ishr int pc void  istore int pc int index  _ishl _ishr _istore
void  ishr int pc void  istore int pc int index void  istore 0 int pc  _ishr _istore _istore_0
void  istore int pc int index void  istore 0 int pc void  istore 1 int pc  _istore _istore_0 _istore_1
void  istore 0 int pc void  istore 1 int pc void  istore 2 int pc  _istore_0 _istore_1 _istore_2
void  istore 1 int pc void  istore 2 int pc void  istore 3 int pc  _istore_1 _istore_2 _istore_3
void  istore 2 int pc void  istore 3 int pc void  isub int pc  _istore_2 _istore_3 _isub
void  istore 3 int pc void  isub int pc void  iushr int pc  _istore_3 _isub _iushr
void  isub int pc void  iushr int pc void  ixor int pc  _isub _iushr _ixor
void  iushr int pc void  ixor int pc void  jsr int pc int branch Offset  _iushr _ixor _jsr branchOffset
void  ixor int pc void  jsr int pc int branch Offset void  jsr w int pc int branch Offset  _ixor _jsr branchOffset _jsr_w branchOffset
void  jsr int pc int branch Offset void  jsr w int pc int branch Offset void  l2d int pc  _jsr branchOffset _jsr_w branchOffset _l2d
void  jsr w int pc int branch Offset void  l2d int pc void  l2f int pc  _jsr_w branchOffset _l2d _l2f
void  l2d int pc void  l2f int pc void  l2i int pc  _l2d _l2f _l2i
void  l2f int pc void  l2i int pc void  ladd int pc  _l2f _l2i _ladd
void  l2i int pc void  ladd int pc void  laload int pc  _l2i _ladd _laload
void  ladd int pc void  laload int pc void  land int pc  _ladd _laload _land
void  laload int pc void  land int pc void  lastore int pc  _laload _land _lastore
void  land int pc void  lastore int pc void  lcmp int pc  _land _lastore _lcmp
void  lastore int pc void  lcmp int pc void  lconst 0 int pc  _lastore _lcmp _lconst_0
void  lcmp int pc void  lconst 0 int pc void  lconst 1 int pc  _lcmp _lconst_0 _lconst_1
void  lconst 0 int pc void  lconst 1 int pc void  ldc int pc int index I Constant Pool Entry constant Pool Entry  _lconst_0 _lconst_1 _ldc IConstantPoolEntry constantPoolEntry
void  lconst 1 int pc void  ldc int pc int index I Constant Pool Entry constant Pool Entry void  ldc w int pc int index I Constant Pool Entry constant Pool Entry  _lconst_1 _ldc IConstantPoolEntry constantPoolEntry _ldc_w IConstantPoolEntry constantPoolEntry
void  ldc int pc int index I Constant Pool Entry constant Pool Entry void  ldc w int pc int index I Constant Pool Entry constant Pool Entry void  ldc2 w int pc int index I Constant Pool Entry constant Pool Entry  _ldc IConstantPoolEntry constantPoolEntry _ldc_w IConstantPoolEntry constantPoolEntry _ldc2_w IConstantPoolEntry constantPoolEntry
void  ldc w int pc int index I Constant Pool Entry constant Pool Entry void  ldc2 w int pc int index I Constant Pool Entry constant Pool Entry void  ldiv int pc  _ldc_w IConstantPoolEntry constantPoolEntry _ldc2_w IConstantPoolEntry constantPoolEntry _ldiv
void  ldc2 w int pc int index I Constant Pool Entry constant Pool Entry void  ldiv int pc void  lload int pc int index  _ldc2_w IConstantPoolEntry constantPoolEntry _ldiv _lload
void  ldiv int pc void  lload int pc int index void  lload 0 int pc  _ldiv _lload _lload_0
void  lload int pc int index void  lload 0 int pc void  lload 1 int pc  _lload _lload_0 _lload_1
void  lload 0 int pc void  lload 1 int pc void  lload 2 int pc  _lload_0 _lload_1 _lload_2
void  lload 1 int pc void  lload 2 int pc void  lload 3 int pc  _lload_1 _lload_2 _lload_3
void  lload 2 int pc void  lload 3 int pc void  lmul int pc  _lload_2 _lload_3 _lmul
void  lload 3 int pc void  lmul int pc void  lneg int pc  _lload_3 _lmul _lneg
void  lneg int pc void  lookupswitch int pc int defaultoffset int npairs  _lneg _lookupswitch
int npairs int offset pairs void  lor int pc  offset_pairs _lor
int offset pairs void  lor int pc void  lrem int pc  offset_pairs _lor _lrem
void  lor int pc void  lrem int pc void  lreturn int pc  _lor _lrem _lreturn
void  lrem int pc void  lreturn int pc void  lshl int pc  _lrem _lreturn _lshl
void  lreturn int pc void  lshl int pc void  lshr int pc  _lreturn _lshl _lshr
void  lshl int pc void  lshr int pc void  lstore int pc int index  _lshl _lshr _lstore
void  lshr int pc void  lstore int pc int index void  lstore 0 int pc  _lshr _lstore _lstore_0
void  lstore int pc int index void  lstore 0 int pc void  lstore 1 int pc  _lstore _lstore_0 _lstore_1
void  lstore 0 int pc void  lstore 1 int pc void  lstore 2 int pc  _lstore_0 _lstore_1 _lstore_2
void  lstore 1 int pc void  lstore 2 int pc void  lstore 3 int pc  _lstore_1 _lstore_2 _lstore_3
void  lstore 2 int pc void  lstore 3 int pc void  lsub int pc  _lstore_2 _lstore_3 _lsub
void  lstore 3 int pc void  lsub int pc void  lushr int pc  _lstore_3 _lsub _lushr
void  lsub int pc void  lushr int pc void  lxor int pc  _lsub _lushr _lxor
void  lushr int pc void  lxor int pc void  monitorenter int pc  _lushr _lxor _monitorenter
void  lxor int pc void  monitorenter int pc void  monitorexit int pc  _lxor _monitorenter _monitorexit
void  monitorexit int pc void  multianewarray int pc int index int dimensions  _monitorexit _multianewarray
int dimensions I Constant Pool Entry constant Class void  new int pc int index I Constant Pool Entry constant Class  IConstantPoolEntry constantClass _new IConstantPoolEntry constantClass
int index I Constant Pool Entry constant Class void  newarray int pc int atype  IConstantPoolEntry constantClass _newarray
I Constant Pool Entry constant Class void  newarray int pc int atype void  nop int pc  IConstantPoolEntry constantClass _newarray _nop
void  newarray int pc int atype void  nop int pc void  pop int pc  _newarray _nop _pop
void  nop int pc void  pop int pc void  pop2 int pc  _nop _pop _pop2
void  pop int pc void  pop2 int pc void  putfield int pc int index I Constant Pool Entry constant Fieldref  _pop _pop2 _putfield IConstantPoolEntry constantFieldref
int index I Constant Pool Entry constant Fieldref void  putstatic int pc int index I Constant Pool Entry constant Fieldref  IConstantPoolEntry constantFieldref _putstatic IConstantPoolEntry constantFieldref
int index I Constant Pool Entry constant Fieldref void  ret int pc int index  IConstantPoolEntry constantFieldref _ret
I Constant Pool Entry constant Fieldref void  ret int pc int index void  return int pc  IConstantPoolEntry constantFieldref _ret _return
void  ret int pc int index void  return int pc void  saload int pc  _ret _return _saload
void  return int pc void  saload int pc void  sastore int pc  _return _saload _sastore
void  saload int pc void  sastore int pc void  sipush int pc short value  _saload _sastore _sipush
void  sastore int pc void  sipush int pc short value void  swap int pc  _sastore _sipush _swap
void  swap int pc void  tableswitch int pc int defaultoffset int low int high  _swap _tableswitch
int high int jump offsets void  wide int pc int opcode int index  jump_offsets _wide
int index void  wide int pc int iincopcode int index  _wide
int index int  const void  breakpoint int pc  _const _breakpoint
int  const void  breakpoint int pc void  impdep1 int pc  _const _breakpoint _impdep1
void  breakpoint int pc void  impdep1 int pc void  impdep2 int pc  _breakpoint _impdep1 _impdep2

Answer back the attribute name index in the constant pool as specified in the JVM specifications return the attribute name index in the constant pool 
Answer back the attribute name as specified in the JVM specifications return the attribute name 
Answer back the attribute length as specified in the JVM specifications return the attribute length 

int DEFAULT 2 Answers back the disassembled string of the I Class File Reader using the default mode This is an output quite similar to the javap tool using DEFAULT mode param class File Reader The class File Reader to be disassembled param line Separator the line separator to use return the disassembled string of the I Class File Reader using the default mode  IClassFileReader classFileReader classFileReader lineSeparator IClassFileReader
Answers back the disassembled string of the I Class File Reader according to the mode This is an output quite similar to the javap tool param class File Reader The class File Reader to be disassembled param line Separator the line separator to use param mode the mode used to disassemble the I Class File Reader return the disassembled string of the I Class File Reader according to the mode  IClassFileReader classFileReader classFileReader lineSeparator IClassFileReader IClassFileReader

Answer back the access flag of the class file return the access flag of the class file 
Answer back the array of field infos of the class file an empty array if none return the array of field infos of the class file an empty array if none 
Answer back the names of interfaces implemented by this class file an empty array if none The names are returned as described in the JVM specifications return the names of interfaces implemented by this class file an empty array if none 
Answer back the indexes in the constant pool of interfaces implemented by this class file an empty array if none return the indexes in the constant pool of interfaces implemented by this class file an empty array if none 
Answer back the inner classes attribute of this class file null if none return the inner classes attribute of this class file null if none 
Answer back the array of method infos of this class file an empty array if none return the array of method infos of this class file an empty array if none 
Answer back the qualified name of the class file The name is returned as described in the JVM specifications return the qualified name of the class file 
Answer back the index of the class name in the constant pool of the class file return the index of the class name in the constant pool 
Answer back the qualified name of the superclass of this class file The name is returned as described in the JVM specifications Answer null if get Superclass Index is zero return the qualified name of the superclass of this class file null if get Superclass Index is zero  getSuperclassIndex getSuperclassIndex
Answer back the index of the superclass name in the constant pool of the class file Answer 0 if this class file represents java lang Object return the index of the superclass name in the constant pool of the class file 0 if this class file represents java lang Object 
Answer true if this class file represents an class false otherwise return true if this class file represents an class false otherwise 
Answer true if this class file represents an interface false otherwise return true if this class file represents an interface false otherwise 
Answer the source file attribute if it exists null otherwise return the source file attribute if it exists null otherwise 
Answer the constant pool of this class file return the constant pool of this class file 
Answer the minor version of this class file return the minor version of this class file 
Answer the major version of this class file return the major version of this class file 
Answer back the attribute number of the class file return the attribute number of the class file 
Answer back the collection of all attributes of the field info It includes Synthetic Attribute Constant Value Attributes etc Answers an empty array if none return the collection of all attributes of the field info It includes Synthetic Attribute Constant Value Attributes etc Answers an empty array if none  SyntheticAttribute ConstantValueAttributes SyntheticAttribute ConstantValueAttributes
Answer back the magic number return the magic number 
Answer back the number of field infos return the number of field infos 
Answer back the number of method infos return the number of method infos 

public interface I Code Attribute extends I Class File Attribute Answer back the max locals value of the code attribute return the max locals value of the code attribute  ICodeAttribute IClassFileAttribute
Answer back the max stack value of the code attribute return the max stack value of the code attribute 
Answer back the line number attribute if it exists null otherwise return the line number attribute if it exists null otherwise 
Answer back the local variable attribute if it exists null otherwise return the local variable attribute if it exists null otherwise 
Answer back the array of exception entries if they are present An empty array otherwise return the array of exception entries if they are present An empty array otherwise 
Answer back the array of bytes which represents all the opcodes as described in the JVM specifications return the array of bytes which represents all the opcodes as described in the JVM specifications 
Answer back the length of the bytecode contents return the length of the bytecode contents 
Answer back the attribute number of the code attribute return the attribute number of the code attribute 
Answer back the collection of all attributes of the field info It includes the Line Number Attribute and the Local Variable Table Attribute Returns an empty collection if none return the collection of all attributes of the field info It includes the Line Number Attribute and the Local Variable Table Attribute Returns an empty collection if none  LineNumberAttribute LocalVariableTableAttribute LineNumberAttribute LocalVariableTableAttribute
Answer back the exception table length of the code attribute return the exception table length of the code attribute 
Define a Java opcodes walker All actions are defined in the visitor param visitor The visitor to use to walk the opcodes exception Class Format Exception Exception thrown if the opcodes contain invalid bytes  ClassFormatException

Answer back the number of entries in the constant pool return the number of entries in the constant pool 
Answer back the type of the entry at the index index in the constant pool param index the index of the entry in the constant pool return the type of the entry at the index index in the constant pool 
Answer back the entry at the index index in the constant pool param index the index of the entry in the constant pool return the entry at the index index in the constant pool 

Answer back the type of this entry return the type of this entry 
Answer back the name index for a CONSTANT Class type entry return the name index for a CONSTANT Class type entry  CONSTANT_Class CONSTANT_Class
Answer back the class index for a CONSTANT Fieldref CONSTANT Methodref CONSTANT InterfaceMethodref type entry return the class index for a CONSTANT Fieldref CONSTANT Methodref CONSTANT InterfaceMethodref type entry  CONSTANT_Fieldref CONSTANT_Methodref CONSTANT_InterfaceMethodref CONSTANT_Fieldref CONSTANT_Methodref CONSTANT_InterfaceMethodref
Answer back the name And Type index for a CONSTANT Fieldref CONSTANT Methodref CONSTANT InterfaceMethodref type entry return the name And Type index for a CONSTANT Fieldref CONSTANT Methodref CONSTANT InterfaceMethodref type entry  nameAndType CONSTANT_Fieldref CONSTANT_Methodref CONSTANT_InterfaceMethodref nameAndType CONSTANT_Fieldref CONSTANT_Methodref CONSTANT_InterfaceMethodref
Answer back the string index for a CONSTANT String type entry return the string index for a CONSTANT String type entry  CONSTANT_String CONSTANT_String
Answer back the string value for a CONSTANT String type entry return the string value for a CONSTANT String type entry  CONSTANT_String CONSTANT_String
Answer back the integer value for a CONSTANT Integer type entry return the integer value for a CONSTANT Integer type entry  CONSTANT_Integer CONSTANT_Integer
Answer back the float value for a CONSTANT Float type entry return the float value for a CONSTANT Float type entry  CONSTANT_Float CONSTANT_Float
Answer back the double value for a CONSTANT Double type entry return the double value for a CONSTANT Double type entry  CONSTANT_Double CONSTANT_Double
Answer back the long value for a CONSTANT Long type entry return the long value for a CONSTANT Long type entry  CONSTANT_Long CONSTANT_Long
Answer back the descriptor index for a CONSTANT NameAndType type entry return the descriptor index for a CONSTANT NameAndType type entry  CONSTANT_NameAndType CONSTANT_NameAndType
Answer back the name index for a CONSTANT NameAndType type entry return the name index for a CONSTANT NameAndType type entry  CONSTANT_NameAndType CONSTANT_NameAndType
Answer back the class name for a CONSTANT Class type entry return the class name for a CONSTANT Class type entry  CONSTANT_Class CONSTANT_Class
Answer back the class name for a CONSTANT Fieldref CONSTANT Methodref CONSTANT InterfaceMethodref type entry return the class name for a CONSTANT Fieldref CONSTANT Methodref CONSTANT InterfaceMethodref type entry  CONSTANT_Fieldref CONSTANT_Methodref CONSTANT_InterfaceMethodref CONSTANT_Fieldref CONSTANT_Methodref CONSTANT_InterfaceMethodref
Answer back the field name for a CONSTANT Fieldref type entry return the field name for a CONSTANT Fieldref type entry  CONSTANT_Fieldref CONSTANT_Fieldref
Answer back the field name for a CONSTANT Methodref or CONSTANT InterfaceMethodred type entry return the field name for a CONSTANT Methodref or CONSTANT InterfaceMethodred type entry  CONSTANT_Methodref CONSTANT_InterfaceMethodred CONSTANT_Methodref CONSTANT_InterfaceMethodred
Answer back the field descriptor value for a CONSTANT Fieldref type entry This value is set only when decoding the CONSTANT Fieldref entry return the field descriptor value for a CONSTANT Fieldref type entry This value is set only when decoding the CONSTANT Fieldref entry  CONSTANT_Fieldref CONSTANT_Fieldref CONSTANT_Fieldref CONSTANT_Fieldref
Answer back the method descriptor value for a CONSTANT Methodref or CONSTANT InterfaceMethodref type entry This value is set only when decoding the CONSTANT Methodref or CONSTANT InterfaceMethodref entry return the method descriptor value for a CONSTANT Methodref or CONSTANT InterfaceMethodref type entry This value is set only when decoding the CONSTANT Methodref or CONSTANT InterfaceMethodref entry  CONSTANT_Methodref CONSTANT_InterfaceMethodref CONSTANT_Methodref CONSTANT_InterfaceMethodref CONSTANT_Methodref CONSTANT_InterfaceMethodref CONSTANT_Methodref CONSTANT_InterfaceMethodref
Answer back the utf8 value for a CONSTANT Utf8 type entry This value is set only when decoding a UTF8 entry return the utf8 value for a CONSTANT Utf8 type entry This value is set only when decoding a UTF8 entry  CONSTANT_Utf8 CONSTANT_Utf8
Answer back the utf8 length for a CONSTANT Utf8 type entry This value is set only when decoding a UTF8 entry return the utf8 length for a CONSTANT Utf8 type entry This value is set only when decoding a UTF8 entry  CONSTANT_Utf8 CONSTANT_Utf8

Answer back the constant value index return the constant value index 
Answer back the constant pool entry that represents the constant value of this attribute return the constant pool entry that represents the constant value of this attribute 

Answer back the enclosing class name as specified in the JVM specifications return the enclosing class name as specified in the JVM specifications 
Answer back the enclosing class name index return the enclosing class name index 
Answer back the method descriptor of the enclosing method as specified in the JVM specifications return the method descriptor of the enclosing method as specified in the JVM specifications 
Answer back the descriptor index of the enclosing method return the descriptor index of the enclosing method 
Answer back the name of the enclosing method as specified in the JVM specifications return the name of the enclosing method as specified in the JVM specifications 
Answer back the name index of the enclosing method return the name index of the enclosing method 
Answer back the name and type index of this attribute return the name and type index of this attribute 

Answer back the number of exceptions of the exception attribute return the number of exceptions of the exception attribute 
Answer back the exception names of the exception attribute Answers an empty collection if none return the exception names of the exception attribute Answers an empty collection if none 
Answer back the exception indexes of the exception attribute Answers an empty collection if none return the exception indexes of the exception attribute Answers an empty collection if none 

Answer back the start pc of this entry return the start pc of this entry 
Answer back the end pc of this entry return the end pc of this entry 
Answer back the handler pc of this entry return the handler pc of this entry 
Answer back the catch type index in the constant pool return the catch type index in the constant pool 
Answer back the catch type name null if get Catch Type Index returns 0 This is the case for any exception handler return the catch type name null if get Catch Type Index returns 0 This is the case for any exception handler  getCatchTypeIndex getCatchTypeIndex

Answer back the constant value attribute of this field info if specified null otherwise return the constant value attribute of this field info if specified null otherwise 
Answer back the access flag of this field info return the access flag of this field info 
Answer back the name of this field info The name is returned as specified in the JVM specifications return the name of this field info The name is returned as specified in the JVM specifications 
Answer back the name index of this field info return the name index of this field info 
Answer back the descriptor of this field info The descriptor is returned as specified in the JVM specifications return the descriptor of this field info The descriptor is returned as specified in the JVM specifications 
Answer back the descriptor index of this field info return the descriptor index of this field info 
Return true if the field info has a constant value attribute false otherwise return true if the field info has a constant value attribute false otherwise 
Return true if the field info is synthetic according to the JVM specification false otherwise p Note that prior to JDK 1 5 synthetic fields were always marked using an attribute with 1 5 synthetic fields can also be marked using the link I Modifier Constants ACC SYNTHETIC flag p return true if the field info is synthetic according to the JVM specification false otherwise  IModifierConstants ACC_SYNTHETIC
Return true if the field info has a deprecated attribute false otherwise return true if the field info has a deprecated attribute false otherwise 
Answer back the attribute number of the field info return the attribute number of the field info 
Answer back the collection of all attributes of the field info It includes Synthetic Attribute Constant Value Attributes etc Returns an empty collection if none return the collection of all attributes of the field info It includes Synthetic Attribute Constant Value Attributes etc Returns an empty collection if none  SyntheticAttribute ConstantValueAttributes SyntheticAttribute ConstantValueAttributes

Answer back the number of inner classes infos as specified in the JVM specifications return the number of inner classes infos as specified in the JVM specifications 
Answer back the array of inner attribute entries as specified in the JVM specifications or an empty array if none return the array of inner attribute entries as specified in the JVM specifications or an empty array if none 

Answer back the access flag of this inner classes attribute as specified in the JVM specifications return the access flag of this inner classes attribute as specified in the JVM specifications 
Answer back the inner name index of this inner classes attribute as specified in the JVM specifications return the inner name index of this inner classes attribute as specified in the JVM specifications 
Answer back the outer class name index of this inner classes attribute as specified in the JVM specifications return the outer class name index of this inner classes attribute as specified in the JVM specifications 
Answer back the inner class name index of this inner classes attribute as specified in the JVM specifications return the inner class name index of this inner classes attribute as specified in the JVM specifications 
Answer back the inner name of this inner classes attribute as specified in the JVM specifications null if inner name index is equals to zero return the inner name of this inner classes attribute as specified in the JVM specifications null if inner name index is equals to zero 
Answer back the outer class name of this inner classes attribute as specified in the JVM specifications null if outer class name index is equals to zero return the outer class name of this inner classes attribute as specified in the JVM specifications null if outer class name index is equals to zero 
Answer back the inner class name of this inner classes attribute as specified in the JVM specifications null if inner class name index is equals to zero return the inner class name of this inner classes attribute as specified in the JVM specifications null if inner class name index is equals to zero 

Answer back the line number table length as specified in the JVM specifications return the line number table length as specified in the JVM specifications 
Answer back the array of pairs start pc line number as specified in the JVM specifications Answer an empty array if none return the array of pairs start pc line number as specified in the JVM specifications Answer an empty array if none 

Answer back the local variable table length of this entry as specified in the JVM specifications return the local variable table length of this entry as specified in the JVM specifications 
Answer back the local variable table of this entry as specified in the JVM specifications Answer an empty array if none return the local variable table of this entry as specified in the JVM specifications Answer an empty array if none 

Answer back the start pc of this entry as specified in the JVM specifications return the start pc of this entry as specified in the JVM specifications 
Answer back the length of this entry as specified in the JVM specifications return the length of this entry as specified in the JVM specifications 
Answer back the name index in the constant pool of this entry as specified in the JVM specifications return the name index in the constant pool of this entry as specified in the JVM specifications 
Answer back the descriptor index in the constant pool of this entry as specified in the JVM specifications return the descriptor index in the constant pool of this entry as specified in the JVM specifications 
Answer back the index of this entry as specified in the JVM specifications return the index of this entry as specified in the JVM specifications 
Answer back the name of this entry as specified in the JVM specifications return the name of this entry as specified in the JVM specifications 
Answer back the descriptor of this entry as specified in the JVM specifications return the descriptor of this entry as specified in the JVM specifications 

Answer back the local variable type table length of this entry as specified in the JVM specifications return the local variable type table length of this entry as specified in the JVM specifications 
Answer back the local variable type table of this entry as specified in the JVM specifications Answer an empty array if none return the local variable type table of this entry as specified in the JVM specifications Answer an empty array if none 

Answer back the start pc of this entry as specified in the JVM specifications return the start pc of this entry as specified in the JVM specifications 
Answer back the length of this entry as specified in the JVM specifications return the length of this entry as specified in the JVM specifications 
Answer back the name index in the constant pool of this entry as specified in the JVM specifications return the name index in the constant pool of this entry as specified in the JVM specifications 
Answer back the signature index in the constant pool of this entry as specified in the JVM specifications return the signature index in the constant pool of this entry as specified in the JVM specifications 
Answer back the index of this entry as specified in the JVM specifications return the index of this entry as specified in the JVM specifications 
Answer back the name of this entry as specified in the JVM specifications return the name of this entry as specified in the JVM specifications 
Answer back the signature of this entry as specified in the JVM specifications return the signature of this entry as specified in the JVM specifications 

Answer back the method descriptor of this method info as specified in the JVM specifications return the method descriptor of this method info as specified in the JVM specifications 
Answer back the descriptor index of this method info return the descriptor index of this method info 
Answer back the access flags of this method info as specified in the JVM specifications return the access flags of this method info as specified in the JVM specifications 
Answer back the name of this method info as specified in the JVM specifications return the name of this method info as specified in the JVM specifications 
Answer back the name index of this method info return the name index of this method info 
Answer true if this method info represents a lt clinit gt method false otherwise return true if this method info represents a lt clinit gt method false otherwise 
Answer true if this method info represents a constructor false otherwise return true if this method info represents a constructor false otherwise 
Return true if the method info is synthetic according to the JVM specification false otherwise p Note that prior to JDK 1 5 synthetic fields were always marked using an attribute with 1 5 synthetic fields can also be marked using the link I Modifier Constants ACC SYNTHETIC flag p return true if the method info is synthetic according to the JVM specification false otherwise  IModifierConstants ACC_SYNTHETIC
Answer true if this method info has a deprecated attribute false otherwise return true if this method info has a deprecated attribute false otherwise 
Answer the code attribute of this method info null if none or if the decoding flag doesn t include METHOD BODIES return the code attribute of this method info null if none or if the decoding flag doesn t include METHOD BODIES  METHOD_BODIES METHOD_BODIES
Answer the exception attribute of this method info null is none return the exception attribute of this method info null is none 
Answer back the attribute number of the method info It includes the Code Attribute if any even if the decoding flags doesn t include METHOD BODIES return the attribute number of the method info It includes the Code Attribute if any even if the decoding flags doesn t include METHOD BODIES  CodeAttribute METHOD_BODIES CodeAttribute METHOD_BODIES
Answer back the collection of all attributes of the method info It includes Synthetic Attribute Code Attributes etc It doesn t include the Code Attribute if the decoding flags doesn t include METHOD BODIES Returns an empty collection if none return the collection of all attributes of the method info It includes Synthetic Attribute Code Attributes etc It doesn t include the Code Attribute if the decoding flags doesn t include METHOD BODIES Returns an empty collection if none  SyntheticAttribute CodeAttributes CodeAttribute METHOD_BODIES SyntheticAttribute CodeAttributes CodeAttribute METHOD_BODIES

Answer back the number of annotations as described in the JVM specifications return the number of annotations 
Answer back the annotations as described in the JVM specifications Answers an empty collection if none return the annotations 

Answer back the number of annotations as described in the JVM specifications return the number of annotations 
Answer back the annotations Answers an empty collection if none return the annotations 

Answer back the number of parameters as described in the JVM specifications return the number of parameters 
Answer back the parameter annotations Answers an empty collection if none return the parameter annotations Answers an empty collection if none 

Answer back the number of annotations as described in the JVM specifications return the number of annotations 
Answer back the annotations Answers an empty collection if none return the annotations Answers an empty collection if none 

Answer back the number of parameters as described in the JVM specifications return the number of parameters 
Answer back the parameter annotations Answers an empty collection if none return the parameter annotations Answers an empty collection if none 

Answer back the signature index as described in the JVM specifications return the signature index as described in the JVM specifications 
Answer back the signature as described in the JVM specifications return the signature as described in the JVM specifications 

Answer back the source file index of this attribute return the source file index of this attribute 
Answer back the source file name of this attribute return the source file name of this attribute 

public interface I Verification Type Info Answer back the tag of this verification type info as described in the JVM specifications ul li 0 for the top type li li 1 for the int type li li 2 for the float type li li 3 for the double type li li 4 for the long type li li 5 for the null type li li 6 for the uninitialized this type li li 7 for the object type li li 8 for the uninitialized offset type li ul return the tag of this verification type info as described in the JVM specifications since 3 0  IVerificationTypeInfo
Answer back the offset of this verification type info as described in the JVM specifications This makes sense only if the tag is 8 return the offset of this verification type info as described in the JVM specifications since 3 0 
Answer back the constant pool index of this verification type info as described in the JVM specifications This makes sense only if the tag is 7 return the constant pool index of this verification type info as described in the JVM specifications since 3 0 
Answer back the name of the class type referenced by the index in the constant pool as described in the JVM specifications This makes sense only if the tag is 7 return the name of the class type referenced by the index in the constant pool as described in the JVM specifications since 3 0 

Sets the buffer provider of the primary working copy owner Note that even if the buffer provider is a working copy owner only its code create Buffer I Compilation Unit code method is used by the primary working copy owner It doesn t replace the internal primary working owner p This method is for internal use by the jdt related plug ins Clients outside of the jdt should not reference this method p param primary Buffer Provider the primary buffer provider public static void set Primary Buffer Provider Working Copy Owner primary Buffer Provider Default Working Copy Owner PRIMARY primary Buffer Provider primary Buffer Provider  createBuffer ICompilationUnit primaryBufferProvider setPrimaryBufferProvider WorkingCopyOwner primaryBufferProvider DefaultWorkingCopyOwner primaryBufferProvider primaryBufferProvider
Creates a buffer for the given working copy The new buffer will be initialized with the contents of the underlying file if and only if it was not already initialized by the compilation owner a buffer is uninitialized if its content is code null code p Note This buffer will be associated to the working copy for its entire life cycle Another working copy on same unit but owned by a different owner would not share the same buffer unless its owner decided to implement such a sharing behaviour p param working Copy the working copy of the buffer return I Buffer the created buffer for the given working copy see I Buffer public I Buffer create Buffer I Compilation Unit working Copy return Buffer Manager get Default Buffer Manager create Buffer working Copy  workingCopy IBuffer IBuffer IBuffer createBuffer ICompilationUnit workingCopy BufferManager getDefaultBufferManager createBuffer workingCopy

Runs this evaluation in the specified thread reporting progress to the given progress monitor param thread the thread in which to run the evaluation param monitor progress monitor may be code null code exception Debug Exception if an exception occurs during the evaluation  DebugException

Returns the values contained in this array return the values contained in this array exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException
Returns the value at the given index in this array param index the index of the value to return return the value at the given index exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul exception java lang Index Out Of Bounds Exception if the index is not within the bounds of this array  DebugException DebugException IndexOutOfBoundsException
Returns the length of this array return the length of this array exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException
Sets the value at the given index to the specified value param index the index at which to assign a new value param value the new value exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li The given value is not compatible with the type of this array li ul exception java lang Index Out Of Bounds Exception if the index is not within the bounds of this array  DebugException DebugException IndexOutOfBoundsException

Returns a new instance of an array of this type with the specified length param size the length of the new array return a new array of the specified length exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException
Returns the type of the elements in this array return type exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The exception s status code contains the underlying exception responsible for the failure li ul  DebugException

Returns whether this breakpoint is installed in at least one debug target return whether this breakpoint is installed exception Core Exception if unable to access the property on this breakpoint s underlying marker  CoreException
public boolean is Installed throws Core Exception Returns the fully qualified name of the type this breakpoint is located in or code null code if this breakpoint is not located in a specific type for example a pattern breakpoint return the fully qualified name of the type this breakpoint is located in or code null code exception Core Exception if unable to access the property from this breakpoint s underlying marker  isInstalled CoreException CoreException
public String get Type Name throws Core Exception Returns this breakpoint s hit count or 1 if this breakpoint does not have a hit count return this breakpoint s hit count or 1 exception Core Exception if unable to access the property from this breakpoint s underlying marker  getTypeName CoreException CoreException
public int get Hit Count throws Core Exception Sets the hit count attribute of this breakpoint If this breakpoint is currently disabled and the hit count is set greater than 1 this breakpoint is automatically enabled param count the new hit count exception Core Exception if unable to set the property on this breakpoint s underlying marker  getHitCount CoreException CoreException
Sets whether all threads in the target VM will be suspended when this breakpoint is hit When code SUSPEND VM code the target VM is suspended and when code SUSPEND THREAD code only the thread in which this breakpoint occurred is suspended param suspend Policy one of code SUSPEND VM code or code SUSPEND THREAD code exception Core Exception if unable to set the property on this breakpoint s underlying marker  SUSPEND_VM SUSPEND_THREAD suspendPolicy SUSPEND_VM SUSPEND_THREAD CoreException
Returns the suspend policy used by this breakpoint one of code SUSPEND VM code or code SUSPEND THREAD code return one of code SUSPEND VM code or code SUSPEND THREAD code exception Core Exception if unable to access the property from this breakpoint s underlying marker  SUSPEND_VM SUSPEND_THREAD SUSPEND_VM SUSPEND_THREAD CoreException
Restricts this breakpoint to suspend only in the given thread when encounterd in the given thread s target A breakpoint can only be resticted to one thread per target Any previous thread filter for the same target is lost A thread filter is not persisted across workbench invocations exception Core Exception if unable to set the thread filter  CoreException
Removes this breakpoint s thread filter in the given target if any Has no effect if this breakpoint does not have a filter in the given target param target the target whose thread filter will be removed exception Core Exception if unable to remove the thread filter  CoreException
Returns the thread in the given target in which this breakpoint is enabled or code null code if this breakpoint is enabled in all threads in the given target return the thread in the given target that this breakpoint is enabled for exception Core Exception if unable to determine this breakpoint s thread filter  CoreException
public I Java Thread get Thread Filter I Java Debug Target target throws Core Exception Returns all thread filters set on this breakpoint return the threads that this breakpoint is resticted to exception Core Exception if unable to determine this breakpoint s thread filters  IJavaThread getThreadFilter IJavaDebugTarget CoreException CoreException
Adds the given object to the list of objects in which this breakpoint is restricted to suspend execution Has no effect if the object has already been added Note that clients should first ensure that a breakpoint supports instance filters p Note This implementation will add more than one filter However if there is more than one instance filter for a debug target the breakpoint will never be hit in that target as the current context cannot be two different instances at the same time p param object instance filter to add exception Core Exception if unable to add the given instance filter since 2 1  CoreException
Removes the given object from the list of objects in which this breakpoint is restricted to suspend execution Has no effect if the object has not yet been added as an instance filter param object instance filter to remove exception Core Exception if unable to remove the given instance filter since 2 1  CoreException
Returns whether this breakpoints supports instance filters return whether this breakpoints supports instance filters since 3 0 
Returns the current set of active instance filters return the current set of active instance filters exception Core Exception if unable to retrive the list since 2 1  CoreException
Returns whether this breakpoints supports thread filters return whether this breakpoints supports thread filters since 3 0 

Notification that the given breakpoint is about to be added to the specified target This message is sent before the breakpoint is actually added to the debut target i e this is a pre notification param target Java debug target param breakpoint Java breakpoint 
Notification that the given breakpoint is about to be installed in the specified target in the specified type Allows this listener to vote to determine if the given breakpoint should be installed in the specified type and target If at least one listener votes to code INSTALL code the breakpoint will be installed If there are no votes to install the breakpoint there must be at least one code DONT INSTALL code vote to cancel the installation If all listeners vote code DONT CARE code the breakpoint will be installed by default param target Java debug target param breakpoint Java breakpoint param type the type class or interface the breakpoint is about to be installed in or code null code if the given breakpoint is not installed in a specific type one of code I Java Class Type code code I Java Interface Type code or code I Java Array Type code return whether the the breakpoint should be installed in the given type and target or whether this listener doesn t care one of code INSTALL code code DONT INSTALL code or code DONT CARE code since 3 0  DONT_INSTALL DONT_CARE IJavaClassType IJavaInterfaceType IJavaArrayType DONT_INSTALL DONT_CARE
Notification that the given breakpoint has been installed in the specified target param target Java debug target param breakpoint Java breakpoint 
Notification that the given breakpoint has been hit in the specified thread Allows this listener to vote to determine if the given thread should be suspended in reponse to the breakpoint If at least one listener votes to code SUSPEND code the thread will suspend If there are no votes to suspend the thread there must be at least one code DONT SUSPEND code vote to avoid the suspension resume If all listeners vote code DONT CARE code the thread will suspend by default param thread Java thread param breakpoint Java breakpoint return whether the thread should suspend or whether this listener doesn t care one of code SUSPEND code code DONT SUSPEND code or code DONT CARE code since 3 0  DONT_SUSPEND DONT_CARE DONT_SUSPEND DONT_CARE
Notification that the given breakpoint has been removed from the specified target param target Java debug target param breakpoint Java breakpoint 
Notification that the given breakpoint had runtime errors in its conditional expression param breakpoint the breakpoint param exception the debug exception that occurred evaluating the breakpoint s condition 
Notification that the given breakpoint has compilation errors in its conditional expression param breakpoint the breakpoint param errors the compilation errors in the breakpoint s condition 

Returns the type associated with instances of this class return the type associated with instances of this class 

Returns a constant indicating what kind of type this breakpoint is associated with return one of code TYPE CLASS code or code TYPE INTERFACE code throws Core Exception if unable to retrieve the attribute  TYPE_CLASS TYPE_INTERFACE CoreException

Returns a new instance of this class by invoking the constructor with the given signature and arguments in the specified thread The given thread is resumed to perform this method invocation and suspends in its original location when this method invocation is complete This method does not return until the method invocation is complete Resuming the specified thread can result in breakpoints being hit infinite loops and deadlock param signature the JNI style signature of the method to be invoked param args the arguments of the constructor which can be code null code or emtpy if there are none param thread the thread in which to invoke the constructor return the result of invoking the constructor exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This type does not implement the specified constructor li li An exception occurs while invoking the specified constructor li li The given thread is already performing a message send status code code I Java Thread ERR NESTED METHOD INVOCATION code li li The given thread is not currently suspended status code code I Java Thread ERR THREAD NOT SUSPENDED code li li The given thread was explicitly suspended status code code I Java Thread ERR INCOMPATIBLE THREAD STATE code li ul  DebugException DebugException IJavaThread ERR_NESTED_METHOD_INVOCATION IJavaThread ERR_THREAD_NOT_SUSPENDED IJavaThread ERR_INCOMPATIBLE_THREAD_STATE
Returns the result of sending the specified message to this class with the given arguments in the specified thread invokes a static method on this type The given thread is resumed to perform this method invocation and suspends in its original location when this method invocation is complete This method does not return until the method invocation is complete Resuming the specified thread can result in breakpoints being hit infinite loops and deadlock param selector the selector of the method to be invoked param signature the JNI style signature of the method to be invoked param args the arguments of the method which can be code null code or emtpy if there are none param thread the thread in which to invoke the method return the result of invoking the method exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This object does not implement the specified method li li An exception occurs while invoking the specified method li li The given thread is already performing a message send status code code I Java Thread ERR NESTED METHOD INVOCATION code li li The given thread is not currently suspended status code code I Java Thread ERR THREAD NOT SUSPENDED code li li The given thread was explicitly suspended status code code I Java Thread ERR INCOMPATIBLE THREAD STATE code li ul  DebugException DebugException IJavaThread ERR_NESTED_METHOD_INVOCATION IJavaThread ERR_THREAD_NOT_SUSPENDED IJavaThread ERR_INCOMPATIBLE_THREAD_STATE
Returns the superclass of this class type or code null code if no such class exists return the superclass of this class type or code null code exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException
Returns the interface objects associated with the interfaces this class directly implements Only those interfaces declared in the code implements code clause for this class are included return the interface objects associated with the interfaces this class directly implements exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 3 0  DebugException DebugException
Returns the interface objects associated with em all em interfaces this class implements directly or indirectly return the interface objects associated with the interfaces this class directly implements directly or indirectly exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 3 0  DebugException DebugException

public interface I Java Debug Target extends I Debug Target I Step Filters Searches for and returns a variable with the given name or code null code if unable to resolve a variable with the name p Variable lookup works only when a debug target has one or more threads suspended Lookup is performed in each suspended thread returning the first successful match or code null code if no match if found If this debug target has no suspended threads code null code is returned p param variable Name name of the variable return a variable with the given name or code null code if none exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  IJavaDebugTarget IDebugTarget IStepFilters variableName DebugException DebugException
Returns the types loaded in this debug target with the given fully qualified name or code null code of no type with the given name is loaded param name fully qualified name of type for example code java lang String code return the types with the given name or code null code exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException
Returns a value from this target that corresponds to the given boolean The returned value can be used for setting and comparing against a value retrieved from this debug target param value a boolean from which to create a value return a corresponding value from this target 
Returns a value from this target that corresponds to the given byte The returned value can be used for setting and comparing against a value retrieved from this debug target param value a byte from which to create a value return a corresponding value from this target 
Returns a value from this target that corresponds to the given char The returned value can be used for setting and comparing against a value retrieved from this debug target param value a char from which to create a value return a corresponding value from this target 
Returns a value from this target that corresponds to the given double The returned value can be used for setting and comparing against a value retrieved from this debug target param value a double from which to create a value return a corresponding value from this target 
Returns a value from this target that corresponds to the given float The returned value can be used for setting and comparing against a value retrieved from this debug target param value a float from which to create a value return a corresponding value from this target 
Returns a value from this target that corresponds to the given int The returned value can be used for setting and comparing against a value retrieved from this debug target param value an int from which to create a value return a corresponding value from this target 
Returns a value from this target that corresponds to the given long The returned value can be used for setting and comparing against a value retrieved from this debug target param value a long from which to create a value return a corresponding value from this target 
Returns a value from this target that corresponds to the given short The returned value can be used for setting and comparing against a value retrieved from this debug target param value a short from which to create a value return a corresponding value from this target 
Returns a value from this target that corresponds to the given string The returned value can be used for setting and comparing against a value retrieved from this debug target param value a string from which to create a value return a corresponding value from this target 
Returns a value from this target that corresponds to code null code The returned value can be used for setting and comparing against a value retrieved from this debug target return a value corresponding to code null code 
Returns a value from this target that corresponds to code void code The returned value can be used for setting and comparing against a value retrieved from this debug target return a value corresponding to code void code 
public abstract I Java Value void Value Returns whether any of the threads associated with this debug target are running code in the VM that is out of synch with the code in the workspace return whether this debug target is out of synch with the workspace exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li  IJavaValue voidValue DebugException DebugException
public abstract boolean is Out Of Synch throws Debug Exception Returns whether any of the threads associated with this debug target may be running code in the VM that is out of synch with the code in the workspace return whether this debug target may be out of synch with the workspace exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li  isOutOfSynch DebugException DebugException DebugException
public abstract boolean may Be Out Of Synch throws Debug Exception Returns whether this target supports hot code replace return whether this target supports hot code replace  mayBeOutOfSynch DebugException
public boolean supports Hot Code Replace Returns whether this target is currently performing a hot code replace return whether this target is currently performing a hot code replace since 2 1  supportsHotCodeReplace
public boolean is Performing Hot Code Replace Returns whether this target supports instance breakpoints return whether this target supports instance breakpoints since 2 1  isPerformingHotCodeReplace
Returns whether synthetic methods are filtered when stepping if step filters are enabled return whether synthetic methods are filtered when stepping 
Sets whether synthetic methods are filtered when stepping param filter whether to synthetic methods are filtered when stepping 
Returns whether static initializers are filtered when stepping if step filters are enabled return whether static initializers are filtered when stepping 
Sets whether to filter static initializers when stepping param filter whether to filter static initializers when stepping 
Returns whether constructors are filtered when stepping if step filters are enabled return whether constructors are filtered when stepping 
Sets whether to filter constructors when stepping param filter whether to filter constructors when stepping 
Returns the list of active step filters in this target The list is a collection of Strings Each string is the fully qualified name pattern of a type package to filter when stepping For example code java lang code or code java lang String code return the list of active step filters or code null code 
Sets the list of active step filters in this target The list is a collection of Strings Each string is the fully qualified name pattern of a type package to filter when stepping For example code java lang code or code java lang String code param list active step filters or code null code 
Returns whether this debug target supports a request timeout a maximum time for a JDI request to receive a response This option is only supported by the Eclipse JDI implementation return whether this debug target supports a request timeout 
Sets the timeout value for JDI requests in milliseconds Has no effect if this target does not support a request timeout param timeout the communication timeout in milliseconds 
Returns the timeout value for JDI requests in milliseconds or 1 if not supported return timeout value in milliseconds or 1 if not supported 
Returns whether this target supports providing monitor information return whether this target supports providing monitor information since 2 1 
Returns whether this target supports access watchpoints return whether this target supports access watchpoints since 3 0 
Returns whether this target supports modification watchpoints return whether this target supports modification watchpoints since 3 0 
Set the default stratum used in this debug target param stratum the new default stratum since 3 0 
Return the default stratum used in this the target return the default stratum see set Default Stratum String since 3 0  setDefaultStratum

public interface I Java Exception Breakpoint extends I Java Breakpoint Sets the inclusion filters that will define the scope for the associated exception Filters are a collection of strings of type name prefixes Default packages should be specified as the empty string param filters the array of filters to apply exception Core Exception if unable to set the property on this breakpoint s underlying marker since 2 1  IJavaExceptionBreakpoint IJavaBreakpoint CoreException
Returns the inclusive filters that define the scope for the associated exception Filters are a collection of strings of type name prefixes return the array of defined inclusive filters exception Core Exception if unable to access the property on this breakpoint s underlying marker since 2 1  CoreException
Returns whether this breakpoint suspends execution when the associated exception is thrown in a caught location in a try catch statement return code true code if this is a caught exception breakpoint exception Core Exception if unable to access the property from this breakpoint s underlying marker  CoreException
public boolean is Caught throws Core Exception Returns whether this breakpoint suspends execution when the associated exception is thrown in an uncaught location not caught by a try catch statement return code true code if this is an uncaught exception breakpoint exception Core Exception if unable to access the property from this breakpoint s underlying marker  isCaught CoreException CoreException
public boolean is Uncaught throws Core Exception Sets whether this breakpoint suspends execution when the associated exception is thrown in a caught location in a try catch statement param caught whether or not this breakpoint suspends execution when the associated exception is thrown in a caught location exception Core Exception if unable to set the property on this breakpoint s underlying marker  isUncaught CoreException CoreException
public void set Caught boolean caught throws Core Exception Sets whether this breakpoint suspends execution when the associated exception is thrown in an uncaught location param uncaught whether or not this breakpoint suspends execution when the associated exception is thrown in an uncaught location exception Core Exception if unable to set the property on this breakpoint s underlying marker  setCaught CoreException CoreException
public void set Uncaught boolean uncaught throws Core Exception Returns whether the exception associated with this breakpoint is a checked exception compiler detected return code true code if the exception associated with this breakpoint is a checked exception exception Core Exception if unable to access the property from this breakpoint s underlying marker  setUncaught CoreException CoreException
Returns the fully qualified type name of the exception that last caused this breakpoint to suspend of code null code if this breakpoint has not caused a thread to suspend Note that this name may be a subtype of the exception that this breakpoint is associated with return fully qualified exception name or code null code 
Sets the filters that will define the scope for the associated exception Filters are a collection of strings of type name prefixes Default packages should be specified as the empty string param filters the array of filters to apply param inclusive whether or not to apply the filters as inclusive or exclusive exception Core Exception if unable to set the property on this breakpoint s underlying marker deprecated Exception breakpoints can have a mixed set of filters Use set Inclusive Filters String filters or set Exclusive Filters String filters  CoreException setInclusiveFilters setExclusiveFilters
Sets the exclusion filters that will define the scope for the associated exception Filters are a collection of strings of type name prefixes Default packages should be specified as the empty string param filters the array of filters to apply exception Core Exception if unable to set the property on this breakpoint s underlying marker since 2 1  CoreException
Returns the filters that define the scope for the associated exception Filters are a collection of strings of type name prefixes return the array of defined filters exception Core Exception if unable to access the property on this breakpoint s underlying marker deprecated Use get Exclusion Filters or get Inclusion Filters  CoreException getExclusionFilters getInclusionFilters
Returns the exclusive filters that define the scope for the associated exception Filters are a collection of strings of type name prefixes return the array of defined inclusive filters exception Core Exception if unable to access the property on this breakpoint s underlying marker since 2 1  CoreException
Returns whether any inclusive filters have been applied return code true code if the inclusive filters have been applied exception Core Exception if unable to access the property on this breakpoint s underlying marker deprecated Exception breakpoints can have a mixed set of filters and this method is maintained strictly for API backwards compatibility  CoreException

Returns whether this variable is declared as transient return whether this variable has been declared as transient exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException
Returns whether this variable is declared as volatile return whether this variable has been declared as volatile exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException
Returns the type that declares this variable return the type that decalares this variable 
Returns the object that contains this field variable or code null code if no object contains this field variable static field variable return the object that contains this field variable since 3 0 
Returns the type that contains this field variable return the type that contains this field variable since 3 0 

Notification that a hot code replace attempt failed in the given target param target the target in which the hot code replace failed param exception the exception generated by the hot code replace failure or code null code if the hot code replace failed because the target VM does not support hot code replace 
Notification that a hot code replace attempt succeeded in the given target param target the target in which the hot code replace succeeded 
Notification that obsolete methods remain on the stack in one or more threads in the given target after a hot code replace param target the target in which obsolete methods remain after a hot code replace 

Returns the class objects associated with the implementors of this interface type Returns an empty array if there are none return the class objects associated with the implementors of this interface type exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 3 0  DebugException DebugException
Returns the interface objects associated with the sub interfaces of this interface type Returns an empty array if there are none The sub interfaces are those interfaces that directly extend this interface that is those interfaces that declared this interface in their code extends code clause return the interface objects associated with the sub interfaces of this interface type exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 3 0  DebugException DebugException
Returns the interface objects associated with the super interfaces of this interface type Returns an empty array if there are none The super interfaces are those interfaces that are directly extended by this interface that is those interfaces that this interface declared to be extended return the interface objects associated with the super interfaces of this interface type exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 3 0  DebugException DebugException

Returns whether this breakpoint supports a conditional expression Conditional breakpoints only suspend when their associated condition evaluates to code true code return whether this breakpoint supports a condition 
public boolean supports Condition Returns the conditional expression associated with this breakpoint or code null code if this breakpoint does not have a condition return this breakpoint s conditional expression or code null code exception Core Exception if unable to access the property on this breakpoint s underlying marker  supportsCondition CoreException
public String get Condition throws Core Exception Sets the condition associated with this breakpoint When the condition is enabled this breakpoint will only suspend execution when the given condition evaluates to code true code Setting the condition to code null code or an empty string removes the condition p If this breakpoint does not support conditions setting the condition has no effect p param condition conditional expression exception Core Exception if unable to set the property on this breakpoint s underlying marker  getCondition CoreException CoreException
public void set Condition String condition throws Core Exception Returns whether the condition on this breakpoint is enabled return whether this breakpoint s condition is enabled exception Core Exception if unable to access the property on this breakpoint s underlying marker  setCondition CoreException CoreException
public boolean is Condition Enabled throws Core Exception Sets the enabled state of this breakpoint s condition to the given state When enabled this breakpoint will only suspend when its condition evaluates to true When disabled this breakpoint will suspend as it would with no condition defined exception Core Exception if unable to set the property on this breakpoint s underlying marker  isConditionEnabled CoreException CoreException
public void set Condition Enabled boolean enabled throws Core Exception Returns whether the breakpoint suspends when the value of the condition is code true code or when the value of the condition changes return code true code if this breakpoint suspends when the value of the condition is code true code code false code if this breakpoint suspends when the value of the condition changes exception Core Exception if unable to access the property on this breakpoint s underlying marker since 2 1  setConditionEnabled CoreException CoreException
public boolean is Condition Suspend On True throws Core Exception Set the suspend state of this breakpoint s condition If the value is code true code the breakpoint will stop when the value of the condition is code true code If the value is code false code the breakpoint will stop when the value of the condition changes exception Core Exception if unable to access the property on this breakpoint s underlying marker since 2 1  isConditionSuspendOnTrue CoreException CoreException

Returns the name of the method s this breakpoint suspends execution in or code null code if this breakpoint does not suspend execution based on method name return the name of the method s this breakpoint suspends execution in or code null code if this breakpoint does not suspend execution based on method name exception Core Exception if unable to access the property from this breakpoint s underlying marker  CoreException
Returns the signature of the method s this breakpoint suspends execution in or code null code if this breakpoint does not suspend exectution based on method signature return the signature of the method s this breakpoint suspends execution in or code null code if this breakpoint does not suspend exectution based on method signature exception Core Exception if unable to access the property from this breakpoint s underlying marker  CoreException
Returns the pattern specifying the fully qualified name of type s this breakpoint suspends execution in Patterns are limited to exact matches and patterns that begin or end with return the pattern specifying the fully qualified name of type s this breakpoint suspends execution in exception Core Exception if unable to access the property from this breakpoint s underlying marker see I Java Breakpoint get Type Name  CoreException IJavaBreakpoint getTypeName
Returns whether this breakpoint causes execution to suspend on entry to methods return whether this breakpoint causes execution to suspend on entry to methods exception Core Exception if unable to access the property from this breakpoint s underlying marker  CoreException
Returns whether this breakpoint causes execution to suspend on exit of methods return whether this breakpoint causes execution to suspend on exit of methods exception Core Exception if unable to access the property from this breakpoint s underlying marker  CoreException
Sets whether this breakpoint causes execution to suspend on entry to methods param entry whether this breakpoint causes execution to suspend on entry to methods exception Core Exception if unable to set the property on this breakpoint s underlying marker  CoreException
Sets whether this breakpoint causes execution to suspend on exit of methods param exit whether this breakpoint causes execution to suspend on exit of methods exception Core Exception if unable to set the property on this breakpoint s underlying marker  CoreException
Sets whether this breakpoint causes execution to suspend only on entry exit of native methods param native Only whether this breakpoint causes execution to suspend only on entry exit of native methods exception Core Exception if unable to set the property on this breakpoint s underlying marker  nativeOnly CoreException
Returns whether this breakpoint causes execution to suspend only on entry exit of native methods return whether this breakpoint causes execution to suspend only on entry exit of native methods exception Core Exception if unable to access the property on this breakpoint s underlying marker  CoreException
Returns whether this breakpoint last suspended in the given target due to a method entry code true code or exit code false code return code true code if this breakpoint last suspended the given target due to a method entry code false code if this breakpoint last suspended in the given target due to a method exit or if this breakpoint hasn t suspended the given target 

Returns the name of the method this breakpoint suspends execution in return the name of the method this breakpoint suspends execution in exception Core Exception if unable to access the property from this breakpoint s underlying marker  CoreException
Returns the signature of the method this breakpoint suspends execution in return the signature of the method this breakpoint suspends execution in exception Core Exception if unable to access the property from this breakpoint s underlying marker  CoreException

Returns whether the associated Java construct is declared as public return whether the associated Java construct is declared as public exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException
public boolean is Public throws Debug Exception Returns whether the associated Java construct is declared as private return whether the associated Java construct is declared as private exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  isPublic DebugException DebugException DebugException
public boolean is Private throws Debug Exception Returns whether the associated Java construct is declared as protected return whether the associated Java construct is declared as protected exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  isPrivate DebugException DebugException DebugException
public boolean is Protected throws Debug Exception Returns whether the associated Java construct is declared with no protection modifier package private protection return whether the associated Java construct is declared as package private exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  isProtected DebugException DebugException DebugException
public boolean is Package Private throws Debug Exception Returns whether the associated Java construct is declared as final return whether the associated Java construct is declared as final exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  isPackagePrivate DebugException DebugException DebugException
public boolean is Final throws Debug Exception Returns whether the associated Java construct is declared as static return whether the associated Java construct is declared as static exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  isFinal DebugException DebugException DebugException
public boolean is Static throws Debug Exception Returns whether the associated Java construct is synthetic Synthetic members are generated by the compiler and are not present in source code return whether the associated Java construct is synthetic exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  isStatic DebugException DebugException DebugException

Returns the result of sending the specified message to this object with the given arguments in the specified thread The given thread is resumed to perform the method invocation The thread will suspend in its original location when the method invocation is complete This method does not return until the method invocation is complete Invoking a method in the target VM can result in breakpoints being hit infinite loops and deadlock param selector the selector of the method to be invoked param signature the JNI style signature of the method to be invoked param args the arguments of the method which can be code null code or emtpy if there are none param thread the thread in which to invoke the method param super Send code true code if the method lookup should begin in this object s superclass return the result of invoking the method exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This object does not implement the specified method li li An exception occurs while invoking the specified method li li The given thread is already performing a message send status code code I Java Thread ERR NESTED METHOD INVOCATION code li li The given thread is not currently suspended status code code I Java Thread ERR THREAD NOT SUSPENDED code li li The given thread was explicitly suspended status code code I Java Thread ERR INCOMPATIBLE THREAD STATE code li ul  superSend DebugException DebugException IJavaThread ERR_NESTED_METHOD_INVOCATION IJavaThread ERR_THREAD_NOT_SUSPENDED IJavaThread ERR_INCOMPATIBLE_THREAD_STATE
public I Java Value send Message String selector String signature I Java Value args I Java Thread thread boolean super Send throws Debug Exception Returns the result of sending the specified message on the specified declaring type to this object with the given arguments in the specified thread The given thread is resumed to perform the method invocation The thread will suspend in its original location when the method invocation is complete This method does not return until the method invocation is complete Invoking a method in the target VM can result in breakpoints being hit infinite loops and deadlock param selector the selector of the method to be invoked param signature the JNI style signature of the method to be invoked param args the arguments of the method which can be code null code or emtpy if there are none param thread the thread in which to invoke the method param type Signature the signature of the type in which the method is defined or code null code if the method should be invoked normally using polymorphism return the result of invoking the method exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This object does not implement the specified method li li An exception occurs while invoking the specified method li li The given thread is already performing a message send status code code I Java Thread ERR NESTED METHOD INVOCATION code li li The given thread is not currently suspended status code code I Java Thread ERR THREAD NOT SUSPENDED code li li The given thread was explicitly suspended status code code I Java Thread ERR INCOMPATIBLE THREAD STATE code li ul since 2 0 1  IJavaValue sendMessage IJavaValue IJavaThread superSend DebugException typeSignature DebugException DebugException IJavaThread ERR_NESTED_METHOD_INVOCATION IJavaThread ERR_THREAD_NOT_SUSPENDED IJavaThread ERR_INCOMPATIBLE_THREAD_STATE
public I Java Value send Message String selector String signature I Java Value args I Java Thread thread String type Signature throws Debug Exception Returns a variable representing the field in this object with the given name or code null code if there is no field with the given name or the name is ambiguous param name field name param super Field whether or not to get the field in the superclass of this objects return the variable representing the field or code null code exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li  IJavaValue sendMessage IJavaValue IJavaThread typeSignature DebugException superField DebugException DebugException
public I Java Field Variable get Field String name boolean super Field throws Debug Exception Returns a variable representing the field in this object with the given name declared in the type with the given signature or code null code if there is no field with the given name or the name is ambiguous param name field name param type Signature the signature of the type in which the field is defined return the variable representing the field or code null code exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li  IJavaFieldVariable getField superField DebugException typeSignature DebugException DebugException

Returns the type name pattern this breakpoint uses to identify types in which to install itself return the type name pattern this breakpoint uses to identify types in which to install itself exception Core Exception if unable to access the property from this breakpoint s underlying marker  CoreException
Returns the source file name in which this breakpoint is set When this breakpoint specifies a source file name this breakpoint is only installed in types whose source file name debug attribute match this value return the source file name in which this breakpoint is set exception Core Exception if unable to access the property from this breakpoint s underlying marker  CoreException

Returns this value as a boolean return this value as a boolean 
Returns this value as a byte return this value as a byte 
Returns this value as a char return this value as a char 
Returns this value as a double return this value as a double 
Returns this value as a float return this value as a float 
Returns this value as an int return this value as an int 
Returns this value as a long return this value as a long 
Returns this value as a short return this value as a short 

Returns a variable representing the static field in this type with the given name or code null code if there is no field with the given name or the name is ambiguous param name field name return the variable representing the static field or code null code exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException
Returns the class object associated with this type return the class object associated with this type exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException
Returns a collection of strata available for this type return a collection of strata available for this type throws Debug Exception if unable to retrive available strata  DebugException
Returns the default stratum for this type return the default stratum for this type throws Debug Exception if unable to retrieve the default stratum  DebugException
Returns a collection of the names of the fields declared in this type return a collection of the names of the field declared in this type throws Debug Exception if unable to retrieve declared field names  DebugException
Returns a collection of the names of all of the fields declared in this type all of its superclasses implemented interfaces and super interfaces return a collection of the names of all of the fields declared in this type all of its superclasses implemented interfaces and super interfaces throws Debug Exception if unable to retrieve field names  DebugException

Drops to this stack frame by popping frames in this frame s owning thread until this stack frame is the top stack frame The execution location is set to the beginning of this frame s associated method exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li The capability is not supported by the target li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul  DebugException DebugException
Returns whether this stack frame currently supports the drop to frame operation Note that not all V Ms support the operation return whether this stack frame currently supports drop to frame  VMs
boolean supports Drop To Frame Returns whether the method associated with this stack frame is a constructor return whether this stack frame is associated with a constructor exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul  supportsDropToFrame DebugException DebugException
Returns whether the method associated with this stack frame has been declared as native return whether this stack frame has been declared as native exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul  DebugException DebugException
public boolean is Native throws Debug Exception Returns whether the method associated with this stack frame is a static initializer return whether this stack frame is a static initializer exception Debug Exception if this method fails Reasons include ul ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul  isNative DebugException DebugException DebugException
public boolean is Static Initializer throws Debug Exception Returns whether the method associated with this stack frame has been declared as synchronized return whether this stack frame has been declared as synchronized exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul  isStaticInitializer DebugException DebugException DebugException
public boolean is Synchronized throws Debug Exception Returns whether the method associated with this stack frame is running code in the VM that is out of synch with the code in the workspace return whether this stack frame is out of synch with the workspace exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul since 2 0  isSynchronized DebugException DebugException DebugException
public boolean is Out Of Synch throws Debug Exception Returns whether the method associated with this stack frame is obsolete that is it is running old bytecodes that have been replaced in the VM This can occur when a hot code replace succeeds but the VM is unable to pop a call to an affected method from the call stack return whether this stack frame s method is obsolete exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul since 2 0  isOutOfSynch DebugException DebugException DebugException
public boolean is Obsolete throws Debug Exception Returns the fully qualified name of the type that declares the method associated with this stack frame return declaring type name exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul  isObsolete DebugException DebugException DebugException
public String get Declaring Type Name throws Debug Exception Returns the fully qualified name of the type that is the receiving object associated with this stack frame return receiving type name exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul  getDeclaringTypeName DebugException DebugException DebugException
Returns the JNI signature for the method this stack frame is associated with return signature exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul  DebugException DebugException
Returns a list of fully qualified type names of the arguments for the method associated with this stack frame return argument type names or an empty list if this method has no arguments exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul  DebugException DebugException
Returns the name of the method associated with this stack frame return method name exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul  DebugException DebugException
Returns the local static or this variable with the given name or code null code if unable to resolve a variable with the name param variable Name the name of the variable to search for return a variable or code null code if none exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul  variableName DebugException DebugException
Returns the line number of the instruction pointer in this stack frame that corresponds to the line in the associated source element in the specified stratum or code 1 code if line number information is unavailable param stratum the stratum to use return line number of instruction pointer in this stack frame or code 1 code if line number information is unavailable exception Debug Exception if this method fails Reasons include ul li Failure communicating with the debug target The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 3 0  DebugException DebugException
Returns the source name debug attribute associated with the declaring type of this stack frame or code null code if the source name debug attribute not present return source name debug attribute or code null code exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul  DebugException DebugException
Returns the source name debug attribute associated with the declaring type of this stack frame in the specified stratum or code null code if the source name debug attribute not present param stratum the stratum to use return source name debug attribute or code null code exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul since 3 0  DebugException DebugException
Returns the source path debug attribute associated with this stack frame in the specified stratum or code null code if the source path is not known param stratum the stratum to use return source path debug attribute or code null code exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul since 3 0  DebugException DebugException
Returns the source path debug attribute associated with this stack frame or code null code if the source path is not known return source path debug attribute or code null code exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul since 3 0  DebugException DebugException
Returns a collection of local variables that are visible at the current point of execution in this stack frame The list includes arguments return collection of locals and arguments exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul since 2 0  DebugException DebugException
Returns a reference to the receiver of the method associated with this stack frame or code null code if this stack frame represents a static method return this object or code null code exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul  DebugException DebugException
Returns the type in which this stack frame s method is declared return the type in which this stack frame s method is declared exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This stack frame is no longer valid That is the thread containing this stack frame has since been resumed li ul since 2 0  DebugException DebugException
Returns whether local variable information was available when local variables were retrieved from the target for this frame Returns code true code if locals have never been retrieved This data is available after the fact since variable retrieval is expensive return whether local variable information was available when variables were retrieved from the target Returns code true code if locals have never been retrieved since 2 0 

Returns the type name pattern this breakpoint uses to identify types in which to install itself Patterns may begin or end with Will not return code null code In the case that a stratum breakpoint was created with a code null code pattern is returned return the type name pattern this breakpoint uses to identify types in which to install itself exception Core Exception if unable to access the property from this breakpoint s underlying marker  CoreException
Returns the simple name of the source file in which this breakpoint is set or code null code When this breakpoint specifies a source file name this breakpoint is only installed in types whose source file name debug attribute matches this value relative to this breakpoint s stratum return the source file name in which this breakpoint is set or code null code exception Core Exception if unable to access the property from this breakpoint s underlying marker  CoreException
Returns the stratum that this breakpoint s source name source path and line number are relative to or code null code if this breakpoint is relative to a type s default stratum return the stratum that this breakpoint s source name source path and line number are relative to or code null code throws Core Exception if unable to access the property from this breakpoint s underlying marker  CoreException
Returns the qaulified source file path in which this breakpoint is set or code null code When specified this breakpoint is only installed in types whose source file path debug attribute matches this value relative to this breakpoint s stratum return the qaulified source file path in which this breakpoint is set or code null code throws Core Exception  CoreException

Returns the type name pattern this breakpoint uses to identify types in which to install itself in the given target param target debug target return the type name pattern this breakpoint uses to identify types in which to install itself in the given target 
Sets the type name pattern this breakpoint uses to identify types in which to install itself in the given target param target debug target param pattern type name pattern exception Core Exception if changing the pattern for this breakpoint fails  CoreException
Returns the source file name in which this breakpoint is set When this breakpoint specifies a source file name this breakpoint is only installed in types whose source file name debug attribute match this value return the source file name in which this breakpoint is set exception Core Exception if unable to access the property from this breakpoint s underlying marker  CoreException

Returns whether this thread is a system thread return whether this thread is a system thread exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException
boolean is System Thread throws Debug Exception Returns whether any of the stack frames associated with this thread are running code in the VM that is out of synch with the code in the workspace return whether this thread is out of synch with the workspace exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li since 2 0  isSystemThread DebugException DebugException DebugException
boolean is Out Of Synch throws Debug Exception Returns whether this thread may be running code in the VM that is out of synch with the code in the workspace return whether this thread may be out of synch with the workspace exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li since 2 0  isOutOfSynch DebugException DebugException DebugException
boolean may Be Out Of Synch throws Debug Exception Returns whether this thread is currently performing an evaluation return whether this thread is currently performing an evaluation since 2 0  mayBeOutOfSynch DebugException
boolean is Performing Evaluation Returns the name of the thread group this thread belongs to or code null code if none return thread group name or code null code if none exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  isPerformingEvaluation DebugException DebugException
Returns a variable with the given name or code null code if unable to resolve a variable with the name or if this thread is not currently suspended p Variable lookup works only when a thread is suspended Lookup is performed in all stack frames in a top down order returning the first successful match or code null code if no match is found p param variable Name the name of the variable to search for return a variable or code null code if none exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  variableName DebugException DebugException
Invokes the given evaluation with the specfied progress monitor This thread fires a resume event when the evaluation begins and a suspend event when the evaluation completes or throws an exception The events are given a detail as specified by code evaluation Detail code one of code Debug Event EVALUATION code or code Debug Event EVALUATION IMPLICIT code param evaluation the evalation to perform param monitor progress monitor may be code null code param evaluation Detail one of code Debug Event EVALUATION code or code Debug Event EVALUATION IMPLICIT code param hit Breakpoints whether or not breakpoints should be honored in this thread during the evaluation If code false code breakpoints hit in this thread during the evaluation will be ignored exception Debug Exception if an exception occurs performing the evaluation since 2 0  evaluationDetail DebugEvent DebugEvent EVALUATION_IMPLICIT evaluationDetail DebugEvent DebugEvent EVALUATION_IMPLICIT hitBreakpoints DebugException
Queues the given runnable with the list of runnables associated with this thread Runnables are executed asyncronously in a seperate thread This method should be used to execute any code which performs an operation like a method invocation param runnable the runnable to execute since 2 1 
Attempts to terminate the currently executing code I Evaluation Runnable code in this thread if any Evaluations may be composed of a series of instructions Terminating an evaluation means stopping the evaluation after the current instruction completes A single instruction such as a method invocation cannot be interrupted exception Debug Exception if an exception occurs while terminating the evaluation since 2 1  IEvaluationRunnable DebugException
public void terminate Evaluation throws Debug Exception Returns whether the currently executing code I Evaluation Runnable code supports termination An I Evaluation Runnable supports termination if it implements code I Terminate code return whether the current evaluation supports termination since 2 1  terminateEvaluation DebugException IEvaluationRunnable IEvaluationRunnable ITerminate
Returns a Java object for the monitor for which this thread is currently waiting or code null code return I Java Object the contended monitor object or code null code if this thread is not waiting on a monitor exception Debug Exception if an exception occurs while retrieving the contended monitor since 2 1  IJavaObject DebugException
Returns the monitors owned by this thread or code null code if this thread owns no monitors return the owned monitors exception Debug Exception if an exception occurs while retrieving the owned monitors of this thread since 2 1  DebugException
Returns whether this threads owns at least one monitor return boolean whether this thread owns a monitor exception Debug Exception if an exception occurs determining if there are owned monitors since 2 1  DebugException
Request to stops this thread with the given exception br The result will be the same as calling java lang Thread stop java lang Throwable br If the thread is suspended when the method is called the thread must be resumed to complete the action br em exception em must represent an exception param exception the exception to throw exception Debug Exception since 3 0 see java lang Thread stop java lang Throwable  DebugException

public interface I Java Type Returns the JNI style signature for this type return signature exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  IJavaType DebugException DebugException
Returns the name of this type For example code java lang String code return the name of this type exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul  DebugException DebugException

public interface I Java Value extends I Value Returns the JNI style signature for the type of this value or code null code if the value is code null code return signature or code null code if signature is code null code exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li The type associated with the signature is not yet loaded li ul  IJavaValue IValue DebugException DebugException
Returns the type of this value or code null code if this value represents the code null code value return the type of this value or code null code if this value represents the code null code value since 2 0 

Returns the JNI style signature for the declared type of this variable or code null code if the type associated with the signature is not yet loaded in the target VM return signature or code null code if not accessible exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li The type associated with the signature is not yet loaded li ul  DebugException DebugException
Returns the declared type of this variable return the declared type of this variable exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li The type associated with the signature is not yet loaded li ul since 2 0  DebugException DebugException
Returns whether this variable is local return whether this variable is a local variable exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul since 2 1  DebugException DebugException

Returns whether this watchpoint is an access watchpoint return whether this is an access watchpoint exception Core Exception if unable to access the property on this breakpoint s underlying marker  CoreException
public boolean is Access throws Core Exception Sets whether this breakpoint will suspend execution when its associated field is accessed If true and this watchpoint is disabled this watchpoint is automatically enabled If both access and modification are false this watchpoint is automatically disabled param access whether to suspend on field access exception Core Exception if unable to set the property on this breakpoint s underlying marker  isAccess CoreException CoreException
public void set Access boolean access throws Core Exception Returns whether this watchpoint is a modification watchpoint return whether this is a modification watchpoint exception Core Exception if unable to access the property on this breakpoint s underlying marker  setAccess CoreException CoreException
public boolean is Modification throws Core Exception Sets whether this breakpoint will suspend execution when its associated field is modified If true and this watchpoint is disabled this watchpoint is automatically enabled If both access and modification are false this watchpoint is automatically disabled param modification whether to suspend on field modification exception Core Exception if unable to set the property on this breakpoint s underlying marker  isModification CoreException CoreException
public void set Modification boolean modification throws Core Exception Returns the name of the field associated with this watchpoint return field the name of the field on which this watchpoint is installed exception Core Exception if unable to access the property on this breakpoint s underlying marker  setModification CoreException CoreException
public String get Field Name throws Core Exception Returns whether this breakpoint last suspended in this target due to an access code true code or modification code false code return code true code if this watchpoint last suspended the given target due to a field access code false code if this watchpoint last suspended the given target due to a modification access or if this watchpoint hasn t suspended the given target  getFieldName CoreException

Not to be instantiated private JDI Debug Model super  JDIDebugModel
Creates and returns a debug target for the given VM with the specified name and associates the debug target with the given process for console I O The allow terminate flag specifies whether the debug target will support termination code I Terminate code The allow disconnect flag specifies whether the debug target will support disconnection code I Disconnect code Launching the actual VM is a client responsibility By default the target VM will be resumed on startup The debug target is added to the given launch param launch the launch the new debug target will be contained in param vm the VM to create a debug target for param name the name to associate with the VM which will be returned from code I Debug Target get Name code If code null code the name will be retrieved from the underlying VM param process the process to associate with the debug target which will be returned from code I Debug Target get Process code param allow Terminate whether the target will support termianation param allow Disconnect whether the target will support disconnection return a debug target see org eclipse debug core model I Terminate see org eclipse debug core model I Disconnect since 2 0 public static I Debug Target new Debug Target I Launch launch Virtual Machine vm String name I Process process boolean allow Terminate boolean allow Disconnect return new Debug Target launch vm name process allow Terminate allow Disconnect true  ITerminate IDisconnect IDebugTarget getName IDebugTarget getProcess allowTerminate allowDisconnect ITerminate IDisconnect IDebugTarget newDebugTarget ILaunch VirtualMachine IProcess allowTerminate allowDisconnect newDebugTarget allowTerminate allowDisconnect
final I Java Debug Target target new I Java Debug Target 1 I Workspace Runnable r new I Workspace Runnable public void run I Progress Monitor m target 0 new JDI Debug Target launch vm name allow Terminate allow Disconnect process resume  IJavaDebugTarget IJavaDebugTarget IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor JDIDebugTarget allowTerminate allowDisconnect
Creates and returns a debug target for the given VM with the specified name and associates the debug target with the given process for console I O The allow terminate flag specifies whether the debug target will support termination code I Terminate code The allow disconnect flag specifies whether the debug target will support disconnection code I Disconnect code The resume flag specifies if the target VM should be resumed on startup has no effect if the VM was already running when the connection to the VM was esatbished Launching the actual VM is a client responsibility The debug target is added to the given launch param launch the launch the new debug target will be contained in param vm the VM to create a debug target for param name the name to associate with the VM which will be returned from code I Debug Target get Name code If code null code the name will be retrieved from the underlying VM param process the process to associate with the debug target which will be returned from code I Debug Target get Process code param allow Terminate whether the target will support termianation param allow Disconnect whether the target will support disconnection param resume whether the target is to be resumed on startup Has no effect if the target was already running when the connection to the VM was established return a debug target see org eclipse debug core model I Terminate see org eclipse debug core model I Disconnect since 2 0 public static I Debug Target new Debug Target final I Launch launch final Virtual Machine vm final String name final I Process process final boolean allow Terminate final boolean allow Disconnect final boolean resume final I Java Debug Target target new I Java Debug Target 1 I Workspace Runnable r new I Workspace Runnable public void run I Progress Monitor m target 0 new JDI Debug Target launch vm name allow Terminate allow Disconnect process resume try Resources Plugin get Workspace run r null 0 null catch Core Exception e JDI Debug Plugin log e return target 0  ITerminate IDisconnect IDebugTarget getName IDebugTarget getProcess allowTerminate allowDisconnect ITerminate IDisconnect IDebugTarget newDebugTarget ILaunch VirtualMachine IProcess allowTerminate allowDisconnect IJavaDebugTarget IJavaDebugTarget IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor JDIDebugTarget allowTerminate allowDisconnect ResourcesPlugin getWorkspace CoreException JDIDebugPlugin
Returns the identifier for the JDI debug model plug in return plugin identifier public static String get Plugin Identifier return JDI Debug Plugin get Unique Identifier  getPluginIdentifier JDIDebugPlugin getUniqueIdentifier
Registers the given listener for hot code replace notifications Has no effect if an identical listener is already registered param listener hot code replace listener see I Java Hot Code Replace Listener since 2 0 public static void add Hot Code Replace Listener I Java Hot Code Replace Listener listener JDI Debug Plugin get Default add Hot Code Replace Listener listener  IJavaHotCodeReplaceListener addHotCodeReplaceListener IJavaHotCodeReplaceListener JDIDebugPlugin getDefault addHotCodeReplaceListener
Deregisters the given listener for hot code replace notifications Has no effect if an identical listener is not already registered param listener hot code replace listener see I Java Hot Code Replace Listener since 2 0 public static void remove Hot Code Replace Listener I Java Hot Code Replace Listener listener JDI Debug Plugin get Default remove Hot Code Replace Listener listener  IJavaHotCodeReplaceListener removeHotCodeReplaceListener IJavaHotCodeReplaceListener JDIDebugPlugin getDefault removeHotCodeReplaceListener
Registers the given listener for breakpoint notifications Has no effect if an identical listener is already registered param listener breakpoint listener see I Java Breakpoint Listener since 2 0 public static void add Java Breakpoint Listener I Java Breakpoint Listener listener JDI Debug Plugin get Default add Java Breakpoint Listener listener  IJavaBreakpointListener addJavaBreakpointListener IJavaBreakpointListener JDIDebugPlugin getDefault addJavaBreakpointListener
Deregisters the given listener for breakpoint notifications Has no effect if an identical listener is not already registered param listener breakpoint listener see I Java Breakpoint Listener since 2 0 public static void remove Java Breakpoint Listener I Java Breakpoint Listener listener JDI Debug Plugin get Default remove Java Breakpoint Listener listener  IJavaBreakpointListener removeJavaBreakpointListener IJavaBreakpointListener JDIDebugPlugin getDefault removeJavaBreakpointListener
Creates and returns a line breakpoint in the type with the given name at the given line number The marker associated with the breakpoint will be created on the specified resource If a character range within the line is known it may be specified by char Start char End If hit Count is 0 the breakpoint will suspend execution when it is hit the specified number of times param resource the resource on which to create the associated breakpoint marker param type Name the fully qualified name of the type the breakpoint is to be installed in If the breakpoint is to be installed in an inner type it is sufficient to provide the name of the top level enclosing type If an inner class name is specified it should be formatted as the associated class file name i e with code code For example code example Some Class Inner Type code could be specified but code example Some Class code is sufficient param line Number the line Number on which the breakpoint is set line numbers are 1 based associated with the source file in which the breakpoint is set param char Start the first character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param char End the last character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param hit Count the number of times the breakpoint will be hit before suspending execution 0 if it should always suspend param register whether to add this breakpoint to the breakpoint manager param attributes a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation or code null code if none return a line breakpoint exception Core Exception If this method fails Reasons include ul li Failure creating underlying marker The exception s status contains the underlying exception responsible for the failure li ul since 2 0 public static I Java Line Breakpoint create Line Breakpoint I Resource resource String type Name int line Number int char Start int char End int hit Count boolean register Map attributes throws Core Exception if attributes null attributes new Hash Map 10 return new Java Line Breakpoint resource type Name line Number char Start char End hit Count register attributes  charStart charEnd hitCount typeName SomeClass InnerType SomeClass lineNumber lineNumber charStart charEnd hitCount CoreException IJavaLineBreakpoint createLineBreakpoint IResource typeName lineNumber charStart charEnd hitCount CoreException HashMap JavaLineBreakpoint typeName lineNumber charStart charEnd hitCount
Creates and returns a pattern breakpoint for the given resource at the given line number which is installed in all classes whose fully qualified name matches the given pattern If hit Count 0 the breakpoint will suspend execution when it is hit the specified number of times param resource the resource on which to create the associated breakpoint marker param source Name the name of the source file in which the breakpoint is set or code null code When specified the pattern breakpoint will install itself in classes that have a source file name debug attribute that matches this value and satisfies the class name pattern param pattern the class name pattern in which the pattern breakpoint should be installed The pattern breakpoint will install itself in every class which matches the pattern param line Number the line Number on which the breakpoint is set line numbers are 1 based associated with the source file in which the breakpoint is set param char Start the first character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param char End the last character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param hit Count the number of times the breakpoint will be hit before suspending execution 0 if it should always suspend param register whether to add this breakpoint to the breakpoint manager param attributes a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation or code null code if none return a pattern breakpoint exception Core Exception If this method fails Reasons include ul li Failure creating underlying marker The exception s status contains the underlying exception responsible for the failure li ul deprecated use code create Stratum Breakpoint code instead public static I Java Pattern Breakpoint create Pattern Breakpoint I Resource resource String source Name String pattern int line Number int char Start int char End int hit Count boolean register Map attributes throws Core Exception if attributes null attributes new Hash Map 10 return new Java Pattern Breakpoint resource source Name pattern line Number char Start char End hit Count register attributes  hitCount sourceName lineNumber lineNumber charStart charEnd hitCount CoreException createStratumBreakpoint IJavaPatternBreakpoint createPatternBreakpoint IResource sourceName lineNumber charStart charEnd hitCount CoreException HashMap JavaPatternBreakpoint sourceName lineNumber charStart charEnd hitCount
Creates and returns a line breakpoint identified by its source file name and or path and stratum that it is relative to param resource the resource on which to create the associated breakpoint marker param stratum the stratum in which the source name source path and line number are relative or code null code If code null code or if the specified stratum is not defined for a type the source name source path and line number are relative to the type s default stratum param source Name the simple name of the source file in which the breakpoint is set or code null code The breakpoint will install itself in classes that have a source file name debug attribute that matches this value in the specified stratum and satisfies the class name pattern and source path attribute When code null code the source file name debug attribute is not considered param source Path the qualified source file name in which the breakpoint is set or code null code The breakpoint will install itself in classes that have a source file path in the specified stratum that matches this value and satisfies the class name pattern and source name attribute When code null code the source path attribute is not considered param class Name Pattern the class name pattern to which the breakpoint should be restricted or code null code The breakpoint will install itself in each type that matches this class name pattern with a satisfying source name and source path Patterns may begin or end with which matches 0 or more characters A pattern that does not contain a is equivalent to a pattern ending in Specifying code null code or an empty string is the equivalent to param line Number the line Number on which the breakpoint is set line numbers are 1 based associated with the source file stratum in which the breakpoint is set param char Start the first character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param char End the last character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param hit Count the number of times the breakpoint will be hit before suspending execution 0 if it should always suspend param register whether to add this breakpoint to the breakpoint manager param attributes a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation or code null code if none return a stratum breakpoint exception Core Exception If this method fails Reasons include ul li Failure creating underlying marker The exception s status contains the underlying exception responsible for the failure li ul since 3 0 public static I Java Stratum Line Breakpoint create Stratum Breakpoint I Resource resource String stratum String source Name String source Path String class Name Pattern int line Number int char Start int char End int hit Count boolean register Map attributes throws Core Exception if attributes null attributes new Hash Map 10 return new Java Stratum Line Breakpoint resource stratum source Name source Path class Name Pattern line Number char Start char End hit Count register attributes  sourceName sourcePath classNamePattern lineNumber lineNumber charStart charEnd hitCount CoreException IJavaStratumLineBreakpoint createStratumBreakpoint IResource sourceName sourcePath classNamePattern lineNumber charStart charEnd hitCount CoreException HashMap JavaStratumLineBreakpoint sourceName sourcePath classNamePattern lineNumber charStart charEnd hitCount
Creates and returns a target pattern breakpoint for the given resource at the given line number Clients must set the class name pattern per target for this type of breakpoint If hit Count 0 the breakpoint will suspend execution when it is hit the specified number of times param resource the resource on which to create the associated breakpoint marker param source Name the name of the source file in which the breakpoint is set or code null code When specified the pattern breakpoint will install itself in classes that have a source file name debug attribute that matches this value and satisfies the class name pattern param line Number the line Number on which the breakpoint is set line numbers are 1 based associated with the source file in which the breakpoint is set param char Start the first character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param char End the last character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param hit Count the number of times the breakpoint will be hit before suspending execution 0 if it should always suspend param register whether to add this breakpoint to the breakpoint manager param attributes a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation or code null code if none return a target pattern breakpoint exception Core Exception If this method fails Reasons include ul li Failure creating underlying marker The exception s status contains the underlying exception responsible for the failure li ul public static I Java Target Pattern Breakpoint create Target Pattern Breakpoint I Resource resource String source Name int line Number int char Start int char End int hit Count boolean register Map attributes throws Core Exception if attributes null attributes new Hash Map 10 return new Java Target Pattern Breakpoint resource source Name line Number char Start char End hit Count register attributes  hitCount sourceName lineNumber lineNumber charStart charEnd hitCount CoreException IJavaTargetPatternBreakpoint createTargetPatternBreakpoint IResource sourceName lineNumber charStart charEnd hitCount CoreException HashMap JavaTargetPatternBreakpoint sourceName lineNumber charStart charEnd hitCount
Creates and returns an exception breakpoint for an exception with the given name The marker associated with the breakpoint will be created on the specified resource Caught and uncaught specify where the exception should cause thread suspensions that is in caught and or uncaught locations Checked indicates if the given exception is a checked exception param resource the resource on which to create the associated breakpoint marker param exception Name the fully qualified name of the exception for which to create the breakpoint param caught whether to suspend in caught locations param uncaught whether to suspend in uncaught locations param checked whether the exception is a checked exception i e compiler detected param register whether to add this breakpoint to the breakpoint manager param attributes a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation or code null code if none return an exception breakpoint exception Core Exception If this method fails Reasons include ul li Failure creating underlying marker The exception s status contains the underlying exception responsible for the failure li ul since 2 0 public static I Java Exception Breakpoint create Exception Breakpoint I Resource resource String exception Name boolean caught boolean uncaught boolean checked boolean register Map attributes throws Core Exception if attributes null attributes new Hash Map 10 return new Java Exception Breakpoint resource exception Name caught uncaught checked register attributes  exceptionName CoreException IJavaExceptionBreakpoint createExceptionBreakpoint IResource exceptionName CoreException HashMap JavaExceptionBreakpoint exceptionName
Creates and returns a watchpoint on a field with the given name in a type with the given name The marker associated with the breakpoint will be created on the specified resource If hit Count 0 the breakpoint will suspend execution when it is hit the specified number of times param resource the resource on which to create the associated breakpoint marker param type Name the fully qualified name of the type the breakpoint is to be installed in If the breakpoint is to be installed in an inner type it is sufficient to provide the name of the top level enclosing type If an inner class name is specified it should be formatted as the associated class file name i e with code code For example code example Some Class Inner Type code could be specified but code example Some Class code is sufficient param field Name the name of the field on which to suspend on access or modification param line Number the line Number on which the breakpoint is set line numbers are 1 based associated with the source file in which the breakpoint is set param char Start the first character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param char End the last character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param hit Count the number of times the breakpoint will be hit before suspending execution 0 if it should always suspend param register whether to add this breakpoint to the breakpoint manager param attributes a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation or code null code if none return a watchpoint exception Core Exception If this method fails Reasons include ul li Failure creating underlying marker The Core Exception s status contains the underlying exception responsible for the failure li ul since 2 0 public static I Java Watchpoint create Watchpoint I Resource resource String type Name String field Name int line Number int char Start int char End int hit Count boolean register Map attributes throws Core Exception if attributes null attributes new Hash Map 10 return new Java Watchpoint resource type Name field Name line Number char Start char End hit Count register attributes  hitCount typeName SomeClass InnerType SomeClass fieldName lineNumber lineNumber charStart charEnd hitCount CoreException CoreException IJavaWatchpoint createWatchpoint IResource typeName fieldName lineNumber charStart charEnd hitCount CoreException HashMap JavaWatchpoint typeName fieldName lineNumber charStart charEnd hitCount
Creates and returns a method breakpoint with the specified criteria param resource the resource on which to create the associated breakpoint marker param type Pattern the pattern specifying the fully qualified name of type s this breakpoint suspends execution in Patterns are limited to exact matches and patterns that begin or end with param method Name the name of the method s this breakpoint suspends execution in or code null code if this breakpoint does not suspend execution based on method name param method Signature the signature of the method s this breakpoint suspends execution in or code null code if this breakpoint does not suspend exectution based on method signature param entry whether this breakpoint causes execution to suspend on entry of methods param exit whether this breakpoint causes execution to suspend on exit of methods param native Only whether this breakpoint causes execution to suspend on entry exit of native methods only param line Number the line Number on which the breakpoint is set line numbers are 1 based associated with the source file in which the breakpoint is set param char Start the first character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param char End the last character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param hit Count the number of times the breakpoint will be hit before suspending execution 0 if it should always suspend param register whether to add this breakpoint to the breakpoint manager param attributes a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation or code null code if none return a method breakpoint exception Core Exception If this method fails Reasons include ul li Failure creating underlying marker The exception s status contains the underlying exception responsible for the failure li ul since 2 0 public static I Java Method Breakpoint create Method Breakpoint I Resource resource String type Pattern String method Name String method Signature boolean entry boolean exit boolean native Only int line Number int char Start int char End int hit Count boolean register Map attributes throws Core Exception if attributes null attributes new Hash Map 10 return new Java Method Breakpoint resource type Pattern method Name method Signature entry exit native Only line Number char Start char End hit Count register attributes  typePattern methodName methodSignature nativeOnly lineNumber lineNumber charStart charEnd hitCount CoreException IJavaMethodBreakpoint createMethodBreakpoint IResource typePattern methodName methodSignature nativeOnly lineNumber charStart charEnd hitCount CoreException HashMap JavaMethodBreakpoint typePattern methodName methodSignature nativeOnly lineNumber charStart charEnd hitCount
Creates and returns a method entry breakpoint with the specified criteria A method entry breakpoint will only be installed for methods that have executable code i e will not work for native methods param resource the resource on which to create the associated breakpoint marker param type Name the fully qualified name of type this breakpoint suspends execution in param method Name the name of the method this breakpoint suspends execution in param method Signature the signature of the method this breakpoint suspends execution in param line Number the line Number on which the breakpoint is set line numbers are 1 based associated with the source file in which the breakpoint is set param char Start the first character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param char End the last character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param hit Count the number of times the breakpoint will be hit before suspending execution 0 if it should always suspend param register whether to add this breakpoint to the breakpoint manager param attributes a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation or code null code if none return a method entry breakpoint exception Core Exception If this method fails Reasons include ul li Failure creating underlying marker The exception s status contains the underlying exception responsible for the failure li ul since 2 0 public static I Java Method Entry Breakpoint create Method Entry Breakpoint I Resource resource String type Name String method Name String method Signature int line Number int char Start int char End int hit Count boolean register Map attributes throws Core Exception if attributes null attributes new Hash Map 10 return new Java Method Entry Breakpoint resource type Name method Name method Signature line Number char Start char End hit Count register attributes  typeName methodName methodSignature lineNumber lineNumber charStart charEnd hitCount CoreException IJavaMethodEntryBreakpoint createMethodEntryBreakpoint IResource typeName methodName methodSignature lineNumber charStart charEnd hitCount CoreException HashMap JavaMethodEntryBreakpoint typeName methodName methodSignature lineNumber charStart charEnd hitCount
Returns a Java line breakpoint that is already registered with the breakpoint manager for a type with the given name at the given line number param type Name fully qualified type name param line Number line number return a Java line breakpoint that is already registered with the breakpoint manager for a type with the given name at the given line number or code null code if no such breakpoint is registered exception Core Exception if unable to retrieve the associated marker attributes line number public static I Java Line Breakpoint line Breakpoint Exists String type Name int line Number throws Core Exception String model Id get Plugin Identifier String marker Type Java Line Breakpoint get Marker Type I Breakpoint Manager manager Debug Plugin get Default get Breakpoint Manager I Breakpoint breakpoints manager get Breakpoints model Id for int i 0 i breakpoints length i if breakpoints i instanceof I Java Line Breakpoint continue I Java Line Breakpoint breakpoint I Java Line Breakpoint breakpoints i I Marker marker breakpoint get Marker if marker null marker exists marker get Type equals marker Type String breakpoint Type Name breakpoint get Type Name if breakpoint Type Name equals type Name breakpoint Type Name starts With type Name if breakpoint get Line Number line Number return breakpoint return null  typeName lineNumber CoreException IJavaLineBreakpoint lineBreakpointExists typeName lineNumber CoreException modelId getPluginIdentifier markerType JavaLineBreakpoint getMarkerType IBreakpointManager DebugPlugin getDefault getBreakpointManager IBreakpoint getBreakpoints modelId IJavaLineBreakpoint IJavaLineBreakpoint IJavaLineBreakpoint IMarker getMarker getType markerType breakpointTypeName getTypeName breakpointTypeName typeName breakpointTypeName startsWith typeName getLineNumber lineNumber
Returns the preference store for this plug in or code null code if the store is not available return the preference store for this plug in since 2 0 public static Preferences get Preferences JDI Debug Plugin deflt JDI Debug Plugin get Default if deflt null return deflt get Plugin Preferences return null  getPreferences JDIDebugPlugin JDIDebugPlugin getDefault getPluginPreferences
Saves the preference store for this plug in since 2 0 public static void save Preferences JDI Debug Plugin get Default save Plugin Preferences  savePreferences JDIDebugPlugin getDefault savePluginPreferences
Creates and returns a class prepare breakpoint for a type with the given name The marker associated with the breakpoint will be created on the specified resource param resource the resource on which to create the associated breakpoint marker param type Name the fully qualified name of the type for which to create the breakpoint param member Type one of code TYPE CLASS code or code TYPE INTERFACE code param char Start the first character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param char End the last character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param register whether to add this breakpoint to the breakpoint manager param attributes a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation or code null code if none return a class prepare breakpoint exception Core Exception If this method fails Reasons include ul li Failure creating underlying marker The exception s status contains the underlying exception responsible for the failure li ul since 3 0 public static I Java Class Prepare Breakpoint create Class Prepare Breakpoint I Resource resource String type Name int member Type int char Start int char End boolean register Map attributes throws Core Exception if attributes null attributes new Hash Map 10 return new Java Class Prepare Breakpoint resource type Name member Type char Start char End register attributes  typeName memberType TYPE_CLASS TYPE_INTERFACE charStart charEnd CoreException IJavaClassPrepareBreakpoint createClassPrepareBreakpoint IResource typeName memberType charStart charEnd CoreException HashMap JavaClassPrepareBreakpoint typeName memberType charStart charEnd

Not to be instantiated private Evaluation Manager  EvaluationManager
Creates and returns a new evaluation engine that performs evaluations for local Java applications by deploying class files param project the Java project in which expressions are to be compiled param target the Java debug target in which expressions are to be evaluated param directory the directory where support class files are deployed to assist in the evaluation The directory must exist return an evaluation engine public static I Class File Evaluation Engine new Class File Evaluation Engine I Java Project project I Java Debug Target target File directory return new Local Evaluation Engine project target directory  IClassFileEvaluationEngine newClassFileEvaluationEngine IJavaProject IJavaDebugTarget LocalEvaluationEngine
Creates and returns a new evaluation engine that performs evaluations by compiling expressions into abstract syntax trees AS Ts and interpreting the AST over a JDI connection This type of evaluation engine is capable of performing remote evaluations param project the Java project in which expressions are to be compiled param target the Java debug target in which expressions are to be evaluated return an evaluation engine public static I Ast Evaluation Engine new Ast Evaluation Engine I Java Project project I Java Debug Target target return new AST Evaluation Engine project target  ASTs IAstEvaluationEngine newAstEvaluationEngine IJavaProject IJavaDebugTarget ASTEvaluationEngine

Asynchronously evaluates the given expression in the context of the specified stack frame reporting the result back to the given listener The thread is resumed from the location at which it is currently suspended to perform the evaluation When the evaluation completes the thread will be suspened at this original location The thread runs the evaluation with the given evaluation detail see I Java Thread run Evaluation I Evaluation Runnable I Progress Monitor int Compilation and runtime errors are reported in the evaluation result param expression expression to evaluate param frame the stack frame context in which to run the evaluation param listener the listener that will receive notification when if the evalaution completes param evaluation Detail one of code Debug Event EVALUATION code or code Debug Event EVALUATION IMPLICIT code param hit Breakpoints whether or not breakpoints should be honored in the evaluation thread during the evaluation If code false code breakpoints hit in the evaluation thread will be ignored exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li The associated thread is not currently suspended li li The stack frame is not contained in the debug target associated with this evaluation engine li li The associated thread is suspended in the middle of an evaluation that has not completed It is not possible to perform nested evaluations li ul  IJavaThread runEvaluation IEvaluationRunnable IProgressMonitor evaluationDetail DebugEvent DebugEvent EVALUATION_IMPLICIT hitBreakpoints DebugException DebugException
Asynchronously evaluates the given expression in the context of the specified type reporting the result back to the given listener The expression is evaluated in the context of the Java project this evaluation engine was created on If the expression is determined to have no errors the expression is evaluated in the thread associated with the given stack frame When the evaluation completes the thread will be suspened at this original location The thread runs the evaluation with the given evaluation detail see I Java Thread run Evaluation I Evaluation Runnable I Progress Monitor int Compilation and runtime errors are reported in the evaluation result param expression the expression to evaluate param object the this context for the evaluation param thread the thread in which to run the evaluation which must be suspended param listener the listener that will receive notification when if the evalaution completes param evaluation Detail one of code Debug Event EVALUATION code or code Debug Event EVALUATION IMPLICIT code param hit Breakpoints whether or not breakpoints should be honored in the evaluation thread during the evaluation If code false code breakpoints hit in the evaluation thread will be ignored exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li The associated thread is not currently suspended li li The stack frame is not contained in the debug target associated with this evaluation engine li li The associated thread is suspended in the middle of an evaluation that has not completed It is not possible to perform nested evaluations li ul  IJavaThread runEvaluation IEvaluationRunnable IProgressMonitor evaluationDetail DebugEvent DebugEvent EVALUATION_IMPLICIT hitBreakpoints DebugException DebugException
Synchronously generates a compiled expression from the given expression in the context of the specified stack frame The generated expression can be stored and evaluated later in a valid runtime context Compilation errors are reported in the returned compiled expression param expression expression to compile param frame the context in which to compile the expression exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li The associated thread is not currently suspended li li The stack frame is not contained in the debug target associated with this evaluation engine li ul  DebugException DebugException
Synchronously generates a compiled expression from the given expression in the context of the specified object The generated expression can be stored and evaluated later in a valid runtime context Compilation errors are reported in the returned compiled expression param expression expression to compile param object the context in which to compile the expression exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li The associated thread is not currently suspended li li The stack frame is not contained in the debug target associated with this evaluation engine li ul  DebugException DebugException

public interface I Class File Evaluation Engine extends I Evaluation Engine Returns the import declarations for this evaluation context An empty list indicates there are no imports The syntax for the import corresponds to a fully qualified type name or to an on demand package name as defined by Import Declaration JLS2 7 5 For example code java util Hashtable code or code java util code return the list of import names  IClassFileEvaluationEngine IEvaluationEngine ImportDeclaration
Sets the import declarations for this evaluation context An empty list indicates there are no imports The syntax for the import corresponds to a fully qualified type name or to an on demand package name as defined by Import Declaration JLS2 7 5 For example code java util Hashtable code or code java util code param imports the list of import names  ImportDeclaration
Asynchronously evaluates the given snippet in the specified target thread reporting the result back to the given listener The snippet is evaluated in the context of the Java project this evaluation engine was created on If the snippet is determined to be a valid expression the expression is evaluated in the specified thread which resumes its execution from the location at which it is currently suspended When the evaluation completes the thread will be suspened at this original location Compilation and runtime errors are reported in the evaluation result param snippet code snippet to evaluate param thread the thread in which to run the evaluation which must be suspended param listener the listener that will receive notification when if the evalaution completes param hit Breakpoints whether or not breakpoints should be honored in the evaluation thread during the evaluation If code false code breakpoints hit in the evaluation thread will be ignored exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li The specified thread is not currently suspended li li The specified thread is not contained in the debug target associated with this evaluation engine li li The specified thread is suspended in the middle of an evaluation that has not completed It is not possible to perform nested evaluations li ul  hitBreakpoints DebugException DebugException

Returns the source snippet from which this compiled expression was created return the source snippet from which this compiled expression was created 
Returns whether this compiled expression has any compilation errors return whether this compiled expression has any compilation errors 
Returns any errors which occurred while creating this compiled expression return any errors which occurred while creating this compiled expression deprecated use get Error Messages  getErrorMessages
Returns an array of problem messages Each message describes a problem that occurred while while creating this compiled expression return error messages or an empty array if no errors occurred since 2 1 

public interface I Evaluation Engine Asynchronously evaluates the given snippet in the context of the specified stack frame reporting the result back to the given listener The snippet is evaluated in the context of the Java project this evaluation engine was created on If the snippet is determined to be a valid expression the expression is evaluated in the thread associated with the given stack frame The thread is resumed from the location at which it is currently suspended to perform the evaluation When the evaluation completes the thread will be suspened at this original location The thread runs the evaluation with the given evaluation detail see I Java Thread run Evaluation I Evaluation Runnable I Progress Monitor int Compilation and runtime errors are reported in the evaluation result param snippet code snippet to evaluate param frame the stack frame context in which to run the evaluation param listener the listener that will receive notification when if the evalaution completes param evaluation Detail one of code Debug Event EVALUATION code or code Debug Event EVALUATION IMPLICIT code param hit Breakpoints whether or not breakpoints should be honored in the evaluation thread during the evaluation If code false code breakpoints hit in the evaluation thread will be ignored exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li The associated thread is not currently suspended li li The stack frame is not contained in the debug target associated with this evaluation engine li li The associated thread is suspended in the middle of an evaluation that has not completed It is not possible to perform nested evaluations li ul  IEvaluationEngine IJavaThread runEvaluation IEvaluationRunnable IProgressMonitor evaluationDetail DebugEvent DebugEvent EVALUATION_IMPLICIT hitBreakpoints DebugException DebugException
public void evaluate String snippet I Java Stack Frame frame I Evaluation Listener listener int evaluation Detail boolean hit Breakpoints throws Debug Exception Asynchronously evaluates the given snippet in the context of the specified type reporting the result back to the given listener The snippet is evaluated in the context of the Java project this evaluation engine was created on If the snippet is determined to be a valid expression the expression is evaluated in the thread associated with the given stack frame The thread is resumed from the location at which it is currently suspended to perform the evaluation When the evaluation completes the thread will be suspened at this original location The thread runs the evaluation with the given evaluation detail see I Java Thread run Evaluation I Evaluation Runnable I Progress Monitor int Compilation and runtime errors are reported in the evaluation result param snippet code snippet to evaluate param this Context the this context for the evaluation param thread the thread in which to run the evaluation which must be suspended param listener the listener that will receive notification when if the evalaution completes param evaluation Detail one of code Debug Event EVALUATION code or code Debug Event EVALUATION IMPLICIT code param hit Breakpoints whether or not breakpoints should be honored in the evaluation thread during the evaluation If code false code breakpoints hit in the evaluation thread will be ignored exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li The associated thread is not currently suspended li li The specified thread is not contained in the debug target associated with this evaluation engine li li The associated thread is suspended in the middle of an evaluation that has not completed It is not possible to perform nested evaluations li ul  IJavaStackFrame IEvaluationListener evaluationDetail hitBreakpoints DebugException IJavaThread runEvaluation IEvaluationRunnable IProgressMonitor thisContext evaluationDetail DebugEvent DebugEvent EVALUATION_IMPLICIT hitBreakpoints DebugException DebugException
Returns the Java project in which snippets are compliled return Java project context 
Returns the debug target for which evaluations are executed return Java debug target 
Disposes this evaluation engine This causes the evaluation engine to cleanup any resources such as threads that it maintains Clients should call this method when they are finished performing evaluations with this engine This engine must not be used to perform evaluations after it has been disposed 

Notifies this listener that an evaluation has completed with the given result param result The result from the evaluation see I Evaluation Result  IEvaluationResult

Returns the value representing the result of the evaluation or code null code if the associated evaluation failed If the associated evaluation failed there will be problems or an exception in this result return the resulting value possibly code null code 
Returns whether the evaluation had any problems or if an exception occurred while performing the evaluation return whether there were any problems see get Errors see get Exception  getErrors getException
Returns an array of problem messages Each message describes a problem that occurred while compiling the snippet return compilation error messages or an empty array if no errors occurred deprecated use get Error Messages  getErrorMessages
Returns an array of problem messages Each message describes a problem that occurred while compiling the snippet return compilation error messages or an empty array if no errors occurred since 2 1 
Returns the snippet that was evaluated return The string code snippet 
Returns any exception that occurred while performing the evaluation or code null code if an exception did not occur The exception will be a debug exception or a debug exception that wrappers a JDI exception that indicates a problem communicating with the target or with actually performing some action in the target return The exception that occurred during the evaluation see com sun jdi Invocation Exception see org eclipse debug core Debug Exception  InvocationException DebugException
Returns the thread in which the evaluation was performed return the thread in which the evaluation was performed 
Returns the evaluation engine used to evaluate the original snippet return the evaluation engine used to evaluate the original snippet 

Constructs a dialog to manipulate the source lookup path of the given launch configuration The source lookup path is retrieved from the given launch configuration based on the attributes code I Java Launch Configuration Constants ATTR DEFAULT SOURCE PATH code and code I Java Launch Configuration Constants ATTR SOURCE PATH code If the user changes the source lookup path and presses ok the launch configuration is updated with the new source lookup path param shell the shell to open the dialog on param message the message to display in the dialog param configuration the launch configuration from which the source lookup path is retrieved and possibly updated public Java Source Lookup Dialog Shell shell String message I Launch Configuration configuration super shell f Source Lookup Block new Source Lookup Block f Message message f Not Ask Again false f Ask Again Check Box null f Configuration configuration  IJavaLaunchConfigurationConstants ATTR_DEFAULT_SOURCE_PATH IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH JavaSourceLookupDialog ILaunchConfiguration fSourceLookupBlock SourceLookupBlock fMessage fNotAskAgain fAskAgainCheckBox fConfiguration
Returns whether the do not ask again check box is selected in the dialog return whether the do not ask again check box is selected in the dialog public boolean is Not Ask Again return f Not Ask Again  isNotAskAgain fNotAskAgain
protected Control create Dialog Area Composite parent Font font parent get Font initialize Dialog Units parent get Shell set Text Launcher Messages get String JavaUI Source Locator selectprojects title NON NLS 1 Composite composite Composite super create Dialog Area parent composite set Layout new Grid Layout composite set Font font int pixel Width convert Width In Chars To Pixels 70 Label message new Label composite SWT LEFT SWT WRAP message set Text f Message Grid Data data new Grid Data data width Hint pixel Width message set Layout Data data message set Font font f Source Lookup Block create Control composite Control inner f Source Lookup Block get Control f Source Lookup Block initialize From f Configuration Grid Data gd new Grid Data Grid Data FILL BOTH int height Display get Current get Bounds height gd height Hint int 0 4f height inner set Layout Data gd f Ask Again Check Box new Button composite SWT CHECK SWT WRAP data new Grid Data data width Hint pixel Width f Ask Again Check Box set Layout Data data f Ask Again Check Box set Font font f Ask Again Check Box set Text Launcher Messages get String JavaUI Source Locator askagain message NON NLS 1 return composite  createDialogArea getFont initializeDialogUnits getShell setText LauncherMessages getString JavaUISourceLocator createDialogArea setLayout GridLayout setFont pixelWidth convertWidthInCharsToPixels setText fMessage GridData GridData widthHint pixelWidth setLayoutData setFont fSourceLookupBlock createControl fSourceLookupBlock getControl fSourceLookupBlock initializeFrom fConfiguration GridData GridData GridData FILL_BOTH getCurrent getBounds heightHint setLayoutData fAskAgainCheckBox GridData widthHint pixelWidth fAskAgainCheckBox setLayoutData fAskAgainCheckBox setFont fAskAgainCheckBox setText LauncherMessages getString JavaUISourceLocator
protected void ok Pressed try if f Ask Again Check Box null f Not Ask Again f Ask Again Check Box get Selection I Launch Configuration Working Copy wc f Configuration get Working Copy f Source Lookup Block perform Apply wc if f Configuration contents Equal wc f Configuration wc do Save catch Core Exception e JDI DebugUI Plugin log e super ok Pressed  okPressed fAskAgainCheckBox fNotAskAgain fAskAgainCheckBox getSelection ILaunchConfigurationWorkingCopy fConfiguration getWorkingCopy fSourceLookupBlock performApply fConfiguration contentsEqual fConfiguration doSave CoreException JDIDebugUIPlugin okPressed

Constructs an empty source locator public JavaUI Source Locator f Source Locator new Java Source Locator f Allowed To Ask true  JavaUISourceLocator fSourceLocator JavaSourceLocator fAllowedToAsk
Constructs a new source locator that looks in the specified project for source and required projects if code include Required code is code true code param projects the projects in which to look for source param include Required whether to look in required projects as well public JavaUI Source Locator I Java Project projects boolean include Required throws Java Model Exception f Source Locator new Java Source Locator projects include Required f Allowed To Ask true  includeRequired includeRequired JavaUISourceLocator IJavaProject includeRequired JavaModelException fSourceLocator JavaSourceLocator includeRequired fAllowedToAsk
Constructs a source locator that searches for source in the given Java project and all of its required projects as specified by its build path or default source lookup settings param project Java project exception Core Exception if unable to read the project s build path public JavaUI Source Locator I Java Project project throws Core Exception f Java Project project I Java Source Location sls Java Source Locator get Default Source Locations project f Source Locator new Java Source Locator project if sls null f Source Locator set Source Locations sls f Allowed To Ask true  CoreException JavaUISourceLocator IJavaProject CoreException fJavaProject IJavaSourceLocation JavaSourceLocator getDefaultSourceLocations fSourceLocator JavaSourceLocator fSourceLocator setSourceLocations fAllowedToAsk
see org eclipse debug core model I Source Locator get Source Element I Stack Frame public Object get Source Element I Stack Frame stack Frame Object res find Source Element stack Frame if res null f Allowed To Ask I Java Stack Frame frame I Java Stack Frame stack Frame get Adapter I Java Stack Frame class if frame null try if frame is Obsolete show Debug Source Page frame res f Source Locator get Source Element stack Frame catch Debug Exception e return res  ISourceLocator getSourceElement IStackFrame getSourceElement IStackFrame stackFrame findSourceElement stackFrame fAllowedToAsk IJavaStackFrame IJavaStackFrame stackFrame getAdapter IJavaStackFrame isObsolete showDebugSourcePage fSourceLocator getSourceElement stackFrame DebugException
private Object find Source Element I Stack Frame stack Frame if is Find All Source Elements Object source Elements f Source Locator get Source Elements stack Frame if source Elements null source Elements length 0 return null if source Elements length 1 return source Elements 0 try I Java Stack Frame frame I Java Stack Frame stack Frame I Java Class Type type frame get Declaring Type Object cached Source get Source Element type if cached Source null return cached Source prompt Two Pane Element Selector dialog new Two Pane Element Selector JDI DebugUI Plugin get Active Workbench Shell new Source Element Label Provider new Source Element Qualifier Provider dialog set Title DebugUI Messages get String JavaUI Source Locator Select Source 1 NON NLS 1 dialog set Message Message Format format DebugUI Messages get String JavaUI Source Locator Select the source that corresponds to  0  2 new String type get Name NON NLS 1 dialog set Elements source Elements dialog set Multiple Selection false dialog set Upper List Label DebugUI Messages get String JavaUI Source Locator Matching files  3 NON NLS 1 dialog set Lower List Label DebugUI Messages get String JavaUI Source Locator Location  4 NON NLS 1 dialog open Object result dialog get Result if result null return null Object source Element result 0 cache Source Element source Element type return source Element catch Core Exception e JDI DebugUI Plugin log e return source Elements 0 else return f Source Locator get Source Element stack Frame  findSourceElement IStackFrame stackFrame isFindAllSourceElements sourceElements fSourceLocator getSourceElements stackFrame sourceElements sourceElements sourceElements sourceElements IJavaStackFrame IJavaStackFrame stackFrame IJavaClassType getDeclaringType cachedSource getSourceElement cachedSource cachedSource TwoPaneElementSelector TwoPaneElementSelector JDIDebugUIPlugin getActiveWorkbenchShell SourceElementLabelProvider SourceElementQualifierProvider setTitle DebugUIMessages getString JavaUISourceLocator Select_Source_1 setMessage MessageFormat DebugUIMessages getString JavaUISourceLocator Select_the_source_that_corresponds_to_ _2 getName setElements sourceElements setMultipleSelection setUpperListLabel DebugUIMessages getString JavaUISourceLocator Matching_files__3 setLowerListLabel DebugUIMessages getString JavaUISourceLocator Location__4 getResult sourceElement cacheSourceElement sourceElement sourceElement CoreException JDIDebugUIPlugin sourceElements fSourceLocator getSourceElement stackFrame
private Object get Source Element I Java Class Type type if f Types To Source null return null return f Types To Source get type  getSourceElement IJavaClassType fTypesToSource fTypesToSource
private void cache Source Element Object source Element I Java Class Type type if f Types To Source null f Types To Source new Hash Map f Types To Source put type source Element  cacheSourceElement sourceElement IJavaClassType fTypesToSource fTypesToSource HashMap fTypesToSource sourceElement
Runnable prompter new Runnable public void run try String message Launcher Messages get Formatted String JavaUI Source Locator selectprojects message frame get Declaring Type Name NON NLS 1 I Launch Configuration configuration frame get Launch get Launch Configuration Java Source Lookup Dialog dialog new Java Source Lookup Dialog JDI DebugUI Plugin get Active Workbench Shell message configuration int result dialog open if result Window OK f Allowed To Ask dialog is Not Ask Again JavaUI Source Locator this initialize Defaults configuration catch Core Exception e only report an error if the thread has not resumed if e get Status get Code I Java Thread ERR THREAD NOT SUSPENDED JDI DebugUI Plugin log e  LauncherMessages getFormattedString JavaUISourceLocator getDeclaringTypeName ILaunchConfiguration getLaunch getLaunchConfiguration JavaSourceLookupDialog JavaSourceLookupDialog JDIDebugUIPlugin getActiveWorkbenchShell fAllowedToAsk isNotAskAgain JavaUISourceLocator initializeDefaults CoreException getStatus getCode IJavaThread ERR_THREAD_NOT_SUSPENDED JDIDebugUIPlugin
Prompts to locate the source of the given type Prompts in the UI thread since a source lookup could be the result of a conditional breakpoint looking up source for an evaluation from the event dispatch thread param type Name the name of the type for which source could not be located private void show Debug Source Page final I Java Stack Frame frame Runnable prompter new Runnable public void run try String message Launcher Messages get Formatted String JavaUI Source Locator selectprojects message frame get Declaring Type Name NON NLS 1 I Launch Configuration configuration frame get Launch get Launch Configuration Java Source Lookup Dialog dialog new Java Source Lookup Dialog JDI DebugUI Plugin get Active Workbench Shell message configuration int result dialog open if result Window OK f Allowed To Ask dialog is Not Ask Again JavaUI Source Locator this initialize Defaults configuration catch Core Exception e only report an error if the thread has not resumed if e get Status get Code I Java Thread ERR THREAD NOT SUSPENDED JDI DebugUI Plugin log e JDI DebugUI Plugin get Standard Display sync Exec prompter  typeName showDebugSourcePage IJavaStackFrame LauncherMessages getFormattedString JavaUISourceLocator getDeclaringTypeName ILaunchConfiguration getLaunch getLaunchConfiguration JavaSourceLookupDialog JavaSourceLookupDialog JDIDebugUIPlugin getActiveWorkbenchShell fAllowedToAsk isNotAskAgain JavaUISourceLocator initializeDefaults CoreException getStatus getCode IJavaThread ERR_THREAD_NOT_SUSPENDED JDIDebugUIPlugin JDIDebugUIPlugin getStandardDisplay syncExec
see I Persistable Source Locator get Memento public String get Memento throws Core Exception String memento f Source Locator get Memento String handle f Java Project get Handle Identifier String find All new Boolean is Find All Source Elements to String String Buffer buffer new String Buffer buffer append project NON NLS 1 buffer append handle buffer append project NON NLS 1 buffer append find All NON NLS 1 buffer append find All buffer append find All NON NLS 1 buffer append memento return buffer to String  IPersistableSourceLocator getMemento getMemento CoreException fSourceLocator getMemento fJavaProject getHandleIdentifier findAll isFindAllSourceElements toString StringBuffer StringBuffer findAll findAll findAll toString
see I Persistable Source Locator initialize Defaults I Launch Configuration public void initialize Defaults I Launch Configuration configuration throws Core Exception f Source Locator initialize Defaults configuration f Java Project Java Runtime get Java Project configuration f Is Find All Source Elements configuration get Attribute ATTR FIND ALL SOURCE ELEMENTS false  IPersistableSourceLocator initializeDefaults ILaunchConfiguration initializeDefaults ILaunchConfiguration CoreException fSourceLocator initializeDefaults fJavaProject JavaRuntime getJavaProject fIsFindAllSourceElements getAttribute ATTR_FIND_ALL_SOURCE_ELEMENTS
see I Persistable Source Locator initialize From Memento String public void initialize From Memento String memento throws Core Exception if memento starts With project NON NLS 1 int index memento index Of project NON NLS 1 if index 0 String handle memento substring 9 index int start index 19 index memento index Of find All start NON NLS 1 if index 0 String find All memento substring start index Boolean all new Boolean find All String rest memento substring index 10 f Java Project I Java Project Java Core create handle f Is Find All Source Elements all boolean Value f Source Locator initialize From Memento rest else OLD FORMAT int index memento index Of n String handle memento substring 0 index String rest memento substring index 1 f Java Project I Java Project Java Core create handle f Is Find All Source Elements false f Source Locator initialize From Memento rest  IPersistableSourceLocator initializeFromMemento initializeFromMemento CoreException startsWith indexOf indexOf findAll findAll findAll fJavaProject IJavaProject JavaCore fIsFindAllSourceElements booleanValue fSourceLocator initializeFromMemento indexOf fJavaProject IJavaProject JavaCore fIsFindAllSourceElements fSourceLocator initializeFromMemento
see Java Source Locator get Source Locations public I Java Source Location get Source Locations return f Source Locator get Source Locations  JavaSourceLocator getSourceLocations IJavaSourceLocation getSourceLocations fSourceLocator getSourceLocations
see Java Source Locator set Source Locations I Java Source Location public void set Source Locations I Java Source Location locations f Source Locator set Source Locations locations  JavaSourceLocator setSourceLocations IJavaSourceLocation setSourceLocations IJavaSourceLocation fSourceLocator setSourceLocations
Returns whether this source locator is configured to search for all source elements that correspond to a stack frame When code false code is returned searching stops on the first match If there is more than one source element that corresponds to a stack frame the user is prompted to choose a source element to open return whether this source locator is configured to search for all source elements that correspond to a stack frame since 2 1 public boolean is Find All Source Elements return f Is Find All Source Elements  isFindAllSourceElements fIsFindAllSourceElements
Sets whether this source locator is configured to search for all source elements that correspond to a stack frame or the first match param find All whether this source locator should search for all source elements that correspond to a stack frame since 2 1 public void set Find All Source Element boolean find All f Is Find All Source Elements find All  findAll setFindAllSourceElement findAll fIsFindAllSourceElements findAll

see org eclipse jdt debug ui launch Configurations Java Arguments Tab create Working Dir Block protected Working Directory Block create Working Dir Block return new Applet Working Directory Block  launchConfigurations JavaArgumentsTab createWorkingDirBlock WorkingDirectoryBlock createWorkingDirBlock AppletWorkingDirectoryBlock
see org eclipse jdt debug ui launch Configurations Java Arguments Tab set Help Context Id protected void set Help Context Id Workbench Help set Help get Control I Java Debug Help Context Ids LAUNCH CONFIGURATION DIALOG APPLET ARGUMENTS TAB  launchConfigurations JavaArgumentsTab setHelpContextId setHelpContextId WorkbenchHelp setHelp getControl IJavaDebugHelpContextIds LAUNCH_CONFIGURATION_DIALOG_APPLET_ARGUMENTS_TAB

private Modify Listener f Modify Listener new Modify Listener public void modify Text Modify Event e update Launch Configuration Dialog  ModifyListener fModifyListener ModifyListener modifyText ModifyEvent updateLaunchConfigurationDialog
private Selection Adapter f Selection Listener new Selection Adapter public void widget Selected Selection Event e Object source e get Source if source f Search Button handle Search Button Selected else if source f Proj Button handle Project Button Selected else if source f Applet Viewer Class Default Button handle Applet Viewer Class Default Selected  SelectionAdapter fSelectionListener SelectionAdapter widgetSelected SelectionEvent getSource fSearchButton handleSearchButtonSelected fProjButton handleProjectButtonSelected fAppletViewerClassDefaultButton handleAppletViewerClassDefaultSelected
see org eclipse debug ui I Launch Configuration Tab create Control Composite public void create Control Composite parent Font font parent get Font Composite proj Comp new Composite parent SWT NONE set Control proj Comp Workbench Help set Help get Control I Java Debug Help Context Ids LAUNCH CONFIGURATION DIALOG APPLET MAIN TAB Grid Layout proj Layout new Grid Layout proj Layout num Columns 2 proj Comp set Layout proj Layout proj Comp set Font font Grid Data gd f Proj Label new Label proj Comp SWT NONE f Proj Label set Text Launcher Messages get String appletlauncher maintab projectlabel name NON NLS 1 gd new Grid Data gd horizontal Span 2 f Proj Label set Layout Data gd f Proj Label set Font font f Proj Text new Text proj Comp SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL f Proj Text set Layout Data gd f Proj Text set Font font f Proj Text add Modify Listener f Modify Listener f Proj Button create Push Button proj Comp Launcher Messages get String appletlauncher maintab browselabel name null NON NLS 1 f Proj Button add Selection Listener f Selection Listener create Vertical Spacer proj Comp 2 f Main Label new Label proj Comp SWT NONE f Main Label set Text Launcher Messages get String appletlauncher maintab mainclasslabel name NON NLS 1 gd new Grid Data gd horizontal Span 2 f Main Label set Layout Data gd f Main Label set Font font f Main Text new Text proj Comp SWT SINGLE SWT BORDER gd new Grid Data Grid Data HORIZONTAL ALIGN FILL f Main Text set Layout Data gd f Main Text set Font font f Main Text add Modify Listener f Modify Listener f Search Button create Push Button proj Comp Launcher Messages get String appletlauncher maintab searchlabel name null NON NLS 1 f Search Button add Selection Listener f Selection Listener create Vertical Spacer proj Comp 2 f Applet Viewer Class Label new Label proj Comp SWT NONE f Applet Viewer Class Label set Text Launcher Messages get String Applet Main Tab 1 NON NLS 1 gd new Grid Data gd horizontal Span 2 f Applet Viewer Class Label set Layout Data gd f Applet Viewer Class Label set Font font f Applet Viewer Class Text new Text proj Comp SWT SINGLE SWT BORDER gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 f Applet Viewer Class Text set Layout Data gd f Applet Viewer Class Text set Font font f Applet Viewer Class Text add Modify Listener f Modify Listener f Applet Viewer Class Default Button create Check Button proj Comp Launcher Messages get String Applet Main Tab 2 NON NLS 1 gd new Grid Data gd horizontal Span 2 f Applet Viewer Class Default Button set Layout Data gd f Applet Viewer Class Default Button add Selection Listener f Selection Listener  ILaunchConfigurationTab createControl createControl getFont projComp setControl projComp WorkbenchHelp setHelp getControl IJavaDebugHelpContextIds LAUNCH_CONFIGURATION_DIALOG_APPLET_MAIN_TAB GridLayout projLayout GridLayout projLayout numColumns projComp setLayout projLayout projComp setFont GridData fProjLabel projComp fProjLabel setText LauncherMessages getString GridData horizontalSpan fProjLabel setLayoutData fProjLabel setFont fProjText projComp GridData GridData FILL_HORIZONTAL fProjText setLayoutData fProjText setFont fProjText addModifyListener fModifyListener fProjButton createPushButton projComp LauncherMessages getString fProjButton addSelectionListener fSelectionListener createVerticalSpacer projComp fMainLabel projComp fMainLabel setText LauncherMessages getString GridData horizontalSpan fMainLabel setLayoutData fMainLabel setFont fMainText projComp GridData GridData HORIZONTAL_ALIGN_FILL fMainText setLayoutData fMainText setFont fMainText addModifyListener fModifyListener fSearchButton createPushButton projComp LauncherMessages getString fSearchButton addSelectionListener fSelectionListener createVerticalSpacer projComp fAppletViewerClassLabel projComp fAppletViewerClassLabel setText LauncherMessages getString AppletMainTab GridData horizontalSpan fAppletViewerClassLabel setLayoutData fAppletViewerClassLabel setFont fAppletViewerClassText projComp GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan fAppletViewerClassText setLayoutData fAppletViewerClassText setFont fAppletViewerClassText addModifyListener fModifyListener fAppletViewerClassDefaultButton createCheckButton projComp LauncherMessages getString AppletMainTab GridData horizontalSpan fAppletViewerClassDefaultButton setLayoutData fAppletViewerClassDefaultButton addSelectionListener fSelectionListener
Set the appropriate enabled state for the appletviewqer text widget protected void set Applet Viewer Text Enabled State if is Default Applet Viewer Class Name f Applet Viewer Class Text set Enabled false else f Applet Viewer Class Text set Enabled true  setAppletViewerTextEnabledState isDefaultAppletViewerClassName fAppletViewerClassText setEnabled fAppletViewerClassText setEnabled
Returns whether the default appletviewer is to be used protected boolean is Default Applet Viewer Class Name return f Applet Viewer Class Default Button get Selection  isDefaultAppletViewerClassName fAppletViewerClassDefaultButton getSelection
see org eclipse debug ui I Launch Configuration Tab initialize From I Launch Configuration public void initialize From I Launch Configuration config update Project From Config config update Main Type From Config config update Applet Viewer Class Name From Config config  ILaunchConfigurationTab initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration updateProjectFromConfig updateMainTypeFromConfig updateAppletViewerClassNameFromConfig
private void update Project From Config I Launch Configuration config String project Name EMPTY STRING try project Name config get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME EMPTY STRING catch Core Exception ce JDI DebugUI Plugin log ce f Proj Text set Text project Name  updateProjectFromConfig ILaunchConfiguration projectName EMPTY_STRING projectName getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME EMPTY_STRING CoreException JDIDebugUIPlugin fProjText setText projectName
private void update Main Type From Config I Launch Configuration config String main Type Name EMPTY STRING try main Type Name config get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME EMPTY STRING catch Core Exception ce JDI DebugUI Plugin log ce f Main Text set Text main Type Name  updateMainTypeFromConfig ILaunchConfiguration mainTypeName EMPTY_STRING mainTypeName getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME EMPTY_STRING CoreException JDIDebugUIPlugin fMainText setText mainTypeName
private void update Applet Viewer Class Name From Config I Launch Configuration config String applet Viewer Class Name null try applet Viewer Class Name config get Attribute I Java Launch Configuration Constants ATTR APPLET APPLETVIEWER CLASS String null if applet Viewer Class Name null f Applet Viewer Class Text set Text I Java Launch Configuration Constants DEFAULT APPLETVIEWER CLASS f Applet Viewer Class Default Button set Selection true else f Applet Viewer Class Text set Text applet Viewer Class Name f Applet Viewer Class Default Button set Selection false set Applet Viewer Text Enabled State catch Core Exception ce JDI DebugUI Plugin log ce  updateAppletViewerClassNameFromConfig ILaunchConfiguration appletViewerClassName appletViewerClassName getAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_APPLETVIEWER_CLASS appletViewerClassName fAppletViewerClassText setText IJavaLaunchConfigurationConstants DEFAULT_APPLETVIEWER_CLASS fAppletViewerClassDefaultButton setSelection fAppletViewerClassText setText appletViewerClassName fAppletViewerClassDefaultButton setSelection setAppletViewerTextEnabledState CoreException JDIDebugUIPlugin
see org eclipse debug ui I Launch Configuration Tab perform Apply I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy config config set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME f Proj Text get Text config set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME f Main Text get Text perform Apply Applet Viewer Class Name config  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME fProjText getText setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME fMainText getText performApplyAppletViewerClassName
Set the current appletviewer class name on the specified working copy private void perform Apply Applet Viewer Class Name I Launch Configuration Working Copy config String applet Viewer Class Name null if is Default Applet Viewer Class Name applet Viewer Class Name f Applet Viewer Class Text get Text trim if applet Viewer Class Name length 0 applet Viewer Class Name null config set Attribute I Java Launch Configuration Constants ATTR APPLET APPLETVIEWER CLASS applet Viewer Class Name  performApplyAppletViewerClassName ILaunchConfigurationWorkingCopy appletViewerClassName isDefaultAppletViewerClassName appletViewerClassName fAppletViewerClassText getText appletViewerClassName appletViewerClassName setAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_APPLETVIEWER_CLASS appletViewerClassName
see org eclipse debug ui I Launch Configuration Tab dispose public void dispose  ILaunchConfigurationTab
Show a dialog that lists all main types private void handle Search Button Selected I Java Project java Project get Java Project Shell shell get Shell Applet Selection Dialog dialog new Applet Selection Dialog shell get Launch Configuration Dialog java Project dialog set Title Launcher Messages get String appletlauncher maintab selection applet dialog title NON NLS 1 dialog set Message Launcher Messages get String appletlauncher maintab selection applet dialog message NON NLS 1 if dialog open Window CANCEL return Object results dialog get Result if results null results length 1 return I Type type I Type results 0 if type null f Main Text set Text type get Fully Qualified Name java Project type get Java Project f Proj Text set Text java Project get Element Name  handleSearchButtonSelected IJavaProject javaProject getJavaProject getShell AppletSelectionDialog AppletSelectionDialog getLaunchConfigurationDialog javaProject setTitle LauncherMessages getString setMessage LauncherMessages getString getResult IType IType fMainText setText getFullyQualifiedName javaProject getJavaProject fProjText setText javaProject getElementName
Show a dialog that lets the user select a project This in turn provides context for the main type allowing the user to key a main type name or constraining the search for main types to the specified project private void handle Project Button Selected I Java Project project choose Java Project if project null return String project Name project get Element Name f Proj Text set Text project Name  handleProjectButtonSelected IJavaProject chooseJavaProject projectName getElementName fProjText setText projectName
When the use default button is selected update the applet viewer class text private void handle Applet Viewer Class Default Selected set Applet Viewer Text Enabled State if is Default Applet Viewer Class Name f Applet Viewer Class Text set Text I Java Launch Configuration Constants DEFAULT APPLETVIEWER CLASS else f Applet Viewer Class Text set Text EMPTY STRING  handleAppletViewerClassDefaultSelected setAppletViewerTextEnabledState isDefaultAppletViewerClassName fAppletViewerClassText setText IJavaLaunchConfigurationConstants DEFAULT_APPLETVIEWER_CLASS fAppletViewerClassText setText EMPTY_STRING
Realize a Java Project selection dialog and return the first selected project or null if there was none private I Java Project choose Java Project I Java Project projects try projects Java Core create get Workspace Root get Java Projects catch Java Model Exception jme JDI DebugUI Plugin log jme projects new I Java Project 0 I Label Provider label Provider new Java Element Label Provider Java Element Label Provider SHOW DEFAULT Element List Selection Dialog dialog new Element List Selection Dialog get Shell label Provider dialog set Title Launcher Messages get String appletlauncher maintab selection project dialog title NON NLS 1 dialog set Message Launcher Messages get String appletlauncher maintab selection project dialog message NON NLS 1 dialog set Elements projects I Java Project java Project get Java Project if java Project null dialog set Initial Selections new Object java Project if dialog open Window OK return I Java Project dialog get First Result return null  IJavaProject chooseJavaProject IJavaProject JavaCore getWorkspaceRoot getJavaProjects JavaModelException JDIDebugUIPlugin IJavaProject ILabelProvider labelProvider JavaElementLabelProvider JavaElementLabelProvider SHOW_DEFAULT ElementListSelectionDialog ElementListSelectionDialog getShell labelProvider setTitle LauncherMessages getString setMessage LauncherMessages getString setElements IJavaProject javaProject getJavaProject javaProject setInitialSelections javaProject IJavaProject getFirstResult
Return the I Java Project corresponding to the project name in the project name text field or null if the text does not match a project name private I Java Project get Java Project String project Name f Proj Text get Text trim if project Name length 1 return null return get Java Model get Java Project project Name  IJavaProject IJavaProject getJavaProject projectName fProjText getText projectName getJavaModel getJavaProject projectName
Convenience method to get the workspace root private I Workspace Root get Workspace Root return Resources Plugin get Workspace get Root  IWorkspaceRoot getWorkspaceRoot ResourcesPlugin getWorkspace getRoot
Convenience method to get access to the java model private I Java Model get Java Model return Java Core create get Workspace Root  IJavaModel getJavaModel JavaCore getWorkspaceRoot
see org eclipse debug ui I Launch Configuration Tab is Valid I Launch Configuration public boolean is Valid I Launch Configuration launch Config set Error Message null set Message null Verify project String name f Proj Text get Text trim if name length 0 if Resources Plugin get Workspace get Root get Project name exists set Error Message Launcher Messages get String appletlauncher maintab project error doesnotexist NON NLS 1 return false Verify applet class name f Main Text get Text trim if name length 0 set Error Message Launcher Messages get String appletlauncher maintab type error doesnotexist NON NLS 1 return false Verify appletviewer class name f Applet Viewer Class Text get Text trim if name length 0 set Error Message Launcher Messages get String Applet Main Tab 3 NON NLS 1 return false return true  ILaunchConfigurationTab isValid ILaunchConfiguration isValid ILaunchConfiguration launchConfig setErrorMessage setMessage fProjText getText ResourcesPlugin getWorkspace getRoot getProject setErrorMessage LauncherMessages getString fMainText getText setErrorMessage LauncherMessages getString fAppletViewerClassText getText setErrorMessage LauncherMessages getString AppletMainTab
Initialize default attribute values based on the given Java element private void initialize Defaults I Java Element java Element I Launch Configuration Working Copy config initialize Java Project java Element config initialize Main Type And Name java Element config initialize Hard Coded Defaults config initialize Applet Viewer Class config  initializeDefaults IJavaElement javaElement ILaunchConfigurationWorkingCopy initializeJavaProject javaElement initializeMainTypeAndName javaElement initializeHardCodedDefaults initializeAppletViewerClass
see org eclipse debug ui I Launch Configuration Tab set Defaults I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy config I Java Element je get Context if je null initialize Hard Coded Defaults config else initialize Defaults je config  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy IJavaElement getContext initializeHardCodedDefaults initializeDefaults
Set the main type name attributes on the working copy based on the I Java Element private void initialize Main Type And Name I Java Element java Element I Launch Configuration Working Copy config String name null if java Element instanceof I Member I Member member I Member java Element if member is Binary java Element member get Class File else java Element member get Compilation Unit if java Element instanceof I Compilation Unit java Element instanceof I Class File if java Element get Element Type I Java Element COMPILATION UNIT I Compilation Unit cu I Compilation Unit java Element I Type main Type cu get Type Signature get Qualifier cu get Element Name if main Type exists name main Type get Fully Qualified Name else if java Element get Element Type I Java Element CLASS FILE try I Type main Type I Class File java Element get Type name main Type get Fully Qualified Name catch Java Model Exception e if name null config set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME name if name length 0 int index name last Index Of if index 0 name name substring index 1 name get Launch Configuration Dialog generate Name name config rename name  IJavaElement initializeMainTypeAndName IJavaElement javaElement ILaunchConfigurationWorkingCopy javaElement IMember IMember IMember javaElement isBinary javaElement getClassFile javaElement getCompilationUnit javaElement ICompilationUnit javaElement IClassFile javaElement getElementType IJavaElement COMPILATION_UNIT ICompilationUnit ICompilationUnit javaElement IType mainType getType getQualifier getElementName mainType mainType getFullyQualifiedName javaElement getElementType IJavaElement CLASS_FILE IType mainType IClassFile javaElement getType mainType getFullyQualifiedName JavaModelException setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME lastIndexOf getLaunchConfigurationDialog generateName
Set the VM attributes on the working copy based on the workbench default VM private void initialize DefaultVM I Launch Configuration Working Copy config IVM Install vm Install Java Runtime get DefaultVM Install if vm Install null config set Attribute I Java Launch Configuration Constants ATTR VM INSTALL NAME String null config set Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE String null else config set Attribute I Java Launch Configuration Constants ATTR VM INSTALL NAME vm Install get Name config set Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE vm Install getVM Install Type get Id  initializeDefaultVM ILaunchConfigurationWorkingCopy IVMInstall vmInstall JavaRuntime getDefaultVMInstall vmInstall setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_NAME setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_NAME vmInstall getName setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE vmInstall getVMInstallType getId
Initialize those attributes whose default values are independent of any context private void initialize Hard Coded Defaults I Launch Configuration Working Copy config initialize DefaultVM config  initializeHardCodedDefaults ILaunchConfigurationWorkingCopy initializeDefaultVM
Initialize the appletviewer class name attribute private void initialize Applet Viewer Class I Launch Configuration Working Copy config config set Attribute I Java Launch Configuration Constants ATTR APPLET APPLETVIEWER CLASS String null  initializeAppletViewerClass ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_APPLETVIEWER_CLASS
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Launcher Messages get String appletlauncher maintab name NON NLS 1  ILaunchConfigurationTab getName getName LauncherMessages getString
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return JavaUI get Shared Images get Image I Shared Images IMG OBJS CLASS  ILaunchConfigurationTab getImage getImage getSharedImages getImage ISharedImages IMG_OBJS_CLASS
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy do nothing when activated  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy do nothing when deactivated  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy

see org eclipse swt events Modify Listener modify Text org eclipse swt events Modify Event public void modify Text Modify Event e update Launch Configuration Dialog  ModifyListener modifyText ModifyEvent modifyText ModifyEvent updateLaunchConfigurationDialog
public void widget Selected Selection Event e Object source e get Source if source f Parameters Table set Parameters Buttons Enable State else if source f Parameters Add Button handle Parameters Add Button Selected else if source f Parameters Edit Button handle Parameters Edit Button Selected else if source f Parameters Remove Button handle Parameters Remove Button Selected  widgetSelected SelectionEvent getSource fParametersTable setParametersButtonsEnableState fParametersAddButton handleParametersAddButtonSelected fParametersEditButton handleParametersEditButtonSelected fParametersRemoveButton handleParametersRemoveButtonSelected
f Parameters Table add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e set Parameters Buttons Enable State if f Parameters Edit Button is Enabled handle Parameters Edit Button Selected  fParametersTable addMouseListener MouseAdapter mouseDoubleClick MouseEvent setParametersButtonsEnableState fParametersEditButton isEnabled handleParametersEditButtonSelected
see org eclipse debug ui I Launch Configuration Tab create Control Composite public void create Control Composite parent Font font parent get Font Composite comp new Composite parent SWT NONE set Control comp Grid Layout top Layout new Grid Layout comp set Layout top Layout Grid Data gd Composite width Height Name Comp new Composite comp SWT NONE gd new Grid Data Grid Data FILL HORIZONTAL width Height Name Comp set Layout Data gd Grid Layout width Height Name Layout new Grid Layout width Height Name Layout margin Height 0 width Height Name Layout margin Width 0 width Height Name Layout num Columns 4 width Height Name Comp set Layout width Height Name Layout f Width Label new Label width Height Name Comp SWT NONE f Width Label set Text Launcher Messages get String appletlauncher argumenttab widthlabel text NON NLS 1 f Width Label set Font font f Width Text new Text width Height Name Comp SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL f Width Text set Layout Data gd f Width Text set Font font f Width Text add Modify Listener f Listener f Name Label new Label width Height Name Comp SWT NONE f Name Label set Text Launcher Messages get String appletlauncher argumenttab namelabel text NON NLS 1 f Name Label set Font font f Name Text new Text width Height Name Comp SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL f Name Text set Layout Data gd f Name Text set Font font f Name Text add Modify Listener f Listener f Height Label new Label width Height Name Comp SWT NONE f Height Label set Text Launcher Messages get String appletlauncher argumenttab heightlabel text NON NLS 1 f Height Label set Font font f Height Text new Text width Height Name Comp SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL f Height Text set Layout Data gd f Height Text set Font font f Height Text add Modify Listener f Listener Label blank new Label width Height Name Comp SWT NONE blank set Text EMPTY STRING Label hint new Label width Height Name Comp SWT NONE hint set Text Launcher Messages get String Applet Parameters Tab optional applet instance name  1 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN CENTER hint set Layout Data gd hint set Font font create Vertical Spacer comp Composite parameters Comp new Composite comp SWT NONE gd new Grid Data Grid Data FILL BOTH parameters Comp set Layout Data gd Grid Layout parameters Layout new Grid Layout parameters Layout num Columns 2 parameters Layout margin Height 0 parameters Layout margin Width 0 parameters Comp set Layout parameters Layout parameters Comp set Font font Label parameter Label new Label parameters Comp SWT NONE parameter Label set Text Launcher Messages get String appletlauncher argumenttab parameterslabel text NON NLS 1 gd new Grid Data gd horizontal Span 2 parameter Label set Layout Data gd parameter Label set Font font f Parameters Table new Table parameters Comp SWT BORDER SWT MULTI f Parameters Table set Data I Java Launch Configuration Constants ATTR APPLET PARAMETERS Table Layout table Layout new Table Layout f Parameters Table set Layout table Layout f Parameters Table set Font font gd new Grid Data Grid Data FILL BOTH f Parameters Table set Layout Data gd Table Column column1 new Table Column this f Parameters Table SWT NONE column1 set Text Launcher Messages get String appletlauncher argumenttab parameterscolumn name text NON NLS 1 Table Column column2 new Table Column this f Parameters Table SWT NONE column2 set Text Launcher Messages get String appletlauncher argumenttab parameterscolumn value text NON NLS 1 table Layout add Column Data new Column Weight Data 100 table Layout add Column Data new Column Weight Data 100 f Parameters Table set Header Visible true f Parameters Table set Lines Visible true f Parameters Table add Selection Listener f Listener f Parameters Table add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e set Parameters Buttons Enable State if f Parameters Edit Button is Enabled handle Parameters Edit Button Selected Composite env Button Comp new Composite parameters Comp SWT NONE Grid Layout env Button Layout new Grid Layout env Button Layout margin Height 0 env Button Layout margin Width 0 env Button Comp set Layout env Button Layout gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data HORIZONTAL ALIGN FILL env Button Comp set Layout Data gd env Button Comp set Font font f Parameters Add Button create Push Button env Button Comp Launcher Messages get String appletlauncher argumenttab parameters button add text null NON NLS 1 f Parameters Add Button add Selection Listener f Listener f Parameters Edit Button create Push Button env Button Comp Launcher Messages get String appletlauncher argumenttab parameters button edit text null NON NLS 1 f Parameters Edit Button add Selection Listener f Listener f Parameters Remove Button create Push Button env Button Comp Launcher Messages get String appletlauncher argumenttab parameters button remove text null NON NLS 1 f Parameters Remove Button add Selection Listener f Listener  ILaunchConfigurationTab createControl createControl getFont setControl GridLayout topLayout GridLayout setLayout topLayout GridData widthHeightNameComp GridData GridData FILL_HORIZONTAL widthHeightNameComp setLayoutData GridLayout widthHeightNameLayout GridLayout widthHeightNameLayout marginHeight widthHeightNameLayout marginWidth widthHeightNameLayout numColumns widthHeightNameComp setLayout widthHeightNameLayout fWidthLabel widthHeightNameComp fWidthLabel setText LauncherMessages getString fWidthLabel setFont fWidthText widthHeightNameComp GridData GridData FILL_HORIZONTAL fWidthText setLayoutData fWidthText setFont fWidthText addModifyListener fListener fNameLabel widthHeightNameComp fNameLabel setText LauncherMessages getString fNameLabel setFont fNameText widthHeightNameComp GridData GridData FILL_HORIZONTAL fNameText setLayoutData fNameText setFont fNameText addModifyListener fListener fHeightLabel widthHeightNameComp fHeightLabel setText LauncherMessages getString fHeightLabel setFont fHeightText widthHeightNameComp GridData GridData FILL_HORIZONTAL fHeightText setLayoutData fHeightText setFont fHeightText addModifyListener fListener widthHeightNameComp setText EMPTY_STRING widthHeightNameComp setText LauncherMessages getString AppletParametersTab optional_applet_instance_name _1 GridData GridData HORIZONTAL_ALIGN_CENTER setLayoutData setFont createVerticalSpacer parametersComp GridData GridData FILL_BOTH parametersComp setLayoutData GridLayout parametersLayout GridLayout parametersLayout numColumns parametersLayout marginHeight parametersLayout marginWidth parametersComp setLayout parametersLayout parametersComp setFont parameterLabel parametersComp parameterLabel setText LauncherMessages getString GridData horizontalSpan parameterLabel setLayoutData parameterLabel setFont fParametersTable parametersComp fParametersTable setData IJavaLaunchConfigurationConstants ATTR_APPLET_PARAMETERS TableLayout tableLayout TableLayout fParametersTable setLayout tableLayout fParametersTable setFont GridData GridData FILL_BOTH fParametersTable setLayoutData TableColumn TableColumn fParametersTable setText LauncherMessages getString TableColumn TableColumn fParametersTable setText LauncherMessages getString tableLayout addColumnData ColumnWeightData tableLayout addColumnData ColumnWeightData fParametersTable setHeaderVisible fParametersTable setLinesVisible fParametersTable addSelectionListener fListener fParametersTable addMouseListener MouseAdapter mouseDoubleClick MouseEvent setParametersButtonsEnableState fParametersEditButton isEnabled handleParametersEditButtonSelected envButtonComp parametersComp GridLayout envButtonLayout GridLayout envButtonLayout marginHeight envButtonLayout marginWidth envButtonComp setLayout envButtonLayout GridData GridData VERTICAL_ALIGN_BEGINNING GridData HORIZONTAL_ALIGN_FILL envButtonComp setLayoutData envButtonComp setFont fParametersAddButton createPushButton envButtonComp LauncherMessages getString fParametersAddButton addSelectionListener fListener fParametersEditButton createPushButton envButtonComp LauncherMessages getString fParametersEditButton addSelectionListener fListener fParametersRemoveButton createPushButton envButtonComp LauncherMessages getString fParametersRemoveButton addSelectionListener fListener
see org eclipse debug ui I Launch Configuration Tab is Valid I Launch Configuration public boolean is Valid I Launch Configuration launch Config set Error Message null try Integer parse Int get Width Text catch Number Format Exception nfe set Error Message Launcher Messages get String appletlauncher argumenttab width error notaninteger NON NLS 1 return false try Integer parse Int get Height Text catch Number Format Exception nfe set Error Message Launcher Messages get String appletlauncher argumenttab height error notaninteger NON NLS 1 return false return true  ILaunchConfigurationTab isValid ILaunchConfiguration isValid ILaunchConfiguration launchConfig setErrorMessage parseInt getWidthText NumberFormatException setErrorMessage LauncherMessages getString parseInt getHeightText NumberFormatException setErrorMessage LauncherMessages getString
private void handle Parameters Add Button Selected Name Value Pair Dialog dialog new Name Value Pair Dialog get Shell Launcher Messages get String appletlauncher argumenttab parameters dialog add title NON NLS 1 new String Launcher Messages get String appletlauncher argumenttab parameters dialog add name text Launcher Messages get String appletlauncher argumenttab parameters dialog add value text NON NLS 1 NON NLS 2 new String EMPTY STRING EMPTY STRING open New Parameter Dialog dialog null set Parameters Buttons Enable State  handleParametersAddButtonSelected NameValuePairDialog NameValuePairDialog getShell LauncherMessages getString LauncherMessages getString LauncherMessages getString EMPTY_STRING EMPTY_STRING openNewParameterDialog setParametersButtonsEnableState
private void handle Parameters Edit Button Selected Table Item selected Item this f Parameters Table get Selection 0 String name selected Item get Text 0 String value selected Item get Text 1 Name Value Pair Dialog dialog new Name Value Pair Dialog get Shell Launcher Messages get String appletlauncher argumenttab parameters dialog edit title NON NLS 1 new String Launcher Messages get String appletlauncher argumenttab parameters dialog edit name text Launcher Messages get String appletlauncher argumenttab parameters dialog edit value text NON NLS 1 NON NLS 2 new String name value open New Parameter Dialog dialog selected Item  handleParametersEditButtonSelected TableItem selectedItem fParametersTable getSelection selectedItem getText selectedItem getText NameValuePairDialog NameValuePairDialog getShell LauncherMessages getString LauncherMessages getString LauncherMessages getString openNewParameterDialog selectedItem
private void handle Parameters Remove Button Selected int selected Indices this f Parameters Table get Selection Indices this f Parameters Table remove selected Indices set Parameters Buttons Enable State update Launch Configuration Dialog  handleParametersRemoveButtonSelected selectedIndices fParametersTable getSelectionIndices fParametersTable selectedIndices setParametersButtonsEnableState updateLaunchConfigurationDialog
Set the enabled state of the three environment variable related buttons based on the selection in the Table widget private void set Parameters Buttons Enable State int select Count this f Parameters Table get Selection Indices length if select Count 1 f Parameters Edit Button set Enabled false f Parameters Remove Button set Enabled false else f Parameters Remove Button set Enabled true if select Count 1 f Parameters Edit Button set Enabled true else f Parameters Edit Button set Enabled false f Parameters Add Button set Enabled true  setParametersButtonsEnableState selectCount fParametersTable getSelectionIndices selectCount fParametersEditButton setEnabled fParametersRemoveButton setEnabled fParametersRemoveButton setEnabled selectCount fParametersEditButton setEnabled fParametersEditButton setEnabled fParametersAddButton setEnabled
Show the specified dialog and update the parameter table based on its results param update Item the item to update or code null code if adding a new item private void open New Parameter Dialog Name Value Pair Dialog dialog Table Item update Item if dialog open Window OK return String name Value Pair dialog get Name Value Pair Table Item table Item update Item if table Item null table Item get Table Item For Name name Value Pair 0 if table Item null table Item new Table Item this f Parameters Table SWT NONE table Item set Text name Value Pair this f Parameters Table set Selection new Table Item table Item update Launch Configuration Dialog  updateItem openNewParameterDialog NameValuePairDialog TableItem updateItem nameValuePair getNameValuePair TableItem tableItem updateItem tableItem tableItem getTableItemForName nameValuePair tableItem tableItem TableItem fParametersTable tableItem setText nameValuePair fParametersTable setSelection TableItem tableItem updateLaunchConfigurationDialog
Helper method that indicates whether the specified parameter name is already present in the parameters table private Table Item get Table Item For Name String candidate Name Table Item items this f Parameters Table get Items for int i 0 i items length i String name items i get Text 0 if name equals candidate Name return items i return null  TableItem getTableItemForName candidateName TableItem fParametersTable getItems getText candidateName
see org eclipse debug ui I Launch Configuration Tab perform Apply I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy configuration try configuration set Attribute I Java Launch Configuration Constants ATTR APPLET WIDTH Integer parse Int get Width Text catch Number Format Exception e try configuration set Attribute I Java Launch Configuration Constants ATTR APPLET HEIGHT Integer parse Int get Height Text catch Number Format Exception e configuration set Attribute I Java Launch Configuration Constants ATTR APPLET NAME f Name Text get Text configuration set Attribute I Java Launch Configuration Constants ATTR APPLET PARAMETERS get Map From Parameters Table  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_WIDTH parseInt getWidthText NumberFormatException setAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_HEIGHT parseInt getHeightText NumberFormatException setAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_NAME fNameText getText setAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_PARAMETERS getMapFromParametersTable
Returns the current width specified by the user return the width specified by the user private String get Width Text return f Width Text get Text trim  getWidthText fWidthText getText
Returns the current height specified by the user return the height specified by the user private String get Height Text return f Height Text get Text trim  getHeightText fHeightText getText
private Map get Map From Parameters Table Table Item items f Parameters Table get Items if items length 0 return null Map map new Hash Map items length for int i 0 i items length i Table Item item items i String key item get Text 0 String value item get Text 1 map put key value return map  getMapFromParametersTable TableItem fParametersTable getItems HashMap TableItem getText getText
see org eclipse debug ui I Launch Configuration Tab set Defaults I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy
private void update Parameters From Config I Launch Configuration config Map env Vars null try if config null env Vars config get Attribute I Java Launch Configuration Constants ATTR APPLET PARAMETERS Map null update Table env Vars this f Parameters Table set Parameters Buttons Enable State catch Core Exception ce JDI DebugUI Plugin log ce  updateParametersFromConfig ILaunchConfiguration envVars envVars getAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_PARAMETERS updateTable envVars fParametersTable setParametersButtonsEnableState CoreException JDIDebugUIPlugin
private void update Table Map map Table table Widget table Widget remove All if map null return Iterator iterator map key Set iterator while iterator has Next String key String iterator next String value String map get key Table Item table Item new Table Item table Widget SWT NONE table Item set Text new String key value  updateTable tableWidget tableWidget removeAll keySet hasNext TableItem tableItem TableItem tableWidget tableItem setText
see org eclipse debug ui I Launch Configuration Tab initialize From I Launch Configuration public void initialize From I Launch Configuration config try f Width Text set Text Integer to String config get Attribute I Java Launch Configuration Constants ATTR APPLET WIDTH DEFAULT APPLET WIDTH NON NLS 1 catch Core Exception ce f Width Text set Text Integer to String DEFAULT APPLET WIDTH NON NLS 1 try f Height Text set Text Integer to String config get Attribute I Java Launch Configuration Constants ATTR APPLET HEIGHT DEFAULT APPLET HEIGHT NON NLS 1 catch Core Exception ce f Height Text set Text Integer to String DEFAULT APPLET HEIGHT NON NLS 1 try f Name Text set Text config get Attribute I Java Launch Configuration Constants ATTR APPLET NAME Launcher Messages get String appletlauncher argumenttab name defaultvalue NON NLS 1 catch Core Exception ce f Name Text set Text Launcher Messages get String appletlauncher argumenttab name defaultvalue NON NLS 1 update Parameters From Config config  ILaunchConfigurationTab initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration fWidthText setText toString getAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_WIDTH DEFAULT_APPLET_WIDTH CoreException fWidthText setText toString DEFAULT_APPLET_WIDTH fHeightText setText toString getAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_HEIGHT DEFAULT_APPLET_HEIGHT CoreException fHeightText setText toString DEFAULT_APPLET_HEIGHT fNameText setText getAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_NAME LauncherMessages getString CoreException fNameText setText LauncherMessages getString updateParametersFromConfig
Create some empty space private void create Vertical Spacer Composite comp new Label comp SWT NONE  createVerticalSpacer
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Launcher Messages get String appletlauncher argumenttab name NON NLS 1  ILaunchConfigurationTab getName getName LauncherMessages getString
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return Java Debug Images get Java Debug Images IMG VIEW ARGUMENTS TAB  ILaunchConfigurationTab getImage getImage JavaDebugImages JavaDebugImages IMG_VIEW_ARGUMENTS_TAB
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy do nothing when activated  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy do nothing when deactivated  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy

protected static final String EMPTY STRING NON NLS 1 public Java Arguments Tab fVM Arguments Block createVM Args Block f Working Directory Block create Working Dir Block  EMPTY_STRING JavaArgumentsTab fVMArgumentsBlock createVMArgsBlock fWorkingDirectoryBlock createWorkingDirBlock
protected VM Arguments Block createVM Args Block return new VM Arguments Block  VMArgumentsBlock createVMArgsBlock VMArgumentsBlock
protected Working Directory Block create Working Dir Block return new Working Directory Block  WorkingDirectoryBlock createWorkingDirBlock WorkingDirectoryBlock
see org eclipse debug ui I Launch Configuration Tab create Control Composite public void create Control Composite parent Font font parent get Font Composite comp new Composite parent parent get Style Grid Layout layout new Grid Layout 1 true comp set Layout layout comp set Font font Grid Data gd new Grid Data Grid Data FILL BOTH comp set Layout Data gd set Control comp set Help Context Id Group group new Group comp SWT NONE group set Font font layout new Grid Layout group set Layout layout group set Layout Data new Grid Data Grid Data FILL BOTH String control Name Launcher Messages get String Java Arguments Tab Program arguments  5 NON NLS 1 group set Text control Name f Prgm Arguments Text new Text group SWT MULTI SWT WRAP SWT BORDER SWT V SCROLL gd new Grid Data Grid Data FILL BOTH gd height Hint 40 gd width Hint 100 f Prgm Arguments Text set Layout Data gd f Prgm Arguments Text set Font font f Prgm Arguments Text add Modify Listener new Modify Listener public void modify Text Modify Event evt update Launch Configuration Dialog Control Accessible Listener add Listener f Prgm Arguments Text group get Text String button Label Launcher Messages get String Java Arguments Tab 5 NON NLS 1 Button pgrm Arg Variable Button create Push Button group button Label null pgrm Arg Variable Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END pgrm Arg Variable Button add Selection Listener new Selection Listener public void widget Selected Selection Event e String Variable Selection Dialog dialog new String Variable Selection Dialog get Shell dialog open String variable dialog get Variable Expression if variable null f Prgm Arguments Text append variable public void widget Default Selected Selection Event e fVM Arguments Block create Control comp f Working Directory Block create Control comp  ILaunchConfigurationTab createControl createControl getFont getStyle GridLayout GridLayout setLayout setFont GridData GridData GridData FILL_BOTH setLayoutData setControl setHelpContextId setFont GridLayout setLayout setLayoutData GridData GridData FILL_BOTH controlName LauncherMessages getString JavaArgumentsTab Program_arguments__5 setText controlName fPrgmArgumentsText V_SCROLL GridData GridData FILL_BOTH heightHint widthHint fPrgmArgumentsText setLayoutData fPrgmArgumentsText setFont fPrgmArgumentsText addModifyListener ModifyListener modifyText ModifyEvent updateLaunchConfigurationDialog ControlAccessibleListener addListener fPrgmArgumentsText getText buttonLabel LauncherMessages getString JavaArgumentsTab pgrmArgVariableButton createPushButton buttonLabel pgrmArgVariableButton setLayoutData GridData GridData HORIZONTAL_ALIGN_END pgrmArgVariableButton addSelectionListener SelectionListener widgetSelected SelectionEvent StringVariableSelectionDialog StringVariableSelectionDialog getShell getVariableExpression fPrgmArgumentsText widgetDefaultSelected SelectionEvent fVMArgumentsBlock createControl fWorkingDirectoryBlock createControl
Set the help context id for this launch config tab Subclasses may override this method protected void set Help Context Id Workbench Help set Help get Control I Java Debug Help Context Ids LAUNCH CONFIGURATION DIALOG ARGUMENTS TAB  setHelpContextId WorkbenchHelp setHelp getControl IJavaDebugHelpContextIds LAUNCH_CONFIGURATION_DIALOG_ARGUMENTS_TAB
see org eclipse debug ui I Launch Configuration Tab dispose public void dispose  ILaunchConfigurationTab
see org eclipse debug ui I Launch Configuration Tab is Valid I Launch Configuration public boolean is Valid I Launch Configuration config return f Working Directory Block is Valid config  ILaunchConfigurationTab isValid ILaunchConfiguration isValid ILaunchConfiguration fWorkingDirectoryBlock isValid
Defaults are empty see org eclipse debug ui I Launch Configuration Tab set Defaults I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy config config set Attribute I Java Launch Configuration Constants ATTR PROGRAM ARGUMENTS String null fVM Arguments Block set Defaults config f Working Directory Block set Defaults config  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_PROGRAM_ARGUMENTS fVMArgumentsBlock setDefaults fWorkingDirectoryBlock setDefaults
see org eclipse debug ui I Launch Configuration Tab initialize From I Launch Configuration public void initialize From I Launch Configuration configuration try f Prgm Arguments Text set Text configuration get Attribute I Java Launch Configuration Constants ATTR PROGRAM ARGUMENTS NON NLS 1 fVM Arguments Block initialize From configuration f Working Directory Block initialize From configuration catch Core Exception e set Error Message Launcher Messages get String Java Arguments Tab Exception occurred reading configuration   15 e get Status get Message NON NLS 1 JDI DebugUI Plugin log e  ILaunchConfigurationTab initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration fPrgmArgumentsText setText getAttribute IJavaLaunchConfigurationConstants ATTR_PROGRAM_ARGUMENTS fVMArgumentsBlock initializeFrom fWorkingDirectoryBlock initializeFrom CoreException setErrorMessage LauncherMessages getString JavaArgumentsTab Exception_occurred_reading_configuration___15 getStatus getMessage JDIDebugUIPlugin
see org eclipse debug ui I Launch Configuration Tab perform Apply I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy configuration configuration set Attribute I Java Launch Configuration Constants ATTR PROGRAM ARGUMENTS get Attribute Value From f Prgm Arguments Text fVM Arguments Block perform Apply configuration f Working Directory Block perform Apply configuration  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_PROGRAM_ARGUMENTS getAttributeValueFrom fPrgmArgumentsText fVMArgumentsBlock performApply fWorkingDirectoryBlock performApply
Retuns the string in the text widget or code null code if empty return text or code null code protected String get Attribute Value From Text text String content text get Text trim if content length 0 return content return null  getAttributeValueFrom getText
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Launcher Messages get String Java Arguments Tab Arguments 16 NON NLS 1  ILaunchConfigurationTab getName getName LauncherMessages getString JavaArgumentsTab Arguments_16
see org eclipse debug ui I Launch Configuration Tab set Launch Configuration Dialog I Launch Configuration Dialog public void set Launch Configuration Dialog I Launch Configuration Dialog dialog super set Launch Configuration Dialog dialog f Working Directory Block set Launch Configuration Dialog dialog fVM Arguments Block set Launch Configuration Dialog dialog  ILaunchConfigurationTab setLaunchConfigurationDialog ILaunchConfigurationDialog setLaunchConfigurationDialog ILaunchConfigurationDialog setLaunchConfigurationDialog fWorkingDirectoryBlock setLaunchConfigurationDialog fVMArgumentsBlock setLaunchConfigurationDialog
see org eclipse debug ui I Launch Configuration Tab get Error Message public String get Error Message String m super get Error Message if m null return f Working Directory Block get Error Message return m  ILaunchConfigurationTab getErrorMessage getErrorMessage getErrorMessage fWorkingDirectoryBlock getErrorMessage
see org eclipse debug ui I Launch Configuration Tab get Message public String get Message String m super get Message if m null return f Working Directory Block get Message return m  ILaunchConfigurationTab getMessage getMessage getMessage fWorkingDirectoryBlock getMessage
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return Java Debug Images get Java Debug Images IMG VIEW ARGUMENTS TAB  ILaunchConfigurationTab getImage getImage JavaDebugImages JavaDebugImages IMG_VIEW_ARGUMENTS_TAB
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy do nothing when activated  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy do nothing when deactivated  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy

public void create Control Composite parent Font font parent get Font Composite comp new Composite parent SWT NONE set Control comp Workbench Help set Help get Control I Java Debug Help Context Ids LAUNCH CONFIGURATION DIALOG CLASSPATH TAB Grid Layout top Layout new Grid Layout top Layout num Columns 2 comp set Layout top Layout Grid Data gd Label label new Label comp SWT NONE label set Text Launcher Messages get String Java Classpath Tab 0 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 label set Layout Data gd f Classpath Viewer new Runtime Classpath Viewer comp f Classpath Viewer add Entries Changed Listener this f Classpath Viewer get Control set Font font f Classpath Viewer set Label Provider new Classpath Label Provider f Classpath Viewer set Content Provider new Classpath Content Provider this if is Show Bootpath f Classpath Viewer add Filter new Bootpath Filter Composite path Button Comp new Composite comp SWT NONE Grid Layout path Button Layout new Grid Layout path Button Layout margin Height 0 path Button Layout margin Width 0 path Button Comp set Layout path Button Layout gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data HORIZONTAL ALIGN FILL path Button Comp set Layout Data gd path Button Comp set Font font create Path Buttons path Button Comp  createControl getFont setControl WorkbenchHelp setHelp getControl IJavaDebugHelpContextIds LAUNCH_CONFIGURATION_DIALOG_CLASSPATH_TAB GridLayout topLayout GridLayout topLayout numColumns setLayout topLayout GridData setText LauncherMessages getString JavaClasspathTab GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan setLayoutData fClasspathViewer RuntimeClasspathViewer fClasspathViewer addEntriesChangedListener fClasspathViewer getControl setFont fClasspathViewer setLabelProvider ClasspathLabelProvider fClasspathViewer setContentProvider ClasspathContentProvider isShowBootpath fClasspathViewer addFilter BootpathFilter pathButtonComp GridLayout pathButtonLayout GridLayout pathButtonLayout marginHeight pathButtonLayout marginWidth pathButtonComp setLayout pathButtonLayout GridData GridData VERTICAL_ALIGN_BEGINNING GridData HORIZONTAL_ALIGN_FILL pathButtonComp setLayoutData pathButtonComp setFont createPathButtons pathButtonComp
Creates the buttons to manipulate the classpath param path Button Comp composite buttons are contained in since 3 0 protected void create Path Buttons Composite path Button Comp List advanced Actions new Array List 5 create Button path Button Comp new Move Up Action f Classpath Viewer create Button path Button Comp new Move Down Action f Classpath Viewer create Button path Button Comp new Remove Action f Classpath Viewer create Button path Button Comp new Add Project Action f Classpath Viewer create Button path Button Comp new Add Jar Action f Classpath Viewer create Button path Button Comp new Add External Jar Action f Classpath Viewer DIALOG SETTINGS PREFIX Runtime Classpath Action action new Add Folder Action null advanced Actions add action action new Add External Folder Action null DIALOG SETTINGS PREFIX advanced Actions add action action new Add Variable Action null advanced Actions add action action new Add Library Action null advanced Actions add action action new Attach Source Action null SWT RADIO advanced Actions add action I Action adv I Action advanced Actions to Array new I Action advanced Actions size create Button path Button Comp new Add Advanced Action f Classpath Viewer adv action new Restore Default Entries Action f Classpath Viewer this create Button path Button Comp action action set Enabled true  pathButtonComp createPathButtons pathButtonComp advancedActions ArrayList createButton pathButtonComp MoveUpAction fClasspathViewer createButton pathButtonComp MoveDownAction fClasspathViewer createButton pathButtonComp RemoveAction fClasspathViewer createButton pathButtonComp AddProjectAction fClasspathViewer createButton pathButtonComp AddJarAction fClasspathViewer createButton pathButtonComp AddExternalJarAction fClasspathViewer DIALOG_SETTINGS_PREFIX RuntimeClasspathAction AddFolderAction advancedActions AddExternalFolderAction DIALOG_SETTINGS_PREFIX advancedActions AddVariableAction advancedActions AddLibraryAction advancedActions AttachSourceAction advancedActions IAction IAction advancedActions toArray IAction advancedActions createButton pathButtonComp AddAdvancedAction fClasspathViewer RestoreDefaultEntriesAction fClasspathViewer createButton pathButtonComp setEnabled
Creates a button for the given action param path Button Comp parent composite for the button param action the action triggered by the button return the button that was created protected Button create Button Composite path Button Comp Runtime Classpath Action action Button button create Push Button path Button Comp action get Text null action set Button button return button  pathButtonComp createButton pathButtonComp RuntimeClasspathAction createPushButton pathButtonComp getText setButton
see org eclipse debug ui I Launch Configuration Tab set Defaults org eclipse debug core I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy
see org eclipse debug ui I Launch Configuration Tab initialize From org eclipse debug core I Launch Configuration public void initialize From I Launch Configuration configuration refresh configuration f Classpath Viewer expand To Level 2  ILaunchConfigurationTab initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration fClasspathViewer expandToLevel
public void activated I Launch Configuration Working Copy working Copy boolean use Default true set Error Message null try use Default working Copy get Attribute I Java Launch Configuration Constants ATTR DEFAULT CLASSPATH true if use Default if is Default Classpath get Current Classpath working Copy initialize From working Copy return f Classpath Viewer refresh catch Core Exception e  ILaunchConfigurationWorkingCopy workingCopy useDefault setErrorMessage useDefault workingCopy getAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_CLASSPATH useDefault isDefaultClasspath getCurrentClasspath workingCopy initializeFrom workingCopy fClasspathViewer CoreException
Refreshes the classpath entries based on the current state of the given launch configuration private void refresh I Launch Configuration configuration boolean use Default true set Error Message null try use Default configuration get Attribute I Java Launch Configuration Constants ATTR DEFAULT CLASSPATH true catch Core Exception e JDI DebugUI Plugin log e if configuration get Launch Configuration no need to update if an explicit path is being used and this setting has not changed and viewing the same config as last time if use Default set Dirty false return set Launch Configuration configuration try create Classpath Model configuration catch Core Exception e set Error Message e get Message f Classpath Viewer set Launch Configuration configuration f Classpath Viewer set Input f Model set Dirty false  ILaunchConfiguration useDefault setErrorMessage useDefault getAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_CLASSPATH CoreException JDIDebugUIPlugin getLaunchConfiguration useDefault setDirty setLaunchConfiguration createClasspathModel CoreException setErrorMessage getMessage fClasspathViewer setLaunchConfiguration fClasspathViewer setInput fModel setDirty
private void create Classpath Model I Launch Configuration configuration throws Core Exception f Model new Classpath Model I Runtime Classpath Entry entries Java Runtime compute Unresolved Runtime Classpath configuration I Runtime Classpath Entry entry for int i 0 i entries length i entry entries i switch entry get Classpath Property case I Runtime Classpath Entry USER CLASSES f Model add Entry Classpath Model USER entry break default f Model add Entry Classpath Model BOOTSTRAP entry break  createClasspathModel ILaunchConfiguration CoreException fModel ClasspathModel IRuntimeClasspathEntry JavaRuntime computeUnresolvedRuntimeClasspath IRuntimeClasspathEntry getClasspathProperty IRuntimeClasspathEntry USER_CLASSES fModel addEntry ClasspathModel fModel addEntry ClasspathModel
public void perform Apply I Launch Configuration Working Copy configuration if is Dirty I Runtime Classpath Entry classpath get Current Classpath boolean def is Default Classpath classpath configuration get Original if def configuration set Attribute I Java Launch Configuration Constants ATTR DEFAULT CLASSPATH String null configuration set Attribute I Java Launch Configuration Constants ATTR CLASSPATH String null else configuration set Attribute I Java Launch Configuration Constants ATTR DEFAULT CLASSPATH false try List mementos new Array List classpath length for int i 0 i classpath length i I Runtime Classpath Entry entry classpath i mementos add entry get Memento configuration set Attribute I Java Launch Configuration Constants ATTR CLASSPATH mementos catch Core Exception e JDI DebugUI Plugin error Dialog Launcher Messages get String Java Classpath Tab Unable to save classpath 1 e NON NLS 1  performApply ILaunchConfigurationWorkingCopy isDirty IRuntimeClasspathEntry getCurrentClasspath isDefaultClasspath getOriginal setAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_CLASSPATH setAttribute IJavaLaunchConfigurationConstants ATTR_CLASSPATH setAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_CLASSPATH ArrayList IRuntimeClasspathEntry getMemento setAttribute IJavaLaunchConfigurationConstants ATTR_CLASSPATH CoreException JDIDebugUIPlugin errorDialog LauncherMessages getString JavaClasspathTab Unable_to_save_classpath_1
Returns the classpath entries currently specified by this tab return the classpath entries currently specified by this tab private I Runtime Classpath Entry get Current Classpath I Classpath Entry boot f Model get Entries Classpath Model BOOTSTRAP I Classpath Entry user f Model get Entries Classpath Model USER List entries new Array List boot length user length I Classpath Entry boot Entry I Runtime Classpath Entry entry for int i 0 i boot length i boot Entry boot i entry null if boot Entry instanceof Classpath Entry entry Classpath Entry boot Entry get Delegate else if boot Entry instanceof I Runtime Classpath Entry entry I Runtime Classpath Entry boot i if entry null if entry get Classpath Property I Runtime Classpath Entry USER CLASSES entry set Classpath Property I Runtime Classpath Entry BOOTSTRAP CLASSES entries add entry I Classpath Entry user Entry for int i 0 i user length i user Entry user i entry null if user Entry instanceof Classpath Entry entry Classpath Entry user Entry get Delegate else if user Entry instanceof I Runtime Classpath Entry entry I Runtime Classpath Entry user i if entry null entry set Classpath Property I Runtime Classpath Entry USER CLASSES entries add entry return I Runtime Classpath Entry entries to Array new I Runtime Classpath Entry entries size  IRuntimeClasspathEntry getCurrentClasspath IClasspathEntry fModel getEntries ClasspathModel IClasspathEntry fModel getEntries ClasspathModel ArrayList IClasspathEntry bootEntry IRuntimeClasspathEntry bootEntry bootEntry ClasspathEntry ClasspathEntry bootEntry getDelegate bootEntry IRuntimeClasspathEntry IRuntimeClasspathEntry getClasspathProperty IRuntimeClasspathEntry USER_CLASSES setClasspathProperty IRuntimeClasspathEntry BOOTSTRAP_CLASSES IClasspathEntry userEntry userEntry userEntry ClasspathEntry ClasspathEntry userEntry getDelegate userEntry IRuntimeClasspathEntry IRuntimeClasspathEntry setClasspathProperty IRuntimeClasspathEntry USER_CLASSES IRuntimeClasspathEntry toArray IRuntimeClasspathEntry
Returns whether the specified classpath is equivalent to the default classpath for this configuration param classpath classpath to compare to default param configuration original configuration return whether the specified classpath is equivalent to the default classpath for this configuration private boolean is Default Classpath I Runtime Classpath Entry classpath I Launch Configuration configuration try I Launch Configuration Working Copy wc configuration get Working Copy wc set Attribute I Java Launch Configuration Constants ATTR DEFAULT CLASSPATH true I Runtime Classpath Entry entries Java Runtime compute Unresolved Runtime Classpath wc if classpath length entries length for int i 0 i entries length i I Runtime Classpath Entry entry entries i if entry equals classpath i return false return true return false catch Core Exception e return false  isDefaultClasspath IRuntimeClasspathEntry ILaunchConfiguration ILaunchConfigurationWorkingCopy getWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_CLASSPATH IRuntimeClasspathEntry JavaRuntime computeUnresolvedRuntimeClasspath IRuntimeClasspathEntry CoreException
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Launcher Messages get String Java Classpath Tab Cla ss path 3 NON NLS 1  ILaunchConfigurationTab getName getName LauncherMessages getString JavaClasspathTab ss_path_3
see org eclipse debug ui I Launch Configuration Tab get Image public static Image get Classpath Image return Java Debug Images get Java Debug Images IMG OBJS CLASSPATH  ILaunchConfigurationTab getImage getClasspathImage JavaDebugImages JavaDebugImages IMG_OBJS_CLASSPATH
Sets the launch configuration for this classpath tab private void set Launch Configuration I Launch Configuration config f Launch Configuration config  setLaunchConfiguration ILaunchConfiguration fLaunchConfiguration
Returns the current launch configuration public I Launch Configuration get Launch Configuration return f Launch Configuration  ILaunchConfiguration getLaunchConfiguration fLaunchConfiguration
public void dispose if f Classpath Viewer null f Classpath Viewer remove Entries Changed Listener this super dispose  fClasspathViewer fClasspathViewer removeEntriesChangedListener
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return get Classpath Image  ILaunchConfigurationTab getImage getImage getClasspathImage
public boolean is Valid I Launch Configuration launch Config set Error Message null set Message null String project Name null try project Name launch Config get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME NON NLS 1 catch Core Exception e return false if project Name length 0 I Workspace workspace Resources Plugin get Workspace I Status status workspace validate Name project Name I Resource PROJECT if status isOK I Project project Resources Plugin get Workspace get Root get Project project Name if project exists set Error Message Message Format format Launcher Messages get String Java Main Tab 20 new String project Name NON NLS 1 return false if project is Open set Error Message Message Format format Launcher Messages get String Java Main Tab 21 new String project Name NON NLS 1 return false else set Error Message Message Format format Launcher Messages get String Java Main Tab 19 new String status get Message NON NLS 1 return false return true  isValid ILaunchConfiguration launchConfig setErrorMessage setMessage projectName projectName launchConfig getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME CoreException projectName IWorkspace ResourcesPlugin getWorkspace IStatus validateName projectName IResource IProject ResourcesPlugin getWorkspace getRoot getProject projectName setErrorMessage MessageFormat LauncherMessages getString JavaMainTab projectName isOpen setErrorMessage MessageFormat LauncherMessages getString JavaMainTab projectName setErrorMessage MessageFormat LauncherMessages getString JavaMainTab getMessage
Returns whether the bootpath should be displayed return whether the bootpath should be displayed since 3 0 public boolean is Show Bootpath return true  isShowBootpath
return Returns the classpath model protected Classpath Model get Model return f Model  ClasspathModel getModel fModel

f Proj Text set Font font f Proj Text add Modify Listener new Modify Listener public void modify Text Modify Event evt update Launch Configuration Dialog  fProjText setFont fProjText addModifyListener ModifyListener modifyText ModifyEvent updateLaunchConfigurationDialog
f Proj Button create Push Button proj Comp Launcher Messages get String Java Connect Tab Browse 3 null NON NLS 1 f Proj Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Project Button Selected  fProjButton createPushButton projComp LauncherMessages getString JavaConnectTab Browse_3 fProjButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleProjectButtonSelected
f Connector Combo set Items names f Connector Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Connector Combo Modified  fConnectorCombo setItems fConnectorCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleConnectorComboModified
f Allow Terminate Button create Check Button comp Launcher Messages get String Java Connect Tab Allow termination of remote VM 6 NON NLS 1 f Allow Terminate Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt update Launch Configuration Dialog  fAllowTerminateButton createCheckButton LauncherMessages getString JavaConnectTab Allow_termination_of_remote_VM_6 fAllowTerminateButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
see org eclipse debug ui I Launch Configuration Tab create Control Composite public void create Control Composite parent Font font parent get Font Composite comp new Composite parent SWT NONE set Control comp Workbench Help set Help get Control I Java Debug Help Context Ids LAUNCH CONFIGURATION DIALOG CONNECT TAB Grid Layout top Layout new Grid Layout top Layout margin Height 0 comp set Layout top Layout comp set Font font Grid Data gd create Vertical Spacer comp 1 Composite proj Comp new Composite comp SWT NONE Grid Layout proj Layout new Grid Layout proj Layout num Columns 2 proj Layout margin Height 0 proj Layout margin Width 0 proj Comp set Layout proj Layout gd new Grid Data Grid Data FILL HORIZONTAL proj Comp set Layout Data gd proj Comp set Font font f Proj Label new Label proj Comp SWT NONE f Proj Label set Text Launcher Messages get String Java Connect Tab Project  2 NON NLS 1 gd new Grid Data gd horizontal Span 2 f Proj Label set Layout Data gd f Proj Label set Font font f Proj Text new Text proj Comp SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL f Proj Text set Layout Data gd f Proj Text set Font font f Proj Text add Modify Listener new Modify Listener public void modify Text Modify Event evt update Launch Configuration Dialog f Proj Button create Push Button proj Comp Launcher Messages get String Java Connect Tab Browse 3 null NON NLS 1 f Proj Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Project Button Selected Composite connector Comp new Composite comp SWT NONE Grid Layout y new Grid Layout y num Columns 2 y margin Height 0 y margin Width 0 connector Comp set Layout y gd new Grid Data Grid Data FILL HORIZONTAL connector Comp set Layout Data gd Label l new Label connector Comp SWT NONE l set Text Launcher Messages get String Java Connect Tab Connect ion Type  7 NON NLS 1 gd new Grid Data Grid Data BEGINNING gd horizontal Span 2 l set Layout Data gd l set Font font f Connector Combo new Combo connector Comp SWT READ ONLY gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 f Connector Combo set Layout Data gd f Connector Combo set Font font String names new String f Connectors length for int i 0 i f Connectors length i names i f Connectors i get Name f Connector Combo set Items names f Connector Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Connector Combo Modified create Vertical Spacer comp 2 Group group new Group comp SWT NONE group set Text Launcher Messages get String Java Connect Tab Connection Properties 1 NON NLS 1 group set Layout new Grid Layout group set Font font gd new Grid Data Grid Data GRAB HORIZONTAL Grid Data FILL HORIZONTAL gd horizontal Span 2 group set Layout Data gd Add in an intermediate composite to allow for spacing Composite spacing Composite new Composite group SWT NONE y new Grid Layout spacing Composite set Layout y gd new Grid Data Grid Data GRAB HORIZONTAL Grid Data FILL HORIZONTAL gd horizontal Span 2 spacing Composite set Layout Data gd f Argument Composite spacing Composite f Argument Composite set Font font create Vertical Spacer comp 2 f Allow Terminate Button create Check Button comp Launcher Messages get String Java Connect Tab Allow termination of remote VM 6 NON NLS 1 f Allow Terminate Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt update Launch Configuration Dialog  ILaunchConfigurationTab createControl createControl getFont setControl WorkbenchHelp setHelp getControl IJavaDebugHelpContextIds LAUNCH_CONFIGURATION_DIALOG_CONNECT_TAB GridLayout topLayout GridLayout topLayout marginHeight setLayout topLayout setFont GridData createVerticalSpacer projComp GridLayout projLayout GridLayout projLayout numColumns projLayout marginHeight projLayout marginWidth projComp setLayout projLayout GridData GridData FILL_HORIZONTAL projComp setLayoutData projComp setFont fProjLabel projComp fProjLabel setText LauncherMessages getString JavaConnectTab Project__2 GridData horizontalSpan fProjLabel setLayoutData fProjLabel setFont fProjText projComp GridData GridData FILL_HORIZONTAL fProjText setLayoutData fProjText setFont fProjText addModifyListener ModifyListener modifyText ModifyEvent updateLaunchConfigurationDialog fProjButton createPushButton projComp LauncherMessages getString JavaConnectTab Browse_3 fProjButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleProjectButtonSelected connectorComp GridLayout GridLayout numColumns marginHeight marginWidth connectorComp setLayout GridData GridData FILL_HORIZONTAL connectorComp setLayoutData connectorComp setText LauncherMessages getString JavaConnectTab ion_Type__7 GridData GridData horizontalSpan setLayoutData setFont fConnectorCombo connectorComp READ_ONLY GridData GridData FILL_HORIZONTAL horizontalSpan fConnectorCombo setLayoutData fConnectorCombo setFont fConnectors fConnectors fConnectors getName fConnectorCombo setItems fConnectorCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleConnectorComboModified createVerticalSpacer setText LauncherMessages getString JavaConnectTab Connection_Properties_1 setLayout GridLayout setFont GridData GridData GRAB_HORIZONTAL GridData FILL_HORIZONTAL horizontalSpan setLayoutData spacingComposite GridLayout spacingComposite setLayout GridData GridData GRAB_HORIZONTAL GridData FILL_HORIZONTAL horizontalSpan spacingComposite setLayoutData fArgumentComposite spacingComposite fArgumentComposite setFont createVerticalSpacer fAllowTerminateButton createCheckButton LauncherMessages getString JavaConnectTab Allow_termination_of_remote_VM_6 fAllowTerminateButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
Update the argument area to show the selected connector s arguments protected void handle Connector Combo Modified int index f Connector Combo get Selection Index if index 0 index f Connectors length return IVM Connector vm f Connectors index if vm equals f Connector return selection did not change f Connector vm try f Argument Map vm get Default Arguments catch Core Exception e JDI DebugUI Plugin error Dialog Launcher Messages get String Java Connect Tab Unable to display connection arguments  2 e get Status NON NLS 1 return Dispose of any current child widgets in the tab holder area Control children f Argument Composite get Children for int i 0 i children length i children i dispose f Field Editor Map clear Preference Store store new Preference Store create editors Iterator keys vm get Argument Order iterator while keys has Next String key String keys next Connector Argument arg Connector Argument f Argument Map get key Field Editor field null if arg instanceof Connector Integer Argument store set Default arg name Connector Integer Argument arg int Value field new Integer Field Editor arg name get Label arg label f Argument Composite else if arg instanceof Connector Selected Argument List choices Connector Selected Argument arg choices String names And Values new String choices size 2 Iterator iter choices iterator int count 0 while iter has Next String choice String iter next names And Values count 0 choice names And Values count 1 choice count store set Default arg name arg value field new Combo Field Editor arg name get Label arg label names And Values f Argument Composite else if arg instanceof Connector String Argument store set Default arg name arg value field new String Field Editor arg name get Label arg label f Argument Composite else if arg instanceof Connector Boolean Argument store set Default arg name Connector Boolean Argument arg boolean Value field new Boolean Field Editor arg name get Label arg label f Argument Composite field set Preference Store store field load Default field set Property Change Listener this f Field Editor Map put key field f Argument Composite get Parent get Parent layout f Argument Composite layout  handleConnectorComboModified fConnectorCombo getSelectionIndex fConnectors IVMConnector fConnectors fConnector fConnector fArgumentMap getDefaultArguments CoreException JDIDebugUIPlugin errorDialog LauncherMessages getString JavaConnectTab Unable_to_display_connection_arguments _2 getStatus fArgumentComposite getChildren fFieldEditorMap PreferenceStore PreferenceStore getArgumentOrder hasNext fArgumentMap FieldEditor IntegerArgument setDefault IntegerArgument intValue IntegerFieldEditor getLabel fArgumentComposite SelectedArgument SelectedArgument namesAndValues hasNext namesAndValues namesAndValues setDefault ComboFieldEditor getLabel namesAndValues fArgumentComposite StringArgument setDefault StringFieldEditor getLabel fArgumentComposite BooleanArgument setDefault BooleanArgument booleanValue BooleanFieldEditor getLabel fArgumentComposite setPreferenceStore loadDefault setPropertyChangeListener fFieldEditorMap fArgumentComposite getParent getParent fArgumentComposite
Adds a colon to the label if required protected String get Label String label if label ends With NON NLS 1 label NON NLS 1 return label  getLabel endsWith
see org eclipse debug ui I Launch Configuration Tab initialize From I Launch Configuration public void initialize From I Launch Configuration config update Project From Config config update Allow Terminate From Config config update Connection From Config config  ILaunchConfigurationTab initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration updateProjectFromConfig updateAllowTerminateFromConfig updateConnectionFromConfig
protected void update Project From Config I Launch Configuration config String project Name NON NLS 1 try project Name config get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME EMPTY STRING catch Core Exception ce JDI DebugUI Plugin log ce f Proj Text set Text project Name  updateProjectFromConfig ILaunchConfiguration projectName projectName getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME EMPTY_STRING CoreException JDIDebugUIPlugin fProjText setText projectName
protected void update Allow Terminate From Config I Launch Configuration config boolean allow Terminate false try allow Terminate config get Attribute I Java Launch Configuration Constants ATTR ALLOW TERMINATE false catch Core Exception ce JDI DebugUI Plugin log ce f Allow Terminate Button set Selection allow Terminate  updateAllowTerminateFromConfig ILaunchConfiguration allowTerminate allowTerminate getAttribute IJavaLaunchConfigurationConstants ATTR_ALLOW_TERMINATE CoreException JDIDebugUIPlugin fAllowTerminateButton setSelection allowTerminate
protected void update Connection From Config I Launch Configuration config String id null try id config get Attribute I Java Launch Configuration Constants ATTR VM CONNECTOR Java Runtime get DefaultVM Connector get Identifier f Connector Combo set Text Java Runtime getVM Connector id get Name handle Connector Combo Modified Map attr Map config get Attribute I Java Launch Configuration Constants ATTR CONNECT MAP Map null if attr Map null return Iterator keys attr Map key Set iterator while keys has Next String key String keys next Connector Argument arg Connector Argument f Argument Map get key Field Editor editor Field Editor f Field Editor Map get key if arg null editor null String value String attr Map get key if arg instanceof Connector String Argument arg instanceof Connector Selected Argument editor get Preference Store set Value key value else if arg instanceof Connector Boolean Argument boolean b new Boolean value boolean Value editor get Preference Store set Value key b else if arg instanceof Connector Integer Argument int i new Integer value int Value editor get Preference Store set Value key i editor load catch Core Exception ce JDI DebugUI Plugin log ce  updateConnectionFromConfig ILaunchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_VM_CONNECTOR JavaRuntime getDefaultVMConnector getIdentifier fConnectorCombo setText JavaRuntime getVMConnector getName handleConnectorComboModified attrMap getAttribute IJavaLaunchConfigurationConstants ATTR_CONNECT_MAP attrMap attrMap keySet hasNext fArgumentMap FieldEditor FieldEditor fFieldEditorMap attrMap StringArgument SelectedArgument getPreferenceStore setValue BooleanArgument booleanValue getPreferenceStore setValue IntegerArgument intValue getPreferenceStore setValue CoreException JDIDebugUIPlugin
see org eclipse debug ui I Launch Configuration Tab dispose public void dispose  ILaunchConfigurationTab
see org eclipse debug ui I Launch Configuration Tab perform Apply I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy config config set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME f Proj Text get Text trim config set Attribute I Java Launch Configuration Constants ATTR ALLOW TERMINATE f Allow Terminate Button get Selection IVM Connector vmc get Selected Connector config set Attribute I Java Launch Configuration Constants ATTR VM CONNECTOR vmc get Identifier Map attr Map new Hash Map f Field Editor Map size Iterator keys f Field Editor Map key Set iterator while keys has Next String key String keys next Field Editor editor Field Editor f Field Editor Map get key if editor is Valid return Connector Argument arg Connector Argument f Argument Map get key editor store if arg instanceof Connector String Argument arg instanceof Connector Selected Argument String value editor get Preference Store get String key attr Map put key value else if arg instanceof Connector Boolean Argument boolean value editor get Preference Store get Boolean key attr Map put key new Boolean value to String else if arg instanceof Connector Integer Argument int value editor get Preference Store get Int key attr Map put key new Integer value to String config set Attribute I Java Launch Configuration Constants ATTR CONNECT MAP attr Map  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME fProjText getText setAttribute IJavaLaunchConfigurationConstants ATTR_ALLOW_TERMINATE fAllowTerminateButton getSelection IVMConnector getSelectedConnector setAttribute IJavaLaunchConfigurationConstants ATTR_VM_CONNECTOR getIdentifier attrMap HashMap fFieldEditorMap fFieldEditorMap keySet hasNext FieldEditor FieldEditor fFieldEditorMap isValid fArgumentMap StringArgument SelectedArgument getPreferenceStore getString attrMap BooleanArgument getPreferenceStore getBoolean attrMap toString IntegerArgument getPreferenceStore getInt attrMap toString setAttribute IJavaLaunchConfigurationConstants ATTR_CONNECT_MAP attrMap
Show a dialog that lets the user select a project This in turn provides context for the main type allowing the user to key a main type name or constraining the search for main types to the specified project protected void handle Project Button Selected I Java Project project choose Java Project if project null return String project Name project get Element Name f Proj Text set Text project Name  handleProjectButtonSelected IJavaProject chooseJavaProject projectName getElementName fProjText setText projectName
Realize a Java Project selection dialog and return the first selected project or null if there was none protected I Java Project choose Java Project I Java Project projects try projects Java Core create get Workspace Root get Java Projects catch Java Model Exception e JDI DebugUI Plugin log e projects new I Java Project 0 I Label Provider label Provider new Java Element Label Provider Java Element Label Provider SHOW DEFAULT Element List Selection Dialog dialog new Element List Selection Dialog get Shell label Provider dialog set Title Launcher Messages get String Java Connect Tab Project selection 10 NON NLS 1 dialog set Message Launcher Messages get String Java Connect Tab Choose a project to constrain the search for main types 11 NON NLS 1 dialog set Elements projects I Java Project java Project get Java Project if java Project null dialog set Initial Selections new Object java Project if dialog open Window OK return I Java Project dialog get First Result return null  IJavaProject chooseJavaProject IJavaProject JavaCore getWorkspaceRoot getJavaProjects JavaModelException JDIDebugUIPlugin IJavaProject ILabelProvider labelProvider JavaElementLabelProvider JavaElementLabelProvider SHOW_DEFAULT ElementListSelectionDialog ElementListSelectionDialog getShell labelProvider setTitle LauncherMessages getString JavaConnectTab Project_selection_10 setMessage LauncherMessages getString JavaConnectTab Choose_a_project_to_constrain_the_search_for_main_types_11 setElements IJavaProject javaProject getJavaProject javaProject setInitialSelections javaProject IJavaProject getFirstResult
Return the I Java Project corresponding to the project name in the project name text field or null if the text does not match a project name protected I Java Project get Java Project String project Name f Proj Text get Text trim if project Name length 1 return null return get Java Model get Java Project project Name  IJavaProject IJavaProject getJavaProject projectName fProjText getText projectName getJavaModel getJavaProject projectName
Convenience method to get the workspace root private I Workspace Root get Workspace Root return Resources Plugin get Workspace get Root  IWorkspaceRoot getWorkspaceRoot ResourcesPlugin getWorkspace getRoot
Convenience method to get access to the java model private I Java Model get Java Model return Java Core create get Workspace Root  IJavaModel getJavaModel JavaCore getWorkspaceRoot
Initialize default settings for the given Java element protected void initialize Defaults I Java Element java Element I Launch Configuration Working Copy config initialize Java Project java Element config initialize Name java Element config initialize Hard Coded Defaults config  initializeDefaults IJavaElement javaElement ILaunchConfigurationWorkingCopy initializeJavaProject javaElement initializeName javaElement initializeHardCodedDefaults
see org eclipse debug ui I Launch Configuration Tab set Defaults I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy config I Java Element java Element get Context if java Element null initialize Hard Coded Defaults config else initialize Defaults java Element config  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy IJavaElement javaElement getContext javaElement initializeHardCodedDefaults initializeDefaults javaElement
Find the first instance of a type compilation unit class file or project in the specified element s parental hierarchy and use this as the default name protected void initialize Name I Java Element java Element I Launch Configuration Working Copy config String name NON NLS 1 try I Resource resource java Element get Underlying Resource if resource null name resource get Name int index name last Index Of if index 0 name name substring 0 index else name java Element get Element Name name get Launch Configuration Dialog generate Name name catch Java Model Exception jme JDI DebugUI Plugin log jme config rename name  initializeName IJavaElement javaElement ILaunchConfigurationWorkingCopy IResource javaElement getUnderlyingResource getName lastIndexOf javaElement getElementName getLaunchConfigurationDialog generateName JavaModelException JDIDebugUIPlugin
Initialize those attributes whose default values are independent of any context protected void initialize Hard Coded Defaults I Launch Configuration Working Copy config config set Attribute I Java Launch Configuration Constants ATTR ALLOW TERMINATE false config set Attribute I Java Launch Configuration Constants ATTR VM CONNECTOR Java Runtime get DefaultVM Connector get Identifier  initializeHardCodedDefaults ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_ALLOW_TERMINATE setAttribute IJavaLaunchConfigurationConstants ATTR_VM_CONNECTOR JavaRuntime getDefaultVMConnector getIdentifier
see org eclipse debug ui I Launch Configuration Tab is Valid I Launch Configuration public boolean is Valid I Launch Configuration config set Error Message null set Message null project String name f Proj Text get Text trim if name length 0 if Resources Plugin get Workspace get Root get Project name exists set Error Message Launcher Messages get String Java Connect Tab Project does not exist 14 NON NLS 1 return false Iterator keys f Field Editor Map key Set iterator while keys has Next String key String keys next Connector Argument arg Connector Argument f Argument Map get key Field Editor editor Field Editor f Field Editor Map get key if editor instanceof String Field Editor String value String Field Editor editor get String Value if arg is Valid value set Error Message arg label Launcher Messages get String Java Connect Tab  is invalid  5 NON NLS 1 return false return true  ILaunchConfigurationTab isValid ILaunchConfiguration isValid ILaunchConfiguration setErrorMessage setMessage fProjText getText ResourcesPlugin getWorkspace getRoot getProject setErrorMessage LauncherMessages getString JavaConnectTab Project_does_not_exist_14 fFieldEditorMap keySet hasNext fArgumentMap FieldEditor FieldEditor fFieldEditorMap StringFieldEditor StringFieldEditor getStringValue isValid setErrorMessage LauncherMessages getString JavaConnectTab _is_invalid _5
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Launcher Messages get String Java Connect Tab Conn ect 20 NON NLS 1  ILaunchConfigurationTab getName getName LauncherMessages getString JavaConnectTab ect_20
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return DebugUI Tools get Image I DebugUI Constants IMG LCL DISCONNECT  ILaunchConfigurationTab getImage getImage DebugUITools getImage IDebugUIConstants IMG_LCL_DISCONNECT
Returns the selected connector protected IVM Connector get Selected Connector return f Connector  IVMConnector getSelectedConnector fConnector
see I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event update Launch Configuration Dialog  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent updateLaunchConfigurationDialog
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy do nothing when activated  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy do nothing when deactivated  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy

Selection changed listener checked JRE private I Selection Changed Listener f Check Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle SelectedJRE Changed  ISelectionChangedListener fCheckListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectedJREChanged
public void dispose super dispose if fJRE Block null fJRE Block remove Selection Changed Listener f Check Listener  fJREBlock fJREBlock removeSelectionChangedListener fCheckListener
see I Launch Configuration Tab create Control Composite public void create Control Composite parent Font font parent get Font Composite top Comp new Composite parent SWT NONE set Control top Comp Workbench Help set Help get Control I Java Debug Help Context Ids LAUNCH CONFIGURATION DIALOG JRE TAB Grid Layout top Layout new Grid Layout top Layout num Columns 1 top Layout margin Height 0 top Layout margin Width 0 top Comp set Layout top Layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL top Comp set Layout Data gd top Comp set Font font create Vertical Spacer top Comp 1 fJRE Block new JR Es Combo Block fJRE Block set DefaultJRE Descriptor get DefaultJRE Descriptor fJRE Block set SpecificJRE Descriptor get SpecificJRE Descriptor fJRE Block create Control top Comp Control control fJRE Block get Control fJRE Block add Selection Changed Listener f Check Listener gd new Grid Data Grid Data FILL HORIZONTAL control set Layout Data gd Composite dyn Tab Comp new Composite top Comp SWT NONE dyn Tab Comp set Font font set Dynamic Tab Holder dyn Tab Comp Grid Layout tab Holder Layout new Grid Layout tab Holder Layout margin Height 0 tab Holder Layout margin Width 0 tab Holder Layout num Columns 1 get Dynamic Tab Holder set Layout tab Holder Layout gd new Grid Data Grid Data FILL BOTH get Dynamic Tab Holder set Layout Data gd  ILaunchConfigurationTab createControl createControl getFont topComp setControl topComp WorkbenchHelp setHelp getControl IJavaDebugHelpContextIds LAUNCH_CONFIGURATION_DIALOG_JRE_TAB GridLayout topLayout GridLayout topLayout numColumns topLayout marginHeight topLayout marginWidth topComp setLayout topLayout GridData GridData GridData FILL_HORIZONTAL topComp setLayoutData topComp setFont createVerticalSpacer topComp fJREBlock JREsComboBlock fJREBlock setDefaultJREDescriptor getDefaultJREDescriptor fJREBlock setSpecificJREDescriptor getSpecificJREDescriptor fJREBlock createControl topComp fJREBlock getControl fJREBlock addSelectionChangedListener fCheckListener GridData GridData FILL_HORIZONTAL setLayoutData dynTabComp topComp dynTabComp setFont setDynamicTabHolder dynTabComp GridLayout tabHolderLayout GridLayout tabHolderLayout marginHeight tabHolderLayout marginWidth tabHolderLayout numColumns getDynamicTabHolder setLayout tabHolderLayout GridData GridData FILL_BOTH getDynamicTabHolder setLayoutData
protected void set Dynamic Tab Holder Composite tab Holder this f Dynamic Tab Holder tab Holder  setDynamicTabHolder tabHolder fDynamicTabHolder tabHolder
protected Composite get Dynamic Tab Holder return f Dynamic Tab Holder  getDynamicTabHolder fDynamicTabHolder
protected void set Dynamic Tab I Launch Configuration Tab tab f Dynamic Tab tab  setDynamicTab ILaunchConfigurationTab fDynamicTab
protected I Launch Configuration Tab get Dynamic Tab return f Dynamic Tab  ILaunchConfigurationTab getDynamicTab fDynamicTab
see I Launch Configuration Tab set Defaults I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy config set Launch Configuration Working Copy config I Launch Configuration Tab dynamic Tab get Dynamic Tab if dynamic Tab null dynamic Tab set Defaults config  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy setLaunchConfigurationWorkingCopy ILaunchConfigurationTab dynamicTab getDynamicTab dynamicTab dynamicTab setDefaults
see I Launch Configuration Tab initialize From I Launch Configuration public void initialize From I Launch Configuration configuration f Is Initializing true get Control set Redraw false f Ok To Clear UnknownVM false if get Launch Configuration null configuration equals get Launch Configuration f UnknownVM Name null f UnknownVM Type null set Launch Configuration configuration updateJRE From Config configuration fJRE Block set DefaultJRE Descriptor get DefaultJRE Descriptor I Launch Configuration Tab dynamic Tab get Dynamic Tab if dynamic Tab null dynamic Tab initialize From configuration f Ok To Clear UnknownVM true get Control set Redraw true f Is Initializing false  ILaunchConfigurationTab initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration fIsInitializing getControl setRedraw fOkToClearUnknownVM getLaunchConfiguration getLaunchConfiguration fUnknownVMName fUnknownVMType setLaunchConfiguration updateJREFromConfig fJREBlock setDefaultJREDescriptor getDefaultJREDescriptor ILaunchConfigurationTab dynamicTab getDynamicTab dynamicTab dynamicTab initializeFrom fOkToClearUnknownVM getControl setRedraw fIsInitializing
see I Launch Configuration Tab perform Apply I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy configuration if f UnknownVM Name null IVM Install vm null boolean vm Exists true if fJRE Block is DefaultJRE vm fJRE Block getJRE vm Exists vm null Set the name type ID attribute values if vm Exists A null vm means the default VM was selected in which case we want to set null attribute values Otherwise retrieve the name type ID String vm Name null String vm TypeID null if vm null vm Name vm get Name vm TypeID vm getVM Install Type get Id configuration set Attribute I Java Launch Configuration Constants ATTR VM INSTALL NAME vm Name configuration set Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE vm TypeID Handle any attributes in the VM specific area I Launch Configuration Tab dynamic Tab get Dynamic Tab if dynamic Tab null configuration set Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE SPECIFIC ATTRS MAP Map null else dynamic Tab perform Apply configuration  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy fUnknownVMName IVMInstall vmExists fJREBlock isDefaultJRE fJREBlock vmExists vmExists vmName vmTypeID vmName getName vmTypeID getVMInstallType getId setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_NAME vmName setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE vmTypeID ILaunchConfigurationTab dynamicTab getDynamicTab dynamicTab setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP dynamicTab performApply
see I Launch Configuration Tab is Valid I Launch Configuration public boolean is Valid I Launch Configuration config set Error Message null set Message null if f UnknownVM Name null set Error Message Message Format format Launcher Messages get String JavaJRE Tab Configuration specifies undefined JRE    0  1 new String f UnknownVM Name NON NLS 1 return false Don t do any validation if the default VM was chosen IVM Install vm fJRE Block getJRE if vm null if fJRE Block is DefaultJRE set Error Message Launcher Messages get String JavaJRE Tab JRE not specified 38 NON NLS 1 return false else File location vm get Install Location if location null set Error Message Launcher Messages get String JavaJRE Tab JRE home directory not specified 36 NON NLS 1 return false if location exists set Error Message Launcher Messages get String JavaJRE Tab JRE home directory does not exist 37 NON NLS 1 return false I Launch Configuration Tab dynamic Tab get Dynamic Tab if dynamic Tab null return dynamic Tab is Valid config return true  ILaunchConfigurationTab isValid ILaunchConfiguration isValid ILaunchConfiguration setErrorMessage setMessage fUnknownVMName setErrorMessage MessageFormat LauncherMessages getString JavaJRETab Configuration_specifies_undefined_JRE_ _ _1 fUnknownVMName IVMInstall fJREBlock fJREBlock isDefaultJRE setErrorMessage LauncherMessages getString JavaJRETab JRE_not_specified_38 getInstallLocation setErrorMessage LauncherMessages getString JavaJRETab JRE_home_directory_not_specified_36 setErrorMessage LauncherMessages getString JavaJRETab JRE_home_directory_does_not_exist_37 ILaunchConfigurationTab dynamicTab getDynamicTab dynamicTab dynamicTab isValid
see I Launch Configuration Tab get Name public String get Name return Launcher Messages get String JavaJRE Tab JRE 1 NON NLS 1  ILaunchConfigurationTab getName getName LauncherMessages getString JavaJRETab JRE_1
see I Launch Configuration Tab get Image public Image get Image return Java Plugin Images get Java Plugin Images IMG OBJS LIBRARY  ILaunchConfigurationTab getImage getImage JavaPluginImages JavaPluginImages IMG_OBJS_LIBRARY
protected void updateJRE From Config I Launch Configuration config String vm Name null String vm TypeID null try vm TypeID config get Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE String null vm Name config get Attribute I Java Launch Configuration Constants ATTR VM INSTALL NAME String null catch Core Exception ce JDI DebugUI Plugin log ce selectJRE vm TypeID vm Name  updateJREFromConfig ILaunchConfiguration vmName vmTypeID vmTypeID getAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE vmName getAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_NAME CoreException JDIDebugUIPlugin vmTypeID vmName
Notification that the user changed the selection in the JRE combo box protected void handle SelectedJRE Changed if f Ok To Clear UnknownVM f UnknownVM Name null f UnknownVM Type null load DynamicJRE Area always set the newly created area with defaults I Launch Configuration Working Copy wc get Launch Configuration Working Copy if get Dynamic Tab null remove any VM specfic args from the config if wc null if get Launch Configuration is Working Copy wc I Launch Configuration Working Copy get Launch Configuration if f Is Initializing if wc null wc set Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE SPECIFIC ATTRS MAP Map null else if wc null try if get Launch Configuration is Working Copy get a fresh copy to work on wc I Launch Configuration Working Copy get Launch Configuration get Original get Working Copy else wc get Launch Configuration get Working Copy catch Core Exception e JDI DebugUI Plugin error Dialog Launcher Messages get String JavaJRE Tab Unable to initialize defaults for selected JRE 1 e NON NLS 1 return if f Is Initializing get Dynamic Tab set Defaults wc get Dynamic Tab initialize From wc update Launch Configuration Dialog  handleSelectedJREChanged fOkToClearUnknownVM fUnknownVMName fUnknownVMType loadDynamicJREArea ILaunchConfigurationWorkingCopy getLaunchConfigurationWorkingCopy getDynamicTab getLaunchConfiguration isWorkingCopy ILaunchConfigurationWorkingCopy getLaunchConfiguration fIsInitializing setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP getLaunchConfiguration isWorkingCopy ILaunchConfigurationWorkingCopy getLaunchConfiguration getOriginal getWorkingCopy getLaunchConfiguration getWorkingCopy CoreException JDIDebugUIPlugin errorDialog LauncherMessages getString JavaJRETab Unable_to_initialize_defaults_for_selected_JRE_1 fIsInitializing getDynamicTab setDefaults getDynamicTab initializeFrom updateLaunchConfigurationDialog
protected void selectJRE String typeID String vm Name if typeID null fJRE Block set Use DefaultJRE else IVM Install Type types Java Runtime getVM Install Types for int i 0 i types length i IVM Install Type type types i if type get Id equals typeID IVM Install installs type getVM Installs for int j 0 j installs length j IVM Install install installs j if install get Name equals vm Name fJRE Block setJRE install return break f UnknownVM Name vm Name fJRE Block setJRE null  vmName fJREBlock setUseDefaultJRE IVMInstallType JavaRuntime getVMInstallTypes IVMInstallType getId IVMInstall getVMInstalls IVMInstall getName vmName fJREBlock fUnknownVMName vmName fJREBlock
Return the class that implements code I Launch Configuration Tab code that is registered against the install type of the currently selected VM protected I Launch Configuration Tab get Tab For CurrentJRE if fJRE Block is DefaultJRE IVM Install vm fJRE Block getJRE if vm null String vm Install TypeID vm getVM Install Type get Id return JDI DebugUI Plugin get Default getVM Install Type Page vm Install TypeID return null  ILaunchConfigurationTab ILaunchConfigurationTab getTabForCurrentJRE fJREBlock isDefaultJRE IVMInstall fJREBlock vmInstallTypeID getVMInstallType getId JDIDebugUIPlugin getDefault getVMInstallTypePage vmInstallTypeID
Show the contributed piece of UI that was registered for the install type of the currently selected VM protected void load DynamicJRE Area Dispose of any current child widgets in the tab holder area Control children get Dynamic Tab Holder get Children for int i 0 i children length i children i dispose if is Use DynamicJRE Area Retrieve the dynamic UI for the current JRE set Dynamic Tab get Tab For CurrentJRE if get Dynamic Tab null return Ask the dynamic UI to create its Control get Dynamic Tab set Launch Configuration Dialog get Launch Configuration Dialog get Dynamic Tab create Control get Dynamic Tab Holder get Dynamic Tab Holder layout  loadDynamicJREArea getDynamicTabHolder getChildren isUseDynamicJREArea setDynamicTab getTabForCurrentJRE getDynamicTab getDynamicTab setLaunchConfigurationDialog getLaunchConfigurationDialog getDynamicTab createControl getDynamicTabHolder getDynamicTabHolder
protected I Launch Configuration Working Copy get Launch Configuration Working Copy return f Working Copy  ILaunchConfigurationWorkingCopy getLaunchConfigurationWorkingCopy fWorkingCopy
Overridden here so that any error message in the dynamic UI gets returned see I Launch Configuration Tab get Error Message public String get Error Message I Launch Configuration Tab tab get Dynamic Tab if super get Error Message null tab null return super get Error Message else return tab get Error Message  ILaunchConfigurationTab getErrorMessage getErrorMessage ILaunchConfigurationTab getDynamicTab getErrorMessage getErrorMessage getErrorMessage
protected void set Launch Configuration Working Copy I Launch Configuration Working Copy working Copy f Working Copy working Copy  setLaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy fWorkingCopy workingCopy
protected I Launch Configuration get Launch Configuration return f Launch Configuration  ILaunchConfiguration getLaunchConfiguration fLaunchConfiguration
protected void set Launch Configuration I Launch Configuration launch Configuration f Launch Configuration launch Configuration  setLaunchConfiguration ILaunchConfiguration launchConfiguration fLaunchConfiguration launchConfiguration
Sets whether this tab will display the VM specific arguments area if a JRE supports VM specific arguments param visible whether this tab will display the VM specific arguments area if a JRE supports VM specific arguments public void setVM Specific Arguments Visible boolean visible f Use Dynamic Area visible  setVMSpecificArgumentsVisible fUseDynamicArea
protected boolean is Use DynamicJRE Area return f Use Dynamic Area  isUseDynamicJREArea fUseDynamicArea
public String get Description I Java Project project get Java Project String name Launcher Messages get String JavaJRE Tab 7 NON NLS 1 if project null IVM Install vm Java Runtime get DefaultVM Install if vm null name vm get Name return Message Format format Launcher Messages get String JavaJRE Tab 8 new String name NON NLS 1 else try IVM Install vm Java Runtime getVM Install project if vm null name vm get Name catch Core Exception e return Message Format format Launcher Messages get String JavaJRE Tab 9 new String name NON NLS 1  getDescription IJavaProject getJavaProject LauncherMessages getString JavaJRETab IVMInstall JavaRuntime getDefaultVMInstall getName MessageFormat LauncherMessages getString JavaJRETab IVMInstall JavaRuntime getVMInstall getName CoreException MessageFormat LauncherMessages getString JavaJRETab
protected JRE Descriptor get DefaultJRE Descriptor return new JRE Descriptor non Javadoc see org eclipse jdt internal debug ui jres DefaultJRE Descriptor get Description public String get Description I Java Project project get Java Project String name Launcher Messages get String JavaJRE Tab 7 NON NLS 1 if project null IVM Install vm Java Runtime get DefaultVM Install if vm null name vm get Name return Message Format format Launcher Messages get String JavaJRE Tab 8 new String name NON NLS 1 else try IVM Install vm Java Runtime getVM Install project if vm null name vm get Name catch Core Exception e return Message Format format Launcher Messages get String JavaJRE Tab 9 new String name NON NLS 1  JREDescriptor getDefaultJREDescriptor JREDescriptor DefaultJREDescriptor getDescription getDescription IJavaProject getJavaProject LauncherMessages getString JavaJRETab IVMInstall JavaRuntime getDefaultVMInstall getName MessageFormat LauncherMessages getString JavaJRETab IVMInstall JavaRuntime getVMInstall getName CoreException MessageFormat LauncherMessages getString JavaJRETab
protected JRE Descriptor get SpecificJRE Descriptor return null  JREDescriptor getSpecificJREDescriptor
Returns the Java project associated with the current config being edited or code null code if none return java project or code null code protected I Java Project get Java Project if get Launch Configuration null try String name get Launch Configuration get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME String null if name null name length 0 I Project project Resources Plugin get Workspace get Root get Project name if project exists return Java Core create project catch Core Exception e JDI DebugUI Plugin log e return null  IJavaProject getJavaProject getLaunchConfiguration getLaunchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME IProject ResourcesPlugin getWorkspace getRoot getProject JavaCore CoreException JDIDebugUIPlugin
public void activated I Launch Configuration Working Copy working Copy update the default JRE descriptoin in case it has changed based on the selected project fJRE Block refresh  ILaunchConfigurationWorkingCopy workingCopy fJREBlock
see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy do nothing when deactivated  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy

private class Widget Listener implements Modify Listener Selection Listener public void modify Text Modify Event e update Launch Configuration Dialog  WidgetListener ModifyListener SelectionListener modifyText ModifyEvent updateLaunchConfigurationDialog
public void widget Selected Selection Event e Object source e get Source if source f Proj Button handle Project Button Selected else if source f Search Button handle Search Button Selected else update Launch Configuration Dialog  widgetSelected SelectionEvent getSource fProjButton handleProjectButtonSelected fSearchButton handleSearchButtonSelected updateLaunchConfigurationDialog
public void widget Default Selected Selection Event e  widgetDefaultSelected SelectionEvent
see org eclipse debug ui I Launch Configuration Tab create Control Composite public void create Control Composite parent Font font parent get Font Composite comp new Composite parent SWT NONE set Control comp Workbench Help set Help get Control I Java Debug Help Context Ids LAUNCH CONFIGURATION DIALOG MAIN TAB Grid Layout top Layout new Grid Layout top Layout vertical Spacing 0 top Layout num Columns 2 comp set Layout top Layout comp set Font font Label proj Label new Label comp SWT NONE proj Label set Text Launcher Messages get String Java Main Tab Project  2 NON NLS 1 Grid Data gd new Grid Data gd horizontal Span 2 proj Label set Layout Data gd proj Label set Font font f Proj Text new Text comp SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL f Proj Text set Layout Data gd f Proj Text set Font font f Proj Text add Modify Listener f Listener f Proj Button create Push Button comp Launcher Messages get String Java Main Tab Browse 3 null NON NLS 1 f Proj Button add Selection Listener f Listener create Vertical Spacer comp 2 create Main Type Editor comp create Vertical Spacer comp 2 f Stop In Main Check Button create Check Button comp Launcher Messages get String Java Main Tab St op in main 1 NON NLS 1 gd new Grid Data gd horizontal Span 2 f Stop In Main Check Button set Layout Data gd f Stop In Main Check Button add Selection Listener f Listener  ILaunchConfigurationTab createControl createControl getFont setControl WorkbenchHelp setHelp getControl IJavaDebugHelpContextIds LAUNCH_CONFIGURATION_DIALOG_MAIN_TAB GridLayout topLayout GridLayout topLayout verticalSpacing topLayout numColumns setLayout topLayout setFont projLabel projLabel setText LauncherMessages getString JavaMainTab Project__2 GridData GridData horizontalSpan projLabel setLayoutData projLabel setFont fProjText GridData GridData FILL_HORIZONTAL fProjText setLayoutData fProjText setFont fProjText addModifyListener fListener fProjButton createPushButton LauncherMessages getString JavaMainTab Browse_3 fProjButton addSelectionListener fListener createVerticalSpacer createMainTypeEditor createVerticalSpacer fStopInMainCheckButton createCheckButton LauncherMessages getString JavaMainTab op_in_main_1 GridData horizontalSpan fStopInMainCheckButton setLayoutData fStopInMainCheckButton addSelectionListener fListener
Creates the widgets for specifying a main type param parent the parent composite private void create Main Type Editor Composite parent Font font parent get Font Group main Group new Group parent SWT NONE main Group set Text Launcher Messages get String Java Main Tab Main cla ss  4 NON NLS 1 Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 main Group set Layout Data gd Grid Layout layout new Grid Layout layout num Columns 2 main Group set Layout layout main Group set Font font f Main Text new Text main Group SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL f Main Text set Layout Data gd f Main Text set Font font f Main Text add Modify Listener f Listener f Search Button create Push Button main Group Launcher Messages get String Java Main Tab Searc h 5 null NON NLS 1 f Search Button add Selection Listener f Listener f Search External Jars Check Button create Check Button main Group Launcher Messages get String Java Main Tab E xt  jars 6 NON NLS 1 gd new Grid Data gd horizontal Span 2 f Search External Jars Check Button set Layout Data gd f Search External Jars Check Button add Selection Listener f Listener f Consider Inherited Main Button create Check Button main Group Launcher Messages get String Java Main Tab 22 NON NLS 1 gd new Grid Data gd horizontal Span 2 f Consider Inherited Main Button set Layout Data gd f Consider Inherited Main Button add Selection Listener f Listener  createMainTypeEditor getFont mainGroup mainGroup setText LauncherMessages getString JavaMainTab Main_cla ss__4 GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan mainGroup setLayoutData GridLayout GridLayout numColumns mainGroup setLayout mainGroup setFont fMainText mainGroup GridData GridData FILL_HORIZONTAL fMainText setLayoutData fMainText setFont fMainText addModifyListener fListener fSearchButton createPushButton mainGroup LauncherMessages getString JavaMainTab h_5 fSearchButton addSelectionListener fListener fSearchExternalJarsCheckButton createCheckButton mainGroup LauncherMessages getString JavaMainTab _jars_6 GridData horizontalSpan fSearchExternalJarsCheckButton setLayoutData fSearchExternalJarsCheckButton addSelectionListener fListener fConsiderInheritedMainButton createCheckButton mainGroup LauncherMessages getString JavaMainTab GridData horizontalSpan fConsiderInheritedMainButton setLayoutData fConsiderInheritedMainButton addSelectionListener fListener
see org eclipse debug ui I Launch Configuration Tab initialize From I Launch Configuration public void initialize From I Launch Configuration config update Project From Config config update Main Type From Config config update Stop In Main From Config config update Inherited Mains From Config config update External Jars config  ILaunchConfigurationTab initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration updateProjectFromConfig updateMainTypeFromConfig updateStopInMainFromConfig updateInheritedMainsFromConfig updateExternalJars
protected void update Project From Config I Launch Configuration config String project Name NON NLS 1 try project Name config get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME EMPTY STRING catch Core Exception ce JDI DebugUI Plugin log ce f Proj Text set Text project Name  updateProjectFromConfig ILaunchConfiguration projectName projectName getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME EMPTY_STRING CoreException JDIDebugUIPlugin fProjText setText projectName
protected void update Main Type From Config I Launch Configuration config String main Type Name NON NLS 1 try main Type Name config get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME EMPTY STRING catch Core Exception ce JDI DebugUI Plugin log ce f Main Text set Text main Type Name  updateMainTypeFromConfig ILaunchConfiguration mainTypeName mainTypeName getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME EMPTY_STRING CoreException JDIDebugUIPlugin fMainText setText mainTypeName
protected void update Stop In Main From Config I Launch Configuration configuration boolean stop false try stop configuration get Attribute I Java Launch Configuration Constants ATTR STOP IN MAIN false catch Core Exception e JDI DebugUI Plugin log e f Stop In Main Check Button set Selection stop  updateStopInMainFromConfig ILaunchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_STOP_IN_MAIN CoreException JDIDebugUIPlugin fStopInMainCheckButton setSelection
protected void update Inherited Mains From Config I Launch Configuration configuration boolean inherit false try inherit configuration get Attribute ATTR CONSIDER INHERITED MAIN false catch Core Exception e JDI DebugUI Plugin log e f Consider Inherited Main Button set Selection inherit  updateInheritedMainsFromConfig ILaunchConfiguration getAttribute ATTR_CONSIDER_INHERITED_MAIN CoreException JDIDebugUIPlugin fConsiderInheritedMainButton setSelection
protected void update External Jars I Launch Configuration configuration boolean search false try search configuration get Attribute ATTR INCLUDE EXTERNAL JARS false catch Core Exception e JDI DebugUI Plugin log e f Search External Jars Check Button set Selection search  updateExternalJars ILaunchConfiguration getAttribute ATTR_INCLUDE_EXTERNAL_JARS CoreException JDIDebugUIPlugin fSearchExternalJarsCheckButton setSelection
see org eclipse debug ui I Launch Configuration Tab perform Apply I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy config config set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME f Proj Text get Text config set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME f Main Text get Text attribute added in 2 1 so null must be used instead of false for backwards compatibility if f Stop In Main Check Button get Selection config set Attribute I Java Launch Configuration Constants ATTR STOP IN MAIN true else config set Attribute I Java Launch Configuration Constants ATTR STOP IN MAIN String null attribute added in 2 1 so null must be used instead of false for backwards compatibility if f Search External Jars Check Button get Selection config set Attribute ATTR INCLUDE EXTERNAL JARS true else config set Attribute ATTR INCLUDE EXTERNAL JARS String null attribute added in 3 0 so null must be used instead of false for backwards compatibility if f Consider Inherited Main Button get Selection config set Attribute ATTR CONSIDER INHERITED MAIN true else config set Attribute ATTR CONSIDER INHERITED MAIN String null  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME fProjText getText setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME fMainText getText fStopInMainCheckButton getSelection setAttribute IJavaLaunchConfigurationConstants ATTR_STOP_IN_MAIN setAttribute IJavaLaunchConfigurationConstants ATTR_STOP_IN_MAIN fSearchExternalJarsCheckButton getSelection setAttribute ATTR_INCLUDE_EXTERNAL_JARS setAttribute ATTR_INCLUDE_EXTERNAL_JARS fConsiderInheritedMainButton getSelection setAttribute ATTR_CONSIDER_INHERITED_MAIN setAttribute ATTR_CONSIDER_INHERITED_MAIN
see org eclipse debug ui I Launch Configuration Tab dispose public void dispose  ILaunchConfigurationTab
Show a dialog that lists all main types protected void handle Search Button Selected I Java Project java Project get Java Project I Java Search Scope search Scope null if java Project null java Project exists search Scope Search Engine create Workspace Scope else search Scope Search Engine create Java Search Scope new I Java Element java Project false int constraints I Java Element Search Constants CONSIDER BINARIES if f Search External Jars Check Button get Selection constraints I Java Element Search Constants CONSIDER EXTERNAL JARS Main Method Search Engine engine new Main Method Search Engine I Type types null try types engine search Main Methods get Launch Configuration Dialog search Scope constraints f Consider Inherited Main Button get Selection catch Invocation Target Exception e set Error Message e get Message return catch Interrupted Exception e set Error Message e get Message return Shell shell get Shell Selection Dialog dialog new Main Type Selection Dialog shell types dialog set Title Launcher Messages get String Java Main Tab Choose Main Type 11 NON NLS 1 dialog set Message Launcher Messages get String Java Main Tab Choose a main  type to launch  12 NON NLS 1 if dialog open Window CANCEL return Object results dialog get Result if results null results length 1 return I Type type I Type results 0 if type null f Main Text set Text type get Fully Qualified Name java Project type get Java Project f Proj Text set Text java Project get Element Name  handleSearchButtonSelected IJavaProject javaProject getJavaProject IJavaSearchScope searchScope javaProject javaProject searchScope SearchEngine createWorkspaceScope searchScope SearchEngine createJavaSearchScope IJavaElement javaProject IJavaElementSearchConstants CONSIDER_BINARIES fSearchExternalJarsCheckButton getSelection IJavaElementSearchConstants CONSIDER_EXTERNAL_JARS MainMethodSearchEngine MainMethodSearchEngine IType searchMainMethods getLaunchConfigurationDialog searchScope fConsiderInheritedMainButton getSelection InvocationTargetException setErrorMessage getMessage InterruptedException setErrorMessage getMessage getShell SelectionDialog MainTypeSelectionDialog setTitle LauncherMessages getString JavaMainTab Choose_Main_Type_11 setMessage LauncherMessages getString JavaMainTab Choose_a_main_ type_to_launch__12 getResult IType IType fMainText setText getFullyQualifiedName javaProject getJavaProject fProjText setText javaProject getElementName
Show a dialog that lets the user select a project This in turn provides context for the main type allowing the user to key a main type name or constraining the search for main types to the specified project protected void handle Project Button Selected I Java Project project choose Java Project if project null return String project Name project get Element Name f Proj Text set Text project Name  handleProjectButtonSelected IJavaProject chooseJavaProject projectName getElementName fProjText setText projectName
Realize a Java Project selection dialog and return the first selected project or null if there was none protected I Java Project choose Java Project I Java Project projects try projects Java Core create get Workspace Root get Java Projects catch Java Model Exception e JDI DebugUI Plugin log e projects new I Java Project 0 I Label Provider label Provider new Java Element Label Provider Java Element Label Provider SHOW DEFAULT Element List Selection Dialog dialog new Element List Selection Dialog get Shell label Provider dialog set Title Launcher Messages get String Java Main Tab Project Selection 13 NON NLS 1 dialog set Message Launcher Messages get String Java Main Tab Choose a  project to constrain the search for main types  14 NON NLS 1 dialog set Elements projects I Java Project java Project get Java Project if java Project null dialog set Initial Selections new Object java Project if dialog open Window OK return I Java Project dialog get First Result return null  IJavaProject chooseJavaProject IJavaProject JavaCore getWorkspaceRoot getJavaProjects JavaModelException JDIDebugUIPlugin IJavaProject ILabelProvider labelProvider JavaElementLabelProvider JavaElementLabelProvider SHOW_DEFAULT ElementListSelectionDialog ElementListSelectionDialog getShell labelProvider setTitle LauncherMessages getString JavaMainTab Project_Selection_13 setMessage LauncherMessages getString JavaMainTab Choose_a_ project_to_constrain_the_search_for_main_types__14 setElements IJavaProject javaProject getJavaProject javaProject setInitialSelections javaProject IJavaProject getFirstResult
Return the I Java Project corresponding to the project name in the project name text field or null if the text does not match a project name protected I Java Project get Java Project String project Name f Proj Text get Text trim if project Name length 1 return null return get Java Model get Java Project project Name  IJavaProject IJavaProject getJavaProject projectName fProjText getText projectName getJavaModel getJavaProject projectName
Convenience method to get the workspace root private I Workspace Root get Workspace Root return Resources Plugin get Workspace get Root  IWorkspaceRoot getWorkspaceRoot ResourcesPlugin getWorkspace getRoot
Convenience method to get access to the java model private I Java Model get Java Model return Java Core create get Workspace Root  IJavaModel getJavaModel JavaCore getWorkspaceRoot
see org eclipse debug ui I Launch Configuration Tab is Valid I Launch Configuration public boolean is Valid I Launch Configuration config set Error Message null set Message null String name f Proj Text get Text trim if name length 0 I Workspace workspace Resources Plugin get Workspace I Status status workspace validate Name name I Resource PROJECT if status isOK I Project project Resources Plugin get Workspace get Root get Project name if project exists set Error Message Message Format format Launcher Messages get String Java Main Tab 20 new String name NON NLS 1 return false if project is Open set Error Message Message Format format Launcher Messages get String Java Main Tab 21 new String name NON NLS 1 return false else set Error Message Message Format format Launcher Messages get String Java Main Tab 19 new String status get Message NON NLS 1 return false name f Main Text get Text trim if name length 0 set Error Message Launcher Messages get String Java Main Tab Main type not specified 16 NON NLS 1 return false return true  ILaunchConfigurationTab isValid ILaunchConfiguration isValid ILaunchConfiguration setErrorMessage setMessage fProjText getText IWorkspace ResourcesPlugin getWorkspace IStatus validateName IResource IProject ResourcesPlugin getWorkspace getRoot getProject setErrorMessage MessageFormat LauncherMessages getString JavaMainTab isOpen setErrorMessage MessageFormat LauncherMessages getString JavaMainTab setErrorMessage MessageFormat LauncherMessages getString JavaMainTab getMessage fMainText getText setErrorMessage LauncherMessages getString JavaMainTab Main_type_not_specified_16
see org eclipse debug ui I Launch Configuration Tab set Defaults I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy config I Java Element java Element get Context if java Element null initialize Java Project java Element config else We set empty attributes for project main type so that when one config is compared to another the existence of empty attributes doesn t cause an incorrect result the perform Apply method can result in empty values for these attributes being set on a config if there is nothing in the corresponding text boxes config set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME NON NLS 1 initialize Main Type And Name java Element config  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy IJavaElement javaElement getContext javaElement initializeJavaProject javaElement performApply setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME initializeMainTypeAndName javaElement
Set the main type name attributes on the working copy based on the I Java Element protected void initialize Main Type And Name I Java Element java Element I Launch Configuration Working Copy config String name null if java Element instanceof I Member I Member member I Member java Element if member is Binary java Element member get Class File else java Element member get Compilation Unit if java Element instanceof I Compilation Unit java Element instanceof I Class File try I Java Search Scope scope Search Engine create Java Search Scope new I Java Element java Element false Main Method Search Engine engine new Main Method Search Engine I Type types engine search Main Methods get Launch Configuration Dialog scope I Java Element Search Constants CONSIDER BINARIES I Java Element Search Constants CONSIDER EXTERNAL JARS false if types null types length 0 Simply grab the first main type found in the searched element name types 0 get Fully Qualified Name catch Interrupted Exception ie catch Invocation Target Exception ite if name null name NON NLS 1 config set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME name if name length 0 int index name last Index Of if index 0 name name substring index 1 name get Launch Configuration Dialog generate Name name config rename name  IJavaElement initializeMainTypeAndName IJavaElement javaElement ILaunchConfigurationWorkingCopy javaElement IMember IMember IMember javaElement isBinary javaElement getClassFile javaElement getCompilationUnit javaElement ICompilationUnit javaElement IClassFile IJavaSearchScope SearchEngine createJavaSearchScope IJavaElement javaElement MainMethodSearchEngine MainMethodSearchEngine IType searchMainMethods getLaunchConfigurationDialog IJavaElementSearchConstants CONSIDER_BINARIES IJavaElementSearchConstants CONSIDER_EXTERNAL_JARS getFullyQualifiedName InterruptedException InvocationTargetException setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME lastIndexOf getLaunchConfigurationDialog generateName
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Launcher Messages get String Java Main Tab Main 19 NON NLS 1  ILaunchConfigurationTab getName getName LauncherMessages getString JavaMainTab Main_19
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return JavaUI get Shared Images get Image I Shared Images IMG OBJS CLASS  ILaunchConfigurationTab getImage getImage getSharedImages getImage ISharedImages IMG_OBJS_CLASS
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy do nothing when activated  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy do nothing when deactivated  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy

see org eclipse debug ui I Launch Configuration Tab create Control Composite public void create Control Composite parent Composite comp new Composite parent SWT NONE set Control comp Workbench Help set Help get Control I Java Debug Help Context Ids LAUNCH CONFIGURATION DIALOG SOURCE TAB Grid Layout top Layout new Grid Layout top Layout num Columns 1 top Layout margin Height 0 top Layout margin Width 0 comp set Layout top Layout comp set Font parent get Font create Vertical Spacer comp 1 f Source Lookup Block new Source Lookup Block f Source Lookup Block set Launch Configuration Dialog get Launch Configuration Dialog f Source Lookup Block create Control comp Grid Data gd Grid Data f Source Lookup Block get Control get Layout Data gd height Hint 200 gd width Hint 250  ILaunchConfigurationTab createControl createControl setControl WorkbenchHelp setHelp getControl IJavaDebugHelpContextIds LAUNCH_CONFIGURATION_DIALOG_SOURCE_TAB GridLayout topLayout GridLayout topLayout numColumns topLayout marginHeight topLayout marginWidth setLayout topLayout setFont getFont createVerticalSpacer fSourceLookupBlock SourceLookupBlock fSourceLookupBlock setLaunchConfigurationDialog getLaunchConfigurationDialog fSourceLookupBlock createControl GridData GridData fSourceLookupBlock getControl getLayoutData heightHint widthHint
see org eclipse debug ui I Launch Configuration Tab set Defaults I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration be default use a prompting source locator configuration set Attribute I Launch Configuration ATTR SOURCE LOCATOR ID JavaUI Source Locator ID PROMPTING JAVA SOURCE LOCATOR configuration set Attribute I Java Launch Configuration Constants ATTR DEFAULT SOURCE PATH String null configuration set Attribute I Java Launch Configuration Constants ATTR SOURCE PATH List null  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy setAttribute ILaunchConfiguration ATTR_SOURCE_LOCATOR_ID JavaUISourceLocator ID_PROMPTING_JAVA_SOURCE_LOCATOR setAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_SOURCE_PATH setAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH
see org eclipse debug ui I Launch Configuration Tab initialize From I Launch Configuration public void initialize From I Launch Configuration configuration f Source Lookup Block initialize From configuration  ILaunchConfigurationTab initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration fSourceLookupBlock initializeFrom
see org eclipse debug ui I Launch Configuration Tab perform Apply I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy configuration configuration set Attribute I Launch Configuration ATTR SOURCE LOCATOR ID JavaUI Source Locator ID PROMPTING JAVA SOURCE LOCATOR f Source Lookup Block perform Apply configuration  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy setAttribute ILaunchConfiguration ATTR_SOURCE_LOCATOR_ID JavaUISourceLocator ID_PROMPTING_JAVA_SOURCE_LOCATOR fSourceLookupBlock performApply
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Launcher Messages get String Java Source Lookup Tab Source 1 NON NLS 1  ILaunchConfigurationTab getName getName LauncherMessages getString JavaSourceLookupTab Source_1
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJ FILE  ILaunchConfigurationTab getImage getImage getWorkbench getSharedImages getImage ISharedImages IMG_OBJ_FILE

private Ant Adapter Messages cannot be instantiated  AntAdapterMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException
public static String get String String key String argument try String message RESOURCE BUNDLE get String key Message Format message Format new Message Format message return message Format format new String argument catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MessageFormat messageFormat MessageFormat messageFormat MissingResourceException

public Completion Node Detector AST Node searched Node AST Node visited Ast this searched Node searched Node this result false if searched Node null visited Ast null visited Ast traverse this null  CompletionNodeDetector ASTNode searchedNode ASTNode visitedAst searchedNode searchedNode searchedNode visitedAst visitedAst
public boolean contains Completion Node return result  containsCompletionNode
public AST Node get Completion Node Parent return parent  ASTNode getCompletionNodeParent
return parent public void end Visit Allocation Expression allocation Expression Block Scope scope end Visit allocation Expression  endVisit AllocationExpression allocationExpression BlockScope endVisit allocationExpression
end Visit allocation Expression public void end Visit AND AND Expression and and Expression Block Scope scope end Visit and and Expression  endVisit allocationExpression endVisit AND_AND_Expression and_and_Expression BlockScope endVisit and_and_Expression
end Visit and and Expression public void end Visit Array Allocation Expression array Allocation Expression Block Scope scope end Visit array Allocation Expression  endVisit and_and_Expression endVisit ArrayAllocationExpression arrayAllocationExpression BlockScope endVisit arrayAllocationExpression
end Visit array Allocation Expression public void end Visit Array Initializer array Initializer Block Scope scope end Visit array Initializer  endVisit arrayAllocationExpression endVisit ArrayInitializer arrayInitializer BlockScope endVisit arrayInitializer
end Visit array Initializer public void end Visit Array Qualified Type Reference array Qualified Type Reference Block Scope scope end Visit array Qualified Type Reference  endVisit arrayInitializer endVisit ArrayQualifiedTypeReference arrayQualifiedTypeReference BlockScope endVisit arrayQualifiedTypeReference
end Visit array Qualified Type Reference public void end Visit Array Qualified Type Reference array Qualified Type Reference Class Scope scope end Visit array Qualified Type Reference  endVisit arrayQualifiedTypeReference endVisit ArrayQualifiedTypeReference arrayQualifiedTypeReference ClassScope endVisit arrayQualifiedTypeReference
end Visit array Qualified Type Reference public void end Visit Array Reference array Reference Block Scope scope end Visit array Reference  endVisit arrayQualifiedTypeReference endVisit ArrayReference arrayReference BlockScope endVisit arrayReference
end Visit array Reference public void end Visit Array Type Reference array Type Reference Block Scope scope end Visit array Type Reference  endVisit arrayReference endVisit ArrayTypeReference arrayTypeReference BlockScope endVisit arrayTypeReference
end Visit array Type Reference public void end Visit Array Type Reference array Type Reference Class Scope scope end Visit array Type Reference  endVisit arrayTypeReference endVisit ArrayTypeReference arrayTypeReference ClassScope endVisit arrayTypeReference
end Visit array Type Reference public void end Visit Assignment assignment Block Scope scope end Visit assignment  endVisit arrayTypeReference endVisit BlockScope endVisit
end Visit assignment public void end Visit Binary Expression binary Expression Block Scope scope end Visit binary Expression  endVisit endVisit BinaryExpression binaryExpression BlockScope endVisit binaryExpression
end Visit binary Expression public void end Visit Cast Expression cast Expression Block Scope scope end Visit cast Expression  endVisit binaryExpression endVisit CastExpression castExpression BlockScope endVisit castExpression
end Visit cast Expression public void end Visit Compound Assignment compound Assignment Block Scope scope end Visit compound Assignment  endVisit castExpression endVisit CompoundAssignment compoundAssignment BlockScope endVisit compoundAssignment
end Visit compound Assignment public void end Visit Conditional Expression conditional Expression Block Scope scope end Visit conditional Expression  endVisit compoundAssignment endVisit ConditionalExpression conditionalExpression BlockScope endVisit conditionalExpression
end Visit conditional Expression public void end Visit Equal Expression equal Expression Block Scope scope end Visit equal Expression  endVisit conditionalExpression endVisit EqualExpression equalExpression BlockScope endVisit equalExpression
end Visit equal Expression public void end Visit Explicit Constructor Call explicit Constructor Block Scope scope end Visit explicit Constructor  endVisit equalExpression endVisit ExplicitConstructorCall explicitConstructor BlockScope endVisit explicitConstructor
end Visit explicit Constructor public void end Visit Field Reference field Reference Block Scope scope end Visit field Reference  endVisit explicitConstructor endVisit FieldReference fieldReference BlockScope endVisit fieldReference
end Visit field Reference public void end Visit Instance Of Expression instance Of Expression Block Scope scope end Visit instance Of Expression  endVisit fieldReference endVisit InstanceOfExpression instanceOfExpression BlockScope endVisit instanceOfExpression
end Visit instance Of Expression public void end Visit Message Send message Send Block Scope scope end Visit message Send  endVisit instanceOfExpression endVisit MessageSend messageSend BlockScope endVisit messageSend
end Visit message Send public void end Visit OR OR Expression or or Expression Block Scope scope end Visit or or Expression  endVisit messageSend endVisit OR_OR_Expression or_or_Expression BlockScope endVisit or_or_Expression
end Visit or or Expression public void end Visit Postfix Expression postfix Expression Block Scope scope end Visit postfix Expression  endVisit or_or_Expression endVisit PostfixExpression postfixExpression BlockScope endVisit postfixExpression
end Visit postfix Expression public void end Visit Prefix Expression prefix Expression Block Scope scope end Visit prefix Expression  endVisit postfixExpression endVisit PrefixExpression prefixExpression BlockScope endVisit prefixExpression
end Visit prefix Expression public void end Visit Qualified Allocation Expression qualified Allocation Expression Block Scope scope end Visit qualified Allocation Expression  endVisit prefixExpression endVisit QualifiedAllocationExpression qualifiedAllocationExpression BlockScope endVisit qualifiedAllocationExpression
end Visit qualified Allocation Expression public void end Visit Qualified Name Reference qualified Name Reference Block Scope scope end Visit qualified Name Reference  endVisit qualifiedAllocationExpression endVisit QualifiedNameReference qualifiedNameReference BlockScope endVisit qualifiedNameReference
end Visit qualified Name Reference public void end Visit Qualified Super Reference qualified Super Reference Block Scope scope end Visit qualified Super Reference  endVisit qualifiedNameReference endVisit QualifiedSuperReference qualifiedSuperReference BlockScope endVisit qualifiedSuperReference
end Visit qualified Super Reference public void end Visit Qualified This Reference qualified This Reference Block Scope scope end Visit qualified This Reference  endVisit qualifiedSuperReference endVisit QualifiedThisReference qualifiedThisReference BlockScope endVisit qualifiedThisReference
end Visit qualified This Reference public void end Visit Qualified Type Reference qualified Type Reference Block Scope scope end Visit qualified Type Reference  endVisit qualifiedThisReference endVisit QualifiedTypeReference qualifiedTypeReference BlockScope endVisit qualifiedTypeReference
end Visit qualified Type Reference public void end Visit Qualified Type Reference qualified Type Reference Class Scope scope end Visit qualified Type Reference  endVisit qualifiedTypeReference endVisit QualifiedTypeReference qualifiedTypeReference ClassScope endVisit qualifiedTypeReference
end Visit qualified Type Reference public void end Visit Single Name Reference single Name Reference Block Scope scope end Visit single Name Reference  endVisit qualifiedTypeReference endVisit SingleNameReference singleNameReference BlockScope endVisit singleNameReference
end Visit single Name Reference public void end Visit Single Type Reference single Type Reference Block Scope scope end Visit single Type Reference  endVisit singleNameReference endVisit SingleTypeReference singleTypeReference BlockScope endVisit singleTypeReference
end Visit single Type Reference public void end Visit Single Type Reference single Type Reference Class Scope scope end Visit single Type Reference  endVisit singleTypeReference endVisit SingleTypeReference singleTypeReference ClassScope endVisit singleTypeReference
end Visit single Type Reference public void end Visit Super Reference super Reference Block Scope scope end Visit super Reference  endVisit singleTypeReference endVisit SuperReference superReference BlockScope endVisit superReference
end Visit super Reference public void end Visit This Reference this Reference Block Scope scope end Visit this Reference  endVisit superReference endVisit ThisReference thisReference BlockScope endVisit thisReference
end Visit this Reference public void end Visit Unary Expression unary Expression Block Scope scope end Visit unary Expression  endVisit thisReference endVisit UnaryExpression unaryExpression BlockScope endVisit unaryExpression
end Visit unary Expression public boolean visit Allocation Expression allocation Expression Block Scope scope return this visit allocation Expression  endVisit unaryExpression AllocationExpression allocationExpression BlockScope allocationExpression
return this visit allocation Expression public boolean visit AND AND Expression and and Expression Block Scope scope return this visit and and Expression  allocationExpression AND_AND_Expression and_and_Expression BlockScope and_and_Expression
return this visit and and Expression public boolean visit Array Allocation Expression array Allocation Expression Block Scope scope return this visit array Allocation Expression  and_and_Expression ArrayAllocationExpression arrayAllocationExpression BlockScope arrayAllocationExpression
return this visit array Allocation Expression public boolean visit Array Initializer array Initializer Block Scope scope return this visit array Initializer  arrayAllocationExpression ArrayInitializer arrayInitializer BlockScope arrayInitializer
return this visit array Initializer public boolean visit Array Qualified Type Reference array Qualified Type Reference Block Scope scope return this visit array Qualified Type Reference  arrayInitializer ArrayQualifiedTypeReference arrayQualifiedTypeReference BlockScope arrayQualifiedTypeReference
return this visit array Qualified Type Reference public boolean visit Array Qualified Type Reference array Qualified Type Reference Class Scope scope return this visit array Qualified Type Reference  arrayQualifiedTypeReference ArrayQualifiedTypeReference arrayQualifiedTypeReference ClassScope arrayQualifiedTypeReference
return this visit array Qualified Type Reference public boolean visit Array Reference array Reference Block Scope scope return this visit array Reference  arrayQualifiedTypeReference ArrayReference arrayReference BlockScope arrayReference
return this visit array Reference public boolean visit Array Type Reference array Type Reference Block Scope scope return this visit array Type Reference  arrayReference ArrayTypeReference arrayTypeReference BlockScope arrayTypeReference
return this visit array Type Reference public boolean visit Array Type Reference array Type Reference Class Scope scope return this visit array Type Reference  arrayTypeReference ArrayTypeReference arrayTypeReference ClassScope arrayTypeReference
return this visit array Type Reference public boolean visit Assignment assignment Block Scope scope return this visit assignment  arrayTypeReference BlockScope
return this visit assignment public boolean visit Binary Expression binary Expression Block Scope scope return this visit binary Expression  BinaryExpression binaryExpression BlockScope binaryExpression
return this visit binary Expression public boolean visit Cast Expression cast Expression Block Scope scope return this visit cast Expression  binaryExpression CastExpression castExpression BlockScope castExpression
return this visit cast Expression public boolean visit Compound Assignment compound Assignment Block Scope scope return this visit compound Assignment  castExpression CompoundAssignment compoundAssignment BlockScope compoundAssignment
return this visit compound Assignment public boolean visit Conditional Expression conditional Expression Block Scope scope return this visit conditional Expression  compoundAssignment ConditionalExpression conditionalExpression BlockScope conditionalExpression
return this visit conditional Expression public boolean visit Equal Expression equal Expression Block Scope scope return this visit equal Expression  conditionalExpression EqualExpression equalExpression BlockScope equalExpression
return this visit equal Expression public boolean visit Explicit Constructor Call explicit Constructor Block Scope scope return this visit explicit Constructor  equalExpression ExplicitConstructorCall explicitConstructor BlockScope explicitConstructor
return this visit explicit Constructor public boolean visit Field Reference field Reference Block Scope scope return this visit field Reference  explicitConstructor FieldReference fieldReference BlockScope fieldReference
return this visit field Reference public boolean visit Instance Of Expression instance Of Expression Block Scope scope return this visit instance Of Expression  fieldReference InstanceOfExpression instanceOfExpression BlockScope instanceOfExpression
return this visit instance Of Expression public boolean visit Message Send message Send Block Scope scope return this visit message Send  instanceOfExpression MessageSend messageSend BlockScope messageSend
return this visit message Send public boolean visit OR OR Expression or or Expression Block Scope scope return this visit or or Expression  messageSend OR_OR_Expression or_or_Expression BlockScope or_or_Expression
return this visit or or Expression public boolean visit Postfix Expression postfix Expression Block Scope scope return this visit postfix Expression  or_or_Expression PostfixExpression postfixExpression BlockScope postfixExpression
return this visit postfix Expression public boolean visit Prefix Expression prefix Expression Block Scope scope return this visit prefix Expression  postfixExpression PrefixExpression prefixExpression BlockScope prefixExpression
return this visit prefix Expression public boolean visit Qualified Allocation Expression qualified Allocation Expression Block Scope scope return this visit qualified Allocation Expression  prefixExpression QualifiedAllocationExpression qualifiedAllocationExpression BlockScope qualifiedAllocationExpression
return this visit qualified Allocation Expression public boolean visit Qualified Name Reference qualified Name Reference Block Scope scope return this visit qualified Name Reference  qualifiedAllocationExpression QualifiedNameReference qualifiedNameReference BlockScope qualifiedNameReference
return this visit qualified Name Reference public boolean visit Qualified Super Reference qualified Super Reference Block Scope scope return this visit qualified Super Reference  qualifiedNameReference QualifiedSuperReference qualifiedSuperReference BlockScope qualifiedSuperReference
return this visit qualified Super Reference public boolean visit Qualified This Reference qualified This Reference Block Scope scope return this visit qualified This Reference  qualifiedSuperReference QualifiedThisReference qualifiedThisReference BlockScope qualifiedThisReference
return this visit qualified This Reference public boolean visit Qualified Type Reference qualified Type Reference Block Scope scope return this visit qualified Type Reference  qualifiedThisReference QualifiedTypeReference qualifiedTypeReference BlockScope qualifiedTypeReference
return this visit qualified Type Reference public boolean visit Qualified Type Reference qualified Type Reference Class Scope scope return this visit qualified Type Reference  qualifiedTypeReference QualifiedTypeReference qualifiedTypeReference ClassScope qualifiedTypeReference
return this visit qualified Type Reference public boolean visit Single Name Reference single Name Reference Block Scope scope return this visit single Name Reference  qualifiedTypeReference SingleNameReference singleNameReference BlockScope singleNameReference
return this visit single Name Reference public boolean visit Single Type Reference single Type Reference Block Scope scope return this visit single Type Reference  singleNameReference SingleTypeReference singleTypeReference BlockScope singleTypeReference
return this visit single Type Reference public boolean visit Single Type Reference single Type Reference Class Scope scope return this visit single Type Reference  singleTypeReference SingleTypeReference singleTypeReference ClassScope singleTypeReference
return this visit single Type Reference public boolean visit Super Reference super Reference Block Scope scope return this visit super Reference  singleTypeReference SuperReference superReference BlockScope superReference
return this visit super Reference public boolean visit This Reference this Reference Block Scope scope return this visit this Reference  superReference ThisReference thisReference BlockScope thisReference
return this visit this Reference public boolean visit Unary Expression unary Expression Block Scope scope return this visit unary Expression  thisReference UnaryExpression unaryExpression BlockScope unaryExpression
private void end Visit AST Node ast Node if result parent null ast Node searched Node if ast Node instanceof Allocation Expression Allocation Expression ast Node type searched Node ast Node instanceof Conditional Expression Conditional Expression ast Node value If True searched Node ast Node instanceof Conditional Expression Conditional Expression ast Node value If False searched Node parent ast Node  endVisit ASTNode astNode astNode searchedNode astNode AllocationExpression AllocationExpression astNode searchedNode astNode ConditionalExpression ConditionalExpression astNode valueIfTrue searchedNode astNode ConditionalExpression ConditionalExpression astNode valueIfFalse searchedNode astNode
private boolean visit AST Node ast Node if ast Node searched Node result true return result  ASTNode astNode astNode searchedNode

public Binding qualified Binding public Scope scope public Completion Node Found this null null null we found a problem in the completion node  qualifiedBinding CompletionNodeFound
public Completion Node Found AST Node ast Node Binding qualified Binding Scope scope this ast Node ast Node this qualified Binding qualified Binding this scope scope  CompletionNodeFound ASTNode astNode qualifiedBinding astNode astNode qualifiedBinding qualifiedBinding
this scope scope public Completion Node Found AST Node ast Node Scope scope this ast Node null scope  CompletionNodeFound ASTNode astNode astNode

public Completion On Argument Name char name long pos Nom Type Reference tr int modifiers super Char Operation concat name FAKENAMESUFFIX pos Nom tr modifiers this real Name name  CompletionOnArgumentName posNom TypeReference CharOperation posNom realName
public void bind Method Scope scope Type Binding type Binding boolean used super bind scope type Binding used throw new Completion Node Found this scope  MethodScope TypeBinding typeBinding typeBinding CompletionNodeFound
public String Buffer print int indent String Buffer output print Indent indent output output append Complete On Argument Name NON NLS 1 if type null type print 0 output append output append this real Name if initialization null output append NON NLS 1 initialization print Expression 0 output return output append  StringBuffer StringBuffer printIndent CompleteOnArgumentName realName printExpression
public void resolve Block Scope scope super resolve scope throw new Completion Node Found this scope  BlockScope CompletionNodeFound

public Completion On Class Literal Access long pos Type Reference t super int pos t this class Start int pos 32  CompletionOnClassLiteralAccess TypeReference classStart
public String Buffer print Expression int indent String Buffer output output append Complete On Class Literal Access NON NLS 1 return type print 0 output append append completion Identifier append  StringBuffer printExpression StringBuffer CompleteOnClassLiteralAccess completionIdentifier
public Type Binding resolve Type Block Scope scope if super resolve Type scope null throw new Completion Node Found else throw new Completion Node Found this target Type scope  TypeBinding resolveType BlockScope resolveType CompletionNodeFound CompletionNodeFound targetType

public class Completion On Class Reference extends Completion On Single Type Reference public Completion On Class Reference char source long pos super source pos  CompletionOnClassReference CompletionOnSingleTypeReference CompletionOnClassReference
public String Buffer print Expression int indent String Buffer output return output append Complete On Class append token append NON NLS 1  StringBuffer printExpression StringBuffer CompleteOnClass

public class Completion On Exception Reference extends Completion On Single Type Reference public Completion On Exception Reference char source long pos super source pos  CompletionOnExceptionReference CompletionOnSingleTypeReference CompletionOnExceptionReference
public String Buffer print Expression int indent String Buffer output return output append Complete On Exception append token append NON NLS 1  StringBuffer printExpression StringBuffer CompleteOnException

public class Completion On Explicit Constructor Call extends Explicit Constructor Call public Completion On Explicit Constructor Call int access Mode super access Mode  CompletionOnExplicitConstructorCall ExplicitConstructorCall CompletionOnExplicitConstructorCall accessMode accessMode
public String Buffer print Statement int tab String Buffer output print Indent tab output output append Complete On Explicit Constructor Call NON NLS 1 if qualification null qualification print Expression 0 output append if access Mode This output append this NON NLS 1 else output append super NON NLS 1 if arguments null for int i 0 i arguments length i if i 0 output append NON NLS 1 arguments i print Expression 0 output return output append NON NLS 1  StringBuffer printStatement StringBuffer printIndent CompleteOnExplicitConstructorCall printExpression accessMode printExpression
public void resolve Block Scope scope Reference Binding receiver Type scope enclosing Source Type if arguments null int args Length arguments length for int a args Length a 0 arguments a resolve Type scope if access Mode This receiver Type null if receiver Type is Hierarchy Inconsistent throw new Completion Node Found receiver Type receiver Type superclass if receiver Type null throw new Completion Node Found else throw new Completion Node Found this receiver Type scope  BlockScope ReferenceBinding receiverType enclosingSourceType argsLength argsLength resolveType accessMode receiverType receiverType isHierarchyInconsistent CompletionNodeFound receiverType receiverType receiverType CompletionNodeFound CompletionNodeFound receiverType

private static final char FAKENAMESUFFIX to Char Array NON NLS 1 public char real Name public Completion On Field Name char name int source Start int source End super Char Operation concat name FAKENAMESUFFIX source Start source End NON NLS 1 this real Name name  toCharArray realName CompletionOnFieldName sourceStart sourceEnd CharOperation sourceStart sourceEnd realName
public String Buffer print Statement int tab String Buffer output print Indent tab output append Complete On Field Name NON NLS 1 if type null type print 0 output append output append real Name if initialization null output append NON NLS 1 initialization print Expression 0 output return output append NON NLS 1  StringBuffer printStatement StringBuffer printIndent CompleteOnFieldName realName printExpression
public void resolve Method Scope initialization Scope super resolve initialization Scope throw new Completion Node Found this initialization Scope  MethodScope initializationScope initializationScope CompletionNodeFound initializationScope

public Completion On Field Type Type Reference type boolean is Local Variable super this source Start type source Start this source End type source End this type type this name Char Operation NO CHAR this is Local Variable is Local Variable  CompletionOnFieldType TypeReference isLocalVariable sourceStart sourceStart sourceEnd sourceEnd CharOperation NO_CHAR isLocalVariable isLocalVariable
public Type Binding get Type Binding Scope scope if type instanceof Completion On Single Type Reference throw new Completion Node Found this scope else handle the qualified type ref directly return type get Type Binding scope  TypeBinding getTypeBinding CompletionOnSingleTypeReference CompletionNodeFound getTypeBinding
return type get Type Binding scope public String Buffer print Statement int tab String Buffer output return type print tab output append  getTypeBinding StringBuffer printStatement StringBuffer

public class Completion On Import Reference extends Import Reference public Completion On Import Reference char tokens long positions int modifiers super tokens positions false modifiers  CompletionOnImportReference ImportReference CompletionOnImportReference
public String Buffer print int indent String Buffer output boolean with On Demand print Indent indent output append Complete On Import NON NLS 1 for int i 0 i tokens length i if i 0 output append output append tokens i return output append  StringBuffer StringBuffer withOnDemand printIndent CompleteOnImport

public class Completion On Interface Reference extends Completion On Single Type Reference public Completion On Interface Reference char source long pos super source pos  CompletionOnInterfaceReference CompletionOnSingleTypeReference CompletionOnInterfaceReference
super source pos public String Buffer print Expression int indent String Buffer output return output append Complete On Interface append token append NON NLS 1  StringBuffer printExpression StringBuffer CompleteOnInterface

public interface Completion On Keyword char get Token  CompletionOnKeyword getToken
char get Token char get Possible Keywords  getToken getPossibleKeywords

public class Completion On Keyword1 extends Single Type Reference implements Completion On Keyword private char possible Keywords public Completion On Keyword1 char token long pos char possible Keyword this token pos new char possible Keyword  CompletionOnKeyword1 SingleTypeReference CompletionOnKeyword possibleKeywords CompletionOnKeyword1 possibleKeyword possibleKeyword
this token pos new char possible Keyword public Completion On Keyword1 char token long pos char possible Keywords super token pos this possible Keywords possible Keywords  possibleKeyword CompletionOnKeyword1 possibleKeywords possibleKeywords possibleKeywords
this possible Keywords possible Keywords public char get Token return token  possibleKeywords possibleKeywords getToken
return token public char get Possible Keywords return possible Keywords  getPossibleKeywords possibleKeywords
return possible Keywords public void about To Resolve Scope scope get Type Binding scope  possibleKeywords aboutToResolve getTypeBinding
get Type Binding scope public Type Binding get Type Binding Scope scope throw new Completion Node Found this scope  getTypeBinding TypeBinding getTypeBinding CompletionNodeFound
throw new Completion Node Found this scope public String Buffer print Expression int indent String Buffer output return output append Complete On Keyword append token append NON NLS 1  CompletionNodeFound StringBuffer printExpression StringBuffer CompleteOnKeyword

private char possible Keywords public Completion On Keyword2 char token long pos char possible Keywords super new char token new long pos false Acc Default this token token this possible Keywords possible Keywords  possibleKeywords CompletionOnKeyword2 possibleKeywords AccDefault possibleKeywords possibleKeywords
this possible Keywords possible Keywords public char get Token return token  possibleKeywords possibleKeywords getToken
return token public char get Possible Keywords return possible Keywords  getPossibleKeywords possibleKeywords
return possible Keywords public String Buffer print int indent String Buffer output boolean with On Demand return print Indent indent output append Complete On Keyword append token append NON NLS 1  possibleKeywords StringBuffer StringBuffer withOnDemand printIndent CompleteOnKeyword

public class Completion On Keyword3 extends Single Name Reference implements Completion On Keyword private char possible Keywords public Completion On Keyword3 char token long pos char possible Keyword this token pos new char possible Keyword  CompletionOnKeyword3 SingleNameReference CompletionOnKeyword possibleKeywords CompletionOnKeyword3 possibleKeyword possibleKeyword
public Completion On Keyword3 char token long pos char possible Keywords super token pos this token token this possible Keywords possible Keywords  CompletionOnKeyword3 possibleKeywords possibleKeywords possibleKeywords
this possible Keywords possible Keywords public char get Token return token  possibleKeywords possibleKeywords getToken
return token public char get Possible Keywords return possible Keywords  getPossibleKeywords possibleKeywords
return possible Keywords public String Buffer print Expression int indent String Buffer output return output append Complete On Keyword append token append NON NLS 1  possibleKeywords StringBuffer printExpression StringBuffer CompleteOnKeyword
return output append Complete On Keyword append token append NON NLS 1 public Type Binding resolve Type Block Scope scope throw new Completion Node Found this scope  CompleteOnKeyword TypeBinding resolveType BlockScope CompletionNodeFound

public Completion On Local Name char name int source Start int source End super Char Operation concat name FAKENAMESUFFIX source Start source End this real Name name  CompletionOnLocalName sourceStart sourceEnd CharOperation sourceStart sourceEnd realName
public void resolve Block Scope scope super resolve scope throw new Completion Node Found this scope  BlockScope CompletionNodeFound
public String Buffer print Statement int indent String Buffer output print Indent indent output output append Complete On Local Name NON NLS 1 if type null type print 0 output append output append this real Name if initialization null output append NON NLS 1 initialization print Expression 0 output return output append NON NLS 1  StringBuffer printStatement StringBuffer printIndent CompleteOnLocalName realName printExpression

public class Completion On Member Access extends Field Reference public Completion On Member Access char source long pos super source pos  CompletionOnMemberAccess FieldReference CompletionOnMemberAccess
public String Buffer print Expression int indent String Buffer output output append Complete On Member Access NON NLS 1 return super print Expression 0 output append  StringBuffer printExpression StringBuffer CompleteOnMemberAccess printExpression
public Type Binding resolve Type Block Scope scope this receiver Type receiver resolve Type scope if this receiver Type null this receiver Type is Base Type throw new Completion Node Found else throw new Completion Node Found this this receiver Type scope array types are passed along to find the length field  TypeBinding resolveType BlockScope receiverType resolveType receiverType receiverType isBaseType CompletionNodeFound CompletionNodeFound receiverType

public Type Binding resolve Type Block Scope scope if arguments null int args Length arguments length for int a args Length a 0 arguments a resolve Type scope if receiver is Implicit This throw new Completion Node Found this null scope this receiver Type receiver resolve Type scope if this receiver Type null this receiver Type is Base Type throw new Completion Node Found if this receiver Type is Array Type this receiver Type scope get Java Lang Object throw new Completion Node Found this this receiver Type scope  TypeBinding resolveType BlockScope argsLength argsLength resolveType isImplicitThis CompletionNodeFound receiverType resolveType receiverType receiverType isBaseType CompletionNodeFound receiverType isArrayType receiverType getJavaLangObject CompletionNodeFound receiverType
public String Buffer print Expression int indent String Buffer output output append Complete On Message Send NON NLS 1 if receiver is Implicit This receiver print Expression 0 output append NON NLS 1 output append selector append NON NLS 1 if arguments null for int i 0 i arguments length i if i 0 output append NON NLS 1 arguments i print Expression 0 output return output append NON NLS 1  StringBuffer printExpression StringBuffer CompleteOnMessageSend isImplicitThis printExpression printExpression

public int selector End public Completion On Method Name Compilation Result compilation Result super compilation Result  selectorEnd CompletionOnMethodName CompilationResult compilationResult compilationResult
public String Buffer print int indent String Buffer output print Indent indent output output append Completion On Method Name NON NLS 1 print Modifiers this modifiers output print Return Type 0 output output append selector append if arguments null for int i 0 i arguments length i if i 0 output append NON NLS 1 arguments i print 0 output output append if thrown Exceptions null output append throws NON NLS 1 for int i 0 i thrown Exceptions length i if i 0 output append NON NLS 1 thrown Exceptions i print 0 output return output append  StringBuffer StringBuffer printIndent CompletionOnMethodName printModifiers printReturnType thrownExceptions thrownExceptions thrownExceptions
public void resolve Class Scope upper Scope super resolve upper Scope throw new Completion Node Found this upper Scope  ClassScope upperScope upperScope CompletionNodeFound upperScope

public class Completion On Method Return Type extends Method Declaration public Completion On Method Return Type Type Reference return Type Compilation Result compilation Result super compilation Result this return Type return Type this source Start return Type source Start this source End return Type source End  CompletionOnMethodReturnType MethodDeclaration CompletionOnMethodReturnType TypeReference returnType CompilationResult compilationResult compilationResult returnType returnType sourceStart returnType sourceStart sourceEnd returnType sourceEnd
public void resolve Statements throw new Completion Node Found this this scope  resolveStatements CompletionNodeFound
public String Buffer print int tab String Buffer output return return Type print tab output  StringBuffer StringBuffer returnType

public class Completion On Package Reference extends Import Reference public Completion On Package Reference char tokens long positions super tokens positions true Acc Default  CompletionOnPackageReference ImportReference CompletionOnPackageReference AccDefault
public String Buffer print int indent String Buffer output boolean with On Demand print Indent indent output append Complete On Package NON NLS 1 for int i 0 i tokens length i if i 0 output append output append tokens i return output append  StringBuffer StringBuffer withOnDemand printIndent CompleteOnPackage

public class Completion On Qualified Allocation Expression extends Qualified Allocation Expression public Type Binding resolve Type Block Scope scope if arguments null int args Length arguments length for int a args Length a 0 arguments a resolve Type scope if enclosing Instance null Type Binding enclosing Type enclosing Instance resolve Type scope if enclosing Type null enclosing Type instanceof Reference Binding throw new Completion Node Found this resolved Type Single Type Reference type resolve Type Enclosing scope Reference Binding enclosing Type if this resolved Type instanceof Reference Binding throw new Completion Node Found no need to continue if its an array or base type if this resolved Type is Interface handle the anonymous class definition case this resolved Type scope get Java Lang Object else this resolved Type type resolve Type scope if this resolved Type instanceof Reference Binding throw new Completion Node Found no need to continue if its an array or base type throw new Completion Node Found this this resolved Type scope  CompletionOnQualifiedAllocationExpression QualifiedAllocationExpression TypeBinding resolveType BlockScope argsLength argsLength resolveType enclosingInstance TypeBinding enclosingType enclosingInstance resolveType enclosingType enclosingType ReferenceBinding CompletionNodeFound resolvedType SingleTypeReference resolveTypeEnclosing ReferenceBinding enclosingType resolvedType ReferenceBinding CompletionNodeFound resolvedType isInterface resolvedType getJavaLangObject resolvedType resolveType resolvedType ReferenceBinding CompletionNodeFound CompletionNodeFound resolvedType
public String Buffer print Expression int indent String Buffer output if this enclosing Instance null output append Complete On Allocation Expression NON NLS 1 else output append Complete On Qualified Allocation Expression NON NLS 1 return super print Expression indent output append  StringBuffer printExpression StringBuffer enclosingInstance CompleteOnAllocationExpression CompleteOnQualifiedAllocationExpression printExpression

public class Completion On Qualified Class Reference extends Completion On Qualified Type Reference public Completion On Qualified Class Reference char previous Identifiers char completion Identifier long positions super previous Identifiers completion Identifier positions  CompletionOnQualifiedClassReference CompletionOnQualifiedTypeReference CompletionOnQualifiedClassReference previousIdentifiers completionIdentifier previousIdentifiers completionIdentifier
public String Buffer print Expression int indent String Buffer output output append Complete On Class NON NLS 1 for int i 0 i tokens length i output append tokens i output append output append completion Identifier append return output  StringBuffer printExpression StringBuffer CompleteOnClass completionIdentifier

public class Completion On Qualified Exception Reference extends Completion On Qualified Type Reference public Completion On Qualified Exception Reference char previous Identifiers char completion Identifier long positions super previous Identifiers completion Identifier positions  CompletionOnQualifiedExceptionReference CompletionOnQualifiedTypeReference CompletionOnQualifiedExceptionReference previousIdentifiers completionIdentifier previousIdentifiers completionIdentifier
public String Buffer print Expression int indent String Buffer output output append Complete On Exception NON NLS 1 for int i 0 i tokens length i output append tokens i output append output append completion Identifier append return output  StringBuffer printExpression StringBuffer CompleteOnException completionIdentifier

public class Completion On Qualified Interface Reference extends Completion On Qualified Type Reference public Completion On Qualified Interface Reference char previous Identifiers char completion Identifier long positions super previous Identifiers completion Identifier positions  CompletionOnQualifiedInterfaceReference CompletionOnQualifiedTypeReference CompletionOnQualifiedInterfaceReference previousIdentifiers completionIdentifier previousIdentifiers completionIdentifier
public String Buffer print Expression int indent String Buffer output output append Complete On Interface NON NLS 1 for int i 0 i tokens length i output append tokens i output append output append completion Identifier append return output  StringBuffer printExpression StringBuffer CompleteOnInterface completionIdentifier

public class Completion On Qualified Name Reference extends Qualified Name Reference public char completion Identifier public Completion On Qualified Name Reference char previous Identifiers char completion Identifier long positions super previous Identifiers positions int positions 0 32 int positions positions length 1 this completion Identifier completion Identifier  CompletionOnQualifiedNameReference QualifiedNameReference completionIdentifier CompletionOnQualifiedNameReference previousIdentifiers completionIdentifier previousIdentifiers completionIdentifier completionIdentifier
public String Buffer print Expression int indent String Buffer output output append Complete On Name NON NLS 1 for int i 0 i tokens length i output append tokens i output append NON NLS 1 output append completion Identifier append return output  StringBuffer printExpression StringBuffer CompleteOnName completionIdentifier
public Type Binding resolve Type Block Scope scope it can be a package type member type local variable or field binding scope get Binding tokens this if binding is Valid Binding if binding instanceof Problem Field Binding scope problem Reporter invalid Field this Field Binding binding else if binding instanceof Problem Reference Binding scope problem Reporter invalid Type this Type Binding binding else scope problem Reporter unresolvable Reference this binding throw new Completion Node Found throw new Completion Node Found this binding scope  TypeBinding resolveType BlockScope getBinding isValidBinding ProblemFieldBinding problemReporter invalidField FieldBinding ProblemReferenceBinding problemReporter invalidType TypeBinding problemReporter unresolvableReference CompletionNodeFound CompletionNodeFound

public class Completion On Qualified Type Reference extends Qualified Type Reference public char completion Identifier public Completion On Qualified Type Reference char previous Identifiers char completion Identifier long positions super previous Identifiers positions this completion Identifier completion Identifier  CompletionOnQualifiedTypeReference QualifiedTypeReference completionIdentifier CompletionOnQualifiedTypeReference previousIdentifiers completionIdentifier previousIdentifiers completionIdentifier completionIdentifier
this completion Identifier completion Identifier public void about To Resolve Scope scope get Type Binding scope  completionIdentifier completionIdentifier aboutToResolve getTypeBinding
No expansion of the completion reference into an array one public Type Reference copy Dims int dim return this  TypeReference copyDims
public Type Binding get Type Binding Scope scope it can be a package type or member type Binding binding scope parent get Type Or Package tokens step up from the Class Scope if binding is Valid Binding scope problem Reporter invalid Type this Type Binding binding throw new Completion Node Found throw new Completion Node Found this binding scope  TypeBinding getTypeBinding getTypeOrPackage ClassScope isValidBinding problemReporter invalidType TypeBinding CompletionNodeFound CompletionNodeFound
public String Buffer print Expression int indent String Buffer output output append Complete On Type NON NLS 1 for int i 0 i tokens length i output append tokens i output append output append completion Identifier append return output  StringBuffer printExpression StringBuffer CompleteOnType completionIdentifier

public boolean can Be Explicit Constructor public Completion On Single Name Reference char source long pos this source pos null false  canBeExplicitConstructor CompletionOnSingleNameReference
public Completion On Single Name Reference char source long pos char possible Keywords boolean can Be Explicit Constructor super source pos this possible Keywords possible Keywords this can Be Explicit Constructor can Be Explicit Constructor  CompletionOnSingleNameReference possibleKeywords canBeExplicitConstructor possibleKeywords possibleKeywords canBeExplicitConstructor canBeExplicitConstructor
public String Buffer print Expression int indent String Buffer output output append Complete On Name NON NLS 1 return super print Expression 0 output append  StringBuffer printExpression StringBuffer CompleteOnName printExpression
public Type Binding resolve Type Block Scope scope throw new Completion Node Found this scope  TypeBinding resolveType BlockScope CompletionNodeFound

public class Completion On Single Type Reference extends Single Type Reference public boolean is Completion Node public Completion On Single Type Reference char source long pos super source pos is Completion Node true  CompletionOnSingleTypeReference SingleTypeReference isCompletionNode CompletionOnSingleTypeReference isCompletionNode
is Completion Node true public void about To Resolve Scope scope get Type Binding scope  isCompletionNode aboutToResolve getTypeBinding
No expansion of the completion reference into an array one public Type Reference copy Dims int dim return this  TypeReference copyDims
public Type Binding get Type Binding Scope scope if is Completion Node throw new Completion Node Found this scope else return super get Type Binding scope  TypeBinding getTypeBinding isCompletionNode CompletionNodeFound getTypeBinding
public String Buffer print Expression int indent String Buffer output return output append Complete On Type append token append NON NLS 1  StringBuffer printExpression StringBuffer CompleteOnType
public Type Binding resolve Type Enclosing Block Scope scope Reference Binding enclosing Type if is Completion Node throw new Completion Node Found this enclosing Type scope else return super resolve Type Enclosing scope enclosing Type  TypeBinding resolveTypeEnclosing BlockScope ReferenceBinding enclosingType isCompletionNode CompletionNodeFound enclosingType resolveTypeEnclosing enclosingType

public Completion Parser Problem Reporter problem Reporter super problem Reporter this report Syntax Error Is Required false  CompletionParser ProblemReporter problemReporter problemReporter reportSyntaxErrorIsRequired
this report Syntax Error Is Required false public char assist Identifier return Completion Scanner scanner completion Identifier  reportSyntaxErrorIsRequired assistIdentifier CompletionScanner completionIdentifier
protected void attach Orphan Completion Node if assist Node null return if this is Orphan Completion Node AST Node orphan this assist Node this is Orphan Completion Node false if current Element instanceof Recovered Unit if orphan instanceof Import Reference current Element add Import Reference orphan 0 if in context of a type then persists the identifier into a fake field return type if current Element instanceof Recovered Type Recovered Type recovered Type Recovered Type current Element filter out cases where scanner is still inside type header if recovered Type found Opening Brace generate a pseudo field with a completion on type reference if orphan instanceof Type Reference Completion On Field Type field Declaration new Completion On Field Type Type Reference orphan false retrieve available modifiers if any if int Ptr 2 int Stack int Ptr 1 this last Modifiers Start int Stack int Ptr 2 this last Modifiers field Declaration modifiers Source Start int Stack int Ptr 1 field Declaration modifiers int Stack int Ptr 2 current Element current Element add field Declaration 0 return if in context of a method persists if inside arguments as a type if current Element instanceof Recovered Method Recovered Method recovered Method Recovered Method current Element only consider if inside method header if recovered Method found Opening Brace if r Paren Pos l Paren Pos inside arguments if orphan instanceof Type Reference current Element current Element parent add new Completion On Field Type Type Reference orphan true 0 return add the completion node to the method declaration or constructor declaration if orphan instanceof Statement check for completion at the beginning of method body behind an invalid signature Recovered Method method current Element enclosing Method if method null Abstract Method Declaration method Decl method method Declaration if method Decl body Start method Decl source End 1 was missing opening brace scanner get Line Number orphan source Start scanner get Line Number method Decl source End return add the completion node as a statement to the list of block statements current Element current Element add Statement orphan 0 return the following code applies only in methods constructors or initializers if is Inside Method is Inside Field Initialization return push top expression on ast stack if it contains the completion node Expression expression if this expression Ptr 1 expression this expression Stack this expression Ptr Completion Node Detector detector new Completion Node Detector assist Node expression if detector contains Completion Node check for completion at the beginning of method body behind an invalid signature Recovered Method method current Element enclosing Method if method null Abstract Method Declaration method Decl method method Declaration if method Decl body Start method Decl source End 1 was missing opening brace scanner get Line Number expression source Start scanner get Line Number method Decl source End return if expression assist Node expression instanceof Allocation Expression Allocation Expression expression type assist Node build More Completion Context expression else assist Node Parent detector get Completion Node Parent if assist Node Parent null current Element current Element add Statement assist Node Parent 0 else current Element current Element add expression 0  attachOrphanCompletionNode assistNode isOrphanCompletionNode ASTNode assistNode isOrphanCompletionNode currentElement RecoveredUnit ImportReference currentElement ImportReference currentElement RecoveredType RecoveredType recoveredType RecoveredType currentElement recoveredType foundOpeningBrace TypeReference CompletionOnFieldType fieldDeclaration CompletionOnFieldType TypeReference intPtr intStack intPtr lastModifiersStart intStack intPtr lastModifiers fieldDeclaration modifiersSourceStart intStack intPtr fieldDeclaration intStack intPtr currentElement currentElement fieldDeclaration currentElement RecoveredMethod RecoveredMethod recoveredMethod RecoveredMethod currentElement recoveredMethod foundOpeningBrace rParenPos lParenPos TypeReference currentElement currentElement CompletionOnFieldType TypeReference RecoveredMethod currentElement enclosingMethod AbstractMethodDeclaration methodDecl methodDeclaration methodDecl bodyStart methodDecl sourceEnd getLineNumber sourceStart getLineNumber methodDecl sourceEnd currentElement currentElement isInsideMethod isInsideFieldInitialization expressionPtr expressionStack expressionPtr CompletionNodeDetector CompletionNodeDetector assistNode containsCompletionNode RecoveredMethod currentElement enclosingMethod AbstractMethodDeclaration methodDecl methodDeclaration methodDecl bodyStart methodDecl sourceEnd getLineNumber sourceStart getLineNumber methodDecl sourceEnd assistNode AllocationExpression AllocationExpression assistNode buildMoreCompletionContext assistNodeParent getCompletionNodeParent assistNodeParent currentElement currentElement assistNodeParent currentElement currentElement
private void build More Completion Context Expression expression Statement statement expression int kind top Known Element Kind COMPLETION OR ASSIST PARSER if kind 0 int info top Known Element Info COMPLETION OR ASSIST PARSER next Element switch kind case K SELECTOR QUALIFIER int selector top Known Element Info COMPLETION OR ASSIST PARSER 2 if selector THIS CONSTRUCTOR selector SUPER CONSTRUCTOR Explicit Constructor Call call new Explicit Constructor Call selector THIS CONSTRUCTOR Explicit Constructor Call This Explicit Constructor Call Super call arguments new Expression expression call source Start expression source Start call source End expression source End assist Node Parent call else int invoc Type top Known Element Info COMPLETION OR ASSIST PARSER 1 int qualifier Expr Ptr info find arguments int length expression Length Stack expression Length Ptr search previous arguments if missing if expression Length Ptr 0 length 1 int start int identifier Position Stack selector 32 if this expression Stack expression Ptr 1 null this expression Stack expression Ptr 1 source Start start length expression Length Stack expression Length Ptr 1 Expression arguments null if length 0 arguments new Expression length expression Ptr length System arraycopy expression Stack expression Ptr 1 arguments 0 length 1 arguments length 1 expression if invoc Type ALLOCATION invoc Type QUALIFIED ALLOCATION Message Send message Send new Message Send message Send selector identifier Stack selector message Send arguments arguments find receiver switch invoc Type case NO RECEIVER message Send receiver This Reference implicit This break case NAME RECEIVER remove special flags for primitive types while this identifier Length Ptr 0 this identifier Length Stack this identifier Length Ptr 0 this identifier Length Ptr remove selector this identifier Ptr this identifier Length Stack this identifier Length Ptr consume the receiver message Send receiver this get Unspecified Reference break case SUPER RECEIVER message Send receiver new Super Reference 0 0 break case EXPLICIT RECEIVER message Send receiver this expression Stack qualifier Expr Ptr break default message Send receiver This Reference implicit This break assist Node Parent message Send else if invoc Type ALLOCATION Allocation Expression allocation Expr new Allocation Expression allocation Expr arguments arguments allocation Expr type get Type Reference 0 assist Node Parent allocation Expr else Qualified Allocation Expression allocation Expr new Qualified Allocation Expression allocation Expr enclosing Instance this expression Stack qualifier Expr Ptr allocation Expr arguments arguments allocation Expr type get Type Reference 0 assist Node Parent allocation Expr break next Element case K INSIDE RETURN STATEMENT if info bracket Depth Return Statement return Statement new Return Statement expression expression source Start expression source End assist Node Parent return Statement break next Element case K CAST STATEMENT Expression cast Type if this expression Ptr 0 cast Type this expression Stack this expression Ptr 1 instanceof Type Reference cast Type instanceof Name Reference Cast Expression cast new Cast Expression expression get Type Reference cast Type cast source Start cast Type source Start cast source End expression source End assist Node Parent cast break next Element case K UNARY OPERATOR if expression Ptr 1 Expression operator Expression null switch info case PLUS PLUS operator Expression new Prefix Expression expression Int Literal One PLUS expression source Start break case MINUS MINUS operator Expression new Prefix Expression expression Int Literal One MINUS expression source Start break default operator Expression new Unary Expression expression info break if operator Expression null assist Node Parent operator Expression break next Element case K BINARY OPERATOR if expression Ptr 0 Expression operator Expression null switch info case AND AND operator Expression new AND AND Expression this expression Stack expression Ptr 1 expression info break case OR OR operator Expression new OR OR Expression this expression Stack expression Ptr 1 expression info break case EQUAL EQUAL case NOT EQUAL operator Expression new Equal Expression this expression Stack expression Ptr 1 expression info break case INSTANCEOF should never occur break default operator Expression new Binary Expression this expression Stack expression Ptr 1 expression info break if operator Expression null assist Node Parent operator Expression break next Element case K ARRAY INITIALIZER Array Initializer array Initializer new Array Initializer array Initializer expressions new Expression expression expression Ptr expression Length Stack expression Length Ptr if expression Length Ptr 1 expression Ptr 1 this expression Stack expression Ptr null this expression Stack expression Ptr source Start info expression Length Ptr last Check Point scanner current Position if top Known Element Kind COMPLETION OR ASSIST PARSER 1 K ARRAY CREATION Array Allocation Expression allocation Expression new Array Allocation Expression allocation Expression type get Type Reference 0 int length expression Length Stack expression Length Ptr allocation Expression dimensions new Expression length allocation Expression initializer array Initializer assist Node Parent allocation Expression else if current Element instanceof Recovered Field current Element instanceof Recovered Initializer Recovered Field recovered Field Recovered Field current Element if recovered Field field Declaration type dimensions 0 Block block new Block 0 block source Start info current Element current Element add block 1 else statement array Initializer else if current Element instanceof Recovered Local Variable Recovered Local Variable recovered Local Variable Recovered Local Variable current Element if recovered Local Variable local Declaration type dimensions 0 Block block new Block 0 block source Start info current Element current Element add block 1 else statement array Initializer else statement array Initializer break next Element case K ARRAY CREATION Array Allocation Expression allocation Expression new Array Allocation Expression allocation Expression type get Type Reference 0 allocation Expression dimensions new Expression expression assist Node Parent allocation Expression break next Element case K ASSISGNMENT OPERATOR if expression Ptr 0 expression Stack expression Ptr 1 null Assignment assignment if info EQUAL assignment new Assignment expression Stack expression Ptr 1 expression expression source End else assignment new Compound Assignment expression Stack expression Ptr 1 expression info expression source End assist Node Parent assignment break next Element case K CONDITIONAL OPERATOR if info QUESTION if expression Ptr 0 expression Ptr expression Length Ptr expression Stack expression Ptr expression Stack expression Ptr 1 pop Element K CONDITIONAL OPERATOR build More Completion Context expression return else if expression Ptr 1 expression Ptr expression Ptr 2 expression Length Ptr expression Length Ptr 2 expression Stack expression Ptr expression Stack expression Ptr 2 pop Element K CONDITIONAL OPERATOR build More Completion Context expression return break next Element case K BETWEEN LEFT AND RIGHT BRACKET Array Reference array Reference if identifier Ptr 0 expression Ptr 0 expression Stack expression Ptr expression array Reference new Array Reference expression Stack expression Ptr 1 expression else array Reference new Array Reference get Unspecified Reference Optimized expression assist Node Parent array Reference break if assist Node Parent null current Element current Element add Statement assist Node Parent 0 else if current Element instanceof Recovered Field current Element instanceof Recovered Initializer Recovered Field current Element field Declaration initialization null assist Node Parent Recovered Field current Element field Declaration current Element current buildMoreCompletionContext topKnownElementKind COMPLETION_OR_ASSIST_PARSER topKnownElementInfo COMPLETION_OR_ASSIST_PARSER nextElement K_SELECTOR_QUALIFIER topKnownElementInfo COMPLETION_OR_ASSIST_PARSER THIS_CONSTRUCTOR SUPER_CONSTRUCTOR ExplicitConstructorCall ExplicitConstructorCall THIS_CONSTRUCTOR ExplicitConstructorCall ExplicitConstructorCall sourceStart sourceStart sourceEnd sourceEnd assistNodeParent invocType topKnownElementInfo COMPLETION_OR_ASSIST_PARSER qualifierExprPtr expressionLengthStack expressionLengthPtr expressionLengthPtr identifierPositionStack expressionStack expressionPtr expressionStack expressionPtr sourceStart expressionLengthStack expressionLengthPtr expressionPtr expressionStack expressionPtr invocType invocType QUALIFIED_ALLOCATION MessageSend messageSend MessageSend messageSend identifierStack messageSend invocType NO_RECEIVER messageSend ThisReference implicitThis NAME_RECEIVER identifierLengthPtr identifierLengthStack identifierLengthPtr identifierLengthPtr identifierPtr identifierLengthStack identifierLengthPtr messageSend getUnspecifiedReference SUPER_RECEIVER messageSend SuperReference EXPLICIT_RECEIVER messageSend expressionStack qualifierExprPtr messageSend ThisReference implicitThis assistNodeParent messageSend invocType AllocationExpression allocationExpr AllocationExpression allocationExpr allocationExpr getTypeReference assistNodeParent allocationExpr QualifiedAllocationExpression allocationExpr QualifiedAllocationExpression allocationExpr enclosingInstance expressionStack qualifierExprPtr allocationExpr allocationExpr getTypeReference assistNodeParent allocationExpr nextElement K_INSIDE_RETURN_STATEMENT bracketDepth ReturnStatement returnStatement ReturnStatement sourceStart sourceEnd assistNodeParent returnStatement nextElement K_CAST_STATEMENT castType expressionPtr castType expressionStack expressionPtr TypeReference castType NameReference CastExpression CastExpression getTypeReference castType sourceStart castType sourceStart sourceEnd sourceEnd assistNodeParent nextElement K_UNARY_OPERATOR expressionPtr operatorExpression PLUS_PLUS operatorExpression PrefixExpression IntLiteral sourceStart MINUS_MINUS operatorExpression PrefixExpression IntLiteral sourceStart operatorExpression UnaryExpression operatorExpression assistNodeParent operatorExpression nextElement K_BINARY_OPERATOR expressionPtr operatorExpression AND_AND operatorExpression AND_AND_Expression expressionStack expressionPtr OR_OR operatorExpression OR_OR_Expression expressionStack expressionPtr EQUAL_EQUAL NOT_EQUAL operatorExpression EqualExpression expressionStack expressionPtr operatorExpression BinaryExpression expressionStack expressionPtr operatorExpression assistNodeParent operatorExpression nextElement K_ARRAY_INITIALIZER ArrayInitializer arrayInitializer ArrayInitializer arrayInitializer expressionPtr expressionLengthStack expressionLengthPtr expressionLengthPtr expressionPtr expressionStack expressionPtr expressionStack expressionPtr sourceStart expressionLengthPtr lastCheckPoint currentPosition topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_ARRAY_CREATION ArrayAllocationExpression allocationExpression ArrayAllocationExpression allocationExpression getTypeReference expressionLengthStack expressionLengthPtr allocationExpression allocationExpression arrayInitializer assistNodeParent allocationExpression currentElement RecoveredField currentElement RecoveredInitializer RecoveredField recoveredField RecoveredField currentElement recoveredField fieldDeclaration sourceStart currentElement currentElement arrayInitializer currentElement RecoveredLocalVariable RecoveredLocalVariable recoveredLocalVariable RecoveredLocalVariable currentElement recoveredLocalVariable localDeclaration sourceStart currentElement currentElement arrayInitializer arrayInitializer nextElement K_ARRAY_CREATION ArrayAllocationExpression allocationExpression ArrayAllocationExpression allocationExpression getTypeReference allocationExpression assistNodeParent allocationExpression nextElement K_ASSISGNMENT_OPERATOR expressionPtr expressionStack expressionPtr expressionStack expressionPtr sourceEnd CompoundAssignment expressionStack expressionPtr sourceEnd assistNodeParent nextElement K_CONDITIONAL_OPERATOR expressionPtr expressionPtr expressionLengthPtr expressionStack expressionPtr expressionStack expressionPtr popElement K_CONDITIONAL_OPERATOR buildMoreCompletionContext expressionPtr expressionPtr expressionPtr expressionLengthPtr expressionLengthPtr expressionStack expressionPtr expressionStack expressionPtr popElement K_CONDITIONAL_OPERATOR buildMoreCompletionContext nextElement K_BETWEEN_LEFT_AND_RIGHT_BRACKET ArrayReference arrayReference identifierPtr expressionPtr expressionStack expressionPtr arrayReference ArrayReference expressionStack expressionPtr arrayReference ArrayReference getUnspecifiedReferenceOptimized assistNodeParent arrayReference assistNodeParent currentElement currentElement assistNodeParent currentElement RecoveredField currentElement RecoveredInitializer RecoveredField currentElement fieldDeclaration assistNodeParent RecoveredField currentElement fieldDeclaration currentElement
public int body End Abstract Method Declaration method return cursor Location  bodyEnd AbstractMethodDeclaration cursorLocation
return cursor Location public int body End Initializer initializer return cursor Location  cursorLocation bodyEnd cursorLocation
Checks if the completion is on the exception type of a catch clause Returns whether we found a completion node private boolean check Catch Clause if top Known Element Kind COMPLETION OR ASSIST PARSER K BETWEEN CATCH AND RIGHT PAREN this identifier Ptr 1 NB if the cursor is on the variable then it has been reduced so identifier Ptr is 1 thus this can only be a completion on the type of the catch clause push On Element Stack K NEXT TYPEREF IS EXCEPTION this assist Node get Type Reference 0 pop Element K NEXT TYPEREF IS EXCEPTION this last Check Point this assist Node source End 1 this is Orphan Completion Node true return true return false  checkCatchClause topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_BETWEEN_CATCH_AND_RIGHT_PAREN identifierPtr identifierPtr pushOnElementStack K_NEXT_TYPEREF_IS_EXCEPTION assistNode getTypeReference popElement K_NEXT_TYPEREF_IS_EXCEPTION lastCheckPoint assistNode sourceEnd isOrphanCompletionNode
Checks if the completion is on the type following a new Returns whether we found a completion node private boolean check Class Instance Creation if top Known Element Kind COMPLETION OR ASSIST PARSER K BETWEEN NEW AND LEFT BRACKET completion on type inside an allocation expression Type Reference type if top Known Element Kind COMPLETION OR ASSIST PARSER 1 K INSIDE THROW STATEMENT top Known Element Info COMPLETION OR ASSIST PARSER 1 this bracket Depth push On Element Stack K NEXT TYPEREF IS EXCEPTION type get Type Reference 0 pop Element K NEXT TYPEREF IS EXCEPTION else type get Type Reference 0 this assist Node type this last Check Point type source End 1 if this invocation Type ALLOCATION non qualified allocation expression Allocation Expression alloc Expr new Allocation Expression alloc Expr type type alloc Expr source Start type source Start alloc Expr source End type source End push On Expression Stack alloc Expr this is Orphan Completion Node false else qualified allocation expression Qualified Allocation Expression alloc Expr new Qualified Allocation Expression alloc Expr type type alloc Expr enclosing Instance this expression Stack this qualifier alloc Expr source Start this int Stack this int Ptr alloc Expr source End type source End this expression Stack this qualifier alloc Expr attach it now it replaces the qualifier expression this is Orphan Completion Node false pop Element K BETWEEN NEW AND LEFT BRACKET return true return false  checkClassInstanceCreation topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_BETWEEN_NEW_AND_LEFT_BRACKET TypeReference topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_INSIDE_THROW_STATEMENT topKnownElementInfo COMPLETION_OR_ASSIST_PARSER bracketDepth pushOnElementStack K_NEXT_TYPEREF_IS_EXCEPTION getTypeReference popElement K_NEXT_TYPEREF_IS_EXCEPTION getTypeReference assistNode lastCheckPoint sourceEnd invocationType AllocationExpression allocExpr AllocationExpression allocExpr allocExpr sourceStart sourceStart allocExpr sourceEnd sourceEnd pushOnExpressionStack allocExpr isOrphanCompletionNode QualifiedAllocationExpression allocExpr QualifiedAllocationExpression allocExpr allocExpr enclosingInstance expressionStack allocExpr sourceStart intStack intPtr allocExpr sourceEnd sourceEnd expressionStack allocExpr isOrphanCompletionNode popElement K_BETWEEN_NEW_AND_LEFT_BRACKET
Checks if the completion is on the dot following an array type a primitive type or an primitive array type Returns whether we found a completion node private boolean check Class Literal Access if this identifier Length Ptr 1 this previous Token Token NameDOT NB the top id length is 1 and it is for the completion identifier int length if the penultimate id length is negative the completion is after a primitive type or a primitive array type if length this identifier Length Stack this identifier Length Ptr 1 0 build the primitive type node int dim this is After Array Type this int Stack this int Ptr 0 Single Type Reference type Ref Single Type Reference Type Reference base Type Reference length dim type Ref source Start this int Stack this int Ptr if dim 0 type Ref source End this int Stack this int Ptr else this int Ptr type Ref source End this end Position type Ref source End type Ref source Start type Ref token length NB It s ok to use the length of the token since it doesn t contain any unicode find the completion identifier and its source positions char source identifier Stack identifier Ptr long pos this identifier Position Stack this identifier Ptr this identifier Length Ptr it can only be a simple identifier so its length is one build the completion on class literal access node Completion On Class Literal Access access new Completion On Class Literal Access pos type Ref access completion Identifier source this identifier Length Ptr pop the length that was used to say it is a primitive type this assist Node access this is Orphan Completion Node true return true if the completion is after a regular array type if is After Array Type find the completion identifier and its source positions char source identifier Stack identifier Ptr long pos this identifier Position Stack this identifier Ptr this identifier Length Ptr it can only be a simple identifier so its length is one get the type reference Type Reference type Ref get Type Reference this int Stack this int Ptr build the completion on class literal access node Completion On Class Literal Access access new Completion On Class Literal Access pos type Ref access completion Identifier source this assist Node access this is Orphan Completion Node true return true return false  checkClassLiteralAccess identifierLengthPtr previousToken TokenNameDOT identifierLengthStack identifierLengthPtr isAfterArrayType intStack intPtr SingleTypeReference typeRef SingleTypeReference TypeReference baseTypeReference typeRef sourceStart intStack intPtr typeRef sourceEnd intStack intPtr intPtr typeRef sourceEnd endPosition typeRef sourceEnd typeRef sourceStart typeRef identifierStack identifierPtr identifierPositionStack identifierPtr identifierLengthPtr CompletionOnClassLiteralAccess CompletionOnClassLiteralAccess typeRef completionIdentifier identifierLengthPtr assistNode isOrphanCompletionNode isAfterArrayType identifierStack identifierPtr identifierPositionStack identifierPtr identifierLengthPtr TypeReference typeRef getTypeReference intStack intPtr CompletionOnClassLiteralAccess CompletionOnClassLiteralAccess typeRef completionIdentifier assistNode isOrphanCompletionNode
private boolean check Keyword if current Element instanceof Recovered Unit Recovered Unit unit Recovered Unit current Element int index 1 if index this index Of Assist Identifier 1 int ptr this identifier Ptr this identifier Length Stack this identifier Length Ptr index 1 char ident identifier Stack ptr long pos identifier Position Stack ptr char keywords new char Keywords COUNT int count 0 if unit type Count 0 last Modifiers Acc Default Char Operation prefix Equals identifier Stack ptr Keywords IMPORT keywords count Keywords IMPORT if unit type Count 0 unit import Count 0 last Modifiers Acc Default compilation Unit current Package null Char Operation prefix Equals identifier Stack ptr Keywords PACKAGE keywords count Keywords PACKAGE if last Modifiers Acc Public 0 Char Operation prefix Equals identifier Stack ptr Keywords PUBLIC boolean has No Public Type true for int i 0 i unit type Count i if unit types i type Declaration modifiers Acc Public 0 has No Public Type false if has No Public Type keywords count Keywords PUBLIC if last Modifiers Acc Abstract 0 last Modifiers Acc Final 0 Char Operation prefix Equals identifier Stack ptr Keywords ABSTRACT keywords count Keywords ABSTRACT if last Modifiers Acc Abstract 0 last Modifiers Acc Final 0 Char Operation prefix Equals identifier Stack ptr Keywords FINAL keywords count Keywords FINAL if Char Operation prefix Equals identifier Stack ptr Keywords CLASS keywords count Keywords CLASS if last Modifiers Acc Final 0 Char Operation prefix Equals identifier Stack ptr Keywords INTERFACE keywords count Keywords INTERFACE if count 0 System arraycopy keywords 0 keywords new char count 0 count this assist Node new Completion On Keyword2 ident pos keywords this last Check Point assist Node source End 1 this is Orphan Completion Node true return true return false  checkKeyword currentElement RecoveredUnit RecoveredUnit RecoveredUnit currentElement indexOfAssistIdentifier identifierPtr identifierLengthStack identifierLengthPtr identifierStack identifierPositionStack typeCount lastModifiers AccDefault CharOperation prefixEquals identifierStack typeCount importCount lastModifiers AccDefault compilationUnit currentPackage CharOperation prefixEquals identifierStack lastModifiers AccPublic CharOperation prefixEquals identifierStack hasNoPublicType typeCount typeDeclaration AccPublic hasNoPublicType hasNoPublicType lastModifiers AccAbstract lastModifiers AccFinal CharOperation prefixEquals identifierStack lastModifiers AccAbstract lastModifiers AccFinal CharOperation prefixEquals identifierStack CharOperation prefixEquals identifierStack lastModifiers AccFinal CharOperation prefixEquals identifierStack assistNode CompletionOnKeyword2 lastCheckPoint assistNode sourceEnd isOrphanCompletionNode
private boolean check Instanceof Keyword if is Inside Method int kind top Known Element Kind COMPLETION OR ASSIST PARSER int index if kind K BLOCK DELIMITER index index Of Assist Identifier 1 expression Ptr 1 expression Length Stack expression Ptr 1 int ptr this identifier Ptr this identifier Length Stack this identifier Length Ptr index 1 if identifier Stack ptr length 0 Char Operation prefix Equals identifier Stack ptr Keywords INSTANCEOF this assist Node new Completion On Keyword3 identifier Stack ptr identifier Position Stack ptr Keywords INSTANCEOF this last Check Point assist Node source End 1 this is Orphan Completion Node true return true return false  checkInstanceofKeyword isInsideMethod topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_BLOCK_DELIMITER indexOfAssistIdentifier expressionPtr expressionLengthStack expressionPtr identifierPtr identifierLengthStack identifierLengthPtr identifierStack CharOperation prefixEquals identifierStack assistNode CompletionOnKeyword3 identifierStack identifierPositionStack lastCheckPoint assistNode sourceEnd isOrphanCompletionNode
Checks if the completion is inside a method invocation or a constructor invocation Returns whether we found a completion node private boolean check Invocation Expression top Expression this expression Ptr 0 this expression Stack this expression Ptr null boolean is Empty Name Completion false boolean is Empty Assist Identifier false if top Known Element Kind COMPLETION OR ASSIST PARSER K SELECTOR QUALIFIER is Empty Name Completion top Expression this assist Node this is Empty Name Completion eg it is something like this fred cursor but it is not something like this fred 1 cursor is Empty Assist Identifier this index Of Assist Identifier 0 this identifier Stack this identifier Ptr length 0 eg it is something like this fred 1 cursor pop empty name completion if is Empty Name Completion this expression Ptr this expression Length Stack this expression Length Ptr else if is Empty Assist Identifier this identifier Ptr this identifier Length Ptr find receiver and qualifier int invoc Type top Known Element Info COMPLETION OR ASSIST PARSER 1 int qualifier Expr Ptr top Known Element Info COMPLETION OR ASSIST PARSER find arguments int num Args this expression Ptr qualifier Expr Ptr int arg Start qualifier Expr Ptr 1 Expression arguments null if num Args 0 remember the arguments arguments new Expression num Args System arraycopy this expression Stack arg Start arguments 0 num Args consume the expression arguments this expression Ptr num Args int count num Args while count 0 count this expression Length Stack this expression Length Ptr build ast node if invoc Type ALLOCATION invoc Type QUALIFIED ALLOCATION creates completion on message send Completion On Message Send message Send new Completion On Message Send message Send arguments arguments switch invoc Type case NO RECEIVER implicit this message Send receiver This Reference implicit This break case NAME RECEIVER remove special flags for primitive types while this identifier Length Ptr 0 this identifier Length Stack this identifier Length Ptr 0 this identifier Length Ptr remove selector this identifier Ptr this identifier Length Stack this identifier Length Ptr consume the receiver message Send receiver this get Unspecified Reference break case SUPER RECEIVER message Send receiver new Super Reference 0 0 break case EXPLICIT RECEIVER message Send receiver this expression Stack qualifier Expr Ptr set selector int selector Ptr top Known Element Info COMPLETION OR ASSIST PARSER 2 message Send selector this identifier Stack selector Ptr remove selector if this identifier Length Ptr 0 this identifier Length Stack this identifier Length Ptr 1 this identifier Ptr this identifier Length Ptr the entire message may be replaced in case qualification is needed message Send source Start int this identifier Position Stack selector Ptr 32 this cursor Location 1 message Send source End this cursor Location remember the message send as an orphan completion node this assist Node message Send this last Check Point message Send source End 1 this is Orphan Completion Node true return true else int selector Ptr top Known Element Info COMPLETION OR ASSIST PARSER 2 if selector Ptr THIS CONSTRUCTOR selector Ptr SUPER CONSTRUCTOR creates an explicit constructor call Completion On Explicit Constructor Call call new Completion On Explicit Constructor Call selector Ptr THIS CONSTRUCTOR Explicit Constructor Call This Explicit Constructor Call Super call arguments arguments if invoc Type QUALIFIED ALLOCATION call qualification this expression Stack qualifier Expr Ptr no source is going to be replaced call source Start this cursor Location 1 call source End this cursor Location remember the explicit constructor call as an orphan completion node this assist Node call this last Check Point call source End 1 this is Orphan Completion Node true return true else creates an allocation expression Completion On Qualified Allocation Expression alloc Expr new Completion On Qualified Allocation Expression alloc Expr arguments arguments alloc Expr type super get Type Reference 0 we don t want a completion node here so call super if invoc Type QUALIFIED ALLOCATION alloc Expr enclosing Instance this expression Stack qualifier Expr Ptr no source is going to be replaced alloc Expr source Start this cursor Location 1 alloc Expr source End this cursor Location remember the allocation expression as an orphan completion node this assist Node alloc Expr this last Check Point alloc Expr source End 1 this is Orphan Completion Node true return true return false  checkInvocation topExpression expressionPtr expressionStack expressionPtr isEmptyNameCompletion isEmptyAssistIdentifier topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_SELECTOR_QUALIFIER isEmptyNameCompletion topExpression assistNode isEmptyNameCompletion isEmptyAssistIdentifier indexOfAssistIdentifier identifierStack identifierPtr isEmptyNameCompletion expressionPtr expressionLengthStack expressionLengthPtr isEmptyAssistIdentifier identifierPtr identifierLengthPtr invocType topKnownElementInfo COMPLETION_OR_ASSIST_PARSER qualifierExprPtr topKnownElementInfo COMPLETION_OR_ASSIST_PARSER numArgs expressionPtr qualifierExprPtr argStart qualifierExprPtr numArgs numArgs expressionStack argStart numArgs expressionPtr numArgs numArgs expressionLengthStack expressionLengthPtr invocType invocType QUALIFIED_ALLOCATION CompletionOnMessageSend messageSend CompletionOnMessageSend messageSend invocType NO_RECEIVER messageSend ThisReference implicitThis NAME_RECEIVER identifierLengthPtr identifierLengthStack identifierLengthPtr identifierLengthPtr identifierPtr identifierLengthStack identifierLengthPtr messageSend getUnspecifiedReference SUPER_RECEIVER messageSend SuperReference EXPLICIT_RECEIVER messageSend expressionStack qualifierExprPtr selectorPtr topKnownElementInfo COMPLETION_OR_ASSIST_PARSER messageSend identifierStack selectorPtr identifierLengthPtr identifierLengthStack identifierLengthPtr identifierPtr identifierLengthPtr messageSend sourceStart identifierPositionStack selectorPtr cursorLocation messageSend sourceEnd cursorLocation assistNode messageSend lastCheckPoint messageSend sourceEnd isOrphanCompletionNode selectorPtr topKnownElementInfo COMPLETION_OR_ASSIST_PARSER selectorPtr THIS_CONSTRUCTOR selectorPtr SUPER_CONSTRUCTOR CompletionOnExplicitConstructorCall CompletionOnExplicitConstructorCall selectorPtr THIS_CONSTRUCTOR ExplicitConstructorCall ExplicitConstructorCall invocType QUALIFIED_ALLOCATION expressionStack qualifierExprPtr sourceStart cursorLocation sourceEnd cursorLocation assistNode lastCheckPoint sourceEnd isOrphanCompletionNode CompletionOnQualifiedAllocationExpression allocExpr CompletionOnQualifiedAllocationExpression allocExpr allocExpr getTypeReference invocType QUALIFIED_ALLOCATION allocExpr enclosingInstance expressionStack qualifierExprPtr allocExpr sourceStart cursorLocation allocExpr sourceEnd cursorLocation assistNode allocExpr lastCheckPoint allocExpr sourceEnd isOrphanCompletionNode
Checks if the completion is on a member access ie in an identifier following a dot Returns whether we found a completion node private boolean check Member Access if this previous Token Token NameDOT this qualifier 1 this expression Ptr this qualifier the receiver is an expression push Completion On Member Access On Expression Stack false return true return false  checkMemberAccess previousToken TokenNameDOT expressionPtr pushCompletionOnMemberAccessOnExpressionStack
Checks if the completion is on a name reference Returns whether we found a completion node private boolean check Name Completion We didn t find any other completion but the completion identifier is on the identifier stack so it can only be a completion on name Note that we allow the completion on a name even if nothing is expected eg foo b cursor would be a completion on b This policy gives more to the user than he she would expect but this simplifies the problem To fix this the recovery must be changed to work at a statement granularity instead of at the expression granularity as it does right now NB at this point the completion identifier is on the identifier stack this assist Node get Unspecified Reference Optimized this last Check Point this assist Node source End 1 this is Orphan Completion Node true return true  checkNameCompletion assistNode getUnspecifiedReferenceOptimized lastCheckPoint assistNode sourceEnd isOrphanCompletionNode
Checks if the completion is in the context of a method and on the type of one of its arguments Returns whether we found a completion node private boolean check Recovered Method if current Element instanceof Recovered Method check if current awaiting identifier is the completion identifier if this index Of Assist Identifier 0 return false check if on line with an error already to avoid completing inside illegal type names e g int cursor if last Error End Position cursor Location 1 scanner get Line Number last Error End Position scanner get Line Number Completion Scanner scanner completed Identifier Start return false Recovered Method recovered Method Recovered Method current Element only consider if inside method header if recovered Method found Opening Brace last Ignored Token 1 if r Paren Pos l Paren Pos inside arguments this assist Node this get Type Reference 0 this last Check Point this assist Node source End 1 this is Orphan Completion Node true return true return false  checkRecoveredMethod currentElement RecoveredMethod indexOfAssistIdentifier lastErrorEndPosition cursorLocation getLineNumber lastErrorEndPosition getLineNumber CompletionScanner completedIdentifierStart RecoveredMethod recoveredMethod RecoveredMethod currentElement recoveredMethod foundOpeningBrace lastIgnoredToken rParenPos lParenPos assistNode getTypeReference lastCheckPoint assistNode sourceEnd isOrphanCompletionNode
Checks if the completion is in the context of a type and on a type reference in this type Persists the identifier into a fake field return type Returns whether we found a completion node private boolean check Recovered Type if current Element instanceof Recovered Type check if current awaiting identifier is the completion identifier if this index Of Assist Identifier 0 return false check if on line with an error already to avoid completing inside illegal type names e g int cursor if last Error End Position cursor Location 1 scanner get Line Number last Error End Position scanner get Line Number Completion Scanner scanner completed Identifier Start return false Recovered Type recovered Type Recovered Type current Element filter out cases where scanner is still inside type header if recovered Type found Opening Brace this assist Node this get Type Reference 0 this last Check Point this assist Node source End 1 this is Orphan Completion Node true return true return false  checkRecoveredType currentElement RecoveredType indexOfAssistIdentifier lastErrorEndPosition cursorLocation getLineNumber lastErrorEndPosition getLineNumber CompletionScanner completedIdentifierStart RecoveredType recoveredType RecoveredType currentElement recoveredType foundOpeningBrace assistNode getTypeReference lastCheckPoint assistNode sourceEnd isOrphanCompletionNode
public void completion Identifier Check if assist Node null return if check Keyword return if check Recovered Type return if check Recovered Method return if not in a method in non diet mode and if not inside a field initializer only record references attached to types if is Inside Method this diet is Indirectly Inside Field Initialization return In some cases the completion identifier may not have yet been consumed e g int cursor This is because the grammar does not allow any empty identifier to follow a base type We thus have to manually force the identifier to be consumed that is pushed if assist Identifier null this current Token Token Name Identifier Test below copied from Completion Scanner get Current Identifier Source if cursor Location this scanner start Position this scanner current Position this scanner start Position fake empty identifier got issued this push Identifier else if cursor Location 1 this scanner start Position cursor Location this scanner current Position this push Identifier check for different scenarii no need to go further if we found a non empty completion node we still need to store labels though if this assist Node null however inside an invocation the completion identifier may already have been consumed into an empty name completion so this check should be before we check that we are at the cursor location if is Empty Name Completion check Invocation return no need to check further if we are not at the cursor location if this index Of Assist Identifier 0 return if check Class Instance Creation return if check Catch Clause return if check Member Access return if check Class Literal Access return if check Instanceof Keyword return if the completion was not on an empty name it can still be inside an invocation eg this fred abc cursor NB Put this check before check Name Completion because the selector of the invocation can be on the identifier stack if check Invocation return if check Name Completion return  completionIdentifierCheck assistNode checkKeyword checkRecoveredType checkRecoveredMethod isInsideMethod isIndirectlyInsideFieldInitialization assistIdentifier currentToken TokenNameIdentifier CompletionScanner getCurrentIdentifierSource cursorLocation startPosition currentPosition startPosition pushIdentifier cursorLocation startPosition cursorLocation currentPosition pushIdentifier assistNode isEmptyNameCompletion checkInvocation indexOfAssistIdentifier checkClassInstanceCreation checkCatchClause checkMemberAccess checkClassLiteralAccess checkInstanceofKeyword checkNameCompletion checkInvocation checkNameCompletion
if check Name Completion return protected void consume Array Creation Expression With Initializer super consume Array Creation Expression With Initializer pop Element K ARRAY CREATION  checkNameCompletion consumeArrayCreationExpressionWithInitializer consumeArrayCreationExpressionWithInitializer popElement K_ARRAY_CREATION
pop Element K ARRAY CREATION protected void consume Array Creation Expression Without Initializer super consume Array Creation Expression Without Initializer pop Element K ARRAY CREATION  popElement K_ARRAY_CREATION consumeArrayCreationExpressionWithoutInitializer consumeArrayCreationExpressionWithoutInitializer popElement K_ARRAY_CREATION
pop Element K ARRAY CREATION protected void consume Array Creation Header nothing to do  popElement K_ARRAY_CREATION consumeArrayCreationHeader
nothing to do protected void consume Assignment pop Element K ASSISGNMENT OPERATOR super consume Assignment  consumeAssignment popElement K_ASSISGNMENT_OPERATOR consumeAssignment
super consume Assignment protected void consume Assignment Operator int pos super consume Assignment Operator pos push On Element Stack K ASSISGNMENT OPERATOR pos  consumeAssignment consumeAssignmentOperator consumeAssignmentOperator pushOnElementStack K_ASSISGNMENT_OPERATOR
protected void consume Binary Expression int op super consume Binary Expression op pop Element K BINARY OPERATOR if expression Stack expression Ptr instanceof Binary Expression Binary Expression exp Binary Expression expression Stack expression Ptr if assist Node null exp right assist Node assist Node Parent exp  consumeBinaryExpression consumeBinaryExpression popElement K_BINARY_OPERATOR expressionStack expressionPtr BinaryExpression BinaryExpression BinaryExpression expressionStack expressionPtr assistNode assistNode assistNodeParent
protected void consume Case Label super consume Case Label if top Known Element Kind COMPLETION OR ASSIST PARSER K SWITCH LABEL push On Element Stack K SWITCH LABEL  consumeCaseLabel consumeCaseLabel topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_SWITCH_LABEL pushOnElementStack K_SWITCH_LABEL
protected void consume Cast Expression pop Element K CAST STATEMENT Expression exp cast cast Type expression Ptr expression Length Ptr expression Stack expression Ptr cast new Cast Expression exp expression Stack expression Ptr 1 cast Type expression Stack expression Ptr cast source Start cast Type source Start 1 cast source End exp source End  consumeCastExpression popElement K_CAST_STATEMENT castType expressionPtr expressionLengthPtr expressionStack expressionPtr CastExpression expressionStack expressionPtr castType expressionStack expressionPtr sourceStart castType sourceStart sourceEnd sourceEnd
cast source End exp source End protected void consume Cast ExpressionLL1 pop Element K CAST STATEMENT super consume Cast ExpressionLL1  sourceEnd sourceEnd consumeCastExpressionLL1 popElement K_CAST_STATEMENT consumeCastExpressionLL1
super consume Cast ExpressionLL1 protected void consume Class Body Declaration pop Element K BLOCK DELIMITER super consume Class Body Declaration  consumeCastExpressionLL1 consumeClassBodyDeclaration popElement K_BLOCK_DELIMITER consumeClassBodyDeclaration
protected void consume Class Bodyopt pop Element K SELECTOR QUALIFIER pop Element K SELECTOR INVOCATION TYPE super consume Class Bodyopt  consumeClassBodyopt popElement K_SELECTOR_QUALIFIER popElement K_SELECTOR_INVOCATION_TYPE consumeClassBodyopt
protected void consume Class Header Name super consume Class Header Name if current Element null current Token Token Name Identifier this cursor Location 1 scanner start Position this cursor Location scanner current Position this push Identifier int index 1 check if current awaiting identifier is the completion identifier if index this index Of Assist Identifier 1 int ptr this identifier Ptr this identifier Length Stack this identifier Length Ptr index 1 Recovered Type recovered Type Recovered Type current Element filter out cases where scanner is still inside type header if recovered Type found Opening Brace char keywords new char Keywords COUNT int count 0 Type Declaration type recovered Type type Declaration if type super Interfaces null if type superclass null keywords count Keywords EXTENDS keywords count Keywords IMPLEMENTS System arraycopy keywords 0 keywords new char count 0 count if count 0 type superclass new Completion On Keyword1 identifier Stack ptr identifier Position Stack ptr keywords this assist Node type superclass this last Check Point type superclass source End 1  consumeClassHeaderName consumeClassHeaderName currentElement currentToken TokenNameIdentifier cursorLocation startPosition cursorLocation currentPosition pushIdentifier indexOfAssistIdentifier identifierPtr identifierLengthStack identifierLengthPtr RecoveredType recoveredType RecoveredType currentElement recoveredType foundOpeningBrace TypeDeclaration recoveredType typeDeclaration superInterfaces CompletionOnKeyword1 identifierStack identifierPositionStack assistNode lastCheckPoint sourceEnd
protected void consume Class Header Extends push On Element Stack K NEXT TYPEREF IS CLASS super consume Class Header Extends pop Element K NEXT TYPEREF IS CLASS if current Element null current Token Token Name Identifier this cursor Location 1 scanner start Position this cursor Location scanner current Position this push Identifier int index 1 check if current awaiting identifier is the completion identifier if index this index Of Assist Identifier 1 int ptr this identifier Ptr this identifier Length Stack this identifier Length Ptr index 1 Recovered Type recovered Type Recovered Type current Element filter out cases where scanner is still inside type header if recovered Type found Opening Brace Type Declaration type recovered Type type Declaration if type super Interfaces null type superclass new Completion On Keyword1 identifier Stack ptr identifier Position Stack ptr Keywords IMPLEMENTS this assist Node type superclass this last Check Point type superclass source End 1  consumeClassHeaderExtends pushOnElementStack K_NEXT_TYPEREF_IS_CLASS consumeClassHeaderExtends popElement K_NEXT_TYPEREF_IS_CLASS currentElement currentToken TokenNameIdentifier cursorLocation startPosition cursorLocation currentPosition pushIdentifier indexOfAssistIdentifier identifierPtr identifierLengthStack identifierLengthPtr RecoveredType recoveredType RecoveredType currentElement recoveredType foundOpeningBrace TypeDeclaration recoveredType typeDeclaration superInterfaces CompletionOnKeyword1 identifierStack identifierPositionStack assistNode lastCheckPoint sourceEnd
protected void consume Class Type Elt push On Element Stack K NEXT TYPEREF IS EXCEPTION super consume Class Type Elt pop Element K NEXT TYPEREF IS EXCEPTION  consumeClassTypeElt pushOnElementStack K_NEXT_TYPEREF_IS_EXCEPTION consumeClassTypeElt popElement K_NEXT_TYPEREF_IS_EXCEPTION
pop Element K NEXT TYPEREF IS EXCEPTION protected void consume Conditional Expression int op pop Element K CONDITIONAL OPERATOR super consume Conditional Expression op  popElement K_NEXT_TYPEREF_IS_EXCEPTION consumeConditionalExpression popElement K_CONDITIONAL_OPERATOR consumeConditionalExpression
super consume Conditional Expression op protected void consume Constructor Body pop Element K BLOCK DELIMITER super consume Constructor Body  consumeConditionalExpression consumeConstructorBody popElement K_BLOCK_DELIMITER consumeConstructorBody
super consume Constructor Body protected void consume Constructor Header super consume Constructor Header push On Element Stack K BLOCK DELIMITER  consumeConstructorBody consumeConstructorHeader consumeConstructorHeader pushOnElementStack K_BLOCK_DELIMITER
protected void consume Constructor Header Name no need to take action if not inside assist identifiers if index Of Assist Identifier 0 super consume Constructor Header Name return force to start recovering in order to get fake field behavior if current Element null this has Reported Error true do not report any error this restart Recovery true  consumeConstructorHeaderName indexOfAssistIdentifier consumeConstructorHeaderName currentElement hasReportedError restartRecovery
protected void consume Default Label super consume Default Label if top Known Element Kind COMPLETION OR ASSIST PARSER K SWITCH LABEL pop Element K SWITCH LABEL push On Element Stack K SWITCH LABEL DEFAULT  consumeDefaultLabel consumeDefaultLabel topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_SWITCH_LABEL popElement K_SWITCH_LABEL pushOnElementStack K_SWITCH_LABEL
push On Element Stack K SWITCH LABEL DEFAULT protected void consume Dim With Or With Out Expr Dim With Or With Out Expr push On Expression Stack null  pushOnElementStack K_SWITCH_LABEL consumeDimWithOrWithOutExpr DimWithOrWithOutExpr pushOnExpressionStack
protected void consume Enter Anonymous Class Body pop Element K SELECTOR QUALIFIER pop Element K SELECTOR INVOCATION TYPE super consume Enter Anonymous Class Body  consumeEnterAnonymousClassBody popElement K_SELECTOR_QUALIFIER popElement K_SELECTOR_INVOCATION_TYPE consumeEnterAnonymousClassBody
protected void consume Enter Variable identifier Ptr identifier Length Ptr boolean is Local Declaration nested Method nested Type 0 int variable Index variables Counter nested Type int extended Dimension int Stack int Ptr 1 if is Local Declaration index Of Assist Identifier 0 variable Index 0 extended Dimension 0 identifier Ptr identifier Length Ptr super consume Enter Variable else restart Recovery true private boolean check Keyword if current Element instanceof Recovered Unit Recovered Unit unit Recovered Unit current Element int index 1 if index this index Of Assist Identifier 1 if unit type Count 0 Char Operation prefix Equals identifier Stack index Keywords IMPORT Completion On Keyword2 completion On Import Keyword new Completion On Keyword2 Keywords IMPORT identifier Position Stack index this assist Node completion On Import Keyword this last Check Point completion On Import Keyword source End 1 this is Orphan Completion Node true return true else if unit type Count 0 unit import Count 0 Char Operation prefix Equals identifier Stack index Keywords PACKAGE Completion On Keyword2 completion On Import Keyword new Completion On Keyword2 Keywords PACKAGE identifier Position Stack index this assist Node completion On Import Keyword this last Check Point completion On Import Keyword source End 1 this is Orphan Completion Node true return true return false recovery if current Element null if check Keyword current Element instanceof Recovered Unit Recovered Unit current Element type Count 0 int name Source Start int identifier Position Stack identifier Ptr 32 int Ptr Type Reference type get Type Reference int Stack int Ptr int Ptr if current Element instanceof Recovered Type current Token Token NameDOT scanner get Line Number type source Start scanner get Line Number name Source Start last Check Point name Source Start restart Recovery true return Field Declaration completion Field Decl new Completion On Field Type type false completion Field Decl modifiers int Stack int Ptr assist Node completion Field Decl last Check Point type source End 1 current Element current Element add completion Field Decl 0 last Ignored Token 1  consumeEnterVariable identifierPtr identifierLengthPtr isLocalDeclaration nestedMethod nestedType variableIndex variablesCounter nestedType extendedDimension intStack intPtr isLocalDeclaration indexOfAssistIdentifier variableIndex extendedDimension identifierPtr identifierLengthPtr consumeEnterVariable restartRecovery checkKeyword currentElement RecoveredUnit RecoveredUnit RecoveredUnit currentElement indexOfAssistIdentifier typeCount CharOperation prefixEquals identifierStack CompletionOnKeyword2 completionOnImportKeyword CompletionOnKeyword2 identifierPositionStack assistNode completionOnImportKeyword lastCheckPoint completionOnImportKeyword sourceEnd isOrphanCompletionNode typeCount importCount CharOperation prefixEquals identifierStack CompletionOnKeyword2 completionOnImportKeyword CompletionOnKeyword2 identifierPositionStack assistNode completionOnImportKeyword lastCheckPoint completionOnImportKeyword sourceEnd isOrphanCompletionNode currentElement checkKeyword currentElement RecoveredUnit RecoveredUnit currentElement typeCount nameSourceStart identifierPositionStack identifierPtr intPtr TypeReference getTypeReference intStack intPtr intPtr currentElement RecoveredType currentToken TokenNameDOT getLineNumber sourceStart getLineNumber nameSourceStart lastCheckPoint nameSourceStart restartRecovery FieldDeclaration completionFieldDecl CompletionOnFieldType completionFieldDecl intStack intPtr assistNode completionFieldDecl lastCheckPoint sourceEnd currentElement currentElement completionFieldDecl lastIgnoredToken
protected void consume Equality Expression int op super consume Equality Expression op pop Element K BINARY OPERATOR Binary Expression exp Binary Expression expression Stack expression Ptr if assist Node null exp right assist Node assist Node Parent exp  consumeEqualityExpression consumeEqualityExpression popElement K_BINARY_OPERATOR BinaryExpression BinaryExpression expressionStack expressionPtr assistNode assistNode assistNodeParent
protected void consume Exit Variable With Initialization super consume Exit Variable With Initialization does not keep the initialization if completion is not inside Abstract Variable Declaration variable Abstract Variable Declaration ast Stack ast Ptr if cursor Location 1 variable initialization source Start cursor Location variable initialization source End variable initialization null else if assist Node null assist Node variable initialization assist Node Parent variable  consumeExitVariableWithInitialization consumeExitVariableWithInitialization AbstractVariableDeclaration AbstractVariableDeclaration astStack astPtr cursorLocation sourceStart cursorLocation sourceEnd assistNode assistNode assistNodeParent
protected void consume Explicit Constructor Invocation int flag int rec Flag pop Element K SELECTOR QUALIFIER pop Element K SELECTOR INVOCATION TYPE super consume Explicit Constructor Invocation flag rec Flag  consumeExplicitConstructorInvocation recFlag popElement K_SELECTOR_QUALIFIER popElement K_SELECTOR_INVOCATION_TYPE consumeExplicitConstructorInvocation recFlag
protected void consume Field Access boolean is Super Access Field Access Primary Identifier Field Access super Identifier potential receiver is being poped so reset potential receiver this invocation Type NO RECEIVER this qualifier 1 if this index Of Assist Identifier 0 super consume Field Access is Super Access else this push Completion On Member Access On Expression Stack is Super Access  consumeFieldAccess isSuperAccess FieldAccess FieldAccess invocationType NO_RECEIVER indexOfAssistIdentifier consumeFieldAccess isSuperAccess pushCompletionOnMemberAccessOnExpressionStack isSuperAccess
protected void consume Force No Diet super consume Force No Diet if is Inside Method push On Element Stack K LOCAL INITIALIZER DELIMITER  consumeForceNoDiet consumeForceNoDiet isInsideMethod pushOnElementStack K_LOCAL_INITIALIZER_DELIMITER
protected void consume Formal Parameter if this index Of Assist Identifier 0 super consume Formal Parameter else identifier Length Ptr char identifier Name identifier Stack identifier Ptr long name Positions identifier Position Stack identifier Ptr Type Reference type get Type Reference int Stack int Ptr int Stack int Ptr int Ptr 2 Completion On Argument Name arg new Completion On Argument Name identifier Name name Positions type int Stack int Ptr 1 Acc Deprecated modifiers arg is Catch Argument top Known Element Kind COMPLETION OR ASSIST PARSER K BETWEEN CATCH AND RIGHT PAREN push On Ast Stack arg assist Node arg this last Check Point int name Positions is Orphan Completion Node true if incomplete method header list Length counter will not have been reset indicating that some arguments are available on the stack list Length  consumeFormalParameter indexOfAssistIdentifier consumeFormalParameter identifierLengthPtr identifierName identifierStack identifierPtr namePositions identifierPositionStack identifierPtr TypeReference getTypeReference intStack intPtr intStack intPtr intPtr CompletionOnArgumentName CompletionOnArgumentName identifierName namePositions intStack intPtr AccDeprecated isCatchArgument topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_BETWEEN_CATCH_AND_RIGHT_PAREN pushOnAstStack assistNode lastCheckPoint namePositions isOrphanCompletionNode listLength listLength
protected void consume Inside Cast Expression int end int Stack int Ptr Expression cast Type get Type Reference int Stack int Ptr cast Type source End end 1 cast Type source Start int Stack int Ptr 1 push On Expression Stack cast Type push On Element Stack K CAST STATEMENT  consumeInsideCastExpression intStack intPtr castType getTypeReference intStack intPtr castType sourceEnd castType sourceStart intStack intPtr pushOnExpressionStack castType pushOnElementStack K_CAST_STATEMENT
push On Element Stack K CAST STATEMENT protected void consume Inside Cast ExpressionLL1 super consume Inside Cast ExpressionLL1 push On Element Stack K CAST STATEMENT  pushOnElementStack K_CAST_STATEMENT consumeInsideCastExpressionLL1 consumeInsideCastExpressionLL1 pushOnElementStack K_CAST_STATEMENT
protected void consume Instance Of Expression int op super consume Instance Of Expression op pop Element K BINARY OPERATOR Instance Of Expression exp Instance Of Expression expression Stack expression Ptr if assist Node null exp type assist Node assist Node Parent exp  consumeInstanceOfExpression consumeInstanceOfExpression popElement K_BINARY_OPERATOR InstanceOfExpression InstanceOfExpression expressionStack expressionPtr assistNode assistNode assistNodeParent
protected void consume Interface Header Name super consume Interface Header Name if current Element null current Token Token Name Identifier this cursor Location 1 scanner start Position this cursor Location scanner current Position this push Identifier int index 1 check if current awaiting identifier is the completion identifier if index this index Of Assist Identifier 1 int ptr this identifier Ptr this identifier Length Stack this identifier Length Ptr index 1 Recovered Type recovered Type Recovered Type current Element filter out cases where scanner is still inside type header if recovered Type found Opening Brace Type Declaration type recovered Type type Declaration if type super Interfaces null Completion On Keyword1 completion On Keyword new Completion On Keyword1 identifier Stack ptr identifier Position Stack ptr Keywords EXTENDS type super Interfaces new Type Reference completion On Keyword this assist Node completion On Keyword this last Check Point completion On Keyword source End 1  consumeInterfaceHeaderName consumeInterfaceHeaderName currentElement currentToken TokenNameIdentifier cursorLocation startPosition cursorLocation currentPosition pushIdentifier indexOfAssistIdentifier identifierPtr identifierLengthStack identifierLengthPtr RecoveredType recoveredType RecoveredType currentElement recoveredType foundOpeningBrace TypeDeclaration recoveredType typeDeclaration superInterfaces CompletionOnKeyword1 completionOnKeyword CompletionOnKeyword1 identifierStack identifierPositionStack superInterfaces TypeReference completionOnKeyword assistNode completionOnKeyword lastCheckPoint completionOnKeyword sourceEnd
protected void consume Interface Type push On Element Stack K NEXT TYPEREF IS INTERFACE super consume Interface Type pop Element K NEXT TYPEREF IS INTERFACE  consumeInterfaceType pushOnElementStack K_NEXT_TYPEREF_IS_INTERFACE consumeInterfaceType popElement K_NEXT_TYPEREF_IS_INTERFACE
protected void consume Method Invocation Name pop Element K SELECTOR QUALIFIER pop Element K SELECTOR INVOCATION TYPE super consume Method Invocation Name  consumeMethodInvocationName popElement K_SELECTOR_QUALIFIER popElement K_SELECTOR_INVOCATION_TYPE consumeMethodInvocationName
protected void consume Method Invocation Primary pop Element K SELECTOR QUALIFIER pop Element K SELECTOR INVOCATION TYPE super consume Method Invocation Primary  consumeMethodInvocationPrimary popElement K_SELECTOR_QUALIFIER popElement K_SELECTOR_INVOCATION_TYPE consumeMethodInvocationPrimary
protected void consume Method Invocation Super pop Element K SELECTOR QUALIFIER pop Element K SELECTOR INVOCATION TYPE super consume Method Invocation Super  consumeMethodInvocationSuper popElement K_SELECTOR_QUALIFIER popElement K_SELECTOR_INVOCATION_TYPE consumeMethodInvocationSuper
protected void consume Method Header Name if this index Of Assist Identifier 0 identifier Ptr identifier Length Ptr if this index Of Assist Identifier 0 identifier Ptr identifier Length Ptr super consume Method Header Name else restart Recovery true recovery if current Element null name char selector identifier Stack identifier Ptr 1 long selector Source identifier Position Stack identifier Ptr 1 type Type Reference type get Type Reference int Stack int Ptr Completion On Single Type Reference type is Completion Node false modifiers int declaration Source Start int Stack int Ptr int mod int Stack int Ptr if scanner get Line Number type source Start scanner get Line Number int selector Source 32 Field Declaration completion Field Decl new Completion On Field Type type false completion Field Decl modifiers mod assist Node completion Field Decl last Check Point type source End 1 current Element current Element add completion Field Decl 0 last Ignored Token 1 else Completion On Method Return Type md new Completion On Method Return Type type this compilation Unit compilation Result md selector selector md declaration Source Start declaration Source Start md modifiers mod md body Start l Paren Pos 1 list Length 0 initialize list Length before reading parameters throws assist Node md this last Check Point md body Start current Element current Element add md 0 last Ignored Token 1 javadoc md javadoc this javadoc this javadoc null else Method Header Name Modifiersopt Type Identifier Completion On Method Name md new Completion On Method Name this compilation Unit compilation Result name md selector identifier Stack identifier Ptr long selector Source identifier Position Stack identifier Ptr identifier Length Ptr type md return Type get Type Reference int Stack int Ptr modifiers md declaration Source Start int Stack int Ptr md modifiers int Stack int Ptr javadoc md javadoc this javadoc this javadoc null highlight starts at selector start md source Start int selector Source 32 md selector End int selector Source push On Ast Stack md md source End l Paren Pos md body Start l Paren Pos 1 list Length 0 initialize list Length before reading parameters throws this assist Node md this last Check Point md source End recovery if current Element null if current Element instanceof Recovered Type md modifiers 0 scanner get Line Number md return Type source Start scanner get Line Number md source Start last Check Point md body Start current Element current Element add md 0 last Ignored Token 1 else last Check Point md source Start restart Recovery true  consumeMethodHeaderName indexOfAssistIdentifier identifierPtr identifierLengthPtr indexOfAssistIdentifier identifierPtr identifierLengthPtr consumeMethodHeaderName restartRecovery currentElement identifierStack identifierPtr selectorSource identifierPositionStack identifierPtr TypeReference getTypeReference intStack intPtr CompletionOnSingleTypeReference isCompletionNode declarationSourceStart intStack intPtr intStack intPtr getLineNumber sourceStart getLineNumber selectorSource FieldDeclaration completionFieldDecl CompletionOnFieldType completionFieldDecl assistNode completionFieldDecl lastCheckPoint sourceEnd currentElement currentElement completionFieldDecl lastIgnoredToken CompletionOnMethodReturnType CompletionOnMethodReturnType compilationUnit compilationResult declarationSourceStart declarationSourceStart bodyStart lParenPos listLength listLength assistNode lastCheckPoint bodyStart currentElement currentElement lastIgnoredToken MethodHeaderName CompletionOnMethodName CompletionOnMethodName compilationUnit compilationResult identifierStack identifierPtr selectorSource identifierPositionStack identifierPtr identifierLengthPtr returnType getTypeReference intStack intPtr declarationSourceStart intStack intPtr intStack intPtr sourceStart selectorSource selectorEnd selectorSource pushOnAstStack sourceEnd lParenPos bodyStart lParenPos listLength listLength assistNode lastCheckPoint sourceEnd currentElement currentElement RecoveredType getLineNumber returnType sourceStart getLineNumber sourceStart lastCheckPoint bodyStart currentElement currentElement lastIgnoredToken lastCheckPoint sourceStart restartRecovery
protected void consume Method Header Parameters super consume Method Header Parameters if current Element null current Token Token Name Identifier this cursor Location 1 scanner start Position this cursor Location scanner current Position this push Identifier int index 1 check if current awaiting identifier is the completion identifier if index this index Of Assist Identifier 1 int ptr this identifier Ptr this identifier Length Stack this identifier Length Ptr index 1 if current Element instanceof Recovered Method Recovered Method recovered Method Recovered Method current Element filter out cases where scanner is still inside type header if recovered Method found Opening Brace Abstract Method Declaration method recovered Method method Declaration if method thrown Exceptions null Char Operation prefix Equals identifier Stack ptr Keywords THROWS Completion On Keyword1 completion On Keyword new Completion On Keyword1 identifier Stack ptr identifier Position Stack ptr Keywords THROWS method thrown Exceptions new Type Reference completion On Keyword recovered Method found Opening Brace true this assist Node completion On Keyword this last Check Point completion On Keyword source End 1  consumeMethodHeaderParameters consumeMethodHeaderParameters currentElement currentToken TokenNameIdentifier cursorLocation startPosition cursorLocation currentPosition pushIdentifier indexOfAssistIdentifier identifierPtr identifierLengthStack identifierLengthPtr currentElement RecoveredMethod RecoveredMethod recoveredMethod RecoveredMethod currentElement recoveredMethod foundOpeningBrace AbstractMethodDeclaration recoveredMethod methodDeclaration thrownExceptions CharOperation prefixEquals identifierStack CompletionOnKeyword1 completionOnKeyword CompletionOnKeyword1 identifierStack identifierPositionStack thrownExceptions TypeReference completionOnKeyword recoveredMethod foundOpeningBrace assistNode completionOnKeyword lastCheckPoint completionOnKeyword sourceEnd
protected void consume Method Header Extended Dims super consume Method Header Extended Dims if current Element null current Token Token Name Identifier this cursor Location 1 scanner start Position this cursor Location scanner current Position this push Identifier int index 1 check if current awaiting identifier is the completion identifier if index this index Of Assist Identifier 1 int ptr this identifier Ptr this identifier Length Stack this identifier Length Ptr index 1 Recovered Method recovered Method Recovered Method current Element filter out cases where scanner is still inside type header if recovered Method found Opening Brace Abstract Method Declaration method recovered Method method Declaration if method thrown Exceptions null Completion On Keyword1 completion On Keyword new Completion On Keyword1 identifier Stack ptr identifier Position Stack ptr Keywords THROWS method thrown Exceptions new Type Reference completion On Keyword recovered Method found Opening Brace true this assist Node completion On Keyword this last Check Point completion On Keyword source End 1  consumeMethodHeaderExtendedDims consumeMethodHeaderExtendedDims currentElement currentToken TokenNameIdentifier cursorLocation startPosition cursorLocation currentPosition pushIdentifier indexOfAssistIdentifier identifierPtr identifierLengthStack identifierLengthPtr RecoveredMethod recoveredMethod RecoveredMethod currentElement recoveredMethod foundOpeningBrace AbstractMethodDeclaration recoveredMethod methodDeclaration thrownExceptions CompletionOnKeyword1 completionOnKeyword CompletionOnKeyword1 identifierStack identifierPositionStack thrownExceptions TypeReference completionOnKeyword recoveredMethod foundOpeningBrace assistNode completionOnKeyword lastCheckPoint completionOnKeyword sourceEnd
protected void consume Method Body pop Element K BLOCK DELIMITER super consume Method Body  consumeMethodBody popElement K_BLOCK_DELIMITER consumeMethodBody
super consume Method Body protected void consume Method Header super consume Method Header push On Element Stack K BLOCK DELIMITER  consumeMethodBody consumeMethodHeader consumeMethodHeader pushOnElementStack K_BLOCK_DELIMITER
protected void consume Modifiers super consume Modifiers save from stack values this last Modifiers Start int Stack int Ptr this last Modifiers int Stack int Ptr 1  consumeModifiers consumeModifiers lastModifiersStart intStack intPtr lastModifiers intStack intPtr
protected void consume Reference Type if this identifier Length Stack this identifier Length Ptr 1 reducing a qualified name potential receiver is being poped so reset potential receiver this invocation Type NO RECEIVER this qualifier 1 super consume Reference Type  consumeReferenceType identifierLengthStack identifierLengthPtr invocationType NO_RECEIVER consumeReferenceType
protected void consume Restore Diet super consume Restore Diet if is Inside Method pop Element K LOCAL INITIALIZER DELIMITER  consumeRestoreDiet consumeRestoreDiet isInsideMethod popElement K_LOCAL_INITIALIZER_DELIMITER
protected void consume Statement Switch super consume Statement Switch if top Known Element Kind COMPLETION OR ASSIST PARSER K SWITCH LABEL pop Element K SWITCH LABEL pop Element K BLOCK DELIMITER  consumeStatementSwitch consumeStatementSwitch topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_SWITCH_LABEL popElement K_SWITCH_LABEL popElement K_BLOCK_DELIMITER
protected void consume Nested Method super consume Nested Method if top Known Element Kind COMPLETION OR ASSIST PARSER K BLOCK DELIMITER push On Element Stack K BLOCK DELIMITER  consumeNestedMethod consumeNestedMethod topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_BLOCK_DELIMITER pushOnElementStack K_BLOCK_DELIMITER
protected void consume Primary No New Array Name this is class literal access so reset potential receiver this invocation Type NO RECEIVER this qualifier 1 super consume Primary No New Array Name  consumePrimaryNoNewArrayName invocationType NO_RECEIVER consumePrimaryNoNewArrayName
protected void consume Push Position super consume Push Position if top Known Element Kind COMPLETION OR ASSIST PARSER K BINARY OPERATOR int info top Known Element Info COMPLETION OR ASSIST PARSER pop Element K BINARY OPERATOR push On Element Stack K UNARY OPERATOR info  consumePushPosition consumePushPosition topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_BINARY_OPERATOR topKnownElementInfo COMPLETION_OR_ASSIST_PARSER popElement K_BINARY_OPERATOR pushOnElementStack K_UNARY_OPERATOR
protected void consume Token int token if is First super consume Token token return if can Be Explicit Constructor NEXTTOKEN can Be Explicit Constructor YES else can Be Explicit Constructor NO int previous this previous Token int prev Identifier Ptr this previous Identifier Ptr if is Inside Method is Inside Field Initialization switch token case Token NameLPAREN pop Element K BETWEEN NEW AND LEFT BRACKET break case Token NameLBRACE pop Element K BETWEEN NEW AND LEFT BRACKET break case Token NameLBRACKET if top Known Element Kind COMPLETION OR ASSIST PARSER K BETWEEN NEW AND LEFT BRACKET pop Element K BETWEEN NEW AND LEFT BRACKET push On Element Stack K ARRAY CREATION break case Token NameRBRACE if top Known Element Kind COMPLETION OR ASSIST PARSER K BLOCK DELIMITER pop Element K BLOCK DELIMITER else pop Element K ARRAY INITIALIZER break case Token NameRBRACKET if top Known Element Kind COMPLETION OR ASSIST PARSER K BETWEEN LEFT AND RIGHT BRACKET pop Element K BETWEEN LEFT AND RIGHT BRACKET break super consume Token token if in field initializer directly or not on the completion identifier and not in recovery mode yet then position end of file at cursor location so that we have the same behavior as in method bodies if token Token Name Identifier this identifier Stack this identifier Ptr assist Identifier this current Element null this is Indirectly Inside Field Initialization this scanner eof Position cursor Location Integer MAX VALUE cursor Location 1 cursor Location if in a method or if in a field initializer if is Inside Method is Inside Field Initialization switch token case Token NameDOT switch previous case Token Namethis eg this fred this invocation Type EXPLICIT RECEIVER break case Token Namesuper eg super fred this invocation Type SUPER RECEIVER break case Token Name Identifier eg bar fred if top Known Element Kind COMPLETION OR ASSIST PARSER K BETWEEN NEW AND LEFT BRACKET if this identifier Ptr prev Identifier Ptr if identifier has been consumed eg this x fred this invocation Type EXPLICIT RECEIVER else this invocation Type NAME RECEIVER break break case Token Name Identifier if previous Token NameDOT eg foo fred if this invocation Type SUPER RECEIVER eg not super fred this invocation Type NAME RECEIVER eg not bar fred this invocation Type ALLOCATION eg not new foo Bar this invocation Type QUALIFIED ALLOCATION eg not fred new foo Bar this invocation Type EXPLICIT RECEIVER this qualifier this expression Ptr break case Token Namenew push On Element Stack K BETWEEN NEW AND LEFT BRACKET this qualifier this expression Ptr NB even if there is no qualification set it to the expression ptr so that the number of arguments are correctly computed if previous Token NameDOT eg fred new X this invocation Type QUALIFIED ALLOCATION else eg new X this invocation Type ALLOCATION break case Token Namethis if previous Token NameDOT eg fred this this invocation Type QUALIFIED ALLOCATION this qualifier this expression Ptr break case Token Namesuper if previous Token NameDOT eg fred super this invocation Type QUALIFIED ALLOCATION this qualifier this expression Ptr break case Token Namecatch push On Element Stack K BETWEEN CATCH AND RIGHT PAREN break case Token NameLPAREN if this invocation Type NO RECEIVER this invocation Type NAME RECEIVER this invocation Type SUPER RECEIVER this qualifier this expression Ptr remenber the last expression so that arguments are correctly computed switch previous case Token Name Identifier eg fred or foo fred if top Known Element Kind COMPLETION OR ASSIST PARSER K SELECTOR this push On Element Stack K SELECTOR INVOCATION TYPE this invocation Type this push On Element Stack K SELECTOR QUALIFIER this qualifier this qualifier 1 this invocation Type NO RECEIVER break case Token Namethis explicit constructor invocation eg this 1 2 if top Known Element Kind COMPLETION OR ASSIST PARSER K SELECTOR this push On Element Stack K SELECTOR INVOCATION TYPE this invocation Type QUALIFIED ALLOCATION QUALIFIED ALLOCATION ALLOCATION this push On Element Stack K SELECTOR QUALIFIER this qualifier this qualifier 1 this invocation Type NO RECEIVER break case Token Namesuper explicit constructor invocation eg super 1 2 if top Known Element Kind COMPLETION OR ASSIST PARSER K SELECTOR this push On Element Stack K SELECTOR INVOCATION TYPE this invocation Type QUALIFIED ALLOCATION QUALIFIED ALLOCATION ALLOCATION this push On Element Stack K SELECTOR QUALIFIER this qualifier this qualifier 1 this invocation Type NO RECEIVER break break case Token NameLBRACE this bracket Depth int kind if kind top Known Element Kind COMPLETION OR ASSIST PARSER K FIELD INITIALIZER DELIMITER kind K LOCAL INITIALIZER DELIMITER kind K ARRAY CREATION push On Element Stack K ARRAY INITIALIZER end Position else switch previous case Token NameRPAREN switch previous Kind case K BETWEEN IF AND RIGHT PAREN push On Element Stack K BLOCK DELIMITER IF break case K BETWEEN CATCH AND RIGHT PAREN push On Element Stack K BLOCK DELIMITER CATCH break case K BETWEEN WHILE AND RIGHT PAREN push On Element Stack K BLOCK DELIMITER WHILE break case K BETWEEN SWITCH AND RIGHT PAREN push On Element Stack K BLOCK DELIMITER SWITCH break case K BETWEEN FOR AND RIGHT PAREN push On Element Stack K BLOCK DELIMITER FOR break case K BETWEEN SYNCHRONIZED AND RIGHT PAREN push On Element Stack K BLOCK DELIMITER SYNCHRONIZED break default push On Element Stack K BLOCK DELIMITER break break case Token Nametry push On Element Stack K BLOCK DELIMITER TRY break case Token Namedo push On Element Stack K BLOCK DELIMITER DO break default push On Element Stack K BLOCK DELIMITER break break case Token NameLBRACKET if top Known Element Kind COMPLETION OR ASSIST PARSER K ARRAY CREATION push On Element Stack K BETWEEN LEFT AND RIGHT BRACKET else if previous Token Name Identifier invocation Type NO RECEIVER qualifier 1 this bracket Depth break case Token NameRBRACE this bracket Depth break case Token NameRBRACKET this bracket Depth break case Token NameRPAREN switch top Known Element Kind COMPLETION OR ASSIST PARSER case K BETWEEN CATCH AND RIGHT PAREN pop Element K BETWEEN CATCH AND RIGHT PAREN break case K BETWEEN IF AND RIGHT PAREN if top Known Element Info COMPLETION OR ASSIST PARSER bracket Depth pop Element K BETWEEN IF AND RIGHT PAREN break case K BETWEEN WHILE AND RIGHT PAREN if top Known Element Info COMPLETION OR ASSIST PARSER bracket Depth pop Element K BETWEEN WHILE AND RIGHT PAREN break case K BETWEEN FOR AND RIGHT PAREN if top Known Element Info COMPLETION OR ASSIST PARSER bracket Depth pop Element K BETWEEN FOR AND RIGHT PAREN break case K BETWEEN SWITCH AND RIGHT PAREN if top Known Element Info COMPLETION OR ASSIST PARSER bracket Depth pop Element K BETWEEN SWITCH AND RIGHT PAREN break case K BETWEEN SYNCHRONIZED AND RIGHT PAREN if top Known Element Info COMPLETION OR ASSIST PARSER bracket Depth pop Element K BETWEEN SYNCHRONIZED AND RIGHT PAREN break break case Token Namethrow push On Element Stack K INSIDE THROW STATEMENT bracket Depth break case Token NameSEMICOLON switch top Known Element Kind COMPLETION OR ASSIST PARSER case K INSIDE THROW STATEMENT if top Known Element Info COMPLETION OR ASSIST PARSER this bracket Depth pop Element K INSIDE THROW STATEMENT break case K INSIDE RETURN STATEMENT if top Known Element Info COMPLETION OR ASSIST PARSER this bracket Depth pop Element K INSIDE RETURN STATEMENT break case K INSIDE ASSERT STATEMENT if top Known Element Info COMPLETION OR ASSIST PARSER this bracket Depth pop Element K INSIDE ASSERT STATEMENT break break case Token Namereturn push On Element Stack K INSIDE RETURN STATEMENT this bracket Depth break case Token NameMULTIPLY push On Element Stack K BINARY OPERATOR MULTIPLY break case Token NameDIVIDE push On Element Stack K BINARY OPERATOR DIVIDE break case Token NameREMAINDER push On Element Stack K BINARY OPERATOR REMAINDER break case Token NamePLUS push On Element Stack K BINARY OPERATOR PLUS break case Token NameMINUS push On Element Stack K BINARY OPERATOR M consumeToken isFirst consumeToken canBeExplicitConstructor canBeExplicitConstructor canBeExplicitConstructor previousToken prevIdentifierPtr previousIdentifierPtr isInsideMethod isInsideFieldInitialization TokenNameLPAREN popElement K_BETWEEN_NEW_AND_LEFT_BRACKET TokenNameLBRACE popElement K_BETWEEN_NEW_AND_LEFT_BRACKET TokenNameLBRACKET topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_BETWEEN_NEW_AND_LEFT_BRACKET popElement K_BETWEEN_NEW_AND_LEFT_BRACKET pushOnElementStack K_ARRAY_CREATION TokenNameRBRACE topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_BLOCK_DELIMITER popElement K_BLOCK_DELIMITER popElement K_ARRAY_INITIALIZER TokenNameRBRACKET topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_BETWEEN_LEFT_AND_RIGHT_BRACKET popElement K_BETWEEN_LEFT_AND_RIGHT_BRACKET consumeToken TokenNameIdentifier identifierStack identifierPtr assistIdentifier currentElement isIndirectlyInsideFieldInitialization eofPosition cursorLocation MAX_VALUE cursorLocation cursorLocation isInsideMethod isInsideFieldInitialization TokenNameDOT TokenNamethis invocationType EXPLICIT_RECEIVER TokenNamesuper invocationType SUPER_RECEIVER TokenNameIdentifier topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_BETWEEN_NEW_AND_LEFT_BRACKET identifierPtr prevIdentifierPtr invocationType EXPLICIT_RECEIVER invocationType NAME_RECEIVER TokenNameIdentifier TokenNameDOT invocationType SUPER_RECEIVER invocationType NAME_RECEIVER invocationType invocationType QUALIFIED_ALLOCATION invocationType EXPLICIT_RECEIVER expressionPtr TokenNamenew pushOnElementStack K_BETWEEN_NEW_AND_LEFT_BRACKET expressionPtr TokenNameDOT invocationType QUALIFIED_ALLOCATION invocationType TokenNamethis TokenNameDOT invocationType QUALIFIED_ALLOCATION expressionPtr TokenNamesuper TokenNameDOT invocationType QUALIFIED_ALLOCATION expressionPtr TokenNamecatch pushOnElementStack K_BETWEEN_CATCH_AND_RIGHT_PAREN TokenNameLPAREN invocationType NO_RECEIVER invocationType NAME_RECEIVER invocationType SUPER_RECEIVER expressionPtr TokenNameIdentifier topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_SELECTOR pushOnElementStack K_SELECTOR_INVOCATION_TYPE invocationType pushOnElementStack K_SELECTOR_QUALIFIER invocationType NO_RECEIVER TokenNamethis topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_SELECTOR pushOnElementStack K_SELECTOR_INVOCATION_TYPE invocationType QUALIFIED_ALLOCATION QUALIFIED_ALLOCATION pushOnElementStack K_SELECTOR_QUALIFIER invocationType NO_RECEIVER TokenNamesuper topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_SELECTOR pushOnElementStack K_SELECTOR_INVOCATION_TYPE invocationType QUALIFIED_ALLOCATION QUALIFIED_ALLOCATION pushOnElementStack K_SELECTOR_QUALIFIER invocationType NO_RECEIVER TokenNameLBRACE bracketDepth topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_FIELD_INITIALIZER_DELIMITER K_LOCAL_INITIALIZER_DELIMITER K_ARRAY_CREATION pushOnElementStack K_ARRAY_INITIALIZER endPosition TokenNameRPAREN previousKind K_BETWEEN_IF_AND_RIGHT_PAREN pushOnElementStack K_BLOCK_DELIMITER K_BETWEEN_CATCH_AND_RIGHT_PAREN pushOnElementStack K_BLOCK_DELIMITER K_BETWEEN_WHILE_AND_RIGHT_PAREN pushOnElementStack K_BLOCK_DELIMITER K_BETWEEN_SWITCH_AND_RIGHT_PAREN pushOnElementStack K_BLOCK_DELIMITER K_BETWEEN_FOR_AND_RIGHT_PAREN pushOnElementStack K_BLOCK_DELIMITER K_BETWEEN_SYNCHRONIZED_AND_RIGHT_PAREN pushOnElementStack K_BLOCK_DELIMITER pushOnElementStack K_BLOCK_DELIMITER TokenNametry pushOnElementStack K_BLOCK_DELIMITER TokenNamedo pushOnElementStack K_BLOCK_DELIMITER pushOnElementStack K_BLOCK_DELIMITER TokenNameLBRACKET topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_ARRAY_CREATION pushOnElementStack K_BETWEEN_LEFT_AND_RIGHT_BRACKET TokenNameIdentifier invocationType NO_RECEIVER bracketDepth TokenNameRBRACE bracketDepth TokenNameRBRACKET bracketDepth TokenNameRPAREN topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_BETWEEN_CATCH_AND_RIGHT_PAREN popElement K_BETWEEN_CATCH_AND_RIGHT_PAREN K_BETWEEN_IF_AND_RIGHT_PAREN topKnownElementInfo COMPLETION_OR_ASSIST_PARSER bracketDepth popElement K_BETWEEN_IF_AND_RIGHT_PAREN K_BETWEEN_WHILE_AND_RIGHT_PAREN topKnownElementInfo COMPLETION_OR_ASSIST_PARSER bracketDepth popElement K_BETWEEN_WHILE_AND_RIGHT_PAREN K_BETWEEN_FOR_AND_RIGHT_PAREN topKnownElementInfo COMPLETION_OR_ASSIST_PARSER bracketDepth popElement K_BETWEEN_FOR_AND_RIGHT_PAREN K_BETWEEN_SWITCH_AND_RIGHT_PAREN topKnownElementInfo COMPLETION_OR_ASSIST_PARSER bracketDepth popElement K_BETWEEN_SWITCH_AND_RIGHT_PAREN K_BETWEEN_SYNCHRONIZED_AND_RIGHT_PAREN topKnownElementInfo COMPLETION_OR_ASSIST_PARSER bracketDepth popElement K_BETWEEN_SYNCHRONIZED_AND_RIGHT_PAREN TokenNamethrow pushOnElementStack K_INSIDE_THROW_STATEMENT bracketDepth TokenNameSEMICOLON topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_INSIDE_THROW_STATEMENT topKnownElementInfo COMPLETION_OR_ASSIST_PARSER bracketDepth popElement K_INSIDE_THROW_STATEMENT K_INSIDE_RETURN_STATEMENT topKnownElementInfo COMPLETION_OR_ASSIST_PARSER bracketDepth popElement K_INSIDE_RETURN_STATEMENT K_INSIDE_ASSERT_STATEMENT topKnownElementInfo COMPLETION_OR_ASSIST_PARSER bracketDepth popElement K_INSIDE_ASSERT_STATEMENT TokenNamereturn pushOnElementStack K_INSIDE_RETURN_STATEMENT bracketDepth TokenNameMULTIPLY pushOnElementStack K_BINARY_OPERATOR TokenNameDIVIDE pushOnElementStack K_BINARY_OPERATOR TokenNameREMAINDER pushOnElementStack K_BINARY_OPERATOR TokenNamePLUS pushOnElementStack K_BINARY_OPERATOR TokenNameMINUS pushOnElementStack K_BINARY_OPERATOR
protected void consume Unary Expression int op super consume Unary Expression op pop Element K UNARY OPERATOR if expression Stack expression Ptr instanceof Unary Expression Unary Expression exp Unary Expression expression Stack expression Ptr if assist Node null exp expression assist Node assist Node Parent exp  consumeUnaryExpression consumeUnaryExpression popElement K_UNARY_OPERATOR expressionStack expressionPtr UnaryExpression UnaryExpression UnaryExpression expressionStack expressionPtr assistNode assistNode assistNodeParent
protected void consume Unary Expression int op boolean post super consume Unary Expression op post pop Element K UNARY OPERATOR if expression Stack expression Ptr instanceof Unary Expression Unary Expression exp Unary Expression expression Stack expression Ptr if assist Node null exp expression assist Node assist Node Parent exp  consumeUnaryExpression consumeUnaryExpression popElement K_UNARY_OPERATOR expressionStack expressionPtr UnaryExpression UnaryExpression UnaryExpression expressionStack expressionPtr assistNode assistNode assistNodeParent
public Import Reference create Assist Import Reference char tokens long positions int mod return new Completion On Import Reference tokens positions mod  ImportReference createAssistImportReference CompletionOnImportReference
return new Completion On Import Reference tokens positions mod public Import Reference create Assist Package Reference char tokens long positions return new Completion On Package Reference tokens positions  CompletionOnImportReference ImportReference createAssistPackageReference CompletionOnPackageReference
public Name Reference create Qualified Assist Name Reference char previous Identifiers char assist Name long positions return new Completion On Qualified Name Reference previous Identifiers assist Name positions  NameReference createQualifiedAssistNameReference previousIdentifiers assistName CompletionOnQualifiedNameReference previousIdentifiers assistName
public Type Reference create Qualified Assist Type Reference char previous Identifiers char assist Name long positions switch top Known Element Kind COMPLETION OR ASSIST PARSER case K NEXT TYPEREF IS EXCEPTION return new Completion On Qualified Exception Reference previous Identifiers assist Name positions case K NEXT TYPEREF IS CLASS return new Completion On Qualified Class Reference previous Identifiers assist Name positions case K NEXT TYPEREF IS INTERFACE return new Completion On Qualified Interface Reference previous Identifiers assist Name positions default return new Completion On Qualified Type Reference previous Identifiers assist Name positions  TypeReference createQualifiedAssistTypeReference previousIdentifiers assistName topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_NEXT_TYPEREF_IS_EXCEPTION CompletionOnQualifiedExceptionReference previousIdentifiers assistName K_NEXT_TYPEREF_IS_CLASS CompletionOnQualifiedClassReference previousIdentifiers assistName K_NEXT_TYPEREF_IS_INTERFACE CompletionOnQualifiedInterfaceReference previousIdentifiers assistName CompletionOnQualifiedTypeReference previousIdentifiers assistName
public Name Reference create Single Assist Name Reference char assist Name long position int kind top Known Element Kind COMPLETION OR ASSIST PARSER if is Inside Method return new Completion On Single Name Reference assist Name position else boolean can Be Explicit Constructor Call false if kind K BLOCK DELIMITER previous Kind K BLOCK DELIMITER previous Info DO return new Completion On Keyword3 assist Name position Keywords WHILE else if kind K BLOCK DELIMITER previous Kind K BLOCK DELIMITER previous Info TRY return new Completion On Keyword3 assist Name position new char Keywords CATCH Keywords FINALLY else if kind K BLOCK DELIMITER top Known Element Info COMPLETION OR ASSIST PARSER SWITCH return new Completion On Keyword3 assist Name position new char Keywords CASE Keywords DEFAULT else char keywords new char Keywords COUNT int count 0 if last Modifiers Acc Static 0 keywords count Keywords SUPER keywords count Keywords THIS keywords count Keywords NEW if kind K BLOCK DELIMITER if can Be Explicit Constructor YES can Be Explicit Constructor Call true keywords count Keywords ASSERT keywords count Keywords DO keywords count Keywords FOR keywords count Keywords IF keywords count Keywords RETURN keywords count Keywords SWITCH keywords count Keywords SYNCHRONIZED keywords count Keywords THROW keywords count Keywords TRY keywords count Keywords WHILE keywords count Keywords FINAL keywords count Keywords CLASS if previous Kind K BLOCK DELIMITER switch previous Info case IF keywords count Keywords ELSE break case CATCH keywords count Keywords CATCH keywords count Keywords FINALLY break if is Inside Loop keywords count Keywords CONTINUE if is Inside Breakable keywords count Keywords BREAK else if kind K BETWEEN CASE AND COLON kind K BETWEEN DEFAULT AND COLON keywords count Keywords TRUE keywords count Keywords FALSE keywords count Keywords NULL if kind K SWITCH LABEL if top Known Element Info COMPLETION OR ASSIST PARSER DEFAULT keywords count Keywords DEFAULT keywords count Keywords BREAK keywords count Keywords CASE System arraycopy keywords 0 keywords new char count 0 count return new Completion On Single Name Reference assist Name position keywords can Be Explicit Constructor Call  NameReference createSingleAssistNameReference assistName topKnownElementKind COMPLETION_OR_ASSIST_PARSER isInsideMethod CompletionOnSingleNameReference assistName canBeExplicitConstructorCall K_BLOCK_DELIMITER previousKind K_BLOCK_DELIMITER previousInfo CompletionOnKeyword3 assistName K_BLOCK_DELIMITER previousKind K_BLOCK_DELIMITER previousInfo CompletionOnKeyword3 assistName K_BLOCK_DELIMITER topKnownElementInfo COMPLETION_OR_ASSIST_PARSER CompletionOnKeyword3 assistName lastModifiers AccStatic K_BLOCK_DELIMITER canBeExplicitConstructor canBeExplicitConstructorCall previousKind K_BLOCK_DELIMITER previousInfo isInsideLoop isInsideBreakable K_BETWEEN_CASE_AND_COLON K_BETWEEN_DEFAULT_AND_COLON K_SWITCH_LABEL topKnownElementInfo COMPLETION_OR_ASSIST_PARSER CompletionOnSingleNameReference assistName canBeExplicitConstructorCall
public Type Reference create Single Assist Type Reference char assist Name long position switch top Known Element Kind COMPLETION OR ASSIST PARSER case K NEXT TYPEREF IS EXCEPTION return new Completion On Exception Reference assist Name position case K NEXT TYPEREF IS CLASS return new Completion On Class Reference assist Name position case K NEXT TYPEREF IS INTERFACE return new Completion On Interface Reference assist Name position default return new Completion On Single Type Reference assist Name position  TypeReference createSingleAssistTypeReference assistName topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_NEXT_TYPEREF_IS_EXCEPTION CompletionOnExceptionReference assistName K_NEXT_TYPEREF_IS_CLASS CompletionOnClassReference assistName K_NEXT_TYPEREF_IS_INTERFACE CompletionOnInterfaceReference assistName CompletionOnSingleTypeReference assistName
public Compilation Unit Declaration diet Parse I Compilation Unit source Unit Compilation Result compilation Result int cursor Loc this cursor Location cursor Loc Completion Scanner completion Scanner Completion Scanner this scanner completion Scanner completion Identifier null completion Scanner cursor Location cursor Loc return this diet Parse source Unit compilation Result  CompilationUnitDeclaration dietParse ICompilationUnit sourceUnit CompilationResult compilationResult cursorLoc cursorLocation cursorLoc CompletionScanner completionScanner CompletionScanner completionScanner completionIdentifier completionScanner cursorLocation cursorLoc dietParse sourceUnit compilationResult
public void flush Assist State super flush Assist State this is Orphan Completion Node false assist Node Parent null Completion Scanner completion Scanner Completion Scanner this scanner completion Scanner completed Identifier Start 0 completion Scanner completed Identifier End 1  flushAssistState flushAssistState isOrphanCompletionNode assistNodeParent CompletionScanner completionScanner CompletionScanner completionScanner completedIdentifierStart completionScanner completedIdentifierEnd
protected Name Reference get Unspecified Reference Optimized if this identifier Length Stack this identifier Length Ptr 1 reducing a qualified name potential receiver is being poped so reset potential receiver this invocation Type NO RECEIVER this qualifier 1 return super get Unspecified Reference Optimized  NameReference getUnspecifiedReferenceOptimized identifierLengthStack identifierLengthPtr invocationType NO_RECEIVER getUnspecifiedReferenceOptimized
return super get Unspecified Reference Optimized public void initialize super initialize this initialize For Block Statements  getUnspecifiedReferenceOptimized initializeForBlockStatements
private void initialize For Block Statements this previous Token 1 this previous Identifier Ptr 1 this bracket Depth 0 this invocation Type NO RECEIVER this qualifier 1 pop Until Element K SWITCH LABEL if top Known Element Kind COMPLETION OR ASSIST PARSER K SWITCH LABEL this pop Until Element K BLOCK DELIMITER  initializeForBlockStatements previousToken previousIdentifierPtr bracketDepth invocationType NO_RECEIVER popUntilElement K_SWITCH_LABEL topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_SWITCH_LABEL popUntilElement K_BLOCK_DELIMITER
public void initialize Scanner this scanner new Completion Scanner this options source Level  initializeScanner CompletionScanner sourceLevel
Returns whether the completion is just after an array type eg String cursor private boolean is After Array Type TBD The following relies on the fact that array dimensions are small it says that if the top of the int Stack is less than 11 then it must be a dimension smallest position of array type in a compilation unit is 11 as in class X Y if this int Ptr 1 this int Stack this int Ptr 11 return true return false  isAfterArrayType intStack intPtr intStack intPtr
private boolean is Empty Name Completion return this assist Node null this assist Node instanceof Completion On Single Name Reference Completion On Single Name Reference this assist Node token length 0  isEmptyNameCompletion assistNode assistNode CompletionOnSingleNameReference CompletionOnSingleNameReference assistNode
protected boolean is Indirectly Inside Block int i element Ptr while i 1 if element Kind Stack i K BLOCK DELIMITER return true i return false  isIndirectlyInsideBlock elementPtr elementKindStack K_BLOCK_DELIMITER
protected boolean is Inside Block int i element Ptr while i 1 switch element Kind Stack i case K TYPE DELIMITER return false case K METHOD DELIMITER return false case K FIELD INITIALIZER DELIMITER return false case K BLOCK DELIMITER return true i return false  isInsideBlock elementPtr elementKindStack K_TYPE_DELIMITER K_METHOD_DELIMITER K_FIELD_INITIALIZER_DELIMITER K_BLOCK_DELIMITER
protected boolean is Inside Breakable int i element Ptr while i 1 switch element Kind Stack i case K TYPE DELIMITER return false case K METHOD DELIMITER return false case K FIELD INITIALIZER DELIMITER return false case K SWITCH LABEL return true case K BLOCK DELIMITER switch element Info Stack i case FOR case DO case WHILE return true i return false  isInsideBreakable elementPtr elementKindStack K_TYPE_DELIMITER K_METHOD_DELIMITER K_FIELD_INITIALIZER_DELIMITER K_SWITCH_LABEL K_BLOCK_DELIMITER elementInfoStack
protected boolean is Inside Loop int i element Ptr while i 1 switch element Kind Stack i case K TYPE DELIMITER return false case K METHOD DELIMITER return false case K FIELD INITIALIZER DELIMITER return false case K BLOCK DELIMITER switch element Info Stack i case FOR case DO case WHILE return true i return false  isInsideLoop elementPtr elementKindStack K_TYPE_DELIMITER K_METHOD_DELIMITER K_FIELD_INITIALIZER_DELIMITER K_BLOCK_DELIMITER elementInfoStack
protected boolean is Inside Return int i element Ptr while i 1 switch element Kind Stack i case K TYPE DELIMITER return false case K METHOD DELIMITER return false case K FIELD INITIALIZER DELIMITER return false case K BLOCK DELIMITER return false case K INSIDE RETURN STATEMENT return true i return false  isInsideReturn elementPtr elementKindStack K_TYPE_DELIMITER K_METHOD_DELIMITER K_FIELD_INITIALIZER_DELIMITER K_BLOCK_DELIMITER K_INSIDE_RETURN_STATEMENT
public Compilation Unit Declaration parse I Compilation Unit source Unit Compilation Result compilation Result int cursor Loc this cursor Location cursor Loc Completion Scanner completion Scanner Completion Scanner this scanner completion Scanner completion Identifier null completion Scanner cursor Location cursor Loc return this parse source Unit compilation Result  CompilationUnitDeclaration ICompilationUnit sourceUnit CompilationResult compilationResult cursorLoc cursorLocation cursorLoc CompletionScanner completionScanner CompletionScanner completionScanner completionIdentifier completionScanner cursorLocation cursorLoc sourceUnit compilationResult
public void parse Block Statements Constructor Declaration cd Compilation Unit Declaration unit can Be Explicit Constructor 1 super parse Block Statements cd unit  parseBlockStatements ConstructorDeclaration CompilationUnitDeclaration canBeExplicitConstructor parseBlockStatements
protected void prepare For Block Statements this nested Method this nested Type 0 1 this variables Counter this nested Type 0 this real Block Stack this real Block Ptr 1 0 this initialize For Block Statements  prepareForBlockStatements nestedMethod nestedType variablesCounter nestedType realBlockStack realBlockPtr initializeForBlockStatements
Creates a completion on member access node and push it on the expression stack private void push Completion On Member Access On Expression Stack boolean is Super Access char source identifier Stack identifier Ptr long pos identifier Position Stack identifier Ptr Completion On Member Access fr new Completion On Member Access source pos this assist Node fr this last Check Point fr source End 1 identifier Length Ptr if is Super Access considerates the field Reference beginning at the super fr source Start int Stack int Ptr fr receiver new Super Reference fr source Start end Position push On Expression Stack fr else optimize push pop if fr receiver expression Stack expression Ptr is This fieldreference begins at the this fr source Start fr receiver source Start expression Stack expression Ptr fr  pushCompletionOnMemberAccessOnExpressionStack isSuperAccess identifierStack identifierPtr identifierPositionStack identifierPtr CompletionOnMemberAccess CompletionOnMemberAccess assistNode lastCheckPoint sourceEnd identifierLengthPtr isSuperAccess fieldReference sourceStart intStack intPtr SuperReference sourceStart endPosition pushOnExpressionStack expressionStack expressionPtr isThis sourceStart sourceStart expressionStack expressionPtr
public void record Completion On Reference if current Element instanceof Recovered Type Recovered Type recovered Type Recovered Type current Element filter out cases where scanner is still inside type header if recovered Type found Opening Brace return generate a pseudo field with a completion on type reference current Element add new Completion On Field Type this get Type Reference 0 false 0 return if diet return only record references attached to types  recordCompletionOnReference currentElement RecoveredType RecoveredType recoveredType RecoveredType currentElement recoveredType foundOpeningBrace currentElement CompletionOnFieldType getTypeReference
public void recovery Exit From Variable if current Element null current Element instanceof Recovered Local Variable Recovered Element old Element current Element super recovery Exit From Variable if old Element current Element pop Element K LOCAL INITIALIZER DELIMITER else super recovery Exit From Variable  recoveryExitFromVariable currentElement currentElement RecoveredLocalVariable RecoveredElement oldElement currentElement recoveryExitFromVariable oldElement currentElement popElement K_LOCAL_INITIALIZER_DELIMITER recoveryExitFromVariable
public void recovery Token Check Recovered Element old Element current Element switch current Token case Token NameRBRACE super recovery Token Check if current Element old Element old Element instanceof Recovered Block pop Element K BLOCK DELIMITER break case Token Namecase super recovery Token Check if top Known Element Kind COMPLETION OR ASSIST PARSER K BLOCK DELIMITER top Known Element Info COMPLETION OR ASSIST PARSER SWITCH push On Element Stack K SWITCH LABEL break case Token Namedefault super recovery Token Check if top Known Element Kind COMPLETION OR ASSIST PARSER K BLOCK DELIMITER top Known Element Info COMPLETION OR ASSIST PARSER SWITCH push On Element Stack K SWITCH LABEL DEFAULT else if top Known Element Kind COMPLETION OR ASSIST PARSER K SWITCH LABEL pop Element K SWITCH LABEL push On Element Stack K SWITCH LABEL DEFAULT break default super recovery Token Check break  recoveryTokenCheck RecoveredElement oldElement currentElement currentToken TokenNameRBRACE recoveryTokenCheck currentElement oldElement oldElement RecoveredBlock popElement K_BLOCK_DELIMITER TokenNamecase recoveryTokenCheck topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_BLOCK_DELIMITER topKnownElementInfo COMPLETION_OR_ASSIST_PARSER pushOnElementStack K_SWITCH_LABEL TokenNamedefault recoveryTokenCheck topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_BLOCK_DELIMITER topKnownElementInfo COMPLETION_OR_ASSIST_PARSER pushOnElementStack K_SWITCH_LABEL topKnownElementKind COMPLETION_OR_ASSIST_PARSER K_SWITCH_LABEL popElement K_SWITCH_LABEL pushOnElementStack K_SWITCH_LABEL recoveryTokenCheck
public void reset super reset this cursor Location 0  cursorLocation
public void reset After Completion this cursor Location 0 this flush Assist State  resetAfterCompletion cursorLocation flushAssistState
protected boolean resume After Recovery if this assist Node null if reached eof inside method body but still inside nested type or inside a field initializer should continue in diet mode until the end of the method body or compilation unit if scanner eof Position cursor Location 1 reference Context instanceof Compilation Unit Declaration is Indirectly Inside Field Initialization assist Node Parent instanceof Field Declaration assist Node Parent instanceof Initializer disabled since does not handle possible field message refs that is Obj ASSIST HERE ect register Natives consume extra tokens which were part of the qualified reference so that the replaced source comprises them as well if this assist Node instanceof Name Reference int old Eof scanner eof Position scanner eof Position current Element top Element source End 1 scanner current Position this cursor Location 1 int token 1 try do first token might not have to be a dot if token 0 this completion Behind Dot if token scanner get Next Token Token NameDOT break if token scanner get Next Token Token Name Identifier break this assist Node source End scanner current Position 1 while token Token NameEOF catch Invalid Input Exception e finally scanner eof Position old Eof restart in diet mode for finding sibling constructs if current Element instanceof Recovered Type current Element enclosing Type null if last Check Point this assist Node source End last Check Point this assist Node source End 1 int end current Element top Element source End scanner eof Position end Integer MAX VALUE end 1 end else this reset Stacks return false return super resume After Recovery  resumeAfterRecovery assistNode eofPosition cursorLocation referenceContext CompilationUnitDeclaration isIndirectlyInsideFieldInitialization assistNodeParent FieldDeclaration assistNodeParent registerNatives assistNode NameReference oldEof eofPosition eofPosition currentElement topElement sourceEnd currentPosition cursorLocation completionBehindDot getNextToken TokenNameDOT getNextToken TokenNameIdentifier assistNode sourceEnd currentPosition TokenNameEOF InvalidInputException eofPosition oldEof currentElement RecoveredType currentElement enclosingType lastCheckPoint assistNode sourceEnd lastCheckPoint assistNode sourceEnd currentElement topElement sourceEnd eofPosition MAX_VALUE resetStacks resumeAfterRecovery
return super resume After Recovery public void set Assist Identifier char assist Ident Completion Scanner scanner completion Identifier assist Ident  resumeAfterRecovery setAssistIdentifier assistIdent CompletionScanner completionIdentifier assistIdent
public String to String String s NON NLS 1 s s element Kind Stack int NON NLS 1 for int i 0 i element Ptr i s s String value Of element Kind Stack i NON NLS 1 NON NLS 2 s s n NON NLS 1 s s element Info Stack int NON NLS 1 for int i 0 i element Ptr i s s String value Of element Info Stack i NON NLS 1 NON NLS 2 s s n NON NLS 1 return s super to String  toString elementKindStack elementPtr valueOf elementKindStack elementInfoStack elementPtr valueOf elementInfoStack toString
protected void update Recovery State expose parser state to recovery state current Element update From Parser State may be able to retrieve completion Node as an orphan and then attach it this completion Identifier Check this attach Orphan Completion Node if an assist node has been found and a recovered element exists mark enclosing blocks as to be preserved if this assist Node null this current Element null current Element preserve Enclosing Blocks check and update recovered state based on current token this action is also performed when shifting token after recovery got activated once this recovery Token Check this recovery Exit From Variable  updateRecoveryState currentElement updateFromParserState completionNode completionIdentifierCheck attachOrphanCompletionNode assistNode currentElement currentElement preserveEnclosingBlocks recoveryTokenCheck recoveryExitFromVariable
protected Local Declaration create Local Declaration char assist Name int source Start int source End if this index Of Assist Identifier 0 return super create Local Declaration assist Name source Start source End else Completion On Local Name local new Completion On Local Name assist Name source Start source End this assist Node local this last Check Point source End 1 return local  LocalDeclaration createLocalDeclaration assistName sourceStart sourceEnd indexOfAssistIdentifier createLocalDeclaration assistName sourceStart sourceEnd CompletionOnLocalName CompletionOnLocalName assistName sourceStart sourceEnd assistNode lastCheckPoint sourceEnd
protected Field Declaration create Field Declaration char assist Name int source Start int source End if this index Of Assist Identifier 0 current Element instanceof Recovered Unit Recovered Unit current Element type Count 0 return super create Field Declaration assist Name source Start source End else Completion On Field Name field new Completion On Field Name assist Name source Start source End this assist Node field this last Check Point source End 1 return field  FieldDeclaration createFieldDeclaration assistName sourceStart sourceEnd indexOfAssistIdentifier currentElement RecoveredUnit RecoveredUnit currentElement typeCount createFieldDeclaration assistName sourceStart sourceEnd CompletionOnFieldName CompletionOnFieldName assistName sourceStart sourceEnd assistNode lastCheckPoint sourceEnd

public static final char Empty Completion Identifier public Completion Scanner long source Level super false comment false whitespace false nls source Level null task Tags null task Priorities true task Case Sensitive  EmptyCompletionIdentifier CompletionScanner sourceLevel sourceLevel taskTags taskPriorities taskCaseSensitive
public char get Current Identifier Source if this completion Identifier null if this cursor Location this start Position this current Position this start Position fake empty identifier got issued remember actual identifier positions this completed Identifier Start this start Position this completed Identifier End this completed Identifier Start 1 return this completion Identifier Empty Completion Identifier if this cursor Location 1 this start Position this cursor Location this current Position remember actual identifier positions this completed Identifier Start this start Position this completed Identifier End this current Position 1 if this without Unicode Ptr 0 check unicode scenario System arraycopy this without Unicode Buffer 1 this completion Identifier new char this without Unicode Ptr 0 this without Unicode Ptr else int length this cursor Location 1 this start Position no char sharing around completion Identifier we want it to be unique so as to use identity checks System arraycopy this source this start Position this completion Identifier new char length 0 length return this completion Identifier return super get Current Identifier Source  getCurrentIdentifierSource completionIdentifier cursorLocation startPosition currentPosition startPosition completedIdentifierStart startPosition completedIdentifierEnd completedIdentifierStart completionIdentifier EmptyCompletionIdentifier cursorLocation startPosition cursorLocation currentPosition completedIdentifierStart startPosition completedIdentifierEnd currentPosition withoutUnicodePtr withoutUnicodeBuffer completionIdentifier withoutUnicodePtr withoutUnicodePtr cursorLocation startPosition completionIdentifier startPosition completionIdentifier completionIdentifier getCurrentIdentifierSource
public boolean get Next Char As Java Identifier Part if this current Position this source length handle the obvious case upfront return false int temp this current Position try if this current Character this source this current Position this source this current Position u unicode traitement int c1 c2 c3 c4 int unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 this current Position temp return false this current Character char c1 16 c2 16 c3 16 c4 if Character is Java Identifier Part this current Character this current Position temp return false need the unicode buffer if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position unicode Size this start Position if temp this cursor Location this cursor Location this current Position 1 throw new Invalid Cursor Location Invalid Cursor Location NO COMPLETION INSIDE UNICODE store the current unicode only if we did not pass the cursor location Note this does not handle cases where the cursor is in the middle of a unicode if this completion Identifier null this start Position this cursor Location 1 this cursor Location this current Position 1 unicode Store At this without Unicode Ptr return true end unicode traitement else if Character is Java Identifier Part this current Character this current Position temp return false if this without Unicode Ptr 0 store the current unicode only if we did not pass the cursor location Note this does not handle cases where the cursor is in the middle of a unicode if this completion Identifier null this start Position this cursor Location 1 this cursor Location this current Position 1 unicode Store At this without Unicode Ptr return true catch Index Out Of Bounds Exception e this current Position temp return false  getNextCharAsJavaIdentifierPart currentPosition currentPosition currentCharacter currentPosition currentPosition unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentPosition currentCharacter isJavaIdentifierPart currentCharacter currentPosition withoutUnicodePtr unicodeInitializeBuffer currentPosition unicodeSize startPosition cursorLocation cursorLocation currentPosition InvalidCursorLocation InvalidCursorLocation NO_COMPLETION_INSIDE_UNICODE completionIdentifier startPosition cursorLocation cursorLocation currentPosition unicodeStoreAt withoutUnicodePtr isJavaIdentifierPart currentCharacter currentPosition withoutUnicodePtr completionIdentifier startPosition cursorLocation cursorLocation currentPosition unicodeStoreAt withoutUnicodePtr IndexOutOfBoundsException currentPosition
public int get Next Token throws Invalid Input Exception this was Acr false if this diet jump Over Method Body this diet false return this current Position this source length Token NameEOF Token NameRBRACE try while true loop for jumping over comments this without Unicode Ptr 0 start with a new token even comment written with unicode Consume white space and handles start position int white Start this current Position boolean is White Space do this start Position this current Position if this current Character this source this current Position this source this current Position u is White Space jump Over Unicode White Space else if this record Line Separator this current Character r this current Character n push Line Separator is White Space this current Character Char Operation is Whitespace this current Character completion requesting strictly inside blanks if white Start this current Position previous Token Token NameDOT this completion Identifier null white Start this cursor Location 1 this cursor Location this start Position Character is Java Identifier Start this current Character this current Position this start Position for next token read return Token Name Identifier while is White Space if this tokenize White Space white Start this current Position 1 reposition scanner in case we are interested by spaces as tokens this current Position this start Position white Start return Token NameWHITESPACE little trick to get out in the middle of a source computation if this current Position this eof Position might be completing at eof e g behind a dot if this completion Identifier null this start Position this cursor Location 1 compute end of empty identifier if the empty identifier is at the start of a next token the end of empty identifier is the end of the next token eg empty token next while get Next Char As Java Identifier Part empty this end Of Empty Token this current Position 1 this current Position this start Position for being detected as empty free identifier return Token Name Identifier return Token NameEOF Identify the next token switch this current Character case return Token NameLPAREN case return Token NameRPAREN case return Token NameLBRACE case return Token NameRBRACE case return Token NameLBRACKET case return Token NameRBRACKET case return Token NameSEMICOLON case return Token NameCOMMA case if this start Position this cursor Location this cursor Location this current Position return Token NameDOT completion inside 12 if get Next Char As Digit return scan Number true return Token NameDOT case int test if test get Next Char 0 return TokenNamePLUS PLUS if test 0 return TokenNamePLUS EQUAL return Token NamePLUS case int test if test get Next Char 0 return TokenNameMINUS MINUS if test 0 return TokenNameMINUS EQUAL return Token NameMINUS case return Token NameTWIDDLE case if get Next Char return TokenNameNOT EQUAL return Token NameNOT case if get Next Char return TokenNameMULTIPLY EQUAL return Token NameMULTIPLY case if get Next Char return TokenNameREMAINDER EQUAL return Token NameREMAINDER case int test if test get Next Char 0 return TokenNameLESS EQUAL if test 0 if get Next Char return TokenNameLEFT SHIFT EQUAL return TokenNameLEFT SHIFT return Token NameLESS case int test if test get Next Char 0 return TokenNameGREATER EQUAL if test 0 if test get Next Char 0 return TokenNameRIGHT SHIFT EQUAL if test 0 if get Next Char return TokenNameUNSIGNED RIGHT SHIFT EQUAL return TokenNameUNSIGNED RIGHT SHIFT return TokenNameRIGHT SHIFT return Token NameGREATER case if get Next Char return TokenNameEQUAL EQUAL return Token NameEQUAL case int test if test get Next Char 0 return TokenNameAND AND if test 0 return TokenNameAND EQUAL return Token NameAND case int test if test get Next Char 0 return TokenNameOR OR if test 0 return TokenNameOR EQUAL return Token NameOR case if get Next Char return TokenNameXOR EQUAL return Token NameXOR case return Token NameQUESTION case return Token NameCOLON case int test if test get Next Char n r 0 throw new Invalid Input Exception INVALID CHARACTER CONSTANT if test 0 relocate if finding another quote fairly close thus unicode u000D will be fully consumed for int look Ahead 0 look Ahead 3 look Ahead if this current Position look Ahead this source length break if this source this current Position look Ahead n break if this source this current Position look Ahead this current Position look Ahead 1 break throw new Invalid Input Exception INVALID CHARACTER CONSTANT if get Next Char relocate if finding another quote fairly close thus unicode u000D will be fully consumed for int look Ahead 0 look Ahead 3 look Ahead if this current Position look Ahead this source length break if this source this current Position look Ahead n break if this source this current Position look Ahead this current Position look Ahead 1 break throw new Invalid Input Exception INVALID CHARACTER CONSTANT if get Next Char scan Escape Character else consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 this unicode Store At this without Unicode Ptr if get Next Char return Token Name Character Literal relocate if finding another quote fairly close thus unicode u000D will be fully consumed for int look Ahead 0 look Ahead 20 look Ahead if this current Position look Ahead this source length break if this source this current Position look Ahead n break if this source this current Position look Ahead this current Position look Ahead 1 break throw new Invalid Input Exception INVALID CHARACTER CONSTANT case try consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 this unicode Store At this without Unicode Ptr while this current Character r and n are not valid in string literals if this current Character n this current Character r relocate if finding another quote fairly close thus unicode u000D will be fully consumed for int look Ahead 0 look Ahead 50 look Ahead if this current Position look Ahead this source length break if this source this current Position look Ahead n break if this source this current Position look Ahead this current Position look Ahead 1 break throw new Invalid Input Exception INVALID CHAR IN STRING if this current Character int escape Size this current Position boolean back Slash As Unicode In String this unicode As Back Slash scan Escape Character make a side effect on this value and we need the previous value few lines down this one scan Escape Character escape Size this current Position escape Size if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position escape Size 1 this start Position this unicode Store At this without Unicode Ptr else overwrite the in the buffer this unicode Store At this without Unicode Ptr if back Slash As Unicode In String there are TWO in the stream where only one is correct this without Unicode Ptr consume next character this unicode As Back Slash f getNextToken InvalidInputException wasAcr jumpOverMethodBody currentPosition TokenNameEOF TokenNameRBRACE withoutUnicodePtr whiteStart currentPosition isWhiteSpace startPosition currentPosition currentCharacter currentPosition currentPosition isWhiteSpace jumpOverUnicodeWhiteSpace recordLineSeparator currentCharacter currentCharacter pushLineSeparator isWhiteSpace currentCharacter CharOperation isWhitespace currentCharacter whiteStart currentPosition previousToken TokenNameDOT completionIdentifier whiteStart cursorLocation cursorLocation startPosition isJavaIdentifierStart currentCharacter currentPosition startPosition TokenNameIdentifier isWhiteSpace tokenizeWhiteSpace whiteStart currentPosition currentPosition startPosition whiteStart TokenNameWHITESPACE currentPosition eofPosition completionIdentifier startPosition cursorLocation getNextCharAsJavaIdentifierPart endOfEmptyToken currentPosition currentPosition startPosition TokenNameIdentifier TokenNameEOF currentCharacter TokenNameLPAREN TokenNameRPAREN TokenNameLBRACE TokenNameRBRACE TokenNameLBRACKET TokenNameRBRACKET TokenNameSEMICOLON TokenNameCOMMA startPosition cursorLocation cursorLocation currentPosition TokenNameDOT getNextCharAsDigit scanNumber TokenNameDOT getNextChar TokenNamePLUS_PLUS TokenNamePLUS_EQUAL TokenNamePLUS getNextChar TokenNameMINUS_MINUS TokenNameMINUS_EQUAL TokenNameMINUS TokenNameTWIDDLE getNextChar TokenNameNOT_EQUAL TokenNameNOT getNextChar TokenNameMULTIPLY_EQUAL TokenNameMULTIPLY getNextChar TokenNameREMAINDER_EQUAL TokenNameREMAINDER getNextChar TokenNameLESS_EQUAL getNextChar TokenNameLEFT_SHIFT_EQUAL TokenNameLEFT_SHIFT TokenNameLESS getNextChar TokenNameGREATER_EQUAL getNextChar TokenNameRIGHT_SHIFT_EQUAL getNextChar TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL TokenNameUNSIGNED_RIGHT_SHIFT TokenNameRIGHT_SHIFT TokenNameGREATER getNextChar TokenNameEQUAL_EQUAL TokenNameEQUAL getNextChar TokenNameAND_AND TokenNameAND_EQUAL TokenNameAND getNextChar TokenNameOR_OR TokenNameOR_EQUAL TokenNameOR getNextChar TokenNameXOR_EQUAL TokenNameXOR TokenNameQUESTION TokenNameCOLON getNextChar InvalidInputException INVALID_CHARACTER_CONSTANT lookAhead lookAhead lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead InvalidInputException INVALID_CHARACTER_CONSTANT getNextChar lookAhead lookAhead lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead InvalidInputException INVALID_CHARACTER_CONSTANT getNextChar scanEscapeCharacter unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr getNextChar TokenNameCharacterLiteral lookAhead lookAhead lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead InvalidInputException INVALID_CHARACTER_CONSTANT unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr currentCharacter currentCharacter currentCharacter lookAhead lookAhead lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead InvalidInputException INVALID_CHAR_IN_STRING currentCharacter escapeSize currentPosition backSlashAsUnicodeInString unicodeAsBackSlash scanEscapeCharacter scanEscapeCharacter escapeSize currentPosition escapeSize withoutUnicodePtr unicodeInitializeBuffer currentPosition escapeSize startPosition unicodeStoreAt withoutUnicodePtr unicodeStoreAt withoutUnicodePtr backSlashAsUnicodeInString withoutUnicodePtr unicodeAsBackSlash
public int scan Identifier Or Keyword int id super scan Identifier Or Keyword convert completed keyword into an identifier if id Token Name Identifier this start Position this cursor Location 1 this cursor Location this current Position return Token Name Identifier return id  scanIdentifierOrKeyword scanIdentifierOrKeyword TokenNameIdentifier startPosition cursorLocation cursorLocation currentPosition TokenNameIdentifier
public int scan Number boolean dot Prefix throws Invalid Input Exception int token super scan Number dot Prefix consider completion just before a number to be ok will insert before it if this start Position this cursor Location this cursor Location this current Position throw new Invalid Cursor Location Invalid Cursor Location NO COMPLETION INSIDE NUMBER return token  scanNumber dotPrefix InvalidInputException scanNumber dotPrefix startPosition cursorLocation cursorLocation currentPosition InvalidCursorLocation InvalidCursorLocation NO_COMPLETION_INSIDE_NUMBER

public static final String NO COMPLETION INSIDE NUMBER No Completion Inside Number NON NLS 1 public Invalid Cursor Location String irritant this irritant irritant  NO_COMPLETION_INSIDE_NUMBER InvalidCursorLocation

static Invocation Site Fake Invocation Site new Invocation Site public boolean is Super Access return false  InvocationSite FakeInvocationSite InvocationSite isSuperAccess
static Invocation Site Fake Invocation Site new Invocation Site public boolean is Super Access return false public boolean is Type Access return false  InvocationSite FakeInvocationSite InvocationSite isSuperAccess isTypeAccess
public boolean is Super Access return false public boolean is Type Access return false public void set Actual Receiver Type Reference Binding receiver Type  isSuperAccess isTypeAccess setActualReceiverType ReferenceBinding receiverType
public boolean is Type Access return false public void set Actual Receiver Type Reference Binding receiver Type public void set Depth int depth  isTypeAccess setActualReceiverType ReferenceBinding receiverType setDepth
public void set Actual Receiver Type Reference Binding receiver Type public void set Depth int depth public void set Field Index int depth  setActualReceiverType ReferenceBinding receiverType setDepth setFieldIndex
public void set Depth int depth public void set Field Index int depth public int source Start return 0  setDepth setFieldIndex sourceStart
public void set Field Index int depth public int source Start return 0 public int source End return 0  setFieldIndex sourceStart sourceEnd
public I Problem create Problem char originating File Name int problem Id String problem Arguments String message Arguments int severity int start int end int line Number I Problem pb super create Problem originating File Name problem Id problem Arguments message Arguments severity start end line Number TODO david problems could be detected in other units which got requested see Compilation Unit Problem Finder if actual Completion Position start last Error Start start pb is Error pb getID I Problem Syntax 0 Completion Engine this problem pb last Error Start start return pb  IProblem createProblem originatingFileName problemId problemArguments messageArguments lineNumber IProblem createProblem originatingFileName problemId problemArguments messageArguments lineNumber CompilationUnitProblemFinder actualCompletionPosition lastErrorStart isError IProblem CompletionEngine lastErrorStart
The Completion Engine is responsible for computing source completions It requires a searchable name environment which supports some specific search AP Is and a requestor to feed back the results to a UI param name Environment org eclipse jdt internal codeassist I Searchable Name Environment used to resolve type package references and search for types packages based on partial names param requestor org eclipse jdt internal codeassist I Completion Requestor since the engine might produce answers of various forms the engine is associated with a requestor able to accept all possible completions param settings java util Map set of options used to configure the code assist engine public Completion Engine I Searchable Name Environment name Environment I Completion Requestor requestor Map settings I Java Project java Project super settings this java Project java Project this requestor requestor this name Environment name Environment this type Cache new Hashtable Of Object 5 problem Reporter new Problem Reporter Default Error Handling Policies proceed With All Problems this compiler Options new Default Problem Factory Locale get Default int last Error Start public I Problem create Problem char originating File Name int problem Id String problem Arguments String message Arguments int severity int start int end int line Number I Problem pb super create Problem originating File Name problem Id problem Arguments message Arguments severity start end line Number TODO david problems could be detected in other units which got requested see Compilation Unit Problem Finder if actual Completion Position start last Error Start start pb is Error pb getID I Problem Syntax 0 Completion Engine this problem pb last Error Start start return pb this lookup Environment new Lookup Environment this this compiler Options problem Reporter name Environment this parser new Completion Parser problem Reporter this name Scanner new Scanner false comment false whitespace false nls this compiler Options source Level null task Tags null task Priorities true task Case Sensitive  CompletionEngine APIs nameEnvironment ISearchableNameEnvironment ICompletionRequestor CompletionEngine ISearchableNameEnvironment nameEnvironment ICompletionRequestor IJavaProject javaProject javaProject javaProject nameEnvironment nameEnvironment typeCache HashtableOfObject problemReporter ProblemReporter DefaultErrorHandlingPolicies proceedWithAllProblems compilerOptions DefaultProblemFactory getDefault lastErrorStart IProblem createProblem originatingFileName problemId problemArguments messageArguments lineNumber IProblem createProblem originatingFileName problemId problemArguments messageArguments lineNumber CompilationUnitProblemFinder actualCompletionPosition lastErrorStart isError IProblem CompletionEngine lastErrorStart lookupEnvironment LookupEnvironment compilerOptions problemReporter nameEnvironment CompletionParser problemReporter nameScanner compilerOptions sourceLevel taskTags taskPriorities taskCaseSensitive
One result of the search consists of a new class NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array public void accept Class char package Name char class Name int modifiers char fully Qualified Name Char Operation concat package Name class Name char completion Name fully Qualified Name if this known Types contains Key completion Name return this known Types put completion Name this boolean is Qualified true int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal if resolving Imports completion Name Char Operation concat completion Name SEMICOLON relevance compute Relevance For Case Matching completion Token fully Qualified Name else if must Qualify Type package Name class Name if package Name null package Name length 0 if unit Scope null unit Scope f Package compound Name Char Operation NO CHAR CHAR return ignore types from the default package from outside it else completion Name class Name is Qualified false relevance compute Relevance For Case Matching completion Token class Name relevance compute Relevance For Expecting Type package Name class Name relevance compute Relevance For Class relevance compute Relevance For Exception class Name relevance compute Relevance For Qualification is Qualified no Proposal false requestor accept Class package Name class Name completion Name modifiers start Position offset end Position offset relevance  acceptClass packageName className fullyQualifiedName CharOperation packageName className completionName fullyQualifiedName knownTypes containsKey completionName knownTypes completionName isQualified computeBaseRelevance computeRelevanceForInterestingProposal resolvingImports completionName CharOperation completionName computeRelevanceForCaseMatching completionToken fullyQualifiedName mustQualifyType packageName className packageName packageName unitScope unitScope fPackage compoundName CharOperation NO_CHAR_CHAR completionName className isQualified computeRelevanceForCaseMatching completionToken className computeRelevanceForExpectingType packageName className computeRelevanceForClass computeRelevanceForException className computeRelevanceForQualification isQualified noProposal acceptClass packageName className completionName startPosition endPosition
One result of the search consists of a new interface NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A I The default package is represented by an empty array public void accept Interface char package Name char interface Name int modifiers char fully Qualified Name Char Operation concat package Name interface Name char completion Name fully Qualified Name if this known Types contains Key completion Name return this known Types put completion Name this boolean is Qualified true int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal if resolving Imports completion Name Char Operation concat completion Name new char relevance compute Relevance For Case Matching completion Token fully Qualified Name else if must Qualify Type package Name interface Name if package Name null package Name length 0 if unit Scope null unit Scope f Package compound Name Char Operation NO CHAR CHAR return ignore types from the default package from outside it else completion Name interface Name is Qualified false relevance compute Relevance For Case Matching completion Token interface Name relevance compute Relevance For Expecting Type package Name interface Name relevance compute Relevance For Interface relevance compute Relevance For Qualification is Qualified no Proposal false requestor accept Interface package Name interface Name completion Name modifiers start Position offset end Position offset relevance  acceptInterface packageName interfaceName fullyQualifiedName CharOperation packageName interfaceName completionName fullyQualifiedName knownTypes containsKey completionName knownTypes completionName isQualified computeBaseRelevance computeRelevanceForInterestingProposal resolvingImports completionName CharOperation completionName computeRelevanceForCaseMatching completionToken fullyQualifiedName mustQualifyType packageName interfaceName packageName packageName unitScope unitScope fPackage compoundName CharOperation NO_CHAR_CHAR completionName interfaceName isQualified computeRelevanceForCaseMatching completionToken interfaceName computeRelevanceForExpectingType packageName interfaceName computeRelevanceForInterface computeRelevanceForQualification isQualified noProposal acceptInterface packageName interfaceName completionName startPosition endPosition
One result of the search consists of a new package NOTE All package names are presented in their readable form Package names are in the form a b c The default package is represented by an empty array public void accept Package char package Name if this known Pkgs contains Key package Name return this known Pkgs put package Name this int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching qualified Completion Token null completion Token qualified Completion Token package Name relevance compute Relevance For Qualification true no Proposal false requestor accept Package package Name resolving Imports Char Operation concat package Name new char package Name start Position offset end Position offset relevance  acceptPackage packageName knownPkgs containsKey packageName knownPkgs packageName computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching qualifiedCompletionToken completionToken qualifiedCompletionToken packageName computeRelevanceForQualification noProposal acceptPackage packageName resolvingImports CharOperation packageName packageName startPosition endPosition
One result of the search consists of a new type NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array public void accept Type char package Name char type Name char fully Qualified Name Char Operation concat package Name type Name char completion Name fully Qualified Name if this known Types contains Key completion Name return this known Types put completion Name this boolean is Qualified true int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal if resolving Imports completion Name Char Operation concat completion Name new char relevance compute Relevance For Case Matching completion Token fully Qualified Name else if must Qualify Type package Name type Name if package Name null package Name length 0 if unit Scope null unit Scope f Package compound Name Char Operation NO CHAR CHAR return ignore types from the default package from outside it else completion Name type Name is Qualified false relevance compute Relevance For Case Matching completion Token type Name relevance compute Relevance For Expecting Type package Name type Name relevance compute Relevance For Qualification is Qualified no Proposal false requestor accept Type package Name type Name completion Name start Position offset end Position offset relevance  acceptType packageName typeName fullyQualifiedName CharOperation packageName typeName completionName fullyQualifiedName knownTypes containsKey completionName knownTypes completionName isQualified computeBaseRelevance computeRelevanceForInterestingProposal resolvingImports completionName CharOperation completionName computeRelevanceForCaseMatching completionToken fullyQualifiedName mustQualifyType packageName typeName packageName packageName unitScope unitScope fPackage compoundName CharOperation NO_CHAR_CHAR completionName typeName isQualified computeRelevanceForCaseMatching completionToken typeName computeRelevanceForExpectingType packageName typeName computeRelevanceForQualification isQualified noProposal acceptType packageName typeName completionName startPosition endPosition
private void complete AST Node ast Node AST Node ast Node Parent Binding qualified Binding Scope scope set Source Range ast Node source Start ast Node source End compute Uninteresting Bindings ast Node Parent scope if ast Node Parent null compute Expected Types ast Node Parent scope if ast Node instanceof Completion On Field Type Completion On Field Type field Completion On Field Type ast Node Completion On Single Type Reference type Completion On Single Type Reference field type completion Token type token set Source Range type source Start type source End find Types And Packages completion Token scope find Keywords For Member completion Token field modifiers if field is Local Variable field modifiers Compiler Modifiers Acc Default find Methods completion Token null scope enclosing Source Type scope new Object Vector false false true null null false false propose New Method completion Token scope enclosing Source Type else if ast Node instanceof Completion On Method Return Type Completion On Method Return Type method Completion On Method Return Type ast Node Single Type Reference type Completion On Single Type Reference method return Type completion Token type token set Source Range type source Start type source End find Types And Packages completion Token scope find Keywords For Member completion Token method modifiers if method modifiers Compiler Modifiers Acc Default find Methods completion Token null scope enclosing Source Type scope new Object Vector false false true null null false false propose New Method completion Token scope enclosing Source Type else if ast Node instanceof Completion On Single Name Reference Completion On Single Name Reference single Name Reference Completion On Single Name Reference ast Node completion Token single Name Reference token find Variables And Methods completion Token scope Completion On Single Name Reference ast Node scope can be the start of a qualified type name find Types And Packages completion Token scope find Keywords completion Token single Name Reference possible Keywords if single Name Reference can Be Explicit Constructor if Char Operation prefix Equals completion Token Keywords THIS false Reference Binding ref scope enclosing Source Type find Explicit Constructors Keywords THIS ref Method Scope scope single Name Reference else if Char Operation prefix Equals completion Token Keywords SUPER false Reference Binding ref scope enclosing Source Type find Explicit Constructors Keywords SUPER ref superclass Method Scope scope single Name Reference else if ast Node instanceof Completion On Single Type Reference completion Token Completion On Single Type Reference ast Node token assist Node Is Class ast Node instanceof Completion On Class Reference assist Node Is Exception ast Node instanceof Completion On Exception Reference assist Node Is Interface ast Node instanceof Completion On Interface Reference can be the start of a qualified type name if qualified Binding null find Types And Packages completion Token scope else find Member Types completion Token Reference Binding qualified Binding scope scope enclosing Source Type else if ast Node instanceof Completion On Qualified Name Reference inside Qualified Reference true Completion On Qualified Name Reference ref Completion On Qualified Name Reference ast Node completion Token ref completion Identifier long completion Position ref source Positions ref source Positions length 1 if qualified Binding instanceof Variable Binding set Source Range int completion Position 32 int completion Position Type Binding receiver Type Variable Binding qualified Binding type if receiver Type null find Fields And Methods completion Token receiver Type scope ref scope false false else if qualified Binding instanceof Reference Binding Reference Binding receiver Type Reference Binding qualified Binding set Source Range int completion Position 32 int completion Position find Member Types completion Token receiver Type scope scope enclosing Source Type find Class Field completion Token Type Binding qualified Binding scope Method Scope method Scope null if scope instanceof Method Scope Method Scope scope is Static method Scope scope enclosing Method Scope null method Scope is Static if completion Token length 0 find Keywords completion Token new char Keywords THIS else int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching completion Token Keywords THIS no Proposal false requestor accept Keyword Keywords THIS start Position offset end Position offset relevance find Fields completion Token receiver Type scope new Object Vector new Object Vector true ref scope false find Methods completion Token null receiver Type scope new Object Vector true false false ref scope false false else if qualified Binding instanceof Package Binding set Source Range ast Node source Start int completion Position replace to the end of the completion identifier find Types And Subpackages completion Token Package Binding qualified Binding else if ast Node instanceof Completion On Qualified Type Reference inside Qualified Reference true assist Node Is Class ast Node instanceof Completion On Qualified Class Reference assist Node Is Exception ast Node instanceof Completion On Qualified Exception Reference assist Node Is Interface ast Node instanceof Completion On Qualified Interface Reference Completion On Qualified Type Reference ref Completion On Qualified Type Reference ast Node completion Token ref completion Identifier long completion Position ref source Positions ref tokens length get the source positions of the completion identifier if qualified Binding instanceof Reference Binding set Source Range int completion Position 32 int completion Position find Member Types completion Token Reference Binding qualified Binding scope scope enclosing Source Type else if qualified Binding instanceof Package Binding set Source Range ast Node source Start int completion Position replace to the end of the completion identifier find Types And Subpackages completion Token Package Binding qualified Binding else if ast Node instanceof Completion On Member Access inside Qualified Reference true Completion On Member Access access Completion On Member Access ast Node long completion Position access name Source Position set Source Range int completion Position 32 int completion Position completion Token access token find Keywords completion Token new char Keywords NEW find Fields And Methods completion Token Type Binding qualified Binding scope access scope false access receiver instanceof Super Reference else if ast Node instanceof Completion On Message Send set Source Range ast Node source Start ast Node source End false Completion On Message Send message Send Completion On Message Send ast Node Type Binding arg Types compute Types message Send arguments Block Scope scope completion Token message Send selector if qualified Binding null find Implicit Message Sends completion Token arg Types scope message Send scope else find Methods completion Token arg Types Reference Binding qualified Binding scope new Object Vector false true false message Send scope false message Send receiver instanceof Super Reference else if ast Node instanceof Completion On Explicit Constructor Call set Source Range ast Node source Start ast Node source End false Completion On Explicit Constructor Call constructor Call Completion On Explicit Constructor Call ast Node Type Binding arg Types compute Types constructor Call arguments Block Scope scope find Constructors Reference Binding qualified Binding arg Types scope constructor Call false else if ast Node instanceof Completion On Qualified Allocation Expression set Source Range ast Node source Start ast Node source End false Completion On Qualified Allocation Expre ASTNode astNode ASTNode astNodeParent qualifiedBinding setSourceRange astNode sourceStart astNode sourceEnd computeUninterestingBindings astNodeParent astNodeParent computeExpectedTypes astNodeParent astNode CompletionOnFieldType CompletionOnFieldType CompletionOnFieldType astNode CompletionOnSingleTypeReference CompletionOnSingleTypeReference completionToken setSourceRange sourceStart sourceEnd findTypesAndPackages completionToken findKeywordsForMember completionToken isLocalVariable CompilerModifiers AccDefault findMethods completionToken enclosingSourceType ObjectVector proposeNewMethod completionToken enclosingSourceType astNode CompletionOnMethodReturnType CompletionOnMethodReturnType CompletionOnMethodReturnType astNode SingleTypeReference CompletionOnSingleTypeReference returnType completionToken setSourceRange sourceStart sourceEnd findTypesAndPackages completionToken findKeywordsForMember completionToken CompilerModifiers AccDefault findMethods completionToken enclosingSourceType ObjectVector proposeNewMethod completionToken enclosingSourceType astNode CompletionOnSingleNameReference CompletionOnSingleNameReference singleNameReference CompletionOnSingleNameReference astNode completionToken singleNameReference findVariablesAndMethods completionToken CompletionOnSingleNameReference astNode findTypesAndPackages completionToken findKeywords completionToken singleNameReference possibleKeywords singleNameReference canBeExplicitConstructor CharOperation prefixEquals completionToken ReferenceBinding enclosingSourceType findExplicitConstructors MethodScope singleNameReference CharOperation prefixEquals completionToken ReferenceBinding enclosingSourceType findExplicitConstructors MethodScope singleNameReference astNode CompletionOnSingleTypeReference completionToken CompletionOnSingleTypeReference astNode assistNodeIsClass astNode CompletionOnClassReference assistNodeIsException astNode CompletionOnExceptionReference assistNodeIsInterface astNode CompletionOnInterfaceReference qualifiedBinding findTypesAndPackages completionToken findMemberTypes completionToken ReferenceBinding qualifiedBinding enclosingSourceType astNode CompletionOnQualifiedNameReference insideQualifiedReference CompletionOnQualifiedNameReference CompletionOnQualifiedNameReference astNode completionToken completionIdentifier completionPosition sourcePositions sourcePositions qualifiedBinding VariableBinding setSourceRange completionPosition completionPosition TypeBinding receiverType VariableBinding qualifiedBinding receiverType findFieldsAndMethods completionToken receiverType qualifiedBinding ReferenceBinding ReferenceBinding receiverType ReferenceBinding qualifiedBinding setSourceRange completionPosition completionPosition findMemberTypes completionToken receiverType enclosingSourceType findClassField completionToken TypeBinding qualifiedBinding MethodScope methodScope MethodScope MethodScope isStatic methodScope enclosingMethodScope methodScope isStatic completionToken findKeywords completionToken computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching completionToken noProposal acceptKeyword startPosition endPosition findFields completionToken receiverType ObjectVector ObjectVector findMethods completionToken receiverType ObjectVector qualifiedBinding PackageBinding setSourceRange astNode sourceStart completionPosition findTypesAndSubpackages completionToken PackageBinding qualifiedBinding astNode CompletionOnQualifiedTypeReference insideQualifiedReference assistNodeIsClass astNode CompletionOnQualifiedClassReference assistNodeIsException astNode CompletionOnQualifiedExceptionReference assistNodeIsInterface astNode CompletionOnQualifiedInterfaceReference CompletionOnQualifiedTypeReference CompletionOnQualifiedTypeReference astNode completionToken completionIdentifier completionPosition sourcePositions qualifiedBinding ReferenceBinding setSourceRange completionPosition completionPosition findMemberTypes completionToken ReferenceBinding qualifiedBinding enclosingSourceType qualifiedBinding PackageBinding setSourceRange astNode sourceStart completionPosition findTypesAndSubpackages completionToken PackageBinding qualifiedBinding astNode CompletionOnMemberAccess insideQualifiedReference CompletionOnMemberAccess CompletionOnMemberAccess astNode completionPosition nameSourcePosition setSourceRange completionPosition completionPosition completionToken findKeywords completionToken findFieldsAndMethods completionToken TypeBinding qualifiedBinding SuperReference astNode CompletionOnMessageSend setSourceRange astNode sourceStart astNode sourceEnd CompletionOnMessageSend messageSend CompletionOnMessageSend astNode TypeBinding argTypes computeTypes messageSend BlockScope completionToken messageSend qualifiedBinding findImplicitMessageSends completionToken argTypes messageSend findMethods completionToken argTypes ReferenceBinding qualifiedBinding ObjectVector messageSend messageSend SuperReference astNode CompletionOnExplicitConstructorCall setSourceRange astNode sourceStart astNode sourceEnd CompletionOnExplicitConstructorCall constructorCall CompletionOnExplicitConstructorCall astNode TypeBinding argTypes computeTypes constructorCall BlockScope findConstructors ReferenceBinding qualifiedBinding argTypes constructorCall astNode CompletionOnQualifiedAllocationExpression setSourceRange astNode sourceStart astNode sourceEnd CompletionOnQualifiedAllocationExpre
public void complete I Type type char snippet int position char local Variable Type Names char local Variable Names int local Variable Modifiers boolean is Static I Type top Level Type type while top Level Type get Declaring Type null top Level Type top Level Type get Declaring Type Compilation Result compilation Result new Compilation Result top Level Type get Element Name SUFFIX STRING java to Char Array 1 1 this compiler Options max Problems Per Unit Compilation Unit Declaration compilation Unit new Compilation Unit Declaration problem Reporter compilation Result 0 try TODO david should be instead be using Source Type Converter Type Declaration type Declaration Type Converter build Type Declaration type compilation Unit compilation Result if type Declaration null build AST from snippet Initializer fake Initializer parse Snippe Initializer snippet position local Variable Type Names local Variable Names local Variable Modifiers is Static merge AST Field Declaration old Fields type Declaration fields Field Declaration new Fields new Field Declaration old Fields length 1 System arraycopy old Fields 0 new Fields 0 old Fields length new Fields old Fields length fake Initializer type Declaration fields new Fields if DEBUG System out println SNIPPET COMPLETION AST NON NLS 1 System out println compilation Unit to String if compilation Unit types null try lookup Environment build Type Bindings compilation Unit if unit Scope compilation Unit scope null lookup Environment complete Type Bindings compilation Unit true compilation Unit scope fault In Types compilation Unit resolve catch Completion Node Found e completion Node Found true if e ast Node null if null then we found a problem in the completion node complete e ast Node parser assist Node Parent e qualified Binding e scope if no Proposal problem null requestor accept Error problem catch Java Model Exception e Do nothing  IType localVariableTypeNames localVariableNames localVariableModifiers isStatic IType topLevelType topLevelType getDeclaringType topLevelType topLevelType getDeclaringType CompilationResult compilationResult CompilationResult topLevelType getElementName SUFFIX_STRING_java toCharArray compilerOptions maxProblemsPerUnit CompilationUnitDeclaration compilationUnit CompilationUnitDeclaration problemReporter compilationResult SourceTypeConverter TypeDeclaration typeDeclaration TypeConverter buildTypeDeclaration compilationUnit compilationResult typeDeclaration fakeInitializer parseSnippeInitializer localVariableTypeNames localVariableNames localVariableModifiers isStatic FieldDeclaration oldFields typeDeclaration FieldDeclaration newFields FieldDeclaration oldFields oldFields newFields oldFields newFields oldFields fakeInitializer typeDeclaration newFields compilationUnit toString compilationUnit lookupEnvironment buildTypeBindings compilationUnit unitScope compilationUnit lookupEnvironment completeTypeBindings compilationUnit compilationUnit faultInTypes compilationUnit CompletionNodeFound completionNodeFound astNode astNode assistNodeParent qualifiedBinding noProposal acceptError JavaModelException
private Initializer parse Snippe Initializer char snippet int position char local Variable Type Names char local Variable Names int local Variable Modifiers boolean is Static String Buffer prefix new String Buffer prefix append public class Fake Type n NON NLS 1 if is Static prefix append static NON NLS 1 prefix append n NON NLS 1 for int i 0 i local Variable Type Names length i AST Node print Modifiers local Variable Modifiers i prefix prefix append prefix append local Variable Type Names i prefix append prefix append local Variable Names i prefix append char fake Source Char Operation concat prefix to String to Char Array snippet to Char Array NON NLS 1 offset prefix length String encoding this compiler Options default Encoding Basic Compilation Unit fake Unit new Basic Compilation Unit fake Source null Fake Type java NON NLS 1 encoding actual Completion Position prefix length position 1 Compilation Result fake Result new Compilation Result fake Unit 1 1 this compiler Options max Problems Per Unit Compilation Unit Declaration fakeAST parser diet Parse fake Unit fake Result actual Completion Position parse Block Statements fakeAST actual Completion Position return Initializer fakeAST types 0 fields 0  parseSnippeInitializer localVariableTypeNames localVariableNames localVariableModifiers isStatic StringBuffer StringBuffer FakeType isStatic localVariableTypeNames ASTNode printModifiers localVariableModifiers localVariableTypeNames localVariableNames fakeSource CharOperation toString toCharArray toCharArray compilerOptions defaultEncoding BasicCompilationUnit fakeUnit BasicCompilationUnit fakeSource FakeType actualCompletionPosition CompilationResult fakeResult CompilationResult fakeUnit compilerOptions maxProblemsPerUnit CompilationUnitDeclaration dietParse fakeUnit fakeResult actualCompletionPosition parseBlockStatements actualCompletionPosition
Ask the engine to compute a completion at the specified position of the given compilation unit No return completion results are answered through a requestor param source Unit org eclipse jdt internal compiler env I Compilation Unit the source of the current compilation unit param completion Position int a position in the source where the completion is taking place This position is relative to the source provided public void complete I Compilation Unit source Unit int completion Position int pos if DEBUG System out print COMPLETION IN NON NLS 1 System out print source Unit get File Name System out print AT POSITION NON NLS 1 System out println completion Position System out println COMPLETION Source NON NLS 1 System out println source Unit get Contents try actual Completion Position completion Position 1 this offset pos for now until we can change the UI Compilation Result result new Compilation Result source Unit 1 1 this compiler Options max Problems Per Unit Compilation Unit Declaration parsed Unit parser diet Parse source Unit result actual Completion Position boolean completion Node Found false if parsed Unit null if DEBUG System out println COMPLETION Diet AST NON NLS 1 System out println parsed Unit to String scan the package import statements first if parsed Unit current Package instanceof Completion On Package Reference find Packages Completion On Package Reference parsed Unit current Package if no Proposal problem null requestor accept Error problem return Import Reference imports parsed Unit imports if imports null for int i 0 length imports length i length i Import Reference import Reference imports i if import Reference instanceof Completion On Import Reference find Imports Completion On Import Reference import Reference if no Proposal problem null requestor accept Error problem return else if import Reference instanceof Completion On Keyword set Source Range import Reference source Start import Reference source End Completion On Keyword keyword Completion On Keyword import Reference find Keywords keyword get Token keyword get Possible Keywords if no Proposal problem null requestor accept Error problem return if parsed Unit types null try lookup Environment build Type Bindings parsed Unit if unit Scope parsed Unit scope null source source Unit get Contents lookup Environment complete Type Bindings parsed Unit true parsed Unit scope fault In Types parse Block Statements parsed Unit actual Completion Position if DEBUG System out println COMPLETION AST NON NLS 1 System out println parsed Unit to String parsed Unit resolve catch Completion Node Found e completion Node Found true if e ast Node null if DEBUG System out print COMPLETION Completion node NON NLS 1 System out println e ast Node to String if parser assist Node Parent null System out print COMPLETION Parent Node NON NLS 1 System out println parser assist Node Parent if null then we found a problem in the completion node complete e ast Node parser assist Node Parent e qualified Binding e scope if no Proposal problem null requestor accept Error problem Ignore package import class interface keywords for now if completion Node Found if parsed Unit null parsed Unit types null this is not good enough can still be trying to define a second type Completion Scanner scanner Completion Scanner parser scanner set Source Range scanner completed Identifier Start scanner completed Identifier End find Keywords scanner completion Identifier main Declarations null currently have no way to know if extends implements are possible keywords catch Index Out Of Bounds Exception e work around internal failure 1GEMF6D catch Invalid Cursor Location e may eventually report a usefull error catch Abort Compilation e ignore this exception for now since it typically means we cannot find java lang Object catch Completion Node Found e internal failure bugs 5618 finally reset  sourceUnit ICompilationUnit completionPosition ICompilationUnit sourceUnit completionPosition sourceUnit getFileName completionPosition sourceUnit getContents actualCompletionPosition completionPosition CompilationResult CompilationResult sourceUnit compilerOptions maxProblemsPerUnit CompilationUnitDeclaration parsedUnit dietParse sourceUnit actualCompletionPosition completionNodeFound parsedUnit parsedUnit toString parsedUnit currentPackage CompletionOnPackageReference findPackages CompletionOnPackageReference parsedUnit currentPackage noProposal acceptError ImportReference parsedUnit ImportReference importReference importReference CompletionOnImportReference findImports CompletionOnImportReference importReference noProposal acceptError importReference CompletionOnKeyword setSourceRange importReference sourceStart importReference sourceEnd CompletionOnKeyword CompletionOnKeyword importReference findKeywords getToken getPossibleKeywords noProposal acceptError parsedUnit lookupEnvironment buildTypeBindings parsedUnit unitScope parsedUnit sourceUnit getContents lookupEnvironment completeTypeBindings parsedUnit parsedUnit faultInTypes parseBlockStatements parsedUnit actualCompletionPosition parsedUnit toString parsedUnit CompletionNodeFound completionNodeFound astNode astNode toString assistNodeParent assistNodeParent astNode assistNodeParent qualifiedBinding noProposal acceptError completionNodeFound parsedUnit parsedUnit CompletionScanner CompletionScanner setSourceRange completedIdentifierStart completedIdentifierEnd findKeywords completionIdentifier mainDeclarations IndexOutOfBoundsException InvalidCursorLocation AbortCompilation CompletionNodeFound
private Type Binding compute Types Expression arguments Block Scope scope if arguments null return null int args Length arguments length Type Binding arg Types new Type Binding args Length for int a args Length a 0 arg Types a arguments a resolved Type return arg Types  TypeBinding computeTypes BlockScope argsLength TypeBinding argTypes TypeBinding argsLength argsLength argTypes resolvedType argTypes
private void find Anonymous Type Reference Binding current Type Type Binding arg Types Scope scope Invocation Site invocation Site if current Type is Interface char completion Char Operation NO CHAR nothing to insert do not want to replace the existing selector arguments if source null source length end Position source end Position completion new char int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal no Proposal false requestor accept Anonymous Type current Type qualified Package Name current Type qualified Source Name Char Operation NO CHAR CHAR Char Operation NO CHAR CHAR Char Operation NO CHAR CHAR completion I Constants Acc Public end Position offset end Position offset relevance else find Constructors current Type arg Types scope invocation Site true  findAnonymousType ReferenceBinding currentType TypeBinding argTypes InvocationSite invocationSite currentType isInterface CharOperation NO_CHAR endPosition endPosition computeBaseRelevance computeRelevanceForInterestingProposal noProposal acceptAnonymousType currentType qualifiedPackageName currentType qualifiedSourceName CharOperation NO_CHAR_CHAR CharOperation NO_CHAR_CHAR CharOperation NO_CHAR_CHAR IConstants AccPublic endPosition endPosition findConstructors currentType argTypes invocationSite
private void find Class Field char token Type Binding receiver Type Scope scope if token null return if token length class Field length Char Operation prefix Equals token class Field false ignore case int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching token class Field relevance compute Relevance For Expecting Type scope get Java Lang Class no Proposal false requestor accept Field Char Operation NO CHAR Char Operation NO CHAR class Field Char Operation NO CHAR Char Operation NO CHAR class Field I Constants Acc Static I Constants Acc Public start Position offset end Position offset relevance  findClassField TypeBinding receiverType classField CharOperation prefixEquals classField computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching classField computeRelevanceForExpectingType getJavaLangClass noProposal acceptField CharOperation NO_CHAR CharOperation NO_CHAR classField CharOperation NO_CHAR CharOperation NO_CHAR classField IConstants AccStatic IConstants AccPublic startPosition endPosition
private void find Explicit Constructors char name Reference Binding current Type Method Scope scope Invocation Site invocation Site Constructor Declaration constructor Declaration Constructor Declaration scope reference Context Method Binding enclosing Constructor constructor Declaration binding No visibility checks can be performed without the scope invocation Site Method Binding methods current Type available Methods if methods null next for int f methods length f 0 Method Binding constructor methods f if constructor enclosing Constructor constructor is Constructor if constructor is Synthetic continue next if options check Visibility constructor can Be Seen By invocation Site scope continue next Type Binding parameters constructor parameters int param Length parameters length char parameter Package Names new char param Length char parameter Type Names new char param Length for int i 0 i param Length i Type Binding type parameters i parameter Package Names i type qualified Package Name parameter Type Names i type qualified Source Name char parameter Names find Method Parameter Names constructor parameter Type Names char completion Char Operation NO CHAR if source null source length end Position source end Position completion name else completion Char Operation concat name new char int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching completion Token name no Proposal false requestor accept Method current Type qualified Package Name current Type qualified Source Name name parameter Package Names parameter Type Names parameter Names Char Operation NO CHAR Char Operation NO CHAR completion constructor modifiers start Position offset end Position offset relevance  findExplicitConstructors ReferenceBinding currentType MethodScope InvocationSite invocationSite ConstructorDeclaration constructorDeclaration ConstructorDeclaration referenceContext MethodBinding enclosingConstructor constructorDeclaration invocationSite MethodBinding currentType availableMethods MethodBinding enclosingConstructor isConstructor isSynthetic checkVisibility canBeSeenBy invocationSite TypeBinding paramLength parameterPackageNames paramLength parameterTypeNames paramLength paramLength TypeBinding parameterPackageNames qualifiedPackageName parameterTypeNames qualifiedSourceName parameterNames findMethodParameterNames parameterTypeNames CharOperation NO_CHAR endPosition endPosition CharOperation computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching completionToken noProposal acceptMethod currentType qualifiedPackageName currentType qualifiedSourceName parameterPackageNames parameterTypeNames parameterNames CharOperation NO_CHAR CharOperation NO_CHAR startPosition endPosition
private void find Constructors Reference Binding current Type Type Binding arg Types Scope scope Invocation Site invocation Site boolean for Anonymous Type No visibility checks can be performed without the scope invocation Site Method Binding methods current Type available Methods if methods null int min Arg Length arg Types null 0 arg Types length next for int f methods length f 0 Method Binding constructor methods f if constructor is Constructor if constructor is Synthetic continue next if options check Visibility constructor can Be Seen By invocation Site scope if for Anonymous Type constructor is Protected continue next Type Binding parameters constructor parameters int param Length parameters length if min Arg Length param Length continue next for int a min Arg Length a 0 if arg Types a null can be null if it could not be resolved properly if arg Types a is Compatible With constructor parameters a continue next char parameter Package Names new char param Length char parameter Type Names new char param Length for int i 0 i param Length i Type Binding type parameters i parameter Package Names i type qualified Package Name parameter Type Names i type qualified Source Name char parameter Names find Method Parameter Names constructor parameter Type Names char completion Char Operation NO CHAR nothing to insert do not want to replace the existing selector arguments if source null source length end Position source end Position completion new char if for Anonymous Type int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal no Proposal false requestor accept Anonymous Type current Type qualified Package Name current Type qualified Source Name parameter Package Names parameter Type Names parameter Names completion constructor modifiers end Position offset end Position offset relevance else int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal no Proposal false requestor accept Method current Type qualified Package Name current Type qualified Source Name current Type source Name parameter Package Names parameter Type Names parameter Names Char Operation NO CHAR Char Operation NO CHAR completion constructor modifiers end Position offset end Position offset relevance  findConstructors ReferenceBinding currentType TypeBinding argTypes InvocationSite invocationSite forAnonymousType invocationSite MethodBinding currentType availableMethods minArgLength argTypes argTypes MethodBinding isConstructor isSynthetic checkVisibility canBeSeenBy invocationSite forAnonymousType isProtected TypeBinding paramLength minArgLength paramLength minArgLength argTypes argTypes isCompatibleWith parameterPackageNames paramLength parameterTypeNames paramLength paramLength TypeBinding parameterPackageNames qualifiedPackageName parameterTypeNames qualifiedSourceName parameterNames findMethodParameterNames parameterTypeNames CharOperation NO_CHAR endPosition endPosition forAnonymousType computeBaseRelevance computeRelevanceForInterestingProposal noProposal acceptAnonymousType currentType qualifiedPackageName currentType qualifiedSourceName parameterPackageNames parameterTypeNames parameterNames endPosition endPosition computeBaseRelevance computeRelevanceForInterestingProposal noProposal acceptMethod currentType qualifiedPackageName currentType qualifiedSourceName currentType sourceName parameterPackageNames parameterTypeNames parameterNames CharOperation NO_CHAR CharOperation NO_CHAR endPosition endPosition
Helper method for find Fields char Reference Binding Scope Object Vector boolean private void find Fields char field Name Field Binding fields Scope scope Object Vector fields Found Object Vector locals Found boolean only Static Fields Reference Binding receiver Type Invocation Site invocation Site Scope invocation Scope boolean implicit Call Object Vector new Fields Found new Object Vector Inherited fields which are hidden by subclasses are filtered out No visibility checks can be performed without the scope invocation Site int field Length field Name length next for int f fields length f 0 Field Binding field fields f if field is Synthetic continue next if only Static Fields field is Static continue next if field Length field name length continue next if Char Operation prefix Equals field Name field name false ignore case continue next if options check Visibility field can Be Seen By receiver Type invocation Site scope continue next boolean prefix Required false for int i fields Found size i 0 Object other Object fields Found element At i Field Binding other Field Field Binding other 0 Reference Binding other Receiver Type Reference Binding other 1 if field other Field receiver Type other Receiver Type continue next if Char Operation equals field name other Field name true if field declaring Class is Superclass Of other Field declaring Class continue next if other Field declaring Class is Interface if field declaring Class scope get Java Lang Object continue next if field declaring Class implements Interface other Field declaring Class true continue next if field declaring Class is Interface if other Field declaring Class implements Interface field declaring Class true continue next prefix Required true for int l locals Found size l 0 Local Variable Binding local Local Variable Binding locals Found element At l if Char Operation equals field name local name true Source Type Binding declaration Type scope enclosing Source Type if declaration Type is Anonymous Type declaration Type invocation Scope enclosing Source Type continue next prefix Required true break new Fields Found add new Object field receiver Type char completion field name if prefix Required options force Implicit Qualification char prefix compute Prefix scope enclosing Source Type invocation Scope enclosing Source Type field is Static completion Char Operation concat prefix completion int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal field relevance compute Relevance For Case Matching field Name field name relevance compute Relevance For Expecting Type field type relevance compute Relevance For Static only Static Fields field is Static relevance compute Relevance For Qualification prefix Required no Proposal false requestor accept Field field declaring Class qualified Package Name field declaring Class qualified Source Name field name field type qualified Package Name field type qualified Source Name completion may include some qualification to resolve ambiguities field modifiers start Position offset end Position offset relevance fields Found add All new Fields Found  findFields ReferenceBinding ObjectVector findFields fieldName FieldBinding ObjectVector fieldsFound ObjectVector localsFound onlyStaticFields ReferenceBinding receiverType InvocationSite invocationSite invocationScope implicitCall ObjectVector newFieldsFound ObjectVector invocationSite fieldLength fieldName FieldBinding isSynthetic onlyStaticFields isStatic fieldLength CharOperation prefixEquals fieldName checkVisibility canBeSeenBy receiverType invocationSite prefixRequired fieldsFound fieldsFound elementAt FieldBinding otherField FieldBinding ReferenceBinding otherReceiverType ReferenceBinding otherField receiverType otherReceiverType CharOperation otherField declaringClass isSuperclassOf otherField declaringClass otherField declaringClass isInterface declaringClass getJavaLangObject declaringClass implementsInterface otherField declaringClass declaringClass isInterface otherField declaringClass implementsInterface declaringClass prefixRequired localsFound LocalVariableBinding LocalVariableBinding localsFound elementAt CharOperation SourceTypeBinding declarationType enclosingSourceType declarationType isAnonymousType declarationType invocationScope enclosingSourceType prefixRequired newFieldsFound receiverType prefixRequired forceImplicitQualification computePrefix enclosingSourceType invocationScope enclosingSourceType isStatic CharOperation computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching fieldName computeRelevanceForExpectingType computeRelevanceForStatic onlyStaticFields isStatic computeRelevanceForQualification prefixRequired noProposal acceptField declaringClass qualifiedPackageName declaringClass qualifiedSourceName qualifiedPackageName qualifiedSourceName startPosition endPosition fieldsFound addAll newFieldsFound
private void find Fields char field Name Reference Binding receiver Type Scope scope Object Vector fields Found Object Vector locals Found boolean only Static Fields Invocation Site invocation Site Scope invocation Scope boolean implicit Call if field Name null return Reference Binding current Type receiver Type Reference Binding interfaces To Visit null int last Position 1 do Reference Binding its Interfaces current Type super Interfaces if its Interfaces No Super Interfaces if interfaces To Visit null interfaces To Visit new Reference Binding 5 if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces Field Binding fields current Type available Fields if fields null find Fields field Name fields scope fields Found locals Found only Static Fields receiver Type invocation Site invocation Scope implicit Call current Type current Type superclass while current Type null if interfaces To Visit null for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j Reference Binding an Interface interfaces j if an Interface tag Bits Tag Bits Interface Visited 0 if interface as not already been visited an Interface tag Bits Tag Bits Interface Visited Field Binding fields an Interface available Fields if fields null find Fields field Name fields scope fields Found locals Found only Static Fields receiver Type invocation Site invocation Scope implicit Call Reference Binding its Interfaces an Interface super Interfaces if its Interfaces No Super Interfaces if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces bit reinitialization for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j interfaces j tag Bits Tag Bits Interface Visited  findFields fieldName ReferenceBinding receiverType ObjectVector fieldsFound ObjectVector localsFound onlyStaticFields InvocationSite invocationSite invocationScope implicitCall fieldName ReferenceBinding currentType receiverType ReferenceBinding interfacesToVisit lastPosition ReferenceBinding itsInterfaces currentType superInterfaces itsInterfaces NoSuperInterfaces interfacesToVisit interfacesToVisit ReferenceBinding lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces FieldBinding currentType availableFields findFields fieldName fieldsFound localsFound onlyStaticFields receiverType invocationSite invocationScope implicitCall currentType currentType currentType interfacesToVisit lastPosition ReferenceBinding interfacesToVisit ReferenceBinding anInterface anInterface tagBits TagBits InterfaceVisited anInterface tagBits TagBits InterfaceVisited FieldBinding anInterface availableFields findFields fieldName fieldsFound localsFound onlyStaticFields receiverType invocationSite invocationScope implicitCall ReferenceBinding itsInterfaces anInterface superInterfaces itsInterfaces NoSuperInterfaces lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces lastPosition ReferenceBinding interfacesToVisit tagBits TagBits InterfaceVisited
private void find Fields And Methods char token Type Binding receiver Type Scope scope Invocation Site invocation Site Scope invocation Scope boolean implicit Call boolean super Call if token null return if receiver Type is Base Type return nothing else is possible with base types Object Vector methods Found new Object Vector if receiver Type is Array Type if token length length Field length Char Operation prefix Equals token length Field false ignore case int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching token length Field relevance compute Relevance For Expecting Type Base Types Int Binding no Proposal false requestor accept Field Char Operation NO CHAR Char Operation NO CHAR length Field Char Operation NO CHAR Char Operation NO CHAR length Field I Constants Acc Public start Position offset end Position offset relevance if token length clone Method length Char Operation prefix Equals token clone Method false ignore case Reference Binding object Ref scope get Java Lang Object int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching token clone Method relevance compute Relevance For Expecting Type object Ref relevance compute Relevance For Static false false relevance compute Relevance For Qualification false char completion if source null source length end Position source end Position completion clone Method else completion Char Operation concat clone Method new char no Proposal false requestor accept Method Char Operation NO CHAR Char Operation NO CHAR clone Method Char Operation NO CHAR CHAR Char Operation NO CHAR CHAR Char Operation NO CHAR CHAR Char Operation concat JAVA LANG OBJECT completion I Constants Acc Public start Position offset end Position offset relevance methods Found add new Object object Ref get Methods clone Method 0 object Ref receiver Type scope get Java Lang Object find Fields token Reference Binding receiver Type scope new Object Vector new Object Vector false invocation Site invocation Scope implicit Call find Methods token null Reference Binding receiver Type scope methods Found false false false invocation Site invocation Scope implicit Call super Call  findFieldsAndMethods TypeBinding receiverType InvocationSite invocationSite invocationScope implicitCall superCall receiverType isBaseType ObjectVector methodsFound ObjectVector receiverType isArrayType lengthField CharOperation prefixEquals lengthField computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching lengthField computeRelevanceForExpectingType BaseTypes IntBinding noProposal acceptField CharOperation NO_CHAR CharOperation NO_CHAR lengthField CharOperation NO_CHAR CharOperation NO_CHAR lengthField IConstants AccPublic startPosition endPosition cloneMethod CharOperation prefixEquals cloneMethod ReferenceBinding objectRef getJavaLangObject computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching cloneMethod computeRelevanceForExpectingType objectRef computeRelevanceForStatic computeRelevanceForQualification endPosition endPosition cloneMethod CharOperation cloneMethod noProposal acceptMethod CharOperation NO_CHAR CharOperation NO_CHAR cloneMethod CharOperation NO_CHAR_CHAR CharOperation NO_CHAR_CHAR CharOperation NO_CHAR_CHAR CharOperation IConstants AccPublic startPosition endPosition methodsFound objectRef getMethods cloneMethod objectRef receiverType getJavaLangObject findFields ReferenceBinding receiverType ObjectVector ObjectVector invocationSite invocationScope implicitCall findMethods ReferenceBinding receiverType methodsFound invocationSite invocationScope implicitCall superCall
private void find Imports Completion On Import Reference import Reference char tokens import Reference tokens char import Name Char Operation concat With tokens if import Name length 0 return char last Token tokens tokens length 1 if last Token null last Token length 0 import Name Char Operation concat import Name new char resolving Imports true set Source Range import Reference source Start import Reference declaration Source End completion Token import Name want to replace the existing name Environment find Packages import Name this name Environment find Types import Name this  findImports CompletionOnImportReference importReference importReference importName CharOperation concatWith importName lastToken lastToken lastToken importName CharOperation importName resolvingImports setSourceRange importReference sourceStart importReference declarationSourceEnd completionToken importName nameEnvironment findPackages importName nameEnvironment findTypes importName
import p1 p2 A private void find Keywords char keyword char choices if choices null choices length 0 return int length keyword length if length 0 for int i 0 i choices length i if length choices i length Char Operation prefix Equals keyword choices i false ignore case int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching keyword choices i no Proposal false requestor accept Keyword choices i start Position offset end Position offset relevance  findKeywords CharOperation prefixEquals computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching noProposal acceptKeyword startPosition endPosition
private void find Keywords For Member char token int modifiers char keywords new char Keywords COUNT int count 0 visibility if modifiers I Constants Acc Private 0 modifiers I Constants Acc Protected 0 modifiers I Constants Acc Public 0 keywords count Keywords PROTECTED keywords count Keywords PUBLIC if modifiers I Constants Acc Abstract 0 keywords count Keywords PRIVATE if modifiers I Constants Acc Abstract 0 abtract if modifiers Compiler Modifiers Acc VisibilityMASK I Constants Acc Static 0 keywords count Keywords ABSTRACT final if modifiers I Constants Acc Final 0 keywords count Keywords FINAL static if modifiers I Constants Acc Static 0 keywords count Keywords STATIC boolean can Be Field true boolean can Be Method true boolean can Be Type true if modifiers I Constants Acc Native 0 modifiers I Constants Acc Strictfp 0 modifiers I Constants Acc Synchronized 0 can Be Field false can Be Type false if modifiers I Constants Acc Transient 0 modifiers I Constants Acc Volatile 0 can Be Method false can Be Type false if can Be Field transient if modifiers I Constants Acc Transient 0 keywords count Keywords TRANSIENT volatile if modifiers I Constants Acc Volatile 0 keywords count Keywords VOLATILE if can Be Method native if modifiers I Constants Acc Native 0 keywords count Keywords NATIVE strictfp if modifiers I Constants Acc Strictfp 0 keywords count Keywords STRICTFP synchronized if modifiers I Constants Acc Synchronized 0 keywords count Keywords SYNCHRONIZED if can Be Type keywords count Keywords CLASS keywords count Keywords INTERFACE else class keywords count Keywords CLASS keywords count Keywords INTERFACE System arraycopy keywords 0 keywords new char count 0 count find Keywords token keywords  findKeywordsForMember IConstants AccPrivate IConstants AccProtected IConstants AccPublic IConstants AccAbstract IConstants AccAbstract CompilerModifiers AccVisibilityMASK IConstants AccStatic IConstants AccFinal IConstants AccStatic canBeField canBeMethod canBeType IConstants AccNative IConstants AccStrictfp IConstants AccSynchronized canBeField canBeType IConstants AccTransient IConstants AccVolatile canBeMethod canBeType canBeField IConstants AccTransient IConstants AccVolatile canBeMethod IConstants AccNative IConstants AccStrictfp IConstants AccSynchronized canBeType findKeywords
Helper method for find Member Types char Reference Binding Scope private void find Member Types char type Name Reference Binding member Types Object Vector types Found Reference Binding receiver Type Source Type Binding invocation Type Inherited member types which are hidden by subclasses are filtered out No visibility checks can be performed without the scope invocation Site int type Length type Name length next for int m member Types length m 0 Reference Binding member Type member Types m if want Classes member Type is Class continue next if want Interfaces member Type is Interface continue next if type Length member Type source Name length continue next if Char Operation prefix Equals type Name member Type source Name false ignore case continue next if options check Visibility member Type can Be Seen By receiver Type invocation Type continue next for int i types Found size i 0 Reference Binding other Type Reference Binding types Found element At i if member Type other Type continue next if Char Operation equals member Type source Name other Type source Name true if member Type enclosing Type is Superclass Of other Type enclosing Type continue next if other Type enclosing Type is Interface if member Type enclosing Type implements Interface other Type enclosing Type true continue next if member Type enclosing Type is Interface if other Type enclosing Type implements Interface member Type enclosing Type true continue next types Found add member Type int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching type Name member Type source Name relevance compute Relevance For Expecting Type member Type if member Type is Class relevance compute Relevance For Class relevance compute Relevance For Exception member Type source Name no Proposal false requestor accept Class member Type qualified Package Name member Type qualified Source Name member Type source Name member Type modifiers start Position offset end Position offset relevance else relevance compute Relevance For Interface no Proposal false requestor accept Interface member Type qualified Package Name member Type qualified Source Name member Type source Name member Type modifiers start Position offset end Position offset relevance  findMemberTypes ReferenceBinding findMemberTypes typeName ReferenceBinding memberTypes ObjectVector typesFound ReferenceBinding receiverType SourceTypeBinding invocationType invocationSite typeLength typeName memberTypes ReferenceBinding memberType memberTypes wantClasses memberType isClass wantInterfaces memberType isInterface typeLength memberType sourceName CharOperation prefixEquals typeName memberType sourceName checkVisibility memberType canBeSeenBy receiverType invocationType typesFound ReferenceBinding otherType ReferenceBinding typesFound elementAt memberType otherType CharOperation memberType sourceName otherType sourceName memberType enclosingType isSuperclassOf otherType enclosingType otherType enclosingType isInterface memberType enclosingType implementsInterface otherType enclosingType memberType enclosingType isInterface otherType enclosingType implementsInterface memberType enclosingType typesFound memberType computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching typeName memberType sourceName computeRelevanceForExpectingType memberType memberType isClass computeRelevanceForClass computeRelevanceForException memberType sourceName noProposal acceptClass memberType qualifiedPackageName memberType qualifiedSourceName memberType sourceName memberType startPosition endPosition computeRelevanceForInterface noProposal acceptInterface memberType qualifiedPackageName memberType qualifiedSourceName memberType sourceName memberType startPosition endPosition
private void find Member Types char type Name Reference Binding receiver Type Scope scope Source Type Binding type Invocation Reference Binding current Type receiver Type if type Name null return if current Type super Interfaces null return we re trying to find a supertype Object Vector types Found new Object Vector if inside Qualified Reference type Name length 0 do not search up the hierarchy find Member Types type Name current Type member Types types Found receiver Type type Invocation return Reference Binding interfaces To Visit null int last Position 1 do Reference Binding its Interfaces current Type super Interfaces if its Interfaces No Super Interfaces if interfaces To Visit null interfaces To Visit new Reference Binding 5 if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces find Member Types type Name current Type member Types types Found receiver Type type Invocation current Type current Type superclass while current Type null if interfaces To Visit null for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j Reference Binding an Interface interfaces j if an Interface tag Bits Tag Bits Interface Visited 0 if interface as not already been visited an Interface tag Bits Tag Bits Interface Visited find Member Types type Name an Interface member Types types Found receiver Type type Invocation Reference Binding its Interfaces an Interface super Interfaces if its Interfaces No Super Interfaces if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces bit reinitialization for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j interfaces j tag Bits Tag Bits Interface Visited  findMemberTypes typeName ReferenceBinding receiverType SourceTypeBinding typeInvocation ReferenceBinding currentType receiverType typeName currentType superInterfaces ObjectVector typesFound ObjectVector insideQualifiedReference typeName findMemberTypes typeName currentType memberTypes typesFound receiverType typeInvocation ReferenceBinding interfacesToVisit lastPosition ReferenceBinding itsInterfaces currentType superInterfaces itsInterfaces NoSuperInterfaces interfacesToVisit interfacesToVisit ReferenceBinding lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces findMemberTypes typeName currentType memberTypes typesFound receiverType typeInvocation currentType currentType currentType interfacesToVisit lastPosition ReferenceBinding interfacesToVisit ReferenceBinding anInterface anInterface tagBits TagBits InterfaceVisited anInterface tagBits TagBits InterfaceVisited findMemberTypes typeName anInterface memberTypes typesFound receiverType typeInvocation ReferenceBinding itsInterfaces anInterface superInterfaces itsInterfaces NoSuperInterfaces lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces lastPosition ReferenceBinding interfacesToVisit tagBits TagBits InterfaceVisited
private void find Intefaces Methods char selector Type Binding arg Types Reference Binding receiver Type Reference Binding its Interfaces Scope scope Object Vector methods Found boolean only Static Methods boolean exact Match boolean is Completing Declaration Invocation Site invocation Site Scope invocation Scope boolean implicit Call boolean super Call if selector null return if its Interfaces No Super Interfaces Reference Binding interfaces To Visit new Reference Binding 5 int last Position 0 interfaces To Visit last Position its Interfaces for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j Reference Binding current Type interfaces j if current Type tag Bits Tag Bits Interface Visited 0 if interface as not already been visited current Type tag Bits Tag Bits Interface Visited Method Binding methods current Type available Methods if methods null if is Completing Declaration find Local Method Declarations selector methods scope methods Found only Static Methods exact Match receiver Type else find Local Methods selector arg Types methods scope methods Found only Static Methods exact Match receiver Type invocation Site invocation Scope implicit Call super Call its Interfaces current Type super Interfaces if its Interfaces No Super Interfaces if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces bit reinitialization for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j interfaces j tag Bits Tag Bits Interface Visited  findIntefacesMethods TypeBinding argTypes ReferenceBinding receiverType ReferenceBinding itsInterfaces ObjectVector methodsFound onlyStaticMethods exactMatch isCompletingDeclaration InvocationSite invocationSite invocationScope implicitCall superCall itsInterfaces NoSuperInterfaces ReferenceBinding interfacesToVisit ReferenceBinding lastPosition interfacesToVisit lastPosition itsInterfaces lastPosition ReferenceBinding interfacesToVisit ReferenceBinding currentType currentType tagBits TagBits InterfaceVisited currentType tagBits TagBits InterfaceVisited MethodBinding currentType availableMethods isCompletingDeclaration findLocalMethodDeclarations methodsFound onlyStaticMethods exactMatch receiverType findLocalMethods argTypes methodsFound onlyStaticMethods exactMatch receiverType invocationSite invocationScope implicitCall superCall itsInterfaces currentType superInterfaces itsInterfaces NoSuperInterfaces lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces lastPosition ReferenceBinding interfacesToVisit tagBits TagBits InterfaceVisited
private void find Implicit Message Sends char token Type Binding arg Types Scope scope Invocation Site invocation Site Scope invocation Scope if token null return boolean statics Only false need to know if we re in a static context or inside a constructor Object Vector methods Found new Object Vector done while true done when a COMPILATION UNIT SCOPE is found switch scope kind case Scope METHOD SCOPE handle the error case inside an explicit constructor call see Method Scope find Field Method Scope method Scope Method Scope scope statics Only method Scope is Static method Scope is Constructor Call break case Scope CLASS SCOPE Class Scope class Scope Class Scope scope Source Type Binding enclosing Type class Scope reference Context binding find Methods token arg Types enclosing Type class Scope methods Found statics Only true false invocation Site invocation Scope true false statics Only enclosing Type is Static break case Scope COMPILATION UNIT SCOPE break done scope scope parent  findImplicitMessageSends TypeBinding argTypes InvocationSite invocationSite invocationScope staticsOnly ObjectVector methodsFound ObjectVector COMPILATION_UNIT_SCOPE METHOD_SCOPE MethodScope findField MethodScope methodScope MethodScope staticsOnly methodScope isStatic methodScope isConstructorCall CLASS_SCOPE ClassScope classScope ClassScope SourceTypeBinding enclosingType classScope referenceContext findMethods argTypes enclosingType classScope methodsFound staticsOnly invocationSite invocationScope staticsOnly enclosingType isStatic COMPILATION_UNIT_SCOPE
Helper method for find Methods char Type Binding Reference Binding Scope Object Vector boolean boolean boolean private void find Local Methods char method Name Type Binding arg Types Method Binding methods Scope scope Object Vector methods Found boolean only Static Methods boolean exact Match Reference Binding receiver Type Invocation Site invocation Site Scope invocation Scope boolean implicit Call boolean super Call Object Vector new Methods Found new Object Vector Inherited methods which are hidden by subclasses are filtered out No visibility checks can be performed without the scope invocation Site int method Length method Name length int min Arg Length arg Types null 0 arg Types length next for int f methods length f 0 Method Binding method methods f if method is Synthetic continue next if method is Default Abstract continue next if method is Constructor continue next TODO david perhaps the relevance of a void method must be lesser than other methods if expected Types Ptr 1 method return Type Base Types Void Binding continue next if only Static Methods method is Static continue next if options check Visibility method can Be Seen By receiver Type invocation Site scope continue next if super Call method is Abstract methods Found add new Object method receiver Type continue next if exact Match if Char Operation equals method Name method selector false ignore case continue next else if method Length method selector length continue next if Char Operation prefix Equals method Name method selector false ignore case continue next if min Arg Length method parameters length continue next for int a min Arg Length a 0 if arg Types a null can be null if it could not be resolved properly if arg Types a is Compatible With method parameters a continue next boolean prefix Required false for int i methods Found size i 0 Object other Object methods Found element At i Method Binding other Method Method Binding other 0 Reference Binding other Receiver Type Reference Binding other 1 if method other Method receiver Type other Receiver Type continue next if Char Operation equals method selector other Method selector true method are Parameters Equal other Method if method declaring Class is Superclass Of other Method declaring Class continue next if other Method declaring Class is Interface if method declaring Class scope get Java Lang Object continue next if method declaring Class is Interface continue next if super Call method declaring Class implements Interface other Method declaring Class true continue next if method declaring Class is Interface if other Method declaring Class implements Interface method declaring Class true continue next if receiver Type is Anonymous Type continue next if super Call prefix Required true new Methods Found add new Object method receiver Type int length method parameters length char parameter Package Names new char length char parameter Type Names new char length for int i 0 i length i Type Binding type method parameters i parameter Package Names i type qualified Package Name parameter Type Names i type qualified Source Name char parameter Names find Method Parameter Names method parameter Type Names char completion Char Operation NO CHAR int previous Start Position start Position nothing to insert do not want to replace the existing selector arguments if exact Match if source null source length end Position source end Position completion method selector else completion Char Operation concat method selector new char else if prefix Required source null completion Char Operation subarray source start Position end Position else start Position end Position if prefix Required options force Implicit Qualification char prefix compute Prefix scope enclosing Source Type invocation Scope enclosing Source Type method is Static completion Char Operation concat prefix completion int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching method Name method selector relevance compute Relevance For Expecting Type method return Type relevance compute Relevance For Static only Static Methods method is Static relevance compute Relevance For Qualification prefix Required no Proposal false requestor accept Method method declaring Class qualified Package Name method declaring Class qualified Source Name method selector parameter Package Names parameter Type Names parameter Names method return Type qualified Package Name method return Type qualified Source Name completion method modifiers start Position offset end Position offset relevance start Position previous Start Position methods Found add All new Methods Found  findMethods TypeBinding ReferenceBinding ObjectVector findLocalMethods methodName TypeBinding argTypes MethodBinding ObjectVector methodsFound onlyStaticMethods exactMatch ReferenceBinding receiverType InvocationSite invocationSite invocationScope implicitCall superCall ObjectVector newMethodsFound ObjectVector invocationSite methodLength methodName minArgLength argTypes argTypes MethodBinding isSynthetic isDefaultAbstract isConstructor expectedTypesPtr returnType BaseTypes VoidBinding onlyStaticMethods isStatic checkVisibility canBeSeenBy receiverType invocationSite superCall isAbstract methodsFound receiverType exactMatch CharOperation methodName methodLength CharOperation prefixEquals methodName minArgLength minArgLength argTypes argTypes isCompatibleWith prefixRequired methodsFound methodsFound elementAt MethodBinding otherMethod MethodBinding ReferenceBinding otherReceiverType ReferenceBinding otherMethod receiverType otherReceiverType CharOperation otherMethod areParametersEqual otherMethod declaringClass isSuperclassOf otherMethod declaringClass otherMethod declaringClass isInterface declaringClass getJavaLangObject declaringClass isInterface superCall declaringClass implementsInterface otherMethod declaringClass declaringClass isInterface otherMethod declaringClass implementsInterface declaringClass receiverType isAnonymousType superCall prefixRequired newMethodsFound receiverType parameterPackageNames parameterTypeNames TypeBinding parameterPackageNames qualifiedPackageName parameterTypeNames qualifiedSourceName parameterNames findMethodParameterNames parameterTypeNames CharOperation NO_CHAR previousStartPosition startPosition exactMatch endPosition endPosition CharOperation prefixRequired CharOperation startPosition endPosition startPosition endPosition prefixRequired forceImplicitQualification computePrefix enclosingSourceType invocationScope enclosingSourceType isStatic CharOperation computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching methodName computeRelevanceForExpectingType returnType computeRelevanceForStatic onlyStaticMethods isStatic computeRelevanceForQualification prefixRequired noProposal acceptMethod declaringClass qualifiedPackageName declaringClass qualifiedSourceName parameterPackageNames parameterTypeNames parameterNames returnType qualifiedPackageName returnType qualifiedSourceName startPosition endPosition startPosition previousStartPosition methodsFound addAll newMethodsFound
int compute Relevance For Case Matching char token char proposal Name if Char Operation prefix Equals token proposal Name true do not ignore case if Char Operation equals token proposal Name true do not ignore case return R CASE R EXACT NAME else return R CASE else return 0  computeRelevanceForCaseMatching proposalName CharOperation prefixEquals proposalName CharOperation proposalName R_CASE R_EXACT_NAME R_CASE
private int compute Relevance For Class if assist Node Is Class return R CLASS return 0  computeRelevanceForClass assistNodeIsClass R_CLASS
private int compute Relevance For Interface if assist Node Is Interface return R INTERFACE return 0  computeRelevanceForInterface assistNodeIsInterface R_INTERFACE
private int compute Relevance For Qualification boolean prefix Required if prefix Required inside Qualified Reference return R UNQUALIFIED if prefix Required inside Qualified Reference return R QUALIFIED return 0  computeRelevanceForQualification prefixRequired prefixRequired insideQualifiedReference R_UNQUALIFIED prefixRequired insideQualifiedReference R_QUALIFIED
private int compute Relevance For Static boolean only Static boolean is Static if inside Qualified Reference only Static is Static return R NON STATIC return 0  computeRelevanceForStatic onlyStatic isStatic insideQualifiedReference onlyStatic isStatic R_NON_STATIC
return 0 private int compute Relevance For Static Overide boolean is Static return is Static 0 R NON STATIC OVERIDE  computeRelevanceForStaticOveride isStatic isStatic R_NON_STATIC_OVERIDE
private int compute Relevance For Exception char proposal Name if assist Node Is Exception Char Operation match EXCEPTION PATTERN proposal Name false Char Operation match ERROR PATTERN proposal Name false return R EXCEPTION return 0  computeRelevanceForException proposalName assistNodeIsException CharOperation EXCEPTION_PATTERN proposalName CharOperation ERROR_PATTERN proposalName R_EXCEPTION
private int compute Relevance For Expecting Type Type Binding proposal Type if expected Types null proposal Type null for int i 0 i expected Types Ptr i if Char Operation equals expected Types i qualified Package Name proposal Type qualified Package Name Char Operation equals expected Types i qualified Source Name proposal Type qualified Source Name return R EXACT EXPECTED TYPE if expected Types Filter SUBTYPE 0 proposal Type is Compatible With expected Types i return R EXPECTED TYPE if expected Types Filter SUPERTYPE 0 expected Types i is Compatible With proposal Type return R EXPECTED TYPE return 0  computeRelevanceForExpectingType TypeBinding proposalType expectedTypes proposalType expectedTypesPtr CharOperation expectedTypes qualifiedPackageName proposalType qualifiedPackageName CharOperation expectedTypes qualifiedSourceName proposalType qualifiedSourceName R_EXACT_EXPECTED_TYPE expectedTypesFilter proposalType isCompatibleWith expectedTypes R_EXPECTED_TYPE expectedTypesFilter expectedTypes isCompatibleWith proposalType R_EXPECTED_TYPE
private int compute Relevance For Expecting Type char package Name char type Name if expected Types null for int i 0 i expected Types Ptr i if Char Operation equals expected Types i qualified Package Name package Name Char Operation equals expected Types i qualified Source Name type Name return R EXACT EXPECTED TYPE return 0  computeRelevanceForExpectingType packageName typeName expectedTypes expectedTypesPtr CharOperation expectedTypes qualifiedPackageName packageName CharOperation expectedTypes qualifiedSourceName typeName R_EXACT_EXPECTED_TYPE
return 0 int compute Relevance For Interesting Proposal return compute Relevance For Interesting Proposal null  computeRelevanceForInterestingProposal computeRelevanceForInterestingProposal
private int compute Relevance For Interesting Proposal Binding binding if uninteresting Bindings null for int i 0 i uninteresting Bindings Ptr i if uninteresting Bindings i binding return 0 return R INTERESTING  computeRelevanceForInterestingProposal uninterestingBindings uninterestingBindingsPtr uninterestingBindings R_INTERESTING
private void compute Uninteresting Bindings AST Node parent Scope scope if parent instanceof Local Declaration add Uninteresting Bindings Local Declaration parent binding else if parent instanceof Field Declaration add Uninteresting Bindings Field Declaration parent binding  computeUninterestingBindings ASTNode LocalDeclaration addUninterestingBindings LocalDeclaration FieldDeclaration addUninterestingBindings FieldDeclaration
Helper method for find Methods char Method Binding Scope Object Vector boolean boolean boolean Type Binding private void find Local Method Declarations char method Name Method Binding methods Scope scope Object Vector methods Found boolean no Void Return Type how do you know boolean only Static Methods boolean exact Match Reference Binding receiver Type Object Vector new Methods Found new Object Vector Inherited methods which are hidden by subclasses are filtered out No visibility checks can be performed without the scope invocation Site int method Length method Name length next for int f methods length f 0 Method Binding method methods f if method is Synthetic continue next if method is Default Abstract continue next if method is Constructor continue next if method is Final continue next if no Void Return Type method return Type Base Types Void Binding continue next if method is Static if receiver Type is Anonymous Type continue next if receiver Type is Member Type receiver Type is Static continue next if receiver Type is Local Type continue next else if only Static Methods continue next if options check Visibility method can Be Seen By receiver Type Fake Invocation Site scope continue next if exact Match if Char Operation equals method Name method selector false ignore case continue next else if method Length method selector length continue next if Char Operation prefix Equals method Name method selector false ignore case continue next for int i methods Found size i 0 Method Binding other Method Method Binding methods Found element At i if method other Method continue next if Char Operation equals method selector other Method selector true method are Parameters Equal other Method continue next new Methods Found add method int length method parameters length char parameter Package Names new char length char parameter Type Names new char length for int i 0 i length i Type Binding type method parameters i parameter Package Names i type qualified Package Name parameter Type Names i type qualified Source Name char parameter Names find Method Parameter Names method parameter Type Names String Buffer completion new String Buffer 10 flush uninteresting modifiers int inserted Modifiers method modifiers I Constants Acc Native I Constants Acc Abstract if exact Match if inserted Modifiers Compiler Modifiers Acc Default AST Node print Modifiers inserted Modifiers completion char return Package Name method return Type qualified Package Name char return Type Name method return Type qualified Source Name if must Qualify Type return Package Name return Type Name completion append Char Operation concat return Package Name return Type Name else completion append method return Type source Name completion append completion append method selector completion append for int i 0 i length i if must Qualify Type parameter Package Names i parameter Type Names i completion append Char Operation concat parameter Package Names i parameter Type Names i else completion append parameter Type Names i completion append if parameter Names null completion append parameter Names i else completion append if i length 1 completion append completion append Reference Binding exceptions method thrown Exceptions if exceptions null exceptions length 0 completion append completion append THROWS completion append for int i 0 i exceptions length i Reference Binding exception exceptions i char exception Package Name exception qualified Package Name char exception Type Name exception qualified Source Name if i 0 completion append completion append if must Qualify Type exception Package Name exception Type Name completion append Char Operation concat exception Package Name exception Type Name else completion append exception source Name int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching method Name method selector relevance compute Relevance For Static Overide method is Static if method is Abstract relevance R ABSTRACT METHOD no Proposal false requestor accept Method Declaration method declaring Class qualified Package Name method declaring Class qualified Source Name method selector parameter Package Names parameter Type Names parameter Names method return Type qualified Package Name method return Type qualified Source Name completion to String to Char Array method modifiers start Position offset end Position offset relevance methods Found add All new Methods Found  findMethods MethodBinding ObjectVector TypeBinding findLocalMethodDeclarations methodName MethodBinding ObjectVector methodsFound noVoidReturnType onlyStaticMethods exactMatch ReferenceBinding receiverType ObjectVector newMethodsFound ObjectVector invocationSite methodLength methodName MethodBinding isSynthetic isDefaultAbstract isConstructor isFinal noVoidReturnType returnType BaseTypes VoidBinding isStatic receiverType isAnonymousType receiverType isMemberType receiverType isStatic receiverType isLocalType onlyStaticMethods checkVisibility canBeSeenBy receiverType FakeInvocationSite exactMatch CharOperation methodName methodLength CharOperation prefixEquals methodName methodsFound MethodBinding otherMethod MethodBinding methodsFound elementAt otherMethod CharOperation otherMethod areParametersEqual otherMethod newMethodsFound parameterPackageNames parameterTypeNames TypeBinding parameterPackageNames qualifiedPackageName parameterTypeNames qualifiedSourceName parameterNames findMethodParameterNames parameterTypeNames StringBuffer StringBuffer insertedModifiers IConstants AccNative IConstants AccAbstract exactMatch insertedModifiers CompilerModifiers AccDefault ASTNode printModifiers insertedModifiers returnPackageName returnType qualifiedPackageName returnTypeName returnType qualifiedSourceName mustQualifyType returnPackageName returnTypeName CharOperation returnPackageName returnTypeName returnType sourceName mustQualifyType parameterPackageNames parameterTypeNames CharOperation parameterPackageNames parameterTypeNames parameterTypeNames parameterNames parameterNames ReferenceBinding thrownExceptions ReferenceBinding exceptionPackageName qualifiedPackageName exceptionTypeName qualifiedSourceName mustQualifyType exceptionPackageName exceptionTypeName CharOperation exceptionPackageName exceptionTypeName sourceName computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching methodName computeRelevanceForStaticOveride isStatic isAbstract R_ABSTRACT_METHOD noProposal acceptMethodDeclaration declaringClass qualifiedPackageName declaringClass qualifiedSourceName parameterPackageNames parameterTypeNames parameterNames returnType qualifiedPackageName returnType qualifiedSourceName toString toCharArray startPosition endPosition methodsFound addAll newMethodsFound
private void find Methods char selector Type Binding arg Types Reference Binding receiver Type Scope scope Object Vector methods Found boolean only Static Methods boolean exact Match boolean is Completing Declaration Invocation Site invocation Site Scope invocation Scope boolean implicit Call boolean super Call if selector null return if is Completing Declaration Method Binding methods receiver Type available Methods if methods null for int i 0 i methods length i if methods i is Default Abstract methods Found add methods i Reference Binding current Type receiver Type if receiver Type is Interface if is Completing Declaration find Intefaces Methods selector arg Types receiver Type current Type super Interfaces scope methods Found only Static Methods exact Match is Completing Declaration invocation Site invocation Scope implicit Call super Call else find Intefaces Methods selector arg Types receiver Type new Reference Binding current Type scope methods Found only Static Methods exact Match is Completing Declaration invocation Site invocation Scope implicit Call super Call current Type scope get Java Lang Object else if is Completing Declaration find Intefaces Methods selector arg Types receiver Type current Type super Interfaces scope methods Found only Static Methods exact Match is Completing Declaration invocation Site invocation Scope implicit Call super Call current Type receiver Type superclass boolean has Potential Default Abstract Methods true while current Type null Method Binding methods current Type available Methods if methods null if is Completing Declaration find Local Method Declarations selector methods scope methods Found only Static Methods exact Match receiver Type else find Local Methods selector arg Types methods scope methods Found only Static Methods exact Match receiver Type invocation Site invocation Scope implicit Call super Call if has Potential Default Abstract Methods current Type is Abstract find Intefaces Methods selector arg Types receiver Type current Type super Interfaces scope methods Found only Static Methods exact Match is Completing Declaration invocation Site invocation Scope implicit Call super Call else has Potential Default Abstract Methods false current Type current Type superclass  findMethods TypeBinding argTypes ReferenceBinding receiverType ObjectVector methodsFound onlyStaticMethods exactMatch isCompletingDeclaration InvocationSite invocationSite invocationScope implicitCall superCall isCompletingDeclaration MethodBinding receiverType availableMethods isDefaultAbstract methodsFound ReferenceBinding currentType receiverType receiverType isInterface isCompletingDeclaration findIntefacesMethods argTypes receiverType currentType superInterfaces methodsFound onlyStaticMethods exactMatch isCompletingDeclaration invocationSite invocationScope implicitCall superCall findIntefacesMethods argTypes receiverType ReferenceBinding currentType methodsFound onlyStaticMethods exactMatch isCompletingDeclaration invocationSite invocationScope implicitCall superCall currentType getJavaLangObject isCompletingDeclaration findIntefacesMethods argTypes receiverType currentType superInterfaces methodsFound onlyStaticMethods exactMatch isCompletingDeclaration invocationSite invocationScope implicitCall superCall currentType receiverType hasPotentialDefaultAbstractMethods currentType MethodBinding currentType availableMethods isCompletingDeclaration findLocalMethodDeclarations methodsFound onlyStaticMethods exactMatch receiverType findLocalMethods argTypes methodsFound onlyStaticMethods exactMatch receiverType invocationSite invocationScope implicitCall superCall hasPotentialDefaultAbstractMethods currentType isAbstract findIntefacesMethods argTypes receiverType currentType superInterfaces methodsFound onlyStaticMethods exactMatch isCompletingDeclaration invocationSite invocationScope implicitCall superCall hasPotentialDefaultAbstractMethods currentType currentType
private char find Method Parameter Names Method Binding method char parameter Type Names Reference Binding binding Type method declaring Class char parameter Names null int length parameter Type Names length if length 0 return Char Operation NO CHAR CHAR look into the corresponding unit if it is available if binding Type instanceof Source Type Binding Source Type Binding source Type Source Type Binding binding Type if source Type scope null Type Declaration parsed Type if parsed Type source Type scope reference Context null Abstract Method Declaration method Decl parsed Type declaration Of method if method Decl null Argument arguments method Decl arguments parameter Names new char length for int i 0 i length i parameter Names i arguments i name look into the model if parameter Names null char compound Name Char Operation concat With binding Type compound Name Object type type Cache get compound Name I Source Type source Type null if type null if type instanceof I Source Type source Type I Source Type type else Name Environment Answer answer name Environment find Type binding Type compound Name if answer null answer is Source Type source Type answer get Source Types 0 type Cache put compound Name source Type if source Type null I Source Method source Methods source Type get Methods int len source Methods null 0 source Methods length for int i 0 i len i I Source Method source Method source Methods i char arg Type Names source Method get Argument Type Names if arg Type Names null Char Operation equals method selector source Method get Selector Char Operation equals arg Type Names parameter Type Names parameter Names source Method get Argument Names break return parameter Names  findMethodParameterNames MethodBinding parameterTypeNames ReferenceBinding bindingType declaringClass parameterNames parameterTypeNames CharOperation NO_CHAR_CHAR bindingType SourceTypeBinding SourceTypeBinding sourceType SourceTypeBinding bindingType sourceType TypeDeclaration parsedType parsedType sourceType referenceContext AbstractMethodDeclaration methodDecl parsedType declarationOf methodDecl methodDecl parameterNames parameterNames parameterNames compoundName CharOperation concatWith bindingType compoundName typeCache compoundName ISourceType sourceType ISourceType sourceType ISourceType NameEnvironmentAnswer nameEnvironment findType bindingType compoundName isSourceType sourceType getSourceTypes typeCache compoundName sourceType sourceType ISourceMethod sourceMethods sourceType getMethods sourceMethods sourceMethods ISourceMethod sourceMethod sourceMethods argTypeNames sourceMethod getArgumentTypeNames argTypeNames CharOperation sourceMethod getSelector CharOperation argTypeNames parameterTypeNames parameterNames sourceMethod getArgumentNames parameterNames
private void find Nested Types char type Name Source Type Binding current Type Scope scope if type Name null return int type Length type Name length while scope null done when a COMPILATION UNIT SCOPE is found switch scope kind case Scope METHOD SCOPE case Scope BLOCK SCOPE Block Scope block Scope Block Scope scope next for int i 0 length block Scope subscope Count i length i if block Scope subscopes i instanceof Class Scope Source Type Binding local Type Class Scope block Scope subscopes i reference Context binding if local Type is Anonymous Type if type Length local Type source Name length continue next if Char Operation prefix Equals type Name local Type source Name false ignore case continue next int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching type Name local Type source Name relevance compute Relevance For Expecting Type local Type relevance compute Relevance For Exception local Type source Name relevance compute Relevance For Class relevance compute Relevance For Qualification false no Proposal false requestor accept Class local Type qualified Package Name local Type source Name local Type source Name local Type modifiers start Position offset end Position offset relevance break case Scope CLASS SCOPE find Member Types type Name scope enclosing Source Type scope current Type if type Length 0 return do not search outside the class scope if no prefix was provided break case Scope COMPILATION UNIT SCOPE return scope scope parent  findNestedTypes typeName SourceTypeBinding currentType typeName typeLength typeName COMPILATION_UNIT_SCOPE METHOD_SCOPE BLOCK_SCOPE BlockScope blockScope BlockScope blockScope subscopeCount blockScope ClassScope SourceTypeBinding localType ClassScope blockScope referenceContext localType isAnonymousType typeLength localType sourceName CharOperation prefixEquals typeName localType sourceName computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching typeName localType sourceName computeRelevanceForExpectingType localType computeRelevanceForException localType sourceName computeRelevanceForClass computeRelevanceForQualification noProposal acceptClass localType qualifiedPackageName localType sourceName localType sourceName localType startPosition endPosition CLASS_SCOPE findMemberTypes typeName enclosingSourceType currentType typeLength COMPILATION_UNIT_SCOPE
private void find Packages Completion On Package Reference package Statement completion Token Char Operation concat With package Statement tokens if completion Token length 0 return set Source Range package Statement source Start package Statement source End name Environment find Packages Char Operation to Lower Case completion Token this  findPackages CompletionOnPackageReference packageStatement completionToken CharOperation concatWith packageStatement completionToken setSourceRange packageStatement sourceStart packageStatement sourceEnd nameEnvironment findPackages CharOperation toLowerCase completionToken
private void find Types And Packages char token Scope scope if token null return if scope enclosing Source Type null find Nested Types token scope enclosing Source Type scope if unit Scope null int type Length token length Source Type Binding types unit Scope top Level Types for int i 0 length types length i length i Source Type Binding source Type types i if type Length source Type source Name length continue if Char Operation prefix Equals token source Type source Name false continue int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching token source Type source Name relevance compute Relevance For Expecting Type source Type relevance compute Relevance For Qualification false if source Type is Class relevance compute Relevance For Class relevance compute Relevance For Exception source Type source Name no Proposal false requestor accept Class source Type qualified Package Name source Type source Name source Type source Name source Type modifiers start Position offset end Position offset relevance else relevance compute Relevance For Interface no Proposal false requestor accept Interface source Type qualified Package Name source Type source Name source Type source Name source Type modifiers start Position offset end Position offset relevance if token length 0 if expected Types Ptr 1 next for int i 0 i expected Types Ptr i if expected Types i instanceof Reference Binding Reference Binding ref Binding Reference Binding expected Types i boolean in Same Unit unit Scope is Defined In Same Unit ref Binding top level types of the current unit are already proposed if in Same Unit in Same Unit ref Binding is Member Type char package Name ref Binding qualified Package Name char type Name ref Binding source Name char completion Name type Name boolean is Qualified false if inside Qualified Reference ref Binding is Member Type if must Qualify Type package Name type Name if package Name null package Name length 0 if unit Scope null unit Scope f Package compound Name Char Operation NO CHAR CHAR continue next ignore types from the default package from outside it completion Name Char Operation concat package Name type Name is Qualified true int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching token type Name relevance compute Relevance For Expecting Type ref Binding relevance compute Relevance For Qualification is Qualified if ref Binding is Class relevance compute Relevance For Class no Proposal false requestor accept Class package Name type Name completion Name ref Binding modifiers start Position offset end Position offset relevance else if ref Binding is Interface relevance compute Relevance For Interface no Proposal false requestor accept Interface package Name type Name completion Name ref Binding modifiers start Position offset end Position offset relevance else find Keywords token base Types name Environment find Types token this name Environment find Packages token this  findTypesAndPackages enclosingSourceType findNestedTypes enclosingSourceType unitScope typeLength SourceTypeBinding unitScope topLevelTypes SourceTypeBinding sourceType typeLength sourceType sourceName CharOperation prefixEquals sourceType sourceName computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching sourceType sourceName computeRelevanceForExpectingType sourceType computeRelevanceForQualification sourceType isClass computeRelevanceForClass computeRelevanceForException sourceType sourceName noProposal acceptClass sourceType qualifiedPackageName sourceType sourceName sourceType sourceName sourceType startPosition endPosition computeRelevanceForInterface noProposal acceptInterface sourceType qualifiedPackageName sourceType sourceName sourceType sourceName sourceType startPosition endPosition expectedTypesPtr expectedTypesPtr expectedTypes ReferenceBinding ReferenceBinding refBinding ReferenceBinding expectedTypes inSameUnit unitScope isDefinedInSameUnit refBinding inSameUnit inSameUnit refBinding isMemberType packageName refBinding qualifiedPackageName typeName refBinding sourceName completionName typeName isQualified insideQualifiedReference refBinding isMemberType mustQualifyType packageName typeName packageName packageName unitScope unitScope fPackage compoundName CharOperation NO_CHAR_CHAR completionName CharOperation packageName typeName isQualified computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching typeName computeRelevanceForExpectingType refBinding computeRelevanceForQualification isQualified refBinding isClass computeRelevanceForClass noProposal acceptClass packageName typeName completionName refBinding startPosition endPosition refBinding isInterface computeRelevanceForInterface noProposal acceptInterface packageName typeName completionName refBinding startPosition endPosition findKeywords baseTypes nameEnvironment findTypes nameEnvironment findPackages
private void find Types And Subpackages char token Package Binding package Binding char qualified Name Char Operation concat With package Binding compound Name token if token null token length 0 int length qualified Name length System arraycopy qualified Name 0 qualified Name new char length 1 0 length qualified Name length this qualified Completion Token qualified Name if unit Scope null int type Length qualified Name length Source Type Binding types unit Scope top Level Types for int i 0 length types length i length i Source Type Binding source Type types i char qualified Source Type Name Char Operation concat With source Type compound Name if type Length qualified Source Type Name length continue if package Binding source Type get Package continue if Char Operation prefix Equals qualified Name qualified Source Type Name false continue int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching qualified Name qualified Source Type Name relevance compute Relevance For Expecting Type source Type relevance compute Relevance For Qualification false if source Type is Class relevance compute Relevance For Class relevance compute Relevance For Exception source Type source Name no Proposal false requestor accept Class source Type qualified Package Name source Type source Name source Type source Name source Type modifiers start Position offset end Position offset relevance else relevance compute Relevance For Interface no Proposal false requestor accept Interface source Type qualified Package Name source Type source Name source Type source Name source Type modifiers start Position offset end Position offset relevance name Environment find Types qualified Name this name Environment find Packages qualified Name this  findTypesAndSubpackages PackageBinding packageBinding qualifiedName CharOperation concatWith packageBinding compoundName qualifiedName qualifiedName qualifiedName qualifiedName qualifiedCompletionToken qualifiedName unitScope typeLength qualifiedName SourceTypeBinding unitScope topLevelTypes SourceTypeBinding sourceType qualifiedSourceTypeName CharOperation concatWith sourceType compoundName typeLength qualifiedSourceTypeName packageBinding sourceType getPackage CharOperation prefixEquals qualifiedName qualifiedSourceTypeName computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching qualifiedName qualifiedSourceTypeName computeRelevanceForExpectingType sourceType computeRelevanceForQualification sourceType isClass computeRelevanceForClass computeRelevanceForException sourceType sourceName noProposal acceptClass sourceType qualifiedPackageName sourceType sourceName sourceType sourceName sourceType startPosition endPosition computeRelevanceForInterface noProposal acceptInterface sourceType qualifiedPackageName sourceType sourceName sourceType sourceName sourceType startPosition endPosition nameEnvironment findTypes qualifiedName nameEnvironment findPackages qualifiedName
private void find Variables And Methods char token Scope scope Invocation Site invocation Site Scope invocation Scope if token null return Should local variables hide fields from the receiver type or any of its enclosing types we know its an implicit field method access see Block Scope get Binding get Implicit Method boolean statics Only false need to know if we re in a static context or inside a constructor int token Length token length Object Vector locals Found new Object Vector Object Vector fields Found new Object Vector Object Vector methods Found new Object Vector Scope current Scope scope done1 while true done when a COMPILATION UNIT SCOPE is found switch current Scope kind case Scope METHOD SCOPE handle the error case inside an explicit constructor call see Method Scope find Field Method Scope method Scope Method Scope current Scope statics Only method Scope is Static method Scope is Constructor Call case Scope BLOCK SCOPE Block Scope block Scope Block Scope current Scope next for int i 0 length block Scope locals length i length i Local Variable Binding local block Scope locals i if local null break next if token Length local name length continue next if Char Operation prefix Equals token local name false ignore case continue next if local is Secret continue next for int f 0 f locals Found size f Local Variable Binding other Local Local Variable Binding locals Found element At f if Char Operation equals other Local name local name true continue next locals Found add local int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal local relevance compute Relevance For Case Matching token local name relevance compute Relevance For Expecting Type local type relevance compute Relevance For Qualification false no Proposal false requestor accept Local Variable local name local type null Char Operation NO CHAR local type qualified Package Name local type null local declaration type to String to Char Array local type qualified Source Name local modifiers start Position offset end Position offset relevance break case Scope COMPILATION UNIT SCOPE break done1 current Scope current Scope parent statics Only false current Scope scope done2 while true done when a COMPILATION UNIT SCOPE is found switch current Scope kind case Scope METHOD SCOPE handle the error case inside an explicit constructor call see Method Scope find Field Method Scope method Scope Method Scope current Scope statics Only method Scope is Static method Scope is Constructor Call break case Scope CLASS SCOPE Class Scope class Scope Class Scope current Scope Source Type Binding enclosing Type class Scope reference Context binding if token Length 0 only search inside the type itself if no prefix was provided find Fields token enclosing Type fields class Scope fields Found statics Only find Methods token enclosing Type methods class Scope methods Found statics Only false break done else find Fields token enclosing Type class Scope fields Found locals Found statics Only invocation Site invocation Scope true find Methods token null enclosing Type class Scope methods Found statics Only false false invocation Site invocation Scope true false statics Only enclosing Type is Static break case Scope COMPILATION UNIT SCOPE break done2 current Scope current Scope parent  findVariablesAndMethods InvocationSite invocationSite invocationScope BlockScope getBinding getImplicitMethod staticsOnly tokenLength ObjectVector localsFound ObjectVector ObjectVector fieldsFound ObjectVector ObjectVector methodsFound ObjectVector currentScope COMPILATION_UNIT_SCOPE currentScope METHOD_SCOPE MethodScope findField MethodScope methodScope MethodScope currentScope staticsOnly methodScope isStatic methodScope isConstructorCall BLOCK_SCOPE BlockScope blockScope BlockScope currentScope blockScope LocalVariableBinding blockScope tokenLength CharOperation prefixEquals isSecret localsFound LocalVariableBinding otherLocal LocalVariableBinding localsFound elementAt CharOperation otherLocal localsFound computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching computeRelevanceForExpectingType computeRelevanceForQualification noProposal acceptLocalVariable CharOperation NO_CHAR qualifiedPackageName toString toCharArray qualifiedSourceName startPosition endPosition COMPILATION_UNIT_SCOPE currentScope currentScope staticsOnly currentScope COMPILATION_UNIT_SCOPE currentScope METHOD_SCOPE MethodScope findField MethodScope methodScope MethodScope currentScope staticsOnly methodScope isStatic methodScope isConstructorCall CLASS_SCOPE ClassScope classScope ClassScope currentScope SourceTypeBinding enclosingType classScope referenceContext tokenLength findFields enclosingType classScope fieldsFound staticsOnly findMethods enclosingType classScope methodsFound staticsOnly findFields enclosingType classScope fieldsFound localsFound staticsOnly invocationSite invocationScope findMethods enclosingType classScope methodsFound staticsOnly invocationSite invocationScope staticsOnly enclosingType isStatic COMPILATION_UNIT_SCOPE currentScope currentScope
final char q qualified Package Name I Naming Requestor naming Requestor new I Naming Requestor public void accept Name With Prefix And Suffix char name boolean is First Prefix boolean is First Suffix accept name is First Prefix R NAME FIRST PREFIX R NAME PREFIX is First Suffix R NAME FIRST SUFFIX R NAME SUFFIX  qualifiedPackageName INamingRequestor namingRequestor INamingRequestor acceptNameWithPrefixAndSuffix isFirstPrefix isFirstSuffix isFirstPrefix R_NAME_FIRST_PREFIX R_NAME_PREFIX isFirstSuffix R_NAME_FIRST_SUFFIX R_NAME_SUFFIX
public void accept Name With Prefix char name boolean is First Prefix accept name is First Prefix R NAME FIRST PREFIX R NAME PREFIX  acceptNameWithPrefix isFirstPrefix isFirstPrefix R_NAME_FIRST_PREFIX R_NAME_PREFIX
public void accept Name With Suffix char name boolean is First Suffix accept name is First Suffix R NAME FIRST SUFFIX R NAME SUFFIX  acceptNameWithSuffix isFirstSuffix isFirstSuffix R_NAME_FIRST_SUFFIX R_NAME_SUFFIX
public void accept Name Without Prefix And Suffix char name accept name 0  acceptNameWithoutPrefixAndSuffix
void accept char name int prefix And Suffix Relevance if Char Operation prefix Equals t name false int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching t name relevance prefix And Suffix Relevance accept result no Proposal false requestor accept Variable Name q display Name name name start Position offset end Position offset relevance  prefixAndSuffixRelevance CharOperation prefixEquals computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching prefixAndSuffixRelevance noProposal acceptVariableName displayName startPosition endPosition
Helper method for private void find Variable Names char name Type Reference type private void find Variable Name char token char qualified Package Name char qualified Source Name char source Name char exclude Names int dim int kind int modifiers if source Name null source Name length 0 return compute variable name for non base type final char display Name if dim 0 int l qualified Source Name length display Name new char l 2 dim System arraycopy qualified Source Name 0 display Name 0 l for int i 0 i dim i display Name l i 2 display Name l i 2 1 else display Name qualified Source Name final char t token final char q qualified Package Name I Naming Requestor naming Requestor new I Naming Requestor public void accept Name With Prefix And Suffix char name boolean is First Prefix boolean is First Suffix accept name is First Prefix R NAME FIRST PREFIX R NAME PREFIX is First Suffix R NAME FIRST SUFFIX R NAME SUFFIX public void accept Name With Prefix char name boolean is First Prefix accept name is First Prefix R NAME FIRST PREFIX R NAME PREFIX public void accept Name With Suffix char name boolean is First Suffix accept name is First Suffix R NAME FIRST SUFFIX R NAME SUFFIX public void accept Name Without Prefix And Suffix char name accept name 0 void accept char name int prefix And Suffix Relevance if Char Operation prefix Equals t name false int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal relevance compute Relevance For Case Matching t name relevance prefix And Suffix Relevance accept result no Proposal false requestor accept Variable Name q display Name name name start Position offset end Position offset relevance switch kind case FIELD Internal Naming Conventions suggest Field Names java Project qualified Package Name qualified Source Name dim modifiers exclude Names naming Requestor break case LOCAL Internal Naming Conventions suggest Local Variable Names java Project qualified Package Name qualified Source Name dim exclude Names naming Requestor break case ARGUMENT Internal Naming Conventions suggest Argument Names java Project qualified Package Name qualified Source Name dim exclude Names naming Requestor break  findVariableNames TypeReference findVariableName qualifiedPackageName qualifiedSourceName sourceName excludeNames sourceName sourceName displayName qualifiedSourceName displayName qualifiedSourceName displayName displayName displayName displayName qualifiedSourceName qualifiedPackageName INamingRequestor namingRequestor INamingRequestor acceptNameWithPrefixAndSuffix isFirstPrefix isFirstSuffix isFirstPrefix R_NAME_FIRST_PREFIX R_NAME_PREFIX isFirstSuffix R_NAME_FIRST_SUFFIX R_NAME_SUFFIX acceptNameWithPrefix isFirstPrefix isFirstPrefix R_NAME_FIRST_PREFIX R_NAME_PREFIX acceptNameWithSuffix isFirstSuffix isFirstSuffix R_NAME_FIRST_SUFFIX R_NAME_SUFFIX acceptNameWithoutPrefixAndSuffix prefixAndSuffixRelevance CharOperation prefixEquals computeBaseRelevance computeRelevanceForInterestingProposal computeRelevanceForCaseMatching prefixAndSuffixRelevance noProposal acceptVariableName displayName startPosition endPosition InternalNamingConventions suggestFieldNames javaProject qualifiedPackageName qualifiedSourceName excludeNames namingRequestor InternalNamingConventions suggestLocalVariableNames javaProject qualifiedPackageName qualifiedSourceName excludeNames namingRequestor InternalNamingConventions suggestArgumentNames javaProject qualifiedPackageName qualifiedSourceName excludeNames namingRequestor
private void find Variable Names char name Type Reference type char exclude Names int kind int modifiers if type null type resolved Type null type resolved Type problem Id Problem Reasons No Error Type Binding tb type resolved Type find Variable Name name tb leaf Component Type qualified Package Name tb leaf Component Type qualified Source Name tb leaf Component Type source Name exclude Names type dimensions kind modifiers else char type Name type get Type Name find Variable Name name No Char Char Operation concat With type Name type Name type Name length 1 exclude Names type dimensions  findVariableNames TypeReference excludeNames resolvedType resolvedType problemId ProblemReasons NoError TypeBinding resolvedType findVariableName leafComponentType qualifiedPackageName leafComponentType qualifiedSourceName leafComponentType sourceName excludeNames typeName getTypeName findVariableName NoChar CharOperation concatWith typeName typeName typeName excludeNames
public Assist Parser get Parser return parser  AssistParser getParser
protected void reset super reset this known Pkgs new Hashtable Of Object 10 this known Types new Hashtable Of Object 10  knownPkgs HashtableOfObject knownTypes HashtableOfObject
private void set Source Range int start int end this set Source Range start end true  setSourceRange setSourceRange
private void set Source Range int start int end boolean empty Token Adjstment this start Position start if empty Token Adjstment int end Of Empty Token Completion Scanner parser scanner end Of Empty Token this end Position end Of Empty Token end end Of Empty Token 1 end 1 else this end Position end 1  setSourceRange emptyTokenAdjstment startPosition emptyTokenAdjstment endOfEmptyToken CompletionScanner endOfEmptyToken endPosition endOfEmptyToken endOfEmptyToken endPosition
int compute Base Relevance return R DEFAULT  computeBaseRelevance R_DEFAULT
private void compute Expected Types AST Node parent Scope scope default filter expected Types Filter SUBTYPE find types from parent if parent instanceof Abstract Variable Declaration Abstract Variable Declaration variable Abstract Variable Declaration parent Type Binding binding variable type resolved Type if binding null if variable initialization instanceof Array Initializer add Expected Type binding else if parent instanceof Assignment Type Binding binding Assignment parent resolved Type if binding null add Expected Type binding else if parent instanceof Return Statement if scope method Scope reference Context instanceof Abstract Method Declaration Method Binding method Binding Abstract Method Declaration scope method Scope reference Context binding Type Binding binding method Binding null null method Binding return Type if binding null add Expected Type binding else if parent instanceof Cast Expression Expression e Cast Expression parent type Type Binding binding e resolved Type if binding null add Expected Type binding expected Types Filter SUBTYPE SUPERTYPE else if parent instanceof Message Send Message Send message Send Message Send parent if message Send receiver Type instanceof Reference Binding Reference Binding binding Reference Binding message Send receiver Type boolean is Static message Send receiver is Type Reference while binding null compute Expected Types For Message Send binding message Send selector message Send arguments Reference Binding message Send receiver Type scope message Send is Static compute Expected Types For Message Send For Interface binding message Send selector message Send arguments Reference Binding message Send receiver Type scope message Send is Static binding binding superclass else if parent instanceof Allocation Expression Allocation Expression allocation Expression Allocation Expression parent Reference Binding binding Reference Binding allocation Expression type resolved Type if binding null compute Expected Types For Allocation Expression binding allocation Expression arguments scope allocation Expression else if parent instanceof Operator Expression int operator parent bits AST Node OperatorMASK AST Node OperatorSHIFT if parent instanceof Conditional Expression for future use else if parent instanceof Instance Of Expression Instance Of Expression e Instance Of Expression parent Type Binding binding e expression resolved Type if binding null add Expected Type binding expected Types Filter SUBTYPE SUPERTYPE else if parent instanceof Binary Expression switch operator case Operator Ids PLUS add Expected Type Base Types Short Binding add Expected Type Base Types Int Binding add Expected Type Base Types Long Binding add Expected Type Base Types Float Binding add Expected Type Base Types Double Binding add Expected Type Base Types Char Binding add Expected Type Base Types Byte Binding add Expected Type scope get Java Lang String break case Operator Ids AND AND case Operator Ids OR OR case Operator Ids XOR add Expected Type Base Types Boolean Binding break default add Expected Type Base Types Short Binding add Expected Type Base Types Int Binding add Expected Type Base Types Long Binding add Expected Type Base Types Float Binding add Expected Type Base Types Double Binding add Expected Type Base Types Char Binding add Expected Type Base Types Byte Binding break else if parent instanceof Unary Expression switch operator case Operator Ids NOT add Expected Type Base Types Boolean Binding break case Operator Ids TWIDDLE add Expected Type Base Types Short Binding add Expected Type Base Types Int Binding add Expected Type Base Types Long Binding add Expected Type Base Types Char Binding add Expected Type Base Types Byte Binding break case Operator Ids PLUS case Operator Ids MINUS case Operator Ids PLUS PLUS case Operator Ids MINUS MINUS add Expected Type Base Types Short Binding add Expected Type Base Types Int Binding add Expected Type Base Types Long Binding add Expected Type Base Types Float Binding add Expected Type Base Types Double Binding add Expected Type Base Types Char Binding add Expected Type Base Types Byte Binding break else if parent instanceof Array Reference add Expected Type Base Types Short Binding add Expected Type Base Types Int Binding add Expected Type Base Types Long Binding if expected Types Ptr 1 expected Types length System arraycopy expected Types 0 expected Types new Type Binding expected Types Ptr 1 0 expected Types Ptr 1  computeExpectedTypes ASTNode expectedTypesFilter AbstractVariableDeclaration AbstractVariableDeclaration AbstractVariableDeclaration TypeBinding resolvedType ArrayInitializer addExpectedType TypeBinding resolvedType addExpectedType ReturnStatement methodScope referenceContext AbstractMethodDeclaration MethodBinding methodBinding AbstractMethodDeclaration methodScope referenceContext TypeBinding methodBinding methodBinding returnType addExpectedType CastExpression CastExpression TypeBinding resolvedType addExpectedType expectedTypesFilter MessageSend MessageSend messageSend MessageSend messageSend receiverType ReferenceBinding ReferenceBinding ReferenceBinding messageSend receiverType isStatic messageSend isTypeReference computeExpectedTypesForMessageSend messageSend messageSend ReferenceBinding messageSend receiverType messageSend isStatic computeExpectedTypesForMessageSendForInterface messageSend messageSend ReferenceBinding messageSend receiverType messageSend isStatic AllocationExpression AllocationExpression allocationExpression AllocationExpression ReferenceBinding ReferenceBinding allocationExpression resolvedType computeExpectedTypesForAllocationExpression allocationExpression allocationExpression OperatorExpression ASTNode ASTNode ConditionalExpression InstanceOfExpression InstanceOfExpression InstanceOfExpression TypeBinding resolvedType addExpectedType expectedTypesFilter BinaryExpression OperatorIds addExpectedType BaseTypes ShortBinding addExpectedType BaseTypes IntBinding addExpectedType BaseTypes LongBinding addExpectedType BaseTypes FloatBinding addExpectedType BaseTypes DoubleBinding addExpectedType BaseTypes CharBinding addExpectedType BaseTypes ByteBinding addExpectedType getJavaLangString OperatorIds AND_AND OperatorIds OR_OR OperatorIds addExpectedType BaseTypes BooleanBinding addExpectedType BaseTypes ShortBinding addExpectedType BaseTypes IntBinding addExpectedType BaseTypes LongBinding addExpectedType BaseTypes FloatBinding addExpectedType BaseTypes DoubleBinding addExpectedType BaseTypes CharBinding addExpectedType BaseTypes ByteBinding UnaryExpression OperatorIds addExpectedType BaseTypes BooleanBinding OperatorIds addExpectedType BaseTypes ShortBinding addExpectedType BaseTypes IntBinding addExpectedType BaseTypes LongBinding addExpectedType BaseTypes CharBinding addExpectedType BaseTypes ByteBinding OperatorIds OperatorIds OperatorIds PLUS_PLUS OperatorIds MINUS_MINUS addExpectedType BaseTypes ShortBinding addExpectedType BaseTypes IntBinding addExpectedType BaseTypes LongBinding addExpectedType BaseTypes FloatBinding addExpectedType BaseTypes DoubleBinding addExpectedType BaseTypes CharBinding addExpectedType BaseTypes ByteBinding ArrayReference addExpectedType BaseTypes ShortBinding addExpectedType BaseTypes IntBinding addExpectedType BaseTypes LongBinding expectedTypesPtr expectedTypes expectedTypes expectedTypes TypeBinding expectedTypesPtr expectedTypesPtr
private void compute Expected Types For Allocation Expression Reference Binding binding Expression arguments Scope scope Invocation Site invocation Site Method Binding methods binding available Methods next Method for int i 0 i methods length i Method Binding method methods i if method is Constructor continue next Method if method is Synthetic continue next Method if options check Visibility method can Be Seen By invocation Site scope continue next Method Type Binding parameters method parameters if parameters length arguments length continue next Method int length arguments length 1 for int j 0 j length j Expression argument arguments j Type Binding arg Type argument resolved Type if arg Type null arg Type is Compatible With parameters j continue next Method Type Binding expected Type method parameters arguments length 1 if expected Type null add Expected Type expected Type  computeExpectedTypesForAllocationExpression ReferenceBinding InvocationSite invocationSite MethodBinding availableMethods nextMethod MethodBinding isConstructor nextMethod isSynthetic nextMethod checkVisibility canBeSeenBy invocationSite nextMethod TypeBinding nextMethod TypeBinding argType resolvedType argType argType isCompatibleWith nextMethod TypeBinding expectedType expectedType addExpectedType expectedType
private void compute Expected Types For Message Send For Interface Reference Binding binding char selector Expression arguments Reference Binding receiver Type Scope scope Invocation Site invocation Site boolean is Static Reference Binding its Interfaces binding super Interfaces if its Interfaces No Super Interfaces Reference Binding interfaces To Visit new Reference Binding 5 int last Position 0 interfaces To Visit last Position its Interfaces for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j Reference Binding current Type interfaces j if current Type tag Bits Tag Bits Interface Visited 0 if interface as not already been visited current Type tag Bits Tag Bits Interface Visited compute Expected Types For Message Send current Type selector arguments receiver Type scope invocation Site is Static its Interfaces current Type super Interfaces if its Interfaces No Super Interfaces if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces bit reinitialization for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j interfaces j tag Bits Tag Bits Interface Visited  computeExpectedTypesForMessageSendForInterface ReferenceBinding ReferenceBinding receiverType InvocationSite invocationSite isStatic ReferenceBinding itsInterfaces superInterfaces itsInterfaces NoSuperInterfaces ReferenceBinding interfacesToVisit ReferenceBinding lastPosition interfacesToVisit lastPosition itsInterfaces lastPosition ReferenceBinding interfacesToVisit ReferenceBinding currentType currentType tagBits TagBits InterfaceVisited currentType tagBits TagBits InterfaceVisited computeExpectedTypesForMessageSend currentType receiverType invocationSite isStatic itsInterfaces currentType superInterfaces itsInterfaces NoSuperInterfaces lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces lastPosition ReferenceBinding interfacesToVisit tagBits TagBits InterfaceVisited
private void compute Expected Types For Message Send Reference Binding binding char selector Expression arguments Reference Binding receiver Type Scope scope Invocation Site invocation Site boolean is Static Method Binding methods binding available Methods next Method for int i 0 i methods length i Method Binding method methods i if method is Synthetic continue next Method if method is Default Abstract continue next Method if method is Constructor continue next Method if is Static method is Static continue next Method if options check Visibility method can Be Seen By receiver Type invocation Site scope continue next Method if Char Operation equals method selector selector continue next Method Type Binding parameters method parameters if parameters length arguments length continue next Method int length arguments length 1 for int j 0 j length j Expression argument arguments j Type Binding arg Type argument resolved Type if arg Type null arg Type is Compatible With parameters j continue next Method Type Binding expected Type method parameters arguments length 1 if expected Type null add Expected Type expected Type  computeExpectedTypesForMessageSend ReferenceBinding ReferenceBinding receiverType InvocationSite invocationSite isStatic MethodBinding availableMethods nextMethod MethodBinding isSynthetic nextMethod isDefaultAbstract nextMethod isConstructor nextMethod isStatic isStatic nextMethod checkVisibility canBeSeenBy receiverType invocationSite nextMethod CharOperation nextMethod TypeBinding nextMethod TypeBinding argType resolvedType argType argType isCompatibleWith nextMethod TypeBinding expectedType expectedType addExpectedType expectedType
private void add Expected Type Type Binding type if type null type is Valid Binding return int length this expected Types length if this expected Types Ptr length System arraycopy this expected Types 0 this expected Types new Type Binding length 2 0 length this expected Types this expected Types Ptr type  addExpectedType TypeBinding isValidBinding expectedTypes expectedTypesPtr expectedTypes expectedTypes TypeBinding expectedTypes expectedTypesPtr
private void add Uninteresting Bindings Binding binding if binding null return int length this uninteresting Bindings length if this uninteresting Bindings Ptr length System arraycopy this uninteresting Bindings 0 this uninteresting Bindings new Binding length 2 0 length this uninteresting Bindings this uninteresting Bindings Ptr binding  addUninterestingBindings uninterestingBindings uninterestingBindingsPtr uninterestingBindings uninterestingBindings uninterestingBindings uninterestingBindingsPtr
private char compute Prefix Source Type Binding declaration Type Source Type Binding invocation Type boolean is Static String Buffer completion new String Buffer 10 if is Static completion append declaration Type source Name else if declaration Type invocation Type completion append THIS else if declaration Type is Nested Type completion append declaration Type source Name completion append completion append THIS else if declaration Type is Anonymous Type completion append declaration Type source Name completion append completion append THIS return completion to String to Char Array  computePrefix SourceTypeBinding declarationType SourceTypeBinding invocationType isStatic StringBuffer StringBuffer isStatic declarationType sourceName declarationType invocationType declarationType isNestedType declarationType sourceName declarationType isAnonymousType declarationType sourceName toString toCharArray
private void propose New Method char token Reference Binding reference if requestor instanceof I Extended Completion Requestor I Extended Completion Requestor extended Requestor I Extended Completion Requestor requestor int relevance compute Base Relevance relevance compute Relevance For Interesting Proposal extended Requestor accept Potential Method Declaration reference qualified Package Name reference qualified Source Name token start Position offset end Position offset relevance  proposeNewMethod ReferenceBinding IExtendedCompletionRequestor IExtendedCompletionRequestor extendedRequestor IExtendedCompletionRequestor computeBaseRelevance computeRelevanceForInterestingProposal extendedRequestor acceptPotentialMethodDeclaration qualifiedPackageName qualifiedSourceName startPosition endPosition

public interface I Extended Completion Requestor extends I Completion Requestor void accept Potential Method Declaration char declaring Type Package Name char declaring Type Name char selector int completion Start int completion End  IExtendedCompletionRequestor ICompletionRequestor acceptPotentialMethodDeclaration declaringTypePackageName declaringTypeName completionStart completionEnd

Initializing the assist options with default settings public Assist Options Initializing the assist options with default settings  AssistOptions
Initializing the assist options with external settings public Assist Options Map settings if settings null return set settings  AssistOptions
public void set Map options Map Object option Value if option Value options Map get OPTION PerformVisibilityCheck null if ENABLED equals option Value this check Visibility true else if DISABLED equals option Value this check Visibility false if option Value options Map get OPTION ForceImplicitQualification null if ENABLED equals option Value this force Implicit Qualification true else if DISABLED equals option Value this force Implicit Qualification false if option Value options Map get OPTION FieldPrefixes null if option Value instanceof String String string Value String option Value if string Value length 0 this field Prefixes Char Operation split And Trim On string Value to Char Array else this field Prefixes null if option Value options Map get OPTION StaticFieldPrefixes null if option Value instanceof String String string Value String option Value if string Value length 0 this static Field Prefixes Char Operation split And Trim On string Value to Char Array else this static Field Prefixes null if option Value options Map get OPTION LocalPrefixes null if option Value instanceof String String string Value String option Value if string Value length 0 this local Prefixes Char Operation split And Trim On string Value to Char Array else this local Prefixes null if option Value options Map get OPTION ArgumentPrefixes null if option Value instanceof String String string Value String option Value if string Value length 0 this argument Prefixes Char Operation split And Trim On string Value to Char Array else this argument Prefixes null if option Value options Map get OPTION FieldSuffixes null if option Value instanceof String String string Value String option Value if string Value length 0 this field Suffixes Char Operation split And Trim On string Value to Char Array else this field Suffixes null if option Value options Map get OPTION StaticFieldSuffixes null if option Value instanceof String String string Value String option Value if string Value length 0 this static Field Suffixes Char Operation split And Trim On string Value to Char Array else this static Field Suffixes null if option Value options Map get OPTION LocalSuffixes null if option Value instanceof String String string Value String option Value if string Value length 0 this local Suffixes Char Operation split And Trim On string Value to Char Array else this local Suffixes null if option Value options Map get OPTION ArgumentSuffixes null if option Value instanceof String String string Value String option Value if string Value length 0 this argument Suffixes Char Operation split And Trim On string Value to Char Array else this argument Suffixes null  optionsMap optionValue optionValue optionsMap OPTION_PerformVisibilityCheck optionValue checkVisibility optionValue checkVisibility optionValue optionsMap OPTION_ForceImplicitQualification optionValue forceImplicitQualification optionValue forceImplicitQualification optionValue optionsMap OPTION_FieldPrefixes optionValue stringValue optionValue stringValue fieldPrefixes CharOperation splitAndTrimOn stringValue toCharArray fieldPrefixes optionValue optionsMap OPTION_StaticFieldPrefixes optionValue stringValue optionValue stringValue staticFieldPrefixes CharOperation splitAndTrimOn stringValue toCharArray staticFieldPrefixes optionValue optionsMap OPTION_LocalPrefixes optionValue stringValue optionValue stringValue localPrefixes CharOperation splitAndTrimOn stringValue toCharArray localPrefixes optionValue optionsMap OPTION_ArgumentPrefixes optionValue stringValue optionValue stringValue argumentPrefixes CharOperation splitAndTrimOn stringValue toCharArray argumentPrefixes optionValue optionsMap OPTION_FieldSuffixes optionValue stringValue optionValue stringValue fieldSuffixes CharOperation splitAndTrimOn stringValue toCharArray fieldSuffixes optionValue optionsMap OPTION_StaticFieldSuffixes optionValue stringValue optionValue stringValue staticFieldSuffixes CharOperation splitAndTrimOn stringValue toCharArray staticFieldSuffixes optionValue optionsMap OPTION_LocalSuffixes optionValue stringValue optionValue stringValue localSuffixes CharOperation splitAndTrimOn stringValue toCharArray localSuffixes optionValue optionsMap OPTION_ArgumentSuffixes optionValue stringValue optionValue stringValue argumentSuffixes CharOperation splitAndTrimOn stringValue toCharArray argumentSuffixes

protected boolean is First false public Assist Parser Problem Reporter problem Reporter super problem Reporter true this javadoc Parser check Doc Comment false  isFirst AssistParser ProblemReporter problemReporter problemReporter javadocParser checkDocComment
this javadoc Parser check Doc Comment false public abstract char assist Identifier  javadocParser checkDocComment assistIdentifier
public abstract char assist Identifier public int body End Abstract Method Declaration method return method body End  assistIdentifier bodyEnd AbstractMethodDeclaration bodyEnd
return method body End public int body End Initializer initializer return initializer declaration Source End  bodyEnd bodyEnd declarationSourceEnd
public Recovered Element build Initial Recovery State recovery in unit structure if reference Context instanceof Compilation Unit Declaration Recovered Element element super build Initial Recovery State flush Assist State flush Element Stack return element recovery in method body last Check Point 0 Recovered Element element null if reference Context instanceof Abstract Method Declaration element new Recovered Method Abstract Method Declaration reference Context null 0 this last Check Point Abstract Method Declaration reference Context body Start else Initializer bodies are parsed in the context of the type declaration we must thus search it inside if reference Context instanceof Type Declaration Type Declaration type Type Declaration reference Context for int i 0 i type fields length i Field Declaration field type fields i if field null field is Field field declaration Source Start scanner initial Position scanner initial Position field declaration Source End scanner eof Position field declaration Source End 1 element new Recovered Initializer field null 1 this last Check Point field declaration Source Start break if element null return element add initial block Block block new Block 0 int last Start block Starts 0 block source Start last Start element element add block 1 int block Index 1 ignore first block start since manually rebuilt here for int i 0 i ast Ptr i AST Node node ast Stack i check for intermediate block creation so recovery can properly close them afterwards int node Start node source Start for int j block Index j real Block Ptr j if block Starts j node Start block Index j shift the index to the new block break if block Starts j last Start avoid multiple block if at same position block new Block 0 block source Start last Start block Starts j element element add block 1 block Index j 1 shift the index to the new block if node instanceof Local Declaration Local Declaration local Local Declaration node if local declaration Source End 0 element element add local 0 if local initialization null last Check Point local source End 1 else last Check Point local initialization source End 1 else element element add local 0 last Check Point local declaration Source End 1 continue if node instanceof Abstract Method Declaration Abstract Method Declaration method Abstract Method Declaration node if method declaration Source End 0 element element add method 0 last Check Point method body Start else element element add method 0 last Check Point method declaration Source End 1 continue if node instanceof Initializer Initializer initializer Initializer node if initializer declaration Source End 0 element element add initializer 1 last Check Point initializer source Start else element element add initializer 0 last Check Point initializer declaration Source End 1 continue if node instanceof Field Declaration Field Declaration field Field Declaration node if field declaration Source End 0 element element add field 0 if field initialization null last Check Point field source End 1 else last Check Point field initialization source End 1 else element element add field 0 last Check Point field declaration Source End 1 continue if node instanceof Type Declaration Type Declaration type Type Declaration node if type declaration Source End 0 element element add type 0 last Check Point type body Start else element element add type 0 last Check Point type declaration Source End 1 continue if node instanceof Import Reference Import Reference import Ref Import Reference node element element add import Ref 0 last Check Point import Ref declaration Source End 1 if this current Token Token NameRBRACE this current Token 0 closing brace has already been taken care of might need some extra block after the last reduced node int pos this assist Node null last Check Point this assist Node source Start for int j block Index j real Block Ptr j if block Starts j pos block Starts j last Start avoid multiple block if at same position block new Block 0 block source Start last Start block Starts j element element add block 1 return element  RecoveredElement buildInitialRecoveryState referenceContext CompilationUnitDeclaration RecoveredElement buildInitialRecoveryState flushAssistState flushElementStack lastCheckPoint RecoveredElement referenceContext AbstractMethodDeclaration RecoveredMethod AbstractMethodDeclaration referenceContext lastCheckPoint AbstractMethodDeclaration referenceContext bodyStart referenceContext TypeDeclaration TypeDeclaration TypeDeclaration referenceContext FieldDeclaration isField declarationSourceStart initialPosition initialPosition declarationSourceEnd eofPosition declarationSourceEnd RecoveredInitializer lastCheckPoint declarationSourceStart lastStart blockStarts sourceStart lastStart blockIndex astPtr ASTNode astStack nodeStart sourceStart blockIndex realBlockPtr blockStarts nodeStart blockIndex blockStarts lastStart sourceStart lastStart blockStarts blockIndex LocalDeclaration LocalDeclaration LocalDeclaration declarationSourceEnd lastCheckPoint sourceEnd lastCheckPoint sourceEnd lastCheckPoint declarationSourceEnd AbstractMethodDeclaration AbstractMethodDeclaration AbstractMethodDeclaration declarationSourceEnd lastCheckPoint bodyStart lastCheckPoint declarationSourceEnd declarationSourceEnd lastCheckPoint sourceStart lastCheckPoint declarationSourceEnd FieldDeclaration FieldDeclaration FieldDeclaration declarationSourceEnd lastCheckPoint sourceEnd lastCheckPoint sourceEnd lastCheckPoint declarationSourceEnd TypeDeclaration TypeDeclaration TypeDeclaration declarationSourceEnd lastCheckPoint bodyStart lastCheckPoint declarationSourceEnd ImportReference ImportReference importRef ImportReference importRef lastCheckPoint importRef declarationSourceEnd currentToken TokenNameRBRACE currentToken assistNode lastCheckPoint assistNode sourceStart blockIndex realBlockPtr blockStarts blockStarts lastStart sourceStart lastStart blockStarts
return element protected void consume Class Body Declaration pop Element K METHOD DELIMITER super consume Class Body Declaration  consumeClassBodyDeclaration popElement K_METHOD_DELIMITER consumeClassBodyDeclaration
super consume Class Body Declaration protected void consume Class Bodyopt super consume Class Bodyopt pop Element K SELECTOR  consumeClassBodyDeclaration consumeClassBodyopt consumeClassBodyopt popElement K_SELECTOR
pop Element K SELECTOR protected void consume Class Header super consume Class Header push On Element Stack K TYPE DELIMITER  popElement K_SELECTOR consumeClassHeader consumeClassHeader pushOnElementStack K_TYPE_DELIMITER
push On Element Stack K TYPE DELIMITER protected void consume Constructor Body super consume Constructor Body pop Element K METHOD DELIMITER  pushOnElementStack K_TYPE_DELIMITER consumeConstructorBody consumeConstructorBody popElement K_METHOD_DELIMITER
pop Element K METHOD DELIMITER protected void consume Constructor Header super consume Constructor Header push On Element Stack K METHOD DELIMITER  popElement K_METHOD_DELIMITER consumeConstructorHeader consumeConstructorHeader pushOnElementStack K_METHOD_DELIMITER
protected void consume Enter Anonymous Class Body super consume Enter Anonymous Class Body pop Element K SELECTOR push On Element Stack K TYPE DELIMITER  consumeEnterAnonymousClassBody consumeEnterAnonymousClassBody popElement K_SELECTOR pushOnElementStack K_TYPE_DELIMITER
push On Element Stack K TYPE DELIMITER protected void consume Explicit Constructor Invocation int flag int rec Flag super consume Explicit Constructor Invocation flag rec Flag pop Element K SELECTOR  pushOnElementStack K_TYPE_DELIMITER consumeExplicitConstructorInvocation recFlag consumeExplicitConstructorInvocation recFlag popElement K_SELECTOR
protected void consume Force No Diet super consume Force No Diet if we are not in a method ie we are not in a local variable initializer then we are entering a field initializer if is Inside Method push On Element Stack K FIELD INITIALIZER DELIMITER  consumeForceNoDiet consumeForceNoDiet isInsideMethod pushOnElementStack K_FIELD_INITIALIZER_DELIMITER
protected void consume Interface Header super consume Interface Header push On Element Stack K TYPE DELIMITER  consumeInterfaceHeader consumeInterfaceHeader pushOnElementStack K_TYPE_DELIMITER
push On Element Stack K TYPE DELIMITER protected void consume Method Body super consume Method Body pop Element K METHOD DELIMITER  pushOnElementStack K_TYPE_DELIMITER consumeMethodBody consumeMethodBody popElement K_METHOD_DELIMITER
pop Element K METHOD DELIMITER protected void consume Method Header super consume Method Header push On Element Stack K METHOD DELIMITER  popElement K_METHOD_DELIMITER consumeMethodHeader consumeMethodHeader pushOnElementStack K_METHOD_DELIMITER
protected void consume Method Invocation Name super consume Method Invocation Name pop Element K SELECTOR Message Send message Send Message Send expression Stack expression Ptr if message Send assist Node this last Check Point message Send source End 1  consumeMethodInvocationName consumeMethodInvocationName popElement K_SELECTOR MessageSend messageSend MessageSend expressionStack expressionPtr messageSend assistNode lastCheckPoint messageSend sourceEnd
protected void consume Method Invocation Primary super consume Method Invocation Primary pop Element K SELECTOR Message Send message Send Message Send expression Stack expression Ptr if message Send assist Node this last Check Point message Send source End 1  consumeMethodInvocationPrimary consumeMethodInvocationPrimary popElement K_SELECTOR MessageSend messageSend MessageSend expressionStack expressionPtr messageSend assistNode lastCheckPoint messageSend sourceEnd
protected void consume Method Invocation Super super consume Method Invocation Super pop Element K SELECTOR Message Send message Send Message Send expression Stack expression Ptr if message Send assist Node this last Check Point message Send source End 1  consumeMethodInvocationSuper consumeMethodInvocationSuper popElement K_SELECTOR MessageSend messageSend MessageSend expressionStack expressionPtr messageSend assistNode lastCheckPoint messageSend sourceEnd
protected void consume Nested Method super consume Nested Method if is Inside Method push On Element Stack K METHOD DELIMITER  consumeNestedMethod consumeNestedMethod isInsideMethod pushOnElementStack K_METHOD_DELIMITER
protected void consume Open Block Open Block empty super consume Open Block int stack Length this block Starts length if this real Block Ptr stack Length System arraycopy this block Starts 0 this block Starts new int stack Length Stack Increment 0 stack Length this block Starts this real Block Ptr scanner start Position  consumeOpenBlock OpenBlock consumeOpenBlock stackLength blockStarts realBlockPtr stackLength blockStarts blockStarts stackLength StackIncrement stackLength blockStarts realBlockPtr startPosition
protected void consume Package Declaration Name Package Declaration Name package Name build an Import Ref build from the last name stored in the identifier stack int index no need to take action if not inside assist identifiers if index index Of Assist Identifier 0 super consume Package Declaration Name return retrieve identifiers subset and whole positions the assist node positions should include the entire replaced source int length identifier Length Stack identifier Length Ptr char subset identifier Sub Set index 1 include the assist Identifier identifier Length Ptr identifier Ptr length long positions new long length System arraycopy identifier Position Stack identifier Ptr 1 positions 0 length build specific assist node on package statement Import Reference reference this create Assist Package Reference subset positions assist Node reference this last Check Point reference source End 1 compilation Unit current Package reference if current Token Token NameSEMICOLON reference declaration Source End scanner current Position 1 else reference declaration Source End int positions length 1 end Position is just before the reference declaration Source Start int Stack int Ptr flush comments defined prior to import statements reference declaration Source End this flush Comments Defined Prior To reference declaration Source End recovery if current Element null last Check Point reference declaration Source End 1 restart Recovery true used to avoid branching back into the regular automaton  consumePackageDeclarationName PackageDeclarationName ImportRef indexOfAssistIdentifier consumePackageDeclarationName identifierLengthStack identifierLengthPtr identifierSubSet assistIdentifier identifierLengthPtr identifierPtr identifierPositionStack identifierPtr ImportReference createAssistPackageReference assistNode lastCheckPoint sourceEnd compilationUnit currentPackage currentToken TokenNameSEMICOLON declarationSourceEnd currentPosition declarationSourceEnd endPosition declarationSourceStart intStack intPtr declarationSourceEnd flushCommentsDefinedPriorTo declarationSourceEnd currentElement lastCheckPoint declarationSourceEnd restartRecovery
protected void consume Restore Diet super consume Restore Diet if we are not in a method ie we were not in a local variable initializer then we are exiting a field initializer if is Inside Method pop Element K FIELD INITIALIZER DELIMITER  consumeRestoreDiet consumeRestoreDiet isInsideMethod popElement K_FIELD_INITIALIZER_DELIMITER
protected void consume Single Type Import Declaration Name Single Type Import Declaration Name import Name push an Import Ref build from the last name stored in the identifier stack int index no need to take action if not inside assist identifiers if index index Of Assist Identifier 0 super consume Single Type Import Declaration Name return retrieve identifiers subset and whole positions the assist node positions should include the entire replaced source int length identifier Length Stack identifier Length Ptr char subset identifier Sub Set index 1 include the assist Identifier identifier Length Ptr identifier Ptr length long positions new long length System arraycopy identifier Position Stack identifier Ptr 1 positions 0 length build specific assist node on import statement Import Reference reference this create Assist Import Reference subset positions Acc Default assist Node reference this last Check Point reference source End 1 push On Ast Stack reference if current Token Token NameSEMICOLON reference declaration Source End scanner current Position 1 else reference declaration Source End int positions length 1 end Position is just before the reference declaration Source Start int Stack int Ptr flush comments defined prior to import statements reference declaration Source End this flush Comments Defined Prior To reference declaration Source End recovery if current Element null last Check Point reference declaration Source End 1 current Element current Element add reference 0 last Ignored Token 1 restart Recovery true used to avoid branching back into the regular automaton  consumeSingleTypeImportDeclarationName SingleTypeImportDeclarationName ImportRef indexOfAssistIdentifier consumeSingleTypeImportDeclarationName identifierLengthStack identifierLengthPtr identifierSubSet assistIdentifier identifierLengthPtr identifierPtr identifierPositionStack identifierPtr ImportReference createAssistImportReference AccDefault assistNode lastCheckPoint sourceEnd pushOnAstStack currentToken TokenNameSEMICOLON declarationSourceEnd currentPosition declarationSourceEnd endPosition declarationSourceStart intStack intPtr declarationSourceEnd flushCommentsDefinedPriorTo declarationSourceEnd currentElement lastCheckPoint declarationSourceEnd currentElement currentElement lastIgnoredToken restartRecovery
protected void consume Static Initializer super consume Static Initializer pop Element K METHOD DELIMITER  consumeStaticInitializer consumeStaticInitializer popElement K_METHOD_DELIMITER
pop Element K METHOD DELIMITER protected void consume Static Only super consume Static Only push On Element Stack K METHOD DELIMITER  popElement K_METHOD_DELIMITER consumeStaticOnly consumeStaticOnly pushOnElementStack K_METHOD_DELIMITER
protected void consume Token int token super consume Token token if is First is First false return register message send selector only if inside a method or if looking at a field initializer and if the current token is an open parenthesis if is Inside Method is Inside Field Initialization switch token case Token NameLPAREN switch this previous Token case Token Name Identifier this push On Element Stack K SELECTOR this identifier Ptr break case Token Namethis explicit constructor invocation eg this 1 2 this push On Element Stack K SELECTOR THIS CONSTRUCTOR break case Token Namesuper explicit constructor invocation eg super 1 2 this push On Element Stack K SELECTOR SUPER CONSTRUCTOR break break else switch token case Token NameRBRACE if top Known Element Kind ASSIST PARSER K TYPE DELIMITER pop Element K TYPE DELIMITER break this previous Token token if token Token Name Identifier this previous Identifier Ptr this identifier Ptr  consumeToken consumeToken isFirst isFirst isInsideMethod isInsideFieldInitialization TokenNameLPAREN previousToken TokenNameIdentifier pushOnElementStack K_SELECTOR identifierPtr TokenNamethis pushOnElementStack K_SELECTOR THIS_CONSTRUCTOR TokenNamesuper pushOnElementStack K_SELECTOR SUPER_CONSTRUCTOR TokenNameRBRACE topKnownElementKind ASSIST_PARSER K_TYPE_DELIMITER popElement K_TYPE_DELIMITER previousToken TokenNameIdentifier previousIdentifierPtr identifierPtr
protected void consume Type Import On Demand Declaration Name Type Import On Demand Declaration Name import Name push an Import Ref build from the last name stored in the identifier stack int index no need to take action if not inside assist identifiers if index index Of Assist Identifier 0 super consume Type Import On Demand Declaration Name return retrieve identifiers subset and whole positions the assist node positions should include the entire replaced source int length identifier Length Stack identifier Length Ptr char subset identifier Sub Set index 1 include the assist Identifier identifier Length Ptr identifier Ptr length long positions new long length System arraycopy identifier Position Stack identifier Ptr 1 positions 0 length build specific assist node on import statement Import Reference reference this create Assist Import Reference subset positions Acc Default reference on Demand true assist Node reference this last Check Point reference source End 1 push On Ast Stack reference if current Token Token NameSEMICOLON reference declaration Source End scanner current Position 1 else reference declaration Source End int positions length 1 end Position is just before the reference declaration Source Start int Stack int Ptr flush comments defined prior to import statements reference declaration Source End this flush Comments Defined Prior To reference declaration Source End recovery if current Element null last Check Point reference declaration Source End 1 current Element current Element add reference 0 last Ignored Token 1 restart Recovery true used to avoid branching back into the regular automaton  consumeTypeImportOnDemandDeclarationName TypeImportOnDemandDeclarationName ImportRef indexOfAssistIdentifier consumeTypeImportOnDemandDeclarationName identifierLengthStack identifierLengthPtr identifierSubSet assistIdentifier identifierLengthPtr identifierPtr identifierPositionStack identifierPtr ImportReference createAssistImportReference AccDefault onDemand assistNode lastCheckPoint sourceEnd pushOnAstStack currentToken TokenNameSEMICOLON declarationSourceEnd currentPosition declarationSourceEnd endPosition declarationSourceStart intStack intPtr declarationSourceEnd flushCommentsDefinedPriorTo declarationSourceEnd currentElement lastCheckPoint declarationSourceEnd currentElement currentElement lastIgnoredToken restartRecovery
public abstract Import Reference create Assist Import Reference char tokens long positions int mod  ImportReference createAssistImportReference
public abstract Import Reference create Assist Import Reference char tokens long positions int mod public abstract Import Reference create Assist Package Reference char tokens long positions  ImportReference createAssistImportReference ImportReference createAssistPackageReference
public abstract Import Reference create Assist Import Reference char tokens long positions int mod public abstract Import Reference create Assist Package Reference char tokens long positions public abstract Name Reference create Qualified Assist Name Reference char previous Identifiers char assist Name long positions  ImportReference createAssistImportReference ImportReference createAssistPackageReference NameReference createQualifiedAssistNameReference previousIdentifiers assistName
public abstract Import Reference create Assist Package Reference char tokens long positions public abstract Name Reference create Qualified Assist Name Reference char previous Identifiers char assist Name long positions public abstract Type Reference create Qualified Assist Type Reference char previous Identifiers char assist Name long positions  ImportReference createAssistPackageReference NameReference createQualifiedAssistNameReference previousIdentifiers assistName TypeReference createQualifiedAssistTypeReference previousIdentifiers assistName
public abstract Name Reference create Qualified Assist Name Reference char previous Identifiers char assist Name long positions public abstract Type Reference create Qualified Assist Type Reference char previous Identifiers char assist Name long positions public abstract Name Reference create Single Assist Name Reference char assist Name long position  NameReference createQualifiedAssistNameReference previousIdentifiers assistName TypeReference createQualifiedAssistTypeReference previousIdentifiers assistName NameReference createSingleAssistNameReference assistName
public abstract Type Reference create Qualified Assist Type Reference char previous Identifiers char assist Name long positions public abstract Name Reference create Single Assist Name Reference char assist Name long position public abstract Type Reference create Single Assist Type Reference char assist Name long position  TypeReference createQualifiedAssistTypeReference previousIdentifiers assistName NameReference createSingleAssistNameReference assistName TypeReference createSingleAssistTypeReference assistName
public void flush Assist State this assist Node null this is Orphan Completion Node false this set Assist Identifier null  flushAssistState assistNode isOrphanCompletionNode setAssistIdentifier
protected void flush Element Stack this element Ptr 1 this previous Kind 0 this previous Info 0  flushElementStack elementPtr previousKind previousInfo
protected Type Reference get Type Reference int dim int index no need to take action if not inside completed identifiers if index index Of Assist Identifier 0 return super get Type Reference dim retrieve identifiers subset and whole positions the assist node positions should include the entire replaced source int length identifier Length Stack identifier Length Ptr char subset identifier Sub Set index identifier Length Ptr identifier Ptr length long positions new long length System arraycopy identifier Position Stack identifier Ptr 1 positions 0 length build specific assist on type reference Type Reference reference if index 0 assist inside first identifier reference this create Single Assist Type Reference assist Identifier positions 0 else assist inside subsequent identifier reference this create Qualified Assist Type Reference subset assist Identifier positions assist Node reference this last Check Point reference source End 1 return reference  TypeReference getTypeReference indexOfAssistIdentifier getTypeReference identifierLengthStack identifierLengthPtr identifierSubSet identifierLengthPtr identifierPtr identifierPositionStack identifierPtr TypeReference createSingleAssistTypeReference assistIdentifier createQualifiedAssistTypeReference assistIdentifier assistNode lastCheckPoint sourceEnd
protected Name Reference get Unspecified Reference Optimized int completion Index no need to take action if not inside completed identifiers if completion Index index Of Assist Identifier 0 return super get Unspecified Reference Optimized retrieve identifiers subset and whole positions the completion node positions should include the entire replaced source int length identifier Length Stack identifier Length Ptr char subset identifier Sub Set completion Index identifier Length Ptr identifier Ptr length long positions new long length System arraycopy identifier Position Stack identifier Ptr 1 positions 0 length build specific completion on name reference Name Reference reference if completion Index 0 completion inside first identifier reference this create Single Assist Name Reference assist Identifier positions 0 else completion inside subsequent identifier reference this create Qualified Assist Name Reference subset assist Identifier positions reference bits AST Node Restrictive FlagMASK reference bits LOCAL FIELD assist Node reference last Check Point reference source End 1 return reference  NameReference getUnspecifiedReferenceOptimized completionIndex completionIndex indexOfAssistIdentifier getUnspecifiedReferenceOptimized identifierLengthStack identifierLengthPtr identifierSubSet completionIndex identifierLengthPtr identifierPtr identifierPositionStack identifierPtr NameReference completionIndex createSingleAssistNameReference assistIdentifier createQualifiedAssistNameReference assistIdentifier ASTNode RestrictiveFlagMASK assistNode lastCheckPoint sourceEnd
return reference public void go For Block Statementsopt super go For Block Statementsopt is First true  goForBlockStatementsopt goForBlockStatementsopt isFirst
is First true public void go For Headers super go For Headers is First true  isFirst goForHeaders goForHeaders isFirst
is First true public void go For Compilation Unit super go For Compilation Unit is First true  isFirst goForCompilationUnit goForCompilationUnit isFirst
is First true public void go For Block Statements Or Catch Header super go For Block Statements Or Catch Header is First true  isFirst goForBlockStatementsOrCatchHeader goForBlockStatementsOrCatchHeader isFirst
protected char identifier Sub Set int subset Length if subset Length 0 return null char subset System arraycopy identifier Stack identifier Ptr identifier Length Stack identifier Length Ptr 1 subset new char subset Length 0 subset Length return subset  identifierSubSet subsetLength subsetLength identifierStack identifierPtr identifierLengthStack identifierLengthPtr subsetLength subsetLength
protected int index Of Assist Identifier if identifier Length Ptr 0 return 1 no awaiting identifier char assist Identifier if assist Identifier this assist Identifier null return 1 no assist identifier found yet iterate awaiting identifiers backwards int length identifier Length Stack identifier Length Ptr for int i 0 i length i if identifier Stack identifier Ptr i assist Identifier return length i 1 none of the awaiting identifiers is the completion one return 1  indexOfAssistIdentifier identifierLengthPtr assistIdentifier assistIdentifier assistIdentifier identifierLengthStack identifierLengthPtr identifierStack identifierPtr assistIdentifier
public void initialize super initialize this flush Assist State this flush Element Stack this previous Identifier Ptr 1  flushAssistState flushElementStack previousIdentifierPtr
public abstract void initialize Scanner  initializeScanner
public abstract void initialize Scanner protected boolean is Indirectly Inside Field Initialization int i element Ptr while i 1 if element Kind Stack i K FIELD INITIALIZER DELIMITER return true i return false  initializeScanner isIndirectlyInsideFieldInitialization elementPtr elementKindStack K_FIELD_INITIALIZER_DELIMITER
protected boolean is Indirectly Inside Method int i element Ptr while i 1 if element Kind Stack i K METHOD DELIMITER return true i return false  isIndirectlyInsideMethod elementPtr elementKindStack K_METHOD_DELIMITER
protected boolean is Indirectly Inside Type int i element Ptr while i 1 if element Kind Stack i K TYPE DELIMITER return true i return false  isIndirectlyInsideType elementPtr elementKindStack K_TYPE_DELIMITER
protected boolean is Inside Field Initialization int i element Ptr while i 1 switch element Kind Stack i case K TYPE DELIMITER return false case K METHOD DELIMITER return false case K FIELD INITIALIZER DELIMITER return true i return false  isInsideFieldInitialization elementPtr elementKindStack K_TYPE_DELIMITER K_METHOD_DELIMITER K_FIELD_INITIALIZER_DELIMITER
protected boolean is Inside Method int i element Ptr while i 1 switch element Kind Stack i case K TYPE DELIMITER return false case K METHOD DELIMITER return true case K FIELD INITIALIZER DELIMITER return false i return false  isInsideMethod elementPtr elementKindStack K_TYPE_DELIMITER K_METHOD_DELIMITER K_FIELD_INITIALIZER_DELIMITER
protected boolean is Inside Type int i element Ptr while i 1 switch element Kind Stack i case K TYPE DELIMITER return true case K METHOD DELIMITER return false case K FIELD INITIALIZER DELIMITER return false i return false  isInsideType elementPtr elementKindStack K_TYPE_DELIMITER K_METHOD_DELIMITER K_FIELD_INITIALIZER_DELIMITER
protected int last Index Of Element int kind int i element Ptr while i 1 if element Kind Stack i kind return i i return 1  lastIndexOfElement elementPtr elementKindStack
Parse the block statements inside the given method declaration and try to complete at the cursor location public void parse Block Statements Abstract Method Declaration md Compilation Unit Declaration unit if md instanceof Method Declaration parse Block Statements Method Declaration md unit else if md instanceof Constructor Declaration parse Block Statements Constructor Declaration md unit  parseBlockStatements AbstractMethodDeclaration CompilationUnitDeclaration MethodDeclaration parseBlockStatements MethodDeclaration ConstructorDeclaration parseBlockStatements ConstructorDeclaration
Parse the block statements inside the given constructor declaration and try to complete at the cursor location public void parse Block Statements Constructor Declaration cd Compilation Unit Declaration unit only parse the method body of cd fill out its statements convert bugs into parse error initialize simulate go For Constructor Body except that we don t want to balance brackets because they are not going to be balanced go For Block Statementsopt reference Context cd compilation Unit unit scanner reset To cd body Start body End cd consume Nested Method try parse catch Abort Compilation ex last Act ERROR ACTION if last Act ERROR ACTION return attach the statements as we might be searching for a reference to a local type cd explicit Declarations real Block Stack real Block Ptr int length if length ast Length Stack ast Length Ptr 0 ast Ptr length if ast Stack ast Ptr 1 instanceof Explicit Constructor Call avoid a is Some Thing that would only be used here BUT what is faster between two alternatives System arraycopy ast Stack ast Ptr 2 cd statements new Statement length 1 0 length 1 cd constructor Call Explicit Constructor Call ast Stack ast Ptr 1 else need to add explicitly the super System arraycopy ast Stack ast Ptr 1 cd statements new Statement length 0 length cd constructor Call Super Reference implicit Super Constructor Call else cd constructor Call Super Reference implicit Super Constructor Call if contains Comment cd body Start cd body End cd bits AST Node Undocumented Empty BlockMASK if cd constructor Call source End 0 cd constructor Call source End cd source End cd constructor Call source Start cd source Start  parseBlockStatements ConstructorDeclaration CompilationUnitDeclaration goForConstructorBody goForBlockStatementsopt referenceContext compilationUnit resetTo bodyStart bodyEnd consumeNestedMethod AbortCompilation lastAct ERROR_ACTION lastAct ERROR_ACTION explicitDeclarations realBlockStack realBlockPtr astLengthStack astLengthPtr astPtr astStack astPtr ExplicitConstructorCall isSomeThing astStack astPtr constructorCall ExplicitConstructorCall astStack astPtr astStack astPtr constructorCall SuperReference implicitSuperConstructorCall constructorCall SuperReference implicitSuperConstructorCall containsComment bodyStart bodyEnd ASTNode UndocumentedEmptyBlockMASK constructorCall sourceEnd constructorCall sourceEnd sourceEnd constructorCall sourceStart sourceStart
Parse the block statements inside the given initializer and try to complete at the cursor location public void parse Block Statements Initializer initializer Type Declaration type Compilation Unit Declaration unit initialize simulate go For Initializer except that we don t want to balance brackets because they are not going to be balanced go For Block Statementsopt reference Context type compilation Unit unit scanner reset To initializer source Start body End initializer just after the beginning consume Nested Method try parse catch Abort Compilation ex last Act ERROR ACTION finally nested Method nested Type if last Act ERROR ACTION return attach the statements as we might be searching for a reference to a local type initializer block explicit Declarations real Block Stack real Block Ptr int length if length ast Length Stack ast Length Ptr 0 System arraycopy ast Stack ast Ptr length 1 initializer block statements new Statement length 0 length else check whether this block at least contains some comment in it if contains Comment initializer block source Start initializer block source End initializer block bits AST Node Undocumented Empty BlockMASK mark initializer with local type if one was found during parsing if type bits AST Node Has Local TypeMASK 0 initializer bits AST Node Has Local TypeMASK  parseBlockStatements TypeDeclaration CompilationUnitDeclaration goForInitializer goForBlockStatementsopt referenceContext compilationUnit resetTo sourceStart bodyEnd consumeNestedMethod AbortCompilation lastAct ERROR_ACTION nestedMethod nestedType lastAct ERROR_ACTION explicitDeclarations realBlockStack realBlockPtr astLengthStack astLengthPtr astStack astPtr containsComment sourceStart sourceEnd ASTNode UndocumentedEmptyBlockMASK ASTNode HasLocalTypeMASK ASTNode HasLocalTypeMASK
Parse the block statements inside the given method declaration and try to complete at the cursor location public void parse Block Statements Method Declaration md Compilation Unit Declaration unit only parse the method body of md fill out method statements convert bugs into parse error if md is Abstract return if md is Native return if md modifiers Acc Semicolon Body 0 return initialize simulate go For Method Body except that we don t want to balance brackets because they are not going to be balanced go For Block Statementsopt reference Context md compilation Unit unit scanner reset To md body Start body End md reset the scanner to parser from down to the cursor location consume Nested Method try parse catch Abort Compilation ex last Act ERROR ACTION finally nested Method nested Type if last Act ERROR ACTION return attach the statements as we might be searching for a reference to a local type md explicit Declarations real Block Stack real Block Ptr int length if length ast Length Stack ast Length Ptr 0 System arraycopy ast Stack ast Ptr length 1 md statements new Statement length 0 length else if contains Comment md body Start md body End md bits AST Node Undocumented Empty BlockMASK  parseBlockStatements MethodDeclaration CompilationUnitDeclaration isAbstract isNative AccSemicolonBody goForMethodBody goForBlockStatementsopt referenceContext compilationUnit resetTo bodyStart bodyEnd consumeNestedMethod AbortCompilation lastAct ERROR_ACTION nestedMethod nestedType lastAct ERROR_ACTION explicitDeclarations realBlockStack realBlockPtr astLengthStack astLengthPtr astStack astPtr containsComment bodyStart bodyEnd ASTNode UndocumentedEmptyBlockMASK
protected void pop Element int kind if element Ptr 0 element Kind Stack element Ptr kind return previous Kind element Kind Stack element Ptr previous Info element Info Stack element Ptr switch kind default element Ptr break  popElement elementPtr elementKindStack elementPtr previousKind elementKindStack elementPtr previousInfo elementInfoStack elementPtr elementPtr
protected void pop Until Element int kind if element Ptr 0 return int i element Ptr while i 0 element Kind Stack i kind i if i 0 if i element Ptr previous Kind element Kind Stack i 1 previous Info element Info Stack i 1 element Ptr i  popUntilElement elementPtr elementPtr elementKindStack elementPtr previousKind elementKindStack previousInfo elementInfoStack elementPtr
protected void prepare For Block Statements this nested Method this nested Type 0 1 this variables Counter this nested Type 0 this real Block Stack this real Block Ptr 1 0 initialize element stack int field Initializer Index last Index Of Element K FIELD INITIALIZER DELIMITER int method Index last Index Of Element K METHOD DELIMITER if method Index field Initializer Index there is no method and no field initializer flush Element Stack else if method Index field Initializer Index pop Until Element K METHOD DELIMITER else pop Until Element K FIELD INITIALIZER DELIMITER  prepareForBlockStatements nestedMethod nestedType variablesCounter nestedType realBlockStack realBlockPtr fieldInitializerIndex lastIndexOfElement K_FIELD_INITIALIZER_DELIMITER methodIndex lastIndexOfElement K_METHOD_DELIMITER methodIndex fieldInitializerIndex flushElementStack methodIndex fieldInitializerIndex popUntilElement K_METHOD_DELIMITER popUntilElement K_FIELD_INITIALIZER_DELIMITER
protected void prepare For Headers nested Method nested Type 0 0 variables Counter nested Type 0 real Block Stack real Block Ptr 0 0 pop Until Element K TYPE DELIMITER  prepareForHeaders nestedMethod nestedType variablesCounter nestedType realBlockStack realBlockPtr popUntilElement K_TYPE_DELIMITER
pop Until Element K TYPE DELIMITER protected void push On Element Stack int kind this push On Element Stack kind 0  popUntilElement K_TYPE_DELIMITER pushOnElementStack pushOnElementStack
protected void push On Element Stack int kind int info if this element Ptr 1 return this previous Kind 0 this previous Info 0 int stack Length this element Kind Stack length if this element Ptr stack Length System arraycopy this element Kind Stack 0 this element Kind Stack new int stack Length Stack Increment 0 stack Length System arraycopy this element Info Stack 0 this element Info Stack new int stack Length Stack Increment 0 stack Length this element Kind Stack this element Ptr kind this element Info Stack this element Ptr info  pushOnElementStack elementPtr previousKind previousInfo stackLength elementKindStack elementPtr stackLength elementKindStack elementKindStack stackLength StackIncrement stackLength elementInfoStack elementInfoStack stackLength StackIncrement stackLength elementKindStack elementPtr elementInfoStack elementPtr
public void recovery Exit From Variable if current Element null current Element instanceof Recovered Field current Element instanceof Recovered Initializer Recovered Element old Element current Element super recovery Exit From Variable if old Element current Element pop Element K FIELD INITIALIZER DELIMITER else super recovery Exit From Variable  recoveryExitFromVariable currentElement currentElement RecoveredField currentElement RecoveredInitializer RecoveredElement oldElement currentElement recoveryExitFromVariable oldElement currentElement popElement K_FIELD_INITIALIZER_DELIMITER recoveryExitFromVariable
public void recovery Token Check Recovered Element old Element current Element switch current Token case Token NameLBRACE super recovery Token Check if current Element instanceof Recovered Initializer if old Element instanceof Recovered Field pop Until Element K FIELD INITIALIZER DELIMITER pop Element K FIELD INITIALIZER DELIMITER if current Element old Element top Known Element Kind ASSIST PARSER K METHOD DELIMITER push On Element Stack K METHOD DELIMITER break case Token NameRBRACE super recovery Token Check if current Element old Element if old Element instanceof Recovered Initializer old Element instanceof Recovered Method old Element instanceof Recovered Block old Element parent instanceof Recovered Initializer pop Until Element K METHOD DELIMITER pop Element K METHOD DELIMITER else if old Element instanceof Recovered Type pop Until Element K TYPE DELIMITER if reference Context instanceof Compilation Unit Declaration is Indirectly Inside Field Initialization current Element instanceof Recovered Unit pop Element K TYPE DELIMITER break default super recovery Token Check break  recoveryTokenCheck RecoveredElement oldElement currentElement currentToken TokenNameLBRACE recoveryTokenCheck currentElement RecoveredInitializer oldElement RecoveredField popUntilElement K_FIELD_INITIALIZER_DELIMITER popElement K_FIELD_INITIALIZER_DELIMITER currentElement oldElement topKnownElementKind ASSIST_PARSER K_METHOD_DELIMITER pushOnElementStack K_METHOD_DELIMITER TokenNameRBRACE recoveryTokenCheck currentElement oldElement oldElement RecoveredInitializer oldElement RecoveredMethod oldElement RecoveredBlock oldElement RecoveredInitializer popUntilElement K_METHOD_DELIMITER popElement K_METHOD_DELIMITER oldElement RecoveredType popUntilElement K_TYPE_DELIMITER referenceContext CompilationUnitDeclaration isIndirectlyInsideFieldInitialization currentElement RecoveredUnit popElement K_TYPE_DELIMITER recoveryTokenCheck
public void reset this flush Assist State  flushAssistState
protected boolean resume After Recovery reset internal stacks ast Ptr 1 ast Length Ptr 1 expression Ptr 1 expression Length Ptr 1 identifier Ptr 1 identifier Length Ptr 1 int Ptr 1 dimensions 0 recovered Static Initializer Start 0 if in diet mode reset the diet counter because we re going to restart outside an initializer if diet diet Int 0 attempt to move checkpoint location if this move Recovery Checkpoint return false only look for headers if reference Context instanceof Compilation Unit Declaration this assist Node null if is Inside Method is Indirectly Inside Field Initialization this assist Node null this prepare For Block Statements go For Block Statements Or Catch Header else this prepare For Headers go For Headers diet true passed this point will not consider method bodies return true if reference Context instanceof Abstract Method Declaration reference Context instanceof Type Declaration if current Element instanceof Recovered Type this prepare For Headers go For Headers else this prepare For Block Statements go For Block Statements Or Catch Header return true does not know how to restart return false  resumeAfterRecovery astPtr astLengthPtr expressionPtr expressionLengthPtr identifierPtr identifierLengthPtr intPtr recoveredStaticInitializerStart dietInt moveRecoveryCheckpoint referenceContext CompilationUnitDeclaration assistNode isInsideMethod isIndirectlyInsideFieldInitialization assistNode prepareForBlockStatements goForBlockStatementsOrCatchHeader prepareForHeaders goForHeaders referenceContext AbstractMethodDeclaration referenceContext TypeDeclaration currentElement RecoveredType prepareForHeaders goForHeaders prepareForBlockStatements goForBlockStatementsOrCatchHeader
return false public abstract void set Assist Identifier char assist Ident  setAssistIdentifier assistIdent
public abstract void set Assist Identifier char assist Ident protected int top Known Element Info int owner return top Known Element Info owner 0  setAssistIdentifier assistIdent topKnownElementInfo topKnownElementInfo
protected int top Known Element Info int owner int off Set int i element Ptr while i 1 if element Kind Stack i owner 0 if off Set 0 return element Info Stack i off Set i return 0  topKnownElementInfo offSet elementPtr elementKindStack offSet elementInfoStack offSet
return 0 protected int top Known Element Kind int owner return top Known Element Kind owner 0  topKnownElementKind topKnownElementKind
protected int top Known Element Kind int owner int off Set int i element Ptr while i 1 if element Kind Stack i owner 0 if off Set 0 return element Kind Stack i off Set i return 0  topKnownElementKind offSet elementPtr elementKindStack offSet elementKindStack offSet
If the given ast node is inside an explicit constructor call then wrap it with a fake constructor call Returns the wrapped completion node or the completion node itself protected AST Node wrap With Explicit Constructor Call If Needed AST Node ast int selector if ast null top Known Element Kind ASSIST PARSER K SELECTOR ast instanceof Expression selector top Known Element Info ASSIST PARSER THIS CONSTRUCTOR selector SUPER CONSTRUCTOR Explicit Constructor Call call new Explicit Constructor Call selector THIS CONSTRUCTOR Explicit Constructor Call This Explicit Constructor Call Super call arguments new Expression Expression ast call source Start ast source Start call source End ast source End return call else return ast  ASTNode wrapWithExplicitConstructorCallIfNeeded ASTNode topKnownElementKind ASSIST_PARSER K_SELECTOR topKnownElementInfo ASSIST_PARSER THIS_CONSTRUCTOR SUPER_CONSTRUCTOR ExplicitConstructorCall ExplicitConstructorCall THIS_CONSTRUCTOR ExplicitConstructorCall ExplicitConstructorCall sourceStart sourceStart sourceEnd sourceEnd

public Compiler Options compiler Options public Engine Map settings this options new Assist Options settings this compiler Options new Compiler Options settings  CompilerOptions compilerOptions AssistOptions compilerOptions CompilerOptions
Add an additional binary type public void accept I Binary Type binary Type Package Binding package Binding lookup Environment create Binary Type From binary Type package Binding  IBinaryType binaryType PackageBinding packageBinding lookupEnvironment createBinaryTypeFrom binaryType packageBinding
Add an additional compilation unit public void accept I Compilation Unit source Unit Compilation Result result new Compilation Result source Unit 1 1 this compiler Options max Problems Per Unit Compilation Unit Declaration parsed Unit this get Parser diet Parse source Unit result lookup Environment build Type Bindings parsed Unit lookup Environment complete Type Bindings parsed Unit true  ICompilationUnit sourceUnit CompilationResult CompilationResult sourceUnit compilerOptions maxProblemsPerUnit CompilationUnitDeclaration parsedUnit getParser dietParse sourceUnit lookupEnvironment buildTypeBindings parsedUnit lookupEnvironment completeTypeBindings parsedUnit
Add additional source types the first one is the requested type the rest is formed by the secondary types defined in the same compilation unit public void accept I Source Type source Types Package Binding package Binding Compilation Result result new Compilation Result source Types 0 get File Name 1 1 this compiler Options max Problems Per Unit Compilation Unit Declaration unit Source Type Converter build Compilation Unit source Types source Types 0 is always toplevel here Source Type Converter FIELD AND METHOD need field and methods Source Type Converter MEMBER TYPE need member types no need for field initialization lookup Environment problem Reporter result if unit null lookup Environment build Type Bindings unit lookup Environment complete Type Bindings unit true  ISourceType sourceTypes PackageBinding packageBinding CompilationResult CompilationResult sourceTypes getFileName compilerOptions maxProblemsPerUnit CompilationUnitDeclaration SourceTypeConverter buildCompilationUnit sourceTypes sourceTypes SourceTypeConverter FIELD_AND_METHOD SourceTypeConverter MEMBER_TYPE lookupEnvironment problemReporter lookupEnvironment buildTypeBindings lookupEnvironment completeTypeBindings
public abstract Assist Parser get Parser  AssistParser getParser
protected boolean must Qualify Type char package Name char type Name If there are no types defined into the current CU yet if unit Scope null return true char compound Package Name Char Operation split On package Name char readable Type Name Char Operation concat package Name type Name if Char Operation equals unit Scope f Package compound Name compound Package Name return false Import Binding imports unit Scope imports if imports null for int i 0 length imports length i length i if imports i on Demand if Char Operation equals imports i compound Name compound Package Name for int j 0 j imports length j if i j if imports j on Demand if name Environment find Type type Name imports j compound Name null return true else if Char Operation equals Char Operation last Segment imports j readable Name type Name Char Operation equals imports j compound Name Char Operation split On readable Type Name return true return false how do you match p1 p2 A else if Char Operation equals imports i readable Name readable Type Name return false return true  mustQualifyType packageName typeName unitScope compoundPackageName CharOperation splitOn packageName readableTypeName CharOperation packageName typeName CharOperation unitScope fPackage compoundName compoundPackageName ImportBinding unitScope onDemand CharOperation compoundName compoundPackageName onDemand nameEnvironment findType typeName compoundName CharOperation CharOperation lastSegment readableName typeName CharOperation compoundName CharOperation splitOn readableTypeName CharOperation readableName readableTypeName
protected AST Node parse Block Statements Compilation Unit Declaration unit int position int length unit types length for int i 0 i length i Type Declaration type unit types i if type declaration Source Start position type declaration Source End position get Parser scanner set Source unit compilation Result compilation Unit get Contents return parse Block Statements type unit position return null  ASTNode parseBlockStatements CompilationUnitDeclaration TypeDeclaration declarationSourceStart declarationSourceEnd getParser setSource compilationResult compilationUnit getContents parseBlockStatements
private AST Node parse Block Statements Type Declaration type Compilation Unit Declaration unit int position members Type Declaration member Types type member Types if member Types null int length member Types length for int i 0 i length i Type Declaration member Type member Types i if member Type body Start position continue if member Type declaration Source End position return parse Block Statements member Type unit position methods Abstract Method Declaration methods type methods if methods null int length methods length for int i 0 i length i Abstract Method Declaration method methods i if method body Start position continue if method declaration Source End position get Parser parse Block Statements method unit return method initializers Field Declaration fields type fields if fields null int length fields length for int i 0 i length i Field Declaration field fields i if field source Start position continue if field declaration Source End position if field instanceof Initializer get Parser parse Block Statements Initializer field type unit return field return null  ASTNode parseBlockStatements TypeDeclaration CompilationUnitDeclaration TypeDeclaration memberTypes memberTypes memberTypes memberTypes TypeDeclaration memberType memberTypes memberType bodyStart memberType declarationSourceEnd parseBlockStatements memberType AbstractMethodDeclaration AbstractMethodDeclaration bodyStart declarationSourceEnd getParser parseBlockStatements FieldDeclaration FieldDeclaration sourceStart declarationSourceEnd getParser parseBlockStatements
protected void reset lookup Environment reset  lookupEnvironment

Find the packages that start with the given prefix A valid prefix is a qualified name separated by periods ex java util The packages found are passed to I Search Requestor accept Package char package Name  ISearchRequestor acceptPackage packageName
Find the top level types classes and interfaces that are defined in the current environment and whose name starts with the given prefix The prefix is a qualified name separated by periods or a simple name ex java util V or V The types found are passed to one of the following methods if additional information is known about the types I Search Requestor accept Type char package Name char type Name I Search Requestor accept Class char package Name char type Name int modifiers I Search Requestor accept Interface char package Name char type Name int modifiers This method can not be used to find member types member types are found relative to their enclosing type  ISearchRequestor acceptType packageName typeName ISearchRequestor acceptClass packageName typeName ISearchRequestor acceptInterface packageName typeName

One result of the search consists of a new class NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array 
One result of the search consists of a new interface NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A I The default package is represented by an empty array 
One result of the search consists of a new package NOTE All package names are presented in their readable form Package names are in the form a b c The default package is represented by an empty array 
One result of the search consists of a new type NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array 

public interface I Selection Requestor Code assist notification of a class selection param package Name char Declaring package name of the class param class Name char Name of the class param need Qualification boolean Flag indicating if the type name must be qualified by its package name depending on imports param is Declaration boolean Answer if the selected method is a declaration param start Start of the selection param end End of the selection NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array void accept Class char package Name char class Name boolean need Qualification boolean is Declaration int start  ISelectionRequestor packageName className needQualification isDeclaration acceptClass packageName className needQualification isDeclaration
Code assist notification of a compilation error detected during selection param error org eclipse jdt internal compiler I Problem Only problems which are categorized as errors are notified to the requestor warnings are silently ignored In case an error got signaled no other completions might be available therefore the problem message should be presented to the user The source positions of the problem are related to the source where it was detected might be in another compilation unit if it was indirectly requested during the code assist process Note the problem knows its originating file name  IProblem
Code assist notification of a field selection param declaring Type Package Name char Name of the package in which the type that contains this field is declared param declaring Type Name char Name of the type declaring this new field param name char Name of the field param is Declaration boolean Answer if the selected field is a declaration param start Start of the selection param end End of the selection NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array void accept Field char declaring Type Package Name char declaring Type Name char name boolean is Declaration int start  declaringTypePackageName declaringTypeName isDeclaration acceptField declaringTypePackageName declaringTypeName isDeclaration
Code assist notification of an interface selection param package Name char Declaring package name of the interface param interface Name char Name of the interface param need Qualification boolean Flag indicating if the type name must be qualified by its package name depending on imports param is Declaration boolean Answer if the selected method is a declaration param start Start of the selection param end End of the selection NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A I The default package is represented by an empty array void accept Interface char package Name char interface Name boolean need Qualification boolean is Declaration int start  packageName interfaceName needQualification isDeclaration acceptInterface packageName interfaceName needQualification isDeclaration
Code assist notification of a method selection param declaring Type Package Name char Name of the package in which the type that contains this new method is declared param declaring Type Name char Name of the type declaring this new method param selector char Name of the new method param parameter Package Names char Names of the packages in which the parameter types are declared Should contain as many elements as parameter Type Names param parameter Type Names char Names of the parameters types Should contain as many elements as parameter Package Names param is Constructor boolean Answer if the method is a constructor param is Declaration boolean Answer if the selected method is a declaration param start Start of the selection param end End of the selection NOTE All package and type names are presented in their readable form Package names are in the form a b c Base types are in the form int or boolean Array types are in the qualified form M or int Nested type names are in the qualified form A M The default package is represented by an empty array parameters is Declaration start and end are use to distinguish duplicate methods declarations void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names boolean is Constructor boolean is Declaration int start  declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterTypeNames parameterPackageNames isConstructor isDeclaration isDeclaration acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames isConstructor isDeclaration
Code assist notification of a package selection param package Name char The package name NOTE All package names are presented in their readable form Package names are in the form a b c The default package is represented by an empty array  packageName

public I Problem create Problem char file Name int problem Id String problem Arguments String message Arguments int severity int problem Start Position int problem End Position int line Number I Problem pb super create Problem file Name problem Id problem Arguments message Arguments severity problem Start Position problem End Position line Number if Selection Engine this problem null pb is Error pb getID I Problem Syntax 0 Selection Engine this problem pb return pb  IProblem createProblem fileName problemId problemArguments messageArguments problemStartPosition problemEndPosition lineNumber IProblem createProblem fileName problemId problemArguments messageArguments problemStartPosition problemEndPosition lineNumber SelectionEngine isError IProblem SelectionEngine
The Selection Engine is responsible for computing the selected object It requires a searchable name environment which supports some specific search AP Is and a requestor to feed back the results to a UI param name Environment org eclipse jdt internal codeassist I Searchable Name Environment used to resolve type package references and search for types packages based on partial names param requestor org eclipse jdt internal codeassist I Selection Requestor since the engine might produce answers of various forms the engine is associated with a requestor able to accept all possible completions param settings java util Map set of options used to configure the code assist engine public Selection Engine I Searchable Name Environment name Environment I Selection Requestor requestor Map settings super settings this requestor requestor this name Environment name Environment Problem Reporter problem Reporter new Problem Reporter Default Error Handling Policies proceed With All Problems this compiler Options new Default Problem Factory Locale get Default public I Problem create Problem char file Name int problem Id String problem Arguments String message Arguments int severity int problem Start Position int problem End Position int line Number I Problem pb super create Problem file Name problem Id problem Arguments message Arguments severity problem Start Position problem End Position line Number if Selection Engine this problem null pb is Error pb getID I Problem Syntax 0 Selection Engine this problem pb return pb this lookup Environment new Lookup Environment this this compiler Options problem Reporter name Environment this parser new Selection Parser problem Reporter  SelectionEngine APIs nameEnvironment ISearchableNameEnvironment ISelectionRequestor SelectionEngine ISearchableNameEnvironment nameEnvironment ISelectionRequestor nameEnvironment nameEnvironment ProblemReporter problemReporter ProblemReporter DefaultErrorHandlingPolicies proceedWithAllProblems compilerOptions DefaultProblemFactory getDefault IProblem createProblem fileName problemId problemArguments messageArguments problemStartPosition problemEndPosition lineNumber IProblem createProblem fileName problemId problemArguments messageArguments problemStartPosition problemEndPosition lineNumber SelectionEngine isError IProblem SelectionEngine lookupEnvironment LookupEnvironment compilerOptions problemReporter nameEnvironment SelectionParser problemReporter
One result of the search consists of a new class param package Name char param class Name char param modifiers int NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array public void accept Class char package Name char class Name int modifiers if Char Operation equals class Name selected Identifier if qualified Selection null Char Operation equals qualified Selection Char Operation concat package Name class Name return if must Qualify Type package Name class Name char accepted Class new char 2 accepted Class 0 package Name accepted Class 1 class Name if accepted Classes null accepted Classes new char 10 accepted Classes Count 0 int length accepted Classes length if length accepted Classes Count System arraycopy accepted Classes 0 accepted Classes new char length 1 2 0 length accepted Classes accepted Classes Count accepted Class else no Proposal false requestor accept Class package Name class Name false false this actual Selection Start this actual Selection End this accepted Answer true  packageName className acceptClass packageName className CharOperation className selectedIdentifier qualifiedSelection CharOperation qualifiedSelection CharOperation packageName className mustQualifyType packageName className acceptedClass acceptedClass packageName acceptedClass className acceptedClasses acceptedClasses acceptedClassesCount acceptedClasses acceptedClassesCount acceptedClasses acceptedClasses acceptedClasses acceptedClassesCount acceptedClass noProposal acceptClass packageName className actualSelectionStart actualSelectionEnd acceptedAnswer
One result of the search consists of a new interface NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A I The default package is represented by an empty array public void accept Interface char package Name char interface Name int modifiers if Char Operation equals interface Name selected Identifier if qualified Selection null Char Operation equals qualified Selection Char Operation concat package Name interface Name return if must Qualify Type package Name interface Name char accepted Interface new char 2 accepted Interface 0 package Name accepted Interface 1 interface Name if accepted Interfaces null accepted Interfaces new char 10 accepted Interfaces Count 0 int length accepted Interfaces length if length accepted Interfaces Count System arraycopy accepted Interfaces 0 accepted Interfaces new char length 1 2 0 length accepted Interfaces accepted Interfaces Count accepted Interface else no Proposal false this requestor accept Interface package Name interface Name false false this actual Selection Start this actual Selection End this accepted Answer true  acceptInterface packageName interfaceName CharOperation interfaceName selectedIdentifier qualifiedSelection CharOperation qualifiedSelection CharOperation packageName interfaceName mustQualifyType packageName interfaceName acceptedInterface acceptedInterface packageName acceptedInterface interfaceName acceptedInterfaces acceptedInterfaces acceptedInterfacesCount acceptedInterfaces acceptedInterfacesCount acceptedInterfaces acceptedInterfaces acceptedInterfaces acceptedInterfacesCount acceptedInterface noProposal acceptInterface packageName interfaceName actualSelectionStart actualSelectionEnd acceptedAnswer
One result of the search consists of a new package param package Name char NOTE All package names are presented in their readable form Package names are in the form a b c The default package is represented by an empty array public void accept Package char package Name implementation of interface method  packageName acceptPackage packageName
private void accept Qualified Types if accepted Classes null this accepted Answer true for int i 0 i accepted Classes Count i no Proposal false this requestor accept Class accepted Classes i 0 accepted Classes i 1 true false this actual Selection Start this actual Selection End accepted Classes null accepted Classes Count 0 if accepted Interfaces null this accepted Answer true for int i 0 i accepted Interfaces Count i no Proposal false this requestor accept Interface accepted Interfaces i 0 accepted Interfaces i 1 true false this actual Selection Start this actual Selection End accepted Interfaces null accepted Interfaces Count 0  acceptQualifiedTypes acceptedClasses acceptedAnswer acceptedClassesCount noProposal acceptClass acceptedClasses acceptedClasses actualSelectionStart actualSelectionEnd acceptedClasses acceptedClassesCount acceptedInterfaces acceptedAnswer acceptedInterfacesCount noProposal acceptInterface acceptedInterfaces acceptedInterfaces actualSelectionStart actualSelectionEnd acceptedInterfaces acceptedInterfacesCount
One result of the search consists of a new type param package Name char param type Name char NOTE All package and type names are presented in their readable form Package names are in the form a b c Nested type names are in the qualified form A M The default package is represented by an empty array public void accept Type char package Name char type Name accept Class package Name type Name 0  packageName typeName acceptType packageName typeName acceptClass packageName typeName
private boolean check Selection char source int selection Start int selection End Scanner scanner new Scanner scanner set Source source int last Identifier Start 1 int last Identifier End 1 char last Identifier null int token ident Count 0 String Buffer entire Selection new String Buffer selection End selection Start 1 if selection Start selection End compute start position of current line int current Position selection Start 1 int next Character Position selection Start char current Character try while current Position 0 if source current Position source current Position 1 u int pos current Position 2 int c1 0 c2 0 c3 0 c4 0 while source pos u pos if c1 Character get Numeric Value source pos 15 c1 0 c2 Character get Numeric Value source pos 15 c2 0 c3 Character get Numeric Value source pos 15 c3 0 c4 Character get Numeric Value source pos 15 c4 0 return false else current Character char c1 16 c2 16 c3 16 c4 next Character Position pos else current Character source current Position next Character Position current Position 1 if current Character r current Character n break current Position catch Array Index Out Of Bounds Exception e return false compute start and end of the last token scanner reset To next Character Position selection End 1 source length selection End selection End 1 do try token scanner get Next Token catch Invalid Input Exception e return false if token Terminal Tokens Token Namethis token Terminal Tokens Token Namesuper token Terminal Tokens Token Name Identifier scanner start Position selection Start selection Start scanner current Position last Identifier Start scanner start Position last Identifier End scanner current Position 1 last Identifier scanner get Current Token Source while token Terminal Tokens Token NameEOF else scanner reset To selection Start selection End boolean expecting Identifier true do try token scanner get Next Token catch Invalid Input Exception e return false switch token case Terminal Tokens Token Namethis case Terminal Tokens Token Namesuper case Terminal Tokens Token Name Identifier if expecting Identifier return false last Identifier scanner get Current Token Source last Identifier Start scanner start Position last Identifier End scanner current Position 1 if last Identifier End selection End last Identifier End selection End last Identifier Char Operation subarray last Identifier 0 last Identifier End last Identifier Start 1 entire Selection append last Identifier ident Count expecting Identifier false break case Terminal Tokens Token NameDOT if expecting Identifier return false entire Selection append expecting Identifier true break case Terminal Tokens Token NameEOF if expecting Identifier return false break default return false while token Terminal Tokens Token NameEOF if last Identifier Start 0 actual Selection Start last Identifier Start actual Selection End last Identifier End selected Identifier last Identifier if ident Count 1 qualified Selection entire Selection to String to Char Array return true return false  checkSelection selectionStart selectionEnd setSource lastIdentifierStart lastIdentifierEnd lastIdentifier identCount StringBuffer entireSelection StringBuffer selectionEnd selectionStart selectionStart selectionEnd currentPosition selectionStart nextCharacterPosition selectionStart currentCharacter currentPosition currentPosition currentPosition currentPosition getNumericValue getNumericValue getNumericValue getNumericValue currentCharacter nextCharacterPosition currentCharacter currentPosition nextCharacterPosition currentPosition currentCharacter currentCharacter currentPosition ArrayIndexOutOfBoundsException resetTo nextCharacterPosition selectionEnd selectionEnd selectionEnd getNextToken InvalidInputException TerminalTokens TokenNamethis TerminalTokens TokenNamesuper TerminalTokens TokenNameIdentifier startPosition selectionStart selectionStart currentPosition lastIdentifierStart startPosition lastIdentifierEnd currentPosition lastIdentifier getCurrentTokenSource TerminalTokens TokenNameEOF resetTo selectionStart selectionEnd expectingIdentifier getNextToken InvalidInputException TerminalTokens TokenNamethis TerminalTokens TokenNamesuper TerminalTokens TokenNameIdentifier expectingIdentifier lastIdentifier getCurrentTokenSource lastIdentifierStart startPosition lastIdentifierEnd currentPosition lastIdentifierEnd selectionEnd lastIdentifierEnd selectionEnd lastIdentifier CharOperation lastIdentifier lastIdentifierEnd lastIdentifierStart entireSelection lastIdentifier identCount expectingIdentifier TerminalTokens TokenNameDOT expectingIdentifier entireSelection expectingIdentifier TerminalTokens TokenNameEOF expectingIdentifier TerminalTokens TokenNameEOF lastIdentifierStart actualSelectionStart lastIdentifierStart actualSelectionEnd lastIdentifierEnd selectedIdentifier lastIdentifier identCount qualifiedSelection entireSelection toString toCharArray
public Assist Parser get Parser return parser  AssistParser getParser
private boolean is Local Reference Binding binding if binding instanceof Source Type Binding return false if binding instanceof Local Type Binding return true if binding instanceof Member Type Binding return is Local Member Type Binding binding enclosing Type return false  isLocal ReferenceBinding SourceTypeBinding LocalTypeBinding MemberTypeBinding isLocal MemberTypeBinding enclosingType
Ask the engine to compute the selection at the specified position of the given compilation unit param source Unit org eclipse jdt internal compiler env I Compilation Unit the source of the current compilation unit param selection Source Start int param selection Source End int a range in the source where the selection is public void select I Compilation Unit source Unit int selection Source Start int selection Source End char source source Unit get Contents if DEBUG System out print SELECTION IN NON NLS 1 System out print source Unit get File Name System out print FROM NON NLS 1 System out print selection Source Start System out print TO NON NLS 1 System out println selection Source End System out println SELECTION Source NON NLS 1 System out println source if check Selection source selection Source Start selection Source End return try this accepted Answer false Compilation Result result new Compilation Result source Unit 1 1 this compiler Options max Problems Per Unit Compilation Unit Declaration parsed Unit parser diet Parse source Unit result actual Selection Start actual Selection End if parsed Unit null if DEBUG System out println SELECTION Diet AST NON NLS 1 System out println parsed Unit to String scan the package import statements first if parsed Unit current Package instanceof Selection On Package Reference char tokens Selection On Package Reference parsed Unit current Package tokens no Proposal false requestor accept Package Char Operation concat With tokens return Import Reference imports parsed Unit imports if imports null for int i 0 length imports length i length i Import Reference import Reference imports i if import Reference instanceof Selection On Import Reference char tokens Selection On Import Reference import Reference tokens no Proposal false requestor accept Package Char Operation concat With tokens name Environment find Types Char Operation concat With tokens this accept qualified types only if no unqualified type was accepted if accepted Answer accept Qualified Types if accepted Answer name Environment find Types selected Identifier this try with simple type name if accepted Answer accept Qualified Types if no Proposal problem null requestor accept Error problem return if parsed Unit types null if select Declaration parsed Unit return lookup Environment build Type Bindings parsed Unit if this unit Scope parsed Unit scope null try lookup Environment complete Type Bindings parsed Unit true parsed Unit scope fault In Types AST Node node parse Block Statements parsed Unit selection Source Start if DEBUG System out println SELECTION AST NON NLS 1 System out println parsed Unit to String parsed Unit resolve if node null select Local Declaration node catch Selection Node Found e if e binding null if DEBUG System out println SELECTION Selection binding NON NLS 1 System out println e binding to String if null then we found a problem in the selection node select From e binding parsed Unit e is Declaration only reaches here if no selection could be derived from the parsed tree thus use the selected source and perform a textual type search if accepted Answer name Environment find Types selected Identifier this accept qualified types only if no unqualified type was accepted if accepted Answer accept Qualified Types if no Proposal problem null requestor accept Error problem catch Index Out Of Bounds Exception e work around internal failure 1GEMF6D catch Abort Compilation e ignore this exception for now since it typically means we cannot find java lang Object finally reset  sourceUnit ICompilationUnit selectionSourceStart selectionSourceEnd ICompilationUnit sourceUnit selectionSourceStart selectionSourceEnd sourceUnit getContents sourceUnit getFileName selectionSourceStart selectionSourceEnd checkSelection selectionSourceStart selectionSourceEnd acceptedAnswer CompilationResult CompilationResult sourceUnit compilerOptions maxProblemsPerUnit CompilationUnitDeclaration parsedUnit dietParse sourceUnit actualSelectionStart actualSelectionEnd parsedUnit parsedUnit toString parsedUnit currentPackage SelectionOnPackageReference SelectionOnPackageReference parsedUnit currentPackage noProposal acceptPackage CharOperation concatWith ImportReference parsedUnit ImportReference importReference importReference SelectionOnImportReference SelectionOnImportReference importReference noProposal acceptPackage CharOperation concatWith nameEnvironment findTypes CharOperation concatWith acceptedAnswer acceptQualifiedTypes acceptedAnswer nameEnvironment findTypes selectedIdentifier acceptedAnswer acceptQualifiedTypes noProposal acceptError parsedUnit selectDeclaration parsedUnit lookupEnvironment buildTypeBindings parsedUnit unitScope parsedUnit lookupEnvironment completeTypeBindings parsedUnit parsedUnit faultInTypes ASTNode parseBlockStatements parsedUnit selectionSourceStart parsedUnit toString parsedUnit selectLocalDeclaration SelectionNodeFound toString selectFrom parsedUnit isDeclaration acceptedAnswer nameEnvironment findTypes selectedIdentifier acceptedAnswer acceptQualifiedTypes noProposal acceptError IndexOutOfBoundsException AbortCompilation
private void select From Binding binding Compilation Unit Declaration parsed Unit boolean is Declaration if binding instanceof Reference Binding Reference Binding type Binding Reference Binding binding if qualified Selection null Char Operation equals qualified Selection type Binding readable Name return if type Binding is Interface no Proposal false if is Local type Binding this requestor instanceof Selection Requestor Selection Requestor this requestor accept Local Type Source Type Binding type Binding parsed Unit else this requestor accept Interface type Binding qualified Package Name type Binding qualified Source Name false false this actual Selection Start this actual Selection End else if type Binding instanceof Problem Reference Binding Reference Binding original Problem Reference Binding type Binding original if original null return no Proposal false if is Local original this requestor instanceof Selection Requestor Selection Requestor this requestor accept Local Type Source Type Binding original parsed Unit else this requestor accept Class original qualified Package Name original qualified Source Name false false this actual Selection Start this actual Selection End else no Proposal false if is Local type Binding this requestor instanceof Selection Requestor Selection Requestor this requestor accept Local Type Source Type Binding type Binding parsed Unit else this requestor accept Class type Binding qualified Package Name type Binding qualified Source Name false false this actual Selection Start this actual Selection End this accepted Answer true else if binding instanceof Method Binding Method Binding method Binding Method Binding binding Type Binding parameter Types method Binding parameters int length parameter Types length char parameter Package Names new char length char parameter Type Names new char length for int i 0 i length i parameter Package Names i parameter Types i qualified Package Name parameter Type Names i parameter Types i qualified Source Name no Proposal false Reference Binding declaring Class method Binding declaring Class if is Local declaring Class this requestor instanceof Selection Requestor Selection Requestor this requestor accept Local Method Source Type Binding declaring Class method Binding is Constructor declaring Class source Name method Binding selector parameter Package Names parameter Type Names method Binding is Constructor parsed Unit is Declaration actual Selection Start actual Selection End else this requestor accept Method declaring Class qualified Package Name declaring Class qualified Source Name method Binding is Constructor declaring Class source Name method Binding selector parameter Package Names parameter Type Names method Binding is Constructor is Declaration actual Selection Start actual Selection End this accepted Answer true else if binding instanceof Field Binding Field Binding field Binding Field Binding binding Reference Binding declaring Class field Binding declaring Class if declaring Class null arraylength no Proposal false if is Local declaring Class this requestor instanceof Selection Requestor Selection Requestor this requestor accept Local Field Source Type Binding declaring Class field Binding name parsed Unit else this requestor accept Field declaring Class qualified Package Name declaring Class qualified Source Name field Binding name false this actual Selection Start this actual Selection End this accepted Answer true else if binding instanceof Local Variable Binding if this requestor instanceof Selection Requestor Selection Requestor this requestor accept Local Variable Local Variable Binding binding parsed Unit this accepted Answer true else open on the type of the variable select From Local Variable Binding binding type parsed Unit false else if binding instanceof Array Binding select From Array Binding binding leaf Component Type parsed Unit false open on the type of the array else if binding instanceof Package Binding Package Binding package Binding Package Binding binding no Proposal false requestor accept Package package Binding readable Name this accepted Answer true else if binding instanceof Base Type Binding this accepted Answer true  selectFrom CompilationUnitDeclaration parsedUnit isDeclaration ReferenceBinding ReferenceBinding typeBinding ReferenceBinding qualifiedSelection CharOperation qualifiedSelection typeBinding readableName typeBinding isInterface noProposal isLocal typeBinding SelectionRequestor SelectionRequestor acceptLocalType SourceTypeBinding typeBinding parsedUnit acceptInterface typeBinding qualifiedPackageName typeBinding qualifiedSourceName actualSelectionStart actualSelectionEnd typeBinding ProblemReferenceBinding ReferenceBinding ProblemReferenceBinding typeBinding noProposal isLocal SelectionRequestor SelectionRequestor acceptLocalType SourceTypeBinding parsedUnit acceptClass qualifiedPackageName qualifiedSourceName actualSelectionStart actualSelectionEnd noProposal isLocal typeBinding SelectionRequestor SelectionRequestor acceptLocalType SourceTypeBinding typeBinding parsedUnit acceptClass typeBinding qualifiedPackageName typeBinding qualifiedSourceName actualSelectionStart actualSelectionEnd acceptedAnswer MethodBinding MethodBinding methodBinding MethodBinding TypeBinding parameterTypes methodBinding parameterTypes parameterPackageNames parameterTypeNames parameterPackageNames parameterTypes qualifiedPackageName parameterTypeNames parameterTypes qualifiedSourceName noProposal ReferenceBinding declaringClass methodBinding declaringClass isLocal declaringClass SelectionRequestor SelectionRequestor acceptLocalMethod SourceTypeBinding declaringClass methodBinding isConstructor declaringClass sourceName methodBinding parameterPackageNames parameterTypeNames methodBinding isConstructor parsedUnit isDeclaration actualSelectionStart actualSelectionEnd acceptMethod declaringClass qualifiedPackageName declaringClass qualifiedSourceName methodBinding isConstructor declaringClass sourceName methodBinding parameterPackageNames parameterTypeNames methodBinding isConstructor isDeclaration actualSelectionStart actualSelectionEnd acceptedAnswer FieldBinding FieldBinding fieldBinding FieldBinding ReferenceBinding declaringClass fieldBinding declaringClass declaringClass noProposal isLocal declaringClass SelectionRequestor SelectionRequestor acceptLocalField SourceTypeBinding declaringClass fieldBinding parsedUnit acceptField declaringClass qualifiedPackageName declaringClass qualifiedSourceName fieldBinding actualSelectionStart actualSelectionEnd acceptedAnswer LocalVariableBinding SelectionRequestor SelectionRequestor acceptLocalVariable LocalVariableBinding parsedUnit acceptedAnswer selectFrom LocalVariableBinding parsedUnit ArrayBinding selectFrom ArrayBinding leafComponentType parsedUnit PackageBinding PackageBinding packageBinding PackageBinding noProposal acceptPackage packageBinding readableName acceptedAnswer BaseTypeBinding acceptedAnswer
class Visitor extends AST Visitor public boolean visit Constructor Declaration constructor Declaration Class Scope scope if constructor Declaration selector assist Identifier if constructor Declaration binding null throw new Selection Node Found constructor Declaration binding else if constructor Declaration scope null throw new Selection Node Found new Method Binding constructor Declaration modifiers constructor Declaration selector null null null constructor Declaration scope reference Type binding return true  ASTVisitor ConstructorDeclaration constructorDeclaration ClassScope constructorDeclaration assistIdentifier constructorDeclaration SelectionNodeFound constructorDeclaration constructorDeclaration SelectionNodeFound MethodBinding constructorDeclaration constructorDeclaration constructorDeclaration referenceType
public boolean visit Field Declaration field Declaration Method Scope scope if field Declaration name assist Identifier throw new Selection Node Found field Declaration binding return true  FieldDeclaration fieldDeclaration MethodScope fieldDeclaration assistIdentifier SelectionNodeFound fieldDeclaration
public boolean visit Type Declaration local Type Declaration Block Scope scope if local Type Declaration name assist Identifier throw new Selection Node Found local Type Declaration binding return true  TypeDeclaration localTypeDeclaration BlockScope localTypeDeclaration assistIdentifier SelectionNodeFound localTypeDeclaration
public boolean visit Type Declaration member Type Declaration Class Scope scope if member Type Declaration name assist Identifier throw new Selection Node Found member Type Declaration binding return true  TypeDeclaration memberTypeDeclaration ClassScope memberTypeDeclaration assistIdentifier SelectionNodeFound memberTypeDeclaration
public boolean visit Method Declaration method Declaration Class Scope scope if method Declaration selector assist Identifier if method Declaration binding null throw new Selection Node Found method Declaration binding else if method Declaration scope null throw new Selection Node Found new Method Binding method Declaration modifiers method Declaration selector null null null method Declaration scope reference Type binding return true  MethodDeclaration methodDeclaration ClassScope methodDeclaration assistIdentifier methodDeclaration SelectionNodeFound methodDeclaration methodDeclaration SelectionNodeFound MethodBinding methodDeclaration methodDeclaration methodDeclaration referenceType
public boolean visit Type Declaration type Declaration Compilation Unit Scope scope if type Declaration name assist Identifier throw new Selection Node Found type Declaration binding return true  TypeDeclaration typeDeclaration CompilationUnitScope typeDeclaration assistIdentifier SelectionNodeFound typeDeclaration
private void select Local Declaration AST Node node the selected identifier is not identical to the parser one equals but not identical for traversing the parse tree the parser assist identifier is necessary for identitiy checks final char assist Identifier this get Parser assist Identifier if assist Identifier null return class Visitor extends AST Visitor public boolean visit Constructor Declaration constructor Declaration Class Scope scope if constructor Declaration selector assist Identifier if constructor Declaration binding null throw new Selection Node Found constructor Declaration binding else if constructor Declaration scope null throw new Selection Node Found new Method Binding constructor Declaration modifiers constructor Declaration selector null null null constructor Declaration scope reference Type binding return true public boolean visit Field Declaration field Declaration Method Scope scope if field Declaration name assist Identifier throw new Selection Node Found field Declaration binding return true public boolean visit Type Declaration local Type Declaration Block Scope scope if local Type Declaration name assist Identifier throw new Selection Node Found local Type Declaration binding return true public boolean visit Type Declaration member Type Declaration Class Scope scope if member Type Declaration name assist Identifier throw new Selection Node Found member Type Declaration binding return true public boolean visit Method Declaration method Declaration Class Scope scope if method Declaration selector assist Identifier if method Declaration binding null throw new Selection Node Found method Declaration binding else if method Declaration scope null throw new Selection Node Found new Method Binding method Declaration modifiers method Declaration selector null null null method Declaration scope reference Type binding return true public boolean visit Type Declaration type Declaration Compilation Unit Scope scope if type Declaration name assist Identifier throw new Selection Node Found type Declaration binding return true if node instanceof Abstract Method Declaration Abstract Method Declaration node traverse new Visitor Class Scope null else Field Declaration node traverse new Visitor Method Scope null  selectLocalDeclaration ASTNode assistIdentifier getParser assistIdentifier assistIdentifier ASTVisitor ConstructorDeclaration constructorDeclaration ClassScope constructorDeclaration assistIdentifier constructorDeclaration SelectionNodeFound constructorDeclaration constructorDeclaration SelectionNodeFound MethodBinding constructorDeclaration constructorDeclaration constructorDeclaration referenceType FieldDeclaration fieldDeclaration MethodScope fieldDeclaration assistIdentifier SelectionNodeFound fieldDeclaration TypeDeclaration localTypeDeclaration BlockScope localTypeDeclaration assistIdentifier SelectionNodeFound localTypeDeclaration TypeDeclaration memberTypeDeclaration ClassScope memberTypeDeclaration assistIdentifier SelectionNodeFound memberTypeDeclaration MethodDeclaration methodDeclaration ClassScope methodDeclaration assistIdentifier methodDeclaration SelectionNodeFound methodDeclaration methodDeclaration SelectionNodeFound MethodBinding methodDeclaration methodDeclaration methodDeclaration referenceType TypeDeclaration typeDeclaration CompilationUnitScope typeDeclaration assistIdentifier SelectionNodeFound typeDeclaration AbstractMethodDeclaration AbstractMethodDeclaration ClassScope FieldDeclaration MethodScope
Asks the engine to compute the selection of the given type from the source type param source Type org eclipse jdt internal compiler env I Source Type a source form of the current type in which code assist is invoked param type Name char a type name which is to be resolved in the context of a compilation unit NOTE the type name is supposed to be correctly reduced no whitespaces no unicodes left param top Level Types Source Type Element Info a source form of the top level types of the compilation unit in which code assist is invoked param search In Environment if code true code and no selection could be found in context then search type in environment public void select Type I Source Type source Type char type Name Source Type Element Info top Level Types boolean search In Environment try this accepted Answer false find the outer most type I Source Type outer Type source Type I Source Type parent source Type get Enclosing Type while parent null outer Type parent parent parent get Enclosing Type compute parse tree for this most outer type Compilation Result result new Compilation Result outer Type get File Name 1 1 this compiler Options max Problems Per Unit if source Type instanceof Source Type Element Info return Source Type type Handle Source Type Source Type Element Info source Type get Handle Compilation Unit Declaration parsed Unit Element Info Converter build Compilation Unit top Level Types type Handle is Anonymous type Handle is Local this parser problem Reporter result if parsed Unit null parsed Unit types null if DEBUG System out println SELECTION Diet AST NON NLS 1 System out println parsed Unit to String find the type declaration that corresponds to the original source type Type Declaration type Decl new AST Node Finder parsed Unit find Type type Handle if type Decl null add fake field with the type we re looking for note since we didn t ask for fields above there is no field defined yet Field Declaration field new Field Declaration int dot if dot Char Operation last Index Of type Name 1 this selected Identifier type Name field type new Selection On Single Type Reference type Name 1 position not used else char previous Identifiers Char Operation split On type Name 0 dot char selection Identifier Char Operation subarray type Name dot 1 type Name length this selected Identifier selection Identifier field type new Selection On Qualified Type Reference previous Identifiers selection Identifier new long previous Identifiers length 1 field name fake Field to Char Array NON NLS 1 type Decl fields new Field Declaration field build bindings lookup Environment build Type Bindings parsed Unit if this unit Scope parsed Unit scope null try build fields note this builds fields only in the parsed unit the build Fields And Methods flag is not passed along this lookup Environment complete Type Bindings parsed Unit true resolve parsed Unit scope fault In Types parsed Unit resolve catch Selection Node Found e if e binding null if DEBUG System out println SELECTION Selection binding NON NLS 1 System out println e binding to String if null then we found a problem in the selection node select From e binding parsed Unit e is Declaration only reaches here if no selection could be derived from the parsed tree thus use the selected source and perform a textual type search if accepted Answer search In Environment if this selected Identifier null name Environment find Types type Name this accept qualified types only if no unqualified type was accepted if accepted Answer accept Qualified Types if no Proposal problem null requestor accept Error problem catch Abort Compilation e ignore this exception for now since it typically means we cannot find java lang Object finally reset  sourceType ISourceType typeName topLevelTypes SourceTypeElementInfo searchInEnvironment selectType ISourceType sourceType typeName SourceTypeElementInfo topLevelTypes searchInEnvironment acceptedAnswer ISourceType outerType sourceType ISourceType sourceType getEnclosingType outerType getEnclosingType CompilationResult CompilationResult outerType getFileName compilerOptions maxProblemsPerUnit sourceType SourceTypeElementInfo SourceType typeHandle SourceType SourceTypeElementInfo sourceType getHandle CompilationUnitDeclaration parsedUnit ElementInfoConverter buildCompilationUnit topLevelTypes typeHandle isAnonymous typeHandle isLocal problemReporter parsedUnit parsedUnit parsedUnit toString TypeDeclaration typeDecl ASTNodeFinder parsedUnit findType typeHandle typeDecl FieldDeclaration FieldDeclaration CharOperation lastIndexOf typeName selectedIdentifier typeName SelectionOnSingleTypeReference typeName previousIdentifiers CharOperation splitOn typeName selectionIdentifier CharOperation typeName typeName selectedIdentifier selectionIdentifier SelectionOnQualifiedTypeReference previousIdentifiers selectionIdentifier previousIdentifiers fakeField toCharArray typeDecl FieldDeclaration lookupEnvironment buildTypeBindings parsedUnit unitScope parsedUnit buildFieldsAndMethods lookupEnvironment completeTypeBindings parsedUnit parsedUnit faultInTypes parsedUnit SelectionNodeFound toString selectFrom parsedUnit isDeclaration acceptedAnswer searchInEnvironment selectedIdentifier nameEnvironment findTypes typeName acceptedAnswer acceptQualifiedTypes noProposal acceptError AbortCompilation
Check if a declaration got selected in this unit private boolean select Declaration Compilation Unit Declaration compilation Unit the selected identifier is not identical to the parser one equals but not identical for traversing the parse tree the parser assist identifier is necessary for identitiy checks char assist Identifier this get Parser assist Identifier if assist Identifier null return false Import Reference current Package compilation Unit current Package char package Name current Package null new char 0 Char Operation concat With current Package tokens iterate over the types Type Declaration types compilation Unit types for int i 0 length types null 0 types length i length i if select Declaration types i assist Identifier package Name return true return false  selectDeclaration CompilationUnitDeclaration compilationUnit assistIdentifier getParser assistIdentifier assistIdentifier ImportReference currentPackage compilationUnit currentPackage packageName currentPackage CharOperation concatWith currentPackage TypeDeclaration compilationUnit selectDeclaration assistIdentifier packageName
Check if a declaration got selected in this type private boolean select Declaration Type Declaration type Declaration char assist Identifier char package Name if type Declaration name assist Identifier char qualified Source Name null Type Declaration enclosing Type type Declaration while enclosing Type null qualified Source Name Char Operation concat enclosing Type name qualified Source Name enclosing Type enclosing Type enclosing Type if type Declaration is Interface this requestor accept Class package Name qualified Source Name false true this actual Selection Start this actual Selection End else this requestor accept Interface package Name qualified Source Name false true this actual Selection Start this actual Selection End this no Proposal false return true Type Declaration member Types type Declaration member Types for int i 0 length member Types null 0 member Types length i length i if select Declaration member Types i assist Identifier package Name return true Field Declaration fields type Declaration fields for int i 0 length fields null 0 fields length i length i if fields i name assist Identifier char qualified Source Name null Type Declaration enclosing Type type Declaration while enclosing Type null qualified Source Name Char Operation concat enclosing Type name qualified Source Name enclosing Type enclosing Type enclosing Type this requestor accept Field package Name qualified Source Name fields i name true this actual Selection Start this actual Selection End this no Proposal false return true Abstract Method Declaration methods type Declaration methods for int i 0 length methods null 0 methods length i length i Abstract Method Declaration method methods i if method selector assist Identifier char qualified Source Name null Type Declaration enclosing Type type Declaration while enclosing Type null qualified Source Name Char Operation concat enclosing Type name qualified Source Name enclosing Type enclosing Type enclosing Type this requestor accept Method package Name qualified Source Name method selector null Selection Requestor does not need of parameters type for method declaration null Selection Requestor does not need of parameters type for method declaration method is Constructor true this actual Selection Start this actual Selection End this no Proposal false return true return false  selectDeclaration TypeDeclaration typeDeclaration assistIdentifier packageName typeDeclaration assistIdentifier qualifiedSourceName TypeDeclaration enclosingType typeDeclaration enclosingType qualifiedSourceName CharOperation enclosingType qualifiedSourceName enclosingType enclosingType enclosingType typeDeclaration isInterface acceptClass packageName qualifiedSourceName actualSelectionStart actualSelectionEnd acceptInterface packageName qualifiedSourceName actualSelectionStart actualSelectionEnd noProposal TypeDeclaration memberTypes typeDeclaration memberTypes memberTypes memberTypes selectDeclaration memberTypes assistIdentifier packageName FieldDeclaration typeDeclaration assistIdentifier qualifiedSourceName TypeDeclaration enclosingType typeDeclaration enclosingType qualifiedSourceName CharOperation enclosingType qualifiedSourceName enclosingType enclosingType enclosingType acceptField packageName qualifiedSourceName actualSelectionStart actualSelectionEnd noProposal AbstractMethodDeclaration typeDeclaration AbstractMethodDeclaration assistIdentifier qualifiedSourceName TypeDeclaration enclosingType typeDeclaration enclosingType qualifiedSourceName CharOperation enclosingType qualifiedSourceName enclosingType enclosingType enclosingType acceptMethod packageName qualifiedSourceName SelectionRequestor SelectionRequestor isConstructor actualSelectionStart actualSelectionEnd noProposal

public Binding binding public boolean is Declaration public Selection Node Found this null we found a problem in the selection node  isDeclaration SelectionNodeFound
this null we found a problem in the selection node public Selection Node Found Binding binding this binding false  SelectionNodeFound
this binding false public Selection Node Found Binding binding boolean is Declaration this binding binding this is Declaration is Declaration  SelectionNodeFound isDeclaration isDeclaration isDeclaration

public class Selection On Argument Name extends Argument public Selection On Argument Name char name long pos Nom Type Reference tr int modifiers super name pos Nom tr modifiers  SelectionOnArgumentName SelectionOnArgumentName posNom TypeReference posNom
public void bind Method Scope scope Type Binding type Binding boolean used super bind scope type Binding used throw new Selection Node Found binding  MethodScope TypeBinding typeBinding typeBinding SelectionNodeFound
public String Buffer print int indent String Buffer output print Indent indent output output append Selection On Argument Name NON NLS 1 if type null type print 0 output append output append name if initialization null output append NON NLS 1 initialization print Expression 0 output return output append  StringBuffer StringBuffer printIndent SelectionOnArgumentName printExpression
public void resolve Block Scope scope super resolve scope throw new Selection Node Found binding  BlockScope SelectionNodeFound

public class Selection On Explicit Constructor Call extends Explicit Constructor Call public Selection On Explicit Constructor Call int access Mode super access Mode  SelectionOnExplicitConstructorCall ExplicitConstructorCall SelectionOnExplicitConstructorCall accessMode accessMode
public String Buffer print Statement int tab String Buffer output print Indent tab output output append Select On Explicit Constructor Call NON NLS 1 if qualification null qualification print Expression 0 output append if access Mode This output append this NON NLS 1 else output append super NON NLS 1 if arguments null for int i 0 i arguments length i if i 0 output append NON NLS 1 arguments i print Expression 0 output return output append NON NLS 1  StringBuffer printStatement StringBuffer printIndent SelectOnExplicitConstructorCall printExpression accessMode printExpression
public void resolve Block Scope scope super resolve scope tolerate some error cases if binding null binding is Valid Binding binding problem Id Problem Reasons Not Visible throw new Selection Node Found else throw new Selection Node Found binding  BlockScope isValidBinding problemId ProblemReasons NotVisible SelectionNodeFound SelectionNodeFound

public class Selection On Field Reference extends Field Reference public Selection On Field Reference char source long pos super source pos  SelectionOnFieldReference FieldReference SelectionOnFieldReference
public String Buffer print Expression int indent String Buffer output output append Selection On Field Reference NON NLS 1 return super print Expression 0 output append  StringBuffer printExpression StringBuffer SelectionOnFieldReference printExpression
public Type Binding resolve Type Block Scope scope super resolve Type scope tolerate some error cases if binding null binding is Valid Binding binding problem Id Problem Reasons Not Visible binding problem Id Problem Reasons Inherited Name Hides Enclosing Name binding problem Id Problem Reasons Non Static Reference In Constructor Invocation binding problem Id Problem Reasons Non Static Reference In Static Context throw new Selection Node Found else throw new Selection Node Found binding  TypeBinding resolveType BlockScope resolveType isValidBinding problemId ProblemReasons NotVisible problemId ProblemReasons InheritedNameHidesEnclosingName problemId ProblemReasons NonStaticReferenceInConstructorInvocation problemId ProblemReasons NonStaticReferenceInStaticContext SelectionNodeFound SelectionNodeFound

public class Selection On Field Type extends Field Declaration public Selection On Field Type Type Reference type super this source Start type source Start this source End type source End this type type this name Char Operation NO CHAR  SelectionOnFieldType FieldDeclaration SelectionOnFieldType TypeReference sourceStart sourceStart sourceEnd sourceEnd CharOperation NO_CHAR
this name Char Operation NO CHAR public String Buffer print Statement int tab String Buffer output return type print tab output append  CharOperation NO_CHAR StringBuffer printStatement StringBuffer

public class Selection On Import Reference extends Import Reference public Selection On Import Reference char tokens long positions int modifiers super tokens positions false modifiers  SelectionOnImportReference ImportReference SelectionOnImportReference
public String Buffer print int indent String Buffer output boolean with On Demand print Indent indent output append Select On Import NON NLS 1 for int i 0 i tokens length i if i 0 output append output append tokens i return output append  StringBuffer StringBuffer withOnDemand printIndent SelectOnImport

public class Selection On Local Name extends Local Declaration public Selection On Local Name char name int source Start int source End super name source Start source End  SelectionOnLocalName LocalDeclaration SelectionOnLocalName sourceStart sourceEnd sourceStart sourceEnd
public void resolve Block Scope scope super resolve scope throw new Selection Node Found binding  BlockScope SelectionNodeFound
public String Buffer print Statement int tab String Buffer output print Indent tab output output append Selection On Local Name NON NLS 1 print Modifiers this modifiers output type print 0 output append append this name if initialization null output append NON NLS 1 initialization print Expression 0 output return output append NON NLS 1  StringBuffer printStatement StringBuffer printIndent SelectionOnLocalName printModifiers printExpression

private Method Binding find Non Default Abstract Method Method Binding method Binding Reference Binding its Interfaces method Binding declaring Class super Interfaces if its Interfaces No Super Interfaces Reference Binding interfaces To Visit new Reference Binding 5 int last Position 0 interfaces To Visit last Position its Interfaces for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j Reference Binding current Type interfaces j if current Type tag Bits Tag Bits Interface Visited 0 if interface as not already been visited current Type tag Bits Tag Bits Interface Visited Method Binding methods current Type get Methods method Binding selector if methods null for int k 0 k methods length k if method Binding are Parameters Equal methods k return methods k its Interfaces current Type super Interfaces if its Interfaces No Super Interfaces if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces return method Binding  MethodBinding findNonDefaultAbstractMethod MethodBinding methodBinding ReferenceBinding itsInterfaces methodBinding declaringClass superInterfaces itsInterfaces NoSuperInterfaces ReferenceBinding interfacesToVisit ReferenceBinding lastPosition interfacesToVisit lastPosition itsInterfaces lastPosition ReferenceBinding interfacesToVisit ReferenceBinding currentType currentType tagBits TagBits InterfaceVisited currentType tagBits TagBits InterfaceVisited MethodBinding currentType getMethods methodBinding methodBinding areParametersEqual itsInterfaces currentType superInterfaces itsInterfaces NoSuperInterfaces lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces methodBinding
public String Buffer print Expression int indent String Buffer output output append Select On Message Send NON NLS 1 if receiver is Implicit This receiver print Expression 0 output append output append this selector append if arguments null for int i 0 i arguments length i if i 0 output append NON NLS 1 arguments i print Expression 0 output return output append NON NLS 1  StringBuffer printExpression StringBuffer SelectOnMessageSend isImplicitThis printExpression printExpression
public Type Binding resolve Type Block Scope scope super resolve Type scope tolerate some error cases if binding null binding is Valid Binding binding problem Id Problem Reasons Not Visible binding problem Id Problem Reasons Inherited Name Hides Enclosing Name binding problem Id Problem Reasons Non Static Reference In Constructor Invocation binding problem Id Problem Reasons Non Static Reference In Static Context throw new Selection Node Found else if binding is Default Abstract throw new Selection Node Found find Non Default Abstract Method binding 23594 else throw new Selection Node Found binding  TypeBinding resolveType BlockScope resolveType isValidBinding problemId ProblemReasons NotVisible problemId ProblemReasons InheritedNameHidesEnclosingName problemId ProblemReasons NonStaticReferenceInConstructorInvocation problemId ProblemReasons NonStaticReferenceInStaticContext SelectionNodeFound isDefaultAbstract SelectionNodeFound findNonDefaultAbstractMethod SelectionNodeFound

public class Selection On Package Reference extends Import Reference public Selection On Package Reference char tokens long positions super tokens positions true Acc Default  SelectionOnPackageReference ImportReference SelectionOnPackageReference AccDefault
public String Buffer print int tab String Buffer output boolean with On Demand print Indent tab output append Select On Package NON NLS 1 for int i 0 i tokens length i if i 0 output append output append tokens i return output append  StringBuffer StringBuffer withOnDemand printIndent SelectOnPackage

public class Selection On Qualified Allocation Expression extends Qualified Allocation Expression public Selection On Qualified Allocation Expression constructor without argument  SelectionOnQualifiedAllocationExpression QualifiedAllocationExpression SelectionOnQualifiedAllocationExpression
public Selection On Qualified Allocation Expression Type Declaration anonymous anonymous Type anonymous  SelectionOnQualifiedAllocationExpression TypeDeclaration anonymousType
public String Buffer print Expression int indent String Buffer output if this enclosing Instance null output append Select On Allocation Expression NON NLS 1 else output append Select On Qualified Allocation Expression NON NLS 1 return super print Expression indent output append  StringBuffer printExpression StringBuffer enclosingInstance SelectOnAllocationExpression SelectOnQualifiedAllocationExpression printExpression
public Type Binding resolve Type Block Scope scope super resolve Type scope tolerate some error cases if binding null binding is Valid Binding binding problem Id Problem Reasons Not Visible throw new Selection Node Found if anonymous Type null throw new Selection Node Found binding if selecting a type for an anonymous type creation we have to find its target super constructor if extending a class or its target super interface if extending an interface if anonymous Type binding super Interfaces No Super Interfaces find the constructor binding inside the super constructor call Constructor Declaration constructor Constructor Declaration anonymous Type declaration Of binding throw new Selection Node Found constructor constructor Call binding else open on the only superinterface throw new Selection Node Found anonymous Type binding super Interfaces 0  TypeBinding resolveType BlockScope resolveType isValidBinding problemId ProblemReasons NotVisible SelectionNodeFound anonymousType SelectionNodeFound anonymousType superInterfaces NoSuperInterfaces ConstructorDeclaration ConstructorDeclaration anonymousType declarationOf SelectionNodeFound constructorCall SelectionNodeFound anonymousType superInterfaces

public Selection On Qualified Name Reference char previous Identifiers char selection Identifier long positions super Char Operation array Concat previous Identifiers selection Identifier positions int positions 0 32 int positions positions length 1  SelectionOnQualifiedNameReference previousIdentifiers selectionIdentifier CharOperation arrayConcat previousIdentifiers selectionIdentifier
public String Buffer print Expression int indent String Buffer output output append Select On Name NON NLS 1 for int i 0 length tokens length i length i if i 0 output append output append tokens i return output append  StringBuffer printExpression StringBuffer SelectOnName
public Type Binding resolve Type Block Scope scope it can be a package type member type local variable or field binding scope get Binding tokens this if binding is Valid Binding if binding instanceof Problem Field Binding tolerate some error cases if binding problem Id Problem Reasons Not Visible binding problem Id Problem Reasons Inherited Name Hides Enclosing Name binding problem Id Problem Reasons Non Static Reference In Constructor Invocation binding problem Id Problem Reasons Non Static Reference In Static Context throw new Selection Node Found binding scope problem Reporter invalid Field this Field Binding binding else if binding instanceof Problem Reference Binding tolerate some error cases if binding problem Id Problem Reasons Not Visible throw new Selection Node Found binding scope problem Reporter invalid Type this Type Binding binding else scope problem Reporter unresolvable Reference this binding throw new Selection Node Found throw new Selection Node Found binding  TypeBinding resolveType BlockScope getBinding isValidBinding ProblemFieldBinding problemId ProblemReasons NotVisible problemId ProblemReasons InheritedNameHidesEnclosingName problemId ProblemReasons NonStaticReferenceInConstructorInvocation problemId ProblemReasons NonStaticReferenceInStaticContext SelectionNodeFound problemReporter invalidField FieldBinding ProblemReferenceBinding problemId ProblemReasons NotVisible SelectionNodeFound problemReporter invalidType TypeBinding problemReporter unresolvableReference SelectionNodeFound SelectionNodeFound

public class Selection On Qualified Super Reference extends Qualified Super Reference public Selection On Qualified Super Reference Type Reference name int pos int source End super name pos source End  SelectionOnQualifiedSuperReference QualifiedSuperReference SelectionOnQualifiedSuperReference TypeReference sourceEnd sourceEnd
public String Buffer print Expression int indent String Buffer output output append Select On Qualified Super NON NLS 1 return super print Expression 0 output append  StringBuffer printExpression StringBuffer SelectOnQualifiedSuper printExpression
public Type Binding resolve Type Block Scope scope Type Binding binding super resolve Type scope if binding null binding is Valid Binding throw new Selection Node Found else throw new Selection Node Found binding  TypeBinding resolveType BlockScope TypeBinding resolveType isValidBinding SelectionNodeFound SelectionNodeFound

public class Selection On Qualified Type Reference extends Qualified Type Reference public Selection On Qualified Type Reference char previous Identifiers char selection Identifier long positions super Char Operation array Concat previous Identifiers selection Identifier positions  SelectionOnQualifiedTypeReference QualifiedTypeReference SelectionOnQualifiedTypeReference previousIdentifiers selectionIdentifier CharOperation arrayConcat previousIdentifiers selectionIdentifier
positions public void about To Resolve Scope scope get Type Binding scope parent step up from the Class Scope  aboutToResolve getTypeBinding ClassScope
public Type Binding get Type Binding Scope scope it can be a package type or member type Binding binding scope get Type Or Package tokens if binding is Valid Binding tolerate some error cases if binding problem Id Problem Reasons Not Visible throw new Selection Node Found binding scope problem Reporter invalid Type this Type Binding binding throw new Selection Node Found throw new Selection Node Found binding  TypeBinding getTypeBinding getTypeOrPackage isValidBinding problemId ProblemReasons NotVisible SelectionNodeFound problemReporter invalidType TypeBinding SelectionNodeFound SelectionNodeFound
public String Buffer print Expression int indent String Buffer output output append Select On Type NON NLS 1 for int i 0 length tokens length i length i if i 0 output append output append tokens i return output append  StringBuffer printExpression StringBuffer SelectOnType

public class Selection On Single Name Reference extends Single Name Reference public Selection On Single Name Reference char source long pos super source pos  SelectionOnSingleNameReference SingleNameReference SelectionOnSingleNameReference
public Type Binding resolve Type Block Scope scope it can be a package type member type local variable or field binding scope get Binding token VARIABLE TYPE PACKAGE this true resolve if binding is Valid Binding if binding instanceof Problem Field Binding tolerate some error cases if binding problem Id Problem Reasons Not Visible binding problem Id Problem Reasons Inherited Name Hides Enclosing Name binding problem Id Problem Reasons Non Static Reference In Constructor Invocation binding problem Id Problem Reasons Non Static Reference In Static Context throw new Selection Node Found binding scope problem Reporter invalid Field this Field Binding binding else if binding instanceof Problem Reference Binding tolerate some error cases if binding problem Id Problem Reasons Not Visible throw new Selection Node Found binding scope problem Reporter invalid Type this Type Binding binding else scope problem Reporter unresolvable Reference this binding throw new Selection Node Found throw new Selection Node Found binding  TypeBinding resolveType BlockScope getBinding isValidBinding ProblemFieldBinding problemId ProblemReasons NotVisible problemId ProblemReasons InheritedNameHidesEnclosingName problemId ProblemReasons NonStaticReferenceInConstructorInvocation problemId ProblemReasons NonStaticReferenceInStaticContext SelectionNodeFound problemReporter invalidField FieldBinding ProblemReferenceBinding problemId ProblemReasons NotVisible SelectionNodeFound problemReporter invalidType TypeBinding problemReporter unresolvableReference SelectionNodeFound SelectionNodeFound
throw new Selection Node Found binding public String Buffer print Expression int indent String Buffer output output append Select On Name NON NLS 1 return super print Expression 0 output append  SelectionNodeFound StringBuffer printExpression StringBuffer SelectOnName printExpression

public class Selection On Single Type Reference extends Single Type Reference public Selection On Single Type Reference char source long pos super source pos  SelectionOnSingleTypeReference SingleTypeReference SelectionOnSingleTypeReference
super source pos public void about To Resolve Scope scope get Type Binding scope parent step up from the Class Scope  aboutToResolve getTypeBinding ClassScope
public Type Binding get Type Binding Scope scope it can be a package type or member type Binding binding scope get Type Or Package new char token if binding is Valid Binding scope problem Reporter invalid Type this Type Binding binding throw new Selection Node Found throw new Selection Node Found binding  TypeBinding getTypeBinding getTypeOrPackage isValidBinding problemReporter invalidType TypeBinding SelectionNodeFound SelectionNodeFound
throw new Selection Node Found binding public String Buffer print Expression int indent String Buffer output return output append Select On Type append token append NON NLS 1  SelectionNodeFound StringBuffer printExpression StringBuffer SelectOnType
public Type Binding resolve Type Enclosing Block Scope scope Reference Binding enclosing Type super resolve Type Enclosing scope enclosing Type tolerate some error cases if this resolved Type null this resolved Type is Valid Binding this resolved Type problem Id Problem Reasons Not Visible throw new Selection Node Found else throw new Selection Node Found this resolved Type  TypeBinding resolveTypeEnclosing BlockScope ReferenceBinding enclosingType resolveTypeEnclosing enclosingType resolvedType resolvedType isValidBinding resolvedType problemId ProblemReasons NotVisible SelectionNodeFound SelectionNodeFound resolvedType

public class Selection On Super Reference extends Super Reference public Selection On Super Reference int pos int source End super pos source End  SelectionOnSuperReference SuperReference SelectionOnSuperReference sourceEnd sourceEnd
public String Buffer print Expression int indent String Buffer output output append Select On Super NON NLS 1 return super print Expression 0 output append  StringBuffer printExpression StringBuffer SelectOnSuper printExpression
public Type Binding resolve Type Block Scope scope Type Binding binding super resolve Type scope if binding null binding is Valid Binding throw new Selection Node Found else throw new Selection Node Found binding  TypeBinding resolveType BlockScope TypeBinding resolveType isValidBinding SelectionNodeFound SelectionNodeFound

public static final char THIS this to Char Array NON NLS 1 public Selection Parser Problem Reporter problem Reporter super problem Reporter  toCharArray SelectionParser ProblemReporter problemReporter problemReporter
super problem Reporter public char assist Identifier return Selection Scanner scanner selection Identifier  problemReporter assistIdentifier SelectionScanner selectionIdentifier
protected void attach Orphan Completion Node if is Orphan Completion Node AST Node orphan this assist Node is Orphan Completion Node false if in context of a type then persists the identifier into a fake field return type if current Element instanceof Recovered Type Recovered Type recovered Type Recovered Type current Element filter out cases where scanner is still inside type header if recovered Type found Opening Brace generate a pseudo field with a completion on type reference if orphan instanceof Type Reference current Element current Element add new Selection On Field Type Type Reference orphan 0 return Statement statement Statement wrap With Explicit Constructor Call If Needed orphan current Element current Element add statement 0 current Token 0 given we are not on an eof we do not want side effects caused by looked ahead token  attachOrphanCompletionNode isOrphanCompletionNode ASTNode assistNode isOrphanCompletionNode currentElement RecoveredType RecoveredType recoveredType RecoveredType currentElement recoveredType foundOpeningBrace TypeReference currentElement currentElement SelectionOnFieldType TypeReference wrapWithExplicitConstructorCallIfNeeded currentElement currentElement currentToken
private boolean check Recovered Type if current Element instanceof Recovered Type check if current awaiting identifier is the completion identifier if this index Of Assist Identifier 0 return false if last Error End Position selection Start last Error End Position selection End 1 return false Recovered Type recovered Type Recovered Type current Element filter out cases where scanner is still inside type header if recovered Type found Opening Brace this assist Node this get Type Reference 0 this last Check Point this assist Node source End 1 this is Orphan Completion Node true return true return false  checkRecoveredType currentElement RecoveredType indexOfAssistIdentifier lastErrorEndPosition selectionStart lastErrorEndPosition selectionEnd RecoveredType recoveredType RecoveredType currentElement recoveredType foundOpeningBrace assistNode getTypeReference lastCheckPoint assistNode sourceEnd isOrphanCompletionNode
protected void class Instance Creation boolean always Qualified Class Instance Creation Expression new Class Type Argument Listopt Class Bodyopt Class Bodyopt produces a null item on the ast Stak if it produces NO class body An empty class body produces a 0 on the length stack int length if length ast Length Stack ast Length Ptr 1 ast Stack ast Ptr null if this index Of Assist Identifier 0 super class Instance Creation always Qualified return Qualified Allocation Expression alloc ast Ptr ast Length Ptr alloc new Selection On Qualified Allocation Expression alloc source End end Position the position has been stored explicitly if length expression Length Stack expression Length Ptr 0 expression Ptr length System arraycopy expression Stack expression Ptr 1 alloc arguments new Expression length 0 length trick to avoid creating a selection on type reference char old Ident this assist Identifier this set Assist Identifier null alloc type get Type Reference 0 this set Assist Identifier old Ident the default constructor with the correct number of argument will be created and added by the TC see creates Internal Constructor With Binding alloc source Start int Stack int Ptr push On Expression Stack alloc this assist Node alloc this last Check Point alloc source End 1 if diet this restart Recovery true force to restart in recovery mode this last Ignored Token 1 this is Orphan Completion Node true else super class Instance Creation always Qualified  classInstanceCreation alwaysQualified ClassInstanceCreationExpression ClassType ArgumentListopt ClassBodyopt ClassBodyopt astStak astLengthStack astLengthPtr astStack astPtr indexOfAssistIdentifier classInstanceCreation alwaysQualified QualifiedAllocationExpression astPtr astLengthPtr SelectionOnQualifiedAllocationExpression sourceEnd endPosition expressionLengthStack expressionLengthPtr expressionPtr expressionStack expressionPtr oldIdent assistIdentifier setAssistIdentifier getTypeReference setAssistIdentifier oldIdent createsInternalConstructorWithBinding sourceStart intStack intPtr pushOnExpressionStack assistNode lastCheckPoint sourceEnd restartRecovery lastIgnoredToken isOrphanCompletionNode classInstanceCreation alwaysQualified
protected void consume Array Creation Expression Without Initializer Array Creation Without Array Initializer new Primitive Type Dim With Or With Out Exprs Array Creation Without Array Initializer new Class Or Interface Type Dim With Or With Out Exprs super consume Array Creation Expression Without Initializer Array Allocation Expression alloc Array Allocation Expression expression Stack expression Ptr if alloc type assist Node if diet this restart Recovery true force to restart in recovery mode this last Ignored Token 1 this is Orphan Completion Node true  consumeArrayCreationExpressionWithoutInitializer ArrayCreationWithoutArrayInitializer PrimitiveType DimWithOrWithOutExprs ArrayCreationWithoutArrayInitializer ClassOrInterfaceType DimWithOrWithOutExprs consumeArrayCreationExpressionWithoutInitializer ArrayAllocationExpression ArrayAllocationExpression expressionStack expressionPtr assistNode restartRecovery lastIgnoredToken isOrphanCompletionNode
protected void consume Array Creation Expression With Initializer Array Creation With Array Initializer new Primitive Type Dim With Or With Out Exprs Array Initializer Array Creation With Array Initializer new Class Or Interface Type Dim With Or With Out Exprs Array Initializer super consume Array Creation Expression With Initializer Array Allocation Expression alloc Array Allocation Expression expression Stack expression Ptr if alloc type assist Node if diet this restart Recovery true force to restart in recovery mode this last Ignored Token 1 this is Orphan Completion Node true  consumeArrayCreationExpressionWithInitializer ArrayCreationWithArrayInitializer PrimitiveType DimWithOrWithOutExprs ArrayInitializer ArrayCreationWithArrayInitializer ClassOrInterfaceType DimWithOrWithOutExprs ArrayInitializer consumeArrayCreationExpressionWithInitializer ArrayAllocationExpression ArrayAllocationExpression expressionStack expressionPtr assistNode restartRecovery lastIgnoredToken isOrphanCompletionNode
protected void consume Enter Anonymous Class Body Enter Anonymous Class Body empty if this index Of Assist Identifier 0 super consume Enter Anonymous Class Body return Qualified Allocation Expression alloc Type Declaration anonymous Type new Type Declaration this compilation Unit compilation Result anonymous Type name Type Declaration ANONYMOUS EMPTY NAME anonymous Type bits AST Node Anonymous And Local Mask alloc anonymous Type allocation new Selection On Qualified Allocation Expression anonymous Type mark Enclosing Member With Local Type push On Ast Stack anonymous Type alloc source End r Paren Pos the position has been stored explicitly int argument Length if argument Length expression Length Stack expression Length Ptr 0 expression Ptr argument Length System arraycopy expression Stack expression Ptr 1 alloc arguments new Expression argument Length 0 argument Length trick to avoid creating a selection on type reference char old Ident this assist Identifier this set Assist Identifier null alloc type get Type Reference 0 this set Assist Identifier old Ident anonymous Type source End alloc source End position at the type while it impacts the anonymous declaration anonymous Type source Start anonymous Type declaration Source Start alloc type source Start alloc source Start int Stack int Ptr push On Expression Stack alloc assist Node alloc this last Check Point alloc source End 1 if diet this restart Recovery true force to restart in recovery mode this last Ignored Token 1 current Token 0 opening brace already taken into account has Reported Error true anonymous Type body Start scanner current Position list Length 0 will be updated when reading super interfaces recovery if current Element null last Check Point anonymous Type body Start current Element current Element add anonymous Type 0 current Token 0 opening brace already taken into account last Ignored Token 1  consumeEnterAnonymousClassBody EnterAnonymousClassBody indexOfAssistIdentifier consumeEnterAnonymousClassBody QualifiedAllocationExpression TypeDeclaration anonymousType TypeDeclaration compilationUnit compilationResult anonymousType TypeDeclaration ANONYMOUS_EMPTY_NAME anonymousType ASTNode AnonymousAndLocalMask anonymousType SelectionOnQualifiedAllocationExpression anonymousType markEnclosingMemberWithLocalType pushOnAstStack anonymousType sourceEnd rParenPos argumentLength argumentLength expressionLengthStack expressionLengthPtr expressionPtr argumentLength expressionStack expressionPtr argumentLength argumentLength oldIdent assistIdentifier setAssistIdentifier getTypeReference setAssistIdentifier oldIdent anonymousType sourceEnd sourceEnd anonymousType sourceStart anonymousType declarationSourceStart sourceStart sourceStart intStack intPtr pushOnExpressionStack assistNode lastCheckPoint sourceEnd restartRecovery lastIgnoredToken currentToken hasReportedError anonymousType bodyStart currentPosition listLength currentElement lastCheckPoint anonymousType bodyStart currentElement currentElement anonymousType currentToken lastIgnoredToken
protected void consume Enter Variable Enter Variable empty do nothing by default super consume Enter Variable Abstract Variable Declaration variable Abstract Variable Declaration ast Stack ast Ptr if variable type assist Node if diet this restart Recovery true force to restart in recovery mode this last Ignored Token 1 is Orphan Completion Node false already attached inside variable decl  consumeEnterVariable EnterVariable consumeEnterVariable AbstractVariableDeclaration AbstractVariableDeclaration astStack astPtr assistNode restartRecovery lastIgnoredToken isOrphanCompletionNode
protected void consume Exit Variable With Initialization super consume Exit Variable With Initialization does not keep the initialization if selection is not inside Abstract Variable Declaration variable Abstract Variable Declaration ast Stack ast Ptr int start variable initialization source Start int end variable initialization source End if selection Start start selection End start selection Start end selection End end variable initialization null  consumeExitVariableWithInitialization consumeExitVariableWithInitialization AbstractVariableDeclaration AbstractVariableDeclaration astStack astPtr sourceStart sourceEnd selectionStart selectionEnd selectionStart selectionEnd
protected void consume Field Access boolean is Super Access Field Access Primary Identifier Field Access super Identifier if this index Of Assist Identifier 0 super consume Field Access is Super Access return Field Reference field Reference new Selection On Field Reference identifier Stack identifier Ptr identifier Position Stack identifier Ptr identifier Length Ptr if is Super Access considerates the field Referenceerence beginning at the super field Reference source Start int Stack int Ptr field Reference receiver new Super Reference field Reference source Start end Position push On Expression Stack field Reference else optimize push pop if field Reference receiver expression Stack expression Ptr is This field Referenceerence begins at the this field Reference source Start field Reference receiver source Start expression Stack expression Ptr field Reference assist Node field Reference this last Check Point field Reference source End 1 if diet this restart Recovery true force to restart in recovery mode this last Ignored Token 1 this is Orphan Completion Node true  consumeFieldAccess isSuperAccess FieldAccess FieldAccess indexOfAssistIdentifier consumeFieldAccess isSuperAccess FieldReference fieldReference SelectionOnFieldReference identifierStack identifierPtr identifierPositionStack identifierPtr identifierLengthPtr isSuperAccess fieldReferenceerence fieldReference sourceStart intStack intPtr fieldReference SuperReference fieldReference sourceStart endPosition pushOnExpressionStack fieldReference fieldReference expressionStack expressionPtr isThis fieldReferenceerence fieldReference sourceStart fieldReference sourceStart expressionStack expressionPtr fieldReference assistNode fieldReference lastCheckPoint fieldReference sourceEnd restartRecovery lastIgnoredToken isOrphanCompletionNode
protected void consume Formal Parameter if this index Of Assist Identifier 0 super consume Formal Parameter if diet diet Int 0 ast Ptr 1 Argument argument Argument ast Stack ast Ptr if argument type assist Node is Orphan Completion Node true this restart Recovery true force to restart in recovery mode this last Ignored Token 1 else identifier Length Ptr char identifier Name identifier Stack identifier Ptr long name Positions identifier Position Stack identifier Ptr Type Reference type get Type Reference int Stack int Ptr int Stack int Ptr int modifier Positions int Stack int Ptr int Ptr Argument arg new Selection On Argument Name identifier Name name Positions type int Stack int Ptr 1 Acc Deprecated modifiers arg declaration Source Start modifier Positions push On Ast Stack arg assist Node arg this last Check Point int name Positions is Orphan Completion Node true if diet this restart Recovery true force to restart in recovery mode this last Ignored Token 1 if incomplete method header list Length counter will not have been reset indicating that some arguments are available on the stack list Length  consumeFormalParameter indexOfAssistIdentifier consumeFormalParameter dietInt astPtr astStack astPtr assistNode isOrphanCompletionNode restartRecovery lastIgnoredToken identifierLengthPtr identifierName identifierStack identifierPtr namePositions identifierPositionStack identifierPtr TypeReference getTypeReference intStack intPtr intStack intPtr modifierPositions intStack intPtr intPtr SelectionOnArgumentName identifierName namePositions intStack intPtr AccDeprecated declarationSourceStart modifierPositions pushOnAstStack assistNode lastCheckPoint namePositions isOrphanCompletionNode restartRecovery lastIgnoredToken listLength listLength
protected void consume Instance Of Expression int op if index Of Assist Identifier 0 super consume Instance Of Expression op else get Type Reference int Stack int Ptr this is Orphan Completion Node true this restart Recovery true this last Ignored Token 1  consumeInstanceOfExpression indexOfAssistIdentifier consumeInstanceOfExpression getTypeReference intStack intPtr isOrphanCompletionNode restartRecovery lastIgnoredToken
protected void consume Local Variable Declaration Statement super consume Local Variable Declaration Statement force to restart in recovery mode if the declaration contains the selection if this diet Local Declaration local Declaration Local Declaration this ast Stack this ast Ptr if this selection Start local Declaration source Start this selection End local Declaration source End this restart Recovery true this last Ignored Token 1  consumeLocalVariableDeclarationStatement consumeLocalVariableDeclarationStatement LocalDeclaration localDeclaration LocalDeclaration astStack astPtr selectionStart localDeclaration sourceStart selectionEnd localDeclaration sourceEnd restartRecovery lastIgnoredToken
else push On Expression Stack new Expression public Type Binding resolve Type Block Scope scope constructor Call resolve scope return null  pushOnExpressionStack TypeBinding resolveType BlockScope constructorCall
return null public String Buffer print Expression int indent String Buffer output return output  StringBuffer printExpression StringBuffer
protected void consume Method Invocation Name Method Invocation Name Argument Listopt when the name is only an identifier we have a message send to this implicit char selector identifier Stack identifier Ptr int access Mode if selector this assist Identifier if Char Operation equals selector SUPER access Mode Explicit Constructor Call Super else if Char Operation equals selector THIS access Mode Explicit Constructor Call This else super consume Method Invocation Name return else super consume Method Invocation Name return final Explicit Constructor Call constructor Call new Selection On Explicit Constructor Call access Mode constructor Call source End r Paren Pos constructor Call source Start int identifier Position Stack identifier Ptr 32 int length if length expression Length Stack expression Length Ptr 0 expression Ptr length System arraycopy expression Stack expression Ptr 1 constructor Call arguments new Expression length 0 length if diet push On Ast Stack constructor Call this restart Recovery true force to restart in recovery mode this last Ignored Token 1 else push On Expression Stack new Expression public Type Binding resolve Type Block Scope scope constructor Call resolve scope return null public String Buffer print Expression int indent String Buffer output return output this assist Node constructor Call this last Check Point constructor Call source End 1 this is Orphan Completion Node true  consumeMethodInvocationName MethodInvocation ArgumentListopt identifierStack identifierPtr accessMode assistIdentifier CharOperation accessMode ExplicitConstructorCall CharOperation accessMode ExplicitConstructorCall consumeMethodInvocationName consumeMethodInvocationName ExplicitConstructorCall constructorCall SelectionOnExplicitConstructorCall accessMode constructorCall sourceEnd rParenPos constructorCall sourceStart identifierPositionStack identifierPtr expressionLengthStack expressionLengthPtr expressionPtr expressionStack expressionPtr constructorCall pushOnAstStack constructorCall restartRecovery lastIgnoredToken pushOnExpressionStack TypeBinding resolveType BlockScope constructorCall StringBuffer printExpression StringBuffer assistNode constructorCall lastCheckPoint constructorCall sourceEnd isOrphanCompletionNode
else push On Expression Stack new Expression public Type Binding resolve Type Block Scope scope constructor Call resolve scope return null  pushOnExpressionStack TypeBinding resolveType BlockScope constructorCall
return null public String Buffer print Expression int indent String Buffer output return output  StringBuffer printExpression StringBuffer
protected void consume Method Invocation Primary optimize the push pop Method Invocation Primary Identifier Argument Listopt char selector identifier Stack identifier Ptr int access Mode if selector this assist Identifier if Char Operation equals selector SUPER access Mode Explicit Constructor Call Super else if Char Operation equals selector THIS access Mode Explicit Constructor Call This else super consume Method Invocation Primary return else super consume Method Invocation Primary return final Explicit Constructor Call constructor Call new Selection On Explicit Constructor Call access Mode constructor Call source End r Paren Pos int length if length expression Length Stack expression Length Ptr 0 expression Ptr length System arraycopy expression Stack expression Ptr 1 constructor Call arguments new Expression length 0 length constructor Call qualification expression Stack expression Ptr constructor Call source Start constructor Call qualification source Start if diet push On Ast Stack constructor Call this restart Recovery true force to restart in recovery mode this last Ignored Token 1 else push On Expression Stack new Expression public Type Binding resolve Type Block Scope scope constructor Call resolve scope return null public String Buffer print Expression int indent String Buffer output return output this assist Node constructor Call this last Check Point constructor Call source End 1 this is Orphan Completion Node true  consumeMethodInvocationPrimary MethodInvocation ArgumentListopt identifierStack identifierPtr accessMode assistIdentifier CharOperation accessMode ExplicitConstructorCall CharOperation accessMode ExplicitConstructorCall consumeMethodInvocationPrimary consumeMethodInvocationPrimary ExplicitConstructorCall constructorCall SelectionOnExplicitConstructorCall accessMode constructorCall sourceEnd rParenPos expressionLengthStack expressionLengthPtr expressionPtr expressionStack expressionPtr constructorCall constructorCall expressionStack expressionPtr constructorCall sourceStart constructorCall sourceStart pushOnAstStack constructorCall restartRecovery lastIgnoredToken pushOnExpressionStack TypeBinding resolveType BlockScope constructorCall StringBuffer printExpression StringBuffer assistNode constructorCall lastCheckPoint constructorCall sourceEnd isOrphanCompletionNode
protected void consume Type Import On Demand Declaration Name Type Import On Demand Declaration Name import Name push an Import Ref build from the last name stored in the identifier stack int index no need to take action if not inside assist identifiers if index index Of Assist Identifier 0 super consume Type Import On Demand Declaration Name return retrieve identifiers subset and whole positions the assist node positions should include the entire replaced source int length identifier Length Stack identifier Length Ptr char subset identifier Sub Set index 1 include the assist Identifier identifier Length Ptr identifier Ptr length long positions new long length System arraycopy identifier Position Stack identifier Ptr 1 positions 0 length build specific assist node on import statement Import Reference reference this create Assist Import Reference subset positions Acc Default reference on Demand true assist Node reference this last Check Point reference source End 1 push On Ast Stack reference if current Token Token NameSEMICOLON reference declaration Source End scanner current Position 1 else reference declaration Source End int positions length 1 end Position is just before the reference declaration Source Start int Stack int Ptr flush comments defined prior to import statements reference declaration Source End this flush Comments Defined Prior To reference declaration Source End recovery if current Element null last Check Point reference declaration Source End 1 current Element current Element add reference 0 last Ignored Token 1 restart Recovery true used to avoid branching back into the regular automaton  consumeTypeImportOnDemandDeclarationName TypeImportOnDemandDeclarationName ImportRef indexOfAssistIdentifier consumeTypeImportOnDemandDeclarationName identifierLengthStack identifierLengthPtr identifierSubSet assistIdentifier identifierLengthPtr identifierPtr identifierPositionStack identifierPtr ImportReference createAssistImportReference AccDefault onDemand assistNode lastCheckPoint sourceEnd pushOnAstStack currentToken TokenNameSEMICOLON declarationSourceEnd currentPosition declarationSourceEnd endPosition declarationSourceStart intStack intPtr declarationSourceEnd flushCommentsDefinedPriorTo declarationSourceEnd currentElement lastCheckPoint declarationSourceEnd currentElement currentElement lastIgnoredToken restartRecovery
public Import Reference create Assist Import Reference char tokens long positions int mod return new Selection On Import Reference tokens positions mod  ImportReference createAssistImportReference SelectionOnImportReference
return new Selection On Import Reference tokens positions mod public Import Reference create Assist Package Reference char tokens long positions return new Selection On Package Reference tokens positions  SelectionOnImportReference ImportReference createAssistPackageReference SelectionOnPackageReference
protected Local Declaration create Local Declaration char assist Name int source Start int source End if this index Of Assist Identifier 0 return super create Local Declaration assist Name source Start source End else Selection On Local Name local new Selection On Local Name assist Name source Start source End this assist Node local this last Check Point source End 1 return local  LocalDeclaration createLocalDeclaration assistName sourceStart sourceEnd indexOfAssistIdentifier createLocalDeclaration assistName sourceStart sourceEnd SelectionOnLocalName SelectionOnLocalName assistName sourceStart sourceEnd assistNode lastCheckPoint sourceEnd
public Name Reference create Qualified Assist Name Reference char previous Identifiers char assist Name long positions return new Selection On Qualified Name Reference previous Identifiers assist Name positions  NameReference createQualifiedAssistNameReference previousIdentifiers assistName SelectionOnQualifiedNameReference previousIdentifiers assistName
public Type Reference create Qualified Assist Type Reference char previous Identifiers char assist Name long positions return new Selection On Qualified Type Reference previous Identifiers assist Name positions  TypeReference createQualifiedAssistTypeReference previousIdentifiers assistName SelectionOnQualifiedTypeReference previousIdentifiers assistName
positions public Name Reference create Single Assist Name Reference char assist Name long position return new Selection On Single Name Reference assist Name position  NameReference createSingleAssistNameReference assistName SelectionOnSingleNameReference assistName
return new Selection On Single Name Reference assist Name position public Type Reference create Single Assist Type Reference char assist Name long position return new Selection On Single Type Reference assist Name position  SelectionOnSingleNameReference assistName TypeReference createSingleAssistTypeReference assistName SelectionOnSingleTypeReference assistName
public Compilation Unit Declaration diet Parse I Compilation Unit source Unit Compilation Result compilation Result int start int end this selection Start start this selection End end Selection Scanner selection Scanner Selection Scanner this scanner selection Scanner selection Identifier null selection Scanner selection Start start selection Scanner selection End end return this diet Parse source Unit compilation Result  CompilationUnitDeclaration dietParse ICompilationUnit sourceUnit CompilationResult compilationResult selectionStart selectionEnd SelectionScanner selectionScanner SelectionScanner selectionScanner selectionIdentifier selectionScanner selectionStart selectionScanner selectionEnd dietParse sourceUnit compilationResult
protected Name Reference get Unspecified Reference build a unspecified Name Reference which may be qualified int completion Index no need to take action if not inside completed identifiers if completion Index index Of Assist Identifier 0 return super get Unspecified Reference int length identifier Length Stack identifier Length Ptr if Char Operation equals assist Identifier SUPER Reference reference if completion Index 0 qualified super discard super from identifier stacks identifier Length Stack identifier Length Ptr completion Index int ptr identifier Ptr length completion Index reference new Selection On Qualified Super Reference get Type Reference 0 int identifier Position Stack ptr 1 32 int identifier Position Stack ptr 1 else standard super identifier Ptr length identifier Length Ptr reference new Selection On Super Reference int identifier Position Stack identifier Ptr 1 32 int identifier Position Stack identifier Ptr 1 push On Ast Stack reference this assist Node reference this last Check Point reference source End 1 if diet diet Int 0 this restart Recovery true force to restart in recovery mode this last Ignored Token 1 this is Orphan Completion Node true return new Single Name Reference Char Operation NO CHAR 0 dummy reference Name Reference name Reference retrieve identifiers subset and whole positions the completion node positions should include the entire replaced source char subset identifier Sub Set completion Index identifier Length Ptr identifier Ptr length long positions new long length System arraycopy identifier Position Stack identifier Ptr 1 positions 0 length build specific completion on name reference if completion Index 0 completion inside first identifier name Reference this create Single Assist Name Reference assist Identifier positions 0 else completion inside subsequent identifier name Reference this create Qualified Assist Name Reference subset assist Identifier positions assist Node name Reference this last Check Point name Reference source End 1 if diet this restart Recovery true force to restart in recovery mode this last Ignored Token 1 this is Orphan Completion Node true return name Reference  NameReference getUnspecifiedReference NameReference completionIndex completionIndex indexOfAssistIdentifier getUnspecifiedReference identifierLengthStack identifierLengthPtr CharOperation assistIdentifier completionIndex identifierLengthStack identifierLengthPtr completionIndex identifierPtr completionIndex SelectionOnQualifiedSuperReference getTypeReference identifierPositionStack identifierPositionStack identifierPtr identifierLengthPtr SelectionOnSuperReference identifierPositionStack identifierPtr identifierPositionStack identifierPtr pushOnAstStack assistNode lastCheckPoint sourceEnd dietInt restartRecovery lastIgnoredToken isOrphanCompletionNode SingleNameReference CharOperation NO_CHAR NameReference nameReference identifierSubSet completionIndex identifierLengthPtr identifierPtr identifierPositionStack identifierPtr completionIndex nameReference createSingleAssistNameReference assistIdentifier nameReference createQualifiedAssistNameReference assistIdentifier assistNode nameReference lastCheckPoint nameReference sourceEnd restartRecovery lastIgnoredToken isOrphanCompletionNode nameReference
protected Name Reference get Unspecified Reference Optimized int index index Of Assist Identifier Name Reference reference super get Unspecified Reference Optimized if index 0 if diet this restart Recovery true force to restart in recovery mode this last Ignored Token 1 this is Orphan Completion Node true return reference  NameReference getUnspecifiedReferenceOptimized indexOfAssistIdentifier NameReference getUnspecifiedReferenceOptimized restartRecovery lastIgnoredToken isOrphanCompletionNode
return reference public void initialize Scanner this scanner new Selection Scanner this options source Level  initializeScanner SelectionScanner sourceLevel
protected Message Send new Message Send Argument Listopt the arguments are on the expression stack char selector identifier Stack identifier Ptr if selector this assist Identifier return super new Message Send Message Send message Send new Selection On Message Send int length if length expression Length Stack expression Length Ptr 0 expression Ptr length System arraycopy expression Stack expression Ptr 1 message Send arguments new Expression length 0 length assist Node message Send if diet this restart Recovery true force to restart in recovery mode this last Ignored Token 1 this is Orphan Completion Node true return message Send  MessageSend newMessageSend ArgumentListopt identifierStack identifierPtr assistIdentifier newMessageSend MessageSend messageSend SelectionOnMessageSend expressionLengthStack expressionLengthPtr expressionPtr expressionStack expressionPtr messageSend assistNode messageSend restartRecovery lastIgnoredToken isOrphanCompletionNode messageSend
public Compilation Unit Declaration parse I Compilation Unit source Unit Compilation Result compilation Result int start int end if end 1 return super parse source Unit compilation Result start end this selection Start start this selection End end Selection Scanner selection Scanner Selection Scanner this scanner selection Scanner selection Identifier null selection Scanner selection Start start selection Scanner selection End end return super parse source Unit compilation Result 1 1 parse without reseting the scanner  CompilationUnitDeclaration ICompilationUnit sourceUnit CompilationResult compilationResult sourceUnit compilationResult selectionStart selectionEnd SelectionScanner selectionScanner SelectionScanner selectionScanner selectionIdentifier selectionScanner selectionStart selectionScanner selectionEnd sourceUnit compilationResult
protected boolean resume After Recovery if reached assist node inside method body but still inside nested type should continue in diet mode until the end of the method body if this assist Node null reference Context instanceof Compilation Unit Declaration current Element preserve Enclosing Blocks if current Element enclosing Type null if current Element instanceof Recovered Type this reset Stacks return false Recovered Type recovered Type Recovered Type current Element if recovered Type type Declaration null recovered Type type Declaration allocation this assist Node this reset Stacks return false return super resume After Recovery  resumeAfterRecovery assistNode referenceContext CompilationUnitDeclaration currentElement preserveEnclosingBlocks currentElement enclosingType currentElement RecoveredType resetStacks RecoveredType recoveredType RecoveredType currentElement recoveredType typeDeclaration recoveredType typeDeclaration assistNode resetStacks resumeAfterRecovery
public void selection Identifier Check if check Recovered Type return  selectionIdentifierCheck checkRecoveredType
if check Recovered Type return public void set Assist Identifier char assist Ident Selection Scanner scanner selection Identifier assist Ident  checkRecoveredType setAssistIdentifier assistIdent SelectionScanner selectionIdentifier assistIdent
protected void update Recovery State expose parser state to recovery state current Element update From Parser State may be able to retrieve completion Node as an orphan and then attach it this selection Identifier Check this attach Orphan Completion Node if an assist node has been found and a recovered element exists mark enclosing blocks as to be preserved if this assist Node null this current Element null current Element preserve Enclosing Blocks check and update recovered state based on current token this action is also performed when shifting token after recovery got activated once this recovery Token Check  updateRecoveryState currentElement updateFromParserState completionNode selectionIdentifierCheck attachOrphanCompletionNode assistNode currentElement currentElement preserveEnclosingBlocks recoveryTokenCheck

public Selection Scanner long source Level super false comment false whitespace false nls source Level null task Tags null task Priorities true task Case Sensitive  SelectionScanner sourceLevel sourceLevel taskTags taskPriorities taskCaseSensitive
public char get Current Identifier Source if selection Identifier null if selection Start start Position selection End current Position 1 if without Unicode Ptr 0 check unicode scenario System arraycopy without Unicode Buffer 1 selection Identifier new char without Unicode Ptr 0 without Unicode Ptr else int length current Position start Position no char sharing around completion Identifier we want it to be unique so as to use identity checks System arraycopy source start Position selection Identifier new char length 0 length return selection Identifier return super get Current Identifier Source  getCurrentIdentifierSource selectionIdentifier selectionStart startPosition selectionEnd currentPosition withoutUnicodePtr withoutUnicodeBuffer selectionIdentifier withoutUnicodePtr withoutUnicodePtr currentPosition startPosition completionIdentifier startPosition selectionIdentifier selectionIdentifier getCurrentIdentifierSource
public int scan Identifier Or Keyword int id super scan Identifier Or Keyword convert completed keyword into an identifier if id Token Name Identifier start Position selection Start current Position selection End 1 return Token Name Identifier return id  scanIdentifierOrKeyword scanIdentifierOrKeyword TokenNameIdentifier startPosition selectionStart currentPosition selectionEnd TokenNameIdentifier

public boolean error In Signature false Abstract Method Declaration Compilation Result compilation Result this compilation Result compilation Result  errorInSignature AbstractMethodDeclaration CompilationResult compilationResult compilationResult compilationResult
public void abort int abort Level I Problem problem switch abort Level case Abort Compilation throw new Abort Compilation this compilation Result problem case Abort Compilation Unit throw new Abort Compilation Unit this compilation Result problem case Abort Type throw new Abort Type this compilation Result problem default throw new Abort Method this compilation Result problem  abortLevel IProblem abortLevel AbortCompilation AbortCompilation compilationResult AbortCompilationUnit AbortCompilationUnit compilationResult AbortType AbortType compilationResult AbortMethod compilationResult
public abstract void analyse Code Class Scope class Scope Initialization Flow Context initialization Context Flow Info info  analyseCode ClassScope classScope InitializationFlowContext initializationContext FlowInfo
Bind and add argument s binding into the scope of the method public void bind Arguments if this arguments null by default arguments in abstract native methods are considered to be used no complaint is expected boolean used this binding null this binding is Abstract this binding is Native int length this arguments length for int i 0 i length i Type Binding arg Type this binding null null this binding parameters i this arguments i bind this scope arg Type used  bindArguments isAbstract isNative TypeBinding argType argType
Record the thrown exception type bindings in the corresponding type references public void bind Thrown Exceptions if this thrown Exceptions null this binding null this binding thrown Exceptions null int thrown Exception Length this thrown Exceptions length int length this binding thrown Exceptions length if length thrown Exception Length for int i 0 i length i this thrown Exceptions i resolved Type this binding thrown Exceptions i else int binding Index 0 for int i 0 i thrown Exception Length binding Index length i Type Reference thrown Exception this thrown Exceptions i Reference Binding thrown Exception Binding this binding thrown Exceptions binding Index char binding Compound Name thrown Exception Binding compound Name if thrown Exception instanceof Single Type Reference single type reference int length Name binding Compound Name length char thrown Exception Type Name thrown Exception get Type Name 0 if Char Operation equals thrown Exception Type Name binding Compound Name length Name 1 thrown Exception resolved Type thrown Exception Binding binding Index else qualified type reference if Char Operation equals thrown Exception get Type Name binding Compound Name thrown Exception resolved Type thrown Exception Binding binding Index  bindThrownExceptions thrownExceptions thrownExceptions thrownExceptionLength thrownExceptions thrownExceptions thrownExceptionLength thrownExceptions resolvedType thrownExceptions bindingIndex thrownExceptionLength bindingIndex TypeReference thrownException thrownExceptions ReferenceBinding thrownExceptionBinding thrownExceptions bindingIndex bindingCompoundName thrownExceptionBinding compoundName thrownException SingleTypeReference lengthName bindingCompoundName thrownExceptionTypeName thrownException getTypeName CharOperation thrownExceptionTypeName bindingCompoundName lengthName thrownException resolvedType thrownExceptionBinding bindingIndex CharOperation thrownException getTypeName bindingCompoundName thrownException resolvedType thrownExceptionBinding bindingIndex
public Compilation Result compilation Result return this compilation Result  CompilationResult compilationResult compilationResult
Bytecode generation for a method param class Scope param class File public void generate Code Class Scope class Scope Class File class File int problem ResetPC 0 class File code Stream wide Mode false reset wide Mode to false if this ignore Further Investigation method is known to have errors dump a problem method if this binding null return handle methods with invalid signature or duplicates int problems Length I Problem problems this scope reference Compilation Unit compilation Result get Problems I Problem problems Copy new I Problem problems Length problems length System arraycopy problems 0 problems Copy 0 problems Length class File add Problem Method this this binding problems Copy return regular code generation try problem ResetPC class File contents Offset this generate Code class File catch Abort Method e a fatal error was detected during code generation need to restart code gen if possible if e compilation Result Code Stream RESTART IN WIDE MODE a branch target required a goto w restart code gen in wide mode try class File contents Offset problem ResetPC class File method Count class File code Stream wide Mode true request wide mode this generate Code class File restart method generation catch Abort Method e2 int problems Length I Problem problems this scope reference Compilation Unit compilation Result get All Problems I Problem problems Copy new I Problem problems Length problems length System arraycopy problems 0 problems Copy 0 problems Length class File add Problem Method this this binding problems Copy problem ResetPC else produce a problem method accounting for this fatal error int problems Length I Problem problems this scope reference Compilation Unit compilation Result get All Problems I Problem problems Copy new I Problem problems Length problems length System arraycopy problems 0 problems Copy 0 problems Length class File add Problem Method this this binding problems Copy problem ResetPC  classScope classFile generateCode ClassScope classScope ClassFile classFile problemResetPC classFile codeStream wideMode wideMode ignoreFurtherInvestigation problemsLength IProblem referenceCompilationUnit compilationResult getProblems IProblem problemsCopy IProblem problemsLength problemsCopy problemsLength classFile addProblemMethod problemsCopy problemResetPC classFile contentsOffset generateCode classFile AbortMethod compilationResult CodeStream RESTART_IN_WIDE_MODE goto_w classFile contentsOffset problemResetPC classFile methodCount classFile codeStream wideMode generateCode classFile AbortMethod problemsLength IProblem referenceCompilationUnit compilationResult getAllProblems IProblem problemsCopy IProblem problemsLength problemsCopy problemsLength classFile addProblemMethod problemsCopy problemResetPC problemsLength IProblem referenceCompilationUnit compilationResult getAllProblems IProblem problemsCopy IProblem problemsLength problemsCopy problemsLength classFile addProblemMethod problemsCopy problemResetPC
private void generate Code Class File class File class File generate Method Info Header this binding int method Attribute Offset class File contents Offset int attribute Number class File generate Method Info Attribute this binding if this binding is Native this binding is Abstract int code Attribute Offset class File contents Offset class File generate Code Attribute Header Code Stream code Stream class File code Stream code Stream reset this class File initialize local positions this scope compute Local Variable Positions this binding is Static 0 1 code Stream arguments initialization for local variable debug attributes if this arguments null for int i 0 max this arguments length i max i Local Variable Binding arg Binding code Stream add Visible Local Variable arg Binding this arguments i binding arg Binding record Initialization StartPC 0 if this statements null for int i 0 max this statements length i max i this statements i generate Code this scope code Stream if this need Free Return code Stream return  local variable attributes code Stream exit User Scope this scope code Stream record Positions From 0 this declaration Source End class File complete Code Attribute code Attribute Offset attribute Number else check Arguments Size class File complete Method Info method Attribute Offset attribute Number if a problem got reported during code gen then trigger problem method creation if this ignore Further Investigation throw new Abort Method this scope reference Compilation Unit compilation Result null  generateCode ClassFile classFile classFile generateMethodInfoHeader methodAttributeOffset classFile contentsOffset attributeNumber classFile generateMethodInfoAttribute isNative isAbstract codeAttributeOffset classFile contentsOffset classFile generateCodeAttributeHeader CodeStream codeStream classFile codeStream codeStream classFile computeLocalVariablePositions isStatic codeStream LocalVariableBinding argBinding codeStream addVisibleLocalVariable argBinding argBinding recordInitializationStartPC generateCode codeStream needFreeReturn codeStream return_ codeStream exitUserScope codeStream recordPositionsFrom declarationSourceEnd classFile completeCodeAttribute codeAttributeOffset attributeNumber checkArgumentsSize classFile completeMethodInfo methodAttributeOffset attributeNumber ignoreFurtherInvestigation AbortMethod referenceCompilationUnit compilationResult
private void check Arguments Size Type Binding parameters this binding parameters int size 1 an abstact method or a native method cannot be static for int i 0 max parameters length i max i Type Binding parameter parameters i if parameter Long Binding parameter Double Binding size 2 else size if size 0xFF this scope problem Reporter no More Available Space For Argument this scope locals i this scope locals i declaration  checkArgumentsSize TypeBinding TypeBinding LongBinding DoubleBinding problemReporter noMoreAvailableSpaceForArgument
public boolean has Errors return this ignore Further Investigation  hasErrors ignoreFurtherInvestigation
public boolean is Abstract if this binding null return this binding is Abstract return this modifiers Acc Abstract 0  isAbstract isAbstract AccAbstract
public boolean is Clinit return false  isClinit
public boolean is Constructor return false  isConstructor
public boolean is Default Constructor return false  isDefaultConstructor
public boolean is Initialization Method return false  isInitializationMethod
public boolean is Native if this binding null return this binding is Native return this modifiers Acc Native 0  isNative isNative AccNative
public boolean is Static if this binding null return this binding is Static return this modifiers Acc Static 0  isStatic isStatic AccStatic
Fill up the method body with statement param parser param unit public abstract void parse Statements Parser parser  parseStatements
public String Buffer print int tab String Buffer output print Indent tab output print Modifiers this modifiers output print Return Type 0 output append this selector append if this arguments null for int i 0 i this arguments length i if i 0 output append NON NLS 1 this arguments i print 0 output output append if this thrown Exceptions null output append throws NON NLS 1 for int i 0 i this thrown Exceptions length i if i 0 output append NON NLS 1 this thrown Exceptions i print 0 output print Body tab 1 output return output  StringBuffer StringBuffer printIndent printModifiers printReturnType thrownExceptions thrownExceptions thrownExceptions printBody
public String Buffer print Body int indent String Buffer output if is Abstract this modifiers Acc Semicolon Body 0 return output append output append NON NLS 1 if this statements null for int i 0 i this statements length i output append n this statements i print Statement indent output output append n NON NLS 1 print Indent indent 0 0 indent 1 output append return output  StringBuffer printBody StringBuffer isAbstract AccSemicolonBody printStatement printIndent
public String Buffer print Return Type int indent String Buffer output return output  StringBuffer printReturnType StringBuffer
public void resolve Class Scope upper Scope if this binding null this ignore Further Investigation true try bind Arguments bind Thrown Exceptions resolve Javadoc resolve Statements catch Abort Method e abort on fatal error this ignore Further Investigation true  ClassScope upperScope ignoreFurtherInvestigation bindArguments bindThrownExceptions resolveJavadoc resolveStatements AbortMethod ignoreFurtherInvestigation
public void resolve Javadoc if this binding null return if this javadoc null this javadoc resolve this scope return if this binding declaring Class null this binding declaring Class is Local Type this scope problem Reporter javadoc Missing this source Start this source End this binding modifiers  resolveJavadoc declaringClass declaringClass isLocalType problemReporter javadocMissing sourceStart sourceEnd
public void resolve Statements if this statements null for int i 0 length this statements length i length i this statements i resolve this scope else if this bits Undocumented Empty BlockMASK 0 this scope problem Reporter undocumented Empty Block this body Start 1 this body End 1  resolveStatements UndocumentedEmptyBlockMASK problemReporter undocumentedEmptyBlock bodyStart bodyEnd
public void tag As Having Errors this ignore Further Investigation true  tagAsHavingErrors ignoreFurtherInvestigation
public void traverse AST Visitor visitor Class Scope class Scope default implementation subclass will define it  ASTVisitor ClassScope classScope

public Type Reference type public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info return flow Info  TypeReference FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo flowInfo
see org eclipse jdt internal compiler lookup Invocation Site is Super Access public boolean is Super Access return false  InvocationSite isSuperAccess isSuperAccess
see org eclipse jdt internal compiler lookup Invocation Site is Type Access public boolean is Type Access return false  InvocationSite isTypeAccess isTypeAccess
public String Buffer print Statement int indent String Buffer output print Indent indent output print Modifiers this modifiers output type print 0 output append append this name if initialization null output append NON NLS 1 initialization print Expression indent output return output append  StringBuffer printStatement StringBuffer printIndent printModifiers printExpression
public void resolve Block Scope scope do nothing by default redefined for local variables  BlockScope
see org eclipse jdt internal compiler lookup Invocation Site set Actual Receiver Type org eclipse jdt internal compiler lookup Reference Binding public void set Actual Receiver Type Reference Binding receiver Type do nothing by default  InvocationSite setActualReceiverType ReferenceBinding setActualReceiverType ReferenceBinding receiverType
see org eclipse jdt internal compiler lookup Invocation Site set Depth int public void set Depth int depth this hidden Variable Depth depth  InvocationSite setDepth setDepth hiddenVariableDepth
see org eclipse jdt internal compiler lookup Invocation Site set Field Index int public void set Field Index int depth do nothing by default  InvocationSite setFieldIndex setFieldIndex

public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info check captured variables are initialized in current context 26134 check Captured Local Initialization If Necessary this binding declaring Class current Scope flow Info process arguments if arguments null for int i 0 count arguments length i count i flow Info arguments i analyse Code current Scope flow Context flow Info unconditional Inits record some dependency information for exception types Reference Binding thrown Exceptions if thrown Exceptions this binding thrown Exceptions length 0 check exception handling flow Context check Exception Handlers thrown Exceptions this flow Info current Scope manage Enclosing Instance Access If Necessary current Scope flow Info manage Synthetic Access If Necessary current Scope flow Info return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo checkCapturedLocalInitializationIfNecessary declaringClass currentScope flowInfo flowInfo analyseCode currentScope flowContext flowInfo unconditionalInits ReferenceBinding thrownExceptions thrownExceptions thrownExceptions flowContext checkExceptionHandlers thrownExceptions flowInfo currentScope manageEnclosingInstanceAccessIfNecessary currentScope flowInfo manageSyntheticAccessIfNecessary currentScope flowInfo flowInfo
public void check Captured Local Initialization If Necessary Reference Binding checked Type Block Scope current Scope Flow Info flow Info if checked Type is Local Type checked Type is Anonymous Type current Scope is Defined In Type checked Type only check external allocations Nested Type Binding nested Type Nested Type Binding checked Type Synthetic Argument Binding synthetic Arguments nested Type synthetic Outer Local Variables if synthetic Arguments null for int i 0 count synthetic Arguments length i count i Synthetic Argument Binding synthetic Argument synthetic Arguments i Local Variable Binding target Local if target Local synthetic Argument actual Outer Local Variable null continue if target Local declaration null flow Info is Definitely Assigned target Local current Scope problem Reporter uninitialized Local Variable target Local this  checkCapturedLocalInitializationIfNecessary ReferenceBinding checkedType BlockScope currentScope FlowInfo flowInfo checkedType isLocalType checkedType isAnonymousType currentScope isDefinedInType checkedType NestedTypeBinding nestedType NestedTypeBinding checkedType SyntheticArgumentBinding syntheticArguments nestedType syntheticOuterLocalVariables syntheticArguments syntheticArguments SyntheticArgumentBinding syntheticArgument syntheticArguments LocalVariableBinding targetLocal targetLocal syntheticArgument actualOuterLocalVariable targetLocal flowInfo isDefinitelyAssigned targetLocal currentScope problemReporter uninitializedLocalVariable targetLocal
public Expression enclosing Instance return null  enclosingInstance
public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position Reference Binding allocated Type binding declaring Class code Stream new  allocated Type if value Required code Stream dup better highlight for allocation display the type individually code Stream record Positions From pc type source Start handling innerclass instance allocation enclosing instance arguments if allocated Type is Nested Type code Stream generate Synthetic Enclosing Instance Values current Scope allocated Type enclosing Instance this generate the arguments for constructor if arguments null for int i 0 count arguments length i count i arguments i generate Code current Scope code Stream true handling innerclass instance allocation outer local arguments if allocated Type is Nested Type code Stream generate Synthetic Outer Argument Values current Scope allocated Type this invoke constructor if synthetic Accessor null code Stream invokespecial binding else synthetic accessor got some extra arguments appended to its signature which need values for int i 0 max synthetic Accessor parameters length binding parameters length i max i code Stream aconst null code Stream invokespecial synthetic Accessor code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream ReferenceBinding allocatedType declaringClass codeStream new_ allocatedType valueRequired codeStream codeStream recordPositionsFrom sourceStart allocatedType isNestedType codeStream generateSyntheticEnclosingInstanceValues currentScope allocatedType enclosingInstance generateCode currentScope codeStream allocatedType isNestedType codeStream generateSyntheticOuterArgumentValues currentScope allocatedType syntheticAccessor codeStream syntheticAccessor codeStream aconst_null codeStream syntheticAccessor codeStream recordPositionsFrom sourceStart
public boolean is Super Access return false  isSuperAccess
public boolean is Type Access return true  isTypeAccess
public void manage Enclosing Instance Access If Necessary Block Scope current Scope Flow Info flow Info if flow Info is Reachable return Reference Binding allocated Type perform some emulation work in case there is some and we are inside a local type only if allocated Type binding declaring Class is Nested Type current Scope enclosing Source Type is Local Type if allocated Type is Local Type Local Type Binding allocated Type add Inner Emulation Dependent current Scope false request cascade of accesses else locally propagate since we already now the desired shape for sure current Scope propagate Inner Emulation allocated Type false request cascade of accesses  manageEnclosingInstanceAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable ReferenceBinding allocatedType allocatedType declaringClass isNestedType currentScope enclosingSourceType isLocalType allocatedType isLocalType LocalTypeBinding allocatedType addInnerEmulationDependent currentScope currentScope propagateInnerEmulation allocatedType
public void manage Synthetic Access If Necessary Block Scope current Scope Flow Info flow Info if flow Info is Reachable return if binding is Private current Scope enclosing Source Type binding declaring Class if current Scope environment options is Private Constructor Access Changing Visibility binding tag For Clearing Private Modifier constructor will not be dumped as private no emulation required thus else synthetic Accessor Source Type Binding binding declaring Class add Synthetic Method binding is Super Access current Scope problem Reporter need To Emulate Method Access binding this  manageSyntheticAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable isPrivate currentScope enclosingSourceType declaringClass currentScope isPrivateConstructorAccessChangingVisibility tagForClearingPrivateModifier syntheticAccessor SourceTypeBinding declaringClass addSyntheticMethod isSuperAccess currentScope problemReporter needToEmulateMethodAccess
public String Buffer print Expression int indent String Buffer output output append new NON NLS 1 type print Expression 0 output output append if arguments null for int i 0 i arguments length i if i 0 output append NON NLS 1 arguments i print Expression 0 output return output append  StringBuffer printExpression StringBuffer printExpression printExpression
public Type Binding resolve Type Block Scope scope Propagate the type checking to the arguments and check if the constructor is defined constant NotA Constant this resolved Type type resolve Type scope will check for null after args are resolved buffering the arguments types boolean args Contain Cast false Type Binding argument Types No Parameters if arguments null boolean arg Has Error false int length arguments length argument Types new Type Binding length for int i 0 i length i Expression argument this arguments i if argument instanceof Cast Expression argument bits Ignore Need For Cast CheckMASK will check later on args Contain Cast true if argument Types i argument resolve Type scope null arg Has Error true if arg Has Error return this resolved Type if this resolved Type null return null if this resolved Type can Be Instantiated scope problem Reporter cannot Instantiate type this resolved Type return this resolved Type Reference Binding allocation Type Reference Binding this resolved Type if binding scope get Constructor allocation Type argument Types this is Valid Binding if binding declaring Class null binding declaring Class allocation Type scope problem Reporter invalid Constructor this binding return this resolved Type if is Method Use Deprecated binding scope scope problem Reporter deprecated Method binding this if arguments null for int i 0 i arguments length i arguments i implicit Widening binding parameters i argument Types i if args Contain Cast Cast Expression check Need For Argument Casts scope null allocation Type binding this arguments argument Types this return allocation Type  TypeBinding resolveType BlockScope NotAConstant resolvedType resolveType argsContainCast TypeBinding argumentTypes NoParameters argHasError argumentTypes TypeBinding CastExpression IgnoreNeedForCastCheckMASK argsContainCast argumentTypes resolveType argHasError argHasError resolvedType resolvedType resolvedType canBeInstantiated problemReporter cannotInstantiate resolvedType resolvedType ReferenceBinding allocationType ReferenceBinding resolvedType getConstructor allocationType argumentTypes isValidBinding declaringClass declaringClass allocationType problemReporter invalidConstructor resolvedType isMethodUseDeprecated problemReporter deprecatedMethod implicitWidening argumentTypes argsContainCast CastExpression checkNeedForArgumentCasts allocationType argumentTypes allocationType
public void set Actual Receiver Type Reference Binding receiver Type ignored  setActualReceiverType ReferenceBinding receiverType
public void set Depth int i ignored  setDepth
public void set Field Index int i ignored  setFieldIndex
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope int arguments Length type traverse visitor scope if arguments null arguments Length arguments length for int i 0 i arguments Length i arguments i traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope argumentsLength argumentsLength argumentsLength endVisit

int merged Init State Index 1 public AND AND Expression Expression left Expression right int operator super left right operator  mergedInitStateIndex AND_AND_Expression
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info Constant cst this left optimized Boolean Constant boolean is Left Optimized True cst NotA Constant cst boolean Value true boolean is Left Optimized False cst NotA Constant cst boolean Value false if is Left Optimized True TRUE anything need to be careful of scenario x y z if passing the left info to the right it would be swapped by the Flow Info merged Info left analyse Code current Scope flow Context flow Info unconditional Inits merged Info right analyse Code current Scope flow Context merged Info merged Init State Index current Scope method Scope record Initialization States merged Info return merged Info Flow Info left Info left analyse Code current Scope flow Context flow Info need to be careful of scenario x y z if passing the left info to the right it would be swapped by the Flow Info right Info left Info inits When True unconditional Inits copy right Init State Index current Scope method Scope record Initialization States right Info int previous Mode right Info reach Mode if is Left Optimized False right Info set Reach Mode Flow Info UNREACHABLE right Info right analyse Code current Scope flow Context right Info Flow Info true Merged Info right Info inits When True copy right Info set Reach Mode previous Mode reset after true Merged Info got extracted Flow Info merged Info Flow Info conditional true Merged Info left Info inits When False copy unconditional Inits merged With right Info inits When False copy unconditional Inits merged Init State Index current Scope method Scope record Initialization States merged Info return merged Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo optimizedBooleanConstant isLeftOptimizedTrue NotAConstant booleanValue isLeftOptimizedFalse NotAConstant booleanValue isLeftOptimizedTrue FlowInfo mergedInfo analyseCode currentScope flowContext flowInfo unconditionalInits mergedInfo analyseCode currentScope flowContext mergedInfo mergedInitStateIndex currentScope methodScope recordInitializationStates mergedInfo mergedInfo FlowInfo leftInfo analyseCode currentScope flowContext flowInfo FlowInfo rightInfo leftInfo initsWhenTrue unconditionalInits rightInitStateIndex currentScope methodScope recordInitializationStates rightInfo previousMode rightInfo reachMode isLeftOptimizedFalse rightInfo setReachMode FlowInfo rightInfo analyseCode currentScope flowContext rightInfo FlowInfo trueMergedInfo rightInfo initsWhenTrue rightInfo setReachMode previousMode trueMergedInfo FlowInfo mergedInfo FlowInfo trueMergedInfo leftInfo initsWhenFalse unconditionalInits mergedWith rightInfo initsWhenFalse unconditionalInits mergedInitStateIndex currentScope methodScope recordInitializationStates mergedInfo mergedInfo
Code generation for a binary operation public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if constant Constant NotA Constant inlined value if value Required code Stream generate Constant constant implicit Conversion code Stream record Positions From pc this source Start return Constant cst right constant if cst NotA Constant expr true expr if cst boolean Value true this left generate Code current Scope code Stream value Required else expr false false this left generate Code current Scope code Stream false if value Required code Stream iconst 0 if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index code Stream generate Implicit Conversion implicit Conversion code Stream update Last Recorded EndPC code Stream position code Stream record Positions From pc this source Start return Label false Label new Label code Stream end Label cst left optimized Boolean Constant boolean left Is Const cst NotA Constant boolean left Is True left Is Const cst boolean Value true cst right optimized Boolean Constant boolean right Is Const cst NotA Constant boolean right Is True right Is Const cst boolean Value true generate Operands if left Is Const left generate Code current Scope code Stream false if left Is True break generate Operands no need to generate right operand else left generate Optimized Boolean current Scope code Stream null false Label true need value e g if a 1 b 2 0 shouldn t initialize b if a 1 if right Init State Index 1 code Stream add Definitely Assigned Variables current Scope right Init State Index if right Is Const right generate Code current Scope code Stream false else right generate Optimized Boolean current Scope code Stream null false Label value Required if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index improving code gen for such a case boolean b i 0 false since the label has never been used we have the inlined value on the stack if value Required if left Is Const left Is True code Stream iconst 0 code Stream update Last Recorded EndPC code Stream position else if right Is Const right Is True code Stream iconst 0 code Stream update Last Recorded EndPC code Stream position else code Stream iconst 1 if false Label has Forward References if bits Value For ReturnMASK 0 code Stream ireturn false Label place code Stream iconst 0 else code Stream goto  end Label new Label code Stream code Stream decr Stack Size 1 false Label place code Stream iconst 0 end Label place else false Label place code Stream generate Implicit Conversion implicit Conversion code Stream update Last Recorded EndPC code Stream position else false Label place  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream NotAConstant valueRequired codeStream generateConstant implicitConversion codeStream recordPositionsFrom sourceStart NotAConstant booleanValue generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired codeStream iconst_0 mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex codeStream generateImplicitConversion implicitConversion codeStream updateLastRecordedEndPC codeStream codeStream recordPositionsFrom sourceStart falseLabel codeStream endLabel optimizedBooleanConstant leftIsConst NotAConstant leftIsTrue leftIsConst booleanValue optimizedBooleanConstant rightIsConst NotAConstant rightIsTrue rightIsConst booleanValue generateOperands leftIsConst generateCode currentScope codeStream leftIsTrue generateOperands generateOptimizedBoolean currentScope codeStream falseLabel rightInitStateIndex codeStream addDefinitelyAssignedVariables currentScope rightInitStateIndex rightIsConst generateCode currentScope codeStream generateOptimizedBoolean currentScope codeStream falseLabel valueRequired mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex valueRequired leftIsConst leftIsTrue codeStream iconst_0 codeStream updateLastRecordedEndPC codeStream rightIsConst rightIsTrue codeStream iconst_0 codeStream updateLastRecordedEndPC codeStream codeStream iconst_1 falseLabel hasForwardReferences ValueForReturnMASK codeStream falseLabel codeStream iconst_0 codeStream goto_ endLabel codeStream codeStream decrStackSize falseLabel codeStream iconst_0 endLabel falseLabel codeStream generateImplicitConversion implicitConversion codeStream updateLastRecordedEndPC codeStream falseLabel
Boolean operator code generation Optimized operations are public void generate Optimized Boolean Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required if constant Constant NotA Constant super generate Optimized Boolean current Scope code Stream true Label false Label value Required return expr true expr Constant cst right constant if cst NotA Constant cst boolean Value true int pc code Stream position this left generate Optimized Boolean current Scope code Stream true Label false Label value Required if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index code Stream record Positions From pc this source Start return cst left optimized Boolean Constant boolean left Is Const cst NotA Constant boolean left Is True left Is Const cst boolean Value true cst right optimized Boolean Constant boolean right Is Const cst NotA Constant boolean right Is True right Is Const cst boolean Value true default case generate Operands if false Label null if true Label null implicit falling through the FALSE case Label internal False Label new Label code Stream left generate Optimized Boolean current Scope code Stream null internal False Label left Is Const need value e g if a 1 b 2 0 shouldn t initialize b if a 1 if left Is Const left Is True internal False Label place break generate Operands no need to generate right operand if right Init State Index 1 code Stream add Definitely Assigned Variables current Scope right Init State Index right generate Optimized Boolean current Scope code Stream true Label null value Required right Is Const if value Required right Is Const right Is True code Stream goto  true Label code Stream update Last Recorded EndPC code Stream position internal False Label place else implicit falling through the TRUE case if true Label null left generate Optimized Boolean current Scope code Stream null false Label left Is Const need value e g if a 1 b 2 0 shouldn t initialize b if a 1 if left Is Const left Is True code Stream goto  false Label code Stream update Last Recorded EndPC code Stream position break generate Operands no need to generate right operand if right Init State Index 1 code Stream add Definitely Assigned Variables current Scope right Init State Index right generate Optimized Boolean current Scope code Stream null false Label value Required right Is Const if value Required right Is Const right Is True code Stream goto  false Label code Stream update Last Recorded EndPC code Stream position else no implicit fall through TRUE FALSE should never occur if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index  generateOptimizedBoolean BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired NotAConstant generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired NotAConstant booleanValue codeStream generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex codeStream recordPositionsFrom sourceStart optimizedBooleanConstant leftIsConst NotAConstant leftIsTrue leftIsConst booleanValue optimizedBooleanConstant rightIsConst NotAConstant rightIsTrue rightIsConst booleanValue generateOperands falseLabel trueLabel internalFalseLabel codeStream generateOptimizedBoolean currentScope codeStream internalFalseLabel leftIsConst leftIsConst leftIsTrue internalFalseLabel generateOperands rightInitStateIndex codeStream addDefinitelyAssignedVariables currentScope rightInitStateIndex generateOptimizedBoolean currentScope codeStream trueLabel valueRequired rightIsConst valueRequired rightIsConst rightIsTrue codeStream goto_ trueLabel codeStream updateLastRecordedEndPC codeStream internalFalseLabel trueLabel generateOptimizedBoolean currentScope codeStream falseLabel leftIsConst leftIsConst leftIsTrue codeStream goto_ falseLabel codeStream updateLastRecordedEndPC codeStream generateOperands rightInitStateIndex codeStream addDefinitelyAssignedVariables currentScope rightInitStateIndex generateOptimizedBoolean currentScope codeStream falseLabel valueRequired rightIsConst valueRequired rightIsConst rightIsTrue codeStream goto_ falseLabel codeStream updateLastRecordedEndPC codeStream mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex
public boolean is Compactable Operation return false  isCompactableOperation
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope left traverse visitor scope right traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

public Argument char name long pos Nom Type Reference tr int modifiers super name int pos Nom 32 int pos Nom this declaration Source End int pos Nom this modifiers modifiers type tr this bits Is Local Declaration ReachableMASK  posNom TypeReference posNom posNom declarationSourceEnd posNom IsLocalDeclarationReachableMASK
public void bind Method Scope scope Type Binding type Binding boolean used if this type null this type resolved Type type Binding record the resolved type into the type reference int modifier Flag this modifiers Binding existing Variable scope get Binding name Binding Ids VARIABLE this false do not resolve hidden field if existing Variable null existing Variable is Valid Binding if existing Variable instanceof Local Variable Binding this hidden Variable Depth 0 scope problem Reporter redefine Argument this return boolean is Special Argument false if existing Variable instanceof Field Binding if scope is Inside Constructor is Special Argument true constructor argument else Abstract Method Declaration method Decl scope reference Method if method Decl null Char Operation prefix Equals SET method Decl selector is Special Argument true setter argument scope problem Reporter local Variable Hiding this existing Variable is Special Argument scope add Local Variable this binding new Local Variable Binding this type Binding modifier Flag true true stand for argument instead of just local if type Binding null is Type Use Deprecated type Binding scope scope problem Reporter deprecated Type type Binding this type this binding declaration this this binding use Flag used Local Variable Binding USED Local Variable Binding UNUSED  MethodScope TypeBinding typeBinding resolvedType typeBinding modifierFlag existingVariable getBinding BindingIds existingVariable existingVariable isValidBinding existingVariable LocalVariableBinding hiddenVariableDepth problemReporter redefineArgument isSpecialArgument existingVariable FieldBinding isInsideConstructor isSpecialArgument AbstractMethodDeclaration methodDecl referenceMethod methodDecl CharOperation prefixEquals methodDecl isSpecialArgument problemReporter localVariableHiding existingVariable isSpecialArgument addLocalVariable LocalVariableBinding typeBinding modifierFlag typeBinding isTypeUseDeprecated typeBinding problemReporter deprecatedType typeBinding useFlag LocalVariableBinding LocalVariableBinding
public String Buffer print int indent String Buffer output print Indent indent output print Modifiers this modifiers output if type null output append no type NON NLS 1 else type print 0 output append return output append this name  StringBuffer StringBuffer printIndent printModifiers
public String Buffer print Statement int indent String Buffer output return print indent output append  StringBuffer printStatement StringBuffer
public Type Binding resolve For Catch Block Scope scope resolution on an argument of a catch clause provide the scope with a side effect insertion of a LOCAL that represents the argument The type must be from Java Throwable Type Binding tb type resolve Type Expecting scope scope get Java Lang Throwable if tb null return null Binding existing Variable scope get Binding name Binding Ids VARIABLE this false do not resolve hidden field if existing Variable null existing Variable is Valid Binding if existing Variable instanceof Local Variable Binding this hidden Variable Depth 0 scope problem Reporter redefine Argument this return null scope problem Reporter local Variable Hiding this existing Variable false binding new Local Variable Binding this tb modifiers false argument decl but local var where is Argument false scope add Local Variable binding binding constant NotA Constant return tb  TypeBinding resolveForCatch BlockScope JavaThrowable TypeBinding resolveTypeExpecting getJavaLangThrowable existingVariable getBinding BindingIds existingVariable existingVariable isValidBinding existingVariable LocalVariableBinding hiddenVariableDepth problemReporter redefineArgument problemReporter localVariableHiding existingVariable LocalVariableBinding isArgument addLocalVariable NotAConstant
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope if type null type traverse visitor scope if initialization null initialization traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

Array Allocation Expression constructor comment public Array Allocation Expression super  ArrayAllocationExpression ArrayAllocationExpression
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info for int i 0 max dimensions length i max i Expression dim if dim dimensions i null flow Info dim analyse Code current Scope flow Context flow Info if initializer null return initializer analyse Code current Scope flow Context flow Info return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo flowInfo analyseCode currentScope flowContext flowInfo analyseCode currentScope flowContext flowInfo flowInfo
Code generation for a array allocation expression public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if initializer null initializer generate Code current Scope code Stream value Required return int non Null Dimensions Length 0 for int i 0 max dimensions length i max i if dimensions i null dimensions i generate Code current Scope code Stream true non Null Dimensions Length Generate a sequence of bytecodes corresponding to an array allocation if this resolved Type dimensions 1 Mono dimensional array code Stream new Array current Scope Array Binding this resolved Type else Multi dimensional array code Stream multianewarray this resolved Type non Null Dimensions Length if value Required code Stream generate Implicit Conversion implicit Conversion else code Stream pop code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream generateCode currentScope codeStream valueRequired nonNullDimensionsLength generateCode currentScope codeStream nonNullDimensionsLength resolvedType codeStream newArray currentScope ArrayBinding resolvedType codeStream resolvedType nonNullDimensionsLength valueRequired codeStream generateImplicitConversion implicitConversion codeStream codeStream recordPositionsFrom sourceStart
public String Buffer print Expression int indent String Buffer output output append new NON NLS 1 type print 0 output for int i 0 i dimensions length i if dimensions i null output append NON NLS 1 else output append dimensions i print Expression 0 output output append if initializer null initializer print Expression 0 output return output  StringBuffer printExpression StringBuffer printExpression printExpression
public Type Binding resolve Type Block Scope scope Build an array type reference using the current dimensions The parser does not check for the fact that dimension may be null only at the end like new int 4 The parser allows new int 4 so this must be checked here this comes from a reduction to LL1 grammar Type Binding reference Type type resolve Type scope will check for null after dimensions are checked constant Constant NotA Constant if reference Type Void Binding scope problem Reporter cannot Allocate Void Array this reference Type null check the validity of the dimension syntax and test for all null dimensions int explicit Dim Index 1 for int i dimensions length i 0 if dimensions i null if explicit Dim Index 0 explicit Dim Index i else if explicit Dim Index 0 should not have an empty dimension before an non empty one scope problem Reporter incorrect Location For Empty Dimension this i explicit Dim Index 0 says if all dimensions are nulled when an initializer is given no dimension must be specified if initializer null if explicit Dim Index 0 scope problem Reporter must Define Dimensions Or Initializer this else if explicit Dim Index 0 scope problem Reporter cannot Define Dimensions And Initializer this dimensions resolution for int i 0 i explicit Dim Index i if dimensions i null Type Binding dimension Type dimensions i resolve Type Expecting scope Int Binding if dimension Type null dimensions i implicit Widening Int Binding dimension Type building the array binding if reference Type null if dimensions length 255 scope problem Reporter too Many Dimensions this this resolved Type scope create Array reference Type dimensions length check the initializer if initializer null if initializer resolve Type Expecting scope this resolved Type null initializer binding Array Binding this resolved Type return this resolved Type  TypeBinding resolveType BlockScope TypeBinding referenceType resolveType NotAConstant referenceType VoidBinding problemReporter cannotAllocateVoidArray referenceType explicitDimIndex explicitDimIndex explicitDimIndex explicitDimIndex problemReporter incorrectLocationForEmptyDimension explicitDimIndex explicitDimIndex problemReporter mustDefineDimensionsOrInitializer explicitDimIndex problemReporter cannotDefineDimensionsAndInitializer explicitDimIndex TypeBinding dimensionType resolveTypeExpecting IntBinding dimensionType implicitWidening IntBinding dimensionType referenceType problemReporter tooManyDimensions resolvedType createArray referenceType resolveTypeExpecting resolvedType ArrayBinding resolvedType resolvedType
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope int dimensions Length dimensions length type traverse visitor scope for int i 0 i dimensions Length i if dimensions i null dimensions i traverse visitor scope if initializer null initializer traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope dimensionsLength dimensionsLength endVisit

Array Initializer constructor comment public Array Initializer super  ArrayInitializer ArrayInitializer
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info if expressions null for int i 0 max expressions length i max i flow Info expressions i analyse Code current Scope flow Context flow Info unconditional Inits return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo flowInfo analyseCode currentScope flowContext flowInfo unconditionalInits flowInfo
Code generation for a array initializer public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required Flatten the values and compute the dimensions by iterating in depth into nested array initializers int pc code Stream position int expression Length expressions null 0 expressions length code Stream generate Inlined Value expression Length code Stream new Array current Scope binding if expressions null binding is an Array Type so I can just deal with the dimension int elements TypeID binding dimensions 1 1 binding leaf Component Type id for int i 0 i expression Length i Expression expr if expr expressions i constant NotA Constant switch elements TypeID filter out initializations to default values case T int case T short case T byte case T char case T long if expr constant long Value 0 code Stream dup code Stream generate Inlined Value i expr generate Code current Scope code Stream true code Stream array At Put elements TypeID false break case T float case T double double constant Value expr constant double Value if constant Value 0 0 constant Value 0 code Stream dup code Stream generate Inlined Value i expr generate Code current Scope code Stream true code Stream array At Put elements TypeID false break case T boolean if expr constant boolean Value false code Stream dup code Stream generate Inlined Value i expr generate Code current Scope code Stream true code Stream array At Put elements TypeID false break default if expr instanceof Null Literal code Stream dup code Stream generate Inlined Value i expr generate Code current Scope code Stream true code Stream array At Put elements TypeID false else if expr instanceof Null Literal code Stream dup code Stream generate Inlined Value i expr generate Code current Scope code Stream true code Stream array At Put elements TypeID false if value Required code Stream pop code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream expressionLength codeStream generateInlinedValue expressionLength codeStream newArray currentScope ArrayType elementsTypeID leafComponentType expressionLength NotAConstant elementsTypeID T_int T_short T_byte T_char T_long longValue codeStream codeStream generateInlinedValue generateCode currentScope codeStream codeStream arrayAtPut elementsTypeID T_float T_double constantValue doubleValue constantValue constantValue codeStream codeStream generateInlinedValue generateCode currentScope codeStream codeStream arrayAtPut elementsTypeID T_boolean booleanValue codeStream codeStream generateInlinedValue generateCode currentScope codeStream codeStream arrayAtPut elementsTypeID NullLiteral codeStream codeStream generateInlinedValue generateCode currentScope codeStream codeStream arrayAtPut elementsTypeID NullLiteral codeStream codeStream generateInlinedValue generateCode currentScope codeStream codeStream arrayAtPut elementsTypeID valueRequired codeStream codeStream recordPositionsFrom sourceStart
public String Buffer print Expression int indent String Buffer output output append if expressions null int j 20 for int i 0 i expressions length i if i 0 output append NON NLS 1 expressions i print Expression 0 output j if j 0 output append n print Indent indent 1 output j 20 return output append  StringBuffer printExpression StringBuffer printExpression printIndent
public Type Binding resolve Type Expecting Block Scope scope Type Binding expected Tb Array initializers can only occur on the right hand side of an assignment expression therefore the expected type contains the valid information concerning the type that must be enforced by the elements of the array initializer this method is recursive the test on is Array Type is the stop case constant NotA Constant if expected Tb is Array Type binding Array Binding expected Tb if expressions null return binding Type Binding expected Elements Tb binding elements Type scope if expected Elements Tb is Base Type for int i 0 length expressions length i length i Expression expression expressions i Type Binding expression Tb expression instanceof Array Initializer expression resolve Type Expecting scope expected Elements Tb expression resolve Type scope if expression Tb null return null Compile time conversion required if expression is Constant Value Of Type Assignable To Type expression Tb expected Elements Tb expression implicit Widening expected Elements Tb expression Tb else if Base Type Binding is Widening expected Elements Tb id expression Tb id expression implicit Widening expected Elements Tb expression Tb else scope problem Reporter type Mismatch Error Actual Type Expected Type expression expression Tb expected Elements Tb return null else for int i 0 length expressions length i length i if expressions i resolve Type Expecting scope expected Elements Tb null return null return binding infer initializer type for error reporting based on first element Type Binding leaf Element Type null int dim 1 if expressions null leaf Element Type scope get Java Lang Object else Expression current Expression expressions 0 while current Expression null current Expression instanceof Array Initializer dim Expression sub Exprs Array Initializer current Expression expressions if sub Exprs null leaf Element Type scope get Java Lang Object current Expression null break current Expression Array Initializer current Expression expressions 0 if current Expression null leaf Element Type current Expression resolve Type scope if leaf Element Type null Type Binding probable Tb scope create Array leaf Element Type dim scope problem Reporter type Mismatch Error Actual Type Expected Type this probable Tb expected Tb return null  TypeBinding resolveTypeExpecting BlockScope TypeBinding expectedTb isArrayType NotAConstant expectedTb isArrayType ArrayBinding expectedTb TypeBinding expectedElementsTb elementsType expectedElementsTb isBaseType TypeBinding expressionTb ArrayInitializer resolveTypeExpecting expectedElementsTb resolveType expressionTb isConstantValueOfTypeAssignableToType expressionTb expectedElementsTb implicitWidening expectedElementsTb expressionTb BaseTypeBinding isWidening expectedElementsTb expressionTb implicitWidening expectedElementsTb expressionTb problemReporter typeMismatchErrorActualTypeExpectedType expressionTb expectedElementsTb resolveTypeExpecting expectedElementsTb TypeBinding leafElementType leafElementType getJavaLangObject currentExpression currentExpression currentExpression ArrayInitializer subExprs ArrayInitializer currentExpression subExprs leafElementType getJavaLangObject currentExpression currentExpression ArrayInitializer currentExpression currentExpression leafElementType currentExpression resolveType leafElementType TypeBinding probableTb createArray leafElementType problemReporter typeMismatchErrorActualTypeExpectedType probableTb expectedTb
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope if expressions null int expressions Length expressions length for int i 0 i expressions Length i expressions i traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope expressionsLength expressionsLength endVisit

public Array Qualified Type Reference char sources int dim long poss super sources poss dimensions dim  ArrayQualifiedTypeReference
public Array Qualified Type Reference char sources Type Binding tb int dim long poss super sources tb poss dimensions dim  ArrayQualifiedTypeReference TypeBinding
public int dimensions return dimensions 
public Type Binding get Type Binding Scope scope if this resolved Type null return this resolved Type if dimensions 255 scope problem Reporter too Many Dimensions this return scope create Array scope get Type tokens dimensions  TypeBinding getTypeBinding resolvedType resolvedType problemReporter tooManyDimensions createArray getType
public String Buffer print Expression int indent String Buffer output super print Expression indent output for int i 0 i dimensions i output append NON NLS 1 return output  StringBuffer printExpression StringBuffer printExpression
public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor BlockScope endVisit
public void traverse AST Visitor visitor Class Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor ClassScope endVisit

public Array Reference Expression rec Expression pos this receiver rec this position pos source Start rec source Start  ArrayReference sourceStart sourceStart
public Flow Info analyse Assignment Block Scope current Scope Flow Context flow Context Flow Info flow Info Assignment assignment boolean compound Assignment if assignment expression null return analyse Code current Scope flow Context flow Info unconditional Inits return assignment expression analyse Code current Scope flow Context analyse Code current Scope flow Context flow Info unconditional Inits unconditional Inits  FlowInfo analyseAssignment BlockScope currentScope FlowContext flowContext FlowInfo flowInfo compoundAssignment analyseCode currentScope flowContext flowInfo unconditionalInits analyseCode currentScope flowContext analyseCode currentScope flowContext flowInfo unconditionalInits unconditionalInits
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info return position analyse Code current Scope flow Context receiver analyse Code current Scope flow Context flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo analyseCode currentScope flowContext analyseCode currentScope flowContext flowInfo
public void generate Assignment Block Scope current Scope Code Stream code Stream Assignment assignment boolean value Required receiver generate Code current Scope code Stream true if receiver instanceof Cast Expression type null 0 Cast Expression receiver innermost Casted Expression resolved Type Null Binding code Stream checkcast receiver resolved Type position generate Code current Scope code Stream true assignment expression generate Code current Scope code Stream true code Stream array At Put this resolved Type id value Required if value Required code Stream generate Implicit Conversion assignment implicit Conversion  generateAssignment BlockScope currentScope CodeStream codeStream valueRequired generateCode currentScope codeStream CastExpression CastExpression innermostCastedExpression resolvedType NullBinding codeStream resolvedType generateCode currentScope codeStream generateCode currentScope codeStream codeStream arrayAtPut resolvedType valueRequired valueRequired codeStream generateImplicitConversion implicitConversion
Code generation for a array reference public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position receiver generate Code current Scope code Stream true if receiver instanceof Cast Expression type null 0 Cast Expression receiver innermost Casted Expression resolved Type Null Binding code Stream checkcast receiver resolved Type position generate Code current Scope code Stream true code Stream array At this resolved Type id Generating code for the potential runtime type checking if value Required code Stream generate Implicit Conversion implicit Conversion else if this resolved Type Long Binding this resolved Type Double Binding code Stream pop2 else code Stream pop code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream generateCode currentScope codeStream CastExpression CastExpression innermostCastedExpression resolvedType NullBinding codeStream resolvedType generateCode currentScope codeStream codeStream arrayAt resolvedType valueRequired codeStream generateImplicitConversion implicitConversion resolvedType LongBinding resolvedType DoubleBinding codeStream codeStream codeStream recordPositionsFrom sourceStart
public void generate Compound Assignment Block Scope current Scope Code Stream code Stream Expression expression int operator int assignment Implicit Conversion boolean value Required receiver generate Code current Scope code Stream true if receiver instanceof Cast Expression type null 0 Cast Expression receiver innermost Casted Expression resolved Type Null Binding code Stream checkcast receiver resolved Type position generate Code current Scope code Stream true code Stream dup2 code Stream array At this resolved Type id int operation TypeID if operation TypeID implicit Conversion 4 T String code Stream generate String Append current Scope null expression else promote the array reference to the suitable operation type code Stream generate Implicit Conversion implicit Conversion generate the increment value will by itself be promoted to the operation value if expression Int Literal One prefix operation code Stream generate Constant expression constant implicit Conversion else expression generate Code current Scope code Stream true perform the operation code Stream send Operator operator operation TypeID cast the value back to the array reference type code Stream generate Implicit Conversion assignment Implicit Conversion code Stream array At Put this resolved Type id value Required  generateCompoundAssignment BlockScope currentScope CodeStream codeStream assignmentImplicitConversion valueRequired generateCode currentScope codeStream CastExpression CastExpression innermostCastedExpression resolvedType NullBinding codeStream resolvedType generateCode currentScope codeStream codeStream codeStream arrayAt resolvedType operationTypeID operationTypeID implicitConversion T_String codeStream generateStringAppend currentScope codeStream generateImplicitConversion implicitConversion IntLiteral codeStream generateConstant implicitConversion generateCode currentScope codeStream codeStream sendOperator operationTypeID codeStream generateImplicitConversion assignmentImplicitConversion codeStream arrayAtPut resolvedType valueRequired
public void generate Post Increment Block Scope current Scope Code Stream code Stream Compound Assignment post Increment boolean value Required receiver generate Code current Scope code Stream true if receiver instanceof Cast Expression type null 0 Cast Expression receiver innermost Casted Expression resolved Type Null Binding code Stream checkcast receiver resolved Type position generate Code current Scope code Stream true code Stream dup2 code Stream array At this resolved Type id if value Required if this resolved Type Long Binding this resolved Type Double Binding code Stream dup2 x2 else code Stream dup x2 code Stream generate Constant post Increment expression constant implicit Conversion code Stream send Operator post Increment operator this resolved Type id code Stream generate Implicit Conversion post Increment assignment Implicit Conversion code Stream array At Put this resolved Type id false  generatePostIncrement BlockScope currentScope CodeStream codeStream CompoundAssignment postIncrement valueRequired generateCode currentScope codeStream CastExpression CastExpression innermostCastedExpression resolvedType NullBinding codeStream resolvedType generateCode currentScope codeStream codeStream codeStream arrayAt resolvedType valueRequired resolvedType LongBinding resolvedType DoubleBinding codeStream dup2_x2 codeStream dup_x2 codeStream generateConstant postIncrement implicitConversion codeStream sendOperator postIncrement resolvedType codeStream generateImplicitConversion postIncrement assignmentImplicitConversion codeStream arrayAtPut resolvedType
public String Buffer print Expression int indent String Buffer output receiver print Expression 0 output append return position print Expression 0 output append  StringBuffer printExpression StringBuffer printExpression printExpression
public Type Binding resolve Type Block Scope scope constant Constant NotA Constant if receiver instanceof Cast Expression no cast check for type null 0 Cast Expression receiver innermost Casted Expression instanceof Null Literal this receiver bits Ignore Need For Cast CheckMASK will check later on Type Binding array Type receiver resolve Type scope if array Type null if array Type is Array Type this resolved Type Array Binding array Type elements Type scope else scope problem Reporter reference Must Be Array Type At array Type this Type Binding position Type position resolve Type Expecting scope Int Binding if position Type null position implicit Widening Int Binding position Type return this resolved Type  TypeBinding resolveType BlockScope NotAConstant CastExpression CastExpression innermostCastedExpression NullLiteral IgnoreNeedForCastCheckMASK TypeBinding arrayType resolveType arrayType arrayType isArrayType resolvedType ArrayBinding arrayType elementsType problemReporter referenceMustBeArrayTypeAt arrayType TypeBinding positionType resolveTypeExpecting IntBinding positionType implicitWidening IntBinding positionType resolvedType
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope receiver traverse visitor scope position traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

Array Type Reference constructor comment param source char param dimensions int param pos int public Array Type Reference char source int dimensions long pos super source pos this dimensions dimensions  ArrayTypeReference ArrayTypeReference
public Array Type Reference char source Type Binding tb int dimensions long pos super source tb pos this dimensions dimensions  ArrayTypeReference TypeBinding
public int dimensions return dimensions 
public Type Binding get Type Binding Scope scope if this resolved Type null return this resolved Type if dimensions 255 scope problem Reporter too Many Dimensions this return scope create Array scope get Type token dimensions  TypeBinding getTypeBinding resolvedType resolvedType problemReporter tooManyDimensions createArray getType
public String Buffer print Expression int indent String Buffer output super print Expression indent output for int i 0 i dimensions i output append NON NLS 1 return output  StringBuffer printExpression StringBuffer printExpression
public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

public Assert Statement Expression exception Argument Expression assert Expression int start Position this assert Expression assert Expression this exception Argument exception Argument source Start start Position source End exception Argument source End  AssertStatement exceptionArgument assertExpression startPosition assertExpression assertExpression exceptionArgument exceptionArgument sourceStart startPosition sourceEnd exceptionArgument sourceEnd
public Assert Statement Expression assert Expression int start Position this assert Expression assert Expression source Start start Position source End assert Expression source End  AssertStatement assertExpression startPosition assertExpression assertExpression sourceStart startPosition sourceEnd assertExpression sourceEnd
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info pre Assert Init State Index current Scope method Scope record Initialization States flow Info Constant cst this assert Expression optimized Boolean Constant boolean is Optimized True Assertion cst NotA Constant cst boolean Value true boolean is Optimized False Assertion cst NotA Constant cst boolean Value false Flow Info assert Info flow Info copy if is Optimized True Assertion assert Info set Reach Mode Flow Info UNREACHABLE assert Info assert Expression analyse Code current Scope flow Context assert Info unconditional Inits if exception Argument null only gets evaluated when escaping results are not taken into account Flow Info exception Info exception Argument analyse Code current Scope flow Context assert Info copy if is Optimized True Assertion flow Context check Exception Handlers current Scope get Java Lang Assertion Error this exception Info current Scope if is Optimized True Assertion add the assert support in the clinit manage Synthetic Access If Necessary current Scope flow Info if is Optimized False Assertion return flow Info if assertions are enabled the following code will be unreachable else return flow Info merged With assert Info unconditional Inits  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo preAssertInitStateIndex currentScope methodScope recordInitializationStates flowInfo assertExpression optimizedBooleanConstant isOptimizedTrueAssertion NotAConstant booleanValue isOptimizedFalseAssertion NotAConstant booleanValue FlowInfo assertInfo flowInfo isOptimizedTrueAssertion assertInfo setReachMode FlowInfo assertInfo assertExpression analyseCode currentScope flowContext assertInfo unconditionalInits exceptionArgument FlowInfo exceptionInfo exceptionArgument analyseCode currentScope flowContext assertInfo isOptimizedTrueAssertion flowContext checkExceptionHandlers currentScope getJavaLangAssertionError exceptionInfo currentScope isOptimizedTrueAssertion manageSyntheticAccessIfNecessary currentScope flowInfo isOptimizedFalseAssertion flowInfo flowInfo mergedWith assertInfo unconditionalInits
public void generate Code Block Scope current Scope Code Stream code Stream if bits Is ReachableMASK 0 return int pc code Stream position if this assertion Synthetic Field Binding null Label assertion Activation Label new Label code Stream code Stream getstatic this assertion Synthetic Field Binding code Stream ifne assertion Activation Label Label false Label new Label code Stream this assert Expression generate Optimized Boolean current Scope code Stream false Label new Label code Stream null true code Stream new Java Lang Assertion Error code Stream dup if exception Argument null exception Argument generate Code current Scope code Stream true code Stream invoke Java Lang Assertion Error Constructor exception Argument implicit Conversion 0xF else code Stream invoke Java Lang Assertion Error Default Constructor code Stream athrow false Label place assertion Activation Label place May loose some local variable initializations affecting the local variable attributes if pre Assert Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope pre Assert Init State Index code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK codeStream assertionSyntheticFieldBinding assertionActivationLabel codeStream codeStream assertionSyntheticFieldBinding codeStream assertionActivationLabel falseLabel codeStream assertExpression generateOptimizedBoolean currentScope codeStream falseLabel codeStream codeStream newJavaLangAssertionError codeStream exceptionArgument exceptionArgument generateCode currentScope codeStream codeStream invokeJavaLangAssertionErrorConstructor exceptionArgument implicitConversion codeStream invokeJavaLangAssertionErrorDefaultConstructor codeStream falseLabel assertionActivationLabel preAssertInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope preAssertInitStateIndex codeStream recordPositionsFrom sourceStart
public void resolve Block Scope scope assert Expression resolve Type Expecting scope Boolean Binding if exception Argument null Type Binding exception Argument Type exception Argument resolve Type scope if exception Argument Type null int id exception Argument Type id switch id case T void scope problem Reporter illegal Void Expression exception Argument default id T Object case T boolean case T byte case T char case T short case T double case T float case T int case T long case T String exception Argument implicit Conversion id 4 id  BlockScope assertExpression resolveTypeExpecting BooleanBinding exceptionArgument TypeBinding exceptionArgumentType exceptionArgument resolveType exceptionArgumentType exceptionArgumentType T_void problemReporter illegalVoidExpression exceptionArgument T_Object T_boolean T_byte T_char T_short T_double T_float T_int T_long T_String exceptionArgument implicitConversion
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope assert Expression traverse visitor scope if exception Argument null exception Argument traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope assertExpression exceptionArgument exceptionArgument endVisit
public void manage Synthetic Access If Necessary Block Scope current Scope Flow Info flow Info if flow Info is Reachable return need assertion flag assertions Disabled on outer most source clas in case of static member of interface will use the outermost static member bug 22334 Source Type Binding outer Most Class current Scope enclosing Source Type while outer Most Class is Local Type Reference Binding enclosing outer Most Class enclosing Type if enclosing null enclosing is Interface break outer Most Class Source Type Binding enclosing this assertion Synthetic Field Binding outer Most Class add Synthetic Field this current Scope find clinit and enable assertion support Type Declaration type Declaration outer Most Class scope reference Type Abstract Method Declaration methods type Declaration methods for int i 0 max methods length i max i Abstract Method Declaration method methods i if method is Clinit Clinit method set Assertion Support assertion Synthetic Field Binding break  manageSyntheticAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable assertionsDisabled SourceTypeBinding outerMostClass currentScope enclosingSourceType outerMostClass isLocalType ReferenceBinding outerMostClass enclosingType isInterface outerMostClass SourceTypeBinding assertionSyntheticFieldBinding outerMostClass addSyntheticField currentScope TypeDeclaration typeDeclaration outerMostClass referenceType AbstractMethodDeclaration typeDeclaration AbstractMethodDeclaration isClinit setAssertionSupport assertionSyntheticFieldBinding
public String Buffer print Statement int tab String Buffer output print Indent tab output output append assert NON NLS 1 this assert Expression print Expression 0 output if this exception Argument null output append NON NLS 1 this exception Argument print Expression 0 output return output append  StringBuffer printStatement StringBuffer printIndent assertExpression printExpression exceptionArgument exceptionArgument printExpression

public Assignment Expression lhs Expression expression int source End lhs is always a reference by construction but is build as an expression the checkcast cannot fail this lhs lhs lhs bits Is Strictly AssignedMASK tag lhs as assigned this expression expression this source Start lhs source Start this source End source End  sourceEnd IsStrictlyAssignedMASK sourceStart sourceStart sourceEnd sourceEnd
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info record setting a variable various scenarii are possible setting an array reference a field reference a blank final field reference a field of an enclosing instance or just a local variable return Reference lhs analyse Assignment current Scope flow Context flow Info this false unconditional Inits  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo analyseAssignment currentScope flowContext flowInfo unconditionalInits
void check Assignment Effect Block Scope scope Binding left get Direct Binding this lhs if left null left get Direct Binding this expression scope problem Reporter assignment Has No Effect this left short Readable Name this bits Is Assignment With No EffectMASK record assignment has no effect  checkAssignmentEffect BlockScope getDirectBinding getDirectBinding problemReporter assignmentHasNoEffect shortReadableName IsAssignmentWithNoEffectMASK
public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required various scenarii are possible setting an array reference a field reference a blank final field reference a field of an enclosing instance or just a local variable int pc code Stream position if this bits Is Assignment With No EffectMASK 0 if value Required this expression generate Code current Scope code Stream true else Reference lhs generate Assignment current Scope code Stream this value Required variable may have been optimized out the lhs is responsible to perform the implicit Conversion generation for the assignment since optimized for unused local assignment code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream IsAssignmentWithNoEffectMASK valueRequired generateCode currentScope codeStream generateAssignment currentScope codeStream valueRequired implicitConversion codeStream recordPositionsFrom sourceStart
Binding get Direct Binding Expression some Expression if some Expression instanceof Single Name Reference return Single Name Reference some Expression binding else if some Expression instanceof Field Reference Field Reference field Ref Field Reference some Expression if field Ref receiver is This field Ref receiver instanceof Qualified This Reference return field Ref binding return null  getDirectBinding someExpression someExpression SingleNameReference SingleNameReference someExpression someExpression FieldReference FieldReference fieldRef FieldReference someExpression fieldRef isThis fieldRef QualifiedThisReference fieldRef
public String Buffer print int indent String Buffer output no when used as a statement print Indent indent output return print Expression No Parenthesis indent output  StringBuffer StringBuffer printIndent printExpressionNoParenthesis
public String Buffer print Expression int indent String Buffer output subclass redefine print Expression No Parenthesis output append return print Expression No Parenthesis 0 output append  StringBuffer printExpression StringBuffer printExpressionNoParenthesis printExpressionNoParenthesis
public String Buffer print Expression No Parenthesis int indent String Buffer output lhs print Expression indent output append NON NLS 1 return expression print Expression 0 output  StringBuffer printExpressionNoParenthesis StringBuffer printExpression printExpression
public String Buffer print Statement int indent String Buffer output no when used as a statement return print indent output append  StringBuffer printStatement StringBuffer
public Type Binding resolve Type Block Scope scope due to syntax lhs may be only a Name Reference a Field Reference or an Array Reference constant NotA Constant if this lhs instanceof Reference this lhs is This scope problem Reporter expression Should BeA Variable this lhs return null this resolved Type lhs resolve Type scope expression Type contains the assignment type lhs Type Type Binding rhs Type expression resolve Type scope if this resolved Type null rhs Type null return null check Assignment Effect scope Compile time conversion of base types implicit narrowing integer into byte short character may require to widen the rhs expression at runtime if expression is Constant Value Of Type Assignable To Type rhs Type this resolved Type this resolved Type is Base Type Base Type Binding is Widening this resolved Type id rhs Type id rhs Type is Compatible With this resolved Type expression implicit Widening this resolved Type rhs Type return this resolved Type scope problem Reporter type Mismatch Error Actual Type Expected Type expression rhs Type this resolved Type return this resolved Type  TypeBinding resolveType BlockScope NameReference FieldReference ArrayReference NotAConstant isThis problemReporter expressionShouldBeAVariable resolvedType resolveType expressionType TypeBinding rhsType resolveType resolvedType rhsType checkAssignmentEffect isConstantValueOfTypeAssignableToType rhsType resolvedType resolvedType isBaseType BaseTypeBinding isWidening resolvedType rhsType rhsType isCompatibleWith resolvedType implicitWidening resolvedType rhsType resolvedType problemReporter typeMismatchErrorActualTypeExpectedType rhsType resolvedType resolvedType
public Type Binding resolve Type Expecting Block Scope scope Type Binding expected Type Type Binding type super resolve Type Expecting scope expected Type signal possible accidental boolean assignment instead of using operator if expected Type Boolean Binding this lhs resolved Type Boolean Binding this lhs bits Is Strictly AssignedMASK 0 scope problem Reporter possible Accidental Boolean Assignment this return type  TypeBinding resolveTypeExpecting BlockScope TypeBinding expectedType TypeBinding resolveTypeExpecting expectedType expectedType BooleanBinding resolvedType BooleanBinding IsStrictlyAssignedMASK problemReporter possibleAccidentalBooleanAssignment
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope lhs traverse visitor scope expression traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

public static final int Is Else If Statement Bit30 public AST Node super  IsElseIfStatement ASTNode
public AST Node concrete Statement return this  ASTNode concreteStatement
public final boolean is Field Use Deprecated Field Binding field Scope scope boolean is Strictly Assigned if is Strictly Assigned field is Private scope is Defined In Field field ignore cases where field is used from within inside itself field modifiers Acc Private Used if field is Viewed As Deprecated return false inside same unit no report if scope is Defined In Same Unit field declaring Class return false if context is deprecated may avoid reporting if scope environment options report Deprecation Inside Deprecated Code scope is Inside Deprecated Code return false return true  isFieldUseDeprecated FieldBinding isStrictlyAssigned isStrictlyAssigned isPrivate isDefinedInField AccPrivateUsed isViewedAsDeprecated isDefinedInSameUnit declaringClass reportDeprecationInsideDeprecatedCode isInsideDeprecatedCode
public boolean is Implicit This return false  isImplicitThis
public final boolean is Method Use Deprecated Method Binding method Scope scope if method is Private scope is Defined In Method method ignore cases where method is used from within inside itself e g direct recursions method modifiers Acc Private Used if method is Viewed As Deprecated return false inside same unit no report if scope is Defined In Same Unit method declaring Class return false if context is deprecated may avoid reporting if scope environment options report Deprecation Inside Deprecated Code scope is Inside Deprecated Code return false return true  isMethodUseDeprecated MethodBinding isPrivate isDefinedInMethod AccPrivateUsed isViewedAsDeprecated isDefinedInSameUnit declaringClass reportDeprecationInsideDeprecatedCode isInsideDeprecatedCode
public boolean is Super return false  isSuper
public boolean is This return false  isThis
public final boolean is Type Use Deprecated Type Binding type Scope scope if type is Array Type type Array Binding type leaf Component Type if type is Base Type return false Reference Binding ref Type Reference Binding type if ref Type is Private scope is Defined In Type ref Type ignore cases where type is used from within inside itself ref Type modifiers Acc Private Used if ref Type is Viewed As Deprecated return false inside same unit no report if scope is Defined In Same Unit ref Type return false if context is deprecated may avoid reporting if scope environment options report Deprecation Inside Deprecated Code scope is Inside Deprecated Code return false return true  isTypeUseDeprecated TypeBinding isArrayType ArrayBinding leafComponentType isBaseType ReferenceBinding refType ReferenceBinding refType isPrivate isDefinedInType refType refType AccPrivateUsed refType isViewedAsDeprecated isDefinedInSameUnit refType reportDeprecationInsideDeprecatedCode isInsideDeprecatedCode
public abstract String Buffer print int indent String Buffer output  StringBuffer StringBuffer
public static String Buffer print Indent int indent String Buffer output for int i indent i 0 i output append NON NLS 1 return output  StringBuffer printIndent StringBuffer
public static String Buffer print Modifiers int modifiers String Buffer output if modifiers Acc Public 0 output append public NON NLS 1 if modifiers Acc Private 0 output append private NON NLS 1 if modifiers Acc Protected 0 output append protected NON NLS 1 if modifiers Acc Static 0 output append static NON NLS 1 if modifiers Acc Final 0 output append final NON NLS 1 if modifiers Acc Synchronized 0 output append synchronized NON NLS 1 if modifiers Acc Volatile 0 output append volatile NON NLS 1 if modifiers Acc Transient 0 output append transient NON NLS 1 if modifiers Acc Native 0 output append native NON NLS 1 if modifiers Acc Abstract 0 output append abstract NON NLS 1 return output  StringBuffer printModifiers StringBuffer AccPublic AccPrivate AccProtected AccStatic AccFinal AccSynchronized AccVolatile AccTransient AccNative AccAbstract
return output public int source Start return this source Start  sourceStart sourceStart
return this source Start public int source End return this source End  sourceStart sourceEnd sourceEnd
return this source End public String to String return print 0 new String Buffer 30 to String  sourceEnd toString StringBuffer toString
public void traverse AST Visitor visitor Block Scope scope do nothing by default  ASTVisitor BlockScope

public Binary Expression Expression left Expression right int operator this left left this right right this bits operator OperatorSHIFT encode operator this source Start left source Start this source End right source End  BinaryExpression sourceStart sourceStart sourceEnd sourceEnd
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info return right analyse Code current Scope flow Context left analyse Code current Scope flow Context flow Info unconditional Inits unconditional Inits  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo analyseCode currentScope flowContext analyseCode currentScope flowContext flowInfo unconditionalInits unconditionalInits
public void compute Constant Block Scope scope int left Id int right Id compute the constant when valid if this left constant Constant NotA Constant this right constant Constant NotA Constant try this constant Constant compute Constant Operation this left constant left Id this bits OperatorMASK OperatorSHIFT this right constant right Id catch Arithmetic Exception e this constant Constant NotA Constant 1 2 no longer throws an exception at compile time scope problem Reporter compile Time Constant Throws Arithmetic Exception this else this constant Constant NotA Constant add some work for the boolean operators this optimized Boolean Constant left Id this bits OperatorMASK OperatorSHIFT right Id  computeConstant BlockScope leftId rightId NotAConstant NotAConstant computeConstantOperation leftId rightId ArithmeticException NotAConstant problemReporter compileTimeConstantThrowsArithmeticException NotAConstant optimizedBooleanConstant leftId rightId
public Constant optimized Boolean Constant return this optimized Boolean Constant null this constant this optimized Boolean Constant  optimizedBooleanConstant optimizedBooleanConstant optimizedBooleanConstant
Code generation for a binary operation public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position Label false Label end Label if constant Constant NotA Constant if value Required code Stream generate Constant constant implicit Conversion code Stream record Positions From pc this source Start return bits Only Value RequiredMASK switch bits OperatorMASK OperatorSHIFT case PLUS switch bits Return TypeIDMASK case T String code Stream generate String Append current Scope left right if value Required code Stream pop break case T int left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream iadd break case T long left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream ladd break case T double left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream dadd break case T float left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream fadd break break case MINUS switch bits Return TypeIDMASK case T int left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream isub break case T long left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream lsub break case T double left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream dsub break case T float left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream fsub break break case MULTIPLY switch bits Return TypeIDMASK case T int left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream imul break case T long left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream lmul break case T double left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream dmul break case T float left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream fmul break break case DIVIDE switch bits Return TypeIDMASK case T int left generate Code current Scope code Stream true right generate Code current Scope code Stream true code Stream idiv if value Required code Stream pop break case T long left generate Code current Scope code Stream true right generate Code current Scope code Stream true code Stream ldiv if value Required code Stream pop2 break case T double left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream ddiv break case T float left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream fdiv break break case REMAINDER switch bits Return TypeIDMASK case T int left generate Code current Scope code Stream true right generate Code current Scope code Stream true code Stream irem if value Required code Stream pop break case T long left generate Code current Scope code Stream true right generate Code current Scope code Stream true code Stream lrem if value Required code Stream pop2 break case T double left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream drem break case T float left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream frem break break case AND switch bits Return TypeIDMASK case T int 0 x if left constant Constant NotA Constant left constant typeID T int left constant int Value 0 right generate Code current Scope code Stream false if value Required code Stream iconst 0 else x 0 if right constant Constant NotA Constant right constant typeID T int right constant int Value 0 left generate Code current Scope code Stream false if value Required code Stream iconst 0 else left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream iand break case T long 0 x if left constant Constant NotA Constant left constant typeID T long left constant long Value 0L right generate Code current Scope code Stream false if value Required code Stream lconst 0 else x 0 if right constant Constant NotA Constant right constant typeID T long right constant long Value 0L left generate Code current Scope code Stream false if value Required code Stream lconst 0 else left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream land break case T boolean logical and generate Optimized Logical And current Scope code Stream null false Label new Label code Stream value Required improving code gen for such a case boolean b i 0 false since the label has never been used we have the inlined value on the stack if false Label has Forward References if value Required code Stream iconst 1 if bits Value For ReturnMASK 0 code Stream ireturn false Label place code Stream iconst 0 else code Stream goto  end Label new Label code Stream code Stream decr Stack Size 1 false Label place code Stream iconst 0 end Label place else false Label place break case OR switch bits Return TypeIDMASK case T int 0 x if left constant Constant NotA Constant left constant typeID T int left constant int Value 0 right generate Code current Scope code Stream value Required else x 0 if right constant Constant NotA Constant right constant typeID T int right constant int Value 0 left generate Code current Scope code Stream value Required else left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream ior break case T long 0 x if left constant Constant NotA Constant left constant typeID T long left constant long Value 0L right generate Code current Scope code Stream value Required else x 0 if right constant Constant NotA Constant right constant typeID T long right constant long Value 0L left generate Code current Scope code Stream value Required else left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream lor break case T boolean logical or generate Optimized Logical Or current Scope code Stream null false Label new Label code Stream value Required improving code gen for such a case boolean b i 0 true since the label has never been used we have the inlined value on the stack if false Label has Forward References if value Required code Stream iconst 1 if bits Value For ReturnMASK 0  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream falseLabel endLabel NotAConstant valueRequired codeStream generateConstant implicitConversion codeStream recordPositionsFrom sourceStart OnlyValueRequiredMASK ReturnTypeIDMASK T_String codeStream generateStringAppend currentScope valueRequired codeStream T_int generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream T_long generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream T_double generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream T_float generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream ReturnTypeIDMASK T_int generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream T_long generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream T_double generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream T_float generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream ReturnTypeIDMASK T_int generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream T_long generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream T_double generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream T_float generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream ReturnTypeIDMASK T_int generateCode currentScope codeStream generateCode currentScope codeStream codeStream valueRequired codeStream T_long generateCode currentScope codeStream generateCode currentScope codeStream codeStream valueRequired codeStream T_double generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream T_float generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream ReturnTypeIDMASK T_int generateCode currentScope codeStream generateCode currentScope codeStream codeStream valueRequired codeStream T_long generateCode currentScope codeStream generateCode currentScope codeStream codeStream valueRequired codeStream T_double generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream T_float generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream ReturnTypeIDMASK T_int NotAConstant T_int intValue generateCode currentScope codeStream valueRequired codeStream iconst_0 NotAConstant T_int intValue generateCode currentScope codeStream valueRequired codeStream iconst_0 generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream T_long NotAConstant T_long longValue generateCode currentScope codeStream valueRequired codeStream lconst_0 NotAConstant T_long longValue generateCode currentScope codeStream valueRequired codeStream lconst_0 generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream T_boolean generateOptimizedLogicalAnd currentScope codeStream falseLabel codeStream valueRequired falseLabel hasForwardReferences valueRequired codeStream iconst_1 ValueForReturnMASK codeStream falseLabel codeStream iconst_0 codeStream goto_ endLabel codeStream codeStream decrStackSize falseLabel codeStream iconst_0 endLabel falseLabel ReturnTypeIDMASK T_int NotAConstant T_int intValue generateCode currentScope codeStream valueRequired NotAConstant T_int intValue generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream T_long NotAConstant T_long longValue generateCode currentScope codeStream valueRequired NotAConstant T_long longValue generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream T_boolean generateOptimizedLogicalOr currentScope codeStream falseLabel codeStream valueRequired falseLabel hasForwardReferences valueRequired codeStream iconst_1 ValueForReturnMASK
Boolean operator code generation Optimized operations are public void generate Optimized Boolean Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required if constant Constant NotA Constant constant typeID T boolean super generate Optimized Boolean current Scope code Stream true Label false Label value Required return switch bits OperatorMASK OperatorSHIFT case LESS generate Optimized Less Than current Scope code Stream true Label false Label value Required return case LESS EQUAL generate Optimized Less Than Or Equal current Scope code Stream true Label false Label value Required return case GREATER generate Optimized Greater Than current Scope code Stream true Label false Label value Required return case GREATER EQUAL generate Optimized Greater Than Or Equal current Scope code Stream true Label false Label value Required return case AND generate Optimized Logical And current Scope code Stream true Label false Label value Required return case OR generate Optimized Logical Or current Scope code Stream true Label false Label value Required return case XOR generate Optimized Logical Xor current Scope code Stream true Label false Label value Required return super generate Optimized Boolean current Scope code Stream true Label false Label value Required  generateOptimizedBoolean BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired NotAConstant T_boolean generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired generateOptimizedLessThan currentScope codeStream trueLabel falseLabel valueRequired LESS_EQUAL generateOptimizedLessThanOrEqual currentScope codeStream trueLabel falseLabel valueRequired generateOptimizedGreaterThan currentScope codeStream trueLabel falseLabel valueRequired GREATER_EQUAL generateOptimizedGreaterThanOrEqual currentScope codeStream trueLabel falseLabel valueRequired generateOptimizedLogicalAnd currentScope codeStream trueLabel falseLabel valueRequired generateOptimizedLogicalOr currentScope codeStream trueLabel falseLabel valueRequired generateOptimizedLogicalXor currentScope codeStream trueLabel falseLabel valueRequired generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired
Boolean generation for public void generate Optimized Greater Than Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required int promoted TypeID left implicit Conversion 4 both sides got promoted in the same way if promoted TypeID T int 0 x if left constant NotA Constant left constant int Value 0 right generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicitly falling through the FALSE case code Stream iflt true Label else if true Label null implicitly falling through the TRUE case code Stream ifge false Label else no implicit fall through TRUE FALSE should never occur reposition the endPC code Stream update Last Recorded EndPC code Stream position return x 0 if right constant NotA Constant right constant int Value 0 left generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicitly falling through the FALSE case code Stream ifgt true Label else if true Label null implicitly falling through the TRUE case code Stream ifle false Label else no implicit fall through TRUE FALSE should never occur reposition the endPC code Stream update Last Recorded EndPC code Stream position return default comparison left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicit falling through the FALSE case switch promoted TypeID case T int code Stream if icmpgt true Label break case T float code Stream fcmpl code Stream ifgt true Label break case T long code Stream lcmp code Stream ifgt true Label break case T double code Stream dcmpl code Stream ifgt true Label reposition the endPC code Stream update Last Recorded EndPC code Stream position return else if true Label null implicit falling through the TRUE case switch promoted TypeID case T int code Stream if icmple false Label break case T float code Stream fcmpl code Stream ifle false Label break case T long code Stream lcmp code Stream ifle false Label break case T double code Stream dcmpl code Stream ifle false Label reposition the endPC code Stream update Last Recorded EndPC code Stream position return else no implicit fall through TRUE FALSE should never occur  generateOptimizedGreaterThan BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired promotedTypeID implicitConversion promotedTypeID T_int NotAConstant intValue generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream updateLastRecordedEndPC codeStream NotAConstant intValue generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream updateLastRecordedEndPC codeStream generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel promotedTypeID T_int codeStream if_icmpgt trueLabel T_float codeStream codeStream trueLabel T_long codeStream codeStream trueLabel T_double codeStream codeStream trueLabel codeStream updateLastRecordedEndPC codeStream trueLabel promotedTypeID T_int codeStream if_icmple falseLabel T_float codeStream codeStream falseLabel T_long codeStream codeStream falseLabel T_double codeStream codeStream falseLabel codeStream updateLastRecordedEndPC codeStream
Boolean generation for public void generate Optimized Greater Than Or Equal Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required int promoted TypeID left implicit Conversion 4 both sides got promoted in the same way if promoted TypeID T int 0 x if left constant NotA Constant left constant int Value 0 right generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicitly falling through the FALSE case code Stream ifle true Label else if true Label null implicitly falling through the TRUE case code Stream ifgt false Label else no implicit fall through TRUE FALSE should never occur reposition the endPC code Stream update Last Recorded EndPC code Stream position return x 0 if right constant NotA Constant right constant int Value 0 left generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicitly falling through the FALSE case code Stream ifge true Label else if true Label null implicitly falling through the TRUE case code Stream iflt false Label else no implicit fall through TRUE FALSE should never occur reposition the endPC code Stream update Last Recorded EndPC code Stream position return default comparison left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicit falling through the FALSE case switch promoted TypeID case T int code Stream if icmpge true Label break case T float code Stream fcmpl code Stream ifge true Label break case T long code Stream lcmp code Stream ifge true Label break case T double code Stream dcmpl code Stream ifge true Label reposition the endPC code Stream update Last Recorded EndPC code Stream position return else if true Label null implicit falling through the TRUE case switch promoted TypeID case T int code Stream if icmplt false Label break case T float code Stream fcmpl code Stream iflt false Label break case T long code Stream lcmp code Stream iflt false Label break case T double code Stream dcmpl code Stream iflt false Label reposition the endPC code Stream update Last Recorded EndPC code Stream position return else no implicit fall through TRUE FALSE should never occur  generateOptimizedGreaterThanOrEqual BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired promotedTypeID implicitConversion promotedTypeID T_int NotAConstant intValue generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream updateLastRecordedEndPC codeStream NotAConstant intValue generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream updateLastRecordedEndPC codeStream generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel promotedTypeID T_int codeStream if_icmpge trueLabel T_float codeStream codeStream trueLabel T_long codeStream codeStream trueLabel T_double codeStream codeStream trueLabel codeStream updateLastRecordedEndPC codeStream trueLabel promotedTypeID T_int codeStream if_icmplt falseLabel T_float codeStream codeStream falseLabel T_long codeStream codeStream falseLabel T_double codeStream codeStream falseLabel codeStream updateLastRecordedEndPC codeStream
Boolean generation for public void generate Optimized Less Than Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required int promoted TypeID left implicit Conversion 4 both sides got promoted in the same way if promoted TypeID T int 0 x if left constant NotA Constant left constant int Value 0 right generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicitly falling through the FALSE case code Stream ifgt true Label else if true Label null implicitly falling through the TRUE case code Stream ifle false Label else no implicit fall through TRUE FALSE should never occur code Stream update Last Recorded EndPC code Stream position return x 0 if right constant NotA Constant right constant int Value 0 left generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicitly falling through the FALSE case code Stream iflt true Label else if true Label null implicitly falling through the TRUE case code Stream ifge false Label else no implicit fall through TRUE FALSE should never occur code Stream update Last Recorded EndPC code Stream position return default comparison left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicit falling through the FALSE case switch promoted TypeID case T int code Stream if icmplt true Label break case T float code Stream fcmpg code Stream iflt true Label break case T long code Stream lcmp code Stream iflt true Label break case T double code Stream dcmpg code Stream iflt true Label code Stream update Last Recorded EndPC code Stream position return else if true Label null implicit falling through the TRUE case switch promoted TypeID case T int code Stream if icmpge false Label break case T float code Stream fcmpg code Stream ifge false Label break case T long code Stream lcmp code Stream ifge false Label break case T double code Stream dcmpg code Stream ifge false Label code Stream update Last Recorded EndPC code Stream position return else no implicit fall through TRUE FALSE should never occur  generateOptimizedLessThan BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired promotedTypeID implicitConversion promotedTypeID T_int NotAConstant intValue generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream updateLastRecordedEndPC codeStream NotAConstant intValue generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream updateLastRecordedEndPC codeStream generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel promotedTypeID T_int codeStream if_icmplt trueLabel T_float codeStream codeStream trueLabel T_long codeStream codeStream trueLabel T_double codeStream codeStream trueLabel codeStream updateLastRecordedEndPC codeStream trueLabel promotedTypeID T_int codeStream if_icmpge falseLabel T_float codeStream codeStream falseLabel T_long codeStream codeStream falseLabel T_double codeStream codeStream falseLabel codeStream updateLastRecordedEndPC codeStream
Boolean generation for public void generate Optimized Less Than Or Equal Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required int promoted TypeID left implicit Conversion 4 both sides got promoted in the same way if promoted TypeID T int 0 x if left constant NotA Constant left constant int Value 0 right generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicitly falling through the FALSE case code Stream ifge true Label else if true Label null implicitly falling through the TRUE case code Stream iflt false Label else no implicit fall through TRUE FALSE should never occur reposition the endPC code Stream update Last Recorded EndPC code Stream position return x 0 if right constant NotA Constant right constant int Value 0 left generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicitly falling through the FALSE case code Stream ifle true Label else if true Label null implicitly falling through the TRUE case code Stream ifgt false Label else no implicit fall through TRUE FALSE should never occur reposition the endPC code Stream update Last Recorded EndPC code Stream position return default comparison left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicit falling through the FALSE case switch promoted TypeID case T int code Stream if icmple true Label break case T float code Stream fcmpg code Stream ifle true Label break case T long code Stream lcmp code Stream ifle true Label break case T double code Stream dcmpg code Stream ifle true Label reposition the endPC code Stream update Last Recorded EndPC code Stream position return else if true Label null implicit falling through the TRUE case switch promoted TypeID case T int code Stream if icmpgt false Label break case T float code Stream fcmpg code Stream ifgt false Label break case T long code Stream lcmp code Stream ifgt false Label break case T double code Stream dcmpg code Stream ifgt false Label reposition the endPC code Stream update Last Recorded EndPC code Stream position return else no implicit fall through TRUE FALSE should never occur  generateOptimizedLessThanOrEqual BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired promotedTypeID implicitConversion promotedTypeID T_int NotAConstant intValue generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream updateLastRecordedEndPC codeStream NotAConstant intValue generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream updateLastRecordedEndPC codeStream generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel promotedTypeID T_int codeStream if_icmple trueLabel T_float codeStream codeStream trueLabel T_long codeStream codeStream trueLabel T_double codeStream codeStream trueLabel codeStream updateLastRecordedEndPC codeStream trueLabel promotedTypeID T_int codeStream if_icmpgt falseLabel T_float codeStream codeStream falseLabel T_long codeStream codeStream falseLabel T_double codeStream codeStream falseLabel codeStream updateLastRecordedEndPC codeStream
Boolean generation for public void generate Optimized Logical And Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required Constant cond Const if left implicit Conversion 0xF T boolean if cond Const left optimized Boolean Constant NotA Constant if cond Const boolean Value true something equivalent to true x left generate Optimized Boolean current Scope code Stream true Label false Label false if bits Only Value RequiredMASK 0 right generate Code current Scope code Stream value Required else right generate Optimized Boolean current Scope code Stream true Label false Label value Required else something equivalent to false x left generate Optimized Boolean current Scope code Stream true Label false Label false Label internal True Label new Label code Stream right generate Optimized Boolean current Scope code Stream true Label false Label false internal True Label place if value Required if bits Only Value RequiredMASK 0 code Stream iconst 0 else if false Label null implicit falling through the TRUE case code Stream goto  false Label reposition the endPC code Stream update Last Recorded EndPC code Stream position return if cond Const right optimized Boolean Constant NotA Constant if cond Const boolean Value true x something equivalent to true if bits Only Value RequiredMASK 0 left generate Code current Scope code Stream value Required else left generate Optimized Boolean current Scope code Stream true Label false Label value Required right generate Optimized Boolean current Scope code Stream true Label false Label false else x something equivalent to false Label internal True Label new Label code Stream left generate Optimized Boolean current Scope code Stream internal True Label false Label false internal True Label place right generate Optimized Boolean current Scope code Stream true Label false Label false if value Required if bits Only Value RequiredMASK 0 code Stream iconst 0 else if false Label null implicit falling through the TRUE case code Stream goto  false Label reposition the endPC code Stream update Last Recorded EndPC code Stream position return default case left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream iand if bits Only Value RequiredMASK 0 if false Label null if true Label null implicit falling through the FALSE case code Stream ifne true Label else implicit falling through the TRUE case if true Label null code Stream ifeq false Label else no implicit fall through TRUE FALSE should never occur reposition the endPC code Stream update Last Recorded EndPC code Stream position  generateOptimizedLogicalAnd BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired condConst implicitConversion T_boolean condConst optimizedBooleanConstant NotAConstant condConst booleanValue generateOptimizedBoolean currentScope codeStream trueLabel falseLabel OnlyValueRequiredMASK generateCode currentScope codeStream valueRequired generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired generateOptimizedBoolean currentScope codeStream trueLabel falseLabel internalTrueLabel codeStream generateOptimizedBoolean currentScope codeStream trueLabel falseLabel internalTrueLabel valueRequired OnlyValueRequiredMASK codeStream iconst_0 falseLabel codeStream goto_ falseLabel codeStream updateLastRecordedEndPC codeStream condConst optimizedBooleanConstant NotAConstant condConst booleanValue OnlyValueRequiredMASK generateCode currentScope codeStream valueRequired generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired generateOptimizedBoolean currentScope codeStream trueLabel falseLabel internalTrueLabel codeStream generateOptimizedBoolean currentScope codeStream internalTrueLabel falseLabel internalTrueLabel generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired OnlyValueRequiredMASK codeStream iconst_0 falseLabel codeStream goto_ falseLabel codeStream updateLastRecordedEndPC codeStream generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream OnlyValueRequiredMASK falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream updateLastRecordedEndPC codeStream
Boolean generation for public void generate Optimized Logical Or Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required Constant cond Const if left implicit Conversion 0xF T boolean if cond Const left optimized Boolean Constant NotA Constant if cond Const boolean Value true something equivalent to true x left generate Optimized Boolean current Scope code Stream true Label false Label false Label internal False Label new Label code Stream right generate Optimized Boolean current Scope code Stream true Label internal False Label false internal False Label place if value Required if bits Only Value RequiredMASK 0 code Stream iconst 1 else if true Label null code Stream goto  true Label reposition the endPC code Stream update Last Recorded EndPC code Stream position else something equivalent to false x left generate Optimized Boolean current Scope code Stream true Label false Label false if bits Only Value RequiredMASK 0 right generate Code current Scope code Stream value Required else right generate Optimized Boolean current Scope code Stream true Label false Label value Required return if cond Const right optimized Boolean Constant NotA Constant if cond Const boolean Value true x something equivalent to true Label internal False Label new Label code Stream left generate Optimized Boolean current Scope code Stream true Label internal False Label false internal False Label place right generate Optimized Boolean current Scope code Stream true Label false Label false if value Required if bits Only Value RequiredMASK 0 code Stream iconst 1 else if true Label null code Stream goto  true Label reposition the endPC code Stream update Last Recorded EndPC code Stream position else x something equivalent to false if bits Only Value RequiredMASK 0 left generate Code current Scope code Stream value Required else left generate Optimized Boolean current Scope code Stream true Label false Label value Required right generate Optimized Boolean current Scope code Stream true Label false Label false return default case left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream ior if bits Only Value RequiredMASK 0 if false Label null if true Label null implicit falling through the FALSE case code Stream ifne true Label else implicit falling through the TRUE case if true Label null code Stream ifeq false Label else no implicit fall through TRUE FALSE should never occur reposition the endPC code Stream update Last Recorded EndPC code Stream position  generateOptimizedLogicalOr BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired condConst implicitConversion T_boolean condConst optimizedBooleanConstant NotAConstant condConst booleanValue generateOptimizedBoolean currentScope codeStream trueLabel falseLabel internalFalseLabel codeStream generateOptimizedBoolean currentScope codeStream trueLabel internalFalseLabel internalFalseLabel valueRequired OnlyValueRequiredMASK codeStream iconst_1 trueLabel codeStream goto_ trueLabel codeStream updateLastRecordedEndPC codeStream generateOptimizedBoolean currentScope codeStream trueLabel falseLabel OnlyValueRequiredMASK generateCode currentScope codeStream valueRequired generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired condConst optimizedBooleanConstant NotAConstant condConst booleanValue internalFalseLabel codeStream generateOptimizedBoolean currentScope codeStream trueLabel internalFalseLabel internalFalseLabel generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired OnlyValueRequiredMASK codeStream iconst_1 trueLabel codeStream goto_ trueLabel codeStream updateLastRecordedEndPC codeStream OnlyValueRequiredMASK generateCode currentScope codeStream valueRequired generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired generateOptimizedBoolean currentScope codeStream trueLabel falseLabel generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream OnlyValueRequiredMASK falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream updateLastRecordedEndPC codeStream
Boolean generation for public void generate Optimized Logical Xor Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required Constant cond Const if left implicit Conversion 0xF T boolean if cond Const left optimized Boolean Constant NotA Constant if cond Const boolean Value true something equivalent to true x left generate Optimized Boolean current Scope code Stream true Label false Label false right generate Optimized Boolean current Scope code Stream false Label true Label value Required else something equivalent to false x left generate Optimized Boolean current Scope code Stream true Label false Label false if bits Only Value RequiredMASK 0 right generate Code current Scope code Stream value Required else right generate Optimized Boolean current Scope code Stream true Label false Label value Required return if cond Const right optimized Boolean Constant NotA Constant if cond Const boolean Value true x something equivalent to true left generate Optimized Boolean current Scope code Stream false Label true Label value Required right generate Optimized Boolean current Scope code Stream true Label false Label false else x something equivalent to false if bits Only Value RequiredMASK 0 left generate Code current Scope code Stream value Required else left generate Optimized Boolean current Scope code Stream true Label false Label value Required right generate Optimized Boolean current Scope code Stream true Label false Label false return default case left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required code Stream ixor if bits Only Value RequiredMASK 0 if false Label null if true Label null implicit falling through the FALSE case code Stream ifne true Label else implicit falling through the TRUE case if true Label null code Stream ifeq false Label else no implicit fall through TRUE FALSE should never occur reposition the endPC code Stream update Last Recorded EndPC code Stream position  generateOptimizedLogicalXor BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired condConst implicitConversion T_boolean condConst optimizedBooleanConstant NotAConstant condConst booleanValue generateOptimizedBoolean currentScope codeStream trueLabel falseLabel generateOptimizedBoolean currentScope codeStream falseLabel trueLabel valueRequired generateOptimizedBoolean currentScope codeStream trueLabel falseLabel OnlyValueRequiredMASK generateCode currentScope codeStream valueRequired generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired condConst optimizedBooleanConstant NotAConstant condConst booleanValue generateOptimizedBoolean currentScope codeStream falseLabel trueLabel valueRequired generateOptimizedBoolean currentScope codeStream trueLabel falseLabel OnlyValueRequiredMASK generateCode currentScope codeStream valueRequired generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired generateOptimizedBoolean currentScope codeStream trueLabel falseLabel generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired codeStream OnlyValueRequiredMASK falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream updateLastRecordedEndPC codeStream
public void generate Optimized String Buffer Block Scope block Scope Code Stream code Stream int typeID In the case trying to make a string concatenation there is no need to create a new string buffer thus use a lower level API for code generation involving only the appending of arguments to the existing String Buffer if bits OperatorMASK OperatorSHIFT PLUS bits Return TypeIDMASK T String if constant NotA Constant code Stream generate Constant constant implicit Conversion code Stream invoke String Buffer Append For Type implicit Conversion 0xF else int pc code Stream position left generate Optimized String Buffer block Scope code Stream left implicit Conversion 0xF code Stream record Positions From pc left source Start pc code Stream position right generate Optimized String Buffer block Scope code Stream right implicit Conversion 0xF code Stream record Positions From pc right source Start else super generate Optimized String Buffer block Scope code Stream typeID  generateOptimizedStringBuffer BlockScope blockScope CodeStream codeStream StringBuffer ReturnTypeIDMASK T_String NotAConstant codeStream generateConstant implicitConversion codeStream invokeStringBufferAppendForType implicitConversion codeStream generateOptimizedStringBuffer blockScope codeStream implicitConversion codeStream recordPositionsFrom sourceStart codeStream generateOptimizedStringBuffer blockScope codeStream implicitConversion codeStream recordPositionsFrom sourceStart generateOptimizedStringBuffer blockScope codeStream
public void generate Optimized String Buffer Creation Block Scope block Scope Code Stream code Stream int typeID In the case trying to make a string concatenation there is no need to create a new string buffer thus use a lower level API for code generation involving only the appending of arguments to the existing String Buffer if bits OperatorMASK OperatorSHIFT PLUS bits Return TypeIDMASK T String if constant NotA Constant code Stream new String Buffer new java lang String Buffer code Stream dup code Stream ldc constant string Value code Stream invoke String Buffer String Constructor invokespecial java lang String Buffer init Ljava lang String V else int pc code Stream position left generate Optimized String Buffer Creation block Scope code Stream left implicit Conversion 0xF code Stream record Positions From pc left source Start pc code Stream position right generate Optimized String Buffer block Scope code Stream right implicit Conversion 0xF code Stream record Positions From pc right source Start else super generate Optimized String Buffer Creation block Scope code Stream typeID  generateOptimizedStringBufferCreation BlockScope blockScope CodeStream codeStream StringBuffer ReturnTypeIDMASK T_String NotAConstant codeStream newStringBuffer StringBuffer codeStream codeStream stringValue codeStream invokeStringBufferStringConstructor StringBuffer codeStream generateOptimizedStringBufferCreation blockScope codeStream implicitConversion codeStream recordPositionsFrom sourceStart codeStream generateOptimizedStringBuffer blockScope codeStream implicitConversion codeStream recordPositionsFrom sourceStart generateOptimizedStringBufferCreation blockScope codeStream
public boolean is Compactable Operation return true  isCompactableOperation
public void optimized Boolean Constant int left Id int operator int right Id switch operator case AND if left Id T boolean right Id T boolean return case AND AND Constant cst if cst left optimized Boolean Constant NotA Constant if cst boolean Value false left is equivalent to false optimized Boolean Constant cst constant false return else left is equivalent to true if cst right optimized Boolean Constant NotA Constant optimized Boolean Constant cst the conditional result is equivalent to the right conditional value return if cst right optimized Boolean Constant NotA Constant if cst boolean Value false right is equivalent to false optimized Boolean Constant cst constant false return case OR if left Id T boolean right Id T boolean return case OR OR if cst left optimized Boolean Constant NotA Constant if cst boolean Value true left is equivalent to true optimized Boolean Constant cst constant true return else left is equivalent to false if cst right optimized Boolean Constant NotA Constant optimized Boolean Constant cst return if cst right optimized Boolean Constant NotA Constant if cst boolean Value true right is equivalent to true optimized Boolean Constant cst constant true  optimizedBooleanConstant leftId rightId leftId T_boolean rightId T_boolean AND_AND optimizedBooleanConstant NotAConstant booleanValue optimizedBooleanConstant optimizedBooleanConstant NotAConstant optimizedBooleanConstant optimizedBooleanConstant NotAConstant booleanValue optimizedBooleanConstant leftId T_boolean rightId T_boolean OR_OR optimizedBooleanConstant NotAConstant booleanValue optimizedBooleanConstant optimizedBooleanConstant NotAConstant optimizedBooleanConstant optimizedBooleanConstant NotAConstant booleanValue optimizedBooleanConstant
public String Buffer print Expression No Parenthesis int indent String Buffer output left print Expression indent output append append operator To String append return right print Expression 0 output  StringBuffer printExpressionNoParenthesis StringBuffer printExpression operatorToString printExpression
public Type Binding resolve Type Block Scope scope boolean left Is Cast right Is Cast if left Is Cast left instanceof Cast Expression true left bits Ignore Need For Cast CheckMASK will check later on Type Binding left Type left resolve Type scope if right Is Cast right instanceof Cast Expression true right bits Ignore Need For Cast CheckMASK will check later on Type Binding right Type right resolve Type scope use the id of the type to navigate into the table if left Type null right Type null constant Constant NotA Constant return null int left Type Id left Type id int right Type Id right Type id if left Type Id 15 right Type Id 15 must convert String Object Object String if left Type Id T String right Type Id T Object else if right Type Id T String left Type Id T Object else constant Constant NotA Constant scope problem Reporter invalid Operator this left Type right Type return null if bits OperatorMASK OperatorSHIFT PLUS if left Type Id T String right Type is Array Type Array Binding right Type elements Type scope Char Binding scope problem Reporter signal No Implicit String Conversion For Char Array Expression right else if right Type Id T String left Type is Array Type Array Binding left Type elements Type scope Char Binding scope problem Reporter signal No Implicit String Conversion For Char Array Expression left the code is an int cast left Op cast right result 0000 0000 0000 0000 0000 16 12 8 4 0 Don t test for result 0 If it is zero some more work is done On the one hand when it is not zero correct code we avoid doing the test int operator bits OperatorMASK OperatorSHIFT int operator Signature Operator Signatures operator left Type Id 4 right Type Id left implicit Conversion operator Signature 12 right implicit Conversion operator Signature 4 0x000FF bits operator Signature 0xF switch operator Signature 0xF record the current Return TypeID only switch on possible result type case T boolean this resolved Type Boolean Binding break case T byte this resolved Type Byte Binding break case T char this resolved Type Char Binding break case T double this resolved Type Double Binding break case T float this resolved Type Float Binding break case T int this resolved Type Int Binding break case T long this resolved Type Long Binding break case T String this resolved Type scope get Java Lang String break default error constant Constant NotA Constant scope problem Reporter invalid Operator this left Type right Type return null check need for operand cast if left Is Cast right Is Cast Cast Expression check Need For Argument Casts scope operator operator Signature left left Type Id left Is Cast right right Type Id right Is Cast compute the constant when valid compute Constant scope left Type Id right Type Id return this resolved Type  TypeBinding resolveType BlockScope leftIsCast rightIsCast leftIsCast CastExpression IgnoreNeedForCastCheckMASK TypeBinding leftType resolveType rightIsCast CastExpression IgnoreNeedForCastCheckMASK TypeBinding rightType resolveType leftType rightType NotAConstant leftTypeId leftType rightTypeId rightType leftTypeId rightTypeId leftTypeId T_String rightTypeId T_Object rightTypeId T_String leftTypeId T_Object NotAConstant problemReporter invalidOperator leftType rightType leftTypeId T_String rightType isArrayType ArrayBinding rightType elementsType CharBinding problemReporter signalNoImplicitStringConversionForCharArrayExpression rightTypeId T_String leftType isArrayType ArrayBinding leftType elementsType CharBinding problemReporter signalNoImplicitStringConversionForCharArrayExpression operatorSignature OperatorSignatures leftTypeId rightTypeId implicitConversion operatorSignature implicitConversion operatorSignature operatorSignature operatorSignature ReturnTypeID T_boolean resolvedType BooleanBinding T_byte resolvedType ByteBinding T_char resolvedType CharBinding T_double resolvedType DoubleBinding T_float resolvedType FloatBinding T_int resolvedType IntBinding T_long resolvedType LongBinding T_String resolvedType getJavaLangString NotAConstant problemReporter invalidOperator leftType rightType leftIsCast rightIsCast CastExpression checkNeedForArgumentCasts operatorSignature leftTypeId leftIsCast rightTypeId rightIsCast computeConstant leftTypeId rightTypeId resolvedType
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope left traverse visitor scope right traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

public Block Scope scope public Block int explicit Declarations this explicit Declarations explicit Declarations  BlockScope explicitDeclarations explicitDeclarations explicitDeclarations
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info empty block if statements null return flow Info boolean did Already Complain false for int i 0 max statements length i max i Statement stat statements i if stat complain If Unreachable flow Info scope did Already Complain flow Info stat analyse Code scope flow Context flow Info else did Already Complain true return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo flowInfo didAlreadyComplain complainIfUnreachable flowInfo didAlreadyComplain flowInfo analyseCode flowContext flowInfo didAlreadyComplain flowInfo
Code generation for a block public void generate Code Block Scope current Scope Code Stream code Stream if bits Is ReachableMASK 0 return int pc code Stream position if statements null for int i 0 max statements length i max i statements i generate Code scope code Stream for local variable debug attributes if scope current Scope was really associated with its own scope code Stream exit User Scope scope code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK codeStream generateCode codeStream currentScope codeStream exitUserScope codeStream recordPositionsFrom sourceStart
public boolean is Empty Block return statements null  isEmptyBlock
public String Buffer print Body int indent String Buffer output if this statements null return output for int i 0 i statements length i statements i print Statement indent 1 output output append n return output  StringBuffer printBody StringBuffer printStatement
public String Buffer print Statement int indent String Buffer output print Indent indent output output append n NON NLS 1 print Body indent output return print Indent indent output append  StringBuffer printStatement StringBuffer printIndent printBody printIndent
public void resolve Block Scope upper Scope if this bits Undocumented Empty BlockMASK 0 upper Scope problem Reporter undocumented Empty Block this source Start this source End if statements null scope explicit Declarations 0 upper Scope new Block Scope upper Scope explicit Declarations for int i 0 length statements length i length i statements i resolve scope  BlockScope upperScope UndocumentedEmptyBlockMASK upperScope problemReporter undocumentedEmptyBlock sourceStart sourceEnd explicitDeclarations upperScope BlockScope upperScope explicitDeclarations
public void resolve Using Block Scope given Scope if this bits Undocumented Empty BlockMASK 0 given Scope problem Reporter undocumented Empty Block this source Start this source End this optimized resolve is sent only on none empty blocks scope given Scope if statements null for int i 0 length statements length i length i statements i resolve scope  resolveUsing BlockScope givenScope UndocumentedEmptyBlockMASK givenScope problemReporter undocumentedEmptyBlock sourceStart sourceEnd givenScope
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope if statements null for int i 0 length statements length i length i statements i traverse visitor scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope endVisit blockScope
Dispatch the call on its last statement public void branch Chain To Label label if this statements null this statements statements length 1 branch Chain To label  branchChainTo branchChainTo

public Sub Routine Statement subroutines Branch Statement constructor comment public Branch Statement char l int s int e label l source Start s source End e  SubRoutineStatement BranchStatement BranchStatement sourceStart sourceEnd
Branch code generation generate the finally Invocation Sequence public void generate Code Block Scope current Scope Code Stream code Stream if bits Is ReachableMASK 0 return int pc code Stream position generation of code responsible for invoking the finally blocks in sequence if subroutines null for int i 0 max subroutines length i max i Sub Routine Statement sub subroutines i sub generate Sub Routine Invocation current Scope code Stream if sub is Sub Routine Escaping code Stream record Positions From pc this source Start Sub Routine Statement reenter Exception Handlers subroutines i code Stream return sub exit Any Exception Handler code Stream goto  target Label code Stream record Positions From pc this source Start Sub Routine Statement reenter Exception Handlers subroutines 1 code Stream  finallyInvocationSequence generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK codeStream SubRoutineStatement generateSubRoutineInvocation currentScope codeStream isSubRoutineEscaping codeStream recordPositionsFrom sourceStart SubRoutineStatement reenterExceptionHandlers codeStream exitAnyExceptionHandler codeStream goto_ targetLabel codeStream recordPositionsFrom sourceStart SubRoutineStatement reenterExceptionHandlers codeStream
Sub Routine Statement reenter Exception Handlers subroutines 1 code Stream public void resolve Block Scope scope nothing to do during name resolution  SubRoutineStatement reenterExceptionHandlers codeStream BlockScope

public class Break Statement extends Branch Statement public Break Statement char label int source Start int e super label source Start e  BreakStatement BranchStatement BreakStatement sourceStart sourceStart
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info here requires to generate a sequence of finally blocks invocations depending corresponding to each of the traversed try statements so that execution will terminate properly lookup the label this should answer the return Context Flow Context target Context label null flow Context get Target Context For Default Break flow Context get Target Context For Break Label label if target Context null if label null current Scope problem Reporter invalid Break this else current Scope problem Reporter undefined Label this return flow Info pretend it did not break since no actual target target Label target Context break Label Flow Context traversed Context flow Context int sub Index 0 max Sub 5 subroutines new Sub Routine Statement max Sub do Sub Routine Statement sub if sub traversed Context sub Routine null if sub Index max Sub System arraycopy subroutines 0 subroutines new Sub Routine Statement max Sub 2 0 sub Index grow subroutines sub Index sub if sub is Sub Routine Escaping break traversed Context record Return From flow Info unconditional Inits AST Node node if node traversed Context associated Node instanceof Try Statement Try Statement try Statement Try Statement node flow Info add Initializations From try Statement sub Routine Inits collect inits else if traversed Context target Context only record break info once accumulated through subroutines and only against target context target Context record Break From flow Info break while traversed Context traversed Context parent null resize subroutines if sub Index max Sub System arraycopy subroutines 0 subroutines new Sub Routine Statement sub Index 0 sub Index return Flow Info DEAD END  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo returnContext FlowContext targetContext flowContext getTargetContextForDefaultBreak flowContext getTargetContextForBreakLabel targetContext currentScope problemReporter invalidBreak currentScope problemReporter undefinedLabel flowInfo targetLabel targetContext breakLabel FlowContext traversedContext flowContext subIndex maxSub SubRoutineStatement maxSub SubRoutineStatement traversedContext subRoutine subIndex maxSub SubRoutineStatement maxSub subIndex subIndex isSubRoutineEscaping traversedContext recordReturnFrom flowInfo unconditionalInits ASTNode traversedContext associatedNode TryStatement TryStatement tryStatement TryStatement flowInfo addInitializationsFrom tryStatement subRoutineInits traversedContext targetContext targetContext recordBreakFrom flowInfo traversedContext traversedContext subIndex maxSub SubRoutineStatement subIndex subIndex FlowInfo DEAD_END
public String Buffer print Statement int tab String Buffer output print Indent tab output append break NON NLS 1 if label null output append label return output append  StringBuffer printStatement StringBuffer printIndent
public void traverse AST Visitor visitor Block Scope blockscope visitor visit this blockscope visitor end Visit this blockscope  ASTVisitor BlockScope endVisit

public Case Label target Label public Case Statement Expression constant Expression int source End int source Start this constant Expression constant Expression this source End source End this source Start source Start  CaseLabel targetLabel CaseStatement constantExpression sourceEnd sourceStart constantExpression constantExpression sourceEnd sourceEnd sourceStart sourceStart
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info if constant Expression null if constant Expression constant NotA Constant current Scope problem Reporter case Expression Must Be Constant constant Expression this constant Expression analyse Code current Scope flow Context flow Info return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo constantExpression constantExpression NotAConstant currentScope problemReporter caseExpressionMustBeConstant constantExpression constantExpression analyseCode currentScope flowContext flowInfo flowInfo
public String Buffer print Statement int tab String Buffer output print Indent tab output if constant Expression null output append default NON NLS 1 else output append case NON NLS 1 constant Expression print Expression 0 output append NON NLS 1 return output append  StringBuffer printStatement StringBuffer printIndent constantExpression constantExpression printExpression
Case code generation public void generate Code Block Scope current Scope Code Stream code Stream if bits Is ReachableMASK 0 return int pc code Stream position target Label place code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK codeStream targetLabel codeStream recordPositionsFrom sourceStart
No op should use resolve Case instead public void resolve Block Scope scope no op should use resolve Case instead  resolveCase BlockScope resolveCase
public Constant resolve Case Block Scope scope Type Binding switch Type Switch Statement switch Statement scope switch Case this record entering in a switch case block if constant Expression null remember the default case into the associated switch statement if switch Statement default Case null scope problem Reporter duplicate Default Case this on error the last default will be the selected one switch Statement default Case this return null add into the collection of cases of the associated switch statement switch Statement cases switch Statement case Count this Type Binding case Type constant Expression resolve Type scope if case Type null switch Type null return null if constant Expression is Constant Value Of Type Assignable To Type case Type switch Type return constant Expression constant if case Type is Compatible With switch Type return constant Expression constant scope problem Reporter type Mismatch Error Actual Type Expected Type constant Expression case Type switch Type return null  resolveCase BlockScope TypeBinding switchType SwitchStatement switchStatement switchCase constantExpression switchStatement defaultCase problemReporter duplicateDefaultCase switchStatement defaultCase switchStatement switchStatement caseCount TypeBinding caseType constantExpression resolveType caseType switchType constantExpression isConstantValueOfTypeAssignableToType caseType switchType constantExpression caseType isCompatibleWith switchType constantExpression problemReporter typeMismatchErrorActualTypeExpectedType constantExpression caseType switchType
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope if constant Expression null constant Expression traverse visitor block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope constantExpression constantExpression blockScope endVisit blockScope

expression implicit Conversion holds the cast for base Type casting public Cast Expression Expression expression Expression type this expression expression this type type due to the fact an expression may start with and that a cast also start with the field is an expression it can be a Type Reference OR a Name Reference Or an expression this last one is invalid if type instanceof Type Reference flag Is Type Reference else if type instanceof Name Reference flag Is Name Reference else flag Is Expression  implicitConversion baseType CastExpression TypeReference NameReference TypeReference IsTypeReference NameReference IsNameReference IsExpression
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info return expression analyse Code current Scope flow Context flow Info unconditional Inits  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo analyseCode currentScope flowContext flowInfo unconditionalInits
Returns false if the cast is unnecessary public final boolean check Cast Types Compatibility Block Scope scope Type Binding cast Type Type Binding expression Type see specifications 5 5 handle errors and process constant when needed if either one of the type is null some error has been already reported some where we then do not report an obvious cascade error if cast Type null expression Type null return true identity conversion cannot be performed upfront due to side effects like constant propagation if cast Type is Base Type if expression Type is Base Type if expression Type cast Type expression implicit Widening cast Type expression Type constant expression constant use the same constant return false boolean necessary false if expression Type is Compatible With cast Type necessary Base Type Binding is Narrowing cast Type id expression Type id expression implicit Conversion cast Type id 4 expression Type id if expression constant Constant NotA Constant constant expression constant cast To expression implicit Conversion return necessary scope problem Reporter type Cast Error this cast Type expression Type return true cast to something which is NOT a base type if expression Type Null Binding if cast Type is Array Type 26903 need checkcast when casting null to array type need Runtime Checkcast true return false null is compatible with every thing if expression Type is Base Type scope problem Reporter type Cast Error this cast Type expression Type return true if expression Type is Array Type if cast Type expression Type return false identity conversion if cast Type is Array Type cast Type is Array expression Type is Array Type Binding expr Element Type Array Binding expression Type elements Type scope if expr Element Type is Base Type stop the recursion if Array Binding cast Type elements Type scope expr Element Type this bits Need Runtime Check CastMASK else scope problem Reporter type Cast Error this cast Type expression Type return true recursively on the elements return check Cast Types Compatibility scope Array Binding cast Type elements Type scope expr Element Type else if cast Type is Class cast Type is Class expression Type is Array if cast Type id T Object return false else cast Type is Interface expression Type is Array if cast Type id T JavaLangCloneable cast Type id T JavaIoSerializable this bits Need Runtime Check CastMASK return true scope problem Reporter type Cast Error this cast Type expression Type return true if expression Type is Class if cast Type is Array Type cast Type is Array expression Type is Class if expression Type id T Object potential runtime error this bits Need Runtime Check CastMASK return true else if cast Type is Class cast Type is Class expression Type is Class if expression Type is Compatible With cast Type no runtime error if cast Type id T String constant expression constant String cst is still a constant return false if cast Type is Compatible With expression Type potential runtime error this bits Need Runtime Check CastMASK return true else cast Type is Interface expression Type is Class if expression Type is Compatible With cast Type return false if Reference Binding expression Type is Final a subclass may implement the interface no check at compile time this bits Need Runtime Check CastMASK return true no subclass for expression Type thus compile time check is valid scope problem Reporter type Cast Error this cast Type expression Type return true if expression Type is Interface cannot be anything else if cast Type is Array Type cast Type is Array expression Type is Interface if expression Type id T JavaLangCloneable expression Type id T JavaIoSerializable potential runtime error this bits Need Runtime Check CastMASK else scope problem Reporter type Cast Error this cast Type expression Type return true else if cast Type is Class cast Type is Class expression Type is Interface if cast Type id T Object no runtime error return false if Reference Binding cast Type is Final no subclass for cast Type thus compile time check is valid if cast Type is Compatible With expression Type potential runtime error scope problem Reporter type Cast Error this cast Type expression Type return true else cast Type is Interface expression Type is Interface if expression Type is Compatible With cast Type return false if cast Type is Compatible With expression Type Method Binding cast Type Methods Reference Binding cast Type methods Method Binding expression Type Methods Reference Binding expression Type methods int expr Methods Length expression Type Methods length for int i 0 cast Methods Length cast Type Methods length i cast Methods Length i for int j 0 j expr Methods Length j if cast Type Methods i return Type expression Type Methods j return Type Char Operation equals cast Type Methods i selector expression Type Methods j selector cast Type Methods i are Parameters Equal expression Type Methods j scope problem Reporter type Cast Error this cast Type expression Type this bits Need Runtime Check CastMASK return true  checkCastTypesCompatibility BlockScope TypeBinding castType TypeBinding expressionType castType expressionType castType isBaseType expressionType isBaseType expressionType castType implicitWidening castType expressionType expressionType isCompatibleWith castType BaseTypeBinding isNarrowing castType expressionType implicitConversion castType expressionType NotAConstant castTo implicitConversion problemReporter typeCastError castType expressionType expressionType NullBinding castType isArrayType needRuntimeCheckcast expressionType isBaseType problemReporter typeCastError castType expressionType expressionType isArrayType castType expressionType castType isArrayType castType isArray expressionType isArray TypeBinding exprElementType ArrayBinding expressionType elementsType exprElementType isBaseType ArrayBinding castType elementsType exprElementType NeedRuntimeCheckCastMASK problemReporter typeCastError castType expressionType checkCastTypesCompatibility ArrayBinding castType elementsType exprElementType castType isClass castType isClass expressionType isArray castType T_Object castType isInterface expressionType isArray castType T_JavaLangCloneable castType T_JavaIoSerializable NeedRuntimeCheckCastMASK problemReporter typeCastError castType expressionType expressionType isClass castType isArrayType castType isArray expressionType isClass expressionType T_Object NeedRuntimeCheckCastMASK castType isClass castType isClass expressionType isClass expressionType isCompatibleWith castType castType T_String castType isCompatibleWith expressionType NeedRuntimeCheckCastMASK castType isInterface expressionType isClass expressionType isCompatibleWith castType ReferenceBinding expressionType isFinal NeedRuntimeCheckCastMASK expressionType problemReporter typeCastError castType expressionType expressionType isInterface castType isArrayType castType isArray expressionType isInterface expressionType T_JavaLangCloneable expressionType T_JavaIoSerializable NeedRuntimeCheckCastMASK problemReporter typeCastError castType expressionType castType isClass castType isClass expressionType isInterface castType T_Object ReferenceBinding castType isFinal castType castType isCompatibleWith expressionType problemReporter typeCastError castType expressionType castType isInterface expressionType isInterface expressionType isCompatibleWith castType castType isCompatibleWith expressionType MethodBinding castTypeMethods ReferenceBinding castType MethodBinding expressionTypeMethods ReferenceBinding expressionType exprMethodsLength expressionTypeMethods castMethodsLength castTypeMethods castMethodsLength exprMethodsLength castTypeMethods returnType expressionTypeMethods returnType CharOperation castTypeMethods expressionTypeMethods castTypeMethods areParametersEqual expressionTypeMethods problemReporter typeCastError castType expressionType NeedRuntimeCheckCastMASK
Casting an enclosing instance will considered as useful if removing it would actually bind to a different type public static void check Need For Enclosing Instance Cast Block Scope scope Expression enclosing Instance Type Binding enclosing Instance Type Type Binding member Type if scope environment options get Severity Compiler Options Unnecessary Type Check Problem Severities Ignore return Type Binding casted Expression Type Cast Expression enclosing Instance expression resolved Type if casted Expression Type null return cannot do better obvious identity cast if casted Expression Type enclosing Instance Type scope problem Reporter unnecessary Cast Cast Expression enclosing Instance else if casted Expression Type Null Binding return tolerate null enclosing instance cast else Type Binding alternate Enclosing Instance Type casted Expression Type if casted Expression Type is Base Type casted Expression Type is Array Type return error case if member Type scope get Member Type member Type source Name Reference Binding alternate Enclosing Instance Type scope problem Reporter unnecessary Cast Cast Expression enclosing Instance  checkNeedForEnclosingInstanceCast BlockScope enclosingInstance TypeBinding enclosingInstanceType TypeBinding memberType getSeverity CompilerOptions UnnecessaryTypeCheck ProblemSeverities TypeBinding castedExpressionType CastExpression enclosingInstance resolvedType castedExpressionType castedExpressionType enclosingInstanceType problemReporter unnecessaryCast CastExpression enclosingInstance castedExpressionType NullBinding TypeBinding alternateEnclosingInstanceType castedExpressionType castedExpressionType isBaseType castedExpressionType isArrayType memberType getMemberType memberType sourceName ReferenceBinding alternateEnclosingInstanceType problemReporter unnecessaryCast CastExpression enclosingInstance
Only complain for identity cast since other type of casts may be useful e g long 0 32 is different from 0 32 public static void check Need For Argument Cast Block Scope scope int operator int operator Signature Expression expression int expression Type Id if scope environment options get Severity Compiler Options Unnecessary Type Check Problem Severities Ignore return check need for left operand cast int alternate Left Type Id expression Type Id if expression bits Unnecessary Cast Mask 0 expression resolved Type is Base Type narrowing conversion on base type may change value thus necessary return else Type Binding alternate Left Type Cast Expression expression expression resolved Type if alternate Left Type null return cannot do better if alternate Left Type Id alternate Left Type id expression Type Id obvious identity cast scope problem Reporter unnecessary Cast Cast Expression expression return else if alternate Left Type Id T null alternate Left Type Id expression Type Id tolerate null argument cast return tolerate widening cast in unary expressions as may be used when combined in binary expressions 41680 int alternate Operator Signature Operator Expression Operator Signatures operator alternate Left Type Id 4 alternate Left Type Id cast left Op cast right result 1111 0000 1111 0000 1111 16 12 8 4 0 final int CompareMASK 0xF 16 0xF 8 0xF mask hiding compile time types if operator Signature CompareMASK alternate Operator Signature CompareMASK same promotions and result scope problem Reporter unnecessary Cast For Argument Cast Expression expression Type Binding well Known Type scope expression implicit Conversion 4  checkNeedForArgumentCast BlockScope operatorSignature expressionTypeId getSeverity CompilerOptions UnnecessaryTypeCheck ProblemSeverities alternateLeftTypeId expressionTypeId UnnecessaryCastMask resolvedType isBaseType TypeBinding alternateLeftType CastExpression resolvedType alternateLeftType alternateLeftTypeId alternateLeftType expressionTypeId problemReporter unnecessaryCast CastExpression alternateLeftTypeId T_null alternateLeftTypeId expressionTypeId alternateOperatorSignature OperatorExpression OperatorSignatures alternateLeftTypeId alternateLeftTypeId operatorSignature alternateOperatorSignature problemReporter unnecessaryCastForArgument CastExpression TypeBinding wellKnownType implicitConversion
Cast expressions will considered as useful if removing them all would actually bind to a different method no fine grain analysis on per casted argument basis simply separate widening cast from narrowing ones public static void check Need For Argument Casts Block Scope scope Expression receiver Type Binding receiver Type Method Binding binding Expression arguments Type Binding argument Types final Invocation Site invocation Site if scope environment options get Severity Compiler Options Unnecessary Type Check Problem Severities Ignore return int length argument Types length iterate over arguments and retrieve original argument types before cast Type Binding raw Argument Types argument Types for int i 0 i length i Expression argument arguments i if argument instanceof Cast Expression narrowing conversion on base type may change value thus necessary if argument bits Unnecessary Cast Mask 0 argument resolved Type is Base Type continue Type Binding casted Expression Type Cast Expression argument expression resolved Type if casted Expression Type null return cannot do better obvious identity cast if casted Expression Type argument Types i scope problem Reporter unnecessary Cast Cast Expression argument else if casted Expression Type Null Binding continue tolerate null argument cast else if raw Argument Types argument Types System arraycopy raw Argument Types 0 raw Argument Types new Type Binding length 0 length retain original argument type raw Argument Types i casted Expression Type perform alternate lookup with original types if raw Argument Types argument Types check Alternate Binding scope receiver receiver Type binding arguments argument Types raw Argument Types invocation Site  checkNeedForArgumentCasts BlockScope TypeBinding receiverType MethodBinding TypeBinding argumentTypes InvocationSite invocationSite getSeverity CompilerOptions UnnecessaryTypeCheck ProblemSeverities argumentTypes TypeBinding rawArgumentTypes argumentTypes CastExpression UnnecessaryCastMask resolvedType isBaseType TypeBinding castedExpressionType CastExpression resolvedType castedExpressionType castedExpressionType argumentTypes problemReporter unnecessaryCast CastExpression castedExpressionType NullBinding rawArgumentTypes argumentTypes rawArgumentTypes rawArgumentTypes TypeBinding rawArgumentTypes castedExpressionType rawArgumentTypes argumentTypes checkAlternateBinding receiverType argumentTypes rawArgumentTypes invocationSite
Check binary operator casted arguments public static void check Need For Argument Casts Block Scope scope int operator int operator Signature Expression left int left Type Id boolean left Is Cast Expression right int right Type Id boolean right Is Cast if scope environment options get Severity Compiler Options Unnecessary Type Check Problem Severities Ignore return check need for left operand cast int alternate Left Type Id left Type Id if left Is Cast if left bits Unnecessary Cast Mask 0 left resolved Type is Base Type narrowing conversion on base type may change value thus necessary left Is Cast false else Type Binding alternate Left Type Cast Expression left expression resolved Type if alternate Left Type null return cannot do better if alternate Left Type Id alternate Left Type id left Type Id obvious identity cast scope problem Reporter unnecessary Cast Cast Expression left left Is Cast false else if alternate Left Type Id T null alternate Left Type Id left Type Id tolerate null argument cast left Is Cast false check need for right operand cast int alternate Right Type Id right Type Id if right Is Cast if right bits Unnecessary Cast Mask 0 right resolved Type is Base Type narrowing conversion on base type may change value thus necessary right Is Cast false else Type Binding alternate Right Type Cast Expression right expression resolved Type if alternate Right Type null return cannot do better if alternate Right Type Id alternate Right Type id right Type Id obvious identity cast scope problem Reporter unnecessary Cast Cast Expression right right Is Cast false else if alternate Right Type Id T null alternate Right Type Id right Type Id tolerate null argument cast right Is Cast false if left Is Cast right Is Cast if alternate Left Type Id 15 alternate Right Type Id 15 must convert String Object Object String if alternate Left Type Id T String alternate Right Type Id T Object else if alternate Right Type Id T String alternate Left Type Id T Object else return invalid operator int alternate Operator Signature Operator Expression Operator Signatures operator alternate Left Type Id 4 alternate Right Type Id cast left Op cast right result 1111 0000 1111 0000 1111 16 12 8 4 0 final int CompareMASK 0xF 16 0xF 8 0xF mask hiding compile time types if operator Signature CompareMASK alternate Operator Signature CompareMASK same promotions and result if left Is Cast scope problem Reporter unnecessary Cast For Argument Cast Expression left Type Binding well Known Type scope left implicit Conversion 4 if right Is Cast scope problem Reporter unnecessary Cast For Argument Cast Expression right Type Binding well Known Type scope right implicit Conversion 4  checkNeedForArgumentCasts BlockScope operatorSignature leftTypeId leftIsCast rightTypeId rightIsCast getSeverity CompilerOptions UnnecessaryTypeCheck ProblemSeverities alternateLeftTypeId leftTypeId leftIsCast UnnecessaryCastMask resolvedType isBaseType leftIsCast TypeBinding alternateLeftType CastExpression resolvedType alternateLeftType alternateLeftTypeId alternateLeftType leftTypeId problemReporter unnecessaryCast CastExpression leftIsCast alternateLeftTypeId T_null alternateLeftTypeId leftTypeId leftIsCast alternateRightTypeId rightTypeId rightIsCast UnnecessaryCastMask resolvedType isBaseType rightIsCast TypeBinding alternateRightType CastExpression resolvedType alternateRightType alternateRightTypeId alternateRightType rightTypeId problemReporter unnecessaryCast CastExpression rightIsCast alternateRightTypeId T_null alternateRightTypeId rightTypeId rightIsCast leftIsCast rightIsCast alternateLeftTypeId alternateRightTypeId alternateLeftTypeId T_String alternateRightTypeId T_Object alternateRightTypeId T_String alternateLeftTypeId T_Object alternateOperatorSignature OperatorExpression OperatorSignatures alternateLeftTypeId alternateRightTypeId operatorSignature alternateOperatorSignature leftIsCast problemReporter unnecessaryCastForArgument CastExpression TypeBinding wellKnownType implicitConversion rightIsCast problemReporter unnecessaryCastForArgument CastExpression TypeBinding wellKnownType implicitConversion
Invocation Site fake Invocation Site new Invocation Site public boolean is Super Access return invocation Site is Super Access  InvocationSite fakeInvocationSite InvocationSite isSuperAccess invocationSite isSuperAccess
Invocation Site fake Invocation Site new Invocation Site public boolean is Super Access return invocation Site is Super Access public boolean is Type Access return invocation Site is Type Access  InvocationSite fakeInvocationSite InvocationSite isSuperAccess invocationSite isSuperAccess isTypeAccess invocationSite isTypeAccess
public boolean is Super Access return invocation Site is Super Access public boolean is Type Access return invocation Site is Type Access public void set Actual Receiver Type Reference Binding actual Receiver Type ignore  isSuperAccess invocationSite isSuperAccess isTypeAccess invocationSite isTypeAccess setActualReceiverType ReferenceBinding actualReceiverType
public boolean is Type Access return invocation Site is Type Access public void set Actual Receiver Type Reference Binding actual Receiver Type ignore public void set Depth int depth ignore  isTypeAccess invocationSite isTypeAccess setActualReceiverType ReferenceBinding actualReceiverType setDepth
public void set Actual Receiver Type Reference Binding actual Receiver Type ignore public void set Depth int depth ignore public void set Field Index int depth ignore  setActualReceiverType ReferenceBinding actualReceiverType setDepth setFieldIndex
public void set Depth int depth ignore public void set Field Index int depth ignore public int source Start return 0  setDepth setFieldIndex sourceStart
public void set Field Index int depth ignore public int source Start return 0 public int source End return 0  setFieldIndex sourceStart sourceEnd
private static void check Alternate Binding Block Scope scope Expression receiver Type Binding receiver Type Method Binding binding Expression arguments Type Binding original Argument Types Type Binding alternate Argument Types final Invocation Site invocation Site Invocation Site fake Invocation Site new Invocation Site public boolean is Super Access return invocation Site is Super Access public boolean is Type Access return invocation Site is Type Access public void set Actual Receiver Type Reference Binding actual Receiver Type ignore public void set Depth int depth ignore public void set Field Index int depth ignore public int source Start return 0 public int source End return 0 Method Binding binding If No Cast if binding is Constructor binding If No Cast scope get Constructor Reference Binding receiver Type alternate Argument Types fake Invocation Site else binding If No Cast receiver is Implicit This scope get Implicit Method binding selector alternate Argument Types fake Invocation Site scope get Method receiver Type binding selector alternate Argument Types fake Invocation Site if binding If No Cast binding for int i 0 length original Argument Types length i length i if original Argument Types i alternate Argument Types i scope problem Reporter unnecessary Cast For Argument Cast Expression arguments i binding parameters i  checkAlternateBinding BlockScope TypeBinding receiverType MethodBinding TypeBinding originalArgumentTypes TypeBinding alternateArgumentTypes InvocationSite invocationSite InvocationSite fakeInvocationSite InvocationSite isSuperAccess invocationSite isSuperAccess isTypeAccess invocationSite isTypeAccess setActualReceiverType ReferenceBinding actualReceiverType setDepth setFieldIndex sourceStart sourceEnd MethodBinding bindingIfNoCast isConstructor bindingIfNoCast getConstructor ReferenceBinding receiverType alternateArgumentTypes fakeInvocationSite bindingIfNoCast isImplicitThis getImplicitMethod alternateArgumentTypes fakeInvocationSite getMethod receiverType alternateArgumentTypes fakeInvocationSite bindingIfNoCast originalArgumentTypes originalArgumentTypes alternateArgumentTypes problemReporter unnecessaryCastForArgument CastExpression
Cast expression code generation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position boolean need Runtime Checkcast this bits Need Runtime Check CastMASK 0 if constant NotA Constant if value Required need Runtime Checkcast Added for 1F1W9IG IVJCOM WINNT Compiler omits casting check code Stream generate Constant constant implicit Conversion if need Runtime Checkcast code Stream checkcast this resolved Type if value Required code Stream pop code Stream record Positions From pc this source Start return expression generate Code current Scope code Stream value Required need Runtime Checkcast if need Runtime Checkcast code Stream checkcast this resolved Type if value Required code Stream pop else if value Required code Stream generate Implicit Conversion implicit Conversion code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream needRuntimeCheckcast NeedRuntimeCheckCastMASK NotAConstant valueRequired needRuntimeCheckcast codeStream generateConstant implicitConversion needRuntimeCheckcast codeStream resolvedType valueRequired codeStream codeStream recordPositionsFrom sourceStart generateCode currentScope codeStream valueRequired needRuntimeCheckcast needRuntimeCheckcast codeStream resolvedType valueRequired codeStream valueRequired codeStream generateImplicitConversion implicitConversion codeStream recordPositionsFrom sourceStart
public Expression innermost Casted Expression Expression current this expression while current instanceof Cast Expression current Cast Expression current expression return current  innermostCastedExpression CastExpression CastExpression
public String Buffer print Expression int indent String Buffer output output append type print 0 output append NON NLS 1 return expression print Expression 0 output  StringBuffer printExpression StringBuffer printExpression
public Type Binding resolve Type Block Scope scope compute a new constant if the cast is effective due to the fact an expression may start with and that a cast can also start with the field is an expression it can be a Type Reference OR a Name Reference Or any kind of Expression this last one is invalid constant Constant NotA Constant implicit Conversion T undefined if type instanceof Type Reference type instanceof Name Reference type bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT 0 no extra parenthesis around type A exp this resolved Type type resolve Type scope Type Binding expression Type expression resolve Type scope if this resolved Type null expression Type null boolean necessary check Cast Types Compatibility scope this resolved Type expression Type if necessary this expression resolved Type null cannot do better if expression is not bound this bits Unnecessary Cast Mask if this bits Ignore Need For Cast CheckMASK 0 scope problem Reporter unnecessary Cast this return this resolved Type else expression as a cast Type Binding expression Type expression resolve Type scope if expression Type null return null scope problem Reporter invalid Type Reference type return null  TypeBinding resolveType BlockScope TypeReference NameReference NotAConstant implicitConversion T_undefined TypeReference NameReference ASTNode ASTNode resolvedType resolveType TypeBinding expressionType resolveType resolvedType expressionType checkCastTypesCompatibility resolvedType expressionType resolvedType UnnecessaryCastMask IgnoreNeedForCastCheckMASK problemReporter unnecessaryCast resolvedType TypeBinding expressionType resolveType expressionType problemReporter invalidTypeReference
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope type traverse visitor block Scope expression traverse visitor block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope blockScope blockScope endVisit blockScope

public class Char Literal extends Number Literal char value public Char Literal char token int s int e super token s e compute Value  CharLiteral NumberLiteral CharLiteral computeValue
public void compute Constant The source is a char 3 first and last char are This is true for both regular char AND unicode char BUT not for escape char like b which are char 4 constant Constant from Value value  computeConstant fromValue
private void compute Value The source is a char 3 first and last char are This is true for both regular char AND unicode char BUT not for escape char like b which are char 4 if value source 1 return char digit switch digit source 2 case b value b break case t value t break case n value n break case f value f break case r value r break case value break case value break case value break default octal well formed ended by a int number Character get Numeric Value digit if digit source 3 number number 8 Character get Numeric Value digit else constant Constant from Value value char number break if digit source 4 number number 8 Character get Numeric Value digit value char number break  computeValue getNumericValue getNumericValue fromValue getNumericValue
Char Literal code generation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if value Required if implicit Conversion 4 T char code Stream generate Inlined Value value else code Stream generate Constant constant implicit Conversion code Stream record Positions From pc this source Start  CharLiteral currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream valueRequired implicitConversion T_char codeStream generateInlinedValue codeStream generateConstant implicitConversion codeStream recordPositionsFrom sourceStart
code Stream record Positions From pc this source Start public Type Binding literal Type Block Scope scope return Char Binding  codeStream recordPositionsFrom sourceStart TypeBinding literalType BlockScope CharBinding
return Char Binding public void traverse AST Visitor visitor Block Scope block Scope visitor visit this block Scope visitor end Visit this block Scope  CharBinding ASTVisitor BlockScope blockScope blockScope endVisit blockScope

public Class Literal Access int source End Type Reference t type t this source Start t source Start this source End source End  ClassLiteralAccess sourceEnd TypeReference sourceStart sourceStart sourceEnd sourceEnd
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info if reachable request the addition of a synthetic field for caching the class descriptor Source Type Binding source Type current Scope outer Most Method Scope enclosing Source Type if source Type is Interface no field generated in interface case would nt verify see 1FHHEZL source Type is Base Type synthetic Field source Type add Synthetic Field target Type current Scope return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo SourceTypeBinding sourceType currentScope outerMostMethodScope enclosingSourceType sourceType isInterface sourceType isBaseType syntheticField sourceType addSyntheticField targetType currentScope flowInfo
Message Send Dot Class code generation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position in interface case no caching occurs since cannot make a cache field for interface if value Required code Stream generate Class Literal Access For Type type resolved Type synthetic Field code Stream record Positions From pc this source Start  MessageSendDotClass currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream valueRequired codeStream generateClassLiteralAccessForType resolvedType syntheticField codeStream recordPositionsFrom sourceStart
public String Buffer print Expression int indent String Buffer output return type print 0 output append class NON NLS 1  StringBuffer printExpression StringBuffer
public Type Binding resolve Type Block Scope scope constant NotA Constant if target Type type resolve Type scope null return null if target Type is Array Type Array Binding target Type leaf Component Type Void Binding scope problem Reporter cannot Allocate Void Array this return null return this resolved Type scope get Java Lang Class  TypeBinding resolveType BlockScope NotAConstant targetType resolveType targetType isArrayType ArrayBinding targetType leafComponentType VoidBinding problemReporter cannotAllocateVoidArray resolvedType getJavaLangClass
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope type traverse visitor block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope blockScope endVisit blockScope

public Clinit Compilation Result compilation Result super compilation Result modifiers 0 selector Constant Pool Name  CompilationResult compilationResult compilationResult ConstantPoolName
public void analyse Code Class Scope class Scope Initialization Flow Context static Initializer Flow Context Flow Info flow Info if ignore Further Investigation return try Exception Handling Flow Context clinit Context new Exception Handling Flow Context static Initializer Flow Context parent this No Exceptions scope Flow Info DEAD END check for missing returning path this need Free Return flow Info is Reachable check missing blank final field initializations flow Info flow Info merged With static Initializer Flow Context inits On Return Field Binding fields scope enclosing Source Type fields for int i 0 count fields length i count i Field Binding field if field fields i is Static field is Final flow Info is Definitely Assigned fields i scope problem Reporter uninitialized Blank Final Field field scope reference Type declaration Of field can complain against the field decl since only one clinit check static initializers thrown exceptions static Initializer Flow Context check Initializer Exceptions scope clinit Context flow Info catch Abort Method e this ignore Further Investigation true  analyseCode ClassScope classScope InitializationFlowContext staticInitializerFlowContext FlowInfo flowInfo ignoreFurtherInvestigation ExceptionHandlingFlowContext clinitContext ExceptionHandlingFlowContext staticInitializerFlowContext NoExceptions FlowInfo DEAD_END needFreeReturn flowInfo isReachable flowInfo flowInfo mergedWith staticInitializerFlowContext initsOnReturn FieldBinding enclosingSourceType FieldBinding isStatic isFinal flowInfo isDefinitelyAssigned problemReporter uninitializedBlankFinalField referenceType declarationOf staticInitializerFlowContext checkInitializerExceptions clinitContext flowInfo AbortMethod ignoreFurtherInvestigation
Bytecode generation for a clinit method param class Scope org eclipse jdt internal compiler lookup Class Scope param class File org eclipse jdt internal compiler codegen Class File public void generate Code Class Scope class Scope Class File class File int clinit Offset 0 if ignore Further Investigation should never have to add any clinit problem method return try clinit Offset class File contents Offset this generate Code class Scope class File clinit Offset catch Abort Method e should never occur the clinit reference Context is the type declaration All clinit problems will be reported against the type Abort Type instead of Abort Method reset the contents Offset to the value before generating the clinit code decrement the number of method info as well This is done in the add Problem Method and add Problem Constructor for other cases if e compilation Result Code Stream RESTART IN WIDE MODE a branch target required a goto w restart code gen in wide mode try class File contents Offset clinit Offset class File method Count class File code Stream wide Mode true request wide mode this generate Code class Scope class File clinit Offset restart method generation catch Abort Method e2 class File contents Offset clinit Offset class File method Count else produce a problem method accounting for this fatal error class File contents Offset clinit Offset class File method Count  classScope ClassScope classFile ClassFile generateCode ClassScope classScope ClassFile classFile clinitOffset ignoreFurtherInvestigation clinitOffset classFile contentsOffset generateCode classScope classFile clinitOffset AbortMethod referenceContext AbortType AbortMethod contentsOffset addProblemMethod addProblemConstructor compilationResult CodeStream RESTART_IN_WIDE_MODE goto_w classFile contentsOffset clinitOffset classFile methodCount classFile codeStream wideMode generateCode classScope classFile clinitOffset AbortMethod classFile contentsOffset clinitOffset classFile methodCount classFile contentsOffset clinitOffset classFile methodCount
Bytecode generation for a clinit method param class Scope org eclipse jdt internal compiler lookup Class Scope param class File org eclipse jdt internal compiler codegen Class File private void generate Code Class Scope class Scope Class File class File int clinit Offset Constant Pool constant Pool class File constant Pool int constant Pool Offset constant Pool current Offset int constant Pool Index constant Pool current Index class File generate Method Info Header For Clinit int code Attribute Offset class File contents Offset class File generate Code Attribute Header Code Stream code Stream class File code Stream this resolve class Scope code Stream reset this class File Type Declaration declaring Type class Scope reference Context initialize local positions including initializer scope Method Scope static Initializer Scope declaring Type static Initializer Scope static Initializer Scope compute Local Variable Positions 0 code Stream 1 4 feature This has to be done before any other initialization if this assertion Synthetic Field Binding null generate code related to the activation of assertion for this class code Stream generate Class Literal Access For Type class Scope enclosing Source Type class Literal Synthetic Field code Stream invoke Java Lang Class Desired Assertion Status Label false Label new Label code Stream code Stream ifne false Label code Stream iconst 1 Label jump Label new Label code Stream code Stream goto  jump Label false Label place code Stream iconst 0 jump Label place code Stream putstatic this assertion Synthetic Field Binding generate initializers if declaring Type fields null for int i 0 max declaring Type fields length i max i Field Declaration field Decl if field Decl declaring Type fields i is Static field Decl generate Code static Initializer Scope code Stream if code Stream position 0 do not need to output a Clinit if no bytecodes so we reset the offset inside the byte array contents class File contents Offset clinit Offset like we don t addd a method we need to undo the increment on the method count class File method Count reset the constant pool to its state before the clinit constant Pool reset For Clinit constant Pool Index constant Pool Offset else if this need Free Return int old Position code Stream position code Stream return  code Stream update Local Variables Attribute old Position Record the end of the clinit point to the declaration of the class code Stream record Positions From 0 declaring Type source Start class File complete Code Attribute For Clinit code Attribute Offset  classScope ClassScope classFile ClassFile generateCode ClassScope classScope ClassFile classFile clinitOffset ConstantPool constantPool classFile constantPool constantPoolOffset constantPool currentOffset constantPoolIndex constantPool currentIndex classFile generateMethodInfoHeaderForClinit codeAttributeOffset classFile contentsOffset classFile generateCodeAttributeHeader CodeStream codeStream classFile codeStream classScope codeStream classFile TypeDeclaration declaringType classScope referenceContext MethodScope staticInitializerScope declaringType staticInitializerScope staticInitializerScope computeLocalVariablePositions codeStream assertionSyntheticFieldBinding codeStream generateClassLiteralAccessForType classScope enclosingSourceType classLiteralSyntheticField codeStream invokeJavaLangClassDesiredAssertionStatus falseLabel codeStream codeStream falseLabel codeStream iconst_1 jumpLabel codeStream codeStream goto_ jumpLabel falseLabel codeStream iconst_0 jumpLabel codeStream assertionSyntheticFieldBinding declaringType declaringType FieldDeclaration fieldDecl fieldDecl declaringType isStatic fieldDecl generateCode staticInitializerScope codeStream codeStream classFile contentsOffset clinitOffset classFile methodCount constantPool resetForClinit constantPoolIndex constantPoolOffset needFreeReturn oldPosition codeStream codeStream return_ codeStream updateLocalVariablesAttribute oldPosition codeStream recordPositionsFrom declaringType sourceStart classFile completeCodeAttributeForClinit codeAttributeOffset
public boolean is Clinit return true  isClinit
public boolean is Initialization Method return true  isInitializationMethod
public boolean is Static return true  isStatic
public void parse Statements Parser parser Compilation Unit Declaration unit the clinit is filled by hand  parseStatements CompilationUnitDeclaration
public String Buffer print int tab String Buffer output print Indent tab output append clinit NON NLS 1 print Body tab 1 output return output  StringBuffer StringBuffer printIndent printBody
public void resolve Class Scope class Scope this scope new Method Scope class Scope class Scope reference Context true  ClassScope classScope MethodScope classScope classScope referenceContext
public void traverse AST Visitor visitor Class Scope class Scope visitor visit this class Scope visitor end Visit this class Scope  ASTVisitor ClassScope classScope classScope endVisit classScope
1 4 feature public void set Assertion Support Field Binding assertion Synthetic Field Binding this assertion Synthetic Field Binding assertion Synthetic Field Binding we need to add the field right now because the field infos are generated before the methods Source Type Binding source Type this scope outer Most Method Scope enclosing Source Type this class Literal Synthetic Field source Type add Synthetic Field source Type scope  setAssertionSupport FieldBinding assertionSyntheticFieldBinding assertionSyntheticFieldBinding assertionSyntheticFieldBinding SourceTypeBinding sourceType outerMostMethodScope enclosingSourceType classLiteralSyntheticField sourceType addSyntheticField sourceType

public Compilation Unit Declaration Problem Reporter problem Reporter Compilation Result compilation Result int source Length this problem Reporter problem Reporter this compilation Result compilation Result by definition of a compilation unit source Start 0 source End source Length 1  CompilationUnitDeclaration ProblemReporter problemReporter CompilationResult compilationResult sourceLength problemReporter problemReporter compilationResult compilationResult sourceStart sourceEnd sourceLength
public void abort int abort Level I Problem problem switch abort Level case Abort Type throw new Abort Type this compilation Result problem case Abort Method throw new Abort Method this compilation Result problem default throw new Abort Compilation Unit this compilation Result problem  abortLevel IProblem abortLevel AbortType AbortType compilationResult AbortMethod AbortMethod compilationResult AbortCompilationUnit compilationResult
public void analyse Code if ignore Further Investigation return try if types null for int i 0 count types length i count i types i analyse Code scope request inner emulation propagation propagate Inner Emulation For All Local Types catch Abort Compilation Unit e this ignore Further Investigation true return  analyseCode ignoreFurtherInvestigation analyseCode propagateInnerEmulationForAllLocalTypes AbortCompilationUnit ignoreFurtherInvestigation
public void clean Up if this types null for int i 0 max this types length i max i clean Up this types i for int i 0 max this local Type Count i max i Local Type Binding local Type local Types i null out the type s scope backpointers local Type scope null local members are already in the list Class File class Files compilation Result get Class Files for int i 0 max class Files length i max i clear the class File back pointer to the bindings Class File class File class Files i null out the classfile backpointer to a type binding class File reference Binding null class File code Stream null code Stream holds onto ast and scopes class File inner Classes Bindings null  cleanUp cleanUp localTypeCount LocalTypeBinding localType localTypes localType ClassFile classFiles compilationResult getClassFiles classFiles classFile ClassFile classFile classFiles classFile referenceBinding classFile codeStream codeStream classFile innerClassesBindings
private void clean Up Type Declaration type if type member Types null for int i 0 max type member Types length i max i clean Up type member Types i if type binding null null out the type s scope backpointers type binding scope null  cleanUp TypeDeclaration memberTypes memberTypes cleanUp memberTypes
public void check Unused Imports if this scope imports null for int i 0 max this scope imports length i max i Import Binding import Binding this scope imports i Import Reference import Reference import Binding reference if import Reference null import Reference used scope problem Reporter unused Import import Reference  checkUnusedImports ImportBinding importBinding ImportReference importReference importBinding importReference importReference problemReporter unusedImport importReference
public Compilation Result compilation Result return compilation Result  CompilationResult compilationResult compilationResult
public Type Declaration declaration Of Type char type Name for int i 0 i this types length i Type Declaration type Decl this types i declaration Of Type type Name if type Decl null return type Decl return null  TypeDeclaration declarationOfType typeName TypeDeclaration typeDecl declarationOfType typeName typeDecl typeDecl
Bytecode generation public void generate Code if ignore Further Investigation if types null for int i 0 count types length i count i types i ignore Further Investigation true propagate the flag to request problem type creation types i generate Code scope return try if types null for int i 0 count types length i count i types i generate Code scope catch Abort Compilation Unit e ignore  generateCode ignoreFurtherInvestigation ignoreFurtherInvestigation generateCode generateCode AbortCompilationUnit
public char get File Name return compilation Result get File Name  getFileName compilationResult getFileName
public char get Main Type Name if compilation Result compilation Unit null char file Name compilation Result get File Name int start Char Operation last Index Of file Name 1 if start 0 start Char Operation last Index Of file Name start Char Operation last Index Of file Name 1 int end Char Operation last Index Of file Name if end 1 end file Name length return Char Operation subarray file Name start end else return compilation Result compilation Unit get Main Type Name  getMainTypeName compilationResult compilationUnit fileName compilationResult getFileName CharOperation lastIndexOf fileName CharOperation lastIndexOf fileName CharOperation lastIndexOf fileName CharOperation lastIndexOf fileName fileName CharOperation fileName compilationResult compilationUnit getMainTypeName
public boolean is Empty return current Package null imports null types null  isEmpty currentPackage
public boolean has Errors return this ignore Further Investigation  hasErrors ignoreFurtherInvestigation
public String Buffer print int indent String Buffer output if current Package null print Indent indent output append package NON NLS 1 current Package print 0 output false append n NON NLS 1 if imports null for int i 0 i imports length i print Indent indent output append import NON NLS 1 imports i print 0 output append n NON NLS 1 if types null for int i 0 i types length i types i print indent output append n NON NLS 1 return output  StringBuffer StringBuffer currentPackage printIndent currentPackage printIndent
public void propagate Inner Emulation For All Local Types is Propagating Inner Class Emulation true for int i 0 max this local Type Count i max i Local Type Binding local Type local Types i only propagate for reachable local types if local Type scope reference Type bits Is ReachableMASK 0 local Type update Inner Emulation Dependents  propagateInnerEmulationForAllLocalTypes isPropagatingInnerClassEmulation localTypeCount LocalTypeBinding localType localTypes localType referenceType IsReachableMASK localType updateInnerEmulationDependents
public void record Local Type Binding local Type if this local Type Count 0 this local Types new Local Type Binding 5 else if this local Type Count this local Types length System arraycopy this local Types 0 this local Types new Local Type Binding this local Type Count 2 0 this local Type Count this local Types this local Type Count local Type  LocalTypeBinding localType localTypeCount localTypes LocalTypeBinding localTypeCount localTypes localTypes localTypes LocalTypeBinding localTypeCount localTypeCount localTypes localTypeCount localType
public void resolve try if types null for int i 0 count types length i count i types i resolve scope if this compilation Result has Syntax Error check Unused Imports catch Abort Compilation Unit e this ignore Further Investigation true return  compilationResult hasSyntaxError checkUnusedImports AbortCompilationUnit ignoreFurtherInvestigation
public void tag As Having Errors ignore Further Investigation true  tagAsHavingErrors ignoreFurtherInvestigation
public void traverse AST Visitor visitor Compilation Unit Scope unit Scope if ignore Further Investigation return try if visitor visit this this scope if current Package null current Package traverse visitor this scope if imports null int import Length imports length for int i 0 i import Length i imports i traverse visitor this scope if types null int types Length types length for int i 0 i types Length i types i traverse visitor this scope visitor end Visit this this scope catch Abort Compilation Unit e ignore  ASTVisitor CompilationUnitScope unitScope ignoreFurtherInvestigation currentPackage currentPackage importLength importLength typesLength typesLength endVisit AbortCompilationUnit

public Compound Assignment Expression lhs Expression expression int operator int source End lhs is always a reference by construction but is build as an expression the checkcast cannot fail super lhs expression source End lhs bits Is Strictly AssignedMASK tag lhs as NON assigned it is also a read access lhs bits Is Compound AssignedMASK tag lhs as assigned by compound this operator operator  CompoundAssignment sourceEnd sourceEnd IsStrictlyAssignedMASK IsCompoundAssignedMASK
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info record setting a variable various scenarii are possible setting an array reference a field reference a blank final field reference a field of an enclosing instance or just a local variable return Reference lhs analyse Assignment current Scope flow Context flow Info this true unconditional Inits  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo analyseAssignment currentScope flowContext flowInfo unconditionalInits
public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required various scenarii are possible setting an array reference a field reference a blank final field reference a field of an enclosing instance or just a local variable int pc code Stream position Reference lhs generate Compound Assignment current Scope code Stream expression operator assignment Implicit Conversion value Required if value Required code Stream generate Implicit Conversion implicit Conversion code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream generateCompoundAssignment currentScope codeStream assignmentImplicitConversion valueRequired valueRequired codeStream generateImplicitConversion implicitConversion codeStream recordPositionsFrom sourceStart
public String operator To String switch operator case PLUS return NON NLS 1 case MINUS return NON NLS 1 case MULTIPLY return NON NLS 1 case DIVIDE return NON NLS 1 case AND return NON NLS 1 case OR return NON NLS 1 case XOR return NON NLS 1 case REMAINDER return NON NLS 1 case LEFT SHIFT return NON NLS 1 case RIGHT SHIFT return NON NLS 1 case UNSIGNED RIGHT SHIFT return NON NLS 1 return unknown operator NON NLS 1  operatorToString LEFT_SHIFT RIGHT_SHIFT UNSIGNED_RIGHT_SHIFT
public String Buffer print Expression No Parenthesis int indent String Buffer output lhs print Expression indent output append append operator To String append return expression print Expression 0 output  StringBuffer printExpressionNoParenthesis StringBuffer printExpression operatorToString printExpression
public Type Binding resolve Type Block Scope scope constant NotA Constant if this lhs instanceof Reference this lhs is This scope problem Reporter expression Should BeA Variable this lhs return null Type Binding lhs Type lhs resolve Type scope Type Binding expression Type expression resolve Type scope if lhs Type null expression Type null return null int lhs Id lhs Type id int expression Id expression Type id if restrain Usage To Numeric Types lhs Type is Numeric Type scope problem Reporter operator Only Valid On Numeric Type this lhs Type expression Type return null if lhs Id 15 expression Id 15 if lhs Id T String String Thread is valid whereas Thread String is not scope problem Reporter invalid Operator this lhs Type expression Type return null expression Id T Object use the Object has tag table the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 0 the conversion is stored INTO the reference info needed for the code gen int result Operator Expression Operator Signatures operator lhs Id 4 expression Id if result T undefined scope problem Reporter invalid Operator this lhs Type expression Type return null if operator PLUS if lhs Id T JavaLangObject Object String is illegal 39248 scope problem Reporter invalid Operator this lhs Type expression Type return null else int boolean String is illegal if lhs Type is Numeric Type lhs Id T boolean expression Type is Numeric Type scope problem Reporter invalid Operator this lhs Type expression Type return null lhs implicit Conversion result 12 expression implicit Conversion result 4 0x000FF assignment Implicit Conversion lhs Id 4 result 0x0000F return this resolved Type lhs Type  TypeBinding resolveType BlockScope NotAConstant isThis problemReporter expressionShouldBeAVariable TypeBinding lhsType resolveType TypeBinding expressionType resolveType lhsType expressionType lhsId lhsType expressionId expressionType restrainUsageToNumericTypes lhsType isNumericType problemReporter operatorOnlyValidOnNumericType lhsType expressionType lhsId expressionId lhsId T_String problemReporter invalidOperator lhsType expressionType expressionId T_Object OperatorExpression OperatorSignatures lhsId expressionId T_undefined problemReporter invalidOperator lhsType expressionType lhsId T_JavaLangObject problemReporter invalidOperator lhsType expressionType lhsType isNumericType lhsId T_boolean expressionType isNumericType problemReporter invalidOperator lhsType expressionType implicitConversion implicitConversion assignmentImplicitConversion lhsId resolvedType lhsType
public boolean restrain Usage To Numeric Types return false  restrainUsageToNumericTypes
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope lhs traverse visitor scope expression traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

public Conditional Expression Expression condition Expression value If True Expression value If False this condition condition this value If True value If True this value If False value If False source Start condition source Start source End value If False source End  ConditionalExpression valueIfTrue valueIfFalse valueIfTrue valueIfTrue valueIfFalse valueIfFalse sourceStart sourceStart sourceEnd valueIfFalse sourceEnd
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info Constant cst this condition optimized Boolean Constant boolean is Condition Optimized True cst NotA Constant cst boolean Value true boolean is Condition Optimized False cst NotA Constant cst boolean Value false int mode flow Info reach Mode flow Info condition analyse Code current Scope flow Context flow Info cst NotA Constant process the if true part Flow Info true Flow Info flow Info inits When True copy if is Condition Optimized False true Flow Info set Reach Mode Flow Info UNREACHABLE true Init State Index current Scope method Scope record Initialization States true Flow Info true Flow Info value If True analyse Code current Scope flow Context true Flow Info process the if false part Flow Info false Flow Info flow Info inits When False copy if is Condition Optimized True false Flow Info set Reach Mode Flow Info UNREACHABLE false Init State Index current Scope method Scope record Initialization States false Flow Info false Flow Info value If False analyse Code current Scope flow Context false Flow Info merge if true if false initializations Flow Info merged Info if is Condition Optimized True merged Info true Flow Info add Potential Initializations From false Flow Info else if is Condition Optimized False merged Info false Flow Info add Potential Initializations From true Flow Info else if t v t t t v f r v ok cst this optimized If True Constant boolean is Value If True Optimized True cst null cst NotA Constant cst boolean Value true boolean is Value If True Optimized False cst null cst NotA Constant cst boolean Value false cst this optimized If False Constant boolean is Value If False Optimized True cst null cst NotA Constant cst boolean Value true boolean is Value If False Optimized False cst null cst NotA Constant cst boolean Value false Unconditional Flow Info true Info When True true Flow Info inits When True copy unconditional Inits if is Value If True Optimized False true Info When True set Reach Mode Flow Info UNREACHABLE Unconditional Flow Info false Info When True false Flow Info inits When True copy unconditional Inits if is Value If False Optimized False false Info When True set Reach Mode Flow Info UNREACHABLE Unconditional Flow Info true Info When False true Flow Info inits When False copy unconditional Inits if is Value If True Optimized True true Info When False set Reach Mode Flow Info UNREACHABLE Unconditional Flow Info false Info When False false Flow Info inits When False copy unconditional Inits if is Value If False Optimized True false Info When False set Reach Mode Flow Info UNREACHABLE merged Info Flow Info conditional true Info When True merged With false Info When True true Info When False merged With false Info When False merged Init State Index current Scope method Scope record Initialization States merged Info merged Info set Reach Mode mode return merged Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo optimizedBooleanConstant isConditionOptimizedTrue NotAConstant booleanValue isConditionOptimizedFalse NotAConstant booleanValue flowInfo reachMode flowInfo analyseCode currentScope flowContext flowInfo NotAConstant FlowInfo trueFlowInfo flowInfo initsWhenTrue isConditionOptimizedFalse trueFlowInfo setReachMode FlowInfo trueInitStateIndex currentScope methodScope recordInitializationStates trueFlowInfo trueFlowInfo valueIfTrue analyseCode currentScope flowContext trueFlowInfo FlowInfo falseFlowInfo flowInfo initsWhenFalse isConditionOptimizedTrue falseFlowInfo setReachMode FlowInfo falseInitStateIndex currentScope methodScope recordInitializationStates falseFlowInfo falseFlowInfo valueIfFalse analyseCode currentScope flowContext falseFlowInfo FlowInfo mergedInfo isConditionOptimizedTrue mergedInfo trueFlowInfo addPotentialInitializationsFrom falseFlowInfo isConditionOptimizedFalse mergedInfo falseFlowInfo addPotentialInitializationsFrom trueFlowInfo optimizedIfTrueConstant isValueIfTrueOptimizedTrue NotAConstant booleanValue isValueIfTrueOptimizedFalse NotAConstant booleanValue optimizedIfFalseConstant isValueIfFalseOptimizedTrue NotAConstant booleanValue isValueIfFalseOptimizedFalse NotAConstant booleanValue UnconditionalFlowInfo trueInfoWhenTrue trueFlowInfo initsWhenTrue unconditionalInits isValueIfTrueOptimizedFalse trueInfoWhenTrue setReachMode FlowInfo UnconditionalFlowInfo falseInfoWhenTrue falseFlowInfo initsWhenTrue unconditionalInits isValueIfFalseOptimizedFalse falseInfoWhenTrue setReachMode FlowInfo UnconditionalFlowInfo trueInfoWhenFalse trueFlowInfo initsWhenFalse unconditionalInits isValueIfTrueOptimizedTrue trueInfoWhenFalse setReachMode FlowInfo UnconditionalFlowInfo falseInfoWhenFalse falseFlowInfo initsWhenFalse unconditionalInits isValueIfFalseOptimizedTrue falseInfoWhenFalse setReachMode FlowInfo mergedInfo FlowInfo trueInfoWhenTrue mergedWith falseInfoWhenTrue trueInfoWhenFalse mergedWith falseInfoWhenFalse mergedInitStateIndex currentScope methodScope recordInitializationStates mergedInfo mergedInfo setReachMode mergedInfo
Code generation for the conditional operator param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position Label endif Label false Label if constant NotA Constant if value Required code Stream generate Constant constant implicit Conversion code Stream record Positions From pc this source Start return Constant cst condition constant Constant cond Cst condition optimized Boolean Constant boolean need True Part cst NotA Constant cst boolean Value false cond Cst NotA Constant cond Cst boolean Value false boolean need False Part cst NotA Constant cst boolean Value true cond Cst NotA Constant cond Cst boolean Value true endif Label new Label code Stream Generate code for the condition boolean need Condition Value cst NotA Constant cond Cst NotA Constant condition generate Optimized Boolean current Scope code Stream null false Label new Label code Stream need Condition Value if true Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope true Init State Index code Stream add Definitely Assigned Variables current Scope true Init State Index Then code generation if need True Part value If True generate Code current Scope code Stream value Required if need False Part Jump over the else part int position code Stream position code Stream goto  endif Label code Stream update Last Recorded EndPC position Tune codestream stack size if value Required code Stream decr Stack Size this resolved Type Long Binding this resolved Type Double Binding 2 1 if need False Part false Label place if false Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope false Init State Index code Stream add Definitely Assigned Variables current Scope false Init State Index value If False generate Code current Scope code Stream value Required End of if statement endif Label place May loose some local variable initializations affecting the local variable attributes if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index implicit conversion if value Required code Stream generate Implicit Conversion implicit Conversion code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream endifLabel falseLabel NotAConstant valueRequired codeStream generateConstant implicitConversion codeStream recordPositionsFrom sourceStart condCst optimizedBooleanConstant needTruePart NotAConstant booleanValue condCst NotAConstant condCst booleanValue needFalsePart NotAConstant booleanValue condCst NotAConstant condCst booleanValue endifLabel codeStream needConditionValue NotAConstant condCst NotAConstant generateOptimizedBoolean currentScope codeStream falseLabel codeStream needConditionValue trueInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope trueInitStateIndex codeStream addDefinitelyAssignedVariables currentScope trueInitStateIndex needTruePart valueIfTrue generateCode currentScope codeStream valueRequired needFalsePart codeStream codeStream goto_ endifLabel codeStream updateLastRecordedEndPC valueRequired codeStream decrStackSize resolvedType LongBinding resolvedType DoubleBinding needFalsePart falseLabel falseInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope falseInitStateIndex codeStream addDefinitelyAssignedVariables currentScope falseInitStateIndex valueIfFalse generateCode currentScope codeStream valueRequired endifLabel mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex valueRequired codeStream generateImplicitConversion implicitConversion codeStream recordPositionsFrom sourceStart
Optimized boolean code generation for the conditional operator public void generate Optimized Boolean Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required if constant Constant NotA Constant constant typeID T boolean constant value If True implicit Conversion 4 T boolean non boolean values super generate Optimized Boolean current Scope code Stream true Label false Label value Required return Constant cst condition constant Constant cond Cst condition optimized Boolean Constant boolean need True Part cst NotA Constant cst boolean Value false cond Cst NotA Constant cond Cst boolean Value false boolean need False Part cst NotA Constant cst boolean Value true cond Cst NotA Constant cond Cst boolean Value true Label internal False Label endif Label new Label code Stream Generate code for the condition boolean need Condition Value cst NotA Constant cond Cst NotA Constant condition generate Optimized Boolean current Scope code Stream null internal False Label new Label code Stream need Condition Value if true Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope true Init State Index code Stream add Definitely Assigned Variables current Scope true Init State Index Then code generation if need True Part value If True generate Optimized Boolean current Scope code Stream true Label false Label value Required if need False Part Jump over the else part int position code Stream position code Stream goto  endif Label code Stream update Last Recorded EndPC position No need to decrement codestream stack size since value If True was already consumed by branch bytecode if need False Part internal False Label place if false Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope false Init State Index code Stream add Definitely Assigned Variables current Scope false Init State Index value If False generate Optimized Boolean current Scope code Stream true Label false Label value Required End of if statement endif Label place May loose some local variable initializations affecting the local variable attributes if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index no implicit conversion for boolean values code Stream update Last Recorded EndPC code Stream position  generateOptimizedBoolean BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired NotAConstant T_boolean valueIfTrue implicitConversion T_boolean generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired condCst optimizedBooleanConstant needTruePart NotAConstant booleanValue condCst NotAConstant condCst booleanValue needFalsePart NotAConstant booleanValue condCst NotAConstant condCst booleanValue internalFalseLabel endifLabel codeStream needConditionValue NotAConstant condCst NotAConstant generateOptimizedBoolean currentScope codeStream internalFalseLabel codeStream needConditionValue trueInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope trueInitStateIndex codeStream addDefinitelyAssignedVariables currentScope trueInitStateIndex needTruePart valueIfTrue generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired needFalsePart codeStream codeStream goto_ endifLabel codeStream updateLastRecordedEndPC valueIfTrue needFalsePart internalFalseLabel falseInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope falseInitStateIndex codeStream addDefinitelyAssignedVariables currentScope falseInitStateIndex valueIfFalse generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired endifLabel mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex codeStream updateLastRecordedEndPC codeStream
public Constant optimized Boolean Constant return this optimized Boolean Constant null this constant this optimized Boolean Constant  optimizedBooleanConstant optimizedBooleanConstant optimizedBooleanConstant
public String Buffer print Expression No Parenthesis int indent String Buffer output condition print Expression indent output append NON NLS 1 value If True print Expression 0 output append NON NLS 1 return value If False print Expression 0 output  StringBuffer printExpressionNoParenthesis StringBuffer printExpression valueIfTrue printExpression valueIfFalse printExpression
public Type Binding resolve Type Block Scope scope specs p 368 constant NotA Constant Type Binding condition Type condition resolve Type Expecting scope Boolean Binding if value If True instanceof Cast Expression value If True bits Ignore Need For Cast CheckMASK will check later on Type Binding value If True Type value If True resolve Type scope if value If False instanceof Cast Expression value If False bits Ignore Need For Cast CheckMASK will check later on Type Binding value If False Type value If False resolve Type scope if condition Type null value If True Type null value If False Type null return null Propagate the constant value from the value If True and valueIF False expression if it is possible Constant cond Constant true Constant false Constant if cond Constant condition constant NotA Constant true Constant value If True constant NotA Constant false Constant value If False constant NotA Constant all terms are constant expression so we can propagate the constant from valueIF True or value If False to teh receiver constant constant cond Constant boolean Value true Constant false Constant if value If True Type value If False Type harmed the implicit conversion value If True implicit Widening value If True Type value If True Type value If False implicit Conversion value If True implicit Conversion if value If True Type Boolean Binding this optimized If True Constant value If True optimized Boolean Constant this optimized If False Constant value If False optimized Boolean Constant if this optimized If True Constant NotA Constant this optimized If False Constant NotA Constant this optimized If True Constant boolean Value this optimized If False Constant boolean Value a true true a false false this optimized Boolean Constant optimized If True Constant else if cond Constant condition optimized Boolean Constant NotA Constant Propagate the optimized boolean constant if possible this optimized Boolean Constant cond Constant boolean Value this optimized If True Constant this optimized If False Constant return this resolved Type value If True Type Determine the return type depending on argument types Numeric types if value If True Type is Numeric Type value If False Type is Numeric Type Short x Byte or Byte x Short if value If True Type Byte Binding value If False Type Short Binding value If True Type Short Binding value If False Type Byte Binding value If True implicit Widening Short Binding value If True Type value If False implicit Widening Short Binding value If False Type return this resolved Type Short Binding Byte Short Char x constant Int Byte Short Char and reciprocally if value If True Type Byte Binding value If True Type Short Binding value If True Type Char Binding value If False Type Int Binding value If False is Constant Value Of Type Assignable To Type value If False Type value If True Type value If True implicit Widening value If True Type value If True Type value If False implicit Widening value If True Type value If False Type return this resolved Type value If True Type if value If False Type Byte Binding value If False Type Short Binding value If False Type Char Binding value If True Type Int Binding value If True is Constant Value Of Type Assignable To Type value If True Type value If False Type value If True implicit Widening value If False Type value If True Type value If False implicit Widening value If False Type value If False Type return this resolved Type value If False Type Manual binary numeric promotion int if Base Type Binding is Narrowing value If True Type id T int Base Type Binding is Narrowing value If False Type id T int value If True implicit Widening Int Binding value If True Type value If False implicit Widening Int Binding value If False Type return this resolved Type Int Binding long if Base Type Binding is Narrowing value If True Type id T long Base Type Binding is Narrowing value If False Type id T long value If True implicit Widening Long Binding value If True Type value If False implicit Widening Long Binding value If False Type return this resolved Type Long Binding float if Base Type Binding is Narrowing value If True Type id T float Base Type Binding is Narrowing value If False Type id T float value If True implicit Widening Float Binding value If True Type value If False implicit Widening Float Binding value If False Type return this resolved Type Float Binding double value If True implicit Widening Double Binding value If True Type value If False implicit Widening Double Binding value If False Type return this resolved Type Double Binding Type references null null is already tested if value If True Type is Base Type value If True Type Null Binding value If False Type is Base Type value If False Type Null Binding scope problem Reporter conditional Arguments Incompatible Types this value If True Type value If False Type return null if value If False Type is Compatible With value If True Type value If True implicit Widening value If True Type value If True Type value If False implicit Widening value If True Type value If False Type return this resolved Type value If True Type if value If True Type is Compatible With value If False Type value If True implicit Widening value If False Type value If True Type value If False implicit Widening value If False Type value If False Type return this resolved Type value If False Type scope problem Reporter conditional Arguments Incompatible Types this value If True Type value If False Type return null  TypeBinding resolveType BlockScope NotAConstant TypeBinding conditionType resolveTypeExpecting BooleanBinding valueIfTrue CastExpression valueIfTrue IgnoreNeedForCastCheckMASK TypeBinding valueIfTrueType valueIfTrue resolveType valueIfFalse CastExpression valueIfFalse IgnoreNeedForCastCheckMASK TypeBinding valueIfFalseType valueIfFalse resolveType conditionType valueIfTrueType valueIfFalseType valueIfTrue valueIFFalse condConstant trueConstant falseConstant condConstant NotAConstant trueConstant valueIfTrue NotAConstant falseConstant valueIfFalse NotAConstant valueIFTrue valueIfFalse condConstant booleanValue trueConstant falseConstant valueIfTrueType valueIfFalseType valueIfTrue implicitWidening valueIfTrueType valueIfTrueType valueIfFalse implicitConversion valueIfTrue implicitConversion valueIfTrueType BooleanBinding optimizedIfTrueConstant valueIfTrue optimizedBooleanConstant optimizedIfFalseConstant valueIfFalse optimizedBooleanConstant optimizedIfTrueConstant NotAConstant optimizedIfFalseConstant NotAConstant optimizedIfTrueConstant booleanValue optimizedIfFalseConstant booleanValue optimizedBooleanConstant optimizedIfTrueConstant condConstant optimizedBooleanConstant NotAConstant optimizedBooleanConstant condConstant booleanValue optimizedIfTrueConstant optimizedIfFalseConstant resolvedType valueIfTrueType valueIfTrueType isNumericType valueIfFalseType isNumericType valueIfTrueType ByteBinding valueIfFalseType ShortBinding valueIfTrueType ShortBinding valueIfFalseType ByteBinding valueIfTrue implicitWidening ShortBinding valueIfTrueType valueIfFalse implicitWidening ShortBinding valueIfFalseType resolvedType ShortBinding valueIfTrueType ByteBinding valueIfTrueType ShortBinding valueIfTrueType CharBinding valueIfFalseType IntBinding valueIfFalse isConstantValueOfTypeAssignableToType valueIfFalseType valueIfTrueType valueIfTrue implicitWidening valueIfTrueType valueIfTrueType valueIfFalse implicitWidening valueIfTrueType valueIfFalseType resolvedType valueIfTrueType valueIfFalseType ByteBinding valueIfFalseType ShortBinding valueIfFalseType CharBinding valueIfTrueType IntBinding valueIfTrue isConstantValueOfTypeAssignableToType valueIfTrueType valueIfFalseType valueIfTrue implicitWidening valueIfFalseType valueIfTrueType valueIfFalse implicitWidening valueIfFalseType valueIfFalseType resolvedType valueIfFalseType BaseTypeBinding isNarrowing valueIfTrueType T_int BaseTypeBinding isNarrowing valueIfFalseType T_int valueIfTrue implicitWidening IntBinding valueIfTrueType valueIfFalse implicitWidening IntBinding valueIfFalseType resolvedType IntBinding BaseTypeBinding isNarrowing valueIfTrueType T_long BaseTypeBinding isNarrowing valueIfFalseType T_long valueIfTrue implicitWidening LongBinding valueIfTrueType valueIfFalse implicitWidening LongBinding valueIfFalseType resolvedType LongBinding BaseTypeBinding isNarrowing valueIfTrueType T_float BaseTypeBinding isNarrowing valueIfFalseType T_float valueIfTrue implicitWidening FloatBinding valueIfTrueType valueIfFalse implicitWidening FloatBinding valueIfFalseType resolvedType FloatBinding valueIfTrue implicitWidening DoubleBinding valueIfTrueType valueIfFalse implicitWidening DoubleBinding valueIfFalseType resolvedType DoubleBinding valueIfTrueType isBaseType valueIfTrueType NullBinding valueIfFalseType isBaseType valueIfFalseType NullBinding problemReporter conditionalArgumentsIncompatibleTypes valueIfTrueType valueIfFalseType valueIfFalseType isCompatibleWith valueIfTrueType valueIfTrue implicitWidening valueIfTrueType valueIfTrueType valueIfFalse implicitWidening valueIfTrueType valueIfFalseType resolvedType valueIfTrueType valueIfTrueType isCompatibleWith valueIfFalseType valueIfTrue implicitWidening valueIfFalseType valueIfTrueType valueIfFalse implicitWidening valueIfFalseType valueIfFalseType resolvedType valueIfFalseType problemReporter conditionalArgumentsIncompatibleTypes valueIfTrueType valueIfFalseType
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope condition traverse visitor scope value If True traverse visitor scope value If False traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope valueIfTrue valueIfFalse endVisit

public boolean is Default Constructor false public Constructor Declaration Compilation Result compilation Result super compilation Result  isDefaultConstructor ConstructorDeclaration CompilationResult compilationResult compilationResult
public void analyse Code Class Scope class Scope Initialization Flow Context initializer Flow Context Flow Info flow Info if ignore Further Investigation return if this binding null this binding is Private this binding is Private Used if class Scope reference Compilation Unit compilation Result has Syntax Error scope problem Reporter unused Private Constructor this check constructor recursion once all constructor got resolved if is Recursive null lazy initialized visited list this scope problem Reporter recursive Constructor Invocation this constructor Call try Exception Handling Flow Context constructor Context new Exception Handling Flow Context initializer Flow Context parent this binding thrown Exceptions scope Flow Info DEAD END initializer Flow Context check Initializer Exceptions scope constructor Context flow Info anonymous constructor can gain extra thrown exceptions from unhandled ones if binding declaring Class is Anonymous Type Array List computed Exceptions constructor Context extended Exceptions if computed Exceptions null int size if size computed Exceptions size 0 Reference Binding actually Thrown Exceptions computed Exceptions to Array actually Thrown Exceptions new Reference Binding size binding thrown Exceptions actually Thrown Exceptions propagate to constructor call if constructor Call null if calling this then flag all non static fields as definitely set since they are supposed to be set inside other local constructor if constructor Call access Mode Explicit Constructor Call This Field Binding fields binding declaring Class fields for int i 0 count fields length i count i Field Binding field if field fields i is Static flow Info mark As Definitely Assigned field flow Info constructor Call analyse Code scope constructor Context flow Info propagate to statements if statements null boolean did Already Complain false for int i 0 count statements length i count i Statement stat statements i if stat complain If Unreachable flow Info scope did Already Complain flow Info stat analyse Code scope constructor Context flow Info else did Already Complain true check for missing returning path this need Free Return flow Info is Reachable check missing blank final field initializations if constructor Call null constructor Call access Mode Explicit Constructor Call This flow Info flow Info merged With constructor Context inits On Return Field Binding fields binding declaring Class fields for int i 0 count fields length i count i Field Binding field if field fields i is Static field is Final flow Info is Definitely Assigned fields i scope problem Reporter uninitialized Blank Final Field field is Default Constructor AST Node scope reference Type this check unreachable catch blocks constructor Context complain If Unused Exception Handlers this catch Abort Method e this ignore Further Investigation true  analyseCode ClassScope classScope InitializationFlowContext initializerFlowContext FlowInfo flowInfo ignoreFurtherInvestigation isPrivate isPrivateUsed classScope referenceCompilationUnit compilationResult hasSyntaxError problemReporter unusedPrivateConstructor isRecursive problemReporter recursiveConstructorInvocation constructorCall ExceptionHandlingFlowContext constructorContext ExceptionHandlingFlowContext initializerFlowContext thrownExceptions FlowInfo DEAD_END initializerFlowContext checkInitializerExceptions constructorContext flowInfo declaringClass isAnonymousType ArrayList computedExceptions constructorContext extendedExceptions computedExceptions computedExceptions ReferenceBinding actuallyThrownExceptions computedExceptions toArray actuallyThrownExceptions ReferenceBinding thrownExceptions actuallyThrownExceptions constructorCall constructorCall accessMode ExplicitConstructorCall FieldBinding declaringClass FieldBinding isStatic flowInfo markAsDefinitelyAssigned flowInfo constructorCall analyseCode constructorContext flowInfo didAlreadyComplain complainIfUnreachable flowInfo didAlreadyComplain flowInfo analyseCode constructorContext flowInfo didAlreadyComplain needFreeReturn flowInfo isReachable constructorCall constructorCall accessMode ExplicitConstructorCall flowInfo flowInfo mergedWith constructorContext initsOnReturn FieldBinding declaringClass FieldBinding isStatic isFinal flowInfo isDefinitelyAssigned problemReporter uninitializedBlankFinalField isDefaultConstructor ASTNode referenceType constructorContext complainIfUnusedExceptionHandlers AbortMethod ignoreFurtherInvestigation
Bytecode generation for a constructor param class Scope org eclipse jdt internal compiler lookup Class Scope param class File org eclipse jdt internal compiler codegen Class File public void generate Code Class Scope class Scope Class File class File int problem ResetPC 0 if ignore Further Investigation if this binding null return Handle methods with invalid signature or duplicates int problems Length I Problem problems scope reference Compilation Unit compilation Result get Problems I Problem problems Copy new I Problem problems Length problems length System arraycopy problems 0 problems Copy 0 problems Length class File add Problem Constructor this binding problems Copy return try problem ResetPC class File contents Offset this internal Generate Code class Scope class File catch Abort Method e if e compilation Result Code Stream RESTART IN WIDE MODE a branch target required a goto w restart code gen in wide mode try class File contents Offset problem ResetPC class File method Count class File code Stream wide Mode true request wide mode this internal Generate Code class Scope class File restart method generation catch Abort Method e2 int problems Length I Problem problems scope reference Compilation Unit compilation Result get All Problems I Problem problems Copy new I Problem problems Length problems length System arraycopy problems 0 problems Copy 0 problems Length class File add Problem Constructor this binding problems Copy problem ResetPC else int problems Length I Problem problems scope reference Compilation Unit compilation Result get All Problems I Problem problems Copy new I Problem problems Length problems length System arraycopy problems 0 problems Copy 0 problems Length class File add Problem Constructor this binding problems Copy problem ResetPC  classScope ClassScope classFile ClassFile generateCode ClassScope classScope ClassFile classFile problemResetPC ignoreFurtherInvestigation problemsLength IProblem referenceCompilationUnit compilationResult getProblems IProblem problemsCopy IProblem problemsLength problemsCopy problemsLength classFile addProblemConstructor problemsCopy problemResetPC classFile contentsOffset internalGenerateCode classScope classFile AbortMethod compilationResult CodeStream RESTART_IN_WIDE_MODE goto_w classFile contentsOffset problemResetPC classFile methodCount classFile codeStream wideMode internalGenerateCode classScope classFile AbortMethod problemsLength IProblem referenceCompilationUnit compilationResult getAllProblems IProblem problemsCopy IProblem problemsLength problemsCopy problemsLength classFile addProblemConstructor problemsCopy problemResetPC problemsLength IProblem referenceCompilationUnit compilationResult getAllProblems IProblem problemsCopy IProblem problemsLength problemsCopy problemsLength classFile addProblemConstructor problemsCopy problemResetPC
public void generate Synthetic Field Initializations If Necessary Method Scope method Scope Code Stream code Stream Reference Binding declaring Class if declaring Class is Nested Type return Nested Type Binding nested Type Nested Type Binding declaring Class Synthetic Argument Binding synthetic Args nested Type synthetic Enclosing Instances for int i 0 max synthetic Args null 0 synthetic Args length i max i Synthetic Argument Binding synthetic Arg if synthetic Arg synthetic Args i matching Field null code Stream aload 0 code Stream load synthetic Arg code Stream putfield synthetic Arg matching Field synthetic Args nested Type synthetic Outer Local Variables for int i 0 max synthetic Args null 0 synthetic Args length i max i Synthetic Argument Binding synthetic Arg if synthetic Arg synthetic Args i matching Field null code Stream aload 0 code Stream load synthetic Arg code Stream putfield synthetic Arg matching Field  generateSyntheticFieldInitializationsIfNecessary MethodScope methodScope CodeStream codeStream ReferenceBinding declaringClass declaringClass isNestedType NestedTypeBinding nestedType NestedTypeBinding declaringClass SyntheticArgumentBinding syntheticArgs nestedType syntheticEnclosingInstances syntheticArgs syntheticArgs SyntheticArgumentBinding syntheticArg syntheticArg syntheticArgs matchingField codeStream aload_0 codeStream syntheticArg codeStream syntheticArg matchingField syntheticArgs nestedType syntheticOuterLocalVariables syntheticArgs syntheticArgs SyntheticArgumentBinding syntheticArg syntheticArg syntheticArgs matchingField codeStream aload_0 codeStream syntheticArg codeStream syntheticArg matchingField
private void internal Generate Code Class Scope class Scope Class File class File class File generate Method Info Header binding int method Attribute Offset class File contents Offset int attribute Number class File generate Method Info Attribute binding if binding is Native binding is Abstract Type Declaration declaring Type class Scope reference Context int code Attribute Offset class File contents Offset class File generate Code Attribute Header Code Stream code Stream class File code Stream code Stream reset this class File initialize local positions including initializer scope Reference Binding declaring Class binding declaring Class int arg Slot Size 1 this aload0 if declaring Class is Nested Type Nested Type Binding nested Type Nested Type Binding declaring Class this scope extra Synthetic Arguments nested Type synthetic Outer Local Variables scope compute Local Variable Positions consider synthetic arguments if any nested Type enclosing Instances Slot Size 1 code Stream arg Slot Size nested Type enclosing Instances Slot Size arg Slot Size nested Type outer Local Variables Slot Size else scope compute Local Variable Positions 1 code Stream if arguments null for int i 0 max arguments length i max i arguments initialization for local variable debug attributes Local Variable Binding arg Binding code Stream add Visible Local Variable arg Binding arguments i binding arg Binding record Initialization StartPC 0 Type Binding arg Type if arg Type arg Binding type Long Binding arg Type Double Binding arg Slot Size 2 else arg Slot Size Method Scope initializer Scope declaring Type initializer Scope initializer Scope compute Local Variable Positions arg Slot Size code Stream offset by the argument size since not linked to method scope boolean need Field Initializations constructor Call null constructor Call access Mode Explicit Constructor Call This post 1 4 source level synthetic initializations occur prior to explicit constructor call boolean pre Init Synthetic Fields scope environment options targetJDK Class File Constants JDK1 4 if need Field Initializations pre Init Synthetic Fields generate Synthetic Field Initializations If Necessary scope code Stream declaring Class generate constructor call if constructor Call null constructor Call generate Code scope code Stream generate field initialization only if not invoking another constructor call of the same class if need Field Initializations if pre Init Synthetic Fields generate Synthetic Field Initializations If Necessary scope code Stream declaring Class generate user field initialization if declaring Type fields null for int i 0 max declaring Type fields length i max i Field Declaration field Decl if field Decl declaring Type fields i is Static field Decl generate Code initializer Scope code Stream generate statements if statements null for int i 0 max statements length i max i statements i generate Code scope code Stream if this need Free Return code Stream return  local variable attributes code Stream exit User Scope scope code Stream record Positions From 0 this body End class File complete Code Attribute code Attribute Offset attribute Number class File complete Method Info method Attribute Offset attribute Number if a problem got reported during code gen then trigger problem method creation if ignore Further Investigation throw new Abort Method scope reference Compilation Unit compilation Result null  internalGenerateCode ClassScope classScope ClassFile classFile classFile generateMethodInfoHeader methodAttributeOffset classFile contentsOffset attributeNumber classFile generateMethodInfoAttribute isNative isAbstract TypeDeclaration declaringType classScope referenceContext codeAttributeOffset classFile contentsOffset classFile generateCodeAttributeHeader CodeStream codeStream classFile codeStream codeStream classFile ReferenceBinding declaringClass declaringClass argSlotSize declaringClass isNestedType NestedTypeBinding nestedType NestedTypeBinding declaringClass extraSyntheticArguments nestedType syntheticOuterLocalVariables computeLocalVariablePositions nestedType enclosingInstancesSlotSize codeStream argSlotSize nestedType enclosingInstancesSlotSize argSlotSize nestedType outerLocalVariablesSlotSize computeLocalVariablePositions codeStream LocalVariableBinding argBinding codeStream addVisibleLocalVariable argBinding argBinding recordInitializationStartPC TypeBinding argType argType argBinding LongBinding argType DoubleBinding argSlotSize argSlotSize MethodScope initializerScope declaringType initializerScope initializerScope computeLocalVariablePositions argSlotSize codeStream needFieldInitializations constructorCall constructorCall accessMode ExplicitConstructorCall preInitSyntheticFields ClassFileConstants JDK1_4 needFieldInitializations preInitSyntheticFields generateSyntheticFieldInitializationsIfNecessary codeStream declaringClass constructorCall constructorCall generateCode codeStream needFieldInitializations preInitSyntheticFields generateSyntheticFieldInitializationsIfNecessary codeStream declaringClass declaringType declaringType FieldDeclaration fieldDecl fieldDecl declaringType isStatic fieldDecl generateCode initializerScope codeStream generateCode codeStream needFreeReturn codeStream return_ codeStream exitUserScope codeStream recordPositionsFrom bodyEnd classFile completeCodeAttribute codeAttributeOffset attributeNumber classFile completeMethodInfo methodAttributeOffset attributeNumber ignoreFurtherInvestigation AbortMethod referenceCompilationUnit compilationResult
public boolean is Constructor return true  isConstructor
public boolean is Default Constructor return this is Default Constructor  isDefaultConstructor isDefaultConstructor
public boolean is Initialization Method return true  isInitializationMethod
Returns true if the constructor is directly involved in a cycle Given most constructors aren t we only allocate the visited list lazily param visited return public boolean is Recursive Array List visited if this binding null this constructor Call null this constructor Call binding null this constructor Call is Super Access this constructor Call binding is Valid Binding return false Constructor Declaration target Constructor Constructor Declaration this scope reference Type declaration Of constructor Call binding if this target Constructor return true direct case if visited null lazy allocation visited new Array List 1 else int index visited index Of this if index 0 return index 0 only blame if directly part of the cycle visited add this return target Constructor is Recursive visited  isRecursive ArrayList constructorCall constructorCall constructorCall isSuperAccess constructorCall isValidBinding ConstructorDeclaration targetConstructor ConstructorDeclaration referenceType declarationOf constructorCall targetConstructor ArrayList indexOf targetConstructor isRecursive
public void parse Statements Parser parser Compilation Unit Declaration unit fill up the constructor body with its statements if ignore Further Investigation return if is Default Constructor constructor Call Super Reference implicit Super Constructor Call constructor Call source Start source Start constructor Call source End source End return parser parse this unit  parseStatements CompilationUnitDeclaration ignoreFurtherInvestigation isDefaultConstructor constructorCall SuperReference implicitSuperConstructorCall constructorCall sourceStart sourceStart constructorCall sourceEnd sourceEnd
public String Buffer print Body int indent String Buffer output output append NON NLS 1 if constructor Call null output append n constructor Call print Statement indent output NON NLS 1 NON NLS 2 if statements null for int i 0 i statements length i output append n statements i print Statement indent output NON NLS 1 output append n print Indent indent 0 0 indent 1 output append return output  StringBuffer printBody StringBuffer constructorCall constructorCall printStatement printStatement printIndent
public void resolve Javadoc if this binding null this javadoc null super resolve Javadoc else if is Default Constructor this scope problem Reporter javadoc Missing this source Start this source End this binding modifiers  resolveJavadoc resolveJavadoc isDefaultConstructor problemReporter javadocMissing sourceStart sourceEnd
public void resolve Statements if Char Operation equals scope enclosing Source Type source Name selector scope problem Reporter missing Return Type this if null an error has occurs at parsing time if this constructor Call null e g using super in java lang Object if this binding null this binding declaring Class id T Object this constructor Call access Mode Explicit Constructor Call This if this constructor Call access Mode Explicit Constructor Call Super scope problem Reporter cannot Use Super In Java Lang Object this constructor Call this constructor Call null else this constructor Call resolve this scope if modifiers Acc Semicolon Body 0 scope problem Reporter method Need Body this super resolve Statements  resolveStatements CharOperation enclosingSourceType sourceName problemReporter missingReturnType constructorCall declaringClass T_Object constructorCall accessMode ExplicitConstructorCall constructorCall accessMode ExplicitConstructorCall problemReporter cannotUseSuperInJavaLangObject constructorCall constructorCall constructorCall AccSemicolonBody problemReporter methodNeedBody resolveStatements
public void traverse AST Visitor visitor Class Scope class Scope if visitor visit this class Scope if arguments null int argument Length arguments length for int i 0 i argument Length i arguments i traverse visitor scope if thrown Exceptions null int thrown Exceptions Length thrown Exceptions length for int i 0 i thrown Exceptions Length i thrown Exceptions i traverse visitor scope if constructor Call null constructor Call traverse visitor scope if statements null int statements Length statements length for int i 0 i statements Length i statements i traverse visitor scope visitor end Visit this class Scope  ASTVisitor ClassScope classScope classScope argumentLength argumentLength thrownExceptions thrownExceptionsLength thrownExceptions thrownExceptionsLength thrownExceptions constructorCall constructorCall statementsLength statementsLength endVisit classScope

public class Continue Statement extends Branch Statement public Continue Statement char l int s int e super l s e  ContinueStatement BranchStatement ContinueStatement
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info here requires to generate a sequence of finally blocks invocations depending corresponding to each of the traversed try statements so that execution will terminate properly lookup the label this should answer the return Context Flow Context target Context label null flow Context get Target Context For Default Continue flow Context get Target Context For Continue Label label if target Context null if label null current Scope problem Reporter invalid Continue this else current Scope problem Reporter undefined Label this return flow Info pretend it did not continue since no actual target if target Context Flow Context Not Continuable Context current Scope problem Reporter invalid Continue this return flow Info pretend it did not continue since no actual target target Label target Context continue Label Flow Context traversed Context flow Context int sub Index 0 max Sub 5 subroutines new Sub Routine Statement max Sub do Sub Routine Statement sub if sub traversed Context sub Routine null if sub Index max Sub System arraycopy subroutines 0 subroutines new Sub Routine Statement max Sub 2 0 sub Index grow subroutines sub Index sub if sub is Sub Routine Escaping break traversed Context record Return From flow Info unconditional Inits AST Node node if node traversed Context associated Node instanceof Try Statement Try Statement try Statement Try Statement node flow Info add Initializations From try Statement sub Routine Inits collect inits else if traversed Context target Context only record continue info once accumulated through subroutines and only against target context target Context record Continue From flow Info break while traversed Context traversed Context parent null resize subroutines if sub Index max Sub System arraycopy subroutines 0 subroutines new Sub Routine Statement sub Index 0 sub Index return Flow Info DEAD END  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo returnContext FlowContext targetContext flowContext getTargetContextForDefaultContinue flowContext getTargetContextForContinueLabel targetContext currentScope problemReporter invalidContinue currentScope problemReporter undefinedLabel flowInfo targetContext FlowContext NotContinuableContext currentScope problemReporter invalidContinue flowInfo targetLabel targetContext continueLabel FlowContext traversedContext flowContext subIndex maxSub SubRoutineStatement maxSub SubRoutineStatement traversedContext subRoutine subIndex maxSub SubRoutineStatement maxSub subIndex subIndex isSubRoutineEscaping traversedContext recordReturnFrom flowInfo unconditionalInits ASTNode traversedContext associatedNode TryStatement TryStatement tryStatement TryStatement flowInfo addInitializationsFrom tryStatement subRoutineInits traversedContext targetContext targetContext recordContinueFrom flowInfo traversedContext traversedContext subIndex maxSub SubRoutineStatement subIndex subIndex FlowInfo DEAD_END
public String Buffer print Statement int tab String Buffer output print Indent tab output append continue NON NLS 1 if label null output append label return output append  StringBuffer printStatement StringBuffer printIndent
public void traverse AST Visitor visitor Block Scope block Scope visitor visit this block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope endVisit blockScope

public Do Statement Expression condition Statement action int s int e this source Start s this source End e this condition condition this action action remember useful empty statement if action instanceof Empty Statement action bits Is Useful Empty StatementMASK  DoStatement sourceStart sourceEnd EmptyStatement IsUsefulEmptyStatementMASK
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info break Label new Label continue Label new Label Looping Flow Context looping Context new Looping Flow Context flow Context this break Label continue Label current Scope Constant cst condition constant boolean is Condition True cst NotA Constant cst boolean Value true cst condition optimized Boolean Constant boolean is Condition Optimized True cst NotA Constant cst boolean Value true boolean is Condition Optimized False cst NotA Constant cst boolean Value false int previous Mode flow Info reach Mode if action null action is Empty Block flow Info action analyse Code current Scope looping Context flow Info code generation can be optimized when no need to continue in the loop if flow Info is Reachable looping Context inits On Continue is Reachable continue Label null Reset reach mode to address following scenario final blank do if true break else blank 0 while false blank 1 may be initialized already flow Info set Reach Mode previous Mode flow Info condition analyse Code current Scope looping Context action null flow Info flow Info merged With looping Context inits On Continue if is Condition Optimized False continue Label null looping Context complain On Final Assignments In Loop current Scope flow Info end of loop Flow Info merged Info Flow Info merged Optimized Branches looping Context inits On Break is Condition Optimized True flow Info inits When False false never consider opt false case for DO loop since break can always occur 47776 is Condition True do while true unreachable merged Init State Index current Scope method Scope record Initialization States merged Info return merged Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo breakLabel continueLabel LoopingFlowContext loopingContext LoopingFlowContext flowContext breakLabel continueLabel currentScope isConditionTrue NotAConstant booleanValue optimizedBooleanConstant isConditionOptimizedTrue NotAConstant booleanValue isConditionOptimizedFalse NotAConstant booleanValue previousMode flowInfo reachMode isEmptyBlock flowInfo analyseCode currentScope loopingContext flowInfo flowInfo isReachable loopingContext initsOnContinue isReachable continueLabel flowInfo setReachMode previousMode flowInfo analyseCode currentScope loopingContext flowInfo flowInfo mergedWith loopingContext initsOnContinue isConditionOptimizedFalse continueLabel loopingContext complainOnFinalAssignmentsInLoop currentScope flowInfo FlowInfo mergedInfo FlowInfo mergedOptimizedBranches loopingContext initsOnBreak isConditionOptimizedTrue flowInfo initsWhenFalse isConditionTrue mergedInitStateIndex currentScope methodScope recordInitializationStates mergedInfo mergedInfo
Do statement code generation public void generate Code Block Scope current Scope Code Stream code Stream if bits Is ReachableMASK 0 return int pc code Stream position labels management Label action Label new Label code Stream action Label place break Label initialize code Stream if continue Label null continue Label initialize code Stream generate action if action null action generate Code current Scope code Stream generate condition if continue Label null continue Label place condition generate Optimized Boolean current Scope code Stream action Label null true break Label place May loose some local variable initializations affecting the local variable attributes if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK codeStream actionLabel codeStream actionLabel breakLabel codeStream continueLabel continueLabel codeStream generateCode currentScope codeStream continueLabel continueLabel generateOptimizedBoolean currentScope codeStream actionLabel breakLabel mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex codeStream recordPositionsFrom sourceStart
public String Buffer print Statement int indent String Buffer output print Indent indent output append do NON NLS 1 if action null output append n NON NLS 1 else output append n action print Statement indent 1 output append n output append while NON NLS 1 return condition print Expression 0 output append NON NLS 1  StringBuffer printStatement StringBuffer printIndent printStatement printExpression
public void resolve Block Scope scope Type Binding type condition resolve Type Expecting scope Boolean Binding condition implicit Widening type type if action null action resolve scope  BlockScope TypeBinding resolveTypeExpecting BooleanBinding implicitWidening
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope if action null action traverse visitor scope condition traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

public class Double Literal extends Number Literal double value public Double Literal char token int s int e super token s e  DoubleLiteral NumberLiteral DoubleLiteral
public void compute Constant the source is correctly formated so the exception should never occurs Double computed Value try computed Value Double value Of String value Of source catch Number Format Exception e return how can it happen if computed Value double Value Double MAX VALUE return may be Infinity if computed Value double Value Double MIN VALUE only a true 0 can be made of zeros 2 00000000000000000e 324 is illegal label for int i 0 i source length i it is welled formated so just test against 0 and potential D d switch source i case 0 case case d case D break case e case E break label exposant are valid default return error  computeConstant computedValue computedValue valueOf valueOf NumberFormatException computedValue doubleValue MAX_VALUE computedValue doubleValue MIN_VALUE
constant Constant from Value value computed Value double Value Code generation for the double literak param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if value Required if implicit Conversion 4 T double code Stream generate Inlined Value value else code Stream generate Constant constant implicit Conversion code Stream record Positions From pc this source Start  fromValue computedValue doubleValue currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream valueRequired implicitConversion T_double codeStream generateInlinedValue codeStream generateConstant implicitConversion codeStream recordPositionsFrom sourceStart
code Stream record Positions From pc this source Start public Type Binding literal Type Block Scope scope return Double Binding  codeStream recordPositionsFrom sourceStart TypeBinding literalType BlockScope DoubleBinding
return Double Binding public void traverse AST Visitor visitor Block Scope block Scope visitor visit this block Scope visitor end Visit this block Scope  DoubleBinding ASTVisitor BlockScope blockScope blockScope endVisit blockScope

public class Empty Statement extends Statement public Empty Statement int start Position int end Position this source Start start Position this source End end Position  EmptyStatement EmptyStatement startPosition endPosition sourceStart startPosition sourceEnd endPosition
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo flowInfo
Report an error if necessary public boolean complain If Unreachable Flow Info flow Info Block Scope scope boolean did Already Complain before 1 4 empty statements are tolerated anywhere if scope environment options compliance Level Class File Constants JDK1 4 return false return super complain If Unreachable flow Info scope did Already Complain  complainIfUnreachable FlowInfo flowInfo BlockScope didAlreadyComplain complianceLevel ClassFileConstants JDK1_4 complainIfUnreachable flowInfo didAlreadyComplain
public void generate Code Block Scope current Scope Code Stream code Stream no bytecode no need to check for reachability or recording source positions  generateCode BlockScope currentScope CodeStream codeStream
public String Buffer print Statement int tab String Buffer output return print Indent tab output append  StringBuffer printStatement StringBuffer printIndent
public void resolve Block Scope scope if bits Is Useful Empty StatementMASK 0 scope problem Reporter superfluous Semicolon this source Start this source End else scope problem Reporter empty Control Flow Statement this source Start this source End  BlockScope IsUsefulEmptyStatementMASK problemReporter superfluousSemicolon sourceStart sourceEnd problemReporter emptyControlFlowStatement sourceStart sourceEnd
public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

public class Equal Expression extends Binary Expression public Equal Expression Expression left Expression right int operator super left right operator  EqualExpression BinaryExpression EqualExpression
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info if bits OperatorMASK OperatorSHIFT EQUAL EQUAL if left constant NotA Constant left constant typeID T boolean if left constant boolean Value true anything this is equivalent to the right argument inits return right analyse Code current Scope flow Context flow Info else false anything this is equivalent to the right argument inits negated return right analyse Code current Scope flow Context flow Info as Negated Condition if right constant NotA Constant right constant typeID T boolean if right constant boolean Value anything true this is equivalent to the right argument inits return left analyse Code current Scope flow Context flow Info else anything false this is equivalent to the right argument inits negated return left analyse Code current Scope flow Context flow Info as Negated Condition return right analyse Code current Scope flow Context left analyse Code current Scope flow Context flow Info unconditional Inits unconditional Inits else NOT EQUAL if left constant NotA Constant left constant typeID T boolean if left constant boolean Value false anything this is equivalent to the right argument inits return right analyse Code current Scope flow Context flow Info else true anything this is equivalent to the right argument inits negated return right analyse Code current Scope flow Context flow Info as Negated Condition if right constant NotA Constant right constant typeID T boolean if right constant boolean Value anything false this is equivalent to the right argument inits return left analyse Code current Scope flow Context flow Info else anything true this is equivalent to the right argument inits negated return left analyse Code current Scope flow Context flow Info as Negated Condition return right analyse Code current Scope flow Context left analyse Code current Scope flow Context flow Info unconditional Inits as Negated Condition unconditional Inits  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo EQUAL_EQUAL NotAConstant T_boolean booleanValue analyseCode currentScope flowContext flowInfo analyseCode currentScope flowContext flowInfo asNegatedCondition NotAConstant T_boolean booleanValue analyseCode currentScope flowContext flowInfo analyseCode currentScope flowContext flowInfo asNegatedCondition analyseCode currentScope flowContext analyseCode currentScope flowContext flowInfo unconditionalInits unconditionalInits NOT_EQUAL NotAConstant T_boolean booleanValue analyseCode currentScope flowContext flowInfo analyseCode currentScope flowContext flowInfo asNegatedCondition NotAConstant T_boolean booleanValue analyseCode currentScope flowContext flowInfo analyseCode currentScope flowContext flowInfo asNegatedCondition analyseCode currentScope flowContext analyseCode currentScope flowContext flowInfo unconditionalInits asNegatedCondition unconditionalInits
public final boolean are Types Cast Compatible Block Scope scope Type Binding cast Type Type Binding expression Type see specifications 5 5 A more complete version of this method is provided on Cast Expression it deals with constant and need runtime checkcast if cast Type expression Type return true ARRAY if expression Type is Array Type if cast Type is Array Type cast Tb is Array expression Tb is Array Type Binding expression Elt Type Array Binding expression Type elements Type scope if expression Elt Type is Base Type stop the recursion return Array Binding cast Type elements Type scope expression Elt Type recursivly on the elts return are Types Cast Compatible scope Array Binding cast Type elements Type scope expression Elt Type if cast Type is Base Type return false if cast Type is Class cast Tb is Class expression Tb is Array if cast Type id T Object return true return false if cast Type is Interface cast Tb is Interface expression Tb is Array if cast Type id T JavaLangCloneable cast Type id T JavaIoSerializable return true return false return false cast Type null if expression Type Null Binding return cast Type is Base Type BASETYPE if expression Type is Base Type return false REFERENCE TYPE if expression Type is Class if cast Type is Array Type cast Tb is Array expression Tb is Class if expression Type id T Object return true if cast Type is Base Type return false if cast Type is Class cast Tb is Class expression Tb is Class if expression Type is Compatible With cast Type return true else if cast Type is Compatible With expression Type return true return false if cast Type is Interface cast Tb is Interface expression Tb is Class if expression Type is Compatible With cast Type return true if Reference Binding expression Type is Final return true no subclass for expression Tb thus compile time check is valid return false if expression Type is Interface if cast Type is Array Type cast Tb is Array expression Tb is Interface if expression Type id T JavaLangCloneable expression Type id T JavaIoSerializable potential runtime error return true return false if cast Type is Base Type return false if cast Type is Class cast Tb is Class expression Tb is Interface if cast Type id T Object return true if Reference Binding cast Type is Final no subclass for cast Tb thus compile time check is valid if cast Type is Compatible With expression Type return true return false return true if cast Type is Interface cast Tb is Interface expression Tb is Interface if expression Type is Compatible With cast Type return true if cast Type is Compatible With expression Type Method Binding cast Tb Methods Reference Binding cast Type methods int cast Tb Methods Length cast Tb Methods length Method Binding expression Tb Methods Reference Binding expression Type methods int expression Tb Methods Length expression Tb Methods length for int i 0 i cast Tb Methods Length i for int j 0 j expression Tb Methods Length j if Char Operation equals cast Tb Methods i selector expression Tb Methods j selector if cast Tb Methods i return Type expression Tb Methods j return Type if cast Tb Methods i are Parameters Equal expression Tb Methods j return false return true return false return false  areTypesCastCompatible BlockScope TypeBinding castType TypeBinding expressionType CastExpression castType expressionType expressionType isArrayType castType isArrayType castTb isArray expressionTb isArray TypeBinding expressionEltType ArrayBinding expressionType elementsType expressionEltType isBaseType ArrayBinding castType elementsType expressionEltType areTypesCastCompatible ArrayBinding castType elementsType expressionEltType castType isBaseType castType isClass castTb isClass expressionTb isArray castType T_Object castType isInterface castTb isInterface expressionTb isArray castType T_JavaLangCloneable castType T_JavaIoSerializable castType expressionType NullBinding castType isBaseType expressionType isBaseType expressionType isClass castType isArrayType castTb isArray expressionTb isClass expressionType T_Object castType isBaseType castType isClass castTb isClass expressionTb isClass expressionType isCompatibleWith castType castType isCompatibleWith expressionType castType isInterface castTb isInterface expressionTb isClass expressionType isCompatibleWith castType ReferenceBinding expressionType isFinal expressionTb expressionType isInterface castType isArrayType castTb isArray expressionTb isInterface expressionType T_JavaLangCloneable expressionType T_JavaIoSerializable castType isBaseType castType isClass castTb isClass expressionTb isInterface castType T_Object ReferenceBinding castType isFinal castTb castType isCompatibleWith expressionType castType isInterface castTb isInterface expressionTb isInterface expressionType isCompatibleWith castType castType isCompatibleWith expressionType MethodBinding castTbMethods ReferenceBinding castType castTbMethodsLength castTbMethods MethodBinding expressionTbMethods ReferenceBinding expressionType expressionTbMethodsLength expressionTbMethods castTbMethodsLength expressionTbMethodsLength CharOperation castTbMethods expressionTbMethods castTbMethods returnType expressionTbMethods returnType castTbMethods areParametersEqual expressionTbMethods
public final void compute Constant Type Binding left Type Type Binding right Type if this left constant NotA Constant this right constant NotA Constant this constant Constant computeConstantOperationEQUAL EQUAL left constant left Type id EQUAL EQUAL right constant right Type id if this bits OperatorMASK OperatorSHIFT NOT EQUAL constant Constant from Value constant boolean Value else this constant NotA Constant no optimization for null null  computeConstant TypeBinding leftType TypeBinding rightType NotAConstant NotAConstant computeConstantOperationEQUAL_EQUAL leftType EQUAL_EQUAL rightType NOT_EQUAL fromValue booleanValue NotAConstant
Normal or code generation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required if constant NotA Constant int pc code Stream position if value Required code Stream generate Constant constant implicit Conversion code Stream record Positions From pc this source Start return Label false Label bits Only Value RequiredMASK generate Optimized Boolean current Scope code Stream null false Label new Label code Stream value Required if false Label has Forward References if value Required comparison is TRUE code Stream iconst 1 if bits Value For ReturnMASK 0 code Stream ireturn comparison is FALSE false Label place code Stream iconst 0 else Label end Label new Label code Stream code Stream goto  end Label code Stream decr Stack Size 1 comparison is FALSE false Label place code Stream iconst 0 end Label place else false Label place  currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired NotAConstant codeStream valueRequired codeStream generateConstant implicitConversion codeStream recordPositionsFrom sourceStart falseLabel OnlyValueRequiredMASK generateOptimizedBoolean currentScope codeStream falseLabel codeStream valueRequired falseLabel hasForwardReferences valueRequired codeStream iconst_1 ValueForReturnMASK codeStream falseLabel codeStream iconst_0 endLabel codeStream codeStream goto_ endLabel codeStream decrStackSize falseLabel codeStream iconst_0 endLabel falseLabel
Boolean operator code generation Optimized operations are and public void generate Optimized Boolean Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required if constant Constant NotA Constant super generate Optimized Boolean current Scope code Stream true Label false Label value Required return if bits OperatorMASK OperatorSHIFT EQUAL EQUAL if left implicit Conversion 0xF compile time T boolean generate Optimized Boolean Equal current Scope code Stream true Label false Label value Required else generate Optimized Non Boolean Equal current Scope code Stream true Label false Label value Required else if left implicit Conversion 0xF compile time T boolean generate Optimized Boolean Equal current Scope code Stream false Label true Label value Required else generate Optimized Non Boolean Equal current Scope code Stream false Label true Label value Required  generateOptimizedBoolean BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired NotAConstant generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired EQUAL_EQUAL implicitConversion T_boolean generateOptimizedBooleanEqual currentScope codeStream trueLabel falseLabel valueRequired generateOptimizedNonBooleanEqual currentScope codeStream trueLabel falseLabel valueRequired implicitConversion T_boolean generateOptimizedBooleanEqual currentScope codeStream falseLabel trueLabel valueRequired generateOptimizedNonBooleanEqual currentScope codeStream falseLabel trueLabel valueRequired
Boolean generation for with boolean operands Note this code does not optimize conditional constants public void generate Optimized Boolean Equal Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required optimized cases true x false x if left constant NotA Constant boolean inline left constant boolean Value right generate Optimized Boolean current Scope code Stream inline true Label false Label inline false Label true Label value Required return optimized cases x true x false if right constant NotA Constant boolean inline right constant boolean Value left generate Optimized Boolean current Scope code Stream inline true Label false Label inline false Label true Label value Required return default case left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicit falling through the FALSE case code Stream if icmpeq true Label else implicit falling through the TRUE case if true Label null code Stream if icmpne false Label else no implicit fall through TRUE FALSE should never occur reposition the endPC code Stream update Last Recorded EndPC code Stream position  generateOptimizedBooleanEqual BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired NotAConstant booleanValue generateOptimizedBoolean currentScope codeStream trueLabel falseLabel falseLabel trueLabel valueRequired NotAConstant booleanValue generateOptimizedBoolean currentScope codeStream trueLabel falseLabel falseLabel trueLabel valueRequired generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel codeStream if_icmpeq trueLabel trueLabel codeStream if_icmpne falseLabel codeStream updateLastRecordedEndPC codeStream
Boolean generation for with non boolean operands public void generate Optimized Non Boolean Equal Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required int pc code Stream position Constant inline if inline right constant NotA Constant optimized case x 0 if left implicit Conversion 4 T int inline int Value 0 left generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicit falling through the FALSE case code Stream ifeq true Label else implicit falling through the TRUE case if true Label null code Stream ifne false Label else no implicit fall through TRUE FALSE should never occur code Stream record Positions From pc this source Start return if inline left constant NotA Constant optimized case 0 x if left implicit Conversion 4 T int inline int Value 0 right generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicit falling through the FALSE case code Stream ifeq true Label else implicit falling through the TRUE case if true Label null code Stream ifne false Label else no implicit fall through TRUE FALSE should never occur code Stream record Positions From pc this source Start return null cases optimized case x null if right instanceof Null Literal if left instanceof Null Literal null null if value Required if bits Only Value RequiredMASK 0 if bits OperatorMASK OperatorSHIFT EQUAL EQUAL code Stream iconst 1 else code Stream iconst 0 else if false Label null implicit falling through the FALSE case if true Label null code Stream goto  true Label else left generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicit falling through the FALSE case code Stream ifnull true Label else implicit falling through the TRUE case if true Label null code Stream ifnonnull false Label else no implicit fall through TRUE FALSE should never occur code Stream record Positions From pc this source Start return else if left instanceof Null Literal optimized case null x right generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicit falling through the FALSE case code Stream ifnull true Label else implicit falling through the TRUE case if true Label null code Stream ifnonnull false Label else no implicit fall through TRUE FALSE should never occur code Stream record Positions From pc this source Start return default case left generate Code current Scope code Stream value Required right generate Code current Scope code Stream value Required if value Required if false Label null if true Label null implicit falling through the FALSE case switch left implicit Conversion 4 operand runtime type case T int code Stream if icmpeq true Label break case T float code Stream fcmpl code Stream ifeq true Label break case T long code Stream lcmp code Stream ifeq true Label break case T double code Stream dcmpl code Stream ifeq true Label break default code Stream if acmpeq true Label else implicit falling through the TRUE case if true Label null switch left implicit Conversion 4 operand runtime type case T int code Stream if icmpne false Label break case T float code Stream fcmpl code Stream ifne false Label break case T long code Stream lcmp code Stream ifne false Label break case T double code Stream dcmpl code Stream ifne false Label break default code Stream if acmpne false Label else no implicit fall through TRUE FALSE should never occur code Stream record Positions From pc this source Start  generateOptimizedNonBooleanEqual BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired codeStream NotAConstant implicitConversion T_int intValue generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream recordPositionsFrom sourceStart NotAConstant implicitConversion T_int intValue generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream recordPositionsFrom sourceStart NullLiteral NullLiteral valueRequired OnlyValueRequiredMASK EQUAL_EQUAL codeStream iconst_1 codeStream iconst_0 falseLabel trueLabel codeStream goto_ trueLabel generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream recordPositionsFrom sourceStart NullLiteral generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream recordPositionsFrom sourceStart generateCode currentScope codeStream valueRequired generateCode currentScope codeStream valueRequired valueRequired falseLabel trueLabel implicitConversion T_int codeStream if_icmpeq trueLabel T_float codeStream codeStream trueLabel T_long codeStream codeStream trueLabel T_double codeStream codeStream trueLabel codeStream if_acmpeq trueLabel trueLabel implicitConversion T_int codeStream if_icmpne falseLabel T_float codeStream codeStream falseLabel T_long codeStream codeStream falseLabel T_double codeStream codeStream falseLabel codeStream if_acmpne falseLabel codeStream recordPositionsFrom sourceStart
code Stream record Positions From pc this source Start public boolean is Compactable Operation return false  codeStream recordPositionsFrom sourceStart isCompactableOperation
public Type Binding resolve Type Block Scope scope boolean left Is Cast right Is Cast if left Is Cast left instanceof Cast Expression true left bits Ignore Need For Cast CheckMASK will check later on Type Binding left Type left resolve Type scope if right Is Cast right instanceof Cast Expression true right bits Ignore Need For Cast CheckMASK will check later on Type Binding right Type right resolve Type scope always return Boolean Binding if left Type null right Type null constant NotA Constant return null both base type if left Type is Base Type right Type is Base Type the code is an int cast left cast right result 0000 0000 0000 0000 0000 16 12 8 4 0 int operator Signature Operator Signatures EQUAL EQUAL left Type id 4 right Type id left implicit Conversion operator Signature 12 right implicit Conversion operator Signature 4 0x000FF bits operator Signature 0xF if operator Signature 0x0000F T undefined constant Constant NotA Constant scope problem Reporter invalid Operator this left Type right Type return null check need for operand cast if left Is Cast right Is Cast Cast Expression check Need For Argument Casts scope EQUAL EQUAL operator Signature left left Type id left Is Cast right right Type id right Is Cast compute Constant left Type right Type return this resolved Type Boolean Binding Object references spec 15 20 3 if are Types Cast Compatible scope right Type left Type are Types Cast Compatible scope left Type right Type special case for String if right Type id T String left Type id T String compute Constant left Type right Type else constant NotA Constant if right Type id T String right implicit Conversion String2 String if left Type id T String left implicit Conversion String2 String check need for operand cast boolean unnecessary Left Cast left bits Unnecessary Cast Mask 0 boolean unnecessary Right Cast right bits Unnecessary Cast Mask 0 if unnecessary Left Cast unnecessary Right Cast Type Binding alternate Left Type unnecessary Left Cast Cast Expression left expression resolved Type left Type Type Binding alternate Right Type unnecessary Right Cast Cast Expression right expression resolved Type right Type if are Types Cast Compatible scope alternate Left Type alternate Right Type are Types Cast Compatible scope alternate Right Type alternate Left Type if unnecessary Left Cast scope problem Reporter unnecessary Cast Cast Expression left if unnecessary Right Cast scope problem Reporter unnecessary Cast Cast Expression right return this resolved Type Boolean Binding constant NotA Constant scope problem Reporter not Compatible Types Error this left Type right Type return null  TypeBinding resolveType BlockScope leftIsCast rightIsCast leftIsCast CastExpression IgnoreNeedForCastCheckMASK TypeBinding leftType resolveType rightIsCast CastExpression IgnoreNeedForCastCheckMASK TypeBinding rightType resolveType BooleanBinding leftType rightType NotAConstant leftType isBaseType rightType isBaseType operatorSignature OperatorSignatures EQUAL_EQUAL leftType rightType implicitConversion operatorSignature implicitConversion operatorSignature operatorSignature operatorSignature T_undefined NotAConstant problemReporter invalidOperator leftType rightType leftIsCast rightIsCast CastExpression checkNeedForArgumentCasts EQUAL_EQUAL operatorSignature leftType leftIsCast rightType rightIsCast computeConstant leftType rightType resolvedType BooleanBinding areTypesCastCompatible rightType leftType areTypesCastCompatible leftType rightType rightType T_String leftType T_String computeConstant leftType rightType NotAConstant rightType T_String implicitConversion String2String leftType T_String implicitConversion String2String unnecessaryLeftCast UnnecessaryCastMask unnecessaryRightCast UnnecessaryCastMask unnecessaryLeftCast unnecessaryRightCast TypeBinding alternateLeftType unnecessaryLeftCast CastExpression resolvedType leftType TypeBinding alternateRightType unnecessaryRightCast CastExpression resolvedType rightType areTypesCastCompatible alternateLeftType alternateRightType areTypesCastCompatible alternateRightType alternateLeftType unnecessaryLeftCast problemReporter unnecessaryCast CastExpression unnecessaryRightCast problemReporter unnecessaryCast CastExpression resolvedType BooleanBinding NotAConstant problemReporter notCompatibleTypesError leftType rightType
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope left traverse visitor scope right traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

Method Binding synthetic Accessor public Explicit Constructor Call int access Mode this access Mode access Mode  MethodBinding syntheticAccessor ExplicitConstructorCall accessMode accessMode accessMode
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info must verify that exceptions potentially thrown by this expression are caught in the method try Method Scope current Scope is Constructor Call true process enclosing instance if qualification null flow Info qualification analyse Code current Scope flow Context flow Info unconditional Inits process arguments if arguments null for int i 0 max arguments length i max i flow Info arguments i analyse Code current Scope flow Context flow Info unconditional Inits Reference Binding thrown Exceptions if thrown Exceptions binding thrown Exceptions No Exceptions check exceptions flow Context check Exception Handlers thrown Exceptions access Mode Implicit Super AST Node current Scope method Scope reference Context AST Node this flow Info current Scope manage Enclosing Instance Access If Necessary current Scope flow Info manage Synthetic Access If Necessary current Scope flow Info return flow Info finally Method Scope current Scope is Constructor Call false  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo MethodScope currentScope isConstructorCall flowInfo analyseCode currentScope flowContext flowInfo unconditionalInits flowInfo analyseCode currentScope flowContext flowInfo unconditionalInits ReferenceBinding thrownExceptions thrownExceptions thrownExceptions NoExceptions flowContext checkExceptionHandlers thrownExceptions accessMode ImplicitSuper ASTNode currentScope methodScope referenceContext ASTNode flowInfo currentScope manageEnclosingInstanceAccessIfNecessary currentScope flowInfo manageSyntheticAccessIfNecessary currentScope flowInfo flowInfo MethodScope currentScope isConstructorCall
Constructor call code generation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream public void generate Code Block Scope current Scope Code Stream code Stream if bits Is ReachableMASK 0 return try Method Scope current Scope is Constructor Call true int pc code Stream position code Stream aload 0 handling innerclass constructor invocation Reference Binding target Type binding declaring Class handling innerclass instance allocation enclosing instance arguments if target Type is Nested Type code Stream generate Synthetic Enclosing Instance Values current Scope target Type discard Enclosing Instance null qualification this regular code gen if arguments null for int i 0 max arguments length i max i arguments i generate Code current Scope code Stream true handling innerclass instance allocation outer local arguments if target Type is Nested Type code Stream generate Synthetic Outer Argument Values current Scope target Type this if synthetic Accessor null synthetic accessor got some extra arguments appended to its signature which need values for int i 0 max synthetic Accessor parameters length binding parameters length i max i code Stream aconst null code Stream invokespecial synthetic Accessor else code Stream invokespecial binding code Stream record Positions From pc this source Start finally Method Scope current Scope is Constructor Call false  currentScope BlockScope codeStream CodeStream generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK MethodScope currentScope isConstructorCall codeStream codeStream aload_0 ReferenceBinding targetType declaringClass targetType isNestedType codeStream generateSyntheticEnclosingInstanceValues currentScope targetType discardEnclosingInstance generateCode currentScope codeStream targetType isNestedType codeStream generateSyntheticOuterArgumentValues currentScope targetType syntheticAccessor syntheticAccessor codeStream aconst_null codeStream syntheticAccessor codeStream codeStream recordPositionsFrom sourceStart MethodScope currentScope isConstructorCall
public boolean is Implicit Super return true if I m of these compiler added statement super return access Mode Implicit Super  isImplicitSuper accessMode ImplicitSuper
public boolean is Super Access return access Mode This  isSuperAccess accessMode
public boolean is Type Access return true  isTypeAccess
void manage Enclosing Instance Access If Necessary Block Scope current Scope Flow Info flow Info Reference Binding super Type if flow Info is Reachable return perform some emulation work in case there is some and we are inside a local type only if super Type binding declaring Class is Nested Type current Scope enclosing Source Type is Local Type if super Type is Local Type Local Type Binding super Type add Inner Emulation Dependent current Scope qualification null else locally propagate since we already now the desired shape for sure current Scope propagate Inner Emulation super Type qualification null  manageEnclosingInstanceAccessIfNecessary BlockScope currentScope FlowInfo flowInfo ReferenceBinding superType flowInfo isReachable superType declaringClass isNestedType currentScope enclosingSourceType isLocalType superType isLocalType LocalTypeBinding superType addInnerEmulationDependent currentScope currentScope propagateInnerEmulation superType
public void manage Synthetic Access If Necessary Block Scope current Scope Flow Info flow Info if flow Info is Reachable return perform some emulation work in case there is some and we are inside a local type only if binding is Private access Mode This if current Scope environment options is Private Constructor Access Changing Visibility binding tag For Clearing Private Modifier constructor will not be dumped as private no emulation required thus else synthetic Accessor Source Type Binding binding declaring Class add Synthetic Method binding is Super Access current Scope problem Reporter need To Emulate Method Access binding this  manageSyntheticAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable isPrivate accessMode currentScope isPrivateConstructorAccessChangingVisibility tagForClearingPrivateModifier syntheticAccessor SourceTypeBinding declaringClass addSyntheticMethod isSuperAccess currentScope problemReporter needToEmulateMethodAccess
public String Buffer print Statement int indent String Buffer output print Indent indent output if qualification null qualification print Expression 0 output append if access Mode This output append this NON NLS 1 else output append super NON NLS 1 if arguments null for int i 0 i arguments length i if i 0 output append NON NLS 1 arguments i print Expression 0 output return output append NON NLS 1  StringBuffer printStatement StringBuffer printIndent printExpression accessMode printExpression
public void resolve Block Scope scope the return type should be void for a constructor the test is made into get Constructor mark the fact that we are in a constructor call unmark at all returns Method Scope method Scope scope method Scope try Abstract Method Declaration method Declaration method Scope reference Method if method Declaration null method Declaration is Constructor Constructor Declaration method Declaration constructor Call this scope problem Reporter invalid Explicit Constructor Call this return method Scope is Constructor Call true Reference Binding receiver Type scope enclosing Source Type if access Mode This receiver Type receiver Type superclass if receiver Type null return qualification should be from the type of the enclosing Type if qualification null if access Mode Super scope problem Reporter unnecessary Enclosing Instance Specification qualification receiver Type Reference Binding enclosing Type receiver Type enclosing Type if enclosing Type null scope problem Reporter unnecessary Enclosing Instance Specification qualification receiver Type discard Enclosing Instance true else Type Binding q Tb qualification resolve Type Expecting scope enclosing Type qualification implicit Widening q Tb q Tb arguments buffering for the method lookup Type Binding argument Types No Parameters boolean args Contain Cast false if arguments null boolean arg Has Error false type Checks all arguments int length arguments length argument Types new Type Binding length for int i 0 i length i Expression argument this arguments i if argument instanceof Cast Expression argument bits Ignore Need For Cast CheckMASK will check later on args Contain Cast true if argument Types i argument resolve Type scope null arg Has Error true if arg Has Error return if binding scope get Constructor receiver Type argument Types this is Valid Binding if is Method Use Deprecated binding scope scope problem Reporter deprecated Method binding this see for user implicit widening conversion if arguments null int length arguments length Type Binding param Types binding parameters for int i 0 i length i arguments i implicit Widening param Types i argument Types i if args Contain Cast Cast Expression check Need For Argument Casts scope null receiver Type binding this arguments argument Types this if binding is Private binding modifiers Acc Private Used else if binding declaring Class null binding declaring Class receiver Type scope problem Reporter invalid Constructor this binding finally method Scope is Constructor Call false  BlockScope getConstructor MethodScope methodScope methodScope AbstractMethodDeclaration methodDeclaration methodScope referenceMethod methodDeclaration methodDeclaration isConstructor ConstructorDeclaration methodDeclaration constructorCall problemReporter invalidExplicitConstructorCall methodScope isConstructorCall ReferenceBinding receiverType enclosingSourceType accessMode receiverType receiverType receiverType enclosingType accessMode problemReporter unnecessaryEnclosingInstanceSpecification receiverType ReferenceBinding enclosingType receiverType enclosingType enclosingType problemReporter unnecessaryEnclosingInstanceSpecification receiverType discardEnclosingInstance TypeBinding qTb resolveTypeExpecting enclosingType implicitWidening qTb qTb TypeBinding argumentTypes NoParameters argsContainCast argHasError typeChecks argumentTypes TypeBinding CastExpression IgnoreNeedForCastCheckMASK argsContainCast argumentTypes resolveType argHasError argHasError getConstructor receiverType argumentTypes isValidBinding isMethodUseDeprecated problemReporter deprecatedMethod TypeBinding paramTypes implicitWidening paramTypes argumentTypes argsContainCast CastExpression checkNeedForArgumentCasts receiverType argumentTypes isPrivate AccPrivateUsed declaringClass declaringClass receiverType problemReporter invalidConstructor methodScope isConstructorCall
public void set Actual Receiver Type Reference Binding receiver Type ignored  setActualReceiverType ReferenceBinding receiverType
public void set Depth int depth ignore for here  setDepth
public void set Field Index int depth ignore for here  setFieldIndex
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope if this qualification null this qualification traverse visitor scope if this arguments null for int i 0 argument Length this arguments length i argument Length i this arguments i traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope argumentLength argumentLength endVisit

public Constant constant public Expression super 
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo flowInfo
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info boolean value Required return analyse Code current Scope flow Context flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo valueRequired analyseCode currentScope flowContext flowInfo
Constant usable for bytecode pattern optimizations but cannot be inlined since it is not strictly equivalent to the definition of constant expressions In particular some side effects may be required to occur only the end value is known return Constant known to be of boolean type public Constant optimized Boolean Constant return this constant  optimizedBooleanConstant
public static final boolean is Constant Value Representable Constant constant int constant TypeID int target TypeID true if there is no loss of precision while casting constant TypeID constant typeID if target TypeID constant TypeID return true switch target TypeID case T char switch constant TypeID case T char return true case T double return constant double Value constant char Value case T float return constant float Value constant char Value case T int return constant int Value constant char Value case T short return constant short Value constant char Value case T byte return constant byte Value constant char Value case T long return constant long Value constant char Value default return false boolean case T float switch constant TypeID case T char return constant char Value constant float Value case T double return constant double Value constant float Value case T float return true case T int return constant int Value constant float Value case T short return constant short Value constant float Value case T byte return constant byte Value constant float Value case T long return constant long Value constant float Value default return false boolean case T double switch constant TypeID case T char return constant char Value constant double Value case T double return true case T float return constant float Value constant double Value case T int return constant int Value constant double Value case T short return constant short Value constant double Value case T byte return constant byte Value constant double Value case T long return constant long Value constant double Value default return false boolean case T byte switch constant TypeID case T char return constant char Value constant byte Value case T double return constant double Value constant byte Value case T float return constant float Value constant byte Value case T int return constant int Value constant byte Value case T short return constant short Value constant byte Value case T byte return true case T long return constant long Value constant byte Value default return false boolean case T short switch constant TypeID case T char return constant char Value constant short Value case T double return constant double Value constant short Value case T float return constant float Value constant short Value case T int return constant int Value constant short Value case T short return true case T byte return constant byte Value constant short Value case T long return constant long Value constant short Value default return false boolean case T int switch constant TypeID case T char return constant char Value constant int Value case T double return constant double Value constant int Value case T float return constant float Value constant int Value case T int return true case T short return constant short Value constant int Value case T byte return constant byte Value constant int Value case T long return constant long Value constant int Value default return false boolean case T long switch constant TypeID case T char return constant char Value constant long Value case T double return constant double Value constant long Value case T float return constant float Value constant long Value case T int return constant int Value constant long Value case T short return constant short Value constant long Value case T byte return constant byte Value constant long Value case T long return true default return false boolean default return false boolean  isConstantValueRepresentable constantTypeID targetTypeID constantTypeID targetTypeID constantTypeID targetTypeID T_char constantTypeID T_char T_double doubleValue charValue T_float floatValue charValue T_int intValue charValue T_short shortValue charValue T_byte byteValue charValue T_long longValue charValue T_float constantTypeID T_char charValue floatValue T_double doubleValue floatValue T_float T_int intValue floatValue T_short shortValue floatValue T_byte byteValue floatValue T_long longValue floatValue T_double constantTypeID T_char charValue doubleValue T_double T_float floatValue doubleValue T_int intValue doubleValue T_short shortValue doubleValue T_byte byteValue doubleValue T_long longValue doubleValue T_byte constantTypeID T_char charValue byteValue T_double doubleValue byteValue T_float floatValue byteValue T_int intValue byteValue T_short shortValue byteValue T_byte T_long longValue byteValue T_short constantTypeID T_char charValue shortValue T_double doubleValue shortValue T_float floatValue shortValue T_int intValue shortValue T_short T_byte byteValue shortValue T_long longValue shortValue T_int constantTypeID T_char charValue intValue T_double doubleValue intValue T_float floatValue intValue T_int T_short shortValue intValue T_byte byteValue intValue T_long longValue intValue T_long constantTypeID T_char charValue longValue T_double doubleValue longValue T_float floatValue longValue T_int intValue longValue T_short shortValue longValue T_byte byteValue longValue T_long
Expression statements are plain expressions however they generate like normal expressions with no value required param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream public void generate Code Block Scope current Scope Code Stream code Stream if bits Is ReachableMASK 0 return generate Code current Scope code Stream false  currentScope BlockScope codeStream CodeStream generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK generateCode currentScope codeStream
Every expression is responsible for generating its implicit conversion when necessary param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required if constant NotA Constant generate a constant expression int pc code Stream position code Stream generate Constant constant implicit Conversion code Stream record Positions From pc this source Start else actual non constant code generation throw new Should Not Implement Util bind ast missing Code NON NLS 1  currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired NotAConstant codeStream codeStream generateConstant implicitConversion codeStream recordPositionsFrom sourceStart ShouldNotImplement missingCode
Default generation of a boolean value param current Scope param code Stream param true Label param false Label param value Required public void generate Optimized Boolean Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required a label valued to nil means by default we fall through the case both nil means we leave the value on the stack if constant Constant NotA Constant constant typeID T boolean int pc code Stream position if constant boolean Value true constant true if value Required if false Label null implicit falling through the FALSE case if true Label null code Stream goto  true Label else if value Required if false Label null implicit falling through the TRUE case if true Label null code Stream goto  false Label code Stream record Positions From pc this source Start return generate Code current Scope code Stream value Required branching int position code Stream position if value Required if false Label null if true Label null Implicit falling through the FALSE case code Stream ifne true Label else if true Label null Implicit falling through the TRUE case code Stream ifeq false Label else No implicit fall through TRUE FALSE should never occur reposition the endPC code Stream update Last Recorded EndPC position  currentScope codeStream trueLabel falseLabel valueRequired generateOptimizedBoolean BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired NotAConstant T_boolean codeStream booleanValue valueRequired falseLabel trueLabel codeStream goto_ trueLabel valueRequired falseLabel trueLabel codeStream goto_ falseLabel codeStream recordPositionsFrom sourceStart generateCode currentScope codeStream valueRequired codeStream valueRequired falseLabel trueLabel codeStream trueLabel trueLabel codeStream falseLabel codeStream updateLastRecordedEndPC
public void generate Optimized String Buffer Block Scope block Scope org eclipse jdt internal compiler codegen Code Stream code Stream int typeID if typeID T String this constant NotA Constant this constant string Value length 0 return optimize str generate Code block Scope code Stream true code Stream invoke String Buffer Append For Type typeID  generateOptimizedStringBuffer BlockScope blockScope CodeStream codeStream T_String NotAConstant stringValue generateCode blockScope codeStream codeStream invokeStringBufferAppendForType
public void generate Optimized String Buffer Creation Block Scope block Scope Code Stream code Stream int typeID Optimization only for integers and strings if typeID T Object in the case the runtime value of value Of Object returns null we have to use append Object instead of directly value Of Object append Object returns append value Of Object which means that the null case is handled by append String code Stream new String Buffer code Stream dup code Stream invoke String Buffer Default Constructor generate Code block Scope code Stream true code Stream invoke String Buffer Append For Type T Object return code Stream new String Buffer code Stream dup if typeID T String typeID T null if constant NotA Constant String string Value constant string Value if string Value length 0 optimize str code Stream invoke String Buffer Default Constructor return code Stream ldc string Value else generate Code block Scope code Stream true code Stream invoke String Value Of T Object else generate Code block Scope code Stream true code Stream invoke String Value Of typeID code Stream invoke String Buffer String Constructor  generateOptimizedStringBufferCreation BlockScope blockScope CodeStream codeStream T_Object valueOf valueOf valueOf codeStream newStringBuffer codeStream codeStream invokeStringBufferDefaultConstructor generateCode blockScope codeStream codeStream invokeStringBufferAppendForType T_Object codeStream newStringBuffer codeStream T_String T_null NotAConstant stringValue stringValue stringValue codeStream invokeStringBufferDefaultConstructor codeStream stringValue generateCode blockScope codeStream codeStream invokeStringValueOf T_Object generateCode blockScope codeStream codeStream invokeStringValueOf codeStream invokeStringBufferStringConstructor
Base types need that the widening is explicitly done by the compiler using some bytecode like i2f public void implicit Widening Type Binding runtime Time Type Type Binding compile Time Type if runtime Time Type null compile Time Type null return if compile Time Type id T null this case is possible only for constant null The type of runtime is a reference type The code gen use the constant id thus any value for the runtime id akak the 4 could be used T Object is used as some general T reference implicit Conversion T Object 4 T null return switch runtime Time Type id case T byte case T short case T char implicit Conversion T int 4 compile Time Type id break case T String case T float case T boolean case T double case T int implicit Conversion may result in i2i which will result in NO code gen case T long implicit Conversion runtime Time Type id 4 compile Time Type id break default nothing on regular object ref  implicitWidening TypeBinding runtimeTimeType TypeBinding compileTimeType runtimeTimeType compileTimeType compileTimeType T_null T_Object T_reference implicitConversion T_Object T_null runtimeTimeType T_byte T_short T_char implicitConversion T_int compileTimeType T_String T_float T_boolean T_double T_int implicitConversion T_long implicitConversion runtimeTimeType compileTimeType
public boolean is Compactable Operation return false  isCompactableOperation
this request some work d be done by the VM on signed numbers public boolean is Constant Value Of Type Assignable To Type Type Binding constant Type Type Binding target Type if constant Constant NotA Constant return false if constant Type target Type return true if constant Type is Base Type target Type is Base Type No free assignment conversion from anything but to integral ones if constant Type Int Binding Base Type Binding is Widening T int constant Type id Base Type Binding is Narrowing target Type id T int use current explicit conversion in order to get some new value to compare with current one return is Constant Value Representable constant constant Type id target Type id return false  isConstantValueOfTypeAssignableToType TypeBinding constantType TypeBinding targetType NotAConstant constantType targetType constantType isBaseType targetType isBaseType constantType IntBinding BaseTypeBinding isWidening T_int constantType BaseTypeBinding isNarrowing targetType T_int isConstantValueRepresentable constantType targetType
public boolean is Type Reference return false  isTypeReference
public void resolve Block Scope scope drops the returning expression s type whatever the type is this resolve Type scope return  BlockScope resolveType
public Type Binding resolve Type Block Scope scope by default subclasses should implement a better TC if required return null  TypeBinding resolveType BlockScope
public Type Binding resolve Type Class Scope class Scope by default subclasses should implement a better TB if required return null  TypeBinding resolveType ClassScope classScope
public Type Binding resolve Type Expecting Block Scope scope Type Binding expected Type Type Binding expression Type this resolve Type scope if expression Type null return null if expression Type expected Type return expression Type if expression Type is Compatible With expected Type scope problem Reporter type Mismatch Error expression Type expected Type this return null return expression Type  TypeBinding resolveTypeExpecting BlockScope TypeBinding expectedType TypeBinding expressionType resolveType expressionType expressionType expectedType expressionType expressionType isCompatibleWith expectedType problemReporter typeMismatchError expressionType expectedType expressionType
public String Buffer print int indent String Buffer output print Indent indent output return print Expression indent output  StringBuffer StringBuffer printIndent printExpression
public abstract String Buffer print Expression int indent String Buffer output  StringBuffer printExpression StringBuffer
public abstract String Buffer print Expression int indent String Buffer output public String Buffer print Statement int indent String Buffer output return print indent output append NON NLS 1  StringBuffer printExpression StringBuffer StringBuffer printStatement StringBuffer
public Expression to Type Reference by default undefined this method is meanly used by the parser in order to transform an expression that is used as a type reference in a cast appreciate the fact that cast Expression and Expression With Parenthesis starts with the same pattern return this  toTypeReference castExpression ExpressionWithParenthesis

Build a string char literal public Extended String Literal String Literal str Char Literal character super str source str source Start str source End extend With character  ExtendedStringLiteral StringLiteral CharLiteral sourceStart sourceEnd extendWith
Build a two strings literal public Extended String Literal String Literal str1 String Literal str2 super str1 source str1 source Start str1 source End extend With str2  ExtendedStringLiteral StringLiteral StringLiteral sourceStart sourceEnd extendWith
Add the lit source to mine just as if it was mine public Extended String Literal extend With Char Literal lit update the source int length source length System arraycopy source 0 source new char length 1 0 length source length lit value position at the end of all literals source End lit source End return this  ExtendedStringLiteral extendWith CharLiteral sourceEnd sourceEnd
Add the lit source to mine just as if it was mine public Extended String Literal extend With String Literal lit uddate the source int length source length System arraycopy source 0 source new char length lit source length 0 length System arraycopy lit source 0 source length lit source length position at the end of all literals source End lit source End return this  ExtendedStringLiteral extendWith StringLiteral sourceEnd sourceEnd
public String Buffer print Expression int indent String Buffer output return output append Extended String Literal append source append NON NLS 1  StringBuffer printExpression StringBuffer ExtendedStringLiteral
public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

public class False Literal extends Magic Literal static final char source f a l s e public False Literal int s int e super s e  FalseLiteral MagicLiteral FalseLiteral
super s e public void compute Constant constant Constant from Value false  computeConstant fromValue
constant Constant from Value false Code generation for false literal param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if value Required code Stream iconst 0 code Stream record Positions From pc this source Start  fromValue currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream valueRequired codeStream iconst_0 codeStream recordPositionsFrom sourceStart
public void generate Optimized Boolean Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required false Label being not nil means that we will not fall through into the FALSE case int pc code Stream position if value Required if false Label null implicit falling through the TRUE case if true Label null code Stream goto  false Label code Stream record Positions From pc this source Start  generateOptimizedBoolean BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired falseLabel codeStream valueRequired falseLabel trueLabel codeStream goto_ falseLabel codeStream recordPositionsFrom sourceStart
code Stream record Positions From pc this source Start public Type Binding literal Type Block Scope scope return Boolean Binding  codeStream recordPositionsFrom sourceStart TypeBinding literalType BlockScope BooleanBinding
public char source return source 
return source public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

public int end Part2 Position public Field Declaration for subtypes or conversion  endPart2Position FieldDeclaration
public Field Declaration char name int source Start int source End this name name due to some declaration like int x y 3 z x the source Start and the source End is ONLY on the name this source Start source Start this source End source End  FieldDeclaration sourceStart sourceEnd sourceStart sourceEnd sourceStart sourceStart sourceEnd sourceEnd
public Flow Info analyse Code Method Scope initialization Scope Flow Context flow Context Flow Info flow Info if this binding null this binding is Private this binding is Private Used if initialization Scope reference Compilation Unit compilation Result has Syntax Error initialization Scope problem Reporter unused Private Field this cannot define static non constant field inside nested class if this binding null this binding is Valid Binding this binding is Static this binding constant NotA Constant this binding declaring Class is Nested Type this binding declaring Class is Class this binding declaring Class is Static initialization Scope problem Reporter unexpected Static Modifier For Field Source Type Binding this binding declaring Class this if this initialization null flow Info this initialization analyse Code initialization Scope flow Context flow Info unconditional Inits flow Info mark As Definitely Assigned this binding return flow Info  FlowInfo analyseCode MethodScope initializationScope FlowContext flowContext FlowInfo flowInfo isPrivate isPrivateUsed initializationScope referenceCompilationUnit compilationResult hasSyntaxError initializationScope problemReporter unusedPrivateField isValidBinding isStatic NotAConstant declaringClass isNestedType declaringClass isClass declaringClass isStatic initializationScope problemReporter unexpectedStaticModifierForField SourceTypeBinding declaringClass flowInfo analyseCode initializationScope flowContext flowInfo unconditionalInits flowInfo markAsDefinitelyAssigned flowInfo
Code generation for a field declaration standard assignment to a field param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream public void generate Code Block Scope current Scope Code Stream code Stream if this bits Is ReachableMASK 0 return do not generate initialization code if final and static constant is then recorded inside the field itself int pc code Stream position boolean is Static if this initialization null is Static this binding is Static this binding constant NotA Constant non static field need receiver if is Static code Stream aload 0 generate initialization value this initialization generate Code current Scope code Stream true store into field if is Static code Stream putstatic this binding else code Stream putfield this binding code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK codeStream isStatic isStatic isStatic NotAConstant isStatic codeStream aload_0 generateCode currentScope codeStream isStatic codeStream codeStream codeStream recordPositionsFrom sourceStart
public Type Binding get Type Binding Scope scope return this type get Type Binding scope  TypeBinding getTypeBinding getTypeBinding
public boolean is Field return true  isField
public boolean is Static if this binding null return this binding is Static return this modifiers Acc Static 0  isStatic isStatic AccStatic
public void resolve Method Scope initialization Scope the two constant Constant NotA Constant could be regrouped into a single line but it is clearer to have two lines while the reason of their existence is not at all the same See comment for the second one if this has Been Resolved this binding null this binding is Valid Binding this has Been Resolved true check if field is hiding some variable issue is that field binding already got inserted in scope thus must lookup separately in super type and outer context Class Scope class Scope initialization Scope enclosing Class Scope if class Scope null Source Type Binding declaring Type class Scope enclosing Source Type boolean check Local true if declaring Type superclass null Binding existing Variable class Scope find Field declaring Type superclass this name this false do not resolve hidden field if existing Variable null existing Variable is Valid Binding initialization Scope problem Reporter field Hiding this existing Variable check Local false already found a matching field if check Local Scope outer Scope class Scope parent only corner case is lookup of outer field through static declaring Type which isn t detected by get Binding as lookup starts from outer scope Subsequent static contexts are detected for free Binding existing Variable outer Scope get Binding this name Binding Ids VARIABLE this false do not resolve hidden field if existing Variable null existing Variable is Valid Binding existing Variable instanceof Field Binding Field Binding existing Variable is Static declaring Type is Static initialization Scope problem Reporter field Hiding this existing Variable this type resolved Type this binding type update binding for type reference Field Binding previous Field initialization Scope initialized Field int previous FieldID initialization Scope last Visible FieldID try initialization Scope initialized Field this binding initialization Scope last Visible FieldID this binding id if is Type Use Deprecated this binding type initialization Scope initialization Scope problem Reporter deprecated Type this binding type this type the resolution of the initialization hasn t been done if this initialization null this binding constant Constant NotA Constant else break dead lock cycles by forcing constant to NotA Constant this binding constant Constant NotA Constant Type Binding type Binding this binding type Type Binding initialization Type Binding if this initialization instanceof Array Initializer if initialization Type Binding this initialization resolve Type Expecting initialization Scope type Binding null Array Initializer this initialization binding Array Binding initialization Type Binding this initialization implicit Widening type Binding initialization Type Binding else if initialization Type Binding this initialization resolve Type initialization Scope null if this initialization is Constant Value Of Type Assignable To Type initialization Type Binding type Binding type Binding is Base Type Base Type Binding is Widening type Binding id initialization Type Binding id this initialization implicit Widening type Binding initialization Type Binding else if initialization Type Binding is Compatible With type Binding this initialization implicit Widening type Binding initialization Type Binding else initialization Scope problem Reporter type Mismatch Error initialization Type Binding type Binding this if this binding is Final cast from constant actual type to variable type this binding constant this initialization constant cast To this binding type id 4 this initialization constant typeID else this binding constant NotA Constant Resolve Javadoc comment if one is present if this javadoc null if class Scope null this javadoc resolve class Scope this javadoc resolve initialization Scope else if this binding null this binding declaring Class null this binding declaring Class is Local Type initialization Scope problem Reporter javadoc Missing this source Start this source End this binding modifiers finally initialization Scope initialized Field previous Field initialization Scope last Visible FieldID previous FieldID if this binding constant null this binding constant Constant NotA Constant  MethodScope initializationScope NotAConstant hasBeenResolved isValidBinding hasBeenResolved ClassScope classScope initializationScope enclosingClassScope classScope SourceTypeBinding declaringType classScope enclosingSourceType checkLocal declaringType existingVariable classScope findField declaringType existingVariable existingVariable isValidBinding initializationScope problemReporter fieldHiding existingVariable checkLocal checkLocal outerScope classScope declaringType getBinding existingVariable outerScope getBinding BindingIds existingVariable existingVariable isValidBinding existingVariable FieldBinding FieldBinding existingVariable isStatic declaringType isStatic initializationScope problemReporter fieldHiding existingVariable resolvedType FieldBinding previousField initializationScope initializedField previousFieldID initializationScope lastVisibleFieldID initializationScope initializedField initializationScope lastVisibleFieldID isTypeUseDeprecated initializationScope initializationScope problemReporter deprecatedType NotAConstant NotAConstant NotAConstant TypeBinding typeBinding TypeBinding initializationTypeBinding ArrayInitializer initializationTypeBinding resolveTypeExpecting initializationScope typeBinding ArrayInitializer ArrayBinding initializationTypeBinding implicitWidening typeBinding initializationTypeBinding initializationTypeBinding resolveType initializationScope isConstantValueOfTypeAssignableToType initializationTypeBinding typeBinding typeBinding isBaseType BaseTypeBinding isWidening typeBinding initializationTypeBinding implicitWidening typeBinding initializationTypeBinding initializationTypeBinding isCompatibleWith typeBinding implicitWidening typeBinding initializationTypeBinding initializationScope problemReporter typeMismatchError initializationTypeBinding typeBinding isFinal castTo NotAConstant classScope classScope initializationScope declaringClass declaringClass isLocalType initializationScope problemReporter javadocMissing sourceStart sourceEnd initializationScope initializedField previousField initializationScope lastVisibleFieldID previousFieldID NotAConstant
public void traverse AST Visitor visitor Method Scope scope if visitor visit this scope this type traverse visitor scope if this initialization null this initialization traverse visitor scope visitor end Visit this scope  ASTVisitor MethodScope endVisit

public Field Reference char source long pos token source name Source Position pos by default the position are the one of the field not true for super access source Start int pos 32 source End int pos 0x00000000FFFFFFFFL bits Binding Ids FIELD  FieldReference nameSourcePosition sourceStart sourceEnd BindingIds
public Flow Info analyse Assignment Block Scope current Scope Flow Context flow Context Flow Info flow Info Assignment assignment boolean is Compound compound assignment extra work if is Compound check the variable part is initialized if blank final if binding is Blank Final receiver is This current Scope allow Blank Final Field Assignment binding flow Info is Definitely Assigned binding current Scope problem Reporter uninitialized Blank Final Field binding this we could improve error msg here telling cannot use compound assignment on final blank field manage Synthetic Read Access If Necessary current Scope flow Info flow Info receiver analyse Code current Scope flow Context flow Info binding is Static unconditional Inits if assignment expression null flow Info assignment expression analyse Code current Scope flow Context flow Info unconditional Inits manage Synthetic Write Access If Necessary current Scope flow Info check if assigning a final field if binding is Final in a context where it can be assigned if binding is Blank Final is Compound receiver is This receiver instanceof Qualified This Reference receiver bits ParenthesizedMASK 0 this x is forbidden current Scope allow Blank Final Field Assignment binding if flow Info is Potentially Assigned binding current Scope problem Reporter duplicate Initialization Of Blank Final Field binding this else flow Context record Setting Final binding this flow Info flow Info mark As Definitely Assigned binding else assigning a final field outside an initializer or constructor or wrong reference current Scope problem Reporter cannot Assign To Final Field binding this return flow Info  FlowInfo analyseAssignment BlockScope currentScope FlowContext flowContext FlowInfo flowInfo isCompound isCompound isBlankFinal isThis currentScope allowBlankFinalFieldAssignment flowInfo isDefinitelyAssigned currentScope problemReporter uninitializedBlankFinalField manageSyntheticReadAccessIfNecessary currentScope flowInfo flowInfo analyseCode currentScope flowContext flowInfo isStatic unconditionalInits flowInfo analyseCode currentScope flowContext flowInfo unconditionalInits manageSyntheticWriteAccessIfNecessary currentScope flowInfo isFinal isBlankFinal isCompound isThis QualifiedThisReference currentScope allowBlankFinalFieldAssignment flowInfo isPotentiallyAssigned currentScope problemReporter duplicateInitializationOfBlankFinalField flowContext recordSettingFinal flowInfo flowInfo markAsDefinitelyAssigned currentScope problemReporter cannotAssignToFinalField flowInfo
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info return analyse Code current Scope flow Context flow Info true  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo analyseCode currentScope flowContext flowInfo
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info boolean value Required receiver analyse Code current Scope flow Context flow Info binding is Static if value Required manage Synthetic Read Access If Necessary current Scope flow Info return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo valueRequired analyseCode currentScope flowContext flowInfo isStatic valueRequired manageSyntheticReadAccessIfNecessary currentScope flowInfo flowInfo
public Field Binding field Binding return binding  FieldBinding fieldBinding
public void generate Assignment Block Scope current Scope Code Stream code Stream Assignment assignment boolean value Required receiver generate Code current Scope code Stream this codegen Binding is Static assignment expression generate Code current Scope code Stream true field Store code Stream this codegen Binding synthetic Write Accessor value Required if value Required code Stream generate Implicit Conversion assignment implicit Conversion  generateAssignment BlockScope currentScope CodeStream codeStream valueRequired generateCode currentScope codeStream codegenBinding isStatic generateCode currentScope codeStream fieldStore codeStream codegenBinding syntheticWriteAccessor valueRequired valueRequired codeStream generateImplicitConversion implicitConversion
Field reference code generation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if constant NotA Constant if value Required code Stream generate Constant constant implicit Conversion else boolean is Static this codegen Binding is Static receiver generate Code current Scope code Stream is Static if value Required if this codegen Binding constant NotA Constant if this codegen Binding declaring Class null array length code Stream arraylength else if synthetic Read Accessor null if is Static code Stream getstatic this codegen Binding else code Stream getfield this codegen Binding else code Stream invokestatic synthetic Read Accessor code Stream generate Implicit Conversion implicit Conversion else if is Static code Stream invoke Object Get Class perform null check code Stream pop code Stream generate Constant this codegen Binding constant implicit Conversion else if is Static code Stream invoke Object Get Class perform null check code Stream pop code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream NotAConstant valueRequired codeStream generateConstant implicitConversion isStatic codegenBinding isStatic generateCode currentScope codeStream isStatic valueRequired codegenBinding NotAConstant codegenBinding declaringClass codeStream syntheticReadAccessor isStatic codeStream codegenBinding codeStream codegenBinding codeStream syntheticReadAccessor codeStream generateImplicitConversion implicitConversion isStatic codeStream invokeObjectGetClass codeStream codeStream generateConstant codegenBinding implicitConversion isStatic codeStream invokeObjectGetClass codeStream codeStream recordPositionsFrom sourceStart
public void generate Compound Assignment Block Scope current Scope Code Stream code Stream Expression expression int operator int assignment Implicit Conversion boolean value Required boolean is Static receiver generate Code current Scope code Stream is Static this codegen Binding is Static if is Static if synthetic Read Accessor null code Stream getstatic this codegen Binding else code Stream invokestatic synthetic Read Accessor else code Stream dup if synthetic Read Accessor null code Stream getfield this codegen Binding else code Stream invokestatic synthetic Read Accessor int operation TypeID if operation TypeID implicit Conversion 4 T String code Stream generate String Append current Scope null expression else promote the array reference to the suitable operation type code Stream generate Implicit Conversion implicit Conversion generate the increment value will by itself be promoted to the operation value if expression Int Literal One prefix operation code Stream generate Constant expression constant implicit Conversion else expression generate Code current Scope code Stream true perform the operation code Stream send Operator operator operation TypeID cast the value back to the array reference type code Stream generate Implicit Conversion assignment Implicit Conversion field Store code Stream this codegen Binding synthetic Write Accessor value Required  generateCompoundAssignment BlockScope currentScope CodeStream codeStream assignmentImplicitConversion valueRequired isStatic generateCode currentScope codeStream isStatic codegenBinding isStatic isStatic syntheticReadAccessor codeStream codegenBinding codeStream syntheticReadAccessor codeStream syntheticReadAccessor codeStream codegenBinding codeStream syntheticReadAccessor operationTypeID operationTypeID implicitConversion T_String codeStream generateStringAppend currentScope codeStream generateImplicitConversion implicitConversion IntLiteral codeStream generateConstant implicitConversion generateCode currentScope codeStream codeStream sendOperator operationTypeID codeStream generateImplicitConversion assignmentImplicitConversion fieldStore codeStream codegenBinding syntheticWriteAccessor valueRequired
public void generate Post Increment Block Scope current Scope Code Stream code Stream Compound Assignment post Increment boolean value Required boolean is Static receiver generate Code current Scope code Stream is Static this codegen Binding is Static if is Static if synthetic Read Accessor null code Stream getstatic this codegen Binding else code Stream invokestatic synthetic Read Accessor else code Stream dup if synthetic Read Accessor null code Stream getfield this codegen Binding else code Stream invokestatic synthetic Read Accessor if value Required if is Static if this codegen Binding type Long Binding this codegen Binding type Double Binding code Stream dup2 else code Stream dup else Stack owner old field value old field value owner old field value if this codegen Binding type Long Binding this codegen Binding type Double Binding code Stream dup2 x1 else code Stream dup x1 code Stream generate Constant post Increment expression constant implicit Conversion code Stream send Operator post Increment operator this codegen Binding type id code Stream generate Implicit Conversion post Increment assignment Implicit Conversion field Store code Stream this codegen Binding synthetic Write Accessor false  generatePostIncrement BlockScope currentScope CodeStream codeStream CompoundAssignment postIncrement valueRequired isStatic generateCode currentScope codeStream isStatic codegenBinding isStatic isStatic syntheticReadAccessor codeStream codegenBinding codeStream syntheticReadAccessor codeStream syntheticReadAccessor codeStream codegenBinding codeStream syntheticReadAccessor valueRequired isStatic codegenBinding LongBinding codegenBinding DoubleBinding codeStream codeStream codegenBinding LongBinding codegenBinding DoubleBinding codeStream dup2_x1 codeStream dup_x1 codeStream generateConstant postIncrement implicitConversion codeStream sendOperator postIncrement codegenBinding codeStream generateImplicitConversion postIncrement assignmentImplicitConversion fieldStore codeStream codegenBinding syntheticWriteAccessor
public static final Constant get Constant For Field Binding binding Reference reference boolean is Implicit Scope reference Scope propagation of the constant ref can be a Field Reference a Single Name Reference or a Qualified Name Reference index In Qualification may have a value greater than zero only for Qualifiedname Reference if ref null then index In Qualification 0 AND implicit Receiver false This case is a degenerated case where a fake reference field null is associted to a real Field Binding in order to allow its constant computation using the regular path in other words find the field Declaration and proceed to its type resolution As implicit Receiver is false no error reporting against ref will be used no null Pointer Exception risk special treatment for langage built in field their declaring class is null if binding declaring Class null currently only one field length the constant computation is never done return NotA Constant if binding is Final return binding constant NotA Constant if binding constant null if is Implicit reference instanceof Qualified Name Reference binding Qualified Name Reference reference binding return binding constant return NotA Constant The field has not been yet type checked It also means that the field is not coming from a class that has already been compiled It can only be from a class within compilation units to process Thus the field is NOT from a Binary Type Binbing Source Type Binding type Binding Source Type Binding binding declaring Class Type Declaration type Decl type Binding scope reference Context Field Declaration field Decl type Decl declaration Of binding field Decl resolve binding is Static side effect on binding type Decl static Initializer Scope type Decl initializer Scope if is Implicit reference instanceof Qualified Name Reference binding Qualified Name Reference reference binding return binding constant return NotA Constant  getConstantFor FieldBinding isImplicit referenceScope FieldReference SingleNameReference QualifiedNameReference indexInQualification QualifiednameReference indexInQualification implicitReceiver FieldBinding fieldDeclaration implicitReceiver nullPointerException declaringClass NotAConstant isFinal NotAConstant isImplicit QualifiedNameReference QualifiedNameReference NotAConstant BinaryTypeBinbing SourceTypeBinding typeBinding SourceTypeBinding declaringClass TypeDeclaration typeDecl typeBinding referenceContext FieldDeclaration fieldDecl typeDecl declarationOf fieldDecl isStatic typeDecl staticInitializerScope typeDecl initializerScope isImplicit QualifiedNameReference QualifiedNameReference NotAConstant
public boolean is Super Access return receiver is Super  isSuperAccess isSuper
public boolean is Type Access return receiver null receiver is Type Reference  isTypeAccess isTypeReference
public void manage Synthetic Read Access If Necessary Block Scope current Scope Flow Info flow Info if flow Info is Reachable return if binding is Private if current Scope enclosing Source Type binding declaring Class binding constant NotA Constant synthetic Read Accessor Source Type Binding binding declaring Class add Synthetic Method binding true current Scope problem Reporter need To Emulate Field Read Access binding this return else if receiver instanceof Qualified Super Reference qualified super qualified super need emulation always Source Type Binding destination Type Source Type Binding Qualified Super Reference receiver current Compatible Type synthetic Read Accessor destination Type add Synthetic Method binding true current Scope problem Reporter need To Emulate Field Read Access binding this return else if binding is Protected Source Type Binding enclosing Source Type if bits DepthMASK 0 binding declaring Class get Package enclosing Source Type current Scope enclosing Source Type get Package Source Type Binding current Compatible Type Source Type Binding enclosing Source Type enclosing Type At bits DepthMASK DepthSHIFT synthetic Read Accessor current Compatible Type add Synthetic Method binding true current Scope problem Reporter need To Emulate Field Read Access binding this return if the binding declaring class is not visible need special action for runtime compatibility on 1 2 V Ms change the declaring class of the binding NOTE from target 1 2 on field s declaring class is touched if any different from receiver type if binding declaring Class this receiver Type this receiver Type is Array Type binding declaring Class null array length binding constant NotA Constant current Scope environment options targetJDK Class File Constants JDK1 2 binding declaring Class id T Object no change for Object fields in case there was binding declaring Class can Be Seen By current Scope this codegen Binding current Scope enclosing Source Type get Updated Field Binding binding Reference Binding this receiver Type  manageSyntheticReadAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable isPrivate currentScope enclosingSourceType declaringClass NotAConstant syntheticReadAccessor SourceTypeBinding declaringClass addSyntheticMethod currentScope problemReporter needToEmulateFieldReadAccess QualifiedSuperReference SourceTypeBinding destinationType SourceTypeBinding QualifiedSuperReference currentCompatibleType syntheticReadAccessor destinationType addSyntheticMethod currentScope problemReporter needToEmulateFieldReadAccess isProtected SourceTypeBinding enclosingSourceType declaringClass getPackage enclosingSourceType currentScope enclosingSourceType getPackage SourceTypeBinding currentCompatibleType SourceTypeBinding enclosingSourceType enclosingTypeAt syntheticReadAccessor currentCompatibleType addSyntheticMethod currentScope problemReporter needToEmulateFieldReadAccess VMs declaringClass receiverType receiverType isArrayType declaringClass NotAConstant currentScope ClassFileConstants JDK1_2 declaringClass T_Object declaringClass canBeSeenBy currentScope codegenBinding currentScope enclosingSourceType getUpdatedFieldBinding ReferenceBinding receiverType
public void manage Synthetic Write Access If Necessary Block Scope current Scope Flow Info flow Info if flow Info is Reachable return if binding is Private if current Scope enclosing Source Type binding declaring Class synthetic Write Accessor Source Type Binding binding declaring Class add Synthetic Method binding false current Scope problem Reporter need To Emulate Field Write Access binding this return else if receiver instanceof Qualified Super Reference qualified super qualified super need emulation always Source Type Binding destination Type Source Type Binding Qualified Super Reference receiver current Compatible Type synthetic Write Accessor destination Type add Synthetic Method binding false current Scope problem Reporter need To Emulate Field Write Access binding this return else if binding is Protected Source Type Binding enclosing Source Type if bits DepthMASK 0 binding declaring Class get Package enclosing Source Type current Scope enclosing Source Type get Package Source Type Binding current Compatible Type Source Type Binding enclosing Source Type enclosing Type At bits DepthMASK DepthSHIFT synthetic Write Accessor current Compatible Type add Synthetic Method binding false current Scope problem Reporter need To Emulate Field Write Access binding this return if the binding declaring class is not visible need special action for runtime compatibility on 1 2 V Ms change the declaring class of the binding NOTE from target 1 2 on field s declaring class is touched if any different from receiver type if binding declaring Class this receiver Type this receiver Type is Array Type binding declaring Class null array length binding constant NotA Constant current Scope environment options targetJDK Class File Constants JDK1 2 binding declaring Class id T Object no change for Object fields in case there was binding declaring Class can Be Seen By current Scope this codegen Binding current Scope enclosing Source Type get Updated Field Binding binding Reference Binding this receiver Type  manageSyntheticWriteAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable isPrivate currentScope enclosingSourceType declaringClass syntheticWriteAccessor SourceTypeBinding declaringClass addSyntheticMethod currentScope problemReporter needToEmulateFieldWriteAccess QualifiedSuperReference SourceTypeBinding destinationType SourceTypeBinding QualifiedSuperReference currentCompatibleType syntheticWriteAccessor destinationType addSyntheticMethod currentScope problemReporter needToEmulateFieldWriteAccess isProtected SourceTypeBinding enclosingSourceType declaringClass getPackage enclosingSourceType currentScope enclosingSourceType getPackage SourceTypeBinding currentCompatibleType SourceTypeBinding enclosingSourceType enclosingTypeAt syntheticWriteAccessor currentCompatibleType addSyntheticMethod currentScope problemReporter needToEmulateFieldWriteAccess VMs declaringClass receiverType receiverType isArrayType declaringClass NotAConstant currentScope ClassFileConstants JDK1_2 declaringClass T_Object declaringClass canBeSeenBy currentScope codegenBinding currentScope enclosingSourceType getUpdatedFieldBinding ReferenceBinding receiverType
public String Buffer print Expression int indent String Buffer output return receiver print Expression 0 output append append token  StringBuffer printExpression StringBuffer printExpression
public Type Binding resolve Type Block Scope scope Answer the signature type of the field constants are propaged when the field is final and initialized with a compile time constant always ignore receiver cast since may affect constant pool reference boolean receiver Cast false if this receiver instanceof Cast Expression this receiver bits Ignore Need For Cast CheckMASK will check later on receiver Cast true this receiver Type receiver resolve Type scope if this receiver Type null constant NotA Constant return null if receiver Cast due to change of declaring class with receiver type only identity cast should be notified if Cast Expression this receiver expression resolved Type this receiver Type scope problem Reporter unnecessary Cast Cast Expression this receiver the case receiver Type is Array Type and token length is handled by the scope API this codegen Binding this binding scope get Field this receiver Type token this if binding is Valid Binding constant NotA Constant scope problem Reporter invalid Field this this receiver Type return null if is Field Use Deprecated binding scope this bits Is Strictly AssignedMASK 0 scope problem Reporter deprecated Field binding this boolean is Implicit This Rcv receiver is Implicit This constant Field Reference get Constant For binding this is Implicit This Rcv scope if is Implicit This Rcv constant NotA Constant if binding is Static static field accessed through receiver legal but unoptimal optional warning if is Implicit This Rcv receiver is Super receiver instanceof Name Reference Name Reference receiver bits Binding Ids TYPE 0 scope problem Reporter non Static Access To Static Field this binding if is Implicit This Rcv binding declaring Class receiver Type scope problem Reporter indirect Access To Static Field this binding return this resolved Type binding type  TypeBinding resolveType BlockScope receiverCast CastExpression IgnoreNeedForCastCheckMASK receiverCast receiverType resolveType receiverType NotAConstant receiverCast CastExpression resolvedType receiverType problemReporter unnecessaryCast CastExpression receiverType isArrayType codegenBinding getField receiverType isValidBinding NotAConstant problemReporter invalidField receiverType isFieldUseDeprecated IsStrictlyAssignedMASK problemReporter deprecatedField isImplicitThisRcv isImplicitThis FieldReference getConstantFor isImplicitThisRcv isImplicitThisRcv NotAConstant isStatic isImplicitThisRcv isSuper NameReference NameReference BindingIds problemReporter nonStaticAccessToStaticField isImplicitThisRcv declaringClass receiverType problemReporter indirectAccessToStaticField resolvedType
public void set Actual Receiver Type Reference Binding receiver Type ignored  setActualReceiverType ReferenceBinding receiverType
public void set Depth int depth bits DepthMASK flush previous depth if any if depth 0 bits depth 0xFF DepthSHIFT encoded on 8 bits  setDepth
public void set Field Index int index ignored  setFieldIndex
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope receiver traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

float value final static float Float MIN VALUE Float int Bits To Float 1 work around VAJ problem 1F6IGUU public Float Literal char token int s int e super token s e  Float_MIN_VALUE intBitsToFloat FloatLiteral
public void compute Constant the source is correctly formated so the exception should never occurs Float computed Value try computed Value Float value Of String value Of source catch Number Format Exception e return if computed Value double Value Float MAX VALUE return may be Infinity if computed Value float Value Float MIN VALUE see 1F6IGUU only a true 0 can be made of zeros 1 00000000e 46f is illegal label for int i 0 i source length i switch source i case case f case F case 0 break case e case E break label exposant are valid default return error constant Constant from Value value computed Value float Value  computeConstant computedValue computedValue valueOf valueOf NumberFormatException computedValue doubleValue MAX_VALUE computedValue floatValue Float_MIN_VALUE fromValue computedValue floatValue
Code generation for float literal param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if value Required if implicit Conversion 4 T float code Stream generate Inlined Value value else code Stream generate Constant constant implicit Conversion code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream valueRequired implicitConversion T_float codeStream generateInlinedValue codeStream generateConstant implicitConversion codeStream recordPositionsFrom sourceStart
code Stream record Positions From pc this source Start public Type Binding literal Type Block Scope scope return Float Binding  codeStream recordPositionsFrom sourceStart TypeBinding literalType BlockScope FloatBinding
return Float Binding public void traverse AST Visitor visitor Block Scope block Scope visitor visit this block Scope visitor end Visit this block Scope  FloatBinding ASTVisitor BlockScope blockScope blockScope endVisit blockScope

public For Statement Statement initializations Expression condition Statement increments Statement action boolean needed Scope int s int e this source Start s this source End e this initializations initializations this condition condition this increments increments this action action remember useful empty statement if action instanceof Empty Statement action bits Is Useful Empty StatementMASK this needed Scope needed Scope  ForStatement neededScope sourceStart sourceEnd EmptyStatement IsUsefulEmptyStatementMASK neededScope neededScope
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info break Label new Label continue Label new Label process the initializations if initializations null for int i 0 count initializations length i count i flow Info initializations i analyse Code scope flow Context flow Info pre Cond Init State Index current Scope method Scope record Initialization States flow Info Constant cst this condition null null this condition constant boolean is Condition True cst null cst NotA Constant cst boolean Value true boolean is Condition False cst null cst NotA Constant cst boolean Value false cst this condition null null this condition optimized Boolean Constant boolean is Condition Optimized True cst null cst NotA Constant cst boolean Value true boolean is Condition Optimized False cst null cst NotA Constant cst boolean Value false process the condition Looping Flow Context cond Loop Context null if condition null if is Condition True flow Info condition analyse Code scope cond Loop Context new Looping Flow Context flow Context this null null scope flow Info process the action Looping Flow Context looping Context Flow Info action Info if action null action is Empty Block current Scope environment options compliance Level Class File Constants JDK1 3 if cond Loop Context null cond Loop Context complain On Final Assignments In Loop scope flow Info if is Condition True return Flow Info DEAD END else if is Condition False continue Label null for false p action Info flow Info inits When True copy looping Context new Looping Flow Context flow Context this break Label continue Label scope else looping Context new Looping Flow Context flow Context this break Label continue Label scope Flow Info inits When True flow Info inits When True cond If True Init State Index current Scope method Scope record Initialization States inits When True if is Condition False action Info Flow Info DEAD END else action Info inits When True copy if is Condition Optimized False action Info set Reach Mode Flow Info UNREACHABLE if this action complain If Unreachable action Info scope false action Info action analyse Code scope looping Context action Info code generation can be optimized when no need to continue in the loop if action Info is Reachable looping Context inits On Continue is Reachable continue Label null else if cond Loop Context null cond Loop Context complain On Final Assignments In Loop scope flow Info action Info action Info merged With looping Context inits On Continue unconditional Inits looping Context complain On Final Assignments In Loop scope action Info for increments if continue Label null increments null Looping Flow Context loop Context new Looping Flow Context flow Context this null null scope for int i 0 count increments length i count i action Info increments i analyse Code scope loop Context action Info loop Context complain On Final Assignments In Loop scope action Info end of loop Flow Info merged Info Flow Info merged Optimized Branches looping Context inits On Break is Condition Optimized True flow Info inits When False is Condition Optimized False is Condition True for while true unreachable merged Init State Index current Scope method Scope record Initialization States merged Info return merged Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo breakLabel continueLabel flowInfo analyseCode flowContext flowInfo preCondInitStateIndex currentScope methodScope recordInitializationStates flowInfo isConditionTrue NotAConstant booleanValue isConditionFalse NotAConstant booleanValue optimizedBooleanConstant isConditionOptimizedTrue NotAConstant booleanValue isConditionOptimizedFalse NotAConstant booleanValue LoopingFlowContext condLoopContext isConditionTrue flowInfo analyseCode condLoopContext LoopingFlowContext flowContext flowInfo LoopingFlowContext loopingContext FlowInfo actionInfo isEmptyBlock currentScope complianceLevel ClassFileConstants JDK1_3 condLoopContext condLoopContext complainOnFinalAssignmentsInLoop flowInfo isConditionTrue FlowInfo DEAD_END isConditionFalse continueLabel actionInfo flowInfo initsWhenTrue loopingContext LoopingFlowContext flowContext breakLabel continueLabel loopingContext LoopingFlowContext flowContext breakLabel continueLabel FlowInfo initsWhenTrue flowInfo initsWhenTrue condIfTrueInitStateIndex currentScope methodScope recordInitializationStates initsWhenTrue isConditionFalse actionInfo FlowInfo DEAD_END actionInfo initsWhenTrue isConditionOptimizedFalse actionInfo setReachMode FlowInfo complainIfUnreachable actionInfo actionInfo analyseCode loopingContext actionInfo actionInfo isReachable loopingContext initsOnContinue isReachable continueLabel condLoopContext condLoopContext complainOnFinalAssignmentsInLoop flowInfo actionInfo actionInfo mergedWith loopingContext initsOnContinue unconditionalInits loopingContext complainOnFinalAssignmentsInLoop actionInfo continueLabel LoopingFlowContext loopContext LoopingFlowContext flowContext actionInfo analyseCode loopContext actionInfo loopContext complainOnFinalAssignmentsInLoop actionInfo FlowInfo mergedInfo FlowInfo mergedOptimizedBranches loopingContext initsOnBreak isConditionOptimizedTrue flowInfo initsWhenFalse isConditionOptimizedFalse isConditionTrue mergedInitStateIndex currentScope methodScope recordInitializationStates mergedInfo mergedInfo
For statement code generation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream public void generate Code Block Scope current Scope Code Stream code Stream if bits Is ReachableMASK 0 return int pc code Stream position generate the initializations if initializations null for int i 0 max initializations length i max i initializations i generate Code scope code Stream label management Label action Label new Label code Stream Label condition Label new Label code Stream break Label initialize code Stream if continue Label null continue Label initialize code Stream jump over the action Block if condition null condition constant NotA Constant action null action is Empty Block increments null int jumpPC code Stream position code Stream goto  condition Label code Stream record Positions From jumpPC condition source Start generate the loop action action Label place if action null Required to fix 1PR0XVS LFRE WINNT Compiler variable table for method appears incorrect if cond If True Init State Index 1 insert all locals initialized inside the condition into the action generated prior to the condition code Stream add Definitely Assigned Variables current Scope cond If True Init State Index action generate Code scope code Stream continuation point if continue Label null continue Label place generate the increments for next iteration if increments null for int i 0 max increments length i max i increments i generate Code scope code Stream May loose some local variable initializations affecting the local variable attributes if pre Cond Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope pre Cond Init State Index generate the condition condition Label place if condition null condition constant NotA Constant condition generate Optimized Boolean scope code Stream action Label null true else if continue Label null code Stream goto  action Label break Label place May loose some local variable initializations affecting the local variable attributes if needed Scope code Stream exit User Scope scope if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK codeStream generateCode codeStream actionLabel codeStream conditionLabel codeStream breakLabel codeStream continueLabel continueLabel codeStream actionBlock NotAConstant isEmptyBlock codeStream codeStream goto_ conditionLabel codeStream recordPositionsFrom sourceStart actionLabel condIfTrueInitStateIndex codeStream addDefinitelyAssignedVariables currentScope condIfTrueInitStateIndex generateCode codeStream continueLabel continueLabel generateCode codeStream preCondInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope preCondInitStateIndex conditionLabel NotAConstant generateOptimizedBoolean codeStream actionLabel continueLabel codeStream goto_ actionLabel breakLabel neededScope codeStream exitUserScope mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex codeStream recordPositionsFrom sourceStart
public String Buffer print Statement int tab String Buffer output print Indent tab output append for NON NLS 1 inits if initializations null for int i 0 i initializations length i nice only with expressions if i 0 output append NON NLS 1 initializations i print 0 output output append NON NLS 1 cond if condition null condition print Expression 0 output output append NON NLS 1 updates if increments null for int i 0 i increments length i if i 0 output append NON NLS 1 increments i print 0 output output append NON NLS 1 block if action null output append else output append n action print Statement tab 1 output NON NLS 1 return output append  StringBuffer printStatement StringBuffer printIndent printExpression printStatement
public void resolve Block Scope upper Scope use the scope that will hold the init declarations scope needed Scope new Block Scope upper Scope upper Scope if initializations null for int i 0 length initializations length i length i initializations i resolve scope if condition null Type Binding type condition resolve Type Expecting scope Boolean Binding condition implicit Widening type type if increments null for int i 0 length increments length i length i increments i resolve scope if action null action resolve scope  BlockScope upperScope neededScope BlockScope upperScope upperScope TypeBinding resolveTypeExpecting BooleanBinding implicitWidening
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope if initializations null int initializations Length initializations length for int i 0 i initializations Length i initializations i traverse visitor scope if condition null condition traverse visitor scope if increments null int increments Length increments length for int i 0 i increments Length i increments i traverse visitor scope if action null action traverse visitor scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope initializationsLength initializationsLength incrementsLength incrementsLength endVisit blockScope

public If Statement Expression condition Statement then Statement int source Start int source End this condition condition this then Statement then Statement remember useful empty statement if then Statement instanceof Empty Statement then Statement bits Is Useful Empty StatementMASK this source Start source Start this source End source End  IfStatement thenStatement sourceStart sourceEnd thenStatement thenStatement thenStatement EmptyStatement thenStatement IsUsefulEmptyStatementMASK sourceStart sourceStart sourceEnd sourceEnd
public If Statement Expression condition Statement then Statement Statement else Statement int source Start int source End this condition condition this then Statement then Statement remember useful empty statement if then Statement instanceof Empty Statement then Statement bits Is Useful Empty StatementMASK this else Statement else Statement if else Statement instanceof If Statement else Statement bits Is Else If Statement this source Start source Start this source End source End  IfStatement thenStatement elseStatement sourceStart sourceEnd thenStatement thenStatement thenStatement EmptyStatement thenStatement IsUsefulEmptyStatementMASK elseStatement elseStatement elseStatement IfStatement elseStatement IsElseIfStatement sourceStart sourceStart sourceEnd sourceEnd
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info process the condition flow Info condition analyse Code current Scope flow Context flow Info Constant cst this condition optimized Boolean Constant boolean is Condition Optimized True cst NotA Constant cst boolean Value true boolean is Condition Optimized False cst NotA Constant cst boolean Value false process the THEN part Flow Info then Flow Info flow Info inits When True copy if is Condition Optimized False then Flow Info set Reach Mode Flow Info UNREACHABLE if this then Statement null Save info for code gen then Init State Index current Scope method Scope record Initialization States then Flow Info if then Statement complain If Unreachable then Flow Info current Scope false then Flow Info then Statement analyse Code current Scope flow Context then Flow Info code gen optimizing the jump around the ELSE part this then Exit then Flow Info is Reachable process the ELSE part Flow Info else Flow Info flow Info inits When False copy if is Condition Optimized True else Flow Info set Reach Mode Flow Info UNREACHABLE if this else Statement null signal else clause unnecessarily nested tolerate else if code pattern if then Flow Info Flow Info DEAD END this bits Is Else If Statement 0 else of an else if this else Statement instanceof If Statement current Scope problem Reporter unnecessary Else this else Statement Save info for code gen else Init State Index current Scope method Scope record Initialization States else Flow Info if else Statement complain If Unreachable else Flow Info current Scope false else Flow Info else Statement analyse Code current Scope flow Context else Flow Info merge THEN ELSE initializations Flow Info merged Info Flow Info merged Optimized Branches then Flow Info is Condition Optimized True else Flow Info is Condition Optimized False true if true return fake reachable merged Init State Index current Scope method Scope record Initialization States merged Info return merged Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo flowInfo analyseCode currentScope flowContext flowInfo optimizedBooleanConstant isConditionOptimizedTrue NotAConstant booleanValue isConditionOptimizedFalse NotAConstant booleanValue FlowInfo thenFlowInfo flowInfo initsWhenTrue isConditionOptimizedFalse thenFlowInfo setReachMode FlowInfo thenStatement thenInitStateIndex currentScope methodScope recordInitializationStates thenFlowInfo thenStatement complainIfUnreachable thenFlowInfo currentScope thenFlowInfo thenStatement analyseCode currentScope flowContext thenFlowInfo thenExit thenFlowInfo isReachable FlowInfo elseFlowInfo flowInfo initsWhenFalse isConditionOptimizedTrue elseFlowInfo setReachMode FlowInfo elseStatement thenFlowInfo FlowInfo DEAD_END IsElseIfStatement elseStatement IfStatement currentScope problemReporter unnecessaryElse elseStatement elseInitStateIndex currentScope methodScope recordInitializationStates elseFlowInfo elseStatement complainIfUnreachable elseFlowInfo currentScope elseFlowInfo elseStatement analyseCode currentScope flowContext elseFlowInfo FlowInfo mergedInfo FlowInfo mergedOptimizedBranches thenFlowInfo isConditionOptimizedTrue elseFlowInfo isConditionOptimizedFalse mergedInitStateIndex currentScope methodScope recordInitializationStates mergedInfo mergedInfo
If code generation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream public void generate Code Block Scope current Scope Code Stream code Stream if this bits Is ReachableMASK 0 return int pc code Stream position Label endif Label new Label code Stream optimizing the then else part code gen Constant cst boolean has Then Part cst this condition optimized Boolean Constant NotA Constant cst boolean Value false this then Statement null this then Statement is Empty Block boolean has Else Part cst NotA Constant cst boolean Value true this else Statement null this else Statement is Empty Block if has Then Part Label false Label generate boolean condition this condition generate Optimized Boolean current Scope code Stream null false Label new Label code Stream true May loose some local variable initializations affecting the local variable attributes if then Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope then Init State Index code Stream add Definitely Assigned Variables current Scope then Init State Index generate then statement this then Statement generate Code current Scope code Stream jump around the else statement if has Else Part then Exit this then Statement branch Chain To endif Label int position code Stream position code Stream goto  endif Label code Stream update Last Recorded EndPC position goto is tagged as part of the then Action block false Label place else if has Else Part generate boolean condition this condition generate Optimized Boolean current Scope code Stream endif Label null true else generate condition side effects this condition generate Code current Scope code Stream false code Stream record Positions From pc this source Start generate else statement if has Else Part May loose some local variable initializations affecting the local variable attributes if else Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope else Init State Index code Stream add Definitely Assigned Variables current Scope else Init State Index this else Statement generate Code current Scope code Stream endif Label place May loose some local variable initializations affecting the local variable attributes if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK codeStream endifLabel codeStream hasThenPart optimizedBooleanConstant NotAConstant booleanValue thenStatement thenStatement isEmptyBlock hasElsePart NotAConstant booleanValue elseStatement elseStatement isEmptyBlock hasThenPart falseLabel generateOptimizedBoolean currentScope codeStream falseLabel codeStream thenInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope thenInitStateIndex codeStream addDefinitelyAssignedVariables currentScope thenInitStateIndex thenStatement generateCode currentScope codeStream hasElsePart thenExit thenStatement branchChainTo endifLabel codeStream codeStream goto_ endifLabel codeStream updateLastRecordedEndPC thenAction falseLabel hasElsePart generateOptimizedBoolean currentScope codeStream endifLabel generateCode currentScope codeStream codeStream recordPositionsFrom sourceStart hasElsePart elseInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope elseInitStateIndex codeStream addDefinitelyAssignedVariables currentScope elseInitStateIndex elseStatement generateCode currentScope codeStream endifLabel mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex codeStream recordPositionsFrom sourceStart
public String Buffer print Statement int indent String Buffer output print Indent indent output append if NON NLS 1 condition print Expression 0 output append n NON NLS 1 then Statement print Statement indent 2 output if else Statement null output append n print Indent indent output output append else n NON NLS 1 else Statement print Statement indent 2 output return output  StringBuffer printStatement StringBuffer printIndent printExpression thenStatement printStatement elseStatement printIndent elseStatement printStatement
public void resolve Block Scope scope Type Binding type condition resolve Type Expecting scope Boolean Binding condition implicit Widening type type if then Statement null then Statement resolve scope if else Statement null else Statement resolve scope  BlockScope TypeBinding resolveTypeExpecting BooleanBinding implicitWidening thenStatement thenStatement elseStatement elseStatement
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope condition traverse visitor block Scope if then Statement null then Statement traverse visitor block Scope if else Statement null else Statement traverse visitor block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope blockScope thenStatement thenStatement blockScope elseStatement elseStatement blockScope endVisit blockScope

public Implicit Doc Type Reference char name int pos super this token name this source Start pos this source End pos  ImplicitDocTypeReference sourceStart sourceEnd
see org eclipse jdt internal compiler ast Type Reference copy Dims int public Type Reference copy Dims int dim return null  TypeReference copyDims TypeReference copyDims
see org eclipse jdt internal compiler ast Type Reference get Type Binding org eclipse jdt internal compiler lookup Scope public Type Binding get Type Binding Scope scope this constant NotA Constant return this resolved Type scope enclosing Source Type  TypeReference getTypeBinding TypeBinding getTypeBinding NotAConstant resolvedType enclosingSourceType
public char get Type Name if this token null char tokens this token return tokens return null  getTypeName
return null public boolean is This return true  isThis
see org eclipse jdt internal compiler ast Type Reference traverse org eclipse jdt internal compiler AST Visitor org eclipse jdt internal compiler lookup Class Scope public void traverse AST Visitor visitor Class Scope class Scope Do nothing  TypeReference ASTVisitor ClassScope ASTVisitor ClassScope classScope
see org eclipse jdt internal compiler ast Expression print Expression int java lang String Buffer public String Buffer print Expression int indent String Buffer output return new String Buffer  printExpression StringBuffer StringBuffer printExpression StringBuffer StringBuffer

public Import Reference char tokens long source Positions boolean on Demand int modifiers this tokens tokens this source Positions source Positions this on Demand on Demand this source End int source Positions source Positions length 1 0x00000000FFFFFFFF this source Start int source Positions 0 32 this modifiers modifiers  ImportReference sourcePositions onDemand sourcePositions sourcePositions onDemand onDemand sourceEnd sourcePositions sourcePositions sourceStart sourcePositions
return char public char get Import Name return tokens  getImportName
public String Buffer print int indent String Buffer output return print indent output true  StringBuffer StringBuffer
public String Buffer print int tab String Buffer output boolean with On Demand when with On Demand is false only the name is printed for int i 0 i tokens length i if i 0 output append output append tokens i if with On Demand on Demand output append NON NLS 1 return output  StringBuffer StringBuffer withOnDemand withOnDemand withOnDemand onDemand
public void traverse AST Visitor visitor Compilation Unit Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor CompilationUnitScope endVisit

public Initializer Block block int modifiers this block block this modifiers modifiers declaration Source Start source Start block source Start  declarationSourceStart sourceStart sourceStart
public Flow Info analyse Code Method Scope current Scope Flow Context flow Context Flow Info flow Info return block analyse Code current Scope flow Context flow Info  FlowInfo analyseCode MethodScope currentScope FlowContext flowContext FlowInfo flowInfo analyseCode currentScope flowContext flowInfo
Code generation for a non static initializer standard block code gen param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream public void generate Code Block Scope current Scope Code Stream code Stream if bits Is ReachableMASK 0 return int pc code Stream position block generate Code current Scope code Stream code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK codeStream generateCode currentScope codeStream codeStream recordPositionsFrom sourceStart
public boolean is Field return false  isField
public boolean is Static return modifiers Acc Static 0  isStatic AccStatic
public void parse Statements Parser parser Type Declaration type Declaration Compilation Unit Declaration unit fill up the method body with statement parser parse this type Declaration unit  parseStatements TypeDeclaration typeDeclaration CompilationUnitDeclaration typeDeclaration
public String Buffer print Statement int indent String Buffer output if modifiers 0 print Indent indent output print Modifiers modifiers output append n NON NLS 1 block print Body indent output print Indent indent output append return output else return block print Statement indent output  StringBuffer printStatement StringBuffer printIndent printModifiers printBody printIndent printStatement
public void resolve Method Scope scope Field Binding previous Field scope initialized Field int previous FieldID scope last Visible FieldID try scope initialized Field null scope last Visible FieldID last Visible FieldID if is Static Reference Binding declaring Type scope enclosing Source Type if declaring Type is Nested Type declaring Type is Static scope problem Reporter inner Types Cannot Declare Static Initializers declaring Type this block resolve scope finally scope initialized Field previous Field scope last Visible FieldID previous FieldID  MethodScope FieldBinding previousField initializedField previousFieldID lastVisibleFieldID initializedField lastVisibleFieldID lastVisibleFieldID isStatic ReferenceBinding declaringType enclosingSourceType declaringType isNestedType declaringType isStatic problemReporter innerTypesCannotDeclareStaticInitializers declaringType initializedField previousField lastVisibleFieldID previousFieldID
public void traverse AST Visitor visitor Method Scope scope if visitor visit this scope block traverse visitor scope visitor end Visit this scope  ASTVisitor MethodScope endVisit

public Instance Of Expression Expression expression Type Reference type int operator this expression expression this type type this bits operator OperatorSHIFT this source Start expression source Start this source End type source End  InstanceOfExpression TypeReference sourceStart sourceStart sourceEnd sourceEnd
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info return expression analyse Code current Scope flow Context flow Info unconditional Inits  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo analyseCode currentScope flowContext flowInfo unconditionalInits
Returns false if the instanceof unnecessary public final boolean check Cast Types Compatibility Block Scope scope Type Binding cast Type Type Binding expression Type A more complete version of this method is provided on Cast Expression it deals with constant and need runtime checkcast if cast Type expression Type return false by grammatical construction the base type check is not necessary if cast Type null expression Type null return true cast to something which is NOT a base type if expression Type Null Binding if cast Type is Array Type 26903 need checkcast when casting null to array type need Runtime Checkcast true return false null is compatible with every thing if expression Type is Base Type scope problem Reporter not Compatible Types Error this expression Type cast Type return true if expression Type is Array Type if cast Type expression Type return false identity conversion if cast Type is Array Type cast Type is Array expression Type is Array Type Binding expr Element Type Array Binding expression Type elements Type scope if expr Element Type is Base Type stop the recursion if Array Binding cast Type elements Type scope expr Element Type scope problem Reporter not Compatible Types Error this expression Type cast Type return true recursively on the elements return check Cast Types Compatibility scope Array Binding cast Type elements Type scope expr Element Type else if cast Type is Class cast Type is Class expression Type is Array if cast Type id T Object return false else cast Type is Interface expression Type is Array if cast Type id T JavaLangCloneable cast Type id T JavaIoSerializable return true scope problem Reporter not Compatible Types Error this expression Type cast Type return true if expression Type is Class if cast Type is Array Type cast Type is Array expression Type is Class if expression Type id T Object potential runtime error return true else if cast Type is Class cast Type is Class expression Type is Class if expression Type is Compatible With cast Type no runtime error return false if cast Type is Compatible With expression Type potential runtime error return true else cast Type is Interface expression Type is Class if expression Type is Compatible With cast Type return false if Reference Binding expression Type is Final a subclass may implement the interface no check at compile time return true no subclass for expression Type thus compile time check is valid scope problem Reporter not Compatible Types Error this expression Type cast Type return true if expression Type is Interface cannot be anything else if cast Type is Array Type cast Type is Array expression Type is Interface if expression Type id T JavaLangCloneable expression Type id T JavaIoSerializable potential runtime error scope problem Reporter not Compatible Types Error this expression Type cast Type return true else if cast Type is Class cast Type is Class expression Type is Interface if cast Type id T Object no runtime error return false if Reference Binding cast Type is Final no subclass for cast Type thus compile time check is valid if cast Type is Compatible With expression Type potential runtime error scope problem Reporter not Compatible Types Error this expression Type cast Type return true else cast Type is Interface expression Type is Interface if expression Type is Compatible With cast Type return false if cast Type is Compatible With expression Type Method Binding cast Type Methods Reference Binding cast Type methods Method Binding expression Type Methods Reference Binding expression Type methods int expr Methods Length expression Type Methods length for int i 0 cast Methods Length cast Type Methods length i cast Methods Length i for int j 0 j expr Methods Length j if cast Type Methods i return Type expression Type Methods j return Type Char Operation equals cast Type Methods i selector expression Type Methods j selector cast Type Methods i are Parameters Equal expression Type Methods j scope problem Reporter not Compatible Types Error this expression Type cast Type return true  checkCastTypesCompatibility BlockScope TypeBinding castType TypeBinding expressionType CastExpression castType expressionType castType expressionType expressionType NullBinding castType isArrayType needRuntimeCheckcast expressionType isBaseType problemReporter notCompatibleTypesError expressionType castType expressionType isArrayType castType expressionType castType isArrayType castType isArray expressionType isArray TypeBinding exprElementType ArrayBinding expressionType elementsType exprElementType isBaseType ArrayBinding castType elementsType exprElementType problemReporter notCompatibleTypesError expressionType castType checkCastTypesCompatibility ArrayBinding castType elementsType exprElementType castType isClass castType isClass expressionType isArray castType T_Object castType isInterface expressionType isArray castType T_JavaLangCloneable castType T_JavaIoSerializable problemReporter notCompatibleTypesError expressionType castType expressionType isClass castType isArrayType castType isArray expressionType isClass expressionType T_Object castType isClass castType isClass expressionType isClass expressionType isCompatibleWith castType castType isCompatibleWith expressionType castType isInterface expressionType isClass expressionType isCompatibleWith castType ReferenceBinding expressionType isFinal expressionType problemReporter notCompatibleTypesError expressionType castType expressionType isInterface castType isArrayType castType isArray expressionType isInterface expressionType T_JavaLangCloneable expressionType T_JavaIoSerializable problemReporter notCompatibleTypesError expressionType castType castType isClass castType isClass expressionType isInterface castType T_Object ReferenceBinding castType isFinal castType castType isCompatibleWith expressionType problemReporter notCompatibleTypesError expressionType castType castType isInterface expressionType isInterface expressionType isCompatibleWith castType castType isCompatibleWith expressionType MethodBinding castTypeMethods ReferenceBinding castType MethodBinding expressionTypeMethods ReferenceBinding expressionType exprMethodsLength expressionTypeMethods castMethodsLength castTypeMethods castMethodsLength exprMethodsLength castTypeMethods returnType expressionTypeMethods returnType CharOperation castTypeMethods expressionTypeMethods castTypeMethods areParametersEqual expressionTypeMethods problemReporter notCompatibleTypesError expressionType castType
Code generation for instance Of Expression param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position expression generate Code current Scope code Stream true code Stream instance of type resolved Type if value Required code Stream pop code Stream record Positions From pc this source Start  instanceOfExpression currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream generateCode currentScope codeStream codeStream instance_of resolvedType valueRequired codeStream codeStream recordPositionsFrom sourceStart
public String Buffer print Expression No Parenthesis int indent String Buffer output expression print Expression indent output append instanceof NON NLS 1 return type print 0 output  StringBuffer printExpressionNoParenthesis StringBuffer printExpression
public Type Binding resolve Type Block Scope scope constant NotA Constant Type Binding expression Type expression resolve Type scope Type Binding check Type type resolve Type scope if expression Type null check Type null return null boolean necessary check Cast Types Compatibility scope check Type expression Type if necessary scope problem Reporter unnecessary Instanceof this check Type return this resolved Type Boolean Binding  TypeBinding resolveType BlockScope NotAConstant TypeBinding expressionType resolveType TypeBinding checkType resolveType expressionType checkType checkCastTypesCompatibility checkType expressionType problemReporter unnecessaryInstanceof checkType resolvedType BooleanBinding
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope expression traverse visitor scope type traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

static final Constant FORMAT ERROR new Double Constant 1 0 0 0 NaN public Int Literal char token int s int e super token s e  FORMAT_ERROR DoubleConstant IntLiteral
super token s e public Int Literal char token int s int e int value this token s e this value value  IntLiteral
public Int Literal int int Value special optimized constructor the cst is the argument value that should not be used tokens null source Start 0 source End 0 super null 0 0 constant Constant from Value int Value value int Value  IntLiteral intValue sourceStart sourceEnd fromValue intValue intValue
public void compute Constant a special constant is use for the potential Integer MAX VALUE 1 which is legal if used with a as prefix cool notice that Integer MIN VALUE 2147483648 long MAX Integer MAX VALUE if this One constant Constant One return int length source length long computed Value 0L if source 0 0 MAX 0xFFFFFFFFL a long in order to be positive if length 1 constant Constant from Value 0 return final int shift radix int j if source 1 x source 1 X shift 4 j 2 radix 16 else shift 3 j 1 radix 8 while source j 0 j jump over redondant zero if j length watch for 000000000000000000 constant Constant from Value value int computed Value return while j length int digit Value if digit Value Character digit source j radix 0 constant FORMAT ERROR return computed Value computed Value shift digit Value if computed Value MAX return constant stays null else regular case radix 10 for int i 0 i length i int digit Value if digit Value Character digit source i 10 0 constant FORMAT ERROR return computed Value 10 computed Value digit Value if computed Value MAX return constant stays null constant Constant from Value value int computed Value  computeConstant MAX_VALUE MIN_VALUE MAX_VALUE computedValue fromValue fromValue computedValue digitValue digitValue FORMAT_ERROR computedValue computedValue digitValue computedValue digitValue digitValue FORMAT_ERROR computedValue computedValue digitValue computedValue fromValue computedValue
Code generation for int literal param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if value Required if implicit Conversion 4 T int code Stream generate Inlined Value value else code Stream generate Constant constant implicit Conversion code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream valueRequired implicitConversion T_int codeStream generateInlinedValue codeStream generateConstant implicitConversion codeStream recordPositionsFrom sourceStart
code Stream record Positions From pc this source Start public Type Binding literal Type Block Scope scope return Int Binding  codeStream recordPositionsFrom sourceStart TypeBinding literalType BlockScope IntBinding
public final boolean mayRepresentMIN VALUE a special autorized int literral is 2147483648 which is ONE over the limit This special case only is used in combinaison with to denote the minimal value of int 2147483648 return source length 10 source 0 2 source 1 1 source 2 4 source 3 7 source 4 4 source 5 8 source 6 3 source 7 6 source 8 4  mayRepresentMIN_VALUE
source 9 8 public Type Binding resolve Type Block Scope scope the format may be incorrect while the scanner could detect such an error only on painfull tests easier and faster here Type Binding tb super resolve Type scope if constant FORMAT ERROR constant NotA Constant scope problem Reporter constant Out Of Format this this resolved Type null return null return tb  TypeBinding resolveType BlockScope TypeBinding resolveType FORMAT_ERROR NotAConstant problemReporter constantOutOfFormat resolvedType
public String Buffer print Expression int indent String Buffer output if source null special optimized Int Literal that are created by the compiler return output append String value Of value return super print Expression indent output  StringBuffer printExpression StringBuffer IntLiteral valueOf printExpression
public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

final static Constant MIN VALUE Constant from Value Integer MIN VALUE public Int Literal Min Value super Char Value 0 0 Integer MIN VALUE constant MIN VALUE  MIN_VALUE fromValue MIN_VALUE IntLiteralMinValue CharValue MIN_VALUE MIN_VALUE
constant MIN VALUE public void compute Constant precomputed at creation time  MIN_VALUE computeConstant

public Javadoc Single Name Reference invalid Parameters param public Javadoc int source Start int source End this source Start source Start this source End source End  JavadocSingleNameReference invalidParameters sourceStart sourceEnd sourceStart sourceStart sourceEnd sourceEnd
public String Buffer print int indent String Buffer output print Indent indent output append n NON NLS 1 if this parameters null for int i 0 length this parameters length i length i print Indent indent 1 output append param NON NLS 1 this parameters i print indent output append n if this return Statement null print Indent indent 1 output append return n NON NLS 1 if this thrown Exceptions null for int i 0 length this thrown Exceptions length i length i print Indent indent 1 output append throws NON NLS 1 this thrown Exceptions i print indent output append n if this references null for int i 0 length this references length i length i print Indent indent 1 output append see NON NLS 1 this references i print indent output append n print Indent indent output append n NON NLS 1 return output  StringBuffer StringBuffer printIndent printIndent returnStatement printIndent thrownExceptions thrownExceptions printIndent thrownExceptions printIndent printIndent
public void resolve Class Scope class Scope param tags int param Tags Size this parameters null 0 this parameters length for int i 0 i param Tags Size i Javadoc Single Name Reference param this parameters i class Scope problem Reporter javadoc Unexpected Tag param tag Source Start param tag Source End return tags if this return Statement null class Scope problem Reporter javadoc Unexpected Tag this return Statement source Start this return Statement source End throws exception tags int throws Tags Length this thrown Exceptions null 0 this thrown Exceptions length for int i 0 i throws Tags Length i Type Reference type Ref this thrown Exceptions i int start end if type Ref instanceof Javadoc Single Type Reference Javadoc Single Type Reference single Ref Javadoc Single Type Reference type Ref start single Ref tag Source Start end single Ref tag Source End else if type Ref instanceof Javadoc Qualified Type Reference Javadoc Qualified Type Reference qualified Ref Javadoc Qualified Type Reference type Ref start qualified Ref tag Source Start end qualified Ref tag Source End else start type Ref source Start end type Ref source End class Scope problem Reporter javadoc Unexpected Tag start end see tags int see Tags Length this references null 0 this references length for int i 0 i see Tags Length i Resolve reference this references i resolve Type class Scope Some unbound field reference might be changed to message send see bug https bugs eclipse org bugs show bug cgi id 51911 if this references i instanceof Javadoc Field Reference Javadoc Field Reference field Ref Javadoc Field Reference this references i if field Ref receiver Type null field Ref binding null binding was reset in case of valid method reference TODO frederic post 3 0 avoid new instanciation of Compiler AST node Javadoc Message Send msg Send new Javadoc Message Send field Ref token field Ref name Source Position msg Send receiver field Ref receiver msg Send receiver Type field Ref receiver Type msg Send qualifying Type field Ref receiver Type msg Send super Access class Scope enclosing Source Type is Compatible With msg Send receiver Type msg Send binding class Scope find Method Reference Binding msg Send receiver Type msg Send selector new Type Binding 0 msg Send this references i msg Send  ClassScope classScope paramTagsSize paramTagsSize JavadocSingleNameReference classScope problemReporter javadocUnexpectedTag tagSourceStart tagSourceEnd returnStatement classScope problemReporter javadocUnexpectedTag returnStatement sourceStart returnStatement sourceEnd throwsTagsLength thrownExceptions thrownExceptions throwsTagsLength TypeReference typeRef thrownExceptions typeRef JavadocSingleTypeReference JavadocSingleTypeReference singleRef JavadocSingleTypeReference typeRef singleRef tagSourceStart singleRef tagSourceEnd typeRef JavadocQualifiedTypeReference JavadocQualifiedTypeReference qualifiedRef JavadocQualifiedTypeReference typeRef qualifiedRef tagSourceStart qualifiedRef tagSourceEnd typeRef sourceStart typeRef sourceEnd classScope problemReporter javadocUnexpectedTag seeTagsLength seeTagsLength resolveType classScope show_bug JavadocFieldReference JavadocFieldReference fieldRef JavadocFieldReference fieldRef receiverType fieldRef JavadocMessageSend msgSend JavadocMessageSend fieldRef fieldRef nameSourcePosition msgSend fieldRef msgSend receiverType fieldRef receiverType msgSend qualifyingType fieldRef receiverType msgSend superAccess classScope enclosingSourceType isCompatibleWith msgSend receiverType msgSend classScope findMethod ReferenceBinding msgSend receiverType msgSend TypeBinding msgSend msgSend
public void resolve Method Scope meth Scope get method declaration Abstract Method Declaration meth Decl meth Scope reference Method boolean overriding meth Decl null false meth Decl binding modifiers Acc Implementing Acc Overriding 0 see tags int see Tags Length this references null 0 this references length boolean super Ref false for int i 0 i see Tags Length i Resolve reference this references i resolve Type meth Scope Some unbound field reference might be changed to message send see bug https bugs eclipse org bugs show bug cgi id 51911 if this references i instanceof Javadoc Field Reference Javadoc Field Reference field Ref Javadoc Field Reference this references i if field Ref receiver Type null field Ref binding null binding was reset in case of valid method reference TODO frederic post 3 0 avoid new instanciation of Compiler AST node Javadoc Message Send msg Send new Javadoc Message Send field Ref token field Ref name Source Position msg Send receiver field Ref receiver msg Send receiver Type field Ref receiver Type msg Send qualifying Type field Ref receiver Type msg Send super Access meth Scope enclosing Source Type is Compatible With msg Send receiver Type msg Send binding meth Scope find Method Reference Binding msg Send receiver Type msg Send selector new Type Binding 0 msg Send this references i msg Send see whether we can have a super reference try if meth Decl null meth Decl is Constructor overriding super Ref if this references i instanceof Javadoc Message Send Javadoc Message Send message Send Javadoc Message Send this references i if binding is valid then look if we have a reference to an overriden method constructor if message Send binding null message Send binding is Valid Binding if meth Decl binding declaring Class is Compatible With message Send receiver Type Char Operation equals message Send selector meth Decl selector message Send binding return Type meth Decl binding return Type if message Send arguments null meth Decl arguments null super Ref true else if message Send arguments null meth Decl arguments null super Ref meth Decl binding are Parameters Equal message Send binding else if this references i instanceof Javadoc Allocation Expression Javadoc Allocation Expression allocation Expr Javadoc Allocation Expression this references i if binding is valid then look if we have a reference to an overriden method constructor if allocation Expr binding null allocation Expr binding is Valid Binding if meth Decl binding declaring Class is Compatible With allocation Expr resolved Type if allocation Expr arguments null meth Decl arguments null super Ref true else if allocation Expr arguments null meth Decl arguments null super Ref meth Decl binding are Parameters Equal allocation Expr binding catch Exception e Something wrong happen forget super ref Store if a reference exists to an overriden method constructor or the method is in a local type boolean report Missing meth Decl null overriding this inherited super Ref meth Decl binding declaring Class null meth Decl binding declaring Class is Local Type param tags resolve Param Tags meth Scope report Missing return tags if this return Statement null if report Missing meth Decl null if meth Decl is Constructor meth Decl is Clinit Method Declaration meth Method Declaration meth Decl if meth binding return Type Void Binding method with return should have return tag meth Scope problem Reporter javadoc Missing Return Tag meth return Type source Start meth return Type source End meth Decl binding modifiers else this return Statement resolve meth Scope throws exception tags resolve Throws Tags meth Scope report Missing Resolve param tags with invalid syntax int length this invalid Parameters null 0 this invalid Parameters length for int i 0 i length i this invalid Parameters i resolve meth Scope false  MethodScope methScope AbstractMethodDeclaration methDecl methScope referenceMethod methDecl methDecl AccImplementing AccOverriding seeTagsLength superRef seeTagsLength resolveType methScope show_bug JavadocFieldReference JavadocFieldReference fieldRef JavadocFieldReference fieldRef receiverType fieldRef JavadocMessageSend msgSend JavadocMessageSend fieldRef fieldRef nameSourcePosition msgSend fieldRef msgSend receiverType fieldRef receiverType msgSend qualifyingType fieldRef receiverType msgSend superAccess methScope enclosingSourceType isCompatibleWith msgSend receiverType msgSend methScope findMethod ReferenceBinding msgSend receiverType msgSend TypeBinding msgSend msgSend methDecl methDecl isConstructor superRef JavadocMessageSend JavadocMessageSend messageSend JavadocMessageSend messageSend messageSend isValidBinding methDecl declaringClass isCompatibleWith messageSend receiverType CharOperation messageSend methDecl messageSend returnType methDecl returnType messageSend methDecl superRef messageSend methDecl superRef methDecl areParametersEqual messageSend JavadocAllocationExpression JavadocAllocationExpression allocationExpr JavadocAllocationExpression allocationExpr allocationExpr isValidBinding methDecl declaringClass isCompatibleWith allocationExpr resolvedType allocationExpr methDecl superRef allocationExpr methDecl superRef methDecl areParametersEqual allocationExpr reportMissing methDecl superRef methDecl declaringClass methDecl declaringClass isLocalType resolveParamTags methScope reportMissing returnStatement reportMissing methDecl methDecl isConstructor methDecl isClinit MethodDeclaration MethodDeclaration methDecl returnType VoidBinding methScope problemReporter javadocMissingReturnTag returnType sourceStart returnType sourceEnd methDecl returnStatement methScope resolveThrowsTags methScope reportMissing invalidParameters invalidParameters invalidParameters methScope
private void resolve Param Tags Method Scope meth Scope boolean report Missing Abstract Method Declaration md meth Scope reference Method int param Tags Size this parameters null 0 this parameters length If no referenced method field initializer for example then report a problem for each param tag if md null for int i 0 i param Tags Size i Javadoc Single Name Reference param this parameters i meth Scope problem Reporter javadoc Unexpected Tag param tag Source Start param tag Source End return If no param tags then report a problem for each method argument int arguments Size md arguments null 0 md arguments length if param Tags Size 0 if report Missing for int i 0 i arguments Size i Argument arg md arguments i meth Scope problem Reporter javadoc Missing Param Tag arg md binding modifiers else Local Variable Binding bindings new Local Variable Binding param Tags Size int max Bindings 0 Scan all param tags for int i 0 i param Tags Size i Javadoc Single Name Reference param this parameters i param resolve meth Scope if param binding null param binding is Valid Binding Verify duplicated tags boolean found false for int j 0 j max Bindings found j if bindings j param binding meth Scope problem Reporter javadoc Duplicated Param Tag param md binding modifiers found true if found bindings max Bindings Local Variable Binding param binding Look for undocumented arguments if report Missing for int i 0 i arguments Size i Argument arg md arguments i boolean found false for int j 0 j max Bindings found j Local Variable Binding binding bindings j if arg binding binding found true if found meth Scope problem Reporter javadoc Missing Param Tag arg md binding modifiers  resolveParamTags MethodScope methScope reportMissing AbstractMethodDeclaration methScope referenceMethod paramTagsSize paramTagsSize JavadocSingleNameReference methScope problemReporter javadocUnexpectedTag tagSourceStart tagSourceEnd argumentsSize paramTagsSize reportMissing argumentsSize methScope problemReporter javadocMissingParamTag LocalVariableBinding LocalVariableBinding paramTagsSize maxBindings paramTagsSize JavadocSingleNameReference methScope isValidBinding maxBindings methScope problemReporter javadocDuplicatedParamTag maxBindings LocalVariableBinding reportMissing argumentsSize maxBindings LocalVariableBinding methScope problemReporter javadocMissingParamTag
private void resolve Throws Tags Method Scope meth Scope boolean report Missing Abstract Method Declaration md meth Scope reference Method int throws Tags Length this thrown Exceptions null 0 this thrown Exceptions length If no referenced method field initializer for example then report a problem for each throws tag if md null for int i 0 i throws Tags Length i Type Reference type Ref this thrown Exceptions i int start type Ref source Start int end type Ref source End if type Ref instanceof Javadoc Qualified Type Reference start Javadoc Qualified Type Reference type Ref tag Source Start end Javadoc Qualified Type Reference type Ref tag Source End else if type Ref instanceof Javadoc Single Type Reference start Javadoc Single Type Reference type Ref tag Source Start end Javadoc Single Type Reference type Ref tag Source End meth Scope problem Reporter javadoc Unexpected Tag start end return If no throws tags then report a problem for each method thrown exception int bound Exception Length md binding null md binding thrown Exceptions null 0 md binding thrown Exceptions length int thrown Exception Length md thrown Exceptions null 0 md thrown Exceptions length if throws Tags Length 0 if report Missing for int i 0 i bound Exception Length i Reference Binding exception Binding md binding thrown Exceptions i if exception Binding null exception Binding is Valid Binding flag only valid class name int j i while j thrown Exception Length exception Binding md thrown Exceptions j resolved Type j if j thrown Exception Length meth Scope problem Reporter javadoc Missing Throws Tag md thrown Exceptions j md binding modifiers else int max Ref 0 Type Reference type References new Type Reference throws Tags Length Scan all throws tags for int i 0 i throws Tags Length i Type Reference type Ref this thrown Exceptions i type Ref resolve meth Scope Type Binding type Binding type Ref resolved Type if type Binding null type Binding is Valid Binding type Binding is Class type References max Ref type Ref Look for undocumented thrown exception for int i 0 i bound Exception Length i Reference Binding exception Binding md binding thrown Exceptions i boolean found false for int j 0 j max Ref found j if type References j null Type Binding type Binding type References j resolved Type if exception Binding type Binding found true type References j null if found report Missing if exception Binding null exception Binding is Valid Binding flag only valid class name int k i while k thrown Exception Length exception Binding md thrown Exceptions k resolved Type k if k thrown Exception Length meth Scope problem Reporter javadoc Missing Throws Tag md thrown Exceptions k md binding modifiers Verify additional throws tags for int i 0 i max Ref i Type Reference type Ref type References i if type Ref null boolean compatible false thrown exceptions subclasses are accepted for int j 0 j thrown Exception Length compatible j Type Binding exception Binding md thrown Exceptions j resolved Type if exception Binding null compatible type Ref resolved Type is Compatible With exception Binding If not compatible only complain on unchecked exception if compatible type Ref resolved Type is Compatible With meth Scope get Java Lang Runtime Exception type Ref resolved Type is Compatible With meth Scope get Java Lang Error meth Scope problem Reporter javadoc Invalid Throws Class Name type Ref md binding modifiers  resolveThrowsTags MethodScope methScope reportMissing AbstractMethodDeclaration methScope referenceMethod throwsTagsLength thrownExceptions thrownExceptions throwsTagsLength TypeReference typeRef thrownExceptions typeRef sourceStart typeRef sourceEnd typeRef JavadocQualifiedTypeReference JavadocQualifiedTypeReference typeRef tagSourceStart JavadocQualifiedTypeReference typeRef tagSourceEnd typeRef JavadocSingleTypeReference JavadocSingleTypeReference typeRef tagSourceStart JavadocSingleTypeReference typeRef tagSourceEnd methScope problemReporter javadocUnexpectedTag boundExceptionLength thrownExceptions thrownExceptions thrownExceptionLength thrownExceptions thrownExceptions throwsTagsLength reportMissing boundExceptionLength ReferenceBinding exceptionBinding thrownExceptions exceptionBinding exceptionBinding isValidBinding thrownExceptionLength exceptionBinding thrownExceptions resolvedType thrownExceptionLength methScope problemReporter javadocMissingThrowsTag thrownExceptions maxRef TypeReference typeReferences TypeReference throwsTagsLength throwsTagsLength TypeReference typeRef thrownExceptions typeRef methScope TypeBinding typeBinding typeRef resolvedType typeBinding typeBinding isValidBinding typeBinding isClass typeReferences maxRef typeRef boundExceptionLength ReferenceBinding exceptionBinding thrownExceptions maxRef typeReferences TypeBinding typeBinding typeReferences resolvedType exceptionBinding typeBinding typeReferences reportMissing exceptionBinding exceptionBinding isValidBinding thrownExceptionLength exceptionBinding thrownExceptions resolvedType thrownExceptionLength methScope problemReporter javadocMissingThrowsTag thrownExceptions maxRef TypeReference typeRef typeReferences typeRef thrownExceptionLength TypeBinding exceptionBinding thrownExceptions resolvedType exceptionBinding typeRef resolvedType isCompatibleWith exceptionBinding typeRef resolvedType isCompatibleWith methScope getJavaLangRuntimeException typeRef resolvedType isCompatibleWith methScope getJavaLangError methScope problemReporter javadocInvalidThrowsClassName typeRef
public AST Node get Node Starting At int start parameters array if this parameters null for int i 0 i this parameters length i Javadoc Single Name Reference param this parameters i if param source Start start return param array of invalid syntax tags parameters if this invalid Parameters null for int i 0 i this invalid Parameters length i Javadoc Single Name Reference param this invalid Parameters i if param source Start start return param thrown exception array if this thrown Exceptions null for int i 0 i this thrown Exceptions length i Type Reference type Ref this thrown Exceptions i if type Ref source Start start return type Ref references array if this references null for int i 0 i this references length i org eclipse jdt internal compiler ast Expression expression this references i if expression source Start start return expression else if expression instanceof Javadoc Allocation Expression Javadoc Allocation Expression allocation Expr Javadoc Allocation Expression this references i if binding is valid then look at arguments if allocation Expr binding null allocation Expr binding is Valid Binding if allocation Expr arguments null for int j 0 j allocation Expr arguments length j if allocation Expr arguments j source Start start return allocation Expr arguments j else if expression instanceof Javadoc Message Send Javadoc Message Send message Send Javadoc Message Send this references i if binding is valid then look at arguments if message Send binding null message Send binding is Valid Binding if message Send arguments null for int j 0 j message Send arguments length j if message Send arguments j source Start start return message Send arguments j return null  ASTNode getNodeStartingAt JavadocSingleNameReference sourceStart invalidParameters invalidParameters JavadocSingleNameReference invalidParameters sourceStart thrownExceptions thrownExceptions TypeReference typeRef thrownExceptions typeRef sourceStart typeRef sourceStart JavadocAllocationExpression JavadocAllocationExpression allocationExpr JavadocAllocationExpression allocationExpr allocationExpr isValidBinding allocationExpr allocationExpr allocationExpr sourceStart allocationExpr JavadocMessageSend JavadocMessageSend messageSend JavadocMessageSend messageSend messageSend isValidBinding messageSend messageSend messageSend sourceStart messageSend

public Javadoc Allocation Expression long pos this source Start int pos 32 this source End int pos this bits Inside Javadoc  JavadocAllocationExpression sourceStart sourceEnd InsideJavadoc
private Type Binding internal Resolve Type Scope scope Propagate the type checking to the arguments and check if the constructor is defined this constant NotA Constant if this type null this resolved Type scope enclosing Source Type else if scope kind Scope CLASS SCOPE this resolved Type this type resolve Type Class Scope scope else this resolved Type this type resolve Type Block Scope scope buffering the arguments types Type Binding argument Types No Parameters if this arguments null boolean arg Has Error false int length this arguments length argument Types new Type Binding length for int i 0 i length i Expression argument this arguments i if scope kind Scope CLASS SCOPE argument Types i argument resolve Type Class Scope scope else argument Types i argument resolve Type Block Scope scope if argument Types i null arg Has Error true if arg Has Error return null check resolved type if this resolved Type null return null this super Access scope enclosing Source Type is Compatible With this resolved Type Reference Binding allocation Type Reference Binding this resolved Type this binding scope get Constructor allocation Type argument Types this if this binding is Valid Binding Method Binding method Binding scope get Method this resolved Type this resolved Type source Name argument Types this if method Binding is Valid Binding this binding method Binding else if this binding declaring Class null this binding declaring Class allocation Type scope problem Reporter javadoc Invalid Constructor this this binding scope get Declaration Modifiers return this resolved Type if is Method Use Deprecated this binding scope scope problem Reporter javadoc Deprecated Method this binding this scope get Declaration Modifiers return allocation Type  TypeBinding internalResolveType NotAConstant resolvedType enclosingSourceType CLASS_SCOPE resolvedType resolveType ClassScope resolvedType resolveType BlockScope TypeBinding argumentTypes NoParameters argHasError argumentTypes TypeBinding CLASS_SCOPE argumentTypes resolveType ClassScope argumentTypes resolveType BlockScope argumentTypes argHasError argHasError resolvedType superAccess enclosingSourceType isCompatibleWith resolvedType ReferenceBinding allocationType ReferenceBinding resolvedType getConstructor allocationType argumentTypes isValidBinding MethodBinding methodBinding getMethod resolvedType resolvedType sourceName argumentTypes methodBinding isValidBinding methodBinding declaringClass declaringClass allocationType problemReporter javadocInvalidConstructor getDeclarationModifiers resolvedType isMethodUseDeprecated problemReporter javadocDeprecatedMethod getDeclarationModifiers allocationType
see org eclipse jdt internal compiler lookup Invocation Site is Super Access public boolean is Super Access return this super Access  InvocationSite isSuperAccess isSuperAccess superAccess
see org eclipse jdt internal compiler ast Expression resolve Type org eclipse jdt internal compiler lookup Block Scope public Type Binding resolve Type Block Scope scope return internal Resolve Type scope  resolveType BlockScope TypeBinding resolveType BlockScope internalResolveType
see org eclipse jdt internal compiler ast Expression resolve Type org eclipse jdt internal compiler lookup Block Scope public Type Binding resolve Type Class Scope scope return internal Resolve Type scope  resolveType BlockScope TypeBinding resolveType ClassScope internalResolveType

public Javadoc Argument Expression char name int start Pos int end Pos Type Reference type Ref this token name this source Start start Pos this source End end Pos long pos long start Pos 32 end Pos this argument new Argument name pos type Ref I Constants Acc Default this bits Inside Javadoc  JavadocArgumentExpression startPos endPos TypeReference typeRef sourceStart startPos sourceEnd endPos startPos endPos typeRef IConstants AccDefault InsideJavadoc
private Type Binding internal Resolve Type Scope scope this constant NotA Constant if this resolved Type null is a shared type reference which was already resolved if this resolved Type is Valid Binding return null already reported error else if this argument null Type Reference type Ref this argument type if type Ref null this resolved Type type Ref get Type Binding scope type Ref resolved Type this resolved Type if this resolved Type is Valid Binding scope problem Reporter javadoc Invalid Type type Ref this resolved Type scope get Declaration Modifiers return null if is Type Use Deprecated this resolved Type scope scope problem Reporter javadoc Deprecated Type this resolved Type type Ref scope get Declaration Modifiers return null return this resolved Type return null  TypeBinding internalResolveType NotAConstant resolvedType resolvedType isValidBinding TypeReference typeRef typeRef resolvedType typeRef getTypeBinding typeRef resolvedType resolvedType resolvedType isValidBinding problemReporter javadocInvalidType typeRef resolvedType getDeclarationModifiers isTypeUseDeprecated resolvedType problemReporter javadocDeprecatedType resolvedType typeRef getDeclarationModifiers resolvedType
public String Buffer print Expression int indent String Buffer output if this argument null if this token null output append this token else this argument print indent output return output  StringBuffer printExpression StringBuffer
public void resolve Block Scope scope if this argument null this argument resolve scope  BlockScope
public Type Binding resolve Type Block Scope scope return internal Resolve Type scope  TypeBinding resolveType BlockScope internalResolveType
public Type Binding resolve Type Class Scope scope return internal Resolve Type scope  TypeBinding resolveType ClassScope internalResolveType
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope if this argument null this argument traverse visitor block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope blockScope endVisit blockScope

public int tag Source Start tag Source End public Javadoc Array Qualified Type Reference Javadoc Qualified Type Reference type Ref int dim super type Ref tokens dim type Ref source Positions  tagSourceStart tagSourceEnd JavadocArrayQualifiedTypeReference JavadocQualifiedTypeReference typeRef typeRef typeRef sourcePositions
protected void report Invalid Type Scope scope scope problem Reporter javadoc Invalid Type this this resolved Type scope get Declaration Modifiers  reportInvalidType problemReporter javadocInvalidType resolvedType getDeclarationModifiers
scope problem Reporter javadoc Invalid Type this this resolved Type scope get Declaration Modifiers protected void report Deprecated Type Scope scope scope problem Reporter javadoc Deprecated Type this resolved Type this scope get Declaration Modifiers  problemReporter javadocInvalidType resolvedType getDeclarationModifiers reportDeprecatedType problemReporter javadocDeprecatedType resolvedType getDeclarationModifiers
see org eclipse jdt internal compiler ast AST Node traverse org eclipse jdt internal compiler AST Visitor org eclipse jdt internal compiler lookup Block Scope public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTNode ASTVisitor BlockScope ASTVisitor BlockScope endVisit

public class Javadoc Array Single Type Reference extends Array Type Reference public Javadoc Array Single Type Reference char name int dim long pos super name dim pos this bits Inside Javadoc  JavadocArraySingleTypeReference ArrayTypeReference JavadocArraySingleTypeReference InsideJavadoc
protected void report Invalid Type Scope scope scope problem Reporter javadoc Invalid Type this this resolved Type scope get Declaration Modifiers  reportInvalidType problemReporter javadocInvalidType resolvedType getDeclarationModifiers
scope problem Reporter javadoc Invalid Type this this resolved Type scope get Declaration Modifiers protected void report Deprecated Type Scope scope scope problem Reporter javadoc Deprecated Type this resolved Type this scope get Declaration Modifiers  problemReporter javadocInvalidType resolvedType getDeclarationModifiers reportDeprecatedType problemReporter javadocDeprecatedType resolvedType getDeclarationModifiers
see org eclipse jdt internal compiler ast AST Node traverse org eclipse jdt internal compiler AST Visitor org eclipse jdt internal compiler lookup Block Scope public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTNode ASTVisitor BlockScope ASTVisitor BlockScope endVisit

public int tag Source Start tag Source End public Javadoc Field Reference char source long pos super source pos this bits Inside Javadoc  tagSourceStart tagSourceEnd JavadocFieldReference InsideJavadoc
private Type Binding internal Resolve Type Scope scope this constant NotA Constant if this receiver null this receiver Type scope enclosing Source Type else if scope kind Scope CLASS SCOPE this receiver Type this receiver resolve Type Class Scope scope else this receiver Type this receiver resolve Type Block Scope scope if this receiver Type null return null Binding field Binding this receiver null this receiver is This scope class Scope get Binding this token this bits Restrictive FlagMASK this true resolve scope get Field this receiver Type this token this if field Binding is Valid Binding implicit lookup may discover issues due to static constructor contexts javadoc must be resilient switch field Binding problem Id case Problem Reasons Non Static Reference In Constructor Invocation case Problem Reasons Non Static Reference In Static Context case Problem Reasons Inherited Name Hides Enclosing Name Field Binding closest Match Problem Field Binding field Binding closest Match if closest Match null field Binding closest Match ignore problem if can reach target field through it if field Binding is Valid Binding field Binding instanceof Field Binding if this receiver Type instanceof Reference Binding Reference Binding ref Binding Reference Binding this receiver Type Method Binding bindings ref Binding get Methods this token if bindings null scope problem Reporter javadoc Invalid Field this source Start this source End field Binding this receiver Type scope get Declaration Modifiers else switch bindings length case 0 scope problem Reporter javadoc Invalid Field this source Start this source End field Binding this receiver Type scope get Declaration Modifiers break case 1 this binding null break default scope problem Reporter javadoc Ambiguous Method Reference this source Start this source End field Binding scope get Declaration Modifiers break return null this binding Field Binding field Binding if is Field Use Deprecated this binding scope this bits Is Strictly AssignedMASK 0 scope problem Reporter javadoc Deprecated Field this binding this scope get Declaration Modifiers return this resolved Type this binding type  TypeBinding internalResolveType NotAConstant receiverType enclosingSourceType CLASS_SCOPE receiverType resolveType ClassScope receiverType resolveType BlockScope receiverType fieldBinding isThis classScope getBinding RestrictiveFlagMASK getField receiverType fieldBinding isValidBinding fieldBinding problemId ProblemReasons NonStaticReferenceInConstructorInvocation ProblemReasons NonStaticReferenceInStaticContext ProblemReasons InheritedNameHidesEnclosingName FieldBinding closestMatch ProblemFieldBinding fieldBinding closestMatch closestMatch fieldBinding closestMatch fieldBinding isValidBinding fieldBinding FieldBinding receiverType ReferenceBinding ReferenceBinding refBinding ReferenceBinding receiverType MethodBinding refBinding getMethods problemReporter javadocInvalidField sourceStart sourceEnd fieldBinding receiverType getDeclarationModifiers problemReporter javadocInvalidField sourceStart sourceEnd fieldBinding receiverType getDeclarationModifiers problemReporter javadocAmbiguousMethodReference sourceStart sourceEnd fieldBinding getDeclarationModifiers FieldBinding fieldBinding isFieldUseDeprecated IsStrictlyAssignedMASK problemReporter javadocDeprecatedField getDeclarationModifiers resolvedType
see org eclipse jdt internal compiler lookup Invocation Site is Super Access public boolean is Super Access return false  InvocationSite isSuperAccess isSuperAccess
public String Buffer print Expression int indent String Buffer output if this receiver null this receiver print Expression 0 output output append append this token return output  StringBuffer printExpression StringBuffer printExpression
see org eclipse jdt internal compiler ast Expression resolve Type org eclipse jdt internal compiler lookup Block Scope public Type Binding resolve Type Block Scope scope return internal Resolve Type scope  resolveType BlockScope TypeBinding resolveType BlockScope internalResolveType
see org eclipse jdt internal compiler ast Expression resolve Type org eclipse jdt internal compiler lookup Block Scope public Type Binding resolve Type Class Scope scope return internal Resolve Type scope  resolveType BlockScope TypeBinding resolveType ClassScope internalResolveType
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope if this receiver null this receiver traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

param tokens param source Positions param tag Start param tag End public Javadoc Import Reference char tokens long source Positions int tag Start int tag End super tokens source Positions false Acc Default this tag Source Start tag Start this tag Source End tag End this bits Inside Javadoc  sourcePositions tagStart tagEnd JavadocImportReference sourcePositions tagStart tagEnd sourcePositions AccDefault tagSourceStart tagStart tagSourceEnd tagEnd InsideJavadoc

public Javadoc Message Send char name long pos this selector name this name Source Position pos this source Start int this name Source Position 32 this source End int this name Source Position this bits Inside Javadoc  JavadocMessageSend nameSourcePosition sourceStart nameSourcePosition sourceEnd nameSourcePosition InsideJavadoc
this bits Inside Javadoc public Javadoc Message Send char name long pos Javadoc Argument Expression arguments this name pos this arguments arguments  InsideJavadoc JavadocMessageSend JavadocArgumentExpression
private Type Binding internal Resolve Type Scope scope Answer the signature return type Base type promotion this constant NotA Constant if this receiver null this receiver Type scope enclosing Source Type else if scope kind Scope CLASS SCOPE this receiver Type this receiver resolve Type Class Scope scope else this receiver Type this receiver resolve Type Block Scope scope will check for null after args are resolved Type Binding argument Types No Parameters if this arguments null boolean arg Has Error false type Checks all arguments int length this arguments length argument Types new Type Binding length for int i 0 i length i Expression argument this arguments i if scope kind Scope CLASS SCOPE argument Types i argument resolve Type Class Scope scope else argument Types i argument resolve Type Block Scope scope if argument Types i null arg Has Error true if arg Has Error return null check receiver type if this receiver Type null return null this qualifying Type this receiver Type this super Access scope enclosing Source Type is Compatible With this receiver Type base type cannot receive any message if this receiver Type is Base Type scope problem Reporter javadoc Error No Method For this this receiver Type argument Types scope get Declaration Modifiers return null this binding this receiver null this receiver is This scope get Implicit Method this selector argument Types this scope get Method this receiver Type this selector argument Types this if this binding is Valid Binding implicit lookup may discover issues due to static constructor contexts javadoc must be resilient switch this binding problem Id case Problem Reasons Non Static Reference In Constructor Invocation case Problem Reasons Non Static Reference In Static Context case Problem Reasons Inherited Name Hides Enclosing Name Method Binding closest Match Problem Method Binding this binding closest Match if closest Match null this binding closest Match ignore problem if can reach target method through it if this binding is Valid Binding if this binding declaring Class null if this receiver Type instanceof Reference Binding this binding declaring Class Reference Binding this receiver Type else scope problem Reporter javadoc Error No Method For this this receiver Type argument Types scope get Declaration Modifiers return null scope problem Reporter javadoc Invalid Method this this binding scope get Declaration Modifiers record the closest match for clients who may still need hint about possible method match if this binding instanceof Problem Method Binding Method Binding closest Match Problem Method Binding this binding closest Match if closest Match null this codegen Binding this binding closest Match return this resolved Type this binding null null this binding return Type if is Method Use Deprecated this binding scope scope problem Reporter javadoc Deprecated Method this binding this scope get Declaration Modifiers return this resolved Type this binding return Type  TypeBinding internalResolveType NotAConstant receiverType enclosingSourceType CLASS_SCOPE receiverType resolveType ClassScope receiverType resolveType BlockScope TypeBinding argumentTypes NoParameters argHasError typeChecks argumentTypes TypeBinding CLASS_SCOPE argumentTypes resolveType ClassScope argumentTypes resolveType BlockScope argumentTypes argHasError argHasError receiverType qualifyingType receiverType superAccess enclosingSourceType isCompatibleWith receiverType receiverType isBaseType problemReporter javadocErrorNoMethodFor receiverType argumentTypes getDeclarationModifiers isThis getImplicitMethod argumentTypes getMethod receiverType argumentTypes isValidBinding problemId ProblemReasons NonStaticReferenceInConstructorInvocation ProblemReasons NonStaticReferenceInStaticContext ProblemReasons InheritedNameHidesEnclosingName MethodBinding closestMatch ProblemMethodBinding closestMatch closestMatch closestMatch isValidBinding declaringClass receiverType ReferenceBinding declaringClass ReferenceBinding receiverType problemReporter javadocErrorNoMethodFor receiverType argumentTypes getDeclarationModifiers problemReporter javadocInvalidMethod getDeclarationModifiers ProblemMethodBinding MethodBinding closestMatch ProblemMethodBinding closestMatch closestMatch codegenBinding closestMatch resolvedType returnType isMethodUseDeprecated problemReporter javadocDeprecatedMethod getDeclarationModifiers resolvedType returnType
see org eclipse jdt internal compiler lookup Invocation Site is Super Access public boolean is Super Access return this super Access  InvocationSite isSuperAccess isSuperAccess superAccess
public String Buffer print Expression int indent String Buffer output if this receiver null this receiver print Expression 0 output output append append this selector append if this arguments null for int i 0 i this arguments length i if i 0 output append NON NLS 1 this arguments i print Expression 0 output return output append  StringBuffer printExpression StringBuffer printExpression printExpression
public Type Binding resolve Type Block Scope scope return internal Resolve Type scope  TypeBinding resolveType BlockScope internalResolveType
public Type Binding resolve Type Class Scope scope return internal Resolve Type scope  TypeBinding resolveType ClassScope internalResolveType
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope if this receiver null this receiver traverse visitor block Scope if this arguments null int arguments Length this arguments length for int i 0 i arguments Length i this arguments i traverse visitor block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope blockScope argumentsLength argumentsLength blockScope endVisit blockScope

public Javadoc Qualified Type Reference char sources long pos int tag Start int tag End super sources pos this tag Source Start tag Start this tag Source End tag End this bits Inside Javadoc  JavadocQualifiedTypeReference tagStart tagEnd tagSourceStart tagStart tagSourceEnd tagEnd InsideJavadoc
protected void report Invalid Type Scope scope scope problem Reporter javadoc Invalid Type this this resolved Type scope get Declaration Modifiers  reportInvalidType problemReporter javadocInvalidType resolvedType getDeclarationModifiers
scope problem Reporter javadoc Invalid Type this this resolved Type scope get Declaration Modifiers protected void report Deprecated Type Scope scope scope problem Reporter javadoc Deprecated Type this resolved Type this scope get Declaration Modifiers  problemReporter javadocInvalidType resolvedType getDeclarationModifiers reportDeprecatedType problemReporter javadocDeprecatedType resolvedType getDeclarationModifiers
see org eclipse jdt internal compiler ast AST Node traverse org eclipse jdt internal compiler AST Visitor org eclipse jdt internal compiler lookup Block Scope public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTNode ASTVisitor BlockScope ASTVisitor BlockScope endVisit
private Type Binding internal Resolve Type Scope scope handle the error here this constant NotA Constant if this resolved Type null is a shared type reference which was already resolved if this resolved Type is Valid Binding return null already reported error else this resolved Type get Type Binding scope if this resolved Type is Valid Binding Binding binding scope get Type Or Package this tokens if binding instanceof Package Binding this package Binding Package Binding binding else report Invalid Type scope return null if is Type Use Deprecated this resolved Type scope report Deprecated Type scope return this resolved Type  TypeBinding internalResolveType NotAConstant resolvedType resolvedType isValidBinding resolvedType getTypeBinding resolvedType isValidBinding getTypeOrPackage PackageBinding packageBinding PackageBinding reportInvalidType isTypeUseDeprecated resolvedType reportDeprecatedType resolvedType
We need to override to handle package references public Type Binding resolve Type Block Scope block Scope return internal Resolve Type block Scope  TypeBinding resolveType BlockScope blockScope internalResolveType blockScope
We need to override to handle package references public Type Binding resolve Type Class Scope class Scope return internal Resolve Type class Scope  TypeBinding resolveType ClassScope classScope internalResolveType classScope

public Javadoc Return Statement int s int e char descr super null s e this description descr this bits Inside Javadoc  JavadocReturnStatement InsideJavadoc
public void resolve Block Scope scope Method Scope method Scope scope method Scope Method Binding method Binding Type Binding method Type method Scope reference Context instanceof Abstract Method Declaration method Binding Abstract Method Declaration method Scope reference Context binding null null method Binding return Type Void Binding if method Type null method Type Void Binding scope problem Reporter javadoc Unexpected Tag this source Start this source End  BlockScope MethodScope methodScope methodScope MethodBinding methodBinding TypeBinding methodType methodScope referenceContext AbstractMethodDeclaration methodBinding AbstractMethodDeclaration methodScope referenceContext methodBinding returnType VoidBinding methodType methodType VoidBinding problemReporter javadocUnexpectedTag sourceStart sourceEnd
see org eclipse jdt internal compiler ast AST Node traverse org eclipse jdt internal compiler AST Visitor org eclipse jdt internal compiler lookup Block Scope public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTNode ASTVisitor BlockScope ASTVisitor BlockScope endVisit

public int tag Source Start tag Source End public Javadoc Single Name Reference char name int start Position int end Position super name long start Position 32 end Position this bits Inside Javadoc  tagSourceStart tagSourceEnd JavadocSingleNameReference startPosition endPosition startPosition endPosition InsideJavadoc
public void resolve Block Scope scope resolve scope true  BlockScope
Resolve without warnings public void resolve Block Scope scope boolean warn Local Variable Binding variable Binding scope find Variable this token if variable Binding null variable Binding is Valid Binding variable Binding is Argument this binding variable Binding return if warn try Method Scope meth Scope Method Scope scope scope problem Reporter javadoc Invalid Param Name this meth Scope reference Method modifiers catch Exception e scope problem Reporter javadoc Invalid Param Name this 1  BlockScope LocalVariableBinding variableBinding findVariable variableBinding variableBinding isValidBinding variableBinding isArgument variableBinding MethodScope methScope MethodScope problemReporter javadocInvalidParamName methScope referenceMethod problemReporter javadocInvalidParamName
see org eclipse jdt internal compiler ast AST Node traverse org eclipse jdt internal compiler AST Visitor org eclipse jdt internal compiler lookup Block Scope public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTNode ASTVisitor BlockScope ASTVisitor BlockScope endVisit

public Javadoc Single Type Reference char source long pos int tag Start int tag End super source pos this tag Source Start tag Start this tag Source End tag End this bits Inside Javadoc  JavadocSingleTypeReference tagStart tagEnd tagSourceStart tagStart tagSourceEnd tagEnd InsideJavadoc
protected void report Invalid Type Scope scope scope problem Reporter javadoc Invalid Type this this resolved Type scope get Declaration Modifiers  reportInvalidType problemReporter javadocInvalidType resolvedType getDeclarationModifiers
scope problem Reporter javadoc Invalid Type this this resolved Type scope get Declaration Modifiers protected void report Deprecated Type Scope scope scope problem Reporter javadoc Deprecated Type this resolved Type this scope get Declaration Modifiers  problemReporter javadocInvalidType resolvedType getDeclarationModifiers reportDeprecatedType problemReporter javadocDeprecatedType resolvedType getDeclarationModifiers
see org eclipse jdt internal compiler ast AST Node traverse org eclipse jdt internal compiler AST Visitor org eclipse jdt internal compiler lookup Block Scope public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTNode ASTVisitor BlockScope ASTVisitor BlockScope endVisit
private Type Binding internal Resolve Type Scope scope handle the error here this constant NotA Constant if this resolved Type null is a shared type reference which was already resolved if this resolved Type is Valid Binding return null already reported error else this resolved Type get Type Binding scope if this resolved Type is Valid Binding char tokens this token Binding binding scope get Type Or Package tokens if binding instanceof Package Binding this package Binding Package Binding binding else report Invalid Type scope return null if is Type Use Deprecated this resolved Type scope report Deprecated Type scope return this resolved Type  TypeBinding internalResolveType NotAConstant resolvedType resolvedType isValidBinding resolvedType getTypeBinding resolvedType isValidBinding getTypeOrPackage PackageBinding packageBinding PackageBinding reportInvalidType isTypeUseDeprecated resolvedType reportDeprecatedType resolvedType
We need to override to handle package references public Type Binding resolve Type Block Scope block Scope return internal Resolve Type block Scope  TypeBinding resolveType BlockScope blockScope internalResolveType blockScope
We need to override to handle package references public Type Binding resolve Type Class Scope class Scope return internal Resolve Type class Scope  TypeBinding resolveType ClassScope classScope internalResolveType classScope

Labeled Statement constructor comment public Labeled Statement char label Statement statement int source Start int source End this statement statement remember useful empty statement if statement instanceof Empty Statement statement bits Is Useful Empty StatementMASK this label label this source Start source Start this source End source End  LabeledStatement LabeledStatement sourceStart sourceEnd EmptyStatement IsUsefulEmptyStatementMASK sourceStart sourceStart sourceEnd sourceEnd
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info need to stack a context to store explicit label answer inits in case of normal completion merged with those relative to the exit path from break statement occurring inside the labeled statement if statement null return flow Info else Label Flow Context label Context Flow Info merged Info statement analyse Code current Scope label Context new Label Flow Context flow Context this label target Label new Label current Scope flow Info merged With label Context inits On Break merged Init State Index current Scope method Scope record Initialization States merged Info return merged Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo flowInfo LabelFlowContext labelContext FlowInfo mergedInfo analyseCode currentScope labelContext LabelFlowContext flowContext targetLabel currentScope flowInfo mergedWith labelContext initsOnBreak mergedInitStateIndex currentScope methodScope recordInitializationStates mergedInfo mergedInfo
public AST Node concrete Statement return statement concrete Statement for supporting nested labels a b c some Statement see 21912 return statement  ASTNode concreteStatement concreteStatement someStatement
Code generation for labeled statement may not need actual source positions recording param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream public void generate Code Block Scope current Scope Code Stream code Stream int pc code Stream position if target Label null target Label initialize code Stream if statement null statement generate Code current Scope code Stream target Label place May loose some local variable initializations affecting the local variable attributes if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream generateCode BlockScope currentScope CodeStream codeStream codeStream targetLabel targetLabel codeStream generateCode currentScope codeStream targetLabel mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex codeStream recordPositionsFrom sourceStart
public String Buffer print Statement int tab String Buffer output print Indent tab output append label append NON NLS 1 if this statement null output append else this statement print Statement 0 output return output  StringBuffer printStatement StringBuffer printIndent printStatement
public void resolve Block Scope scope if this statement null this statement resolve scope  BlockScope
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope if this statement null this statement traverse visitor block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope blockScope endVisit blockScope

public Literal int s int e source Start s source End e  sourceStart sourceEnd
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo flowInfo
public abstract void compute Constant  computeConstant
public abstract void compute Constant public abstract Type Binding literal Type Block Scope scope  computeConstant TypeBinding literalType BlockScope
public abstract Type Binding literal Type Block Scope scope public String Buffer print Expression int indent String Buffer output return output append source  TypeBinding literalType BlockScope StringBuffer printExpression StringBuffer
public Type Binding resolve Type Block Scope scope compute the real value which must range its type s range this resolved Type literal Type scope in case of error constant did remain null compute Constant if constant null scope problem Reporter constant Out Of Range this this resolved Type constant Constant NotA Constant return this resolved Type  TypeBinding resolveType BlockScope resolvedType literalType computeConstant problemReporter constantOutOfRange resolvedType NotAConstant resolvedType
public abstract char source 

public Local Declaration char name int source Start int source End this name name this source Start source Start this source End source End this declaration End source End  LocalDeclaration sourceStart sourceEnd sourceStart sourceStart sourceEnd sourceEnd declarationEnd sourceEnd
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info record variable initialization if any if flow Info is Reachable bits Is Local Declaration ReachableMASK only set if actually reached if initialization null return flow Info flow Info initialization analyse Code current Scope flow Context flow Info unconditional Inits final int i i 0 no need to complain since i 0 part will get the blame if binding is Final flow Info is Potentially Assigned binding current Scope problem Reporter duplicate Initialization Of Final Local binding this flow Info mark As Definitely Assigned binding return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo flowInfo isReachable IsLocalDeclarationReachableMASK flowInfo flowInfo analyseCode currentScope flowContext flowInfo unconditionalInits isFinal flowInfo isPotentiallyAssigned currentScope problemReporter duplicateInitializationOfFinalLocal flowInfo markAsDefinitelyAssigned flowInfo
public void check Modifiers only potential valid modifier is final if modifiers Acc Just Flag Acc Final 0 Acc Modifier Problem other non visibility problem Acc Alternate Modifier Problem duplicate modifier Acc Modifier Problem Acc Alternate Modifier Problem visibility problem modifiers modifiers Acc Alternate Modifier Problem Acc Modifier Problem  checkModifiers AccJustFlag AccFinal AccModifierProblem AccAlternateModifierProblem AccModifierProblem AccAlternateModifierProblem AccAlternateModifierProblem AccModifierProblem
Code generation for a local declaration i e nbsp normal assignment to a local variable unused variable handling public void generate Code Block Scope current Scope Code Stream code Stream even if not reachable variable must be added to visible if allocated 28298 if binding resolved Position 1 code Stream add Visible Local Variable binding if bits Is ReachableMASK 0 return int pc code Stream position Constant inlined Value something to initialize if initialization null initialize to constant value if inlined Value initialization constant NotA Constant forget initializing unused or final locals set to constant value final ones are inlined if binding resolved Position 1 may need to preserve variable int initPC code Stream position code Stream generate Constant inlined Value initialization implicit Conversion code Stream record Positions From initPC initialization source Start code Stream store binding false binding record Initialization StartPC code Stream position code Stream last Init State Index When Removing Inits 2 reinitialize remove index code Stream last Init State Index When Adding Inits 2 reinitialize add index else initializing to non constant value initialization generate Code current Scope code Stream true if binding unused generate then discard the value if binding resolved Position 1 26903 need extra cast to store null in array local var if binding type is Array Type initialization resolved Type Null Binding array Loc null initialization instanceof Cast Expression array Loc type null Cast Expression initialization innermost Casted Expression resolved Type Null Binding code Stream checkcast binding type code Stream store binding false if binding initialization Count 0 Variable may have been initialized during the code initializing it e g int i i 1 binding record Initialization StartPC code Stream position code Stream last Init State Index When Removing Inits 2 reinitialize remove index code Stream last Init State Index When Adding Inits 2 reinitialize add index else if binding type Long Binding binding type Double Binding code Stream pop2 else code Stream pop code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream resolvedPosition codeStream addVisibleLocalVariable IsReachableMASK codeStream inlinedValue inlinedValue NotAConstant resolvedPosition codeStream codeStream generateConstant inlinedValue implicitConversion codeStream recordPositionsFrom sourceStart codeStream recordInitializationStartPC codeStream codeStream lastInitStateIndexWhenRemovingInits codeStream lastInitStateIndexWhenAddingInits generateCode currentScope codeStream resolvedPosition isArrayType resolvedType NullBinding arrayLoc CastExpression arrayLoc CastExpression innermostCastedExpression resolvedType NullBinding codeStream codeStream initializationCount recordInitializationStartPC codeStream codeStream lastInitStateIndexWhenRemovingInits codeStream lastInitStateIndexWhenAddingInits LongBinding DoubleBinding codeStream codeStream codeStream recordPositionsFrom sourceStart
public void resolve Block Scope scope create a binding and add it to the scope Type Binding type Binding type resolve Type scope check Modifiers if type Binding null if type Binding Void Binding scope problem Reporter variable Type Cannot Be Void this return if type Binding is Array Type Array Binding type Binding leaf Component Type Void Binding scope problem Reporter variable Type Cannot Be Void Array this return Binding existing Variable scope get Binding name Binding Ids VARIABLE this false do not resolve hidden field boolean should Insert In Scope true if existing Variable null existing Variable is Valid Binding if existing Variable instanceof Local Variable Binding this hidden Variable Depth 0 should Insert In Scope false scope problem Reporter redefine Local this else scope problem Reporter local Variable Hiding this existing Variable false if should Insert In Scope if modifiers Acc Final 0 this initialization null modifiers Acc Blank Final binding new Local Variable Binding this type Binding modifiers false scope add Local Variable binding binding constant NotA Constant allow to recursivelly target the binding the correct constant is harmed if correctly computed at the end of this method if type Binding null if initialization null initialization resolve Type scope want to report all possible errors return store the constant for final locals if initialization null if initialization instanceof Array Initializer Type Binding initialization Type initialization resolve Type Expecting scope type Binding if initialization Type null Array Initializer initialization binding Array Binding initialization Type initialization implicit Widening type Binding initialization Type else Type Binding initialization Type initialization resolve Type scope if initialization Type null if initialization is Constant Value Of Type Assignable To Type initialization Type type Binding type Binding is Base Type Base Type Binding is Widening type Binding id initialization Type id initialization Type is Compatible With type Binding initialization implicit Widening type Binding initialization Type else scope problem Reporter type Mismatch Error initialization Type type Binding this change the constant in the binding when it is final the optimization of the constant propagation will be done later on cast from constant actual type to variable type if binding null binding constant binding is Final initialization constant cast To type Binding id 4 initialization constant typeID NotA Constant  BlockScope TypeBinding typeBinding resolveType checkModifiers typeBinding typeBinding VoidBinding problemReporter variableTypeCannotBeVoid typeBinding isArrayType ArrayBinding typeBinding leafComponentType VoidBinding problemReporter variableTypeCannotBeVoidArray existingVariable getBinding BindingIds shouldInsertInScope existingVariable existingVariable isValidBinding existingVariable LocalVariableBinding hiddenVariableDepth shouldInsertInScope problemReporter redefineLocal problemReporter localVariableHiding existingVariable shouldInsertInScope AccFinal AccBlankFinal LocalVariableBinding typeBinding addLocalVariable NotAConstant typeBinding resolveType ArrayInitializer TypeBinding initializationType resolveTypeExpecting typeBinding initializationType ArrayInitializer ArrayBinding initializationType implicitWidening typeBinding initializationType TypeBinding initializationType resolveType initializationType isConstantValueOfTypeAssignableToType initializationType typeBinding typeBinding isBaseType BaseTypeBinding isWidening typeBinding initializationType initializationType isCompatibleWith typeBinding implicitWidening typeBinding initializationType problemReporter typeMismatchError initializationType typeBinding isFinal castTo typeBinding NotAConstant
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope type traverse visitor scope if initialization null initialization traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

static final Constant FORMAT ERROR new Double Constant 1 0 0 0 NaN public Long Literal char token int s int e super token s e  FORMAT_ERROR DoubleConstant LongLiteral
super token s e public Long Literal char token int s int e long value this token s e this value value  LongLiteral
public void compute Constant the overflow when radix 10 is tested using the fact that the value should always grow during its computation int length source length 1 minus one because the last char is l or L long computed Value if source 0 0 if length 1 constant Constant from Value 0L return final int shift radix int j if source 1 x source 1 X shift 4 j 2 radix 16 else shift 3 j 1 radix 8 int nb Digit 0 while source j 0 j jump over redondant zero if j length watch for 0000000000000L constant Constant from Value value 0L return int digit Value if digit Value Character digit source j radix 0 constant FORMAT ERROR return if digit Value 8 nb Digit 4 else if digit Value 4 nb Digit 3 else if digit Value 2 nb Digit 2 else nb Digit 1 digit Value is not 0 computed Value digit Value while j length if digit Value Character digit source j radix 0 constant FORMAT ERROR return if nb Digit shift 64 return constant stays null computed Value computed Value shift digit Value else case radix 10 long previous computed Value 0 for int i 0 i length i int digit Value if digit Value Character digit source i 10 0 return constant stays null previous computed Value computed Value 10 computed Value digit Value if previous computed Value return constant stays null constant Constant from Value value computed Value  computeConstant computedValue fromValue nbDigit fromValue digitValue digitValue FORMAT_ERROR digitValue nbDigit digitValue nbDigit digitValue nbDigit nbDigit digitValue computedValue digitValue digitValue FORMAT_ERROR nbDigit computedValue computedValue digitValue computedValue digitValue digitValue computedValue computedValue computedValue digitValue computedValue fromValue computedValue
Code generation for long literal param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if value Required if implicit Conversion 4 T long code Stream generate Inlined Value value else code Stream generate Constant constant implicit Conversion code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream valueRequired implicitConversion T_long codeStream generateInlinedValue codeStream generateConstant implicitConversion codeStream recordPositionsFrom sourceStart
code Stream record Positions From pc this source Start public Type Binding literal Type Block Scope scope return Long Binding  codeStream recordPositionsFrom sourceStart TypeBinding literalType BlockScope LongBinding
public final boolean mayRepresentMIN VALUE a special autorized int literral is 9223372036854775808L which is ONE over the limit This special case only is used in combinaison with to denote the minimal value of int 9223372036854775808L return source length 20 source 0 9 source 1 2 source 2 2 source 3 3 source 4 3 source 5 7 source 6 2 source 7 0 source 8 3 source 9 6 source 10 8 source 11 5 source 12 4 source 13 7 source 14 7 source 15 5 source 16 8 source 17 0  mayRepresentMIN_VALUE
source 18 8 public Type Binding resolve Type Block Scope scope the format may be incorrect while the scanner could detect such error only on painfull tests easier and faster here Type Binding tb super resolve Type scope if constant FORMAT ERROR constant NotA Constant scope problem Reporter constant Out Of Format this this resolved Type null return null return tb  TypeBinding resolveType BlockScope TypeBinding resolveType FORMAT_ERROR NotAConstant problemReporter constantOutOfFormat resolvedType
return tb public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

final static Constant MIN VALUE Constant from Value Long MIN VALUE public Long Literal Min Value super Char Value 0 0 Long MIN VALUE constant MIN VALUE  MIN_VALUE fromValue MIN_VALUE LongLiteralMinValue CharValue MIN_VALUE MIN_VALUE
constant MIN VALUE public void compute Constant precomputed at creation time  MIN_VALUE computeConstant

public abstract class Magic Literal extends Literal public Magic Literal int start int end super start end  MagicLiteral MagicLiteral
public boolean is Valid Java Statement return false  isValidJavaStatement
public char source return null 

public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info flow Info receiver analyse Code current Scope flow Context flow Info binding is Static unconditional Inits if arguments null int length arguments length for int i 0 i length i flow Info arguments i analyse Code current Scope flow Context flow Info unconditional Inits Reference Binding thrown Exceptions if thrown Exceptions binding thrown Exceptions No Exceptions must verify that exceptions potentially thrown by this expression are caught in the method flow Context check Exception Handlers thrown Exceptions this flow Info current Scope manage Synthetic Access If Necessary current Scope flow Info return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo flowInfo analyseCode currentScope flowContext flowInfo isStatic unconditionalInits flowInfo analyseCode currentScope flowContext flowInfo unconditionalInits ReferenceBinding thrownExceptions thrownExceptions thrownExceptions NoExceptions flowContext checkExceptionHandlers thrownExceptions flowInfo currentScope manageSyntheticAccessIfNecessary currentScope flowInfo flowInfo
Message Send code generation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position generate receiver enclosing instance access boolean is Static codegen Binding is Static outer access if is Static bits DepthMASK 0 receiver is Implicit This outer method can be reached through emulation if implicit access Reference Binding target Type current Scope enclosing Source Type enclosing Type At bits DepthMASK DepthSHIFT Object path current Scope get Emulation Path target Type true only exact match false consider enclosing arg code Stream generate Outer Access path this target Type current Scope else receiver generate Code current Scope code Stream is Static generate arguments if arguments null for int i 0 max arguments length i max i arguments i generate Code current Scope code Stream true actual message invocation if synthetic Accessor null if is Static code Stream invokestatic codegen Binding else if receiver is Super codegen Binding is Private code Stream invokespecial codegen Binding else if codegen Binding declaring Class is Interface code Stream invokeinterface codegen Binding else code Stream invokevirtual codegen Binding else code Stream invokestatic synthetic Accessor operation on the returned value if value Required implicit conversion if necessary code Stream generate Implicit Conversion implicit Conversion else pop return value if any switch binding return Type id case T long case T double code Stream pop2 break case T void break default code Stream pop code Stream record Positions From pc int this name Source Position 32 highlight selector  MessageSend currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream isStatic codegenBinding isStatic isStatic isImplicitThis ReferenceBinding targetType currentScope enclosingSourceType enclosingTypeAt currentScope getEmulationPath targetType codeStream generateOuterAccess targetType currentScope generateCode currentScope codeStream isStatic generateCode currentScope codeStream syntheticAccessor isStatic codeStream codegenBinding isSuper codegenBinding isPrivate codeStream codegenBinding codegenBinding declaringClass isInterface codeStream codegenBinding codeStream codegenBinding codeStream syntheticAccessor valueRequired codeStream generateImplicitConversion implicitConversion returnType T_long T_double codeStream T_void codeStream codeStream recordPositionsFrom nameSourcePosition
code Stream record Positions From pc int this name Source Position 32 highlight selector public boolean is Super Access return receiver is Super  codeStream recordPositionsFrom nameSourcePosition isSuperAccess isSuper
return receiver is Super public boolean is Type Access return receiver null receiver is Type Reference  isSuper isTypeAccess isTypeReference
public void manage Synthetic Access If Necessary Block Scope current Scope Flow Info flow Info if flow Info is Reachable return if binding is Private depth is set for both implicit and explicit access see Method Binding can Be Seen By if current Scope enclosing Source Type binding declaring Class synthetic Accessor Source Type Binding binding declaring Class add Synthetic Method binding is Super Access current Scope problem Reporter need To Emulate Method Access binding this return else if receiver instanceof Qualified Super Reference qualified super qualified super need emulation always Source Type Binding destination Type Source Type Binding Qualified Super Reference receiver current Compatible Type synthetic Accessor destination Type add Synthetic Method binding is Super Access current Scope problem Reporter need To Emulate Method Access binding this return else if binding is Protected Source Type Binding enclosing Source Type if bits DepthMASK 0 binding declaring Class get Package enclosing Source Type current Scope enclosing Source Type get Package Source Type Binding current Compatible Type Source Type Binding enclosing Source Type enclosing Type At bits DepthMASK DepthSHIFT synthetic Accessor current Compatible Type add Synthetic Method binding is Super Access current Scope problem Reporter need To Emulate Method Access binding this return if the binding declaring class is not visible need special action for runtime compatibility on 1 2 V Ms change the declaring class of the binding NOTE from target 1 2 on method s declaring class is touched if any different from receiver type and not from Object or implicit static method call if binding declaring Class this qualifying Type this qualifying Type is Array Type current Scope environment options targetJDK Class File Constants JDK1 2 receiver is Implicit This binding is Static binding declaring Class id T Object no change for Object methods binding declaring Class can Be Seen By current Scope this codegen Binding current Scope enclosing Source Type get Updated Method Binding binding Reference Binding this qualifying Type Post 1 4 0 target array clone invocations are qualified with array type This is handled in array type clone method binding resolution see Scope and Updated Method Binding  manageSyntheticAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable isPrivate MethodBinding canBeSeenBy currentScope enclosingSourceType declaringClass syntheticAccessor SourceTypeBinding declaringClass addSyntheticMethod isSuperAccess currentScope problemReporter needToEmulateMethodAccess QualifiedSuperReference SourceTypeBinding destinationType SourceTypeBinding QualifiedSuperReference currentCompatibleType syntheticAccessor destinationType addSyntheticMethod isSuperAccess currentScope problemReporter needToEmulateMethodAccess isProtected SourceTypeBinding enclosingSourceType declaringClass getPackage enclosingSourceType currentScope enclosingSourceType getPackage SourceTypeBinding currentCompatibleType SourceTypeBinding enclosingSourceType enclosingTypeAt syntheticAccessor currentCompatibleType addSyntheticMethod isSuperAccess currentScope problemReporter needToEmulateMethodAccess VMs declaringClass qualifyingType qualifyingType isArrayType currentScope ClassFileConstants JDK1_2 isImplicitThis isStatic declaringClass T_Object declaringClass canBeSeenBy currentScope codegenBinding currentScope enclosingSourceType getUpdatedMethodBinding ReferenceBinding qualifyingType UpdatedMethodBinding
public String Buffer print Expression int indent String Buffer output if receiver is Implicit This receiver print Expression 0 output append output append selector append NON NLS 1 if arguments null for int i 0 i arguments length i if i 0 output append NON NLS 1 arguments i print Expression 0 output return output append  StringBuffer printExpression StringBuffer isImplicitThis printExpression printExpression
public Type Binding resolve Type Block Scope scope Answer the signature return type Base type promotion constant NotA Constant boolean receiver Cast false arguments Cast false if this receiver instanceof Cast Expression this receiver bits Ignore Need For Cast CheckMASK will check later on receiver Cast true this qualifying Type this receiver Type receiver resolve Type scope if receiver Cast this receiver Type null due to change of declaring class with receiver type only identity cast should be notified if Cast Expression this receiver expression resolved Type this receiver Type scope problem Reporter unnecessary Cast Cast Expression this receiver will check for null after args are resolved Type Binding argument Types No Parameters if arguments null boolean arg Has Error false type Checks all arguments int length arguments length argument Types new Type Binding length for int i 0 i length i Expression argument arguments i if argument instanceof Cast Expression argument bits Ignore Need For Cast CheckMASK will check later on arguments Cast true if argument Types i argument resolve Type scope null arg Has Error true if arg Has Error if receiver Type instanceof Reference Binding record any selector match for clients who may still need hint about possible method match this codegen Binding this binding scope find Method Reference Binding receiver Type selector new Type Binding this return null if this receiver Type null return null base type cannot receive any message if this receiver Type is Base Type scope problem Reporter error No Method For this this receiver Type argument Types return null this codegen Binding this binding receiver is Implicit This scope get Implicit Method selector argument Types this scope get Method this receiver Type selector argument Types this if binding is Valid Binding if binding declaring Class null if this receiver Type instanceof Reference Binding binding declaring Class Reference Binding this receiver Type else scope problem Reporter error No Method For this this receiver Type argument Types return null scope problem Reporter invalid Method this binding record the closest match for clients who may still need hint about possible method match if binding instanceof Problem Method Binding Method Binding closest Match Problem Method Binding binding closest Match if closest Match null this codegen Binding this binding closest Match return this resolved Type this binding null null this binding return Type if binding is Static the receiver must not be a type in other words a Name Reference that the TC has bound to a Type if receiver instanceof Name Reference Name Reference receiver bits Binding Ids TYPE 0 scope problem Reporter must UseA Static Method this binding else static message invoked through receiver legal but unoptimal optional warning if receiver is Implicit This receiver is Super receiver instanceof Name Reference Name Reference receiver bits Binding Ids TYPE 0 scope problem Reporter non Static Access To Static Method this binding if receiver is Implicit This binding declaring Class receiver Type scope problem Reporter indirect Access To Static Method this binding if arguments null for int i 0 i arguments length i arguments i implicit Widening binding parameters i argument Types i if arguments Cast Cast Expression check Need For Argument Casts scope this receiver receiver Type binding this arguments argument Types this message send that are known to fail at compile time if binding is Abstract if receiver is Super scope problem Reporter cannot Direcly Invoke Abstract Method this binding abstract private methods cannot occur nor abstract static if is Method Use Deprecated binding scope scope problem Reporter deprecated Method binding this return this resolved Type binding return Type  TypeBinding resolveType BlockScope NotAConstant receiverCast argumentsCast CastExpression IgnoreNeedForCastCheckMASK receiverCast qualifyingType receiverType resolveType receiverCast receiverType CastExpression resolvedType receiverType problemReporter unnecessaryCast CastExpression TypeBinding argumentTypes NoParameters argHasError typeChecks argumentTypes TypeBinding CastExpression IgnoreNeedForCastCheckMASK argumentsCast argumentTypes resolveType argHasError argHasError receiverType ReferenceBinding codegenBinding findMethod ReferenceBinding receiverType TypeBinding receiverType receiverType isBaseType problemReporter errorNoMethodFor receiverType argumentTypes codegenBinding isImplicitThis getImplicitMethod argumentTypes getMethod receiverType argumentTypes isValidBinding declaringClass receiverType ReferenceBinding declaringClass ReferenceBinding receiverType problemReporter errorNoMethodFor receiverType argumentTypes problemReporter invalidMethod ProblemMethodBinding MethodBinding closestMatch ProblemMethodBinding closestMatch closestMatch codegenBinding closestMatch resolvedType returnType isStatic NameReference NameReference NameReference BindingIds problemReporter mustUseAStaticMethod isImplicitThis isSuper NameReference NameReference BindingIds problemReporter nonStaticAccessToStaticMethod isImplicitThis declaringClass receiverType problemReporter indirectAccessToStaticMethod implicitWidening argumentTypes argumentsCast CastExpression checkNeedForArgumentCasts receiverType argumentTypes isAbstract isSuper problemReporter cannotDireclyInvokeAbstractMethod isMethodUseDeprecated problemReporter deprecatedMethod resolvedType returnType
return this resolved Type binding return Type public void set Actual Receiver Type Reference Binding receiver Type this qualifying Type receiver Type  resolvedType returnType setActualReceiverType ReferenceBinding receiverType qualifyingType receiverType
public void set Depth int depth bits DepthMASK flush previous depth if any if depth 0 bits depth 0xFF DepthSHIFT encoded on 8 bits  setDepth
public void set Field Index int depth ignore for here  setFieldIndex
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope receiver traverse visitor block Scope if arguments null int arguments Length arguments length for int i 0 i arguments Length i arguments i traverse visitor block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope blockScope argumentsLength argumentsLength blockScope endVisit blockScope

Method Declaration constructor comment public Method Declaration Compilation Result compilation Result super compilation Result  MethodDeclaration MethodDeclaration CompilationResult compilationResult compilationResult
public void analyse Code Class Scope class Scope Initialization Flow Context initialization Context Flow Info flow Info starting of the code analysis for methods if ignore Further Investigation return try if binding null return if this binding is Private this binding is Private Used if class Scope reference Compilation Unit compilation Result has Syntax Error scope problem Reporter unused Private Method this may be in a non necessary clinit for innerclass with static final constant fields if binding is Abstract binding is Native return Exception Handling Flow Context method Context new Exception Handling Flow Context initialization Context this binding thrown Exceptions scope Flow Info DEAD END propagate to statements if statements null boolean did Already Complain false for int i 0 count statements length i count i Statement stat statements i if stat complain If Unreachable flow Info scope did Already Complain flow Info stat analyse Code scope method Context flow Info else did Already Complain true check for missing returning path Type Binding return Type Binding binding return Type if return Type Binding Void Binding is Abstract this need Free Return flow Info is Reachable else if flow Info Flow Info DEAD END scope problem Reporter should Return return Type Binding this check unreachable catch blocks method Context complain If Unused Exception Handlers this catch Abort Method e this ignore Further Investigation true  analyseCode ClassScope classScope InitializationFlowContext initializationContext FlowInfo flowInfo ignoreFurtherInvestigation isPrivate isPrivateUsed classScope referenceCompilationUnit compilationResult hasSyntaxError problemReporter unusedPrivateMethod isAbstract isNative ExceptionHandlingFlowContext methodContext ExceptionHandlingFlowContext initializationContext thrownExceptions FlowInfo DEAD_END didAlreadyComplain complainIfUnreachable flowInfo didAlreadyComplain flowInfo analyseCode methodContext flowInfo didAlreadyComplain TypeBinding returnTypeBinding returnType returnTypeBinding VoidBinding isAbstract needFreeReturn flowInfo isReachable flowInfo FlowInfo DEAD_END problemReporter shouldReturn returnTypeBinding methodContext complainIfUnusedExceptionHandlers AbortMethod ignoreFurtherInvestigation
public void parse Statements Parser parser Compilation Unit Declaration unit fill up the method body with statement if ignore Further Investigation return parser parse this unit  parseStatements CompilationUnitDeclaration ignoreFurtherInvestigation
public String Buffer print Return Type int indent String Buffer output if return Type null return output return return Type print Expression 0 output append  StringBuffer printReturnType StringBuffer returnType returnType printExpression
public void resolve Statements abort on fatal error if this return Type null this binding null this return Type resolved Type this binding return Type record the return type binding look if the name of the method is correct if binding null is Type Use Deprecated binding return Type scope scope problem Reporter deprecated Type binding return Type return Type check if method with constructor name if Char Operation equals scope enclosing Source Type source Name selector scope problem Reporter method With Constructor Name this by grammatical construction interface methods are always abstract if scope enclosing Source Type is Interface if a method has an semicolon body and is not declared as abstract error native methods may have a semicolon body if modifiers Acc Semicolon Body 0 if modifiers Acc Native 0 if modifiers Acc Abstract 0 scope problem Reporter method Need Body this else the method HAS a body abstract native modifiers are forbiden if modifiers Acc Native 0 modifiers Acc Abstract 0 scope problem Reporter method Needing No Body this super resolve Statements  resolveStatements returnType returnType resolvedType returnType isTypeUseDeprecated returnType problemReporter deprecatedType returnType returnType CharOperation enclosingSourceType sourceName problemReporter methodWithConstructorName enclosingSourceType isInterface AccSemicolonBody AccNative AccAbstract problemReporter methodNeedBody AccNative AccAbstract problemReporter methodNeedingNoBody resolveStatements
public void traverse AST Visitor visitor Class Scope class Scope if visitor visit this class Scope if return Type null return Type traverse visitor scope if arguments null int argument Length arguments length for int i 0 i argument Length i arguments i traverse visitor scope if thrown Exceptions null int thrown Exceptions Length thrown Exceptions length for int i 0 i thrown Exceptions Length i thrown Exceptions i traverse visitor scope if statements null int statements Length statements length for int i 0 i statements Length i statements i traverse visitor scope visitor end Visit this class Scope  ASTVisitor ClassScope classScope classScope returnType returnType argumentLength argumentLength thrownExceptions thrownExceptionsLength thrownExceptions thrownExceptionsLength thrownExceptions statementsLength statementsLength endVisit classScope

no change Class in java public Name Reference super bits TYPE VARIABLE restrictive Flag  changeClass NameReference restrictiveFlag
public Field Binding field Binding this method should be sent ONLY after a check against is Field Reference check its use doing senders return Field Binding binding  FieldBinding fieldBinding isFieldReference FieldBinding
return Field Binding binding public boolean is Super Access return false  FieldBinding isSuperAccess
return false public boolean is Type Access null is acceptable when we are resolving the first part of a reference return binding null binding instanceof Reference Binding  isTypeAccess ReferenceBinding
return binding null binding instanceof Reference Binding public boolean is Type Reference return binding instanceof Reference Binding  ReferenceBinding isTypeReference ReferenceBinding
return binding instanceof Reference Binding public void set Actual Receiver Type Reference Binding receiver Type this actual Receiver Type receiver Type  ReferenceBinding setActualReceiverType ReferenceBinding receiverType actualReceiverType receiverType
public void set Depth int depth bits DepthMASK flush previous depth if any if depth 0 bits depth 0xFF DepthSHIFT encoded on 8 bits  setDepth
public void set Field Index int index ignored  setFieldIndex
public abstract String unbound Reference Error Name  unboundReferenceErrorName

static final char source n u l l public Null Literal int s int e super s e  NullLiteral
public void compute Constant constant NotA Constant  computeConstant NotAConstant
Code generation for the null literal param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if value Required code Stream aconst null code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream valueRequired codeStream aconst_null codeStream recordPositionsFrom sourceStart
code Stream record Positions From pc this source Start public Type Binding literal Type Block Scope scope return Null Binding  codeStream recordPositionsFrom sourceStart TypeBinding literalType BlockScope NullBinding
public char source return source 
public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

public Number Literal char token int s int e this s e source token  NumberLiteral
public Number Literal int s int e super s e  NumberLiteral
public boolean is Valid Java Statement return false  isValidJavaStatement
public char source return source 

Operator Expression constructor comment public Operator Expression super  OperatorExpression OperatorExpression
public static final void class Initialize Operator Signatures AND get AND Operator Signatures AND AND get AND AND Operator Signatures DIVIDE get DIVIDE Operator Signatures EQUAL EQUAL get EQUAL EQUAL Operator Signatures GREATER get GREATER Operator Signatures GREATER EQUAL get GREATER EQUAL Operator Signatures LEFT SHIFT get LEFT SHIFT Operator Signatures LESS get LESS Operator Signatures LESS EQUAL get LESS EQUAL Operator Signatures MINUS get MINUS Operator Signatures MULTIPLY get MULTIPLY Operator Signatures OR get OR Operator Signatures OR OR get OR OR Operator Signatures PLUS get PLUS Operator Signatures REMAINDER get REMAINDER Operator Signatures RIGHT SHIFT get RIGHT SHIFT Operator Signatures UNSIGNED RIGHT SHIFT get UNSIGNED RIGHT SHIFT Operator Signatures XOR get XOR  classInitialize OperatorSignatures get_AND OperatorSignatures AND_AND get_AND_AND OperatorSignatures get_DIVIDE OperatorSignatures EQUAL_EQUAL get_EQUAL_EQUAL OperatorSignatures get_GREATER OperatorSignatures GREATER_EQUAL get_GREATER_EQUAL OperatorSignatures LEFT_SHIFT get_LEFT_SHIFT OperatorSignatures get_LESS OperatorSignatures LESS_EQUAL get_LESS_EQUAL OperatorSignatures get_MINUS OperatorSignatures get_MULTIPLY OperatorSignatures get_OR OperatorSignatures OR_OR get_OR_OR OperatorSignatures get_PLUS OperatorSignatures get_REMAINDER OperatorSignatures RIGHT_SHIFT get_RIGHT_SHIFT OperatorSignatures UNSIGNED_RIGHT_SHIFT get_UNSIGNED_RIGHT_SHIFT OperatorSignatures get_XOR
class Decode public final String constant int code switch code case T boolean return true NON NLS 1 case T byte return byte 3 NON NLS 1 case T char return A NON NLS 1 case T double return 300 0d NON NLS 1 case T float return 100 0f NON NLS 1 case T int return 1 NON NLS 1 case T long return 7L NON NLS 1 case T String return hello world NON NLS 1 case T null return null NON NLS 1 case T short return short 5 NON NLS 1 case T Object return null NON NLS 1  T_boolean T_byte T_char T_double T_float T_int T_long T_String T_null T_short T_Object
public final String type int code switch code case T boolean return z NON NLS 1 case T byte return b NON NLS 1 case T char return c NON NLS 1 case T double return d NON NLS 1 case T float return f NON NLS 1 case T int return i NON NLS 1 case T long return l NON NLS 1 case T String return str NON NLS 1 case T null return null NON NLS 1 case T short return s NON NLS 1 case T Object return obj NON NLS 1  T_boolean T_byte T_char T_double T_float T_int T_long T_String T_null T_short T_Object
public final String operator int operator switch operator case EQUAL EQUAL return NON NLS 1 case LESS EQUAL return NON NLS 1 case GREATER EQUAL return NON NLS 1 case LEFT SHIFT return NON NLS 1 case RIGHT SHIFT return NON NLS 1 case UNSIGNED RIGHT SHIFT return NON NLS 1 case OR OR return NON NLS 1 case AND AND return NON NLS 1 case PLUS return NON NLS 1 case MINUS return NON NLS 1 case NOT return NON NLS 1 case REMAINDER return NON NLS 1 case XOR return NON NLS 1 case AND return NON NLS 1 case MULTIPLY return NON NLS 1 case OR return NON NLS 1 case TWIDDLE return NON NLS 1 case DIVIDE return NON NLS 1 case GREATER return NON NLS 1 case LESS return NON NLS 1  EQUAL_EQUAL LESS_EQUAL GREATER_EQUAL LEFT_SHIFT RIGHT_SHIFT UNSIGNED_RIGHT_SHIFT OR_OR AND_AND
public static final String generate Table Test Case return a String which is a java method allowing to test the non zero entries of all tables org eclipse jdt internal compiler ast Operator Expression generate Table Test Case int operators new int AND AND AND DIVIDE GREATER GREATER EQUAL LEFT SHIFT LESS LESS EQUAL MINUS MULTIPLY OR OR OR PLUS REMAINDER RIGHT SHIFT UNSIGNED RIGHT SHIFT XOR class Decode public final String constant int code switch code case T boolean return true NON NLS 1 case T byte return byte 3 NON NLS 1 case T char return A NON NLS 1 case T double return 300 0d NON NLS 1 case T float return 100 0f NON NLS 1 case T int return 1 NON NLS 1 case T long return 7L NON NLS 1 case T String return hello world NON NLS 1 case T null return null NON NLS 1 case T short return short 5 NON NLS 1 case T Object return null NON NLS 1 return NON NLS 1 public final String type int code switch code case T boolean return z NON NLS 1 case T byte return b NON NLS 1 case T char return c NON NLS 1 case T double return d NON NLS 1 case T float return f NON NLS 1 case T int return i NON NLS 1 case T long return l NON NLS 1 case T String return str NON NLS 1 case T null return null NON NLS 1 case T short return s NON NLS 1 case T Object return obj NON NLS 1 return xxx NON NLS 1 public final String operator int operator switch operator case EQUAL EQUAL return NON NLS 1 case LESS EQUAL return NON NLS 1 case GREATER EQUAL return NON NLS 1 case LEFT SHIFT return NON NLS 1 case RIGHT SHIFT return NON NLS 1 case UNSIGNED RIGHT SHIFT return NON NLS 1 case OR OR return NON NLS 1 case AND AND return NON NLS 1 case PLUS return NON NLS 1 case MINUS return NON NLS 1 case NOT return NON NLS 1 case REMAINDER return NON NLS 1 case XOR return NON NLS 1 case AND return NON NLS 1 case MULTIPLY return NON NLS 1 case OR return NON NLS 1 case TWIDDLE return NON NLS 1 case DIVIDE return NON NLS 1 case GREATER return NON NLS 1 case LESS return NON NLS 1 return NON NLS 1 Decode decode new Decode String s s tpublic static void binary Operation Tables Test Case n NON NLS 1 t t TC test all binary operation described in tables n NON NLS 1 t t method automatically generated by n NON NLS 1 t t org eclipse jdt internal compiler ast Operator Expression generate Table Test Case n NON NLS 1 t t String str0 t String str t decode constant T String n NON NLS 1 NON NLS 2 t tint i0 t int i t decode constant T int n NON NLS 1 NON NLS 2 t tboolean z0 t boolean z t decode constant T boolean n NON NLS 1 NON NLS 2 t tchar c0 t char c t decode constant T char n NON NLS 1 NON NLS 2 t tfloat f0 t float f t decode constant T float n NON NLS 1 NON NLS 2 t tdouble d0 t double d t decode constant T double n NON NLS 1 NON NLS 2 t tbyte b0 t byte b t decode constant T byte n NON NLS 1 NON NLS 2 t tshort s0 t short s t decode constant T short n NON NLS 1 NON NLS 2 t tlong l0 t long l t decode constant T long n NON NLS 1 NON NLS 2 t t Object obj0 t Object obj t decode constant T Object n NON NLS 1 NON NLS 2 n NON NLS 1 int error 0 for int i 0 i operators length i int operator operators i for int left 0 left 16 left for int right 0 right 16 right int result Operator Signatures operator left 4 right 0x0000F if result T undefined 1 First regular computation then 2 comparaison with a compile time constant generated by the compiler z0 s s if z0 short 5 short 5 System out println 155 s t t decode type result 0 decode type left NON NLS 1 NON NLS 3 NON NLS 2 s decode operator operator decode type right n NON NLS 2 NON NLS 1 NON NLS 3 String begin result T String t tif t tif NON NLS 2 NON NLS 1 String test result T String equals NON NLS 2 NON NLS 1 s begin decode type result 0 test NON NLS 1 decode constant left NON NLS 1 decode operator operator NON NLS 1 decode constant right n NON NLS 1 s t t t System out println error n NON NLS 1 NON NLS 2 return s n t t System out println binary tables test done NON NLS 1  generateTableTestCase OperatorExpression generateTableTestCase AND_AND GREATER_EQUAL LEFT_SHIFT LESS_EQUAL OR_OR RIGHT_SHIFT UNSIGNED_RIGHT_SHIFT T_boolean T_byte T_char T_double T_float T_int T_long T_String T_null T_short T_Object T_boolean T_byte T_char T_double T_float T_int T_long T_String T_null T_short T_Object EQUAL_EQUAL LESS_EQUAL GREATER_EQUAL LEFT_SHIFT RIGHT_SHIFT UNSIGNED_RIGHT_SHIFT OR_OR AND_AND binaryOperationTablesTestCase OperatorExpression generateTableTestCase tString T_String T_int T_boolean T_char T_float T_double T_byte T_short T_long tObject T_Object OperatorSignatures T_undefined T_String T_String tSystem tSystem
public static final int get AND the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 table T undefined 4 T undefined T undefined table T undefined 4 T byte T undefined table T undefined 4 T long T undefined table T undefined 4 T short T undefined table T undefined 4 T void T undefined table T undefined 4 T String T undefined table T undefined 4 T Object T undefined table T undefined 4 T double T undefined table T undefined 4 T float T undefined table T undefined 4 T boolean T undefined table T undefined 4 T char T undefined table T undefined 4 T int T undefined table T undefined 4 T null T undefined table T byte 4 T undefined T undefined table T byte 4 T byte Byte2 Int 12 Byte2 Int 4 T int table T byte 4 T long Byte2 Long 12 Long2 Long 4 T long table T byte 4 T short Byte2 Int 12 Short2 Int 4 T int table T byte 4 T void T undefined table T byte 4 T String T undefined table T byte 4 T Object T undefined table T byte 4 T double T undefined table T byte 4 T float T undefined table T byte 4 T boolean T undefined table T byte 4 T char Byte2 Int 12 Char2 Int 4 T int table T byte 4 T int Byte2 Int 12 Int2 Int 4 T int table T byte 4 T null T undefined table T long 4 T undefined T undefined table T long 4 T byte Long2 Long 12 Byte2 Long 4 T long table T long 4 T long Long2 Long 12 Long2 Long 4 T long table T long 4 T short Long2 Long 12 Short2 Long 4 T long table T long 4 T void T undefined table T long 4 T String T undefined table T long 4 T Object T undefined table T long 4 T double T undefined table T long 4 T float T undefined table T long 4 T boolean T undefined table T long 4 T char Long2 Long 12 Char2 Long 4 T long table T long 4 T int Long2 Long 12 Int2 Long 4 T long table T long 4 T null T undefined table T short 4 T undefined T undefined table T short 4 T byte Short2 Int 12 Byte2 Int 4 T int table T short 4 T long Short2 Long 12 Long2 Long 4 T long table T short 4 T short Short2 Int 12 Short2 Int 4 T int table T short 4 T void T undefined table T short 4 T String T undefined table T short 4 T Object T undefined table T short 4 T double T undefined table T short 4 T float T undefined table T short 4 T boolean T undefined table T short 4 T char Short2 Int 12 Char2 Int 4 T int table T short 4 T int Short2 Int 12 Int2 Int 4 T int table T short 4 T null T undefined table T void 4 T undefined T undefined table T void 4 T byte T undefined table T void 4 T long T undefined table T void 4 T short T undefined table T void 4 T void T undefined table T void 4 T String T undefined table T void 4 T Object T undefined table T void 4 T double T undefined table T void 4 T float T undefined table T void 4 T boolean T undefined table T void 4 T char T undefined table T void 4 T int T undefined table T void 4 T null T undefined table T String 4 T undefined T undefined table T String 4 T byte T undefined table T String 4 T long T undefined table T String 4 T short T undefined table T String 4 T void T undefined table T String 4 T String T undefined table T String 4 T Object T undefined table T String 4 T double T undefined table T String 4 T float T undefined table T String 4 T boolean T undefined table T String 4 T char T undefined table T String 4 T int T undefined table T String 4 T null T undefined table T Object 4 T undefined T undefined table T Object 4 T byte T undefined table T Object 4 T long T undefined table T Object 4 T short T undefined table T Object 4 T void T undefined table T Object 4 T String T undefined table T Object 4 T Object T undefined table T Object 4 T double T undefined table T Object 4 T float T undefined table T Object 4 T boolean T undefined table T Object 4 T char T undefined table T Object 4 T int T undefined table T Object 4 T null T undefined table T double 4 T undefined T undefined table T double 4 T byte T undefined table T double 4 T long T undefined table T double 4 T short T undefined table T double 4 T void T undefined table T double 4 T String T undefined table T double 4 T Object T undefined table T double 4 T double T undefined table T double 4 T float T undefined table T double 4 T boolean T undefined table T double 4 T char T undefined table T double 4 T int T undefined table T double 4 T null T undefined table T float 4 T undefined T undefined table T float 4 T byte T undefined table T float 4 T long T undefined table T float 4 T short T undefined table T float 4 T void T undefined table T float 4 T String T undefined table T float 4 T Object T undefined table T float 4 T double T undefined table T float 4 T float T undefined table T float 4 T boolean T undefined table T float 4 T char T undefined table T float 4 T int T undefined table T float 4 T null T undefined table T boolean 4 T undefined T undefined table T boolean 4 T byte T undefined table T boolean 4 T long T undefined table T boolean 4 T short T undefined table T boolean 4 T void T undefined table T boolean 4 T String T undefined table T boolean 4 T Object T undefined table T boolean 4 T double T undefined table T boolean 4 T float T undefined table T boolean 4 T boolean Boolean2 Boolean 12 Boolean2 Boolean 4 T boolean table T boolean 4 T char T undefined table T boolean 4 T int T undefined table T boolean 4 T null T undefined table T char 4 T undefined T undefined table T char 4 T byte Char2 Int 12 Byte2 Int 4 T int table T char 4 T long Char2 Long 12 Long2 Long 4 T long table T char 4 T short Char2 Int 12 Short2 Int 4 T int table T char 4 T void T undefined table T char 4 T String T undefined table T char 4 T Object T undefined table T char 4 T double T undefined table T char 4 T float T undefined table T char 4 T boolean T undefined table T char 4 T char Char2 Int 12 Char2 Int 4 T int table T char 4 T int Char2 Int 12 Int2 Int 4 T int table T char 4 T null T undefined table T int 4 T undefined T undefined table T int 4 T byte Int2 Int 12 Byte2 Int 4 T int table T int 4 T long Int2 Long 12 Long2 Long 4 T long table T int 4 T short Int2 Int 12 Short2 Int 4 T int table T int 4 T void T undefined table T int 4 T String T undefined table T int 4 T Object T undefined table T int 4 T double T undefined table T int 4 T float T undefined table T int 4 T boolean T undefined table T int 4 T char Int2 Int 12 Char2 Int 4 T int table T int 4 T int Int2 Int 12 Int2 Int 4 T int table T int 4 T null T undefined table T null 4 T undefined T undefined table T null 4 T byte T undefined table T null 4 T long T undefined table T null 4 T short T undefined table T null 4 T void T undefined table T null 4 T String T undefined table T null 4 T Object T undefined table T null 4 T double T undefined table T null 4 T float T undefined table T null 4 T boolean T undefined table T null 4 T char T undefined table T null 4 T int T undefined table T null 4 T null T undefined return table  get_AND T_undefined T_undefined T_undefined T_undefined T_byte T_undefined T_undefined T_long T_undefined T_undefined T_short T_undefined T_undefined T_void T_undefined T_undefined T_String T_undefined T_undefined T_Object T_undefined T_undefined T_double T_undefined T_undefined T_float T_undefined T_undefined T_boolean T_undefined T_undefined T_char T_undefined T_undefined T_int T_undefined T_undefined T_null T_undefined T_byte T_undefined T_undefined T_byte T_byte Byte2Int Byte2Int T_int T_byte T_long Byte2Long Long2Long T_long T_byte T_short Byte2Int Short2Int T_int T_byte T_void T_undefined T_byte T_String T_undefined T_byte T_Object T_undefined T_byte T_double T_undefined T_byte T_float T_undefined T_byte T_boolean T_undefined T_byte T_char Byte2Int Char2Int T_int T_byte T_int Byte2Int Int2Int T_int T_byte T_null T_undefined T_long T_undefined T_undefined T_long T_byte Long2Long Byte2Long T_long T_long T_long Long2Long Long2Long T_long T_long T_short Long2Long Short2Long T_long T_long T_void T_undefined T_long T_String T_undefined T_long T_Object T_undefined T_long T_double T_undefined T_long T_float T_undefined T_long T_boolean T_undefined T_long T_char Long2Long Char2Long T_long T_long T_int Long2Long Int2Long T_long T_long T_null T_undefined T_short T_undefined T_undefined T_short T_byte Short2Int Byte2Int T_int T_short T_long Short2Long Long2Long T_long T_short T_short Short2Int Short2Int T_int T_short T_void T_undefined T_short T_String T_undefined T_short T_Object T_undefined T_short T_double T_undefined T_short T_float T_undefined T_short T_boolean T_undefined T_short T_char Short2Int Char2Int T_int T_short T_int Short2Int Int2Int T_int T_short T_null T_undefined T_void T_undefined T_undefined T_void T_byte T_undefined T_void T_long T_undefined T_void T_short T_undefined T_void T_void T_undefined T_void T_String T_undefined T_void T_Object T_undefined T_void T_double T_undefined T_void T_float T_undefined T_void T_boolean T_undefined T_void T_char T_undefined T_void T_int T_undefined T_void T_null T_undefined T_String T_undefined T_undefined T_String T_byte T_undefined T_String T_long T_undefined T_String T_short T_undefined T_String T_void T_undefined T_String T_String T_undefined T_String T_Object T_undefined T_String T_double T_undefined T_String T_float T_undefined T_String T_boolean T_undefined T_String T_char T_undefined T_String T_int T_undefined T_String T_null T_undefined T_Object T_undefined T_undefined T_Object T_byte T_undefined T_Object T_long T_undefined T_Object T_short T_undefined T_Object T_void T_undefined T_Object T_String T_undefined T_Object T_Object T_undefined T_Object T_double T_undefined T_Object T_float T_undefined T_Object T_boolean T_undefined T_Object T_char T_undefined T_Object T_int T_undefined T_Object T_null T_undefined T_double T_undefined T_undefined T_double T_byte T_undefined T_double T_long T_undefined T_double T_short T_undefined T_double T_void T_undefined T_double T_String T_undefined T_double T_Object T_undefined T_double T_double T_undefined T_double T_float T_undefined T_double T_boolean T_undefined T_double T_char T_undefined T_double T_int T_undefined T_double T_null T_undefined T_float T_undefined T_undefined T_float T_byte T_undefined T_float T_long T_undefined T_float T_short T_undefined T_float T_void T_undefined T_float T_String T_undefined T_float T_Object T_undefined T_float T_double T_undefined T_float T_float T_undefined T_float T_boolean T_undefined T_float T_char T_undefined T_float T_int T_undefined T_float T_null T_undefined T_boolean T_undefined T_undefined T_boolean T_byte T_undefined T_boolean T_long T_undefined T_boolean T_short T_undefined T_boolean T_void T_undefined T_boolean T_String T_undefined T_boolean T_Object T_undefined T_boolean T_double T_undefined T_boolean T_float T_undefined T_boolean T_boolean Boolean2Boolean Boolean2Boolean T_boolean T_boolean T_char T_undefined T_boolean T_int T_undefined T_boolean T_null T_undefined T_char T_undefined T_undefined T_char T_byte Char2Int Byte2Int T_int T_char T_long Char2Long Long2Long T_long T_char T_short Char2Int Short2Int T_int T_char T_void T_undefined T_char T_String T_undefined T_char T_Object T_undefined T_char T_double T_undefined T_char T_float T_undefined T_char T_boolean T_undefined T_char T_char Char2Int Char2Int T_int T_char T_int Char2Int Int2Int T_int T_char T_null T_undefined T_int T_undefined T_undefined T_int T_byte Int2Int Byte2Int T_int T_int T_long Int2Long Long2Long T_long T_int T_short Int2Int Short2Int T_int T_int T_void T_undefined T_int T_String T_undefined T_int T_Object T_undefined T_int T_double T_undefined T_int T_float T_undefined T_int T_boolean T_undefined T_int T_char Int2Int Char2Int T_int T_int T_int Int2Int Int2Int T_int T_int T_null T_undefined T_null T_undefined T_undefined T_null T_byte T_undefined T_null T_long T_undefined T_null T_short T_undefined T_null T_void T_undefined T_null T_String T_undefined T_null T_Object T_undefined T_null T_double T_undefined T_null T_float T_undefined T_null T_boolean T_undefined T_null T_char T_undefined T_null T_int T_undefined T_null T_null T_undefined
public static final int get AND AND the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 table T undefined 4 T undefined T undefined table T undefined 4 T byte T undefined table T undefined 4 T long T undefined table T undefined 4 T short T undefined table T undefined 4 T void T undefined table T undefined 4 T String T undefined table T undefined 4 T Object T undefined table T undefined 4 T double T undefined table T undefined 4 T float T undefined table T undefined 4 T boolean T undefined table T undefined 4 T char T undefined table T undefined 4 T int T undefined table T undefined 4 T null T undefined table T byte 4 T undefined T undefined table T byte 4 T byte T undefined table T byte 4 T long T undefined table T byte 4 T short T undefined table T byte 4 T void T undefined table T byte 4 T String T undefined table T byte 4 T Object T undefined table T byte 4 T double T undefined table T byte 4 T float T undefined table T byte 4 T boolean T undefined table T byte 4 T char T undefined table T byte 4 T int T undefined table T byte 4 T null T undefined table T long 4 T undefined T undefined table T long 4 T byte T undefined table T long 4 T long T undefined table T long 4 T short T undefined table T long 4 T void T undefined table T long 4 T String T undefined table T long 4 T Object T undefined table T long 4 T double T undefined table T long 4 T float T undefined table T long 4 T boolean T undefined table T long 4 T char T undefined table T long 4 T int T undefined table T long 4 T null T undefined table T short 4 T undefined T undefined table T short 4 T byte T undefined table T short 4 T long T undefined table T short 4 T short T undefined table T short 4 T void T undefined table T short 4 T String T undefined table T short 4 T Object T undefined table T short 4 T double T undefined table T short 4 T float T undefined table T short 4 T boolean T undefined table T short 4 T char T undefined table T short 4 T int T undefined table T short 4 T null T undefined table T void 4 T undefined T undefined table T void 4 T byte T undefined table T void 4 T long T undefined table T void 4 T short T undefined table T void 4 T void T undefined table T void 4 T String T undefined table T void 4 T Object T undefined table T void 4 T double T undefined table T void 4 T float T undefined table T void 4 T boolean T undefined table T void 4 T char T undefined table T void 4 T int T undefined table T void 4 T null T undefined table T String 4 T undefined T undefined table T String 4 T byte T undefined table T String 4 T long T undefined table T String 4 T short T undefined table T String 4 T void T undefined table T String 4 T String T undefined table T String 4 T Object T undefined table T String 4 T double T undefined table T String 4 T float T undefined table T String 4 T boolean T undefined table T String 4 T char T undefined table T String 4 T int T undefined table T String 4 T null T undefined table T Object 4 T undefined T undefined table T Object 4 T byte T undefined table T Object 4 T long T undefined table T Object 4 T short T undefined table T Object 4 T void T undefined table T Object 4 T String T undefined table T Object 4 T Object T undefined table T Object 4 T double T undefined table T Object 4 T float T undefined table T Object 4 T boolean T undefined table T Object 4 T char T undefined table T Object 4 T int T undefined table T Object 4 T null T undefined table T double 4 T undefined T undefined table T double 4 T byte T undefined table T double 4 T long T undefined table T double 4 T short T undefined table T double 4 T void T undefined table T double 4 T String T undefined table T double 4 T Object T undefined table T double 4 T double T undefined table T double 4 T float T undefined table T double 4 T boolean T undefined table T double 4 T char T undefined table T double 4 T int T undefined table T double 4 T null T undefined table T float 4 T undefined T undefined table T float 4 T byte T undefined table T float 4 T long T undefined table T float 4 T short T undefined table T float 4 T void T undefined table T float 4 T String T undefined table T float 4 T Object T undefined table T float 4 T double T undefined table T float 4 T float T undefined table T float 4 T boolean T undefined table T float 4 T char T undefined table T float 4 T int T undefined table T float 4 T null T undefined table T boolean 4 T undefined T undefined table T boolean 4 T byte T undefined table T boolean 4 T long T undefined table T boolean 4 T short T undefined table T boolean 4 T void T undefined table T boolean 4 T String T undefined table T boolean 4 T Object T undefined table T boolean 4 T double T undefined table T boolean 4 T float T undefined table T boolean 4 T boolean Boolean2 Boolean 12 Boolean2 Boolean 4 T boolean table T boolean 4 T char T undefined table T boolean 4 T int T undefined table T boolean 4 T null T undefined table T char 4 T undefined T undefined table T char 4 T byte T undefined table T char 4 T long T undefined table T char 4 T short T undefined table T char 4 T void T undefined table T char 4 T String T undefined table T char 4 T Object T undefined table T char 4 T double T undefined table T char 4 T float T undefined table T char 4 T boolean T undefined table T char 4 T char T undefined table T char 4 T int T undefined table T char 4 T null T undefined table T int 4 T undefined T undefined table T int 4 T byte T undefined table T int 4 T long T undefined table T int 4 T short T undefined table T int 4 T void T undefined table T int 4 T String T undefined table T int 4 T Object T undefined table T int 4 T double T undefined table T int 4 T float T undefined table T int 4 T boolean T undefined table T int 4 T char T undefined table T int 4 T int T undefined table T int 4 T null T undefined table T null 4 T undefined T undefined table T null 4 T byte T undefined table T null 4 T long T undefined table T null 4 T short T undefined table T null 4 T void T undefined table T null 4 T String T undefined table T null 4 T Object T undefined table T null 4 T double T undefined table T null 4 T float T undefined table T null 4 T boolean T undefined table T null 4 T char T undefined table T null 4 T int T undefined table T null 4 T null T undefined return table  get_AND_AND T_undefined T_undefined T_undefined T_undefined T_byte T_undefined T_undefined T_long T_undefined T_undefined T_short T_undefined T_undefined T_void T_undefined T_undefined T_String T_undefined T_undefined T_Object T_undefined T_undefined T_double T_undefined T_undefined T_float T_undefined T_undefined T_boolean T_undefined T_undefined T_char T_undefined T_undefined T_int T_undefined T_undefined T_null T_undefined T_byte T_undefined T_undefined T_byte T_byte T_undefined T_byte T_long T_undefined T_byte T_short T_undefined T_byte T_void T_undefined T_byte T_String T_undefined T_byte T_Object T_undefined T_byte T_double T_undefined T_byte T_float T_undefined T_byte T_boolean T_undefined T_byte T_char T_undefined T_byte T_int T_undefined T_byte T_null T_undefined T_long T_undefined T_undefined T_long T_byte T_undefined T_long T_long T_undefined T_long T_short T_undefined T_long T_void T_undefined T_long T_String T_undefined T_long T_Object T_undefined T_long T_double T_undefined T_long T_float T_undefined T_long T_boolean T_undefined T_long T_char T_undefined T_long T_int T_undefined T_long T_null T_undefined T_short T_undefined T_undefined T_short T_byte T_undefined T_short T_long T_undefined T_short T_short T_undefined T_short T_void T_undefined T_short T_String T_undefined T_short T_Object T_undefined T_short T_double T_undefined T_short T_float T_undefined T_short T_boolean T_undefined T_short T_char T_undefined T_short T_int T_undefined T_short T_null T_undefined T_void T_undefined T_undefined T_void T_byte T_undefined T_void T_long T_undefined T_void T_short T_undefined T_void T_void T_undefined T_void T_String T_undefined T_void T_Object T_undefined T_void T_double T_undefined T_void T_float T_undefined T_void T_boolean T_undefined T_void T_char T_undefined T_void T_int T_undefined T_void T_null T_undefined T_String T_undefined T_undefined T_String T_byte T_undefined T_String T_long T_undefined T_String T_short T_undefined T_String T_void T_undefined T_String T_String T_undefined T_String T_Object T_undefined T_String T_double T_undefined T_String T_float T_undefined T_String T_boolean T_undefined T_String T_char T_undefined T_String T_int T_undefined T_String T_null T_undefined T_Object T_undefined T_undefined T_Object T_byte T_undefined T_Object T_long T_undefined T_Object T_short T_undefined T_Object T_void T_undefined T_Object T_String T_undefined T_Object T_Object T_undefined T_Object T_double T_undefined T_Object T_float T_undefined T_Object T_boolean T_undefined T_Object T_char T_undefined T_Object T_int T_undefined T_Object T_null T_undefined T_double T_undefined T_undefined T_double T_byte T_undefined T_double T_long T_undefined T_double T_short T_undefined T_double T_void T_undefined T_double T_String T_undefined T_double T_Object T_undefined T_double T_double T_undefined T_double T_float T_undefined T_double T_boolean T_undefined T_double T_char T_undefined T_double T_int T_undefined T_double T_null T_undefined T_float T_undefined T_undefined T_float T_byte T_undefined T_float T_long T_undefined T_float T_short T_undefined T_float T_void T_undefined T_float T_String T_undefined T_float T_Object T_undefined T_float T_double T_undefined T_float T_float T_undefined T_float T_boolean T_undefined T_float T_char T_undefined T_float T_int T_undefined T_float T_null T_undefined T_boolean T_undefined T_undefined T_boolean T_byte T_undefined T_boolean T_long T_undefined T_boolean T_short T_undefined T_boolean T_void T_undefined T_boolean T_String T_undefined T_boolean T_Object T_undefined T_boolean T_double T_undefined T_boolean T_float T_undefined T_boolean T_boolean Boolean2Boolean Boolean2Boolean T_boolean T_boolean T_char T_undefined T_boolean T_int T_undefined T_boolean T_null T_undefined T_char T_undefined T_undefined T_char T_byte T_undefined T_char T_long T_undefined T_char T_short T_undefined T_char T_void T_undefined T_char T_String T_undefined T_char T_Object T_undefined T_char T_double T_undefined T_char T_float T_undefined T_char T_boolean T_undefined T_char T_char T_undefined T_char T_int T_undefined T_char T_null T_undefined T_int T_undefined T_undefined T_int T_byte T_undefined T_int T_long T_undefined T_int T_short T_undefined T_int T_void T_undefined T_int T_String T_undefined T_int T_Object T_undefined T_int T_double T_undefined T_int T_float T_undefined T_int T_boolean T_undefined T_int T_char T_undefined T_int T_int T_undefined T_int T_null T_undefined T_null T_undefined T_undefined T_null T_byte T_undefined T_null T_long T_undefined T_null T_short T_undefined T_null T_void T_undefined T_null T_String T_undefined T_null T_Object T_undefined T_null T_double T_undefined T_null T_float T_undefined T_null T_boolean T_undefined T_null T_char T_undefined T_null T_int T_undefined T_null T_null T_undefined
public static final int get DIVIDE the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 return get MINUS  get_DIVIDE get_MINUS
public static final int get EQUAL EQUAL the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 table T undefined 4 T undefined T undefined table T undefined 4 T byte T undefined table T undefined 4 T long T undefined table T undefined 4 T short T undefined table T undefined 4 T void T undefined table T undefined 4 T String T undefined table T undefined 4 T Object T undefined table T undefined 4 T double T undefined table T undefined 4 T float T undefined table T undefined 4 T boolean T undefined table T undefined 4 T char T undefined table T undefined 4 T int T undefined table T undefined 4 T null T undefined table T byte 4 T undefined T undefined table T byte 4 T byte Byte2 Int 12 Byte2 Int 4 T boolean table T byte 4 T long Byte2 Long 12 Long2 Long 4 T boolean table T byte 4 T short Byte2 Int 12 Short2 Int 4 T boolean table T byte 4 T void T undefined table T byte 4 T String T undefined table T byte 4 T Object T undefined table T byte 4 T double Byte2 Double 12 Double2 Double 4 T boolean table T byte 4 T float Byte2 Float 12 Float2 Float 4 T boolean table T byte 4 T boolean T undefined table T byte 4 T char Byte2 Int 12 Char2 Int 4 T boolean table T byte 4 T int Byte2 Int 12 Int2 Int 4 T boolean table T byte 4 T null T undefined table T long 4 T undefined T undefined table T long 4 T byte Long2 Long 12 Byte2 Long 4 T boolean table T long 4 T long Long2 Long 12 Long2 Long 4 T boolean table T long 4 T short Long2 Long 12 Short2 Long 4 T boolean table T long 4 T void T undefined table T long 4 T String T undefined table T long 4 T Object T undefined table T long 4 T double Long2 Double 12 Double2 Double 4 T boolean table T long 4 T float Long2 Float 12 Float2 Float 4 T boolean table T long 4 T boolean T undefined table T long 4 T char Long2 Long 12 Char2 Long 4 T boolean table T long 4 T int Long2 Long 12 Int2 Long 4 T boolean table T long 4 T null T undefined table T short 4 T undefined T undefined table T short 4 T byte Short2 Int 12 Byte2 Int 4 T boolean table T short 4 T long Short2 Long 12 Long2 Long 4 T boolean table T short 4 T short Short2 Int 12 Short2 Int 4 T boolean table T short 4 T void T undefined table T short 4 T String T undefined table T short 4 T Object T undefined table T short 4 T double Short2 Double 12 Double2 Double 4 T boolean table T short 4 T float Short2 Float 12 Float2 Float 4 T boolean table T short 4 T boolean T undefined table T short 4 T char Short2 Int 12 Char2 Int 4 T boolean table T short 4 T int Short2 Int 12 Int2 Int 4 T boolean table T short 4 T null T undefined table T void 4 T undefined T undefined table T void 4 T byte T undefined table T void 4 T long T undefined table T void 4 T short T undefined table T void 4 T void T undefined table T void 4 T String T undefined table T void 4 T Object T undefined table T void 4 T double T undefined table T void 4 T float T undefined table T void 4 T boolean T undefined table T void 4 T char T undefined table T void 4 T int T undefined table T void 4 T null T undefined table T String 4 T undefined T undefined table T String 4 T byte T undefined table T String 4 T long T undefined table T String 4 T short T undefined table T String 4 T void T undefined table T String 4 T String String2 Object String2 Object T Object 16 T String 12 T Object 8 T String 4 T boolean table T String 4 T Object String2 Object Object2 Object T Object 16 T String 12 T Object 8 T Object 4 T boolean table T String 4 T double T undefined table T String 4 T float T undefined table T String 4 T boolean T undefined table T String 4 T char T undefined table T String 4 T int T undefined table T String 4 T null Object2 String null2 Object T Object 16 T String 12 T Object 8 T null 4 T boolean table T Object 4 T undefined T undefined table T Object 4 T byte T undefined table T Object 4 T long T undefined table T Object 4 T short T undefined table T Object 4 T void T undefined table T Object 4 T String Object2 Object String2 Object T Object 16 T Object 12 T Object 8 T String 4 T boolean table T Object 4 T Object Object2 Object Object2 Object T Object 16 T Object 12 T Object 8 T Object 4 T boolean table T Object 4 T double T undefined table T Object 4 T float T undefined table T Object 4 T boolean T undefined table T Object 4 T char T undefined table T Object 4 T int T undefined table T Object 4 T null Object2 Object null2 Object T Object 16 T Object 12 T Object 8 T null 4 T boolean table T double 4 T undefined T undefined table T double 4 T byte Double2 Double 12 Byte2 Double 4 T boolean table T double 4 T long Double2 Double 12 Long2 Double 4 T boolean table T double 4 T short Double2 Double 12 Short2 Double 4 T boolean table T double 4 T void T undefined table T double 4 T String T undefined table T double 4 T Object T undefined table T double 4 T double Double2 Double 12 Double2 Double 4 T boolean table T double 4 T float Double2 Double 12 Float2 Double 4 T boolean table T double 4 T boolean T undefined table T double 4 T char Double2 Double 12 Char2 Double 4 T boolean table T double 4 T int Double2 Double 12 Int2 Double 4 T boolean table T double 4 T null T undefined table T float 4 T undefined T undefined table T float 4 T byte Float2 Float 12 Byte2 Float 4 T boolean table T float 4 T long Float2 Float 12 Long2 Float 4 T boolean table T float 4 T short Float2 Float 12 Short2 Float 4 T boolean table T float 4 T void T undefined table T float 4 T String T undefined table T float 4 T Object T undefined table T float 4 T double Float2 Double 12 Double2 Double 4 T boolean table T float 4 T float Float2 Float 12 Float2 Float 4 T boolean table T float 4 T boolean T undefined table T float 4 T char Float2 Float 12 Char2 Float 4 T boolean table T float 4 T int Float2 Float 12 Int2 Float 4 T boolean table T float 4 T null T undefined table T boolean 4 T undefined T undefined table T boolean 4 T byte T undefined table T boolean 4 T long T undefined table T boolean 4 T short T undefined table T boolean 4 T void T undefined table T boolean 4 T String T undefined table T boolean 4 T Object T undefined table T boolean 4 T double T undefined table T boolean 4 T float T undefined table T boolean 4 T boolean Boolean2 Boolean 12 Boolean2 Boolean 4 T boolean table T boolean 4 T char T undefined table T boolean 4 T int T undefined table T boolean 4 T null T undefined table T char 4 T undefined T undefined table T char 4 T byte Char2 Int 12 Byte2 Int 4 T boolean table T char 4 T long Char2 Long 12 Long2 Long 4 T boolean table T char 4 T short Char2 Int 12 Short2 Int 4 T boolean table T char 4 T void T undefined table T char 4 T String T undefined table T char 4 T Object T undefined table T char 4 T double Char2 Double 12 Double2 Double 4 T boolean table T char 4 T float Char2 Float 12 Float2 Float 4 T boolean table T char 4 T boolean T undefined table T char 4 T char Char2 Int 12 Char2 Int 4 T boolean table T char 4 T int Char2 Int 12 Int2 Int 4 T boolean table T char 4 T null T undefined table T int 4 T undefined T undefined table T int 4 T byte Int2 Int 12 Byte2 Int 4 T boolean table T int 4 T long Int2 Long 12 Long2 Long 4 T boolean table T int 4 T short Int2 Int 12 Short2 Int 4 T boolean table T int 4 T void T undefined table T int 4 T String T undefined table T int 4 T Object T undefined table T int 4 T double Int2 Double 12 Double2 Double 4 T boolean table T int 4 T float Int2 Float 12 Float2 Float 4 T boolean  get_EQUAL_EQUAL T_undefined T_undefined T_undefined T_undefined T_byte T_undefined T_undefined T_long T_undefined T_undefined T_short T_undefined T_undefined T_void T_undefined T_undefined T_String T_undefined T_undefined T_Object T_undefined T_undefined T_double T_undefined T_undefined T_float T_undefined T_undefined T_boolean T_undefined T_undefined T_char T_undefined T_undefined T_int T_undefined T_undefined T_null T_undefined T_byte T_undefined T_undefined T_byte T_byte Byte2Int Byte2Int T_boolean T_byte T_long Byte2Long Long2Long T_boolean T_byte T_short Byte2Int Short2Int T_boolean T_byte T_void T_undefined T_byte T_String T_undefined T_byte T_Object T_undefined T_byte T_double Byte2Double Double2Double T_boolean T_byte T_float Byte2Float Float2Float T_boolean T_byte T_boolean T_undefined T_byte T_char Byte2Int Char2Int T_boolean T_byte T_int Byte2Int Int2Int T_boolean T_byte T_null T_undefined T_long T_undefined T_undefined T_long T_byte Long2Long Byte2Long T_boolean T_long T_long Long2Long Long2Long T_boolean T_long T_short Long2Long Short2Long T_boolean T_long T_void T_undefined T_long T_String T_undefined T_long T_Object T_undefined T_long T_double Long2Double Double2Double T_boolean T_long T_float Long2Float Float2Float T_boolean T_long T_boolean T_undefined T_long T_char Long2Long Char2Long T_boolean T_long T_int Long2Long Int2Long T_boolean T_long T_null T_undefined T_short T_undefined T_undefined T_short T_byte Short2Int Byte2Int T_boolean T_short T_long Short2Long Long2Long T_boolean T_short T_short Short2Int Short2Int T_boolean T_short T_void T_undefined T_short T_String T_undefined T_short T_Object T_undefined T_short T_double Short2Double Double2Double T_boolean T_short T_float Short2Float Float2Float T_boolean T_short T_boolean T_undefined T_short T_char Short2Int Char2Int T_boolean T_short T_int Short2Int Int2Int T_boolean T_short T_null T_undefined T_void T_undefined T_undefined T_void T_byte T_undefined T_void T_long T_undefined T_void T_short T_undefined T_void T_void T_undefined T_void T_String T_undefined T_void T_Object T_undefined T_void T_double T_undefined T_void T_float T_undefined T_void T_boolean T_undefined T_void T_char T_undefined T_void T_int T_undefined T_void T_null T_undefined T_String T_undefined T_undefined T_String T_byte T_undefined T_String T_long T_undefined T_String T_short T_undefined T_String T_void T_undefined T_String T_String String2Object String2Object T_Object T_String T_Object T_String T_boolean T_String T_Object String2Object Object2Object T_Object T_String T_Object T_Object T_boolean T_String T_double T_undefined T_String T_float T_undefined T_String T_boolean T_undefined T_String T_char T_undefined T_String T_int T_undefined T_String T_null Object2String null2Object T_Object T_String T_Object T_null T_boolean T_Object T_undefined T_undefined T_Object T_byte T_undefined T_Object T_long T_undefined T_Object T_short T_undefined T_Object T_void T_undefined T_Object T_String Object2Object String2Object T_Object T_Object T_Object T_String T_boolean T_Object T_Object Object2Object Object2Object T_Object T_Object T_Object T_Object T_boolean T_Object T_double T_undefined T_Object T_float T_undefined T_Object T_boolean T_undefined T_Object T_char T_undefined T_Object T_int T_undefined T_Object T_null Object2Object null2Object T_Object T_Object T_Object T_null T_boolean T_double T_undefined T_undefined T_double T_byte Double2Double Byte2Double T_boolean T_double T_long Double2Double Long2Double T_boolean T_double T_short Double2Double Short2Double T_boolean T_double T_void T_undefined T_double T_String T_undefined T_double T_Object T_undefined T_double T_double Double2Double Double2Double T_boolean T_double T_float Double2Double Float2Double T_boolean T_double T_boolean T_undefined T_double T_char Double2Double Char2Double T_boolean T_double T_int Double2Double Int2Double T_boolean T_double T_null T_undefined T_float T_undefined T_undefined T_float T_byte Float2Float Byte2Float T_boolean T_float T_long Float2Float Long2Float T_boolean T_float T_short Float2Float Short2Float T_boolean T_float T_void T_undefined T_float T_String T_undefined T_float T_Object T_undefined T_float T_double Float2Double Double2Double T_boolean T_float T_float Float2Float Float2Float T_boolean T_float T_boolean T_undefined T_float T_char Float2Float Char2Float T_boolean T_float T_int Float2Float Int2Float T_boolean T_float T_null T_undefined T_boolean T_undefined T_undefined T_boolean T_byte T_undefined T_boolean T_long T_undefined T_boolean T_short T_undefined T_boolean T_void T_undefined T_boolean T_String T_undefined T_boolean T_Object T_undefined T_boolean T_double T_undefined T_boolean T_float T_undefined T_boolean T_boolean Boolean2Boolean Boolean2Boolean T_boolean T_boolean T_char T_undefined T_boolean T_int T_undefined T_boolean T_null T_undefined T_char T_undefined T_undefined T_char T_byte Char2Int Byte2Int T_boolean T_char T_long Char2Long Long2Long T_boolean T_char T_short Char2Int Short2Int T_boolean T_char T_void T_undefined T_char T_String T_undefined T_char T_Object T_undefined T_char T_double Char2Double Double2Double T_boolean T_char T_float Char2Float Float2Float T_boolean T_char T_boolean T_undefined T_char T_char Char2Int Char2Int T_boolean T_char T_int Char2Int Int2Int T_boolean T_char T_null T_undefined T_int T_undefined T_undefined T_int T_byte Int2Int Byte2Int T_boolean T_int T_long Int2Long Long2Long T_boolean T_int T_short Int2Int Short2Int T_boolean T_int T_void T_undefined T_int T_String T_undefined T_int T_Object T_undefined T_int T_double Int2Double Double2Double T_boolean T_int T_float Int2Float Float2Float T_boolean
public static final int get GREATER the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 return get LESS  get_GREATER get_LESS
public static final int get GREATER EQUAL the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 return get LESS  get_GREATER_EQUAL get_LESS
public static final int get LEFT SHIFT the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 table T undefined 4 T undefined T undefined table T undefined 4 T byte T undefined table T undefined 4 T long T undefined table T undefined 4 T short T undefined table T undefined 4 T void T undefined table T undefined 4 T String T undefined table T undefined 4 T Object T undefined table T undefined 4 T double T undefined table T undefined 4 T float T undefined table T undefined 4 T boolean T undefined table T undefined 4 T char T undefined table T undefined 4 T int T undefined table T undefined 4 T null T undefined table T byte 4 T undefined T undefined table T byte 4 T byte Byte2 Int 12 Byte2 Int 4 T int table T byte 4 T long Byte2 Int 12 Long2 Int 4 T int table T byte 4 T short Byte2 Int 12 Short2 Int 4 T int table T byte 4 T void T undefined table T byte 4 T String T undefined table T byte 4 T Object T undefined table T byte 4 T double T undefined table T byte 4 T float T undefined table T byte 4 T boolean T undefined table T byte 4 T char Byte2 Int 12 Char2 Int 4 T int table T byte 4 T int Byte2 Int 12 Int2 Int 4 T int table T byte 4 T null T undefined table T long 4 T undefined T undefined table T long 4 T byte Long2 Long 12 Byte2 Int 4 T long table T long 4 T long Long2 Long 12 Long2 Int 4 T long table T long 4 T short Long2 Long 12 Short2 Int 4 T long table T long 4 T void T undefined table T long 4 T String T undefined table T long 4 T Object T undefined table T long 4 T double T undefined table T long 4 T float T undefined table T long 4 T boolean T undefined table T long 4 T char Long2 Long 12 Char2 Int 4 T long table T long 4 T int Long2 Long 12 Int2 Int 4 T long table T long 4 T null T undefined table T short 4 T undefined T undefined table T short 4 T byte Short2 Int 12 Byte2 Int 4 T int table T short 4 T long Short2 Int 12 Long2 Int 4 T int table T short 4 T short Short2 Int 12 Short2 Int 4 T int table T short 4 T void T undefined table T short 4 T String T undefined table T short 4 T Object T undefined table T short 4 T double T undefined table T short 4 T float T undefined table T short 4 T boolean T undefined table T short 4 T char Short2 Int 12 Char2 Int 4 T int table T short 4 T int Short2 Int 12 Int2 Int 4 T int table T short 4 T null T undefined table T void 4 T undefined T undefined table T void 4 T byte T undefined table T void 4 T long T undefined table T void 4 T short T undefined table T void 4 T void T undefined table T void 4 T String T undefined table T void 4 T Object T undefined table T void 4 T double T undefined table T void 4 T float T undefined table T void 4 T boolean T undefined table T void 4 T char T undefined table T void 4 T int T undefined table T void 4 T null T undefined table T String 4 T undefined T undefined table T String 4 T byte T undefined table T String 4 T long T undefined table T String 4 T short T undefined table T String 4 T void T undefined table T String 4 T String T undefined table T String 4 T Object T undefined table T String 4 T double T undefined table T String 4 T float T undefined table T String 4 T boolean T undefined table T String 4 T char T undefined table T String 4 T int T undefined table T String 4 T null T undefined table T Object 4 T undefined T undefined table T Object 4 T byte T undefined table T Object 4 T long T undefined table T Object 4 T short T undefined table T Object 4 T void T undefined table T Object 4 T String T undefined table T Object 4 T Object T undefined table T Object 4 T double T undefined table T Object 4 T float T undefined table T Object 4 T boolean T undefined table T Object 4 T char T undefined table T Object 4 T int T undefined table T Object 4 T null T undefined table T double 4 T undefined T undefined table T double 4 T byte T undefined table T double 4 T long T undefined table T double 4 T short T undefined table T double 4 T void T undefined table T double 4 T String T undefined table T double 4 T Object T undefined table T double 4 T double T undefined table T double 4 T float T undefined table T double 4 T boolean T undefined table T double 4 T char T undefined table T double 4 T int T undefined table T double 4 T null T undefined table T float 4 T undefined T undefined table T float 4 T byte T undefined table T float 4 T long T undefined table T float 4 T short T undefined table T float 4 T void T undefined table T float 4 T String T undefined table T float 4 T Object T undefined table T float 4 T double T undefined table T float 4 T float T undefined table T float 4 T boolean T undefined table T float 4 T char T undefined table T float 4 T int T undefined table T float 4 T null T undefined table T boolean 4 T undefined T undefined table T boolean 4 T byte T undefined table T boolean 4 T long T undefined table T boolean 4 T short T undefined table T boolean 4 T void T undefined table T boolean 4 T String T undefined table T boolean 4 T Object T undefined table T boolean 4 T double T undefined table T boolean 4 T float T undefined table T boolean 4 T boolean T undefined table T boolean 4 T char T undefined table T boolean 4 T int T undefined table T boolean 4 T null T undefined table T char 4 T undefined T undefined table T char 4 T byte Char2 Int 12 Byte2 Int 4 T int table T char 4 T long Char2 Int 12 Long2 Int 4 T int table T char 4 T short Char2 Int 12 Short2 Int 4 T int table T char 4 T void T undefined table T char 4 T String T undefined table T char 4 T Object T undefined table T char 4 T double T undefined table T char 4 T float T undefined table T char 4 T boolean T undefined table T char 4 T char Char2 Int 12 Char2 Int 4 T int table T char 4 T int Char2 Int 12 Int2 Int 4 T int table T char 4 T null T undefined table T int 4 T undefined T undefined table T int 4 T byte Int2 Int 12 Byte2 Int 4 T int table T int 4 T long Int2 Int 12 Long2 Int 4 T int table T int 4 T short Int2 Int 12 Short2 Int 4 T int table T int 4 T void T undefined table T int 4 T String T undefined table T int 4 T Object T undefined table T int 4 T double T undefined table T int 4 T float T undefined table T int 4 T boolean T undefined table T int 4 T char Int2 Int 12 Char2 Int 4 T int table T int 4 T int Int2 Int 12 Int2 Int 4 T int table T int 4 T null T undefined table T null 4 T undefined T undefined table T null 4 T byte T undefined table T null 4 T long T undefined table T null 4 T short T undefined table T null 4 T void T undefined table T null 4 T String T undefined table T null 4 T Object T undefined table T null 4 T double T undefined table T null 4 T float T undefined table T null 4 T boolean T undefined table T null 4 T char T undefined table T null 4 T int T undefined table T null 4 T null T undefined return table  get_LEFT_SHIFT T_undefined T_undefined T_undefined T_undefined T_byte T_undefined T_undefined T_long T_undefined T_undefined T_short T_undefined T_undefined T_void T_undefined T_undefined T_String T_undefined T_undefined T_Object T_undefined T_undefined T_double T_undefined T_undefined T_float T_undefined T_undefined T_boolean T_undefined T_undefined T_char T_undefined T_undefined T_int T_undefined T_undefined T_null T_undefined T_byte T_undefined T_undefined T_byte T_byte Byte2Int Byte2Int T_int T_byte T_long Byte2Int Long2Int T_int T_byte T_short Byte2Int Short2Int T_int T_byte T_void T_undefined T_byte T_String T_undefined T_byte T_Object T_undefined T_byte T_double T_undefined T_byte T_float T_undefined T_byte T_boolean T_undefined T_byte T_char Byte2Int Char2Int T_int T_byte T_int Byte2Int Int2Int T_int T_byte T_null T_undefined T_long T_undefined T_undefined T_long T_byte Long2Long Byte2Int T_long T_long T_long Long2Long Long2Int T_long T_long T_short Long2Long Short2Int T_long T_long T_void T_undefined T_long T_String T_undefined T_long T_Object T_undefined T_long T_double T_undefined T_long T_float T_undefined T_long T_boolean T_undefined T_long T_char Long2Long Char2Int T_long T_long T_int Long2Long Int2Int T_long T_long T_null T_undefined T_short T_undefined T_undefined T_short T_byte Short2Int Byte2Int T_int T_short T_long Short2Int Long2Int T_int T_short T_short Short2Int Short2Int T_int T_short T_void T_undefined T_short T_String T_undefined T_short T_Object T_undefined T_short T_double T_undefined T_short T_float T_undefined T_short T_boolean T_undefined T_short T_char Short2Int Char2Int T_int T_short T_int Short2Int Int2Int T_int T_short T_null T_undefined T_void T_undefined T_undefined T_void T_byte T_undefined T_void T_long T_undefined T_void T_short T_undefined T_void T_void T_undefined T_void T_String T_undefined T_void T_Object T_undefined T_void T_double T_undefined T_void T_float T_undefined T_void T_boolean T_undefined T_void T_char T_undefined T_void T_int T_undefined T_void T_null T_undefined T_String T_undefined T_undefined T_String T_byte T_undefined T_String T_long T_undefined T_String T_short T_undefined T_String T_void T_undefined T_String T_String T_undefined T_String T_Object T_undefined T_String T_double T_undefined T_String T_float T_undefined T_String T_boolean T_undefined T_String T_char T_undefined T_String T_int T_undefined T_String T_null T_undefined T_Object T_undefined T_undefined T_Object T_byte T_undefined T_Object T_long T_undefined T_Object T_short T_undefined T_Object T_void T_undefined T_Object T_String T_undefined T_Object T_Object T_undefined T_Object T_double T_undefined T_Object T_float T_undefined T_Object T_boolean T_undefined T_Object T_char T_undefined T_Object T_int T_undefined T_Object T_null T_undefined T_double T_undefined T_undefined T_double T_byte T_undefined T_double T_long T_undefined T_double T_short T_undefined T_double T_void T_undefined T_double T_String T_undefined T_double T_Object T_undefined T_double T_double T_undefined T_double T_float T_undefined T_double T_boolean T_undefined T_double T_char T_undefined T_double T_int T_undefined T_double T_null T_undefined T_float T_undefined T_undefined T_float T_byte T_undefined T_float T_long T_undefined T_float T_short T_undefined T_float T_void T_undefined T_float T_String T_undefined T_float T_Object T_undefined T_float T_double T_undefined T_float T_float T_undefined T_float T_boolean T_undefined T_float T_char T_undefined T_float T_int T_undefined T_float T_null T_undefined T_boolean T_undefined T_undefined T_boolean T_byte T_undefined T_boolean T_long T_undefined T_boolean T_short T_undefined T_boolean T_void T_undefined T_boolean T_String T_undefined T_boolean T_Object T_undefined T_boolean T_double T_undefined T_boolean T_float T_undefined T_boolean T_boolean T_undefined T_boolean T_char T_undefined T_boolean T_int T_undefined T_boolean T_null T_undefined T_char T_undefined T_undefined T_char T_byte Char2Int Byte2Int T_int T_char T_long Char2Int Long2Int T_int T_char T_short Char2Int Short2Int T_int T_char T_void T_undefined T_char T_String T_undefined T_char T_Object T_undefined T_char T_double T_undefined T_char T_float T_undefined T_char T_boolean T_undefined T_char T_char Char2Int Char2Int T_int T_char T_int Char2Int Int2Int T_int T_char T_null T_undefined T_int T_undefined T_undefined T_int T_byte Int2Int Byte2Int T_int T_int T_long Int2Int Long2Int T_int T_int T_short Int2Int Short2Int T_int T_int T_void T_undefined T_int T_String T_undefined T_int T_Object T_undefined T_int T_double T_undefined T_int T_float T_undefined T_int T_boolean T_undefined T_int T_char Int2Int Char2Int T_int T_int T_int Int2Int Int2Int T_int T_int T_null T_undefined T_null T_undefined T_undefined T_null T_byte T_undefined T_null T_long T_undefined T_null T_short T_undefined T_null T_void T_undefined T_null T_String T_undefined T_null T_Object T_undefined T_null T_double T_undefined T_null T_float T_undefined T_null T_boolean T_undefined T_null T_char T_undefined T_null T_int T_undefined T_null T_null T_undefined
public static final int get LESS the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 table T undefined 4 T undefined T undefined table T undefined 4 T byte T undefined table T undefined 4 T long T undefined table T undefined 4 T short T undefined table T undefined 4 T void T undefined table T undefined 4 T String T undefined table T undefined 4 T Object T undefined table T undefined 4 T double T undefined table T undefined 4 T float T undefined table T undefined 4 T boolean T undefined table T undefined 4 T char T undefined table T undefined 4 T int T undefined table T undefined 4 T null T undefined table T byte 4 T undefined T undefined table T byte 4 T byte Byte2 Int 12 Byte2 Int 4 T boolean table T byte 4 T long Byte2 Long 12 Long2 Long 4 T boolean table T byte 4 T short Byte2 Int 12 Short2 Int 4 T boolean table T byte 4 T void T undefined table T byte 4 T String T undefined table T byte 4 T Object T undefined table T byte 4 T double Byte2 Double 12 Double2 Double 4 T boolean table T byte 4 T float Byte2 Float 12 Float2 Float 4 T boolean table T byte 4 T boolean T undefined table T byte 4 T char Byte2 Int 12 Char2 Int 4 T boolean table T byte 4 T int Byte2 Int 12 Int2 Int 4 T boolean table T byte 4 T null T undefined table T long 4 T undefined T undefined table T long 4 T byte Long2 Long 12 Byte2 Long 4 T boolean table T long 4 T long Long2 Long 12 Long2 Long 4 T boolean table T long 4 T short Long2 Long 12 Short2 Long 4 T boolean table T long 4 T void T undefined table T long 4 T String T undefined table T long 4 T Object T undefined table T long 4 T double Long2 Double 12 Double2 Double 4 T boolean table T long 4 T float Long2 Float 12 Float2 Float 4 T boolean table T long 4 T boolean T undefined table T long 4 T char Long2 Long 12 Char2 Long 4 T boolean table T long 4 T int Long2 Long 12 Int2 Long 4 T boolean table T long 4 T null T undefined table T short 4 T undefined T undefined table T short 4 T byte Short2 Int 12 Byte2 Int 4 T boolean table T short 4 T long Short2 Long 12 Long2 Long 4 T boolean table T short 4 T short Short2 Int 12 Short2 Int 4 T boolean table T short 4 T void T undefined table T short 4 T String T undefined table T short 4 T Object T undefined table T short 4 T double Short2 Double 12 Double2 Double 4 T boolean table T short 4 T float Short2 Float 12 Float2 Float 4 T boolean table T short 4 T boolean T undefined table T short 4 T char Short2 Int 12 Char2 Int 4 T boolean table T short 4 T int Short2 Int 12 Int2 Int 4 T boolean table T short 4 T null T undefined table T void 4 T undefined T undefined table T void 4 T byte T undefined table T void 4 T long T undefined table T void 4 T short T undefined table T void 4 T void T undefined table T void 4 T String T undefined table T void 4 T Object T undefined table T void 4 T double T undefined table T void 4 T float T undefined table T void 4 T boolean T undefined table T void 4 T char T undefined table T void 4 T int T undefined table T void 4 T null T undefined table T String 4 T undefined T undefined table T String 4 T byte T undefined table T String 4 T long T undefined table T String 4 T short T undefined table T String 4 T void T undefined table T String 4 T String T undefined table T String 4 T Object T undefined table T String 4 T double T undefined table T String 4 T float T undefined table T String 4 T boolean T undefined table T String 4 T char T undefined table T String 4 T int T undefined table T String 4 T null T undefined table T Object 4 T undefined T undefined table T Object 4 T byte T undefined table T Object 4 T long T undefined table T Object 4 T short T undefined table T Object 4 T void T undefined table T Object 4 T String T undefined table T Object 4 T Object T undefined table T Object 4 T double T undefined table T Object 4 T float T undefined table T Object 4 T boolean T undefined table T Object 4 T char T undefined table T Object 4 T int T undefined table T Object 4 T null T undefined table T double 4 T undefined T undefined table T double 4 T byte Double2 Double 12 Byte2 Double 4 T boolean table T double 4 T long Double2 Double 12 Long2 Double 4 T boolean table T double 4 T short Double2 Double 12 Short2 Double 4 T boolean table T double 4 T void T undefined table T double 4 T String T undefined table T double 4 T Object T undefined table T double 4 T double Double2 Double 12 Double2 Double 4 T boolean table T double 4 T float Double2 Double 12 Float2 Double 4 T boolean table T double 4 T boolean T undefined table T double 4 T char Double2 Double 12 Char2 Double 4 T boolean table T double 4 T int Double2 Double 12 Int2 Double 4 T boolean table T double 4 T null T undefined table T float 4 T undefined T undefined table T float 4 T byte Float2 Float 12 Byte2 Float 4 T boolean table T float 4 T long Float2 Float 12 Long2 Float 4 T boolean table T float 4 T short Float2 Float 12 Short2 Float 4 T boolean table T float 4 T void T undefined table T float 4 T String T undefined table T float 4 T Object T undefined table T float 4 T double Float2 Double 12 Double2 Double 4 T boolean table T float 4 T float Float2 Float 12 Float2 Float 4 T boolean table T float 4 T boolean T undefined table T float 4 T char Float2 Float 12 Char2 Float 4 T boolean table T float 4 T int Float2 Float 12 Int2 Float 4 T boolean table T float 4 T null T undefined table T boolean 4 T undefined T undefined table T boolean 4 T byte T undefined table T boolean 4 T long T undefined table T boolean 4 T short T undefined table T boolean 4 T void T undefined table T boolean 4 T String T undefined table T boolean 4 T Object T undefined table T boolean 4 T double T undefined table T boolean 4 T float T undefined table T boolean 4 T boolean T undefined table T boolean 4 T char T undefined table T boolean 4 T int T undefined table T boolean 4 T null T undefined table T char 4 T undefined T undefined table T char 4 T byte Char2 Int 12 Byte2 Int 4 T boolean table T char 4 T long Char2 Long 12 Long2 Long 4 T boolean table T char 4 T short Char2 Int 12 Short2 Int 4 T boolean table T char 4 T void T undefined table T char 4 T String T undefined table T char 4 T Object T undefined table T char 4 T double Char2 Double 12 Double2 Double 4 T boolean table T char 4 T float Char2 Float 12 Float2 Float 4 T boolean table T char 4 T boolean T undefined table T char 4 T char Char2 Int 12 Char2 Int 4 T boolean table T char 4 T int Char2 Int 12 Int2 Int 4 T boolean table T char 4 T null T undefined table T int 4 T undefined T undefined table T int 4 T byte Int2 Int 12 Byte2 Int 4 T boolean table T int 4 T long Int2 Long 12 Long2 Long 4 T boolean table T int 4 T short Int2 Int 12 Short2 Int 4 T boolean table T int 4 T void T undefined table T int 4 T String T undefined table T int 4 T Object T undefined table T int 4 T double Int2 Double 12 Double2 Double 4 T boolean table T int 4 T float Int2 Float 12 Float2 Float 4 T boolean table T int 4 T boolean T undefined table T int 4 T char Int2 Int 12 Char2 Int 4 T boolean table T int 4 T int Int2 Int 12 Int2 Int 4 T boolean table T int 4 T null T undefined table T null 4 T undefined T undefined table T null 4 T byte T undefined table T null 4 T long T undefined table T null 4 T short T undefined table T null 4 T void T undefined table T null 4 T String T undefined table T null 4 T Object T undefined table T null 4 T double T undefined table T null 4 T float T undefined table T null 4 T boolean  get_LESS T_undefined T_undefined T_undefined T_undefined T_byte T_undefined T_undefined T_long T_undefined T_undefined T_short T_undefined T_undefined T_void T_undefined T_undefined T_String T_undefined T_undefined T_Object T_undefined T_undefined T_double T_undefined T_undefined T_float T_undefined T_undefined T_boolean T_undefined T_undefined T_char T_undefined T_undefined T_int T_undefined T_undefined T_null T_undefined T_byte T_undefined T_undefined T_byte T_byte Byte2Int Byte2Int T_boolean T_byte T_long Byte2Long Long2Long T_boolean T_byte T_short Byte2Int Short2Int T_boolean T_byte T_void T_undefined T_byte T_String T_undefined T_byte T_Object T_undefined T_byte T_double Byte2Double Double2Double T_boolean T_byte T_float Byte2Float Float2Float T_boolean T_byte T_boolean T_undefined T_byte T_char Byte2Int Char2Int T_boolean T_byte T_int Byte2Int Int2Int T_boolean T_byte T_null T_undefined T_long T_undefined T_undefined T_long T_byte Long2Long Byte2Long T_boolean T_long T_long Long2Long Long2Long T_boolean T_long T_short Long2Long Short2Long T_boolean T_long T_void T_undefined T_long T_String T_undefined T_long T_Object T_undefined T_long T_double Long2Double Double2Double T_boolean T_long T_float Long2Float Float2Float T_boolean T_long T_boolean T_undefined T_long T_char Long2Long Char2Long T_boolean T_long T_int Long2Long Int2Long T_boolean T_long T_null T_undefined T_short T_undefined T_undefined T_short T_byte Short2Int Byte2Int T_boolean T_short T_long Short2Long Long2Long T_boolean T_short T_short Short2Int Short2Int T_boolean T_short T_void T_undefined T_short T_String T_undefined T_short T_Object T_undefined T_short T_double Short2Double Double2Double T_boolean T_short T_float Short2Float Float2Float T_boolean T_short T_boolean T_undefined T_short T_char Short2Int Char2Int T_boolean T_short T_int Short2Int Int2Int T_boolean T_short T_null T_undefined T_void T_undefined T_undefined T_void T_byte T_undefined T_void T_long T_undefined T_void T_short T_undefined T_void T_void T_undefined T_void T_String T_undefined T_void T_Object T_undefined T_void T_double T_undefined T_void T_float T_undefined T_void T_boolean T_undefined T_void T_char T_undefined T_void T_int T_undefined T_void T_null T_undefined T_String T_undefined T_undefined T_String T_byte T_undefined T_String T_long T_undefined T_String T_short T_undefined T_String T_void T_undefined T_String T_String T_undefined T_String T_Object T_undefined T_String T_double T_undefined T_String T_float T_undefined T_String T_boolean T_undefined T_String T_char T_undefined T_String T_int T_undefined T_String T_null T_undefined T_Object T_undefined T_undefined T_Object T_byte T_undefined T_Object T_long T_undefined T_Object T_short T_undefined T_Object T_void T_undefined T_Object T_String T_undefined T_Object T_Object T_undefined T_Object T_double T_undefined T_Object T_float T_undefined T_Object T_boolean T_undefined T_Object T_char T_undefined T_Object T_int T_undefined T_Object T_null T_undefined T_double T_undefined T_undefined T_double T_byte Double2Double Byte2Double T_boolean T_double T_long Double2Double Long2Double T_boolean T_double T_short Double2Double Short2Double T_boolean T_double T_void T_undefined T_double T_String T_undefined T_double T_Object T_undefined T_double T_double Double2Double Double2Double T_boolean T_double T_float Double2Double Float2Double T_boolean T_double T_boolean T_undefined T_double T_char Double2Double Char2Double T_boolean T_double T_int Double2Double Int2Double T_boolean T_double T_null T_undefined T_float T_undefined T_undefined T_float T_byte Float2Float Byte2Float T_boolean T_float T_long Float2Float Long2Float T_boolean T_float T_short Float2Float Short2Float T_boolean T_float T_void T_undefined T_float T_String T_undefined T_float T_Object T_undefined T_float T_double Float2Double Double2Double T_boolean T_float T_float Float2Float Float2Float T_boolean T_float T_boolean T_undefined T_float T_char Float2Float Char2Float T_boolean T_float T_int Float2Float Int2Float T_boolean T_float T_null T_undefined T_boolean T_undefined T_undefined T_boolean T_byte T_undefined T_boolean T_long T_undefined T_boolean T_short T_undefined T_boolean T_void T_undefined T_boolean T_String T_undefined T_boolean T_Object T_undefined T_boolean T_double T_undefined T_boolean T_float T_undefined T_boolean T_boolean T_undefined T_boolean T_char T_undefined T_boolean T_int T_undefined T_boolean T_null T_undefined T_char T_undefined T_undefined T_char T_byte Char2Int Byte2Int T_boolean T_char T_long Char2Long Long2Long T_boolean T_char T_short Char2Int Short2Int T_boolean T_char T_void T_undefined T_char T_String T_undefined T_char T_Object T_undefined T_char T_double Char2Double Double2Double T_boolean T_char T_float Char2Float Float2Float T_boolean T_char T_boolean T_undefined T_char T_char Char2Int Char2Int T_boolean T_char T_int Char2Int Int2Int T_boolean T_char T_null T_undefined T_int T_undefined T_undefined T_int T_byte Int2Int Byte2Int T_boolean T_int T_long Int2Long Long2Long T_boolean T_int T_short Int2Int Short2Int T_boolean T_int T_void T_undefined T_int T_String T_undefined T_int T_Object T_undefined T_int T_double Int2Double Double2Double T_boolean T_int T_float Int2Float Float2Float T_boolean T_int T_boolean T_undefined T_int T_char Int2Int Char2Int T_boolean T_int T_int Int2Int Int2Int T_boolean T_int T_null T_undefined T_null T_undefined T_undefined T_null T_byte T_undefined T_null T_long T_undefined T_null T_short T_undefined T_null T_void T_undefined T_null T_String T_undefined T_null T_Object T_undefined T_null T_double T_undefined T_null T_float T_undefined T_null T_boolean
public static final int get LESS EQUAL the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 return get LESS  get_LESS_EQUAL get_LESS
public static final int get MINUS the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 table int get PLUS clone customization table T String 4 T byte T undefined table T String 4 T long T undefined table T String 4 T short T undefined table T String 4 T void T undefined table T String 4 T String T undefined table T String 4 T Object T undefined table T String 4 T double T undefined table T String 4 T float T undefined table T String 4 T boolean T undefined table T String 4 T char T undefined table T String 4 T int T undefined table T String 4 T null T undefined table T byte 4 T String T undefined table T long 4 T String T undefined table T short 4 T String T undefined table T void 4 T String T undefined table T Object 4 T String T undefined table T double 4 T String T undefined table T float 4 T String T undefined table T boolean 4 T String T undefined table T char 4 T String T undefined table T int 4 T String T undefined table T null 4 T String T undefined table T null 4 T null T undefined return table  get_MINUS get_PLUS T_String T_byte T_undefined T_String T_long T_undefined T_String T_short T_undefined T_String T_void T_undefined T_String T_String T_undefined T_String T_Object T_undefined T_String T_double T_undefined T_String T_float T_undefined T_String T_boolean T_undefined T_String T_char T_undefined T_String T_int T_undefined T_String T_null T_undefined T_byte T_String T_undefined T_long T_String T_undefined T_short T_String T_undefined T_void T_String T_undefined T_Object T_String T_undefined T_double T_String T_undefined T_float T_String T_undefined T_boolean T_String T_undefined T_char T_String T_undefined T_int T_String T_undefined T_null T_String T_undefined T_null T_null T_undefined
public static final int get MULTIPLY the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 return get MINUS  get_MULTIPLY get_MINUS
public static final int get OR the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 return get AND  get_OR get_AND
public static final int get OR OR the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 return get AND AND  get_OR_OR get_AND_AND
public static final int get PLUS the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 table T undefined 4 T undefined T undefined table T undefined 4 T byte T undefined table T undefined 4 T long T undefined table T undefined 4 T short T undefined table T undefined 4 T void T undefined table T undefined 4 T String T undefined table T undefined 4 T Object T undefined table T undefined 4 T double T undefined table T undefined 4 T float T undefined table T undefined 4 T boolean T undefined table T undefined 4 T char T undefined table T undefined 4 T int T undefined table T undefined 4 T null T undefined table T byte 4 T undefined T undefined table T byte 4 T byte Byte2 Int 12 Byte2 Int 4 T int table T byte 4 T long Byte2 Long 12 Long2 Long 4 T long table T byte 4 T short Byte2 Int 12 Short2 Int 4 T int table T byte 4 T void T undefined table T byte 4 T String Byte2 Byte 12 String2 String 4 T String table T byte 4 T Object T undefined table T byte 4 T double Byte2 Double 12 Double2 Double 4 T double table T byte 4 T float Byte2 Float 12 Float2 Float 4 T float table T byte 4 T boolean T undefined table T byte 4 T char Byte2 Int 12 Char2 Int 4 T int table T byte 4 T int Byte2 Int 12 Int2 Int 4 T int table T byte 4 T null T undefined table T long 4 T undefined T undefined table T long 4 T byte Long2 Long 12 Byte2 Long 4 T long table T long 4 T long Long2 Long 12 Long2 Long 4 T long table T long 4 T short Long2 Long 12 Short2 Long 4 T long table T long 4 T void T undefined table T long 4 T String Long2 Long 12 String2 String 4 T String table T long 4 T Object T undefined table T long 4 T double Long2 Double 12 Double2 Double 4 T double table T long 4 T float Long2 Float 12 Float2 Float 4 T float table T long 4 T boolean T undefined table T long 4 T char Long2 Long 12 Char2 Long 4 T long table T long 4 T int Long2 Long 12 Int2 Long 4 T long table T long 4 T null T undefined table T short 4 T undefined T undefined table T short 4 T byte Short2 Int 12 Byte2 Int 4 T int table T short 4 T long Short2 Long 12 Long2 Long 4 T long table T short 4 T short Short2 Int 12 Short2 Int 4 T int table T short 4 T void T undefined table T short 4 T String Short2 Short 12 String2 String 4 T String table T short 4 T Object T undefined table T short 4 T double Short2 Double 12 Double2 Double 4 T double table T short 4 T float Short2 Float 12 Float2 Float 4 T float table T short 4 T boolean T undefined table T short 4 T char Short2 Int 12 Char2 Int 4 T int table T short 4 T int Short2 Int 12 Int2 Int 4 T int table T short 4 T null T undefined table T void 4 T undefined T undefined table T void 4 T byte T undefined table T void 4 T long T undefined table T void 4 T short T undefined table T void 4 T void T undefined table T void 4 T String T undefined table T void 4 T Object T undefined table T void 4 T double T undefined table T void 4 T float T undefined table T void 4 T boolean T undefined table T void 4 T char T undefined table T void 4 T int T undefined table T void 4 T null T undefined table T String 4 T undefined T undefined table T String 4 T byte String2 String 12 Byte2 Byte 4 T String table T String 4 T long String2 String 12 Long2 Long 4 T String table T String 4 T short String2 String 12 Short2 Short 4 T String table T String 4 T void T undefined table T String 4 T String String2 String 12 String2 String 4 T String table T String 4 T Object String2 String 12 Object2 Object 4 T String table T String 4 T double String2 String 12 Double2 Double 4 T String table T String 4 T float String2 String 12 Float2 Float 4 T String table T String 4 T boolean String2 String 12 Boolean2 Boolean 4 T String table T String 4 T char String2 String 12 Char2 Char 4 T String table T String 4 T int String2 String 12 Int2 Int 4 T String table T String 4 T null String2 String 12 T null 8 T null 4 T String table T Object 4 T undefined T undefined table T Object 4 T byte T undefined table T Object 4 T long T undefined table T Object 4 T short T undefined table T Object 4 T void T undefined table T Object 4 T String Object2 Object 12 String2 String 4 T String table T Object 4 T Object T undefined table T Object 4 T double T undefined table T Object 4 T float T undefined table T Object 4 T boolean T undefined table T Object 4 T char T undefined table T Object 4 T int T undefined table T Object 4 T null T undefined table T double 4 T undefined T undefined table T double 4 T byte Double2 Double 12 Byte2 Double 4 T double table T double 4 T long Double2 Double 12 Long2 Double 4 T double table T double 4 T short Double2 Double 12 Short2 Double 4 T double table T double 4 T void T undefined table T double 4 T String Double2 Double 12 String2 String 4 T String table T double 4 T Object T undefined table T double 4 T double Double2 Double 12 Double2 Double 4 T double table T double 4 T float Double2 Double 12 Float2 Double 4 T double table T double 4 T boolean T undefined table T double 4 T char Double2 Double 12 Char2 Double 4 T double table T double 4 T int Double2 Double 12 Int2 Double 4 T double table T double 4 T null T undefined table T float 4 T undefined T undefined table T float 4 T byte Float2 Float 12 Byte2 Float 4 T float table T float 4 T long Float2 Float 12 Long2 Float 4 T float table T float 4 T short Float2 Float 12 Short2 Float 4 T float table T float 4 T void T undefined table T float 4 T String Float2 Float 12 String2 String 4 T String table T float 4 T Object T undefined table T float 4 T double Float2 Double 12 Double2 Double 4 T double table T float 4 T float Float2 Float 12 Float2 Float 4 T float table T float 4 T boolean T undefined table T float 4 T char Float2 Float 12 Char2 Float 4 T float table T float 4 T int Float2 Float 12 Int2 Float 4 T float table T float 4 T null T undefined table T boolean 4 T undefined T undefined table T boolean 4 T byte T undefined table T boolean 4 T long T undefined table T boolean 4 T short T undefined table T boolean 4 T void T undefined table T boolean 4 T String Boolean2 Boolean 12 String2 String 4 T String table T boolean 4 T Object T undefined table T boolean 4 T double T undefined table T boolean 4 T float T undefined table T boolean 4 T boolean T undefined table T boolean 4 T char T undefined table T boolean 4 T int T undefined table T boolean 4 T null T undefined table T char 4 T undefined T undefined table T char 4 T byte Char2 Int 12 Byte2 Int 4 T int table T char 4 T long Char2 Long 12 Long2 Long 4 T long table T char 4 T short Char2 Int 12 Short2 Int 4 T int table T char 4 T void T undefined table T char 4 T String Char2 Char 12 String2 String 4 T String table T char 4 T Object T undefined table T char 4 T double Char2 Double 12 Double2 Double 4 T double table T char 4 T float Char2 Float 12 Float2 Float 4 T float table T char 4 T boolean T undefined table T char 4 T char Char2 Int 12 Char2 Int 4 T int table T char 4 T int Char2 Int 12 Int2 Int 4 T int table T char 4 T null T undefined table T int 4 T undefined T undefined table T int 4 T byte Int2 Int 12 Byte2 Int 4 T int table T int 4 T long Int2 Long 12 Long2 Long 4 T long table T int 4 T short Int2 Int 12 Short2 Int 4 T int table T int 4 T void T undefined table T int 4 T String Int2 Int 12 String2 String 4 T String table T int 4 T Object T undefined table T int 4 T double Int2 Double 12 Double2 Double 4 T double table T int 4 T float Int2 Float 12 Float2 Float 4 T float table T int 4 T boolean T undefined table T int 4 T char Int2 Int 12 Char2 Int 4 T int table T int 4 T int Int2 Int 12 Int2 Int 4 T int table T int 4 T null  get_PLUS T_undefined T_undefined T_undefined T_undefined T_byte T_undefined T_undefined T_long T_undefined T_undefined T_short T_undefined T_undefined T_void T_undefined T_undefined T_String T_undefined T_undefined T_Object T_undefined T_undefined T_double T_undefined T_undefined T_float T_undefined T_undefined T_boolean T_undefined T_undefined T_char T_undefined T_undefined T_int T_undefined T_undefined T_null T_undefined T_byte T_undefined T_undefined T_byte T_byte Byte2Int Byte2Int T_int T_byte T_long Byte2Long Long2Long T_long T_byte T_short Byte2Int Short2Int T_int T_byte T_void T_undefined T_byte T_String Byte2Byte String2String T_String T_byte T_Object T_undefined T_byte T_double Byte2Double Double2Double T_double T_byte T_float Byte2Float Float2Float T_float T_byte T_boolean T_undefined T_byte T_char Byte2Int Char2Int T_int T_byte T_int Byte2Int Int2Int T_int T_byte T_null T_undefined T_long T_undefined T_undefined T_long T_byte Long2Long Byte2Long T_long T_long T_long Long2Long Long2Long T_long T_long T_short Long2Long Short2Long T_long T_long T_void T_undefined T_long T_String Long2Long String2String T_String T_long T_Object T_undefined T_long T_double Long2Double Double2Double T_double T_long T_float Long2Float Float2Float T_float T_long T_boolean T_undefined T_long T_char Long2Long Char2Long T_long T_long T_int Long2Long Int2Long T_long T_long T_null T_undefined T_short T_undefined T_undefined T_short T_byte Short2Int Byte2Int T_int T_short T_long Short2Long Long2Long T_long T_short T_short Short2Int Short2Int T_int T_short T_void T_undefined T_short T_String Short2Short String2String T_String T_short T_Object T_undefined T_short T_double Short2Double Double2Double T_double T_short T_float Short2Float Float2Float T_float T_short T_boolean T_undefined T_short T_char Short2Int Char2Int T_int T_short T_int Short2Int Int2Int T_int T_short T_null T_undefined T_void T_undefined T_undefined T_void T_byte T_undefined T_void T_long T_undefined T_void T_short T_undefined T_void T_void T_undefined T_void T_String T_undefined T_void T_Object T_undefined T_void T_double T_undefined T_void T_float T_undefined T_void T_boolean T_undefined T_void T_char T_undefined T_void T_int T_undefined T_void T_null T_undefined T_String T_undefined T_undefined T_String T_byte String2String Byte2Byte T_String T_String T_long String2String Long2Long T_String T_String T_short String2String Short2Short T_String T_String T_void T_undefined T_String T_String String2String String2String T_String T_String T_Object String2String Object2Object T_String T_String T_double String2String Double2Double T_String T_String T_float String2String Float2Float T_String T_String T_boolean String2String Boolean2Boolean T_String T_String T_char String2String Char2Char T_String T_String T_int String2String Int2Int T_String T_String T_null String2String T_null T_null T_String T_Object T_undefined T_undefined T_Object T_byte T_undefined T_Object T_long T_undefined T_Object T_short T_undefined T_Object T_void T_undefined T_Object T_String Object2Object String2String T_String T_Object T_Object T_undefined T_Object T_double T_undefined T_Object T_float T_undefined T_Object T_boolean T_undefined T_Object T_char T_undefined T_Object T_int T_undefined T_Object T_null T_undefined T_double T_undefined T_undefined T_double T_byte Double2Double Byte2Double T_double T_double T_long Double2Double Long2Double T_double T_double T_short Double2Double Short2Double T_double T_double T_void T_undefined T_double T_String Double2Double String2String T_String T_double T_Object T_undefined T_double T_double Double2Double Double2Double T_double T_double T_float Double2Double Float2Double T_double T_double T_boolean T_undefined T_double T_char Double2Double Char2Double T_double T_double T_int Double2Double Int2Double T_double T_double T_null T_undefined T_float T_undefined T_undefined T_float T_byte Float2Float Byte2Float T_float T_float T_long Float2Float Long2Float T_float T_float T_short Float2Float Short2Float T_float T_float T_void T_undefined T_float T_String Float2Float String2String T_String T_float T_Object T_undefined T_float T_double Float2Double Double2Double T_double T_float T_float Float2Float Float2Float T_float T_float T_boolean T_undefined T_float T_char Float2Float Char2Float T_float T_float T_int Float2Float Int2Float T_float T_float T_null T_undefined T_boolean T_undefined T_undefined T_boolean T_byte T_undefined T_boolean T_long T_undefined T_boolean T_short T_undefined T_boolean T_void T_undefined T_boolean T_String Boolean2Boolean String2String T_String T_boolean T_Object T_undefined T_boolean T_double T_undefined T_boolean T_float T_undefined T_boolean T_boolean T_undefined T_boolean T_char T_undefined T_boolean T_int T_undefined T_boolean T_null T_undefined T_char T_undefined T_undefined T_char T_byte Char2Int Byte2Int T_int T_char T_long Char2Long Long2Long T_long T_char T_short Char2Int Short2Int T_int T_char T_void T_undefined T_char T_String Char2Char String2String T_String T_char T_Object T_undefined T_char T_double Char2Double Double2Double T_double T_char T_float Char2Float Float2Float T_float T_char T_boolean T_undefined T_char T_char Char2Int Char2Int T_int T_char T_int Char2Int Int2Int T_int T_char T_null T_undefined T_int T_undefined T_undefined T_int T_byte Int2Int Byte2Int T_int T_int T_long Int2Long Long2Long T_long T_int T_short Int2Int Short2Int T_int T_int T_void T_undefined T_int T_String Int2Int String2String T_String T_int T_Object T_undefined T_int T_double Int2Double Double2Double T_double T_int T_float Int2Float Float2Float T_float T_int T_boolean T_undefined T_int T_char Int2Int Char2Int T_int T_int T_int Int2Int Int2Int T_int T_int T_null
public static final int get REMAINDER the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 return get MINUS  get_REMAINDER get_MINUS
public static final int get RIGHT SHIFT the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 return get LEFT SHIFT  get_RIGHT_SHIFT get_LEFT_SHIFT
public static final int get UNSIGNED RIGHT SHIFT the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 return get LEFT SHIFT  get_UNSIGNED_RIGHT_SHIFT get_LEFT_SHIFT
public static final int get XOR the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 int table new int 16 16 return get AND  get_XOR get_AND
public String operator To String switch bits OperatorMASK OperatorSHIFT case EQUAL EQUAL return NON NLS 1 case LESS EQUAL return NON NLS 1 case GREATER EQUAL return NON NLS 1 case NOT EQUAL return NON NLS 1 case LEFT SHIFT return NON NLS 1 case RIGHT SHIFT return NON NLS 1 case UNSIGNED RIGHT SHIFT return NON NLS 1 case OR OR return NON NLS 1 case AND AND return NON NLS 1 case PLUS return NON NLS 1 case MINUS return NON NLS 1 case NOT return NON NLS 1 case REMAINDER return NON NLS 1 case XOR return NON NLS 1 case AND return NON NLS 1 case MULTIPLY return NON NLS 1 case OR return NON NLS 1 case TWIDDLE return NON NLS 1 case DIVIDE return NON NLS 1 case GREATER return NON NLS 1 case LESS return NON NLS 1 case QUESTIONCOLON return NON NLS 1 case EQUAL return NON NLS 1 return unknown operator NON NLS 1  operatorToString EQUAL_EQUAL LESS_EQUAL GREATER_EQUAL NOT_EQUAL LEFT_SHIFT RIGHT_SHIFT UNSIGNED_RIGHT_SHIFT OR_OR AND_AND
public String Buffer print Expression int indent String Buffer output output append return print Expression No Parenthesis 0 output append  StringBuffer printExpression StringBuffer printExpressionNoParenthesis
public abstract String Buffer print Expression No Parenthesis int indent String Buffer output  StringBuffer printExpressionNoParenthesis StringBuffer

int merged Init State Index 1 public OR OR Expression Expression left Expression right int operator super left right operator  mergedInitStateIndex OR_OR_Expression
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info Constant cst this left optimized Boolean Constant boolean is Left Optimized True cst NotA Constant cst boolean Value true boolean is Left Optimized False cst NotA Constant cst boolean Value false if is Left Optimized False FALSE anything need to be careful of scenario x y z if passing the left info to the right it would be swapped by the Flow Info merged Info left analyse Code current Scope flow Context flow Info unconditional Inits merged Info right analyse Code current Scope flow Context merged Info merged Init State Index current Scope method Scope record Initialization States merged Info return merged Info Flow Info left Info left analyse Code current Scope flow Context flow Info need to be careful of scenario x y z if passing the left info to the right it would be swapped by the Flow Info right Info left Info inits When False unconditional Inits copy right Init State Index current Scope method Scope record Initialization States right Info int previous Mode right Info reach Mode if is Left Optimized True right Info set Reach Mode Flow Info UNREACHABLE right Info right analyse Code current Scope flow Context right Info Flow Info false Merged Info right Info inits When False copy right Info set Reach Mode previous Mode reset after false Merged Info got extracted Flow Info merged Info Flow Info conditional merging two true init Infos for such a negative case if t b t f r b b may not have been initialized left Info inits When True copy unconditional Inits merged With right Info inits When True copy unconditional Inits false Merged Info merged Init State Index current Scope method Scope record Initialization States merged Info return merged Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo optimizedBooleanConstant isLeftOptimizedTrue NotAConstant booleanValue isLeftOptimizedFalse NotAConstant booleanValue isLeftOptimizedFalse FlowInfo mergedInfo analyseCode currentScope flowContext flowInfo unconditionalInits mergedInfo analyseCode currentScope flowContext mergedInfo mergedInitStateIndex currentScope methodScope recordInitializationStates mergedInfo mergedInfo FlowInfo leftInfo analyseCode currentScope flowContext flowInfo FlowInfo rightInfo leftInfo initsWhenFalse unconditionalInits rightInitStateIndex currentScope methodScope recordInitializationStates rightInfo previousMode rightInfo reachMode isLeftOptimizedTrue rightInfo setReachMode FlowInfo rightInfo analyseCode currentScope flowContext rightInfo FlowInfo falseMergedInfo rightInfo initsWhenFalse rightInfo setReachMode previousMode falseMergedInfo FlowInfo mergedInfo FlowInfo initInfos leftInfo initsWhenTrue unconditionalInits mergedWith rightInfo initsWhenTrue unconditionalInits falseMergedInfo mergedInitStateIndex currentScope methodScope recordInitializationStates mergedInfo mergedInfo
Code generation for a binary operation public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if constant Constant NotA Constant inlined value if value Required code Stream generate Constant constant implicit Conversion code Stream record Positions From pc this source Start return Constant cst right constant if cst NotA Constant expr true true if cst boolean Value true this left generate Code current Scope code Stream false if value Required code Stream iconst 1 else expr false expr this left generate Code current Scope code Stream value Required if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index code Stream generate Implicit Conversion implicit Conversion code Stream update Last Recorded EndPC code Stream position code Stream record Positions From pc this source Start return Label true Label new Label code Stream end Label cst left optimized Boolean Constant boolean left Is Const cst NotA Constant boolean left Is True left Is Const cst boolean Value true cst right optimized Boolean Constant boolean right Is Const cst NotA Constant boolean right Is True right Is Const cst boolean Value true generate Operands if left Is Const left generate Code current Scope code Stream false if left Is True break generate Operands no need to generate right operand else left generate Optimized Boolean current Scope code Stream true Label null true need value e g if a 1 b 2 0 shouldn t initialize b if a 1 if right Init State Index 1 code Stream add Definitely Assigned Variables current Scope right Init State Index if right Is Const right generate Code current Scope code Stream false else right generate Optimized Boolean current Scope code Stream true Label null value Required if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index improving code gen for such a case boolean b i 0 true since the label has never been used we have the inlined value on the stack if value Required if left Is Const left Is True code Stream iconst 1 code Stream update Last Recorded EndPC code Stream position else if right Is Const right Is True code Stream iconst 1 code Stream update Last Recorded EndPC code Stream position else code Stream iconst 0 if true Label has Forward References if bits Value For ReturnMASK 0 code Stream ireturn true Label place code Stream iconst 1 else code Stream goto  end Label new Label code Stream code Stream decr Stack Size 1 true Label place code Stream iconst 1 end Label place else true Label place code Stream generate Implicit Conversion implicit Conversion code Stream update Last Recorded EndPC code Stream position else true Label place  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream NotAConstant valueRequired codeStream generateConstant implicitConversion codeStream recordPositionsFrom sourceStart NotAConstant booleanValue generateCode currentScope codeStream valueRequired codeStream iconst_1 generateCode currentScope codeStream valueRequired mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex codeStream generateImplicitConversion implicitConversion codeStream updateLastRecordedEndPC codeStream codeStream recordPositionsFrom sourceStart trueLabel codeStream endLabel optimizedBooleanConstant leftIsConst NotAConstant leftIsTrue leftIsConst booleanValue optimizedBooleanConstant rightIsConst NotAConstant rightIsTrue rightIsConst booleanValue generateOperands leftIsConst generateCode currentScope codeStream leftIsTrue generateOperands generateOptimizedBoolean currentScope codeStream trueLabel rightInitStateIndex codeStream addDefinitelyAssignedVariables currentScope rightInitStateIndex rightIsConst generateCode currentScope codeStream generateOptimizedBoolean currentScope codeStream trueLabel valueRequired mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex valueRequired leftIsConst leftIsTrue codeStream iconst_1 codeStream updateLastRecordedEndPC codeStream rightIsConst rightIsTrue codeStream iconst_1 codeStream updateLastRecordedEndPC codeStream codeStream iconst_0 trueLabel hasForwardReferences ValueForReturnMASK codeStream trueLabel codeStream iconst_1 codeStream goto_ endLabel codeStream codeStream decrStackSize trueLabel codeStream iconst_1 endLabel trueLabel codeStream generateImplicitConversion implicitConversion codeStream updateLastRecordedEndPC codeStream trueLabel
Boolean operator code generation Optimized operations are public void generate Optimized Boolean Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required if constant Constant NotA Constant super generate Optimized Boolean current Scope code Stream true Label false Label value Required return expr false expr Constant cst right constant if cst NotA Constant cst boolean Value false int pc code Stream position this left generate Optimized Boolean current Scope code Stream true Label false Label value Required if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index code Stream record Positions From pc this source Start return cst left optimized Boolean Constant boolean left Is Const cst NotA Constant boolean left Is True left Is Const cst boolean Value true cst right optimized Boolean Constant boolean right Is Const cst NotA Constant boolean right Is True right Is Const cst boolean Value true default case generate Operands if false Label null if true Label null implicit falling through the FALSE case left generate Optimized Boolean current Scope code Stream true Label null left Is Const need value e g if a 1 b 2 0 shouldn t initialize b if a 1 if left Is Const left Is True code Stream goto  true Label code Stream update Last Recorded EndPC code Stream position break generate Operands no need to generate right operand if right Init State Index 1 code Stream add Definitely Assigned Variables current Scope right Init State Index right generate Optimized Boolean current Scope code Stream true Label null value Required right Is Const if value Required right Is Const right Is True code Stream goto  true Label code Stream update Last Recorded EndPC code Stream position else implicit falling through the TRUE case if true Label null Label internal True Label new Label code Stream left generate Optimized Boolean current Scope code Stream internal True Label null left Is Const need value e g if a 1 b 2 0 shouldn t initialize b if a 1 if left Is Const left Is True internal True Label place break generate Operands no need to generate right operand if right Init State Index 1 code Stream add Definitely Assigned Variables current Scope right Init State Index right generate Optimized Boolean current Scope code Stream null false Label value Required right Is Const if value Required right Is Const if right Is True code Stream goto  false Label code Stream update Last Recorded EndPC code Stream position internal True Label place else no implicit fall through TRUE FALSE should never occur if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index  generateOptimizedBoolean BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired NotAConstant generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired NotAConstant booleanValue codeStream generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex codeStream recordPositionsFrom sourceStart optimizedBooleanConstant leftIsConst NotAConstant leftIsTrue leftIsConst booleanValue optimizedBooleanConstant rightIsConst NotAConstant rightIsTrue rightIsConst booleanValue generateOperands falseLabel trueLabel generateOptimizedBoolean currentScope codeStream trueLabel leftIsConst leftIsConst leftIsTrue codeStream goto_ trueLabel codeStream updateLastRecordedEndPC codeStream generateOperands rightInitStateIndex codeStream addDefinitelyAssignedVariables currentScope rightInitStateIndex generateOptimizedBoolean currentScope codeStream trueLabel valueRequired rightIsConst valueRequired rightIsConst rightIsTrue codeStream goto_ trueLabel codeStream updateLastRecordedEndPC codeStream trueLabel internalTrueLabel codeStream generateOptimizedBoolean currentScope codeStream internalTrueLabel leftIsConst leftIsConst leftIsTrue internalTrueLabel generateOperands rightInitStateIndex codeStream addDefinitelyAssignedVariables currentScope rightInitStateIndex generateOptimizedBoolean currentScope codeStream falseLabel valueRequired rightIsConst valueRequired rightIsConst rightIsTrue codeStream goto_ falseLabel codeStream updateLastRecordedEndPC codeStream internalTrueLabel mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex
public boolean is Compactable Operation return false  isCompactableOperation
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope left traverse visitor scope right traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

public Postfix Expression Expression l Expression e int op int pos super l e op pos this source Start l source Start this source End pos  PostfixExpression sourceStart sourceStart sourceEnd
Code generation for Postfix Expression param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required various scenarii are possible setting an array reference a field reference a blank final field reference a field of an enclosing instance or just a local variable int pc code Stream position Reference lhs generate Post Increment current Scope code Stream this value Required if value Required code Stream generate Implicit Conversion implicit Conversion code Stream record Positions From pc this source Start  PostfixExpression currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream generatePostIncrement currentScope codeStream valueRequired valueRequired codeStream generateImplicitConversion implicitConversion codeStream recordPositionsFrom sourceStart
public String operator To String switch operator case PLUS return NON NLS 1 case MINUS return NON NLS 1 return unknown operator NON NLS 1  operatorToString
public String Buffer print Expression No Parenthesis int indent String Buffer output return lhs print Expression indent output append append operator To String  StringBuffer printExpressionNoParenthesis StringBuffer printExpression operatorToString
public boolean restrain Usage To Numeric Types return true  restrainUsageToNumericTypes
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope lhs traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

Prefix Expression constructor comment param l org eclipse jdt internal compiler ast Expression param e org eclipse jdt internal compiler ast Expression param op int public Prefix Expression Expression l Expression e int op int pos super l e op l source End this source Start pos this source End l source End  PrefixExpression PrefixExpression sourceEnd sourceStart sourceEnd sourceEnd
public String operator To String switch operator case PLUS return NON NLS 1 case MINUS return NON NLS 1 return unknown operator NON NLS 1  operatorToString
public String Buffer print Expression No Parenthesis int indent String Buffer output output append operator To String append return lhs print Expression 0 output  StringBuffer printExpressionNoParenthesis StringBuffer operatorToString printExpression
public boolean restrain Usage To Numeric Types return true  restrainUsageToNumericTypes
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope lhs traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

public Reference Binding super Type Binding public Qualified Allocation Expression for subtypes  ReferenceBinding superTypeBinding QualifiedAllocationExpression
public Qualified Allocation Expression Type Declaration anonymous Type this anonymous Type anonymous Type  QualifiedAllocationExpression TypeDeclaration anonymousType anonymousType anonymousType
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info analyse the enclosing instance if enclosing Instance null flow Info enclosing Instance analyse Code current Scope flow Context flow Info check captured variables are initialized in current context 26134 check Captured Local Initialization If Necessary this super Type Binding null this binding declaring Class this super Type Binding current Scope flow Info process arguments if arguments null for int i 0 count arguments length i count i flow Info arguments i analyse Code current Scope flow Context flow Info analyse the anonymous nested type if anonymous Type null flow Info anonymous Type analyse Code current Scope flow Context flow Info record some dependency information for exception types Reference Binding thrown Exceptions if thrown Exceptions binding thrown Exceptions length 0 check exception handling flow Context check Exception Handlers thrown Exceptions this flow Info current Scope manage Enclosing Instance Access If Necessary current Scope flow Info manage Synthetic Access If Necessary current Scope flow Info return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo enclosingInstance flowInfo enclosingInstance analyseCode currentScope flowContext flowInfo checkCapturedLocalInitializationIfNecessary superTypeBinding declaringClass superTypeBinding currentScope flowInfo flowInfo analyseCode currentScope flowContext flowInfo anonymousType flowInfo anonymousType analyseCode currentScope flowContext flowInfo ReferenceBinding thrownExceptions thrownExceptions thrownExceptions flowContext checkExceptionHandlers thrownExceptions flowInfo currentScope manageEnclosingInstanceAccessIfNecessary currentScope flowInfo manageSyntheticAccessIfNecessary currentScope flowInfo flowInfo
public Expression enclosing Instance return enclosing Instance  enclosingInstance enclosingInstance
public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position Reference Binding allocated Type binding declaring Class code Stream new  allocated Type if value Required code Stream dup better highlight for allocation display the type individually code Stream record Positions From pc type source Start handling innerclass instance allocation enclosing instance arguments if allocated Type is Nested Type code Stream generate Synthetic Enclosing Instance Values current Scope allocated Type enclosing Instance this generate the arguments for constructor if arguments null for int i 0 count arguments length i count i arguments i generate Code current Scope code Stream true handling innerclass instance allocation outer local arguments if allocated Type is Nested Type code Stream generate Synthetic Outer Argument Values current Scope allocated Type this invoke constructor if synthetic Accessor null code Stream invokespecial binding else synthetic accessor got some extra arguments appended to its signature which need values for int i 0 max synthetic Accessor parameters length binding parameters length i max i code Stream aconst null code Stream invokespecial synthetic Accessor code Stream record Positions From pc this source Start if anonymous Type null anonymous Type generate Code current Scope code Stream  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream ReferenceBinding allocatedType declaringClass codeStream new_ allocatedType valueRequired codeStream codeStream recordPositionsFrom sourceStart allocatedType isNestedType codeStream generateSyntheticEnclosingInstanceValues currentScope allocatedType enclosingInstance generateCode currentScope codeStream allocatedType isNestedType codeStream generateSyntheticOuterArgumentValues currentScope allocatedType syntheticAccessor codeStream syntheticAccessor codeStream aconst_null codeStream syntheticAccessor codeStream recordPositionsFrom sourceStart anonymousType anonymousType generateCode currentScope codeStream
public boolean is Super Access necessary to lookup super constructor of anonymous type return anonymous Type null  isSuperAccess anonymousType
public void manage Enclosing Instance Access If Necessary Block Scope current Scope Flow Info flow Info if flow Info is Reachable return Reference Binding allocated Type perform some emulation work in case there is some and we are inside a local type only if allocated Type binding declaring Class is Nested Type current Scope enclosing Source Type is Local Type if allocated Type is Local Type Local Type Binding allocated Type add Inner Emulation Dependent current Scope enclosing Instance null else locally propagate since we already now the desired shape for sure current Scope propagate Inner Emulation allocated Type enclosing Instance null  manageEnclosingInstanceAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable ReferenceBinding allocatedType allocatedType declaringClass isNestedType currentScope enclosingSourceType isLocalType allocatedType isLocalType LocalTypeBinding allocatedType addInnerEmulationDependent currentScope enclosingInstance currentScope propagateInnerEmulation allocatedType enclosingInstance
public String Buffer print Expression int indent String Buffer output if enclosing Instance null enclosing Instance print Expression 0 output append super print Expression 0 output if anonymous Type null anonymous Type print indent output return output  StringBuffer printExpression StringBuffer enclosingInstance enclosingInstance printExpression printExpression anonymousType anonymousType
public Type Binding resolve Type Block Scope scope added for code assist cannot occur with normal code if anonymous Type null enclosing Instance null return super resolve Type scope Propagate the type checking to the arguments and checks if the constructor is defined Class Instance Creation Expression Primary new Simple Name Argument Listopt Class Bodyopt Class Instance Creation Expression Name new Simple Name Argument Listopt Class Bodyopt by construction when there is an enclosing instance the typename may NOT be qualified therefore by construction the type is always a Single Type Reference Type instead of being either sometime a Single Type Reference and sometime a Qualifed Type Reference constant NotA Constant Type Binding enclosing Instance Type null Type Binding receiver Type null boolean has Error false boolean enclosing Instance Contains Cast false boolean args Contain Cast false if enclosing Instance null if enclosing Instance instanceof Cast Expression enclosing Instance bits Ignore Need For Cast CheckMASK will check later on enclosing Instance Contains Cast true if enclosing Instance Type enclosing Instance resolve Type scope null has Error true else if enclosing Instance Type is Base Type enclosing Instance Type is Array Type scope problem Reporter illegal Primitive Or Array Type For Enclosing Instance enclosing Instance Type enclosing Instance has Error true else receiver Type Single Type Reference type resolve Type Enclosing scope Reference Binding enclosing Instance Type if receiver Type null enclosing Instance Contains Cast Cast Expression check Need For Enclosing Instance Cast scope enclosing Instance enclosing Instance Type receiver Type else receiver Type type resolve Type scope if receiver Type null has Error true else if Reference Binding receiver Type is Final this anonymous Type null scope problem Reporter anonymous Class Cannot Extend Final Class type receiver Type has Error true will check for null after args are resolved Type Binding argument Types No Parameters if arguments null int length arguments length argument Types new Type Binding length for int i 0 i length i Expression argument this arguments i if argument instanceof Cast Expression argument bits Ignore Need For Cast CheckMASK will check later on args Contain Cast true if argument Types i argument resolve Type scope null has Error true limit of fault tolerance if has Error return this resolved Type receiver Type if this anonymous Type null qualified allocation with no anonymous type Reference Binding allocation Type Reference Binding receiver Type if receiver Type can Be Instantiated scope problem Reporter cannot Instantiate type receiver Type return this resolved Type receiver Type if this binding scope get Constructor allocation Type argument Types this is Valid Binding if is Method Use Deprecated binding scope scope problem Reporter deprecated Method this binding this if arguments null for int i 0 i arguments length i arguments i implicit Widening this binding parameters i argument Types i if args Contain Cast Cast Expression check Need For Argument Casts scope null allocation Type binding this arguments argument Types this else if this binding declaring Class null this binding declaring Class allocation Type scope problem Reporter invalid Constructor this this binding return this resolved Type receiver Type The enclosing instance must be compatible with the innermost enclosing type Reference Binding expected Type this binding declaring Class enclosing Type if enclosing Instance Type is Compatible With expected Type return receiver Type scope problem Reporter type Mismatch Error Actual Type Expected Type this enclosing Instance enclosing Instance Type expected Type return this resolved Type receiver Type anonymous type scenario an anonymous class inherits from java lang Object when declared after an interface this super Type Binding receiver Type is Interface scope get Java Lang Object Reference Binding receiver Type insert anonymous type in scope scope add Anonymous Type this anonymous Type Reference Binding receiver Type this anonymous Type resolve scope find anonymous super constructor Method Binding inherited Binding scope get Constructor this super Type Binding argument Types this if inherited Binding is Valid Binding if inherited Binding declaring Class null inherited Binding declaring Class this super Type Binding scope problem Reporter invalid Constructor this inherited Binding return this resolved Type anonymous Type binding if enclosing Instance null if enclosing Instance Type is Compatible With inherited Binding declaring Class enclosing Type scope problem Reporter type Mismatch Error Actual Type Expected Type enclosing Instance enclosing Instance Type inherited Binding declaring Class enclosing Type return this resolved Type anonymous Type binding this promotion has to be done somewhere here or inside the constructor of the anonymous class We do it here while the constructor of the inner is then easier if arguments null for int i 0 i arguments length i arguments i implicit Widening inherited Binding parameters i argument Types i if args Contain Cast Cast Expression check Need For Argument Casts scope null this super Type Binding inherited Binding this arguments argument Types this Update the anonymous inner class superclass interface binding anonymous Type creates Internal Constructor With Binding inherited Binding return this resolved Type anonymous Type binding 1 2 change  TypeBinding resolveType BlockScope anonymousType enclosingInstance resolveType ClassInstanceCreationExpression SimpleName ArgumentListopt ClassBodyopt ClassInstanceCreationExpression SimpleName ArgumentListopt ClassBodyopt SingleTypeReferenceType SingleTypeReference QualifedTypeReference NotAConstant TypeBinding enclosingInstanceType TypeBinding receiverType hasError enclosingInstanceContainsCast argsContainCast enclosingInstance enclosingInstance CastExpression enclosingInstance IgnoreNeedForCastCheckMASK enclosingInstanceContainsCast enclosingInstanceType enclosingInstance resolveType hasError enclosingInstanceType isBaseType enclosingInstanceType isArrayType problemReporter illegalPrimitiveOrArrayTypeForEnclosingInstance enclosingInstanceType enclosingInstance hasError receiverType SingleTypeReference resolveTypeEnclosing ReferenceBinding enclosingInstanceType receiverType enclosingInstanceContainsCast CastExpression checkNeedForEnclosingInstanceCast enclosingInstance enclosingInstanceType receiverType receiverType resolveType receiverType hasError ReferenceBinding receiverType isFinal anonymousType problemReporter anonymousClassCannotExtendFinalClass receiverType hasError TypeBinding argumentTypes NoParameters argumentTypes TypeBinding CastExpression IgnoreNeedForCastCheckMASK argsContainCast argumentTypes resolveType hasError hasError resolvedType receiverType anonymousType ReferenceBinding allocationType ReferenceBinding receiverType receiverType canBeInstantiated problemReporter cannotInstantiate receiverType resolvedType receiverType getConstructor allocationType argumentTypes isValidBinding isMethodUseDeprecated problemReporter deprecatedMethod implicitWidening argumentTypes argsContainCast CastExpression checkNeedForArgumentCasts allocationType argumentTypes declaringClass declaringClass allocationType problemReporter invalidConstructor resolvedType receiverType ReferenceBinding expectedType declaringClass enclosingType enclosingInstanceType isCompatibleWith expectedType receiverType problemReporter typeMismatchErrorActualTypeExpectedType enclosingInstance enclosingInstanceType expectedType resolvedType receiverType superTypeBinding receiverType isInterface getJavaLangObject ReferenceBinding receiverType addAnonymousType anonymousType ReferenceBinding receiverType anonymousType MethodBinding inheritedBinding getConstructor superTypeBinding argumentTypes inheritedBinding isValidBinding inheritedBinding declaringClass inheritedBinding declaringClass superTypeBinding problemReporter invalidConstructor inheritedBinding resolvedType anonymousType enclosingInstance enclosingInstanceType isCompatibleWith inheritedBinding declaringClass enclosingType problemReporter typeMismatchErrorActualTypeExpectedType enclosingInstance enclosingInstanceType inheritedBinding declaringClass enclosingType resolvedType anonymousType implicitWidening inheritedBinding argumentTypes argsContainCast CastExpression checkNeedForArgumentCasts superTypeBinding inheritedBinding argumentTypes anonymousType createsInternalConstructorWithBinding inheritedBinding resolvedType anonymousType
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope if enclosing Instance null enclosing Instance traverse visitor scope type traverse visitor scope if arguments null int arguments Length arguments length for int i 0 i arguments Length i arguments i traverse visitor scope if anonymous Type null anonymous Type traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope enclosingInstance enclosingInstance argumentsLength argumentsLength anonymousType anonymousType endVisit

protected Field Binding last Field Binding public Qualified Name Reference char sources long positions int source Start int source End super this tokens sources this source Positions positions this source Start source Start this source End source End  FieldBinding lastFieldBinding QualifiedNameReference sourceStart sourceEnd sourcePositions sourceStart sourceStart sourceEnd sourceEnd
public Flow Info analyse Assignment Block Scope current Scope Flow Context flow Context Flow Info flow Info Assignment assignment boolean is Compound determine the rank until which we now we do not need any actual value for the field access int other Bindings Count other Bindings null 0 other Bindings length boolean need Value other Bindings Count 0 this other Bindings 0 is Static switch bits Restrictive FlagMASK case FIELD reading a field last Field Binding Field Binding binding if need Value manage Synthetic Read Access If Necessary current Scope last Field Binding this actual Receiver Type 0 flow Info check if final blank field if last Field Binding is Blank Final this other Bindings null the last field binding is only assigned current Scope allow Blank Final Field Assignment last Field Binding if flow Info is Definitely Assigned last Field Binding current Scope problem Reporter uninitialized Blank Final Field last Field Binding this break case LOCAL first binding is a local variable Local Variable Binding local Binding if flow Info is Definitely Assigned local Binding Local Variable Binding binding current Scope problem Reporter uninitialized Local Variable local Binding this if flow Info is Reachable local Binding use Flag Local Variable Binding USED else if local Binding use Flag Local Variable Binding UNUSED local Binding use Flag Local Variable Binding FAKE USED if need Value manage Enclosing Instance Access If Necessary current Scope flow Info only for first binding all intermediate field accesses are read accesses if other Bindings null for int i 0 i other Bindings Count 1 i last Field Binding other Bindings i need Value other Bindings i 1 is Static if need Value manage Synthetic Read Access If Necessary current Scope last Field Binding i 0 Variable Binding binding type other Bindings i 1 type i 1 flow Info last Field Binding other Bindings other Bindings Count 1 if is Compound if binding last Field Binding last Field Binding is Blank Final current Scope allow Blank Final Field Assignment last Field Binding flow Info is Definitely Assigned last Field Binding current Scope problem Reporter uninitialized Blank Final Field last Field Binding this Type Binding last Receiver Type if last Field Binding binding last Receiver Type this actual Receiver Type else if other Bindings Count 1 last Receiver Type Variable Binding this binding type else last Receiver Type this other Bindings other Bindings Count 2 type manage Synthetic Read Access If Necessary current Scope last Field Binding last Receiver Type last Field Binding binding 0 other Bindings Count flow Info if assignment expression null flow Info assignment expression analyse Code current Scope flow Context flow Info unconditional Inits the last field access is a write access if last Field Binding is Final in a context where it can be assigned if last Field Binding is Blank Final is Compound current Scope allow Blank Final Field Assignment last Field Binding index Of First Field Binding 1 if flow Info is Potentially Assigned last Field Binding current Scope problem Reporter duplicate Initialization Of Blank Final Field last Field Binding this else flow Context record Setting Final last Field Binding this flow Info flow Info mark As Definitely Assigned last Field Binding else current Scope problem Reporter cannot Assign To Final Field last Field Binding this if current Scope allow Blank Final Field Assignment last Field Binding pretend it got assigned flow Info mark As Definitely Assigned last Field Binding equivalent to values Required max Other Bindings Type Binding last Receiver Type if last Field Binding binding last Receiver Type this actual Receiver Type else if other Bindings Count 1 last Receiver Type Variable Binding this binding type else last Receiver Type this other Bindings other Bindings Count 2 type manage Synthetic Write Access If Necessary current Scope last Field Binding last Receiver Type flow Info return flow Info  FlowInfo analyseAssignment BlockScope currentScope FlowContext flowContext FlowInfo flowInfo isCompound otherBindingsCount otherBindings otherBindings needValue otherBindingsCount otherBindings isStatic RestrictiveFlagMASK lastFieldBinding FieldBinding needValue manageSyntheticReadAccessIfNecessary currentScope lastFieldBinding actualReceiverType flowInfo lastFieldBinding isBlankFinal otherBindings currentScope allowBlankFinalFieldAssignment lastFieldBinding flowInfo isDefinitelyAssigned lastFieldBinding currentScope problemReporter uninitializedBlankFinalField lastFieldBinding LocalVariableBinding localBinding flowInfo isDefinitelyAssigned localBinding LocalVariableBinding currentScope problemReporter uninitializedLocalVariable localBinding flowInfo isReachable localBinding useFlag LocalVariableBinding localBinding useFlag LocalVariableBinding localBinding useFlag LocalVariableBinding FAKE_USED needValue manageEnclosingInstanceAccessIfNecessary currentScope flowInfo otherBindings otherBindingsCount lastFieldBinding otherBindings needValue otherBindings isStatic needValue manageSyntheticReadAccessIfNecessary currentScope lastFieldBinding VariableBinding otherBindings flowInfo lastFieldBinding otherBindings otherBindingsCount isCompound lastFieldBinding lastFieldBinding isBlankFinal currentScope allowBlankFinalFieldAssignment lastFieldBinding flowInfo isDefinitelyAssigned lastFieldBinding currentScope problemReporter uninitializedBlankFinalField lastFieldBinding TypeBinding lastReceiverType lastFieldBinding lastReceiverType actualReceiverType otherBindingsCount lastReceiverType VariableBinding lastReceiverType otherBindings otherBindingsCount manageSyntheticReadAccessIfNecessary currentScope lastFieldBinding lastReceiverType lastFieldBinding otherBindingsCount flowInfo flowInfo analyseCode currentScope flowContext flowInfo unconditionalInits lastFieldBinding isFinal lastFieldBinding isBlankFinal isCompound currentScope allowBlankFinalFieldAssignment lastFieldBinding indexOfFirstFieldBinding flowInfo isPotentiallyAssigned lastFieldBinding currentScope problemReporter duplicateInitializationOfBlankFinalField lastFieldBinding flowContext recordSettingFinal lastFieldBinding flowInfo flowInfo markAsDefinitelyAssigned lastFieldBinding currentScope problemReporter cannotAssignToFinalField lastFieldBinding currentScope allowBlankFinalFieldAssignment lastFieldBinding flowInfo markAsDefinitelyAssigned lastFieldBinding valuesRequired maxOtherBindings TypeBinding lastReceiverType lastFieldBinding lastReceiverType actualReceiverType otherBindingsCount lastReceiverType VariableBinding lastReceiverType otherBindings otherBindingsCount manageSyntheticWriteAccessIfNecessary currentScope lastFieldBinding lastReceiverType flowInfo flowInfo
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info return analyse Code current Scope flow Context flow Info true  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo analyseCode currentScope flowContext flowInfo
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info boolean value Required determine the rank until which we now we do not need any actual value for the field access int other Bindings Count other Bindings null 0 other Bindings length boolean need Value other Bindings Count 0 value Required this other Bindings 0 is Static switch bits Restrictive FlagMASK case FIELD reading a field if need Value manage Synthetic Read Access If Necessary current Scope Field Binding binding this actual Receiver Type 0 flow Info check if reading a final blank field Field Binding field Binding if field Binding Field Binding binding is Blank Final index Of First Field Binding 1 was an implicit reference to the first field binding current Scope allow Blank Final Field Assignment field Binding flow Info is Definitely Assigned field Binding current Scope problem Reporter uninitialized Blank Final Field field Binding this break case LOCAL reading a local variable Local Variable Binding local Binding if flow Info is Definitely Assigned local Binding Local Variable Binding binding current Scope problem Reporter uninitialized Local Variable local Binding this if flow Info is Reachable local Binding use Flag Local Variable Binding USED else if local Binding use Flag Local Variable Binding UNUSED local Binding use Flag Local Variable Binding FAKE USED if need Value manage Enclosing Instance Access If Necessary current Scope flow Info only for first binding if other Bindings null for int i 0 i other Bindings Count i need Value i other Bindings Count 1 other Bindings i 1 is Static value Required if need Value manage Synthetic Read Access If Necessary current Scope other Bindings i i 0 Variable Binding binding type other Bindings i 1 type i 1 flow Info return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo valueRequired otherBindingsCount otherBindings otherBindings needValue otherBindingsCount valueRequired otherBindings isStatic RestrictiveFlagMASK needValue manageSyntheticReadAccessIfNecessary currentScope FieldBinding actualReceiverType flowInfo FieldBinding fieldBinding fieldBinding FieldBinding isBlankFinal indexOfFirstFieldBinding currentScope allowBlankFinalFieldAssignment fieldBinding flowInfo isDefinitelyAssigned fieldBinding currentScope problemReporter uninitializedBlankFinalField fieldBinding LocalVariableBinding localBinding flowInfo isDefinitelyAssigned localBinding LocalVariableBinding currentScope problemReporter uninitializedLocalVariable localBinding flowInfo isReachable localBinding useFlag LocalVariableBinding localBinding useFlag LocalVariableBinding localBinding useFlag LocalVariableBinding FAKE_USED needValue manageEnclosingInstanceAccessIfNecessary currentScope flowInfo otherBindings otherBindingsCount needValue otherBindingsCount otherBindings isStatic valueRequired needValue manageSyntheticReadAccessIfNecessary currentScope otherBindings VariableBinding otherBindings flowInfo flowInfo
Check and or redirect the field access to the delegate receiver if any public Type Binding check Field Access Block Scope scope check for forward references Field Binding field Binding Field Binding binding Method Scope method Scope scope method Scope if method Scope enclosing Source Type field Binding declaring Class method Scope last Visible FieldID 0 field Binding id method Scope last Visible FieldID if field Binding is Static method Scope is Static this index Of First Field Binding 1 scope problem Reporter forward Reference this 0 scope enclosing Source Type bits Restrictive FlagMASK clear bits bits FIELD return get Other Field Bindings scope  TypeBinding checkFieldAccess BlockScope FieldBinding fieldBinding FieldBinding MethodScope methodScope methodScope methodScope enclosingSourceType fieldBinding declaringClass methodScope lastVisibleFieldID fieldBinding methodScope lastVisibleFieldID fieldBinding isStatic methodScope isStatic indexOfFirstFieldBinding problemReporter forwardReference enclosingSourceType RestrictiveFlagMASK getOtherFieldBindings
public void generate Assignment Block Scope current Scope Code Stream code Stream Assignment assignment boolean value Required generate Read Sequence current Scope code Stream assignment expression generate Code current Scope code Stream true field Store code Stream last Field Binding synthetic Write Accessor value Required equivalent to values Required max Other Bindings if value Required code Stream generate Implicit Conversion assignment implicit Conversion  generateAssignment BlockScope currentScope CodeStream codeStream valueRequired generateReadSequence currentScope codeStream generateCode currentScope codeStream fieldStore codeStream lastFieldBinding syntheticWriteAccessor valueRequired valuesRequired maxOtherBindings valueRequired codeStream generateImplicitConversion implicitConversion
public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if constant NotA Constant if value Required code Stream generate Constant constant implicit Conversion else generate Read Sequence current Scope code Stream if value Required if last Field Binding declaring Class null array length code Stream arraylength code Stream generate Implicit Conversion implicit Conversion else if last Field Binding constant NotA Constant if last Field Binding is Static code Stream invoke Object Get Class code Stream pop inline the last field constant code Stream generate Constant last Field Binding constant implicit Conversion else Synthetic Access Method Binding accessor synthetic Read Accessors null null synthetic Read Accessors synthetic Read Accessors length 1 if accessor null if last Field Binding is Static code Stream getstatic last Field Binding else code Stream getfield last Field Binding else code Stream invokestatic accessor code Stream generate Implicit Conversion implicit Conversion else if last Field Binding null last Field Binding is Static code Stream invoke Object Get Class perform null check code Stream pop code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream NotAConstant valueRequired codeStream generateConstant implicitConversion generateReadSequence currentScope codeStream valueRequired lastFieldBinding declaringClass codeStream codeStream generateImplicitConversion implicitConversion lastFieldBinding NotAConstant lastFieldBinding isStatic codeStream invokeObjectGetClass codeStream codeStream generateConstant lastFieldBinding implicitConversion SyntheticAccessMethodBinding syntheticReadAccessors syntheticReadAccessors syntheticReadAccessors lastFieldBinding isStatic codeStream lastFieldBinding codeStream lastFieldBinding codeStream codeStream generateImplicitConversion implicitConversion lastFieldBinding lastFieldBinding isStatic codeStream invokeObjectGetClass codeStream codeStream recordPositionsFrom sourceStart
public void generate Compound Assignment Block Scope current Scope Code Stream code Stream Expression expression int operator int assignment Implicit Conversion boolean value Required generate Read Sequence current Scope code Stream Synthetic Access Method Binding accessor synthetic Read Accessors null null synthetic Read Accessors synthetic Read Accessors length 1 if last Field Binding is Static if accessor null code Stream getstatic last Field Binding else code Stream invokestatic accessor else code Stream dup if accessor null code Stream getfield last Field Binding else code Stream invokestatic accessor the last field access is a write access perform the actual compound operation int operation TypeID if operation TypeID implicit Conversion 4 T String code Stream generate String Append current Scope null expression else promote the array reference to the suitable operation type code Stream generate Implicit Conversion implicit Conversion generate the increment value will by itself be promoted to the operation value if expression Int Literal One prefix operation code Stream generate Constant expression constant implicit Conversion else expression generate Code current Scope code Stream true perform the operation code Stream send Operator operator operation TypeID cast the value back to the array reference type code Stream generate Implicit Conversion assignment Implicit Conversion actual assignment field Store code Stream last Field Binding synthetic Write Accessor value Required equivalent to values Required max Other Bindings  generateCompoundAssignment BlockScope currentScope CodeStream codeStream assignmentImplicitConversion valueRequired generateReadSequence currentScope codeStream SyntheticAccessMethodBinding syntheticReadAccessors syntheticReadAccessors syntheticReadAccessors lastFieldBinding isStatic codeStream lastFieldBinding codeStream codeStream codeStream lastFieldBinding codeStream operationTypeID operationTypeID implicitConversion T_String codeStream generateStringAppend currentScope codeStream generateImplicitConversion implicitConversion IntLiteral codeStream generateConstant implicitConversion generateCode currentScope codeStream codeStream sendOperator operationTypeID codeStream generateImplicitConversion assignmentImplicitConversion fieldStore codeStream lastFieldBinding syntheticWriteAccessor valueRequired valuesRequired maxOtherBindings
public void generate Post Increment Block Scope current Scope Code Stream code Stream Compound Assignment post Increment boolean value Required generate Read Sequence current Scope code Stream Synthetic Access Method Binding accessor synthetic Read Accessors null null synthetic Read Accessors synthetic Read Accessors length 1 if last Field Binding is Static if accessor null code Stream getstatic last Field Binding else code Stream invokestatic accessor else code Stream dup if accessor null code Stream getfield last Field Binding else code Stream invokestatic accessor duplicate the old field value if value Required if last Field Binding is Static if last Field Binding type Long Binding last Field Binding type Double Binding code Stream dup2 else code Stream dup else Stack owner old field value old field value owner old field value if last Field Binding type Long Binding last Field Binding type Double Binding code Stream dup2 x1 else code Stream dup x1 code Stream generate Constant post Increment expression constant implicit Conversion code Stream send Operator post Increment operator last Field Binding type id code Stream generate Implicit Conversion post Increment assignment Implicit Conversion field Store code Stream last Field Binding synthetic Write Accessor false  generatePostIncrement BlockScope currentScope CodeStream codeStream CompoundAssignment postIncrement valueRequired generateReadSequence currentScope codeStream SyntheticAccessMethodBinding syntheticReadAccessors syntheticReadAccessors syntheticReadAccessors lastFieldBinding isStatic codeStream lastFieldBinding codeStream codeStream codeStream lastFieldBinding codeStream valueRequired lastFieldBinding isStatic lastFieldBinding LongBinding lastFieldBinding DoubleBinding codeStream codeStream lastFieldBinding LongBinding lastFieldBinding DoubleBinding codeStream dup2_x1 codeStream dup_x1 codeStream generateConstant postIncrement implicitConversion codeStream sendOperator postIncrement lastFieldBinding codeStream generateImplicitConversion postIncrement assignmentImplicitConversion fieldStore codeStream lastFieldBinding syntheticWriteAccessor
public void generate Read Sequence Block Scope current Scope Code Stream code Stream determine the rank until which we now we do not need any actual value for the field access int other Bindings Count this other Codegen Bindings null 0 other Codegen Bindings length boolean need Value other Bindings Count 0 this other Bindings 0 is Static switch bits Restrictive FlagMASK case FIELD last Field Binding Field Binding this codegen Binding if first field is actually constant we can inline it if last Field Binding constant NotA Constant break if need Value last Field Binding is Static if bits DepthMASK 0 Reference Binding target Type current Scope enclosing Source Type enclosing Type At bits DepthMASK DepthSHIFT Object emulation Path current Scope get Emulation Path target Type true only exact match false consider enclosing arg code Stream generate Outer Access emulation Path this target Type current Scope else generate Receiver code Stream break case LOCAL reading the first local variable last Field Binding null if need Value break no value needed Local Variable Binding local Binding Local Variable Binding this codegen Binding regular local variable read if local Binding constant NotA Constant code Stream generate Constant local Binding constant 0 no implicit conversion else outer local if bits DepthMASK 0 outer local can be reached either through a synthetic arg or a synthetic field Variable Binding path current Scope get Emulation Path local Binding code Stream generate Outer Access path this local Binding current Scope else code Stream load local Binding all intermediate field accesses are read accesses only the last field binding is a write access if this other Codegen Bindings null for int i 0 i other Bindings Count i Field Binding next Field this other Codegen Bindings i if last Field Binding null need Value next Field is Static if need Value Method Binding accessor synthetic Read Accessors null null synthetic Read Accessors i if accessor null if last Field Binding constant NotA Constant if this last Field Binding this codegen Binding this last Field Binding is Static code Stream invoke Object Get Class perform null check code Stream pop code Stream generate Constant last Field Binding constant 0 else if last Field Binding is Static code Stream getstatic last Field Binding else code Stream getfield last Field Binding else code Stream invokestatic accessor else if this codegen Binding this last Field Binding this last Field Binding is Static code Stream invoke Object Get Class perform null check code Stream pop this last Field Binding next Field  generateReadSequence BlockScope currentScope CodeStream codeStream otherBindingsCount otherCodegenBindings otherCodegenBindings needValue otherBindingsCount otherBindings isStatic RestrictiveFlagMASK lastFieldBinding FieldBinding codegenBinding lastFieldBinding NotAConstant needValue lastFieldBinding isStatic ReferenceBinding targetType currentScope enclosingSourceType enclosingTypeAt emulationPath currentScope getEmulationPath targetType codeStream generateOuterAccess emulationPath targetType currentScope generateReceiver codeStream lastFieldBinding needValue LocalVariableBinding localBinding LocalVariableBinding codegenBinding localBinding NotAConstant codeStream generateConstant localBinding VariableBinding currentScope getEmulationPath localBinding codeStream generateOuterAccess localBinding currentScope codeStream localBinding otherCodegenBindings otherBindingsCount FieldBinding nextField otherCodegenBindings lastFieldBinding needValue nextField isStatic needValue MethodBinding syntheticReadAccessors syntheticReadAccessors lastFieldBinding NotAConstant lastFieldBinding codegenBinding lastFieldBinding isStatic codeStream invokeObjectGetClass codeStream codeStream generateConstant lastFieldBinding lastFieldBinding isStatic codeStream lastFieldBinding codeStream lastFieldBinding codeStream codegenBinding lastFieldBinding lastFieldBinding isStatic codeStream invokeObjectGetClass codeStream lastFieldBinding nextField
public void generate Receiver Code Stream code Stream code Stream aload 0  generateReceiver CodeStream codeStream codeStream aload_0
public Type Binding get Other Field Bindings Block Scope scope At this point restrictive Flag may ONLY have two potential value FIELD LOCAL i e cast Variable Binding binding is valid int length tokens length if bits FIELD 0 Field Binding field Binding Field Binding binding if field Binding is Static must check for the static status if index Of First Field Binding 1 accessing to a field using a type as receiver is allowed only with static field scope method Scope is Static the field is the first token of the qualified reference scope problem Reporter static Field Access To Non Static Variable this field Binding return null else indirect static reference if index Of First Field Binding 1 field Binding declaring Class actual Receiver Type scope problem Reporter indirect Access To Static Field this field Binding only last field is actually a write access if any if is Field Use Deprecated field Binding scope this bits Is Strictly AssignedMASK 0 index Of First Field Binding length scope problem Reporter deprecated Field field Binding this Type Binding type Variable Binding binding type int index index Of First Field Binding if index length restrictive Flag FIELD this constant Field Reference get Constant For Field Binding binding this false scope return type allocation of the field Bindings array and its respective constants int other Bindings Length length index other Codegen Bindings other Bindings new Field Binding other Bindings Length other Depths new int other Bindings Length fill the first constant the one of the binding this constant bits FIELD 0 Field Reference get Constant For Field Binding binding this false scope Variable Binding binding constant save first depth since will be updated by visibility checks of other bindings int first Depth bits DepthMASK DepthSHIFT iteration on each field while index length char token tokens index if type null return null could not resolve type prior to this point bits DepthMASK flush previous depth if any Field Binding field scope get Field type token this int place index index Of First Field Binding other Bindings place field other Depths place bits DepthMASK DepthSHIFT if field is Valid Binding only last field is actually a write access if any if is Field Use Deprecated field scope this bits Is Strictly AssignedMASK 0 index 1 length scope problem Reporter deprecated Field field this Constant some Constant Field Reference get Constant For field this false scope constant propagation can only be performed as long as the previous one is a constant too if this constant NotA Constant this constant some Constant if field is Static static field accessed through receiver legal but unoptimal optional warning scope problem Reporter non Static Access To Static Field this field indirect static reference if field declaring Class type scope problem Reporter indirect Access To Static Field this field type field type index else constant NotA Constant don t fill other constants slots scope problem Reporter invalid Field this field index type set Depth first Depth return null set Depth first Depth return other Bindings other Bindings Length 1 type  TypeBinding getOtherFieldBindings BlockScope restrictiveFlag VariableBinding FieldBinding fieldBinding FieldBinding fieldBinding isStatic indexOfFirstFieldBinding methodScope isStatic problemReporter staticFieldAccessToNonStaticVariable fieldBinding indexOfFirstFieldBinding fieldBinding declaringClass actualReceiverType problemReporter indirectAccessToStaticField fieldBinding isFieldUseDeprecated fieldBinding IsStrictlyAssignedMASK indexOfFirstFieldBinding problemReporter deprecatedField fieldBinding TypeBinding VariableBinding indexOfFirstFieldBinding restrictiveFlag FieldReference getConstantFor FieldBinding fieldBindings otherBindingsLength otherCodegenBindings otherBindings FieldBinding otherBindingsLength otherDepths otherBindingsLength FieldReference getConstantFor FieldBinding VariableBinding firstDepth FieldBinding getField indexOfFirstFieldBinding otherBindings otherDepths isValidBinding isFieldUseDeprecated IsStrictlyAssignedMASK problemReporter deprecatedField someConstant FieldReference getConstantFor NotAConstant someConstant isStatic problemReporter nonStaticAccessToStaticField declaringClass problemReporter indirectAccessToStaticField NotAConstant problemReporter invalidField setDepth firstDepth setDepth firstDepth otherBindings otherBindingsLength
public void manage Enclosing Instance Access If Necessary Block Scope current Scope Flow Info flow Info if flow Info is Reachable return If inlinable field forget the access emulation the code gen will directly target it if bits DepthMASK 0 constant NotA Constant return if bits Restrictive FlagMASK LOCAL current Scope emulate Outer Access Local Variable Binding binding  manageEnclosingInstanceAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable NotAConstant RestrictiveFlagMASK currentScope emulateOuterAccess LocalVariableBinding
public void manage Synthetic Read Access If Necessary Block Scope current Scope Field Binding field Binding Type Binding last Receiver Type int index Flow Info flow Info if flow Info is Reachable return index 0 denotes the first field Binding index 0 denotes one of the other Bindings if field Binding constant NotA Constant return if field Binding is Private private access if field Binding declaring Class current Scope enclosing Source Type if synthetic Read Accessors null if other Bindings null synthetic Read Accessors new Synthetic Access Method Binding 1 else synthetic Read Accessors new Synthetic Access Method Binding other Bindings length 1 synthetic Read Accessors index Source Type Binding field Binding declaring Class add Synthetic Method field Binding true current Scope problem Reporter need To Emulate Field Read Access field Binding this return else if field Binding is Protected int depth index 0 bits DepthMASK DepthSHIFT other Depths index 1 implicit protected access only for first one if depth 0 field Binding declaring Class get Package current Scope enclosing Source Type get Package if synthetic Read Accessors null if other Bindings null synthetic Read Accessors new Synthetic Access Method Binding 1 else synthetic Read Accessors new Synthetic Access Method Binding other Bindings length 1 synthetic Read Accessors index Source Type Binding current Scope enclosing Source Type enclosing Type At depth add Synthetic Method field Binding true current Scope problem Reporter need To Emulate Field Read Access field Binding this return if the binding declaring class is not visible need special action for runtime compatibility on 1 2 V Ms change the declaring class of the binding NOTE from target 1 2 on field s declaring class is touched if any different from receiver type if field Binding declaring Class last Receiver Type last Receiver Type is Array Type field Binding declaring Class null field Binding constant NotA Constant current Scope environment options targetJDK Class File Constants JDK1 2 index 0 index Of First Field Binding 1 field Binding is Static field Binding declaring Class id T Object field Binding declaring Class can Be Seen By current Scope if index 0 this codegen Binding current Scope enclosing Source Type get Updated Field Binding field Binding Reference Binding last Receiver Type else if this other Codegen Bindings this other Bindings int l this other Bindings length System arraycopy this other Bindings 0 this other Codegen Bindings new Field Binding l 0 l this other Codegen Bindings index 1 current Scope enclosing Source Type get Updated Field Binding field Binding Reference Binding last Receiver Type  manageSyntheticReadAccessIfNecessary BlockScope currentScope FieldBinding fieldBinding TypeBinding lastReceiverType FlowInfo flowInfo flowInfo isReachable fieldBinding otherBindings fieldBinding NotAConstant fieldBinding isPrivate fieldBinding declaringClass currentScope enclosingSourceType syntheticReadAccessors otherBindings syntheticReadAccessors SyntheticAccessMethodBinding syntheticReadAccessors SyntheticAccessMethodBinding otherBindings syntheticReadAccessors SourceTypeBinding fieldBinding declaringClass addSyntheticMethod fieldBinding currentScope problemReporter needToEmulateFieldReadAccess fieldBinding fieldBinding isProtected otherDepths fieldBinding declaringClass getPackage currentScope enclosingSourceType getPackage syntheticReadAccessors otherBindings syntheticReadAccessors SyntheticAccessMethodBinding syntheticReadAccessors SyntheticAccessMethodBinding otherBindings syntheticReadAccessors SourceTypeBinding currentScope enclosingSourceType enclosingTypeAt addSyntheticMethod fieldBinding currentScope problemReporter needToEmulateFieldReadAccess fieldBinding VMs fieldBinding declaringClass lastReceiverType lastReceiverType isArrayType fieldBinding declaringClass fieldBinding NotAConstant currentScope ClassFileConstants JDK1_2 indexOfFirstFieldBinding fieldBinding isStatic fieldBinding declaringClass T_Object fieldBinding declaringClass canBeSeenBy currentScope codegenBinding currentScope enclosingSourceType getUpdatedFieldBinding fieldBinding ReferenceBinding lastReceiverType otherCodegenBindings otherBindings otherBindings otherBindings otherCodegenBindings FieldBinding otherCodegenBindings currentScope enclosingSourceType getUpdatedFieldBinding fieldBinding ReferenceBinding lastReceiverType
public void manage Synthetic Write Access If Necessary Block Scope current Scope Field Binding field Binding Type Binding last Receiver Type Flow Info flow Info if flow Info is Reachable return if field Binding is Private if field Binding declaring Class current Scope enclosing Source Type synthetic Write Accessor Source Type Binding field Binding declaring Class add Synthetic Method field Binding false current Scope problem Reporter need To Emulate Field Write Access field Binding this return else if field Binding is Protected int depth field Binding binding bits DepthMASK DepthSHIFT other Depths other Depths length 1 if depth 0 field Binding declaring Class get Package current Scope enclosing Source Type get Package synthetic Write Accessor Source Type Binding current Scope enclosing Source Type enclosing Type At depth add Synthetic Method field Binding false current Scope problem Reporter need To Emulate Field Write Access field Binding this return if the binding declaring class is not visible need special action for runtime compatibility on 1 2 V Ms change the declaring class of the binding NOTE from target 1 2 on field s declaring class is touched if any different from receiver type if field Binding declaring Class last Receiver Type last Receiver Type is Array Type field Binding declaring Class null field Binding constant NotA Constant current Scope environment options targetJDK Class File Constants JDK1 2 field Binding binding index Of First Field Binding 1 field Binding is Static field Binding declaring Class id T Object field Binding declaring Class can Be Seen By current Scope if field Binding binding this codegen Binding current Scope enclosing Source Type get Updated Field Binding field Binding Reference Binding last Receiver Type else if this other Codegen Bindings this other Bindings int l this other Bindings length System arraycopy this other Bindings 0 this other Codegen Bindings new Field Binding l 0 l this other Codegen Bindings this other Codegen Bindings length 1 current Scope enclosing Source Type get Updated Field Binding field Binding Reference Binding last Receiver Type  manageSyntheticWriteAccessIfNecessary BlockScope currentScope FieldBinding fieldBinding TypeBinding lastReceiverType FlowInfo flowInfo flowInfo isReachable fieldBinding isPrivate fieldBinding declaringClass currentScope enclosingSourceType syntheticWriteAccessor SourceTypeBinding fieldBinding declaringClass addSyntheticMethod fieldBinding currentScope problemReporter needToEmulateFieldWriteAccess fieldBinding fieldBinding isProtected fieldBinding otherDepths otherDepths fieldBinding declaringClass getPackage currentScope enclosingSourceType getPackage syntheticWriteAccessor SourceTypeBinding currentScope enclosingSourceType enclosingTypeAt addSyntheticMethod fieldBinding currentScope problemReporter needToEmulateFieldWriteAccess fieldBinding VMs fieldBinding declaringClass lastReceiverType lastReceiverType isArrayType fieldBinding declaringClass fieldBinding NotAConstant currentScope ClassFileConstants JDK1_2 fieldBinding indexOfFirstFieldBinding fieldBinding isStatic fieldBinding declaringClass T_Object fieldBinding declaringClass canBeSeenBy currentScope fieldBinding codegenBinding currentScope enclosingSourceType getUpdatedFieldBinding fieldBinding ReferenceBinding lastReceiverType otherCodegenBindings otherBindings otherBindings otherBindings otherCodegenBindings FieldBinding otherCodegenBindings otherCodegenBindings currentScope enclosingSourceType getUpdatedFieldBinding fieldBinding ReferenceBinding lastReceiverType
public String Buffer print Expression int indent String Buffer output for int i 0 i tokens length i if i 0 output append output append tokens i return output  StringBuffer printExpression StringBuffer
Normal field binding did not work try to bind to a field of the delegate receiver public Type Binding report Error Block Scope scope if binding instanceof Problem Field Binding scope problem Reporter invalid Field this Field Binding binding else if binding instanceof Problem Reference Binding scope problem Reporter invalid Type this Type Binding binding else scope problem Reporter unresolvable Reference this binding return null  TypeBinding reportError BlockScope ProblemFieldBinding problemReporter invalidField FieldBinding ProblemReferenceBinding problemReporter invalidType TypeBinding problemReporter unresolvableReference
public Type Binding resolve Type Block Scope scope field and or local are done before type lookups the only available value for the restrictive Flag BEFORE the TC is Flag Type Flag LocalField and Flag TypeLocalField this actual Receiver Type this receiver Type scope enclosing Source Type constant Constant NotA Constant if this codegen Binding this binding scope get Binding tokens bits Restrictive FlagMASK this true resolve is Valid Binding switch bits Restrictive FlagMASK case VARIABLE only variable case TYPE VARIABLE if binding instanceof Local Variable Binding if Local Variable Binding binding is Final bits DepthMASK 0 scope problem Reporter cannot Refer To Non Final Outer Local Local Variable Binding binding this bits Restrictive FlagMASK clear bits bits LOCAL return this resolved Type get Other Field Bindings scope if binding instanceof Field Binding check for forward references Field Binding field Binding Field Binding binding Method Scope method Scope scope method Scope if method Scope enclosing Source Type field Binding declaring Class method Scope last Visible FieldID 0 field Binding id method Scope last Visible FieldID if field Binding is Static method Scope is Static this index Of First Field Binding 1 scope problem Reporter forward Reference this 0 scope enclosing Source Type if field Binding is Static this index Of First Field Binding 1 scope environment options get Severity Compiler Options Unqualified Field Access Problem Severities Ignore scope problem Reporter unqualified Field Access this field Binding bits Restrictive FlagMASK clear bits bits FIELD check for deprecated receiver type deprecation check for receiver type if not first token if index Of First Field Binding 1 if is Type Use Deprecated this actual Receiver Type scope scope problem Reporter deprecated Type this actual Receiver Type this return this resolved Type get Other Field Bindings scope thus it was a type bits Restrictive FlagMASK clear bits bits TYPE case TYPE only type if is Type Use Deprecated Type Binding binding scope scope problem Reporter deprecated Type Type Binding binding this return this resolved Type Type Binding binding error cases return this resolved Type this report Error scope  TypeBinding resolveType BlockScope restrictiveFlag Flag_Type Flag_LocalField Flag_TypeLocalField actualReceiverType receiverType enclosingSourceType NotAConstant codegenBinding getBinding RestrictiveFlagMASK isValidBinding RestrictiveFlagMASK LocalVariableBinding LocalVariableBinding isFinal problemReporter cannotReferToNonFinalOuterLocal LocalVariableBinding RestrictiveFlagMASK resolvedType getOtherFieldBindings FieldBinding FieldBinding fieldBinding FieldBinding MethodScope methodScope methodScope methodScope enclosingSourceType fieldBinding declaringClass methodScope lastVisibleFieldID fieldBinding methodScope lastVisibleFieldID fieldBinding isStatic methodScope isStatic indexOfFirstFieldBinding problemReporter forwardReference enclosingSourceType fieldBinding isStatic indexOfFirstFieldBinding getSeverity CompilerOptions UnqualifiedFieldAccess ProblemSeverities problemReporter unqualifiedFieldAccess fieldBinding RestrictiveFlagMASK indexOfFirstFieldBinding isTypeUseDeprecated actualReceiverType problemReporter deprecatedType actualReceiverType resolvedType getOtherFieldBindings RestrictiveFlagMASK isTypeUseDeprecated TypeBinding problemReporter deprecatedType TypeBinding resolvedType TypeBinding resolvedType reportError
public void set Field Index int index this index Of First Field Binding index  setFieldIndex indexOfFirstFieldBinding
public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor BlockScope endVisit
visitor end Visit this scope public String unbound Reference Error Name return new String tokens 0  endVisit unboundReferenceErrorName

public class Qualified Super Reference extends Qualified This Reference public Qualified Super Reference Type Reference name int pos int source End super name pos source End  QualifiedSuperReference QualifiedThisReference QualifiedSuperReference TypeReference sourceEnd sourceEnd
public boolean is Super return true  isSuper
public boolean is This return false  isThis
public String Buffer print Expression int indent String Buffer output return qualification print 0 output append super NON NLS 1  StringBuffer printExpression StringBuffer
public Type Binding resolve Type Block Scope scope if this bits ParenthesizedMASK 0 scope problem Reporter invalid Parenthesized Expression this return null super resolve Type scope if current Compatible Type null return null error case if current Compatible Type id T Object scope problem Reporter cannot Use Super In Java Lang Object this return null return this resolved Type current Compatible Type superclass  TypeBinding resolveType BlockScope problemReporter invalidParenthesizedExpression resolveType currentCompatibleType currentCompatibleType T_Object problemReporter cannotUseSuperInJavaLangObject resolvedType currentCompatibleType
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope qualification traverse visitor block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope blockScope endVisit blockScope

public Qualified This Reference Type Reference name int source Start int source End super source Start source End qualification name this source Start name source Start  QualifiedThisReference TypeReference sourceStart sourceEnd sourceStart sourceEnd sourceStart sourceStart
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo flowInfo
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info boolean value Required return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo valueRequired flowInfo
Code generation for Qualified This Reference param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if value Required if bits DepthMASK 0 Object emulation Path current Scope get Emulation Path this current Compatible Type true only exact match false consider enclosing arg code Stream generate Outer Access emulation Path this this current Compatible Type current Scope else nothing particular after all code Stream aload 0 code Stream record Positions From pc this source Start  QualifiedThisReference currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream valueRequired emulationPath currentScope getEmulationPath currentCompatibleType codeStream generateOuterAccess emulationPath currentCompatibleType currentScope codeStream aload_0 codeStream recordPositionsFrom sourceStart
public Type Binding resolve Type Block Scope scope constant NotA Constant this resolved Type this qualification resolve Type scope if this resolved Type null return null the qualification MUST exactly match some enclosing type name Its possible to qualify this by the name of the current class int depth 0 this current Compatible Type scope reference Type binding while this current Compatible Type null this current Compatible Type this resolved Type depth this current Compatible Type this current Compatible Type is Static null this current Compatible Type enclosing Type bits DepthMASK flush previous depth if any bits depth 0xFF DepthSHIFT encoded depth into 8 bits if this current Compatible Type null scope problem Reporter no Such Enclosing Instance this resolved Type this false return this resolved Type Ensure one cannot write code like B super B this if depth 0 check Access scope method Scope if depth 0 path emulation will diagnose bad scenarii return this resolved Type  TypeBinding resolveType BlockScope NotAConstant resolvedType resolveType resolvedType currentCompatibleType referenceType currentCompatibleType currentCompatibleType resolvedType currentCompatibleType currentCompatibleType isStatic currentCompatibleType enclosingType currentCompatibleType problemReporter noSuchEnclosingInstance resolvedType resolvedType checkAccess methodScope resolvedType
public String Buffer print Expression int indent String Buffer output return qualification print 0 output append this NON NLS 1  StringBuffer printExpression StringBuffer
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope qualification traverse visitor block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope blockScope endVisit blockScope

public Qualified Type Reference char sources long poss tokens sources source Positions poss source Start int source Positions 0 32 source End int source Positions source Positions length 1 0x00000000FFFFFFFFL  QualifiedTypeReference sourcePositions sourceStart sourcePositions sourceEnd sourcePositions sourcePositions
public Qualified Type Reference char sources Type Binding type long poss this sources poss this resolved Type type  QualifiedTypeReference TypeBinding resolvedType
public Type Reference copy Dims int dim return a type reference copy of me with some dimensions warning the new type ref has a null binding return new Array Qualified Type Reference tokens null dim source Positions  TypeReference copyDims ArrayQualifiedTypeReference sourcePositions
public Type Binding get Type Binding Scope scope if this resolved Type null return this resolved Type return scope get Type tokens  TypeBinding getTypeBinding resolvedType resolvedType getType
public char get Type Name return tokens  getTypeName
public String Buffer print Expression int indent String Buffer output for int i 0 i tokens length i if i 0 output append output append tokens i return output  StringBuffer printExpression StringBuffer
public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor BlockScope endVisit
public void traverse AST Visitor visitor Class Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor ClassScope endVisit

public abstract class Reference extends Expression Base Level Reference constructor comment public Reference super  BaseLevelReference
super public abstract Flow Info analyse Assignment Block Scope current Scope Flow Context flow Context Flow Info flow Info Assignment assignment boolean is Compound  FlowInfo analyseAssignment BlockScope currentScope FlowContext flowContext FlowInfo flowInfo isCompound
public abstract Flow Info analyse Assignment Block Scope current Scope Flow Context flow Context Flow Info flow Info Assignment assignment boolean is Compound public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info return flow Info  FlowInfo analyseAssignment BlockScope currentScope FlowContext flowContext FlowInfo flowInfo isCompound FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo flowInfo
public Field Binding field Binding this method should be sent one FIELD tagged references ref bits Binding Ids FIELD 0 return null  FieldBinding fieldBinding BindingIds
public void field Store Code Stream code Stream Field Binding field Binding Method Binding synthetic Write Accessor boolean value Required if field Binding is Static if value Required if field Binding type Long Binding field Binding type Double Binding code Stream dup2 else code Stream dup if synthetic Write Accessor null code Stream putstatic field Binding else code Stream invokestatic synthetic Write Accessor else Stack owner new field value new field value owner new field value if value Required if field Binding type Long Binding field Binding type Double Binding code Stream dup2 x1 else code Stream dup x1 if synthetic Write Accessor null code Stream putfield field Binding else code Stream invokestatic synthetic Write Accessor  fieldStore CodeStream codeStream FieldBinding fieldBinding MethodBinding syntheticWriteAccessor valueRequired fieldBinding isStatic valueRequired fieldBinding LongBinding fieldBinding DoubleBinding codeStream codeStream syntheticWriteAccessor codeStream fieldBinding codeStream syntheticWriteAccessor valueRequired fieldBinding LongBinding fieldBinding DoubleBinding codeStream dup2_x1 codeStream dup_x1 syntheticWriteAccessor codeStream fieldBinding codeStream syntheticWriteAccessor
public abstract void generate Assignment Block Scope current Scope Code Stream code Stream Assignment assignment boolean value Required  generateAssignment BlockScope currentScope CodeStream codeStream valueRequired
public abstract void generate Assignment Block Scope current Scope Code Stream code Stream Assignment assignment boolean value Required public abstract void generate Compound Assignment Block Scope current Scope Code Stream code Stream Expression expression int operator int assignment Implicit Conversion boolean value Required  generateAssignment BlockScope currentScope CodeStream codeStream valueRequired generateCompoundAssignment BlockScope currentScope CodeStream codeStream assignmentImplicitConversion valueRequired
public abstract void generate Compound Assignment Block Scope current Scope Code Stream code Stream Expression expression int operator int assignment Implicit Conversion boolean value Required public abstract void generate Post Increment Block Scope current Scope Code Stream code Stream Compound Assignment post Increment boolean value Required  generateCompoundAssignment BlockScope currentScope CodeStream codeStream assignmentImplicitConversion valueRequired generatePostIncrement BlockScope currentScope CodeStream codeStream CompoundAssignment postIncrement valueRequired

public Return Statement Expression expr int s int e source Start s source End e expression expr  ReturnStatement sourceStart sourceEnd
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info here requires to generate a sequence of finally blocks invocations depending corresponding to each of the traversed try statements so that execution will terminate properly lookup the label this should answer the return Context if expression null flow Info expression analyse Code current Scope flow Context flow Info compute the return sequence running the finally blocks Flow Context traversed Context flow Context int sub Index 0 max Sub 5 boolean save Value Needed false boolean has Value To Save expression null expression constant NotA Constant do Sub Routine Statement sub if sub traversed Context sub Routine null if this subroutines null this subroutines new Sub Routine Statement max Sub if sub Index max Sub System arraycopy this subroutines 0 this subroutines new Sub Routine Statement max Sub 2 0 sub Index grow this subroutines sub Index sub if sub is Sub Routine Escaping save Value Needed false is Any Sub Routine Escaping true break traversed Context record Return From flow Info unconditional Inits AST Node node if node traversed Context associated Node instanceof Synchronized Statement is Synchronized true else if node instanceof Try Statement Try Statement try Statement Try Statement node flow Info add Initializations From try Statement sub Routine Inits collect inits if has Value To Save if this save Value Variable null closest subroutine secret variable is used prepare Save Value Location try Statement save Value Needed true else if traversed Context instanceof Initialization Flow Context current Scope problem Reporter cannot Return In Initializer this return Flow Info DEAD END while traversed Context traversed Context parent null resize subroutines if subroutines null sub Index max Sub System arraycopy subroutines 0 subroutines new Sub Routine Statement sub Index 0 sub Index secret local variable for return value note that this can only occur in a real method if save Value Needed if this save Value Variable null this save Value Variable use Flag Local Variable Binding USED else this save Value Variable null if is Synchronized expression Type Boolean Binding this expression bits Value For ReturnMASK return Flow Info DEAD END  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo returnContext flowInfo analyseCode currentScope flowContext flowInfo FlowContext traversedContext flowContext subIndex maxSub saveValueNeeded hasValueToSave NotAConstant SubRoutineStatement traversedContext subRoutine SubRoutineStatement maxSub subIndex maxSub SubRoutineStatement maxSub subIndex subIndex isSubRoutineEscaping saveValueNeeded isAnySubRoutineEscaping traversedContext recordReturnFrom flowInfo unconditionalInits ASTNode traversedContext associatedNode SynchronizedStatement isSynchronized TryStatement TryStatement tryStatement TryStatement flowInfo addInitializationsFrom tryStatement subRoutineInits hasValueToSave saveValueVariable prepareSaveValueLocation tryStatement saveValueNeeded traversedContext InitializationFlowContext currentScope problemReporter cannotReturnInInitializer FlowInfo DEAD_END traversedContext traversedContext subIndex maxSub SubRoutineStatement subIndex subIndex saveValueNeeded saveValueVariable saveValueVariable useFlag LocalVariableBinding saveValueVariable isSynchronized expressionType BooleanBinding ValueForReturnMASK FlowInfo DEAD_END
Retrun statement code generation generate the finally Invocation Sequence param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream public void generate Code Block Scope current Scope Code Stream code Stream if bits Is ReachableMASK 0 return int pc code Stream position generate the expression if expression null expression constant NotA Constant expression generate Code current Scope code Stream need Value no value needed if non returning subroutine generate Store Save Value If Necessary code Stream generation of code responsible for invoking the finally blocks in sequence if subroutines null for int i 0 max subroutines length i max i Sub Routine Statement sub subroutines i sub generate Sub Routine Invocation current Scope code Stream if sub is Sub Routine Escaping code Stream record Positions From pc this source Start Sub Routine Statement reenter Exception Handlers subroutines i code Stream return sub exit Any Exception Handler if save Value Variable null code Stream load save Value Variable if expression null expression constant NotA Constant code Stream generate Constant expression constant expression implicit Conversion generate Store Save Value If Necessary code Stream output the suitable return bytecode or wrap the value inside a descriptor for doits this generate Return Bytecode code Stream code Stream record Positions From pc this source Start Sub Routine Statement reenter Exception Handlers subroutines 1 code Stream  finallyInvocationSequence currentScope BlockScope codeStream CodeStream generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK codeStream NotAConstant generateCode currentScope codeStream needValue generateStoreSaveValueIfNecessary codeStream SubRoutineStatement generateSubRoutineInvocation currentScope codeStream isSubRoutineEscaping codeStream recordPositionsFrom sourceStart SubRoutineStatement reenterExceptionHandlers codeStream exitAnyExceptionHandler saveValueVariable codeStream saveValueVariable NotAConstant codeStream generateConstant implicitConversion generateStoreSaveValueIfNecessary codeStream generateReturnBytecode codeStream codeStream recordPositionsFrom sourceStart SubRoutineStatement reenterExceptionHandlers codeStream
Dump the suitable return bytecode for a return statement public void generate Return Bytecode Code Stream code Stream if expression null code Stream return  else switch expression implicit Conversion 4 case T boolean case T int code Stream ireturn break case T float code Stream freturn break case T long code Stream lreturn break case T double code Stream dreturn break default code Stream areturn  generateReturnBytecode CodeStream codeStream codeStream return_ implicitConversion T_boolean T_int codeStream T_float codeStream T_long codeStream T_double codeStream codeStream
public void generate Store Save Value If Necessary Code Stream code Stream if save Value Variable null code Stream store save Value Variable false  generateStoreSaveValueIfNecessary CodeStream codeStream saveValueVariable codeStream saveValueVariable
if save Value Variable null code Stream store save Value Variable false public boolean need Value return subroutines null save Value Variable null is Synchronized  saveValueVariable codeStream saveValueVariable needValue saveValueVariable isSynchronized
return subroutines null save Value Variable null is Synchronized public void prepare Save Value Location Try Statement target Try Statement this save Value Variable target Try Statement secret Return Value  saveValueVariable isSynchronized prepareSaveValueLocation TryStatement targetTryStatement saveValueVariable targetTryStatement secretReturnValue
public String Buffer print Statement int tab String Buffer output print Indent tab output append return NON NLS 1 if expression null expression print Expression 0 output return output append  StringBuffer printStatement StringBuffer printIndent printExpression
public void resolve Block Scope scope Method Scope method Scope scope method Scope Method Binding method Binding Type Binding method Type method Scope reference Context instanceof Abstract Method Declaration method Binding Abstract Method Declaration method Scope reference Context binding null null method Binding return Type Void Binding if method Type Void Binding the expression should be null if expression null return if expression Type expression resolve Type scope null scope problem Reporter attempt To Return Non Void Expression this expression Type return if expression null if method Type null scope problem Reporter should Return method Type this return if expression Type expression resolve Type scope null return if method Type null expression is Constant Value Of Type Assignable To Type expression Type method Type dealing with constant expression implicit Widening method Type expression Type return if expression Type Void Binding scope problem Reporter attempt To Return Void Value this return if method Type null expression Type is Compatible With method Type expression implicit Widening method Type expression Type return if method Type null scope problem Reporter type Mismatch Error Actual Type Expected Type expression expression Type method Type  BlockScope MethodScope methodScope methodScope MethodBinding methodBinding TypeBinding methodType methodScope referenceContext AbstractMethodDeclaration methodBinding AbstractMethodDeclaration methodScope referenceContext methodBinding returnType VoidBinding methodType VoidBinding expressionType resolveType problemReporter attemptToReturnNonVoidExpression expressionType methodType problemReporter shouldReturn methodType expressionType resolveType methodType isConstantValueOfTypeAssignableToType expressionType methodType implicitWidening methodType expressionType expressionType VoidBinding problemReporter attemptToReturnVoidValue methodType expressionType isCompatibleWith methodType implicitWidening methodType expressionType methodType problemReporter typeMismatchErrorActualTypeExpectedType expressionType methodType
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope if expression null expression traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

public Single Name Reference char source long pos super token source source Start int pos 32 source End int pos  SingleNameReference sourceStart sourceEnd
public Flow Info analyse Assignment Block Scope current Scope Flow Context flow Context Flow Info flow Info Assignment assignment boolean is Compound boolean is Reachable flow Info is Reachable compound assignment extra work if is Compound check the variable part is initialized if blank final switch bits Restrictive FlagMASK case FIELD reading a field Field Binding field Binding if field Binding Field Binding binding is Blank Final current Scope allow Blank Final Field Assignment field Binding if flow Info is Definitely Assigned field Binding current Scope problem Reporter uninitialized Blank Final Field field Binding this manage Synthetic Read Access If Necessary current Scope flow Info break case LOCAL reading a local variable check if assigning a final blank field Local Variable Binding local Binding if flow Info is Definitely Assigned local Binding Local Variable Binding binding current Scope problem Reporter uninitialized Local Variable local Binding this we could improve error msg here telling cannot use compound assignment on final local variable if is Reachable local Binding use Flag Local Variable Binding USED else if local Binding use Flag Local Variable Binding UNUSED local Binding use Flag Local Variable Binding FAKE USED if assignment expression null flow Info assignment expression analyse Code current Scope flow Context flow Info unconditional Inits switch bits Restrictive FlagMASK case FIELD assigning to a field manage Synthetic Write Access If Necessary current Scope flow Info check if assigning a final field Field Binding field Binding if field Binding Field Binding binding is Final inside a context where allowed if is Compound field Binding is Blank Final current Scope allow Blank Final Field Assignment field Binding if flow Info is Potentially Assigned field Binding current Scope problem Reporter duplicate Initialization Of Blank Final Field field Binding this else flow Context record Setting Final field Binding this flow Info flow Info mark As Definitely Assigned field Binding else current Scope problem Reporter cannot Assign To Final Field field Binding this break case LOCAL assigning to a local variable Local Variable Binding local Binding Local Variable Binding binding if flow Info is Definitely Assigned local Binding for local variable debug attributes bits First Assignment To LocalMASK else bits First Assignment To LocalMASK if local Binding is Final if bits DepthMASK 0 tolerate assignment to final local in unreachable code 45674 if is Reachable is Compound local Binding is Blank Final current Scope problem Reporter cannot Assign To Final Local local Binding this else if flow Info is Potentially Assigned local Binding current Scope problem Reporter duplicate Initialization Of Final Local local Binding this else flow Context record Setting Final local Binding this flow Info else current Scope problem Reporter cannot Assign To Final Outer Local local Binding this flow Info mark As Definitely Assigned local Binding manage Enclosing Instance Access If Necessary current Scope flow Info return flow Info  FlowInfo analyseAssignment BlockScope currentScope FlowContext flowContext FlowInfo flowInfo isCompound isReachable flowInfo isReachable isCompound RestrictiveFlagMASK FieldBinding fieldBinding fieldBinding FieldBinding isBlankFinal currentScope allowBlankFinalFieldAssignment fieldBinding flowInfo isDefinitelyAssigned fieldBinding currentScope problemReporter uninitializedBlankFinalField fieldBinding manageSyntheticReadAccessIfNecessary currentScope flowInfo LocalVariableBinding localBinding flowInfo isDefinitelyAssigned localBinding LocalVariableBinding currentScope problemReporter uninitializedLocalVariable localBinding isReachable localBinding useFlag LocalVariableBinding localBinding useFlag LocalVariableBinding localBinding useFlag LocalVariableBinding FAKE_USED flowInfo analyseCode currentScope flowContext flowInfo unconditionalInits RestrictiveFlagMASK manageSyntheticWriteAccessIfNecessary currentScope flowInfo FieldBinding fieldBinding fieldBinding FieldBinding isFinal isCompound fieldBinding isBlankFinal currentScope allowBlankFinalFieldAssignment fieldBinding flowInfo isPotentiallyAssigned fieldBinding currentScope problemReporter duplicateInitializationOfBlankFinalField fieldBinding flowContext recordSettingFinal fieldBinding flowInfo flowInfo markAsDefinitelyAssigned fieldBinding currentScope problemReporter cannotAssignToFinalField fieldBinding LocalVariableBinding localBinding LocalVariableBinding flowInfo isDefinitelyAssigned localBinding FirstAssignmentToLocalMASK FirstAssignmentToLocalMASK localBinding isFinal isReachable isCompound localBinding isBlankFinal currentScope problemReporter cannotAssignToFinalLocal localBinding flowInfo isPotentiallyAssigned localBinding currentScope problemReporter duplicateInitializationOfFinalLocal localBinding flowContext recordSettingFinal localBinding flowInfo currentScope problemReporter cannotAssignToFinalOuterLocal localBinding flowInfo markAsDefinitelyAssigned localBinding manageEnclosingInstanceAccessIfNecessary currentScope flowInfo flowInfo
return flow Info public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info return analyse Code current Scope flow Context flow Info true  flowInfo FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo analyseCode currentScope flowContext flowInfo
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info boolean value Required switch bits Restrictive FlagMASK case FIELD reading a field if value Required manage Synthetic Read Access If Necessary current Scope flow Info check if reading a final blank field Field Binding field Binding if field Binding Field Binding binding is Blank Final current Scope allow Blank Final Field Assignment field Binding if flow Info is Definitely Assigned field Binding current Scope problem Reporter uninitialized Blank Final Field field Binding this break case LOCAL reading a local variable Local Variable Binding local Binding if flow Info is Definitely Assigned local Binding Local Variable Binding binding current Scope problem Reporter uninitialized Local Variable local Binding this if flow Info is Reachable local Binding use Flag Local Variable Binding USED else if local Binding use Flag Local Variable Binding UNUSED local Binding use Flag Local Variable Binding FAKE USED if value Required manage Enclosing Instance Access If Necessary current Scope flow Info return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo valueRequired RestrictiveFlagMASK valueRequired manageSyntheticReadAccessIfNecessary currentScope flowInfo FieldBinding fieldBinding fieldBinding FieldBinding isBlankFinal currentScope allowBlankFinalFieldAssignment fieldBinding flowInfo isDefinitelyAssigned fieldBinding currentScope problemReporter uninitializedBlankFinalField fieldBinding LocalVariableBinding localBinding flowInfo isDefinitelyAssigned localBinding LocalVariableBinding currentScope problemReporter uninitializedLocalVariable localBinding flowInfo isReachable localBinding useFlag LocalVariableBinding localBinding useFlag LocalVariableBinding localBinding useFlag LocalVariableBinding FAKE_USED valueRequired manageEnclosingInstanceAccessIfNecessary currentScope flowInfo flowInfo
public Type Binding check Field Access Block Scope scope Field Binding field Binding Field Binding binding bits Restrictive FlagMASK clear bits bits FIELD if Field Binding binding is Static must check for the static status if scope method Scope is Static scope problem Reporter static Field Access To Non Static Variable this field Binding constant NotA Constant return field Binding type constant Field Reference get Constant For field Binding this true scope if is Field Use Deprecated field Binding scope this bits Is Strictly AssignedMASK 0 scope problem Reporter deprecated Field field Binding this Method Scope ms scope method Scope if this bits Is Strictly AssignedMASK 0 ms enclosing Source Type field Binding declaring Class ms last Visible FieldID 0 field Binding id ms last Visible FieldID if the field is static and ms is not then it is valid if field Binding is Static ms is Static scope problem Reporter forward Reference this 0 scope enclosing Source Type return field Binding type  TypeBinding checkFieldAccess BlockScope FieldBinding fieldBinding FieldBinding RestrictiveFlagMASK FieldBinding isStatic methodScope isStatic problemReporter staticFieldAccessToNonStaticVariable fieldBinding NotAConstant fieldBinding FieldReference getConstantFor fieldBinding isFieldUseDeprecated fieldBinding IsStrictlyAssignedMASK problemReporter deprecatedField fieldBinding MethodScope methodScope IsStrictlyAssignedMASK enclosingSourceType fieldBinding declaringClass lastVisibleFieldID fieldBinding lastVisibleFieldID fieldBinding isStatic isStatic problemReporter forwardReference enclosingSourceType fieldBinding
public void generate Assignment Block Scope current Scope Code Stream code Stream Assignment assignment boolean value Required optimizing assignment like i i 1 or i 1 i if assignment expression is Compactable Operation Binary Expression operation Binary Expression assignment expression Single Name Reference variable Reference if operation left instanceof Single Name Reference variable Reference Single Name Reference operation left binding binding i i value then use the variable on the right hand side since it has the correct implicit conversion variable Reference generate Compound Assignment current Scope code Stream synthetic Accessors null null synthetic Accessors WRITE operation right operation bits OperatorMASK OperatorSHIFT operation left implicit Conversion should be equivalent to no conversion value Required return int operator operation bits OperatorMASK OperatorSHIFT if operation right instanceof Single Name Reference operator PLUS operator MULTIPLY only commutative operations variable Reference Single Name Reference operation right binding binding operation left constant NotA Constant exclude non constant expressions since could have side effect operation left implicit Conversion 4 T String exclude string concatenation which would occur backwards operation right implicit Conversion 4 T String exclude string concatenation which would occur backwards i value i then use the variable on the right hand side since it has the correct implicit conversion variable Reference generate Compound Assignment current Scope code Stream synthetic Accessors null null synthetic Accessors WRITE operation left operator operation right implicit Conversion should be equivalent to no conversion value Required return switch bits Restrictive FlagMASK case FIELD assigning to a field Field Binding field Binding if field Binding Field Binding this codegen Binding is Static need a receiver if bits DepthMASK 0 Reference Binding target Type current Scope enclosing Source Type enclosing Type At bits DepthMASK DepthSHIFT Object emulation Path current Scope get Emulation Path target Type true only exact match false consider enclosing arg code Stream generate Outer Access emulation Path this target Type current Scope else this generate Receiver code Stream assignment expression generate Code current Scope code Stream true field Store code Stream field Binding synthetic Accessors null null synthetic Accessors WRITE value Required if value Required code Stream generate Implicit Conversion assignment implicit Conversion return case LOCAL assigning to a local variable Local Variable Binding local Binding Local Variable Binding this codegen Binding if local Binding resolved Position 1 assignment expression generate Code current Scope code Stream true else if assignment expression constant NotA Constant assigning an unused local to a constant value no actual assignment is necessary if value Required code Stream generate Constant assignment expression constant assignment implicit Conversion else assignment expression generate Code current Scope code Stream true Even though the value may not be required we force it to be produced and discard it later on if it was actually not necessary so as to provide the same behavior as JDK1 2beta3 if value Required code Stream generate Implicit Conversion assignment implicit Conversion implicit conversion else if local Binding type Long Binding local Binding type Double Binding code Stream pop2 else code Stream pop return 26903 need extra cast to store null in array local var if local Binding type is Array Type assignment expression resolved Type Null Binding array Loc null assignment expression instanceof Cast Expression array Loc type null Cast Expression assignment expression innermost Casted Expression resolved Type Null Binding code Stream checkcast local Binding type normal local assignment since cannot store in outer local which are final locations code Stream store local Binding value Required if bits First Assignment To LocalMASK 0 for local variable debug attributes local Binding record Initialization StartPC code Stream position implicit conversion if value Required code Stream generate Implicit Conversion assignment implicit Conversion  generateAssignment BlockScope currentScope CodeStream codeStream valueRequired isCompactableOperation BinaryExpression BinaryExpression SingleNameReference variableReference SingleNameReference variableReference SingleNameReference variableReference generateCompoundAssignment currentScope codeStream syntheticAccessors syntheticAccessors implicitConversion valueRequired SingleNameReference variableReference SingleNameReference NotAConstant implicitConversion T_String implicitConversion T_String variableReference generateCompoundAssignment currentScope codeStream syntheticAccessors syntheticAccessors implicitConversion valueRequired RestrictiveFlagMASK FieldBinding fieldBinding fieldBinding FieldBinding codegenBinding isStatic ReferenceBinding targetType currentScope enclosingSourceType enclosingTypeAt emulationPath currentScope getEmulationPath targetType codeStream generateOuterAccess emulationPath targetType currentScope generateReceiver codeStream generateCode currentScope codeStream fieldStore codeStream fieldBinding syntheticAccessors syntheticAccessors valueRequired valueRequired codeStream generateImplicitConversion implicitConversion LocalVariableBinding localBinding LocalVariableBinding codegenBinding localBinding resolvedPosition generateCode currentScope codeStream NotAConstant valueRequired codeStream generateConstant implicitConversion generateCode currentScope codeStream valueRequired codeStream generateImplicitConversion implicitConversion localBinding LongBinding localBinding DoubleBinding codeStream codeStream localBinding isArrayType resolvedType NullBinding arrayLoc CastExpression arrayLoc CastExpression innermostCastedExpression resolvedType NullBinding codeStream localBinding codeStream localBinding valueRequired FirstAssignmentToLocalMASK localBinding recordInitializationStartPC codeStream valueRequired codeStream generateImplicitConversion implicitConversion
public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if constant NotA Constant if value Required code Stream generate Constant constant implicit Conversion else switch bits Restrictive FlagMASK case FIELD reading a field Field Binding field Binding if value Required if field Binding Field Binding this codegen Binding constant NotA Constant directly use inlined value for constant fields boolean is Static if is Static field Binding is Static if bits DepthMASK 0 Reference Binding target Type current Scope enclosing Source Type enclosing Type At bits DepthMASK DepthSHIFT Object emulation Path current Scope get Emulation Path target Type true only exact match false consider enclosing arg code Stream generate Outer Access emulation Path this target Type current Scope else generate Receiver code Stream managing private access if synthetic Accessors null synthetic Accessors READ null if is Static code Stream getstatic field Binding else code Stream getfield field Binding else code Stream invokestatic synthetic Accessors READ code Stream generate Implicit Conversion implicit Conversion else directly use the inlined value code Stream generate Constant field Binding constant implicit Conversion break case LOCAL reading a local Local Variable Binding local Binding Local Variable Binding this codegen Binding if value Required outer local if bits DepthMASK 0 outer local can be reached either through a synthetic arg or a synthetic field Variable Binding path current Scope get Emulation Path local Binding code Stream generate Outer Access path this local Binding current Scope else regular local variable read code Stream load local Binding code Stream generate Implicit Conversion implicit Conversion code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream NotAConstant valueRequired codeStream generateConstant implicitConversion RestrictiveFlagMASK FieldBinding fieldBinding valueRequired fieldBinding FieldBinding codegenBinding NotAConstant isStatic isStatic fieldBinding isStatic ReferenceBinding targetType currentScope enclosingSourceType enclosingTypeAt emulationPath currentScope getEmulationPath targetType codeStream generateOuterAccess emulationPath targetType currentScope generateReceiver codeStream syntheticAccessors syntheticAccessors isStatic codeStream fieldBinding codeStream fieldBinding codeStream syntheticAccessors codeStream generateImplicitConversion implicitConversion codeStream generateConstant fieldBinding implicitConversion LocalVariableBinding localBinding LocalVariableBinding codegenBinding valueRequired VariableBinding currentScope getEmulationPath localBinding codeStream generateOuterAccess localBinding currentScope codeStream localBinding codeStream generateImplicitConversion implicitConversion codeStream recordPositionsFrom sourceStart
public void generate Compound Assignment Block Scope current Scope Code Stream code Stream Expression expression int operator int assignment Implicit Conversion boolean value Required this generate Compound Assignment current Scope code Stream synthetic Accessors null null synthetic Accessors WRITE expression operator assignment Implicit Conversion value Required  generateCompoundAssignment BlockScope currentScope CodeStream codeStream assignmentImplicitConversion valueRequired generateCompoundAssignment currentScope codeStream syntheticAccessors syntheticAccessors assignmentImplicitConversion valueRequired
public void generate Compound Assignment Block Scope current Scope Code Stream code Stream Method Binding write Accessor Expression expression int operator int assignment Implicit Conversion boolean value Required switch bits Restrictive FlagMASK case FIELD assigning to a field Field Binding field Binding if field Binding Field Binding this codegen Binding is Static if synthetic Accessors null synthetic Accessors READ null code Stream getstatic field Binding else code Stream invokestatic synthetic Accessors READ else if bits DepthMASK 0 Reference Binding target Type current Scope enclosing Source Type enclosing Type At bits DepthMASK DepthSHIFT Object emulation Path current Scope get Emulation Path target Type true only exact match false consider enclosing arg code Stream generate Outer Access emulation Path this target Type current Scope else code Stream aload 0 code Stream dup if synthetic Accessors null synthetic Accessors READ null code Stream getfield field Binding else code Stream invokestatic synthetic Accessors READ break case LOCAL assigning to a local variable cannot assign to outer local Local Variable Binding local Binding Local Variable Binding this codegen Binding Constant assign Constant int increment using incr bytecode if possible switch local Binding type id case T String code Stream generate String Append current Scope this expression if value Required code Stream dup code Stream store local Binding false return case T int if assign Constant expression constant NotA Constant assign Constant typeID T float only for integral types assign Constant typeID T double increment assign Constant int Value short increment 16 bits value switch operator case PLUS code Stream iinc local Binding resolved Position increment if value Required code Stream load local Binding return case MINUS code Stream iinc local Binding resolved Position increment if value Required code Stream load local Binding return default code Stream load local Binding perform the actual compound operation int operation TypeID if operation TypeID implicit Conversion 4 T String operation TypeID T Object we enter here if the single name reference is a field of type java lang String or if the type of the operation is java lang Object For example o o where the compiled type of o is java lang Object code Stream generate String Append current Scope null expression else promote the array reference to the suitable operation type code Stream generate Implicit Conversion implicit Conversion generate the increment value will by itself be promoted to the operation value if expression Int Literal One prefix operation code Stream generate Constant expression constant implicit Conversion else expression generate Code current Scope code Stream true perform the operation code Stream send Operator operator operation TypeID cast the value back to the array reference type code Stream generate Implicit Conversion assignment Implicit Conversion store the result back into the variable switch bits Restrictive FlagMASK case FIELD assigning to a field field Store code Stream Field Binding this codegen Binding write Accessor value Required return case LOCAL assigning to a local variable Local Variable Binding local Binding Local Variable Binding this codegen Binding if value Required if local Binding type Long Binding local Binding type Double Binding code Stream dup2 else code Stream dup code Stream store local Binding false  generateCompoundAssignment BlockScope currentScope CodeStream codeStream MethodBinding writeAccessor assignmentImplicitConversion valueRequired RestrictiveFlagMASK FieldBinding fieldBinding fieldBinding FieldBinding codegenBinding isStatic syntheticAccessors syntheticAccessors codeStream fieldBinding codeStream syntheticAccessors ReferenceBinding targetType currentScope enclosingSourceType enclosingTypeAt emulationPath currentScope getEmulationPath targetType codeStream generateOuterAccess emulationPath targetType currentScope codeStream aload_0 codeStream syntheticAccessors syntheticAccessors codeStream fieldBinding codeStream syntheticAccessors LocalVariableBinding localBinding LocalVariableBinding codegenBinding assignConstant localBinding T_String codeStream generateStringAppend currentScope valueRequired codeStream codeStream localBinding T_int assignConstant NotAConstant assignConstant T_float assignConstant T_double assignConstant intValue codeStream localBinding resolvedPosition valueRequired codeStream localBinding codeStream localBinding resolvedPosition valueRequired codeStream localBinding codeStream localBinding operationTypeID operationTypeID implicitConversion T_String operationTypeID T_Object codeStream generateStringAppend currentScope codeStream generateImplicitConversion implicitConversion IntLiteral codeStream generateConstant implicitConversion generateCode currentScope codeStream codeStream sendOperator operationTypeID codeStream generateImplicitConversion assignmentImplicitConversion RestrictiveFlagMASK fieldStore codeStream FieldBinding codegenBinding writeAccessor valueRequired LocalVariableBinding localBinding LocalVariableBinding codegenBinding valueRequired localBinding LongBinding localBinding DoubleBinding codeStream codeStream codeStream localBinding
public void generate Post Increment Block Scope current Scope Code Stream code Stream Compound Assignment post Increment boolean value Required switch bits Restrictive FlagMASK case FIELD assigning to a field Field Binding field Binding if field Binding Field Binding this codegen Binding is Static if synthetic Accessors null synthetic Accessors READ null code Stream getstatic field Binding else code Stream invokestatic synthetic Accessors READ else if bits DepthMASK 0 Reference Binding target Type current Scope enclosing Source Type enclosing Type At bits DepthMASK DepthSHIFT Object emulation Path current Scope get Emulation Path target Type true only exact match false consider enclosing arg code Stream generate Outer Access emulation Path this target Type current Scope else code Stream aload 0 code Stream dup if synthetic Accessors null synthetic Accessors READ null code Stream getfield field Binding else code Stream invokestatic synthetic Accessors READ if value Required if field Binding is Static if field Binding type Long Binding field Binding type Double Binding code Stream dup2 else code Stream dup else Stack owner old field value old field value owner old field value if field Binding type Long Binding field Binding type Double Binding code Stream dup2 x1 else code Stream dup x1 code Stream generate Constant post Increment expression constant implicit Conversion code Stream send Operator post Increment operator field Binding type id code Stream generate Implicit Conversion post Increment assignment Implicit Conversion field Store code Stream field Binding synthetic Accessors null null synthetic Accessors WRITE false return case LOCAL assigning to a local variable Local Variable Binding local Binding Local Variable Binding this codegen Binding using incr bytecode if possible if local Binding type Int Binding if value Required code Stream load local Binding if post Increment operator PLUS code Stream iinc local Binding resolved Position 1 else code Stream iinc local Binding resolved Position 1 else code Stream load local Binding if value Required if local Binding type Long Binding local Binding type Double Binding code Stream dup2 else code Stream dup code Stream generate Constant post Increment expression constant implicit Conversion code Stream send Operator post Increment operator local Binding type id code Stream generate Implicit Conversion post Increment assignment Implicit Conversion code Stream store local Binding false  generatePostIncrement BlockScope currentScope CodeStream codeStream CompoundAssignment postIncrement valueRequired RestrictiveFlagMASK FieldBinding fieldBinding fieldBinding FieldBinding codegenBinding isStatic syntheticAccessors syntheticAccessors codeStream fieldBinding codeStream syntheticAccessors ReferenceBinding targetType currentScope enclosingSourceType enclosingTypeAt emulationPath currentScope getEmulationPath targetType codeStream generateOuterAccess emulationPath targetType currentScope codeStream aload_0 codeStream syntheticAccessors syntheticAccessors codeStream fieldBinding codeStream syntheticAccessors valueRequired fieldBinding isStatic fieldBinding LongBinding fieldBinding DoubleBinding codeStream codeStream fieldBinding LongBinding fieldBinding DoubleBinding codeStream dup2_x1 codeStream dup_x1 codeStream generateConstant postIncrement implicitConversion codeStream sendOperator postIncrement fieldBinding codeStream generateImplicitConversion postIncrement assignmentImplicitConversion fieldStore codeStream fieldBinding syntheticAccessors syntheticAccessors LocalVariableBinding localBinding LocalVariableBinding codegenBinding localBinding IntBinding valueRequired codeStream localBinding postIncrement codeStream localBinding resolvedPosition codeStream localBinding resolvedPosition codeStream localBinding valueRequired localBinding LongBinding localBinding DoubleBinding codeStream codeStream codeStream generateConstant postIncrement implicitConversion codeStream sendOperator postIncrement localBinding codeStream generateImplicitConversion postIncrement assignmentImplicitConversion codeStream localBinding
public void generate Receiver Code Stream code Stream code Stream aload 0  generateReceiver CodeStream codeStream codeStream aload_0
public void manage Enclosing Instance Access If Necessary Block Scope current Scope Flow Info flow Info if flow Info is Reachable return If inlinable field forget the access emulation the code gen will directly target it if bits DepthMASK 0 constant NotA Constant return if bits Restrictive FlagMASK LOCAL current Scope emulate Outer Access Local Variable Binding binding  manageEnclosingInstanceAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable NotAConstant RestrictiveFlagMASK currentScope emulateOuterAccess LocalVariableBinding
public void manage Synthetic Read Access If Necessary Block Scope current Scope Flow Info flow Info if flow Info is Reachable return If inlinable field forget the access emulation the code gen will directly target it if constant NotA Constant return if bits FIELD 0 Field Binding field Binding Field Binding binding if bits DepthMASK 0 field Binding is Private private access field Binding is Protected implicit protected access field Binding declaring Class get Package current Scope enclosing Source Type get Package if synthetic Accessors null synthetic Accessors new Method Binding 2 synthetic Accessors READ Source Type Binding current Scope enclosing Source Type enclosing Type At bits DepthMASK DepthSHIFT add Synthetic Method field Binding true current Scope problem Reporter need To Emulate Field Read Access field Binding this return if the binding declaring class is not visible need special action for runtime compatibility on 1 2 V Ms change the declaring class of the binding NOTE from target 1 2 on field s declaring class is touched if any different from receiver type and not from Object or implicit static field access if field Binding declaring Class this actual Receiver Type this actual Receiver Type is Array Type field Binding declaring Class null field Binding constant NotA Constant current Scope environment options targetJDK Class File Constants JDK1 2 field Binding is Static field Binding declaring Class id T Object no change for Object fields if there was any field Binding declaring Class can Be Seen By current Scope this codegen Binding current Scope enclosing Source Type get Updated Field Binding field Binding Reference Binding this actual Receiver Type  manageSyntheticReadAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable NotAConstant FieldBinding fieldBinding FieldBinding fieldBinding isPrivate fieldBinding isProtected fieldBinding declaringClass getPackage currentScope enclosingSourceType getPackage syntheticAccessors syntheticAccessors MethodBinding syntheticAccessors SourceTypeBinding currentScope enclosingSourceType enclosingTypeAt addSyntheticMethod fieldBinding currentScope problemReporter needToEmulateFieldReadAccess fieldBinding VMs fieldBinding declaringClass actualReceiverType actualReceiverType isArrayType fieldBinding declaringClass fieldBinding NotAConstant currentScope ClassFileConstants JDK1_2 fieldBinding isStatic fieldBinding declaringClass T_Object fieldBinding declaringClass canBeSeenBy currentScope codegenBinding currentScope enclosingSourceType getUpdatedFieldBinding fieldBinding ReferenceBinding actualReceiverType
public void manage Synthetic Write Access If Necessary Block Scope current Scope Flow Info flow Info if flow Info is Reachable return if bits FIELD 0 Field Binding field Binding Field Binding binding if bits DepthMASK 0 field Binding is Private private access field Binding is Protected implicit protected access field Binding declaring Class get Package current Scope enclosing Source Type get Package if synthetic Accessors null synthetic Accessors new Method Binding 2 synthetic Accessors WRITE Source Type Binding current Scope enclosing Source Type enclosing Type At bits DepthMASK DepthSHIFT add Synthetic Method field Binding false current Scope problem Reporter need To Emulate Field Write Access field Binding this return if the binding declaring class is not visible need special action for runtime compatibility on 1 2 V Ms change the declaring class of the binding NOTE from target 1 2 on field s declaring class is touched if any different from receiver type and not from Object or implicit static field access if field Binding declaring Class this actual Receiver Type this actual Receiver Type is Array Type field Binding declaring Class null field Binding constant NotA Constant current Scope environment options targetJDK Class File Constants JDK1 2 field Binding is Static field Binding declaring Class id T Object no change for Object fields if there was any field Binding declaring Class can Be Seen By current Scope this codegen Binding current Scope enclosing Source Type get Updated Field Binding field Binding Reference Binding this actual Receiver Type  manageSyntheticWriteAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable FieldBinding fieldBinding FieldBinding fieldBinding isPrivate fieldBinding isProtected fieldBinding declaringClass getPackage currentScope enclosingSourceType getPackage syntheticAccessors syntheticAccessors MethodBinding syntheticAccessors SourceTypeBinding currentScope enclosingSourceType enclosingTypeAt addSyntheticMethod fieldBinding currentScope problemReporter needToEmulateFieldWriteAccess fieldBinding VMs fieldBinding declaringClass actualReceiverType actualReceiverType isArrayType fieldBinding declaringClass fieldBinding NotAConstant currentScope ClassFileConstants JDK1_2 fieldBinding isStatic fieldBinding declaringClass T_Object fieldBinding declaringClass canBeSeenBy currentScope codegenBinding currentScope enclosingSourceType getUpdatedFieldBinding fieldBinding ReferenceBinding actualReceiverType
public String Buffer print Expression int indent String Buffer output return output append token  StringBuffer printExpression StringBuffer
public Type Binding report Error Block Scope scope error cases constant Constant NotA Constant if binding instanceof Problem Field Binding scope problem Reporter invalid Field this Field Binding binding else if binding instanceof Problem Reference Binding scope problem Reporter invalid Type this Type Binding binding else scope problem Reporter unresolvable Reference this binding return null  TypeBinding reportError BlockScope NotAConstant ProblemFieldBinding problemReporter invalidField FieldBinding ProblemReferenceBinding problemReporter invalidType TypeBinding problemReporter unresolvableReference
public Type Binding resolve Type Block Scope scope for code gen harm the restrictive Flag this actual Receiver Type this receiver Type scope enclosing Source Type if this codegen Binding this binding scope get Binding token bits Restrictive FlagMASK this true resolve is Valid Binding switch bits Restrictive FlagMASK case VARIABLE only variable case VARIABLE TYPE both variable and type if binding instanceof Variable Binding Variable Binding variable Variable Binding binding if binding instanceof Local Variable Binding bits Restrictive FlagMASK clear bits bits LOCAL if this bits Is Strictly AssignedMASK 0 constant variable constant else constant NotA Constant if variable is Final bits DepthMASK 0 scope problem Reporter cannot Refer To Non Final Outer Local Local Variable Binding variable this return this resolved Type variable type a field Field Binding field Field Binding this binding if field is Static scope environment options get Severity Compiler Options Unqualified Field Access Problem Severities Ignore scope problem Reporter unqualified Field Access this field return this resolved Type check Field Access scope thus it was a type bits Restrictive FlagMASK clear bits bits TYPE case TYPE only type constant Constant NotA Constant deprecated test if is Type Use Deprecated Type Binding binding scope scope problem Reporter deprecated Type Type Binding binding this return this resolved Type Type Binding binding error scenarii return this resolved Type this report Error scope  TypeBinding resolveType BlockScope restrictiveFlag actualReceiverType receiverType enclosingSourceType codegenBinding getBinding RestrictiveFlagMASK isValidBinding RestrictiveFlagMASK VariableBinding VariableBinding VariableBinding LocalVariableBinding RestrictiveFlagMASK IsStrictlyAssignedMASK NotAConstant isFinal problemReporter cannotReferToNonFinalOuterLocal LocalVariableBinding resolvedType FieldBinding FieldBinding isStatic getSeverity CompilerOptions UnqualifiedFieldAccess ProblemSeverities problemReporter unqualifiedFieldAccess resolvedType checkFieldAccess RestrictiveFlagMASK NotAConstant isTypeUseDeprecated TypeBinding problemReporter deprecatedType TypeBinding resolvedType TypeBinding resolvedType reportError
public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor BlockScope endVisit
public String unbound Reference Error Name return new String token  unboundReferenceErrorName

public Single Type Reference char source long pos token source source Start int pos 32 source End int pos 0x00000000FFFFFFFFL  SingleTypeReference sourceStart sourceEnd
public Single Type Reference char source Type Binding type long pos this source pos this resolved Type type  SingleTypeReference TypeBinding resolvedType
public Type Reference copy Dims int dim return a type reference copy of me with some dimensions warning the new type ref has a null binding return new Array Type Reference token null dim long source Start 32 source End  TypeReference copyDims ArrayTypeReference sourceStart sourceEnd
public Type Binding get Type Binding Scope scope if this resolved Type null return this resolved Type return scope get Type token  TypeBinding getTypeBinding resolvedType resolvedType getType
public char get Type Name return new char token  getTypeName
public String Buffer print Expression int indent String Buffer output return output append token  StringBuffer printExpression StringBuffer
public Type Binding resolve Type Enclosing Block Scope scope Reference Binding enclosing Type Reference Binding member Tb scope get Member Type token enclosing Type if member Tb is Valid Binding scope problem Reporter invalid Enclosing Type this member Tb enclosing Type return null if is Type Use Deprecated member Tb scope scope problem Reporter deprecated Type member Tb this return this resolved Type member Tb  TypeBinding resolveTypeEnclosing BlockScope ReferenceBinding enclosingType ReferenceBinding memberTb getMemberType enclosingType memberTb isValidBinding problemReporter invalidEnclosingType memberTb enclosingType isTypeUseDeprecated memberTb problemReporter deprecatedType memberTb resolvedType memberTb
public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor BlockScope endVisit
public void traverse AST Visitor visitor Class Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor ClassScope endVisit

public abstract class Statement extends AST Node public abstract Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info  ASTNode FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo
INTERNAL USE ONLY This is used to redirect inter statements jumps public void branch Chain To Label label do nothing by default  branchChainTo
Report an error if necessary public boolean complain If Unreachable Flow Info flow Info Block Scope scope boolean did Already Complain if flow Info reach Mode Flow Info UNREACHABLE 0 this bits AST Node Is ReachableMASK boolean reported flow Info Flow Info DEAD END if did Already Complain reported scope problem Reporter unreachable Code this return reported keep going for fake reachable return false  complainIfUnreachable FlowInfo flowInfo BlockScope didAlreadyComplain flowInfo reachMode FlowInfo ASTNode IsReachableMASK flowInfo FlowInfo DEAD_END didAlreadyComplain problemReporter unreachableCode
public abstract void generate Code Block Scope current Scope Code Stream code Stream  generateCode BlockScope currentScope CodeStream codeStream
public abstract void generate Code Block Scope current Scope Code Stream code Stream public boolean is Empty Block return false  generateCode BlockScope currentScope CodeStream codeStream isEmptyBlock
public boolean is Valid Java Statement the use of this method should be avoid in most cases and is here mostly for documentation purpose while the parser is responsable for creating welled formed expression statement which results in the fact that java non semantic expression used as statement should not be parsable thus not being built It sounds like the java grammar as help the compiler job in removing by construction some statement that would have no effect for example all expression that may do side effects are valid statement this is an appromative idea return true  isValidJavaStatement
public String Buffer print int indent String Buffer output return print Statement indent output  StringBuffer StringBuffer printStatement
return print Statement indent output public abstract String Buffer print Statement int indent String Buffer output  printStatement StringBuffer printStatement StringBuffer
public abstract String Buffer print Statement int indent String Buffer output public abstract void resolve Block Scope scope  StringBuffer printStatement StringBuffer BlockScope
public Constant resolve Case Block Scope scope Type Binding test Type Switch Statement switch Statement statement within a switch that are not case are treated as normal statement resolve scope return null  resolveCase BlockScope TypeBinding testType SwitchStatement switchStatement

public String Literal char token int s int e this s e source token  StringLiteral
public String Literal int s int e super s e  StringLiteral
public void compute Constant constant Constant from Value String value Of source  computeConstant fromValue valueOf
public Extended String Literal extend With Char Literal lit add the lit source to mine just as if it was mine return new Extended String Literal this lit  ExtendedStringLiteral extendWith CharLiteral ExtendedStringLiteral
public Extended String Literal extend With String Literal lit add the lit source to mine just as if it was mine return new Extended String Literal this lit  ExtendedStringLiteral extendWith StringLiteral ExtendedStringLiteral
Add the lit source to mine just as if it was mine public String Literal Concatenation extends With String Literal lit return new String Literal Concatenation this lit  StringLiteralConcatenation extendsWith StringLiteral StringLiteralConcatenation
Code generation for string literal public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if value Required code Stream ldc constant string Value code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream valueRequired codeStream stringValue codeStream recordPositionsFrom sourceStart
public Type Binding literal Type Block Scope scope return scope get Java Lang String  TypeBinding literalType BlockScope getJavaLangString
public String Buffer print Expression int indent String Buffer output handle some special char output append for int i 0 i source length i switch source i case b output append b NON NLS 1 break case t output append t NON NLS 1 break case n output append n NON NLS 1 break case f output append f NON NLS 1 break case r output append r NON NLS 1 break case output append NON NLS 1 break case output append NON NLS 1 break case take care not to display the escape as a potential real char output append NON NLS 1 break default output append source i output append return output  StringBuffer printExpression StringBuffer
public char source return source 
public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

public int counter Build a two strings literal public String Literal Concatenation String Literal str1 String Literal str2 super str1 source Start str1 source End this source str1 source this literals new String Literal INITIAL SIZE this counter 0 this literals this counter str1 extends With str2  StringLiteralConcatenation StringLiteral StringLiteral sourceStart sourceEnd StringLiteral INITIAL_SIZE extendsWith
Add the lit source to mine just as if it was mine public String Literal Concatenation extends With String Literal lit this source End lit source End final int literals Length this literals length if this counter literals Length resize System arraycopy this literals 0 this literals new String Literal literals Length INITIAL SIZE 0 literals Length uddate the source int length source length System arraycopy source 0 source new char length lit source length 0 length System arraycopy lit source 0 source length lit source length this literals this counter lit return this  StringLiteralConcatenation extendsWith StringLiteral sourceEnd sourceEnd literalsLength literalsLength StringLiteral literalsLength INITIAL_SIZE literalsLength
public String Buffer print Expression int indent String Buffer output output append String Literal Concatenation NON NLS 1 for int i 0 max this counter i max i this literals i print Expression indent output output append n NON NLS 1 return output append  StringBuffer printExpression StringBuffer StringLiteralConcatenation printExpression
public char source return source 
public void traverse AST Visitor visitor Block Scope scope if visitor visit this scope for int i 0 max this counter i max i this literals i traverse visitor scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

int any Exception Labels Count 0 public abstract boolean is Sub Routine Escaping  anyExceptionLabelsCount isSubRoutineEscaping
public abstract boolean is Sub Routine Escaping public abstract void generate Sub Routine Invocation Block Scope current Scope Code Stream code Stream  isSubRoutineEscaping generateSubRoutineInvocation BlockScope currentScope CodeStream codeStream
public Exception Label enter Any Exception Handler Code Stream code Stream int length if length this any Exception Labels Count this any Exception Labels length System arraycopy this any Exception Labels 0 this any Exception Labels new Exception Label length 2 1 0 length Exception Label exception Label new Exception Label code Stream null this any Exception Labels this any Exception Labels Count exception Label return exception Label  ExceptionLabel enterAnyExceptionHandler CodeStream codeStream anyExceptionLabelsCount anyExceptionLabels anyExceptionLabels anyExceptionLabels ExceptionLabel ExceptionLabel exceptionLabel ExceptionLabel codeStream anyExceptionLabels anyExceptionLabelsCount exceptionLabel exceptionLabel
public void exit Any Exception Handler if this any Exception Labels Count 0 return Exception Label current Label this any Exception Labels this any Exception Labels Count 1 if current Label start current Label code Stream position discard empty exception handler this any Exception Labels this any Exception Labels Count null current Label place End  exitAnyExceptionHandler anyExceptionLabelsCount ExceptionLabel currentLabel anyExceptionLabels anyExceptionLabelsCount currentLabel currentLabel codeStream anyExceptionLabels anyExceptionLabelsCount currentLabel placeEnd
public void place All Any Exception Handlers for int i 0 i this any Exception Labels Count i this any Exception Labels i place  placeAllAnyExceptionHandlers anyExceptionLabelsCount anyExceptionLabels
public static void reenter Exception Handlers Sub Routine Statement subroutines int max Code Stream code Stream if subroutines null return if max 0 max subroutines length for int i 0 i max i subroutines i enter Any Exception Handler code Stream  reenterExceptionHandlers SubRoutineStatement CodeStream codeStream enterAnyExceptionHandler codeStream

public class Super Reference extends This Reference public Super Reference int source Start int source End super source Start source End  SuperReference ThisReference SuperReference sourceStart sourceEnd sourceStart sourceEnd
public static Explicit Constructor Call implicit Super Constructor Call return new Explicit Constructor Call Explicit Constructor Call Implicit Super  ExplicitConstructorCall implicitSuperConstructorCall ExplicitConstructorCall ExplicitConstructorCall ImplicitSuper
public boolean is Implicit This return false  isImplicitThis
public boolean is Super return true  isSuper
public boolean is This return false  isThis
public String Buffer print Expression int indent String Buffer output return output append super NON NLS 1  StringBuffer printExpression StringBuffer
public Type Binding resolve Type Block Scope scope constant NotA Constant if check Access scope method Scope return null Source Type Binding enclosing Tb scope enclosing Source Type if enclosing Tb id T Object scope problem Reporter cannot Use Super In Java Lang Object this return null return this resolved Type enclosing Tb superclass  TypeBinding resolveType BlockScope NotAConstant checkAccess methodScope SourceTypeBinding enclosingTb enclosingSourceType enclosingTb T_Object problemReporter cannotUseSuperInJavaLangObject resolvedType enclosingTb
public void traverse AST Visitor visitor Block Scope block Scope visitor visit this block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope endVisit blockScope

public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info try flow Info expression analyse Code current Scope flow Context flow Info Switch Flow Context switch Context new Switch Flow Context flow Context this break Label new Label analyse the block by considering specially the case default statements need to bind them to the entry point Flow Info case Inits Flow Info DEAD END in case of statements before the first case pre Switch Init State Index current Scope method Scope record Initialization States flow Info int case Index 0 if statements null boolean did Already Complain false for int i 0 max statements length i max i Statement statement statements i if case Index case Count statement cases case Index statement is a case this scope switch Case cases case Index record entering in a switch case block case Index case Inits case Inits merged With flow Info copy unconditional Inits did Already Complain false reset complaint else if statement default Case statement is the default case this scope switch Case default Case record entering in a switch case block case Inits case Inits merged With flow Info copy unconditional Inits did Already Complain false reset complaint if statement complain If Unreachable case Inits scope did Already Complain case Inits statement analyse Code scope switch Context case Inits else did Already Complain true if no default case then record it may jump over the block directly to the end if default Case null only retain the potential initializations flow Info add Potential Initializations From case Inits merged With switch Context inits On Break merged Init State Index current Scope method Scope record Initialization States flow Info return flow Info merge all branches inits Flow Info merged Info case Inits merged With switch Context inits On Break merged Init State Index current Scope method Scope record Initialization States merged Info return merged Info finally if this scope null this scope switch Case null no longer inside switch case block  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo flowInfo analyseCode currentScope flowContext flowInfo SwitchFlowContext switchContext SwitchFlowContext flowContext breakLabel FlowInfo caseInits FlowInfo DEAD_END preSwitchInitStateIndex currentScope methodScope recordInitializationStates flowInfo caseIndex didAlreadyComplain caseIndex caseCount caseIndex switchCase caseIndex caseIndex caseInits caseInits mergedWith flowInfo unconditionalInits didAlreadyComplain defaultCase switchCase defaultCase caseInits caseInits mergedWith flowInfo unconditionalInits didAlreadyComplain complainIfUnreachable caseInits didAlreadyComplain caseInits analyseCode switchContext caseInits didAlreadyComplain defaultCase flowInfo addPotentialInitializationsFrom caseInits mergedWith switchContext initsOnBreak mergedInitStateIndex currentScope methodScope recordInitializationStates flowInfo flowInfo FlowInfo mergedInfo caseInits mergedWith switchContext initsOnBreak mergedInitStateIndex currentScope methodScope recordInitializationStates mergedInfo mergedInfo switchCase
Switch code generation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream public void generate Code Block Scope current Scope Code Stream code Stream try int sorted Indexes new int case Count int local Keys Copy if bits Is ReachableMASK 0 return int pc code Stream position prepare the labels and constants break Label initialize code Stream Case Label case Labels new Case Label case Count int constants new int case Count boolean need Switch case Count 0 for int i 0 i case Count i constants i cases i constant Expression constant int Value cases i target Label case Labels i new Case Label code Stream we sort the keys to be able to generate the code for tableswitch or lookupswitch for int i 0 i case Count i sorted Indexes i i System arraycopy constants 0 local Keys Copy new int case Count 0 case Count Code Stream sort local Keys Copy 0 case Count 1 sorted Indexes Case Label default Label new Case Label code Stream if default Case null default Case target Label default Label generate expression testes expression generate Code current Scope code Stream need Switch generate the appropriate switch table lookup bytecode if need Switch int max local Keys Copy case Count 1 int min local Keys Copy 0 if long case Count 2 5 long max long min work around 1 3 VM bug if max 0x7FFF0000 must use lookup bytecode see http dev eclipse org bugs show bug cgi id 21557 if max 0x7FFF0000 current Scope environment options compliance Level Class File Constants JDK1 4 code Stream lookupswitch default Label constants sorted Indexes case Labels else code Stream tableswitch default Label min max constants sorted Indexes case Labels else code Stream lookupswitch default Label constants sorted Indexes case Labels code Stream update Last Recorded EndPC code Stream position generate the switch block statements int case Index 0 if statements null for int i 0 max Cases statements length i max Cases i Statement statement statements i if case Index case Count statement cases case Index statements i is a case this scope switch Case cases case Index record entering in a switch case block if pre Switch Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope pre Switch Init State Index case Index else if statement default Case statements i is a case or a default case this scope switch Case default Case record entering in a switch case block if pre Switch Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope pre Switch Init State Index statement generate Code scope code Stream place the trailing labels for break and default case break Label place if default Case null default Label place May loose some local variable initializations affecting the local variable attributes if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index code Stream add Definitely Assigned Variables current Scope merged Init State Index if scope current Scope code Stream exit User Scope scope code Stream record Positions From pc this source Start finally if this scope null this scope switch Case null no longer inside switch case block  currentScope BlockScope codeStream CodeStream generateCode BlockScope currentScope CodeStream codeStream sortedIndexes caseCount localKeysCopy IsReachableMASK codeStream breakLabel codeStream CaseLabel caseLabels CaseLabel caseCount caseCount needSwitch caseCount caseCount constantExpression intValue targetLabel caseLabels CaseLabel codeStream caseCount sortedIndexes localKeysCopy caseCount caseCount CodeStream localKeysCopy caseCount sortedIndexes CaseLabel defaultLabel CaseLabel codeStream defaultCase defaultCase targetLabel defaultLabel generateCode currentScope codeStream needSwitch needSwitch localKeysCopy caseCount localKeysCopy caseCount show_bug currentScope complianceLevel ClassFileConstants JDK1_4 codeStream defaultLabel sortedIndexes caseLabels codeStream defaultLabel sortedIndexes caseLabels codeStream defaultLabel sortedIndexes caseLabels codeStream updateLastRecordedEndPC codeStream caseIndex maxCases maxCases caseIndex caseCount caseIndex switchCase caseIndex preSwitchInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope preSwitchInitStateIndex caseIndex defaultCase switchCase defaultCase preSwitchInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope preSwitchInitStateIndex generateCode codeStream breakLabel defaultCase defaultLabel mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex codeStream addDefinitelyAssignedVariables currentScope mergedInitStateIndex currentScope codeStream exitUserScope codeStream recordPositionsFrom sourceStart switchCase
public String Buffer print Statement int indent String Buffer output print Indent indent output append switch NON NLS 1 expression print Expression 0 output append NON NLS 1 if statements null for int i 0 i statements length i output append n if statements i instanceof Case Statement statements i print Statement indent output else statements i print Statement indent 2 output output append n NON NLS 1 return print Indent indent output append  StringBuffer printStatement StringBuffer printIndent printExpression CaseStatement printStatement printStatement printIndent
public void resolve Block Scope upper Scope try Type Binding test Type expression resolve Type upper Scope if test Type null return expression implicit Widening test Type test Type if expression is Constant Value Of Type Assignable To Type test Type Int Binding if test Type is Compatible With Int Binding upper Scope problem Reporter incorrect Switch Type expression test Type return if statements null scope explicit Declarations 0 upper Scope new Block Scope upper Scope int length collection of cases is too big but we will only iterate until case Count cases new Case Statement length statements length int cases Values new int length Case Statement duplicate Case Statements null int duplicate Case Statements Counter 0 int counter 0 for int i 0 i length i Constant constant final Statement statement statements i if constant statement resolve Case scope test Type this null check for duplicate case statement if constant NotA Constant int key constant int Value for int j 0 j counter j if cases Values j key final Case Statement current Case Statement Case Statement statement if duplicate Case Statements null scope problem Reporter duplicate Case cases j scope problem Reporter duplicate Case current Case Statement duplicate Case Statements new Case Statement length duplicate Case Statements duplicate Case Statements Counter cases j duplicate Case Statements duplicate Case Statements Counter current Case Statement else boolean found false search Reported Duplicate for int k 2 k duplicate Case Statements Counter k if duplicate Case Statements k statement found true break search Reported Duplicate if found scope problem Reporter duplicate Case current Case Statement duplicate Case Statements duplicate Case Statements Counter current Case Statement cases Values counter key else if this bits Undocumented Empty BlockMASK 0 upper Scope problem Reporter undocumented Empty Block this block Start this source End finally if this scope null this scope switch Case null no longer inside switch case block  BlockScope upperScope TypeBinding testType resolveType upperScope testType implicitWidening testType testType isConstantValueOfTypeAssignableToType testType IntBinding testType isCompatibleWith IntBinding upperScope problemReporter incorrectSwitchType testType explicitDeclarations upperScope BlockScope upperScope caseCount CaseStatement casesValues CaseStatement duplicateCaseStatements duplicateCaseStatementsCounter resolveCase testType NotAConstant intValue casesValues CaseStatement currentCaseStatement CaseStatement duplicateCaseStatements problemReporter duplicateCase problemReporter duplicateCase currentCaseStatement duplicateCaseStatements CaseStatement duplicateCaseStatements duplicateCaseStatementsCounter duplicateCaseStatements duplicateCaseStatementsCounter currentCaseStatement searchReportedDuplicate duplicateCaseStatementsCounter duplicateCaseStatements searchReportedDuplicate problemReporter duplicateCase currentCaseStatement duplicateCaseStatements duplicateCaseStatementsCounter currentCaseStatement casesValues UndocumentedEmptyBlockMASK upperScope problemReporter undocumentedEmptyBlock blockStart sourceEnd switchCase
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope expression traverse visitor scope if statements null int statements Length statements length for int i 0 i statements Length i statements i traverse visitor scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope statementsLength statementsLength endVisit blockScope
Dispatch the call on its last statement public void branch Chain To Label label in order to improve debug attributes for stepping 11431 we want to inline the jumps to break Label which already got generated if any and have them directly branch to a better location the argument label we know at this point that the break Label already got placed if this break Label has Forward References label append Forward References From this break Label  branchChainTo breakLabel breakLabel breakLabel hasForwardReferences appendForwardReferencesFrom breakLabel

public Synchronized Statement Expression expression Block statement int s int e this expression expression this block statement source End e source Start s  SynchronizedStatement sourceEnd sourceStart
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info mark the synthetic variable as being used synchro Variable use Flag Local Variable Binding USED simple propagation to subnodes flow Info block analyse Code scope new Inside Sub Routine Flow Context flow Context this expression analyse Code scope flow Context flow Info optimizing code gen this block Exit flow Info is Reachable return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo synchroVariable useFlag LocalVariableBinding flowInfo analyseCode InsideSubRoutineFlowContext flowContext analyseCode flowContext flowInfo blockExit flowInfo isReachable flowInfo
public boolean is Sub Routine Escaping return false  isSubRoutineEscaping
Synchronized statement code generation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream public void generate Code Block Scope current Scope Code Stream code Stream if bits Is ReachableMASK 0 return in case the labels needs to be reinitialized when the code generation is restarted in wide mode if this any Exception Labels Count 0 this any Exception Labels NO EXCEPTION HANDLER this any Exception Labels Count 0 int pc code Stream position generate the synchronization expression expression generate Code scope code Stream true if block is Empty Block if synchro Variable type Long Binding synchro Variable type Double Binding code Stream dup2 else code Stream dup only take the lock code Stream monitorenter code Stream monitorexit else enter the monitor code Stream store synchro Variable true code Stream monitorenter generate the body of the synchronized block this enter Any Exception Handler code Stream block generate Code scope code Stream Label end Label new Label code Stream if block Exit code Stream load synchro Variable code Stream monitorexit code Stream goto  end Label generate the body of the exception handler this exit Any Exception Handler this place All Any Exception Handlers code Stream incr Stack Size 1 code Stream load synchro Variable code Stream monitorexit code Stream athrow if block Exit end Label place if scope current Scope code Stream exit User Scope scope code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK anyExceptionLabelsCount anyExceptionLabels NO_EXCEPTION_HANDLER anyExceptionLabelsCount codeStream generateCode codeStream isEmptyBlock synchroVariable LongBinding synchroVariable DoubleBinding codeStream codeStream codeStream codeStream codeStream synchroVariable codeStream enterAnyExceptionHandler codeStream generateCode codeStream endLabel codeStream blockExit codeStream synchroVariable codeStream codeStream goto_ endLabel exitAnyExceptionHandler placeAllAnyExceptionHandlers codeStream incrStackSize codeStream synchroVariable codeStream codeStream blockExit endLabel currentScope codeStream exitUserScope codeStream recordPositionsFrom sourceStart
public void generate Sub Routine Invocation Block Scope current Scope Code Stream code Stream code Stream load this synchro Variable code Stream monitorexit  generateSubRoutineInvocation BlockScope currentScope CodeStream codeStream codeStream synchroVariable codeStream
public void resolve Block Scope upper Scope special scope for secret locals optimization scope new Block Scope upper Scope Type Binding type expression resolve Type scope if type null return switch type id case T boolean case T char case T float case T double case T byte case T short case T int case T long scope problem Reporter invalid Type To Synchronize expression type break case T void scope problem Reporter illegal Void Expression expression break case T null scope problem Reporter invalid Null To Synchronize expression break continue even on errors in order to have the TC done into the statements synchro Variable new Local Variable Binding Secret Local Declaration Name type Acc Default false scope add Local Variable synchro Variable synchro Variable constant NotA Constant not inlinable expression implicit Widening type type block resolve Using scope  BlockScope upperScope BlockScope upperScope TypeBinding resolveType T_boolean T_char T_float T_double T_byte T_short T_int T_long problemReporter invalidTypeToSynchronize T_void problemReporter illegalVoidExpression T_null problemReporter invalidNullToSynchronize synchroVariable LocalVariableBinding SecretLocalDeclarationName AccDefault addLocalVariable synchroVariable synchroVariable NotAConstant implicitWidening resolveUsing
public String Buffer print Statement int indent String Buffer output print Indent indent output output append synchronized NON NLS 1 expression print Expression 0 output append output append n return block print Statement indent 1 output  StringBuffer printStatement StringBuffer printIndent printExpression printStatement
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope expression traverse visitor scope block traverse visitor scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope endVisit blockScope

public static This Reference implicit This This Reference implicit This new This Reference 0 0 implicit This bits Is Implicit This Mask return implicit This  ThisReference implicitThis ThisReference implicitThis ThisReference implicitThis IsImplicitThisMask implicitThis
public This Reference int source Start int source End this source Start source Start this source End source End  ThisReference sourceStart sourceEnd sourceStart sourceStart sourceEnd sourceEnd
see Reference analyse Assignment public Flow Info analyse Assignment Block Scope current Scope Flow Context flow Context Flow Info flow Info Assignment assignment boolean is Compound return flow Info this cannot be assigned  analyseAssignment FlowInfo analyseAssignment BlockScope currentScope FlowContext flowContext FlowInfo flowInfo isCompound flowInfo
public boolean check Access Method Scope method Scope this super cannot be used in constructor call if method Scope is Constructor Call method Scope problem Reporter fields Or This Before Constructor Invocation this return false static may not refer to this super if method Scope is Static method Scope problem Reporter error This Super In Static this return false return true  checkAccess MethodScope methodScope methodScope isConstructorCall methodScope problemReporter fieldsOrThisBeforeConstructorInvocation methodScope isStatic methodScope problemReporter errorThisSuperInStatic
see Reference generate Assignment public void generate Assignment Block Scope current Scope Code Stream code Stream Assignment assignment boolean value Required this cannot be assigned  generateAssignment generateAssignment BlockScope currentScope CodeStream codeStream valueRequired
public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if value Required code Stream aload 0 if this bits Is Implicit This Mask 0 code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream valueRequired codeStream aload_0 IsImplicitThisMask codeStream recordPositionsFrom sourceStart
see Reference generate Compound Assignment public void generate Compound Assignment Block Scope current Scope Code Stream code Stream Expression expression int operator int assignment Implicit Conversion boolean value Required this cannot be assigned  generateCompoundAssignment generateCompoundAssignment BlockScope currentScope CodeStream codeStream assignmentImplicitConversion valueRequired
see org eclipse jdt internal compiler ast Reference generate Post Increment public void generate Post Increment Block Scope current Scope Code Stream code Stream Compound Assignment post Increment boolean value Required this cannot be assigned  generatePostIncrement generatePostIncrement BlockScope currentScope CodeStream codeStream CompoundAssignment postIncrement valueRequired
public boolean is Implicit This return this bits Is Implicit This Mask 0  isImplicitThis IsImplicitThisMask
public boolean is This return true  isThis
public String Buffer print Expression int indent String Buffer output if this is Implicit This return output return output append this NON NLS 1  StringBuffer printExpression StringBuffer isImplicitThis
public Type Binding resolve Type Block Scope scope constant NotA Constant if this is Implicit This check Access scope method Scope return null return this resolved Type scope enclosing Source Type  TypeBinding resolveType BlockScope NotAConstant isImplicitThis checkAccess methodScope resolvedType enclosingSourceType
public void traverse AST Visitor visitor Block Scope block Scope visitor visit this block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope endVisit blockScope

public Throw Statement Expression exception int start Position this exception exception this source Start start Position this source End exception source End  ThrowStatement startPosition sourceStart startPosition sourceEnd sourceEnd
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info exception analyse Code current Scope flow Context flow Info need to check that exception thrown is actually caught somewhere flow Context check Exception Handlers exception Type this flow Info current Scope return Flow Info DEAD END  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo analyseCode currentScope flowContext flowInfo flowContext checkExceptionHandlers exceptionType flowInfo currentScope FlowInfo DEAD_END
Throw code generation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream public void generate Code Block Scope current Scope Code Stream code Stream if bits Is ReachableMASK 0 return int pc code Stream position exception generate Code current Scope code Stream true code Stream athrow code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK codeStream generateCode currentScope codeStream codeStream codeStream recordPositionsFrom sourceStart
public String Buffer print Statement int indent String Buffer output print Indent indent output append throw NON NLS 1 exception print Expression 0 output return output append  StringBuffer printStatement StringBuffer printIndent printExpression
public void resolve Block Scope scope exception Type exception resolve Type Expecting scope scope get Java Lang Throwable if exception Type Null Binding scope environment options compliance Level Class File Constants JDK1 3 if compliant with 1 4 this problem will not be reported scope problem Reporter cannot Throw Null this exception implicit Widening exception Type exception Type  BlockScope exceptionType resolveTypeExpecting getJavaLangThrowable exceptionType NullBinding complianceLevel ClassFileConstants JDK1_3 problemReporter cannotThrowNull implicitWidening exceptionType exceptionType
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope exception traverse visitor block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope blockScope endVisit blockScope

public class True Literal extends Magic Literal static final char source t r u e public True Literal int s int e super s e  TrueLiteral MagicLiteral TrueLiteral
super s e public void compute Constant constant Constant from Value true  computeConstant fromValue
constant Constant from Value true Code generation for the true literal param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if value Required code Stream iconst 1 code Stream record Positions From pc this source Start  fromValue currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream valueRequired codeStream iconst_1 codeStream recordPositionsFrom sourceStart
public void generate Optimized Boolean Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required true Label being not nil means that we will not fall through into the TRUE case int pc code Stream position constant true if value Required if false Label null implicit falling through the FALSE case if true Label null code Stream goto  true Label code Stream record Positions From pc this source Start  generateOptimizedBoolean BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired trueLabel codeStream valueRequired falseLabel trueLabel codeStream goto_ trueLabel codeStream recordPositionsFrom sourceStart
code Stream record Positions From pc this source Start public Type Binding literal Type Block Scope scope return Boolean Binding  codeStream recordPositionsFrom sourceStart TypeBinding literalType BlockScope BooleanBinding
public char source return source 
return source public void traverse AST Visitor visitor Block Scope scope visitor visit this scope visitor end Visit this scope  ASTVisitor BlockScope endVisit

public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info Consider the try block and catch block so as to compute the intersection of initializations and the minimum exit relative depth amongst all of them Then consider the subroutine and append its initialization to the try catch ones if the subroutine completes normally If the subroutine does not complete then only keep this result for the rest of the analysis process the finally block subroutine create a context for the subroutine pre Try Init State Index current Scope method Scope record Initialization States flow Info if any Exception Variable null any Exception Variable use Flag Local Variable Binding USED if return Address Variable null TODO philippe if subroutine is escaping unused return Address Variable use Flag Local Variable Binding USED Inside Sub Routine Flow Context inside Sub Context Finally Flow Context finally Context Unconditional Flow Info sub Info if sub Routine Start Label null no finally block inside Sub Context null finally Context null sub Info null else analyse finally block first inside Sub Context new Inside Sub Routine Flow Context flow Context this sub Info finally Block analyse Code current Scope finally Context new Finally Flow Context flow Context finally Block flow Info copy unconditional Inits if sub Info Flow Info DEAD END is Sub Routine Escaping true scope problem Reporter finally Must Complete Normally finally Block this sub Routine Inits sub Info process the try block in a context handling the local exceptions Exception Handling Flow Context handling Context new Exception Handling Flow Context inside Sub Context null flow Context inside Sub Context try Block caught Exception Types scope flow Info unconditional Inits Flow Info try Info if try Block is Empty Block try Info flow Info try Block Exit false else try Info try Block analyse Code current Scope handling Context flow Info copy try Block Exit try Info is Reachable check unreachable catch blocks handling Context complain If Unused Exception Handlers scope this process the catch blocks computing the minimal exit depth amongst try catch if catch Arguments null int catch Count catch Exits new boolean catch Count catch Blocks length for int i 0 i catch Count i keep track of the inits that could potentially have led to this exception handler for final assignments diagnosis Flow Info catch Info flow Info copy unconditional Inits add Potential Initializations From handling Context inits On Exception caught Exception Types i unconditional Inits add Potential Initializations From try Info unconditional Inits add Potential Initializations From handling Context inits On Return catch var is always set catch Info mark As Definitely Assigned catch Arguments i binding If we are about to consider an unchecked exception handler potential inits may have occured inside the try block that need to be detected e g try x 1 throw Something catch Exception e x 2 unchecked Exception Types not Nil and unchecked Exception Types at index if True catch Inits add Potential Initializations From try Inits TODO philippe should only tag as unreachable if the catchblock cannot be reached if handling Context inits On Exception caught Exception Types i is Reachable if try Block statements null catch Info set Reach Mode Flow Info UNREACHABLE catch Info catch Blocks i analyse Code current Scope inside Sub Context null flow Context inside Sub Context catch Info catch Exits i catch Info is Reachable try Info try Info merged With catch Info unconditional Inits if sub Routine Start Label null merged Init State Index current Scope method Scope record Initialization States try Info return try Info we also need to check potential multiple assignments of final variables inside the finally block need to include potential inits from returns inside the try catch parts 1GK2AOF finally Context complain On Redundant Final Assignments try Info is Reachable try Info add Potential Initializations From inside Sub Context inits On Return inside Sub Context inits On Return current Scope if sub Info Flow Info DEAD END merged Init State Index current Scope method Scope record Initialization States sub Info return sub Info else Flow Info merged Info try Info add Initializations From sub Info merged Init State Index current Scope method Scope record Initialization States merged Info return merged Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo preTryInitStateIndex currentScope methodScope recordInitializationStates flowInfo anyExceptionVariable anyExceptionVariable useFlag LocalVariableBinding returnAddressVariable returnAddressVariable useFlag LocalVariableBinding InsideSubRoutineFlowContext insideSubContext FinallyFlowContext finallyContext UnconditionalFlowInfo subInfo subRoutineStartLabel insideSubContext finallyContext subInfo insideSubContext InsideSubRoutineFlowContext flowContext subInfo finallyBlock analyseCode currentScope finallyContext FinallyFlowContext flowContext finallyBlock flowInfo unconditionalInits subInfo FlowInfo DEAD_END isSubRoutineEscaping problemReporter finallyMustCompleteNormally finallyBlock subRoutineInits subInfo ExceptionHandlingFlowContext handlingContext ExceptionHandlingFlowContext insideSubContext flowContext insideSubContext tryBlock caughtExceptionTypes flowInfo unconditionalInits FlowInfo tryInfo tryBlock isEmptyBlock tryInfo flowInfo tryBlockExit tryInfo tryBlock analyseCode currentScope handlingContext flowInfo tryBlockExit tryInfo isReachable handlingContext complainIfUnusedExceptionHandlers catchArguments catchCount catchExits catchCount catchBlocks catchCount FlowInfo catchInfo flowInfo unconditionalInits addPotentialInitializationsFrom handlingContext initsOnException caughtExceptionTypes unconditionalInits addPotentialInitializationsFrom tryInfo unconditionalInits addPotentialInitializationsFrom handlingContext initsOnReturn catchInfo markAsDefinitelyAssigned catchArguments throwSomething uncheckedExceptionTypes notNil uncheckedExceptionTypes ifTrue catchInits addPotentialInitializationsFrom tryInits handlingContext initsOnException caughtExceptionTypes isReachable tryBlock catchInfo setReachMode FlowInfo catchInfo catchBlocks analyseCode currentScope insideSubContext flowContext insideSubContext catchInfo catchExits catchInfo isReachable tryInfo tryInfo mergedWith catchInfo unconditionalInits subRoutineStartLabel mergedInitStateIndex currentScope methodScope recordInitializationStates tryInfo tryInfo finallyContext complainOnRedundantFinalAssignments tryInfo isReachable tryInfo addPotentialInitializationsFrom insideSubContext initsOnReturn insideSubContext initsOnReturn currentScope subInfo FlowInfo DEAD_END mergedInitStateIndex currentScope methodScope recordInitializationStates subInfo subInfo FlowInfo mergedInfo tryInfo addInitializationsFrom subInfo mergedInitStateIndex currentScope methodScope recordInitializationStates mergedInfo mergedInfo
public boolean is Sub Routine Escaping return is Sub Routine Escaping  isSubRoutineEscaping isSubRoutineEscaping
Try statement code generation with or without jsr bytecode use post 1 5 target level cannot use jsr bytecode must instead inline finally block return Address is only allocated if jsr is allowed public void generate Code Block Scope current Scope Code Stream code Stream if bits Is ReachableMASK 0 return in case the labels needs to be reinitialized when the code generation is restarted in wide mode if this any Exception Labels Count 0 this any Exception Labels NO EXCEPTION HANDLER this any Exception Labels Count 0 int pc code Stream position final int NO FINALLY 0 no finally block final int FINALLY SUBROUTINE 1 finally is generated as a subroutine using jsr ret bytecodes final int FINALLY DOES NOT COMPLETE 2 non returning finally is optimized with only one instance of finally block final int FINALLY MUST BE INLINED 3 finally block must be inlined since cannot use jsr ret bytecodes 1 5 int finally Mode if sub Routine Start Label null finally Mode NO FINALLY else if this is Sub Routine Escaping finally Mode FINALLY DOES NOT COMPLETE else if scope environment options inline Jsr Bytecode finally Mode FINALLY MUST BE INLINED else finally Mode FINALLY SUBROUTINE boolean requires Natural Exit false preparing exception labels int max Catches Exception Label exception Labels new Exception Label max Catches catch Arguments null 0 catch Arguments length for int i 0 i max Catches i exception Labels i new Exception Label code Stream catch Arguments i binding type if sub Routine Start Label null sub Routine Start Label initialize code Stream this enter Any Exception Handler code Stream generate the try block try Block generate Code scope code Stream boolean try Block Has Some Code code Stream position pc flag telling if some bytecodes were issued inside the try block place end positions of user defined exception labels if try Block Has Some Code natural exit may require subroutine invocation if finally null Label natural Exit Label new Label code Stream if try Block Exit int position code Stream position switch finally Mode case FINALLY SUBROUTINE case FINALLY MUST BE INLINED requires Natural Exit true fall through case NO FINALLY code Stream goto  natural Exit Label break case FINALLY DOES NOT COMPLETE code Stream goto  sub Routine Start Label break code Stream update Last Recorded EndPC position goto is tagged as part of the try block for int i 0 i max Catches i exception Labels i place End generate sequence of handler all starting by storing the TOS exception thrown into their own catch variables the one specified in the source that must denote the handled exception if catch Arguments null this exit Any Exception Handler else for int i 0 i max Catches i May loose some local variable initializations affecting the local variable attributes if pre Try Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope pre Try Init State Index exception Labels i place code Stream incr Stack Size 1 optimizing the case where the exception variable is not actually used Local Variable Binding catch Var int varPC code Stream position if catch Var catch Arguments i binding resolved Position 1 code Stream store catch Var false catch Var record Initialization StartPC code Stream position code Stream add Visible Local Variable catch Var else code Stream pop code Stream record Positions From varPC catch Arguments i source Start Keep track of the pcs at diverging point for computing the local attribute since not passing the catch Scope the block generation will exit User Scope catch Scope catch Blocks i generate Code scope code Stream if i max Catches 1 this exit Any Exception Handler if catch Exits i switch finally Mode case FINALLY SUBROUTINE case FINALLY MUST BE INLINED requires Natural Exit true fall through case NO FINALLY code Stream goto  natural Exit Label break case FINALLY DOES NOT COMPLETE code Stream goto  sub Routine Start Label break extra handler for trailing natural exit will be fixed up later on when natural exit is generated below Exception Label natural Exit Exception Handler finally Mode FINALLY SUBROUTINE requires Natural Exit this enter Any Exception Handler code Stream null addition of a special handler so as to ensure that any uncaught exception or exception thrown inside catch blocks will run the finally block int finally Sequence StartPC code Stream position if sub Routine Start Label null the additional handler is doing jsr finally Block and rethrow TOS exception this place All Any Exception Handlers if pre Try Init State Index 1 reset initialization state as for a normal catch block code Stream remove Not Definitely Assigned Variables current Scope pre Try Init State Index code Stream incr Stack Size 1 switch finally Mode case FINALLY SUBROUTINE code Stream store any Exception Variable false code Stream jsr sub Routine Start Label code Stream load any Exception Variable code Stream athrow sub Routine Start Label place code Stream incr Stack Size 1 code Stream store return Address Variable false code Stream record Positions From finally Sequence StartPC finally Block source Start finally Block generate Code scope code Stream int position code Stream position code Stream ret return Address Variable resolved Position code Stream update Last Recorded EndPC position code Stream record Positions From position finally Block source End the ret bytecode is part of the subroutine break case FINALLY MUST BE INLINED code Stream store any Exception Variable false this finally Block generate Code current Scope code Stream code Stream load any Exception Variable code Stream athrow sub Routine Start Label place code Stream record Positions From finally Sequence StartPC finally Block source Start break case FINALLY DOES NOT COMPLETE code Stream pop sub Routine Start Label place code Stream record Positions From finally Sequence StartPC finally Block source Start finally Block generate Code scope code Stream break will naturally fall into subsequent code after subroutine invocation natural Exit Label place if requires Natural Exit switch finally Mode case FINALLY SUBROUTINE int position code Stream position fix up natural exit handler natural Exit Exception Handler place Start code Stream jsr sub Routine Start Label natural Exit Exception Handler place End code Stream record Positions From position finally Block source Start break case FINALLY MUST BE INLINED May loose some local variable initializations affecting the local variable attributes needed since any exception handler got inlined subroutine if pre Try Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope pre Try Init State Index entire sequence for finally is associated to finally block finally Block generate Code scope code Stream break case FINALLY DOES NOT COMPLETE break else no subroutine simply position end label natural exit end natural Exit Label place else try block had no effect only generate the body of the finally block if any if sub Routine Start Label null finally Block generate Code scope code Stream May loose some local variable initializations affecting the local variable attributes if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index code Stream add Definitely Assigned Variables current Scope merged Init State Index code Stream record Positions From pc this source Start  returnAddress generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK anyExceptionLabelsCount anyExceptionLabels NO_EXCEPTION_HANDLER anyExceptionLabelsCount codeStream NO_FINALLY FINALLY_SUBROUTINE FINALLY_DOES_NOT_COMPLETE FINALLY_MUST_BE_INLINED finallyMode subRoutineStartLabel finallyMode NO_FINALLY isSubRoutineEscaping finallyMode FINALLY_DOES_NOT_COMPLETE inlineJsrBytecode finallyMode FINALLY_MUST_BE_INLINED finallyMode FINALLY_SUBROUTINE requiresNaturalExit maxCatches ExceptionLabel exceptionLabels ExceptionLabel maxCatches catchArguments catchArguments maxCatches exceptionLabels ExceptionLabel codeStream catchArguments subRoutineStartLabel subRoutineStartLabel codeStream enterAnyExceptionHandler codeStream tryBlock generateCode codeStream tryBlockHasSomeCode codeStream tryBlockHasSomeCode naturalExitLabel codeStream tryBlockExit codeStream finallyMode FINALLY_SUBROUTINE FINALLY_MUST_BE_INLINED requiresNaturalExit NO_FINALLY codeStream goto_ naturalExitLabel FINALLY_DOES_NOT_COMPLETE codeStream goto_ subRoutineStartLabel codeStream updateLastRecordedEndPC maxCatches exceptionLabels placeEnd catchArguments exitAnyExceptionHandler maxCatches preTryInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope preTryInitStateIndex exceptionLabels codeStream incrStackSize LocalVariableBinding catchVar codeStream catchVar catchArguments resolvedPosition codeStream catchVar catchVar recordInitializationStartPC codeStream codeStream addVisibleLocalVariable catchVar codeStream codeStream recordPositionsFrom catchArguments sourceStart catchScope exitUserScope catchScope catchBlocks generateCode codeStream maxCatches exitAnyExceptionHandler catchExits finallyMode FINALLY_SUBROUTINE FINALLY_MUST_BE_INLINED requiresNaturalExit NO_FINALLY codeStream goto_ naturalExitLabel FINALLY_DOES_NOT_COMPLETE codeStream goto_ subRoutineStartLabel ExceptionLabel naturalExitExceptionHandler finallyMode FINALLY_SUBROUTINE requiresNaturalExit enterAnyExceptionHandler codeStream finallySequenceStartPC codeStream subRoutineStartLabel finallyBlock placeAllAnyExceptionHandlers preTryInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope preTryInitStateIndex codeStream incrStackSize finallyMode FINALLY_SUBROUTINE codeStream anyExceptionVariable codeStream subRoutineStartLabel codeStream anyExceptionVariable codeStream subRoutineStartLabel codeStream incrStackSize codeStream returnAddressVariable codeStream recordPositionsFrom finallySequenceStartPC finallyBlock sourceStart finallyBlock generateCode codeStream codeStream codeStream returnAddressVariable resolvedPosition codeStream updateLastRecordedEndPC codeStream recordPositionsFrom finallyBlock sourceEnd FINALLY_MUST_BE_INLINED codeStream anyExceptionVariable finallyBlock generateCode currentScope codeStream codeStream anyExceptionVariable codeStream subRoutineStartLabel codeStream recordPositionsFrom finallySequenceStartPC finallyBlock sourceStart FINALLY_DOES_NOT_COMPLETE codeStream subRoutineStartLabel codeStream recordPositionsFrom finallySequenceStartPC finallyBlock sourceStart finallyBlock generateCode codeStream naturalExitLabel requiresNaturalExit finallyMode FINALLY_SUBROUTINE codeStream naturalExitExceptionHandler placeStart codeStream subRoutineStartLabel naturalExitExceptionHandler placeEnd codeStream recordPositionsFrom finallyBlock sourceStart FINALLY_MUST_BE_INLINED preTryInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope preTryInitStateIndex finallyBlock generateCode codeStream FINALLY_DOES_NOT_COMPLETE naturalExitLabel subRoutineStartLabel finallyBlock generateCode codeStream mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex codeStream addDefinitelyAssignedVariables currentScope mergedInitStateIndex codeStream recordPositionsFrom sourceStart
public void generate Sub Routine Invocation Block Scope current Scope Code Stream code Stream if this is Sub Routine Escaping code Stream goto  this sub Routine Start Label else if current Scope environment options inline Jsr Bytecode cannot use jsr bytecode then simply inline the subroutine this finally Block generate Code current Scope code Stream else classic subroutine invocation distinguish case of non returning subroutine code Stream jsr this sub Routine Start Label  generateSubRoutineInvocation BlockScope currentScope CodeStream codeStream isSubRoutineEscaping codeStream goto_ subRoutineStartLabel currentScope inlineJsrBytecode finallyBlock generateCode currentScope codeStream codeStream subRoutineStartLabel
public String Buffer print Statement int indent String Buffer output print Indent indent output append try n NON NLS 1 try Block print Statement indent 1 output NON NLS 1 catches if catch Blocks null for int i 0 i catch Blocks length i output append n print Indent indent output append catch NON NLS 1 catch Arguments i print 0 output append NON NLS 1 catch Blocks i print Statement indent 1 output finally if finally Block null output append n print Indent indent output append finally n NON NLS 1 finally Block print Statement indent 1 output return output  StringBuffer printStatement StringBuffer printIndent tryBlock printStatement catchBlocks catchBlocks printIndent catchArguments catchBlocks printStatement finallyBlock printIndent finallyBlock printStatement
public void resolve Block Scope upper Scope special scope for secret locals optimization this scope new Block Scope upper Scope Block Scope try Scope new Block Scope scope Block Scope finally Scope null if finally Block null if finally Block is Empty Block if finally Block bits Undocumented Empty BlockMASK 0 scope problem Reporter undocumented Empty Block finally Block source Start finally Block source End else finally Scope new Block Scope scope false don t add it yet to parent scope provision for returning and forcing the finally block to run Method Scope method Scope scope method Scope the type does not matter as long as it is not a base type if upper Scope environment options inline Jsr Bytecode this return Address Variable new Local Variable Binding Secret Return Name upper Scope get Java Lang Object Acc Default false finally Scope add Local Variable return Address Variable this return Address Variable constant NotA Constant not inlinable this sub Routine Start Label new Label this any Exception Variable new Local Variable Binding Secret Any Handler Name scope get Java Lang Throwable Acc Default false finally Scope add Local Variable this any Exception Variable this any Exception Variable constant NotA Constant not inlinable if method Scope is Inside Initializer Method Binding method Binding Abstract Method Declaration method Scope reference Context binding if method Binding null Type Binding method Return Type method Binding return Type if method Return Type id T void this secret Return Value new Local Variable Binding Secret Local Declaration Name method Return Type Acc Default false finally Scope add Local Variable this secret Return Value this secret Return Value constant NotA Constant not inlinable finally Block resolve Using finally Scope force the finally scope to have variable positions shifted after its try scope and catch ones finally Scope shift Scopes new Block Scope catch Arguments null 1 catch Arguments length 1 finally Scope shift Scopes 0 try Scope this try Block resolve Using try Scope arguments type are checked against Java Lang Throwable in resolve For Catch if this catch Blocks null int length this catch Arguments length Type Binding argument Types new Type Binding length for int i 0 i length i Block Scope catch Scope new Block Scope scope if finally Scope null finally Scope shift Scopes i 1 catch Scope side effect on catch Scope in resolve For Catch if argument Types i catch Arguments i resolve For Catch catch Scope null return catch Blocks i resolve Using catch Scope Verify that the catch clause are ordered in the right way more specialized first this caught Exception Types new Reference Binding length for int i 0 i length i caught Exception Types i Reference Binding argument Types i for int j 0 j i j if caught Exception Types i is Compatible With argument Types j scope problem Reporter wrong Sequence Of Exception Types Error this caught Exception Types i i argument Types j else caught Exception Types new Reference Binding 0 if finally Scope null add finally Scope as last subscope so it can be shifted behind try catch subscopes the shifting is necessary to achieve no overlay in between the finally scope and its sibling in term of local variable positions this scope add Subscope finally Scope  BlockScope upperScope BlockScope upperScope BlockScope tryScope BlockScope BlockScope finallyScope finallyBlock finallyBlock isEmptyBlock finallyBlock UndocumentedEmptyBlockMASK problemReporter undocumentedEmptyBlock finallyBlock sourceStart finallyBlock sourceEnd finallyScope BlockScope MethodScope methodScope methodScope upperScope inlineJsrBytecode returnAddressVariable LocalVariableBinding SecretReturnName upperScope getJavaLangObject AccDefault finallyScope addLocalVariable returnAddressVariable returnAddressVariable NotAConstant subRoutineStartLabel anyExceptionVariable LocalVariableBinding SecretAnyHandlerName getJavaLangThrowable AccDefault finallyScope addLocalVariable anyExceptionVariable anyExceptionVariable NotAConstant methodScope isInsideInitializer MethodBinding methodBinding AbstractMethodDeclaration methodScope referenceContext methodBinding TypeBinding methodReturnType methodBinding returnType methodReturnType T_void secretReturnValue LocalVariableBinding SecretLocalDeclarationName methodReturnType AccDefault finallyScope addLocalVariable secretReturnValue secretReturnValue NotAConstant finallyBlock resolveUsing finallyScope finallyScope shiftScopes BlockScope catchArguments catchArguments finallyScope shiftScopes tryScope tryBlock resolveUsing tryScope JavaLangThrowable resolveForCatch catchBlocks catchArguments TypeBinding argumentTypes TypeBinding BlockScope catchScope BlockScope finallyScope finallyScope shiftScopes catchScope catchScope resolveForCatch argumentTypes catchArguments resolveForCatch catchScope catchBlocks resolveUsing catchScope caughtExceptionTypes ReferenceBinding caughtExceptionTypes ReferenceBinding argumentTypes caughtExceptionTypes isCompatibleWith argumentTypes problemReporter wrongSequenceOfExceptionTypesError caughtExceptionTypes argumentTypes caughtExceptionTypes ReferenceBinding finallyScope finallyScope addSubscope finallyScope
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope try Block traverse visitor scope if catch Arguments null for int i 0 max catch Blocks length i max i catch Arguments i traverse visitor scope catch Blocks i traverse visitor scope if finally Block null finally Block traverse visitor scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope tryBlock catchArguments catchBlocks catchArguments catchBlocks finallyBlock finallyBlock endVisit blockScope

public Type Declaration enclosing Type for member types only public Type Declaration Compilation Result compilation Result this compilation Result compilation Result  TypeDeclaration enclosingType TypeDeclaration CompilationResult compilationResult compilationResult compilationResult
public void abort int abort Level I Problem problem switch abort Level case Abort Compilation throw new Abort Compilation this compilation Result problem case Abort Compilation Unit throw new Abort Compilation Unit this compilation Result problem case Abort Method throw new Abort Method this compilation Result problem default throw new Abort Type this compilation Result problem  abortLevel IProblem abortLevel AbortCompilation AbortCompilation compilationResult AbortCompilationUnit AbortCompilationUnit compilationResult AbortMethod AbortMethod compilationResult AbortType compilationResult
This method is responsible for adding a clinit method declaration to the type method collections Note that this implementation is inserting it in first place as VAJ or javac and that this impacts the behavior of the method Constant Pool reset For Clinit int int in so far as the latter will have to reset the constant pool state accordingly if it was added first it does not need to preserve some of the method specific cached entries since this will be the first method inserts the clinit method declaration in the first position see org eclipse jdt internal compiler codegen Constant Pool reset For Clinit int int public final void add Clinit see comment on need Class Init Method if need Class Init Method int length Abstract Method Declaration method Declarations if method Declarations this methods null length 0 method Declarations new Abstract Method Declaration 1 else length method Declarations length System arraycopy method Declarations 0 method Declarations new Abstract Method Declaration length 1 1 length Clinit clinit new Clinit this compilation Result method Declarations 0 clinit clinit is added in first location so as to minimize the use of ldcw big consumer of constant inits clinit declaration Source Start clinit source Start source Start clinit declaration Source End clinit source End source End clinit body End source End this methods method Declarations  ConstantPool resetForClinit ConstantPool resetForClinit addClinit needClassInitMethod needClassInitMethod AbstractMethodDeclaration methodDeclarations methodDeclarations methodDeclarations AbstractMethodDeclaration methodDeclarations methodDeclarations methodDeclarations AbstractMethodDeclaration compilationResult methodDeclarations declarationSourceStart sourceStart sourceStart declarationSourceEnd sourceEnd sourceEnd bodyEnd sourceEnd methodDeclarations
public Method Declaration add Missing Abstract Method For Method Binding method Binding Type Binding argument Types method Binding parameters int arguments Length argument Types length the constructor Method Declaration method Declaration new Method Declaration this compilation Result method Declaration selector method Binding selector method Declaration source Start source Start method Declaration source End source End method Declaration modifiers method Binding get Access Flags Acc Abstract if arguments Length 0 String base Name arg NON NLS 1 Argument arguments method Declaration arguments new Argument arguments Length for int i arguments Length i 0 arguments i new Argument base Name i to Char Array 0L null type ref Acc Default adding the constructor in the methods list if this missing Abstract Methods null this missing Abstract Methods new Method Declaration method Declaration else Method Declaration new Methods System arraycopy this missing Abstract Methods 0 new Methods new Method Declaration this missing Abstract Methods length 1 1 this missing Abstract Methods length new Methods 0 method Declaration this missing Abstract Methods new Methods BINDING UPDATE method Declaration binding new Method Binding method Declaration modifiers method Declaration method Binding selector method Binding return Type arguments Length 0 No Parameters argument Types arguments bindings method Binding thrown Exceptions exceptions binding declaring Class method Declaration scope new Method Scope scope method Declaration true method Declaration bind Arguments if binding methods null binding methods new Method Binding method Declaration binding else Method Binding new Methods System arraycopy binding methods 0 new Methods new Method Binding binding methods length 1 1 binding methods length new Methods 0 method Declaration binding binding methods new Methods return method Declaration  MethodDeclaration addMissingAbstractMethodFor MethodBinding methodBinding TypeBinding argumentTypes methodBinding argumentsLength argumentTypes MethodDeclaration methodDeclaration MethodDeclaration compilationResult methodDeclaration methodBinding methodDeclaration sourceStart sourceStart methodDeclaration sourceEnd sourceEnd methodDeclaration methodBinding getAccessFlags AccAbstract argumentsLength baseName methodDeclaration argumentsLength argumentsLength baseName toCharArray AccDefault missingAbstractMethods missingAbstractMethods MethodDeclaration methodDeclaration MethodDeclaration newMethods missingAbstractMethods newMethods MethodDeclaration missingAbstractMethods missingAbstractMethods newMethods methodDeclaration missingAbstractMethods newMethods methodDeclaration MethodBinding methodDeclaration methodDeclaration methodBinding methodBinding returnType argumentsLength NoParameters argumentTypes methodBinding thrownExceptions declaringClass methodDeclaration MethodScope methodDeclaration methodDeclaration bindArguments MethodBinding methodDeclaration MethodBinding newMethods newMethods MethodBinding newMethods methodDeclaration newMethods methodDeclaration
Flow analysis for a local innertype public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info if ignore Further Investigation return flow Info try if flow Info is Reachable bits Is ReachableMASK Local Type Binding local Type Local Type Binding binding local Type set Constant Pool Name current Scope compilation Unit Scope compute Constant Pool Name local Type manage Enclosing Instance Access If Necessary current Scope flow Info update Max Field Count propagate down the max field count internal Analyse Code flow Context flow Info catch Abort Type e this ignore Further Investigation true return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo ignoreFurtherInvestigation flowInfo flowInfo isReachable IsReachableMASK LocalTypeBinding localType LocalTypeBinding localType setConstantPoolName currentScope compilationUnitScope computeConstantPoolName localType manageEnclosingInstanceAccessIfNecessary currentScope flowInfo updateMaxFieldCount internalAnalyseCode flowContext flowInfo AbortType ignoreFurtherInvestigation flowInfo
Flow analysis for a member innertype public void analyse Code Class Scope enclosing Class Scope if ignore Further Investigation return try propagate down the max field count update Max Field Count internal Analyse Code null Flow Info initial max Field Count catch Abort Type e this ignore Further Investigation true  analyseCode ClassScope enclosingClassScope ignoreFurtherInvestigation updateMaxFieldCount internalAnalyseCode FlowInfo maxFieldCount AbortType ignoreFurtherInvestigation
Flow analysis for a local member innertype public void analyse Code Class Scope current Scope Flow Context flow Context Flow Info flow Info if ignore Further Investigation return try if flow Info is Reachable bits Is ReachableMASK Local Type Binding local Type Local Type Binding binding local Type set Constant Pool Name current Scope compilation Unit Scope compute Constant Pool Name local Type manage Enclosing Instance Access If Necessary current Scope flow Info update Max Field Count propagate down the max field count internal Analyse Code flow Context flow Info catch Abort Type e this ignore Further Investigation true  analyseCode ClassScope currentScope FlowContext flowContext FlowInfo flowInfo ignoreFurtherInvestigation flowInfo isReachable IsReachableMASK LocalTypeBinding localType LocalTypeBinding localType setConstantPoolName currentScope compilationUnitScope computeConstantPoolName localType manageEnclosingInstanceAccessIfNecessary currentScope flowInfo updateMaxFieldCount internalAnalyseCode flowContext flowInfo AbortType ignoreFurtherInvestigation
Flow analysis for a package member type public void analyse Code Compilation Unit Scope unit Scope if ignore Further Investigation return try internal Analyse Code null Flow Info initial max Field Count catch Abort Type e this ignore Further Investigation true  analyseCode CompilationUnitScope unitScope ignoreFurtherInvestigation internalAnalyseCode FlowInfo maxFieldCount AbortType ignoreFurtherInvestigation
public boolean check Constructors Parser parser if a constructor has not the name of the type convert it into a method with null as its return type boolean has Constructor false if methods null for int i methods length i 0 Abstract Method Declaration am if am methods i is Constructor if Char Operation equals am selector name the constructor was in fact a method with no return type unless an explicit constructor call was supplied Constructor Declaration c Constructor Declaration am if c constructor Call null c constructor Call is Implicit Super changed to a method Method Declaration m parser convert To Method Declaration c this compilation Result methods i m else if this is Interface report the problem and continue the parsing parser problem Reporter interface Cannot Have Constructors Constructor Declaration am has Constructor true return has Constructor  checkConstructors hasConstructor AbstractMethodDeclaration isConstructor CharOperation ConstructorDeclaration ConstructorDeclaration constructorCall constructorCall isImplicitSuper MethodDeclaration convertToMethodDeclaration compilationResult isInterface problemReporter interfaceCannotHaveConstructors ConstructorDeclaration hasConstructor hasConstructor
public Compilation Result compilation Result return this compilation Result  CompilationResult compilationResult compilationResult
public Constructor Declaration creates Internal Constructor boolean need Explicit Constructor Call boolean need To Insert Add to method set the default constuctor that just recall the super constructor with no arguments The arguments type will be positionned by the TC so just use the default int instead of just null consistency purpose the constructor Constructor Declaration constructor new Constructor Declaration this compilation Result constructor is Default Constructor true constructor selector name if modifiers Acc Default constructor modifiers this bits AST Node Is Member TypeMASK 0 modifiers Acc Private 0 Acc Default modifiers Acc VisibilityMASK if you change this setting please update the Source Indexer2 build Type Declaration Type Declaration char method constructor declaration Source Start constructor source Start source Start constructor declaration Source End constructor source End constructor body End source End the super call inside the constructor if need Explicit Constructor Call constructor constructor Call Super Reference implicit Super Constructor Call constructor constructor Call source Start source Start constructor constructor Call source End source End adding the constructor in the methods list if need To Insert if methods null methods new Abstract Method Declaration constructor else Abstract Method Declaration new Methods System arraycopy methods 0 new Methods new Abstract Method Declaration methods length 1 1 methods length new Methods 0 constructor methods new Methods return constructor  ConstructorDeclaration createsInternalConstructor needExplicitConstructorCall needToInsert ConstructorDeclaration ConstructorDeclaration compilationResult isDefaultConstructor AccDefault ASTNode IsMemberTypeMASK AccPrivate AccDefault AccVisibilityMASK SourceIndexer2 buildTypeDeclaration TypeDeclaration declarationSourceStart sourceStart sourceStart declarationSourceEnd sourceEnd bodyEnd sourceEnd needExplicitConstructorCall constructorCall SuperReference implicitSuperConstructorCall constructorCall sourceStart sourceStart constructorCall sourceEnd sourceEnd needToInsert AbstractMethodDeclaration AbstractMethodDeclaration newMethods newMethods AbstractMethodDeclaration newMethods newMethods
anonymous type constructor creation public Method Binding creates Internal Constructor With Binding Method Binding inherited Constructor Binding Add to method set the default constuctor that just recall the super constructor with the same arguments String base Name anonymous NON NLS 1 Type Binding argument Types inherited Constructor Binding parameters int arguments Length argument Types length the constructor Constructor Declaration cd new Constructor Declaration this compilation Result cd selector new char x no maining cd source Start source Start cd source End source End cd modifiers modifiers Acc VisibilityMASK cd is Default Constructor true if arguments Length 0 Argument arguments cd arguments new Argument arguments Length for int i arguments Length i 0 arguments i new Argument base Name i to Char Array 0L null type ref Acc Default the super call inside the constructor cd constructor Call Super Reference implicit Super Constructor Call cd constructor Call source Start source Start cd constructor Call source End source End if arguments Length 0 Expression args args cd constructor Call arguments new Expression arguments Length for int i arguments Length i 0 args i new Single Name Reference base Name i to Char Array 0L adding the constructor in the methods list if methods null methods new Abstract Method Declaration cd else Abstract Method Declaration new Methods System arraycopy methods 0 new Methods new Abstract Method Declaration methods length 1 1 methods length new Methods 0 cd methods new Methods BINDING UPDATE cd binding new Method Binding cd modifiers method Declaration arguments Length 0 No Parameters argument Types arguments bindings inherited Constructor Binding thrown Exceptions exceptions binding declaring Class cd scope new Method Scope scope cd true cd bind Arguments cd constructor Call resolve cd scope if binding methods null binding methods new Method Binding cd binding else Method Binding new Methods System arraycopy binding methods 0 new Methods new Method Binding binding methods length 1 1 binding methods length new Methods 0 cd binding binding methods new Methods return cd binding  MethodBinding createsInternalConstructorWithBinding MethodBinding inheritedConstructorBinding baseName TypeBinding argumentTypes inheritedConstructorBinding argumentsLength argumentTypes ConstructorDeclaration ConstructorDeclaration compilationResult sourceStart sourceStart sourceEnd sourceEnd AccVisibilityMASK isDefaultConstructor argumentsLength argumentsLength argumentsLength baseName toCharArray AccDefault constructorCall SuperReference implicitSuperConstructorCall constructorCall sourceStart sourceStart constructorCall sourceEnd sourceEnd argumentsLength constructorCall argumentsLength argumentsLength SingleNameReference baseName toCharArray AbstractMethodDeclaration AbstractMethodDeclaration newMethods newMethods AbstractMethodDeclaration newMethods newMethods MethodBinding methodDeclaration argumentsLength NoParameters argumentTypes inheritedConstructorBinding thrownExceptions declaringClass MethodScope bindArguments constructorCall MethodBinding MethodBinding newMethods newMethods MethodBinding newMethods newMethods
public Field Declaration declaration Of Field Binding field Binding if field Binding null for int i 0 max this fields length i max i Field Declaration field Decl if field Decl this fields i binding field Binding return field Decl return null  FieldDeclaration declarationOf FieldBinding fieldBinding fieldBinding FieldDeclaration fieldDecl fieldDecl fieldBinding fieldDecl
public Type Declaration declaration Of Member Type Binding member Type Binding if member Type Binding null for int i 0 max this member Types length i max i Type Declaration member Type Decl if member Type Decl this member Types i binding member Type Binding return member Type Decl return null  TypeDeclaration declarationOf MemberTypeBinding memberTypeBinding memberTypeBinding memberTypes TypeDeclaration memberTypeDecl memberTypeDecl memberTypes memberTypeBinding memberTypeDecl
public Abstract Method Declaration declaration Of Method Binding method Binding if method Binding null for int i 0 max this methods length i max i Abstract Method Declaration method Decl if method Decl this methods i binding method Binding return method Decl return null  AbstractMethodDeclaration declarationOf MethodBinding methodBinding methodBinding AbstractMethodDeclaration methodDecl methodDecl methodBinding methodDecl
public Type Declaration declaration Of Type char type Name int type Name Length type Name length if type Name Length 1 Char Operation equals type Name 0 this name return null if type Name Length 1 return this char sub Type Name new char type Name Length 1 System arraycopy type Name 1 sub Type Name 0 type Name Length 1 for int i 0 i this member Types length i Type Declaration type Decl this member Types i declaration Of Type sub Type Name if type Decl null return type Decl return null  TypeDeclaration declarationOfType typeName typeNameLength typeName typeNameLength CharOperation typeName typeNameLength subTypeName typeNameLength typeName subTypeName typeNameLength memberTypes TypeDeclaration typeDecl memberTypes declarationOfType subTypeName typeDecl typeDecl
Generic bytecode generation for type public void generate Code Class File enclosing Class File if has Been Generated return has Been Generated true if ignore Further Investigation if binding null return Class File create Problem Type this scope reference Compilation Unit compilation Result return try create the result for a compiled type Class File class File new Class File binding enclosing Class File false generate all fiels class File add Field Infos record the inner type inside its own class file to be able to generate inner classes attributes if binding is Member Type class File record Enclosing Type Attributes binding if binding is Local Type enclosing Class File record Nested Local Attribute binding class File record Nested Local Attribute binding if member Types null for int i 0 max member Types length i max i record the inner type inside its own class file to be able to generate inner classes attributes class File record Nested Member Attribute member Types i binding member Types i generate Code scope class File generate all methods class File set For Method Infos if methods null for int i 0 max methods length i max i methods i generate Code scope class File class File generate Missing Abstract Methods this missing Abstract Methods scope reference Compilation Unit compilation Result generate all methods class File add Special Methods if ignore Further Investigation trigger problem type generation for code gen errors throw new Abort Type scope reference Compilation Unit compilation Result null finalize the compiled type result class File add Attributes scope reference Compilation Unit compilation Result record binding constant Pool Name class File catch Abort Type e if binding null return Class File create Problem Type this scope reference Compilation Unit compilation Result  generateCode ClassFile enclosingClassFile hasBeenGenerated hasBeenGenerated ignoreFurtherInvestigation ClassFile createProblemType referenceCompilationUnit compilationResult ClassFile classFile ClassFile enclosingClassFile classFile addFieldInfos isMemberType classFile recordEnclosingTypeAttributes isLocalType enclosingClassFile recordNestedLocalAttribute classFile recordNestedLocalAttribute memberTypes memberTypes classFile recordNestedMemberAttribute memberTypes memberTypes generateCode classFile classFile setForMethodInfos generateCode classFile classFile generateMissingAbstractMethods missingAbstractMethods referenceCompilationUnit compilationResult classFile addSpecialMethods ignoreFurtherInvestigation AbortType referenceCompilationUnit compilationResult classFile addAttributes referenceCompilationUnit compilationResult constantPoolName classFile AbortType ClassFile createProblemType referenceCompilationUnit compilationResult
Bytecode generation for a local inner type API as a normal statement code gen public void generate Code Block Scope block Scope Code Stream code Stream if this bits Is ReachableMASK 0 return if has Been Generated return int pc code Stream position if binding null Nested Type Binding binding compute Synthetic Argument Slot Sizes generate Code code Stream class File code Stream record Positions From pc this source Start  generateCode BlockScope blockScope CodeStream codeStream IsReachableMASK hasBeenGenerated codeStream NestedTypeBinding computeSyntheticArgumentSlotSizes generateCode codeStream classFile codeStream recordPositionsFrom sourceStart
Bytecode generation for a member inner type public void generate Code Class Scope class Scope Class File enclosing Class File if has Been Generated return if binding null Nested Type Binding binding compute Synthetic Argument Slot Sizes generate Code enclosing Class File  generateCode ClassScope classScope ClassFile enclosingClassFile hasBeenGenerated NestedTypeBinding computeSyntheticArgumentSlotSizes generateCode enclosingClassFile
Bytecode generation for a package member public void generate Code Compilation Unit Scope unit Scope generate Code Class File null  generateCode CompilationUnitScope unitScope generateCode ClassFile
public boolean has Errors return this ignore Further Investigation  hasErrors ignoreFurtherInvestigation
Common flow analysis for all types public void internal Analyse Code Flow Context flow Context Flow Info flow Info if this binding is Private this binding is Private Used if scope reference Compilation Unit compilation Result has Syntax Error scope problem Reporter unused Private Type this Initialization Flow Context initializer Context new Initialization Flow Context null this initializer Scope Initialization Flow Context static Initializer Context new Initialization Flow Context null this static Initializer Scope Flow Info non Static Field Info flow Info copy unconditional Inits discard Field Initializations Flow Info static Field Info flow Info copy unconditional Inits discard Field Initializations if fields null for int i 0 count fields length i count i Field Declaration field fields i if field is Static if field is Field static Initializer Context handled Exceptions No Exceptions no exception is allowed jls8 3 2 else static Initializer Context handled Exceptions Any Exception tolerate them all and record them static Field Info field analyse Code static Initializer Scope static Initializer Context static Field Info in case the initializer is not reachable use a reinitialized flow Info and enter a fake reachable branch since the previous initializer already got the blame if static Field Info Flow Info DEAD END static Initializer Scope problem Reporter initializer Must Complete Normally field static Field Info Flow Info initial max Field Count set Reach Mode Flow Info UNREACHABLE else if field is Field initializer Context handled Exceptions No Exceptions no exception is allowed jls8 3 2 else initializer Context handled Exceptions Any Exception tolerate them all and record them non Static Field Info field analyse Code initializer Scope initializer Context non Static Field Info in case the initializer is not reachable use a reinitialized flow Info and enter a fake reachable branch since the previous initializer already got the blame if non Static Field Info Flow Info DEAD END initializer Scope problem Reporter initializer Must Complete Normally field non Static Field Info Flow Info initial max Field Count set Reach Mode Flow Info UNREACHABLE if member Types null for int i 0 count member Types length i count i if flow Context null local type member Types i analyse Code scope flow Context non Static Field Info copy else member Types i analyse Code scope if methods null Unconditional Flow Info outer Info flow Info copy unconditional Inits discard Field Initializations Flow Info constructor Info non Static Field Info unconditional Inits discard Non Field Initializations add Initializations From outer Info for int i 0 count methods length i count i Abstract Method Declaration method methods i if method ignore Further Investigation continue if method is Initialization Method if method is Static clinit method analyse Code scope static Initializer Context static Field Info unconditional Inits discard Non Field Initializations add Initializations From outer Info else constructor method analyse Code scope initializer Context constructor Info copy else regular method method analyse Code scope null flow Info copy  internalAnalyseCode FlowContext flowContext FlowInfo flowInfo isPrivate isPrivateUsed referenceCompilationUnit compilationResult hasSyntaxError problemReporter unusedPrivateType InitializationFlowContext initializerContext InitializationFlowContext initializerScope InitializationFlowContext staticInitializerContext InitializationFlowContext staticInitializerScope FlowInfo nonStaticFieldInfo flowInfo unconditionalInits discardFieldInitializations FlowInfo staticFieldInfo flowInfo unconditionalInits discardFieldInitializations FieldDeclaration isStatic isField staticInitializerContext handledExceptions NoExceptions staticInitializerContext handledExceptions AnyException staticFieldInfo analyseCode staticInitializerScope staticInitializerContext staticFieldInfo flowInfo staticFieldInfo FlowInfo DEAD_END staticInitializerScope problemReporter initializerMustCompleteNormally staticFieldInfo FlowInfo maxFieldCount setReachMode FlowInfo isField initializerContext handledExceptions NoExceptions initializerContext handledExceptions AnyException nonStaticFieldInfo analyseCode initializerScope initializerContext nonStaticFieldInfo flowInfo nonStaticFieldInfo FlowInfo DEAD_END initializerScope problemReporter initializerMustCompleteNormally nonStaticFieldInfo FlowInfo maxFieldCount setReachMode FlowInfo memberTypes memberTypes flowContext memberTypes analyseCode flowContext nonStaticFieldInfo memberTypes analyseCode UnconditionalFlowInfo outerInfo flowInfo unconditionalInits discardFieldInitializations FlowInfo constructorInfo nonStaticFieldInfo unconditionalInits discardNonFieldInitializations addInitializationsFrom outerInfo AbstractMethodDeclaration ignoreFurtherInvestigation isInitializationMethod isStatic analyseCode staticInitializerContext staticFieldInfo unconditionalInits discardNonFieldInitializations addInitializationsFrom outerInfo analyseCode initializerContext constructorInfo analyseCode flowInfo
public boolean is Interface return modifiers Acc Interface 0  isInterface AccInterface
public void manage Enclosing Instance Access If Necessary Block Scope current Scope Flow Info flow Info if flow Info is Reachable return Nested Type Binding nested Type Nested Type Binding binding Method Scope method Scope current Scope method Scope if method Scope is Static method Scope is Constructor Call nested Type add Synthetic Argument And Field binding enclosing Type add superclass enclosing instance arg for anonymous types if necessary if binding is Anonymous Type Reference Binding superclass Binding binding superclass if superclass Binding enclosing Type null superclass Binding is Static if superclass Binding is Local Type Nested Type Binding superclass Binding get Synthetic Field superclass Binding enclosing Type true null nested Type add Synthetic Argument superclass Binding enclosing Type  manageEnclosingInstanceAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable NestedTypeBinding nestedType NestedTypeBinding MethodScope methodScope currentScope methodScope methodScope isStatic methodScope isConstructorCall nestedType addSyntheticArgumentAndField enclosingType isAnonymousType ReferenceBinding superclassBinding superclassBinding enclosingType superclassBinding isStatic superclassBinding isLocalType NestedTypeBinding superclassBinding getSyntheticField superclassBinding enclosingType nestedType addSyntheticArgument superclassBinding enclosingType
public void manage Enclosing Instance Access If Necessary Class Scope current Scope Flow Info flow Info if flow Info is Reachable return Nested Type Binding nested Type Nested Type Binding binding nested Type add Synthetic Argument And Field binding enclosing Type  manageEnclosingInstanceAccessIfNecessary ClassScope currentScope FlowInfo flowInfo flowInfo isReachable NestedTypeBinding nestedType NestedTypeBinding nestedType addSyntheticArgumentAndField enclosingType
A clinit will be requested as soon as static fields or assertions are present It will be eliminated during classfile creation if no bytecode was actually produced based on some optimizations compiler settings public final boolean need Class Init Method always need a clinit when assertions are present if this bits Add AssertionMASK 0 return true if fields null return false if is Interface return true fields are implicitly statics for int i fields length i 0 Field Declaration field fields i need to test the modifier directly while there is no binding yet if field modifiers Acc Static 0 return true return false  needClassInitMethod AddAssertionMASK isInterface FieldDeclaration AccStatic
public void parse Method Parser parser Compilation Unit Declaration unit connect method bodies if unit ignore Method Bodies return members if member Types null int length member Types length for int i 0 i length i member Types i parse Method parser unit methods if methods null int length methods length for int i 0 i length i methods i parse Statements parser unit initializers if fields null int length fields length for int i 0 i length i if fields i instanceof Initializer Initializer fields i parse Statements parser this unit  parseMethod CompilationUnitDeclaration ignoreMethodBodies memberTypes memberTypes memberTypes parseMethod parseStatements parseStatements
public String Buffer print int indent String Buffer output if this bits Is Anonymous TypeMASK 0 print Indent indent output print Header 0 output return print Body indent output  StringBuffer StringBuffer IsAnonymousTypeMASK printIndent printHeader printBody
public String Buffer print Body int indent String Buffer output output append NON NLS 1 if member Types null for int i 0 i member Types length i if member Types i null output append n member Types i print indent 1 output if fields null for int fieldI 0 fieldI fields length fieldI if fields fieldI null output append n fields fieldI print indent 1 output if methods null for int i 0 i methods length i if methods i null output append n methods i print indent 1 output output append n return print Indent indent output append  StringBuffer printBody StringBuffer memberTypes memberTypes memberTypes memberTypes printIndent
public String Buffer print Header int indent String Buffer output print Modifiers this modifiers output output append is Interface interface class NON NLS 1 NON NLS 2 output append name if superclass null output append extends NON NLS 1 superclass print 0 output if super Interfaces null super Interfaces length 0 output append is Interface extends implements NON NLS 2 NON NLS 1 for int i 0 i super Interfaces length i if i 0 output append NON NLS 1 super Interfaces i print 0 output return output  StringBuffer printHeader StringBuffer printModifiers isInterface superInterfaces superInterfaces isInterface superInterfaces superInterfaces
public String Buffer print Statement int tab String Buffer output return print tab output  StringBuffer printStatement StringBuffer
public void resolve if this binding null this ignore Further Investigation true return try if this bits Undocumented Empty BlockMASK 0 this scope problem Reporter undocumented Empty Block this body Start 1 this body End check superclass interfaces if this binding superclass null watch out for Object and other roots if is Type Use Deprecated this binding superclass this scope this scope problem Reporter deprecated Type this binding superclass this superclass if this super Interfaces null for int i this super Interfaces length i 0 if this super Interfaces i resolved Type null if is Type Use Deprecated this super Interfaces i resolved Type this scope this scope problem Reporter deprecated Type this super Interfaces i resolved Type this super Interfaces i this max Field Count 0 int last Visible FieldID 1 if this fields null for int i 0 count this fields length i count i Field Declaration field this fields i if field is Field if field binding null still discover secondary errors if field initialization null field initialization resolve field is Static this static Initializer Scope this initializer Scope this ignore Further Investigation true continue this max Field Count last Visible FieldID field binding id else initializer Initializer field last Visible FieldID last Visible FieldID 1 field resolve field is Static this static Initializer Scope this initializer Scope if this member Types null for int i 0 count this member Types length i count i this member Types i resolve this scope int missing Abstract Methodslength this missing Abstract Methods null 0 this missing Abstract Methods length int methods Length this methods null 0 this methods length if methods Length missing Abstract Methodslength 0xFFFF this scope problem Reporter too Many Methods this if this methods null for int i 0 count this methods length i count i this methods i resolve this scope Resolve javadoc if this javadoc null if this scope null this javadoc resolve this scope else if this binding null this binding is Local Type this scope problem Reporter javadoc Missing this source Start this source End this binding modifiers catch Abort Type e this ignore Further Investigation true return  ignoreFurtherInvestigation UndocumentedEmptyBlockMASK problemReporter undocumentedEmptyBlock bodyStart bodyEnd isTypeUseDeprecated problemReporter deprecatedType superInterfaces superInterfaces superInterfaces resolvedType isTypeUseDeprecated superInterfaces resolvedType problemReporter deprecatedType superInterfaces resolvedType superInterfaces maxFieldCount lastVisibleFieldID FieldDeclaration isField isStatic staticInitializerScope initializerScope ignoreFurtherInvestigation maxFieldCount lastVisibleFieldID lastVisibleFieldID lastVisibleFieldID isStatic staticInitializerScope initializerScope memberTypes memberTypes memberTypes missingAbstractMethodslength missingAbstractMethods missingAbstractMethods methodsLength methodsLength missingAbstractMethodslength problemReporter tooManyMethods isLocalType problemReporter javadocMissing sourceStart sourceEnd AbortType ignoreFurtherInvestigation
public void resolve Block Scope block Scope local type declaration need to build its scope first and proceed with binding s creation if this bits Is Anonymous TypeMASK 0 block Scope add Local Type this if binding null remember local types binding for innerclass emulation propagation block Scope reference Compilation Unit record Local Type Binding binding binding is not set if the receiver could not be created resolve update Max Field Count  BlockScope blockScope IsAnonymousTypeMASK blockScope addLocalType blockScope referenceCompilationUnit LocalTypeBinding updateMaxFieldCount
public void resolve Class Scope upper Scope member scopes are already created request the construction of a binding if local member type if binding null binding instanceof Local Type Binding remember local types binding for innerclass emulation propagation upper Scope reference Compilation Unit record Local Type Binding binding resolve update Max Field Count  ClassScope upperScope LocalTypeBinding upperScope referenceCompilationUnit LocalTypeBinding updateMaxFieldCount
public void resolve Compilation Unit Scope upper Scope top level scope are already created resolve update Max Field Count  CompilationUnitScope upperScope updateMaxFieldCount
public void tag As Having Errors ignore Further Investigation true  tagAsHavingErrors ignoreFurtherInvestigation
Iteration for a package member type public void traverse AST Visitor visitor Compilation Unit Scope unit Scope if ignore Further Investigation return try if visitor visit this unit Scope if superclass null superclass traverse visitor scope if super Interfaces null int super Interface Length super Interfaces length for int i 0 i super Interface Length i super Interfaces i traverse visitor scope if member Types null int member Types Length member Types length for int i 0 i member Types Length i member Types i traverse visitor scope if fields null int fields Length fields length for int i 0 i fields Length i Field Declaration field if field fields i is Static field traverse visitor static Initializer Scope else field traverse visitor initializer Scope if methods null int methods Length methods length for int i 0 i methods Length i methods i traverse visitor scope visitor end Visit this unit Scope catch Abort Type e silent abort  ASTVisitor CompilationUnitScope unitScope ignoreFurtherInvestigation unitScope superInterfaces superInterfaceLength superInterfaces superInterfaceLength superInterfaces memberTypes memberTypesLength memberTypes memberTypesLength memberTypes fieldsLength fieldsLength FieldDeclaration isStatic staticInitializerScope initializerScope methodsLength methodsLength endVisit unitScope AbortType
Iteration for a local innertype public void traverse AST Visitor visitor Block Scope block Scope if ignore Further Investigation return try if visitor visit this block Scope if superclass null superclass traverse visitor scope if super Interfaces null int super Interface Length super Interfaces length for int i 0 i super Interface Length i super Interfaces i traverse visitor scope if member Types null int member Types Length member Types length for int i 0 i member Types Length i member Types i traverse visitor scope if fields null int fields Length fields length for int i 0 i fields Length i Field Declaration field if field fields i is Static local type cannot have static fields else field traverse visitor initializer Scope if methods null int methods Length methods length for int i 0 i methods Length i methods i traverse visitor scope visitor end Visit this block Scope catch Abort Type e silent abort  ASTVisitor BlockScope blockScope ignoreFurtherInvestigation blockScope superInterfaces superInterfaceLength superInterfaces superInterfaceLength superInterfaces memberTypes memberTypesLength memberTypes memberTypesLength memberTypes fieldsLength fieldsLength FieldDeclaration isStatic initializerScope methodsLength methodsLength endVisit blockScope AbortType
Iteration for a member innertype public void traverse AST Visitor visitor Class Scope class Scope if ignore Further Investigation return try if visitor visit this class Scope if superclass null superclass traverse visitor scope if super Interfaces null int super Interface Length super Interfaces length for int i 0 i super Interface Length i super Interfaces i traverse visitor scope if member Types null int member Types Length member Types length for int i 0 i member Types Length i member Types i traverse visitor scope if fields null int fields Length fields length for int i 0 i fields Length i Field Declaration field if field fields i is Static field traverse visitor static Initializer Scope else field traverse visitor initializer Scope if methods null int methods Length methods length for int i 0 i methods Length i methods i traverse visitor scope visitor end Visit this class Scope catch Abort Type e silent abort  ASTVisitor ClassScope classScope ignoreFurtherInvestigation classScope superInterfaces superInterfaceLength superInterfaces superInterfaceLength superInterfaces memberTypes memberTypesLength memberTypes memberTypesLength memberTypes fieldsLength fieldsLength FieldDeclaration isStatic staticInitializerScope initializerScope methodsLength methodsLength endVisit classScope AbortType
Max Field Count s computation is necessary so as to reserve space for the flow info field portions It corresponds to the maximum amount of fields this class or one of its innertypes have During name resolution types are traversed and the max field count is recorded on the outermost type It is then propagated down during the flow analysis This method is doing either up down propagation void update Max Field Count if binding null return error scenario Type Declaration outer Most Type scope outer Most Class Scope reference Type if max Field Count outer Most Type max Field Count outer Most Type max Field Count max Field Count up else max Field Count outer Most Type max Field Count down  MaxFieldCount updateMaxFieldCount TypeDeclaration outerMostType outerMostClassScope referenceType maxFieldCount outerMostType maxFieldCount outerMostType maxFieldCount maxFieldCount maxFieldCount outerMostType maxFieldCount

public abstract class Type Reference extends Expression public Type Reference super  TypeReference TypeReference
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo flowInfo
allows us to trap completion selection nodes public void about To Resolve Scope scope default implementation do nothing  aboutToResolve
public static final Type Reference base Type Reference int base Type int dim if dim 0 switch base Type case T void return new Single Type Reference Void Binding simple Name 0 case T boolean return new Single Type Reference Boolean Binding simple Name 0 case T char return new Single Type Reference Char Binding simple Name 0 case T float return new Single Type Reference Float Binding simple Name 0 case T double return new Single Type Reference Double Binding simple Name 0 case T byte return new Single Type Reference Byte Binding simple Name 0 case T short return new Single Type Reference Short Binding simple Name 0 case T int return new Single Type Reference Int Binding simple Name 0 default T long return new Single Type Reference Long Binding simple Name 0 switch base Type case T void return new Array Type Reference Void Binding simple Name dim 0 case T boolean return new Array Type Reference Boolean Binding simple Name dim 0 case T char return new Array Type Reference Char Binding simple Name dim 0 case T float return new Array Type Reference Float Binding simple Name dim 0 case T double return new Array Type Reference Double Binding simple Name dim 0 case T byte return new Array Type Reference Byte Binding simple Name dim 0 case T short return new Array Type Reference Short Binding simple Name dim 0 case T int return new Array Type Reference Int Binding simple Name dim 0 default T long return new Array Type Reference Long Binding simple Name dim 0  TypeReference baseTypeReference baseType baseType T_void SingleTypeReference VoidBinding simpleName T_boolean SingleTypeReference BooleanBinding simpleName T_char SingleTypeReference CharBinding simpleName T_float SingleTypeReference FloatBinding simpleName T_double SingleTypeReference DoubleBinding simpleName T_byte SingleTypeReference ByteBinding simpleName T_short SingleTypeReference ShortBinding simpleName T_int SingleTypeReference IntBinding simpleName T_long SingleTypeReference LongBinding simpleName baseType T_void ArrayTypeReference VoidBinding simpleName T_boolean ArrayTypeReference BooleanBinding simpleName T_char ArrayTypeReference CharBinding simpleName T_float ArrayTypeReference FloatBinding simpleName T_double ArrayTypeReference DoubleBinding simpleName T_byte ArrayTypeReference ByteBinding simpleName T_short ArrayTypeReference ShortBinding simpleName T_int ArrayTypeReference IntBinding simpleName T_long ArrayTypeReference LongBinding simpleName
public abstract Type Reference copy Dims int dim  TypeReference copyDims
public abstract Type Reference copy Dims int dim public int dimensions return 0  TypeReference copyDims
return 0 public abstract Type Binding get Type Binding Scope scope  TypeBinding getTypeBinding
public abstract Type Binding get Type Binding Scope scope return char public abstract char get Type Name  TypeBinding getTypeBinding getTypeName
public abstract char get Type Name public boolean is Type Reference return true  getTypeName isTypeReference
public Type Binding resolve Type Block Scope block Scope handle the error here this constant NotA Constant if this resolved Type null is a shared type reference which was already resolved if this resolved Type is Valid Binding return null already reported error else this resolved Type get Type Binding block Scope if this resolved Type is Valid Binding report Invalid Type block Scope return null if is Type Use Deprecated this resolved Type block Scope report Deprecated Type block Scope return this resolved Type  TypeBinding resolveType BlockScope blockScope NotAConstant resolvedType resolvedType isValidBinding resolvedType getTypeBinding blockScope resolvedType isValidBinding reportInvalidType blockScope isTypeUseDeprecated resolvedType blockScope reportDeprecatedType blockScope resolvedType
public Type Binding resolve Type Class Scope class Scope handle the error here this constant NotA Constant if this resolved Type null is a shared type reference which was already resolved if this resolved Type is Valid Binding return null already reported error else this resolved Type get Type Binding class Scope if this resolved Type is Valid Binding report Invalid Type class Scope return null if is Type Use Deprecated this resolved Type class Scope report Deprecated Type class Scope return this resolved Type  TypeBinding resolveType ClassScope classScope NotAConstant resolvedType resolvedType isValidBinding resolvedType getTypeBinding classScope resolvedType isValidBinding reportInvalidType classScope isTypeUseDeprecated resolvedType classScope reportDeprecatedType classScope resolvedType
return this resolved Type protected void report Invalid Type Scope scope scope problem Reporter invalid Type this this resolved Type  resolvedType reportInvalidType problemReporter invalidType resolvedType
scope problem Reporter invalid Type this this resolved Type protected void report Deprecated Type Scope scope scope problem Reporter deprecated Type this resolved Type this  problemReporter invalidType resolvedType reportDeprecatedType problemReporter deprecatedType resolvedType
scope problem Reporter deprecated Type this resolved Type this public abstract void traverse AST Visitor visitor Class Scope class Scope  problemReporter deprecatedType resolvedType ASTVisitor ClassScope classScope

public Constant optimized Boolean Constant public Unary Expression Expression expression int operator this expression expression this bits operator OperatorSHIFT encode operator  optimizedBooleanConstant UnaryExpression
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info if bits OperatorMASK OperatorSHIFT NOT return this expression analyse Code current Scope flow Context flow Info as Negated Condition else return this expression analyse Code current Scope flow Context flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo analyseCode currentScope flowContext flowInfo asNegatedCondition analyseCode currentScope flowContext flowInfo
public Constant optimized Boolean Constant return this optimized Boolean Constant null this constant this optimized Boolean Constant  optimizedBooleanConstant optimizedBooleanConstant optimizedBooleanConstant
Code generation for an unary operation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position Label false Label endif Label if this constant Constant NotA Constant inlined value if value Required code Stream generate Constant this constant this implicit Conversion code Stream record Positions From pc this source Start return switch bits OperatorMASK OperatorSHIFT case NOT switch this expression implicit Conversion 4 runtime type case T boolean boolean Generate code for the condition this expression generate Optimized Boolean current Scope code Stream null false Label new Label code Stream value Required if value Required code Stream iconst 0 if false Label has Forward References code Stream goto  endif Label new Label code Stream code Stream decr Stack Size 1 false Label place code Stream iconst 1 endif Label place else 6596 if a b must still place false Label false Label place break break case TWIDDLE switch this expression implicit Conversion 4 runtime case T int int this expression generate Code current Scope code Stream value Required if value Required code Stream iconst m1 code Stream ixor break case T long this expression generate Code current Scope code Stream value Required if value Required code Stream ldc2 w 1L code Stream lxor break case MINUS num if this constant NotA Constant if value Required switch this expression implicit Conversion 4 runtime case T int code Stream generate Inlined Value this constant int Value 1 break case T float code Stream generate Inlined Value this constant float Value 1 0f break case T long code Stream generate Inlined Value this constant long Value 1L break case T double code Stream generate Inlined Value this constant double Value 1 0 else this expression generate Code current Scope code Stream value Required if value Required switch expression implicit Conversion 4 runtime type case T int code Stream ineg break case T float code Stream fneg break case T long code Stream lneg break case T double code Stream dneg break case PLUS this expression generate Code current Scope code Stream value Required if value Required code Stream generate Implicit Conversion this implicit Conversion code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream falseLabel endifLabel NotAConstant valueRequired codeStream generateConstant implicitConversion codeStream recordPositionsFrom sourceStart implicitConversion T_boolean generateOptimizedBoolean currentScope codeStream falseLabel codeStream valueRequired valueRequired codeStream iconst_0 falseLabel hasForwardReferences codeStream goto_ endifLabel codeStream codeStream decrStackSize falseLabel codeStream iconst_1 endifLabel falseLabel falseLabel implicitConversion T_int generateCode currentScope codeStream valueRequired valueRequired codeStream iconst_m1 codeStream T_long generateCode currentScope codeStream valueRequired valueRequired codeStream ldc2_w codeStream NotAConstant valueRequired implicitConversion T_int codeStream generateInlinedValue intValue T_float codeStream generateInlinedValue floatValue T_long codeStream generateInlinedValue longValue T_double codeStream generateInlinedValue doubleValue generateCode currentScope codeStream valueRequired valueRequired implicitConversion T_int codeStream T_float codeStream T_long codeStream T_double codeStream generateCode currentScope codeStream valueRequired valueRequired codeStream generateImplicitConversion implicitConversion codeStream recordPositionsFrom sourceStart
Boolean operator code generation Optimized operations are public void generate Optimized Boolean Block Scope current Scope Code Stream code Stream Label true Label Label false Label boolean value Required if this constant Constant NotA Constant this constant typeID T boolean super generate Optimized Boolean current Scope code Stream true Label false Label value Required return if this bits OperatorMASK OperatorSHIFT NOT this expression generate Optimized Boolean current Scope code Stream false Label true Label value Required else super generate Optimized Boolean current Scope code Stream true Label false Label value Required  generateOptimizedBoolean BlockScope currentScope CodeStream codeStream trueLabel falseLabel valueRequired NotAConstant T_boolean generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired generateOptimizedBoolean currentScope codeStream falseLabel trueLabel valueRequired generateOptimizedBoolean currentScope codeStream trueLabel falseLabel valueRequired
public String Buffer print Expression No Parenthesis int indent String Buffer output output append operator To String append return this expression print Expression 0 output  StringBuffer printExpressionNoParenthesis StringBuffer operatorToString printExpression
public Type Binding resolve Type Block Scope scope boolean expression Is Cast if expression Is Cast this expression instanceof Cast Expression true this expression bits Ignore Need For Cast CheckMASK will check later on Type Binding expression Type this expression resolve Type scope if expression Type null this constant NotA Constant return null int expression Type Id expression Type id if expression Type Id 15 this constant NotA Constant scope problem Reporter invalid Operator this expression Type return null int table Id switch bits OperatorMASK OperatorSHIFT case NOT table Id AND AND break case TWIDDLE table Id LEFT SHIFT break default table Id MINUS and cases the code is an int cast left Op cast rigth result 0000 0000 0000 0000 0000 16 12 8 4 0 int operator Signature Operator Signatures table Id expression Type Id 4 expression Type Id this expression implicit Conversion operator Signature 12 this bits operator Signature 0xF switch operator Signature 0xF only switch on possible result type case T boolean this resolved Type Boolean Binding break case T byte this resolved Type Byte Binding break case T char this resolved Type Char Binding break case T double this resolved Type Double Binding break case T float this resolved Type Float Binding break case T int this resolved Type Int Binding break case T long this resolved Type Long Binding break default error this constant Constant NotA Constant if expression Type Id T undefined scope problem Reporter invalid Operator this expression Type return null compute the constant when valid if this expression constant Constant NotA Constant this constant Constant compute Constant Operation this expression constant expression Type Id bits OperatorMASK OperatorSHIFT else this constant Constant NotA Constant if bits OperatorMASK OperatorSHIFT NOT Constant cst expression optimized Boolean Constant if cst Constant NotA Constant this optimized Boolean Constant Constant from Value cst boolean Value if expression Is Cast check need for operand cast Cast Expression check Need For Argument Cast scope table Id operator Signature this expression expression Type Id return this resolved Type  TypeBinding resolveType BlockScope expressionIsCast expressionIsCast CastExpression IgnoreNeedForCastCheckMASK TypeBinding expressionType resolveType expressionType NotAConstant expressionTypeId expressionType expressionTypeId NotAConstant problemReporter invalidOperator expressionType tableId tableId AND_AND tableId LEFT_SHIFT tableId operatorSignature OperatorSignatures tableId expressionTypeId expressionTypeId implicitConversion operatorSignature operatorSignature operatorSignature T_boolean resolvedType BooleanBinding T_byte resolvedType ByteBinding T_char resolvedType CharBinding T_double resolvedType DoubleBinding T_float resolvedType FloatBinding T_int resolvedType IntBinding T_long resolvedType LongBinding NotAConstant expressionTypeId T_undefined problemReporter invalidOperator expressionType NotAConstant computeConstantOperation expressionTypeId NotAConstant optimizedBooleanConstant NotAConstant optimizedBooleanConstant fromValue booleanValue expressionIsCast CastExpression checkNeedForArgumentCast tableId operatorSignature expressionTypeId resolvedType
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope this expression traverse visitor block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope blockScope endVisit blockScope

public abstract class AST Visitor public void accept Problem I Problem problem do nothing by default  ASTVisitor acceptProblem IProblem
public void end Visit Allocation Expression allocation Expression Block Scope scope do nothing by default  endVisit AllocationExpression allocationExpression BlockScope
do nothing by default public void end Visit AND AND Expression and and Expression Block Scope scope do nothing by default  endVisit AND_AND_Expression and_and_Expression BlockScope
do nothing by default public void end Visit Javadoc Array Qualified Type Reference type Ref Block Scope scope do nothing by default  endVisit JavadocArrayQualifiedTypeReference typeRef BlockScope
do nothing by default public void end Visit Javadoc Array Single Type Reference type Ref Block Scope scope do nothing by default  endVisit JavadocArraySingleTypeReference typeRef BlockScope
do nothing by default public void end Visit Javadoc Argument Expression expression Block Scope scope do nothing by default  endVisit JavadocArgumentExpression BlockScope
do nothing by default public void end Visit Javadoc Field Reference field Ref Block Scope scope do nothing by default  endVisit JavadocFieldReference fieldRef BlockScope
do nothing by default public void end Visit Javadoc Message Send message Send Block Scope scope do nothing by default  endVisit JavadocMessageSend messageSend BlockScope
do nothing by default public void end Visit Javadoc Qualified Type Reference type Ref Block Scope scope do nothing by default  endVisit JavadocQualifiedTypeReference typeRef BlockScope
do nothing by default public void end Visit Javadoc Return Statement statement Block Scope scope do nothing by default  endVisit JavadocReturnStatement BlockScope
do nothing by default public void end Visit Javadoc Single Name Reference argument Block Scope scope do nothing by default  endVisit JavadocSingleNameReference BlockScope
do nothing by default public void end Visit Javadoc Single Type Reference type Ref Block Scope scope do nothing by default  endVisit JavadocSingleTypeReference typeRef BlockScope
do nothing by default public void end Visit Argument argument Block Scope scope do nothing by default  endVisit BlockScope
public void end Visit Array Allocation Expression array Allocation Expression Block Scope scope do nothing by default  endVisit ArrayAllocationExpression arrayAllocationExpression BlockScope
do nothing by default public void end Visit Array Initializer array Initializer Block Scope scope do nothing by default  endVisit ArrayInitializer arrayInitializer BlockScope
public void end Visit Array Qualified Type Reference array Qualified Type Reference Block Scope scope do nothing by default  endVisit ArrayQualifiedTypeReference arrayQualifiedTypeReference BlockScope
public void end Visit Array Qualified Type Reference array Qualified Type Reference Class Scope scope do nothing by default  endVisit ArrayQualifiedTypeReference arrayQualifiedTypeReference ClassScope
do nothing by default public void end Visit Array Reference array Reference Block Scope scope do nothing by default  endVisit ArrayReference arrayReference BlockScope
do nothing by default public void end Visit Array Type Reference array Type Reference Block Scope scope do nothing by default  endVisit ArrayTypeReference arrayTypeReference BlockScope
do nothing by default public void end Visit Array Type Reference array Type Reference Class Scope scope do nothing by default  endVisit ArrayTypeReference arrayTypeReference ClassScope
do nothing by default public void end Visit Assignment assignment Block Scope scope do nothing by default  endVisit BlockScope
do nothing by default public void end Visit Assert Statement assert Statement Block Scope scope do nothing by default  endVisit AssertStatement assertStatement BlockScope
do nothing by default public void end Visit Binary Expression binary Expression Block Scope scope do nothing by default  endVisit BinaryExpression binaryExpression BlockScope
do nothing by default public void end Visit Block block Block Scope scope do nothing by default  endVisit BlockScope
do nothing by default public void end Visit Break Statement break Statement Block Scope scope do nothing by default  endVisit BreakStatement breakStatement BlockScope
do nothing by default public void end Visit Case Statement case Statement Block Scope scope do nothing by default  endVisit CaseStatement caseStatement BlockScope
do nothing by default public void end Visit Cast Expression cast Expression Block Scope scope do nothing by default  endVisit CastExpression castExpression BlockScope
do nothing by default public void end Visit Char Literal char Literal Block Scope scope do nothing by default  endVisit CharLiteral charLiteral BlockScope
do nothing by default public void end Visit Class Literal Access class Literal Block Scope scope do nothing by default  endVisit ClassLiteralAccess classLiteral BlockScope
do nothing by default public void end Visit Clinit clinit Class Scope scope do nothing by default  endVisit ClassScope
public void end Visit Compilation Unit Declaration compilation Unit Declaration Compilation Unit Scope scope do nothing by default  endVisit CompilationUnitDeclaration compilationUnitDeclaration CompilationUnitScope
do nothing by default public void end Visit Compound Assignment compound Assignment Block Scope scope do nothing by default  endVisit CompoundAssignment compoundAssignment BlockScope
public void end Visit Conditional Expression conditional Expression Block Scope scope do nothing by default  endVisit ConditionalExpression conditionalExpression BlockScope
public void end Visit Constructor Declaration constructor Declaration Class Scope scope do nothing by default  endVisit ConstructorDeclaration constructorDeclaration ClassScope
do nothing by default public void end Visit Continue Statement continue Statement Block Scope scope do nothing by default  endVisit ContinueStatement continueStatement BlockScope
do nothing by default public void end Visit Do Statement do Statement Block Scope scope do nothing by default  endVisit DoStatement doStatement BlockScope
do nothing by default public void end Visit Double Literal double Literal Block Scope scope do nothing by default  endVisit DoubleLiteral doubleLiteral BlockScope
do nothing by default public void end Visit Equal Expression equal Expression Block Scope scope do nothing by default  endVisit EqualExpression equalExpression BlockScope
public void end Visit Explicit Constructor Call explicit Constructor Block Scope scope do nothing by default  endVisit ExplicitConstructorCall explicitConstructor BlockScope
public void end Visit Extended String Literal extended String Literal Block Scope scope do nothing by default  endVisit ExtendedStringLiteral extendedStringLiteral BlockScope
do nothing by default public void end Visit False Literal false Literal Block Scope scope do nothing by default  endVisit FalseLiteral falseLiteral BlockScope
do nothing by default public void end Visit Field Declaration field Declaration Method Scope scope do nothing by default  endVisit FieldDeclaration fieldDeclaration MethodScope
do nothing by default public void end Visit Field Reference field Reference Block Scope scope do nothing by default  endVisit FieldReference fieldReference BlockScope
do nothing by default public void end Visit Float Literal float Literal Block Scope scope do nothing by default  endVisit FloatLiteral floatLiteral BlockScope
do nothing by default public void end Visit Empty Statement empty Statement Block Scope scope do nothing by default  endVisit EmptyStatement emptyStatement BlockScope
do nothing by default public void end Visit For Statement for Statement Block Scope scope do nothing by default  endVisit ForStatement forStatement BlockScope
do nothing by default public void end Visit If Statement if Statement Block Scope scope do nothing by default  endVisit IfStatement ifStatement BlockScope
do nothing by default public void end Visit Import Reference import Ref Compilation Unit Scope scope do nothing by default  endVisit ImportReference importRef CompilationUnitScope
do nothing by default public void end Visit Initializer initializer Method Scope scope do nothing by default  endVisit MethodScope
public void end Visit Instance Of Expression instance Of Expression Block Scope scope do nothing by default  endVisit InstanceOfExpression instanceOfExpression BlockScope
do nothing by default public void end Visit Int Literal int Literal Block Scope scope do nothing by default  endVisit IntLiteral intLiteral BlockScope
do nothing by default public void end Visit Labeled Statement labeled Statement Block Scope scope do nothing by default  endVisit LabeledStatement labeledStatement BlockScope
do nothing by default public void end Visit Local Declaration local Declaration Block Scope scope do nothing by default  endVisit LocalDeclaration localDeclaration BlockScope
do nothing by default public void end Visit Long Literal long Literal Block Scope scope do nothing by default  endVisit LongLiteral longLiteral BlockScope
do nothing by default public void end Visit Message Send message Send Block Scope scope do nothing by default  endVisit MessageSend messageSend BlockScope
do nothing by default public void end Visit Method Declaration method Declaration Class Scope scope do nothing by default  endVisit MethodDeclaration methodDeclaration ClassScope
do nothing by default public void end Visit String Literal Concatenation literal Block Scope scope do nothing by default  endVisit StringLiteralConcatenation BlockScope
do nothing by default public void end Visit Null Literal null Literal Block Scope scope do nothing by default  endVisit NullLiteral nullLiteral BlockScope
do nothing by default public void end Visit OR OR Expression or or Expression Block Scope scope do nothing by default  endVisit OR_OR_Expression or_or_Expression BlockScope
do nothing by default public void end Visit Postfix Expression postfix Expression Block Scope scope do nothing by default  endVisit PostfixExpression postfixExpression BlockScope
do nothing by default public void end Visit Prefix Expression prefix Expression Block Scope scope do nothing by default  endVisit PrefixExpression prefixExpression BlockScope
public void end Visit Qualified Allocation Expression qualified Allocation Expression Block Scope scope do nothing by default  endVisit QualifiedAllocationExpression qualifiedAllocationExpression BlockScope
public void end Visit Qualified Name Reference qualified Name Reference Block Scope scope do nothing by default  endVisit QualifiedNameReference qualifiedNameReference BlockScope
public void end Visit Qualified Super Reference qualified Super Reference Block Scope scope do nothing by default  endVisit QualifiedSuperReference qualifiedSuperReference BlockScope
public void end Visit Qualified This Reference qualified This Reference Block Scope scope do nothing by default  endVisit QualifiedThisReference qualifiedThisReference BlockScope
public void end Visit Qualified Type Reference qualified Type Reference Block Scope scope do nothing by default  endVisit QualifiedTypeReference qualifiedTypeReference BlockScope
public void end Visit Qualified Type Reference qualified Type Reference Class Scope scope do nothing by default  endVisit QualifiedTypeReference qualifiedTypeReference ClassScope
do nothing by default public void end Visit Return Statement return Statement Block Scope scope do nothing by default  endVisit ReturnStatement returnStatement BlockScope
public void end Visit Single Name Reference single Name Reference Block Scope scope do nothing by default  endVisit SingleNameReference singleNameReference BlockScope
public void end Visit Single Type Reference single Type Reference Block Scope scope do nothing by default  endVisit SingleTypeReference singleTypeReference BlockScope
public void end Visit Single Type Reference single Type Reference Class Scope scope do nothing by default  endVisit SingleTypeReference singleTypeReference ClassScope
do nothing by default public void end Visit String Literal string Literal Block Scope scope do nothing by default  endVisit StringLiteral stringLiteral BlockScope
do nothing by default public void end Visit Super Reference super Reference Block Scope scope do nothing by default  endVisit SuperReference superReference BlockScope
do nothing by default public void end Visit Switch Statement switch Statement Block Scope scope do nothing by default  endVisit SwitchStatement switchStatement BlockScope
public void end Visit Synchronized Statement synchronized Statement Block Scope scope do nothing by default  endVisit SynchronizedStatement synchronizedStatement BlockScope
do nothing by default public void end Visit This Reference this Reference Block Scope scope do nothing by default  endVisit ThisReference thisReference BlockScope
do nothing by default public void end Visit Throw Statement throw Statement Block Scope scope do nothing by default  endVisit ThrowStatement throwStatement BlockScope
do nothing by default public void end Visit True Literal true Literal Block Scope scope do nothing by default  endVisit TrueLiteral trueLiteral BlockScope
do nothing by default public void end Visit Try Statement try Statement Block Scope scope do nothing by default  endVisit TryStatement tryStatement BlockScope
public void end Visit Type Declaration local Type Declaration Block Scope scope do nothing by default  endVisit TypeDeclaration localTypeDeclaration BlockScope
public void end Visit Type Declaration member Type Declaration Class Scope scope do nothing by default  endVisit TypeDeclaration memberTypeDeclaration ClassScope
public void end Visit Type Declaration type Declaration Compilation Unit Scope scope do nothing by default  endVisit TypeDeclaration typeDeclaration CompilationUnitScope
do nothing by default public void end Visit Unary Expression unary Expression Block Scope scope do nothing by default  endVisit UnaryExpression unaryExpression BlockScope
do nothing by default public void end Visit While Statement while Statement Block Scope scope do nothing by default  endVisit WhileStatement whileStatement BlockScope
public boolean visit Allocation Expression allocation Expression Block Scope scope return true do nothing by default keep traversing do nothing by default  AllocationExpression allocationExpression BlockScope
do nothing by default public boolean visit AND AND Expression and and Expression Block Scope scope return true do nothing by default keep traversing  AND_AND_Expression and_and_Expression BlockScope
return true do nothing by default keep traversing public boolean visit Javadoc Array Qualified Type Reference type Ref Block Scope scope return true do nothing by default keep traversing  JavadocArrayQualifiedTypeReference typeRef BlockScope
return true do nothing by default keep traversing public boolean visit Javadoc Array Single Type Reference type Ref Block Scope scope return true do nothing by default keep traversing  JavadocArraySingleTypeReference typeRef BlockScope
return true do nothing by default keep traversing public boolean visit Javadoc Argument Expression expression Block Scope scope return true do nothing by default keep traversing  JavadocArgumentExpression BlockScope
return true do nothing by default keep traversing public boolean visit Javadoc Field Reference field Ref Block Scope scope return true do nothing by default keep traversing  JavadocFieldReference fieldRef BlockScope
return true do nothing by default keep traversing public boolean visit Javadoc Message Send message Send Block Scope scope return true do nothing by default keep traversing  JavadocMessageSend messageSend BlockScope
return true do nothing by default keep traversing public boolean visit Javadoc Qualified Type Reference type Ref Block Scope scope return true do nothing by default keep traversing  JavadocQualifiedTypeReference typeRef BlockScope
return true do nothing by default keep traversing public boolean visit Javadoc Return Statement statement Block Scope scope return true do nothing by default keep traversing  JavadocReturnStatement BlockScope
return true do nothing by default keep traversing public boolean visit Javadoc Single Name Reference argument Block Scope scope return true do nothing by default keep traversing  JavadocSingleNameReference BlockScope
return true do nothing by default keep traversing public boolean visit Javadoc Single Type Reference type Ref Block Scope scope return true do nothing by default keep traversing  JavadocSingleTypeReference typeRef BlockScope
return true do nothing by default keep traversing public boolean visit Argument argument Block Scope scope return true do nothing by default keep traversing  BlockScope
public boolean visit Array Allocation Expression array Allocation Expression Block Scope scope return true do nothing by default keep traversing  ArrayAllocationExpression arrayAllocationExpression BlockScope
return true do nothing by default keep traversing public boolean visit Array Initializer array Initializer Block Scope scope return true do nothing by default keep traversing  ArrayInitializer arrayInitializer BlockScope
public boolean visit Array Qualified Type Reference array Qualified Type Reference Block Scope scope return true do nothing by default keep traversing  ArrayQualifiedTypeReference arrayQualifiedTypeReference BlockScope
public boolean visit Array Qualified Type Reference array Qualified Type Reference Class Scope scope return true do nothing by default keep traversing  ArrayQualifiedTypeReference arrayQualifiedTypeReference ClassScope
return true do nothing by default keep traversing public boolean visit Array Reference array Reference Block Scope scope return true do nothing by default keep traversing  ArrayReference arrayReference BlockScope
return true do nothing by default keep traversing public boolean visit Array Type Reference array Type Reference Block Scope scope return true do nothing by default keep traversing  ArrayTypeReference arrayTypeReference BlockScope
return true do nothing by default keep traversing public boolean visit Array Type Reference array Type Reference Class Scope scope return true do nothing by default keep traversing  ArrayTypeReference arrayTypeReference ClassScope
return true do nothing by default keep traversing public boolean visit Assignment assignment Block Scope scope return true do nothing by default keep traversing  BlockScope
return true do nothing by default keep traversing public boolean visit Assert Statement assert Statement Block Scope scope return true do nothing by default keep traversing  AssertStatement assertStatement BlockScope
return true do nothing by default keep traversing public boolean visit Binary Expression binary Expression Block Scope scope return true do nothing by default keep traversing  BinaryExpression binaryExpression BlockScope
return true do nothing by default keep traversing public boolean visit Block block Block Scope scope return true do nothing by default keep traversing  BlockScope
return true do nothing by default keep traversing public boolean visit Break Statement break Statement Block Scope scope return true do nothing by default keep traversing  BreakStatement breakStatement BlockScope
return true do nothing by default keep traversing public boolean visit Case Statement case Statement Block Scope scope return true do nothing by default keep traversing  CaseStatement caseStatement BlockScope
return true do nothing by default keep traversing public boolean visit Cast Expression cast Expression Block Scope scope return true do nothing by default keep traversing  CastExpression castExpression BlockScope
return true do nothing by default keep traversing public boolean visit Char Literal char Literal Block Scope scope return true do nothing by default keep traversing  CharLiteral charLiteral BlockScope
return true do nothing by default keep traversing public boolean visit Class Literal Access class Literal Block Scope scope return true do nothing by default keep traversing  ClassLiteralAccess classLiteral BlockScope
return true do nothing by default keep traversing public boolean visit Clinit clinit Class Scope scope return true do nothing by default keep traversing  ClassScope
public boolean visit Compilation Unit Declaration compilation Unit Declaration Compilation Unit Scope scope return true do nothing by default keep traversing  CompilationUnitDeclaration compilationUnitDeclaration CompilationUnitScope
return true do nothing by default keep traversing public boolean visit Compound Assignment compound Assignment Block Scope scope return true do nothing by default keep traversing  CompoundAssignment compoundAssignment BlockScope
public boolean visit Conditional Expression conditional Expression Block Scope scope return true do nothing by default keep traversing  ConditionalExpression conditionalExpression BlockScope
public boolean visit Constructor Declaration constructor Declaration Class Scope scope return true do nothing by default keep traversing  ConstructorDeclaration constructorDeclaration ClassScope
return true do nothing by default keep traversing public boolean visit Continue Statement continue Statement Block Scope scope return true do nothing by default keep traversing  ContinueStatement continueStatement BlockScope
return true do nothing by default keep traversing public boolean visit Do Statement do Statement Block Scope scope return true do nothing by default keep traversing  DoStatement doStatement BlockScope
return true do nothing by default keep traversing public boolean visit Double Literal double Literal Block Scope scope return true do nothing by default keep traversing  DoubleLiteral doubleLiteral BlockScope
return true do nothing by default keep traversing public boolean visit Equal Expression equal Expression Block Scope scope return true do nothing by default keep traversing  EqualExpression equalExpression BlockScope
return true do nothing by default keep traversing public boolean visit Empty Statement empty Statement Block Scope scope return true do nothing by default keep traversing  EmptyStatement emptyStatement BlockScope
public boolean visit Explicit Constructor Call explicit Constructor Block Scope scope return true do nothing by default keep traversing  ExplicitConstructorCall explicitConstructor BlockScope
public boolean visit Extended String Literal extended String Literal Block Scope scope return true do nothing by default keep traversing  ExtendedStringLiteral extendedStringLiteral BlockScope
return true do nothing by default keep traversing public boolean visit False Literal false Literal Block Scope scope return true do nothing by default keep traversing  FalseLiteral falseLiteral BlockScope
return true do nothing by default keep traversing public boolean visit Field Declaration field Declaration Method Scope scope return true do nothing by default keep traversing  FieldDeclaration fieldDeclaration MethodScope
return true do nothing by default keep traversing public boolean visit Field Reference field Reference Block Scope scope return true do nothing by default keep traversing  FieldReference fieldReference BlockScope
return true do nothing by default keep traversing public boolean visit Float Literal float Literal Block Scope scope return true do nothing by default keep traversing  FloatLiteral floatLiteral BlockScope
return true do nothing by default keep traversing public boolean visit For Statement for Statement Block Scope scope return true do nothing by default keep traversing  ForStatement forStatement BlockScope
return true do nothing by default keep traversing public boolean visit If Statement if Statement Block Scope scope return true do nothing by default keep traversing  IfStatement ifStatement BlockScope
return true do nothing by default keep traversing public boolean visit Import Reference import Ref Compilation Unit Scope scope return true do nothing by default keep traversing  ImportReference importRef CompilationUnitScope
return true do nothing by default keep traversing public boolean visit Initializer initializer Method Scope scope return true do nothing by default keep traversing  MethodScope
public boolean visit Instance Of Expression instance Of Expression Block Scope scope return true do nothing by default keep traversing  InstanceOfExpression instanceOfExpression BlockScope
return true do nothing by default keep traversing public boolean visit Int Literal int Literal Block Scope scope return true do nothing by default keep traversing  IntLiteral intLiteral BlockScope
return true do nothing by default keep traversing public boolean visit Labeled Statement labeled Statement Block Scope scope return true do nothing by default keep traversing  LabeledStatement labeledStatement BlockScope
return true do nothing by default keep traversing public boolean visit Local Declaration local Declaration Block Scope scope return true do nothing by default keep traversing  LocalDeclaration localDeclaration BlockScope
return true do nothing by default keep traversing public boolean visit Long Literal long Literal Block Scope scope return true do nothing by default keep traversing  LongLiteral longLiteral BlockScope
return true do nothing by default keep traversing public boolean visit Message Send message Send Block Scope scope return true do nothing by default keep traversing  MessageSend messageSend BlockScope
return true do nothing by default keep traversing public boolean visit Method Declaration method Declaration Class Scope scope return true do nothing by default keep traversing  MethodDeclaration methodDeclaration ClassScope
public boolean visit String Literal Concatenation literal Block Scope scope return true do nothing by default keep traversing  StringLiteralConcatenation BlockScope
return true do nothing by default keep traversing public boolean visit Null Literal null Literal Block Scope scope return true do nothing by default keep traversing  NullLiteral nullLiteral BlockScope
return true do nothing by default keep traversing public boolean visit OR OR Expression or or Expression Block Scope scope return true do nothing by default keep traversing  OR_OR_Expression or_or_Expression BlockScope
return true do nothing by default keep traversing public boolean visit Postfix Expression postfix Expression Block Scope scope return true do nothing by default keep traversing  PostfixExpression postfixExpression BlockScope
return true do nothing by default keep traversing public boolean visit Prefix Expression prefix Expression Block Scope scope return true do nothing by default keep traversing  PrefixExpression prefixExpression BlockScope
public boolean visit Qualified Allocation Expression qualified Allocation Expression Block Scope scope return true do nothing by default keep traversing  QualifiedAllocationExpression qualifiedAllocationExpression BlockScope
public boolean visit Qualified Name Reference qualified Name Reference Block Scope scope return true do nothing by default keep traversing  QualifiedNameReference qualifiedNameReference BlockScope
public boolean visit Qualified Super Reference qualified Super Reference Block Scope scope return true do nothing by default keep traversing  QualifiedSuperReference qualifiedSuperReference BlockScope
public boolean visit Qualified This Reference qualified This Reference Block Scope scope return true do nothing by default keep traversing  QualifiedThisReference qualifiedThisReference BlockScope
public boolean visit Qualified Type Reference qualified Type Reference Block Scope scope return true do nothing by default keep traversing  QualifiedTypeReference qualifiedTypeReference BlockScope
public boolean visit Qualified Type Reference qualified Type Reference Class Scope scope return true do nothing by default keep traversing  QualifiedTypeReference qualifiedTypeReference ClassScope
return true do nothing by default keep traversing public boolean visit Return Statement return Statement Block Scope scope return true do nothing by default keep traversing  ReturnStatement returnStatement BlockScope
public boolean visit Single Name Reference single Name Reference Block Scope scope return true do nothing by default keep traversing  SingleNameReference singleNameReference BlockScope
public boolean visit Single Type Reference single Type Reference Block Scope scope return true do nothing by default keep traversing  SingleTypeReference singleTypeReference BlockScope
public boolean visit Single Type Reference single Type Reference Class Scope scope return true do nothing by default keep traversing  SingleTypeReference singleTypeReference ClassScope
return true do nothing by default keep traversing public boolean visit String Literal string Literal Block Scope scope return true do nothing by default keep traversing  StringLiteral stringLiteral BlockScope
return true do nothing by default keep traversing public boolean visit Super Reference super Reference Block Scope scope return true do nothing by default keep traversing  SuperReference superReference BlockScope
return true do nothing by default keep traversing public boolean visit Switch Statement switch Statement Block Scope scope return true do nothing by default keep traversing  SwitchStatement switchStatement BlockScope
public boolean visit Synchronized Statement synchronized Statement Block Scope scope return true do nothing by default keep traversing  SynchronizedStatement synchronizedStatement BlockScope
return true do nothing by default keep traversing public boolean visit This Reference this Reference Block Scope scope return true do nothing by default keep traversing  ThisReference thisReference BlockScope
return true do nothing by default keep traversing public boolean visit Throw Statement throw Statement Block Scope scope return true do nothing by default keep traversing  ThrowStatement throwStatement BlockScope
return true do nothing by default keep traversing public boolean visit True Literal true Literal Block Scope scope return true do nothing by default keep traversing  TrueLiteral trueLiteral BlockScope
return true do nothing by default keep traversing public boolean visit Try Statement try Statement Block Scope scope return true do nothing by default keep traversing  TryStatement tryStatement BlockScope
public boolean visit Type Declaration local Type Declaration Block Scope scope return true do nothing by default keep traversing  TypeDeclaration localTypeDeclaration BlockScope
public boolean visit Type Declaration member Type Declaration Class Scope scope return true do nothing by default keep traversing  TypeDeclaration memberTypeDeclaration ClassScope
public boolean visit Type Declaration type Declaration Compilation Unit Scope scope return true do nothing by default keep traversing  TypeDeclaration typeDeclaration CompilationUnitScope
return true do nothing by default keep traversing public boolean visit Unary Expression unary Expression Block Scope scope return true do nothing by default keep traversing  UnaryExpression unaryExpression BlockScope
return true do nothing by default keep traversing public boolean visit While Statement while Statement Block Scope scope return true do nothing by default keep traversing  WhileStatement whileStatement BlockScope

public While Statement Expression condition Statement action int s int e this condition condition this action action remember useful empty statement if action instanceof Empty Statement action bits Is Useful Empty StatementMASK source Start s source End e  WhileStatement EmptyStatement IsUsefulEmptyStatementMASK sourceStart sourceEnd
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info break Label new Label continue Label new Label Constant cst this condition constant boolean is Condition True cst NotA Constant cst boolean Value true boolean is Condition False cst NotA Constant cst boolean Value false cst this condition optimized Boolean Constant boolean is Condition Optimized True cst NotA Constant cst boolean Value true boolean is Condition Optimized False cst NotA Constant cst boolean Value false pre Cond Init State Index current Scope method Scope record Initialization States flow Info Looping Flow Context cond Loop Context Flow Info post Cond Info this condition analyse Code current Scope cond Loop Context new Looping Flow Context flow Context this null null current Scope flow Info Looping Flow Context looping Context Flow Info action Info if action null action is Empty Block current Scope environment options compliance Level Class File Constants JDK1 3 cond Loop Context complain On Final Assignments In Loop current Scope post Cond Info if is Condition True return Flow Info DEAD END else Flow Info merged Info post Cond Info inits When False unconditional Inits if is Condition Optimized True merged Info set Reach Mode Flow Info UNREACHABLE merged Init State Index current Scope method Scope record Initialization States merged Info return merged Info else in case the condition was inlined to false record the fact that there is no way to reach any statement inside the looping action looping Context new Looping Flow Context flow Context this break Label continue Label current Scope if is Condition False action Info Flow Info DEAD END else action Info post Cond Info inits When True copy if is Condition Optimized False action Info set Reach Mode Flow Info UNREACHABLE for computing local var attributes cond If True Init State Index current Scope method Scope record Initialization States post Cond Info inits When True if this action complain If Unreachable action Info current Scope false action Info this action analyse Code current Scope looping Context action Info code generation can be optimized when no need to continue in the loop if action Info is Reachable looping Context inits On Continue is Reachable continue Label null else TODO philippe should simplify in one Loop context cond Loop Context complain On Final Assignments In Loop current Scope post Cond Info action Info action Info merged With looping Context inits On Continue unconditional Inits looping Context complain On Final Assignments In Loop current Scope action Info end of loop Flow Info merged Info Flow Info merged Optimized Branches looping Context inits On Break is Condition Optimized True post Cond Info inits When False is Condition Optimized False is Condition True while true unreachable merged Init State Index current Scope method Scope record Initialization States merged Info return merged Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo breakLabel continueLabel isConditionTrue NotAConstant booleanValue isConditionFalse NotAConstant booleanValue optimizedBooleanConstant isConditionOptimizedTrue NotAConstant booleanValue isConditionOptimizedFalse NotAConstant booleanValue preCondInitStateIndex currentScope methodScope recordInitializationStates flowInfo LoopingFlowContext condLoopContext FlowInfo postCondInfo analyseCode currentScope condLoopContext LoopingFlowContext flowContext currentScope flowInfo LoopingFlowContext loopingContext FlowInfo actionInfo isEmptyBlock currentScope complianceLevel ClassFileConstants JDK1_3 condLoopContext complainOnFinalAssignmentsInLoop currentScope postCondInfo isConditionTrue FlowInfo DEAD_END FlowInfo mergedInfo postCondInfo initsWhenFalse unconditionalInits isConditionOptimizedTrue mergedInfo setReachMode FlowInfo mergedInitStateIndex currentScope methodScope recordInitializationStates mergedInfo mergedInfo loopingContext LoopingFlowContext flowContext breakLabel continueLabel currentScope isConditionFalse actionInfo FlowInfo DEAD_END actionInfo postCondInfo initsWhenTrue isConditionOptimizedFalse actionInfo setReachMode FlowInfo condIfTrueInitStateIndex currentScope methodScope recordInitializationStates postCondInfo initsWhenTrue complainIfUnreachable actionInfo currentScope actionInfo analyseCode currentScope loopingContext actionInfo actionInfo isReachable loopingContext initsOnContinue isReachable continueLabel condLoopContext complainOnFinalAssignmentsInLoop currentScope postCondInfo actionInfo actionInfo mergedWith loopingContext initsOnContinue unconditionalInits loopingContext complainOnFinalAssignmentsInLoop currentScope actionInfo FlowInfo mergedInfo FlowInfo mergedOptimizedBranches loopingContext initsOnBreak isConditionOptimizedTrue postCondInfo initsWhenFalse isConditionOptimizedFalse isConditionTrue mergedInitStateIndex currentScope methodScope recordInitializationStates mergedInfo mergedInfo
While code generation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream public void generate Code Block Scope current Scope Code Stream code Stream if bits Is ReachableMASK 0 return int pc code Stream position break Label initialize code Stream generate condition if continue Label null no need to reverse condition if condition constant NotA Constant condition generate Optimized Boolean current Scope code Stream null break Label true else continue Label initialize code Stream if condition constant NotA Constant condition constant boolean Value true action null action is Empty Block int jumpPC code Stream position code Stream goto  continue Label code Stream record Positions From jumpPC condition source Start generate the action Label action Label action Label new Label code Stream place if action null Required to fix 1PR0XVS LFRE WINNT Compiler variable table for method appears incorrect if cond If True Init State Index 1 insert all locals initialized inside the condition into the action generated prior to the condition code Stream add Definitely Assigned Variables current Scope cond If True Init State Index action generate Code current Scope code Stream May loose some local variable initializations affecting the local variable attributes if pre Cond Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope pre Cond Init State Index output condition and branch back to the beginning of the repeated action if continue Label null continue Label place condition generate Optimized Boolean current Scope code Stream action Label null true break Label place May loose some local variable initializations affecting the local variable attributes if merged Init State Index 1 code Stream remove Not Definitely Assigned Variables current Scope merged Init State Index code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream generateCode BlockScope currentScope CodeStream codeStream IsReachableMASK codeStream breakLabel codeStream continueLabel NotAConstant generateOptimizedBoolean currentScope codeStream breakLabel continueLabel codeStream NotAConstant booleanValue isEmptyBlock codeStream codeStream goto_ continueLabel codeStream recordPositionsFrom sourceStart actionLabel actionLabel codeStream condIfTrueInitStateIndex codeStream addDefinitelyAssignedVariables currentScope condIfTrueInitStateIndex generateCode currentScope codeStream preCondInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope preCondInitStateIndex continueLabel continueLabel generateOptimizedBoolean currentScope codeStream actionLabel breakLabel mergedInitStateIndex codeStream removeNotDefinitelyAssignedVariables currentScope mergedInitStateIndex codeStream recordPositionsFrom sourceStart
public void resolve Block Scope scope Type Binding type condition resolve Type Expecting scope Boolean Binding condition implicit Widening type type if action null action resolve scope  BlockScope TypeBinding resolveTypeExpecting BooleanBinding implicitWidening
public String Buffer print Statement int tab String Buffer output print Indent tab output append while NON NLS 1 condition print Expression 0 output append if action null output append else action print Statement tab 1 output return output  StringBuffer printStatement StringBuffer printIndent printExpression printStatement
public void traverse AST Visitor visitor Block Scope block Scope if visitor visit this block Scope condition traverse visitor block Scope if action null action traverse visitor block Scope visitor end Visit this block Scope  ASTVisitor BlockScope blockScope blockScope blockScope blockScope endVisit blockScope

Classpath Directory File directory String encoding int mode this mode mode this path directory get Absolute Path if this path ends With File separator this path File separator this directory Cache new Hashtable 11 this encoding encoding  ClasspathDirectory getAbsolutePath endsWith directoryCache
Classpath Directory File directory String encoding this directory encoding SOURCE BINARY by default consider both sources and binaries  ClasspathDirectory
String directory List String qualified Package Name String dir List String this directory Cache get qualified Package Name if dir List this missing Package Holder return null package exists in another classpath directory or jar if dir List null return dir List File dir new File this path qualified Package Name not Found if dir null dir is Directory must protect against a case insensitive File call walk the qualified Package Name backwards looking for an uppercase character before the int index qualified Package Name length int last qualified Package Name last Index Of File separator Char while index last Character is Upper Case qualified Package Name char At index empty if index last if last 1 if does File Exist qualified Package Name NON NLS 1 break not Found else String package Name qualified Package Name substring last 1 String parent Package qualified Package Name substring 0 last if does File Exist package Name parent Package break not Found if dir List dir list null dir List new String 0 this directory Cache put qualified Package Name dir List return dir List this directory Cache put qualified Package Name this missing Package Holder return null  directoryList qualifiedPackageName dirList directoryCache qualifiedPackageName dirList missingPackageHolder dirList dirList qualifiedPackageName notFound isDirectory qualifiedPackageName qualifiedPackageName qualifiedPackageName lastIndexOf separatorChar isUpperCase qualifiedPackageName charAt doesFileExist qualifiedPackageName notFound packageName qualifiedPackageName parentPackage qualifiedPackageName doesFileExist packageName parentPackage notFound dirList dirList directoryCache qualifiedPackageName dirList dirList directoryCache qualifiedPackageName missingPackageHolder
boolean does File Exist String file Name String qualified Package Name String dir List directory List qualified Package Name if dir List null return false most common case for int i dir List length i 0 if file Name equals dir List i return true return false  doesFileExist fileName qualifiedPackageName dirList directoryList qualifiedPackageName dirList dirList fileName dirList
public Name Environment Answer find Class char type Name String qualified Package Name String qualified Binary File Name if is Package qualified Package Name return null most common case String file Name new String type Name boolean binary Exists this mode BINARY 0 does File Exist file Name SUFFIX STRING class qualified Package Name boolean source Exists this mode SOURCE 0 does File Exist file Name SUFFIX STRING java qualified Package Name if source Exists String full Source Path this path qualified Binary File Name substring 0 qualified Binary File Name length 6 SUFFIX STRING java if binary Exists return new Name Environment Answer new Compilation Unit null full Source Path this encoding String full Binary Path this path qualified Binary File Name long binary Modified new File full Binary Path last Modified long source Modified new File full Source Path last Modified if source Modified binary Modified return new Name Environment Answer new Compilation Unit null full Source Path this encoding if binary Exists try Class File Reader reader Class File Reader read this path qualified Binary File Name if reader null return new Name Environment Answer reader catch Exception e treat as if file is missing return null  NameEnvironmentAnswer findClass typeName qualifiedPackageName qualifiedBinaryFileName isPackage qualifiedPackageName fileName typeName binaryExists doesFileExist fileName SUFFIX_STRING_class qualifiedPackageName sourceExists doesFileExist fileName SUFFIX_STRING_java qualifiedPackageName sourceExists fullSourcePath qualifiedBinaryFileName qualifiedBinaryFileName SUFFIX_STRING_java binaryExists NameEnvironmentAnswer CompilationUnit fullSourcePath fullBinaryPath qualifiedBinaryFileName binaryModified fullBinaryPath lastModified sourceModified fullSourcePath lastModified sourceModified binaryModified NameEnvironmentAnswer CompilationUnit fullSourcePath binaryExists ClassFileReader ClassFileReader qualifiedBinaryFileName NameEnvironmentAnswer
return null public boolean is Package String qualified Package Name return directory List qualified Package Name null  isPackage qualifiedPackageName directoryList qualifiedPackageName
return directory List qualified Package Name null public void reset this directory Cache new Hashtable 11  directoryList qualifiedPackageName directoryCache
this directory Cache new Hashtable 11 public String to String return Classpath Directory this path NON NLS 1  directoryCache toString ClasspathDirectory

boolean close Zip File At End public Classpath Jar File file throws IO Exception this new Zip File file true  closeZipFileAtEnd ClasspathJar IOException ZipFile
public Classpath Jar Zip File zip File boolean close Zip File At End this zip File zip File this package Cache null this close Zip File At End close Zip File At End  ClasspathJar ZipFile zipFile closeZipFileAtEnd zipFile zipFile packageCache closeZipFileAtEnd closeZipFileAtEnd
public Name Environment Answer find Class char type Name String qualified Package Name String qualified Binary File Name if is Package qualified Package Name return null most common case try Class File Reader reader Class File Reader read this zip File qualified Binary File Name if reader null return new Name Environment Answer reader catch Exception e treat as if class file is missing return null  NameEnvironmentAnswer findClass typeName qualifiedPackageName qualifiedBinaryFileName isPackage qualifiedPackageName ClassFileReader ClassFileReader zipFile qualifiedBinaryFileName NameEnvironmentAnswer
public boolean is Package String qualified Package Name if this package Cache null return this package Cache contains Key qualified Package Name this package Cache new Hashtable 41 this package Cache put NON NLS 1 NON NLS 2 next Entry for Enumeration e this zip File entries e has More Elements String file Name Zip Entry e next Element get Name add the package name all of its parent packages int last file Name last Index Of while last 0 extract the package name String package Name file Name substring 0 last if this package Cache contains Key package Name continue next Entry this package Cache put package Name package Name last package Name last Index Of return this package Cache contains Key qualified Package Name  isPackage qualifiedPackageName packageCache packageCache containsKey qualifiedPackageName packageCache packageCache nextEntry zipFile hasMoreElements fileName ZipEntry nextElement getName fileName lastIndexOf packageName fileName packageCache containsKey packageName nextEntry packageCache packageName packageName packageName lastIndexOf packageCache containsKey qualifiedPackageName
public void reset if this zip File null this close Zip File At End try this zip File close catch IO Exception e ignore this package Cache null  zipFile closeZipFileAtEnd zipFile IOException packageCache
this package Cache null public String to String return Classpath for jar file this zip File get Name NON NLS 1  packageCache toString zipFile getName

public Compilation Unit char contents String file Name String encoding this contents contents if File separator equals NON NLS 1 if file Name index Of 1 NON NLS 1 file Name file Name replace File separator Char else the file separator is if file Name index Of 1 file Name file Name replace File separator Char this file Name file Name to Char Array int start file Name last Index Of 1 NON NLS 1 if start 0 start file Name last Index Of NON NLS 1 start file Name last Index Of 1 NON NLS 1 int end file Name last Index Of NON NLS 1 if end 1 end file Name length this main Type Name file Name substring start end to Char Array this encoding encoding  CompilationUnit fileName fileName indexOf fileName fileName separatorChar fileName indexOf fileName fileName separatorChar fileName fileName toCharArray fileName lastIndexOf fileName lastIndexOf fileName lastIndexOf fileName lastIndexOf fileName mainTypeName fileName toCharArray
public char get Contents if this contents null return this contents answer the cached source otherwise retrieve it try return Util get File Char Content new File new String this file Name this encoding catch IO Exception e assume no content then return Char Operation NO CHAR  getContents getFileCharContent fileName IOException CharOperation NO_CHAR
return Char Operation NO CHAR public char get File Name return this file Name  CharOperation NO_CHAR getFileName fileName
return this file Name public char get Main Type Name return this main Type Name  fileName getMainTypeName mainTypeName
return this main Type Name public char get Package Name return null  mainTypeName getPackageName
return null public String to String return Compilation Unit new String this file Name NON NLS 2 NON NLS 1  toString CompilationUnit fileName

public int count 0 public void find File f String pattern boolean verbose if verbose System out println Main bind scanning start f get Absolute Path NON NLS 1 find0 f pattern verbose System arraycopy this result Files 0 this result Files new String this count 0 this count  getAbsolutePath resultFiles resultFiles
public void find0 File f String pattern boolean verbose if f is Directory String files f list if files null return for int i 0 max files length i max i File current new File f files i if current is Directory find0 current pattern verbose else if current get Name to Upper Case ends With pattern int length if length this result Files length this count System arraycopy this result Files 0 this result Files new String length 2 0 length this result Files this count current get Absolute Path if verbose this count 100 0 System out print  isDirectory isDirectory getName toUpperCase endsWith resultFiles resultFiles resultFiles resultFiles getAbsolutePath

interface Classpath Name Environment Answer find Class char type Name String qualified Package Name String qualified Binary File Name  NameEnvironmentAnswer findClass typeName qualifiedPackageName qualifiedBinaryFileName
interface Classpath Name Environment Answer find Class char type Name String qualified Package Name String qualified Binary File Name boolean is Package String qualified Package Name  NameEnvironmentAnswer findClass typeName qualifiedPackageName qualifiedBinaryFileName isPackage qualifiedPackageName
boolean is Package String qualified Package Name This method resets the environment The resulting state is equivalent to a new name environment without creating a new object  isPackage qualifiedPackageName
public File System String classpath Names String initial File Names String encoding this classpath Names initial File Names encoding null  FileSystem classpathNames initialFileNames classpathNames initialFileNames
public File System String classpath Names String initial File Names String encoding int classpath Directory Modes int classpath Size classpath Names length this classpaths new Classpath classpath Size String path Names new String classpath Size int problems Occured 0 for int i 0 i classpath Size i try File file new File convert Path Separators classpath Names i if file is Directory if file exists if classpath Directory Modes null this classpaths i new Classpath Directory file encoding else this classpaths i new Classpath Directory file encoding classpath Directory Modes i path Names i Classpath Directory this classpaths i path else String lowercase Classpath Name classpath Names i to Lower Case if lowercase Classpath Name ends With SUFFIX STRING jar lowercase Classpath Name ends With SUFFIX STRING zip this classpaths i this get Classpath Jar file will throw an IO Exception if file does not exist path Names i classpath Names i substring 0 classpath Names i last Index Of catch IO Exception e this classpaths i null if this classpaths i null problems Occured if problems Occured 0 Classpath new Paths new Classpath classpath Size problems Occured String new Names new String classpath Size problems Occured for int i 0 current 0 i classpath Size i if this classpaths i null new Paths current this classpaths i new Names current path Names i classpath Size new Paths length this classpaths new Paths path Names new Names this known File Names new String initial File Names length for int i initial File Names length i 0 String file Name initial File Names i String matching Path Name null if file Name last Index Of 1 NON NLS 1 file Name file Name substring 0 file Name last Index Of remove trailing java file Name convert Path Separators file Name for int j 0 j classpath Size j if file Name starts With path Names j matching Path Name path Names j if matching Path Name null this known File Names i file Name leave as is else this known File Names i file Name substring matching Path Name length  FileSystem classpathNames initialFileNames classpathDirectoryModes classpathSize classpathNames classpathSize pathNames classpathSize problemsOccured classpathSize convertPathSeparators classpathNames isDirectory classpathDirectoryModes ClasspathDirectory ClasspathDirectory classpathDirectoryModes pathNames ClasspathDirectory lowercaseClasspathName classpathNames toLowerCase lowercaseClasspathName endsWith SUFFIX_STRING_jar lowercaseClasspathName endsWith SUFFIX_STRING_zip getClasspathJar IOException pathNames classpathNames classpathNames lastIndexOf IOException problemsOccured problemsOccured newPaths classpathSize problemsOccured newNames classpathSize problemsOccured classpathSize newPaths newNames pathNames classpathSize newPaths newPaths pathNames newNames knownFileNames initialFileNames initialFileNames fileName initialFileNames matchingPathName fileName lastIndexOf fileName fileName fileName lastIndexOf fileName convertPathSeparators fileName classpathSize fileName startsWith pathNames matchingPathName pathNames matchingPathName knownFileNames fileName knownFileNames fileName matchingPathName
public void cleanup for int i 0 max this classpaths length i max i this classpaths i reset 
private String convert Path Separators String path return File separator Char path replace path replace  convertPathSeparators separatorChar
private Name Environment Answer find Class String qualified Type Name char type Name for int i 0 length this known File Names length i length i if qualified Type Name equals this known File Names i return null looking for a file which we know was provided at the beginning of the compilation String qualified Binary File Name qualified Type Name SUFFIX STRING class String qualified Package Name qualified Type Name length type Name length NON NLS 1 qualified Binary File Name substring 0 qualified Type Name length type Name length 1 String qp2 File separator Char qualified Package Name qualified Package Name replace File separator Char if qualified Package Name qp2 for int i 0 length this classpaths length i length i Name Environment Answer answer this classpaths i find Class type Name qualified Package Name qualified Binary File Name if answer null return answer else String qb2 qualified Binary File Name replace File separator Char for int i 0 length this classpaths length i length i Classpath p this classpaths i Name Environment Answer answer p instanceof Classpath Jar p find Class type Name qualified Package Name qualified Binary File Name p find Class type Name qp2 qb2 if answer null return answer return null  NameEnvironmentAnswer findClass qualifiedTypeName typeName knownFileNames qualifiedTypeName knownFileNames qualifiedBinaryFileName qualifiedTypeName SUFFIX_STRING_class qualifiedPackageName qualifiedTypeName typeName qualifiedBinaryFileName qualifiedTypeName typeName separatorChar qualifiedPackageName qualifiedPackageName separatorChar qualifiedPackageName NameEnvironmentAnswer findClass typeName qualifiedPackageName qualifiedBinaryFileName qualifiedBinaryFileName separatorChar NameEnvironmentAnswer ClasspathJar findClass typeName qualifiedPackageName qualifiedBinaryFileName findClass typeName
public Name Environment Answer find Type char compound Name if compound Name null return find Class new String Char Operation concat With compound Name compound Name compound Name length 1 return null  NameEnvironmentAnswer findType compoundName compoundName findClass CharOperation concatWith compoundName compoundName compoundName
public Name Environment Answer find Type char type Name char package Name if type Name null return find Class new String Char Operation concat With package Name type Name type Name return null  NameEnvironmentAnswer findType typeName packageName typeName findClass CharOperation concatWith packageName typeName typeName
return null public Classpath Jar get Classpath Jar File file throws IO Exception return new Classpath Jar new Zip File file true  ClasspathJar getClasspathJar IOException ClasspathJar ZipFile
public boolean is Package char compound Name char package Name String qualified Package Name new String Char Operation concat With compound Name package Name String qp2 File separator Char qualified Package Name qualified Package Name replace File separator Char if qualified Package Name qp2 for int i 0 length this classpaths length i length i if this classpaths i is Package qualified Package Name return true else for int i 0 length this classpaths length i length i Classpath p this classpaths i if p instanceof Classpath Jar p is Package qualified Package Name p is Package qp2 return true return false  isPackage compoundName packageName qualifiedPackageName CharOperation concatWith compoundName packageName separatorChar qualifiedPackageName qualifiedPackageName separatorChar qualifiedPackageName isPackage qualifiedPackageName ClasspathJar isPackage qualifiedPackageName isPackage

public Main Print Writer out Writer Print Writer err Writer boolean system Exit When Finished this out out Writer this err err Writer this system Exit When Finished system Exit When Finished this options new Compiler Options get Map  PrintWriter outWriter PrintWriter errWriter systemExitWhenFinished outWriter errWriter systemExitWhenFinished systemExitWhenFinished CompilerOptions getMap
Lookup the message with the given ID in this catalog param id return public static String bind String id return bind id String null 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string param id param binding return public static String bind String id String binding return bind id new String binding 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings param id param binding1 param binding2 return public static String bind String id String binding1 String binding2 return bind id new String binding1 binding2 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string values param id param bindings return public static String bind String id String bindings if id null return No message available NON NLS 1 String message null try message bundle get String id catch Missing Resource Exception e If we got an exception looking for the message fail gracefully by just returning the id we were looking for In most cases this is semi informative so is not too bad return Missing message id in bundle Name NON NLS 2 NON NLS 1 for compatibility with Message Format which eliminates double quotes in original message char message With No Double Quotes Char Operation replace message to Char Array DOUBLE QUOTES SINGLE QUOTE message new String message With No Double Quotes int length message length int start 1 int end length String Buffer output null while true if end message index Of start 1 if output null output new String Buffer 80 output append message substring start 1 end if start message index Of end 1 int index 1 try index Integer parse Int message substring end 1 start output append bindings index catch Number Format Exception nfe could be nested message ID compiler name String arg Id message substring end 1 start boolean done false if id equals arg Id String arg Message null try arg Message bundle get String arg Id output append arg Message done true catch Missing Resource Exception e missing the right resource if done output append message substring end 1 start 1 catch Array Index Out Of Bounds Exception e output append missing Integer to String index NON NLS 2 NON NLS 1 else output append message substring end length break else if output null return message output append message substring start 1 length break return output to String  getString MissingResourceException bundleName MessageFormat messageWithNoDoubleQuotes CharOperation toCharArray DOUBLE_QUOTES SINGLE_QUOTE messageWithNoDoubleQuotes StringBuffer indexOf StringBuffer indexOf parseInt NumberFormatException argId argId argMessage argMessage getString argId argMessage MissingResourceException ArrayIndexOutOfBoundsException toString toString
Internal IDE API public static boolean compile String command Line return compile command Line new Print Writer System out new Print Writer System err  commandLine commandLine PrintWriter PrintWriter
Internal IDE API for test harness purpose public static boolean compile String command Line Print Writer out Writer Print Writer err Writer return new Main out Writer err Writer false compile tokenize command Line  commandLine PrintWriter outWriter PrintWriter errWriter outWriter errWriter commandLine
public static void main String argv new Main new Print Writer System out new Print Writer System err true compile argv  PrintWriter PrintWriter
Creates a NLS catalog for the given locale public static void relocalize try bundle Resource Bundle get Bundle bundle Name Locale get Default catch Missing Resource Exception e System out println Missing resource bundle Name replace properties for locale Locale get Default NON NLS 1 NON NLS 2 throw e  ResourceBundle getBundle bundleName getDefault MissingResourceException bundleName getDefault
public static String tokenize String command Line int count 0 String arguments new String 10 String Tokenizer tokenizer new String Tokenizer command Line true NON NLS 1 String token NON NLS 1 boolean inside Quotes false boolean start New Token true take care to quotes on the command line xxx aaa bbb ccc yyy xxx aaa bbb ccc yyy xxx aaa bbb ccc yyy xxx aaa bbb ccc yyy xxx aaa bbb ccc yyy xxx aaa bbb ccc yyy xxx aaa bbb ccc yyy xxx aaa bbb ccc yyy while tokenizer has More Tokens token tokenizer next Token if token equals NON NLS 1 if inside Quotes arguments count 1 token start New Token false else start New Token true else if token equals NON NLS 1 if inside Quotes start New Token NON NLS 1 if count arguments length System arraycopy arguments 0 arguments new String count 2 0 count arguments count NON NLS 1 inside Quotes inside Quotes start New Token false else if inside Quotes arguments count 1 token else if token length 0 start New Token arguments count 1 token else if count arguments length System arraycopy arguments 0 arguments new String count 2 0 count String trimmed Token token trim if trimmed Token length 0 arguments count trimmed Token start New Token false System arraycopy arguments 0 arguments new String count 0 count return arguments  commandLine StringTokenizer StringTokenizer commandLine insideQuotes startNewToken hasMoreTokens nextToken insideQuotes startNewToken startNewToken insideQuotes startNewToken insideQuotes insideQuotes startNewToken insideQuotes startNewToken trimmedToken trimmedToken trimmedToken startNewToken
public boolean compile String argv decode command line arguments try configure argv if this proceed if this verbose System out println new Compiler Options this options if this show Progress this out println Main bind progress compiling NON NLS 1 for int i 0 i this repetitions i this global Problems Count 0 this global Errors Count 0 this global Warnings Count 0 this line Count 0 this exported Class Files Counter 0 if this repetitions 1 this out flush this out println Main bind compile repetition NON NLS 1 String value Of i 1 String value Of this repetitions request compilation perform Compilation if this show Progress this out println if this system Exit When Finished this out flush this err flush System exit this global Errors Count 0 1 0 catch Invalid Input Exception e this err println e get Message if this system Exit When Finished System exit 1 return false catch Runtime Exception e internal compiler failure if this system Exit When Finished this out flush this err flush if this log null this err close System exit 1 return false e print Stack Trace finally this out flush this err flush if this log null this err close if this global Errors Count 0 return true return false  CompilerOptions showProgress globalProblemsCount globalErrorsCount globalWarningsCount lineCount exportedClassFilesCounter valueOf valueOf performCompilation showProgress systemExitWhenFinished globalErrorsCount InvalidInputException getMessage systemExitWhenFinished RuntimeException systemExitWhenFinished printStackTrace globalErrorsCount
public void configure String argv throws Invalid Input Exception if argv null argv length 0 print Usage return final int Inside Classpath 1 final int Inside Destination Path 2 final int Target Setting 4 final int Inside Log 8 final int Inside Repetition 16 final int Inside Source 32 final int Inside Default Encoding 64 final int Inside Boot Classpath 128 final int Inside Max Problems 256 final int Default 0 String bootclasspaths null int DEFAULT SIZE CLASSPATH 4 int path Count 0 int bootclasspath Count 0 int index 1 files Count 0 arg Count argv length int mode Default this repetitions 0 boolean print Usage Required false boolean print Version Required false boolean did Specify Compliance false boolean did Specify Default Encoding false boolean did Specify Target false boolean did Specify Deprecation false boolean did Specify Warnings false boolean use Enable Javadoc false String custom Encoding null String current Arg NON NLS 1 expand the command line if necessary boolean need Expansion false loop for int i 0 i arg Count i if argv i starts With NON NLS 1 need Expansion true break loop String new Command Line Args null if need Expansion new Command Line Args new String arg Count index 0 for int i 0 i arg Count i String new Args null String arg argv i trim if arg starts With NON NLS 1 try Line Number Reader reader new Line Number Reader new String Reader new String Util get File Char Content new File arg substring 1 null String Buffer buffer new String Buffer String line while line reader read Line null buffer append line append NON NLS 1 new Args tokenize buffer to String catch IO Exception e throw new Invalid Input Exception Main bind configure invalidexpansionargumentname arg NON NLS 1 if new Args null int new Command Line Args Length new Command Line Args length int new Args Length new Args length System arraycopy new Command Line Args 0 new Command Line Args new String new Command Line Args Length new Args Length 1 0 index System arraycopy new Args 0 new Command Line Args index new Args Length index new Args Length else new Command Line Args index arg index 1 else new Command Line Args argv for int i 0 i arg Count i new Command Line Args i new Command Line Args i trim arg Count new Command Line Args length while index arg Count if custom Encoding null throw new Invalid Input Exception Main bind configure unexpected Custom Encoding current Arg custom Encoding NON NLS 1 current Arg new Command Line Args index custom Encoding null if current Arg ends With NON NLS 1 look for encoding specification int encoding Start current Arg index Of 1 int encoding End current Arg length 1 if encoding Start 1 if encoding Start encoding End custom Encoding current Arg substring encoding Start encoding End try ensure encoding is supported new Input Stream Reader new Byte Array Input Stream new byte 0 custom Encoding catch Unsupported Encoding Exception e throw new Invalid Input Exception Main bind configure unsupported Encoding custom Encoding NON NLS 1 current Arg current Arg substring 0 encoding Start 1 if current Arg ends With SUFFIX STRING java if this filenames null this filenames new String arg Count index this encodings new String arg Count index else if files Count this filenames length int length this filenames length System arraycopy this filenames 0 this filenames new String length arg Count index 0 length System arraycopy this encodings 0 this encodings new String length arg Count index 0 length this filenames files Count current Arg this encodings files Count custom Encoding custom Encoding null mode Default continue if current Arg equals log NON NLS 1 if this log null throw new Invalid Input Exception Main bind configure duplicate Log current Arg NON NLS 1 mode Inside Log continue if current Arg equals repeat NON NLS 1 if this repetitions 0 throw new Invalid Input Exception Main bind configure duplicate Repeat current Arg NON NLS 1 mode Inside Repetition continue if current Arg equals max Problems NON NLS 1 if this max Problems 0 throw new Invalid Input Exception Main bind configure duplicate Max Problems current Arg NON NLS 1 mode Inside Max Problems continue if current Arg equals source NON NLS 1 mode Inside Source continue if current Arg equals encoding NON NLS 1 mode Inside Default Encoding continue if current Arg equals 1 3 NON NLS 1 if did Specify Compliance throw new Invalid Input Exception Main bind configure duplicate Compliance current Arg NON NLS 1 did Specify Compliance true this options put Compiler Options OPTION Compliance Compiler Options VERSION 1 3 mode Default continue if current Arg equals 1 4 NON NLS 1 if did Specify Compliance throw new Invalid Input Exception Main bind configure duplicate Compliance current Arg NON NLS 1 did Specify Compliance true this options put Compiler Options OPTION Compliance Compiler Options VERSION 1 4 mode Default continue if current Arg equals d NON NLS 1 if this destination Path null throw new Invalid Input Exception Main bind configure duplicate Output Path current Arg NON NLS 1 mode Inside Destination Path this generate Packages Structure true continue if current Arg equals classpath NON NLS 1 current Arg equals cp NON NLS 1 NON NLS 2 if path Count 0 this classpaths new String DEFAULT SIZE CLASSPATH mode Inside Classpath continue if current Arg equals bootclasspath NON NLS 1 if bootclasspath Count 0 throw new Invalid Input Exception Main bind configure duplicate Boot Classpath current Arg NON NLS 1 bootclasspaths new String DEFAULT SIZE CLASSPATH mode Inside Boot Classpath continue if current Arg equals progress NON NLS 1 mode Default this show Progress true continue if current Arg equals proceed On Error NON NLS 1 mode Default this proceed On Error true continue if current Arg equals time NON NLS 1 mode Default this timing true continue if current Arg equals version NON NLS 1 current Arg equals v NON NLS 1 print Version this proceed false return if current Arg equals showversion NON NLS 1 print Version Required true continue if deprecation equals current Arg NON NLS 1 did Specify Deprecation true this options put Compiler Options OPTION ReportDeprecation Compiler Options WARNING continue if current Arg equals help current Arg equals NON NLS 1 NON NLS 2 print Usage Required true continue if current Arg equals no Exit NON NLS 1 mode Default this system Exit When Finished false continue if current Arg equals verbose NON NLS 1 mode Default this verbose true continue if current Arg equals reference Info NON NLS 1 mode Default this produce Ref Info true continue if current Arg equals inlineJSR NON NLS 1 mode Default this options put Compiler Options OPTION InlineJsr Compiler Options ENABLED continue if current Arg starts With g NON NLS 1 mode Default String debug Option current Arg int length current Arg length if length 2 this options put Compiler Options OPTION LocalVariableAttribute Compiler Options GENERATE this options put Compiler Options OPTION LineNumberAttribute Compiler Options GENERATE this options put Compiler Options OPTION SourceFileAttribute Compiler Options GENERATE continue if length 3 this options put Compiler Options OPTION LocalVariableAttribute Compiler Options DO NOT GENERATE this options put Compiler Options OPTION LineNumberAttribute Compiler Options DO NOT GENERATE this options put Compiler Options OPTION SourceFileAttribute Compiler Options DO NOT GENERATE if length 7 debug Option equals g none NON NLS 1 continue String Tokenizer tokenizer new String Tokenizer debug Option substring 3 debug Option length NON NLS 1 while tokenizer has More Tokens String token tokenizer next Token if token equals vars NON NLS 1 this options put Compiler Options OPTION LocalVariableAttribute Compiler Options GENERATE else if token equals lines NON NLS 1 this optio InvalidInputException printUsage InsideClasspath InsideDestinationPath TargetSetting InsideLog InsideRepetition InsideSource InsideDefaultEncoding InsideBootClasspath InsideMaxProblems DEFAULT_SIZE_CLASSPATH pathCount bootclasspathCount filesCount argCount printUsageRequired printVersionRequired didSpecifyCompliance didSpecifyDefaultEncoding didSpecifyTarget didSpecifyDeprecation didSpecifyWarnings useEnableJavadoc customEncoding currentArg needExpansion argCount startsWith needExpansion newCommandLineArgs needExpansion newCommandLineArgs argCount argCount newArgs startsWith LineNumberReader LineNumberReader StringReader getFileCharContent StringBuffer StringBuffer readLine newArgs toString IOException InvalidInputException newArgs newCommandLineArgsLength newCommandLineArgs newArgsLength newArgs newCommandLineArgs newCommandLineArgs newCommandLineArgsLength newArgsLength newArgs newCommandLineArgs newArgsLength newArgsLength newCommandLineArgs newCommandLineArgs argCount newCommandLineArgs newCommandLineArgs argCount newCommandLineArgs argCount customEncoding InvalidInputException unexpectedCustomEncoding currentArg customEncoding currentArg newCommandLineArgs customEncoding currentArg endsWith encodingStart currentArg indexOf encodingEnd currentArg encodingStart encodingStart encodingEnd customEncoding currentArg encodingStart encodingEnd InputStreamReader ByteArrayInputStream customEncoding UnsupportedEncodingException InvalidInputException unsupportedEncoding customEncoding currentArg currentArg encodingStart currentArg endsWith SUFFIX_STRING_java argCount argCount filesCount argCount argCount filesCount currentArg filesCount customEncoding customEncoding currentArg InvalidInputException duplicateLog currentArg InsideLog currentArg InvalidInputException duplicateRepeat currentArg InsideRepetition currentArg maxProblems maxProblems InvalidInputException duplicateMaxProblems currentArg InsideMaxProblems currentArg InsideSource currentArg InsideDefaultEncoding currentArg didSpecifyCompliance InvalidInputException duplicateCompliance currentArg didSpecifyCompliance CompilerOptions OPTION_Compliance CompilerOptions VERSION_1_3 currentArg didSpecifyCompliance InvalidInputException duplicateCompliance currentArg didSpecifyCompliance CompilerOptions OPTION_Compliance CompilerOptions VERSION_1_4 currentArg destinationPath InvalidInputException duplicateOutputPath currentArg InsideDestinationPath generatePackagesStructure currentArg currentArg pathCount DEFAULT_SIZE_CLASSPATH InsideClasspath currentArg bootclasspathCount InvalidInputException duplicateBootClasspath currentArg DEFAULT_SIZE_CLASSPATH InsideBootClasspath currentArg showProgress currentArg proceedOnError proceedOnError currentArg currentArg currentArg printVersion currentArg printVersionRequired currentArg didSpecifyDeprecation CompilerOptions OPTION_ReportDeprecation CompilerOptions currentArg currentArg printUsageRequired currentArg noExit systemExitWhenFinished currentArg currentArg referenceInfo produceRefInfo currentArg CompilerOptions OPTION_InlineJsr CompilerOptions currentArg startsWith debugOption currentArg currentArg CompilerOptions OPTION_LocalVariableAttribute CompilerOptions CompilerOptions OPTION_LineNumberAttribute CompilerOptions CompilerOptions OPTION_SourceFileAttribute CompilerOptions CompilerOptions OPTION_LocalVariableAttribute CompilerOptions DO_NOT_GENERATE CompilerOptions OPTION_LineNumberAttribute CompilerOptions DO_NOT_GENERATE CompilerOptions OPTION_SourceFileAttribute CompilerOptions DO_NOT_GENERATE debugOption StringTokenizer StringTokenizer debugOption debugOption hasMoreTokens nextToken CompilerOptions OPTION_LocalVariableAttribute CompilerOptions
private void disable Warnings Object entries this options entry Set to Array for int i 0 max entries length i max i Map Entry entry Map Entry entries i if entry get Key instanceof String continue if entry get Value instanceof String continue if String entry get Value equals Compiler Options WARNING this options put entry get Key Compiler Options IGNORE this options put Compiler Options OPTION TaskTags NON NLS 1  disableWarnings entrySet toArray getKey getValue getValue CompilerOptions getKey CompilerOptions CompilerOptions OPTION_TaskTags
public String extract Destination Path From Source File Compilation Result result I Compilation Unit compilation Unit result compilation Unit if compilation Unit null char file Name compilation Unit get File Name int last Index Char Operation last Index Of java io File separator Char file Name if last Index 1 return System get Property user dir NON NLS 1 return new String Char Operation subarray file Name 0 last Index return System get Property user dir NON NLS 1  extractDestinationPathFromSourceFile CompilationResult ICompilationUnit compilationUnit compilationUnit compilationUnit fileName compilationUnit getFileName lastIndex CharOperation lastIndexOf separatorChar fileName lastIndex getProperty CharOperation fileName lastIndex getProperty
int line Delta 0 public void accept Result Compilation Result compilation Result if compilation Result line Separator Positions null int unit Line Count compilation Result line Separator Positions length Main this line Count unit Line Count this line Delta unit Line Count if Main this show Progress this line Delta 2000 in log mode dump a dot every 2000 lines compiled Main this out print this line Delta 0 if compilation Result has Problems compilation Result has Tasks I Problem problems compilation Result get All Problems int count problems length int local Error Count 0 char unit Source compilation Result compilation Unit get Contents for int i 0 i count i if problems i null Main this global Problems Count if local Error Count 0 Main this err println NON NLS 1 Main this err print Main this global Problems Count NON NLS 1 problems i is Error Main bind requestor error NON NLS 1 Main bind requestor warning NON NLS 1 if problems i is Error Main this global Errors Count else Main this global Warnings Count Main this err print NON NLS 1 Main this err print Main bind requestor in new String problems i get Originating File Name NON NLS 1 try Main this err println Default Problem problems i error Report Source unit Source Main this err println problems i get Message catch Exception e Main this err println Main bind requestor not Retrieve Error Message problems i to String NON NLS 1 Main this err println NON NLS 1 if problems i is Error local Error Count exit if Main this system Exit When Finished Main this proceed On Error local Error Count 0 Main this print Stats Main this err flush Main this out flush System exit 1 output Class Files compilation Result  lineDelta acceptResult CompilationResult compilationResult compilationResult lineSeparatorPositions unitLineCount compilationResult lineSeparatorPositions lineCount unitLineCount lineDelta unitLineCount showProgress lineDelta lineDelta compilationResult hasProblems compilationResult hasTasks IProblem compilationResult getAllProblems localErrorCount unitSource compilationResult compilationUnit getContents globalProblemsCount localErrorCount globalProblemsCount isError isError globalErrorsCount globalWarningsCount getOriginatingFileName DefaultProblem errorReportSource unitSource getMessage notRetrieveErrorMessage toString isError localErrorCount systemExitWhenFinished proceedOnError localErrorCount printStats outputClassFiles compilationResult
public I Compiler Requestor get Batch Requestor return new I Compiler Requestor int line Delta 0 public void accept Result Compilation Result compilation Result if compilation Result line Separator Positions null int unit Line Count compilation Result line Separator Positions length Main this line Count unit Line Count this line Delta unit Line Count if Main this show Progress this line Delta 2000 in log mode dump a dot every 2000 lines compiled Main this out print this line Delta 0 if compilation Result has Problems compilation Result has Tasks I Problem problems compilation Result get All Problems int count problems length int local Error Count 0 char unit Source compilation Result compilation Unit get Contents for int i 0 i count i if problems i null Main this global Problems Count if local Error Count 0 Main this err println NON NLS 1 Main this err print Main this global Problems Count NON NLS 1 problems i is Error Main bind requestor error NON NLS 1 Main bind requestor warning NON NLS 1 if problems i is Error Main this global Errors Count else Main this global Warnings Count Main this err print NON NLS 1 Main this err print Main bind requestor in new String problems i get Originating File Name NON NLS 1 try Main this err println Default Problem problems i error Report Source unit Source Main this err println problems i get Message catch Exception e Main this err println Main bind requestor not Retrieve Error Message problems i to String NON NLS 1 Main this err println NON NLS 1 if problems i is Error local Error Count exit if Main this system Exit When Finished Main this proceed On Error local Error Count 0 Main this print Stats Main this err flush Main this out flush System exit 1 output Class Files compilation Result  ICompilerRequestor getBatchRequestor ICompilerRequestor lineDelta acceptResult CompilationResult compilationResult compilationResult lineSeparatorPositions unitLineCount compilationResult lineSeparatorPositions lineCount unitLineCount lineDelta unitLineCount showProgress lineDelta lineDelta compilationResult hasProblems compilationResult hasTasks IProblem compilationResult getAllProblems localErrorCount unitSource compilationResult compilationUnit getContents globalProblemsCount localErrorCount globalProblemsCount isError isError globalErrorsCount globalWarningsCount getOriginatingFileName DefaultProblem errorReportSource unitSource getMessage notRetrieveErrorMessage toString isError localErrorCount systemExitWhenFinished proceedOnError localErrorCount printStats outputClassFiles compilationResult
public Compilation Unit get Compilation Units throws Invalid Input Exception int file Count this filenames length Compilation Unit units new Compilation Unit file Count Hashtable Of Object known File Names new Hashtable Of Object file Count String default Encoding String this options get Compiler Options OPTION Encoding if equals default Encoding NON NLS 1 default Encoding null NON NLS 1 for int i 0 i file Count i char char Name this filenames i to Char Array if known File Names get char Name null throw new Invalid Input Exception Main bind unit more this filenames i NON NLS 1 known File Names put char Name char Name File file new File this filenames i if file exists throw new Invalid Input Exception Main bind unit missing this filenames i NON NLS 1 String encoding this encodings i if encoding null encoding default Encoding units i new Compilation Unit null this filenames i encoding return units  CompilationUnit getCompilationUnits InvalidInputException fileCount CompilationUnit CompilationUnit fileCount HashtableOfObject knownFileNames HashtableOfObject fileCount defaultEncoding CompilerOptions OPTION_Encoding defaultEncoding defaultEncoding fileCount charName toCharArray knownFileNames charName InvalidInputException knownFileNames charName charName InvalidInputException defaultEncoding CompilationUnit
Filename Filter filter new Filename Filter public boolean accept File dir String name String lower Case Name name to Lower Case if lower Case Name ends With SUFFIX STRING jar lower Case Name ends With SUFFIX STRING zip return true return false  FilenameFilter FilenameFilter lowerCaseName toLowerCase lowerCaseName endsWith SUFFIX_STRING_jar lowerCaseName endsWith SUFFIX_STRING_zip
private File get Libraries Files File files Filename Filter filter new Filename Filter public boolean accept File dir String name String lower Case Name name to Lower Case if lower Case Name ends With SUFFIX STRING jar lower Case Name ends With SUFFIX STRING zip return true return false final int files Length files length File result new File files Length for int i 0 i files Length i File current File files i if current File exists current File is Directory result i current File list Files filter return result  getLibrariesFiles FilenameFilter FilenameFilter lowerCaseName toLowerCase lowerCaseName endsWith SUFFIX_STRING_jar lowerCaseName endsWith SUFFIX_STRING_zip filesLength filesLength filesLength currentFile currentFile currentFile isDirectory currentFile listFiles
private int get Length File libraries int sum 0 if libraries null for int i 0 max libraries length i max i final File current Files libraries i if current Files null sum current Files length return sum  getLength currentFiles currentFiles currentFiles
passes the initial set of files to the batch oracle to avoid finding more than once the same units when case insensitive match return new I Error Handling Policy public boolean proceed On Errors return Main this proceed On Error stop if there are some errors  IErrorHandlingPolicy proceedOnErrors proceedOnError
return Main this proceed On Error stop if there are some errors public boolean stop On First Error return false  proceedOnError stopOnFirstError
public I Error Handling Policy get Handling Policy passes the initial set of files to the batch oracle to avoid finding more than once the same units when case insensitive match return new I Error Handling Policy public boolean proceed On Errors return Main this proceed On Error stop if there are some errors public boolean stop On First Error return false  IErrorHandlingPolicy getHandlingPolicy IErrorHandlingPolicy proceedOnErrors proceedOnError stopOnFirstError
public File System get Library Access String default Encoding String this options get Compiler Options OPTION Encoding if equals default Encoding NON NLS 1 default Encoding null NON NLS 1 return new File System this classpaths this filenames default Encoding  FileSystem getLibraryAccess defaultEncoding CompilerOptions OPTION_Encoding defaultEncoding defaultEncoding FileSystem defaultEncoding
Low level API performing the actual compilation public I Problem Factory get Problem Factory return new Default Problem Factory Locale get Default  IProblemFactory getProblemFactory DefaultProblemFactory getDefault
public void output Class Files Compilation Result unit Result if unit Result null unit Result has Errors this proceed On Error Enumeration class Files unit Result compiled Types elements if this generate Packages Structure while class Files has More Elements this destination Path extract Destination Path From Source File unit Result retrieve the key and the corresponding classfile Class File class File Class File class Files next Element char filename class File file Name int length filename length char relative Name new char length 6 System arraycopy filename 0 relative Name 0 length System arraycopy SUFFIX class 0 relative Name length 6 Char Operation replace relative Name File separator Char try if this compiler Options verbose System out println Util bind compilation write NON NLS 1 new String String value Of this exported Class Files Counter 1 new String relative Name Class File write To Disk this generate Packages Structure this destination Path new String relative Name class File get Bytes catch IO Exception e String file Name this destination Path new String relative Name e print Stack Trace this err println Main bind output no Class File Created file Name NON NLS 1 this exported Class Files Counter else if this destination Path null while class Files has More Elements retrieve the key and the corresponding classfile Class File class File Class File class Files next Element char filename class File file Name int length filename length char relative Name new char length 6 System arraycopy filename 0 relative Name 0 length System arraycopy SUFFIX class 0 relative Name length 6 Char Operation replace relative Name File separator Char try if this compiler Options verbose System out println Util bind compilation write NON NLS 1 new String String value Of this exported Class Files Counter 1 new String relative Name Class File write To Disk this generate Packages Structure this destination Path new String relative Name class File get Bytes catch IO Exception e String file Name this destination Path new String relative Name e print Stack Trace this err println Main bind output no Class File Created file Name NON NLS 1 this exported Class Files Counter  outputClassFiles CompilationResult unitResult unitResult unitResult hasErrors proceedOnError classFiles unitResult compiledTypes generatePackagesStructure classFiles hasMoreElements destinationPath extractDestinationPathFromSourceFile unitResult ClassFile classFile ClassFile classFiles nextElement classFile fileName relativeName relativeName SUFFIX_class relativeName CharOperation relativeName separatorChar compilerOptions valueOf exportedClassFilesCounter relativeName ClassFile writeToDisk generatePackagesStructure destinationPath relativeName classFile getBytes IOException fileName destinationPath relativeName printStackTrace noClassFileCreated fileName exportedClassFilesCounter destinationPath classFiles hasMoreElements ClassFile classFile ClassFile classFiles nextElement classFile fileName relativeName relativeName SUFFIX_class relativeName CharOperation relativeName separatorChar compilerOptions valueOf exportedClassFilesCounter relativeName ClassFile writeToDisk generatePackagesStructure destinationPath relativeName classFile getBytes IOException fileName destinationPath relativeName printStackTrace noClassFileCreated fileName exportedClassFilesCounter
public void perform Compilation throws Invalid Input Exception this start Time System current Time Millis I Name Environment environment get Library Access Compiler batch Compiler new Compiler environment get Handling Policy this options get Batch Requestor get Problem Factory this compiler Options batch Compiler options set the non externally configurable options this compiler Options verbose this verbose this compiler Options produce Reference Info this produce Ref Info batch Compiler compile get Compilation Units print Stats cleanup environment cleanup  performCompilation InvalidInputException startTime currentTimeMillis INameEnvironment getLibraryAccess batchCompiler getHandlingPolicy getBatchRequestor getProblemFactory compilerOptions batchCompiler compilerOptions compilerOptions produceReferenceInfo produceRefInfo batchCompiler getCompilationUnits printStats
public void print Stats if this timing long time System current Time Millis this start Time if this line Count 0 this out println Main bind compile instant Time NON NLS 1 new String String value Of this line Count String value Of time String value Of int this line Count 10000 0 time 10 0 else this out println Main bind compile total Time String value Of time NON NLS 1 if this global Problems Count 0 if this global Problems Count 1 this err print Main bind compile one Problem NON NLS 1 else this err print Main bind compile several Problems String value Of this global Problems Count NON NLS 1 this err print NON NLS 1 if this global Errors Count 0 if this global Errors Count 1 this err print Main bind compile one Error NON NLS 1 else this err print Main bind compile several Errors String value Of this global Errors Count NON NLS 1 if this global Warnings Count 0 if this global Errors Count 0 this err print NON NLS 1 if this global Warnings Count 1 this err print Main bind compile one Warning NON NLS 1 else this err print Main bind compile several Warnings String value Of this global Warnings Count NON NLS 1 this err println NON NLS 1 if this exported Class Files Counter 0 this show Progress this timing this verbose if this exported Class Files Counter 1 this out println Main bind compile one Class File Generated NON NLS 1 else this out println Main bind compile several Class Files Generated NON NLS 1 String value Of this exported Class Files Counter  printStats currentTimeMillis startTime lineCount instantTime valueOf lineCount valueOf valueOf lineCount totalTime valueOf globalProblemsCount globalProblemsCount oneProblem severalProblems valueOf globalProblemsCount globalErrorsCount globalErrorsCount oneError severalErrors valueOf globalErrorsCount globalWarningsCount globalErrorsCount globalWarningsCount oneWarning severalWarnings valueOf globalWarningsCount exportedClassFilesCounter showProgress exportedClassFilesCounter oneClassFileGenerated severalClassFilesGenerated valueOf exportedClassFilesCounter
public void print Usage this out println Main bind misc usage System get Property path separator NON NLS 1 NON NLS 2 this out flush this err flush  printUsage getProperty
public void print Version this out println Main bind misc version NON NLS 1 this out flush this err flush  printVersion

INTERNAL USE ONLY This methods creates a new instance of the receiver public Class File default constructor for subclasses  ClassFile
INTERNAL USE ONLY This methods creates a new instance of the receiver param a Type org eclipse jdt internal compiler lookup Source Type Binding param enclosing Class File org eclipse jdt internal compiler Class File param creating Problem Type CODE boolean CODE public Class File Source Type Binding a Type Class File enclosing Class File boolean creating Problem Type reference Binding a Type init Byte Arrays generate the magic numbers inside the header header header Offset byte 0xCAFEBABEL 24 header header Offset byte 0xCAFEBABEL 16 header header Offset byte 0xCAFEBABEL 8 header header Offset byte 0xCAFEBABEL 0 this targetJDK reference Binding scope environment options targetJDK header header Offset byte this targetJDK 8 minor high header header Offset byte this targetJDK 0 minor low header header Offset byte this targetJDK 24 major high header header Offset byte this targetJDK 16 major low constant Pool Offset header Offset header Offset 2 constant Pool new Constant Pool this Modifier manipulations for classfile int access Flags a Type get Access Flags if a Type is Private rewrite private to non public access Flags Acc Public if a Type is Protected rewrite protected into public access Flags Acc Public clear all bits that are illegal for a class or an interface access Flags Acc Strictfp Acc Protected Acc Private Acc Static Acc Synchronized Acc Native set the Acc Super flag has to be done after clearing Acc Synchronized since same value if a Type is Class access Flags Acc Super this enclosing Class File enclosing Class File innerclasses get their names computed at code gen time now we continue to generate the bytes inside the contents array contents contents Offset byte access Flags 8 contents contents Offset byte access Flags int class Name Index constant Pool literal Index a Type contents contents Offset byte class Name Index 8 contents contents Offset byte class Name Index int superclass Name Index if a Type is Interface superclass Name Index constant Pool literal Index For Java Lang Object else superclass Name Index a Type superclass null 0 constant Pool literal Index a Type superclass contents contents Offset byte superclass Name Index 8 contents contents Offset byte superclass Name Index Reference Binding super Interfaces Binding a Type super Interfaces int interfaces Count super Interfaces Binding length contents contents Offset byte interfaces Count 8 contents contents Offset byte interfaces Count for int i 0 i interfaces Count i int interface Index constant Pool literal Index super Interfaces Binding i contents contents Offset byte interface Index 8 contents contents Offset byte interface Index produce Debug Attributes reference Binding scope environment options produce Debug Attributes inner Classes Bindings new Reference Binding INNER CLASSES SIZE this creating Problem Type creating Problem Type code Stream new Code Stream this retrieve the enclosing one guaranteed to be the one matching the propagated flow info 1FF9ZBU LFCOM ALL Local variable attributes busted Sanity check Class File outermost Class File this outer Most Enclosing Class File if this outermost Class File code Stream max Field Count a Type scope reference Type max Field Count else code Stream max Field Count outermost Class File code Stream max Field Count  aType SourceTypeBinding enclosingClassFile ClassFile creatingProblemType ClassFile SourceTypeBinding aType ClassFile enclosingClassFile creatingProblemType referenceBinding aType initByteArrays headerOffset headerOffset headerOffset headerOffset referenceBinding headerOffset headerOffset headerOffset headerOffset constantPoolOffset headerOffset headerOffset constantPool ConstantPool accessFlags aType getAccessFlags aType isPrivate accessFlags AccPublic aType isProtected accessFlags AccPublic accessFlags AccStrictfp AccProtected AccPrivate AccStatic AccSynchronized AccNative AccSuper AccSynchronized aType isClass accessFlags AccSuper enclosingClassFile enclosingClassFile contentsOffset accessFlags contentsOffset accessFlags classNameIndex constantPool literalIndex aType contentsOffset classNameIndex contentsOffset classNameIndex superclassNameIndex aType isInterface superclassNameIndex constantPool literalIndexForJavaLangObject superclassNameIndex aType constantPool literalIndex aType contentsOffset superclassNameIndex contentsOffset superclassNameIndex ReferenceBinding superInterfacesBinding aType superInterfaces interfacesCount superInterfacesBinding contentsOffset interfacesCount contentsOffset interfacesCount interfacesCount interfaceIndex constantPool literalIndex superInterfacesBinding contentsOffset interfaceIndex contentsOffset interfaceIndex produceDebugAttributes referenceBinding produceDebugAttributes innerClassesBindings ReferenceBinding INNER_CLASSES_SIZE creatingProblemType creatingProblemType codeStream CodeStream ClassFile outermostClassFile outerMostEnclosingClassFile outermostClassFile codeStream maxFieldCount aType referenceType maxFieldCount codeStream maxFieldCount outermostClassFile codeStream maxFieldCount
INTERNAL USE ONLY Generate the byte for a problem method info that correspond to a boggus method param method org eclipse jdt internal compiler ast Abstract Method Declaration param method Binding org eclipse jdt internal compiler nameloopkup Method Binding public void add Abstract Method Abstract Method Declaration method Method Binding method Binding force the modifiers to be public and abstract method Binding modifiers Acc Public Acc Abstract this generate Method Info Header method Binding int method Attribute Offset this contents Offset int attribute Number this generate Method Info Attribute method Binding this complete Method Info method Attribute Offset attribute Number  AbstractMethodDeclaration methodBinding MethodBinding addAbstractMethod AbstractMethodDeclaration MethodBinding methodBinding methodBinding AccPublic AccAbstract generateMethodInfoHeader methodBinding methodAttributeOffset contentsOffset attributeNumber generateMethodInfoAttribute methodBinding completeMethodInfo methodAttributeOffset attributeNumber
INTERNAL USE ONLY This methods generate all the attributes for the receiver For a class they could be source file attribute inner classes attribute deprecated attribute public void add Attributes update the method count contents method Count Offset byte method Count 8 contents method Count Offset byte method Count int attribute Number 0 leave two bytes for the number of attributes and store the current offset int attribute Offset contents Offset contents Offset 2 source attribute if produce Debug Attributes Compiler Options Source 0 String full File Name new String reference Binding scope reference Compilation Unit get File Name full File Name full File Name replace int last Index full File Name last Index Of if last Index 1 full File Name full File Name substring last Index 1 full File Name length check that there is enough space to write all the bytes for the field info corresponding to the field Binding if contents Offset 8 contents length resize Contents 8 int source Attribute Name Index constant Pool literal Index Attribute Names Constants Source Name contents contents Offset byte source Attribute Name Index 8 contents contents Offset byte source Attribute Name Index The length of a source file attribute is 2 This is a fixed length attribute contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 2 write the source file name int file Name Index constant Pool literal Index full File Name to Char Array contents contents Offset byte file Name Index 8 contents contents Offset byte file Name Index attribute Number Deprecated attribute if reference Binding is Deprecated check that there is enough space to write all the bytes for the field info corresponding to the field Binding if contents Offset 6 contents length resize Contents 6 int deprecated Attribute Name Index constant Pool literal Index Attribute Names Constants Deprecated Name contents contents Offset byte deprecated Attribute Name Index 8 contents contents Offset byte deprecated Attribute Name Index the length of a deprecated attribute is equals to 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 attribute Number Inner class attribute if number Of Inner Classes 0 Generate the inner class attribute int ex Size 8 number Of Inner Classes 8 if ex Size contents Offset this contents length resize Contents ex Size Now we now the size of the attribute and the number of entries attribute name int attribute Name Index constant Pool literal Index Attribute Names Constants Inner Class Name contents contents Offset byte attribute Name Index 8 contents contents Offset byte attribute Name Index int value number Of Inner Classes 3 2 contents contents Offset byte value 24 contents contents Offset byte value 16 contents contents Offset byte value 8 contents contents Offset byte value contents contents Offset byte number Of Inner Classes 8 contents contents Offset byte number Of Inner Classes for int i 0 i number Of Inner Classes i Reference Binding inner Class inner Classes Bindings i int access Flags inner Class get Access Flags int inner Class Index constant Pool literal Index inner Class inner class index contents contents Offset byte inner Class Index 8 contents contents Offset byte inner Class Index outer class index anonymous and local have no outer class index if inner Class is Member Type member or member of local int outer Class Index constant Pool literal Index inner Class enclosing Type contents contents Offset byte outer Class Index 8 contents contents Offset byte outer Class Index else equals to 0 if the inner Class is not a member type contents contents Offset 0 contents contents Offset 0 name index if inner Class is Anonymous Type int name Index constant Pool literal Index inner Class source Name contents contents Offset byte name Index 8 contents contents Offset byte name Index else equals to 0 if the inner Class is an anonymous type contents contents Offset 0 contents contents Offset 0 access flag if inner Class is Anonymous Type access Flags Acc Private else if inner Class is Local Type inner Class is Member Type access Flags Acc Private contents contents Offset byte access Flags 8 contents contents Offset byte access Flags attribute Number update the number of attributes if attribute Offset 2 this contents length resize Contents 2 contents attribute Offset byte attribute Number 8 contents attribute Offset byte attribute Number resynchronize all offsets of the classfile header constant Pool pool Content header Offset constant Pool current Offset int constant Pool Count constant Pool current Index header constant Pool Offset byte constant Pool Count 8 header constant Pool Offset byte constant Pool Count  addAttributes methodCountOffset methodCount methodCountOffset methodCount attributeNumber attributeOffset contentsOffset contentsOffset produceDebugAttributes CompilerOptions fullFileName referenceBinding referenceCompilationUnit getFileName fullFileName fullFileName lastIndex fullFileName lastIndexOf lastIndex fullFileName fullFileName lastIndex fullFileName fieldBinding contentsOffset resizeContents sourceAttributeNameIndex constantPool literalIndex AttributeNamesConstants SourceName contentsOffset sourceAttributeNameIndex contentsOffset sourceAttributeNameIndex contentsOffset contentsOffset contentsOffset contentsOffset fileNameIndex constantPool literalIndex fullFileName toCharArray contentsOffset fileNameIndex contentsOffset fileNameIndex attributeNumber referenceBinding isDeprecated fieldBinding contentsOffset resizeContents deprecatedAttributeNameIndex constantPool literalIndex AttributeNamesConstants DeprecatedName contentsOffset deprecatedAttributeNameIndex contentsOffset deprecatedAttributeNameIndex contentsOffset contentsOffset contentsOffset contentsOffset attributeNumber numberOfInnerClasses exSize numberOfInnerClasses exSize contentsOffset resizeContents exSize attributeNameIndex constantPool literalIndex AttributeNamesConstants InnerClassName contentsOffset attributeNameIndex contentsOffset attributeNameIndex numberOfInnerClasses contentsOffset contentsOffset contentsOffset contentsOffset contentsOffset numberOfInnerClasses contentsOffset numberOfInnerClasses numberOfInnerClasses ReferenceBinding innerClass innerClassesBindings accessFlags innerClass getAccessFlags innerClassIndex constantPool literalIndex innerClass contentsOffset innerClassIndex contentsOffset innerClassIndex innerClass isMemberType outerClassIndex constantPool literalIndex innerClass enclosingType contentsOffset outerClassIndex contentsOffset outerClassIndex innerClass contentsOffset contentsOffset innerClass isAnonymousType nameIndex constantPool literalIndex innerClass sourceName contentsOffset nameIndex contentsOffset nameIndex innerClass contentsOffset contentsOffset innerClass isAnonymousType accessFlags AccPrivate innerClass isLocalType innerClass isMemberType accessFlags AccPrivate contentsOffset accessFlags contentsOffset accessFlags attributeNumber attributeOffset resizeContents attributeOffset attributeNumber attributeOffset attributeNumber constantPool poolContent headerOffset constantPool currentOffset constantPoolCount constantPool currentIndex constantPoolOffset constantPoolCount constantPoolOffset constantPoolCount
INTERNAL USE ONLY This methods generate all the default abstract method infos that correpond to the abstract methods inherited from superinterfaces public void add Default Abstract Methods default abstract methods Method Binding default Abstract Methods reference Binding get Default Abstract Methods for int i 0 max default Abstract Methods length i max i generate Method Info Header default Abstract Methods i int method Attribute Offset contents Offset int attribute Number generate Method Info Attribute default Abstract Methods i complete Method Info method Attribute Offset attribute Number  addDefaultAbstractMethods MethodBinding defaultAbstractMethods referenceBinding getDefaultAbstractMethods defaultAbstractMethods generateMethodInfoHeader defaultAbstractMethods methodAttributeOffset contentsOffset attributeNumber generateMethodInfoAttribute defaultAbstractMethods completeMethodInfo methodAttributeOffset attributeNumber
INTERNAL USE ONLY This methods generates the bytes for the field binding passed like a parameter param field Binding org eclipse jdt internal compiler lookup Field Binding public void add Field Info Field Binding field Binding int attribute Number 0 check that there is enough space to write all the bytes for the field info corresponding to the field Binding if contents Offset 30 contents length resize Contents 30 Generate two attribute constant Value Attribute and Synthetic Attribute Now we can generate all entries into the byte array First the access Flags int access Flags field Binding get Access Flags contents contents Offset byte access Flags 8 contents contents Offset byte access Flags Then the name Index int name Index constant Pool literal Index field Binding name contents contents Offset byte name Index 8 contents contents Offset byte name Index Then the descriptor Index int descriptor Index constant Pool literal Index field Binding type signature contents contents Offset byte descriptor Index 8 contents contents Offset byte descriptor Index leave some space for the number of attributes int field Attribute Offset contents Offset contents Offset 2 4 7 2 only static constant fields get a Constant Attribute if field Binding constant Constant NotA Constant Now we generate the constant attribute corresponding to the field Binding int constant Value Name Index constant Pool literal Index Attribute Names Constants Constant Value Name contents contents Offset byte constant Value Name Index 8 contents contents Offset byte constant Value Name Index The attribute length 2 in case of a constant Value attribute contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 2 attribute Number Need to add the constant value index switch field Binding constant typeID case T boolean int boolean Value Index constant Pool literal Index field Binding constant boolean Value 1 0 contents contents Offset byte boolean Value Index 8 contents contents Offset byte boolean Value Index break case T byte case T char case T int case T short int integer Value Index constant Pool literal Index field Binding constant int Value contents contents Offset byte integer Value Index 8 contents contents Offset byte integer Value Index break case T float int float Value Index constant Pool literal Index field Binding constant float Value contents contents Offset byte float Value Index 8 contents contents Offset byte float Value Index break case T double int double Value Index constant Pool literal Index field Binding constant double Value contents contents Offset byte double Value Index 8 contents contents Offset byte double Value Index break case T long int long Value Index constant Pool literal Index field Binding constant long Value contents contents Offset byte long Value Index 8 contents contents Offset byte long Value Index break case T String int string Value Index constant Pool literal Index String Constant field Binding constant string Value if string Value Index 1 if creating Problem Type report an error and abort will lead to a problem type classfile creation Type Declaration type Declaration reference Binding scope reference Context Field Declaration field Decls type Declaration fields for int i 0 max field Decls length i max i if field Decls i binding field Binding problem should abort type Declaration scope problem Reporter string Constant Is Exceeding Utf8 Limit field Decls i else already inside a problem type creation no constant for this field contents Offset field Attribute Offset 2 2 is necessary to keep the two byte space for the attribute number attribute Number else contents contents Offset byte string Value Index 8 contents contents Offset byte string Value Index if field Binding is Synthetic int synthetic Attribute Name Index constant Pool literal Index Attribute Names Constants Synthetic Name contents contents Offset byte synthetic Attribute Name Index 8 contents contents Offset byte synthetic Attribute Name Index the length of a synthetic attribute is equals to 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 attribute Number if field Binding is Deprecated int deprecated Attribute Name Index constant Pool literal Index Attribute Names Constants Deprecated Name contents contents Offset byte deprecated Attribute Name Index 8 contents contents Offset byte deprecated Attribute Name Index the length of a deprecated attribute is equals to 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 attribute Number contents field Attribute Offset byte attribute Number 8 contents field Attribute Offset byte attribute Number  fieldBinding FieldBinding addFieldInfo FieldBinding fieldBinding attributeNumber fieldBinding contentsOffset resizeContents constantValueAttribute SyntheticAttribute accessFlags accessFlags fieldBinding getAccessFlags contentsOffset accessFlags contentsOffset accessFlags nameIndex nameIndex constantPool literalIndex fieldBinding contentsOffset nameIndex contentsOffset nameIndex descriptorIndex descriptorIndex constantPool literalIndex fieldBinding contentsOffset descriptorIndex contentsOffset descriptorIndex fieldAttributeOffset contentsOffset contentsOffset ConstantAttribute fieldBinding NotAConstant fieldBinding constantValueNameIndex constantPool literalIndex AttributeNamesConstants ConstantValueName contentsOffset constantValueNameIndex contentsOffset constantValueNameIndex constantValue contentsOffset contentsOffset contentsOffset contentsOffset attributeNumber constant_value_index fieldBinding T_boolean booleanValueIndex constantPool literalIndex fieldBinding booleanValue contentsOffset booleanValueIndex contentsOffset booleanValueIndex T_byte T_char T_int T_short integerValueIndex constantPool literalIndex fieldBinding intValue contentsOffset integerValueIndex contentsOffset integerValueIndex T_float floatValueIndex constantPool literalIndex fieldBinding floatValue contentsOffset floatValueIndex contentsOffset floatValueIndex T_double doubleValueIndex constantPool literalIndex fieldBinding doubleValue contentsOffset doubleValueIndex contentsOffset doubleValueIndex T_long longValueIndex constantPool literalIndex fieldBinding longValue contentsOffset longValueIndex contentsOffset longValueIndex T_String stringValueIndex constantPool literalIndex StringConstant fieldBinding stringValue stringValueIndex creatingProblemType TypeDeclaration typeDeclaration referenceBinding referenceContext FieldDeclaration fieldDecls typeDeclaration fieldDecls fieldDecls fieldBinding typeDeclaration problemReporter stringConstantIsExceedingUtf8Limit fieldDecls contentsOffset fieldAttributeOffset attributeNumber contentsOffset stringValueIndex contentsOffset stringValueIndex fieldBinding isSynthetic syntheticAttributeNameIndex constantPool literalIndex AttributeNamesConstants SyntheticName contentsOffset syntheticAttributeNameIndex contentsOffset syntheticAttributeNameIndex contentsOffset contentsOffset contentsOffset contentsOffset attributeNumber fieldBinding isDeprecated deprecatedAttributeNameIndex constantPool literalIndex AttributeNamesConstants DeprecatedName contentsOffset deprecatedAttributeNameIndex contentsOffset deprecatedAttributeNameIndex contentsOffset contentsOffset contentsOffset contentsOffset attributeNumber fieldAttributeOffset attributeNumber fieldAttributeOffset attributeNumber
INTERNAL USE ONLY This methods generate all the fields infos for the receiver This includes a field info for each defined field of that class a field info for each synthetic field e g this 0 public void add Field Infos Source Type Binding current Binding reference Binding Field Binding synthetic Fields current Binding synthetic Fields int field Count current Binding field Count synthetic Fields null 0 synthetic Fields length write the number of fields if field Count 0xFFFF reference Binding scope problem Reporter too Many Fields reference Binding scope reference Type contents contents Offset byte field Count 8 contents contents Offset byte field Count Field Binding field Bindings current Binding fields for int i 0 max field Bindings length i max i add Field Info field Bindings i if synthetic Fields null for int i 0 max synthetic Fields length i max i add Field Info synthetic Fields i  addFieldInfos SourceTypeBinding currentBinding referenceBinding FieldBinding syntheticFields currentBinding syntheticFields fieldCount currentBinding fieldCount syntheticFields syntheticFields fieldCount referenceBinding problemReporter tooManyFields referenceBinding referenceType contentsOffset fieldCount contentsOffset fieldCount FieldBinding fieldBindings currentBinding fieldBindings addFieldInfo fieldBindings syntheticFields syntheticFields addFieldInfo syntheticFields
INTERNAL USE ONLY This methods stores the bindings for each inner class They will be used to know which entries have to be generated for the inner classes attributes param ref Binding org eclipse jdt internal compiler lookup Reference Binding public void add Inner Classes Reference Binding ref Binding check first if that reference binding is there for int i 0 i number Of Inner Classes i if inner Classes Bindings i ref Binding return int length inner Classes Bindings length if number Of Inner Classes length System arraycopy inner Classes Bindings 0 inner Classes Bindings new Reference Binding length 2 0 length inner Classes Bindings number Of Inner Classes ref Binding  refBinding ReferenceBinding addInnerClasses ReferenceBinding refBinding numberOfInnerClasses innerClassesBindings refBinding innerClassesBindings numberOfInnerClasses innerClassesBindings innerClassesBindings ReferenceBinding innerClassesBindings numberOfInnerClasses refBinding
INTERNAL USE ONLY Generate the byte for a problem clinit method info that correspond to a boggus method param problems org eclipse jdt internal compiler problem Problem public void add Problem Clinit I Problem problems generate Method Info Header For Clinit leave two spaces for the number of attributes contents Offset 2 int attribute Offset contents Offset contents Offset 2 int attribute Number 0 int code Attribute Offset contents Offset generate Code Attribute Header code Stream reset For Problem Clinit this String problem String NON NLS 1 if problems null int max problems length String Buffer buffer new String Buffer 25 int count 0 for int i 0 i max i I Problem problem problems i if problem null problem is Error buffer append t problem get Message n NON NLS 1 NON NLS 2 count if problem Line 0 problem Line problem get Source Line Number problems i null insert the top line afterwards once knowing how many problems we have to consider if count 1 buffer insert 0 Util bind compilation unresolved Problems NON NLS 1 else buffer insert 0 Util bind compilation unresolved Problem NON NLS 1 problem String buffer to String return code Stream generate Code Attribute For Problem Method comp options runtime Exception Name For Compile Error code Stream generate Code Attribute For Problem Method problem String attribute Number code attribute complete Code Attribute For Clinit code Attribute Offset reference Binding scope reference Compilation Unit compilation Result line Separator Positions contents attribute Offset byte attribute Number 8 contents attribute Offset byte attribute Number  addProblemClinit IProblem generateMethodInfoHeaderForClinit contentsOffset attributeOffset contentsOffset contentsOffset attributeNumber codeAttributeOffset contentsOffset generateCodeAttributeHeader codeStream resetForProblemClinit problemString StringBuffer StringBuffer IProblem isError getMessage problemLine problemLine getSourceLineNumber unresolvedProblems unresolvedProblem problemString toString codeStream generateCodeAttributeForProblemMethod runtimeExceptionNameForCompileError codeStream generateCodeAttributeForProblemMethod problemString attributeNumber completeCodeAttributeForClinit codeAttributeOffset referenceBinding referenceCompilationUnit compilationResult lineSeparatorPositions attributeOffset attributeNumber attributeOffset attributeNumber
INTERNAL USE ONLY Generate the byte for a problem method info that correspond to a boggus constructor param method org eclipse jdt internal compiler ast Abstract Method Declaration param method Binding org eclipse jdt internal compiler nameloopkup Method Binding param problems org eclipse jdt internal compiler problem Problem public void add Problem Constructor Abstract Method Declaration method Method Binding method Binding I Problem problems always clear the strictfp native abstract bit for a problem method generate Method Info Header method Binding method Binding modifiers Acc Strictfp Acc Native Acc Abstract int method Attribute Offset contents Offset int attribute Number generate Method Info Attribute method Binding Code attribute attribute Number int code Attribute Offset contents Offset generate Code Attribute Header code Stream reset method this String problem String NON NLS 1 if problems null int max problems length String Buffer buffer new String Buffer 25 int count 0 for int i 0 i max i I Problem problem problems i if problem null problem is Error buffer append t problem get Message n NON NLS 1 NON NLS 2 count if problem Line 0 problem Line problem get Source Line Number insert the top line afterwards once knowing how many problems we have to consider if count 1 buffer insert 0 Util bind compilation unresolved Problems NON NLS 1 else buffer insert 0 Util bind compilation unresolved Problem NON NLS 1 problem String buffer to String return code Stream generate Code Attribute For Problem Method comp options runtime Exception Name For Compile Error code Stream generate Code Attribute For Problem Method problem String complete Code Attribute For Problem Method method method Binding code Attribute Offset Source Type Binding method Binding declaring Class scope reference Compilation Unit compilation Result line Separator Positions complete Method Info method Attribute Offset attribute Number  AbstractMethodDeclaration methodBinding MethodBinding addProblemConstructor AbstractMethodDeclaration MethodBinding methodBinding IProblem generateMethodInfoHeader methodBinding methodBinding AccStrictfp AccNative AccAbstract methodAttributeOffset contentsOffset attributeNumber generateMethodInfoAttribute methodBinding attributeNumber codeAttributeOffset contentsOffset generateCodeAttributeHeader codeStream problemString StringBuffer StringBuffer IProblem isError getMessage problemLine problemLine getSourceLineNumber unresolvedProblems unresolvedProblem problemString toString codeStream generateCodeAttributeForProblemMethod runtimeExceptionNameForCompileError codeStream generateCodeAttributeForProblemMethod problemString completeCodeAttributeForProblemMethod methodBinding codeAttributeOffset SourceTypeBinding methodBinding declaringClass referenceCompilationUnit compilationResult lineSeparatorPositions completeMethodInfo methodAttributeOffset attributeNumber
INTERNAL USE ONLY Generate the byte for a problem method info that correspond to a boggus constructor Reset the position inside the contents byte array to the saved Offset param method org eclipse jdt internal compiler ast Abstract Method Declaration param method Binding org eclipse jdt internal compiler nameloopkup Method Binding param problems org eclipse jdt internal compiler problem Problem param saved Offset CODE int CODE public void add Problem Constructor Abstract Method Declaration method Method Binding method Binding I Problem problems int saved Offset we need to move back the contents Offset to the value at the beginning of the method contents Offset saved Offset method Count we need to remove the method that causes the problem add Problem Constructor method method Binding problems  savedOffset AbstractMethodDeclaration methodBinding MethodBinding savedOffset addProblemConstructor AbstractMethodDeclaration MethodBinding methodBinding IProblem savedOffset contentsOffset contentsOffset savedOffset methodCount addProblemConstructor methodBinding
INTERNAL USE ONLY Generate the byte for a problem method info that correspond to a boggus method param method org eclipse jdt internal compiler ast Abstract Method Declaration param method Binding org eclipse jdt internal compiler nameloopkup Method Binding param problems org eclipse jdt internal compiler problem Problem public void add Problem Method Abstract Method Declaration method Method Binding method Binding I Problem problems if method Binding is Abstract method Binding declaring Class is Interface method abort Problem Severities Abort Type null always clear the strictfp native abstract bit for a problem method generate Method Info Header method Binding method Binding modifiers Acc Strictfp Acc Native Acc Abstract int method Attribute Offset contents Offset int attribute Number generate Method Info Attribute method Binding Code attribute attribute Number int code Attribute Offset contents Offset generate Code Attribute Header code Stream reset method this String problem String NON NLS 1 if problems null int max problems length String Buffer buffer new String Buffer 25 int count 0 for int i 0 i max i I Problem problem problems i if problem null problem is Error problem get Source Start method declaration Source Start problem get Source End method declaration Source End buffer append t problem get Message n NON NLS 1 NON NLS 2 count if problem Line 0 problem Line problem get Source Line Number problems i null insert the top line afterwards once knowing how many problems we have to consider if count 1 buffer insert 0 Util bind compilation unresolved Problems NON NLS 1 else buffer insert 0 Util bind compilation unresolved Problem NON NLS 1 problem String buffer to String return code Stream generate Code Attribute For Problem Method comp options runtime Exception Name For Compile Error code Stream generate Code Attribute For Problem Method problem String complete Code Attribute For Problem Method method method Binding code Attribute Offset Source Type Binding method Binding declaring Class scope reference Compilation Unit compilation Result line Separator Positions complete Method Info method Attribute Offset attribute Number  AbstractMethodDeclaration methodBinding MethodBinding addProblemMethod AbstractMethodDeclaration MethodBinding methodBinding IProblem methodBinding isAbstract methodBinding declaringClass isInterface ProblemSeverities AbortType generateMethodInfoHeader methodBinding methodBinding AccStrictfp AccNative AccAbstract methodAttributeOffset contentsOffset attributeNumber generateMethodInfoAttribute methodBinding attributeNumber codeAttributeOffset contentsOffset generateCodeAttributeHeader codeStream problemString StringBuffer StringBuffer IProblem isError getSourceStart declarationSourceStart getSourceEnd declarationSourceEnd getMessage problemLine problemLine getSourceLineNumber unresolvedProblems unresolvedProblem problemString toString codeStream generateCodeAttributeForProblemMethod runtimeExceptionNameForCompileError codeStream generateCodeAttributeForProblemMethod problemString completeCodeAttributeForProblemMethod methodBinding codeAttributeOffset SourceTypeBinding methodBinding declaringClass referenceCompilationUnit compilationResult lineSeparatorPositions completeMethodInfo methodAttributeOffset attributeNumber
INTERNAL USE ONLY Generate the byte for a problem method info that correspond to a boggus method Reset the position inside the contents byte array to the saved Offset param method org eclipse jdt internal compiler ast Abstract Method Declaration param method Binding org eclipse jdt internal compiler nameloopkup Method Binding param problems org eclipse jdt internal compiler problem Problem param saved Offset CODE int CODE public void add Problem Method Abstract Method Declaration method Method Binding method Binding I Problem problems int saved Offset we need to move back the contents Offset to the value at the beginning of the method contents Offset saved Offset method Count we need to remove the method that causes the problem add Problem Method method method Binding problems  savedOffset AbstractMethodDeclaration methodBinding MethodBinding savedOffset addProblemMethod AbstractMethodDeclaration MethodBinding methodBinding IProblem savedOffset contentsOffset contentsOffset savedOffset methodCount addProblemMethod methodBinding
INTERNAL USE ONLY Generate the byte for all the special method infos They are synthetic access methods default abstract methods public void add Special Methods add all methods default abstract methods and synthetic default abstract methods Source Type Binding current Binding reference Binding Method Binding default Abstract Methods current Binding get Default Abstract Methods for int i 0 max default Abstract Methods length i max i generate Method Info Header default Abstract Methods i int method Attribute Offset contents Offset int attribute Number generate Method Info Attribute default Abstract Methods i complete Method Info method Attribute Offset attribute Number add synthetic methods infos Synthetic Access Method Binding synthetic Access Methods current Binding synthetic Access Methods if synthetic Access Methods null for int i 0 max synthetic Access Methods length i max i Synthetic Access Method Binding access Method Binding synthetic Access Methods i switch access Method Binding access Type case Synthetic Access Method Binding Field Read Access generate a method info to emulate an reading access to a non accessible field add Synthetic Field Read Access Method synthetic Access Methods i break case Synthetic Access Method Binding Field Write Access generate a method info to emulate an writing access to a non accessible field add Synthetic Field Write Access Method synthetic Access Methods i break case Synthetic Access Method Binding Method Access case Synthetic Access Method Binding Super Method Access generate a method info to emulate an access to a non accessible method super method add Synthetic Method Access Method synthetic Access Methods i break case Synthetic Access Method Binding Constructor Access generate a method info to emulate an access to a non accessible constructor add Synthetic Constructor Access Method synthetic Access Methods i  addSpecialMethods SourceTypeBinding currentBinding referenceBinding MethodBinding defaultAbstractMethods currentBinding getDefaultAbstractMethods defaultAbstractMethods generateMethodInfoHeader defaultAbstractMethods methodAttributeOffset contentsOffset attributeNumber generateMethodInfoAttribute defaultAbstractMethods completeMethodInfo methodAttributeOffset attributeNumber SyntheticAccessMethodBinding syntheticAccessMethods currentBinding syntheticAccessMethods syntheticAccessMethods syntheticAccessMethods SyntheticAccessMethodBinding accessMethodBinding syntheticAccessMethods accessMethodBinding accessType SyntheticAccessMethodBinding FieldReadAccess addSyntheticFieldReadAccessMethod syntheticAccessMethods SyntheticAccessMethodBinding FieldWriteAccess addSyntheticFieldWriteAccessMethod syntheticAccessMethods SyntheticAccessMethodBinding MethodAccess SyntheticAccessMethodBinding SuperMethodAccess addSyntheticMethodAccessMethod syntheticAccessMethods SyntheticAccessMethodBinding ConstructorAccess addSyntheticConstructorAccessMethod syntheticAccessMethods
INTERNAL USE ONLY Generate the byte for problem method infos that correspond to missing abstract methods http dev eclipse org bugs show bug cgi id 3179 param method Declarations Array of all missing abstract methods public void generate Missing Abstract Methods Method Declaration method Declarations Compilation Result compilation Result if method Declarations null for int i 0 max method Declarations length i max i Method Declaration method Declaration method Declarations i Method Binding method Binding method Declaration binding String readable Name new String method Binding readable Name I Problem problems compilation Result problems int problems Count compilation Result problem Count for int j 0 j problems Count j I Problem problem problems j if problem null problem getID I Problem Abstract Method Must Be Implemented problem get Message index Of readable Name 1 we found a match add Missing Abstract Problem Method method Declaration method Binding problem compilation Result  show_bug methodDeclarations generateMissingAbstractMethods MethodDeclaration methodDeclarations CompilationResult compilationResult methodDeclarations methodDeclarations MethodDeclaration methodDeclaration methodDeclarations MethodBinding methodBinding methodDeclaration readableName methodBinding readableName IProblem compilationResult problemsCount compilationResult problemCount problemsCount IProblem IProblem AbstractMethodMustBeImplemented getMessage indexOf readableName addMissingAbstractProblemMethod methodDeclaration methodBinding compilationResult
private void add Missing Abstract Problem Method Method Declaration method Declaration Method Binding method Binding I Problem problem Compilation Result compilation Result always clear the strictfp native abstract bit for a problem method generate Method Info Header method Binding method Binding modifiers Acc Strictfp Acc Native Acc Abstract int method Attribute Offset contents Offset int attribute Number generate Method Info Attribute method Binding Code attribute attribute Number int code Attribute Offset contents Offset generate Code Attribute Header String Buffer buffer new String Buffer 25 buffer append t problem get Message n NON NLS 1 NON NLS 2 buffer insert 0 Util bind compilation unresolved Problem NON NLS 1 String problem String buffer to String this problem Line problem get Source Line Number code Stream init this code Stream preserve Unused Locals true code Stream initialize Max Locals method Binding return code Stream generate Code Attribute For Problem Method comp options runtime Exception Name For Compile Error code Stream generate Code Attribute For Problem Method problem String complete Code Attribute For Missing Abstract Problem Method method Binding code Attribute Offset compilation Result line Separator Positions complete Method Info method Attribute Offset attribute Number  addMissingAbstractProblemMethod MethodDeclaration methodDeclaration MethodBinding methodBinding IProblem CompilationResult compilationResult generateMethodInfoHeader methodBinding methodBinding AccStrictfp AccNative AccAbstract methodAttributeOffset contentsOffset attributeNumber generateMethodInfoAttribute methodBinding attributeNumber codeAttributeOffset contentsOffset generateCodeAttributeHeader StringBuffer StringBuffer getMessage unresolvedProblem problemString toString problemLine getSourceLineNumber codeStream codeStream preserveUnusedLocals codeStream initializeMaxLocals methodBinding codeStream generateCodeAttributeForProblemMethod runtimeExceptionNameForCompileError codeStream generateCodeAttributeForProblemMethod problemString completeCodeAttributeForMissingAbstractProblemMethod methodBinding codeAttributeOffset compilationResult lineSeparatorPositions completeMethodInfo methodAttributeOffset attributeNumber
public void complete Code Attribute For Missing Abstract Problem Method Method Binding binding int code Attribute Offset int start Line Indexes reinitialize the local Contents with the byte modified by the code stream this contents code Stream b Code Stream int local Contents Offset code Stream class File Offset code Attribute Offset is the position inside local Contents byte array before we started to write any information about the code Attribute That means that to write the attribute length you need to offset by 2 the value of code Attribute Offset to get the right position 6 for the max stack etc int max stack code Stream stack Max this contents code Attribute Offset 6 byte max stack 8 this contents code Attribute Offset 7 byte max stack int max locals code Stream max Locals this contents code Attribute Offset 8 byte max locals 8 this contents code Attribute Offset 9 byte max locals int code length code Stream position this contents code Attribute Offset 10 byte code length 24 this contents code Attribute Offset 11 byte code length 16 this contents code Attribute Offset 12 byte code length 8 this contents code Attribute Offset 13 byte code length write the exception table if local Contents Offset 50 this contents length resize Contents 50 this contents local Contents Offset 0 this contents local Contents Offset 0 debug attributes int code Attribute Attribute Offset local Contents Offset int attribute Number 0 leave two bytes for the attribute length local Contents Offset 2 first we handle the linenumber attribute if code Stream generate Line Number Attributes Create and add the line number attribute used for debugging Build the pairs of bytecodePC line Number according to the table of start line indexes and the pc To Source Map table contained into the codestream int line Number Name Index constant Pool literal Index Attribute Names Constants Line Number Table Name this contents local Contents Offset byte line Number Name Index 8 this contents local Contents Offset byte line Number Name Index this contents local Contents Offset 0 this contents local Contents Offset 0 this contents local Contents Offset 0 this contents local Contents Offset 6 this contents local Contents Offset 0 this contents local Contents Offset 1 if problem Line 0 problem Line search Line Number start Line Indexes binding source Start first entry at pc 0 this contents local Contents Offset 0 this contents local Contents Offset 0 this contents local Contents Offset byte problem Line 8 this contents local Contents Offset byte problem Line now we change the size of the line number attribute attribute Number then we do the local variable attribute update the number of attributes ensure first that there is enough space available inside the local Contents array if code Attribute Attribute Offset 2 this contents length resize Contents 2 this contents code Attribute Attribute Offset byte attribute Number 8 this contents code Attribute Attribute Offset byte attribute Number update the attribute length int code Attribute Length local Contents Offset code Attribute Offset 6 this contents code Attribute Offset 2 byte code Attribute Length 24 this contents code Attribute Offset 3 byte code Attribute Length 16 this contents code Attribute Offset 4 byte code Attribute Length 8 this contents code Attribute Offset 5 byte code Attribute Length contents Offset local Contents Offset  completeCodeAttributeForMissingAbstractProblemMethod MethodBinding codeAttributeOffset startLineIndexes localContents codeStream bCodeStream localContentsOffset codeStream classFileOffset codeAttributeOffset localContents codeAttribute attribute_length codeAttributeOffset max_stack max_stack codeStream stackMax codeAttributeOffset max_stack codeAttributeOffset max_stack max_locals codeStream maxLocals codeAttributeOffset max_locals codeAttributeOffset max_locals code_length codeStream codeAttributeOffset code_length codeAttributeOffset code_length codeAttributeOffset code_length codeAttributeOffset code_length localContentsOffset resizeContents localContentsOffset localContentsOffset codeAttributeAttributeOffset localContentsOffset attributeNumber attribute_length localContentsOffset codeStream generateLineNumberAttributes lineNumber pcToSourceMap lineNumberNameIndex constantPool literalIndex AttributeNamesConstants LineNumberTableName localContentsOffset lineNumberNameIndex localContentsOffset lineNumberNameIndex localContentsOffset localContentsOffset localContentsOffset localContentsOffset localContentsOffset localContentsOffset problemLine problemLine searchLineNumber startLineIndexes sourceStart localContentsOffset localContentsOffset localContentsOffset problemLine localContentsOffset problemLine attributeNumber localContents codeAttributeAttributeOffset resizeContents codeAttributeAttributeOffset attributeNumber codeAttributeAttributeOffset attributeNumber codeAttributeLength localContentsOffset codeAttributeOffset codeAttributeOffset codeAttributeLength codeAttributeOffset codeAttributeLength codeAttributeOffset codeAttributeLength codeAttributeOffset codeAttributeLength contentsOffset localContentsOffset
INTERNAL USE ONLY Generate the byte for a problem method info that correspond to a synthetic method that generate an access to a private constructor param method Binding org eclipse jdt internal compiler nameloopkup Synthetic Access Method Binding public void add Synthetic Constructor Access Method Synthetic Access Method Binding method Binding generate Method Info Header method Binding We know that we won t get more than 2 attribute the code attribute synthetic attribute contents contents Offset 0 contents contents Offset 2 Code attribute int code Attribute Offset contents Offset generate Code Attribute Header code Stream init this code Stream generate Synthetic Body For Constructor Access method Binding complete Code Attribute For Synthetic Access Method method Binding code Attribute Offset Source Type Binding method Binding declaring Class scope reference Compilation Unit compilation Result line Separator Positions add the synthetic attribute int synthetic Attribute Name Index constant Pool literal Index Attribute Names Constants Synthetic Name contents contents Offset byte synthetic Attribute Name Index 8 contents contents Offset byte synthetic Attribute Name Index the length of a synthetic attribute is equals to 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0  methodBinding SyntheticAccessMethodBinding addSyntheticConstructorAccessMethod SyntheticAccessMethodBinding methodBinding generateMethodInfoHeader methodBinding contentsOffset contentsOffset codeAttributeOffset contentsOffset generateCodeAttributeHeader codeStream codeStream generateSyntheticBodyForConstructorAccess methodBinding completeCodeAttributeForSyntheticAccessMethod methodBinding codeAttributeOffset SourceTypeBinding methodBinding declaringClass referenceCompilationUnit compilationResult lineSeparatorPositions syntheticAttributeNameIndex constantPool literalIndex AttributeNamesConstants SyntheticName contentsOffset syntheticAttributeNameIndex contentsOffset syntheticAttributeNameIndex contentsOffset contentsOffset contentsOffset contentsOffset
INTERNAL USE ONLY Generate the byte for a problem method info that correspond to a synthetic method that generate an read access to a private field param method Binding org eclipse jdt internal compiler nameloopkup Synthetic Access Method Binding public void add Synthetic Field Read Access Method Synthetic Access Method Binding method Binding generate Method Info Header method Binding We know that we won t get more than 2 attribute the code attribute synthetic attribute contents contents Offset 0 contents contents Offset 2 Code attribute int code Attribute Offset contents Offset generate Code Attribute Header code Stream init this code Stream generate Synthetic Body For Field Read Access method Binding complete Code Attribute For Synthetic Access Method method Binding code Attribute Offset Source Type Binding method Binding declaring Class scope reference Compilation Unit compilation Result line Separator Positions add the synthetic attribute int synthetic Attribute Name Index constant Pool literal Index Attribute Names Constants Synthetic Name contents contents Offset byte synthetic Attribute Name Index 8 contents contents Offset byte synthetic Attribute Name Index the length of a synthetic attribute is equals to 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0  methodBinding SyntheticAccessMethodBinding addSyntheticFieldReadAccessMethod SyntheticAccessMethodBinding methodBinding generateMethodInfoHeader methodBinding contentsOffset contentsOffset codeAttributeOffset contentsOffset generateCodeAttributeHeader codeStream codeStream generateSyntheticBodyForFieldReadAccess methodBinding completeCodeAttributeForSyntheticAccessMethod methodBinding codeAttributeOffset SourceTypeBinding methodBinding declaringClass referenceCompilationUnit compilationResult lineSeparatorPositions syntheticAttributeNameIndex constantPool literalIndex AttributeNamesConstants SyntheticName contentsOffset syntheticAttributeNameIndex contentsOffset syntheticAttributeNameIndex contentsOffset contentsOffset contentsOffset contentsOffset
INTERNAL USE ONLY Generate the byte for a problem method info that correspond to a synthetic method that generate an write access to a private field param method Binding org eclipse jdt internal compiler nameloopkup Synthetic Access Method Binding public void add Synthetic Field Write Access Method Synthetic Access Method Binding method Binding generate Method Info Header method Binding We know that we won t get more than 2 attribute the code attribute synthetic attribute contents contents Offset 0 contents contents Offset 2 Code attribute int code Attribute Offset contents Offset generate Code Attribute Header code Stream init this code Stream generate Synthetic Body For Field Write Access method Binding complete Code Attribute For Synthetic Access Method method Binding code Attribute Offset Source Type Binding method Binding declaring Class scope reference Compilation Unit compilation Result line Separator Positions add the synthetic attribute int synthetic Attribute Name Index constant Pool literal Index Attribute Names Constants Synthetic Name contents contents Offset byte synthetic Attribute Name Index 8 contents contents Offset byte synthetic Attribute Name Index the length of a synthetic attribute is equals to 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0  methodBinding SyntheticAccessMethodBinding addSyntheticFieldWriteAccessMethod SyntheticAccessMethodBinding methodBinding generateMethodInfoHeader methodBinding contentsOffset contentsOffset codeAttributeOffset contentsOffset generateCodeAttributeHeader codeStream codeStream generateSyntheticBodyForFieldWriteAccess methodBinding completeCodeAttributeForSyntheticAccessMethod methodBinding codeAttributeOffset SourceTypeBinding methodBinding declaringClass referenceCompilationUnit compilationResult lineSeparatorPositions syntheticAttributeNameIndex constantPool literalIndex AttributeNamesConstants SyntheticName contentsOffset syntheticAttributeNameIndex contentsOffset syntheticAttributeNameIndex contentsOffset contentsOffset contentsOffset contentsOffset
INTERNAL USE ONLY Generate the byte for a problem method info that correspond to a synthetic method that generate an access to a private method param method Binding org eclipse jdt internal compiler nameloopkup Synthetic Access Method Binding public void add Synthetic Method Access Method Synthetic Access Method Binding method Binding generate Method Info Header method Binding We know that we won t get more than 2 attribute the code attribute synthetic attribute contents contents Offset 0 contents contents Offset 2 Code attribute int code Attribute Offset contents Offset generate Code Attribute Header code Stream init this code Stream generate Synthetic Body For Method Access method Binding complete Code Attribute For Synthetic Access Method method Binding code Attribute Offset Source Type Binding method Binding declaring Class scope reference Compilation Unit compilation Result line Separator Positions add the synthetic attribute int synthetic Attribute Name Index constant Pool literal Index Attribute Names Constants Synthetic Name contents contents Offset byte synthetic Attribute Name Index 8 contents contents Offset byte synthetic Attribute Name Index the length of a synthetic attribute is equals to 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0  methodBinding SyntheticAccessMethodBinding addSyntheticMethodAccessMethod SyntheticAccessMethodBinding methodBinding generateMethodInfoHeader methodBinding contentsOffset contentsOffset codeAttributeOffset contentsOffset generateCodeAttributeHeader codeStream codeStream generateSyntheticBodyForMethodAccess methodBinding completeCodeAttributeForSyntheticAccessMethod methodBinding codeAttributeOffset SourceTypeBinding methodBinding declaringClass referenceCompilationUnit compilationResult lineSeparatorPositions syntheticAttributeNameIndex constantPool literalIndex AttributeNamesConstants SyntheticName contentsOffset syntheticAttributeNameIndex contentsOffset syntheticAttributeNameIndex contentsOffset contentsOffset contentsOffset contentsOffset
INTERNAL USE ONLY Build all the directories and subdirectories corresponding to the packages names into the directory specified in parameters output Path is formed like c temp the last character is a file separator relative File Name is formed like java lang String class param output Path java lang String param relative File Name java lang String return java lang String public static String build All Directories Into String output Path String relative File Name throws IO Exception char file Separator Char File separator Char String file Separator File separator File f First we ensure that the output Path exists output Path output Path replace file Separator Char To be able to pass the mkdirs method we need to remove the extra file separator at the end of the out Dir name if output Path ends With file Separator output Path output Path substring 0 output Path length 1 f new File output Path if f exists if f is Directory System out println Util bind output is File f get Absolute Path NON NLS 1 throw new IO Exception Util bind output is File Not Directory NON NLS 1 else we have to create that directory if f mkdirs System out println Util bind output dir Name f get Absolute Path NON NLS 1 throw new IO Exception Util bind output not Valid All NON NLS 1 String Buffer out Dir new String Buffer output Path out Dir append file Separator String Tokenizer tokenizer new String Tokenizer relative File Name file Separator String token tokenizer next Token while tokenizer has More Tokens f new File out Dir append token append file Separator to String if f exists The out Dir already exists so we proceed the next entry System out println out Dir out Dir already exists else Need to add the out Dir if f mkdir System out println Util bind output file Name f get Name NON NLS 1 throw new IO Exception Util bind output not Valid NON NLS 1 token tokenizer next Token token contains the last one return out Dir append token to String  outputPath relativeFileName outputPath relativeFileName buildAllDirectoriesInto outputPath relativeFileName IOException fileSeparatorChar separatorChar fileSeparator outputPath outputPath outputPath fileSeparatorChar outDir outputPath endsWith fileSeparator outputPath outputPath outputPath outputPath isDirectory isFile getAbsolutePath IOException isFileNotDirectory dirName getAbsolutePath IOException notValidAll StringBuffer outDir StringBuffer outputPath outDir fileSeparator StringTokenizer StringTokenizer relativeFileName fileSeparator nextToken hasMoreTokens outDir fileSeparator toString outDir outDir outDir outDir fileName getName IOException notValid nextToken outDir toString
INTERNAL USE ONLY That method completes the creation of the code attribute by setting the attribute length max stack max locals code length exception table and debug attributes if necessary param code Attribute Offset CODE int CODE public void complete Code Attribute int code Attribute Offset reinitialize the local Contents with the byte modified by the code stream this contents code Stream b Code Stream int local Contents Offset code Stream class File Offset code Attribute Offset is the position inside local Contents byte array before we started to write any information about the code Attribute That means that to write the attribute length you need to offset by 2 the value of code Attribute Offset to get the right position 6 for the max stack etc int code length code Stream position if code length 65535 code Stream method Declaration scope problem Reporter bytecode Exceeds64K Limit code Stream method Declaration if local Contents Offset 20 this contents length resize Contents 20 int max stack code Stream stack Max this contents code Attribute Offset 6 byte max stack 8 this contents code Attribute Offset 7 byte max stack int max locals code Stream max Locals this contents code Attribute Offset 8 byte max locals 8 this contents code Attribute Offset 9 byte max locals this contents code Attribute Offset 10 byte code length 24 this contents code Attribute Offset 11 byte code length 16 this contents code Attribute Offset 12 byte code length 8 this contents code Attribute Offset 13 byte code length write the exception table int exception Handlers Number code Stream exception Handlers Number Exception Label exception Handlers code Stream exception Handlers int ex Size exception Handlers Number 8 2 if ex Size local Contents Offset this contents length resize Contents ex Size there is no exception table so we need to offset by 2 the current offset and move on the attribute generation this contents local Contents Offset byte exception Handlers Number 8 this contents local Contents Offset byte exception Handlers Number for int i 0 i exception Handlers Number i Exception Label exception Handler exception Handlers i int start exception Handler start this contents local Contents Offset byte start 8 this contents local Contents Offset byte start int end exception Handler end this contents local Contents Offset byte end 8 this contents local Contents Offset byte end int handlerPC exception Handler position this contents local Contents Offset byte handlerPC 8 this contents local Contents Offset byte handlerPC if exception Handler exception Type null any exception handler this contents local Contents Offset 0 this contents local Contents Offset 0 else int name Index if exception Handler exception Type Base Types Null Binding represents Class Not Found Exception see class literal access name Index constant Pool literal Index For Java Lang Class Not Found Exception else name Index constant Pool literal Index exception Handler exception Type this contents local Contents Offset byte name Index 8 this contents local Contents Offset byte name Index debug attributes int code Attribute Attribute Offset local Contents Offset int attribute Number 0 leave two bytes for the attribute length local Contents Offset 2 first we handle the linenumber attribute if code Stream generate Line Number Attributes Create and add the line number attribute used for debugging Build the pairs of bytecodePC line Number according to the table of start line indexes and the pc To Source Map table contained into the codestream int pc To Source Map Table if pc To Source Map Table code Stream pc To Source Map null code Stream pc To Source Map Size 0 int line Number Name Index constant Pool literal Index Attribute Names Constants Line Number Table Name if local Contents Offset 8 this contents length resize Contents 8 this contents local Contents Offset byte line Number Name Index 8 this contents local Contents Offset byte line Number Name Index int line Number Table Offset local Contents Offset local Contents Offset 6 leave space for attribute length and line number table length int number Of Entries 0 int length code Stream pc To Source Map Size for int i 0 i length write the entry if local Contents Offset 4 this contents length resize Contents 4 int pc pc To Source Map Table i this contents local Contents Offset byte pc 8 this contents local Contents Offset byte pc int line Number pc To Source Map Table i this contents local Contents Offset byte line Number 8 this contents local Contents Offset byte line Number number Of Entries now we change the size of the line number attribute int lineNumberAttr length number Of Entries 4 2 this contents line Number Table Offset byte lineNumberAttr length 24 this contents line Number Table Offset byte lineNumberAttr length 16 this contents line Number Table Offset byte lineNumberAttr length 8 this contents line Number Table Offset byte lineNumberAttr length this contents line Number Table Offset byte number Of Entries 8 this contents line Number Table Offset byte number Of Entries attribute Number then we do the local variable attribute if code Stream generate Local Variable Table Attributes int local Variable Table Offset local Contents Offset int number Of Entries 0 int local Variable Name Index constant Pool literal Index Attribute Names Constants Local Variable Table Name if local Contents Offset 8 this contents length resize Contents 8 this contents local Contents Offset byte local Variable Name Index 8 this contents local Contents Offset byte local Variable Name Index local Contents Offset 6 leave space for attribute length and local variable table length int name Index int descriptor Index if code Stream method Declaration is Static number Of Entries if local Contents Offset 10 this contents length resize Contents 10 this contents local Contents Offset 0 the startPC for this is always 0 this contents local Contents Offset 0 this contents local Contents Offset byte code length 8 this contents local Contents Offset byte code length name Index constant Pool literal Index Qualified Names Constants This this contents local Contents Offset byte name Index 8 this contents local Contents Offset byte name Index descriptor Index constant Pool literal Index code Stream method Declaration binding declaring Class signature this contents local Contents Offset byte descriptor Index 8 this contents local Contents Offset byte descriptor Index this contents local Contents Offset 0 the resolved position for this is always 0 this contents local Contents Offset 0 for int i 0 i code Stream all Locals Counter i Local Variable Binding local Variable code Stream locals i for int j 0 j local Variable initialization Count j int startPC local Variable initializationP Cs j 1 int endPC local Variable initializationP Cs j 1 1 if startPC endPC only entries for non zero length if endPC 1 local Variable declaring Scope problem Reporter abort Due To Internal Error Util bind abort invalid Attribute new String local Variable name NON NLS 1 AST Node local Variable declaring Scope method Scope reference Context if local Contents Offset 10 this contents length resize Contents 10 now we can safely add the local entry number Of Entries this contents local Contents Offset byte startPC 8 this contents local Contents Offset byte startPC int length endPC startPC this contents local Contents Offset byte length 8 this contents local Contents Offset byte length name Index constant Pool literal Index local Variable name this contents local Contents Offset byte name Index 8 this contents local Contents Offset byte name Index descriptor Index constant Pool literal Index local Variable type signature this contents local Contents Offset byte descriptor Index 8 this contents local Contents Offset byte descriptor Index int resolved Position local Variable resolved Position this contents local Contents Offset byte resolved Position 8 this contents local Contents Offset byte resolved Position int value number Of Entries 10 2 local Variable Table Offset 2 this contents local Variable Table Offset byte value 24 this contents local Variable Table Offset byte value 16 this contents local Variable Table Offset byte value 8 this contents local Variable Table Offset byte value this contents local Variable Table Offset byte number Of Entries 8 this contents local Variable Table Offset byte number Of Entries attribute Number update the number of attributes ensure first attribute_length max_stack max_locals code_length codeAttributeOffset completeCodeAttribute codeAttributeOffset localContents codeStream bCodeStream localContentsOffset codeStream classFileOffset codeAttributeOffset localContents codeAttribute attribute_length codeAttributeOffset max_stack code_length codeStream code_length codeStream methodDeclaration problemReporter bytecodeExceeds64KLimit codeStream methodDeclaration localContentsOffset resizeContents max_stack codeStream stackMax codeAttributeOffset max_stack codeAttributeOffset max_stack max_locals codeStream maxLocals codeAttributeOffset max_locals codeAttributeOffset max_locals codeAttributeOffset code_length codeAttributeOffset code_length codeAttributeOffset code_length codeAttributeOffset code_length exceptionHandlersNumber codeStream exceptionHandlersNumber ExceptionLabel exceptionHandlers codeStream exceptionHandlers exSize exceptionHandlersNumber exSize localContentsOffset resizeContents exSize localContentsOffset exceptionHandlersNumber localContentsOffset exceptionHandlersNumber exceptionHandlersNumber ExceptionLabel exceptionHandler exceptionHandlers exceptionHandler localContentsOffset localContentsOffset exceptionHandler localContentsOffset localContentsOffset exceptionHandler localContentsOffset localContentsOffset exceptionHandler exceptionType localContentsOffset localContentsOffset nameIndex exceptionHandler exceptionType BaseTypes NullBinding ClassNotFoundException nameIndex constantPool literalIndexForJavaLangClassNotFoundException nameIndex constantPool literalIndex exceptionHandler exceptionType localContentsOffset nameIndex localContentsOffset nameIndex codeAttributeAttributeOffset localContentsOffset attributeNumber attribute_length localContentsOffset codeStream generateLineNumberAttributes lineNumber pcToSourceMap pcToSourceMapTable pcToSourceMapTable codeStream pcToSourceMap codeStream pcToSourceMapSize lineNumberNameIndex constantPool literalIndex AttributeNamesConstants LineNumberTableName localContentsOffset resizeContents localContentsOffset lineNumberNameIndex localContentsOffset lineNumberNameIndex lineNumberTableOffset localContentsOffset localContentsOffset attribute_length line_number_table_length numberOfEntries codeStream pcToSourceMapSize localContentsOffset resizeContents pcToSourceMapTable localContentsOffset localContentsOffset lineNumber pcToSourceMapTable localContentsOffset lineNumber localContentsOffset lineNumber numberOfEntries lineNumberAttr_length numberOfEntries lineNumberTableOffset lineNumberAttr_length lineNumberTableOffset lineNumberAttr_length lineNumberTableOffset lineNumberAttr_length lineNumberTableOffset lineNumberAttr_length lineNumberTableOffset numberOfEntries lineNumberTableOffset numberOfEntries attributeNumber codeStream generateLocalVariableTableAttributes localVariableTableOffset localContentsOffset numberOfEntries localVariableNameIndex constantPool literalIndex AttributeNamesConstants LocalVariableTableName localContentsOffset resizeContents localContentsOffset localVariableNameIndex localContentsOffset localVariableNameIndex localContentsOffset attribute_length local_variable_table_length nameIndex descriptorIndex codeStream methodDeclaration isStatic numberOfEntries localContentsOffset resizeContents localContentsOffset localContentsOffset localContentsOffset code_length localContentsOffset code_length nameIndex constantPool literalIndex QualifiedNamesConstants localContentsOffset nameIndex localContentsOffset nameIndex descriptorIndex constantPool literalIndex codeStream methodDeclaration declaringClass localContentsOffset descriptorIndex localContentsOffset descriptorIndex localContentsOffset localContentsOffset codeStream allLocalsCounter LocalVariableBinding localVariable codeStream localVariable initializationCount localVariable initializationPCs localVariable initializationPCs localVariable declaringScope problemReporter abortDueToInternalError invalidAttribute localVariable ASTNode localVariable declaringScope methodScope referenceContext localContentsOffset resizeContents numberOfEntries localContentsOffset localContentsOffset localContentsOffset localContentsOffset nameIndex constantPool literalIndex localVariable localContentsOffset nameIndex localContentsOffset nameIndex descriptorIndex constantPool literalIndex localVariable localContentsOffset descriptorIndex localContentsOffset descriptorIndex resolvedPosition localVariable resolvedPosition localContentsOffset resolvedPosition localContentsOffset resolvedPosition numberOfEntries localVariableTableOffset localVariableTableOffset localVariableTableOffset localVariableTableOffset localVariableTableOffset localVariableTableOffset numberOfEntries localVariableTableOffset numberOfEntries attributeNumber
INTERNAL USE ONLY That method completes the creation of the code attribute by setting the attribute length max stack max locals code length exception table and debug attributes if necessary param code Attribute Offset CODE int CODE public void complete Code Attribute For Clinit int code Attribute Offset reinitialize the contents with the byte modified by the code stream this contents code Stream b Code Stream int local Contents Offset code Stream class File Offset code Attribute Offset is the position inside contents byte array before we started to write any information about the code Attribute That means that to write the attribute length you need to offset by 2 the value of code Attribute Offset to get the right position 6 for the max stack etc int code length code Stream position if code length 65535 code Stream method Declaration scope problem Reporter bytecode Exceeds64K Limit code Stream method Declaration scope reference Type if local Contents Offset 20 this contents length resize Contents 20 int max stack code Stream stack Max this contents code Attribute Offset 6 byte max stack 8 this contents code Attribute Offset 7 byte max stack int max locals code Stream max Locals this contents code Attribute Offset 8 byte max locals 8 this contents code Attribute Offset 9 byte max locals this contents code Attribute Offset 10 byte code length 24 this contents code Attribute Offset 11 byte code length 16 this contents code Attribute Offset 12 byte code length 8 this contents code Attribute Offset 13 byte code length write the exception table int exception Handlers Number code Stream exception Handlers Number Exception Label exception Handlers code Stream exception Handlers int ex Size exception Handlers Number 8 2 if ex Size local Contents Offset this contents length resize Contents ex Size there is no exception table so we need to offset by 2 the current offset and move on the attribute generation this contents local Contents Offset byte exception Handlers Number 8 this contents local Contents Offset byte exception Handlers Number for int i 0 i exception Handlers Number i Exception Label exception Handler exception Handlers i int start exception Handler start this contents local Contents Offset byte start 8 this contents local Contents Offset byte start int end exception Handler end this contents local Contents Offset byte end 8 this contents local Contents Offset byte end int handlerPC exception Handler position this contents local Contents Offset byte handlerPC 8 this contents local Contents Offset byte handlerPC if exception Handler exception Type null any exception handler this contents local Contents Offset 0 this contents local Contents Offset 0 else int name Index if exception Handler exception Type Base Types Null Binding represents denote Class Not Found Exception see class literal access name Index constant Pool literal Index For Java Lang Class Not Found Exception else name Index constant Pool literal Index exception Handler exception Type this contents local Contents Offset byte name Index 8 this contents local Contents Offset byte name Index debug attributes int code Attribute Attribute Offset local Contents Offset int attribute Number 0 leave two bytes for the attribute length local Contents Offset 2 first we handle the linenumber attribute if code Stream generate Line Number Attributes Create and add the line number attribute used for debugging Build the pairs of bytecodePC line Number according to the table of start line indexes and the pc To Source Map table contained into the codestream int pc To Source Map Table if pc To Source Map Table code Stream pc To Source Map null code Stream pc To Source Map Size 0 int line Number Name Index constant Pool literal Index Attribute Names Constants Line Number Table Name if local Contents Offset 8 this contents length resize Contents 8 this contents local Contents Offset byte line Number Name Index 8 this contents local Contents Offset byte line Number Name Index int line Number Table Offset local Contents Offset local Contents Offset 6 leave space for attribute length and line number table length int number Of Entries 0 int length code Stream pc To Source Map Size for int i 0 i length write the entry if local Contents Offset 4 this contents length resize Contents 4 int pc pc To Source Map Table i this contents local Contents Offset byte pc 8 this contents local Contents Offset byte pc int line Number pc To Source Map Table i this contents local Contents Offset byte line Number 8 this contents local Contents Offset byte line Number number Of Entries now we change the size of the line number attribute int lineNumberAttr length number Of Entries 4 2 this contents line Number Table Offset byte lineNumberAttr length 24 this contents line Number Table Offset byte lineNumberAttr length 16 this contents line Number Table Offset byte lineNumberAttr length 8 this contents line Number Table Offset byte lineNumberAttr length this contents line Number Table Offset byte number Of Entries 8 this contents line Number Table Offset byte number Of Entries attribute Number then we do the local variable attribute if code Stream generate Local Variable Table Attributes int local Variable Table Offset local Contents Offset int number Of Entries 0 code Attribute add Local Variable Table Attribute this if code Stream pc To Source Map null code Stream pc To Source Map Size 0 int local Variable Name Index constant Pool literal Index Attribute Names Constants Local Variable Table Name if local Contents Offset 8 this contents length resize Contents 8 this contents local Contents Offset byte local Variable Name Index 8 this contents local Contents Offset byte local Variable Name Index local Contents Offset 6 leave space for attribute length and local variable table length int name Index int descriptor Index for int i 0 i code Stream all Locals Counter i Local Variable Binding local Variable code Stream locals i for int j 0 j local Variable initialization Count j int startPC local Variable initializationP Cs j 1 int endPC local Variable initializationP Cs j 1 1 if startPC endPC only entries for non zero length if endPC 1 local Variable declaring Scope problem Reporter abort Due To Internal Error Util bind abort invalid Attribute new String local Variable name NON NLS 1 AST Node local Variable declaring Scope method Scope reference Context if local Contents Offset 10 this contents length resize Contents 10 now we can safely add the local entry number Of Entries this contents local Contents Offset byte startPC 8 this contents local Contents Offset byte startPC int length endPC startPC this contents local Contents Offset byte length 8 this contents local Contents Offset byte length name Index constant Pool literal Index local Variable name this contents local Contents Offset byte name Index 8 this contents local Contents Offset byte name Index descriptor Index constant Pool literal Index local Variable type signature this contents local Contents Offset byte descriptor Index 8 this contents local Contents Offset byte descriptor Index int resolved Position local Variable resolved Position this contents local Contents Offset byte resolved Position 8 this contents local Contents Offset byte resolved Position int value number Of Entries 10 2 local Variable Table Offset 2 this contents local Variable Table Offset byte value 24 this contents local Variable Table Offset byte value 16 this contents local Variable Table Offset byte value 8 this contents local Variable Table Offset byte value this contents local Variable Table Offset byte number Of Entries 8 this contents local Variable Table Offset byte number Of Entries attribute Number update the number of attributes ensure first that there is enough space available inside the contents array if code Attribute Attribute Offset 2 this contents length resize Contents 2 this contents code Attribute Attribute Offset byte attribute Number 8 this contents code Attribute Attribute Offset byte attribute Number update the attribute length int code Attribute Length local Contents Offset code Attribute Offset 6 this contents code Attribute Offset 2 byte code Attribute Length 24 this contents code Attribute Offset 3 byte code Attribute Length 16 this contents code Attribute Offset 4 byte code Attribute Length 8 this contents code Attribute Offset 5 byte code Attribute Length contents Offset local Contents Offset  attribute_length max_stack max_locals code_length codeAttributeOffset completeCodeAttributeForClinit codeAttributeOffset codeStream bCodeStream localContentsOffset codeStream classFileOffset codeAttributeOffset codeAttribute attribute_length codeAttributeOffset max_stack code_length codeStream code_length codeStream methodDeclaration problemReporter bytecodeExceeds64KLimit codeStream methodDeclaration referenceType localContentsOffset resizeContents max_stack codeStream stackMax codeAttributeOffset max_stack codeAttributeOffset max_stack max_locals codeStream maxLocals codeAttributeOffset max_locals codeAttributeOffset max_locals codeAttributeOffset code_length codeAttributeOffset code_length codeAttributeOffset code_length codeAttributeOffset code_length exceptionHandlersNumber codeStream exceptionHandlersNumber ExceptionLabel exceptionHandlers codeStream exceptionHandlers exSize exceptionHandlersNumber exSize localContentsOffset resizeContents exSize localContentsOffset exceptionHandlersNumber localContentsOffset exceptionHandlersNumber exceptionHandlersNumber ExceptionLabel exceptionHandler exceptionHandlers exceptionHandler localContentsOffset localContentsOffset exceptionHandler localContentsOffset localContentsOffset exceptionHandler localContentsOffset localContentsOffset exceptionHandler exceptionType localContentsOffset localContentsOffset nameIndex exceptionHandler exceptionType BaseTypes NullBinding ClassNotFoundException nameIndex constantPool literalIndexForJavaLangClassNotFoundException nameIndex constantPool literalIndex exceptionHandler exceptionType localContentsOffset nameIndex localContentsOffset nameIndex codeAttributeAttributeOffset localContentsOffset attributeNumber attribute_length localContentsOffset codeStream generateLineNumberAttributes lineNumber pcToSourceMap pcToSourceMapTable pcToSourceMapTable codeStream pcToSourceMap codeStream pcToSourceMapSize lineNumberNameIndex constantPool literalIndex AttributeNamesConstants LineNumberTableName localContentsOffset resizeContents localContentsOffset lineNumberNameIndex localContentsOffset lineNumberNameIndex lineNumberTableOffset localContentsOffset localContentsOffset attribute_length line_number_table_length numberOfEntries codeStream pcToSourceMapSize localContentsOffset resizeContents pcToSourceMapTable localContentsOffset localContentsOffset lineNumber pcToSourceMapTable localContentsOffset lineNumber localContentsOffset lineNumber numberOfEntries lineNumberAttr_length numberOfEntries lineNumberTableOffset lineNumberAttr_length lineNumberTableOffset lineNumberAttr_length lineNumberTableOffset lineNumberAttr_length lineNumberTableOffset lineNumberAttr_length lineNumberTableOffset numberOfEntries lineNumberTableOffset numberOfEntries attributeNumber codeStream generateLocalVariableTableAttributes localVariableTableOffset localContentsOffset numberOfEntries codeAttribute addLocalVariableTableAttribute codeStream pcToSourceMap codeStream pcToSourceMapSize localVariableNameIndex constantPool literalIndex AttributeNamesConstants LocalVariableTableName localContentsOffset resizeContents localContentsOffset localVariableNameIndex localContentsOffset localVariableNameIndex localContentsOffset attribute_length local_variable_table_length nameIndex descriptorIndex codeStream allLocalsCounter LocalVariableBinding localVariable codeStream localVariable initializationCount localVariable initializationPCs localVariable initializationPCs localVariable declaringScope problemReporter abortDueToInternalError invalidAttribute localVariable ASTNode localVariable declaringScope methodScope referenceContext localContentsOffset resizeContents numberOfEntries localContentsOffset localContentsOffset localContentsOffset localContentsOffset nameIndex constantPool literalIndex localVariable localContentsOffset nameIndex localContentsOffset nameIndex descriptorIndex constantPool literalIndex localVariable localContentsOffset descriptorIndex localContentsOffset descriptorIndex resolvedPosition localVariable resolvedPosition localContentsOffset resolvedPosition localContentsOffset resolvedPosition numberOfEntries localVariableTableOffset localVariableTableOffset localVariableTableOffset localVariableTableOffset localVariableTableOffset localVariableTableOffset numberOfEntries localVariableTableOffset numberOfEntries attributeNumber codeAttributeAttributeOffset resizeContents codeAttributeAttributeOffset attributeNumber codeAttributeAttributeOffset attributeNumber codeAttributeLength localContentsOffset codeAttributeOffset codeAttributeOffset codeAttributeLength codeAttributeOffset codeAttributeLength codeAttributeOffset codeAttributeLength codeAttributeOffset codeAttributeLength contentsOffset localContentsOffset
INTERNAL USE ONLY That method completes the creation of the code attribute by setting the attribute length max stack max locals code length exception table and debug attributes if necessary param code Attribute Offset CODE int CODE param start Line Indexes int public void complete Code Attribute For Clinit int code Attribute Offset int start Line Indexes reinitialize the contents with the byte modified by the code stream this contents code Stream b Code Stream int local Contents Offset code Stream class File Offset code Attribute Offset is the position inside contents byte array before we started to write any information about the code Attribute That means that to write the attribute length you need to offset by 2 the value of code Attribute Offset to get the right position 6 for the max stack etc int code length code Stream position if code length 65535 code Stream method Declaration scope problem Reporter bytecode Exceeds64K Limit code Stream method Declaration scope reference Type if local Contents Offset 20 this contents length resize Contents 20 int max stack code Stream stack Max this contents code Attribute Offset 6 byte max stack 8 this contents code Attribute Offset 7 byte max stack int max locals code Stream max Locals this contents code Attribute Offset 8 byte max locals 8 this contents code Attribute Offset 9 byte max locals this contents code Attribute Offset 10 byte code length 24 this contents code Attribute Offset 11 byte code length 16 this contents code Attribute Offset 12 byte code length 8 this contents code Attribute Offset 13 byte code length write the exception table this contents local Contents Offset 0 this contents local Contents Offset 0 debug attributes int code Attribute Attribute Offset local Contents Offset int attribute Number 0 leave two bytes for the attribute length local Contents Offset 2 first we handle the linenumber attribute first we handle the linenumber attribute if code Stream generate Line Number Attributes if local Contents Offset 20 this contents length resize Contents 20 Create and add the line number attribute used for debugging Build the pairs of bytecodePC line Number according to the table of start line indexes and the pc To Source Map table contained into the codestream int line Number Name Index constant Pool literal Index Attribute Names Constants Line Number Table Name this contents local Contents Offset byte line Number Name Index 8 this contents local Contents Offset byte line Number Name Index this contents local Contents Offset 0 this contents local Contents Offset 0 this contents local Contents Offset 0 this contents local Contents Offset 6 this contents local Contents Offset 0 this contents local Contents Offset 1 first entry at pc 0 this contents local Contents Offset 0 this contents local Contents Offset 0 this contents local Contents Offset byte problem Line 8 this contents local Contents Offset byte problem Line now we change the size of the line number attribute attribute Number then we do the local variable attribute if code Stream generate Local Variable Table Attributes int local Variable Name Index constant Pool literal Index Attribute Names Constants Local Variable Table Name if local Contents Offset 8 this contents length resize Contents 8 this contents local Contents Offset byte local Variable Name Index 8 this contents local Contents Offset byte local Variable Name Index this contents local Contents Offset 0 this contents local Contents Offset 0 this contents local Contents Offset 0 this contents local Contents Offset 2 this contents local Contents Offset 0 this contents local Contents Offset 0 attribute Number update the number of attributes ensure first that there is enough space available inside the contents array if code Attribute Attribute Offset 2 this contents length resize Contents 2 this contents code Attribute Attribute Offset byte attribute Number 8 this contents code Attribute Attribute Offset byte attribute Number update the attribute length int code Attribute Length local Contents Offset code Attribute Offset 6 this contents code Attribute Offset 2 byte code Attribute Length 24 this contents code Attribute Offset 3 byte code Attribute Length 16 this contents code Attribute Offset 4 byte code Attribute Length 8 this contents code Attribute Offset 5 byte code Attribute Length contents Offset local Contents Offset  attribute_length max_stack max_locals code_length codeAttributeOffset startLineIndexes completeCodeAttributeForClinit codeAttributeOffset startLineIndexes codeStream bCodeStream localContentsOffset codeStream classFileOffset codeAttributeOffset codeAttribute attribute_length codeAttributeOffset max_stack code_length codeStream code_length codeStream methodDeclaration problemReporter bytecodeExceeds64KLimit codeStream methodDeclaration referenceType localContentsOffset resizeContents max_stack codeStream stackMax codeAttributeOffset max_stack codeAttributeOffset max_stack max_locals codeStream maxLocals codeAttributeOffset max_locals codeAttributeOffset max_locals codeAttributeOffset code_length codeAttributeOffset code_length codeAttributeOffset code_length codeAttributeOffset code_length localContentsOffset localContentsOffset codeAttributeAttributeOffset localContentsOffset attributeNumber attribute_length localContentsOffset codeStream generateLineNumberAttributes localContentsOffset resizeContents lineNumber pcToSourceMap lineNumberNameIndex constantPool literalIndex AttributeNamesConstants LineNumberTableName localContentsOffset lineNumberNameIndex localContentsOffset lineNumberNameIndex localContentsOffset localContentsOffset localContentsOffset localContentsOffset localContentsOffset localContentsOffset localContentsOffset localContentsOffset localContentsOffset problemLine localContentsOffset problemLine attributeNumber codeStream generateLocalVariableTableAttributes localVariableNameIndex constantPool literalIndex AttributeNamesConstants LocalVariableTableName localContentsOffset resizeContents localContentsOffset localVariableNameIndex localContentsOffset localVariableNameIndex localContentsOffset localContentsOffset localContentsOffset localContentsOffset localContentsOffset localContentsOffset attributeNumber codeAttributeAttributeOffset resizeContents codeAttributeAttributeOffset attributeNumber codeAttributeAttributeOffset attributeNumber codeAttributeLength localContentsOffset codeAttributeOffset codeAttributeOffset codeAttributeLength codeAttributeOffset codeAttributeLength codeAttributeOffset codeAttributeLength codeAttributeOffset codeAttributeLength contentsOffset localContentsOffset
INTERNAL USE ONLY That method completes the creation of the code attribute by setting the attribute length max stack max locals code length exception table and debug attributes if necessary param code Attribute Offset CODE int CODE public void complete Code Attribute For Problem Method Abstract Method Declaration method Method Binding binding int code Attribute Offset int start Line Indexes reinitialize the local Contents with the byte modified by the code stream this contents code Stream b Code Stream int local Contents Offset code Stream class File Offset code Attribute Offset is the position inside local Contents byte array before we started to write any information about the code Attribute That means that to write the attribute length you need to offset by 2 the value of code Attribute Offset to get the right position 6 for the max stack etc int max stack code Stream stack Max this contents code Attribute Offset 6 byte max stack 8 this contents code Attribute Offset 7 byte max stack int max locals code Stream max Locals this contents code Attribute Offset 8 byte max locals 8 this contents code Attribute Offset 9 byte max locals int code length code Stream position this contents code Attribute Offset 10 byte code length 24 this contents code Attribute Offset 11 byte code length 16 this contents code Attribute Offset 12 byte code length 8 this contents code Attribute Offset 13 byte code length write the exception table if local Contents Offset 50 this contents length resize Contents 50 write the exception table this contents local Contents Offset 0 this contents local Contents Offset 0 debug attributes int code Attribute Attribute Offset local Contents Offset int attribute Number 0 leave two bytes for the attribute length local Contents Offset 2 first we handle the linenumber attribute if code Stream generate Line Number Attributes if local Contents Offset 20 this contents length resize Contents 20 Create and add the line number attribute used for debugging Build the pairs of bytecodePC line Number according to the table of start line indexes and the pc To Source Map table contained into the codestream int line Number Name Index constant Pool literal Index Attribute Names Constants Line Number Table Name this contents local Contents Offset byte line Number Name Index 8 this contents local Contents Offset byte line Number Name Index this contents local Contents Offset 0 this contents local Contents Offset 0 this contents local Contents Offset 0 this contents local Contents Offset 6 this contents local Contents Offset 0 this contents local Contents Offset 1 if problem Line 0 problem Line search Line Number start Line Indexes binding source Start first entry at pc 0 this contents local Contents Offset 0 this contents local Contents Offset 0 this contents local Contents Offset byte problem Line 8 this contents local Contents Offset byte problem Line now we change the size of the line number attribute attribute Number then we do the local variable attribute if code Stream generate Local Variable Table Attributes compute the resolved position for the arguments of the method int arg Size int local Variable Table Offset local Contents Offset int number Of Entries 0 code Attribute add Local Variable Table Attribute this int local Variable Name Index constant Pool literal Index Attribute Names Constants Local Variable Table Name if local Contents Offset 8 this contents length resize Contents 8 this contents local Contents Offset byte local Variable Name Index 8 this contents local Contents Offset byte local Variable Name Index local Contents Offset 6 leave space for attribute length and local variable table length int descriptor Index if code Stream method Declaration is Static number Of Entries if local Contents Offset 10 this contents length resize Contents 10 this contents local Contents Offset 0 this contents local Contents Offset 0 this contents local Contents Offset byte code length 8 this contents local Contents Offset byte code length int name Index constant Pool literal Index Qualified Names Constants This this contents local Contents Offset byte name Index 8 this contents local Contents Offset byte name Index descriptor Index constant Pool literal Index code Stream method Declaration binding declaring Class signature this contents local Contents Offset byte descriptor Index 8 this contents local Contents Offset byte descriptor Index the resolved position for this is always 0 this contents local Contents Offset 0 this contents local Contents Offset 0 if binding is Constructor Reference Binding declaring Class binding declaring Class if declaring Class is Nested Type Nested Type Binding method Declaring Class Nested Type Binding declaring Class arg Size method Declaring Class enclosing Instances Slot Size Synthetic Argument Binding synthetic Arguments if synthetic Arguments method Declaring Class synthetic Enclosing Instances null for int i 0 max synthetic Arguments length i max i Local Variable Binding local Variable synthetic Arguments i if local Contents Offset 10 this contents length resize Contents 10 now we can safely add the local entry number Of Entries this contents local Contents Offset 0 this contents local Contents Offset 0 this contents local Contents Offset byte code length 8 this contents local Contents Offset byte code length int name Index constant Pool literal Index local Variable name this contents local Contents Offset byte name Index 8 this contents local Contents Offset byte name Index descriptor Index constant Pool literal Index local Variable type signature this contents local Contents Offset byte descriptor Index 8 this contents local Contents Offset byte descriptor Index int resolved Position local Variable resolved Position this contents local Contents Offset byte resolved Position 8 this contents local Contents Offset byte resolved Position else arg Size 1 else arg Size binding is Static 0 1 if method binding null Type Binding parameters method binding parameters Argument arguments method arguments if parameters null arguments null for int i 0 max parameters length i max i Type Binding argument Binding parameters i if local Contents Offset 10 this contents length resize Contents 10 now we can safely add the local entry number Of Entries this contents local Contents Offset 0 this contents local Contents Offset 0 this contents local Contents Offset byte code length 8 this contents local Contents Offset byte code length int name Index constant Pool literal Index arguments i name this contents local Contents Offset byte name Index 8 this contents local Contents Offset byte name Index descriptor Index constant Pool literal Index argument Binding signature this contents local Contents Offset byte descriptor Index 8 this contents local Contents Offset byte descriptor Index int resolved Position arg Size if argument Binding Base Types Long Binding argument Binding Base Types Double Binding arg Size 2 else arg Size this contents local Contents Offset byte resolved Position 8 this contents local Contents Offset byte resolved Position int value number Of Entries 10 2 local Variable Table Offset 2 this contents local Variable Table Offset byte value 24 this contents local Variable Table Offset byte value 16 this contents local Variable Table Offset byte value 8 this contents local Variable Table Offset byte value this contents local Variable Table Offset byte number Of Entries 8 this contents local Variable Table Offset byte number Of Entries attribute Number update the number of attributes ensure first that there is enough space available inside the local Contents array if code Attribute Attribute Offset 2 this contents length resize Contents 2 this contents code Attribute Attribute Offset byte attribute Number 8 this contents code Attribute Attribute Offset byte attribute Number update the attribute length int code Attribute Length local Contents Offset code Attribute Offset 6 this contents code Attribute Offset 2 byte code Attribute Length 24 this contents code Attribute Offset 3 byte code Attribute Length 16 this contents code Attribute Offset 4 byte code Attribute Length 8 this contents code Attribute Offset 5 byte code Attribute Length contents Offset local Contents Offset  attribute_length max_stack max_locals code_length codeAttributeOffset completeCodeAttributeForProblemMethod AbstractMethodDeclaration MethodBinding codeAttributeOffset startLineIndexes localContents codeStream bCodeStream localContentsOffset codeStream classFileOffset codeAttributeOffset localContents codeAttribute attribute_length codeAttributeOffset max_stack max_stack codeStream stackMax codeAttributeOffset max_stack codeAttributeOffset max_stack max_locals codeStream maxLocals codeAttributeOffset max_locals codeAttributeOffset max_locals code_length codeStream codeAttributeOffset code_length codeAttributeOffset code_length codeAttributeOffset code_length codeAttributeOffset code_length localContentsOffset resizeContents localContentsOffset localContentsOffset codeAttributeAttributeOffset localContentsOffset attributeNumber attribute_length localContentsOffset codeStream generateLineNumberAttributes localContentsOffset resizeContents lineNumber pcToSourceMap lineNumberNameIndex constantPool literalIndex AttributeNamesConstants LineNumberTableName localContentsOffset lineNumberNameIndex localContentsOffset lineNumberNameIndex localContentsOffset localContentsOffset localContentsOffset localContentsOffset localContentsOffset localContentsOffset problemLine problemLine searchLineNumber startLineIndexes sourceStart localContentsOffset localContentsOffset localContentsOffset problemLine localContentsOffset problemLine attributeNumber codeStream generateLocalVariableTableAttributes argSize localVariableTableOffset localContentsOffset numberOfEntries codeAttribute addLocalVariableTableAttribute localVariableNameIndex constantPool literalIndex AttributeNamesConstants LocalVariableTableName localContentsOffset resizeContents localContentsOffset localVariableNameIndex localContentsOffset localVariableNameIndex localContentsOffset attribute_length local_variable_table_length descriptorIndex codeStream methodDeclaration isStatic numberOfEntries localContentsOffset resizeContents localContentsOffset localContentsOffset localContentsOffset code_length localContentsOffset code_length nameIndex constantPool literalIndex QualifiedNamesConstants localContentsOffset nameIndex localContentsOffset nameIndex descriptorIndex constantPool literalIndex codeStream methodDeclaration declaringClass localContentsOffset descriptorIndex localContentsOffset descriptorIndex localContentsOffset localContentsOffset isConstructor ReferenceBinding declaringClass declaringClass declaringClass isNestedType NestedTypeBinding methodDeclaringClass NestedTypeBinding declaringClass argSize methodDeclaringClass enclosingInstancesSlotSize SyntheticArgumentBinding syntheticArguments syntheticArguments methodDeclaringClass syntheticEnclosingInstances syntheticArguments LocalVariableBinding localVariable syntheticArguments localContentsOffset resizeContents numberOfEntries localContentsOffset localContentsOffset localContentsOffset code_length localContentsOffset code_length nameIndex constantPool literalIndex localVariable localContentsOffset nameIndex localContentsOffset nameIndex descriptorIndex constantPool literalIndex localVariable localContentsOffset descriptorIndex localContentsOffset descriptorIndex resolvedPosition localVariable resolvedPosition localContentsOffset resolvedPosition localContentsOffset resolvedPosition argSize argSize isStatic TypeBinding TypeBinding argumentBinding localContentsOffset resizeContents numberOfEntries localContentsOffset localContentsOffset localContentsOffset code_length localContentsOffset code_length nameIndex constantPool literalIndex localContentsOffset nameIndex localContentsOffset nameIndex descriptorIndex constantPool literalIndex argumentBinding localContentsOffset descriptorIndex localContentsOffset descriptorIndex resolvedPosition argSize argumentBinding BaseTypes LongBinding argumentBinding BaseTypes DoubleBinding argSize argSize localContentsOffset resolvedPosition localContentsOffset resolvedPosition numberOfEntries localVariableTableOffset localVariableTableOffset localVariableTableOffset localVariableTableOffset localVariableTableOffset localVariableTableOffset numberOfEntries localVariableTableOffset numberOfEntries attributeNumber localContents codeAttributeAttributeOffset resizeContents codeAttributeAttributeOffset attributeNumber codeAttributeAttributeOffset attributeNumber codeAttributeLength localContentsOffset codeAttributeOffset codeAttributeOffset codeAttributeLength codeAttributeOffset codeAttributeLength codeAttributeOffset codeAttributeLength codeAttributeOffset codeAttributeLength contentsOffset localContentsOffset
INTERNAL USE ONLY That method completes the creation of the code attribute by setting the attribute length max stack max locals code length exception table and debug attributes if necessary param binding org eclipse jdt internal compiler lookup Synthetic Access Method Binding param code Attribute Offset CODE int CODE public void complete Code Attribute For Synthetic Access Method Synthetic Access Method Binding binding int code Attribute Offset int start Line Indexes reinitialize the contents with the byte modified by the code stream this contents code Stream b Code Stream int local Contents Offset code Stream class File Offset code Attribute Offset is the position inside contents byte array before we started to write any information about the code Attribute That means that to write the attribute length you need to offset by 2 the value of code Attribute Offset to get the right position 6 for the max stack etc int max stack code Stream stack Max contents code Attribute Offset 6 byte max stack 8 contents code Attribute Offset 7 byte max stack int max locals code Stream max Locals contents code Attribute Offset 8 byte max locals 8 contents code Attribute Offset 9 byte max locals int code length code Stream position contents code Attribute Offset 10 byte code length 24 contents code Attribute Offset 11 byte code length 16 contents code Attribute Offset 12 byte code length 8 contents code Attribute Offset 13 byte code length if local Contents Offset 40 this contents length resize Contents 40 there is no exception table so we need to offset by 2 the current offset and move on the attribute generation contents local Contents Offset 0 contents local Contents Offset 0 debug attributes int code Attribute Attribute Offset local Contents Offset int attribute Number 0 leave two bytes for the attribute length local Contents Offset 2 first we handle the linenumber attribute if code Stream generate Line Number Attributes int index 0 int line Number Name Index constant Pool literal Index Attribute Names Constants Line Number Table Name contents local Contents Offset byte line Number Name Index 8 contents local Contents Offset byte line Number Name Index int line Number Table Offset local Contents Offset local Contents Offset 6 leave space for attribute length and line number table length Seems like do would be better but this preserves the existing behavior index search Line Number start Line Indexes binding source Start contents local Contents Offset 0 contents local Contents Offset 0 contents local Contents Offset byte index 8 contents local Contents Offset byte index now we change the size of the line number attribute contents line Number Table Offset 0 contents line Number Table Offset 0 contents line Number Table Offset 0 contents line Number Table Offset 6 contents line Number Table Offset 0 contents line Number Table Offset 1 attribute Number then we do the local variable attribute if code Stream generate Local Variable Table Attributes int local Variable Table Offset local Contents Offset int number Of Entries 0 int local Variable Name Index constant Pool literal Index Attribute Names Constants Local Variable Table Name if local Contents Offset 8 this contents length resize Contents 8 contents local Contents Offset byte local Variable Name Index 8 contents local Contents Offset byte local Variable Name Index local Contents Offset 6 leave space for attribute length and local variable table length int name Index int descriptor Index for int i 0 i code Stream all Locals Counter i Local Variable Binding local Variable code Stream locals i for int j 0 j local Variable initialization Count j int startPC local Variable initializationP Cs j 1 int endPC local Variable initializationP Cs j 1 1 if startPC endPC only entries for non zero length if endPC 1 local Variable declaring Scope problem Reporter abort Due To Internal Error Util bind abort invalid Attribute new String local Variable name NON NLS 1 AST Node local Variable declaring Scope method Scope reference Context if local Contents Offset 10 this contents length resize Contents 10 now we can safely add the local entry number Of Entries contents local Contents Offset byte startPC 8 contents local Contents Offset byte startPC int length endPC startPC contents local Contents Offset byte length 8 contents local Contents Offset byte length name Index constant Pool literal Index local Variable name contents local Contents Offset byte name Index 8 contents local Contents Offset byte name Index descriptor Index constant Pool literal Index local Variable type signature contents local Contents Offset byte descriptor Index 8 contents local Contents Offset byte descriptor Index int resolved Position local Variable resolved Position contents local Contents Offset byte resolved Position 8 contents local Contents Offset byte resolved Position int value number Of Entries 10 2 local Variable Table Offset 2 contents local Variable Table Offset byte value 24 contents local Variable Table Offset byte value 16 contents local Variable Table Offset byte value 8 contents local Variable Table Offset byte value contents local Variable Table Offset byte number Of Entries 8 contents local Variable Table Offset byte number Of Entries attribute Number update the number of attributes ensure first that there is enough space available inside the contents array if code Attribute Attribute Offset 2 this contents length resize Contents 2 contents code Attribute Attribute Offset byte attribute Number 8 contents code Attribute Attribute Offset byte attribute Number update the attribute length int code Attribute Length local Contents Offset code Attribute Offset 6 contents code Attribute Offset 2 byte code Attribute Length 24 contents code Attribute Offset 3 byte code Attribute Length 16 contents code Attribute Offset 4 byte code Attribute Length 8 contents code Attribute Offset 5 byte code Attribute Length contents Offset local Contents Offset  attribute_length max_stack max_locals code_length SyntheticAccessMethodBinding codeAttributeOffset completeCodeAttributeForSyntheticAccessMethod SyntheticAccessMethodBinding codeAttributeOffset startLineIndexes codeStream bCodeStream localContentsOffset codeStream classFileOffset codeAttributeOffset codeAttribute attribute_length codeAttributeOffset max_stack max_stack codeStream stackMax codeAttributeOffset max_stack codeAttributeOffset max_stack max_locals codeStream maxLocals codeAttributeOffset max_locals codeAttributeOffset max_locals code_length codeStream codeAttributeOffset code_length codeAttributeOffset code_length codeAttributeOffset code_length codeAttributeOffset code_length localContentsOffset resizeContents localContentsOffset localContentsOffset codeAttributeAttributeOffset localContentsOffset attributeNumber attribute_length localContentsOffset codeStream generateLineNumberAttributes lineNumberNameIndex constantPool literalIndex AttributeNamesConstants LineNumberTableName localContentsOffset lineNumberNameIndex localContentsOffset lineNumberNameIndex lineNumberTableOffset localContentsOffset localContentsOffset attribute_length line_number_table_length searchLineNumber startLineIndexes sourceStart localContentsOffset localContentsOffset localContentsOffset localContentsOffset lineNumberTableOffset lineNumberTableOffset lineNumberTableOffset lineNumberTableOffset lineNumberTableOffset lineNumberTableOffset attributeNumber codeStream generateLocalVariableTableAttributes localVariableTableOffset localContentsOffset numberOfEntries localVariableNameIndex constantPool literalIndex AttributeNamesConstants LocalVariableTableName localContentsOffset resizeContents localContentsOffset localVariableNameIndex localContentsOffset localVariableNameIndex localContentsOffset attribute_length local_variable_table_length nameIndex descriptorIndex codeStream allLocalsCounter LocalVariableBinding localVariable codeStream localVariable initializationCount localVariable initializationPCs localVariable initializationPCs localVariable declaringScope problemReporter abortDueToInternalError invalidAttribute localVariable ASTNode localVariable declaringScope methodScope referenceContext localContentsOffset resizeContents numberOfEntries localContentsOffset localContentsOffset localContentsOffset localContentsOffset nameIndex constantPool literalIndex localVariable localContentsOffset nameIndex localContentsOffset nameIndex descriptorIndex constantPool literalIndex localVariable localContentsOffset descriptorIndex localContentsOffset descriptorIndex resolvedPosition localVariable resolvedPosition localContentsOffset resolvedPosition localContentsOffset resolvedPosition numberOfEntries localVariableTableOffset localVariableTableOffset localVariableTableOffset localVariableTableOffset localVariableTableOffset localVariableTableOffset numberOfEntries localVariableTableOffset numberOfEntries attributeNumber codeAttributeAttributeOffset resizeContents codeAttributeAttributeOffset attributeNumber codeAttributeAttributeOffset attributeNumber codeAttributeLength localContentsOffset codeAttributeOffset codeAttributeOffset codeAttributeLength codeAttributeOffset codeAttributeLength codeAttributeOffset codeAttributeLength codeAttributeOffset codeAttributeLength contentsOffset localContentsOffset
INTERNAL USE ONLY Complete the creation of a method info by setting up the number of attributes at the right offset param method Attribute Offset CODE int CODE param attribute Number CODE int CODE public void complete Method Info int method Attribute Offset int attribute Number update the number of attributes contents method Attribute Offset byte attribute Number 8 contents method Attribute Offset byte attribute Number  methodAttributeOffset attributeNumber completeMethodInfo methodAttributeOffset attributeNumber methodAttributeOffset attributeNumber methodAttributeOffset attributeNumber
INTERNAL USE ONLY Request the creation of a Class File compatible representation of a problematic type param type Declaration org eclipse jdt internal compiler ast Type Declaration param unit Result org eclipse jdt internal compiler Compilation Unit Result public static void create Problem Type Type Declaration type Declaration Compilation Result unit Result Source Type Binding type Binding type Declaration binding Class File class File new Class File type Binding null true TODO olivier handle cases where a field cannot be generated name too long TODO olivier handle too many methods inner attributes if type Binding is Member Type class File record Enclosing Type Attributes type Binding add its fields Field Binding fields type Binding fields if fields null fields No Fields for int i 0 max fields length i max i if fields i constant null Field Reference get Constant For fields i null false null class File add Field Infos else we have to set the number of fields to be equals to 0 class File contents class File contents Offset 0 class File contents class File contents Offset 0 leave some space for the method Count class File set For Method Infos add its user defined methods Method Binding methods type Binding methods Abstract Method Declaration method Declarations type Declaration methods int max Method Decl method Declarations null 0 method Declarations length int problems Length I Problem problems unit Result get Errors if problems null problems new I Problem 0 I Problem problems Copy new I Problem problems Length problems length System arraycopy problems 0 problems Copy 0 problems Length if methods null if type Binding is Interface we cannot create problem methods for an interface So we have to generate a clinit which should contain all the problem class File add Problem Clinit problems Copy for int i 0 max methods length i max i Method Binding method Binding if method Binding methods i null find the corresponding method declaration for int j 0 j max Method Decl j if method Declarations j null method Declarations j binding methods i if method Binding is Constructor class File add Abstract Method method Declarations j method Binding break else for int i 0 max methods length i max i Method Binding method Binding if method Binding methods i null find the corresponding method declaration for int j 0 j max Method Decl j if method Declarations j null method Declarations j binding methods i Abstract Method Declaration method Decl if method Decl method Declarations j is Constructor class File add Problem Constructor method Decl method Binding problems Copy else class File add Problem Method method Decl method Binding problems Copy break add abstract methods class File add Default Abstract Methods propagate generation of problem member types if type Declaration member Types null for int i 0 max type Declaration member Types length i max i Type Declaration member Type type Declaration member Types i if member Type binding null class File record Nested Member Attribute member Type binding Class File create Problem Type member Type unit Result class File add Attributes unit Result record type Binding constant Pool Name class File  ClassFile typeDeclaration TypeDeclaration unitResult CompilationUnitResult createProblemType TypeDeclaration typeDeclaration CompilationResult unitResult SourceTypeBinding typeBinding typeDeclaration ClassFile classFile ClassFile typeBinding typeBinding isMemberType classFile recordEnclosingTypeAttributes typeBinding FieldBinding typeBinding NoFields FieldReference getConstantFor classFile addFieldInfos classFile classFile contentsOffset classFile classFile contentsOffset methodCount classFile setForMethodInfos MethodBinding typeBinding AbstractMethodDeclaration methodDeclarations typeDeclaration maxMethodDecl methodDeclarations methodDeclarations problemsLength IProblem unitResult getErrors IProblem IProblem problemsCopy IProblem problemsLength problemsCopy problemsLength typeBinding isInterface classFile addProblemClinit problemsCopy MethodBinding methodBinding methodBinding maxMethodDecl methodDeclarations methodDeclarations methodBinding isConstructor classFile addAbstractMethod methodDeclarations methodBinding MethodBinding methodBinding methodBinding maxMethodDecl methodDeclarations methodDeclarations AbstractMethodDeclaration methodDecl methodDecl methodDeclarations isConstructor classFile addProblemConstructor methodDecl methodBinding problemsCopy classFile addProblemMethod methodDecl methodBinding problemsCopy classFile addDefaultAbstractMethods typeDeclaration memberTypes typeDeclaration memberTypes TypeDeclaration memberType typeDeclaration memberTypes memberType classFile recordNestedMemberAttribute memberType ClassFile createProblemType memberType unitResult classFile addAttributes unitResult typeBinding constantPoolName classFile
INTERNAL USE ONLY This methods returns a char representing the file name of the receiver return char public char file Name return constant Pool UTF8 Cache return Key For 1  fileName constantPool UTF8Cache returnKeyFor
INTERNAL USE ONLY That method generates the header of a code attribute the index inside the constant pool for the attribute name Code leave some space for attribute length 4 max stack 2 max locals 2 code length 4 public void generate Code Attribute Header if contents Offset 20 this contents length resize Contents 20 int constant Value Name Index constant Pool literal Index Attribute Names Constants Code Name contents contents Offset byte constant Value Name Index 8 contents contents Offset byte constant Value Name Index leave space for attribute length 4 max stack 2 max locals 2 code length 4 contents Offset 12  attribute_length max_stack max_locals code_length generateCodeAttributeHeader contentsOffset resizeContents constantValueNameIndex constantPool literalIndex AttributeNamesConstants CodeName contentsOffset constantValueNameIndex contentsOffset constantValueNameIndex attribute_length max_stack max_locals code_length contentsOffset
INTERNAL USE ONLY That method generates the attributes of a code attribute They could be an exception attribute for each try catch found inside the method a deprecated attribute a synthetic attribute for synthetic access methods It returns the number of attributes created for the code attribute param method Binding org eclipse jdt internal compiler lookup Method Binding return CODE int CODE public int generate Method Info Attribute Method Binding method Binding leave two bytes for the attribute number contents Offset 2 now we can handle all the attribute for that method info it could be a Code Attribute a Exception Attribute a Deprecated Attribute a Synthetic Attribute Exception attribute Reference Binding throwns Exceptions int attribute Number 0 if throwns Exceptions method Binding thrown Exceptions No Exceptions The method has a throw clause So we need to add an exception attribute check that there is enough space to write all the bytes for the exception attribute int length throwns Exceptions length int ex Size 8 length 2 if ex Size contents Offset this contents length resize Contents ex Size int exception Name Index constant Pool literal Index Attribute Names Constants Exceptions Name contents contents Offset byte exception Name Index 8 contents contents Offset byte exception Name Index The attribute length length 2 2 in case of a exception attribute int attribute Length length 2 2 contents contents Offset byte attribute Length 24 contents contents Offset byte attribute Length 16 contents contents Offset byte attribute Length 8 contents contents Offset byte attribute Length contents contents Offset byte length 8 contents contents Offset byte length for int i 0 i length i int exception Index constant Pool literal Index throwns Exceptions i contents contents Offset byte exception Index 8 contents contents Offset byte exception Index attribute Number if method Binding is Deprecated Deprecated attribute Check that there is enough space to write the deprecated attribute if contents Offset 6 this contents length resize Contents 6 int deprecated Attribute Name Index constant Pool literal Index Attribute Names Constants Deprecated Name contents contents Offset byte deprecated Attribute Name Index 8 contents contents Offset byte deprecated Attribute Name Index the length of a deprecated attribute is equals to 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 attribute Number if this targetJDK Class File Constants JDK1 5 method Binding is Synthetic Synthetic attribute Check that there is enough space to write the deprecated attribute if contents Offset 6 this contents length resize Contents 6 int synthetic Attribute Name Index constant Pool literal Index Attribute Names Constants Synthetic Name contents contents Offset byte synthetic Attribute Name Index 8 contents contents Offset byte synthetic Attribute Name Index the length of a synthetic attribute is equals to 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 contents contents Offset 0 attribute Number return attribute Number  methodBinding MethodBinding generateMethodInfoAttribute MethodBinding methodBinding attribute_number contentsOffset CodeAttribute ExceptionAttribute DeprecatedAttribute SyntheticAttribute ReferenceBinding thrownsExceptions attributeNumber thrownsExceptions methodBinding thrownExceptions NoExceptions thrownsExceptions exSize exSize contentsOffset resizeContents exSize exceptionNameIndex constantPool literalIndex AttributeNamesConstants ExceptionsName contentsOffset exceptionNameIndex contentsOffset exceptionNameIndex attributeLength contentsOffset attributeLength contentsOffset attributeLength contentsOffset attributeLength contentsOffset attributeLength contentsOffset contentsOffset exceptionIndex constantPool literalIndex thrownsExceptions contentsOffset exceptionIndex contentsOffset exceptionIndex attributeNumber methodBinding isDeprecated contentsOffset resizeContents deprecatedAttributeNameIndex constantPool literalIndex AttributeNamesConstants DeprecatedName contentsOffset deprecatedAttributeNameIndex contentsOffset deprecatedAttributeNameIndex contentsOffset contentsOffset contentsOffset contentsOffset attributeNumber ClassFileConstants JDK1_5 methodBinding isSynthetic contentsOffset resizeContents syntheticAttributeNameIndex constantPool literalIndex AttributeNamesConstants SyntheticName contentsOffset syntheticAttributeNameIndex contentsOffset syntheticAttributeNameIndex contentsOffset contentsOffset contentsOffset contentsOffset attributeNumber attributeNumber
INTERNAL USE ONLY That method generates the header of a method info The header consists in the access flags the name index of the method name inside the constant pool the descriptor index of the signature of the method inside the constant pool param method Binding org eclipse jdt internal compiler lookup Method Binding public void generate Method Info Header Method Binding method Binding generate Method Info Header method Binding method Binding modifiers  methodBinding MethodBinding generateMethodInfoHeader MethodBinding methodBinding generateMethodInfoHeader methodBinding methodBinding
INTERNAL USE ONLY That method generates the header of a method info The header consists in the access flags the name index of the method name inside the constant pool the descriptor index of the signature of the method inside the constant pool param method Binding org eclipse jdt internal compiler lookup Method Binding param access Flags the access flags public void generate Method Info Header Method Binding method Binding int access Flags check that there is enough space to write all the bytes for the method info corresponding to the method Binding method Count add one more method if contents Offset 10 this contents length resize Contents 10 if targetJDK Class File Constants JDK1 5 pre 1 5 synthetic was an attribute not a modifier access Flags Acc Synthetic if method Binding is Required To Clear Private Modifier access Flags Acc Private contents contents Offset byte access Flags 8 contents contents Offset byte access Flags int name Index constant Pool literal Index method Binding selector contents contents Offset byte name Index 8 contents contents Offset byte name Index int descriptor Index constant Pool literal Index method Binding signature contents contents Offset byte descriptor Index 8 contents contents Offset byte descriptor Index  methodBinding MethodBinding accessFlags generateMethodInfoHeader MethodBinding methodBinding accessFlags methodBinding methodCount contentsOffset resizeContents ClassFileConstants JDK1_5 accessFlags AccSynthetic methodBinding isRequiredToClearPrivateModifier accessFlags AccPrivate contentsOffset accessFlags contentsOffset accessFlags nameIndex constantPool literalIndex methodBinding contentsOffset nameIndex contentsOffset nameIndex descriptorIndex constantPool literalIndex methodBinding contentsOffset descriptorIndex contentsOffset descriptorIndex
INTERNAL USE ONLY That method generates the method info header of a clinit The header consists in the access flags always default access static the name index of the method name always clinit inside the constant pool the descriptor index of the signature always V of the method inside the constant pool public void generate Method Info Header For Clinit check that there is enough space to write all the bytes for the method info corresponding to the method Binding method Count add one more method if contents Offset 10 this contents length resize Contents 10 contents contents Offset byte Acc Default Acc Static 8 contents contents Offset byte Acc Default Acc Static int name Index constant Pool literal Index Qualified Names Constants Clinit contents contents Offset byte name Index 8 contents contents Offset byte name Index int descriptor Index constant Pool literal Index Qualified Names Constants Clinit Signature contents contents Offset byte descriptor Index 8 contents contents Offset byte descriptor Index We know that we won t get more than 1 attribute the code attribute contents contents Offset 0 contents contents Offset 1  generateMethodInfoHeaderForClinit methodBinding methodCount contentsOffset resizeContents contentsOffset AccDefault AccStatic contentsOffset AccDefault AccStatic nameIndex constantPool literalIndex QualifiedNamesConstants contentsOffset nameIndex contentsOffset nameIndex descriptorIndex constantPool literalIndex QualifiedNamesConstants ClinitSignature contentsOffset descriptorIndex contentsOffset descriptorIndex contentsOffset contentsOffset
EXTERNAL API Answer the actual bytes of the class file This method encodes the receiver structure into a byte array which is the content of the classfile Returns the byte array that represents the encoded structure of the receiver return byte public byte get Bytes byte full Contents new byte header Offset contents Offset System arraycopy header 0 full Contents 0 header Offset System arraycopy contents 0 full Contents header Offset contents Offset return full Contents  getBytes fullContents headerOffset contentsOffset fullContents headerOffset fullContents headerOffset contentsOffset fullContents
EXTERNAL API Answer the compound name of the class file return char e g java util Hashtable public char get Compound Name return Char Operation split On file Name  getCompoundName CharOperation splitOn fileName
protected void init Byte Arrays Lookup Environment env this reference Binding scope environment synchronized env if env shared Arrays Used this own Shared Arrays false int members reference Binding methods length reference Binding fields length this header new byte INITIAL HEADER SIZE this contents new byte members 15 INITIAL CONTENTS SIZE INITIAL HEADER SIZE else this own Shared Arrays env shared Arrays Used true this header env shared Class File Header this contents env shared Class File Contents  initByteArrays LookupEnvironment referenceBinding sharedArraysUsed ownSharedArrays referenceBinding referenceBinding INITIAL_HEADER_SIZE INITIAL_CONTENTS_SIZE INITIAL_HEADER_SIZE ownSharedArrays sharedArraysUsed sharedClassFileHeader sharedClassFileContents
INTERNAL USE ONLY Returns the most enclosing classfile of the receiver This is used know to store the constant pool name for all inner types of the receiver return org eclipse jdt internal compiler codegen Class File public Class File outer Most Enclosing Class File Class File current this while current enclosing Class File null current current enclosing Class File return current  ClassFile ClassFile outerMostEnclosingClassFile ClassFile enclosingClassFile enclosingClassFile
INTERNAL USE ONLY This is used to store a new inner class It checks that the binding binding doesn t already exist inside the collection of inner classes Add all the necessary classes in the right order to fit to the specifications param binding org eclipse jdt internal compiler lookup Reference Binding public void record Enclosing Type Attributes Reference Binding binding add all the enclosing types Reference Binding enclosing Type reference Binding enclosing Type int depth 0 while enclosing Type null depth enclosing Type enclosing Type enclosing Type enclosing Type reference Binding Reference Binding enclosing Types if depth 2 enclosing Types new Reference Binding depth for int i depth 1 i 0 i enclosing Types i enclosing Type enclosing Type enclosing Type enclosing Type for int i 0 i depth i add Inner Classes enclosing Types i else add Inner Classes reference Binding  ReferenceBinding recordEnclosingTypeAttributes ReferenceBinding ReferenceBinding enclosingType referenceBinding enclosingType enclosingType enclosingType enclosingType enclosingType enclosingType referenceBinding ReferenceBinding enclosingTypes enclosingTypes ReferenceBinding enclosingTypes enclosingType enclosingType enclosingType enclosingType addInnerClasses enclosingTypes addInnerClasses referenceBinding
INTERNAL USE ONLY This is used to store a new inner class It checks that the binding binding doesn t already exist inside the collection of inner classes Add all the necessary classes in the right order to fit to the specifications param binding org eclipse jdt internal compiler lookup Reference Binding public void record Nested Local Attribute Reference Binding binding add all the enclosing types Reference Binding enclosing Type reference Binding enclosing Type int depth 0 while enclosing Type null depth enclosing Type enclosing Type enclosing Type enclosing Type reference Binding Reference Binding enclosing Types if depth 2 enclosing Types new Reference Binding depth for int i depth 1 i 0 i enclosing Types i enclosing Type enclosing Type enclosing Type enclosing Type for int i 0 i depth i add Inner Classes enclosing Types i else add Inner Classes binding  ReferenceBinding recordNestedLocalAttribute ReferenceBinding ReferenceBinding enclosingType referenceBinding enclosingType enclosingType enclosingType enclosingType enclosingType enclosingType referenceBinding ReferenceBinding enclosingTypes enclosingTypes ReferenceBinding enclosingTypes enclosingType enclosingType enclosingType enclosingType addInnerClasses enclosingTypes addInnerClasses
INTERNAL USE ONLY This is used to store a new inner class It checks that the binding binding doesn t already exist inside the collection of inner classes Add all the necessary classes in the right order to fit to the specifications param binding org eclipse jdt internal compiler lookup Reference Binding public void record Nested Member Attribute Reference Binding binding add Inner Classes binding  ReferenceBinding recordNestedMemberAttribute ReferenceBinding addInnerClasses
Resize the pool contents private final void resize Contents int minimal Size int length this contents length int to Add length if to Add minimal Size to Add minimal Size System arraycopy this contents 0 this contents new byte length to Add 0 length  resizeContents minimalSize toAdd toAdd minimalSize toAdd minimalSize toAdd
INTERNAL USE ONLY Search the line number corresponding to a specific position public static final int search Line Number int start Line Indexes int position this code is completely useless but it is the same implementation than org eclipse jdt internal compiler problem Problem Handler search Line Number int int if start Line Indexes null return 1 int length start Line Indexes length if length 0 return 1 int g 0 d length 1 int m 0 while g d m g d 2 if position start Line Indexes m d m 1 else if position start Line Indexes m g m 1 else return m 1 if position start Line Indexes m return m 1 return m 2  searchLineNumber startLineIndexes ProblemHandler searchLineNumber startLineIndexes startLineIndexes startLineIndexes startLineIndexes startLineIndexes
INTERNAL USE ONLY This methods leaves the space for method counts recording public void set For Method Infos leave some space for the method Count method Count Offset contents Offset contents Offset 2  setForMethodInfos methodCount methodCountOffset contentsOffset contentsOffset
INTERNAL USE ONLY output Path is formed like c temp the last character is a file separator relative File Name is formed like java lang String class param generate Packages Structure a flag to know if the packages structure has to be generated param output Path the output directory param relative File Name java lang String param contents byte public static void write To Disk boolean generate Packages Structure String output Path String relative File Name byte contents throws IO Exception Buffered Output Stream output null if generate Packages Structure output new Buffered Output Stream new File Output Stream new File build All Directories Into output Path relative File Name else String file Name null char file Separator Char File separator Char String file Separator File separator First we ensure that the output Path exists output Path output Path replace file Separator Char To be able to pass the mkdirs method we need to remove the extra file separator at the end of the out Dir name int index Of Package Separator relative File Name last Index Of file Separator Char if index Of Package Separator 1 if output Path ends With file Separator file Name output Path relative File Name else file Name output Path file Separator relative File Name else int length relative File Name length if output Path ends With file Separator file Name output Path relative File Name substring index Of Package Separator 1 length else file Name output Path file Separator relative File Name substring index Of Package Separator 1 length output new Buffered Output Stream new File Output Stream new File file Name try output write contents finally output flush output close  outputPath relativeFileName generatePackagesStructure outputPath relativeFileName writeToDisk generatePackagesStructure outputPath relativeFileName IOException BufferedOutputStream generatePackagesStructure BufferedOutputStream FileOutputStream buildAllDirectoriesInto outputPath relativeFileName fileName fileSeparatorChar separatorChar fileSeparator outputPath outputPath outputPath fileSeparatorChar outDir indexOfPackageSeparator relativeFileName lastIndexOf fileSeparatorChar indexOfPackageSeparator outputPath endsWith fileSeparator fileName outputPath relativeFileName fileName outputPath fileSeparator relativeFileName relativeFileName outputPath endsWith fileSeparator fileName outputPath relativeFileName indexOfPackageSeparator fileName outputPath fileSeparator relativeFileName indexOfPackageSeparator BufferedOutputStream FileOutputStream fileName

private int inner Info Index param class File Bytes byte Actual bytes of a class file param file Name char Actual name of the file that contains the bytes can be null param fully Initialize boolean Flag to fully initialize the new object exception Class Format Exception public Class File Reader byte class File Bytes char file Name boolean fully Initialize throws Class Format Exception This method looks ugly but is actually quite simple the constant Pool is constructed in 3 passes All non primitive constant pool members that usually refer to other members by index are tweaked to have their value in inst vars this minor cost at read time makes all subsequent uses of the constant pool element faster super class File Bytes 0 this class File Name file Name int read Offset 10 try this version long this u2 At 6 16 this u2 At 4 major 16 minor constant Pool Count this u2 At 8 Pass 1 Fill in all primitive constants this constant Pool Offsets new int constant Pool Count for int i 1 i constant Pool Count i int tag this u1 At read Offset switch tag case Utf8 Tag this constant Pool Offsets i read Offset read Offset u2 At read Offset 1 read Offset Constant Utf8 Fixed Size break case Integer Tag this constant Pool Offsets i read Offset read Offset Constant Integer Fixed Size break case Float Tag this constant Pool Offsets i read Offset read Offset Constant Float Fixed Size break case Long Tag this constant Pool Offsets i read Offset read Offset Constant Long Fixed Size i break case Double Tag this constant Pool Offsets i read Offset read Offset Constant Double Fixed Size i break case Class Tag this constant Pool Offsets i read Offset read Offset Constant Class Fixed Size break case String Tag this constant Pool Offsets i read Offset read Offset Constant String Fixed Size break case Field Ref Tag this constant Pool Offsets i read Offset read Offset Constant Field Ref Fixed Size break case Method Ref Tag this constant Pool Offsets i read Offset read Offset Constant Method Ref Fixed Size break case Interface Method Ref Tag this constant Pool Offsets i read Offset read Offset Constant Interface Method Ref Fixed Size break case Name And Type Tag this constant Pool Offsets i read Offset read Offset Constant Name And Type Fixed Size Read and validate access flags this access Flags u2 At read Offset read Offset 2 Read the classname use exception handlers to catch bad format this class Name Index u2 At read Offset this class Name get Constant Class Name At this class Name Index read Offset 2 Read the superclass name can be null for java lang Object int superclass Name Index u2 At read Offset read Offset 2 if superclass Name Index is equals to 0 there is no need to set a value for the field this superclass Name null is fine if superclass Name Index 0 this superclass Name get Constant Class Name At superclass Name Index Read the interfaces use exception handlers to catch bad format this interfaces Count u2 At read Offset read Offset 2 if this interfaces Count 0 this interface Names new char this interfaces Count for int i 0 i this interfaces Count i this interface Names i get Constant Class Name At u2 At read Offset read Offset 2 Read the this fields use exception handlers to catch bad format this fields Count u2 At read Offset read Offset 2 if this fields Count 0 Field Info field this fields new Field Info this fields Count for int i 0 i this fields Count i field new Field Info reference this constant Pool Offsets read Offset this fields i field read Offset field size In Bytes Read the this methods this methods Count u2 At read Offset read Offset 2 if this methods Count 0 this methods new Method Info this methods Count Method Info method for int i 0 i this methods Count i method new Method Info reference this constant Pool Offsets read Offset this methods i method read Offset method size In Bytes Read the attributes int attributes Count u2 At read Offset read Offset 2 for int i 0 i attributes Count i int utf8 Offset this constant Pool Offsets u2 At read Offset char attribute Name utf8 At utf8 Offset 3 u2 At utf8 Offset 1 if Char Operation equals attribute Name Deprecated Name this access Flags Acc Deprecated else if Char Operation equals attribute Name Inner Class Name int inner Offset read Offset 6 int number of classes u2 At inner Offset if number of classes 0 inner Offset 2 this inner Infos new Inner Class Info number of classes for int j 0 j number of classes j this inner Infos j new Inner Class Info reference this constant Pool Offsets inner Offset if this class Name Index this inner Infos j inner Class Name Index this inner Info this inner Infos j this inner Info Index j inner Offset 8 else if Char Operation equals attribute Name Source Name utf8 Offset this constant Pool Offsets u2 At read Offset 6 this source File Name utf8 At utf8 Offset 3 u2 At utf8 Offset 1 else if Char Operation equals attribute Name Synthetic Name this access Flags Acc Synthetic read Offset 6 u4 At read Offset 2 if fully Initialize this initialize catch Class Format Exception e throw e catch Exception e throw new Class Format Exception Class Format Exception Err Truncated Input read Offset  innerInfoIndex classFileBytes fileName fullyInitialize ClassFormatException ClassFileReader classFileBytes fileName fullyInitialize ClassFormatException constantPool classFileBytes classFileName fileName readOffset u2At u2At constantPoolCount u2At constantPoolOffsets constantPoolCount constantPoolCount u1At readOffset Utf8Tag constantPoolOffsets readOffset readOffset u2At readOffset readOffset ConstantUtf8FixedSize IntegerTag constantPoolOffsets readOffset readOffset ConstantIntegerFixedSize FloatTag constantPoolOffsets readOffset readOffset ConstantFloatFixedSize LongTag constantPoolOffsets readOffset readOffset ConstantLongFixedSize DoubleTag constantPoolOffsets readOffset readOffset ConstantDoubleFixedSize ClassTag constantPoolOffsets readOffset readOffset ConstantClassFixedSize StringTag constantPoolOffsets readOffset readOffset ConstantStringFixedSize FieldRefTag constantPoolOffsets readOffset readOffset ConstantFieldRefFixedSize MethodRefTag constantPoolOffsets readOffset readOffset ConstantMethodRefFixedSize InterfaceMethodRefTag constantPoolOffsets readOffset readOffset ConstantInterfaceMethodRefFixedSize NameAndTypeTag constantPoolOffsets readOffset readOffset ConstantNameAndTypeFixedSize accessFlags u2At readOffset readOffset classNameIndex u2At readOffset className getConstantClassNameAt classNameIndex readOffset superclassNameIndex u2At readOffset readOffset superclassNameIndex superclassName superclassNameIndex superclassName getConstantClassNameAt superclassNameIndex interfacesCount u2At readOffset readOffset interfacesCount interfaceNames interfacesCount interfacesCount interfaceNames getConstantClassNameAt u2At readOffset readOffset fieldsCount u2At readOffset readOffset fieldsCount FieldInfo FieldInfo fieldsCount fieldsCount FieldInfo constantPoolOffsets readOffset readOffset sizeInBytes methodsCount u2At readOffset readOffset methodsCount MethodInfo methodsCount MethodInfo methodsCount MethodInfo constantPoolOffsets readOffset readOffset sizeInBytes attributesCount u2At readOffset readOffset attributesCount utf8Offset constantPoolOffsets u2At readOffset attributeName utf8At utf8Offset u2At utf8Offset CharOperation attributeName DeprecatedName accessFlags AccDeprecated CharOperation attributeName InnerClassName innerOffset readOffset number_of_classes u2At innerOffset number_of_classes innerOffset innerInfos InnerClassInfo number_of_classes number_of_classes innerInfos InnerClassInfo constantPoolOffsets innerOffset classNameIndex innerInfos innerClassNameIndex innerInfo innerInfos innerInfoIndex innerOffset CharOperation attributeName SourceName utf8Offset constantPoolOffsets u2At readOffset sourceFileName utf8At utf8Offset u2At utf8Offset CharOperation attributeName SyntheticName accessFlags AccSynthetic readOffset u4At readOffset fullyInitialize ClassFormatException ClassFormatException ClassFormatException ErrTruncatedInput readOffset
param class File Bytes Actual bytes of a class file param file Name Actual name of the file that contains the bytes can be null exception Class Format Exception public Class File Reader byte class File Bytes char file Name throws Class Format Exception this class File Bytes file Name false  classFileBytes fileName ClassFormatException ClassFileReader classFileBytes fileName ClassFormatException classFileBytes fileName
Answer the receiver s access flags The value of the access flags item is a mask of modifiers used with class and interface declarations return int public int access Flags return this access Flags  access_flags accessFlags accessFlags
Answer the char array that corresponds to the class name of the constant class constant Pool Index is the index in the constant pool that is a constant class entry param constant Pool Index int return char private char get Constant Class Name At int constant Pool Index int utf8 Offset this constant Pool Offsets u2 At this constant Pool Offsets constant Pool Index 1 return utf8 At utf8 Offset 3 u2 At utf8 Offset 1  constantPoolIndex constantPoolIndex getConstantClassNameAt constantPoolIndex utf8Offset constantPoolOffsets u2At constantPoolOffsets constantPoolIndex utf8At utf8Offset u2At utf8Offset
Answer the int array that corresponds to all the offsets of each entry in the constant pool return int public int get Constant Pool Offsets return this constant Pool Offsets  getConstantPoolOffsets constantPoolOffsets
public char get Enclosing Type Name if this inner Info null this is Anonymous return this inner Info get Enclosing Type Name return null  getEnclosingTypeName innerInfo isAnonymous innerInfo getEnclosingTypeName
Answer the receiver s this fields or null if the array is empty return org eclipse jdt internal compiler api I Binary Field public I Binary Field get Fields return this fields  IBinaryField IBinaryField getFields
Answer the file name which defines the type The format is unspecified public char get File Name return this class File Name  getFileName classFileName
Answer the source name if the receiver is a inner type Return null if it is an anonymous class or if the receiver is a top level class e g public class A public class B public void foo class C public Runnable bar return new Runnable public void run It returns B for the member A B It returns null for A It returns C for the local class A 1 C It returns null for the anonymous A 1 return char public char get Inner Source Name if this inner Info null return this inner Info get Source Name return null  getInnerSourceName innerInfo innerInfo getSourceName
Answer the resolved names of the receiver s interfaces in the class file format as specified in section 4 2 of the Java 2 VM spec or null if the array is empty For example java lang String is java lang String return char public char get Interface Names return this interface Names  getInterfaceNames interfaceNames
Answer the receiver s nested types or null if the array is empty This nested type info is extracted from the inner class attributes Ask the name environment to find a member type using its compound name return org eclipse jdt internal compiler api I Binary Nested Type public I Binary Nested Type get Member Types we might have some member types of the current type if this inner Infos null return null int length this inner Infos length int starting Index this inner Info null this inner Info Index 1 0 if length starting Index I Binary Nested Type member Types new I Binary Nested Type length this inner Info Index int member Type Index 0 for int i starting Index i length i Inner Class Info current Inner Info this inner Infos i int outer Class Name Idx current Inner Info outer Class Name Index int inner Name Index current Inner Info inner Name Index Checking that outer Class NameI Dx is different from 0 should be enough to determine if an inner class attribute entry is a member class but due to the bug http dev eclipse org bugs show bug cgi id 14592 we needed to add an extra check So we check that inner Name Index is different from 0 as well https bugs eclipse org bugs show bug cgi id 49879 From Java Mail 1 2 the class javax mail Folder contains an anonymous class in the terminate Queue method for which the inner attribute is boggus outer Class Name Idx is not 0 inner Name Index is not 0 but the source Name length is 0 So I added this extra check to filter out this anonymous class from the member types if outer Class Name Idx 0 inner Name Index 0 outer Class Name Idx this class Name Index current Inner Info get Source Name length 0 member Types member Type Index current Inner Info if member Type Index 0 return null if member Type Index member Types length we need to resize the member Types array Some local or anonymous classes are present in the current class System arraycopy member Types 0 member Types new I Binary Nested Type member Type Index 0 member Type Index return member Types return null  IBinaryNestedType IBinaryNestedType getMemberTypes innerInfos innerInfos startingIndex innerInfo innerInfoIndex startingIndex IBinaryNestedType memberTypes IBinaryNestedType innerInfoIndex memberTypeIndex startingIndex InnerClassInfo currentInnerInfo innerInfos outerClassNameIdx currentInnerInfo outerClassNameIndex innerNameIndex currentInnerInfo innerNameIndex outerClassNameIDx show_bug innerNameIndex show_bug JavaMail terminateQueue outerClassNameIdx innerNameIndex sourceName outerClassNameIdx innerNameIndex outerClassNameIdx classNameIndex currentInnerInfo getSourceName memberTypes memberTypeIndex currentInnerInfo memberTypeIndex memberTypeIndex memberTypes memberTypes memberTypes memberTypes IBinaryNestedType memberTypeIndex memberTypeIndex memberTypes
Answer the receiver s this methods or null if the array is empty return org eclipse jdt internal compiler api env I Binary Method public I Binary Method get Methods return this methods  IBinaryMethod IBinaryMethod getMethods
Answer an int whose bits are set according the access constants defined by the VM spec Set the Acc Deprecated and Acc Synthetic bits if necessary return int public int get Modifiers if this inner Info null if this access Flags Acc Deprecated 0 return this inner Info get Modifiers Acc Deprecated else return this inner Info get Modifiers return this access Flags  AccDeprecated AccSynthetic getModifiers innerInfo accessFlags AccDeprecated innerInfo getModifiers AccDeprecated innerInfo getModifiers accessFlags
Answer the resolved name of the type in the class file format as specified in section 4 2 of the Java 2 VM spec For example java lang String is java lang String return char public char get Name return this class Name  getName className
Answer the resolved name of the receiver s superclass in the class file format as specified in section 4 2 of the Java 2 VM spec or null if it does not have one For example java lang String is java lang String return char public char get Superclass Name return this superclass Name  getSuperclassName superclassName
Answer the major minor version defined in this class file according to the VM spec as a long major 16 minor return the major minor version found public long get Version return this version  getVersion
Answer true if the receiver is an anonymous type false otherwise return CODE boolean CODE public boolean is Anonymous if this inner Info null return false char source Name this inner Info get Source Name return source Name null source Name length 0  isAnonymous innerInfo sourceName innerInfo getSourceName sourceName sourceName
Answer whether the receiver contains the resolved binary form or the unresolved source form of the type return boolean public boolean is Binary Type return true  isBinaryType
Answer true if the receiver is a class False otherwise return boolean public boolean is Class return get Modifiers Acc Interface 0  isClass getModifiers AccInterface
Answer true if the receiver is an interface False otherwise return boolean public boolean is Interface return get Modifiers Acc Interface 0  isInterface getModifiers AccInterface
Answer true if the receiver is a local type false otherwise return CODE boolean CODE public boolean is Local if this inner Info null return false if this inner Info get Enclosing Type Name null return false char source Name this inner Info get Source Name return source Name null source Name length 0  isLocal innerInfo innerInfo getEnclosingTypeName sourceName innerInfo getSourceName sourceName sourceName
Answer true if the receiver is a member type false otherwise return CODE boolean CODE public boolean is Member if this inner Info null return false if this inner Info get Enclosing Type Name null return false char source Name this inner Info get Source Name return source Name null source Name length 0 protection against ill formed attributes 67600  isMember innerInfo innerInfo getEnclosingTypeName sourceName innerInfo getSourceName sourceName sourceName
Answer true if the receiver is a nested type false otherwise return CODE boolean CODE public boolean is Nested Type return this inner Info null  isNestedType innerInfo
return this inner Info null public static Class File Reader read File file throws Class Format Exception IO Exception return read file false  innerInfo ClassFileReader ClassFormatException IOException
public static Class File Reader read File file boolean fully Initialize throws Class Format Exception IO Exception byte class File Bytes Util get File Byte Content file Class File Reader class File Reader new Class File Reader class File Bytes file get Absolute Path to Char Array if fully Initialize class File Reader initialize return class File Reader  ClassFileReader fullyInitialize ClassFormatException IOException classFileBytes getFileByteContent ClassFileReader classFileReader ClassFileReader classFileBytes getAbsolutePath toCharArray fullyInitialize classFileReader classFileReader
return class File Reader public static Class File Reader read String file Name throws Class Format Exception java io IO Exception return read file Name false  classFileReader ClassFileReader fileName ClassFormatException IOException fileName
return read file Name false public static Class File Reader read String file Name boolean fully Initialize throws Class Format Exception java io IO Exception return read new File file Name fully Initialize  fileName ClassFileReader fileName fullyInitialize ClassFormatException IOException fileName fullyInitialize
public static Class File Reader read java util zip Zip File zip String filename throws Class Format Exception java io IO Exception return read zip filename false  ClassFileReader ZipFile ClassFormatException IOException
public static Class File Reader read java util zip Zip File zip String filename boolean fully Initialize throws Class Format Exception java io IO Exception java util zip Zip Entry ze zip get Entry filename if ze null return null byte class File Bytes Util get Zip Entry Byte Content ze zip Class File Reader class File Reader new Class File Reader class File Bytes filename to Char Array if fully Initialize class File Reader initialize return class File Reader  ClassFileReader ZipFile fullyInitialize ClassFormatException IOException ZipEntry getEntry classFileBytes getZipEntryByteContent ClassFileReader classFileReader ClassFileReader classFileBytes toCharArray fullyInitialize classFileReader classFileReader
Answer the source file name attribute Return null if there is no source file attribute for the receiver return char public char source File Name return this source File Name  sourceFileName sourceFileName
public String to String java io Byte Array Output Stream out new java io Byte Array Output Stream java io Print Writer print new java io Print Writer out print println this get Class get Name NON NLS 1 print println this class Name new String get Name NON NLS 1 print println this superclass Name get Superclass Name null null new String get Superclass Name NON NLS 2 NON NLS 1 print println access flags Class File Struct print Type Modifiers this access Flags this access Flags NON NLS 1 NON NLS 3 NON NLS 2 print flush return out to String  toString ByteArrayOutputStream ByteArrayOutputStream PrintWriter PrintWriter getClass getName className getName superclassName getSuperclassName getSuperclassName access_flags ClassFileStruct printTypeModifiers accessFlags accessFlags toString
Check if the receiver has structural changes compare to the byte array in argument Structural changes are modifiers changes for the class the this fields or the this methods signature changes for this fields or this methods changes in the number of this fields or this methods changes for field constants changes for thrown exceptions change for the super class or any super interfaces changes for member types name or modifiers If any of these changes occurs the method returns true false otherwise The synthetic fields are included and the members are not required to be sorted param new Bytes the bytes of the class file we want to compare the receiver to return boolean Returns true is there is a structural change between the two class files false otherwise public boolean has Structural Changes byte new Bytes return has Structural Changes new Bytes true true  newBytes hasStructuralChanges newBytes hasStructuralChanges newBytes
Check if the receiver has structural changes compare to the byte array in argument Structural changes are modifiers changes for the class the this fields or the this methods signature changes for this fields or this methods changes in the number of this fields or this methods changes for field constants changes for thrown exceptions change for the super class or any super interfaces changes for member types name or modifiers If any of these changes occurs the method returns true false otherwise param new Bytes the bytes of the class file we want to compare the receiver to param order Required a boolean indicating whether the members should be sorted or not param excludes Synthetic a boolean indicating whether the synthetic members should be used in the comparison return boolean Returns true is there is a structural change between the two class files false otherwise public boolean has Structural Changes byte new Bytes boolean order Required boolean excludes Synthetic try Class File Reader new Class File new Class File Reader new Bytes this class File Name type level comparison modifiers if this get Modifiers new Class File get Modifiers return true superclass if Char Operation equals this get Superclass Name new Class File get Superclass Name return true interfaces char new Interfaces Names new Class File get Interface Names if this interface Names new Interfaces Names Type Constants No Super Interfaces int new Interfaces Length new Interfaces Names null 0 new Interfaces Names length if new Interfaces Length this interfaces Count return true for int i 0 max this interfaces Count i max i if Char Operation equals this interface Names i new Interfaces Names i return true member types I Binary Nested Type current Member Types this get Member Types I Binary Nested Type other Member Types new Class File get Member Types if current Member Types other Member Types Type Constants No Member Types int current Member Type Length current Member Types null 0 current Member Types length int other Member Type Length other Member Types null 0 other Member Types length if current Member Type Length other Member Type Length return true for int i 0 i current Member Type Length i if Char Operation equals current Member Types i get Name other Member Types i get Name current Member Types i get Modifiers other Member Types i get Modifiers return true fields Field Info other Field Infos Field Info new Class File get Fields int other Field Infos Length other Field Infos null 0 other Field Infos length boolean compare Fields true if this fields Count other Field Infos Length int i 0 for i this fields Count i if has Structural Field Changes this fields i other Field Infos i break if compare Fields i this fields Count order Required excludes Synthetic return true if compare Fields if this fields Count other Field Infos Length excludes Synthetic return true if order Required if this fields Count 0 Arrays sort this fields if other Field Infos Length 0 Arrays sort other Field Infos if excludes Synthetic if has Non Synthetic Field Changes this fields other Field Infos return true else for int i 0 i this fields Count i if has Structural Field Changes this fields i other Field Infos i return true methods Method Info other Method Infos Method Info new Class File get Methods int other Method Infos Length other Method Infos null 0 other Method Infos length boolean compare Methods true if this methods Count other Method Infos Length int i 0 for i this methods Count i if has Structural Method Changes this methods i other Method Infos i break if compare Methods i this methods Count order Required excludes Synthetic return true if compare Methods if this methods Count other Method Infos Length excludes Synthetic return true if order Required if this methods Count 0 Arrays sort this methods if other Method Infos Length 0 Arrays sort other Method Infos if excludes Synthetic if has Non Synthetic Method Changes this methods other Method Infos return true else for int i 0 i this methods Count i if has Structural Method Changes this methods i other Method Infos i return true return false catch Class Format Exception e return true  newBytes orderRequired excludesSynthetic hasStructuralChanges newBytes orderRequired excludesSynthetic ClassFileReader newClassFile ClassFileReader newBytes classFileName getModifiers newClassFile getModifiers CharOperation getSuperclassName newClassFile getSuperclassName newInterfacesNames newClassFile getInterfaceNames interfaceNames newInterfacesNames TypeConstants NoSuperInterfaces newInterfacesLength newInterfacesNames newInterfacesNames newInterfacesLength interfacesCount interfacesCount CharOperation interfaceNames newInterfacesNames IBinaryNestedType currentMemberTypes getMemberTypes IBinaryNestedType otherMemberTypes newClassFile getMemberTypes currentMemberTypes otherMemberTypes TypeConstants NoMemberTypes currentMemberTypeLength currentMemberTypes currentMemberTypes otherMemberTypeLength otherMemberTypes otherMemberTypes currentMemberTypeLength otherMemberTypeLength currentMemberTypeLength CharOperation currentMemberTypes getName otherMemberTypes getName currentMemberTypes getModifiers otherMemberTypes getModifiers FieldInfo otherFieldInfos FieldInfo newClassFile getFields otherFieldInfosLength otherFieldInfos otherFieldInfos compareFields fieldsCount otherFieldInfosLength fieldsCount hasStructuralFieldChanges otherFieldInfos compareFields fieldsCount orderRequired excludesSynthetic compareFields fieldsCount otherFieldInfosLength excludesSynthetic orderRequired fieldsCount otherFieldInfosLength otherFieldInfos excludesSynthetic hasNonSyntheticFieldChanges otherFieldInfos fieldsCount hasStructuralFieldChanges otherFieldInfos MethodInfo otherMethodInfos MethodInfo newClassFile getMethods otherMethodInfosLength otherMethodInfos otherMethodInfos compareMethods methodsCount otherMethodInfosLength methodsCount hasStructuralMethodChanges otherMethodInfos compareMethods methodsCount orderRequired excludesSynthetic compareMethods methodsCount otherMethodInfosLength excludesSynthetic orderRequired methodsCount otherMethodInfosLength otherMethodInfos excludesSynthetic hasNonSyntheticMethodChanges otherMethodInfos methodsCount hasStructuralMethodChanges otherMethodInfos ClassFormatException
private boolean has Non Synthetic Field Changes Field Info current Field Infos Field Info other Field Infos int length1 current Field Infos null 0 current Field Infos length int length2 other Field Infos null 0 other Field Infos length int index1 0 int index2 0 end while index1 length1 index2 length2 while current Field Infos index1 is Synthetic if index1 length1 break end while other Field Infos index2 is Synthetic if index2 length2 break end if has Structural Field Changes current Field Infos index1 other Field Infos index2 return true while index1 length1 if current Field Infos index1 is Synthetic return true while index2 length2 if other Field Infos index2 is Synthetic return true return false  hasNonSyntheticFieldChanges FieldInfo currentFieldInfos FieldInfo otherFieldInfos currentFieldInfos currentFieldInfos otherFieldInfos otherFieldInfos currentFieldInfos isSynthetic otherFieldInfos isSynthetic hasStructuralFieldChanges currentFieldInfos otherFieldInfos currentFieldInfos isSynthetic otherFieldInfos isSynthetic
private boolean has Structural Field Changes Field Info current Field Info Field Info other Field Info if current Field Info get Modifiers other Field Info get Modifiers return true if Char Operation equals current Field Info get Name other Field Info get Name return true if Char Operation equals current Field Info get Type Name other Field Info get Type Name return true if current Field Info has Constant other Field Info has Constant return true if current Field Info has Constant Constant current Constant current Field Info get Constant Constant other Constant other Field Info get Constant if current Constant typeID other Constant typeID return true if current Constant get Class equals other Constant get Class return true switch current Constant typeID case Type Ids T int return current Constant int Value other Constant int Value case Type Ids T byte return current Constant byte Value other Constant byte Value case Type Ids T short return current Constant short Value other Constant short Value case Type Ids T char return current Constant char Value other Constant char Value case Type Ids T long return current Constant long Value other Constant long Value case Type Ids T float return current Constant float Value other Constant float Value case Type Ids T double return current Constant double Value other Constant double Value case Type Ids T boolean return current Constant boolean Value other Constant boolean Value case Type Ids T String return current Constant string Value equals other Constant string Value return false  hasStructuralFieldChanges FieldInfo currentFieldInfo FieldInfo otherFieldInfo currentFieldInfo getModifiers otherFieldInfo getModifiers CharOperation currentFieldInfo getName otherFieldInfo getName CharOperation currentFieldInfo getTypeName otherFieldInfo getTypeName currentFieldInfo hasConstant otherFieldInfo hasConstant currentFieldInfo hasConstant currentConstant currentFieldInfo getConstant otherConstant otherFieldInfo getConstant currentConstant otherConstant currentConstant getClass otherConstant getClass currentConstant TypeIds T_int currentConstant intValue otherConstant intValue TypeIds T_byte currentConstant byteValue otherConstant byteValue TypeIds T_short currentConstant shortValue otherConstant shortValue TypeIds T_char currentConstant charValue otherConstant charValue TypeIds T_long currentConstant longValue otherConstant longValue TypeIds T_float currentConstant floatValue otherConstant floatValue TypeIds T_double currentConstant doubleValue otherConstant doubleValue TypeIds T_boolean currentConstant booleanValue otherConstant booleanValue TypeIds T_String currentConstant stringValue otherConstant stringValue
private boolean has Non Synthetic Method Changes Method Info current Method Infos Method Info other Method Infos int length1 current Method Infos null 0 current Method Infos length int length2 other Method Infos null 0 other Method Infos length int index1 0 int index2 0 Method Info m end while index1 length1 index2 length2 while m current Method Infos index1 is Synthetic m is Clinit if index1 length1 break end while m other Method Infos index2 is Synthetic m is Clinit if index2 length2 break end if has Structural Method Changes current Method Infos index1 other Method Infos index2 return true while index1 length1 if m current Method Infos index1 is Synthetic m is Clinit return true while index2 length2 if m other Method Infos index2 is Synthetic m is Clinit return true return false  hasNonSyntheticMethodChanges MethodInfo currentMethodInfos MethodInfo otherMethodInfos currentMethodInfos currentMethodInfos otherMethodInfos otherMethodInfos MethodInfo currentMethodInfos isSynthetic isClinit otherMethodInfos isSynthetic isClinit hasStructuralMethodChanges currentMethodInfos otherMethodInfos currentMethodInfos isSynthetic isClinit otherMethodInfos isSynthetic isClinit
private boolean has Structural Method Changes Method Info current Method Info Method Info other Method Info if current Method Info get Modifiers other Method Info get Modifiers return true if Char Operation equals current Method Info get Selector other Method Info get Selector return true if Char Operation equals current Method Info get Method Descriptor other Method Info get Method Descriptor return true char current Thrown Exceptions current Method Info get Exception Type Names char other Thrown Exceptions other Method Info get Exception Type Names if current Thrown Exceptions other Thrown Exceptions Type Constants No Exceptions int current Thrown Exceptions Length current Thrown Exceptions null 0 current Thrown Exceptions length int other Thrown Exceptions Length other Thrown Exceptions null 0 other Thrown Exceptions length if current Thrown Exceptions Length other Thrown Exceptions Length return true for int k 0 k current Thrown Exceptions Length k if Char Operation equals current Thrown Exceptions k other Thrown Exceptions k return true return false  hasStructuralMethodChanges MethodInfo currentMethodInfo MethodInfo otherMethodInfo currentMethodInfo getModifiers otherMethodInfo getModifiers CharOperation currentMethodInfo getSelector otherMethodInfo getSelector CharOperation currentMethodInfo getMethodDescriptor otherMethodInfo getMethodDescriptor currentThrownExceptions currentMethodInfo getExceptionTypeNames otherThrownExceptions otherMethodInfo getExceptionTypeNames currentThrownExceptions otherThrownExceptions TypeConstants NoExceptions currentThrownExceptionsLength currentThrownExceptions currentThrownExceptions otherThrownExceptionsLength otherThrownExceptions otherThrownExceptions currentThrownExceptionsLength otherThrownExceptionsLength currentThrownExceptionsLength CharOperation currentThrownExceptions otherThrownExceptions
This method is used to fully initialize the contents of the receiver All methodinfos fields infos will be therefore fully initialized and we can get rid of the bytes private void initialize throws Class Format Exception try for int i 0 max fields Count i max i fields i initialize for int i 0 max methods Count i max i methods i initialize if inner Infos null for int i 0 max inner Infos length i max i inner Infos i initialize this reset catch Runtime Exception e Class Format Exception exception new Class Format Exception e this class File Name throw exception  ClassFormatException fieldsCount methodsCount innerInfos innerInfos innerInfos RuntimeException ClassFormatException ClassFormatException classFileName
protected void reset this constant Pool Offsets null super reset  constantPoolOffsets

byte reference int struct Offset public Class File Struct byte class File Bytes int off reference class File Bytes struct Offset off  structOffset ClassFileStruct classFileBytes classFileBytes structOffset
struct Offset off public Class File Struct byte class File Bytes int off boolean verify Structure reference class File Bytes struct Offset off  structOffset ClassFileStruct classFileBytes verifyStructure classFileBytes structOffset
struct Offset off public double double At int relative Offset return Double long Bits To Double this i8 At relative Offset  structOffset doubleAt relativeOffset longBitsToDouble i8At relativeOffset
return Double long Bits To Double this i8 At relative Offset public float float At int relative Offset return Float int Bits To Float this i4 At relative Offset  longBitsToDouble i8At relativeOffset floatAt relativeOffset intBitsToFloat i4At relativeOffset
return Float int Bits To Float this i4 At relative Offset public int i1 At int relative Offset return reference relative Offset struct Offset  intBitsToFloat i4At relativeOffset i1At relativeOffset relativeOffset structOffset
return reference relative Offset struct Offset public int i2 At int relative Offset int position relative Offset struct Offset return reference position 8 reference position 0xFF  relativeOffset structOffset i2At relativeOffset relativeOffset structOffset
return reference position 8 reference position 0xFF public int i4 At int relative Offset int position relative Offset struct Offset return reference position 0xFF 24 reference position 0xFF 16 reference position 0xFF 8 reference position 0xFF  i4At relativeOffset relativeOffset structOffset
public long i8 At int relative Offset int position relative Offset struct Offset return long reference position 0xFF 56 long reference position 0xFF 48 long reference position 0xFF 40 long reference position 0xFF 32 long reference position 0xFF 24 long reference position 0xFF 16 long reference position 0xFF 8 reference position 0xFF  i8At relativeOffset relativeOffset structOffset
public static String print Type Modifiers int modifiers java io Byte Array Output Stream out new java io Byte Array Output Stream java io Print Writer print new java io Print Writer out if modifiers Acc Public 0 print print public NON NLS 1 if modifiers Acc Private 0 print print private NON NLS 1 if modifiers Acc Final 0 print print final NON NLS 1 if modifiers Acc Super 0 print print super NON NLS 1 if modifiers Acc Interface 0 print print interface NON NLS 1 if modifiers Acc Abstract 0 print print abstract NON NLS 1 print flush return out to String  printTypeModifiers ByteArrayOutputStream ByteArrayOutputStream PrintWriter PrintWriter AccPublic AccPrivate AccFinal AccSuper AccInterface AccAbstract toString
return out to String public int u1 At int relative Offset return reference relative Offset struct Offset 0xFF  toString u1At relativeOffset relativeOffset structOffset
return reference relative Offset struct Offset 0xFF public int u2 At int relative Offset int position relative Offset struct Offset return reference position 0xFF 8 reference position 0xFF  relativeOffset structOffset u2At relativeOffset relativeOffset structOffset
return reference position 0xFF 8 reference position 0xFF public long u4 At int relative Offset int position relative Offset struct Offset return reference position 0xFFL 24 reference position 0xFF 16 reference position 0xFF 8 reference position 0xFF  u4At relativeOffset relativeOffset structOffset
public char utf8 At int relative Offset int bytes Available int length bytes Available char output Buf new char bytes Available int output Pos 0 int read Offset this struct Offset relative Offset while length 0 int x this reference read Offset 0xFF length if 0x80 x 0 if x 0x20 0 length 2 x x 0xF 12 this reference read Offset 0x3F 6 this reference read Offset 0x3F else length x x 0x1F 6 this reference read Offset 0x3F output Buf output Pos char x if output Pos bytes Available System arraycopy output Buf 0 output Buf new char output Pos 0 output Pos return output Buf  utf8At relativeOffset bytesAvailable bytesAvailable outputBuf bytesAvailable outputPos readOffset structOffset relativeOffset readOffset readOffset readOffset readOffset outputBuf outputPos outputPos bytesAvailable outputBuf outputBuf outputPos outputPos outputBuf
protected void reset this reference null 
public char utf8 At int relative Offset int bytes Available boolean test Validity throws Class Format Exception int x y z int length bytes Available char output Buf new char bytes Available int output Pos 0 int read Offset struct Offset relative Offset while length 0 x reference read Offset 0xFF length if 0x80 x 0 if test Validity if 0x40 x 0 throw new Class Format Exception Class Format Exception Err Malformed Utf8 if length 1 throw new Class Format Exception Class Format Exception Err Malformed Utf8 y this reference read Offset 0xFF length if test Validity if y 0xC0 0x80 throw new Class Format Exception Class Format Exception Err Malformed Utf8 if x 0x20 0 if test Validity length 1 throw new Class Format Exception Class Format Exception Err Malformed Utf8 z this reference read Offset 0xFF length if test Validity z 0xC0 0x80 throw new Class Format Exception Class Format Exception Err Malformed Utf8 x x 0x1F 12 y 0x3F 6 z 0x3F if test Validity x 0x0800 throw new Class Format Exception Class Format Exception Err Malformed Utf8 else x x 0x1F 6 y 0x3F if test Validity x 0 x 0x80 throw new Class Format Exception Class Format Exception Err Malformed Utf8 else if test Validity x 0 throw new Class Format Exception Class Format Exception Err Malformed Utf8 output Buf output Pos char x if output Pos bytes Available System arraycopy output Buf 0 output Buf new char output Pos 0 output Pos return output Buf  utf8At relativeOffset bytesAvailable testValidity ClassFormatException bytesAvailable outputBuf bytesAvailable outputPos readOffset structOffset relativeOffset readOffset testValidity ClassFormatException ClassFormatException ErrMalformedUtf8 ClassFormatException ClassFormatException ErrMalformedUtf8 readOffset testValidity ClassFormatException ClassFormatException ErrMalformedUtf8 testValidity ClassFormatException ClassFormatException ErrMalformedUtf8 readOffset testValidity ClassFormatException ClassFormatException ErrMalformedUtf8 testValidity ClassFormatException ClassFormatException ErrMalformedUtf8 testValidity ClassFormatException ClassFormatException ErrMalformedUtf8 testValidity ClassFormatException ClassFormatException ErrMalformedUtf8 outputBuf outputPos outputPos bytesAvailable outputBuf outputBuf outputPos outputPos outputBuf
public static void verify Method Name And Signature char name char signature throws Class Format Exception ensure name is not empty if name length 0 throw new Class Format Exception Class Format Exception Err Invalid Method Name if name begins with the character it must be clinit or init if name 0 if new String name equals clinit new String name equals init NON NLS 2 NON NLS 1 int signature Length signature length if signature Length 2 signature 0 signature signature Length 2 signature signature Length 1 V throw new Class Format Exception Class Format Exception Err Invalid Method Signature else throw new Class Format Exception Class Format Exception Err Invalid Method Name  verifyMethodNameAndSignature ClassFormatException ClassFormatException ClassFormatException ErrInvalidMethodName signatureLength signatureLength signatureLength signatureLength ClassFormatException ClassFormatException ErrInvalidMethodSignature ClassFormatException ClassFormatException ErrInvalidMethodName

private char file Name public Class Format Exception Runtime Exception e char file Name this nested Exception e  fileName ClassFormatException RuntimeException fileName nestedException
this nested Exception e public Class Format Exception int code error Code code  nestedException ClassFormatException errorCode
error Code code public Class Format Exception int code int buf Pos error Code code buffer Position buf Pos  errorCode ClassFormatException bufPos errorCode bufferPosition bufPos
return int public int get Error Code return error Code  getErrorCode errorCode
return int public int get Buffer Position return buffer Position  getBufferPosition bufferPosition
Returns the underlying code Throwable code that caused the failure return the wrappered code Throwable code or code null code if the direct case of the failure was at the Java model layer public Throwable get Exception return this nested Exception  getException nestedException
return this nested Exception public void print Stack Trace print Stack Trace System err  nestedException printStackTrace printStackTrace
Prints this exception s stack trace to the given print stream param output the print stream since 3 0 public void print Stack Trace Print Stream output synchronized output super print Stack Trace output Throwable throwable get Exception if throwable null if this file Name null output print Caused in NON NLS 1 output print this file Name output print by NON NLS 1 else output print Caused by NON NLS 1 throwable print Stack Trace output  printStackTrace PrintStream printStackTrace getException fileName fileName printStackTrace
Prints this exception s stack trace to the given print writer param output the print writer since 3 0 public void print Stack Trace Print Writer output synchronized output super print Stack Trace output Throwable throwable get Exception if throwable null if this file Name null output print Caused in NON NLS 1 output print this file Name output print by NON NLS 1 else output print Caused by NON NLS 1 throwable print Stack Trace output  printStackTrace PrintWriter printStackTrace getException fileName fileName printStackTrace

private Object wrapped Constant Value param class File Bytes byte param offsets int param offset int public Field Info byte class File Bytes int offsets int offset super class File Bytes offset constant Pool Offsets offsets access Flags 1 int attributes Count u2 At 6 int read Offset 8 for int i 0 i attributes Count i read Offset 6 u4 At read Offset 2 attribute Bytes read Offset  wrappedConstantValue classFileBytes FieldInfo classFileBytes classFileBytes constantPoolOffsets accessFlags attributesCount u2At readOffset attributesCount readOffset u4At readOffset attributeBytes readOffset
Return the constant of the field Return org eclipse jdt internal compiler impl Constant NotA Constant if there is none return org eclipse jdt internal compiler impl Constant public Constant get Constant if constant null read constant read Constant Attribute return constant  NotAConstant getConstant readConstantAttribute
Answer an int whose bits are set according the access constants defined by the VM spec Set the Acc Deprecated and Acc Synthetic bits if necessary return int public int get Modifiers if access Flags 1 compute the accessflag Don t forget the deprecated attribute access Flags u2 At 0 read Deprecated And Synthetic Attributes if is Deprecated access Flags Acc Deprecated if is Synthetic access Flags Acc Synthetic return access Flags  AccDeprecated AccSynthetic getModifiers accessFlags accessFlags u2At readDeprecatedAndSyntheticAttributes isDeprecated accessFlags AccDeprecated isSynthetic accessFlags AccSynthetic accessFlags
Answer the name of the field return char public char get Name if name null read the name int utf8 Offset constant Pool Offsets u2 At 2 struct Offset name utf8 At utf8 Offset 3 u2 At utf8 Offset 1 return name  getName utf8Offset constantPoolOffsets u2At structOffset utf8At utf8Offset u2At utf8Offset
Answer the resolved name of the receiver s type in the class file format as specified in section 4 3 2 of the Java 2 VM spec For example java lang String is Ljava lang String an int is I a 2 dimensional array of strings is Ljava lang String an array of floats is F return char public char get Type Name if signature null read the signature int utf8 Offset constant Pool Offsets u2 At 4 struct Offset signature utf8 At utf8 Offset 3 u2 At utf8 Offset 1 return signature  getTypeName utf8Offset constantPoolOffsets u2At structOffset utf8At utf8Offset u2At utf8Offset
Return a wrapper that contains the constant of the field return java lang Object public Object get Wrapped Constant Value if this wrapped Constant Value null if has Constant Constant field Constant get Constant switch field Constant typeID case T int this wrapped Constant Value new Integer field Constant int Value break case T byte this wrapped Constant Value new Byte field Constant byte Value break case T short this wrapped Constant Value new Short field Constant short Value break case T char this wrapped Constant Value new Character field Constant char Value break case T float this wrapped Constant Value new Float field Constant float Value break case T double this wrapped Constant Value new Double field Constant double Value break case T boolean this wrapped Constant Value Util to Boolean field Constant boolean Value break case T long this wrapped Constant Value new Long field Constant long Value break case T String this wrapped Constant Value field Constant string Value return this wrapped Constant Value  getWrappedConstantValue wrappedConstantValue hasConstant fieldConstant getConstant fieldConstant T_int wrappedConstantValue fieldConstant intValue T_byte wrappedConstantValue fieldConstant byteValue T_short wrappedConstantValue fieldConstant shortValue T_char wrappedConstantValue fieldConstant charValue T_float wrappedConstantValue fieldConstant floatValue T_double wrappedConstantValue fieldConstant doubleValue T_boolean wrappedConstantValue toBoolean fieldConstant booleanValue T_long wrappedConstantValue fieldConstant longValue T_String wrappedConstantValue fieldConstant stringValue wrappedConstantValue
Return true if the field has a constant value attribute false otherwise return boolean public boolean has Constant return get Constant Constant NotA Constant  hasConstant getConstant NotAConstant
Return true if the field is a synthetic field false otherwise return boolean public boolean is Synthetic return get Modifiers Acc Synthetic 0  isSynthetic getModifiers AccSynthetic
private void read Constant Attribute int attributes Count u2 At 6 int read Offset 8 boolean is Constant false for int i 0 i attributes Count i int utf8 Offset constant Pool Offsets u2 At read Offset struct Offset char attribute Name utf8 At utf8 Offset 3 u2 At utf8 Offset 1 if Char Operation equals attribute Name Constant Value Name is Constant true read the right constant int relative Offset constant Pool Offsets u2 At read Offset 6 struct Offset switch u1 At relative Offset case Integer Tag char sign get Type Name if sign length 1 switch sign 0 case Z boolean constant constant new Boolean Constant i4 At relative Offset 1 1 break case I integer constant constant new Int Constant i4 At relative Offset 1 break case C char constant constant new Char Constant char i4 At relative Offset 1 break case B byte constant constant new Byte Constant byte i4 At relative Offset 1 break case S short constant constant new Short Constant short i4 At relative Offset 1 break default constant Constant NotA Constant else constant Constant NotA Constant break case Float Tag constant new Float Constant float At relative Offset 1 break case Double Tag constant new Double Constant double At relative Offset 1 break case Long Tag constant new Long Constant i8 At relative Offset 1 break case String Tag utf8 Offset constant Pool Offsets u2 At relative Offset 1 struct Offset constant new String Constant String value Of utf8 At utf8 Offset 3 u2 At utf8 Offset 1 break read Offset 6 u4 At read Offset 2 if is Constant constant Constant NotA Constant  readConstantAttribute attributesCount u2At readOffset isConstant attributesCount utf8Offset constantPoolOffsets u2At readOffset structOffset attributeName utf8At utf8Offset u2At utf8Offset CharOperation attributeName ConstantValueName isConstant relativeOffset constantPoolOffsets u2At readOffset structOffset u1At relativeOffset IntegerTag getTypeName BooleanConstant i4At relativeOffset IntConstant i4At relativeOffset CharConstant i4At relativeOffset ByteConstant i4At relativeOffset ShortConstant i4At relativeOffset NotAConstant NotAConstant FloatTag FloatConstant floatAt relativeOffset DoubleTag DoubleConstant doubleAt relativeOffset LongTag LongConstant i8At relativeOffset StringTag utf8Offset constantPoolOffsets u2At relativeOffset structOffset StringConstant valueOf utf8At utf8Offset u2At utf8Offset readOffset u4At readOffset isConstant NotAConstant
private void read Deprecated And Synthetic Attributes int attributes Count u2 At 6 int read Offset 8 for int i 0 i attributes Count i int utf8 Offset constant Pool Offsets u2 At read Offset struct Offset char attribute Name utf8 At utf8 Offset 3 u2 At utf8 Offset 1 if Char Operation equals attribute Name Deprecated Name is Deprecated true else if Char Operation equals attribute Name Synthetic Name is Synthetic true read Offset 6 u4 At read Offset 2  readDeprecatedAndSyntheticAttributes attributesCount u2At readOffset attributesCount utf8Offset constantPoolOffsets u2At readOffset structOffset attributeName utf8At utf8Offset u2At utf8Offset CharOperation attributeName DeprecatedName isDeprecated CharOperation attributeName SyntheticName isSynthetic readOffset u4At readOffset
Answer the size of the receiver in bytes return int public int size In Bytes return attribute Bytes  sizeInBytes attributeBytes
return attribute Bytes public void throw Format Exception throws Class Format Exception throw new Class Format Exception Class Format Exception Err Bad Field Info  attributeBytes throwFormatException ClassFormatException ClassFormatException ClassFormatException ErrBadFieldInfo
public String to String String Buffer buffer new String Buffer this get Class get Name int modifiers get Modifiers return buffer append NON NLS 1 append modifiers Acc Deprecated 0 deprecated NON NLS 1 NON NLS 2 modifiers 0x0001 1 public NON NLS 1 NON NLS 2 modifiers 0x0002 0x0002 private NON NLS 1 NON NLS 2 modifiers 0x0004 0x0004 protected NON NLS 1 NON NLS 2 modifiers 0x0008 0x000008 static NON NLS 1 NON NLS 2 modifiers 0x0010 0x0010 final NON NLS 1 NON NLS 2 modifiers 0x0040 0x0040 volatile NON NLS 1 NON NLS 2 modifiers 0x0080 0x0080 transient NON NLS 1 NON NLS 2 append get Type Name append NON NLS 1 append get Name append NON NLS 1 append get Constant append NON NLS 1 to String  toString StringBuffer StringBuffer getClass getName getModifiers AccDeprecated getTypeName getName getConstant toString
public int compare To Object o if o instanceof Field Info throw new Class Cast Exception return new String this get Name compare To new String Field Info o get Name  compareTo FieldInfo ClassCastException getName compareTo FieldInfo getName
This method is used to fully initialize the contents of the receiver All methodinfos fields infos will be therefore fully initialized and we can get rid of the bytes void initialize get Modifiers get Name get Constant get Type Name reset  getModifiers getName getConstant getTypeName
reset protected void reset this constant Pool Offsets null super reset  constantPoolOffsets

private boolean read Inner Name false public Inner Class Info byte class File Bytes int offsets int offset super class File Bytes offset constant Pool Offsets offsets inner Class Name Index u2 At 0 outer Class Name Index u2 At 2 this inner Name Index u2 At 4  readInnerName InnerClassInfo classFileBytes classFileBytes constantPoolOffsets innerClassNameIndex u2At outerClassNameIndex u2At innerNameIndex u2At
Answer the resolved name of the enclosing type in the class file format as specified in section 4 2 of the Java 2 VM spec For example java lang String is java lang String return char public char get Enclosing Type Name if read Outer Class Name read outer class name read Outer Class Name true if outer Class Name Index 0 int utf8 Offset constant Pool Offsets u2 At constant Pool Offsets outer Class Name Index struct Offset 1 struct Offset outer Class Name utf8 At utf8 Offset 3 u2 At utf8 Offset 1 return outer Class Name  getEnclosingTypeName readOuterClassName readOuterClassName outerClassNameIndex utf8Offset constantPoolOffsets u2At constantPoolOffsets outerClassNameIndex structOffset structOffset outerClassName utf8At utf8Offset u2At utf8Offset outerClassName
Answer an int whose bits are set according the access constants defined by the VM spec return int public int get Modifiers if access Flags 1 read access flag access Flags u2 At 6 return access Flags  getModifiers accessFlags accessFlags u2At accessFlags
Answer the resolved name of the member type in the class file format as specified in section 4 2 of the Java 2 VM spec For example p1 p2 A M is p1 p2 A M return char public char get Name if read Inner Class Name read the inner class name read Inner Class Name true if inner Class Name Index 0 int class Offset constant Pool Offsets inner Class Name Index struct Offset int utf8 Offset constant Pool Offsets u2 At class Offset 1 struct Offset inner Class Name utf8 At utf8 Offset 3 u2 At utf8 Offset 1 return inner Class Name  getName readInnerClassName readInnerClassName innerClassNameIndex classOffset constantPoolOffsets innerClassNameIndex structOffset utf8Offset constantPoolOffsets u2At classOffset structOffset innerClassName utf8At utf8Offset u2At utf8Offset innerClassName
Answer the source name of the member type For example p1 p2 A M is M return char public char get Source Name if this read Inner Name this read Inner Name true if inner Name Index 0 int utf8 Offset constant Pool Offsets inner Name Index struct Offset inner Name utf8 At utf8 Offset 3 u2 At utf8 Offset 1 return inner Name  getSourceName readInnerName readInnerName innerNameIndex utf8Offset constantPoolOffsets innerNameIndex structOffset innerName utf8At utf8Offset u2At utf8Offset innerName
Answer the string representation of the receiver return java lang String public String to String String Buffer buffer new String Buffer if get Name null buffer append get Name buffer append n NON NLS 1 if get Enclosing Type Name null buffer append get Enclosing Type Name buffer append n NON NLS 1 if get Source Name null buffer append get Source Name return buffer to String  toString StringBuffer StringBuffer getName getName getEnclosingTypeName getEnclosingTypeName getSourceName getSourceName toString
This method is used to fully initialize the contents of the receiver All methodinfos fields infos will be therefore fully initialized and we can get rid of the bytes void initialize get Modifiers get Name get Source Name get Enclosing Type Name reset  getModifiers getName getSourceName getEnclosingTypeName
reset protected void reset this constant Pool Offsets null super reset  constantPoolOffsets

static private final char no Exception Char Operation NO CHAR CHAR param class File Bytes byte param offsets int param offset int public Method Info byte class File Bytes int offsets int offset super class File Bytes offset constant Pool Offsets offsets access Flags 1 int attributes Count u2 At 6 int read Offset 8 for int i 0 i attributes Count i read Offset 6 u4 At read Offset 2 attribute Bytes read Offset  noException CharOperation NO_CHAR_CHAR classFileBytes MethodInfo classFileBytes classFileBytes constantPoolOffsets accessFlags attributesCount u2At readOffset attributesCount readOffset u4At readOffset attributeBytes readOffset
see org eclipse jdt internal compiler env I Generic Method get Argument Names public char get Argument Names return null  IGenericMethod getArgumentNames getArgumentNames
Answer the resolved names of the exception types in the class file format as specified in section 4 2 of the Java 2 VM spec or null if the array is empty For example java lang String is java lang String return char public char get Exception Type Names if exception Names null read Exception Attributes return exception Names  getExceptionTypeNames exceptionNames readExceptionAttributes exceptionNames
Answer the receiver s method descriptor which describes the parameter return types as specified in section 4 3 3 of the Java 2 VM spec For example int foo String is Ljava lang String I void foo Object is I Ljava lang Object return char public char get Method Descriptor if signature null read the name int utf8 Offset constant Pool Offsets u2 At 4 struct Offset signature utf8 At utf8 Offset 3 u2 At utf8 Offset 1 return signature  getMethodDescriptor utf8Offset constantPoolOffsets u2At structOffset utf8At utf8Offset u2At utf8Offset
Answer an int whose bits are set according the access constants defined by the VM spec Set the Acc Deprecated and Acc Synthetic bits if necessary return int public int get Modifiers if access Flags 1 compute the accessflag Don t forget the deprecated attribute access Flags u2 At 0 read Deprecated And Synthetic Attributes if is Deprecated access Flags Acc Deprecated if is Synthetic access Flags Acc Synthetic return access Flags  AccDeprecated AccSynthetic getModifiers accessFlags accessFlags u2At readDeprecatedAndSyntheticAttributes isDeprecated accessFlags AccDeprecated isSynthetic accessFlags AccSynthetic accessFlags
Answer the name of the method For a constructor answer init clinit for a clinit method return char public char get Selector if name null read the name int utf8 Offset constant Pool Offsets u2 At 2 struct Offset name utf8 At utf8 Offset 3 u2 At utf8 Offset 1 return name  getSelector utf8Offset constantPoolOffsets u2At structOffset utf8At utf8Offset u2At utf8Offset
Answer true if the method is a class initializer false otherwise return boolean public boolean is Clinit char selector get Selector return selector 0 selector length 8 Can only match clinit  isClinit getSelector
Answer true if the method is a constructor false otherwise return boolean public boolean is Constructor char selector get Selector return selector 0 selector length 6 Can only match init  isConstructor getSelector
Return true if the field is a synthetic method false otherwise return boolean public boolean is Synthetic return get Modifiers Acc Synthetic 0  isSynthetic getModifiers AccSynthetic
private void read Deprecated And Synthetic Attributes int attributes Count u2 At 6 int read Offset 8 for int i 0 i attributes Count i int utf8 Offset constant Pool Offsets u2 At read Offset struct Offset char attribute Name utf8 At utf8 Offset 3 u2 At utf8 Offset 1 if Char Operation equals attribute Name Deprecated Name is Deprecated true else if Char Operation equals attribute Name Synthetic Name is Synthetic true read Offset 6 u4 At read Offset 2  readDeprecatedAndSyntheticAttributes attributesCount u2At readOffset attributesCount utf8Offset constantPoolOffsets u2At readOffset structOffset attributeName utf8At utf8Offset u2At utf8Offset CharOperation attributeName DeprecatedName isDeprecated CharOperation attributeName SyntheticName isSynthetic readOffset u4At readOffset
private void read Exception Attributes int attributes Count u2 At 6 int read Offset 8 for int i 0 i attributes Count i int utf8 Offset constant Pool Offsets u2 At read Offset struct Offset char attribute Name utf8 At utf8 Offset 3 u2 At utf8 Offset 1 if Char Operation equals attribute Name Exceptions Name read the number of exception entries int entries Number u2 At read Offset 6 place the read Offset at the beginning of the exceptions table read Offset 8 if entries Number 0 exception Names no Exception else exception Names new char entries Number for int j 0 j entries Number j utf8 Offset constant Pool Offsets u2 At constant Pool Offsets u2 At read Offset struct Offset 1 struct Offset exception Names j utf8 At utf8 Offset 3 u2 At utf8 Offset 1 read Offset 2 else read Offset 6 u4 At read Offset 2 if exception Names null exception Names no Exception  readExceptionAttributes attributesCount u2At readOffset attributesCount utf8Offset constantPoolOffsets u2At readOffset structOffset attributeName utf8At utf8Offset u2At utf8Offset CharOperation attributeName ExceptionsName entriesNumber u2At readOffset readOffset readOffset entriesNumber exceptionNames noException exceptionNames entriesNumber entriesNumber utf8Offset constantPoolOffsets u2At constantPoolOffsets u2At readOffset structOffset structOffset exceptionNames utf8At utf8Offset u2At utf8Offset readOffset readOffset u4At readOffset exceptionNames exceptionNames noException
Answer the size of the receiver in bytes return int public int size In Bytes return attribute Bytes  sizeInBytes attributeBytes
public String to String int modifiers get Modifiers String Buffer buffer new String Buffer this get Class get Name return buffer append NON NLS 1 append modifiers Acc Deprecated 0 deprecated NON NLS 1 NON NLS 2 modifiers 0x0001 1 public NON NLS 1 NON NLS 2 modifiers 0x0002 0x0002 private NON NLS 1 NON NLS 2 modifiers 0x0004 0x0004 protected NON NLS 1 NON NLS 2 modifiers 0x0008 0x000008 static NON NLS 1 NON NLS 2 modifiers 0x0010 0x0010 final NON NLS 1 NON NLS 2 modifiers 0x0040 0x0040 volatile NON NLS 1 NON NLS 2 modifiers 0x0080 0x0080 transient NON NLS 1 NON NLS 2 append get Selector append get Method Descriptor append NON NLS 1 to String  toString getModifiers StringBuffer StringBuffer getClass getName AccDeprecated getSelector getMethodDescriptor toString
public int compare To Object o if o instanceof Method Info throw new Class Cast Exception Method Info other Method Method Info o int result new String this get Selector compare To new String other Method get Selector if result 0 return result return new String this get Method Descriptor compare To new String other Method get Method Descriptor  compareTo MethodInfo ClassCastException MethodInfo otherMethod MethodInfo getSelector compareTo otherMethod getSelector getMethodDescriptor compareTo otherMethod getMethodDescriptor
This method is used to fully initialize the contents of the receiver All methodinfos fields infos will be therefore fully initialized and we can get rid of the bytes void initialize get Modifiers get Selector get Method Descriptor get Exception Type Names reset  getModifiers getSelector getMethodDescriptor getExceptionTypeNames
reset protected void reset this constant Pool Offsets null super reset  constantPoolOffsets

public int backwards Branch POS NOT SET Case Label constructor comment param code Stream org eclipse jdt internal compiler codegen Code Stream public Case Label Code Stream code Stream super code Stream  backwardsBranch POS_NOT_SET CaseLabel codeStream CodeStream CaseLabel CodeStream codeStream codeStream
void branch if position POS NOT SET add Forward Reference code Stream position Leave 4 bytes free to generate the jump offset afterwards code Stream position 4 code Stream class File Offset 4 else Position is set Write it code Stream write Signed Word position code Stream position 1  POS_NOT_SET addForwardReference codeStream codeStream codeStream classFileOffset codeStream writeSignedWord codeStream
void branch Wide if position POS NOT SET add Forward Reference code Stream position Leave 4 bytes free to generate the jump offset afterwards code Stream position 4 else Position is set Write it code Stream write Signed Word position code Stream position 1  branchWide POS_NOT_SET addForwardReference codeStream codeStream codeStream writeSignedWord codeStream
public boolean is Standard Label return false  isStandardLabel
public void place position code Stream position if instruction Position POS NOT SET backwards Branch position else int offset position instruction Position for int i 0 i forward Reference Count i code Stream write Signed Word forward References i offset add the label int the code Stream labels collection code Stream add Label this  codeStream instructionPosition POS_NOT_SET backwardsBranch instructionPosition forwardReferenceCount codeStream writeSignedWord forwardReferences codeStream codeStream addLabel
void place Instruction if instruction Position POS NOT SET instruction Position code Stream position if backwards Branch POS NOT SET int offset backwards Branch instruction Position for int i 0 i forward Reference Count i code Stream write Signed Word forward References i offset backwards Branch POS NOT SET  placeInstruction instructionPosition POS_NOT_SET instructionPosition codeStream backwardsBranch POS_NOT_SET backwardsBranch instructionPosition forwardReferenceCount codeStream writeSignedWord forwardReferences backwardsBranch POS_NOT_SET

int threshold Constructs a new empty hashtable A default capacity is used Note that the hashtable will automatically grow when it gets full public Char Array Cache this 13  CharArrayCache
Constructs a new empty hashtable with the specified initial capacity param initial Capacity int the initial number of buckets public Char Array Cache int initial Capacity this element Size 0 this threshold int initial Capacity 0 66f this key Table new char initial Capacity this value Table new int initial Capacity  initialCapacity CharArrayCache initialCapacity elementSize initialCapacity keyTable initialCapacity valueTable initialCapacity
Clears the hash table so that it has no more elements in it public void clear for int i key Table length i 0 key Table i null value Table i 0 element Size 0  keyTable keyTable valueTable elementSize
Returns true if the collection contains an element for the key param key char the key that we are looking for return boolean public boolean contains Key char key int index hash Code Char key while key Table index null if Char Operation equals key Table index key return true index index 1 key Table length return false  containsKey hashCodeChar keyTable CharOperation keyTable keyTable
Gets the object associated with the specified key in the hashtable param key CODE char CODE the specified key return int the element for the key or 1 if the key is not defined in the hash table public int get char key int index hash Code Char key while key Table index null if Char Operation equals key Table index key return value Table index index index 1 key Table length return 1  hashCodeChar keyTable CharOperation keyTable valueTable keyTable
private int hash Code Char char val int length val length int hash 0 int n 2 number of characters skipped for int i 0 i length i n hash val i return hash 0x7FFFFFFF key Table length  hashCodeChar keyTable
Puts the specified element into the hashtable using the specified key The element may be retrieved by doing a get with the same key The key and the element cannot be null param key CODE Object CODE the specified key in the hashtable param value CODE int CODE the specified element return int the old value of the key or 1 if it did not have one public int put char key int value int index hash Code Char key while key Table index null if Char Operation equals key Table index key return value Table index value index index 1 key Table length key Table index key value Table index value assumes the threshold is never equal to the size of the table if element Size threshold rehash return value  hashCodeChar keyTable CharOperation keyTable valueTable keyTable keyTable valueTable elementSize
Rehashes the content of the table into a bigger table This method is called automatically when the hashtable s size exceeds the threshold private void rehash Char Array Cache new Hashtable new Char Array Cache key Table length 2 for int i key Table length i 0 if key Table i null new Hashtable put key Table i value Table i this key Table new Hashtable key Table this value Table new Hashtable value Table this threshold new Hashtable threshold  CharArrayCache newHashtable CharArrayCache keyTable keyTable keyTable newHashtable keyTable valueTable keyTable newHashtable keyTable valueTable newHashtable valueTable newHashtable
Remove the object associated with the specified key in the hashtable param key CODE char CODE the specified key public void remove char key int index hash Code Char key while key Table index null if Char Operation equals key Table index key value Table index 0 key Table index null return index index 1 key Table length  hashCodeChar keyTable CharOperation keyTable valueTable keyTable keyTable
Returns the key corresponding to the value Returns null if the receiver doesn t contain the value param value int the value that we are looking for return Object public char return Key For int value for int i key Table length i 0 if value Table i value return key Table i return null  returnKeyFor keyTable valueTable keyTable
Returns the number of elements contained in the hashtable return CODE int CODE The size of the table public int size return element Size  elementSize
Converts to a rather lengthy String return String the ascii representation of the receiver public String to String int max size String Buffer buf new String Buffer buf append NON NLS 1 for int i 0 i max i if key Table i null buf append key Table i append append value Table i NON NLS 1 if i max buf append NON NLS 1 buf append NON NLS 1 return buf to String  toString StringBuffer StringBuffer keyTable keyTable valueTable toString

public Code Stream Class File class File generate Line Number Attributes class File produce Debug Attributes Compiler Options Lines 0 generate Local Variable Table Attributes class File produce Debug Attributes Compiler Options Vars 0 if generate Line Number Attributes line Separator Positions class File reference Binding scope reference Compilation Unit compilation Result line Separator Positions  CodeStream ClassFile classFile generateLineNumberAttributes classFile produceDebugAttributes CompilerOptions generateLocalVariableTableAttributes classFile produceDebugAttributes CompilerOptions generateLineNumberAttributes lineSeparatorPositions classFile referenceBinding referenceCompilationUnit compilationResult lineSeparatorPositions
final public void aaload if DEBUG System out println position t taaload NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC aaload  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_aaload
final public void aastore if DEBUG System out println position t taastore NON NLS 1 count Labels 0 stack Depth 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC aastore  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_aastore
final public void aconst null if DEBUG System out println position t taconst null NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC aconst null  aconst_null taconst_null countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_aconst_null
public final void add Definitely Assigned Variables Scope scope int init State Index Required to fix 1PR0XVS LFRE WINNT Compiler variable table for method appears incorrect if generate Local Variable Table Attributes return if init State Index last Init State Index When Adding Inits return last Init State Index When Adding Inits init State Index if last Init State Index When Removing Inits init State Index last Init State Index When Removing Inits 2 reinitialize remove index remove 1 add 1 remove 1 ignore second remove remove 1 add 2 remove 1 perform second remove for int i 0 i visible Locals Count i Local Variable Binding local Binding visible Locals i if local Binding null Check if the local is definitely assigned if init State Index 1 is Definitely Assigned scope init State Index local Binding if local Binding initialization Count 0 local Binding initializationP Cs local Binding initialization Count 1 1 1 1 There are two cases 1 there is no initialization interval opened add an opened interval 2 there is already some initialization intervals but the last one is closed add an opened interval An opened interval means that the value at local Binding initializationP Cs local Binding initialization Count 1 1 is equals to 1 initializationP Cs is a collection of pairs of int first value is the startPC and second value is the endPC 1 one for the last value means that the interval is not closed yet local Binding record Initialization StartPC position  addDefinitelyAssignedVariables initStateIndex generateLocalVariableTableAttributes initStateIndex lastInitStateIndexWhenAddingInits lastInitStateIndexWhenAddingInits initStateIndex lastInitStateIndexWhenRemovingInits initStateIndex lastInitStateIndexWhenRemovingInits visibleLocalsCount LocalVariableBinding localBinding visibleLocals localBinding initStateIndex isDefinitelyAssigned initStateIndex localBinding localBinding initializationCount localBinding initializationPCs localBinding initializationCount localBinding initializationPCs localBinding initializationCount initializationPCs localBinding recordInitializationStartPC
public void add Label Label a Label if count Labels labels length System arraycopy labels 0 labels new Label count Labels LABELS INCREMENT 0 count Labels labels count Labels a Label  addLabel aLabel countLabels countLabels LABELS_INCREMENT countLabels countLabels aLabel
public void add Visible Local Variable Local Variable Binding local Binding if generate Local Variable Table Attributes return if visible Locals Count visible Locals length System arraycopy visible Locals 0 visible Locals new Local Variable Binding visible Locals Count 2 0 visible Locals Count visible Locals visible Locals Count local Binding  addVisibleLocalVariable LocalVariableBinding localBinding generateLocalVariableTableAttributes visibleLocalsCount visibleLocals visibleLocals visibleLocals LocalVariableBinding visibleLocalsCount visibleLocalsCount visibleLocals visibleLocalsCount localBinding
final public void aload int i Arg if DEBUG System out println position t taload i Arg NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if max Locals i Arg max Locals i Arg 1 if i Arg 255 Widen if class File Offset 3 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC wide b Code Stream class File Offset OPC aload write Unsigned Short i Arg else Don t need to use the wide bytecode if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC aload b Code Stream class File Offset byte i Arg  iArg iArg countLabels stackDepth stackDepth stackMax stackMax stackDepth maxLocals iArg maxLocals iArg iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_wide bCodeStream classFileOffset OPC_aload writeUnsignedShort iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_aload bCodeStream classFileOffset iArg
final public void aload 0 if DEBUG System out println position t taload 0 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if max Locals 0 max Locals 1 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC aload 0  aload_0 taload_0 countLabels stackDepth stackDepth stackMax stackMax stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_aload_0
final public void aload 1 if DEBUG System out println position t taload 1 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if max Locals 1 max Locals 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC aload 1  aload_1 taload_1 countLabels stackDepth stackDepth stackMax stackMax stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_aload_1
final public void aload 2 if DEBUG System out println position t taload 2 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if max Locals 2 max Locals 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC aload 2  aload_2 taload_2 countLabels stackDepth stackDepth stackMax stackMax stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_aload_2
final public void aload 3 if DEBUG System out println position t taload 3 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if max Locals 3 max Locals 4 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC aload 3  aload_3 taload_3 countLabels stackDepth stackDepth stackMax stackMax stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_aload_3
public final void anewarray Type Binding type Binding if DEBUG System out println position t tanewarray type Binding NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC anewarray write Unsigned Short constant Pool literal Index type Binding  TypeBinding typeBinding typeBinding countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_anewarray writeUnsignedShort constantPool literalIndex typeBinding
final public void areturn if DEBUG System out println position t tareturn NON NLS 1 count Labels 0 stack Depth the stack Depth should be equal to 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC areturn  countLabels stackDepth stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_areturn
public void array At int type BindingID switch type BindingID case T int this iaload break case T byte case T boolean this baload break case T short this saload break case T char this caload break case T long this laload break case T float this faload break case T double this daload break default this aaload  arrayAt typeBindingID typeBindingID T_int T_byte T_boolean T_short T_char T_long T_float T_double
public void array At Put int element TypeID boolean value Required switch element TypeID case T int if value Required dup x2 iastore break case T byte case T boolean if value Required dup x2 bastore break case T short if value Required dup x2 sastore break case T char if value Required dup x2 castore break case T long if value Required dup2 x2 lastore break case T float if value Required dup x2 fastore break case T double if value Required dup2 x2 dastore break default if value Required dup x2 aastore  arrayAtPut elementTypeID valueRequired elementTypeID T_int valueRequired dup_x2 T_byte T_boolean valueRequired dup_x2 T_short valueRequired dup_x2 T_char valueRequired dup_x2 T_long valueRequired dup2_x2 T_float valueRequired dup_x2 T_double valueRequired dup2_x2 valueRequired dup_x2
final public void arraylength if DEBUG System out println position t tarraylength NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC arraylength  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_arraylength
final public void astore int i Arg if DEBUG System out println position t tastore i Arg NON NLS 1 count Labels 0 stack Depth if max Locals i Arg max Locals i Arg 1 if i Arg 255 Widen if class File Offset 3 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC wide b Code Stream class File Offset OPC astore write Unsigned Short i Arg else if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC astore b Code Stream class File Offset byte i Arg  iArg iArg countLabels stackDepth maxLocals iArg maxLocals iArg iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_wide bCodeStream classFileOffset OPC_astore writeUnsignedShort iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_astore bCodeStream classFileOffset iArg
final public void astore 0 if DEBUG System out println position t tastore 0 NON NLS 1 count Labels 0 stack Depth if max Locals 0 max Locals 1 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC astore 0  astore_0 tastore_0 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_astore_0
final public void astore 1 if DEBUG System out println position t tastore 1 NON NLS 1 count Labels 0 stack Depth if max Locals 1 max Locals 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC astore 1  astore_1 tastore_1 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_astore_1
final public void astore 2 if DEBUG System out println position t tastore 2 NON NLS 1 count Labels 0 stack Depth if max Locals 2 max Locals 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC astore 2  astore_2 tastore_2 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_astore_2
final public void astore 3 if DEBUG System out println position t tastore 3 NON NLS 1 count Labels 0 stack Depth if max Locals 3 max Locals 4 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC astore 3  astore_3 tastore_3 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_astore_3
final public void athrow if DEBUG System out println position t tathrow NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC athrow  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_athrow
final public void baload if DEBUG System out println position t tbaload NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC baload  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_baload
final public void bastore if DEBUG System out println position t tbastore NON NLS 1 count Labels 0 stack Depth 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC bastore  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_bastore
final public void bipush byte b if DEBUG System out println position t tbipush b NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC bipush b Code Stream class File Offset b  countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_bipush bCodeStream classFileOffset
final public void caload if DEBUG System out println position t tcaload NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC caload  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_caload
final public void castore if DEBUG System out println position t tcastore NON NLS 1 count Labels 0 stack Depth 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC castore  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_castore
public final void checkcast Type Binding type Binding if DEBUG System out println position t tcheckcast type Binding NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC checkcast write Unsigned Short constant Pool literal Index type Binding  TypeBinding typeBinding typeBinding countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_checkcast writeUnsignedShort constantPool literalIndex typeBinding
final public void d2f if DEBUG System out println position t td2f NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC d2f  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_d2f
final public void d2i if DEBUG System out println position t td2i NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC d2i  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_d2i
final public void d2l if DEBUG System out println position t td2l NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC d2l  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_d2l
final public void dadd if DEBUG System out println position t tdadd NON NLS 1 count Labels 0 stack Depth 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dadd  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dadd
final public void daload if DEBUG System out println position t tdaload NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC daload  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_daload
final public void dastore if DEBUG System out println position t tdastore NON NLS 1 count Labels 0 stack Depth 4 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dastore  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dastore
final public void dcmpg if DEBUG System out println position t tdcmpg NON NLS 1 count Labels 0 stack Depth 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dcmpg  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dcmpg
final public void dcmpl if DEBUG System out println position t tdcmpl NON NLS 1 count Labels 0 stack Depth 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dcmpl  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dcmpl
final public void dconst 0 if DEBUG System out println position t tdconst 0 NON NLS 1 count Labels 0 stack Depth 2 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dconst 0  dconst_0 tdconst_0 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dconst_0
final public void dconst 1 if DEBUG System out println position t tdconst 1 NON NLS 1 count Labels 0 stack Depth 2 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dconst 1  dconst_1 tdconst_1 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dconst_1
final public void ddiv if DEBUG System out println position t tddiv NON NLS 1 count Labels 0 stack Depth 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ddiv  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ddiv
b Code Stream class File Offset OPC ddiv public void decr Stack Size int offset stack Depth offset  bCodeStream classFileOffset OPC_ddiv decrStackSize stackDepth
final public void dload int i Arg if DEBUG System out println position t tdload i Arg NON NLS 1 count Labels 0 stack Depth 2 if stack Depth stack Max stack Max stack Depth if max Locals i Arg 2 max Locals i Arg 2 2 because it is a double if i Arg 255 Widen if class File Offset 3 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC wide b Code Stream class File Offset OPC dload write Unsigned Short i Arg else Don t need to use the wide bytecode if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC dload b Code Stream class File Offset byte i Arg  iArg iArg countLabels stackDepth stackDepth stackMax stackMax stackDepth maxLocals iArg maxLocals iArg iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_wide bCodeStream classFileOffset OPC_dload writeUnsignedShort iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dload bCodeStream classFileOffset iArg
final public void dload 0 if DEBUG System out println position t tdload 0 NON NLS 1 count Labels 0 stack Depth 2 if stack Depth stack Max stack Max stack Depth if max Locals 2 max Locals 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dload 0  dload_0 tdload_0 countLabels stackDepth stackDepth stackMax stackMax stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dload_0
final public void dload 1 if DEBUG System out println position t tdload 1 NON NLS 1 count Labels 0 stack Depth 2 if stack Depth stack Max stack Max stack Depth if max Locals 3 max Locals 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dload 1  dload_1 tdload_1 countLabels stackDepth stackDepth stackMax stackMax stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dload_1
final public void dload 2 if DEBUG System out println position t tdload 2 NON NLS 1 count Labels 0 stack Depth 2 if stack Depth stack Max stack Max stack Depth if max Locals 4 max Locals 4 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dload 2  dload_2 tdload_2 countLabels stackDepth stackDepth stackMax stackMax stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dload_2
final public void dload 3 if DEBUG System out println position t tdload 3 NON NLS 1 count Labels 0 stack Depth 2 if stack Depth stack Max stack Max stack Depth if max Locals 5 max Locals 5 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dload 3  dload_3 tdload_3 countLabels stackDepth stackDepth stackMax stackMax stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dload_3
final public void dmul if DEBUG System out println position t tdmul NON NLS 1 count Labels 0 stack Depth 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dmul  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dmul
final public void dneg if DEBUG System out println position t tdneg NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dneg  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dneg
final public void drem if DEBUG System out println position t tdrem NON NLS 1 count Labels 0 stack Depth 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC drem  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_drem
final public void dreturn if DEBUG System out println position t tdreturn NON NLS 1 count Labels 0 stack Depth 2 the stack Depth should be equal to 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dreturn  countLabels stackDepth stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dreturn
final public void dstore int i Arg if DEBUG System out println position t tdstore i Arg NON NLS 1 count Labels 0 stack Depth 2 if max Locals i Arg 1 max Locals i Arg 2 if i Arg 255 Widen if class File Offset 3 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC wide b Code Stream class File Offset OPC dstore write Unsigned Short i Arg else if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC dstore b Code Stream class File Offset byte i Arg  iArg iArg countLabels stackDepth maxLocals iArg maxLocals iArg iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_wide bCodeStream classFileOffset OPC_dstore writeUnsignedShort iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dstore bCodeStream classFileOffset iArg
final public void dstore 0 if DEBUG System out println position t tdstore 0 NON NLS 1 count Labels 0 stack Depth 2 if max Locals 2 max Locals 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dstore 0  dstore_0 tdstore_0 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dstore_0
final public void dstore 1 if DEBUG System out println position t tdstore 1 NON NLS 1 count Labels 0 stack Depth 2 if max Locals 3 max Locals 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dstore 1  dstore_1 tdstore_1 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dstore_1
final public void dstore 2 if DEBUG System out println position t tdstore 2 NON NLS 1 count Labels 0 stack Depth 2 if max Locals 4 max Locals 4 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dstore 2  dstore_2 tdstore_2 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dstore_2
final public void dstore 3 if DEBUG System out println position t tdstore 3 NON NLS 1 count Labels 0 stack Depth 2 if max Locals 5 max Locals 5 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dstore 3  dstore_3 tdstore_3 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dstore_3
final public void dsub if DEBUG System out println position t tdsub NON NLS 1 count Labels 0 stack Depth 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dsub  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dsub
final public void dup if DEBUG System out println position t tdup NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dup  countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dup
final public void dup x1 if DEBUG System out println position t tdup x1 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dup x1  dup_x1 tdup_x1 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dup_x1
final public void dup x2 if DEBUG System out println position t tdup x2 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dup x2  dup_x2 tdup_x2 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dup_x2
final public void dup2 if DEBUG System out println position t tdup2 NON NLS 1 count Labels 0 stack Depth 2 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dup2  countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dup2
final public void dup2 x1 if DEBUG System out println position t tdup2 x1 NON NLS 1 count Labels 0 stack Depth 2 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dup2 x1  dup2_x1 tdup2_x1 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dup2_x1
final public void dup2 x2 if DEBUG System out println position t tdup2 x2 NON NLS 1 count Labels 0 stack Depth 2 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC dup2 x2  dup2_x2 tdup2_x2 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_dup2_x2
public void exit User Scope Block Scope block Scope mark all the scope s locals as loosing their definite assignment if generate Local Variable Table Attributes return for int i 0 i visible Locals Count i Local Variable Binding visible Local visible Locals i if visible Local null visible Local declaring Scope block Scope there maybe some some preserved locals never initialized if visible Local initialization Count 0 visible Locals i record Initialization EndPC position visible Locals i null this variable is no longer visible afterwards  exitUserScope BlockScope blockScope generateLocalVariableTableAttributes visibleLocalsCount LocalVariableBinding visibleLocal visibleLocals visibleLocal visibleLocal declaringScope blockScope visibleLocal initializationCount visibleLocals recordInitializationEndPC visibleLocals
final public void f2d if DEBUG System out println position t tf2d NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC f2d  countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_f2d
final public void f2i if DEBUG System out println position t tf2i NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC f2i  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_f2i
final public void f2l if DEBUG System out println position t tf2l NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC f2l  countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_f2l
final public void fadd if DEBUG System out println position t tfadd NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fadd  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fadd
final public void faload if DEBUG System out println position t tfaload NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC faload  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_faload
final public void fastore if DEBUG System out println position t tfaload NON NLS 1 count Labels 0 stack Depth 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fastore  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fastore
final public void fcmpg if DEBUG System out println position t tfcmpg NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fcmpg  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fcmpg
final public void fcmpl if DEBUG System out println position t tfcmpl NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fcmpl  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fcmpl
final public void fconst 0 if DEBUG System out println position t tfconst 0 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fconst 0  fconst_0 tfconst_0 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fconst_0
final public void fconst 1 if DEBUG System out println position t tfconst 1 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fconst 1  fconst_1 tfconst_1 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fconst_1
final public void fconst 2 if DEBUG System out println position t tfconst 2 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fconst 2  fconst_2 tfconst_2 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fconst_2
final public void fdiv if DEBUG System out println position t tfdiv NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fdiv  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fdiv
final public void fload int i Arg if DEBUG System out println position t tfload i Arg NON NLS 1 count Labels 0 stack Depth if max Locals i Arg max Locals i Arg 1 if stack Depth stack Max stack Max stack Depth if i Arg 255 Widen if class File Offset 3 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC wide b Code Stream class File Offset OPC fload write Unsigned Short i Arg else if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC fload b Code Stream class File Offset byte i Arg  iArg iArg countLabels stackDepth maxLocals iArg maxLocals iArg stackDepth stackMax stackMax stackDepth iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_wide bCodeStream classFileOffset OPC_fload writeUnsignedShort iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fload bCodeStream classFileOffset iArg
final public void fload 0 if DEBUG System out println position t tfload 0 NON NLS 1 count Labels 0 stack Depth if max Locals 0 max Locals 1 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fload 0  fload_0 tfload_0 countLabels stackDepth maxLocals maxLocals stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fload_0
final public void fload 1 if DEBUG System out println position t tfload 1 NON NLS 1 count Labels 0 stack Depth if max Locals 1 max Locals 2 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fload 1  fload_1 tfload_1 countLabels stackDepth maxLocals maxLocals stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fload_1
final public void fload 2 if DEBUG System out println position t tfload 2 NON NLS 1 count Labels 0 stack Depth if max Locals 2 max Locals 3 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fload 2  fload_2 tfload_2 countLabels stackDepth maxLocals maxLocals stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fload_2
final public void fload 3 if DEBUG System out println position t tfload 3 NON NLS 1 count Labels 0 stack Depth if max Locals 3 max Locals 4 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fload 3  fload_3 tfload_3 countLabels stackDepth maxLocals maxLocals stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fload_3
final public void fmul if DEBUG System out println position t tfmul NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fmul  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fmul
final public void fneg if DEBUG System out println position t tfneg NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fneg  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fneg
final public void frem if DEBUG System out println position t tfrem NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC frem  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_frem
final public void freturn if DEBUG System out println position t tfreturn NON NLS 1 count Labels 0 stack Depth the stack Depth should be equal to 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC freturn  countLabels stackDepth stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_freturn
final public void fstore int i Arg if DEBUG System out println position t tfstore i Arg NON NLS 1 count Labels 0 stack Depth if max Locals i Arg max Locals i Arg 1 if i Arg 255 Widen if class File Offset 3 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC wide b Code Stream class File Offset OPC fstore write Unsigned Short i Arg else if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC fstore b Code Stream class File Offset byte i Arg  iArg iArg countLabels stackDepth maxLocals iArg maxLocals iArg iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_wide bCodeStream classFileOffset OPC_fstore writeUnsignedShort iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fstore bCodeStream classFileOffset iArg
final public void fstore 0 if DEBUG System out println position t tfstore 0 NON NLS 1 count Labels 0 stack Depth if max Locals 0 max Locals 1 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fstore 0  fstore_0 tfstore_0 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fstore_0
final public void fstore 1 if DEBUG System out println position t tfstore 1 NON NLS 1 count Labels 0 stack Depth if max Locals 1 max Locals 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fstore 1  fstore_1 tfstore_1 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fstore_1
final public void fstore 2 if DEBUG System out println position t tfstore 2 NON NLS 1 count Labels 0 stack Depth if max Locals 2 max Locals 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fstore 2  fstore_2 tfstore_2 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fstore_2
final public void fstore 3 if DEBUG System out println position t tfstore 3 NON NLS 1 count Labels 0 stack Depth if max Locals 3 max Locals 4 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fstore 3  fstore_3 tfstore_3 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fstore_3
final public void fsub if DEBUG System out println position t tfsub NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC fsub  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_fsub
Macro for building a class descriptor object public void generate Class Literal Access For Type Type Binding accessed Type Field Binding synthetic Field Binding Label end Label Exception Label any Exception Handler int save Stack Size if accessed Type is Base Type accessed Type Null Binding this getTYPE accessed Type id return end Label new Label this if synthetic Field Binding null non interface case this getstatic synthetic Field Binding this dup this ifnonnull end Label this pop Macro for building a class descriptor object using or not a field cache to store it into this sequence is responsible for building the actual class descriptor If the field Cache is set then it is supposed to be the body of a synthetic access method factoring the actual descriptor creation out of the invocation site saving space If the field Cache is nil then we are dumping the bytecode on the invocation site since we have no way to get a hand on the field cache to do better Wrap the code in an exception handler to convert a Class Not Found Exception into a No Class Def Error any Exception Handler new Exception Label this Base Types Null Binding represents Class Not Found Exception this ldc accessed Type Base Types Null Binding java lang Object String value Of accessed Type constant Pool Name replace NON NLS 1 this invoke Class For Name See https bugs eclipse org bugs show bug cgi id 37565 if accessed Type Base Types Null Binding this ldc java lang Object NON NLS 1 else if accessed Type is Array Type this ldc String value Of accessed Type constant Pool Name replace else we make it an array type to avoid class initialization this ldc L String value Of accessed Type constant Pool Name replace NON NLS 1 NON NLS 2 this invoke Class For Name if accessed Type is Array Type extract the component type which doesn t initialize the class this invoke Java Lang Class Get Component Type We need to protect the runtime code from binary inconsistencies in case the accessed Type is missing the Class Not Found Exception has to be converted into a No Class Def Error old ex message we thus need to build an exception handler for this one any Exception Handler place End if synthetic Field Binding null non interface case this dup this putstatic synthetic Field Binding this goto  end Label Generate the body of the exception handler save Stack Size stack Depth stack Depth 1 Class Not Found Exception on stack the class literal could be doing more things on the stack which means that the stack may not be empty at this point in the above code gen So we save its state and restart it from 1 any Exception Handler place Transform the current exception and repush and throw a No Class Def Found Error Class Not Found get Message this new No Class Def Found Error this dup x1 this swap Retrieve the message from the old exception this invoke Throwable Get Message Send the constructor taking a message string as an argument this invoke No Class Def Found Error String Constructor this athrow end Label place stack Depth save Stack Size  generateClassLiteralAccessForType TypeBinding accessedType FieldBinding syntheticFieldBinding endLabel ExceptionLabel anyExceptionHandler saveStackSize accessedType isBaseType accessedType NullBinding accessedType endLabel syntheticFieldBinding syntheticFieldBinding endLabel fieldCache fieldCache ClassNotFoundException NoClassDefError anyExceptionHandler ExceptionLabel BaseTypes NullBinding ClassNotFoundException accessedType BaseTypes NullBinding valueOf accessedType constantPoolName invokeClassForName show_bug accessedType BaseTypes NullBinding accessedType isArrayType valueOf accessedType constantPoolName valueOf accessedType constantPoolName invokeClassForName accessedType isArrayType invokeJavaLangClassGetComponentType accessedType ClassNotFoundException NoClassDefError anyExceptionHandler placeEnd syntheticFieldBinding syntheticFieldBinding goto_ endLabel saveStackSize stackDepth stackDepth ClassNotFoundException anyExceptionHandler NoClassDefFoundError ClassNotFound getMessage newNoClassDefFoundError dup_x1 invokeThrowableGetMessage invokeNoClassDefFoundErrorStringConstructor endLabel stackDepth saveStackSize
This method generates the code attribute bytecode final public void generate Code Attribute For Problem Method String problem Message new Java Lang Error dup ldc problem Message invoke Java Lang Error Constructor athrow  generateCodeAttributeForProblemMethod problemMessage newJavaLangError problemMessage invokeJavaLangErrorConstructor
public void generate Constant Constant constant int implicit Conversion Code int target TypeID implicit Conversion Code 4 switch target TypeID case T boolean generate Inlined Value constant boolean Value break case T char generate Inlined Value constant char Value break case T byte generate Inlined Value constant byte Value break case T short generate Inlined Value constant short Value break case T int generate Inlined Value constant int Value break case T long generate Inlined Value constant long Value break case T float generate Inlined Value constant float Value break case T double generate Inlined Value constant double Value break default String or Object ldc constant string Value  generateConstant implicitConversionCode targetTypeID implicitConversionCode targetTypeID T_boolean generateInlinedValue booleanValue T_char generateInlinedValue charValue T_byte generateInlinedValue byteValue T_short generateInlinedValue shortValue T_int generateInlinedValue intValue T_long generateInlinedValue longValue T_float generateInlinedValue floatValue T_double generateInlinedValue doubleValue stringValue
param implicit Conversion Code int public void generate Implicit Conversion int implicit Conversion Code switch implicit Conversion Code case Float2 Char this f2i this i2c break case Double2 Char this d2i this i2c break case Int2 Char case Short2 Char case Byte2 Char this i2c break case Long2 Char this l2i this i2c break case Char2 Float case Short2 Float case Int2 Float case Byte2 Float this i2f break case Double2 Float this d2f break case Long2 Float this l2f break case Float2 Byte this f2i this i2b break case Double2 Byte this d2i this i2b break case Int2 Byte case Short2 Byte case Char2 Byte this i2b break case Long2 Byte this l2i this i2b break case Byte2 Double case Char2 Double case Short2 Double case Int2 Double this i2d break case Float2 Double this f2d break case Long2 Double this l2d break case Byte2 Short case Char2 Short case Int2 Short this i2s break case Double2 Short this d2i this i2s break case Long2 Short this l2i this i2s break case Float2 Short this f2i this i2s break case Double2 Int this d2i break case Float2 Int this f2i break case Long2 Int this l2i break case Int2 Long case Char2 Long case Byte2 Long case Short2 Long this i2l break case Double2 Long this d2l break case Float2 Long this f2l  implicitConversionCode generateImplicitConversion implicitConversionCode implicitConversionCode Float2Char Double2Char Int2Char Short2Char Byte2Char Long2Char Char2Float Short2Float Int2Float Byte2Float Double2Float Long2Float Float2Byte Double2Byte Int2Byte Short2Byte Char2Byte Long2Byte Byte2Double Char2Double Short2Double Int2Double Float2Double Long2Double Byte2Short Char2Short Int2Short Double2Short Long2Short Float2Short Double2Int Float2Int Long2Int Int2Long Char2Long Byte2Long Short2Long Double2Long Float2Long
public void generate Inlined Value byte inlined Value switch inlined Value case 1 this iconst m1 break case 0 this iconst 0 break case 1 this iconst 1 break case 2 this iconst 2 break case 3 this iconst 3 break case 4 this iconst 4 break case 5 this iconst 5 break default if 128 inlined Value inlined Value 127 this bipush inlined Value return  generateInlinedValue inlinedValue inlinedValue iconst_m1 iconst_0 iconst_1 iconst_2 iconst_3 iconst_4 iconst_5 inlinedValue inlinedValue inlinedValue
public void generate Inlined Value char inlined Value switch inlined Value case 0 this iconst 0 break case 1 this iconst 1 break case 2 this iconst 2 break case 3 this iconst 3 break case 4 this iconst 4 break case 5 this iconst 5 break default if 6 inlined Value inlined Value 127 this bipush byte inlined Value return if 128 inlined Value inlined Value 32767 this sipush inlined Value return this ldc inlined Value  generateInlinedValue inlinedValue inlinedValue iconst_0 iconst_1 iconst_2 iconst_3 iconst_4 iconst_5 inlinedValue inlinedValue inlinedValue inlinedValue inlinedValue inlinedValue inlinedValue
public void generate Inlined Value double inlined Value if inlined Value 0 0 if Double double To Long Bits inlined Value 0L this ldc2 w inlined Value else this dconst 0 return if inlined Value 1 0 this dconst 1 return this ldc2 w inlined Value  generateInlinedValue inlinedValue inlinedValue doubleToLongBits inlinedValue ldc2_w inlinedValue dconst_0 inlinedValue dconst_1 ldc2_w inlinedValue
public void generate Inlined Value float inlined Value if inlined Value 0 0f if Float float To Int Bits inlined Value 0 this ldc inlined Value else this fconst 0 return if inlined Value 1 0f this fconst 1 return if inlined Value 2 0f this fconst 2 return this ldc inlined Value  generateInlinedValue inlinedValue inlinedValue floatToIntBits inlinedValue inlinedValue fconst_0 inlinedValue fconst_1 inlinedValue fconst_2 inlinedValue
public void generate Inlined Value int inlined Value switch inlined Value case 1 this iconst m1 break case 0 this iconst 0 break case 1 this iconst 1 break case 2 this iconst 2 break case 3 this iconst 3 break case 4 this iconst 4 break case 5 this iconst 5 break default if 128 inlined Value inlined Value 127 this bipush byte inlined Value return if 32768 inlined Value inlined Value 32767 this sipush inlined Value return this ldc inlined Value  generateInlinedValue inlinedValue inlinedValue iconst_m1 iconst_0 iconst_1 iconst_2 iconst_3 iconst_4 iconst_5 inlinedValue inlinedValue inlinedValue inlinedValue inlinedValue inlinedValue inlinedValue
public void generate Inlined Value long inlined Value if inlined Value 0 this lconst 0 return if inlined Value 1 this lconst 1 return this ldc2 w inlined Value  generateInlinedValue inlinedValue inlinedValue lconst_0 inlinedValue lconst_1 ldc2_w inlinedValue
public void generate Inlined Value short inlined Value switch inlined Value case 1 this iconst m1 break case 0 this iconst 0 break case 1 this iconst 1 break case 2 this iconst 2 break case 3 this iconst 3 break case 4 this iconst 4 break case 5 this iconst 5 break default if 128 inlined Value inlined Value 127 this bipush byte inlined Value return this sipush inlined Value  generateInlinedValue inlinedValue inlinedValue iconst_m1 iconst_0 iconst_1 iconst_2 iconst_3 iconst_4 iconst_5 inlinedValue inlinedValue inlinedValue inlinedValue
public void generate Inlined Value boolean inlined Value if inlined Value this iconst 1 else this iconst 0  generateInlinedValue inlinedValue inlinedValue iconst_1 iconst_0
public void generate Outer Access Object mapping Sequence AST Node invocation Site Binding target Scope scope if mapping Sequence null if target instanceof Local Variable Binding scope problem Reporter need Implementation TODO philippe should improve local emulation failure reporting else scope problem Reporter no Such Enclosing Instance Reference Binding target invocation Site false return if mapping Sequence Block Scope No Enclosing Instance In Constructor Call scope problem Reporter no Such Enclosing Instance Reference Binding target invocation Site true return else if mapping Sequence Block Scope No Enclosing Instance In Static Context scope problem Reporter no Such Enclosing Instance Reference Binding target invocation Site false return if mapping Sequence Block Scope Emulation Path To Implicit This this aload 0 return else if mapping Sequence 0 instanceof Field Binding Field Binding field Binding Field Binding mapping Sequence 0 this aload 0 this getfield field Binding else load Local Variable Binding mapping Sequence 0 for int i 1 length mapping Sequence length i length i if mapping Sequence i instanceof Field Binding Field Binding field Binding Field Binding mapping Sequence i this getfield field Binding else this invokestatic Method Binding mapping Sequence i  generateOuterAccess mappingSequence ASTNode invocationSite mappingSequence LocalVariableBinding problemReporter needImplementation problemReporter noSuchEnclosingInstance ReferenceBinding invocationSite mappingSequence BlockScope NoEnclosingInstanceInConstructorCall problemReporter noSuchEnclosingInstance ReferenceBinding invocationSite mappingSequence BlockScope NoEnclosingInstanceInStaticContext problemReporter noSuchEnclosingInstance ReferenceBinding invocationSite mappingSequence BlockScope EmulationPathToImplicitThis aload_0 mappingSequence FieldBinding FieldBinding fieldBinding FieldBinding mappingSequence aload_0 fieldBinding LocalVariableBinding mappingSequence mappingSequence mappingSequence FieldBinding FieldBinding fieldBinding FieldBinding mappingSequence fieldBinding MethodBinding mappingSequence
The equivalent code performs a string conversion param block Scope the given block Scope param oper1 the first expression param oper2 the second expression public void generate String Append Block Scope block Scope Expression oper1 Expression oper2 int pc if oper1 null Operand is already on the stack and maybe nil note type1 is always to java lang String here this new String Buffer this dup x1 this swap If argument is reference type need to transform it into a string handles null case this invoke String Value Of T Object this invoke String Buffer String Constructor else pc position oper1 generate Optimized String Buffer Creation block Scope this oper1 implicit Conversion 0xF this record Positions From pc oper1 source Start pc position oper2 generate Optimized String Buffer block Scope this oper2 implicit Conversion 0xF this record Positions From pc oper2 source Start this invoke String Buffer To String  blockScope blockScope generateStringAppend BlockScope blockScope newStringBuffer dup_x1 invokeStringValueOf T_Object invokeStringBufferStringConstructor generateOptimizedStringBufferCreation blockScope implicitConversion recordPositionsFrom sourceStart generateOptimizedStringBuffer blockScope implicitConversion recordPositionsFrom sourceStart invokeStringBufferToString
Code responsible to generate the suitable code to supply values for the synthetic enclosing instance arguments of a constructor invocation of a nested type public void generate Synthetic Enclosing Instance Values Block Scope current Scope Reference Binding target Type Expression enclosing Instance AST Node invocation Site supplying enclosing instance for the anonymous type s superclass Reference Binding checked Target Type target Type is Anonymous Type target Type superclass target Type boolean has Extra Enclosing Instance enclosing Instance null if has Extra Enclosing Instance checked Target Type is Nested Type checked Target Type is Static current Scope problem Reporter unnecessary Enclosing Instance Specification enclosing Instance checked Target Type return perform some emulation work in case there is some and we are inside a local type only Reference Binding synthetic Argument Types if synthetic Argument Types target Type synthetic Enclosing Instance Types null Reference Binding target Enclosing Type checked Target Type enclosing Type boolean comply To14 current Scope environment options compliance Level Class File Constants JDK1 4 deny access to enclosing instance argument for allocation and super constructor call if 1 4 boolean ignore Enclosing Arg In Constructor Call invocation Site instanceof Allocation Expression comply To14 invocation Site instanceof Explicit Constructor Call Explicit Constructor Call invocation Site is Super Access for int i 0 max synthetic Argument Types length i max i Reference Binding synthetic Arg Type synthetic Argument Types i if has Extra Enclosing Instance synthetic Arg Type target Enclosing Type has Extra Enclosing Instance false enclosing Instance generate Code current Scope this true if comply To14 dup invoke Object Get Class will perform null check pop else Object emulation Path current Scope get Emulation Path synthetic Arg Type false not only exact match that is allow compatible ignore Enclosing Arg In Constructor Call this generate Outer Access emulation Path invocation Site synthetic Arg Type current Scope if has Extra Enclosing Instance current Scope problem Reporter unnecessary Enclosing Instance Specification enclosing Instance checked Target Type  generateSyntheticEnclosingInstanceValues BlockScope currentScope ReferenceBinding targetType enclosingInstance ASTNode invocationSite ReferenceBinding checkedTargetType targetType isAnonymousType targetType targetType hasExtraEnclosingInstance enclosingInstance hasExtraEnclosingInstance checkedTargetType isNestedType checkedTargetType isStatic currentScope problemReporter unnecessaryEnclosingInstanceSpecification enclosingInstance checkedTargetType ReferenceBinding syntheticArgumentTypes syntheticArgumentTypes targetType syntheticEnclosingInstanceTypes ReferenceBinding targetEnclosingType checkedTargetType enclosingType complyTo14 currentScope complianceLevel ClassFileConstants JDK1_4 ignoreEnclosingArgInConstructorCall invocationSite AllocationExpression complyTo14 invocationSite ExplicitConstructorCall ExplicitConstructorCall invocationSite isSuperAccess syntheticArgumentTypes ReferenceBinding syntheticArgType syntheticArgumentTypes hasExtraEnclosingInstance syntheticArgType targetEnclosingType hasExtraEnclosingInstance enclosingInstance generateCode currentScope complyTo14 invokeObjectGetClass emulationPath currentScope getEmulationPath syntheticArgType ignoreEnclosingArgInConstructorCall generateOuterAccess emulationPath invocationSite syntheticArgType currentScope hasExtraEnclosingInstance currentScope problemReporter unnecessaryEnclosingInstanceSpecification enclosingInstance checkedTargetType
Code responsible to generate the suitable code to supply values for the synthetic outer local variable arguments of a constructor invocation of a nested type bug 26122 synthetic values for outer locals must be passed after user arguments e g new X i 1 public void generate Synthetic Outer Argument Values Block Scope current Scope Reference Binding target Type AST Node invocation Site generate the synthetic outer arguments then Synthetic Argument Binding synthetic Arguments if synthetic Arguments target Type synthetic Outer Local Variables null for int i 0 max synthetic Arguments length i max i Local Variable Binding target Variable synthetic Arguments i actual Outer Local Variable Variable Binding emulation Path current Scope get Emulation Path target Variable this generate Outer Access emulation Path invocation Site target Variable current Scope  generateSyntheticOuterArgumentValues BlockScope currentScope ReferenceBinding targetType ASTNode invocationSite SyntheticArgumentBinding syntheticArguments syntheticArguments targetType syntheticOuterLocalVariables syntheticArguments LocalVariableBinding targetVariable syntheticArguments actualOuterLocalVariable VariableBinding emulationPath currentScope getEmulationPath targetVariable generateOuterAccess emulationPath invocationSite targetVariable currentScope
param access Binding the access method binding to generate public void generate Synthetic Body For Constructor Access Synthetic Access Method Binding access Binding initialize Max Locals access Binding Method Binding constructor Binding access Binding target Method Type Binding parameters constructor Binding parameters int length parameters length int resolved Position 1 this aload 0 if constructor Binding declaring Class is Nested Type Nested Type Binding nested Type Nested Type Binding constructor Binding declaring Class Synthetic Argument Binding synthetic Arguments nested Type synthetic Enclosing Instances for int i 0 i synthetic Arguments null 0 synthetic Arguments length i Type Binding type load type synthetic Arguments i type resolved Position if type Double Binding type Long Binding resolved Position 2 else resolved Position for int i 0 i length i load parameters i resolved Position if parameters i Double Binding parameters i Long Binding resolved Position 2 else resolved Position if constructor Binding declaring Class is Nested Type Nested Type Binding nested Type Nested Type Binding constructor Binding declaring Class Synthetic Argument Binding synthetic Arguments nested Type synthetic Outer Local Variables for int i 0 i synthetic Arguments null 0 synthetic Arguments length i Type Binding type load type synthetic Arguments i type resolved Position if type Double Binding type Long Binding resolved Position 2 else resolved Position this invokespecial constructor Binding this return   accessBinding generateSyntheticBodyForConstructorAccess SyntheticAccessMethodBinding accessBinding initializeMaxLocals accessBinding MethodBinding constructorBinding accessBinding targetMethod TypeBinding constructorBinding resolvedPosition aload_0 constructorBinding declaringClass isNestedType NestedTypeBinding nestedType NestedTypeBinding constructorBinding declaringClass SyntheticArgumentBinding syntheticArguments nestedType syntheticEnclosingInstances syntheticArguments syntheticArguments TypeBinding syntheticArguments resolvedPosition DoubleBinding LongBinding resolvedPosition resolvedPosition resolvedPosition DoubleBinding LongBinding resolvedPosition resolvedPosition constructorBinding declaringClass isNestedType NestedTypeBinding nestedType NestedTypeBinding constructorBinding declaringClass SyntheticArgumentBinding syntheticArguments nestedType syntheticOuterLocalVariables syntheticArguments syntheticArguments TypeBinding syntheticArguments resolvedPosition DoubleBinding LongBinding resolvedPosition resolvedPosition constructorBinding return_
public void generate Synthetic Body For Field Read Access Synthetic Access Method Binding access Binding initialize Max Locals access Binding Field Binding field Binding access Binding target Read Field Type Binding type if field Binding is Static this getstatic field Binding else this aload 0 this getfield field Binding if type field Binding type is Base Type if type Int Binding this ireturn else if type Float Binding this freturn else if type Long Binding this lreturn else if type Double Binding this dreturn else this ireturn else this areturn  generateSyntheticBodyForFieldReadAccess SyntheticAccessMethodBinding accessBinding initializeMaxLocals accessBinding FieldBinding fieldBinding accessBinding targetReadField TypeBinding fieldBinding isStatic fieldBinding aload_0 fieldBinding fieldBinding isBaseType IntBinding FloatBinding LongBinding DoubleBinding
public void generate Synthetic Body For Field Write Access Synthetic Access Method Binding access Binding initialize Max Locals access Binding Field Binding field Binding access Binding target Write Field if field Binding is Static load field Binding type 0 this putstatic field Binding else this aload 0 load field Binding type 1 this putfield field Binding this return   generateSyntheticBodyForFieldWriteAccess SyntheticAccessMethodBinding accessBinding initializeMaxLocals accessBinding FieldBinding fieldBinding accessBinding targetWriteField fieldBinding isStatic fieldBinding fieldBinding aload_0 fieldBinding fieldBinding return_
public void generate Synthetic Body For Method Access Synthetic Access Method Binding access Binding initialize Max Locals access Binding Method Binding method Binding access Binding target Method Type Binding parameters method Binding parameters int length parameters length int resolved Position if method Binding is Static resolved Position 0 else this aload 0 resolved Position 1 for int i 0 i length i load parameters i resolved Position if parameters i Double Binding parameters i Long Binding resolved Position 2 else resolved Position Type Binding type if method Binding is Static this invokestatic method Binding else if method Binding is Constructor method Binding is Private qualified super X super foo targets methods from superclass access Binding access Type Synthetic Access Method Binding Super Method Access this invokespecial method Binding else if method Binding declaring Class is Interface this invokeinterface method Binding else this invokevirtual method Binding if type method Binding return Type is Base Type if type Void Binding this return  else if type Int Binding this ireturn else if type Float Binding this freturn else if type Long Binding this lreturn else if type Double Binding this dreturn else this ireturn else this areturn  generateSyntheticBodyForMethodAccess SyntheticAccessMethodBinding accessBinding initializeMaxLocals accessBinding MethodBinding methodBinding accessBinding targetMethod TypeBinding methodBinding resolvedPosition methodBinding isStatic resolvedPosition aload_0 resolvedPosition resolvedPosition DoubleBinding LongBinding resolvedPosition resolvedPosition TypeBinding methodBinding isStatic methodBinding methodBinding isConstructor methodBinding isPrivate accessBinding accessType SyntheticAccessMethodBinding SuperMethodAccess methodBinding methodBinding declaringClass isInterface methodBinding methodBinding methodBinding returnType isBaseType VoidBinding return_ IntBinding FloatBinding LongBinding DoubleBinding
final public byte get Contents byte contents System arraycopy b Code Stream 0 contents new byte position 0 position return contents  getContents bCodeStream
final public void getfield Field Binding field Binding if DEBUG System out println position t tgetfield field Binding NON NLS 1 count Labels 0 if field Binding type id T double field Binding type id T long if stack Depth stack Max stack Max stack Depth if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC getfield write Unsigned Short constant Pool literal Index field Binding  FieldBinding fieldBinding fieldBinding countLabels fieldBinding T_double fieldBinding T_long stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_getfield writeUnsignedShort constantPool literalIndex fieldBinding
final public void getstatic Field Binding field Binding if DEBUG System out println position t tgetstatic field Binding NON NLS 1 count Labels 0 if field Binding type id T double field Binding type id T long stack Depth 2 else stack Depth 1 if stack Depth stack Max stack Max stack Depth if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC getstatic write Unsigned Short constant Pool literal Index field Binding  FieldBinding fieldBinding fieldBinding countLabels fieldBinding T_double fieldBinding T_long stackDepth stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_getstatic writeUnsignedShort constantPool literalIndex fieldBinding
public void getTYPE int base TypeID count Labels 0 if stack Depth stack Max stack Max stack Depth if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC getstatic switch base TypeID case T byte getstatic java lang Byte TYPE if DEBUG System out println position t tgetstatic java lang Byte TYPE NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang ByteTYPE break case T short getstatic java lang Short TYPE if DEBUG System out println position t tgetstatic java lang Short TYPE NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang ShortTYPE break case T char getstatic java lang Character TYPE if DEBUG System out println position t tgetstatic java lang Character TYPE NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang CharacterTYPE break case T int getstatic java lang Integer TYPE if DEBUG System out println position t tgetstatic java lang Integer TYPE NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang IntegerTYPE break case T long getstatic java lang Long TYPE if DEBUG System out println position t tgetstatic java lang Long TYPE NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang LongTYPE break case T float getstatic java lang Float TYPE if DEBUG System out println position t tgetstatic java lang Float TYPE NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang FloatTYPE break case T double getstatic java lang Double TYPE if DEBUG System out println position t tgetstatic java lang Double TYPE NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang DoubleTYPE break case T boolean getstatic java lang Boolean TYPE if DEBUG System out println position t tgetstatic java lang Boolean TYPE NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang BooleanTYPE break case T void getstatic java lang Void TYPE if DEBUG System out println position t tgetstatic java lang Void TYPE NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang VoidTYPE break  baseTypeID countLabels stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_getstatic baseTypeID T_byte writeUnsignedShort constantPool literalIndexForJavaLangByteTYPE T_short writeUnsignedShort constantPool literalIndexForJavaLangShortTYPE T_char writeUnsignedShort constantPool literalIndexForJavaLangCharacterTYPE T_int writeUnsignedShort constantPool literalIndexForJavaLangIntegerTYPE T_long writeUnsignedShort constantPool literalIndexForJavaLangLongTYPE T_float writeUnsignedShort constantPool literalIndexForJavaLangFloatTYPE T_double writeUnsignedShort constantPool literalIndexForJavaLangDoubleTYPE T_boolean writeUnsignedShort constantPool literalIndexForJavaLangBooleanTYPE T_void writeUnsignedShort constantPool literalIndexForJavaLangVoidTYPE
We didn t call it goto because there is a conflit with the goto keyword final public void goto  Label label if this wide Mode this goto w label return if DEBUG System out println position t tgoto label NON NLS 1 if class File Offset b Code Stream length resize Byte Array label inline Forward References From Labels Targeting position Possible optimization for code such as public Object foo boolean b true if b if b return null else if b return null return null The goto around the else block for the first if will be unreachable because the then Clause of the second if returns See inline Forward References From Labels Targeting defined on the Label class for the remaining part of this optimization if lbl is Branch Target position switch b Code Stream class File Offset 1 case OPC return case OPC areturn return position b Code Stream class File Offset OPC goto label branch  goto_ wideMode goto_w classFileOffset bCodeStream resizeByteArray inlineForwardReferencesFromLabelsTargeting thenClause inlineForwardReferencesFromLabelsTargeting isBranchTarget bCodeStream classFileOffset OPC_return OPC_areturn bCodeStream classFileOffset OPC_goto
final public void goto w Label lbl if DEBUG System out println position t tgotow lbl NON NLS 1 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC goto w lbl branch Wide  goto_w classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_goto_w branchWide
final public void i2b if DEBUG System out println position t ti2b NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC i2b  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_i2b
final public void i2c if DEBUG System out println position t ti2c NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC i2c  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_i2c
final public void i2d if DEBUG System out println position t ti2d NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC i2d  countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_i2d
final public void i2f if DEBUG System out println position t ti2f NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC i2f  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_i2f
final public void i2l if DEBUG System out println position t ti2l NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC i2l  countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_i2l
final public void i2s if DEBUG System out println position t ti2s NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC i2s  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_i2s
final public void iadd if DEBUG System out println position t tiadd NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iadd  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iadd
final public void iaload if DEBUG System out println position t tiaload NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iaload  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iaload
final public void iand if DEBUG System out println position t tiand NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iand  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iand
final public void iastore if DEBUG System out println position t tiastore NON NLS 1 count Labels 0 stack Depth 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iastore  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iastore
final public void iconst 0 if DEBUG System out println position t ticonst 0 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iconst 0  iconst_0 ticonst_0 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iconst_0
final public void iconst 1 if DEBUG System out println position t ticonst 1 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iconst 1  iconst_1 ticonst_1 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iconst_1
final public void iconst 2 if DEBUG System out println position t ticonst 2 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iconst 2  iconst_2 ticonst_2 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iconst_2
final public void iconst 3 if DEBUG System out println position t ticonst 3 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iconst 3  iconst_3 ticonst_3 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iconst_3
final public void iconst 4 if DEBUG System out println position t ticonst 4 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iconst 4  iconst_4 ticonst_4 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iconst_4
final public void iconst 5 if DEBUG System out println position t ticonst 5 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iconst 5  iconst_5 ticonst_5 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iconst_5
final public void iconst m1 if DEBUG System out println position t ticonst m1 NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iconst m1  iconst_m1 ticonst_m1 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iconst_m1
final public void idiv if DEBUG System out println position t tidiv NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC idiv  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_idiv
final public void if acmpeq Label lbl if DEBUG System out println position t tif acmpeq lbl NON NLS 1 count Labels 0 stack Depth 2 if this wide Mode generate Wide Reverted Conditional Branch OPC if acmpne lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC if acmpeq lbl branch  if_acmpeq tif_acmpeq countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_if_acmpne classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_if_acmpeq
final public void if acmpne Label lbl if DEBUG System out println position t tif acmpne lbl NON NLS 1 count Labels 0 stack Depth 2 if this wide Mode generate Wide Reverted Conditional Branch OPC if acmpeq lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC if acmpne lbl branch  if_acmpne tif_acmpne countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_if_acmpeq classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_if_acmpne
final public void if icmpeq Label lbl if DEBUG System out println position t tif cmpeq lbl NON NLS 1 count Labels 0 stack Depth 2 if this wide Mode generate Wide Reverted Conditional Branch OPC if icmpne lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC if icmpeq lbl branch  if_icmpeq tif_cmpeq countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_if_icmpne classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_if_icmpeq
final public void if icmpge Label lbl if DEBUG System out println position t tif iacmpge lbl NON NLS 1 count Labels 0 stack Depth 2 if this wide Mode generate Wide Reverted Conditional Branch OPC if icmplt lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC if icmpge lbl branch  if_icmpge tif_iacmpge countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_if_icmplt classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_if_icmpge
final public void if icmpgt Label lbl if DEBUG System out println position t tif iacmpgt lbl NON NLS 1 count Labels 0 stack Depth 2 if this wide Mode generate Wide Reverted Conditional Branch OPC if icmple lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC if icmpgt lbl branch  if_icmpgt tif_iacmpgt countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_if_icmple classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_if_icmpgt
final public void if icmple Label lbl if DEBUG System out println position t tif iacmple lbl NON NLS 1 count Labels 0 stack Depth 2 if this wide Mode generate Wide Reverted Conditional Branch OPC if icmpgt lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC if icmple lbl branch  if_icmple tif_iacmple countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_if_icmpgt classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_if_icmple
final public void if icmplt Label lbl if DEBUG System out println position t tif iacmplt lbl NON NLS 1 count Labels 0 stack Depth 2 if this wide Mode generate Wide Reverted Conditional Branch OPC if icmpge lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC if icmplt lbl branch  if_icmplt tif_iacmplt countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_if_icmpge classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_if_icmplt
final public void if icmpne Label lbl if DEBUG System out println position t tif iacmpne lbl NON NLS 1 count Labels 0 stack Depth 2 if this wide Mode generate Wide Reverted Conditional Branch OPC if icmpeq lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC if icmpne lbl branch  if_icmpne tif_iacmpne countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_if_icmpeq classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_if_icmpne
final public void ifeq Label lbl if DEBUG System out println position t tifeq lbl NON NLS 1 count Labels 0 stack Depth if this wide Mode generate Wide Reverted Conditional Branch OPC ifne lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ifeq lbl branch  countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_ifne classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ifeq
final public void ifge Label lbl if DEBUG System out println position t tifge lbl NON NLS 1 count Labels 0 stack Depth if this wide Mode generate Wide Reverted Conditional Branch OPC iflt lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ifge lbl branch  countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_iflt classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ifge
final public void ifgt Label lbl if DEBUG System out println position t tifgt lbl NON NLS 1 count Labels 0 stack Depth if this wide Mode generate Wide Reverted Conditional Branch OPC ifle lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ifgt lbl branch  countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_ifle classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ifgt
final public void ifle Label lbl if DEBUG System out println position t tifle lbl NON NLS 1 count Labels 0 stack Depth if this wide Mode generate Wide Reverted Conditional Branch OPC ifgt lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ifle lbl branch  countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_ifgt classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ifle
final public void iflt Label lbl if DEBUG System out println position t tiflt lbl NON NLS 1 count Labels 0 stack Depth if this wide Mode generate Wide Reverted Conditional Branch OPC ifge lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iflt lbl branch  countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_ifge classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iflt
final public void ifne Label lbl if DEBUG System out println position t tifne lbl NON NLS 1 count Labels 0 stack Depth if this wide Mode generate Wide Reverted Conditional Branch OPC ifeq lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ifne lbl branch  countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_ifeq classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ifne
final public void ifnonnull Label lbl if DEBUG System out println position t tifnonnull lbl NON NLS 1 count Labels 0 stack Depth if this wide Mode generate Wide Reverted Conditional Branch OPC ifnull lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ifnonnull lbl branch  countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_ifnull classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ifnonnull
final public void ifnull Label lbl if DEBUG System out println position t tifnull lbl NON NLS 1 count Labels 0 stack Depth if this wide Mode generate Wide Reverted Conditional Branch OPC ifnonnull lbl else if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ifnull lbl branch  countLabels stackDepth wideMode generateWideRevertedConditionalBranch OPC_ifnonnull classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ifnull
final public void iinc int index int value if DEBUG System out println position t tiinc index value NON NLS 1 NON NLS 2 count Labels 0 if index 255 value 128 value 127 have to widen if class File Offset 3 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC wide b Code Stream class File Offset OPC iinc write Unsigned Short index write Signed Short value else if class File Offset 2 b Code Stream length resize Byte Array position 3 b Code Stream class File Offset OPC iinc b Code Stream class File Offset byte index b Code Stream class File Offset byte value  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_wide bCodeStream classFileOffset OPC_iinc writeUnsignedShort writeSignedShort classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iinc bCodeStream classFileOffset bCodeStream classFileOffset
final public void iload int i Arg if DEBUG System out println position t tiload i Arg NON NLS 1 count Labels 0 stack Depth if max Locals i Arg max Locals i Arg 1 if stack Depth stack Max stack Max stack Depth if i Arg 255 Widen if class File Offset 3 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC wide b Code Stream class File Offset OPC iload write Unsigned Short i Arg else if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC iload b Code Stream class File Offset byte i Arg  iArg iArg countLabels stackDepth maxLocals iArg maxLocals iArg stackDepth stackMax stackMax stackDepth iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_wide bCodeStream classFileOffset OPC_iload writeUnsignedShort iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iload bCodeStream classFileOffset iArg
final public void iload 0 if DEBUG System out println position t tiload 0 NON NLS 1 count Labels 0 stack Depth if max Locals 0 max Locals 1 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iload 0  iload_0 tiload_0 countLabels stackDepth maxLocals maxLocals stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iload_0
final public void iload 1 if DEBUG System out println position t tiload 1 NON NLS 1 count Labels 0 stack Depth if max Locals 1 max Locals 2 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iload 1  iload_1 tiload_1 countLabels stackDepth maxLocals maxLocals stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iload_1
final public void iload 2 if DEBUG System out println position t tiload 2 NON NLS 1 count Labels 0 stack Depth if max Locals 2 max Locals 3 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iload 2  iload_2 tiload_2 countLabels stackDepth maxLocals maxLocals stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iload_2
final public void iload 3 if DEBUG System out println position t tiload 3 NON NLS 1 count Labels 0 stack Depth if max Locals 3 max Locals 4 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iload 3  iload_3 tiload_3 countLabels stackDepth maxLocals maxLocals stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iload_3
final public void imul if DEBUG System out println position t timul NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC imul  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_imul
public void increment Temp Local Variable Binding local Binding int value if value short value this iinc local Binding resolved Position value return load local Binding this ldc value this iadd store local Binding false  incrementTemp LocalVariableBinding localBinding localBinding resolvedPosition localBinding localBinding
store local Binding false public void incr Stack Size int offset if stack Depth offset stack Max stack Max stack Depth  localBinding incrStackSize stackDepth stackMax stackMax stackDepth
public int index Of Same Line Entry SincePC int pc int line for int index pc max pc To Source Map Size index max index 2 if pc To Source Map index 1 line return index return 1  indexOfSameLineEntrySincePC pcToSourceMapSize pcToSourceMap
final public void ineg if DEBUG System out println position t tineg NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ineg  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ineg
public void init Class File target Class File this class File target Class File this constant Pool target Class File constant Pool this b Code Stream target Class File contents this class File Offset target Class File contents Offset this starting Class File Offset this class File Offset pc To Source Map Size 0 last EntryPC 0 int length visible Locals length if no Visible Locals length length no Visible Locals new Local Variable Binding length System arraycopy no Visible Locals 0 visible Locals 0 length visible Locals Count 0 length locals length if no Locals length length no Locals new Local Variable Binding length System arraycopy no Locals 0 locals 0 length all Locals Counter 0 length exception Handlers length if no Exception Handlers length length no Exception Handlers new Exception Label length System arraycopy no Exception Handlers 0 exception Handlers 0 length exception Handlers Number 0 length labels length if no Labels length length no Labels new Label length System arraycopy no Labels 0 labels 0 length count Labels 0 stack Max 0 stack Depth 0 max Locals 0 position 0  ClassFile targetClassFile classFile targetClassFile constantPool targetClassFile constantPool bCodeStream targetClassFile classFileOffset targetClassFile contentsOffset startingClassFileOffset classFileOffset pcToSourceMapSize lastEntryPC visibleLocals noVisibleLocals noVisibleLocals LocalVariableBinding noVisibleLocals visibleLocals visibleLocalsCount noLocals noLocals LocalVariableBinding noLocals allLocalsCounter exceptionHandlers noExceptionHandlers noExceptionHandlers ExceptionLabel noExceptionHandlers exceptionHandlers exceptionHandlersNumber noLabels noLabels noLabels countLabels stackMax stackDepth maxLocals
param method Binding the given method binding to initialize the max locals public void initialize Max Locals Method Binding method Binding max Locals method Binding null method Binding is Static 0 1 take into account the synthetic parameters if method Binding null if method Binding is Constructor method Binding declaring Class is Nested Type Reference Binding enclosing Instance Types if enclosing Instance Types method Binding declaring Class synthetic Enclosing Instance Types null for int i 0 max enclosing Instance Types length i max i max Locals an enclosing Instance Type can only be a reference binding It cannot be Long Binding or Double Binding Synthetic Argument Binding synthetic Arguments if synthetic Arguments method Binding declaring Class synthetic Outer Local Variables null for int i 0 max synthetic Arguments length i max i Type Binding arg Type if arg Type synthetic Arguments i type Long Binding arg Type Double Binding max Locals 2 else max Locals Type Binding arguments if arguments method Binding parameters null for int i 0 max arguments length i max i Type Binding arg Type if arg Type arguments i Long Binding arg Type Double Binding max Locals 2 else max Locals  methodBinding initializeMaxLocals MethodBinding methodBinding maxLocals methodBinding methodBinding isStatic methodBinding methodBinding isConstructor methodBinding declaringClass isNestedType ReferenceBinding enclosingInstanceTypes enclosingInstanceTypes methodBinding declaringClass syntheticEnclosingInstanceTypes enclosingInstanceTypes maxLocals enclosingInstanceType LongBinding DoubleBinding SyntheticArgumentBinding syntheticArguments syntheticArguments methodBinding declaringClass syntheticOuterLocalVariables syntheticArguments TypeBinding argType argType syntheticArguments LongBinding argType DoubleBinding maxLocals maxLocals TypeBinding methodBinding TypeBinding argType argType LongBinding argType DoubleBinding maxLocals maxLocals
This methods searches for an existing entry inside the pc To Source Map table with a pc equals to pc If there is an existing entry it returns 1 no insertion required Otherwise it returns the index where the entry for the pc has to be inserted This is based on the fact that the pc To Source Map table is sorted according to the pc param pc To Source Map the given pc To Source Map array param length the given length param pc the given pc return int public static int insertion Index int pc To Source Map int length int pc int g 0 int d length 2 int m 0 while g d m g d 2 we search only on even indexes if m 2 0 m int currentPC pc To Source Map m if pc currentPC d m 2 else if pc currentPC g m 2 else return 1 if pc pc To Source Map m return m return m 2  pcToSourceMap pcToSourceMap pcToSourceMap pcToSourceMap insertionIndex pcToSourceMap pcToSourceMap pcToSourceMap
We didn t call it instanceof because there is a conflit with the instanceof keyword final public void instance of Type Binding type Binding if DEBUG System out println position t tinstance of type Binding NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC instanceof write Unsigned Short constant Pool literal Index type Binding  instance_of TypeBinding typeBinding tinstance_of typeBinding countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_instanceof writeUnsignedShort constantPool literalIndex typeBinding
public void invoke Class For Name invokestatic java lang Class for Name Ljava lang String Ljava lang Class if DEBUG System out println position t tinvokestatic java lang Class for Name Ljava lang String Ljava lang Class NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokestatic write Unsigned Short constant Pool literal Index For Java Lang Class For Name  invokeClassForName forName forName countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokestatic writeUnsignedShort constantPool literalIndexForJavaLangClassForName
public void invoke Java Lang Class Desired Assertion Status invokevirtual java lang Class desired Assertion Status Z if DEBUG System out println position t tinvokevirtual java lang Class desired Assertion Status Z NON NLS 1 count Labels 0 stack Depth if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokevirtual write Unsigned Short constant Pool literal Index For Java Lang Class Desired Assertion Status  invokeJavaLangClassDesiredAssertionStatus desiredAssertionStatus desiredAssertionStatus countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort constantPool literalIndexForJavaLangClassDesiredAssertionStatus
public void invoke Java Lang Class Get Component Type invokevirtual java lang Class get Component Type java lang Class if DEBUG System out println position t tinvokevirtual java lang Class get Component Type java lang Class NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokevirtual write Unsigned Short constant Pool literal Index For Java Lang Class Get Component Type  invokeJavaLangClassGetComponentType getComponentType getComponentType countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort constantPool literalIndexForJavaLangClassGetComponentType
final public void invokeinterface Method Binding method Binding initialized to 1 to take into account this immediately if DEBUG System out println position t tinvokeinterface method Binding NON NLS 1 count Labels 0 int arg Count 1 int id if class File Offset 4 b Code Stream length resize Byte Array position 3 b Code Stream class File Offset OPC invokeinterface write Unsigned Short constant Pool literal Index method Binding for int i method Binding parameters length 1 i 0 i if id method Binding parameters i id T double id T long arg Count 2 else arg Count 1 b Code Stream class File Offset byte arg Count Generate a 0 into the byte array Like the array is already fill with 0 we just need to increment the number of bytes b Code Stream class File Offset 0 if id method Binding return Type id T double id T long stack Depth 2 arg Count else if id T void stack Depth arg Count else stack Depth 1 arg Count if stack Depth stack Max stack Max stack Depth  MethodBinding methodBinding methodBinding countLabels argCount classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokeinterface writeUnsignedShort constantPool literalIndex methodBinding methodBinding methodBinding T_double T_long argCount argCount bCodeStream classFileOffset argCount bCodeStream classFileOffset methodBinding returnType T_double T_long stackDepth argCount T_void stackDepth argCount stackDepth argCount stackDepth stackMax stackMax stackDepth
public void invoke Java Lang Error Constructor invokespecial java lang Error init Ljava lang String V if DEBUG System out println position t tinvokespecial java lang Error init Ljava lang String V NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokespecial stack Depth 2 write Unsigned Short constant Pool literal Index For Java Lang Error Constructor  invokeJavaLangErrorConstructor countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokespecial stackDepth writeUnsignedShort constantPool literalIndexForJavaLangErrorConstructor
public void invoke No Class Def Found Error String Constructor invokespecial java lang No Class Def Found Error init Ljava lang String V if DEBUG System out println position t tinvokespecial java lang No Class Def Found Error init Ljava lang String V NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokespecial stack Depth 2 write Unsigned Short constant Pool literal Index For Java Lang No Class Def Found Error String Constructor  invokeNoClassDefFoundErrorStringConstructor NoClassDefFoundError NoClassDefFoundError countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokespecial stackDepth writeUnsignedShort constantPool literalIndexForJavaLangNoClassDefFoundErrorStringConstructor
public void invoke Object Get Class invokevirtual java lang Object get Class Ljava lang Class if DEBUG System out println position t tinvokevirtual java lang Object get Class Ljava lang Class NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokevirtual write Unsigned Short constant Pool literal Index For Java Lang Object Get Class  invokeObjectGetClass getClass getClass countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort constantPool literalIndexForJavaLangObjectGetClass
final public void invokespecial Method Binding method Binding if DEBUG System out println position t tinvokespecial method Binding NON NLS 1 initialized to 1 to take into account this immediately count Labels 0 int arg Count 1 int id if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokespecial write Unsigned Short constant Pool literal Index method Binding if method Binding is Constructor method Binding declaring Class is Nested Type enclosing instances Type Binding synthetic Argument Types method Binding declaring Class synthetic Enclosing Instance Types if synthetic Argument Types null for int i 0 max synthetic Argument Types length i max i if id synthetic Argument Types i id T double id T long arg Count 2 else arg Count outer local variables Synthetic Argument Binding synthetic Arguments method Binding declaring Class synthetic Outer Local Variables if synthetic Arguments null for int i 0 max synthetic Arguments length i max i if id synthetic Arguments i type id T double id T long arg Count 2 else arg Count for int i method Binding parameters length 1 i 0 i if id method Binding parameters i id T double id T long arg Count 2 else arg Count if id method Binding return Type id T double id T long stack Depth 2 arg Count else if id T void stack Depth arg Count else stack Depth 1 arg Count if stack Depth stack Max stack Max stack Depth  MethodBinding methodBinding methodBinding countLabels argCount classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokespecial writeUnsignedShort constantPool literalIndex methodBinding methodBinding isConstructor methodBinding declaringClass isNestedType TypeBinding syntheticArgumentTypes methodBinding declaringClass syntheticEnclosingInstanceTypes syntheticArgumentTypes syntheticArgumentTypes syntheticArgumentTypes T_double T_long argCount argCount SyntheticArgumentBinding syntheticArguments methodBinding declaringClass syntheticOuterLocalVariables syntheticArguments syntheticArguments syntheticArguments T_double T_long argCount argCount methodBinding methodBinding T_double T_long argCount argCount methodBinding returnType T_double T_long stackDepth argCount T_void stackDepth argCount stackDepth argCount stackDepth stackMax stackMax stackDepth
final public void invokestatic Method Binding method Binding if DEBUG System out println position t tinvokestatic method Binding NON NLS 1 initialized to 0 to take into account that there is no this for a static method count Labels 0 int arg Count 0 int id if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokestatic write Unsigned Short constant Pool literal Index method Binding for int i method Binding parameters length 1 i 0 i if id method Binding parameters i id T double id T long arg Count 2 else arg Count 1 if id method Binding return Type id T double id T long stack Depth 2 arg Count else if id T void stack Depth arg Count else stack Depth 1 arg Count if stack Depth stack Max stack Max stack Depth  MethodBinding methodBinding methodBinding countLabels argCount classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokestatic writeUnsignedShort constantPool literalIndex methodBinding methodBinding methodBinding T_double T_long argCount argCount methodBinding returnType T_double T_long stackDepth argCount T_void stackDepth argCount stackDepth argCount stackDepth stackMax stackMax stackDepth
The equivalent code performs a string conversion of the TOS param typeID CODE int CODE public void invoke String Buffer Append For Type int typeID if DEBUG System out println position t tinvokevirtual java lang String Buffer append NON NLS 1 count Labels 0 int used TypeID if typeID T null used TypeID T String else used TypeID typeID invokevirtual if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokevirtual write Unsigned Short constant Pool literal Index For Java Lang String Buffer Append typeID if used TypeID T long used TypeID T double stack Depth 2 else stack Depth  invokeStringBufferAppendForType StringBuffer countLabels usedTypeID T_null usedTypeID T_String usedTypeID classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort constantPool literalIndexForJavaLangStringBufferAppend usedTypeID T_long usedTypeID T_double stackDepth stackDepth
public void invoke Java Lang Assertion Error Constructor int type BindingID invokespecial java lang Assertion Error init type BindingID V if DEBUG System out println position t tinvokespecial java lang Assertion Error init type BindingID V NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokespecial write Unsigned Short constant Pool literal Index For Java Lang Assertion Error Constructor type BindingID stack Depth 2  invokeJavaLangAssertionErrorConstructor typeBindingID AssertionError typeBindingID AssertionError typeBindingID countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokespecial writeUnsignedShort constantPool literalIndexForJavaLangAssertionErrorConstructor typeBindingID stackDepth
public void invoke Java Lang Assertion Error Default Constructor invokespecial java lang Assertion Error init V if DEBUG System out println position t tinvokespecial java lang Assertion Error init V NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokespecial write Unsigned Short constant Pool literal Index For Java Lang Assertion Error Default Constructor stack Depth  invokeJavaLangAssertionErrorDefaultConstructor AssertionError AssertionError countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokespecial writeUnsignedShort constantPool literalIndexForJavaLangAssertionErrorDefaultConstructor stackDepth
public void invoke String Buffer Default Constructor invokespecial java lang String Buffer init V if DEBUG System out println position t tinvokespecial java lang String Buffer init V NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokespecial write Unsigned Short constant Pool literal Index For Java Lang String Buffer Default Constructor stack Depth  invokeStringBufferDefaultConstructor StringBuffer StringBuffer countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokespecial writeUnsignedShort constantPool literalIndexForJavaLangStringBufferDefaultConstructor stackDepth
public void invoke String Buffer String Constructor invokespecial java lang String Buffer init Ljava lang String V if DEBUG System out println position t tjava lang String Buffer init Ljava lang String V NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokespecial write Unsigned Short constant Pool literal Index For Java Lang String Buffer Constructor stack Depth 2  invokeStringBufferStringConstructor StringBuffer StringBuffer countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokespecial writeUnsignedShort constantPool literalIndexForJavaLangStringBufferConstructor stackDepth
public void invoke String Buffer To String invokevirtual String Buffer to String Ljava lang String if DEBUG System out println position t tinvokevirtual String Buffer to String Ljava lang String NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokevirtual write Unsigned Short constant Pool literal Index For Java Lang String Buffer To String  invokeStringBufferToString StringBuffer toString StringBuffer toString countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort constantPool literalIndexForJavaLangStringBufferToString
public void invoke String Intern invokevirtual java lang String intern if DEBUG System out println position t tinvokevirtual java lang String intern NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokevirtual write Unsigned Short constant Pool literal Index For Java Lang String Intern  invokeStringIntern countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort constantPool literalIndexForJavaLangStringIntern
public void invoke String Value Of int typeID invokestatic java lang String value Of argument Type if DEBUG System out println position t tinvokestatic java lang String value Of NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokestatic write Unsigned Short constant Pool literal Index For Java Lang String Value Of typeID  invokeStringValueOf valueOf argumentType valueOf countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokestatic writeUnsignedShort constantPool literalIndexForJavaLangStringValueOf
public void invoke Throwable Get Message invokevirtual java lang Throwable get Message Ljava lang String if DEBUG System out println position t tinvokevirtual java lang Throwable get Message Ljava lang String NON NLS 1 count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokevirtual write Unsigned Short constant Pool literal Index For Java Lang Throwable Get Message  invokeThrowableGetMessage getMessage getMessage countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort constantPool literalIndexForJavaLangThrowableGetMessage
final public void invokevirtual Method Binding method Binding if DEBUG System out println position t tinvokevirtual method Binding NON NLS 1 initialized to 1 to take into account this immediately count Labels 0 int arg Count 1 int id if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC invokevirtual write Unsigned Short constant Pool literal Index method Binding for int i method Binding parameters length 1 i 0 i if id method Binding parameters i id T double id T long arg Count 2 else arg Count if id method Binding return Type id T double id T long stack Depth 2 arg Count else if id T void stack Depth arg Count else stack Depth 1 arg Count if stack Depth stack Max stack Max stack Depth  MethodBinding methodBinding methodBinding countLabels argCount classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort constantPool literalIndex methodBinding methodBinding methodBinding T_double T_long argCount argCount methodBinding returnType T_double T_long stackDepth argCount T_void stackDepth argCount stackDepth argCount stackDepth stackMax stackMax stackDepth
final public void ior if DEBUG System out println position t tior NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ior  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ior
final public void irem if DEBUG System out println position t tirem NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC irem  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_irem
final public void ireturn if DEBUG System out println position t tireturn NON NLS 1 count Labels 0 stack Depth the stack Depth should be equal to 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ireturn  countLabels stackDepth stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ireturn
public boolean is Definitely Assigned Scope scope int init State Index Local Variable Binding local Dependant of Unconditional Flow Info is Definitely Assigned if init State Index 1 return false if local is Argument return true int local Position local id max Field Count Method Scope method Scope scope method Scope id is zero based if local Position Unconditional Flow Info Bit Cache Size return method Scope definite Inits init State Index 1L local Position 0 use bits use extra vector long extra Inits method Scope extra Definite Inits init State Index if extra Inits null return false if vector not yet allocated then not initialized int vector Index if vector Index local Position Unconditional Flow Info Bit Cache Size 1 extra Inits length return false if not enough room in vector then not initialized return extra Inits vector Index 1L local Position Unconditional Flow Info Bit Cache Size 0  isDefinitelyAssigned initStateIndex LocalVariableBinding UnconditionalFlowInfo isDefinitelyAssigned initStateIndex isArgument localPosition maxFieldCount MethodScope methodScope methodScope localPosition UnconditionalFlowInfo BitCacheSize methodScope definiteInits initStateIndex localPosition extraInits methodScope extraDefiniteInits initStateIndex extraInits vectorIndex vectorIndex localPosition UnconditionalFlowInfo BitCacheSize extraInits extraInits vectorIndex localPosition UnconditionalFlowInfo BitCacheSize
final public void ishl if DEBUG System out println position t tishl NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ishl  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ishl
final public void ishr if DEBUG System out println position t tishr NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ishr  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ishr
final public void istore int i Arg if DEBUG System out println position t tistore i Arg NON NLS 1 count Labels 0 stack Depth if max Locals i Arg max Locals i Arg 1 if i Arg 255 Widen if class File Offset 3 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC wide b Code Stream class File Offset OPC istore write Unsigned Short i Arg else if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC istore b Code Stream class File Offset byte i Arg  iArg iArg countLabels stackDepth maxLocals iArg maxLocals iArg iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_wide bCodeStream classFileOffset OPC_istore writeUnsignedShort iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_istore bCodeStream classFileOffset iArg
final public void istore 0 if DEBUG System out println position t tistore 0 NON NLS 1 count Labels 0 stack Depth if max Locals 0 max Locals 1 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC istore 0  istore_0 tistore_0 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_istore_0
final public void istore 1 if DEBUG System out println position t tistore 1 NON NLS 1 count Labels 0 stack Depth if max Locals 1 max Locals 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC istore 1  istore_1 tistore_1 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_istore_1
final public void istore 2 if DEBUG System out println position t tistore 2 NON NLS 1 count Labels 0 stack Depth if max Locals 2 max Locals 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC istore 2  istore_2 tistore_2 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_istore_2
final public void istore 3 if DEBUG System out println position t tistore 3 NON NLS 1 count Labels 0 stack Depth if max Locals 3 max Locals 4 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC istore 3  istore_3 tistore_3 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_istore_3
final public void isub if DEBUG System out println position t tisub NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC isub  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_isub
final public void iushr if DEBUG System out println position t tiushr NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC iushr  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_iushr
final public void ixor if DEBUG System out println position t tixor NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ixor  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ixor
final public void jsr Label lbl if this wide Mode this jsr w lbl return if DEBUG System out println position t tjsr lbl NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC jsr lbl branch  wideMode jsr_w countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_jsr
final public void jsr w Label lbl if DEBUG System out println position t tjsr w lbl NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC jsr w lbl branch Wide  jsr_w tjsr_w countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_jsr_w branchWide
final public void l2d if DEBUG System out println position t tl2d NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC l2d  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_l2d
final public void l2f if DEBUG System out println position t tl2f NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC l2f  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_l2f
final public void l2i if DEBUG System out println position t tl2i NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC l2i  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_l2i
final public void ladd if DEBUG System out println position t tladd NON NLS 1 count Labels 0 stack Depth 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ladd  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ladd
final public void laload if DEBUG System out println position t tlaload NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC laload  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_laload
final public void land if DEBUG System out println position t tland NON NLS 1 count Labels 0 stack Depth 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC land  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_land
final public void lastore if DEBUG System out println position t tlastore NON NLS 1 count Labels 0 stack Depth 4 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lastore  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lastore
final public void lcmp if DEBUG System out println position t tlcmp NON NLS 1 count Labels 0 stack Depth 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lcmp  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lcmp
final public void lconst 0 if DEBUG System out println position t tlconst 0 NON NLS 1 count Labels 0 stack Depth 2 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lconst 0  lconst_0 tlconst_0 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lconst_0
final public void lconst 1 if DEBUG System out println position t tlconst 1 NON NLS 1 count Labels 0 stack Depth 2 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lconst 1  lconst_1 tlconst_1 countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lconst_1
final public void ldc float constant if DEBUG System out println position t tldc constant NON NLS 1 count Labels 0 int index constant Pool literal Index constant stack Depth if stack Depth stack Max stack Max stack Depth if index 255 Generate a ldc w if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ldc w write Unsigned Short index else Generate a ldc if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC ldc b Code Stream class File Offset byte index  countLabels constantPool literalIndex stackDepth stackDepth stackMax stackMax stackDepth ldc_w classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ldc_w writeUnsignedShort classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ldc bCodeStream classFileOffset
final public void ldc int constant if DEBUG System out println position t tldc constant NON NLS 1 count Labels 0 int index constant Pool literal Index constant stack Depth if stack Depth stack Max stack Max stack Depth if index 255 Generate a ldc w if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ldc w write Unsigned Short index else Generate a ldc if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC ldc b Code Stream class File Offset byte index  countLabels constantPool literalIndex stackDepth stackDepth stackMax stackMax stackDepth ldc_w classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ldc_w writeUnsignedShort classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ldc bCodeStream classFileOffset
final public void ldc String constant if DEBUG System out println position t tldc constant NON NLS 1 count Labels 0 int current Constant Pool Index constant Pool current Index int current Constant Pool Offset constant Pool current Offset int current Code Stream Position position int index constant Pool literal Index For Ldc constant to Char Array if index 0 the string already exists inside the constant pool we reuse the same index stack Depth if stack Depth stack Max stack Max stack Depth if index 255 Generate a ldc w if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ldc w write Unsigned Short index else Generate a ldc if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC ldc b Code Stream class File Offset byte index else the string is too big to be utf8 encoded in one pass we have to split it into different pieces first we clean all side effects due to the code above this case is very rare so we can afford to lose time to handle it char constant Chars constant to Char Array position current Code Stream Position constant Pool current Index current Constant Pool Index constant Pool current Offset current Constant Pool Offset constant Pool string Cache remove constant Chars constant Pool UTF8 Cache remove constant Chars int i 0 int length 0 int constant Length constant length byte utf8encoding new byte Math min constant Length 100 65535 int utf8encoding Length 0 while length 65532 i constant Length char current constant Chars i we resize the byte array immediately if necessary if length 3 utf8encoding Length utf8encoding length System arraycopy utf8encoding 0 utf8encoding new byte Math min utf8encoding Length 100 65535 0 length if current 0x0001 current 0x007F we only need one byte ASCII table utf8encoding length byte current else if current 0x07FF we need 3 bytes utf8encoding length byte 0xE0 current 12 0x0F 0xE0 1110 0000 utf8encoding length byte 0x80 current 6 0x3F 0x80 1000 0000 utf8encoding length byte 0x80 current 0x3F 0x80 1000 0000 else we can be 0 or between 0x0080 and 0x07FF In that case we only need 2 bytes utf8encoding length byte 0xC0 current 6 0x1F 0xC0 1100 0000 utf8encoding length byte 0x80 current 0x3F 0x80 1000 0000 i check if all the string is encoded PR 1PR2DWJ the string is too big to be encoded in one pass new String Buffer dup write the first part char sub Chars new char i System arraycopy constant Chars 0 sub Chars 0 i System arraycopy utf8encoding 0 utf8encoding new byte length 0 length index constant Pool literal Index sub Chars utf8encoding stack Depth if stack Depth stack Max stack Max stack Depth if index 255 Generate a ldc w if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ldc w write Unsigned Short index else Generate a ldc if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC ldc b Code Stream class File Offset byte index write the remaining part invoke String Buffer String Constructor while i constant Length length 0 utf8encoding new byte Math min constant Length i 100 65535 int start Index i while length 65532 i constant Length char current constant Chars i we resize the byte array immediately if necessary if constant Length 2 utf8encoding Length utf8encoding length System arraycopy utf8encoding 0 utf8encoding new byte Math min utf8encoding Length 100 65535 0 length if current 0x0001 current 0x007F we only need one byte ASCII table utf8encoding length byte current else if current 0x07FF we need 3 bytes utf8encoding length byte 0xE0 current 12 0x0F 0xE0 1110 0000 utf8encoding length byte 0x80 current 6 0x3F 0x80 1000 0000 utf8encoding length byte 0x80 current 0x3F 0x80 1000 0000 else we can be 0 or between 0x0080 and 0x07FF In that case we only need 2 bytes utf8encoding length byte 0xC0 current 6 0x1F 0xC0 1100 0000 utf8encoding length byte 0x80 current 0x3F 0x80 1000 0000 i the next part is done sub Chars new char i start Index System arraycopy constant Chars start Index sub Chars 0 i start Index System arraycopy utf8encoding 0 utf8encoding new byte length 0 length index constant Pool literal Index sub Chars utf8encoding stack Depth if stack Depth stack Max stack Max stack Depth if index 255 Generate a ldc w if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ldc w write Unsigned Short index else Generate a ldc if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC ldc b Code Stream class File Offset byte index now on the stack it should be a String Buffer and a string invoke String Buffer Append For Type T String invoke String Buffer To String invoke String Intern  countLabels currentConstantPoolIndex constantPool currentIndex currentConstantPoolOffset constantPool currentOffset currentCodeStreamPosition constantPool literalIndexForLdc toCharArray stackDepth stackDepth stackMax stackMax stackDepth ldc_w classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ldc_w writeUnsignedShort classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ldc bCodeStream classFileOffset constantChars toCharArray currentCodeStreamPosition constantPool currentIndex currentConstantPoolIndex constantPool currentOffset currentConstantPoolOffset constantPool stringCache constantChars constantPool UTF8Cache constantChars constantLength constantLength utf8encodingLength constantLength constantChars utf8encodingLength utf8encodingLength newStringBuffer subChars constantChars subChars constantPool literalIndex subChars stackDepth stackDepth stackMax stackMax stackDepth ldc_w classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ldc_w writeUnsignedShort classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ldc bCodeStream classFileOffset invokeStringBufferStringConstructor constantLength constantLength startIndex constantLength constantChars constantLength utf8encodingLength utf8encodingLength subChars startIndex constantChars startIndex subChars startIndex constantPool literalIndex subChars stackDepth stackDepth stackMax stackMax stackDepth ldc_w classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ldc_w writeUnsignedShort classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ldc bCodeStream classFileOffset StringBuffer invokeStringBufferAppendForType T_String invokeStringBufferToString invokeStringIntern
final public void ldc2 w double constant if DEBUG System out println position t tldc2 w constant NON NLS 1 count Labels 0 int index constant Pool literal Index constant stack Depth 2 if stack Depth stack Max stack Max stack Depth Generate a ldc2 w if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ldc2 w write Unsigned Short index  ldc2_w tldc2_w countLabels constantPool literalIndex stackDepth stackDepth stackMax stackMax stackDepth ldc2_w classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ldc2_w writeUnsignedShort
final public void ldc2 w long constant if DEBUG System out println position t tldc2 w constant NON NLS 1 count Labels 0 int index constant Pool literal Index constant stack Depth 2 if stack Depth stack Max stack Max stack Depth Generate a ldc2 w if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ldc2 w write Unsigned Short index  ldc2_w tldc2_w countLabels constantPool literalIndex stackDepth stackDepth stackMax stackMax stackDepth ldc2_w classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ldc2_w writeUnsignedShort
final public void ldiv if DEBUG System out println position t tldiv NON NLS 1 count Labels 0 stack Depth 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC ldiv  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ldiv
final public void lload int i Arg if DEBUG System out println position t tlload i Arg NON NLS 1 count Labels 0 stack Depth 2 if max Locals i Arg 1 max Locals i Arg 2 if stack Depth stack Max stack Max stack Depth if i Arg 255 Widen if class File Offset 3 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC wide b Code Stream class File Offset OPC lload write Unsigned Short i Arg else if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC lload b Code Stream class File Offset byte i Arg  iArg iArg countLabels stackDepth maxLocals iArg maxLocals iArg stackDepth stackMax stackMax stackDepth iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_wide bCodeStream classFileOffset OPC_lload writeUnsignedShort iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lload bCodeStream classFileOffset iArg
final public void lload 0 if DEBUG System out println position t tlload 0 NON NLS 1 count Labels 0 stack Depth 2 if max Locals 2 max Locals 2 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lload 0  lload_0 tlload_0 countLabels stackDepth maxLocals maxLocals stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lload_0
final public void lload 1 if DEBUG System out println position t tlload 1 NON NLS 1 count Labels 0 stack Depth 2 if max Locals 3 max Locals 3 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lload 1  lload_1 tlload_1 countLabels stackDepth maxLocals maxLocals stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lload_1
final public void lload 2 if DEBUG System out println position t tlload 2 NON NLS 1 count Labels 0 stack Depth 2 if max Locals 4 max Locals 4 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lload 2  lload_2 tlload_2 countLabels stackDepth maxLocals maxLocals stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lload_2
final public void lload 3 if DEBUG System out println position t tlload 3 NON NLS 1 count Labels 0 stack Depth 2 if max Locals 5 max Locals 5 if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lload 3  lload_3 tlload_3 countLabels stackDepth maxLocals maxLocals stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lload_3
final public void lmul if DEBUG System out println position t tlmul NON NLS 1 count Labels 0 stack Depth 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lmul  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lmul
final public void lneg if DEBUG System out println position t tlneg NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lneg  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lneg
public final void load Local Variable Binding local Binding count Labels 0 Type Binding type Binding local Binding type int resolved Position local Binding resolved Position Using dedicated int bytecode if type Binding Int Binding switch resolved Position case 0 this iload 0 break case 1 this iload 1 break case 2 this iload 2 break case 3 this iload 3 break case 1 internal failure trying to load variable not supposed to be generated break default this iload resolved Position return Using dedicated float bytecode if type Binding Float Binding switch resolved Position case 0 this fload 0 break case 1 this fload 1 break case 2 this fload 2 break case 3 this fload 3 break default this fload resolved Position return Using dedicated long bytecode if type Binding Long Binding switch resolved Position case 0 this lload 0 break case 1 this lload 1 break case 2 this lload 2 break case 3 this lload 3 break default this lload resolved Position return Using dedicated double bytecode if type Binding Double Binding switch resolved Position case 0 this dload 0 break case 1 this dload 1 break case 2 this dload 2 break case 3 this dload 3 break default this dload resolved Position return boolean byte char and short are handled as int if type Binding Byte Binding type Binding Char Binding type Binding Boolean Binding type Binding Short Binding switch resolved Position case 0 this iload 0 break case 1 this iload 1 break case 2 this iload 2 break case 3 this iload 3 break default this iload resolved Position return Reference object switch resolved Position case 0 this aload 0 break case 1 this aload 1 break case 2 this aload 2 break case 3 this aload 3 break default this aload resolved Position  LocalVariableBinding localBinding countLabels TypeBinding typeBinding localBinding resolvedPosition localBinding resolvedPosition typeBinding IntBinding resolvedPosition iload_0 iload_1 iload_2 iload_3 resolvedPosition typeBinding FloatBinding resolvedPosition fload_0 fload_1 fload_2 fload_3 resolvedPosition typeBinding LongBinding resolvedPosition lload_0 lload_1 lload_2 lload_3 resolvedPosition typeBinding DoubleBinding resolvedPosition dload_0 dload_1 dload_2 dload_3 resolvedPosition typeBinding ByteBinding typeBinding CharBinding typeBinding BooleanBinding typeBinding ShortBinding resolvedPosition iload_0 iload_1 iload_2 iload_3 resolvedPosition resolvedPosition aload_0 aload_1 aload_2 aload_3 resolvedPosition
public final void load Type Binding type Binding int resolved Position count Labels 0 Using dedicated int bytecode if type Binding Int Binding switch resolved Position case 0 this iload 0 break case 1 this iload 1 break case 2 this iload 2 break case 3 this iload 3 break default this iload resolved Position return Using dedicated float bytecode if type Binding Float Binding switch resolved Position case 0 this fload 0 break case 1 this fload 1 break case 2 this fload 2 break case 3 this fload 3 break default this fload resolved Position return Using dedicated long bytecode if type Binding Long Binding switch resolved Position case 0 this lload 0 break case 1 this lload 1 break case 2 this lload 2 break case 3 this lload 3 break default this lload resolved Position return Using dedicated double bytecode if type Binding Double Binding switch resolved Position case 0 this dload 0 break case 1 this dload 1 break case 2 this dload 2 break case 3 this dload 3 break default this dload resolved Position return boolean byte char and short are handled as int if type Binding Byte Binding type Binding Char Binding type Binding Boolean Binding type Binding Short Binding switch resolved Position case 0 this iload 0 break case 1 this iload 1 break case 2 this iload 2 break case 3 this iload 3 break default this iload resolved Position return Reference object switch resolved Position case 0 this aload 0 break case 1 this aload 1 break case 2 this aload 2 break case 3 this aload 3 break default this aload resolved Position  TypeBinding typeBinding resolvedPosition countLabels typeBinding IntBinding resolvedPosition iload_0 iload_1 iload_2 iload_3 resolvedPosition typeBinding FloatBinding resolvedPosition fload_0 fload_1 fload_2 fload_3 resolvedPosition typeBinding LongBinding resolvedPosition lload_0 lload_1 lload_2 lload_3 resolvedPosition typeBinding DoubleBinding resolvedPosition dload_0 dload_1 dload_2 dload_3 resolvedPosition typeBinding ByteBinding typeBinding CharBinding typeBinding BooleanBinding typeBinding ShortBinding resolvedPosition iload_0 iload_1 iload_2 iload_3 resolvedPosition resolvedPosition aload_0 aload_1 aload_2 aload_3 resolvedPosition
public final void load Int int resolved Position Using dedicated int bytecode switch resolved Position case 0 this iload 0 break case 1 this iload 1 break case 2 this iload 2 break case 3 this iload 3 break default this iload resolved Position  loadInt resolvedPosition resolvedPosition iload_0 iload_1 iload_2 iload_3 resolvedPosition
public final void load Object int resolved Position switch resolved Position case 0 this aload 0 break case 1 this aload 1 break case 2 this aload 2 break case 3 this aload 3 break default this aload resolved Position  loadObject resolvedPosition resolvedPosition aload_0 aload_1 aload_2 aload_3 resolvedPosition
final public void lookupswitch Case Label default Label int keys int sorted Indexes Case Label cases Label if DEBUG System out println position t tlookupswitch NON NLS 1 count Labels 0 stack Depth int length keys length int pos position default Label place Instruction for int i 0 i length i cases Label i place Instruction if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lookupswitch for int i 3 pos 4 i 0 i if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset 0 default Label branch write Signed Word length for int i 0 i length i write Signed Word keys sorted Indexes i cases Label sorted Indexes i branch  CaseLabel defaultLabel sortedIndexes CaseLabel casesLabel countLabels stackDepth defaultLabel placeInstruction casesLabel placeInstruction classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lookupswitch classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset defaultLabel writeSignedWord writeSignedWord sortedIndexes casesLabel sortedIndexes
final public void lor if DEBUG System out println position t tlor NON NLS 1 count Labels 0 stack Depth 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lor  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lor
final public void lrem if DEBUG System out println position t tlrem NON NLS 1 count Labels 0 stack Depth 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lrem  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lrem
final public void lreturn if DEBUG System out println position t tlreturn NON NLS 1 count Labels 0 stack Depth 2 the stack Depth should be equal to 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lreturn  countLabels stackDepth stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lreturn
final public void lshl if DEBUG System out println position t tlshl NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lshl  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lshl
final public void lshr if DEBUG System out println position t tlshr NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lshr  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lshr
final public void lstore int i Arg if DEBUG System out println position t tlstore i Arg NON NLS 1 count Labels 0 stack Depth 2 if max Locals i Arg 1 max Locals i Arg 2 if i Arg 255 Widen if class File Offset 3 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC wide b Code Stream class File Offset OPC lstore write Unsigned Short i Arg else if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC lstore b Code Stream class File Offset byte i Arg  iArg iArg countLabels stackDepth maxLocals iArg maxLocals iArg iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_wide bCodeStream classFileOffset OPC_lstore writeUnsignedShort iArg classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lstore bCodeStream classFileOffset iArg
final public void lstore 0 if DEBUG System out println position t tlstore 0 NON NLS 1 count Labels 0 stack Depth 2 if max Locals 2 max Locals 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lstore 0  lstore_0 tlstore_0 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lstore_0
final public void lstore 1 if DEBUG System out println position t tlstore 1 NON NLS 1 count Labels 0 stack Depth 2 if max Locals 3 max Locals 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lstore 1  lstore_1 tlstore_1 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lstore_1
final public void lstore 2 if DEBUG System out println position t tlstore 2 NON NLS 1 count Labels 0 stack Depth 2 if max Locals 4 max Locals 4 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lstore 2  lstore_2 tlstore_2 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lstore_2
final public void lstore 3 if DEBUG System out println position t tlstore 3 NON NLS 1 count Labels 0 stack Depth 2 if max Locals 5 max Locals 5 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lstore 3  lstore_3 tlstore_3 countLabels stackDepth maxLocals maxLocals classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lstore_3
final public void lsub if DEBUG System out println position t tlsub NON NLS 1 count Labels 0 stack Depth 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lsub  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lsub
final public void lushr if DEBUG System out println position t tlushr NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lushr  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lushr
final public void lxor if DEBUG System out println position t tlxor NON NLS 1 count Labels 0 stack Depth 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC lxor  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_lxor
final public void monitorenter if DEBUG System out println position t tmonitorenter NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC monitorenter  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_monitorenter
final public void monitorexit if DEBUG System out println position t tmonitorexit NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC monitorexit  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_monitorexit
final public void multianewarray Type Binding type Binding int dimensions if DEBUG System out println position t tmultinewarray type Binding dimensions NON NLS 1 NON NLS 2 count Labels 0 stack Depth 1 dimensions if class File Offset 3 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC multianewarray write Unsigned Short constant Pool literal Index type Binding b Code Stream class File Offset byte dimensions  TypeBinding typeBinding typeBinding countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_multianewarray writeUnsignedShort constantPool literalIndex typeBinding bCodeStream classFileOffset
We didn t call it new because there is a conflit with the new keyword final public void new  Type Binding type Binding if DEBUG System out println position t tnew type Binding NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC new write Unsigned Short constant Pool literal Index type Binding  new_ TypeBinding typeBinding typeBinding countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_new writeUnsignedShort constantPool literalIndex typeBinding
final public void newarray int array Type if DEBUG System out println position t tnewarray array Type NON NLS 1 count Labels 0 if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC newarray b Code Stream class File Offset byte array Type  array_Type array_Type countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_newarray bCodeStream classFileOffset array_Type
public void new Array Scope scope Array Binding array Binding Type Binding component array Binding elements Type scope switch component id case T int this newarray 10 break case T byte this newarray 8 break case T boolean this newarray 4 break case T short this newarray 9 break case T char this newarray 5 break case T long this newarray 11 break case T float this newarray 6 break case T double this newarray 7 break default this anewarray component  newArray ArrayBinding arrayBinding TypeBinding arrayBinding elementsType T_int T_byte T_boolean T_short T_char T_long T_float T_double
public void new Java Lang Error new java lang Error if DEBUG System out println position t tnew java lang Error NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC new write Unsigned Short constant Pool literal Index For Java Lang Error  newJavaLangError countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_new writeUnsignedShort constantPool literalIndexForJavaLangError
public void new Java Lang Assertion Error new java lang Assertion Error if DEBUG System out println position t tnew java lang Assertion Error NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC new write Unsigned Short constant Pool literal Index For Java Lang Assertion Error  newJavaLangAssertionError AssertionError AssertionError countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_new writeUnsignedShort constantPool literalIndexForJavaLangAssertionError
public void new No Class Def Found Error new java lang No Class Def Found Error if DEBUG System out println position t tnew java lang No Class Def Found Error NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC new write Unsigned Short constant Pool literal Index For Java Lang No Class Def Found Error  newNoClassDefFoundError NoClassDefFoundError NoClassDefFoundError countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_new writeUnsignedShort constantPool literalIndexForJavaLangNoClassDefFoundError
public void new String Buffer new java lang String Buffer if DEBUG System out println position t tnew java lang String Buffer NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC new write Unsigned Short constant Pool literal Index For Java Lang String Buffer  newStringBuffer StringBuffer StringBuffer countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_new writeUnsignedShort constantPool literalIndexForJavaLangStringBuffer
public void new Wrapper For int typeID count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC new switch typeID case T int new java lang Integer if DEBUG System out println position t tnew java lang Integer NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang Integer break case T boolean new java lang Boolean if DEBUG System out println position t tnew java lang Boolean NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang Boolean break case T byte new java lang Byte if DEBUG System out println position t tnew java lang Byte NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang Byte break case T char new java lang Character if DEBUG System out println position t tnew java lang Character NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang Character break case T float new java lang Float if DEBUG System out println position t tnew java lang Float NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang Float break case T double new java lang Double if DEBUG System out println position t tnew java lang Double NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang Double break case T short new java lang Short if DEBUG System out println position t tnew java lang Short NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang Short break case T long new java lang Long if DEBUG System out println position t tnew java lang Long NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang Long break case T void new java lang Void if DEBUG System out println position t tnew java lang Void NON NLS 1 write Unsigned Short constant Pool literal Index For Java Lang Void  newWrapperFor countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_new T_int writeUnsignedShort constantPool literalIndexForJavaLangInteger T_boolean writeUnsignedShort constantPool literalIndexForJavaLangBoolean T_byte writeUnsignedShort constantPool literalIndexForJavaLangByte T_char writeUnsignedShort constantPool literalIndexForJavaLangCharacter T_float writeUnsignedShort constantPool literalIndexForJavaLangFloat T_double writeUnsignedShort constantPool literalIndexForJavaLangDouble T_short writeUnsignedShort constantPool literalIndexForJavaLangShort T_long writeUnsignedShort constantPool literalIndexForJavaLangLong T_void writeUnsignedShort constantPool literalIndexForJavaLangVoid
final public void nop if DEBUG System out println position t tnop NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC nop  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_nop
final public void pop if DEBUG System out println position t tpop NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC pop  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_pop
final public void pop2 if DEBUG System out println position t tpop2 NON NLS 1 count Labels 0 stack Depth 2 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC pop2  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_pop2
final public void putfield Field Binding field Binding if DEBUG System out println position t tputfield field Binding NON NLS 1 count Labels 0 int id if id field Binding type id T double id T long stack Depth 3 else stack Depth 2 if stack Depth stack Max stack Max stack Depth if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC putfield write Unsigned Short constant Pool literal Index field Binding  FieldBinding fieldBinding fieldBinding countLabels fieldBinding T_double T_long stackDepth stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_putfield writeUnsignedShort constantPool literalIndex fieldBinding
final public void putstatic Field Binding field Binding if DEBUG System out println position t tputstatic field Binding NON NLS 1 count Labels 0 int id if id field Binding type id T double id T long stack Depth 2 else stack Depth 1 if stack Depth stack Max stack Max stack Depth if class File Offset 2 b Code Stream length resize Byte Array position b Code Stream class File Offset OPC putstatic write Unsigned Short constant Pool literal Index field Binding  FieldBinding fieldBinding fieldBinding countLabels fieldBinding T_double T_long stackDepth stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_putstatic writeUnsignedShort constantPool literalIndex fieldBinding
public void record Local Variable Binding local if generate Local Variable Table Attributes return if all Locals Counter locals length resize the collection System arraycopy locals 0 locals new Local Variable Binding all Locals Counter LOCALS INCREMENT 0 all Locals Counter locals all Locals Counter local local initializationP Cs new int 4 local initialization Count 0  LocalVariableBinding generateLocalVariableTableAttributes allLocalsCounter LocalVariableBinding allLocalsCounter LOCALS_INCREMENT allLocalsCounter allLocalsCounter initializationPCs initializationCount
public void record Positions From int startPC int source Pos Record positions in the table only if nothing has already been recorded Since we output them on the way up children first for more specific info The pc To Source Map table is always sorted if generate Line Number Attributes return if source Pos 0 return no code generated for this node e g field without any initialization if position startPC return Widening an existing entry that already has the same source positions if pc To Source Map Size 4 pc To Source Map length resize the array pc To Source Map System arraycopy pc To Source Map 0 pc To Source Map new int pc To Source Map Size 1 0 pc To Source Map Size int new Line Class File search Line Number line Separator Positions source Pos last EntryPC represents the endPC of the last Entry if pc To Source Map Size 0 in this case there is already an entry in the table if pc To Source Map pc To Source Map Size 1 new Line if startPC last EntryPC we forgot to add an entry search if an existing entry exists for startPC int insertion Index insertion Index pc To Source Map pc To Source Map Size startPC if insertion Index 1 there is no existing entry starting with startPC int existing Entry Index index Of Same Line Entry SincePC startPC new Line index for PC the existing Entry Index corresponds to en entry with the same line and a PC startPC in this case it is relevant to widen this entry instead of creating a new one line1 this a b c with this code we generate each argument We generate a aload0 to invoke the constructor There is no entry for this aload0 bytecode The first entry is the one for the argument a But we want the constructor call to start at the aload0 pc and not just at the pc of the first argument So we widen the existing entry if there is one or we create a new entry with the startPC if existing Entry Index 1 widen existing entry pc To Source Map existing Entry Index startPC else we have to add an entry that won t be sorted So we sort the pc To Source Map System arraycopy pc To Source Map insertion Index pc To Source Map insertion Index 2 pc To Source Map Size insertion Index pc To Source Map insertion Index startPC pc To Source Map insertion Index new Line pc To Source Map Size 2 if position last EntryPC no bytecode since last entry pc pc To Source Map pc To Source Map Size last EntryPC pc To Source Map pc To Source Map Size new Line else we can safely add the new entry The endPC of the previous entry is not in conflit with the startPC of the new entry pc To Source Map pc To Source Map Size startPC pc To Source Map pc To Source Map Size new Line else the last recorded entry is on the same line But it could be relevant to widen this entry we want to extend this entry forward in case we generated some bytecode before the last entry that are not related to any statement if startPC pc To Source Map pc To Source Map Size 2 int insertion Index insertion Index pc To Source Map pc To Source Map Size startPC if insertion Index 1 widen the existing entry we have to figure out if we need to move the last entry at another location to keep a sorted table First we need to check if at the insertion position there is not an existing entry that includes the one we want to insert This is the case if pc To Source Map insertion Index 1 new Line In this case we don t want to change the table If not we want to insert a new entry Prior to insertion we want to check if it is worth doing an arraycopy If not we simply update the recorded pc if insertion Index 1 pc To Source Map insertion Index 1 new Line if pc To Source Map Size 4 pc To Source Map pc To Source Map Size 4 startPC System arraycopy pc To Source Map insertion Index pc To Source Map insertion Index 2 pc To Source Map Size 2 insertion Index pc To Source Map insertion Index startPC pc To Source Map insertion Index new Line else pc To Source Map pc To Source Map Size 2 startPC last EntryPC position else record the first entry pc To Source Map pc To Source Map Size startPC pc To Source Map pc To Source Map Size new Line last EntryPC position  recordPositionsFrom sourcePos pcToSourceMap generateLineNumberAttributes sourcePos pcToSourceMapSize pcToSourceMap pcToSourceMap pcToSourceMap pcToSourceMap pcToSourceMapSize pcToSourceMapSize newLine ClassFile searchLineNumber lineSeparatorPositions sourcePos lastEntryPC lastEntry pcToSourceMapSize pcToSourceMap pcToSourceMapSize newLine lastEntryPC insertionIndex insertionIndex pcToSourceMap pcToSourceMapSize insertionIndex existingEntryIndex indexOfSameLineEntrySincePC newLine existingEntryIndex existingEntryIndex pcToSourceMap existingEntryIndex pcToSourceMap pcToSourceMap insertionIndex pcToSourceMap insertionIndex pcToSourceMapSize insertionIndex pcToSourceMap insertionIndex pcToSourceMap insertionIndex newLine pcToSourceMapSize lastEntryPC pcToSourceMap pcToSourceMapSize lastEntryPC pcToSourceMap pcToSourceMapSize newLine pcToSourceMap pcToSourceMapSize pcToSourceMap pcToSourceMapSize newLine pcToSourceMap pcToSourceMapSize insertionIndex insertionIndex pcToSourceMap pcToSourceMapSize insertionIndex pcToSourceMap insertionIndex newLine insertionIndex pcToSourceMap insertionIndex newLine pcToSourceMapSize pcToSourceMap pcToSourceMapSize pcToSourceMap insertionIndex pcToSourceMap insertionIndex pcToSourceMapSize insertionIndex pcToSourceMap insertionIndex pcToSourceMap insertionIndex newLine pcToSourceMap pcToSourceMapSize lastEntryPC pcToSourceMap pcToSourceMapSize pcToSourceMap pcToSourceMapSize newLine lastEntryPC
param an Exception Label org eclipse jdt internal compiler codegen Exception Label public void register Exception Handler Exception Label an Exception Label int length if exception Handlers Number length exception Handlers length resize the exception handlers table System arraycopy exception Handlers 0 exception Handlers new Exception Label length LABELS INCREMENT 0 length no need to resize So just add the new exception label exception Handlers exception Handlers Number an Exception Label  anExceptionLabel ExceptionLabel registerExceptionHandler ExceptionLabel anExceptionLabel exceptionHandlersNumber exceptionHandlers exceptionHandlers exceptionHandlers ExceptionLabel LABELS_INCREMENT exceptionHandlers exceptionHandlersNumber anExceptionLabel
public final void remove Not Definitely Assigned Variables Scope scope int init State Index given some flow info make sure we did not loose some variables initialization if this happens then we must update their pc entries to reflect it in debug attributes if generate Local Variable Table Attributes return if init State Index last Init State Index When Removing Inits return last Init State Index When Removing Inits init State Index if last Init State Index When Adding Inits init State Index last Init State Index When Adding Inits 2 reinitialize add index add 1 remove 1 add 1 ignore second add add 1 remove 2 add 1 perform second add for int i 0 i visible Locals Count i Local Variable Binding local Binding visible Locals i if local Binding null if init State Index 1 is Definitely Assigned scope init State Index local Binding if local Binding initialization Count 0 local Binding record Initialization EndPC position  removeNotDefinitelyAssignedVariables initStateIndex generateLocalVariableTableAttributes initStateIndex lastInitStateIndexWhenRemovingInits lastInitStateIndexWhenRemovingInits initStateIndex lastInitStateIndexWhenAddingInits initStateIndex lastInitStateIndexWhenAddingInits visibleLocalsCount LocalVariableBinding localBinding visibleLocals localBinding initStateIndex isDefinitelyAssigned initStateIndex localBinding localBinding initializationCount localBinding recordInitializationEndPC
param reference Method org eclipse jdt internal compiler ast Abstract Method Declaration param target Class File org eclipse jdt internal compiler codegen Class File public void reset Abstract Method Declaration reference Method Class File target Class File init target Class File this method Declaration reference Method preserve Unused Locals reference Method scope problem Reporter options preserve All Local Variables initialize Max Locals reference Method binding  referenceMethod AbstractMethodDeclaration targetClassFile ClassFile AbstractMethodDeclaration referenceMethod ClassFile targetClassFile targetClassFile methodDeclaration referenceMethod preserveUnusedLocals referenceMethod problemReporter preserveAllLocalVariables initializeMaxLocals referenceMethod
param target Class File The given classfile to reset the code stream public void reset For Problem Clinit Class File target Class File init target Class File max Locals 0  targetClassFile resetForProblemClinit ClassFile targetClassFile targetClassFile maxLocals
private final void resize Byte Array int length b Code Stream length int required Size length length if class File Offset required Size must be sure to grow by enough required Size class File Offset length System arraycopy b Code Stream 0 b Code Stream new byte required Size 0 length  resizeByteArray bCodeStream requiredSize classFileOffset requiredSize requiredSize classFileOffset bCodeStream bCodeStream requiredSize
final public void ret int index if DEBUG System out println position t tret index NON NLS 1 count Labels 0 if index 255 Widen if class File Offset 3 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC wide b Code Stream class File Offset OPC ret write Unsigned Short index else Don t Widen if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset OPC ret b Code Stream class File Offset byte index  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_wide bCodeStream classFileOffset OPC_ret writeUnsignedShort classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_ret bCodeStream classFileOffset
final public void return  if DEBUG System out println position t treturn NON NLS 1 count Labels 0 the stack Depth should be equal to 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC return  return_ countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_return
final public void saload if DEBUG System out println position t tsaload NON NLS 1 count Labels 0 stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC saload  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_saload
final public void sastore if DEBUG System out println position t tsastore NON NLS 1 count Labels 0 stack Depth 3 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC sastore  countLabels stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_sastore
param operator Constant int param type ID int public void send Operator int operator Constant int type ID switch type ID case T int case T boolean case T char case T byte case T short switch operator Constant case PLUS this iadd break case MINUS this isub break case MULTIPLY this imul break case DIVIDE this idiv break case REMAINDER this irem break case LEFT SHIFT this ishl break case RIGHT SHIFT this ishr break case UNSIGNED RIGHT SHIFT this iushr break case AND this iand break case OR this ior break case XOR this ixor break break case T long switch operator Constant case PLUS this ladd break case MINUS this lsub break case MULTIPLY this lmul break case DIVIDE this ldiv break case REMAINDER this lrem break case LEFT SHIFT this lshl break case RIGHT SHIFT this lshr break case UNSIGNED RIGHT SHIFT this lushr break case AND this land break case OR this lor break case XOR this lxor break break case T float switch operator Constant case PLUS this fadd break case MINUS this fsub break case MULTIPLY this fmul break case DIVIDE this fdiv break case REMAINDER this frem break case T double switch operator Constant case PLUS this dadd break case MINUS this dsub break case MULTIPLY this dmul break case DIVIDE this ddiv break case REMAINDER this drem  operatorConstant type_ID sendOperator operatorConstant type_ID type_ID T_int T_boolean T_char T_byte T_short operatorConstant LEFT_SHIFT RIGHT_SHIFT UNSIGNED_RIGHT_SHIFT T_long operatorConstant LEFT_SHIFT RIGHT_SHIFT UNSIGNED_RIGHT_SHIFT T_float operatorConstant T_double operatorConstant
final public void sipush int s if DEBUG System out println position t tsipush s NON NLS 1 count Labels 0 stack Depth if stack Depth stack Max stack Max stack Depth if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC sipush write Signed Short s  countLabels stackDepth stackDepth stackMax stackMax stackDepth classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_sipush writeSignedShort
public static final void sort int tab int lo0 int hi0 int result int lo lo0 int hi hi0 int mid if hi0 lo0 Arbitrarily establishing partition element as the midpoint of the array mid tab lo0 hi0 2 loop through the array until indices cross while lo hi find the first element that is greater than or equal to the partition element starting from the left Index while lo hi0 tab lo mid lo find an element that is smaller than or equal to the partition element starting from the right Index while hi lo0 tab hi mid hi if the indexes have not crossed swap if lo hi swap tab lo hi result lo hi If the right index has not reached the left side of array must now sort the left partition if lo0 hi sort tab lo0 hi result If the left index has not reached the right side of array must now sort the right partition if lo hi0 sort tab lo hi0 result 
public final void store Local Variable Binding local Binding boolean value Required int local Position local Binding resolved Position Using dedicated int bytecode switch local Binding type id case Type Ids T int case Type Ids T char case Type Ids T byte case Type Ids T short case Type Ids T boolean if value Required this dup switch local Position case 0 this istore 0 break case 1 this istore 1 break case 2 this istore 2 break case 3 this istore 3 break case 1 internal failure trying to store into variable not supposed to be generated break default this istore local Position break case Type Ids T float if value Required this dup switch local Position case 0 this fstore 0 break case 1 this fstore 1 break case 2 this fstore 2 break case 3 this fstore 3 break default this fstore local Position break case Type Ids T double if value Required this dup2 switch local Position case 0 this dstore 0 break case 1 this dstore 1 break case 2 this dstore 2 break case 3 this dstore 3 break default this dstore local Position break case Type Ids T long if value Required this dup2 switch local Position case 0 this lstore 0 break case 1 this lstore 1 break case 2 this lstore 2 break case 3 this lstore 3 break default this lstore local Position break default Reference object if value Required this dup switch local Position case 0 this astore 0 break case 1 this astore 1 break case 2 this astore 2 break case 3 this astore 3 break default this astore local Position  LocalVariableBinding localBinding valueRequired localPosition localBinding resolvedPosition localBinding TypeIds T_int TypeIds T_char TypeIds T_byte TypeIds T_short TypeIds T_boolean valueRequired localPosition istore_0 istore_1 istore_2 istore_3 localPosition TypeIds T_float valueRequired localPosition fstore_0 fstore_1 fstore_2 fstore_3 localPosition TypeIds T_double valueRequired localPosition dstore_0 dstore_1 dstore_2 dstore_3 localPosition TypeIds T_long valueRequired localPosition lstore_0 lstore_1 lstore_2 lstore_3 localPosition valueRequired localPosition astore_0 astore_1 astore_2 astore_3 localPosition
public final void store Type Binding type int local Position Using dedicated int bytecode if type Int Binding type Char Binding type Byte Binding type Short Binding type Boolean Binding switch local Position case 0 this istore 0 break case 1 this istore 1 break case 2 this istore 2 break case 3 this istore 3 break default this istore local Position return Using dedicated float bytecode if type Float Binding switch local Position case 0 this fstore 0 break case 1 this fstore 1 break case 2 this fstore 2 break case 3 this fstore 3 break default this fstore local Position return Using dedicated long bytecode if type Long Binding switch local Position case 0 this lstore 0 break case 1 this lstore 1 break case 2 this lstore 2 break case 3 this lstore 3 break default this lstore local Position return Using dedicated double bytecode if type Double Binding switch local Position case 0 this dstore 0 break case 1 this dstore 1 break case 2 this dstore 2 break case 3 this dstore 3 break default this dstore local Position return Reference object switch local Position case 0 this astore 0 break case 1 this astore 1 break case 2 this astore 2 break case 3 this astore 3 break default this astore local Position  TypeBinding localPosition IntBinding CharBinding ByteBinding ShortBinding BooleanBinding localPosition istore_0 istore_1 istore_2 istore_3 localPosition FloatBinding localPosition fstore_0 fstore_1 fstore_2 fstore_3 localPosition LongBinding localPosition lstore_0 lstore_1 lstore_2 lstore_3 localPosition DoubleBinding localPosition dstore_0 dstore_1 dstore_2 dstore_3 localPosition localPosition astore_0 astore_1 astore_2 astore_3 localPosition
public final void store Int int local Position switch local Position case 0 this istore 0 break case 1 this istore 1 break case 2 this istore 2 break case 3 this istore 3 break default this istore local Position  storeInt localPosition localPosition istore_0 istore_1 istore_2 istore_3 localPosition
public final void store Object int local Position switch local Position case 0 this astore 0 break case 1 this astore 1 break case 2 this astore 2 break case 3 this astore 3 break default this astore local Position  storeObject localPosition localPosition astore_0 astore_1 astore_2 astore_3 localPosition
final public void swap if DEBUG System out println position t tswap NON NLS 1 count Labels 0 if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC swap  countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_swap
private static final void swap int a int i int j int result int T T a i a i a j a j T T result j result j result i result i T 
final public void tableswitch Case Label default Label int low int high int keys int sorted Indexes Case Label cases Label if DEBUG System out println position t ttableswitch NON NLS 1 count Labels 0 stack Depth int length cases Label length int pos position default Label place Instruction for int i 0 i length i cases Label i place Instruction if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset OPC tableswitch for int i 3 pos 4 i 0 i if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset 0 default Label branch write Signed Word low write Signed Word high int i low j low the index j is used to know if the index i is one of the missing entries in case of an optimized tableswitch while true int index int key keys index sorted Indexes j low if key i cases Label index branch j if i high break if high is maxint then avoids wrapping to minint else default Label branch i  CaseLabel defaultLabel sortedIndexes CaseLabel casesLabel countLabels stackDepth casesLabel defaultLabel placeInstruction casesLabel placeInstruction classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_tableswitch classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset defaultLabel writeSignedWord writeSignedWord sortedIndexes casesLabel defaultLabel
public String to String String Buffer buffer new String Buffer position NON NLS 1 buffer append position buffer append nstack Depth NON NLS 1 buffer append stack Depth buffer append nmax Stack NON NLS 1 buffer append stack Max buffer append nmax Locals NON NLS 1 buffer append max Locals buffer append NON NLS 1 return buffer to String  toString StringBuffer StringBuffer nstackDepth stackDepth nmaxStack stackMax nmaxLocals maxLocals toString
public void update Last Recorded EndPC int pos Tune positions in the table this is due to some extra bytecodes being added to some user code jumps OLD CODE if generate Line Number Attributes return pc To Source Map pc To Source Map Size 1 1 position need to update the initialization endPC in case of generation of local variable attributes update Local Variables Attribute pos if generate Line Number Attributes return this last EntryPC pos need to update the initialization endPC in case of generation of local variable attributes update Local Variables Attribute pos  updateLastRecordedEndPC generateLineNumberAttributes pcToSourceMap pcToSourceMapSize updateLocalVariablesAttribute generateLineNumberAttributes lastEntryPC updateLocalVariablesAttribute
public void update Local Variables Attribute int pos need to update the initialization endPC in case of generation of local variable attributes if generate Local Variable Table Attributes for int i 0 max locals length i max i Local Variable Binding local locals i if local null local initialization Count 0 if local initializationP Cs local initialization Count 1 1 1 pos local initializationP Cs local initialization Count 1 1 1 position  updateLocalVariablesAttribute generateLocalVariableTableAttributes LocalVariableBinding initializationCount initializationPCs initializationCount initializationPCs initializationCount
Write a signed 16 bits value into the byte array param value the signed short public final void write Signed Short int value we keep the resize in here because it is used outside the code stream if class File Offset 1 b Code Stream length resize Byte Array position 2 b Code Stream class File Offset byte value 8 b Code Stream class File Offset byte value  writeSignedShort classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset bCodeStream classFileOffset
public final void write Signed Short int pos int value int current Offset starting Class File Offset pos if current Offset 1 b Code Stream length resize Byte Array b Code Stream current Offset byte value 8 b Code Stream current Offset 1 byte value  writeSignedShort currentOffset startingClassFileOffset currentOffset bCodeStream resizeByteArray bCodeStream currentOffset bCodeStream currentOffset
public final void write Signed Word int value we keep the resize in here because it is used outside the code stream if class File Offset 3 b Code Stream length resize Byte Array position 4 b Code Stream class File Offset byte value 0xFF000000 24 b Code Stream class File Offset byte value 0xFF0000 16 b Code Stream class File Offset byte value 0xFF00 8 b Code Stream class File Offset byte value 0xFF  writeSignedWord classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset bCodeStream classFileOffset bCodeStream classFileOffset bCodeStream classFileOffset
public final void write Signed Word int pos int value int current Offset starting Class File Offset pos if current Offset 4 b Code Stream length resize Byte Array b Code Stream current Offset byte value 0xFF000000 24 b Code Stream current Offset byte value 0xFF0000 16 b Code Stream current Offset byte value 0xFF00 8 b Code Stream current Offset byte value 0xFF  writeSignedWord currentOffset startingClassFileOffset currentOffset bCodeStream resizeByteArray bCodeStream currentOffset bCodeStream currentOffset bCodeStream currentOffset bCodeStream currentOffset
Write a unsigned 16 bits value into the byte array param value the unsigned short protected final void write Unsigned Short int value position 2 b Code Stream class File Offset byte value 8 b Code Stream class File Offset byte value  writeUnsignedShort bCodeStream classFileOffset bCodeStream classFileOffset
public void generate Wide Reverted Conditional Branch byte reverted Opcode Label wide Target Label intermediate new Label this if class File Offset b Code Stream length resize Byte Array position b Code Stream class File Offset reverted Opcode intermediate branch this goto w wide Target intermediate place  generateWideRevertedConditionalBranch revertedOpcode wideTarget classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset revertedOpcode goto_w wideTarget

Constant Pool constructor comment public Constant Pool Class File class File this UTF8 Cache new Char Array Cache UTF8 INITIAL SIZE this string Cache new Char Array Cache STRING INITIAL SIZE this field Cache new Object Cache FIELD INITIAL SIZE this method Cache new Object Cache METHOD INITIAL SIZE this interface Method Cache new Object Cache INTERFACE INITIAL SIZE this class Cache new Object Cache CLASS INITIAL SIZE this name And Type Cache For Methods new Method Name And Type Cache NAMEANDTYPE INITIAL SIZE this name And Type Cache For Fields new Field Name And Type Cache NAMEANDTYPE INITIAL SIZE this pool Content class File header this current Offset class File header Offset current Offset is initialized to 0 by default this current Index 1 this class File class File  ConstantPool ConstantPool ClassFile classFile UTF8Cache CharArrayCache UTF8_INITIAL_SIZE stringCache CharArrayCache STRING_INITIAL_SIZE fieldCache ObjectCache FIELD_INITIAL_SIZE methodCache ObjectCache METHOD_INITIAL_SIZE interfaceMethodCache ObjectCache INTERFACE_INITIAL_SIZE classCache ObjectCache CLASS_INITIAL_SIZE nameAndTypeCacheForMethods MethodNameAndTypeCache NAMEANDTYPE_INITIAL_SIZE nameAndTypeCacheForFields FieldNameAndTypeCache NAMEANDTYPE_INITIAL_SIZE poolContent classFile currentOffset classFile headerOffset currentOffset currentIndex classFile classFile
Return the content of the receiver public byte dump Bytes System arraycopy pool Content 0 pool Content new byte current Offset 0 current Offset return pool Content  dumpBytes poolContent poolContent currentOffset currentOffset poolContent
Return the index of the field Binding Returns 1 if the field Binding is not a predefined field Binding the right index otherwise param field Binding org eclipse jdt internal compiler lookup Field Binding return CODE int CODE public int index Of Well Known Field Name And Type Field Binding field Binding if field Binding type id T JavaLangClass Char Operation equals field Binding name Qualified Names Constants TYPE return TYPE JAVALANGCLASS NAME AND TYPE if field Binding type id T JavaIoPrintStream Char Operation equals field Binding name Qualified Names Constants Out return OUT SYSTEM NAME AND TYPE return 1  fieldBinding fieldBinding fieldBinding fieldBinding FieldBinding indexOfWellKnownFieldNameAndType FieldBinding fieldBinding fieldBinding T_JavaLangClass CharOperation fieldBinding QualifiedNamesConstants TYPE_JAVALANGCLASS_NAME_AND_TYPE fieldBinding T_JavaIoPrintStream CharOperation fieldBinding QualifiedNamesConstants OUT_SYSTEM_NAME_AND_TYPE
Return the index of the field Binding Returns 1 if the field Binding is not a predefined field Binding the right index otherwise param field Binding org eclipse jdt internal compiler lookup Field Binding return CODE int CODE public int index Of Well Known Fields Field Binding field Binding switch field Binding declaring Class id case T JavaLangByte if Char Operation equals field Binding name Qualified Names Constants TYPE return TYPE BYTE FIELD break case T JavaLangShort if Char Operation equals field Binding name Qualified Names Constants TYPE return TYPE SHORT FIELD break case T JavaLangCharacter if Char Operation equals field Binding name Qualified Names Constants TYPE return TYPE CHARACTER FIELD break case T JavaLangInteger if Char Operation equals field Binding name Qualified Names Constants TYPE return TYPE INTEGER FIELD break case T JavaLangLong if Char Operation equals field Binding name Qualified Names Constants TYPE return TYPE LONG FIELD break case T JavaLangFloat if Char Operation equals field Binding name Qualified Names Constants TYPE return TYPE FLOAT FIELD break case T JavaLangDouble if Char Operation equals field Binding name Qualified Names Constants TYPE return TYPE DOUBLE FIELD break case T JavaLangBoolean if Char Operation equals field Binding name Qualified Names Constants TYPE return TYPE BOOLEAN FIELD break case T JavaLangVoid if Char Operation equals field Binding name Qualified Names Constants TYPE return TYPE VOID FIELD break case T JavaLangSystem if Char Operation equals field Binding name Qualified Names Constants Out return OUT SYSTEM FIELD return 1  fieldBinding fieldBinding fieldBinding fieldBinding FieldBinding indexOfWellKnownFields FieldBinding fieldBinding fieldBinding declaringClass T_JavaLangByte CharOperation fieldBinding QualifiedNamesConstants TYPE_BYTE_FIELD T_JavaLangShort CharOperation fieldBinding QualifiedNamesConstants TYPE_SHORT_FIELD T_JavaLangCharacter CharOperation fieldBinding QualifiedNamesConstants TYPE_CHARACTER_FIELD T_JavaLangInteger CharOperation fieldBinding QualifiedNamesConstants TYPE_INTEGER_FIELD T_JavaLangLong CharOperation fieldBinding QualifiedNamesConstants TYPE_LONG_FIELD T_JavaLangFloat CharOperation fieldBinding QualifiedNamesConstants TYPE_FLOAT_FIELD T_JavaLangDouble CharOperation fieldBinding QualifiedNamesConstants TYPE_DOUBLE_FIELD T_JavaLangBoolean CharOperation fieldBinding QualifiedNamesConstants TYPE_BOOLEAN_FIELD T_JavaLangVoid CharOperation fieldBinding QualifiedNamesConstants TYPE_VOID_FIELD T_JavaLangSystem CharOperation fieldBinding QualifiedNamesConstants OUT_SYSTEM_FIELD
Return the index of the method Binding Returns 1 if the method Binding is not a predefined method Binding the right index otherwise param method Binding org eclipse jdt internal compiler lookup Method Binding return CODE int CODE public int index Of Well Known Method Name And Type Method Binding method Binding char first Char method Binding selector 0 switch first Char case f if method Binding parameters length 1 method Binding parameters 0 id T JavaLangString method Binding return Type id T JavaLangClass Char Operation equals method Binding selector Qualified Names Constants For Name This method binding is for Name java lang String return FORNAME CLASS METHOD NAME AND TYPE break case if Char Operation equals method Binding selector Qualified Names Constants Init switch method Binding parameters length case 1 switch method Binding parameters 0 id case T String if Char Operation equals method Binding signature Qualified Names Constants String Constructor Signature return CONSTR STRING METHOD NAME AND TYPE else return 1 case T Object if Char Operation equals method Binding signature Qualified Names Constants Assertion Error Object Constr Signature return CONSTR OBJECT METHOD NAME AND TYPE else return 1 case T int if Char Operation equals method Binding signature Qualified Names Constants Assertion Error Int Constr Signature return CONSTR INT METHOD NAME AND TYPE else return 1 case T char if Char Operation equals method Binding signature Qualified Names Constants Assertion Error Char Constr Signature return CONSTR CHAR METHOD NAME AND TYPE else return 1 case T boolean if Char Operation equals method Binding signature Qualified Names Constants Assertion Error Boolean Constr Signature return CONSTR BOOLEAN METHOD NAME AND TYPE else return 1 case T float if Char Operation equals method Binding signature Qualified Names Constants Assertion Error Float Constr Signature return CONSTR FLOAT METHOD NAME AND TYPE else return 1 case T double if Char Operation equals method Binding signature Qualified Names Constants Assertion Error Double Constr Signature return CONSTR DOUBLE METHOD NAME AND TYPE else return 1 case T long if Char Operation equals method Binding signature Qualified Names Constants Assertion Error Long Constr Signature return CONSTR LONG METHOD NAME AND TYPE else return 1 case 0 if method Binding signature length 3 return DEFAULT CONSTR METHOD NAME AND TYPE break case a if method Binding parameters length 1 method Binding return Type id T JavaLangStringBuffer Char Operation equals method Binding selector Qualified Names Constants Append switch method Binding parameters 0 id case T int case T byte case T short This method binding is append int return APPEND INT METHOD NAME AND TYPE case T float This method binding is append float return APPEND FLOAT METHOD NAME AND TYPE case T long This method binding is append long return APPEND LONG METHOD NAME AND TYPE case T JavaLangObject This method binding is append java lang Object return APPEND OBJECT METHOD NAME AND TYPE case T char This method binding is append char return APPEND CHAR METHOD NAME AND TYPE case T JavaLangString This method binding is append java lang String return APPEND STRING METHOD NAME AND TYPE case T boolean This method binding is append boolean return APPEND BOOLEAN METHOD NAME AND TYPE case T double This method binding is append double return APPEND DOUBLE METHOD NAME AND TYPE break case t if method Binding parameters length 0 method Binding return Type id T JavaLangString Char Operation equals method Binding selector Qualified Names Constants To String This method binding is to String return TOSTRING METHOD NAME AND TYPE break case v if method Binding parameters length 1 method Binding return Type id T JavaLangString Char Operation equals method Binding selector Qualified Names Constants Value Of switch method Binding parameters 0 id case T Object return VALUEOF OBJECT METHOD NAME AND TYPE case T int case T short case T byte return VALUEOF INT METHOD NAME AND TYPE case T long return VALUEOF LONG METHOD NAME AND TYPE case T float return VALUEOF FLOAT METHOD NAME AND TYPE case T double return VALUEOF DOUBLE METHOD NAME AND TYPE case T boolean return VALUEOF BOOLEAN METHOD NAME AND TYPE case T char return VALUEOF CHAR METHOD NAME AND TYPE break case e if method Binding parameters length 1 method Binding parameters 0 id T int method Binding return Type id T void Char Operation equals method Binding selector Qualified Names Constants Exit This method binding is exit int return EXIT METHOD NAME AND TYPE break case g if method Binding selector length 10 method Binding parameters length 0 method Binding return Type id T JavaLangString Char Operation equals method Binding selector Qualified Names Constants Get Message This method binding is get Message return GETMESSAGE METHOD NAME AND TYPE if method Binding parameters length 0 method Binding return Type id T JavaLangClass Char Operation equals method Binding selector Qualified Names Constants Get Class return GETCLASS OBJECT METHOD NAME AND TYPE if method Binding parameters length 0 method Binding return Type id T JavaLangClass Char Operation equals method Binding selector Qualified Names Constants Get Component Type return GETCOMPONENTTYPE CLASS METHOD NAME AND TYPE break case i if method Binding parameters length 0 method Binding return Type id T JavaLangString Char Operation equals method Binding selector Qualified Names Constants Intern This method binding is to String return INTERN METHOD NAME AND TYPE return 1  methodBinding methodBinding methodBinding methodBinding MethodBinding indexOfWellKnownMethodNameAndType MethodBinding methodBinding firstChar methodBinding firstChar methodBinding methodBinding T_JavaLangString methodBinding returnType T_JavaLangClass CharOperation methodBinding QualifiedNamesConstants ForName forName FORNAME_CLASS_METHOD_NAME_AND_TYPE CharOperation methodBinding QualifiedNamesConstants methodBinding methodBinding T_String CharOperation methodBinding QualifiedNamesConstants StringConstructorSignature CONSTR_STRING_METHOD_NAME_AND_TYPE T_Object CharOperation methodBinding QualifiedNamesConstants AssertionErrorObjectConstrSignature CONSTR_OBJECT_METHOD_NAME_AND_TYPE T_int CharOperation methodBinding QualifiedNamesConstants AssertionErrorIntConstrSignature CONSTR_INT_METHOD_NAME_AND_TYPE T_char CharOperation methodBinding QualifiedNamesConstants AssertionErrorCharConstrSignature CONSTR_CHAR_METHOD_NAME_AND_TYPE T_boolean CharOperation methodBinding QualifiedNamesConstants AssertionErrorBooleanConstrSignature CONSTR_BOOLEAN_METHOD_NAME_AND_TYPE T_float CharOperation methodBinding QualifiedNamesConstants AssertionErrorFloatConstrSignature CONSTR_FLOAT_METHOD_NAME_AND_TYPE T_double CharOperation methodBinding QualifiedNamesConstants AssertionErrorDoubleConstrSignature CONSTR_DOUBLE_METHOD_NAME_AND_TYPE T_long CharOperation methodBinding QualifiedNamesConstants AssertionErrorLongConstrSignature CONSTR_LONG_METHOD_NAME_AND_TYPE methodBinding DEFAULT_CONSTR_METHOD_NAME_AND_TYPE methodBinding methodBinding returnType T_JavaLangStringBuffer CharOperation methodBinding QualifiedNamesConstants methodBinding T_int T_byte T_short APPEND_INT_METHOD_NAME_AND_TYPE T_float APPEND_FLOAT_METHOD_NAME_AND_TYPE T_long APPEND_LONG_METHOD_NAME_AND_TYPE T_JavaLangObject APPEND_OBJECT_METHOD_NAME_AND_TYPE T_char APPEND_CHAR_METHOD_NAME_AND_TYPE T_JavaLangString APPEND_STRING_METHOD_NAME_AND_TYPE T_boolean APPEND_BOOLEAN_METHOD_NAME_AND_TYPE T_double APPEND_DOUBLE_METHOD_NAME_AND_TYPE methodBinding methodBinding returnType T_JavaLangString CharOperation methodBinding QualifiedNamesConstants ToString toString TOSTRING_METHOD_NAME_AND_TYPE methodBinding methodBinding returnType T_JavaLangString CharOperation methodBinding QualifiedNamesConstants ValueOf methodBinding T_Object VALUEOF_OBJECT_METHOD_NAME_AND_TYPE T_int T_short T_byte VALUEOF_INT_METHOD_NAME_AND_TYPE T_long VALUEOF_LONG_METHOD_NAME_AND_TYPE T_float VALUEOF_FLOAT_METHOD_NAME_AND_TYPE T_double VALUEOF_DOUBLE_METHOD_NAME_AND_TYPE T_boolean VALUEOF_BOOLEAN_METHOD_NAME_AND_TYPE T_char VALUEOF_CHAR_METHOD_NAME_AND_TYPE methodBinding methodBinding T_int methodBinding returnType T_void CharOperation methodBinding QualifiedNamesConstants EXIT_METHOD_NAME_AND_TYPE methodBinding methodBinding methodBinding returnType T_JavaLangString CharOperation methodBinding QualifiedNamesConstants GetMessage getMessage GETMESSAGE_METHOD_NAME_AND_TYPE methodBinding methodBinding returnType T_JavaLangClass CharOperation methodBinding QualifiedNamesConstants GetClass GETCLASS_OBJECT_METHOD_NAME_AND_TYPE methodBinding methodBinding returnType T_JavaLangClass CharOperation methodBinding QualifiedNamesConstants GetComponentType GETCOMPONENTTYPE_CLASS_METHOD_NAME_AND_TYPE methodBinding methodBinding returnType T_JavaLangString CharOperation methodBinding QualifiedNamesConstants toString INTERN_METHOD_NAME_AND_TYPE
Return the index of the method Binding Returns 1 if the method Binding is not a predefined method Binding the right index otherwise param method Binding org eclipse jdt internal compiler lookup Method Binding return CODE int CODE public int index Of Well Known Methods Method Binding method Binding char first Char method Binding selector 0 switch method Binding declaring Class id case T JavaLangClass if first Char f method Binding is Static method Binding parameters length 1 method Binding parameters 0 id T JavaLangString method Binding return Type id T JavaLangClass Char Operation equals method Binding selector Qualified Names Constants For Name This method binding is for Name java lang String return FORNAME CLASS METHOD else if first Char d method Binding parameters length 0 method Binding return Type id T boolean Char Operation equals method Binding selector Qualified Names Constants Desired Assertion Status return DESIREDASSERTIONSTATUS CLASS METHOD else if first Char g method Binding parameters length 0 method Binding return Type id T JavaLangClass Char Operation equals method Binding selector Qualified Names Constants Get Component Type return GETCOMPONENTTYPE CLASS METHOD break case T JavaLangNoClassDefError if first Char method Binding parameters length 1 method Binding parameters 0 id T JavaLangString Char Operation equals method Binding selector Qualified Names Constants Init This method binding is No Class Def Found Error java lang String return NOCLASSDEFFOUNDERROR CONSTR METHOD break case T JavaLangReflectConstructor if first Char n method Binding parameters length 1 method Binding return Type id T JavaLangObject Char Operation equals method Binding selector Qualified Names Constants New Instance Char Operation equals method Binding parameters 0 constant Pool Name Qualified Names Constants Array Java Lang Object Constant Pool Name return NEWINSTANCE CONSTRUCTOR METHOD break case T JavaLangStringBuffer if first Char a method Binding parameters length 1 method Binding return Type id T JavaLangStringBuffer Char Operation equals method Binding selector Qualified Names Constants Append switch method Binding parameters 0 id case T int case T byte case T short This method binding is append int return APPEND INT METHOD case T float This method binding is append float return APPEND FLOAT METHOD case T long This method binding is append long return APPEND LONG METHOD case T JavaLangObject This method binding is append java lang Object return APPEND OBJECT METHOD case T char This method binding is append char return APPEND CHAR METHOD case T JavaLangString This method binding is append java lang String return APPEND STRING METHOD case T boolean This method binding is append boolean return APPEND BOOLEAN METHOD case T double This method binding is append double return APPEND DOUBLE METHOD else if first Char t method Binding parameters length 0 method Binding return Type id T JavaLangString Char Operation equals method Binding selector Qualified Names Constants To String This method binding is to String return STRINGBUFFER TOSTRING METHOD else if first Char Char Operation equals method Binding selector Qualified Names Constants Init if method Binding parameters length 1 method Binding parameters 0 id T JavaLangString This method binding is init String return STRINGBUFFER STRING CONSTR METHOD else if method Binding parameters length 0 This method binding is init return STRINGBUFFER DEFAULT CONSTR METHOD break case T JavaLangString if first Char v method Binding parameters length 1 method Binding return Type id T JavaLangString Char Operation equals method Binding selector Qualified Names Constants Value Of This method binding is value Of java lang Object switch method Binding parameters 0 id case T Object return VALUEOF OBJECT METHOD case T int case T short case T byte return VALUEOF INT METHOD case T long return VALUEOF LONG METHOD case T float return VALUEOF FLOAT METHOD case T double return VALUEOF DOUBLE METHOD case T boolean return VALUEOF BOOLEAN METHOD case T char return VALUEOF CHAR METHOD else if first Char i method Binding parameters length 0 method Binding return Type id T JavaLangString Char Operation equals method Binding selector Qualified Names Constants Intern This method binding is value Of java lang Object return STRING INTERN METHOD break case T JavaLangSystem if first Char e method Binding parameters length 1 method Binding parameters 0 id T int method Binding return Type id T void Char Operation equals method Binding selector Qualified Names Constants Exit This method binding is exit int return SYSTEM EXIT METHOD break case T JavaLangThrowable if first Char g method Binding selector length 10 method Binding parameters length 0 method Binding return Type id T JavaLangString Char Operation equals method Binding selector Qualified Names Constants Get Message This method binding is get Message return THROWABLE GETMESSAGE METHOD break case T JavaLangError if first Char method Binding parameters length 1 Char Operation equals method Binding selector Qualified Names Constants Init method Binding parameters 0 id T String return JAVALANGERROR CONSTR METHOD break case T JavaLangAssertionError if first Char Char Operation equals method Binding selector Qualified Names Constants Init switch method Binding parameters length case 0 return ASSERTIONERROR DEFAULT CONSTR METHOD case 1 switch method Binding parameters 0 id case T boolean return ASSERTIONERROR CONSTR BOOLEAN METHOD case T char return ASSERTIONERROR CONSTR CHAR METHOD case T double return ASSERTIONERROR CONSTR DOUBLE METHOD case T int case T byte case T short return ASSERTIONERROR CONSTR INT METHOD case T float return ASSERTIONERROR CONSTR FLOAT METHOD case T long return ASSERTIONERROR CONSTR LONG METHOD default return ASSERTIONERROR CONSTR OBJECT METHOD break case T JavaLangObject if method Binding parameters length 0 Char Operation equals method Binding selector Qualified Names Constants Get Class return GETCLASS OBJECT METHOD return 1  methodBinding methodBinding methodBinding methodBinding MethodBinding indexOfWellKnownMethods MethodBinding methodBinding firstChar methodBinding methodBinding declaringClass T_JavaLangClass firstChar methodBinding isStatic methodBinding methodBinding T_JavaLangString methodBinding returnType T_JavaLangClass CharOperation methodBinding QualifiedNamesConstants ForName forName FORNAME_CLASS_METHOD firstChar methodBinding methodBinding returnType T_boolean CharOperation methodBinding QualifiedNamesConstants DesiredAssertionStatus DESIREDASSERTIONSTATUS_CLASS_METHOD firstChar methodBinding methodBinding returnType T_JavaLangClass CharOperation methodBinding QualifiedNamesConstants GetComponentType GETCOMPONENTTYPE_CLASS_METHOD T_JavaLangNoClassDefError firstChar methodBinding methodBinding T_JavaLangString CharOperation methodBinding QualifiedNamesConstants NoClassDefFoundError NOCLASSDEFFOUNDERROR_CONSTR_METHOD T_JavaLangReflectConstructor firstChar methodBinding methodBinding returnType T_JavaLangObject CharOperation methodBinding QualifiedNamesConstants NewInstance CharOperation methodBinding constantPoolName QualifiedNamesConstants ArrayJavaLangObjectConstantPoolName NEWINSTANCE_CONSTRUCTOR_METHOD T_JavaLangStringBuffer firstChar methodBinding methodBinding returnType T_JavaLangStringBuffer CharOperation methodBinding QualifiedNamesConstants methodBinding T_int T_byte T_short APPEND_INT_METHOD T_float APPEND_FLOAT_METHOD T_long APPEND_LONG_METHOD T_JavaLangObject APPEND_OBJECT_METHOD T_char APPEND_CHAR_METHOD T_JavaLangString APPEND_STRING_METHOD T_boolean APPEND_BOOLEAN_METHOD T_double APPEND_DOUBLE_METHOD firstChar methodBinding methodBinding returnType T_JavaLangString CharOperation methodBinding QualifiedNamesConstants ToString toString STRINGBUFFER_TOSTRING_METHOD firstChar CharOperation methodBinding QualifiedNamesConstants methodBinding methodBinding T_JavaLangString STRINGBUFFER_STRING_CONSTR_METHOD methodBinding STRINGBUFFER_DEFAULT_CONSTR_METHOD T_JavaLangString firstChar methodBinding methodBinding returnType T_JavaLangString CharOperation methodBinding QualifiedNamesConstants ValueOf valueOf methodBinding T_Object VALUEOF_OBJECT_METHOD T_int T_short T_byte VALUEOF_INT_METHOD T_long VALUEOF_LONG_METHOD T_float VALUEOF_FLOAT_METHOD T_double VALUEOF_DOUBLE_METHOD T_boolean VALUEOF_BOOLEAN_METHOD T_char VALUEOF_CHAR_METHOD firstChar methodBinding methodBinding returnType T_JavaLangString CharOperation methodBinding QualifiedNamesConstants valueOf STRING_INTERN_METHOD T_JavaLangSystem firstChar methodBinding methodBinding T_int methodBinding returnType T_void CharOperation methodBinding QualifiedNamesConstants SYSTEM_EXIT_METHOD T_JavaLangThrowable firstChar methodBinding methodBinding methodBinding returnType T_JavaLangString CharOperation methodBinding QualifiedNamesConstants GetMessage getMessage THROWABLE_GETMESSAGE_METHOD T_JavaLangError firstChar methodBinding CharOperation methodBinding QualifiedNamesConstants methodBinding T_String JAVALANGERROR_CONSTR_METHOD T_JavaLangAssertionError firstChar CharOperation methodBinding QualifiedNamesConstants methodBinding ASSERTIONERROR_DEFAULT_CONSTR_METHOD methodBinding T_boolean ASSERTIONERROR_CONSTR_BOOLEAN_METHOD T_char ASSERTIONERROR_CONSTR_CHAR_METHOD T_double ASSERTIONERROR_CONSTR_DOUBLE_METHOD T_int T_byte T_short ASSERTIONERROR_CONSTR_INT_METHOD T_float ASSERTIONERROR_CONSTR_FLOAT_METHOD T_long ASSERTIONERROR_CONSTR_LONG_METHOD ASSERTIONERROR_CONSTR_OBJECT_METHOD T_JavaLangObject methodBinding CharOperation methodBinding QualifiedNamesConstants GetClass GETCLASS_OBJECT_METHOD
Return the index of the type Binding Returns 1 if the type Binding is not a predefined binding the right index otherwise param type Binding org eclipse jdt internal compiler lookup Type Binding return CODE int CODE public int index Of Well Known Types Type Binding type Binding switch type Binding id case T JavaLangBoolean return JAVA LANG BOOLEAN TYPE case T JavaLangByte return JAVA LANG BYTE TYPE case T JavaLangCharacter return JAVA LANG CHARACTER TYPE case T JavaLangDouble return JAVA LANG DOUBLE TYPE case T JavaLangFloat return JAVA LANG FLOAT TYPE case T JavaLangInteger return JAVA LANG INTEGER TYPE case T JavaLangLong return JAVA LANG LONG TYPE case T JavaLangShort return JAVA LANG SHORT TYPE case T JavaLangVoid return JAVA LANG VOID TYPE case T JavaLangClass return JAVA LANG CLASS TYPE case T JavaLangClassNotFoundException return JAVA LANG CLASSNOTFOUNDEXCEPTION TYPE case T JavaLangNoClassDefError return JAVA LANG NOCLASSDEFFOUNDERROR TYPE case T JavaLangObject return JAVA LANG OBJECT TYPE case T JavaLangString return JAVA LANG STRING TYPE case T JavaLangStringBuffer return JAVA LANG STRINGBUFFER TYPE case T JavaLangSystem return JAVA LANG SYSTEM TYPE case T JavaLangThrowable return JAVA LANG THROWABLE TYPE case T JavaLangError return JAVA LANG ERROR TYPE case T JavaLangException return JAVA LANG EXCEPTION TYPE case T JavaLangReflectConstructor return JAVA LANG REFLECT CONSTRUCTOR TYPE case T JavaLangAssertionError return JAVA LANG ASSERTIONERROR TYPE return 1  typeBinding typeBinding typeBinding TypeBinding indexOfWellKnownTypes TypeBinding typeBinding typeBinding T_JavaLangBoolean JAVA_LANG_BOOLEAN_TYPE T_JavaLangByte JAVA_LANG_BYTE_TYPE T_JavaLangCharacter JAVA_LANG_CHARACTER_TYPE T_JavaLangDouble JAVA_LANG_DOUBLE_TYPE T_JavaLangFloat JAVA_LANG_FLOAT_TYPE T_JavaLangInteger JAVA_LANG_INTEGER_TYPE T_JavaLangLong JAVA_LANG_LONG_TYPE T_JavaLangShort JAVA_LANG_SHORT_TYPE T_JavaLangVoid JAVA_LANG_VOID_TYPE T_JavaLangClass JAVA_LANG_CLASS_TYPE T_JavaLangClassNotFoundException JAVA_LANG_CLASSNOTFOUNDEXCEPTION_TYPE T_JavaLangNoClassDefError JAVA_LANG_NOCLASSDEFFOUNDERROR_TYPE T_JavaLangObject JAVA_LANG_OBJECT_TYPE T_JavaLangString JAVA_LANG_STRING_TYPE T_JavaLangStringBuffer JAVA_LANG_STRINGBUFFER_TYPE T_JavaLangSystem JAVA_LANG_SYSTEM_TYPE T_JavaLangThrowable JAVA_LANG_THROWABLE_TYPE T_JavaLangError JAVA_LANG_ERROR_TYPE T_JavaLangException JAVA_LANG_EXCEPTION_TYPE T_JavaLangReflectConstructor JAVA_LANG_REFLECT_CONSTRUCTOR_TYPE T_JavaLangAssertionError JAVA_LANG_ASSERTIONERROR_TYPE
public int literal Index byte utf8encoding char string Char Array int index if index UTF8 Cache get string Char Array 0 The entry doesn t exit yet index UTF8 Cache put string Char Array current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type current Index Write the tag first writeU1 Utf8 Tag Then the size of the string Name array writeU2 utf8 Constant length int saved Current Offset current Offset int utf8encoding Length utf8encoding length if current Offset 2 utf8encoding Length pool Content length we need to resize the pool Content array because we won t have enough space to write the length resize Pool Contents 2 utf8encoding Length current Offset 2 add in once the whole byte array System arraycopy utf8encoding 0 pool Content current Offset utf8encoding Length current Offset utf8encoding Length Now we know the length that we have to write in the constant pool we use saved Current Offset to do that pool Content saved Current Offset byte utf8encoding Length 8 pool Content saved Current Offset 1 byte utf8encoding Length return index  literalIndex stringCharArray UTF8Cache stringCharArray UTF8Cache stringCharArray currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType currentIndex Utf8Tag stringName utf8Constant savedCurrentOffset currentOffset utf8encodingLength currentOffset utf8encodingLength poolContent poolContent resizePoolContents utf8encodingLength currentOffset poolContent currentOffset utf8encodingLength currentOffset utf8encodingLength savedCurrentOffset poolContent savedCurrentOffset utf8encodingLength poolContent savedCurrentOffset utf8encodingLength
This method returns the index into the constant Pool corresponding to the type descriptor param utf8 Constant char return CODE int CODE public int literal Index char utf8 Constant int index if index UTF8 Cache get utf8 Constant 0 The entry doesn t exit yet Write the tag first writeU1 Utf8 Tag Then the size of the string Name array int saved Current Offset current Offset if current Offset 2 pool Content length we need to resize the pool Content array because we won t have enough space to write the length resize Pool Contents 2 current Offset 2 int length 0 for int i 0 i utf8 Constant length i char current utf8 Constant i if current 0x0001 current 0x007F we only need one byte ASCII table writeU1 current length else if current 0x07FF we need 3 bytes length 3 writeU1 0xE0 current 12 0x0F 0xE0 1110 0000 writeU1 0x80 current 6 0x3F 0x80 1000 0000 writeU1 0x80 current 0x3F 0x80 1000 0000 else we can be 0 or between 0x0080 and 0x07FF In that case we only need 2 bytes length 2 writeU1 0xC0 current 6 0x1F 0xC0 1100 0000 writeU1 0x80 current 0x3F 0x80 1000 0000 if length 65535 current Offset saved Current Offset 1 this class File reference Binding scope problem Reporter no More Available Space For Constant this class File reference Binding scope reference Type index UTF8 Cache put utf8 Constant current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type current Index Now we know the length that we have to write in the constant pool we use saved Current Offset to do that pool Content saved Current Offset byte length 8 pool Content saved Current Offset 1 byte length return index  constantPool utf8Constant literalIndex utf8Constant UTF8Cache utf8Constant Utf8Tag stringName savedCurrentOffset currentOffset currentOffset poolContent poolContent resizePoolContents currentOffset utf8Constant utf8Constant currentOffset savedCurrentOffset classFile referenceBinding problemReporter noMoreAvailableSpaceForConstant classFile referenceBinding referenceType UTF8Cache utf8Constant currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType currentIndex savedCurrentOffset poolContent savedCurrentOffset poolContent savedCurrentOffset
public int literal Index char string Char Array byte utf8encoding int index int string Index if index string Cache get string Char Array 0 The entry doesn t exit yet string Index literal Index utf8encoding string Char Array index string Cache put string Char Array current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the tag first writeU1 String Tag Then the string index writeU2 string Index return index  literalIndex stringCharArray stringIndex stringCache stringCharArray stringIndex literalIndex stringCharArray stringCache stringCharArray currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType StringTag stringIndex
This method returns the index into the constant Pool corresponding to the double value If the double is not already present into the pool it is added The double cache is updated and it returns the right index param key CODE double CODE return CODE int CODE public int literal Index double key Retrieve the index from the cache The double constant takes two indexes into the constant pool but we only store the first index into the long table int index lazy initialization for base type caches If it is null initialize it otherwise use it if double Cache null double Cache new Double Cache DOUBLE INITIAL SIZE if index double Cache get key 0 index double Cache put key current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type current Index a double needs an extra place into the constant pool Write the double into the constant pool First add the tag writeU1 Double Tag Then add the 8 bytes representing the double long temp java lang Double double To Long Bits key int length pool Content length if current Offset 8 length resize Pool Contents 8 for int i 0 i 8 i pool Content current Offset byte temp 56 i 3 return index  constantPool literalIndex doubleCache doubleCache DoubleCache DOUBLE_INITIAL_SIZE doubleCache doubleCache currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType currentIndex DoubleTag doubleToLongBits poolContent currentOffset resizePoolContents poolContent currentOffset
This method returns the index into the constant Pool corresponding to the float value If the float is not already present into the pool it is added The int cache is updated and it returns the right index param key CODE float CODE return CODE int CODE public int literal Index float key Retrieve the index from the cache int index lazy initialization for base type caches If it is null initialize it otherwise use it if float Cache null float Cache new Float Cache FLOAT INITIAL SIZE if index float Cache get key 0 index float Cache put key current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the float constant entry into the constant pool First add the tag writeU1 Float Tag Then add the 4 bytes representing the float int temp java lang Float float To Int Bits key if current Offset 4 pool Content length resize Pool Contents 4 for int i 0 i 4 i pool Content current Offset byte temp 24 i 8 return index  constantPool literalIndex floatCache floatCache FloatCache FLOAT_INITIAL_SIZE floatCache floatCache currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType FloatTag floatToIntBits currentOffset poolContent resizePoolContents poolContent currentOffset
This method returns the index into the constant Pool corresponding to the int value If the int is not already present into the pool it is added The int cache is updated and it returns the right index param key CODE int CODE return CODE int CODE public int literal Index int key Retrieve the index from the cache int index lazy initialization for base type caches If it is null initialize it otherwise use it if int Cache null int Cache new Integer Cache INT INITIAL SIZE if index int Cache get key 0 index int Cache put key current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the integer constant entry into the constant pool First add the tag writeU1 Integer Tag Then add the 4 bytes representing the int if current Offset 4 pool Content length resize Pool Contents 4 for int i 0 i 4 i pool Content current Offset byte key 24 i 8 return index  constantPool literalIndex intCache intCache IntegerCache INT_INITIAL_SIZE intCache intCache currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType IntegerTag currentOffset poolContent resizePoolContents poolContent currentOffset
This method returns the index into the constant Pool corresponding to the long value If the long is not already present into the pool it is added The long cache is updated and it returns the right index param key CODE long CODE return CODE int CODE public int literal Index long key Retrieve the index from the cache The long constant takes two indexes into the constant pool but we only store the first index into the long table int index lazy initialization for base type caches If it is null initialize it otherwise use it if long Cache null long Cache new Long Cache LONG INITIAL SIZE if index long Cache get key 0 index long Cache put key current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type current Index long value need an extra place into thwe constant pool Write the long into the constant pool First add the tag writeU1 Long Tag Then add the 8 bytes representing the long if current Offset 8 pool Content length resize Pool Contents 8 for int i 0 i 8 i pool Content current Offset byte key 56 i 3 return index  constantPool literalIndex longCache longCache LongCache LONG_INITIAL_SIZE longCache longCache currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType currentIndex LongTag currentOffset poolContent resizePoolContents poolContent currentOffset
This method returns the index into the constant Pool corresponding to the type descriptor param string Constant java lang String return CODE int CODE public int literal Index String string Constant int index char string Char Array string Constant to Char Array if index string Cache get string Char Array 0 The entry doesn t exit yet int string Index literal Index string Char Array index string Cache put string Char Array current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the tag first writeU1 String Tag Then the string index writeU2 string Index return index  constantPool stringConstant literalIndex stringConstant stringCharArray stringConstant toCharArray stringCache stringCharArray stringIndex literalIndex stringCharArray stringCache stringCharArray currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType StringTag stringIndex
This method returns the index into the constant Pool corresponding to the field binding a Field Binding param a Field Binding Field Binding return CODE int CODE public int literal Index Field Binding a Field Binding int index int name And Type Index int class Index int index Well Known Field if index Well Known Field index Of Well Known Fields a Field Binding 1 if index field Cache get a Field Binding 0 The entry doesn t exit yet class Index literal Index a Field Binding declaring Class name And Type Index literal Index For Fields literal Index a Field Binding name literal Index a Field Binding type signature a Field Binding index field Cache put a Field Binding current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Field Ref Tag writeU2 class Index writeU2 name And Type Index else if index well Known Fields index Well Known Field 0 that field need to be inserted class Index literal Index a Field Binding declaring Class name And Type Index literal Index For Fields literal Index a Field Binding name literal Index a Field Binding type signature a Field Binding index well Known Fields index Well Known Field current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Field Ref Tag writeU2 class Index writeU2 name And Type Index return index  constantPool aFieldBinding aFieldBinding FieldBinding literalIndex FieldBinding aFieldBinding nameAndTypeIndex classIndex indexWellKnownField indexWellKnownField indexOfWellKnownFields aFieldBinding fieldCache aFieldBinding classIndex literalIndex aFieldBinding declaringClass nameAndTypeIndex literalIndexForFields literalIndex aFieldBinding literalIndex aFieldBinding aFieldBinding fieldCache aFieldBinding currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType FieldRefTag classIndex nameAndTypeIndex wellKnownFields indexWellKnownField classIndex literalIndex aFieldBinding declaringClass nameAndTypeIndex literalIndexForFields literalIndex aFieldBinding literalIndex aFieldBinding aFieldBinding wellKnownFields indexWellKnownField currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType FieldRefTag classIndex nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant Note uses the method binding constant Pool Declaring Class which could be an array type for the array clone method see Updated Method Declaration param a Method Binding Method Binding return CODE int CODE public int literal Index Method Binding a Method Binding int index int name And Type Index int class Index int index Well Known Method if index Well Known Method index Of Well Known Methods a Method Binding 1 if a Method Binding constant Pool Declaring Class is Interface Lookinf into the interface method ref table if index interface Method Cache get a Method Binding 0 class Index literal Index a Method Binding constant Pool Declaring Class name And Type Index literal Index For Methods literal Index a Method Binding constant Pool Name literal Index a Method Binding signature a Method Binding index interface Method Cache put a Method Binding current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the interface method ref constant into the constant pool First add the tag writeU1 Interface Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index else Lookinf into the method ref table if index method Cache get a Method Binding 0 class Index literal Index a Method Binding constant Pool Declaring Class name And Type Index literal Index For Methods literal Index a Method Binding constant Pool Name literal Index a Method Binding signature a Method Binding index method Cache put a Method Binding current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index else This is a well known method if index well Known Methods index Well Known Method 0 this methods was not inserted yet if a Method Binding constant Pool Declaring Class is Interface Lookinf into the interface method ref table class Index literal Index a Method Binding constant Pool Declaring Class name And Type Index literal Index For Methods literal Index a Method Binding constant Pool Name literal Index a Method Binding signature a Method Binding index well Known Methods index Well Known Method current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the interface method ref constant into the constant pool First add the tag writeU1 Interface Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index else Lookinf into the method ref table class Index literal Index a Method Binding constant Pool Declaring Class name And Type Index literal Index For Methods literal Index a Method Binding constant Pool Name literal Index a Method Binding signature a Method Binding index well Known Methods index Well Known Method current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool constantPoolDeclaringClass UpdatedMethodDeclaration aMethodBinding MethodBinding literalIndex MethodBinding aMethodBinding nameAndTypeIndex classIndex indexWellKnownMethod indexWellKnownMethod indexOfWellKnownMethods aMethodBinding aMethodBinding constantPoolDeclaringClass isInterface interfaceMethodCache aMethodBinding classIndex literalIndex aMethodBinding constantPoolDeclaringClass nameAndTypeIndex literalIndexForMethods literalIndex aMethodBinding constantPoolName literalIndex aMethodBinding aMethodBinding interfaceMethodCache aMethodBinding currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType InterfaceMethodRefTag classIndex nameAndType nameAndTypeIndex methodCache aMethodBinding classIndex literalIndex aMethodBinding constantPoolDeclaringClass nameAndTypeIndex literalIndexForMethods literalIndex aMethodBinding constantPoolName literalIndex aMethodBinding aMethodBinding methodCache aMethodBinding currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex wellKnownMethods indexWellKnownMethod aMethodBinding constantPoolDeclaringClass isInterface classIndex literalIndex aMethodBinding constantPoolDeclaringClass nameAndTypeIndex literalIndexForMethods literalIndex aMethodBinding constantPoolName literalIndex aMethodBinding aMethodBinding wellKnownMethods indexWellKnownMethod currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType InterfaceMethodRefTag classIndex nameAndType nameAndTypeIndex classIndex literalIndex aMethodBinding constantPoolDeclaringClass nameAndTypeIndex literalIndexForMethods literalIndex aMethodBinding constantPoolName literalIndex aMethodBinding aMethodBinding wellKnownMethods indexWellKnownMethod currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor param a Type Binding Type Binding return CODE int CODE public int literal Index Type Binding a Type Binding int index int name Index int index Well Known Type if index Well Known Type index Of Well Known Types a Type Binding 1 if index class Cache get a Type Binding 0 The entry doesn t exit yet name Index literal Index a Type Binding constant Pool Name index class Cache put a Type Binding current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index else if index well Known Types index Well Known Type 0 Need to insert that binding name Index literal Index a Type Binding constant Pool Name index well Known Types index Well Known Type current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool aTypeBinding TypeBinding literalIndex TypeBinding aTypeBinding nameIndex indexWellKnownType indexWellKnownType indexOfWellKnownTypes aTypeBinding classCache aTypeBinding nameIndex literalIndex aTypeBinding constantPoolName classCache aTypeBinding currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex wellKnownTypes indexWellKnownType nameIndex literalIndex aTypeBinding constantPoolName wellKnownTypes indexWellKnownType currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding name And Type constant with name Index type Index param name Index int param type Index int param key org eclipse jdt internal compiler lookup Field Binding return CODE int CODE public int literal Index For Fields int name Index int type Index Field Binding key int index int index Of Well Known Field Name And Type if index Of Well Known Field Name And Type index Of Well Known Field Name And Type key 1 check if the entry already exists if index name And Type Cache For Fields get key 1 The entry doesn t exit yet index name And Type Cache For Fields put key current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Name And Type Tag writeU2 name Index writeU2 type Index else if index well Known Field Name And Types index Of Well Known Field Name And Type 0 index well Known Field Name And Types index Of Well Known Field Name And Type current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Name And Type Tag writeU2 name Index writeU2 type Index return index  constantPool nameAndType nameIndex typeIndex nameIndex typeIndex FieldBinding literalIndexForFields nameIndex typeIndex FieldBinding indexOfWellKnownFieldNameAndType indexOfWellKnownFieldNameAndType indexOfWellKnownFieldNameAndType nameAndTypeCacheForFields nameAndTypeCacheForFields currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType NameAndTypeTag nameIndex typeIndex wellKnownFieldNameAndTypes indexOfWellKnownFieldNameAndType wellKnownFieldNameAndTypes indexOfWellKnownFieldNameAndType currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType NameAndTypeTag nameIndex typeIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Boolean int index if index well Known Types JAVA LANG BOOLEAN TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Boolean Constant Pool Name index well Known Types JAVA LANG BOOLEAN TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangBoolean wellKnownTypes JAVA_LANG_BOOLEAN_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangBooleanConstantPoolName wellKnownTypes JAVA_LANG_BOOLEAN_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the field binding a Field Binding return CODE int CODE public int literal Index For Java Lang BooleanTYPE int index if index well Known Fields TYPE BOOLEAN FIELD 0 int name And Type Index int class Index The entry doesn t exit yet class Index literal Index For Java Lang Boolean if name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE 0 int name Index literal Index Qualified Names Constants TYPE int type Index literal Index Qualified Names Constants Java Lang Class Signature name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Fields TYPE BOOLEAN FIELD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Field Ref Tag writeU2 class Index writeU2 name And Type Index return index  constantPool aFieldBinding literalIndexForJavaLangBooleanTYPE wellKnownFields TYPE_BOOLEAN_FIELD nameAndTypeIndex classIndex classIndex literalIndexForJavaLangBoolean nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants JavaLangClassSignature nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownFields TYPE_BOOLEAN_FIELD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType FieldRefTag classIndex nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Byte int index if index well Known Types JAVA LANG BYTE TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Byte Constant Pool Name index well Known Types JAVA LANG BYTE TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangByte wellKnownTypes JAVA_LANG_BYTE_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangByteConstantPoolName wellKnownTypes JAVA_LANG_BYTE_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the field binding a Field Binding return CODE int CODE public int literal Index For Java Lang ByteTYPE int index if index well Known Fields TYPE BYTE FIELD 0 int name And Type Index int class Index The entry doesn t exit yet class Index literal Index For Java Lang Byte if name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE 0 int name Index literal Index Qualified Names Constants TYPE int type Index literal Index Qualified Names Constants Java Lang Class Signature name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Fields TYPE BYTE FIELD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Field Ref Tag writeU2 class Index writeU2 name And Type Index return index  constantPool aFieldBinding literalIndexForJavaLangByteTYPE wellKnownFields TYPE_BYTE_FIELD nameAndTypeIndex classIndex classIndex literalIndexForJavaLangByte nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants JavaLangClassSignature nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownFields TYPE_BYTE_FIELD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType FieldRefTag classIndex nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Character int index if index well Known Types JAVA LANG CHARACTER TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Character Constant Pool Name index well Known Types JAVA LANG CHARACTER TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangCharacter wellKnownTypes JAVA_LANG_CHARACTER_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangCharacterConstantPoolName wellKnownTypes JAVA_LANG_CHARACTER_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the field binding a Field Binding return CODE int CODE public int literal Index For Java Lang CharacterTYPE int index if index well Known Fields TYPE CHARACTER FIELD 0 int name And Type Index int class Index The entry doesn t exit yet class Index literal Index For Java Lang Character if name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE 0 int name Index literal Index Qualified Names Constants TYPE int type Index literal Index Qualified Names Constants Java Lang Class Signature name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Fields TYPE CHARACTER FIELD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Field Ref Tag writeU2 class Index writeU2 name And Type Index return index  constantPool aFieldBinding literalIndexForJavaLangCharacterTYPE wellKnownFields TYPE_CHARACTER_FIELD nameAndTypeIndex classIndex classIndex literalIndexForJavaLangCharacter nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants JavaLangClassSignature nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownFields TYPE_CHARACTER_FIELD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType FieldRefTag classIndex nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Class int index if index well Known Types JAVA LANG CLASS TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Class Constant Pool Name index well Known Types JAVA LANG CLASS TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangClass wellKnownTypes JAVA_LANG_CLASS_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangClassConstantPoolName wellKnownTypes JAVA_LANG_CLASS_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Class For Name int index int name And Type Index int class Index Looking into the method ref table if index well Known Methods FORNAME CLASS METHOD 0 class Index literal Index For Java Lang Class if name And Type Index well Known Method Name And Types FORNAME CLASS METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants For Name int type Index literal Index Qualified Names Constants For Name Signature name And Type Index well Known Method Name And Types FORNAME CLASS METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods FORNAME CLASS METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangClassForName nameAndTypeIndex classIndex wellKnownMethods FORNAME_CLASS_METHOD classIndex literalIndexForJavaLangClass nameAndTypeIndex wellKnownMethodNameAndTypes FORNAME_CLASS_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants ForName typeIndex literalIndex QualifiedNamesConstants ForNameSignature nameAndTypeIndex wellKnownMethodNameAndTypes FORNAME_CLASS_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods FORNAME_CLASS_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Class Desired Assertion Status int index int name And Type Index int class Index Looking into the method ref table if index well Known Methods DESIREDASSERTIONSTATUS CLASS METHOD 0 class Index literal Index For Java Lang Class if name And Type Index well Known Method Name And Types DESIREDASSERTIONSTATUS METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Desired Assertion Status int type Index literal Index Qualified Names Constants Desired Assertion Status Signature name And Type Index well Known Method Name And Types DESIREDASSERTIONSTATUS METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods DESIREDASSERTIONSTATUS CLASS METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangClassDesiredAssertionStatus nameAndTypeIndex classIndex wellKnownMethods DESIREDASSERTIONSTATUS_CLASS_METHOD classIndex literalIndexForJavaLangClass nameAndTypeIndex wellKnownMethodNameAndTypes DESIREDASSERTIONSTATUS_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants DesiredAssertionStatus typeIndex literalIndex QualifiedNamesConstants DesiredAssertionStatusSignature nameAndTypeIndex wellKnownMethodNameAndTypes DESIREDASSERTIONSTATUS_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods DESIREDASSERTIONSTATUS_CLASS_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Class Get Component Type int index int name And Type Index int class Index Looking into the method ref table if index well Known Methods GETCOMPONENTTYPE CLASS METHOD 0 class Index literal Index For Java Lang Class if name And Type Index well Known Method Name And Types GETCOMPONENTTYPE CLASS METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Get Component Type int type Index literal Index Qualified Names Constants Get Component Type Signature name And Type Index well Known Method Name And Types GETCOMPONENTTYPE CLASS METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods GETCOMPONENTTYPE CLASS METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangClassGetComponentType nameAndTypeIndex classIndex wellKnownMethods GETCOMPONENTTYPE_CLASS_METHOD classIndex literalIndexForJavaLangClass nameAndTypeIndex wellKnownMethodNameAndTypes GETCOMPONENTTYPE_CLASS_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants GetComponentType typeIndex literalIndex QualifiedNamesConstants GetComponentTypeSignature nameAndTypeIndex wellKnownMethodNameAndTypes GETCOMPONENTTYPE_CLASS_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods GETCOMPONENTTYPE_CLASS_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Class Not Found Exception int index if index well Known Types JAVA LANG CLASSNOTFOUNDEXCEPTION TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Class Not Found Exception Constant Pool Name index well Known Types JAVA LANG CLASSNOTFOUNDEXCEPTION TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangClassNotFoundException wellKnownTypes JAVA_LANG_CLASSNOTFOUNDEXCEPTION_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangClassNotFoundExceptionConstantPoolName wellKnownTypes JAVA_LANG_CLASSNOTFOUNDEXCEPTION_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Double int index if index well Known Types JAVA LANG DOUBLE TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Double Constant Pool Name index well Known Types JAVA LANG DOUBLE TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangDouble wellKnownTypes JAVA_LANG_DOUBLE_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangDoubleConstantPoolName wellKnownTypes JAVA_LANG_DOUBLE_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the field binding a Field Binding return CODE int CODE public int literal Index For Java Lang DoubleTYPE int index if index well Known Fields TYPE DOUBLE FIELD 0 int name And Type Index int class Index The entry doesn t exit yet class Index literal Index For Java Lang Double if name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE 0 int name Index literal Index Qualified Names Constants TYPE int type Index literal Index Qualified Names Constants Java Lang Class Signature name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Fields TYPE DOUBLE FIELD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Field Ref Tag writeU2 class Index writeU2 name And Type Index return index  constantPool aFieldBinding literalIndexForJavaLangDoubleTYPE wellKnownFields TYPE_DOUBLE_FIELD nameAndTypeIndex classIndex classIndex literalIndexForJavaLangDouble nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants JavaLangClassSignature nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownFields TYPE_DOUBLE_FIELD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType FieldRefTag classIndex nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Error int index if index well Known Types JAVA LANG ERROR TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Error Constant Pool Name index well Known Types JAVA LANG ERROR TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangError wellKnownTypes JAVA_LANG_ERROR_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangErrorConstantPoolName wellKnownTypes JAVA_LANG_ERROR_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Error Constructor int index int name And Type Index int class Index Looking into the method ref table if index well Known Methods JAVALANGERROR CONSTR METHOD 0 class Index literal Index For Java Lang Error if name And Type Index well Known Method Name And Types CONSTR STRING METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Init int type Index literal Index Qualified Names Constants String Constructor Signature name And Type Index well Known Method Name And Types CONSTR STRING METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods JAVALANGERROR CONSTR METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangErrorConstructor nameAndTypeIndex classIndex wellKnownMethods JAVALANGERROR_CONSTR_METHOD classIndex literalIndexForJavaLangError nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_STRING_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants StringConstructorSignature nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_STRING_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods JAVALANGERROR_CONSTR_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
public int literal Index For Java Lang Exception int index if index well Known Types JAVA LANG EXCEPTION TYPE 0 The entry doesn t exit yet int name Index literal Index Qualified Names Constants Java Lang Exception Constant Pool Name index well Known Types JAVA LANG EXCEPTION TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  literalIndexForJavaLangException wellKnownTypes JAVA_LANG_EXCEPTION_TYPE nameIndex literalIndex QualifiedNamesConstants JavaLangExceptionConstantPoolName wellKnownTypes JAVA_LANG_EXCEPTION_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Float int index if index well Known Types JAVA LANG FLOAT TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Float Constant Pool Name index well Known Types JAVA LANG FLOAT TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangFloat wellKnownTypes JAVA_LANG_FLOAT_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangFloatConstantPoolName wellKnownTypes JAVA_LANG_FLOAT_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the field binding a Field Binding return CODE int CODE public int literal Index For Java Lang FloatTYPE int index if index well Known Fields TYPE FLOAT FIELD 0 int name And Type Index int class Index The entry doesn t exit yet class Index literal Index For Java Lang Float if name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE 0 int name Index literal Index Qualified Names Constants TYPE int type Index literal Index Qualified Names Constants Java Lang Class Signature name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Fields TYPE FLOAT FIELD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Field Ref Tag writeU2 class Index writeU2 name And Type Index return index  constantPool aFieldBinding literalIndexForJavaLangFloatTYPE wellKnownFields TYPE_FLOAT_FIELD nameAndTypeIndex classIndex classIndex literalIndexForJavaLangFloat nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants JavaLangClassSignature nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownFields TYPE_FLOAT_FIELD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType FieldRefTag classIndex nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Integer int index if index well Known Types JAVA LANG INTEGER TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Integer Constant Pool Name index well Known Types JAVA LANG INTEGER TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangInteger wellKnownTypes JAVA_LANG_INTEGER_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangIntegerConstantPoolName wellKnownTypes JAVA_LANG_INTEGER_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the field binding a Field Binding return CODE int CODE public int literal Index For Java Lang IntegerTYPE int index if index well Known Fields TYPE INTEGER FIELD 0 int name And Type Index int class Index The entry doesn t exit yet class Index literal Index For Java Lang Integer if name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE 0 int name Index literal Index Qualified Names Constants TYPE int type Index literal Index Qualified Names Constants Java Lang Class Signature name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Fields TYPE INTEGER FIELD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Field Ref Tag writeU2 class Index writeU2 name And Type Index return index  constantPool aFieldBinding literalIndexForJavaLangIntegerTYPE wellKnownFields TYPE_INTEGER_FIELD nameAndTypeIndex classIndex classIndex literalIndexForJavaLangInteger nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants JavaLangClassSignature nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownFields TYPE_INTEGER_FIELD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType FieldRefTag classIndex nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Long int index if index well Known Types JAVA LANG LONG TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Long Constant Pool Name index well Known Types JAVA LANG LONG TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangLong wellKnownTypes JAVA_LANG_LONG_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangLongConstantPoolName wellKnownTypes JAVA_LANG_LONG_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the field binding a Field Binding return CODE int CODE public int literal Index For Java Lang LongTYPE int index if index well Known Fields TYPE LONG FIELD 0 int name And Type Index int class Index The entry doesn t exit yet class Index literal Index For Java Lang Long if name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE 0 int name Index literal Index Qualified Names Constants TYPE int type Index literal Index Qualified Names Constants Java Lang Class Signature name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Fields TYPE LONG FIELD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Field Ref Tag writeU2 class Index writeU2 name And Type Index return index  constantPool aFieldBinding literalIndexForJavaLangLongTYPE wellKnownFields TYPE_LONG_FIELD nameAndTypeIndex classIndex classIndex literalIndexForJavaLangLong nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants JavaLangClassSignature nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownFields TYPE_LONG_FIELD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType FieldRefTag classIndex nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang No Class Def Found Error int index if index well Known Types JAVA LANG NOCLASSDEFFOUNDERROR TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang No Class Def Found Error Constant Pool Name index well Known Types JAVA LANG NOCLASSDEFFOUNDERROR TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangNoClassDefFoundError wellKnownTypes JAVA_LANG_NOCLASSDEFFOUNDERROR_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangNoClassDefFoundErrorConstantPoolName wellKnownTypes JAVA_LANG_NOCLASSDEFFOUNDERROR_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Assertion Error int index if index well Known Types JAVA LANG ASSERTIONERROR TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Assertion Error Constant Pool Name index well Known Types JAVA LANG ASSERTIONERROR TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangAssertionError wellKnownTypes JAVA_LANG_ASSERTIONERROR_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangAssertionErrorConstantPoolName wellKnownTypes JAVA_LANG_ASSERTIONERROR_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the type descriptor param type BindingID int return CODE int CODE public int literal Index For Java Lang Assertion Error Constructor int type BindingID int index 0 int name And Type Index 0 int class Index 0 switch type BindingID case T int case T byte case T short if index well Known Methods ASSERTIONERROR CONSTR INT METHOD 0 class Index literal Index For Java Lang Assertion Error if name And Type Index well Known Method Name And Types CONSTR INT METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Init int type Index literal Index Qualified Names Constants Assertion Error Int Constr Signature name And Type Index well Known Method Name And Types CONSTR INT METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods ASSERTIONERROR CONSTR INT METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T long if index well Known Methods ASSERTIONERROR CONSTR LONG METHOD 0 class Index literal Index For Java Lang Assertion Error if name And Type Index well Known Method Name And Types CONSTR LONG METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Init int type Index literal Index Qualified Names Constants Assertion Error Long Constr Signature name And Type Index well Known Method Name And Types CONSTR LONG METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods ASSERTIONERROR CONSTR LONG METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T float if index well Known Methods ASSERTIONERROR CONSTR FLOAT METHOD 0 class Index literal Index For Java Lang Assertion Error if name And Type Index well Known Method Name And Types CONSTR FLOAT METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Init int type Index literal Index Qualified Names Constants Assertion Error Float Constr Signature name And Type Index well Known Method Name And Types CONSTR FLOAT METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods ASSERTIONERROR CONSTR FLOAT METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T double if index well Known Methods ASSERTIONERROR CONSTR DOUBLE METHOD 0 class Index literal Index For Java Lang Assertion Error if name And Type Index well Known Method Name And Types CONSTR DOUBLE METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Init int type Index literal Index Qualified Names Constants Assertion Error Double Constr Signature name And Type Index well Known Method Name And Types CONSTR DOUBLE METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods ASSERTIONERROR CONSTR DOUBLE METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T char if index well Known Methods ASSERTIONERROR CONSTR CHAR METHOD 0 class Index literal Index For Java Lang Assertion Error if name And Type Index well Known Method Name And Types CONSTR CHAR METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Init int type Index literal Index Qualified Names Constants Assertion Error Char Constr Signature name And Type Index well Known Method Name And Types CONSTR CHAR METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods ASSERTIONERROR CONSTR CHAR METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T boolean if index well Known Methods ASSERTIONERROR CONSTR BOOLEAN METHOD 0 class Index literal Index For Java Lang Assertion Error if name And Type Index well Known Method Name And Types CONSTR BOOLEAN METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Init int type Index literal Index Qualified Names Constants Assertion Error Boolean Constr Signature name And Type Index well Known Method Name And Types CONSTR BOOLEAN METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods ASSERTIONERROR CONSTR BOOLEAN METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T Object case T String case T null default if index well Known Methods ASSERTIONERROR CONSTR OBJECT METHOD 0 class Index literal Index For Java Lang Assertion Error if name And Type Index well Known Method Name And Types CONSTR OBJECT METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Init int type Index literal Index Qualified Names Constants Assertion Error Object Constr Signature name And Type Index well Known Method Name And Types CONSTR OBJECT METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods ASSERTIONERROR CONSTR OBJECT METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool typeBindingID literalIndexForJavaLangAssertionErrorConstructor typeBindingID nameAndTypeIndex classIndex typeBindingID T_int T_byte T_short wellKnownMethods ASSERTIONERROR_CONSTR_INT_METHOD classIndex literalIndexForJavaLangAssertionError nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_INT_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants AssertionErrorIntConstrSignature nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_INT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods ASSERTIONERROR_CONSTR_INT_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_long wellKnownMethods ASSERTIONERROR_CONSTR_LONG_METHOD classIndex literalIndexForJavaLangAssertionError nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_LONG_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants AssertionErrorLongConstrSignature nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_LONG_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods ASSERTIONERROR_CONSTR_LONG_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_float wellKnownMethods ASSERTIONERROR_CONSTR_FLOAT_METHOD classIndex literalIndexForJavaLangAssertionError nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_FLOAT_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants AssertionErrorFloatConstrSignature nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_FLOAT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods ASSERTIONERROR_CONSTR_FLOAT_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_double wellKnownMethods ASSERTIONERROR_CONSTR_DOUBLE_METHOD classIndex literalIndexForJavaLangAssertionError nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_DOUBLE_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants AssertionErrorDoubleConstrSignature nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_DOUBLE_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods ASSERTIONERROR_CONSTR_DOUBLE_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_char wellKnownMethods ASSERTIONERROR_CONSTR_CHAR_METHOD classIndex literalIndexForJavaLangAssertionError nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_CHAR_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants AssertionErrorCharConstrSignature nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_CHAR_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods ASSERTIONERROR_CONSTR_CHAR_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_boolean wellKnownMethods ASSERTIONERROR_CONSTR_BOOLEAN_METHOD classIndex literalIndexForJavaLangAssertionError nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_BOOLEAN_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants AssertionErrorBooleanConstrSignature nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_BOOLEAN_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods ASSERTIONERROR_CONSTR_BOOLEAN_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_Object T_String T_null wellKnownMethods ASSERTIONERROR_CONSTR_OBJECT_METHOD classIndex literalIndexForJavaLangAssertionError nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_OBJECT_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants AssertionErrorObjectConstrSignature nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_OBJECT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods ASSERTIONERROR_CONSTR_OBJECT_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Assertion Error Default Constructor int index int name And Type Index int class Index Looking into the method ref table if index well Known Methods ASSERTIONERROR DEFAULT CONSTR METHOD 0 class Index literal Index For Java Lang Assertion Error if name And Type Index well Known Method Name And Types DEFAULT CONSTR METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Init int type Index literal Index Qualified Names Constants Default Constructor Signature name And Type Index well Known Method Name And Types DEFAULT CONSTR METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods ASSERTIONERROR DEFAULT CONSTR METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangAssertionErrorDefaultConstructor nameAndTypeIndex classIndex wellKnownMethods ASSERTIONERROR_DEFAULT_CONSTR_METHOD classIndex literalIndexForJavaLangAssertionError nameAndTypeIndex wellKnownMethodNameAndTypes DEFAULT_CONSTR_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants DefaultConstructorSignature nameAndTypeIndex wellKnownMethodNameAndTypes DEFAULT_CONSTR_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods ASSERTIONERROR_DEFAULT_CONSTR_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang No Class Def Found Error String Constructor int index int name And Type Index int class Index Looking into the method ref table if index well Known Methods NOCLASSDEFFOUNDERROR CONSTR METHOD 0 class Index literal Index For Java Lang No Class Def Found Error if name And Type Index well Known Method Name And Types CONSTR STRING METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Init int type Index literal Index Qualified Names Constants String Constructor Signature name And Type Index well Known Method Name And Types CONSTR STRING METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods NOCLASSDEFFOUNDERROR CONSTR METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangNoClassDefFoundErrorStringConstructor nameAndTypeIndex classIndex wellKnownMethods NOCLASSDEFFOUNDERROR_CONSTR_METHOD classIndex literalIndexForJavaLangNoClassDefFoundError nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_STRING_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants StringConstructorSignature nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_STRING_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods NOCLASSDEFFOUNDERROR_CONSTR_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Object int index if index well Known Types JAVA LANG OBJECT TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Object Constant Pool Name index well Known Types JAVA LANG OBJECT TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangObject wellKnownTypes JAVA_LANG_OBJECT_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangObjectConstantPoolName wellKnownTypes JAVA_LANG_OBJECT_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Reflect Constructor int index if index well Known Types JAVA LANG REFLECT CONSTRUCTOR TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Reflect Constructor index well Known Types JAVA LANG REFLECT CONSTRUCTOR TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangReflectConstructor wellKnownTypes JAVA_LANG_REFLECT_CONSTRUCTOR_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangReflectConstructor wellKnownTypes JAVA_LANG_REFLECT_CONSTRUCTOR_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
public int literal Index For Java Lang Reflect Constructor New Instance int index int name And Type Index int class Index Looking into the method ref table if index well Known Methods NEWINSTANCE CONSTRUCTOR METHOD 0 class Index literal Index For Java Lang Reflect Constructor if name And Type Index well Known Method Name And Types NEWINSTANCE METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants New Instance int type Index literal Index Qualified Names Constants New Instance Signature name And Type Index well Known Method Name And Types NEWINSTANCE METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods NEWINSTANCE CONSTRUCTOR METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  literalIndexForJavaLangReflectConstructorNewInstance nameAndTypeIndex classIndex wellKnownMethods NEWINSTANCE_CONSTRUCTOR_METHOD classIndex literalIndexForJavaLangReflectConstructor nameAndTypeIndex wellKnownMethodNameAndTypes NEWINSTANCE_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants NewInstance typeIndex literalIndex QualifiedNamesConstants NewInstanceSignature nameAndTypeIndex wellKnownMethodNameAndTypes NEWINSTANCE_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods NEWINSTANCE_CONSTRUCTOR_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Short int index if index well Known Types JAVA LANG SHORT TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Short Constant Pool Name index well Known Types JAVA LANG SHORT TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangShort wellKnownTypes JAVA_LANG_SHORT_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangShortConstantPoolName wellKnownTypes JAVA_LANG_SHORT_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the field binding a Field Binding return CODE int CODE public int literal Index For Java Lang ShortTYPE int index if index well Known Fields TYPE SHORT FIELD 0 int name And Type Index int class Index The entry doesn t exit yet class Index literal Index For Java Lang Short if name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE 0 int name Index literal Index Qualified Names Constants TYPE int type Index literal Index Qualified Names Constants Java Lang Class Signature name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Fields TYPE SHORT FIELD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Field Ref Tag writeU2 class Index writeU2 name And Type Index return index  constantPool aFieldBinding literalIndexForJavaLangShortTYPE wellKnownFields TYPE_SHORT_FIELD nameAndTypeIndex classIndex classIndex literalIndexForJavaLangShort nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants JavaLangClassSignature nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownFields TYPE_SHORT_FIELD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType FieldRefTag classIndex nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang String int index if index well Known Types JAVA LANG STRING TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang String Constant Pool Name index well Known Types JAVA LANG STRING TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangString wellKnownTypes JAVA_LANG_STRING_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangStringConstantPoolName wellKnownTypes JAVA_LANG_STRING_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang String Buffer int index if index well Known Types JAVA LANG STRINGBUFFER TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang String Buffer Constant Pool Name index well Known Types JAVA LANG STRINGBUFFER TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangStringBuffer wellKnownTypes JAVA_LANG_STRINGBUFFER_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangStringBufferConstantPoolName wellKnownTypes JAVA_LANG_STRINGBUFFER_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang String Buffer Append int typeID int index 0 int name And Type Index 0 int class Index 0 switch typeID case T int case T byte case T short if index well Known Methods APPEND INT METHOD 0 class Index literal Index For Java Lang String Buffer if name And Type Index well Known Method Name And Types APPEND INT METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Append int type Index literal Index Qualified Names Constants Append Int Signature name And Type Index well Known Method Name And Types APPEND INT METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods APPEND INT METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T long if index well Known Methods APPEND LONG METHOD 0 class Index literal Index For Java Lang String Buffer if name And Type Index well Known Method Name And Types APPEND LONG METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Append int type Index literal Index Qualified Names Constants Append Long Signature name And Type Index well Known Method Name And Types APPEND LONG METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods APPEND LONG METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T float if index well Known Methods APPEND FLOAT METHOD 0 class Index literal Index For Java Lang String Buffer if name And Type Index well Known Method Name And Types APPEND FLOAT METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Append int type Index literal Index Qualified Names Constants Append Float Signature name And Type Index well Known Method Name And Types APPEND FLOAT METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods APPEND FLOAT METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T double if index well Known Methods APPEND DOUBLE METHOD 0 class Index literal Index For Java Lang String Buffer if name And Type Index well Known Method Name And Types APPEND DOUBLE METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Append int type Index literal Index Qualified Names Constants Append Double Signature name And Type Index well Known Method Name And Types APPEND DOUBLE METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods APPEND DOUBLE METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T char if index well Known Methods APPEND CHAR METHOD 0 class Index literal Index For Java Lang String Buffer if name And Type Index well Known Method Name And Types APPEND CHAR METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Append int type Index literal Index Qualified Names Constants Append Char Signature name And Type Index well Known Method Name And Types APPEND CHAR METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods APPEND CHAR METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T boolean if index well Known Methods APPEND BOOLEAN METHOD 0 class Index literal Index For Java Lang String Buffer if name And Type Index well Known Method Name And Types APPEND BOOLEAN METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Append int type Index literal Index Qualified Names Constants Append Boolean Signature name And Type Index well Known Method Name And Types APPEND BOOLEAN METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods APPEND BOOLEAN METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T Object if index well Known Methods APPEND OBJECT METHOD 0 class Index literal Index For Java Lang String Buffer if name And Type Index well Known Method Name And Types APPEND OBJECT METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Append int type Index literal Index Qualified Names Constants Append Object Signature name And Type Index well Known Method Name And Types APPEND OBJECT METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods APPEND OBJECT METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T String case T null if index well Known Methods APPEND STRING METHOD 0 class Index literal Index For Java Lang String Buffer if name And Type Index well Known Method Name And Types APPEND STRING METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Append int type Index literal Index Qualified Names Constants Append String Signature name And Type Index well Known Method Name And Types APPEND STRING METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods APPEND STRING METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break return index  constantPool literalIndexForJavaLangStringBufferAppend nameAndTypeIndex classIndex T_int T_byte T_short wellKnownMethods APPEND_INT_METHOD classIndex literalIndexForJavaLangStringBuffer nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_INT_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants AppendIntSignature nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_INT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods APPEND_INT_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_long wellKnownMethods APPEND_LONG_METHOD classIndex literalIndexForJavaLangStringBuffer nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_LONG_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants AppendLongSignature nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_LONG_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods APPEND_LONG_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_float wellKnownMethods APPEND_FLOAT_METHOD classIndex literalIndexForJavaLangStringBuffer nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_FLOAT_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants AppendFloatSignature nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_FLOAT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods APPEND_FLOAT_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_double wellKnownMethods APPEND_DOUBLE_METHOD classIndex literalIndexForJavaLangStringBuffer nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_DOUBLE_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants AppendDoubleSignature nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_DOUBLE_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods APPEND_DOUBLE_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_char wellKnownMethods APPEND_CHAR_METHOD classIndex literalIndexForJavaLangStringBuffer nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_CHAR_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants AppendCharSignature nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_CHAR_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods APPEND_CHAR_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_boolean wellKnownMethods APPEND_BOOLEAN_METHOD classIndex literalIndexForJavaLangStringBuffer nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_BOOLEAN_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants AppendBooleanSignature nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_BOOLEAN_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods APPEND_BOOLEAN_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_Object wellKnownMethods APPEND_OBJECT_METHOD classIndex literalIndexForJavaLangStringBuffer nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_OBJECT_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants AppendObjectSignature nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_OBJECT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods APPEND_OBJECT_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_String T_null wellKnownMethods APPEND_STRING_METHOD classIndex literalIndexForJavaLangStringBuffer nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_STRING_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants AppendStringSignature nameAndTypeIndex wellKnownMethodNameAndTypes APPEND_STRING_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods APPEND_STRING_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang String Buffer Constructor int index int name And Type Index int class Index Looking into the method ref table if index well Known Methods STRINGBUFFER STRING CONSTR METHOD 0 class Index literal Index For Java Lang String Buffer if name And Type Index well Known Method Name And Types CONSTR STRING METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Init int type Index literal Index Qualified Names Constants String Constructor Signature name And Type Index well Known Method Name And Types CONSTR STRING METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods STRINGBUFFER STRING CONSTR METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangStringBufferConstructor nameAndTypeIndex classIndex wellKnownMethods STRINGBUFFER_STRING_CONSTR_METHOD classIndex literalIndexForJavaLangStringBuffer nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_STRING_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants StringConstructorSignature nameAndTypeIndex wellKnownMethodNameAndTypes CONSTR_STRING_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods STRINGBUFFER_STRING_CONSTR_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang String Buffer Default Constructor int index int name And Type Index int class Index Looking into the method ref table if index well Known Methods STRINGBUFFER DEFAULT CONSTR METHOD 0 class Index literal Index For Java Lang String Buffer if name And Type Index well Known Method Name And Types DEFAULT CONSTR METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Init int type Index literal Index Qualified Names Constants Default Constructor Signature name And Type Index well Known Method Name And Types DEFAULT CONSTR METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods STRINGBUFFER DEFAULT CONSTR METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangStringBufferDefaultConstructor nameAndTypeIndex classIndex wellKnownMethods STRINGBUFFER_DEFAULT_CONSTR_METHOD classIndex literalIndexForJavaLangStringBuffer nameAndTypeIndex wellKnownMethodNameAndTypes DEFAULT_CONSTR_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants DefaultConstructorSignature nameAndTypeIndex wellKnownMethodNameAndTypes DEFAULT_CONSTR_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods STRINGBUFFER_DEFAULT_CONSTR_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang String Buffer To String int index int name And Type Index int class Index Looking into the method ref table if index well Known Methods STRINGBUFFER TOSTRING METHOD 0 class Index literal Index For Java Lang String Buffer if name And Type Index well Known Method Name And Types TOSTRING METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants To String int type Index literal Index Qualified Names Constants To String Signature name And Type Index well Known Method Name And Types TOSTRING METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods STRINGBUFFER TOSTRING METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangStringBufferToString nameAndTypeIndex classIndex wellKnownMethods STRINGBUFFER_TOSTRING_METHOD classIndex literalIndexForJavaLangStringBuffer nameAndTypeIndex wellKnownMethodNameAndTypes TOSTRING_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants ToString typeIndex literalIndex QualifiedNamesConstants ToStringSignature nameAndTypeIndex wellKnownMethodNameAndTypes TOSTRING_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods STRINGBUFFER_TOSTRING_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang String Intern int index int name And Type Index int class Index Looking into the method ref table if index well Known Methods STRING INTERN METHOD 0 class Index literal Index For Java Lang String if name And Type Index well Known Method Name And Types INTERN METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Intern int type Index literal Index Qualified Names Constants Intern Signature name And Type Index well Known Method Name And Types INTERN METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods STRING INTERN METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangStringIntern nameAndTypeIndex classIndex wellKnownMethods STRING_INTERN_METHOD classIndex literalIndexForJavaLangString nameAndTypeIndex wellKnownMethodNameAndTypes INTERN_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants InternSignature nameAndTypeIndex wellKnownMethodNameAndTypes INTERN_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods STRING_INTERN_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang String Value Of int typeID int index 0 int name And Type Index 0 int class Index literal Index For Java Lang String switch typeID case T int case T byte case T short if index well Known Methods VALUEOF INT METHOD 0 if name And Type Index well Known Method Name And Types VALUEOF INT METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Value Of int type Index literal Index Qualified Names Constants Value Of Int Signature name And Type Index well Known Method Name And Types VALUEOF INT METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods VALUEOF INT METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T long if index well Known Methods VALUEOF LONG METHOD 0 if name And Type Index well Known Method Name And Types VALUEOF LONG METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Value Of int type Index literal Index Qualified Names Constants Value Of Long Signature name And Type Index well Known Method Name And Types VALUEOF LONG METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods VALUEOF LONG METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T float if index well Known Methods VALUEOF FLOAT METHOD 0 if name And Type Index well Known Method Name And Types VALUEOF FLOAT METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Value Of int type Index literal Index Qualified Names Constants Value Of Float Signature name And Type Index well Known Method Name And Types VALUEOF FLOAT METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods VALUEOF FLOAT METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T double if index well Known Methods VALUEOF DOUBLE METHOD 0 if name And Type Index well Known Method Name And Types VALUEOF DOUBLE METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Value Of int type Index literal Index Qualified Names Constants Value Of Double Signature name And Type Index well Known Method Name And Types VALUEOF DOUBLE METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods VALUEOF DOUBLE METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T char if index well Known Methods VALUEOF CHAR METHOD 0 if name And Type Index well Known Method Name And Types VALUEOF CHAR METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Value Of int type Index literal Index Qualified Names Constants Value Of Char Signature name And Type Index well Known Method Name And Types VALUEOF CHAR METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods VALUEOF CHAR METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T boolean if index well Known Methods VALUEOF BOOLEAN METHOD 0 if name And Type Index well Known Method Name And Types VALUEOF BOOLEAN METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Value Of int type Index literal Index Qualified Names Constants Value Of Boolean Signature name And Type Index well Known Method Name And Types VALUEOF BOOLEAN METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods VALUEOF BOOLEAN METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T Object if index well Known Methods VALUEOF OBJECT METHOD 0 if name And Type Index well Known Method Name And Types VALUEOF OBJECT METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Value Of int type Index literal Index Qualified Names Constants Value Of Object Signature name And Type Index well Known Method Name And Types VALUEOF OBJECT METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods VALUEOF OBJECT METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break return index  constantPool literalIndexForJavaLangStringValueOf nameAndTypeIndex classIndex literalIndexForJavaLangString T_int T_byte T_short wellKnownMethods VALUEOF_INT_METHOD nameAndTypeIndex wellKnownMethodNameAndTypes VALUEOF_INT_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants ValueOf typeIndex literalIndex QualifiedNamesConstants ValueOfIntSignature nameAndTypeIndex wellKnownMethodNameAndTypes VALUEOF_INT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods VALUEOF_INT_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_long wellKnownMethods VALUEOF_LONG_METHOD nameAndTypeIndex wellKnownMethodNameAndTypes VALUEOF_LONG_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants ValueOf typeIndex literalIndex QualifiedNamesConstants ValueOfLongSignature nameAndTypeIndex wellKnownMethodNameAndTypes VALUEOF_LONG_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods VALUEOF_LONG_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_float wellKnownMethods VALUEOF_FLOAT_METHOD nameAndTypeIndex wellKnownMethodNameAndTypes VALUEOF_FLOAT_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants ValueOf typeIndex literalIndex QualifiedNamesConstants ValueOfFloatSignature nameAndTypeIndex wellKnownMethodNameAndTypes VALUEOF_FLOAT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods VALUEOF_FLOAT_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_double wellKnownMethods VALUEOF_DOUBLE_METHOD nameAndTypeIndex wellKnownMethodNameAndTypes VALUEOF_DOUBLE_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants ValueOf typeIndex literalIndex QualifiedNamesConstants ValueOfDoubleSignature nameAndTypeIndex wellKnownMethodNameAndTypes VALUEOF_DOUBLE_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods VALUEOF_DOUBLE_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_char wellKnownMethods VALUEOF_CHAR_METHOD nameAndTypeIndex wellKnownMethodNameAndTypes VALUEOF_CHAR_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants ValueOf typeIndex literalIndex QualifiedNamesConstants ValueOfCharSignature nameAndTypeIndex wellKnownMethodNameAndTypes VALUEOF_CHAR_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods VALUEOF_CHAR_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_boolean wellKnownMethods VALUEOF_BOOLEAN_METHOD nameAndTypeIndex wellKnownMethodNameAndTypes VALUEOF_BOOLEAN_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants ValueOf typeIndex literalIndex QualifiedNamesConstants ValueOfBooleanSignature nameAndTypeIndex wellKnownMethodNameAndTypes VALUEOF_BOOLEAN_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods VALUEOF_BOOLEAN_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex T_Object wellKnownMethods VALUEOF_OBJECT_METHOD nameAndTypeIndex wellKnownMethodNameAndTypes VALUEOF_OBJECT_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants ValueOf typeIndex literalIndex QualifiedNamesConstants ValueOfObjectSignature nameAndTypeIndex wellKnownMethodNameAndTypes VALUEOF_OBJECT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods VALUEOF_OBJECT_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang System int index if index well Known Types JAVA LANG SYSTEM TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang System Constant Pool Name index well Known Types JAVA LANG SYSTEM TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangSystem wellKnownTypes JAVA_LANG_SYSTEM_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangSystemConstantPoolName wellKnownTypes JAVA_LANG_SYSTEM_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang System Exit Int int index int name And Type Index int class Index Looking into the method ref table if index well Known Methods SYSTEM EXIT METHOD 0 class Index literal Index For Java Lang System if name And Type Index well Known Method Name And Types EXIT METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Exit int type Index literal Index Qualified Names Constants Exit Int Signature name And Type Index well Known Method Name And Types EXIT METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods SYSTEM EXIT METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangSystemExitInt nameAndTypeIndex classIndex wellKnownMethods SYSTEM_EXIT_METHOD classIndex literalIndexForJavaLangSystem nameAndTypeIndex wellKnownMethodNameAndTypes EXIT_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants ExitIntSignature nameAndTypeIndex wellKnownMethodNameAndTypes EXIT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods SYSTEM_EXIT_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the field binding a Field Binding return CODE int CODE public int literal Index For Java Lang System Out int index if index well Known Fields OUT SYSTEM FIELD 0 int name And Type Index int class Index The entry doesn t exit yet class Index literal Index For Java Lang System if name And Type Index well Known Method Name And Types OUT SYSTEM NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Out int type Index literal Index Qualified Names Constants Java Io Print Stream Signature name And Type Index well Known Method Name And Types OUT SYSTEM NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Fields OUT SYSTEM FIELD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Field Ref Tag writeU2 class Index writeU2 name And Type Index return index  constantPool aFieldBinding literalIndexForJavaLangSystemOut wellKnownFields OUT_SYSTEM_FIELD nameAndTypeIndex classIndex classIndex literalIndexForJavaLangSystem nameAndTypeIndex wellKnownMethodNameAndTypes OUT_SYSTEM_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants JavaIoPrintStreamSignature nameAndTypeIndex wellKnownMethodNameAndTypes OUT_SYSTEM_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownFields OUT_SYSTEM_FIELD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType FieldRefTag classIndex nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Throwable int index if index well Known Types JAVA LANG THROWABLE TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Throwable Constant Pool Name index well Known Types JAVA LANG THROWABLE TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangThrowable wellKnownTypes JAVA_LANG_THROWABLE_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangThrowableConstantPoolName wellKnownTypes JAVA_LANG_THROWABLE_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Throwable Get Message int index int name And Type Index int class Index Looking into the method ref table if index well Known Methods THROWABLE GETMESSAGE METHOD 0 class Index literal Index For Java Lang Throwable if name And Type Index well Known Method Name And Types GETMESSAGE METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Get Message int type Index literal Index Qualified Names Constants Get Message Signature name And Type Index well Known Method Name And Types GETMESSAGE METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods THROWABLE GETMESSAGE METHOD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangThrowableGetMessage nameAndTypeIndex classIndex wellKnownMethods THROWABLE_GETMESSAGE_METHOD classIndex literalIndexForJavaLangThrowable nameAndTypeIndex wellKnownMethodNameAndTypes GETMESSAGE_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants GetMessage typeIndex literalIndex QualifiedNamesConstants GetMessageSignature nameAndTypeIndex wellKnownMethodNameAndTypes GETMESSAGE_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods THROWABLE_GETMESSAGE_METHOD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor return CODE int CODE public int literal Index For Java Lang Void int index if index well Known Types JAVA LANG VOID TYPE 0 int name Index The entry doesn t exit yet name Index literal Index Qualified Names Constants Java Lang Void Constant Pool Name index well Known Types JAVA LANG VOID TYPE current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangVoid wellKnownTypes JAVA_LANG_VOID_TYPE nameIndex nameIndex literalIndex QualifiedNamesConstants JavaLangVoidConstantPoolName wellKnownTypes JAVA_LANG_VOID_TYPE currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the field binding a Field Binding return CODE int CODE public int literal Index For Java Lang VoidTYPE int index if index well Known Fields TYPE VOID FIELD 0 int name And Type Index int class Index The entry doesn t exit yet class Index literal Index For Java Lang Void if name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE 0 int name Index literal Index Qualified Names Constants TYPE int type Index literal Index Qualified Names Constants Java Lang Class Signature name And Type Index well Known Field Name And Types TYPE JAVALANGCLASS NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Fields TYPE VOID FIELD current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Field Ref Tag writeU2 class Index writeU2 name And Type Index return index  constantPool aFieldBinding literalIndexForJavaLangVoidTYPE wellKnownFields TYPE_VOID_FIELD nameAndTypeIndex classIndex classIndex literalIndexForJavaLangVoid nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants typeIndex literalIndex QualifiedNamesConstants JavaLangClassSignature nameAndTypeIndex wellKnownFieldNameAndTypes TYPE_JAVALANGCLASS_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownFields TYPE_VOID_FIELD currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType FieldRefTag classIndex nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the type descriptor param string Char Array char return CODE int CODE public int literal Index For Ldc char string Char Array int index if index string Cache get string Char Array 0 int string Index The entry doesn t exit yet if string Index UTF8 Cache get string Char Array 0 The entry doesn t exit yet Write the tag first writeU1 Utf8 Tag Then the size of the string Name array int saved Current Offset current Offset if current Offset 2 pool Content length we need to resize the pool Content array because we won t have enough space to write the length resize Pool Contents 2 current Offset 2 int length 0 for int i 0 i string Char Array length i char current string Char Array i if current 0x0001 current 0x007F we only need one byte ASCII table writeU1 current length else if current 0x07FF we need 3 bytes length 3 writeU1 0xE0 current 12 0x0F 0xE0 1110 0000 writeU1 0x80 current 6 0x3F 0x80 1000 0000 writeU1 0x80 current 0x3F 0x80 1000 0000 else we can be 0 or between 0x0080 and 0x07FF In that case we only need 2 bytes length 2 writeU1 0xC0 current 6 0x1F 0xC0 1100 0000 writeU1 0x80 current 0x3F 0x80 1000 0000 if length 65535 current Offset saved Current Offset 1 return 1 string Index UTF8 Cache put string Char Array current Index Now we know the length that we have to write in the constant pool we use saved Current Offset to do that if length 65535 return 0 pool Content saved Current Offset byte length 8 pool Content saved Current Offset 1 byte length index string Cache put string Char Array current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type Write the tag first writeU1 String Tag Then the string index writeU2 string Index return index  constantPool stringCharArray literalIndexForLdc stringCharArray stringCache stringCharArray stringIndex stringIndex UTF8Cache stringCharArray Utf8Tag stringName savedCurrentOffset currentOffset currentOffset poolContent poolContent resizePoolContents currentOffset stringCharArray stringCharArray currentOffset savedCurrentOffset stringIndex UTF8Cache stringCharArray currentIndex savedCurrentOffset poolContent savedCurrentOffset poolContent savedCurrentOffset stringCache stringCharArray currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType StringTag stringIndex
This method returns the index into the constant Pool corresponding name And Type constant with name Index type Index param name Index int param type Index int param key org eclipse jdt internal compiler lookup Method Binding return CODE int CODE public int literal Index For Methods int name Index int type Index Method Binding key int index int index Of Well Known Method Name And Type if index Of Well Known Method Name And Type index Of Well Known Method Name And Type key 1 check if the entry exists if index name And Type Cache For Methods get key 1 The entry doesn t exit yet index name And Type Cache For Methods put key current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Name And Type Tag writeU2 name Index writeU2 type Index else if index well Known Method Name And Types index Of Well Known Method Name And Type 0 index well Known Method Name And Types index Of Well Known Method Name And Type current Index if index 0xFFFF this class File reference Binding scope problem Reporter no More Available Space In Constant Pool this class File reference Binding scope reference Type writeU1 Name And Type Tag writeU2 name Index writeU2 type Index return index  constantPool nameAndType nameIndex typeIndex nameIndex typeIndex MethodBinding literalIndexForMethods nameIndex typeIndex MethodBinding indexOfWellKnownMethodNameAndType indexOfWellKnownMethodNameAndType indexOfWellKnownMethodNameAndType nameAndTypeCacheForMethods nameAndTypeCacheForMethods currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType NameAndTypeTag nameIndex typeIndex wellKnownMethodNameAndTypes indexOfWellKnownMethodNameAndType wellKnownMethodNameAndTypes indexOfWellKnownMethodNameAndType currentIndex classFile referenceBinding problemReporter noMoreAvailableSpaceInConstantPool classFile referenceBinding referenceType NameAndTypeTag nameIndex typeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Object Get Class int index int name And Type Index int class Index Looking into the method ref table if index well Known Methods GETCLASS OBJECT METHOD 0 class Index literal Index For Java Lang Object if name And Type Index well Known Method Name And Types GETCLASS OBJECT METHOD NAME AND TYPE 0 int name Index literal Index Qualified Names Constants Get Class int type Index literal Index Qualified Names Constants Get Class Signature name And Type Index well Known Method Name And Types GETCLASS OBJECT METHOD NAME AND TYPE current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index well Known Methods GETCLASS OBJECT METHOD current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangObjectGetClass nameAndTypeIndex classIndex wellKnownMethods GETCLASS_OBJECT_METHOD classIndex literalIndexForJavaLangObject nameAndTypeIndex wellKnownMethodNameAndTypes GETCLASS_OBJECT_METHOD_NAME_AND_TYPE nameIndex literalIndex QualifiedNamesConstants GetClass typeIndex literalIndex QualifiedNamesConstants GetClassSignature nameAndTypeIndex wellKnownMethodNameAndTypes GETCLASS_OBJECT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods GETCLASS_OBJECT_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method is used to clean the receiver in case of a clinit header is generated but the clinit has no code This implementation assumes that the clinit is the first method to be generated see org eclipse jdt internal compiler ast Type Declaration add Clinit public void reset For Clinit int constant Pool Index int constant Pool Offset current Index constant Pool Index current Offset constant Pool Offset if UTF8 Cache get Attribute Names Constants Code Name constant Pool Index UTF8 Cache remove Attribute Names Constants Code Name if UTF8 Cache get Qualified Names Constants Clinit Signature constant Pool Index UTF8 Cache remove Qualified Names Constants Clinit Signature if UTF8 Cache get Qualified Names Constants Clinit constant Pool Index UTF8 Cache remove Qualified Names Constants Clinit  TypeDeclaration addClinit resetForClinit constantPoolIndex constantPoolOffset currentIndex constantPoolIndex currentOffset constantPoolOffset UTF8Cache AttributeNamesConstants CodeName constantPoolIndex UTF8Cache AttributeNamesConstants CodeName UTF8Cache QualifiedNamesConstants ClinitSignature constantPoolIndex UTF8Cache QualifiedNamesConstants ClinitSignature UTF8Cache QualifiedNamesConstants constantPoolIndex UTF8Cache QualifiedNamesConstants
Resize the pool contents private final void resize Pool Contents int minimal Size int length pool Content length int to Add length if to Add minimal Size to Add minimal Size System arraycopy pool Content 0 pool Content new byte length to Add 0 length  resizePoolContents minimalSize poolContent toAdd toAdd minimalSize toAdd minimalSize poolContent poolContent toAdd
Write a unsigned byte into the byte array param value CODE int CODE The value to write into the byte array protected final void writeU1 int value if current Offset 1 pool Content length resize Pool Contents 1 pool Content current Offset byte value  currentOffset poolContent resizePoolContents poolContent currentOffset
Write a unsigned byte into the byte array param value CODE int CODE The value to write into the byte array protected final void writeU2 int value if current Offset 2 pool Content length resize Pool Contents 2 first byte pool Content current Offset byte value 8 pool Content current Offset byte value  currentOffset poolContent resizePoolContents poolContent currentOffset poolContent currentOffset

private int element Size Constructs a new empty hashtable A default capacity and load factor is used Note that the hashtable will automatically grow when it gets full public Double Cache this 13  elementSize DoubleCache
Constructs a new empty hashtable with the specified initial capacity param initial Capacity int the initial number of buckets public Double Cache int initial Capacity element Size 0 key Table new double initial Capacity value Table new int initial Capacity  initialCapacity DoubleCache initialCapacity elementSize keyTable initialCapacity valueTable initialCapacity
Clears the hash table so that it has no more elements in it public void clear for int i key Table length i 0 key Table i 0 0 value Table i 0 element Size 0  keyTable keyTable valueTable elementSize
Returns true if the collection contains an element for the key param key CODE double CODE the key that we are looking for return boolean public boolean contains Key double key if key 0 0 for int i 0 max element Size i max i if key Table i 0 0 long value1 Double double To Long Bits key long value2 Double double To Long Bits key Table i if value1 9223372036854775808L value2 9223372036854775808L return true if value1 0 value2 0 return true else for int i 0 max element Size i max i if key Table i key return true return false  containsKey elementSize keyTable doubleToLongBits doubleToLongBits keyTable elementSize keyTable
Gets the object associated with the specified key in the hashtable param key CODE double CODE the specified key return int the element for the key or 1 if the key is not defined in the hash table public int get double key if key 0 0 for int i 0 max element Size i max i if key Table i 0 0 long value1 Double double To Long Bits key long value2 Double double To Long Bits key Table i if value1 9223372036854775808L value2 9223372036854775808L return value Table i if value1 0 value2 0 return value Table i else for int i 0 max element Size i max i if key Table i key return value Table i return 1  elementSize keyTable doubleToLongBits doubleToLongBits keyTable valueTable valueTable elementSize keyTable valueTable
Puts the specified element into the hashtable using the specified key The element may be retrieved by doing a get with the same key param key CODE double CODE the specified key in the hashtable param value CODE int CODE the specified element return int value public int put double key int value if element Size key Table length resize System arraycopy key Table 0 key Table new double element Size 2 0 element Size System arraycopy value Table 0 value Table new int element Size 2 0 element Size key Table element Size key value Table element Size value element Size return value  elementSize keyTable keyTable keyTable elementSize elementSize valueTable valueTable elementSize elementSize keyTable elementSize valueTable elementSize elementSize
Converts to a rather lengthy String return String the ascii representation of the receiver public String to String int max element Size String Buffer buf new String Buffer buf append NON NLS 1 for int i 0 i max i if key Table i 0 key Table i 0 value Table i 0 buf append key Table i append append value Table i NON NLS 1 if i max buf append NON NLS 1 buf append NON NLS 1 return buf to String  toString elementSize StringBuffer StringBuffer keyTable keyTable valueTable keyTable valueTable toString

public Exception Label Code Stream code Stream Type Binding exception Type super code Stream this exception Type exception Type this place Start  ExceptionLabel CodeStream codeStream TypeBinding exceptionType codeStream exceptionType exceptionType placeStart
public boolean is Standard Label return false  isStandardLabel
public void place register the handler inside the code Stream then normal place code Stream register Exception Handler this super place  codeStream codeStream registerExceptionHandler
public void place End this end code Stream position  placeEnd codeStream
public void place Start this start code Stream position  placeStart codeStream

int threshold Constructs a new empty hashtable A default capacity is used Note that the hashtable will automatically grow when it gets full public Field Name And Type Cache this 13  FieldNameAndTypeCache
Constructs a new empty hashtable with the specified initial capacity param initial Capacity int the initial number of buckets public Field Name And Type Cache int initial Capacity this element Size 0 this threshold int initial Capacity 0 66f this key Table new Field Binding initial Capacity this value Table new int initial Capacity  initialCapacity FieldNameAndTypeCache initialCapacity elementSize initialCapacity keyTable FieldBinding initialCapacity valueTable initialCapacity
Clears the hash table so that it has no more elements in it public void clear for int i key Table length i 0 key Table i null value Table i 0 element Size 0  keyTable keyTable valueTable elementSize
Returns true if the collection contains an element for the key param key char the key that we are looking for return boolean public boolean contains Key Field Binding key int index hash Code key while key Table index null if equals For Name And Type key Table index key return true index index 1 key Table length return false  containsKey FieldBinding hashCode keyTable equalsForNameAndType keyTable keyTable
Return true if the two field binding are consider like equals public boolean equals For Name And Type Field Binding field1 Field Binding field2 return field1 type field2 type Char Operation equals field1 name field2 name  equalsForNameAndType FieldBinding FieldBinding CharOperation
Gets the object associated with the specified key in the hashtable param key CODE char CODE the specified key return int the element for the key or 1 if the key is not defined in the hash table public int get Field Binding key int index hash Code key while key Table index null if equals For Name And Type key Table index key return value Table index index index 1 key Table length return 1  FieldBinding hashCode keyTable equalsForNameAndType keyTable valueTable keyTable
Return the hashcode for the key parameter param key org eclipse jdt internal compiler lookup Method Binding return int public int hash Code Field Binding key return Char Operation hash Code key name key type hash Code 0x7FFFFFFF key Table length  MethodBinding hashCode FieldBinding CharOperation hashCode hashCode keyTable
Puts the specified element into the hashtable using the specified key The element may be retrieved by doing a get with the same key The key and the element cannot be null param key CODE Object CODE the specified key in the hashtable param value CODE int CODE the specified element return int the old value of the key or 1 if it did not have one public int put Field Binding key int value int index hash Code key while key Table index null if equals For Name And Type key Table index key return value Table index value index index 1 key Table length key Table index key value Table index value assumes the threshold is never equal to the size of the table if element Size threshold rehash return value  FieldBinding hashCode keyTable equalsForNameAndType keyTable valueTable keyTable keyTable valueTable elementSize
Rehashes the content of the table into a bigger table This method is called automatically when the hashtable s size exceeds the threshold private void rehash Field Name And Type Cache new Hashtable new Field Name And Type Cache key Table length 2 for int i key Table length i 0 if key Table i null new Hashtable put key Table i value Table i this key Table new Hashtable key Table this value Table new Hashtable value Table this threshold new Hashtable threshold  FieldNameAndTypeCache newHashtable FieldNameAndTypeCache keyTable keyTable keyTable newHashtable keyTable valueTable keyTable newHashtable keyTable valueTable newHashtable valueTable newHashtable
Returns the number of elements contained in the hashtable return CODE int CODE The size of the table public int size return element Size  elementSize
Converts to a rather lengthy String return String the ascii representation of the receiver public String to String int max size String Buffer buf new String Buffer buf append NON NLS 1 for int i 0 i max i if key Table i null buf append key Table i append append value Table i NON NLS 1 if i max buf append NON NLS 1 buf append NON NLS 1 return buf to String  toString StringBuffer StringBuffer keyTable keyTable valueTable toString

private int element Size Constructs a new empty hashtable A default capacity and load factor is used Note that the hashtable will automatically grow when it gets full public Float Cache this 13  elementSize FloatCache
Constructs a new empty hashtable with the specified initial capacity param initial Capacity int the initial number of buckets public Float Cache int initial Capacity element Size 0 key Table new float initial Capacity value Table new int initial Capacity  initialCapacity FloatCache initialCapacity elementSize keyTable initialCapacity valueTable initialCapacity
Clears the hash table so that it has no more elements in it public void clear for int i key Table length i 0 key Table i 0 0f value Table i 0 element Size 0  keyTable keyTable valueTable elementSize
Returns true if the collection contains an element for the key param key CODE float CODE the key that we are looking for return boolean public boolean contains Key float key if key 0 0f for int i 0 max element Size i max i if key Table i 0 0f int value1 Float float To Int Bits key int value2 Float float To Int Bits key Table i if value1 2147483648 value2 2147483648 return true if value1 0 value2 0 return true else for int i 0 max element Size i max i if key Table i key return true return false  containsKey elementSize keyTable floatToIntBits floatToIntBits keyTable elementSize keyTable
Gets the object associated with the specified key in the hashtable param key CODE float CODE the specified key return int the element for the key or 1 if the key is not defined in the hash table public int get float key if key 0 0f for int i 0 max element Size i max i if key Table i 0 0f int value1 Float float To Int Bits key int value2 Float float To Int Bits key Table i if value1 2147483648 value2 2147483648 return value Table i if value1 0 value2 0 return value Table i else for int i 0 max element Size i max i if key Table i key return value Table i return 1  elementSize keyTable floatToIntBits floatToIntBits keyTable valueTable valueTable elementSize keyTable valueTable
Puts the specified element into the hashtable using the specified key The element may be retrieved by doing a get with the same key param key CODE float CODE the specified key in the hashtable param value CODE int CODE the specified element return int value public int put float key int value if element Size key Table length resize System arraycopy key Table 0 key Table new float element Size 2 0 element Size System arraycopy value Table 0 value Table new int element Size 2 0 element Size key Table element Size key value Table element Size value element Size return value  elementSize keyTable keyTable keyTable elementSize elementSize valueTable valueTable elementSize elementSize keyTable elementSize valueTable elementSize elementSize
Converts to a rather lengthy String return String the ascii representation of the receiver public String to String int max element Size String Buffer buf new String Buffer buf append NON NLS 1 for int i 0 i max i if key Table i 0 key Table i 0 value Table i 0 buf append key Table i append append value Table i NON NLS 1 if i max buf append NON NLS 1 buf append NON NLS 1 return buf to String  toString elementSize StringBuffer StringBuffer keyTable keyTable valueTable keyTable valueTable toString

int threshold Constructs a new empty hashtable A default capacity and load factor is used Note that the hashtable will automatically grow when it gets full public Integer Cache this 13  IntegerCache
Constructs a new empty hashtable with the specified initial capacity param initial Capacity int the initial number of buckets public Integer Cache int initial Capacity element Size 0 threshold int initial Capacity 0 66 key Table new int initial Capacity value Table new int initial Capacity  initialCapacity IntegerCache initialCapacity elementSize initialCapacity keyTable initialCapacity valueTable initialCapacity
Clears the hash table so that it has no more elements in it public void clear for int i key Table length i 0 key Table i 0 value Table i 0 element Size 0  keyTable keyTable valueTable elementSize
Returns true if the collection contains an element for the key param key CODE double CODE the key that we are looking for return boolean public boolean contains Key int key int index hash key while key Table index 0 key Table index 0 value Table index 0 if key Table index key return true index index 1 key Table length return false  containsKey keyTable keyTable valueTable keyTable keyTable
Gets the object associated with the specified key in the hashtable param key CODE double CODE the specified key return int the element for the key or 1 if the key is not defined in the hash table public int get int key int index hash key while key Table index 0 key Table index 0 value Table index 0 if key Table index key return value Table index index index 1 key Table length return 1  keyTable keyTable valueTable keyTable valueTable keyTable
Return a hashcode for the value of the key parameter param key int return int the hash code corresponding to the key value public int hash int key return key 0x7FFFFFFF key Table length  keyTable
Puts the specified element into the hashtable using the specified key The element may be retrieved by doing a get with the same key param key CODE int CODE the specified key in the hashtable param value CODE int CODE the specified element return int value public int put int key int value int index hash key while key Table index 0 key Table index 0 value Table index 0 if key Table index key return value Table index value index index 1 key Table length key Table index key value Table index value assumes the threshold is never equal to the size of the table if element Size threshold rehash return value  keyTable keyTable valueTable keyTable valueTable keyTable keyTable valueTable elementSize
Rehashes the content of the table into a bigger table This method is called automatically when the hashtable s size exceeds the threshold private void rehash Integer Cache new Hashtable new Integer Cache key Table length 2 for int i key Table length i 0 int key key Table i int value value Table i if key 0 key 0 value 0 new Hashtable put key value this key Table new Hashtable key Table this value Table new Hashtable value Table this threshold new Hashtable threshold  IntegerCache newHashtable IntegerCache keyTable keyTable keyTable valueTable newHashtable keyTable newHashtable keyTable valueTable newHashtable valueTable newHashtable
Returns the number of elements contained in the hashtable return CODE int CODE The size of the table public int size return element Size  elementSize
Converts to a rather lengthy String return String the ascii representation of the receiver public String to String int max size String Buffer buf new String Buffer buf append NON NLS 1 for int i 0 i max i if key Table i 0 key Table i 0 value Table i 0 buf append key Table i append append value Table i NON NLS 1 if i max buf append NON NLS 1 buf append NON NLS 1 return buf to String  toString StringBuffer StringBuffer keyTable keyTable valueTable keyTable valueTable toString

private boolean is Wide false public Label for creating labels ahead of code generation  isWide
param code Stream org eclipse jdt internal compiler codegen Code Stream public Label Code Stream code Stream this code Stream code Stream  codeStream CodeStream CodeStream codeStream codeStream codeStream
Add a forward refrence for the array void add Forward Reference int i Pos int length if forward Reference Count length forward References length System arraycopy forward References 0 forward References new int 2 length 0 length forward References forward Reference Count i Pos  addForwardReference iPos forwardReferenceCount forwardReferences forwardReferences forwardReferences forwardReferences forwardReferenceCount iPos
Add a forward refrence for the array public void append Forward References From Label other Label int other Count other Label forward Reference Count if other Count 0 return int length forward References length int needed Space other Count forward Reference Count if needed Space length System arraycopy forward References 0 forward References new int needed Space 0 forward Reference Count append other forward references at the end so they will get updated as well System arraycopy other Label forward References 0 forward References forward Reference Count other Count forward Reference Count needed Space  appendForwardReferencesFrom otherLabel otherCount otherLabel forwardReferenceCount otherCount forwardReferences neededSpace otherCount forwardReferenceCount neededSpace forwardReferences forwardReferences neededSpace forwardReferenceCount otherLabel forwardReferences forwardReferences forwardReferenceCount otherCount forwardReferenceCount neededSpace
void branch if position POS NOT SET add Forward Reference code Stream position Leave two bytes free to generate the jump afterwards code Stream position 2 code Stream class File Offset 2 else Position is set Write it if it is not a wide branch int offset position code Stream position 1 if Math abs offset 0x7FFF this code Stream wide Mode throw new Abort Method Code Stream RESTART IN WIDE MODE null code Stream write Signed Short offset  POS_NOT_SET addForwardReference codeStream codeStream codeStream classFileOffset codeStream codeStream wideMode AbortMethod CodeStream RESTART_IN_WIDE_MODE codeStream writeSignedShort
void branch Wide if position POS NOT SET add Forward Reference code Stream position Leave 4 bytes free to generate the jump offset afterwards is Wide true code Stream position 4 code Stream class File Offset 4 else Position is set Write it code Stream write Signed Word position code Stream position 1  branchWide POS_NOT_SET addForwardReference codeStream isWide codeStream codeStream classFileOffset codeStream writeSignedWord codeStream
return boolean public boolean has Forward References return forward Reference Count 0  hasForwardReferences forwardReferenceCount
public void inline Forward References From Labels Targeting int goto Location Code required to optimized unreachable gotos public boolean is Branch Target int location Label labels code Stream labels for int i code Stream count Labels 1 i 0 i Label label labels i if label position location label is Standard Label return true return false Label labels code Stream labels for int i code Stream count Labels 1 i 0 i Label label labels i if label position goto Location label is Standard Label this append Forward References From label Code required to optimized unreachable gotos label position POS NOT SET else break same target labels should be contiguous  inlineForwardReferencesFromLabelsTargeting gotoLocation isBranchTarget codeStream codeStream countLabels isStandardLabel codeStream codeStream countLabels gotoLocation isStandardLabel appendForwardReferencesFrom POS_NOT_SET
public void initialize Code Stream stream this code Stream stream this position POS NOT SET this forward Reference Count 0  CodeStream codeStream POS_NOT_SET forwardReferenceCount
this forward Reference Count 0 public boolean is Standard Label return true  forwardReferenceCount isStandardLabel
public void place Currently lacking wide support if Code Stream DEBUG System out println t t t t place at code Stream position this NON NLS 1 NON NLS 2 if position POS NOT SET position code Stream position code Stream add Label this int old Position position boolean is Optimized Branch false TURNED OFF since fail on 1F4IRD9 if forward Reference Count 0 is Optimized Branch forward References forward Reference Count 1 2 position code Stream b Code Stream code Stream class File Offset 3 Opcodes OPC goto if is Optimized Branch code Stream position position 3 code Stream class File Offset 3 forward Reference Count also update the P Cs in the related debug attributes OLD CODE int index code Stream pc To Source Map Size 1 while index 0 code Stream pc To Source Map index 1 old Position code Stream pc To Source Map index 1 position Beginning of new code int index code Stream pc To Source Map Size 2 if code Stream last EntryPC old Position code Stream last EntryPC position if index 0 code Stream pc To Source Map index position code Stream pc To Source Map Size 2 end of new code if code Stream generate Local Variable Table Attributes Local Variable Binding locals code Stream locals for int i 0 max locals length i max i Local Variable Binding local locals i if local null local initialization Count 0 if local initializationP Cs local initialization Count 1 1 1 old Position we want to prevent interval of size 0 to have a negative size see PR 1GIRQLA ITPJCORE ALL Class Format Error for local variable attribute local initializationP Cs local initialization Count 1 1 1 position if local initializationP Cs local initialization Count 1 1 old Position local initializationP Cs local initialization Count 1 1 position for int i 0 i forward Reference Count i int offset position forward References i 1 if Math abs offset 0x7FFF this code Stream wide Mode throw new Abort Method Code Stream RESTART IN WIDE MODE null if this code Stream wide Mode if this is Wide code Stream write Signed Word forward References i offset else code Stream write Signed Short forward References i offset else code Stream write Signed Short forward References i offset For all labels placed at that position we check if we need to rewrite the jump offset It is the case each time a label had a forward reference to the current position Like we change the current position we have to change the jump offset See 1F4IRD9 for more details if is Optimized Branch for int i 0 i code Stream count Labels i Label label code Stream labels i if old Position label position label position position if label instanceof Case Label int offset position Case Label label instruction Position for int j 0 j label forward Reference Count j int forward Position label forward References j code Stream write Signed Word forward Position offset else for int j 0 j label forward Reference Count j int forward Position label forward References j int offset position forward Position 1 if Math abs offset 0x7FFF this code Stream wide Mode throw new Abort Method Code Stream RESTART IN WIDE MODE null if this code Stream wide Mode if this is Wide code Stream write Signed Word forward Position offset else code Stream write Signed Short forward Position offset else code Stream write Signed Short forward Position offset  CodeStream codeStream POS_NOT_SET codeStream codeStream addLabel oldPosition isOptimizedBranch forwardReferenceCount isOptimizedBranch forwardReferences forwardReferenceCount codeStream bCodeStream codeStream classFileOffset OPC_goto isOptimizedBranch codeStream codeStream classFileOffset forwardReferenceCount PCs codeStream pcToSourceMapSize codeStream pcToSourceMap oldPosition codeStream pcToSourceMap codeStream pcToSourceMapSize codeStream lastEntryPC oldPosition codeStream lastEntryPC codeStream pcToSourceMap codeStream pcToSourceMapSize codeStream generateLocalVariableTableAttributes LocalVariableBinding codeStream LocalVariableBinding initializationCount initializationPCs initializationCount oldPosition ClassFormatError initializationPCs initializationCount initializationPCs initializationCount oldPosition initializationPCs initializationCount forwardReferenceCount forwardReferences codeStream wideMode AbortMethod CodeStream RESTART_IN_WIDE_MODE codeStream wideMode isWide codeStream writeSignedWord forwardReferences codeStream writeSignedShort forwardReferences codeStream writeSignedShort forwardReferences isOptimizedBranch codeStream countLabels codeStream oldPosition CaseLabel CaseLabel instructionPosition forwardReferenceCount forwardPosition forwardReferences codeStream writeSignedWord forwardPosition forwardReferenceCount forwardPosition forwardReferences forwardPosition codeStream wideMode AbortMethod CodeStream RESTART_IN_WIDE_MODE codeStream wideMode isWide codeStream writeSignedWord forwardPosition codeStream writeSignedShort forwardPosition codeStream writeSignedShort forwardPosition
Print out the receiver public String to String String basic get Class get Name basic basic substring basic last Index Of 1 String Buffer buffer new String Buffer basic buffer append append Integer to Hex String hash Code buffer append position append position NON NLS 1 buffer append forwards NON NLS 1 for int i 0 i forward Reference Count 1 i buffer append forward References i NON NLS 1 if forward Reference Count 1 buffer append forward References forward Reference Count 1 buffer append NON NLS 1 return buffer to String  toString getClass getName lastIndexOf StringBuffer StringBuffer toHexString hashCode forwardReferenceCount forwardReferences forwardReferenceCount forwardReferences forwardReferenceCount toString

int threshold Constructs a new empty hashtable A default capacity and load factor is used Note that the hashtable will automatically grow when it gets full public Long Cache this 13  LongCache
Constructs a new empty hashtable with the specified initial capacity param initial Capacity int the initial number of buckets public Long Cache int initial Capacity element Size 0 threshold int initial Capacity 0 66 key Table new long initial Capacity value Table new int initial Capacity  initialCapacity LongCache initialCapacity elementSize initialCapacity keyTable initialCapacity valueTable initialCapacity
Clears the hash table so that it has no more elements in it public void clear for int i key Table length i 0 key Table i 0 value Table i 0 element Size 0  keyTable keyTable valueTable elementSize
Returns true if the collection contains an element for the key param key CODE long CODE the key that we are looking for return boolean public boolean contains Key long key int index hash key while key Table index 0 key Table index 0 value Table index 0 if key Table index key return true index index 1 key Table length return false  containsKey keyTable keyTable valueTable keyTable keyTable
Gets the object associated with the specified key in the hashtable param key CODE long CODE the specified key return int the element for the key or 1 if the key is not defined in the hash table public int get long key int index hash key while key Table index 0 key Table index 0 value Table index 0 if key Table index key return value Table index index index 1 key Table length return 1  keyTable keyTable valueTable keyTable valueTable keyTable
Return a hashcode for the value of the key parameter param key long return int the hash code corresponding to the key value public int hash long key return int key 0x7FFFFFFF key Table length  keyTable
Puts the specified element into the hashtable using the specified key The element may be retrieved by doing a get with the same key param key CODE long CODE the specified key in the hashtable param value CODE int CODE the specified element return int value public int put long key int value int index hash key while key Table index 0 key Table index 0 value Table index 0 if key Table index key return value Table index value index index 1 key Table length key Table index key value Table index value assumes the threshold is never equal to the size of the table if element Size threshold rehash return value  keyTable keyTable valueTable keyTable valueTable keyTable keyTable valueTable elementSize
Rehashes the content of the table into a bigger table This method is called automatically when the hashtable s size exceeds the threshold private void rehash Long Cache new Hashtable new Long Cache key Table length 2 for int i key Table length i 0 long key key Table i int value value Table i if key 0 key 0 value 0 new Hashtable put key value this key Table new Hashtable key Table this value Table new Hashtable value Table this threshold new Hashtable threshold  LongCache newHashtable LongCache keyTable keyTable keyTable valueTable newHashtable keyTable newHashtable keyTable valueTable newHashtable valueTable newHashtable
Returns the number of elements contained in the hashtable return CODE int CODE The size of the table public int size return element Size  elementSize
Converts to a rather lengthy String return String the ascii representation of the receiver public String to String int max size String Buffer buf new String Buffer buf append NON NLS 1 for int i 0 i max i if key Table i 0 key Table i 0 value Table i 0 buf append key Table i append append value Table i NON NLS 1 if i max buf append NON NLS 1 buf append NON NLS 1 return buf to String  toString StringBuffer StringBuffer keyTable keyTable valueTable keyTable valueTable toString

int threshold Constructs a new empty hashtable A default capacity is used Note that the hashtable will automatically grow when it gets full public Method Name And Type Cache this 13  MethodNameAndTypeCache
Constructs a new empty hashtable with the specified initial capacity param initial Capacity int the initial number of buckets public Method Name And Type Cache int initial Capacity this element Size 0 this threshold int initial Capacity 0 66f this key Table new Method Binding initial Capacity this value Table new int initial Capacity  initialCapacity MethodNameAndTypeCache initialCapacity elementSize initialCapacity keyTable MethodBinding initialCapacity valueTable initialCapacity
Clears the hash table so that it has no more elements in it public void clear for int i key Table length i 0 key Table i null value Table i 0 element Size 0  keyTable keyTable valueTable elementSize
Returns true if the collection contains an element for the key param key char the key that we are looking for return boolean public boolean contains Key Method Binding key int index hash Code key while key Table index null if equals For Name And Type key Table index key return true index index 1 key Table length return false  containsKey MethodBinding hashCode keyTable equalsForNameAndType keyTable keyTable
Returns true if the two method Binding are consider to be equal for the name and type purpose public boolean equals For Name And Type Method Binding method1 Method Binding method2 return Char Operation equals method1 selector method2 selector Char Operation equals method1 signature method2 signature  methodBinding equalsForNameAndType MethodBinding MethodBinding CharOperation CharOperation
Gets the object associated with the specified key in the hashtable param key CODE char CODE the specified key return int the element for the key or 1 if the key is not defined in the hash table public int get Method Binding key int index hash Code key while key Table index null if equals For Name And Type key Table index key return value Table index index index 1 key Table length return 1  MethodBinding hashCode keyTable equalsForNameAndType keyTable valueTable keyTable
Return the hashcode for the key parameter param key org eclipse jdt internal compiler lookup Method Binding return int public int hash Code Method Binding key return Char Operation hash Code key selector key Table length  MethodBinding hashCode MethodBinding CharOperation hashCode keyTable
Puts the specified element into the hashtable using the specified key The element may be retrieved by doing a get with the same key The key and the element cannot be null param key CODE Object CODE the specified key in the hashtable param value CODE int CODE the specified element return int the old value of the key or 1 if it did not have one public int put Method Binding key int value int index hash Code key while key Table index null if equals For Name And Type key Table index key return value Table index value index index 1 key Table length key Table index key value Table index value assumes the threshold is never equal to the size of the table if element Size threshold rehash return value  MethodBinding hashCode keyTable equalsForNameAndType keyTable valueTable keyTable keyTable valueTable elementSize
Rehashes the content of the table into a bigger table This method is called automatically when the hashtable s size exceeds the threshold private void rehash Method Name And Type Cache new Hashtable new Method Name And Type Cache key Table length 2 for int i key Table length i 0 if key Table i null new Hashtable put key Table i value Table i this key Table new Hashtable key Table this value Table new Hashtable value Table this threshold new Hashtable threshold  MethodNameAndTypeCache newHashtable MethodNameAndTypeCache keyTable keyTable keyTable newHashtable keyTable valueTable keyTable newHashtable keyTable valueTable newHashtable valueTable newHashtable
Returns the number of elements contained in the hashtable return CODE int CODE The size of the table public int size return element Size  elementSize
Converts to a rather lengthy String return String the ascii representation of the receiver public String to String int max size String Buffer buf new String Buffer buf append NON NLS 1 for int i 0 i max i if key Table i null buf append key Table i append append value Table i NON NLS 1 if i max buf append NON NLS 1 buf append NON NLS 1 return buf to String  toString StringBuffer StringBuffer keyTable keyTable valueTable toString

int threshold Constructs a new empty hashtable A default capacity is used Note that the hashtable will automatically grow when it gets full public Object Cache this 13  ObjectCache
Constructs a new empty hashtable with the specified initial capacity param initial Capacity int the initial number of buckets public Object Cache int initial Capacity this element Size 0 this threshold int initial Capacity 0 66f this key Table new Object initial Capacity this value Table new int initial Capacity  initialCapacity ObjectCache initialCapacity elementSize initialCapacity keyTable initialCapacity valueTable initialCapacity
Clears the hash table so that it has no more elements in it public void clear for int i key Table length i 0 key Table i null value Table i 0 element Size 0  keyTable keyTable valueTable elementSize
Returns true if the collection contains an element for the key param key char the key that we are looking for return boolean public boolean contains Key Object key int index hash Code key while key Table index null if key Table index key return true index index 1 key Table length return false  containsKey hashCode keyTable keyTable keyTable
Gets the object associated with the specified key in the hashtable param key CODE char CODE the specified key return int the element for the key or 1 if the key is not defined in the hash table public int get Object key int index hash Code key while key Table index null if key Table index key return value Table index index index 1 key Table length return 1  hashCode keyTable keyTable valueTable keyTable
Return the hashcode for the key parameter param key org eclipse jdt internal compiler lookup Method Binding return int public int hash Code Object key return key hash Code 0x7FFFFFFF key Table length  MethodBinding hashCode hashCode keyTable
Puts the specified element into the hashtable using the specified key The element may be retrieved by doing a get with the same key The key and the element cannot be null param key CODE Object CODE the specified key in the hashtable param value CODE int CODE the specified element return int the old value of the key or 1 if it did not have one public int put Object key int value int index hash Code key while key Table index null if key Table index key return value Table index value index index 1 key Table length key Table index key value Table index value assumes the threshold is never equal to the size of the table if element Size threshold rehash return value  hashCode keyTable keyTable valueTable keyTable keyTable valueTable elementSize
Rehashes the content of the table into a bigger table This method is called automatically when the hashtable s size exceeds the threshold private void rehash Object Cache new Hashtable new Object Cache key Table length 2 for int i key Table length i 0 if key Table i null new Hashtable put key Table i value Table i this key Table new Hashtable key Table this value Table new Hashtable value Table this threshold new Hashtable threshold  ObjectCache newHashtable ObjectCache keyTable keyTable keyTable newHashtable keyTable valueTable keyTable newHashtable keyTable valueTable newHashtable valueTable newHashtable
Returns the number of elements contained in the hashtable return CODE int CODE The size of the table public int size return element Size  elementSize
Converts to a rather lengthy String return String the ascii representation of the receiver public String to String int max size String Buffer buf new String Buffer buf append NON NLS 1 for int i 0 i max i if key Table i null buf append key Table i append append value Table i NON NLS 1 if i max buf append NON NLS 1 buf append NON NLS 1 return buf to String  toString StringBuffer StringBuffer keyTable keyTable valueTable toString

public Compilation Result char file Name int unit Index int total Units Known int max Problem Per Unit this file Name file Name this unit Index unit Index this total Units Known total Units Known this max Problem Per Unit max Problem Per Unit  CompilationResult fileName unitIndex totalUnitsKnown maxProblemPerUnit fileName fileName unitIndex unitIndex totalUnitsKnown totalUnitsKnown maxProblemPerUnit maxProblemPerUnit
public Compilation Result I Compilation Unit compilation Unit int unit Index int total Units Known int max Problem Per Unit this file Name compilation Unit get File Name this compilation Unit compilation Unit this unit Index unit Index this total Units Known total Units Known this max Problem Per Unit max Problem Per Unit  CompilationResult ICompilationUnit compilationUnit unitIndex totalUnitsKnown maxProblemPerUnit fileName compilationUnit getFileName compilationUnit compilationUnit unitIndex unitIndex totalUnitsKnown totalUnitsKnown maxProblemPerUnit maxProblemPerUnit
private int compute Priority I Problem problem final int P STATIC 10000 final int P OUTSIDE METHOD 40000 final int P FIRST ERROR 20000 final int P ERROR 100000 int priority 10000 problem get Source Line Number early problems first if priority 0 priority 0 if problem is Error priority P ERROR Reference Context context problems Map null null Reference Context problems Map get problem if context null if context instanceof Abstract Method Declaration Abstract Method Declaration method Abstract Method Declaration context if method is Static priority P STATIC else priority P OUTSIDE METHOD else priority P OUTSIDE METHOD if first Errors Map contains Key problem priority P FIRST ERROR return priority  computePriority IProblem P_STATIC P_OUTSIDE_METHOD P_FIRST_ERROR P_ERROR getSourceLineNumber isError P_ERROR ReferenceContext problemsMap ReferenceContext problemsMap AbstractMethodDeclaration AbstractMethodDeclaration AbstractMethodDeclaration isStatic P_STATIC P_OUTSIDE_METHOD P_OUTSIDE_METHOD firstErrorsMap containsKey P_FIRST_ERROR
public I Problem get All Problems I Problem only Problems this get Problems int only Problem Count only Problems null only Problems length 0 I Problem only Tasks this get Tasks int only Task Count only Tasks null only Tasks length 0 if only Task Count 0 return only Problems if only Problem Count 0 return only Tasks int total Number Of Problem only Problem Count only Task Count I Problem all Problems new I Problem total Number Of Problem int all Problem Index 0 int task Index 0 int problem Index 0 while task Index problem Index total Number Of Problem I Problem next Task null I Problem next Problem null if task Index only Task Count next Task only Tasks task Index if problem Index only Problem Count next Problem only Problems problem Index select the next problem I Problem current Problem null if next Problem null if next Task null if next Problem get Source Start next Task get Source Start current Problem next Problem problem Index else current Problem next Task task Index else current Problem next Problem problem Index else if next Task null current Problem next Task task Index all Problems all Problem Index current Problem return all Problems  IProblem getAllProblems IProblem onlyProblems getProblems onlyProblemCount onlyProblems onlyProblems IProblem onlyTasks getTasks onlyTaskCount onlyTasks onlyTasks onlyTaskCount onlyProblems onlyProblemCount onlyTasks totalNumberOfProblem onlyProblemCount onlyTaskCount IProblem allProblems IProblem totalNumberOfProblem allProblemIndex taskIndex problemIndex taskIndex problemIndex totalNumberOfProblem IProblem nextTask IProblem nextProblem taskIndex onlyTaskCount nextTask onlyTasks taskIndex problemIndex onlyProblemCount nextProblem onlyProblems problemIndex IProblem currentProblem nextProblem nextTask nextProblem getSourceStart nextTask getSourceStart currentProblem nextProblem problemIndex currentProblem nextTask taskIndex currentProblem nextProblem problemIndex nextTask currentProblem nextTask taskIndex allProblems allProblemIndex currentProblem allProblems
public Class File get Class Files Enumeration files compiled Types elements Class File class Files new Class File compiled Types size int index 0 while files has More Elements class Files index Class File files next Element return class Files  ClassFile getClassFiles compiledTypes ClassFile classFiles ClassFile compiledTypes hasMoreElements classFiles ClassFile nextElement classFiles
Answer the initial compilation unit corresponding to the present compilation result public I Compilation Unit get Compilation Unit return compilation Unit  ICompilationUnit getCompilationUnit compilationUnit
Answer the initial file name public char get File Name return file Name  getFileName fileName
Answer the errors encountered during compilation public I Problem get Errors I Problem reported Problems get Problems int error Count 0 for int i 0 i this problem Count i if reported Problems i is Error error Count if error Count this problem Count return reported Problems I Problem errors new I Problem error Count int index 0 for int i 0 i this problem Count i if reported Problems i is Error errors index reported Problems i return errors  IProblem getErrors IProblem reportedProblems getProblems errorCount problemCount reportedProblems isError errorCount errorCount problemCount reportedProblems IProblem IProblem errorCount problemCount reportedProblems isError reportedProblems
Answer the problems errors and warnings encountered during compilation This is not a compiler internal API it has side effects It is intended to be used only once all problems have been detected and makes sure the problems slot as the exact size of the number of problems public I Problem get Problems Re adjust the size of the problems if necessary if problems null if this problem Count problems length System arraycopy problems 0 problems new I Problem problem Count 0 problem Count if this max Problem Per Unit 0 this problem Count this max Problem Per Unit quick Prioritize problems 0 problem Count 1 this problem Count this max Problem Per Unit System arraycopy problems 0 problems new I Problem problem Count 0 problem Count Sort problems per source positions quick Sort problems 0 problems length 1 return problems  IProblem getProblems problemCount IProblem problemCount problemCount maxProblemPerUnit problemCount maxProblemPerUnit quickPrioritize problemCount problemCount maxProblemPerUnit IProblem problemCount problemCount quickSort
Answer the tasks TO DO encountered during compilation This is not a compiler internal API it has side effects It is intended to be used only once all problems have been detected and makes sure the problems slot as the exact size of the number of problems public I Problem get Tasks Re adjust the size of the tasks if necessary if this tasks null if this task Count this tasks length System arraycopy this tasks 0 this tasks new I Problem this task Count 0 this task Count quick Sort tasks 0 tasks length 1 return this tasks  IProblem getTasks taskCount IProblem taskCount taskCount quickSort
public boolean has Errors if problems null for int i 0 i problem Count i if problems i is Error return true return false  hasErrors problemCount isError
public boolean has Problems return problem Count 0  hasProblems problemCount
public boolean has Syntax Error if problems null for int i 0 i problem Count i I Problem problem problems i if problem getID I Problem Syntax 0 problem is Error return true return false  hasSyntaxError problemCount IProblem IProblem isError
public boolean has Tasks return this task Count 0  hasTasks taskCount
public boolean has Warnings if problems null for int i 0 i problem Count i if problems i is Warning return true return false  hasWarnings problemCount isWarning
private static void quick Sort I Problem list int left int right if left right return sort the problems by their source start position starting with 0 int original left left int original right right int mid list left right 2 get Source Start do while list left get Source Start mid left while mid list right get Source Start right if left right I Problem tmp list left list left list right list right tmp left right while left right if original left right quick Sort list original left right if left original right quick Sort list left original right  quickSort IProblem original_left original_right getSourceStart getSourceStart getSourceStart IProblem original_left quickSort original_left original_right quickSort original_right
private void quick Prioritize I Problem list int left int right if left right return sort the problems by their priority starting with the highest priority int original left left int original right right int mid compute Priority list left right 2 do while compute Priority list right mid right while mid compute Priority list left left if left right I Problem tmp list left list left list right list right tmp left right while left right if original left right quick Prioritize list original left right if left original right quick Prioritize list left original right  quickPrioritize IProblem original_left original_right computePriority computePriority computePriority IProblem original_left quickPrioritize original_left original_right quickPrioritize original_right
For now remember the compiled type using its compound name public void record char type Name Class File class File compiled Types put type Name class File  typeName ClassFile classFile compiledTypes typeName classFile
public void record I Problem new Problem Reference Context reference Context if new Problem getID I Problem Task record Task new Problem return if problem Count 0 problems new I Problem 5 else if problem Count problems length System arraycopy problems 0 problems new I Problem problem Count 2 0 problem Count problems problem Count new Problem if reference Context null if problems Map null problems Map new Hashtable 5 if first Errors Map null first Errors Map new Hashtable 5 if new Problem is Error reference Context has Errors first Errors Map put new Problem new Problem problems Map put new Problem reference Context  IProblem newProblem ReferenceContext referenceContext newProblem IProblem recordTask newProblem problemCount IProblem problemCount IProblem problemCount problemCount problemCount newProblem referenceContext problemsMap problemsMap firstErrorsMap firstErrorsMap newProblem isError referenceContext hasErrors firstErrorsMap newProblem newProblem problemsMap newProblem referenceContext
private void record Task I Problem new Problem if this task Count 0 this tasks new I Problem 5 else if this task Count this tasks length System arraycopy this tasks 0 this tasks new I Problem this task Count 2 0 this task Count this tasks this task Count new Problem  recordTask IProblem newProblem taskCount IProblem taskCount IProblem taskCount taskCount taskCount newProblem
public Compilation Result tag As Accepted this has Been Accepted true this problems Map null flush return this  CompilationResult tagAsAccepted hasBeenAccepted problemsMap
public String to String String Buffer buffer new String Buffer if this file Name null buffer append Filename append this file Name append n NON NLS 1 if this compiled Types null buffer append COMPILED type s n NON NLS 1 Enumeration type Names this compiled Types keys while type Names has More Elements char type Name char type Names next Element buffer append t append type Name append n NON NLS 1 else buffer append No COMPILED type n NON NLS 1 if problems null buffer append this problem Count append PROBLEM s detected n NON NLS 1 NON NLS 2 for int i 0 i this problem Count i buffer append t append this problems i append n NON NLS 1 else buffer append No PROBLEM n NON NLS 1 return buffer to String  toString StringBuffer StringBuffer fileName fileName compiledTypes typeNames compiledTypes typeNames hasMoreElements typeName typeNames nextElement typeName problemCount problemCount toString

this requestor new I Compiler Requestor public void accept Result Compilation Result result if Debug Requestor is Active Debug Requestor accept Debug Result result requestor accept Result result  ICompilerRequestor acceptResult CompilationResult DebugRequestor isActive DebugRequestor acceptDebugResult acceptResult
Answer a new compiler using the given name environment and compiler options The environment and options will be in effect for the lifetime of the compiler When the compiler is run compilation results are sent to the given requestor param environment org eclipse jdt internal compiler api env I Name Environment Environment used by the compiler in order to resolve type and package names The name environment implements the actual connection of the compiler to the outside world e g in batch mode the name environment is performing pure file accesses reuse previous build state or connection to repositories Note the name environment is responsible for implementing the actual classpath rules param policy org eclipse jdt internal compiler api problem I Error Handling Policy Configurable part for problem handling allowing the compiler client to specify the rules for handling problems stop on first error or accumulate them all and at the same time perform some actions such as opening a dialog in UI when compiling interactively see org eclipse jdt internal compiler Default Error Handling Policies param requestor org eclipse jdt internal compiler api I Compiler Requestor Component which will receive and persist all compilation results and is intended to consume them as they are produced Typically in a batch compiler it is responsible for writing out the actual class files to the file system see org eclipse jdt internal compiler Compilation Result param problem Factory org eclipse jdt internal compiler api problem I Problem Factory Factory used inside the compiler to create problem descriptors It allows the compiler client to supply its own representation of compilation problems in order to avoid object conversions Note that the factory is not supposed to accumulate the created problems the compiler will gather them all and hand them back as part of the compilation unit result public Compiler I Name Environment environment I Error Handling Policy policy Map settings final I Compiler Requestor requestor I Problem Factory problem Factory create a problem handler given a handling policy this options new Compiler Options settings wrap requestor in Debug Requestor if one is specified if Debug Requestor null this requestor requestor else this requestor new I Compiler Requestor public void accept Result Compilation Result result if Debug Requestor is Active Debug Requestor accept Debug Result result requestor accept Result result this problem Reporter new Problem Reporter policy this options problem Factory this lookup Environment new Lookup Environment this options problem Reporter environment initialize Parser  INameEnvironment IErrorHandlingPolicy DefaultErrorHandlingPolicies ICompilerRequestor CompilationResult problemFactory IProblemFactory INameEnvironment IErrorHandlingPolicy ICompilerRequestor IProblemFactory problemFactory CompilerOptions DebugRequestor DebugRequestor ICompilerRequestor acceptResult CompilationResult DebugRequestor isActive DebugRequestor acceptDebugResult acceptResult problemReporter ProblemReporter problemFactory lookupEnvironment LookupEnvironment problemReporter initializeParser
this requestor new I Compiler Requestor public void accept Result Compilation Result result if Debug Requestor is Active Debug Requestor accept Debug Result result requestor accept Result result  ICompilerRequestor acceptResult CompilationResult DebugRequestor isActive DebugRequestor acceptDebugResult acceptResult
Answer a new compiler using the given name environment and compiler options The environment and options will be in effect for the lifetime of the compiler When the compiler is run compilation results are sent to the given requestor param environment org eclipse jdt internal compiler api env I Name Environment Environment used by the compiler in order to resolve type and package names The name environment implements the actual connection of the compiler to the outside world e g in batch mode the name environment is performing pure file accesses reuse previous build state or connection to repositories Note the name environment is responsible for implementing the actual classpath rules param policy org eclipse jdt internal compiler api problem I Error Handling Policy Configurable part for problem handling allowing the compiler client to specify the rules for handling problems stop on first error or accumulate them all and at the same time perform some actions such as opening a dialog in UI when compiling interactively see org eclipse jdt internal compiler Default Error Handling Policies param requestor org eclipse jdt internal compiler api I Compiler Requestor Component which will receive and persist all compilation results and is intended to consume them as they are produced Typically in a batch compiler it is responsible for writing out the actual class files to the file system see org eclipse jdt internal compiler Compilation Result param problem Factory org eclipse jdt internal compiler api problem I Problem Factory Factory used inside the compiler to create problem descriptors It allows the compiler client to supply its own representation of compilation problems in order to avoid object conversions Note that the factory is not supposed to accumulate the created problems the compiler will gather them all and hand them back as part of the compilation unit result param parse Literal Expressions As Constants code boolean code This parameter is used to optimize the literals or leave them as they are in the source If you put true Hello world will be converted to Hello world public Compiler I Name Environment environment I Error Handling Policy policy Map settings final I Compiler Requestor requestor I Problem Factory problem Factory boolean parse Literal Expressions As Constants create a problem handler given a handling policy this options new Compiler Options settings wrap requestor in Debug Requestor if one is specified if Debug Requestor null this requestor requestor else this requestor new I Compiler Requestor public void accept Result Compilation Result result if Debug Requestor is Active Debug Requestor accept Debug Result result requestor accept Result result this problem Reporter new Problem Reporter policy this options problem Factory this lookup Environment new Lookup Environment this options problem Reporter environment initialize Parser  INameEnvironment IErrorHandlingPolicy DefaultErrorHandlingPolicies ICompilerRequestor CompilationResult problemFactory IProblemFactory parseLiteralExpressionsAsConstants INameEnvironment IErrorHandlingPolicy ICompilerRequestor IProblemFactory problemFactory parseLiteralExpressionsAsConstants CompilerOptions DebugRequestor DebugRequestor ICompilerRequestor acceptResult CompilationResult DebugRequestor isActive DebugRequestor acceptDebugResult acceptResult problemReporter ProblemReporter problemFactory lookupEnvironment LookupEnvironment problemReporter initializeParser
Add an additional binary type public void accept I Binary Type binary Type Package Binding package Binding if options verbose System out println Util bind compilation load Binary NON NLS 1 new String new String binary Type get Name new Exception TRACE BINARY print Stack Trace System out System out println lookup Environment create Binary Type From binary Type package Binding  IBinaryType binaryType PackageBinding packageBinding loadBinary binaryType getName printStackTrace lookupEnvironment createBinaryTypeFrom binaryType packageBinding
Add an additional compilation unit into the loop build compilation unit declarations their bindings and record their results public void accept I Compilation Unit source Unit Switch the current policy and compilation result for this unit to the requested one Compilation Result unit Result new Compilation Result source Unit total Units total Units this options max Problems Per Unit try if options verbose String count String value Of total Units 1 System out println Util bind compilation request NON NLS 1 new String count count new String source Unit get File Name diet parsing for large collection of unit Compilation Unit Declaration parsed Unit if total Units parse Threshold parsed Unit parser parse source Unit unit Result else parsed Unit parser diet Parse source Unit unit Result initial type binding creation lookup Environment build Type Bindings parsed Unit this add Compilation Unit source Unit parsed Unit binding resolution lookup Environment complete Type Bindings parsed Unit catch Abort Compilation Unit e at this point current Compilation Unit Result may not be source Unit but some other one requested further along to resolve source Unit if unit Result compilation Unit source Unit only report once requestor accept Result unit Result tag As Accepted else throw e want to abort enclosing request to compile  ICompilationUnit sourceUnit CompilationResult unitResult CompilationResult sourceUnit totalUnits totalUnits maxProblemsPerUnit valueOf totalUnits sourceUnit getFileName CompilationUnitDeclaration parsedUnit totalUnits parseThreshold parsedUnit sourceUnit unitResult parsedUnit dietParse sourceUnit unitResult lookupEnvironment buildTypeBindings parsedUnit addCompilationUnit sourceUnit parsedUnit lookupEnvironment completeTypeBindings parsedUnit AbortCompilationUnit currentCompilationUnitResult sourceUnit sourceUnit unitResult compilationUnit sourceUnit acceptResult unitResult tagAsAccepted
Add additional source types public void accept I Source Type source Types Package Binding package Binding problem Reporter abort Due To Internal Error Util bind abort against Source Model NON NLS 1 String value Of source Types 0 get Name String value Of source Types 0 get File Name  ISourceType sourceTypes PackageBinding packageBinding problemReporter abortDueToInternalError againstSourceModel valueOf sourceTypes getName valueOf sourceTypes getFileName
protected void add Compilation Unit I Compilation Unit source Unit Compilation Unit Declaration parsed Unit append the unit to the list of ones to process later on int size units To Process length if total Units size when growing reposition units starting at position 0 System arraycopy units To Process 0 units To Process new Compilation Unit Declaration size 2 0 total Units units To Process total Units parsed Unit  addCompilationUnit ICompilationUnit sourceUnit CompilationUnitDeclaration parsedUnit unitsToProcess totalUnits unitsToProcess unitsToProcess CompilationUnitDeclaration totalUnits unitsToProcess totalUnits parsedUnit
Add the initial set of compilation units into the loop build compilation unit declarations their bindings and record their results protected void begin To Compile I Compilation Unit source Units int max Units source Units length total Units 0 units To Process new Compilation Unit Declaration max Units Switch the current policy and compilation result for this unit to the requested one for int i 0 i max Units i Compilation Unit Declaration parsed Unit Compilation Result unit Result new Compilation Result source Units i i max Units this options max Problems Per Unit try if options verbose System out println Util bind compilation request NON NLS 1 new String String value Of i 1 String value Of max Units new String source Units i get File Name diet parsing for large collection of units if total Units parse Threshold parsed Unit parser parse source Units i unit Result else parsed Unit parser diet Parse source Units i unit Result initial type binding creation lookup Environment build Type Bindings parsed Unit this add Compilation Unit source Units i parsed Unit catch Abort Compilation Unit e requestor accept Result unit Result tag As Accepted finally source Units i null no longer hold onto the unit binding resolution lookup Environment complete Type Bindings  beginToCompile ICompilationUnit sourceUnits maxUnits sourceUnits totalUnits unitsToProcess CompilationUnitDeclaration maxUnits maxUnits CompilationUnitDeclaration parsedUnit CompilationResult unitResult CompilationResult sourceUnits maxUnits maxProblemsPerUnit valueOf valueOf maxUnits sourceUnits getFileName totalUnits parseThreshold parsedUnit sourceUnits unitResult parsedUnit dietParse sourceUnits unitResult lookupEnvironment buildTypeBindings parsedUnit addCompilationUnit sourceUnits parsedUnit AbortCompilationUnit acceptResult unitResult tagAsAccepted sourceUnits lookupEnvironment completeTypeBindings
General API compile each of supplied files recompile any required types for which we have an incomplete principle structure public void compile I Compilation Unit source Units Compilation Unit Declaration unit null int i 0 try build and record parsed units begin To Compile source Units process all units some more could be injected in the loop by the lookup environment for i total Units i unit units To Process i try if options verbose System out println Util bind compilation process NON NLS 1 new String String value Of i 1 String value Of total Units new String units To Process i get File Name process unit i finally cleanup compilation unit result unit clean Up units To Process i null release reference to processed unit declaration requestor accept Result unit compilation Result tag As Accepted if options verbose System out println Util bind compilation done NON NLS 1 new String String value Of i 1 String value Of total Units new String unit get File Name catch Abort Compilation e this handle Internal Exception e unit catch Error e this handle Internal Exception e unit null throw e rethrow catch Runtime Exception e this handle Internal Exception e unit null throw e rethrow finally this reset if options verbose if total Units 1 System out println Util bind compilation units String value Of total Units NON NLS 1 else System out println Util bind compilation unit String value Of total Units NON NLS 1  ICompilationUnit sourceUnits CompilationUnitDeclaration beginToCompile sourceUnits totalUnits unitsToProcess valueOf valueOf totalUnits unitsToProcess getFileName cleanUp unitsToProcess acceptResult compilationResult tagAsAccepted valueOf valueOf totalUnits getFileName AbortCompilation handleInternalException handleInternalException RuntimeException handleInternalException totalUnits valueOf totalUnits valueOf totalUnits
protected void handle Internal Exception Throwable internal Exception Compilation Unit Declaration unit Compilation Result result find a compilation result if unit null basing result upon the current unit if available result unit compilation Result current unit being processed if result null units To Process null total Units 0 result units To Process total Units 1 compilation Result last unit in begin To Compile boolean need To Print true if result null create and record a compilation problem String Writer string Writer new String Writer Print Writer writer new Print Writer string Writer internal Exception print Stack Trace writer String Buffer buffer string Writer get Buffer String pb Arguments new String Util bind compilation internal Error NON NLS 1 n NON NLS 1 buffer to String result record problem Reporter create Problem result get File Name I Problem Unclassified pb Arguments pb Arguments Error severity 0 source start 0 source end 0 line number unit hand back the compilation result if result has Been Accepted requestor accept Result result tag As Accepted need To Print false if need To Print dump a stack trace to the console internal Exception print Stack Trace  handleInternalException internalException CompilationUnitDeclaration CompilationResult compilationResult unitsToProcess totalUnits unitsToProcess totalUnits compilationResult beginToCompile needToPrint StringWriter stringWriter StringWriter PrintWriter PrintWriter stringWriter internalException printStackTrace StringBuffer stringWriter getBuffer pbArguments internalError toString problemReporter createProblem getFileName IProblem pbArguments pbArguments hasBeenAccepted acceptResult tagAsAccepted needToPrint needToPrint internalException printStackTrace
protected void handle Internal Exception Abort Compilation abort Exception Compilation Unit Declaration unit special treatment for Silent Abort silently cancelling the compilation process if abort Exception is Silent if abort Exception silent Exception null return throw abort Exception silent Exception uncomment following line to see where the abort came from abort Exception print Stack Trace Exception may tell which compilation result it is related and which problem caused it Compilation Result result abort Exception compilation Result if result null unit null result unit compilation Result current unit being processed Lookup environment may be in middle of connecting types if result null lookup Environment unit Being Completed null result lookup Environment unit Being Completed compilation Result if result null units To Process null total Units 0 result units To Process total Units 1 compilation Result last unit in begin To Compile if result null result has Been Accepted distant problem which could not be reported back there if abort Exception problem null record Distant Problem I Problem distant Problem abort Exception problem I Problem known Problems result problems for int i 0 i result problem Count i if known Problems i distant Problem already recorded break record Distant Problem if distant Problem instanceof Default Problem fixup filename TODO philippe should improve API to make this official Default Problem distant Problem set Originating File Name result get File Name result record distant Problem unit else distant internal exception which could not be reported back there if abort Exception exception null this handle Internal Exception abort Exception exception null result return hand back the compilation result if result has Been Accepted requestor accept Result result tag As Accepted else abort Exception print Stack Trace  handleInternalException AbortCompilation abortException CompilationUnitDeclaration SilentAbort abortException isSilent abortException silentException abortException silentException abortException printStackTrace CompilationResult abortException compilationResult compilationResult lookupEnvironment unitBeingCompleted lookupEnvironment unitBeingCompleted compilationResult unitsToProcess totalUnits unitsToProcess totalUnits compilationResult beginToCompile hasBeenAccepted abortException recordDistantProblem IProblem distantProblem abortException IProblem knownProblems problemCount knownProblems distantProblem recordDistantProblem distantProblem DefaultProblem DefaultProblem distantProblem setOriginatingFileName getFileName distantProblem abortException handleInternalException abortException hasBeenAccepted acceptResult tagAsAccepted abortException printStackTrace
public void initialize Parser this parser new Parser this problem Reporter this options parse Literal Expressions As Constants  initializeParser problemReporter parseLiteralExpressionsAsConstants
Process a compilation unit already parsed and build public void process Compilation Unit Declaration unit int i this parser get Method Bodies unit fault in fields methods if unit scope null unit scope fault In Types verify inherited methods if unit scope null unit scope verify Methods lookup Environment method Verifier type checking unit resolve flow analysis unit analyse Code code generation unit generate Code reference info if options produce Reference Info unit scope null unit scope store Dependency Info refresh the total number of units known at this stage unit compilation Result total Units Known total Units  CompilationUnitDeclaration getMethodBodies faultInTypes verifyMethods lookupEnvironment methodVerifier analyseCode generateCode produceReferenceInfo storeDependencyInfo compilationResult totalUnitsKnown totalUnits
public void reset lookup Environment reset parser scanner source null units To Process null if Debug Requestor null Debug Requestor reset  lookupEnvironment unitsToProcess DebugRequestor DebugRequestor
Internal API used to resolve a given compilation unit Can run a subset of the compilation process public Compilation Unit Declaration resolve Compilation Unit Declaration unit I Compilation Unit source Unit boolean verify Methods boolean analyze Code boolean generate Code try if unit null build and record parsed units parse Threshold 0 will request a full parse begin To Compile new I Compilation Unit source Unit process all units some more could be injected in the loop by the lookup environment unit units To Process 0 else initial type binding creation lookup Environment build Type Bindings unit binding resolution lookup Environment complete Type Bindings this parser get Method Bodies unit if unit scope null fault in fields methods unit scope fault In Types if unit scope null verify Methods http dev eclipse org bugs show bug cgi id 23117 verify inherited methods unit scope verify Methods lookup Environment method Verifier type checking unit resolve flow analysis if analyze Code unit analyse Code code generation if generate Code unit generate Code if units To Process null units To Process 0 null release reference to processed unit declaration requestor accept Result unit compilation Result tag As Accepted return unit catch Abort Compilation e this handle Internal Exception e unit return unit null units To Process 0 unit catch Error e this handle Internal Exception e unit null throw e rethrow catch Runtime Exception e this handle Internal Exception e unit null throw e rethrow finally No reset is performed there anymore since within the Code Assist or related tools the compiler may be called after a call to this resolve method And such a call needs to have a compiler with a non empty environment this reset  CompilationUnitDeclaration CompilationUnitDeclaration ICompilationUnit sourceUnit verifyMethods analyzeCode generateCode parseThreshold beginToCompile ICompilationUnit sourceUnit unitsToProcess lookupEnvironment buildTypeBindings lookupEnvironment completeTypeBindings getMethodBodies faultInTypes verifyMethods show_bug verifyMethods lookupEnvironment methodVerifier analyzeCode analyseCode generateCode generateCode unitsToProcess unitsToProcess acceptResult compilationResult tagAsAccepted AbortCompilation handleInternalException unitsToProcess handleInternalException RuntimeException handleInternalException CodeAssist
Internal API used to resolve a given compilation unit Can run a subset of the compilation process public Compilation Unit Declaration resolve I Compilation Unit source Unit boolean verify Methods boolean analyze Code boolean generate Code return resolve null source Unit verify Methods analyze Code generate Code  CompilationUnitDeclaration ICompilationUnit sourceUnit verifyMethods analyzeCode generateCode sourceUnit verifyMethods analyzeCode generateCode

public final static String No Discrete Value INTERNAL USE ONLY Initialize an instance of this class according to a specific locale param loc java util Locale public Configurable Option String component Name String option Name Locale loc int current Value Index this component Name component Name this option Name option Name this current Value Index current Value Index Resource Bundle resource null try String location component Name substring 0 component Name last Index Of resource Resource Bundle get Bundle location options loc NON NLS 1 catch Missing Resource Exception e category Missing ressources entries for component Name options NON NLS 1 NON NLS 2 name Missing ressources entries for component Name options NON NLS 1 NON NLS 2 description Missing ressources entries for component Name options NON NLS 1 NON NLS 2 possible Values new String 0 id 1 if resource null return try id Integer parse Int resource get String option Name number NON NLS 1 catch Missing Resource Exception e id 1 catch Number Format Exception e id 1 try category resource get String option Name category NON NLS 1 catch Missing Resource Exception e category Missing ressources entries for component Name options NON NLS 1 NON NLS 2 try name resource get String option Name name NON NLS 1 catch Missing Resource Exception e name Missing ressources entries for component Name options NON NLS 1 NON NLS 2 try String Tokenizer tokenizer new String Tokenizer resource get String option Name possible Values NON NLS 1 NON NLS 2 int number Of Values Integer parse Int tokenizer next Token if number Of Values 1 possible Values No Discrete Value else possible Values new String number Of Values int index 0 while tokenizer has More Tokens possible Values index tokenizer next Token index catch Missing Resource Exception e possible Values new String 0 catch No Such Element Exception e possible Values new String 0 catch Number Format Exception e possible Values new String 0 try description resource get String option Name description NON NLS 1 catch Missing Resource Exception e description Missing ressources entries for component Name options NON NLS 1 NON NLS 2  NoDiscreteValue ConfigurableOption componentName optionName currentValueIndex componentName componentName optionName optionName currentValueIndex currentValueIndex ResourceBundle componentName componentName lastIndexOf ResourceBundle getBundle MissingResourceException componentName componentName componentName possibleValues parseInt getString optionName MissingResourceException NumberFormatException getString optionName MissingResourceException componentName getString optionName MissingResourceException componentName StringTokenizer StringTokenizer getString optionName possibleValues numberOfValues parseInt nextToken numberOfValues possibleValues NoDiscreteValue possibleValues numberOfValues hasMoreTokens possibleValues nextToken MissingResourceException possibleValues NoSuchElementException possibleValues NumberFormatException possibleValues getString optionName MissingResourceException componentName
Return a String that represents the localized category of the receiver return java lang String public String get Category return category  getCategory
Return a String that identifies the component owner typically the qualified type name of the class which it corresponds to e g org eclipse jdt internal compiler api Compiler return java lang String public String get Component Name return component Name  getComponentName componentName
Answer the index in possible Values array of the current setting for this particular option In case the set of possible Values is No Discrete Value then this index is the actual value e g max line lenght set to 80 return int public int get Current Value Index return current Value Index  possibleValues possibleValues NoDiscreteValue getCurrentValueIndex currentValueIndex
Answer the index in possible Values array of the default setting for this particular option In case the set of possible Values is No Discrete Value then this index is the actual value e g max line lenght set to 80 return int public int get Default Value Index return default Value Index  possibleValues possibleValues NoDiscreteValue getDefaultValueIndex defaultValueIndex
Return an String that represents the localized description of the receiver return java lang String public String get Description return description  getDescription
Internal ID which allows the configurable component to identify this particular option return int public int getID return id 
Return a String that represents the localized name of the receiver return java lang String public String get Name return name  getName
Return an array of String that represents the localized possible values of the receiver return java lang String public String get Possible Values return possible Values  getPossibleValues possibleValues
Change the index in possible Values array of the current setting for this particular option In case the set of possible Values is No Discrete Value then this index is the actual value e g max line lenght set to 80 public void set Value Index int new Index current Value Index new Index  possibleValues possibleValues NoDiscreteValue setValueIndex newIndex currentValueIndex newIndex
public String to String String Buffer buffer new String Buffer buffer append Configurable option for NON NLS 1 buffer append this component Name append n NON NLS 1 buffer append category append this category append n NON NLS 1 NON NLS 2 buffer append name append this name append n NON NLS 1 NON NLS 2 display current value buffer append current value NON NLS 1 if possible Values No Discrete Value buffer append this current Value Index else buffer append this possible Values this current Value Index buffer append n NON NLS 1 display possible values if possible Values No Discrete Value buffer append possible values NON NLS 1 for int i 0 max possible Values length i max i if i 0 buffer append NON NLS 1 buffer append possible Values i buffer append n NON NLS 1 buffer append curr val index append current Value Index append n NON NLS 1 NON NLS 2 buffer append description append description append n NON NLS 1 NON NLS 2 return buffer to String  toString StringBuffer StringBuffer componentName possibleValues NoDiscreteValue currentValueIndex possibleValues currentValueIndex possibleValues NoDiscreteValue possibleValues possibleValues currentValueIndex toString
Gets the option Name return Returns a String public String get Option Name return option Name  optionName getOptionName optionName

public static I Error Handling Policy exit After All Problems return new I Error Handling Policy public boolean stop On First Error return false  IErrorHandlingPolicy exitAfterAllProblems IErrorHandlingPolicy stopOnFirstError
return false public boolean proceed On Errors return false  proceedOnErrors
public static I Error Handling Policy exit After All Problems return new I Error Handling Policy public boolean stop On First Error return false public boolean proceed On Errors return false  IErrorHandlingPolicy exitAfterAllProblems IErrorHandlingPolicy stopOnFirstError proceedOnErrors
public static I Error Handling Policy exit On First Error return new I Error Handling Policy public boolean stop On First Error return true  IErrorHandlingPolicy exitOnFirstError IErrorHandlingPolicy stopOnFirstError
return true public boolean proceed On Errors return false  proceedOnErrors
public static I Error Handling Policy exit On First Error return new I Error Handling Policy public boolean stop On First Error return true public boolean proceed On Errors return false  IErrorHandlingPolicy exitOnFirstError IErrorHandlingPolicy stopOnFirstError proceedOnErrors
public static I Error Handling Policy proceed On First Error return new I Error Handling Policy public boolean stop On First Error return true  IErrorHandlingPolicy proceedOnFirstError IErrorHandlingPolicy stopOnFirstError
return true public boolean proceed On Errors return true  proceedOnErrors
public static I Error Handling Policy proceed On First Error return new I Error Handling Policy public boolean stop On First Error return true public boolean proceed On Errors return true  IErrorHandlingPolicy proceedOnFirstError IErrorHandlingPolicy stopOnFirstError proceedOnErrors
public static I Error Handling Policy proceed With All Problems return new I Error Handling Policy public boolean stop On First Error return false  IErrorHandlingPolicy proceedWithAllProblems IErrorHandlingPolicy stopOnFirstError
return false public boolean proceed On Errors return true  proceedOnErrors
public static I Error Handling Policy proceed With All Problems return new I Error Handling Policy public boolean stop On First Error return false public boolean proceed On Errors return true  IErrorHandlingPolicy proceedWithAllProblems IErrorHandlingPolicy stopOnFirstError proceedOnErrors

options problem Factory public void record I Problem problem Compilation Result unit Result requestor accept Problem problem  problemFactory IProblem CompilationResult unitResult acceptProblem
public Document Element Parser final I Document Element Requestor requestor I Problem Factory problem Factory Compiler Options options super new Problem Reporter Default Error Handling Policies exit After All Problems options problem Factory public void record I Problem problem Compilation Result unit Result requestor accept Problem problem false this requestor requestor int Array Stack new int 30 this options options this javadoc Parser check Doc Comment false  DocumentElementParser IDocumentElementRequestor IProblemFactory problemFactory CompilerOptions ProblemReporter DefaultErrorHandlingPolicies exitAfterAllProblems problemFactory IProblem CompilationResult unitResult acceptProblem intArrayStack javadocParser checkDocComment
INTERNAL USE ONLY protected void adjust Interface Modifiers int Stack int Ptr 2 Acc Interface  adjustInterfaceModifiers intStack intPtr AccInterface
public void check Comment persisting javadoc positions push On Int Array Stack this get Java Doc Positions boolean deprecated false int last Comment Index 1 int comment Ptr scanner comment Ptr since jdk1 2 look only in the last java doc comment next Comment for last Comment Index scanner comment Ptr last Comment Index 0 last Comment Index look for deprecated into the first javadoc comment preceeding the declaration int comment Source Start scanner comment Starts last Comment Index javadoc only non javadoc comment have negative end positions if modifiers Source Start 1 modifiers Source Start comment Source Start continue next Comment if scanner comment Stops last Comment Index 0 continue next Comment int comment Source End scanner comment Stops last Comment Index 1 stop is one over deprecated this javadoc Parser check Deprecation comment Source Start comment Source End break next Comment if deprecated check And Set Modifiers Acc Deprecated modify the modifier source start to point at the first comment if comment Ptr 0 declaration Source Start scanner comment Starts 0  checkComment pushOnIntArrayStack getJavaDocPositions lastCommentIndex commentPtr commentPtr nextComment lastCommentIndex commentPtr lastCommentIndex lastCommentIndex commentSourceStart commentStarts lastCommentIndex modifiersSourceStart modifiersSourceStart commentSourceStart nextComment commentStops lastCommentIndex nextComment commentSourceEnd commentStops lastCommentIndex javadocParser checkDeprecation commentSourceStart commentSourceEnd nextComment checkAndSetModifiers AccDeprecated commentPtr declarationSourceStart commentStarts
protected void consume Class Body Declaration Class Body Declaration Diet Block push an Initializer optimize the push pop super consume Class Body Declaration Initializer initializer Initializer ast Stack ast Ptr requestor accept Initializer initializer declaration Source Start initializer declaration Source End int Array Stack int Array Ptr 0 modifiers Source Start initializer block source Start initializer block source End  consumeClassBodyDeclaration ClassBodyDeclaration consumeClassBodyDeclaration astStack astPtr acceptInitializer declarationSourceStart declarationSourceEnd intArrayStack intArrayPtr modifiersSourceStart sourceStart sourceEnd
protected void consume Class Declaration super consume Class Declaration we know that we have a Type Declaration on the top of the ast Stack if is Local Declaration we ignore the local variable declarations return requestor exit Class end Statement Position is the end of the body Type Declaration ast Stack ast Ptr declaration Source End  consumeClassDeclaration consumeClassDeclaration TypeDeclaration astStack isLocalDeclaration exitClass endStatementPosition TypeDeclaration astStack astPtr declarationSourceEnd
protected void consume Class Header Class Header empty super consume Class Header if is Local Declaration we ignore the local variable declarations int Array Ptr return Type Declaration type Decl Type Declaration ast Stack ast Ptr Type Reference super Interfaces type Decl super Interfaces char interface Names null int interface Name Starts null int interface Name Ends null if super Interfaces null int super Interfaces Length super Interfaces length interface Names new char super Interfaces Length interface Name Starts new int super Interfaces Length interface Name Ends new int super Interfaces Length for int i 0 i super Interfaces Length i Type Reference super Interface super Interfaces i interface Names i Char Operation concat With super Interface get Type Name interface Name Starts i super Interface source Start interface Name Ends i super Interface source End flush the comments related to the class header scanner comment Ptr 1 Type Reference superclass type Decl superclass if superclass null requestor enter Class type Decl declaration Source Start int Array Stack int Array Ptr type Decl modifiers type Decl modifiers Source Start type Start Position type Decl name type Decl source Start type Decl source End null 1 1 interface Names interface Name Starts interface Name Ends scanner current Position 1 else requestor enter Class type Decl declaration Source Start int Array Stack int Array Ptr type Decl modifiers type Decl modifiers Source Start type Start Position type Decl name type Decl source Start type Decl source End Char Operation concat With superclass get Type Name superclass source Start superclass source End interface Names interface Name Starts interface Name Ends scanner current Position 1  consumeClassHeader ClassHeader consumeClassHeader isLocalDeclaration intArrayPtr TypeDeclaration typeDecl TypeDeclaration astStack astPtr TypeReference superInterfaces typeDecl superInterfaces interfaceNames interfaceNameStarts interfaceNameEnds superInterfaces superInterfacesLength superInterfaces interfaceNames superInterfacesLength interfaceNameStarts superInterfacesLength interfaceNameEnds superInterfacesLength superInterfacesLength TypeReference superInterface superInterfaces interfaceNames CharOperation concatWith superInterface getTypeName interfaceNameStarts superInterface sourceStart interfaceNameEnds superInterface sourceEnd commentPtr TypeReference typeDecl enterClass typeDecl declarationSourceStart intArrayStack intArrayPtr typeDecl typeDecl modifiersSourceStart typeStartPosition typeDecl typeDecl sourceStart typeDecl sourceEnd interfaceNames interfaceNameStarts interfaceNameEnds currentPosition enterClass typeDecl declarationSourceStart intArrayStack intArrayPtr typeDecl typeDecl modifiersSourceStart typeStartPosition typeDecl typeDecl sourceStart typeDecl sourceEnd CharOperation concatWith getTypeName sourceStart sourceEnd interfaceNames interfaceNameStarts interfaceNameEnds currentPosition
protected void consume Class Header Name Class Header Name Modifiersopt class Identifier Type Declaration type Decl new Type Declaration this compilation Unit compilation Result if nested Method nested Type 0 if nested Type 0 type Decl bits AST Node Is Member TypeMASK else Record that the block has a declaration for local types type Decl bits AST Node Is Local TypeMASK mark Enclosing Member With Local Type block Real highlight the name of the type long pos identifier Position Stack identifier Ptr type Decl source End int pos type Decl source Start int pos 32 type Decl name identifier Stack identifier Ptr identifier Length Ptr compute the declaration source too class and interface push an int position type Start Position type Decl declaration Source Start int Stack int Ptr int Ptr int decl Source Start int Stack int Ptr type Decl modifiers Source Start int Stack int Ptr type Decl modifiers int Stack int Ptr if type Decl declaration Source Start decl Source Start type Decl declaration Source Start decl Source Start type Decl body Start type Decl source End 1 push On Ast Stack type Decl javadoc type Decl javadoc this javadoc this javadoc null  consumeClassHeaderName ClassHeaderName TypeDeclaration typeDecl TypeDeclaration compilationUnit compilationResult nestedMethod nestedType nestedType typeDecl ASTNode IsMemberTypeMASK typeDecl ASTNode IsLocalTypeMASK markEnclosingMemberWithLocalType blockReal identifierPositionStack identifierPtr typeDecl sourceEnd typeDecl sourceStart typeDecl identifierStack identifierPtr identifierLengthPtr typeStartPosition typeDecl declarationSourceStart intStack intPtr intPtr declSourceStart intStack intPtr typeDecl modifiersSourceStart intStack intPtr typeDecl intStack intPtr typeDecl declarationSourceStart declSourceStart typeDecl declarationSourceStart declSourceStart typeDecl bodyStart typeDecl sourceEnd pushOnAstStack typeDecl typeDecl
INTERNAL USE ONLY protected void consume Compilation Unit Compilation Unit Enter Compilation Unit Package Declarationopt Import Declarationsopt requestor exit Compilation Unit scanner source length 1  consumeCompilationUnit CompilationUnit EnterCompilationUnit PackageDeclarationopt ImportDeclarationsopt exitCompilationUnit
protected void consume Constructor Declaration Constructor Declaration Constructor Header Constructor Body super consume Constructor Declaration if is Local Declaration we ignore the local variable declarations return Constructor Declaration cd Constructor Declaration ast Stack ast Ptr requestor exit Constructor end Statement Position cd declaration Source End  consumeConstructorDeclaration ConstructorDeclaration ConstructorHeader ConstructorBody consumeConstructorDeclaration isLocalDeclaration ConstructorDeclaration ConstructorDeclaration astStack astPtr exitConstructor endStatementPosition declarationSourceEnd
protected void consume Constructor Header Constructor Header Constructor Header Name Method Header Parameters Method Header Throws Clauseopt super consume Constructor Header if is Local Declaration we ignore the local variable declarations int Array Ptr return Constructor Declaration cd Constructor Declaration ast Stack ast Ptr Argument arguments cd arguments char argument Types null char argument Names null int argument Type Starts null int argument Type Ends null int argument Name Starts null int argument Name Ends null if arguments null int argument Length arguments length argument Types new char argument Length argument Names new char argument Length argument Name Starts new int argument Length argument Name Ends new int argument Length argument Type Starts new int argument Length argument Type Ends new int argument Length for int i 0 i argument Length i Argument argument arguments i Type Reference argument Type argument type argument Types i return Type Name argument Type argument Names i argument name argument Name Starts i argument source Start argument Name Ends i argument source End argument Type Starts i argument Type source Start argument Type Ends i argument Type source End Type Reference thrown Exceptions cd thrown Exceptions char exception Types null int exception Type Starts null int exception Type Ends null if thrown Exceptions null int thrown Exception Length thrown Exceptions length exception Types new char thrown Exception Length exception Type Starts new int thrown Exception Length exception Type Ends new int thrown Exception Length for int i 0 i thrown Exception Length i Type Reference exception thrown Exceptions i exception Types i Char Operation concat With exception get Type Name exception Type Starts i exception source Start exception Type Ends i exception source End requestor enter Constructor cd declaration Source Start int Array Stack int Array Ptr cd modifiers cd modifiers Source Start cd selector cd source Start int selector Source Positions 0xFFFFFFFFL retrieve the source end of the name argument Types argument Type Starts argument Type Ends argument Names argument Name Starts argument Name Ends r Paren Pos right parenthesis exception Types exception Type Starts exception Type Ends scanner current Position 1  consumeConstructorHeader ConstructorHeader ConstructorHeaderName MethodHeaderParameters MethodHeaderThrowsClauseopt consumeConstructorHeader isLocalDeclaration intArrayPtr ConstructorDeclaration ConstructorDeclaration astStack astPtr argumentTypes argumentNames argumentTypeStarts argumentTypeEnds argumentNameStarts argumentNameEnds argumentLength argumentTypes argumentLength argumentNames argumentLength argumentNameStarts argumentLength argumentNameEnds argumentLength argumentTypeStarts argumentLength argumentTypeEnds argumentLength argumentLength TypeReference argumentType argumentTypes returnTypeName argumentType argumentNames argumentNameStarts sourceStart argumentNameEnds sourceEnd argumentTypeStarts argumentType sourceStart argumentTypeEnds argumentType sourceEnd TypeReference thrownExceptions thrownExceptions exceptionTypes exceptionTypeStarts exceptionTypeEnds thrownExceptions thrownExceptionLength thrownExceptions exceptionTypes thrownExceptionLength exceptionTypeStarts thrownExceptionLength exceptionTypeEnds thrownExceptionLength thrownExceptionLength TypeReference thrownExceptions exceptionTypes CharOperation concatWith getTypeName exceptionTypeStarts sourceStart exceptionTypeEnds sourceEnd enterConstructor declarationSourceStart intArrayStack intArrayPtr modifiersSourceStart sourceStart selectorSourcePositions argumentTypes argumentTypeStarts argumentTypeEnds argumentNames argumentNameStarts argumentNameEnds rParenPos exceptionTypes exceptionTypeStarts exceptionTypeEnds currentPosition
protected void consume Constructor Header Name Constructor Header Name Modifiersopt Identifier Constructor Declaration cd new Constructor Declaration this compilation Unit compilation Result name this is not really revelant but we do cd selector identifier Stack identifier Ptr selector Source Positions identifier Position Stack identifier Ptr identifier Length Ptr modifiers cd declaration Source Start int Stack int Ptr cd modifiers Source Start int Stack int Ptr cd modifiers int Stack int Ptr javadoc cd javadoc this javadoc this javadoc null highlight starts at the selector starts cd source Start int selector Source Positions 32 push On Ast Stack cd cd source End l Paren Pos cd body Start l Paren Pos 1  consumeConstructorHeaderName ConstructorHeaderName ConstructorDeclaration ConstructorDeclaration compilationUnit compilationResult identifierStack identifierPtr selectorSourcePositions identifierPositionStack identifierPtr identifierLengthPtr declarationSourceStart intStack intPtr modifiersSourceStart intStack intPtr intStack intPtr sourceStart selectorSourcePositions pushOnAstStack sourceEnd lParenPos bodyStart lParenPos
protected void consume Default Modifiers check Comment might update modifiers with Acc Deprecated push On Int Stack modifiers modifiers push On Int Stack 1 push On Int Stack declaration Source Start 0 declaration Source Start scanner start Position reset Modifiers  consumeDefaultModifiers checkComment AccDeprecated pushOnIntStack pushOnIntStack pushOnIntStack declarationSourceStart declarationSourceStart startPosition resetModifiers
protected void consume Diet Diet empty super consume Diet persisting javadoc positions Will be consume in consume Class Body Declaration push On Int Array Stack this get Java Doc Positions  consumeDiet consumeDiet consumeClassBodyDeclaration pushOnIntArrayStack getJavaDocPositions
INTERNAL USE ONLY protected void consume Enter Compilation Unit Enter Compilation Unit empty requestor enter Compilation Unit  consumeEnterCompilationUnit EnterCompilationUnit enterCompilationUnit
protected void consume Enter Variable Enter Variable empty boolean is Local Declaration is Local Declaration if is Local Declaration variables Counter nested Type 0 requestor exit Field last Field Body End Position last Field End Position char var Name identifier Stack identifier Ptr long name Position identifier Position Stack identifier Ptr int extended Type Dimension int Stack int Ptr Abstract Variable Declaration declaration if nested Method nested Type 0 create the local variable declarations declaration new Local Declaration var Name int name Position 32 int name Position else create the field declaration declaration new Field Declaration var Name int name Position 32 int name Position identifier Length Ptr Type Reference type int variable Index variables Counter nested Type int type Dim 0 if variable Index 0 first variable of the declaration Field Declaration or Local Declaration if nested Method nested Type 0 local declaration declaration declaration Source Start int Stack int Ptr declaration modifiers Source Start int Stack int Ptr declaration modifiers int Stack int Ptr type get Type Reference type Dim int Stack int Ptr type dimension push On Ast Stack type else field declaration type get Type Reference type Dim int Stack int Ptr type dimension push On Ast Stack type declaration declaration Source Start int Stack int Ptr declaration modifiers Source Start int Stack int Ptr declaration modifiers int Stack int Ptr else type Type Reference ast Stack ast Ptr variable Index type Dim type dimensions Abstract Variable Declaration previous Variable Abstract Variable Declaration ast Stack ast Ptr declaration declaration Source Start previous Variable declaration Source Start declaration modifiers previous Variable modifiers declaration modifiers Source Start previous Variable modifiers Source Start local Int Ptr int Ptr if extended Type Dimension 0 declaration type type else int dimension type Dim extended Type Dimension on the identifier Length Stack there is the information about the type int base Type if base Type identifier Length Stack identifier Length Ptr 1 0 it was a base Type declaration type Type Reference base Type Reference base Type dimension declaration type source Start type source Start declaration type source End type source End else declaration type this copy Dims type dimension variables Counter nested Type nested Method nested Type push On Ast Stack declaration int javadoc Positions int Array Stack int Array Ptr if is Local Declaration requestor enter Field declaration declaration Source Start javadoc Positions declaration modifiers declaration modifiers Source Start return Type Name declaration type type source Start type source End type Dims var Name int name Position 32 int name Position extended Type Dimension extended Type Dimension 0 1 end Position  consumeEnterVariable EnterVariable isLocalDeclaration isLocalDeclaration isLocalDeclaration variablesCounter nestedType exitField lastFieldBodyEndPosition lastFieldEndPosition varName identifierStack identifierPtr namePosition identifierPositionStack identifierPtr extendedTypeDimension intStack intPtr AbstractVariableDeclaration nestedMethod nestedType LocalDeclaration varName namePosition namePosition FieldDeclaration varName namePosition namePosition identifierLengthPtr TypeReference variableIndex variablesCounter nestedType typeDim variableIndex FieldDeclaration LocalDeclaration nestedMethod nestedType declarationSourceStart intStack intPtr modifiersSourceStart intStack intPtr intStack intPtr getTypeReference typeDim intStack intPtr pushOnAstStack getTypeReference typeDim intStack intPtr pushOnAstStack declarationSourceStart intStack intPtr modifiersSourceStart intStack intPtr intStack intPtr TypeReference astStack astPtr variableIndex typeDim AbstractVariableDeclaration previousVariable AbstractVariableDeclaration astStack astPtr declarationSourceStart previousVariable declarationSourceStart previousVariable modifiersSourceStart previousVariable modifiersSourceStart localIntPtr intPtr extendedTypeDimension typeDim extendedTypeDimension identifierLengthStack baseType baseType identifierLengthStack identifierLengthPtr baseType TypeReference baseTypeReference baseType sourceStart sourceStart sourceEnd sourceEnd copyDims variablesCounter nestedType nestedMethod nestedType pushOnAstStack javadocPositions intArrayStack intArrayPtr isLocalDeclaration enterField declarationSourceStart javadocPositions modifiersSourceStart returnTypeName sourceStart sourceEnd typeDims varName namePosition namePosition extendedTypeDimension extendedTypeDimension endPosition
protected void consume Exit Variable With Initialization Exit Variable With Initialization empty the scanner is located after the comma or the semi colon we want to include the comma or the semi colon super consume Exit Variable With Initialization nested Method nested Type last Field End Position scanner current Position 1 last Field Body End Position Abstract Variable Declaration ast Stack ast Ptr initialization source End  consumeExitVariableWithInitialization ExitVariableWithInitialization consumeExitVariableWithInitialization nestedMethod nestedType lastFieldEndPosition currentPosition lastFieldBodyEndPosition AbstractVariableDeclaration astStack astPtr sourceEnd
protected void consume Exit Variable Without Initialization Exit Variable Without Initialization empty do nothing by default super consume Exit Variable Without Initialization nested Method nested Type last Field End Position scanner current Position 1 last Field Body End Position scanner start Position 1  consumeExitVariableWithoutInitialization ExitVariableWithoutInitialization consumeExitVariableWithoutInitialization nestedMethod nestedType lastFieldEndPosition currentPosition lastFieldBodyEndPosition startPosition
protected void consume Field Declaration See consume Local Variable Declaration Default Modifier in case of change duplicated code Field Declaration Modifiersopt Type Variable Declarators the super consume Field Declaration will reinitialize the variable Counter nested Type int variable Index variables Counter nested Type super consume Field Declaration int Array Ptr if is Local Declaration return if variable Index 0 requestor exit Field last Field Body End Position last Field End Position  consumeFieldDeclaration consumeLocalVariableDeclarationDefaultModifier FieldDeclaration VariableDeclarators consumeFieldDeclaration variableCounter nestedType variableIndex variablesCounter nestedType consumeFieldDeclaration intArrayPtr isLocalDeclaration variableIndex exitField lastFieldBodyEndPosition lastFieldEndPosition
protected void consume Formal Parameter Formal Parameter Type Variable Declarator Id false Formal Parameter Modifiers Type Variable Declarator Id true ast Stack identifier Stack type identifier int Stack dim dim ast Stack Argument identifier Stack int Stack identifier Length Ptr char parameter Name identifier Stack identifier Ptr long name Positions identifier Position Stack identifier Ptr Type Reference type get Type Reference int Stack int Ptr int Stack int Ptr int Ptr 3 Argument arg new Argument parameter Name name Positions type int Stack int Ptr 1 modifiers push On Ast Stack arg int Array Ptr  consumeFormalParameter FormalParameter VariableDeclaratorId FormalParameter VariableDeclaratorId astStack identifierStack intStack astStack identifierStack intStack identifierLengthPtr parameterName identifierStack identifierPtr namePositions identifierPositionStack identifierPtr TypeReference getTypeReference intStack intPtr intStack intPtr intPtr parameterName namePositions intStack intPtr pushOnAstStack intArrayPtr
protected void consume Interface Declaration super consume Interface Declaration we know that we have a Type Declaration on the top of the ast Stack if is Local Declaration we ignore the local variable declarations return requestor exit Interface end Statement Position the is the end of the body Type Declaration ast Stack ast Ptr declaration Source End  consumeInterfaceDeclaration consumeInterfaceDeclaration TypeDeclaration astStack isLocalDeclaration exitInterface endStatementPosition TypeDeclaration astStack astPtr declarationSourceEnd
protected void consume Interface Header Interface Header empty super consume Interface Header if is Local Declaration we ignore the local variable declarations int Array Ptr return Type Declaration type Decl Type Declaration ast Stack ast Ptr Type Reference super Interfaces type Decl super Interfaces char interface Names null int interface Name Starts null int interfacename Ends null int super Interfaces Length 0 if super Interfaces null super Interfaces Length super Interfaces length interface Names new char super Interfaces Length interface Name Starts new int super Interfaces Length interfacename Ends new int super Interfaces Length if super Interfaces null for int i 0 i super Interfaces Length i Type Reference super Interface super Interfaces i interface Names i Char Operation concat With super Interface get Type Name interface Name Starts i super Interface source Start interfacename Ends i super Interface source End flush the comments related to the interface header scanner comment Ptr 1 requestor enter Interface type Decl declaration Source Start int Array Stack int Array Ptr type Decl modifiers type Decl modifiers Source Start type Start Position type Decl name type Decl source Start type Decl source End interface Names interface Name Starts interfacename Ends scanner current Position 1  consumeInterfaceHeader InterfaceHeader consumeInterfaceHeader isLocalDeclaration intArrayPtr TypeDeclaration typeDecl TypeDeclaration astStack astPtr TypeReference superInterfaces typeDecl superInterfaces interfaceNames interfaceNameStarts interfacenameEnds superInterfacesLength superInterfaces superInterfacesLength superInterfaces interfaceNames superInterfacesLength interfaceNameStarts superInterfacesLength interfacenameEnds superInterfacesLength superInterfaces superInterfacesLength TypeReference superInterface superInterfaces interfaceNames CharOperation concatWith superInterface getTypeName interfaceNameStarts superInterface sourceStart interfacenameEnds superInterface sourceEnd commentPtr enterInterface typeDecl declarationSourceStart intArrayStack intArrayPtr typeDecl typeDecl modifiersSourceStart typeStartPosition typeDecl typeDecl sourceStart typeDecl sourceEnd interfaceNames interfaceNameStarts interfacenameEnds currentPosition
protected void consume Interface Header Name Interface Header Name Modifiersopt interface Identifier Type Declaration type Decl new Type Declaration this compilation Unit compilation Result if nested Method nested Type 0 if nested Type 0 type Decl bits AST Node Is Member TypeMASK else Record that the block has a declaration for local types type Decl bits AST Node Is Local TypeMASK mark Enclosing Member With Local Type block Real highlight the name of the type long pos identifier Position Stack identifier Ptr type Decl source End int pos type Decl source Start int pos 32 type Decl name identifier Stack identifier Ptr identifier Length Ptr compute the declaration source too class and interface push an int position type Start Position type Decl declaration Source Start int Stack int Ptr int Ptr int decl Source Start int Stack int Ptr type Decl modifiers Source Start int Stack int Ptr type Decl modifiers int Stack int Ptr if type Decl declaration Source Start decl Source Start type Decl declaration Source Start decl Source Start type Decl body Start type Decl source End 1 push On Ast Stack type Decl javadoc type Decl javadoc this javadoc this javadoc null  consumeInterfaceHeaderName InterfaceHeaderName TypeDeclaration typeDecl TypeDeclaration compilationUnit compilationResult nestedMethod nestedType nestedType typeDecl ASTNode IsMemberTypeMASK typeDecl ASTNode IsLocalTypeMASK markEnclosingMemberWithLocalType blockReal identifierPositionStack identifierPtr typeDecl sourceEnd typeDecl sourceStart typeDecl identifierStack identifierPtr identifierLengthPtr typeStartPosition typeDecl declarationSourceStart intStack intPtr intPtr declSourceStart intStack intPtr typeDecl modifiersSourceStart intStack intPtr typeDecl intStack intPtr typeDecl declarationSourceStart declSourceStart typeDecl declarationSourceStart declSourceStart typeDecl bodyStart typeDecl sourceEnd pushOnAstStack typeDecl typeDecl
protected void consume Local Variable Declaration See consume Local Variable Declaration Default Modifier in case of change duplicated code Field Declaration Modifiersopt Type Variable Declarators super consume Local Variable Declaration int Array Ptr  consumeLocalVariableDeclaration consumeLocalVariableDeclarationDefaultModifier FieldDeclaration VariableDeclarators consumeLocalVariableDeclaration intArrayPtr
protected void consume Method Declaration boolean is Not Abstract Method Declaration Method Header Method Body Abstract Method Declaration Method Header super consume Method Declaration is Not Abstract if is Local Declaration we ignore the local variable declarations return Method Declaration md Method Declaration ast Stack ast Ptr requestor exit Method end Statement Position md declaration Source End  consumeMethodDeclaration isNotAbstract MethodDeclaration MethodHeader MethodBody AbstractMethodDeclaration MethodHeader consumeMethodDeclaration isNotAbstract isLocalDeclaration MethodDeclaration MethodDeclaration astStack astPtr exitMethod endStatementPosition declarationSourceEnd
protected void consume Method Header Method Header Method Header Name Method Header Parameters Method Header Extended Dims Throws Clauseopt super consume Method Header if is Local Declaration we ignore the local variable declarations int Array Ptr return Method Declaration md Method Declaration ast Stack ast Ptr Type Reference return Type md return Type char return Type Name return Type Name return Type Argument arguments md arguments char argument Types null char argument Names null int argument Type Starts null int argument Type Ends null int argument Name Starts null int argument Name Ends null if arguments null int argument Length arguments length argument Types new char argument Length argument Names new char argument Length argument Name Starts new int argument Length argument Name Ends new int argument Length argument Type Starts new int argument Length argument Type Ends new int argument Length for int i 0 i argument Length i Argument argument arguments i Type Reference argument Type argument type argument Types i return Type Name argument Type argument Names i argument name argument Name Starts i argument source Start argument Name Ends i argument source End argument Type Starts i argument Type source Start argument Type Ends i argument Type source End Type Reference thrown Exceptions md thrown Exceptions char exception Types null int exception Type Starts null int exception Type Ends null if thrown Exceptions null int thrown Exception Length thrown Exceptions length exception Type Starts new int thrown Exception Length exception Type Ends new int thrown Exception Length exception Types new char thrown Exception Length for int i 0 i thrown Exception Length i Type Reference exception thrown Exceptions i exception Types i Char Operation concat With exception get Type Name exception Type Starts i exception source Start exception Type Ends i exception source End requestor enter Method md declaration Source Start int Array Stack int Array Ptr md modifiers md modifiers Source Start return Type Name return Type source Start return Type source End type Dims md selector md source Start int selector Source Positions 0xFFFFFFFFL argument Types argument Type Starts argument Type Ends argument Names argument Name Starts argument Name Ends r Paren Pos extends Dim extends Dim 0 1 end Position exception Types exception Type Starts exception Type Ends scanner current Position 1  consumeMethodHeader MethodHeader MethodHeaderName MethodHeaderParameters MethodHeaderExtendedDims ThrowsClauseopt consumeMethodHeader isLocalDeclaration intArrayPtr MethodDeclaration MethodDeclaration astStack astPtr TypeReference returnType returnType returnTypeName returnTypeName returnType argumentTypes argumentNames argumentTypeStarts argumentTypeEnds argumentNameStarts argumentNameEnds argumentLength argumentTypes argumentLength argumentNames argumentLength argumentNameStarts argumentLength argumentNameEnds argumentLength argumentTypeStarts argumentLength argumentTypeEnds argumentLength argumentLength TypeReference argumentType argumentTypes returnTypeName argumentType argumentNames argumentNameStarts sourceStart argumentNameEnds sourceEnd argumentTypeStarts argumentType sourceStart argumentTypeEnds argumentType sourceEnd TypeReference thrownExceptions thrownExceptions exceptionTypes exceptionTypeStarts exceptionTypeEnds thrownExceptions thrownExceptionLength thrownExceptions exceptionTypeStarts thrownExceptionLength exceptionTypeEnds thrownExceptionLength exceptionTypes thrownExceptionLength thrownExceptionLength TypeReference thrownExceptions exceptionTypes CharOperation concatWith getTypeName exceptionTypeStarts sourceStart exceptionTypeEnds sourceEnd enterMethod declarationSourceStart intArrayStack intArrayPtr modifiersSourceStart returnTypeName returnType sourceStart returnType sourceEnd typeDims sourceStart selectorSourcePositions argumentTypes argumentTypeStarts argumentTypeEnds argumentNames argumentNameStarts argumentNameEnds rParenPos extendsDim extendsDim endPosition exceptionTypes exceptionTypeStarts exceptionTypeEnds currentPosition
protected void consume Method Header Extended Dims Method Header Extended Dims Dimsopt now we update the return Type of the method Method Declaration md Method Declaration ast Stack ast Ptr int extended Dims int Stack int Ptr extends Dim extended Dims if extended Dims 0 Type Reference return Type md return Type md source End end Position int dims return Type dimensions extended Dims int base Type if base Type identifier Length Stack identifier Length Ptr 1 0 it was a base Type int source Start return Type source Start int source End return Type source End return Type Type Reference base Type Reference base Type dims return Type source Start source Start return Type source End source End md return Type return Type else md return Type this copy Dims md return Type dims if current Token Token NameLBRACE md body Start end Position 1  consumeMethodHeaderExtendedDims MethodHeaderExtendedDims returnType MethodDeclaration MethodDeclaration astStack astPtr extendedDims intStack intPtr extendsDim extendedDims extendedDims TypeReference returnType returnType sourceEnd endPosition returnType extendedDims baseType baseType identifierLengthStack identifierLengthPtr baseType sourceStart returnType sourceStart sourceEnd returnType sourceEnd returnType TypeReference baseTypeReference baseType returnType sourceStart sourceStart returnType sourceEnd sourceEnd returnType returnType returnType copyDims returnType currentToken TokenNameLBRACE bodyStart endPosition
protected void consume Method Header Name Method Header Name Modifiersopt Type Identifier Method Declaration md new Method Declaration this compilation Unit compilation Result name md selector identifier Stack identifier Ptr selector Source Positions identifier Position Stack identifier Ptr identifier Length Ptr type md return Type get Type Reference type Dims int Stack int Ptr modifiers md declaration Source Start int Stack int Ptr md modifiers Source Start int Stack int Ptr md modifiers int Stack int Ptr javadoc md javadoc this javadoc this javadoc null highlight starts at selector start md source Start int selector Source Positions 32 push On Ast Stack md md body Start scanner current Position 1  consumeMethodHeaderName MethodHeaderName MethodDeclaration MethodDeclaration compilationUnit compilationResult identifierStack identifierPtr selectorSourcePositions identifierPositionStack identifierPtr identifierLengthPtr returnType getTypeReference typeDims intStack intPtr declarationSourceStart intStack intPtr modifiersSourceStart intStack intPtr intStack intPtr sourceStart selectorSourcePositions pushOnAstStack bodyStart currentPosition
protected void consume Modifiers check Comment might update modifiers with Acc Deprecated push On Int Stack modifiers modifiers push On Int Stack modifiers Source Start push On Int Stack declaration Source Start 0 declaration Source Start modifiers Source Start reset Modifiers  consumeModifiers checkComment AccDeprecated pushOnIntStack pushOnIntStack modifiersSourceStart pushOnIntStack declarationSourceStart declarationSourceStart modifiersSourceStart resetModifiers
protected void consume Package Declaration Name persisting javadoc positions push On Int Array Stack this get Java Doc Positions super consume Package Declaration Name Import Reference import Reference compilation Unit current Package requestor accept Package import Reference declaration Source Start import Reference declaration Source End int Array Stack int Array Ptr Char Operation concat With import Reference get Import Name import Reference source Start  consumePackageDeclarationName pushOnIntArrayStack getJavaDocPositions consumePackageDeclarationName ImportReference importReference compilationUnit currentPackage acceptPackage importReference declarationSourceStart importReference declarationSourceEnd intArrayStack intArrayPtr CharOperation concatWith importReference getImportName importReference sourceStart
protected void consume Push Modifiers check Comment might update modifiers with Acc Deprecated push On Int Stack modifiers modifiers if modifiers Source Start 0 push On Int Stack 1 push On Int Stack declaration Source Start 0 declaration Source Start scanner start Position else push On Int Stack modifiers Source Start push On Int Stack declaration Source Start 0 declaration Source Start modifiers Source Start reset Modifiers  consumePushModifiers checkComment AccDeprecated pushOnIntStack modifiersSourceStart pushOnIntStack pushOnIntStack declarationSourceStart declarationSourceStart startPosition pushOnIntStack modifiersSourceStart pushOnIntStack declarationSourceStart declarationSourceStart modifiersSourceStart resetModifiers
protected void consume Single Type Import Declaration Name Single Type Import Declaration Name import Name persisting javadoc positions push On Int Array Stack this get Java Doc Positions super consume Single Type Import Declaration Name Import Reference import Reference Import Reference ast Stack ast Ptr requestor accept Import import Reference declaration Source Start import Reference declaration Source End int Array Stack int Array Ptr Char Operation concat With import Reference get Import Name import Reference source Start false  consumeSingleTypeImportDeclarationName SingleTypeImportDeclarationName pushOnIntArrayStack getJavaDocPositions consumeSingleTypeImportDeclarationName ImportReference importReference ImportReference astStack astPtr acceptImport importReference declarationSourceStart importReference declarationSourceEnd intArrayStack intArrayPtr CharOperation concatWith importReference getImportName importReference sourceStart
protected void consume Static Initializer Static Initializer Static Only Block push an Initializer optimize the push pop super consume Static Initializer Initializer initializer Initializer ast Stack ast Ptr requestor accept Initializer initializer declaration Source Start initializer declaration Source End int Array Stack int Array Ptr Acc Static int Stack int Ptr initializer block source Start initializer declaration Source End  consumeStaticInitializer StaticInitializer StaticOnly consumeStaticInitializer astStack astPtr acceptInitializer declarationSourceStart declarationSourceEnd intArrayStack intArrayPtr AccStatic intStack intPtr sourceStart declarationSourceEnd
protected void consume Static Only Static Only static check Comment might update declaration source start push On Int Stack modifiers Source Start push On Int Stack scanner current Position push On Int Stack declaration Source Start 0 declaration Source Start modifiers Source Start jump Over Method Body nested Method nested Type reset Modifiers  consumeStaticOnly StaticOnly checkComment pushOnIntStack modifiersSourceStart pushOnIntStack currentPosition pushOnIntStack declarationSourceStart declarationSourceStart modifiersSourceStart jumpOverMethodBody nestedMethod nestedType resetModifiers
protected void consume Type Import On Demand Declaration Name Type Import On Demand Declaration Name import Name persisting javadoc positions push On Int Array Stack this get Java Doc Positions super consume Type Import On Demand Declaration Name Import Reference import Reference Import Reference ast Stack ast Ptr requestor accept Import import Reference declaration Source Start import Reference declaration Source End int Array Stack int Array Ptr Char Operation concat With import Reference get Import Name import Reference source Start true  consumeTypeImportOnDemandDeclarationName TypeImportOnDemandDeclarationName pushOnIntArrayStack getJavaDocPositions consumeTypeImportOnDemandDeclarationName ImportReference importReference ImportReference astStack astPtr acceptImport importReference declarationSourceStart importReference declarationSourceEnd intArrayStack intArrayPtr CharOperation concatWith importReference getImportName importReference sourceStart
public Compilation Unit Declaration end Parse int act if scanner record Line Separator requestor accept Line Separator Positions scanner get Line Ends return super end Parse act  CompilationUnitDeclaration endParse recordLineSeparator acceptLineSeparatorPositions getLineEnds endParse
public int flush Comments Defined Prior To int position return last Field End Position super flush Comments Defined Prior To position  flushCommentsDefinedPriorTo lastFieldEndPosition flushCommentsDefinedPriorTo
protected Type Reference get Type Reference int dim build a Reference on a variable that may be qualified or not This variable is a type reference and dim will be its dimensions int length Type Reference ref if length identifier Length Stack identifier Length Ptr 1 single variable reference if dim 0 ref new Single Type Reference identifier Stack identifier Ptr identifier Position Stack identifier Ptr else ref new Array Type Reference identifier Stack identifier Ptr dim identifier Position Stack identifier Ptr ref source End end Position else if length 0 flag for precompiled type reference on base types ref Type Reference base Type Reference length dim ref source Start int Stack int Ptr if dim 0 ref source End int Stack int Ptr else int Ptr ref source End end Position else Qualified variable reference char tokens new char length identifier Ptr length long positions new long length System arraycopy identifier Stack identifier Ptr 1 tokens 0 length System arraycopy identifier Position Stack identifier Ptr 1 positions 0 length if dim 0 ref new Qualified Type Reference tokens positions else ref new Array Qualified Type Reference tokens dim positions ref source End end Position return ref  TypeReference getTypeReference TypeReference identifierLengthStack identifierLengthPtr SingleTypeReference identifierStack identifierPtr identifierPositionStack identifierPtr ArrayTypeReference identifierStack identifierPtr identifierPositionStack identifierPtr sourceEnd endPosition TypeReference baseTypeReference sourceStart intStack intPtr sourceEnd intStack intPtr intPtr sourceEnd endPosition identifierPtr identifierStack identifierPtr identifierPositionStack identifierPtr QualifiedTypeReference ArrayQualifiedTypeReference sourceEnd endPosition
public void initialize positionning the parser for a new compilation unit avoiding stack reallocation and all that super initialize int Array Ptr 1  intArrayPtr
private boolean is Local Declaration int nested Depth nested Type while nested Depth 0 if nested Method nested Depth 0 return true nested Depth return false  isLocalDeclaration nestedDepth nestedType nestedDepth nestedMethod nestedDepth nestedDepth
public void parse Compilation Unit I Compilation Unit unit char region Source unit get Contents try initialize go For Compilation Unit reference Context compilation Unit compilation Unit new Compilation Unit Declaration problem Reporter new Compilation Result unit 0 0 this options max Problems Per Unit region Source length scanner reset To 0 region Source length scanner set Source region Source parse catch Abort Compilation ex ignore this exception  parseCompilationUnit ICompilationUnit regionSource getContents goForCompilationUnit referenceContext compilationUnit compilationUnit CompilationUnitDeclaration problemReporter CompilationResult maxProblemsPerUnit regionSource resetTo regionSource setSource regionSource AbortCompilation
public void parse Constructor char region Source try initialize go For Class Body Declarations reference Context compilation Unit compilation Unit new Compilation Unit Declaration problem Reporter new Compilation Result region Source 0 0 this options max Problems Per Unit region Source length scanner reset To 0 region Source length scanner set Source region Source parse catch Abort Compilation ex ignore this exception  parseConstructor regionSource goForClassBodyDeclarations referenceContext compilationUnit compilationUnit CompilationUnitDeclaration problemReporter CompilationResult regionSource maxProblemsPerUnit regionSource resetTo regionSource setSource regionSource AbortCompilation
public void parse Field char region Source try initialize go For Field Declaration reference Context compilation Unit compilation Unit new Compilation Unit Declaration problem Reporter new Compilation Result region Source 0 0 this options max Problems Per Unit region Source length scanner reset To 0 region Source length scanner set Source region Source parse catch Abort Compilation ex ignore this exception  parseField regionSource goForFieldDeclaration referenceContext compilationUnit compilationUnit CompilationUnitDeclaration problemReporter CompilationResult regionSource maxProblemsPerUnit regionSource resetTo regionSource setSource regionSource AbortCompilation
public void parse Import char region Source try initialize go For Import Declaration reference Context compilation Unit compilation Unit new Compilation Unit Declaration problem Reporter new Compilation Result region Source 0 0 this options max Problems Per Unit region Source length scanner reset To 0 region Source length scanner set Source region Source parse catch Abort Compilation ex ignore this exception  parseImport regionSource goForImportDeclaration referenceContext compilationUnit compilationUnit CompilationUnitDeclaration problemReporter CompilationResult regionSource maxProblemsPerUnit regionSource resetTo regionSource setSource regionSource AbortCompilation
public void parse Initializer char region Source try initialize go For Initializer reference Context compilation Unit compilation Unit new Compilation Unit Declaration problem Reporter new Compilation Result region Source 0 0 this options max Problems Per Unit region Source length scanner reset To 0 region Source length scanner set Source region Source parse catch Abort Compilation ex ignore this exception  parseInitializer regionSource goForInitializer referenceContext compilationUnit compilationUnit CompilationUnitDeclaration problemReporter CompilationResult regionSource maxProblemsPerUnit regionSource resetTo regionSource setSource regionSource AbortCompilation
public void parse Method char region Source try initialize go For Generic Method Declaration reference Context compilation Unit compilation Unit new Compilation Unit Declaration problem Reporter new Compilation Result region Source 0 0 this options max Problems Per Unit region Source length scanner reset To 0 region Source length scanner set Source region Source parse catch Abort Compilation ex ignore this exception  parseMethod regionSource goForGenericMethodDeclaration referenceContext compilationUnit compilationUnit CompilationUnitDeclaration problemReporter CompilationResult regionSource maxProblemsPerUnit regionSource resetTo regionSource setSource regionSource AbortCompilation
public void parse Package char region Source try initialize go For Package Declaration reference Context compilation Unit compilation Unit new Compilation Unit Declaration problem Reporter new Compilation Result region Source 0 0 this options max Problems Per Unit region Source length scanner reset To 0 region Source length scanner set Source region Source parse catch Abort Compilation ex ignore this exception  parsePackage regionSource goForPackageDeclaration referenceContext compilationUnit compilationUnit CompilationUnitDeclaration problemReporter CompilationResult regionSource maxProblemsPerUnit regionSource resetTo regionSource setSource regionSource AbortCompilation
public void parse Type char region Source try initialize go For Type Declaration reference Context compilation Unit compilation Unit new Compilation Unit Declaration problem Reporter new Compilation Result region Source 0 0 this options max Problems Per Unit region Source length scanner reset To 0 region Source length scanner set Source region Source parse catch Abort Compilation ex ignore this exception  parseType regionSource goForTypeDeclaration referenceContext compilationUnit compilationUnit CompilationUnitDeclaration problemReporter CompilationResult regionSource maxProblemsPerUnit regionSource resetTo regionSource setSource regionSource AbortCompilation
Returns this parser s problem reporter initialized with its reference context Also it is assumed that a problem is going to be reported so initializes the compilation result s line positions return Problem Reporter public Problem Reporter problem Reporter problem Reporter reference Context reference Context return problem Reporter  ProblemReporter ProblemReporter problemReporter problemReporter referenceContext referenceContext problemReporter
protected void push On Int Array Stack int positions int stack Length this int Array Stack length if this int Array Ptr stack Length System arraycopy this int Array Stack 0 this int Array Stack new int stack Length Stack Increment 0 stack Length int Array Stack int Array Ptr positions  pushOnIntArrayStack stackLength intArrayStack intArrayPtr stackLength intArrayStack intArrayStack stackLength StackIncrement stackLength intArrayStack intArrayPtr
int Array Stack int Array Ptr positions protected void reset Modifiers super reset Modifiers declaration Source Start 1  intArrayStack intArrayPtr resetModifiers resetModifiers declarationSourceStart
to resume to the regular parse loop protected boolean resume On Syntax Error return false  resumeOnSyntaxError
private char return Type Name Type Reference type int dimension type dimensions if dimension 0 char dimensions Array new char dimension 2 for int i 0 i dimension i dimensions Array i 2 dimensions Array i 2 1 return Char Operation concat Char Operation concat With type get Type Name dimensions Array return Char Operation concat With type get Type Name  returnTypeName TypeReference dimensionsArray dimensionsArray dimensionsArray CharOperation CharOperation concatWith getTypeName dimensionsArray CharOperation concatWith getTypeName
public String to String String Buffer buffer new String Buffer buffer append int Array Ptr int Array Ptr n NON NLS 1 NON NLS 2 buffer append super to String return buffer to String  toString StringBuffer StringBuffer intArrayPtr intArrayPtr toString toString
protected Type Reference type Reference int dim int local Identifier Ptr int local Identifier Length Ptr build a Reference on a variable that may be qualified or not This variable is a type reference and dim will be its dimensions We don t have any side effect on the stacks pointers int length Type Reference ref if length identifier Length Stack local Identifier Length Ptr 1 single variable reference if dim 0 ref new Single Type Reference identifier Stack local Identifier Ptr identifier Position Stack local Identifier Ptr else ref new Array Type Reference identifier Stack local Identifier Ptr dim identifier Position Stack local Identifier Ptr ref source End end Position else if length 0 flag for precompiled type reference on base types ref Type Reference base Type Reference length dim ref source Start int Stack local Int Ptr if dim 0 ref source End int Stack local Int Ptr else local Int Ptr ref source End end Position else Qualified variable reference char tokens new char length local Identifier Ptr length long positions new long length System arraycopy identifier Stack local Identifier Ptr 1 tokens 0 length System arraycopy identifier Position Stack local Identifier Ptr 1 positions 0 length if dim 0 ref new Qualified Type Reference tokens positions else ref new Array Qualified Type Reference tokens dim positions return ref  TypeReference typeReference localIdentifierPtr localIdentifierLengthPtr TypeReference identifierLengthStack localIdentifierLengthPtr SingleTypeReference identifierStack localIdentifierPtr identifierPositionStack localIdentifierPtr ArrayTypeReference identifierStack localIdentifierPtr identifierPositionStack localIdentifierPtr sourceEnd endPosition TypeReference baseTypeReference sourceStart intStack localIntPtr sourceEnd intStack localIntPtr localIntPtr sourceEnd endPosition localIdentifierPtr identifierStack localIdentifierPtr identifierPositionStack localIdentifierPtr QualifiedTypeReference ArrayQualifiedTypeReference

public interface I Binary Field extends I Generic Field return org eclipse jdt internal compiler Constant  IBinaryField IGenericField
Constant get Constant Answer the resolved name of the receiver s type in the class file format as specified in section 4 3 2 of the Java 2 VM spec For example java lang String is Ljava lang String an int is I a 2 dimensional array of strings is Ljava lang String an array of floats is F  getConstant

Answer the resolved names of the exception types in the class file format as specified in section 4 2 of the Java 2 VM spec or null if the array is empty For example java lang String is java lang String 
Answer the receiver s method descriptor which describes the parameter return types as specified in section 4 3 3 of the Java 2 VM spec For example int foo String is Ljava lang String I Object foo int is I Ljava lang Object 
char get Method Descriptor Answer whether the receiver represents a class initializer method boolean is Clinit  getMethodDescriptor isClinit

public interface I Binary Nested Type Answer the resolved name of the enclosing type in the class file format as specified in section 4 2 of the Java 2 VM spec For example java lang String is java lang String  IBinaryNestedType
char get Enclosing Type Name Answer an int whose bits are set according the access constants defined by the VM spec We have added Acc Deprecated Acc Synthetic  getEnclosingTypeName AccDeprecated AccSynthetic
int get Modifiers Answer the resolved name of the member type in the class file format as specified in section 4 2 of the Java 2 VM spec For example p1 p2 A M is p1 p2 A M  getModifiers

I Binary Method No Method new I Binary Method 0 Answer the resolved name of the enclosing type in the class file format as specified in section 4 2 of the Java 2 VM spec or null if the receiver is a top level type For example java lang String is java lang String  IBinaryMethod NoMethod IBinaryMethod
char get Enclosing Type Name Answer the receiver s fields or null if the array is empty  getEnclosingTypeName
I Binary Field get Fields Answer the resolved names of the receiver s interfaces in the class file format as specified in section 4 2 of the Java 2 VM spec or null if the array is empty For example java lang String is java lang String  IBinaryField getFields
char get Interface Names Answer the receiver s nested types or null if the array is empty This nested type info is extracted from the inner class attributes Ask the name environment to find a member type using its compound name NOTE The compiler examines the nested type info ignores the local types so the local types do not have to be included  getInterfaceNames
I Binary Nested Type get Member Types Answer the receiver s methods or null if the array is empty  IBinaryNestedType getMemberTypes
I Binary Method get Methods Answer the resolved name of the type in the class file format as specified in section 4 2 of the Java 2 VM spec For example java lang String is java lang String  IBinaryMethod getMethods
char get Name Answer the resolved name of the receiver s superclass in the class file format as specified in section 4 2 of the Java 2 VM spec or null if it does not have one For example java lang String is java lang String  getName
Answer true if the receiver is an anonymous class false otherwise 
Answer true if the receiver is a local class false otherwise 
Answer true if the receiver is a member class false otherwise 
Answer the source file attribute or null if none For example String java 

public interface I Compilation Unit extends I Dependent Answer the contents of the compilation unit In normal use the contents are requested twice Once during the initial lite parsing step then again for the more detailed parsing step  ICompilationUnit IDependent
char get Contents Answer the name of the top level public type For example Hashtable  getContents
char get Main Type Name Answer the name of the package according to the directory structure or null if package consistency checks should be ignored For example java lang  getMainTypeName

public interface I Dependent Answer the file name which defines the type The path part optional must be separated from the actual file proper name by a java io File separator The proper file name includes the suffix extension e g nbsp java e g nbsp c com ibm compiler java api Compiler java  IDependent

public interface I Generic Field Answer an int whose bits are set according the access constants defined by the VM spec We have added Acc Deprecated Acc Synthetic  IGenericField AccDeprecated AccSynthetic
int get Modifiers Answer the name of the field  getModifiers

public interface I Generic Method Answer an int whose bits are set according the access constants defined by the VM spec We have added Acc Deprecated  IGenericMethod AccDeprecated
Answer the name of the method For a constructor answer init clinit for a clinit method 
char get Selector boolean is Constructor  getSelector isConstructor
Answer the names of the argument or null if the argument names are not available 

public interface I Generic Type extends I Dependent Answer an int whose bits are set according the access constants defined by the VM spec We have added Acc Deprecated Acc Synthetic NOTE If the receiver represents a member type the modifiers are extracted from its inner class attributes  IGenericType IDependent AccDeprecated AccSynthetic
int get Modifiers Answer whether the receiver contains the resolved binary form or the unresolved source form of the type  getModifiers
boolean is Binary Type boolean is Class  isBinaryType isClass
boolean is Binary Type boolean is Class boolean is Interface  isBinaryType isClass isInterface

public interface I Name Environment Find a type with the given compound name Answer the binary form of the type if it is known to be consistent Otherwise answer the compilation unit which defines the type or null if the type does not exist Types in the default package are specified as type Name It is unknown whether the package containing the type actually exists NOTE This method can be used to find a member type using its internal name A B but the source file for A is answered if the binary file is inconsistent  INameEnvironment typeName
Name Environment Answer find Type char compound Type Name Find a type named type Name in the package package Name Answer the binary form of the type if it is known to be consistent Otherwise answer the compilation unit which defines the type or null if the type does not exist The default package is indicated by char 0 It is known that the package containing the type exists NOTE This method can be used to find a member type using its internal name A B but the source file for A is answered if the binary file is inconsistent  NameEnvironmentAnswer findType compoundTypeName typeName packageName
Name Environment Answer find Type char type Name char package Name Answer whether package Name is the name of a known subpackage inside the package parent Package Name A top level package is found relative to null The default package is always assumed to exist For example is Package java awt event is Package null java  NameEnvironmentAnswer findType typeName packageName packageName parentPackageName isPackage isPackage
This method cleans the environment uo It is responsible for releasing the memory and freeing resources Passed that point the name environment is no longer usable A name environment can have a long life cycle therefore it is the responsibility of the code which created it to decide when it is a good time to clean it up 

public interface I Source Field extends I Generic Field Answer the source end position of the field s declaration int get Declaration Source End  ISourceField IGenericField getDeclarationSourceEnd
int get Declaration Source End Answer the source start position of the field s declaration int get Declaration Source Start  getDeclarationSourceEnd getDeclarationSourceStart
Answer the initialization source for this constant field Answer null if the field is not a constant or if it has no initialization 
char get Initialization Source Answer the source end position of the field s name int get Name Source End  getInitializationSource getNameSourceEnd
int get Name Source End Answer the source start position of the field s name int get Name Source Start  getNameSourceEnd getNameSourceStart
Answer the type name of the field The name is a simple name or a qualified dot separated name For example Hashtable or java util Hashtable 

Answer the source end position of the import declaration 
int get Declaration Source End Answer the source start position of the import declaration  getDeclarationSourceEnd
Answer an int whose bits are set according the access constants defined by the VM spec Since Java 1 5 static imports can be defined 
Answer the name of the import A name is a simple name or a qualified dot separated name For example Hashtable or java util Hashtable 
Answer whether the import is on demand or not On demand import names have no trailing star 

Answer the unresolved names of the argument types or null if the array is empty A name is a simple name or a qualified dot separated name For example Hashtable or java util Hashtable 
char get Argument Type Names Answer the source end position of the method s declaration  getArgumentTypeNames
int get Declaration Source End Answer the source start position of the method s declaration  getDeclarationSourceEnd
int get Declaration Source Start Answer the unresolved names of the exception types or null if the array is empty A name is a simple name or a qualified dot separated name For example Hashtable or java util Hashtable  getDeclarationSourceStart
char get Exception Type Names Answer the source end position of the method s selector  getExceptionTypeNames
int get Name Source End Answer the source start position of the method s selector  getNameSourceEnd
int get Name Source Start Answer the unresolved name of the return type or null if receiver is a constructor or clinit The name is a simple name or a qualified dot separated name For example Hashtable or java util Hashtable  getNameSourceStart

public interface I Source Type extends I Generic Type Answer the source end position of the type s declaration int get Declaration Source End  ISourceType IGenericType getDeclarationSourceEnd
int get Declaration Source End Answer the source start position of the type s declaration int get Declaration Source Start  getDeclarationSourceEnd getDeclarationSourceStart
Answer the enclosing type or null if the receiver is a top level type 
Answer the receiver s fields or null if the array is empty NOTE Multiple fields with the same name can exist in the result 
Answer the receiver s imports or null if the array is empty An import is a qualified dot separated name For example java util Hashtable or java lang A static import used static as its first fragment for example static java util Hashtable 
Answer the unresolved names of the receiver s interfaces or null if the array is empty A name is a simple name or a qualified dot separated name For example Hashtable or java util Hashtable 
Answer the receiver s member types or null if the array is empty 
Answer the receiver s methods or null if the array is empty NOTE Multiple methods with the same name parameter types can exist in the result 
I Source Method get Methods Answer the simple source name of the receiver char get Name  ISourceMethod getMethods getName
char get Name Answer the source end position of the type s name int get Name Source End  getName getNameSourceEnd
int get Name Source End Answer the source start position of the type s name int get Name Source Start  getNameSourceEnd getNameSourceStart
Answer the qualified name of the receiver s package separated by periods or null if its the default package For example java util Hashtable 
Answer the unresolved name of the receiver s superclass or null if it does not have one The name is a simple name or a qualified dot separated name For example Hashtable or java util Hashtable 

I Source Type source Types public Name Environment Answer I Binary Type binary Type this binary Type binary Type  ISourceType sourceTypes NameEnvironmentAnswer IBinaryType binaryType binaryType binaryType
public Name Environment Answer I Compilation Unit compilation Unit this compilation Unit compilation Unit  NameEnvironmentAnswer ICompilationUnit compilationUnit compilationUnit compilationUnit
public Name Environment Answer I Source Type source Types this source Types source Types  NameEnvironmentAnswer ISourceType sourceTypes sourceTypes sourceTypes
Answer the resolved binary form for the type or null if the receiver represents a compilation unit or source type public I Binary Type get Binary Type return this binary Type  IBinaryType getBinaryType binaryType
Answer the compilation unit or null if the receiver represents a binary or source type public I Compilation Unit get Compilation Unit return this compilation Unit  ICompilationUnit getCompilationUnit compilationUnit
Answer the unresolved source forms for the type or null if the receiver represents a compilation unit or binary type Multiple source forms can be answered in case the originating compilation unit did contain several type at once Then the first type is guaranteed to be the requested type public I Source Type get Source Types return this source Types  ISourceType getSourceTypes sourceTypes
Answer whether the receiver contains the resolved binary form of the type public boolean is Binary Type return this binary Type null  isBinaryType binaryType
Answer whether the receiver contains the compilation unit which defines the type public boolean is Compilation Unit return this compilation Unit null  isCompilationUnit compilationUnit
Answer whether the receiver contains the unresolved source form of the type public boolean is Source Type return this source Types null  isSourceType sourceTypes

Conditional Flow Info Flow Info inits When True Flow Info inits When False this inits When True inits When True this inits When False inits When False  ConditionalFlowInfo FlowInfo initsWhenTrue FlowInfo initsWhenFalse initsWhenTrue initsWhenTrue initsWhenFalse initsWhenFalse
public Flow Info add Initializations From Flow Info other Inits this inits When True add Initializations From other Inits this inits When False add Initializations From other Inits return this  FlowInfo addInitializationsFrom FlowInfo otherInits initsWhenTrue addInitializationsFrom otherInits initsWhenFalse addInitializationsFrom otherInits
public Flow Info add Potential Initializations From Flow Info other Inits this inits When True add Potential Initializations From other Inits this inits When False add Potential Initializations From other Inits return this  FlowInfo addPotentialInitializationsFrom FlowInfo otherInits initsWhenTrue addPotentialInitializationsFrom otherInits initsWhenFalse addPotentialInitializationsFrom otherInits
public Flow Info as Negated Condition Flow Info extra inits When True inits When True inits When False inits When False extra return this  FlowInfo asNegatedCondition FlowInfo initsWhenTrue initsWhenTrue initsWhenFalse initsWhenFalse
public Flow Info copy return new Conditional Flow Info inits When True copy inits When False copy  FlowInfo ConditionalFlowInfo initsWhenTrue initsWhenFalse
public Flow Info inits When False return inits When False  FlowInfo initsWhenFalse initsWhenFalse
public Flow Info inits When True return inits When True  FlowInfo initsWhenTrue initsWhenTrue
Check status of definite assignment for a field public boolean is Definitely Assigned Field Binding field return inits When True is Definitely Assigned field inits When False is Definitely Assigned field  isDefinitelyAssigned FieldBinding initsWhenTrue isDefinitelyAssigned initsWhenFalse isDefinitelyAssigned
Check status of definite assignment for a local variable public boolean is Definitely Assigned Local Variable Binding local return inits When True is Definitely Assigned local inits When False is Definitely Assigned local  isDefinitelyAssigned LocalVariableBinding initsWhenTrue isDefinitelyAssigned initsWhenFalse isDefinitelyAssigned
public int reach Mode return unconditional Inits reach Mode  reachMode unconditionalInits reachMode
public boolean is Reachable return unconditional Inits is Reachable should maybe directly be false  isReachable unconditionalInits isReachable
Check status of potential assignment for a field public boolean is Potentially Assigned Field Binding field return inits When True is Potentially Assigned field inits When False is Potentially Assigned field  isPotentiallyAssigned FieldBinding initsWhenTrue isPotentiallyAssigned initsWhenFalse isPotentiallyAssigned
Check status of potential assignment for a local variable public boolean is Potentially Assigned Local Variable Binding local return inits When True is Potentially Assigned local inits When False is Potentially Assigned local  isPotentiallyAssigned LocalVariableBinding initsWhenTrue isPotentiallyAssigned initsWhenFalse isPotentiallyAssigned
Record a field got definitely assigned public void mark As Definitely Assigned Field Binding field inits When True mark As Definitely Assigned field inits When False mark As Definitely Assigned field  markAsDefinitelyAssigned FieldBinding initsWhenTrue markAsDefinitelyAssigned initsWhenFalse markAsDefinitelyAssigned
Record a field got definitely assigned public void mark As Definitely Assigned Local Variable Binding local inits When True mark As Definitely Assigned local inits When False mark As Definitely Assigned local  markAsDefinitelyAssigned LocalVariableBinding initsWhenTrue markAsDefinitelyAssigned initsWhenFalse markAsDefinitelyAssigned
Clear the initialization info for a field public void mark As Definitely Not Assigned Field Binding field inits When True mark As Definitely Not Assigned field inits When False mark As Definitely Not Assigned field  markAsDefinitelyNotAssigned FieldBinding initsWhenTrue markAsDefinitelyNotAssigned initsWhenFalse markAsDefinitelyNotAssigned
Clear the initialization info for a local variable public void mark As Definitely Not Assigned Local Variable Binding local inits When True mark As Definitely Not Assigned local inits When False mark As Definitely Not Assigned local  markAsDefinitelyNotAssigned LocalVariableBinding initsWhenTrue markAsDefinitelyNotAssigned initsWhenFalse markAsDefinitelyNotAssigned
public Flow Info set Reach Mode int reach Mode inits When True set Reach Mode reach Mode inits When False set Reach Mode reach Mode return this  FlowInfo setReachMode reachMode initsWhenTrue setReachMode reachMode initsWhenFalse setReachMode reachMode
Converts conditional receiver into inconditional one updated in the following way ul li intersection of definitely assigned variables li union of potentially assigned variables ul public Unconditional Flow Info merged With Unconditional Flow Info other Inits return unconditional Inits merged With other Inits  UnconditionalFlowInfo mergedWith UnconditionalFlowInfo otherInits unconditionalInits mergedWith otherInits
public String to String return Flow Info true inits When True to String false inits When False to String NON NLS 1 NON NLS 3 NON NLS 2  toString FlowInfo initsWhenTrue toString initsWhenFalse toString
public Unconditional Flow Info unconditional Inits return inits When True unconditional Inits copy merged With inits When False unconditional Inits  UnconditionalFlowInfo unconditionalInits initsWhenTrue unconditionalInits mergedWith initsWhenFalse unconditionalInits

public Exception Handling Flow Context Flow Context parent AST Node associated Node Reference Binding handled Exceptions Block Scope scope Unconditional Flow Info flow Info super parent associated Node is Method Context scope scope method Scope this handled Exceptions handled Exceptions int count handled Exceptions length cache Size count Bit Cache Size 1 this is Reached new int cache Size none is reached by default this is Needed new int cache Size none is needed by default this inits On Exceptions new Unconditional Flow Info count for int i 0 i count i this indexes put handled Exceptions i i key type value index boolean is Unchecked scope compare Unchecked Exception handled Exceptions i Not Related int cache Index i Bit Cache Size bit Mask 1 i Bit Cache Size if is Unchecked is Reached cache Index bit Mask this inits On Exceptions i flow Info copy unconditional Inits else this inits On Exceptions i Flow Info DEAD END System arraycopy this is Reached 0 this is Needed 0 cache Size this inits On Return Flow Info DEAD END  ExceptionHandlingFlowContext FlowContext ASTNode associatedNode ReferenceBinding handledExceptions BlockScope UnconditionalFlowInfo flowInfo associatedNode isMethodContext methodScope handledExceptions handledExceptions handledExceptions cacheSize BitCacheSize isReached cacheSize isNeeded cacheSize initsOnExceptions UnconditionalFlowInfo handledExceptions isUnchecked compareUncheckedException handledExceptions NotRelated cacheIndex BitCacheSize bitMask BitCacheSize isUnchecked isReached cacheIndex bitMask initsOnExceptions flowInfo unconditionalInits initsOnExceptions FlowInfo DEAD_END isReached isNeeded cacheSize initsOnReturn FlowInfo DEAD_END
public void complain If Unused Exception Handlers Abstract Method Declaration method Method Scope scope method scope can optionally skip overriding methods if method binding modifiers Compiler Modifiers Acc Overriding Compiler Modifiers Acc Implementing 0 scope environment options report Unused Declared Thrown Exception When Overriding return report errors for unreachable exception handlers for int i 0 count handled Exceptions length i count i int index indexes get handled Exceptions i int cache Index index Bit Cache Size int bit Mask 1 index Bit Cache Size if is Reached cache Index bit Mask 0 scope problem Reporter unused Declared Thrown Exception handled Exceptions index method method thrown Exceptions index  complainIfUnusedExceptionHandlers AbstractMethodDeclaration MethodScope CompilerModifiers AccOverriding CompilerModifiers AccImplementing reportUnusedDeclaredThrownExceptionWhenOverriding handledExceptions handledExceptions cacheIndex BitCacheSize bitMask BitCacheSize isReached cacheIndex bitMask problemReporter unusedDeclaredThrownException handledExceptions thrownExceptions
public void complain If Unused Exception Handlers Block Scope scope Try Statement try Statement report errors for unreachable exception handlers for int i 0 count handled Exceptions length i count i int index indexes get handled Exceptions i int cache Index index Bit Cache Size int bit Mask 1 index Bit Cache Size if is Reached cache Index bit Mask 0 scope problem Reporter unreachable Catch Block handled Exceptions index try Statement catch Arguments index type else if is Needed cache Index bit Mask 0 scope problem Reporter hidden Catch Block handled Exceptions index try Statement catch Arguments index type  complainIfUnusedExceptionHandlers BlockScope TryStatement tryStatement handledExceptions handledExceptions cacheIndex BitCacheSize bitMask BitCacheSize isReached cacheIndex bitMask problemReporter unreachableCatchBlock handledExceptions tryStatement catchArguments isNeeded cacheIndex bitMask problemReporter hiddenCatchBlock handledExceptions tryStatement catchArguments
public String individual To String String Buffer buffer new String Buffer Exception flow context NON NLS 1 int length handled Exceptions length for int i 0 i length i int cache Index i Bit Cache Size int bit Mask 1 i Bit Cache Size buffer append append handled Exceptions i readable Name if is Reached cache Index bit Mask 0 if is Needed cache Index bit Mask 0 buffer append masked NON NLS 1 else buffer append reached NON NLS 1 else buffer append not reached NON NLS 1 buffer append append inits On Exceptions i to String append buffer append inits On Return append inits On Return to String append NON NLS 1 return buffer to String  individualToString StringBuffer StringBuffer handledExceptions cacheIndex BitCacheSize bitMask BitCacheSize handledExceptions readableName isReached cacheIndex bitMask isNeeded cacheIndex bitMask initsOnExceptions toString initsOnReturn initsOnReturn toString toString
public Unconditional Flow Info inits On Exception Reference Binding exception Type int index if index indexes get exception Type 0 return Flow Info DEAD END return inits On Exceptions index  UnconditionalFlowInfo initsOnException ReferenceBinding exceptionType exceptionType FlowInfo DEAD_END initsOnExceptions
public Unconditional Flow Info inits On Return return this inits On Return  UnconditionalFlowInfo initsOnReturn initsOnReturn
public void record Handling Exception Reference Binding exception Type Unconditional Flow Info flow Info Type Binding raised Exception AST Node invocation Site boolean was Already Definitely Caught int index indexes get exception Type if already flagged as being reached unchecked exception handler int cache Index index Bit Cache Size int bit Mask 1 index Bit Cache Size if was Already Definitely Caught this is Needed cache Index bit Mask this is Reached cache Index bit Mask inits On Exceptions index inits On Exceptions index Flow Info DEAD END flow Info copy unconditional Inits inits On Exceptions index merged With flow Info copy unconditional Inits  recordHandlingException ReferenceBinding exceptionType UnconditionalFlowInfo flowInfo TypeBinding raisedException ASTNode invocationSite wasAlreadyDefinitelyCaught exceptionType cacheIndex BitCacheSize bitMask BitCacheSize wasAlreadyDefinitelyCaught isNeeded cacheIndex bitMask isReached cacheIndex bitMask initsOnExceptions initsOnExceptions FlowInfo DEAD_END flowInfo unconditionalInits initsOnExceptions mergedWith flowInfo unconditionalInits
public void record Return From Flow Info flow Info if flow Info is Reachable return if inits On Return Flow Info DEAD END inits On Return flow Info copy unconditional Inits else inits On Return inits On Return merged With flow Info copy unconditional Inits  recordReturnFrom FlowInfo flowInfo flowInfo isReachable initsOnReturn FlowInfo DEAD_END initsOnReturn flowInfo unconditionalInits initsOnReturn initsOnReturn mergedWith flowInfo unconditionalInits
public void merge Unhandled Exception Type Binding new Exception if this extended Exceptions null this extended Exceptions new Array List 5 for int i 0 i this handled Exceptions length i this extended Exceptions add this handled Exceptions i boolean is Redundant false for int i this extended Exceptions size 1 i 0 i switch Scope compare Types new Exception Type Binding this extended Exceptions get i case More Generic this extended Exceptions remove i break case Equal Or More Specific is Redundant true break case Not Related break if is Redundant this extended Exceptions add new Exception  mergeUnhandledException TypeBinding newException extendedExceptions extendedExceptions ArrayList handledExceptions extendedExceptions handledExceptions isRedundant extendedExceptions compareTypes newException TypeBinding extendedExceptions MoreGeneric extendedExceptions EqualOrMoreSpecific isRedundant NotRelated isRedundant extendedExceptions newException

int assign Count public Finally Flow Context Flow Context parent AST Node associated Node super parent associated Node  assignCount FinallyFlowContext FlowContext ASTNode associatedNode associatedNode
Given some contextual initialization info derived from a try block or a catch block this code will check that the subroutine context does not also initialize a final variable potentially set redundantly public void complain On Redundant Final Assignments Flow Info flow Info Block Scope scope for int i 0 i assign Count i Variable Binding variable final Variables i if variable null continue boolean complained false remember if have complained on this final assignment if variable instanceof Field Binding final field if flow Info is Potentially Assigned Field Binding variable complained true scope problem Reporter duplicate Initialization Of Blank Final Field Field Binding variable final Assignments i else final local variable if flow Info is Potentially Assigned Local Variable Binding variable complained true scope problem Reporter duplicate Initialization Of Final Local Local Variable Binding variable final Assignments i any reference reported at this level is removed from the parent context where it could also be reported again if complained Flow Context current Context parent while current Context null if current Context is Sub Routine current Context remove Final Assignment If Any final Assignments i current Context current Context parent  complainOnRedundantFinalAssignments FlowInfo flowInfo BlockScope assignCount VariableBinding finalVariables FieldBinding flowInfo isPotentiallyAssigned FieldBinding problemReporter duplicateInitializationOfBlankFinalField FieldBinding finalAssignments flowInfo isPotentiallyAssigned LocalVariableBinding problemReporter duplicateInitializationOfFinalLocal LocalVariableBinding finalAssignments FlowContext currentContext currentContext currentContext isSubRoutine currentContext removeFinalAssignmentIfAny finalAssignments currentContext currentContext
public String individual To String String Buffer buffer new String Buffer Finally flow context NON NLS 1 buffer append final Assignments count append assign Count append NON NLS 1 return buffer to String  individualToString StringBuffer StringBuffer finalAssignments assignCount toString
public boolean is Sub Routine return true  isSubRoutine
boolean record Final Assignment Variable Binding binding Reference final Assignment if assign Count 0 final Assignments new Reference 5 final Variables new Variable Binding 5 else if assign Count final Assignments length System arraycopy final Assignments 0 final Assignments new Reference assign Count 2 0 assign Count System arraycopy final Variables 0 final Variables new Variable Binding assign Count 2 0 assign Count final Assignments assign Count final Assignment final Variables assign Count binding return true  recordFinalAssignment VariableBinding finalAssignment assignCount finalAssignments finalVariables VariableBinding assignCount finalAssignments finalAssignments finalAssignments assignCount assignCount finalVariables finalVariables VariableBinding assignCount assignCount finalAssignments assignCount finalAssignment finalVariables assignCount
void remove Final Assignment If Any Reference reference for int i 0 i assign Count i if final Assignments i reference final Assignments i null final Variables i null return  removeFinalAssignmentIfAny assignCount finalAssignments finalAssignments finalVariables

public Flow Context Flow Context parent AST Node associated Node this parent parent this associated Node associated Node  FlowContext FlowContext ASTNode associatedNode associatedNode associatedNode
public Label break Label return null  breakLabel
public void check Exception Handlers Type Binding raised Exceptions AST Node location Flow Info flow Info Block Scope scope check that all the argument exception types are handled JDK Compatible implementation when an exception type is thrown all related catch blocks are marked as reachable instead of those only until the point where it is safely handled Smarter see comment at the end int remaining Count counting the number of remaining unhandled exceptions int raised Count total number of exceptions raised if raised Exceptions null raised Count raised Exceptions length 0 return remaining Count raised Count duplicate the array of raised exceptions since it will be updated null replaces any handled exception System arraycopy raised Exceptions 0 raised Exceptions new Type Binding raised Count 0 raised Count Flow Context traversed Context this while traversed Context null Sub Routine Statement sub if sub traversed Context sub Routine null sub is Sub Routine Escaping traversing a non returning subroutine means that all unhandled exceptions will actually never get sent return filter exceptions that are locally caught from the innermost enclosing try statement to the outermost ones if traversed Context instanceof Exception Handling Flow Context Exception Handling Flow Context exception Context Exception Handling Flow Context traversed Context Reference Binding caught Exceptions if caught Exceptions exception Context handled Exceptions No Exceptions int caught Count caught Exceptions length boolean locally Caught new boolean raised Count at most for int caught Index 0 caught Index caught Count caught Index Reference Binding caught Exception caught Exceptions caught Index for int raised Index 0 raised Index raised Count raised Index Type Binding raised Exception if raised Exception raised Exceptions raised Index null int state caught Exception null Equal Or More Specific any exception Scope compare Types raised Exception caught Exception switch state case Equal Or More Specific exception Context record Handling Exception caught Exception flow Info unconditional Inits raised Exception location locally Caught raised Index was already definitely caught if locally Caught raised Index locally Caught raised Index true remember that this exception has been definitely caught remaining Count break case More Generic exception Context record Handling Exception caught Exception flow Info unconditional Inits raised Exception location false was not caught already per construction remove locally caught exceptions from the remaining ones for int i 0 i raised Count i if locally Caught i raised Exceptions i null removed from the remaining ones method treatment for unchecked exceptions if exception Context is Method Context for int i 0 i raised Count i Type Binding raised Exception if raised Exception raised Exceptions i null if raised Exception is Compatible With scope get Java Lang Runtime Exception raised Exception is Compatible With scope get Java Lang Error remaining Count raised Exceptions i null anonymous constructors are allowed to throw any exceptions their thrown exceptions clause will be fixed up later as per JLS 8 6 if exception Context associated Node instanceof Abstract Method Declaration Abstract Method Declaration method Abstract Method Declaration exception Context associated Node if method is Constructor method binding declaring Class is Anonymous Type for int i 0 i raised Count i Type Binding raised Exception if raised Exception raised Exceptions i null exception Context merge Unhandled Exception raised Exception return no need to complain will fix up constructor exceptions break not handled anywhere thus jump to error handling if remaining Count 0 return traversed Context record Return From flow Info unconditional Inits if traversed Context associated Node instanceof Try Statement flow Info flow Info copy add Initializations From Try Statement traversed Context associated Node sub Routine Inits traversed Context traversed Context parent if reaches this point then there are some remaining unhandled exception types next Report for int i 0 i raised Count i Type Binding exception if exception raised Exceptions i null only one complaint if same exception declared to be thrown more than once for int j 0 j i j if raised Exceptions j exception continue next Report already reported scope problem Reporter unhandled Exception exception location  checkExceptionHandlers TypeBinding raisedExceptions ASTNode FlowInfo flowInfo BlockScope remainingCount raisedCount raisedExceptions raisedCount raisedExceptions remainingCount raisedCount raisedExceptions raisedExceptions TypeBinding raisedCount raisedCount FlowContext traversedContext traversedContext SubRoutineStatement traversedContext subRoutine isSubRoutineEscaping traversedContext ExceptionHandlingFlowContext ExceptionHandlingFlowContext exceptionContext ExceptionHandlingFlowContext traversedContext ReferenceBinding caughtExceptions caughtExceptions exceptionContext handledExceptions NoExceptions caughtCount caughtExceptions locallyCaught raisedCount caughtIndex caughtIndex caughtCount caughtIndex ReferenceBinding caughtException caughtExceptions caughtIndex raisedIndex raisedIndex raisedCount raisedIndex TypeBinding raisedException raisedException raisedExceptions raisedIndex caughtException EqualOrMoreSpecific compareTypes raisedException caughtException EqualOrMoreSpecific exceptionContext recordHandlingException caughtException flowInfo unconditionalInits raisedException locallyCaught raisedIndex locallyCaught raisedIndex locallyCaught raisedIndex remainingCount MoreGeneric exceptionContext recordHandlingException caughtException flowInfo unconditionalInits raisedException raisedCount locallyCaught raisedExceptions exceptionContext isMethodContext raisedCount TypeBinding raisedException raisedException raisedExceptions raisedException isCompatibleWith getJavaLangRuntimeException raisedException isCompatibleWith getJavaLangError remainingCount raisedExceptions exceptionContext associatedNode AbstractMethodDeclaration AbstractMethodDeclaration AbstractMethodDeclaration exceptionContext associatedNode isConstructor declaringClass isAnonymousType raisedCount TypeBinding raisedException raisedException raisedExceptions exceptionContext mergeUnhandledException raisedException remainingCount traversedContext recordReturnFrom flowInfo unconditionalInits traversedContext associatedNode TryStatement flowInfo flowInfo addInitializationsFrom TryStatement traversedContext associatedNode subRoutineInits traversedContext traversedContext nextReport raisedCount TypeBinding raisedExceptions raisedExceptions nextReport problemReporter unhandledException
public void check Exception Handlers Type Binding raised Exception AST Node location Flow Info flow Info Block Scope scope LIGHT VERSION OF THE EQUIVALENT WITH AN ARRAY OF EXCEPTIONS check that all the argument exception types are handled JDK Compatible implementation when an exception type is thrown all related catch blocks are marked as reachable instead of those only until the point where it is safely handled Smarter see comment at the end Flow Context traversed Context this while traversed Context null Sub Routine Statement sub if sub traversed Context sub Routine null sub is Sub Routine Escaping traversing a non returning subroutine means that all unhandled exceptions will actually never get sent return filter exceptions that are locally caught from the innermost enclosing try statement to the outermost ones if traversed Context instanceof Exception Handling Flow Context Exception Handling Flow Context exception Context Exception Handling Flow Context traversed Context Reference Binding caught Exceptions if caught Exceptions exception Context handled Exceptions No Exceptions boolean definitely Caught false for int caught Index 0 caught Count caught Exceptions length caught Index caught Count caught Index Reference Binding caught Exception caught Exceptions caught Index int state caught Exception null Equal Or More Specific any exception Scope compare Types raised Exception caught Exception switch state case Equal Or More Specific exception Context record Handling Exception caught Exception flow Info unconditional Inits raised Exception location definitely Caught was it already definitely caught definitely Caught true break case More Generic exception Context record Handling Exception caught Exception flow Info unconditional Inits raised Exception location false was not caught already per construction if definitely Caught return method treatment for unchecked exceptions if exception Context is Method Context if raised Exception is Compatible With scope get Java Lang Runtime Exception raised Exception is Compatible With scope get Java Lang Error return anonymous constructors are allowed to throw any exceptions their thrown exceptions clause will be fixed up later as per JLS 8 6 if exception Context associated Node instanceof Abstract Method Declaration Abstract Method Declaration method Abstract Method Declaration exception Context associated Node if method is Constructor method binding declaring Class is Anonymous Type exception Context merge Unhandled Exception raised Exception return no need to complain will fix up constructor exceptions break not handled anywhere thus jump to error handling traversed Context record Return From flow Info unconditional Inits if traversed Context associated Node instanceof Try Statement flow Info flow Info copy add Initializations From Try Statement traversed Context associated Node sub Routine Inits traversed Context traversed Context parent if reaches this point then there are some remaining unhandled exception types scope problem Reporter unhandled Exception raised Exception location  checkExceptionHandlers TypeBinding raisedException ASTNode FlowInfo flowInfo BlockScope FlowContext traversedContext traversedContext SubRoutineStatement traversedContext subRoutine isSubRoutineEscaping traversedContext ExceptionHandlingFlowContext ExceptionHandlingFlowContext exceptionContext ExceptionHandlingFlowContext traversedContext ReferenceBinding caughtExceptions caughtExceptions exceptionContext handledExceptions NoExceptions definitelyCaught caughtIndex caughtCount caughtExceptions caughtIndex caughtCount caughtIndex ReferenceBinding caughtException caughtExceptions caughtIndex caughtException EqualOrMoreSpecific compareTypes raisedException caughtException EqualOrMoreSpecific exceptionContext recordHandlingException caughtException flowInfo unconditionalInits raisedException definitelyCaught definitelyCaught MoreGeneric exceptionContext recordHandlingException caughtException flowInfo unconditionalInits raisedException definitelyCaught exceptionContext isMethodContext raisedException isCompatibleWith getJavaLangRuntimeException raisedException isCompatibleWith getJavaLangError exceptionContext associatedNode AbstractMethodDeclaration AbstractMethodDeclaration AbstractMethodDeclaration exceptionContext associatedNode isConstructor declaringClass isAnonymousType exceptionContext mergeUnhandledException raisedException traversedContext recordReturnFrom flowInfo unconditionalInits traversedContext associatedNode TryStatement flowInfo flowInfo addInitializationsFrom TryStatement traversedContext associatedNode subRoutineInits traversedContext traversedContext problemReporter unhandledException raisedException
public Label continue Label return null  continueLabel
public Flow Context get Target Context For Break Label char label Name Flow Context current this last Non Returning Sub Routine null while current null if current is Non Returning Context last Non Returning Sub Routine current char current Label Name if current Label Name current label Name null Char Operation equals current Label Name label Name if last Non Returning Sub Routine null return current return last Non Returning Sub Routine current current parent not found return null  FlowContext getTargetContextForBreakLabel labelName FlowContext lastNonReturningSubRoutine isNonReturningContext lastNonReturningSubRoutine currentLabelName currentLabelName labelName CharOperation currentLabelName labelName lastNonReturningSubRoutine lastNonReturningSubRoutine
public Flow Context get Target Context For Continue Label char label Name Flow Context current this Flow Context last Continuable null Flow Context last Non Returning Sub Routine null while current null if current is Non Returning Context last Non Returning Sub Routine current else if current is Continuable last Continuable current char current Label Name if current Label Name current label Name null Char Operation equals current Label Name label Name matching label found if last Continuable null current associated Node concrete Statement last Continuable associated Node if last Non Returning Sub Routine null return last Continuable return last Non Returning Sub Routine label is found but not a continuable location return Not Continuable Context current current parent not found return null  FlowContext getTargetContextForContinueLabel labelName FlowContext FlowContext lastContinuable FlowContext lastNonReturningSubRoutine isNonReturningContext lastNonReturningSubRoutine isContinuable lastContinuable currentLabelName currentLabelName labelName CharOperation currentLabelName labelName lastContinuable associatedNode concreteStatement lastContinuable associatedNode lastNonReturningSubRoutine lastContinuable lastNonReturningSubRoutine NotContinuableContext
public Flow Context get Target Context For Default Break Flow Context current this last Non Returning Sub Routine null while current null if current is Non Returning Context last Non Returning Sub Routine current if current is Breakable current label Name null if last Non Returning Sub Routine null return current return last Non Returning Sub Routine current current parent not found return null  FlowContext getTargetContextForDefaultBreak FlowContext lastNonReturningSubRoutine isNonReturningContext lastNonReturningSubRoutine isBreakable labelName lastNonReturningSubRoutine lastNonReturningSubRoutine
public Flow Context get Target Context For Default Continue Flow Context current this last Non Returning Sub Routine null while current null if current is Non Returning Context last Non Returning Sub Routine current if current is Continuable if last Non Returning Sub Routine null return current return last Non Returning Sub Routine current current parent not found return null  FlowContext getTargetContextForDefaultContinue FlowContext lastNonReturningSubRoutine isNonReturningContext lastNonReturningSubRoutine isContinuable lastNonReturningSubRoutine lastNonReturningSubRoutine
public String individual To String return Flow context NON NLS 1  individualToString
public Flow Info inits On Break return Flow Info DEAD END  FlowInfo initsOnBreak FlowInfo DEAD_END
public Unconditional Flow Info inits On Return return Flow Info DEAD END  UnconditionalFlowInfo initsOnReturn FlowInfo DEAD_END
public boolean is Breakable return false  isBreakable
public boolean is Continuable return false  isContinuable
public boolean is Non Returning Context return false  isNonReturningContext
public boolean is Sub Routine return false  isSubRoutine
public char label Name return null  labelName
public void record Break From Flow Info flow Info default implementation do nothing  recordBreakFrom FlowInfo flowInfo
public void record Continue From Flow Info flow Info default implementation do nothing  recordContinueFrom FlowInfo flowInfo
boolean record Final Assignment Variable Binding variable Reference final Reference return true keep going  recordFinalAssignment VariableBinding finalReference
public void record Return From Flow Info flow Info default implementation do nothing  recordReturnFrom FlowInfo flowInfo
public void record Setting Final Variable Binding variable Reference final Reference Flow Info flow Info if flow Info is Reachable return for initialization inside looping statement that effectively loops Flow Context context this while context null if context record Final Assignment variable final Reference break no need to keep going context context parent  recordSettingFinal VariableBinding finalReference FlowInfo flowInfo flowInfo isReachable FlowContext recordFinalAssignment finalReference
void remove Final Assignment If Any Reference reference default implementation do nothing  removeFinalAssignmentIfAny
public Sub Routine Statement sub Routine return null  SubRoutineStatement subRoutine
public String to String String Buffer buffer new String Buffer Flow Context current this int parents Count 0 while current current parent null parents Count Flow Context parents new Flow Context parents Count 1 current this int index parents Count while index 0 parents index current current current parent for int i 0 i parents Count i for int j 0 j i j buffer append t buffer append parents i individual To String append n buffer append for int j 0 j parents Count 1 j buffer append t buffer append individual To String append n return buffer to String  toString StringBuffer StringBuffer FlowContext parentsCount parentsCount FlowContext FlowContext parentsCount parentsCount parentsCount individualToString parentsCount individualToString toString

DEAD END reach Mode UNREACHABLE abstract public Flow Info add Initializations From Flow Info other Inits  DEAD_END reachMode FlowInfo addInitializationsFrom FlowInfo otherInits
abstract public Flow Info add Initializations From Flow Info other Inits abstract public Flow Info add Potential Initializations From Flow Info other Inits  FlowInfo addInitializationsFrom FlowInfo otherInits FlowInfo addPotentialInitializationsFrom FlowInfo otherInits
abstract public Flow Info add Potential Initializations From Flow Info other Inits public Flow Info as Negated Condition return this  FlowInfo addPotentialInitializationsFrom FlowInfo otherInits FlowInfo asNegatedCondition
public static Flow Info conditional Flow Info inits When True Flow Info inits When False if inits When True equals inits When False return inits When True could optimize if equals is defined return new Conditional Flow Info inits When True inits When False  FlowInfo FlowInfo initsWhenTrue FlowInfo initsWhenFalse initsWhenTrue initsWhenFalse initsWhenTrue ConditionalFlowInfo initsWhenTrue initsWhenFalse
abstract public Flow Info copy  FlowInfo
public static Unconditional Flow Info initial int max Field Count Unconditional Flow Info info new Unconditional Flow Info info max Field Count max Field Count return info  UnconditionalFlowInfo maxFieldCount UnconditionalFlowInfo UnconditionalFlowInfo maxFieldCount maxFieldCount
abstract public Flow Info inits When False  FlowInfo initsWhenFalse
abstract public Flow Info inits When False abstract public Flow Info inits When True  FlowInfo initsWhenFalse FlowInfo initsWhenTrue
abstract public Flow Info inits When True Check status of definite assignment for a field abstract public boolean is Definitely Assigned Field Binding field  FlowInfo initsWhenTrue isDefinitelyAssigned FieldBinding
abstract public boolean is Definitely Assigned Field Binding field Check status of definite assignment for a local public abstract boolean is Definitely Assigned Local Variable Binding local  isDefinitelyAssigned FieldBinding isDefinitelyAssigned LocalVariableBinding
abstract public int reach Mode Check status of potential assignment for a field abstract public boolean is Potentially Assigned Field Binding field  reachMode isPotentiallyAssigned FieldBinding
Check status of potential assignment for a local variable 
abstract public boolean is Potentially Assigned Local Variable Binding field abstract public boolean is Reachable  isPotentiallyAssigned LocalVariableBinding isReachable
abstract public boolean is Reachable Record a field got definitely assigned abstract public void mark As Definitely Assigned Field Binding field  isReachable markAsDefinitelyAssigned FieldBinding
abstract public void mark As Definitely Assigned Field Binding field Record a local got definitely assigned abstract public void mark As Definitely Assigned Local Variable Binding local  markAsDefinitelyAssigned FieldBinding markAsDefinitelyAssigned LocalVariableBinding
abstract public void mark As Definitely Assigned Local Variable Binding local Clear the initialization info for a field abstract public void mark As Definitely Not Assigned Field Binding field  markAsDefinitelyAssigned LocalVariableBinding markAsDefinitelyNotAssigned FieldBinding
abstract public void mark As Definitely Not Assigned Field Binding field Clear the initialization info for a local variable abstract public void mark As Definitely Not Assigned Local Variable Binding local  markAsDefinitelyNotAssigned FieldBinding markAsDefinitelyNotAssigned LocalVariableBinding
Merge branches using optimized boolean conditions public static Flow Info merged Optimized Branches Flow Info inits When True boolean is Optimized True Flow Info inits When False boolean is Optimized False boolean allow Fake Dead Branch Flow Info merged Info if is Optimized True if inits When True Flow Info DEAD END allow Fake Dead Branch merged Info inits When False set Reach Mode Flow Info UNREACHABLE else merged Info inits When True add Potential Initializations From inits When False else if is Optimized False if inits When False Flow Info DEAD END allow Fake Dead Branch merged Info inits When True set Reach Mode Flow Info UNREACHABLE else merged Info inits When False add Potential Initializations From inits When True else merged Info inits When True unconditional Inits merged With inits When False unconditional Inits return merged Info  FlowInfo mergedOptimizedBranches FlowInfo initsWhenTrue isOptimizedTrue FlowInfo initsWhenFalse isOptimizedFalse allowFakeDeadBranch FlowInfo mergedInfo isOptimizedTrue initsWhenTrue FlowInfo DEAD_END allowFakeDeadBranch mergedInfo initsWhenFalse setReachMode FlowInfo mergedInfo initsWhenTrue addPotentialInitializationsFrom initsWhenFalse isOptimizedFalse initsWhenFalse FlowInfo DEAD_END allowFakeDeadBranch mergedInfo initsWhenTrue setReachMode FlowInfo mergedInfo initsWhenFalse addPotentialInitializationsFrom initsWhenTrue mergedInfo initsWhenTrue unconditionalInits mergedWith initsWhenFalse unconditionalInits mergedInfo
abstract public int reach Mode  reachMode
abstract public int reach Mode abstract public Flow Info set Reach Mode int reach Mode  reachMode FlowInfo setReachMode reachMode
Returns the receiver updated in the following way ul li intersection of definitely assigned variables li union of potentially assigned variables ul 
public String to String if this DEAD END return Flow Info DEAD END NON NLS 1 return super to String  toString DEAD_END FlowInfo DEAD_END toString
abstract public Unconditional Flow Info unconditional Inits  UnconditionalFlowInfo unconditionalInits

public Initialization Flow Context Flow Context parent AST Node associated Node Block Scope scope super parent associated Node No Exceptions no exception allowed by default scope Flow Info DEAD END  InitializationFlowContext FlowContext ASTNode associatedNode BlockScope associatedNode NoExceptions FlowInfo DEAD_END
public void check Initializer Exceptions Block Scope current Scope Flow Context initializer Context Flow Info flow Info for int i 0 i exception Count i initializer Context check Exception Handlers thrown Exceptions i exception Throwers i exception Thrower Flow Infos i current Scope  checkInitializerExceptions BlockScope currentScope FlowContext initializerContext FlowInfo flowInfo exceptionCount initializerContext checkExceptionHandlers thrownExceptions exceptionThrowers exceptionThrowerFlowInfos currentScope
public String individual To String String Buffer buffer new String Buffer Initialization flow context NON NLS 1 for int i 0 i exception Count i buffer append append thrown Exceptions i readable Name buffer append append exception Thrower Flow Infos i to String append return buffer to String  individualToString StringBuffer StringBuffer exceptionCount thrownExceptions readableName exceptionThrowerFlowInfos toString toString
public void record Handling Exception Reference Binding exception Type Unconditional Flow Info flow Info Type Binding raised Exception AST Node invocation Site boolean was Masked even if unreachable code need to perform unhandled exception diagnosis int size thrown Exceptions length if exception Count size System arraycopy thrown Exceptions 0 thrown Exceptions new Type Binding size 2 0 size System arraycopy exception Throwers 0 exception Throwers new AST Node size 2 0 size System arraycopy exception Thrower Flow Infos 0 exception Thrower Flow Infos new Flow Info size 2 0 size thrown Exceptions exception Count raised Exception exception Throwers exception Count invocation Site exception Thrower Flow Infos exception Count flow Info copy  recordHandlingException ReferenceBinding exceptionType UnconditionalFlowInfo flowInfo TypeBinding raisedException ASTNode invocationSite wasMasked thrownExceptions exceptionCount thrownExceptions thrownExceptions TypeBinding exceptionThrowers exceptionThrowers ASTNode exceptionThrowerFlowInfos exceptionThrowerFlowInfos FlowInfo thrownExceptions exceptionCount raisedException exceptionThrowers exceptionCount invocationSite exceptionThrowerFlowInfos exceptionCount flowInfo

public Inside Sub Routine Flow Context Flow Context parent AST Node associated Node super parent associated Node this inits On Return Flow Info DEAD END  InsideSubRoutineFlowContext FlowContext ASTNode associatedNode associatedNode initsOnReturn FlowInfo DEAD_END
public String individual To String String Buffer buffer new String Buffer Inside Sub Routine flow context NON NLS 1 buffer append inits On Return append inits On Return to String append NON NLS 1 return buffer to String  individualToString StringBuffer StringBuffer SubRoutine initsOnReturn initsOnReturn toString toString
public Unconditional Flow Info inits On Return return this inits On Return  UnconditionalFlowInfo initsOnReturn initsOnReturn
public boolean is Non Returning Context return sub Routine is Sub Routine Escaping  isNonReturningContext subRoutine isSubRoutineEscaping
public Sub Routine Statement sub Routine return Sub Routine Statement associated Node  SubRoutineStatement subRoutine SubRoutineStatement associatedNode
public void record Return From Flow Info flow Info if flow Info is Reachable return if inits On Return Flow Info DEAD END inits On Return flow Info copy unconditional Inits else inits On Return inits On Return merged With flow Info copy unconditional Inits  recordReturnFrom FlowInfo flowInfo flowInfo isReachable initsOnReturn FlowInfo DEAD_END initsOnReturn flowInfo unconditionalInits initsOnReturn initsOnReturn mergedWith flowInfo unconditionalInits

public Label Flow Context Flow Context parent AST Node associated Node char label Name Label break Label Block Scope scope super parent associated Node break Label this label Name label Name check Label Validity scope  LabelFlowContext FlowContext ASTNode associatedNode labelName breakLabel BlockScope associatedNode breakLabel labelName labelName checkLabelValidity
void check Label Validity Block Scope scope check if label was already defined above Flow Context current parent while current null char current Label Name if current Label Name current label Name null Char Operation equals current Label Name label Name scope problem Reporter already Defined Label label Name associated Node current current parent  checkLabelValidity BlockScope FlowContext currentLabelName currentLabelName labelName CharOperation currentLabelName labelName problemReporter alreadyDefinedLabel labelName associatedNode
public String individual To String return Label flow context label String value Of label Name NON NLS 2 NON NLS 1  individualToString valueOf labelName
public char label Name return label Name  labelName labelName

public Looping Flow Context Flow Context parent AST Node associated Node Label break Label Label continue Label Scope associated Scope super parent associated Node break Label this continue Label continue Label this associated Scope associated Scope  LoopingFlowContext FlowContext ASTNode associatedNode breakLabel continueLabel associatedScope associatedNode breakLabel continueLabel continueLabel associatedScope associatedScope
public void complain On Final Assignments In Loop Block Scope scope Flow Info flow Info for int i 0 i assign Count i Variable Binding variable final Variables i if variable null continue boolean complained false remember if have complained on this final assignment if variable instanceof Field Binding if flow Info is Potentially Assigned Field Binding variable complained true scope problem Reporter duplicate Initialization Of Blank Final Field Field Binding variable final Assignments i else if flow Info is Potentially Assigned Local Variable Binding variable complained true scope problem Reporter duplicate Initialization Of Final Local Local Variable Binding variable final Assignments i any reference reported at this level is removed from the parent context where it could also be reported again if complained Flow Context context parent while context null context remove Final Assignment If Any final Assignments i context context parent  complainOnFinalAssignmentsInLoop BlockScope FlowInfo flowInfo assignCount VariableBinding finalVariables FieldBinding flowInfo isPotentiallyAssigned FieldBinding problemReporter duplicateInitializationOfBlankFinalField FieldBinding finalAssignments flowInfo isPotentiallyAssigned LocalVariableBinding problemReporter duplicateInitializationOfFinalLocal LocalVariableBinding finalAssignments FlowContext removeFinalAssignmentIfAny finalAssignments
public Label continue Label return continue Label  continueLabel continueLabel
public String individual To String String Buffer buffer new String Buffer Looping flow context NON NLS 1 buffer append inits On Break append inits On Break to String append NON NLS 1 buffer append inits On Continue append inits On Continue to String append NON NLS 1 return buffer to String  individualToString StringBuffer StringBuffer initsOnBreak initsOnBreak toString initsOnContinue initsOnContinue toString toString
public boolean is Continuable return true  isContinuable
public boolean is Continued To return inits On Continue Flow Info DEAD END  isContinuedTo initsOnContinue FlowInfo DEAD_END
public void record Continue From Flow Info flow Info if flow Info is Reachable return if inits On Continue Flow Info DEAD END inits On Continue flow Info copy unconditional Inits else inits On Continue inits On Continue merged With flow Info copy unconditional Inits  recordContinueFrom FlowInfo flowInfo flowInfo isReachable initsOnContinue FlowInfo DEAD_END initsOnContinue flowInfo unconditionalInits initsOnContinue initsOnContinue mergedWith flowInfo unconditionalInits
boolean record Final Assignment Variable Binding binding Reference final Assignment do not consider variables which are defined inside this loop if binding instanceof Local Variable Binding Scope scope Local Variable Binding binding declaring Scope while scope scope parent null if scope associated Scope return false if assign Count 0 final Assignments new Reference 5 final Variables new Variable Binding 5 else if assign Count final Assignments length System arraycopy final Assignments 0 final Assignments new Reference assign Count 2 0 assign Count System arraycopy final Variables 0 final Variables new Variable Binding assign Count 2 0 assign Count final Assignments assign Count final Assignment final Variables assign Count binding return true  recordFinalAssignment VariableBinding finalAssignment LocalVariableBinding LocalVariableBinding declaringScope associatedScope assignCount finalAssignments finalVariables VariableBinding assignCount finalAssignments finalAssignments finalAssignments assignCount assignCount finalVariables finalVariables VariableBinding assignCount assignCount finalAssignments assignCount finalAssignment finalVariables assignCount
void remove Final Assignment If Any Reference reference for int i 0 i assign Count i if final Assignments i reference final Assignments i null final Variables i null return  removeFinalAssignmentIfAny assignCount finalAssignments finalAssignments finalVariables

public Switch Flow Context Flow Context parent AST Node associated Node Label break Label super parent associated Node this break Label break Label  SwitchFlowContext FlowContext ASTNode associatedNode breakLabel associatedNode breakLabel breakLabel
public Label break Label return break Label  breakLabel breakLabel
public String individual To String String Buffer buffer new String Buffer Switch flow context NON NLS 1 buffer append inits On Break append inits On Break to String append NON NLS 1 return buffer to String  individualToString StringBuffer StringBuffer initsOnBreak initsOnBreak toString toString
public boolean is Breakable return true  isBreakable
public void record Break From Flow Info flow Info if inits On Break Flow Info DEAD END inits On Break flow Info copy unconditional Inits else inits On Break inits On Break merged With flow Info copy unconditional Inits  recordBreakFrom FlowInfo flowInfo initsOnBreak FlowInfo DEAD_END initsOnBreak flowInfo unconditionalInits initsOnBreak initsOnBreak mergedWith flowInfo unconditionalInits

public static final int Bit Cache Size 64 64 bits in a long Unconditional Flow Info this reach Mode REACHABLE  BitCacheSize UnconditionalFlowInfo reachMode
unions of both sets of initialization used for try finally public Flow Info add Initializations From Flow Info inits if this DEAD END return this Unconditional Flow Info other Inits inits unconditional Inits if other Inits DEAD END return this union of definitely assigned variables definite Inits other Inits definite Inits union of potentially set ones potential Inits other Inits potential Inits treating extra storage if extra Definite Inits null if other Inits extra Definite Inits null both sides have extra storage int i 0 length other Length if length extra Definite Inits length other Length other Inits extra Definite Inits length current storage is shorter grow current could maybe reuse other Inits extra storage System arraycopy extra Definite Inits 0 extra Definite Inits new long other Length 0 length System arraycopy extra Potential Inits 0 extra Potential Inits new long other Length 0 length while i length extra Definite Inits i other Inits extra Definite Inits i extra Potential Inits i other Inits extra Potential Inits i while i other Length extra Potential Inits i other Inits extra Potential Inits i else current storage is longer while i other Length extra Definite Inits i other Inits extra Definite Inits i extra Potential Inits i other Inits extra Potential Inits i while i length extra Definite Inits i 0 else no extra storage on other Inits else if other Inits extra Definite Inits null no storage here but other has extra storage int other Length System arraycopy other Inits extra Definite Inits 0 extra Definite Inits new long other Length other Inits extra Definite Inits length 0 other Length System arraycopy other Inits extra Potential Inits 0 extra Potential Inits new long other Length 0 other Length return this  FlowInfo addInitializationsFrom FlowInfo DEAD_END UnconditionalFlowInfo otherInits unconditionalInits otherInits DEAD_END definiteInits otherInits definiteInits potentialInits otherInits potentialInits extraDefiniteInits otherInits extraDefiniteInits otherLength extraDefiniteInits otherLength otherInits extraDefiniteInits otherInits extraDefiniteInits extraDefiniteInits otherLength extraPotentialInits extraPotentialInits otherLength extraDefiniteInits otherInits extraDefiniteInits extraPotentialInits otherInits extraPotentialInits otherLength extraPotentialInits otherInits extraPotentialInits otherLength extraDefiniteInits otherInits extraDefiniteInits extraPotentialInits otherInits extraPotentialInits extraDefiniteInits otherInits otherInits extraDefiniteInits otherLength otherInits extraDefiniteInits extraDefiniteInits otherLength otherInits extraDefiniteInits otherLength otherInits extraPotentialInits extraPotentialInits otherLength otherLength
unions of both sets of initialization used for try finally public Flow Info add Potential Initializations From Flow Info inits if this DEAD END return this Unconditional Flow Info other Inits inits unconditional Inits if other Inits DEAD END return this union of potentially set ones potential Inits other Inits potential Inits treating extra storage if extra Definite Inits null if other Inits extra Definite Inits null both sides have extra storage int i 0 length other Length if length extra Definite Inits length other Length other Inits extra Definite Inits length current storage is shorter grow current could maybe reuse other Inits extra storage System arraycopy extra Definite Inits 0 extra Definite Inits new long other Length 0 length System arraycopy extra Potential Inits 0 extra Potential Inits new long other Length 0 length while i length extra Potential Inits i other Inits extra Potential Inits i while i other Length extra Potential Inits i other Inits extra Potential Inits i else current storage is longer while i other Length extra Potential Inits i other Inits extra Potential Inits i else if other Inits extra Definite Inits null no storage here but other has extra storage int other Length extra Definite Inits new long other Length other Inits extra Definite Inits length System arraycopy other Inits extra Potential Inits 0 extra Potential Inits new long other Length 0 other Length return this  FlowInfo addPotentialInitializationsFrom FlowInfo DEAD_END UnconditionalFlowInfo otherInits unconditionalInits otherInits DEAD_END potentialInits otherInits potentialInits extraDefiniteInits otherInits extraDefiniteInits otherLength extraDefiniteInits otherLength otherInits extraDefiniteInits otherInits extraDefiniteInits extraDefiniteInits otherLength extraPotentialInits extraPotentialInits otherLength extraPotentialInits otherInits extraPotentialInits otherLength extraPotentialInits otherInits extraPotentialInits otherLength extraPotentialInits otherInits extraPotentialInits otherInits extraDefiniteInits otherLength extraDefiniteInits otherLength otherInits extraDefiniteInits otherInits extraPotentialInits extraPotentialInits otherLength otherLength
Answers a copy of the current instance public Flow Info copy do not clone the Dead End if this DEAD END return this look for an unused preallocated object Unconditional Flow Info copy new Unconditional Flow Info copy slots copy definite Inits this definite Inits copy potential Inits this potential Inits copy reach Mode this reach Mode copy max Field Count this max Field Count if this extra Definite Inits null int length System arraycopy this extra Definite Inits 0 copy extra Definite Inits new long length extra Definite Inits length 0 length System arraycopy this extra Potential Inits 0 copy extra Potential Inits new long length 0 length return copy  FlowInfo DeadEnd DEAD_END UnconditionalFlowInfo UnconditionalFlowInfo definiteInits definiteInits potentialInits potentialInits reachMode reachMode maxFieldCount maxFieldCount extraDefiniteInits extraDefiniteInits extraDefiniteInits extraDefiniteInits extraPotentialInits extraPotentialInits
public Unconditional Flow Info discard Field Initializations int limit this max Field Count if limit Bit Cache Size long mask 1L limit 1 this definite Inits mask this potential Inits mask return this this definite Inits 0 this potential Inits 0 use extra vector if extra Definite Inits null return this if vector not yet allocated then not initialized int vector Index length this extra Definite Inits length if vector Index limit Bit Cache Size 1 length return this not enough room yet for int i 0 i vector Index i this extra Definite Inits i 0L this extra Potential Inits i 0L long mask 1L limit Bit Cache Size 1 this extra Definite Inits vector Index mask this extra Potential Inits vector Index mask return this  UnconditionalFlowInfo discardFieldInitializations maxFieldCount BitCacheSize definiteInits potentialInits definiteInits potentialInits extraDefiniteInits vectorIndex extraDefiniteInits vectorIndex BitCacheSize vectorIndex extraDefiniteInits extraPotentialInits BitCacheSize extraDefiniteInits vectorIndex extraPotentialInits vectorIndex
public Unconditional Flow Info discard Non Field Initializations int limit this max Field Count if limit Bit Cache Size long mask 1L limit 1 this definite Inits mask this potential Inits mask return this use extra vector if extra Definite Inits null return this if vector not yet allocated then not initialized int vector Index length this extra Definite Inits length if vector Index limit Bit Cache Size 1 length return this not enough room yet long mask 1L limit Bit Cache Size 1 this extra Definite Inits vector Index mask this extra Potential Inits vector Index mask for int i vector Index 1 i length i this extra Definite Inits i 0L this extra Potential Inits i 0L return this  UnconditionalFlowInfo discardNonFieldInitializations maxFieldCount BitCacheSize definiteInits potentialInits extraDefiniteInits vectorIndex extraDefiniteInits vectorIndex BitCacheSize BitCacheSize extraDefiniteInits vectorIndex extraPotentialInits vectorIndex vectorIndex extraDefiniteInits extraPotentialInits
public Flow Info inits When False return this  FlowInfo initsWhenFalse
public Flow Info inits When True return this  FlowInfo initsWhenTrue
Check status of definite assignment at a given position It deals with the dual representation of the Initialization Info2 bits for the first 64 entries then an array of booleans final private boolean is Definitely Assigned int position Dependant of Code Stream is Definitely Assigned id is zero based if position Bit Cache Size return definite Inits 1L position 0 use bits use extra vector if extra Definite Inits null return false if vector not yet allocated then not initialized int vector Index if vector Index position Bit Cache Size 1 extra Definite Inits length return false if not enough room in vector then not initialized return extra Definite Inits vector Index 1L position Bit Cache Size 0  InitializationInfo2 isDefinitelyAssigned CodeStream isDefinitelyAssigned BitCacheSize definiteInits extraDefiniteInits vectorIndex vectorIndex BitCacheSize extraDefiniteInits extraDefiniteInits vectorIndex BitCacheSize
Check status of definite assignment for a field final public boolean is Definitely Assigned Field Binding field Dependant of Code Stream is Definitely Assigned We do not want to complain in unreachable code if this reach Mode UNREACHABLE 0 return true return is Definitely Assigned field id  isDefinitelyAssigned FieldBinding CodeStream isDefinitelyAssigned reachMode isDefinitelyAssigned
Check status of definite assignment for a local final public boolean is Definitely Assigned Local Variable Binding local Dependant of Code Stream is Definitely Assigned We do not want to complain in unreachable code if this reach Mode UNREACHABLE 0 return true if local is Argument return true final constants are inlined and thus considered as always initialized if local constant Constant NotA Constant return true return is Definitely Assigned local id max Field Count  isDefinitelyAssigned LocalVariableBinding CodeStream isDefinitelyAssigned reachMode isArgument NotAConstant isDefinitelyAssigned maxFieldCount
public boolean is Reachable return this reach Mode REACHABLE  isReachable reachMode
Check status of potential assignment at a given position It deals with the dual representation of the Initialization Info3 bits for the first 64 entries then an array of booleans final private boolean is Potentially Assigned int position id is zero based if position Bit Cache Size use bits return potential Inits 1L position 0 use extra vector if extra Potential Inits null return false if vector not yet allocated then not initialized int vector Index if vector Index position Bit Cache Size 1 extra Potential Inits length return false if not enough room in vector then not initialized return extra Potential Inits vector Index 1L position Bit Cache Size 0  InitializationInfo3 isPotentiallyAssigned BitCacheSize potentialInits extraPotentialInits vectorIndex vectorIndex BitCacheSize extraPotentialInits extraPotentialInits vectorIndex BitCacheSize
Check status of definite assignment for a field final public boolean is Potentially Assigned Field Binding field return is Potentially Assigned field id  isPotentiallyAssigned FieldBinding isPotentiallyAssigned
Check status of potential assignment for a local final public boolean is Potentially Assigned Local Variable Binding local if local is Argument return true final constants are inlined and thus considered as always initialized if local constant Constant NotA Constant return true return is Potentially Assigned local id max Field Count  isPotentiallyAssigned LocalVariableBinding isArgument NotAConstant isPotentiallyAssigned maxFieldCount
Record a definite assignment at a given position It deals with the dual representation of the Initialization Info2 bits for the first 64 entries then an array of booleans final private void mark As Definitely Assigned int position if this DEAD END position is zero based if position Bit Cache Size use bits long mask definite Inits mask 1L position potential Inits mask else use extra vector int vector Index position Bit Cache Size 1 if extra Definite Inits null int length extra Definite Inits new long length vector Index 1 extra Potential Inits new long length else int old Length might need to grow the arrays if vector Index old Length extra Definite Inits length System arraycopy extra Definite Inits 0 extra Definite Inits new long vector Index 1 0 old Length System arraycopy extra Potential Inits 0 extra Potential Inits new long vector Index 1 0 old Length long mask extra Definite Inits vector Index mask 1L position Bit Cache Size extra Potential Inits vector Index mask  InitializationInfo2 markAsDefinitelyAssigned DEAD_END BitCacheSize definiteInits potentialInits vectorIndex BitCacheSize extraDefiniteInits extraDefiniteInits vectorIndex extraPotentialInits oldLength vectorIndex oldLength extraDefiniteInits extraDefiniteInits extraDefiniteInits vectorIndex oldLength extraPotentialInits extraPotentialInits vectorIndex oldLength extraDefiniteInits vectorIndex BitCacheSize extraPotentialInits vectorIndex
Record a field got definitely assigned public void mark As Definitely Assigned Field Binding field if this DEAD END mark As Definitely Assigned field id  markAsDefinitelyAssigned FieldBinding DEAD_END markAsDefinitelyAssigned
Record a local got definitely assigned public void mark As Definitely Assigned Local Variable Binding local if this DEAD END mark As Definitely Assigned local id max Field Count  markAsDefinitelyAssigned LocalVariableBinding DEAD_END markAsDefinitelyAssigned maxFieldCount
Clear initialization information at a given position It deals with the dual representation of the Initialization Info2 bits for the first 64 entries then an array of booleans final private void mark As Definitely Not Assigned int position if this DEAD END position is zero based if position Bit Cache Size use bits long mask definite Inits mask 1L position potential Inits mask else use extra vector int vector Index position Bit Cache Size 1 if extra Definite Inits null return nothing to do it was not yet set might need to grow the arrays if vector Index extra Definite Inits length return nothing to do it was not yet set long mask extra Definite Inits vector Index mask 1L position Bit Cache Size extra Potential Inits vector Index mask  InitializationInfo2 markAsDefinitelyNotAssigned DEAD_END BitCacheSize definiteInits potentialInits vectorIndex BitCacheSize extraDefiniteInits vectorIndex extraDefiniteInits extraDefiniteInits vectorIndex BitCacheSize extraPotentialInits vectorIndex
Clear the initialization info for a field public void mark As Definitely Not Assigned Field Binding field if this DEAD END mark As Definitely Not Assigned field id  markAsDefinitelyNotAssigned FieldBinding DEAD_END markAsDefinitelyNotAssigned
Clear the initialization info for a local variable public void mark As Definitely Not Assigned Local Variable Binding local if this DEAD END mark As Definitely Not Assigned local id max Field Count  markAsDefinitelyNotAssigned LocalVariableBinding DEAD_END markAsDefinitelyNotAssigned maxFieldCount
Returns the receiver updated in the following way ul li intersection of definitely assigned variables li union of potentially assigned variables ul public Unconditional Flow Info merged With Unconditional Flow Info other Inits if this DEAD END return other Inits if other Inits DEAD END return this if this reach Mode UNREACHABLE other Inits reach Mode UNREACHABLE if this reach Mode UNREACHABLE 0 return other Inits return this if one branch is not fake reachable then the merged one is reachable this reach Mode other Inits reach Mode intersection of definitely assigned variables this definite Inits other Inits definite Inits union of potentially set ones this potential Inits other Inits potential Inits treating extra storage if this extra Definite Inits null if other Inits extra Definite Inits null both sides have extra storage int i 0 length other Length if length this extra Definite Inits length other Length other Inits extra Definite Inits length current storage is shorter grow current could maybe reuse other Inits extra storage System arraycopy this extra Definite Inits 0 this extra Definite Inits new long other Length 0 length System arraycopy this extra Potential Inits 0 this extra Potential Inits new long other Length 0 length while i length this extra Definite Inits i other Inits extra Definite Inits i this extra Potential Inits i other Inits extra Potential Inits i while i other Length this extra Potential Inits i other Inits extra Potential Inits i else current storage is longer while i other Length this extra Definite Inits i other Inits extra Definite Inits i this extra Potential Inits i other Inits extra Potential Inits i while i length this extra Definite Inits i 0 else no extra storage on other Inits int i 0 length this extra Definite Inits length while i length this extra Definite Inits i 0 else if other Inits extra Definite Inits null no storage here but other has extra storage int other Length this extra Definite Inits new long other Length other Inits extra Definite Inits length System arraycopy other Inits extra Potential Inits 0 this extra Potential Inits new long other Length 0 other Length return this  UnconditionalFlowInfo mergedWith UnconditionalFlowInfo otherInits DEAD_END otherInits otherInits DEAD_END reachMode otherInits reachMode reachMode otherInits reachMode otherInits reachMode definiteInits otherInits definiteInits potentialInits otherInits potentialInits extraDefiniteInits otherInits extraDefiniteInits otherLength extraDefiniteInits otherLength otherInits extraDefiniteInits otherInits extraDefiniteInits extraDefiniteInits otherLength extraPotentialInits extraPotentialInits otherLength extraDefiniteInits otherInits extraDefiniteInits extraPotentialInits otherInits extraPotentialInits otherLength extraPotentialInits otherInits extraPotentialInits otherLength extraDefiniteInits otherInits extraDefiniteInits extraPotentialInits otherInits extraPotentialInits extraDefiniteInits otherInits extraDefiniteInits extraDefiniteInits otherInits extraDefiniteInits otherLength extraDefiniteInits otherLength otherInits extraDefiniteInits otherInits extraPotentialInits extraPotentialInits otherLength otherLength
static int number Of Enclosing Fields Reference Binding type int count 0 type type enclosing Type while type null count type field Count type type enclosing Type return count  numberOfEnclosingFields ReferenceBinding enclosingType fieldCount enclosingType
public int reach Mode return this reach Mode  reachMode reachMode
public Flow Info set Reach Mode int reach Mode if this DEAD END return this cannot modify DEAD END reset optional inits when becoming unreachable if this reach Mode UNREACHABLE 0 reach Mode UNREACHABLE 0 this potential Inits 0 if this extra Potential Inits null for int i 0 length this extra Potential Inits length i length i this extra Potential Inits i 0 this reach Mode reach Mode return this  FlowInfo setReachMode reachMode DEAD_END DEAD_END reachMode reachMode potentialInits extraPotentialInits extraPotentialInits extraPotentialInits reachMode reachMode
public String to String if this DEAD END return Flow Info DEAD END NON NLS 1 return Flow Info def this definite Inits NON NLS 1 pot this potential Inits NON NLS 1 reachable this reach Mode UNREACHABLE 0 NON NLS 1 NON NLS 1  toString DEAD_END FlowInfo DEAD_END FlowInfo definiteInits potentialInits reachMode
public Unconditional Flow Info unconditional Inits also see conditional inits where it requests them to merge return this  UnconditionalFlowInfo unconditionalInits

public interface I Compiler Requestor Accept a compilation result public void accept Result Compilation Result result  ICompilerRequestor acceptResult CompilationResult

original compiler requestor and should be prohibited void accept Debug Result Compilation Result result  acceptDebugResult CompilationResult
Answers true when in active mode boolean is Active  isActive
Activate debug callbacks void activate 
Deactivate debug callbacks void deactivate 
Reset debug requestor after compilation has finished void reset 

public interface I Document Element Requestor param declaration Start a source position corresponding to the start of the package declaration param declaration End a source position corresponding to the end of the package declaration param java Doc Positions answer back an array of source Start source End positions of the available Java Doc comments The array is a flattened structure 2 n entries with consecutives start and end positions If no Java Doc is available then null is answered instead of an empty array e g 10 20 25 45 javadoc1 from 10 to 20 javadoc2 from 25 to 45 The array is equals to null if there are no javadoc comments param name the name of the package param name Start Position a source position corresponding to the first character of the name param on Demand a boolean equals to true if the import is an import on demand void accept Import int declaration Start int declaration End int java Doc Positions char name int name Start Position  IDocumentElementRequestor declarationStart declarationEnd javaDocPositions sourceStart sourceEnd JavaDoc JavaDoc nameStartPosition onDemand acceptImport declarationStart declarationEnd javaDocPositions nameStartPosition
boolean on Demand param declaration Start a source position corresponding to the start of the package declaration param declaration End a source position corresponding to the end of the package declaration param java Doc Positions answer back an array of source Start source End positions of the available Java Doc comments The array is a flattened structure 2 n entries with consecutives start and end positions If no Java Doc is available then null is answered instead of an empty array e g 10 20 25 45 javadoc1 from 10 to 20 javadoc2 from 25 to 45 The array is equals to null if there are no javadoc comments param modifiers the modifiers for this initializer param modifiers Start a source position corresponding to the start of the textual modifiers is 0 if there are no textual modifiers param body Start the position of the param body End the position of the void accept Initializer int declaration Start int declaration End int java Doc Positions int modifiers int modifiers Start int body Start  onDemand declarationStart declarationEnd javaDocPositions sourceStart sourceEnd JavaDoc JavaDoc modifiersStart bodyStart bodyEnd acceptInitializer declarationStart declarationEnd javaDocPositions modifiersStart bodyStart
void accept Line Separator Positions int positions  acceptLineSeparatorPositions
void accept Line Separator Positions int positions param declaration Start a source position corresponding to the start of the package declaration param declaration End a source position corresponding to the end of the package declaration param java Doc Positions answer back an array of source Start source End positions of the available Java Doc comments The array is a flattened structure 2 n entries with consecutives start and end positions If no Java Doc is available then null is answered instead of an empty array e g 10 20 25 45 javadoc1 from 10 to 20 javadoc2 from 25 to 45 The array is equals to null if there are no javadoc comments param name the name of the package param name Start Position a source position corresponding to the first character of the name void accept Package int declaration Start int declaration End int java Doc Positions char name  acceptLineSeparatorPositions declarationStart declarationEnd javaDocPositions sourceStart sourceEnd JavaDoc JavaDoc nameStartPosition acceptPackage declarationStart declarationEnd javaDocPositions
char name int name Start Position param problem Used to report a problem while running the JDOM void accept Problem I Problem problem  nameStartPosition acceptProblem IProblem
void accept Problem I Problem problem param declaration Start a source position corresponding to the start of this class param java Doc Positions answer back an array of source Start source End positions of the available Java Doc comments The array is a flattened structure 2 n entries with consecutives start and end positions If no Java Doc is available then null is answered instead of an empty array e g 10 20 25 45 javadoc1 from 10 to 20 javadoc2 from 25 to 45 The array is equals to null if there are no javadoc comments param modifiers the modifiers for this class param modifiers Start a source position corresponding to the start of the textual modifiers is 0 if there are no textual modifiers param class Start a source position corresponding to the start of the keyword class param name the name of the class param name Start a source position corresponding to the start of the name param name End a source position corresponding to the end of the name param superclass the name of the superclass param superclass Start a source position corresponding to the start of the superclass name param superclass End a source position corresponding to the end of the superclass name param superinterfaces the name of the superinterfaces param superinterface Starts an array of source positions corresponding to the start of their respective superinterface names param superinterface Ends an array of source positions corresponding to the end of their respective superinterface names param body Start a source position corresponding to the open bracket of the class body void enter Class int declaration Start int java Doc Positions int modifiers int modifiers Start int class Start char name int name Start int name End char superclass int superclass Start int superclass End char superinterfaces int superinterface Starts int superinterface Ends  acceptProblem IProblem declarationStart javaDocPositions sourceStart sourceEnd JavaDoc JavaDoc modifiersStart classStart nameStart nameEnd superclassStart superclassEnd superinterfaceStarts superinterfaceEnds bodyStart enterClass declarationStart javaDocPositions modifiersStart classStart nameStart nameEnd superclassStart superclassEnd superinterfaceStarts superinterfaceEnds
int superinterface Ends int body Start void enter Compilation Unit  superinterfaceEnds bodyStart enterCompilationUnit
void enter Compilation Unit param declaration Start a source position corresponding to the first character of this constructor declaration param java Doc Positions answer back an array of source Start source End positions of the available Java Doc comments The array is a flattened structure 2 n entries with consecutives start and end positions If no Java Doc is available then null is answered instead of an empty array e g 10 20 25 45 javadoc1 from 10 to 20 javadoc2 from 25 to 45 The array is equals to null if there are no javadoc comments param modifiers the modifiers for this constructor converted to a flag param modifiers Start a source position corresponding to the first character of the textual modifiers param name the name of this constructor param name Start a source position corresponding to the first character of the name param name End a source position corresponding to the last character of the name param parameter Types a list of parameter type names param parameter Type Starts a list of source positions corresponding to the first character of each parameter type name param parameter Type Ends a list of source positions corresponding to the last character of each parameter type name param parameter Names a list of the names of the parameters param parameters End a source position corresponding to the last character of the parameter list param exception Types a list of the exception types param exception Type Starts a list of source positions corresponding to the first character of the respective exception types param exception Type Ends a list of source positions corresponding to the last character of the respective exception types param body Start a source position corresponding to the start of this constructor s body void enter Constructor int declaration Start int java Doc Positions int modifiers int modifiers Start char name int name Start int name End char parameter Types int parameter Type Starts int parameter Type Ends char parameter Names int parameter Name Starts int parameter Name Ends int parameters End char exception Types int exception Type Starts int exception Type Ends  enterCompilationUnit declarationStart javaDocPositions sourceStart sourceEnd JavaDoc JavaDoc modifiersStart nameStart nameEnd parameterTypes parameterTypeStarts parameterTypeEnds parameterNames parametersEnd exceptionTypes exceptionTypeStarts exceptionTypeEnds bodyStart enterConstructor declarationStart javaDocPositions modifiersStart nameStart nameEnd parameterTypes parameterTypeStarts parameterTypeEnds parameterNames parameterNameStarts parameterNameEnds parametersEnd exceptionTypes exceptionTypeStarts exceptionTypeEnds
int body Start param declaration Start a source position corresponding to the first character of this field param java Doc Positions answer back an array of source Start source End positions of the available Java Doc comments The array is a flattened structure 2 n entries with consecutives start and end positions If no Java Doc is available then null is answered instead of an empty array e g 10 20 25 45 javadoc1 from 10 to 20 javadoc2 from 25 to 45 The array is equals to null if there are no javadoc comments param modifiers the modifiers for this field converted to a flag param modifiers Start a source position corresponding to the first character of the textual modifiers param type the name of the field type param type Start a source position corresponding to the start of the fields type param type End a source position corresponding to the end of the fields type param type Dimension Count the array dimension indicated on the type for example int v param name the name of this constructor param name Start a source position corresponding to the first character of the name param name End a source position corresponding to the last character of the name param extended Type Dimension Count the array dimension indicated on the variable for example int v param extended Type Dimension End a source position corresponding to the end of the extened type dimension This position should be 1 in case there is no extended dimension for the type void enter Field int declaration Start int java Doc Positions int modifiers int modifiers Start char type int type Start int type End int type Dimension Count char name int name Start int name End int extended Type Dimension Count  bodyStart declarationStart javaDocPositions sourceStart sourceEnd JavaDoc JavaDoc modifiersStart typeStart typeEnd typeDimensionCount nameStart nameEnd extendedTypeDimensionCount extendedTypeDimensionEnd enterField declarationStart javaDocPositions modifiersStart typeStart typeEnd typeDimensionCount nameStart nameEnd extendedTypeDimensionCount
int extended Type Dimension End param declaration Start a source position corresponding to the start of this class param java Doc Positions answer back an array of source Start source End positions of the available Java Doc comments The array is a flattened structure 2 n entries with consecutives start and end positions If no Java Doc is available then null is answered instead of an empty array e g 10 20 25 45 javadoc1 from 10 to 20 javadoc2 from 25 to 45 The array is equals to null if there are no javadoc comments param modifiers the modifiers for this class param modifiers Start a source position corresponding to the start of the textual modifiers is 0 if there are no textual modifiers param interface Start a source position corresponding to the start of the keyword interface param name the name of the class param name Start a source position corresponding to the start of the name param name End a source position corresponding to the end of the name param superinterfaces the name of the superinterfaces param superinterface Starts an array of source positions corresponding to the start of their respective superinterface names param superinterface Ends an array of source positions corresponding to the end of their respective superinterface names param body Start a source position corresponding to the open bracket of the class body void enter Interface int declaration Start int java Doc Positions int modifiers int modifiers Start int interface Start char name int name Start int name End char superinterfaces int superinterface Starts int superinterface Ends  extendedTypeDimensionEnd declarationStart javaDocPositions sourceStart sourceEnd JavaDoc JavaDoc modifiersStart interfaceStart nameStart nameEnd superinterfaceStarts superinterfaceEnds bodyStart enterInterface declarationStart javaDocPositions modifiersStart interfaceStart nameStart nameEnd superinterfaceStarts superinterfaceEnds
int body Start param declaration Start a source position corresponding to the first character of this constructor declaration param java Doc Positions answer back an array of source Start source End positions of the available Java Doc comments The array is a flattened structure 2 n entries with consecutives start and end positions If no Java Doc is available then null is answered instead of an empty array e g 10 20 25 45 javadoc1 from 10 to 20 javadoc2 from 25 to 45 The array is equals to null if there are no javadoc comments param modifiers the modifiers for this constructor converted to a flag param modifiers Start a source position corresponding to the first character of the textual modifiers param return Type the name of the return type param return Type Start a source position corresponding to the first character of the return type param return Type End a source position corresponding to the last character of the return type param return Type Dimension Count the array dimension count as supplied on the return type for example public int foo param name the name of this constructor param name Start a source position corresponding to the first character of the name param name End a source position corresponding to the last character of the name param parameter Types a list of parameter type names param parameter Type Starts a list of source positions corresponding to the first character of each parameter type name param parameter Type Ends a list of source positions corresponding to the last character of each parameter type name param parameter Names a list of the names of the parameters param parameters End a source position corresponding to the last character of the parameter list param extended Return Type Dimension Count the array dimension count as supplied on the end of the parameter list for example public int foo param extended Return Type Dimension End a source position corresponding to the last character of the extended return type dimension This position should be 1 in case there is no extended dimension for the type param exception Types a list of the exception types param exception Type Starts a list of source positions corresponding to the first character of the respective exception types param exception Type Ends a list of source positions corresponding to the last character of the respective exception types param body Start a source position corresponding to the start of this method s body void enter Method int declaration Start int java Doc Positions int modifiers int modifiers Start char return Type int return Type Start int return Type End int return Type Dimension Count char name int name Start int name End char parameter Types int parameter Type Starts int parameter Type Ends char parameter Names int parameter Name Starts int parameter Name Ends int parameters End int extended Return Type Dimension Count int extended Return Type Dimension End char exception Types int exception Type Starts int exception Type Ends  bodyStart declarationStart javaDocPositions sourceStart sourceEnd JavaDoc JavaDoc modifiersStart returnType returnTypeStart returnTypeEnd returnTypeDimensionCount nameStart nameEnd parameterTypes parameterTypeStarts parameterTypeEnds parameterNames parametersEnd extendedReturnTypeDimensionCount extendedReturnTypeDimensionEnd exceptionTypes exceptionTypeStarts exceptionTypeEnds bodyStart enterMethod declarationStart javaDocPositions modifiersStart returnType returnTypeStart returnTypeEnd returnTypeDimensionCount nameStart nameEnd parameterTypes parameterTypeStarts parameterTypeEnds parameterNames parameterNameStarts parameterNameEnds parametersEnd extendedReturnTypeDimensionCount extendedReturnTypeDimensionEnd exceptionTypes exceptionTypeStarts exceptionTypeEnds
int body Start param body End a source position corresponding to the closing bracket of the class param declaration End a source position corresponding to the end of the class declaration This can include whitespace and comments following the closing bracket void exit Class int body End  bodyStart bodyEnd declarationEnd exitClass bodyEnd
int declaration End param declaration End a source position corresponding to the end of the compilation unit void exit Compilation Unit  declarationEnd declarationEnd exitCompilationUnit
int declaration End param body End a source position corresponding to the closing bracket of the method param declaration End a source position corresponding to the end of the method declaration This can include whitespace and comments following the closing bracket void exit Constructor int body End  declarationEnd bodyEnd declarationEnd exitConstructor bodyEnd
int declaration End param body End a source position corresponding to the end of the field param declaration End a source position corresponding to the end of the field This can include whitespace and comments following the semi colon void exit Field int body End  declarationEnd bodyEnd declarationEnd exitField bodyEnd
int declaration End param body End a source position corresponding to the closing bracket of the interface param declaration End a source position corresponding to the end of the interface declaration This can include whitespace and comments following the closing bracket void exit Interface int body End  declarationEnd bodyEnd declarationEnd exitInterface bodyEnd
int declaration End param body End a source position corresponding to the closing bracket of the method param declaration End a source position corresponding to the end of the method declaration This can include whitespace and comments following the closing bracket void exit Method int body End  declarationEnd bodyEnd declarationEnd exitMethod bodyEnd

public interface I Error Handling Policy boolean proceed On Errors  IErrorHandlingPolicy proceedOnErrors
public interface I Error Handling Policy boolean proceed On Errors boolean stop On First Error  IErrorHandlingPolicy proceedOnErrors stopOnFirstError

boolean value public Boolean Constant boolean value this value value  BooleanConstant
public boolean boolean Value return value  booleanValue
public String string Value spec 15 17 11 String s Util to Boolean value to String if s null return null NON NLS 1 return s  stringValue toBoolean toString
public String to String return boolean value NON NLS 1  toString
public int typeID return T boolean  T_boolean

public class Byte Constant extends Constant byte value public Byte Constant byte value this value value  ByteConstant ByteConstant
this value value public byte byte Value return this value  byteValue
return this value public char char Value return char value  charValue
return char value public double double Value return value implicit cast to return type  doubleValue
return value implicit cast to return type public float float Value return value implicit cast to return type  floatValue
return value implicit cast to return type public int int Value return value implicit cast to return type  intValue
return value implicit cast to return type public long long Value return value implicit cast to return type  longValue
return value implicit cast to return type public short short Value return value implicit cast to return type  shortValue
public String string Value spec 15 17 11 String s new Integer value to String if s null return null NON NLS 1 return s  stringValue toString
return s public String to String return byte value NON NLS 1  toString
return byte value NON NLS 1 public int typeID return T byte  T_byte

char value public Char Constant char value this value value  CharConstant
this value value public byte byte Value return byte value  byteValue
return byte value public char char Value return this value  charValue
return this value public double double Value return value implicit cast to return type  doubleValue
return value implicit cast to return type public float float Value return value implicit cast to return type  floatValue
return value implicit cast to return type public int int Value return value implicit cast to return type  intValue
return value implicit cast to return type public long long Value return value implicit cast to return type  longValue
return value implicit cast to return type public short short Value return short value  shortValue
public String string Value spec 15 17 11 String s new Character value to String if s null return null NON NLS 1 return s  stringValue toString
return s public String to String return char value NON NLS 1  toString
return char value NON NLS 1 public int typeID return T char  T_char

Initializing the compiler options with defaults public Compiler Options use default options  CompilerOptions
Initializing the compiler options with external settings param settings public Compiler Options Map settings if settings null return set settings  CompilerOptions
public Map get Map Map options Map new Hash Map 30 options Map put OPTION LocalVariableAttribute this produce Debug Attributes Vars 0 GENERATE DO NOT GENERATE options Map put OPTION LineNumberAttribute this produce Debug Attributes Lines 0 GENERATE DO NOT GENERATE options Map put OPTION SourceFileAttribute this produce Debug Attributes Source 0 GENERATE DO NOT GENERATE options Map put OPTION PreserveUnusedLocal this preserve All Local Variables PRESERVE OPTIMIZE OUT options Map put OPTION DocCommentSupport this doc Comment Support ENABLED DISABLED options Map put OPTION ReportMethodWithConstructorName get Severity String Method With Constructor Name options Map put OPTION ReportOverridingPackageDefaultMethod get Severity String Overridden Package Default Method options Map put OPTION ReportDeprecation get Severity String Using DeprecatedAPI options Map put OPTION ReportDeprecationInDeprecatedCode this report Deprecation Inside Deprecated Code ENABLED DISABLED options Map put OPTION ReportDeprecationWhenOverridingDeprecatedMethod this report Deprecation When Overriding Deprecated Method ENABLED DISABLED options Map put OPTION ReportHiddenCatchBlock get Severity String Masked Catch Block options Map put OPTION ReportUnusedLocal get Severity String Unused Local Variable options Map put OPTION ReportUnusedParameter get Severity String Unused Argument options Map put OPTION ReportUnusedImport get Severity String Unused Import options Map put OPTION ReportSyntheticAccessEmulation get Severity String Access Emulation options Map put OPTION ReportNoEffectAssignment get Severity String No Effect Assignment options Map put OPTION ReportNonExternalizedStringLiteral get Severity String Non Externalized String options Map put OPTION ReportNoImplicitStringConversion get Severity String No Implicit String Conversion options Map put OPTION ReportNonStaticAccessToStatic get Severity String Non Static Access To Static options Map put OPTION ReportIndirectStaticAccess get Severity String Indirect Static Access options Map put OPTION ReportIncompatibleNonInheritedInterfaceMethod get Severity String Incompatible Non Inherited Interface Method options Map put OPTION ReportUnusedPrivateMember get Severity String Unused Private Member options Map put OPTION ReportLocalVariableHiding get Severity String Local Variable Hiding options Map put OPTION ReportFieldHiding get Severity String Field Hiding options Map put OPTION ReportPossibleAccidentalBooleanAssignment get Severity String Accidental Boolean Assign options Map put OPTION ReportEmptyStatement get Severity String Empty Statement options Map put OPTION ReportAssertIdentifier get Severity String Assert Used As An Identifier options Map put OPTION ReportUndocumentedEmptyBlock get Severity String Undocumented Empty Block options Map put OPTION ReportUnnecessaryTypeCheck get Severity String Unnecessary Type Check options Map put OPTION ReportUnnecessaryElse get Severity String Unnecessary Else options Map put OPTION ReportInvalidJavadoc get Severity String Invalid Javadoc options Map put OPTION ReportInvalidJavadocTagsVisibility get Visibility String this report Invalid Javadoc Tags Visibility options Map put OPTION ReportInvalidJavadocTags this report Invalid Javadoc Tags ENABLED DISABLED options Map put OPTION ReportMissingJavadocTags get Severity String Missing Javadoc Tags options Map put OPTION ReportMissingJavadocTagsVisibility get Visibility String this report Missing Javadoc Tags Visibility options Map put OPTION ReportMissingJavadocTagsOverriding this report Missing Javadoc Tags Overriding ENABLED DISABLED options Map put OPTION ReportMissingJavadocComments get Severity String Missing Javadoc Comments options Map put OPTION ReportMissingJavadocCommentsVisibility get Visibility String this report Missing Javadoc Comments Visibility options Map put OPTION ReportMissingJavadocCommentsOverriding this report Missing Javadoc Comments Overriding ENABLED DISABLED options Map put OPTION ReportFinallyBlockNotCompletingNormally get Severity String Finally Block Not Completing options Map put OPTION ReportUnusedDeclaredThrownException get Severity String Unused Declared Thrown Exception options Map put OPTION ReportUnusedDeclaredThrownExceptionWhenOverriding this report Unused Declared Thrown Exception When Overriding ENABLED DISABLED options Map put OPTION ReportUnqualifiedFieldAccess get Severity String Unqualified Field Access options Map put OPTION Compliance version From Jdk Level this compliance Level options Map put OPTION Source version From Jdk Level this source Level options Map put OPTION TargetPlatform version From Jdk Level this targetJDK if this default Encoding null options Map put OPTION Encoding this default Encoding options Map put OPTION TaskTags this task Tags null new String Char Operation concat With this task Tags NON NLS 1 options Map put OPTION TaskPriorities this task Priorites null new String Char Operation concat With this task Priorites NON NLS 1 options Map put OPTION TaskCaseSensitive this is Task Case Sensitive ENABLED DISABLED options Map put OPTION ReportUnusedParameterWhenImplementingAbstract this report Unused Parameter When Implementing Abstract ENABLED DISABLED options Map put OPTION ReportUnusedParameterWhenOverridingConcrete this report Unused Parameter When Overriding Concrete ENABLED DISABLED options Map put OPTION ReportSpecialParameterHidingField this report Special Parameter Hiding Field ENABLED DISABLED options Map put OPTION MaxProblemPerUnit String value Of this max Problems Per Unit options Map put OPTION InlineJsr this inline Jsr Bytecode ENABLED DISABLED return options Map  getMap optionsMap HashMap optionsMap OPTION_LocalVariableAttribute produceDebugAttributes DO_NOT_GENERATE optionsMap OPTION_LineNumberAttribute produceDebugAttributes DO_NOT_GENERATE optionsMap OPTION_SourceFileAttribute produceDebugAttributes DO_NOT_GENERATE optionsMap OPTION_PreserveUnusedLocal preserveAllLocalVariables OPTIMIZE_OUT optionsMap OPTION_DocCommentSupport docCommentSupport optionsMap OPTION_ReportMethodWithConstructorName getSeverityString MethodWithConstructorName optionsMap OPTION_ReportOverridingPackageDefaultMethod getSeverityString OverriddenPackageDefaultMethod optionsMap OPTION_ReportDeprecation getSeverityString UsingDeprecatedAPI optionsMap OPTION_ReportDeprecationInDeprecatedCode reportDeprecationInsideDeprecatedCode optionsMap OPTION_ReportDeprecationWhenOverridingDeprecatedMethod reportDeprecationWhenOverridingDeprecatedMethod optionsMap OPTION_ReportHiddenCatchBlock getSeverityString MaskedCatchBlock optionsMap OPTION_ReportUnusedLocal getSeverityString UnusedLocalVariable optionsMap OPTION_ReportUnusedParameter getSeverityString UnusedArgument optionsMap OPTION_ReportUnusedImport getSeverityString UnusedImport optionsMap OPTION_ReportSyntheticAccessEmulation getSeverityString AccessEmulation optionsMap OPTION_ReportNoEffectAssignment getSeverityString NoEffectAssignment optionsMap OPTION_ReportNonExternalizedStringLiteral getSeverityString NonExternalizedString optionsMap OPTION_ReportNoImplicitStringConversion getSeverityString NoImplicitStringConversion optionsMap OPTION_ReportNonStaticAccessToStatic getSeverityString NonStaticAccessToStatic optionsMap OPTION_ReportIndirectStaticAccess getSeverityString IndirectStaticAccess optionsMap OPTION_ReportIncompatibleNonInheritedInterfaceMethod getSeverityString IncompatibleNonInheritedInterfaceMethod optionsMap OPTION_ReportUnusedPrivateMember getSeverityString UnusedPrivateMember optionsMap OPTION_ReportLocalVariableHiding getSeverityString LocalVariableHiding optionsMap OPTION_ReportFieldHiding getSeverityString FieldHiding optionsMap OPTION_ReportPossibleAccidentalBooleanAssignment getSeverityString AccidentalBooleanAssign optionsMap OPTION_ReportEmptyStatement getSeverityString EmptyStatement optionsMap OPTION_ReportAssertIdentifier getSeverityString AssertUsedAsAnIdentifier optionsMap OPTION_ReportUndocumentedEmptyBlock getSeverityString UndocumentedEmptyBlock optionsMap OPTION_ReportUnnecessaryTypeCheck getSeverityString UnnecessaryTypeCheck optionsMap OPTION_ReportUnnecessaryElse getSeverityString UnnecessaryElse optionsMap OPTION_ReportInvalidJavadoc getSeverityString InvalidJavadoc optionsMap OPTION_ReportInvalidJavadocTagsVisibility getVisibilityString reportInvalidJavadocTagsVisibility optionsMap OPTION_ReportInvalidJavadocTags reportInvalidJavadocTags optionsMap OPTION_ReportMissingJavadocTags getSeverityString MissingJavadocTags optionsMap OPTION_ReportMissingJavadocTagsVisibility getVisibilityString reportMissingJavadocTagsVisibility optionsMap OPTION_ReportMissingJavadocTagsOverriding reportMissingJavadocTagsOverriding optionsMap OPTION_ReportMissingJavadocComments getSeverityString MissingJavadocComments optionsMap OPTION_ReportMissingJavadocCommentsVisibility getVisibilityString reportMissingJavadocCommentsVisibility optionsMap OPTION_ReportMissingJavadocCommentsOverriding reportMissingJavadocCommentsOverriding optionsMap OPTION_ReportFinallyBlockNotCompletingNormally getSeverityString FinallyBlockNotCompleting optionsMap OPTION_ReportUnusedDeclaredThrownException getSeverityString UnusedDeclaredThrownException optionsMap OPTION_ReportUnusedDeclaredThrownExceptionWhenOverriding reportUnusedDeclaredThrownExceptionWhenOverriding optionsMap OPTION_ReportUnqualifiedFieldAccess getSeverityString UnqualifiedFieldAccess optionsMap OPTION_Compliance versionFromJdkLevel complianceLevel optionsMap OPTION_Source versionFromJdkLevel sourceLevel optionsMap OPTION_TargetPlatform versionFromJdkLevel defaultEncoding optionsMap OPTION_Encoding defaultEncoding optionsMap OPTION_TaskTags taskTags CharOperation concatWith taskTags optionsMap OPTION_TaskPriorities taskPriorites CharOperation concatWith taskPriorites optionsMap OPTION_TaskCaseSensitive isTaskCaseSensitive optionsMap OPTION_ReportUnusedParameterWhenImplementingAbstract reportUnusedParameterWhenImplementingAbstract optionsMap OPTION_ReportUnusedParameterWhenOverridingConcrete reportUnusedParameterWhenOverridingConcrete optionsMap OPTION_ReportSpecialParameterHidingField reportSpecialParameterHidingField optionsMap OPTION_MaxProblemPerUnit valueOf maxProblemsPerUnit optionsMap OPTION_InlineJsr inlineJsrBytecode optionsMap
public int get Severity long irritant if this warning Threshold irritant 0 return Warning if this error Threshold irritant 0 return Error return Ignore  getSeverity warningThreshold errorThreshold
public String get Severity String long irritant if this warning Threshold irritant 0 return WARNING if this error Threshold irritant 0 return ERROR return IGNORE  getSeverityString warningThreshold errorThreshold
public String get Visibility String int level switch level case Acc Public return PUBLIC case Acc Protected return PROTECTED case Acc Private return PRIVATE default return DEFAULT  getVisibilityString AccPublic AccProtected AccPrivate
public void set Map options Map Object option Value if option Value options Map get OPTION LocalVariableAttribute null if GENERATE equals option Value this produce Debug Attributes Vars else if DO NOT GENERATE equals option Value this produce Debug Attributes Vars if option Value options Map get OPTION LineNumberAttribute null if GENERATE equals option Value this produce Debug Attributes Lines else if DO NOT GENERATE equals option Value this produce Debug Attributes Lines if option Value options Map get OPTION SourceFileAttribute null if GENERATE equals option Value this produce Debug Attributes Source else if DO NOT GENERATE equals option Value this produce Debug Attributes Source if option Value options Map get OPTION PreserveUnusedLocal null if PRESERVE equals option Value this preserve All Local Variables true else if OPTIMIZE OUT equals option Value this preserve All Local Variables false if option Value options Map get OPTION ReportDeprecationInDeprecatedCode null if ENABLED equals option Value this report Deprecation Inside Deprecated Code true else if DISABLED equals option Value this report Deprecation Inside Deprecated Code false if option Value options Map get OPTION ReportDeprecationWhenOverridingDeprecatedMethod null if ENABLED equals option Value this report Deprecation When Overriding Deprecated Method true else if DISABLED equals option Value this report Deprecation When Overriding Deprecated Method false if option Value options Map get OPTION ReportUnusedDeclaredThrownExceptionWhenOverriding null if ENABLED equals option Value this report Unused Declared Thrown Exception When Overriding true else if DISABLED equals option Value this report Unused Declared Thrown Exception When Overriding false if option Value options Map get OPTION Compliance null long level version To Jdk Level option Value if level 0 this compliance Level level if option Value options Map get OPTION Source null long level version To Jdk Level option Value if level 0 this source Level level if option Value options Map get OPTION TargetPlatform null long level version To Jdk Level option Value if level 0 this targetJDK level if option Value options Map get OPTION Encoding null if option Value instanceof String this default Encoding null String string Value String option Value if string Value length 0 try new Input Stream Reader new Byte Array Input Stream new byte 0 string Value this default Encoding string Value catch Unsupported Encoding Exception e ignore unsupported encoding if option Value options Map get OPTION PrivateConstructorAccess null long level version To Jdk Level option Value if level JDK1 3 this is Private Constructor Access Changing Visibility true if option Value options Map get OPTION ReportUnusedParameterWhenImplementingAbstract null if ENABLED equals option Value this report Unused Parameter When Implementing Abstract true else if DISABLED equals option Value this report Unused Parameter When Implementing Abstract false if option Value options Map get OPTION ReportUnusedParameterWhenOverridingConcrete null if ENABLED equals option Value this report Unused Parameter When Overriding Concrete true else if DISABLED equals option Value this report Unused Parameter When Overriding Concrete false if option Value options Map get OPTION ReportSpecialParameterHidingField null if ENABLED equals option Value this report Special Parameter Hiding Field true else if DISABLED equals option Value this report Special Parameter Hiding Field false if option Value options Map get OPTION MaxProblemPerUnit null if option Value instanceof String String string Value String option Value try int val Integer parse Int string Value if val 0 this max Problems Per Unit val catch Number Format Exception e ignore ill formatted limit if option Value options Map get OPTION TaskTags null if option Value instanceof String String string Value String option Value if string Value length 0 this task Tags null else this task Tags Char Operation split And Trim On string Value to Char Array if option Value options Map get OPTION TaskPriorities null if option Value instanceof String String string Value String option Value if string Value length 0 this task Priorites null else this task Priorites Char Operation split And Trim On string Value to Char Array if option Value options Map get OPTION TaskCaseSensitive null if ENABLED equals option Value this is Task Case Sensitive true else if DISABLED equals option Value this is Task Case Sensitive false if option Value options Map get OPTION InlineJsr null if ENABLED equals option Value this inline Jsr Bytecode true else if DISABLED equals option Value this inline Jsr Bytecode false if option Value options Map get OPTION ReportMethodWithConstructorName null update Severity Method With Constructor Name option Value if option Value options Map get OPTION ReportOverridingPackageDefaultMethod null update Severity Overridden Package Default Method option Value if option Value options Map get OPTION ReportDeprecation null update Severity Using DeprecatedAPI option Value if option Value options Map get OPTION ReportHiddenCatchBlock null update Severity Masked Catch Block option Value if option Value options Map get OPTION ReportUnusedLocal null update Severity Unused Local Variable option Value if option Value options Map get OPTION ReportUnusedParameter null update Severity Unused Argument option Value if option Value options Map get OPTION ReportUnusedImport null update Severity Unused Import option Value if option Value options Map get OPTION ReportUnusedPrivateMember null update Severity Unused Private Member option Value if option Value options Map get OPTION ReportUnusedDeclaredThrownException null update Severity Unused Declared Thrown Exception option Value if option Value options Map get OPTION ReportNoImplicitStringConversion null update Severity No Implicit String Conversion option Value if option Value options Map get OPTION ReportSyntheticAccessEmulation null update Severity Access Emulation option Value if option Value options Map get OPTION ReportLocalVariableHiding null update Severity Local Variable Hiding option Value if option Value options Map get OPTION ReportFieldHiding null update Severity Field Hiding option Value if option Value options Map get OPTION ReportPossibleAccidentalBooleanAssignment null update Severity Accidental Boolean Assign option Value if option Value options Map get OPTION ReportEmptyStatement null update Severity Empty Statement option Value if option Value options Map get OPTION ReportNonExternalizedStringLiteral null update Severity Non Externalized String option Value if option Value options Map get OPTION ReportAssertIdentifier null update Severity Assert Used As An Identifier option Value if option Value options Map get OPTION ReportNonStaticAccessToStatic null update Severity Non Static Access To Static option Value if option Value options Map get OPTION ReportIndirectStaticAccess null update Severity Indirect Static Access option Value if option Value options Map get OPTION ReportIncompatibleNonInheritedInterfaceMethod null update Severity Incompatible Non Inherited Interface Method option Value if option Value options Map get OPTION ReportUndocumentedEmptyBlock null update Severity Undocumented Empty Block option Value if option Value options Map get OPTION ReportUnnecessaryTypeCheck null update Severity Unnecessary Type Check option Value if option Value options Map get OPTION ReportFinallyBlockNotCompletingNormally null update Severity Finally Block Not Completing option Value if option Value options Map get OPTION ReportUnqualifiedFieldAccess null update Severity Unqualified Field Access option Value if option Value options Map get OPTION ReportNoEffectAssignment null update Severity No Effect Assignment option Value if option Value options Map get OPTION ReportUnnecessaryElse null update Severity Unnecessary Else option Value Javadoc options if option Value options Map get OPTION DocCommentSupport null if ENABLED equals option Value this doc Comment Support true else if DISABLED equals option Value this doc Comment Support false if option Value options Map get OPTION ReportInvalidJavadoc null update Severity Invalid Javadoc option Value if option Value options Map get OPTION ReportInvalidJavadocTagsVisibility null if PUBLIC equals option Value this report Invalid Javadoc Tags Visibility Acc Public else if PROTECTED equals option Value this report Invalid Javadoc Tags Visibility Acc Protected else if DEFAULT equals option Value this report Invalid Javadoc Tags Visibility Acc Default else if PRIVATE equals option Value this report Invalid Java optionsMap optionValue optionValue optionsMap OPTION_LocalVariableAttribute optionValue produceDebugAttributes DO_NOT_GENERATE optionValue produceDebugAttributes optionValue optionsMap OPTION_LineNumberAttribute optionValue produceDebugAttributes DO_NOT_GENERATE optionValue produceDebugAttributes optionValue optionsMap OPTION_SourceFileAttribute optionValue produceDebugAttributes DO_NOT_GENERATE optionValue produceDebugAttributes optionValue optionsMap OPTION_PreserveUnusedLocal optionValue preserveAllLocalVariables OPTIMIZE_OUT optionValue preserveAllLocalVariables optionValue optionsMap OPTION_ReportDeprecationInDeprecatedCode optionValue reportDeprecationInsideDeprecatedCode optionValue reportDeprecationInsideDeprecatedCode optionValue optionsMap OPTION_ReportDeprecationWhenOverridingDeprecatedMethod optionValue reportDeprecationWhenOverridingDeprecatedMethod optionValue reportDeprecationWhenOverridingDeprecatedMethod optionValue optionsMap OPTION_ReportUnusedDeclaredThrownExceptionWhenOverriding optionValue reportUnusedDeclaredThrownExceptionWhenOverriding optionValue reportUnusedDeclaredThrownExceptionWhenOverriding optionValue optionsMap OPTION_Compliance versionToJdkLevel optionValue complianceLevel optionValue optionsMap OPTION_Source versionToJdkLevel optionValue sourceLevel optionValue optionsMap OPTION_TargetPlatform versionToJdkLevel optionValue optionValue optionsMap OPTION_Encoding optionValue defaultEncoding stringValue optionValue stringValue InputStreamReader ByteArrayInputStream stringValue defaultEncoding stringValue UnsupportedEncodingException optionValue optionsMap OPTION_PrivateConstructorAccess versionToJdkLevel optionValue JDK1_3 isPrivateConstructorAccessChangingVisibility optionValue optionsMap OPTION_ReportUnusedParameterWhenImplementingAbstract optionValue reportUnusedParameterWhenImplementingAbstract optionValue reportUnusedParameterWhenImplementingAbstract optionValue optionsMap OPTION_ReportUnusedParameterWhenOverridingConcrete optionValue reportUnusedParameterWhenOverridingConcrete optionValue reportUnusedParameterWhenOverridingConcrete optionValue optionsMap OPTION_ReportSpecialParameterHidingField optionValue reportSpecialParameterHidingField optionValue reportSpecialParameterHidingField optionValue optionsMap OPTION_MaxProblemPerUnit optionValue stringValue optionValue parseInt stringValue maxProblemsPerUnit NumberFormatException optionValue optionsMap OPTION_TaskTags optionValue stringValue optionValue stringValue taskTags taskTags CharOperation splitAndTrimOn stringValue toCharArray optionValue optionsMap OPTION_TaskPriorities optionValue stringValue optionValue stringValue taskPriorites taskPriorites CharOperation splitAndTrimOn stringValue toCharArray optionValue optionsMap OPTION_TaskCaseSensitive optionValue isTaskCaseSensitive optionValue isTaskCaseSensitive optionValue optionsMap OPTION_InlineJsr optionValue inlineJsrBytecode optionValue inlineJsrBytecode optionValue optionsMap OPTION_ReportMethodWithConstructorName updateSeverity MethodWithConstructorName optionValue optionValue optionsMap OPTION_ReportOverridingPackageDefaultMethod updateSeverity OverriddenPackageDefaultMethod optionValue optionValue optionsMap OPTION_ReportDeprecation updateSeverity UsingDeprecatedAPI optionValue optionValue optionsMap OPTION_ReportHiddenCatchBlock updateSeverity MaskedCatchBlock optionValue optionValue optionsMap OPTION_ReportUnusedLocal updateSeverity UnusedLocalVariable optionValue optionValue optionsMap OPTION_ReportUnusedParameter updateSeverity UnusedArgument optionValue optionValue optionsMap OPTION_ReportUnusedImport updateSeverity UnusedImport optionValue optionValue optionsMap OPTION_ReportUnusedPrivateMember updateSeverity UnusedPrivateMember optionValue optionValue optionsMap OPTION_ReportUnusedDeclaredThrownException updateSeverity UnusedDeclaredThrownException optionValue optionValue optionsMap OPTION_ReportNoImplicitStringConversion updateSeverity NoImplicitStringConversion optionValue optionValue optionsMap OPTION_ReportSyntheticAccessEmulation updateSeverity AccessEmulation optionValue optionValue optionsMap OPTION_ReportLocalVariableHiding updateSeverity LocalVariableHiding optionValue optionValue optionsMap OPTION_ReportFieldHiding updateSeverity FieldHiding optionValue optionValue optionsMap OPTION_ReportPossibleAccidentalBooleanAssignment updateSeverity AccidentalBooleanAssign optionValue optionValue optionsMap OPTION_ReportEmptyStatement updateSeverity EmptyStatement optionValue optionValue optionsMap OPTION_ReportNonExternalizedStringLiteral updateSeverity NonExternalizedString optionValue optionValue optionsMap OPTION_ReportAssertIdentifier updateSeverity AssertUsedAsAnIdentifier optionValue optionValue optionsMap OPTION_ReportNonStaticAccessToStatic updateSeverity NonStaticAccessToStatic optionValue optionValue optionsMap OPTION_ReportIndirectStaticAccess updateSeverity IndirectStaticAccess optionValue optionValue optionsMap OPTION_ReportIncompatibleNonInheritedInterfaceMethod updateSeverity IncompatibleNonInheritedInterfaceMethod optionValue optionValue optionsMap OPTION_ReportUndocumentedEmptyBlock updateSeverity UndocumentedEmptyBlock optionValue optionValue optionsMap OPTION_ReportUnnecessaryTypeCheck updateSeverity UnnecessaryTypeCheck optionValue optionValue optionsMap OPTION_ReportFinallyBlockNotCompletingNormally updateSeverity FinallyBlockNotCompleting optionValue optionValue optionsMap OPTION_ReportUnqualifiedFieldAccess updateSeverity UnqualifiedFieldAccess optionValue optionValue optionsMap OPTION_ReportNoEffectAssignment updateSeverity NoEffectAssignment optionValue optionValue optionsMap OPTION_ReportUnnecessaryElse updateSeverity UnnecessaryElse optionValue optionValue optionsMap OPTION_DocCommentSupport optionValue docCommentSupport optionValue docCommentSupport optionValue optionsMap OPTION_ReportInvalidJavadoc updateSeverity InvalidJavadoc optionValue optionValue optionsMap OPTION_ReportInvalidJavadocTagsVisibility optionValue reportInvalidJavadocTagsVisibility AccPublic optionValue reportInvalidJavadocTagsVisibility AccProtected optionValue reportInvalidJavadocTagsVisibility AccDefault optionValue reportInvalidJava
public String to String String Buffer buf new String Buffer Compiler Options NON NLS 1 buf append n t local variables debug attributes append this produce Debug Attributes Vars 0 ON OFF NON NLS 1 NON NLS 2 NON NLS 3 buf append n t line number debug attributes append this produce Debug Attributes Lines 0 ON OFF NON NLS 1 NON NLS 2 NON NLS 3 buf append n t source debug attributes append this produce Debug Attributes Source 0 ON OFF NON NLS 1 NON NLS 2 NON NLS 3 buf append n t preserve all local variables append this preserve All Local Variables ON OFF NON NLS 1 NON NLS 2 NON NLS 3 buf append n t method with constructor name append get Severity String Method With Constructor Name NON NLS 1 buf append n t overridden package default method append get Severity String Overridden Package Default Method NON NLS 1 buf append n t deprecation append get Severity String Using DeprecatedAPI NON NLS 1 buf append n t masked catch block append get Severity String Masked Catch Block NON NLS 1 buf append n t unused local variable append get Severity String Unused Local Variable NON NLS 1 buf append n t unused parameter append get Severity String Unused Argument NON NLS 1 buf append n t unused import append get Severity String Unused Import NON NLS 1 buf append n t synthetic access emulation append get Severity String Access Emulation NON NLS 1 buf append n t assignment with no effect append get Severity String No Effect Assignment NON NLS 1 buf append n t non externalized string append get Severity String Non Externalized String NON NLS 1 buf append n t static access receiver append get Severity String Non Static Access To Static NON NLS 1 buf append n t indirect static access append get Severity String Indirect Static Access NON NLS 1 buf append n t incompatible non inherited interface method append get Severity String Incompatible Non Inherited Interface Method NON NLS 1 buf append n t unused private member append get Severity String Unused Private Member NON NLS 1 buf append n t local variable hiding another variable append get Severity String Local Variable Hiding NON NLS 1 buf append n t field hiding another variable append get Severity String Field Hiding NON NLS 1 buf append n t possible accidental boolean assignment append get Severity String Accidental Boolean Assign NON NLS 1 buf append n t superfluous semicolon append get Severity String Empty Statement NON NLS 1 buf append n t uncommented empty block append get Severity String Undocumented Empty Block NON NLS 1 buf append n t unnecessary type check append get Severity String Unnecessary Type Check NON NLS 1 buf append n t javadoc comment support append this doc Comment Support ON OFF NON NLS 1 NON NLS 2 NON NLS 3 buf append n t t invalid javadoc append get Severity String Invalid Javadoc NON NLS 1 buf append n t t report invalid javadoc tags append this report Invalid Javadoc Tags ENABLED DISABLED NON NLS 1 buf append n t t visibility level to report invalid javadoc tags append get Visibility String this report Invalid Javadoc Tags Visibility NON NLS 1 buf append n t t missing javadoc tags append get Severity String Missing Javadoc Tags NON NLS 1 buf append n t t visibility level to report missing javadoc tags append get Visibility String this report Missing Javadoc Tags Visibility NON NLS 1 buf append n t t report missing javadoc tags in overriding methods append this report Missing Javadoc Tags Overriding ENABLED DISABLED NON NLS 1 buf append n t t missing javadoc comments append get Severity String Missing Javadoc Comments NON NLS 1 buf append n t t visibility level to report missing javadoc comments append get Visibility String this report Missing Javadoc Comments Visibility NON NLS 1 buf append n t t report missing javadoc comments in overriding methods append this report Missing Javadoc Comments Overriding ENABLED DISABLED NON NLS 1 buf append n t finally block not completing normally append get Severity String Finally Block Not Completing NON NLS 1 buf append n t unused declared thrown exception append get Severity String Unused Declared Thrown Exception NON NLS 1 buf append n t unused declared thrown exception when overriding append this report Unused Declared Thrown Exception When Overriding ENABLED DISABLED NON NLS 1 buf append n t unnecessary else append get Severity String Unnecessary Else NON NLS 1 buf append n t JDK compliance level version From Jdk Level this compliance Level NON NLS 1 buf append n t JDK source level version From Jdk Level this source Level NON NLS 1 buf append n t JDK target level version From Jdk Level this targetJDK NON NLS 1 buf append n t private constructor access append this is Private Constructor Access Changing Visibility extra argument make default access NON NLS 1 NON NLS 2 NON NLS 3 buf append n t verbose append this verbose ON OFF NON NLS 1 NON NLS 2 NON NLS 3 buf append n t produce reference info append this produce Reference Info ON OFF NON NLS 1 NON NLS 2 NON NLS 3 buf append n t parse literal expressions as constants append this parse Literal Expressions As Constants ON OFF NON NLS 1 NON NLS 2 NON NLS 3 buf append n t encoding append this default Encoding null default this default Encoding NON NLS 1 NON NLS 2 buf append n t task tags append this task Tags null new String Char Operation concat With this task Tags NON NLS 1 NON NLS 2 buf append n t task priorities append this task Priorites null new String Char Operation concat With this task Priorites NON NLS 1 NON NLS 2 buf append n t report deprecation inside deprecated code append this report Deprecation Inside Deprecated Code ENABLED DISABLED NON NLS 1 buf append n t report deprecation when overriding deprecated method append this report Deprecation When Overriding Deprecated Method ENABLED DISABLED NON NLS 1 buf append n t report unused parameter when implementing abstract method append this report Unused Parameter When Implementing Abstract ENABLED DISABLED NON NLS 1 buf append n t report unused parameter when overriding concrete method append this report Unused Parameter When Overriding Concrete ENABLED DISABLED NON NLS 1 buf append n t report constructor setter parameter hiding existing field append this report Special Parameter Hiding Field ENABLED DISABLED NON NLS 1 buf append n t inline JSR bytecode append this inline Jsr Bytecode ENABLED DISABLED NON NLS 1 return buf to String  toString StringBuffer StringBuffer CompilerOptions produceDebugAttributes produceDebugAttributes produceDebugAttributes preserveAllLocalVariables getSeverityString MethodWithConstructorName getSeverityString OverriddenPackageDefaultMethod getSeverityString UsingDeprecatedAPI getSeverityString MaskedCatchBlock getSeverityString UnusedLocalVariable getSeverityString UnusedArgument getSeverityString UnusedImport getSeverityString AccessEmulation getSeverityString NoEffectAssignment getSeverityString NonExternalizedString getSeverityString NonStaticAccessToStatic getSeverityString IndirectStaticAccess getSeverityString IncompatibleNonInheritedInterfaceMethod getSeverityString UnusedPrivateMember getSeverityString LocalVariableHiding getSeverityString FieldHiding getSeverityString AccidentalBooleanAssign getSeverityString EmptyStatement getSeverityString UndocumentedEmptyBlock getSeverityString UnnecessaryTypeCheck docCommentSupport getSeverityString InvalidJavadoc reportInvalidJavadocTags getVisibilityString reportInvalidJavadocTagsVisibility getSeverityString MissingJavadocTags getVisibilityString reportMissingJavadocTagsVisibility reportMissingJavadocTagsOverriding getSeverityString MissingJavadocComments getVisibilityString reportMissingJavadocCommentsVisibility reportMissingJavadocCommentsOverriding getSeverityString FinallyBlockNotCompleting getSeverityString UnusedDeclaredThrownException reportUnusedDeclaredThrownExceptionWhenOverriding getSeverityString UnnecessaryElse versionFromJdkLevel complianceLevel versionFromJdkLevel sourceLevel versionFromJdkLevel isPrivateConstructorAccessChangingVisibility produceReferenceInfo parseLiteralExpressionsAsConstants defaultEncoding defaultEncoding taskTags CharOperation concatWith taskTags taskPriorites CharOperation concatWith taskPriorites reportDeprecationInsideDeprecatedCode reportDeprecationWhenOverridingDeprecatedMethod reportUnusedParameterWhenImplementingAbstract reportUnusedParameterWhenOverridingConcrete reportSpecialParameterHidingField inlineJsrBytecode toString
void update Severity long irritant Object severity String if ERROR equals severity String this error Threshold irritant this warning Threshold irritant else if WARNING equals severity String this error Threshold irritant this warning Threshold irritant else if IGNORE equals severity String this error Threshold irritant this warning Threshold irritant  updateSeverity severityString severityString errorThreshold warningThreshold severityString errorThreshold warningThreshold severityString errorThreshold warningThreshold
public static long version To Jdk Level Object versionID if VERSION 1 1 equals versionID return JDK1 1 else if VERSION 1 2 equals versionID return JDK1 2 else if VERSION 1 3 equals versionID return JDK1 3 else if VERSION 1 4 equals versionID return JDK1 4 else if VERSION 1 5 equals versionID return JDK1 5 return 0 unknown  versionToJdkLevel VERSION_1_1 JDK1_1 VERSION_1_2 JDK1_2 VERSION_1_3 JDK1_3 VERSION_1_4 JDK1_4 VERSION_1_5 JDK1_5
public static String version From Jdk Level long jdk Level if jdk Level JDK1 1 return VERSION 1 1 else if jdk Level JDK1 2 return VERSION 1 2 else if jdk Level JDK1 3 return VERSION 1 3 else if jdk Level JDK1 4 return VERSION 1 4 else if jdk Level JDK1 5 return VERSION 1 5 return unknown version NON NLS 1  versionFromJdkLevel jdkLevel jdkLevel JDK1_1 VERSION_1_1 jdkLevel JDK1_2 VERSION_1_2 jdkLevel JDK1_3 VERSION_1_3 jdkLevel JDK1_4 VERSION_1_4 jdkLevel JDK1_5 VERSION_1_5

public static final Int Constant One new Int Constant 1 public boolean boolean Value throw new Should Not Implement Util bind constant cannot Casted Into type Name boolean NON NLS 1 NON NLS 2  IntConstant IntConstant booleanValue ShouldNotImplement cannotCastedInto typeName
public byte byte Value throw new Should Not Implement Util bind constant cannot Casted Into type Name byte NON NLS 1 NON NLS 2  byteValue ShouldNotImplement cannotCastedInto typeName
public final Constant cast To int conversion To Target Type the cast is an int of the form cast Id 4 type Id in order to follow the user written style cast expression if this NotA Constant return NotA Constant switch conversion To Target Type case T undefined return this TARGET TYPE FROM TYPE case T undefined 4 T undefined return NotA Constant case T undefined 4 T byte return NotA Constant case T undefined 4 T long return NotA Constant case T undefined 4 T short return NotA Constant case T undefined 4 T void return NotA Constant case T undefined 4 T String return NotA Constant case T undefined 4 T Object return NotA Constant case T undefined 4 T double return NotA Constant case T undefined 4 T float return NotA Constant case T undefined 4 T boolean return NotA Constant case T undefined 4 T char return NotA Constant case T undefined 4 T int return NotA Constant case T byte 4 T undefined return NotA Constant case T byte 4 T byte return this case T byte 4 T long return Constant from Value byte this long Value case T byte 4 T short return Constant from Value byte this short Value case T byte 4 T void return NotA Constant case T byte 4 T String return NotA Constant case T byte 4 T Object return NotA Constant case T byte 4 T double return Constant from Value byte this double Value case T byte 4 T float return Constant from Value byte this float Value case T byte 4 T boolean return NotA Constant case T byte 4 T char return Constant from Value byte this char Value case T byte 4 T int return Constant from Value byte this int Value case T long 4 T undefined return NotA Constant case T long 4 T byte return Constant from Value long this byte Value case T long 4 T long return this case T long 4 T short return Constant from Value long this short Value case T long 4 T void return NotA Constant case T long 4 T String return NotA Constant case T long 4 T Object return NotA Constant case T long 4 T double return Constant from Value long this double Value case T long 4 T float return Constant from Value long this float Value case T long 4 T boolean return NotA Constant case T long 4 T char return Constant from Value long this char Value case T long 4 T int return Constant from Value long this int Value case T short 4 T undefined return NotA Constant case T short 4 T byte return Constant from Value short this byte Value case T short 4 T long return Constant from Value short this long Value case T short 4 T short return this case T short 4 T void return NotA Constant case T short 4 T String return NotA Constant case T short 4 T Object return NotA Constant case T short 4 T double return Constant from Value short this double Value case T short 4 T float return Constant from Value short this float Value case T short 4 T boolean return NotA Constant case T short 4 T char return Constant from Value short this char Value case T short 4 T int return Constant from Value short this int Value case T void 4 T undefined return NotA Constant case T void 4 T byte return NotA Constant case T void 4 T long return NotA Constant case T void 4 T short return NotA Constant case T void 4 T void return NotA Constant case T void 4 T String return NotA Constant case T void 4 T Object return NotA Constant case T void 4 T double return NotA Constant case T void 4 T float return NotA Constant case T void 4 T boolean return NotA Constant case T void 4 T char return NotA Constant case T void 4 T int return NotA Constant case T String 4 T undefined return NotA Constant case T String 4 T byte return NotA Constant case T String 4 T long return NotA Constant case T String 4 T short return NotA Constant case T String 4 T void return NotA Constant case T String 4 T String return this case T String 4 T Object return NotA Constant case T String 4 T double return NotA Constant case T String 4 T float return NotA Constant case T String 4 T boolean return NotA Constant case T String 4 T char return NotA Constant case T String 4 T int return NotA Constant case T Object 4 T undefined return NotA Constant case T Object 4 T byte return NotA Constant case T Object 4 T long return NotA Constant case T Object 4 T short return NotA Constant case T Object 4 T void return NotA Constant case T Object 4 T String return NotA Constant case T Object 4 T Object return NotA Constant case T Object 4 T double return NotA Constant case T Object 4 T float return NotA Constant case T Object 4 T boolean return NotA Constant case T Object 4 T char return NotA Constant case T Object 4 T int return NotA Constant case T double 4 T undefined return NotA Constant case T double 4 T byte return Constant from Value double this byte Value case T double 4 T long return Constant from Value double this long Value case T double 4 T short return Constant from Value double this short Value case T double 4 T void return NotA Constant case T double 4 T String return NotA Constant case T double 4 T Object return NotA Constant case T double 4 T double return this case T double 4 T float return Constant from Value double this float Value case T double 4 T boolean return NotA Constant case T double 4 T char return Constant from Value double this char Value case T double 4 T int return Constant from Value double this int Value case T float 4 T undefined return NotA Constant case T float 4 T byte return Constant from Value float this byte Value case T float 4 T long return Constant from Value float this long Value case T float 4 T short return Constant from Value float this short Value case T float 4 T void return NotA Constant case T float 4 T String return NotA Constant case T float 4 T Object return NotA Constant case T float 4 T double return Constant from Value float this double Value case T float 4 T float return this case T float 4 T boolean return NotA Constant case T float 4 T char return Constant from Value float this char Value case T float 4 T int return Constant from Value float this int Value case T boolean 4 T undefined return NotA Constant case T boolean 4 T byte return NotA Constant case T boolean 4 T long return NotA Constant case T boolean 4 T short return NotA Constant case T boolean 4 T void return NotA Constant case T boolean 4 T String return NotA Constant case T boolean 4 T Object return NotA Constant case T boolean 4 T double return NotA Constant case T boolean 4 T float return NotA Constant case T boolean 4 T boolean return this case T boolean 4 T char return NotA Constant case T boolean 4 T int return NotA Constant case T char 4 T undefined return NotA Constant case T char 4 T byte return Constant from Value char this byte Value case T char 4 T long return Constant from Value char this long Value case T char 4 T short return Constant from Value char this short Value case T char 4 T void return NotA Constant case T char 4 T String return NotA Constant case T char 4 T Object return NotA Constant case T char 4 T double return Constant from Value char this double Value case T char 4 T float return Constant from Value char this float Value case T char 4 T boolean return NotA Constant case T char 4 T char return this case T char 4 T int return Constant from Value char this int Value case T int 4 T undefined return NotA Constant case T int 4 T byte return Constant from Value int this byte Value cas castTo conversionToTargetType castId typeId NotAConstant NotAConstant conversionToTargetType T_undefined T_undefined T_undefined NotAConstant T_undefined T_byte NotAConstant T_undefined T_long NotAConstant T_undefined T_short NotAConstant T_undefined T_void NotAConstant T_undefined T_String NotAConstant T_undefined T_Object NotAConstant T_undefined T_double NotAConstant T_undefined T_float NotAConstant T_undefined T_boolean NotAConstant T_undefined T_char NotAConstant T_undefined T_int NotAConstant T_byte T_undefined NotAConstant T_byte T_byte T_byte T_long fromValue longValue T_byte T_short fromValue shortValue T_byte T_void NotAConstant T_byte T_String NotAConstant T_byte T_Object NotAConstant T_byte T_double fromValue doubleValue T_byte T_float fromValue floatValue T_byte T_boolean NotAConstant T_byte T_char fromValue charValue T_byte T_int fromValue intValue T_long T_undefined NotAConstant T_long T_byte fromValue byteValue T_long T_long T_long T_short fromValue shortValue T_long T_void NotAConstant T_long T_String NotAConstant T_long T_Object NotAConstant T_long T_double fromValue doubleValue T_long T_float fromValue floatValue T_long T_boolean NotAConstant T_long T_char fromValue charValue T_long T_int fromValue intValue T_short T_undefined NotAConstant T_short T_byte fromValue byteValue T_short T_long fromValue longValue T_short T_short T_short T_void NotAConstant T_short T_String NotAConstant T_short T_Object NotAConstant T_short T_double fromValue doubleValue T_short T_float fromValue floatValue T_short T_boolean NotAConstant T_short T_char fromValue charValue T_short T_int fromValue intValue T_void T_undefined NotAConstant T_void T_byte NotAConstant T_void T_long NotAConstant T_void T_short NotAConstant T_void T_void NotAConstant T_void T_String NotAConstant T_void T_Object NotAConstant T_void T_double NotAConstant T_void T_float NotAConstant T_void T_boolean NotAConstant T_void T_char NotAConstant T_void T_int NotAConstant T_String T_undefined NotAConstant T_String T_byte NotAConstant T_String T_long NotAConstant T_String T_short NotAConstant T_String T_void NotAConstant T_String T_String T_String T_Object NotAConstant T_String T_double NotAConstant T_String T_float NotAConstant T_String T_boolean NotAConstant T_String T_char NotAConstant T_String T_int NotAConstant T_Object T_undefined NotAConstant T_Object T_byte NotAConstant T_Object T_long NotAConstant T_Object T_short NotAConstant T_Object T_void NotAConstant T_Object T_String NotAConstant T_Object T_Object NotAConstant T_Object T_double NotAConstant T_Object T_float NotAConstant T_Object T_boolean NotAConstant T_Object T_char NotAConstant T_Object T_int NotAConstant T_double T_undefined NotAConstant T_double T_byte fromValue byteValue T_double T_long fromValue longValue T_double T_short fromValue shortValue T_double T_void NotAConstant T_double T_String NotAConstant T_double T_Object NotAConstant T_double T_double T_double T_float fromValue floatValue T_double T_boolean NotAConstant T_double T_char fromValue charValue T_double T_int fromValue intValue T_float T_undefined NotAConstant T_float T_byte fromValue byteValue T_float T_long fromValue longValue T_float T_short fromValue shortValue T_float T_void NotAConstant T_float T_String NotAConstant T_float T_Object NotAConstant T_float T_double fromValue doubleValue T_float T_float T_float T_boolean NotAConstant T_float T_char fromValue charValue T_float T_int fromValue intValue T_boolean T_undefined NotAConstant T_boolean T_byte NotAConstant T_boolean T_long NotAConstant T_boolean T_short NotAConstant T_boolean T_void NotAConstant T_boolean T_String NotAConstant T_boolean T_Object NotAConstant T_boolean T_double NotAConstant T_boolean T_float NotAConstant T_boolean T_boolean T_boolean T_char NotAConstant T_boolean T_int NotAConstant T_char T_undefined NotAConstant T_char T_byte fromValue byteValue T_char T_long fromValue longValue T_char T_short fromValue shortValue T_char T_void NotAConstant T_char T_String NotAConstant T_char T_Object NotAConstant T_char T_double fromValue doubleValue T_char T_float fromValue floatValue T_char T_boolean NotAConstant T_char T_char T_char T_int fromValue intValue T_int T_undefined NotAConstant T_int T_byte fromValue byteValue
public char char Value throw new Should Not Implement Util bind constant cannot Casted Into type Name char NON NLS 1 NON NLS 2  charValue ShouldNotImplement cannotCastedInto typeName
public static final Constant compute Constant Operation Constant cst int id int operator switch operator case NOT return Constant from Value cst boolean Value case PLUS return cst case MINUS the two special 9223372036854775808L and 2147483648 are inlined at parse Time switch id case T float float f if f cst float Value 0 0f positive and negative 0 if Float float To Int Bits f 0 return Constant from Value 0 0f else return Constant from Value 0 0f break default case case T double double d if d cst double Value 0 0d positive and negative 0 if Double double To Long Bits d 0 return Constant from Value 0 0d else return Constant from Value 0 0d break default case return compute Constant OperationMINUS Zero T int operator cst id case TWIDDLE switch id case T char return Constant from Value cst char Value case T byte return Constant from Value cst byte Value case T short return Constant from Value cst short Value case T int return Constant from Value cst int Value case T long return Constant from Value cst long Value default return NotA Constant default return NotA Constant  computeConstantOperation fromValue booleanValue parseTime T_float floatValue floatToIntBits fromValue fromValue T_double doubleValue doubleToLongBits fromValue fromValue computeConstantOperationMINUS T_int T_char fromValue charValue T_byte fromValue byteValue T_short fromValue shortValue T_int fromValue intValue T_long fromValue longValue NotAConstant NotAConstant
public static final Constant compute Constant Operation Constant left int left Id int operator Constant right int right Id switch operator case AND return compute Constant OperationAND left left Id operator right right Id case AND AND return computeConstantOperationAND AND left left Id operator right right Id case DIVIDE return compute Constant OperationDIVIDE left left Id operator right right Id case GREATER return compute Constant OperationGREATER left left Id operator right right Id case GREATER EQUAL return computeConstantOperationGREATER EQUAL left left Id operator right right Id case LEFT SHIFT return computeConstantOperationLEFT SHIFT left left Id operator right right Id case LESS return compute Constant OperationLESS left left Id operator right right Id case LESS EQUAL return computeConstantOperationLESS EQUAL left left Id operator right right Id case MINUS return compute Constant OperationMINUS left left Id operator right right Id case MULTIPLY return compute Constant OperationMULTIPLY left left Id operator right right Id case OR return compute Constant OperationOR left left Id operator right right Id case OR OR return computeConstantOperationOR OR left left Id operator right right Id case PLUS return compute Constant OperationPLUS left left Id operator right right Id case REMAINDER return compute Constant OperationREMAINDER left left Id operator right right Id case RIGHT SHIFT return computeConstantOperationRIGHT SHIFT left left Id operator right right Id case UNSIGNED RIGHT SHIFT return computeConstantOperationUNSIGNED RIGHT SHIFT left left Id operator right right Id case XOR return compute Constant OperationXOR left left Id operator right right Id default return NotA Constant  computeConstantOperation leftId rightId computeConstantOperationAND leftId rightId AND_AND computeConstantOperationAND_AND leftId rightId computeConstantOperationDIVIDE leftId rightId computeConstantOperationGREATER leftId rightId GREATER_EQUAL computeConstantOperationGREATER_EQUAL leftId rightId LEFT_SHIFT computeConstantOperationLEFT_SHIFT leftId rightId computeConstantOperationLESS leftId rightId LESS_EQUAL computeConstantOperationLESS_EQUAL leftId rightId computeConstantOperationMINUS leftId rightId computeConstantOperationMULTIPLY leftId rightId computeConstantOperationOR leftId rightId OR_OR computeConstantOperationOR_OR leftId rightId computeConstantOperationPLUS leftId rightId computeConstantOperationREMAINDER leftId rightId RIGHT_SHIFT computeConstantOperationRIGHT_SHIFT leftId rightId UNSIGNED_RIGHT_SHIFT computeConstantOperationUNSIGNED_RIGHT_SHIFT leftId rightId computeConstantOperationXOR leftId rightId NotAConstant
public static final Constant compute Constant OperationAND Constant left int left Id int operator Constant right int right Id switch left Id case T boolean return Constant from Value left boolean Value right boolean Value case T char switch right Id case T char return Constant from Value left char Value right char Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value return NotA Constant  computeConstantOperationAND leftId rightId leftId T_boolean fromValue booleanValue booleanValue T_char rightId T_char fromValue charValue charValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_byte rightId T_char fromValue byteValue charValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_short rightId T_char fromValue shortValue charValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_int rightId T_char fromValue intValue charValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_long rightId T_char fromValue longValue charValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue NotAConstant
public static final Constant computeConstantOperationAND AND Constant left int left Id int operator Constant right int right Id return Constant from Value left boolean Value right boolean Value  computeConstantOperationAND_AND leftId rightId fromValue booleanValue booleanValue
public static final Constant compute Constant OperationDIVIDE Constant left int left Id int operator Constant right int right Id division by zero must be handled outside this method error reporting switch left Id case T char switch right Id case T char return Constant from Value left char Value right char Value case T float return Constant from Value left char Value right float Value case T double return Constant from Value left char Value right double Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value break case T float switch right Id case T char return Constant from Value left float Value right char Value case T float return Constant from Value left float Value right float Value case T double return Constant from Value left float Value right double Value case T byte return Constant from Value left float Value right byte Value case T short return Constant from Value left float Value right short Value case T int return Constant from Value left float Value right int Value case T long return Constant from Value left float Value right long Value break case T double switch right Id case T char return Constant from Value left double Value right char Value case T float return Constant from Value left double Value right float Value case T double return Constant from Value left double Value right double Value case T byte return Constant from Value left double Value right byte Value case T short return Constant from Value left double Value right short Value case T int return Constant from Value left double Value right int Value case T long return Constant from Value left double Value right long Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T float return Constant from Value left byte Value right float Value case T double return Constant from Value left byte Value right double Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T float return Constant from Value left short Value right float Value case T double return Constant from Value left short Value right double Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T float return Constant from Value left int Value right float Value case T double return Constant from Value left int Value right double Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T float return Constant from Value left long Value right float Value case T double return Constant from Value left long Value right double Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value return NotA Constant  computeConstantOperationDIVIDE leftId rightId leftId T_char rightId T_char fromValue charValue charValue T_float fromValue charValue floatValue T_double fromValue charValue doubleValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_float rightId T_char fromValue floatValue charValue T_float fromValue floatValue floatValue T_double fromValue floatValue doubleValue T_byte fromValue floatValue byteValue T_short fromValue floatValue shortValue T_int fromValue floatValue intValue T_long fromValue floatValue longValue T_double rightId T_char fromValue doubleValue charValue T_float fromValue doubleValue floatValue T_double fromValue doubleValue doubleValue T_byte fromValue doubleValue byteValue T_short fromValue doubleValue shortValue T_int fromValue doubleValue intValue T_long fromValue doubleValue longValue T_byte rightId T_char fromValue byteValue charValue T_float fromValue byteValue floatValue T_double fromValue byteValue doubleValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_short rightId T_char fromValue shortValue charValue T_float fromValue shortValue floatValue T_double fromValue shortValue doubleValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_int rightId T_char fromValue intValue charValue T_float fromValue intValue floatValue T_double fromValue intValue doubleValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_long rightId T_char fromValue longValue charValue T_float fromValue longValue floatValue T_double fromValue longValue doubleValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue NotAConstant
public static final Constant computeConstantOperationEQUAL EQUAL Constant left int left Id int operator Constant right int right Id switch left Id case T boolean if right Id T boolean return Constant from Value left boolean Value right boolean Value break case T char switch right Id case T char return Constant from Value left char Value right char Value case T float return Constant from Value left char Value right float Value case T double return Constant from Value left char Value right double Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value break case T float switch right Id case T char return Constant from Value left float Value right char Value case T float return Constant from Value left float Value right float Value case T double return Constant from Value left float Value right double Value case T byte return Constant from Value left float Value right byte Value case T short return Constant from Value left float Value right short Value case T int return Constant from Value left float Value right int Value case T long return Constant from Value left float Value right long Value break case T double switch right Id case T char return Constant from Value left double Value right char Value case T float return Constant from Value left double Value right float Value case T double return Constant from Value left double Value right double Value case T byte return Constant from Value left double Value right byte Value case T short return Constant from Value left double Value right short Value case T int return Constant from Value left double Value right int Value case T long return Constant from Value left double Value right long Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T float return Constant from Value left byte Value right float Value case T double return Constant from Value left byte Value right double Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T float return Constant from Value left short Value right float Value case T double return Constant from Value left short Value right double Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T float return Constant from Value left int Value right float Value case T double return Constant from Value left int Value right double Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T float return Constant from Value left long Value right float Value case T double return Constant from Value left long Value right double Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value break case T String if right Id T String String are interned in th compiler thus if two string constant get to be compared it is an equal on the vale which is done return Constant from Value String Constant left compile Time Equal String Constant right break case T null if right Id T String return Constant from Value false else if right Id T null return Constant from Value true return Constant from Value false  computeConstantOperationEQUAL_EQUAL leftId rightId leftId T_boolean rightId T_boolean fromValue booleanValue booleanValue T_char rightId T_char fromValue charValue charValue T_float fromValue charValue floatValue T_double fromValue charValue doubleValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_float rightId T_char fromValue floatValue charValue T_float fromValue floatValue floatValue T_double fromValue floatValue doubleValue T_byte fromValue floatValue byteValue T_short fromValue floatValue shortValue T_int fromValue floatValue intValue T_long fromValue floatValue longValue T_double rightId T_char fromValue doubleValue charValue T_float fromValue doubleValue floatValue T_double fromValue doubleValue doubleValue T_byte fromValue doubleValue byteValue T_short fromValue doubleValue shortValue T_int fromValue doubleValue intValue T_long fromValue doubleValue longValue T_byte rightId T_char fromValue byteValue charValue T_float fromValue byteValue floatValue T_double fromValue byteValue doubleValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_short rightId T_char fromValue shortValue charValue T_float fromValue shortValue floatValue T_double fromValue shortValue doubleValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_int rightId T_char fromValue intValue charValue T_float fromValue intValue floatValue T_double fromValue intValue doubleValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_long rightId T_char fromValue longValue charValue T_float fromValue longValue floatValue T_double fromValue longValue doubleValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue T_String rightId T_String fromValue StringConstant compileTimeEqual StringConstant T_null rightId T_String fromValue rightId T_null fromValue fromValue
public static final Constant compute Constant OperationGREATER Constant left int left Id int operator Constant right int right Id switch left Id case T char switch right Id case T char return Constant from Value left char Value right char Value case T float return Constant from Value left char Value right float Value case T double return Constant from Value left char Value right double Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value break case T float switch right Id case T char return Constant from Value left float Value right char Value case T float return Constant from Value left float Value right float Value case T double return Constant from Value left float Value right double Value case T byte return Constant from Value left float Value right byte Value case T short return Constant from Value left float Value right short Value case T int return Constant from Value left float Value right int Value case T long return Constant from Value left float Value right long Value break case T double switch right Id case T char return Constant from Value left double Value right char Value case T float return Constant from Value left double Value right float Value case T double return Constant from Value left double Value right double Value case T byte return Constant from Value left double Value right byte Value case T short return Constant from Value left double Value right short Value case T int return Constant from Value left double Value right int Value case T long return Constant from Value left double Value right long Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T float return Constant from Value left byte Value right float Value case T double return Constant from Value left byte Value right double Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T float return Constant from Value left short Value right float Value case T double return Constant from Value left short Value right double Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T float return Constant from Value left int Value right float Value case T double return Constant from Value left int Value right double Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T float return Constant from Value left long Value right float Value case T double return Constant from Value left long Value right double Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value return NotA Constant  computeConstantOperationGREATER leftId rightId leftId T_char rightId T_char fromValue charValue charValue T_float fromValue charValue floatValue T_double fromValue charValue doubleValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_float rightId T_char fromValue floatValue charValue T_float fromValue floatValue floatValue T_double fromValue floatValue doubleValue T_byte fromValue floatValue byteValue T_short fromValue floatValue shortValue T_int fromValue floatValue intValue T_long fromValue floatValue longValue T_double rightId T_char fromValue doubleValue charValue T_float fromValue doubleValue floatValue T_double fromValue doubleValue doubleValue T_byte fromValue doubleValue byteValue T_short fromValue doubleValue shortValue T_int fromValue doubleValue intValue T_long fromValue doubleValue longValue T_byte rightId T_char fromValue byteValue charValue T_float fromValue byteValue floatValue T_double fromValue byteValue doubleValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_short rightId T_char fromValue shortValue charValue T_float fromValue shortValue floatValue T_double fromValue shortValue doubleValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_int rightId T_char fromValue intValue charValue T_float fromValue intValue floatValue T_double fromValue intValue doubleValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_long rightId T_char fromValue longValue charValue T_float fromValue longValue floatValue T_double fromValue longValue doubleValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue NotAConstant
public static final Constant computeConstantOperationGREATER EQUAL Constant left int left Id int operator Constant right int right Id switch left Id case T char switch right Id case T char return Constant from Value left char Value right char Value case T float return Constant from Value left char Value right float Value case T double return Constant from Value left char Value right double Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value break case T float switch right Id case T char return Constant from Value left float Value right char Value case T float return Constant from Value left float Value right float Value case T double return Constant from Value left float Value right double Value case T byte return Constant from Value left float Value right byte Value case T short return Constant from Value left float Value right short Value case T int return Constant from Value left float Value right int Value case T long return Constant from Value left float Value right long Value break case T double switch right Id case T char return Constant from Value left double Value right char Value case T float return Constant from Value left double Value right float Value case T double return Constant from Value left double Value right double Value case T byte return Constant from Value left double Value right byte Value case T short return Constant from Value left double Value right short Value case T int return Constant from Value left double Value right int Value case T long return Constant from Value left double Value right long Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T float return Constant from Value left byte Value right float Value case T double return Constant from Value left byte Value right double Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T float return Constant from Value left short Value right float Value case T double return Constant from Value left short Value right double Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T float return Constant from Value left int Value right float Value case T double return Constant from Value left int Value right double Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T float return Constant from Value left long Value right float Value case T double return Constant from Value left long Value right double Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value return NotA Constant  computeConstantOperationGREATER_EQUAL leftId rightId leftId T_char rightId T_char fromValue charValue charValue T_float fromValue charValue floatValue T_double fromValue charValue doubleValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_float rightId T_char fromValue floatValue charValue T_float fromValue floatValue floatValue T_double fromValue floatValue doubleValue T_byte fromValue floatValue byteValue T_short fromValue floatValue shortValue T_int fromValue floatValue intValue T_long fromValue floatValue longValue T_double rightId T_char fromValue doubleValue charValue T_float fromValue doubleValue floatValue T_double fromValue doubleValue doubleValue T_byte fromValue doubleValue byteValue T_short fromValue doubleValue shortValue T_int fromValue doubleValue intValue T_long fromValue doubleValue longValue T_byte rightId T_char fromValue byteValue charValue T_float fromValue byteValue floatValue T_double fromValue byteValue doubleValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_short rightId T_char fromValue shortValue charValue T_float fromValue shortValue floatValue T_double fromValue shortValue doubleValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_int rightId T_char fromValue intValue charValue T_float fromValue intValue floatValue T_double fromValue intValue doubleValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_long rightId T_char fromValue longValue charValue T_float fromValue longValue floatValue T_double fromValue longValue doubleValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue NotAConstant
public static final Constant computeConstantOperationLEFT SHIFT Constant left int left Id int operator Constant right int right Id switch left Id case T char switch right Id case T char return Constant from Value left char Value right char Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value return NotA Constant  computeConstantOperationLEFT_SHIFT leftId rightId leftId T_char rightId T_char fromValue charValue charValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_byte rightId T_char fromValue byteValue charValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_short rightId T_char fromValue shortValue charValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_int rightId T_char fromValue intValue charValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_long rightId T_char fromValue longValue charValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue NotAConstant
public static final Constant compute Constant OperationLESS Constant left int left Id int operator Constant right int right Id switch left Id case T char switch right Id case T char return Constant from Value left char Value right char Value case T float return Constant from Value left char Value right float Value case T double return Constant from Value left char Value right double Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value break case T float switch right Id case T char return Constant from Value left float Value right char Value case T float return Constant from Value left float Value right float Value case T double return Constant from Value left float Value right double Value case T byte return Constant from Value left float Value right byte Value case T short return Constant from Value left float Value right short Value case T int return Constant from Value left float Value right int Value case T long return Constant from Value left float Value right long Value break case T double switch right Id case T char return Constant from Value left double Value right char Value case T float return Constant from Value left double Value right float Value case T double return Constant from Value left double Value right double Value case T byte return Constant from Value left double Value right byte Value case T short return Constant from Value left double Value right short Value case T int return Constant from Value left double Value right int Value case T long return Constant from Value left double Value right long Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T float return Constant from Value left byte Value right float Value case T double return Constant from Value left byte Value right double Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T float return Constant from Value left short Value right float Value case T double return Constant from Value left short Value right double Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T float return Constant from Value left int Value right float Value case T double return Constant from Value left int Value right double Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T float return Constant from Value left long Value right float Value case T double return Constant from Value left long Value right double Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value return NotA Constant  computeConstantOperationLESS leftId rightId leftId T_char rightId T_char fromValue charValue charValue T_float fromValue charValue floatValue T_double fromValue charValue doubleValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_float rightId T_char fromValue floatValue charValue T_float fromValue floatValue floatValue T_double fromValue floatValue doubleValue T_byte fromValue floatValue byteValue T_short fromValue floatValue shortValue T_int fromValue floatValue intValue T_long fromValue floatValue longValue T_double rightId T_char fromValue doubleValue charValue T_float fromValue doubleValue floatValue T_double fromValue doubleValue doubleValue T_byte fromValue doubleValue byteValue T_short fromValue doubleValue shortValue T_int fromValue doubleValue intValue T_long fromValue doubleValue longValue T_byte rightId T_char fromValue byteValue charValue T_float fromValue byteValue floatValue T_double fromValue byteValue doubleValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_short rightId T_char fromValue shortValue charValue T_float fromValue shortValue floatValue T_double fromValue shortValue doubleValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_int rightId T_char fromValue intValue charValue T_float fromValue intValue floatValue T_double fromValue intValue doubleValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_long rightId T_char fromValue longValue charValue T_float fromValue longValue floatValue T_double fromValue longValue doubleValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue NotAConstant
public static final Constant computeConstantOperationLESS EQUAL Constant left int left Id int operator Constant right int right Id switch left Id case T char switch right Id case T char return Constant from Value left char Value right char Value case T float return Constant from Value left char Value right float Value case T double return Constant from Value left char Value right double Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value break case T float switch right Id case T char return Constant from Value left float Value right char Value case T float return Constant from Value left float Value right float Value case T double return Constant from Value left float Value right double Value case T byte return Constant from Value left float Value right byte Value case T short return Constant from Value left float Value right short Value case T int return Constant from Value left float Value right int Value case T long return Constant from Value left float Value right long Value break case T double switch right Id case T char return Constant from Value left double Value right char Value case T float return Constant from Value left double Value right float Value case T double return Constant from Value left double Value right double Value case T byte return Constant from Value left double Value right byte Value case T short return Constant from Value left double Value right short Value case T int return Constant from Value left double Value right int Value case T long return Constant from Value left double Value right long Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T float return Constant from Value left byte Value right float Value case T double return Constant from Value left byte Value right double Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T float return Constant from Value left short Value right float Value case T double return Constant from Value left short Value right double Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T float return Constant from Value left int Value right float Value case T double return Constant from Value left int Value right double Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T float return Constant from Value left long Value right float Value case T double return Constant from Value left long Value right double Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value return NotA Constant  computeConstantOperationLESS_EQUAL leftId rightId leftId T_char rightId T_char fromValue charValue charValue T_float fromValue charValue floatValue T_double fromValue charValue doubleValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_float rightId T_char fromValue floatValue charValue T_float fromValue floatValue floatValue T_double fromValue floatValue doubleValue T_byte fromValue floatValue byteValue T_short fromValue floatValue shortValue T_int fromValue floatValue intValue T_long fromValue floatValue longValue T_double rightId T_char fromValue doubleValue charValue T_float fromValue doubleValue floatValue T_double fromValue doubleValue doubleValue T_byte fromValue doubleValue byteValue T_short fromValue doubleValue shortValue T_int fromValue doubleValue intValue T_long fromValue doubleValue longValue T_byte rightId T_char fromValue byteValue charValue T_float fromValue byteValue floatValue T_double fromValue byteValue doubleValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_short rightId T_char fromValue shortValue charValue T_float fromValue shortValue floatValue T_double fromValue shortValue doubleValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_int rightId T_char fromValue intValue charValue T_float fromValue intValue floatValue T_double fromValue intValue doubleValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_long rightId T_char fromValue longValue charValue T_float fromValue longValue floatValue T_double fromValue longValue doubleValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue NotAConstant
public static final Constant compute Constant OperationMINUS Constant left int left Id int operator Constant right int right Id switch left Id case T char switch right Id case T char return Constant from Value left char Value right char Value case T float return Constant from Value left char Value right float Value case T double return Constant from Value left char Value right double Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value break case T float switch right Id case T char return Constant from Value left float Value right char Value case T float return Constant from Value left float Value right float Value case T double return Constant from Value left float Value right double Value case T byte return Constant from Value left float Value right byte Value case T short return Constant from Value left float Value right short Value case T int return Constant from Value left float Value right int Value case T long return Constant from Value left float Value right long Value break case T double switch right Id case T char return Constant from Value left double Value right char Value case T float return Constant from Value left double Value right float Value case T double return Constant from Value left double Value right double Value case T byte return Constant from Value left double Value right byte Value case T short return Constant from Value left double Value right short Value case T int return Constant from Value left double Value right int Value case T long return Constant from Value left double Value right long Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T float return Constant from Value left byte Value right float Value case T double return Constant from Value left byte Value right double Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T float return Constant from Value left short Value right float Value case T double return Constant from Value left short Value right double Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T float return Constant from Value left int Value right float Value case T double return Constant from Value left int Value right double Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T float return Constant from Value left long Value right float Value case T double return Constant from Value left long Value right double Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value return NotA Constant  computeConstantOperationMINUS leftId rightId leftId T_char rightId T_char fromValue charValue charValue T_float fromValue charValue floatValue T_double fromValue charValue doubleValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_float rightId T_char fromValue floatValue charValue T_float fromValue floatValue floatValue T_double fromValue floatValue doubleValue T_byte fromValue floatValue byteValue T_short fromValue floatValue shortValue T_int fromValue floatValue intValue T_long fromValue floatValue longValue T_double rightId T_char fromValue doubleValue charValue T_float fromValue doubleValue floatValue T_double fromValue doubleValue doubleValue T_byte fromValue doubleValue byteValue T_short fromValue doubleValue shortValue T_int fromValue doubleValue intValue T_long fromValue doubleValue longValue T_byte rightId T_char fromValue byteValue charValue T_float fromValue byteValue floatValue T_double fromValue byteValue doubleValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_short rightId T_char fromValue shortValue charValue T_float fromValue shortValue floatValue T_double fromValue shortValue doubleValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_int rightId T_char fromValue intValue charValue T_float fromValue intValue floatValue T_double fromValue intValue doubleValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_long rightId T_char fromValue longValue charValue T_float fromValue longValue floatValue T_double fromValue longValue doubleValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue NotAConstant
public static final Constant compute Constant OperationMULTIPLY Constant left int left Id int operator Constant right int right Id switch left Id case T char switch right Id case T char return Constant from Value left char Value right char Value case T float return Constant from Value left char Value right float Value case T double return Constant from Value left char Value right double Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value break case T float switch right Id case T char return Constant from Value left float Value right char Value case T float return Constant from Value left float Value right float Value case T double return Constant from Value left float Value right double Value case T byte return Constant from Value left float Value right byte Value case T short return Constant from Value left float Value right short Value case T int return Constant from Value left float Value right int Value case T long return Constant from Value left float Value right long Value break case T double switch right Id case T char return Constant from Value left double Value right char Value case T float return Constant from Value left double Value right float Value case T double return Constant from Value left double Value right double Value case T byte return Constant from Value left double Value right byte Value case T short return Constant from Value left double Value right short Value case T int return Constant from Value left double Value right int Value case T long return Constant from Value left double Value right long Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T float return Constant from Value left byte Value right float Value case T double return Constant from Value left byte Value right double Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T float return Constant from Value left short Value right float Value case T double return Constant from Value left short Value right double Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T float return Constant from Value left int Value right float Value case T double return Constant from Value left int Value right double Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T float return Constant from Value left long Value right float Value case T double return Constant from Value left long Value right double Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value return NotA Constant  computeConstantOperationMULTIPLY leftId rightId leftId T_char rightId T_char fromValue charValue charValue T_float fromValue charValue floatValue T_double fromValue charValue doubleValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_float rightId T_char fromValue floatValue charValue T_float fromValue floatValue floatValue T_double fromValue floatValue doubleValue T_byte fromValue floatValue byteValue T_short fromValue floatValue shortValue T_int fromValue floatValue intValue T_long fromValue floatValue longValue T_double rightId T_char fromValue doubleValue charValue T_float fromValue doubleValue floatValue T_double fromValue doubleValue doubleValue T_byte fromValue doubleValue byteValue T_short fromValue doubleValue shortValue T_int fromValue doubleValue intValue T_long fromValue doubleValue longValue T_byte rightId T_char fromValue byteValue charValue T_float fromValue byteValue floatValue T_double fromValue byteValue doubleValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_short rightId T_char fromValue shortValue charValue T_float fromValue shortValue floatValue T_double fromValue shortValue doubleValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_int rightId T_char fromValue intValue charValue T_float fromValue intValue floatValue T_double fromValue intValue doubleValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_long rightId T_char fromValue longValue charValue T_float fromValue longValue floatValue T_double fromValue longValue doubleValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue NotAConstant
public static final Constant compute Constant OperationOR Constant left int left Id int operator Constant right int right Id switch left Id case T boolean return Constant from Value left boolean Value right boolean Value case T char switch right Id case T char return Constant from Value left char Value right char Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value return NotA Constant  computeConstantOperationOR leftId rightId leftId T_boolean fromValue booleanValue booleanValue T_char rightId T_char fromValue charValue charValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_byte rightId T_char fromValue byteValue charValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_short rightId T_char fromValue shortValue charValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_int rightId T_char fromValue intValue charValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_long rightId T_char fromValue longValue charValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue NotAConstant
public static final Constant computeConstantOperationOR OR Constant left int left Id int operator Constant right int right Id return Constant from Value left boolean Value right boolean Value  computeConstantOperationOR_OR leftId rightId fromValue booleanValue booleanValue
public static final Constant compute Constant OperationPLUS Constant left int left Id int operator Constant right int right Id switch left Id case T Object if right Id T String return Constant from Value left string Value right string Value case T boolean if right Id T String return Constant from Value left string Value right string Value break case T char switch right Id case T char return Constant from Value left char Value right char Value case T float return Constant from Value left char Value right float Value case T double return Constant from Value left char Value right double Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value case T String return Constant from Value left string Value right string Value break case T float switch right Id case T char return Constant from Value left float Value right char Value case T float return Constant from Value left float Value right float Value case T double return Constant from Value left float Value right double Value case T byte return Constant from Value left float Value right byte Value case T short return Constant from Value left float Value right short Value case T int return Constant from Value left float Value right int Value case T long return Constant from Value left float Value right long Value case T String return Constant from Value left string Value right string Value break case T double switch right Id case T char return Constant from Value left double Value right char Value case T float return Constant from Value left double Value right float Value case T double return Constant from Value left double Value right double Value case T byte return Constant from Value left double Value right byte Value case T short return Constant from Value left double Value right short Value case T int return Constant from Value left double Value right int Value case T long return Constant from Value left double Value right long Value case T String return Constant from Value left string Value right string Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T float return Constant from Value left byte Value right float Value case T double return Constant from Value left byte Value right double Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value case T String return Constant from Value left string Value right string Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T float return Constant from Value left short Value right float Value case T double return Constant from Value left short Value right double Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value case T String return Constant from Value left string Value right string Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T float return Constant from Value left int Value right float Value case T double return Constant from Value left int Value right double Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value case T String return Constant from Value left string Value right string Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T float return Constant from Value left long Value right float Value case T double return Constant from Value left long Value right double Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value case T String return Constant from Value left string Value right string Value break case T String switch right Id case T char return Constant from Value left string Value right string Value case T float return Constant from Value left string Value right string Value case T double return Constant from Value left string Value right string Value case T byte return Constant from Value left string Value right string Value case T short return Constant from Value left string Value right string Value case T int return Constant from Value left string Value right string Value case T long return Constant from Value left string Value right string Value case T String return Constant from Value left string Value right string Value case T boolean return Constant from Value left string Value right string Value break case T null switch right Id case T char return Constant from Value left string Value right string Value case T float return Constant from Value left string Value right string Value case T double return Constant from Value left string Value right string Value case T byte return Constant from Value left string Value right string Value case T short return Constant from Value left string Value right string Value case T int return Constant from Value left string Value right string Value case T long return Constant from Value left string Value right string Value case T String return Constant from Value left string Value right string Value return NotA Constant  computeConstantOperationPLUS leftId rightId leftId T_Object rightId T_String fromValue stringValue stringValue T_boolean rightId T_String fromValue stringValue stringValue T_char rightId T_char fromValue charValue charValue T_float fromValue charValue floatValue T_double fromValue charValue doubleValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_String fromValue stringValue stringValue T_float rightId T_char fromValue floatValue charValue T_float fromValue floatValue floatValue T_double fromValue floatValue doubleValue T_byte fromValue floatValue byteValue T_short fromValue floatValue shortValue T_int fromValue floatValue intValue T_long fromValue floatValue longValue T_String fromValue stringValue stringValue T_double rightId T_char fromValue doubleValue charValue T_float fromValue doubleValue floatValue T_double fromValue doubleValue doubleValue T_byte fromValue doubleValue byteValue T_short fromValue doubleValue shortValue T_int fromValue doubleValue intValue T_long fromValue doubleValue longValue T_String fromValue stringValue stringValue T_byte rightId T_char fromValue byteValue charValue T_float fromValue byteValue floatValue T_double fromValue byteValue doubleValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_String fromValue stringValue stringValue T_short rightId T_char fromValue shortValue charValue T_float fromValue shortValue floatValue T_double fromValue shortValue doubleValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_String fromValue stringValue stringValue T_int rightId T_char fromValue intValue charValue T_float fromValue intValue floatValue T_double fromValue intValue doubleValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_String fromValue stringValue stringValue T_long rightId T_char fromValue longValue charValue T_float fromValue longValue floatValue T_double fromValue longValue doubleValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue T_String fromValue stringValue stringValue T_String rightId T_char fromValue stringValue stringValue T_float fromValue stringValue stringValue T_double fromValue stringValue stringValue T_byte fromValue stringValue stringValue T_short fromValue stringValue stringValue T_int fromValue stringValue stringValue T_long fromValue stringValue stringValue T_String fromValue stringValue stringValue T_boolean fromValue stringValue stringValue T_null rightId T_char fromValue stringValue stringValue T_float fromValue stringValue stringValue T_double fromValue stringValue stringValue T_byte fromValue stringValue stringValue T_short fromValue stringValue stringValue T_int fromValue stringValue stringValue T_long fromValue stringValue stringValue T_String fromValue stringValue stringValue NotAConstant
public static final Constant compute Constant OperationREMAINDER Constant left int left Id int operator Constant right int right Id switch left Id case T char switch right Id case T char return Constant from Value left char Value right char Value case T float return Constant from Value left char Value right float Value case T double return Constant from Value left char Value right double Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value break case T float switch right Id case T char return Constant from Value left float Value right char Value case T float return Constant from Value left float Value right float Value case T double return Constant from Value left float Value right double Value case T byte return Constant from Value left float Value right byte Value case T short return Constant from Value left float Value right short Value case T int return Constant from Value left float Value right int Value case T long return Constant from Value left float Value right long Value break case T double switch right Id case T char return Constant from Value left double Value right char Value case T float return Constant from Value left double Value right float Value case T double return Constant from Value left double Value right double Value case T byte return Constant from Value left double Value right byte Value case T short return Constant from Value left double Value right short Value case T int return Constant from Value left double Value right int Value case T long return Constant from Value left double Value right long Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T float return Constant from Value left byte Value right float Value case T double return Constant from Value left byte Value right double Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T float return Constant from Value left short Value right float Value case T double return Constant from Value left short Value right double Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T float return Constant from Value left int Value right float Value case T double return Constant from Value left int Value right double Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T float return Constant from Value left long Value right float Value case T double return Constant from Value left long Value right double Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value return NotA Constant  computeConstantOperationREMAINDER leftId rightId leftId T_char rightId T_char fromValue charValue charValue T_float fromValue charValue floatValue T_double fromValue charValue doubleValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_float rightId T_char fromValue floatValue charValue T_float fromValue floatValue floatValue T_double fromValue floatValue doubleValue T_byte fromValue floatValue byteValue T_short fromValue floatValue shortValue T_int fromValue floatValue intValue T_long fromValue floatValue longValue T_double rightId T_char fromValue doubleValue charValue T_float fromValue doubleValue floatValue T_double fromValue doubleValue doubleValue T_byte fromValue doubleValue byteValue T_short fromValue doubleValue shortValue T_int fromValue doubleValue intValue T_long fromValue doubleValue longValue T_byte rightId T_char fromValue byteValue charValue T_float fromValue byteValue floatValue T_double fromValue byteValue doubleValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_short rightId T_char fromValue shortValue charValue T_float fromValue shortValue floatValue T_double fromValue shortValue doubleValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_int rightId T_char fromValue intValue charValue T_float fromValue intValue floatValue T_double fromValue intValue doubleValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_long rightId T_char fromValue longValue charValue T_float fromValue longValue floatValue T_double fromValue longValue doubleValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue NotAConstant
public static final Constant computeConstantOperationRIGHT SHIFT Constant left int left Id int operator Constant right int right Id switch left Id case T char switch right Id case T char return Constant from Value left char Value right char Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value return NotA Constant  computeConstantOperationRIGHT_SHIFT leftId rightId leftId T_char rightId T_char fromValue charValue charValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_byte rightId T_char fromValue byteValue charValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_short rightId T_char fromValue shortValue charValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_int rightId T_char fromValue intValue charValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_long rightId T_char fromValue longValue charValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue NotAConstant
public static final Constant computeConstantOperationUNSIGNED RIGHT SHIFT Constant left int left Id int operator Constant right int right Id switch left Id case T char switch right Id case T char return Constant from Value left char Value right char Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value return NotA Constant  computeConstantOperationUNSIGNED_RIGHT_SHIFT leftId rightId leftId T_char rightId T_char fromValue charValue charValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_byte rightId T_char fromValue byteValue charValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_short rightId T_char fromValue shortValue charValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_int rightId T_char fromValue intValue charValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_long rightId T_char fromValue longValue charValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue NotAConstant
public static final Constant compute Constant OperationXOR Constant left int left Id int operator Constant right int right Id switch left Id case T boolean return Constant from Value left boolean Value right boolean Value case T char switch right Id case T char return Constant from Value left char Value right char Value case T byte return Constant from Value left char Value right byte Value case T short return Constant from Value left char Value right short Value case T int return Constant from Value left char Value right int Value case T long return Constant from Value left char Value right long Value break case T byte switch right Id case T char return Constant from Value left byte Value right char Value case T byte return Constant from Value left byte Value right byte Value case T short return Constant from Value left byte Value right short Value case T int return Constant from Value left byte Value right int Value case T long return Constant from Value left byte Value right long Value break case T short switch right Id case T char return Constant from Value left short Value right char Value case T byte return Constant from Value left short Value right byte Value case T short return Constant from Value left short Value right short Value case T int return Constant from Value left short Value right int Value case T long return Constant from Value left short Value right long Value break case T int switch right Id case T char return Constant from Value left int Value right char Value case T byte return Constant from Value left int Value right byte Value case T short return Constant from Value left int Value right short Value case T int return Constant from Value left int Value right int Value case T long return Constant from Value left int Value right long Value break case T long switch right Id case T char return Constant from Value left long Value right char Value case T byte return Constant from Value left long Value right byte Value case T short return Constant from Value left long Value right short Value case T int return Constant from Value left long Value right int Value case T long return Constant from Value left long Value right long Value return NotA Constant  computeConstantOperationXOR leftId rightId leftId T_boolean fromValue booleanValue booleanValue T_char rightId T_char fromValue charValue charValue T_byte fromValue charValue byteValue T_short fromValue charValue shortValue T_int fromValue charValue intValue T_long fromValue charValue longValue T_byte rightId T_char fromValue byteValue charValue T_byte fromValue byteValue byteValue T_short fromValue byteValue shortValue T_int fromValue byteValue intValue T_long fromValue byteValue longValue T_short rightId T_char fromValue shortValue charValue T_byte fromValue shortValue byteValue T_short fromValue shortValue shortValue T_int fromValue shortValue intValue T_long fromValue shortValue longValue T_int rightId T_char fromValue intValue charValue T_byte fromValue intValue byteValue T_short fromValue intValue shortValue T_int fromValue intValue intValue T_long fromValue intValue longValue T_long rightId T_char fromValue longValue charValue T_byte fromValue longValue byteValue T_short fromValue longValue shortValue T_int fromValue longValue intValue T_long fromValue longValue longValue NotAConstant
public double double Value throw new Should Not Implement Util bind constant cannot Casted Into type Name double NON NLS 2 NON NLS 1  doubleValue ShouldNotImplement cannotCastedInto typeName
public float float Value throw new Should Not Implement Util bind constant cannot Casted Into type Name float NON NLS 2 NON NLS 1  floatValue ShouldNotImplement cannotCastedInto typeName
public static Constant from Value byte value return new Byte Constant value  fromValue ByteConstant
public static Constant from Value char value return new Char Constant value  fromValue CharConstant
public static Constant from Value double value return new Double Constant value  fromValue DoubleConstant
public static Constant from Value float value return new Float Constant value  fromValue FloatConstant
public static Constant from Value int value return new Int Constant value  fromValue IntConstant
public static Constant from Value long value return new Long Constant value  fromValue LongConstant
public static Constant from Value String value return new String Constant value  fromValue StringConstant
public static Constant from Value short value return new Short Constant value  fromValue ShortConstant
public static Constant from Value boolean value return new Boolean Constant value  fromValue BooleanConstant
public int int Value throw new Should Not Implement Util bind constant cannot Casted Into type Name int NON NLS 2 NON NLS 1  intValue ShouldNotImplement cannotCastedInto typeName
public long long Value throw new Should Not Implement Util bind constant cannot Casted Into type Name long NON NLS 2 NON NLS 1  longValue ShouldNotImplement cannotCastedInto typeName
public short short Value throw new Should Not Implement Util bind constant cannot Converted To type Name short NON NLS 2 NON NLS 1  shortValue ShouldNotImplement cannotConvertedTo typeName
public String string Value throw new Should Not Implement Util bind constant cannot Converted To type Name String NON NLS 1 NON NLS 2  stringValue ShouldNotImplement cannotConvertedTo typeName
public String to String if this NotA Constant return Constant NotA Constant NON NLS 1 return super to String  toString NotAConstant NotAConstant toString
return super to String public abstract int typeID  toString
public String type Name switch typeID case T int return int NON NLS 1 case T byte return byte NON NLS 1 case T short return short NON NLS 1 case T char return char NON NLS 1 case T float return float NON NLS 1 case T double return double NON NLS 1 case T boolean return boolean NON NLS 1 case T long return long NON NLS 1 case T String return java lang String NON NLS 1 case T null return null NON NLS 1 default return unknown NON NLS 1  typeName T_int T_byte T_short T_char T_float T_double T_boolean T_long T_String T_null

double value public Double Constant double value this value value  DoubleConstant
public byte byte Value return byte value  byteValue
public char char Value return char value  charValue
public double double Value return this value  doubleValue
public float float Value return float value  floatValue
public int int Value return int value  intValue
public long long Value return long value  longValue
public short short Value return short value  shortValue
public String string Value String s Double to String value if s null return null NON NLS 1 return s  stringValue toString
public String to String if this NotA Constant return Constant NotA Constant NON NLS 1 return double value NON NLS 1  toString NotAConstant NotAConstant
public int typeID return T double  T_double

float value public Float Constant float value this value value  FloatConstant
public byte byte Value return byte value  byteValue
public char char Value return char value  charValue
public double double Value return value implicit cast to return type  doubleValue
public float float Value return this value  floatValue
public int int Value return int value  intValue
public long long Value return long value  longValue
public short short Value return short value  shortValue
public String string Value String s Float to String value if s null return null NON NLS 1 return s  stringValue toString
public String to String return float value NON NLS 1  toString
public int typeID return T float  T_float

int value public Int Constant int value this value value  IntConstant
public byte byte Value return byte value  byteValue
public char char Value return char value  charValue
public double double Value return value implicit cast to return type  doubleValue
public float float Value return value implicit cast to return type  floatValue
public int int Value return value  intValue
public long long Value return value implicit cast to return type  longValue
public short short Value return short value  shortValue
public String string Value spec 15 17 11 String s new Integer value to String if s null return null NON NLS 1 return s  stringValue toString
public String to String return int value NON NLS 1  toString
public int typeID return T int  T_int

public interface I Type Requestor Accept the resolved binary form for the requested type void accept I Binary Type binary Type Package Binding package Binding  ITypeRequestor IBinaryType binaryType PackageBinding packageBinding
void accept I Binary Type binary Type Package Binding package Binding Accept the requested type s compilation unit void accept I Compilation Unit unit  IBinaryType binaryType PackageBinding packageBinding ICompilationUnit
Accept the unresolved source forms for the requested type Note that the multiple source forms can be answered in case the target compilation unit contains multiple types The first one is then guaranteed to be the one corresponding to the requested type 

public class Long Constant extends Constant long value public Long Constant long value this value value  LongConstant LongConstant
this value value public byte byte Value return byte value  byteValue
return byte value public char char Value return char value  charValue
return char value public double double Value return value implicit cast to return type  doubleValue
return value implicit cast to return type public float float Value return value implicit cast to return type  floatValue
return value implicit cast to return type public int int Value return int value  intValue
return int value public long long Value return value  longValue
return value public short short Value return short value  shortValue
public String string Value spec 15 17 11 String s new Long value to String if s null return null NON NLS 1 return s  stringValue toString
return s public String to String return long value NON NLS 1  toString
return long value NON NLS 1 public int typeID return T long  T_long

public interface Reference Context void abort int abort Level I Problem problem  ReferenceContext abortLevel IProblem
public interface Reference Context void abort int abort Level I Problem problem Compilation Result compilation Result  ReferenceContext abortLevel IProblem CompilationResult compilationResult
void abort int abort Level I Problem problem Compilation Result compilation Result void tag As Having Errors  abortLevel IProblem CompilationResult compilationResult tagAsHavingErrors
Compilation Result compilation Result void tag As Having Errors boolean has Errors  CompilationResult compilationResult tagAsHavingErrors hasErrors

public class Short Constant extends Constant short value public Short Constant short value this value value  ShortConstant ShortConstant
this value value public byte byte Value return byte value  byteValue
return byte value public char char Value return char value  charValue
return char value public double double Value return value implicit cast to return type  doubleValue
return value implicit cast to return type public float float Value return value implicit cast to return type  floatValue
return value implicit cast to return type public int int Value return value implicit cast to return type  intValue
return value implicit cast to return type public long long Value return value implicit cast to return type  longValue
return value implicit cast to return type public short short Value return value  shortValue
public String string Value spec 15 17 11 String s new Integer value to String if s null return null NON NLS 1 return s  stringValue toString
return s public String to String return short value NON NLS 1  toString
return short value NON NLS 1 public int typeID return T short  T_short

public String value public String Constant String value this value value  StringConstant
public boolean compile Time Equal String Constant right String are intermed in the compiler thus if two string constant get to be compared it is an equal on the vale which is done if this value null return right value null return this value equals right value  compileTimeEqual StringConstant
public String string Value spec 15 17 11 the next line do not go into the to String send return value String s value to String if s null return null else return s  stringValue toString toString
public String to String return String value NON NLS 2 NON NLS 1  toString
return String value NON NLS 2 NON NLS 1 public int typeID return T String  T_String

I Problem create Problem char originating File Name int problem Id String problem Arguments String message Arguments shorter versions of the problem Arguments int severity int start Position int end Position  IProblem createProblem originatingFileName problemId problemArguments messageArguments problemArguments startPosition endPosition
int line Number Locale get Locale  lineNumber getLocale
Locale get Locale String get Localized Message int problem Id String message Arguments  getLocale getLocalizedMessage problemId messageArguments

public interface I Source Element Requestor void accept Constructor Reference char type Name int arg Count int source Position  ISourceElementRequestor acceptConstructorReference typeName argCount sourcePosition
public interface I Source Element Requestor void accept Constructor Reference char type Name int arg Count int source Position void accept Field Reference char field Name int source Position  ISourceElementRequestor acceptConstructorReference typeName argCount sourcePosition acceptFieldReference fieldName sourcePosition
void accept Field Reference char field Name int source Position param declaration Start This is the position of the first character of the import keyword param declaration End This is the position of the ending the import statement or the end of the comment following the import param name This is the name of the import like specified in the source including the dots The is never included in the name param on Demand set to true if the import is an import on demand e g import java io False otherwise param modifiers can be set to static from 1 5 on void accept Import int declaration Start int declaration End char name boolean on Demand  acceptFieldReference fieldName sourcePosition declarationStart declarationEnd onDemand acceptImport declarationStart declarationEnd onDemand
void accept Line Separator Positions int positions  acceptLineSeparatorPositions
void accept Line Separator Positions int positions void accept Method Reference char method Name int arg Count int source Position  acceptLineSeparatorPositions acceptMethodReference methodName argCount sourcePosition
void accept Line Separator Positions int positions void accept Method Reference char method Name int arg Count int source Position void accept Package int declaration Start int declaration End char name  acceptLineSeparatorPositions acceptMethodReference methodName argCount sourcePosition acceptPackage declarationStart declarationEnd
int declaration End char name void accept Problem I Problem problem  declarationEnd acceptProblem IProblem
char name void accept Problem I Problem problem void accept Type Reference char type Name int source Start int source End  acceptProblem IProblem acceptTypeReference typeName sourceStart sourceEnd
void accept Problem I Problem problem void accept Type Reference char type Name int source Start int source End void accept Type Reference char type Name int source Position  acceptProblem IProblem acceptTypeReference typeName sourceStart sourceEnd acceptTypeReference typeName sourcePosition
void accept Type Reference char type Name int source Start int source End void accept Type Reference char type Name int source Position void accept Unknown Reference char name int source Start int source End  acceptTypeReference typeName sourceStart sourceEnd acceptTypeReference typeName sourcePosition acceptUnknownReference sourceStart sourceEnd
void accept Type Reference char type Name int source Position void accept Unknown Reference char name int source Start int source End void accept Unknown Reference char name int source Position  acceptTypeReference typeName sourcePosition acceptUnknownReference sourceStart sourceEnd acceptUnknownReference sourcePosition
void accept Unknown Reference char name int source Position void enter Class int declaration Start int modifiers char name int name Source Start int name Source End char superclass  acceptUnknownReference sourcePosition enterClass declarationStart nameSourceStart nameSourceEnd
char superclass char superinterfaces void enter Compilation Unit  enterCompilationUnit
void enter Compilation Unit void enter Constructor int declaration Start int modifiers char name int name Source Start int name Source End char parameter Types char parameter Names  enterCompilationUnit enterConstructor declarationStart nameSourceStart nameSourceEnd parameterTypes parameterNames
char exception Types void enter Field int declaration Start int modifiers char type char name int name Source Start  exceptionTypes enterField declarationStart nameSourceStart
int name Source Start int name Source End void enter Initializer int declaration Start int modifiers  nameSourceStart nameSourceEnd enterInitializer declarationStart
int modifiers void enter Interface int declaration Start int modifiers char name int name Source Start int name Source End  enterInterface declarationStart nameSourceStart nameSourceEnd
char superinterfaces void enter Method int declaration Start int modifiers char return Type char name int name Source Start int name Source End char parameter Types char parameter Names  enterMethod declarationStart returnType nameSourceStart nameSourceEnd parameterTypes parameterNames
char parameter Names char exception Types void exit Class int declaration End  parameterNames exceptionTypes exitClass declarationEnd
char exception Types void exit Class int declaration End void exit Compilation Unit int declaration End  exceptionTypes exitClass declarationEnd exitCompilationUnit declarationEnd
void exit Class int declaration End void exit Compilation Unit int declaration End void exit Constructor int declaration End  exitClass declarationEnd exitCompilationUnit declarationEnd exitConstructor declarationEnd
the field if any 1 if no initialization void exit Field int initialization Start int declaration End int declaration Source End  exitField initializationStart declarationEnd declarationSourceEnd
void exit Field int initialization Start int declaration End int declaration Source End void exit Initializer int declaration End  exitField initializationStart declarationEnd declarationSourceEnd exitInitializer declarationEnd
void exit Field int initialization Start int declaration End int declaration Source End void exit Initializer int declaration End void exit Interface int declaration End  exitField initializationStart declarationEnd declarationSourceEnd exitInitializer declarationEnd exitInterface declarationEnd
void exit Initializer int declaration End void exit Interface int declaration End void exit Method int declaration End  exitInitializer declarationEnd exitInterface declarationEnd exitMethod declarationEnd

char constant Pool Name public Array Binding Type Binding type int dimensions this tag Bits Is Array Type this leaf Component Type type this dimensions dimensions  constantPoolName ArrayBinding TypeBinding tagBits IsArrayType leafComponentType
Answer the receiver s constant pool name NOTE This method should only be used during after code gen e g Ljava lang Object public char constant Pool Name if constant Pool Name null return constant Pool Name char brackets new char dimensions for int i dimensions 1 i 0 i brackets i return constant Pool Name Char Operation concat brackets leaf Component Type signature  constantPoolName constantPoolName constantPoolName constantPoolName CharOperation leafComponentType
String debug Name String Buffer brackets new String Buffer dimensions 2 for int i dimensions i 0 brackets append NON NLS 1 return leaf Component Type debug Name brackets to String  debugName StringBuffer StringBuffer leafComponentType debugName toString
return leaf Component Type debug Name brackets to String public int dimensions return this dimensions  leafComponentType debugName toString
public Type Binding elements Type Scope scope if dimensions 1 return leaf Component Type return scope create Array leaf Component Type dimensions 1  TypeBinding elementsType leafComponentType createArray leafComponentType
return scope create Array leaf Component Type dimensions 1 public Package Binding get Package return leaf Component Type get Package  createArray leafComponentType PackageBinding getPackage leafComponentType getPackage
public boolean is Compatible With Type Binding right if this right return true if right is Array Type Array Binding right Array Array Binding right if right Array leaf Component Type is Base Type return false relying on the fact that all equal arrays are identical if dimensions right Array dimensions return leaf Component Type is Compatible With right Array leaf Component Type if dimensions right Array dimensions return false cannot assign String into Object but can assign byte into Object else if right is Base Type return false Check dimensions Java does not support explicitly sized dimensions for types However if it did the type checking support would go here switch right leaf Component Type id case T JavaLangObject case T JavaLangCloneable case T JavaIoSerializable return true return false  isCompatibleWith TypeBinding isArrayType ArrayBinding rightArray ArrayBinding rightArray leafComponentType isBaseType rightArray leafComponentType isCompatibleWith rightArray leafComponentType rightArray isBaseType leafComponentType T_JavaLangObject T_JavaLangCloneable T_JavaIoSerializable
public Type Binding leaf Component Type return leaf Component Type  TypeBinding leafComponentType leafComponentType
public int problem Id return leaf Component Type problem Id  problemId leafComponentType problemId
Answer the source name for the type In the case of member types as the qualified name from its top level type For example for a member type N defined inside M A A M N public char qualified Source Name char brackets new char dimensions 2 for int i dimensions 2 1 i 0 i 2 brackets i brackets i 1 return Char Operation concat leaf Component Type qualified Source Name brackets  qualifiedSourceName CharOperation leafComponentType qualifiedSourceName
public char readable Name java lang Object char brackets new char dimensions 2 for int i dimensions 2 1 i 0 i 2 brackets i brackets i 1 return Char Operation concat leaf Component Type readable Name brackets  readableName CharOperation leafComponentType readableName
public char short Readable Name char brackets new char dimensions 2 for int i dimensions 2 1 i 0 i 2 brackets i brackets i 1 return Char Operation concat leaf Component Type short Readable Name brackets  shortReadableName CharOperation leafComponentType shortReadableName
public char source Name char brackets new char dimensions 2 for int i dimensions 2 1 i 0 i 2 brackets i brackets i 1 return Char Operation concat leaf Component Type source Name brackets  sourceName CharOperation leafComponentType sourceName
return Char Operation concat leaf Component Type source Name brackets public String to String return leaf Component Type null debug Name NULL TYPE ARRAY NON NLS 1  CharOperation leafComponentType sourceName toString leafComponentType debugName

Base Type Binding int id char name char constant Pool Name this tag Bits Is Base Type this id id this simple Name name this constant Pool Name constant Pool Name  BaseTypeBinding constantPoolName tagBits IsBaseType simpleName constantPoolName constantPoolName
Answer the receiver s constant pool name public char constant Pool Name return constant Pool Name  constantPoolName constantPoolName
public Package Binding get Package return null  PackageBinding getPackage
public final boolean is Compatible With Type Binding right if this right return true if right is Base Type return this Null Binding switch right id case T boolean case T byte case T char return false case T double switch id case T byte case T char case T short case T int case T long case T float return true default return false case T float switch id case T byte case T char case T short case T int case T long return true default return false case T long switch id case T byte case T char case T short case T int return true default return false case T int switch id case T byte case T char case T short return true default return false case T short return id T byte return false  isCompatibleWith TypeBinding isBaseType NullBinding T_boolean T_byte T_char T_double T_byte T_char T_short T_int T_long T_float T_float T_byte T_char T_short T_int T_long T_long T_byte T_char T_short T_int T_int T_byte T_char T_short T_short T_byte
public static final boolean is Narrowing int left int right can left store a right using some narrowing conversion is left smaller than right switch left case T boolean return right T boolean case T char case T byte if right T byte return true case T short if right T short return true if right T char return true case T int if right T int return true case T long if right T long return true case T float if right T float return true case T double if right T double return true default return false  isNarrowing T_boolean T_boolean T_char T_byte T_byte T_short T_short T_char T_int T_int T_long T_long T_float T_float T_double T_double
public static final boolean is Widening int left int right can left store a right using some widening conversion is left bigger than right switch left case T boolean return right T boolean case T char return right T char case T double if right T double return true case T float if right T float return true case T long if right T long return true case T int if right T int return true if right T char return true case T short if right T short return true case T byte if right T byte return true default return false  isWidening T_boolean T_boolean T_char T_char T_double T_double T_float T_float T_long T_long T_int T_int T_char T_short T_short T_byte T_byte
public char qualified Source Name return simple Name  qualifiedSourceName simpleName
public char readable Name return simple Name  readableName simpleName
public char short Readable Name return simple Name  shortReadableName simpleName
public char source Name return simple Name  sourceName simpleName
public String to String return new String constant Pool Name id id NON NLS 1 NON NLS 2  toString constantPoolName

private Lookup Environment environment public Binary Type Binding Package Binding package Binding I Binary Type binary Type Lookup Environment environment this compound Name Char Operation split On binary Type get Name compute Id this tag Bits Is Binary Binding this environment environment this f Package package Binding this file Name binary Type get File Name source name must be one name without char possible Source Name this compound Name this compound Name length 1 int start Char Operation last Index Of possible Source Name 1 if start 0 this source Name possible Source Name else this source Name new char possible Source Name length start System arraycopy possible Source Name start this source Name 0 this source Name length this modifiers binary Type get Modifiers if binary Type is Interface this modifiers Acc Interface if binary Type is Anonymous this tag Bits Anonymous Type Mask else if binary Type is Local this tag Bits Local Type Mask else if binary Type is Member this tag Bits Member Type Mask  LookupEnvironment BinaryTypeBinding PackageBinding packageBinding IBinaryType binaryType LookupEnvironment compoundName CharOperation splitOn binaryType getName computeId tagBits IsBinaryBinding fPackage packageBinding fileName binaryType getFileName possibleSourceName compoundName compoundName CharOperation lastIndexOf possibleSourceName sourceName possibleSourceName sourceName possibleSourceName possibleSourceName sourceName sourceName binaryType getModifiers binaryType isInterface AccInterface binaryType isAnonymous tagBits AnonymousTypeMask binaryType isLocal tagBits LocalTypeMask binaryType isMember tagBits MemberTypeMask
public Field Binding available Fields Field Binding available Fields new Field Binding fields length int count 0 for int i 0 i fields length i try available Fields count resolve Type For fields i count catch Abort Compilation a silent abort System arraycopy available Fields 0 available Fields new Field Binding count 0 count return available Fields  FieldBinding availableFields FieldBinding availableFields FieldBinding availableFields resolveTypeFor AbortCompilation availableFields availableFields FieldBinding availableFields
public Method Binding available Methods if modifiers Acc Unresolved 0 return methods Method Binding available Methods new Method Binding methods length int count 0 for int i 0 i methods length i try available Methods count resolve Types For methods i count catch Abort Compilation a silent abort System arraycopy available Methods 0 available Methods new Method Binding count 0 count return available Methods  MethodBinding availableMethods AccUnresolved MethodBinding availableMethods MethodBinding availableMethods resolveTypesFor AbortCompilation availableMethods availableMethods MethodBinding availableMethods
void cache Parts From I Binary Type binary Type boolean need Fields And Methods default initialization for super interfaces early in case some aborting compilation error occurs and still want to use binaries passed that point e g type hierarchy resolver see bug 63748 this super Interfaces No Super Interfaces char superclass Name binary Type get Superclass Name if superclass Name null attempt to find the superclass if it exists in the cache otherwise resolve it when requested this superclass environment get Type From Constant Pool Name superclass Name 0 1 char enclosing Type Name binary Type get Enclosing Type Name if enclosing Type Name null attempt to find the enclosing type if it exists in the cache otherwise resolve it when requested this enclosing Type environment get Type From Constant Pool Name enclosing Type Name 0 1 this tag Bits Member Type Mask must be a member type not a top level or local type if this enclosing Type is Strictfp this modifiers Acc Strictfp if this enclosing Type is Deprecated this modifiers Acc Deprecated Implicitly this member Types No Member Types I Binary Nested Type member Type Structures binary Type get Member Types if member Type Structures null int size member Type Structures length if size 0 this member Types new Reference Binding size for int i 0 i size i attempt to find each member type if it exists in the cache otherwise resolve it when requested this member Types i environment get Type From Constant Pool Name member Type Structures i get Name 0 1 char interface Names binary Type get Interface Names if interface Names null int size interface Names length if size 0 this super Interfaces new Reference Binding size for int i 0 i size i attempt to find each superinterface if it exists in the cache otherwise resolve it when requested this super Interfaces i environment get Type From Constant Pool Name interface Names i 0 1 if need Fields And Methods create Fields binary Type get Fields create Methods binary Type get Methods else protect against incorrect use of the need Fields And Methods flag see 48459 this fields No Fields this methods No Methods  cachePartsFrom IBinaryType binaryType needFieldsAndMethods superInterfaces NoSuperInterfaces superclassName binaryType getSuperclassName superclassName getTypeFromConstantPoolName superclassName enclosingTypeName binaryType getEnclosingTypeName enclosingTypeName enclosingType getTypeFromConstantPoolName enclosingTypeName tagBits MemberTypeMask enclosingType isStrictfp AccStrictfp enclosingType isDeprecated AccDeprecatedImplicitly memberTypes NoMemberTypes IBinaryNestedType memberTypeStructures binaryType getMemberTypes memberTypeStructures memberTypeStructures memberTypes ReferenceBinding memberTypes getTypeFromConstantPoolName memberTypeStructures getName interfaceNames binaryType getInterfaceNames interfaceNames interfaceNames superInterfaces ReferenceBinding superInterfaces getTypeFromConstantPoolName interfaceNames needFieldsAndMethods createFields binaryType getFields createMethods binaryType getMethods needFieldsAndMethods NoFields NoMethods
private void create Fields I Binary Field i Fields this fields No Fields if i Fields null int size i Fields length if size 0 this fields new Field Binding size for int i 0 i size i I Binary Field field i Fields i this fields i new Field Binding field get Name environment get Type From Signature field get Type Name 0 1 field get Modifiers Acc Unresolved this field get Constant  createFields IBinaryField iFields NoFields iFields iFields FieldBinding IBinaryField iFields FieldBinding getName getTypeFromSignature getTypeName getModifiers AccUnresolved getConstant
private Method Binding create Method I Binary Method method int method Modifiers method get Modifiers Acc Unresolved Reference Binding exceptions No Exceptions char exception Types method get Exception Type Names if exception Types null int size exception Types length if size 0 exceptions new Reference Binding size for int i 0 i size i exceptions i environment get Type From Constant Pool Name exception Types i 0 1 Type Binding parameters No Parameters char method Signature method get Method Descriptor of the form I Ljava jang String V int num Of Params 0 char next Char int index 0 first character is always so skip it while next Char method Signature index if next Char num Of Params if next Char L while next Char method Signature index empty Ignore synthetic argument for member types int start Index method is Constructor is Member Type is Static 1 0 int size num Of Params start Index if size 0 parameters new Type Binding size index 1 int end 0 first character is always so skip it for int i 0 i num Of Params i while next Char method Signature end empty if next Char L while next Char method Signature end empty if i start Index skip the synthetic arg if necessary parameters i start Index environment get Type From Signature method Signature index end index end 1 Method Binding binding null if method is Constructor binding new Method Binding method Modifiers parameters exceptions this else binding new Method Binding method Modifiers method get Selector environment get Type From Signature method Signature index 1 1 index is currently pointing at the parameters exceptions this return binding  MethodBinding createMethod IBinaryMethod methodModifiers getModifiers AccUnresolved ReferenceBinding NoExceptions exceptionTypes getExceptionTypeNames exceptionTypes exceptionTypes ReferenceBinding getTypeFromConstantPoolName exceptionTypes TypeBinding NoParameters methodSignature getMethodDescriptor numOfParams nextChar nextChar methodSignature nextChar numOfParams nextChar nextChar methodSignature startIndex isConstructor isMemberType isStatic numOfParams startIndex TypeBinding numOfParams nextChar methodSignature nextChar nextChar methodSignature startIndex startIndex getTypeFromSignature methodSignature MethodBinding isConstructor MethodBinding methodModifiers MethodBinding methodModifiers getSelector getTypeFromSignature methodSignature
Create method bindings for binary type filtering out clinit and synthetics private void create Methods I Binary Method i Methods int total 0 initial Total 0 i Clinit 1 int to Skip null if i Methods null total initial Total i Methods length for int i total i 0 I Binary Method method i Methods i if method get Modifiers Acc Synthetic 0 discard synthetics methods if to Skip null to Skip new int i Methods length to Skip i 1 total else if i Clinit 1 char method Name method get Selector if method Name length 8 method Name 0 discard clinit i Clinit i total if total 0 this methods No Methods return this methods new Method Binding total if total initial Total for int i 0 i initial Total i this methods i create Method i Methods i else for int i 0 index 0 i initial Total i if i Clinit i to Skip null to Skip i 1 this methods index create Method i Methods i modifiers Acc Unresolved until methods is sent  createMethods IBinaryMethod iMethods initialTotal iClinit toSkip iMethods initialTotal iMethods IBinaryMethod iMethods getModifiers AccSynthetic toSkip toSkip iMethods toSkip iClinit methodName getSelector methodName methodName iClinit NoMethods MethodBinding initialTotal initialTotal createMethod iMethods initialTotal iClinit toSkip toSkip createMethod iMethods AccUnresolved
public Reference Binding enclosing Type if enclosing Type null return null if enclosing Type instanceof Unresolved Reference Binding enclosing Type Unresolved Reference Binding enclosing Type resolve environment return enclosing Type  ReferenceBinding enclosingType enclosingType enclosingType UnresolvedReferenceBinding enclosingType UnresolvedReferenceBinding enclosingType enclosingType
public Field Binding fields for int i fields length i 0 resolve Type For fields i return fields  FieldBinding resolveTypeFor
public Method Binding get Exact Constructor Type Binding argument Types int arg Count argument Types length next Method for int m methods length m 0 Method Binding method methods m if method selector Constructor Declaration Constant Pool Name method parameters length arg Count resolve Types For method Type Binding to Match method parameters for int p 0 p arg Count p if to Match p argument Types p continue next Method return method return null  MethodBinding getExactConstructor TypeBinding argumentTypes argCount argumentTypes nextMethod MethodBinding ConstructorDeclaration ConstantPoolName argCount resolveTypesFor TypeBinding toMatch argCount toMatch argumentTypes nextMethod
public Method Binding get Exact Method char selector Type Binding argument Types int arg Count argument Types length int selector Length selector length boolean found Nothing true next Method for int m methods length m 0 Method Binding method methods m if method selector length selector Length Char Operation equals method selector selector found Nothing false inner type lookups must know that a method with this name exists if method parameters length arg Count resolve Types For method Type Binding to Match method parameters for int p 0 p arg Count p if to Match p argument Types p continue next Method return method if found Nothing if is Interface if super Interfaces length 1 return super Interfaces 0 get Exact Method selector argument Types else if superclass null return superclass get Exact Method selector argument Types return null  MethodBinding getExactMethod TypeBinding argumentTypes argCount argumentTypes selectorLength foundNothing nextMethod MethodBinding selectorLength CharOperation foundNothing argCount resolveTypesFor TypeBinding toMatch argCount toMatch argumentTypes nextMethod foundNothing isInterface superInterfaces superInterfaces getExactMethod argumentTypes getExactMethod argumentTypes
public Field Binding get Field char field Name boolean need Resolve int field Length field Name length for int f fields length f 0 char name fields f name if name length field Length Char Operation equals name field Name return need Resolve resolve Type For fields f fields f return null  FieldBinding getField fieldName needResolve fieldLength fieldName fieldLength CharOperation fieldName needResolve resolveTypeFor
Rewrite of default get Member Type to avoid resolving eagerly all member types when one is requested public Reference Binding get Member Type char type Name for int i this member Types length i 0 Reference Binding member Type this member Types i if member Type instanceof Unresolved Reference Binding char name member Type source Name source name is qualified with enclosing type name int prefix Length this compound Name this compound Name length 1 length 1 enclosing if name length prefix Length type Name length enclosing type Name if Char Operation fragment Equals type Name name prefix Length true only check trailing portion return this member Types i Unresolved Reference Binding member Type resolve environment else if Char Operation equals type Name member Type source Name return member Type return null  getMemberType ReferenceBinding getMemberType typeName memberTypes ReferenceBinding memberType memberTypes memberType UnresolvedReferenceBinding memberType sourceName prefixLength compoundName compoundName prefixLength typeName typeName CharOperation fragmentEquals typeName prefixLength memberTypes UnresolvedReferenceBinding memberType CharOperation typeName memberType sourceName memberType
public Method Binding get Methods char selector int count 0 int last Index 1 int selector Length selector length for int m 0 length methods length m length m Method Binding method methods m if method selector length selector Length Char Operation equals method selector selector resolve Types For method count last Index m if count 1 return new Method Binding methods last Index if count 0 Method Binding result new Method Binding count count 0 for int m 0 m last Index m Method Binding method methods m if method selector length selector Length Char Operation equals method selector selector result count method return result return No Methods  MethodBinding getMethods lastIndex selectorLength MethodBinding selectorLength CharOperation resolveTypesFor lastIndex MethodBinding lastIndex MethodBinding MethodBinding lastIndex MethodBinding selectorLength CharOperation NoMethods
return No Methods public boolean has Member Types return this member Types length 0  NoMethods hasMemberTypes memberTypes
public Reference Binding member Types for int i member Types length i 0 if member Types i instanceof Unresolved Reference Binding member Types i Unresolved Reference Binding member Types i resolve environment return member Types  ReferenceBinding memberTypes memberTypes memberTypes UnresolvedReferenceBinding memberTypes UnresolvedReferenceBinding memberTypes memberTypes
public Method Binding methods if modifiers Acc Unresolved 0 return methods for int i methods length i 0 resolve Types For methods i modifiers Acc Unresolved return methods  MethodBinding AccUnresolved resolveTypesFor AccUnresolved
Type Binding resolve Type Type Binding type if type instanceof Unresolved Reference Binding return Unresolved Reference Binding type resolve environment if type instanceof Array Binding Array Binding array Array Binding type if array leaf Component Type instanceof Unresolved Reference Binding array leaf Component Type Unresolved Reference Binding array leaf Component Type resolve environment return type  TypeBinding resolveType TypeBinding UnresolvedReferenceBinding UnresolvedReferenceBinding ArrayBinding ArrayBinding ArrayBinding leafComponentType UnresolvedReferenceBinding leafComponentType UnresolvedReferenceBinding leafComponentType
private Field Binding resolve Type For Field Binding field if field modifiers Acc Unresolved 0 field type resolve Type field type field modifiers Acc Unresolved return field  FieldBinding resolveTypeFor FieldBinding AccUnresolved resolveType AccUnresolved
private Method Binding resolve Types For Method Binding method if method modifiers Acc Unresolved 0 return method if method is Constructor method return Type resolve Type method return Type for int i method parameters length i 0 method parameters i resolve Type method parameters i for int i method thrown Exceptions length i 0 if method thrown Exceptions i instanceof Unresolved Reference Binding method thrown Exceptions i Unresolved Reference Binding method thrown Exceptions i resolve environment method modifiers Acc Unresolved return method  MethodBinding resolveTypesFor MethodBinding AccUnresolved isConstructor returnType resolveType returnType resolveType thrownExceptions thrownExceptions UnresolvedReferenceBinding thrownExceptions UnresolvedReferenceBinding thrownExceptions AccUnresolved
public Reference Binding superclass if superclass null return null if superclass instanceof Unresolved Reference Binding superclass Unresolved Reference Binding superclass resolve environment return superclass  ReferenceBinding UnresolvedReferenceBinding UnresolvedReferenceBinding
public Reference Binding super Interfaces for int i super Interfaces length i 0 if super Interfaces i instanceof Unresolved Reference Binding super Interfaces i Unresolved Reference Binding super Interfaces i resolve environment return super Interfaces  ReferenceBinding superInterfaces superInterfaces superInterfaces UnresolvedReferenceBinding superInterfaces UnresolvedReferenceBinding superInterfaces superInterfaces
return super Interfaces Method Binding un Resolved Methods for the Method Verifier so it doesn t resolve types return methods  superInterfaces MethodBinding unResolvedMethods MethodVerifier
public String to String String s NON NLS 1 if is Deprecated s deprecated NON NLS 1 if is Public s public NON NLS 1 if is Protected s protected NON NLS 1 if is Private s private NON NLS 1 if is Abstract is Class s abstract NON NLS 1 if is Static is Nested Type s static NON NLS 1 if is Final s final NON NLS 1 s is Interface interface class NON NLS 1 NON NLS 2 s compound Name null Char Operation to String compound Name UNNAMED TYPE NON NLS 1 s n textends NON NLS 1 s superclass null superclass debug Name NULL TYPE NON NLS 1 if super Interfaces null if super Interfaces No Super Interfaces s n timplements NON NLS 1 for int i 0 length super Interfaces length i length i if i 0 s NON NLS 1 s super Interfaces i null super Interfaces i debug Name NULL TYPE NON NLS 1 else s NULL SUPERINTERFACES NON NLS 1 if enclosing Type null s n tenclosing type NON NLS 1 s enclosing Type debug Name if fields null if fields No Fields s n fields NON NLS 1 for int i 0 length fields length i length i s fields i null n fields i to String nNULL FIELD NON NLS 1 NON NLS 2 else s NULL FIELDS NON NLS 1 if methods null if methods No Methods s n methods NON NLS 1 for int i 0 length methods length i length i s methods i null n methods i to String nNULL METHOD NON NLS 1 NON NLS 2 else s NULL METHODS NON NLS 1 if member Types null if member Types No Member Types s n members NON NLS 1 for int i 0 length member Types length i length i s member Types i null n member Types i to String nNULL TYPE NON NLS 1 NON NLS 2 else s NULL MEMBER TYPES NON NLS 1 s n n n NON NLS 1 return s  toString isDeprecated isPublic isProtected isPrivate isAbstract isClass isStatic isNestedType isFinal isInterface compoundName CharOperation toString compoundName debugName superInterfaces superInterfaces NoSuperInterfaces superInterfaces superInterfaces superInterfaces debugName enclosingType enclosingType debugName NoFields toString NoMethods toString memberTypes memberTypes NoMemberTypes memberTypes memberTypes memberTypes toString

more than 2 possible choices public abstract int binding Type  bindingType
public final boolean is Valid Binding return problem Id No Error  isValidBinding problemId NoError
public int problem Id return No Error  problemId NoError
Answer a printable representation of the receiver public abstract char readable Name  readableName
Shorter printable representation of the receiver no qualified type public char short Readable Name return readable Name  shortReadableName readableName

public Case Statement switch Case from 1 4 on local types should not be accessed across switch case blocks 52221 protected Block Scope int kind Scope parent super kind parent  CaseStatement switchCase BlockScope
public Block Scope Block Scope parent this parent true  BlockScope BlockScope
public Block Scope Block Scope parent boolean add To Parent Scope this BLOCK SCOPE parent locals new Local Variable Binding 5 if add To Parent Scope parent add Subscope this this start Index parent local Index  BlockScope BlockScope addToParentScope BLOCK_SCOPE LocalVariableBinding addToParentScope addSubscope startIndex localIndex
public Block Scope Block Scope parent int variable Count this BLOCK SCOPE parent locals new Local Variable Binding variable Count parent add Subscope this this start Index parent local Index  BlockScope BlockScope variableCount BLOCK_SCOPE LocalVariableBinding variableCount addSubscope startIndex localIndex
public final void add Anonymous Type Type Declaration anonymous Type Reference Binding super Binding Class Scope anonymous Class Scope new Class Scope this anonymous Type anonymous Class Scope build Anonymous Type Binding enclosing Source Type super Binding  addAnonymousType TypeDeclaration anonymousType ReferenceBinding superBinding ClassScope anonymousClassScope ClassScope anonymousType anonymousClassScope buildAnonymousTypeBinding enclosingSourceType superBinding
public final void add Local Type Type Declaration local Type check that the local Type does not conflict with an enclosing type Reference Binding type enclosing Source Type do if Char Operation equals type source Name local Type name problem Reporter hiding Enclosing Type local Type return type type enclosing Type while type null check that the local Type does not conflict with another sibling local type Scope scope this do if Block Scope scope find Local Type local Type name null problem Reporter duplicate Nested Type local Type return while scope scope parent instanceof Block Scope Class Scope local Type Scope new Class Scope this local Type add Subscope local Type Scope local Type Scope build Local Type Binding enclosing Source Type  addLocalType TypeDeclaration localType localType ReferenceBinding enclosingSourceType CharOperation sourceName localType problemReporter hidingEnclosingType localType enclosingType localType BlockScope findLocalType localType problemReporter duplicateNestedType localType BlockScope ClassScope localTypeScope ClassScope localType addSubscope localTypeScope localTypeScope buildLocalTypeBinding enclosingSourceType
public final void add Local Variable Local Variable Binding binding check And Set Modifiers For Variable binding insert local in scope if local Index locals length System arraycopy locals 0 locals new Local Variable Binding local Index 2 0 local Index locals local Index binding update local variable binding binding declaring Scope this binding id this outer Most Method Scope analysis Index share the outermost method scope analysis Index  addLocalVariable LocalVariableBinding checkAndSetModifiersForVariable localIndex LocalVariableBinding localIndex localIndex localIndex declaringScope outerMostMethodScope analysisIndex analysisIndex
public void add Subscope Scope child Scope if subscope Count subscopes length System arraycopy subscopes 0 subscopes new Scope subscope Count 2 0 subscope Count subscopes subscope Count child Scope  addSubscope childScope subscopeCount subscopeCount subscopeCount subscopeCount childScope
public final boolean allow Blank Final Field Assignment Field Binding binding if enclosing Source Type binding declaring Class return false Method Scope method Scope method Scope if method Scope is Static binding is Static return false return method Scope is Inside Initializer inside initializer Abstract Method Declaration method Scope reference Context is Initialization Method inside constructor or clinit  allowBlankFinalFieldAssignment FieldBinding enclosingSourceType declaringClass MethodScope methodScope methodScope methodScope isStatic isStatic methodScope isInsideInitializer AbstractMethodDeclaration methodScope referenceContext isInitializationMethod
String basic To String int tab String new Line n NON NLS 1 for int i tab i 0 new Line t NON NLS 1 String s new Line Block Scope NON NLS 1 new Line t NON NLS 1 s new Line locals NON NLS 1 for int i 0 i local Index i s new Line t locals i to String NON NLS 1 s new Line start Index start Index NON NLS 1 return s  basicToString newLine newLine newLine newLine newLine localIndex newLine toString newLine startIndex startIndex
private void check And Set Modifiers For Variable Local Variable Binding var Binding int modifiers var Binding modifiers if modifiers Acc Alternate Modifier Problem 0 var Binding declaration null problem Reporter duplicate Modifier For Variable var Binding declaration this instanceof Method Scope int real Modifiers modifiers Acc Just Flag int unexpected Modifiers Acc Final if real Modifiers unexpected Modifiers 0 var Binding declaration null problem Reporter illegal Modifier For Variable var Binding declaration this instanceof Method Scope var Binding modifiers modifiers  checkAndSetModifiersForVariable LocalVariableBinding varBinding varBinding AccAlternateModifierProblem varBinding problemReporter duplicateModifierForVariable varBinding MethodScope realModifiers AccJustFlag unexpectedModifiers AccFinal realModifiers unexpectedModifiers varBinding problemReporter illegalModifierForVariable varBinding MethodScope varBinding
void compute Local Variable Positions int ilocal int init Offset Code Stream code Stream this offset init Offset this max Offset init Offset local variable init int max Locals this local Index boolean has More Variables ilocal max Locals scope init int iscope 0 max Scopes this subscope Count boolean has More Scopes max Scopes 0 iterate scopes and variables in parallel while has More Variables has More Scopes if has More Scopes has More Variables subscopes iscope start Index ilocal consider subscope first if subscopes iscope instanceof Block Scope Block Scope subscope Block Scope subscopes iscope int sub Offset subscope shift Scopes null this offset subscope max Shifted Offset subscope compute Local Variable Positions 0 sub Offset code Stream if subscope max Offset this max Offset this max Offset subscope max Offset has More Scopes iscope max Scopes else consider variable first Local Variable Binding local locals ilocal if no local at all will be locals ilocal null check if variable is actually used and may force it to be preserved boolean generate Current Local Var local use Flag Local Variable Binding USED local constant Constant NotA Constant do not report fake used variable if local use Flag Local Variable Binding UNUSED local declaration null unused and non secret local local declaration bits AST Node Is Local Declaration ReachableMASK 0 declaration is reachable if local declaration instanceof Argument do not report unused catch arguments this problem Reporter unused Local Variable local declaration could be optimized out but does need to preserve unread variables if generate Current Local Var if local declaration null environment options preserve All Local Variables generate Current Local Var true force it to be preserved in the generated code local use Flag Local Variable Binding USED allocate variable if generate Current Local Var if local declaration null code Stream record local record user defined local variables for attribute generation assign variable position local resolved Position this offset if local type Long Binding local type Double Binding this offset 2 else this offset if this offset 0xFFFF no more than 65535 words of locals this problem Reporter no More Available Space For Local local local declaration null AST Node this method Scope reference Context local declaration else local resolved Position 1 not generated has More Variables ilocal max Locals if this offset this max Offset this max Offset this offset  computeLocalVariablePositions initOffset CodeStream codeStream initOffset maxOffset initOffset maxLocals localIndex hasMoreVariables maxLocals maxScopes subscopeCount hasMoreScopes maxScopes hasMoreVariables hasMoreScopes hasMoreScopes hasMoreVariables startIndex BlockScope BlockScope BlockScope subOffset shiftScopes maxShiftedOffset computeLocalVariablePositions subOffset codeStream maxOffset maxOffset maxOffset maxOffset hasMoreScopes maxScopes LocalVariableBinding generateCurrentLocalVar useFlag LocalVariableBinding NotAConstant useFlag LocalVariableBinding ASTNode IsLocalDeclarationReachableMASK problemReporter unusedLocalVariable generateCurrentLocalVar preserveAllLocalVariables generateCurrentLocalVar useFlag LocalVariableBinding generateCurrentLocalVar codeStream resolvedPosition LongBinding DoubleBinding problemReporter noMoreAvailableSpaceForLocal ASTNode methodScope referenceContext resolvedPosition hasMoreVariables maxLocals maxOffset maxOffset
public void emulate Outer Access Local Variable Binding outer Local Variable Method Scope current Method Scope if current Method Scope this method Scope outer Local Variable declaring Scope method Scope Nested Type Binding current Type Nested Type Binding this enclosing Source Type do nothing for member types pre emulation was performed already if current Type is Local Type return must also add a synthetic field if we re not inside a constructor if current Method Scope is Inside Initializer Or Constructor current Type add Synthetic Argument And Field outer Local Variable else current Type add Synthetic Argument outer Local Variable  emulateOuterAccess LocalVariableBinding outerLocalVariable MethodScope currentMethodScope currentMethodScope methodScope outerLocalVariable declaringScope methodScope NestedTypeBinding currentType NestedTypeBinding enclosingSourceType currentType isLocalType currentMethodScope isInsideInitializerOrConstructor currentType addSyntheticArgumentAndField outerLocalVariable currentType addSyntheticArgument outerLocalVariable
public final Reference Binding find Local Type char name long compliance environment options compliance Level for int i 0 length subscope Count i length i if subscopes i instanceof Class Scope Local Type Binding source Type Local Type Binding Class Scope subscopes i reference Context binding from 1 4 on local types should not be accessed across switch case blocks 52221 if compliance Class File Constants JDK1 4 source Type switch Case this switch Case continue if Char Operation equals source Type source Name name return source Type return null  ReferenceBinding findLocalType complianceLevel subscopeCount ClassScope LocalTypeBinding sourceType LocalTypeBinding ClassScope referenceContext ClassFileConstants JDK1_4 sourceType switchCase switchCase CharOperation sourceType sourceName sourceType
public Local Variable Binding find Variable char variable int var Length variable length for int i 0 length locals length i length i Local Variable Binding local locals i if local null return null if local name length var Length Char Operation equals local name variable return local return null  LocalVariableBinding findVariable varLength LocalVariableBinding varLength CharOperation
public Binding get Binding char compound Name int mask Invocation Site invocation Site boolean need Resolve Binding binding get Binding compound Name 0 mask TYPE PACKAGE invocation Site need Resolve invocation Site set Field Index 1 if binding instanceof Variable Binding return binding compilation Unit Scope record Simple Reference compound Name 0 if binding is Valid Binding return binding int length compound Name length int current Index 1 found Type if binding instanceof Package Binding Package Binding package Binding Package Binding binding while current Index length compilation Unit Scope record Reference package Binding compound Name compound Name current Index binding package Binding get Type Or Package compound Name current Index invocation Site set Field Index current Index if binding null if current Index length must be a type if its the last name otherwise we have no idea if its a package or type return new Problem Reference Binding Char Operation subarray compound Name 0 current Index Not Found return new Problem Binding Char Operation subarray compound Name 0 current Index Not Found if binding instanceof Reference Binding if binding is Valid Binding return new Problem Reference Binding Char Operation subarray compound Name 0 current Index binding problem Id if Reference Binding binding can Be Seen By this return new Problem Reference Binding Char Operation subarray compound Name 0 current Index Reference Binding binding Not Visible break found Type package Binding Package Binding binding It is illegal to request a PACKAGE from this method return new Problem Reference Binding Char Operation subarray compound Name 0 current Index Not Found know binding is now a Reference Binding while current Index length Reference Binding type Binding Reference Binding binding char next Name compound Name current Index invocation Site set Field Index current Index invocation Site set Actual Receiver Type type Binding if mask FIELD 0 binding find Field type Binding next Name invocation Site true resolve null if binding is Valid Binding return new Problem Field Binding Field Binding binding declaring Class Char Operation subarray compound Name 0 current Index binding problem Id break binding is now a field if binding find Member Type next Name type Binding null if mask FIELD 0 return new Problem Binding Char Operation subarray compound Name 0 current Index type Binding Not Found return new Problem Reference Binding Char Operation subarray compound Name 0 current Index type Binding Not Found if binding is Valid Binding return new Problem Reference Binding Char Operation subarray compound Name 0 current Index binding problem Id if mask FIELD 0 binding instanceof Field Binding was looking for a field and found a field Field Binding field Field Binding binding if field is Static return new Problem Field Binding field declaring Class Char Operation subarray compound Name 0 current Index Non Static Reference In Static Context return binding if mask TYPE 0 binding instanceof Reference Binding was looking for a type and found a type return binding handle the case when a field or type was asked for but we resolved the compound Name to a type or field return new Problem Binding Char Operation subarray compound Name 0 current Index Not Found  getBinding compoundName InvocationSite invocationSite needResolve getBinding compoundName invocationSite needResolve invocationSite setFieldIndex VariableBinding compilationUnitScope recordSimpleReference compoundName isValidBinding compoundName currentIndex foundType PackageBinding PackageBinding packageBinding PackageBinding currentIndex compilationUnitScope recordReference packageBinding compoundName compoundName currentIndex packageBinding getTypeOrPackage compoundName currentIndex invocationSite setFieldIndex currentIndex currentIndex ProblemReferenceBinding CharOperation compoundName currentIndex NotFound ProblemBinding CharOperation compoundName currentIndex NotFound ReferenceBinding isValidBinding ProblemReferenceBinding CharOperation compoundName currentIndex problemId ReferenceBinding canBeSeenBy ProblemReferenceBinding CharOperation compoundName currentIndex ReferenceBinding NotVisible foundType packageBinding PackageBinding ProblemReferenceBinding CharOperation compoundName currentIndex NotFound ReferenceBinding currentIndex ReferenceBinding typeBinding ReferenceBinding nextName compoundName currentIndex invocationSite setFieldIndex currentIndex invocationSite setActualReceiverType typeBinding findField typeBinding nextName invocationSite isValidBinding ProblemFieldBinding FieldBinding declaringClass CharOperation compoundName currentIndex problemId findMemberType nextName typeBinding ProblemBinding CharOperation compoundName currentIndex typeBinding NotFound ProblemReferenceBinding CharOperation compoundName currentIndex typeBinding NotFound isValidBinding ProblemReferenceBinding CharOperation compoundName currentIndex problemId FieldBinding FieldBinding FieldBinding isStatic ProblemFieldBinding declaringClass CharOperation compoundName currentIndex NonStaticReferenceInStaticContext ReferenceBinding compoundName ProblemBinding CharOperation compoundName currentIndex NotFound
Added for code assist NOT Public API public final Binding get Binding char compound Name Invocation Site invocation Site int current Index 0 int length compound Name length Binding binding get Binding compound Name current Index VARIABLE TYPE PACKAGE invocation Site true resolve if binding is Valid Binding return binding found Type if binding instanceof Package Binding while current Index length Package Binding package Binding Package Binding binding binding package Binding get Type Or Package compound Name current Index if binding null if current Index length must be a type if its the last name otherwise we have no idea if its a package or type return new Problem Reference Binding Char Operation subarray compound Name 0 current Index Not Found return new Problem Binding Char Operation subarray compound Name 0 current Index Not Found if binding instanceof Reference Binding if binding is Valid Binding return new Problem Reference Binding Char Operation subarray compound Name 0 current Index binding problem Id if Reference Binding binding can Be Seen By this return new Problem Reference Binding Char Operation subarray compound Name 0 current Index Reference Binding binding Not Visible break found Type return binding found Field if binding instanceof Reference Binding while current Index length Reference Binding type Binding Reference Binding binding char next Name compound Name current Index if binding find Field type Binding next Name invocation Site true resolve null if binding is Valid Binding return new Problem Field Binding Field Binding binding declaring Class Char Operation subarray compound Name 0 current Index binding problem Id if Field Binding binding is Static return new Problem Field Binding Field Binding binding declaring Class Char Operation subarray compound Name 0 current Index Non Static Reference In Static Context break found Field binding is now a field if binding find Member Type next Name type Binding null return new Problem Binding Char Operation subarray compound Name 0 current Index type Binding Not Found if binding is Valid Binding return new Problem Reference Binding Char Operation subarray compound Name 0 current Index binding problem Id return binding Variable Binding variable Binding Variable Binding binding while current Index length Type Binding type Binding variable Binding type if type Binding null return new Problem Field Binding null Char Operation subarray compound Name 0 current Index 1 Not Found variable Binding find Field type Binding compound Name current Index invocation Site true resolve if variable Binding null return new Problem Field Binding null Char Operation subarray compound Name 0 current Index Not Found if variable Binding is Valid Binding return variable Binding return variable Binding  getBinding compoundName InvocationSite invocationSite currentIndex compoundName getBinding compoundName currentIndex invocationSite isValidBinding foundType PackageBinding currentIndex PackageBinding packageBinding PackageBinding packageBinding getTypeOrPackage compoundName currentIndex currentIndex ProblemReferenceBinding CharOperation compoundName currentIndex NotFound ProblemBinding CharOperation compoundName currentIndex NotFound ReferenceBinding isValidBinding ProblemReferenceBinding CharOperation compoundName currentIndex problemId ReferenceBinding canBeSeenBy ProblemReferenceBinding CharOperation compoundName currentIndex ReferenceBinding NotVisible foundType foundField ReferenceBinding currentIndex ReferenceBinding typeBinding ReferenceBinding nextName compoundName currentIndex findField typeBinding nextName invocationSite isValidBinding ProblemFieldBinding FieldBinding declaringClass CharOperation compoundName currentIndex problemId FieldBinding isStatic ProblemFieldBinding FieldBinding declaringClass CharOperation compoundName currentIndex NonStaticReferenceInStaticContext foundField findMemberType nextName typeBinding ProblemBinding CharOperation compoundName currentIndex typeBinding NotFound isValidBinding ProblemReferenceBinding CharOperation compoundName currentIndex problemId VariableBinding variableBinding VariableBinding currentIndex TypeBinding typeBinding variableBinding typeBinding ProblemFieldBinding CharOperation compoundName currentIndex NotFound variableBinding findField typeBinding compoundName currentIndex invocationSite variableBinding ProblemFieldBinding CharOperation compoundName currentIndex NotFound variableBinding isValidBinding variableBinding variableBinding
public Variable Binding get Emulation Path Local Variable Binding outer Local Variable Method Scope current Method Scope this method Scope Source Type Binding source Type current Method Scope enclosing Source Type identity check if current Method Scope outer Local Variable declaring Scope method Scope return new Variable Binding outer Local Variable implicit this is good enough use synthetic constructor arguments if possible if current Method Scope is Inside Initializer Or Constructor source Type is Nested Type Synthetic Argument Binding synthetic Arg if synthetic Arg Nested Type Binding source Type get Synthetic Argument outer Local Variable null return new Variable Binding synthetic Arg use a synthetic field then if current Method Scope is Static Field Binding synthetic Field if synthetic Field source Type get Synthetic Field outer Local Variable null return new Variable Binding synthetic Field return null  VariableBinding getEmulationPath LocalVariableBinding outerLocalVariable MethodScope currentMethodScope methodScope SourceTypeBinding sourceType currentMethodScope enclosingSourceType currentMethodScope outerLocalVariable declaringScope methodScope VariableBinding outerLocalVariable currentMethodScope isInsideInitializerOrConstructor sourceType isNestedType SyntheticArgumentBinding syntheticArg syntheticArg NestedTypeBinding sourceType getSyntheticArgument outerLocalVariable VariableBinding syntheticArg currentMethodScope isStatic FieldBinding syntheticField syntheticField sourceType getSyntheticField outerLocalVariable VariableBinding syntheticField
public Object get Emulation Path Reference Binding target Enclosing Type boolean only Exact Match boolean ignore Enclosing Arg In Constructor Call Method Scope current Method Scope this method Scope Source Type Binding source Type current Method Scope enclosing Source Type use this if possible if current Method Scope is Constructor Call current Method Scope is Static if source Type target Enclosing Type only Exact Match target Enclosing Type is Superclass Of source Type return Emulation Path To Implicit This implicit this is good enough if source Type is Nested Type source Type is Static no emulation from within non inner types if current Method Scope is Constructor Call return No Enclosing Instance In Constructor Call else if current Method Scope is Static return No Enclosing Instance In Static Context return null boolean inside Constructor current Method Scope is Inside Initializer Or Constructor use synthetic constructor arguments if possible if inside Constructor Synthetic Argument Binding synthetic Arg if synthetic Arg Nested Type Binding source Type get Synthetic Argument target Enclosing Type only Exact Match null reject allocation and super constructor call if ignore Enclosing Arg In Constructor Call current Method Scope is Constructor Call source Type target Enclosing Type only Exact Match target Enclosing Type is Superclass Of source Type return No Enclosing Instance In Constructor Call return new Object synthetic Arg use a direct synthetic field then if current Method Scope is Static return No Enclosing Instance In Static Context Field Binding synthetic Field source Type get Synthetic Field target Enclosing Type only Exact Match if synthetic Field null if current Method Scope is Constructor Call return No Enclosing Instance In Constructor Call return new Object synthetic Field could be reached through a sequence of enclosing instance link nested members Object path new Object 2 probably at least 2 of them Reference Binding current Type source Type enclosing Type if inside Constructor path 0 Nested Type Binding source Type get Synthetic Argument current Type only Exact Match else if current Method Scope is Constructor Call return No Enclosing Instance In Constructor Call path 0 source Type get Synthetic Field current Type only Exact Match if path 0 null keep accumulating int count 1 Reference Binding current Enclosing Type while current Enclosing Type current Type enclosing Type null done if current Type target Enclosing Type only Exact Match target Enclosing Type is Superclass Of current Type break if current Method Scope null current Method Scope current Method Scope enclosing Method Scope if current Method Scope null current Method Scope is Constructor Call return No Enclosing Instance In Constructor Call if current Method Scope null current Method Scope is Static return No Enclosing Instance In Static Context synthetic Field Nested Type Binding current Type get Synthetic Field current Enclosing Type only Exact Match if synthetic Field null break append inside the path if count path length System arraycopy path 0 path new Object count 1 0 count private access emulation is necessary since synthetic field is private path count Source Type Binding synthetic Field declaring Class add Synthetic Method synthetic Field true current Type current Enclosing Type if current Type target Enclosing Type only Exact Match target Enclosing Type is Superclass Of current Type return path return null  getEmulationPath ReferenceBinding targetEnclosingType onlyExactMatch ignoreEnclosingArgInConstructorCall MethodScope currentMethodScope methodScope SourceTypeBinding sourceType currentMethodScope enclosingSourceType currentMethodScope isConstructorCall currentMethodScope isStatic sourceType targetEnclosingType onlyExactMatch targetEnclosingType isSuperclassOf sourceType EmulationPathToImplicitThis sourceType isNestedType sourceType isStatic currentMethodScope isConstructorCall NoEnclosingInstanceInConstructorCall currentMethodScope isStatic NoEnclosingInstanceInStaticContext insideConstructor currentMethodScope isInsideInitializerOrConstructor insideConstructor SyntheticArgumentBinding syntheticArg syntheticArg NestedTypeBinding sourceType getSyntheticArgument targetEnclosingType onlyExactMatch ignoreEnclosingArgInConstructorCall currentMethodScope isConstructorCall sourceType targetEnclosingType onlyExactMatch targetEnclosingType isSuperclassOf sourceType NoEnclosingInstanceInConstructorCall syntheticArg currentMethodScope isStatic NoEnclosingInstanceInStaticContext FieldBinding syntheticField sourceType getSyntheticField targetEnclosingType onlyExactMatch syntheticField currentMethodScope isConstructorCall NoEnclosingInstanceInConstructorCall syntheticField ReferenceBinding currentType sourceType enclosingType insideConstructor NestedTypeBinding sourceType getSyntheticArgument currentType onlyExactMatch currentMethodScope isConstructorCall NoEnclosingInstanceInConstructorCall sourceType getSyntheticField currentType onlyExactMatch ReferenceBinding currentEnclosingType currentEnclosingType currentType enclosingType currentType targetEnclosingType onlyExactMatch targetEnclosingType isSuperclassOf currentType currentMethodScope currentMethodScope currentMethodScope enclosingMethodScope currentMethodScope currentMethodScope isConstructorCall NoEnclosingInstanceInConstructorCall currentMethodScope currentMethodScope isStatic NoEnclosingInstanceInStaticContext syntheticField NestedTypeBinding currentType getSyntheticField currentEnclosingType onlyExactMatch syntheticField SourceTypeBinding syntheticField declaringClass addSyntheticMethod syntheticField currentType currentEnclosingType currentType targetEnclosingType onlyExactMatch targetEnclosingType isSuperclassOf currentType
public final boolean is Duplicate Local Variable char name Block Scope current this while true for int i 0 i local Index i if Char Operation equals name current locals i name return true if current kind BLOCK SCOPE return false current Block Scope current parent  isDuplicateLocalVariable BlockScope localIndex CharOperation BLOCK_SCOPE BlockScope
public int max Shifted Offset int max 1 if this shift Scopes null for int i 0 length this shift Scopes length i length i int sub Max Offset this shift Scopes i max Offset if sub Max Offset max max sub Max Offset return max  maxShiftedOffset shiftScopes shiftScopes subMaxOffset shiftScopes maxOffset subMaxOffset subMaxOffset
to abort public Problem Reporter problem Reporter return outer Most Method Scope problem Reporter  ProblemReporter problemReporter outerMostMethodScope problemReporter
public void propagate Inner Emulation Reference Binding target Type boolean is Enclosing Instance Supplied no need to propagate enclosing instances they got eagerly allocated already Synthetic Argument Binding synthetic Arguments if synthetic Arguments target Type synthetic Outer Local Variables null for int i 0 max synthetic Arguments length i max i Synthetic Argument Binding synthetic Arg synthetic Arguments i need to filter out the one that could match a supplied enclosing instance if is Enclosing Instance Supplied synthetic Arg type target Type enclosing Type this emulate Outer Access synthetic Arg actual Outer Local Variable  propagateInnerEmulation ReferenceBinding targetType isEnclosingInstanceSupplied SyntheticArgumentBinding syntheticArguments syntheticArguments targetType syntheticOuterLocalVariables syntheticArguments SyntheticArgumentBinding syntheticArg syntheticArguments isEnclosingInstanceSupplied syntheticArg targetType enclosingType emulateOuterAccess syntheticArg actualOuterLocalVariable
It is the nearest enclosing type of this scope public Type Declaration reference Type return method Scope reference Type  TypeDeclaration referenceType methodScope referenceType
public int scope Index if this instanceof Method Scope return 1 Block Scope parent Scope Block Scope parent Scope parent Subscopes parent Scope subscopes for int i 0 max parent Scope subscope Count i max i if parent Subscopes i this return i return 1  scopeIndex MethodScope BlockScope parentScope BlockScope parentSubscopes parentScope parentScope subscopeCount parentSubscopes
start position in this scope for ordering scopes vs variables int start Index return start Index  startIndex startIndex
public String to String return to String 0  toString toString
public String to String int tab String s basic To String tab for int i 0 i subscope Count i if subscopes i instanceof Block Scope s Block Scope subscopes i to String tab 1 n NON NLS 1 return s  toString basicToString subscopeCount BlockScope BlockScope toString

public Type Declaration reference Context public Class Scope Scope parent Type Declaration context super CLASS SCOPE parent this reference Context context  TypeDeclaration referenceContext ClassScope TypeDeclaration CLASS_SCOPE referenceContext
void build Anonymous Type Binding Source Type Binding enclosing Type Reference Binding supertype Local Type Binding anonymous Type build Local Type enclosing Type enclosing Type f Package Source Type Binding source Type reference Context binding if supertype is Interface source Type superclass get Java Lang Object source Type super Interfaces new Reference Binding supertype else source Type superclass supertype source Type super Interfaces Type Constants No Super Interfaces connect Member Types build Fields And Methods anonymous Type fault In Types For Fields And Methods source Type verify Methods environment method Verifier  buildAnonymousTypeBinding SourceTypeBinding enclosingType ReferenceBinding LocalTypeBinding anonymousType buildLocalType enclosingType enclosingType fPackage SourceTypeBinding sourceType referenceContext isInterface sourceType getJavaLangObject sourceType superInterfaces ReferenceBinding sourceType sourceType superInterfaces TypeConstants NoSuperInterfaces connectMemberTypes buildFieldsAndMethods anonymousType faultInTypesForFieldsAndMethods sourceType verifyMethods methodVerifier
private void build Fields if reference Context fields null reference Context binding fields No Fields return count the number of fields vs initializers Field Declaration fields reference Context fields int size fields length int count 0 for int i 0 i size i if fields i is Field count iterate the field declarations to create the bindings lose all duplicates Field Binding field Bindings new Field Binding count Hashtable Of Object known Field Names new Hashtable Of Object count boolean duplicate false count 0 for int i 0 i size i Field Declaration field fields i if field is Field if reference Context binding is Interface problem Reporter interface Cannot Have Initializers reference Context binding field else Field Binding field Binding new Field Binding field null field modifiers Acc Unresolved reference Context binding field s type will be resolved when needed for top level types check And Set Modifiers For Field field Binding field if known Field Names contains Key field name duplicate true Field Binding previous Binding Field Binding known Field Names get field name if previous Binding null for int f 0 f i f Field Declaration previous Field fields f if previous Field binding previous Binding problem Reporter duplicate Field In Type reference Context binding previous Field previous Field binding null break known Field Names put field name null ensure that the duplicate field is found removed problem Reporter duplicate Field In Type reference Context binding field field binding null else known Field Names put field name field Binding remember that we have seen a field with this name if field Binding null field Bindings count field Binding remove duplicate fields if duplicate Field Binding new Field Bindings new Field Binding known Field Names size 1 we know we ll be removing at least 1 duplicate name size count count 0 for int i 0 i size i Field Binding field Binding field Bindings i if known Field Names get field Binding name null new Field Bindings count field Binding field Bindings new Field Bindings if count field Bindings length System arraycopy field Bindings 0 field Bindings new Field Binding count 0 count for int i 0 i count i field Bindings i id i reference Context binding fields field Bindings  buildFields referenceContext referenceContext NoFields FieldDeclaration referenceContext isField FieldBinding fieldBindings FieldBinding HashtableOfObject knownFieldNames HashtableOfObject FieldDeclaration isField referenceContext isInterface problemReporter interfaceCannotHaveInitializers referenceContext FieldBinding fieldBinding FieldBinding AccUnresolved referenceContext checkAndSetModifiersForField fieldBinding knownFieldNames containsKey FieldBinding previousBinding FieldBinding knownFieldNames previousBinding FieldDeclaration previousField previousField previousBinding problemReporter duplicateFieldInType referenceContext previousField previousField knownFieldNames problemReporter duplicateFieldInType referenceContext knownFieldNames fieldBinding fieldBinding fieldBindings fieldBinding FieldBinding newFieldBindings FieldBinding knownFieldNames FieldBinding fieldBinding fieldBindings knownFieldNames fieldBinding newFieldBindings fieldBinding fieldBindings newFieldBindings fieldBindings fieldBindings fieldBindings FieldBinding fieldBindings referenceContext fieldBindings
void build Fields And Methods build Fields build Methods Source Type Binding source Type reference Context binding if source Type is Member Type source Type is Local Type Member Type Binding source Type check Synthetic Args And Fields Reference Binding member Types source Type member Types for int i 0 length member Types length i length i Source Type Binding member Types i scope build Fields And Methods  buildFieldsAndMethods buildFields buildMethods SourceTypeBinding sourceType referenceContext sourceType isMemberType sourceType isLocalType MemberTypeBinding sourceType checkSyntheticArgsAndFields ReferenceBinding memberTypes sourceType memberTypes memberTypes SourceTypeBinding memberTypes buildFieldsAndMethods
private Local Type Binding build Local Type Source Type Binding enclosing Type Package Binding package Binding reference Context scope this reference Context static Initializer Scope new Method Scope this reference Context true reference Context initializer Scope new Method Scope this reference Context false build the binding or the local type Local Type Binding local Type new Local Type Binding this enclosing Type this switch Case reference Context binding local Type check And Set Modifiers Look at member types Reference Binding member Type Bindings No Member Types if reference Context member Types null int size reference Context member Types length member Type Bindings new Reference Binding size int count 0 next Member for int i 0 i size i Type Declaration member Context reference Context member Types i if member Context is Interface problem Reporter nested Class Cannot Declare Interface member Context continue next Member Reference Binding type local Type check that the member does not conflict with an enclosing type do if Char Operation equals type source Name member Context name problem Reporter hiding Enclosing Type member Context continue next Member type type enclosing Type while type null check the member type does not conflict with another sibling member type for int j 0 j i j if Char Operation equals reference Context member Types j name member Context name problem Reporter duplicate Nested Type member Context continue next Member Class Scope member Scope new Class Scope this reference Context member Types i Local Type Binding member Binding member Scope build Local Type local Type package Binding member Binding set As Member Type member Type Bindings count member Binding if count size System arraycopy member Type Bindings 0 member Type Bindings new Reference Binding count 0 count local Type member Types member Type Bindings return local Type  LocalTypeBinding buildLocalType SourceTypeBinding enclosingType PackageBinding packageBinding referenceContext referenceContext staticInitializerScope MethodScope referenceContext referenceContext initializerScope MethodScope referenceContext LocalTypeBinding localType LocalTypeBinding enclosingType switchCase referenceContext localType checkAndSetModifiers ReferenceBinding memberTypeBindings NoMemberTypes referenceContext memberTypes referenceContext memberTypes memberTypeBindings ReferenceBinding nextMember TypeDeclaration memberContext referenceContext memberTypes memberContext isInterface problemReporter nestedClassCannotDeclareInterface memberContext nextMember ReferenceBinding localType CharOperation sourceName memberContext problemReporter hidingEnclosingType memberContext nextMember enclosingType CharOperation referenceContext memberTypes memberContext problemReporter duplicateNestedType memberContext nextMember ClassScope memberScope ClassScope referenceContext memberTypes LocalTypeBinding memberBinding memberScope buildLocalType localType packageBinding memberBinding setAsMemberType memberTypeBindings memberBinding memberTypeBindings memberTypeBindings ReferenceBinding localType memberTypes memberTypeBindings localType
void build Local Type Binding Source Type Binding enclosing Type Local Type Binding local Type build Local Type enclosing Type enclosing Type f Package connect Type Hierarchy build Fields And Methods local Type fault In Types For Fields And Methods reference Context binding verify Methods environment method Verifier  buildLocalTypeBinding SourceTypeBinding enclosingType LocalTypeBinding localType buildLocalType enclosingType enclosingType fPackage connectTypeHierarchy buildFieldsAndMethods localType faultInTypesForFieldsAndMethods referenceContext verifyMethods methodVerifier
private void build Methods if reference Context methods null reference Context binding methods No Methods return iterate the method declarations to create the bindings Abstract Method Declaration methods reference Context methods int size methods length int clinit Index 1 for int i 0 i size i if methods i instanceof Clinit clinit Index i break Method Binding method Bindings new Method Binding clinit Index 1 size size 1 int count 0 for int i 0 i size i if i clinit Index Method Scope scope new Method Scope this methods i false Method Binding method Binding scope create Method methods i if method Binding null is null if binding could not be created method Bindings count method Binding if count method Bindings length System arraycopy method Bindings 0 method Bindings new Method Binding count 0 count reference Context binding methods method Bindings reference Context binding modifiers Acc Unresolved until methods is sent  buildMethods referenceContext referenceContext NoMethods AbstractMethodDeclaration referenceContext clinitIndex clinitIndex MethodBinding methodBindings MethodBinding clinitIndex clinitIndex MethodScope MethodScope MethodBinding methodBinding createMethod methodBinding methodBindings methodBinding methodBindings methodBindings methodBindings MethodBinding referenceContext methodBindings referenceContext AccUnresolved
Source Type Binding build Type Source Type Binding enclosing Type Package Binding package Binding provide the type Declaration with needed scopes reference Context scope this reference Context static Initializer Scope new Method Scope this reference Context true reference Context initializer Scope new Method Scope this reference Context false if enclosing Type null char class Name Char Operation array Concat package Binding compound Name reference Context name reference Context binding new Source Type Binding class Name package Binding this else char class Name Char Operation deep Copy enclosing Type compound Name class Name class Name length 1 Char Operation concat class Name class Name length 1 reference Context name reference Context binding new Member Type Binding class Name this enclosing Type Source Type Binding source Type reference Context binding source Type f Package add Type source Type check And Set Modifiers Look at member types Reference Binding member Type Bindings No Member Types if reference Context member Types null int size reference Context member Types length member Type Bindings new Reference Binding size int count 0 next Member for int i 0 i size i Type Declaration member Context reference Context member Types i if member Context is Interface source Type is Nested Type source Type is Class source Type is Static problem Reporter nested Class Cannot Declare Interface member Context continue next Member Reference Binding type source Type check that the member does not conflict with an enclosing type do if Char Operation equals type source Name member Context name problem Reporter hiding Enclosing Type member Context continue next Member type type enclosing Type while type null check that the member type does not conflict with another sibling member type for int j 0 j i j if Char Operation equals reference Context member Types j name member Context name problem Reporter duplicate Nested Type member Context continue next Member Class Scope member Scope new Class Scope this member Context member Type Bindings count member Scope build Type source Type package Binding if count size System arraycopy member Type Bindings 0 member Type Bindings new Reference Binding count 0 count source Type member Types member Type Bindings return source Type  SourceTypeBinding buildType SourceTypeBinding enclosingType PackageBinding packageBinding typeDeclaration referenceContext referenceContext staticInitializerScope MethodScope referenceContext referenceContext initializerScope MethodScope referenceContext enclosingType className CharOperation arrayConcat packageBinding compoundName referenceContext referenceContext SourceTypeBinding className packageBinding className CharOperation deepCopy enclosingType compoundName className className CharOperation className className referenceContext referenceContext MemberTypeBinding className enclosingType SourceTypeBinding sourceType referenceContext sourceType fPackage addType sourceType checkAndSetModifiers ReferenceBinding memberTypeBindings NoMemberTypes referenceContext memberTypes referenceContext memberTypes memberTypeBindings ReferenceBinding nextMember TypeDeclaration memberContext referenceContext memberTypes memberContext isInterface sourceType isNestedType sourceType isClass sourceType isStatic problemReporter nestedClassCannotDeclareInterface memberContext nextMember ReferenceBinding sourceType CharOperation sourceName memberContext problemReporter hidingEnclosingType memberContext nextMember enclosingType CharOperation referenceContext memberTypes memberContext problemReporter duplicateNestedType memberContext nextMember ClassScope memberScope ClassScope memberContext memberTypeBindings memberScope buildType sourceType packageBinding memberTypeBindings memberTypeBindings ReferenceBinding sourceType memberTypes memberTypeBindings sourceType
private void check And Set Modifiers Source Type Binding source Type reference Context binding int modifiers source Type modifiers if modifiers Acc Alternate Modifier Problem 0 problem Reporter duplicate Modifier For Type source Type Reference Binding enclosing Type source Type enclosing Type boolean is Member Type source Type is Member Type if is Member Type checks for member types before local types to catch local members if enclosing Type is Strictfp modifiers Acc Strictfp if enclosing Type is Viewed As Deprecated source Type is Deprecated modifiers Acc Deprecated Implicitly if enclosing Type is Interface modifiers Acc Public else if source Type is Local Type if source Type is Anonymous Type modifiers Acc Final Scope scope this do switch scope kind case METHOD SCOPE Method Scope method Scope Method Scope scope if method Scope is Inside Initializer Source Type Binding type Type Declaration method Scope reference Context binding inside field declaration check field modifier to see if deprecated if method Scope initialized Field null currently inside this field initialization if method Scope initialized Field is Viewed As Deprecated source Type is Deprecated modifiers Acc Deprecated Implicitly else if type is Strictfp modifiers Acc Strictfp if type is Viewed As Deprecated source Type is Deprecated modifiers Acc Deprecated Implicitly else Method Binding method Abstract Method Declaration method Scope reference Context binding if method null if method is Strictfp modifiers Acc Strictfp if method is Viewed As Deprecated source Type is Deprecated modifiers Acc Deprecated Implicitly break case CLASS SCOPE local member if enclosing Type is Strictfp modifiers Acc Strictfp if enclosing Type is Viewed As Deprecated source Type is Deprecated modifiers Acc Deprecated Implicitly break scope scope parent while scope null after this point tests on the 16 bits reserved int real Modifiers modifiers Acc Just Flag if real Modifiers Acc Interface 0 detect abnormal cases for interfaces if is Member Type int unexpected Modifiers Acc Public Acc Private Acc Protected Acc Static Acc Abstract Acc Interface Acc Strictfp if real Modifiers unexpected Modifiers 0 problem Reporter illegal Modifier For Member Interface source Type else if source Type is Local Type interfaces cannot be defined inside a method int unexpected Modifiers Acc Abstract Acc Interface Acc Strictfp if real Modifiers unexpected Modifiers 0 problem Reporter illegal Modifier For Local Interface source Type else int unexpected Modifiers Acc Public Acc Abstract Acc Interface Acc Strictfp if real Modifiers unexpected Modifiers 0 problem Reporter illegal Modifier For Interface source Type modifiers Acc Abstract else detect abnormal cases for types if is Member Type includes member types defined inside local types int unexpected Modifiers Acc Public Acc Private Acc Protected Acc Static Acc Abstract Acc Final Acc Strictfp if real Modifiers unexpected Modifiers 0 problem Reporter illegal Modifier For Member Class source Type else if source Type is Local Type int unexpected Modifiers Acc Abstract Acc Final Acc Strictfp if real Modifiers unexpected Modifiers 0 problem Reporter illegal Modifier For Local Class source Type else int unexpected Modifiers Acc Public Acc Abstract Acc Final Acc Strictfp if real Modifiers unexpected Modifiers 0 problem Reporter illegal Modifier For Class source Type check that Final and Abstract are not set together if real Modifiers Acc Final Acc Abstract Acc Final Acc Abstract problem Reporter illegal Modifier Combination Final Abstract For Class source Type if is Member Type test visibility modifiers inconsistency isolate the accessors bits if enclosing Type is Interface if real Modifiers Acc Protected Acc Private 0 problem Reporter illegal Visibility Modifier For Interface Member Type source Type need to keep the less restrictive if real Modifiers Acc Protected 0 modifiers Acc Protected if real Modifiers Acc Private 0 modifiers Acc Private else int accessor Bits real Modifiers Acc Public Acc Protected Acc Private if accessor Bits accessor Bits 1 1 problem Reporter illegal Visibility Modifier Combination For Member Type source Type need to keep the less restrictive if accessor Bits Acc Public 0 if accessor Bits Acc Protected 0 modifiers Acc Protected if accessor Bits Acc Private 0 modifiers Acc Private if accessor Bits Acc Protected 0 if accessor Bits Acc Private 0 modifiers Acc Private static modifier test if real Modifiers Acc Static 0 if enclosing Type is Interface modifiers Acc Static else if enclosing Type is Static error the enclosing type of a static field must be static or a top level type problem Reporter illegal Static Modifier For Member Type source Type source Type modifiers modifiers  checkAndSetModifiers SourceTypeBinding sourceType referenceContext sourceType AccAlternateModifierProblem problemReporter duplicateModifierForType sourceType ReferenceBinding enclosingType sourceType enclosingType isMemberType sourceType isMemberType isMemberType enclosingType isStrictfp AccStrictfp enclosingType isViewedAsDeprecated sourceType isDeprecated AccDeprecatedImplicitly enclosingType isInterface AccPublic sourceType isLocalType sourceType isAnonymousType AccFinal METHOD_SCOPE MethodScope methodScope MethodScope methodScope isInsideInitializer SourceTypeBinding TypeDeclaration methodScope referenceContext methodScope initializedField methodScope initializedField isViewedAsDeprecated sourceType isDeprecated AccDeprecatedImplicitly isStrictfp AccStrictfp isViewedAsDeprecated sourceType isDeprecated AccDeprecatedImplicitly MethodBinding AbstractMethodDeclaration methodScope referenceContext isStrictfp AccStrictfp isViewedAsDeprecated sourceType isDeprecated AccDeprecatedImplicitly CLASS_SCOPE enclosingType isStrictfp AccStrictfp enclosingType isViewedAsDeprecated sourceType isDeprecated AccDeprecatedImplicitly realModifiers AccJustFlag realModifiers AccInterface isMemberType unexpectedModifiers AccPublic AccPrivate AccProtected AccStatic AccAbstract AccInterface AccStrictfp realModifiers unexpectedModifiers problemReporter illegalModifierForMemberInterface sourceType sourceType isLocalType unexpectedModifiers AccAbstract AccInterface AccStrictfp realModifiers unexpectedModifiers problemReporter illegalModifierForLocalInterface sourceType unexpectedModifiers AccPublic AccAbstract AccInterface AccStrictfp realModifiers unexpectedModifiers problemReporter illegalModifierForInterface sourceType AccAbstract isMemberType unexpectedModifiers AccPublic AccPrivate AccProtected AccStatic AccAbstract AccFinal AccStrictfp realModifiers unexpectedModifiers problemReporter illegalModifierForMemberClass sourceType sourceType isLocalType unexpectedModifiers AccAbstract AccFinal AccStrictfp realModifiers unexpectedModifiers problemReporter illegalModifierForLocalClass sourceType unexpectedModifiers AccPublic AccAbstract AccFinal AccStrictfp realModifiers unexpectedModifiers problemReporter illegalModifierForClass sourceType realModifiers AccFinal AccAbstract AccFinal AccAbstract problemReporter illegalModifierCombinationFinalAbstractForClass sourceType isMemberType enclosingType isInterface realModifiers AccProtected AccPrivate problemReporter illegalVisibilityModifierForInterfaceMemberType sourceType realModifiers AccProtected AccProtected realModifiers AccPrivate AccPrivate accessorBits realModifiers AccPublic AccProtected AccPrivate accessorBits accessorBits problemReporter illegalVisibilityModifierCombinationForMemberType sourceType accessorBits AccPublic accessorBits AccProtected AccProtected accessorBits AccPrivate AccPrivate accessorBits AccProtected accessorBits AccPrivate AccPrivate realModifiers AccStatic enclosingType isInterface AccStatic enclosingType isStatic problemReporter illegalStaticModifierForMemberType sourceType sourceType
private void check And Set Modifiers For Field Field Binding field Binding Field Declaration field Decl int modifiers field Binding modifiers if modifiers Acc Alternate Modifier Problem 0 problem Reporter duplicate Modifier For Field field Binding declaring Class field Decl if field Binding declaring Class is Interface int expected Value Acc Public Acc Static Acc Final set the modifiers modifiers expected Value and then check that they are the only ones if modifiers Acc Just Flag expected Value problem Reporter illegal Modifier For Interface Field field Binding declaring Class field Decl field Binding modifiers modifiers return after this point tests on the 16 bits reserved int real Modifiers modifiers Acc Just Flag int unexpected Modifiers Acc Public Acc Private Acc Protected Acc Final Acc Static Acc Transient Acc Volatile if real Modifiers unexpected Modifiers 0 problem Reporter illegal Modifier For Field field Binding declaring Class field Decl int accessor Bits real Modifiers Acc Public Acc Protected Acc Private if accessor Bits accessor Bits 1 1 problem Reporter illegal Visibility Modifier Combination For Field field Binding declaring Class field Decl need to keep the less restrictive if accessor Bits Acc Public 0 if accessor Bits Acc Protected 0 modifiers Acc Protected if accessor Bits Acc Private 0 modifiers Acc Private if accessor Bits Acc Protected 0 if accessor Bits Acc Private 0 modifiers Acc Private if real Modifiers Acc Final Acc Volatile Acc Final Acc Volatile problem Reporter illegal Modifier Combination Final Volatile For Field field Binding declaring Class field Decl if field Decl initialization null modifiers Acc Final 0 modifiers Acc Blank Final field Binding modifiers modifiers  checkAndSetModifiersForField FieldBinding fieldBinding FieldDeclaration fieldDecl fieldBinding AccAlternateModifierProblem problemReporter duplicateModifierForField fieldBinding declaringClass fieldDecl fieldBinding declaringClass isInterface expectedValue AccPublic AccStatic AccFinal expectedValue AccJustFlag expectedValue problemReporter illegalModifierForInterfaceField fieldBinding declaringClass fieldDecl fieldBinding realModifiers AccJustFlag unexpectedModifiers AccPublic AccPrivate AccProtected AccFinal AccStatic AccTransient AccVolatile realModifiers unexpectedModifiers problemReporter illegalModifierForField fieldBinding declaringClass fieldDecl accessorBits realModifiers AccPublic AccProtected AccPrivate accessorBits accessorBits problemReporter illegalVisibilityModifierCombinationForField fieldBinding declaringClass fieldDecl accessorBits AccPublic accessorBits AccProtected AccProtected accessorBits AccPrivate AccPrivate accessorBits AccProtected accessorBits AccPrivate AccPrivate realModifiers AccFinal AccVolatile AccFinal AccVolatile problemReporter illegalModifierCombinationFinalVolatileForField fieldBinding declaringClass fieldDecl fieldDecl AccFinal AccBlankFinal fieldBinding
private void check For Inherited Member Types Source Type Binding source Type search up the hierarchy of the source Type to see if any super Type defines a member type when no member types are defined tag the source Type each super Type with the Has No Member Types bit Reference Binding current Type source Type Reference Binding interfaces To Visit null int last Position 1 do if current Type tag Bits Has No Member Types 0 break already know it has no inherited member types can stop looking up if current Type has Member Types avoid resolving member types eagerly return has member types Reference Binding its Interfaces current Type super Interfaces if its Interfaces No Super Interfaces if interfaces To Visit null interfaces To Visit new Reference Binding 5 if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces while current Type current Type superclass null boolean has Members false if interfaces To Visit null done for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j Reference Binding an Interface interfaces j if an Interface tag Bits Interface Visited 0 if interface as not already been visited an Interface tag Bits Interface Visited if an Interface tag Bits Has No Member Types 0 continue already know it has no inherited member types if an Interface member Types No Member Types has Members true break done Reference Binding its Interfaces an Interface super Interfaces if its Interfaces No Super Interfaces if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j interfaces j tag Bits Interface Visited if has Members interfaces j tag Bits Has No Member Types if has Members current Type source Type do current Type tag Bits Has No Member Types while current Type current Type superclass null  checkForInheritedMemberTypes SourceTypeBinding sourceType sourceType superType sourceType superType HasNoMemberTypes ReferenceBinding currentType sourceType ReferenceBinding interfacesToVisit lastPosition currentType tagBits HasNoMemberTypes currentType hasMemberTypes ReferenceBinding itsInterfaces currentType superInterfaces itsInterfaces NoSuperInterfaces interfacesToVisit interfacesToVisit ReferenceBinding lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces currentType currentType hasMembers interfacesToVisit lastPosition ReferenceBinding interfacesToVisit ReferenceBinding anInterface anInterface tagBits InterfaceVisited anInterface tagBits InterfaceVisited anInterface tagBits HasNoMemberTypes anInterface memberTypes NoMemberTypes hasMembers ReferenceBinding itsInterfaces anInterface superInterfaces itsInterfaces NoSuperInterfaces lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces lastPosition ReferenceBinding interfacesToVisit tagBits InterfaceVisited hasMembers tagBits HasNoMemberTypes hasMembers currentType sourceType currentType tagBits HasNoMemberTypes currentType currentType
private void connect Member Types Source Type Binding source Type reference Context binding if source Type member Types No Member Types for int i 0 size source Type member Types length i size i Source Type Binding source Type member Types i scope connect Type Hierarchy  connectMemberTypes SourceTypeBinding sourceType referenceContext sourceType memberTypes NoMemberTypes sourceType memberTypes SourceTypeBinding sourceType memberTypes connectTypeHierarchy
private boolean connect Superclass Source Type Binding source Type reference Context binding if source Type id T Object handle the case of redefining java lang Object up front source Type superclass null source Type super Interfaces No Super Interfaces if reference Context superclass null reference Context super Interfaces null problem Reporter object Cannot Have Super Types source Type return true do not propagate Object s hierarchy problems down to every subtype if reference Context superclass null source Type superclass get Java Lang Object return detect Cycle source Type source Type superclass null Reference Binding superclass find Supertype reference Context superclass if superclass null is null if a cycle was detected cycle reference Context superclass resolved Type superclass hold onto the problem type if superclass is Valid Binding problem Reporter invalid Superclass source Type reference Context superclass superclass else if superclass is Interface problem Reporter superclass Must BeA Class source Type reference Context superclass superclass else if superclass is Final problem Reporter class Extend Final Class source Type reference Context superclass superclass else only want to reach here when no errors are reported source Type superclass superclass return true source Type tag Bits Hierarchy Has Problems source Type superclass get Java Lang Object if source Type superclass tag Bits Begin Hierarchy Check 0 detect Cycle source Type source Type superclass null return false reported some error against the source type  connectSuperclass SourceTypeBinding sourceType referenceContext sourceType T_Object sourceType sourceType superInterfaces NoSuperInterfaces referenceContext referenceContext superInterfaces problemReporter objectCannotHaveSuperTypes sourceType referenceContext sourceType getJavaLangObject detectCycle sourceType sourceType ReferenceBinding findSupertype referenceContext referenceContext resolvedType isValidBinding problemReporter invalidSuperclass sourceType referenceContext isInterface problemReporter superclassMustBeAClass sourceType referenceContext isFinal problemReporter classExtendFinalClass sourceType referenceContext sourceType sourceType tagBits HierarchyHasProblems sourceType getJavaLangObject sourceType tagBits BeginHierarchyCheck detectCycle sourceType sourceType
private boolean connect Super Interfaces Source Type Binding source Type reference Context binding source Type super Interfaces No Super Interfaces if reference Context super Interfaces null return true if source Type id T Object already handled the case of redefining java lang Object return true boolean no Problems true int length reference Context super Interfaces length Reference Binding interface Bindings new Reference Binding length int count 0 next Interface for int i 0 i length i Reference Binding super Interface find Supertype reference Context super Interfaces i if super Interface null detected cycle no Problems false continue next Interface reference Context super Interfaces i resolved Type super Interface hold onto the problem type if super Interface is Valid Binding problem Reporter invalid Superinterface source Type reference Context super Interfaces i super Interface source Type tag Bits Hierarchy Has Problems no Problems false continue next Interface Check for a duplicate interface once the name is resolved otherwise we may be confused ie a b I and c d I for int k 0 k count k if interface Bindings k super Interface should this be treated as a warning problem Reporter duplicate Superinterface source Type reference Context super Interface continue next Interface if super Interface is Class problem Reporter superinterface Must Be An Interface source Type reference Context super Interface source Type tag Bits Hierarchy Has Problems no Problems false continue next Interface only want to reach here when no errors are reported interface Bindings count super Interface hold onto all correctly resolved superinterfaces if count 0 if count length System arraycopy interface Bindings 0 interface Bindings new Reference Binding count 0 count source Type super Interfaces interface Bindings return no Problems  connectSuperInterfaces SourceTypeBinding sourceType referenceContext sourceType superInterfaces NoSuperInterfaces referenceContext superInterfaces sourceType T_Object noProblems referenceContext superInterfaces ReferenceBinding interfaceBindings ReferenceBinding nextInterface ReferenceBinding superInterface findSupertype referenceContext superInterfaces superInterface noProblems nextInterface referenceContext superInterfaces resolvedType superInterface superInterface isValidBinding problemReporter invalidSuperinterface sourceType referenceContext superInterfaces superInterface sourceType tagBits HierarchyHasProblems noProblems nextInterface interfaceBindings superInterface problemReporter duplicateSuperinterface sourceType referenceContext superInterface nextInterface superInterface isClass problemReporter superinterfaceMustBeAnInterface sourceType referenceContext superInterface sourceType tagBits HierarchyHasProblems noProblems nextInterface interfaceBindings superInterface interfaceBindings interfaceBindings ReferenceBinding sourceType superInterfaces interfaceBindings noProblems
void connect Type Hierarchy Source Type Binding source Type reference Context binding if source Type tag Bits Begin Hierarchy Check 0 boolean no Problems true source Type tag Bits Begin Hierarchy Check if source Type is Class no Problems connect Superclass no Problems connect Super Interfaces source Type tag Bits End Hierarchy Check if no Problems source Type is Hierarchy Inconsistent problem Reporter hierarchy Has Problems source Type connect Member Types try check For Inherited Member Types source Type catch Abort Compilation e e update Context reference Context reference Compilation Unit compilation Result throw e  connectTypeHierarchy SourceTypeBinding sourceType referenceContext sourceType tagBits BeginHierarchyCheck noProblems sourceType tagBits BeginHierarchyCheck sourceType isClass noProblems connectSuperclass noProblems connectSuperInterfaces sourceType tagBits EndHierarchyCheck noProblems sourceType isHierarchyInconsistent problemReporter hierarchyHasProblems sourceType connectMemberTypes checkForInheritedMemberTypes sourceType AbortCompilation updateContext referenceContext referenceCompilationUnit compilationResult
private void connect Type Hierarchy Without Members must ensure the imports are resolved if parent instanceof Compilation Unit Scope if Compilation Unit Scope parent imports null Compilation Unit Scope parent check And Set Imports else if parent instanceof Class Scope ensure that the enclosing type has already been checked Class Scope parent connect Type Hierarchy Without Members double check that the hierarchy search has not already begun Source Type Binding source Type reference Context binding if source Type tag Bits Begin Hierarchy Check 0 return boolean no Problems true source Type tag Bits Begin Hierarchy Check if source Type is Class no Problems connect Superclass no Problems connect Super Interfaces source Type tag Bits End Hierarchy Check if no Problems source Type is Hierarchy Inconsistent problem Reporter hierarchy Has Problems source Type  connectTypeHierarchyWithoutMembers CompilationUnitScope CompilationUnitScope CompilationUnitScope checkAndSetImports ClassScope ClassScope connectTypeHierarchyWithoutMembers SourceTypeBinding sourceType referenceContext sourceType tagBits BeginHierarchyCheck noProblems sourceType tagBits BeginHierarchyCheck sourceType isClass noProblems connectSuperclass noProblems connectSuperInterfaces sourceType tagBits EndHierarchyCheck noProblems sourceType isHierarchyInconsistent problemReporter hierarchyHasProblems sourceType
Answer whether a cycle was found between the source Type the super Type private boolean detect Cycle Source Type Binding source Type Reference Binding super Type Type Reference reference if source Type super Type problem Reporter hierarchy Circularity source Type super Type reference source Type tag Bits Hierarchy Has Problems return true if super Type is Binary Binding force its superclass superinterfaces to be found 2 possibilities exist the source type is included in the hierarchy of a binary type this case MUST be caught reported here another source type this case is reported against the other source type boolean has Cycle false if super Type superclass null if source Type super Type superclass problem Reporter hierarchy Circularity source Type super Type reference source Type tag Bits Hierarchy Has Problems super Type tag Bits Hierarchy Has Problems return true has Cycle detect Cycle source Type super Type superclass reference if super Type superclass tag Bits Hierarchy Has Problems 0 source Type tag Bits Hierarchy Has Problems super Type tag Bits Hierarchy Has Problems propagate down the hierarchy Reference Binding its Interfaces super Type super Interfaces if its Interfaces No Super Interfaces for int i 0 length its Interfaces length i length i Reference Binding an Interface its Interfaces i if source Type an Interface problem Reporter hierarchy Circularity source Type super Type reference source Type tag Bits Hierarchy Has Problems super Type tag Bits Hierarchy Has Problems return true has Cycle detect Cycle source Type an Interface reference if an Interface tag Bits Hierarchy Has Problems 0 source Type tag Bits Hierarchy Has Problems super Type tag Bits Hierarchy Has Problems return has Cycle if super Type tag Bits End Hierarchy Check 0 super Type tag Bits Begin Hierarchy Check 0 problem Reporter hierarchy Circularity source Type super Type reference source Type tag Bits Hierarchy Has Problems super Type tag Bits Hierarchy Has Problems return true if super Type tag Bits Begin Hierarchy Check 0 ensure if this is a source superclass that it has already been checked Source Type Binding super Type scope connect Type Hierarchy Without Members if super Type tag Bits Hierarchy Has Problems 0 source Type tag Bits Hierarchy Has Problems return false  sourceType superType detectCycle SourceTypeBinding sourceType ReferenceBinding superType TypeReference sourceType superType problemReporter hierarchyCircularity sourceType superType sourceType tagBits HierarchyHasProblems superType isBinaryBinding hasCycle superType sourceType superType problemReporter hierarchyCircularity sourceType superType sourceType tagBits HierarchyHasProblems superType tagBits HierarchyHasProblems hasCycle detectCycle sourceType superType superType tagBits HierarchyHasProblems sourceType tagBits HierarchyHasProblems superType tagBits HierarchyHasProblems ReferenceBinding itsInterfaces superType superInterfaces itsInterfaces NoSuperInterfaces itsInterfaces ReferenceBinding anInterface itsInterfaces sourceType anInterface problemReporter hierarchyCircularity sourceType superType sourceType tagBits HierarchyHasProblems superType tagBits HierarchyHasProblems hasCycle detectCycle sourceType anInterface anInterface tagBits HierarchyHasProblems sourceType tagBits HierarchyHasProblems superType tagBits HierarchyHasProblems hasCycle superType tagBits EndHierarchyCheck superType tagBits BeginHierarchyCheck problemReporter hierarchyCircularity sourceType superType sourceType tagBits HierarchyHasProblems superType tagBits HierarchyHasProblems superType tagBits BeginHierarchyCheck SourceTypeBinding superType connectTypeHierarchyWithoutMembers superType tagBits HierarchyHasProblems sourceType tagBits HierarchyHasProblems
private Reference Binding find Supertype Type Reference type Reference try type Reference about To Resolve this allows us to trap completion selection nodes char compound Name type Reference get Type Name compilation Unit Scope record Qualified Reference compound Name Source Type Binding source Type reference Context binding int size compound Name length int n 1 Reference Binding super Type resolve the first name of the compound Name if Char Operation equals compound Name 0 source Type source Name super Type source Type match against the source Type even though nested members cannot be supertypes else Binding type Or Package parent get Type Or Package compound Name 0 TYPE PACKAGE if type Or Package null type Or Package is Valid Binding return new Problem Reference Binding compound Name 0 type Or Package null Not Found type Or Package problem Id boolean check Visibility false for n size n if type Or Package instanceof Package Binding break Package Binding package Binding Package Binding type Or Package type Or Package package Binding get Type Or Package compound Name n if type Or Package null type Or Package is Valid Binding return new Problem Reference Binding Char Operation subarray compound Name 0 n 1 type Or Package null Not Found type Or Package problem Id check Visibility true convert to a Reference Binding if type Or Package instanceof Package Binding error the compound Name is a package Name return new Problem Reference Binding Char Operation subarray compound Name 0 n Not Found super Type Reference Binding type Or Package compilation Unit Scope record Type Reference super Type to record supertypes if check Visibility n size if we re finished and know the final supertype then check visibility if super Type can Be Seen By source Type f Package its a toplevel type so just check package access return new Problem Reference Binding Char Operation subarray compound Name 0 n super Type Not Visible at this point we know we have a type but we have to look for cycles while true must detect cycles force connection up the hierarchy also handle cycles with binary types must be guaranteed that the super Type knows its entire hierarchy if detect Cycle source Type super Type type Reference return null cycle error was already reported if n size break retrieve the next member type char type Name compound Name n super Type find Member Type type Name super Type if super Type null return new Problem Reference Binding Char Operation subarray compound Name 0 n Not Found if super Type is Valid Binding super Type compound Name Char Operation subarray compound Name 0 n return super Type return super Type catch Abort Compilation e e update Context type Reference reference Compilation Unit compilation Result throw e  ReferenceBinding findSupertype TypeReference typeReference typeReference aboutToResolve compoundName typeReference getTypeName compilationUnitScope recordQualifiedReference compoundName SourceTypeBinding sourceType referenceContext compoundName ReferenceBinding superType compoundName CharOperation compoundName sourceType sourceName superType sourceType sourceType typeOrPackage getTypeOrPackage compoundName typeOrPackage typeOrPackage isValidBinding ProblemReferenceBinding compoundName typeOrPackage NotFound typeOrPackage problemId checkVisibility typeOrPackage PackageBinding PackageBinding packageBinding PackageBinding typeOrPackage typeOrPackage packageBinding getTypeOrPackage compoundName typeOrPackage typeOrPackage isValidBinding ProblemReferenceBinding CharOperation compoundName typeOrPackage NotFound typeOrPackage problemId checkVisibility ReferenceBinding typeOrPackage PackageBinding compoundName packageName ProblemReferenceBinding CharOperation compoundName NotFound superType ReferenceBinding typeOrPackage compilationUnitScope recordTypeReference superType checkVisibility superType canBeSeenBy sourceType fPackage ProblemReferenceBinding CharOperation compoundName superType NotVisible superType detectCycle sourceType superType typeReference typeName compoundName superType findMemberType typeName superType superType ProblemReferenceBinding CharOperation compoundName NotFound superType isValidBinding superType compoundName CharOperation compoundName superType superType AbortCompilation updateContext typeReference referenceCompilationUnit compilationResult
public Problem Reporter problem Reporter Method Scope outer Method Scope if outer Method Scope outer Most Method Scope null Problem Reporter problem Reporter reference Compilation Unit problem Reporter problem Reporter reference Context reference Context return problem Reporter return outer Method Scope problem Reporter  ProblemReporter problemReporter MethodScope outerMethodScope outerMethodScope outerMostMethodScope ProblemReporter problemReporter referenceCompilationUnit problemReporter problemReporter referenceContext referenceContext problemReporter outerMethodScope problemReporter
It is the nearest enclosing type of this scope public Type Declaration reference Type return reference Context  TypeDeclaration referenceType referenceContext
public String to String if reference Context null return Class Scope n n NON NLS 1 reference Context binding to String return Class Scope n n Binding not initialized NON NLS 1  toString referenceContext referenceContext toString

public Compilation Unit Scope Compilation Unit Declaration unit Lookup Environment environment super COMPILATION UNIT SCOPE null this environment environment this reference Context unit unit scope this this current Package Name unit current Package null Char Operation NO CHAR CHAR unit current Package tokens if environment options produce Reference Info this qualified References new Compound Name Vector this simple Name References new Simple Name Vector this referenced Types new Object Vector else this qualified References null used to test if dependencies should be recorded this simple Name References null this referenced Types null  CompilationUnitScope CompilationUnitDeclaration LookupEnvironment COMPILATION_UNIT_SCOPE referenceContext currentPackageName currentPackage CharOperation NO_CHAR_CHAR currentPackage produceReferenceInfo qualifiedReferences CompoundNameVector simpleNameReferences SimpleNameVector referencedTypes ObjectVector qualifiedReferences simpleNameReferences referencedTypes
void build Fields And Methods for int i 0 length top Level Types length i length i top Level Types i scope build Fields And Methods  buildFieldsAndMethods topLevelTypes topLevelTypes buildFieldsAndMethods
void build Type Bindings top Level Types new Source Type Binding 0 want it initialized if the package cannot be resolved if reference Context compilation Result compilation Unit null char expected Package Name reference Context compilation Result compilation Unit get Package Name if expected Package Name null Char Operation equals current Package Name expected Package Name only report if the unit isn t structurally empty if reference Context current Package null reference Context types null reference Context imports null problem Reporter package Is Not Expected Package reference Context current Package Name expected Package Name length 0 Char Operation NO CHAR CHAR expected Package Name if current Package Name Char Operation NO CHAR CHAR if f Package environment default Package null problem Reporter must Specify Package reference Context return else if f Package environment create Package current Package Name null problem Reporter package Collides With Type reference Context return record Qualified Reference current Package Name always dependent on your own package Skip type Declarations which know of previously reported errors Type Declaration types reference Context types int type Length types null 0 types length top Level Types new Source Type Binding type Length int count 0 next Type for int i 0 i type Length i Type Declaration type Decl types i Reference Binding type Binding f Package get Type0 type Decl name record Simple Reference type Decl name needed to detect collision cases if type Binding null type Binding instanceof Unresolved Reference Binding if a type exists it must be a valid type cannot be a Not Found problem type unless its an unresolved type which is now being defined problem Reporter duplicate Types reference Context type Decl continue next Type if f Package environment default Package f Package get Package type Decl name null if a package exists it must be a valid package cannot be a Not Found problem package problem Reporter type Collides With Package reference Context type Decl continue next Type if type Decl modifiers Acc Public 0 char main Type Name if main Type Name reference Context get Main Type Name null main Type Name null means that implementor of I Compilation Unit decided to return null Char Operation equals main Type Name type Decl name problem Reporter public Class Must Match File Name reference Context type Decl continue next Type Class Scope child new Class Scope this type Decl Source Type Binding type child build Type null f Package if type null top Level Types count type shrink top Level Types only happens if an error was reported if count top Level Types length System arraycopy top Level Types 0 top Level Types new Source Type Binding count 0 count  buildTypeBindings topLevelTypes SourceTypeBinding referenceContext compilationResult compilationUnit expectedPackageName referenceContext compilationResult compilationUnit getPackageName expectedPackageName CharOperation currentPackageName expectedPackageName referenceContext currentPackage referenceContext referenceContext problemReporter packageIsNotExpectedPackage referenceContext currentPackageName expectedPackageName CharOperation NO_CHAR_CHAR expectedPackageName currentPackageName CharOperation NO_CHAR_CHAR fPackage defaultPackage problemReporter mustSpecifyPackage referenceContext fPackage createPackage currentPackageName problemReporter packageCollidesWithType referenceContext recordQualifiedReference currentPackageName typeDeclarations TypeDeclaration referenceContext typeLength topLevelTypes SourceTypeBinding typeLength nextType typeLength TypeDeclaration typeDecl ReferenceBinding typeBinding fPackage getType0 typeDecl recordSimpleReference typeDecl typeBinding typeBinding UnresolvedReferenceBinding NotFound problemReporter duplicateTypes referenceContext typeDecl nextType fPackage defaultPackage fPackage getPackage typeDecl NotFound problemReporter typeCollidesWithPackage referenceContext typeDecl nextType typeDecl AccPublic mainTypeName mainTypeName referenceContext getMainTypeName mainTypeName ICompilationUnit CharOperation mainTypeName typeDecl problemReporter publicClassMustMatchFileName referenceContext typeDecl nextType ClassScope ClassScope typeDecl SourceTypeBinding buildType fPackage topLevelTypes topLevelTypes topLevelTypes topLevelTypes topLevelTypes SourceTypeBinding
void check And Set Imports if reference Context imports null imports get Default Imports return allocate the import array add java lang by default int number Of Statements reference Context imports length int number Of Imports number Of Statements 1 for int i 0 i number Of Statements i Import Reference import Reference reference Context imports i if import Reference on Demand Char Operation equals JAVA LANG import Reference tokens number Of Imports break Import Binding resolved Imports new Import Binding number Of Imports resolved Imports 0 get Default Imports 0 int index 1 next Import for int i 0 i number Of Statements i Import Reference import Reference reference Context imports i char compound Name import Reference tokens skip duplicates or imports of the current package for int j 0 j index j if resolved Imports j on Demand import Reference on Demand if Char Operation equals compound Name resolved Imports j compound Name continue next Import if import Reference on Demand true if Char Operation equals compound Name current Package Name continue next Import if import Reference on Demand Binding import Binding find On Demand Import compound Name if import Binding is Valid Binding continue next Import we report all problems in fault In Imports resolved Imports index new Import Binding compound Name true import Binding import Reference else resolved Imports index new Import Binding compound Name false null import Reference shrink resolved Imports only happens if an error was reported if resolved Imports length index System arraycopy resolved Imports 0 resolved Imports new Import Binding index 0 index imports resolved Imports  checkAndSetImports referenceContext getDefaultImports numberOfStatements referenceContext numberOfImports numberOfStatements numberOfStatements ImportReference importReference referenceContext importReference onDemand CharOperation JAVA_LANG importReference numberOfImports ImportBinding resolvedImports ImportBinding numberOfImports resolvedImports getDefaultImports nextImport numberOfStatements ImportReference importReference referenceContext compoundName importReference resolvedImports onDemand importReference onDemand CharOperation compoundName resolvedImports compoundName nextImport importReference onDemand CharOperation compoundName currentPackageName nextImport importReference onDemand importBinding findOnDemandImport compoundName importBinding isValidBinding nextImport faultInImports resolvedImports ImportBinding compoundName importBinding importReference resolvedImports ImportBinding compoundName importReference resolvedImports resolvedImports resolvedImports resolvedImports ImportBinding resolvedImports
public char compute Constant Pool Name Local Type Binding local Type if local Type constant Pool Name null return local Type constant Pool Name delegates to the outermost enclosing classfile since it is the only one with a global vision of its innertypes if constant Pool Name Usage null constant Pool Name Usage new Hashtable Of Type Reference Binding outer Most Enclosing Type local Type scope outer Most Class Scope enclosing Source Type ensure there is not already such a local type name defined by the user int index 0 char candidate Name while true if local Type is Member Type if index 0 candidate Name Char Operation concat local Type enclosing Type constant Pool Name local Type source Name else in case of collision then member name gets extra 1 inserted e g class X class L new X class L candidate Name Char Operation concat local Type enclosing Type constant Pool Name String value Of index to Char Array local Type source Name else if local Type is Anonymous Type candidate Name Char Operation concat outer Most Enclosing Type constant Pool Name String value Of index 1 to Char Array else candidate Name Char Operation concat outer Most Enclosing Type constant Pool Name String value Of index 1 to Char Array local Type source Name if constant Pool Name Usage get candidate Name null index else constant Pool Name Usage put candidate Name local Type break return candidate Name  computeConstantPoolName LocalTypeBinding localType localType constantPoolName localType constantPoolName constantPoolNameUsage constantPoolNameUsage HashtableOfType ReferenceBinding outerMostEnclosingType localType outerMostClassScope enclosingSourceType candidateName localType isMemberType candidateName CharOperation localType enclosingType constantPoolName localType sourceName candidateName CharOperation localType enclosingType constantPoolName valueOf toCharArray localType sourceName localType isAnonymousType candidateName CharOperation outerMostEnclosingType constantPoolName valueOf toCharArray candidateName CharOperation outerMostEnclosingType constantPoolName valueOf toCharArray localType sourceName constantPoolNameUsage candidateName constantPoolNameUsage candidateName localType candidateName
void connect Type Hierarchy for int i 0 length top Level Types length i length i top Level Types i scope connect Type Hierarchy  connectTypeHierarchy topLevelTypes topLevelTypes connectTypeHierarchy
void fault In Imports if reference Context imports null return collect the top level type names if a single type import exists int number Of Statements reference Context imports length Hashtable Of Type types By Simple Names null for int i 0 i number Of Statements i if reference Context imports i on Demand types By Simple Names new Hashtable Of Type top Level Types length number Of Statements for int j 0 length top Level Types length j length j types By Simple Names put top Level Types j source Name top Level Types j break allocate the import array add java lang by default int number Of Imports number Of Statements 1 for int i 0 i number Of Statements i Import Reference import Reference reference Context imports i if import Reference on Demand Char Operation equals JAVA LANG import Reference tokens number Of Imports break Import Binding resolved Imports new Import Binding number Of Imports resolved Imports 0 get Default Imports 0 int index 1 next Import for int i 0 i number Of Statements i Import Reference import Reference reference Context imports i char compound Name import Reference tokens skip duplicates or imports of the current package for int j 0 j index j if resolved Imports j on Demand import Reference on Demand if Char Operation equals compound Name resolved Imports j compound Name problem Reporter unused Import import Reference since skipped must be reported now continue next Import if import Reference on Demand true if Char Operation equals compound Name current Package Name problem Reporter unused Import import Reference since skipped must be reported now continue next Import if import Reference on Demand Binding import Binding find On Demand Import compound Name if import Binding is Valid Binding problem Reporter import Problem import Reference import Binding continue next Import resolved Imports index new Import Binding compound Name true import Binding import Reference else Binding type Binding find Single Type Import compound Name if type Binding is Valid Binding problem Reporter import Problem import Reference type Binding continue next Import if type Binding instanceof Package Binding problem Reporter cannot Import Package import Reference continue next Import if type Binding instanceof Reference Binding Reference Binding reference Binding Reference Binding type Binding if import Reference is Type Use Deprecated reference Binding this problem Reporter deprecated Type Type Binding type Binding import Reference Reference Binding existing Type types By Simple Names get compound Name compound Name length 1 if existing Type null duplicate test above should have caught this case but make sure if existing Type type Binding continue next Import either the type collides with a top level type or another imported type for int j 0 length top Level Types length j length j if Char Operation equals top Level Types j source Name existing Type source Name problem Reporter conflicting Import import Reference continue next Import problem Reporter duplicate Import import Reference continue next Import resolved Imports index new Import Binding compound Name false type Binding import Reference types By Simple Names put compound Name compound Name length 1 Reference Binding type Binding shrink resolved Imports only happens if an error was reported if resolved Imports length index System arraycopy resolved Imports 0 resolved Imports new Import Binding index 0 index imports resolved Imports int length imports length resolved Singe Type Imports new Hashtable Of Object length for int i 0 i length i Import Binding binding imports i if binding on Demand resolved Singe Type Imports put binding compound Name binding compound Name length 1 binding  faultInImports referenceContext numberOfStatements referenceContext HashtableOfType typesBySimpleNames numberOfStatements referenceContext onDemand typesBySimpleNames HashtableOfType topLevelTypes numberOfStatements topLevelTypes typesBySimpleNames topLevelTypes sourceName topLevelTypes numberOfImports numberOfStatements numberOfStatements ImportReference importReference referenceContext importReference onDemand CharOperation JAVA_LANG importReference numberOfImports ImportBinding resolvedImports ImportBinding numberOfImports resolvedImports getDefaultImports nextImport numberOfStatements ImportReference importReference referenceContext compoundName importReference resolvedImports onDemand importReference onDemand CharOperation compoundName resolvedImports compoundName problemReporter unusedImport importReference nextImport importReference onDemand CharOperation compoundName currentPackageName problemReporter unusedImport importReference nextImport importReference onDemand importBinding findOnDemandImport compoundName importBinding isValidBinding problemReporter importProblem importReference importBinding nextImport resolvedImports ImportBinding compoundName importBinding importReference typeBinding findSingleTypeImport compoundName typeBinding isValidBinding problemReporter importProblem importReference typeBinding nextImport typeBinding PackageBinding problemReporter cannotImportPackage importReference nextImport typeBinding ReferenceBinding ReferenceBinding referenceBinding ReferenceBinding typeBinding importReference isTypeUseDeprecated referenceBinding problemReporter deprecatedType TypeBinding typeBinding importReference ReferenceBinding existingType typesBySimpleNames compoundName compoundName existingType existingType typeBinding nextImport topLevelTypes CharOperation topLevelTypes sourceName existingType sourceName problemReporter conflictingImport importReference nextImport problemReporter duplicateImport importReference nextImport resolvedImports ImportBinding compoundName typeBinding importReference typesBySimpleNames compoundName compoundName ReferenceBinding typeBinding resolvedImports resolvedImports resolvedImports resolvedImports ImportBinding resolvedImports resolvedSingeTypeImports HashtableOfObject ImportBinding onDemand resolvedSingeTypeImports compoundName compoundName
public void fault In Types fault In Imports for int i 0 length top Level Types length i length i top Level Types i fault In Types For Fields And Methods  faultInTypes faultInImports topLevelTypes topLevelTypes faultInTypesForFieldsAndMethods
private Binding find On Demand Import char compound Name record Qualified Reference compound Name Binding binding environment get Top Level Package compound Name 0 int i 1 int length compound Name length found Nothing Or Type if binding null Package Binding package Binding Package Binding binding while i length binding package Binding get Type Or Package compound Name i if binding null binding is Valid Binding binding null break found Nothing Or Type if binding instanceof Package Binding break found Nothing Or Type package Binding Package Binding binding return package Binding Reference Binding type if binding null if environment default Package null environment options compliance Level Class File Constants JDK1 4 return new Problem Reference Binding Char Operation subarray compound Name 0 i Not Found type find Type compound Name 0 environment default Package environment default Package if type null type is Valid Binding return new Problem Reference Binding Char Operation subarray compound Name 0 i Not Found i 1 reset to look for member types inside the default package type else type Reference Binding binding for i length i if type can Be Seen By f Package return new Problem Reference Binding Char Operation subarray compound Name 0 i type Not Visible does not look for inherited member types on purpose if type type get Member Type compound Name i null return new Problem Reference Binding Char Operation subarray compound Name 0 i 1 Not Found if type can Be Seen By f Package return new Problem Reference Binding compound Name type Not Visible return type  findOnDemandImport compoundName recordQualifiedReference compoundName getTopLevelPackage compoundName compoundName foundNothingOrType PackageBinding packageBinding PackageBinding packageBinding getTypeOrPackage compoundName isValidBinding foundNothingOrType PackageBinding foundNothingOrType packageBinding PackageBinding packageBinding ReferenceBinding defaultPackage complianceLevel ClassFileConstants JDK1_4 ProblemReferenceBinding CharOperation compoundName NotFound findType compoundName defaultPackage defaultPackage isValidBinding ProblemReferenceBinding CharOperation compoundName NotFound ReferenceBinding canBeSeenBy fPackage ProblemReferenceBinding CharOperation compoundName NotVisible getMemberType compoundName ProblemReferenceBinding CharOperation compoundName NotFound canBeSeenBy fPackage ProblemReferenceBinding compoundName NotVisible
private Binding find Single Type Import char compound Name if compound Name length 1 find Type records the reference the name cannot be a package if environment default Package null environment options compliance Level Class File Constants JDK1 4 return new Problem Reference Binding compound Name Not Found Reference Binding type Binding find Type compound Name 0 environment default Package f Package if type Binding null return new Problem Reference Binding compound Name Not Found return type Binding return find On Demand Import compound Name  findSingleTypeImport compoundName compoundName findType defaultPackage complianceLevel ClassFileConstants JDK1_4 ProblemReferenceBinding compoundName NotFound ReferenceBinding typeBinding findType compoundName defaultPackage fPackage typeBinding ProblemReferenceBinding compoundName NotFound typeBinding findOnDemandImport compoundName
Import Binding get Default Imports initialize the default imports if necessary share the default java lang import if environment default Imports null return environment default Imports Binding import Binding environment get Top Level Package JAVA if import Binding null import Binding Package Binding import Binding get Type Or Package JAVA LANG 1 abort if java lang cannot be found if import Binding null import Binding is Valid Binding problem Reporter is Class Path Correct JAVA LANG OBJECT reference Compilation Unit return environment default Imports new Import Binding new Import Binding JAVA LANG true import Binding null  ImportBinding getDefaultImports defaultImports defaultImports importBinding getTopLevelPackage importBinding importBinding PackageBinding importBinding getTypeOrPackage JAVA_LANG importBinding importBinding isValidBinding problemReporter isClassPathCorrect JAVA_LANG_OBJECT referenceCompilationUnit defaultImports ImportBinding ImportBinding JAVA_LANG importBinding
public Problem Reporter problem Reporter Problem Reporter problem Reporter reference Context problem Reporter problem Reporter reference Context reference Context return problem Reporter  ProblemReporter problemReporter ProblemReporter problemReporter referenceContext problemReporter problemReporter referenceContext referenceContext problemReporter
void record Qualified Reference char qualified Name if qualified References null return not recording dependencies int length qualified Name length if length 1 while qualified References contains qualified Name qualified References add qualified Name if length 2 record Simple Reference qualified Name 0 record Simple Reference qualified Name 1 return length record Simple Reference qualified Name length System arraycopy qualified Name 0 qualified Name new char length 0 length else if length 1 record Simple Reference qualified Name 0  recordQualifiedReference qualifiedName qualifiedReferences qualifiedName qualifiedReferences qualifiedName qualifiedReferences qualifiedName recordSimpleReference qualifiedName recordSimpleReference qualifiedName recordSimpleReference qualifiedName qualifiedName qualifiedName recordSimpleReference qualifiedName
void record Reference char qualified Enclosing Name char simple Name record Qualified Reference qualified Enclosing Name record Simple Reference simple Name  recordReference qualifiedEnclosingName simpleName recordQualifiedReference qualifiedEnclosingName recordSimpleReference simpleName
void record Simple Reference char simple Name if simple Name References null return not recording dependencies if simple Name References contains simple Name simple Name References add simple Name  recordSimpleReference simpleName simpleNameReferences simpleNameReferences simpleName simpleNameReferences simpleName
void record Type Reference Type Binding type if referenced Types null return not recording dependencies if type is Array Type type Array Binding type leaf Component Type if type is Base Type return if referenced Types contains Identical type return if Reference Binding type is Local Type return referenced Types add type  recordTypeReference TypeBinding referencedTypes isArrayType ArrayBinding leafComponentType isBaseType referencedTypes containsIdentical ReferenceBinding isLocalType referencedTypes
void record Type References Type Binding types if qualified References null return not recording dependencies if types null types length 0 return for int i 0 max types length i max i No need to record supertypes of method arguments thrown exceptions just the compound Name If a field method is retrieved from such a type then a separate call does the job Type Binding type types i if type is Array Type type Array Binding type leaf Component Type if type is Base Type Reference Binding actual Type Reference Binding type if actual Type is Local Type record Qualified Reference actual Type is Member Type Char Operation split On actual Type readable Name actual Type compound Name  recordTypeReferences TypeBinding qualifiedReferences compoundName TypeBinding isArrayType ArrayBinding leafComponentType isBaseType ReferenceBinding actualType ReferenceBinding actualType isLocalType recordQualifiedReference actualType isMemberType CharOperation splitOn actualType readableName actualType compoundName
Binding resolve Single Type Import Import Binding import Binding if import Binding resolved Import null import Binding resolved Import find Single Type Import import Binding compound Name if import Binding resolved Import is Valid Binding import Binding resolved Import instanceof Package Binding if this imports null Import Binding new Imports new Import Binding imports length 1 for int i 0 n 0 max this imports length i max i if this imports i import Binding new Imports n this imports i this imports new Imports return null return import Binding resolved Import  resolveSingleTypeImport ImportBinding importBinding importBinding resolvedImport importBinding resolvedImport findSingleTypeImport importBinding compoundName importBinding resolvedImport isValidBinding importBinding resolvedImport PackageBinding ImportBinding newImports ImportBinding importBinding newImports newImports importBinding resolvedImport
public void store Dependency Info add the type hierarchy of each referenced type cannot do early since the hierarchy may not be fully resolved for int i 0 i referenced Types size i grows as more types are added Reference Binding type Reference Binding referenced Types element At i if type is Local Type record Qualified Reference type is Member Type Char Operation split On type readable Name type compound Name Reference Binding enclosing type enclosing Type if enclosing null referenced Types contains Identical enclosing referenced Types add enclosing to record its supertypes Reference Binding superclass type superclass if superclass null referenced Types contains Identical superclass referenced Types add superclass to record its supertypes Reference Binding interfaces type super Interfaces if interfaces null interfaces length 0 for int j 0 length interfaces length j length j if referenced Types contains Identical interfaces j referenced Types add interfaces j to record its supertypes int size qualified References size char qualified Refs new char size for int i 0 i size i qualified Refs i qualified References element At i reference Context compilation Result qualified References qualified Refs size simple Name References size char simple Refs new char size for int i 0 i size i simple Refs i simple Name References element At i reference Context compilation Result simple Name References simple Refs  storeDependencyInfo referencedTypes ReferenceBinding ReferenceBinding referencedTypes elementAt isLocalType recordQualifiedReference isMemberType CharOperation splitOn readableName compoundName ReferenceBinding enclosingType referencedTypes containsIdentical referencedTypes ReferenceBinding referencedTypes containsIdentical referencedTypes ReferenceBinding superInterfaces referencedTypes containsIdentical referencedTypes qualifiedReferences qualifiedRefs qualifiedRefs qualifiedReferences elementAt referenceContext compilationResult qualifiedReferences qualifiedRefs simpleNameReferences simpleRefs simpleRefs simpleNameReferences elementAt referenceContext compilationResult simpleNameReferences simpleRefs
reference Context compilation Result simple Name References simple Refs public String to String return Compilation Unit Scope new String reference Context get File Name NON NLS 1  referenceContext compilationResult simpleNameReferences simpleRefs toString CompilationUnit referenceContext getFileName
return Compilation Unit Scope new String reference Context get File Name NON NLS 1 public void verify Methods Method Verifier verifier for int i 0 length top Level Types length i length i top Level Types i verify Methods verifier  CompilationUnit referenceContext getFileName verifyMethods MethodVerifier topLevelTypes topLevelTypes verifyMethods

public class Field Binding extends Variable Binding public Reference Binding declaring Class protected Field Binding for creating problem field  FieldBinding VariableBinding ReferenceBinding declaringClass FieldBinding
public Field Binding char name Type Binding type int modifiers Reference Binding declaring Class Constant constant this modifiers modifiers this type type this name name this declaring Class declaring Class this constant constant propagate the deprecated modifier if this declaring Class null if this declaring Class is Viewed As Deprecated is Deprecated this modifiers Acc Deprecated Implicitly  FieldBinding TypeBinding ReferenceBinding declaringClass declaringClass declaringClass declaringClass declaringClass isViewedAsDeprecated isDeprecated AccDeprecatedImplicitly
this modifiers Acc Deprecated Implicitly public Field Binding Field Declaration field Type Binding type int modifiers Reference Binding declaring Class this field name type modifiers declaring Class null field binding this record binding in declaration  AccDeprecatedImplicitly FieldBinding FieldDeclaration TypeBinding ReferenceBinding declaringClass declaringClass
special API used to change field declaring class for runtime visibility check public Field Binding Field Binding initial Field Binding Reference Binding declaring Class this modifiers initial Field Binding modifiers this type initial Field Binding type this name initial Field Binding name this declaring Class declaring Class this constant initial Field Binding constant this id initial Field Binding id  FieldBinding FieldBinding initialFieldBinding ReferenceBinding declaringClass initialFieldBinding initialFieldBinding initialFieldBinding declaringClass declaringClass initialFieldBinding initialFieldBinding
public final int binding Type return FIELD  bindingType
public final boolean can Be Seen By Type Binding receiver Type Invocation Site invocation Site Scope scope if is Public return true Source Type Binding invocation Type scope enclosing Source Type if invocation Type declaring Class invocation Type receiver Type return true if is Protected answer true if the invocation Type is the declaring Class or they are in the same package OR the invocation Type is a subclass of the declaring Class AND the receiver Type is the invocation Type or its subclass OR the method is a static method accessed directly through a type OR previous assertions are true for one of the enclosing type if invocation Type declaring Class return true if invocation Type f Package declaring Class f Package return true Reference Binding current Type invocation Type int depth 0 do if declaring Class is Superclass Of current Type if invocation Site is Super Access return true receiver Type can be an array binding in one case see if you can change it if receiver Type instanceof Array Binding return false if is Static if depth 0 invocation Site set Depth depth return true see 1FMEPDL return invocation Site is Type Access if current Type receiver Type current Type is Superclass Of Reference Binding receiver Type if depth 0 invocation Site set Depth depth return true depth current Type current Type enclosing Type while current Type null return false if is Private answer true if the receiver Type is the declaring Class AND the invocation Type and the declaring Class have a common enclosing Type if receiver Type declaring Class return false if invocation Type declaring Class Reference Binding outer Invocation Type invocation Type Reference Binding temp outer Invocation Type enclosing Type while temp null outer Invocation Type temp temp temp enclosing Type Reference Binding outer Declaring Class declaring Class temp outer Declaring Class enclosing Type while temp null outer Declaring Class temp temp temp enclosing Type if outer Invocation Type outer Declaring Class return false return true is Default if invocation Type f Package declaring Class f Package return false receiver Type can be an array binding in one case see if you can change it if receiver Type instanceof Array Binding return false Reference Binding current Type Reference Binding receiver Type Package Binding declaring Package declaring Class f Package do if declaring Class current Type return true if declaring Package current Type f Package return false while current Type current Type superclass null return false  canBeSeenBy TypeBinding receiverType InvocationSite invocationSite isPublic SourceTypeBinding invocationType enclosingSourceType invocationType declaringClass invocationType receiverType isProtected invocationType declaringClass invocationType declaringClass receiverType invocationType invocationType declaringClass invocationType fPackage declaringClass fPackage ReferenceBinding currentType invocationType declaringClass isSuperclassOf currentType invocationSite isSuperAccess receiverType receiverType ArrayBinding isStatic invocationSite setDepth invocationSite isTypeAccess currentType receiverType currentType isSuperclassOf ReferenceBinding receiverType invocationSite setDepth currentType currentType enclosingType currentType isPrivate receiverType declaringClass invocationType declaringClass enclosingType receiverType declaringClass invocationType declaringClass ReferenceBinding outerInvocationType invocationType ReferenceBinding outerInvocationType enclosingType outerInvocationType enclosingType ReferenceBinding outerDeclaringClass declaringClass outerDeclaringClass enclosingType outerDeclaringClass enclosingType outerInvocationType outerDeclaringClass isDefault invocationType fPackage declaringClass fPackage receiverType receiverType ArrayBinding ReferenceBinding currentType ReferenceBinding receiverType PackageBinding declaringPackage declaringClass fPackage declaringClass currentType declaringPackage currentType fPackage currentType currentType
return false public final int get Access Flags return modifiers Acc Just Flag  getAccessFlags AccJustFlag
public final boolean is Default return is Public is Protected is Private  isDefault isPublic isProtected isPrivate
public final boolean is Deprecated return modifiers Acc Deprecated 0  isDeprecated AccDeprecated
public final boolean is Private return modifiers Acc Private 0  isPrivate AccPrivate
public final boolean is Private Used return modifiers Acc Private Used 0  isPrivateUsed AccPrivateUsed
public final boolean is Protected return modifiers Acc Protected 0  isProtected AccProtected
public final boolean is Public return modifiers Acc Public 0  isPublic AccPublic
public final boolean is Static return modifiers Acc Static 0  isStatic AccStatic
public final boolean is Synthetic return modifiers Acc Synthetic 0  isSynthetic AccSynthetic
public final boolean is Transient return modifiers Acc Transient 0  isTransient AccTransient
public final boolean is Viewed As Deprecated return modifiers Acc Deprecated 0 modifiers Acc Deprecated Implicitly 0  isViewedAsDeprecated AccDeprecated AccDeprecatedImplicitly
public final boolean is Volatile return modifiers Acc Volatile 0  isVolatile AccVolatile

public Import Binding char compound Name boolean is On Demand Binding binding Import Reference reference this compound Name compound Name this on Demand is On Demand this resolved Import binding this reference reference  ImportBinding compoundName isOnDemand ImportReference compoundName compoundName onDemand isOnDemand resolvedImport
public final int binding Type return IMPORT  bindingType
public char readable Name if on Demand return Char Operation concat Char Operation concat With compound Name to Char Array NON NLS 1 else return Char Operation concat With compound Name  readableName onDemand CharOperation CharOperation concatWith compoundName toCharArray CharOperation concatWith compoundName
return Char Operation concat With compound Name public String to String return import new String readable Name NON NLS 1  CharOperation concatWith compoundName toString readableName

public boolean was Enclosing Instance Supplied public Inner Emulation Dependency Block Scope scope boolean was Enclosing Instance Supplied this scope scope this was Enclosing Instance Supplied was Enclosing Instance Supplied  wasEnclosingInstanceSupplied InnerEmulationDependency BlockScope wasEnclosingInstanceSupplied wasEnclosingInstanceSupplied wasEnclosingInstanceSupplied

public interface Invocation Site boolean is Super Access  InvocationSite isSuperAccess
public interface Invocation Site boolean is Super Access boolean is Type Access  InvocationSite isSuperAccess isTypeAccess
boolean is Super Access boolean is Type Access void set Depth int depth  isSuperAccess isTypeAccess setDepth
boolean is Type Access void set Depth int depth void set Field Index int depth  isTypeAccess setDepth setFieldIndex
but actual receiver type is pkg Type e g2 in presence of implicit access to enclosing type void set Actual Receiver Type Reference Binding receiver Type  setActualReceiverType ReferenceBinding receiverType
e g2 in presence of implicit access to enclosing type void set Actual Receiver Type Reference Binding receiver Type int source Start  setActualReceiverType ReferenceBinding receiverType sourceStart
void set Actual Receiver Type Reference Binding receiver Type int source Start int source End  setActualReceiverType ReferenceBinding receiverType sourceStart sourceEnd

public Local Type Binding Class Scope scope Source Type Binding enclosing Type Case Statement switch Case super new char Char Operation concat Local Type Prefix scope reference Context name scope enclosing Type if this source Name Type Declaration ANONYMOUS EMPTY NAME this tag Bits Anonymous Type Mask else this tag Bits Local Type Mask this switch Case switch Case  LocalTypeBinding ClassScope SourceTypeBinding enclosingType CaseStatement switchCase CharOperation LocalTypePrefix referenceContext enclosingType sourceName TypeDeclaration ANONYMOUS_EMPTY_NAME tagBits AnonymousTypeMask tagBits LocalTypeMask switchCase switchCase
public void add Inner Emulation Dependent Block Scope dependent Scope boolean was Enclosing Instance Supplied int index if dependents null index 0 dependents new Inner Emulation Dependency 1 else index dependents length for int i 0 i index i if dependents i scope dependent Scope return already stored System arraycopy dependents 0 dependents new Inner Emulation Dependency index 1 0 index dependents index new Inner Emulation Dependency dependent Scope was Enclosing Instance Supplied System out println Adding dependency new String scope enclosing Type readable Name new String this readable Name  addInnerEmulationDependent BlockScope dependentScope wasEnclosingInstanceSupplied InnerEmulationDependency dependentScope InnerEmulationDependency InnerEmulationDependency dependentScope wasEnclosingInstanceSupplied enclosingType readableName readableName
public char constant Pool Name java lang Object return constant Pool Name  constantPoolName constantPoolName
Array Binding create Array Type int dimension Count if local Array Bindings null local Array Bindings new Array Binding new Array Binding this dimension Count return local Array Bindings 0 find the cached array binding for this dimension Count if any int length local Array Bindings length for int i 0 i length i if local Array Bindings i dimensions dimension Count return local Array Bindings i no matching array System arraycopy local Array Bindings 0 local Array Bindings new Array Binding length 1 0 length return local Array Bindings length new Array Binding this dimension Count  ArrayBinding createArrayType dimensionCount localArrayBindings localArrayBindings ArrayBinding ArrayBinding dimensionCount localArrayBindings dimensionCount localArrayBindings localArrayBindings dimensionCount localArrayBindings localArrayBindings localArrayBindings ArrayBinding localArrayBindings ArrayBinding dimensionCount
public char readable Name if is Anonymous Type if super Interfaces No Super Interfaces return Util bind binding subclass new String superclass readable Name to Char Array NON NLS 2 NON NLS 3 NON NLS 1 else return Util bind binding implementation new String super Interfaces 0 readable Name to Char Array NON NLS 2 NON NLS 3 NON NLS 1 else if is Member Type return Char Operation concat enclosing Type readable Name source Name else return source Name  readableName isAnonymousType superInterfaces NoSuperInterfaces readableName toCharArray superInterfaces readableName toCharArray isMemberType CharOperation enclosingType readableName sourceName sourceName
public char short Readable Name if is Anonymous Type if super Interfaces No Super Interfaces return Util bind binding subclass new String superclass short Readable Name to Char Array NON NLS 2 NON NLS 3 NON NLS 1 else return Util bind binding implementation new String super Interfaces 0 short Readable Name to Char Array NON NLS 2 NON NLS 3 NON NLS 1 else if is Member Type return Char Operation concat enclosing Type short Readable Name source Name else return source Name  shortReadableName isAnonymousType superInterfaces NoSuperInterfaces shortReadableName toCharArray superInterfaces shortReadableName toCharArray isMemberType CharOperation enclosingType shortReadableName sourceName sourceName
Record that the type is a local member type public void set As Member Type tag Bits Member Type Mask  setAsMemberType tagBits MemberTypeMask
public void set Constant Pool Name char computed Constant Pool Name java lang Object this constant Pool Name computed Constant Pool Name  setConstantPoolName computedConstantPoolName constantPoolName computedConstantPoolName
public char source Name if is Anonymous Type return readable Name if super Interfaces No Super Interfaces return Util bind binding subclass new String superclass source Name to Char Array NON NLS 2 NON NLS 3 NON NLS 1 else return Util bind binding implementation new String super Interfaces 0 source Name to Char Array NON NLS 2 NON NLS 3 NON NLS 1 else return source Name  sourceName isAnonymousType readableName superInterfaces NoSuperInterfaces sourceName toCharArray superInterfaces sourceName toCharArray sourceName
public String to String if is Anonymous Type return Anonymous type super to String NON NLS 1 if is Member Type return Local member type new String source Name super to String NON NLS 2 NON NLS 1 return Local type new String source Name super to String NON NLS 2 NON NLS 1  toString isAnonymousType toString isMemberType sourceName toString sourceName toString
public void update Inner Emulation Dependents if dependents null for int i 0 i dependents length i Inner Emulation Dependency dependency dependents i System out println Updating new String this readable Name new String dependency scope enclosing Type readable Name dependency scope propagate Inner Emulation this dependency was Enclosing Instance Supplied  updateInnerEmulationDependents InnerEmulationDependency readableName enclosingType readableName propagateInnerEmulation wasEnclosingInstanceSupplied

for synthetic local variables public Local Variable Binding char name Type Binding type int modifiers boolean is Argument this name name this type type this modifiers modifiers this is Argument is Argument if is Argument this constant Constant NotA Constant  LocalVariableBinding TypeBinding isArgument isArgument isArgument isArgument NotAConstant
regular local variable or argument public Local Variable Binding Local Declaration declaration Type Binding type int modifiers boolean is Argument this declaration name type modifiers is Argument this declaration declaration  LocalVariableBinding LocalDeclaration TypeBinding isArgument isArgument
Answer the receiver s binding type from Binding BindingID public final int binding Type return LOCAL  bindingType
Answer whether the variable binding is a secret variable added for code gen purposes public boolean is Secret return declaration null is Argument  isSecret isArgument
public void record Initialization EndPC int pc if initializationP Cs initialization Count 1 1 1 1 initializationP Cs initialization Count 1 1 1 pc  recordInitializationEndPC initializationPCs initializationCount initializationPCs initializationCount
public void record Initialization StartPC int pc if initializationP Cs null return optimize cases where reopening a contiguous interval if initialization Count 0 initializationP Cs initialization Count 1 1 1 pc initializationP Cs initialization Count 1 1 1 1 reuse previous interval its range will be augmented else int index initialization Count 1 if index initializationP Cs length System arraycopy initializationP Cs 0 initializationP Cs new int initialization Count 2 0 index initializationP Cs index pc initializationP Cs index 1 1 initialization Count  recordInitializationStartPC initializationPCs initializationCount initializationPCs initializationCount initializationPCs initializationCount initializationCount initializationPCs initializationPCs initializationPCs initializationCount initializationPCs initializationPCs initializationCount
public String to String String s super to String switch use Flag case USED s pos String value Of resolved Position NON NLS 2 NON NLS 1 break case UNUSED s pos unused NON NLS 1 break case FAKE USED s pos fake used NON NLS 1 break s id String value Of id NON NLS 2 NON NLS 1 if initialization Count 0 s pc NON NLS 1 for int i 0 i initialization Count i if i 0 s NON NLS 1 s String value Of initializationP Cs i 1 initializationP Cs i 1 1 1 String value Of initializationP Cs i 1 1 NON NLS 2 NON NLS 1 s NON NLS 1 return s  toString toString useFlag valueOf resolvedPosition FAKE_USED fake_used valueOf initializationCount initializationCount valueOf initializationPCs initializationPCs valueOf initializationPCs

public Lookup Environment I Type Requestor type Requestor Compiler Options options Problem Reporter problem Reporter I Name Environment name Environment this type Requestor type Requestor this options options this problem Reporter problem Reporter this default Package new Package Binding this assume the default package always exists this default Imports null this name Environment name Environment this known Packages new Hashtable Of Package this unique Array Bindings new Array Binding 5 this unique Array Bindings 0 new Array Binding 50 start off the most common 1 dimension array 50  LookupEnvironment ITypeRequestor typeRequestor CompilerOptions ProblemReporter problemReporter INameEnvironment nameEnvironment typeRequestor typeRequestor problemReporter problemReporter defaultPackage PackageBinding defaultImports nameEnvironment nameEnvironment knownPackages HashtableOfPackage uniqueArrayBindings ArrayBinding uniqueArrayBindings ArrayBinding
public Reference Binding ask For Type char compound Name Name Environment Answer answer name Environment find Type compound Name if answer null return null if answer is Binary Type the type was found as a class file type Requestor accept answer get Binary Type compute Package From compound Name else if answer is Compilation Unit the type was found as a java file try to build it then search the cache type Requestor accept answer get Compilation Unit else if answer is Source Type the type was found as a source model type Requestor accept answer get Source Types compute Package From compound Name return get Cached Type compound Name  ReferenceBinding askForType compoundName NameEnvironmentAnswer nameEnvironment findType compoundName isBinaryType typeRequestor getBinaryType computePackageFrom compoundName isCompilationUnit typeRequestor getCompilationUnit isSourceType typeRequestor getSourceTypes computePackageFrom compoundName getCachedType compoundName
Reference Binding ask For Type Package Binding package Binding char name if package Binding null if default Package null return null package Binding default Package Name Environment Answer answer name Environment find Type name package Binding compound Name if answer null return null if answer is Binary Type the type was found as a class file type Requestor accept answer get Binary Type package Binding else if answer is Compilation Unit the type was found as a java file try to build it then search the cache type Requestor accept answer get Compilation Unit else if answer is Source Type the type was found as a source model type Requestor accept answer get Source Types package Binding return package Binding get Type0 name  ReferenceBinding askForType PackageBinding packageBinding packageBinding defaultPackage packageBinding defaultPackage NameEnvironmentAnswer nameEnvironment findType packageBinding compoundName isBinaryType typeRequestor getBinaryType packageBinding isCompilationUnit typeRequestor getCompilationUnit isSourceType typeRequestor getSourceTypes packageBinding packageBinding getType0
public void build Type Bindings Compilation Unit Declaration unit Compilation Unit Scope scope new Compilation Unit Scope unit this scope build Type Bindings int units Length units length if last Unit Index units Length System arraycopy units 0 units new Compilation Unit Declaration 2 units Length 0 units Length units last Unit Index unit  buildTypeBindings CompilationUnitDeclaration CompilationUnitScope CompilationUnitScope buildTypeBindings unitsLength lastUnitIndex unitsLength CompilationUnitDeclaration unitsLength unitsLength lastUnitIndex
public Binary Type Binding cache Binary Type I Binary Type binary Type return cache Binary Type binary Type true  BinaryTypeBinding cacheBinaryType IBinaryType binaryType cacheBinaryType binaryType
public Binary Type Binding cache Binary Type I Binary Type binary Type boolean need Fields And Methods char compound Name Char Operation split On binary Type get Name Reference Binding existing Type get Cached Type compound Name if existing Type null existing Type instanceof Unresolved Reference Binding only add the binary type if its not already in the cache return create Binary Type From binary Type compute Package From compound Name need Fields And Methods return null the type already exists can be retrieved from the cache  BinaryTypeBinding cacheBinaryType IBinaryType binaryType needFieldsAndMethods compoundName CharOperation splitOn binaryType getName ReferenceBinding existingType getCachedType compoundName existingType existingType UnresolvedReferenceBinding createBinaryTypeFrom binaryType computePackageFrom compoundName needFieldsAndMethods
public void complete Type Bindings step Completed BUILD TYPE HIERARCHY for int i this last Completed Unit Index 1 i this last Unit Index i this unit Being Completed this units i scope check And Set Imports step Completed CHECK AND SET IMPORTS for int i this last Completed Unit Index 1 i this last Unit Index i this unit Being Completed this units i scope connect Type Hierarchy step Completed CONNECT TYPE HIERARCHY for int i this last Completed Unit Index 1 i this last Unit Index i this unit Being Completed this units i scope build Fields And Methods this units i null release unnecessary reference to the parsed unit step Completed BUILD FIELDS AND METHODS this last Completed Unit Index this last Unit Index this unit Being Completed null  completeTypeBindings stepCompleted BUILD_TYPE_HIERARCHY lastCompletedUnitIndex lastUnitIndex unitBeingCompleted checkAndSetImports stepCompleted CHECK_AND_SET_IMPORTS lastCompletedUnitIndex lastUnitIndex unitBeingCompleted connectTypeHierarchy stepCompleted CONNECT_TYPE_HIERARCHY lastCompletedUnitIndex lastUnitIndex unitBeingCompleted buildFieldsAndMethods stepCompleted BUILD_FIELDS_AND_METHODS lastCompletedUnitIndex lastUnitIndex unitBeingCompleted
public void complete Type Bindings Compilation Unit Declaration parsed Unit if step Completed BUILD FIELDS AND METHODS This can only happen because the original set of units are completely built and are now being processed so we want to treat all the additional units as a group until they too are completely processed complete Type Bindings else if parsed Unit scope null return parsing errors were too severe if step Completed CHECK AND SET IMPORTS this unit Being Completed parsed Unit scope check And Set Imports if step Completed CONNECT TYPE HIERARCHY this unit Being Completed parsed Unit scope connect Type Hierarchy this unit Being Completed null  completeTypeBindings CompilationUnitDeclaration parsedUnit stepCompleted BUILD_FIELDS_AND_METHODS completeTypeBindings parsedUnit stepCompleted CHECK_AND_SET_IMPORTS unitBeingCompleted parsedUnit checkAndSetImports stepCompleted CONNECT_TYPE_HIERARCHY unitBeingCompleted parsedUnit connectTypeHierarchy unitBeingCompleted
public void complete Type Bindings Compilation Unit Declaration parsed Unit boolean build Fields And Methods if parsed Unit scope null return parsing errors were too severe this unit Being Completed parsed Unit scope check And Set Imports parsed Unit scope connect Type Hierarchy if build Fields And Methods parsed Unit scope build Fields And Methods this unit Being Completed null  completeTypeBindings CompilationUnitDeclaration parsedUnit buildFieldsAndMethods parsedUnit unitBeingCompleted parsedUnit checkAndSetImports parsedUnit connectTypeHierarchy buildFieldsAndMethods parsedUnit buildFieldsAndMethods unitBeingCompleted
private Package Binding compute Package From char constant Pool Name if constant Pool Name length 1 return default Package Package Binding package Binding get Package0 constant Pool Name 0 if package Binding null package Binding The Not Found Package package Binding new Package Binding constant Pool Name 0 this known Packages put constant Pool Name 0 package Binding for int i 1 length constant Pool Name length 1 i length i Package Binding parent package Binding if package Binding parent get Package0 constant Pool Name i null package Binding The Not Found Package package Binding new Package Binding Char Operation subarray constant Pool Name 0 i 1 parent this parent add Package package Binding return package Binding  PackageBinding computePackageFrom constantPoolName constantPoolName defaultPackage PackageBinding packageBinding getPackage0 constantPoolName packageBinding packageBinding TheNotFoundPackage packageBinding PackageBinding constantPoolName knownPackages constantPoolName packageBinding constantPoolName PackageBinding packageBinding packageBinding getPackage0 constantPoolName packageBinding TheNotFoundPackage packageBinding PackageBinding CharOperation constantPoolName addPackage packageBinding packageBinding
Array Binding create Array Type Type Binding type int dimension Count if type instanceof Local Type Binding cache local type arrays with the local type itself return Local Type Binding type create Array Type dimension Count find the array binding cache for this dimension int dim Index dimension Count 1 int length unique Array Bindings length Array Binding array Bindings if dim Index length if array Bindings unique Array Bindings dim Index null unique Array Bindings dim Index array Bindings new Array Binding 10 else System arraycopy unique Array Bindings 0 unique Array Bindings new Array Binding dimension Count 0 length unique Array Bindings dim Index array Bindings new Array Binding 10 find the cached array binding for this leaf component type if any int index 1 length array Bindings length while index length Array Binding current Binding array Bindings index if current Binding null no matching array but space left return array Bindings index new Array Binding type dimension Count if current Binding leaf Component Type type return current Binding no matching array no space left System arraycopy array Bindings 0 array Bindings new Array Binding length 2 0 length unique Array Bindings dim Index array Bindings return array Bindings length new Array Binding type dimension Count  ArrayBinding createArrayType TypeBinding dimensionCount LocalTypeBinding LocalTypeBinding createArrayType dimensionCount dimIndex dimensionCount uniqueArrayBindings ArrayBinding arrayBindings dimIndex arrayBindings uniqueArrayBindings dimIndex uniqueArrayBindings dimIndex arrayBindings ArrayBinding uniqueArrayBindings uniqueArrayBindings ArrayBinding dimensionCount uniqueArrayBindings dimIndex arrayBindings ArrayBinding arrayBindings ArrayBinding currentBinding arrayBindings currentBinding arrayBindings ArrayBinding dimensionCount currentBinding leafComponentType currentBinding arrayBindings arrayBindings ArrayBinding uniqueArrayBindings dimIndex arrayBindings arrayBindings ArrayBinding dimensionCount
return array Bindings length new Array Binding type dimension Count public Binary Type Binding create Binary Type From I Binary Type binary Type Package Binding package Binding return create Binary Type From binary Type package Binding true  arrayBindings ArrayBinding dimensionCount BinaryTypeBinding createBinaryTypeFrom IBinaryType binaryType PackageBinding packageBinding createBinaryTypeFrom binaryType packageBinding
public Binary Type Binding create Binary Type From I Binary Type binary Type Package Binding package Binding boolean need Fields And Methods Binary Type Binding binary Binding new Binary Type Binding package Binding binary Type this resolve any array bindings which reference the unresolved Type Reference Binding cached Type package Binding get Type0 binary Binding compound Name binary Binding compound Name length 1 if cached Type null if cached Type is Binary Binding sanity check before the cast at this point the cache should ONLY contain unresolved types return Binary Type Binding cached Type Unresolved Reference Binding unresolved Type Unresolved Reference Binding cached Type unresolved Type resolved Type binary Binding update Array Cache unresolved Type binary Binding package Binding add Type binary Binding binary Binding cache Parts From binary Type need Fields And Methods return binary Binding  BinaryTypeBinding createBinaryTypeFrom IBinaryType binaryType PackageBinding packageBinding needFieldsAndMethods BinaryTypeBinding binaryBinding BinaryTypeBinding packageBinding binaryType unresolvedType ReferenceBinding cachedType packageBinding getType0 binaryBinding compoundName binaryBinding compoundName cachedType cachedType isBinaryBinding BinaryTypeBinding cachedType UnresolvedReferenceBinding unresolvedType UnresolvedReferenceBinding cachedType unresolvedType resolvedType binaryBinding updateArrayCache unresolvedType binaryBinding packageBinding addType binaryBinding binaryBinding cachePartsFrom binaryType needFieldsAndMethods binaryBinding
Package Binding create Package char compound Name Package Binding package Binding get Package0 compound Name 0 if package Binding null package Binding The Not Found Package package Binding new Package Binding compound Name 0 this known Packages put compound Name 0 package Binding for int i 1 length compound Name length i length i check to see if it collides with a known type this case can only happen if the package does not exist as a directory in the file system otherwise when the source type was defined the correct error would have been reported unless its an unresolved type which is referenced from an inconsistent class file Reference Binding type package Binding get Type0 compound Name i if type null type The Not Found Type type instanceof Unresolved Reference Binding return null Package Binding parent package Binding if package Binding parent get Package0 compound Name i null package Binding The Not Found Package if the package is unknown check to see if a type exists which would collide with the new package catches the case of a package statement of package java lang Object since the package can be added after a set of source files have already been compiled we need whenever a package statement is encountered if name Environment find Type compound Name i parent compound Name null return null package Binding new Package Binding Char Operation subarray compound Name 0 i 1 parent this parent add Package package Binding return package Binding  PackageBinding createPackage compoundName PackageBinding packageBinding getPackage0 compoundName packageBinding packageBinding TheNotFoundPackage packageBinding PackageBinding compoundName knownPackages compoundName packageBinding compoundName ReferenceBinding packageBinding getType0 compoundName TheNotFoundType UnresolvedReferenceBinding PackageBinding packageBinding packageBinding getPackage0 compoundName packageBinding TheNotFoundPackage nameEnvironment findType compoundName compoundName packageBinding PackageBinding CharOperation compoundName addPackage packageBinding packageBinding
public Reference Binding get Cached Type char compound Name if compound Name length 1 if default Package null return null return default Package get Type0 compound Name 0 Package Binding package Binding get Package0 compound Name 0 if package Binding null package Binding The Not Found Package return null for int i 1 package Length compound Name length 1 i package Length i if package Binding package Binding get Package0 compound Name i null package Binding The Not Found Package return null return package Binding get Type0 compound Name compound Name length 1  ReferenceBinding getCachedType compoundName compoundName defaultPackage defaultPackage getType0 compoundName PackageBinding packageBinding getPackage0 compoundName packageBinding packageBinding TheNotFoundPackage packageLength compoundName packageLength packageBinding packageBinding getPackage0 compoundName packageBinding TheNotFoundPackage packageBinding getType0 compoundName compoundName
Package Binding get Package0 char name return known Packages get name  PackageBinding getPackage0 knownPackages
Package Binding get Top Level Package char name Package Binding package Binding get Package0 name if package Binding null if package Binding The Not Found Package return null return package Binding if name Environment is Package null name known Packages put name package Binding new Package Binding name this return package Binding known Packages put name The Not Found Package saves asking the oracle next time return null  PackageBinding getTopLevelPackage PackageBinding packageBinding getPackage0 packageBinding packageBinding TheNotFoundPackage packageBinding nameEnvironment isPackage knownPackages packageBinding PackageBinding packageBinding knownPackages TheNotFoundPackage
public Reference Binding get Type char compound Name Reference Binding reference Binding if compound Name length 1 if default Package null return null if reference Binding default Package get Type0 compound Name 0 null Package Binding package Binding get Package0 compound Name 0 if package Binding null package Binding The Not Found Package return null collides with a known package should not call this method in such a case reference Binding ask For Type default Package compound Name 0 else Package Binding package Binding get Package0 compound Name 0 if package Binding The Not Found Package return null if package Binding null for int i 1 package Length compound Name length 1 i package Length i if package Binding package Binding get Package0 compound Name i null break if package Binding The Not Found Package return null if package Binding null reference Binding ask For Type compound Name else if reference Binding package Binding get Type0 compound Name compound Name length 1 null reference Binding ask For Type package Binding compound Name compound Name length 1 if reference Binding null reference Binding The Not Found Type return null if reference Binding instanceof Unresolved Reference Binding reference Binding Unresolved Reference Binding reference Binding resolve this compound Name refers to a nested type incorrectly for example package1 A B if reference Binding is Nested Type return new Problem Reference Binding compound Name Internal Name Provided return reference Binding  ReferenceBinding getType compoundName ReferenceBinding referenceBinding compoundName defaultPackage referenceBinding defaultPackage getType0 compoundName PackageBinding packageBinding getPackage0 compoundName packageBinding packageBinding TheNotFoundPackage referenceBinding askForType defaultPackage compoundName PackageBinding packageBinding getPackage0 compoundName packageBinding TheNotFoundPackage packageBinding packageLength compoundName packageLength packageBinding packageBinding getPackage0 compoundName packageBinding TheNotFoundPackage packageBinding referenceBinding askForType compoundName referenceBinding packageBinding getType0 compoundName compoundName referenceBinding askForType packageBinding compoundName compoundName referenceBinding referenceBinding TheNotFoundType referenceBinding UnresolvedReferenceBinding referenceBinding UnresolvedReferenceBinding referenceBinding compoundName referenceBinding isNestedType ProblemReferenceBinding compoundName InternalNameProvided referenceBinding
Reference Binding get Type From Constant Pool Name char signature int start int end if end 1 end signature length char compound Name Char Operation split On signature start end Reference Binding binding get Cached Type compound Name if binding null Package Binding package Binding compute Package From compound Name binding new Unresolved Reference Binding compound Name package Binding package Binding add Type binding else if binding The Not Found Type problem Reporter is Class Path Correct compound Name null return null will not get here since the above error aborts the compilation return binding  ReferenceBinding getTypeFromConstantPoolName compoundName CharOperation splitOn ReferenceBinding getCachedType compoundName PackageBinding packageBinding computePackageFrom compoundName UnresolvedReferenceBinding compoundName packageBinding packageBinding addType TheNotFoundType problemReporter isClassPathCorrect compoundName
Type Binding get Type From Signature char signature int start int end int dimension 0 while signature start start dimension if end 1 end signature length 1 Just switch on signature start the L case is the else Type Binding binding null if start end switch signature start case I binding Int Binding break case Z binding Boolean Binding break case V binding Void Binding break case C binding Char Binding break case D binding Double Binding break case B binding Byte Binding break case F binding Float Binding break case J binding Long Binding break case S binding Short Binding break default throw new Error Util bind error undefined Base Type String value Of signature start NON NLS 1 else binding get Type From Constant Pool Name signature start 1 end if dimension 0 return binding return create Array Type binding dimension  TypeBinding getTypeFromSignature TypeBinding IntBinding BooleanBinding VoidBinding CharBinding DoubleBinding ByteBinding FloatBinding LongBinding ShortBinding undefinedBaseType valueOf getTypeFromConstantPoolName createArrayType
boolean is Package char compound Name char name if compound Name null compound Name length 0 return name Environment is Package null name return name Environment is Package compound Name name  isPackage compoundName compoundName compoundName nameEnvironment isPackage nameEnvironment isPackage compoundName
public Method Verifier method Verifier if verifier null verifier new Method Verifier this return verifier  MethodVerifier methodVerifier MethodVerifier
public void reset this default Package new Package Binding this assume the default package always exists this default Imports null this known Packages new Hashtable Of Package this verifier null for int i this unique Array Bindings length i 0 this unique Array Bindings i null this unique Array Bindings 0 new Array Binding 50 start off the most common 1 dimension array 50 for int i this units length i 0 this units i null this last Unit Index 1 this last Completed Unit Index 1 this unit Being Completed null in case Abort Exception occurred name environment has a longer life cycle and must be reset in the code which created it  defaultPackage PackageBinding defaultImports knownPackages HashtableOfPackage uniqueArrayBindings uniqueArrayBindings uniqueArrayBindings ArrayBinding lastUnitIndex lastCompletedUnitIndex unitBeingCompleted AbortException
void update Array Cache Unresolved Reference Binding unresolved Type Reference Binding resolved Type next Dimension for int i 0 length unique Array Bindings length i length i Array Binding array Bindings unique Array Bindings i if array Bindings null for int j 0 max array Bindings length j max j Array Binding current Binding array Bindings j if current Binding null continue next Dimension if current Binding leaf Component Type unresolved Type current Binding leaf Component Type resolved Type continue next Dimension  updateArrayCache UnresolvedReferenceBinding unresolvedType ReferenceBinding resolvedType nextDimension uniqueArrayBindings ArrayBinding arrayBindings uniqueArrayBindings arrayBindings arrayBindings ArrayBinding currentBinding arrayBindings currentBinding nextDimension currentBinding leafComponentType unresolvedType currentBinding leafComponentType resolvedType nextDimension

public final class Member Type Binding extends Nested Type Binding public Member Type Binding char compound Name Class Scope scope Source Type Binding enclosing Type super compound Name scope enclosing Type this tag Bits Member Type Mask  MemberTypeBinding NestedTypeBinding MemberTypeBinding compoundName ClassScope SourceTypeBinding enclosingType compoundName enclosingType tagBits MemberTypeMask
void check Synthetic Args And Fields if this is Static return if this is Interface return this add Synthetic Argument And Field this enclosing Type  checkSyntheticArgsAndFields isStatic isInterface addSyntheticArgumentAndField enclosingType
public char constant Pool Name java lang Object if constant Pool Name null return constant Pool Name return constant Pool Name Char Operation concat enclosing Type constant Pool Name source Name  constantPoolName constantPoolName constantPoolName constantPoolName CharOperation enclosingType constantPoolName sourceName
return constant Pool Name Char Operation concat enclosing Type constant Pool Name source Name public String to String return Member type new String source Name super to String NON NLS 2 NON NLS 1  constantPoolName CharOperation enclosingType constantPoolName sourceName toString sourceName toString

char signature protected Method Binding for creating problem or synthetic method  MethodBinding
public Method Binding int modifiers char selector Type Binding return Type Type Binding args Reference Binding exceptions Reference Binding declaring Class this modifiers modifiers this selector selector this return Type return Type this parameters args null args length 0 No Parameters args this thrown Exceptions exceptions null exceptions length 0 No Exceptions exceptions this declaring Class declaring Class propagate the strictfp deprecated modifiers if this declaring Class null if this declaring Class is Strictfp if is Native is Abstract this modifiers Acc Strictfp if this declaring Class is Viewed As Deprecated is Deprecated this modifiers Acc Deprecated Implicitly  MethodBinding TypeBinding returnType TypeBinding ReferenceBinding ReferenceBinding declaringClass returnType returnType NoParameters thrownExceptions NoExceptions declaringClass declaringClass declaringClass declaringClass isStrictfp isNative isAbstract AccStrictfp declaringClass isViewedAsDeprecated isDeprecated AccDeprecatedImplicitly
public Method Binding int modifiers Type Binding args Reference Binding exceptions Reference Binding declaring Class this modifiers Constructor Declaration Constant Pool Name Void Binding args exceptions declaring Class  MethodBinding TypeBinding ReferenceBinding ReferenceBinding declaringClass ConstructorDeclaration ConstantPoolName VoidBinding declaringClass
special API used to change method declaring class for runtime visibility check public Method Binding Method Binding initial Method Binding Reference Binding declaring Class this modifiers initial Method Binding modifiers this selector initial Method Binding selector this return Type initial Method Binding return Type this parameters initial Method Binding parameters this thrown Exceptions initial Method Binding thrown Exceptions this declaring Class declaring Class  MethodBinding MethodBinding initialMethodBinding ReferenceBinding declaringClass initialMethodBinding initialMethodBinding returnType initialMethodBinding returnType initialMethodBinding thrownExceptions initialMethodBinding thrownExceptions declaringClass declaringClass
public final boolean are Parameters Equal Method Binding method Type Binding args method parameters if parameters args return true int length parameters length if length args length return false for int i 0 i length i if parameters i args i return false return true  areParametersEqual MethodBinding TypeBinding
public final int binding Type return METHOD  bindingType
public final boolean can Be Seen By Invocation Site invocation Site Scope scope if is Public return true Source Type Binding invocation Type scope enclosing Source Type if invocation Type declaring Class return true if is Protected answer true if the receiver is in the same package as the invocation Type if invocation Type f Package declaring Class f Package return true return invocation Site is Super Access if is Private answer true if the invocation Type and the declaring Class have a common enclosing Type already know they are not the identical type Reference Binding outer Invocation Type invocation Type Reference Binding temp outer Invocation Type enclosing Type while temp null outer Invocation Type temp temp temp enclosing Type Reference Binding outer Declaring Class declaring Class temp outer Declaring Class enclosing Type while temp null outer Declaring Class temp temp temp enclosing Type return outer Invocation Type outer Declaring Class is Default return invocation Type f Package declaring Class f Package  canBeSeenBy InvocationSite invocationSite isPublic SourceTypeBinding invocationType enclosingSourceType invocationType declaringClass isProtected invocationType invocationType fPackage declaringClass fPackage invocationSite isSuperAccess isPrivate invocationType declaringClass enclosingType ReferenceBinding outerInvocationType invocationType ReferenceBinding outerInvocationType enclosingType outerInvocationType enclosingType ReferenceBinding outerDeclaringClass declaringClass outerDeclaringClass enclosingType outerDeclaringClass enclosingType outerInvocationType outerDeclaringClass isDefault invocationType fPackage declaringClass fPackage
public final boolean can Be Seen By Type Binding receiver Type Invocation Site invocation Site Scope scope if is Public return true Source Type Binding invocation Type scope enclosing Source Type if invocation Type declaring Class invocation Type receiver Type return true if is Protected answer true if the invocation Type is the declaring Class or they are in the same package OR the invocation Type is a subclass of the declaring Class AND the receiver Type is the invocation Type or its subclass OR the method is a static method accessed directly through a type OR previous assertions are true for one of the enclosing type if invocation Type declaring Class return true if invocation Type f Package declaring Class f Package return true Reference Binding current Type invocation Type int depth 0 do if declaring Class is Superclass Of current Type if invocation Site is Super Access return true receiver Type can be an array binding in one case see if you can change it if receiver Type instanceof Array Binding return false if is Static if depth 0 invocation Site set Depth depth return true see 1FMEPDL return invocation Site is Type Access if current Type receiver Type current Type is Superclass Of Reference Binding receiver Type if depth 0 invocation Site set Depth depth return true depth current Type current Type enclosing Type while current Type null return false if is Private answer true if the receiver Type is the declaring Class AND the invocation Type and the declaring Class have a common enclosing Type if receiver Type declaring Class return false if invocation Type declaring Class Reference Binding outer Invocation Type invocation Type Reference Binding temp outer Invocation Type enclosing Type while temp null outer Invocation Type temp temp temp enclosing Type Reference Binding outer Declaring Class declaring Class temp outer Declaring Class enclosing Type while temp null outer Declaring Class temp temp temp enclosing Type if outer Invocation Type outer Declaring Class return false return true is Default if invocation Type f Package declaring Class f Package return false receiver Type can be an array binding in one case see if you can change it if receiver Type instanceof Array Binding return false Reference Binding type Reference Binding receiver Type Package Binding declaring Package declaring Class f Package do if declaring Class type return true if declaring Package type f Package return false while type type superclass null return false  canBeSeenBy TypeBinding receiverType InvocationSite invocationSite isPublic SourceTypeBinding invocationType enclosingSourceType invocationType declaringClass invocationType receiverType isProtected invocationType declaringClass invocationType declaringClass receiverType invocationType invocationType declaringClass invocationType fPackage declaringClass fPackage ReferenceBinding currentType invocationType declaringClass isSuperclassOf currentType invocationSite isSuperAccess receiverType receiverType ArrayBinding isStatic invocationSite setDepth invocationSite isTypeAccess currentType receiverType currentType isSuperclassOf ReferenceBinding receiverType invocationSite setDepth currentType currentType enclosingType currentType isPrivate receiverType declaringClass invocationType declaringClass enclosingType receiverType declaringClass invocationType declaringClass ReferenceBinding outerInvocationType invocationType ReferenceBinding outerInvocationType enclosingType outerInvocationType enclosingType ReferenceBinding outerDeclaringClass declaringClass outerDeclaringClass enclosingType outerDeclaringClass enclosingType outerInvocationType outerDeclaringClass isDefault invocationType fPackage declaringClass fPackage receiverType receiverType ArrayBinding ReferenceBinding ReferenceBinding receiverType PackageBinding declaringPackage declaringClass fPackage declaringClass declaringPackage fPackage
may not be a reference binding see subtypes public Type Binding constant Pool Declaring Class return this declaring Class  TypeBinding constantPoolDeclaringClass declaringClass
or the source name of the method public final char constant Pool Name return selector  constantPoolName
return selector public final int get Access Flags return modifiers Acc Just Flag  getAccessFlags AccJustFlag
Answer true if the receiver is an abstract method public final boolean is Abstract return modifiers Acc Abstract 0  isAbstract AccAbstract
Answer true if the receiver is a bridge method public final boolean is Bridge return modifiers Acc Bridge 0  isBridge AccBridge
Answer true if the receiver is a constructor public final boolean is Constructor return selector Constructor Declaration Constant Pool Name  isConstructor ConstructorDeclaration ConstantPoolName
return selector Constructor Declaration Constant Pool Name protected boolean is Constructor Related return is Constructor  ConstructorDeclaration ConstantPoolName isConstructorRelated isConstructor
Answer true if the receiver has default visibility public final boolean is Default return is Public is Protected is Private  isDefault isPublic isProtected isPrivate
Answer true if the receiver is a system generated default abstract method public final boolean is Default Abstract return modifiers Acc Default Abstract 0  isDefaultAbstract AccDefaultAbstract
Answer true if the receiver is a deprecated method public final boolean is Deprecated return modifiers Acc Deprecated 0  isDeprecated AccDeprecated
Answer true if the receiver is final and cannot be overridden public final boolean is Final return modifiers Acc Final 0  isFinal AccFinal
Only set for source methods public final boolean is Implementing return modifiers Acc Implementing 0  isImplementing AccImplementing
Answer true if the receiver is a native method public final boolean is Native return modifiers Acc Native 0  isNative AccNative
Only set for source methods public final boolean is Overriding return modifiers Acc Overriding 0  isOverriding AccOverriding
public final boolean is Main if this selector length 4 Char Operation equals this selector MAIN this modifiers Acc Public Acc Static 0 Void Binding this return Type this parameters length 1 Type Binding param Type this parameters 0 if param Type dimensions 1 param Type leaf Component Type id Type Ids T JavaLangString return true return false  isMain CharOperation AccPublic AccStatic VoidBinding returnType TypeBinding paramType paramType paramType leafComponentType TypeIds T_JavaLangString
Answer true if the receiver has private visibility public final boolean is Private return modifiers Acc Private 0  isPrivate AccPrivate
Answer true if the receiver has private visibility and is used locally public final boolean is Private Used return modifiers Acc Private Used 0  isPrivateUsed AccPrivateUsed
Answer true if the receiver has protected visibility public final boolean is Protected return modifiers Acc Protected 0  isProtected AccProtected
Answer true if the receiver has public visibility public final boolean is Public return modifiers Acc Public 0  isPublic AccPublic
during private access emulation public final boolean is Required To Clear Private Modifier return modifiers Acc Clear Private Modifier 0  isRequiredToClearPrivateModifier AccClearPrivateModifier
Answer true if the receiver is a static method public final boolean is Static return modifiers Acc Static 0  isStatic AccStatic
Answer true if all float operations must adher to IEEE 754 float double rules public final boolean is Strictfp return modifiers Acc Strictfp 0  isStrictfp AccStrictfp
Answer true if the receiver is a synchronized method public final boolean is Synchronized return modifiers Acc Synchronized 0  isSynchronized AccSynchronized
Answer true if the receiver has public visibility public final boolean is Synthetic return modifiers Acc Synthetic 0  isSynthetic AccSynthetic
Answer true if the receiver is a vararg method public final boolean is Vararg return modifiers Acc Varargs 0  isVararg AccVarargs
Answer true if the receiver s declaring type is deprecated or any of its enclosing types public final boolean is Viewed As Deprecated return modifiers Acc Deprecated 0 modifiers Acc Deprecated Implicitly 0  isViewedAsDeprecated AccDeprecated AccDeprecatedImplicitly
public char readable Name foo int Thread String Buffer buffer new String Buffer parameters length 1 20 if is Constructor buffer append declaring Class source Name else buffer append selector buffer append if parameters No Parameters for int i 0 length parameters length i length i if i 0 buffer append NON NLS 1 buffer append parameters i source Name buffer append return buffer to String to Char Array  readableName StringBuffer StringBuffer isConstructor declaringClass sourceName NoParameters sourceName toString toCharArray
see org eclipse jdt internal compiler lookup Binding short Readable Name public char short Readable Name String Buffer buffer new String Buffer parameters length 1 20 if is Constructor buffer append declaring Class short Readable Name else buffer append selector buffer append if parameters No Parameters for int i 0 length parameters length i length i if i 0 buffer append NON NLS 1 buffer append parameters i short Readable Name buffer append return buffer to String to Char Array  shortReadableName shortReadableName StringBuffer StringBuffer isConstructor declaringClass shortReadableName NoParameters shortReadableName toString toCharArray
protected final void set Selector char selector this selector selector this signature null  setSelector
public final char signature I Ljava lang Thread Ljava lang Object if signature null return signature String Buffer buffer new String Buffer parameters length 1 20 buffer append Type Binding target Parameters this parameters boolean consider Synthetics is Constructor Related declaring Class is Nested Type if consider Synthetics take into account the synthetic argument type signatures as well Reference Binding synthetic Argument Types declaring Class synthetic Enclosing Instance Types int count synthetic Argument Types null 0 synthetic Argument Types length for int i 0 i count i buffer append synthetic Argument Types i signature if this instanceof Synthetic Access Method Binding target Parameters Synthetic Access Method Binding this target Method parameters if target Parameters No Parameters for int i 0 i target Parameters length i buffer append target Parameters i signature if consider Synthetics Synthetic Argument Binding synthetic Outer Arguments declaring Class synthetic Outer Local Variables int count synthetic Outer Arguments null 0 synthetic Outer Arguments length for int i 0 i count i buffer append synthetic Outer Arguments i type signature move the extra padding arguments of the synthetic constructor invocation to the end for int i target Parameters length extra Length parameters length i extra Length i buffer append parameters i signature buffer append buffer append return Type signature return signature buffer to String to Char Array  ILjava StringBuffer StringBuffer TypeBinding targetParameters considerSynthetics isConstructorRelated declaringClass isNestedType considerSynthetics ReferenceBinding syntheticArgumentTypes declaringClass syntheticEnclosingInstanceTypes syntheticArgumentTypes syntheticArgumentTypes syntheticArgumentTypes SyntheticAccessMethodBinding targetParameters SyntheticAccessMethodBinding targetMethod targetParameters NoParameters targetParameters targetParameters considerSynthetics SyntheticArgumentBinding syntheticOuterArguments declaringClass syntheticOuterLocalVariables syntheticOuterArguments syntheticOuterArguments syntheticOuterArguments targetParameters extraLength extraLength returnType toString toCharArray
public final int source End Abstract Method Declaration method source Method if method null return 0 return method source End  sourceEnd AbstractMethodDeclaration sourceMethod sourceEnd
Abstract Method Declaration source Method Source Type Binding source Type try source Type Source Type Binding declaring Class catch Class Cast Exception e return null Abstract Method Declaration methods source Type scope reference Context methods for int i methods length i 0 if this methods i binding return methods i return null  AbstractMethodDeclaration sourceMethod SourceTypeBinding sourceType sourceType SourceTypeBinding declaringClass ClassCastException AbstractMethodDeclaration sourceType referenceContext
public final int source Start Abstract Method Declaration method source Method if method null return 0 return method source Start  sourceStart AbstractMethodDeclaration sourceMethod sourceStart
public final void tag For Clearing Private Modifier modifiers Acc Clear Private Modifier  tagForClearingPrivateModifier AccClearPrivateModifier
public String to String String s return Type null return Type debug Name NULL TYPE NON NLS 1 s NON NLS 1 s selector null new String selector UNNAMED METHOD NON NLS 1 s NON NLS 1 if parameters null if parameters No Parameters for int i 0 length parameters length i length i if i 0 s NON NLS 1 s parameters i null parameters i debug Name NULL TYPE NON NLS 1 else s NULL PARAMETERS NON NLS 1 s NON NLS 1 if thrown Exceptions null if thrown Exceptions No Exceptions s throws NON NLS 1 for int i 0 length thrown Exceptions length i length i if i 0 s NON NLS 1 s thrown Exceptions i null thrown Exceptions i debug Name NULL TYPE NON NLS 1 else s NULL THROWN EXCEPTIONS NON NLS 1 return s  toString returnType returnType debugName NoParameters debugName thrownExceptions thrownExceptions NoExceptions thrownExceptions thrownExceptions thrownExceptions debugName

public Method Scope Class Scope parent Reference Context context boolean is Static super METHOD SCOPE parent locals new Local Variable Binding 5 this reference Context context this is Static is Static this start Index 0  MethodScope ClassScope ReferenceContext isStatic METHOD_SCOPE LocalVariableBinding referenceContext isStatic isStatic startIndex
private void check And Set Modifiers For Constructor Method Binding method Binding int modifiers method Binding modifiers if modifiers Acc Alternate Modifier Problem 0 problem Reporter duplicate Modifier For Method method Binding declaring Class Abstract Method Declaration reference Context if Constructor Declaration reference Context is Default Constructor if method Binding declaring Class is Public modifiers Acc Public else if method Binding declaring Class is Protected modifiers Acc Protected after this point tests on the 16 bits reserved int real Modifiers modifiers Acc Just Flag check for abnormal modifiers int unexpected Modifiers Acc Public Acc Private Acc Protected Acc Strictfp if real Modifiers unexpected Modifiers 0 problem Reporter illegal Modifier For Method method Binding declaring Class Abstract Method Declaration reference Context else if Abstract Method Declaration reference Context modifiers Acc Strictfp 0 must check the parse node explicitly problem Reporter illegal Modifier For Method method Binding declaring Class Abstract Method Declaration reference Context check for incompatible modifiers in the visibility bits isolate the visibility bits int accessor Bits real Modifiers Acc Public Acc Protected Acc Private if accessor Bits accessor Bits 1 0 problem Reporter illegal Visibility Modifier Combination For Method method Binding declaring Class Abstract Method Declaration reference Context need to keep the less restrictive if accessor Bits Acc Public 0 if accessor Bits Acc Protected 0 modifiers Acc Protected if accessor Bits Acc Private 0 modifiers Acc Private if accessor Bits Acc Protected 0 if accessor Bits Acc Private 0 modifiers Acc Private if the receiver s declaring class is a private nested type then make sure the receiver is not private causes problems for inner type emulation if method Binding declaring Class is Private if modifiers Acc Private 0 modifiers Acc Private method Binding modifiers modifiers  checkAndSetModifiersForConstructor MethodBinding methodBinding methodBinding AccAlternateModifierProblem problemReporter duplicateModifierForMethod methodBinding declaringClass AbstractMethodDeclaration referenceContext ConstructorDeclaration referenceContext isDefaultConstructor methodBinding declaringClass isPublic AccPublic methodBinding declaringClass isProtected AccProtected realModifiers AccJustFlag unexpectedModifiers AccPublic AccPrivate AccProtected AccStrictfp realModifiers unexpectedModifiers problemReporter illegalModifierForMethod methodBinding declaringClass AbstractMethodDeclaration referenceContext AbstractMethodDeclaration referenceContext AccStrictfp problemReporter illegalModifierForMethod methodBinding declaringClass AbstractMethodDeclaration referenceContext accessorBits realModifiers AccPublic AccProtected AccPrivate accessorBits accessorBits problemReporter illegalVisibilityModifierCombinationForMethod methodBinding declaringClass AbstractMethodDeclaration referenceContext accessorBits AccPublic accessorBits AccProtected AccProtected accessorBits AccPrivate AccPrivate accessorBits AccProtected accessorBits AccPrivate AccPrivate methodBinding declaringClass isPrivate AccPrivate AccPrivate methodBinding
private void check And Set Modifiers For Method Method Binding method Binding int modifiers method Binding modifiers if modifiers Acc Alternate Modifier Problem 0 problem Reporter duplicate Modifier For Method method Binding declaring Class Abstract Method Declaration reference Context after this point tests on the 16 bits reserved int real Modifiers modifiers Acc Just Flag set the requested modifiers for a method in an interface if method Binding declaring Class is Interface if real Modifiers Acc Public Acc Abstract 0 problem Reporter illegal Modifier For Interface Method method Binding declaring Class Abstract Method Declaration reference Context return check for abnormal modifiers int unexpected Modifiers Acc Public Acc Private Acc Protected Acc Abstract Acc Static Acc Final Acc Synchronized Acc Native Acc Strictfp if real Modifiers unexpected Modifiers 0 problem Reporter illegal Modifier For Method method Binding declaring Class Abstract Method Declaration reference Context check for incompatible modifiers in the visibility bits isolate the visibility bits int accessor Bits real Modifiers Acc Public Acc Protected Acc Private if accessor Bits accessor Bits 1 0 problem Reporter illegal Visibility Modifier Combination For Method method Binding declaring Class Abstract Method Declaration reference Context need to keep the less restrictive if accessor Bits Acc Public 0 if accessor Bits Acc Protected 0 modifiers Acc Protected if accessor Bits Acc Private 0 modifiers Acc Private if accessor Bits Acc Protected 0 if accessor Bits Acc Private 0 modifiers Acc Private check for modifiers incompatible with abstract modifier if modifiers Acc Abstract 0 int incompatible With Abstract Acc Private Acc Static Acc Final Acc Synchronized Acc Native Acc Strictfp if modifiers incompatible With Abstract 0 problem Reporter illegal Abstract Modifier Combination For Method method Binding declaring Class Abstract Method Declaration reference Context if method Binding declaring Class is Abstract problem Reporter abstract Method In Abstract Class Source Type Binding method Binding declaring Class Abstract Method Declaration reference Context DISABLED for backward compatibility with javac if enabled should also mark private methods as final methods from a final class are final 8 4 3 3 if method Binding declaring Class is Final modifiers Acc Final native methods cannot also be tagged as strictfp if modifiers Acc Native 0 modifiers Acc Strictfp 0 problem Reporter native Methods Cannot Be Strictfp method Binding declaring Class Abstract Method Declaration reference Context static members are only authorized in a static member or top level type if real Modifiers Acc Static 0 method Binding declaring Class is Nested Type method Binding declaring Class is Static problem Reporter unexpected Static Modifier For Method method Binding declaring Class Abstract Method Declaration reference Context method Binding modifiers modifiers  checkAndSetModifiersForMethod MethodBinding methodBinding methodBinding AccAlternateModifierProblem problemReporter duplicateModifierForMethod methodBinding declaringClass AbstractMethodDeclaration referenceContext realModifiers AccJustFlag methodBinding declaringClass isInterface realModifiers AccPublic AccAbstract problemReporter illegalModifierForInterfaceMethod methodBinding declaringClass AbstractMethodDeclaration referenceContext unexpectedModifiers AccPublic AccPrivate AccProtected AccAbstract AccStatic AccFinal AccSynchronized AccNative AccStrictfp realModifiers unexpectedModifiers problemReporter illegalModifierForMethod methodBinding declaringClass AbstractMethodDeclaration referenceContext accessorBits realModifiers AccPublic AccProtected AccPrivate accessorBits accessorBits problemReporter illegalVisibilityModifierCombinationForMethod methodBinding declaringClass AbstractMethodDeclaration referenceContext accessorBits AccPublic accessorBits AccProtected AccProtected accessorBits AccPrivate AccPrivate accessorBits AccProtected accessorBits AccPrivate AccPrivate AccAbstract incompatibleWithAbstract AccPrivate AccStatic AccFinal AccSynchronized AccNative AccStrictfp incompatibleWithAbstract problemReporter illegalAbstractModifierCombinationForMethod methodBinding declaringClass AbstractMethodDeclaration referenceContext methodBinding declaringClass isAbstract problemReporter abstractMethodInAbstractClass SourceTypeBinding methodBinding declaringClass AbstractMethodDeclaration referenceContext methodBinding declaringClass isFinal AccFinal AccNative AccStrictfp problemReporter nativeMethodsCannotBeStrictfp methodBinding declaringClass AbstractMethodDeclaration referenceContext realModifiers AccStatic methodBinding declaringClass isNestedType methodBinding declaringClass isStatic problemReporter unexpectedStaticModifierForMethod methodBinding declaringClass AbstractMethodDeclaration referenceContext methodBinding
public void compute Local Variable Positions int init Offset Code Stream code Stream boolean is Reporting Unused Argument false if reference Context instanceof Abstract Method Declaration Abstract Method Declaration method Decl Abstract Method Declaration reference Context Method Binding method method Decl binding Compiler Options options compilation Unit Scope environment options if method is Abstract method is Implementing options report Unused Parameter When Implementing Abstract method is Overriding method is Implementing options report Unused Parameter When Overriding Concrete method is Main is Reporting Unused Argument true this offset init Offset this max Offset init Offset manage arguments int ilocal 0 max Locals this local Index while ilocal max Locals Local Variable Binding local locals ilocal if local null local is Argument break done with arguments do not report fake used variable if is Reporting Unused Argument local use Flag Local Variable Binding UNUSED local declaration bits AST Node Is Local Declaration ReachableMASK 0 declaration is reachable this problem Reporter unused Argument local declaration record user defined argument for attribute generation code Stream record local assign variable position local resolved Position this offset if local type Long Binding local type Double Binding this offset 2 else this offset check for too many arguments local variables if this offset 0xFF no more than 255 words of arguments this problem Reporter no More Available Space For Argument local local declaration ilocal sneak in extra argument before other local variables if extra Synthetic Arguments null for int iarg 0 max Arguments extra Synthetic Arguments length iarg max Arguments iarg Synthetic Argument Binding argument extra Synthetic Arguments iarg argument resolved Position this offset if argument type Long Binding argument type Double Binding this offset 2 else this offset if this offset 0xFF no more than 255 words of arguments this problem Reporter no More Available Space For Argument argument AST Node this reference Context this compute Local Variable Positions ilocal this offset code Stream  computeLocalVariablePositions initOffset CodeStream codeStream isReportingUnusedArgument referenceContext AbstractMethodDeclaration AbstractMethodDeclaration methodDecl AbstractMethodDeclaration referenceContext MethodBinding methodDecl CompilerOptions compilationUnitScope isAbstract isImplementing reportUnusedParameterWhenImplementingAbstract isOverriding isImplementing reportUnusedParameterWhenOverridingConcrete isMain isReportingUnusedArgument initOffset maxOffset initOffset maxLocals localIndex maxLocals LocalVariableBinding isArgument isReportingUnusedArgument useFlag LocalVariableBinding ASTNode IsLocalDeclarationReachableMASK problemReporter unusedArgument codeStream resolvedPosition LongBinding DoubleBinding problemReporter noMoreAvailableSpaceForArgument extraSyntheticArguments maxArguments extraSyntheticArguments maxArguments SyntheticArgumentBinding extraSyntheticArguments resolvedPosition LongBinding DoubleBinding problemReporter noMoreAvailableSpaceForArgument ASTNode referenceContext computeLocalVariablePositions codeStream
Method Binding create Method Abstract Method Declaration method is necessary to ensure error reporting this reference Context method method scope this Source Type Binding declaring Class reference Type binding int modifiers method modifiers Acc Unresolved if method is Constructor if method is Default Constructor modifiers Acc Is Default Constructor method binding new Method Binding modifiers null null declaring Class check And Set Modifiers For Constructor method binding else if declaring Class is Interface modifiers Acc Public Acc Abstract method binding new Method Binding modifiers method selector null null null declaring Class check And Set Modifiers For Method method binding this is Static method binding is Static return method binding  MethodBinding createMethod AbstractMethodDeclaration referenceContext SourceTypeBinding declaringClass referenceType AccUnresolved isConstructor isDefaultConstructor AccIsDefaultConstructor MethodBinding declaringClass checkAndSetModifiersForConstructor declaringClass isInterface AccPublic AccAbstract MethodBinding declaringClass checkAndSetModifiersForMethod isStatic isStatic
public Field Binding find Field Type Binding receiver Type char field Name Invocation Site invocation Site boolean need Resolve Field Binding field super find Field receiver Type field Name invocation Site need Resolve if field null return null if field is Valid Binding return field answer the error field if field is Static return field static fields are always accessible if is Constructor Call receiver Type enclosing Source Type return field if invocation Site instanceof Single Name Reference return new Problem Field Binding field closest match field declaring Class field Name Non Static Reference In Constructor Invocation if invocation Site instanceof Qualified Name Reference look to see if the field is the first binding Qualified Name Reference name Qualified Name Reference invocation Site if name binding null only true when the field is the fieldbinding at the beginning of name s tokens return new Problem Field Binding field closest match field declaring Class field Name Non Static Reference In Constructor Invocation return field  FieldBinding findField TypeBinding receiverType fieldName InvocationSite invocationSite needResolve FieldBinding findField receiverType fieldName invocationSite needResolve isValidBinding isStatic isConstructorCall receiverType enclosingSourceType invocationSite SingleNameReference ProblemFieldBinding declaringClass fieldName NonStaticReferenceInConstructorInvocation invocationSite QualifiedNameReference QualifiedNameReference QualifiedNameReference invocationSite ProblemFieldBinding declaringClass fieldName NonStaticReferenceInConstructorInvocation
public boolean is Inside Constructor return reference Context instanceof Constructor Declaration  isInsideConstructor referenceContext ConstructorDeclaration
public boolean is Inside Initializer return reference Context instanceof Type Declaration  isInsideInitializer referenceContext TypeDeclaration
public boolean is Inside Initializer Or Constructor return reference Context instanceof Type Declaration reference Context instanceof Constructor Declaration  isInsideInitializerOrConstructor referenceContext TypeDeclaration referenceContext ConstructorDeclaration
public Problem Reporter problem Reporter Method Scope outer Method Scope if outer Method Scope outer Most Method Scope this Problem Reporter problem Reporter reference Compilation Unit problem Reporter problem Reporter reference Context reference Context return problem Reporter return outer Method Scope problem Reporter  ProblemReporter problemReporter MethodScope outerMethodScope outerMethodScope outerMostMethodScope ProblemReporter problemReporter referenceCompilationUnit problemReporter problemReporter referenceContext referenceContext problemReporter outerMethodScope problemReporter
public final int record Initialization States Flow Info flow Info if flow Info is Reachable return 1 Unconditional Flow Info unconditional Flow Info flow Info unconditional Inits long extra Inits unconditional Flow Info extra Definite Inits long inits unconditional Flow Info definite Inits check Next Entry for int i last Index i 0 if definite Inits i inits long other Inits extra Definite Inits i if extra Inits null other Inits null if extra Inits length other Inits length int j max for j 0 max extra Inits length j max j if extra Inits j other Inits j continue check Next Entry return i else if extra Inits null other Inits null return i add a new entry if definite Inits length last Index need a resize System arraycopy definite Inits 0 definite Inits new long last Index 20 0 last Index System arraycopy extra Definite Inits 0 extra Definite Inits new long last Index 20 0 last Index definite Inits last Index inits if extra Inits null extra Definite Inits last Index new long extra Inits length System arraycopy extra Inits 0 extra Definite Inits last Index 0 extra Inits length return last Index  recordInitializationStates FlowInfo flowInfo flowInfo isReachable UnconditionalFlowInfo unconditionalFlowInfo flowInfo unconditionalInits extraInits unconditionalFlowInfo extraDefiniteInits unconditionalFlowInfo definiteInits checkNextEntry lastIndex definiteInits otherInits extraDefiniteInits extraInits otherInits extraInits otherInits extraInits extraInits otherInits checkNextEntry extraInits otherInits definiteInits lastIndex definiteInits definiteInits lastIndex lastIndex extraDefiniteInits extraDefiniteInits lastIndex lastIndex definiteInits lastIndex extraInits extraDefiniteInits lastIndex extraInits extraInits extraDefiniteInits lastIndex extraInits lastIndex
public Abstract Method Declaration reference Method if reference Context instanceof Abstract Method Declaration return Abstract Method Declaration reference Context return null  AbstractMethodDeclaration referenceMethod referenceContext AbstractMethodDeclaration AbstractMethodDeclaration referenceContext
It is the nearest enclosing type of this scope public Type Declaration reference Type return Class Scope parent reference Context  TypeDeclaration referenceType ClassScope referenceContext
String basic To String int tab String new Line n NON NLS 1 for int i tab i 0 new Line t NON NLS 1 String s new Line Method Scope NON NLS 1 new Line t NON NLS 1 s new Line locals NON NLS 1 for int i 0 i local Index i s new Line t locals i to String NON NLS 1 s new Line start Index start Index NON NLS 1 s new Line is Constructor Call is Constructor Call NON NLS 1 s new Line initialized Field initialized Field NON NLS 1 s new Line last Visible FieldID last Visible FieldID NON NLS 1 s new Line reference Context reference Context NON NLS 1 return s  basicToString newLine newLine newLine newLine newLine localIndex newLine toString newLine startIndex startIndex newLine isConstructorCall isConstructorCall newLine initializedField initializedField newLine lastVisibleFieldID lastVisibleFieldID newLine referenceContext referenceContext

public Method Verifier Lookup Environment environment this type null Initialized with the public method verify Source Type Binding this inherited Methods null this current Methods null this runtime Exception null this error Exception null this environment environment  MethodVerifier LookupEnvironment SourceTypeBinding inheritedMethods currentMethods runtimeException errorException
private boolean are Parameters Equal Method Binding one Method Binding two Type Binding one Args one parameters Type Binding two Args two parameters if one Args two Args return true int length one Args length if length two Args length return false for int i 0 i length i if are Types Equal one Args i two Args i return false return true  areParametersEqual MethodBinding MethodBinding TypeBinding oneArgs TypeBinding twoArgs oneArgs twoArgs oneArgs twoArgs areTypesEqual oneArgs twoArgs
private boolean are Types Equal Type Binding one Type Binding two if one two return true if one instanceof Reference Binding two instanceof Reference Binding can compare unresolved to resolved reference bindings return Char Operation equals Reference Binding one compound Name Reference Binding two compound Name return false all other type bindings are identical  areTypesEqual TypeBinding TypeBinding ReferenceBinding ReferenceBinding CharOperation ReferenceBinding compoundName ReferenceBinding compoundName
private void check Abstract Method Method Binding abstract Method if must Implement Abstract Method abstract Method Type Declaration type Declaration this type scope reference Context if type Declaration null Method Declaration missing Abstract Method type Declaration add Missing Abstract Method For abstract Method missing Abstract Method scope problem Reporter abstract Method Must Be Implemented this type abstract Method else this problem Reporter abstract Method Must Be Implemented this type abstract Method  checkAbstractMethod MethodBinding abstractMethod mustImplementAbstractMethod abstractMethod TypeDeclaration typeDeclaration referenceContext typeDeclaration MethodDeclaration missingAbstractMethod typeDeclaration addMissingAbstractMethodFor abstractMethod missingAbstractMethod problemReporter abstractMethodMustBeImplemented abstractMethod problemReporter abstractMethodMustBeImplemented abstractMethod
private void check Against Inherited Methods Method Binding current Method Method Binding methods int length current Method modifiers Compiler Modifiers Acc Overriding next Method for int i length i 0 Method Binding inherited Method methods i if current Method is Abstract inherited Method is Abstract current Method modifiers Compiler Modifiers Acc Implementing if are Types Equal current Method return Type inherited Method return Type this problem Reporter current Method incompatible Return Type current Method inherited Method else if current Method is Static inherited Method is Static Cannot override a static method or hide an instance method this problem Reporter current Method static And Instance Conflict current Method inherited Method else if current Method thrown Exceptions No Exceptions this check Exceptions current Method inherited Method if inherited Method is Final this problem Reporter current Method final Method Cannot Be Overridden current Method inherited Method if this is As Visible current Method inherited Method this problem Reporter current Method visibility Conflict current Method inherited Method if environment options report Deprecation When Overriding Deprecated Method inherited Method is Viewed As Deprecated if current Method is Viewed As Deprecated environment options report Deprecation Inside Deprecated Code check against the other inherited methods to see if they hide this inherited Method Reference Binding declaring Class inherited Method declaring Class if declaring Class is Interface for int j length j 0 if i j methods j declaring Class implements Interface declaring Class false continue next Method this problem Reporter current Method overrides Deprecated Method current Method inherited Method  checkAgainstInheritedMethods MethodBinding currentMethod MethodBinding currentMethod CompilerModifiers AccOverriding nextMethod MethodBinding inheritedMethod currentMethod isAbstract inheritedMethod isAbstract currentMethod CompilerModifiers AccImplementing areTypesEqual currentMethod returnType inheritedMethod returnType problemReporter currentMethod incompatibleReturnType currentMethod inheritedMethod currentMethod isStatic inheritedMethod isStatic problemReporter currentMethod staticAndInstanceConflict currentMethod inheritedMethod currentMethod thrownExceptions NoExceptions checkExceptions currentMethod inheritedMethod inheritedMethod isFinal problemReporter currentMethod finalMethodCannotBeOverridden currentMethod inheritedMethod isAsVisible currentMethod inheritedMethod problemReporter currentMethod visibilityConflict currentMethod inheritedMethod reportDeprecationWhenOverridingDeprecatedMethod inheritedMethod isViewedAsDeprecated currentMethod isViewedAsDeprecated reportDeprecationInsideDeprecatedCode inheritedMethod ReferenceBinding declaringClass inheritedMethod declaringClass declaringClass isInterface declaringClass implementsInterface declaringClass nextMethod problemReporter currentMethod overridesDeprecatedMethod currentMethod inheritedMethod
private void check Exceptions Method Binding new Method Method Binding inherited Method Reference Binding new Exceptions resolved Exception Types For new Method Reference Binding inherited Exceptions resolved Exception Types For inherited Method for int i new Exceptions length i 0 Reference Binding new Exception new Exceptions i int j inherited Exceptions length while j 1 this is Same Class Or Subclass Of new Exception inherited Exceptions j empty if j 1 if new Exception is Compatible With this runtime Exception new Exception is Compatible With this error Exception this problem Reporter new Method incompatible Exception In Throws Clause this type new Method inherited Method new Exception  checkExceptions MethodBinding newMethod MethodBinding inheritedMethod ReferenceBinding newExceptions resolvedExceptionTypesFor newMethod ReferenceBinding inheritedExceptions resolvedExceptionTypesFor inheritedMethod newExceptions ReferenceBinding newException newExceptions inheritedExceptions isSameClassOrSubclassOf newException inheritedExceptions newException isCompatibleWith runtimeException newException isCompatibleWith errorException problemReporter newMethod incompatibleExceptionInThrowsClause newMethod inheritedMethod newException
private void check Inherited Methods Method Binding methods int length Type Binding return Type methods 0 return Type int index length while index 0 are Types Equal return Type methods index return Type empty if index 0 All inherited methods do NOT have the same vm Signature this problem Reporter inherited Methods Have Incompatible Return Types this type methods length return Method Binding concrete Method null if type is Interface ignore concrete methods for interfaces for int i length i 0 Remember that only one of the methods can be non abstract if methods i is Abstract concrete Method methods i break if concrete Method null if this type is Class this type is Abstract for int i length i 0 if must Implement Abstract Method methods i Type Declaration type Declaration this type scope reference Context if type Declaration null Method Declaration missing Abstract Method type Declaration add Missing Abstract Method For methods 0 missing Abstract Method scope problem Reporter abstract Method Must Be Implemented this type methods 0 else this problem Reporter abstract Method Must Be Implemented this type methods 0 return return Method Binding abstract Methods new Method Binding length 1 index 0 for int i length i 0 if methods i concrete Method abstract Methods index methods i Remember that interfaces can only define public instance methods if concrete Method is Static Cannot inherit a static method which is specified as an instance method by an interface this problem Reporter static Inherited Method Conflicts type concrete Method abstract Methods if concrete Method is Public Cannot reduce visibility of a public method specified by an interface this problem Reporter inherited Method Reduces Visibility type concrete Method abstract Methods if concrete Method thrown Exceptions No Exceptions for int i abstract Methods length i 0 this check Exceptions concrete Method abstract Methods i  checkInheritedMethods MethodBinding TypeBinding returnType returnType areTypesEqual returnType returnType vmSignature problemReporter inheritedMethodsHaveIncompatibleReturnTypes MethodBinding concreteMethod isInterface isAbstract concreteMethod concreteMethod isClass isAbstract mustImplementAbstractMethod TypeDeclaration typeDeclaration referenceContext typeDeclaration MethodDeclaration missingAbstractMethod typeDeclaration addMissingAbstractMethodFor missingAbstractMethod problemReporter abstractMethodMustBeImplemented problemReporter abstractMethodMustBeImplemented MethodBinding abstractMethods MethodBinding concreteMethod abstractMethods concreteMethod isStatic problemReporter staticInheritedMethodConflicts concreteMethod abstractMethods concreteMethod isPublic problemReporter inheritedMethodReducesVisibility concreteMethod abstractMethods concreteMethod thrownExceptions NoExceptions abstractMethods checkExceptions concreteMethod abstractMethods
private void check Methods boolean must Implement Abstract Methods this type is Class this type is Abstract boolean skip Inherited Methods must Implement Abstract Methods this type super Interfaces No Super Interfaces this type superclass null this type superclass is Abstract have a single concrete superclass so only check overridden methods char method Selectors this inherited Methods key Table next Selector for int s method Selectors length s 0 if method Selectors s null continue next Selector Method Binding current Method Binding this current Methods get method Selectors s if current null skip Inherited Methods continue next Selector Method Binding inherited Method Binding this inherited Methods value Table s if inherited length 1 current null handle the common case if must Implement Abstract Methods inherited 0 is Abstract check Abstract Method inherited 0 continue next Selector int index 1 Method Binding matching Inherited new Method Binding inherited length if current null for int i 0 length1 current length i length1 i while index 0 matching Inherited index null clear the previous contents of the matching methods Method Binding current Method current i for int j 0 length2 inherited length j length2 j if inherited j null are Parameters Equal current Method inherited j matching Inherited index inherited j inherited j null do not want to find it again if index 0 this check Against Inherited Methods current Method matching Inherited index 1 pass in the length of matching for int i 0 length inherited length i length i while index 0 matching Inherited index null clear the previous contents of the matching methods if inherited i null matching Inherited index inherited i for int j i 1 j length j if inherited j null are Parameters Equal inherited i inherited j matching Inherited index inherited j inherited j null do not want to find it again if index 0 this check Inherited Methods matching Inherited index 1 pass in the length of matching else if must Implement Abstract Methods index 0 matching Inherited 0 is Abstract check Abstract Method matching Inherited 0  checkMethods mustImplementAbstractMethods isClass isAbstract skipInheritedMethods mustImplementAbstractMethods superInterfaces NoSuperInterfaces isAbstract methodSelectors inheritedMethods keyTable nextSelector methodSelectors methodSelectors nextSelector MethodBinding MethodBinding currentMethods methodSelectors skipInheritedMethods nextSelector MethodBinding MethodBinding inheritedMethods valueTable mustImplementAbstractMethods isAbstract checkAbstractMethod nextSelector MethodBinding matchingInherited MethodBinding matchingInherited MethodBinding currentMethod areParametersEqual currentMethod matchingInherited checkAgainstInheritedMethods currentMethod matchingInherited matchingInherited matchingInherited areParametersEqual matchingInherited checkInheritedMethods matchingInherited mustImplementAbstractMethods matchingInherited isAbstract checkAbstractMethod matchingInherited
private void check Package Private Abstract Method Method Binding abstract Method Reference Binding super Type this type superclass char selector abstract Method selector do if super Type is Valid Binding return if super Type is Abstract return closer non abstract super type will be flagged instead Method Binding methods super Type get Methods selector next Method for int m methods length m 0 Method Binding method methods m if are Types Equal method return Type abstract Method return Type are Parameters Equal method abstract Method continue next Method if method is Private method is Constructor method is Default Abstract continue next Method if super Type f Package abstract Method declaring Class f Package return found concrete implementation of abstract method in same package while super Type super Type superclass abstract Method declaring Class non visible abstract methods cannot be overridden so the type must be defined abstract this problem Reporter abstract Method Cannot Be Overridden this type abstract Method  checkPackagePrivateAbstractMethod MethodBinding abstractMethod ReferenceBinding superType abstractMethod superType isValidBinding superType isAbstract MethodBinding superType getMethods nextMethod MethodBinding areTypesEqual returnType abstractMethod returnType areParametersEqual abstractMethod nextMethod isPrivate isConstructor isDefaultAbstract nextMethod superType fPackage abstractMethod declaringClass fPackage superType superType abstractMethod declaringClass problemReporter abstractMethodCannotBeOverridden abstractMethod
private void compute Inherited Methods this inherited Methods new Hashtable Of Object 51 maps method selectors to an array of methods must search to match paramaters return type Reference Binding interfaces To Visit new Reference Binding 3 int last Position 1 Reference Binding its Interfaces type super Interfaces if its Interfaces No Super Interfaces interfaces To Visit last Position its Interfaces Reference Binding super Type this type is Class this type superclass this type scope get Java Lang Object check interface methods against Object Method Binding non Visible Default Methods null int non Visible Count 0 while super Type null if super Type is Valid Binding if its Interfaces super Type super Interfaces No Super Interfaces if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces Method Binding methods super Type un Resolved Methods next Method for int m methods length m 0 Method Binding method methods m if method is Private method is Constructor method is Default Abstract Method Binding existing Methods Method Binding this inherited Methods get method selector if existing Methods null for int i 0 length existing Methods length i length i if are Types Equal method return Type existing Methods i return Type are Parameters Equal method existing Methods i if method is Default method is Abstract method declaring Class f Package type f Package check Package Private Abstract Method method continue next Method if non Visible Default Methods null for int i 0 i non Visible Count i if Char Operation equals method selector non Visible Default Methods i selector are Types Equal method return Type non Visible Default Methods i return Type are Parameters Equal method non Visible Default Methods i continue next Method if method is Default method declaring Class f Package type f Package if existing Methods null existing Methods new Method Binding 1 else System arraycopy existing Methods 0 existing Methods new Method Binding existing Methods length 1 0 existing Methods length 1 existing Methods existing Methods length 1 method this inherited Methods put method selector existing Methods else if non Visible Default Methods null non Visible Default Methods new Method Binding 10 else if non Visible Count non Visible Default Methods length System arraycopy non Visible Default Methods 0 non Visible Default Methods new Method Binding non Visible Count 2 0 non Visible Count non Visible Default Methods non Visible Count method if method is Abstract this type is Abstract non visible abstract methods cannot be overridden so the type must be defined abstract this problem Reporter abstract Method Cannot Be Overridden this type method Method Binding current Method Binding this current Methods get method selector if current null non visible methods cannot be overridden so a warning is issued found Match for int i 0 length current length i length i if are Types Equal method return Type current i return Type are Parameters Equal method current i this problem Reporter overrides Package Default Method current i method break found Match super Type super Type superclass for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j super Type interfaces j if super Type tag Bits Interface Visited 0 super Type tag Bits Interface Visited if super Type is Valid Binding if its Interfaces super Type super Interfaces No Super Interfaces if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces Method Binding methods super Type un Resolved Methods for int m methods length m 0 Interface methods are all abstract public Method Binding method methods m Method Binding existing Methods Method Binding this inherited Methods get method selector if existing Methods null existing Methods new Method Binding 1 else System arraycopy existing Methods 0 existing Methods new Method Binding existing Methods length 1 0 existing Methods length 1 existing Methods existing Methods length 1 method this inherited Methods put method selector existing Methods bit reinitialization for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j interfaces j tag Bits Interface Visited  computeInheritedMethods inheritedMethods HashtableOfObject ReferenceBinding interfacesToVisit ReferenceBinding lastPosition ReferenceBinding itsInterfaces superInterfaces itsInterfaces NoSuperInterfaces interfacesToVisit lastPosition itsInterfaces ReferenceBinding superType isClass getJavaLangObject MethodBinding nonVisibleDefaultMethods nonVisibleCount superType superType isValidBinding itsInterfaces superType superInterfaces NoSuperInterfaces lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces MethodBinding superType unResolvedMethods nextMethod MethodBinding isPrivate isConstructor isDefaultAbstract MethodBinding existingMethods MethodBinding inheritedMethods existingMethods existingMethods areTypesEqual returnType existingMethods returnType areParametersEqual existingMethods isDefault isAbstract declaringClass fPackage fPackage checkPackagePrivateAbstractMethod nextMethod nonVisibleDefaultMethods nonVisibleCount CharOperation nonVisibleDefaultMethods areTypesEqual returnType nonVisibleDefaultMethods returnType areParametersEqual nonVisibleDefaultMethods nextMethod isDefault declaringClass fPackage fPackage existingMethods existingMethods MethodBinding existingMethods existingMethods MethodBinding existingMethods existingMethods existingMethods existingMethods inheritedMethods existingMethods nonVisibleDefaultMethods nonVisibleDefaultMethods MethodBinding nonVisibleCount nonVisibleDefaultMethods nonVisibleDefaultMethods nonVisibleDefaultMethods MethodBinding nonVisibleCount nonVisibleCount nonVisibleDefaultMethods nonVisibleCount isAbstract isAbstract problemReporter abstractMethodCannotBeOverridden MethodBinding MethodBinding currentMethods foundMatch areTypesEqual returnType returnType areParametersEqual problemReporter overridesPackageDefaultMethod foundMatch superType superType lastPosition ReferenceBinding interfacesToVisit superType superType tagBits InterfaceVisited superType tagBits InterfaceVisited superType isValidBinding itsInterfaces superType superInterfaces NoSuperInterfaces lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces MethodBinding superType unResolvedMethods MethodBinding MethodBinding existingMethods MethodBinding inheritedMethods existingMethods existingMethods MethodBinding existingMethods existingMethods MethodBinding existingMethods existingMethods existingMethods existingMethods inheritedMethods existingMethods lastPosition ReferenceBinding interfacesToVisit tagBits InterfaceVisited
private void compute Methods Method Binding methods type methods int size methods length this current Methods new Hashtable Of Object size 0 1 size maps method selectors to an array of methods must search to match paramaters return type for int m size m 0 Method Binding method methods m if method is Constructor method is Default Abstract keep all methods which are NOT constructors or default abstract Method Binding existing Methods Method Binding this current Methods get method selector if existing Methods null existing Methods new Method Binding 1 else System arraycopy existing Methods 0 existing Methods new Method Binding existing Methods length 1 0 existing Methods length 1 existing Methods existing Methods length 1 method this current Methods put method selector existing Methods  computeMethods MethodBinding currentMethods HashtableOfObject MethodBinding isConstructor isDefaultAbstract MethodBinding existingMethods MethodBinding currentMethods existingMethods existingMethods MethodBinding existingMethods existingMethods MethodBinding existingMethods existingMethods existingMethods existingMethods currentMethods existingMethods
private Reference Binding error Exception if error Exception null this error Exception this type scope get Java Lang Error return error Exception  ReferenceBinding errorException errorException errorException getJavaLangError errorException
private boolean is As Visible Method Binding new Method Method Binding inherited Method if inherited Method modifiers new Method modifiers return true if new Method is Public return true Covers everything if inherited Method is Public return false if new Method is Protected return true if inherited Method is Protected return false return new Method is Private The inherited Method cannot be private since it would not be visible  isAsVisible MethodBinding newMethod MethodBinding inheritedMethod inheritedMethod newMethod newMethod isPublic inheritedMethod isPublic newMethod isProtected inheritedMethod isProtected newMethod isPrivate inheritedMethod
private boolean is Same Class Or Subclass Of Reference Binding test Class Reference Binding superclass do if test Class superclass return true while test Class test Class superclass null return false  isSameClassOrSubclassOf ReferenceBinding testClass ReferenceBinding testClass testClass testClass
private boolean must Implement Abstract Method Method Binding abstract Method if the type s superclass is an abstract class then all abstract methods must be implemented otherwise skip it if the type s superclass must implement any of the inherited methods Reference Binding superclass this type superclass Reference Binding declaring Class abstract Method declaring Class if declaring Class is Class while superclass is Abstract superclass declaring Class superclass superclass superclass find the first concrete superclass or the abstract declaring Class else if this type implements Interface declaring Class false if this type is Abstract return false leave it for the subclasses if superclass implements Interface declaring Class true only if a superclass does not also implement the interface return true while superclass is Abstract superclass implements Interface declaring Class false superclass superclass superclass find the first concrete superclass or the superclass which implements the interface return superclass is Abstract if it is a concrete class then we have already reported problem against it  mustImplementAbstractMethod MethodBinding abstractMethod ReferenceBinding ReferenceBinding declaringClass abstractMethod declaringClass declaringClass isClass isAbstract declaringClass declaringClass implementsInterface declaringClass isAbstract implementsInterface declaringClass isAbstract implementsInterface declaringClass isAbstract
return superclass is Abstract if it is a concrete class then we have already reported problem against it private Problem Reporter problem Reporter return this type scope problem Reporter  isAbstract ProblemReporter problemReporter problemReporter
private Problem Reporter problem Reporter Method Binding current Method Problem Reporter reporter problem Reporter if current Method declaring Class type only report against the current Method if its implemented by the type reporter reference Context current Method source Method return reporter  ProblemReporter problemReporter MethodBinding currentMethod ProblemReporter problemReporter currentMethod declaringClass currentMethod referenceContext currentMethod sourceMethod
Reference Binding resolved Exception Types For Method Binding method Reference Binding exceptions method thrown Exceptions if method modifiers Compiler Modifiers Acc Unresolved 0 return exceptions if method declaring Class instanceof Binary Type Binding return Type Constants No Exceptions safety check Binary Type Binding binary Type Binary Type Binding method declaring Class for int i exceptions length i 0 if exceptions i instanceof Unresolved Reference Binding exceptions i Reference Binding binary Type resolve Type exceptions i return exceptions  ReferenceBinding resolvedExceptionTypesFor MethodBinding ReferenceBinding thrownExceptions CompilerModifiers AccUnresolved declaringClass BinaryTypeBinding TypeConstants NoExceptions BinaryTypeBinding binaryType BinaryTypeBinding declaringClass UnresolvedReferenceBinding ReferenceBinding binaryType resolveType
private Reference Binding runtime Exception if runtime Exception null this runtime Exception this type scope get Java Lang Runtime Exception return runtime Exception  ReferenceBinding runtimeException runtimeException runtimeException getJavaLangRuntimeException runtimeException
public void verify Source Type Binding some Type this type some Type this compute Methods this compute Inherited Methods this check Methods  SourceTypeBinding someType someType computeMethods computeInheritedMethods checkMethods
public String to String String Buffer buffer new String Buffer 10 buffer append Method Verifier for type NON NLS 1 buffer append type readable Name buffer append n buffer append t inherited methods NON NLS 1 buffer append this inherited Methods return buffer to String  toString StringBuffer StringBuffer MethodVerifier readableName inheritedMethods toString

public Nested Type Binding char type Name Class Scope scope Source Type Binding enclosing Type super type Name enclosing Type f Package scope this tag Bits Is Nested Type this enclosing Type enclosing Type  NestedTypeBinding typeName ClassScope SourceTypeBinding enclosingType typeName enclosingType fPackage tagBits IsNestedType enclosingType enclosingType
public Synthetic Argument Binding add Synthetic Argument Local Variable Binding actual Outer Local Variable Synthetic Argument Binding synth Local null if outer Local Variables null synth Local new Synthetic Argument Binding actual Outer Local Variable outer Local Variables new Synthetic Argument Binding synth Local else int size outer Local Variables length int new Arg Index size for int i size i 0 must search backwards if outer Local Variables i actual Outer Local Variable actual Outer Local Variable return outer Local Variables i already exists if outer Local Variables i id actual Outer Local Variable id new Arg Index i Synthetic Argument Binding synth Locals new Synthetic Argument Binding size 1 System arraycopy outer Local Variables 0 synth Locals 0 new Arg Index synth Locals new Arg Index synth Local new Synthetic Argument Binding actual Outer Local Variable System arraycopy outer Local Variables new Arg Index synth Locals new Arg Index 1 size new Arg Index outer Local Variables synth Locals System out println Adding synth arg for local var new String actual Outer Local Variable name to new String this readable Name if scope reference Compilation Unit is Propagating Inner Class Emulation this update Inner Emulation Dependents return synth Local  SyntheticArgumentBinding addSyntheticArgument LocalVariableBinding actualOuterLocalVariable SyntheticArgumentBinding synthLocal outerLocalVariables synthLocal SyntheticArgumentBinding actualOuterLocalVariable outerLocalVariables SyntheticArgumentBinding synthLocal outerLocalVariables newArgIndex outerLocalVariables actualOuterLocalVariable actualOuterLocalVariable outerLocalVariables outerLocalVariables actualOuterLocalVariable newArgIndex SyntheticArgumentBinding synthLocals SyntheticArgumentBinding outerLocalVariables synthLocals newArgIndex synthLocals newArgIndex synthLocal SyntheticArgumentBinding actualOuterLocalVariable outerLocalVariables newArgIndex synthLocals newArgIndex newArgIndex outerLocalVariables synthLocals actualOuterLocalVariable readableName referenceCompilationUnit isPropagatingInnerClassEmulation updateInnerEmulationDependents synthLocal
public Synthetic Argument Binding add Synthetic Argument Reference Binding target Enclosing Type Synthetic Argument Binding synth Local null if enclosing Instances null synth Local new Synthetic Argument Binding target Enclosing Type enclosing Instances new Synthetic Argument Binding synth Local else int size enclosing Instances length int new Arg Index size for int i size i 0 if enclosing Instances i type target Enclosing Type return enclosing Instances i already exists if this enclosing Type target Enclosing Type new Arg Index 0 Synthetic Argument Binding new Instances new Synthetic Argument Binding size 1 System arraycopy enclosing Instances 0 new Instances new Arg Index 0 1 0 size new Instances new Arg Index synth Local new Synthetic Argument Binding target Enclosing Type enclosing Instances new Instances System out println Adding synth arg for enclosing type new String enclosing Type readable Name to new String this readable Name if scope reference Compilation Unit is Propagating Inner Class Emulation this update Inner Emulation Dependents return synth Local  SyntheticArgumentBinding addSyntheticArgument ReferenceBinding targetEnclosingType SyntheticArgumentBinding synthLocal enclosingInstances synthLocal SyntheticArgumentBinding targetEnclosingType enclosingInstances SyntheticArgumentBinding synthLocal enclosingInstances newArgIndex enclosingInstances targetEnclosingType enclosingInstances enclosingType targetEnclosingType newArgIndex SyntheticArgumentBinding newInstances SyntheticArgumentBinding enclosingInstances newInstances newArgIndex newInstances newArgIndex synthLocal SyntheticArgumentBinding targetEnclosingType enclosingInstances newInstances enclosingType readableName readableName referenceCompilationUnit isPropagatingInnerClassEmulation updateInnerEmulationDependents synthLocal
public Synthetic Argument Binding add Synthetic Argument And Field Local Variable Binding actual Outer Local Variable Synthetic Argument Binding synth Local add Synthetic Argument actual Outer Local Variable if synth Local null return null if synth Local matching Field null synth Local matching Field add Synthetic Field actual Outer Local Variable return synth Local  SyntheticArgumentBinding addSyntheticArgumentAndField LocalVariableBinding actualOuterLocalVariable SyntheticArgumentBinding synthLocal addSyntheticArgument actualOuterLocalVariable synthLocal synthLocal matchingField synthLocal matchingField addSyntheticField actualOuterLocalVariable synthLocal
public Synthetic Argument Binding add Synthetic Argument And Field Reference Binding target Enclosing Type Synthetic Argument Binding synth Local add Synthetic Argument target Enclosing Type if synth Local null return null if synth Local matching Field null synth Local matching Field add Synthetic Field target Enclosing Type return synth Local  SyntheticArgumentBinding addSyntheticArgumentAndField ReferenceBinding targetEnclosingType SyntheticArgumentBinding synthLocal addSyntheticArgument targetEnclosingType synthLocal synthLocal matchingField synthLocal matchingField addSyntheticField targetEnclosingType synthLocal
Compute the resolved positions for all the synthetic arguments final public void compute Synthetic Argument Slot Sizes int slot Size 0 insert enclosing instances first followed by the outer Locals int enclosing Instances Count this enclosing Instances null 0 this enclosing Instances length for int i 0 i enclosing Instances Count i Synthetic Argument Binding argument this enclosing Instances i position the enclosing instance synthetic arg argument resolved Position slot Size 1 shift by 1 to leave room for aload0 this if slot Size 1 0xFF no more than 255 words of arguments this scope problem Reporter no More Available Space For Argument argument this scope reference Type if argument type Long Binding argument type Double Binding slot Size 2 else slot Size this enclosing Instances Slot Size slot Size slot Size 0 reset outer local are not positionned yet since will be appended to user arguments int outer Locals Count this outer Local Variables null 0 this outer Local Variables length for int i 0 i outer Locals Count i Synthetic Argument Binding argument this outer Local Variables i do NOT position the outerlocal synthetic arg yet since will be appended to user arguments if argument type Long Binding argument type Double Binding slot Size 2 else slot Size this outer Local Variables Slot Size slot Size  computeSyntheticArgumentSlotSizes slotSize outerLocals enclosingInstancesCount enclosingInstances enclosingInstances enclosingInstancesCount SyntheticArgumentBinding enclosingInstances resolvedPosition slotSize slotSize problemReporter noMoreAvailableSpaceForArgument referenceType LongBinding DoubleBinding slotSize slotSize enclosingInstancesSlotSize slotSize slotSize outerLocalsCount outerLocalVariables outerLocalVariables outerLocalsCount SyntheticArgumentBinding outerLocalVariables LongBinding DoubleBinding slotSize slotSize outerLocalVariablesSlotSize slotSize
Answer the receiver s enclosing type null if the receiver is a top level type public Reference Binding enclosing Type return enclosing Type  ReferenceBinding enclosingType enclosingType
public Synthetic Argument Binding get Synthetic Argument Local Variable Binding actual Outer Local Variable if outer Local Variables null return null is null if no outer local variables are known for int i outer Local Variables length i 0 if outer Local Variables i actual Outer Local Variable actual Outer Local Variable return outer Local Variables i return null  SyntheticArgumentBinding getSyntheticArgument LocalVariableBinding actualOuterLocalVariable outerLocalVariables outerLocalVariables outerLocalVariables actualOuterLocalVariable actualOuterLocalVariable outerLocalVariables
public Synthetic Argument Binding synthetic Enclosing Instances return enclosing Instances is null if no enclosing instances are required  SyntheticArgumentBinding syntheticEnclosingInstances enclosingInstances
public Reference Binding synthetic Enclosing Instance Types if enclosing Instances null return null int length enclosing Instances length Reference Binding types new Reference Binding length for int i 0 i length i types i Reference Binding enclosing Instances i type return types  ReferenceBinding syntheticEnclosingInstanceTypes enclosingInstances enclosingInstances ReferenceBinding ReferenceBinding ReferenceBinding enclosingInstances
public Synthetic Argument Binding synthetic Outer Local Variables return outer Local Variables is null if no outer locals are required  SyntheticArgumentBinding syntheticOuterLocalVariables outerLocalVariables
to be propagated to all dependent source types public void update Inner Emulation Dependents nothing to do in general only local types are doing anything  updateInnerEmulationDependents
public Synthetic Argument Binding get Synthetic Argument Reference Binding target Enclosing Type boolean only Exact Match if enclosing Instances null return null is null if no enclosing instances are known exact match for int i enclosing Instances length i 0 if enclosing Instances i type target Enclosing Type if enclosing Instances i actual Outer Local Variable null return enclosing Instances i type compatibility to handle cases such as class T class M class S extends T class N extends M need to use S as a default enclosing instance for the super constructor call in N if only Exact Match for int i enclosing Instances length i 0 if enclosing Instances i actual Outer Local Variable null if target Enclosing Type is Superclass Of Reference Binding enclosing Instances i type return enclosing Instances i return null  SyntheticArgumentBinding getSyntheticArgument ReferenceBinding targetEnclosingType onlyExactMatch enclosingInstances enclosingInstances enclosingInstances targetEnclosingType enclosingInstances actualOuterLocalVariable enclosingInstances onlyExactMatch enclosingInstances enclosingInstances actualOuterLocalVariable targetEnclosingType isSuperclassOf ReferenceBinding enclosingInstances enclosingInstances

Hashtable Of Type known Types Hashtable Of Package known Packages protected Package Binding for creating problem package  HashtableOfType knownTypes HashtableOfPackage knownPackages PackageBinding
public Package Binding char compound Name Package Binding parent Lookup Environment environment this compound Name compound Name this parent parent this environment environment this known Types null initialized if used class counts can be very large 300 600 this known Packages new Hashtable Of Package 3 sub package counts are typically 0 3  PackageBinding compoundName PackageBinding LookupEnvironment compoundName compoundName knownTypes knownPackages HashtableOfPackage
this known Packages new Hashtable Of Package 3 sub package counts are typically 0 3 public Package Binding char top Level Package Name Lookup Environment environment this new char top Level Package Name null environment  knownPackages HashtableOfPackage PackageBinding topLevelPackageName LookupEnvironment topLevelPackageName
public Package Binding Lookup Environment environment this Char Operation NO CHAR CHAR null environment  PackageBinding LookupEnvironment CharOperation NO_CHAR_CHAR
this Char Operation NO CHAR CHAR null environment private void add Not Found Package char simple Name known Packages put simple Name Lookup Environment The Not Found Package  CharOperation NO_CHAR_CHAR addNotFoundPackage simpleName knownPackages simpleName LookupEnvironment TheNotFoundPackage
private void add Not Found Type char simple Name if known Types null known Types new Hashtable Of Type 25 known Types put simple Name Lookup Environment The Not Found Type  addNotFoundType simpleName knownTypes knownTypes HashtableOfType knownTypes simpleName LookupEnvironment TheNotFoundType
known Types put simple Name Lookup Environment The Not Found Type void add Package Package Binding element known Packages put element compound Name element compound Name length 1 element  knownTypes simpleName LookupEnvironment TheNotFoundType addPackage PackageBinding knownPackages compoundName compoundName
void add Type Reference Binding element if known Types null known Types new Hashtable Of Type 25 known Types put element compound Name element compound Name length 1 element  addType ReferenceBinding knownTypes knownTypes HashtableOfType knownTypes compoundName compoundName
public final int binding Type return PACKAGE  bindingType
private Package Binding find Package char name if environment is Package this compound Name name return null char sub Pkg Compound Name Char Operation array Concat this compound Name name Package Binding sub Package Binding new Package Binding sub Pkg Compound Name this environment add Package sub Package Binding return sub Package Binding  PackageBinding findPackage isPackage compoundName subPkgCompoundName CharOperation arrayConcat compoundName PackageBinding subPackageBinding PackageBinding subPkgCompoundName addPackage subPackageBinding subPackageBinding
Package Binding get Package char name Package Binding binding get Package0 name if binding null if binding Lookup Environment The Not Found Package return null else return binding if binding find Package name null return binding not found so remember a problem package binding in the cache for future lookups add Not Found Package name return null  PackageBinding getPackage PackageBinding getPackage0 LookupEnvironment TheNotFoundPackage findPackage addNotFoundPackage
Package Binding get Package0 char name return known Packages get name  PackageBinding getPackage0 knownPackages
Reference Binding get Type char name Reference Binding binding get Type0 name if binding null if binding environment ask For Type this name null not found so remember a problem type binding in the cache for future lookups add Not Found Type name return null if binding Lookup Environment The Not Found Type return null if binding instanceof Unresolved Reference Binding binding Unresolved Reference Binding binding resolve environment if binding is Nested Type return new Problem Reference Binding name Internal Name Provided return binding  ReferenceBinding getType ReferenceBinding getType0 askForType addNotFoundType LookupEnvironment TheNotFoundType UnresolvedReferenceBinding UnresolvedReferenceBinding isNestedType ProblemReferenceBinding InternalNameProvided
Reference Binding get Type0 char name if known Types null return null return known Types get name  ReferenceBinding getType0 knownTypes knownTypes
public Binding get Type Or Package char name Reference Binding type Binding get Type0 name if type Binding null type Binding Lookup Environment The Not Found Type if type Binding instanceof Unresolved Reference Binding type Binding Unresolved Reference Binding type Binding resolve environment if type Binding is Nested Type return new Problem Reference Binding name Internal Name Provided return type Binding Package Binding package Binding get Package0 name if package Binding null package Binding Lookup Environment The Not Found Package return package Binding if type Binding null have not looked for it before if type Binding environment ask For Type this name null if type Binding is Nested Type return new Problem Reference Binding name Internal Name Provided return type Binding Since name could not be found add a problem binding to the collections so it will be reported as an error next time add Not Found Type name if package Binding null have not looked for it before if package Binding find Package name null return package Binding add Not Found Package name return null  getTypeOrPackage ReferenceBinding typeBinding getType0 typeBinding typeBinding LookupEnvironment TheNotFoundType typeBinding UnresolvedReferenceBinding typeBinding UnresolvedReferenceBinding typeBinding typeBinding isNestedType ProblemReferenceBinding InternalNameProvided typeBinding PackageBinding packageBinding getPackage0 packageBinding packageBinding LookupEnvironment TheNotFoundPackage packageBinding typeBinding typeBinding askForType typeBinding isNestedType ProblemReferenceBinding InternalNameProvided typeBinding addNotFoundType packageBinding packageBinding findPackage packageBinding addNotFoundPackage
return null public char readable Name java lang return Char Operation concat With compound Name  readableName CharOperation concatWith compoundName
public String to String if compound Name Char Operation NO CHAR CHAR return The Default Package NON NLS 1 else return package compound Name null Char Operation to String compound Name UNNAMED NON NLS 1 NON NLS 2  toString compoundName CharOperation NO_CHAR_CHAR compoundName CharOperation toString compoundName

NOTE must only answer the subset of the name related to the problem public Problem Binding char compound Name int problem Id this Char Operation concat With compound Name problem Id  ProblemBinding compoundName problemId CharOperation concatWith compoundName problemId
NOTE must only answer the subset of the name related to the problem public Problem Binding char compound Name Reference Binding search Type int problem Id this Char Operation concat With compound Name search Type problem Id  ProblemBinding compoundName ReferenceBinding searchType problemId CharOperation concatWith compoundName searchType problemId
this Char Operation concat With compound Name search Type problem Id Problem Binding char name int problem Id this name name this problem Id problem Id  CharOperation concatWith compoundName searchType problemId ProblemBinding problemId problemId problemId
this problem Id problem Id Problem Binding char name Reference Binding search Type int problem Id this name problem Id this search Type search Type  problemId problemId ProblemBinding ReferenceBinding searchType problemId problemId searchType searchType
public final int binding Type return VARIABLE TYPE  bindingType
public final int problem Id return problem Id  problemId problemId
return problem Id public char readable Name return name  problemId readableName

NOTE must only answer the subset of the name related to the problem public Problem Field Binding Reference Binding declaring Class char compound Name int problem Id this null declaring Class Char Operation concat With compound Name problem Id  ProblemFieldBinding ReferenceBinding declaringClass compoundName problemId declaringClass CharOperation concatWith compoundName problemId
this null declaring Class Char Operation concat With compound Name problem Id public Problem Field Binding Reference Binding declaring Class char name int problem Id this null declaring Class name problem Id  declaringClass CharOperation concatWith compoundName problemId ProblemFieldBinding ReferenceBinding declaringClass problemId declaringClass problemId
public Problem Field Binding Field Binding closest Match Reference Binding declaring Class char name int problem Id this closest Match closest Match this declaring Class declaring Class this name name this problem Id problem Id  ProblemFieldBinding FieldBinding closestMatch ReferenceBinding declaringClass problemId closestMatch closestMatch declaringClass declaringClass problemId problemId
public final int problem Id return problem Id  problemId problemId

public Method Binding closest Match public Problem Method Binding char selector Type Binding args int problem Id this selector selector this parameters args null args length 0 No Parameters args this problem Id problem Id  MethodBinding closestMatch ProblemMethodBinding TypeBinding problemId NoParameters problemId problemId
public Problem Method Binding char selector Type Binding args Reference Binding declaring Class int problem Id this selector selector this parameters args null args length 0 No Parameters args this declaring Class declaring Class this problem Id problem Id  ProblemMethodBinding TypeBinding ReferenceBinding declaringClass problemId NoParameters declaringClass declaringClass problemId problemId
public Problem Method Binding Method Binding closest Match char selector Type Binding args int problem Id this selector args problem Id this closest Match closest Match if closest Match null this declaring Class closest Match declaring Class  ProblemMethodBinding MethodBinding closestMatch TypeBinding problemId problemId closestMatch closestMatch closestMatch declaringClass closestMatch declaringClass
public final int problem Id return problem Id  problemId problemId

NOTE must only answer the subset of the name related to the problem Problem Package Binding char compound Name int problem Id this compound Name compound Name this problem Id problem Id  ProblemPackageBinding compoundName problemId compoundName compoundName problemId problemId
this problem Id problem Id Problem Package Binding char name int problem Id this new char name problem Id  problemId problemId ProblemPackageBinding problemId problemId
public final int problem Id return problem Id  problemId problemId

NOTE must only answer the subset of the name related to the problem public Problem Reference Binding char compound Name int problem Id this compound Name null problem Id  ProblemReferenceBinding compoundName problemId compoundName problemId
this compound Name null problem Id public Problem Reference Binding char name int problem Id this new char name null problem Id  compoundName problemId ProblemReferenceBinding problemId problemId
public Problem Reference Binding char compound Name Reference Binding original int problem Id this compound Name compound Name this original original this problem Id problem Id  ProblemReferenceBinding compoundName ReferenceBinding problemId compoundName compoundName problemId problemId
this problem Id problem Id public Problem Reference Binding char name Reference Binding original int problem Id this new char name original problem Id  problemId problemId ProblemReferenceBinding ReferenceBinding problemId problemId
public final int problem Id return problem Id  problemId problemId
see org eclipse jdt internal compiler lookup Reference Binding short Readable Name public char short Readable Name return readable Name  ReferenceBinding shortReadableName shortReadableName readableName

char signature public Field Binding available Fields return fields  FieldBinding availableFields
public Method Binding available Methods return methods  MethodBinding availableMethods
public boolean can Be Instantiated return is Abstract is Interface  canBeInstantiated isAbstract isInterface
public final boolean can Be Seen By Package Binding invocation Package if is Public return true if is Private return false is Protected or is Default return invocation Package f Package  canBeSeenBy PackageBinding invocationPackage isPublic isPrivate isProtected isDefault invocationPackage fPackage
public final boolean can Be Seen By Reference Binding receiver Type Source Type Binding invocation Type if is Public return true if invocation Type this invocation Type receiver Type return true if is Protected answer true if the invocation Type is the declaring Class or they are in the same package OR the invocation Type is a subclass of the declaring Class AND the invocation Type is the invocation Type or its subclass OR the type is a static method accessed directly through a type OR previous assertions are true for one of the enclosing type if invocation Type this return true if invocation Type f Package f Package return true Reference Binding current Type invocation Type Reference Binding declaring Class enclosing Type protected types always have an enclosing one if declaring Class null return false could be null if incorrect top level protected type int depth 0 do if declaring Class invocation Type return true if declaring Class is Superclass Of current Type return true depth current Type current Type enclosing Type while current Type null return false if is Private answer true if the receiver Type is the receiver or its enclosing Type AND the invocation Type and the receiver have a common enclosing Type if receiver Type this receiver Type enclosing Type return false if invocation Type this Reference Binding outer Invocation Type invocation Type Reference Binding temp outer Invocation Type enclosing Type while temp null outer Invocation Type temp temp temp enclosing Type Reference Binding outer Declaring Class this temp outer Declaring Class enclosing Type while temp null outer Declaring Class temp temp temp enclosing Type if outer Invocation Type outer Declaring Class return false return true is Default if invocation Type f Package f Package return false Reference Binding type receiver Type Reference Binding declaring Class enclosing Type null this enclosing Type do if declaring Class type return true if f Package type f Package return false while type type superclass null return false  canBeSeenBy ReferenceBinding receiverType SourceTypeBinding invocationType isPublic invocationType invocationType receiverType isProtected invocationType declaringClass invocationType declaringClass invocationType invocationType invocationType invocationType fPackage fPackage ReferenceBinding currentType invocationType ReferenceBinding declaringClass enclosingType declaringClass declaringClass invocationType declaringClass isSuperclassOf currentType currentType currentType enclosingType currentType isPrivate receiverType enclosingType invocationType enclosingType receiverType receiverType enclosingType invocationType ReferenceBinding outerInvocationType invocationType ReferenceBinding outerInvocationType enclosingType outerInvocationType enclosingType ReferenceBinding outerDeclaringClass outerDeclaringClass enclosingType outerDeclaringClass enclosingType outerInvocationType outerDeclaringClass isDefault invocationType fPackage fPackage ReferenceBinding receiverType ReferenceBinding declaringClass enclosingType enclosingType declaringClass fPackage fPackage
public final boolean can Be Seen By Scope scope if is Public return true if scope kind Scope COMPILATION UNIT SCOPE return this can Be Seen By Compilation Unit Scope scope f Package Source Type Binding invocation Type scope enclosing Source Type if invocation Type this return true if is Protected answer true if the invocation Type is the declaring Class or they are in the same package OR the invocation Type is a subclass of the declaring Class AND the invocation Type is the invocation Type or its subclass OR the type is a static method accessed directly through a type OR previous assertions are true for one of the enclosing type if invocation Type f Package f Package return true Reference Binding current Type invocation Type Reference Binding declaring Class enclosing Type protected types always have an enclosing one if declaring Class null return false could be null if incorrect top level protected type int depth 0 do if declaring Class invocation Type return true if declaring Class is Superclass Of current Type return true depth current Type current Type enclosing Type while current Type null return false if is Private answer true if the receiver and the invocation Type have a common enclosing Type already know they are not the identical type Reference Binding outer Invocation Type invocation Type Reference Binding temp outer Invocation Type enclosing Type while temp null outer Invocation Type temp temp temp enclosing Type Reference Binding outer Declaring Class this temp outer Declaring Class enclosing Type while temp null outer Declaring Class temp temp temp enclosing Type return outer Invocation Type outer Declaring Class is Default return invocation Type f Package f Package  canBeSeenBy isPublic COMPILATION_UNIT_SCOPE canBeSeenBy CompilationUnitScope fPackage SourceTypeBinding invocationType enclosingSourceType invocationType isProtected invocationType declaringClass invocationType declaringClass invocationType invocationType invocationType fPackage fPackage ReferenceBinding currentType invocationType ReferenceBinding declaringClass enclosingType declaringClass declaringClass invocationType declaringClass isSuperclassOf currentType currentType currentType enclosingType currentType isPrivate invocationType enclosingType ReferenceBinding outerInvocationType invocationType ReferenceBinding outerInvocationType enclosingType outerInvocationType enclosingType ReferenceBinding outerDeclaringClass outerDeclaringClass enclosingType outerDeclaringClass enclosingType outerInvocationType outerDeclaringClass isDefault invocationType fPackage fPackage
public void compute Id if compound Name length 3 if compound Name length 4 Char Operation equals JAVA LANG REFLECT CONSTRUCTOR compound Name id T JavaLangReflectConstructor return if Char Operation equals JAVA compound Name 0 return remaining types MUST be in java if Char Operation equals LANG compound Name 1 if Char Operation equals JAVA IO PRINTSTREAM compound Name id T JavaIoPrintStream else if Char Operation equals JAVA IO SERIALIZABLE compound Name id T JavaIoSerializable return remaining types MUST be in java lang char type Name compound Name 2 if type Name length 0 return just to be safe switch type Name 0 case A if Char Operation equals type Name JAVA LANG ASSERTIONERROR 2 id T JavaLangAssertionError return case B if Char Operation equals type Name JAVA LANG BOOLEAN 2 id T JavaLangBoolean else if Char Operation equals type Name JAVA LANG BYTE 2 id T JavaLangByte return case C if Char Operation equals type Name JAVA LANG CHARACTER 2 id T JavaLangCharacter else if Char Operation equals type Name JAVA LANG CLASS 2 id T JavaLangClass else if Char Operation equals type Name JAVA LANG CLASSNOTFOUNDEXCEPTION 2 id T JavaLangClassNotFoundException else if Char Operation equals type Name JAVA LANG CLONEABLE 2 id T JavaLangCloneable return case D if Char Operation equals type Name JAVA LANG DOUBLE 2 id T JavaLangDouble return case E if Char Operation equals type Name JAVA LANG ERROR 2 id T JavaLangError else if Char Operation equals type Name JAVA LANG EXCEPTION 2 id T JavaLangException return case F if Char Operation equals type Name JAVA LANG FLOAT 2 id T JavaLangFloat return case I if Char Operation equals type Name JAVA LANG INTEGER 2 id T JavaLangInteger return case L if Char Operation equals type Name JAVA LANG LONG 2 id T JavaLangLong return case N if Char Operation equals type Name JAVA LANG NOCLASSDEFERROR 2 id T JavaLangNoClassDefError return case O if Char Operation equals type Name JAVA LANG OBJECT 2 id T JavaLangObject return case S if Char Operation equals type Name JAVA LANG STRING 2 id T JavaLangString else if Char Operation equals type Name JAVA LANG STRINGBUFFER 2 id T JavaLangStringBuffer else if Char Operation equals type Name JAVA LANG SYSTEM 2 id T JavaLangSystem else if Char Operation equals type Name JAVA LANG SHORT 2 id T JavaLangShort return case T if Char Operation equals type Name JAVA LANG THROWABLE 2 id T JavaLangThrowable return case V if Char Operation equals type Name JAVA LANG VOID 2 id T JavaLangVoid return  computeId compoundName compoundName CharOperation JAVA_LANG_REFLECT_CONSTRUCTOR compoundName T_JavaLangReflectConstructor CharOperation compoundName CharOperation compoundName CharOperation JAVA_IO_PRINTSTREAM compoundName T_JavaIoPrintStream CharOperation JAVA_IO_SERIALIZABLE compoundName T_JavaIoSerializable typeName compoundName typeName typeName CharOperation typeName JAVA_LANG_ASSERTIONERROR T_JavaLangAssertionError CharOperation typeName JAVA_LANG_BOOLEAN T_JavaLangBoolean CharOperation typeName JAVA_LANG_BYTE T_JavaLangByte CharOperation typeName JAVA_LANG_CHARACTER T_JavaLangCharacter CharOperation typeName JAVA_LANG_CLASS T_JavaLangClass CharOperation typeName JAVA_LANG_CLASSNOTFOUNDEXCEPTION T_JavaLangClassNotFoundException CharOperation typeName JAVA_LANG_CLONEABLE T_JavaLangCloneable CharOperation typeName JAVA_LANG_DOUBLE T_JavaLangDouble CharOperation typeName JAVA_LANG_ERROR T_JavaLangError CharOperation typeName JAVA_LANG_EXCEPTION T_JavaLangException CharOperation typeName JAVA_LANG_FLOAT T_JavaLangFloat CharOperation typeName JAVA_LANG_INTEGER T_JavaLangInteger CharOperation typeName JAVA_LANG_LONG T_JavaLangLong CharOperation typeName JAVA_LANG_NOCLASSDEFERROR T_JavaLangNoClassDefError CharOperation typeName JAVA_LANG_OBJECT T_JavaLangObject CharOperation typeName JAVA_LANG_STRING T_JavaLangString CharOperation typeName JAVA_LANG_STRINGBUFFER T_JavaLangStringBuffer CharOperation typeName JAVA_LANG_SYSTEM T_JavaLangSystem CharOperation typeName JAVA_LANG_SHORT T_JavaLangShort CharOperation typeName JAVA_LANG_THROWABLE T_JavaLangThrowable CharOperation typeName JAVA_LANG_VOID T_JavaLangVoid
public char constant Pool Name java lang Object if constant Pool Name null return constant Pool Name return constant Pool Name Char Operation concat With compound Name  constantPoolName constantPoolName constantPoolName constantPoolName CharOperation concatWith compoundName
return constant Pool Name Char Operation concat With compound Name String debug Name return compound Name null new String readable Name UNNAMED TYPE NON NLS 1  constantPoolName CharOperation concatWith compoundName debugName compoundName readableName
public final int depth int depth 0 Reference Binding current this while current current enclosing Type null depth return depth  ReferenceBinding enclosingType
public Reference Binding enclosing Type return null  ReferenceBinding enclosingType
public final Reference Binding enclosing Type At int relative Depth Reference Binding current this while relative Depth 0 current null current current enclosing Type return current  ReferenceBinding enclosingTypeAt relativeDepth ReferenceBinding relativeDepth enclosingType
return current public int field Count return fields length  fieldCount
return fields length public Field Binding fields return No Fields  FieldBinding NoFields
return No Fields public final int get Access Flags return modifiers Acc Just Flag  NoFields getAccessFlags AccJustFlag
return modifiers Acc Just Flag public Method Binding get Exact Constructor Type Binding argument Types return null  AccJustFlag MethodBinding getExactConstructor TypeBinding argumentTypes
return null public Method Binding get Exact Method char selector Type Binding argument Types return null  MethodBinding getExactMethod TypeBinding argumentTypes
return null public Field Binding get Field char field Name boolean need Resolve return null  FieldBinding getField fieldName needResolve
Answer the file name which defines the type The path part optional must be separated from the actual file proper name by a java io File separator The proper file name includes the suffix extension e g java e g c com ibm compiler java api Compiler java public char get File Name return file Name  getFileName fileName
public Reference Binding get Member Type char type Name Reference Binding member Types member Types for int i member Types length i 0 if Char Operation equals member Types i source Name type Name return member Types i return null  ReferenceBinding getMemberType typeName ReferenceBinding memberTypes memberTypes memberTypes CharOperation memberTypes sourceName typeName memberTypes
return null public Method Binding get Methods char selector return No Methods  MethodBinding getMethods NoMethods
return No Methods public Package Binding get Package return f Package  NoMethods PackageBinding getPackage fPackage
return f Package public boolean has Member Types return false  fPackage hasMemberTypes
public boolean implements Interface Reference Binding an Interface boolean search Hierarchy if this an Interface return true Reference Binding interfaces To Visit new Reference Binding 5 int last Position 1 Reference Binding current Type this do Reference Binding its Interfaces current Type super Interfaces if its Interfaces No Super Interfaces if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces while search Hierarchy current Type current Type superclass null for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j if current Type interfaces j an Interface return true Reference Binding its Interfaces current Type super Interfaces if its Interfaces No Super Interfaces if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces return false  implementsInterface ReferenceBinding anInterface searchHierarchy anInterface ReferenceBinding interfacesToVisit ReferenceBinding lastPosition ReferenceBinding currentType ReferenceBinding itsInterfaces currentType superInterfaces itsInterfaces NoSuperInterfaces lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces searchHierarchy currentType currentType lastPosition ReferenceBinding interfacesToVisit currentType anInterface ReferenceBinding itsInterfaces currentType superInterfaces itsInterfaces NoSuperInterfaces lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces
boolean implements Method Method Binding method Reference Binding type this while type null Method Binding methods type get Methods method selector for int i methods length i 0 if methods i are Parameters Equal method return true type type superclass return false  implementsMethod MethodBinding ReferenceBinding MethodBinding getMethods areParametersEqual
public final boolean is Abstract return modifiers Acc Abstract 0  isAbstract AccAbstract
return modifiers Acc Abstract 0 public final boolean is Anonymous Type return tag Bits Is Anonymous Type 0  AccAbstract isAnonymousType tagBits IsAnonymousType
return tag Bits Is Anonymous Type 0 public final boolean is Binary Binding return tag Bits Is Binary Binding 0  tagBits IsAnonymousType isBinaryBinding tagBits IsBinaryBinding
return tag Bits Is Binary Binding 0 public final boolean is Class return modifiers Acc Interface 0  tagBits IsBinaryBinding isClass AccInterface
public boolean is Compatible With Type Binding right if right this return true if right id T Object return true if right instanceof Reference Binding return false Reference Binding reference Binding Reference Binding right if reference Binding is Interface return implements Interface reference Binding true if is Interface Explicit conversion from an interface to a class is not allowed return false return reference Binding is Superclass Of this  isCompatibleWith TypeBinding T_Object ReferenceBinding ReferenceBinding referenceBinding ReferenceBinding referenceBinding isInterface implementsInterface referenceBinding isInterface referenceBinding isSuperclassOf
public final boolean is Default return modifiers Acc Public Acc Protected Acc Private 0  isDefault AccPublic AccProtected AccPrivate
public final boolean is Deprecated return modifiers Acc Deprecated 0  isDeprecated AccDeprecated
public final boolean is Final return modifiers Acc Final 0  isFinal AccFinal
return modifiers Acc Final 0 public final boolean is Interface return modifiers Acc Interface 0  AccFinal isInterface AccInterface
return modifiers Acc Interface 0 public final boolean is Local Type return tag Bits Is Local Type 0  AccInterface isLocalType tagBits IsLocalType
return tag Bits Is Local Type 0 public final boolean is Member Type return tag Bits Is Member Type 0  tagBits IsLocalType isMemberType tagBits IsMemberType
return tag Bits Is Member Type 0 public final boolean is Nested Type return tag Bits Is Nested Type 0  tagBits IsMemberType isNestedType tagBits IsNestedType
public final boolean is Private return modifiers Acc Private 0  isPrivate AccPrivate
public final boolean is Private Used return modifiers Acc Private Used 0  isPrivateUsed AccPrivateUsed
public final boolean is Protected return modifiers Acc Protected 0  isProtected AccProtected
public final boolean is Public return modifiers Acc Public 0  isPublic AccPublic
public final boolean is Static return modifiers Acc Static Acc Interface 0 tag Bits Is Nested Type 0  isStatic AccStatic AccInterface tagBits IsNestedType
public final boolean is Strictfp return modifiers Acc Strictfp 0  isStrictfp AccStrictfp
public boolean is Superclass Of Reference Binding type do if this type type superclass return true while type null return false  isSuperclassOf ReferenceBinding
public final boolean is Viewed As Deprecated return modifiers Acc Deprecated 0 modifiers Acc Deprecated Implicitly 0  isViewedAsDeprecated AccDeprecated AccDeprecatedImplicitly
modifiers Acc Deprecated Implicitly 0 public Reference Binding member Types return No Member Types  AccDeprecatedImplicitly ReferenceBinding memberTypes NoMemberTypes
return No Member Types public Method Binding methods return No Methods  NoMemberTypes MethodBinding NoMethods
Answer the source name for the type In the case of member types as the qualified name from its top level type For example for a member type N defined inside M A A M N public char qualified Source Name if is Member Type return Char Operation concat enclosing Type qualified Source Name source Name return source Name  qualifiedSourceName isMemberType CharOperation enclosingType qualifiedSourceName sourceName sourceName
public char readable Name java lang Object if is Member Type return Char Operation concat enclosing Type readable Name source Name return Char Operation concat With compound Name  readableName isMemberType CharOperation enclosingType readableName sourceName CharOperation concatWith compoundName
public char short Readable Name Object if is Member Type return Char Operation concat enclosing Type short Readable Name source Name return source Name  shortReadableName isMemberType CharOperation enclosingType shortReadableName sourceName sourceName
public char signature Ljava lang Object if signature null return signature return signature Char Operation concat L constant Pool Name  CharOperation constantPoolName
return signature Char Operation concat L constant Pool Name public char source Name return source Name  CharOperation constantPoolName sourceName sourceName
return source Name public Reference Binding superclass return null  sourceName ReferenceBinding
return null public Reference Binding super Interfaces return No Super Interfaces  ReferenceBinding superInterfaces NoSuperInterfaces
public Reference Binding synthetic Enclosing Instance Types if is Static return null Reference Binding enclosing Type enclosing Type if enclosing Type null return null return new Reference Binding enclosing Type  ReferenceBinding syntheticEnclosingInstanceTypes isStatic ReferenceBinding enclosingType enclosingType enclosingType ReferenceBinding enclosingType
return new Reference Binding enclosing Type public Synthetic Argument Binding synthetic Outer Local Variables return null is null if no enclosing instances are required  ReferenceBinding enclosingType SyntheticArgumentBinding syntheticOuterLocalVariables
return null is null if no enclosing instances are required Method Binding un Resolved Methods for the Method Verifier so it doesn t resolve types return methods  MethodBinding unResolvedMethods MethodVerifier

public Scope parent protected Scope int kind Scope parent this kind kind this parent parent 
public static int compare Types Type Binding left Type Binding right if left is Compatible With right return Equal Or More Specific if right is Compatible With left return More Generic return Not Related  compareTypes TypeBinding TypeBinding isCompatibleWith EqualOrMoreSpecific isCompatibleWith MoreGeneric NotRelated
Internal use only protected final boolean are Parameters Assignable Type Binding parameters Type Binding arguments if parameters arguments return true int length parameters length if length arguments length return false for int i 0 i length i if parameters i arguments i if arguments i is Compatible With parameters i return false return true  areParametersAssignable TypeBinding TypeBinding isCompatibleWith
public final Class Scope class Scope Scope scope this do if scope instanceof Class Scope return Class Scope scope scope scope parent while scope null return null  ClassScope classScope ClassScope ClassScope
public int compare Unchecked Exception Reference Binding type int comparison compare Types type get Java Lang Runtime Exception if comparison 0 return comparison return compare Types type get Java Lang Error  compareUncheckedException ReferenceBinding compareTypes getJavaLangRuntimeException compareTypes getJavaLangError
public final Compilation Unit Scope compilation Unit Scope Scope last Scope null Scope scope this do last Scope scope scope scope parent while scope null return Compilation Unit Scope last Scope  CompilationUnitScope compilationUnitScope lastScope lastScope CompilationUnitScope lastScope
public Array Binding create Array Type Binding type int dimension if type is Valid Binding return new Array Binding type dimension return environment create Array Type type dimension  ArrayBinding createArray TypeBinding isValidBinding ArrayBinding createArrayType
public final Class Scope enclosing Class Scope Scope scope this while scope scope parent null if scope instanceof Class Scope return Class Scope scope return null may answer null if no type around  ClassScope enclosingClassScope ClassScope ClassScope
public final Method Scope enclosing Method Scope Scope scope this while scope scope parent null if scope instanceof Method Scope return Method Scope scope return null may answer null if no method around  MethodScope enclosingMethodScope MethodScope MethodScope
public final Source Type Binding enclosing Source Type Scope scope this do if scope instanceof Class Scope return Class Scope scope reference Context binding scope scope parent while scope null return null  SourceTypeBinding enclosingSourceType ClassScope ClassScope referenceContext
public final Lookup Environment environment Scope scope unit Scope this while scope unit Scope parent null unit Scope scope return Compilation Unit Scope unit Scope environment  LookupEnvironment unitScope unitScope unitScope CompilationUnitScope unitScope
protected void fault In Receiver Type Type Binding type if type is Array Type type Array Binding type leaf Component Type check on Begin bit so as to be resilient with potential illformed binaries containing cycles 67769 if type instanceof Binary Type Binding type tag Bits Begin Hierarchy Check 0 type tag Bits Begin Hierarchy Check fault in the hierarchy of the type now so we can detect missing types instead of in store Dependency Info Binary Type Binding binary Type Binary Type Binding type Reference Binding enclosing Type binary Type enclosing Type if enclosing Type null fault In Receiver Type enclosing Type Reference Binding superclass binary Type superclass if superclass null fault In Receiver Type superclass Reference Binding interfaces binary Type super Interfaces for int i 0 l interfaces length i l i fault In Receiver Type interfaces i type tag Bits End Hierarchy Check  faultInReceiverType TypeBinding isArrayType ArrayBinding leafComponentType BinaryTypeBinding tagBits BeginHierarchyCheck tagBits BeginHierarchyCheck storeDependencyInfo BinaryTypeBinding binaryType BinaryTypeBinding ReferenceBinding enclosingType binaryType enclosingType enclosingType faultInReceiverType enclosingType ReferenceBinding binaryType faultInReceiverType ReferenceBinding binaryType superInterfaces faultInReceiverType tagBits EndHierarchyCheck
abstract method lookup lookup since maybe missing default abstract methods public Method Binding find Default Abstract Method Reference Binding receiver Type char selector Type Binding argument Types Invocation Site invocation Site Reference Binding class Hierarchy Start Method Binding matching Method Object Vector found int start Found Size found size Reference Binding current Type class Hierarchy Start while current Type null matching Method find Method In Super Interfaces current Type selector found matching Method current Type current Type superclass int found Size found size if found Size start Found Size if matching Method null compilation Unit Scope record Type References matching Method thrown Exceptions return matching Method maybe null Method Binding candidates new Method Binding found Size start Found Size int candidates Count 0 argument type compatibility check for int i start Found Size i found Size i Method Binding method Binding Method Binding found element At i if are Parameters Assignable method Binding parameters argument Types candidates candidates Count method Binding if candidates Count 1 compilation Unit Scope record Type References candidates 0 thrown Exceptions return candidates 0 if candidates Count 0 try to find a close match when the parameter order is wrong or missing some parameters int arg Length argument Types length next Method for int i 0 i found Size i Method Binding method Binding Method Binding found element At i Type Binding params method Binding parameters int param Length params length next Arg for int a 0 a arg Length a Type Binding arg argument Types a for int p 0 p param Length p if params p arg continue next Arg continue next Method return method Binding return Method Binding found element At 0 no good match so just use the first one found no need to check for visibility interface methods are public return most Specific Interface Method Binding candidates candidates Count  MethodBinding findDefaultAbstractMethod ReferenceBinding receiverType TypeBinding argumentTypes InvocationSite invocationSite ReferenceBinding classHierarchyStart MethodBinding matchingMethod ObjectVector startFoundSize ReferenceBinding currentType classHierarchyStart currentType matchingMethod findMethodInSuperInterfaces currentType matchingMethod currentType currentType foundSize foundSize startFoundSize matchingMethod compilationUnitScope recordTypeReferences matchingMethod thrownExceptions matchingMethod MethodBinding MethodBinding foundSize startFoundSize candidatesCount startFoundSize foundSize MethodBinding methodBinding MethodBinding elementAt areParametersAssignable methodBinding argumentTypes candidatesCount methodBinding candidatesCount compilationUnitScope recordTypeReferences thrownExceptions candidatesCount argLength argumentTypes nextMethod foundSize MethodBinding methodBinding MethodBinding elementAt TypeBinding methodBinding paramLength nextArg argLength TypeBinding argumentTypes paramLength nextArg nextMethod methodBinding MethodBinding elementAt mostSpecificInterfaceMethodBinding candidatesCount
Internal use only public Reference Binding find Direct Member Type char type Name Reference Binding enclosing Type if enclosing Type tag Bits Has No Member Types 0 return null know it has no member types nor inherited member types Source Type Binding enclosing Source Type enclosing Source Type compilation Unit Scope record Reference enclosing Type compound Name type Name Reference Binding member Type enclosing Type get Member Type type Name if member Type null compilation Unit Scope record Type Reference member Type to record supertypes if enclosing Source Type null member Type can Be Seen By get Current Package member Type can Be Seen By enclosing Type enclosing Source Type return member Type return new Problem Reference Binding type Name member Type Not Visible return null  ReferenceBinding findDirectMemberType typeName ReferenceBinding enclosingType enclosingType tagBits HasNoMemberTypes SourceTypeBinding enclosingSourceType enclosingSourceType compilationUnitScope recordReference enclosingType compoundName typeName ReferenceBinding memberType enclosingType getMemberType typeName memberType compilationUnitScope recordTypeReference memberType enclosingSourceType memberType canBeSeenBy getCurrentPackage memberType canBeSeenBy enclosingType enclosingSourceType memberType ProblemReferenceBinding typeName memberType NotVisible
Internal use only public Method Binding find Exact Method Reference Binding receiver Type char selector Type Binding argument Types Invocation Site invocation Site fault In Receiver Type receiver Type compilation Unit Scope record Type Reference receiver Type compilation Unit Scope record Type References argument Types Method Binding exact Method receiver Type get Exact Method selector argument Types if exact Method null compilation Unit Scope record Type References exact Method thrown Exceptions if receiver Type is Interface exact Method can Be Seen By receiver Type invocation Site this return exact Method return null  MethodBinding findExactMethod ReferenceBinding receiverType TypeBinding argumentTypes InvocationSite invocationSite faultInReceiverType receiverType compilationUnitScope recordTypeReference receiverType compilationUnitScope recordTypeReferences argumentTypes MethodBinding exactMethod receiverType getExactMethod argumentTypes exactMethod compilationUnitScope recordTypeReferences exactMethod thrownExceptions receiverType isInterface exactMethod canBeSeenBy receiverType invocationSite exactMethod
public Field Binding find Field Type Binding receiver Type char field Name Invocation Site invocation Site boolean need Resolve if receiver Type is Base Type return null if receiver Type is Array Type Type Binding leaf Type receiver Type leaf Component Type if leaf Type instanceof Reference Binding if Reference Binding leaf Type can Be Seen By this return new Problem Field Binding Reference Binding leaf Type field Name Receiver Type Not Visible if Char Operation equals field Name LENGTH return Array Binding Array Length return null fault In Receiver Type receiver Type compilation Unit Scope record Type Reference receiver Type Reference Binding current Type Reference Binding receiver Type if current Type can Be Seen By this return new Problem Field Binding current Type field Name Receiver Type Not Visible Field Binding field current Type get Field field Name true resolve if field null if field can Be Seen By current Type invocation Site this return field return new Problem Field Binding field closest match field declaring Class field Name Not Visible collect all superinterfaces of receiver Type until the field is found in a supertype Reference Binding interfaces To Visit null int last Position 1 Field Binding visible Field null boolean keep Looking true boolean not Visible false we could hold onto the not visible field for extra error reporting while keep Looking Reference Binding its Interfaces current Type super Interfaces if its Interfaces No Super Interfaces if interfaces To Visit null interfaces To Visit new Reference Binding 5 if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces if current Type current Type superclass null break if field current Type get Field field Name need Resolve null keep Looking false if field can Be Seen By receiver Type invocation Site this if visible Field null visible Field field else return new Problem Field Binding visible Field closest match visible Field declaring Class field Name Ambiguous else not Visible true walk all visible interfaces to find ambiguous references if interfaces To Visit null Problem Field Binding ambiguous null done for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j Reference Binding an Interface interfaces j if an Interface tag Bits Interface Visited 0 if interface as not already been visited an Interface tag Bits Interface Visited if field an Interface get Field field Name true resolve null if visible Field null visible Field field else ambiguous new Problem Field Binding visible Field closest match visible Field declaring Class field Name Ambiguous break done else Reference Binding its Interfaces an Interface super Interfaces if its Interfaces No Super Interfaces if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces bit reinitialization for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j interfaces j tag Bits Interface Visited if ambiguous null return ambiguous if visible Field null return visible Field if not Visible return new Problem Field Binding current Type field Name Not Visible return null  FieldBinding findField TypeBinding receiverType fieldName InvocationSite invocationSite needResolve receiverType isBaseType receiverType isArrayType TypeBinding leafType receiverType leafComponentType leafType ReferenceBinding ReferenceBinding leafType canBeSeenBy ProblemFieldBinding ReferenceBinding leafType fieldName ReceiverTypeNotVisible CharOperation fieldName ArrayBinding ArrayLength faultInReceiverType receiverType compilationUnitScope recordTypeReference receiverType ReferenceBinding currentType ReferenceBinding receiverType currentType canBeSeenBy ProblemFieldBinding currentType fieldName ReceiverTypeNotVisible FieldBinding currentType getField fieldName canBeSeenBy currentType invocationSite ProblemFieldBinding declaringClass fieldName NotVisible receiverType ReferenceBinding interfacesToVisit lastPosition FieldBinding visibleField keepLooking notVisible keepLooking ReferenceBinding itsInterfaces currentType superInterfaces itsInterfaces NoSuperInterfaces interfacesToVisit interfacesToVisit ReferenceBinding lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces currentType currentType currentType getField fieldName needResolve keepLooking canBeSeenBy receiverType invocationSite visibleField visibleField ProblemFieldBinding visibleField visibleField declaringClass fieldName notVisible interfacesToVisit ProblemFieldBinding lastPosition ReferenceBinding interfacesToVisit ReferenceBinding anInterface anInterface tagBits InterfaceVisited anInterface tagBits InterfaceVisited anInterface getField fieldName visibleField visibleField ProblemFieldBinding visibleField visibleField declaringClass fieldName ReferenceBinding itsInterfaces anInterface superInterfaces itsInterfaces NoSuperInterfaces lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces lastPosition ReferenceBinding interfacesToVisit tagBits InterfaceVisited visibleField visibleField notVisible ProblemFieldBinding currentType fieldName NotVisible
Internal use only public Reference Binding find Member Type char type Name Reference Binding enclosing Type if enclosing Type tag Bits Has No Member Types 0 return null know it has no member types nor inherited member types Source Type Binding enclosing Source Type enclosing Source Type Package Binding current Package get Current Package compilation Unit Scope record Reference enclosing Type compound Name type Name Reference Binding member Type enclosing Type get Member Type type Name if member Type null compilation Unit Scope record Type Reference member Type to record supertypes if enclosing Source Type null member Type can Be Seen By current Package member Type can Be Seen By enclosing Type enclosing Source Type return member Type return new Problem Reference Binding type Name member Type Not Visible collect all superinterfaces of receiver Type until the member Type is found in a supertype Reference Binding current Type enclosing Type Reference Binding interfaces To Visit null int last Position 1 Reference Binding visible Member Type null boolean keep Looking true Reference Binding not Visible null we could hold onto the not visible field for extra error reporting while keep Looking Reference Binding its Interfaces current Type super Interfaces if its Interfaces No Super Interfaces if interfaces To Visit null interfaces To Visit new Reference Binding 5 if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces if current Type current Type superclass null break compilation Unit Scope record Reference current Type compound Name type Name if member Type current Type get Member Type type Name null compilation Unit Scope record Type Reference member Type to record supertypes keep Looking false if enclosing Source Type null member Type can Be Seen By current Package member Type can Be Seen By enclosing Type enclosing Source Type if visible Member Type null visible Member Type member Type else return new Problem Reference Binding type Name Ambiguous else not Visible member Type walk all visible interfaces to find ambiguous references if interfaces To Visit null Problem Reference Binding ambiguous null done for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j Reference Binding an Interface interfaces j if an Interface tag Bits Interface Visited 0 if interface as not already been visited an Interface tag Bits Interface Visited compilation Unit Scope record Reference an Interface compound Name type Name if member Type an Interface get Member Type type Name null compilation Unit Scope record Type Reference member Type to record supertypes if visible Member Type null visible Member Type member Type else ambiguous new Problem Reference Binding type Name Ambiguous break done else Reference Binding its Interfaces an Interface super Interfaces if its Interfaces No Super Interfaces if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces bit reinitialization for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j interfaces j tag Bits Interface Visited if ambiguous null return ambiguous if visible Member Type null return visible Member Type if not Visible null return new Problem Reference Binding type Name not Visible Not Visible return null  ReferenceBinding findMemberType typeName ReferenceBinding enclosingType enclosingType tagBits HasNoMemberTypes SourceTypeBinding enclosingSourceType enclosingSourceType PackageBinding currentPackage getCurrentPackage compilationUnitScope recordReference enclosingType compoundName typeName ReferenceBinding memberType enclosingType getMemberType typeName memberType compilationUnitScope recordTypeReference memberType enclosingSourceType memberType canBeSeenBy currentPackage memberType canBeSeenBy enclosingType enclosingSourceType memberType ProblemReferenceBinding typeName memberType NotVisible receiverType memberType ReferenceBinding currentType enclosingType ReferenceBinding interfacesToVisit lastPosition ReferenceBinding visibleMemberType keepLooking ReferenceBinding notVisible keepLooking ReferenceBinding itsInterfaces currentType superInterfaces itsInterfaces NoSuperInterfaces interfacesToVisit interfacesToVisit ReferenceBinding lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces currentType currentType compilationUnitScope recordReference currentType compoundName typeName memberType currentType getMemberType typeName compilationUnitScope recordTypeReference memberType keepLooking enclosingSourceType memberType canBeSeenBy currentPackage memberType canBeSeenBy enclosingType enclosingSourceType visibleMemberType visibleMemberType memberType ProblemReferenceBinding typeName notVisible memberType interfacesToVisit ProblemReferenceBinding lastPosition ReferenceBinding interfacesToVisit ReferenceBinding anInterface anInterface tagBits InterfaceVisited anInterface tagBits InterfaceVisited compilationUnitScope recordReference anInterface compoundName typeName memberType anInterface getMemberType typeName compilationUnitScope recordTypeReference memberType visibleMemberType visibleMemberType memberType ProblemReferenceBinding typeName ReferenceBinding itsInterfaces anInterface superInterfaces itsInterfaces NoSuperInterfaces lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces lastPosition ReferenceBinding interfacesToVisit tagBits InterfaceVisited visibleMemberType visibleMemberType notVisible ProblemReferenceBinding typeName notVisible NotVisible
Internal use only public Method Binding find Method Reference Binding receiver Type char selector Type Binding argument Types Invocation Site invocation Site Reference Binding current Type receiver Type Method Binding matching Method null Object Vector found new Object Vector TODO should rewrite to remove matching Method since found is allocated anyway fault In Receiver Type receiver Type compilation Unit Scope record Type Reference receiver Type compilation Unit Scope record Type References argument Types if current Type is Interface Method Binding current Methods current Type get Methods selector int current Length current Methods length if current Length 1 matching Method current Methods 0 else if current Length 1 found add All current Methods matching Method find Method In Super Interfaces current Type selector found matching Method current Type get Java Lang Object boolean is Compliant14 compilation Unit Scope environment options compliance Level Class File Constants JDK1 4 superclass lookup Reference Binding class Hierarchy Start current Type while current Type null Method Binding current Methods current Type get Methods selector int current Length current Methods length if 1 4 compliant must filter out redundant protected methods from superclasses if is Compliant14 next Method for int i 0 i current Length i Method Binding current Method current Methods i protected method need to be checked only default access is already dealt with in can Be Seen implementation when checking that p C q B p A cannot see default access members from A through B if current Method modifiers Acc Protected 0 continue next Method if matching Method null if current Method are Parameters Equal matching Method current Length current Methods i null discard this match continue next Method else for int j 0 max found size j max j if Method Binding found element At j are Parameters Equal current Method current Length current Methods i null continue next Method if current Length 1 matching Method null found size 0 matching Method current Methods 0 else if current Length 0 if matching Method null found add matching Method matching Method null append current Methods filtering out null entries int max Method current Methods length if max Method current Length no method was eliminated for 1 4 compliance see above found add All current Methods else for int i 0 max current Methods length i max i Method Binding current Method current Methods i if current Method null found add current Method current Type current Type superclass if found several candidates then eliminate those not matching argument types int found Size found size Method Binding candidates null int candidates Count 0 boolean checked Matching Method false is matching Method meeting argument expectation if found Size 0 argument type compatibility check for int i 0 i found Size i Method Binding method Binding Method Binding found element At i if are Parameters Assignable method Binding parameters argument Types switch candidates Count case 0 matching Method method Binding if only one match reuse matching Method checked Matching Method true matching Method is known to exist and match params here break case 1 candidates new Method Binding found Size only lazily created if more than one match candidates 0 matching Method copy back matching Method null fall through default candidates candidates Count method Binding candidates Count if only one matching method left either from start or due to elimination of rivals then match is in matching Method if matching Method null if checked Matching Method are Parameters Assignable matching Method parameters argument Types if no default abstract must explicitly look for one instead which could be a better match if matching Method can Be Seen By receiver Type invocation Site this ignore matching method to be consistent with multiple matches none visible matching method is then null Method Binding interface Method find Default Abstract Method receiver Type selector argument Types invocation Site class Hierarchy Start null found if interface Method null return interface Method compilation Unit Scope record Type References matching Method thrown Exceptions return matching Method return find Default Abstract Method receiver Type selector argument Types invocation Site class Hierarchy Start matching Method found no match was found try to find a close match when the parameter order is wrong or missing some parameters if candidates Count 0 Method Binding interface Method find Default Abstract Method receiver Type selector argument Types invocation Site class Hierarchy Start matching Method found if interface Method null return interface Method int arg Length argument Types length found Size found size next Method for int i 0 i found Size i Method Binding method Binding Method Binding found element At i Type Binding params method Binding parameters int param Length params length next Arg for int a 0 a arg Length a Type Binding arg argument Types a for int p 0 p param Length p if params p arg continue next Arg continue next Method return method Binding return Method Binding found element At 0 no good match so just use the first one found tiebreak using visibility check int visibles Count 0 for int i 0 i candidates Count i Method Binding method Binding candidates i if method Binding can Be Seen By receiver Type invocation Site this if visibles Count i candidates i null candidates visibles Count method Binding visibles Count if visibles Count 1 compilation Unit Scope record Type References candidates 0 thrown Exceptions return candidates 0 if visibles Count 0 Method Binding interface Method find Default Abstract Method receiver Type selector argument Types invocation Site class Hierarchy Start matching Method found if interface Method null return interface Method return new Problem Method Binding candidates 0 candidates 0 selector candidates 0 parameters Not Visible if is Compliant14 return most Specific Method Binding candidates visibles Count return candidates 0 declaring Class is Class most Specific Class Method Binding candidates visibles Count most Specific Interface Method Binding candidates visibles Count  MethodBinding findMethod ReferenceBinding receiverType TypeBinding argumentTypes InvocationSite invocationSite ReferenceBinding currentType receiverType MethodBinding matchingMethod ObjectVector ObjectVector matchingMethod faultInReceiverType receiverType compilationUnitScope recordTypeReference receiverType compilationUnitScope recordTypeReferences argumentTypes currentType isInterface MethodBinding currentMethods currentType getMethods currentLength currentMethods currentLength matchingMethod currentMethods currentLength addAll currentMethods matchingMethod findMethodInSuperInterfaces currentType matchingMethod currentType getJavaLangObject isCompliant14 compilationUnitScope complianceLevel ClassFileConstants JDK1_4 ReferenceBinding classHierarchyStart currentType currentType MethodBinding currentMethods currentType getMethods currentLength currentMethods isCompliant14 nextMethod currentLength MethodBinding currentMethod currentMethods canBeSeen currentMethod AccProtected nextMethod matchingMethod currentMethod areParametersEqual matchingMethod currentLength currentMethods nextMethod MethodBinding elementAt areParametersEqual currentMethod currentLength currentMethods nextMethod currentLength matchingMethod matchingMethod currentMethods currentLength matchingMethod matchingMethod matchingMethod currentMethods maxMethod currentMethods maxMethod currentLength addAll currentMethods currentMethods MethodBinding currentMethod currentMethods currentMethod currentMethod currentType currentType foundSize MethodBinding candidatesCount checkedMatchingMethod matchingMethod foundSize foundSize MethodBinding methodBinding MethodBinding elementAt areParametersAssignable methodBinding argumentTypes candidatesCount matchingMethod methodBinding matchingMethod checkedMatchingMethod matchingMethod MethodBinding foundSize matchingMethod matchingMethod candidatesCount methodBinding candidatesCount matchingMethod matchingMethod checkedMatchingMethod areParametersAssignable matchingMethod argumentTypes matchingMethod canBeSeenBy receiverType invocationSite MethodBinding interfaceMethod findDefaultAbstractMethod receiverType argumentTypes invocationSite classHierarchyStart interfaceMethod interfaceMethod compilationUnitScope recordTypeReferences matchingMethod thrownExceptions matchingMethod findDefaultAbstractMethod receiverType argumentTypes invocationSite classHierarchyStart matchingMethod candidatesCount MethodBinding interfaceMethod findDefaultAbstractMethod receiverType argumentTypes invocationSite classHierarchyStart matchingMethod interfaceMethod interfaceMethod argLength argumentTypes foundSize nextMethod foundSize MethodBinding methodBinding MethodBinding elementAt TypeBinding methodBinding paramLength nextArg argLength TypeBinding argumentTypes paramLength nextArg nextMethod methodBinding MethodBinding elementAt visiblesCount candidatesCount MethodBinding methodBinding methodBinding canBeSeenBy receiverType invocationSite visiblesCount visiblesCount methodBinding visiblesCount visiblesCount compilationUnitScope recordTypeReferences thrownExceptions visiblesCount MethodBinding interfaceMethod findDefaultAbstractMethod receiverType argumentTypes invocationSite classHierarchyStart matchingMethod interfaceMethod interfaceMethod ProblemMethodBinding NotVisible isCompliant14 mostSpecificMethodBinding visiblesCount declaringClass isClass mostSpecificClassMethodBinding visiblesCount mostSpecificInterfaceMethodBinding visiblesCount
Internal use only public Method Binding find Method For Array Array Binding receiver Type char selector Type Binding argument Types Invocation Site invocation Site Type Binding leaf Type receiver Type leaf Component Type if leaf Type instanceof Reference Binding if Reference Binding leaf Type can Be Seen By this return new Problem Method Binding selector Type Constants No Parameters Reference Binding leaf Type Receiver Type Not Visible Reference Binding object get Java Lang Object Method Binding method Binding object get Exact Method selector argument Types if method Binding null handle the method clone specially cannot be protected or throw exceptions if argument Types No Parameters Char Operation equals selector CLONE return new Updated Method Binding environment options targetJDK Class File Constants JDK1 4 Type Binding receiver Type Type Binding object remember its array type for codegen purpose on target 1 4 0 method Binding modifiers Acc Protected Acc Public CLONE method Binding return Type argument Types null object if method Binding can Be Seen By receiver Type invocation Site this return method Binding answers closest approximation may not check argument Types or visibility method Binding find Method object selector argument Types invocation Site if method Binding null return new Problem Method Binding selector argument Types Not Found if method Binding is Valid Binding if are Parameters Assignable method Binding parameters argument Types return new Problem Method Binding method Binding selector argument Types Not Found if method Binding can Be Seen By receiver Type invocation Site this return new Problem Method Binding method Binding selector method Binding parameters Not Visible return method Binding  MethodBinding findMethodForArray ArrayBinding receiverType TypeBinding argumentTypes InvocationSite invocationSite TypeBinding leafType receiverType leafComponentType leafType ReferenceBinding ReferenceBinding leafType canBeSeenBy ProblemMethodBinding TypeConstants NoParameters ReferenceBinding leafType ReceiverTypeNotVisible ReferenceBinding getJavaLangObject MethodBinding methodBinding getExactMethod argumentTypes methodBinding argumentTypes NoParameters CharOperation UpdatedMethodBinding ClassFileConstants JDK1_4 TypeBinding receiverType TypeBinding methodBinding AccProtected AccPublic methodBinding returnType argumentTypes methodBinding canBeSeenBy receiverType invocationSite methodBinding argumentTypes methodBinding findMethod argumentTypes invocationSite methodBinding ProblemMethodBinding argumentTypes NotFound methodBinding isValidBinding areParametersAssignable methodBinding argumentTypes ProblemMethodBinding methodBinding argumentTypes NotFound methodBinding canBeSeenBy receiverType invocationSite ProblemMethodBinding methodBinding methodBinding NotVisible methodBinding
public Method Binding find Method In Super Interfaces Reference Binding current Type char selector Object Vector found Method Binding matching Method Reference Binding its Interfaces current Type super Interfaces if its Interfaces No Super Interfaces Reference Binding interfaces To Visit new Reference Binding 5 int last Position 1 if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j current Type interfaces j if current Type tag Bits Interface Visited 0 if interface as not already been visited current Type tag Bits Interface Visited Method Binding current Methods current Type get Methods selector int current Length current Methods length if current Length 1 matching Method null found size 0 matching Method current Methods 0 else if current Length 0 if matching Method null found add matching Method matching Method null found add All current Methods its Interfaces current Type super Interfaces if its Interfaces No Super Interfaces if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces bit reinitialization for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j interfaces j tag Bits Interface Visited return matching Method  MethodBinding findMethodInSuperInterfaces ReferenceBinding currentType ObjectVector MethodBinding matchingMethod ReferenceBinding itsInterfaces currentType superInterfaces itsInterfaces NoSuperInterfaces ReferenceBinding interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces lastPosition ReferenceBinding interfacesToVisit currentType currentType tagBits InterfaceVisited currentType tagBits InterfaceVisited MethodBinding currentMethods currentType getMethods currentLength currentMethods currentLength matchingMethod matchingMethod currentMethods currentLength matchingMethod matchingMethod matchingMethod addAll currentMethods itsInterfaces currentType superInterfaces itsInterfaces NoSuperInterfaces lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces lastPosition ReferenceBinding interfacesToVisit tagBits InterfaceVisited matchingMethod
Internal use only public Reference Binding find Type char type Name Package Binding declaration Package Package Binding invocation Package compilation Unit Scope record Reference declaration Package compound Name type Name Reference Binding type Binding declaration Package get Type type Name if type Binding null return null if type Binding is Valid Binding if declaration Package invocation Package type Binding can Be Seen By invocation Package return new Problem Reference Binding type Name type Binding Not Visible return type Binding  ReferenceBinding findType typeName PackageBinding declarationPackage PackageBinding invocationPackage compilationUnitScope recordReference declarationPackage compoundName typeName ReferenceBinding typeBinding declarationPackage getType typeName typeBinding typeBinding isValidBinding declarationPackage invocationPackage typeBinding canBeSeenBy invocationPackage ProblemReferenceBinding typeName typeBinding NotVisible typeBinding
public Local Variable Binding find Variable char variable return null  LocalVariableBinding findVariable
public Type Binding get Base Type char name list should be optimized with most often used first int length name length if length 2 length 8 switch name 0 case i if length 3 name 1 n name 2 t return Int Binding break case v if length 4 name 1 o name 2 i name 3 d return Void Binding break case b if length 7 name 1 o name 2 o name 3 l name 4 e name 5 a name 6 n return Boolean Binding if length 4 name 1 y name 2 t name 3 e return Byte Binding break case c if length 4 name 1 h name 2 a name 3 r return Char Binding break case d if length 6 name 1 o name 2 u name 3 b name 4 l name 5 e return Double Binding break case f if length 5 name 1 l name 2 o name 3 a name 4 t return Float Binding break case l if length 4 name 1 o name 2 n name 3 g return Long Binding break case s if length 5 name 1 h name 2 o name 3 r name 4 t return Short Binding return null  TypeBinding getBaseType IntBinding VoidBinding BooleanBinding ByteBinding CharBinding DoubleBinding FloatBinding LongBinding ShortBinding
public Binding get Binding char name int mask Invocation Site invocation Site boolean need Resolve try Binding binding null Field Binding problem Field null if mask VARIABLE 0 boolean inside Static Context false boolean inside Constructor Call false Field Binding found Field null can be a problem field which is answered if a valid field is not found Problem Field Binding found Inside Problem null inside Constructor call or inside static context Scope scope this int depth 0 int found Depth 0 Reference Binding found Actual Receiver Type null done while true done when a COMPILATION UNIT SCOPE is found switch scope kind case METHOD SCOPE Method Scope method Scope Method Scope scope inside Static Context method Scope is Static inside Constructor Call method Scope is Constructor Call Fall through could duplicate the code below to save a cast questionable optimization case BLOCK SCOPE Local Variable Binding variable Binding scope find Variable name looks in this scope only if variable Binding null if found Field null found Field is Valid Binding return new Problem Field Binding found Field closest match found Field declaring Class name Inherited Name Hides Enclosing Name if depth 0 invocation Site set Depth depth return variable Binding break case CLASS SCOPE Class Scope class Scope Class Scope scope Source Type Binding enclosing Type class Scope reference Context binding Field Binding field Binding class Scope find Field enclosing Type name invocation Site need Resolve Use next line instead if willing to enable protected access accross inner types Field Binding field Binding find Field enclosing Type name invocation Site if field Binding null skip it if we did not find anything if field Binding problem Id Ambiguous if found Field null found Field problem Id Not Visible supercedes any potential Inherited Name Hides Enclosing Name problem return field Binding make the user qualify the field likely wants the first inherited field javac generates an ambiguous error instead return new Problem Field Binding found Field closest match found Field declaring Class name Inherited Name Hides Enclosing Name Problem Field Binding inside Problem null if field Binding is Valid Binding if field Binding is Static if inside Constructor Call inside Problem new Problem Field Binding field Binding closest match field Binding declaring Class name Non Static Reference In Constructor Invocation else if inside Static Context inside Problem new Problem Field Binding field Binding closest match field Binding declaring Class name Non Static Reference In Static Context if enclosing Type field Binding declaring Class environment options compliance Level Class File Constants JDK1 4 found a valid field in the immediate scope ie not inherited OR in 1 4 mode inherited shadows enclosing if found Field null if depth 0 invocation Site set Depth depth invocation Site set Actual Receiver Type enclosing Type return the field Binding if it is not declared in a superclass of the scope s binding that is inherited return inside Problem null field Binding inside Problem if found Field is Valid Binding if a valid field was found complain when another is found in an immediate enclosing type that is not inherited if found Field declaring Class field Binding declaring Class ie have we found the same field do not trust field identity yet return new Problem Field Binding found Field closest match found Field declaring Class name Inherited Name Hides Enclosing Name if found Field null found Field problem Id Not Visible field Binding problem Id Not Visible only remember the field Binding if its the first one found or the previous one was not visible field Binding is found Depth depth found Actual Receiver Type enclosing Type found Inside Problem inside Problem found Field field Binding depth inside Static Context enclosing Type is Static 1EX5I8Z accessing outer fields within a constructor call is permitted in order to do so we change the flag as we exit from the type not the method itself because the class scope is used to retrieve the fields Method Scope enclosing Method Scope scope method Scope inside Constructor Call enclosing Method Scope null false enclosing Method Scope is Constructor Call break case COMPILATION UNIT SCOPE break done scope scope parent if found Inside Problem null return found Inside Problem if found Field null if found Field is Valid Binding if found Depth 0 invocation Site set Depth found Depth invocation Site set Actual Receiver Type found Actual Receiver Type return found Field problem Field found Field We did not find a local or instance variable if mask TYPE 0 if binding get Base Type name null return binding binding get Type Or Package name mask PACKAGE 0 TYPE TYPE PACKAGE if binding is Valid Binding mask TYPE return binding answer the problem type binding if we are only looking for a type else if mask PACKAGE 0 compilation Unit Scope record Simple Reference name if binding environment get Top Level Package name null return binding if problem Field null return problem Field return new Problem Binding name enclosing Source Type Not Found catch Abort Compilation e e update Context invocation Site reference Compilation Unit compilation Result throw e  getBinding InvocationSite invocationSite needResolve FieldBinding problemField insideStaticContext insideConstructorCall FieldBinding foundField ProblemFieldBinding foundInsideProblem foundDepth ReferenceBinding foundActualReceiverType COMPILATION_UNIT_SCOPE METHOD_SCOPE MethodScope methodScope MethodScope insideStaticContext methodScope isStatic insideConstructorCall methodScope isConstructorCall BLOCK_SCOPE LocalVariableBinding variableBinding findVariable variableBinding foundField foundField isValidBinding ProblemFieldBinding foundField foundField declaringClass InheritedNameHidesEnclosingName invocationSite setDepth variableBinding CLASS_SCOPE ClassScope classScope ClassScope SourceTypeBinding enclosingType classScope referenceContext FieldBinding fieldBinding classScope findField enclosingType invocationSite needResolve FieldBinding fieldBinding findField enclosingType invocationSite fieldBinding fieldBinding problemId foundField foundField problemId NotVisible InheritedNameHidesEnclosingName fieldBinding ProblemFieldBinding foundField foundField declaringClass InheritedNameHidesEnclosingName ProblemFieldBinding insideProblem fieldBinding isValidBinding fieldBinding isStatic insideConstructorCall insideProblem ProblemFieldBinding fieldBinding fieldBinding declaringClass NonStaticReferenceInConstructorInvocation insideStaticContext insideProblem ProblemFieldBinding fieldBinding fieldBinding declaringClass NonStaticReferenceInStaticContext enclosingType fieldBinding declaringClass complianceLevel ClassFileConstants JDK1_4 foundField invocationSite setDepth invocationSite setActualReceiverType enclosingType fieldBinding insideProblem fieldBinding insideProblem foundField isValidBinding foundField declaringClass fieldBinding declaringClass ProblemFieldBinding foundField foundField declaringClass InheritedNameHidesEnclosingName foundField foundField problemId NotVisible fieldBinding problemId NotVisible fieldBinding fieldBinding foundDepth foundActualReceiverType enclosingType foundInsideProblem insideProblem foundField fieldBinding insideStaticContext enclosingType isStatic MethodScope enclosingMethodScope methodScope insideConstructorCall enclosingMethodScope enclosingMethodScope isConstructorCall COMPILATION_UNIT_SCOPE foundInsideProblem foundInsideProblem foundField foundField isValidBinding foundDepth invocationSite setDepth foundDepth invocationSite setActualReceiverType foundActualReceiverType foundField problemField foundField getBaseType getTypeOrPackage isValidBinding compilationUnitScope recordSimpleReference getTopLevelPackage problemField problemField ProblemBinding enclosingSourceType NotFound AbortCompilation updateContext invocationSite referenceCompilationUnit compilationResult
public Method Binding get Constructor Reference Binding receiver Type Type Binding argument Types Invocation Site invocation Site try fault In Receiver Type receiver Type compilation Unit Scope record Type Reference receiver Type compilation Unit Scope record Type References argument Types Method Binding method Binding receiver Type get Exact Constructor argument Types if method Binding null method Binding can Be Seen By invocation Site this return method Binding Method Binding methods receiver Type get Methods Constructor Declaration Constant Pool Name if methods No Methods return new Problem Method Binding Constructor Declaration Constant Pool Name argument Types Not Found Method Binding compatible new Method Binding methods length int compatible Index 0 for int i 0 length methods length i length i if are Parameters Assignable methods i parameters argument Types compatible compatible Index methods i if compatible Index 0 return new Problem Method Binding Constructor Declaration Constant Pool Name argument Types Not Found need a more descriptive error cannot convert from X to Y Method Binding visible new Method Binding compatible Index int visible Index 0 for int i 0 i compatible Index i Method Binding method compatible i if method can Be Seen By invocation Site this visible visible Index method if visible Index 1 return visible 0 if visible Index 0 return new Problem Method Binding compatible 0 Constructor Declaration Constant Pool Name compatible 0 parameters Not Visible return most Specific Class Method Binding visible visible Index catch Abort Compilation e e update Context invocation Site reference Compilation Unit compilation Result throw e  MethodBinding getConstructor ReferenceBinding receiverType TypeBinding argumentTypes InvocationSite invocationSite faultInReceiverType receiverType compilationUnitScope recordTypeReference receiverType compilationUnitScope recordTypeReferences argumentTypes MethodBinding methodBinding receiverType getExactConstructor argumentTypes methodBinding methodBinding canBeSeenBy invocationSite methodBinding MethodBinding receiverType getMethods ConstructorDeclaration ConstantPoolName NoMethods ProblemMethodBinding ConstructorDeclaration ConstantPoolName argumentTypes NotFound MethodBinding MethodBinding compatibleIndex areParametersAssignable argumentTypes compatibleIndex compatibleIndex ProblemMethodBinding ConstructorDeclaration ConstantPoolName argumentTypes NotFound MethodBinding MethodBinding compatibleIndex visibleIndex compatibleIndex MethodBinding canBeSeenBy invocationSite visibleIndex visibleIndex visibleIndex ProblemMethodBinding ConstructorDeclaration ConstantPoolName NotVisible mostSpecificClassMethodBinding visibleIndex AbortCompilation updateContext invocationSite referenceCompilationUnit compilationResult
public final Package Binding get Current Package Scope scope unit Scope this while scope unit Scope parent null unit Scope scope return Compilation Unit Scope unit Scope f Package  PackageBinding getCurrentPackage unitScope unitScope unitScope CompilationUnitScope unitScope fPackage
Returns the modifiers of the innermost enclosing declaration return modifiers public int get Declaration Modifiers switch this kind case Scope BLOCK SCOPE case Scope METHOD SCOPE Method Scope method Scope method Scope if method Scope is Inside Initializer check method modifiers to see if deprecated Method Binding context Abstract Method Declaration method Scope reference Context binding if context null return context modifiers else Source Type Binding type Block Scope this reference Type binding inside field declaration check field modifier to see if deprecated if method Scope initialized Field null return method Scope initialized Field modifiers if type null return type modifiers break case Scope CLASS SCOPE Reference Binding context Class Scope this reference Type binding if context null return context modifiers break return 1  getDeclarationModifiers BLOCK_SCOPE METHOD_SCOPE MethodScope methodScope methodScope methodScope isInsideInitializer MethodBinding AbstractMethodDeclaration methodScope referenceContext SourceTypeBinding BlockScope referenceType methodScope initializedField methodScope initializedField CLASS_SCOPE ReferenceBinding ClassScope referenceType
public Field Binding get Field Type Binding receiver Type char field Name Invocation Site invocation Site try Field Binding field find Field receiver Type field Name invocation Site true resolve if field null return field return new Problem Field Binding receiver Type instanceof Reference Binding Reference Binding receiver Type null field Name Not Found catch Abort Compilation e e update Context invocation Site reference Compilation Unit compilation Result throw e  FieldBinding getField TypeBinding receiverType fieldName InvocationSite invocationSite FieldBinding findField receiverType fieldName invocationSite ProblemFieldBinding receiverType ReferenceBinding ReferenceBinding receiverType fieldName NotFound AbortCompilation updateContext invocationSite referenceCompilationUnit compilationResult
public Method Binding get Implicit Method char selector Type Binding argument Types Invocation Site invocation Site boolean inside Static Context false boolean inside Constructor Call false Method Binding found Method null Problem Method Binding found Fuzzy Problem null the weird method lookup case matches method name in scope then arg types then visibility Problem Method Binding found Inside Problem null inside Constructor call or inside static context Scope scope this int depth 0 done while true done when a COMPILATION UNIT SCOPE is found switch scope kind case METHOD SCOPE Method Scope method Scope Method Scope scope inside Static Context method Scope is Static inside Constructor Call method Scope is Constructor Call break case CLASS SCOPE Class Scope class Scope Class Scope scope Source Type Binding receiver Type class Scope reference Context binding boolean is Exact Match true retrieve an exact visible match if possible Method Binding method Binding found Method null class Scope find Exact Method receiver Type selector argument Types invocation Site class Scope find Exact Method receiver Type found Method selector found Method parameters invocation Site find Exact Method receiver Type selector argument Types invocation Site find Exact Method receiver Type found Method selector found Method parameters invocation Site if method Binding null answers closest approximation may not check argument Types or visibility is Exact Match false method Binding class Scope find Method receiver Type selector argument Types invocation Site method Binding find Method receiver Type selector argument Types invocation Site if method Binding null skip it if we did not find anything if method Binding problem Id Ambiguous if found Method null found Method problem Id Not Visible supercedes any potential Inherited Name Hides Enclosing Name problem return method Binding make the user qualify the method likely wants the first inherited method javac generates an ambiguous error instead return new Problem Method Binding method Binding closest match selector argument Types Inherited Name Hides Enclosing Name Problem Method Binding fuzzy Problem null Problem Method Binding inside Problem null if method Binding is Valid Binding if is Exact Match if are Parameters Assignable method Binding parameters argument Types if found Method null found Method problem Id Not Visible inherited mismatch is reported directly not looking at enclosing matches return new Problem Method Binding method Binding selector argument Types Not Found make the user qualify the method likely wants the first inherited method javac generates an ambiguous error instead fuzzy Problem new Problem Method Binding selector method Binding parameters Inherited Name Hides Enclosing Name else if method Binding can Be Seen By receiver Type invocation Site class Scope using class Scope instead of this for visibility check does grant all access to innerclass fuzzy Problem new Problem Method Binding method Binding selector method Binding parameters Not Visible if fuzzy Problem null method Binding is Static if inside Constructor Call inside Problem new Problem Method Binding method Binding closest match method Binding selector method Binding parameters Non Static Reference In Constructor Invocation else if inside Static Context inside Problem new Problem Method Binding method Binding closest match method Binding selector method Binding parameters Non Static Reference In Static Context if receiver Type method Binding declaring Class receiver Type get Methods selector No Methods fuzzy Problem null fuzzy Problem problem Id Not Visible environment options compliance Level Class File Constants JDK1 4 found a valid method in the immediate scope ie not inherited OR the receiver Type implemented a method with the correct name OR in 1 4 mode inherited visible shadows enclosing if found Method null if depth 0 invocation Site set Depth depth invocation Site set Actual Receiver Type receiver Type return the method Binding if it is not declared in a superclass of the scope s binding that is inherited if fuzzy Problem null return fuzzy Problem if inside Problem null return inside Problem return method Binding if a method was found complain when another is found in an immediate enclosing type that is not inherited NOTE Unlike fields a non visible method hides a visible method if found Method declaring Class method Binding declaring Class ie have we found the same method do not trust field identity yet return new Problem Method Binding method Binding closest match method Binding selector method Binding parameters Inherited Name Hides Enclosing Name if found Method null found Method problem Id Not Visible method Binding problem Id Not Visible only remember the method Binding if its the first one found or the previous one was not visible method Binding is remember that private methods are visible if defined directly by an enclosing class if depth 0 invocation Site set Depth depth invocation Site set Actual Receiver Type receiver Type found Fuzzy Problem fuzzy Problem found Inside Problem inside Problem if fuzzy Problem null found Method method Binding only keep it if no error was found depth inside Static Context receiver Type is Static 1EX5I8Z accessing outer fields within a constructor call is permitted in order to do so we change the flag as we exit from the type not the method itself because the class scope is used to retrieve the fields Method Scope enclosing Method Scope scope method Scope inside Constructor Call enclosing Method Scope null false enclosing Method Scope is Constructor Call break case COMPILATION UNIT SCOPE break done scope scope parent if found Fuzzy Problem null return found Fuzzy Problem if found Inside Problem null return found Inside Problem if found Method null return found Method return new Problem Method Binding selector argument Types Not Found  MethodBinding getImplicitMethod TypeBinding argumentTypes InvocationSite invocationSite insideStaticContext insideConstructorCall MethodBinding foundMethod ProblemMethodBinding foundFuzzyProblem ProblemMethodBinding foundInsideProblem COMPILATION_UNIT_SCOPE METHOD_SCOPE MethodScope methodScope MethodScope insideStaticContext methodScope isStatic insideConstructorCall methodScope isConstructorCall CLASS_SCOPE ClassScope classScope ClassScope SourceTypeBinding receiverType classScope referenceContext isExactMatch MethodBinding methodBinding foundMethod classScope findExactMethod receiverType argumentTypes invocationSite classScope findExactMethod receiverType foundMethod foundMethod invocationSite findExactMethod receiverType argumentTypes invocationSite findExactMethod receiverType foundMethod foundMethod invocationSite methodBinding argumentTypes isExactMatch methodBinding classScope findMethod receiverType argumentTypes invocationSite methodBinding findMethod receiverType argumentTypes invocationSite methodBinding methodBinding problemId foundMethod foundMethod problemId NotVisible InheritedNameHidesEnclosingName methodBinding ProblemMethodBinding methodBinding argumentTypes InheritedNameHidesEnclosingName ProblemMethodBinding fuzzyProblem ProblemMethodBinding insideProblem methodBinding isValidBinding isExactMatch areParametersAssignable methodBinding argumentTypes foundMethod foundMethod problemId NotVisible ProblemMethodBinding methodBinding argumentTypes NotFound fuzzyProblem ProblemMethodBinding methodBinding InheritedNameHidesEnclosingName methodBinding canBeSeenBy receiverType invocationSite classScope classScope fuzzyProblem ProblemMethodBinding methodBinding methodBinding NotVisible fuzzyProblem methodBinding isStatic insideConstructorCall insideProblem ProblemMethodBinding methodBinding methodBinding methodBinding NonStaticReferenceInConstructorInvocation insideStaticContext insideProblem ProblemMethodBinding methodBinding methodBinding methodBinding NonStaticReferenceInStaticContext receiverType methodBinding declaringClass receiverType getMethods NoMethods fuzzyProblem fuzzyProblem problemId NotVisible complianceLevel ClassFileConstants JDK1_4 receiverType foundMethod invocationSite setDepth invocationSite setActualReceiverType receiverType methodBinding fuzzyProblem fuzzyProblem insideProblem insideProblem methodBinding foundMethod declaringClass methodBinding declaringClass ProblemMethodBinding methodBinding methodBinding methodBinding InheritedNameHidesEnclosingName foundMethod foundMethod problemId NotVisible methodBinding problemId NotVisible methodBinding methodBinding invocationSite setDepth invocationSite setActualReceiverType receiverType foundFuzzyProblem fuzzyProblem foundInsideProblem insideProblem fuzzyProblem foundMethod methodBinding insideStaticContext receiverType isStatic MethodScope enclosingMethodScope methodScope insideConstructorCall enclosingMethodScope enclosingMethodScope isConstructorCall COMPILATION_UNIT_SCOPE foundFuzzyProblem foundFuzzyProblem foundInsideProblem foundInsideProblem foundMethod foundMethod ProblemMethodBinding argumentTypes NotFound
public final Reference Binding get Java Io Serializable compilation Unit Scope record Qualified Reference JAVA IO SERIALIZABLE Reference Binding type environment get Type JAVA IO SERIALIZABLE if type null return type problem Reporter is Class Path Correct JAVA IO SERIALIZABLE reference Compilation Unit return null will not get here since the above error aborts the compilation  ReferenceBinding getJavaIoSerializable compilationUnitScope recordQualifiedReference JAVA_IO_SERIALIZABLE ReferenceBinding getType JAVA_IO_SERIALIZABLE problemReporter isClassPathCorrect JAVA_IO_SERIALIZABLE referenceCompilationUnit
public final Reference Binding get Java Lang Assertion Error compilation Unit Scope record Qualified Reference JAVA LANG ASSERTIONERROR Reference Binding type environment get Type JAVA LANG ASSERTIONERROR if type null return type problem Reporter is Class Path Correct JAVA LANG ASSERTIONERROR reference Compilation Unit return null will not get here since the above error aborts the compilation  ReferenceBinding getJavaLangAssertionError compilationUnitScope recordQualifiedReference JAVA_LANG_ASSERTIONERROR ReferenceBinding getType JAVA_LANG_ASSERTIONERROR problemReporter isClassPathCorrect JAVA_LANG_ASSERTIONERROR referenceCompilationUnit
public final Reference Binding get Java Lang Class compilation Unit Scope record Qualified Reference JAVA LANG CLASS Reference Binding type environment get Type JAVA LANG CLASS if type null return type problem Reporter is Class Path Correct JAVA LANG CLASS reference Compilation Unit return null will not get here since the above error aborts the compilation  ReferenceBinding getJavaLangClass compilationUnitScope recordQualifiedReference JAVA_LANG_CLASS ReferenceBinding getType JAVA_LANG_CLASS problemReporter isClassPathCorrect JAVA_LANG_CLASS referenceCompilationUnit
public final Reference Binding get Java Lang Cloneable compilation Unit Scope record Qualified Reference JAVA LANG CLONEABLE Reference Binding type environment get Type JAVA LANG CLONEABLE if type null return type problem Reporter is Class Path Correct JAVA LANG CLONEABLE reference Compilation Unit return null will not get here since the above error aborts the compilation  ReferenceBinding getJavaLangCloneable compilationUnitScope recordQualifiedReference JAVA_LANG_CLONEABLE ReferenceBinding getType JAVA_LANG_CLONEABLE problemReporter isClassPathCorrect JAVA_LANG_CLONEABLE referenceCompilationUnit
public final Reference Binding get Java Lang Error compilation Unit Scope record Qualified Reference JAVA LANG ERROR Reference Binding type environment get Type JAVA LANG ERROR if type null return type problem Reporter is Class Path Correct JAVA LANG ERROR reference Compilation Unit return null will not get here since the above error aborts the compilation  ReferenceBinding getJavaLangError compilationUnitScope recordQualifiedReference JAVA_LANG_ERROR ReferenceBinding getType JAVA_LANG_ERROR problemReporter isClassPathCorrect JAVA_LANG_ERROR referenceCompilationUnit
public final Reference Binding get Java Lang Object compilation Unit Scope record Qualified Reference JAVA LANG OBJECT Reference Binding type environment get Type JAVA LANG OBJECT if type null return type problem Reporter is Class Path Correct JAVA LANG OBJECT reference Compilation Unit return null will not get here since the above error aborts the compilation  ReferenceBinding getJavaLangObject compilationUnitScope recordQualifiedReference JAVA_LANG_OBJECT ReferenceBinding getType JAVA_LANG_OBJECT problemReporter isClassPathCorrect JAVA_LANG_OBJECT referenceCompilationUnit
public final Reference Binding get Java Lang Runtime Exception compilation Unit Scope record Qualified Reference JAVA LANG RUNTIMEEXCEPTION Reference Binding type environment get Type JAVA LANG RUNTIMEEXCEPTION if type null return type problem Reporter is Class Path Correct JAVA LANG RUNTIMEEXCEPTION reference Compilation Unit return null will not get here since the above error aborts the compilation  ReferenceBinding getJavaLangRuntimeException compilationUnitScope recordQualifiedReference JAVA_LANG_RUNTIMEEXCEPTION ReferenceBinding getType JAVA_LANG_RUNTIMEEXCEPTION problemReporter isClassPathCorrect JAVA_LANG_RUNTIMEEXCEPTION referenceCompilationUnit
public final Reference Binding get Java Lang String compilation Unit Scope record Qualified Reference JAVA LANG STRING Reference Binding type environment get Type JAVA LANG STRING if type null return type problem Reporter is Class Path Correct JAVA LANG STRING reference Compilation Unit return null will not get here since the above error aborts the compilation  ReferenceBinding getJavaLangString compilationUnitScope recordQualifiedReference JAVA_LANG_STRING ReferenceBinding getType JAVA_LANG_STRING problemReporter isClassPathCorrect JAVA_LANG_STRING referenceCompilationUnit
public final Reference Binding get Java Lang Throwable compilation Unit Scope record Qualified Reference JAVA LANG THROWABLE Reference Binding type environment get Type JAVA LANG THROWABLE if type null return type problem Reporter is Class Path Correct JAVA LANG THROWABLE reference Compilation Unit return null will not get here since the above error aborts the compilation  ReferenceBinding getJavaLangThrowable compilationUnitScope recordQualifiedReference JAVA_LANG_THROWABLE ReferenceBinding getType JAVA_LANG_THROWABLE problemReporter isClassPathCorrect JAVA_LANG_THROWABLE referenceCompilationUnit
public final Reference Binding get Member Type char type Name Reference Binding enclosing Type Reference Binding member Type find Member Type type Name enclosing Type if member Type null return member Type return new Problem Reference Binding type Name Not Found  ReferenceBinding getMemberType typeName ReferenceBinding enclosingType ReferenceBinding memberType findMemberType typeName enclosingType memberType memberType ProblemReferenceBinding typeName NotFound
public Method Binding get Method Type Binding receiver Type char selector Type Binding argument Types Invocation Site invocation Site try if receiver Type is Array Type return find Method For Array Array Binding receiver Type selector argument Types invocation Site if receiver Type is Base Type return new Problem Method Binding selector argument Types Not Found Reference Binding current Type Reference Binding receiver Type if current Type can Be Seen By this return new Problem Method Binding selector argument Types Receiver Type Not Visible retrieve an exact visible match if possible Method Binding method Binding find Exact Method current Type selector argument Types invocation Site if method Binding null return method Binding answers closest approximation may not check argument Types or visibility method Binding find Method current Type selector argument Types invocation Site if method Binding null return new Problem Method Binding selector argument Types Not Found if method Binding is Valid Binding if are Parameters Assignable method Binding parameters argument Types return new Problem Method Binding method Binding selector argument Types Not Found if method Binding can Be Seen By current Type invocation Site this return new Problem Method Binding method Binding selector method Binding parameters Not Visible return method Binding catch Abort Compilation e e update Context invocation Site reference Compilation Unit compilation Result throw e  MethodBinding getMethod TypeBinding receiverType TypeBinding argumentTypes InvocationSite invocationSite receiverType isArrayType findMethodForArray ArrayBinding receiverType argumentTypes invocationSite receiverType isBaseType ProblemMethodBinding argumentTypes NotFound ReferenceBinding currentType ReferenceBinding receiverType currentType canBeSeenBy ProblemMethodBinding argumentTypes ReceiverTypeNotVisible MethodBinding methodBinding findExactMethod currentType argumentTypes invocationSite methodBinding methodBinding argumentTypes methodBinding findMethod currentType argumentTypes invocationSite methodBinding ProblemMethodBinding argumentTypes NotFound methodBinding isValidBinding areParametersAssignable methodBinding argumentTypes ProblemMethodBinding methodBinding argumentTypes NotFound methodBinding canBeSeenBy currentType invocationSite ProblemMethodBinding methodBinding methodBinding NotVisible methodBinding AbortCompilation updateContext invocationSite referenceCompilationUnit compilationResult
this feature would be extraordinarily slow Therefore we don t do this public final Type Binding get Type char name Would like to remove this test and require senders to specially handle base types Type Binding binding get Base Type name if binding null return binding return Reference Binding get Type Or Package name TYPE  TypeBinding getType TypeBinding getBaseType ReferenceBinding getTypeOrPackage
public final Type Binding get Type char compound Name int type Name Length compound Name length if type Name Length 1 Would like to remove this test and require senders to specially handle base types Type Binding binding get Base Type compound Name 0 if binding null return binding compilation Unit Scope record Qualified Reference compound Name Binding binding get Type Or Package compound Name 0 type Name Length 1 TYPE TYPE PACKAGE if binding null return new Problem Reference Binding compound Name 0 Not Found if binding is Valid Binding return Reference Binding binding int current Index 1 boolean check Visibility false if binding instanceof Package Binding Package Binding package Binding Package Binding binding while current Index type Name Length binding package Binding get Type Or Package compound Name current Index does not check visibility if binding null return new Problem Reference Binding Char Operation subarray compound Name 0 current Index Not Found if binding is Valid Binding return new Problem Reference Binding Char Operation subarray compound Name 0 current Index binding problem Id if binding instanceof Package Binding break package Binding Package Binding binding if binding instanceof Package Binding return new Problem Reference Binding Char Operation subarray compound Name 0 current Index Not Found check Visibility true binding is now a Reference Binding Reference Binding type Binding Reference Binding binding compilation Unit Scope record Type Reference type Binding to record supertypes if check Visibility handles the fall through case if type Binding can Be Seen By this return new Problem Reference Binding Char Operation subarray compound Name 0 current Index type Binding Not Visible while current Index type Name Length type Binding get Member Type compound Name current Index type Binding if type Binding is Valid Binding if type Binding instanceof Problem Reference Binding Problem Reference Binding problem Binding Problem Reference Binding type Binding return new Problem Reference Binding Char Operation subarray compound Name 0 current Index problem Binding original type Binding problem Id return new Problem Reference Binding Char Operation subarray compound Name 0 current Index type Binding problem Id return type Binding  TypeBinding getType compoundName typeNameLength compoundName typeNameLength TypeBinding getBaseType compoundName compilationUnitScope recordQualifiedReference compoundName getTypeOrPackage compoundName typeNameLength ProblemReferenceBinding compoundName NotFound isValidBinding ReferenceBinding currentIndex checkVisibility PackageBinding PackageBinding packageBinding PackageBinding currentIndex typeNameLength packageBinding getTypeOrPackage compoundName currentIndex ProblemReferenceBinding CharOperation compoundName currentIndex NotFound isValidBinding ProblemReferenceBinding CharOperation compoundName currentIndex problemId PackageBinding packageBinding PackageBinding PackageBinding ProblemReferenceBinding CharOperation compoundName currentIndex NotFound checkVisibility ReferenceBinding ReferenceBinding typeBinding ReferenceBinding compilationUnitScope recordTypeReference typeBinding checkVisibility typeBinding canBeSeenBy ProblemReferenceBinding CharOperation compoundName currentIndex typeBinding NotVisible currentIndex typeNameLength typeBinding getMemberType compoundName currentIndex typeBinding typeBinding isValidBinding typeBinding ProblemReferenceBinding ProblemReferenceBinding problemBinding ProblemReferenceBinding typeBinding ProblemReferenceBinding CharOperation compoundName currentIndex problemBinding typeBinding problemId ProblemReferenceBinding CharOperation compoundName currentIndex typeBinding problemId typeBinding
final Binding get Type Or Package char name int mask Scope scope this Reference Binding found Type null if mask TYPE 0 Scope next scope while next scope parent null scope next else done while true done when a COMPILATION UNIT SCOPE is found switch scope kind case METHOD SCOPE case BLOCK SCOPE Reference Binding local Type Block Scope scope find Local Type name looks in this scope only if local Type null if found Type null found Type local Type return new Problem Reference Binding name Inherited Name Hides Enclosing Name return local Type break case CLASS SCOPE Source Type Binding source Type Class Scope scope reference Context binding 6 5 5 1 simple name favors member type over top level type in same unit Reference Binding member Type find Member Type name source Type if member Type null skip it if we did not find anything if member Type problem Id Ambiguous if found Type null found Type problem Id Not Visible supercedes any potential Inherited Name Hides Enclosing Name problem return member Type make the user qualify the type likely wants the first inherited type return new Problem Reference Binding name Inherited Name Hides Enclosing Name if member Type is Valid Binding if source Type member Type enclosing Type environment options compliance Level Class File Constants JDK1 4 found a valid type in the immediate scope ie not inherited OR in 1 4 mode inherited shadows enclosing if found Type null return member Type if found Type is Valid Binding if a valid type was found complain when another is found in an immediate enclosing type ie not inherited if found Type member Type return new Problem Reference Binding name Inherited Name Hides Enclosing Name if found Type null found Type problem Id Not Visible member Type problem Id Not Visible only remember the member Type if its the first one found or the previous one was not visible member Type is found Type member Type if Char Operation equals source Type source Name name if found Type null found Type source Type found Type problem Id Not Visible return new Problem Reference Binding name Inherited Name Hides Enclosing Name return source Type break case COMPILATION UNIT SCOPE break done scope scope parent if found Type null found Type problem Id Not Visible return found Type at this point the scope is a compilation unit scope Compilation Unit Scope unit Scope Compilation Unit Scope scope Package Binding current Package unit Scope f Package ask for the imports name if mask TYPE 0 check single type imports Import Binding imports unit Scope imports if imports null Hashtable Of Object type Imports unit Scope resolved Singe Type Imports if type Imports null Import Binding type Import Import Binding type Imports get name if type Import null Import Reference import Reference type Import reference if import Reference null import Reference used true return type Import resolved Import already know its visible else walk all the imports since resolved Singe Type Imports is not yet initialized for int i 0 length imports length i length i Import Binding type Import imports i if type Import on Demand if Char Operation equals type Import compound Name type Import compound Name length 1 name if unit Scope resolve Single Type Import type Import null Import Reference import Reference type Import reference if import Reference null import Reference used true return type Import resolved Import already know its visible check if the name is in the current package skip it if its a sub package unit Scope record Reference current Package compound Name name Binding binding current Package get Type Or Package name if binding instanceof Reference Binding return binding type is always visible to its own package check on demand imports if imports null boolean found In Import false Reference Binding type null for int i 0 length imports length i length i Import Binding some Import imports i if some Import on Demand Binding resolved Import some Import resolved Import Reference Binding temp resolved Import instanceof Package Binding find Type name Package Binding resolved Import current Package find Direct Member Type name Reference Binding resolved Import if temp null if temp is Valid Binding Import Reference import Reference some Import reference if import Reference null import Reference used true if found In Import Answer error binding import on demand conflict name found in two import on demand packages return new Problem Reference Binding name Ambiguous type temp found In Import true else if found Type null found Type temp if type null return type unit Scope record Simple Reference name if mask PACKAGE 0 Package Binding package Binding unit Scope environment get Top Level Package name if package Binding null return package Binding Answer error binding could not find name if found Type null return found Type problem type from above return new Problem Reference Binding name Not Found  getTypeOrPackage ReferenceBinding foundType COMPILATION_UNIT_SCOPE METHOD_SCOPE BLOCK_SCOPE ReferenceBinding localType BlockScope findLocalType localType foundType foundType localType ProblemReferenceBinding InheritedNameHidesEnclosingName localType CLASS_SCOPE SourceTypeBinding sourceType ClassScope referenceContext ReferenceBinding memberType findMemberType sourceType memberType memberType problemId foundType foundType problemId NotVisible InheritedNameHidesEnclosingName memberType ProblemReferenceBinding InheritedNameHidesEnclosingName memberType isValidBinding sourceType memberType enclosingType complianceLevel ClassFileConstants JDK1_4 foundType memberType foundType isValidBinding foundType memberType ProblemReferenceBinding InheritedNameHidesEnclosingName foundType foundType problemId NotVisible memberType problemId NotVisible memberType memberType foundType memberType CharOperation sourceType sourceName foundType foundType sourceType foundType problemId NotVisible ProblemReferenceBinding InheritedNameHidesEnclosingName sourceType COMPILATION_UNIT_SCOPE foundType foundType problemId NotVisible foundType CompilationUnitScope unitScope CompilationUnitScope PackageBinding currentPackage unitScope fPackage ImportBinding unitScope HashtableOfObject typeImports unitScope resolvedSingeTypeImports typeImports ImportBinding typeImport ImportBinding typeImports typeImport ImportReference importReference typeImport importReference importReference typeImport resolvedImport resolvedSingeTypeImports ImportBinding typeImport typeImport onDemand CharOperation typeImport compoundName typeImport compoundName unitScope resolveSingleTypeImport typeImport ImportReference importReference typeImport importReference importReference typeImport resolvedImport unitScope recordReference currentPackage compoundName currentPackage getTypeOrPackage ReferenceBinding foundInImport ReferenceBinding ImportBinding someImport someImport onDemand resolvedImport someImport resolvedImport ReferenceBinding resolvedImport PackageBinding findType PackageBinding resolvedImport currentPackage findDirectMemberType ReferenceBinding resolvedImport isValidBinding ImportReference importReference someImport importReference importReference foundInImport ProblemReferenceBinding foundInImport foundType foundType unitScope recordSimpleReference PackageBinding packageBinding unitScope getTopLevelPackage packageBinding packageBinding foundType foundType ProblemReferenceBinding NotFound
Added for code assist NOT Public API public final Binding get Type Or Package char compound Name int name Length compound Name length if name Length 1 Type Binding binding get Base Type compound Name 0 if binding null return binding Binding binding get Type Or Package compound Name 0 TYPE PACKAGE if binding is Valid Binding return binding int current Index 1 boolean check Visibility false if binding instanceof Package Binding Package Binding package Binding Package Binding binding while current Index name Length binding package Binding get Type Or Package compound Name current Index if binding null return new Problem Reference Binding Char Operation subarray compound Name 0 current Index Not Found if binding is Valid Binding return new Problem Reference Binding Char Operation subarray compound Name 0 current Index binding problem Id if binding instanceof Package Binding break package Binding Package Binding binding if binding instanceof Package Binding return binding check Visibility true binding is now a Reference Binding Reference Binding type Binding Reference Binding binding if check Visibility handles the fall through case if type Binding can Be Seen By this return new Problem Reference Binding Char Operation subarray compound Name 0 current Index type Binding Not Visible while current Index name Length type Binding get Member Type compound Name current Index type Binding checks visibility if type Binding is Valid Binding return new Problem Reference Binding Char Operation subarray compound Name 0 current Index type Binding problem Id return type Binding  getTypeOrPackage compoundName nameLength compoundName nameLength TypeBinding getBaseType compoundName getTypeOrPackage compoundName isValidBinding currentIndex checkVisibility PackageBinding PackageBinding packageBinding PackageBinding currentIndex nameLength packageBinding getTypeOrPackage compoundName currentIndex ProblemReferenceBinding CharOperation compoundName currentIndex NotFound isValidBinding ProblemReferenceBinding CharOperation compoundName currentIndex problemId PackageBinding packageBinding PackageBinding PackageBinding checkVisibility ReferenceBinding ReferenceBinding typeBinding ReferenceBinding checkVisibility typeBinding canBeSeenBy ProblemReferenceBinding CharOperation compoundName currentIndex typeBinding NotVisible currentIndex nameLength typeBinding getMemberType compoundName currentIndex typeBinding typeBinding isValidBinding ProblemReferenceBinding CharOperation compoundName currentIndex typeBinding problemId typeBinding
public final boolean is Defined In Field Field Binding field Scope scope this do if scope instanceof Method Scope Method Scope method Scope Method Scope scope if method Scope initialized Field field return true scope scope parent while scope null return false  isDefinedInField FieldBinding MethodScope MethodScope methodScope MethodScope methodScope initializedField
public final boolean is Defined In Method Method Binding method Scope scope this do if scope instanceof Method Scope Reference Context ref Context Method Scope scope reference Context if ref Context instanceof Abstract Method Declaration Abstract Method Declaration ref Context binding method return true scope scope parent while scope null return false  isDefinedInMethod MethodBinding MethodScope ReferenceContext refContext MethodScope referenceContext refContext AbstractMethodDeclaration AbstractMethodDeclaration refContext
public final boolean is Defined In Same Unit Reference Binding type find the outer most enclosing type Reference Binding enclosing Type type while type enclosing Type enclosing Type null enclosing Type type find the compilation unit scope Scope scope unit Scope this while scope unit Scope parent null unit Scope scope test that the enclosing Type is not part of the compilation unit Source Type Binding top Level Types Compilation Unit Scope unit Scope top Level Types for int i top Level Types length i 0 if top Level Types i enclosing Type return true return false  isDefinedInSameUnit ReferenceBinding ReferenceBinding enclosingType enclosingType enclosingType enclosingType unitScope unitScope unitScope enclosingType SourceTypeBinding topLevelTypes CompilationUnitScope unitScope topLevelTypes topLevelTypes topLevelTypes enclosingType
public final boolean is Defined In Type Reference Binding type Scope scope this do if scope instanceof Class Scope if Class Scope scope reference Context binding type return true scope scope parent while scope null return false  isDefinedInType ReferenceBinding ClassScope ClassScope referenceContext
public boolean is Inside Deprecated Code switch this kind case Scope BLOCK SCOPE case Scope METHOD SCOPE Method Scope method Scope method Scope if method Scope is Inside Initializer check method modifiers to see if deprecated Method Binding context Abstract Method Declaration method Scope reference Context binding if context null context is Viewed As Deprecated return true else Source Type Binding type Block Scope this reference Type binding inside field declaration check field modifier to see if deprecated if method Scope initialized Field null method Scope initialized Field is Viewed As Deprecated return true if type null type is Viewed As Deprecated return true break case Scope CLASS SCOPE Reference Binding context Class Scope this reference Type binding if context null context is Viewed As Deprecated return true break return false  isInsideDeprecatedCode BLOCK_SCOPE METHOD_SCOPE MethodScope methodScope methodScope methodScope isInsideInitializer MethodBinding AbstractMethodDeclaration methodScope referenceContext isViewedAsDeprecated SourceTypeBinding BlockScope referenceType methodScope initializedField methodScope initializedField isViewedAsDeprecated isViewedAsDeprecated CLASS_SCOPE ReferenceBinding ClassScope referenceType isViewedAsDeprecated
public final Method Scope method Scope Scope scope this do if scope instanceof Method Scope return Method Scope scope scope scope parent while scope null return null  MethodScope methodScope MethodScope MethodScope
protected final Method Binding most Specific Class Method Binding Method Binding visible int visible Size Method Binding method null Method Binding previous null next Visible for int i 0 i visible Size i method visible i if previous null method declaring Class previous declaring Class break cannot answer a method farther up the hierarchy than the first method found previous method for int j 0 j visible Size j if i j continue Method Binding next visible j if are Parameters Assignable next parameters method parameters continue next Visible compilation Unit Scope record Type References method thrown Exceptions return method return new Problem Method Binding visible 0 selector visible 0 parameters Ambiguous  MethodBinding mostSpecificClassMethodBinding MethodBinding visibleSize MethodBinding MethodBinding nextVisible visibleSize declaringClass declaringClass visibleSize MethodBinding areParametersAssignable nextVisible compilationUnitScope recordTypeReferences thrownExceptions ProblemMethodBinding
protected final Method Binding most Specific Interface Method Binding Method Binding visible int visible Size Method Binding method null next Visible for int i 0 i visible Size i method visible i for int j 0 j visible Size j if i j continue Method Binding next visible j if are Parameters Assignable next parameters method parameters continue next Visible compilation Unit Scope record Type References method thrown Exceptions return method return new Problem Method Binding visible 0 selector visible 0 parameters Ambiguous  MethodBinding mostSpecificInterfaceMethodBinding MethodBinding visibleSize MethodBinding nextVisible visibleSize visibleSize MethodBinding areParametersAssignable nextVisible compilationUnitScope recordTypeReferences thrownExceptions ProblemMethodBinding
protected final Method Binding most Specific Method Binding Method Binding visible int visible Size Method Binding method null next Visible for int i 0 i visible Size i method visible i for int j 0 j visible Size j if i j continue Method Binding next visible j if are Parameters Assignable next parameters method parameters continue next Visible compilation Unit Scope record Type References method thrown Exceptions return method return new Problem Method Binding visible 0 selector visible 0 parameters Ambiguous  MethodBinding mostSpecificMethodBinding MethodBinding visibleSize MethodBinding nextVisible visibleSize visibleSize MethodBinding areParametersAssignable nextVisible compilationUnitScope recordTypeReferences thrownExceptions ProblemMethodBinding
public final Class Scope outer Most Class Scope Class Scope last Class Scope null Scope scope this do if scope instanceof Class Scope last Class Scope Class Scope scope scope scope parent while scope null return last Class Scope may answer null if no class around  ClassScope outerMostClassScope ClassScope lastClassScope ClassScope lastClassScope ClassScope lastClassScope
public final Method Scope outer Most Method Scope Method Scope last Method Scope null Scope scope this do if scope instanceof Method Scope last Method Scope Method Scope scope scope scope parent while scope null return last Method Scope may answer null if no method around  MethodScope outerMostMethodScope MethodScope lastMethodScope MethodScope lastMethodScope MethodScope lastMethodScope
public abstract Problem Reporter problem Reporter  ProblemReporter problemReporter
public final Compilation Unit Declaration reference Compilation Unit Scope scope unit Scope this while scope unit Scope parent null unit Scope scope return Compilation Unit Scope unit Scope reference Context  CompilationUnitDeclaration referenceCompilationUnit unitScope unitScope unitScope CompilationUnitScope unitScope referenceContext
start position in this scope for ordering scopes vs variables int start Index return 0  startIndex
Returns the immediately enclosing switch Case statement carried by closest block Scope public Case Statement switch Case Scope scope this do if scope instanceof Block Scope return Block Scope scope switch Case scope scope parent while scope null return null  switchCase blockScope CaseStatement switchCase BlockScope BlockScope switchCase

public Source Type Binding char compound Name Package Binding f Package Class Scope scope this compound Name compound Name this f Package f Package this file Name scope reference Compilation Unit get File Name this modifiers scope reference Context modifiers this source Name scope reference Context name this scope scope expect the fields methods to be initialized correctly later this fields No Fields this methods No Methods compute Id  SourceTypeBinding compoundName PackageBinding fPackage ClassScope compoundName compoundName fPackage fPackage fileName referenceCompilationUnit getFileName referenceContext sourceName referenceContext NoFields NoMethods computeId
private void add Default Abstract Method Method Binding abstract Method Method Binding default Abstract new Method Binding abstract Method modifiers Acc Default Abstract abstract Method selector abstract Method return Type abstract Method parameters abstract Method thrown Exceptions this Method Binding temp new Method Binding methods length 1 System arraycopy methods 0 temp 0 methods length temp methods length default Abstract methods temp  addDefaultAbstractMethod MethodBinding abstractMethod MethodBinding defaultAbstract MethodBinding abstractMethod AccDefaultAbstract abstractMethod abstractMethod returnType abstractMethod abstractMethod thrownExceptions MethodBinding MethodBinding defaultAbstract
public void add Default Abstract Methods if tag Bits Knows Default Abstract Methods 0 return tag Bits Knows Default Abstract Methods if is Class is Abstract if f Package environment options targetJDK Class File Constants JDK1 2 return no longer added for post 1 2 targets Reference Binding interfaces To Visit new Reference Binding 5 int last Position 0 interfaces To Visit last Position super Interfaces for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j Reference Binding super Type interfaces j if super Type is Valid Binding Method Binding super Methods super Type methods for int m super Methods length m 0 Method Binding method super Methods m if implements Method method add Default Abstract Method method Reference Binding its Interfaces super Type super Interfaces if its Interfaces No Super Interfaces if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces  addDefaultAbstractMethods tagBits KnowsDefaultAbstractMethods tagBits KnowsDefaultAbstractMethods isClass isAbstract fPackage ClassFileConstants JDK1_2 ReferenceBinding interfacesToVisit ReferenceBinding lastPosition interfacesToVisit lastPosition superInterfaces lastPosition ReferenceBinding interfacesToVisit ReferenceBinding superType superType isValidBinding MethodBinding superMethods superType superMethods MethodBinding superMethods implementsMethod addDefaultAbstractMethod ReferenceBinding itsInterfaces superType superInterfaces itsInterfaces NoSuperInterfaces lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces
public Field Binding add Synthetic Field Local Variable Binding actual Outer Local Variable if synthetics null synthetics new Hashtable 4 if synthetics FIELD EMUL null synthetics FIELD EMUL new Hashtable 5 Field Binding synth Field Field Binding synthetics FIELD EMUL get actual Outer Local Variable if synth Field null synth Field new Synthetic Field Binding Char Operation concat Synthetic Argument Binding Outer Local Prefix actual Outer Local Variable name actual Outer Local Variable type Acc Private Acc Final Acc Synthetic this Constant NotA Constant synthetics FIELD EMUL size synthetics FIELD EMUL put actual Outer Local Variable synth Field ensure there is not already such a field defined by the user boolean need Recheck int index 1 do need Recheck false Field Binding existing Field if existing Field this get Field synth Field name true resolve null Type Declaration type Decl scope reference Context for int i 0 max type Decl fields length i max i Field Declaration field Decl type Decl fields i if field Decl binding existing Field synth Field name Char Operation concat Synthetic Argument Binding Outer Local Prefix actual Outer Local Variable name String value Of index to Char Array NON NLS 1 need Recheck true break while need Recheck return synth Field  FieldBinding addSyntheticField LocalVariableBinding actualOuterLocalVariable FIELD_EMUL FIELD_EMUL FieldBinding synthField FieldBinding FIELD_EMUL actualOuterLocalVariable synthField synthField SyntheticFieldBinding CharOperation SyntheticArgumentBinding OuterLocalPrefix actualOuterLocalVariable actualOuterLocalVariable AccPrivate AccFinal AccSynthetic NotAConstant FIELD_EMUL FIELD_EMUL actualOuterLocalVariable synthField needRecheck needRecheck FieldBinding existingField existingField getField synthField TypeDeclaration typeDecl referenceContext typeDecl FieldDeclaration fieldDecl typeDecl fieldDecl existingField synthField CharOperation SyntheticArgumentBinding OuterLocalPrefix actualOuterLocalVariable valueOf toCharArray needRecheck needRecheck synthField
public Field Binding add Synthetic Field Reference Binding enclosing Type if synthetics null synthetics new Hashtable 4 if synthetics FIELD EMUL null synthetics FIELD EMUL new Hashtable 5 Field Binding synth Field Field Binding synthetics FIELD EMUL get enclosing Type if synth Field null synth Field new Synthetic Field Binding Char Operation concat Synthetic Argument Binding Enclosing Instance Prefix String value Of enclosing Type depth to Char Array enclosing Type Acc Default Acc Final Acc Synthetic this Constant NotA Constant synthetics FIELD EMUL size synthetics FIELD EMUL put enclosing Type synth Field ensure there is not already such a field defined by the user Field Binding existing Field if existing Field this get Field synth Field name true resolve null Type Declaration type Decl scope reference Context for int i 0 max type Decl fields length i max i Field Declaration field Decl type Decl fields i if field Decl binding existing Field scope problem Reporter duplicate Field In Type this field Decl break return synth Field  FieldBinding addSyntheticField ReferenceBinding enclosingType FIELD_EMUL FIELD_EMUL FieldBinding synthField FieldBinding FIELD_EMUL enclosingType synthField synthField SyntheticFieldBinding CharOperation SyntheticArgumentBinding EnclosingInstancePrefix valueOf enclosingType toCharArray enclosingType AccDefault AccFinal AccSynthetic NotAConstant FIELD_EMUL FIELD_EMUL enclosingType synthField FieldBinding existingField existingField getField synthField TypeDeclaration typeDecl referenceContext typeDecl FieldDeclaration fieldDecl typeDecl fieldDecl existingField problemReporter duplicateFieldInType fieldDecl synthField
public Field Binding add Synthetic Field Type Binding target Type Block Scope block Scope if synthetics null synthetics new Hashtable 4 if synthetics CLASS LITERAL EMUL null synthetics CLASS LITERAL EMUL new Hashtable 5 use a different table than FIELDS given there might be a collision between emulation of X this 0 and X class Field Binding synth Field Field Binding synthetics CLASS LITERAL EMUL get target Type if synth Field null synth Field new Synthetic Field Binding class synthetics CLASS LITERAL EMUL size to Char Array NON NLS 1 block Scope get Java Lang Class Acc Default Acc Static Acc Synthetic this Constant NotA Constant synthetics CLASS LITERAL EMUL size synthetics CLASS LITERAL EMUL put target Type synth Field ensure there is not already such a field defined by the user Field Binding existing Field if existing Field this get Field synth Field name true resolve null Type Declaration type Decl block Scope reference Type for int i 0 max type Decl fields length i max i Field Declaration field Decl type Decl fields i if field Decl binding existing Field block Scope problem Reporter duplicate Field In Type this field Decl break return synth Field  FieldBinding addSyntheticField TypeBinding targetType BlockScope blockScope CLASS_LITERAL_EMUL CLASS_LITERAL_EMUL FieldBinding synthField FieldBinding CLASS_LITERAL_EMUL targetType synthField synthField SyntheticFieldBinding CLASS_LITERAL_EMUL toCharArray blockScope getJavaLangClass AccDefault AccStatic AccSynthetic NotAConstant CLASS_LITERAL_EMUL CLASS_LITERAL_EMUL targetType synthField FieldBinding existingField existingField getField synthField TypeDeclaration typeDecl blockScope referenceType typeDecl FieldDeclaration fieldDecl typeDecl fieldDecl existingField blockScope problemReporter duplicateFieldInType fieldDecl synthField
public Field Binding add Synthetic Field Assert Statement assert Statement Block Scope block Scope if synthetics null synthetics new Hashtable 4 if synthetics FIELD EMUL null synthetics FIELD EMUL new Hashtable 5 Field Binding synth Field Field Binding synthetics FIELD EMUL get assertion Emulation NON NLS 1 if synth Field null synth Field new Synthetic Field Binding assertions Disabled to Char Array NON NLS 1 Boolean Binding Acc Default Acc Static Acc Synthetic Acc Final this Constant NotA Constant synthetics FIELD EMUL size synthetics FIELD EMUL put assertion Emulation synth Field NON NLS 1 ensure there is not already such a field defined by the user ensure there is not already such a field defined by the user boolean need Recheck int index 0 do need Recheck false Field Binding existing Field if existing Field this get Field synth Field name true resolve null Type Declaration type Decl scope reference Context for int i 0 max type Decl fields length i max i Field Declaration field Decl type Decl fields i if field Decl binding existing Field synth Field name Char Operation concat assertions Disabled to Char Array NON NLS 1   String value Of index to Char Array NON NLS 1 need Recheck true break while need Recheck return synth Field  FieldBinding addSyntheticField AssertStatement assertStatement BlockScope blockScope FIELD_EMUL FIELD_EMUL FieldBinding synthField FieldBinding FIELD_EMUL assertionEmulation synthField synthField SyntheticFieldBinding assertionsDisabled toCharArray BooleanBinding AccDefault AccStatic AccSynthetic AccFinal NotAConstant FIELD_EMUL FIELD_EMUL assertionEmulation synthField needRecheck needRecheck FieldBinding existingField existingField getField synthField TypeDeclaration typeDecl referenceContext typeDecl FieldDeclaration fieldDecl typeDecl fieldDecl existingField synthField CharOperation assertionsDisabled toCharArray _ valueOf toCharArray needRecheck needRecheck synthField
public Synthetic Access Method Binding add Synthetic Method Field Binding target Field boolean is Read Access if synthetics null synthetics new Hashtable 4 if synthetics METHOD EMUL null synthetics METHOD EMUL new Hashtable 5 Synthetic Access Method Binding access Method null Synthetic Access Method Binding accessors Synthetic Access Method Binding synthetics METHOD EMUL get target Field if accessors null access Method new Synthetic Access Method Binding target Field is Read Access this synthetics METHOD EMUL put target Field accessors new Synthetic Access Method Binding 2 accessors is Read Access 0 1 access Method else if access Method accessors is Read Access 0 1 null access Method new Synthetic Access Method Binding target Field is Read Access this accessors is Read Access 0 1 access Method return access Method  SyntheticAccessMethodBinding addSyntheticMethod FieldBinding targetField isReadAccess METHOD_EMUL METHOD_EMUL SyntheticAccessMethodBinding accessMethod SyntheticAccessMethodBinding SyntheticAccessMethodBinding METHOD_EMUL targetField accessMethod SyntheticAccessMethodBinding targetField isReadAccess METHOD_EMUL targetField SyntheticAccessMethodBinding isReadAccess accessMethod accessMethod isReadAccess accessMethod SyntheticAccessMethodBinding targetField isReadAccess isReadAccess accessMethod accessMethod
public Synthetic Access Method Binding add Synthetic Method Method Binding target Method boolean is Super Access if synthetics null synthetics new Hashtable 4 if synthetics METHOD EMUL null synthetics METHOD EMUL new Hashtable 5 Synthetic Access Method Binding access Method null Synthetic Access Method Binding accessors Synthetic Access Method Binding synthetics METHOD EMUL get target Method if accessors null access Method new Synthetic Access Method Binding target Method is Super Access this synthetics METHOD EMUL put target Method accessors new Synthetic Access Method Binding 2 accessors is Super Access 0 1 access Method else if access Method accessors is Super Access 0 1 null access Method new Synthetic Access Method Binding target Method is Super Access this accessors is Super Access 0 1 access Method return access Method  SyntheticAccessMethodBinding addSyntheticMethod MethodBinding targetMethod isSuperAccess METHOD_EMUL METHOD_EMUL SyntheticAccessMethodBinding accessMethod SyntheticAccessMethodBinding SyntheticAccessMethodBinding METHOD_EMUL targetMethod accessMethod SyntheticAccessMethodBinding targetMethod isSuperAccess METHOD_EMUL targetMethod SyntheticAccessMethodBinding isSuperAccess accessMethod accessMethod isSuperAccess accessMethod SyntheticAccessMethodBinding targetMethod isSuperAccess isSuperAccess accessMethod accessMethod
public Field Binding available Fields return fields  FieldBinding availableFields
return fields public Method Binding available Methods return methods  MethodBinding availableMethods
void fault In Types For Fields And Methods fields methods for int i 0 length member Types length i length i Source Type Binding member Types i fault In Types For Fields And Methods  faultInTypesForFieldsAndMethods memberTypes SourceTypeBinding memberTypes faultInTypesForFieldsAndMethods
public Field Binding fields try int failed 0 for int f 0 max fields length f max f if resolve Type For fields f null fields f null failed if failed 0 int new Size fields length failed if new Size 0 return fields No Fields Field Binding new Fields new Field Binding new Size for int i 0 n 0 max fields length i max i if fields i null new Fields n fields i fields new Fields catch Abort Compilation e ensure null fields are removed Field Binding new Fields null int count 0 for int i 0 max fields length i max i Field Binding field fields i if field null new Fields null System arraycopy fields 0 new Fields new Field Binding max 0 i else if new Fields null field null new Fields count field if new Fields null System arraycopy new Fields 0 fields new Field Binding count 0 count throw e return fields  FieldBinding resolveTypeFor newSize newSize NoFields FieldBinding newFields FieldBinding newSize newFields newFields AbortCompilation FieldBinding newFields FieldBinding newFields newFields FieldBinding newFields newFields newFields newFields FieldBinding
public Method Binding get Default Abstract Methods int count 0 for int i methods length i 0 if methods i is Default Abstract count if count 0 return No Methods Method Binding result new Method Binding count count 0 for int i methods length i 0 if methods i is Default Abstract result count methods i return result  MethodBinding getDefaultAbstractMethods isDefaultAbstract NoMethods MethodBinding MethodBinding isDefaultAbstract
public Method Binding get Exact Constructor Type Binding argument Types int arg Count argument Types length if modifiers Acc Unresolved 0 have resolved all arg types return type of the methods next Method for int m methods length m 0 Method Binding method methods m if method selector Constructor Declaration Constant Pool Name method parameters length arg Count Type Binding to Match method parameters for int p 0 p arg Count p if to Match p argument Types p continue next Method return method else Method Binding constructors get Methods Constructor Declaration Constant Pool Name takes care of duplicates default abstract methods next Constructor for int c constructors length c 0 Method Binding constructor constructors c Type Binding to Match constructor parameters if to Match length arg Count for int p 0 p arg Count p if to Match p argument Types p continue next Constructor return constructor return null  MethodBinding getExactConstructor TypeBinding argumentTypes argCount argumentTypes AccUnresolved nextMethod MethodBinding ConstructorDeclaration ConstantPoolName argCount TypeBinding toMatch argCount toMatch argumentTypes nextMethod MethodBinding getMethods ConstructorDeclaration ConstantPoolName nextConstructor MethodBinding TypeBinding toMatch toMatch argCount argCount toMatch argumentTypes nextConstructor
public Method Binding get Exact Method char selector Type Binding argument Types int arg Count argument Types length int selector Length selector length boolean found Nothing true if modifiers Acc Unresolved 0 have resolved all arg types return type of the methods next Method for int m methods length m 0 Method Binding method methods m if method selector length selector Length Char Operation equals method selector selector found Nothing false inner type lookups must know that a method with this name exists if method parameters length arg Count Type Binding to Match method parameters for int p 0 p arg Count p if to Match p argument Types p continue next Method return method else Method Binding matching Methods get Methods selector takes care of duplicates default abstract methods found Nothing matching Methods No Methods next Method for int m matching Methods length m 0 Method Binding method matching Methods m Type Binding to Match method parameters if to Match length arg Count for int p 0 p arg Count p if to Match p argument Types p continue next Method return method if found Nothing if is Interface if super Interfaces length 1 return super Interfaces 0 get Exact Method selector argument Types else if superclass null return superclass get Exact Method selector argument Types return null  MethodBinding getExactMethod TypeBinding argumentTypes argCount argumentTypes selectorLength foundNothing AccUnresolved nextMethod MethodBinding selectorLength CharOperation foundNothing argCount TypeBinding toMatch argCount toMatch argumentTypes nextMethod MethodBinding matchingMethods getMethods foundNothing matchingMethods NoMethods nextMethod matchingMethods MethodBinding matchingMethods TypeBinding toMatch toMatch argCount argCount toMatch argumentTypes nextMethod foundNothing isInterface superInterfaces superInterfaces getExactMethod argumentTypes getExactMethod argumentTypes
public Field Binding get Field char field Name boolean need Resolve always resolve anyway on source types int field Length field Name length for int f fields length f 0 Field Binding field fields f if field name length field Length Char Operation equals field name field Name if resolve Type For field null return field int new Size fields length 1 if new Size 0 fields No Fields else Field Binding new Fields new Field Binding new Size System arraycopy fields 0 new Fields 0 f System arraycopy fields f 1 new Fields f new Size f fields new Fields return null return null  FieldBinding getField fieldName needResolve fieldLength fieldName FieldBinding fieldLength CharOperation fieldName resolveTypeFor newSize newSize NoFields FieldBinding newFields FieldBinding newSize newFields newFields newSize newFields
public Method Binding get Methods char selector handle forward references to potential default abstract methods add Default Abstract Methods try int count 0 int last Index 1 int selector Length selector length if modifiers Acc Unresolved 0 have resolved all arg types return type of the methods for int m 0 length methods length m length m Method Binding method methods m if method selector length selector Length Char Operation equals method selector selector count last Index m else boolean found Problem false int failed 0 for int m 0 length methods length m length m Method Binding method methods m if method selector length selector Length Char Operation equals method selector selector if resolve Types For method null found Problem true methods m null unable to resolve parameters failed else if method return Type null found Problem true else count last Index m if found Problem count 1 for int m methods length m 0 Method Binding method methods m if method null method selector length selector Length Char Operation equals method selector selector Abstract Method Declaration method Decl null for int i 0 i m i Method Binding method2 methods i if method2 null Char Operation equals method selector method2 selector if method are Parameters Equal method2 if method Decl null method Decl method source Method cannot be retrieved after binding is lost scope problem Reporter duplicate Method In Type this method Decl method Decl binding null methods m null failed scope problem Reporter duplicate Method In Type this method2 source Method method2 source Method binding null methods i null failed if method return Type null method Decl null forget method with invalid return type was kept to detect possible collisions method source Method binding null methods m null failed if failed 0 int new Size methods length failed if new Size 0 return methods No Methods Method Binding new Methods new Method Binding new Size for int i 0 n 0 max methods length i max i if methods i null new Methods n methods i methods new Methods return get Methods selector try again now that the problem methods have been removed if count 1 return new Method Binding methods last Index if count 1 Method Binding result new Method Binding count count 0 for int m 0 m last Index m Method Binding method methods m if method selector length selector Length Char Operation equals method selector selector result count method return result catch Abort Compilation e ensure null methods are removed Method Binding new Methods null int count 0 for int i 0 max methods length i max i Method Binding method methods i if method null new Methods null System arraycopy methods 0 new Methods new Method Binding max 0 i else if new Methods null method null new Methods count method if new Methods null System arraycopy new Methods 0 methods new Method Binding count 0 count modifiers Acc Unresolved throw e return No Methods  MethodBinding getMethods addDefaultAbstractMethods lastIndex selectorLength AccUnresolved MethodBinding selectorLength CharOperation lastIndex foundProblem MethodBinding selectorLength CharOperation resolveTypesFor foundProblem returnType foundProblem lastIndex foundProblem MethodBinding selectorLength CharOperation AbstractMethodDeclaration methodDecl MethodBinding CharOperation areParametersEqual methodDecl methodDecl sourceMethod problemReporter duplicateMethodInType methodDecl methodDecl problemReporter duplicateMethodInType sourceMethod sourceMethod returnType methodDecl sourceMethod newSize newSize NoMethods MethodBinding newMethods MethodBinding newSize newMethods newMethods getMethods MethodBinding lastIndex MethodBinding MethodBinding lastIndex MethodBinding selectorLength CharOperation AbortCompilation MethodBinding newMethods MethodBinding newMethods newMethods MethodBinding newMethods newMethods newMethods newMethods MethodBinding AccUnresolved NoMethods
public Field Binding get Synthetic Field Local Variable Binding actual Outer Local Variable if synthetics null synthetics FIELD EMUL null return null return Field Binding synthetics FIELD EMUL get actual Outer Local Variable  FieldBinding getSyntheticField LocalVariableBinding actualOuterLocalVariable FIELD_EMUL FieldBinding FIELD_EMUL actualOuterLocalVariable
return Field Binding synthetics FIELD EMUL get actual Outer Local Variable public Reference Binding member Types return this member Types  FieldBinding FIELD_EMUL actualOuterLocalVariable ReferenceBinding memberTypes memberTypes
public Field Binding get Updated Field Binding Field Binding target Field Reference Binding new Declaring Class if this synthetics null this synthetics new Hashtable 4 if this synthetics RECEIVER TYPE EMUL null this synthetics RECEIVER TYPE EMUL new Hashtable 5 Hashtable field Map Hashtable this synthetics RECEIVER TYPE EMUL get target Field if field Map null field Map new Hashtable 5 this synthetics RECEIVER TYPE EMUL put target Field field Map Field Binding updated Field Field Binding field Map get new Declaring Class if updated Field null updated Field new Field Binding target Field new Declaring Class field Map put new Declaring Class updated Field return updated Field  FieldBinding getUpdatedFieldBinding FieldBinding targetField ReferenceBinding newDeclaringClass RECEIVER_TYPE_EMUL RECEIVER_TYPE_EMUL fieldMap RECEIVER_TYPE_EMUL targetField fieldMap fieldMap RECEIVER_TYPE_EMUL targetField fieldMap FieldBinding updatedField FieldBinding fieldMap newDeclaringClass updatedField updatedField FieldBinding targetField newDeclaringClass fieldMap newDeclaringClass updatedField updatedField
public Method Binding get Updated Method Binding Method Binding target Method Reference Binding new Declaring Class if this synthetics null this synthetics new Hashtable 4 if this synthetics RECEIVER TYPE EMUL null this synthetics RECEIVER TYPE EMUL new Hashtable 5 Hashtable method Map Hashtable synthetics RECEIVER TYPE EMUL get target Method if method Map null method Map new Hashtable 5 this synthetics RECEIVER TYPE EMUL put target Method method Map Method Binding updated Method Method Binding method Map get new Declaring Class if updated Method null updated Method new Method Binding target Method new Declaring Class method Map put new Declaring Class updated Method return updated Method  MethodBinding getUpdatedMethodBinding MethodBinding targetMethod ReferenceBinding newDeclaringClass RECEIVER_TYPE_EMUL RECEIVER_TYPE_EMUL methodMap RECEIVER_TYPE_EMUL targetMethod methodMap methodMap RECEIVER_TYPE_EMUL targetMethod methodMap MethodBinding updatedMethod MethodBinding methodMap newDeclaringClass updatedMethod updatedMethod MethodBinding targetMethod newDeclaringClass methodMap newDeclaringClass updatedMethod updatedMethod
return updated Method public boolean has Member Types return this member Types length 0  updatedMethod hasMemberTypes memberTypes
NOTE the return type arg exception types of each method of a source type are resolved when needed public Method Binding methods try if modifiers Acc Unresolved 0 return methods int failed 0 for int m 0 max methods length m max m if resolve Types For methods m null methods m null unable to resolve parameters failed for int m methods length m 0 Method Binding method methods m if method null Abstract Method Declaration method Decl null for int i 0 i m i Method Binding method2 methods i if method2 null Char Operation equals method selector method2 selector if method are Parameters Equal method2 if method Decl null method Decl method source Method cannot be retrieved after binding is lost scope problem Reporter duplicate Method In Type this method Decl method Decl binding null methods m null failed scope problem Reporter duplicate Method In Type this method2 source Method method2 source Method binding null methods i null failed if method return Type null method Decl null forget method with invalid return type was kept to detect possible collisions method source Method binding null methods m null failed if failed 0 int new Size methods length failed if new Size 0 methods No Methods else Method Binding new Methods new Method Binding new Size for int m 0 n 0 max methods length m max m if methods m null new Methods n methods m methods new Methods handle forward references to potential default abstract methods add Default Abstract Methods catch Abort Compilation e ensure null methods are removed Method Binding new Methods null int count 0 for int i 0 max methods length i max i Method Binding method methods i if method null new Methods null System arraycopy methods 0 new Methods new Method Binding max 0 i else if new Methods null method null new Methods count method if new Methods null System arraycopy new Methods 0 methods new Method Binding count 0 count modifiers Acc Unresolved throw e modifiers Acc Unresolved return methods  MethodBinding AccUnresolved resolveTypesFor MethodBinding AbstractMethodDeclaration methodDecl MethodBinding CharOperation areParametersEqual methodDecl methodDecl sourceMethod problemReporter duplicateMethodInType methodDecl methodDecl problemReporter duplicateMethodInType sourceMethod sourceMethod returnType methodDecl sourceMethod newSize newSize NoMethods MethodBinding newMethods MethodBinding newSize newMethods newMethods addDefaultAbstractMethods AbortCompilation MethodBinding newMethods MethodBinding newMethods newMethods MethodBinding newMethods newMethods newMethods newMethods MethodBinding AccUnresolved AccUnresolved
private Field Binding resolve Type For Field Binding field if field modifiers Acc Unresolved 0 return field Field Declaration field Decls scope reference Context fields for int f 0 length field Decls length f length f if field Decls f binding field continue field type field Decls f get Type Binding scope field modifiers Acc Unresolved if field type is Valid Binding scope problem Reporter field Type Problem this field Decls f field type scope problem Reporter invalid Type field Decls f type field type field Decls f binding null return null if field type Void Binding scope problem Reporter variable Type Cannot Be Void field Decls f field Decls f binding null return null if field type is Array Type Array Binding field type leaf Component Type Void Binding scope problem Reporter variable Type Cannot Be Void Array field Decls f field Decls f binding null return null return field return null should never reach this point  FieldBinding resolveTypeFor FieldBinding AccUnresolved FieldDeclaration fieldDecls referenceContext fieldDecls fieldDecls fieldDecls getTypeBinding AccUnresolved isValidBinding problemReporter fieldTypeProblem fieldDecls problemReporter invalidType fieldDecls fieldDecls VoidBinding problemReporter variableTypeCannotBeVoid fieldDecls fieldDecls isArrayType ArrayBinding leafComponentType VoidBinding problemReporter variableTypeCannotBeVoidArray fieldDecls fieldDecls
private Method Binding resolve Types For Method Binding method if method modifiers Acc Unresolved 0 return method Abstract Method Declaration method Decl method source Method Type Reference exception Types method Decl thrown Exceptions if exception Types null int size exception Types length method thrown Exceptions new Reference Binding size Reference Binding throwable scope get Java Lang Throwable int count 0 Reference Binding resolved Exception Type for int i 0 i size i resolved Exception Type Reference Binding exception Types i get Type Binding scope if resolved Exception Type is Valid Binding method Decl scope problem Reporter exception Type Problem this method Decl exception Types i resolved Exception Type method Decl scope problem Reporter invalid Type exception Types i resolved Exception Type continue if throwable resolved Exception Type throwable is Superclass Of resolved Exception Type method Decl scope problem Reporter cannot Throw Type this method Decl exception Types i resolved Exception Type continue method thrown Exceptions count resolved Exception Type if count size System arraycopy method thrown Exceptions 0 method thrown Exceptions new Reference Binding count 0 count boolean found Arg Problem false Argument arguments method Decl arguments if arguments null int size arguments length method parameters new Type Binding size for int i 0 i size i Argument arg arguments i method parameters i arg type get Type Binding scope if method parameters i is Valid Binding method Decl scope problem Reporter argument Type Problem this method Decl arg method parameters i method Decl scope problem Reporter invalid Type arg method parameters i found Arg Problem true else if method parameters i Void Binding method Decl scope problem Reporter argument Type Cannot Be Void this method Decl arg found Arg Problem true else if method parameters i is Array Type Array Binding method parameters i leaf Component Type Void Binding method Decl scope problem Reporter argument Type Cannot Be Void Array this method Decl arg found Arg Problem true boolean found Return Type Problem false if method is Constructor Type Reference return Type Method Declaration method Decl return Type if return Type null method Decl scope problem Reporter missing Return Type method Decl method return Type null found Return Type Problem true else method return Type return Type get Type Binding scope if method return Type is Valid Binding method Decl scope problem Reporter return Type Problem this Method Declaration method Decl method return Type method Decl scope problem Reporter invalid Type return Type method return Type method return Type null found Return Type Problem true else if method return Type is Array Type Array Binding method return Type leaf Component Type Void Binding method Decl scope problem Reporter return Type Cannot Be Void Array this Method Declaration method Decl method return Type null found Return Type Problem true if found Arg Problem method Decl binding null return null if found Return Type Problem return method but its still unresolved with a null return type is still connected to its method declaration method modifiers Acc Unresolved return method  MethodBinding resolveTypesFor MethodBinding AccUnresolved AbstractMethodDeclaration methodDecl sourceMethod TypeReference exceptionTypes methodDecl thrownExceptions exceptionTypes exceptionTypes thrownExceptions ReferenceBinding ReferenceBinding getJavaLangThrowable ReferenceBinding resolvedExceptionType resolvedExceptionType ReferenceBinding exceptionTypes getTypeBinding resolvedExceptionType isValidBinding methodDecl problemReporter exceptionTypeProblem methodDecl exceptionTypes resolvedExceptionType methodDecl problemReporter invalidType exceptionTypes resolvedExceptionType resolvedExceptionType isSuperclassOf resolvedExceptionType methodDecl problemReporter cannotThrowType methodDecl exceptionTypes resolvedExceptionType thrownExceptions resolvedExceptionType thrownExceptions thrownExceptions ReferenceBinding foundArgProblem methodDecl TypeBinding getTypeBinding isValidBinding methodDecl problemReporter argumentTypeProblem methodDecl methodDecl problemReporter invalidType foundArgProblem VoidBinding methodDecl problemReporter argumentTypeCannotBeVoid methodDecl foundArgProblem isArrayType ArrayBinding leafComponentType VoidBinding methodDecl problemReporter argumentTypeCannotBeVoidArray methodDecl foundArgProblem foundReturnTypeProblem isConstructor TypeReference returnType MethodDeclaration methodDecl returnType returnType methodDecl problemReporter missingReturnType methodDecl returnType foundReturnTypeProblem returnType returnType getTypeBinding returnType isValidBinding methodDecl problemReporter returnTypeProblem MethodDeclaration methodDecl returnType methodDecl problemReporter invalidType returnType returnType returnType foundReturnTypeProblem returnType isArrayType ArrayBinding returnType leafComponentType VoidBinding methodDecl problemReporter returnTypeCannotBeVoidArray MethodDeclaration methodDecl returnType foundReturnTypeProblem foundArgProblem methodDecl foundReturnTypeProblem AccUnresolved
return method public final int source End return scope reference Context source End  sourceEnd referenceContext sourceEnd
return scope reference Context source End public final int source Start return scope reference Context source Start  referenceContext sourceEnd sourceStart referenceContext sourceStart
return scope reference Context source Start public Reference Binding superclass return superclass  referenceContext sourceStart ReferenceBinding
return superclass public Reference Binding super Interfaces return super Interfaces  ReferenceBinding superInterfaces superInterfaces
public Synthetic Access Method Binding synthetic Access Methods if synthetics null synthetics METHOD EMUL null synthetics METHOD EMUL size 0 return null difficult to compute size up front because of the embedded arrays so assume there is only 1 int index 0 Synthetic Access Method Binding bindings new Synthetic Access Method Binding 1 Enumeration fields Or Methods synthetics METHOD EMUL keys while fields Or Methods has More Elements Object field Or Method fields Or Methods next Element if field Or Method instanceof Method Binding Synthetic Access Method Binding method Accessors Synthetic Access Method Binding synthetics METHOD EMUL get field Or Method int number Of Accessors 0 if method Accessors 0 null number Of Accessors if method Accessors 1 null number Of Accessors if index number Of Accessors bindings length System arraycopy bindings 0 bindings new Synthetic Access Method Binding index number Of Accessors 0 index if method Accessors 0 null bindings index method Accessors 0 super access if method Accessors 1 null bindings index method Accessors 1 normal access else Synthetic Access Method Binding field Accessors Synthetic Access Method Binding synthetics METHOD EMUL get field Or Method int number Of Accessors 0 if field Accessors 0 null number Of Accessors if field Accessors 1 null number Of Accessors if index number Of Accessors bindings length System arraycopy bindings 0 bindings new Synthetic Access Method Binding index number Of Accessors 0 index if field Accessors 0 null bindings index field Accessors 0 read access if field Accessors 1 null bindings index field Accessors 1 write access sort them in according to their own indexes int length Synthetic Access Method Binding sorted Bindings new Synthetic Access Method Binding length bindings length for int i 0 i length i Synthetic Access Method Binding binding bindings i sorted Bindings binding index binding return sorted Bindings  SyntheticAccessMethodBinding syntheticAccessMethods METHOD_EMUL METHOD_EMUL SyntheticAccessMethodBinding SyntheticAccessMethodBinding fieldsOrMethods METHOD_EMUL fieldsOrMethods hasMoreElements fieldOrMethod fieldsOrMethods nextElement fieldOrMethod MethodBinding SyntheticAccessMethodBinding methodAccessors SyntheticAccessMethodBinding METHOD_EMUL fieldOrMethod numberOfAccessors methodAccessors numberOfAccessors methodAccessors numberOfAccessors numberOfAccessors SyntheticAccessMethodBinding numberOfAccessors methodAccessors methodAccessors methodAccessors methodAccessors SyntheticAccessMethodBinding fieldAccessors SyntheticAccessMethodBinding METHOD_EMUL fieldOrMethod numberOfAccessors fieldAccessors numberOfAccessors fieldAccessors numberOfAccessors numberOfAccessors SyntheticAccessMethodBinding numberOfAccessors fieldAccessors fieldAccessors fieldAccessors fieldAccessors SyntheticAccessMethodBinding sortedBindings SyntheticAccessMethodBinding SyntheticAccessMethodBinding sortedBindings sortedBindings
Answer the collection of synthetic fields to append into the classfile public Field Binding synthetic Fields if synthetics null return null int field Size synthetics FIELD EMUL null 0 synthetics FIELD EMUL size int literal Size synthetics CLASS LITERAL EMUL null 0 synthetics CLASS LITERAL EMUL size int total Size field Size literal Size if total Size 0 return null Field Binding bindings new Field Binding total Size add innerclass synthetics if synthetics FIELD EMUL null Enumeration elements synthetics FIELD EMUL elements for int i 0 i field Size i Synthetic Field Binding synth Binding Synthetic Field Binding elements next Element bindings synth Binding index synth Binding add class literal synthetics if synthetics CLASS LITERAL EMUL null Enumeration elements synthetics CLASS LITERAL EMUL elements for int i 0 i literal Size i Synthetic Field Binding synth Binding Synthetic Field Binding elements next Element bindings field Size synth Binding index synth Binding return bindings  FieldBinding syntheticFields fieldSize FIELD_EMUL FIELD_EMUL literalSize CLASS_LITERAL_EMUL CLASS_LITERAL_EMUL totalSize fieldSize literalSize totalSize FieldBinding FieldBinding totalSize FIELD_EMUL FIELD_EMUL fieldSize SyntheticFieldBinding synthBinding SyntheticFieldBinding nextElement synthBinding synthBinding CLASS_LITERAL_EMUL CLASS_LITERAL_EMUL literalSize SyntheticFieldBinding synthBinding SyntheticFieldBinding nextElement fieldSize synthBinding synthBinding
public String to String String s id id No Id No Id id n NON NLS 3 NON NLS 2 NON NLS 4 NON NLS 1 if is Deprecated s deprecated NON NLS 1 if is Public s public NON NLS 1 if is Protected s protected NON NLS 1 if is Private s private NON NLS 1 if is Abstract is Class s abstract NON NLS 1 if is Static is Nested Type s static NON NLS 1 if is Final s final NON NLS 1 s is Interface interface class NON NLS 1 NON NLS 2 s compound Name null Char Operation to String compound Name UNNAMED TYPE NON NLS 1 s n textends NON NLS 1 s superclass null superclass debug Name NULL TYPE NON NLS 1 if super Interfaces null if super Interfaces No Super Interfaces s n timplements NON NLS 1 for int i 0 length super Interfaces length i length i if i 0 s NON NLS 1 s super Interfaces i null super Interfaces i debug Name NULL TYPE NON NLS 1 else s NULL SUPERINTERFACES NON NLS 1 if enclosing Type null s n tenclosing type NON NLS 1 s enclosing Type debug Name if fields null if fields No Fields s n fields NON NLS 1 for int i 0 length fields length i length i s fields i null n fields i to String nNULL FIELD NON NLS 1 NON NLS 2 else s NULL FIELDS NON NLS 1 if methods null if methods No Methods s n methods NON NLS 1 for int i 0 length methods length i length i s methods i null n methods i to String nNULL METHOD NON NLS 1 NON NLS 2 else s NULL METHODS NON NLS 1 if member Types null if member Types No Member Types s n members NON NLS 1 for int i 0 length member Types length i length i s member Types i null n member Types i to String nNULL TYPE NON NLS 1 NON NLS 2 else s NULL MEMBER TYPES NON NLS 1 s n n n NON NLS 1 return s  toString NoId NoId isDeprecated isPublic isProtected isPrivate isAbstract isClass isStatic isNestedType isFinal isInterface compoundName CharOperation toString compoundName debugName superInterfaces superInterfaces NoSuperInterfaces superInterfaces superInterfaces superInterfaces debugName enclosingType enclosingType debugName NoFields toString NoMethods toString memberTypes memberTypes NoMemberTypes memberTypes memberTypes memberTypes toString
void verify Methods Method Verifier verifier verifier verify this for int i member Types length i 0 Source Type Binding member Types i verify Methods verifier  verifyMethods MethodVerifier memberTypes SourceTypeBinding memberTypes verifyMethods
public Field Binding get Synthetic Field Reference Binding target Enclosing Type boolean only Exact Match if synthetics null synthetics FIELD EMUL null return null Field Binding field Field Binding synthetics FIELD EMUL get target Enclosing Type if field null return field type compatibility to handle cases such as class T class M class S extends T class N extends M need to use S as a default enclosing instance for the super constructor call in N if only Exact Match Enumeration access Fields synthetics FIELD EMUL elements while access Fields has More Elements field Field Binding access Fields next Element if Char Operation prefix Equals Synthetic Argument Binding Enclosing Instance Prefix field name target Enclosing Type is Superclass Of Reference Binding field type return field return null  FieldBinding getSyntheticField ReferenceBinding targetEnclosingType onlyExactMatch FIELD_EMUL FieldBinding FieldBinding FIELD_EMUL targetEnclosingType onlyExactMatch accessFields FIELD_EMUL accessFields hasMoreElements FieldBinding accessFields nextElement CharOperation prefixEquals SyntheticArgumentBinding EnclosingInstancePrefix targetEnclosingType isSuperclassOf ReferenceBinding

public Synthetic Access Method Binding Field Binding target Field boolean is Read Access Reference Binding declaring Class this modifiers Acc Default Acc Static Acc Synthetic Source Type Binding declaring Source Type Source Type Binding declaring Class Synthetic Access Method Binding known Access Methods declaring Source Type synthetic Access Methods int method Id known Access Methods null 0 known Access Methods length this index method Id this selector Char Operation concat Access Method Prefix String value Of method Id to Char Array if is Read Access this return Type target Field type if target Field is Static this parameters No Parameters else this parameters new Type Binding 1 this parameters 0 declaring Source Type this target Read Field target Field this access Type Field Read Access else this return Type Void Binding if target Field is Static this parameters new Type Binding 1 this parameters 0 target Field type else this parameters new Type Binding 2 this parameters 0 declaring Source Type this parameters 1 target Field type this target Write Field target Field this access Type Field Write Access this thrown Exceptions No Exceptions this declaring Class declaring Source Type check for method collision boolean need Rename do check need Rename false check for collision with known methods Method Binding methods declaring Source Type methods for int i 0 length methods length i length i if Char Operation equals this selector methods i selector this are Parameters Equal methods i need Rename true break check check for collision with synthetic accessors if known Access Methods null for int i 0 length known Access Methods length i length i if known Access Methods i null continue if Char Operation equals this selector known Access Methods i selector this are Parameters Equal methods i need Rename true break check if need Rename retry with a selector postfixed by a growing method Id this set Selector Char Operation concat Access Method Prefix String value Of method Id to Char Array while need Rename retrieve source Start position for the target field for line number attributes Field Declaration field Decls declaring Source Type scope reference Context fields if field Decls null for int i 0 max field Decls length i max i if field Decls i binding target Field this source Start field Decls i source Start return did not find the target field declaration it is a synthetic one public class A public class B public class C void foo System out println A this A this public static void main String args new A new B new C foo We now at this point per construction it is for sure an enclosing instance we are going to show the target field type declaration location this source Start declaring Source Type scope reference Context source Start use the target declaring class name position instead  SyntheticAccessMethodBinding FieldBinding targetField isReadAccess ReferenceBinding declaringClass AccDefault AccStatic AccSynthetic SourceTypeBinding declaringSourceType SourceTypeBinding declaringClass SyntheticAccessMethodBinding knownAccessMethods declaringSourceType syntheticAccessMethods methodId knownAccessMethods knownAccessMethods methodId CharOperation AccessMethodPrefix valueOf methodId toCharArray isReadAccess returnType targetField targetField isStatic NoParameters TypeBinding declaringSourceType targetReadField targetField accessType FieldReadAccess returnType VoidBinding targetField isStatic TypeBinding targetField TypeBinding declaringSourceType targetField targetWriteField targetField accessType FieldWriteAccess thrownExceptions NoExceptions declaringClass declaringSourceType needRename needRename MethodBinding declaringSourceType CharOperation areParametersEqual needRename knownAccessMethods knownAccessMethods knownAccessMethods CharOperation knownAccessMethods areParametersEqual needRename needRename methodId setSelector CharOperation AccessMethodPrefix valueOf methodId toCharArray needRename sourceStart FieldDeclaration fieldDecls declaringSourceType referenceContext fieldDecls fieldDecls fieldDecls targetField sourceStart fieldDecls sourceStart sourceStart declaringSourceType referenceContext sourceStart
public Synthetic Access Method Binding Method Binding target Method boolean is Super Access Reference Binding receiver Type if target Method is Constructor this initialize Constructor Accessor target Method else this initialize Method Accessor target Method is Super Access receiver Type  SyntheticAccessMethodBinding MethodBinding targetMethod isSuperAccess ReferenceBinding receiverType targetMethod isConstructor initializeConstructorAccessor targetMethod initializeMethodAccessor targetMethod isSuperAccess receiverType
An constructor accessor is a constructor with an extra argument declaring Class in case of collision with an existing constructor then add again an extra argument declaring Class again public void initialize Constructor Accessor Method Binding accessed Constructor this target Method accessed Constructor this modifiers Acc Default Acc Synthetic Source Type Binding source Type Source Type Binding accessed Constructor declaring Class Synthetic Access Method Binding known Access Methods source Type synthetic Access Methods this index known Access Methods null 0 known Access Methods length this selector accessed Constructor selector this return Type accessed Constructor return Type this access Type Constructor Access this parameters new Type Binding accessed Constructor parameters length 1 System arraycopy accessed Constructor parameters 0 this parameters 0 accessed Constructor parameters length parameters accessed Constructor parameters length accessed Constructor declaring Class this thrown Exceptions accessed Constructor thrown Exceptions this declaring Class source Type check for method collision boolean need Rename do check need Rename false check for collision with known methods Method Binding methods source Type methods for int i 0 length methods length i length i if Char Operation equals this selector methods i selector this are Parameters Equal methods i need Rename true break check check for collision with synthetic accessors if known Access Methods null for int i 0 length known Access Methods length i length i if known Access Methods i null continue if Char Operation equals this selector known Access Methods i selector this are Parameters Equal known Access Methods i need Rename true break check if need Rename retry with a new extra argument int length this parameters length System arraycopy this parameters 0 this parameters new Type Binding length 1 0 length this parameters length this declaring Class while need Rename retrieve source Start position for the target method for line number attributes Abstract Method Declaration method Decls source Type scope reference Context methods if method Decls null for int i 0 length method Decls length i length i if method Decls i binding accessed Constructor this source Start method Decls i source Start return  declaringClass declaringClass initializeConstructorAccessor MethodBinding accessedConstructor targetMethod accessedConstructor AccDefault AccSynthetic SourceTypeBinding sourceType SourceTypeBinding accessedConstructor declaringClass SyntheticAccessMethodBinding knownAccessMethods sourceType syntheticAccessMethods knownAccessMethods knownAccessMethods accessedConstructor returnType accessedConstructor returnType accessType ConstructorAccess TypeBinding accessedConstructor accessedConstructor accessedConstructor accessedConstructor accessedConstructor declaringClass thrownExceptions accessedConstructor thrownExceptions declaringClass sourceType needRename needRename MethodBinding sourceType CharOperation areParametersEqual needRename knownAccessMethods knownAccessMethods knownAccessMethods CharOperation knownAccessMethods areParametersEqual knownAccessMethods needRename needRename TypeBinding declaringClass needRename sourceStart AbstractMethodDeclaration methodDecls sourceType referenceContext methodDecls methodDecls methodDecls accessedConstructor sourceStart methodDecls sourceStart
An method accessor is a method with an access N selector where N is incremented in case of collisions public void initialize Method Accessor Method Binding accessed Method boolean is Super Access Reference Binding receiver Type this target Method accessed Method this modifiers Acc Default Acc Static Acc Synthetic Source Type Binding declaring Source Type Source Type Binding receiver Type Synthetic Access Method Binding known Access Methods declaring Source Type synthetic Access Methods int method Id known Access Methods null 0 known Access Methods length this index method Id this selector Char Operation concat Access Method Prefix String value Of method Id to Char Array this return Type accessed Method return Type this access Type is Super Access Super Method Access Method Access if accessed Method is Static this parameters accessed Method parameters else this parameters new Type Binding accessed Method parameters length 1 this parameters 0 declaring Source Type System arraycopy accessed Method parameters 0 this parameters 1 accessed Method parameters length this thrown Exceptions accessed Method thrown Exceptions this declaring Class declaring Source Type check for method collision boolean need Rename do check need Rename false check for collision with known methods Method Binding methods declaring Source Type methods for int i 0 length methods length i length i if Char Operation equals this selector methods i selector this are Parameters Equal methods i need Rename true break check check for collision with synthetic accessors if known Access Methods null for int i 0 length known Access Methods length i length i if known Access Methods i null continue if Char Operation equals this selector known Access Methods i selector this are Parameters Equal known Access Methods i need Rename true break check if need Rename retry with a selector a growing method Id this set Selector Char Operation concat Access Method Prefix String value Of method Id to Char Array while need Rename retrieve source Start position for the target method for line number attributes Abstract Method Declaration method Decls declaring Source Type scope reference Context methods if method Decls null for int i 0 length method Decls length i length i if method Decls i binding accessed Method this source Start method Decls i source Start return  initializeMethodAccessor MethodBinding accessedMethod isSuperAccess ReferenceBinding receiverType targetMethod accessedMethod AccDefault AccStatic AccSynthetic SourceTypeBinding declaringSourceType SourceTypeBinding receiverType SyntheticAccessMethodBinding knownAccessMethods declaringSourceType syntheticAccessMethods methodId knownAccessMethods knownAccessMethods methodId CharOperation AccessMethodPrefix valueOf methodId toCharArray returnType accessedMethod returnType accessType isSuperAccess SuperMethodAccess MethodAccess accessedMethod isStatic accessedMethod TypeBinding accessedMethod declaringSourceType accessedMethod accessedMethod thrownExceptions accessedMethod thrownExceptions declaringClass declaringSourceType needRename needRename MethodBinding declaringSourceType CharOperation areParametersEqual needRename knownAccessMethods knownAccessMethods knownAccessMethods CharOperation knownAccessMethods areParametersEqual knownAccessMethods needRename needRename methodId setSelector CharOperation AccessMethodPrefix valueOf methodId toCharArray needRename sourceStart AbstractMethodDeclaration methodDecls declaringSourceType referenceContext methodDecls methodDecls methodDecls accessedMethod sourceStart methodDecls sourceStart
protected boolean is Constructor Related return access Type Constructor Access  isConstructorRelated accessType ConstructorAccess

public Synthetic Argument Binding Local Variable Binding actual Outer Local Variable super Char Operation concat Outer Local Prefix actual Outer Local Variable name actual Outer Local Variable type Acc Final true this actual Outer Local Variable actual Outer Local Variable  SyntheticArgumentBinding LocalVariableBinding actualOuterLocalVariable CharOperation OuterLocalPrefix actualOuterLocalVariable actualOuterLocalVariable AccFinal actualOuterLocalVariable actualOuterLocalVariable
public Synthetic Argument Binding Reference Binding enclosing Type super Char Operation concat Synthetic Argument Binding Enclosing Instance Prefix String value Of enclosing Type depth to Char Array enclosing Type Acc Final true  SyntheticArgumentBinding ReferenceBinding enclosingType CharOperation SyntheticArgumentBinding EnclosingInstancePrefix valueOf enclosingType toCharArray enclosingType AccFinal

public class Synthetic Field Binding extends Field Binding public int index public Synthetic Field Binding char name Type Binding type int modifiers Reference Binding declaring Class Constant constant int index super name type modifiers declaring Class constant this index index  SyntheticFieldBinding FieldBinding SyntheticFieldBinding TypeBinding ReferenceBinding declaringClass declaringClass

public final int binding Type return TYPE  bindingType
Answer true if the receiver can be instantiated public boolean can Be Instantiated return is Base Type  canBeInstantiated isBaseType
Answer the receiver s constant pool name NOTE This method should only be used during after code gen e g java lang Object 
public abstract char constant Pool Name String debug Name return new String readable Name  constantPoolName debugName readableName
Answer the receiver s dimensions 0 for non array types public int dimensions return 0 
return 0 public abstract Package Binding get Package  PackageBinding getPackage
public final boolean is Array Type return tag Bits Is Array Type 0  isArrayType tagBits IsArrayType
public final boolean is Base Type return tag Bits Is Base Type 0  isBaseType tagBits IsBaseType
return tag Bits Is Base Type 0 public boolean is Class return false  tagBits IsBaseType isClass
public abstract boolean is Compatible With Type Binding right  isCompatibleWith TypeBinding
public final boolean is Hierarchy Inconsistent return tag Bits Hierarchy Has Problems 0  isHierarchyInconsistent tagBits HierarchyHasProblems
return tag Bits Hierarchy Has Problems 0 public boolean is Interface return false  tagBits HierarchyHasProblems isInterface
public final boolean is Numeric Type switch id case T int case T float case T double case T short case T byte case T long case T char return true default return false  isNumericType T_int T_float T_double T_short T_byte T_long T_char
public Type Binding leaf Component Type return this  TypeBinding leafComponentType
Answer the qualified name of the receiver s package separated by periods or an empty string if its the default package For example java util Hashtable public char qualified Package Name Package Binding package Binding get Package return package Binding null package Binding compound Name Char Operation NO CHAR CHAR Char Operation NO CHAR package Binding readable Name  qualifiedPackageName PackageBinding packageBinding getPackage packageBinding packageBinding compoundName CharOperation NO_CHAR_CHAR CharOperation NO_CHAR packageBinding readableName
Answer the source name for the type In the case of member types as the qualified name from its top level type For example for a member type N defined inside M A A M N 
public char signature return constant Pool Name  constantPoolName
return constant Pool Name public abstract char source Name  constantPoolName sourceName
Match a well known type id to its binding public static final Type Binding well Known Type Scope scope int id switch id case T boolean return Boolean Binding case T byte return Byte Binding case T char return Char Binding case T short return Short Binding case T double return Double Binding case T float return Float Binding case T int return Int Binding case T long return Long Binding case T Object return scope get Java Lang Object case T String return scope get Java Lang String default return null  TypeBinding wellKnownType T_boolean BooleanBinding T_byte ByteBinding T_char CharBinding T_short ShortBinding T_double DoubleBinding T_float FloatBinding T_int IntBinding T_long LongBinding T_Object getJavaLangObject T_String getJavaLangString

Reference Binding resolved Type Unresolved Reference Binding char compound Name Package Binding package Binding this compound Name compound Name this source Name compound Name compound Name length 1 reasonable guess this f Package package Binding  ReferenceBinding resolvedType UnresolvedReferenceBinding compoundName PackageBinding packageBinding compoundName compoundName sourceName compoundName compoundName fPackage packageBinding
this f Package package Binding String debug Name return to String  fPackage packageBinding debugName toString
Reference Binding resolve Lookup Environment environment if resolved Type null return resolved Type Reference Binding environment Type f Package get Type0 compound Name compound Name length 1 if environment Type this environment Type environment ask For Type compound Name if environment Type null environment Type this could not resolve any better error was already reported against it resolved Type environment Type environment update Array Cache this environment Type return environment Type when found it replaces the unresolved type in the cache environment problem Reporter is Class Path Correct compound Name null return null will not get here since the above error aborts the compilation  ReferenceBinding LookupEnvironment resolvedType resolvedType ReferenceBinding environmentType fPackage getType0 compoundName compoundName environmentType environmentType askForType compoundName environmentType environmentType resolvedType environmentType updateArrayCache environmentType environmentType problemReporter isClassPathCorrect compoundName
return null will not get here since the above error aborts the compilation public String to String return Unresolved type compound Name null Char Operation to String compound Name UNNAMED NON NLS 1 NON NLS 2  toString compoundName CharOperation toString compoundName

public Type Binding updated Declaring Class public Updated Method Binding Type Binding updated Declaring Class int modifiers char selector Type Binding return Type Type Binding args Reference Binding exceptions Reference Binding declaring Class super modifiers selector return Type args exceptions declaring Class this updated Declaring Class updated Declaring Class  TypeBinding updatedDeclaringClass UpdatedMethodBinding TypeBinding updatedDeclaringClass TypeBinding returnType TypeBinding ReferenceBinding ReferenceBinding declaringClass returnType declaringClass updatedDeclaringClass updatedDeclaringClass
public Type Binding constant Pool Declaring Class return this updated Declaring Class  TypeBinding constantPoolDeclaringClass updatedDeclaringClass

public int id for flow analysis position in flow Info bit vector public boolean is Constant Value return constant Constant NotA Constant  flowInfo isConstantValue NotAConstant
public final boolean is Blank Final return modifiers Acc Blank Final 0  isBlankFinal AccBlankFinal
public final boolean is Final return modifiers Acc Final 0  isFinal AccFinal
return modifiers Acc Final 0 public char readable Name return name  AccFinal readableName
public String to String String s type null type debug Name UNDEFINED TYPE NON NLS 1 s NON NLS 1 s name null new String name UNNAMED FIELD NON NLS 1 return s  toString debugName

protected Abstract Comment Parser Parser source Parser this source Parser source Parser this scanner new Scanner false false false Class File Constants JDK1 3 null null true task Case Sensitive this identifier Stack new char 20 this identifier Position Stack new long 20 this identifier Length Stack new int 10 this ast Stack new Object 30 this ast Length Stack new int 20  AbstractCommentParser sourceParser sourceParser sourceParser ClassFileConstants JDK1_3 taskCaseSensitive identifierStack identifierPositionStack identifierLengthStack astStack astLengthStack
protected boolean parse Comment int javadoc Start int javadoc End boolean valid Comment true try Init scanner position this scanner reset To javadoc Start javadoc End this end Comment javadoc End this index javadoc Start read Char starting int previous Position this index read Char first char next Character read Char second Init local variables this ast Length Ptr 1 this ast Ptr 1 this current Token Type 1 this inline Tag Started false this inline Tag Start 1 this line Started false this return Statement null this inherited false this deprecated false this line Ptr get Line Number javadoc Start this last Line Ptr get Line Number javadoc End this line End this line Ptr this last Line Ptr this end Comment get Line End this line Ptr this text Start 1 char previous Char 0 int invalid Tag Line End 1 int invalid Inline Tag Line End 1 Loop on each comment character while this index this end Comment previous Position this index previous Char next Character Calculate line end cannot use this scanner line Ptr as scanner does not parse line ends again if this index this line End 1 update Line End Read next char only if token was consumed if this current Token Type 0 next Character read Char consider unicodes else previous Position this scanner get Current Token Start Position switch this current Token Type case Terminal Tokens Token NameRBRACE next Character break case Terminal Tokens Token NameMULTIPLY next Character break default next Character this scanner current Character consume Token if this index this end Comment break switch next Character case boolean valid false Start tag parsing only if we have a java identifier start character and if we are on line beginning or at inline tag beginning if this line Started previous Char this line Started true if this inline Tag Started this inline Tag Started false bug https bugs eclipse org bugs show bug cgi id 53279 Cannot have inside inline comment if this source Parser null int end previous Position invalid Inline Tag Line End previous Position invalid Inline Tag Line End this source Parser problem Reporter javadoc Unterminated Inline Tag this inline Tag Start end valid Comment false if this line Started this text Start 1 this text Start previous Position push Text this text Start previous Position if this kind DOM PARSER refresh Inline Tag Position previous Position if previous Char if this text Start 1 this text Start this inline Tag Start push Text this text Start this inline Tag Start this inline Tag Started true invalid Inline Tag Line End this line End else if this text Start 1 this text Start invalid Tag Line End push Text this text Start invalid Tag Line End this scanner reset To this index this end Comment this current Token Type 1 flush token cache at line begin try int token read Token And Consume this tag Source Start this scanner get Current Token Start Position this tag Source End this scanner get Current Token End Position char tag this scanner get Current Identifier Source first token is either an identifier or a keyword if this kind DOM PARSER For DOM parser try to get tag name other than java identifier see bug https bugs eclipse org bugs show bug cgi id 51660 int tk token int le this line End char pc peek Char tag Name Token while tk Terminal Tokens Token NameEOF this tag Source End this scanner get Current Token End Position token tk chars and spaces are not allowed in tag names switch pc case case case case case case case case case case case break for as this is perhaps the end of comment bug 65288 break tag Name Token default if pc Character is Whitespace pc break tag Name Token tk read Token And Consume pc peek Char int length this tag Source End this tag Source Start 1 tag new char length System arraycopy this source this tag Source Start tag 0 length this index this tag Source End 1 this scanner current Position this tag Source End 1 this tag Source Start previous Position this line End le switch token case Terminal Tokens Token Name Identifier if Char Operation equals tag TAG DEPRECATED this deprecated true if this kind DOM PARSER valid parse Tag else valid true else if Char Operation equals tag TAG INHERITDOC inhibits inherited flag when tags have been already stored see bug https bugs eclipse org bugs show bug cgi id 51606 Note that for DOM PARSER nodes stack may be not empty even no tag was encountered in comment But it cannot be the case for COMPILER PARSER and so is enough as it is only this parser which signals the missing tag warnings this inherited this ast Ptr 1 if this kind DOM PARSER valid parse Tag else valid true else if Char Operation equals tag TAG PARAM valid parse Param else if Char Operation equals tag TAG EXCEPTION valid parse Throws false else if Char Operation equals tag TAG SEE if this inline Tag Started bug https bugs eclipse org bugs show bug cgi id 53290 Cannot have see inside inline comment valid false if this source Parser null this source Parser problem Reporter javadoc Unexpected Tag this tag Source Start this tag Source End else valid parse See false else if Char Operation equals tag TAG LINK if this inline Tag Started valid parse See false else bug https bugs eclipse org bugs show bug cgi id 53290 Cannot have link outside inline comment valid false if this source Parser null this source Parser problem Reporter javadoc Unexpected Tag this tag Source Start this tag Source End else if Char Operation equals tag TAG LINKPLAIN if this inline Tag Started valid parse See true else valid parse Tag else valid parse Tag break case Terminal Tokens Token Namereturn valid parse Return break case Terminal Tokens Token Namethrows valid parse Throws true break default if this kind DOM PARSER switch token case Terminal Tokens Token Nameabstract case Terminal Tokens Token Nameassert case Terminal Tokens Token Nameboolean case Terminal Tokens Token Namebreak case Terminal Tokens Token Namebyte case Terminal Tokens Token Namecase case Terminal Tokens Token Namecatch case Terminal Tokens Token Namechar case Terminal Tokens Token Nameclass case Terminal Tokens Token Namecontinue case Terminal Tokens Token Namedefault case Terminal Tokens Token Namedo case Terminal Tokens Token Namedouble case Terminal Tokens Token Nameelse case Terminal Tokens Token Nameextends case Terminal Tokens Token Namefalse case Terminal Tokens Token Namefinal case Terminal Tokens Token Namefinally case Terminal Tokens Token Namefloat case Terminal Tokens Token Namefor case Terminal Tokens Token Nameif case Terminal Tokens Token Nameimplements case Terminal Tokens Token Nameimport case Terminal Tokens Token Nameinstanceof case Terminal Tokens Token Nameint case Terminal Tokens Token Nameinterface case Terminal Tokens Token Namelong case Terminal Tokens Token Namenative case Terminal Tokens Token Namenew case Terminal Tokens Token Namenull case Terminal Tokens Token Namepackage case Terminal Tokens Token Nameprivate case Terminal Tokens Token Nameprotected case Terminal Tokens Token Namepublic case Terminal Tokens Token Nameshort case Terminal Tokens Token Namestatic case Terminal Tokens Token Namestrictfp case Terminal Tokens Token Namesuper case Terminal Tokens Token Nameswitch case Terminal Tokens Token Namesynchronized case Terminal Tokens Token Namethis case Terminal Tokens Token Namethrow case Ter parseComment javadocStart javadocEnd validComment resetTo javadocStart javadocEnd endComment javadocEnd javadocStart readChar previousPosition readChar nextCharacter readChar astLengthPtr astPtr currentTokenType inlineTagStarted inlineTagStart lineStarted returnStatement linePtr getLineNumber javadocStart lastLinePtr getLineNumber javadocEnd lineEnd linePtr lastLinePtr endComment getLineEnd linePtr textStart previousChar invalidTagLineEnd invalidInlineTagLineEnd endComment previousPosition previousChar nextCharacter linePtr lineEnd updateLineEnd currentTokenType nextCharacter readChar previousPosition getCurrentTokenStartPosition currentTokenType TerminalTokens TokenNameRBRACE nextCharacter TerminalTokens TokenNameMULTIPLY nextCharacter nextCharacter currentCharacter consumeToken endComment nextCharacter lineStarted previousChar lineStarted inlineTagStarted inlineTagStarted show_bug sourceParser previousPosition invalidInlineTagLineEnd previousPosition invalidInlineTagLineEnd sourceParser problemReporter javadocUnterminatedInlineTag inlineTagStart validComment lineStarted textStart textStart previousPosition pushText textStart previousPosition DOM_PARSER refreshInlineTagPosition previousPosition previousChar textStart textStart inlineTagStart pushText textStart inlineTagStart inlineTagStarted invalidInlineTagLineEnd lineEnd textStart textStart invalidTagLineEnd pushText textStart invalidTagLineEnd resetTo endComment currentTokenType readTokenAndConsume tagSourceStart getCurrentTokenStartPosition tagSourceEnd getCurrentTokenEndPosition getCurrentIdentifierSource DOM_PARSER show_bug lineEnd peekChar tagNameToken TerminalTokens TokenNameEOF tagSourceEnd getCurrentTokenEndPosition tagNameToken isWhitespace tagNameToken readTokenAndConsume peekChar tagSourceEnd tagSourceStart tagSourceStart tagSourceEnd currentPosition tagSourceEnd tagSourceStart previousPosition lineEnd TerminalTokens TokenNameIdentifier CharOperation TAG_DEPRECATED DOM_PARSER parseTag CharOperation TAG_INHERITDOC show_bug DOM_PARSER COMPILER_PARSER astPtr DOM_PARSER parseTag CharOperation TAG_PARAM parseParam CharOperation TAG_EXCEPTION parseThrows CharOperation TAG_SEE inlineTagStarted show_bug sourceParser sourceParser problemReporter javadocUnexpectedTag tagSourceStart tagSourceEnd parseSee CharOperation TAG_LINK inlineTagStarted parseSee show_bug sourceParser sourceParser problemReporter javadocUnexpectedTag tagSourceStart tagSourceEnd CharOperation TAG_LINKPLAIN inlineTagStarted parseSee parseTag parseTag TerminalTokens TokenNamereturn parseReturn TerminalTokens TokenNamethrows parseThrows DOM_PARSER TerminalTokens TokenNameabstract TerminalTokens TokenNameassert TerminalTokens TokenNameboolean TerminalTokens TokenNamebreak TerminalTokens TokenNamebyte TerminalTokens TokenNamecase TerminalTokens TokenNamecatch TerminalTokens TokenNamechar TerminalTokens TokenNameclass TerminalTokens TokenNamecontinue TerminalTokens TokenNamedefault TerminalTokens TokenNamedo TerminalTokens TokenNamedouble TerminalTokens TokenNameelse TerminalTokens TokenNameextends TerminalTokens TokenNamefalse TerminalTokens TokenNamefinal TerminalTokens TokenNamefinally TerminalTokens TokenNamefloat TerminalTokens TokenNamefor TerminalTokens TokenNameif TerminalTokens TokenNameimplements TerminalTokens TokenNameimport TerminalTokens TokenNameinstanceof TerminalTokens TokenNameint TerminalTokens TokenNameinterface TerminalTokens TokenNamelong TerminalTokens TokenNamenative TerminalTokens TokenNamenew TerminalTokens TokenNamenull TerminalTokens TokenNamepackage TerminalTokens TokenNameprivate TerminalTokens TokenNameprotected TerminalTokens TokenNamepublic TerminalTokens TokenNameshort TerminalTokens TokenNamestatic TerminalTokens TokenNamestrictfp TerminalTokens TokenNamesuper TerminalTokens TokenNameswitch TerminalTokens TokenNamesynchronized TerminalTokens TokenNamethis TerminalTokens TokenNamethrow
private void consume Token this current Token Type 1 flush token cache update Line End  consumeToken currentTokenType updateLineEnd
protected abstract Object create Argument Reference char name int dim Object type Ref long dim Pos long arg Name Pos throws Invalid Input Exception  createArgumentReference typeRef dimPos argNamePos InvalidInputException
protected abstract Object create Argument Reference char name int dim Object type Ref long dim Pos long arg Name Pos throws Invalid Input Exception protected abstract Object create Field Reference Object receiver throws Invalid Input Exception  createArgumentReference typeRef dimPos argNamePos InvalidInputException createFieldReference InvalidInputException
protected abstract Object create Argument Reference char name int dim Object type Ref long dim Pos long arg Name Pos throws Invalid Input Exception protected abstract Object create Field Reference Object receiver throws Invalid Input Exception protected abstract Object create Method Reference Object receiver List arguments throws Invalid Input Exception  createArgumentReference typeRef dimPos argNamePos InvalidInputException createFieldReference InvalidInputException createMethodReference InvalidInputException
protected abstract Object create Field Reference Object receiver throws Invalid Input Exception protected abstract Object create Method Reference Object receiver List arguments throws Invalid Input Exception protected Object create Return Statement return null  createFieldReference InvalidInputException createMethodReference InvalidInputException createReturnStatement
protected abstract Object create Method Reference Object receiver List arguments throws Invalid Input Exception protected Object create Return Statement return null protected abstract Object create Type Reference int primitive Token  createMethodReference InvalidInputException createReturnStatement createTypeReference primitiveToken
private int get End Position if this scanner get Current Token End Position this line End return this line End else return this scanner get Current Token End Position  getEndPosition getCurrentTokenEndPosition lineEnd lineEnd getCurrentTokenEndPosition
private Object parse Arguments Object receiver throws Invalid Input Exception Init int modulo 0 should be 2 for Type Type or 3 for Type arg Type arg int i Token 0 char arg Name null List arguments new Array List 10 int start this scanner get Current Token Start Position Parse arguments declaration if method reference next Arg while this index this scanner eof Position Read argument type reference Object type Ref try type Ref parse Qualified Name false catch Invalid Input Exception e break next Arg boolean first Arg modulo 0 if first Arg verify position if i Token 0 break next Arg else if i Token modulo 0 break next Arg if type Ref null if first Arg this current Token Type Terminal Tokens Token NameRPAREN char pc peek Char if Character is Whitespace pc this inline Tag Started pc if this source Parser null this source Parser problem Reporter javadoc Malformed See Reference start this line End return null this line Started true return create Method Reference receiver null break next Arg i Token Read possible array declaration int dim 0 long dim Positions new long 20 assume that there won t be more than 20 dimensions if read Token Terminal Tokens Token NameLBRACKET int dim Start this scanner get Current Token Start Position while read Token Terminal Tokens Token NameLBRACKET consume Token if read Token Terminal Tokens Token NameRBRACKET break next Arg consume Token dim Positions dim long dim Start 32 this scanner get Current Token End Position Read argument name long arg Name Pos 1 if read Token Terminal Tokens Token Name Identifier consume Token if first Arg verify position if i Token 1 break next Arg else if i Token modulo 1 break next Arg if arg Name null verify that all arguments name are declared if first Arg break next Arg arg Name this scanner get Current Identifier Source arg Name Pos long this scanner get Current Token Start Position 32 this scanner get Current Token End Position i Token else if arg Name null verify that no argument name is declared break next Arg Verify token position if first Arg modulo i Token 1 else if i Token modulo modulo 1 break next Arg Read separator or end arguments declaration int token read Token char name arg Name null new char 0 arg Name if token Terminal Tokens Token NameCOMMA Create new argument Object argument create Argument Reference name dim type Ref dim Positions arg Name Pos arguments add argument consume Token i Token else if token Terminal Tokens Token NameRPAREN char pc peek Char if Character is Whitespace pc this inline Tag Started pc if this source Parser null this source Parser problem Reporter javadoc Malformed See Reference start this line End return null Create new argument Object argument create Argument Reference name dim type Ref dim Positions arg Name Pos arguments add argument consume Token return create Method Reference receiver arguments else break next Arg Something wrong happened Invalid input throw new Invalid Input Exception  parseArguments InvalidInputException iToken argName ArrayList getCurrentTokenStartPosition nextArg eofPosition typeRef typeRef parseQualifiedName InvalidInputException nextArg firstArg firstArg iToken nextArg iToken nextArg typeRef firstArg currentTokenType TerminalTokens TokenNameRPAREN peekChar isWhitespace inlineTagStarted sourceParser sourceParser problemReporter javadocMalformedSeeReference lineEnd lineStarted createMethodReference nextArg iToken dimPositions readToken TerminalTokens TokenNameLBRACKET dimStart getCurrentTokenStartPosition readToken TerminalTokens TokenNameLBRACKET consumeToken readToken TerminalTokens TokenNameRBRACKET nextArg consumeToken dimPositions dimStart getCurrentTokenEndPosition argNamePos readToken TerminalTokens TokenNameIdentifier consumeToken firstArg iToken nextArg iToken nextArg argName firstArg nextArg argName getCurrentIdentifierSource argNamePos getCurrentTokenStartPosition getCurrentTokenEndPosition iToken argName nextArg firstArg iToken iToken nextArg readToken argName argName TerminalTokens TokenNameCOMMA createArgumentReference typeRef dimPositions argNamePos consumeToken iToken TerminalTokens TokenNameRPAREN peekChar isWhitespace inlineTagStarted sourceParser sourceParser problemReporter javadocMalformedSeeReference lineEnd createArgumentReference typeRef dimPositions argNamePos consumeToken createMethodReference nextArg InvalidInputException
private boolean parse Href throws Invalid Input Exception int start this scanner get Current Token Start Position if Character to Lower Case read Char a this scanner current Position this index if read Token Terminal Tokens Token Name Identifier this current Token Type 1 do not update line end try if Char Operation equals this scanner get Current Identifier Source new char h r e f false read Token Terminal Tokens Token NameEQUAL this current Token Type 1 do not update line end if read Token Terminal Tokens Token Name String Literal this current Token Type 1 do not update line end if read Token Terminal Tokens Token NameGREATER consume Token update line end as new lines are allowed in URL description while read Token Terminal Tokens Token NameLESS if this scanner current Position this scanner eof Position this scanner current Character Reset position we want to rescan last token this index this token Previous Position this scanner current Position this token Previous Position this current Token Type 1 Signal syntax error if this source Parser null this source Parser problem Reporter javadoc Invalid See Url Reference start this line End return false consume Token this current Token Type 1 do not update line end if read Char if Character to Lower Case read Char a if read Char Valid href return true catch Invalid Input Exception ex Do nothing as we want to keep positions for error message Reset position we want to rescan last token this index this token Previous Position this scanner current Position this token Previous Position this current Token Type 1 Signal syntax error if this source Parser null this source Parser problem Reporter javadoc Invalid See Url Reference start this line End return false  parseHref InvalidInputException getCurrentTokenStartPosition toLowerCase readChar currentPosition readToken TerminalTokens TokenNameIdentifier currentTokenType CharOperation getCurrentIdentifierSource readToken TerminalTokens TokenNameEQUAL currentTokenType readToken TerminalTokens TokenNameStringLiteral currentTokenType readToken TerminalTokens TokenNameGREATER consumeToken readToken TerminalTokens TokenNameLESS currentPosition eofPosition currentCharacter tokenPreviousPosition currentPosition tokenPreviousPosition currentTokenType sourceParser sourceParser problemReporter javadocInvalidSeeUrlReference lineEnd consumeToken currentTokenType readChar toLowerCase readChar readChar InvalidInputException tokenPreviousPosition currentPosition tokenPreviousPosition currentTokenType sourceParser sourceParser problemReporter javadocInvalidSeeUrlReference lineEnd
private Object parse Member Object receiver throws Invalid Input Exception Init this identifier Ptr 1 this identifier Length Ptr 1 int start this scanner get Current Token Start Position this member Start start Get member identifier if read Token Terminal Tokens Token Name Identifier consume Token push Identifier true int previous Position this index if read Token Terminal Tokens Token NameLPAREN consume Token start this scanner get Current Token Start Position try return parse Arguments receiver catch Invalid Input Exception e int end this scanner get Current Token End Position this line End this scanner get Current Token End Position this scanner get Current Token Start Position end end this line End end this line End if this source Parser null this source Parser problem Reporter javadoc Invalid See Reference Args start end return null Reset position we want to rescan last token if this current Token Type 1 this index previous Position this scanner current Position previous Position this current Token Type 1 return create Field Reference receiver int end get End Position 1 end start end get End Position end if this source Parser null this source Parser problem Reporter javadoc Invalid See Reference start end Reset position we want to rescan last token this index this token Previous Position this scanner current Position this token Previous Position this current Token Type 1 return null  parseMember InvalidInputException identifierPtr identifierLengthPtr getCurrentTokenStartPosition memberStart readToken TerminalTokens TokenNameIdentifier consumeToken pushIdentifier previousPosition readToken TerminalTokens TokenNameLPAREN consumeToken getCurrentTokenStartPosition parseArguments InvalidInputException getCurrentTokenEndPosition lineEnd getCurrentTokenEndPosition getCurrentTokenStartPosition lineEnd lineEnd sourceParser sourceParser problemReporter javadocInvalidSeeReferenceArgs currentTokenType previousPosition currentPosition previousPosition currentTokenType createFieldReference getEndPosition getEndPosition sourceParser sourceParser problemReporter javadocInvalidSeeReference tokenPreviousPosition currentPosition tokenPreviousPosition currentTokenType
protected boolean parse Param Store current token state int start this tag Source Start int end this tag Source End try Push identifier next int token read Token switch token case Terminal Tokens Token Name Identifier consume Token return push Param Name case Terminal Tokens Token NameEOF break default start this scanner get Current Token Start Position end get End Position if end start start this tag Source Start break catch Invalid Input Exception e end get End Position Reset position to avoid missing tokens when new line was encountered this index this token Previous Position this scanner current Position this token Previous Position this current Token Type 1 Report problem if this source Parser null this source Parser problem Reporter javadoc Missing Param Name start end return false  parseParam tagSourceStart tagSourceEnd readToken TerminalTokens TokenNameIdentifier consumeToken pushParamName TerminalTokens TokenNameEOF getCurrentTokenStartPosition getEndPosition tagSourceStart InvalidInputException getEndPosition tokenPreviousPosition currentPosition tokenPreviousPosition currentTokenType sourceParser sourceParser problemReporter javadocMissingParamName
protected Object parse Qualified Name boolean reset throws Invalid Input Exception Reset identifier stack if requested if reset this identifier Ptr 1 this identifier Length Ptr 1 Scan tokens int primitive Token 1 next Token for int i Token 0 i Token int token read Token switch token case Terminal Tokens Token Name Identifier if i Token 2 0 identifiers must be odd tokens break next Token push Identifier i Token 0 consume Token break case Terminal Tokens Token NameDOT if i Token 2 0 dots must be even tokens throw new Invalid Input Exception consume Token break case Terminal Tokens Token Namevoid case Terminal Tokens Token Nameboolean case Terminal Tokens Token Namebyte case Terminal Tokens Token Namechar case Terminal Tokens Token Namedouble case Terminal Tokens Token Namefloat case Terminal Tokens Token Nameint case Terminal Tokens Token Namelong case Terminal Tokens Token Nameshort if i Token 0 throw new Invalid Input Exception push Identifier true primitive Token token consume Token break next Token default if i Token 0 return null if i Token 2 0 cannot leave on a dot Reset position we want to rescan last token if this kind DOM PARSER this current Token Type 1 this index this token Previous Position this scanner current Position this token Previous Position this current Token Type 1 throw new Invalid Input Exception break next Token Reset position we want to rescan last token if this current Token Type 1 this index this token Previous Position this scanner current Position this token Previous Position this current Token Type 1 return create Type Reference primitive Token  parseQualifiedName InvalidInputException identifierPtr identifierLengthPtr primitiveToken nextToken iToken iToken readToken TerminalTokens TokenNameIdentifier iToken nextToken pushIdentifier iToken consumeToken TerminalTokens TokenNameDOT iToken InvalidInputException consumeToken TerminalTokens TokenNamevoid TerminalTokens TokenNameboolean TerminalTokens TokenNamebyte TerminalTokens TokenNamechar TerminalTokens TokenNamedouble TerminalTokens TokenNamefloat TerminalTokens TokenNameint TerminalTokens TokenNamelong TerminalTokens TokenNameshort iToken InvalidInputException pushIdentifier primitiveToken consumeToken nextToken iToken iToken DOM_PARSER currentTokenType tokenPreviousPosition currentPosition tokenPreviousPosition currentTokenType InvalidInputException nextToken currentTokenType tokenPreviousPosition currentPosition tokenPreviousPosition currentTokenType createTypeReference primitiveToken
protected boolean parse Reference boolean plain throws Invalid Input Exception Object type Ref null Object reference null int previous Position 1 next Token while this index this scanner eof Position previous Position this index int token read Token switch token case Terminal Tokens Token Name String Literal see string int start this scanner get Current Token Start Position if type Ref null consume Token while Character is Whitespace this source this index if this source this index r this source this index n if this kind DOM PARSER parse Tag push Text previous Position this index return true this index if this source Parser null this source Parser problem Reporter javadoc Invalid See Reference start this line End return false case Terminal Tokens Token NameLESS see a href URL Value label a consume Token start this scanner get Current Token Start Position if parse Href if type Ref null consume Token while Character is Whitespace this source this index if this source this index r this source this index n if this kind DOM PARSER parse Tag push Text previous Position this index return true this index if this source Parser null this source Parser problem Reporter javadoc Invalid See Reference start this line End return false case Terminal Tokens Token NameERROR if this scanner current Character see member consume Token reference parse Member type Ref if reference null return push See Ref reference plain return false break next Token case Terminal Tokens Token Name Identifier if type Ref null type Ref parse Qualified Name true break break next Token default break next Token Verify that we got a reference if reference null reference type Ref if reference null this index this token Previous Position this scanner current Position this token Previous Position this current Token Type 1 if this source Parser null this source Parser problem Reporter javadoc Missing See Reference this tag Source Start this tag Source End return false Verify that line end does not start with an open parenthese which could be a constructor reference wrongly written bug https bugs eclipse org bugs show bug cgi id 47215 int start this scanner get Current Token Start Position try int token read Token if token Terminal Tokens Token NameLPAREN Reset position we want to rescan last token if this current Token Type 1 this index this token Previous Position this scanner current Position this token Previous Position this current Token Type 1 return push See Ref reference plain catch Invalid Input Exception e Do nothing as we report an error after Reset position to avoid missing tokens when new line was encountered this index this token Previous Position this scanner current Position this token Previous Position this current Token Type 1 if this source Parser null this source Parser problem Reporter javadoc Invalid See Reference start this line End return false  parseReference InvalidInputException typeRef previousPosition nextToken eofPosition previousPosition readToken TerminalTokens TokenNameStringLiteral getCurrentTokenStartPosition typeRef consumeToken isWhitespace DOM_PARSER parseTag pushText previousPosition sourceParser sourceParser problemReporter javadocInvalidSeeReference lineEnd TerminalTokens TokenNameLESS consumeToken getCurrentTokenStartPosition parseHref typeRef consumeToken isWhitespace DOM_PARSER parseTag pushText previousPosition sourceParser sourceParser problemReporter javadocInvalidSeeReference lineEnd TerminalTokens TokenNameERROR currentCharacter consumeToken parseMember typeRef pushSeeRef nextToken TerminalTokens TokenNameIdentifier typeRef typeRef parseQualifiedName nextToken nextToken typeRef tokenPreviousPosition currentPosition tokenPreviousPosition currentTokenType sourceParser sourceParser problemReporter javadocMissingSeeReference tagSourceStart tagSourceEnd show_bug getCurrentTokenStartPosition readToken TerminalTokens TokenNameLPAREN currentTokenType tokenPreviousPosition currentPosition tokenPreviousPosition currentTokenType pushSeeRef InvalidInputException tokenPreviousPosition currentPosition tokenPreviousPosition currentTokenType sourceParser sourceParser problemReporter javadocInvalidSeeReference lineEnd
Parse return tag declaration protected abstract boolean parse Return  parseReturn
protected boolean parse See boolean plain int start this scanner current Position try return parse Reference plain catch Invalid Input Exception ex if this source Parser null this source Parser problem Reporter javadoc Invalid See Reference start get End Position Reset position to avoid missing tokens when new line was encountered this index this token Previous Position this scanner current Position this token Previous Position this current Token Type 1 return false  parseSee currentPosition parseReference InvalidInputException sourceParser sourceParser problemReporter javadocInvalidSeeReference getEndPosition tokenPreviousPosition currentPosition tokenPreviousPosition currentTokenType
Parse return tag declaration protected abstract boolean parse Tag  parseTag
protected boolean parse Throws boolean real int start this scanner current Position try Object type Ref parse Qualified Name true if type Ref null if this source Parser null this source Parser problem Reporter javadoc Missing Throws Class Name this tag Source Start this tag Source End else return push Throw Name type Ref real catch Invalid Input Exception ex if this source Parser null this source Parser problem Reporter javadoc Invalid Throws Class start get End Position return false  parseThrows currentPosition typeRef parseQualifiedName typeRef sourceParser sourceParser problemReporter javadocMissingThrowsClassName tagSourceStart tagSourceEnd pushThrowName typeRef InvalidInputException sourceParser sourceParser problemReporter javadocInvalidThrowsClass getEndPosition
protected void push Identifier boolean new Length int stack Length this identifier Stack length if this identifier Ptr stack Length System arraycopy this identifier Stack 0 this identifier Stack new char stack Length 10 0 stack Length System arraycopy this identifier Position Stack 0 this identifier Position Stack new long stack Length 10 0 stack Length this identifier Stack this identifier Ptr this scanner get Current Identifier Source this identifier Position Stack this identifier Ptr long this scanner start Position 32 this scanner current Position 1 if new Length stack Length this identifier Length Stack length if this identifier Length Ptr stack Length System arraycopy this identifier Length Stack 0 this identifier Length Stack new int stack Length 10 0 stack Length this identifier Length Stack this identifier Length Ptr 1 else this identifier Length Stack this identifier Length Ptr  pushIdentifier newLength stackLength identifierStack identifierPtr stackLength identifierStack identifierStack stackLength stackLength identifierPositionStack identifierPositionStack stackLength stackLength identifierStack identifierPtr getCurrentIdentifierSource identifierPositionStack identifierPtr startPosition currentPosition newLength stackLength identifierLengthStack identifierLengthPtr stackLength identifierLengthStack identifierLengthStack stackLength stackLength identifierLengthStack identifierLengthPtr identifierLengthStack identifierLengthPtr
protected void push On Ast Stack Object node boolean new Length if node null this ast Length Stack this ast Length Ptr 0 return int stack Length this ast Stack length if this ast Ptr stack Length System arraycopy this ast Stack 0 this ast Stack new Object stack Length Ast Stack Increment 0 stack Length this ast Ptr stack Length this ast Stack this ast Ptr node if new Length stack Length this ast Length Stack length if this ast Length Ptr stack Length System arraycopy this ast Length Stack 0 this ast Length Stack new int stack Length Ast Stack Increment 0 stack Length this ast Length Stack this ast Length Ptr 1 else this ast Length Stack this ast Length Ptr  pushOnAstStack newLength astLengthStack astLengthPtr stackLength astStack astPtr stackLength astStack astStack stackLength AstStackIncrement stackLength astPtr stackLength astStack astPtr newLength stackLength astLengthStack astLengthPtr stackLength astLengthStack astLengthStack stackLength AstStackIncrement stackLength astLengthStack astLengthPtr astLengthStack astLengthPtr
Push a param name in ast node stack protected abstract boolean push Param Name  pushParamName
Push a reference statement in ast node stack protected abstract boolean push See Ref Object statement boolean plain  pushSeeRef
protected abstract boolean push See Ref Object statement boolean plain protected abstract void push Text int start int end  pushSeeRef pushText
protected abstract void push Text int start int end protected void refresh Inline Tag Position int previous Position do nothing by default  pushText refreshInlineTagPosition previousPosition
private char peek Char int idx this index char c this source idx if c this source idx u int c1 c2 c3 c4 idx while this source idx u idx if c1 Character get Numeric Value this source idx 15 c1 0 c2 Character get Numeric Value this source idx 15 c2 0 c3 Character get Numeric Value this source idx 15 c3 0 c4 Character get Numeric Value this source idx 15 c4 0 c char c1 16 c2 16 c3 16 c4 return c  peekChar getNumericValue getNumericValue getNumericValue getNumericValue
Push a throws type ref in ast node stack protected abstract boolean push Throw Name Object type Ref boolean real  pushThrowName typeRef
protected char read Char char c this source this index if c this source this index u int c1 c2 c3 c4 int pos this index this index while this source this index u this index if c1 Character get Numeric Value this source this index 15 c1 0 c2 Character get Numeric Value this source this index 15 c2 0 c3 Character get Numeric Value this source this index 15 c3 0 c4 Character get Numeric Value this source this index 15 c4 0 c char c1 16 c2 16 c3 16 c4 else TODO frederic currently reset to previous position perhaps signal a syntax error would be more appropriate this index pos return c  readChar getNumericValue getNumericValue getNumericValue getNumericValue
private int read Token throws Invalid Input Exception if this current Token Type 0 this token Previous Position this scanner current Position this current Token Type this scanner get Next Token if this scanner current Position this line End 1 be sure to be on next line line End is still on the same line this line Started false while this current Token Type Terminal Tokens Token NameMULTIPLY this current Token Type this scanner get Next Token this index this scanner current Position this line Started true after having read a token line is obviously started return this current Token Type  readToken InvalidInputException currentTokenType tokenPreviousPosition currentPosition currentTokenType getNextToken currentPosition lineEnd lineEnd lineStarted currentTokenType TerminalTokens TokenNameMULTIPLY currentTokenType getNextToken currentPosition lineStarted currentTokenType
private int read Token And Consume throws Invalid Input Exception int token read Token consume Token return token  readTokenAndConsume InvalidInputException readToken consumeToken
public String to String String Buffer buffer new String Buffer int start Pos this scanner current Position this index this scanner current Position this index int end Pos this scanner current Position this index this index this scanner current Position if start Pos this source length return EOF n n new String this source NON NLS 1 if end Pos this source length return behind the EOF n n new String this source NON NLS 1 char front new char start Pos System arraycopy this source 0 front 0 start Pos int middle Length end Pos 1 start Pos 1 char middle if middle Length 1 middle new char middle Length System arraycopy this source start Pos middle 0 middle Length else middle Char Operation NO CHAR char end new char this source length end Pos 1 System arraycopy this source end Pos 1 1 end 0 this source length end Pos 1 1 buffer append front if this scanner current Position this index buffer append n n Scanner current position here NON NLS 1 else buffer append n n Parser index here NON NLS 1 buffer append middle if this scanner current Position this index buffer append Parser index here n n NON NLS 1 else buffer append Scanner current position here n n NON NLS 1 buffer append end return buffer to String  toString StringBuffer StringBuffer startPos currentPosition currentPosition endPos currentPosition currentPosition startPos endPos startPos startPos middleLength endPos startPos middleLength middleLength startPos middleLength CharOperation NO_CHAR endPos endPos endPos currentPosition nScanner nParser currentPosition toString
protected void update Line End while this index this line End 1 be sure to be on next line line End is still on the same line if this line Ptr this last Line Ptr this line End get Line End this line Ptr 1 else this line End this end Comment return  updateLineEnd lineEnd lineEnd linePtr lastLinePtr lineEnd getLineEnd linePtr lineEnd endComment
protected abstract void update Doc Comment  updateDocComment
Search the line number corresponding to a specific position Warning returned position is 1 based index see Scanner get Line Number int We cannot directly use this method when line Ptr field is not initialized public final int get Line Number int position if this scanner line Ptr 1 return this scanner get Line Number position if this line Ends null return 1 int length this line Ends length if length 0 return 1 int g 0 d length 1 int m 0 while g d m g d 2 if position this line Ends m d m 1 else if position this line Ends m g m 1 else return m 1 if position this line Ends m return m 1 return m 2  getLineNumber linePtr getLineNumber linePtr getLineNumber lineEnds lineEnds lineEnds lineEnds lineEnds
Search the source position corresponding to the end of a given line number Warning returned position is 1 based index see Scanner get Line End int We cannot directly use this method when line Ptr field is not initialized public final int get Line End int line Number if this scanner line Ptr 1 return this scanner get Line End line Number if this line Ends null return 1 if line Number this line Ends length 1 return 1 if line Number 0 return 1 if line Number this line Ends length 1 return this scanner eof Position return this line Ends line Number 1 next line start one character behind the line End of the previous line  getLineEnd linePtr getLineEnd lineNumber linePtr getLineEnd lineNumber lineEnds lineNumber lineEnds lineNumber lineNumber lineEnds eofPosition lineEnds lineNumber lineEnd

public int location public Repair Candidate this symbol 0 this location 0  RepairCandidate
public Primary Repair Info this distance 0 this misspell Index 0 this code 0 this buffer Position 0 this symbol 0  PrimaryRepairInfo misspellIndex bufferPosition
public Primary Repair Info copy Primary Repair Info c new Primary Repair Info c distance this distance c misspell Index this misspell Index c code this code c buffer Position this buffer Position c symbol this symbol return c  PrimaryRepairInfo PrimaryRepairInfo PrimaryRepairInfo misspellIndex misspellIndex bufferPosition bufferPosition
int next public State Info int state int next this state state this next next  StateInfo
public Diagnose Parser Parser parser int first Token int start int end this parser first Token start end new int 0 new int 0 new int 0  DiagnoseParser firstToken firstToken
public Diagnose Parser Parser parser int first Token int start int end int interval Start To Skip int interval End To Skip int interval Flags To Skip this parser parser this lex Stream new Lex Stream BUFF SIZE parser scanner interval Start To Skip interval End To Skip interval Flags To Skip first Token start end  DiagnoseParser firstToken intervalStartToSkip intervalEndToSkip intervalFlagsToSkip lexStream LexStream BUFF_SIZE intervalStartToSkip intervalEndToSkip intervalFlagsToSkip firstToken
private Problem Reporter problem Reporter return parser problem Reporter  ProblemReporter problemReporter problemReporter
private void reallocate Stacks int old stack length stack Length stack Length STACK INCREMENT if old stack length 0 stack new int stack Length location Stack new int stack Length location Start Stack new int stack Length temp Stack new int stack Length prev Stack new int stack Length next Stack new int stack Length scope Index new int stack Length scope Position new int stack Length else System arraycopy stack 0 stack new int stack Length 0 old stack length System arraycopy location Stack 0 location Stack new int stack Length 0 old stack length System arraycopy location Start Stack 0 location Start Stack new int stack Length 0 old stack length System arraycopy temp Stack 0 temp Stack new int stack Length 0 old stack length System arraycopy prev Stack 0 prev Stack new int stack Length 0 old stack length System arraycopy next Stack 0 next Stack new int stack Length 0 old stack length System arraycopy scope Index 0 scope Index new int stack Length 0 old stack length System arraycopy scope Position 0 scope Position new int stack Length 0 old stack length return  reallocateStacks old_stack_length stackLength stackLength STACK_INCREMENT old_stack_length stackLength locationStack stackLength locationStartStack stackLength tempStack stackLength prevStack stackLength nextStack stackLength scopeIndex stackLength scopePosition stackLength stackLength old_stack_length locationStack locationStack stackLength old_stack_length locationStartStack locationStartStack stackLength old_stack_length tempStack tempStack stackLength old_stack_length prevStack prevStack stackLength old_stack_length nextStack nextStack stackLength old_stack_length scopeIndex scopeIndex stackLength old_stack_length scopePosition scopePosition stackLength old_stack_length
public void diagnose Parse lex Stream reset current Token lex Stream get Token int prev pos int pos int next pos int act START STATE reallocate Stacks Start parsing state Stack Top 0 stack state Stack Top act int tok lex Stream kind current Token location Stack state Stack Top current Token location Start Stack state Stack Top lex Stream start current Token boolean force Recovery AfterL Bracket Missing false int force Recovery Token 1 Process a terminal do Synchronize state stacks and update the location stack prev pos 1 prev Stack Top 1 next pos 1 next Stack Top 1 pos state Stack Top temp Stack Top state Stack Top 1 for int i 0 i state Stack Top i temp Stack i stack i act Parser t Action act tok When a reduce action is encountered we compute all REDUCE and associated goto actions induced by the current token Eventually a SHIFT SHIFT REDUCE ACCEPT or ERROR action is computed while act NUM RULES do temp Stack Top Parser rhs act 1 act Parser nt Action temp Stack temp Stack Top Parser lhs act while act NUM RULES Update the maximum useful position of the STATE  STACK push goto state into stack and compute next action on current symbol if temp Stack Top 1 stack Length reallocate Stacks pos pos temp Stack Top pos temp Stack Top temp Stack temp Stack Top 1 act act Parser t Action act tok At this point we have a shift shift reduce accept or error action STACK contains the configuration of the state stack prior to executing any action on curtok next stack contains the configuration of the state stack after executing all reduce actions induced by curtok The variable pos indicates the highest position in STACK that is still useful after the reductions are executed while act ERROR ACTION act ACCEPT ACTION SHIFT REDUCE action or SHIFT action next Stack Top temp Stack Top 1 for int i next pos 1 i next Stack Top i next Stack i temp Stack i for int i pos 1 i next Stack Top i location Stack i location Stack state Stack Top location Start Stack i location Start Stack state Stack Top If we have a shift reduce process it as well as the goto reduce actions that follow it if act ERROR ACTION act ERROR ACTION do next Stack Top Parser rhs act 1 act Parser nt Action next Stack next Stack Top Parser lhs act while act NUM RULES pos pos next Stack Top pos next Stack Top if next Stack Top 1 stack Length reallocate Stacks temp Stack Top next Stack Top next Stack next Stack Top act next pos next Stack Top Simulate the parser through the next token without destroying STACK or next stack current Token lex Stream get Token tok lex Stream kind current Token act Parser t Action act tok while act NUM RULES Process all goto reduce actions following reduction until a goto action is computed do int lhs symbol Parser lhs act if DEBUG System out println Parser name Parser non terminal index lhs symbol temp Stack Top Parser rhs act 1 act temp Stack Top next pos temp Stack temp Stack Top next Stack temp Stack Top act Parser nt Action act lhs symbol while act NUM RULES Update the maximum useful position of the STATE  STACK push GOTO state into stack and compute next action on current symbol if temp Stack Top 1 stack Length reallocate Stacks next pos next pos temp Stack Top next pos temp Stack Top temp Stack temp Stack Top 1 act act Parser t Action act tok if tok Token NameRBRACE force Recovery Token current Token lex Stream flags current Token Lex Stream LBRACE MISSING 0 lex Stream flags current Token Lex Stream IS AFTER JUMP 0 act ERROR ACTION if force Recovery Token current Token lex Stream flags current Token Lex Stream LBRACE MISSING 0 force Recovery AfterL Bracket Missing true force Recovery Token current Token No error was detected Read next token into PREVTOK element advance CURTOK pointer and update stacks if act ERROR ACTION prev Stack Top state Stack Top for int i prev pos 1 i prev Stack Top i prev Stack i stack i prev pos pos state Stack Top next Stack Top for int i pos 1 i state Stack Top i stack i next Stack i location Stack state Stack Top current Token location Start Stack state Stack Top lex Stream start current Token pos next pos At this stage either we have an ACCEPT or an ERROR action if act ERROR ACTION An error was detected Repair Candidate candidate error Recovery current Token force Recovery AfterL Bracket Missing force Recovery AfterL Bracket Missing false if parser report Only One Syntax Error return if this parser problem Reporter options max Problems Per Unit this parser compilation Unit compilation Result problem Count return act stack state Stack Top If the recovery was successful on a nonterminal candidate parse through that candidate and read the next token if candidate symbol 0 break else if candidate symbol NT OFFSET int lhs symbol candidate symbol NT OFFSET if DEBUG System out println Parser name Parser non terminal index lhs symbol act Parser nt Action act lhs symbol while act NUM RULES state Stack Top Parser rhs act 1 act Parser nt Action stack state Stack Top Parser lhs act stack state Stack Top act current Token lex Stream get Token tok lex Stream kind current Token location Stack state Stack Top current Token location Start Stack state Stack Top lex Stream start current Token else tok candidate symbol location Stack state Stack Top candidate location location Start Stack state Stack Top lex Stream start candidate location while act ACCEPT ACTION return  diagnoseParse lexStream currentToken lexStream getToken prev_pos next_pos START_STATE reallocateStacks stateStackTop stateStackTop lexStream currentToken locationStack stateStackTop currentToken locationStartStack stateStackTop lexStream currentToken forceRecoveryAfterLBracketMissing forceRecoveryToken prev_pos prevStackTop next_pos nextStackTop stateStackTop tempStackTop stateStackTop stateStackTop tempStack tAction NUM_RULES tempStackTop ntAction tempStack tempStackTop NUM_RULES STATE_ tempStackTop stackLength reallocateStacks tempStackTop tempStackTop tempStack tempStackTop tAction next_stack ERROR_ACTION ACCEPT_ACTION nextStackTop tempStackTop next_pos nextStackTop nextStack tempStack nextStackTop locationStack locationStack stateStackTop locationStartStack locationStartStack stateStackTop ERROR_ACTION ERROR_ACTION nextStackTop ntAction nextStack nextStackTop NUM_RULES nextStackTop nextStackTop nextStackTop stackLength reallocateStacks tempStackTop nextStackTop nextStack nextStackTop next_pos nextStackTop next_stack currentToken lexStream getToken lexStream currentToken tAction NUM_RULES lhs_symbol non_terminal_index lhs_symbol tempStackTop tempStackTop next_pos tempStack tempStackTop nextStack tempStackTop ntAction lhs_symbol NUM_RULES STATE_ tempStackTop stackLength reallocateStacks next_pos next_pos tempStackTop next_pos tempStackTop tempStack tempStackTop tAction TokenNameRBRACE forceRecoveryToken currentToken lexStream currentToken LexStream LBRACE_MISSING lexStream currentToken LexStream IS_AFTER_JUMP ERROR_ACTION forceRecoveryToken currentToken lexStream currentToken LexStream LBRACE_MISSING forceRecoveryAfterLBracketMissing forceRecoveryToken currentToken ERROR_ACTION prevStackTop stateStackTop prev_pos prevStackTop prevStack prev_pos stateStackTop nextStackTop stateStackTop nextStack locationStack stateStackTop currentToken locationStartStack stateStackTop lexStream currentToken next_pos ERROR_ACTION RepairCandidate errorRecovery currentToken forceRecoveryAfterLBracketMissing forceRecoveryAfterLBracketMissing reportOnlyOneSyntaxError problemReporter maxProblemsPerUnit compilationUnit compilationResult problemCount stateStackTop NT_OFFSET lhs_symbol NT_OFFSET non_terminal_index lhs_symbol ntAction lhs_symbol NUM_RULES stateStackTop ntAction stateStackTop stateStackTop currentToken lexStream getToken lexStream currentToken locationStack stateStackTop currentToken locationStartStack stateStackTop lexStream currentToken locationStack stateStackTop locationStartStack stateStackTop lexStream ACCEPT_ACTION
private Repair Candidate error Recovery int error token boolean forced Error this error Token error token this error Token Start lex Stream start error token int prevtok lex Stream previous error token int prevtok Kind lex Stream kind prevtok if forced Error int name index Parser terminal index Token NameLBRACE report Error INSERTION CODE name index prevtok prevtok Repair Candidate candidate new Repair Candidate candidate symbol Token NameLBRACE candidate location error token lex Stream reset error token state Stack Top next Stack Top for int j 0 j state Stack Top j stack j next Stack j location Stack state Stack Top error token location Start Stack state Stack Top lex Stream start error token return candidate Try primary phase recoveries If not successful try secondary phase recoveries If not successful and we are at end of the file we issue the end of file error and quit Otherwise Repair Candidate candidate primary Phase error token if candidate symbol 0 return candidate candidate secondary Phase error token if candidate symbol 0 return candidate if lex Stream kind error token EOFT SYMBOL report Error EOF CODE Parser terminal index EOFT SYMBOL prevtok prevtok candidate symbol 0 candidate location error token return candidate At this point primary and initial attempt at secondary recovery did not work We will now get into panic mode and keep trying secondary phase recoveries until we either find a successful recovery or have consumed the remaining input tokens while lex Stream kind buffer BUFF UBOUND EOFT SYMBOL candidate secondary Phase buffer MAX DISTANCE MIN DISTANCE 2 if candidate symbol 0 return candidate We reached the end of the file while panicking Delete all remaining tokens in the input int i for i BUFF UBOUND lex Stream kind buffer i EOFT SYMBOL i empty report Error DELETION CODE Parser terminal index prevtok Kind Parser terminal index lex Stream kind prevtok error token buffer i candidate symbol 0 candidate location buffer i return candidate  RepairCandidate errorRecovery error_token forcedError errorToken error_token errorTokenStart lexStream error_token lexStream error_token prevtokKind lexStream forcedError name_index terminal_index TokenNameLBRACE reportError INSERTION_CODE name_index RepairCandidate RepairCandidate TokenNameLBRACE error_token lexStream error_token stateStackTop nextStackTop stateStackTop nextStack locationStack stateStackTop error_token locationStartStack stateStackTop lexStream error_token RepairCandidate primaryPhase error_token secondaryPhase error_token lexStream error_token EOFT_SYMBOL reportError EOF_CODE terminal_index EOFT_SYMBOL error_token lexStream BUFF_UBOUND EOFT_SYMBOL secondaryPhase MAX_DISTANCE MIN_DISTANCE BUFF_UBOUND lexStream EOFT_SYMBOL reportError DELETION_CODE terminal_index prevtokKind terminal_index lexStream error_token
private Repair Candidate primary Phase int error token Primary Repair Info repair new Primary Repair Info Repair Candidate candidate new Repair Candidate Initialize the buffer int i next Stack Top 0 3 2 buffer i error token for int j i j 0 j buffer j 1 lex Stream previous buffer j for int k i 1 k BUFF SIZE k buffer k lex Stream next buffer k 1 If NEXT STACK TOP 0 then the parse was successful on CURTOK and the error was detected on the successor of CURTOK In that case first check whether or not primary recovery is possible on next stack if next Stack Top 0 repair buffer Position 3 repair check Primary Distance next Stack next Stack Top repair Next try primary recovery on the current token Primary Repair Info new repair repair copy new repair buffer Position 2 new repair check Primary Distance stack state Stack Top new repair if new repair distance repair distance new repair misspell Index repair misspell Index repair new repair Finally if prev stack top 0 then try primary recovery on the prev stack configuration if prev Stack Top 0 new repair repair copy new repair buffer Position 1 new repair check Primary Distance prev Stack prev Stack Top new repair if new repair distance repair distance new repair misspell Index repair misspell Index repair new repair Before accepting the best primary phase recovery obtained ensure that we cannot do better with a similar secondary phase recovery if next Stack Top 0 next stack available if secondary Check next Stack next Stack Top 3 repair distance return candidate else if secondary Check stack state Stack Top 2 repair distance return candidate First adjust distance if the recovery is on the error token it is important that the adjustment be made here and not at each primary trial to prevent the distance tests from being biased in favor of deferred recoveries which have access to more input tokens repair distance repair distance repair buffer Position 1 Next adjust the distance if the recovery is a deletion or some form of substitution if repair code INVALID CODE repair code DELETION CODE repair code SUBSTITUTION CODE repair code MERGE CODE repair distance After adjustment check if the most successful primary recovery can be applied If not continue with more radical recoveries if repair distance MIN DISTANCE return candidate When processing an insertion error if the token preceeding the error token is not available we change the repair code into a BEFORE CODE to instruct the reporting routine that it indicates that the repair symbol should be inserted before the error token if repair code INSERTION CODE if buffer repair buffer Position 1 0 repair code BEFORE CODE Select the proper sequence of states on which to recover update stack accordingly and call diagnostic routine if repair buffer Position 1 state Stack Top prev Stack Top for int j 0 j state Stack Top j stack j prev Stack j else if next Stack Top 0 repair buffer Position 3 state Stack Top next Stack Top for int j 0 j state Stack Top j stack j next Stack j location Stack state Stack Top buffer 3 location Start Stack state Stack Top lex Stream start buffer 3 return primary Diagnosis repair  RepairCandidate primaryPhase error_token PrimaryRepairInfo PrimaryRepairInfo RepairCandidate RepairCandidate nextStackTop error_token lexStream BUFF_SIZE lexStream NEXT_STACK_TOP next_stack nextStackTop bufferPosition checkPrimaryDistance nextStack nextStackTop PrimaryRepairInfo new_repair new_repair bufferPosition new_repair checkPrimaryDistance stateStackTop new_repair new_repair new_repair misspellIndex misspellIndex new_repair prev_stack_top prev_stack prevStackTop new_repair new_repair bufferPosition new_repair checkPrimaryDistance prevStack prevStackTop new_repair new_repair new_repair misspellIndex misspellIndex new_repair nextStackTop next_stack secondaryCheck nextStack nextStackTop secondaryCheck stateStackTop bufferPosition INVALID_CODE DELETION_CODE SUBSTITUTION_CODE MERGE_CODE MIN_DISTANCE BEFORE_CODE INSERTION_CODE bufferPosition BEFORE_CODE bufferPosition stateStackTop prevStackTop stateStackTop prevStack nextStackTop bufferPosition stateStackTop nextStackTop stateStackTop nextStack locationStack stateStackTop locationStartStack stateStackTop lexStream primaryDiagnosis
private int merge Candidate int state int buffer position char name1 lex Stream name buffer buffer position char name2 lex Stream name buffer buffer position 1 int len name1 length name2 length char str Char Operation concat name1 name2 for int k Parser asi state Parser asr k 0 k int l Parser terminal index Parser asr k if len Parser name l length char name Parser name l to Char Array if Char Operation equals str name false return Parser asr k return 0  mergeCandidate buffer_position lexStream buffer_position lexStream buffer_position CharOperation terminal_index toCharArray CharOperation
private Primary Repair Info check Primary Distance int stck int stack top Primary Repair Info repair int i j k next state max pos act root symbol tok First try scope and manual recovery Primary Repair Info scope repair scope Trial stck stack top repair copy if scope repair distance repair distance repair scope repair Next try merging the error token with its successor if buffer repair buffer Position 0 buffer repair buffer Position 1 0 do not merge the first token symbol merge Candidate stck stack top repair buffer Position if symbol 0 j parse Check stck stack top symbol repair buffer Position 2 if j repair distance j repair distance repair misspell Index 10 repair misspell Index 10 repair symbol symbol repair distance j repair code MERGE CODE Next try deletion of the error token j parse Check stck stack top lex Stream kind buffer repair buffer Position 1 repair buffer Position 2 if lex Stream kind buffer repair buffer Position EOLT SYMBOL lex Stream after Eol buffer repair buffer Position 1 k 10 else k 0 if j repair distance j repair distance k repair misspell Index repair misspell Index k repair code DELETION CODE repair distance j Update the error configuration by simulating all reduce and goto actions induced by the error token Then assign the top most state of the new configuration to next state next state stck stack top max pos stack top temp Stack Top stack top 1 tok lex Stream kind buffer repair buffer Position lex Stream reset buffer repair buffer Position 1 act Parser t Action next state tok while act NUM RULES do temp Stack Top Parser rhs act 1 symbol Parser lhs act act temp Stack Top max pos temp Stack temp Stack Top stck temp Stack Top act Parser nt Action act symbol while act NUM RULES max pos max pos temp Stack Top max pos temp Stack Top temp Stack temp Stack Top 1 act next state act act Parser t Action next state tok Next place the list of candidates in proper order root 0 for i Parser asi next state Parser asr i 0 i symbol Parser asr i if symbol EOFT SYMBOL symbol ERROR SYMBOL if root 0 list symbol symbol else list symbol list root list root symbol root symbol if stck stack top next state for i Parser asi stck stack top Parser asr i 0 i symbol Parser asr i if symbol EOFT SYMBOL symbol ERROR SYMBOL list symbol 0 if root 0 list symbol symbol else list symbol list root list root symbol root symbol i list root list root 0 root i Next try insertion for each possible candidate available in the current state except EOFT and ERROR SYMBOL symbol root while symbol 0 if symbol EOLT SYMBOL lex Stream after Eol buffer repair buffer Position k 10 else k 0 j parse Check stck stack top symbol repair buffer Position if j repair distance repair misspell Index k repair distance j repair symbol symbol repair code INSERTION CODE else if j repair distance k repair misspell Index repair misspell Index k repair distance j repair symbol symbol repair code INSERTION CODE else if j repair distance k repair misspell Index is Better Symbol symbol repair symbol repair misspell Index k repair distance j repair symbol symbol repair code INSERTION CODE symbol list symbol Next Try substitution for each possible candidate available in the current state except EOFT and ERROR SYMBOL symbol root if buffer repair buffer Position 0 do not replace the first token while symbol 0 if symbol EOLT SYMBOL lex Stream after Eol buffer repair buffer Position 1 k 10 else k misspell symbol buffer repair buffer Position j parse Check stck stack top symbol repair buffer Position 1 if j repair distance repair misspell Index k repair distance j repair symbol symbol repair code SUBSTITUTION CODE else if j repair distance k repair misspell Index repair misspell Index k repair symbol symbol repair code SUBSTITUTION CODE else if j repair distance k repair misspell Index is Better Symbol symbol repair symbol repair misspell Index k repair symbol symbol repair code SUBSTITUTION CODE i symbol symbol list symbol list i 0 reset element Next we try to insert a nonterminal candidate in front of the error token or substituting a nonterminal candidate for the error token Precedence is given to insertion for i Parser nasi stck stack top Parser nasr i 0 i symbol Parser nasr i NT OFFSET j parse Check stck stack top symbol repair buffer Position 1 if j repair distance repair misspell Index 0 repair distance j repair symbol symbol repair code INVALID CODE j parse Check stck stack top symbol repair buffer Position if j repair distance j repair distance repair code INVALID CODE repair misspell Index 0 repair distance j repair symbol symbol repair code INSERTION CODE return repair  PrimaryRepairInfo checkPrimaryDistance stack_top PrimaryRepairInfo next_state max_pos PrimaryRepairInfo scope_repair scopeTrial stack_top scope_repair scope_repair bufferPosition bufferPosition mergeCandidate stack_top bufferPosition parseCheck stack_top bufferPosition misspellIndex misspellIndex MERGE_CODE parseCheck stack_top lexStream bufferPosition bufferPosition lexStream bufferPosition EOLT_SYMBOL lexStream afterEol bufferPosition misspellIndex misspellIndex DELETION_CODE next_state next_state stack_top max_pos stack_top tempStackTop stack_top lexStream bufferPosition lexStream bufferPosition tAction next_state NUM_RULES tempStackTop tempStackTop max_pos tempStack tempStackTop tempStackTop ntAction NUM_RULES max_pos max_pos tempStackTop max_pos tempStackTop tempStack tempStackTop next_state tAction next_state next_state EOFT_SYMBOL ERROR_SYMBOL stack_top next_state stack_top EOFT_SYMBOL ERROR_SYMBOL ERROR_SYMBOL EOLT_SYMBOL lexStream afterEol bufferPosition parseCheck stack_top bufferPosition misspellIndex INSERTION_CODE misspellIndex misspellIndex INSERTION_CODE misspellIndex isBetterSymbol misspellIndex INSERTION_CODE ERROR_SYMBOL bufferPosition EOLT_SYMBOL lexStream afterEol bufferPosition bufferPosition parseCheck stack_top bufferPosition misspellIndex SUBSTITUTION_CODE misspellIndex misspellIndex SUBSTITUTION_CODE misspellIndex isBetterSymbol misspellIndex SUBSTITUTION_CODE stack_top NT_OFFSET parseCheck stack_top bufferPosition misspellIndex INVALID_CODE parseCheck stack_top bufferPosition INVALID_CODE misspellIndex INSERTION_CODE
private Repair Candidate primary Diagnosis Primary Repair Info repair int name index Issue diagnostic int prevtok buffer repair buffer Position 1 int curtok buffer repair buffer Position switch repair code case INSERTION CODE case BEFORE CODE if repair symbol NT OFFSET name index get Nterm Index stack state Stack Top repair symbol repair buffer Position else name index get Term Index stack state Stack Top repair symbol repair buffer Position int t repair code INSERTION CODE prevtok curtok report Error repair code name index t t break case INVALID CODE name index get Nterm Index stack state Stack Top repair symbol repair buffer Position 1 report Error repair code name index curtok curtok break case SUBSTITUTION CODE if repair misspell Index 6 name index Parser terminal index repair symbol else name index get Term Index stack state Stack Top repair symbol repair buffer Position 1 if name index Parser terminal index repair symbol repair code INVALID CODE report Error repair code name index curtok curtok break case MERGE CODE report Error repair code Parser terminal index repair symbol curtok lex Stream next curtok break case SCOPE CODE for int i 0 i scope Stack Top i report Error repair code scope Index i location Stack scope Position i prevtok Parser non terminal index Parser scope lhs scope Index i repair symbol Parser scope lhs scope Index scope Stack Top NT OFFSET state Stack Top scope Position scope Stack Top report Error repair code scope Index scope Stack Top location Stack scope Position scope Stack Top prevtok get Nterm Index stack state Stack Top repair symbol repair buffer Position break default deletion report Error repair code Parser terminal index ERROR SYMBOL curtok curtok Update buffer Repair Candidate candidate new Repair Candidate switch repair code case INSERTION CODE case BEFORE CODE case SCOPE CODE candidate symbol repair symbol candidate location buffer repair buffer Position lex Stream reset buffer repair buffer Position break case INVALID CODE case SUBSTITUTION CODE candidate symbol repair symbol candidate location buffer repair buffer Position lex Stream reset buffer repair buffer Position 1 break case MERGE CODE candidate symbol repair symbol candidate location buffer repair buffer Position lex Stream reset buffer repair buffer Position 2 break default deletion candidate location buffer repair buffer Position 1 candidate symbol lex Stream kind buffer repair buffer Position 1 lex Stream reset buffer repair buffer Position 2 break return candidate  RepairCandidate primaryDiagnosis PrimaryRepairInfo name_index bufferPosition bufferPosition INSERTION_CODE BEFORE_CODE NT_OFFSET name_index getNtermIndex stateStackTop bufferPosition name_index getTermIndex stateStackTop bufferPosition INSERTION_CODE reportError name_index INVALID_CODE name_index getNtermIndex stateStackTop bufferPosition reportError name_index SUBSTITUTION_CODE misspellIndex name_index terminal_index name_index getTermIndex stateStackTop bufferPosition name_index terminal_index INVALID_CODE reportError name_index MERGE_CODE reportError terminal_index lexStream SCOPE_CODE scopeStackTop reportError scopeIndex locationStack scopePosition non_terminal_index scope_lhs scopeIndex scope_lhs scopeIndex scopeStackTop NT_OFFSET stateStackTop scopePosition scopeStackTop reportError scopeIndex scopeStackTop locationStack scopePosition scopeStackTop getNtermIndex stateStackTop bufferPosition reportError terminal_index ERROR_SYMBOL RepairCandidate RepairCandidate INSERTION_CODE BEFORE_CODE SCOPE_CODE bufferPosition lexStream bufferPosition INVALID_CODE SUBSTITUTION_CODE bufferPosition lexStream bufferPosition MERGE_CODE bufferPosition lexStream bufferPosition bufferPosition lexStream bufferPosition lexStream bufferPosition
private int get Term Index int stck int stack top int tok int buffer position Initialize stack index of temp stack and initialize maximum position of state stack that is still useful int act stck stack top max pos stack top highest symbol tok temp Stack Top stack top 1 Compute all reduce and associated actions induced by the candidate until a SHIFT or SHIFT REDUCE is computed ERROR and ACCEPT actions cannot be computed on the candidate in this context since we know that it is suitable for recovery lex Stream reset buffer buffer position act Parser t Action act tok while act NUM RULES Process all goto reduce actions following reduction until a goto action is computed do temp Stack Top Parser rhs act 1 int lhs symbol Parser lhs act act temp Stack Top max pos temp Stack temp Stack Top stck temp Stack Top act Parser nt Action act lhs symbol while act NUM RULES Compute new maximum useful position of STATE  stack push goto state into the stack and compute next action on candidate max pos max pos temp Stack Top max pos temp Stack Top temp Stack temp Stack Top 1 act act Parser t Action act tok At this stage we have simulated all actions induced by the candidate and we are ready to shift or shift reduce it First set tok and next ptr appropriately and identify the candidate as the initial highest symbol If a shift action was computed on the candidate update the stack and compute the next action Next simulate all actions possible on the next input token until we either have to shift it or are about to reduce below the initial starting point in the stack indicated by max pos as computed in the previous loop At that point return the highest symbol computed temp Stack Top adjust top of stack to reflect last goto next move is shift or shift reduce int threshold temp Stack Top tok lex Stream kind buffer buffer position lex Stream reset buffer buffer position 1 if act ERROR ACTION shift reduce on candidate act ERROR ACTION else temp Stack temp Stack Top 1 act act Parser t Action act tok while act NUM RULES Process all goto reduce actions following reduction until a goto action is computed do temp Stack Top Parser rhs act 1 if temp Stack Top threshold return highest symbol NT OFFSET Parser non terminal index highest symbol NT OFFSET Parser terminal index highest symbol int lhs symbol Parser lhs act if temp Stack Top threshold highest symbol lhs symbol NT OFFSET act temp Stack Top max pos temp Stack temp Stack Top stck temp Stack Top act Parser nt Action act lhs symbol while act NUM RULES temp Stack temp Stack Top 1 act act Parser t Action act tok return highest symbol NT OFFSET Parser non terminal index highest symbol NT OFFSET Parser terminal index highest symbol  getTermIndex stack_top buffer_position temp_stack stack_top max_pos stack_top highest_symbol tempStackTop stack_top lexStream buffer_position tAction NUM_RULES tempStackTop lhs_symbol tempStackTop max_pos tempStack tempStackTop tempStackTop ntAction lhs_symbol NUM_RULES STATE_ max_pos max_pos tempStackTop max_pos tempStackTop tempStack tempStackTop tAction next_ptr highest_symbol max_pos highest_symbol tempStackTop tempStackTop lexStream buffer_position lexStream buffer_position ERROR_ACTION ERROR_ACTION tempStack tempStackTop tAction NUM_RULES tempStackTop tempStackTop highest_symbol NT_OFFSET non_terminal_index highest_symbol NT_OFFSET terminal_index highest_symbol lhs_symbol tempStackTop highest_symbol lhs_symbol NT_OFFSET tempStackTop max_pos tempStack tempStackTop tempStackTop ntAction lhs_symbol NUM_RULES tempStack tempStackTop tAction highest_symbol NT_OFFSET non_terminal_index highest_symbol NT_OFFSET terminal_index highest_symbol
private int get Nterm Index int start int sym int buffer position int highest symbol sym NT OFFSET tok lex Stream kind buffer buffer position lex Stream reset buffer buffer position 1 Initialize stack index of temp stack and initialize maximum position of state stack that is still useful temp Stack Top 0 temp Stack temp Stack Top start int act Parser nt Action start highest symbol if act NUM RULES goto action temp Stack temp Stack Top 1 act act Parser t Action act tok while act NUM RULES Process all goto reduce actions following reduction until a goto action is computed do temp Stack Top Parser rhs act 1 if temp Stack Top 0 return Parser non terminal index highest symbol if temp Stack Top 0 highest symbol Parser lhs act act Parser nt Action temp Stack temp Stack Top Parser lhs act while act NUM RULES temp Stack temp Stack Top 1 act act Parser t Action act tok return Parser non terminal index highest symbol  getNtermIndex buffer_position highest_symbol NT_OFFSET lexStream buffer_position lexStream buffer_position temp_stack tempStackTop tempStack tempStackTop ntAction highest_symbol NUM_RULES tempStack tempStackTop tAction NUM_RULES tempStackTop tempStackTop non_terminal_index highest_symbol tempStackTop highest_symbol ntAction tempStack tempStackTop NUM_RULES tempStack tempStackTop tAction non_terminal_index highest_symbol
private boolean is Better Symbol int symbol int actual Symbol switch actual Symbol case Token Nameinterface if symbol Token Nameclass return true break return false  isBetterSymbol actualSymbol actualSymbol TokenNameinterface TokenNameclass
private int misspell int sym int tok char name Parser name Parser terminal index sym to Char Array int n name length char s1 new char n 1 for int k 0 k n k char c name k s1 k Character to Lower Case c s1 n 0 char token Name lex Stream name tok int len token Name length int m len MAX NAME LENGTH len MAX NAME LENGTH char s2 new char m 1 for int k 0 k m k char c token Name k s2 k Character to Lower Case c s2 m 0 Singleton mispellings if n 1 m 1 if s1 0 s2 0 s1 0 s2 0 s1 0 s2 0 s1 0 s2 0 s1 0 s2 0 s1 0 s2 0 s1 0 s2 0 s1 0 s2 0 return 3 Scan the two strings Increment match count for each match When a transposition is encountered increase match count by two but count it as an error When a typo is found skip it and count it as an error Otherwise we have a mismatch if one of the strings is longer increment its index otherwise increment both indices and continue This algorithm is an adaptation of a boolean misspelling algorithm proposed by Juergen Uhl int count 0 int prefix length 0 int num errors 0 int i 0 int j 0 while i n j m if s1 i s2 j count i j if num errors 0 prefix length else if s1 i 1 s2 j s1 i s2 j 1 count 2 i 2 j 2 num errors else if s1 i 1 s2 j 1 i j num errors else if n i m j i else if m j n i j else i j num errors if i n j m num errors if num errors n m n m 6 1 count prefix length return count 10 n len len n num errors  terminal_index toCharArray toLowerCase tokenName lexStream tokenName MAX_NAME_LENGTH MAX_NAME_LENGTH tokenName toLowerCase prefix_length num_errors num_errors prefix_length num_errors num_errors num_errors num_errors num_errors prefix_length num_errors
private Primary Repair Info scope Trial int stck int stack top Primary Repair Info repair state Seen new int stack Length for int i 0 i stack Length i state Seen i NIL state Pool Top 0 state Pool new State Info stack Length scope Trial Check stck stack top repair 0 state Seen null state Pool Top 0 repair code SCOPE CODE repair misspell Index 10 return repair  PrimaryRepairInfo scopeTrial stack_top PrimaryRepairInfo stateSeen stackLength stackLength stateSeen statePoolTop statePool StateInfo stackLength scopeTrialCheck stack_top stateSeen statePoolTop SCOPE_CODE misspellIndex
private void scope Trial Check int stck int stack top Primary Repair Info repair int indx if indx 20 return avoid too much recursive call to improve performance int act stck stack top for int i state Seen stack top i NIL i state Pool i next if state Pool i state act return int old state pool top state Pool Top if state Pool Top state Pool length System arraycopy state Pool 0 state Pool new State Info state Pool Top 2 0 state Pool Top state Pool old state pool top new State Info act state Seen stack top state Seen stack top old state pool top for int i 0 i SCOPE SIZE i Use the scope lookahead symbol to force all reductions inducible by that symbol act stck stack top temp Stack Top stack top 1 int max pos stack top int tok Parser scope la i lex Stream reset buffer repair buffer Position act Parser t Action act tok while act NUM RULES Process all goto reduce actions following reduction until a goto action is computed do temp Stack Top Parser rhs act 1 int lhs symbol Parser lhs act act temp Stack Top max pos temp Stack temp Stack Top stck temp Stack Top act Parser nt Action act lhs symbol while act NUM RULES if temp Stack Top 1 stack Length return max pos max pos temp Stack Top max pos temp Stack Top temp Stack temp Stack Top 1 act act Parser t Action act tok If the lookahead symbol is parsable then we check whether or not we have a match between the scope prefix and the transition symbols corresponding to the states on top of the stack if act ERROR ACTION int j k k Parser scope prefix i for j temp Stack Top 1 j max pos 1 Parser in symbol temp Stack j Parser scope rhs k j k if j max pos for j max pos j 1 Parser in symbol stck j Parser scope rhs k j k If the prefix matches check whether the state newly exposed on top of the stack after the corresponding prefix states are popped from the stack is in the set of source states for the scope in question and that it is at a position below the threshold indicated by MARKED POS int marked pos max pos stack top max pos 1 stack top if Parser scope rhs k 0 j marked pos match int stack position j for j Parser scope state set i stck stack position Parser scope state j Parser scope state j 0 j empty If the top state is valid for scope recovery the left hand side of the scope is used as starting symbol and we calculate how far the parser can advance within the forward context after parsing the left hand symbol if Parser scope state j 0 state was found int previous distance repair distance int distance parse Check stck stack position Parser scope lhs i NT OFFSET repair buffer Position if the recovery is not successful we update the stack with all actions induced by the left hand symbol and recursively call SCOPE TRIAL CHECK to try again Otherwise the recovery is successful If the new distance is greater than the initial SCOPE DISTANCE we update SCOPE DISTANCE and set scope stack top to INDX to indicate the number of scopes that are to be applied for a succesful recovery NOTE that this procedure cannot get into an infinite loop since each prefix match is guaranteed to take us to a lower point within the stack if distance repair buffer Position 1 MIN DISTANCE int top stack position act Parser nt Action stck top Parser scope lhs i while act NUM RULES top Parser rhs act 1 act Parser nt Action stck top Parser lhs act top j act act stck top save stck top j swap scope Trial Check stck top repair indx 1 stck top act restore else if distance repair distance scope Stack Top indx repair distance distance if lex Stream kind buffer repair buffer Position EOFT SYMBOL repair distance previous distance scope Stack Top indx repair distance MAX DISTANCE If this scope recovery has beaten the previous distance then we have found a better recovery or this recovery is one of a list of scope recoveries Record its information at the proper location INDX in SCOPE INDEX and SCOPE STACK if repair distance previous distance scope Index indx i scope Position indx stack position return  scopeTrialCheck stack_top PrimaryRepairInfo stack_top stateSeen stack_top statePool statePool old_state_pool_top statePoolTop statePoolTop statePool statePool statePool StateInfo statePoolTop statePoolTop statePool old_state_pool_top StateInfo stateSeen stack_top stateSeen stack_top old_state_pool_top SCOPE_SIZE stack_top tempStackTop stack_top max_pos stack_top scope_la lexStream bufferPosition tAction NUM_RULES tempStackTop lhs_symbol tempStackTop max_pos tempStack tempStackTop tempStackTop ntAction lhs_symbol NUM_RULES tempStackTop stackLength max_pos max_pos tempStackTop max_pos tempStackTop tempStack tempStackTop tAction ERROR_ACTION scope_prefix tempStackTop max_pos in_symbol tempStack scope_rhs max_pos max_pos in_symbol scope_rhs MARKED_POS marked_pos max_pos stack_top max_pos stack_top scope_rhs marked_pos stack_position scope_state_set stack_position scope_state scope_state scope_state previous_distance parseCheck stack_position scope_lhs NT_OFFSET bufferPosition SCOPE_TRIAL_CHECK SCOPE_DISTANCE SCOPE_DISTANCE scope_stack_top bufferPosition MIN_DISTANCE stack_position ntAction scope_lhs NUM_RULES ntAction scopeTrialCheck scopeStackTop lexStream bufferPosition EOFT_SYMBOL previous_distance scopeStackTop MAX_DISTANCE SCOPE_INDEX SCOPE_STACK previous_distance scopeIndex scopePosition stack_position
private boolean secondary Check int stck int stack top int buffer position int distance int top j for top stack top 1 top 0 top j parse Check stck top lex Stream kind buffer buffer position buffer position 1 if j buffer position 1 MIN DISTANCE j distance return true Primary Repair Info repair new Primary Repair Info repair buffer Position buffer position 1 repair distance distance repair scope Trial stck stack top repair if repair distance buffer position MIN DISTANCE repair distance distance return true return false  secondaryCheck stack_top buffer_position stack_top parseCheck lexStream buffer_position buffer_position buffer_position MIN_DISTANCE PrimaryRepairInfo PrimaryRepairInfo bufferPosition buffer_position scopeTrial stack_top buffer_position MIN_DISTANCE
private Repair Candidate secondary Phase int error token Secondary Repair Info repair new Secondary Repair Info Secondary Repair Info misplaced new Secondary Repair Info Repair Candidate candidate new Repair Candidate int i j k top int next last index 0 int last index candidate symbol 0 repair code 0 repair distance 0 repair recovery On Next Stack false misplaced distance 0 misplaced recovery On Next Stack false If the next stack is available try misplaced and secondary recovery on it first if next Stack Top 0 int save location buffer 2 error token buffer 1 lex Stream previous buffer 2 buffer 0 lex Stream previous buffer 1 for k 3 k BUFF UBOUND k buffer k lex Stream next buffer k 1 buffer BUFF UBOUND lex Stream badtoken elmt not available If we are at the end of the input stream compute the index position of the first EOFT symbol last useful index for next last index MAX DISTANCE 1 next last index 1 lex Stream kind buffer next last index EOFT SYMBOL next last index empty next last index next last index 1 save location location Stack next Stack Top int save location start location Start Stack next Stack Top location Stack next Stack Top buffer 2 location Start Stack next Stack Top lex Stream start buffer 2 misplaced num Deletions next Stack Top misplaced misplacement Recovery next Stack next Stack Top next last index misplaced true if misplaced recovery On Next Stack misplaced distance repair num Deletions next Stack Top BUFF UBOUND repair secondary Recovery next Stack next Stack Top next last index repair true if repair recovery On Next Stack repair distance location Stack next Stack Top save location location Start Stack next Stack Top save location start else next stack not available initialize misplaced num Deletions state Stack Top repair num Deletions state Stack Top BUFF UBOUND Try secondary recovery on the stack configuration buffer 3 error token buffer 2 lex Stream previous buffer 3 buffer 1 lex Stream previous buffer 2 buffer 0 lex Stream previous buffer 1 for k 4 k BUFF SIZE k buffer k lex Stream next buffer k 1 for last index MAX DISTANCE 1 last index 1 lex Stream kind buffer last index EOFT SYMBOL last index empty last index misplaced misplacement Recovery stack state Stack Top last index misplaced false repair secondary Recovery stack state Stack Top last index repair false If a successful misplaced recovery was found compare it with the most successful secondary recovery If the misplaced recovery either deletes fewer symbols or parse checks further then it is chosen if misplaced distance MIN DISTANCE if misplaced num Deletions repair num Deletions misplaced distance misplaced num Deletions repair distance repair num Deletions repair code MISPLACED CODE repair stack Position misplaced stack Position repair buffer Position 2 repair num Deletions misplaced num Deletions repair distance misplaced distance repair recovery On Next Stack misplaced recovery On Next Stack If the successful recovery was on next stack update stack buffer location stack and last index if repair recovery On Next Stack state Stack Top next Stack Top for i 0 i state Stack Top i stack i next Stack i buffer 2 error token buffer 1 lex Stream previous buffer 2 buffer 0 lex Stream previous buffer 1 for k 3 k BUFF UBOUND k buffer k lex Stream next buffer k 1 buffer BUFF UBOUND lex Stream badtoken elmt not available location Stack next Stack Top buffer 2 location Start Stack next Stack Top lex Stream start buffer 2 last index next last index Next try scope recoveries after deletion of one two three four buffer position tokens from the input stream if repair code SECONDARY CODE repair code DELETION CODE Primary Repair Info scope repair new Primary Repair Info scope repair distance 0 for scope repair buffer Position 2 scope repair buffer Position repair buffer Position repair code SCOPE CODE scope repair buffer Position scope repair scope Trial stack state Stack Top scope repair j scope repair distance MAX DISTANCE last index scope repair distance k scope repair buffer Position 1 if j k MIN DISTANCE j k repair distance repair num Deletions repair code SCOPE CODE i scope Index scope Stack Top upper bound repair symbol Parser scope lhs i NT OFFSET repair stack Position state Stack Top repair buffer Position scope repair buffer Position If no successful recovery is found and we have reached the end of the file check whether or not scope recovery is applicable at the end of the file after discarding some states if repair code 0 lex Stream kind buffer last index EOFT SYMBOL Primary Repair Info scope repair new Primary Repair Info scope repair buffer Position last index scope repair distance 0 for top state Stack Top top 0 repair code 0 top scope repair scope Trial stack top scope repair if scope repair distance 0 repair code SCOPE CODE i scope Index scope Stack Top upper bound repair symbol Parser scope lhs i NT OFFSET repair stack Position top repair buffer Position scope repair buffer Position If a successful repair was not found quit Otherwise issue diagnosis and adjust configuration if repair code 0 return candidate secondary Diagnosis repair Update buffer based on number of elements that are deleted switch repair code case MISPLACED CODE candidate location buffer 2 candidate symbol lex Stream kind buffer 2 lex Stream reset lex Stream next buffer 2 break case DELETION CODE candidate location buffer repair buffer Position candidate symbol lex Stream kind buffer repair buffer Position lex Stream reset lex Stream next buffer repair buffer Position break default SCOPE CODE SECONDARY CODE candidate symbol repair symbol candidate location buffer repair buffer Position lex Stream reset buffer repair buffer Position break return candidate  RepairCandidate secondaryPhase error_token SecondaryRepairInfo SecondaryRepairInfo SecondaryRepairInfo SecondaryRepairInfo RepairCandidate RepairCandidate next_last_index last_index recoveryOnNextStack recoveryOnNextStack next_stack nextStackTop save_location error_token lexStream lexStream BUFF_UBOUND lexStream BUFF_UBOUND lexStream next_last_index MAX_DISTANCE next_last_index lexStream next_last_index EOFT_SYMBOL next_last_index next_last_index next_last_index save_location locationStack nextStackTop save_location_start locationStartStack nextStackTop locationStack nextStackTop locationStartStack nextStackTop lexStream numDeletions nextStackTop misplacementRecovery nextStack nextStackTop next_last_index recoveryOnNextStack numDeletions nextStackTop BUFF_UBOUND secondaryRecovery nextStack nextStackTop next_last_index recoveryOnNextStack locationStack nextStackTop save_location locationStartStack nextStackTop save_location_start next_stack numDeletions stateStackTop numDeletions stateStackTop BUFF_UBOUND error_token lexStream lexStream lexStream BUFF_SIZE lexStream last_index MAX_DISTANCE last_index lexStream last_index EOFT_SYMBOL last_index last_index misplacementRecovery stateStackTop last_index secondaryRecovery stateStackTop last_index MIN_DISTANCE numDeletions numDeletions numDeletions numDeletions MISPLACED_CODE stackPosition stackPosition bufferPosition numDeletions numDeletions recoveryOnNextStack recoveryOnNextStack next_stack location_stack last_index recoveryOnNextStack stateStackTop nextStackTop stateStackTop nextStack error_token lexStream lexStream BUFF_UBOUND lexStream BUFF_UBOUND lexStream locationStack nextStackTop locationStartStack nextStackTop lexStream last_index next_last_index buffer_position SECONDARY_CODE DELETION_CODE PrimaryRepairInfo scope_repair PrimaryRepairInfo scope_repair scope_repair bufferPosition scope_repair bufferPosition bufferPosition SCOPE_CODE scope_repair bufferPosition scope_repair scopeTrial stateStackTop scope_repair scope_repair MAX_DISTANCE last_index scope_repair scope_repair bufferPosition MIN_DISTANCE numDeletions SCOPE_CODE scopeIndex scopeStackTop scope_lhs NT_OFFSET stackPosition stateStackTop bufferPosition scope_repair bufferPosition lexStream last_index EOFT_SYMBOL PrimaryRepairInfo scope_repair PrimaryRepairInfo scope_repair bufferPosition last_index scope_repair stateStackTop scope_repair scopeTrial scope_repair scope_repair SCOPE_CODE scopeIndex scopeStackTop scope_lhs NT_OFFSET stackPosition bufferPosition scope_repair bufferPosition secondaryDiagnosis MISPLACED_CODE lexStream lexStream lexStream DELETION_CODE bufferPosition lexStream bufferPosition lexStream lexStream bufferPosition SCOPE_CODE SECONDARY_CODE bufferPosition lexStream bufferPosition
private Secondary Repair Info misplacement Recovery int stck int stack top int last index Secondary Repair Info repair boolean stack flag int previous loc buffer 2 int stack deletions 0 for int top stack top 1 top 0 top if location Stack top previous loc stack deletions previous loc location Stack top int j parse Check stck top lex Stream kind buffer 2 3 if j MAX DISTANCE j last index if j MIN DISTANCE j stack deletions repair distance repair num Deletions repair stack Position top repair distance j repair num Deletions stack deletions repair recovery On Next Stack stack flag return repair  SecondaryRepairInfo misplacementRecovery stack_top last_index SecondaryRepairInfo stack_flag previous_loc stack_deletions stack_top locationStack previous_loc stack_deletions previous_loc locationStack parseCheck lexStream MAX_DISTANCE last_index MIN_DISTANCE stack_deletions numDeletions stackPosition numDeletions stack_deletions recoveryOnNextStack stack_flag
private Secondary Repair Info secondary Recovery int stck int stack top int last index Secondary Repair Info repair boolean stack flag int previous loc int stack deletions 0 previous loc buffer 2 for int top stack top top 0 repair num Deletions stack deletions top if location Stack top previous loc stack deletions previous loc location Stack top for int i 2 i last index MIN DISTANCE 1 repair num Deletions stack deletions i 1 i int j parse Check stck top lex Stream kind buffer i i 1 if j MAX DISTANCE j last index if j i 1 MIN DISTANCE int k stack deletions i 1 if k repair num Deletions j k repair distance repair num Deletions repair code SECONDARY CODE j k repair distance repair num Deletions repair code DELETION CODE repair distance j repair stack Position top repair buffer Position i repair num Deletions k repair recovery On Next Stack stack flag for int l Parser nasi stck top l 0 Parser nasr l 0 l int symbol Parser nasr l NT OFFSET j parse Check stck top symbol i if j MAX DISTANCE j last index if j i 1 MIN DISTANCE int k stack deletions i 1 if k repair num Deletions j k repair distance repair num Deletions repair code SECONDARY CODE repair symbol symbol repair distance j repair stack Position top repair buffer Position i repair num Deletions k repair recovery On Next Stack stack flag return repair  SecondaryRepairInfo secondaryRecovery stack_top last_index SecondaryRepairInfo stack_flag previous_loc stack_deletions previous_loc stack_top numDeletions stack_deletions locationStack previous_loc stack_deletions previous_loc locationStack last_index MIN_DISTANCE numDeletions stack_deletions parseCheck lexStream MAX_DISTANCE last_index MIN_DISTANCE stack_deletions numDeletions numDeletions SECONDARY_CODE numDeletions DELETION_CODE stackPosition bufferPosition numDeletions recoveryOnNextStack stack_flag NT_OFFSET parseCheck MAX_DISTANCE last_index MIN_DISTANCE stack_deletions numDeletions numDeletions SECONDARY_CODE stackPosition bufferPosition numDeletions recoveryOnNextStack stack_flag
private void secondary Diagnosis Secondary Repair Info repair switch repair code case SCOPE CODE if repair stack Position state Stack Top report Error DELETION CODE Parser terminal index ERROR SYMBOL location Stack repair stack Position buffer 1 for int i 0 i scope Stack Top i report Error SCOPE CODE scope Index i location Stack scope Position i buffer 1 Parser non terminal index Parser scope lhs scope Index i repair symbol Parser scope lhs scope Index scope Stack Top NT OFFSET state Stack Top scope Position scope Stack Top report Error SCOPE CODE scope Index scope Stack Top location Stack scope Position scope Stack Top buffer 1 get Nterm Index stack state Stack Top repair symbol repair buffer Position break default report Error repair code repair code SECONDARY CODE get Nterm Index stack repair stack Position repair symbol repair buffer Position Parser terminal index ERROR SYMBOL location Stack repair stack Position buffer repair buffer Position 1 state Stack Top repair stack Position  secondaryDiagnosis SecondaryRepairInfo SCOPE_CODE stackPosition stateStackTop reportError DELETION_CODE terminal_index ERROR_SYMBOL locationStack stackPosition scopeStackTop reportError SCOPE_CODE scopeIndex locationStack scopePosition non_terminal_index scope_lhs scopeIndex scope_lhs scopeIndex scopeStackTop NT_OFFSET stateStackTop scopePosition scopeStackTop reportError SCOPE_CODE scopeIndex scopeStackTop locationStack scopePosition scopeStackTop getNtermIndex stateStackTop bufferPosition reportError SECONDARY_CODE getNtermIndex stackPosition bufferPosition terminal_index ERROR_SYMBOL locationStack stackPosition bufferPosition stateStackTop stackPosition
private int parse Check int stck int stack top int first token int buffer position int max pos int indx int ct int act Initialize pointer for temp stack and initialize maximum position of state stack that is still useful act stck stack top if first token NT OFFSET temp Stack Top stack top max pos stack top indx buffer position ct lex Stream kind buffer indx lex Stream reset lex Stream next buffer indx int lhs symbol first token NT OFFSET act Parser nt Action act lhs symbol if act NUM RULES do temp Stack Top Parser rhs act 1 lhs symbol Parser lhs act act temp Stack Top max pos temp Stack temp Stack Top stck temp Stack Top act Parser nt Action act lhs symbol while act NUM RULES max pos max pos temp Stack Top max pos temp Stack Top else temp Stack Top stack top 1 max pos temp Stack Top indx buffer position 1 ct first token lex Stream reset buffer buffer position process terminal for if temp Stack Top stack Length Stack overflow return indx temp Stack temp Stack Top act act Parser t Action act ct if act NUM RULES reduce action temp Stack Top else if act ACCEPT ACTION shift action act ERROR ACTION shift reduce action if indx MAX DISTANCE return indx indx ct lex Stream kind buffer indx lex Stream reset lex Stream next buffer indx if act ERROR ACTION act ERROR ACTION else continue process terminal else if act ACCEPT ACTION accept action return MAX DISTANCE else return indx error action process non terminal do temp Stack Top Parser rhs act 1 int lhs symbol Parser lhs act act temp Stack Top max pos temp Stack temp Stack Top stck temp Stack Top act Parser nt Action act lhs symbol while act NUM RULES max pos max pos temp Stack Top max pos temp Stack Top process terminal  parseCheck stack_top first_token buffer_position max_pos temp_stack stack_top first_token NT_OFFSET tempStackTop stack_top max_pos stack_top buffer_position lexStream lexStream lexStream lhs_symbol first_token NT_OFFSET ntAction lhs_symbol NUM_RULES tempStackTop lhs_symbol tempStackTop max_pos tempStack tempStackTop tempStackTop ntAction lhs_symbol NUM_RULES max_pos max_pos tempStackTop max_pos tempStackTop tempStackTop stack_top max_pos tempStackTop buffer_position first_token lexStream buffer_position process_terminal tempStackTop stackLength tempStack tempStackTop tAction NUM_RULES tempStackTop ACCEPT_ACTION ERROR_ACTION MAX_DISTANCE lexStream lexStream lexStream ERROR_ACTION ERROR_ACTION process_terminal ACCEPT_ACTION MAX_DISTANCE process_non_terminal tempStackTop lhs_symbol tempStackTop max_pos tempStack tempStackTop tempStackTop ntAction lhs_symbol NUM_RULES max_pos max_pos tempStackTop max_pos tempStackTop process_terminal
process terminal private void report Error int msg Code int name Index int left Token int right Token report Error msg Code name Index left Token right Token 0  process_terminal reportError msgCode nameIndex leftToken rightToken reportError msgCode nameIndex leftToken rightToken
private void report Error int msg Code int name Index int left Token int right Token int scope Name Index int l Token left Token right Token right Token left Token if l Token right Token report Secondary Error msg Code name Index l Token right Token scope Name Index else report Primary Error msg Code name Index right Token scope Name Index  reportError msgCode nameIndex leftToken rightToken scopeNameIndex lToken leftToken rightToken rightToken leftToken lToken rightToken reportSecondaryError msgCode nameIndex lToken rightToken scopeNameIndex reportPrimaryError msgCode nameIndex rightToken scopeNameIndex
private void report Primary Error int msg Code int name Index int token int scope Name Index String name if name Index 0 name Parser readable Name name Index else name EMPTY STRING int error Start lex Stream start token int error End lex Stream end token int current Kind lex Stream kind token String error Token Name Parser name Parser terminal index lex Stream kind token char error Token Source lex Stream name token switch msg Code case BEFORE CODE problem Reporter parse Error Insert Before Token error Start error End current Kind error Token Source error Token Name name break case INSERTION CODE problem Reporter parse Error Insert After Token error Start error End current Kind error Token Source error Token Name name break case DELETION CODE problem Reporter parse Error Delete Token error Start error End current Kind error Token Source error Token Name break case INVALID CODE if name length 0 problem Reporter parse Error Replace Token error Start error End current Kind error Token Source error Token Name name else problem Reporter parse Error Invalid Token error Start error End current Kind error Token Source error Token Name name break case SUBSTITUTION CODE problem Reporter parse Error Replace Token error Start error End current Kind error Token Source error Token Name name break case SCOPE CODE String Buffer buf new String Buffer for int i Parser scope suffix name Index Parser scope rhs i 0 i buf append Parser readable Name Parser scope rhs i if Parser scope rhs i 1 0 any more symbols to print buf append if scope Name Index 0 problem Reporter parse Error Insert To Complete error Start error End buf to String Parser readable Name scope Name Index else problem Reporter parse Error Insert To Complete Scope error Start error End buf to String break case EOF CODE problem Reporter parse Error Unexpected End error Start error End break case MERGE CODE problem Reporter parse Error Merge Tokens error Start error End name break case MISPLACED CODE problem Reporter parse Error Misplaced Construct error Start error End break default if name length 0 problem Reporter parse Error No Suggestion error Start error End current Kind error Token Source error Token Name else problem Reporter parse Error Replace Token error Start error End current Kind error Token Source error Token Name name break  reportPrimaryError msgCode nameIndex scopeNameIndex nameIndex readableName nameIndex EMPTY_STRING errorStart lexStream errorEnd lexStream currentKind lexStream errorTokenName terminal_index lexStream errorTokenSource lexStream msgCode BEFORE_CODE problemReporter parseErrorInsertBeforeToken errorStart errorEnd currentKind errorTokenSource errorTokenName INSERTION_CODE problemReporter parseErrorInsertAfterToken errorStart errorEnd currentKind errorTokenSource errorTokenName DELETION_CODE problemReporter parseErrorDeleteToken errorStart errorEnd currentKind errorTokenSource errorTokenName INVALID_CODE problemReporter parseErrorReplaceToken errorStart errorEnd currentKind errorTokenSource errorTokenName problemReporter parseErrorInvalidToken errorStart errorEnd currentKind errorTokenSource errorTokenName SUBSTITUTION_CODE problemReporter parseErrorReplaceToken errorStart errorEnd currentKind errorTokenSource errorTokenName SCOPE_CODE StringBuffer StringBuffer scope_suffix nameIndex scope_rhs readableName scope_rhs scope_rhs scopeNameIndex problemReporter parseErrorInsertToComplete errorStart errorEnd toString readableName scopeNameIndex problemReporter parseErrorInsertToCompleteScope errorStart errorEnd toString EOF_CODE problemReporter parseErrorUnexpectedEnd errorStart errorEnd MERGE_CODE problemReporter parseErrorMergeTokens errorStart errorEnd MISPLACED_CODE problemReporter parseErrorMisplacedConstruct errorStart errorEnd problemReporter parseErrorNoSuggestion errorStart errorEnd currentKind errorTokenSource errorTokenName problemReporter parseErrorReplaceToken errorStart errorEnd currentKind errorTokenSource errorTokenName
private void report Secondary Error int msg Code int name Index int left Token int right Token int scope Name Index String name if name Index 0 name Parser readable Name name Index else name EMPTY STRING int error Start 1 if lex Stream is Inside Stream left Token if left Token 0 error Start lex Stream start left Token 1 else error Start lex Stream start left Token else if left Token error Token error Start error Token Start else for int i 0 i state Stack Top i if location Stack i left Token error Start location Start Stack i if error Start 1 error Start lex Stream start right Token int error End lex Stream end right Token switch msg Code case MISPLACED CODE problem Reporter parse Error Misplaced Construct error Start error End break case SCOPE CODE error start is on the last token start error Start lex Stream start right Token String Buffer buf new String Buffer for int i Parser scope suffix name Index Parser scope rhs i 0 i buf append Parser readable Name Parser scope rhs i if Parser scope rhs i 1 0 buf append if scope Name Index 0 problem Reporter parse Error Insert To Complete error Start error End buf to String Parser readable Name scope Name Index else problem Reporter parse Error Insert To Complete Phrase error Start error End buf to String break case MERGE CODE problem Reporter parse Error Merge Tokens error Start error End name break case DELETION CODE problem Reporter parse Error Delete Tokens error Start error End break default if name length 0 problem Reporter parse Error No Suggestion For Tokens error Start error End else problem Reporter parse Error Replace Tokens error Start error End name return  reportSecondaryError msgCode nameIndex leftToken rightToken scopeNameIndex nameIndex readableName nameIndex EMPTY_STRING errorStart lexStream isInsideStream leftToken leftToken errorStart lexStream leftToken errorStart lexStream leftToken leftToken errorToken errorStart errorTokenStart stateStackTop locationStack leftToken errorStart locationStartStack errorStart errorStart lexStream rightToken errorEnd lexStream rightToken msgCode MISPLACED_CODE problemReporter parseErrorMisplacedConstruct errorStart errorEnd SCOPE_CODE errorStart lexStream rightToken StringBuffer StringBuffer scope_suffix nameIndex scope_rhs readableName scope_rhs scope_rhs scopeNameIndex problemReporter parseErrorInsertToComplete errorStart errorEnd toString readableName scopeNameIndex problemReporter parseErrorInsertToCompletePhrase errorStart errorEnd toString MERGE_CODE problemReporter parseErrorMergeTokens errorStart errorEnd DELETION_CODE problemReporter parseErrorDeleteTokens errorStart errorEnd problemReporter parseErrorNoSuggestionForTokens errorStart errorEnd problemReporter parseErrorReplaceTokens errorStart errorEnd
public String to String String Buffer res new String Buffer res append lex Stream to String return res to String  toString StringBuffer StringBuffer lexStream toString toString

public String to String String Buffer buffer new String Buffer buffer append name append append kind append buffer append append start append append end append append line return buffer to String  toString StringBuffer StringBuffer toString
public Lex Stream int size Scanner scanner int interval Start To Skip int interval End To Skip int interval Flags To Skip int first Token int init int eof this token Cache new Token size this token Cache Index 0 this token CacheEOF Index Integer MAX VALUE this token Cache 0 new Token this token Cache 0 kind first Token this token Cache 0 name Char Operation NO CHAR this token Cache 0 start init this token Cache 0 end init this token Cache 0 line 0 this interval Start To Skip interval Start To Skip this interval End To Skip interval End To Skip this interval Flags To Skip interval Flags To Skip scanner reset To init eof this scanner scanner  LexStream intervalStartToSkip intervalEndToSkip intervalFlagsToSkip firstToken tokenCache tokenCacheIndex tokenCacheEOFIndex MAX_VALUE tokenCache tokenCache firstToken tokenCache CharOperation NO_CHAR tokenCache tokenCache tokenCache intervalStartToSkip intervalStartToSkip intervalEndToSkip intervalEndToSkip intervalFlagsToSkip intervalFlagsToSkip resetTo
private void read Token From Scanner int length token Cache length boolean token Not Found true while token Not Found try int token Kind scanner get Next Token if token Kind Token NameEOF int start scanner get Current Token Start Position int end scanner get Current Token End Position if Range Util is In Interval start end interval Start To Skip interval End To Skip Token token new Token token kind token Kind token name scanner get Current Token Source token start start token end end token line scanner get Line Number end int p Interval Range Util get Previous Interval start end interval Start To Skip interval End To Skip if p Interval previous Interval interval Flags To Skip previous Interval 1 Range Util IGNORE 0 token flags IS AFTER JUMP if interval Flags To Skip p Interval Range Util LBRACE MISSING 0 token flags LBRACE MISSING previous Interval p Interval token Cache token Cache Index length token token Not Found false else int start scanner get Current Token Start Position int end scanner get Current Token End Position Token token new Token token kind token Kind token name Char Operation NO CHAR token start start token end end token line scanner get Line Number end token Cache token Cache Index length token token CacheEOF Index token Cache Index token Not Found false catch Invalid Input Exception e return next token  readTokenFromScanner tokenCache tokenNotFound tokenNotFound tokenKind getNextToken tokenKind TokenNameEOF getCurrentTokenStartPosition getCurrentTokenEndPosition RangeUtil isInInterval intervalStartToSkip intervalEndToSkip tokenKind getCurrentTokenSource getLineNumber pInterval RangeUtil getPreviousInterval intervalStartToSkip intervalEndToSkip pInterval previousInterval intervalFlagsToSkip previousInterval RangeUtil IS_AFTER_JUMP intervalFlagsToSkip pInterval RangeUtil LBRACE_MISSING LBRACE_MISSING previousInterval pInterval tokenCache tokenCacheIndex tokenNotFound getCurrentTokenStartPosition getCurrentTokenEndPosition tokenKind CharOperation NO_CHAR getLineNumber tokenCache tokenCacheIndex tokenCacheEOFIndex tokenCacheIndex tokenNotFound InvalidInputException
public Token token int index if index 0 Token eof Token new Token eof Token kind Token NameEOF eof Token name Char Operation NO CHAR return eof Token if this token CacheEOF Index 0 index this token CacheEOF Index return token this token CacheEOF Index int length token Cache length if index this token Cache Index int tokens To Read index this token Cache Index while tokens To Read 0 read Token From Scanner else if this token Cache Index length index return null return token Cache index length  eofToken eofToken TokenNameEOF eofToken CharOperation NO_CHAR eofToken tokenCacheEOFIndex tokenCacheEOFIndex tokenCacheEOFIndex tokenCache tokenCacheIndex tokensToRead tokenCacheIndex tokensToRead readTokenFromScanner tokenCacheIndex tokenCache
public int get Token return current Index next current Index  getToken currentIndex currentIndex
public int previous int token Index return token Index 0 token Index 1 0  tokenIndex tokenIndex tokenIndex
public int next int token Index return token Index this token CacheEOF Index token Index 1 this token CacheEOF Index  tokenIndex tokenIndex tokenCacheEOFIndex tokenIndex tokenCacheEOFIndex
public boolean after Eol int i return i 1 true line i 1 line i  afterEol
public void reset current Index 1  currentIndex
public void reset int i current Index previous i  currentIndex
public int badtoken return 0 
public int kind int token Index return token token Index kind  tokenIndex tokenIndex
public char name int token Index return token token Index name  tokenIndex tokenIndex
public int line int token Index return token token Index line  tokenIndex tokenIndex
public int start int token Index return token token Index start  tokenIndex tokenIndex
public int end int token Index return token token Index end  tokenIndex tokenIndex
public int flags int token Index return token token Index flags  tokenIndex tokenIndex
public boolean is Inside Stream int index if this token CacheEOF Index 0 index this token CacheEOF Index return false else if index this token Cache Index return true else if this token Cache Index token Cache length index return false else return true  isInsideStream tokenCacheEOFIndex tokenCacheEOFIndex tokenCacheIndex tokenCacheIndex tokenCache
public String to String String Buffer res new String Buffer String source new String scanner source if current Index 0 res append source else Token token token current Index int curtok Kind token kind int curtok Start token start int curtok End token end int previous End 1 for int i 0 i interval Start To Skip length i int interval Start interval Start To Skip i int interval End interval End To Skip i if curtok Start previous End curtok End interval Start res append source substring previous End 1 curtok Start res append res append res append source substring curtok Start curtok End 1 res append res append res append source substring curtok End 1 interval Start else res append source substring previous End 1 interval Start res append res append res append source substring interval Start interval End 1 res append res append previous End interval End if curtok Start previous End res append source substring previous End 1 curtok Start res append res append if curtok Kind Token NameEOF res append EOF NON NLS 1 else res append source substring curtok Start curtok End 1 res append res append res append source substring curtok End 1 else res append source substring previous End 1 return res to String  toString StringBuffer StringBuffer currentIndex currentIndex curtokKind curtokStart curtokEnd previousEnd intervalStartToSkip intervalStart intervalStartToSkip intervalEnd intervalEndToSkip curtokStart previousEnd curtokEnd intervalStart previousEnd curtokStart curtokStart curtokEnd curtokEnd intervalStart previousEnd intervalStart intervalStart intervalEnd previousEnd intervalEnd curtokStart previousEnd previousEnd curtokStart curtokKind TokenNameEOF curtokStart curtokEnd curtokEnd previousEnd toString

Range Result this pos 0 this interval Starts new int INITIAL SIZE this interval Ends new int INITIAL SIZE this interval Flags new int INITIAL SIZE  RangeResult intervalStarts INITIAL_SIZE intervalEnds INITIAL_SIZE intervalFlags INITIAL_SIZE
void add Interval int start int end add Interval start end NO FLAG  addInterval addInterval NO_FLAG
void add Interval int start int end int flags if pos interval Starts length System arraycopy interval Starts 0 interval Starts new int pos 2 0 pos System arraycopy interval Ends 0 interval Ends new int pos 2 0 pos System arraycopy interval Flags 0 interval Flags new int pos 2 0 pos interval Starts pos start interval Ends pos end interval Flags pos flags pos  addInterval intervalStarts intervalStarts intervalStarts intervalEnds intervalEnds intervalFlags intervalFlags intervalStarts intervalEnds intervalFlags
int get Ranges int result Starts new int pos int result Ends new int pos int result Flags new int pos System arraycopy interval Starts 0 result Starts 0 pos System arraycopy interval Ends 0 result Ends 0 pos System arraycopy interval Flags 0 result Flags 0 pos if result Starts length 1 quick Sort result Starts result Ends result Flags 0 result Starts length 1 return new int result Starts result Ends result Flags  getRanges resultStarts resultEnds resultFlags intervalStarts resultStarts intervalEnds resultEnds intervalFlags resultFlags resultStarts quickSort resultStarts resultEnds resultFlags resultStarts resultStarts resultEnds resultFlags
private void quick Sort int list int list2 int list3 int left int right int original left left int original right right int mid list left right 2 do while compare list left mid 0 left while compare mid list right 0 right if left right int tmp list left list left list right list right tmp tmp list2 left list2 left list2 right list2 right tmp tmp list3 left list3 left list3 right list3 right tmp left right while left right if original left right quick Sort list list2 list3 original left right if left original right quick Sort list list2 list3 left original right  quickSort original_left original_right original_left quickSort original_left original_right quickSort original_right
private int compare int i1 int i2 return i1 i2 
public static boolean contains Error In Signature Abstract Method Declaration method return method source End 1 method body Start method body End method declaration Source End  containsErrorInSignature AbstractMethodDeclaration sourceEnd bodyStart bodyEnd declarationSourceEnd
public static int compute Diet Range Type Declaration types if types null types length 0 return new int 3 0 else Range Result result new Range Result compute Diet Range0 types result return result get Ranges  computeDietRange TypeDeclaration RangeResult RangeResult computeDietRange0 getRanges
private static void compute Diet Range0 Type Declaration types Range Result result for int j 0 j types length j members Type Declaration member Type Declarations types j member Types if member Type Declarations null member Type Declarations length 0 compute Diet Range0 types j member Types result methods Abstract Method Declaration methods types j methods if methods null int length methods length for int i 0 i length i Abstract Method Declaration method methods i if contains Ignored Body method if contains Error In Signature method method error In Signature true result add Interval method declaration Source Start method declaration Source End IGNORE else int flags method source End 1 method body Start LBRACE MISSING NO FLAG result add Interval method body Start method body End flags initializers Field Declaration fields types j fields if fields null int length fields length for int i 0 i length i if fields i instanceof Initializer Initializer initializer Initializer fields i if initializer declaration Source End initializer body End initializer error In Signature true result add Interval initializer declaration Source Start initializer declaration Source End IGNORE else result add Interval initializer body Start initializer body End  computeDietRange0 TypeDeclaration RangeResult TypeDeclaration memberTypeDeclarations memberTypes memberTypeDeclarations memberTypeDeclarations computeDietRange0 memberTypes AbstractMethodDeclaration AbstractMethodDeclaration containsIgnoredBody containsErrorInSignature errorInSignature addInterval declarationSourceStart declarationSourceEnd sourceEnd bodyStart LBRACE_MISSING NO_FLAG addInterval bodyStart bodyEnd FieldDeclaration declarationSourceEnd bodyEnd errorInSignature addInterval declarationSourceStart declarationSourceEnd addInterval bodyStart bodyEnd
public static boolean is In Interval int start int end int interval Start int interval End int length interval Start length for int i 0 i length i if interval Start i start interval End i end return true else if interval Start i end return false return false  isInInterval intervalStart intervalEnd intervalStart intervalStart intervalEnd intervalStart
public static int get Previous Interval int start int end int interval Start int interval End int length interval Start length for int i 0 i length i if interval Start i end return i 1 return length 1  getPreviousInterval intervalStart intervalEnd intervalStart intervalStart
public static boolean contains Ignored Body Abstract Method Declaration method return method is Default Constructor method is Clinit method modifiers Compiler Modifiers Acc Semicolon Body 0  containsIgnoredBody AbstractMethodDeclaration isDefaultConstructor isClinit CompilerModifiers AccSemicolonBody

Javadoc Parser Parser source Parser super source Parser this check Doc Comment this source Parser options doc Comment Support this kind COMPIL PARSER  JavadocParser sourceParser sourceParser checkDocComment sourceParser docCommentSupport COMPIL_PARSER
public boolean check Deprecation int javadoc Start int javadoc End try this source this source Parser scanner source this index javadoc Start 3 this end Comment javadoc End 2 if this check Doc Comment Initialization this scanner line Ends this source Parser scanner line Ends this scanner line Ptr this source Parser scanner line Ptr this line Ends this scanner line Ends this doc Comment new Javadoc javadoc Start javadoc End parse Comment javadoc Start javadoc End else Init javadoc if necessary if this source Parser options get Severity Compiler Options Missing Javadoc Comments Problem Severities Ignore this doc Comment new Javadoc javadoc Start javadoc End else this doc Comment null Parse comment int first Line Number this source Parser scanner get Line Number javadoc Start int last Line Number this source Parser scanner get Line Number javadoc End scan line per line since tags must be at beginning of lines only next Line for int line first Line Number line last Line Number line int line Start line first Line Number javadoc Start 3 skip leading this source Parser scanner get Line Start line this index line Start this line End line last Line Number javadoc End 2 remove trailing this source Parser scanner get Line End line next Character while this index this line End char c read Char consider unicodes switch c default if Character is Whitespace c continue next Character break case continue next Character case if read Char d read Char e read Char p read Char r read Char e read Char c read Char a read Char t read Char e read Char d ensure the tag is properly ended either followed by a space a tab line end or asterisk c read Char if Character is Whitespace c c return true continue next Line return false finally this source null release source as soon as finished return this deprecated  checkDeprecation javadocStart javadocEnd sourceParser javadocStart endComment javadocEnd checkDocComment lineEnds sourceParser lineEnds linePtr sourceParser linePtr lineEnds lineEnds docComment javadocStart javadocEnd parseComment javadocStart javadocEnd sourceParser getSeverity CompilerOptions MissingJavadocComments ProblemSeverities docComment javadocStart javadocEnd docComment firstLineNumber sourceParser getLineNumber javadocStart lastLineNumber sourceParser getLineNumber javadocEnd nextLine firstLineNumber lastLineNumber lineStart firstLineNumber javadocStart sourceParser getLineStart lineStart lineEnd lastLineNumber javadocEnd sourceParser getLineEnd nextCharacter lineEnd readChar isWhitespace nextCharacter nextCharacter readChar readChar readChar readChar readChar readChar readChar readChar readChar readChar readChar isWhitespace nextLine
public String to String String Buffer buffer new String Buffer buffer append check javadoc append this check Doc Comment append n NON NLS 1 NON NLS 2 buffer append javadoc append this doc Comment append n NON NLS 1 NON NLS 2 buffer append super to String return buffer to String  toString StringBuffer StringBuffer checkDocComment docComment toString toString
protected Object create Argument Reference char name int dim Object type Ref long dim Positions long arg Name Pos throws Invalid Input Exception try Type Reference arg Type Ref Type Reference type Ref if dim 0 long pos long arg Type Ref source Start 32 arg Type Ref source End if type Ref instanceof Javadoc Single Type Reference Javadoc Single Type Reference single Ref Javadoc Single Type Reference type Ref arg Type Ref new Javadoc Array Single Type Reference single Ref token dim pos else Javadoc Qualified Type Reference qualif Ref Javadoc Qualified Type Reference type Ref arg Type Ref new Javadoc Array Qualified Type Reference qualif Ref dim int arg End arg Type Ref source End if dim 0 arg End int dim Positions dim 1 if arg Name Pos 0 arg End int arg Name Pos return new Javadoc Argument Expression name arg Type Ref source Start arg End arg Type Ref catch Class Cast Exception ex throw new Invalid Input Exception  createArgumentReference typeRef dimPositions argNamePos InvalidInputException TypeReference argTypeRef TypeReference typeRef argTypeRef sourceStart argTypeRef sourceEnd typeRef JavadocSingleTypeReference JavadocSingleTypeReference singleRef JavadocSingleTypeReference typeRef argTypeRef JavadocArraySingleTypeReference singleRef JavadocQualifiedTypeReference qualifRef JavadocQualifiedTypeReference typeRef argTypeRef JavadocArrayQualifiedTypeReference qualifRef argEnd argTypeRef sourceEnd argEnd dimPositions argNamePos argEnd argNamePos JavadocArgumentExpression argTypeRef sourceStart argEnd argTypeRef ClassCastException InvalidInputException
protected Object create Field Reference Object receiver throws Invalid Input Exception try Get receiver type Type Reference type Ref Type Reference receiver if type Ref null char name this source Parser compilation Unit compilation Result compilation Unit get Main Type Name type Ref new Implicit Doc Type Reference name this member Start Create field Javadoc Field Reference field new Javadoc Field Reference this identifier Stack 0 this identifier Position Stack 0 field receiver type Ref field tag Source Start this tag Source Start field tag Source End this tag Source End return field catch Class Cast Exception ex throw new Invalid Input Exception  createFieldReference InvalidInputException TypeReference typeRef TypeReference typeRef sourceParser compilationUnit compilationResult compilationUnit getMainTypeName typeRef ImplicitDocTypeReference memberStart JavadocFieldReference JavadocFieldReference identifierStack identifierPositionStack typeRef tagSourceStart tagSourceStart tagSourceEnd tagSourceEnd ClassCastException InvalidInputException
protected Object create Method Reference Object receiver List arguments throws Invalid Input Exception try Get receiver type Type Reference type Ref Type Reference receiver Decide whether we have a constructor or not boolean is Constructor false if type Ref null char name this source Parser compilation Unit compilation Result compilation Unit get Main Type Name is Constructor Char Operation equals this identifier Stack 0 name type Ref new Implicit Doc Type Reference name this member Start else char name null if type Ref instanceof Javadoc Single Type Reference name Javadoc Single Type Reference type Ref token else if type Ref instanceof Javadoc Qualified Type Reference char tokens Javadoc Qualified Type Reference type Ref tokens name tokens tokens length 1 else throw new Invalid Input Exception is Constructor Char Operation equals this identifier Stack 0 name Create node if arguments null if is Constructor Javadoc Allocation Expression expr new Javadoc Allocation Expression this identifier Position Stack 0 expr type type Ref return expr else Javadoc Message Send msg new Javadoc Message Send this identifier Stack 0 this identifier Position Stack 0 msg receiver type Ref return msg else Javadoc Argument Expression expressions new Javadoc Argument Expression arguments size arguments to Array expressions if is Constructor Javadoc Allocation Expression alloc new Javadoc Allocation Expression this identifier Position Stack 0 alloc arguments expressions alloc type type Ref return alloc else Javadoc Message Send msg new Javadoc Message Send this identifier Stack 0 this identifier Position Stack 0 expressions msg receiver type Ref return msg catch Class Cast Exception ex throw new Invalid Input Exception  createMethodReference InvalidInputException TypeReference typeRef TypeReference isConstructor typeRef sourceParser compilationUnit compilationResult compilationUnit getMainTypeName isConstructor CharOperation identifierStack typeRef ImplicitDocTypeReference memberStart typeRef JavadocSingleTypeReference JavadocSingleTypeReference typeRef typeRef JavadocQualifiedTypeReference JavadocQualifiedTypeReference typeRef InvalidInputException isConstructor CharOperation identifierStack isConstructor JavadocAllocationExpression JavadocAllocationExpression identifierPositionStack typeRef JavadocMessageSend JavadocMessageSend identifierStack identifierPositionStack typeRef JavadocArgumentExpression JavadocArgumentExpression toArray isConstructor JavadocAllocationExpression JavadocAllocationExpression identifierPositionStack typeRef JavadocMessageSend JavadocMessageSend identifierStack identifierPositionStack typeRef ClassCastException InvalidInputException
protected Object create Return Statement return new Javadoc Return Statement this scanner get Current Token Start Position this scanner get Current Token End Position this scanner get Raw Token Source End  createReturnStatement JavadocReturnStatement getCurrentTokenStartPosition getCurrentTokenEndPosition getRawTokenSourceEnd
protected Object create Type Reference int primitive Token Type Reference type Ref null int size this identifier Length Stack this identifier Length Ptr if size 1 Single Type ref type Ref new Javadoc Single Type Reference this identifier Stack this identifier Ptr this identifier Position Stack this identifier Ptr this tag Source Start this tag Source End else if size 1 Qualified Type ref char tokens new char size System arraycopy this identifier Stack this identifier Ptr size 1 tokens 0 size long positions new long size System arraycopy this identifier Position Stack this identifier Ptr size 1 positions 0 size type Ref new Javadoc Qualified Type Reference tokens positions this tag Source Start this tag Source End this identifier Ptr size return type Ref  createTypeReference primitiveToken TypeReference typeRef identifierLengthStack identifierLengthPtr typeRef JavadocSingleTypeReference identifierStack identifierPtr identifierPositionStack identifierPtr tagSourceStart tagSourceEnd identifierStack identifierPtr identifierPositionStack identifierPtr typeRef JavadocQualifiedTypeReference tagSourceStart tagSourceEnd identifierPtr typeRef
protected boolean parse Return if this return Statement null this return Statement create Return Statement return true if this source Parser null this source Parser problem Reporter javadoc Duplicated Return Tag this scanner get Current Token Start Position this scanner get Current Token End Position return false  parseReturn returnStatement returnStatement createReturnStatement sourceParser sourceParser problemReporter javadocDuplicatedReturnTag getCurrentTokenStartPosition getCurrentTokenEndPosition
Parse return tag declaration protected boolean parse Tag return true  parseTag
protected boolean push Param Name Create name reference Javadoc Single Name Reference name Ref new Javadoc Single Name Reference this scanner get Current Identifier Source this scanner get Current Token Start Position this scanner get Current Token End Position name Ref tag Source Start this tag Source Start name Ref tag Source End this tag Source End Push ref on stack if this ast Length Ptr 1 First push push On Ast Stack name Ref true else Verify that no throws has been declared before for int i THROWS TAG EXPECTED ORDER i this ast Length Ptr i ORDERED TAGS NUMBER if this ast Length Stack i 0 if this source Parser null this source Parser problem Reporter javadoc Unexpected Tag this tag Source Start this tag Source End bug https bugs eclipse org bugs show bug cgi id 51600 store param references in specific array if this inv Params Ptr 1l this inv Params Stack new Javadoc Single Name Reference 10 int stack Length this inv Params Stack length if this inv Params Ptr stack Length System arraycopy this inv Params Stack 0 this inv Params Stack new Javadoc Single Name Reference stack Length Ast Stack Increment 0 stack Length this inv Params Stack this inv Params Ptr name Ref return false switch this ast Length Ptr ORDERED TAGS NUMBER case PARAM TAG EXPECTED ORDER previous push was a param tag push another param name push On Ast Stack name Ref false break case SEE TAG EXPECTED ORDER previous push was a see tag push new param name push On Ast Stack name Ref true break default return false return true  pushParamName JavadocSingleNameReference nameRef JavadocSingleNameReference getCurrentIdentifierSource getCurrentTokenStartPosition getCurrentTokenEndPosition nameRef tagSourceStart tagSourceStart nameRef tagSourceEnd tagSourceEnd astLengthPtr pushOnAstStack nameRef THROWS_TAG_EXPECTED_ORDER astLengthPtr ORDERED_TAGS_NUMBER astLengthStack sourceParser sourceParser problemReporter javadocUnexpectedTag tagSourceStart tagSourceEnd show_bug invParamsPtr invParamsStack JavadocSingleNameReference stackLength invParamsStack invParamsPtr stackLength invParamsStack invParamsStack JavadocSingleNameReference stackLength AstStackIncrement stackLength invParamsStack invParamsPtr nameRef astLengthPtr ORDERED_TAGS_NUMBER PARAM_TAG_EXPECTED_ORDER pushOnAstStack nameRef SEE_TAG_EXPECTED_ORDER pushOnAstStack nameRef
protected boolean push See Ref Object statement boolean plain if this ast Length Ptr 1 First push push On Ast Stack null true push On Ast Stack null true push On Ast Stack statement true else switch this ast Length Ptr ORDERED TAGS NUMBER case PARAM TAG EXPECTED ORDER previous push was a param tag push empty throws tag and new see tag push On Ast Stack null true push On Ast Stack statement true break case THROWS TAG EXPECTED ORDER previous push was a throws tag push new see tag push On Ast Stack statement true break case SEE TAG EXPECTED ORDER previous push was a see tag push another see tag push On Ast Stack statement false break default return false return true  pushSeeRef astLengthPtr pushOnAstStack pushOnAstStack pushOnAstStack astLengthPtr ORDERED_TAGS_NUMBER PARAM_TAG_EXPECTED_ORDER pushOnAstStack pushOnAstStack THROWS_TAG_EXPECTED_ORDER pushOnAstStack SEE_TAG_EXPECTED_ORDER pushOnAstStack
see org eclipse jdt internal compiler parser Abstract Comment Parser push Text int int protected void push Text int start int end compiler does not matter of text  AbstractCommentParser pushText pushText
protected boolean push Throw Name Object type Ref boolean real if this ast Length Ptr 1 First push push On Ast Stack null true push On Ast Stack type Ref true else switch this ast Length Ptr ORDERED TAGS NUMBER case PARAM TAG EXPECTED ORDER previous push was a param tag push new throws tag push On Ast Stack type Ref true break case THROWS TAG EXPECTED ORDER previous push was a throws tag push another throws tag push On Ast Stack type Ref false break case SEE TAG EXPECTED ORDER previous push was a see tag push empty param and new throws tags push On Ast Stack null true push On Ast Stack type Ref true break default return false return true  pushThrowName typeRef astLengthPtr pushOnAstStack pushOnAstStack typeRef astLengthPtr ORDERED_TAGS_NUMBER PARAM_TAG_EXPECTED_ORDER pushOnAstStack typeRef THROWS_TAG_EXPECTED_ORDER pushOnAstStack typeRef SEE_TAG_EXPECTED_ORDER pushOnAstStack pushOnAstStack typeRef
protected void update Doc Comment Set inherited flag this doc Comment inherited this inherited Set return node if present if this return Statement null this doc Comment return Statement Javadoc Return Statement this return Statement Copy array of invalid syntax param tags if this inv Params Ptr 0 this doc Comment invalid Parameters new Javadoc Single Name Reference this inv Params Ptr 1 System arraycopy this inv Params Stack 0 this doc Comment invalid Parameters 0 this inv Params Ptr 1 If no nodes stored return if this ast Length Ptr 1 return Initialize arrays int sizes new int ORDERED TAGS NUMBER for int i 0 i this ast Length Ptr i sizes i ORDERED TAGS NUMBER this ast Length Stack i this doc Comment references new Expression sizes SEE TAG EXPECTED ORDER this doc Comment thrown Exceptions new Type Reference sizes THROWS TAG EXPECTED ORDER this doc Comment parameters new Javadoc Single Name Reference sizes PARAM TAG EXPECTED ORDER Store nodes in arrays while this ast Length Ptr 0 int ptr this ast Length Ptr ORDERED TAGS NUMBER Starting with the stack top so get references eg Expression coming from see declarations if ptr SEE TAG EXPECTED ORDER int size this ast Length Stack this ast Length Ptr for int i 0 i size i this doc Comment references sizes ptr Expression this ast Stack this ast Ptr Then continuing with class names eg Type Reference coming from throw exception declarations else if ptr THROWS TAG EXPECTED ORDER int size this ast Length Stack this ast Length Ptr for int i 0 i size i this doc Comment thrown Exceptions sizes ptr Type Reference this ast Stack this ast Ptr Finally finishing with parameters nales ie Argument coming from param declaration else if ptr PARAM TAG EXPECTED ORDER int size this ast Length Stack this ast Length Ptr for int i 0 i size i this doc Comment parameters sizes ptr Javadoc Single Name Reference this ast Stack this ast Ptr  updateDocComment docComment returnStatement docComment returnStatement JavadocReturnStatement returnStatement invParamsPtr docComment invalidParameters JavadocSingleNameReference invParamsPtr invParamsStack docComment invalidParameters invParamsPtr astLengthPtr ORDERED_TAGS_NUMBER astLengthPtr ORDERED_TAGS_NUMBER astLengthStack docComment SEE_TAG_EXPECTED_ORDER docComment thrownExceptions TypeReference THROWS_TAG_EXPECTED_ORDER docComment JavadocSingleNameReference PARAM_TAG_EXPECTED_ORDER astLengthPtr astLengthPtr ORDERED_TAGS_NUMBER SEE_TAG_EXPECTED_ORDER astLengthStack astLengthPtr docComment astStack astPtr TypeReference THROWS_TAG_EXPECTED_ORDER astLengthStack astLengthPtr docComment thrownExceptions TypeReference astStack astPtr PARAM_TAG_EXPECTED_ORDER astLengthStack astLengthPtr docComment JavadocSingleNameReference astStack astPtr

private List elements public NLS Line this elements new Array List  NLSLine ArrayList
Adds a NLS element to this line public void add String Literal element this elements add element  StringLiteral
returns an Iterator over NLS Elements public Iterator iterator return this elements iterator  NLSElements
public String Literal get int index return String Literal this elements get index  StringLiteral StringLiteral
public void set int index String Literal literal this elements set index literal  StringLiteral
public boolean exists int index return index 0 index this elements size 
public int size return this elements size 
public String to String String Buffer result new String Buffer for Iterator iter iterator iter has Next result append t NON NLS 1 result append iter next to String result append n NON NLS 1 return result to String  toString StringBuffer StringBuffer hasNext toString toString

public Parser Problem Reporter problem Reporter boolean optimize String Literals this problem Reporter problem Reporter this options problem Reporter options this optimize String Literals optimize String Literals this initialize Scanner this ast Length Stack new int 50 this expression Length Stack new int 30 this int Stack new int 50 this identifier Stack new char 30 this identifier Length Stack new int 30 this nested Method new int 30 this real Block Stack new int 30 this identifier Position Stack new long 30 this variables Counter new int 30 javadoc support this javadoc Parser new Javadoc Parser this  ProblemReporter problemReporter optimizeStringLiterals problemReporter problemReporter problemReporter optimizeStringLiterals optimizeStringLiterals initializeScanner astLengthStack expressionLengthStack intStack identifierStack identifierLengthStack nestedMethod realBlockStack identifierPositionStack variablesCounter javadocParser JavadocParser
INTERNAL USE ONLY protected void adjust Interface Modifiers this int Stack this int Ptr 1 Acc Interface  adjustInterfaceModifiers intStack intPtr AccInterface
public final void array Initializer int length length is the size of the array Initializer expression Ptr points on the last elt of the array Initializer in other words it has not been decremented yet Array Initializer ai new Array Initializer if length 0 this expression Ptr length System arraycopy this expression Stack this expression Ptr 1 ai expressions new Expression length 0 length push On Expression Stack ai positionning ai source End this end Statement Position int search Position length 0 this end Position 1 ai expressions 0 source Start try does not work with comments that contain nor describes as a unicode while this scanner source search Position empty catch Index Out Of Bounds Exception ex should never occur except for strange cases like whose describe above search Position length 0 this end Position ai expressions 0 source Start 1 ai source Start search Position  arrayInitializer expressionPtr arrayInitializer ArrayInitializer ArrayInitializer expressionPtr expressionStack expressionPtr pushOnExpressionStack sourceEnd endStatementPosition searchPosition endPosition sourceStart searchPosition IndexOutOfBoundsException searchPosition endPosition sourceStart sourceStart searchPosition
ai source Start search Position public static int asi int state return asb original state state  sourceStart searchPosition original_state
protected void block Real See consume Local Variable Declaration Statement in case of change duplicated code increment the amount of declared variables for this block this real Block Stack this real Block Ptr  blockReal consumeLocalVariableDeclarationStatement realBlockStack realBlockPtr
private final static void build File Of Byte For String filename String tag String tokens throws java io IO Exception transform the String tokens into chars before dumping then into file int i 0 read upto the tag while tokens i equals tag empty read upto the byte bytes new byte tokens length can t be bigger int ic 0 String token while token tokens i equals NON NLS 1 int c Integer parse Int token bytes ic byte c resize System arraycopy bytes 0 bytes new byte ic 0 ic build File For Table filename bytes  buildFileOfByteFor IOException parseInt buildFileForTable
private final static char build File Of Int For String filename String tag String tokens throws java io IO Exception transform the String tokens into chars before dumping then into file int i 0 read upto the tag while tokens i equals tag empty read upto the char chars new char tokens length can t be bigger int ic 0 String token while token tokens i equals NON NLS 1 int c Integer parse Int token chars ic char c resize System arraycopy chars 0 chars new char ic 0 ic build File For Table filename chars return chars  buildFileOfIntFor IOException parseInt buildFileForTable
private final static void build File Of Short For String filename String tag String tokens throws java io IO Exception transform the String tokens into chars before dumping then into file int i 0 read upto the tag while tokens i equals tag empty read upto the char chars new char tokens length can t be bigger int ic 0 String token while token tokens i equals NON NLS 1 int c Integer parse Int token chars ic char c 32768 resize System arraycopy chars 0 chars new char ic 0 ic build File For Table filename chars  buildFileOfShortFor IOException parseInt buildFileForTable
private final static String build File For Name String filename String contents throws java io IO Exception String result new String contents length result 0 null int result Count 1 String Buffer buffer new String Buffer int start contents index Of name NON NLS 1 start contents index Of start int end contents index Of start NON NLS 1 contents contents substring start end boolean add Line Separator false int token Start 1 String Buffer current Token new String Buffer for int i 0 i contents length i char c contents char At i if c if token Start 1 token Start i 1 else if add Line Separator buffer append n result result Count current Token to String current Token new String Buffer String token contents substring token Start i if token equals ERROR TOKEN token INVALID CHARACTER else if token equals EOF TOKEN token UNEXPECTED EOF buffer append token current Token append token add Line Separator true token Start 1 if token Start 1 c add Line Separator false if current Token length 0 result result Count current Token to String build File For Table filename buffer to String to Char Array System arraycopy result 0 result new String result Count 0 result Count return result  buildFileForName IOException resultCount StringBuffer StringBuffer indexOf indexOf indexOf addLineSeparator tokenStart StringBuffer currentToken StringBuffer charAt tokenStart tokenStart addLineSeparator resultCount currentToken toString currentToken StringBuffer tokenStart ERROR_TOKEN INVALID_CHARACTER EOF_TOKEN UNEXPECTED_EOF currentToken addLineSeparator tokenStart tokenStart addLineSeparator currentToken resultCount currentToken toString buildFileForTable toString toCharArray resultCount resultCount
private static void build File For Readable Name String file char new Lhs char new Non Terminal Index String new Name String tokens throws java io IO Exception Array List entries new Array List boolean already Added new boolean new Name length for int i 0 i tokens length i i 2 int index new Non Terminal Index new Lhs Integer parse Int tokens i String Buffer buffer new String Buffer if already Added index already Added index true buffer append new Name index buffer append buffer append tokens i 1 trim buffer append n entries add String value Of buffer int i 1 while INVALID CHARACTER equals new Name i i i for i already Added length i if already Added i System out println new Name i has no readable name NON NLS 1 Collections sort entries build File file entries  buildFileForReadableName newLhs newNonTerminalIndex newName IOException ArrayList ArrayList alreadyAdded newName newNonTerminalIndex newLhs parseInt StringBuffer StringBuffer alreadyAdded alreadyAdded newName valueOf INVALID_CHARACTER newName alreadyAdded alreadyAdded newName buildFile
private final static void build File String filename List list To Dump throws java io IO Exception Buffered Writer writer new Buffered Writer new File Writer filename for Iterator iterator list To Dump iterator iterator has Next writer write String value Of iterator next writer flush writer close System out println filename creation complete NON NLS 1  buildFile listToDump IOException BufferedWriter BufferedWriter FileWriter listToDump hasNext valueOf
private final static void build File For Table String filename char chars throws java io IO Exception byte bytes new byte chars length 2 for int i 0 i chars length i bytes 2 i byte chars i 8 bytes 2 i 1 byte chars i 0xFF java io File Output Stream stream new java io File Output Stream filename stream write bytes stream close System out println filename creation complete NON NLS 1  buildFileForTable IOException FileOutputStream FileOutputStream
private final static void build File For Table String filename byte bytes throws java io IO Exception java io File Output Stream stream new java io File Output Stream filename stream write bytes stream close System out println filename creation complete NON NLS 1  buildFileForTable IOException FileOutputStream FileOutputStream
public final static void build Files FromLPG String data Filename String data Filename2 throws java io IO Exception RUN THIS METHOD TO GENERATE PARSER RSC FILES build from the lpg javadcl java files that represents the parser tables lhs check table asb asr symbol index org eclipse jdt internal compiler parser Parser build Files FromLPG d leapfrog grammar javadcl java char contents new char try contents Util get File Char Content new File data Filename null catch IO Exception ex System out println Util bind parser incorrect Path NON NLS 1 return java util String Tokenizer st new java util String Tokenizer new String contents t n r NON NLS 1 String tokens new String st count Tokens int i 0 while st has More Tokens tokens i st next Token final String prefix FILEPREFIX i 0 char new Lhs build File Of Int For prefix i rsc lhs tokens NON NLS 1 NON NLS 2 build File Of Short For prefix i rsc check table tokens NON NLS 2 NON NLS 1 build File Of Int For prefix i rsc asb tokens NON NLS 2 NON NLS 1 build File Of Int For prefix i rsc asr tokens NON NLS 2 NON NLS 1 build File Of Int For prefix i rsc nasb tokens NON NLS 2 NON NLS 1 build File Of Int For prefix i rsc nasr tokens NON NLS 2 NON NLS 1 build File Of Int For prefix i rsc terminal index tokens NON NLS 2 NON NLS 1 char new Non Terminal Index build File Of Int For prefix i rsc non terminal index tokens NON NLS 1 NON NLS 2 build File Of Int For prefix i rsc term action tokens NON NLS 2 NON NLS 1 build File Of Int For prefix i rsc scope prefix tokens NON NLS 2 NON NLS 1 build File Of Int For prefix i rsc scope suffix tokens NON NLS 2 NON NLS 1 build File Of Int For prefix i rsc scope lhs tokens NON NLS 2 NON NLS 1 build File Of Int For prefix i rsc scope state set tokens NON NLS 2 NON NLS 1 build File Of Int For prefix i rsc scope rhs tokens NON NLS 2 NON NLS 1 build File Of Int For prefix i rsc scope state tokens NON NLS 2 NON NLS 1 build File Of Int For prefix i rsc in symb tokens NON NLS 2 NON NLS 1 build File Of Byte For prefix i rsc rhs tokens NON NLS 2 NON NLS 1 build File Of Byte For prefix i rsc term check tokens NON NLS 2 NON NLS 1 build File Of Byte For prefix i rsc scope la tokens NON NLS 2 NON NLS 1 String new Name build File For Name prefix i rsc new String contents NON NLS 1 contents new char try contents Util get File Char Content new File data Filename2 null catch IO Exception ex System out println Util bind parser incorrect Path NON NLS 1 return st new java util String Tokenizer new String contents t n r NON NLS 1 tokens new String st count Tokens i 0 while st has More Tokens tokens i st next Token build File For Readable Name READABLE NAMES FILE properties new Lhs new Non Terminal Index new Name tokens NON NLS 1 System out println Util bind parser move Files NON NLS 1  buildFilesFromLPG dataFilename dataFilename2 IOException check_table symbol_index buildFilesFromLPG getFileCharContent dataFilename IOException incorrectPath StringTokenizer StringTokenizer countTokens hasMoreTokens nextToken newLhs buildFileOfIntFor buildFileOfShortFor check_table buildFileOfIntFor buildFileOfIntFor buildFileOfIntFor buildFileOfIntFor buildFileOfIntFor terminal_index newNonTerminalIndex buildFileOfIntFor non_terminal_index buildFileOfIntFor term_action buildFileOfIntFor scope_prefix buildFileOfIntFor scope_suffix buildFileOfIntFor scope_lhs buildFileOfIntFor scope_state_set buildFileOfIntFor scope_rhs buildFileOfIntFor scope_state buildFileOfIntFor in_symb buildFileOfByteFor buildFileOfByteFor term_check buildFileOfByteFor scope_la newName buildFileForName getFileCharContent dataFilename2 IOException incorrectPath StringTokenizer countTokens hasMoreTokens nextToken buildFileForReadableName READABLE_NAMES_FILE newLhs newNonTerminalIndex newName moveFiles
public Recovered Element build Initial Recovery State initialize recovery by retrieving available reduced nodes also rebuild bracket balance this last Check Point 0 Recovered Element element null if this reference Context instanceof Compilation Unit Declaration element new Recovered Unit this compilation Unit 0 this ignore current stack state since restarting from the beginnning since could not trust simple brace count if true experimenting restart recovery from scratch this compilation Unit current Package null this compilation Unit imports null this compilation Unit types null this current Token 0 this list Length 0 this end Position 0 this end Statement Position 0 return element if this compilation Unit current Package null this last Check Point this compilation Unit current Package declaration Source End 1 if this compilation Unit imports null this last Check Point this compilation Unit imports this compilation Unit imports length 1 declaration Source End 1 else if this reference Context instanceof Abstract Method Declaration element new Recovered Method Abstract Method Declaration this reference Context null 0 this this last Check Point Abstract Method Declaration this reference Context body Start else Initializer bodies are parsed in the context of the type declaration we must thus search it inside if this reference Context instanceof Type Declaration Type Declaration type Type Declaration this reference Context for int i 0 i type fields length i Field Declaration field type fields i if field null field is Field field declaration Source Start this scanner initial Position this scanner initial Position field declaration Source End this scanner eof Position field declaration Source End 1 element new Recovered Initializer field null 1 this this last Check Point field declaration Source Start break if element null return element for int i 0 i this ast Ptr i AST Node node this ast Stack i if node instanceof Abstract Method Declaration Abstract Method Declaration method Abstract Method Declaration node if method declaration Source End 0 element element add method 0 this last Check Point method body Start else element element add method 0 this last Check Point method declaration Source End 1 continue if node instanceof Initializer Initializer initializer Initializer node if initializer declaration Source End 0 element element add initializer 1 this last Check Point initializer source Start else element element add initializer 0 this last Check Point initializer declaration Source End 1 continue if node instanceof Field Declaration Field Declaration field Field Declaration node if field declaration Source End 0 element element add field 0 if field initialization null this last Check Point field source End 1 else this last Check Point field initialization source End 1 else element element add field 0 this last Check Point field declaration Source End 1 continue if node instanceof Type Declaration Type Declaration type Type Declaration node if type declaration Source End 0 element element add type 0 this last Check Point type body Start else element element add type 0 this last Check Point type declaration Source End 1 continue if node instanceof Import Reference Import Reference import Ref Import Reference node element element add import Ref 0 this last Check Point import Ref declaration Source End 1 return element  RecoveredElement buildInitialRecoveryState lastCheckPoint RecoveredElement referenceContext CompilationUnitDeclaration RecoveredUnit compilationUnit compilationUnit currentPackage compilationUnit compilationUnit currentToken listLength endPosition endStatementPosition compilationUnit currentPackage lastCheckPoint compilationUnit currentPackage declarationSourceEnd compilationUnit lastCheckPoint compilationUnit compilationUnit declarationSourceEnd referenceContext AbstractMethodDeclaration RecoveredMethod AbstractMethodDeclaration referenceContext lastCheckPoint AbstractMethodDeclaration referenceContext bodyStart referenceContext TypeDeclaration TypeDeclaration TypeDeclaration referenceContext FieldDeclaration isField declarationSourceStart initialPosition initialPosition declarationSourceEnd eofPosition declarationSourceEnd RecoveredInitializer lastCheckPoint declarationSourceStart astPtr ASTNode astStack AbstractMethodDeclaration AbstractMethodDeclaration AbstractMethodDeclaration declarationSourceEnd lastCheckPoint bodyStart lastCheckPoint declarationSourceEnd declarationSourceEnd lastCheckPoint sourceStart lastCheckPoint declarationSourceEnd FieldDeclaration FieldDeclaration FieldDeclaration declarationSourceEnd lastCheckPoint sourceEnd lastCheckPoint sourceEnd lastCheckPoint declarationSourceEnd TypeDeclaration TypeDeclaration TypeDeclaration declarationSourceEnd lastCheckPoint bodyStart lastCheckPoint declarationSourceEnd ImportReference ImportReference importRef ImportReference importRef lastCheckPoint importRef declarationSourceEnd
return element public final static short base check int i return check table i NUM RULES 1  base_check check_table NUM_RULES
public final void check And Set Modifiers int flag modify the current modifiers buffer When the start Position of the modifiers is 0 it means that the modifier being parsed is the first of a list of several modifiers The start Position is zeroed when a copy of modifiers buffer is push onto the ast Stack if this modifiers flag 0 duplicate modifier this modifiers Acc Alternate Modifier Problem this modifiers flag if this modifiers Source Start 0 this modifiers Source Start this scanner start Position  checkAndSetModifiers startPosition startPosition astStack AccAlternateModifierProblem modifiersSourceStart modifiersSourceStart startPosition
public void check Comment if this current Element null this scanner comment Ptr 0 flush Comments Defined Prior To this end Statement Position discard obsolete comments during recovery int last Comment this scanner comment Ptr if this modifiers Source Start 0 eliminate comments located after modifier Source Start if positionned while last Comment 0 this scanner comment Starts last Comment this modifiers Source Start last Comment if last Comment 0 consider all remaining leading comments to be part of current declaration this modifiers Source Start this scanner comment Starts 0 check deprecation in last comment if javadoc can be followed by non javadoc comments which are simply ignored while last Comment 0 this scanner comment Stops last Comment 0 last Comment non javadoc comment have negative end positions if last Comment 0 this javadoc Parser null if this javadoc Parser check Deprecation this scanner comment Starts last Comment this scanner comment Stops last Comment 1 stop is one over check And Set Modifiers Acc Deprecated this javadoc this javadoc Parser doc Comment null if check javadoc is not activated  checkComment currentElement commentPtr flushCommentsDefinedPriorTo endStatementPosition lastComment commentPtr modifiersSourceStart modifierSourceStart lastComment commentStarts lastComment modifiersSourceStart lastComment lastComment modifiersSourceStart commentStarts lastComment commentStops lastComment lastComment lastComment javadocParser javadocParser checkDeprecation commentStarts lastComment commentStops lastComment checkAndSetModifiers AccDeprecated javadocParser docComment
protected void check Non Externalized String Literal if this scanner was Non Externalized String Literal String Literal literals this scanner nonNLS Strings could not reproduce but this is the only NPE added preventive null check see PR 9035 if literals null for int i 0 max literals length i max i problem Reporter non Externalized String Literal literals i this scanner was Non Externalized String Literal false  checkNonExternalizedStringLiteral wasNonExternalizedStringLiteral StringLiteral nonNLSStrings problemReporter nonExternalizedStringLiteral wasNonExternalizedStringLiteral
protected void check NonNLS After Body End int declaration End if this scanner current Position 1 declaration End this scanner eof Position declaration End Integer MAX VALUE declaration End 1 declaration End try while this scanner get Next Token Token NameEOF empty check Non Externalized String Literal catch Invalid Input Exception e Nothing to do  checkNonNLSAfterBodyEnd declarationEnd currentPosition declarationEnd eofPosition declarationEnd MAX_VALUE declarationEnd declarationEnd getNextToken TokenNameEOF checkNonExternalizedStringLiteral InvalidInputException
protected char get Next Character char comment int index char next Character comment index 0 switch next Character case int c1 c2 c3 c4 index 0 while comment index 0 u index 0 if c1 Character get Numeric Value comment index 0 15 c1 0 c2 Character get Numeric Value comment index 0 15 c2 0 c3 Character get Numeric Value comment index 0 15 c3 0 c4 Character get Numeric Value comment index 0 15 c4 0 next Character char c1 16 c2 16 c3 16 c4 break return next Character  getNextCharacter nextCharacter nextCharacter getNumericValue getNumericValue getNumericValue getNumericValue nextCharacter nextCharacter
protected void class Instance Creation boolean always Qualified Class Instance Creation Expression new Class Type Argument Listopt Class Bodyopt Class Bodyopt produces a null item on the ast Stak if it produces NO class body An empty class body produces a 0 on the length stack Allocation Expression alloc int length if length this ast Length Stack this ast Length Ptr 1 this ast Stack this ast Ptr null NO Class Body this ast Ptr if always Qualified alloc new Qualified Allocation Expression else alloc new Allocation Expression alloc source End this end Position the position has been stored explicitly if length this expression Length Stack this expression Length Ptr 0 this expression Ptr length System arraycopy this expression Stack this expression Ptr 1 alloc arguments new Expression length 0 length alloc type get Type Reference 0 the default constructor with the correct number of argument will be created and added by the TC see creates Internal Constructor With Binding alloc source Start this int Stack this int Ptr push On Expression Stack alloc else dispatch Declaration Into length Type Declaration anonymous Type Declaration Type Declaration this ast Stack this ast Ptr anonymous Type Declaration declaration Source End this end Statement Position anonymous Type Declaration body End this end Statement Position if anonymous Type Declaration allocation null anonymous Type Declaration allocation source End this end Statement Position if length 0 contains Comment anonymous Type Declaration body Start anonymous Type Declaration body End anonymous Type Declaration bits AST Node Undocumented Empty BlockMASK this ast Ptr this ast Length Ptr mark initializers with local type mark if needed mark Initializers With Local Type anonymous Type Declaration  classInstanceCreation alwaysQualified ClassInstanceCreationExpression ClassType ArgumentListopt ClassBodyopt ClassBodyopt astStak AllocationExpression astLengthStack astLengthPtr astStack astPtr ClassBody astPtr alwaysQualified QualifiedAllocationExpression AllocationExpression sourceEnd endPosition expressionLengthStack expressionLengthPtr expressionPtr expressionStack expressionPtr getTypeReference createsInternalConstructorWithBinding sourceStart intStack intPtr pushOnExpressionStack dispatchDeclarationInto TypeDeclaration anonymousTypeDeclaration TypeDeclaration astStack astPtr anonymousTypeDeclaration declarationSourceEnd endStatementPosition anonymousTypeDeclaration bodyEnd endStatementPosition anonymousTypeDeclaration anonymousTypeDeclaration sourceEnd endStatementPosition containsComment anonymousTypeDeclaration bodyStart anonymousTypeDeclaration bodyEnd anonymousTypeDeclaration ASTNode UndocumentedEmptyBlockMASK astPtr astLengthPtr markInitializersWithLocalType anonymousTypeDeclaration
protected final void concat Expression Lists this expression Length Stack this expression Length Ptr  concatExpressionLists expressionLengthStack expressionLengthPtr
private final void concat Node Lists This is a case where you have two sublists into the ast Stack that you want to merge in one list There is no action required on the ast Stack The only thing you need to do is merge the two lengths specified on the ast Stack Length The top two length are for example p n and you want to result in a list like n p This means that the p could be equals to 0 in case there is no ast Node pushed on the ast Stack Look at the Interface Member Declarations for an example this ast Length Stack this ast Length Ptr 1 this ast Length Stack this ast Length Ptr  concatNodeLists astStack astStack astStackLength astNode astStack InterfaceMemberDeclarations astLengthStack astLengthPtr astLengthStack astLengthPtr
protected void consume Allocation Header Class Instance Creation Expression new Class Type Argument Listopt Class Bodyopt Class Bodyopt produces a null item on the ast Stak if it produces NO class body An empty class body produces a 0 on the length stack if this current Element null return should never occur this consume Rule is only used in recovery mode if this current Token Token NameLBRACE beginning of an anonymous type Type Declaration anonymous Type new Type Declaration this compilation Unit compilation Result anonymous Type name Type Declaration ANONYMOUS EMPTY NAME anonymous Type bits AST Node Anonymous And Local Mask anonymous Type source Start this int Stack this int Ptr anonymous Type source End this r Paren Pos closing parenthesis Qualified Allocation Expression alloc new Qualified Allocation Expression anonymous Type alloc type get Type Reference 0 alloc source Start anonymous Type source Start alloc source End anonymous Type source End anonymous Type allocation alloc this last Check Point anonymous Type body Start this scanner current Position this current Element this current Element add anonymous Type 0 this last Ignored Token 1 this current Token 0 opening brace already taken into account return this last Check Point this scanner start Position force to restart at this exact position this restart Recovery true request to restart from here on  consumeAllocationHeader ClassInstanceCreationExpression ClassType ArgumentListopt ClassBodyopt ClassBodyopt astStak currentElement consumeRule currentToken TokenNameLBRACE TypeDeclaration anonymousType TypeDeclaration compilationUnit compilationResult anonymousType TypeDeclaration ANONYMOUS_EMPTY_NAME anonymousType ASTNode AnonymousAndLocalMask anonymousType sourceStart intStack intPtr anonymousType sourceEnd rParenPos QualifiedAllocationExpression QualifiedAllocationExpression anonymousType getTypeReference sourceStart anonymousType sourceStart sourceEnd anonymousType sourceEnd anonymousType lastCheckPoint anonymousType bodyStart currentPosition currentElement currentElement anonymousType lastIgnoredToken currentToken lastCheckPoint startPosition restartRecovery
this restart Recovery true request to restart from here on protected void consume Argument List Argument List Argument List Expression concat Expression Lists  restartRecovery consumeArgumentList ArgumentList ArgumentList concatExpressionLists
protected void consume Array Access boolean unspecified Reference Array Access Name Expression true Array Access Primary No New Array Expression false optimize push pop Expression exp if unspecified Reference exp this expression Stack this expression Ptr new Array Reference get Unspecified Reference Optimized this expression Stack this expression Ptr else this expression Ptr this expression Length Ptr exp this expression Stack this expression Ptr new Array Reference this expression Stack this expression Ptr this expression Stack this expression Ptr 1 exp source End this end Position  consumeArrayAccess unspecifiedReference ArrayAccess ArrayAccess PrimaryNoNewArray unspecifiedReference expressionStack expressionPtr ArrayReference getUnspecifiedReferenceOptimized expressionStack expressionPtr expressionPtr expressionLengthPtr expressionStack expressionPtr ArrayReference expressionStack expressionPtr expressionStack expressionPtr sourceEnd endPosition
protected void consume Array Creation Expression Without Initializer Array Creation Without Array Initializer new Class Or Interface Type Dim With Or With Out Exprs Array Creation Without Array Initializer new Primitive Type Dim With Or With Out Exprs int length Array Allocation Expression aae new Array Allocation Expression aae type get Type Reference 0 length this expression Length Stack this expression Length Ptr this expression Ptr length System arraycopy this expression Stack this expression Ptr 1 aae dimensions new Expression length 0 length aae source Start this int Stack this int Ptr if aae initializer null aae source End this end Position else aae source End aae initializer source End push On Expression Stack aae  consumeArrayCreationExpressionWithoutInitializer ArrayCreationWithoutArrayInitializer ClassOrInterfaceType DimWithOrWithOutExprs ArrayCreationWithoutArrayInitializer PrimitiveType DimWithOrWithOutExprs ArrayAllocationExpression ArrayAllocationExpression getTypeReference expressionLengthStack expressionLengthPtr expressionPtr expressionStack expressionPtr sourceStart intStack intPtr sourceEnd endPosition sourceEnd sourceEnd pushOnExpressionStack
protected void consume Array Creation Header nothing to do  consumeArrayCreationHeader
protected void consume Array Creation Expression With Initializer Array Creation With Array Initializer new Primitive Type Dim With Or With Out Exprs Array Initializer Array Creation With Array Initializer new Class Or Interface Type Dim With Or With Out Exprs Array Initializer int length Array Allocation Expression aae new Array Allocation Expression this expression Length Ptr aae initializer Array Initializer this expression Stack this expression Ptr aae type get Type Reference 0 length this expression Length Stack this expression Length Ptr this expression Ptr length System arraycopy this expression Stack this expression Ptr 1 aae dimensions new Expression length 0 length aae source Start this int Stack this int Ptr if aae initializer null aae source End this end Position else aae source End aae initializer source End push On Expression Stack aae  consumeArrayCreationExpressionWithInitializer ArrayCreationWithArrayInitializer PrimitiveType DimWithOrWithOutExprs ArrayInitializer ArrayCreationWithArrayInitializer ClassOrInterfaceType DimWithOrWithOutExprs ArrayInitializer ArrayAllocationExpression ArrayAllocationExpression expressionLengthPtr ArrayInitializer expressionStack expressionPtr getTypeReference expressionLengthStack expressionLengthPtr expressionPtr expressionStack expressionPtr sourceStart intStack intPtr sourceEnd endPosition sourceEnd sourceEnd pushOnExpressionStack
protected void consume Array Initializer Array Initializer Variable Initializers Array Initializer Variable Initializers array Initializer this expression Length Stack this expression Length Ptr  consumeArrayInitializer ArrayInitializer VariableInitializers ArrayInitializer VariableInitializers arrayInitializer expressionLengthStack expressionLengthPtr
protected void consume Assert Statement Assert Statement assert Expression Expression this expression Length Ptr 2 push On Ast Stack new Assert Statement this expression Stack this expression Ptr this expression Stack this expression Ptr this int Stack this int Ptr  consumeAssertStatement AssertStatement expressionLengthPtr pushOnAstStack AssertStatement expressionStack expressionPtr expressionStack expressionPtr intStack intPtr
protected void consume Assignment Assignment Left Hand Side Assignment Operator Assignment Expression optimize the push pop int op this int Stack this int Ptr the encoded operator this expression Ptr this expression Length Ptr this expression Stack this expression Ptr op EQUAL new Compound Assignment this expression Stack this expression Ptr this expression Stack this expression Ptr 1 op this scanner start Position 1 new Assignment this expression Stack this expression Ptr this expression Stack this expression Ptr 1 this scanner start Position 1  consumeAssignment LeftHandSide AssignmentOperator AssignmentExpression intStack intPtr expressionPtr expressionLengthPtr expressionStack expressionPtr CompoundAssignment expressionStack expressionPtr expressionStack expressionPtr startPosition expressionStack expressionPtr expressionStack expressionPtr startPosition
protected void consume Assignment Operator int pos Assignment Operator Assignment Operator Assignment Operator Assignment Operator Assignment Operator Assignment Operator Assignment Operator Assignment Operator Assignment Operator Assignment Operator Assignment Operator Assignment Operator push On Int Stack pos  consumeAssignmentOperator AssignmentOperator AssignmentOperator AssignmentOperator AssignmentOperator AssignmentOperator AssignmentOperator AssignmentOperator AssignmentOperator AssignmentOperator AssignmentOperator AssignmentOperator AssignmentOperator pushOnIntStack
protected void consume Binary Expression int op Multiplicative Expression Multiplicative Expression Unary Expression Multiplicative Expression Multiplicative Expression Unary Expression Multiplicative Expression Multiplicative Expression Unary Expression Additive Expression Additive Expression Multiplicative Expression Additive Expression Additive Expression Multiplicative Expression Shift Expression Shift Expression Additive Expression Shift Expression Shift Expression Additive Expression Shift Expression Shift Expression Additive Expression Relational Expression Relational Expression Shift Expression Relational Expression Relational Expression Shift Expression Relational Expression Relational Expression Shift Expression Relational Expression Relational Expression Shift Expression And Expression And Expression Equality Expression Exclusive Or Expression Exclusive Or Expression And Expression Inclusive Or Expression Inclusive Or Expression Exclusive Or Expression Conditional And Expression Conditional And Expression Inclusive Or Expression Conditional Or Expression Conditional Or Expression Conditional And Expression optimize the push pop this expression Ptr this expression Length Ptr Expression expr1 this expression Stack this expression Ptr Expression expr2 this expression Stack this expression Ptr 1 switch op case OR OR this expression Stack this expression Ptr new OR OR Expression expr1 expr2 op break case AND AND this expression Stack this expression Ptr new AND AND Expression expr1 expr2 op break case PLUS look for string1 string2 if this optimize String Literals if expr1 instanceof String Literal if expr2 instanceof Char Literal string char this expression Stack this expression Ptr String Literal expr1 extend With Char Literal expr2 else if expr2 instanceof String Literal string string this expression Stack this expression Ptr String Literal expr1 extend With String Literal expr2 else this expression Stack this expression Ptr new Binary Expression expr1 expr2 PLUS else this expression Stack this expression Ptr new Binary Expression expr1 expr2 PLUS else if expr1 instanceof String Literal if expr2 instanceof String Literal string string this expression Stack this expression Ptr String Literal expr1 extends With String Literal expr2 else this expression Stack this expression Ptr new Binary Expression expr1 expr2 op else this expression Stack this expression Ptr new Binary Expression expr1 expr2 op break default this expression Stack this expression Ptr new Binary Expression expr1 expr2 op  consumeBinaryExpression MultiplicativeExpression MultiplicativeExpression UnaryExpression MultiplicativeExpression MultiplicativeExpression UnaryExpression MultiplicativeExpression MultiplicativeExpression UnaryExpression AdditiveExpression AdditiveExpression MultiplicativeExpression AdditiveExpression AdditiveExpression MultiplicativeExpression ShiftExpression ShiftExpression AdditiveExpression ShiftExpression ShiftExpression AdditiveExpression ShiftExpression ShiftExpression AdditiveExpression RelationalExpression RelationalExpression ShiftExpression RelationalExpression RelationalExpression ShiftExpression RelationalExpression RelationalExpression ShiftExpression RelationalExpression RelationalExpression ShiftExpression AndExpression AndExpression EqualityExpression ExclusiveOrExpression ExclusiveOrExpression AndExpression InclusiveOrExpression InclusiveOrExpression ExclusiveOrExpression ConditionalAndExpression ConditionalAndExpression InclusiveOrExpression ConditionalOrExpression ConditionalOrExpression ConditionalAndExpression expressionPtr expressionLengthPtr expressionStack expressionPtr expressionStack expressionPtr OR_OR expressionStack expressionPtr OR_OR_Expression AND_AND expressionStack expressionPtr AND_AND_Expression optimizeStringLiterals StringLiteral CharLiteral expressionStack expressionPtr StringLiteral extendWith CharLiteral StringLiteral expressionStack expressionPtr StringLiteral extendWith StringLiteral expressionStack expressionPtr BinaryExpression expressionStack expressionPtr BinaryExpression StringLiteral StringLiteral expressionStack expressionPtr StringLiteral extendsWith StringLiteral expressionStack expressionPtr BinaryExpression expressionStack expressionPtr BinaryExpression expressionStack expressionPtr BinaryExpression
protected void consume Block Block Open Block Block Statementsopt simpler action for empty blocks int statements Length this ast Length Stack this ast Length Ptr Block block if statements Length 0 empty block block new Block 0 block source Start this int Stack this int Ptr block source End this end Statement Position check whether this block at least contains some comment in it if contains Comment block source Start block source End block bits AST Node Undocumented Empty BlockMASK this real Block Ptr still need to pop the block variable counter else block new Block this real Block Stack this real Block Ptr this ast Ptr statements Length System arraycopy this ast Stack this ast Ptr 1 block statements new Statement statements Length 0 statements Length block source Start this int Stack this int Ptr block source End this end Statement Position push On Ast Stack block  consumeBlock OpenBlock BlockStatementsopt statementsLength astLengthStack astLengthPtr statementsLength sourceStart intStack intPtr sourceEnd endStatementPosition containsComment sourceStart sourceEnd ASTNode UndocumentedEmptyBlockMASK realBlockPtr realBlockStack realBlockPtr astPtr statementsLength astStack astPtr statementsLength statementsLength sourceStart intStack intPtr sourceEnd endStatementPosition pushOnAstStack
push On Ast Stack block protected void consume Block Statements Block Statements Block Statements Block Statement concat Node Lists  pushOnAstStack consumeBlockStatements BlockStatements BlockStatements BlockStatement concatNodeLists
protected void consume Case Label Switch Label case Constant Expression this expression Length Ptr Expression expression this expression Stack this expression Ptr push On Ast Stack new Case Statement expression expression source End this int Stack this int Ptr  consumeCaseLabel SwitchLabel ConstantExpression expressionLengthPtr expressionStack expressionPtr pushOnAstStack CaseStatement sourceEnd intStack intPtr
protected void consume Cast Expression Cast Expression PushLPAREN Primitive Type Dimsopt PushRPAREN Inside Cast Expression Unary Expression Cast Expression PushLPAREN Name Dims PushRPAREN Inside Cast Expression Unary Expression Not Plus Minus this int Stack pos Of Left Paren dim pos Of Right Paren optimize the push pop Expression exp cast cast Type int end this int Stack this int Ptr this expression Stack this expression Ptr cast new Cast Expression exp this expression Stack this expression Ptr cast Type get Type Reference this int Stack this int Ptr cast Type source End end 1 cast Type source Start cast source Start this int Stack this int Ptr 1 cast source End exp source End  consumeCastExpression CastExpression PrimitiveType InsideCastExpression UnaryExpression CastExpression InsideCastExpression UnaryExpressionNotPlusMinus intStack posOfLeftParen posOfRightParen castType intStack intPtr expressionStack expressionPtr CastExpression expressionStack expressionPtr castType getTypeReference intStack intPtr castType sourceEnd castType sourceStart sourceStart intStack intPtr sourceEnd sourceEnd
protected void consume Cast ExpressionLL1 Cast Expression Expression Inside Cast ExpressionLL1 Unary Expression Not Plus Minus Expression is used in order to make the grammar LL1 optimize push pop Expression cast exp this expression Ptr this expression Stack this expression Ptr cast new Cast Expression exp this expression Stack this expression Ptr 1 get Type Reference this expression Stack this expression Ptr this expression Length Ptr update Source Position cast cast source End exp source End  consumeCastExpressionLL1 CastExpression InsideCastExpressionLL1 UnaryExpressionNotPlusMinus expressionPtr expressionStack expressionPtr CastExpression expressionStack expressionPtr getTypeReference expressionStack expressionPtr expressionLengthPtr updateSourcePosition sourceEnd sourceEnd
cast source End exp source End protected void consume Catches Catches Catches Catch Clause optimized Concat Node Lists  sourceEnd sourceEnd consumeCatches CatchClause optimizedConcatNodeLists
protected void consume Catch Header Catch Declaration catch Formal Parameter if this current Element null return should never occur this consume Rule is only used in recovery mode current element should be a block due to the presence of the opening brace if this current Element instanceof Recovered Block if this current Element instanceof Recovered Method return Recovered Method r Method Recovered Method this current Element if r Method method Body null r Method bracket Balance 0 return Argument arg Argument this ast Stack this ast Ptr convert argument to local variable Local Declaration local Declaration new Local Declaration arg name arg source Start arg source End local Declaration type arg type local Declaration declaration Source Start arg declaration Source Start local Declaration declaration Source End arg declaration Source End this current Element this current Element add local Declaration 0 this last Check Point this scanner start Position force to restart at this exact position this restart Recovery true request to restart from here on this last Ignored Token 1  consumeCatchHeader CatchDeclaration FormalParameter currentElement consumeRule currentElement RecoveredBlock currentElement RecoveredMethod RecoveredMethod rMethod RecoveredMethod currentElement rMethod methodBody rMethod bracketBalance astStack astPtr LocalDeclaration localDeclaration LocalDeclaration sourceStart sourceEnd localDeclaration localDeclaration declarationSourceStart declarationSourceStart localDeclaration declarationSourceEnd declarationSourceEnd currentElement currentElement localDeclaration lastCheckPoint startPosition restartRecovery lastIgnoredToken
protected void consume Class Body Declaration Class Body Declaration Diet Block push an Initializer optimize the push pop this nested Method this nested Type Block block Block this ast Stack this ast Ptr if this diet block bits AST Node Undocumented Empty BlockMASK clear bit since was diet Initializer initializer new Initializer block 0 this int Ptr pop sourcestart left on the stack by consume Nested Method initializer body Start this int Stack this int Ptr this real Block Ptr pop the block variable counter left on the stack by consume Nested Method int javadoc Comment Start this int Stack this int Ptr if javadoc Comment Start 1 initializer declaration Source Start javadoc Comment Start initializer javadoc this javadoc this javadoc null this ast Stack this ast Ptr initializer initializer body End this end Position initializer source End this end Statement Position initializer declaration Source End flush Comments Defined Prior To this end Statement Position  consumeClassBodyDeclaration ClassBodyDeclaration nestedMethod nestedType astStack astPtr ASTNode UndocumentedEmptyBlockMASK intPtr consumeNestedMethod bodyStart intStack intPtr realBlockPtr consumeNestedMethod javadocCommentStart intStack intPtr javadocCommentStart declarationSourceStart javadocCommentStart astStack astPtr bodyEnd endPosition sourceEnd endStatementPosition declarationSourceEnd flushCommentsDefinedPriorTo endStatementPosition
initializer declaration Source End flush Comments Defined Prior To this end Statement Position protected void consume Class Body Declarations Class Body Declarations Class Body Declarations Class Body Declaration concat Node Lists  declarationSourceEnd flushCommentsDefinedPriorTo endStatementPosition consumeClassBodyDeclarations ClassBodyDeclarations ClassBodyDeclarations ClassBodyDeclaration concatNodeLists
concat Node Lists protected void consume Class Body Declarationsopt Class Body Declarationsopt Nested Type Class Body Declarations this nested Type  concatNodeLists consumeClassBodyDeclarationsopt ClassBodyDeclarationsopt NestedType ClassBodyDeclarations nestedType
protected void consume Class Bodyopt Class Bodyopt empty push On Ast Stack null this end Position this scanner start Position 1  consumeClassBodyopt ClassBodyopt pushOnAstStack endPosition startPosition
protected void consume Class Declaration Class Declaration Class Header Class Body int length if length this ast Length Stack this ast Length Ptr 0 there are length declarations dispatch according to the type of the declarations dispatch Declaration Into length Type Declaration type Decl Type Declaration this ast Stack this ast Ptr mark initializers with local type mark if needed mark Initializers With Local Type type Decl convert constructor that do not have the type s name into methods boolean has Constructor type Decl check Constructors this add the default constructor when needed interface don t have it if has Constructor type Decl is Interface boolean inside Field Initializer false if this diet for int i this nested Type i 0 i if this variables Counter i 0 inside Field Initializer true break type Decl creates Internal Constructor this diet inside Field Initializer true always add clinit will be remove at code gen time if empty if this scanner contains Assert Keyword type Decl bits AST Node Add AssertionMASK type Decl add Clinit type Decl body End this end Statement Position if length 0 contains Comment type Decl body Start type Decl body End type Decl bits AST Node Undocumented Empty BlockMASK type Decl declaration Source End flush Comments Defined Prior To this end Statement Position  consumeClassDeclaration ClassDeclaration ClassHeader ClassBody astLengthStack astLengthPtr dispatchDeclarationInto TypeDeclaration typeDecl TypeDeclaration astStack astPtr markInitializersWithLocalType typeDecl hasConstructor typeDecl checkConstructors hasConstructor typeDecl isInterface insideFieldInitializer nestedType variablesCounter insideFieldInitializer typeDecl createsInternalConstructor insideFieldInitializer containsAssertKeyword typeDecl ASTNode AddAssertionMASK typeDecl addClinit typeDecl bodyEnd endStatementPosition containsComment typeDecl bodyStart typeDecl bodyEnd typeDecl ASTNode UndocumentedEmptyBlockMASK typeDecl declarationSourceEnd flushCommentsDefinedPriorTo endStatementPosition
protected void consume Class Header Class Header Class Header Name Class Header Extendsopt Class Header Implementsopt Type Declaration type Decl Type Declaration this ast Stack this ast Ptr if this current Token Token NameLBRACE type Decl body Start this scanner current Position if this current Element null this restart Recovery true used to avoid branching back into the regular automaton flush the comments related to the class header this scanner comment Ptr 1  consumeClassHeader ClassHeader ClassHeaderName ClassHeaderExtendsopt ClassHeaderImplementsopt TypeDeclaration typeDecl TypeDeclaration astStack astPtr currentToken TokenNameLBRACE typeDecl bodyStart currentPosition currentElement restartRecovery commentPtr
protected void consume Class Header Extends Class Header Extends extends Class Type There is a class declaration on the top of stack Type Declaration type Decl Type Declaration this ast Stack this ast Ptr superclass type Decl superclass get Type Reference 0 type Decl body Start type Decl superclass source End 1 recovery if this current Element null this last Check Point type Decl body Start  consumeClassHeaderExtends ClassHeaderExtends ClassType TypeDeclaration typeDecl TypeDeclaration astStack astPtr typeDecl getTypeReference typeDecl bodyStart typeDecl sourceEnd currentElement lastCheckPoint typeDecl bodyStart
protected void consume Class Header Implements Class Header Implements implements Interface Type List int length this ast Length Stack this ast Length Ptr super interfaces this ast Ptr length There is a class declaration on the top of stack Type Declaration type Decl Type Declaration this ast Stack this ast Ptr System arraycopy this ast Stack this ast Ptr 1 type Decl super Interfaces new Type Reference length 0 length type Decl body Start type Decl super Interfaces length 1 source End 1 this list Length 0 reset after having read super interfaces recovery if this current Element null is recovering this last Check Point type Decl body Start  consumeClassHeaderImplements ClassHeaderImplements InterfaceTypeList astLengthStack astLengthPtr astPtr TypeDeclaration typeDecl TypeDeclaration astStack astPtr astStack astPtr typeDecl superInterfaces TypeReference typeDecl bodyStart typeDecl superInterfaces sourceEnd listLength currentElement lastCheckPoint typeDecl bodyStart
protected void consume Class Header Name Class Header Name Modifiersopt class Identifier Type Declaration type Decl new Type Declaration this compilation Unit compilation Result if this nested Method this nested Type 0 if this nested Type 0 type Decl bits AST Node Is Member TypeMASK else Record that the block has a declaration for local types type Decl bits AST Node Is Local TypeMASK mark Enclosing Member With Local Type block Real highlight the name of the type long pos this identifier Position Stack this identifier Ptr type Decl source End int pos type Decl source Start int pos 32 type Decl name this identifier Stack this identifier Ptr this identifier Length Ptr compute the declaration source too class and interface push two int positions the beginning of the class token and its end we want to keep the beginning position but get rid of the end position it is only used for the Class Literal Access positions type Decl declaration Source Start this int Stack this int Ptr this int Ptr remove the end position of the class token type Decl modifiers Source Start this int Stack this int Ptr type Decl modifiers this int Stack this int Ptr if type Decl modifiers Source Start 0 type Decl declaration Source Start type Decl modifiers Source Start type Decl body Start type Decl source End 1 push On Ast Stack type Decl this list Length 0 will be updated when reading super interfaces recovery if this current Element null this last Check Point type Decl body Start this current Element this current Element add type Decl 0 this last Ignored Token 1 javadoc type Decl javadoc this javadoc this javadoc null  consumeClassHeaderName ClassHeaderName TypeDeclaration typeDecl TypeDeclaration compilationUnit compilationResult nestedMethod nestedType nestedType typeDecl ASTNode IsMemberTypeMASK typeDecl ASTNode IsLocalTypeMASK markEnclosingMemberWithLocalType blockReal identifierPositionStack identifierPtr typeDecl sourceEnd typeDecl sourceStart typeDecl identifierStack identifierPtr identifierLengthPtr ClassLiteralAccess typeDecl declarationSourceStart intStack intPtr intPtr typeDecl modifiersSourceStart intStack intPtr typeDecl intStack intPtr typeDecl modifiersSourceStart typeDecl declarationSourceStart typeDecl modifiersSourceStart typeDecl bodyStart typeDecl sourceEnd pushOnAstStack typeDecl listLength currentElement lastCheckPoint typeDecl bodyStart currentElement currentElement typeDecl lastIgnoredToken typeDecl
this javadoc null protected void consume Class Instance Creation Expression Class Instance Creation Expression new Class Type Argument Listopt Class Bodyopt class Instance Creation false  consumeClassInstanceCreationExpression ClassInstanceCreationExpression ClassType ArgumentListopt ClassBodyopt classInstanceCreation
class Instance Creation false protected void consume Class Instance Creation Expression Name Class Instance Creation Expression Name Name push On Expression Stack get Unspecified Reference Optimized  classInstanceCreation consumeClassInstanceCreationExpressionName ClassInstanceCreationExpressionName pushOnExpressionStack getUnspecifiedReferenceOptimized
protected void consume Class Instance Creation Expression Qualified Class Instance Creation Expression Primary new Simple Name Argument Listopt Class Bodyopt Class Instance Creation Expression Class Instance Creation Expression Name new Simple Name Argument Listopt Class Bodyopt class Instance Creation true push the Qualifed this expression Length Ptr Qualified Allocation Expression qae Qualified Allocation Expression this expression Stack this expression Ptr qae enclosing Instance this expression Stack this expression Ptr this expression Stack this expression Ptr qae qae source Start qae enclosing Instance source Start  consumeClassInstanceCreationExpressionQualified ClassInstanceCreationExpression SimpleName ArgumentListopt ClassBodyopt ClassInstanceCreationExpression ClassInstanceCreationExpressionName SimpleName ArgumentListopt ClassBodyopt classInstanceCreation expressionLengthPtr QualifiedAllocationExpression QualifiedAllocationExpression expressionStack expressionPtr enclosingInstance expressionStack expressionPtr expressionStack expressionPtr sourceStart enclosingInstance sourceStart
protected void consume Class Type Elt Class Type Elt Class Type push On Ast Stack get Type Reference 0 if incomplete thrown exception list list Length counter will not have been reset indicating that some items are available on the stack this list Length  consumeClassTypeElt ClassTypeElt ClassType pushOnAstStack getTypeReference listLength listLength
this list Length protected void consume Class Type List Class Type List Class Type List Class Type Elt optimized Concat Node Lists  listLength consumeClassTypeList ClassTypeList ClassTypeList ClassTypeElt optimizedConcatNodeLists
optimized Concat Node Lists protected void consume Compilation Unit Compilation Unit Enter Compilation Unit Package Declarationopt Import Declarationsopt do nothing by default  optimizedConcatNodeLists consumeCompilationUnit CompilationUnit EnterCompilationUnit PackageDeclarationopt ImportDeclarationsopt
protected void consume Conditional Expression int op Conditional Expression Conditional Or Expression Expression Conditional Expression optimize the push pop this expression Ptr 2 this expression Length Ptr 2 this expression Stack this expression Ptr new Conditional Expression this expression Stack this expression Ptr this expression Stack this expression Ptr 1 this expression Stack this expression Ptr 2  consumeConditionalExpression ConditionalExpression ConditionalOrExpression ConditionalExpression expressionPtr expressionLengthPtr expressionStack expressionPtr ConditionalExpression expressionStack expressionPtr expressionStack expressionPtr expressionStack expressionPtr
this expression Stack this expression Ptr 2 protected void consume Constructor Block Statements Constructor Body Nested Method Explicit Constructor Invocation Block Statements concat Node Lists explictly add the first statement into the list of statements  expressionStack expressionPtr consumeConstructorBlockStatements ConstructorBody NestedMethod ExplicitConstructorInvocation BlockStatements concatNodeLists
protected void consume Constructor Body Constructor Body Nested Method Block Statementsopt Constructor Body Nested Method Explicit Constructor Invocation this nested Method this nested Type  consumeConstructorBody ConstructorBody NestedMethod BlockStatementsopt ConstructorBody NestedMethod ExplicitConstructorInvocation nestedMethod nestedType
protected void consume Constructor Declaration Constructor Declaration Constructor Header Constructor Body ast Stack Method Declaration statements identifier Stack name ast Stack Method Declaration identifier Stack must provide a default constructor call when needed int length pop the position of the body of the method pushed in block decl this int Ptr this int Ptr statements this real Block Ptr Explicit Constructor Call constructor Call null Statement statements null if length this ast Length Stack this ast Length Ptr 0 this ast Ptr length if this ast Stack this ast Ptr 1 instanceof Explicit Constructor Call avoid a is Some Thing that would only be used here BUT what is faster between two alternatives System arraycopy this ast Stack this ast Ptr 2 statements new Statement length 1 0 length 1 constructor Call Explicit Constructor Call this ast Stack this ast Ptr 1 else need to add explicitly the super System arraycopy this ast Stack this ast Ptr 1 statements new Statement length 0 length constructor Call Super Reference implicit Super Constructor Call else boolean inside Field Initializer false if this diet for int i this nested Type i 0 i if this variables Counter i 0 inside Field Initializer true break if this diet inside Field Initializer add it only in non diet mode if diet bodies then constructor call will be added elsewhere constructor Call Super Reference implicit Super Constructor Call now we know that the top of stack is a constructor Declaration Constructor Declaration cd Constructor Declaration this ast Stack this ast Ptr cd constructor Call constructor Call cd statements statements highlight of the implicit call on the method name if constructor Call null cd constructor Call source End 0 cd constructor Call source End cd source End cd constructor Call source Start cd source Start if this diet statements null constructor Call is Implicit Super if contains Comment cd body Start this end Position cd bits AST Node Undocumented Empty BlockMASK watch for that could be given as a unicode u007D is store the end Position position just before the in case there is a trailing comment behind the end of the method cd body End this end Position cd declaration Source End flush Comments Defined Prior To this end Statement Position  consumeConstructorDeclaration ConstructorDeclaration ConstructorHeader ConstructorBody astStack MethodDeclaration identifierStack astStack MethodDeclaration identifierStack intPtr intPtr realBlockPtr ExplicitConstructorCall constructorCall astLengthStack astLengthPtr astPtr astStack astPtr ExplicitConstructorCall isSomeThing astStack astPtr constructorCall ExplicitConstructorCall astStack astPtr astStack astPtr constructorCall SuperReference implicitSuperConstructorCall insideFieldInitializer nestedType variablesCounter insideFieldInitializer insideFieldInitializer diet_bodies constructorCall SuperReference implicitSuperConstructorCall constructorDeclaration ConstructorDeclaration ConstructorDeclaration astStack astPtr constructorCall constructorCall constructorCall constructorCall sourceEnd constructorCall sourceEnd sourceEnd constructorCall sourceStart sourceStart constructorCall isImplicitSuper containsComment bodyStart endPosition ASTNode UndocumentedEmptyBlockMASK endPosition bodyEnd endPosition declarationSourceEnd flushCommentsDefinedPriorTo endStatementPosition
protected void consume Invalid Constructor Declaration Constructor Declaration Constructor Header now we know that the top of stack is a constructor Declaration Constructor Declaration cd Constructor Declaration this ast Stack this ast Ptr cd body End this end Position position just before the trailing semi colon cd declaration Source End flush Comments Defined Prior To this end Statement Position report the problem and continue the parsing narrowing the problem onto the method cd modifiers Acc Semicolon Body remember semi colon body  consumeInvalidConstructorDeclaration ConstructorDeclaration ConstructorHeader constructorDeclaration ConstructorDeclaration ConstructorDeclaration astStack astPtr bodyEnd endPosition declarationSourceEnd flushCommentsDefinedPriorTo endStatementPosition AccSemicolonBody
protected void consume Constructor Header Constructor Header Constructor Header Name Method Header Parameters Method Header Throws Clauseopt Abstract Method Declaration method Abstract Method Declaration this ast Stack this ast Ptr if this current Token Token NameLBRACE method body Start this scanner current Position recovery if this current Element null if this current Token Token NameSEMICOLON for invalid constructors method modifiers Acc Semicolon Body method declaration Source End this scanner current Position 1 method body End this scanner current Position 1 if this current Element parse Tree method this current Element parent null this current Element this current Element parent this restart Recovery true used to avoid branching back into the regular automaton  consumeConstructorHeader ConstructorHeader ConstructorHeaderName MethodHeaderParameters MethodHeaderThrowsClauseopt AbstractMethodDeclaration AbstractMethodDeclaration astStack astPtr currentToken TokenNameLBRACE bodyStart currentPosition currentElement currentToken TokenNameSEMICOLON AccSemicolonBody declarationSourceEnd currentPosition bodyEnd currentPosition currentElement parseTree currentElement currentElement currentElement restartRecovery
protected void consume Constructor Header Name recovering might be an empty message send if this current Element null if this last Ignored Token Token Namenew was an allocation expression this last Check Point this scanner start Position force to restart at this exact position this restart Recovery true return Constructor Header Name Modifiersopt Identifier Constructor Declaration cd new Constructor Declaration this compilation Unit compilation Result name this is not really revelant but we do cd selector this identifier Stack this identifier Ptr long selector Source this identifier Position Stack this identifier Ptr this identifier Length Ptr modifiers cd declaration Source Start this int Stack this int Ptr cd modifiers this int Stack this int Ptr javadoc cd javadoc this javadoc this javadoc null highlight starts at the selector starts cd source Start int selector Source 32 push On Ast Stack cd cd source End this l Paren Pos cd body Start this l Paren Pos 1 this list Length 0 initialize list Length before reading parameters throws recovery if this current Element null this last Check Point cd body Start if this current Element instanceof Recovered Type this last Ignored Token Token NameDOT cd modifiers 0 this current Element this current Element add cd 0 this last Ignored Token 1  consumeConstructorHeaderName currentElement lastIgnoredToken TokenNamenew lastCheckPoint startPosition restartRecovery ConstructorHeaderName ConstructorDeclaration ConstructorDeclaration compilationUnit compilationResult identifierStack identifierPtr selectorSource identifierPositionStack identifierPtr identifierLengthPtr declarationSourceStart intStack intPtr intStack intPtr sourceStart selectorSource pushOnAstStack sourceEnd lParenPos bodyStart lParenPos listLength listLength currentElement lastCheckPoint bodyStart currentElement RecoveredType lastIgnoredToken TokenNameDOT currentElement currentElement lastIgnoredToken
protected void consume Default Label Switch Label default push On Ast Stack new Case Statement null this int Stack this int Ptr this int Stack this int Ptr  consumeDefaultLabel SwitchLabel pushOnAstStack CaseStatement intStack intPtr intStack intPtr
protected void consume Default Modifiers check Comment might update modifiers with Acc Deprecated push On Int Stack this modifiers modifiers push On Int Stack this modifiers Source Start 0 this modifiers Source Start this scanner start Position reset Modifiers  consumeDefaultModifiers checkComment AccDeprecated pushOnIntStack pushOnIntStack modifiersSourceStart modifiersSourceStart startPosition resetModifiers
protected void consume Diet Diet empty check Comment push On Int Stack this modifiers Source Start push the start position of a javadoc comment if there is one reset Modifiers jump Over Method Body  consumeDiet checkComment pushOnIntStack modifiersSourceStart resetModifiers jumpOverMethodBody
protected void consume Dims Dims Dims Loop push On Int Stack this dimensions this dimensions 0  consumeDims DimsLoop pushOnIntStack
protected void consume Dim With Or With Out Expr Dim With Or With Out Expr push On Expression Stack null if this current Element null this current Token Token NameLBRACE this ignore Next Opening Brace true this current Element bracket Balance  consumeDimWithOrWithOutExpr DimWithOrWithOutExpr pushOnExpressionStack currentElement currentToken TokenNameLBRACE ignoreNextOpeningBrace currentElement bracketBalance
protected void consume Dim With Or With Out Exprs Dim With Or With Out Exprs Dim With Or With Out Exprs Dim With Or With Out Expr concat Expression Lists  consumeDimWithOrWithOutExprs DimWithOrWithOutExprs DimWithOrWithOutExprs DimWithOrWithOutExpr concatExpressionLists
concat Expression Lists protected void consume Empty Argument Listopt Argument Listopt empty push On Expression Stack Length Stack 0  concatExpressionLists consumeEmptyArgumentListopt ArgumentListopt pushOnExpressionStackLengthStack
push On Expression Stack Length Stack 0 protected void consume Empty Array Initializer Array Initializer opt array Initializer 0  pushOnExpressionStackLengthStack consumeEmptyArrayInitializer ArrayInitializer arrayInitializer
array Initializer 0 protected void consume Empty Array Initializeropt Array Initializeropt empty push On Expression Stack Length Stack 0  arrayInitializer consumeEmptyArrayInitializeropt ArrayInitializeropt pushOnExpressionStackLengthStack
push On Expression Stack Length Stack 0 protected void consume Empty Block Statementsopt Block Statementsopt empty push On Ast Length Stack 0  pushOnExpressionStackLengthStack consumeEmptyBlockStatementsopt BlockStatementsopt pushOnAstLengthStack
push On Ast Length Stack 0 protected void consume Empty Catchesopt Catchesopt empty push On Ast Length Stack 0  pushOnAstLengthStack consumeEmptyCatchesopt pushOnAstLengthStack
push On Ast Length Stack 0 protected void consume Empty Class Body Declarationsopt Class Body Declarationsopt empty push On Ast Length Stack 0  pushOnAstLengthStack consumeEmptyClassBodyDeclarationsopt ClassBodyDeclarationsopt pushOnAstLengthStack
protected void consume Empty Class Member Declaration Class Member Declaration push On Ast Length Stack 0 problem Reporter superfluous Semicolon this end Position 1 this end Statement Position flush Comments Defined Prior To this end Statement Position  consumeEmptyClassMemberDeclaration ClassMemberDeclaration pushOnAstLengthStack problemReporter superfluousSemicolon endPosition endStatementPosition flushCommentsDefinedPriorTo endStatementPosition
flush Comments Defined Prior To this end Statement Position protected void consume Empty Dimsopt Dimsopt empty push On Int Stack 0  flushCommentsDefinedPriorTo endStatementPosition consumeEmptyDimsopt pushOnIntStack
push On Int Stack 0 protected void consume Empty Expression Expressionopt empty push On Expression Stack Length Stack 0  pushOnIntStack consumeEmptyExpression pushOnExpressionStackLengthStack
push On Expression Stack Length Stack 0 protected void consume Empty For Initopt For Initopt empty push On Ast Length Stack 0  pushOnExpressionStackLengthStack consumeEmptyForInitopt ForInitopt pushOnAstLengthStack
push On Ast Length Stack 0 protected void consume Empty For Updateopt For Updateopt empty push On Expression Stack Length Stack 0  pushOnAstLengthStack consumeEmptyForUpdateopt ForUpdateopt pushOnExpressionStackLengthStack
push On Expression Stack Length Stack 0 protected void consume Empty Import Declarationsopt Import Declarationsopt empty push On Ast Length Stack 0  pushOnExpressionStackLengthStack consumeEmptyImportDeclarationsopt ImportDeclarationsopt pushOnAstLengthStack
push On Ast Length Stack 0 protected void consume Empty Interface Member Declaration Interface Member Declaration push On Ast Length Stack 0  pushOnAstLengthStack consumeEmptyInterfaceMemberDeclaration InterfaceMemberDeclaration pushOnAstLengthStack
push On Ast Length Stack 0 protected void consume Empty Interface Member Declarationsopt Interface Member Declarationsopt empty push On Ast Length Stack 0  pushOnAstLengthStack consumeEmptyInterfaceMemberDeclarationsopt InterfaceMemberDeclarationsopt pushOnAstLengthStack
protected void consume Empty Statement Empty Statement if this scanner source this end Statement Position push On Ast Stack new Empty Statement this end Statement Position this end Statement Position else we have a Unicode for the u003B push On Ast Stack new Empty Statement this end Statement Position 5 this end Statement Position  consumeEmptyStatement EmptyStatement endStatementPosition pushOnAstStack EmptyStatement endStatementPosition endStatementPosition pushOnAstStack EmptyStatement endStatementPosition endStatementPosition
protected void consume Empty Switch Block Switch Block push On Ast Length Stack 0  consumeEmptySwitchBlock SwitchBlock pushOnAstLengthStack
protected void consume Empty Type Declaration Type Declaration push On Ast Length Stack 0 problem Reporter superfluous Semicolon this end Position 1 this end Statement Position flush Comments Defined Prior To this end Statement Position  consumeEmptyTypeDeclaration TypeDeclaration pushOnAstLengthStack problemReporter superfluousSemicolon endPosition endStatementPosition flushCommentsDefinedPriorTo endStatementPosition
flush Comments Defined Prior To this end Statement Position protected void consume Empty Type Declarationsopt Type Declarationsopt empty push On Ast Length Stack 0  flushCommentsDefinedPriorTo endStatementPosition consumeEmptyTypeDeclarationsopt TypeDeclarationsopt pushOnAstLengthStack
protected void consume Enter Anonymous Class Body Enter Anonymous Class Body empty Qualified Allocation Expression alloc Type Declaration anonymous Type new Type Declaration this compilation Unit compilation Result anonymous Type name Type Declaration ANONYMOUS EMPTY NAME anonymous Type bits AST Node Anonymous And Local Mask alloc anonymous Type allocation new Qualified Allocation Expression anonymous Type mark Enclosing Member With Local Type push On Ast Stack anonymous Type alloc source End this r Paren Pos the position has been stored explicitly int argument Length if argument Length this expression Length Stack this expression Length Ptr 0 this expression Ptr argument Length System arraycopy this expression Stack this expression Ptr 1 alloc arguments new Expression argument Length 0 argument Length alloc type get Type Reference 0 anonymous Type source End alloc source End position at the type while it impacts the anonymous declaration anonymous Type source Start anonymous Type declaration Source Start alloc type source Start alloc source Start this int Stack this int Ptr push On Expression Stack alloc anonymous Type body Start this scanner current Position this list Length 0 will be updated when reading super interfaces recovery if this current Element null this last Check Point anonymous Type body Start this current Element this current Element add anonymous Type 0 this current Token 0 opening brace already taken into account this last Ignored Token 1  consumeEnterAnonymousClassBody EnterAnonymousClassBody QualifiedAllocationExpression TypeDeclaration anonymousType TypeDeclaration compilationUnit compilationResult anonymousType TypeDeclaration ANONYMOUS_EMPTY_NAME anonymousType ASTNode AnonymousAndLocalMask anonymousType QualifiedAllocationExpression anonymousType markEnclosingMemberWithLocalType pushOnAstStack anonymousType sourceEnd rParenPos argumentLength argumentLength expressionLengthStack expressionLengthPtr expressionPtr argumentLength expressionStack expressionPtr argumentLength argumentLength getTypeReference anonymousType sourceEnd sourceEnd anonymousType sourceStart anonymousType declarationSourceStart sourceStart sourceStart intStack intPtr pushOnExpressionStack anonymousType bodyStart currentPosition listLength currentElement lastCheckPoint anonymousType bodyStart currentElement currentElement anonymousType currentToken lastIgnoredToken
protected void consume Enter Compilation Unit Enter Compilation Unit empty do nothing by default  consumeEnterCompilationUnit EnterCompilationUnit
protected void consume Enter Variable Enter Variable empty do nothing by default char identifier Name this identifier Stack this identifier Ptr long name Position this identifier Position Stack this identifier Ptr int extended Dimension this int Stack this int Ptr Abstract Variable Declaration declaration create the ast node boolean is Local Declaration this nested Method this nested Type 0 if is Local Declaration create the local variable declarations declaration this create Local Declaration identifier Name int name Position 32 int name Position else create the field declaration declaration this create Field Declaration identifier Name int name Position 32 int name Position this identifier Ptr this identifier Length Ptr Type Reference type int variable Index this variables Counter this nested Type int type Dim 0 if variable Index 0 first variable of the declaration Field Declaration or Local Declaration if is Local Declaration declaration declaration Source Start this int Stack this int Ptr declaration modifiers this int Stack this int Ptr type get Type Reference type Dim this int Stack this int Ptr type dimension if declaration declaration Source Start 1 this is true if there is no modifiers for the local variable declaration declaration declaration Source Start type source Start push On Ast Stack type else type get Type Reference type Dim this int Stack this int Ptr type dimension push On Ast Stack type declaration declaration Source Start this int Stack this int Ptr declaration modifiers this int Stack this int Ptr Store javadoc only on first declaration as it is the same for all ones Field Declaration field Declaration Field Declaration declaration field Declaration javadoc this javadoc this javadoc null else type Type Reference this ast Stack this ast Ptr variable Index type Dim type dimensions Abstract Variable Declaration previous Variable Abstract Variable Declaration this ast Stack this ast Ptr declaration declaration Source Start previous Variable declaration Source Start declaration modifiers previous Variable modifiers if extended Dimension 0 declaration type type else int dimension type Dim extended Dimension on the identifier Length Stack there is the information about the type int base Type if base Type this identifier Length Stack this identifier Length Ptr 1 0 it was a base Type int type Source Start type source Start int type Source End type source End type Type Reference base Type Reference base Type dimension type source Start type Source Start type source End type Source End declaration type type else declaration type this copy Dims type dimension this variables Counter this nested Type push On Ast Stack declaration recovery if this current Element null if this current Element instanceof Recovered Type this current Token Token NameDOT declaration modifiers 0 this scanner get Line Number declaration type source Start this scanner get Line Number int name Position 32 this last Check Point int name Position 32 this restart Recovery true return if is Local Declaration Local Declaration local Decl Local Declaration this ast Stack this ast Ptr this last Check Point local Decl source End 1 this current Element this current Element add local Decl 0 else Field Declaration field Decl Field Declaration this ast Stack this ast Ptr this last Check Point field Decl source End 1 this current Element this current Element add field Decl 0 this last Ignored Token 1  consumeEnterVariable EnterVariable identifierName identifierStack identifierPtr namePosition identifierPositionStack identifierPtr extendedDimension intStack intPtr AbstractVariableDeclaration isLocalDeclaration nestedMethod nestedType isLocalDeclaration createLocalDeclaration identifierName namePosition namePosition createFieldDeclaration identifierName namePosition namePosition identifierPtr identifierLengthPtr TypeReference variableIndex variablesCounter nestedType typeDim variableIndex FieldDeclaration LocalDeclaration isLocalDeclaration declarationSourceStart intStack intPtr intStack intPtr getTypeReference typeDim intStack intPtr declarationSourceStart declarationSourceStart sourceStart pushOnAstStack getTypeReference typeDim intStack intPtr pushOnAstStack declarationSourceStart intStack intPtr intStack intPtr FieldDeclaration fieldDeclaration FieldDeclaration fieldDeclaration TypeReference astStack astPtr variableIndex typeDim AbstractVariableDeclaration previousVariable AbstractVariableDeclaration astStack astPtr declarationSourceStart previousVariable declarationSourceStart previousVariable extendedDimension typeDim extendedDimension identifierLengthStack baseType baseType identifierLengthStack identifierLengthPtr baseType typeSourceStart sourceStart typeSourceEnd sourceEnd TypeReference baseTypeReference baseType sourceStart typeSourceStart sourceEnd typeSourceEnd copyDims variablesCounter nestedType pushOnAstStack currentElement currentElement RecoveredType currentToken TokenNameDOT getLineNumber sourceStart getLineNumber namePosition lastCheckPoint namePosition restartRecovery isLocalDeclaration LocalDeclaration localDecl LocalDeclaration astStack astPtr lastCheckPoint localDecl sourceEnd currentElement currentElement localDecl FieldDeclaration fieldDecl FieldDeclaration astStack astPtr lastCheckPoint fieldDecl sourceEnd currentElement currentElement fieldDecl lastIgnoredToken
protected void consume Equality Expression int op Equality Expression Equality Expression Relational Expression Equality Expression Equality Expression Relational Expression optimize the push pop this expression Ptr this expression Length Ptr this expression Stack this expression Ptr new Equal Expression this expression Stack this expression Ptr this expression Stack this expression Ptr 1 op  consumeEqualityExpression EqualityExpression EqualityExpression RelationalExpression EqualityExpression EqualityExpression RelationalExpression expressionPtr expressionLengthPtr expressionStack expressionPtr EqualExpression expressionStack expressionPtr expressionStack expressionPtr
protected void consume Exit Try Block Exit Try Block empty if this current Element null this restart Recovery true  consumeExitTryBlock ExitTryBlock currentElement restartRecovery
protected void consume Exit Variable With Initialization Exit Variable With Initialization empty do nothing by default this expression Length Ptr Abstract Variable Declaration variable Decl Abstract Variable Declaration this ast Stack this ast Ptr variable Decl initialization this expression Stack this expression Ptr we need to update the declaration Source End of the local variable declaration to the source end position of the initialization expression variable Decl declaration Source End variable Decl initialization source End variable Decl declaration End variable Decl initialization source End this recovery Exit From Variable  consumeExitVariableWithInitialization ExitVariableWithInitialization expressionLengthPtr AbstractVariableDeclaration variableDecl AbstractVariableDeclaration astStack astPtr variableDecl expressionStack expressionPtr declarationSourceEnd variableDecl declarationSourceEnd variableDecl sourceEnd variableDecl declarationEnd variableDecl sourceEnd recoveryExitFromVariable
protected void consume Exit Variable Without Initialization Exit Variable Without Initialization empty do nothing by default Abstract Variable Declaration variable Decl Abstract Variable Declaration this ast Stack this ast Ptr variable Decl declaration Source End variable Decl declaration End this recovery Exit From Variable  consumeExitVariableWithoutInitialization ExitVariableWithoutInitialization AbstractVariableDeclaration variableDecl AbstractVariableDeclaration astStack astPtr variableDecl declarationSourceEnd variableDecl declarationEnd recoveryExitFromVariable
protected void consume Explicit Constructor Invocation int flag int rec Flag flag allows to distinguish 3 cases 0 Explicit Constructor Invocation this Argument Listopt Explicit Constructor Invocation super Argument Listopt 1 Explicit Constructor Invocation Primary super Argument Listopt Explicit Constructor Invocation Primary this Argument Listopt 2 Explicit Constructor Invocation Name super Argument Listopt Explicit Constructor Invocation Name this Argument Listopt int start Position this int Stack this int Ptr Explicit Constructor Call ecc new Explicit Constructor Call rec Flag int length if length this expression Length Stack this expression Length Ptr 0 this expression Ptr length System arraycopy this expression Stack this expression Ptr 1 ecc arguments new Expression length 0 length switch flag case 0 ecc source Start start Position break case 1 this expression Length Ptr ecc source Start ecc qualification this expression Stack this expression Ptr source Start break case 2 ecc source Start ecc qualification get Unspecified Reference Optimized source Start break push On Ast Stack ecc ecc source End this end Position  consumeExplicitConstructorInvocation recFlag ExplicitConstructorInvocation ArgumentListopt ExplicitConstructorInvocation ArgumentListopt ExplicitConstructorInvocation ArgumentListopt ExplicitConstructorInvocation ArgumentListopt ExplicitConstructorInvocation ArgumentListopt ExplicitConstructorInvocation ArgumentListopt startPosition intStack intPtr ExplicitConstructorCall ExplicitConstructorCall recFlag expressionLengthStack expressionLengthPtr expressionPtr expressionStack expressionPtr sourceStart startPosition expressionLengthPtr sourceStart expressionStack expressionPtr sourceStart sourceStart getUnspecifiedReferenceOptimized sourceStart pushOnAstStack sourceEnd endPosition
protected void consume Expression Statement Expression Statement Statement Expression this expression Length Ptr push On Ast Stack this expression Stack this expression Ptr  consumeExpressionStatement ExpressionStatement StatementExpression expressionLengthPtr pushOnAstStack expressionStack expressionPtr
protected void consume Field Access boolean is Super Access Field Access Primary Identifier Field Access super Identifier Field Reference fr new Field Reference this identifier Stack this identifier Ptr this identifier Position Stack this identifier Ptr this identifier Length Ptr if is Super Access considerates the field Reference beginning at the super fr source Start this int Stack this int Ptr fr receiver new Super Reference fr source Start this end Position push On Expression Stack fr else optimize push pop if fr receiver this expression Stack this expression Ptr is This fieldreference begins at the this fr source Start fr receiver source Start this expression Stack this expression Ptr fr  consumeFieldAccess isSuperAccess FieldAccess FieldAccess FieldReference FieldReference identifierStack identifierPtr identifierPositionStack identifierPtr identifierLengthPtr isSuperAccess fieldReference sourceStart intStack intPtr SuperReference sourceStart endPosition pushOnExpressionStack expressionStack expressionPtr isThis sourceStart sourceStart expressionStack expressionPtr
protected void consume Field Declaration See consume Local Variable Declaration Default Modifier in case of change duplicated code Field Declaration Modifiersopt Type Variable Declarators ast Stack expression Stack Expression Expression Expression identifier Stack type identifier identifier identifier int Stack type Dim dim dim dim ast Stack Field Declaration Field Declaration Field Declaration expression Stack identifier Stack int Stack int variable Declarators Counter this ast Length Stack this ast Length Ptr for int i variable Declarators Counter 1 i 0 i Field Declaration field Declaration Field Declaration this ast Stack this ast Ptr i field Declaration declaration Source End this end Statement Position field Declaration declaration End this end Statement Position semi colon included update Source Declaration Parts variable Declarators Counter int end Pos flush Comments Defined Prior To this end Statement Position if end Pos this end Statement Position for int i 0 i variable Declarators Counter i Field Declaration field Declaration Field Declaration this ast Stack this ast Ptr i field Declaration declaration Source End end Pos update the ast Stack ast Ptr and ast Length Stack int start Index this ast Ptr this variables Counter this nested Type 1 System arraycopy this ast Stack start Index this ast Stack start Index 1 variable Declarators Counter this ast Ptr remove the type reference this ast Length Stack this ast Length Ptr variable Declarators Counter recovery if this current Element null this last Check Point end Pos 1 if this current Element parent null this current Element instanceof Recovered Field if this current Element instanceof Recovered Initializer this current Element this current Element parent this restart Recovery true this variables Counter this nested Type 0  consumeFieldDeclaration consumeLocalVariableDeclarationDefaultModifier FieldDeclaration VariableDeclarators astStack expressionStack identifierStack intStack typeDim astStack FieldDeclaration FieldDeclaration FieldDeclaration expressionStack identifierStack intStack variableDeclaratorsCounter astLengthStack astLengthPtr variableDeclaratorsCounter FieldDeclaration fieldDeclaration FieldDeclaration astStack astPtr fieldDeclaration declarationSourceEnd endStatementPosition fieldDeclaration declarationEnd endStatementPosition updateSourceDeclarationParts variableDeclaratorsCounter endPos flushCommentsDefinedPriorTo endStatementPosition endPos endStatementPosition variableDeclaratorsCounter FieldDeclaration fieldDeclaration FieldDeclaration astStack astPtr fieldDeclaration declarationSourceEnd endPos astStack astPtr astLengthStack startIndex astPtr variablesCounter nestedType astStack startIndex astStack startIndex variableDeclaratorsCounter astPtr astLengthStack astLengthPtr variableDeclaratorsCounter currentElement lastCheckPoint endPos currentElement currentElement RecoveredField currentElement RecoveredInitializer currentElement currentElement restartRecovery variablesCounter nestedType
this variables Counter this nested Type 0 protected void consume Force No Diet Force No Diet empty this diet Int  variablesCounter nestedType consumeForceNoDiet ForceNoDiet dietInt
this diet Int protected void consume For Init For Init Statement Expression List push On Ast Length Stack 1  dietInt consumeForInit ForInit StatementExpressionList pushOnAstLengthStack
protected void consume Formal Parameter Formal Parameter Type Variable Declarator Id false Formal Parameter Modifiers Type Variable Declarator Id true ast Stack identifier Stack type identifier int Stack dim dim ast Stack Argument identifier Stack int Stack this identifier Length Ptr char identifier Name this identifier Stack this identifier Ptr long name Positions this identifier Position Stack this identifier Ptr Type Reference type get Type Reference this int Stack this int Ptr this int Stack this int Ptr int modifier Positions this int Stack this int Ptr this int Ptr Argument arg new Argument identifier Name name Positions type this int Stack this int Ptr 1 Acc Deprecated modifiers arg declaration Source Start modifier Positions push On Ast Stack arg if incomplete method header list Length counter will not have been reset indicating that some arguments are available on the stack this list Length  consumeFormalParameter FormalParameter VariableDeclaratorId FormalParameter VariableDeclaratorId astStack identifierStack intStack astStack identifierStack intStack identifierLengthPtr identifierName identifierStack identifierPtr namePositions identifierPositionStack identifierPtr TypeReference getTypeReference intStack intPtr intStack intPtr modifierPositions intStack intPtr intPtr identifierName namePositions intStack intPtr AccDeprecated declarationSourceStart modifierPositions pushOnAstStack listLength listLength
this list Length protected void consume Formal Parameter List Formal Parameter List Formal Parameter List Formal Parameter optimized Concat Node Lists  listLength consumeFormalParameterList FormalParameterList FormalParameterList FormalParameter optimizedConcatNodeLists
optimized Concat Node Lists protected void consume Formal Parameter Listopt Formal Parameter Listopt empty push On Ast Length Stack 0  optimizedConcatNodeLists consumeFormalParameterListopt FormalParameterListopt pushOnAstLengthStack
push On Ast Length Stack 0 protected void consume Import Declarations Import Declarations Import Declarations Import Declaration optimized Concat Node Lists  pushOnAstLengthStack consumeImportDeclarations ImportDeclarations ImportDeclarations ImportDeclaration optimizedConcatNodeLists
protected void consume Import Declarationsopt Import Declarationsopt Import Declarations int length if length this ast Length Stack this ast Length Ptr 0 this ast Ptr length System arraycopy this ast Stack this ast Ptr 1 this compilation Unit imports new Import Reference length 0 length  consumeImportDeclarationsopt ImportDeclarationsopt ImportDeclarations astLengthStack astLengthPtr astPtr astStack astPtr compilationUnit ImportReference
protected void consume Inside Cast Expression Inside Cast Expression empty  consumeInsideCastExpression InsideCastExpression
Inside Cast Expression empty protected void consume Inside Cast ExpressionLL1 Inside Cast ExpressionLL1 empty  InsideCastExpression consumeInsideCastExpressionLL1 InsideCastExpressionLL1
protected void consume Instance Of Expression int op Relational Expression Relational Expression instanceof Reference Type optimize the push pop by construction no base type may be used in get Type Reference Expression exp this expression Stack this expression Ptr exp new Instance Of Expression this expression Stack this expression Ptr get Type Reference this int Stack this int Ptr op if exp source End 0 array on base type exp source End this scanner start Position 1 the scanner is on the next token already  consumeInstanceOfExpression RelationalExpression RelationalExpression ReferenceType getTypeReference expressionStack expressionPtr InstanceOfExpression expressionStack expressionPtr getTypeReference intStack intPtr sourceEnd sourceEnd startPosition
protected void consume Interface Declaration see consume Class Declaration in case of changes duplicated code Interface Declaration Interface Header Interface Body int length if length this ast Length Stack this ast Length Ptr 0 there are length declarations dispatch according to the type of the declarations dispatch Declaration Into length Type Declaration type Decl Type Declaration this ast Stack this ast Ptr mark initializers with local type mark if needed mark Initializers With Local Type type Decl convert constructor that do not have the type s name into methods type Decl check Constructors this always add clinit will be remove at code gen time if empty if this scanner contains Assert Keyword type Decl bits AST Node Add AssertionMASK type Decl add Clinit type Decl body End this end Statement Position if length 0 contains Comment type Decl body Start type Decl body End type Decl bits AST Node Undocumented Empty BlockMASK type Decl declaration Source End flush Comments Defined Prior To this end Statement Position  consumeInterfaceDeclaration consumeClassDeclaration InterfaceDeclaration InterfaceHeader InterfaceBody astLengthStack astLengthPtr dispatchDeclarationInto TypeDeclaration typeDecl TypeDeclaration astStack astPtr markInitializersWithLocalType typeDecl typeDecl checkConstructors containsAssertKeyword typeDecl ASTNode AddAssertionMASK typeDecl addClinit typeDecl bodyEnd endStatementPosition containsComment typeDecl bodyStart typeDecl bodyEnd typeDecl ASTNode UndocumentedEmptyBlockMASK typeDecl declarationSourceEnd flushCommentsDefinedPriorTo endStatementPosition
protected void consume Interface Header Interface Header Interface Header Name Interface Header Extendsopt Type Declaration type Decl Type Declaration this ast Stack this ast Ptr if this current Token Token NameLBRACE type Decl body Start this scanner current Position if this current Element null this restart Recovery true used to avoid branching back into the regular automaton flush the comments related to the interface header this scanner comment Ptr 1  consumeInterfaceHeader InterfaceHeader InterfaceHeaderName InterfaceHeaderExtendsopt TypeDeclaration typeDecl TypeDeclaration astStack astPtr currentToken TokenNameLBRACE typeDecl bodyStart currentPosition currentElement restartRecovery commentPtr
protected void consume Interface Header Extends Interface Header Extends extends Interface Type List int length this ast Length Stack this ast Length Ptr super interfaces this ast Ptr length Type Declaration type Decl Type Declaration this ast Stack this ast Ptr System arraycopy this ast Stack this ast Ptr 1 type Decl super Interfaces new Type Reference length 0 length type Decl body Start type Decl super Interfaces length 1 source End 1 this list Length 0 reset after having read super interfaces recovery if this current Element null this last Check Point type Decl body Start  consumeInterfaceHeaderExtends InterfaceHeaderExtends InterfaceTypeList astLengthStack astLengthPtr astPtr TypeDeclaration typeDecl TypeDeclaration astStack astPtr astStack astPtr typeDecl superInterfaces TypeReference typeDecl bodyStart typeDecl superInterfaces sourceEnd listLength currentElement lastCheckPoint typeDecl bodyStart
protected void consume Interface Header Name Interface Header Name Modifiersopt interface Identifier Type Declaration type Decl new Type Declaration this compilation Unit compilation Result if this nested Method this nested Type 0 if this nested Type 0 type Decl bits AST Node Is Member TypeMASK else Record that the block has a declaration for local types type Decl bits AST Node Is Local TypeMASK mark Enclosing Member With Local Type block Real highlight the name of the type long pos this identifier Position Stack this identifier Ptr type Decl source End int pos type Decl source Start int pos 32 type Decl name this identifier Stack this identifier Ptr this identifier Length Ptr compute the declaration source too class and interface push two int positions the beginning of the class token and its end we want to keep the beginning position but get rid of the end position it is only used for the Class Literal Access positions type Decl declaration Source Start this int Stack this int Ptr this int Ptr remove the end position of the class token type Decl modifiers Source Start this int Stack this int Ptr type Decl modifiers this int Stack this int Ptr if type Decl modifiers Source Start 0 type Decl declaration Source Start type Decl modifiers Source Start type Decl body Start type Decl source End 1 push On Ast Stack type Decl this list Length 0 will be updated when reading super interfaces recovery if this current Element null is recovering this last Check Point type Decl body Start this current Element this current Element add type Decl 0 this last Ignored Token 1 javadoc type Decl javadoc this javadoc this javadoc null  consumeInterfaceHeaderName InterfaceHeaderName TypeDeclaration typeDecl TypeDeclaration compilationUnit compilationResult nestedMethod nestedType nestedType typeDecl ASTNode IsMemberTypeMASK typeDecl ASTNode IsLocalTypeMASK markEnclosingMemberWithLocalType blockReal identifierPositionStack identifierPtr typeDecl sourceEnd typeDecl sourceStart typeDecl identifierStack identifierPtr identifierLengthPtr ClassLiteralAccess typeDecl declarationSourceStart intStack intPtr intPtr typeDecl modifiersSourceStart intStack intPtr typeDecl intStack intPtr typeDecl modifiersSourceStart typeDecl declarationSourceStart typeDecl modifiersSourceStart typeDecl bodyStart typeDecl sourceEnd pushOnAstStack typeDecl listLength currentElement lastCheckPoint typeDecl bodyStart currentElement currentElement typeDecl lastIgnoredToken typeDecl
this javadoc null protected void consume Interface Member Declarations Interface Member Declarations Interface Member Declarations Interface Member Declaration concat Node Lists  consumeInterfaceMemberDeclarations InterfaceMemberDeclarations InterfaceMemberDeclarations InterfaceMemberDeclaration concatNodeLists
concat Node Lists protected void consume Interface Member Declarationsopt Interface Member Declarationsopt Nested Type Interface Member Declarations this nested Type  concatNodeLists consumeInterfaceMemberDeclarationsopt InterfaceMemberDeclarationsopt NestedType InterfaceMemberDeclarations nestedType
protected void consume Interface Type Interface Type Class Or Interface Type push On Ast Stack get Type Reference 0 if incomplete type header list Length counter will not have been reset indicating that some interfaces are available on the stack this list Length  consumeInterfaceType InterfaceType ClassOrInterfaceType pushOnAstStack getTypeReference listLength listLength
this list Length protected void consume Interface Type List Interface Type List Interface Type List Interface Type optimized Concat Node Lists  listLength consumeInterfaceTypeList InterfaceTypeList InterfaceTypeList InterfaceType optimizedConcatNodeLists
optimized Concat Node Lists protected void consume Left Paren PushLPAREN push On Int Stack this l Paren Pos  optimizedConcatNodeLists consumeLeftParen pushOnIntStack lParenPos
protected void consume Local Variable Declaration Local Variable Declaration Modifiers Type Variable Declarators ast Stack expression Stack Expression Expression Expression identifier Stack type identifier identifier identifier int Stack type Dim dim dim dim ast Stack Field Declaration Field Declaration Field Declaration expression Stack identifier Stack int Stack int variable Declarators Counter this ast Length Stack this ast Length Ptr update the ast Stack ast Ptr and ast Length Stack int start Index this ast Ptr this variables Counter this nested Type 1 System arraycopy this ast Stack start Index this ast Stack start Index 1 variable Declarators Counter this ast Ptr remove the type reference this ast Length Stack this ast Length Ptr variable Declarators Counter this variables Counter this nested Type 0  consumeLocalVariableDeclaration LocalVariableDeclaration VariableDeclarators astStack expressionStack identifierStack intStack typeDim astStack FieldDeclaration FieldDeclaration FieldDeclaration expressionStack identifierStack intStack variableDeclaratorsCounter astLengthStack astLengthPtr astStack astPtr astLengthStack startIndex astPtr variablesCounter nestedType astStack startIndex astStack startIndex variableDeclaratorsCounter astPtr astLengthStack astLengthPtr variableDeclaratorsCounter variablesCounter nestedType
protected void consume Local Variable Declaration Statement Local Variable Declaration Statement Local Variable Declaration see block Real in case of change duplicated code increment the amount of declared variables for this block this real Block Stack this real Block Ptr update source end to include the semi colon int variable Declarators Counter this ast Length Stack this ast Length Ptr for int i variable Declarators Counter 1 i 0 i Local Declaration local Declaration Local Declaration this ast Stack this ast Ptr i local Declaration declaration Source End this end Statement Position local Declaration declaration End this end Statement Position semi colon included  consumeLocalVariableDeclarationStatement LocalVariableDeclarationStatement LocalVariableDeclaration blockReal realBlockStack realBlockPtr variableDeclaratorsCounter astLengthStack astLengthPtr variableDeclaratorsCounter LocalDeclaration localDeclaration LocalDeclaration astStack astPtr localDeclaration declarationSourceEnd endStatementPosition localDeclaration declarationEnd endStatementPosition
protected void consume Method Body Method Body Nested Method Block Statementsopt this nested Method this nested Type  consumeMethodBody MethodBody NestedMethod BlockStatementsopt nestedMethod nestedType
protected void consume Method Declaration boolean is Not Abstract Method Declaration Method Header Method Body Abstract Method Declaration Method Header ast Stack modifiers arguments throws statements identifier Stack type name int Stack dim dim dim ast Stack Method Declaration identifier Stack int Stack int length if is Not Abstract pop the position of the body of the method pushed in block decl this int Ptr this int Ptr int explicit Declarations 0 Statement statements null if is Not Abstract statements explicit Declarations this real Block Stack this real Block Ptr if length this ast Length Stack this ast Length Ptr 0 System arraycopy this ast Stack this ast Ptr length 1 statements new Statement length 0 length now we know that we have a method declaration at the top of the ast stack Method Declaration md Method Declaration this ast Stack this ast Ptr md statements statements md explicit Declarations explicit Declarations cannot be done in consume Method Header because we have no idea whether or not there is a body when we reduce the method header if is Not Abstract remember the fact that the method has a semicolon body md modifiers Acc Semicolon Body else if this diet statements null if contains Comment md body Start this end Position md bits AST Node Undocumented Empty BlockMASK store the end Position position just before the in case there is a trailing comment behind the end of the method md body End this end Position md declaration Source End flush Comments Defined Prior To this end Statement Position  consumeMethodDeclaration isNotAbstract MethodDeclaration MethodHeader MethodBody AbstractMethodDeclaration MethodHeader astStack identifierStack intStack astStack MethodDeclaration identifierStack intStack isNotAbstract intPtr intPtr explicitDeclarations isNotAbstract explicitDeclarations realBlockStack realBlockPtr astLengthStack astLengthPtr astStack astPtr MethodDeclaration MethodDeclaration astStack astPtr explicitDeclarations explicitDeclarations consumeMethodHeader isNotAbstract AccSemicolonBody containsComment bodyStart endPosition ASTNode UndocumentedEmptyBlockMASK endPosition bodyEnd endPosition declarationSourceEnd flushCommentsDefinedPriorTo endStatementPosition
protected void consume Method Header Method Header Method Header Name Method Header Parameters Method Header Extended Dims Throws Clauseopt retrieve end position of method declarator Abstract Method Declaration method Abstract Method Declaration this ast Stack this ast Ptr if this current Token Token NameLBRACE method body Start this scanner current Position recovery if this current Element null if this current Token Token NameSEMICOLON method modifiers Acc Semicolon Body method declaration Source End this scanner current Position 1 method body End this scanner current Position 1 if this current Element parse Tree method this current Element parent null this current Element this current Element parent this restart Recovery true used to avoid branching back into the regular automaton  consumeMethodHeader MethodHeader MethodHeaderName MethodHeaderParameters MethodHeaderExtendedDims ThrowsClauseopt AbstractMethodDeclaration AbstractMethodDeclaration astStack astPtr currentToken TokenNameLBRACE bodyStart currentPosition currentElement currentToken TokenNameSEMICOLON AccSemicolonBody declarationSourceEnd currentPosition bodyEnd currentPosition currentElement parseTree currentElement currentElement currentElement restartRecovery
protected void consume Method Header Extended Dims Method Header Extended Dims Dimsopt now we update the return Type of the method Method Declaration md Method Declaration this ast Stack this ast Ptr int extended Dims this int Stack this int Ptr if extended Dims 0 Type Reference return Type md return Type md source End this end Position int dims return Type dimensions extended Dims int base Type if base Type this identifier Length Stack this identifier Length Ptr 1 0 it was a base Type int source Start return Type source Start int source End return Type source End return Type Type Reference base Type Reference base Type dims return Type source Start source Start return Type source End source End md return Type return Type else md return Type this copy Dims md return Type dims if this current Token Token NameLBRACE md body Start this end Position 1 recovery if this current Element null this last Check Point md body Start  consumeMethodHeaderExtendedDims MethodHeaderExtendedDims returnType MethodDeclaration MethodDeclaration astStack astPtr extendedDims intStack intPtr extendedDims TypeReference returnType returnType sourceEnd endPosition returnType extendedDims baseType baseType identifierLengthStack identifierLengthPtr baseType sourceStart returnType sourceStart sourceEnd returnType sourceEnd returnType TypeReference baseTypeReference baseType returnType sourceStart sourceStart returnType sourceEnd sourceEnd returnType returnType returnType copyDims returnType currentToken TokenNameLBRACE bodyStart endPosition currentElement lastCheckPoint bodyStart
protected void consume Method Header Name Method Header Name Modifiersopt Type Identifier Method Declaration md new Method Declaration this compilation Unit compilation Result name md selector this identifier Stack this identifier Ptr long selector Source this identifier Position Stack this identifier Ptr this identifier Length Ptr type md return Type get Type Reference this int Stack this int Ptr modifiers md declaration Source Start this int Stack this int Ptr md modifiers this int Stack this int Ptr javadoc md javadoc this javadoc this javadoc null highlight starts at selector start md source Start int selector Source 32 push On Ast Stack md md source End this l Paren Pos md body Start this l Paren Pos 1 this list Length 0 initialize list Length before reading parameters throws recovery if this current Element null if this current Element instanceof Recovered Type md modifiers 0 this scanner get Line Number md return Type source Start this scanner get Line Number md source Start this last Check Point md body Start this current Element this current Element add md 0 this last Ignored Token 1 else this last Check Point md source Start this restart Recovery true  consumeMethodHeaderName MethodHeaderName MethodDeclaration MethodDeclaration compilationUnit compilationResult identifierStack identifierPtr selectorSource identifierPositionStack identifierPtr identifierLengthPtr returnType getTypeReference intStack intPtr declarationSourceStart intStack intPtr intStack intPtr sourceStart selectorSource pushOnAstStack sourceEnd lParenPos bodyStart lParenPos listLength listLength currentElement currentElement RecoveredType getLineNumber returnType sourceStart getLineNumber sourceStart lastCheckPoint bodyStart currentElement currentElement lastIgnoredToken lastCheckPoint sourceStart restartRecovery
protected void consume Method Header Parameters Method Header Parameters Formal Parameter Listopt int length this ast Length Stack this ast Length Ptr this ast Ptr length Abstract Method Declaration md Abstract Method Declaration this ast Stack this ast Ptr md source End this r Paren Pos arguments if length 0 System arraycopy this ast Stack this ast Ptr 1 md arguments new Argument length 0 length md body Start this r Paren Pos 1 this list Length 0 reset list Length after having read all parameters recovery if this current Element null this last Check Point md body Start if this current Element parse Tree md return might not have been attached yet in some constructor scenarii if md is Constructor if length 0 this current Token Token NameLBRACE this current Token Token Namethrows this current Element this current Element add md 0 this last Ignored Token 1  consumeMethodHeaderParameters MethodHeaderParameters FormalParameterListopt astLengthStack astLengthPtr astPtr AbstractMethodDeclaration AbstractMethodDeclaration astStack astPtr sourceEnd rParenPos astStack astPtr bodyStart rParenPos listLength listLength currentElement lastCheckPoint bodyStart currentElement parseTree isConstructor currentToken TokenNameLBRACE currentToken TokenNamethrows currentElement currentElement lastIgnoredToken
protected void consume Method Header Throws Clause Method Header Throws Clause throws Class Type List int length this ast Length Stack this ast Length Ptr this ast Ptr length Abstract Method Declaration md Abstract Method Declaration this ast Stack this ast Ptr System arraycopy this ast Stack this ast Ptr 1 md thrown Exceptions new Type Reference length 0 length md source End md thrown Exceptions length 1 source End md body Start md thrown Exceptions length 1 source End 1 this list Length 0 reset list Length after having read all thrown exceptions recovery if this current Element null this last Check Point md body Start  consumeMethodHeaderThrowsClause MethodHeaderThrowsClause ClassTypeList astLengthStack astLengthPtr astPtr AbstractMethodDeclaration AbstractMethodDeclaration astStack astPtr astStack astPtr thrownExceptions TypeReference sourceEnd thrownExceptions sourceEnd bodyStart thrownExceptions sourceEnd listLength listLength currentElement lastCheckPoint bodyStart
protected void consume Method Invocation Name Method Invocation Name Argument Listopt when the name is only an identifier we have a message send to this implicit Message Send m new Message Send m source End this r Paren Pos m source Start int m name Source Position this identifier Position Stack this identifier Ptr 32 m selector this identifier Stack this identifier Ptr if this identifier Length Stack this identifier Length Ptr 1 m receiver This Reference implicit This this identifier Length Ptr else this identifier Length Stack this identifier Length Ptr m receiver get Unspecified Reference m source Start m receiver source Start push On Expression Stack m  consumeMethodInvocationName MethodInvocation ArgumentListopt MessageSend newMessageSend sourceEnd rParenPos sourceStart nameSourcePosition identifierPositionStack identifierPtr identifierStack identifierPtr identifierLengthStack identifierLengthPtr ThisReference implicitThis identifierLengthPtr identifierLengthStack identifierLengthPtr getUnspecifiedReference sourceStart sourceStart pushOnExpressionStack
protected void consume Method Invocation Primary optimize the push pop Method Invocation Primary Identifier Argument Listopt Message Send m new Message Send m source Start int m name Source Position this identifier Position Stack this identifier Ptr 32 m selector this identifier Stack this identifier Ptr this identifier Length Ptr m receiver this expression Stack this expression Ptr m source Start m receiver source Start m source End this r Paren Pos this expression Stack this expression Ptr m  consumeMethodInvocationPrimary MethodInvocation ArgumentListopt MessageSend newMessageSend sourceStart nameSourcePosition identifierPositionStack identifierPtr identifierStack identifierPtr identifierLengthPtr expressionStack expressionPtr sourceStart sourceStart sourceEnd rParenPos expressionStack expressionPtr
protected void consume Method Invocation Super Method Invocation super Identifier Argument Listopt Message Send m new Message Send m source Start this int Stack this int Ptr m source End this r Paren Pos m name Source Position this identifier Position Stack this identifier Ptr m selector this identifier Stack this identifier Ptr this identifier Length Ptr m receiver new Super Reference m source Start this end Position push On Expression Stack m  consumeMethodInvocationSuper MethodInvocation ArgumentListopt MessageSend newMessageSend sourceStart intStack intPtr sourceEnd rParenPos nameSourcePosition identifierPositionStack identifierPtr identifierStack identifierPtr identifierLengthPtr SuperReference sourceStart endPosition pushOnExpressionStack
protected void consume Modifiers int saved Modifiers Source Start this modifiers Source Start check Comment might update modifiers with Acc Deprecated push On Int Stack this modifiers modifiers if this modifiers Source Start saved Modifiers Source Start this modifiers Source Start saved Modifiers Source Start push On Int Stack this modifiers Source Start reset Modifiers  consumeModifiers savedModifiersSourceStart modifiersSourceStart checkComment AccDeprecated pushOnIntStack modifiersSourceStart savedModifiersSourceStart modifiersSourceStart savedModifiersSourceStart pushOnIntStack modifiersSourceStart resetModifiers
protected void consume Nested Method Nested Method empty jump Over Method Body this nested Method this nested Type push On Int Stack this scanner current Position consume Open Block  consumeNestedMethod NestedMethod jumpOverMethodBody nestedMethod nestedType pushOnIntStack currentPosition consumeOpenBlock
protected void consume Nested Type Nested Type empty int length this nested Method length if this nested Type length System arraycopy this nested Method 0 this nested Method new int length 30 0 length increase the size of the variables Counter as well It has to be consistent with the size of the nested Method collection System arraycopy this variables Counter 0 this variables Counter new int length 30 0 length this nested Method this nested Type 0 this variables Counter this nested Type 0  consumeNestedType NestedType nestedMethod nestedType nestedMethod nestedMethod variablesCounter nestedMethod variablesCounter variablesCounter nestedMethod nestedType variablesCounter nestedType
this variables Counter this nested Type 0 protected void consume One Dim Loop One Dim Loop this dimensions  variablesCounter nestedType consumeOneDimLoop OneDimLoop
protected void consume Only Synchronized Only Synchronized synchronized push On Int Stack this synchronized Block Source Start reset Modifiers  consumeOnlySynchronized OnlySynchronized pushOnIntStack synchronizedBlockSourceStart resetModifiers
protected void consume Open Block Open Block empty push On Int Stack this scanner start Position int stack Length this real Block Stack length if this real Block Ptr stack Length System arraycopy this real Block Stack 0 this real Block Stack new int stack Length Stack Increment 0 stack Length this real Block Stack this real Block Ptr 0  consumeOpenBlock OpenBlock pushOnIntStack startPosition stackLength realBlockStack realBlockPtr stackLength realBlockStack realBlockStack stackLength StackIncrement stackLength realBlockStack realBlockPtr
protected void consume Package Declaration Package Declaration package Name build an Import Ref build from the last name stored in the identifier stack Import Reference impt this compilation Unit current Package flush comments defined prior to import statements impt declaration End this end Statement Position impt declaration Source End this flush Comments Defined Prior To impt declaration Source End  consumePackageDeclaration PackageDeclaration ImportRef ImportReference compilationUnit currentPackage declarationEnd endStatementPosition declarationSourceEnd flushCommentsDefinedPriorTo declarationSourceEnd
protected void consume Package Declaration Name Package Declaration Name package Name build an Import Ref build from the last name stored in the identifier stack Import Reference impt int length char tokens new char length this identifier Length Stack this identifier Length Ptr this identifier Ptr length long positions new long length System arraycopy this identifier Stack this identifier Ptr tokens 0 length System arraycopy this identifier Position Stack this identifier Ptr positions 0 length this compilation Unit current Package impt new Import Reference tokens positions true Acc Default if this current Token Token NameSEMICOLON impt declaration Source End this scanner current Position 1 else impt declaration Source End impt source End impt declaration End impt declaration Source End end Position is just before the impt declaration Source Start this int Stack this int Ptr recovery if this current Element null this last Check Point impt declaration Source End 1 this restart Recovery true used to avoid branching back into the regular automaton  consumePackageDeclarationName PackageDeclarationName ImportRef ImportReference identifierLengthStack identifierLengthPtr identifierPtr identifierStack identifierPtr identifierPositionStack identifierPtr compilationUnit currentPackage ImportReference AccDefault currentToken TokenNameSEMICOLON declarationSourceEnd currentPosition declarationSourceEnd sourceEnd declarationEnd declarationSourceEnd endPosition declarationSourceStart intStack intPtr currentElement lastCheckPoint declarationSourceEnd restartRecovery
protected void consume Postfix Expression Postfix Expression Name push On Expression Stack get Unspecified Reference Optimized  consumePostfixExpression PostfixExpression pushOnExpressionStack getUnspecifiedReferenceOptimized
protected void consume Primary No New Array Primary No New Array PushLPAREN Expression PushRPAREN final Expression parenthesized Expression this expression Stack this expression Ptr update Source Position parenthesized Expression int number Of Parenthesis parenthesized Expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT parenthesized Expression bits AST Node ParenthesizedMASK parenthesized Expression bits number Of Parenthesis 1 AST Node ParenthesizedSHIFT  consumePrimaryNoNewArray PrimaryNoNewArray parenthesizedExpression expressionStack expressionPtr updateSourcePosition parenthesizedExpression numberOfParenthesis parenthesizedExpression ASTNode ASTNode parenthesizedExpression ASTNode parenthesizedExpression numberOfParenthesis ASTNode
protected void consume Primary No New Array Array Type Primary No New Array Array Type class this int Ptr push On Expression Stack new Class Literal Access this int Stack this int Ptr get Type Reference this int Stack this int Ptr  consumePrimaryNoNewArrayArrayType PrimaryNoNewArray ArrayType intPtr pushOnExpressionStack ClassLiteralAccess intStack intPtr getTypeReference intStack intPtr
protected void consume Primary No New Array Name Primary No New Array Name class this int Ptr push On Expression Stack new Class Literal Access this int Stack this int Ptr get Type Reference 0  consumePrimaryNoNewArrayName PrimaryNoNewArray intPtr pushOnExpressionStack ClassLiteralAccess intStack intPtr getTypeReference
protected void consume Primary No New Array Name Super Primary No New Array Name super push On Expression Stack new Qualified Super Reference get Type Reference 0 this int Stack this int Ptr this end Position  consumePrimaryNoNewArrayNameSuper PrimaryNoNewArray pushOnExpressionStack QualifiedSuperReference getTypeReference intStack intPtr endPosition
protected void consume Primary No New Array Name This Primary No New Array Name this push On Expression Stack new Qualified This Reference get Type Reference 0 this int Stack this int Ptr this end Position  consumePrimaryNoNewArrayNameThis PrimaryNoNewArray pushOnExpressionStack QualifiedThisReference getTypeReference intStack intPtr endPosition
protected void consume Primary No New Array Primitive Type Primary No New Array Primitive Type class this int Ptr push On Expression Stack new Class Literal Access this int Stack this int Ptr get Type Reference 0  consumePrimaryNoNewArrayPrimitiveType PrimaryNoNewArray PrimitiveType intPtr pushOnExpressionStack ClassLiteralAccess intStack intPtr getTypeReference
get Type Reference 0 protected void consume Primary No New Array This Primary No New Array this push On Expression Stack new This Reference this int Stack this int Ptr this end Position  getTypeReference consumePrimaryNoNewArrayThis PrimaryNoNewArray pushOnExpressionStack ThisReference intStack intPtr endPosition
push On Expression Stack new This Reference this int Stack this int Ptr this end Position protected void consume Primitive Type Type Primitive Type push On Int Stack 0  pushOnExpressionStack ThisReference intStack intPtr endPosition consumePrimitiveType PrimitiveType pushOnIntStack
protected void consume Push Modifiers push On Int Stack this modifiers modifiers push On Int Stack this modifiers Source Start reset Modifiers  consumePushModifiers pushOnIntStack pushOnIntStack modifiersSourceStart resetModifiers
protected void consume Push Position for source managment purpose Push Position empty push On Int Stack this end Position  consumePushPosition PushPosition pushOnIntStack endPosition
protected void consume Qualified Name Qualified Name Name Simple Name back from the recursive loop of Qualified Name Updates identifier length into the length stack this identifier Length Stack this identifier Length Ptr  consumeQualifiedName QualifiedName SimpleName QualifiedName identifierLengthStack identifierLengthPtr
this identifier Length Stack this identifier Length Ptr protected void consume Reference Type Reference Type Class Or Interface Type push On Int Stack 0  identifierLengthStack identifierLengthPtr consumeReferenceType ReferenceType ClassOrInterfaceType pushOnIntStack
push On Int Stack 0 protected void consume Restore Diet Restore Diet empty this diet Int  pushOnIntStack consumeRestoreDiet RestoreDiet dietInt
this diet Int protected void consume Right Paren PushRPAREN push On Int Stack this r Paren Pos  dietInt consumeRightParen pushOnIntStack rParenPos
This method is part of an automatic generation do NOT edit modify protected void consume Rule int act switch act case 26 System out println Type Primitive Type NON NLS 1 consume Primitive Type break case 40 System out println Reference Type Class Or Interface Type NON NLS 1 consume Reference Type break case 49 System out println Qualified Name Name DOT Simple Name NON NLS 1 consume Qualified Name break case 50 System out println Compilation Unit Enter Compilation Unit Package Declarationopt NON NLS 1 consume Compilation Unit break case 51 System out println Enter Compilation Unit NON NLS 1 consume Enter Compilation Unit break case 64 System out println Catch Header catch LPAREN Formal Parameter RPAREN LBRACE NON NLS 1 consume Catch Header break case 66 System out println Import Declarations Import Declarations Import Declaration NON NLS 1 consume Import Declarations break case 68 System out println Type Declarations Type Declarations Type Declaration NON NLS 1 consume Type Declarations break case 69 System out println Package Declaration Package Declaration Name SEMICOLON NON NLS 1 consume Package Declaration break case 70 System out println Package Declaration Name package Name NON NLS 1 consume Package Declaration Name break case 73 System out println Single Type Import Declaration Single Type Import Declaration Name NON NLS 1 consume Single Type Import Declaration break case 74 System out println Single Type Import Declaration Name import Name NON NLS 1 consume Single Type Import Declaration Name break case 75 System out println Type Import On Demand Declaration Type Import On Demand Declaration Name NON NLS 1 consume Type Import On Demand Declaration break case 76 System out println Type Import On Demand Declaration Name import Name DOT MULTIPLY NON NLS 1 consume Type Import On Demand Declaration Name break case 79 System out println Type Declaration SEMICOLON NON NLS 1 consume Empty Type Declaration break case 93 System out println Class Declaration Class Header Class Body NON NLS 1 consume Class Declaration break case 94 System out println Class Header Class Header Name Class Header Extendsopt NON NLS 1 consume Class Header break case 95 System out println Class Header Name Modifiersopt class Identifier NON NLS 1 consume Class Header Name break case 96 System out println Class Header Extends extends Class Type NON NLS 1 consume Class Header Extends break case 97 System out println Class Header Implements implements Interface Type List NON NLS 1 consume Class Header Implements break case 99 System out println Interface Type List Interface Type List COMMA Interface Type NON NLS 1 consume Interface Type List break case 100 System out println Interface Type Class Or Interface Type NON NLS 1 consume Interface Type break case 103 System out println Class Body Declarations Class Body Declarations Class Body Declaration NON NLS 1 consume Class Body Declarations break case 107 System out println Class Body Declaration Diet Nested Method Block NON NLS 1 consume Class Body Declaration break case 108 System out println Diet NON NLS 1 consume Diet break case 109 System out println Initializer Diet Nested Method Block NON NLS 1 consume Class Body Declaration break case 116 System out println Class Member Declaration SEMICOLON NON NLS 1 consume Empty Class Member Declaration break case 117 System out println Field Declaration Modifiersopt Type Variable Declarators SEMICOLON NON NLS 1 consume Field Declaration break case 119 System out println Variable Declarators Variable Declarators COMMA Variable Declarator NON NLS 1 consume Variable Declarators break case 122 System out println Enter Variable NON NLS 1 consume Enter Variable break case 123 System out println Exit Variable With Initialization NON NLS 1 consume Exit Variable With Initialization break case 124 System out println Exit Variable Without Initialization NON NLS 1 consume Exit Variable Without Initialization break case 125 System out println Force No Diet NON NLS 1 consume Force No Diet break case 126 System out println Restore Diet NON NLS 1 consume Restore Diet break case 131 System out println Method Declaration Method Header Method Body NON NLS 1 set to true to consume a method with a body consume Method Declaration true break case 132 System out println Abstract Method Declaration Method Header SEMICOLON NON NLS 1 set to false to consume a method without body consume Method Declaration false break case 133 System out println Method Header Method Header Name Method Header Parameters NON NLS 1 consume Method Header break case 134 System out println Method Header Name Modifiersopt Type Identifier LPAREN NON NLS 1 consume Method Header Name break case 135 System out println Method Header Parameters Formal Parameter Listopt RPAREN NON NLS 1 consume Method Header Parameters break case 136 System out println Method Header Extended Dims Dimsopt NON NLS 1 consume Method Header Extended Dims break case 137 System out println Method Header Throws Clause throws Class Type List NON NLS 1 consume Method Header Throws Clause break case 138 System out println Constructor Header Constructor Header Name Method Header Parameters NON NLS 1 consume Constructor Header break case 139 System out println Constructor Header Name Modifiersopt Identifier LPAREN NON NLS 1 consume Constructor Header Name break case 141 System out println Formal Parameter List Formal Parameter List COMMA Formal Parameter NON NLS 1 consume Formal Parameter List break case 142 System out println Formal Parameter Modifiersopt Type Variable Declarator Id NON NLS 1 the boolean is used to know if the modifiers should be reset consume Formal Parameter break case 144 System out println Class Type List Class Type List COMMA Class Type Elt NON NLS 1 consume Class Type List break case 145 System out println Class Type Elt Class Type NON NLS 1 consume Class Type Elt break case 146 System out println Method Body Nested Method LBRACE Block Statementsopt RBRACE NON NLS 1 consume Method Body break case 147 System out println Nested Method NON NLS 1 consume Nested Method break case 148 System out println Static Initializer Static Only Block NON NLS 1 consume Static Initializer break case 149 System out println Static Only static NON NLS 1 consume Static Only break case 150 System out println Constructor Declaration Constructor Header Method Body NON NLS 1 consume Constructor Declaration break case 151 System out println Constructor Declaration Constructor Header SEMICOLON NON NLS 1 consume Invalid Constructor Declaration break case 152 System out println Explicit Constructor Invocation this LPAREN Argument Listopt RPAREN NON NLS 1 consume Explicit Constructor Invocation 0 Explicit Constructor Call This break case 153 System out println Explicit Constructor Invocation super LPAREN Argument Listopt NON NLS 1 consume Explicit Constructor Invocation 0 Explicit Constructor Call Super break case 154 System out println Explicit Constructor Invocation Primary DOT super LPAREN NON NLS 1 consume Explicit Constructor Invocation 1 Explicit Constructor Call Super break case 155 System out println Explicit Constructor Invocation Name DOT super LPAREN NON NLS 1 consume Explicit Constructor Invocation 2 Explicit Constructor Call Super break case 156 System out println Explicit Constructor Invocation Primary DOT this LPAREN NON NLS 1 consume Explicit Constructor Invocation 1 Explicit Constructor Call This break case 157 System out println Explicit Constructor Invocation Name DOT this LPAREN NON NLS 1 consume Explicit Constructor Invocation 2 Explicit Constructor Call This break case 158 System out println Interface Declaration Interface Header Interface Body NON NLS 1 consume Interface Declaration break case 159 System out println Interface Header Interface Header Name Interface Header Extendsopt NON NLS 1 consume Interface Header break case 160 System out println Interface Header Name Modifiersopt interface Identifier NON NLS 1 consume Interface Header Name break case 162 System out println Interface Header Extends extends Interface Type List NON NLS 1 consume Interface Header Extends break case 165 System out println Interface Member Declarations Interface Member Declarations NON NLS 1 consum consumeRule PrimitiveType consumePrimitiveType ReferenceType ClassOrInterfaceType consumeReferenceType QualifiedName SimpleName consumeQualifiedName CompilationUnit EnterCompilationUnit PackageDeclarationopt consumeCompilationUnit EnterCompilationUnit consumeEnterCompilationUnit CatchHeader FormalParameter consumeCatchHeader ImportDeclarations ImportDeclarations ImportDeclaration consumeImportDeclarations TypeDeclarations TypeDeclarations TypeDeclaration consumeTypeDeclarations PackageDeclaration PackageDeclarationName consumePackageDeclaration PackageDeclarationName consumePackageDeclarationName SingleTypeImportDeclaration SingleTypeImportDeclarationName consumeSingleTypeImportDeclaration SingleTypeImportDeclarationName consumeSingleTypeImportDeclarationName TypeImportOnDemandDeclaration TypeImportOnDemandDeclarationName consumeTypeImportOnDemandDeclaration TypeImportOnDemandDeclarationName consumeTypeImportOnDemandDeclarationName TypeDeclaration consumeEmptyTypeDeclaration ClassDeclaration ClassHeader ClassBody consumeClassDeclaration ClassHeader ClassHeaderName ClassHeaderExtendsopt consumeClassHeader ClassHeaderName consumeClassHeaderName ClassHeaderExtends ClassType consumeClassHeaderExtends ClassHeaderImplements InterfaceTypeList consumeClassHeaderImplements InterfaceTypeList InterfaceTypeList InterfaceType consumeInterfaceTypeList InterfaceType ClassOrInterfaceType consumeInterfaceType ClassBodyDeclarations ClassBodyDeclarations ClassBodyDeclaration consumeClassBodyDeclarations ClassBodyDeclaration NestedMethod consumeClassBodyDeclaration consumeDiet NestedMethod consumeClassBodyDeclaration ClassMemberDeclaration consumeEmptyClassMemberDeclaration FieldDeclaration VariableDeclarators consumeFieldDeclaration VariableDeclarators VariableDeclarators VariableDeclarator consumeVariableDeclarators EnterVariable consumeEnterVariable ExitVariableWithInitialization consumeExitVariableWithInitialization ExitVariableWithoutInitialization consumeExitVariableWithoutInitialization ForceNoDiet consumeForceNoDiet RestoreDiet consumeRestoreDiet MethodDeclaration MethodHeader MethodBody consumeMethodDeclaration AbstractMethodDeclaration MethodHeader consumeMethodDeclaration MethodHeader MethodHeaderName MethodHeaderParameters consumeMethodHeader MethodHeaderName consumeMethodHeaderName MethodHeaderParameters FormalParameterListopt consumeMethodHeaderParameters MethodHeaderExtendedDims consumeMethodHeaderExtendedDims MethodHeaderThrowsClause ClassTypeList consumeMethodHeaderThrowsClause ConstructorHeader ConstructorHeaderName MethodHeaderParameters consumeConstructorHeader ConstructorHeaderName consumeConstructorHeaderName FormalParameterList FormalParameterList FormalParameter consumeFormalParameterList FormalParameter VariableDeclaratorId consumeFormalParameter ClassTypeList ClassTypeList ClassTypeElt consumeClassTypeList ClassTypeElt ClassType consumeClassTypeElt MethodBody NestedMethod BlockStatementsopt consumeMethodBody NestedMethod consumeNestedMethod StaticInitializer StaticOnly consumeStaticInitializer StaticOnly consumeStaticOnly ConstructorDeclaration ConstructorHeader MethodBody consumeConstructorDeclaration ConstructorDeclaration ConstructorHeader consumeInvalidConstructorDeclaration ExplicitConstructorInvocation ArgumentListopt consumeExplicitConstructorInvocation ExplicitConstructorCall ExplicitConstructorInvocation ArgumentListopt consumeExplicitConstructorInvocation ExplicitConstructorCall ExplicitConstructorInvocation consumeExplicitConstructorInvocation ExplicitConstructorCall ExplicitConstructorInvocation consumeExplicitConstructorInvocation ExplicitConstructorCall ExplicitConstructorInvocation consumeExplicitConstructorInvocation ExplicitConstructorCall ExplicitConstructorInvocation consumeExplicitConstructorInvocation ExplicitConstructorCall InterfaceDeclaration InterfaceHeader InterfaceBody consumeInterfaceDeclaration InterfaceHeader InterfaceHeaderName InterfaceHeaderExtendsopt consumeInterfaceHeader InterfaceHeaderName consumeInterfaceHeaderName InterfaceHeaderExtends InterfaceTypeList consumeInterfaceHeaderExtends InterfaceMemberDeclarations InterfaceMemberDeclarations
protected void consume Simple Assert Statement Assert Statement assert Expression this expression Length Ptr push On Ast Stack new Assert Statement this expression Stack this expression Ptr this int Stack this int Ptr  consumeSimpleAssertStatement AssertStatement expressionLengthPtr pushOnAstStack AssertStatement expressionStack expressionPtr intStack intPtr
protected void consume Single Type Import Declaration Single Type Import Declaration Single Type Import Declaration Name Import Reference impt Import Reference this ast Stack this ast Ptr flush comments defined prior to import statements impt declaration End this end Statement Position impt declaration Source End this flush Comments Defined Prior To impt declaration Source End recovery if this current Element null this last Check Point impt declaration Source End 1 this current Element this current Element add impt 0 this last Ignored Token 1 this restart Recovery true used to avoid branching back into the regular automaton  consumeSingleTypeImportDeclaration SingleTypeImportDeclaration SingleTypeImportDeclarationName ImportReference ImportReference astStack astPtr declarationEnd endStatementPosition declarationSourceEnd flushCommentsDefinedPriorTo declarationSourceEnd currentElement lastCheckPoint declarationSourceEnd currentElement currentElement lastIgnoredToken restartRecovery
protected void consume Single Type Import Declaration Name Single Type Import Declaration Name import Name push an Import Ref build from the last name stored in the identifier stack Import Reference impt int length char tokens new char length this identifier Length Stack this identifier Length Ptr this identifier Ptr length long positions new long length System arraycopy this identifier Stack this identifier Ptr 1 tokens 0 length System arraycopy this identifier Position Stack this identifier Ptr 1 positions 0 length push On Ast Stack impt new Import Reference tokens positions false Acc Default if this current Token Token NameSEMICOLON impt declaration Source End this scanner current Position 1 else impt declaration Source End impt source End impt declaration End impt declaration Source End end Position is just before the impt declaration Source Start this int Stack this int Ptr recovery if this current Element null this last Check Point impt declaration Source End 1 this current Element this current Element add impt 0 this last Ignored Token 1 this restart Recovery true used to avoid branching back into the regular automaton  consumeSingleTypeImportDeclarationName SingleTypeImportDeclarationName ImportRef ImportReference identifierLengthStack identifierLengthPtr identifierPtr identifierStack identifierPtr identifierPositionStack identifierPtr pushOnAstStack ImportReference AccDefault currentToken TokenNameSEMICOLON declarationSourceEnd currentPosition declarationSourceEnd sourceEnd declarationEnd declarationSourceEnd endPosition declarationSourceStart intStack intPtr currentElement lastCheckPoint declarationSourceEnd currentElement currentElement lastIgnoredToken restartRecovery
protected void consume Statement Break Break Statement break break pushs a position on int Stack in case there is no label push On Ast Stack new Break Statement null this int Stack this int Ptr this end Position  consumeStatementBreak BreakStatement intStack pushOnAstStack BreakStatement intStack intPtr endPosition
protected void consume Statement Break With Label Break Statement break Identifier break pushs a position on int Stack in case there is no label push On Ast Stack new Break Statement this identifier Stack this identifier Ptr this int Stack this int Ptr this end Position this identifier Length Ptr  consumeStatementBreakWithLabel BreakStatement intStack pushOnAstStack BreakStatement identifierStack identifierPtr intStack intPtr endPosition identifierLengthPtr
protected void consume Statement Catch Catch Clause catch Formal Parameter Block catch are stored directly into the Try has they always comes two by two we remove one entry from the astlength Ptr The construction of the try statement must then fetch the catches using 2 i and 2 i 1 this ast Length Ptr this list Length 0 reset formal Parameter counter incremented for catch variable  consumeStatementCatch CatchClause FormalParameter astlengthPtr astLengthPtr listLength formalParameter
protected void consume Statement Continue Continue Statement continue continue pushs a position on int Stack in case there is no label push On Ast Stack new Continue Statement null this int Stack this int Ptr this end Position  consumeStatementContinue ContinueStatement intStack pushOnAstStack ContinueStatement intStack intPtr endPosition
protected void consume Statement Continue With Label Continue Statement continue Identifier continue pushs a position on int Stack in case there is no label push On Ast Stack new Continue Statement this identifier Stack this identifier Ptr this int Stack this int Ptr this end Position this identifier Length Ptr  consumeStatementContinueWithLabel ContinueStatement intStack pushOnAstStack ContinueStatement identifierStack identifierPtr intStack intPtr endPosition identifierLengthPtr
protected void consume Statement Do Do Statement do Statement while Expression the while pushes a value on int Stack that we need to remove this int Ptr Statement statement Statement this ast Stack this ast Ptr this expression Length Ptr this ast Stack this ast Ptr new Do Statement this expression Stack this expression Ptr statement this int Stack this int Ptr this end Position  consumeStatementDo DoStatement intStack intPtr astStack astPtr expressionLengthPtr astStack astPtr DoStatement expressionStack expressionPtr intStack intPtr endPosition
this end Position protected void consume Statement Expression List Statement Expression List Statement Expression List Statement Expression concat Expression Lists  endPosition consumeStatementExpressionList StatementExpressionList StatementExpressionList StatementExpression concatExpressionLists
protected void consume Statement For For Statement for For Initopt Expressionopt For Updateopt Statement For Statement No Short If for For Initopt Expressionopt For Updateopt Statement No Short If int length Expression cond null Statement inits updates boolean scope true statements this ast Length Ptr Statement statement Statement this ast Stack this ast Ptr updates are on the expresion stack if length this expression Length Stack this expression Length Ptr 0 updates null else this expression Ptr length System arraycopy this expression Stack this expression Ptr 1 updates new Statement length 0 length if this expression Length Stack this expression Length Ptr 0 cond this expression Stack this expression Ptr inits may be on two different stacks if length this ast Length Stack this ast Length Ptr 0 inits null scope false else if length 1 on expression Stack scope false length this expression Length Stack this expression Length Ptr this expression Ptr length System arraycopy this expression Stack this expression Ptr 1 inits new Statement length 0 length else on ast Stack this ast Ptr length System arraycopy this ast Stack this ast Ptr 1 inits new Statement length 0 length push On Ast Stack new For Statement inits cond updates statement scope this int Stack this int Ptr this end Statement Position  consumeStatementFor ForStatement ForInitopt ForUpdateopt ForStatementNoShortIf ForInitopt ForUpdateopt StatementNoShortIf astLengthPtr astStack astPtr expressionLengthStack expressionLengthPtr expressionPtr expressionStack expressionPtr expressionLengthStack expressionLengthPtr expressionStack expressionPtr astLengthStack astLengthPtr expressionStack expressionLengthStack expressionLengthPtr expressionPtr expressionStack expressionPtr astStack astPtr astStack astPtr pushOnAstStack ForStatement intStack intPtr endStatementPosition
protected void consume Statement If No Else If Then Statement if Expression Statement optimize the push pop this expression Length Ptr Statement then Statement Statement this ast Stack this ast Ptr this ast Stack this ast Ptr new If Statement this expression Stack this expression Ptr then Statement this int Stack this int Ptr this end Statement Position  consumeStatementIfNoElse IfThenStatement expressionLengthPtr thenStatement astStack astPtr astStack astPtr IfStatement expressionStack expressionPtr thenStatement intStack intPtr endStatementPosition
protected void consume Statement If With Else If Then Else Statement if Expression Statement No Short If else Statement If Then Else Statement No Short If if Expression Statement No Short If else Statement No Short If this expression Length Ptr optimized Then Else If this ast Length Ptr optimize the push pop this ast Stack this ast Ptr new If Statement this expression Stack this expression Ptr Statement this ast Stack this ast Ptr Statement this ast Stack this ast Ptr 1 this int Stack this int Ptr this end Statement Position  consumeStatementIfWithElse IfThenElseStatement StatementNoShortIf IfThenElseStatementNoShortIf StatementNoShortIf StatementNoShortIf expressionLengthPtr astLengthPtr astStack astPtr IfStatement expressionStack expressionPtr astStack astPtr astStack astPtr intStack intPtr endStatementPosition
protected void consume Statement Label Labeled Statement Identifier Statement Labeled Statement No Short If Identifier Statement No Short If optimize push pop Statement stmt Statement this ast Stack this ast Ptr this ast Stack this ast Ptr new Labeled Statement this identifier Stack this identifier Ptr stmt int this identifier Position Stack this identifier Ptr 32 this end Statement Position this identifier Length Ptr  consumeStatementLabel LabeledStatement LabeledStatementNoShortIf StatementNoShortIf astStack astPtr astStack astPtr LabeledStatement identifierStack identifierPtr identifierPositionStack identifierPtr endStatementPosition identifierLengthPtr
protected void consume Statement Return Return Statement return Expressionopt return pushs a position on int Stack in case there is no expression if this expression Length Stack this expression Length Ptr 0 push On Ast Stack new Return Statement this expression Stack this expression Ptr this int Stack this int Ptr this end Position else push On Ast Stack new Return Statement null this int Stack this int Ptr this end Position  consumeStatementReturn ReturnStatement intStack expressionLengthStack expressionLengthPtr pushOnAstStack ReturnStatement expressionStack expressionPtr intStack intPtr endPosition pushOnAstStack ReturnStatement intStack intPtr endPosition
protected void consume Statement Switch Switch Statement switch Open Block Expression Switch Block Open Block just makes the semantic action block Start the block is inlined but a scope need to be created if some declaration occurs int length Switch Statement switch Statement new Switch Statement this expression Length Ptr switch Statement expression this expression Stack this expression Ptr if length this ast Length Stack this ast Length Ptr 0 this ast Ptr length System arraycopy this ast Stack this ast Ptr 1 switch Statement statements new Statement length 0 length switch Statement explicit Declarations this real Block Stack this real Block Ptr push On Ast Stack switch Statement switch Statement block Start this int Stack this int Ptr switch Statement source Start this int Stack this int Ptr switch Statement source End this end Statement Position if length 0 contains Comment switch Statement block Start switch Statement source End switch Statement bits AST Node Undocumented Empty BlockMASK  consumeStatementSwitch SwitchStatement OpenBlock SwitchBlock OpenBlock blockStart SwitchStatement switchStatement SwitchStatement expressionLengthPtr switchStatement expressionStack expressionPtr astLengthStack astLengthPtr astPtr astStack astPtr switchStatement switchStatement explicitDeclarations realBlockStack realBlockPtr pushOnAstStack switchStatement switchStatement blockStart intStack intPtr switchStatement sourceStart intStack intPtr switchStatement sourceEnd endStatementPosition containsComment switchStatement blockStart switchStatement sourceEnd switchStatement ASTNode UndocumentedEmptyBlockMASK
protected void consume Statement Synchronized Synchronized Statement Only Synchronized Expression Block optimize the push pop if this ast Length Stack this ast Length Ptr 0 this ast Length Stack this ast Length Ptr 1 this expression Length Ptr this ast Stack this ast Ptr new Synchronized Statement this expression Stack this expression Ptr null this int Stack this int Ptr this end Statement Position else this expression Length Ptr this ast Stack this ast Ptr new Synchronized Statement this expression Stack this expression Ptr Block this ast Stack this ast Ptr this int Stack this int Ptr this end Statement Position reset Modifiers  consumeStatementSynchronized SynchronizedStatement OnlySynchronized astLengthStack astLengthPtr astLengthStack astLengthPtr expressionLengthPtr astStack astPtr SynchronizedStatement expressionStack expressionPtr intStack intPtr endStatementPosition expressionLengthPtr astStack astPtr SynchronizedStatement expressionStack expressionPtr astStack astPtr intStack intPtr endStatementPosition resetModifiers
protected void consume Statement Throw Throw Statement throw Expression this expression Length Ptr push On Ast Stack new Throw Statement this expression Stack this expression Ptr this int Stack this int Ptr  consumeStatementThrow ThrowStatement expressionLengthPtr pushOnAstStack ThrowStatement expressionStack expressionPtr intStack intPtr
protected void consume Statement Try boolean with Finally Try Statement try Block Catches Try Statement try Block Catchesopt Finally int length Try Statement try Stmt new Try Statement finally if with Finally this ast Length Ptr try Stmt finally Block Block this ast Stack this ast Ptr catches are handle by two argument block see statement Catch if length this ast Length Stack this ast Length Ptr 0 if length 1 try Stmt catch Blocks new Block Block this ast Stack this ast Ptr try Stmt catch Arguments new Argument Argument this ast Stack this ast Ptr else Block bks try Stmt catch Blocks new Block length Argument args try Stmt catch Arguments new Argument length while length 0 bks length Block this ast Stack this ast Ptr args length Argument this ast Stack this ast Ptr try this ast Length Ptr try Stmt try Block Block this ast Stack this ast Ptr positions try Stmt source End this end Statement Position try Stmt source Start this int Stack this int Ptr push On Ast Stack try Stmt  consumeStatementTry withFinally TryStatement TryStatement TryStatement tryStmt TryStatement withFinally astLengthPtr tryStmt finallyBlock astStack astPtr statementCatch astLengthStack astLengthPtr tryStmt catchBlocks astStack astPtr tryStmt catchArguments astStack astPtr tryStmt catchBlocks tryStmt catchArguments astStack astPtr astStack astPtr astLengthPtr tryStmt tryBlock astStack astPtr tryStmt sourceEnd endStatementPosition tryStmt sourceStart intStack intPtr pushOnAstStack tryStmt
protected void consume Statement While While Statement while Expression Statement While Statement No Short If while Expression Statement No Short If this expression Length Ptr Statement statement Statement this ast Stack this ast Ptr this ast Stack this ast Ptr new While Statement this expression Stack this expression Ptr statement this int Stack this int Ptr this end Statement Position  consumeStatementWhile WhileStatement WhileStatementNoShortIf StatementNoShortIf expressionLengthPtr astStack astPtr astStack astPtr WhileStatement expressionStack expressionPtr intStack intPtr endStatementPosition
protected void consume Static Initializer Static Initializer Static Only Block push an Initializer optimize the push pop Block block Block this ast Stack this ast Ptr if this diet block bits AST Node Undocumented Empty BlockMASK clear bit set since was diet Initializer initializer new Initializer block Acc Static this ast Stack this ast Ptr initializer initializer source End this end Statement Position initializer declaration Source End flush Comments Defined Prior To this end Statement Position this nested Method this nested Type initializer declaration Source Start this int Stack this int Ptr initializer body Start this int Stack this int Ptr initializer body End this end Position doc comment initializer javadoc this javadoc this javadoc null recovery if this current Element null this last Check Point initializer declaration Source End this current Element this current Element add initializer 0 this last Ignored Token 1  consumeStaticInitializer StaticInitializer StaticOnly astStack astPtr ASTNode UndocumentedEmptyBlockMASK AccStatic astStack astPtr sourceEnd endStatementPosition declarationSourceEnd flushCommentsDefinedPriorTo endStatementPosition nestedMethod nestedType declarationSourceStart intStack intPtr bodyStart intStack intPtr bodyEnd endPosition currentElement lastCheckPoint declarationSourceEnd currentElement currentElement lastIgnoredToken
protected void consume Static Only Static Only static int saved Modifiers Source Start this modifiers Source Start check Comment might update declaration source start if this modifiers Source Start saved Modifiers Source Start this modifiers Source Start saved Modifiers Source Start push On Int Stack this scanner current Position push On Int Stack this modifiers Source Start 0 this modifiers Source Start this scanner start Position jump Over Method Body this nested Method this nested Type reset Modifiers recovery if this current Element null this recovered Static Initializer Start this int Stack this int Ptr remember start position only for static initializers  consumeStaticOnly StaticOnly savedModifiersSourceStart modifiersSourceStart checkComment modifiersSourceStart savedModifiersSourceStart modifiersSourceStart savedModifiersSourceStart pushOnIntStack currentPosition pushOnIntStack modifiersSourceStart modifiersSourceStart startPosition jumpOverMethodBody nestedMethod nestedType resetModifiers currentElement recoveredStaticInitializerStart intStack intPtr
protected void consume Switch Block Switch Block Switch Block Statements Switch Labels concat Node Lists  consumeSwitchBlock SwitchBlock SwitchBlockStatements SwitchLabels concatNodeLists
concat Node Lists protected void consume Switch Block Statement Switch Block Statement Switch Labels Block Statements concat Node Lists  concatNodeLists consumeSwitchBlockStatement SwitchBlockStatement SwitchLabels BlockStatements concatNodeLists
concat Node Lists protected void consume Switch Block Statements Switch Block Statements Switch Block Statements Switch Block Statement concat Node Lists  concatNodeLists consumeSwitchBlockStatements SwitchBlockStatements SwitchBlockStatements SwitchBlockStatement concatNodeLists
concat Node Lists protected void consume Switch Labels Switch Labels Switch Labels Switch Label optimized Concat Node Lists  concatNodeLists consumeSwitchLabels SwitchLabels SwitchLabels SwitchLabel optimizedConcatNodeLists
protected void consume Token int type remember the last consumed value try to minimize the number of build values check Non Externalized String Literal clear the comment Ptr of the scanner in case we read something different from a modifier switch type case Token Nameabstract case Token Namestrictfp case Token Namefinal case Token Namenative case Token Nameprivate case Token Nameprotected case Token Namepublic case Token Nametransient case Token Namevolatile case Token Namestatic case Token Namesynchronized break default this scanner comment Ptr 1 System out println this scanner to String Action type switch type case Token Name Identifier push Identifier if this scanner use Assert As An Indentifier long positions this identifier Position Stack this identifier Ptr problem Reporter use Assert As An Identifier int positions 32 int positions this scanner comment Ptr 1 break case Token Nameinterface adjust Interface Modifiers class is pushing two int positions on the stack interface needs to do it too push On Int Stack this scanner current Position 1 push On Int Stack this scanner start Position this scanner comment Ptr 1 break case Token Nameabstract check And Set Modifiers Acc Abstract break case Token Namestrictfp check And Set Modifiers Acc Strictfp break case Token Namefinal check And Set Modifiers Acc Final break case Token Namenative check And Set Modifiers Acc Native break case Token Nameprivate check And Set Modifiers Acc Private break case Token Nameprotected check And Set Modifiers Acc Protected break case Token Namepublic check And Set Modifiers Acc Public break case Token Nametransient check And Set Modifiers Acc Transient break case Token Namevolatile check And Set Modifiers Acc Volatile break case Token Namestatic check And Set Modifiers Acc Static break case Token Namesynchronized this synchronized Block Source Start this scanner start Position check And Set Modifiers Acc Synchronized break case Token Namevoid push Identifier T void push On Int Stack this scanner current Position 1 push On Int Stack this scanner start Position this scanner comment Ptr 1 break push a default dimension while void is not part of the primitive declaration base Type and so takes the place of a type without getting into regular type parsing that generates a dimension on int Stack case Token Nameboolean push Identifier T boolean push On Int Stack this scanner current Position 1 push On Int Stack this scanner start Position this scanner comment Ptr 1 break case Token Namebyte push Identifier T byte push On Int Stack this scanner current Position 1 push On Int Stack this scanner start Position this scanner comment Ptr 1 break case Token Namechar push Identifier T char push On Int Stack this scanner current Position 1 push On Int Stack this scanner start Position this scanner comment Ptr 1 break case Token Namedouble push Identifier T double push On Int Stack this scanner current Position 1 push On Int Stack this scanner start Position this scanner comment Ptr 1 break case Token Namefloat push Identifier T float push On Int Stack this scanner current Position 1 push On Int Stack this scanner start Position this scanner comment Ptr 1 break case Token Nameint push Identifier T int push On Int Stack this scanner current Position 1 push On Int Stack this scanner start Position this scanner comment Ptr 1 break case Token Namelong push Identifier T long push On Int Stack this scanner current Position 1 push On Int Stack this scanner start Position this scanner comment Ptr 1 break case Token Nameshort push Identifier T short push On Int Stack this scanner current Position 1 push On Int Stack this scanner start Position this scanner comment Ptr 1 break case Token Name Integer Literal push On Expression Stack new Int Literal this scanner get Current Token Source this scanner start Position this scanner current Position 1 this scanner comment Ptr 1 break case Token Name Long Literal push On Expression Stack new Long Literal this scanner get Current Token Source this scanner start Position this scanner current Position 1 this scanner comment Ptr 1 break case Token Name Floating Point Literal push On Expression Stack new Float Literal this scanner get Current Token Source this scanner start Position this scanner current Position 1 this scanner comment Ptr 1 break case Token Name Double Literal push On Expression Stack new Double Literal this scanner get Current Token Source this scanner start Position this scanner current Position 1 this scanner comment Ptr 1 break case Token Name Character Literal push On Expression Stack new Char Literal this scanner get Current Token Source this scanner start Position this scanner current Position 1 this scanner comment Ptr 1 break case Token Name String Literal String Literal string Literal new String Literal this scanner get Current Token Source String this scanner start Position this scanner current Position 1 push On Expression Stack string Literal this scanner comment Ptr 1 break case Token Namefalse push On Expression Stack new False Literal this scanner start Position this scanner current Position 1 this scanner comment Ptr 1 break case Token Nametrue push On Expression Stack new True Literal this scanner start Position this scanner current Position 1 break case Token Namenull push On Expression Stack new Null Literal this scanner start Position this scanner current Position 1 break case Token Namesuper case Token Namethis this end Position this scanner current Position 1 push On Int Stack this scanner start Position break case Token Nameassert case Token Nameimport case Token Namepackage case Token Namethrow case Token Namedo case Token Nameif case Token Namefor case Token Nameswitch case Token Nametry case Token Namewhile case Token Namebreak case Token Namecontinue case Token Namereturn case Token Namecase push On Int Stack this scanner start Position break case Token Namenew https bugs eclipse org bugs show bug cgi id 40954 reset Modifiers push On Int Stack this scanner start Position break case Token Nameclass push On Int Stack this scanner current Position 1 push On Int Stack this scanner start Position break case Token Namedefault push On Int Stack this scanner start Position push On Int Stack this scanner current Position 1 break let extra semantic action decide when to push case Token NameRBRACKET case Token NamePLUS case Token NameMINUS case Token NameNOT case Token NameTWIDDLE this end Position this scanner start Position break case TokenNamePLUS PLUS case TokenNameMINUS MINUS this end Position this scanner start Position this end Statement Position this scanner current Position 1 break case Token NameRBRACE case Token NameSEMICOLON this end Statement Position this scanner current Position 1 this end Position this scanner start Position 1 the item is not part of the potential futur expression statement break in order to handle expression cast expression foo x case Token NameRPAREN this r Paren Pos this scanner current Position 1 position of the end of right parenthesis in case of unicode u0029 lex00101 break case Token NameLPAREN this l Paren Pos this scanner start Position break case Token NameQUESTION case Token NameCOMMA case Token NameCOLON case Token NameEQUAL case Token NameLBRACKET case Token NameDOT case Token NameERROR case Token NameEOF case Token Namecase case Token Namecatch case Token Nameelse case Token Nameextends case Token Namefinally case Token Nameimplements case Token Namethrows case Token Nameinstanceof case TokenNameEQUAL EQUAL case TokenNameLESS EQUAL case TokenNameGREATER EQUAL case TokenNameNOT EQUAL case TokenNameLEFT SHIFT case TokenNameRIGHT SHIFT case TokenNameUNSIGNED RIGHT SHIFT case TokenNamePLUS EQUAL case TokenNameMINUS EQUAL case TokenNameMULTIPLY EQUAL case TokenNameDIVIDE EQUAL case TokenNameAND EQUAL case TokenNameOR EQUAL case TokenNameXOR EQUAL case TokenNameREMAINDER EQUAL case TokenNameLEFT SHIFT EQUAL case TokenNameRIGHT SHIFT EQUAL case TokenNameUNSIGNED RIGHT SHIFT EQUAL case TokenNameOR OR case TokenNameAND AND case Token NameREMAINDER case Token NameXOR case Token NameAND case Token NameMULTIPLY case Token NameOR case Token NameDIVIDE case Token NameGREATER case Token NameLESS  consumeToken checkNonExternalizedStringLiteral commentPtr TokenNameabstract TokenNamestrictfp TokenNamefinal TokenNamenative TokenNameprivate TokenNameprotected TokenNamepublic TokenNametransient TokenNamevolatile TokenNamestatic TokenNamesynchronized commentPtr toStringAction TokenNameIdentifier pushIdentifier useAssertAsAnIndentifier identifierPositionStack identifierPtr problemReporter useAssertAsAnIdentifier commentPtr TokenNameinterface adjustInterfaceModifiers pushOnIntStack currentPosition pushOnIntStack startPosition commentPtr TokenNameabstract checkAndSetModifiers AccAbstract TokenNamestrictfp checkAndSetModifiers AccStrictfp TokenNamefinal checkAndSetModifiers AccFinal TokenNamenative checkAndSetModifiers AccNative TokenNameprivate checkAndSetModifiers AccPrivate TokenNameprotected checkAndSetModifiers AccProtected TokenNamepublic checkAndSetModifiers AccPublic TokenNametransient checkAndSetModifiers AccTransient TokenNamevolatile checkAndSetModifiers AccVolatile TokenNamestatic checkAndSetModifiers AccStatic TokenNamesynchronized synchronizedBlockSourceStart startPosition checkAndSetModifiers AccSynchronized TokenNamevoid pushIdentifier T_void pushOnIntStack currentPosition pushOnIntStack startPosition commentPtr baseType intStack TokenNameboolean pushIdentifier T_boolean pushOnIntStack currentPosition pushOnIntStack startPosition commentPtr TokenNamebyte pushIdentifier T_byte pushOnIntStack currentPosition pushOnIntStack startPosition commentPtr TokenNamechar pushIdentifier T_char pushOnIntStack currentPosition pushOnIntStack startPosition commentPtr TokenNamedouble pushIdentifier T_double pushOnIntStack currentPosition pushOnIntStack startPosition commentPtr TokenNamefloat pushIdentifier T_float pushOnIntStack currentPosition pushOnIntStack startPosition commentPtr TokenNameint pushIdentifier T_int pushOnIntStack currentPosition pushOnIntStack startPosition commentPtr TokenNamelong pushIdentifier T_long pushOnIntStack currentPosition pushOnIntStack startPosition commentPtr TokenNameshort pushIdentifier T_short pushOnIntStack currentPosition pushOnIntStack startPosition commentPtr TokenNameIntegerLiteral pushOnExpressionStack IntLiteral getCurrentTokenSource startPosition currentPosition commentPtr TokenNameLongLiteral pushOnExpressionStack LongLiteral getCurrentTokenSource startPosition currentPosition commentPtr TokenNameFloatingPointLiteral pushOnExpressionStack FloatLiteral getCurrentTokenSource startPosition currentPosition commentPtr TokenNameDoubleLiteral pushOnExpressionStack DoubleLiteral getCurrentTokenSource startPosition currentPosition commentPtr TokenNameCharacterLiteral pushOnExpressionStack CharLiteral getCurrentTokenSource startPosition currentPosition commentPtr TokenNameStringLiteral StringLiteral stringLiteral StringLiteral getCurrentTokenSourceString startPosition currentPosition pushOnExpressionStack stringLiteral commentPtr TokenNamefalse pushOnExpressionStack FalseLiteral startPosition currentPosition commentPtr TokenNametrue pushOnExpressionStack TrueLiteral startPosition currentPosition TokenNamenull pushOnExpressionStack NullLiteral startPosition currentPosition TokenNamesuper TokenNamethis endPosition currentPosition pushOnIntStack startPosition TokenNameassert TokenNameimport TokenNamepackage TokenNamethrow TokenNamedo TokenNameif TokenNamefor TokenNameswitch TokenNametry TokenNamewhile TokenNamebreak TokenNamecontinue TokenNamereturn TokenNamecase pushOnIntStack startPosition TokenNamenew show_bug resetModifiers pushOnIntStack startPosition TokenNameclass pushOnIntStack currentPosition pushOnIntStack startPosition TokenNamedefault pushOnIntStack startPosition pushOnIntStack currentPosition TokenNameRBRACKET TokenNamePLUS TokenNameMINUS TokenNameNOT TokenNameTWIDDLE endPosition startPosition TokenNamePLUS_PLUS TokenNameMINUS_MINUS endPosition startPosition endStatementPosition currentPosition TokenNameRBRACE TokenNameSEMICOLON endStatementPosition currentPosition endPosition startPosition TokenNameRPAREN rParenPos currentPosition TokenNameLPAREN lParenPos startPosition TokenNameQUESTION TokenNameCOMMA TokenNameCOLON TokenNameEQUAL TokenNameLBRACKET TokenNameDOT TokenNameERROR TokenNameEOF TokenNamecase TokenNamecatch TokenNameelse TokenNameextends TokenNamefinally TokenNameimplements TokenNamethrows TokenNameinstanceof TokenNameEQUAL_EQUAL TokenNameLESS_EQUAL TokenNameGREATER_EQUAL TokenNameNOT_EQUAL TokenNameLEFT_SHIFT TokenNameRIGHT_SHIFT TokenNameUNSIGNED_RIGHT_SHIFT TokenNamePLUS_EQUAL TokenNameMINUS_EQUAL TokenNameMULTIPLY_EQUAL TokenNameDIVIDE_EQUAL TokenNameAND_EQUAL TokenNameOR_EQUAL TokenNameXOR_EQUAL TokenNameREMAINDER_EQUAL TokenNameLEFT_SHIFT_EQUAL TokenNameRIGHT_SHIFT_EQUAL TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL TokenNameOR_OR TokenNameAND_AND TokenNameREMAINDER TokenNameXOR TokenNameAND TokenNameMULTIPLY TokenNameOR TokenNameDIVIDE TokenNameGREATER TokenNameLESS
protected void consume Type Declarations Type Declarations Type Declarations Type Declaration concat Node Lists  consumeTypeDeclarations TypeDeclarations TypeDeclarations TypeDeclaration concatNodeLists
protected void consume Type Declarationsopt Type Declarationsopt Type Declarations int length if length this ast Length Stack this ast Length Ptr 0 this ast Ptr length System arraycopy this ast Stack this ast Ptr 1 this compilation Unit types new Type Declaration length 0 length  consumeTypeDeclarationsopt TypeDeclarationsopt TypeDeclarations astLengthStack astLengthPtr astPtr astStack astPtr compilationUnit TypeDeclaration
protected void consume Type Import On Demand Declaration Type Import On Demand Declaration Type Import On Demand Declaration Name Import Reference impt Import Reference this ast Stack this ast Ptr flush comments defined prior to import statements impt declaration End this end Statement Position impt declaration Source End this flush Comments Defined Prior To impt declaration Source End recovery if this current Element null this last Check Point impt declaration Source End 1 this current Element this current Element add impt 0 this restart Recovery true this last Ignored Token 1 used to avoid branching back into the regular automaton  consumeTypeImportOnDemandDeclaration TypeImportOnDemandDeclaration TypeImportOnDemandDeclarationName ImportReference ImportReference astStack astPtr declarationEnd endStatementPosition declarationSourceEnd flushCommentsDefinedPriorTo declarationSourceEnd currentElement lastCheckPoint declarationSourceEnd currentElement currentElement restartRecovery lastIgnoredToken
protected void consume Type Import On Demand Declaration Name Type Import On Demand Declaration Name import Name push an Import Ref build from the last name stored in the identifier stack Import Reference impt int length char tokens new char length this identifier Length Stack this identifier Length Ptr this identifier Ptr length long positions new long length System arraycopy this identifier Stack this identifier Ptr 1 tokens 0 length System arraycopy this identifier Position Stack this identifier Ptr 1 positions 0 length push On Ast Stack impt new Import Reference tokens positions true Acc Default if this current Token Token NameSEMICOLON impt declaration Source End this scanner current Position 1 else impt declaration Source End impt source End impt declaration End impt declaration Source End end Position is just before the impt declaration Source Start this int Stack this int Ptr recovery if this current Element null this last Check Point impt declaration Source End 1 this current Element this current Element add impt 0 this last Ignored Token 1 this restart Recovery true used to avoid branching back into the regular automaton  consumeTypeImportOnDemandDeclarationName TypeImportOnDemandDeclarationName ImportRef ImportReference identifierLengthStack identifierLengthPtr identifierPtr identifierStack identifierPtr identifierPositionStack identifierPtr pushOnAstStack ImportReference AccDefault currentToken TokenNameSEMICOLON declarationSourceEnd currentPosition declarationSourceEnd sourceEnd declarationEnd declarationSourceEnd endPosition declarationSourceStart intStack intPtr currentElement lastCheckPoint declarationSourceEnd currentElement currentElement lastIgnoredToken restartRecovery
protected void consume Unary Expression int op Unary Expression Push Position Unary Expression Unary Expression Push Position Unary Expression Unary Expression Not Plus Minus Push Position Unary Expression Unary Expression Not Plus Minus Push Position Unary Expression optimize the push pop handle manually the 2147483648 while it is not a real computation of an and 2147483648 notice that 2147483648 is Integer MAX VALUE 1 Same for 9223372036854775808L int Stack have the position of the operator Expression r exp this expression Stack this expression Ptr if op MINUS if exp instanceof Int Literal Int Literal exp mayRepresentMIN VALUE r this expression Stack this expression Ptr new Int Literal Min Value else if exp instanceof Long Literal Long Literal exp mayRepresentMIN VALUE r this expression Stack this expression Ptr new Long Literal Min Value else r this expression Stack this expression Ptr new Unary Expression exp op else r this expression Stack this expression Ptr new Unary Expression exp op r source Start this int Stack this int Ptr r source End exp source End  consumeUnaryExpression UnaryExpression PushPosition UnaryExpression UnaryExpression PushPosition UnaryExpression UnaryExpressionNotPlusMinus PushPosition UnaryExpression UnaryExpressionNotPlusMinus PushPosition UnaryExpression MAX_VALUE intStack expressionStack expressionPtr IntLiteral IntLiteral mayRepresentMIN_VALUE expressionStack expressionPtr IntLiteralMinValue LongLiteral LongLiteral mayRepresentMIN_VALUE expressionStack expressionPtr LongLiteralMinValue expressionStack expressionPtr UnaryExpression expressionStack expressionPtr UnaryExpression sourceStart intStack intPtr sourceEnd sourceEnd
protected void consume Unary Expression int op boolean post Pre Increment Expression Push Position Unary Expression Pre Decrement Expression Push Position Unary Expression and operators optimize the push pop int Stack has the position of the operator when prefix Expression left Hand Side this expression Stack this expression Ptr if left Hand Side instanceof Reference foo is unvalid if post this expression Stack this expression Ptr new Postfix Expression left Hand Side Int Literal One op this end Statement Position else this expression Stack this expression Ptr new Prefix Expression left Hand Side Int Literal One op this int Stack this int Ptr else the or the is NOT taken into account if code gen proceeds if post this int Ptr problem Reporter invalid Unary Expression left Hand Side  consumeUnaryExpression PreIncrementExpression PushPosition UnaryExpression PreDecrementExpression PushPosition UnaryExpression intStack leftHandSide expressionStack expressionPtr leftHandSide expressionStack expressionPtr PostfixExpression leftHandSide IntLiteral endStatementPosition expressionStack expressionPtr PrefixExpression leftHandSide IntLiteral intStack intPtr intPtr problemReporter invalidUnaryExpression leftHandSide
protected void consume Variable Declarators Variable Declarators Variable Declarators Variable Declarator optimized Concat Node Lists  consumeVariableDeclarators VariableDeclarators VariableDeclarators VariableDeclarator optimizedConcatNodeLists
optimized Concat Node Lists protected void consume Variable Initializers Variable Initializers Variable Initializers Variable Initializer concat Expression Lists  optimizedConcatNodeLists consumeVariableInitializers VariableInitializers VariableInitializers VariableInitializer concatExpressionLists
Given the current comment stack answer whether some comment is available in a certain exclusive range param source Start int param source End int return boolean public boolean contains Comment int source Start int source End int i Comment this scanner comment Ptr for i Comment 0 i Comment int comment Start this scanner comment Starts i Comment ignore comments before start if comment Start source Start continue ignore comments after end if comment Start source End continue return true return false  sourceStart sourceEnd containsComment sourceStart sourceEnd iComment commentPtr iComment iComment commentStart commentStarts iComment commentStart sourceStart commentStart sourceEnd
public Method Declaration convert To Method Declaration Constructor Declaration c Compilation Result compilation Result Method Declaration m new Method Declaration compilation Result m source Start c source Start m source End c source End m body Start c body Start m body End c body End m declaration Source End c declaration Source End m declaration Source Start c declaration Source Start m selector c selector m statements c statements m modifiers c modifiers m arguments c arguments m thrown Exceptions c thrown Exceptions m explicit Declarations c explicit Declarations m return Type null return m  MethodDeclaration convertToMethodDeclaration ConstructorDeclaration CompilationResult compilationResult MethodDeclaration MethodDeclaration compilationResult sourceStart sourceStart sourceEnd sourceEnd bodyStart bodyStart bodyEnd bodyEnd declarationSourceEnd declarationSourceEnd declarationSourceStart declarationSourceStart thrownExceptions thrownExceptions explicitDeclarations explicitDeclarations returnType
return m protected Type Reference copy Dims Type Reference type Ref int dim return type Ref copy Dims dim  TypeReference copyDims TypeReference typeRef typeRef copyDims
return type Ref copy Dims dim protected Field Declaration create Field Declaration char field Declaration Name int source Start int source End return new Field Declaration field Declaration Name source Start source End  typeRef copyDims FieldDeclaration createFieldDeclaration fieldDeclarationName sourceStart sourceEnd FieldDeclaration fieldDeclarationName sourceStart sourceEnd
protected Local Declaration create Local Declaration char local Declaration Name int source Start int source End return new Local Declaration local Declaration Name source Start source End  LocalDeclaration createLocalDeclaration localDeclarationName sourceStart sourceEnd LocalDeclaration localDeclarationName sourceStart sourceEnd
public Compilation Unit Declaration diet Parse I Compilation Unit source Unit Compilation Result compilation Result Compilation Unit Declaration parsed Unit boolean old this diet try this diet true parsed Unit parse source Unit compilation Result finally this diet old return parsed Unit  CompilationUnitDeclaration dietParse ICompilationUnit sourceUnit CompilationResult compilationResult CompilationUnitDeclaration parsedUnit parsedUnit sourceUnit compilationResult parsedUnit
protected void dispatch Declaration Into int length they are length on ast Stack that should go into methods fields constructors lists of the type Decl Return if there is a constructor declaration in the methods declaration Looks for the size of each array if length 0 return int flag new int length 1 plus one see HERE int size1 0 size2 0 size3 0 for int i length 1 i 0 i AST Node ast Node this ast Stack this ast Ptr if ast Node instanceof Abstract Method Declaration methods and constructors have been regrouped into one single list flag i 3 size2 else if ast Node instanceof Type Declaration flag i 4 size3 else field flag i 1 size1 arrays creation Type Declaration type Decl Type Declaration this ast Stack this ast Ptr if size1 0 type Decl fields new Field Declaration size1 if size2 0 type Decl methods new Abstract Method Declaration size2 if size3 0 type Decl member Types new Type Declaration size3 arrays fill up size1 size2 size3 0 int flagI flag 0 start 0 int length2 for int end 0 end length end HERE the plus one allows to if flagI flag end treat the last element as a ended flag array copy switch flagI case 1 size1 length2 end start System arraycopy this ast Stack this ast Ptr start 1 type Decl fields size1 length2 length2 break case 3 size2 length2 end start System arraycopy this ast Stack this ast Ptr start 1 type Decl methods size2 length2 length2 break case 4 size3 length2 end start System arraycopy this ast Stack this ast Ptr start 1 type Decl member Types size3 length2 length2 break flagI flag start end if type Decl member Types null for int i type Decl member Types length 1 i 0 i type Decl member Types i enclosing Type type Decl  dispatchDeclarationInto astStack typeDecl ASTNode astNode astStack astPtr astNode AbstractMethodDeclaration astNode TypeDeclaration TypeDeclaration typeDecl TypeDeclaration astStack astPtr typeDecl FieldDeclaration typeDecl AbstractMethodDeclaration typeDecl memberTypes TypeDeclaration astStack astPtr typeDecl astStack astPtr typeDecl astStack astPtr typeDecl memberTypes typeDecl memberTypes typeDecl memberTypes typeDecl memberTypes enclosingType typeDecl
protected Compilation Unit Declaration end Parse int act this last Act act if this current Element null this current Element top Element update Parse Tree if VERBOSE RECOVERY System out print Util bind parser syntax Recovery NON NLS 1 System out println NON NLS 1 System out println this compilation Unit System out println NON NLS 1 else if this diet VERBOSE RECOVERY System out print Util bind parser regular Parse NON NLS 1 System out println NON NLS 1 System out println this compilation Unit System out println NON NLS 1 persist Line Separator Positions for int i 0 i this scanner found Task Count i problem Reporter task new String this scanner found Task Tags i new String this scanner found Task Messages i this scanner found Task Priorities i null null new String this scanner found Task Priorities i this scanner found Task Positions i 0 this scanner found Task Positions i 1 return this compilation Unit  CompilationUnitDeclaration endParse lastAct currentElement currentElement topElement updateParseTree VERBOSE_RECOVERY syntaxRecovery compilationUnit VERBOSE_RECOVERY regularParse compilationUnit persistLineSeparatorPositions foundTaskCount problemReporter foundTaskTags foundTaskMessages foundTaskPriorities foundTaskPriorities foundTaskPositions foundTaskPositions compilationUnit
public int flush Comments Defined Prior To int position int last Comment Index this scanner comment Ptr if last Comment Index 0 return position no comment compute the index of the first obsolete comment int index last Comment Index int valid Count 0 while index 0 int comment End this scanner comment Stops index if comment End 0 comment End comment End negative end position for non javadoc comments if comment End position break index valid Count if the source at position is immediately followed by a line comment then flush this comment and shift position to the comment end if valid Count 0 int immediate Comment End this scanner comment Stops index 1 non javadoc comment end positions are negative if immediate Comment End 0 only tolerating non javadoc comments is there any line break until the end of the immediate comment thus only tolerating line comment immediate Comment End comment end in one char too far if this scanner get Line Number position this scanner get Line Number immediate Comment End position immediate Comment End valid Count flush this comment index if index 0 return position no obsolete comment if valid Count 0 move valid comment infos overriding obsolete comment infos System arraycopy this scanner comment Starts index 1 this scanner comment Starts 0 valid Count System arraycopy this scanner comment Stops index 1 this scanner comment Stops 0 valid Count this scanner comment Ptr valid Count 1 return position  flushCommentsDefinedPriorTo lastCommentIndex commentPtr lastCommentIndex lastCommentIndex validCount commentEnd commentStops commentEnd commentEnd commentEnd commentEnd validCount validCount immediateCommentEnd commentStops immediateCommentEnd immediateCommentEnd getLineNumber getLineNumber immediateCommentEnd immediateCommentEnd validCount validCount commentStarts commentStarts validCount commentStops commentStops validCount commentPtr validCount
public final int get First Token the first token is a virtual token that allows the parser to parse several goals even if they aren t LALR 1 Goal Compilation Unit Goal Method Body Goal Constructor Body Initializer Goal Static Initializer Goal Block error recovery Goal Headers Goal Block Statements Goal Method Push Modifiers Header JDOM Goal Field Declaration Goal Import Declaration Goal Package Declaration Goal Type Declaration Goal Generic Method Declaration Goal Class Body Declaration code snippet Goal Expression completion parser Goal Constructor Block Statementsopt Goal Block Statementsopt return this first Token  getFirstToken CompilationUnit MethodBody ConstructorBody StaticInitializer BlockStatements MethodPushModifiersHeader FieldDeclaration ImportDeclaration PackageDeclaration TypeDeclaration GenericMethodDeclaration ClassBodyDeclaration ConstructorBlockStatementsopt BlockStatementsopt firstToken
public int get Java Doc Positions int javadoc Count 0 for int i 0 max this scanner comment Ptr i max i javadoc only non javadoc comment have negative end positions if this scanner comment Stops i 0 javadoc Count if javadoc Count 0 return null int positions new int 2 javadoc Count int index 0 for int i 0 max this scanner comment Ptr i max i javadoc only non javadoc comment have negative end positions if this scanner comment Stops i 0 positions index this scanner comment Starts i positions index this scanner comment Stops i 1 stop is one over return positions  getJavaDocPositions javadocCount commentPtr commentStops javadocCount javadocCount javadocCount commentPtr commentStops commentStarts commentStops
public void get Method Bodies Compilation Unit Declaration unit fill the methods bodies in order for the code to be generated if unit null return if unit ignore Method Bodies unit ignore Further Investigation true return if initial diet parse did not work no need to dig into method bodies if unit bits AST Node Has All Method Bodies 0 return work already done real parse of the method char contents unit compilation Result compilation Unit get Contents this scanner set Source contents save existing values to restore them at the end of the parsing process see bug 47079 for more details int old Line Ends this scanner line Ends int old Line Ptr this scanner line Ptr final int line Separator Positions unit compilation Result line Separator Positions this scanner line Ends line Separator Positions this scanner line Ptr line Separator Positions length 1 if this javadoc Parser null this javadoc Parser check Doc Comment this javadoc Parser scanner set Source contents if unit types null for int i unit types length i 0 unit types i parse Method this unit tag unit has having read bodies unit bits AST Node Has All Method Bodies this is done to prevent any side effects on the compilation unit result line separator positions array this scanner line Ends old Line Ends this scanner line Ptr old Line Ptr  getMethodBodies CompilationUnitDeclaration ignoreMethodBodies ignoreFurtherInvestigation ASTNode HasAllMethodBodies compilationResult compilationUnit getContents setSource oldLineEnds lineEnds oldLinePtr linePtr lineSeparatorPositions compilationResult lineSeparatorPositions lineEnds lineSeparatorPositions linePtr lineSeparatorPositions javadocParser javadocParser checkDocComment javadocParser setSource parseMethod ASTNode HasAllMethodBodies lineEnds oldLineEnds linePtr oldLinePtr
protected Type Reference get Type Reference int dim build a Reference on a variable that may be qualified or not This variable is a type reference and dim will be its dimensions int length Type Reference ref if length this identifier Length Stack this identifier Length Ptr 1 single variable reference if dim 0 ref new Single Type Reference this identifier Stack this identifier Ptr this identifier Position Stack this identifier Ptr else ref new Array Type Reference this identifier Stack this identifier Ptr dim this identifier Position Stack this identifier Ptr ref source End this end Position else if length 0 flag for precompiled type reference on base types ref Type Reference base Type Reference length dim ref source Start this int Stack this int Ptr if dim 0 ref source End this int Stack this int Ptr else this int Ptr ref source End this end Position else Qualified variable reference char tokens new char length this identifier Ptr length long positions new long length System arraycopy this identifier Stack this identifier Ptr 1 tokens 0 length System arraycopy this identifier Position Stack this identifier Ptr 1 positions 0 length if dim 0 ref new Qualified Type Reference tokens positions else ref new Array Qualified Type Reference tokens dim positions ref source End this end Position return ref  TypeReference getTypeReference TypeReference identifierLengthStack identifierLengthPtr SingleTypeReference identifierStack identifierPtr identifierPositionStack identifierPtr ArrayTypeReference identifierStack identifierPtr identifierPositionStack identifierPtr sourceEnd endPosition TypeReference baseTypeReference sourceStart intStack intPtr sourceEnd intStack intPtr intPtr sourceEnd endPosition identifierPtr identifierStack identifierPtr identifierPositionStack identifierPtr QualifiedTypeReference ArrayQualifiedTypeReference sourceEnd endPosition
protected Expression get Type Reference Expression exp exp bits AST Node Restrictive FlagMASK exp bits TYPE return exp  getTypeReference ASTNode RestrictiveFlagMASK
protected Name Reference get Unspecified Reference build a unspecified Name Reference which may be qualified int length Name Reference ref if length this identifier Length Stack this identifier Length Ptr 1 single variable reference ref new Single Name Reference this identifier Stack this identifier Ptr this identifier Position Stack this identifier Ptr else Qualified variable reference char tokens new char length this identifier Ptr length System arraycopy this identifier Stack this identifier Ptr 1 tokens 0 length long positions new long length System arraycopy this identifier Position Stack this identifier Ptr 1 positions 0 length ref new Qualified Name Reference tokens positions int this identifier Position Stack this identifier Ptr 1 32 source Start int this identifier Position Stack this identifier Ptr length source End return ref  NameReference getUnspecifiedReference NameReference NameReference identifierLengthStack identifierLengthPtr SingleNameReference identifierStack identifierPtr identifierPositionStack identifierPtr identifierPtr identifierStack identifierPtr identifierPositionStack identifierPtr QualifiedNameReference identifierPositionStack identifierPtr sourceStart identifierPositionStack identifierPtr sourceEnd
protected Name Reference get Unspecified Reference Optimized build a unspecified Name Reference which may be qualified The optimization occurs for qualified reference while we are certain in this case the last item of the qualified name is a field access This optimization is IMPORTANT while it results that when a Name Reference is build the type checker should always look for that it is not a type reference int length Name Reference ref if length this identifier Length Stack this identifier Length Ptr 1 single variable reference ref new Single Name Reference this identifier Stack this identifier Ptr this identifier Position Stack this identifier Ptr ref bits AST Node Restrictive FlagMASK ref bits LOCAL FIELD return ref Qualified variable reference In fact it is variable reference DOT field ref but it would result in a type conflict tha can be only reduce by making a superclass or inetrface between name Reference and Filed Reference or putting Field Reference under Name Reference or else This optimisation is not really relevant so just leave as it is char tokens new char length this identifier Ptr length System arraycopy this identifier Stack this identifier Ptr 1 tokens 0 length long positions new long length System arraycopy this identifier Position Stack this identifier Ptr 1 positions 0 length ref new Qualified Name Reference tokens positions int this identifier Position Stack this identifier Ptr 1 32 source Start int this identifier Position Stack this identifier Ptr length source End ref bits AST Node Restrictive FlagMASK ref bits LOCAL FIELD return ref  NameReference getUnspecifiedReferenceOptimized NameReference NameReference NameReference identifierLengthStack identifierLengthPtr SingleNameReference identifierStack identifierPtr identifierPositionStack identifierPtr ASTNode RestrictiveFlagMASK nameReference FiledReference FieldReference NameReference identifierPtr identifierStack identifierPtr identifierPositionStack identifierPtr QualifiedNameReference identifierPositionStack identifierPtr sourceStart identifierPositionStack identifierPtr sourceEnd ASTNode RestrictiveFlagMASK
public void go For Block Statementsopt tells the scanner to go for block statements opt parsing this first Token Token NameTWIDDLE this scanner record Line Separator false  goForBlockStatementsopt firstToken TokenNameTWIDDLE recordLineSeparator
public void go For Block Statements Or Catch Header tells the scanner to go for block statements or method headers parsing this first Token Token NameMULTIPLY this scanner record Line Separator false  goForBlockStatementsOrCatchHeader firstToken TokenNameMULTIPLY recordLineSeparator
public void go For Class Body Declarations tells the scanner to go for any body declarations parsing this first Token Token NameAND this scanner record Line Separator true  goForClassBodyDeclarations firstToken TokenNameAND recordLineSeparator
public void go For Compilation Unit tells the scanner to go for compilation unit parsing this first Token TokenNamePLUS PLUS this scanner line Ptr 1 this scanner found Task Count 0 this scanner record Line Separator true this scanner current Line null  goForCompilationUnit firstToken TokenNamePLUS_PLUS linePtr foundTaskCount recordLineSeparator currentLine
public void go For Expression tells the scanner to go for an expression parsing this first Token Token NameREMAINDER this scanner record Line Separator true recovery goals must record line separators  goForExpression firstToken TokenNameREMAINDER recordLineSeparator
public void go For Field Declaration tells the scanner to go for field declaration parsing this first Token TokenNameAND AND this scanner record Line Separator true  goForFieldDeclaration firstToken TokenNameAND_AND recordLineSeparator
public void go For Generic Method Declaration tells the scanner to go for generic method declarations parsing this first Token Token NameDIVIDE this scanner record Line Separator true  goForGenericMethodDeclaration firstToken TokenNameDIVIDE recordLineSeparator
public void go For Headers tells the scanner to go for headers only parsing this first Token TokenNameUNSIGNED RIGHT SHIFT this scanner record Line Separator true recovery goals must record line separators  goForHeaders firstToken TokenNameUNSIGNED_RIGHT_SHIFT recordLineSeparator
public void go For Import Declaration tells the scanner to go for import declaration parsing this first Token TokenNameOR OR this scanner record Line Separator true  goForImportDeclaration firstToken TokenNameOR_OR recordLineSeparator
public void go For Initializer tells the scanner to go for initializer parsing this first Token TokenNameRIGHT SHIFT this scanner record Line Separator false  goForInitializer firstToken TokenNameRIGHT_SHIFT recordLineSeparator
public void go For Method Body tells the scanner to go for method body parsing this first Token TokenNameMINUS MINUS this scanner record Line Separator false  goForMethodBody firstToken TokenNameMINUS_MINUS recordLineSeparator
public void go For Package Declaration tells the scanner to go for package declaration parsing this first Token Token NameQUESTION this scanner record Line Separator true  goForPackageDeclaration firstToken TokenNameQUESTION recordLineSeparator
public void go For Type Declaration tells the scanner to go for type interface or class declaration parsing this first Token Token NamePLUS this scanner record Line Separator true  goForTypeDeclaration firstToken TokenNamePLUS recordLineSeparator
protected void ignore Expression Assignment Assignment Invalid Array Initializer Assignement encoded operator would be this int Stack this int Ptr this int Ptr Array Initializer array Initializer Array Initializer this expression Stack this expression Ptr this expression Length Ptr report a syntax error and abort parsing problem Reporter array Constants Only In Array Initializers array Initializer source Start array Initializer source End  ignoreExpressionAssignment InvalidArrayInitializerAssignement intStack intPtr intPtr ArrayInitializer arrayInitializer ArrayInitializer expressionStack expressionPtr expressionLengthPtr problemReporter arrayConstantsOnlyInArrayInitializers arrayInitializer sourceStart arrayInitializer sourceEnd
protected void ignore Interface Declaration Block Statement Invalid Interface Declaration Interface Declaration Modifiersopt interface Identifier Extends Interfacesopt Interface Header Interface Body length declarations int length if length this ast Length Stack this ast Length Ptr 0 there are length declarations dispatch according to the type of the declarations dispatch Declaration Into length flush Comments Defined Prior To this end Statement Position report the problem and continue parsing Type Declaration type Decl Type Declaration this ast Stack this ast Ptr type Decl body End this end Statement Position problem Reporter cannot Declare Local Interface type Decl name type Decl source Start type Decl source End mark initializers with local type mark if needed mark Initializers With Local Type type Decl remove the ast node created in interface header this ast Ptr push On Ast Length Stack 1 concat Node Lists  ignoreInterfaceDeclaration BlockStatement InvalidInterfaceDeclaration InterfaceDeclaration ExtendsInterfacesopt InterfaceHeader InterfaceBody astLengthStack astLengthPtr dispatchDeclarationInto flushCommentsDefinedPriorTo endStatementPosition TypeDeclaration typeDecl TypeDeclaration astStack astPtr typeDecl bodyEnd endStatementPosition problemReporter cannotDeclareLocalInterface typeDecl typeDecl sourceStart typeDecl sourceEnd markInitializersWithLocalType typeDecl astPtr pushOnAstLengthStack concatNodeLists
protected void ignore Invalid Constructor Declaration boolean has Body Invalid Constructor Declaration Constructor Header Constructor Body true Invalid Constructor Declaration Constructor Header false ast Stack modifiers arguments throws statements identifier Stack name ast Stack Method Declaration identifier Stack if has Body pop the position of the body of the method pushed in block decl this int Ptr statements if has Body this real Block Ptr int length if has Body length this ast Length Stack this ast Length Ptr 0 this ast Ptr length Constructor Declaration constructor Declaration Constructor Declaration this ast Stack this ast Ptr constructor Declaration body End this end Statement Position constructor Declaration declaration Source End flush Comments Defined Prior To this end Statement Position if has Body constructor Declaration modifiers Acc Semicolon Body  ignoreInvalidConstructorDeclaration hasBody InvalidConstructorDeclaration ConstructorHeader ConstructorBody InvalidConstructorDeclaration ConstructorHeader astStack identifierStack astStack MethodDeclaration identifierStack hasBody intPtr hasBody realBlockPtr hasBody astLengthStack astLengthPtr astPtr ConstructorDeclaration constructorDeclaration ConstructorDeclaration astStack astPtr constructorDeclaration bodyEnd endStatementPosition constructorDeclaration declarationSourceEnd flushCommentsDefinedPriorTo endStatementPosition hasBody constructorDeclaration AccSemicolonBody
protected void ignore Method Body Interface Member Declaration Invalid Method Declaration ast Stack modifiers arguments throws statements identifier Stack type name int Stack dim dim dim ast Stack Method Declaration identifier Stack int Stack pop the position of the body of the method pushed in block decl this int Ptr retrieve end position of method declarator statements this real Block Ptr int length if length this ast Length Stack this ast Length Ptr 0 this ast Ptr length watch for that could be given as a unicode u007D is Method Declaration md Method Declaration this ast Stack this ast Ptr md body End this end Position md declaration Source End flush Comments Defined Prior To this end Statement Position report the problem and continue the parsing narrowing the problem onto the method problem Reporter abstract Method Needing No Body md  ignoreMethodBody InterfaceMemberDeclaration InvalidMethodDeclaration astStack identifierStack intStack astStack MethodDeclaration identifierStack intStack intPtr realBlockPtr astLengthStack astLengthPtr astPtr MethodDeclaration MethodDeclaration astStack astPtr bodyEnd endPosition declarationSourceEnd flushCommentsDefinedPriorTo endStatementPosition problemReporter abstractMethodNeedingNoBody
public void initialize positionning the parser for a new compilation unit avoiding stack reallocation and all that this ast Ptr 1 this ast Length Ptr 1 this expression Ptr 1 this expression Length Ptr 1 this identifier Ptr 1 this identifier Length Ptr 1 this int Ptr 1 this nested Method this nested Type 0 0 need to reset for further reuse this variables Counter this nested Type 0 this dimensions 0 this real Block Ptr 1 this compilation Unit null this reference Context null this end Statement Position 0 remove objects from stack too while the same parser compiler couple is re used between two compilations int ast Length this ast Stack length if this no Ast Nodes length ast Length this no Ast Nodes new AST Node ast Length System out println Resized AST stacks ast Length System arraycopy this no Ast Nodes 0 this ast Stack 0 ast Length int expression Length this expression Stack length if this no Expressions length expression Length this no Expressions new Expression expression Length System out println Resized EXPR stacks expression Length System arraycopy this no Expressions 0 this expression Stack 0 expression Length reset scanner state this scanner comment Ptr 1 this scanner found Task Count 0 this scanner eof Position Integer MAX VALUE this scanner was Non Externalized String Literal false this scanner nonNLS Strings null this scanner current Line null reset Modifiers recovery this last Check Point 1 this current Element null this restart Recovery false this has Reported Error false this recovered Static Initializer Start 0 this last Ignored Token 1 this last Error End Position 1 this list Length 0 this r Brace Start 0 this r Brace End 0 this r Brace Successor Start 0  astPtr astLengthPtr expressionPtr expressionLengthPtr identifierPtr identifierLengthPtr intPtr nestedMethod nestedType variablesCounter nestedType realBlockPtr compilationUnit referenceContext endStatementPosition astLength astStack noAstNodes astLength noAstNodes ASTNode astLength astLength noAstNodes astStack astLength expressionLength expressionStack noExpressions expressionLength noExpressions expressionLength expressionLength noExpressions expressionStack expressionLength commentPtr foundTaskCount eofPosition MAX_VALUE wasNonExternalizedStringLiteral nonNLSStrings currentLine resetModifiers lastCheckPoint currentElement restartRecovery hasReportedError recoveredStaticInitializerStart lastIgnoredToken lastErrorEndPosition listLength rBraceStart rBraceEnd rBraceSuccessorStart
public void initialize Scanner this scanner new Scanner false comment false whitespace this options get Severity Compiler Options Non Externalized String Problem Severities Ignore nls this options source Level source Level this options task Tags task Tags this options task Priorites task Priorities this options is Task Case Sensitive task Case Sensitive  initializeScanner getSeverity CompilerOptions NonExternalizedString ProblemSeverities sourceLevel sourceLevel taskTags taskTags taskPriorites taskPriorities isTaskCaseSensitive taskCaseSensitive
public final static void init Tables throws java io IO Exception final String prefix FILEPREFIX int i 0 lhs read Table prefix i rsc NON NLS 1 char chars read Table prefix i rsc NON NLS 1 check table new short chars length for int c chars length c 0 check table c short chars c 32768 asb read Table prefix i rsc NON NLS 1 asr read Table prefix i rsc NON NLS 1 nasb read Table prefix i rsc NON NLS 1 nasr read Table prefix i rsc NON NLS 1 terminal index read Table prefix i rsc NON NLS 1 non terminal index read Table prefix i rsc NON NLS 1 term action read Table prefix i rsc NON NLS 1 scope prefix read Table prefix i rsc NON NLS 1 scope suffix read Table prefix i rsc NON NLS 1 scope lhs read Table prefix i rsc NON NLS 1 scope state set read Table prefix i rsc NON NLS 1 scope rhs read Table prefix i rsc NON NLS 1 scope state read Table prefix i rsc NON NLS 1 in symb read Table prefix i rsc NON NLS 1 rhs read Byte Table prefix i rsc NON NLS 1 term check read Byte Table prefix i rsc NON NLS 1 scope la read Byte Table prefix i rsc NON NLS 1 name read Name Table prefix i rsc NON NLS 1 readable Name read Readable Name Table READABLE NAMES base action lhs  initTables IOException readTable readTable check_table check_table readTable readTable readTable readTable terminal_index readTable non_terminal_index readTable term_action readTable scope_prefix readTable scope_suffix readTable scope_lhs readTable scope_state_set readTable scope_rhs readTable scope_state readTable in_symb readTable readByteTable term_check readByteTable scope_la readByteTable readNameTable readableName readReadableNameTable READABLE_NAMES base_action
base action lhs public static int in symbol int state return in symb original state state  base_action in_symbol in_symb original_state
public final void jump Over Method Body on diet parsing do not buffer method statements the scanner diet is reinitialized to false automatically by the scanner once it has jumped over the statements if this diet this diet Int 0 this scanner diet true  jumpOverMethodBody dietInt
protected void mark Enclosing Member With Local Type if this current Element null return this is already done in the recovery code for int i this ast Ptr i 0 i AST Node node this ast Stack i if node instanceof Abstract Method Declaration node instanceof Field Declaration node instanceof Type Declaration mark type for now all initializers will be marked when added to this type node bits AST Node Has Local TypeMASK return default to reference context case of parse method body if this reference Context instanceof Abstract Method Declaration this reference Context instanceof Type Declaration AST Node this reference Context bits AST Node Has Local TypeMASK  markEnclosingMemberWithLocalType currentElement astPtr ASTNode astStack AbstractMethodDeclaration FieldDeclaration TypeDeclaration ASTNode HasLocalTypeMASK referenceContext AbstractMethodDeclaration referenceContext TypeDeclaration ASTNode referenceContext ASTNode HasLocalTypeMASK
protected void mark Initializers With Local Type Type Declaration type if type fields null type bits AST Node Has Local TypeMASK 0 return for int i 0 length type fields length i length i Field Declaration field type fields i if field instanceof Initializer field bits AST Node Has Local TypeMASK  markInitializersWithLocalType TypeDeclaration ASTNode HasLocalTypeMASK FieldDeclaration ASTNode HasLocalTypeMASK
protected boolean move Recovery Checkpoint int pos this last Check Point reset scanner and move checkpoint by one token this scanner start Position pos this scanner current Position pos this scanner diet false quit jumping over method bodies if about to restart then no need to shift token if this restart Recovery this last Ignored Token 1 this scanner current Line null return true protect against shifting on an invalid token this last Ignored Token this next Ignored Token this next Ignored Token 1 do try this next Ignored Token this scanner get Next Token if this scanner current Position this scanner start Position this scanner current Position on fake completion identifier this next Ignored Token 1 catch Invalid Input Exception e pos this scanner current Position while this next Ignored Token 0 if this next Ignored Token Token NameEOF no more recovery after this point if this current Token Token NameEOF already tried one iteration on EOF this scanner current Line null return false this last Check Point this scanner current Position reset scanner again to previous checkpoint location this scanner start Position pos this scanner current Position pos this scanner comment Ptr 1 this scanner found Task Count 0 this scanner current Line null return true The following implementation moves the checkpoint location by one line int pos this last Check Point reset scanner and move checkpoint by one token this scanner start Position pos this scanner current Position pos this scanner diet false quit jumping over method bodies if about to restart then no need to shift token if this restart Recovery this last Ignored Token 1 return true protect against shifting on an invalid token this last Ignored Token this next Ignored Token this next Ignored Token 1 boolean was Tokenizing White Space this scanner tokenize White Space this scanner tokenize White Space true checkpoint Move do try this next Ignored Token this scanner get Next Token switch this next Ignored Token case Scanner Token NameWHITESPACE if this scanner get Line Number this scanner start Position this scanner get Line Number this scanner current Position this next Ignored Token 1 break case Token NameSEMICOLON case Token NameLBRACE case Token NameRBRACE break case Token Name Identifier if this scanner current Position this scanner start Position this scanner current Position on fake completion identifier default this next Ignored Token 1 break case Token NameEOF break checkpoint Move catch Invalid Input Exception e pos this scanner current Position while this next Ignored Token 0 this scanner tokenize White Space was Tokenizing White Space if this next Ignored Token Token NameEOF no more recovery after this point if this current Token Token NameEOF already tried one iteration on EOF return false this last Check Point this scanner current Position reset scanner again to previous checkpoint location this scanner start Position pos this scanner current Position pos this scanner comment Ptr 1 return true  moveRecoveryCheckpoint lastCheckPoint startPosition currentPosition restartRecovery lastIgnoredToken currentLine lastIgnoredToken nextIgnoredToken nextIgnoredToken nextIgnoredToken getNextToken currentPosition startPosition currentPosition nextIgnoredToken InvalidInputException currentPosition nextIgnoredToken nextIgnoredToken TokenNameEOF currentToken TokenNameEOF currentLine lastCheckPoint currentPosition startPosition currentPosition commentPtr foundTaskCount currentLine lastCheckPoint startPosition currentPosition restartRecovery lastIgnoredToken lastIgnoredToken nextIgnoredToken nextIgnoredToken wasTokenizingWhiteSpace tokenizeWhiteSpace tokenizeWhiteSpace checkpointMove nextIgnoredToken getNextToken nextIgnoredToken TokenNameWHITESPACE getLineNumber startPosition getLineNumber currentPosition nextIgnoredToken TokenNameSEMICOLON TokenNameLBRACE TokenNameRBRACE TokenNameIdentifier currentPosition startPosition currentPosition nextIgnoredToken TokenNameEOF checkpointMove InvalidInputException currentPosition nextIgnoredToken tokenizeWhiteSpace wasTokenizingWhiteSpace nextIgnoredToken TokenNameEOF currentToken TokenNameEOF lastCheckPoint currentPosition startPosition currentPosition commentPtr
protected Message Send new Message Send Argument Listopt the arguments are on the expression stack Message Send m new Message Send int length if length this expression Length Stack this expression Length Ptr 0 this expression Ptr length System arraycopy this expression Stack this expression Ptr 1 m arguments new Expression length 0 length return m  MessageSend newMessageSend ArgumentListopt MessageSend MessageSend expressionLengthStack expressionLengthPtr expressionPtr expressionStack expressionPtr
return m public static int nasi int state return nasb original state state  original_state
return nasb original state state public static int nt Action int state int sym return base action state sym  original_state ntAction base_action
private final void optimized Concat Node Lists back from a recursive loop Virtualy group the ast Node into an array using ast Length Stack This is a case where you have two sublists into the ast Stack that you want to merge in one list There is no action required on the ast Stack The only thing you need to do is merge the two lengths specified on the ast Stack Length The top two length are for example p n and you want to result in a list like n p This means that the p could be equals to 0 in case there is no ast Node pushed on the ast Stack Look at the Interface Member Declarations for an example This case optimizes the fact that p 1 this ast Length Stack this ast Length Ptr  optimizedConcatNodeLists astNode astLengthStack astStack astStack astStackLength astNode astStack InterfaceMemberDeclarations astLengthStack astLengthPtr
this ast Length Stack this ast Length Ptr protected static int original state int state return base check state  astLengthStack astLengthPtr original_state base_check
name symbol index current Kind protected void parse boolean is Diet Parse this diet int old First Token get First Token this has Error false this has Reported Error false int act START STATE this state Stack Top 1 this current Token get First Token Process Terminals for int stack Length this stack length if this state Stack Top stack Length System arraycopy this stack 0 this stack new int stack Length Stack Increment 0 stack Length this stack this state Stack Top act act t Action act this current Token if act ERROR ACTION this restart Recovery int error Pos this scanner current Position if this has Reported Error this has Error true if resume On Syntax Error if act ERROR ACTION this last Error End Position error Pos act START STATE this state Stack Top 1 this current Token get First Token continue Process Terminals act ERROR ACTION break Process Terminals if act NUM RULES this state Stack Top else if act ERROR ACTION shift reduce consume Token this current Token if this current Element null this recovery Token Check try this current Token this scanner get Next Token catch Invalid Input Exception e if this has Reported Error this problem Reporter scanner Error this e get Message this has Reported Error true this last Check Point this scanner current Position this restart Recovery true act ERROR ACTION else if act ACCEPT ACTION shift consume Token this current Token if this current Element null this recovery Token Check try this current Token this scanner get Next Token catch Invalid Input Exception e if this has Reported Error this problem Reporter scanner Error this e get Message this has Reported Error true this last Check Point this scanner current Position this restart Recovery true continue Process Terminals break Process Terminals Process Non Terminals do reduce consume Rule act this state Stack Top rhs act 1 act nt Action this stack this state Stack Top lhs act while act NUM RULES end Parse act if this report Syntax Error Is Required this has Error report Syntax Errors is Diet Parse old First Token  symbol_index currentKind isDietParse oldFirstToken getFirstToken hasError hasReportedError START_STATE stateStackTop currentToken getFirstToken ProcessTerminals stackLength stateStackTop stackLength stackLength StackIncrement stackLength stateStackTop tAction currentToken ERROR_ACTION restartRecovery errorPos currentPosition hasReportedError hasError resumeOnSyntaxError ERROR_ACTION lastErrorEndPosition errorPos START_STATE stateStackTop currentToken getFirstToken ProcessTerminals ERROR_ACTION ProcessTerminals NUM_RULES stateStackTop ERROR_ACTION consumeToken currentToken currentElement recoveryTokenCheck currentToken getNextToken InvalidInputException hasReportedError problemReporter scannerError getMessage hasReportedError lastCheckPoint currentPosition restartRecovery ERROR_ACTION ACCEPT_ACTION consumeToken currentToken currentElement recoveryTokenCheck currentToken getNextToken InvalidInputException hasReportedError problemReporter scannerError getMessage hasReportedError lastCheckPoint currentPosition restartRecovery ProcessTerminals ProcessTerminals ProcessNonTerminals consumeRule stateStackTop ntAction stateStackTop NUM_RULES endParse reportSyntaxErrorIsRequired hasError reportSyntaxErrors isDietParse oldFirstToken
A P I protected void report Syntax Errors boolean is Diet Parse int old First Token if this reference Context instanceof Method Declaration Method Declaration method Declaration Method Declaration this reference Context if method Declaration error In Signature return this compilation Unit compilation Result line Separator Positions this scanner get Line Ends this scanner record Line Separator false int start this scanner initial Position int end this scanner eof Position Integer MAX VALUE this scanner eof Position 1 this scanner eof Position if is Diet Parse Type Declaration types this compilation Unit types int interval To Skip org eclipse jdt internal compiler parser diagnose Range Util compute Diet Range types Diagnose Parser diagnose Parser new Diagnose Parser this old First Token start end interval To Skip 0 interval To Skip 1 interval To Skip 2 diagnose Parser diagnose Parse report Syntax Errors For Skipped Method types this scanner reset To start end else Diagnose Parser diagnose Parser new Diagnose Parser this old First Token start end diagnose Parser diagnose Parse  reportSyntaxErrors isDietParse oldFirstToken referenceContext MethodDeclaration MethodDeclaration methodDeclaration MethodDeclaration referenceContext methodDeclaration errorInSignature compilationUnit compilationResult lineSeparatorPositions getLineEnds recordLineSeparator initialPosition eofPosition MAX_VALUE eofPosition eofPosition isDietParse TypeDeclaration compilationUnit intervalToSkip RangeUtil computeDietRange DiagnoseParser diagnoseParser DiagnoseParser oldFirstToken intervalToSkip intervalToSkip intervalToSkip diagnoseParser diagnoseParse reportSyntaxErrorsForSkippedMethod resetTo DiagnoseParser diagnoseParser DiagnoseParser oldFirstToken diagnoseParser diagnoseParse
private void report Syntax Errors For Skipped Method Type Declaration types if types null for int i 0 i types length i Type Declaration member Types types i member Types if member Types null report Syntax Errors For Skipped Method member Types Abstract Method Declaration methods types i methods if methods null for int j 0 j methods length j Abstract Method Declaration method methods j if methods j error In Signature Diagnose Parser diagnose Parser new Diagnose Parser this Token NameDIVIDE method declaration Source Start method declaration Source End diagnose Parser diagnose Parse Field Declaration fields types i fields if fields null int length fields length for int j 0 j length j if fields j instanceof Initializer Initializer initializer Initializer fields j if initializer error In Signature Diagnose Parser diagnose Parser new Diagnose Parser this TokenNameRIGHT SHIFT initializer declaration Source Start initializer declaration Source End diagnose Parser diagnose Parse  reportSyntaxErrorsForSkippedMethod TypeDeclaration TypeDeclaration memberTypes memberTypes memberTypes reportSyntaxErrorsForSkippedMethod memberTypes AbstractMethodDeclaration AbstractMethodDeclaration errorInSignature DiagnoseParser diagnoseParser DiagnoseParser TokenNameDIVIDE declarationSourceStart declarationSourceEnd diagnoseParser diagnoseParse FieldDeclaration errorInSignature DiagnoseParser diagnoseParser DiagnoseParser TokenNameRIGHT_SHIFT declarationSourceStart declarationSourceEnd diagnoseParser diagnoseParse
public void parse Constructor Declaration cd Compilation Unit Declaration unit parse cd unit false  ConstructorDeclaration CompilationUnitDeclaration
public void parse Constructor Declaration cd Compilation Unit Declaration unit boolean record Line Separator only parse the method body of cd fill out its statements convert bugs into parse error initialize go For Block Statementsopt if record Line Separator this scanner record Line Separator true this nested Method this nested Type push On Real Block Stack 0 this reference Context cd this compilation Unit unit this scanner reset To cd body Start cd body End try parse catch Abort Compilation ex this last Act ERROR ACTION finally this nested Method this nested Type check NonNLS After Body End cd declaration Source End if this last Act ERROR ACTION initialize return statements cd explicit Declarations this real Block Stack this real Block Ptr int length if length this ast Length Stack this ast Length Ptr 0 this ast Ptr length if this ast Stack this ast Ptr 1 instanceof Explicit Constructor Call avoid a is Some Thing that would only be used here BUT what is faster between two alternatives System arraycopy this ast Stack this ast Ptr 2 cd statements new Statement length 1 0 length 1 cd constructor Call Explicit Constructor Call this ast Stack this ast Ptr 1 else need to add explicitly the super System arraycopy this ast Stack this ast Ptr 1 cd statements new Statement length 0 length cd constructor Call Super Reference implicit Super Constructor Call else cd constructor Call Super Reference implicit Super Constructor Call if contains Comment cd body Start cd body End cd bits AST Node Undocumented Empty BlockMASK if cd constructor Call source End 0 cd constructor Call source End cd source End cd constructor Call source Start cd source Start  ConstructorDeclaration CompilationUnitDeclaration recordLineSeparator goForBlockStatementsopt recordLineSeparator recordLineSeparator nestedMethod nestedType pushOnRealBlockStack referenceContext compilationUnit resetTo bodyStart bodyEnd AbortCompilation lastAct ERROR_ACTION nestedMethod nestedType checkNonNLSAfterBodyEnd declarationSourceEnd lastAct ERROR_ACTION explicitDeclarations realBlockStack realBlockPtr astLengthStack astLengthPtr astPtr astStack astPtr ExplicitConstructorCall isSomeThing astStack astPtr constructorCall ExplicitConstructorCall astStack astPtr astStack astPtr constructorCall SuperReference implicitSuperConstructorCall constructorCall SuperReference implicitSuperConstructorCall containsComment bodyStart bodyEnd ASTNode UndocumentedEmptyBlockMASK constructorCall sourceEnd constructorCall sourceEnd sourceEnd constructorCall sourceStart sourceStart
public void parse Field Declaration field Type Declaration type Compilation Unit Declaration unit char initialization Source only parse the initialization Source of the given field convert bugs into parse error initialize go For Expression this nested Method this nested Type this reference Context type this compilation Unit unit this scanner set Source initialization Source this scanner reset To 0 initialization Source length 1 try parse catch Abort Compilation ex this last Act ERROR ACTION finally this nested Method this nested Type if this last Act ERROR ACTION return field initialization this expression Stack this expression Ptr mark field with local type if one was found during parsing if type bits AST Node Has Local TypeMASK 0 field bits AST Node Has Local TypeMASK  FieldDeclaration TypeDeclaration CompilationUnitDeclaration initializationSource initializationSource goForExpression nestedMethod nestedType referenceContext compilationUnit setSource initializationSource resetTo initializationSource AbortCompilation lastAct ERROR_ACTION nestedMethod nestedType lastAct ERROR_ACTION expressionStack expressionPtr ASTNode HasLocalTypeMASK ASTNode HasLocalTypeMASK
public void parse Initializer initializer Type Declaration type Compilation Unit Declaration unit only parse the method body of md fill out method statements convert bugs into parse error initialize go For Block Statementsopt this nested Method this nested Type push On Real Block Stack 0 this reference Context type this compilation Unit unit this scanner reset To initializer body Start initializer body End just on the beginning try parse catch Abort Compilation ex this last Act ERROR ACTION finally this nested Method this nested Type check NonNLS After Body End initializer declaration Source End if this last Act ERROR ACTION return refill statements initializer block explicit Declarations this real Block Stack this real Block Ptr int length if length this ast Length Stack this ast Length Ptr 0 System arraycopy this ast Stack this ast Ptr length 1 initializer block statements new Statement length 0 length else check whether this block at least contains some comment in it if contains Comment initializer block source Start initializer block source End initializer block bits AST Node Undocumented Empty BlockMASK mark initializer with local type if one was found during parsing if type bits AST Node Has Local TypeMASK 0 initializer bits AST Node Has Local TypeMASK  TypeDeclaration CompilationUnitDeclaration goForBlockStatementsopt nestedMethod nestedType pushOnRealBlockStack referenceContext compilationUnit resetTo bodyStart bodyEnd AbortCompilation lastAct ERROR_ACTION nestedMethod nestedType checkNonNLSAfterBodyEnd declarationSourceEnd lastAct ERROR_ACTION explicitDeclarations realBlockStack realBlockPtr astLengthStack astLengthPtr astStack astPtr containsComment sourceStart sourceEnd ASTNode UndocumentedEmptyBlockMASK ASTNode HasLocalTypeMASK ASTNode HasLocalTypeMASK
public void parse Method Declaration md Compilation Unit Declaration unit only parse the method body of md fill out method statements convert bugs into parse error if md is Abstract return if md is Native return if md modifiers Acc Semicolon Body 0 return initialize go For Block Statementsopt this nested Method this nested Type push On Real Block Stack 0 this reference Context md this compilation Unit unit this scanner reset To md body Start md body End reset the scanner to parser from down to try parse catch Abort Compilation ex this last Act ERROR ACTION finally this nested Method this nested Type check NonNLS After Body End md declaration Source End if this last Act ERROR ACTION return refill statements md explicit Declarations this real Block Stack this real Block Ptr int length if length this ast Length Stack this ast Length Ptr 0 System arraycopy this ast Stack this ast Ptr length 1 md statements new Statement length 0 length else if contains Comment md body Start md body End md bits AST Node Undocumented Empty BlockMASK  MethodDeclaration CompilationUnitDeclaration isAbstract isNative AccSemicolonBody goForBlockStatementsopt nestedMethod nestedType pushOnRealBlockStack referenceContext compilationUnit resetTo bodyStart bodyEnd AbortCompilation lastAct ERROR_ACTION nestedMethod nestedType checkNonNLSAfterBodyEnd declarationSourceEnd lastAct ERROR_ACTION explicitDeclarations realBlockStack realBlockPtr astLengthStack astLengthPtr astStack astPtr containsComment bodyStart bodyEnd ASTNode UndocumentedEmptyBlockMASK
public Compilation Unit Declaration parse I Compilation Unit source Unit Compilation Result compilation Result parses a compilation unit and manages error handling even bugs return parse source Unit compilation Result 1 1 parse without reseting the scanner  CompilationUnitDeclaration ICompilationUnit sourceUnit CompilationResult compilationResult sourceUnit compilationResult
public Compilation Unit Declaration parse I Compilation Unit source Unit Compilation Result compilation Result int start int end parses a compilation unit and manages error handling even bugs Compilation Unit Declaration unit try automaton initialization initialize go For Compilation Unit scanners initialization char contents source Unit get Contents this scanner set Source contents if end 1 this scanner reset To start end if this javadoc Parser null this javadoc Parser check Doc Comment this javadoc Parser scanner set Source contents if end 1 this javadoc Parser scanner reset To start end unit creation this reference Context this compilation Unit new Compilation Unit Declaration this problem Reporter compilation Result this scanner source length run automaton parse finally unit this compilation Unit this compilation Unit null reset parser tag unit has having read bodies if this diet unit bits AST Node Has All Method Bodies return unit  CompilationUnitDeclaration ICompilationUnit sourceUnit CompilationResult compilationResult CompilationUnitDeclaration goForCompilationUnit sourceUnit getContents setSource resetTo javadocParser javadocParser checkDocComment javadocParser setSource javadocParser resetTo referenceContext compilationUnit CompilationUnitDeclaration problemReporter compilationResult compilationUnit compilationUnit ASTNode HasAllMethodBodies
public AST Node parse Class Body Declarations char source int offset int length Compilation Unit Declaration unit automaton initialization initialize go For Class Body Declarations scanner initialization this scanner set Source source this scanner reset To offset offset length 1 if this javadoc Parser null this javadoc Parser check Doc Comment this javadoc Parser scanner set Source source this javadoc Parser scanner reset To offset offset length 1 type declaration should be parsed as member type declaration this nested Type 1 unit creation this reference Context unit this compilation Unit unit run automaton try parse catch Abort Compilation ex this last Act ERROR ACTION if this last Act ERROR ACTION return null int ast Length if ast Length this ast Length Stack this ast Length Ptr 0 AST Node result new AST Node ast Length this ast Ptr ast Length System arraycopy this ast Stack this ast Ptr 1 result 0 ast Length return result return null  ASTNode parseClassBodyDeclarations CompilationUnitDeclaration goForClassBodyDeclarations setSource resetTo javadocParser javadocParser checkDocComment javadocParser setSource javadocParser resetTo nestedType referenceContext compilationUnit AbortCompilation lastAct ERROR_ACTION lastAct ERROR_ACTION astLength astLength astLengthStack astLengthPtr ASTNode ASTNode astLength astPtr astLength astStack astPtr astLength
public Expression parse Expression char source int offset int length Compilation Unit Declaration unit initialize go For Expression this nested Method this nested Type this reference Context unit this compilation Unit unit this scanner set Source source this scanner reset To offset offset length 1 try parse catch Abort Compilation ex this last Act ERROR ACTION finally this nested Method this nested Type if this last Act ERROR ACTION return null return this expression Stack this expression Ptr  parseExpression CompilationUnitDeclaration goForExpression nestedMethod nestedType referenceContext compilationUnit setSource resetTo AbortCompilation lastAct ERROR_ACTION nestedMethod nestedType lastAct ERROR_ACTION expressionStack expressionPtr
public void persist Line Separator Positions if this scanner record Line Separator this compilation Unit compilation Result line Separator Positions this scanner get Line Ends  persistLineSeparatorPositions recordLineSeparator compilationUnit compilationResult lineSeparatorPositions getLineEnds
Returns this parser s problem reporter initialized with its reference context Also it is assumed that a problem is going to be reported so initializes the compilation result s line positions return Problem Reporter public Problem Reporter problem Reporter if this scanner record Line Separator this compilation Unit compilation Result line Separator Positions this scanner get Line Ends this problem Reporter reference Context this reference Context return this problem Reporter  ProblemReporter ProblemReporter problemReporter recordLineSeparator compilationUnit compilationResult lineSeparatorPositions getLineEnds problemReporter referenceContext referenceContext problemReporter
protected void push Identifier push the consume Token on the identifier stack Increase the total number of identifier in the stack identifier Ptr points on the next top int stack Length this identifier Stack length if this identifier Ptr stack Length System arraycopy this identifier Stack 0 this identifier Stack new char stack Length 20 0 stack Length System arraycopy this identifier Position Stack 0 this identifier Position Stack new long stack Length 20 0 stack Length this identifier Stack this identifier Ptr this scanner get Current Identifier Source this identifier Position Stack this identifier Ptr long this scanner start Position 32 this scanner current Position 1 stack Length this identifier Length Stack length if this identifier Length Ptr stack Length System arraycopy this identifier Length Stack 0 this identifier Length Stack new int stack Length 10 0 stack Length this identifier Length Stack this identifier Length Ptr 1  pushIdentifier consumeToken identifierPtr stackLength identifierStack identifierPtr stackLength identifierStack identifierStack stackLength stackLength identifierPositionStack identifierPositionStack stackLength stackLength identifierStack identifierPtr getCurrentIdentifierSource identifierPositionStack identifierPtr startPosition currentPosition stackLength identifierLengthStack identifierLengthPtr stackLength identifierLengthStack identifierLengthStack stackLength stackLength identifierLengthStack identifierLengthPtr
protected void push Identifier int flag push a special flag on the stack zero stands for optional Name negative number for direct ref to base types identifier Length Ptr points on the top int stack Length this identifier Length Stack length if this identifier Length Ptr stack Length System arraycopy this identifier Length Stack 0 this identifier Length Stack new int stack Length 10 0 stack Length this identifier Length Stack this identifier Length Ptr flag  pushIdentifier identifierLengthPtr stackLength identifierLengthStack identifierLengthPtr stackLength identifierLengthStack identifierLengthStack stackLength stackLength identifierLengthStack identifierLengthPtr
protected void push On Ast Length Stack int pos int stack Length this ast Length Stack length if this ast Length Ptr stack Length System arraycopy this ast Length Stack 0 this ast Length Stack new int stack Length Stack Increment 0 stack Length this ast Length Stack this ast Length Ptr pos  pushOnAstLengthStack stackLength astLengthStack astLengthPtr stackLength astLengthStack astLengthStack stackLength StackIncrement stackLength astLengthStack astLengthPtr
protected void push On Ast Stack AST Node node add a new obj on top of the ast stack ast Ptr points on the top int stack Length this ast Stack length if this ast Ptr stack Length System arraycopy this ast Stack 0 this ast Stack new AST Node stack Length Ast Stack Increment 0 stack Length this ast Ptr stack Length this ast Stack this ast Ptr node stack Length this ast Length Stack length if this ast Length Ptr stack Length System arraycopy this ast Length Stack 0 this ast Length Stack new int stack Length Ast Stack Increment 0 stack Length this ast Length Stack this ast Length Ptr 1  pushOnAstStack ASTNode astPtr stackLength astStack astPtr stackLength astStack astStack ASTNode stackLength AstStackIncrement stackLength astPtr stackLength astStack astPtr stackLength astLengthStack astLengthPtr stackLength astLengthStack astLengthStack stackLength AstStackIncrement stackLength astLengthStack astLengthPtr
protected void push On Expression Stack Expression expr int stack Length this expression Stack length if this expression Ptr stack Length System arraycopy this expression Stack 0 this expression Stack new Expression stack Length Expression Stack Increment 0 stack Length this expression Stack this expression Ptr expr stack Length this expression Length Stack length if this expression Length Ptr stack Length System arraycopy this expression Length Stack 0 this expression Length Stack new int stack Length Expression Stack Increment 0 stack Length this expression Length Stack this expression Length Ptr 1  pushOnExpressionStack stackLength expressionStack expressionPtr stackLength expressionStack expressionStack stackLength ExpressionStackIncrement stackLength expressionStack expressionPtr stackLength expressionLengthStack expressionLengthPtr stackLength expressionLengthStack expressionLengthStack stackLength ExpressionStackIncrement stackLength expressionLengthStack expressionLengthPtr
protected void push On Expression Stack Length Stack int pos int stack Length this expression Length Stack length if this expression Length Ptr stack Length System arraycopy this expression Length Stack 0 this expression Length Stack new int stack Length Stack Increment 0 stack Length this expression Length Stack this expression Length Ptr pos  pushOnExpressionStackLengthStack stackLength expressionLengthStack expressionLengthPtr stackLength expressionLengthStack expressionLengthStack stackLength StackIncrement stackLength expressionLengthStack expressionLengthPtr
protected void push On Int Stack int pos int stack Length this int Stack length if this int Ptr stack Length System arraycopy this int Stack 0 this int Stack new int stack Length Stack Increment 0 stack Length this int Stack this int Ptr pos  pushOnIntStack stackLength intStack intPtr stackLength intStack intStack stackLength StackIncrement stackLength intStack intPtr
protected void push On Real Block Stack int i int stack Length this real Block Stack length if this real Block Ptr stack Length System arraycopy this real Block Stack 0 this real Block Stack new int stack Length Stack Increment 0 stack Length this real Block Stack this real Block Ptr i  pushOnRealBlockStack stackLength realBlockStack realBlockPtr stackLength realBlockStack realBlockStack stackLength StackIncrement stackLength realBlockStack realBlockPtr
protected static char read Table String filename throws java io IO Exception files are located at Parser class directory Input Stream stream Parser class get Resource As Stream filename if stream null throw new java io IO Exception Util bind parser missing File filename NON NLS 1 byte bytes null try stream new Buffered Input Stream stream bytes Util get Input Stream As Byte Array stream 1 finally try stream close catch IO Exception e ignore minimal integrity check even size expected int length bytes length if length 2 0 throw new java io IO Exception Util bind parser corrupted File filename NON NLS 1 convert bytes into chars char chars new char length 2 int i 0 int char Index 0 while true chars char Index char bytes i 0xFF 8 bytes i 0xFF if i length break return chars  readTable IOException InputStream getResourceAsStream IOException missingFile BufferedInputStream getInputStreamAsByteArray IOException IOException corruptedFile charIndex charIndex
protected static byte read Byte Table String filename throws java io IO Exception files are located at Parser class directory Input Stream stream Parser class get Resource As Stream filename if stream null throw new java io IO Exception Util bind parser missing File filename NON NLS 1 byte bytes null try stream new Buffered Input Stream stream bytes Util get Input Stream As Byte Array stream 1 finally try stream close catch IO Exception e ignore return bytes  readByteTable IOException InputStream getResourceAsStream IOException missingFile BufferedInputStream getInputStreamAsByteArray IOException
protected static String read Readable Name Table String filename String result new String name length Resource Bundle bundle try bundle Resource Bundle get Bundle filename Locale get Default catch Missing Resource Exception e System out println Missing resource filename replace properties for locale Locale get Default NON NLS 1 NON NLS 2 throw e for int i 0 i NT OFFSET 1 i result i name i for int i NT OFFSET i name length i try String n bundle get String name i if n null n length 0 result i n else result i name i catch Missing Resource Exception e result i name i return result  readReadableNameTable ResourceBundle ResourceBundle getBundle getDefault MissingResourceException getDefault NT_OFFSET NT_OFFSET getString MissingResourceException
protected static String read Name Table String filename throws java io IO Exception char contents read Table filename char name As Char Char Operation split On n contents String result new String name As Char length 1 result 0 null for int i 0 i name As Char length i result i 1 new String name As Char i return result  readNameTable IOException readTable nameAsChar CharOperation splitOn nameAsChar nameAsChar nameAsChar
public void recovery Exit From Variable if this current Element null this current Element parent null if this current Element instanceof Recovered Local Variable int end Recovered Local Variable this current Element local Declaration source End this current Element update Source End If Necessary end this current Element this current Element parent else if this current Element instanceof Recovered Field this current Element instanceof Recovered Initializer int end Recovered Field this current Element field Declaration source End this current Element update Source End If Necessary end this current Element this current Element parent  recoveryExitFromVariable currentElement currentElement currentElement RecoveredLocalVariable RecoveredLocalVariable currentElement localDeclaration sourceEnd currentElement updateSourceEndIfNecessary currentElement currentElement currentElement RecoveredField currentElement RecoveredInitializer RecoveredField currentElement fieldDeclaration sourceEnd currentElement updateSourceEndIfNecessary currentElement currentElement
public void recovery Token Check switch this current Token case Token NameLBRACE Recovered Element new Element null if this ignore Next Opening Brace new Element this current Element update On Opening Brace this scanner start Position 1 this scanner current Position 1 this last Check Point this scanner current Position if new Element null null means nothing happened this restart Recovery true opening brace detected this current Element new Element break case Token NameRBRACE this r Brace Start this scanner start Position 1 this r Brace End this scanner current Position 1 this end Position this flush Comments Defined Prior To this r Brace End new Element this current Element update On Closing Brace this scanner start Position this r Brace End this last Check Point this scanner current Position if new Element this current Element this current Element new Element break case Token NameSEMICOLON this end Statement Position this scanner current Position 1 this end Position this scanner start Position 1 fall through default if this r Brace End this r Brace Successor Start this scanner current Position this scanner start Position this r Brace Successor Start this scanner start Position break this ignore Next Opening Brace false  recoveryTokenCheck currentToken TokenNameLBRACE RecoveredElement newElement ignoreNextOpeningBrace newElement currentElement updateOnOpeningBrace startPosition currentPosition lastCheckPoint currentPosition newElement restartRecovery currentElement newElement TokenNameRBRACE rBraceStart startPosition rBraceEnd currentPosition endPosition flushCommentsDefinedPriorTo rBraceEnd newElement currentElement updateOnClosingBrace startPosition rBraceEnd lastCheckPoint currentPosition newElement currentElement currentElement newElement TokenNameSEMICOLON endStatementPosition currentPosition endPosition startPosition rBraceEnd rBraceSuccessorStart currentPosition startPosition rBraceSuccessorStart startPosition ignoreNextOpeningBrace
protected void reset Modifiers this modifiers Acc Default this modifiers Source Start 1 see comment into modifiers Flag int this scanner comment Ptr 1  resetModifiers AccDefault modifiersSourceStart modifiersFlag commentPtr
protected void reset Stacks this ast Ptr 1 this ast Length Ptr 1 this expression Ptr 1 this expression Length Ptr 1 this identifier Ptr 1 this identifier Length Ptr 1 this int Ptr 1 this nested Method this nested Type 0 0 need to reset for further reuse this variables Counter this nested Type 0 this dimensions 0 this real Block Stack this real Block Ptr 0 0 this recovered Static Initializer Start 0 this list Length 0 Fix for http dev eclipse org bugs show bug cgi id 29365 if this scanner null this scanner current Line null  resetStacks astPtr astLengthPtr expressionPtr expressionLengthPtr identifierPtr identifierLengthPtr intPtr nestedMethod nestedType variablesCounter nestedType realBlockStack realBlockPtr recoveredStaticInitializerStart listLength show_bug currentLine
protected boolean resume After Recovery Reset javadoc before restart parsing after recovery this javadoc null reset internal stacks this reset Stacks attempt to move checkpoint location if this move Recovery Checkpoint return false only look for headers if this reference Context instanceof Compilation Unit Declaration go For Headers this diet true passed this point will not consider method bodies return true does not know how to restart return false  resumeAfterRecovery resetStacks moveRecoveryCheckpoint referenceContext CompilationUnitDeclaration goForHeaders
protected boolean resume On Syntax Error request recovery initialization if this current Element null this current Element this build Initial Recovery State build some recovered elements do not investigate deeper in recovery when no recovered element if this current Element null return false manual forced recovery restart after headers if this restart Recovery this restart Recovery false update recovery state with current error state of the parser this update Recovery State attempt to reset state in order to resume to parse loop return this resume After Recovery  resumeOnSyntaxError currentElement currentElement buildInitialRecoveryState currentElement restartRecovery restartRecovery updateRecoveryState resumeAfterRecovery
return this resume After Recovery public static int t Action int state int sym return term action term check base action state sym sym base action state sym base action state  resumeAfterRecovery tAction term_action term_check base_action base_action base_action
public String to String String s identifier Stack char NON NLS 1 for int i 0 i this identifier Ptr i s s String value Of this identifier Stack i NON NLS 1 NON NLS 2 s s n NON NLS 1 s s identier Length Stack int NON NLS 1 for int i 0 i this identifier Length Ptr i s s this identifier Length Stack i NON NLS 1 s s n NON NLS 1 s s ast Length Stack int NON NLS 1 for int i 0 i this ast Length Ptr i s s this ast Length Stack i NON NLS 1 s s n NON NLS 1 s s ast Ptr int String value Of this ast Ptr n NON NLS 1 NON NLS 2 s s int Stack int NON NLS 1 for int i 0 i this int Ptr i s s this int Stack i NON NLS 1 s s n NON NLS 1 s s expression Length Stack int NON NLS 1 for int i 0 i this expression Length Ptr i s s this expression Length Stack i NON NLS 1 s s n NON NLS 1 s s expression Ptr int String value Of this expression Ptr n NON NLS 1 NON NLS 2 s s n n n Scanner n this scanner to String NON NLS 1 return s  toString identifierStack identifierPtr valueOf identifierStack identierLengthStack identifierLengthPtr identifierLengthStack astLengthStack astLengthPtr astLengthStack astPtr valueOf astPtr intStack intPtr intStack expressionLengthStack expressionLengthPtr expressionLengthStack expressionPtr valueOf expressionPtr toString
protected void update Recovery State expose parser state to recovery state this current Element update From Parser State check and update recovered state based on current token this action is also performed when shifting token after recovery got activated once this recovery Token Check  updateRecoveryState currentElement updateFromParserState recoveryTokenCheck
protected void update Source Declaration Parts int variable Declarators Counter fields is a definition of fields that are grouped together like in public int a b c which results into 3 fields Field Declaration field int end Type Declaration Position 1 this ast Stack this ast Ptr variable Declarators Counter 1 source Start for int i 0 i variable Declarators Counter 1 i last one is special see below field Field Declaration this ast Stack this ast Ptr i 1 field end Part1 Position end Type Declaration Position field end Part2 Position 1 this ast Stack this ast Ptr i source Start last one field Field Declaration this ast Stack this ast Ptr end Part1 Position end Type Declaration Position field end Part2 Position field declaration Source End  updateSourceDeclarationParts variableDeclaratorsCounter FieldDeclaration endTypeDeclarationPosition astStack astPtr variableDeclaratorsCounter sourceStart variableDeclaratorsCounter FieldDeclaration astStack astPtr endPart1Position endTypeDeclarationPosition endPart2Position astStack astPtr sourceStart FieldDeclaration astStack astPtr endPart1Position endTypeDeclarationPosition endPart2Position declarationSourceEnd
protected void update Source Position Expression exp update the source Position of the expression int Stack int int int Stack exp source End this int Stack this int Ptr exp source Start this int Stack this int Ptr  updateSourcePosition intStack intStack sourceEnd intStack intPtr sourceStart intStack intPtr

public Recovered Block Block block Recovered Element parent int bracket Balance super block parent bracket Balance this block Declaration block this found Opening Brace true  RecoveredBlock RecoveredElement bracketBalance bracketBalance blockDeclaration foundOpeningBrace
public Recovered Element add Block nested Block Declaration int bracket Balance Value do not consider a nested block starting passed the block end if set it must be belonging to an enclosing block if this block Declaration source End 0 nested Block Declaration source Start this block Declaration source End return this parent add nested Block Declaration bracket Balance Value Recovered Block element new Recovered Block nested Block Declaration this bracket Balance Value if we have a pending Argument promote it into the new block if this pending Argument null element attach this pending Argument this pending Argument null this attach element if nested Block Declaration source End 0 return element return this  RecoveredElement nestedBlockDeclaration bracketBalanceValue blockDeclaration sourceEnd nestedBlockDeclaration sourceStart blockDeclaration sourceEnd nestedBlockDeclaration bracketBalanceValue RecoveredBlock RecoveredBlock nestedBlockDeclaration bracketBalanceValue pendingArgument pendingArgument pendingArgument nestedBlockDeclaration sourceEnd
Record a local declaration public Recovered Element add Local Declaration local Declaration int bracket Balance Value return this add local Declaration bracket Balance Value false  RecoveredElement LocalDeclaration localDeclaration bracketBalanceValue localDeclaration bracketBalanceValue
public Recovered Element add Local Declaration local Declaration int bracket Balance Value boolean delegated By Parent local variables inside method can only be final and non void char local Type Name if local Declaration modifiers Acc Final 0 local var can only be final local Declaration type null initializer local Type Name local Declaration type get Type Name length 1 non void Char Operation equals local Type Name 0 Void Binding source Name if delegated By Parent return this ignore else this update Source End If Necessary this previous Available Line End local Declaration declaration Source Start 1 return this parent add local Declaration bracket Balance do not consider a local variable starting passed the block end if set it must be belonging to an enclosing block if this block Declaration source End 0 local Declaration declaration Source Start this block Declaration source End if delegated By Parent return this ignore return this parent add local Declaration bracket Balance Value Recovered Local Variable element new Recovered Local Variable local Declaration this bracket Balance Value if local Declaration instanceof Argument this pending Argument element return this this attach element if local Declaration declaration Source End 0 return element return this  RecoveredElement LocalDeclaration localDeclaration bracketBalanceValue delegatedByParent localTypeName localDeclaration AccFinal localDeclaration localTypeName localDeclaration getTypeName CharOperation localTypeName VoidBinding sourceName delegatedByParent updateSourceEndIfNecessary previousAvailableLineEnd localDeclaration declarationSourceStart localDeclaration bracketBalance blockDeclaration sourceEnd localDeclaration declarationSourceStart blockDeclaration sourceEnd delegatedByParent localDeclaration bracketBalanceValue RecoveredLocalVariable RecoveredLocalVariable localDeclaration bracketBalanceValue localDeclaration pendingArgument localDeclaration declarationSourceEnd
Record a statement declaration public Recovered Element add Statement stmt int bracket Balance Value return this add stmt bracket Balance Value false  RecoveredElement bracketBalanceValue bracketBalanceValue
public Recovered Element add Statement stmt int bracket Balance Value boolean delegated By Parent do not consider a nested block starting passed the block end if set it must be belonging to an enclosing block if this block Declaration source End 0 stmt source Start this block Declaration source End if delegated By Parent return this ignore return this parent add stmt bracket Balance Value Recovered Statement element new Recovered Statement stmt this bracket Balance Value this attach element if stmt source End 0 return element return this  RecoveredElement bracketBalanceValue delegatedByParent blockDeclaration sourceEnd sourceStart blockDeclaration sourceEnd delegatedByParent bracketBalanceValue RecoveredStatement RecoveredStatement bracketBalanceValue sourceEnd
Addition of a type to an initializer act like inside method body public Recovered Element add Type Declaration type Declaration int bracket Balance Value return this add type Declaration bracket Balance Value false  RecoveredElement TypeDeclaration typeDeclaration bracketBalanceValue typeDeclaration bracketBalanceValue
public Recovered Element add Type Declaration type Declaration int bracket Balance Value boolean delegated By Parent do not consider a type starting passed the block end if set it must be belonging to an enclosing block if this block Declaration source End 0 type Declaration declaration Source Start this block Declaration source End if delegated By Parent return this ignore return this parent add type Declaration bracket Balance Value Recovered Statement element new Recovered Type type Declaration this bracket Balance Value this attach element if type Declaration declaration Source End 0 return element return this  RecoveredElement TypeDeclaration typeDeclaration bracketBalanceValue delegatedByParent blockDeclaration sourceEnd typeDeclaration declarationSourceStart blockDeclaration sourceEnd delegatedByParent typeDeclaration bracketBalanceValue RecoveredStatement RecoveredType typeDeclaration bracketBalanceValue typeDeclaration declarationSourceEnd
void attach Recovered Statement recovered Statement if this statements null this statements new Recovered Statement 5 this statement Count 0 else if this statement Count this statements length System arraycopy this statements 0 this statements new Recovered Statement 2 this statement Count 0 this statement Count this statements this statement Count recovered Statement  RecoveredStatement recoveredStatement RecoveredStatement statementCount statementCount RecoveredStatement statementCount statementCount statementCount recoveredStatement
Answer the associated parsed structure public AST Node parse Tree return this block Declaration  ASTNode parseTree blockDeclaration
public String to String int tab String Buffer result new String Buffer tab String tab result append Recovered block n NON NLS 1 this block Declaration print tab 1 result if this statements null for int i 0 i this statement Count i result append n NON NLS 1 result append this statements i to String tab 1 return result to String  toString StringBuffer StringBuffer tabString blockDeclaration statementCount toString toString
public Block updated Block if block was not marked to be preserved or empty then ignore it if this preserve Content this statement Count 0 return null Statement updated Statements new Statement this statement Count int updated Count 0 only collect the non null updated statements for int i 0 i this statement Count i Statement updated Statement this statements i updated Statement if updated Statement null updated Statements updated Count updated Statement if updated Count 0 return null not interesting block resize statement collection if necessary if updated Count this statement Count this block Declaration statements new Statement updated Count System arraycopy updated Statements 0 this block Declaration statements 0 updated Count else this block Declaration statements updated Statements return this block Declaration  updatedBlock preserveContent statementCount updatedStatements statementCount updatedCount statementCount updatedStatement updatedStatement updatedStatement updatedStatements updatedCount updatedStatement updatedCount updatedCount statementCount blockDeclaration updatedCount updatedStatements blockDeclaration updatedCount blockDeclaration updatedStatements blockDeclaration
Rebuild a statement from the nested structure which is in scope public Statement updated Statement return this updated Block  updatedStatement updatedBlock
public Recovered Element update On Closing Brace int brace Start int brace End if this bracket Balance 0 this parent null this update Source End If Necessary brace Start brace End if the block is the method body then it closes the method too Recovered Method method enclosing Method if method null method method Body this return this parent update On Closing Brace brace Start brace End Recovered Initializer initializer enclosing Initializer if initializer null initializer initializer Body this return this parent update On Closing Brace brace Start brace End return this parent return this  RecoveredElement updateOnClosingBrace braceStart braceEnd bracketBalance updateSourceEndIfNecessary braceStart braceEnd RecoveredMethod enclosingMethod methodBody updateOnClosingBrace braceStart braceEnd RecoveredInitializer enclosingInitializer initializerBody updateOnClosingBrace braceStart braceEnd
public Recovered Element update On Opening Brace int brace Start int brace End create a nested block Block block new Block 0 block source Start parser scanner start Position return this add block 1  RecoveredElement updateOnOpeningBrace braceStart braceEnd sourceStart startPosition
Final update the corresponding parse node public void update Parse Tree this updated Block  updateParseTree updatedBlock
public Statement update Statement if block was closed or empty then ignore it if this block Declaration source End 0 this statement Count 0 return null Statement updated Statements new Statement this statement Count int updated Count 0 only collect the non null updated statements for int i 0 i this statement Count i Statement updated Statement this statements i updated Statement if updated Statement null updated Statements updated Count updated Statement if updated Count 0 return null not interesting block resize statement collection if necessary if updated Count this statement Count this block Declaration statements new Statement updated Count System arraycopy updated Statements 0 this block Declaration statements 0 updated Count else this block Declaration statements updated Statements return this block Declaration  updateStatement blockDeclaration sourceEnd statementCount updatedStatements statementCount updatedCount statementCount updatedStatement updatedStatement updatedStatement updatedStatements updatedCount updatedStatement updatedCount updatedCount statementCount blockDeclaration updatedCount updatedStatements blockDeclaration updatedCount blockDeclaration updatedStatements blockDeclaration
public Recovered Element add Field Declaration field Declaration int bracket Balance Value local variables inside method can only be final and non void char field Type Name if field Declaration modifiers Acc Final 0 local var can only be final field Declaration type null initializer field Type Name field Declaration type get Type Name length 1 non void Char Operation equals field Type Name 0 Void Binding source Name this update Source End If Necessary this previous Available Line End field Declaration declaration Source Start 1 return this parent add field Declaration bracket Balance Value do not consider a local variable starting passed the block end if set it must be belonging to an enclosing block if this block Declaration source End 0 field Declaration declaration Source Start this block Declaration source End return this parent add field Declaration bracket Balance Value ignore the added field since indicates a local variable behind recovery point which thus got parsed as a field reference This can happen if restarting after having reduced an assist Node to get the following context see 1GEK7SG return this  RecoveredElement FieldDeclaration fieldDeclaration bracketBalanceValue fieldTypeName fieldDeclaration AccFinal fieldDeclaration fieldTypeName fieldDeclaration getTypeName CharOperation fieldTypeName VoidBinding sourceName updateSourceEndIfNecessary previousAvailableLineEnd fieldDeclaration declarationSourceStart fieldDeclaration bracketBalanceValue blockDeclaration sourceEnd fieldDeclaration declarationSourceStart blockDeclaration sourceEnd fieldDeclaration bracketBalanceValue assistNode

public boolean found Opening Brace protected Parser recovering Parser public Recovered Element Recovered Element parent int bracket Balance this parent bracket Balance null  foundOpeningBrace recoveringParser RecoveredElement RecoveredElement bracketBalance bracketBalance
public Recovered Element Recovered Element parent int bracket Balance Parser parser this parent parent this bracket Balance bracket Balance this recovering Parser parser  RecoveredElement RecoveredElement bracketBalance bracketBalance bracketBalance recoveringParser
public Recovered Element add Abstract Method Declaration method Declaration int bracket Balance Value default behavior is to delegate recording to parent if any if this parent null return this ignore this update Source End If Necessary this previous Available Line End method Declaration declaration Source Start 1 return this parent add method Declaration bracket Balance Value  RecoveredElement AbstractMethodDeclaration methodDeclaration bracketBalanceValue updateSourceEndIfNecessary previousAvailableLineEnd methodDeclaration declarationSourceStart methodDeclaration bracketBalanceValue
public Recovered Element add Block nested Block Declaration int bracket Balance Value default behavior is to delegate recording to parent if any if this parent null return this ignore this update Source End If Necessary this previous Available Line End nested Block Declaration source Start 1 return this parent add nested Block Declaration bracket Balance Value  RecoveredElement nestedBlockDeclaration bracketBalanceValue updateSourceEndIfNecessary previousAvailableLineEnd nestedBlockDeclaration sourceStart nestedBlockDeclaration bracketBalanceValue
public Recovered Element add Field Declaration field Declaration int bracket Balance Value default behavior is to delegate recording to parent if any if this parent null return this ignore this update Source End If Necessary this previous Available Line End field Declaration declaration Source Start 1 return this parent add field Declaration bracket Balance Value  RecoveredElement FieldDeclaration fieldDeclaration bracketBalanceValue updateSourceEndIfNecessary previousAvailableLineEnd fieldDeclaration declarationSourceStart fieldDeclaration bracketBalanceValue
public Recovered Element add Import Reference import Reference int bracket Balance Value default behavior is to delegate recording to parent if any if this parent null return this ignore this update Source End If Necessary this previous Available Line End import Reference declaration Source Start 1 return this parent add import Reference bracket Balance Value  RecoveredElement ImportReference importReference bracketBalanceValue updateSourceEndIfNecessary previousAvailableLineEnd importReference declarationSourceStart importReference bracketBalanceValue
public Recovered Element add Local Declaration local Declaration int bracket Balance Value default behavior is to delegate recording to parent if any if this parent null return this ignore this update Source End If Necessary this previous Available Line End local Declaration declaration Source Start 1 return this parent add local Declaration bracket Balance Value  RecoveredElement LocalDeclaration localDeclaration bracketBalanceValue updateSourceEndIfNecessary previousAvailableLineEnd localDeclaration declarationSourceStart localDeclaration bracketBalanceValue
public Recovered Element add Statement statement int bracket Balance Value default behavior is to delegate recording to parent if any if this parent null return this ignore this update Source End If Necessary this previous Available Line End statement source Start 1 return this parent add statement bracket Balance Value  RecoveredElement bracketBalanceValue updateSourceEndIfNecessary previousAvailableLineEnd sourceStart bracketBalanceValue
public Recovered Element add Type Declaration type Declaration int bracket Balance Value default behavior is to delegate recording to parent if any if this parent null return this ignore this update Source End If Necessary this previous Available Line End type Declaration declaration Source Start 1 return this parent add type Declaration bracket Balance Value  RecoveredElement TypeDeclaration typeDeclaration bracketBalanceValue updateSourceEndIfNecessary previousAvailableLineEnd typeDeclaration declarationSourceStart typeDeclaration bracketBalanceValue
public int depth int depth 0 Recovered Element current this while current current parent null depth return depth  RecoveredElement
public Recovered Initializer enclosing Initializer Recovered Element current this while current null if current instanceof Recovered Initializer return Recovered Initializer current current current parent return null  RecoveredInitializer enclosingInitializer RecoveredElement RecoveredInitializer RecoveredInitializer
public Recovered Method enclosing Method Recovered Element current this while current null if current instanceof Recovered Method return Recovered Method current current current parent return null  RecoveredMethod enclosingMethod RecoveredElement RecoveredMethod RecoveredMethod
public Recovered Type enclosing Type Recovered Element current this while current null if current instanceof Recovered Type return Recovered Type current current current parent return null  RecoveredType enclosingType RecoveredElement RecoveredType RecoveredType
public Parser parser Recovered Element current this while current null if current recovering Parser null return current recovering Parser current current parent return null  RecoveredElement recoveringParser recoveringParser
Answer the associated parsed structure public AST Node parse Tree return null  ASTNode parseTree
public void preserve Enclosing Blocks Recovered Element current this while current null if current instanceof Recovered Block Recovered Block current preserve Content true if current instanceof Recovered Type for anonymous types Recovered Type current preserve Content true current current parent  preserveEnclosingBlocks RecoveredElement RecoveredBlock RecoveredBlock preserveContent RecoveredType RecoveredType preserveContent
public int previous Available Line End int position Parser parser this parser if parser null return position Scanner scanner parser scanner if scanner line Ends null return position int index scanner get Line Number position if index 2 return position int previous Line End scanner line Ends index 2 char source scanner source for int i previous Line End 1 i position i if source i source i t return position return previous Line End  previousAvailableLineEnd lineEnds getLineNumber previousLineEnd lineEnds previousLineEnd previousLineEnd
Answer the very source end of the corresponding parse node public int source End return 0  sourceEnd
protected String tab String int tab String Buffer result new String Buffer for int i tab i 0 i result append NON NLS 1 return result to String  tabString StringBuffer StringBuffer toString
public Recovered Element top Element Recovered Element current this while current parent null current current parent return current  RecoveredElement topElement RecoveredElement
return current public String to String return to String 0  toString toString
return to String 0 public String to String int tab return super to String  toString toString toString
public Recovered Type type Recovered Element current this while current null if current instanceof Recovered Type return Recovered Type current current current parent return null  RecoveredType RecoveredElement RecoveredType RecoveredType
Update the body Start of the corresponding parse node public void update Body Start int body Start this found Opening Brace true  bodyStart updateBodyStart bodyStart foundOpeningBrace
is about to disappear because of restarting recovery public void update From Parser State default implementation do nothing  updateFromParserState
public Recovered Element update On Closing Brace int brace Start int brace End if this bracket Balance 0 this parent null this update Source End If Necessary brace Start brace End return this parent return this  RecoveredElement updateOnClosingBrace braceStart braceEnd bracketBalance updateSourceEndIfNecessary braceStart braceEnd
public Recovered Element update On Opening Brace int brace End return null public Recovered Element update On Opening Brace int brace Start int brace End if this bracket Balance 0 this update Body Start brace End 1 return this return null no update is necessary  RecoveredElement updateOnOpeningBrace braceEnd RecoveredElement updateOnOpeningBrace braceStart braceEnd bracketBalance updateBodyStart braceEnd
Final update the corresponding parse node public void update Parse Tree default implementation do nothing  updateParseTree
Update the declaration Source End of the corresponding parse node public void update Source End If Necessary int brace Start int brace End default implementation do nothing  declarationSourceEnd updateSourceEndIfNecessary braceStart braceEnd
default implementation do nothing public void update Source End If Necessary int source End this update Source End If Necessary source End 1 source End  updateSourceEndIfNecessary sourceEnd updateSourceEndIfNecessary sourceEnd sourceEnd

public Recovered Type anonymous Types public int anonymous Type Count public Recovered Field Field Declaration field Declaration Recovered Element parent int bracket Balance this field Declaration parent bracket Balance null  RecoveredType anonymousTypes anonymousTypeCount RecoveredField FieldDeclaration fieldDeclaration RecoveredElement bracketBalance fieldDeclaration bracketBalance
public Recovered Field Field Declaration field Declaration Recovered Element parent int bracket Balance Parser parser super parent bracket Balance parser this field Declaration field Declaration this already Completed Field Initialization field Declaration initialization null  RecoveredField FieldDeclaration fieldDeclaration RecoveredElement bracketBalance bracketBalance fieldDeclaration fieldDeclaration alreadyCompletedFieldInitialization fieldDeclaration
public Recovered Element add Statement statement int bracket Balance Value if this already Completed Field Initialization statement instanceof Expression return super add statement bracket Balance Value else this already Completed Field Initialization true this field Declaration initialization Expression statement this field Declaration declaration Source End statement source End this field Declaration declaration End statement source End return this  RecoveredElement bracketBalanceValue alreadyCompletedFieldInitialization bracketBalanceValue alreadyCompletedFieldInitialization fieldDeclaration fieldDeclaration declarationSourceEnd sourceEnd fieldDeclaration declarationEnd sourceEnd
public Recovered Element add Type Declaration type Declaration int bracket Balance Value if this already Completed Field Initialization type Declaration bits AST Node Is Anonymous TypeMASK 0 this field Declaration declaration Source End 0 type Declaration source Start this field Declaration declaration Source End return super add type Declaration bracket Balance Value else Prepare anonymous type list if this anonymous Types null this anonymous Types new Recovered Type 5 this anonymous Type Count 0 else if this anonymous Type Count this anonymous Types length System arraycopy this anonymous Types 0 this anonymous Types new Recovered Type 2 this anonymous Type Count 0 this anonymous Type Count Store type declaration as an anonymous type Recovered Type element new Recovered Type type Declaration this bracket Balance Value this anonymous Types this anonymous Type Count element return element  RecoveredElement TypeDeclaration typeDeclaration bracketBalanceValue alreadyCompletedFieldInitialization typeDeclaration ASTNode IsAnonymousTypeMASK fieldDeclaration declarationSourceEnd typeDeclaration sourceStart fieldDeclaration declarationSourceEnd typeDeclaration bracketBalanceValue anonymousTypes anonymousTypes RecoveredType anonymousTypeCount anonymousTypeCount anonymousTypes anonymousTypes anonymousTypes RecoveredType anonymousTypeCount anonymousTypeCount RecoveredType RecoveredType typeDeclaration bracketBalanceValue anonymousTypes anonymousTypeCount
Answer the associated parsed structure public AST Node parse Tree return field Declaration  ASTNode parseTree fieldDeclaration
Answer the very source end of the corresponding parse node public int source End return this field Declaration declaration Source End  sourceEnd fieldDeclaration declarationSourceEnd
public String to String int tab String Buffer buffer new String Buffer tab String tab buffer append Recovered field n NON NLS 1 field Declaration print tab 1 buffer if this anonymous Types null for int i 0 i this anonymous Type Count i buffer append n NON NLS 1 buffer append anonymous Types i to String tab 1 return buffer to String  toString StringBuffer StringBuffer tabString fieldDeclaration anonymousTypes anonymousTypeCount anonymousTypes toString toString
public Field Declaration updated Field Declaration if this anonymous Types null field Declaration initialization null for int i 0 i this anonymous Type Count i if anonymous Types i preserve Content field Declaration initialization this anonymous Types i updated Type Declaration allocation if this anonymous Type Count 0 field Declaration bits AST Node Has Local TypeMASK return field Declaration  FieldDeclaration updatedFieldDeclaration anonymousTypes fieldDeclaration anonymousTypeCount anonymousTypes preserveContent fieldDeclaration anonymousTypes updatedTypeDeclaration anonymousTypeCount fieldDeclaration ASTNode HasLocalTypeMASK fieldDeclaration
public Recovered Element update On Closing Brace int brace Start int brace End if bracket Balance 0 was an array initializer bracket Balance if bracket Balance 0 already Completed Field Initialization true return this else if bracket Balance 0 already Completed Field Initialization true update Source End If Necessary brace End 1 if parent null return parent update On Closing Brace brace Start brace End return this  RecoveredElement updateOnClosingBrace braceStart braceEnd bracketBalance bracketBalance bracketBalance alreadyCompletedFieldInitialization bracketBalance alreadyCompletedFieldInitialization updateSourceEndIfNecessary braceEnd updateOnClosingBrace braceStart braceEnd
public Recovered Element update On Opening Brace int brace Start int brace End if field Declaration declaration Source End 0 field Declaration type instanceof Array Type Reference already Completed Field Initialization bracket Balance return null no update is necessary array initializer might be an array initializer this update Source End If Necessary brace Start 1 brace End 1 return this parent update On Opening Brace brace Start brace End  RecoveredElement updateOnOpeningBrace braceStart braceEnd fieldDeclaration declarationSourceEnd fieldDeclaration ArrayTypeReference alreadyCompletedFieldInitialization bracketBalance updateSourceEndIfNecessary braceStart braceEnd updateOnOpeningBrace braceStart braceEnd
return this parent update On Opening Brace brace Start brace End public void update Parse Tree this updated Field Declaration  updateOnOpeningBrace braceStart braceEnd updateParseTree updatedFieldDeclaration
public void update Source End If Necessary int body Start int body End if this field Declaration declaration Source End 0 this field Declaration declaration Source End body End this field Declaration declaration End body End  updateSourceEndIfNecessary bodyStart bodyEnd fieldDeclaration declarationSourceEnd fieldDeclaration declarationSourceEnd bodyEnd fieldDeclaration declarationEnd bodyEnd

public Import Reference import Reference public Recovered Import Import Reference import Reference Recovered Element parent int bracket Balance super parent bracket Balance this import Reference import Reference  ImportReference importReference RecoveredImport ImportReference importReference RecoveredElement bracketBalance bracketBalance importReference importReference
Answer the associated parsed structure public AST Node parse Tree return import Reference  ASTNode parseTree importReference
Answer the very source end of the corresponding parse node public int source End return this import Reference declaration Source End  sourceEnd importReference declarationSourceEnd
return this import Reference declaration Source End public String to String int tab return tab String tab Recovered import import Reference to String NON NLS 1  importReference declarationSourceEnd toString tabString importReference toString
return tab String tab Recovered import import Reference to String NON NLS 1 public Import Reference updated Import Reference return import Reference  tabString importReference toString ImportReference updatedImportReference importReference
return import Reference public void update Parse Tree this updated Import Reference  importReference updateParseTree updatedImportReference
public void update Source End If Necessary int body Start int body End if this import Reference declaration Source End 0 this import Reference declaration Source End body End this import Reference declaration End body End  updateSourceEndIfNecessary bodyStart bodyEnd importReference declarationSourceEnd importReference declarationSourceEnd bodyEnd importReference declarationEnd bodyEnd

public Recovered Block initializer Body public Recovered Initializer Field Declaration field Declaration Recovered Element parent int bracket Balance this field Declaration parent bracket Balance null  RecoveredBlock initializerBody RecoveredInitializer FieldDeclaration fieldDeclaration RecoveredElement bracketBalance fieldDeclaration bracketBalance
this field Declaration parent bracket Balance null public Recovered Initializer Field Declaration field Declaration Recovered Element parent int bracket Balance Parser parser super field Declaration parent bracket Balance parser this found Opening Brace true  fieldDeclaration bracketBalance RecoveredInitializer FieldDeclaration fieldDeclaration RecoveredElement bracketBalance fieldDeclaration bracketBalance foundOpeningBrace
public Recovered Element add Block nested Block Declaration int bracket Balance Value default behavior is to delegate recording to parent if any do not consider elements passed the known end if set it must be belonging to an enclosing element if field Declaration declaration Source End 0 nested Block Declaration source Start field Declaration declaration Source End if this parent null return this ignore return this parent add nested Block Declaration bracket Balance Value consider that if the opening brace was not found it is there if found Opening Brace found Opening Brace true this bracket Balance initializer Body new Recovered Block nested Block Declaration this bracket Balance Value if nested Block Declaration source End 0 return initializer Body return this  RecoveredElement nestedBlockDeclaration bracketBalanceValue fieldDeclaration declarationSourceEnd nestedBlockDeclaration sourceStart fieldDeclaration declarationSourceEnd nestedBlockDeclaration bracketBalanceValue foundOpeningBrace foundOpeningBrace bracketBalance initializerBody RecoveredBlock nestedBlockDeclaration bracketBalanceValue nestedBlockDeclaration sourceEnd initializerBody
public Recovered Element add Field Declaration new Field Declaration int bracket Balance Value local variables inside initializer can only be final and non void char field Type Name if new Field Declaration modifiers Acc Final 0 local var can only be final new Field Declaration type null initializer field Type Name new Field Declaration type get Type Name length 1 non void Char Operation equals field Type Name 0 Void Binding source Name if this parent null return this ignore this update Source End If Necessary this previous Available Line End new Field Declaration declaration Source Start 1 return this parent add new Field Declaration bracket Balance Value default behavior is to delegate recording to parent if any do not consider elements passed the known end if set it must be belonging to an enclosing element if this field Declaration declaration Source End 0 new Field Declaration declaration Source Start this field Declaration declaration Source End if this parent null return this ignore return this parent add new Field Declaration bracket Balance Value still inside initializer treat as local variable return this ignore  RecoveredElement FieldDeclaration newFieldDeclaration bracketBalanceValue fieldTypeName newFieldDeclaration AccFinal newFieldDeclaration fieldTypeName newFieldDeclaration getTypeName CharOperation fieldTypeName VoidBinding sourceName updateSourceEndIfNecessary previousAvailableLineEnd newFieldDeclaration declarationSourceStart newFieldDeclaration bracketBalanceValue fieldDeclaration declarationSourceEnd newFieldDeclaration declarationSourceStart fieldDeclaration declarationSourceEnd newFieldDeclaration bracketBalanceValue
public Recovered Element add Local Declaration local Declaration int bracket Balance Value do not consider a type starting passed the type end if set it must be belonging to an enclosing type if field Declaration declaration Source End 0 local Declaration declaration Source Start field Declaration declaration Source End if parent null return this ignore return this parent add local Declaration bracket Balance Value method body should have been created Block block new Block 0 block source Start Initializer field Declaration source Start Recovered Element element this add block 1 return element add local Declaration bracket Balance Value  RecoveredElement LocalDeclaration localDeclaration bracketBalanceValue fieldDeclaration declarationSourceEnd localDeclaration declarationSourceStart fieldDeclaration declarationSourceEnd localDeclaration bracketBalanceValue sourceStart fieldDeclaration sourceStart RecoveredElement localDeclaration bracketBalanceValue
public Recovered Element add Statement statement int bracket Balance Value do not consider a statement starting passed the initializer end if set it must be belonging to an enclosing type if field Declaration declaration Source End 0 statement source Start field Declaration declaration Source End if parent null return this ignore return this parent add statement bracket Balance Value initializer body should have been created Block block new Block 0 block source Start Initializer field Declaration source Start Recovered Element element this add block 1 return element add statement bracket Balance Value  RecoveredElement bracketBalanceValue fieldDeclaration declarationSourceEnd sourceStart fieldDeclaration declarationSourceEnd bracketBalanceValue sourceStart fieldDeclaration sourceStart RecoveredElement bracketBalanceValue
public Recovered Element add Type Declaration type Declaration int bracket Balance Value do not consider a type starting passed the type end if set it must be belonging to an enclosing type if field Declaration declaration Source End 0 type Declaration declaration Source Start field Declaration declaration Source End if parent null return this ignore return this parent add type Declaration bracket Balance Value if type Declaration bits AST Node Is Local TypeMASK 0 method body should have been created Block block new Block 0 block source Start Initializer field Declaration source Start Recovered Element element this add block 1 return element add type Declaration bracket Balance Value if local Types null local Types new Recovered Type 5 local Type Count 0 else if local Type Count local Types length System arraycopy local Types 0 local Types new Recovered Type 2 local Type Count 0 local Type Count Recovered Type element new Recovered Type type Declaration this bracket Balance Value local Types local Type Count element consider that if the opening brace was not found it is there if found Opening Brace found Opening Brace true this bracket Balance return element  RecoveredElement TypeDeclaration typeDeclaration bracketBalanceValue fieldDeclaration declarationSourceEnd typeDeclaration declarationSourceStart fieldDeclaration declarationSourceEnd typeDeclaration bracketBalanceValue typeDeclaration ASTNode IsLocalTypeMASK sourceStart fieldDeclaration sourceStart RecoveredElement typeDeclaration bracketBalanceValue localTypes localTypes RecoveredType localTypeCount localTypeCount localTypes localTypes localTypes RecoveredType localTypeCount localTypeCount RecoveredType RecoveredType typeDeclaration bracketBalanceValue localTypes localTypeCount foundOpeningBrace foundOpeningBrace bracketBalance
public String to String int tab String Buffer result new String Buffer tab String tab result append Recovered initializer n NON NLS 1 this field Declaration print tab 1 result if this initializer Body null result append n NON NLS 1 result append this initializer Body to String tab 1 return result to String  toString StringBuffer StringBuffer tabString fieldDeclaration initializerBody initializerBody toString toString
public Field Declaration updated Field Declaration if initializer Body null Block block initializer Body updated Block if block null Initializer field Declaration block block if this local Type Count 0 field Declaration bits AST Node Has Local TypeMASK if field Declaration source End 0 field Declaration source End field Declaration declaration Source End return field Declaration  FieldDeclaration updatedFieldDeclaration initializerBody initializerBody updatedBlock fieldDeclaration localTypeCount fieldDeclaration ASTNode HasLocalTypeMASK fieldDeclaration sourceEnd fieldDeclaration sourceEnd fieldDeclaration declarationSourceEnd fieldDeclaration
public Recovered Element update On Closing Brace int brace Start int brace End if bracket Balance 0 parent null this update Source End If Necessary brace Start brace End return parent return this  RecoveredElement updateOnClosingBrace braceStart braceEnd bracketBalance updateSourceEndIfNecessary braceStart braceEnd
in which case the body Start is updated public Recovered Element update On Opening Brace int brace Start int brace End bracket Balance return this request to restart  bodyStart RecoveredElement updateOnOpeningBrace braceStart braceEnd bracketBalance
public void update Source End If Necessary int brace Start int brace End if this field Declaration declaration Source End 0 Initializer initializer Initializer field Declaration if parser r Brace Successor Start brace End if initializer body Start parser r Brace End initializer declaration Source End parser r Brace End else initializer declaration Source End initializer body Start if initializer body Start parser r Brace Start initializer body End parser r Brace Start else initializer body End initializer body Start else initializer declaration Source End brace End initializer body End brace Start 1 if initializer block null initializer block source End initializer declaration Source End  updateSourceEndIfNecessary braceStart braceEnd fieldDeclaration declarationSourceEnd fieldDeclaration rBraceSuccessorStart braceEnd bodyStart rBraceEnd declarationSourceEnd rBraceEnd declarationSourceEnd bodyStart bodyStart rBraceStart bodyEnd rBraceStart bodyEnd bodyStart declarationSourceEnd braceEnd bodyEnd braceStart sourceEnd declarationSourceEnd

boolean already Completed Local Initialization public Recovered Local Variable Local Declaration local Declaration Recovered Element parent int bracket Balance super local Declaration parent bracket Balance this local Declaration local Declaration this already Completed Local Initialization local Declaration initialization null  alreadyCompletedLocalInitialization RecoveredLocalVariable LocalDeclaration localDeclaration RecoveredElement bracketBalance localDeclaration bracketBalance localDeclaration localDeclaration alreadyCompletedLocalInitialization localDeclaration
public Recovered Element add Statement stmt int bracket Balance Value if this already Completed Local Initialization stmt instanceof Expression return super add stmt bracket Balance Value else this already Completed Local Initialization true this local Declaration initialization Expression stmt this local Declaration declaration Source End stmt source End this local Declaration declaration End stmt source End return this  RecoveredElement bracketBalanceValue alreadyCompletedLocalInitialization bracketBalanceValue alreadyCompletedLocalInitialization localDeclaration localDeclaration declarationSourceEnd sourceEnd localDeclaration declarationEnd sourceEnd
Answer the associated parsed structure public AST Node parse Tree return local Declaration  ASTNode parseTree localDeclaration
Answer the very source end of the corresponding parse node public int source End return this local Declaration declaration Source End  sourceEnd localDeclaration declarationSourceEnd
return this local Declaration declaration Source End public String to String int tab return tab String tab Recovered local variable n local Declaration print tab 1 new String Buffer 10 NON NLS 1  localDeclaration declarationSourceEnd toString tabString localDeclaration StringBuffer
return tab String tab Recovered local variable n local Declaration print tab 1 new String Buffer 10 NON NLS 1 public Statement updated Statement return local Declaration  tabString localDeclaration StringBuffer updatedStatement localDeclaration
public Recovered Element update On Closing Brace int brace Start int brace End if bracket Balance 0 was an array initializer bracket Balance if bracket Balance 0 already Completed Local Initialization true return this if parent null return parent update On Closing Brace brace Start brace End return this  RecoveredElement updateOnClosingBrace braceStart braceEnd bracketBalance bracketBalance bracketBalance alreadyCompletedLocalInitialization updateOnClosingBrace braceStart braceEnd
public Recovered Element update On Opening Brace int brace Start int brace End if local Declaration declaration Source End 0 local Declaration type instanceof Array Type Reference already Completed Local Initialization bracket Balance return null no update is necessary array initializer might be an array initializer this update Source End If Necessary brace Start 1 brace End 1 return this parent update On Opening Brace brace Start brace End  RecoveredElement updateOnOpeningBrace braceStart braceEnd localDeclaration declarationSourceEnd localDeclaration ArrayTypeReference alreadyCompletedLocalInitialization bracketBalance updateSourceEndIfNecessary braceStart braceEnd updateOnOpeningBrace braceStart braceEnd
return this parent update On Opening Brace brace Start brace End public void update Parse Tree this updated Statement  updateOnOpeningBrace braceStart braceEnd updateParseTree updatedStatement
public void update Source End If Necessary int body Start int body End if this local Declaration declaration Source End 0 this local Declaration declaration Source End body End this local Declaration declaration End body End  updateSourceEndIfNecessary bodyStart bodyEnd localDeclaration declarationSourceEnd localDeclaration declarationSourceEnd bodyEnd localDeclaration declarationEnd bodyEnd

public Recovered Method Abstract Method Declaration method Declaration Recovered Element parent int bracket Balance Parser parser super parent bracket Balance parser this method Declaration method Declaration this found Opening Brace body Starts At Header End if this found Opening Brace this bracket Balance  RecoveredMethod AbstractMethodDeclaration methodDeclaration RecoveredElement bracketBalance bracketBalance methodDeclaration methodDeclaration foundOpeningBrace bodyStartsAtHeaderEnd foundOpeningBrace bracketBalance
public Recovered Element add Block nested Block Declaration int bracket Balance Value default behavior is to delegate recording to parent if any do not consider elements passed the known end if set it must be belonging to an enclosing element if method Declaration declaration Source End 0 nested Block Declaration source Start method Declaration declaration Source End if this parent null return this ignore else return this parent add nested Block Declaration bracket Balance Value consider that if the opening brace was not found it is there if found Opening Brace found Opening Brace true this bracket Balance method Body new Recovered Block nested Block Declaration this bracket Balance Value if nested Block Declaration source End 0 return method Body return this  RecoveredElement nestedBlockDeclaration bracketBalanceValue methodDeclaration declarationSourceEnd nestedBlockDeclaration sourceStart methodDeclaration declarationSourceEnd nestedBlockDeclaration bracketBalanceValue foundOpeningBrace foundOpeningBrace bracketBalance methodBody RecoveredBlock nestedBlockDeclaration bracketBalanceValue nestedBlockDeclaration sourceEnd methodBody
public Recovered Element add Field Declaration field Declaration int bracket Balance Value local variables inside method can only be final and non void char field Type Name if field Declaration modifiers Acc Final 0 local var can only be final field Declaration type null initializer field Type Name field Declaration type get Type Name length 1 non void Char Operation equals field Type Name 0 Void Binding source Name if this parent null return this ignore else this update Source End If Necessary this previous Available Line End field Declaration declaration Source Start 1 return this parent add field Declaration bracket Balance Value default behavior is to delegate recording to parent if any do not consider elements passed the known end if set it must be belonging to an enclosing element if method Declaration declaration Source End 0 field Declaration declaration Source Start method Declaration declaration Source End if this parent null return this ignore else return this parent add field Declaration bracket Balance Value consider that if the opening brace was not found it is there if found Opening Brace found Opening Brace true this bracket Balance still inside method treat as local variable return this ignore  RecoveredElement FieldDeclaration fieldDeclaration bracketBalanceValue fieldTypeName fieldDeclaration AccFinal fieldDeclaration fieldTypeName fieldDeclaration getTypeName CharOperation fieldTypeName VoidBinding sourceName updateSourceEndIfNecessary previousAvailableLineEnd fieldDeclaration declarationSourceStart fieldDeclaration bracketBalanceValue methodDeclaration declarationSourceEnd fieldDeclaration declarationSourceStart methodDeclaration declarationSourceEnd fieldDeclaration bracketBalanceValue foundOpeningBrace foundOpeningBrace bracketBalance
public Recovered Element add Local Declaration local Declaration int bracket Balance Value local variables inside method can only be final and non void char local Type Name if local Declaration modifiers Acc Final 0 local var can only be final local Declaration type null initializer local Type Name local Declaration type get Type Name length 1 non void Char Operation equals local Type Name 0 Void Binding source Name if this parent null return this ignore else this update Source End If Necessary this previous Available Line End local Declaration declaration Source Start 1 return this parent add local Declaration bracket Balance do not consider a type starting passed the type end if set it must be belonging to an enclosing type if method Declaration declaration Source End 0 local Declaration declaration Source Start method Declaration declaration Source End if this parent null return this ignore else return this parent add local Declaration bracket Balance Value if method Body null Block block new Block 0 block source Start method Declaration body Start Recovered Element current Block this add block 1 if this bracket Balance 0 for int i 0 i this bracket Balance 1 i current Block current Block add new Block 0 1 this bracket Balance 1 return current Block add local Declaration bracket Balance Value return method Body add local Declaration bracket Balance Value true  RecoveredElement LocalDeclaration localDeclaration bracketBalanceValue localTypeName localDeclaration AccFinal localDeclaration localTypeName localDeclaration getTypeName CharOperation localTypeName VoidBinding sourceName updateSourceEndIfNecessary previousAvailableLineEnd localDeclaration declarationSourceStart localDeclaration bracketBalance methodDeclaration declarationSourceEnd localDeclaration declarationSourceStart methodDeclaration declarationSourceEnd localDeclaration bracketBalanceValue methodBody sourceStart methodDeclaration bodyStart RecoveredElement currentBlock bracketBalance bracketBalance currentBlock currentBlock bracketBalance currentBlock localDeclaration bracketBalanceValue methodBody localDeclaration bracketBalanceValue
public Recovered Element add Statement statement int bracket Balance Value do not consider a type starting passed the type end if set it must be belonging to an enclosing type if method Declaration declaration Source End 0 statement source Start method Declaration declaration Source End if this parent null return this ignore else return this parent add statement bracket Balance Value if method Body null Block block new Block 0 block source Start method Declaration body Start Recovered Element current Block this add block 1 if this bracket Balance 0 for int i 0 i this bracket Balance 1 i current Block current Block add new Block 0 1 this bracket Balance 1 return current Block add statement bracket Balance Value return method Body add statement bracket Balance Value true  RecoveredElement bracketBalanceValue methodDeclaration declarationSourceEnd sourceStart methodDeclaration declarationSourceEnd bracketBalanceValue methodBody sourceStart methodDeclaration bodyStart RecoveredElement currentBlock bracketBalance bracketBalance currentBlock currentBlock bracketBalance currentBlock bracketBalanceValue methodBody bracketBalanceValue
public Recovered Element add Type Declaration type Declaration int bracket Balance Value do not consider a type starting passed the type end if set it must be belonging to an enclosing type if method Declaration declaration Source End 0 type Declaration declaration Source Start method Declaration declaration Source End if this parent null return this ignore return this parent add type Declaration bracket Balance Value if type Declaration bits AST Node Is Local TypeMASK 0 if method Body null Block block new Block 0 block source Start method Declaration body Start this add block 1 return method Body add type Declaration bracket Balance Value true if type Declaration is Interface this update Source End If Necessary this previous Available Line End type Declaration declaration Source Start 1 if this parent null return this ignore close the constructor return this parent add type Declaration bracket Balance Value if local Types null local Types new Recovered Type 5 local Type Count 0 else if local Type Count local Types length System arraycopy local Types 0 local Types new Recovered Type 2 local Type Count 0 local Type Count Recovered Type element new Recovered Type type Declaration this bracket Balance Value local Types local Type Count element consider that if the opening brace was not found it is there if found Opening Brace found Opening Brace true this bracket Balance return element  RecoveredElement TypeDeclaration typeDeclaration bracketBalanceValue methodDeclaration declarationSourceEnd typeDeclaration declarationSourceStart methodDeclaration declarationSourceEnd typeDeclaration bracketBalanceValue typeDeclaration ASTNode IsLocalTypeMASK methodBody sourceStart methodDeclaration bodyStart methodBody typeDeclaration bracketBalanceValue typeDeclaration isInterface updateSourceEndIfNecessary previousAvailableLineEnd typeDeclaration declarationSourceStart typeDeclaration bracketBalanceValue localTypes localTypes RecoveredType localTypeCount localTypeCount localTypes localTypes localTypes RecoveredType localTypeCount localTypeCount RecoveredType RecoveredType typeDeclaration bracketBalanceValue localTypes localTypeCount foundOpeningBrace foundOpeningBrace bracketBalance
return element public boolean body Starts At Header End return method Declaration body Start method Declaration source End 1  bodyStartsAtHeaderEnd methodDeclaration bodyStart methodDeclaration sourceEnd
Answer the associated parsed structure public AST Node parse Tree return method Declaration  ASTNode parseTree methodDeclaration
Answer the very source end of the corresponding parse node public int source End return this method Declaration declaration Source End  sourceEnd methodDeclaration declarationSourceEnd
public String to String int tab String Buffer result new String Buffer tab String tab result append Recovered method n NON NLS 1 this method Declaration print tab 1 result if this local Types null for int i 0 i this local Type Count i result append n NON NLS 1 result append this local Types i to String tab 1 if this method Body null result append n NON NLS 1 result append this method Body to String tab 1 return result to String  toString StringBuffer StringBuffer tabString methodDeclaration localTypes localTypeCount localTypes toString methodBody methodBody toString toString
Update the body Start of the corresponding parse node public void update Body Start int body Start this found Opening Brace true this method Declaration body Start body Start  bodyStart updateBodyStart bodyStart foundOpeningBrace methodDeclaration bodyStart bodyStart
public Abstract Method Declaration updated Method Declaration if method Body null Block block method Body updated Block if block null method Declaration statements block statements first statement might be an explict constructor call destinated to a special slot if method Declaration is Constructor Constructor Declaration constructor Constructor Declaration method Declaration if method Declaration statements null method Declaration statements 0 instanceof Explicit Constructor Call constructor constructor Call Explicit Constructor Call method Declaration statements 0 int length method Declaration statements length System arraycopy method Declaration statements 1 method Declaration statements new Statement length 1 0 length 1 if constructor constructor Call null add implicit constructor call constructor constructor Call Super Reference implicit Super Constructor Call if local Type Count 0 method Declaration bits AST Node Has Local TypeMASK return method Declaration  AbstractMethodDeclaration updatedMethodDeclaration methodBody methodBody updatedBlock methodDeclaration methodDeclaration isConstructor ConstructorDeclaration ConstructorDeclaration methodDeclaration methodDeclaration methodDeclaration ExplicitConstructorCall constructorCall ExplicitConstructorCall methodDeclaration methodDeclaration methodDeclaration methodDeclaration constructorCall constructorCall SuperReference implicitSuperConstructorCall localTypeCount methodDeclaration ASTNode HasLocalTypeMASK methodDeclaration
public void update From Parser State if this body Starts At Header End Parser parser this parser might want to recover arguments or thrown exceptions if parser list Length 0 parser ast Length Ptr 0 awaiting interface type references has consumed the arguments listed elements must be thrown exceptions if method Declaration source End parser r Paren Pos protection for bugs 15142 int length parser ast Length Stack parser ast Length Ptr int ast Ptr parser ast Ptr length boolean can Consume ast Ptr 0 if can Consume if parser ast Stack ast Ptr instanceof Abstract Method Declaration can Consume false for int i 1 max length 1 i max i if parser ast Stack ast Ptr i instanceof Type Reference can Consume false if can Consume parser consume Method Header Throws Clause will reset type List Length to zero thus this check will only be performed on first error Check after void foo throws X Y else parser list Length 0 else has not consumed arguments yet listed elements must be arguments if parser current Token Token NameLPAREN parser current Token Token NameSEMICOLON if current Token is parenthesis this last argument is a method field signature parser ast Length Stack parser ast Length Ptr parser ast Ptr parser list Length parser current Token 0 int arg Length parser ast Length Stack parser ast Length Ptr int arg Start parser ast Ptr arg Length 1 boolean need UpdateR Paren Pos parser r Paren Pos parser l Paren Pos 12387 r Paren Pos will be used to compute body Start and thus used to set next checkpoint int count for count 0 count arg Length count Argument argument Argument parser ast Stack arg Start count cannot be an argument if non final char arg Type Name argument type get Type Name if argument modifiers Acc Final 0 arg Type Name length 1 Char Operation equals arg Type Name 0 Void Binding source Name parser ast Length Stack parser ast Length Ptr count parser ast Ptr arg Start count 1 parser list Length count parser current Token 0 break if need UpdateR Paren Pos parser r Paren Pos argument source End 1 if parser list Length 0 parser ast Length Ptr 0 protection for bugs 15142 int length parser ast Length Stack parser ast Length Ptr int ast Ptr parser ast Ptr length boolean can Consume ast Ptr 0 if can Consume if parser ast Stack ast Ptr instanceof Abstract Method Declaration can Consume false for int i 1 max length 1 i max i if parser ast Stack ast Ptr i instanceof Argument can Consume false if can Consume parser consume Method Header Parameters fix up positions given they were updated against r Paren Pos which did not get set if parser current Element this parameter addition might have added an awaiting no return type method see 1FVXQZ4 method Declaration source End method Declaration arguments method Declaration arguments length 1 source End method Declaration body Start method Declaration source End 1 parser last Check Point method Declaration body Start  updateFromParserState bodyStartsAtHeaderEnd listLength astLengthPtr methodDeclaration sourceEnd rParenPos astLengthStack astLengthPtr astPtr astPtr canConsume astPtr canConsume astStack astPtr AbstractMethodDeclaration canConsume astStack astPtr TypeReference canConsume canConsume consumeMethodHeaderThrowsClause typeListLength errorCheck listLength currentToken TokenNameLPAREN currentToken TokenNameSEMICOLON currentToken astLengthStack astLengthPtr astPtr listLength currentToken argLength astLengthStack astLengthPtr argStart astPtr argLength needUpdateRParenPos rParenPos lParenPos rParenPos bodyStart argLength astStack argStart argTypeName getTypeName AccFinal argTypeName CharOperation argTypeName VoidBinding sourceName astLengthStack astLengthPtr astPtr argStart listLength currentToken needUpdateRParenPos rParenPos sourceEnd listLength astLengthPtr astLengthStack astLengthPtr astPtr astPtr canConsume astPtr canConsume astStack astPtr AbstractMethodDeclaration canConsume astStack astPtr canConsume canConsume consumeMethodHeaderParameters rParenPos currentElement methodDeclaration sourceEnd methodDeclaration methodDeclaration sourceEnd methodDeclaration bodyStart methodDeclaration sourceEnd lastCheckPoint methodDeclaration bodyStart
public Recovered Element update On Opening Brace int brace Start int brace End in case the opening brace is close enough to the signature if bracket Balance 0 if parser scanner search Line Number method Declaration source End parser scanner search Line Number brace End switch parser last Ignored Token case 1 case Token Namethrows break default this found Opening Brace true bracket Balance 1 pretend the brace was already there return super update On Opening Brace brace Start brace End  RecoveredElement updateOnOpeningBrace braceStart braceEnd bracketBalance searchLineNumber methodDeclaration sourceEnd searchLineNumber braceEnd lastIgnoredToken TokenNamethrows foundOpeningBrace bracketBalance updateOnOpeningBrace braceStart braceEnd
return super update On Opening Brace brace Start brace End public void update Parse Tree this updated Method Declaration  updateOnOpeningBrace braceStart braceEnd updateParseTree updatedMethodDeclaration
public void update Source End If Necessary int brace Start int brace End if this method Declaration declaration Source End 0 if parser r Brace Successor Start brace End this method Declaration declaration Source End parser r Brace End this method Declaration body End parser r Brace Start else this method Declaration declaration Source End brace End this method Declaration body End brace Start 1  updateSourceEndIfNecessary braceStart braceEnd methodDeclaration declarationSourceEnd rBraceSuccessorStart braceEnd methodDeclaration declarationSourceEnd rBraceEnd methodDeclaration bodyEnd rBraceStart methodDeclaration declarationSourceEnd braceEnd methodDeclaration bodyEnd braceStart

public Statement statement public Recovered Statement Statement statement Recovered Element parent int bracket Balance super parent bracket Balance this statement statement  RecoveredStatement RecoveredElement bracketBalance bracketBalance
Answer the associated parsed structure public AST Node parse Tree return statement  ASTNode parseTree
Answer the very source end of the corresponding parse node public int source End return this statement source End  sourceEnd sourceEnd
return this statement source End public String to String int tab return tab String tab Recovered statement n statement print tab 1 new String Buffer 10 NON NLS 1  sourceEnd toString tabString StringBuffer
return tab String tab Recovered statement n statement print tab 1 new String Buffer 10 NON NLS 1 public Statement updated Statement return statement  tabString StringBuffer updatedStatement
return statement public void update Parse Tree this updated Statement  updateParseTree updatedStatement
Update the declaration Source End of the corresponding parse node public void update Source End If Necessary int body Start int body End if this statement source End 0 this statement source End body End  declarationSourceEnd updateSourceEndIfNecessary bodyStart bodyEnd sourceEnd sourceEnd bodyEnd

public Recovered Type Type Declaration type Declaration Recovered Element parent int bracket Balance super type Declaration parent bracket Balance this type Declaration type Declaration this found Opening Brace body Starts At Header End if this found Opening Brace this bracket Balance  RecoveredType TypeDeclaration typeDeclaration RecoveredElement bracketBalance typeDeclaration bracketBalance typeDeclaration typeDeclaration foundOpeningBrace bodyStartsAtHeaderEnd foundOpeningBrace bracketBalance
public Recovered Element add Abstract Method Declaration method Declaration int bracket Balance Value do not consider a method starting passed the type end if set it must be belonging to an enclosing type if type Declaration declaration Source End 0 method Declaration declaration Source Start type Declaration declaration Source End return this parent add method Declaration bracket Balance Value if methods null methods new Recovered Method 5 method Count 0 else if method Count methods length System arraycopy methods 0 methods new Recovered Method 2 method Count 0 method Count Recovered Method element new Recovered Method method Declaration this bracket Balance Value this recovering Parser methods method Count element consider that if the opening brace was not found it is there if found Opening Brace found Opening Brace true this bracket Balance if method not finished then method becomes current if method Declaration declaration Source End 0 return element return this  RecoveredElement AbstractMethodDeclaration methodDeclaration bracketBalanceValue typeDeclaration declarationSourceEnd methodDeclaration declarationSourceStart typeDeclaration declarationSourceEnd methodDeclaration bracketBalanceValue RecoveredMethod methodCount methodCount RecoveredMethod methodCount methodCount RecoveredMethod RecoveredMethod methodDeclaration bracketBalanceValue recoveringParser methodCount foundOpeningBrace foundOpeningBrace bracketBalance methodDeclaration declarationSourceEnd
public Recovered Element add Block nested Block Declaration int bracket Balance Value int modifiers Acc Default if this parser recovered Static Initializer Start 0 modifiers Acc Static return this add new Initializer nested Block Declaration modifiers bracket Balance Value  RecoveredElement nestedBlockDeclaration bracketBalanceValue AccDefault recoveredStaticInitializerStart AccStatic nestedBlockDeclaration bracketBalanceValue
public Recovered Element add Field Declaration field Declaration int bracket Balance Value do not consider a field starting passed the type end if set it must be belonging to an enclosing type if type Declaration declaration Source End 0 field Declaration declaration Source Start type Declaration declaration Source End return this parent add field Declaration bracket Balance Value if fields null fields new Recovered Field 5 field Count 0 else if field Count fields length System arraycopy fields 0 fields new Recovered Field 2 field Count 0 field Count Recovered Field element field Declaration is Field new Recovered Field field Declaration this bracket Balance Value new Recovered Initializer field Declaration this bracket Balance Value fields field Count element consider that if the opening brace was not found it is there if found Opening Brace found Opening Brace true this bracket Balance if field not finished then field becomes current if field Declaration declaration Source End 0 return element return this  RecoveredElement FieldDeclaration fieldDeclaration bracketBalanceValue typeDeclaration declarationSourceEnd fieldDeclaration declarationSourceStart typeDeclaration declarationSourceEnd fieldDeclaration bracketBalanceValue RecoveredField fieldCount fieldCount RecoveredField fieldCount fieldCount RecoveredField fieldDeclaration isField RecoveredField fieldDeclaration bracketBalanceValue RecoveredInitializer fieldDeclaration bracketBalanceValue fieldCount foundOpeningBrace foundOpeningBrace bracketBalance fieldDeclaration declarationSourceEnd
public Recovered Element add Type Declaration member Type Declaration int bracket Balance Value do not consider a type starting passed the type end if set it must be belonging to an enclosing type if type Declaration declaration Source End 0 member Type Declaration declaration Source Start type Declaration declaration Source End return this parent add member Type Declaration bracket Balance Value if member Type Declaration bits AST Node Is Anonymous TypeMASK 0 if this method Count 0 add it to the last method body Recovered Method last Method this methods this method Count 1 last Method method Declaration body End 0 reopen method last Method method Declaration declaration Source End 0 reopen method last Method bracket Balance expect one closing brace return last Method add member Type Declaration bracket Balance Value else ignore return this if member Types null member Types new Recovered Type 5 member Type Count 0 else if member Type Count member Types length System arraycopy member Types 0 member Types new Recovered Type 2 member Type Count 0 member Type Count Recovered Type element new Recovered Type member Type Declaration this bracket Balance Value member Types member Type Count element consider that if the opening brace was not found it is there if found Opening Brace found Opening Brace true this bracket Balance if member type not finished then member type becomes current if member Type Declaration declaration Source End 0 return element return this  RecoveredElement TypeDeclaration memberTypeDeclaration bracketBalanceValue typeDeclaration declarationSourceEnd memberTypeDeclaration declarationSourceStart typeDeclaration declarationSourceEnd memberTypeDeclaration bracketBalanceValue memberTypeDeclaration ASTNode IsAnonymousTypeMASK methodCount RecoveredMethod lastMethod methodCount lastMethod methodDeclaration bodyEnd lastMethod methodDeclaration declarationSourceEnd lastMethod bracketBalance lastMethod memberTypeDeclaration bracketBalanceValue memberTypes memberTypes RecoveredType memberTypeCount memberTypeCount memberTypes memberTypes memberTypes RecoveredType memberTypeCount memberTypeCount RecoveredType RecoveredType memberTypeDeclaration bracketBalanceValue memberTypes memberTypeCount foundOpeningBrace foundOpeningBrace bracketBalance memberTypeDeclaration declarationSourceEnd
Answer the body end of the corresponding parse node public int body End if body End 0 return type Declaration declaration Source End return body End  bodyEnd bodyEnd typeDeclaration declarationSourceEnd bodyEnd
public boolean body Starts At Header End if type Declaration super Interfaces null if type Declaration superclass null return type Declaration body Start type Declaration source End 1 else return type Declaration body Start type Declaration superclass source End 1 else return type Declaration body Start type Declaration super Interfaces type Declaration super Interfaces length 1 source End 1  bodyStartsAtHeaderEnd typeDeclaration superInterfaces typeDeclaration typeDeclaration bodyStart typeDeclaration sourceEnd typeDeclaration bodyStart typeDeclaration sourceEnd typeDeclaration bodyStart typeDeclaration superInterfaces typeDeclaration superInterfaces sourceEnd
public Recovered Type enclosing Type Recovered Element current parent while current null if current instanceof Recovered Type return Recovered Type current current current parent return null  RecoveredType enclosingType RecoveredElement RecoveredType RecoveredType
return null public char name return type Declaration name  typeDeclaration
Answer the associated parsed structure public AST Node parse Tree return type Declaration  ASTNode parseTree typeDeclaration
Answer the very source end of the corresponding parse node public int source End return this type Declaration declaration Source End  sourceEnd typeDeclaration declarationSourceEnd
public String to String int tab String Buffer result new String Buffer tab String tab result append Recovered type n NON NLS 1 if type Declaration bits AST Node Is Anonymous TypeMASK 0 result append tab String tab result append NON NLS 1 type Declaration print tab 1 result if this member Types null for int i 0 i this member Type Count i result append n NON NLS 1 result append this member Types i to String tab 1 if this fields null for int i 0 i this field Count i result append n NON NLS 1 result append this fields i to String tab 1 if this methods null for int i 0 i this method Count i result append n NON NLS 1 result append this methods i to String tab 1 return result to String  toString StringBuffer StringBuffer tabString typeDeclaration ASTNode IsAnonymousTypeMASK tabString typeDeclaration memberTypes memberTypeCount memberTypes toString fieldCount toString methodCount toString toString
Update the body Start of the corresponding parse node public void update Body Start int body Start this found Opening Brace true this type Declaration body Start body Start  bodyStart updateBodyStart bodyStart foundOpeningBrace typeDeclaration bodyStart bodyStart
public Statement updated Statement ignore closed anonymous type if type Declaration bits AST Node Is Anonymous TypeMASK 0 this preserve Content return null Type Declaration updated Type this updated Type Declaration if updated Type bits AST Node Is Anonymous TypeMASK 0 in presence of an anonymous type we want the full allocation expression return updated Type allocation return updated Type  updatedStatement typeDeclaration ASTNode IsAnonymousTypeMASK preserveContent TypeDeclaration updatedType updatedTypeDeclaration updatedType ASTNode IsAnonymousTypeMASK updatedType updatedType
public Type Declaration updated Type Declaration update member types if member Type Count 0 int existing Count type Declaration member Types null 0 type Declaration member Types length Type Declaration member Type Declarations new Type Declaration existing Count member Type Count if existing Count 0 System arraycopy type Declaration member Types 0 member Type Declarations 0 existing Count may need to update the declaration Source End of the last type if member Types member Type Count 1 type Declaration declaration Source End 0 int body End Value body End member Types member Type Count 1 type Declaration declaration Source End body End Value member Types member Type Count 1 type Declaration body End body End Value for int i 0 i member Type Count i member Type Declarations existing Count i member Types i updated Type Declaration type Declaration member Types member Type Declarations update fields if field Count 0 int existing Count type Declaration fields null 0 type Declaration fields length Field Declaration field Declarations new Field Declaration existing Count field Count if existing Count 0 System arraycopy type Declaration fields 0 field Declarations 0 existing Count may need to update the declaration Source End of the last field if fields field Count 1 field Declaration declaration Source End 0 int temp body End fields field Count 1 field Declaration declaration Source End temp fields field Count 1 field Declaration declaration End temp for int i 0 i field Count i field Declarations existing Count i fields i updated Field Declaration type Declaration fields field Declarations update methods int existing Count type Declaration methods null 0 type Declaration methods length boolean has Constructor false has Recovered Constructor false int default Constructor Index 1 if method Count 0 Abstract Method Declaration method Declarations new Abstract Method Declaration existing Count method Count for int i 0 i existing Count i Abstract Method Declaration m type Declaration methods i if m is Default Constructor default Constructor Index i method Declarations i m may need to update the declaration Source End of the last method if methods method Count 1 method Declaration declaration Source End 0 int body End Value body End methods method Count 1 method Declaration declaration Source End body End Value methods method Count 1 method Declaration body End body End Value for int i 0 i method Count i Abstract Method Declaration updated Method methods i updated Method Declaration if updated Method is Constructor has Recovered Constructor true method Declarations existing Count i updated Method type Declaration methods method Declarations has Constructor type Declaration check Constructors this parser else for int i 0 i existing Count i if type Declaration methods i is Constructor has Constructor true add clinit if type Declaration need Class Init Method boolean already Has Clinit false for int i 0 i existing Count i if type Declaration methods i is Clinit already Has Clinit true break if already Has Clinit type Declaration add Clinit add default constructor if default Constructor Index 0 has Recovered Constructor should discard previous default construtor Abstract Method Declaration method Declarations new Abstract Method Declaration type Declaration methods length 1 if default Constructor Index 0 System arraycopy type Declaration methods 0 method Declarations 0 default Constructor Index if default Constructor Index type Declaration methods length 1 System arraycopy type Declaration methods default Constructor Index 1 method Declarations default Constructor Index type Declaration methods length default Constructor Index 1 type Declaration methods method Declarations else if has Constructor type Declaration is Interface if was already reduced then constructor boolean inside Field Initializer false Recovered Element parent Element this parent while parent Element null if parent Element instanceof Recovered Field inside Field Initializer true break parent Element parent Element parent type Declaration creates Internal Constructor parser diet inside Field Initializer true if parent instanceof Recovered Type type Declaration bits AST Node Is Member TypeMASK else if parent instanceof Recovered Method type Declaration bits AST Node Is Local TypeMASK return type Declaration  TypeDeclaration updatedTypeDeclaration memberTypeCount existingCount typeDeclaration memberTypes typeDeclaration memberTypes TypeDeclaration memberTypeDeclarations TypeDeclaration existingCount memberTypeCount existingCount typeDeclaration memberTypes memberTypeDeclarations existingCount declarationSourceEnd memberTypes memberTypeCount typeDeclaration declarationSourceEnd bodyEndValue bodyEnd memberTypes memberTypeCount typeDeclaration declarationSourceEnd bodyEndValue memberTypes memberTypeCount typeDeclaration bodyEnd bodyEndValue memberTypeCount memberTypeDeclarations existingCount memberTypes updatedTypeDeclaration typeDeclaration memberTypes memberTypeDeclarations fieldCount existingCount typeDeclaration typeDeclaration FieldDeclaration fieldDeclarations FieldDeclaration existingCount fieldCount existingCount typeDeclaration fieldDeclarations existingCount declarationSourceEnd fieldCount fieldDeclaration declarationSourceEnd bodyEnd fieldCount fieldDeclaration declarationSourceEnd fieldCount fieldDeclaration declarationEnd fieldCount fieldDeclarations existingCount updatedFieldDeclaration typeDeclaration fieldDeclarations existingCount typeDeclaration typeDeclaration hasConstructor hasRecoveredConstructor defaultConstructorIndex methodCount AbstractMethodDeclaration methodDeclarations AbstractMethodDeclaration existingCount methodCount existingCount AbstractMethodDeclaration typeDeclaration isDefaultConstructor defaultConstructorIndex methodDeclarations declarationSourceEnd methodCount methodDeclaration declarationSourceEnd bodyEndValue bodyEnd methodCount methodDeclaration declarationSourceEnd bodyEndValue methodCount methodDeclaration bodyEnd bodyEndValue methodCount AbstractMethodDeclaration updatedMethod updatedMethodDeclaration updatedMethod isConstructor hasRecoveredConstructor methodDeclarations existingCount updatedMethod typeDeclaration methodDeclarations hasConstructor typeDeclaration checkConstructors existingCount typeDeclaration isConstructor hasConstructor typeDeclaration needClassInitMethod alreadyHasClinit existingCount typeDeclaration isClinit alreadyHasClinit alreadyHasClinit typeDeclaration addClinit defaultConstructorIndex hasRecoveredConstructor AbstractMethodDeclaration methodDeclarations AbstractMethodDeclaration typeDeclaration defaultConstructorIndex typeDeclaration methodDeclarations defaultConstructorIndex defaultConstructorIndex typeDeclaration typeDeclaration defaultConstructorIndex methodDeclarations defaultConstructorIndex typeDeclaration defaultConstructorIndex typeDeclaration methodDeclarations hasConstructor typeDeclaration isInterface insideFieldInitializer RecoveredElement parentElement parentElement parentElement RecoveredField insideFieldInitializer parentElement parentElement typeDeclaration createsInternalConstructor insideFieldInitializer RecoveredType typeDeclaration ASTNode IsMemberTypeMASK RecoveredMethod typeDeclaration ASTNode IsLocalTypeMASK typeDeclaration
public void update From Parser State if this body Starts At Header End Parser parser this parser might want to recover implemented interfaces protection for bugs 15142 if parser list Length 0 parser ast Length Ptr 0 awaiting interface type references int length parser ast Length Stack parser ast Length Ptr int ast Ptr parser ast Ptr length boolean can Consume ast Ptr 0 if can Consume if parser ast Stack ast Ptr instanceof Type Declaration can Consume false for int i 1 max length 1 i max i if parser ast Stack ast Ptr i instanceof Type Reference can Consume false if can Consume parser consume Class Header Implements will reset type List Length to zero thus this check will only be performed on first error Check after class X implements Y Z  updateFromParserState bodyStartsAtHeaderEnd listLength astLengthPtr astLengthStack astLengthPtr astPtr astPtr canConsume astPtr canConsume astStack astPtr TypeDeclaration canConsume astStack astPtr TypeReference canConsume canConsume consumeClassHeaderImplements typeListLength errorCheck
public Recovered Element update On Closing Brace int brace Start int brace End if bracket Balance 0 parent null this update Source End If Necessary brace Start brace End this body End brace Start 1 return parent return this  RecoveredElement updateOnClosingBrace braceStart braceEnd bracketBalance updateSourceEndIfNecessary braceStart braceEnd bodyEnd braceStart
public Recovered Element update On Opening Brace int brace Start int brace End in case the opening brace is not close enough to the signature ignore it if bracket Balance 0 if parser scanner search Line Number type Declaration source End parser scanner search Line Number brace End Parser parser this parser switch parser last Ignored Token case 1 case Token Nameextends case Token Nameimplements if parser recovered Static Initializer Start 0 break default this found Opening Brace true bracket Balance 1 pretend the brace was already there might be an initializer if this bracket Balance 1 Block block new Block 0 Parser parser this parser block source Start parser scanner start Position Initializer init if parser recovered Static Initializer Start 0 init new Initializer block Acc Default else init new Initializer block Acc Static init declaration Source Start parser recovered Static Initializer Start init body Start parser scanner current Position return this add init 1 return super update On Opening Brace brace Start brace End  RecoveredElement updateOnOpeningBrace braceStart braceEnd bracketBalance searchLineNumber typeDeclaration sourceEnd searchLineNumber braceEnd lastIgnoredToken TokenNameextends TokenNameimplements recoveredStaticInitializerStart foundOpeningBrace bracketBalance bracketBalance sourceStart startPosition recoveredStaticInitializerStart AccDefault AccStatic declarationSourceStart recoveredStaticInitializerStart bodyStart currentPosition updateOnOpeningBrace braceStart braceEnd
return super update On Opening Brace brace Start brace End public void update Parse Tree this updated Type Declaration  updateOnOpeningBrace braceStart braceEnd updateParseTree updatedTypeDeclaration
public void update Source End If Necessary int start int end if this type Declaration declaration Source End 0 this body End 0 this type Declaration declaration Source End end this type Declaration body End end  updateSourceEndIfNecessary typeDeclaration declarationSourceEnd bodyEnd typeDeclaration declarationSourceEnd typeDeclaration bodyEnd

public Recovered Type types public int type Count public Recovered Unit Compilation Unit Declaration unit Declaration int bracket Balance Parser parser super null bracket Balance parser this unit Declaration unit Declaration  RecoveredType typeCount RecoveredUnit CompilationUnitDeclaration unitDeclaration bracketBalance bracketBalance unitDeclaration unitDeclaration
public Recovered Element add Abstract Method Declaration method Declaration int bracket Balance Value attach it to last type if any if this type Count 0 Recovered Type type this types this type Count 1 type body End 0 reset position type type Declaration declaration Source End 0 reset position type type Declaration body End 0 return type add method Declaration bracket Balance Value return this ignore  RecoveredElement AbstractMethodDeclaration methodDeclaration bracketBalanceValue typeCount RecoveredType typeCount bodyEnd typeDeclaration declarationSourceEnd typeDeclaration bodyEnd methodDeclaration bracketBalanceValue
public Recovered Element add Field Declaration field Declaration int bracket Balance Value attach it to last type if any if this type Count 0 Recovered Type type this types this type Count 1 type body End 0 reset position type type Declaration declaration Source End 0 reset position type type Declaration body End 0 return type add field Declaration bracket Balance Value return this ignore  RecoveredElement FieldDeclaration fieldDeclaration bracketBalanceValue typeCount RecoveredType typeCount bodyEnd typeDeclaration declarationSourceEnd typeDeclaration bodyEnd fieldDeclaration bracketBalanceValue
public Recovered Element add Import Reference import Reference int bracket Balance Value if this imports null this imports new Recovered Import 5 this import Count 0 else if this import Count this imports length System arraycopy this imports 0 this imports new Recovered Import 2 this import Count 0 this import Count Recovered Import element new Recovered Import import Reference this bracket Balance Value this imports this import Count element if import not finished then import becomes current if import Reference declaration Source End 0 return element return this  RecoveredElement ImportReference importReference bracketBalanceValue RecoveredImport importCount importCount RecoveredImport importCount importCount RecoveredImport RecoveredImport importReference bracketBalanceValue importCount importReference declarationSourceEnd
public Recovered Element add Type Declaration type Declaration int bracket Balance Value if type Declaration bits AST Node Is Anonymous TypeMASK 0 if this type Count 0 add it to the last type Recovered Type last Type this types this type Count 1 last Type body End 0 reopen type last Type type Declaration body End 0 reopen type last Type type Declaration declaration Source End 0 reopen type last Type bracket Balance expect one closing brace return last Type add type Declaration bracket Balance Value if this types null this types new Recovered Type 5 this type Count 0 else if this type Count this types length System arraycopy this types 0 this types new Recovered Type 2 this type Count 0 this type Count Recovered Type element new Recovered Type type Declaration this bracket Balance Value this types this type Count element if type not finished then type becomes current if type Declaration declaration Source End 0 return element return this  RecoveredElement TypeDeclaration typeDeclaration bracketBalanceValue typeDeclaration ASTNode IsAnonymousTypeMASK typeCount RecoveredType lastType typeCount lastType bodyEnd lastType typeDeclaration bodyEnd lastType typeDeclaration declarationSourceEnd lastType bracketBalance lastType typeDeclaration bracketBalanceValue RecoveredType typeCount typeCount RecoveredType typeCount typeCount RecoveredType RecoveredType typeDeclaration bracketBalanceValue typeCount typeDeclaration declarationSourceEnd
Answer the associated parsed structure public AST Node parse Tree return this unit Declaration  ASTNode parseTree unitDeclaration
Answer the very source end of the corresponding parse node public int source End return this unit Declaration source End  sourceEnd unitDeclaration sourceEnd
public String to String int tab String Buffer result new String Buffer tab String tab result append Recovered unit n NON NLS 1 this unit Declaration print tab 1 result result append tab String tab 1 result append NON NLS 1 if this imports null for int i 0 i this import Count i result append n NON NLS 1 result append this imports i to String tab 1 if this types null for int i 0 i this type Count i result append n NON NLS 1 result append this types i to String tab 1 return result to String  toString StringBuffer StringBuffer tabString unitDeclaration tabString importCount toString typeCount toString toString
public Compilation Unit Declaration updated Compilation Unit Declaration update imports if this import Count 0 Import Reference import Refences new Import Reference this import Count for int i 0 i this import Count i import Refences i this imports i updated Import Reference this unit Declaration imports import Refences update types if this type Count 0 int existing Count this unit Declaration types null 0 this unit Declaration types length Type Declaration type Declarations new Type Declaration existing Count this type Count if existing Count 0 System arraycopy this unit Declaration types 0 type Declarations 0 existing Count may need to update the declaration Source End of the last type if this types this type Count 1 type Declaration declaration Source End 0 this types this type Count 1 type Declaration declaration Source End this unit Declaration source End this types this type Count 1 type Declaration body End this unit Declaration source End int actual Count existing Count for int i 0 i this type Count i Type Declaration type Decl this types i updated Type Declaration filter out local types 12454 if type Decl bits AST Node Is Local TypeMASK 0 type Declarations actual Count type Decl if actual Count this type Count System arraycopy type Declarations 0 type Declarations new Type Declaration existing Count actual Count 0 existing Count actual Count this unit Declaration types type Declarations return this unit Declaration  CompilationUnitDeclaration updatedCompilationUnitDeclaration importCount ImportReference importRefences ImportReference importCount importCount importRefences updatedImportReference unitDeclaration importRefences typeCount existingCount unitDeclaration unitDeclaration TypeDeclaration typeDeclarations TypeDeclaration existingCount typeCount existingCount unitDeclaration typeDeclarations existingCount declarationSourceEnd typeCount typeDeclaration declarationSourceEnd typeCount typeDeclaration declarationSourceEnd unitDeclaration sourceEnd typeCount typeDeclaration bodyEnd unitDeclaration sourceEnd actualCount existingCount typeCount TypeDeclaration typeDecl updatedTypeDeclaration typeDecl ASTNode IsLocalTypeMASK typeDeclarations actualCount typeDecl actualCount typeCount typeDeclarations typeDeclarations TypeDeclaration existingCount actualCount existingCount actualCount unitDeclaration typeDeclarations unitDeclaration
return this unit Declaration public void update Parse Tree this updated Compilation Unit Declaration  unitDeclaration updateParseTree updatedCompilationUnitDeclaration
Update the source End of the corresponding parse node public void update Source End If Necessary int body Start int body End if this unit Declaration source End 0 this unit Declaration source End body End  sourceEnd updateSourceEndIfNecessary bodyStart bodyEnd unitDeclaration sourceEnd unitDeclaration sourceEnd bodyEnd

public static final int Bracket Kinds 3 public Scanner this false comment false whitespace false nls Class File Constants JDK1 3 source Level null task Tag null task Priorities true task Case Sensitive  BracketKinds ClassFileConstants JDK1_3 sourceLevel taskTag taskPriorities taskCaseSensitive
public Scanner boolean tokenize Comments boolean tokenize White Space boolean check Non Externalized String Literals long source Level char task Tags char task Priorities boolean is Task Case Sensitive this eof Position Integer MAX VALUE this tokenize Comments tokenize Comments this tokenize White Space tokenize White Space this check Non Externalized String Literals check Non Externalized String Literals this assert Mode source Level Class File Constants JDK1 4 this task Tags task Tags this task Priorities task Priorities this is Task Case Sensitive is Task Case Sensitive  tokenizeComments tokenizeWhiteSpace checkNonExternalizedStringLiterals sourceLevel taskTags taskPriorities isTaskCaseSensitive eofPosition MAX_VALUE tokenizeComments tokenizeComments tokenizeWhiteSpace tokenizeWhiteSpace checkNonExternalizedStringLiterals checkNonExternalizedStringLiterals assertMode sourceLevel ClassFileConstants JDK1_4 taskTags taskTags taskPriorities taskPriorities isTaskCaseSensitive isTaskCaseSensitive
public final boolean at End This code is not relevant if source is Only a part of the real stream input return this source length this current Position  atEnd currentPosition
private void check Non Externalized String if this current Line null return parse Tags this current Line  checkNonExternalizedString currentLine parseTags currentLine
TODO frederic see if we need to take unicode characters into account public void check Task Tag int comment Start int comment End char src this source only look for newer task tags if this found Task Count 0 this found Task Positions this found Task Count 1 0 comment Start return int found Task Index this found Task Count char previous src comment Start 1 should be or next Char for int i comment Start 2 i comment End i this eof Position i char tag null char priority null check for tag occurrence only if not ambiguous with javadoc tag if previous next Tag for int itag 0 itag this task Tags length itag tag this task Tags itag int tag Length tag length if tag Length 0 continue next Tag ensure tag is not leaded with letter if tag starts with a letter if Character is Java Identifier Start tag 0 if Character is Java Identifier Part previous continue next Tag for int t 0 t tag Length t char sc tc int x i t if x this eof Position x comment End continue next Tag if sc src i t tc tag t case sensitive check if this is Task Case Sensitive Character to Lower Case sc Character to Lower Case tc case insensitive check continue next Tag ensure tag is not followed with letter if tag finishes with a letter if i tag Length comment End Character is Java Identifier Part src i tag Length 1 if Character is Java Identifier Part src i tag Length continue next Tag if this found Task Tags null this found Task Tags new char 5 this found Task Messages new char 5 this found Task Priorities new char 5 this found Task Positions new int 5 else if this found Task Count this found Task Tags length System arraycopy this found Task Tags 0 this found Task Tags new char this found Task Count 2 0 this found Task Count System arraycopy this found Task Messages 0 this found Task Messages new char this found Task Count 2 0 this found Task Count System arraycopy this found Task Priorities 0 this found Task Priorities new char this found Task Count 2 0 this found Task Count System arraycopy this found Task Positions 0 this found Task Positions new int this found Task Count 2 0 this found Task Count priority this task Priorities null itag this task Priorities length this task Priorities itag null this found Task Tags this found Task Count tag this found Task Priorities this found Task Count priority this found Task Positions this found Task Count new int i i tag Length 1 this found Task Messages this found Task Count Char Operation NO CHAR this found Task Count i tag Length 1 will be incremented when looping break next Tag previous src i for int i found Task Index i this found Task Count i retrieve message start and end positions int msg Start this found Task Positions i 0 this found Task Tags i length int max value i 1 this found Task Count this found Task Positions i 1 0 1 comment End 1 at most beginning of next task if max value msg Start max value msg Start would only occur if tag is before EOF int end 1 char c for int j msg Start j max value j if c src j n c r end j 1 break if end 1 for int j max value j msg Start j if c src j end j 1 break if end 1 end max value if msg Start end continue empty trim the message while Char Operation is Whitespace src end msg Start end end while Char Operation is Whitespace src msg Start msg Start end msg Start update the end position of the task this found Task Positions i 1 end get the message source final int message Length end msg Start 1 char message new char message Length System arraycopy src msg Start message 0 message Length this found Task Messages i message  checkTaskTag commentStart commentEnd foundTaskCount foundTaskPositions foundTaskCount commentStart foundTaskIndex foundTaskCount commentStart nextChar commentStart commentEnd eofPosition nextTag taskTags taskTags tagLength tagLength nextTag isJavaIdentifierStart isJavaIdentifierPart nextTag tagLength eofPosition commentEnd nextTag isTaskCaseSensitive toLowerCase toLowerCase nextTag tagLength commentEnd isJavaIdentifierPart tagLength isJavaIdentifierPart tagLength nextTag foundTaskTags foundTaskTags foundTaskMessages foundTaskPriorities foundTaskPositions foundTaskCount foundTaskTags foundTaskTags foundTaskTags foundTaskCount foundTaskCount foundTaskMessages foundTaskMessages foundTaskCount foundTaskCount foundTaskPriorities foundTaskPriorities foundTaskCount foundTaskCount foundTaskPositions foundTaskPositions foundTaskCount foundTaskCount taskPriorities taskPriorities taskPriorities foundTaskTags foundTaskCount foundTaskPriorities foundTaskCount foundTaskPositions foundTaskCount tagLength foundTaskMessages foundTaskCount CharOperation NO_CHAR foundTaskCount tagLength nextTag foundTaskIndex foundTaskCount msgStart foundTaskPositions foundTaskTags max_value foundTaskCount foundTaskPositions commentEnd max_value msgStart max_value msgStart msgStart max_value max_value msgStart max_value msgStart CharOperation isWhitespace msgStart CharOperation isWhitespace msgStart msgStart msgStart foundTaskPositions messageLength msgStart messageLength msgStart messageLength foundTaskMessages
public char get Current Identifier Source return the token REAL source aka unicodes are precomputed char result if this without Unicode Ptr 0 0 is used as a fast test flag so the real first char is in position 1 System arraycopy this without Unicode Buffer 1 result new char this without Unicode Ptr 0 this without Unicode Ptr else int length this current Position this start Position if length this source length return this source switch length see Optimized Length case 1 return optimized Current Token Source1 case 2 return optimized Current Token Source2 case 3 return optimized Current Token Source3 case 4 return optimized Current Token Source4 case 5 return optimized Current Token Source5 case 6 return optimized Current Token Source6 no optimization System arraycopy this source this start Position result new char length 0 length return result  getCurrentIdentifierSource withoutUnicodePtr withoutUnicodeBuffer withoutUnicodePtr withoutUnicodePtr currentPosition startPosition OptimizedLength optimizedCurrentTokenSource1 optimizedCurrentTokenSource2 optimizedCurrentTokenSource3 optimizedCurrentTokenSource4 optimizedCurrentTokenSource5 optimizedCurrentTokenSource6 startPosition
return result public int get Current Token End Position return this current Position 1  getCurrentTokenEndPosition currentPosition
public final char get Current Token Source Return the token REAL source aka unicodes are precomputed char result if this without Unicode Ptr 0 0 is used as a fast test flag so the real first char is in position 1 System arraycopy this without Unicode Buffer 1 result new char this without Unicode Ptr 0 this without Unicode Ptr else int length System arraycopy this source this start Position result new char length this current Position this start Position 0 length return result  getCurrentTokenSource withoutUnicodePtr withoutUnicodeBuffer withoutUnicodePtr withoutUnicodePtr startPosition currentPosition startPosition
public final char get Current Token Source String return the token REAL source aka unicodes are precomputed REMOVE the two that are at the beginning and the end char result if this without Unicode Ptr 0 0 is used as a fast test flag so the real first char is in position 1 System arraycopy this without Unicode Buffer 2 2 is 1 real start 1 to jump over the result new char this without Unicode Ptr 2 0 this without Unicode Ptr 2 else int length System arraycopy this source this start Position 1 result new char length this current Position this start Position 2 0 length return result  getCurrentTokenSourceString withoutUnicodePtr withoutUnicodeBuffer withoutUnicodePtr withoutUnicodePtr startPosition currentPosition startPosition
public final char get Raw Token Source int length this current Position this start Position char token Source new char length System arraycopy this source this start Position token Source 0 length return token Source  getRawTokenSource currentPosition startPosition tokenSource startPosition tokenSource tokenSource
public final char get Raw Token Source End int length this eof Position this current Position 1 char source End new char length System arraycopy this source this current Position source End 0 length return source End  getRawTokenSourceEnd eofPosition currentPosition sourceEnd currentPosition sourceEnd sourceEnd
public int get Current Token Start Position return this start Position  getCurrentTokenStartPosition startPosition
public final int get Line End int line Number if this line Ends null return 1 if line Number this line Ends length 1 return 1 if line Number 0 return 1 if line Number this line Ends length 1 return this eof Position return this line Ends line Number 1 next line start one character behind the line End of the previous line  getLineEnd lineNumber lineEnds lineNumber lineEnds lineNumber lineNumber lineEnds eofPosition lineEnds lineNumber lineEnd
public final int get Line Ends return a bounded copy of this line Ends int copy System arraycopy this line Ends 0 copy new int this line Ptr 1 0 this line Ptr 1 return copy  getLineEnds lineEnds lineEnds linePtr linePtr
Search the source position corresponding to the beginning of a given line number Line numbers are 1 based and relative to the scanner initial Position Character positions are 0 based e g get Line Start 1 0 indicates that the first line starts at character 0 In case the given line number is inconsistent answers 1 param line Number int return int public final int get Line Start int line Number if this line Ends null return 1 if line Number this line Ends length 1 return 1 if line Number 0 return 1 if line Number 1 return this initial Position return this line Ends line Number 2 1 next line start one character behind the line End of the previous line  initialPosition getLineStart lineNumber getLineStart lineNumber lineEnds lineNumber lineEnds lineNumber lineNumber initialPosition lineEnds lineNumber lineEnd
public final int get Next Char try if this current Character this source this current Position this source this current Position u unicode traitement int c1 c2 c3 c4 int unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 return 1 this current Character char c1 16 c2 16 c3 16 c4 this unicode As Back Slash this current Character need the unicode buffer if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position unicode Size this start Position fill the buffer with the char unicode Store At this without Unicode Ptr return this current Character end unicode traitement else this unicode As Back Slash false if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr return this current Character catch Index Out Of Bounds Exception e return 1  getNextChar currentCharacter currentPosition currentPosition unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentCharacter unicodeAsBackSlash currentCharacter withoutUnicodePtr unicodeInitializeBuffer currentPosition unicodeSize startPosition unicodeStoreAt withoutUnicodePtr currentCharacter unicodeAsBackSlash withoutUnicodePtr unicodeStoreAt withoutUnicodePtr currentCharacter IndexOutOfBoundsException
public final boolean get Next Char char tested Char BOOLEAN handle the case of unicode when a unicode appears then we must use a buffer that holds char internal values At the end of this method current Character holds the new visited char and current Position points right next after it Both previous lines are true if the current Character is to the tested Char On false no side effect has occured ALL get Next Char ARE OPTIMIZED COPIES if this current Position this source length handle the obvious case upfront this unicode As Back Slash false return false int temp this current Position try if this current Character this source this current Position this source this current Position u unicode traitement int c1 c2 c3 c4 int unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 this current Position temp return false this current Character char c1 16 c2 16 c3 16 c4 if this current Character tested Char this current Position temp return false this unicode As Back Slash this current Character need the unicode buffer if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position unicode Size this start Position fill the buffer with the char unicode Store At this without Unicode Ptr return true end unicode traitement else if this current Character tested Char this current Position temp return false this unicode As Back Slash false if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr return true catch Index Out Of Bounds Exception e this unicode As Back Slash false this current Position temp return false  getNextChar testedChar currentCharacter currentPosition currentCharacter testedChar getNextChar currentPosition unicodeAsBackSlash currentPosition currentCharacter currentPosition currentPosition unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentPosition currentCharacter currentCharacter testedChar currentPosition unicodeAsBackSlash currentCharacter withoutUnicodePtr unicodeInitializeBuffer currentPosition unicodeSize startPosition unicodeStoreAt withoutUnicodePtr currentCharacter testedChar currentPosition unicodeAsBackSlash withoutUnicodePtr unicodeStoreAt withoutUnicodePtr IndexOutOfBoundsException unicodeAsBackSlash currentPosition
public final int get Next Char char tested Char1 char tested Char2 INT 0 test Char1 1 tested Char2 1 others test can be done with x 0 for the first and x 0 for the second handle the case of unicode when a unicode appears then we must use a buffer that holds char internal values At the end of this method current Character holds the new visited char and current Position points right next after it Both previous lines are true if the current Character is to the tested Char1 2 On false no side effect has occured ALL get Next Char ARE OPTIMIZED COPIES if this current Position this source length handle the obvious case upfront return 1 int temp this current Position try int result if this current Character this source this current Position this source this current Position u unicode traitement int c1 c2 c3 c4 int unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 this current Position temp return 2 this current Character char c1 16 c2 16 c3 16 c4 if this current Character tested Char1 result 0 else if this current Character tested Char2 result 1 else this current Position temp return 1 need the unicode buffer if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position unicode Size this start Position fill the buffer with the char unicode Store At this without Unicode Ptr return result end unicode traitement else if this current Character tested Char1 result 0 else if this current Character tested Char2 result 1 else this current Position temp return 1 if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr return result catch Index Out Of Bounds Exception e this current Position temp return 1  getNextChar testedChar1 testedChar2 testChar1 testedChar2 currentCharacter currentPosition currentCharacter testedChar1 getNextChar currentPosition currentPosition currentCharacter currentPosition currentPosition unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentPosition currentCharacter currentCharacter testedChar1 currentCharacter testedChar2 currentPosition withoutUnicodePtr unicodeInitializeBuffer currentPosition unicodeSize startPosition unicodeStoreAt withoutUnicodePtr currentCharacter testedChar1 currentCharacter testedChar2 currentPosition withoutUnicodePtr unicodeStoreAt withoutUnicodePtr IndexOutOfBoundsException currentPosition
public final boolean get Next Char As Digit BOOLEAN handle the case of unicode when a unicode appears then we must use a buffer that holds char internal values At the end of this method current Character holds the new visited char and current Position points right next after it Both previous lines are true if the current Character is a digit On false no side effect has occured ALL get Next Char ARE OPTIMIZED COPIES if this current Position this source length handle the obvious case upfront return false int temp this current Position try if this current Character this source this current Position this source this current Position u unicode traitement int c1 c2 c3 c4 int unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 this current Position temp return false this current Character char c1 16 c2 16 c3 16 c4 if Character is Digit this current Character this current Position temp return false need the unicode buffer if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position unicode Size this start Position fill the buffer with the char unicode Store At this without Unicode Ptr return true end unicode traitement else if Character is Digit this current Character this current Position temp return false if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr return true catch Index Out Of Bounds Exception e this current Position temp return false  getNextCharAsDigit currentCharacter currentPosition currentCharacter getNextChar currentPosition currentPosition currentCharacter currentPosition currentPosition unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentPosition currentCharacter isDigit currentCharacter currentPosition withoutUnicodePtr unicodeInitializeBuffer currentPosition unicodeSize startPosition unicodeStoreAt withoutUnicodePtr isDigit currentCharacter currentPosition withoutUnicodePtr unicodeStoreAt withoutUnicodePtr IndexOutOfBoundsException currentPosition
public final boolean get Next Char As Digit int radix BOOLEAN handle the case of unicode when a unicode appears then we must use a buffer that holds char internal values At the end of this method current Character holds the new visited char and current Position points right next after it Both previous lines are true if the current Character is a digit base on radix On false no side effect has occured ALL get Next Char ARE OPTIMIZED COPIES if this current Position this source length handle the obvious case upfront return false int temp this current Position try if this current Character this source this current Position this source this current Position u unicode traitement int c1 c2 c3 c4 int unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 this current Position temp return false this current Character char c1 16 c2 16 c3 16 c4 if Character digit this current Character radix 1 this current Position temp return false need the unicode buffer if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position unicode Size this start Position fill the buffer with the char unicode Store At this without Unicode Ptr return true end unicode traitement else if Character digit this current Character radix 1 this current Position temp return false if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr return true catch Index Out Of Bounds Exception e this current Position temp return false  getNextCharAsDigit currentCharacter currentPosition currentCharacter getNextChar currentPosition currentPosition currentCharacter currentPosition currentPosition unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentPosition currentCharacter currentCharacter currentPosition withoutUnicodePtr unicodeInitializeBuffer currentPosition unicodeSize startPosition unicodeStoreAt withoutUnicodePtr currentCharacter currentPosition withoutUnicodePtr unicodeStoreAt withoutUnicodePtr IndexOutOfBoundsException currentPosition
public boolean get Next Char As Java Identifier Part BOOLEAN handle the case of unicode when a unicode appears then we must use a buffer that holds char internal values At the end of this method current Character holds the new visited char and current Position points right next after it Both previous lines are true if the current Character is a Java Identifier Part On false no side effect has occured ALL get Next Char ARE OPTIMIZED COPIES if this current Position this source length handle the obvious case upfront return false int temp this current Position try if this current Character this source this current Position this source this current Position u unicode traitement int c1 c2 c3 c4 int unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 this current Position temp return false this current Character char c1 16 c2 16 c3 16 c4 if Character is Java Identifier Part this current Character this current Position temp return false need the unicode buffer if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position unicode Size this start Position fill the buffer with the char unicode Store At this without Unicode Ptr return true end unicode traitement else if Character is Java Identifier Part this current Character this current Position temp return false if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr return true catch Index Out Of Bounds Exception e this current Position temp return false  getNextCharAsJavaIdentifierPart currentCharacter currentPosition currentCharacter JavaIdentifierPart getNextChar currentPosition currentPosition currentCharacter currentPosition currentPosition unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentPosition currentCharacter isJavaIdentifierPart currentCharacter currentPosition withoutUnicodePtr unicodeInitializeBuffer currentPosition unicodeSize startPosition unicodeStoreAt withoutUnicodePtr isJavaIdentifierPart currentCharacter currentPosition withoutUnicodePtr unicodeStoreAt withoutUnicodePtr IndexOutOfBoundsException currentPosition
public int get Next Token throws Invalid Input Exception this was Acr false if this diet jump Over Method Body this diet false return this current Position this source length Token NameEOF Token NameRBRACE int white Start 0 try while true loop for jumping over comments this without Unicode Ptr 0 start with a new token even comment written with unicode Consume white space and handles start Position white Start this current Position boolean is White Space has White Spaces false int offset 0 do this start Position this current Position boolean check If Unicode false try check If Unicode this current Character this source this current Position this source this current Position u catch Index Out Of Bounds Exception e if this tokenize White Space white Start this current Position 1 reposition scanner in case we are interested by spaces as tokens this current Position this start Position white Start return Token NameWHITESPACE if this current Position this eof Position return Token NameEOF if check If Unicode is White Space jump Over Unicode White Space offset 6 else offset 1 if this current Character r this current Character n check Non Externalized String if this record Line Separator push Line Separator else this current Line null is White Space this current Character Char Operation is Whitespace this current Character if is White Space has White Spaces true while is White Space if this tokenize White Space has White Spaces reposition scanner in case we are interested by spaces as tokens this current Position offset this start Position white Start return Token NameWHITESPACE little trick to get out in the middle of a source compuation if this current Position this eof Position return Token NameEOF Identify the next token switch this current Character case return Token NameLPAREN case return Token NameRPAREN case return Token NameLBRACE case return Token NameRBRACE case return Token NameLBRACKET case return Token NameRBRACKET case return Token NameSEMICOLON case return Token NameCOMMA case if get Next Char As Digit return scan Number true return Token NameDOT case int test if test get Next Char 0 return TokenNamePLUS PLUS if test 0 return TokenNamePLUS EQUAL return Token NamePLUS case int test if test get Next Char 0 return TokenNameMINUS MINUS if test 0 return TokenNameMINUS EQUAL return Token NameMINUS case return Token NameTWIDDLE case if get Next Char return TokenNameNOT EQUAL return Token NameNOT case if get Next Char return TokenNameMULTIPLY EQUAL return Token NameMULTIPLY case if get Next Char return TokenNameREMAINDER EQUAL return Token NameREMAINDER case int test if test get Next Char 0 return TokenNameLESS EQUAL if test 0 if get Next Char return TokenNameLEFT SHIFT EQUAL return TokenNameLEFT SHIFT return Token NameLESS case int test if test get Next Char 0 return TokenNameGREATER EQUAL if test 0 if test get Next Char 0 return TokenNameRIGHT SHIFT EQUAL if test 0 if get Next Char return TokenNameUNSIGNED RIGHT SHIFT EQUAL return TokenNameUNSIGNED RIGHT SHIFT return TokenNameRIGHT SHIFT return Token NameGREATER case if get Next Char return TokenNameEQUAL EQUAL return Token NameEQUAL case int test if test get Next Char 0 return TokenNameAND AND if test 0 return TokenNameAND EQUAL return Token NameAND case int test if test get Next Char 0 return TokenNameOR OR if test 0 return TokenNameOR EQUAL return Token NameOR case if get Next Char return TokenNameXOR EQUAL return Token NameXOR case return Token NameQUESTION case return Token NameCOLON case int test if test get Next Char n r 0 throw new Invalid Input Exception INVALID CHARACTER CONSTANT if test 0 relocate if finding another quote fairly close thus unicode u000D will be fully consumed for int look Ahead 0 look Ahead 3 look Ahead if this current Position look Ahead this source length break if this source this current Position look Ahead n break if this source this current Position look Ahead this current Position look Ahead 1 break throw new Invalid Input Exception INVALID CHARACTER CONSTANT if get Next Char relocate if finding another quote fairly close thus unicode u000D will be fully consumed for int look Ahead 0 look Ahead 3 look Ahead if this current Position look Ahead this source length break if this source this current Position look Ahead n break if this source this current Position look Ahead this current Position look Ahead 1 break throw new Invalid Input Exception INVALID CHARACTER CONSTANT if get Next Char scan Escape Character else consume next character this unicode As Back Slash false boolean check If Unicode false try check If Unicode this current Character this source this current Position this source this current Position u catch Index Out Of Bounds Exception e this current Position throw new Invalid Input Exception INVALID CHARACTER CONSTANT if check If Unicode get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr if get Next Char return Token Name Character Literal relocate if finding another quote fairly close thus unicode u000D will be fully consumed for int look Ahead 0 look Ahead 20 look Ahead if this current Position look Ahead this source length break if this source this current Position look Ahead n break if this source this current Position look Ahead this current Position look Ahead 1 break throw new Invalid Input Exception INVALID CHARACTER CONSTANT case try consume next character this unicode As Back Slash false boolean is Unicode false if this current Character this source this current Position this source this current Position u get Next Unicode Char is Unicode true else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr while this current Character r and n are not valid in string literals if this current Character n this current Character r relocate if finding another quote fairly close thus unicode u000D will be fully consumed if is Unicode int start this current Position for int look Ahead 0 look Ahead 50 look Ahead if this current Position this eof Position this current Position start break if this current Character this source this current Position this source this current Position u is Unicode true get Next Unicode Char else is Unicode false if is Unicode this current Character n this current Position set current position on new line character break if this current Character throw new Invalid Input Exception INVALID CHAR IN STRING else this current Position set current position on new line character throw new Invalid Input Exception INVALID CHAR IN STRING if this current Character int escape Size this current Position boolean back Slash As Unicode In String this unicode As Back Slash scan Escape Character make a side effect on this value and we need the previous value few lines down this one scan Escape Character escape Size this current Position escape Size if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position escape Size 1 this start Position unicode Store At this without Unicode Ptr else overwrite the in the buffer  getNextToken InvalidInputException wasAcr jumpOverMethodBody currentPosition TokenNameEOF TokenNameRBRACE whiteStart withoutUnicodePtr startPosition whiteStart currentPosition isWhiteSpace hasWhiteSpaces startPosition currentPosition checkIfUnicode checkIfUnicode currentCharacter currentPosition currentPosition IndexOutOfBoundsException tokenizeWhiteSpace whiteStart currentPosition currentPosition startPosition whiteStart TokenNameWHITESPACE currentPosition eofPosition TokenNameEOF checkIfUnicode isWhiteSpace jumpOverUnicodeWhiteSpace currentCharacter currentCharacter checkNonExternalizedString recordLineSeparator pushLineSeparator currentLine isWhiteSpace currentCharacter CharOperation isWhitespace currentCharacter isWhiteSpace hasWhiteSpaces isWhiteSpace tokenizeWhiteSpace hasWhiteSpaces currentPosition startPosition whiteStart TokenNameWHITESPACE currentPosition eofPosition TokenNameEOF currentCharacter TokenNameLPAREN TokenNameRPAREN TokenNameLBRACE TokenNameRBRACE TokenNameLBRACKET TokenNameRBRACKET TokenNameSEMICOLON TokenNameCOMMA getNextCharAsDigit scanNumber TokenNameDOT getNextChar TokenNamePLUS_PLUS TokenNamePLUS_EQUAL TokenNamePLUS getNextChar TokenNameMINUS_MINUS TokenNameMINUS_EQUAL TokenNameMINUS TokenNameTWIDDLE getNextChar TokenNameNOT_EQUAL TokenNameNOT getNextChar TokenNameMULTIPLY_EQUAL TokenNameMULTIPLY getNextChar TokenNameREMAINDER_EQUAL TokenNameREMAINDER getNextChar TokenNameLESS_EQUAL getNextChar TokenNameLEFT_SHIFT_EQUAL TokenNameLEFT_SHIFT TokenNameLESS getNextChar TokenNameGREATER_EQUAL getNextChar TokenNameRIGHT_SHIFT_EQUAL getNextChar TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL TokenNameUNSIGNED_RIGHT_SHIFT TokenNameRIGHT_SHIFT TokenNameGREATER getNextChar TokenNameEQUAL_EQUAL TokenNameEQUAL getNextChar TokenNameAND_AND TokenNameAND_EQUAL TokenNameAND getNextChar TokenNameOR_OR TokenNameOR_EQUAL TokenNameOR getNextChar TokenNameXOR_EQUAL TokenNameXOR TokenNameQUESTION TokenNameCOLON getNextChar InvalidInputException INVALID_CHARACTER_CONSTANT lookAhead lookAhead lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead InvalidInputException INVALID_CHARACTER_CONSTANT getNextChar lookAhead lookAhead lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead InvalidInputException INVALID_CHARACTER_CONSTANT getNextChar scanEscapeCharacter unicodeAsBackSlash checkIfUnicode checkIfUnicode currentCharacter currentPosition currentPosition IndexOutOfBoundsException currentPosition InvalidInputException INVALID_CHARACTER_CONSTANT checkIfUnicode getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr getNextChar TokenNameCharacterLiteral lookAhead lookAhead lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead InvalidInputException INVALID_CHARACTER_CONSTANT unicodeAsBackSlash isUnicode currentCharacter currentPosition currentPosition getNextUnicodeChar isUnicode withoutUnicodePtr unicodeStoreAt withoutUnicodePtr currentCharacter currentCharacter currentCharacter isUnicode currentPosition lookAhead lookAhead lookAhead currentPosition eofPosition currentPosition currentCharacter currentPosition currentPosition isUnicode getNextUnicodeChar isUnicode isUnicode currentCharacter currentPosition currentCharacter InvalidInputException INVALID_CHAR_IN_STRING currentPosition InvalidInputException INVALID_CHAR_IN_STRING currentCharacter escapeSize currentPosition backSlashAsUnicodeInString unicodeAsBackSlash scanEscapeCharacter scanEscapeCharacter escapeSize currentPosition escapeSize withoutUnicodePtr unicodeInitializeBuffer currentPosition escapeSize startPosition unicodeStoreAt withoutUnicodePtr
public final void get Next Unicode Char throws Invalid Input Exception VOID handle the case of unicode when a unicode appears then we must use a buffer that holds char internal values At the end of this method current Character holds the new visited char and current Position points right next after it ALL get Next Char ARE OPTIMIZED COPIES try int c1 0 c2 0 c3 0 c4 0 unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 throw new Invalid Input Exception INVALID UNICODE ESCAPE else this current Character char c1 16 c2 16 c3 16 c4 need the unicode buffer if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position unicode Size this start Position fill the buffer with the char unicode Store At this without Unicode Ptr this unicode As Back Slash this current Character catch Array Index Out Of Bounds Exception e this current Position throw new Invalid Input Exception INVALID UNICODE ESCAPE  getNextUnicodeChar InvalidInputException currentCharacter currentPosition getNextChar unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition InvalidInputException INVALID_UNICODE_ESCAPE currentCharacter withoutUnicodePtr unicodeInitializeBuffer currentPosition unicodeSize startPosition unicodeStoreAt withoutUnicodePtr unicodeAsBackSlash currentCharacter ArrayIndexOutOfBoundsException currentPosition InvalidInputException INVALID_UNICODE_ESCAPE
public char get Source return this source  getSource
public final void jump Over Method Body this was Acr false int found 1 try while true loop for jumping over comments Consume white space and handles start Position boolean is White Space do this start Position this current Position if this current Character this source this current Position this source this current Position u is White Space jump Over Unicode White Space else if this record Line Separator this current Character r this current Character n push Line Separator is White Space Char Operation is Whitespace this current Character while is White Space consume token until is found switch this current Character case found break case found if found 0 return break case boolean test test get Next Char if test try scan Escape Character catch Invalid Input Exception ex ignore else try consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr catch Invalid Input Exception ex ignore get Next Char break case try try consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr catch Invalid Input Exception ex ignore while this current Character if this current Character r if this source this current Position n this current Position break the string cannot go further that the line if this current Character n break the string cannot go further that the line if this current Character try scan Escape Character catch Invalid Input Exception ex ignore try consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr catch Invalid Input Exception ex ignore catch Index Out Of Bounds Exception e return break case int test if test get Next Char 0 line comment try this last Comment Line Position this current Position get the next char if this current Character this source this current Position this source this current Position u unicode traitement int c1 0 c2 0 c3 0 c4 0 this current Position while this source this current Position u this current Position if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 error don t care of the value this current Character A something different from n and r else this current Character char c1 16 c2 16 c3 16 c4 handle the u case manually into comment if this current Character if this source this current Position this current Position jump over the boolean is Unicode false while this current Character r this current Character n this last Comment Line Position this current Position get the next char is Unicode false if this current Character this source this current Position this source this current Position u is Unicode true unicode traitement int c1 0 c2 0 c3 0 c4 0 this current Position while this source this current Position u this current Position if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 error don t care of the value this current Character A something different from n and r else this current Character char c1 16 c2 16 c3 16 c4 handle the u case manually into comment if this current Character if this source this current Position this current Position jump over the We need to completely consume the line break if this current Character r this source length this current Position if this source this current Position n this current Position this current Character n else if this source this current Position this source this current Position 1 u is Unicode true char unicode Char int index this current Position 1 index while this source index u index unicode traitement int c1 0 c2 0 c3 0 c4 0 if c1 Character get Numeric Value this source index 15 c1 0 c2 Character get Numeric Value this source index 15 c2 0 c3 Character get Numeric Value this source index 15 c3 0 c4 Character get Numeric Value this source index 15 c4 0 error don t care of the value unicode Char A else unicode Char char c1 16 c2 16 c3 16 c4 if unicode Char n this current Position index this current Character n record Comment TokenNameCOMMENT LINE if this record Line Separator this current Character r this current Character n if is Unicode push Unicode Line Separator else push Line Separator catch Index Out Of Bounds Exception e an eof will then be generated this current Position record Comment TokenNameCOMMENT LINE if this tokenize Comments this current Position break if test 0 traditional and javadoc comment boolean is Javadoc false try get the next char boolean star false boolean is Unicode false consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char is Unicode true else is Unicode false if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr if this current Character is Javadoc true star true if this current Character r this current Character n if this record Line Separator if is Unicode push Unicode Line Separator else push Line Separator else this current Line null is Unicode false if this current Character this source this current Position this source this current Position u unicode traitement get Next Unicode Char is Unicode true else is Unicode false handle the u case manually into comment if this current Character if this source this current Position this current Position jump over the empty comment is not a javadoc if this current Character  jumpOverMethodBody wasAcr startPosition isWhiteSpace startPosition currentPosition currentCharacter currentPosition currentPosition isWhiteSpace jumpOverUnicodeWhiteSpace recordLineSeparator currentCharacter currentCharacter pushLineSeparator isWhiteSpace CharOperation isWhitespace currentCharacter isWhiteSpace currentCharacter getNextChar scanEscapeCharacter InvalidInputException unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr InvalidInputException getNextChar unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr InvalidInputException currentCharacter currentCharacter currentPosition currentPosition currentCharacter currentCharacter scanEscapeCharacter InvalidInputException unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr InvalidInputException IndexOutOfBoundsException getNextChar lastCommentLinePosition currentPosition currentCharacter currentPosition currentPosition currentPosition currentPosition currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentCharacter currentCharacter currentCharacter currentPosition currentPosition isUnicode currentCharacter currentCharacter lastCommentLinePosition currentPosition isUnicode currentCharacter currentPosition currentPosition isUnicode currentPosition currentPosition currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentCharacter currentCharacter currentCharacter currentPosition currentPosition currentCharacter currentPosition currentPosition currentPosition currentCharacter currentPosition currentPosition isUnicode unicodeChar currentPosition getNumericValue getNumericValue getNumericValue getNumericValue unicodeChar unicodeChar unicodeChar currentPosition currentCharacter recordComment TokenNameCOMMENT_LINE recordLineSeparator currentCharacter currentCharacter isUnicode pushUnicodeLineSeparator pushLineSeparator IndexOutOfBoundsException currentPosition recordComment TokenNameCOMMENT_LINE tokenizeComments currentPosition isJavadoc isUnicode unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar isUnicode isUnicode withoutUnicodePtr unicodeStoreAt withoutUnicodePtr currentCharacter isJavadoc currentCharacter currentCharacter recordLineSeparator isUnicode pushUnicodeLineSeparator pushLineSeparator currentLine isUnicode currentCharacter currentPosition currentPosition getNextUnicodeChar isUnicode isUnicode currentCharacter currentPosition currentPosition currentCharacter
public final boolean jump Over Unicode White Space throws Invalid Input Exception BOOLEAN handle the case of unicode Jump over the next white Space making start Position pointing on the next available char On false the current Character is filled up with a potential correct char try this was Acr false int c1 c2 c3 c4 int unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 throw new Invalid Input Exception INVALID UNICODE ESCAPE this current Character char c1 16 c2 16 c3 16 c4 if Char Operation is Whitespace this current Character return true buffer the new char which is not a white space unicode Store At this without Unicode Ptr this without Unicode Ptr 1 is true here return false catch Index Out Of Bounds Exception e this current Position throw new Invalid Input Exception INVALID UNICODE ESCAPE  jumpOverUnicodeWhiteSpace InvalidInputException whiteSpace startPosition currentCharacter wasAcr unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition InvalidInputException INVALID_UNICODE_ESCAPE currentCharacter CharOperation isWhitespace currentCharacter unicodeStoreAt withoutUnicodePtr withoutUnicodePtr IndexOutOfBoundsException currentPosition InvalidInputException INVALID_UNICODE_ESCAPE
final char optimized Current Token Source1 return always the same char build only once optimization at no speed cost of 99 5 of the single Char Identifier char char One this source this start Position switch char One case a return charArray a case b return charArray b case c return charArray c case d return charArray d case e return charArray e case f return charArray f case g return charArray g case h return charArray h case i return charArray i case j return charArray j case k return charArray k case l return charArray l case m return charArray m case n return charArray n case o return charArray o case p return charArray p case q return charArray q case r return charArray r case s return charArray s case t return charArray t case u return charArray u case v return charArray v case w return charArray w case x return charArray x case y return charArray y case z return charArray z default return new char char One  optimizedCurrentTokenSource1 singleCharIdentifier charOne startPosition charOne charArray_a charArray_b charArray_c charArray_d charArray_e charArray_f charArray_g charArray_h charArray_i charArray_j charArray_k charArray_l charArray_m charArray_n charArray_o charArray_p charArray_q charArray_r charArray_s charArray_t charArray_u charArray_v charArray_w charArray_x charArray_y charArray_z charOne
final char optimized Current Token Source2 try to return the same char build only once char c0 c1 int hash c0 this source this start Position 6 c1 this source this start Position 1 Table Size char table this charArray length 0 hash int i new Entry2 while i Internal Table Size char char Array table i if c0 char Array 0 c1 char Array 1 return char Array other side i 1 int max new Entry2 while i max char char Array table i if c0 char Array 0 c1 char Array 1 return char Array add the entry if max Internal Table Size max 0 char r table max r new char c0 c1 new Entry2 max return r  optimizedCurrentTokenSource2 startPosition startPosition TableSize charArray_length newEntry2 InternalTableSize charArray charArray charArray charArray newEntry2 charArray charArray charArray charArray InternalTableSize newEntry2
final char optimized Current Token Source3 try to return the same char build only once char c0 c1 c2 int hash c0 this source this start Position 12 c1 this source this start Position 1 6 c2 this source this start Position 2 Table Size char table this charArray length 1 hash int i new Entry3 while i Internal Table Size char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 return char Array other side i 1 int max new Entry3 while i max char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 return char Array add the entry if max Internal Table Size max 0 char r table max r new char c0 c1 c2 new Entry3 max return r  optimizedCurrentTokenSource3 startPosition startPosition startPosition TableSize charArray_length newEntry3 InternalTableSize charArray charArray charArray charArray charArray newEntry3 charArray charArray charArray charArray charArray InternalTableSize newEntry3
final char optimized Current Token Source4 try to return the same char build only once char c0 c1 c2 c3 long hash long c0 this source this start Position 18 c1 this source this start Position 1 12 c2 this source this start Position 2 6 c3 this source this start Position 3 Table Size char table this charArray length 2 int hash int i new Entry4 while i Internal Table Size char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 c3 char Array 3 return char Array other side i 1 int max new Entry4 while i max char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 c3 char Array 3 return char Array add the entry if max Internal Table Size max 0 char r table max r new char c0 c1 c2 c3 new Entry4 max return r  optimizedCurrentTokenSource4 startPosition startPosition startPosition startPosition TableSize charArray_length newEntry4 InternalTableSize charArray charArray charArray charArray charArray charArray newEntry4 charArray charArray charArray charArray charArray charArray InternalTableSize newEntry4
final char optimized Current Token Source5 try to return the same char build only once char c0 c1 c2 c3 c4 long hash long c0 this source this start Position 24 long c1 this source this start Position 1 18 c2 this source this start Position 2 12 c3 this source this start Position 3 6 c4 this source this start Position 4 Table Size char table this charArray length 3 int hash int i new Entry5 while i Internal Table Size char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 c3 char Array 3 c4 char Array 4 return char Array other side i 1 int max new Entry5 while i max char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 c3 char Array 3 c4 char Array 4 return char Array add the entry if max Internal Table Size max 0 char r table max r new char c0 c1 c2 c3 c4 new Entry5 max return r  optimizedCurrentTokenSource5 startPosition startPosition startPosition startPosition startPosition TableSize charArray_length newEntry5 InternalTableSize charArray charArray charArray charArray charArray charArray charArray newEntry5 charArray charArray charArray charArray charArray charArray charArray InternalTableSize newEntry5
final char optimized Current Token Source6 try to return the same char build only once char c0 c1 c2 c3 c4 c5 long hash long c0 this source this start Position 32 long c1 this source this start Position 1 24 long c2 this source this start Position 2 18 c3 this source this start Position 3 12 c4 this source this start Position 4 6 c5 this source this start Position 5 Table Size char table this charArray length 4 int hash int i new Entry6 while i Internal Table Size char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 c3 char Array 3 c4 char Array 4 c5 char Array 5 return char Array other side i 1 int max new Entry6 while i max char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 c3 char Array 3 c4 char Array 4 c5 char Array 5 return char Array add the entry if max Internal Table Size max 0 char r table max r new char c0 c1 c2 c3 c4 c5 new Entry6 max return r  optimizedCurrentTokenSource6 startPosition startPosition startPosition startPosition startPosition startPosition TableSize charArray_length newEntry6 InternalTableSize charArray charArray charArray charArray charArray charArray charArray charArray newEntry6 charArray charArray charArray charArray charArray charArray charArray charArray InternalTableSize newEntry6
private void parse Tags NLS Line line String s new String get Current Token Source int pos s index Of TAG PREFIX int line Length line size while pos 1 int start pos TAG PREFIX LENGTH int end s index Of TAG POSTFIX start if end 1 String index s substring start end int i 0 try i Integer parse Int index 1 Tags are one based not zero based catch Number Format Exception e i 1 we don t want to consider this as a valid NLS tag if line exists i line set i null pos s index Of TAG PREFIX start this nonNLS Strings new String Literal line Length int nonNLS Counter 0 for Iterator iterator line iterator iterator has Next String Literal literal String Literal iterator next if literal null this nonNLS Strings nonNLS Counter literal if nonNLS Counter 0 this nonNLS Strings null this current Line null return this was Non Externalized String Literal true if nonNLS Counter line Length System arraycopy this nonNLS Strings 0 this nonNLS Strings new String Literal nonNLS Counter 0 nonNLS Counter this current Line null  parseTags NLSLine getCurrentTokenSource indexOf TAG_PREFIX lineLength TAG_PREFIX_LENGTH indexOf TAG_POSTFIX parseInt NumberFormatException indexOf TAG_PREFIX nonNLSStrings StringLiteral lineLength nonNLSCounter hasNext StringLiteral StringLiteral nonNLSStrings nonNLSCounter nonNLSCounter nonNLSStrings currentLine wasNonExternalizedStringLiteral nonNLSCounter lineLength nonNLSStrings nonNLSStrings StringLiteral nonNLSCounter nonNLSCounter currentLine
public final void push Line Separator see comment on is Line Delimiter char for the use of n and r final int INCREMENT 250 if this check Non Externalized String Literals reinitialize the current line for non externalize strings purpose this current Line null current Character is at position current Position 1 cr 000D if this current Character r int separator Pos this current Position 1 TODO olivier david why the following line was if this line Ptr 0 this line Ends this line Ptr separator Pos return if this line Ptr 0 this line Ends this line Ptr separator Pos return System out println CR separator Pos int length this line Ends length if this line Ptr length System arraycopy this line Ends 0 this line Ends new int length INCREMENT 0 length this line Ends this line Ptr separator Pos look ahead for merged cr lf try if this source this current Position n System out println look ahead LF this current Position this line Ends this line Ptr this current Position this current Position this was Acr false else this was Acr true catch Index Out Of Bounds Exception e this was Acr true else lf 000A if this current Character n must merge eventual cr followed by lf if this was Acr this line Ends this line Ptr this current Position 2 System out println merge LF this current Position 1 this line Ends this line Ptr this current Position 1 else int separator Pos this current Position 1 TODO olivier david why the following line was if this line Ptr 0 this line Ends this line Ptr separator Pos return if this line Ptr 0 this line Ends this line Ptr separator Pos return System out println LF separator Pos int length this line Ends length if this line Ptr length System arraycopy this line Ends 0 this line Ends new int length INCREMENT 0 length this line Ends this line Ptr separator Pos this was Acr false  pushLineSeparator isLineDelimiter checkNonExternalizedStringLiterals currentLine currentCharacter currentPosition currentCharacter separatorPos currentPosition linePtr lineEnds linePtr separatorPos linePtr lineEnds linePtr separatorPos separatorPos lineEnds linePtr lineEnds lineEnds lineEnds linePtr separatorPos currentPosition currentPosition lineEnds linePtr currentPosition currentPosition wasAcr wasAcr IndexOutOfBoundsException wasAcr currentCharacter wasAcr lineEnds linePtr currentPosition currentPosition lineEnds linePtr currentPosition separatorPos currentPosition linePtr lineEnds linePtr separatorPos linePtr lineEnds linePtr separatorPos separatorPos lineEnds linePtr lineEnds lineEnds lineEnds linePtr separatorPos wasAcr
public final void push Unicode Line Separator if this check Non Externalized String Literals reinitialize the current line for non externalize strings purpose this current Line null cr 000D if this current Character r if this source this current Position n this was Acr false else this was Acr true else lf 000A if this current Character n must merge eventual cr followed by lf this was Acr false  pushUnicodeLineSeparator checkNonExternalizedStringLiterals currentLine currentCharacter currentPosition wasAcr wasAcr currentCharacter wasAcr
public void record Comment int token compute position int stop Position this current Position switch token case TokenNameCOMMENT LINE stop Position this last Comment Line Position break case TokenNameCOMMENT BLOCK stop Position this current Position break a new comment is recorded int length this comment Stops length if this comment Ptr length System arraycopy this comment Stops 0 this comment Stops new int length 30 0 length grows the positions buffers too System arraycopy this comment Starts 0 this comment Starts new int length 30 0 length this comment Stops this comment Ptr stop Position this comment Starts this comment Ptr this start Position  recordComment stopPosition currentPosition TokenNameCOMMENT_LINE stopPosition lastCommentLinePosition TokenNameCOMMENT_BLOCK stopPosition currentPosition commentStops commentPtr commentStops commentStops commentStarts commentStarts commentStops commentPtr stopPosition commentStarts commentPtr startPosition
Reposition the scanner on some portion of the original source The given end Position is the last valid position Beyond this position the scanner will answer EOF tokens code I Terminal Symbols Token NameEOF code param begin the given start position param end the given end position public void reset To int begin int end reset the scanner to a given position where it may rescan again this diet false this initial Position this start Position this current Position begin this eof Position end Integer MAX VALUE end 1 end this comment Ptr 1 reset comment stack this found Task Count 0 if reset To is used with being than end if begin this eof Position begin this eof Position  endPosition ITerminalSymbols TokenNameEOF resetTo initialPosition startPosition currentPosition eofPosition MAX_VALUE commentPtr foundTaskCount resetTo eofPosition eofPosition
public final void scan Escape Character throws Invalid Input Exception the string with u is a legal string of two chars and u thus we use a direct access to the source for regular cases if this unicode As Back Slash consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr else this current Character this source this current Position switch this current Character case b this current Character b break case t this current Character t break case n this current Character n break case f this current Character f break case r this current Character r break case this current Character break case this current Character break case this current Character break default octal escape Octal Digit Octal Digit Octal Digit Zero To Three Octal Digit Octal Digit int number Character get Numeric Value this current Character if number 0 number 7 boolean zero To Three Not number 3 if Character is Digit this current Character this source this current Position int digit Character get Numeric Value this current Character if digit 0 digit 7 number number 8 digit if Character is Digit this current Character this source this current Position if zero To Three Not has read Not Zero To Three Octal Digit Digit ignore last character this current Position else digit Character get Numeric Value this current Character if digit 0 digit 7 has read Zero To Three Octal Digit Octal Digit number number 8 digit else has read Zero To Three Octal Digit Non Octal Digit ignore last character this current Position else has read Octal Digit Non Digit ignore last character this current Position else has read Octal Digit Non Octal Digit ignore last character this current Position else has read Octal Digit ignore last character this current Position if number 255 throw new Invalid Input Exception INVALID ESCAPE this current Character char number else throw new Invalid Input Exception INVALID ESCAPE  scanEscapeCharacter InvalidInputException unicodeAsBackSlash unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr currentCharacter currentPosition currentCharacter currentCharacter currentCharacter currentCharacter currentCharacter currentCharacter currentCharacter currentCharacter currentCharacter OctalDigit OctalDigit OctalDigit ZeroToThree OctalDigit OctalDigit getNumericValue currentCharacter zeroToThreeNot isDigit currentCharacter currentPosition getNumericValue currentCharacter isDigit currentCharacter currentPosition zeroToThreeNot NotZeroToThree OctalDigit currentPosition getNumericValue currentCharacter ZeroToThree OctalDigit OctalDigit ZeroToThree OctalDigit NonOctalDigit currentPosition OctalDigit NonDigit currentPosition OctalDigit NonOctalDigit currentPosition OctalDigit currentPosition InvalidInputException INVALID_ESCAPE currentCharacter InvalidInputException INVALID_ESCAPE
public int scan Identifier Or Keyword test keywords first dispatch on the first char then the length If there are several keywors with the same length AND the same first char then do another dispatch on the second char this use Assert As An Indentifier false while get Next Char As Java Identifier Part empty int index length char data char first Letter if this without Unicode Ptr 0 quick test on length 1 but not on length 12 while most identifier have a length which is 12 but there are lots of identifier with only one char if length this current Position this start Position 1 return Token Name Identifier data this source index this start Position else if length this without Unicode Ptr 1 return Token Name Identifier data this without Unicode Buffer index 1 first Letter data index switch first Letter case a switch length case 8 abstract if data index b data index s data index t data index r data index a data index c data index t return Token Nameabstract else return Token Name Identifier case 6 assert if data index s data index s data index e data index r data index t if this assert Mode this contains Assert Keyword true return Token Nameassert else this use Assert As An Indentifier true return Token Name Identifier else return Token Name Identifier default return Token Name Identifier case b boolean break byte switch length case 4 if data index y data index t data index e return Token Namebyte else return Token Name Identifier case 5 if data index r data index e data index a data index k return Token Namebreak else return Token Name Identifier case 7 if data index o data index o data index l data index e data index a data index n return Token Nameboolean else return Token Name Identifier default return Token Name Identifier case c case char catch const class continue switch length case 4 if data index a if data index s data index e return Token Namecase else return Token Name Identifier else if data index h data index a data index r return Token Namechar else return Token Name Identifier case 5 if data index a if data index t data index c data index h return Token Namecatch else return Token Name Identifier else if data index l if data index a data index s data index s return Token Nameclass else return Token Name Identifier else if data index o data index n data index s data index t return Token NameERROR const is not used in java else return Token Name Identifier case 8 if data index o data index n data index t data index i data index n data index u data index e return Token Namecontinue else return Token Name Identifier default return Token Name Identifier case d default do double switch length case 2 if data index o return Token Namedo else return Token Name Identifier case 6 if data index o data index u data index b data index l data index e return Token Namedouble else return Token Name Identifier case 7 if data index e data index f data index a data index u data index l data index t return Token Namedefault else return Token Name Identifier default return Token Name Identifier case e else extends switch length case 4 if data index l data index s data index e return Token Nameelse else return Token Name Identifier case 7 if data index x data index t data index e data index n data index d data index s return Token Nameextends else return Token Name Identifier default return Token Name Identifier case f final finally float for false switch length case 3 if data index o data index r return Token Namefor else return Token Name Identifier case 5 if data index i if data index n data index a data index l return Token Namefinal else return Token Name Identifier else if data index l if data index o data index a data index t return Token Namefloat else return Token Name Identifier else if data index a data index l data index s data index e return Token Namefalse else return Token Name Identifier case 7 if data index i data index n data index a data index l data index l data index y return Token Namefinally else return Token Name Identifier default return Token Name Identifier case g goto if length 4 if data index o data index t data index o return Token NameERROR no goto in java are allowed so why java removes this keyword return Token Name Identifier case i if implements import instanceof int interface switch length case 2 if data index f return Token Nameif else return Token Name Identifier case 3 if data index n data index t return Token Nameint else return Token Name Identifier case 6 if data index m data index p data index o data index r data index t return Token Nameimport else return Token Name Identifier case 9 if data index n data index t data index e data index r data index f data index a data index c data index e return Token Nameinterface else return Token Name Identifier case 10 if data index m if data index p data index l data index e data index m data index e data index n data index t data index s return Token Nameimplements else return Token Name Identifier else if data index n data index s data index t data index a data index n data index c data index e data index o data index f return Token Nameinstanceof else return Token Name Identifier default return Token Name Identifier case l long if length 4 if data index o data index n data index g return Token Namelong return Token Name Identifier case n native new null switch length case 3 if data index e data index w return Token Namenew else return Token Name Identifier case 4 if data index u data index l data index l return Token Namenull else return Token Name Identifier case 6 if data index a data index t data index i data index v data index e return Token Namenative else return Token Name Identifier default return Token Name Identifier case p package private protected public switch length case 6 if data index u data index b data index l data index i data index c return Token Namepublic else return Token Name Identifier case 7 if data index a if data index c data index k data index a data index  scanIdentifierOrKeyword useAssertAsAnIndentifier getNextCharAsJavaIdentifierPart firstLetter withoutUnicodePtr currentPosition startPosition TokenNameIdentifier startPosition withoutUnicodePtr TokenNameIdentifier withoutUnicodeBuffer firstLetter firstLetter TokenNameabstract TokenNameIdentifier assertMode containsAssertKeyword TokenNameassert useAssertAsAnIndentifier TokenNameIdentifier TokenNameIdentifier TokenNameIdentifier TokenNamebyte TokenNameIdentifier TokenNamebreak TokenNameIdentifier TokenNameboolean TokenNameIdentifier TokenNameIdentifier TokenNamecase TokenNameIdentifier TokenNamechar TokenNameIdentifier TokenNamecatch TokenNameIdentifier TokenNameclass TokenNameIdentifier TokenNameERROR TokenNameIdentifier TokenNamecontinue TokenNameIdentifier TokenNameIdentifier TokenNamedo TokenNameIdentifier TokenNamedouble TokenNameIdentifier TokenNamedefault TokenNameIdentifier TokenNameIdentifier TokenNameelse TokenNameIdentifier TokenNameextends TokenNameIdentifier TokenNameIdentifier TokenNamefor TokenNameIdentifier TokenNamefinal TokenNameIdentifier TokenNamefloat TokenNameIdentifier TokenNamefalse TokenNameIdentifier TokenNamefinally TokenNameIdentifier TokenNameIdentifier TokenNameERROR TokenNameIdentifier TokenNameif TokenNameIdentifier TokenNameint TokenNameIdentifier TokenNameimport TokenNameIdentifier TokenNameinterface TokenNameIdentifier TokenNameimplements TokenNameIdentifier TokenNameinstanceof TokenNameIdentifier TokenNameIdentifier TokenNamelong TokenNameIdentifier TokenNamenew TokenNameIdentifier TokenNamenull TokenNameIdentifier TokenNamenative TokenNameIdentifier TokenNameIdentifier TokenNamepublic TokenNameIdentifier
public int scan Number boolean dot Prefix throws Invalid Input Exception when entering this method the current Character is the first digit of the number It may be preceeded by a when dot Prefix is true boolean floating dot Prefix if dot Prefix this current Character 0 if get Next Char x X 0 hexa force the first char of the hexa number do exist consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr if Character digit this current Character 16 1 throw new Invalid Input Exception INVALID HEXA end forcing while get Next Char As Digit 16 empty if get Next Char l L 0 return Token Name Long Literal else return Token Name Integer Literal there is x or X in the number potential octal some one may write 000099 0 thus 00100 00078 0 is true crazy language if get Next Char As Digit potential octal while get Next Char As Digit empty if get Next Char l L 0 return Token Name Long Literal if get Next Char f F 0 return Token Name Floating Point Literal if get Next Char d D 0 return Token Name Double Literal else make the distinction between octal and float boolean is Integer true if get Next Char is Integer false while get Next Char As Digit empty if get Next Char e E 0 consume next character is Integer false this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr if this current Character this current Character consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr if Character is Digit this current Character throw new Invalid Input Exception INVALID FLOAT while get Next Char As Digit empty if get Next Char f F 0 return Token Name Floating Point Literal if get Next Char d D 0 is Integer return Token Name Double Literal return Token Name Integer Literal else carry on while get Next Char As Digit empty if dot Prefix get Next Char l L 0 return Token Name Long Literal if dot Prefix get Next Char decimal part that can be empty while get Next Char As Digit empty floating true if floating is true both exponant and suffix may be optional if get Next Char e E 0 floating true consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr if this current Character this current Character consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr if Character is Digit this current Character throw new Invalid Input Exception INVALID FLOAT while get Next Char As Digit empty if get Next Char d D 0 return Token Name Double Literal if get Next Char f F 0 return Token Name Floating Point Literal the long flag has been tested before return floating Token Name Double Literal Token Name Integer Literal  scanNumber dotPrefix InvalidInputException currentCharacter dotPrefix dotPrefix dotPrefix currentCharacter getNextChar unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr currentCharacter InvalidInputException INVALID_HEXA getNextCharAsDigit getNextChar TokenNameLongLiteral TokenNameIntegerLiteral getNextCharAsDigit getNextCharAsDigit getNextChar TokenNameLongLiteral getNextChar TokenNameFloatingPointLiteral getNextChar TokenNameDoubleLiteral isInteger getNextChar isInteger getNextCharAsDigit getNextChar isInteger unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr currentCharacter currentCharacter unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr isDigit currentCharacter InvalidInputException INVALID_FLOAT getNextCharAsDigit getNextChar TokenNameFloatingPointLiteral getNextChar isInteger TokenNameDoubleLiteral TokenNameIntegerLiteral getNextCharAsDigit dotPrefix getNextChar TokenNameLongLiteral dotPrefix getNextChar getNextCharAsDigit getNextChar unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr currentCharacter currentCharacter unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr isDigit currentCharacter InvalidInputException INVALID_FLOAT getNextCharAsDigit getNextChar TokenNameDoubleLiteral getNextChar TokenNameFloatingPointLiteral TokenNameDoubleLiteral TokenNameIntegerLiteral
Search the line number corresponding to a specific position param position int return int public final int get Line Number int position if this line Ends null return 1 int length this line Ptr 1 if length 0 return 1 int g 0 d length 1 int m 0 while g d m g d 2 if position this line Ends m d m 1 else if position this line Ends m g m 1 else return m 1 if position this line Ends m return m 1 return m 2  getLineNumber lineEnds linePtr lineEnds lineEnds lineEnds
public final void set Source char source String the source buffer is set to source String int source Length if source String null this source Char Operation NO CHAR source Length 0 else this source source String source Length source String length this start Position 1 this eof Position source Length this initial Position this current Position 0 this contains Assert Keyword false  setSource sourceString sourceString sourceLength sourceString CharOperation NO_CHAR sourceLength sourceString sourceLength sourceString startPosition eofPosition sourceLength initialPosition currentPosition containsAssertKeyword
public String to String if this start Position this source length return EOF n n new String this source NON NLS 1 if this current Position this source length return behind the EOF n n new String this source NON NLS 1 char front new char this start Position System arraycopy this source 0 front 0 this start Position int middle Length this current Position 1 this start Position 1 char middle if middle Length 1 middle new char middle Length System arraycopy this source this start Position middle 0 middle Length else middle Char Operation NO CHAR char end new char this source length this current Position 1 System arraycopy this source this current Position 1 1 end 0 this source length this current Position 1 1 return new String front n n Starts here NON NLS 1 new String middle Ends here n n NON NLS 1 new String end  toString startPosition currentPosition startPosition startPosition middleLength currentPosition startPosition middleLength middleLength startPosition middleLength CharOperation NO_CHAR currentPosition currentPosition currentPosition nStarts
public final String to String Action int act switch act case Token Name Identifier return Identifier new String get Current Token Source NON NLS 1 NON NLS 2 case Token Nameabstract return abstract NON NLS 1 case Token Nameboolean return boolean NON NLS 1 case Token Namebreak return break NON NLS 1 case Token Namebyte return byte NON NLS 1 case Token Namecase return case NON NLS 1 case Token Namecatch return catch NON NLS 1 case Token Namechar return char NON NLS 1 case Token Nameclass return class NON NLS 1 case Token Namecontinue return continue NON NLS 1 case Token Namedefault return default NON NLS 1 case Token Namedo return do NON NLS 1 case Token Namedouble return double NON NLS 1 case Token Nameelse return else NON NLS 1 case Token Nameextends return extends NON NLS 1 case Token Namefalse return false NON NLS 1 case Token Namefinal return final NON NLS 1 case Token Namefinally return finally NON NLS 1 case Token Namefloat return float NON NLS 1 case Token Namefor return for NON NLS 1 case Token Nameif return if NON NLS 1 case Token Nameimplements return implements NON NLS 1 case Token Nameimport return import NON NLS 1 case Token Nameinstanceof return instanceof NON NLS 1 case Token Nameint return int NON NLS 1 case Token Nameinterface return interface NON NLS 1 case Token Namelong return long NON NLS 1 case Token Namenative return native NON NLS 1 case Token Namenew return new NON NLS 1 case Token Namenull return null NON NLS 1 case Token Namepackage return package NON NLS 1 case Token Nameprivate return private NON NLS 1 case Token Nameprotected return protected NON NLS 1 case Token Namepublic return public NON NLS 1 case Token Namereturn return return NON NLS 1 case Token Nameshort return short NON NLS 1 case Token Namestatic return static NON NLS 1 case Token Namesuper return super NON NLS 1 case Token Nameswitch return switch NON NLS 1 case Token Namesynchronized return synchronized NON NLS 1 case Token Namethis return this NON NLS 1 case Token Namethrow return throw NON NLS 1 case Token Namethrows return throws NON NLS 1 case Token Nametransient return transient NON NLS 1 case Token Nametrue return true NON NLS 1 case Token Nametry return try NON NLS 1 case Token Namevoid return void NON NLS 1 case Token Namevolatile return volatile NON NLS 1 case Token Namewhile return while NON NLS 1 case Token Name Integer Literal return Integer new String get Current Token Source NON NLS 1 NON NLS 2 case Token Name Long Literal return Long new String get Current Token Source NON NLS 1 NON NLS 2 case Token Name Floating Point Literal return Float new String get Current Token Source NON NLS 1 NON NLS 2 case Token Name Double Literal return Double new String get Current Token Source NON NLS 1 NON NLS 2 case Token Name Character Literal return Char new String get Current Token Source NON NLS 1 NON NLS 2 case Token Name String Literal return String new String get Current Token Source NON NLS 1 NON NLS 2 case TokenNamePLUS PLUS return NON NLS 1 case TokenNameMINUS MINUS return NON NLS 1 case TokenNameEQUAL EQUAL return NON NLS 1 case TokenNameLESS EQUAL return NON NLS 1 case TokenNameGREATER EQUAL return NON NLS 1 case TokenNameNOT EQUAL return NON NLS 1 case TokenNameLEFT SHIFT return NON NLS 1 case TokenNameRIGHT SHIFT return NON NLS 1 case TokenNameUNSIGNED RIGHT SHIFT return NON NLS 1 case TokenNamePLUS EQUAL return NON NLS 1 case TokenNameMINUS EQUAL return NON NLS 1 case TokenNameMULTIPLY EQUAL return NON NLS 1 case TokenNameDIVIDE EQUAL return NON NLS 1 case TokenNameAND EQUAL return NON NLS 1 case TokenNameOR EQUAL return NON NLS 1 case TokenNameXOR EQUAL return NON NLS 1 case TokenNameREMAINDER EQUAL return NON NLS 1 case TokenNameLEFT SHIFT EQUAL return NON NLS 1 case TokenNameRIGHT SHIFT EQUAL return NON NLS 1 case TokenNameUNSIGNED RIGHT SHIFT EQUAL return NON NLS 1 case TokenNameOR OR return NON NLS 1 case TokenNameAND AND return NON NLS 1 case Token NamePLUS return NON NLS 1 case Token NameMINUS return NON NLS 1 case Token NameNOT return NON NLS 1 case Token NameREMAINDER return NON NLS 1 case Token NameXOR return NON NLS 1 case Token NameAND return NON NLS 1 case Token NameMULTIPLY return NON NLS 1 case Token NameOR return NON NLS 1 case Token NameTWIDDLE return NON NLS 1 case Token NameDIVIDE return NON NLS 1 case Token NameGREATER return NON NLS 1 case Token NameLESS return NON NLS 1 case Token NameLPAREN return NON NLS 1 case Token NameRPAREN return NON NLS 1 case Token NameLBRACE return NON NLS 1 case Token NameRBRACE return NON NLS 1 case Token NameLBRACKET return NON NLS 1 case Token NameRBRACKET return NON NLS 1 case Token NameSEMICOLON return NON NLS 1 case Token NameQUESTION return NON NLS 1 case Token NameCOLON return NON NLS 1 case Token NameCOMMA return NON NLS 1 case Token NameDOT return NON NLS 1 case Token NameEQUAL return NON NLS 1 case Token NameEOF return EOF NON NLS 1 default return not a token NON NLS 1  toStringAction TokenNameIdentifier getCurrentTokenSource TokenNameabstract TokenNameboolean TokenNamebreak TokenNamebyte TokenNamecase TokenNamecatch TokenNamechar TokenNameclass TokenNamecontinue TokenNamedefault TokenNamedo TokenNamedouble TokenNameelse TokenNameextends TokenNamefalse TokenNamefinal TokenNamefinally TokenNamefloat TokenNamefor TokenNameif TokenNameimplements TokenNameimport TokenNameinstanceof TokenNameint TokenNameinterface TokenNamelong TokenNamenative TokenNamenew TokenNamenull TokenNamepackage TokenNameprivate TokenNameprotected TokenNamepublic TokenNamereturn TokenNameshort TokenNamestatic TokenNamesuper TokenNameswitch TokenNamesynchronized TokenNamethis TokenNamethrow TokenNamethrows TokenNametransient TokenNametrue TokenNametry TokenNamevoid TokenNamevolatile TokenNamewhile TokenNameIntegerLiteral getCurrentTokenSource TokenNameLongLiteral getCurrentTokenSource TokenNameFloatingPointLiteral getCurrentTokenSource TokenNameDoubleLiteral getCurrentTokenSource TokenNameCharacterLiteral getCurrentTokenSource TokenNameStringLiteral getCurrentTokenSource TokenNamePLUS_PLUS TokenNameMINUS_MINUS TokenNameEQUAL_EQUAL TokenNameLESS_EQUAL TokenNameGREATER_EQUAL TokenNameNOT_EQUAL TokenNameLEFT_SHIFT TokenNameRIGHT_SHIFT TokenNameUNSIGNED_RIGHT_SHIFT TokenNamePLUS_EQUAL TokenNameMINUS_EQUAL TokenNameMULTIPLY_EQUAL TokenNameDIVIDE_EQUAL TokenNameAND_EQUAL TokenNameOR_EQUAL TokenNameXOR_EQUAL TokenNameREMAINDER_EQUAL TokenNameLEFT_SHIFT_EQUAL TokenNameRIGHT_SHIFT_EQUAL TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL TokenNameOR_OR TokenNameAND_AND TokenNamePLUS TokenNameMINUS TokenNameNOT TokenNameREMAINDER TokenNameXOR TokenNameAND TokenNameMULTIPLY TokenNameOR TokenNameTWIDDLE TokenNameDIVIDE TokenNameGREATER TokenNameLESS TokenNameLPAREN TokenNameRPAREN TokenNameLBRACE TokenNameRBRACE TokenNameLBRACKET TokenNameRBRACKET TokenNameSEMICOLON TokenNameQUESTION TokenNameCOLON TokenNameCOMMA TokenNameDOT TokenNameEQUAL TokenNameEOF
public void unicode Initialize Buffer int length this without Unicode Ptr length if this without Unicode Buffer null this without Unicode Buffer new char length 1 10 int b Length this without Unicode Buffer length if 1 length b Length System arraycopy this without Unicode Buffer 0 this without Unicode Buffer new char length 1 10 0 b Length System arraycopy this source this start Position this without Unicode Buffer 1 length  unicodeInitializeBuffer withoutUnicodePtr withoutUnicodeBuffer withoutUnicodeBuffer bLength withoutUnicodeBuffer bLength withoutUnicodeBuffer withoutUnicodeBuffer bLength startPosition withoutUnicodeBuffer
public void unicode Store At int pos if this without Unicode Buffer null this without Unicode Buffer new char 10 int length this without Unicode Buffer length if pos length System arraycopy this without Unicode Buffer 0 this without Unicode Buffer new char length 2 0 length this without Unicode Buffer pos this current Character  unicodeStoreAt withoutUnicodeBuffer withoutUnicodeBuffer withoutUnicodeBuffer withoutUnicodeBuffer withoutUnicodeBuffer withoutUnicodeBuffer currentCharacter

public int selector Source End public Source Constructor Declaration Compilation Result compilation Result super compilation Result  selectorSourceEnd SourceConstructorDeclaration CompilationResult compilationResult compilationResult

public int field End Position public Source Field Declaration char name int source Start int source End super name source Start source End  fieldEndPosition SourceFieldDeclaration sourceStart sourceEnd sourceStart sourceEnd

public int selector Source End public Source Method Declaration Compilation Result compilation Result super compilation Result  selectorSourceEnd SourceMethodDeclaration CompilationResult compilationResult compilationResult

private Problem Reporter problem Reporter private Source Type Converter int flags Problem Reporter problem Reporter this flags flags this problem Reporter problem Reporter  ProblemReporter problemReporter SourceTypeConverter ProblemReporter problemReporter problemReporter problemReporter
public static Compilation Unit Declaration build Compilation Unit I Source Type source Types int flags Problem Reporter problem Reporter Compilation Result compilation Result return new Source Type Converter flags problem Reporter convert source Types compilation Result  CompilationUnitDeclaration buildCompilationUnit ISourceType sourceTypes ProblemReporter problemReporter CompilationResult compilationResult SourceTypeConverter problemReporter sourceTypes compilationResult
private Compilation Unit Declaration convert I Source Type source Types Compilation Result compilation Result this unit new Compilation Unit Declaration this problem Reporter compilation Result 0 not filled at this point if source Types length 0 return this unit I Source Type source Type source Types 0 if source Type get Name null TODO jerome investigate when this can happen if this can happen fix clients to protect themselves return null do a basic test that the source Type is valid only positions available int start source Type get Name Source Start int end source Type get Name Source End convert package and imports if source Type get Package Name null source Type get Package Name length 0 if its null then it is defined in the default package this unit current Package create Import Reference source Type get Package Name start end false Acc Default I Source Import source Imports source Type get Imports int import Count source Imports null 0 source Imports length this unit imports new Import Reference import Count for int i 0 i import Count i I Source Import source Import source Imports i this unit imports i create Import Reference source Import get Name source Import get Declaration Source Start source Import get Declaration Source End source Import on Demand source Import get Modifiers convert type s int type Count source Types length this unit types new Type Declaration type Count for int i 0 i type Count i this unit types i convert source Types i compilation Result return this unit  CompilationUnitDeclaration ISourceType sourceTypes CompilationResult compilationResult CompilationUnitDeclaration problemReporter compilationResult sourceTypes ISourceType sourceType sourceTypes sourceType getName sourceType sourceType getNameSourceStart sourceType getNameSourceEnd sourceType getPackageName sourceType getPackageName currentPackage createImportReference sourceType getPackageName AccDefault ISourceImport sourceImports sourceType getImports importCount sourceImports sourceImports ImportReference importCount importCount ISourceImport sourceImport sourceImports createImportReference sourceImport getName sourceImport getDeclarationSourceStart sourceImport getDeclarationSourceEnd sourceImport onDemand sourceImport getModifiers typeCount sourceTypes TypeDeclaration typeCount typeCount sourceTypes compilationResult
private Field Declaration convert I Source Field source Field Type Declaration type Field Declaration field new Field Declaration int start source Field get Name Source Start int end source Field get Name Source End field name source Field get Name field source Start start field source End end field type create Type Reference source Field get Type Name start end field declaration Source Start source Field get Declaration Source Start field declaration Source End source Field get Declaration Source End field modifiers source Field get Modifiers if this flags FIELD INITIALIZATION 0 conversion of field constant char initialization Source source Field get Initialization Source if initialization Source null if this parser null this parser new Parser this problem Reporter true this parser parse field type this unit initialization Source return field  FieldDeclaration ISourceField sourceField TypeDeclaration FieldDeclaration FieldDeclaration sourceField getNameSourceStart sourceField getNameSourceEnd sourceField getName sourceStart sourceEnd createTypeReference sourceField getTypeName declarationSourceStart sourceField getDeclarationSourceStart declarationSourceEnd sourceField getDeclarationSourceEnd sourceField getModifiers FIELD_INITIALIZATION initializationSource sourceField getInitializationSource initializationSource problemReporter initializationSource
private Abstract Method Declaration convert I Source Method source Method Compilation Result compilation Result Abstract Method Declaration method only source positions available int start source Method get Name Source Start int end source Method get Name Source End if source Method is Constructor Constructor Declaration decl new Constructor Declaration compilation Result decl is Default Constructor false method decl else Method Declaration decl new Method Declaration compilation Result convert return type decl return Type create Type Reference source Method get Return Type Name start end method decl method selector source Method get Selector method modifiers source Method get Modifiers method source Start start method source End end method declaration Source Start source Method get Declaration Source Start method declaration Source End source Method get Declaration Source End convert arguments char argument Type Names source Method get Argument Type Names char argument Names source Method get Argument Names int argument Count argument Type Names null 0 argument Type Names length long position long start 32 end method arguments new Argument argument Count for int i 0 i argument Count i method arguments i new Argument argument Names i position create Type Reference argument Type Names i start end Acc Default do not care whether was final or not convert thrown exceptions char exception Type Names source Method get Exception Type Names int exception Count exception Type Names null 0 exception Type Names length method thrown Exceptions new Type Reference exception Count for int i 0 i exception Count i method thrown Exceptions i create Type Reference exception Type Names i start end return method  AbstractMethodDeclaration ISourceMethod sourceMethod CompilationResult compilationResult AbstractMethodDeclaration sourceMethod getNameSourceStart sourceMethod getNameSourceEnd sourceMethod isConstructor ConstructorDeclaration ConstructorDeclaration compilationResult isDefaultConstructor MethodDeclaration MethodDeclaration compilationResult returnType createTypeReference sourceMethod getReturnTypeName sourceMethod getSelector sourceMethod getModifiers sourceStart sourceEnd declarationSourceStart sourceMethod getDeclarationSourceStart declarationSourceEnd sourceMethod getDeclarationSourceEnd argumentTypeNames sourceMethod getArgumentTypeNames argumentNames sourceMethod getArgumentNames argumentCount argumentTypeNames argumentTypeNames argumentCount argumentCount argumentNames createTypeReference argumentTypeNames AccDefault exceptionTypeNames sourceMethod getExceptionTypeNames exceptionCount exceptionTypeNames exceptionTypeNames thrownExceptions TypeReference exceptionCount exceptionCount thrownExceptions createTypeReference exceptionTypeNames
private Type Declaration convert I Source Type source Type Compilation Result compilation Result create type declaration can be member type Type Declaration type new Type Declaration compilation Result if source Type get Enclosing Type null type bits AST Node Is Member TypeMASK type name source Type get Name int start end only positions available type source Start start source Type get Name Source Start type source End end source Type get Name Source End type modifiers source Type get Modifiers type declaration Source Start source Type get Declaration Source Start type declaration Source End source Type get Declaration Source End type body End type declaration Source End set superclass and superinterfaces if source Type get Superclass Name null type superclass create Type Reference source Type get Superclass Name start end char interface Names source Type get Interface Names int interface Count interface Names null 0 interface Names length type super Interfaces new Type Reference interface Count for int i 0 i interface Count i type super Interfaces i create Type Reference interface Names i start end convert member types if this flags MEMBER TYPE 0 I Source Type source Member Types source Type get Member Types int source Member Type Count source Member Types null 0 source Member Types length type member Types new Type Declaration source Member Type Count for int i 0 i source Member Type Count i type member Types i convert source Member Types i compilation Result convert fields if this flags FIELD 0 I Source Field source Fields source Type get Fields int source Field Count source Fields null 0 source Fields length type fields new Field Declaration source Field Count for int i 0 i source Field Count i type fields i convert source Fields i type convert methods need to add default constructor if necessary boolean need Constructor this flags CONSTRUCTOR 0 boolean need Method this flags METHOD 0 if need Constructor need Method I Source Method source Methods source Type get Methods int source Method Count source Methods null 0 source Methods length source type has a constructor by default we assume that one is needed int extra Constructor 0 int method Count 0 boolean is Interface type is Interface if is Interface extra Constructor need Constructor 1 0 for int i 0 i source Method Count i if source Methods i is Constructor if need Constructor extra Constructor 0 Does not need the extra constructor since one constructor already exists method Count else if need Method method Count else method Count need Method source Method Count 0 type methods new Abstract Method Declaration method Count extra Constructor if extra Constructor 0 add default constructor in first position type methods 0 type creates Internal Constructor false false int index 0 for int i 0 i source Method Count i I Source Method source Method source Methods i boolean is Constructor source Method is Constructor if is Constructor need Constructor is Constructor need Method Abstract Method Declaration method convert source Method compilation Result if is Interface method is Abstract fix up flag method modifiers Acc Semicolon Body type methods extra Constructor index method return type  TypeDeclaration ISourceType sourceType CompilationResult compilationResult TypeDeclaration TypeDeclaration compilationResult sourceType getEnclosingType ASTNode IsMemberTypeMASK sourceType getName sourceStart sourceType getNameSourceStart sourceEnd sourceType getNameSourceEnd sourceType getModifiers declarationSourceStart sourceType getDeclarationSourceStart declarationSourceEnd sourceType getDeclarationSourceEnd bodyEnd declarationSourceEnd sourceType getSuperclassName createTypeReference sourceType getSuperclassName interfaceNames sourceType getInterfaceNames interfaceCount interfaceNames interfaceNames superInterfaces TypeReference interfaceCount interfaceCount superInterfaces createTypeReference interfaceNames MEMBER_TYPE ISourceType sourceMemberTypes sourceType getMemberTypes sourceMemberTypeCount sourceMemberTypes sourceMemberTypes memberTypes TypeDeclaration sourceMemberTypeCount sourceMemberTypeCount memberTypes sourceMemberTypes compilationResult ISourceField sourceFields sourceType getFields sourceFieldCount sourceFields sourceFields FieldDeclaration sourceFieldCount sourceFieldCount sourceFields needConstructor needMethod needConstructor needMethod ISourceMethod sourceMethods sourceType getMethods sourceMethodCount sourceMethods sourceMethods extraConstructor methodCount isInterface isInterface isInterface extraConstructor needConstructor sourceMethodCount sourceMethods isConstructor needConstructor extraConstructor methodCount needMethod methodCount methodCount needMethod sourceMethodCount AbstractMethodDeclaration methodCount extraConstructor extraConstructor createsInternalConstructor sourceMethodCount ISourceMethod sourceMethod sourceMethods isConstructor sourceMethod isConstructor isConstructor needConstructor isConstructor needMethod AbstractMethodDeclaration sourceMethod compilationResult isInterface isAbstract AccSemicolonBody extraConstructor
private Import Reference create Import Reference char import Name int start int end boolean on Demand int modifiers char q Import Name Char Operation split On import Name long positions new long q Import Name length long position long start 32 end for int i 0 i q Import Name length i positions i position dummy positions return new Import Reference q Import Name positions on Demand modifiers  ImportReference createImportReference importName onDemand qImportName CharOperation splitOn importName qImportName qImportName ImportReference qImportName onDemand
private Type Reference create Type Reference char type Signature int start int end count identifiers and dimensions int max type Signature length int dim Start max int dim 0 int ident Count 1 for int i 0 i max i switch type Signature i case if dim 0 dim Start i dim break case ident Count break rebuild identifiers and dimensions if ident Count 1 simple type reference if dim 0 return new Single Type Reference type Signature long start 32 end else char identifier new char dim Start System arraycopy type Signature 0 identifier 0 dim Start return new Array Type Reference identifier dim long start 32 end else qualified type reference long positions new long ident Count long pos long start 32 end for int i 0 i ident Count i positions i pos char identifiers Char Operation split On type Signature 0 dim Start if dim 0 return new Qualified Type Reference identifiers positions else return new Array Qualified Type Reference identifiers dim positions  TypeReference createTypeReference typeSignature typeSignature dimStart identCount typeSignature dimStart identCount identCount SingleTypeReference typeSignature dimStart typeSignature dimStart ArrayTypeReference identCount identCount CharOperation splitOn typeSignature dimStart QualifiedTypeReference ArrayQualifiedTypeReference

public Runtime Exception silent Exception public Abort Compilation empty  RuntimeException silentException AbortCompilation
public Abort Compilation Compilation Result compilation Result I Problem problem this this compilation Result compilation Result this problem problem  AbortCompilation CompilationResult compilationResult IProblem compilationResult compilationResult
public Abort Compilation Compilation Result compilation Result Throwable exception this this compilation Result compilation Result this exception exception  AbortCompilation CompilationResult compilationResult compilationResult compilationResult
public Abort Compilation boolean is Silent Runtime Exception silent Exception this this is Silent is Silent this silent Exception silent Exception  AbortCompilation isSilent RuntimeException silentException isSilent isSilent silentException silentException
public void update Context Invocation Site invocation Site Compilation Result unit Result if this problem null return if this problem get Source Start 0 this problem get Source End 0 return this problem set Source Start invocation Site source Start this problem set Source End invocation Site source End this problem set Source Line Number Problem Handler search Line Number unit Result line Separator Positions invocation Site source Start this compilation Result unit Result  updateContext InvocationSite invocationSite CompilationResult unitResult getSourceStart getSourceEnd setSourceStart invocationSite sourceStart setSourceEnd invocationSite sourceEnd setSourceLineNumber ProblemHandler searchLineNumber unitResult lineSeparatorPositions invocationSite sourceStart compilationResult unitResult
public void update Context AST Node ast Node Compilation Result unit Result if this problem null return if this problem get Source Start 0 this problem get Source End 0 return this problem set Source Start ast Node source Start this problem set Source End ast Node source End this problem set Source Line Number Problem Handler search Line Number unit Result line Separator Positions ast Node source Start this compilation Result unit Result  updateContext ASTNode astNode CompilationResult unitResult getSourceStart getSourceEnd setSourceStart astNode sourceStart setSourceEnd astNode sourceEnd setSourceLineNumber ProblemHandler searchLineNumber unitResult lineSeparatorPositions astNode sourceStart compilationResult unitResult

public class Abort Compilation Unit extends Abort Compilation public Abort Compilation Unit Compilation Result compilation Result I Problem problem super compilation Result problem  AbortCompilationUnit AbortCompilation AbortCompilationUnit CompilationResult compilationResult IProblem compilationResult

public class Abort Method extends Abort Type public Abort Method Compilation Result compilation Result I Problem problem super compilation Result problem  AbortMethod AbortType AbortMethod CompilationResult compilationResult IProblem compilationResult

public class Abort Type extends Abort Compilation Unit public Abort Type Compilation Result compilation Result I Problem problem super compilation Result problem  AbortType AbortCompilationUnit AbortType CompilationResult compilationResult IProblem compilationResult

public Default Problem char originating File Name String message int id String string Arguments int severity int start Position int end Position int line this file Name originating File Name this message message this id id this arguments string Arguments this severity severity this start Position start Position this end Position end Position this line line  DefaultProblem originatingFileName stringArguments startPosition endPosition fileName originatingFileName stringArguments startPosition startPosition endPosition endPosition
public String error Report Source char unit Source extra from the source the innacurate token and highlight it using some underneath put some context around too this code assumes that the font used in the console is fixed size sanity if this start Position this end Position this start Position 0 this end Position 0 return Util bind problem no Source Information NON NLS 1 String Buffer error Buffer new String Buffer NON NLS 1 error Buffer append Util bind problem at Line String value Of this line NON NLS 1 error Buffer append LINE DELIMITER append t NON NLS 1 char c final char SPACE u0020 final char MARK final char TAB t the next code tries to underline the token it assumes for a good display that token source does not contain any r n This is false on statements the code still works but the display is not optimal expand to line limits int length unit Source length begin end for begin this start Position length length 1 this start Position begin 0 begin if c unit Source begin 1 n c r break for end this end Position length length 1 this end Position end 1 length end if c unit Source end 1 r c n break trim left and right spaces tabs while c unit Source begin c t begin while c unit Source end c t end TODO philippe should also trim right but all tests are to be updated copy source error Buffer append unit Source begin end begin 1 error Buffer append LINE DELIMITER append t NON NLS 1 compute underline for int i begin i this start Position i error Buffer append unit Source i TAB TAB SPACE for int i this start Position i this end Position length length 1 this end Position i error Buffer append MARK return error Buffer to String  errorReportSource unitSource startPosition endPosition startPosition endPosition noSourceInformation StringBuffer errorBuffer StringBuffer errorBuffer atLine valueOf errorBuffer LINE_DELIMITER unitSource startPosition startPosition unitSource endPosition endPosition unitSource unitSource unitSource errorBuffer unitSource errorBuffer LINE_DELIMITER startPosition errorBuffer unitSource startPosition endPosition endPosition errorBuffer errorBuffer toString
Answer back the original arguments recorded into the problem return java lang String public String get Arguments return this arguments  getArguments
Answer the type of problem see org eclipse jdt core compiler I Problem getID return int public int getID return this id  IProblem
Answer a localized human readable message string which describes the problem return java lang String public String get Message return this message  getMessage
Answer the file name in which the problem was found return char public char get Originating File Name return this file Name  getOriginatingFileName fileName
Answer the end position of the problem inclusive or 1 if unknown return int public int get Source End return this end Position  getSourceEnd endPosition
Answer the line number in source where the problem begins return int public int get Source Line Number return this line  getSourceLineNumber
Answer the start position of the problem inclusive or 1 if unknown return int public int get Source Start return this start Position  getSourceStart startPosition
return boolean public boolean is Error return this severity Problem Severities Error 0  isError ProblemSeverities
return boolean public boolean is Warning return this severity Problem Severities Error 0  isWarning ProblemSeverities
public void set Originating File Name char file Name this file Name file Name  setOriginatingFileName fileName fileName fileName
Set the end position of the problem inclusive or 1 if unknown Used for shifting problem positions param source End the new value of the source End of the receiver public void set Source End int source End this end Position source End  sourceEnd sourceEnd setSourceEnd sourceEnd endPosition sourceEnd
Set the line number in source where the problem begins param line Number the new value of the line number of the receiver public void set Source Line Number int line Number this line line Number  lineNumber setSourceLineNumber lineNumber lineNumber
Set the start position of the problem inclusive or 1 if unknown Used for shifting problem positions param source Start the new value of the source start position of the receiver public void set Source Start int source Start this start Position source Start  sourceStart setSourceStart sourceStart startPosition sourceStart
public String to String String s Pb this id Ignore Categories Mask NON NLS 1 NON NLS 2 if this message null s this message else if this arguments null for int i 0 i this arguments length i s this arguments i NON NLS 1 return s  toString IgnoreCategoriesMask

private final static char SINGLE QUOTE to Char Array NON NLS 1 public Default Problem Factory this Locale get Default  SINGLE_QUOTE toCharArray DefaultProblemFactory getDefault
param loc the locale used to get the right message public Default Problem Factory Locale loc this locale loc if Locale get Default equals loc if DEFAULT LOCALE TEMPLATES null DEFAULT LOCALE TEMPLATES load Message Templates loc this message Templates DEFAULT LOCALE TEMPLATES else this message Templates load Message Templates loc  DefaultProblemFactory getDefault DEFAULT_LOCALE_TEMPLATES DEFAULT_LOCALE_TEMPLATES loadMessageTemplates messageTemplates DEFAULT_LOCALE_TEMPLATES messageTemplates loadMessageTemplates
Answer a new I Problem created according to the parameters value ul li originating File Name the name of the file name from which the problem is originated li problem Id the problem id li problem Arguments the fully qualified arguments recorded inside the problem li message Arguments the arguments needed to set the error message shorter names than problem Arguments ones li severity the severity of the problem li start Position the starting position of the problem li end Position the end position of the problem li line Number the line on which the problem occured ul param originating File Name char param problem Id int param problem Arguments String param message Arguments String param severity int param start Position int param end Position int param line Number int return org eclipse jdt internal compiler I Problem public I Problem create Problem char originating File Name int problem Id String problem Arguments String message Arguments int severity int start Position int end Position int line Number return new Default Problem originating File Name this get Localized Message problem Id message Arguments problem Id problem Arguments severity start Position end Position line Number  IProblem originatingFileName problemId problemArguments messageArguments problemArguments startPosition endPosition lineNumber originatingFileName problemId problemArguments messageArguments startPosition endPosition lineNumber IProblem IProblem createProblem originatingFileName problemId problemArguments messageArguments startPosition endPosition lineNumber DefaultProblem originatingFileName getLocalizedMessage problemId messageArguments problemId problemArguments startPosition endPosition lineNumber
line Number private final static int key FromID int id return id 1 keys are offsetted by one in table since it cannot handle 0 key  lineNumber keyFromID
Answer the locale used to retrieve the error messages return java util Locale public Locale get Locale return this locale  getLocale
public final String get Localized Message int id String problem Arguments String message String this message Templates get key FromID id I Problem Ignore Categories Mask if message null return Unable to retrieve the error message for problem id NON NLS 1 id I Problem Ignore Categories Mask Check compiler resources NON NLS 1 for compatibility with Message Format which eliminates double quotes in original message char message With No Double Quotes Char Operation replace message to Char Array DOUBLE QUOTES SINGLE QUOTE if problem Arguments null return new String message With No Double Quotes int length message With No Double Quotes length int start 0 int end length String Buffer output null if id I Problem Javadoc 0 if output null output new String Buffer 10 length problem Arguments length 20 output append String this message Templates get key FromID I Problem Javadoc Message Prefix I Problem Ignore Categories Mask while true if end Char Operation index Of message With No Double Quotes start 1 if output null output new String Buffer length problem Arguments length 20 output append message With No Double Quotes start end start if start Char Operation index Of message With No Double Quotes end 1 1 int index 1 String arg Id new String message With No Double Quotes end 1 start end 1 try index Integer parse Int arg Id output append problem Arguments index catch Number Format Exception nfe output append message With No Double Quotes end 1 start end catch Array Index Out Of Bounds Exception e return Cannot bind message for problem id NON NLS 1 id I Problem Ignore Categories Mask NON NLS 1 message with arguments NON NLS 1 Util to String problem Arguments NON NLS 1 start else output append message With No Double Quotes end length break else if output null return new String message With No Double Quotes output append message With No Double Quotes start length start break return output to String  getLocalizedMessage problemArguments messageTemplates keyFromID IProblem IgnoreCategoriesMask IProblem IgnoreCategoriesMask MessageFormat messageWithNoDoubleQuotes CharOperation toCharArray DOUBLE_QUOTES SINGLE_QUOTE problemArguments messageWithNoDoubleQuotes messageWithNoDoubleQuotes StringBuffer IProblem StringBuffer problemArguments messageTemplates keyFromID IProblem JavadocMessagePrefix IProblem IgnoreCategoriesMask CharOperation indexOf messageWithNoDoubleQuotes StringBuffer problemArguments messageWithNoDoubleQuotes CharOperation indexOf messageWithNoDoubleQuotes argId messageWithNoDoubleQuotes parseInt argId problemArguments NumberFormatException messageWithNoDoubleQuotes ArrayIndexOutOfBoundsException IProblem IgnoreCategoriesMask toString problemArguments messageWithNoDoubleQuotes messageWithNoDoubleQuotes messageWithNoDoubleQuotes toString
param problem org eclipse jdt internal compiler I Problem return String public final String localized Message I Problem problem return get Localized Message problem getID problem get Arguments  IProblem localizedMessage IProblem getLocalizedMessage getArguments
This method initializes the Message Templates class variable according to the current Locale param loc Locale return Hashtable Of Int public static Hashtable Of Int load Message Templates Locale loc Resource Bundle bundle null String bundle Name org eclipse jdt internal compiler problem messages NON NLS 1 try bundle Resource Bundle get Bundle bundle Name loc catch Missing Resource Exception e System out println Missing resource bundle Name replace properties for locale loc NON NLS 1 NON NLS 2 throw e Hashtable Of Int templates new Hashtable Of Int 700 Enumeration keys bundle get Keys while keys has More Elements String key String keys next Element try int messageID Integer parse Int key templates put key FromID messageID bundle get String key catch Number Format Exception e key ill formed catch Missing Resource Exception e available ID return templates  MessageTemplates HashtableOfInt HashtableOfInt loadMessageTemplates ResourceBundle bundleName ResourceBundle getBundle bundleName MissingResourceException bundleName HashtableOfInt HashtableOfInt getKeys hasMoreElements nextElement parseInt keyFromID getString NumberFormatException MissingResourceException

public Problem Handler I Error Handling Policy policy Compiler Options options I Problem Factory problem Factory this policy policy this problem Factory problem Factory this options options  ProblemHandler IErrorHandlingPolicy CompilerOptions IProblemFactory problemFactory problemFactory problemFactory
Error Warning Ignore public int compute Severity int problem Id return Error by default all problems are errors  computeSeverity problemId
public I Problem create Problem char file Name int problem Id String problem Arguments String message Arguments int severity int problem Start Position int problem End Position int line Number return this problem Factory create Problem file Name problem Id problem Arguments message Arguments severity problem Start Position problem End Position line Number  IProblem createProblem fileName problemId problemArguments messageArguments problemStartPosition problemEndPosition lineNumber problemFactory createProblem fileName problemId problemArguments messageArguments problemStartPosition problemEndPosition lineNumber
public void handle int problem Id String problem Arguments String message Arguments int severity int problem Start Position int problem End Position Reference Context reference Context Compilation Result unit Result if severity Ignore return if no reference context we need to abort from the current compilation process if reference Context null if severity Error 0 non reportable error is fatal I Problem problem this create Problem null problem Id problem Arguments message Arguments severity 0 0 0 throw new Abort Compilation null problem else return ignore non reportable warning I Problem problem this create Problem unit Result get File Name problem Id problem Arguments message Arguments severity problem Start Position problem End Position problem Start Position 0 search Line Number unit Result line Separator Positions problem Start Position 0 if problem null return problem couldn t be created ignore switch severity Error case Error this record problem unit Result reference Context reference Context tag As Having Errors should abort int abort Level if abort Level this policy stop On First Error Abort Compilation severity Abort 0 reference Context abort abort Level problem break case Warning this record problem unit Result reference Context break  problemId problemArguments messageArguments problemStartPosition problemEndPosition ReferenceContext referenceContext CompilationResult unitResult referenceContext IProblem createProblem problemId problemArguments messageArguments AbortCompilation IProblem createProblem unitResult getFileName problemId problemArguments messageArguments problemStartPosition problemEndPosition problemStartPosition searchLineNumber unitResult lineSeparatorPositions problemStartPosition unitResult referenceContext referenceContext tagAsHavingErrors abortLevel abortLevel stopOnFirstError AbortCompilation referenceContext abortLevel unitResult referenceContext
Standard problem handling API the actual severity warning error ignore is deducted from the problem ID and the current compiler options public void handle int problem Id String problem Arguments String message Arguments int problem Start Position int problem End Position Reference Context reference Context Compilation Result unit Result this handle problem Id problem Arguments message Arguments this compute Severity problem Id severity inferred using the ID problem Start Position problem End Position reference Context unit Result  problemId problemArguments messageArguments problemStartPosition problemEndPosition ReferenceContext referenceContext CompilationResult unitResult problemId problemArguments messageArguments computeSeverity problemId problemStartPosition problemEndPosition referenceContext unitResult
unit Result public void record I Problem problem Compilation Result unit Result Reference Context reference Context unit Result record problem reference Context  unitResult IProblem CompilationResult unitResult ReferenceContext referenceContext unitResult referenceContext
Search the line number corresponding to a specific position public static final int search Line Number int start Line Indexes int position if start Line Indexes null return 1 int length start Line Indexes length if length 0 return 1 int g 0 d length 1 int m 0 while g d m g d 2 if position start Line Indexes m d m 1 else if position start Line Indexes m g m 1 else return m 1 if position start Line Indexes m return m 1 return m 2  searchLineNumber startLineIndexes startLineIndexes startLineIndexes startLineIndexes startLineIndexes startLineIndexes

public Reference Context reference Context public Problem Reporter I Error Handling Policy policy Compiler Options options I Problem Factory problem Factory super policy options problem Factory  ReferenceContext referenceContext ProblemReporter IErrorHandlingPolicy CompilerOptions IProblemFactory problemFactory problemFactory
public void abort Due To Internal Error String error Message String arguments new String error Message this handle I Problem Unclassified arguments arguments Error Abort 0 0  abortDueToInternalError errorMessage errorMessage IProblem
public void abort Due To Internal Error String error Message AST Node location String arguments new String error Message this handle I Problem Unclassified arguments arguments Error Abort location source Start location source End  abortDueToInternalError errorMessage ASTNode errorMessage IProblem sourceStart sourceEnd
public void abstract Method Cannot Be Overridden Source Type Binding type Method Binding concrete Method this handle 1 must be abstract since it cannot override the inherited package private abstract method 2 I Problem Abstract Method Cannot Be Overridden new String new String type source Name new String Char Operation concat concrete Method declaring Class readable Name concrete Method readable Name new String new String type source Name new String Char Operation concat concrete Method declaring Class short Readable Name concrete Method short Readable Name type source Start type source End  abstractMethodCannotBeOverridden SourceTypeBinding MethodBinding concreteMethod IProblem AbstractMethodCannotBeOverridden sourceName CharOperation concreteMethod declaringClass readableName concreteMethod readableName sourceName CharOperation concreteMethod declaringClass shortReadableName concreteMethod shortReadableName sourceStart sourceEnd
public void abstract Method In Abstract Class Source Type Binding type Abstract Method Declaration method Decl String arguments new String new String type source Name new String method Decl selector this handle I Problem Abstract Method In Abstract Class arguments arguments method Decl source Start method Decl source End  abstractMethodInAbstractClass SourceTypeBinding AbstractMethodDeclaration methodDecl sourceName methodDecl IProblem AbstractMethodInAbstractClass methodDecl sourceStart methodDecl sourceEnd
public void abstract Method Must Be Implemented Source Type Binding type Method Binding abstract Method this handle Must implement the inherited abstract method 1 8 4 3 Every non abstract subclass of an abstract type A must provide a concrete implementation of all of A s methods I Problem Abstract Method Must Be Implemented new String new String Char Operation concat abstract Method declaring Class readable Name abstract Method readable Name new String new String Char Operation concat abstract Method declaring Class short Readable Name abstract Method short Readable Name type source Start type source End  abstractMethodMustBeImplemented SourceTypeBinding MethodBinding abstractMethod IProblem AbstractMethodMustBeImplemented CharOperation abstractMethod declaringClass readableName abstractMethod readableName CharOperation abstractMethod declaringClass shortReadableName abstractMethod shortReadableName sourceStart sourceEnd
public void abstract Method Needing No Body Abstract Method Declaration method this handle I Problem Body For Abstract Method No Argument No Argument method source Start method source End method method compilation Result  abstractMethodNeedingNoBody AbstractMethodDeclaration IProblem BodyForAbstractMethod NoArgument NoArgument sourceStart sourceEnd compilationResult
public void already Defined Label char label Name AST Node location String arguments new String new String label Name this handle I Problem Duplicate Label arguments arguments location source Start location source End  alreadyDefinedLabel labelName ASTNode labelName IProblem DuplicateLabel sourceStart sourceEnd
public void anonymous Class Cannot Extend Final Class Expression expression Type Binding type this handle I Problem Anonymous Class Cannot Extend Final Class new String new String type readable Name new String new String type short Readable Name expression source Start expression source End  anonymousClassCannotExtendFinalClass TypeBinding IProblem AnonymousClassCannotExtendFinalClass readableName shortReadableName sourceStart sourceEnd
public void argument Type Cannot Be Void Source Type Binding type Abstract Method Declaration method Decl Argument arg String arguments new String new String method Decl selector new String arg name this handle I Problem Argument Type Cannot Be Void arguments arguments method Decl source Start method Decl source End  argumentTypeCannotBeVoid SourceTypeBinding AbstractMethodDeclaration methodDecl methodDecl IProblem ArgumentTypeCannotBeVoid methodDecl sourceStart methodDecl sourceEnd
public void argument Type Cannot Be Void Array Source Type Binding type Abstract Method Declaration method Decl Argument arg String arguments new String new String method Decl selector new String arg name this handle I Problem Argument Type Cannot Be Void Array arguments arguments method Decl source Start method Decl source End  argumentTypeCannotBeVoidArray SourceTypeBinding AbstractMethodDeclaration methodDecl methodDecl IProblem ArgumentTypeCannotBeVoidArray methodDecl sourceStart methodDecl sourceEnd
public void argument Type Problem Source Type Binding type Abstract Method Declaration method Decl Argument arg Type Binding expected Type int problem Id expected Type problem Id int id switch problem Id case Not Found 1 id I Problem Argument Type Not Found break case Not Visible 2 id I Problem Argument Type Not Visible break case Ambiguous 3 id I Problem Argument Type Ambiguous break case Internal Name Provided 4 id I Problem Argument Type Internal Name Provided break case Inherited Name Hides Enclosing Name 5 id I Problem Argument Type Inherited Name Hides Enclosing Name break case No Error 0 default need Implementation want to fail to see why we were here return this handle id new String new String method Decl selector new String arg name new String expected Type readable Name new String new String method Decl selector new String arg name new String expected Type short Readable Name arg type source Start arg type source End  argumentTypeProblem SourceTypeBinding AbstractMethodDeclaration methodDecl TypeBinding expectedType problemId expectedType problemId problemId NotFound IProblem ArgumentTypeNotFound NotVisible IProblem ArgumentTypeNotVisible IProblem ArgumentTypeAmbiguous InternalNameProvided IProblem ArgumentTypeInternalNameProvided InheritedNameHidesEnclosingName IProblem ArgumentTypeInheritedNameHidesEnclosingName NoError needImplementation methodDecl expectedType readableName methodDecl expectedType shortReadableName sourceStart sourceEnd
public void array Constants Only In Array Initializers int source Start int source End this handle I Problem Array Constants Only In Array Initializers No Argument No Argument source Start source End  arrayConstantsOnlyInArrayInitializers sourceStart sourceEnd IProblem ArrayConstantsOnlyInArrayInitializers NoArgument NoArgument sourceStart sourceEnd
public void assignment Has No Effect Assignment assignment char name String arguments new String new String name this handle I Problem Assignment Has No Effect arguments arguments assignment source Start assignment source End  assignmentHasNoEffect IProblem AssignmentHasNoEffect sourceStart sourceEnd
public void attempt To Return Non Void Expression Return Statement return Statement Type Binding expected Type this handle I Problem Void Method Returns Value new String new String expected Type readable Name new String new String expected Type short Readable Name return Statement source Start return Statement source End  attemptToReturnNonVoidExpression ReturnStatement returnStatement TypeBinding expectedType IProblem VoidMethodReturnsValue expectedType readableName expectedType shortReadableName returnStatement sourceStart returnStatement sourceEnd
public void attempt To Return Void Value Return Statement return Statement this handle I Problem Method Returns Void No Argument No Argument return Statement source Start return Statement source End  attemptToReturnVoidValue ReturnStatement returnStatement IProblem MethodReturnsVoid NoArgument NoArgument returnStatement sourceStart returnStatement sourceEnd
public void bytecode Exceeds64K Limit Abstract Method Declaration location String arguments new String new String location selector parameters As String location binding if location is Constructor this handle I Problem Bytecode Exceeds64K Limit For Constructor arguments arguments Error Abort location source Start location source End else this handle I Problem Bytecode Exceeds64K Limit arguments arguments Error Abort location source Start location source End  bytecodeExceeds64KLimit AbstractMethodDeclaration parametersAsString isConstructor IProblem BytecodeExceeds64KLimitForConstructor sourceStart sourceEnd IProblem BytecodeExceeds64KLimit sourceStart sourceEnd
public void bytecode Exceeds64K Limit Type Declaration location this handle I Problem Bytecode Exceeds64K Limit For Clinit No Argument No Argument Error Abort location source Start location source End  bytecodeExceeds64KLimit TypeDeclaration IProblem BytecodeExceeds64KLimitForClinit NoArgument NoArgument sourceStart sourceEnd
public void cannot Allocate Void Array Expression expression this handle I Problem Cannot Allocate Void Array No Argument No Argument expression source Start expression source End  cannotAllocateVoidArray IProblem CannotAllocateVoidArray NoArgument NoArgument sourceStart sourceEnd
public void cannot Assign To Final Field Field Binding field AST Node location this handle I Problem Final Field Assignment new String field declaring Class null array new String field declaring Class readable Name NON NLS 1 new String field readable Name new String field declaring Class null array new String field declaring Class short Readable Name NON NLS 1 new String field short Readable Name location source Start location source End  cannotAssignToFinalField FieldBinding ASTNode IProblem FinalFieldAssignment declaringClass declaringClass readableName readableName declaringClass declaringClass shortReadableName shortReadableName sourceStart sourceEnd
public void cannot Assign To Final Local Local Variable Binding local AST Node location String arguments new String new String local readable Name this handle I Problem Non Blank Final Local Assignment arguments arguments location source Start location source End  cannotAssignToFinalLocal LocalVariableBinding ASTNode readableName IProblem NonBlankFinalLocalAssignment sourceStart sourceEnd
public void cannot Assign To Final Outer Local Local Variable Binding local AST Node location String arguments new String new String local readable Name this handle I Problem Final Outer Local Assignment arguments arguments location source Start location source End  cannotAssignToFinalOuterLocal LocalVariableBinding ASTNode readableName IProblem FinalOuterLocalAssignment sourceStart sourceEnd
public void cannot Declare Local Interface char interface Name int source Start int source End String arguments new String new String interface Name this handle I Problem Cannot Define Interface In Local Type arguments arguments source Start source End  cannotDeclareLocalInterface interfaceName sourceStart sourceEnd interfaceName IProblem CannotDefineInterfaceInLocalType sourceStart sourceEnd
public void cannot Define Dimensions And Initializer Array Allocation Expression expresssion this handle I Problem Cannot Define Dimension Expressions With Init No Argument No Argument expresssion source Start expresssion source End  cannotDefineDimensionsAndInitializer ArrayAllocationExpression IProblem CannotDefineDimensionExpressionsWithInit NoArgument NoArgument sourceStart sourceEnd
public void cannot Direcly Invoke Abstract Method Message Send message Send Method Binding method this handle I Problem Direct Invocation Of Abstract Method new String new String method declaring Class readable Name new String method selector parameters As String method new String new String method declaring Class short Readable Name new String method selector parameters As Short String method message Send source Start message Send source End  cannotDireclyInvokeAbstractMethod MessageSend messageSend MethodBinding IProblem DirectInvocationOfAbstractMethod declaringClass readableName parametersAsString declaringClass shortReadableName parametersAsShortString messageSend sourceStart messageSend sourceEnd
public void cannot Import Package Import Reference import Ref String arguments new String Char Operation to String import Ref tokens this handle I Problem Cannot Import Package arguments arguments import Ref source Start import Ref source End  cannotImportPackage ImportReference importRef CharOperation toString importRef IProblem CannotImportPackage importRef sourceStart importRef sourceEnd
public void cannot Instantiate Type Reference type Ref Type Binding type this handle I Problem Invalid Class Instantiation new String new String type readable Name new String new String type short Readable Name type Ref source Start type Ref source End  cannotInstantiate TypeReference typeRef TypeBinding IProblem InvalidClassInstantiation readableName shortReadableName typeRef sourceStart typeRef sourceEnd
public void cannot Refer To Non Final Outer Local Local Variable Binding local AST Node location String arguments new String new String local readable Name this handle I Problem Outer Local Must Be Final arguments arguments location source Start location source End  cannotReferToNonFinalOuterLocal LocalVariableBinding ASTNode readableName IProblem OuterLocalMustBeFinal sourceStart sourceEnd
public void cannot Return In Initializer AST Node location this handle I Problem Cannot Return In Initializer No Argument No Argument location source Start location source End  cannotReturnInInitializer ASTNode IProblem CannotReturnInInitializer NoArgument NoArgument sourceStart sourceEnd
public void cannot Throw Null Throw Statement statement this handle I Problem Cannot Throw Null No Argument No Argument statement source Start statement source End  cannotThrowNull ThrowStatement IProblem CannotThrowNull NoArgument NoArgument sourceStart sourceEnd
public void cannot Throw Type Source Type Binding type Abstract Method Declaration method Decl Type Reference exception Type Type Binding expected Type this handle I Problem Cannot Throw Type new String new String expected Type readable Name new String new String expected Type short Readable Name exception Type source Start exception Type source End  cannotThrowType SourceTypeBinding AbstractMethodDeclaration methodDecl TypeReference exceptionType TypeBinding expectedType IProblem CannotThrowType expectedType readableName expectedType shortReadableName exceptionType sourceStart exceptionType sourceEnd
public void cannot Use Super In Java Lang Object AST Node reference this handle I Problem Object Has No Superclass No Argument No Argument reference source Start reference source End  cannotUseSuperInJavaLangObject ASTNode IProblem ObjectHasNoSuperclass NoArgument NoArgument sourceStart sourceEnd
public void cannot Use Super In Code Snippet int start int end this handle I Problem Cannot Use Super In Code Snippet No Argument No Argument Error Abort start end  cannotUseSuperInCodeSnippet IProblem CannotUseSuperInCodeSnippet NoArgument NoArgument
public void case Expression Must Be Constant Expression expression this handle I Problem Non Constant Expression No Argument No Argument expression source Start expression source End  caseExpressionMustBeConstant IProblem NonConstantExpression NoArgument NoArgument sourceStart sourceEnd
public void class Extend Final Class Source Type Binding type Type Reference superclass Type Binding expected Type String name new String type source Name String expected Full Name new String expected Type readable Name String expected Short Name new String expected Type short Readable Name if expected Short Name equals name expected Short Name expected Full Name this handle I Problem Class Extend Final Class new String expected Full Name name new String expected Short Name name superclass source Start superclass source End  classExtendFinalClass SourceTypeBinding TypeReference TypeBinding expectedType sourceName expectedFullName expectedType readableName expectedShortName expectedType shortReadableName expectedShortName expectedShortName expectedFullName IProblem ClassExtendFinalClass expectedFullName expectedShortName sourceStart sourceEnd
public void code Snippet Missing Class String missing int start int end String arguments new String missing this handle I Problem Code Snippet Missing Class arguments arguments Error Abort start end  codeSnippetMissingClass IProblem CodeSnippetMissingClass
public void code Snippet Missing Method String class Name String missing Method String argument Types int start int end String arguments new String class Name missing Method argument Types this handle I Problem Code Snippet Missing Method arguments arguments Error Abort start end  codeSnippetMissingMethod className missingMethod argumentTypes className missingMethod argumentTypes IProblem CodeSnippetMissingMethod
public int compute Severity int problem Id severity can have been preset on the problem if problem severity Fatal 0 return Error if not then check whether it is a configurable problem switch problem Id case I Problem Masked Catch return this options get Severity Compiler Options Masked Catch Block case I Problem Unused Import return this options get Severity Compiler Options Unused Import case I Problem Method But With Constructor Name return this options get Severity Compiler Options Method With Constructor Name case I Problem Overriding Non Visible Method return this options get Severity Compiler Options Overridden Package Default Method case I Problem Incompatible Return Type For Non Inherited Interface Method case I Problem Incompatible Exception In Throws Clause For Non Inherited Interface Method return this options get Severity Compiler Options Incompatible Non Inherited Interface Method case I Problem Overriding Deprecated Method case I Problem Using Deprecated Type case I Problem Using Deprecated Method case I Problem Using Deprecated Constructor case I Problem Using Deprecated Field return this options get Severity Compiler Options Using DeprecatedAPI case I Problem Local Variable Is Never Used return this options get Severity Compiler Options Unused Local Variable case I Problem Argument Is Never Used return this options get Severity Compiler Options Unused Argument case I Problem No Implicit String Conversion For Char Array Expression return this options get Severity Compiler Options No Implicit String Conversion case I Problem Need To Emulate Field Read Access case I Problem Need To Emulate Field Write Access case I Problem Need To Emulate Method Access case I Problem Need To Emulate Constructor Access return this options get Severity Compiler Options Access Emulation case I Problem Non Externalized String Literal return this options get Severity Compiler Options Non Externalized String case I Problem Use Assert As An Identifier return this options get Severity Compiler Options Assert Used As An Identifier case I Problem Non Static Access To Static Method case I Problem Non Static Access To Static Field return this options get Severity Compiler Options Non Static Access To Static case I Problem Indirect Access To Static Method case I Problem Indirect Access To Static Field case I Problem Indirect Access To Static Type return this options get Severity Compiler Options Indirect Static Access case I Problem Assignment Has No Effect return this options get Severity Compiler Options No Effect Assignment case I Problem Unused Private Constructor case I Problem Unused Private Method case I Problem Unused Private Field case I Problem Unused Private Type return this options get Severity Compiler Options Unused Private Member case I Problem Task return Warning case I Problem Local Variable Hiding Local Variable case I Problem Local Variable Hiding Field case I Problem Argument Hiding Local Variable case I Problem Argument Hiding Field return this options get Severity Compiler Options Local Variable Hiding case I Problem Field Hiding Local Variable case I Problem Field Hiding Field return this options get Severity Compiler Options Field Hiding case I Problem Possible Accidental Boolean Assignment return this options get Severity Compiler Options Accidental Boolean Assign case I Problem Superfluous Semicolon case I Problem Empty Control Flow Statement return this options get Severity Compiler Options Empty Statement case I Problem Undocumented Empty Block return this options get Severity Compiler Options Undocumented Empty Block case I Problem Unnecessary Cast case I Problem Unnecessary Argument Cast case I Problem Unnecessary Instanceof return this options get Severity Compiler Options Unnecessary Type Check case I Problem Finally Must Complete Normally return this options get Severity Compiler Options Finally Block Not Completing case I Problem Unused Method Declared Thrown Exception case I Problem Unused Constructor Declared Thrown Exception return this options get Severity Compiler Options Unused Declared Thrown Exception case I Problem Unqualified Field Access return this options get Severity Compiler Options Unqualified Field Access case I Problem Unnecessary Else return this options get Severity Compiler Options Unnecessary Else Javadoc syntax errors Javadoc explicit I Ds case I Problem Javadoc Unexpected Tag case I Problem Javadoc Duplicate Return Tag case I Problem Javadoc Invalid Throws Class case I Problem Javadoc Invalid See Reference case I Problem Javadoc Malformed See Reference case I Problem Javadoc Invalid See Href case I Problem Javadoc Invalid See Args case I Problem Javadoc Invalid Tag case I Problem Javadoc Unterminated Inline Tag if this options doc Comment Support return this options get Severity Compiler Options Invalid Javadoc else return Problem Severities Ignore Javadoc tags resolved references errors case I Problem Javadoc Invalid Param Name case I Problem Javadoc Duplicate Param Name case I Problem Javadoc Missing Param Name case I Problem Javadoc Invalid Throws Class Name case I Problem Javadoc Duplicate Throws Class Name case I Problem Javadoc Missing Throws Class Name case I Problem Javadoc Missing See Reference case I Problem Javadoc Using Deprecated Field case I Problem Javadoc Using Deprecated Constructor case I Problem Javadoc Using Deprecated Method case I Problem Javadoc Using Deprecated Type case I Problem Javadoc Undefined Field case I Problem Javadoc Not Visible Field case I Problem Javadoc Ambiguous Field case I Problem Javadoc Undefined Constructor case I Problem Javadoc Not Visible Constructor case I Problem Javadoc Ambiguous Constructor case I Problem Javadoc Undefined Method case I Problem Javadoc Not Visible Method case I Problem Javadoc Ambiguous Method case I Problem Javadoc Ambiguous Method Reference case I Problem Javadoc Parameter Mismatch case I Problem Javadoc Undefined Type case I Problem Javadoc Not Visible Type case I Problem Javadoc Ambiguous Type case I Problem Javadoc Internal Type Name Provided case I Problem Javadoc No Message Send On Array Type case I Problem Javadoc No Message Send On Base Type case I Problem Javadoc Inherited Method Hides Enclosing Name case I Problem Javadoc Inherited Field Hides Enclosing Name case I Problem Javadoc Inherited Name Hides Enclosing Type Name if this options doc Comment Support this options report Invalid Javadoc Tags return this options get Severity Compiler Options Invalid Javadoc else return Problem Severities Ignore Javadoc missing tags errors case I Problem Javadoc Missing Param Tag case I Problem Javadoc Missing Return Tag case I Problem Javadoc Missing Throws Tag if this options doc Comment Support return this options get Severity Compiler Options Missing Javadoc Tags else return Problem Severities Ignore Missing Javadoc errors case I Problem Javadoc Missing if this options doc Comment Support return this options get Severity Compiler Options Missing Javadoc Comments else return Problem Severities Ignore by default problems are errors default return Error  computeSeverity problemId problemId IProblem MaskedCatch getSeverity CompilerOptions MaskedCatchBlock IProblem UnusedImport getSeverity CompilerOptions UnusedImport IProblem MethodButWithConstructorName getSeverity CompilerOptions MethodWithConstructorName IProblem OverridingNonVisibleMethod getSeverity CompilerOptions OverriddenPackageDefaultMethod IProblem IncompatibleReturnTypeForNonInheritedInterfaceMethod IProblem IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod getSeverity CompilerOptions IncompatibleNonInheritedInterfaceMethod IProblem OverridingDeprecatedMethod IProblem UsingDeprecatedType IProblem UsingDeprecatedMethod IProblem UsingDeprecatedConstructor IProblem UsingDeprecatedField getSeverity CompilerOptions UsingDeprecatedAPI IProblem LocalVariableIsNeverUsed getSeverity CompilerOptions UnusedLocalVariable IProblem ArgumentIsNeverUsed getSeverity CompilerOptions UnusedArgument IProblem NoImplicitStringConversionForCharArrayExpression getSeverity CompilerOptions NoImplicitStringConversion IProblem NeedToEmulateFieldReadAccess IProblem NeedToEmulateFieldWriteAccess IProblem NeedToEmulateMethodAccess IProblem NeedToEmulateConstructorAccess getSeverity CompilerOptions AccessEmulation IProblem NonExternalizedStringLiteral getSeverity CompilerOptions NonExternalizedString IProblem UseAssertAsAnIdentifier getSeverity CompilerOptions AssertUsedAsAnIdentifier IProblem NonStaticAccessToStaticMethod IProblem NonStaticAccessToStaticField getSeverity CompilerOptions NonStaticAccessToStatic IProblem IndirectAccessToStaticMethod IProblem IndirectAccessToStaticField IProblem IndirectAccessToStaticType getSeverity CompilerOptions IndirectStaticAccess IProblem AssignmentHasNoEffect getSeverity CompilerOptions NoEffectAssignment IProblem UnusedPrivateConstructor IProblem UnusedPrivateMethod IProblem UnusedPrivateField IProblem UnusedPrivateType getSeverity CompilerOptions UnusedPrivateMember IProblem IProblem LocalVariableHidingLocalVariable IProblem LocalVariableHidingField IProblem ArgumentHidingLocalVariable IProblem ArgumentHidingField getSeverity CompilerOptions LocalVariableHiding IProblem FieldHidingLocalVariable IProblem FieldHidingField getSeverity CompilerOptions FieldHiding IProblem PossibleAccidentalBooleanAssignment getSeverity CompilerOptions AccidentalBooleanAssign IProblem SuperfluousSemicolon IProblem EmptyControlFlowStatement getSeverity CompilerOptions EmptyStatement IProblem UndocumentedEmptyBlock getSeverity CompilerOptions UndocumentedEmptyBlock IProblem UnnecessaryCast IProblem UnnecessaryArgumentCast IProblem UnnecessaryInstanceof getSeverity CompilerOptions UnnecessaryTypeCheck IProblem FinallyMustCompleteNormally getSeverity CompilerOptions FinallyBlockNotCompleting IProblem UnusedMethodDeclaredThrownException IProblem UnusedConstructorDeclaredThrownException getSeverity CompilerOptions UnusedDeclaredThrownException IProblem UnqualifiedFieldAccess getSeverity CompilerOptions UnqualifiedFieldAccess IProblem UnnecessaryElse getSeverity CompilerOptions UnnecessaryElse IDs IProblem JavadocUnexpectedTag IProblem JavadocDuplicateReturnTag IProblem JavadocInvalidThrowsClass IProblem JavadocInvalidSeeReference IProblem JavadocMalformedSeeReference IProblem JavadocInvalidSeeHref IProblem JavadocInvalidSeeArgs IProblem JavadocInvalidTag IProblem JavadocUnterminatedInlineTag docCommentSupport getSeverity CompilerOptions InvalidJavadoc ProblemSeverities IProblem JavadocInvalidParamName IProblem JavadocDuplicateParamName IProblem JavadocMissingParamName IProblem JavadocInvalidThrowsClassName IProblem JavadocDuplicateThrowsClassName IProblem JavadocMissingThrowsClassName IProblem JavadocMissingSeeReference IProblem JavadocUsingDeprecatedField IProblem JavadocUsingDeprecatedConstructor IProblem JavadocUsingDeprecatedMethod IProblem JavadocUsingDeprecatedType IProblem JavadocUndefinedField IProblem JavadocNotVisibleField IProblem JavadocAmbiguousField IProblem JavadocUndefinedConstructor IProblem JavadocNotVisibleConstructor IProblem JavadocAmbiguousConstructor IProblem JavadocUndefinedMethod IProblem JavadocNotVisibleMethod IProblem JavadocAmbiguousMethod IProblem JavadocAmbiguousMethodReference IProblem JavadocParameterMismatch IProblem JavadocUndefinedType IProblem JavadocNotVisibleType IProblem JavadocAmbiguousType IProblem JavadocInternalTypeNameProvided IProblem JavadocNoMessageSendOnArrayType IProblem JavadocNoMessageSendOnBaseType IProblem JavadocInheritedMethodHidesEnclosingName IProblem JavadocInheritedFieldHidesEnclosingName IProblem JavadocInheritedNameHidesEnclosingTypeName docCommentSupport reportInvalidJavadocTags getSeverity CompilerOptions InvalidJavadoc ProblemSeverities IProblem JavadocMissingParamTag IProblem JavadocMissingReturnTag IProblem JavadocMissingThrowsTag docCommentSupport getSeverity CompilerOptions MissingJavadocTags ProblemSeverities IProblem JavadocMissing docCommentSupport getSeverity CompilerOptions MissingJavadocComments ProblemSeverities
public void conditional Arguments Incompatible Types Conditional Expression expression Type Binding true Type Type Binding false Type this handle I Problem Incompatible Types In Conditional Operator new String new String true Type readable Name new String false Type readable Name new String new String true Type source Name new String false Type source Name expression source Start expression source End  conditionalArgumentsIncompatibleTypes ConditionalExpression TypeBinding trueType TypeBinding falseType IProblem IncompatibleTypesInConditionalOperator trueType readableName falseType readableName trueType sourceName falseType sourceName sourceStart sourceEnd
public void conflicting Import Import Reference import Ref String arguments new String Char Operation to String import Ref tokens this handle I Problem Conflicting Import arguments arguments import Ref source Start import Ref source End  conflictingImport ImportReference importRef CharOperation toString importRef IProblem ConflictingImport importRef sourceStart importRef sourceEnd
public void constant Out Of Format Number Literal literal the literal is not in a correct format this code is called on Int Literal and Long Literal example 000811 the 8 is uncorrect if literal instanceof Long Literal literal instanceof Int Literal char source literal source try final String Radix final int radix if source 1 x source 1 X radix 16 Radix Hex NON NLS 1 else radix 8 Radix Octal NON NLS 1 look for the first digit that is incorrect int place 1 label for int i radix 8 1 2 i source length i if Character digit source i radix 1 place i break label String arguments new String new String literal literal Type null readable Name numeric literals do not need scope to reach type Radix new String source digit new String new char source place NON NLS 1 NON NLS 2 NON NLS 3 this handle I Problem Numeric Value Out Of Range arguments arguments literal source Start literal source End return catch Index Out Of Bounds Exception ex should never happen just in case use a predefined error we should never come here except if the code changes this constant Out Of Range literal literal literal Type null numeric literals do not need scope to reach type  constantOutOfFormat NumberLiteral IntLiteral LongLiteral LongLiteral IntLiteral literalType readableName IProblem NumericValueOutOfRange sourceStart sourceEnd IndexOutOfBoundsException constantOutOfRange literalType
public void constant Out Of Range Literal literal Type Binding literal Type String arguments new String new String literal Type readable Name new String literal source this handle I Problem Numeric Value Out Of Range arguments arguments literal source Start literal source End  constantOutOfRange TypeBinding literalType literalType readableName IProblem NumericValueOutOfRange sourceStart sourceEnd
public void deprecated Field Field Binding field AST Node location this handle I Problem Using Deprecated Field new String new String field declaring Class readable Name new String field name new String new String field declaring Class short Readable Name new String field name location source Start location source End  deprecatedField FieldBinding ASTNode IProblem UsingDeprecatedField declaringClass readableName declaringClass shortReadableName sourceStart sourceEnd
public void deprecated Method Method Binding method AST Node location if method is Constructor this handle I Problem Using Deprecated Constructor new String new String method declaring Class readable Name parameters As String method new String new String method declaring Class short Readable Name parameters As Short String method location source Start location source End else this handle I Problem Using Deprecated Method new String new String method declaring Class readable Name new String method selector parameters As String method new String new String method declaring Class short Readable Name new String method selector parameters As Short String method location source Start location source End  deprecatedMethod MethodBinding ASTNode isConstructor IProblem UsingDeprecatedConstructor declaringClass readableName parametersAsString declaringClass shortReadableName parametersAsShortString sourceStart sourceEnd IProblem UsingDeprecatedMethod declaringClass readableName parametersAsString declaringClass shortReadableName parametersAsShortString sourceStart sourceEnd
public void deprecated Type Type Binding type AST Node location if location null return 1G828DN no type ref for synthetic arguments this handle I Problem Using Deprecated Type new String new String type readable Name new String new String type short Readable Name location source Start location source End  deprecatedType TypeBinding ASTNode IProblem UsingDeprecatedType readableName shortReadableName sourceStart sourceEnd
public void duplicate Case Case Statement case Statement this handle I Problem Duplicate Case No Argument No Argument case Statement source Start case Statement source End  duplicateCase CaseStatement caseStatement IProblem DuplicateCase NoArgument NoArgument caseStatement sourceStart caseStatement sourceEnd
public void duplicate Default Case AST Node statement this handle I Problem Duplicate Default Case No Argument No Argument statement source Start statement source End  duplicateDefaultCase ASTNode IProblem DuplicateDefaultCase NoArgument NoArgument sourceStart sourceEnd
public void duplicate Field In Type Source Type Binding type Field Declaration field Decl this handle I Problem Duplicate Field new String new String type source Name new String field Decl name new String new String type short Readable Name new String field Decl name field Decl source Start field Decl source End  duplicateFieldInType SourceTypeBinding FieldDeclaration fieldDecl IProblem DuplicateField sourceName fieldDecl shortReadableName fieldDecl fieldDecl sourceStart fieldDecl sourceEnd
public void duplicate Import Import Reference import Ref String arguments new String Char Operation to String import Ref tokens this handle I Problem Duplicate Import arguments arguments import Ref source Start import Ref source End  duplicateImport ImportReference importRef CharOperation toString importRef IProblem DuplicateImport importRef sourceStart importRef sourceEnd
public void duplicate Initialization Of Blank Final Field Field Binding field Reference reference String arguments new String new String field readable Name this handle I Problem Duplicate Blank Final Field Initialization arguments arguments reference source Start reference source End  duplicateInitializationOfBlankFinalField FieldBinding readableName IProblem DuplicateBlankFinalFieldInitialization sourceStart sourceEnd
public void duplicate Initialization Of Final Local Local Variable Binding local AST Node location String arguments new String new String local readable Name this handle I Problem Duplicate Final Local Initialization arguments arguments location source Start location source End  duplicateInitializationOfFinalLocal LocalVariableBinding ASTNode readableName IProblem DuplicateFinalLocalInitialization sourceStart sourceEnd
public void duplicate Method In Type Source Type Binding type Abstract Method Declaration method Decl String arguments new String new String method Decl selector new String type source Name this handle I Problem Duplicate Method arguments arguments method Decl source Start method Decl source End  duplicateMethodInType SourceTypeBinding AbstractMethodDeclaration methodDecl methodDecl sourceName IProblem DuplicateMethod methodDecl sourceStart methodDecl sourceEnd
public void duplicate Modifier For Field Reference Binding type Field Declaration field Decl to highlight modifiers use this handle new Problem Duplicate Modifier For Field new String new String field Decl name field Decl modifiers source Start field Decl modifiers source End String arguments new String new String field Decl name this handle I Problem Duplicate Modifier For Field arguments arguments field Decl source Start field Decl source End  duplicateModifierForField ReferenceBinding FieldDeclaration fieldDecl DuplicateModifierForField fieldDecl fieldDecl sourceStart fieldDecl sourceEnd fieldDecl IProblem DuplicateModifierForField fieldDecl sourceStart fieldDecl sourceEnd
public void duplicate Modifier For Method Reference Binding type Abstract Method Declaration method Decl this handle I Problem Duplicate Modifier For Method new String new String type source Name new String method Decl selector new String new String type short Readable Name new String method Decl selector method Decl source Start method Decl source End  duplicateModifierForMethod ReferenceBinding AbstractMethodDeclaration methodDecl IProblem DuplicateModifierForMethod sourceName methodDecl shortReadableName methodDecl methodDecl sourceStart methodDecl sourceEnd
public void duplicate Modifier For Type Source Type Binding type String arguments new String new String type source Name this handle I Problem Duplicate Modifier For Type arguments arguments type source Start type source End  duplicateModifierForType SourceTypeBinding sourceName IProblem DuplicateModifierForType sourceStart sourceEnd
public void duplicate Modifier For Variable Local Declaration local Decl boolean complain For Argument String arguments new String new String local Decl name this handle complain For Argument I Problem Duplicate Modifier For Argument I Problem Duplicate Modifier For Variable arguments arguments local Decl source Start local Decl source End  duplicateModifierForVariable LocalDeclaration localDecl complainForArgument localDecl complainForArgument IProblem DuplicateModifierForArgument IProblem DuplicateModifierForVariable localDecl sourceStart localDecl sourceEnd
public void duplicate Nested Type Type Declaration type Decl String arguments new String new String type Decl name this handle I Problem Duplicate Nested Type arguments arguments type Decl source Start type Decl source End  duplicateNestedType TypeDeclaration typeDecl typeDecl IProblem DuplicateNestedType typeDecl sourceStart typeDecl sourceEnd
public void duplicate Superinterface Source Type Binding type Type Declaration type Decl Reference Binding super Type this handle I Problem Duplicate Super Interface new String new String super Type readable Name new String type source Name new String new String super Type short Readable Name new String type source Name type Decl source Start type Decl source End  duplicateSuperinterface SourceTypeBinding TypeDeclaration typeDecl ReferenceBinding superType IProblem DuplicateSuperInterface superType readableName sourceName superType shortReadableName sourceName typeDecl sourceStart typeDecl sourceEnd
public void duplicate Types Compilation Unit Declaration comp Unit Decl Type Declaration type Decl String arguments new String new String comp Unit Decl get File Name new String type Decl name this reference Context type Decl report the problem against the type not the entire compilation unit this handle I Problem Duplicate Types arguments arguments type Decl source Start type Decl source End comp Unit Decl compilation Result  duplicateTypes CompilationUnitDeclaration compUnitDecl TypeDeclaration typeDecl compUnitDecl getFileName typeDecl referenceContext typeDecl IProblem DuplicateTypes typeDecl sourceStart typeDecl sourceEnd compUnitDecl compilationResult
public void empty Control Flow Statement int source Start int source End this handle I Problem Empty Control Flow Statement No Argument No Argument source Start source End  emptyControlFlowStatement sourceStart sourceEnd IProblem EmptyControlFlowStatement NoArgument NoArgument sourceStart sourceEnd
public void error No Method For Message Send message Send Type Binding rec Type Type Binding params String Buffer buffer new String Buffer String Buffer short Buffer new String Buffer for int i 0 length params length i length i if i 0 buffer append NON NLS 1 short Buffer append NON NLS 1 buffer append new String params i readable Name short Buffer append new String params i short Readable Name int id rec Type is Array Type I Problem No Message Send On Array Type I Problem No Message Send On Base Type if message Send bits AST Node Inside Javadoc 0 id I Problem Javadoc if report Invalid Javadoc Tags Visibility return this handle id new String new String rec Type readable Name new String message Send selector buffer to String new String new String rec Type short Readable Name new String message Send selector short Buffer to String message Send source Start message Send source End  errorNoMethodFor MessageSend messageSend TypeBinding recType TypeBinding StringBuffer StringBuffer StringBuffer shortBuffer StringBuffer shortBuffer readableName shortBuffer shortReadableName recType isArrayType IProblem NoMessageSendOnArrayType IProblem NoMessageSendOnBaseType messageSend ASTNode InsideJavadoc IProblem reportInvalidJavadocTagsVisibility recType readableName messageSend toString recType shortReadableName messageSend shortBuffer toString messageSend sourceStart messageSend sourceEnd
public void error This Super In Static AST Node reference String arguments new String reference is Super super this NON NLS 2 NON NLS 1 this handle I Problem This In Static Context arguments arguments reference source Start reference source End  errorThisSuperInStatic ASTNode isSuper IProblem ThisInStaticContext sourceStart sourceEnd
public void exception Type Problem Source Type Binding type Abstract Method Declaration method Decl Type Reference exception Type Type Binding expected Type int problem Id expected Type problem Id int id switch problem Id case Not Found 1 id I Problem Exception Type Not Found break case Not Visible 2 id I Problem Exception Type Not Visible break case Ambiguous 3 id I Problem Exception Type Ambiguous break case Internal Name Provided 4 id I Problem Exception Type Internal Name Provided break case Inherited Name Hides Enclosing Name 5 id I Problem Exception Type Inherited Name Hides Enclosing Name break case No Error 0 default need Implementation want to fail to see why we were here return this handle id new String new String method Decl selector new String expected Type readable Name new String new String method Decl selector new String expected Type short Readable Name exception Type source Start exception Type source End  exceptionTypeProblem SourceTypeBinding AbstractMethodDeclaration methodDecl TypeReference exceptionType TypeBinding expectedType problemId expectedType problemId problemId NotFound IProblem ExceptionTypeNotFound NotVisible IProblem ExceptionTypeNotVisible IProblem ExceptionTypeAmbiguous InternalNameProvided IProblem ExceptionTypeInternalNameProvided InheritedNameHidesEnclosingName IProblem ExceptionTypeInheritedNameHidesEnclosingName NoError needImplementation methodDecl expectedType readableName methodDecl expectedType shortReadableName exceptionType sourceStart exceptionType sourceEnd
public void expression Should BeA Variable Expression expression this handle I Problem Expression Should BeA Variable No Argument No Argument expression source Start expression source End  expressionShouldBeAVariable IProblem ExpressionShouldBeAVariable NoArgument NoArgument sourceStart sourceEnd
public void field Hiding Field Declaration field Decl Binding hidden Variable Field Binding field field Decl binding if Char Operation equals Type Constants SERIALVERSIONUID field name field is Static field is Final Base Types Long Binding field type return do not report unused serial VersionUID field if Char Operation equals Type Constants SERIALPERSISTENTFIELDS field name field is Static field is Final field type dimensions 1 Char Operation equals Type Constants CharArray JAVA IO OBJECTSTREAMFIELD field type leaf Component Type readable Name return do not report unused serial Persistent Fields field if hidden Variable instanceof Local Variable Binding this handle I Problem Field Hiding Local Variable new String new String field declaring Class readable Name new String field name new String new String field declaring Class short Readable Name new String field name field Decl source Start field Decl source End else if hidden Variable instanceof Field Binding Field Binding hidden Field Field Binding hidden Variable this handle I Problem Field Hiding Field new String new String field declaring Class readable Name new String field name new String hidden Field declaring Class readable Name new String new String field declaring Class short Readable Name new String field name new String hidden Field declaring Class short Readable Name field Decl source Start field Decl source End  fieldHiding FieldDeclaration fieldDecl hiddenVariable FieldBinding fieldDecl CharOperation TypeConstants isStatic isFinal BaseTypes LongBinding serialVersionUID CharOperation TypeConstants isStatic isFinal CharOperation TypeConstants CharArray_JAVA_IO_OBJECTSTREAMFIELD leafComponentType readableName serialPersistentFields hiddenVariable LocalVariableBinding IProblem FieldHidingLocalVariable declaringClass readableName declaringClass shortReadableName fieldDecl sourceStart fieldDecl sourceEnd hiddenVariable FieldBinding FieldBinding hiddenField FieldBinding hiddenVariable IProblem FieldHidingField declaringClass readableName hiddenField declaringClass readableName declaringClass shortReadableName hiddenField declaringClass shortReadableName fieldDecl sourceStart fieldDecl sourceEnd
private int field Location Field Binding field AST Node node if node instanceof Qualified Name Reference Qualified Name Reference ref Qualified Name Reference node Field Binding bindings ref other Bindings if bindings null for int i bindings length i 0 if bindings i field return int ref source Positions i 1 first position is for the primary field return node source End  fieldLocation FieldBinding ASTNode QualifiedNameReference QualifiedNameReference QualifiedNameReference FieldBinding otherBindings sourcePositions sourceEnd
public void fields Or This Before Constructor Invocation This Reference reference this handle I Problem This Super During Constructor Invocation No Argument No Argument reference source Start reference source End  fieldsOrThisBeforeConstructorInvocation ThisReference IProblem ThisSuperDuringConstructorInvocation NoArgument NoArgument sourceStart sourceEnd
public void field Type Problem Source Type Binding type Field Declaration field Decl Type Binding expected Type int problem Id expected Type problem Id int id switch problem Id case Not Found 1 id I Problem Field Type Not Found break case Not Visible 2 id I Problem Field Type Not Visible break case Ambiguous 3 id I Problem Field Type Ambiguous break case Internal Name Provided 4 id I Problem Field Type Internal Name Provided break case Inherited Name Hides Enclosing Name 5 id I Problem Field Type Inherited Name Hides Enclosing Name break case No Error 0 default need Implementation want to fail to see why we were here return this handle id new String new String field Decl name new String type source Name new String expected Type readable Name new String new String field Decl name new String type source Name new String expected Type short Readable Name field Decl type source Start field Decl type source End  fieldTypeProblem SourceTypeBinding FieldDeclaration fieldDecl TypeBinding expectedType problemId expectedType problemId problemId NotFound IProblem FieldTypeNotFound NotVisible IProblem FieldTypeNotVisible IProblem FieldTypeAmbiguous InternalNameProvided IProblem FieldTypeInternalNameProvided InheritedNameHidesEnclosingName IProblem FieldTypeInheritedNameHidesEnclosingName NoError needImplementation fieldDecl sourceName expectedType readableName fieldDecl sourceName expectedType shortReadableName fieldDecl sourceStart fieldDecl sourceEnd
public void finally Must Complete Normally Block finally Block this handle I Problem Finally Must Complete Normally No Argument No Argument finally Block source Start finally Block source End  finallyMustCompleteNormally finallyBlock IProblem FinallyMustCompleteNormally NoArgument NoArgument finallyBlock sourceStart finallyBlock sourceEnd
public void final Method Cannot Be Overridden Method Binding current Method Method Binding inherited Method this handle Cannot override the final method from 1 8 4 3 3 Final methods cannot be overridden or hidden I Problem Final Method Cannot Be Overridden new String new String inherited Method declaring Class readable Name new String new String inherited Method declaring Class short Readable Name current Method source Start current Method source End  finalMethodCannotBeOverridden MethodBinding currentMethod MethodBinding inheritedMethod IProblem FinalMethodCannotBeOverridden inheritedMethod declaringClass readableName inheritedMethod declaringClass shortReadableName currentMethod sourceStart currentMethod sourceEnd
public void forward Reference Reference reference int index In Qualification Type Binding type this handle I Problem Reference To Forward Field No Argument No Argument reference source Start reference source End  forwardReference indexInQualification TypeBinding IProblem ReferenceToForwardField NoArgument NoArgument sourceStart sourceEnd
as arguments private void handle int problem Id String problem Arguments String message Arguments int problem Start Position int problem End Position this handle problem Id problem Arguments message Arguments problem Start Position problem End Position this reference Context this reference Context null null this reference Context compilation Result this reference Context null  problemId problemArguments messageArguments problemStartPosition problemEndPosition problemId problemArguments messageArguments problemStartPosition problemEndPosition referenceContext referenceContext referenceContext compilationResult referenceContext
as arguments private void handle int problem Id String problem Arguments String message Arguments int severity int problem Start Position int problem End Position this handle problem Id problem Arguments message Arguments severity problem Start Position problem End Position this reference Context this reference Context null null this reference Context compilation Result this reference Context null  problemId problemArguments messageArguments problemStartPosition problemEndPosition problemId problemArguments messageArguments problemStartPosition problemEndPosition referenceContext referenceContext referenceContext compilationResult referenceContext
private void handle int problem Id String problem Arguments String message Arguments int problem Start Position int problem End Position Compilation Result unit Result this handle problem Id problem Arguments message Arguments problem Start Position problem End Position this reference Context unit Result this reference Context null  problemId problemArguments messageArguments problemStartPosition problemEndPosition CompilationResult unitResult problemId problemArguments messageArguments problemStartPosition problemEndPosition referenceContext unitResult referenceContext
public void hidden Catch Block Reference Binding exception Type AST Node location this handle I Problem Masked Catch new String new String exception Type readable Name new String new String exception Type short Readable Name location source Start location source End  hiddenCatchBlock ReferenceBinding exceptionType ASTNode IProblem MaskedCatch exceptionType readableName exceptionType shortReadableName sourceStart sourceEnd
public void hiding Enclosing Type Type Declaration type Decl String arguments new String new String type Decl name this handle I Problem Hiding Enclosing Type arguments arguments type Decl source Start type Decl source End  hidingEnclosingType TypeDeclaration typeDecl typeDecl IProblem HidingEnclosingType typeDecl sourceStart typeDecl sourceEnd
public void hierarchy Circularity Source Type Binding source Type Reference Binding super Type Type Reference reference int start 0 int end 0 String type Name NON NLS 1 String short Type Name NON NLS 1 if reference null can only happen when java lang Object is busted start source Type source Start end source Type source End type Name new String super Type readable Name short Type Name new String super Type source Name else start reference source Start end reference source End char q Name reference get Type Name type Name Char Operation to String q Name short Type Name new String q Name q Name length 1 if source Type super Type this handle I Problem Hierarchy Circularity Self Reference new String new String source Type source Name type Name new String new String source Type source Name short Type Name start end else this handle I Problem Hierarchy Circularity new String new String source Type source Name type Name new String new String source Type source Name short Type Name start end  hierarchyCircularity SourceTypeBinding sourceType ReferenceBinding superType TypeReference typeName shortTypeName sourceType sourceStart sourceType sourceEnd typeName superType readableName shortTypeName superType sourceName sourceStart sourceEnd qName getTypeName typeName CharOperation toString qName shortTypeName qName qName sourceType superType IProblem HierarchyCircularitySelfReference sourceType sourceName typeName sourceType sourceName shortTypeName IProblem HierarchyCircularity sourceType sourceName typeName sourceType sourceName shortTypeName
public void hierarchy Has Problems Source Type Binding type String arguments new String new String type source Name this handle I Problem Hierarchy Has Problems arguments arguments type source Start type source End  hierarchyHasProblems SourceTypeBinding sourceName IProblem HierarchyHasProblems sourceStart sourceEnd
public void illegal Abstract Modifier Combination For Method Reference Binding type Abstract Method Declaration method Decl String arguments new String new String type source Name new String method Decl selector this handle I Problem Illegal Abstract Modifier Combination For Method arguments arguments method Decl source Start method Decl source End  illegalAbstractModifierCombinationForMethod ReferenceBinding AbstractMethodDeclaration methodDecl sourceName methodDecl IProblem IllegalAbstractModifierCombinationForMethod methodDecl sourceStart methodDecl sourceEnd
public void illegal Modifier Combination Final Abstract For Class Source Type Binding type String arguments new String new String type source Name this handle I Problem Illegal Modifier Combination Final Abstract For Class arguments arguments type source Start type source End  illegalModifierCombinationFinalAbstractForClass SourceTypeBinding sourceName IProblem IllegalModifierCombinationFinalAbstractForClass sourceStart sourceEnd
public void illegal Modifier Combination Final Volatile For Field Reference Binding type Field Declaration field Decl String arguments new String new String field Decl name this handle I Problem Illegal Modifier Combination Final Volatile For Field arguments arguments field Decl source Start field Decl source End  illegalModifierCombinationFinalVolatileForField ReferenceBinding FieldDeclaration fieldDecl fieldDecl IProblem IllegalModifierCombinationFinalVolatileForField fieldDecl sourceStart fieldDecl sourceEnd
public void illegal Modifier For Class Source Type Binding type String arguments new String new String type source Name this handle I Problem Illegal Modifier For Class arguments arguments type source Start type source End  illegalModifierForClass SourceTypeBinding sourceName IProblem IllegalModifierForClass sourceStart sourceEnd
public void illegal Modifier For Field Reference Binding type Field Declaration field Decl String arguments new String new String field Decl name this handle I Problem Illegal Modifier For Field arguments arguments field Decl source Start field Decl source End  illegalModifierForField ReferenceBinding FieldDeclaration fieldDecl fieldDecl IProblem IllegalModifierForField fieldDecl sourceStart fieldDecl sourceEnd
public void illegal Modifier For Interface Source Type Binding type String arguments new String new String type source Name this handle I Problem Illegal Modifier For Interface arguments arguments type source Start type source End  illegalModifierForInterface SourceTypeBinding sourceName IProblem IllegalModifierForInterface sourceStart sourceEnd
public void illegal Modifier For Interface Field Reference Binding type Field Declaration field Decl String arguments new String new String field Decl name this handle I Problem Illegal Modifier For Interface Field arguments arguments field Decl source Start field Decl source End  illegalModifierForInterfaceField ReferenceBinding FieldDeclaration fieldDecl fieldDecl IProblem IllegalModifierForInterfaceField fieldDecl sourceStart fieldDecl sourceEnd
public void illegal Modifier For Interface Method Reference Binding type Abstract Method Declaration method Decl String arguments new String new String type source Name new String method Decl selector this handle I Problem Illegal Modifier For Interface Method arguments arguments method Decl source Start method Decl source End  illegalModifierForInterfaceMethod ReferenceBinding AbstractMethodDeclaration methodDecl sourceName methodDecl IProblem IllegalModifierForInterfaceMethod methodDecl sourceStart methodDecl sourceEnd
public void illegal Modifier For Local Class Source Type Binding type String arguments new String new String type source Name this handle I Problem Illegal Modifier For Local Class arguments arguments type source Start type source End  illegalModifierForLocalClass SourceTypeBinding sourceName IProblem IllegalModifierForLocalClass sourceStart sourceEnd
public void illegal Modifier For Member Class Source Type Binding type String arguments new String new String type source Name this handle I Problem Illegal Modifier For Member Class arguments arguments type source Start type source End  illegalModifierForMemberClass SourceTypeBinding sourceName IProblem IllegalModifierForMemberClass sourceStart sourceEnd
public void illegal Modifier For Member Interface Source Type Binding type String arguments new String new String type source Name this handle I Problem Illegal Modifier For Member Interface arguments arguments type source Start type source End  illegalModifierForMemberInterface SourceTypeBinding sourceName IProblem IllegalModifierForMemberInterface sourceStart sourceEnd
public void illegal Modifier For Method Reference Binding type Abstract Method Declaration method Decl String arguments new String new String type source Name new String method Decl selector this handle I Problem Illegal Modifier For Method arguments arguments method Decl source Start method Decl source End  illegalModifierForMethod ReferenceBinding AbstractMethodDeclaration methodDecl sourceName methodDecl IProblem IllegalModifierForMethod methodDecl sourceStart methodDecl sourceEnd
public void illegal Modifier For Variable Local Declaration local Decl boolean complain As Argument String arguments new String new String local Decl name this handle complain As Argument I Problem Illegal Modifier For Argument I Problem Illegal Modifier For Variable arguments arguments local Decl source Start local Decl source End  illegalModifierForVariable LocalDeclaration localDecl complainAsArgument localDecl complainAsArgument IProblem IllegalModifierForArgument IProblem IllegalModifierForVariable localDecl sourceStart localDecl sourceEnd
public void illegal Primitive Or Array Type For Enclosing Instance Type Binding enclosing Type AST Node location this handle I Problem Illegal Primitive Or Array Type For Enclosing Instance new String new String enclosing Type readable Name new String new String enclosing Type short Readable Name location source Start location source End  illegalPrimitiveOrArrayTypeForEnclosingInstance TypeBinding enclosingType ASTNode IProblem IllegalPrimitiveOrArrayTypeForEnclosingInstance enclosingType readableName enclosingType shortReadableName sourceStart sourceEnd
public void illegal Static Modifier For Member Type Source Type Binding type String arguments new String new String type source Name this handle I Problem Illegal Static Modifier For Member Type arguments arguments type source Start type source End  illegalStaticModifierForMemberType SourceTypeBinding sourceName IProblem IllegalStaticModifierForMemberType sourceStart sourceEnd
public void illegal Visibility Modifier Combination For Field Reference Binding type Field Declaration field Decl String arguments new String new String field Decl name this handle I Problem Illegal Visibility Modifier Combination For Field arguments arguments field Decl source Start field Decl source End  illegalVisibilityModifierCombinationForField ReferenceBinding FieldDeclaration fieldDecl fieldDecl IProblem IllegalVisibilityModifierCombinationForField fieldDecl sourceStart fieldDecl sourceEnd
public void illegal Visibility Modifier Combination For Member Type Source Type Binding type String arguments new String new String type source Name this handle I Problem Illegal Visibility Modifier Combination For Member Type arguments arguments type source Start type source End  illegalVisibilityModifierCombinationForMemberType SourceTypeBinding sourceName IProblem IllegalVisibilityModifierCombinationForMemberType sourceStart sourceEnd
public void illegal Visibility Modifier Combination For Method Reference Binding type Abstract Method Declaration method Decl String arguments new String new String type source Name new String method Decl selector this handle I Problem Illegal Visibility Modifier Combination For Method arguments arguments method Decl source Start method Decl source End  illegalVisibilityModifierCombinationForMethod ReferenceBinding AbstractMethodDeclaration methodDecl sourceName methodDecl IProblem IllegalVisibilityModifierCombinationForMethod methodDecl sourceStart methodDecl sourceEnd
public void illegal Visibility Modifier For Interface Member Type Source Type Binding type String arguments new String new String type source Name this handle I Problem Illegal Visibility Modifier For Interface Member Type arguments arguments type source Start type source End  illegalVisibilityModifierForInterfaceMemberType SourceTypeBinding sourceName IProblem IllegalVisibilityModifierForInterfaceMemberType sourceStart sourceEnd
public void illegal Void Expression AST Node location this handle I Problem Invalid Void Expression No Argument No Argument location source Start location source End  illegalVoidExpression ASTNode IProblem InvalidVoidExpression NoArgument NoArgument sourceStart sourceEnd
public void import Problem Import Reference import Ref Binding expected Import int problem Id expected Import problem Id int id switch problem Id case Not Found 1 id I Problem Import Not Found break case Not Visible 2 id I Problem Import Not Visible break case Ambiguous 3 id I Problem Import Ambiguous break case Internal Name Provided 4 id I Problem Import Internal Name Provided break case Inherited Name Hides Enclosing Name 5 id I Problem Import Inherited Name Hides Enclosing Name break case No Error 0 default need Implementation want to fail to see why we were here return char tokens expected Import instanceof Problem Reference Binding Problem Reference Binding expected Import compound Name import Ref tokens String arguments new String Char Operation to String tokens this handle id arguments arguments import Ref source Start int import Ref source Positions tokens length 1  importProblem ImportReference importRef expectedImport problemId expectedImport problemId problemId NotFound IProblem ImportNotFound NotVisible IProblem ImportNotVisible IProblem ImportAmbiguous InternalNameProvided IProblem ImportInternalNameProvided InheritedNameHidesEnclosingName IProblem ImportInheritedNameHidesEnclosingName NoError needImplementation expectedImport ProblemReferenceBinding ProblemReferenceBinding expectedImport compoundName importRef CharOperation toString importRef sourceStart importRef sourcePositions
public void incompatible Exception In Throws Clause Source Type Binding type Method Binding current Method Method Binding inherited Method Reference Binding exception Type if type current Method declaring Class int id if current Method declaring Class is Interface inherited Method is Public interface inheriting Object protected method id I Problem Incompatible Exception In Throws Clause For Non Inherited Interface Method else id I Problem Incompatible Exception In Throws Clause this handle Exception 1 is not compatible with throws clause in 2 9 4 4 The type of exception in the throws clause is incompatible id new String new String exception Type source Name new String Char Operation concat inherited Method declaring Class readable Name inherited Method readable Name new String new String exception Type source Name new String Char Operation concat inherited Method declaring Class short Readable Name inherited Method short Readable Name current Method source Start current Method source End else this handle Exception 1 in throws clause of 2 is not compatible with 3 9 4 4 The type of exception in the throws clause is incompatible I Problem Incompatible Exception In Inherited Method Throws Clause new String new String exception Type source Name new String Char Operation concat current Method declaring Class source Name current Method readable Name new String Char Operation concat inherited Method declaring Class readable Name inherited Method readable Name new String new String exception Type source Name new String Char Operation concat current Method declaring Class source Name current Method short Readable Name new String Char Operation concat inherited Method declaring Class short Readable Name inherited Method short Readable Name type source Start type source End  incompatibleExceptionInThrowsClause SourceTypeBinding MethodBinding currentMethod MethodBinding inheritedMethod ReferenceBinding exceptionType currentMethod declaringClass currentMethod declaringClass isInterface inheritedMethod isPublic IProblem IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod IProblem IncompatibleExceptionInThrowsClause exceptionType sourceName CharOperation inheritedMethod declaringClass readableName inheritedMethod readableName exceptionType sourceName CharOperation inheritedMethod declaringClass shortReadableName inheritedMethod shortReadableName currentMethod sourceStart currentMethod sourceEnd IProblem IncompatibleExceptionInInheritedMethodThrowsClause exceptionType sourceName CharOperation currentMethod declaringClass sourceName currentMethod readableName CharOperation inheritedMethod declaringClass readableName inheritedMethod readableName exceptionType sourceName CharOperation currentMethod declaringClass sourceName currentMethod shortReadableName CharOperation inheritedMethod declaringClass shortReadableName inheritedMethod shortReadableName sourceStart sourceEnd
public void incompatible Return Type Method Binding current Method Method Binding inherited Method String Buffer method Signature new String Buffer method Signature append inherited Method declaring Class readable Name append append inherited Method readable Name String Buffer short Signature new String Buffer short Signature append inherited Method declaring Class short Readable Name append append inherited Method short Readable Name int id if current Method declaring Class is Interface inherited Method is Public interface inheriting Object protected method id I Problem Incompatible Return Type For Non Inherited Interface Method else id I Problem Incompatible Return Type this handle id new String method Signature to String new String short Signature to String current Method source Start current Method source End  incompatibleReturnType MethodBinding currentMethod MethodBinding inheritedMethod StringBuffer methodSignature StringBuffer methodSignature inheritedMethod declaringClass readableName inheritedMethod readableName StringBuffer shortSignature StringBuffer shortSignature inheritedMethod declaringClass shortReadableName inheritedMethod shortReadableName currentMethod declaringClass isInterface inheritedMethod isPublic IProblem IncompatibleReturnTypeForNonInheritedInterfaceMethod IProblem IncompatibleReturnType methodSignature toString shortSignature toString currentMethod sourceStart currentMethod sourceEnd
public void incorrect Location For Empty Dimension Array Allocation Expression expression int index this handle I Problem Illegal Dimension No Argument No Argument expression dimensions index 1 source Start expression dimensions index 1 source End  incorrectLocationForEmptyDimension ArrayAllocationExpression IProblem IllegalDimension NoArgument NoArgument sourceStart sourceEnd
public void indirect Access To Static Field AST Node location Field Binding field this handle I Problem Indirect Access To Static Field new String new String field declaring Class readable Name new String field name new String new String field declaring Class short Readable Name new String field name location source Start field Location field location  indirectAccessToStaticField ASTNode FieldBinding IProblem IndirectAccessToStaticField declaringClass readableName declaringClass shortReadableName sourceStart fieldLocation
public void indirect Access To Static Method AST Node location Method Binding method this handle I Problem Indirect Access To Static Method new String new String method declaring Class readable Name new String method selector parameters As String method new String new String method declaring Class short Readable Name new String method selector parameters As Short String method location source Start location source End  indirectAccessToStaticMethod ASTNode MethodBinding IProblem IndirectAccessToStaticMethod declaringClass readableName parametersAsString declaringClass shortReadableName parametersAsShortString sourceStart sourceEnd
public void indirect Access To Static Type AST Node location Reference Binding type this handle I Problem Indirect Access To Static Method new String new String type enclosing Type readable Name new String type source Name new String new String type enclosing Type short Readable Name new String type source Name location source Start location source End  indirectAccessToStaticType ASTNode ReferenceBinding IProblem IndirectAccessToStaticMethod enclosingType readableName sourceName enclosingType shortReadableName sourceName sourceStart sourceEnd
public void incorrect Switch Type Expression expression Type Binding test Type this handle I Problem Incorrect Switch Type new String new String test Type readable Name new String new String test Type short Readable Name expression source Start expression source End  incorrectSwitchType TypeBinding testType IProblem IncorrectSwitchType testType readableName testType shortReadableName sourceStart sourceEnd
public void inherited Method Reduces Visibility Source Type Binding type Method Binding concrete Method Method Binding abstract Methods String Buffer concrete Signature new String Buffer concrete Signature append concrete Method declaring Class readable Name append append concrete Method readable Name String Buffer short Signature new String Buffer short Signature append concrete Method declaring Class short Readable Name append append concrete Method short Readable Name this handle The inherited method 1 cannot hide the public abstract method in 2 I Problem Inherited Method Reduces Visibility new String concrete Signature to String new String abstract Methods 0 declaring Class readable Name new String new String short Signature to String new String abstract Methods 0 declaring Class short Readable Name type source Start type source End  inheritedMethodReducesVisibility SourceTypeBinding MethodBinding concreteMethod MethodBinding abstractMethods StringBuffer concreteSignature StringBuffer concreteSignature concreteMethod declaringClass readableName concreteMethod readableName StringBuffer shortSignature StringBuffer shortSignature concreteMethod declaringClass shortReadableName concreteMethod shortReadableName IProblem InheritedMethodReducesVisibility concreteSignature toString abstractMethods declaringClass readableName shortSignature toString abstractMethods declaringClass shortReadableName sourceStart sourceEnd
public void inherited Methods Have Incompatible Return Types Source Type Binding type Method Binding inherited Methods int length String Buffer method Signatures new String Buffer String Buffer short Signatures new String Buffer for int i length i 0 method Signatures append inherited Methods i declaring Class readable Name append append inherited Methods i readable Name short Signatures append inherited Methods i declaring Class short Readable Name append append inherited Methods i short Readable Name if i 0 method Signatures append NON NLS 1 short Signatures append NON NLS 1 this handle Return type is incompatible with 1 9 4 2 The return type from the method is incompatible with the declaration I Problem Incompatible Return Type new String method Signatures to String new String short Signatures to String type source Start type source End  inheritedMethodsHaveIncompatibleReturnTypes SourceTypeBinding MethodBinding inheritedMethods StringBuffer methodSignatures StringBuffer StringBuffer shortSignatures StringBuffer methodSignatures inheritedMethods declaringClass readableName inheritedMethods readableName shortSignatures inheritedMethods declaringClass shortReadableName inheritedMethods shortReadableName methodSignatures shortSignatures IProblem IncompatibleReturnType methodSignatures toString shortSignatures toString sourceStart sourceEnd
public void initializer Must Complete Normally Field Declaration field Decl this handle I Problem Initializer Must Complete Normally No Argument No Argument field Decl source Start field Decl source End  initializerMustCompleteNormally FieldDeclaration fieldDecl IProblem InitializerMustCompleteNormally NoArgument NoArgument fieldDecl sourceStart fieldDecl sourceEnd
public void inner Types Cannot Declare Static Initializers Reference Binding inner Type AST Node location this handle I Problem Cannot Define Static Initializer In Local Type new String new String inner Type readable Name new String new String inner Type short Readable Name location source Start location source End  innerTypesCannotDeclareStaticInitializers ReferenceBinding innerType ASTNode IProblem CannotDefineStaticInitializerInLocalType innerType readableName innerType shortReadableName sourceStart sourceEnd
public void interface Cannot Have Constructors Constructor Declaration constructor this handle I Problem Interface Cannot Have Constructors No Argument No Argument constructor source Start constructor source End constructor constructor compilation Result  interfaceCannotHaveConstructors ConstructorDeclaration IProblem InterfaceCannotHaveConstructors NoArgument NoArgument sourceStart sourceEnd compilationResult
public void interface Cannot Have Initializers Source Type Binding type Field Declaration field Decl String arguments new String new String type source Name this handle I Problem Interface Cannot Have Initializers arguments arguments field Decl source Start field Decl source End  interfaceCannotHaveInitializers SourceTypeBinding FieldDeclaration fieldDecl sourceName IProblem InterfaceCannotHaveInitializers fieldDecl sourceStart fieldDecl sourceEnd
public void invalid Break AST Node location this handle I Problem Invalid Break No Argument No Argument location source Start location source End  invalidBreak ASTNode IProblem InvalidBreak NoArgument NoArgument sourceStart sourceEnd
public void invalid Constructor Statement statement Method Binding target Constructor boolean inside Default Constructor this reference Context instanceof Constructor Declaration Constructor Declaration this reference Context is Default Constructor boolean inside Implicit Constructor Call statement instanceof Explicit Constructor Call Explicit Constructor Call statement access Mode Explicit Constructor Call Implicit Super int id I Problem Undefined Constructor default switch target Constructor problem Id case Not Found if inside Default Constructor id I Problem Undefined Constructor In Default Constructor else if inside Implicit Constructor Call id I Problem Undefined Constructor In Implicit Constructor Call else id I Problem Undefined Constructor break case Not Visible if inside Default Constructor id I Problem Not Visible Constructor In Default Constructor else if inside Implicit Constructor Call id I Problem Not Visible Constructor In Implicit Constructor Call else id I Problem Not Visible Constructor break case Ambiguous if inside Default Constructor id I Problem Ambiguous Constructor In Default Constructor else if inside Implicit Constructor Call id I Problem Ambiguous Constructor In Implicit Constructor Call else id I Problem Ambiguous Constructor break case No Error 0 default need Implementation want to fail to see why we were here break this handle id new String new String target Constructor declaring Class readable Name parameters As String target Constructor new String new String target Constructor declaring Class short Readable Name parameters As Short String target Constructor statement source Start statement source End  invalidConstructor MethodBinding targetConstructor insideDefaultConstructor referenceContext ConstructorDeclaration ConstructorDeclaration referenceContext isDefaultConstructor insideImplicitConstructorCall ExplicitConstructorCall ExplicitConstructorCall accessMode ExplicitConstructorCall ImplicitSuper IProblem UndefinedConstructor targetConstructor problemId NotFound insideDefaultConstructor IProblem UndefinedConstructorInDefaultConstructor insideImplicitConstructorCall IProblem UndefinedConstructorInImplicitConstructorCall IProblem UndefinedConstructor NotVisible insideDefaultConstructor IProblem NotVisibleConstructorInDefaultConstructor insideImplicitConstructorCall IProblem NotVisibleConstructorInImplicitConstructorCall IProblem NotVisibleConstructor insideDefaultConstructor IProblem AmbiguousConstructorInDefaultConstructor insideImplicitConstructorCall IProblem AmbiguousConstructorInImplicitConstructorCall IProblem AmbiguousConstructor NoError needImplementation targetConstructor declaringClass readableName parametersAsString targetConstructor targetConstructor declaringClass shortReadableName parametersAsShortString targetConstructor sourceStart sourceEnd
public void invalid Explicit Constructor Call AST Node location this handle I Problem Invalid Explicit Constructor Call No Argument No Argument location source Start location source End  invalidExplicitConstructorCall ASTNode IProblem InvalidExplicitConstructorCall NoArgument NoArgument sourceStart sourceEnd
public void invalid Continue AST Node location this handle I Problem Invalid Continue No Argument No Argument location source Start location source End  invalidContinue ASTNode IProblem InvalidContinue NoArgument NoArgument sourceStart sourceEnd
public void invalid Enclosing Type Expression expression Type Binding type Reference Binding enclosing Type if enclosing Type is Anonymous Type enclosing Type enclosing Type superclass int flag I Problem Undefined Type default switch type problem Id case Not Found 1 flag I Problem Undefined Type break case Not Visible 2 flag I Problem Not Visible Type break case Ambiguous 3 flag I Problem Ambiguous Type break case Internal Name Provided flag I Problem Internal Type Name Provided break case No Error 0 default need Implementation want to fail to see why we were here break this handle flag new String new String enclosing Type readable Name new String type readable Name NON NLS 1 new String new String enclosing Type short Readable Name new String type short Readable Name NON NLS 1 expression source Start expression source End  invalidEnclosingType TypeBinding ReferenceBinding enclosingType enclosingType isAnonymousType enclosingType enclosingType IProblem UndefinedType problemId NotFound IProblem UndefinedType NotVisible IProblem NotVisibleType IProblem AmbiguousType InternalNameProvided IProblem InternalTypeNameProvided NoError needImplementation enclosingType readableName readableName enclosingType shortReadableName shortReadableName sourceStart sourceEnd
public void invalid Expression As Statement Expression expression this handle I Problem Invalid Expression As Statement No Argument No Argument expression source Start expression source End  invalidExpressionAsStatement IProblem InvalidExpressionAsStatement NoArgument NoArgument sourceStart sourceEnd
public void invalid Field Field Reference field Ref Type Binding searched Type int id I Problem Undefined Field Field Binding field field Ref binding switch field problem Id case Not Found id I Problem Undefined Field also need to check that the searched Type is the receiver type if searched Type is Hierarchy Inconsistent severity Secondary Error break case Not Visible id I Problem Not Visible Field break case Ambiguous id I Problem Ambiguous Field break case Non Static Reference In Static Context id I Problem Non Static Field From Static Invocation break case Non Static Reference In Constructor Invocation id I Problem Instance Field During Constructor Invocation break case Inherited Name Hides Enclosing Name id I Problem Inherited Field Hides Enclosing Name break case Receiver Type Not Visible this handle I Problem Not Visible Type cannot occur in javadoc comments new String new String searched Type leaf Component Type readable Name new String new String searched Type leaf Component Type short Readable Name field Ref receiver source Start field Ref receiver source End return case No Error 0 default need Implementation want to fail to see why we were here break String arguments new String new String field readable Name this handle id arguments arguments field Ref source Start field Ref source End  invalidField FieldReference fieldRef TypeBinding searchedType IProblem UndefinedField FieldBinding fieldRef problemId NotFound IProblem UndefinedField searchedType searchedType isHierarchyInconsistent SecondaryError NotVisible IProblem NotVisibleField IProblem AmbiguousField NonStaticReferenceInStaticContext IProblem NonStaticFieldFromStaticInvocation NonStaticReferenceInConstructorInvocation IProblem InstanceFieldDuringConstructorInvocation InheritedNameHidesEnclosingName IProblem InheritedFieldHidesEnclosingName ReceiverTypeNotVisible IProblem NotVisibleType searchedType leafComponentType readableName searchedType leafComponentType shortReadableName fieldRef sourceStart fieldRef sourceEnd NoError needImplementation readableName fieldRef sourceStart fieldRef sourceEnd
public void invalid Field Name Reference name Ref Field Binding field int id I Problem Undefined Field switch field problem Id case Not Found id I Problem Undefined Field break case Not Visible id I Problem Not Visible Field break case Ambiguous id I Problem Ambiguous Field break case Non Static Reference In Static Context id I Problem Non Static Field From Static Invocation break case Non Static Reference In Constructor Invocation id I Problem Instance Field During Constructor Invocation break case Inherited Name Hides Enclosing Name id I Problem Inherited Field Hides Enclosing Name break case Receiver Type Not Visible this handle I Problem Not Visible Type new String new String field declaring Class leaf Component Type readable Name new String new String field declaring Class leaf Component Type short Readable Name name Ref source Start name Ref source End return case No Error 0 default need Implementation want to fail to see why we were here break String arguments new String new String field readable Name this handle id arguments arguments name Ref source Start name Ref source End  invalidField NameReference nameRef FieldBinding IProblem UndefinedField problemId NotFound IProblem UndefinedField NotVisible IProblem NotVisibleField IProblem AmbiguousField NonStaticReferenceInStaticContext IProblem NonStaticFieldFromStaticInvocation NonStaticReferenceInConstructorInvocation IProblem InstanceFieldDuringConstructorInvocation InheritedNameHidesEnclosingName IProblem InheritedFieldHidesEnclosingName ReceiverTypeNotVisible IProblem NotVisibleType declaringClass leafComponentType readableName declaringClass leafComponentType shortReadableName nameRef sourceStart nameRef sourceEnd NoError needImplementation readableName nameRef sourceStart nameRef sourceEnd
public void invalid Field Qualified Name Reference name Ref Field Binding field int index Type Binding searched Type the resolution of the index th field of qname failed qname other Bindings index is the binding that has produced the error The different targetted errors should be Undefined Field Not Visible Field Ambiguous Field if searched Type is Base Type this handle I Problem No Field On Base Type new String new String searched Type readable Name Char Operation to String Char Operation subarray name Ref tokens 0 index new String name Ref tokens index new String new String searched Type source Name Char Operation to String Char Operation subarray name Ref tokens 0 index new String name Ref tokens index name Ref source Start int name Ref source Positions index return int id I Problem Undefined Field switch field problem Id case Not Found id I Problem Undefined Field also need to check that the searched Type is the receiver type if searched Type is Hierarchy Inconsistent severity Secondary Error break case Not Visible id I Problem Not Visible Field break case Ambiguous id I Problem Ambiguous Field break case Non Static Reference In Static Context id I Problem Non Static Field From Static Invocation break case Non Static Reference In Constructor Invocation id I Problem Instance Field During Constructor Invocation break case Inherited Name Hides Enclosing Name id I Problem Inherited Field Hides Enclosing Name break case Receiver Type Not Visible this handle I Problem Not Visible Type new String new String searched Type leaf Component Type readable Name new String new String searched Type leaf Component Type short Readable Name name Ref source Start name Ref source End return case No Error 0 default need Implementation want to fail to see why we were here break String arguments new String Char Operation to String Char Operation subarray name Ref tokens 0 index 1 this handle id arguments arguments name Ref source Start int name Ref source Positions index  invalidField QualifiedNameReference nameRef FieldBinding TypeBinding searchedType otherBindings UndefinedField NotVisibleField AmbiguousField searchedType isBaseType IProblem NoFieldOnBaseType searchedType readableName CharOperation toString CharOperation nameRef nameRef searchedType sourceName CharOperation toString CharOperation nameRef nameRef nameRef sourceStart nameRef sourcePositions IProblem UndefinedField problemId NotFound IProblem UndefinedField searchedType searchedType isHierarchyInconsistent SecondaryError NotVisible IProblem NotVisibleField IProblem AmbiguousField NonStaticReferenceInStaticContext IProblem NonStaticFieldFromStaticInvocation NonStaticReferenceInConstructorInvocation IProblem InstanceFieldDuringConstructorInvocation InheritedNameHidesEnclosingName IProblem InheritedFieldHidesEnclosingName ReceiverTypeNotVisible IProblem NotVisibleType searchedType leafComponentType readableName searchedType leafComponentType shortReadableName nameRef sourceStart nameRef sourceEnd NoError needImplementation CharOperation toString CharOperation nameRef nameRef sourceStart nameRef sourcePositions
public void invalid Method Message Send message Send Method Binding method CODE should be UPDATED according to error coding in the different method binding errors The different targetted errors should be Undefined Method Not Visible Method Ambiguous Method Inherited Name Hides Enclosing Name Instance Method During Constructor Invocation Static Method Requested int id I Problem Undefined Method default switch method problem Id case Not Found id I Problem Undefined Method break case Not Visible id I Problem Not Visible Method break case Ambiguous id I Problem Ambiguous Method break case Inherited Name Hides Enclosing Name id I Problem Inherited Method Hides Enclosing Name break case Non Static Reference In Constructor Invocation id I Problem Instance Method During Constructor Invocation break case Non Static Reference In Static Context id I Problem Static Method Requested break case Receiver Type Not Visible this handle I Problem Not Visible Type cannot occur in javadoc comments new String new String method declaring Class leaf Component Type readable Name new String new String method declaring Class leaf Component Type short Readable Name message Send receiver source Start message Send receiver source End return case No Error 0 default need Implementation want to fail to see why we were here break if id I Problem Undefined Method Problem Method Binding problem Method Problem Method Binding method if problem Method closest Match null String closest Parameter Type Names parameters As String problem Method closest Match String parameter Type Names parameters As String method String closest Parameter Type Short Names parameters As Short String problem Method closest Match String parameter Type Short Names parameters As Short String method if closest Parameter Type Short Names equals parameter Type Short Names closest Parameter Type Short Names closest Parameter Type Names parameter Type Short Names parameter Type Names id I Problem Parameter Mismatch this handle id new String new String problem Method closest Match declaring Class readable Name new String problem Method closest Match selector closest Parameter Type Names parameter Type Names new String new String problem Method closest Match declaring Class short Readable Name new String problem Method closest Match selector closest Parameter Type Short Names parameter Type Short Names int message Send name Source Position 32 int message Send name Source Position return this handle id new String new String method declaring Class readable Name new String method selector parameters As String method new String new String method declaring Class short Readable Name new String method selector parameters As Short String method int message Send name Source Position 32 int message Send name Source Position  invalidMethod MessageSend messageSend MethodBinding UndefinedMethod NotVisibleMethod AmbiguousMethod InheritedNameHidesEnclosingName InstanceMethodDuringConstructorInvocation StaticMethodRequested IProblem UndefinedMethod problemId NotFound IProblem UndefinedMethod NotVisible IProblem NotVisibleMethod IProblem AmbiguousMethod InheritedNameHidesEnclosingName IProblem InheritedMethodHidesEnclosingName NonStaticReferenceInConstructorInvocation IProblem InstanceMethodDuringConstructorInvocation NonStaticReferenceInStaticContext IProblem StaticMethodRequested ReceiverTypeNotVisible IProblem NotVisibleType declaringClass leafComponentType readableName declaringClass leafComponentType shortReadableName messageSend sourceStart messageSend sourceEnd NoError needImplementation IProblem UndefinedMethod ProblemMethodBinding problemMethod ProblemMethodBinding problemMethod closestMatch closestParameterTypeNames parametersAsString problemMethod closestMatch parameterTypeNames parametersAsString closestParameterTypeShortNames parametersAsShortString problemMethod closestMatch parameterTypeShortNames parametersAsShortString closestParameterTypeShortNames parameterTypeShortNames closestParameterTypeShortNames closestParameterTypeNames parameterTypeShortNames parameterTypeNames IProblem ParameterMismatch problemMethod closestMatch declaringClass readableName problemMethod closestMatch closestParameterTypeNames parameterTypeNames problemMethod closestMatch declaringClass shortReadableName problemMethod closestMatch closestParameterTypeShortNames parameterTypeShortNames messageSend nameSourcePosition messageSend nameSourcePosition declaringClass readableName parametersAsString declaringClass shortReadableName parametersAsShortString messageSend nameSourcePosition messageSend nameSourcePosition
public void invalid Null To Synchronize Expression expression this handle I Problem Invalid Null To Synchronized No Argument No Argument expression source Start expression source End  invalidNullToSynchronize IProblem InvalidNullToSynchronized NoArgument NoArgument sourceStart sourceEnd
public void invalid Operator Binary Expression expression Type Binding left Type Type Binding right Type String left Name new String left Type readable Name String right Name new String right Type readable Name String left Short Name new String left Type short Readable Name String right Short Name new String right Type short Readable Name if left Short Name equals right Short Name left Short Name left Name right Short Name right Name this handle I Problem Invalid Operator new String expression operator To String left Name right Name NON NLS 1 new String expression operator To String left Short Name right Short Name NON NLS 1 expression source Start expression source End  invalidOperator BinaryExpression TypeBinding leftType TypeBinding rightType leftName leftType readableName rightName rightType readableName leftShortName leftType shortReadableName rightShortName rightType shortReadableName leftShortName rightShortName leftShortName leftName rightShortName rightName IProblem InvalidOperator operatorToString leftName rightName operatorToString leftShortName rightShortName sourceStart sourceEnd
public void invalid Operator Compound Assignment assign Type Binding left Type Type Binding right Type String left Name new String left Type readable Name String right Name new String right Type readable Name String left Short Name new String left Type short Readable Name String right Short Name new String right Type short Readable Name if left Short Name equals right Short Name left Short Name left Name right Short Name right Name this handle I Problem Invalid Operator new String assign operator To String left Name right Name NON NLS 1 new String assign operator To String left Short Name right Short Name NON NLS 1 assign source Start assign source End  invalidOperator CompoundAssignment TypeBinding leftType TypeBinding rightType leftName leftType readableName rightName rightType readableName leftShortName leftType shortReadableName rightShortName rightType shortReadableName leftShortName rightShortName leftShortName leftName rightShortName rightName IProblem InvalidOperator operatorToString leftName rightName operatorToString leftShortName rightShortName sourceStart sourceEnd
public void invalid Operator Unary Expression expression Type Binding type this handle I Problem Invalid Operator new String expression operator To String new String type readable Name new String expression operator To String new String type short Readable Name expression source Start expression source End  invalidOperator UnaryExpression TypeBinding IProblem InvalidOperator operatorToString readableName operatorToString shortReadableName sourceStart sourceEnd
public void invalid Parenthesized Expression AST Node reference this handle I Problem Invalid Parenthesized Expression No Argument No Argument reference source Start reference source End  invalidParenthesizedExpression ASTNode IProblem InvalidParenthesizedExpression NoArgument NoArgument sourceStart sourceEnd
public void invalid Superclass Source Type Binding type Type Reference superclass Ref Reference Binding expected Type int problem Id expected Type problem Id int id switch problem Id case Not Found 1 id I Problem Superclass Not Found break case Not Visible 2 id I Problem Superclass Not Visible break case Ambiguous 3 id I Problem Superclass Ambiguous break case Internal Name Provided 4 id I Problem Superclass Internal Name Provided break case Inherited Name Hides Enclosing Name 5 id I Problem Superclass Inherited Name Hides Enclosing Name break case No Error 0 default need Implementation want to fail to see why we were here return this handle id new String new String expected Type readable Name new String type source Name new String new String expected Type short Readable Name new String type source Name superclass Ref source Start superclass Ref source End  invalidSuperclass SourceTypeBinding TypeReference superclassRef ReferenceBinding expectedType problemId expectedType problemId problemId NotFound IProblem SuperclassNotFound NotVisible IProblem SuperclassNotVisible IProblem SuperclassAmbiguous InternalNameProvided IProblem SuperclassInternalNameProvided InheritedNameHidesEnclosingName IProblem SuperclassInheritedNameHidesEnclosingName NoError needImplementation expectedType readableName sourceName expectedType shortReadableName sourceName superclassRef sourceStart superclassRef sourceEnd
public void invalid Superinterface Source Type Binding type Type Reference superinterface Ref Reference Binding expected Type int problem Id expected Type problem Id int id switch problem Id case Not Found 1 id I Problem Interface Not Found break case Not Visible 2 id I Problem Interface Not Visible break case Ambiguous 3 id I Problem Interface Ambiguous break case Internal Name Provided 4 id I Problem Interface Internal Name Provided break case Inherited Name Hides Enclosing Name 5 id I Problem Interface Inherited Name Hides Enclosing Name break case No Error 0 default need Implementation want to fail to see why we were here return this handle id new String new String expected Type readable Name new String type source Name new String new String expected Type short Readable Name new String type source Name superinterface Ref source Start superinterface Ref source End  invalidSuperinterface SourceTypeBinding TypeReference superinterfaceRef ReferenceBinding expectedType problemId expectedType problemId problemId NotFound IProblem InterfaceNotFound NotVisible IProblem InterfaceNotVisible IProblem InterfaceAmbiguous InternalNameProvided IProblem InterfaceInternalNameProvided InheritedNameHidesEnclosingName IProblem InterfaceInheritedNameHidesEnclosingName NoError needImplementation expectedType readableName sourceName expectedType shortReadableName sourceName superinterfaceRef sourceStart superinterfaceRef sourceEnd
public void invalid Type AST Node location Type Binding type int id I Problem Undefined Type default switch type problem Id case Not Found id I Problem Undefined Type break case Not Visible id I Problem Not Visible Type break case Ambiguous id I Problem Ambiguous Type break case Internal Name Provided id I Problem Internal Type Name Provided break case Inherited Name Hides Enclosing Name id I Problem Inherited Type Hides Enclosing Name break case No Error 0 default need Implementation want to fail to see why we were here break int end location source End if location instanceof Qualified Name Reference Qualified Name Reference ref Qualified Name Reference location if ref index Of First Field Binding 1 end int ref source Positions ref index Of First Field Binding 1 this handle id new String new String type readable Name new String new String type short Readable Name location source Start end  invalidType ASTNode TypeBinding IProblem UndefinedType problemId NotFound IProblem UndefinedType NotVisible IProblem NotVisibleType IProblem AmbiguousType InternalNameProvided IProblem InternalTypeNameProvided InheritedNameHidesEnclosingName IProblem InheritedTypeHidesEnclosingName NoError needImplementation sourceEnd QualifiedNameReference QualifiedNameReference QualifiedNameReference indexOfFirstFieldBinding sourcePositions indexOfFirstFieldBinding readableName shortReadableName sourceStart
public void invalid Type Reference Expression expression this handle I Problem Invalid Type Expression No Argument No Argument expression source Start expression source End  invalidTypeReference IProblem InvalidTypeExpression NoArgument NoArgument sourceStart sourceEnd
public void invalid Type To Synchronize Expression expression Type Binding type this handle I Problem Invalid Type To Synchronized new String new String type readable Name new String new String type short Readable Name expression source Start expression source End  invalidTypeToSynchronize TypeBinding IProblem InvalidTypeToSynchronized readableName shortReadableName sourceStart sourceEnd
public void invalid Unary Expression Expression expression this handle I Problem Invalid Unary Expression No Argument No Argument expression source Start expression source End  invalidUnaryExpression IProblem InvalidUnaryExpression NoArgument NoArgument sourceStart sourceEnd
public void is Class Path Correct char well Known Type Name Compilation Unit Declaration comp Unit Decl this reference Context comp Unit Decl String arguments new String Char Operation to String well Known Type Name this handle I Problem Is Class Path Correct arguments arguments Abort Compilation Error 0 0  isClassPathCorrect wellKnownTypeName CompilationUnitDeclaration compUnitDecl referenceContext compUnitDecl CharOperation toString wellKnownTypeName IProblem IsClassPathCorrect AbortCompilation
0 public void javadoc Duplicated Return Tag int source Start int source End this handle I Problem Javadoc Duplicate Return Tag No Argument No Argument source Start source End  javadocDuplicatedReturnTag sourceStart sourceEnd IProblem JavadocDuplicateReturnTag NoArgument NoArgument sourceStart sourceEnd
public void javadoc Deprecated Field Field Binding field AST Node location int modifiers if javadoc Visibility this options report Invalid Javadoc Tags Visibility modifiers this handle I Problem Javadoc Using Deprecated Field new String new String field declaring Class readable Name new String field name new String new String field declaring Class short Readable Name new String field name location source Start location source End  javadocDeprecatedField FieldBinding ASTNode javadocVisibility reportInvalidJavadocTagsVisibility IProblem JavadocUsingDeprecatedField declaringClass readableName declaringClass shortReadableName sourceStart sourceEnd
public void javadoc Deprecated Method Method Binding method AST Node location int modifiers if javadoc Visibility this options report Invalid Javadoc Tags Visibility modifiers if method is Constructor this handle I Problem Javadoc Using Deprecated Constructor new String new String method declaring Class readable Name parameters As String method new String new String method declaring Class short Readable Name parameters As Short String method location source Start location source End else this handle I Problem Javadoc Using Deprecated Method new String new String method declaring Class readable Name new String method selector parameters As String method new String new String method declaring Class short Readable Name new String method selector parameters As Short String method location source Start location source End  javadocDeprecatedMethod MethodBinding ASTNode javadocVisibility reportInvalidJavadocTagsVisibility isConstructor IProblem JavadocUsingDeprecatedConstructor declaringClass readableName parametersAsString declaringClass shortReadableName parametersAsShortString sourceStart sourceEnd IProblem JavadocUsingDeprecatedMethod declaringClass readableName parametersAsString declaringClass shortReadableName parametersAsShortString sourceStart sourceEnd
public void javadoc Deprecated Type Type Binding type AST Node location int modifiers if location null return 1G828DN no type ref for synthetic arguments if javadoc Visibility this options report Invalid Javadoc Tags Visibility modifiers this handle I Problem Javadoc Using Deprecated Type new String new String type readable Name new String new String type short Readable Name location source Start location source End  javadocDeprecatedType TypeBinding ASTNode javadocVisibility reportInvalidJavadocTagsVisibility IProblem JavadocUsingDeprecatedType readableName shortReadableName sourceStart sourceEnd
public void javadoc Duplicated Param Tag Javadoc Single Name Reference param int modifiers if javadoc Visibility this options report Invalid Javadoc Tags Visibility modifiers String arguments new String String value Of param token this handle I Problem Javadoc Duplicate Param Name arguments arguments param source Start param source End  javadocDuplicatedParamTag JavadocSingleNameReference javadocVisibility reportInvalidJavadocTagsVisibility valueOf IProblem JavadocDuplicateParamName sourceStart sourceEnd
public void javadoc Duplicated Throws Class Name Type Reference type Reference int modifiers if javadoc Visibility this options report Invalid Javadoc Tags Visibility modifiers String arguments new String String value Of type Reference resolved Type source Name this handle I Problem Javadoc Duplicate Throws Class Name arguments arguments type Reference source Start type Reference source End  javadocDuplicatedThrowsClassName TypeReference typeReference javadocVisibility reportInvalidJavadocTagsVisibility valueOf typeReference resolvedType sourceName IProblem JavadocDuplicateThrowsClassName typeReference sourceStart typeReference sourceEnd
public void javadoc Error No Method For Message Send message Send Type Binding rec Type Type Binding params int modifiers String Buffer buffer new String Buffer String Buffer short Buffer new String Buffer for int i 0 length params length i length i if i 0 buffer append NON NLS 1 short Buffer append NON NLS 1 buffer append new String params i readable Name short Buffer append new String params i short Readable Name int id rec Type is Array Type I Problem Javadoc No Message Send On Array Type I Problem Javadoc No Message Send On Base Type if javadoc Visibility this options report Invalid Javadoc Tags Visibility modifiers this handle id new String new String rec Type readable Name new String message Send selector buffer to String new String new String rec Type short Readable Name new String message Send selector short Buffer to String message Send source Start message Send source End  javadocErrorNoMethodFor MessageSend messageSend TypeBinding recType TypeBinding StringBuffer StringBuffer StringBuffer shortBuffer StringBuffer shortBuffer readableName shortBuffer shortReadableName recType isArrayType IProblem JavadocNoMessageSendOnArrayType IProblem JavadocNoMessageSendOnBaseType javadocVisibility reportInvalidJavadocTagsVisibility recType readableName messageSend toString recType shortReadableName messageSend shortBuffer toString messageSend sourceStart messageSend sourceEnd
public void javadoc Invalid Constructor Statement statement Method Binding target Constructor int modifiers if javadoc Visibility this options report Invalid Javadoc Tags Visibility modifiers return boolean inside Default Constructor this reference Context instanceof Constructor Declaration Constructor Declaration this reference Context is Default Constructor boolean inside Implicit Constructor Call statement instanceof Explicit Constructor Call Explicit Constructor Call statement access Mode Explicit Constructor Call Implicit Super int id I Problem Javadoc Undefined Constructor default switch target Constructor problem Id case Not Found if inside Default Constructor id I Problem Javadoc Undefined Constructor In Default Constructor else if inside Implicit Constructor Call id I Problem Javadoc Undefined Constructor In Implicit Constructor Call else id I Problem Javadoc Undefined Constructor break case Not Visible if inside Default Constructor id I Problem Javadoc Not Visible Constructor In Default Constructor else if inside Implicit Constructor Call id I Problem Javadoc Not Visible Constructor In Implicit Constructor Call else id I Problem Javadoc Not Visible Constructor break case Ambiguous if inside Default Constructor id I Problem Ambiguous Constructor In Default Constructor else if inside Implicit Constructor Call id I Problem Ambiguous Constructor In Implicit Constructor Call else id I Problem Javadoc Ambiguous Constructor break case No Error 0 default need Implementation want to fail to see why we were here break this handle id new String new String target Constructor declaring Class readable Name parameters As String target Constructor new String new String target Constructor declaring Class short Readable Name parameters As Short String target Constructor statement source Start statement source End  javadocInvalidConstructor MethodBinding targetConstructor javadocVisibility reportInvalidJavadocTagsVisibility insideDefaultConstructor referenceContext ConstructorDeclaration ConstructorDeclaration referenceContext isDefaultConstructor insideImplicitConstructorCall ExplicitConstructorCall ExplicitConstructorCall accessMode ExplicitConstructorCall ImplicitSuper IProblem JavadocUndefinedConstructor targetConstructor problemId NotFound insideDefaultConstructor IProblem JavadocUndefinedConstructorInDefaultConstructor insideImplicitConstructorCall IProblem JavadocUndefinedConstructorInImplicitConstructorCall IProblem JavadocUndefinedConstructor NotVisible insideDefaultConstructor IProblem JavadocNotVisibleConstructorInDefaultConstructor insideImplicitConstructorCall IProblem JavadocNotVisibleConstructorInImplicitConstructorCall IProblem JavadocNotVisibleConstructor insideDefaultConstructor IProblem AmbiguousConstructorInDefaultConstructor insideImplicitConstructorCall IProblem AmbiguousConstructorInImplicitConstructorCall IProblem JavadocAmbiguousConstructor NoError needImplementation targetConstructor declaringClass readableName parametersAsString targetConstructor targetConstructor declaringClass shortReadableName parametersAsShortString targetConstructor sourceStart sourceEnd
public void javadoc Ambiguous Method Reference int source Start int source End Binding field Binding int modifiers int id I Problem Javadoc Ambiguous Method Reference if javadoc Visibility this options report Invalid Javadoc Tags Visibility modifiers String arguments new String new String field Binding readable Name handle id arguments arguments source Start source End  javadocAmbiguousMethodReference sourceStart sourceEnd fieldBinding IProblem JavadocAmbiguousMethodReference javadocVisibility reportInvalidJavadocTagsVisibility fieldBinding readableName sourceStart sourceEnd
public void javadoc Invalid Field int source Start int source End Binding field Binding Type Binding searched Type int modifiers int id I Problem Javadoc Undefined Field switch field Binding problem Id case Not Found id I Problem Javadoc Undefined Field break case Not Visible id I Problem Javadoc Not Visible Field break case Ambiguous id I Problem Javadoc Ambiguous Field break case Inherited Name Hides Enclosing Name id I Problem Javadoc Inherited Field Hides Enclosing Name break case No Error 0 default need Implementation want to fail to see why we were here break if javadoc Visibility this options report Invalid Javadoc Tags Visibility modifiers String arguments new String new String field Binding readable Name handle id arguments arguments source Start source End  javadocInvalidField sourceStart sourceEnd fieldBinding TypeBinding searchedType IProblem JavadocUndefinedField fieldBinding problemId NotFound IProblem JavadocUndefinedField NotVisible IProblem JavadocNotVisibleField IProblem JavadocAmbiguousField InheritedNameHidesEnclosingName IProblem JavadocInheritedFieldHidesEnclosingName NoError needImplementation javadocVisibility reportInvalidJavadocTagsVisibility fieldBinding readableName sourceStart sourceEnd
public void javadoc Invalid Method Message Send message Send Method Binding method int modifiers if javadoc Visibility this options report Invalid Javadoc Tags Visibility modifiers return int id I Problem Javadoc Undefined Method default switch method problem Id case Not Found id I Problem Javadoc Undefined Method break case Not Visible id I Problem Javadoc Not Visible Method break case Ambiguous id I Problem Javadoc Ambiguous Method break case Inherited Name Hides Enclosing Name id I Problem Javadoc Inherited Method Hides Enclosing Name break case No Error 0 default need Implementation want to fail to see why we were here break if id I Problem Javadoc Undefined Method Problem Method Binding problem Method Problem Method Binding method if problem Method closest Match null String closest Parameter Type Names parameters As String problem Method closest Match String parameter Type Names parameters As String method String closest Parameter Type Short Names parameters As Short String problem Method closest Match String parameter Type Short Names parameters As Short String method if closest Parameter Type Short Names equals parameter Type Short Names closest Parameter Type Short Names closest Parameter Type Names parameter Type Short Names parameter Type Names this handle I Problem Javadoc Parameter Mismatch new String new String problem Method closest Match declaring Class readable Name new String problem Method closest Match selector closest Parameter Type Names parameter Type Names new String new String problem Method closest Match declaring Class short Readable Name new String problem Method closest Match selector closest Parameter Type Short Names parameter Type Short Names int message Send name Source Position 32 int message Send name Source Position return this handle id new String new String method declaring Class readable Name new String method selector parameters As String method new String new String method declaring Class short Readable Name new String method selector parameters As Short String method int message Send name Source Position 32 int message Send name Source Position  javadocInvalidMethod MessageSend messageSend MethodBinding javadocVisibility reportInvalidJavadocTagsVisibility IProblem JavadocUndefinedMethod problemId NotFound IProblem JavadocUndefinedMethod NotVisible IProblem JavadocNotVisibleMethod IProblem JavadocAmbiguousMethod InheritedNameHidesEnclosingName IProblem JavadocInheritedMethodHidesEnclosingName NoError needImplementation IProblem JavadocUndefinedMethod ProblemMethodBinding problemMethod ProblemMethodBinding problemMethod closestMatch closestParameterTypeNames parametersAsString problemMethod closestMatch parameterTypeNames parametersAsString closestParameterTypeShortNames parametersAsShortString problemMethod closestMatch parameterTypeShortNames parametersAsShortString closestParameterTypeShortNames parameterTypeShortNames closestParameterTypeShortNames closestParameterTypeNames parameterTypeShortNames parameterTypeNames IProblem JavadocParameterMismatch problemMethod closestMatch declaringClass readableName problemMethod closestMatch closestParameterTypeNames parameterTypeNames problemMethod closestMatch declaringClass shortReadableName problemMethod closestMatch closestParameterTypeShortNames parameterTypeShortNames messageSend nameSourcePosition messageSend nameSourcePosition declaringClass readableName parametersAsString declaringClass shortReadableName parametersAsShortString messageSend nameSourcePosition messageSend nameSourcePosition
public void javadoc Invalid Param Name Javadoc Single Name Reference param int modifiers if javadoc Visibility this options report Invalid Javadoc Tags Visibility modifiers String arguments new String String value Of param token this handle I Problem Javadoc Invalid Param Name arguments arguments param source Start param source End  javadocInvalidParamName JavadocSingleNameReference javadocVisibility reportInvalidJavadocTagsVisibility valueOf IProblem JavadocInvalidParamName sourceStart sourceEnd
public void javadoc Invalid See Reference int source Start int source End this handle I Problem Javadoc Invalid See Reference No Argument No Argument source Start source End  javadocInvalidSeeReference sourceStart sourceEnd IProblem JavadocInvalidSeeReference NoArgument NoArgument sourceStart sourceEnd
this handle I Problem Javadoc Invalid See Reference No Argument No Argument source Start source End public void javadoc Invalid See Reference Args int source Start int source End this handle I Problem Javadoc Invalid See Args No Argument No Argument source Start source End  IProblem JavadocInvalidSeeReference NoArgument NoArgument sourceStart sourceEnd javadocInvalidSeeReferenceArgs sourceStart sourceEnd IProblem JavadocInvalidSeeArgs NoArgument NoArgument sourceStart sourceEnd
this handle I Problem Javadoc Invalid See Args No Argument No Argument source Start source End public void javadoc Invalid See Url Reference int source Start int source End this handle I Problem Javadoc Invalid See Href No Argument No Argument source Start source End  IProblem JavadocInvalidSeeArgs NoArgument NoArgument sourceStart sourceEnd javadocInvalidSeeUrlReference sourceStart sourceEnd IProblem JavadocInvalidSeeHref NoArgument NoArgument sourceStart sourceEnd
this handle I Problem Javadoc Invalid See Href No Argument No Argument source Start source End public void javadoc Invalid Tag int source Start int source End this handle I Problem Javadoc Invalid Tag No Argument No Argument source Start source End  IProblem JavadocInvalidSeeHref NoArgument NoArgument sourceStart sourceEnd javadocInvalidTag sourceStart sourceEnd IProblem JavadocInvalidTag NoArgument NoArgument sourceStart sourceEnd
this handle I Problem Javadoc Invalid Tag No Argument No Argument source Start source End public void javadoc Invalid Throws Class int source Start int source End this handle I Problem Javadoc Invalid Throws Class No Argument No Argument source Start source End  IProblem JavadocInvalidTag NoArgument NoArgument sourceStart sourceEnd javadocInvalidThrowsClass sourceStart sourceEnd IProblem JavadocInvalidThrowsClass NoArgument NoArgument sourceStart sourceEnd
public void javadoc Invalid Throws Class Name Type Reference type Reference int modifiers if javadoc Visibility this options report Invalid Javadoc Tags Visibility modifiers String arguments new String String value Of type Reference resolved Type source Name this handle I Problem Javadoc Invalid Throws Class Name arguments arguments type Reference source Start type Reference source End  javadocInvalidThrowsClassName TypeReference typeReference javadocVisibility reportInvalidJavadocTagsVisibility valueOf typeReference resolvedType sourceName IProblem JavadocInvalidThrowsClassName typeReference sourceStart typeReference sourceEnd
public void javadoc Invalid Type AST Node location Type Binding type int modifiers if javadoc Visibility this options report Invalid Javadoc Tags Visibility modifiers int id I Problem Javadoc Undefined Type default switch type problem Id case Not Found id I Problem Javadoc Undefined Type break case Not Visible id I Problem Javadoc Not Visible Type break case Ambiguous id I Problem Javadoc Ambiguous Type break case Internal Name Provided id I Problem Javadoc Internal Type Name Provided break case Inherited Name Hides Enclosing Name id I Problem Javadoc Inherited Name Hides Enclosing Type Name break case No Error 0 default need Implementation want to fail to see why we were here break this handle id new String new String type readable Name new String new String type short Readable Name location source Start location source End  javadocInvalidType ASTNode TypeBinding javadocVisibility reportInvalidJavadocTagsVisibility IProblem JavadocUndefinedType problemId NotFound IProblem JavadocUndefinedType NotVisible IProblem JavadocNotVisibleType IProblem JavadocAmbiguousType InternalNameProvided IProblem JavadocInternalTypeNameProvided InheritedNameHidesEnclosingName IProblem JavadocInheritedNameHidesEnclosingTypeName NoError needImplementation readableName shortReadableName sourceStart sourceEnd
public void javadoc Malformed See Reference int source Start int source End this handle I Problem Javadoc Malformed See Reference No Argument No Argument source Start source End  javadocMalformedSeeReference sourceStart sourceEnd IProblem JavadocMalformedSeeReference NoArgument NoArgument sourceStart sourceEnd
public void javadoc Missing int source Start int source End int modifiers boolean overriding modifiers Compiler Modifiers Acc Implementing Compiler Modifiers Acc Overriding 0 boolean report this options get Severity Compiler Options Missing Javadoc Comments Problem Severities Ignore overriding this options report Missing Javadoc Comments Overriding if report String arg javadoc Visibility Argument this options report Missing Javadoc Comments Visibility modifiers if arg null String arguments new String arg this handle I Problem Javadoc Missing arguments arguments source Start source End  javadocMissing sourceStart sourceEnd CompilerModifiers AccImplementing CompilerModifiers AccOverriding getSeverity CompilerOptions MissingJavadocComments ProblemSeverities reportMissingJavadocCommentsOverriding javadocVisibilityArgument reportMissingJavadocCommentsVisibility IProblem JavadocMissing sourceStart sourceEnd
public void javadoc Missing Param Name int source Start int source End this handle I Problem Javadoc Missing Param Name No Argument No Argument source Start source End  javadocMissingParamName sourceStart sourceEnd IProblem JavadocMissingParamName NoArgument NoArgument sourceStart sourceEnd
public void javadoc Missing Param Tag Argument param int modifiers boolean overriding modifiers Compiler Modifiers Acc Implementing Compiler Modifiers Acc Overriding 0 boolean report this options get Severity Compiler Options Missing Javadoc Tags Problem Severities Ignore overriding this options report Missing Javadoc Tags Overriding if report javadoc Visibility this options report Missing Javadoc Tags Visibility modifiers String arguments new String String value Of param name this handle I Problem Javadoc Missing Param Tag arguments arguments param source Start param source End  javadocMissingParamTag CompilerModifiers AccImplementing CompilerModifiers AccOverriding getSeverity CompilerOptions MissingJavadocTags ProblemSeverities reportMissingJavadocTagsOverriding javadocVisibility reportMissingJavadocTagsVisibility valueOf IProblem JavadocMissingParamTag sourceStart sourceEnd
public void javadoc Missing Return Tag int source Start int source End int modifiers boolean overriding modifiers Compiler Modifiers Acc Implementing Compiler Modifiers Acc Overriding 0 boolean report this options get Severity Compiler Options Missing Javadoc Tags Problem Severities Ignore overriding this options report Missing Javadoc Tags Overriding if report javadoc Visibility this options report Missing Javadoc Tags Visibility modifiers this handle I Problem Javadoc Missing Return Tag No Argument No Argument source Start source End  javadocMissingReturnTag sourceStart sourceEnd CompilerModifiers AccImplementing CompilerModifiers AccOverriding getSeverity CompilerOptions MissingJavadocTags ProblemSeverities reportMissingJavadocTagsOverriding javadocVisibility reportMissingJavadocTagsVisibility IProblem JavadocMissingReturnTag NoArgument NoArgument sourceStart sourceEnd
public void javadoc Missing See Reference int source Start int source End this handle I Problem Javadoc Missing See Reference No Argument No Argument source Start source End  javadocMissingSeeReference sourceStart sourceEnd IProblem JavadocMissingSeeReference NoArgument NoArgument sourceStart sourceEnd
this handle I Problem Javadoc Missing See Reference No Argument No Argument source Start source End public void javadoc Missing Throws Class Name int source Start int source End this handle I Problem Javadoc Missing Throws Class Name No Argument No Argument source Start source End  IProblem JavadocMissingSeeReference NoArgument NoArgument sourceStart sourceEnd javadocMissingThrowsClassName sourceStart sourceEnd IProblem JavadocMissingThrowsClassName NoArgument NoArgument sourceStart sourceEnd
public void javadoc Missing Throws Tag Type Reference type Ref int modifiers boolean overriding modifiers Compiler Modifiers Acc Implementing Compiler Modifiers Acc Overriding 0 boolean report this options get Severity Compiler Options Missing Javadoc Tags Problem Severities Ignore overriding this options report Missing Javadoc Tags Overriding if report javadoc Visibility this options report Missing Javadoc Tags Visibility modifiers String arguments new String String value Of type Ref resolved Type source Name this handle I Problem Javadoc Missing Throws Tag arguments arguments type Ref source Start type Ref source End  javadocMissingThrowsTag TypeReference typeRef CompilerModifiers AccImplementing CompilerModifiers AccOverriding getSeverity CompilerOptions MissingJavadocTags ProblemSeverities reportMissingJavadocTagsOverriding javadocVisibility reportMissingJavadocTagsVisibility valueOf typeRef resolvedType sourceName IProblem JavadocMissingThrowsTag typeRef sourceStart typeRef sourceEnd
public void javadoc Unexpected Tag int source Start int source End this handle I Problem Javadoc Unexpected Tag No Argument No Argument source Start source End  javadocUnexpectedTag sourceStart sourceEnd IProblem JavadocUnexpectedTag NoArgument NoArgument sourceStart sourceEnd
this handle I Problem Javadoc Unexpected Tag No Argument No Argument source Start source End public void javadoc Unterminated Inline Tag int source Start int source End this handle I Problem Javadoc Unterminated Inline Tag No Argument No Argument source Start source End  IProblem JavadocUnexpectedTag NoArgument NoArgument sourceStart sourceEnd javadocUnterminatedInlineTag sourceStart sourceEnd IProblem JavadocUnterminatedInlineTag NoArgument NoArgument sourceStart sourceEnd
private boolean javadoc Visibility int visibility int modifiers switch modifiers Compiler Modifiers Acc VisibilityMASK case I Constants Acc Public return true case I Constants Acc Protected return visibility I Constants Acc Public case I Constants Acc Default return visibility I Constants Acc Default visibility I Constants Acc Private case I Constants Acc Private return visibility I Constants Acc Private return true  javadocVisibility CompilerModifiers AccVisibilityMASK IConstants AccPublic IConstants AccProtected IConstants AccPublic IConstants AccDefault IConstants AccDefault IConstants AccPrivate IConstants AccPrivate IConstants AccPrivate
private String javadoc Visibility Argument int visibility int modifiers String argument null switch modifiers Compiler Modifiers Acc VisibilityMASK case I Constants Acc Public argument Compiler Options PUBLIC break case I Constants Acc Protected if visibility I Constants Acc Public argument Compiler Options PROTECTED break case I Constants Acc Default if visibility I Constants Acc Default visibility I Constants Acc Private argument Compiler Options DEFAULT break case I Constants Acc Private if visibility I Constants Acc Private argument Compiler Options PRIVATE break return argument  javadocVisibilityArgument CompilerModifiers AccVisibilityMASK IConstants AccPublic CompilerOptions IConstants AccProtected IConstants AccPublic CompilerOptions IConstants AccDefault IConstants AccDefault IConstants AccPrivate CompilerOptions IConstants AccPrivate IConstants AccPrivate CompilerOptions
public void local Variable Hiding Local Declaration local Binding hidden Variable boolean is Special Arg Hiding Field if hidden Variable instanceof Local Variable Binding String arguments new String new String local name this handle local instanceof Argument I Problem Argument Hiding Local Variable I Problem Local Variable Hiding Local Variable arguments arguments local source Start local source End else if hidden Variable instanceof Field Binding if is Special Arg Hiding Field this options report Special Parameter Hiding Field return Field Binding field Field Binding hidden Variable this handle local instanceof Argument I Problem Argument Hiding Field I Problem Local Variable Hiding Field new String new String local name new String field declaring Class readable Name new String new String local name new String field declaring Class short Readable Name local source Start local source End  localVariableHiding LocalDeclaration hiddenVariable isSpecialArgHidingField hiddenVariable LocalVariableBinding IProblem ArgumentHidingLocalVariable IProblem LocalVariableHidingLocalVariable sourceStart sourceEnd hiddenVariable FieldBinding isSpecialArgHidingField reportSpecialParameterHidingField FieldBinding FieldBinding hiddenVariable IProblem ArgumentHidingField IProblem LocalVariableHidingField declaringClass readableName declaringClass shortReadableName sourceStart sourceEnd
public void method Need Body Abstract Method Declaration method Decl this handle I Problem Method Requires Body No Argument No Argument method Decl source Start method Decl source End  methodNeedBody AbstractMethodDeclaration methodDecl IProblem MethodRequiresBody NoArgument NoArgument methodDecl sourceStart methodDecl sourceEnd
public void method Needing No Body Method Declaration method Decl this handle method Decl modifiers I Constants Acc Native 0 I Problem Body For Native Method I Problem Body For Abstract Method No Argument No Argument method Decl source Start method Decl source End  methodNeedingNoBody MethodDeclaration methodDecl methodDecl IConstants AccNative IProblem BodyForNativeMethod IProblem BodyForAbstractMethod NoArgument NoArgument methodDecl sourceStart methodDecl sourceEnd
public void method With Constructor Name Method Declaration method Decl this handle I Problem Method But With Constructor Name No Argument No Argument method Decl source Start method Decl source End  methodWithConstructorName MethodDeclaration methodDecl IProblem MethodButWithConstructorName NoArgument NoArgument methodDecl sourceStart methodDecl sourceEnd
public void missing Return Type Abstract Method Declaration method Decl this handle I Problem Missing Return Type No Argument No Argument method Decl source Start method Decl source End  missingReturnType AbstractMethodDeclaration methodDecl IProblem MissingReturnType NoArgument NoArgument methodDecl sourceStart methodDecl sourceEnd
public void missing Semi Colon Expression expression this handle I Problem Missing Semi Colon No Argument No Argument expression source Start expression source End  missingSemiColon IProblem MissingSemiColon NoArgument NoArgument sourceStart sourceEnd
public void must Define Dimensions Or Initializer Array Allocation Expression expression this handle I Problem Must Define Either Dimension Expressions Or Initializer No Argument No Argument expression source Start expression source End  mustDefineDimensionsOrInitializer ArrayAllocationExpression IProblem MustDefineEitherDimensionExpressionsOrInitializer NoArgument NoArgument sourceStart sourceEnd
public void must Specify Package Compilation Unit Declaration comp Unit Decl String arguments new String new String comp Unit Decl get File Name this handle I Problem Must Specify Package arguments arguments comp Unit Decl source Start comp Unit Decl source Start 1  mustSpecifyPackage CompilationUnitDeclaration compUnitDecl compUnitDecl getFileName IProblem MustSpecifyPackage compUnitDecl sourceStart compUnitDecl sourceStart
public void must UseA Static Method Message Send message Send Method Binding method this handle I Problem Static Method Requested new String new String method declaring Class readable Name new String method selector parameters As String method new String new String method declaring Class short Readable Name new String method selector parameters As Short String method message Send source Start message Send source End  mustUseAStaticMethod MessageSend messageSend MethodBinding IProblem StaticMethodRequested declaringClass readableName parametersAsString declaringClass shortReadableName parametersAsShortString messageSend sourceStart messageSend sourceEnd
public void native Methods Cannot Be Strictfp Reference Binding type Abstract Method Declaration method Decl String arguments new String new String type source Name new String method Decl selector this handle I Problem Native Methods Cannot Be Strictfp arguments arguments method Decl source Start method Decl source End  nativeMethodsCannotBeStrictfp ReferenceBinding AbstractMethodDeclaration methodDecl sourceName methodDecl IProblem NativeMethodsCannotBeStrictfp methodDecl sourceStart methodDecl sourceEnd
method Decl source End public void need Implementation this abort Due To Internal Error Util bind abort missing Code NON NLS 1  methodDecl sourceEnd needImplementation abortDueToInternalError missingCode
public void need To Emulate Field Read Access Field Binding field AST Node location this handle I Problem Need To Emulate Field Read Access new String new String field declaring Class readable Name new String field name new String new String field declaring Class short Readable Name new String field name location source Start location source End  needToEmulateFieldReadAccess FieldBinding ASTNode IProblem NeedToEmulateFieldReadAccess declaringClass readableName declaringClass shortReadableName sourceStart sourceEnd
public void need To Emulate Field Write Access Field Binding field AST Node location this handle I Problem Need To Emulate Field Write Access new String new String field declaring Class readable Name new String field name new String new String field declaring Class short Readable Name new String field name location source Start location source End  needToEmulateFieldWriteAccess FieldBinding ASTNode IProblem NeedToEmulateFieldWriteAccess declaringClass readableName declaringClass shortReadableName sourceStart sourceEnd
public void need To Emulate Method Access Method Binding method AST Node location if method is Constructor this handle I Problem Need To Emulate Constructor Access new String new String method declaring Class readable Name parameters As String method new String new String method declaring Class short Readable Name parameters As Short String method location source Start location source End else this handle I Problem Need To Emulate Method Access new String new String method declaring Class readable Name new String method selector parameters As String method new String new String method declaring Class short Readable Name new String method selector parameters As Short String method location source Start location source End  needToEmulateMethodAccess MethodBinding ASTNode isConstructor IProblem NeedToEmulateConstructorAccess declaringClass readableName parametersAsString declaringClass shortReadableName parametersAsShortString sourceStart sourceEnd IProblem NeedToEmulateMethodAccess declaringClass readableName parametersAsString declaringClass shortReadableName parametersAsShortString sourceStart sourceEnd
public void nested Class Cannot Declare Interface Type Declaration type Decl String arguments new String new String type Decl name this handle I Problem Cannot Define Interface In Local Type arguments arguments type Decl source Start type Decl source End  nestedClassCannotDeclareInterface TypeDeclaration typeDecl typeDecl IProblem CannotDefineInterfaceInLocalType typeDecl sourceStart typeDecl sourceEnd
public void no More Available Space For Argument Local Variable Binding local AST Node location String arguments new String new String local name this handle local instanceof Synthetic Argument Binding I Problem Too Many Synthetic Argument Slots I Problem Too Many Argument Slots arguments arguments Abort Error location source Start location source End  noMoreAvailableSpaceForArgument LocalVariableBinding ASTNode SyntheticArgumentBinding IProblem TooManySyntheticArgumentSlots IProblem TooManyArgumentSlots sourceStart sourceEnd
public void no More Available Space For Local Local Variable Binding local AST Node location String arguments new String new String local name this handle I Problem Too Many Local Variable Slots arguments arguments Abort Error location source Start location source End  noMoreAvailableSpaceForLocal LocalVariableBinding ASTNode IProblem TooManyLocalVariableSlots sourceStart sourceEnd
public void non Static Access To Static Method AST Node location Method Binding method this handle I Problem Non Static Access To Static Method new String new String method declaring Class readable Name new String method selector parameters As String method new String new String method declaring Class short Readable Name new String method selector parameters As Short String method location source Start location source End  nonStaticAccessToStaticMethod ASTNode MethodBinding IProblem NonStaticAccessToStaticMethod declaringClass readableName parametersAsString declaringClass shortReadableName parametersAsShortString sourceStart sourceEnd
public void non Static Access To Static Field AST Node location Field Binding field this handle I Problem Non Static Access To Static Field new String new String field declaring Class readable Name new String field name new String new String field declaring Class short Readable Name new String field name location source Start field Location field location  nonStaticAccessToStaticField ASTNode FieldBinding IProblem NonStaticAccessToStaticField declaringClass readableName declaringClass shortReadableName sourceStart fieldLocation
public void no Such Enclosing Instance Type Binding target Type AST Node location boolean is Constructor Call int id if is Constructor Call 28 No enclosing instance of type 0 is available due to some intermediate constructor invocation id I Problem Enclosing Instance In Constructor Call else if location instanceof Explicit Constructor Call Explicit Constructor Call location access Mode Explicit Constructor Call Implicit Super 20 No enclosing instance of type 0 is accessible to invoke the super constructor Must define a constructor and explicitly qualify its super constructor invocation with an instance of 0 e g x super where x is an instance of 0 id I Problem Missing Enclosing Instance For Constructor Call else if location instanceof Allocation Expression Allocation Expression location binding declaring Class is Member Type Allocation Expression location binding declaring Class is Anonymous Type Allocation Expression location binding declaring Class superclass is Member Type 21 No enclosing instance of type 0 is accessible Must qualify the allocation with an enclosing instance of type 0 e g x new A where x is an instance of 0 id I Problem Missing Enclosing Instance else default 22 No enclosing instance of the type 0 is accessible in scope id I Problem Incorrect Enclosing Instance Reference this handle id new String new String target Type readable Name new String new String target Type short Readable Name location source Start location source End  noSuchEnclosingInstance TypeBinding targetType ASTNode isConstructorCall isConstructorCall IProblem EnclosingInstanceInConstructorCall ExplicitConstructorCall ExplicitConstructorCall accessMode ExplicitConstructorCall ImplicitSuper IProblem MissingEnclosingInstanceForConstructorCall AllocationExpression AllocationExpression declaringClass isMemberType AllocationExpression declaringClass isAnonymousType AllocationExpression declaringClass isMemberType IProblem MissingEnclosingInstance IProblem IncorrectEnclosingInstanceReference targetType readableName targetType shortReadableName sourceStart sourceEnd
public void not Compatible Types Error Equal Expression expression Type Binding left Type Type Binding right Type String left Name new String left Type readable Name String right Name new String right Type readable Name String left Short Name new String left Type short Readable Name String right Short Name new String right Type short Readable Name if left Short Name equals right Short Name left Short Name left Name right Short Name right Name this handle I Problem Incompatible Types In Equality Operator new String left Name right Name new String left Short Name right Short Name expression source Start expression source End  notCompatibleTypesError EqualExpression TypeBinding leftType TypeBinding rightType leftName leftType readableName rightName rightType readableName leftShortName leftType shortReadableName rightShortName rightType shortReadableName leftShortName rightShortName leftShortName leftName rightShortName rightName IProblem IncompatibleTypesInEqualityOperator leftName rightName leftShortName rightShortName sourceStart sourceEnd
public void not Compatible Types Error Instance Of Expression expression Type Binding left Type Type Binding right Type String left Name new String left Type readable Name String right Name new String right Type readable Name String left Short Name new String left Type short Readable Name String right Short Name new String right Type short Readable Name if left Short Name equals right Short Name left Short Name left Name right Short Name right Name this handle I Problem Incompatible Types In Conditional Operator new String left Name right Name new String left Short Name right Short Name expression source Start expression source End  notCompatibleTypesError InstanceOfExpression TypeBinding leftType TypeBinding rightType leftName leftType readableName rightName rightType readableName leftShortName leftType shortReadableName rightShortName rightType shortReadableName leftShortName rightShortName leftShortName leftName rightShortName rightName IProblem IncompatibleTypesInConditionalOperator leftName rightName leftShortName rightShortName sourceStart sourceEnd
public void object Cannot Have Super Types Source Type Binding type this handle I Problem Object Cannot Have Super Types No Argument No Argument type source Start type source End  objectCannotHaveSuperTypes SourceTypeBinding IProblem ObjectCannotHaveSuperTypes NoArgument NoArgument sourceStart sourceEnd
public void operator Only Valid On Numeric Type Compound Assignment assignment Type Binding left Type Type Binding right Type String left Name new String left Type readable Name String right Name new String right Type readable Name String left Short Name new String left Type short Readable Name String right Short Name new String right Type short Readable Name if left Short Name equals right Short Name left Short Name left Name right Short Name right Name this handle I Problem Type Mismatch new String left Name right Name new String left Short Name right Short Name assignment source Start assignment source End  operatorOnlyValidOnNumericType CompoundAssignment TypeBinding leftType TypeBinding rightType leftName leftType readableName rightName rightType readableName leftShortName leftType shortReadableName rightShortName rightType shortReadableName leftShortName rightShortName leftShortName leftName rightShortName rightName IProblem TypeMismatch leftName rightName leftShortName rightShortName sourceStart sourceEnd
public void overrides Deprecated Method Method Binding local Method Method Binding inherited Method this handle I Problem Overriding Deprecated Method new String new String Char Operation concat local Method declaring Class readable Name local Method readable Name new String inherited Method declaring Class readable Name new String new String Char Operation concat local Method declaring Class short Readable Name local Method short Readable Name new String inherited Method declaring Class short Readable Name local Method source Start local Method source End  overridesDeprecatedMethod MethodBinding localMethod MethodBinding inheritedMethod IProblem OverridingDeprecatedMethod CharOperation localMethod declaringClass readableName localMethod readableName inheritedMethod declaringClass readableName CharOperation localMethod declaringClass shortReadableName localMethod shortReadableName inheritedMethod declaringClass shortReadableName localMethod sourceStart localMethod sourceEnd
public void overrides Package Default Method Method Binding local Method Method Binding inherited Method this handle I Problem Overriding Non Visible Method new String new String Char Operation concat local Method declaring Class readable Name local Method readable Name new String inherited Method declaring Class readable Name new String new String Char Operation concat local Method declaring Class short Readable Name local Method short Readable Name new String inherited Method declaring Class short Readable Name local Method source Start local Method source End  overridesPackageDefaultMethod MethodBinding localMethod MethodBinding inheritedMethod IProblem OverridingNonVisibleMethod CharOperation localMethod declaringClass readableName localMethod readableName inheritedMethod declaringClass readableName CharOperation localMethod declaringClass shortReadableName localMethod shortReadableName inheritedMethod declaringClass shortReadableName localMethod sourceStart localMethod sourceEnd
public void package Collides With Type Compilation Unit Declaration comp Unit Decl String arguments new String Char Operation to String comp Unit Decl current Package tokens this handle I Problem Package Collides With Type arguments arguments comp Unit Decl current Package source Start comp Unit Decl current Package source End  packageCollidesWithType CompilationUnitDeclaration compUnitDecl CharOperation toString compUnitDecl currentPackage IProblem PackageCollidesWithType compUnitDecl currentPackage sourceStart compUnitDecl currentPackage sourceEnd
public void package Is Not Expected Package Compilation Unit Declaration comp Unit Decl String arguments new String Char Operation to String comp Unit Decl compilation Result compilation Unit get Package Name this handle I Problem Package Is Not Expected Package arguments arguments comp Unit Decl current Package null 0 comp Unit Decl current Package source Start comp Unit Decl current Package null 0 comp Unit Decl current Package source End  packageIsNotExpectedPackage CompilationUnitDeclaration compUnitDecl CharOperation toString compUnitDecl compilationResult compilationUnit getPackageName IProblem PackageIsNotExpectedPackage compUnitDecl currentPackage compUnitDecl currentPackage sourceStart compUnitDecl currentPackage compUnitDecl currentPackage sourceEnd
private String parameters As String Method Binding method Type Binding params method parameters String Buffer buffer new String Buffer for int i 0 length params length i length i if i 0 buffer append NON NLS 1 buffer append new String params i readable Name return buffer to String  parametersAsString MethodBinding TypeBinding StringBuffer StringBuffer readableName toString
private String parameters As Short String Method Binding method Type Binding params method parameters String Buffer buffer new String Buffer for int i 0 length params length i length i if i 0 buffer append NON NLS 1 buffer append new String params i short Readable Name return buffer to String  parametersAsShortString MethodBinding TypeBinding StringBuffer StringBuffer shortReadableName toString
public void parse Error int start Position int end Position int current Token char current Token Source String error Token Name String possible Tokens if possible Tokens length 0 no suggestion available if is Keyword current Token String arguments new String new String current Token Source this handle I Problem Parsing Error On Keyword No Suggestion arguments arguments this is the current invalid token position start Position end Position return else String arguments new String error Token Name this handle I Problem Parsing Error No Suggestion arguments arguments this is the current invalid token position start Position end Position return build a list of probable right tokens String Buffer list new String Buffer 20 for int i 0 max possible Tokens length i max i if i 0 list append NON NLS 1 list append list append possible Tokens i list append if is Keyword current Token String arguments new String new String current Token Source list to String this handle I Problem Parsing Error On Keyword arguments arguments this is the current invalid token position start Position end Position return extract the literal when it s a literal if is Literal current Token is Identifier current Token NON NLS 1 error Token Name new String current Token Source String arguments new String error Token Name list to String this handle I Problem Parsing Error arguments arguments this is the current invalid token position start Position end Position  parseError startPosition endPosition currentToken currentTokenSource errorTokenName possibleTokens possibleTokens isKeyword currentToken currentTokenSource IProblem ParsingErrorOnKeywordNoSuggestion startPosition endPosition errorTokenName IProblem ParsingErrorNoSuggestion startPosition endPosition StringBuffer StringBuffer possibleTokens possibleTokens isKeyword currentToken currentTokenSource toString IProblem ParsingErrorOnKeyword startPosition endPosition isLiteral currentToken isIdentifier currentToken errorTokenName currentTokenSource errorTokenName toString IProblem ParsingError startPosition endPosition
public void possible Accidental Boolean Assignment Assignment assignment String arguments new String this handle I Problem Possible Accidental Boolean Assignment arguments arguments assignment source Start assignment source End  possibleAccidentalBooleanAssignment IProblem PossibleAccidentalBooleanAssignment sourceStart sourceEnd
public void public Class Must Match File Name Compilation Unit Declaration comp Unit Decl Type Declaration type Decl this reference Context type Decl report the problem against the type not the entire compilation unit String arguments new String new String comp Unit Decl get File Name new String type Decl name this handle I Problem Public Class Must Match File Name arguments arguments type Decl source Start type Decl source End comp Unit Decl compilation Result  publicClassMustMatchFileName CompilationUnitDeclaration compUnitDecl TypeDeclaration typeDecl referenceContext typeDecl compUnitDecl getFileName typeDecl IProblem PublicClassMustMatchFileName typeDecl sourceStart typeDecl sourceEnd compUnitDecl compilationResult
public void recursive Constructor Invocation Explicit Constructor Call constructor Call this handle I Problem Recursive Constructor Invocation new String new String constructor Call binding declaring Class readable Name parameters As String constructor Call binding new String new String constructor Call binding declaring Class short Readable Name parameters As Short String constructor Call binding constructor Call source Start constructor Call source End  recursiveConstructorInvocation ExplicitConstructorCall constructorCall IProblem RecursiveConstructorInvocation constructorCall declaringClass readableName parametersAsString constructorCall constructorCall declaringClass shortReadableName parametersAsShortString constructorCall constructorCall sourceStart constructorCall sourceEnd
public void redefine Argument Argument arg String arguments new String new String arg name this handle I Problem Redefined Argument arguments arguments arg source Start arg source End  redefineArgument IProblem RedefinedArgument sourceStart sourceEnd
public void redefine Local Local Declaration local Decl String arguments new String new String local Decl name this handle I Problem Redefined Local arguments arguments local Decl source Start local Decl source End  redefineLocal LocalDeclaration localDecl localDecl IProblem RedefinedLocal localDecl sourceStart localDecl sourceEnd
public void reference Must Be Array Type At Type Binding array Type Array Reference array Ref this handle I Problem Array Reference Required new String new String array Type readable Name new String new String array Type short Readable Name array Ref source Start array Ref source End  referenceMustBeArrayTypeAt TypeBinding arrayType ArrayReference arrayRef IProblem ArrayReferenceRequired arrayType readableName arrayType shortReadableName arrayRef sourceStart arrayRef sourceEnd
public void return Type Cannot Be Void Array Source Type Binding type Method Declaration method Decl String arguments new String new String method Decl selector this handle I Problem Return Type Cannot Be Void Array arguments arguments method Decl source Start method Decl source End  returnTypeCannotBeVoidArray SourceTypeBinding MethodDeclaration methodDecl methodDecl IProblem ReturnTypeCannotBeVoidArray methodDecl sourceStart methodDecl sourceEnd
public void return Type Problem Source Type Binding type Method Declaration method Decl Type Binding expected Type int problem Id expected Type problem Id int id switch problem Id case Not Found 1 id I Problem Return Type Not Found break case Not Visible 2 id I Problem Return Type Not Visible break case Ambiguous 3 id I Problem Return Type Ambiguous break case Internal Name Provided 4 id I Problem Return Type Internal Name Provided break case Inherited Name Hides Enclosing Name 5 id I Problem Return Type Inherited Name Hides Enclosing Name break case No Error 0 default need Implementation want to fail to see why we were here return this handle id new String new String method Decl selector new String expected Type readable Name new String new String method Decl selector new String expected Type short Readable Name method Decl return Type source Start method Decl return Type source End  returnTypeProblem SourceTypeBinding MethodDeclaration methodDecl TypeBinding expectedType problemId expectedType problemId problemId NotFound IProblem ReturnTypeNotFound NotVisible IProblem ReturnTypeNotVisible IProblem ReturnTypeAmbiguous InternalNameProvided IProblem ReturnTypeInternalNameProvided InheritedNameHidesEnclosingName IProblem ReturnTypeInheritedNameHidesEnclosingName NoError needImplementation methodDecl expectedType readableName methodDecl expectedType shortReadableName methodDecl returnType sourceStart methodDecl returnType sourceEnd
public void scanner Error Parser parser String error Token Name Scanner scanner parser scanner int flag I Problem Parsing Error No Suggestion int start Pos scanner start Position special treatment for recognized errors if error Token Name equals Scanner END OF SOURCE flag I Problem End Of Source else if error Token Name equals Scanner INVALID HEXA flag I Problem Invalid Hexa else if error Token Name equals Scanner INVALID OCTAL flag I Problem Invalid Octal else if error Token Name equals Scanner INVALID CHARACTER CONSTANT flag I Problem Invalid Character Constant else if error Token Name equals Scanner INVALID ESCAPE flag I Problem Invalid Escape else if error Token Name equals Scanner INVALID UNICODE ESCAPE flag I Problem Invalid Unicode Escape better locate the error message char source scanner source int check Pos scanner current Position 1 if check Pos source length check Pos source length 1 while check Pos start Pos if source check Pos break check Pos start Pos check Pos else if error Token Name equals Scanner INVALID FLOAT flag I Problem Invalid Float else if error Token Name equals Scanner UNTERMINATED STRING flag I Problem Unterminated String else if error Token Name equals Scanner UNTERMINATED COMMENT flag I Problem Unterminated Comment else if error Token Name equals Scanner INVALID CHAR IN STRING flag I Problem Unterminated String String arguments flag I Problem Parsing Error No Suggestion new String error Token Name No Argument this handle flag arguments arguments this is the current invalid token position start Pos scanner current Position 1 parser compilation Unit compilation Result  scannerError errorTokenName IProblem ParsingErrorNoSuggestion startPos startPosition errorTokenName END_OF_SOURCE IProblem EndOfSource errorTokenName INVALID_HEXA IProblem InvalidHexa errorTokenName INVALID_OCTAL IProblem InvalidOctal errorTokenName INVALID_CHARACTER_CONSTANT IProblem InvalidCharacterConstant errorTokenName INVALID_ESCAPE IProblem InvalidEscape errorTokenName INVALID_UNICODE_ESCAPE IProblem InvalidUnicodeEscape checkPos currentPosition checkPos checkPos checkPos startPos checkPos checkPos startPos checkPos errorTokenName INVALID_FLOAT IProblem InvalidFloat errorTokenName UNTERMINATED_STRING IProblem UnterminatedString errorTokenName UNTERMINATED_COMMENT IProblem UnterminatedComment errorTokenName INVALID_CHAR_IN_STRING IProblem UnterminatedString IProblem ParsingErrorNoSuggestion errorTokenName NoArgument startPos currentPosition compilationUnit compilationResult
public void should Return Type Binding return Type AST Node location this handle I Problem Should Return Value new String new String return Type readable Name new String new String return Type short Readable Name location source Start location source End  shouldReturn TypeBinding returnType ASTNode IProblem ShouldReturnValue returnType readableName returnType shortReadableName sourceStart sourceEnd
public void signal No Implicit String Conversion For Char Array Expression Expression expression this handle I Problem No Implicit String Conversion For Char Array Expression No Argument No Argument expression source Start expression source End  signalNoImplicitStringConversionForCharArrayExpression IProblem NoImplicitStringConversionForCharArrayExpression NoArgument NoArgument sourceStart sourceEnd
public void static And Instance Conflict Method Binding current Method Method Binding inherited Method if current Method is Static this handle This static method cannot hide the instance method from 1 8 4 6 4 If a class inherits more than one method with the same signature a static non abstract method cannot hide an instance method I Problem Cannot Hide An Instance Method WithA Static Method new String new String inherited Method declaring Class readable Name new String new String inherited Method declaring Class short Readable Name current Method source Start current Method source End else this handle This instance method cannot override the static method from 1 8 4 6 4 If a class inherits more than one method with the same signature an instance non abstract method cannot override a static method I Problem Cannot OverrideA Static Method With An Instance Method new String new String inherited Method declaring Class readable Name new String new String inherited Method declaring Class short Readable Name current Method source Start current Method source End  staticAndInstanceConflict MethodBinding currentMethod MethodBinding inheritedMethod currentMethod isStatic IProblem CannotHideAnInstanceMethodWithAStaticMethod inheritedMethod declaringClass readableName inheritedMethod declaringClass shortReadableName currentMethod sourceStart currentMethod sourceEnd IProblem CannotOverrideAStaticMethodWithAnInstanceMethod inheritedMethod declaringClass readableName inheritedMethod declaringClass shortReadableName currentMethod sourceStart currentMethod sourceEnd
public void static Field Access To Non Static Variable AST Node location Field Binding field String arguments new String new String field readable Name this handle I Problem Non Static Field From Static Invocation arguments arguments location source Start field Location field location  staticFieldAccessToNonStaticVariable ASTNode FieldBinding readableName IProblem NonStaticFieldFromStaticInvocation sourceStart fieldLocation
public void static Inherited Method Conflicts Source Type Binding type Method Binding concrete Method Method Binding abstract Methods this handle The static method 1 conflicts with the abstract method in 2 8 4 6 4 If a class inherits more than one method with the same signature it is an error for one to be static non abstract and the other abstract I Problem Static Inherited Method Conflicts new String new String concrete Method readable Name new String abstract Methods 0 declaring Class readable Name new String new String concrete Method readable Name new String abstract Methods 0 declaring Class short Readable Name type source Start type source End  staticInheritedMethodConflicts SourceTypeBinding MethodBinding concreteMethod MethodBinding abstractMethods IProblem StaticInheritedMethodConflicts concreteMethod readableName abstractMethods declaringClass readableName concreteMethod readableName abstractMethods declaringClass shortReadableName sourceStart sourceEnd
public void string Constant Is Exceeding Utf8 Limit AST Node location this handle I Problem String Constant Is Exceeding Utf8 Limit No Argument No Argument location source Start location source End  stringConstantIsExceedingUtf8Limit ASTNode IProblem StringConstantIsExceedingUtf8Limit NoArgument NoArgument sourceStart sourceEnd
public void superclass Must BeA Class Source Type Binding type Type Reference superclass Ref Reference Binding super Type this handle I Problem Superclass Must BeA Class new String new String super Type readable Name new String type source Name new String new String super Type short Readable Name new String type source Name superclass Ref source Start superclass Ref source End  superclassMustBeAClass SourceTypeBinding TypeReference superclassRef ReferenceBinding superType IProblem SuperclassMustBeAClass superType readableName sourceName superType shortReadableName sourceName superclassRef sourceStart superclassRef sourceEnd
public void superfluous Semicolon int source Start int source End this handle I Problem Superfluous Semicolon No Argument No Argument source Start source End  superfluousSemicolon sourceStart sourceEnd IProblem SuperfluousSemicolon NoArgument NoArgument sourceStart sourceEnd
public void superinterface Must Be An Interface Source Type Binding type Type Declaration type Decl Reference Binding super Type this handle I Problem Super Interface Must Be An Interface new String new String super Type readable Name new String type source Name new String new String super Type short Readable Name new String type source Name type Decl source Start type Decl source End  superinterfaceMustBeAnInterface SourceTypeBinding TypeDeclaration typeDecl ReferenceBinding superType IProblem SuperInterfaceMustBeAnInterface superType readableName sourceName superType shortReadableName sourceName typeDecl sourceStart typeDecl sourceEnd
public void task String tag String message String priority int start int end this handle I Problem Task new String tag message priority secret argument that is not surfaced in get Message new String tag message priority secret argument that is not surfaced in get Message start end  IProblem getMessage getMessage
public void too Many Dimensions AST Node expression this handle I Problem Too Many Array Dimensions No Argument No Argument expression source Start expression source End  tooManyDimensions ASTNode IProblem TooManyArrayDimensions NoArgument NoArgument sourceStart sourceEnd
public void too Many Fields Type Declaration type Declaration this handle I Problem Too Many Fields new String new String type Declaration binding readable Name new String new String type Declaration binding short Readable Name Abort Error type Declaration source Start type Declaration source End  tooManyFields TypeDeclaration typeDeclaration IProblem TooManyFields typeDeclaration readableName typeDeclaration shortReadableName typeDeclaration sourceStart typeDeclaration sourceEnd
public void too Many Methods Type Declaration type Declaration this handle I Problem Too Many Methods new String new String type Declaration binding readable Name new String new String type Declaration binding short Readable Name Abort Error type Declaration source Start type Declaration source End  tooManyMethods TypeDeclaration typeDeclaration IProblem TooManyMethods typeDeclaration readableName typeDeclaration shortReadableName typeDeclaration sourceStart typeDeclaration sourceEnd
public void type Cast Error Cast Expression expression Type Binding left Type Type Binding right Type String left Name new String left Type readable Name String right Name new String right Type readable Name String left Short Name new String left Type short Readable Name String right Short Name new String right Type short Readable Name if left Short Name equals right Short Name left Short Name left Name right Short Name right Name this handle I Problem Illegal Cast new String right Name left Name new String right Short Name left Short Name expression source Start expression source End  typeCastError CastExpression TypeBinding leftType TypeBinding rightType leftName leftType readableName rightName rightType readableName leftShortName leftType shortReadableName rightShortName rightType shortReadableName leftShortName rightShortName leftShortName leftName rightShortName rightName IProblem IllegalCast rightName leftName rightShortName leftShortName sourceStart sourceEnd
public void type Collides With Package Compilation Unit Declaration comp Unit Decl Type Declaration type Decl this reference Context type Decl report the problem against the type not the entire compilation unit String arguments new String new String comp Unit Decl get File Name new String type Decl name this handle I Problem Type Collides With Package arguments arguments type Decl source Start type Decl source End comp Unit Decl compilation Result  typeCollidesWithPackage CompilationUnitDeclaration compUnitDecl TypeDeclaration typeDecl referenceContext typeDecl compUnitDecl getFileName typeDecl IProblem TypeCollidesWithPackage typeDecl sourceStart typeDecl sourceEnd compUnitDecl compilationResult
public void type Mismatch Error Type Binding result Type Type Binding expected Type AST Node location String result Type Name new String result Type readable Name String expected Type Name new String expected Type readable Name String result Type Short Name new String result Type short Readable Name String expected Type Short Name new String expected Type short Readable Name if result Type Short Name equals expected Type Short Name result Type Short Name result Type Name expected Type Short Name expected Type Name this handle I Problem Type Mismatch new String result Type Name expected Type Name new String result Type Short Name expected Type Short Name location source Start location source End  typeMismatchError TypeBinding resultType TypeBinding expectedType ASTNode resultTypeName resultType readableName expectedTypeName expectedType readableName resultTypeShortName resultType shortReadableName expectedTypeShortName expectedType shortReadableName resultTypeShortName expectedTypeShortName resultTypeShortName resultTypeName expectedTypeShortName expectedTypeName IProblem TypeMismatch resultTypeName expectedTypeName resultTypeShortName expectedTypeShortName sourceStart sourceEnd
public void type Mismatch Error Actual Type Expected Type Expression expression Type Binding constant Type Type Binding expected Type String constant Type Name new String constant Type readable Name String expected Type Name new String expected Type readable Name String constant Type Short Name new String constant Type short Readable Name String expected Type Short Name new String expected Type short Readable Name if constant Type Short Name equals expected Type Short Name constant Type Short Name constant Type Name expected Type Short Name expected Type Name this handle I Problem Type Mismatch new String constant Type Name expected Type Name new String constant Type Short Name expected Type Short Name expression source Start expression source End  typeMismatchErrorActualTypeExpectedType TypeBinding constantType TypeBinding expectedType constantTypeName constantType readableName expectedTypeName expectedType readableName constantTypeShortName constantType shortReadableName expectedTypeShortName expectedType shortReadableName constantTypeShortName expectedTypeShortName constantTypeShortName constantTypeName expectedTypeShortName expectedTypeName IProblem TypeMismatch constantTypeName expectedTypeName constantTypeShortName expectedTypeShortName sourceStart sourceEnd
public void undefined Label Branch Statement statement String arguments new String new String statement label this handle I Problem Undefined Label arguments arguments statement source Start statement source End  undefinedLabel BranchStatement IProblem UndefinedLabel sourceStart sourceEnd
public void undocumented Empty Block int block Start int block End String arguments new String this handle I Problem Undocumented Empty Block arguments arguments block Start block End  undocumentedEmptyBlock blockStart blockEnd IProblem UndocumentedEmptyBlock blockStart blockEnd
public void unexpected Static Modifier For Field Source Type Binding type Field Declaration field Decl String arguments new String new String field Decl name this handle I Problem Unexpected Static Modifier For Field arguments arguments field Decl source Start field Decl source End  unexpectedStaticModifierForField SourceTypeBinding FieldDeclaration fieldDecl fieldDecl IProblem UnexpectedStaticModifierForField fieldDecl sourceStart fieldDecl sourceEnd
public void unexpected Static Modifier For Method Reference Binding type Abstract Method Declaration method Decl String arguments new String new String type source Name new String method Decl selector this handle I Problem Unexpected Static Modifier For Method arguments arguments method Decl source Start method Decl source End  unexpectedStaticModifierForMethod ReferenceBinding AbstractMethodDeclaration methodDecl sourceName methodDecl IProblem UnexpectedStaticModifierForMethod methodDecl sourceStart methodDecl sourceEnd
public void unhandled Exception Type Binding exception Type AST Node location boolean inside Default Constructor this reference Context instanceof Constructor Declaration Constructor Declaration this reference Context is Default Constructor boolean inside Implicit Constructor Call location instanceof Explicit Constructor Call Explicit Constructor Call location access Mode Explicit Constructor Call Implicit Super this handle inside Default Constructor I Problem Unhandled Exception In Default Constructor inside Implicit Constructor Call I Problem Undefined Constructor In Implicit Constructor Call I Problem Unhandled Exception new String new String exception Type readable Name new String new String exception Type short Readable Name location source Start location source End  unhandledException TypeBinding exceptionType ASTNode insideDefaultConstructor referenceContext ConstructorDeclaration ConstructorDeclaration referenceContext isDefaultConstructor insideImplicitConstructorCall ExplicitConstructorCall ExplicitConstructorCall accessMode ExplicitConstructorCall ImplicitSuper insideDefaultConstructor IProblem UnhandledExceptionInDefaultConstructor insideImplicitConstructorCall IProblem UndefinedConstructorInImplicitConstructorCall IProblem UnhandledException exceptionType readableName exceptionType shortReadableName sourceStart sourceEnd
public void uninitialized Blank Final Field Field Binding binding AST Node location String arguments new String new String binding readable Name this handle I Problem Uninitialized Blank Final Field arguments arguments location source Start field Location binding location  uninitializedBlankFinalField FieldBinding ASTNode readableName IProblem UninitializedBlankFinalField sourceStart fieldLocation
public void uninitialized Local Variable Local Variable Binding binding AST Node location String arguments new String new String binding readable Name this handle I Problem Uninitialized Local Variable arguments arguments location source Start location source End  uninitializedLocalVariable LocalVariableBinding ASTNode readableName IProblem UninitializedLocalVariable sourceStart sourceEnd
public void unmatched Bracket int position Reference Context context Compilation Result compilation Result this handle I Problem Unmatched Bracket No Argument No Argument position position context compilation Result  unmatchedBracket ReferenceContext CompilationResult compilationResult IProblem UnmatchedBracket NoArgument NoArgument compilationResult
public void unnecessary Cast Cast Expression cast Expression Type Binding casted Expression Type cast Expression expression resolved Type this handle I Problem Unnecessary Cast new String new String casted Expression Type readable Name new String cast Expression resolved Type readable Name new String new String casted Expression Type short Readable Name new String cast Expression resolved Type short Readable Name cast Expression source Start cast Expression source End  unnecessaryCast CastExpression castExpression TypeBinding castedExpressionType castExpression resolvedType IProblem UnnecessaryCast castedExpressionType readableName castExpression resolvedType readableName castedExpressionType shortReadableName castExpression resolvedType shortReadableName castExpression sourceStart castExpression sourceEnd
public void unnecessary Cast For Argument Cast Expression cast Expression Type Binding parameter Type Type Binding casted Expression Type cast Expression expression resolved Type this handle I Problem Unnecessary Argument Cast new String new String casted Expression Type readable Name new String cast Expression resolved Type readable Name new String parameter Type readable Name new String new String casted Expression Type short Readable Name new String cast Expression resolved Type short Readable Name new String parameter Type short Readable Name cast Expression source Start cast Expression source End  unnecessaryCastForArgument CastExpression castExpression TypeBinding parameterType TypeBinding castedExpressionType castExpression resolvedType IProblem UnnecessaryArgumentCast castedExpressionType readableName castExpression resolvedType readableName parameterType readableName castedExpressionType shortReadableName castExpression resolvedType shortReadableName parameterType shortReadableName castExpression sourceStart castExpression sourceEnd
public void unnecessary Instanceof Instance Of Expression instanceof Expression Type Binding check Type Type Binding expression Type instanceof Expression expression resolved Type this handle I Problem Unnecessary Instanceof new String new String expression Type readable Name new String check Type readable Name new String new String expression Type short Readable Name new String check Type short Readable Name instanceof Expression source Start instanceof Expression source End  unnecessaryInstanceof InstanceOfExpression instanceofExpression TypeBinding checkType TypeBinding expressionType instanceofExpression resolvedType IProblem UnnecessaryInstanceof expressionType readableName checkType readableName expressionType shortReadableName checkType shortReadableName instanceofExpression sourceStart instanceofExpression sourceEnd
public void unqualified Field Access Name Reference reference Field Binding field int end reference source End if reference instanceof Qualified Name Reference Qualified Name Reference qref Qualified Name Reference reference end int qref source Positions 0 this handle I Problem Unqualified Field Access new String new String field declaring Class readable Name new String field name new String new String field declaring Class short Readable Name new String field name reference source Start end  unqualifiedFieldAccess NameReference FieldBinding sourceEnd QualifiedNameReference QualifiedNameReference QualifiedNameReference sourcePositions IProblem UnqualifiedFieldAccess declaringClass readableName declaringClass shortReadableName sourceStart
public void unnecessary Else AST Node location this handle I Problem Unnecessary Else No Argument No Argument location source Start location source End  unnecessaryElse ASTNode IProblem UnnecessaryElse NoArgument NoArgument sourceStart sourceEnd
public void unnecessary Enclosing Instance Specification Expression expression Reference Binding target Type this handle I Problem Illegal Enclosing Instance Specification new String new String target Type readable Name new String new String target Type short Readable Name expression source Start expression source End  unnecessaryEnclosingInstanceSpecification ReferenceBinding targetType IProblem IllegalEnclosingInstanceSpecification targetType readableName targetType shortReadableName sourceStart sourceEnd
public void unreachable Catch Block Reference Binding exception Type AST Node location this handle I Problem Unreachable Catch new String new String exception Type readable Name new String new String exception Type short Readable Name location source Start location source End  unreachableCatchBlock ReferenceBinding exceptionType ASTNode IProblem UnreachableCatch exceptionType readableName exceptionType shortReadableName sourceStart sourceEnd
public void unreachable Code Statement statement this handle I Problem Code Cannot Be Reached No Argument No Argument statement source Start statement source End  unreachableCode IProblem CodeCannotBeReached NoArgument NoArgument sourceStart sourceEnd
public void unresolvable Reference Name Reference name Ref Binding binding int severity Error also need to check that the searched Type is the receiver type if binding instanceof Problem Binding Problem Binding problem Problem Binding binding if problem search Type null problem search Type is Hierarchy Inconsistent severity Secondary Error String arguments new String new String binding readable Name int end name Ref source End if name Ref instanceof Qualified Name Reference Qualified Name Reference ref Qualified Name Reference name Ref if ref index Of First Field Binding 1 end int ref source Positions ref index Of First Field Binding 1 this handle I Problem Undefined Name arguments arguments severity name Ref source Start end  unresolvableReference NameReference nameRef searchedType ProblemBinding ProblemBinding ProblemBinding searchType searchType isHierarchyInconsistent SecondaryError readableName nameRef sourceEnd nameRef QualifiedNameReference QualifiedNameReference QualifiedNameReference nameRef indexOfFirstFieldBinding sourcePositions indexOfFirstFieldBinding IProblem UndefinedName nameRef sourceStart
public void unused Argument Local Declaration local Decl String arguments new String new String local Decl name this handle I Problem Argument Is Never Used arguments arguments local Decl source Start local Decl source End  unusedArgument LocalDeclaration localDecl localDecl IProblem ArgumentIsNeverUsed localDecl sourceStart localDecl sourceEnd
public void unused Declared Thrown Exception Reference Binding exception Type Abstract Method Declaration method AST Node location if method is Constructor this handle I Problem Unused Constructor Declared Thrown Exception new String new String method binding declaring Class readable Name parameters As String method binding new String exception Type readable Name new String new String method binding declaring Class short Readable Name parameters As Short String method binding new String exception Type short Readable Name location source Start location source End else this handle I Problem Unused Method Declared Thrown Exception new String new String method binding declaring Class readable Name new String method selector parameters As String method binding new String exception Type readable Name new String new String method binding declaring Class short Readable Name new String method selector parameters As Short String method binding new String exception Type short Readable Name location source Start location source End  unusedDeclaredThrownException ReferenceBinding exceptionType AbstractMethodDeclaration ASTNode isConstructor IProblem UnusedConstructorDeclaredThrownException declaringClass readableName parametersAsString exceptionType readableName declaringClass shortReadableName parametersAsShortString exceptionType shortReadableName sourceStart sourceEnd IProblem UnusedMethodDeclaredThrownException declaringClass readableName parametersAsString exceptionType readableName declaringClass shortReadableName parametersAsShortString exceptionType shortReadableName sourceStart sourceEnd
public void unused Import Import Reference import Ref String arguments new String Char Operation to String import Ref tokens this handle I Problem Unused Import arguments arguments import Ref source Start import Ref source End  unusedImport ImportReference importRef CharOperation toString importRef IProblem UnusedImport importRef sourceStart importRef sourceEnd
public void unused Local Variable Local Declaration local Decl String arguments new String new String local Decl name this handle I Problem Local Variable Is Never Used arguments arguments local Decl source Start local Decl source End  unusedLocalVariable LocalDeclaration localDecl localDecl IProblem LocalVariableIsNeverUsed localDecl sourceStart localDecl sourceEnd
public void unused Private Constructor Constructor Declaration constructor Decl if compute Severity I Problem Unused Private Constructor Ignore return no complaint for no arg constructors or default ones known pattern to block instantiation if constructor Decl arguments null constructor Decl arguments length 0 return Method Binding constructor constructor Decl binding this handle I Problem Unused Private Constructor new String new String constructor declaring Class readable Name parameters As String constructor new String new String constructor declaring Class short Readable Name parameters As Short String constructor constructor Decl source Start constructor Decl source End  unusedPrivateConstructor ConstructorDeclaration constructorDecl computeSeverity IProblem UnusedPrivateConstructor constructorDecl constructorDecl MethodBinding constructorDecl IProblem UnusedPrivateConstructor declaringClass readableName parametersAsString declaringClass shortReadableName parametersAsShortString constructorDecl sourceStart constructorDecl sourceEnd
public void unused Private Field Field Declaration field Decl if compute Severity I Problem Unused Private Field Ignore return Field Binding field field Decl binding if Char Operation equals Type Constants SERIALVERSIONUID field name field is Static field is Final Base Types Long Binding field type return do not report unused serial VersionUID field if Char Operation equals Type Constants SERIALPERSISTENTFIELDS field name field is Static field is Final field type dimensions 1 Char Operation equals Type Constants CharArray JAVA IO OBJECTSTREAMFIELD field type leaf Component Type readable Name return do not report unused serial Persistent Fields field this handle I Problem Unused Private Field new String new String field declaring Class readable Name new String field name new String new String field declaring Class short Readable Name new String field name field Decl source Start field Decl source End  unusedPrivateField FieldDeclaration fieldDecl computeSeverity IProblem UnusedPrivateField FieldBinding fieldDecl CharOperation TypeConstants isStatic isFinal BaseTypes LongBinding serialVersionUID CharOperation TypeConstants isStatic isFinal CharOperation TypeConstants CharArray_JAVA_IO_OBJECTSTREAMFIELD leafComponentType readableName serialPersistentFields IProblem UnusedPrivateField declaringClass readableName declaringClass shortReadableName fieldDecl sourceStart fieldDecl sourceEnd
public void unused Private Method Abstract Method Declaration method Decl if compute Severity I Problem Unused Private Method Ignore return Method Binding method method Decl binding no report for serialization support void read Object Object Input Stream if method is Static Base Types Void Binding method return Type method parameters length 1 method parameters 0 dimensions 0 Char Operation equals method selector Type Constants READOBJECT Char Operation equals Type Constants CharArray JAVA IO OBJECTINPUTSTREAM method parameters 0 readable Name return no report for serialization support void write Object Object Output Stream if method is Static Base Types Void Binding method return Type method parameters length 1 method parameters 0 dimensions 0 Char Operation equals method selector Type Constants WRITEOBJECT Char Operation equals Type Constants CharArray JAVA IO OBJECTOUTPUTSTREAM method parameters 0 readable Name return no report for serialization support Object read Resolve if method is Static Type Ids T Object method return Type id method parameters length 0 Char Operation equals method selector Type Constants READRESOLVE return no report for serialization support Object write Replace if method is Static Type Ids T Object method return Type id method parameters length 0 Char Operation equals method selector Type Constants WRITEREPLACE return this handle I Problem Unused Private Method new String new String method declaring Class readable Name new String method selector parameters As String method new String new String method declaring Class short Readable Name new String method selector parameters As Short String method method Decl source Start method Decl source End  unusedPrivateMethod AbstractMethodDeclaration methodDecl computeSeverity IProblem UnusedPrivateMethod MethodBinding methodDecl readObject ObjectInputStream isStatic BaseTypes VoidBinding returnType CharOperation TypeConstants CharOperation TypeConstants CharArray_JAVA_IO_OBJECTINPUTSTREAM readableName writeObject ObjectOutputStream isStatic BaseTypes VoidBinding returnType CharOperation TypeConstants CharOperation TypeConstants CharArray_JAVA_IO_OBJECTOUTPUTSTREAM readableName readResolve isStatic TypeIds T_Object returnType CharOperation TypeConstants writeReplace isStatic TypeIds T_Object returnType CharOperation TypeConstants IProblem UnusedPrivateMethod declaringClass readableName parametersAsString declaringClass shortReadableName parametersAsShortString methodDecl sourceStart methodDecl sourceEnd
public void unused Private Type Type Declaration type Decl if compute Severity I Problem Unused Private Type Ignore return Reference Binding type type Decl binding this handle I Problem Unused Private Type new String new String type readable Name new String new String type short Readable Name type Decl source Start type Decl source End  unusedPrivateType TypeDeclaration typeDecl computeSeverity IProblem UnusedPrivateType ReferenceBinding typeDecl IProblem UnusedPrivateType readableName shortReadableName typeDecl sourceStart typeDecl sourceEnd
public void use Assert As An Identifier int source Start int source End this handle I Problem Use Assert As An Identifier No Argument No Argument source Start source End  useAssertAsAnIdentifier sourceStart sourceEnd IProblem UseAssertAsAnIdentifier NoArgument NoArgument sourceStart sourceEnd
public void variable Type Cannot Be Void Abstract Variable Declaration var Decl String arguments new String new String var Decl name this handle I Problem Variable Type Cannot Be Void arguments arguments var Decl source Start var Decl source End  variableTypeCannotBeVoid AbstractVariableDeclaration varDecl varDecl IProblem VariableTypeCannotBeVoid varDecl sourceStart varDecl sourceEnd
public void variable Type Cannot Be Void Array Abstract Variable Declaration var Decl String arguments new String new String var Decl name this handle I Problem Variable Type Cannot Be Void Array arguments arguments var Decl source Start var Decl source End  variableTypeCannotBeVoidArray AbstractVariableDeclaration varDecl varDecl IProblem VariableTypeCannotBeVoidArray varDecl sourceStart varDecl sourceEnd
public void visibility Conflict Method Binding current Method Method Binding inherited Method this handle Cannot reduce the visibility of the inherited method from 1 8 4 6 3 The access modifier of an hiding method must provide at least as much access as the hidden method 8 4 6 3 The access modifier of an overiding method must provide at least as much access as the overriden method I Problem Method Reduces Visibility new String new String inherited Method declaring Class readable Name new String new String inherited Method declaring Class short Readable Name current Method source Start current Method source End  visibilityConflict MethodBinding currentMethod MethodBinding inheritedMethod IProblem MethodReducesVisibility inheritedMethod declaringClass readableName inheritedMethod declaringClass shortReadableName currentMethod sourceStart currentMethod sourceEnd
public void non Externalized String Literal AST Node location this handle I Problem Non Externalized String Literal No Argument No Argument location source Start location source End  nonExternalizedStringLiteral ASTNode IProblem NonExternalizedStringLiteral NoArgument NoArgument sourceStart sourceEnd
public void no More Available Space For Constant Type Declaration type Declaration this handle I Problem Too Many Bytes For String Constant new String new String type Declaration binding readable Name new String new String type Declaration binding short Readable Name Abort Error type Declaration source Start type Declaration source End  noMoreAvailableSpaceForConstant TypeDeclaration typeDeclaration IProblem TooManyBytesForStringConstant typeDeclaration readableName typeDeclaration shortReadableName typeDeclaration sourceStart typeDeclaration sourceEnd
public void no More Available Space In Constant Pool Type Declaration type Declaration this handle I Problem Too Many Constants In Constant Pool new String new String type Declaration binding readable Name new String new String type Declaration binding short Readable Name Abort Error type Declaration source Start type Declaration source End  noMoreAvailableSpaceInConstantPool TypeDeclaration typeDeclaration IProblem TooManyConstantsInConstantPool typeDeclaration readableName typeDeclaration shortReadableName typeDeclaration sourceStart typeDeclaration sourceEnd
private boolean is Keyword int token switch token case Terminal Tokens Token Nameabstract case Terminal Tokens Token Nameassert case Terminal Tokens Token Namebyte case Terminal Tokens Token Namebreak case Terminal Tokens Token Nameboolean case Terminal Tokens Token Namecase case Terminal Tokens Token Namechar case Terminal Tokens Token Namecatch case Terminal Tokens Token Nameclass case Terminal Tokens Token Namecontinue case Terminal Tokens Token Namedo case Terminal Tokens Token Namedouble case Terminal Tokens Token Namedefault case Terminal Tokens Token Nameelse case Terminal Tokens Token Nameextends case Terminal Tokens Token Namefor case Terminal Tokens Token Namefinal case Terminal Tokens Token Namefloat case Terminal Tokens Token Namefalse case Terminal Tokens Token Namefinally case Terminal Tokens Token Nameif case Terminal Tokens Token Nameint case Terminal Tokens Token Nameimport case Terminal Tokens Token Nameinterface case Terminal Tokens Token Nameimplements case Terminal Tokens Token Nameinstanceof case Terminal Tokens Token Namelong case Terminal Tokens Token Namenew case Terminal Tokens Token Namenull case Terminal Tokens Token Namenative case Terminal Tokens Token Namepublic case Terminal Tokens Token Namepackage case Terminal Tokens Token Nameprivate case Terminal Tokens Token Nameprotected case Terminal Tokens Token Namereturn case Terminal Tokens Token Nameshort case Terminal Tokens Token Namesuper case Terminal Tokens Token Namestatic case Terminal Tokens Token Nameswitch case Terminal Tokens Token Namestrictfp case Terminal Tokens Token Namesynchronized case Terminal Tokens Token Nametry case Terminal Tokens Token Namethis case Terminal Tokens Token Nametrue case Terminal Tokens Token Namethrow case Terminal Tokens Token Namethrows case Terminal Tokens Token Nametransient case Terminal Tokens Token Namevoid case Terminal Tokens Token Namevolatile case Terminal Tokens Token Namewhile return true default return false  isKeyword TerminalTokens TokenNameabstract TerminalTokens TokenNameassert TerminalTokens TokenNamebyte TerminalTokens TokenNamebreak TerminalTokens TokenNameboolean TerminalTokens TokenNamecase TerminalTokens TokenNamechar TerminalTokens TokenNamecatch TerminalTokens TokenNameclass TerminalTokens TokenNamecontinue TerminalTokens TokenNamedo TerminalTokens TokenNamedouble TerminalTokens TokenNamedefault TerminalTokens TokenNameelse TerminalTokens TokenNameextends TerminalTokens TokenNamefor TerminalTokens TokenNamefinal TerminalTokens TokenNamefloat TerminalTokens TokenNamefalse TerminalTokens TokenNamefinally TerminalTokens TokenNameif TerminalTokens TokenNameint TerminalTokens TokenNameimport TerminalTokens TokenNameinterface TerminalTokens TokenNameimplements TerminalTokens TokenNameinstanceof TerminalTokens TokenNamelong TerminalTokens TokenNamenew TerminalTokens TokenNamenull TerminalTokens TokenNamenative TerminalTokens TokenNamepublic TerminalTokens TokenNamepackage TerminalTokens TokenNameprivate TerminalTokens TokenNameprotected TerminalTokens TokenNamereturn TerminalTokens TokenNameshort TerminalTokens TokenNamesuper TerminalTokens TokenNamestatic TerminalTokens TokenNameswitch TerminalTokens TokenNamestrictfp TerminalTokens TokenNamesynchronized TerminalTokens TokenNametry TerminalTokens TokenNamethis TerminalTokens TokenNametrue TerminalTokens TokenNamethrow TerminalTokens TokenNamethrows TerminalTokens TokenNametransient TerminalTokens TokenNamevoid TerminalTokens TokenNamevolatile TerminalTokens TokenNamewhile
private boolean is Literal int token switch token case Terminal Tokens Token Name Integer Literal case Terminal Tokens Token Name Long Literal case Terminal Tokens Token Name Floating Point Literal case Terminal Tokens Token Name Double Literal case Terminal Tokens Token Name String Literal case Terminal Tokens Token Name Character Literal return true default return false  isLiteral TerminalTokens TokenNameIntegerLiteral TerminalTokens TokenNameLongLiteral TerminalTokens TokenNameFloatingPointLiteral TerminalTokens TokenNameDoubleLiteral TerminalTokens TokenNameStringLiteral TerminalTokens TokenNameCharacterLiteral
private boolean is Identifier int token return token Terminal Tokens Token Name Identifier  isIdentifier TerminalTokens TokenNameIdentifier
private void syntax Error int id int start Position int end Position int current Kind char current Token Source String error Token Name String expected Token String e Token Name if is Keyword current Kind is Literal current Kind is Identifier current Kind NON NLS 1 e Token Name new String current Token Source else e Token Name error Token Name String arguments if expected Token null arguments new String e Token Name expected Token else arguments new String e Token Name this handle id arguments arguments start Position end Position  syntaxError startPosition endPosition currentKind currentTokenSource errorTokenName expectedToken eTokenName isKeyword currentKind isLiteral currentKind isIdentifier currentKind eTokenName currentTokenSource eTokenName errorTokenName expectedToken eTokenName expectedToken eTokenName startPosition endPosition
public void parse Error Insert Before Token int start int end int current Kind char error Token Source String error Token Name String expected Token this syntax Error I Problem Parsing Error Insert Token Before start end current Kind error Token Source error Token Name expected Token  parseErrorInsertBeforeToken currentKind errorTokenSource errorTokenName expectedToken syntaxError IProblem ParsingErrorInsertTokenBefore currentKind errorTokenSource errorTokenName expectedToken
public void parse Error Insert After Token int start int end int current Kind char error Token Source String error Token Name String expected Token this syntax Error I Problem Parsing Error Insert Token After start end current Kind error Token Source error Token Name expected Token  parseErrorInsertAfterToken currentKind errorTokenSource errorTokenName expectedToken syntaxError IProblem ParsingErrorInsertTokenAfter currentKind errorTokenSource errorTokenName expectedToken
public void parse Error Delete Token int start int end int current Kind char error Token Source String error Token Name this syntax Error I Problem Parsing Error Delete Token start end current Kind error Token Source error Token Name null  parseErrorDeleteToken currentKind errorTokenSource errorTokenName syntaxError IProblem ParsingErrorDeleteToken currentKind errorTokenSource errorTokenName
public void parse Error Replace Token int start int end int current Kind char error Token Source String error Token Name String expected Token this syntax Error I Problem Parsing Error start end current Kind error Token Source error Token Name expected Token  parseErrorReplaceToken currentKind errorTokenSource errorTokenName expectedToken syntaxError IProblem ParsingError currentKind errorTokenSource errorTokenName expectedToken
public void parse Error Invalid Token int start int end int current Kind char error Token Source String error Token Name String expected Token this syntax Error I Problem Parsing Error Invalid Token start end current Kind error Token Source error Token Name expected Token  parseErrorInvalidToken currentKind errorTokenSource errorTokenName expectedToken syntaxError IProblem ParsingErrorInvalidToken currentKind errorTokenSource errorTokenName expectedToken
public void parse Error Unexpected End int start int end String arguments if this reference Context instanceof Constructor Declaration arguments new String Util bind parser end Of Constructor NON NLS 1 else if this reference Context instanceof Method Declaration arguments new String Util bind parser end Of Method NON NLS 1 else if this reference Context instanceof Type Declaration arguments new String Util bind parser end Of Initializer NON NLS 1 else arguments new String Util bind parser end Of File NON NLS 1 this handle I Problem Parsing Error UnexpectedEOF arguments arguments start end  parseErrorUnexpectedEnd referenceContext ConstructorDeclaration endOfConstructor referenceContext MethodDeclaration endOfMethod referenceContext TypeDeclaration endOfInitializer endOfFile IProblem ParsingErrorUnexpectedEOF
public void parse Error Merge Tokens int start int end String expected Token String arguments new String expected Token this handle I Problem Parsing Error Merge Tokens arguments arguments start end  parseErrorMergeTokens expectedToken expectedToken IProblem ParsingErrorMergeTokens
public void parse Error Misplaced Construct int start int end this handle I Problem Parsing Error Misplaced Construct No Argument No Argument start end  parseErrorMisplacedConstruct IProblem ParsingErrorMisplacedConstruct NoArgument NoArgument
public void parse Error No Suggestion int start int end int current Kind char error Token Source String error Token Name this syntax Error I Problem Parsing Error No Suggestion start end current Kind error Token Source error Token Name null  parseErrorNoSuggestion currentKind errorTokenSource errorTokenName syntaxError IProblem ParsingErrorNoSuggestion currentKind errorTokenSource errorTokenName
public void parse Error Delete Tokens int start int end this handle I Problem Parsing Error Delete Tokens No Argument No Argument start end  parseErrorDeleteTokens IProblem ParsingErrorDeleteTokens NoArgument NoArgument
public void parse Error No Suggestion For Tokens int start int end this handle I Problem Parsing Error No Suggestion For Tokens No Argument No Argument start end  parseErrorNoSuggestionForTokens IProblem ParsingErrorNoSuggestionForTokens NoArgument NoArgument
public void parse Error Replace Tokens int start int end String expected Token String arguments new String expected Token this handle I Problem Parsing Error Replace Tokens arguments arguments start end  parseErrorReplaceTokens expectedToken expectedToken IProblem ParsingErrorReplaceTokens
public void parse Error Insert To Complete int start int end String inserted String completed String arguments new String inserted completed this handle I Problem Parsing Error Insert To Complete arguments arguments start end  parseErrorInsertToComplete IProblem ParsingErrorInsertToComplete
public void parse Error Insert To Complete Scope int start int end String inserted String arguments new String inserted this handle I Problem Parsing Error Insert To Complete Scope arguments arguments start end  parseErrorInsertToCompleteScope IProblem ParsingErrorInsertToCompleteScope
public void parse Error Insert To Complete Phrase int start int end String inserted String arguments new String inserted this handle I Problem Parsing Error Insert To Complete Phrase arguments arguments start end  parseErrorInsertToCompletePhrase IProblem ParsingErrorInsertToCompletePhrase
public void wrong Sequence Of Exception Types Error Try Statement statement Type Binding exception Type int under Type Binding hiding Exception Type the two catch block under and upper are in an incorrect order under should be define BEFORE upper in the source Type Reference type Ref statement catch Arguments under type this handle I Problem Invalid Catch Block Sequence new String new String exception Type readable Name new String hiding Exception Type readable Name new String new String exception Type short Readable Name new String hiding Exception Type short Readable Name type Ref source Start type Ref source End  wrongSequenceOfExceptionTypesError TryStatement TypeBinding exceptionType TypeBinding hidingExceptionType TypeReference typeRef catchArguments IProblem InvalidCatchBlockSequence exceptionType readableName hidingExceptionType readableName exceptionType shortReadableName hidingExceptionType shortReadableName typeRef sourceStart typeRef sourceEnd

public class Should Not Implement extends Runtime Exception public Should Not Implement String message super message  ShouldNotImplement RuntimeException ShouldNotImplement

public class Local Declaration Visitor extends AST Visitor public boolean visit Type Declaration type Declaration Block Scope scope notify Source Element Requestor type Declaration source Type null return false don t visit members as this was done during notify Source Element Requestor  LocalDeclarationVisitor ASTVisitor TypeDeclaration typeDeclaration BlockScope notifySourceElementRequestor typeDeclaration sourceType notifySourceElementRequestor
return false don t visit members as this was done during notify Source Element Requestor public boolean visit Type Declaration type Declaration Class Scope scope notify Source Element Requestor type Declaration source Type null return false don t visit members as this was done during notify Source Element Requestor  notifySourceElementRequestor TypeDeclaration typeDeclaration ClassScope notifySourceElementRequestor typeDeclaration sourceType notifySourceElementRequestor
public Source Element Parser final I Source Element Requestor requestor I Problem Factory problem Factory Compiler Options options we want to notify all syntax error with the accept Problem API To do so we define the record method of the Problem Reporter super new Problem Reporter Default Error Handling Policies exit After All Problems options problem Factory public void record I Problem problem Compilation Result unit Result Reference Context context unit Result record problem context TODO jerome clients are trapping problems either through factory or requestor is result storing needed requestor accept Problem problem true this requestor requestor type Names new char 4 super Type Names new char 4 nested Type Index 0 this options options  SourceElementParser ISourceElementRequestor IProblemFactory problemFactory CompilerOptions acceptProblem ProblemReporter ProblemReporter DefaultErrorHandlingPolicies exitAfterAllProblems problemFactory IProblem CompilationResult unitResult ReferenceContext unitResult acceptProblem typeNames superTypeNames nestedTypeIndex
public Source Element Parser final I Source Element Requestor requestor I Problem Factory problem Factory Compiler Options options boolean report Local Declarations this requestor problem Factory options if report Local Declarations this local Declaration Visitor new Local Declaration Visitor  SourceElementParser ISourceElementRequestor IProblemFactory problemFactory CompilerOptions reportLocalDeclarations problemFactory reportLocalDeclarations localDeclarationVisitor LocalDeclarationVisitor
public void check Comment if this current Element null this scanner comment Ptr 0 flush Comments Defined Prior To this end Statement Position discard obsolete comments during recovery int last Comment this scanner comment Ptr if this modifiers Source Start 0 eliminate comments located after modifier Source Start if positionned while last Comment 0 Math abs this scanner comment Starts last Comment this modifiers Source Start last Comment if last Comment 0 consider all remaining leading comments to be part of current declaration this modifiers Source Start Math abs this scanner comment Starts 0 check deprecation in last comment if javadoc can be followed by non javadoc comments which are simply ignored while last Comment 0 this scanner comment Stops last Comment 0 last Comment non javadoc comment have negative end positions if last Comment 0 this javadoc Parser null if this javadoc Parser check Deprecation this scanner comment Starts last Comment this scanner comment Stops last Comment 1 stop is one over check And Set Modifiers Acc Deprecated this javadoc this javadoc Parser doc Comment null if check javadoc is not activated if this report Reference Info this javadoc Parser check Doc Comment this javadoc null Report reference info in javadoc comment throws exception tags Type Reference thrown Exceptions this javadoc thrown Exceptions int throws Tags Nbre thrown Exceptions null 0 thrown Exceptions length for int i 0 i throws Tags Nbre i Type Reference type Ref thrown Exceptions i if type Ref instanceof Javadoc Single Type Reference Javadoc Single Type Reference single Ref Javadoc Single Type Reference type Ref this requestor accept Type Reference single Ref token single Ref source Start else if type Ref instanceof Javadoc Qualified Type Reference Javadoc Qualified Type Reference qualified Ref Javadoc Qualified Type Reference type Ref this requestor accept Type Reference qualified Ref tokens qualified Ref source Start qualified Ref source End Report reference info in javadoc comment see tags Expression references this javadoc references int see Tags Nbre references null 0 references length for int i 0 i see Tags Nbre i Expression reference references i accept Javadoc Type Reference reference if reference instanceof Javadoc Field Reference Javadoc Field Reference field Ref Javadoc Field Reference reference this requestor accept Field Reference field Ref token field Ref source Start if field Ref receiver null field Ref receiver is This accept Javadoc Type Reference field Ref receiver else if reference instanceof Javadoc Message Send Javadoc Message Send message Send Javadoc Message Send reference int arg Count message Send arguments null 0 message Send arguments length this requestor accept Method Reference message Send selector arg Count message Send source Start if message Send receiver null message Send receiver is This accept Javadoc Type Reference message Send receiver else if reference instanceof Javadoc Allocation Expression Javadoc Allocation Expression constructor Javadoc Allocation Expression reference int arg Count constructor arguments null 0 constructor arguments length if constructor type null char compound Name constructor type get Type Name this requestor accept Constructor Reference compound Name compound Name length 1 arg Count constructor source Start if constructor type is This accept Javadoc Type Reference constructor type  checkComment currentElement commentPtr flushCommentsDefinedPriorTo endStatementPosition lastComment commentPtr modifiersSourceStart modifierSourceStart lastComment commentStarts lastComment modifiersSourceStart lastComment lastComment modifiersSourceStart commentStarts lastComment commentStops lastComment lastComment lastComment javadocParser javadocParser checkDeprecation commentStarts lastComment commentStops lastComment checkAndSetModifiers AccDeprecated javadocParser docComment reportReferenceInfo javadocParser checkDocComment TypeReference thrownExceptions thrownExceptions throwsTagsNbre thrownExceptions thrownExceptions throwsTagsNbre TypeReference typeRef thrownExceptions typeRef JavadocSingleTypeReference JavadocSingleTypeReference singleRef JavadocSingleTypeReference typeRef acceptTypeReference singleRef singleRef sourceStart typeRef JavadocQualifiedTypeReference JavadocQualifiedTypeReference qualifiedRef JavadocQualifiedTypeReference typeRef acceptTypeReference qualifiedRef qualifiedRef sourceStart qualifiedRef sourceEnd seeTagsNbre seeTagsNbre acceptJavadocTypeReference JavadocFieldReference JavadocFieldReference fieldRef JavadocFieldReference acceptFieldReference fieldRef fieldRef sourceStart fieldRef fieldRef isThis acceptJavadocTypeReference fieldRef JavadocMessageSend JavadocMessageSend messageSend JavadocMessageSend argCount messageSend messageSend acceptMethodReference messageSend argCount messageSend sourceStart messageSend messageSend isThis acceptJavadocTypeReference messageSend JavadocAllocationExpression JavadocAllocationExpression JavadocAllocationExpression argCount compoundName getTypeName acceptConstructorReference compoundName compoundName argCount sourceStart isThis acceptJavadocTypeReference
private void accept Javadoc Type Reference Expression expression if expression instanceof Javadoc Single Type Reference Javadoc Single Type Reference single Ref Javadoc Single Type Reference expression this requestor accept Type Reference single Ref token single Ref source Start else if expression instanceof Javadoc Qualified Type Reference Javadoc Qualified Type Reference qualified Ref Javadoc Qualified Type Reference expression this requestor accept Type Reference qualified Ref tokens qualified Ref source Start qualified Ref source End  acceptJavadocTypeReference JavadocSingleTypeReference JavadocSingleTypeReference singleRef JavadocSingleTypeReference acceptTypeReference singleRef singleRef sourceStart JavadocQualifiedTypeReference JavadocQualifiedTypeReference qualifiedRef JavadocQualifiedTypeReference acceptTypeReference qualifiedRef qualifiedRef sourceStart qualifiedRef sourceEnd
protected void class Instance Creation boolean always Qualified boolean previous Flag report Reference Info report Reference Info false not to see the type reference reported in super call to get Type Reference super class Instance Creation always Qualified report Reference Info previous Flag if report Reference Info Allocation Expression alloc Allocation Expression expression Stack expression Ptr Type Reference type Ref alloc type requestor accept Constructor Reference type Ref instanceof Single Type Reference Single Type Reference type Ref token Char Operation concat With alloc type get Type Name alloc arguments null 0 alloc arguments length alloc source Start  classInstanceCreation alwaysQualified previousFlag reportReferenceInfo reportReferenceInfo getTypeReference classInstanceCreation alwaysQualified reportReferenceInfo previousFlag reportReferenceInfo AllocationExpression AllocationExpression expressionStack expressionPtr TypeReference typeRef acceptConstructorReference typeRef SingleTypeReference SingleTypeReference typeRef CharOperation concatWith getTypeName sourceStart
protected void consume Constructor Header Name Constructor Header Name Modifiersopt Identifier recovering might be an empty message send if current Element null if last Ignored Token Token Namenew was an allocation expression last Check Point scanner start Position force to restart at this exact position restart Recovery true return Source Constructor Declaration cd new Source Constructor Declaration this compilation Unit compilation Result name this is not really revelant but we do cd selector identifier Stack identifier Ptr long selector Source Positions identifier Position Stack identifier Ptr identifier Length Ptr modifiers cd declaration Source Start int Stack int Ptr cd modifiers int Stack int Ptr javadoc cd javadoc this javadoc this javadoc null highlight starts at the selector starts cd source Start int selector Source Positions 32 cd selector Source End int selector Source Positions push On Ast Stack cd cd source End l Paren Pos cd body Start l Paren Pos 1 list Length 0 initialize list Length before reading parameters throws recovery if current Element null last Check Point cd body Start if current Element instanceof Recovered Type last Ignored Token Token NameDOT cd modifiers 0 current Element current Element add cd 0 last Ignored Token 1  consumeConstructorHeaderName ConstructorHeaderName currentElement lastIgnoredToken TokenNamenew lastCheckPoint startPosition restartRecovery SourceConstructorDeclaration SourceConstructorDeclaration compilationUnit compilationResult identifierStack identifierPtr selectorSourcePositions identifierPositionStack identifierPtr identifierLengthPtr declarationSourceStart intStack intPtr intStack intPtr sourceStart selectorSourcePositions selectorSourceEnd selectorSourcePositions pushOnAstStack sourceEnd lParenPos bodyStart lParenPos listLength listLength currentElement lastCheckPoint bodyStart currentElement RecoveredType lastIgnoredToken TokenNameDOT currentElement currentElement lastIgnoredToken
protected void consume Exit Variable With Initialization Exit Variable With Initialization empty the scanner is located after the comma or the semi colon we want to include the comma or the semi colon super consume Exit Variable With Initialization if current Token Token NameCOMMA current Token Token NameSEMICOLON ast Stack ast Ptr instanceof Source Field Declaration Source Field Declaration ast Stack ast Ptr field End Position scanner current Position 1  consumeExitVariableWithInitialization ExitVariableWithInitialization consumeExitVariableWithInitialization currentToken TokenNameCOMMA currentToken TokenNameSEMICOLON astStack astPtr SourceFieldDeclaration SourceFieldDeclaration astStack astPtr fieldEndPosition currentPosition
protected void consume Exit Variable Without Initialization Exit Variable Without Initialization empty do nothing by default super consume Exit Variable Without Initialization if current Token Token NameCOMMA current Token Token NameSEMICOLON ast Stack ast Ptr instanceof Source Field Declaration Source Field Declaration ast Stack ast Ptr field End Position scanner current Position 1  consumeExitVariableWithoutInitialization ExitVariableWithoutInitialization consumeExitVariableWithoutInitialization currentToken TokenNameCOMMA currentToken TokenNameSEMICOLON astStack astPtr SourceFieldDeclaration SourceFieldDeclaration astStack astPtr fieldEndPosition currentPosition
protected void consume Field Access boolean is Super Access Field Access Primary Identifier Field Access super Identifier super consume Field Access is Super Access Field Reference fr Field Reference expression Stack expression Ptr if report Reference Info requestor accept Field Reference fr token fr source Start  consumeFieldAccess isSuperAccess FieldAccess FieldAccess consumeFieldAccess isSuperAccess FieldReference FieldReference expressionStack expressionPtr reportReferenceInfo acceptFieldReference sourceStart
protected void consume Method Header Name Method Header Name Modifiersopt Type Identifier Source Method Declaration md new Source Method Declaration this compilation Unit compilation Result name md selector identifier Stack identifier Ptr long selector Source Positions identifier Position Stack identifier Ptr identifier Length Ptr type md return Type get Type Reference int Stack int Ptr modifiers md declaration Source Start int Stack int Ptr md modifiers int Stack int Ptr javadoc md javadoc this javadoc this javadoc null highlight starts at selector start md source Start int selector Source Positions 32 md selector Source End int selector Source Positions push On Ast Stack md md source End l Paren Pos md body Start l Paren Pos 1 list Length 0 initialize list Length before reading parameters throws recovery if current Element null if current Element instanceof Recovered Type md modifiers 0 scanner get Line Number md return Type source Start scanner get Line Number md source Start last Check Point md body Start current Element current Element add md 0 last Ignored Token 1 else last Check Point md source Start restart Recovery true  consumeMethodHeaderName MethodHeaderName SourceMethodDeclaration SourceMethodDeclaration compilationUnit compilationResult identifierStack identifierPtr selectorSourcePositions identifierPositionStack identifierPtr identifierLengthPtr returnType getTypeReference intStack intPtr declarationSourceStart intStack intPtr intStack intPtr sourceStart selectorSourcePositions selectorSourceEnd selectorSourcePositions pushOnAstStack sourceEnd lParenPos bodyStart lParenPos listLength listLength currentElement currentElement RecoveredType getLineNumber returnType sourceStart getLineNumber sourceStart lastCheckPoint bodyStart currentElement currentElement lastIgnoredToken lastCheckPoint sourceStart restartRecovery
protected void consume Method Invocation Name Method Invocation Name Argument Listopt when the name is only an identifier we have a message send to this implicit super consume Method Invocation Name Message Send message Send Message Send expression Stack expression Ptr Expression args message Send arguments if report Reference Info requestor accept Method Reference message Send selector args null 0 args length int message Send name Source Position 32  consumeMethodInvocationName MethodInvocation ArgumentListopt consumeMethodInvocationName MessageSend messageSend MessageSend expressionStack expressionPtr messageSend reportReferenceInfo acceptMethodReference messageSend messageSend nameSourcePosition
protected void consume Method Invocation Primary super consume Method Invocation Primary Message Send message Send Message Send expression Stack expression Ptr Expression args message Send arguments if report Reference Info requestor accept Method Reference message Send selector args null 0 args length int message Send name Source Position 32  consumeMethodInvocationPrimary consumeMethodInvocationPrimary MessageSend messageSend MessageSend expressionStack expressionPtr messageSend reportReferenceInfo acceptMethodReference messageSend messageSend nameSourcePosition
protected void consume Method Invocation Super Method Invocation super Identifier Argument Listopt super consume Method Invocation Super Message Send message Send Message Send expression Stack expression Ptr Expression args message Send arguments if report Reference Info requestor accept Method Reference message Send selector args null 0 args length int message Send name Source Position 32  consumeMethodInvocationSuper MethodInvocation ArgumentListopt consumeMethodInvocationSuper MessageSend messageSend MessageSend expressionStack expressionPtr messageSend reportReferenceInfo acceptMethodReference messageSend messageSend nameSourcePosition
protected void consume Single Type Import Declaration Name Single Type Import Declaration Name import Name push an Import Ref build from the last name stored in the identifier stack super consume Single Type Import Declaration Name Import Reference impt Import Reference ast Stack ast Ptr if report Reference Info requestor accept Type Reference impt tokens impt source Start impt source End  consumeSingleTypeImportDeclarationName SingleTypeImportDeclarationName ImportRef consumeSingleTypeImportDeclarationName ImportReference ImportReference astStack astPtr reportReferenceInfo acceptTypeReference sourceStart sourceEnd
protected void consume Type Import On Demand Declaration Name Type Import On Demand Declaration Name import Name push an Import Ref build from the last name stored in the identifier stack super consume Type Import On Demand Declaration Name Import Reference impt Import Reference ast Stack ast Ptr if report Reference Info requestor accept Unknown Reference impt tokens impt source Start impt source End  consumeTypeImportOnDemandDeclarationName TypeImportOnDemandDeclarationName ImportRef consumeTypeImportOnDemandDeclarationName ImportReference ImportReference astStack astPtr reportReferenceInfo acceptUnknownReference sourceStart sourceEnd
public Method Declaration convert To Method Declaration Constructor Declaration c Compilation Result compilation Result Source Method Declaration m new Source Method Declaration compilation Result m source Start c source Start m source End c source End m body Start c body Start m body End c body End m declaration Source End c declaration Source End m declaration Source Start c declaration Source Start m selector c selector m statements c statements m modifiers c modifiers m arguments c arguments m thrown Exceptions c thrown Exceptions m explicit Declarations c explicit Declarations m return Type null if c instanceof Source Constructor Declaration m selector Source End Source Constructor Declaration c selector Source End return m  MethodDeclaration convertToMethodDeclaration ConstructorDeclaration CompilationResult compilationResult SourceMethodDeclaration SourceMethodDeclaration compilationResult sourceStart sourceStart sourceEnd sourceEnd bodyStart bodyStart bodyEnd bodyEnd declarationSourceEnd declarationSourceEnd declarationSourceStart declarationSourceStart thrownExceptions thrownExceptions explicitDeclarations explicitDeclarations returnType SourceConstructorDeclaration selectorSourceEnd SourceConstructorDeclaration selectorSourceEnd
return m protected Field Declaration create Field Declaration char field Name int source Start int source End return new Source Field Declaration field Name source Start source End  FieldDeclaration createFieldDeclaration fieldName sourceStart sourceEnd SourceFieldDeclaration fieldName sourceStart sourceEnd
protected Compilation Unit Declaration end Parse int act if source Type null if source Type is Interface consume Interface Declaration else consume Class Declaration if compilation Unit null Compilation Unit Declaration result super end Parse act return result else return null  CompilationUnitDeclaration endParse sourceType sourceType isInterface consumeInterfaceDeclaration consumeClassDeclaration compilationUnit CompilationUnitDeclaration endParse
public Type Reference get Type Reference int dim build a Reference on a variable that may be qualified or not This variable is a type reference and dim will be its dimensions int length if length identifier Length Stack identifier Length Ptr 1 single variable reference if dim 0 Single Type Reference ref new Single Type Reference identifier Stack identifier Ptr identifier Position Stack identifier Ptr if report Reference Info requestor accept Type Reference ref token ref source Start return ref else Array Type Reference ref new Array Type Reference identifier Stack identifier Ptr dim identifier Position Stack identifier Ptr ref source End end Position if report Reference Info requestor accept Type Reference ref token ref source Start return ref else if length 0 flag for precompiled type reference on base types Type Reference ref Type Reference base Type Reference length dim ref source Start int Stack int Ptr if dim 0 ref source End int Stack int Ptr else int Ptr no need to use this position as it is an array ref source End end Position if report Reference Info requestor accept Type Reference ref get Type Name ref source Start ref source End return ref else Qualified variable reference char tokens new char length identifier Ptr length long positions new long length System arraycopy identifier Stack identifier Ptr 1 tokens 0 length System arraycopy identifier Position Stack identifier Ptr 1 positions 0 length if dim 0 Qualified Type Reference ref new Qualified Type Reference tokens positions if report Reference Info requestor accept Type Reference ref tokens ref source Start ref source End return ref else Array Qualified Type Reference ref new Array Qualified Type Reference tokens dim positions ref source End end Position if report Reference Info requestor accept Type Reference ref tokens ref source Start ref source End return ref  TypeReference getTypeReference identifierLengthStack identifierLengthPtr SingleTypeReference SingleTypeReference identifierStack identifierPtr identifierPositionStack identifierPtr reportReferenceInfo acceptTypeReference sourceStart ArrayTypeReference ArrayTypeReference identifierStack identifierPtr identifierPositionStack identifierPtr sourceEnd endPosition reportReferenceInfo acceptTypeReference sourceStart TypeReference TypeReference baseTypeReference sourceStart intStack intPtr sourceEnd intStack intPtr intPtr sourceEnd endPosition reportReferenceInfo acceptTypeReference getTypeName sourceStart sourceEnd identifierPtr identifierStack identifierPtr identifierPositionStack identifierPtr QualifiedTypeReference QualifiedTypeReference reportReferenceInfo acceptTypeReference sourceStart sourceEnd ArrayQualifiedTypeReference ArrayQualifiedTypeReference sourceEnd endPosition reportReferenceInfo acceptTypeReference sourceStart sourceEnd
public Name Reference get Unspecified Reference build a unspecified Name Reference which may be qualified int length if length identifier Length Stack identifier Length Ptr 1 single variable reference Single Name Reference ref new Single Name Reference identifier Stack identifier Ptr identifier Position Stack identifier Ptr if report Reference Info this add Unknown Ref ref return ref else Qualified variable reference char tokens new char length identifier Ptr length System arraycopy identifier Stack identifier Ptr 1 tokens 0 length long positions new long length System arraycopy identifier Position Stack identifier Ptr 1 positions 0 length Qualified Name Reference ref new Qualified Name Reference tokens positions int identifier Position Stack identifier Ptr 1 32 source Start int identifier Position Stack identifier Ptr length source End if report Reference Info this add Unknown Ref ref return ref  NameReference getUnspecifiedReference NameReference identifierLengthStack identifierLengthPtr SingleNameReference SingleNameReference identifierStack identifierPtr identifierPositionStack identifierPtr reportReferenceInfo addUnknownRef identifierPtr identifierStack identifierPtr identifierPositionStack identifierPtr QualifiedNameReference QualifiedNameReference identifierPositionStack identifierPtr sourceStart identifierPositionStack identifierPtr sourceEnd reportReferenceInfo addUnknownRef
public Name Reference get Unspecified Reference Optimized build a unspecified Name Reference which may be qualified The optimization occurs for qualified reference while we are certain in this case the last item of the qualified name is a field access This optimization is IMPORTANT while it results that when a Name Reference is build the type checker should always look for that it is not a type reference int length if length identifier Length Stack identifier Length Ptr 1 single variable reference Single Name Reference ref new Single Name Reference identifier Stack identifier Ptr identifier Position Stack identifier Ptr ref bits AST Node Restrictive FlagMASK ref bits LOCAL FIELD if report Reference Info this add Unknown Ref ref return ref Qualified variable reference In fact it is variable reference DOT field ref but it would result in a type conflict tha can be only reduce by making a superclass or inetrface between name Reference and Filed Reference or putting Field Reference under Name Reference or else This optimisation is not really relevant so just leave as it is char tokens new char length identifier Ptr length System arraycopy identifier Stack identifier Ptr 1 tokens 0 length long positions new long length System arraycopy identifier Position Stack identifier Ptr 1 positions 0 length Qualified Name Reference ref new Qualified Name Reference tokens positions int identifier Position Stack identifier Ptr 1 32 source Start int identifier Position Stack identifier Ptr length source End ref bits AST Node Restrictive FlagMASK ref bits LOCAL FIELD if report Reference Info this add Unknown Ref ref return ref  NameReference getUnspecifiedReferenceOptimized NameReference NameReference identifierLengthStack identifierLengthPtr SingleNameReference SingleNameReference identifierStack identifierPtr identifierPositionStack identifierPtr ASTNode RestrictiveFlagMASK reportReferenceInfo addUnknownRef nameReference FiledReference FieldReference NameReference identifierPtr identifierStack identifierPtr identifierPositionStack identifierPtr QualifiedNameReference QualifiedNameReference identifierPositionStack identifierPtr sourceStart identifierPositionStack identifierPtr sourceEnd ASTNode RestrictiveFlagMASK reportReferenceInfo addUnknownRef
public void notify Source Element Requestor Compilation Unit Declaration parsed Unit if parsed Unit null when we parse a single type member declaration the compilation unit is null but we still want to be able to notify the requestor on the created ast node if ast Stack 0 instanceof Abstract Method Declaration notify Source Element Requestor Abstract Method Declaration ast Stack 0 return return range check boolean is In Range scanner initial Position parsed Unit source Start scanner eof Position parsed Unit source End if report Reference Info notify All Unknown References collect the top level ast nodes int length 0 AST Node nodes null if source Type null if is In Range requestor enter Compilation Unit Import Reference current Package parsed Unit current Package Import Reference imports parsed Unit imports Type Declaration types parsed Unit types length current Package null 0 1 imports null 0 imports length types null 0 types length nodes new AST Node length int index 0 if current Package null nodes index current Package if imports null for int i 0 max imports length i max i nodes index imports i if types null for int i 0 max types length i max i nodes index types i else Type Declaration types parsed Unit types if types null length types length nodes new AST Node length for int i 0 max types length i max i nodes i types i notify the nodes in the syntactical order if nodes null length 0 quick Sort nodes 0 length 1 for int i 0 i length i AST Node node nodes i if node instanceof Import Reference Import Reference import Ref Import Reference node if node parsed Unit current Package notify Source Element Requestor import Ref true else notify Source Element Requestor import Ref false else instanceof Type Declaration notify Source Element Requestor Type Declaration node source Type null if source Type null if is In Range requestor exit Compilation Unit parsed Unit source End  notifySourceElementRequestor CompilationUnitDeclaration parsedUnit parsedUnit astStack AbstractMethodDeclaration notifySourceElementRequestor AbstractMethodDeclaration astStack isInRange initialPosition parsedUnit sourceStart eofPosition parsedUnit sourceEnd reportReferenceInfo notifyAllUnknownReferences ASTNode sourceType isInRange enterCompilationUnit ImportReference currentPackage parsedUnit currentPackage ImportReference parsedUnit TypeDeclaration parsedUnit currentPackage ASTNode currentPackage currentPackage TypeDeclaration parsedUnit ASTNode quickSort ASTNode ImportReference ImportReference importRef ImportReference parsedUnit currentPackage notifySourceElementRequestor importRef notifySourceElementRequestor importRef TypeDeclaration notifySourceElementRequestor TypeDeclaration sourceType sourceType isInRange exitCompilationUnit parsedUnit sourceEnd
private void notify All Unknown References for int i 0 max this unknown Refs Counter i max i Name Reference name Ref this unknown Refs i if name Ref bits Binding Ids VARIABLE 0 if name Ref bits Binding Ids TYPE 0 variable but not type if name Ref instanceof Single Name Reference local var or field requestor accept Unknown Reference Single Name Reference name Ref token name Ref source Start else Qualified Name Reference The last token is a field reference and the previous tokens are a type variable references char tokens Qualified Name Reference name Ref tokens int tokens Length tokens length requestor accept Field Reference tokens tokens Length 1 name Ref source End tokens tokens Length 1 length 1 char type Ref new char tokens Length 1 System arraycopy tokens 0 type Ref 0 tokens Length 1 requestor accept Unknown Reference type Ref name Ref source Start name Ref source End tokens tokens Length 1 length else variable or type if name Ref instanceof Single Name Reference requestor accept Unknown Reference Single Name Reference name Ref token name Ref source Start else Qualified Name Reference requestor accept Unknown Reference Qualified Name Reference name Ref tokens name Ref source Start name Ref source End else if name Ref bits Binding Ids TYPE 0 if name Ref instanceof Single Name Reference requestor accept Type Reference Single Name Reference name Ref token name Ref source Start else it is a Qualified Name Reference requestor accept Type Reference Qualified Name Reference name Ref tokens name Ref source Start name Ref source End  notifyAllUnknownReferences unknownRefsCounter NameReference nameRef unknownRefs nameRef BindingIds nameRef BindingIds nameRef SingleNameReference acceptUnknownReference SingleNameReference nameRef nameRef sourceStart QualifiedNameReference QualifiedNameReference nameRef tokensLength acceptFieldReference tokensLength nameRef sourceEnd tokensLength typeRef tokensLength typeRef tokensLength acceptUnknownReference typeRef nameRef sourceStart nameRef sourceEnd tokensLength nameRef SingleNameReference acceptUnknownReference SingleNameReference nameRef nameRef sourceStart QualifiedNameReference acceptUnknownReference QualifiedNameReference nameRef nameRef sourceStart nameRef sourceEnd nameRef BindingIds nameRef SingleNameReference acceptTypeReference SingleNameReference nameRef nameRef sourceStart QualifiedNameReference acceptTypeReference QualifiedNameReference nameRef nameRef sourceStart nameRef sourceEnd
public void notify Source Element Requestor Abstract Method Declaration method Declaration range check boolean is In Range scanner initial Position method Declaration declaration Source Start scanner eof Position method Declaration declaration Source End if method Declaration is Clinit this visit If Needed method Declaration return if method Declaration is Default Constructor if report Reference Info Constructor Declaration constructor Declaration Constructor Declaration method Declaration Explicit Constructor Call constructor Call constructor Declaration constructor Call if constructor Call null switch constructor Call access Mode case Explicit Constructor Call This requestor accept Constructor Reference type Names nested Type Index 1 constructor Call arguments null 0 constructor Call arguments length constructor Call source Start break case Explicit Constructor Call Super case Explicit Constructor Call Implicit Super requestor accept Constructor Reference super Type Names nested Type Index 1 constructor Call arguments null 0 constructor Call arguments length constructor Call source Start break return char argument Types null char argument Names null Argument arguments method Declaration arguments if arguments null int argument Length arguments length argument Types new char argument Length argument Names new char argument Length for int i 0 i argument Length i argument Types i return Type Name arguments i type argument Names i arguments i name char thrown Exception Types null Type Reference thrown Exceptions method Declaration thrown Exceptions if thrown Exceptions null int thrown Exception Length thrown Exceptions length thrown Exception Types new char thrown Exception Length for int i 0 i thrown Exception Length i thrown Exception Types i Char Operation concat With thrown Exceptions i get Type Name by default no selector end position int selector Source End 1 if method Declaration is Constructor if method Declaration instanceof Source Constructor Declaration selector Source End Source Constructor Declaration method Declaration selector Source End if is In Range requestor enter Constructor method Declaration declaration Source Start method Declaration modifiers method Declaration selector method Declaration source Start selector Source End argument Types argument Names thrown Exception Types if report Reference Info Constructor Declaration constructor Declaration Constructor Declaration method Declaration Explicit Constructor Call constructor Call constructor Declaration constructor Call if constructor Call null switch constructor Call access Mode case Explicit Constructor Call This requestor accept Constructor Reference type Names nested Type Index 1 constructor Call arguments null 0 constructor Call arguments length constructor Call source Start break case Explicit Constructor Call Super case Explicit Constructor Call Implicit Super requestor accept Constructor Reference super Type Names nested Type Index 1 constructor Call arguments null 0 constructor Call arguments length constructor Call source Start break this visit If Needed method Declaration if is In Range requestor exit Constructor method Declaration declaration Source End return if method Declaration instanceof Source Method Declaration selector Source End Source Method Declaration method Declaration selector Source End if is In Range int current Modifiers method Declaration modifiers boolean deprecated current Modifiers Acc Deprecated 0 remember deprecation so as to not lose it below requestor enter Method method Declaration declaration Source Start deprecated current Modifiers Acc Just Flag Acc Deprecated current Modifiers Acc Just Flag return Type Name Method Declaration method Declaration return Type method Declaration selector method Declaration source Start selector Source End argument Types argument Names thrown Exception Types this visit If Needed method Declaration if is In Range requestor exit Method method Declaration declaration Source End  notifySourceElementRequestor AbstractMethodDeclaration methodDeclaration isInRange initialPosition methodDeclaration declarationSourceStart eofPosition methodDeclaration declarationSourceEnd methodDeclaration isClinit visitIfNeeded methodDeclaration methodDeclaration isDefaultConstructor reportReferenceInfo ConstructorDeclaration constructorDeclaration ConstructorDeclaration methodDeclaration ExplicitConstructorCall constructorCall constructorDeclaration constructorCall constructorCall constructorCall accessMode ExplicitConstructorCall acceptConstructorReference typeNames nestedTypeIndex constructorCall constructorCall constructorCall sourceStart ExplicitConstructorCall ExplicitConstructorCall ImplicitSuper acceptConstructorReference superTypeNames nestedTypeIndex constructorCall constructorCall constructorCall sourceStart argumentTypes argumentNames methodDeclaration argumentLength argumentTypes argumentLength argumentNames argumentLength argumentLength argumentTypes returnTypeName argumentNames thrownExceptionTypes TypeReference thrownExceptions methodDeclaration thrownExceptions thrownExceptions thrownExceptionLength thrownExceptions thrownExceptionTypes thrownExceptionLength thrownExceptionLength thrownExceptionTypes CharOperation concatWith thrownExceptions getTypeName selectorSourceEnd methodDeclaration isConstructor methodDeclaration SourceConstructorDeclaration selectorSourceEnd SourceConstructorDeclaration methodDeclaration selectorSourceEnd isInRange enterConstructor methodDeclaration declarationSourceStart methodDeclaration methodDeclaration methodDeclaration sourceStart selectorSourceEnd argumentTypes argumentNames thrownExceptionTypes reportReferenceInfo ConstructorDeclaration constructorDeclaration ConstructorDeclaration methodDeclaration ExplicitConstructorCall constructorCall constructorDeclaration constructorCall constructorCall constructorCall accessMode ExplicitConstructorCall acceptConstructorReference typeNames nestedTypeIndex constructorCall constructorCall constructorCall sourceStart ExplicitConstructorCall ExplicitConstructorCall ImplicitSuper acceptConstructorReference superTypeNames nestedTypeIndex constructorCall constructorCall constructorCall sourceStart visitIfNeeded methodDeclaration isInRange exitConstructor methodDeclaration declarationSourceEnd methodDeclaration SourceMethodDeclaration selectorSourceEnd SourceMethodDeclaration methodDeclaration selectorSourceEnd isInRange currentModifiers methodDeclaration currentModifiers AccDeprecated enterMethod methodDeclaration declarationSourceStart currentModifiers AccJustFlag AccDeprecated currentModifiers AccJustFlag returnTypeName MethodDeclaration methodDeclaration returnType methodDeclaration methodDeclaration sourceStart selectorSourceEnd argumentTypes argumentNames thrownExceptionTypes visitIfNeeded methodDeclaration isInRange exitMethod methodDeclaration declarationSourceEnd
public void notify Source Element Requestor Field Declaration field Declaration range check boolean is In Range scanner initial Position field Declaration declaration Source Start scanner eof Position field Declaration declaration Source End if field Declaration is Field int field End Position field Declaration declaration Source End if field Declaration instanceof Source Field Declaration field End Position Source Field Declaration field Declaration field End Position if field End Position 0 use the declaration source end by default field End Position field Declaration declaration Source End if is In Range int current Modifiers field Declaration modifiers boolean deprecated current Modifiers Acc Deprecated 0 remember deprecation so as to not lose it below requestor enter Field field Declaration declaration Source Start deprecated current Modifiers Acc Just Flag Acc Deprecated current Modifiers Acc Just Flag return Type Name field Declaration type field Declaration name field Declaration source Start field Declaration source End this visit If Needed field Declaration if is In Range requestor exit Field filter out initializations that are not a constant simple check field Declaration initialization null field Declaration initialization instanceof Array Initializer field Declaration initialization instanceof Allocation Expression field Declaration initialization instanceof Array Allocation Expression field Declaration initialization instanceof Assignment field Declaration initialization instanceof Class Literal Access field Declaration initialization instanceof Message Send field Declaration initialization instanceof Array Reference field Declaration initialization instanceof This Reference 1 field Declaration initialization source Start field End Position field Declaration declaration Source End else if is In Range requestor enter Initializer field Declaration declaration Source Start field Declaration modifiers this visit If Needed Initializer field Declaration if is In Range requestor exit Initializer field Declaration declaration Source End  notifySourceElementRequestor FieldDeclaration fieldDeclaration isInRange initialPosition fieldDeclaration declarationSourceStart eofPosition fieldDeclaration declarationSourceEnd fieldDeclaration isField fieldEndPosition fieldDeclaration declarationSourceEnd fieldDeclaration SourceFieldDeclaration fieldEndPosition SourceFieldDeclaration fieldDeclaration fieldEndPosition fieldEndPosition fieldEndPosition fieldDeclaration declarationSourceEnd isInRange currentModifiers fieldDeclaration currentModifiers AccDeprecated enterField fieldDeclaration declarationSourceStart currentModifiers AccJustFlag AccDeprecated currentModifiers AccJustFlag returnTypeName fieldDeclaration fieldDeclaration fieldDeclaration sourceStart fieldDeclaration sourceEnd visitIfNeeded fieldDeclaration isInRange exitField fieldDeclaration fieldDeclaration ArrayInitializer fieldDeclaration AllocationExpression fieldDeclaration ArrayAllocationExpression fieldDeclaration fieldDeclaration ClassLiteralAccess fieldDeclaration MessageSend fieldDeclaration ArrayReference fieldDeclaration ThisReference fieldDeclaration sourceStart fieldEndPosition fieldDeclaration declarationSourceEnd isInRange enterInitializer fieldDeclaration declarationSourceStart fieldDeclaration visitIfNeeded fieldDeclaration isInRange exitInitializer fieldDeclaration declarationSourceEnd
public void notify Source Element Requestor Import Reference import Reference boolean is Package if is Package requestor accept Package import Reference declaration Source Start import Reference declaration Source End Char Operation concat With import Reference get Import Name else requestor accept Import import Reference declaration Source Start import Reference declaration Source End Char Operation concat With import Reference get Import Name import Reference on Demand import Reference modifiers  notifySourceElementRequestor ImportReference importReference isPackage isPackage acceptPackage importReference declarationSourceStart importReference declarationSourceEnd CharOperation concatWith importReference getImportName acceptImport importReference declarationSourceStart importReference declarationSourceEnd CharOperation concatWith importReference getImportName importReference onDemand importReference
public void notify Source Element Requestor Type Declaration type Declaration boolean notify Type Presence range check boolean is In Range scanner initial Position type Declaration declaration Source Start scanner eof Position type Declaration declaration Source End Field Declaration fields type Declaration fields Abstract Method Declaration methods type Declaration methods Type Declaration member Types type Declaration member Types int field Counter fields null 0 fields length int method Counter methods null 0 methods length int member Type Counter member Types null 0 member Types length int field Index 0 int method Index 0 int member Type Index 0 boolean is Interface type Declaration is Interface if notify Type Presence char interface Names null int super Interfaces Length 0 Type Reference super Interfaces type Declaration super Interfaces if super Interfaces null super Interfaces Length super Interfaces length interface Names new char super Interfaces Length else if type Declaration bits AST Node Is Anonymous TypeMASK 0 see PR 3442 Qualified Allocation Expression alloc type Declaration allocation if alloc null alloc type null super Interfaces new Type Reference type Declaration allocation type super Interfaces Length 1 interface Names new char 1 if super Interfaces null for int i 0 i super Interfaces Length i interface Names i Char Operation concat With super Interfaces i get Type Name if is Interface if is In Range int current Modifiers type Declaration modifiers boolean deprecated current Modifiers Acc Deprecated 0 remember deprecation so as to not lose it below requestor enter Interface type Declaration declaration Source Start deprecated current Modifiers Acc Just Flag Acc Deprecated current Modifiers Acc Just Flag type Declaration name type Declaration source Start source End type Declaration interface Names if nested Type Index type Names length need a resize System arraycopy type Names 0 type Names new char nested Type Index 2 0 nested Type Index System arraycopy super Type Names 0 super Type Names new char nested Type Index 2 0 nested Type Index type Names nested Type Index type Declaration name super Type Names nested Type Index JAVA LANG OBJECT else Type Reference superclass type Declaration superclass if superclass null if is In Range requestor enter Class type Declaration declaration Source Start type Declaration modifiers type Declaration name type Declaration source Start source End type Declaration null interface Names else if is In Range requestor enter Class type Declaration declaration Source Start type Declaration modifiers type Declaration name type Declaration source Start source End type Declaration Char Operation concat With superclass get Type Name interface Names if nested Type Index type Names length need a resize System arraycopy type Names 0 type Names new char nested Type Index 2 0 nested Type Index System arraycopy super Type Names 0 super Type Names new char nested Type Index 2 0 nested Type Index type Names nested Type Index type Declaration name super Type Names nested Type Index superclass null JAVA LANG OBJECT Char Operation concat With superclass get Type Name while field Index field Counter member Type Index member Type Counter method Index method Counter Field Declaration next Field Declaration null Abstract Method Declaration next Method Declaration null Type Declaration next Member Declaration null int position Integer MAX VALUE int next Declaration Type 1 if field Index field Counter next Field Declaration fields field Index if next Field Declaration declaration Source Start position position next Field Declaration declaration Source Start next Declaration Type 0 FIELD if method Index method Counter next Method Declaration methods method Index if next Method Declaration declaration Source Start position position next Method Declaration declaration Source Start next Declaration Type 1 METHOD if member Type Index member Type Counter next Member Declaration member Types member Type Index if next Member Declaration declaration Source Start position position next Member Declaration declaration Source Start next Declaration Type 2 MEMBER switch next Declaration Type case 0 field Index notify Source Element Requestor next Field Declaration break case 1 method Index notify Source Element Requestor next Method Declaration break case 2 member Type Index notify Source Element Requestor next Member Declaration true if notify Type Presence if is In Range if is Interface requestor exit Interface type Declaration declaration Source End else requestor exit Class type Declaration declaration Source End nested Type Index  notifySourceElementRequestor TypeDeclaration typeDeclaration notifyTypePresence isInRange initialPosition typeDeclaration declarationSourceStart eofPosition typeDeclaration declarationSourceEnd FieldDeclaration typeDeclaration AbstractMethodDeclaration typeDeclaration TypeDeclaration memberTypes typeDeclaration memberTypes fieldCounter methodCounter memberTypeCounter memberTypes memberTypes fieldIndex methodIndex memberTypeIndex isInterface typeDeclaration isInterface notifyTypePresence interfaceNames superInterfacesLength TypeReference superInterfaces typeDeclaration superInterfaces superInterfaces superInterfacesLength superInterfaces interfaceNames superInterfacesLength typeDeclaration ASTNode IsAnonymousTypeMASK QualifiedAllocationExpression typeDeclaration superInterfaces TypeReference typeDeclaration superInterfacesLength interfaceNames superInterfaces superInterfacesLength interfaceNames CharOperation concatWith superInterfaces getTypeName isInterface isInRange currentModifiers typeDeclaration currentModifiers AccDeprecated enterInterface typeDeclaration declarationSourceStart currentModifiers AccJustFlag AccDeprecated currentModifiers AccJustFlag typeDeclaration typeDeclaration sourceStart sourceEnd typeDeclaration interfaceNames nestedTypeIndex typeNames typeNames typeNames nestedTypeIndex nestedTypeIndex superTypeNames superTypeNames nestedTypeIndex nestedTypeIndex typeNames nestedTypeIndex typeDeclaration superTypeNames nestedTypeIndex JAVA_LANG_OBJECT TypeReference typeDeclaration isInRange enterClass typeDeclaration declarationSourceStart typeDeclaration typeDeclaration typeDeclaration sourceStart sourceEnd typeDeclaration interfaceNames isInRange enterClass typeDeclaration declarationSourceStart typeDeclaration typeDeclaration typeDeclaration sourceStart sourceEnd typeDeclaration CharOperation concatWith getTypeName interfaceNames nestedTypeIndex typeNames typeNames typeNames nestedTypeIndex nestedTypeIndex superTypeNames superTypeNames nestedTypeIndex nestedTypeIndex typeNames nestedTypeIndex typeDeclaration superTypeNames nestedTypeIndex JAVA_LANG_OBJECT CharOperation concatWith getTypeName fieldIndex fieldCounter memberTypeIndex memberTypeCounter methodIndex methodCounter FieldDeclaration nextFieldDeclaration AbstractMethodDeclaration nextMethodDeclaration TypeDeclaration nextMemberDeclaration MAX_VALUE nextDeclarationType fieldIndex fieldCounter nextFieldDeclaration fieldIndex nextFieldDeclaration declarationSourceStart nextFieldDeclaration declarationSourceStart nextDeclarationType methodIndex methodCounter nextMethodDeclaration methodIndex nextMethodDeclaration declarationSourceStart nextMethodDeclaration declarationSourceStart nextDeclarationType memberTypeIndex memberTypeCounter nextMemberDeclaration memberTypes memberTypeIndex nextMemberDeclaration declarationSourceStart nextMemberDeclaration declarationSourceStart nextDeclarationType nextDeclarationType fieldIndex notifySourceElementRequestor nextFieldDeclaration methodIndex notifySourceElementRequestor nextMethodDeclaration memberTypeIndex notifySourceElementRequestor nextMemberDeclaration notifyTypePresence isInRange isInterface exitInterface typeDeclaration declarationSourceEnd exitClass typeDeclaration declarationSourceEnd nestedTypeIndex
private int source End Type Declaration type Declaration if type Declaration bits AST Node Is Anonymous TypeMASK 0 return type Declaration allocation type source End else return type Declaration source End  sourceEnd TypeDeclaration typeDeclaration typeDeclaration ASTNode IsAnonymousTypeMASK typeDeclaration sourceEnd typeDeclaration sourceEnd
public void parse Compilation Unit I Compilation Unit unit int start int end boolean full Parse this report Reference Info full Parse boolean old diet if full Parse unknown Refs new Name Reference 10 unknown Refs Counter 0 try diet true Compilation Result compilation Unit Result new Compilation Result unit 0 0 this options max Problems Per Unit Compilation Unit Declaration parsed Unit parse unit compilation Unit Result start end if scanner record Line Separator requestor accept Line Separator Positions compilation Unit Result line Separator Positions if this local Declaration Visitor null full Parse diet false this get Method Bodies parsed Unit this scanner reset To start end notify Source Element Requestor parsed Unit catch Abort Compilation e ignore this exception finally diet old  parseCompilationUnit ICompilationUnit fullParse reportReferenceInfo fullParse fullParse unknownRefs NameReference unknownRefsCounter CompilationResult compilationUnitResult CompilationResult maxProblemsPerUnit CompilationUnitDeclaration parsedUnit compilationUnitResult recordLineSeparator acceptLineSeparatorPositions compilationUnitResult lineSeparatorPositions localDeclarationVisitor fullParse getMethodBodies parsedUnit resetTo notifySourceElementRequestor parsedUnit AbortCompilation
public Compilation Unit Declaration parse Compilation Unit I Compilation Unit unit boolean full Parse boolean old diet if full Parse unknown Refs new Name Reference 10 unknown Refs Counter 0 try diet true this report Reference Info full Parse Compilation Result compilation Unit Result new Compilation Result unit 0 0 this options max Problems Per Unit Compilation Unit Declaration parsed Unit parse unit compilation Unit Result if scanner record Line Separator requestor accept Line Separator Positions compilation Unit Result line Separator Positions int initial Start this scanner initial Position int initial End this scanner eof Position if this local Declaration Visitor null full Parse diet false this get Method Bodies parsed Unit this scanner reset To initial Start initial End notify Source Element Requestor parsed Unit return parsed Unit catch Abort Compilation e ignore this exception finally diet old return null  CompilationUnitDeclaration parseCompilationUnit ICompilationUnit fullParse fullParse unknownRefs NameReference unknownRefsCounter reportReferenceInfo fullParse CompilationResult compilationUnitResult CompilationResult maxProblemsPerUnit CompilationUnitDeclaration parsedUnit compilationUnitResult recordLineSeparator acceptLineSeparatorPositions compilationUnitResult lineSeparatorPositions initialStart initialPosition initialEnd eofPosition localDeclarationVisitor fullParse getMethodBodies parsedUnit resetTo initialStart initialEnd notifySourceElementRequestor parsedUnit parsedUnit AbortCompilation
public void parse Type Member Declarations I Source Type type I Compilation Unit source Unit int start int end boolean need Reference Info boolean old diet if need Reference Info unknown Refs new Name Reference 10 unknown Refs Counter 0 Compilation Result compilation Unit Result new Compilation Result source Unit 0 0 this options max Problems Per Unit try diet need Reference Info report Reference Info need Reference Info Compilation Unit Declaration unit Source Type Converter build Compilation Unit new I Source Type type no need for field and methods no need for member types no need for field initialization Source Type Converter NONE problem Reporter compilation Unit Result if unit null unit types null unit types length 1 return this source Type type try automaton initialization initialize go For Class Body Declarations scanner initialization scanner set Source source Unit get Contents scanner reset To start end unit creation reference Context compilation Unit unit initialize the ast Stacl the compilation Unit Declaration should contain exactly one type push On Ast Stack unit types 0 run automaton parse notify Source Element Requestor unit finally unit compilation Unit compilation Unit null reset parser catch Abort Compilation e ignore this exception finally if scanner record Line Separator requestor accept Line Separator Positions compilation Unit Result line Separator Positions diet old  parseTypeMemberDeclarations ISourceType ICompilationUnit sourceUnit needReferenceInfo needReferenceInfo unknownRefs NameReference unknownRefsCounter CompilationResult compilationUnitResult CompilationResult sourceUnit maxProblemsPerUnit needReferenceInfo reportReferenceInfo needReferenceInfo CompilationUnitDeclaration SourceTypeConverter buildCompilationUnit ISourceType SourceTypeConverter problemReporter compilationUnitResult sourceType goForClassBodyDeclarations setSource sourceUnit getContents resetTo referenceContext compilationUnit astStacl compilationUnitDeclaration pushOnAstStack notifySourceElementRequestor compilationUnit compilationUnit AbortCompilation recordLineSeparator acceptLineSeparatorPositions compilationUnitResult lineSeparatorPositions
public void parse Type Member Declarations char contents int start int end boolean old diet try diet true automaton initialization initialize go For Class Body Declarations scanner initialization scanner set Source contents scanner record Line Separator false scanner task Tags null scanner task Priorities null scanner reset To start end unit creation reference Context null initialize the ast Stacl the compilation Unit Declaration should contain exactly one type run automaton parse notify Source Element Requestor Compilation Unit Declaration null catch Abort Compilation e ignore this exception finally diet old  parseTypeMemberDeclarations goForClassBodyDeclarations setSource recordLineSeparator taskTags taskPriorities resetTo referenceContext astStacl compilationUnitDeclaration notifySourceElementRequestor CompilationUnitDeclaration AbortCompilation
private static void quick Sort AST Node sorted Collection int left int right int original left left int original right right AST Node mid sorted Collection left right 2 do while sorted Collection left source Start mid source Start left while mid source Start sorted Collection right source Start right if left right AST Node tmp sorted Collection left sorted Collection left sorted Collection right sorted Collection right tmp left right while left right if original left right quick Sort sorted Collection original left right if left original right quick Sort sorted Collection left original right  quickSort ASTNode sortedCollection original_left original_right ASTNode sortedCollection sortedCollection sourceStart sourceStart sourceStart sortedCollection sourceStart ASTNode sortedCollection sortedCollection sortedCollection sortedCollection original_left quickSort sortedCollection original_left original_right quickSort sortedCollection original_right
private char return Type Name Type Reference type if type null return null int dimension type dimensions if dimension 0 char dimensions Array new char dimension 2 for int i 0 i dimension i dimensions Array i 2 dimensions Array i 2 1 return Char Operation concat Char Operation concat With type get Type Name dimensions Array return Char Operation concat With type get Type Name  returnTypeName TypeReference dimensionsArray dimensionsArray dimensionsArray CharOperation CharOperation concatWith getTypeName dimensionsArray CharOperation concatWith getTypeName
public void add Unknown Ref Name Reference name Ref if this unknown Refs length this unknown Refs Counter resize System arraycopy this unknown Refs 0 this unknown Refs new Name Reference this unknown Refs Counter 2 0 this unknown Refs Counter this unknown Refs this unknown Refs Counter name Ref  addUnknownRef NameReference nameRef unknownRefs unknownRefsCounter unknownRefs unknownRefs NameReference unknownRefsCounter unknownRefsCounter unknownRefs unknownRefsCounter nameRef
private void visit If Needed Abstract Method Declaration method if this local Declaration Visitor null method bits AST Node Has Local TypeMASK 0 if method statements null int statements Length method statements length for int i 0 i statements Length i method statements i traverse this local Declaration Visitor method scope  visitIfNeeded AbstractMethodDeclaration localDeclarationVisitor ASTNode HasLocalTypeMASK statementsLength statementsLength localDeclarationVisitor
private void visit If Needed Field Declaration field if this local Declaration Visitor null field bits AST Node Has Local TypeMASK 0 if field initialization null field initialization traverse this local Declaration Visitor null  visitIfNeeded FieldDeclaration localDeclarationVisitor ASTNode HasLocalTypeMASK localDeclarationVisitor
private void visit If Needed Initializer initializer if this local Declaration Visitor null initializer bits AST Node Has Local TypeMASK 0 if initializer block null initializer block traverse this local Declaration Visitor null  visitIfNeeded localDeclarationVisitor ASTNode HasLocalTypeMASK localDeclarationVisitor

see I Source Element Requestor accept Constructor Reference char int int public void accept Constructor Reference char type Name int arg Count int source Position default implementation do nothing  ISourceElementRequestor acceptConstructorReference acceptConstructorReference typeName argCount sourcePosition
see I Source Element Requestor accept Field Reference char int public void accept Field Reference char field Name int source Position default implementation do nothing  ISourceElementRequestor acceptFieldReference acceptFieldReference fieldName sourcePosition
see I Source Element Requestor accept Import int int char boolean int public void accept Import int declaration Start int declaration End char name boolean on Demand int modifiers default implementation do nothing  ISourceElementRequestor acceptImport acceptImport declarationStart declarationEnd onDemand
see I Source Element Requestor accept Line Separator Positions int public void accept Line Separator Positions int positions default implementation do nothing  ISourceElementRequestor acceptLineSeparatorPositions acceptLineSeparatorPositions
see I Source Element Requestor accept Method Reference char int int public void accept Method Reference char method Name int arg Count int source Position default implementation do nothing  ISourceElementRequestor acceptMethodReference acceptMethodReference methodName argCount sourcePosition
see I Source Element Requestor accept Package int int char public void accept Package int declaration Start int declaration End char name default implementation do nothing  ISourceElementRequestor acceptPackage acceptPackage declarationStart declarationEnd
see I Source Element Requestor accept Problem I Problem public void accept Problem I Problem problem default implementation do nothing  ISourceElementRequestor acceptProblem IProblem acceptProblem IProblem
see I Source Element Requestor accept Type Reference char int int public void accept Type Reference char type Name int source Start int source End default implementation do nothing  ISourceElementRequestor acceptTypeReference acceptTypeReference typeName sourceStart sourceEnd
see I Source Element Requestor accept Type Reference char int public void accept Type Reference char type Name int source Position default implementation do nothing  ISourceElementRequestor acceptTypeReference acceptTypeReference typeName sourcePosition
see I Source Element Requestor accept Unknown Reference char int int public void accept Unknown Reference char name int source Start int source End default implementation do nothing  ISourceElementRequestor acceptUnknownReference acceptUnknownReference sourceStart sourceEnd
see I Source Element Requestor accept Unknown Reference char int public void accept Unknown Reference char name int source Position default implementation do nothing  ISourceElementRequestor acceptUnknownReference acceptUnknownReference sourcePosition
see I Source Element Requestor enter Class int int char int int char char public void enter Class int declaration Start int modifiers char name int name Source Start int name Source End char superclass char superinterfaces default implementation do nothing  ISourceElementRequestor enterClass enterClass declarationStart nameSourceStart nameSourceEnd
see I Source Element Requestor enter Compilation Unit public void enter Compilation Unit default implementation do nothing  ISourceElementRequestor enterCompilationUnit enterCompilationUnit
see I Source Element Requestor enter Constructor int int char int int char char char public void enter Constructor int declaration Start int modifiers char name int name Source Start int name Source End char parameter Types char parameter Names char exception Types default implementation do nothing  ISourceElementRequestor enterConstructor enterConstructor declarationStart nameSourceStart nameSourceEnd parameterTypes parameterNames exceptionTypes
see I Source Element Requestor enter Field int int char char int int public void enter Field int declaration Start int modifiers char type char name int name Source Start int name Source End default implementation do nothing  ISourceElementRequestor enterField enterField declarationStart nameSourceStart nameSourceEnd
see I Source Element Requestor enter Initializer int int public void enter Initializer int declaration Start int modifiers default implementation do nothing  ISourceElementRequestor enterInitializer enterInitializer declarationStart
see I Source Element Requestor enter Interface int int char int int char public void enter Interface int declaration Start int modifiers char name int name Source Start int name Source End char superinterfaces default implementation do nothing  ISourceElementRequestor enterInterface enterInterface declarationStart nameSourceStart nameSourceEnd
see I Source Element Requestor enter Method int int char char int int char char char public void enter Method int declaration Start int modifiers char return Type char name int name Source Start int name Source End char parameter Types char parameter Names char exception Types default implementation do nothing  ISourceElementRequestor enterMethod enterMethod declarationStart returnType nameSourceStart nameSourceEnd parameterTypes parameterNames exceptionTypes
see I Source Element Requestor exit Class int public void exit Class int declaration End default implementation do nothing  ISourceElementRequestor exitClass exitClass declarationEnd
see I Source Element Requestor exit Compilation Unit int public void exit Compilation Unit int declaration End default implementation do nothing  ISourceElementRequestor exitCompilationUnit exitCompilationUnit declarationEnd
see I Source Element Requestor exit Constructor int public void exit Constructor int declaration End default implementation do nothing  ISourceElementRequestor exitConstructor exitConstructor declarationEnd
see I Source Element Requestor exit Field int public void exit Field int initialization Start int declaration End int declaration Source End default implementation do nothing  ISourceElementRequestor exitField exitField initializationStart declarationEnd declarationSourceEnd
see I Source Element Requestor exit Initializer int public void exit Initializer int declaration End default implementation do nothing  ISourceElementRequestor exitInitializer exitInitializer declarationEnd
see I Source Element Requestor exit Interface int public void exit Interface int declaration End default implementation do nothing  ISourceElementRequestor exitInterface exitInterface declarationEnd
see I Source Element Requestor exit Method int public void exit Method int declaration End default implementation do nothing  ISourceElementRequestor exitMethod exitMethod declarationEnd

char elements public Compound Name Vector max Size INITIAL SIZE size 0 elements new char max Size  CompoundNameVector maxSize INITIAL_SIZE maxSize
public void add char new Element if size max Size knows that size starts max Size System arraycopy elements 0 elements new char max Size 2 0 size elements size new Element  newElement maxSize maxSize maxSize newElement
public void add All char new Elements if size new Elements length max Size max Size size new Elements length assume no more elements will be added System arraycopy elements 0 elements new char max Size 0 size System arraycopy new Elements 0 elements size new Elements length size new Elements length  addAll newElements newElements maxSize maxSize newElements maxSize newElements newElements newElements
public boolean contains char element for int i size i 0 if Char Operation equals element elements i return true return false  CharOperation
return false public char element At int index return elements index  elementAt
public char remove char element assumes only one occurrence of the element exists for int i size i 0 if element elements i shift the remaining elements down one spot System arraycopy elements i 1 elements i size i elements size null return element return null 
public void remove All for int i size i 0 elements i null size 0  removeAll
public String to String String Buffer buffer new String Buffer for int i 0 i size i buffer append Char Operation to String elements i append n NON NLS 1 return buffer to String  toString StringBuffer StringBuffer CharOperation toString toString

public int element Size number of elements in the table int threshold public Hashtable Of Int this 13  elementSize HashtableOfInt
public Hashtable Of Int int size this element Size 0 this threshold size size represents the expected number of elements int extra Room int size 1 75f if this threshold extra Room extra Room this key Table new int extra Room this value Table new Object extra Room  HashtableOfInt elementSize extraRoom extraRoom extraRoom keyTable extraRoom valueTable extraRoom
public boolean contains Key int key int index key value Table length int current Key while current Key key Table index 0 if current Key key return true index index 1 key Table length return false  containsKey valueTable currentKey currentKey keyTable currentKey keyTable
public Object get int key int index key value Table length int current Key while current Key key Table index 0 if current Key key return value Table index index index 1 key Table length return null  valueTable currentKey currentKey keyTable currentKey valueTable keyTable
public Object put int key Object value int index key value Table length int current Key while current Key key Table index 0 if current Key key return value Table index value index index 1 key Table length key Table index key value Table index value assumes the threshold is never equal to the size of the table if element Size threshold rehash return value  valueTable currentKey currentKey keyTable currentKey valueTable keyTable keyTable valueTable elementSize
private void rehash Hashtable Of Int new Hashtable new Hashtable Of Int element Size 2 double the number of expected elements int current Key for int i key Table length i 0 if current Key key Table i 0 new Hashtable put current Key value Table i this key Table new Hashtable key Table this value Table new Hashtable value Table this threshold new Hashtable threshold  HashtableOfInt newHashtable HashtableOfInt elementSize currentKey keyTable currentKey keyTable newHashtable currentKey valueTable keyTable newHashtable keyTable valueTable newHashtable valueTable newHashtable
this threshold new Hashtable threshold public int size return element Size  newHashtable elementSize
public String to String String s NON NLS 1 Object object for int i 0 length value Table length i length i if object value Table i null s key Table i object to String n NON NLS 2 NON NLS 1 return s  toString valueTable valueTable keyTable toString

int threshold public Hashtable Of Int Values this 13  HashtableOfIntValues
public Hashtable Of Int Values int size this element Size 0 this threshold size size represents the expected number of elements int extra Room int size 1 75f if this threshold extra Room extra Room this key Table new char extra Room this value Table new int extra Room  HashtableOfIntValues elementSize extraRoom extraRoom extraRoom keyTable extraRoom valueTable extraRoom
public Object clone throws Clone Not Supported Exception Hashtable Of Int Values result Hashtable Of Int Values super clone result element Size this element Size result threshold this threshold int length this key Table length result key Table new char length System arraycopy this key Table 0 result key Table 0 length length this value Table length result value Table new int length System arraycopy this value Table 0 result value Table 0 length return result  CloneNotSupportedException HashtableOfIntValues HashtableOfIntValues elementSize elementSize keyTable keyTable keyTable keyTable valueTable valueTable valueTable valueTable
public boolean contains Key char key int index Char Operation hash Code key value Table length int key Length key length char current Key while current Key key Table index null if current Key length key Length Char Operation equals current Key key return true index index 1 key Table length return false  containsKey CharOperation hashCode valueTable keyLength currentKey currentKey keyTable currentKey keyLength CharOperation currentKey keyTable
public int get char key int index Char Operation hash Code key value Table length int key Length key length char current Key while current Key key Table index null if current Key length key Length Char Operation equals current Key key return value Table index index index 1 key Table length return NO VALUE  CharOperation hashCode valueTable keyLength currentKey currentKey keyTable currentKey keyLength CharOperation currentKey valueTable keyTable NO_VALUE
public int put char key int value int index Char Operation hash Code key value Table length int key Length key length char current Key while current Key key Table index null if current Key length key Length Char Operation equals current Key key return value Table index value index index 1 key Table length key Table index key value Table index value assumes the threshold is never equal to the size of the table if element Size threshold rehash return value  CharOperation hashCode valueTable keyLength currentKey currentKey keyTable currentKey keyLength CharOperation currentKey valueTable keyTable keyTable valueTable elementSize
public int remove Key char key int index Char Operation hash Code key value Table length int key Length key length char current Key while current Key key Table index null if current Key length key Length Char Operation equals current Key key int value value Table index element Size key Table index null value Table index NO VALUE rehash return value index index 1 key Table length return NO VALUE  removeKey CharOperation hashCode valueTable keyLength currentKey currentKey keyTable currentKey keyLength CharOperation currentKey valueTable elementSize keyTable valueTable NO_VALUE keyTable NO_VALUE
private void rehash Hashtable Of Int Values new Hashtable new Hashtable Of Int Values element Size 2 double the number of expected elements char current Key for int i key Table length i 0 if current Key key Table i null new Hashtable put current Key value Table i this key Table new Hashtable key Table this value Table new Hashtable value Table this threshold new Hashtable threshold  HashtableOfIntValues newHashtable HashtableOfIntValues elementSize currentKey keyTable currentKey keyTable newHashtable currentKey valueTable keyTable newHashtable keyTable valueTable newHashtable valueTable newHashtable
public int size return element Size  elementSize
public String to String String s NON NLS 1 char key for int i 0 length value Table length i length i if key key Table i null s new String key value Table i n NON NLS 2 NON NLS 1 return s  toString valueTable keyTable valueTable

public int element Size number of elements in the table int threshold public Hashtable Of Long this 13  elementSize HashtableOfLong
public Hashtable Of Long int size this element Size 0 this threshold size size represents the expected number of elements int extra Room int size 1 75f if this threshold extra Room extra Room this key Table new long extra Room this value Table new Object extra Room  HashtableOfLong elementSize extraRoom extraRoom extraRoom keyTable extraRoom valueTable extraRoom
public boolean contains Key long key int index int key 32 value Table length long current Key while current Key key Table index 0 if current Key key return true index index 1 key Table length return false  containsKey valueTable currentKey currentKey keyTable currentKey keyTable
public Object get long key int index int key 32 value Table length long current Key while current Key key Table index 0 if current Key key return value Table index index index 1 key Table length return null  valueTable currentKey currentKey keyTable currentKey valueTable keyTable
public Object put long key Object value int index int key 32 value Table length long current Key while current Key key Table index 0 if current Key key return value Table index value index index 1 key Table length key Table index key value Table index value assumes the threshold is never equal to the size of the table if element Size threshold rehash return value  valueTable currentKey currentKey keyTable currentKey valueTable keyTable keyTable valueTable elementSize
private void rehash Hashtable Of Long new Hashtable new Hashtable Of Long element Size 2 double the number of expected elements long current Key for int i key Table length i 0 if current Key key Table i 0 new Hashtable put current Key value Table i this key Table new Hashtable key Table this value Table new Hashtable value Table this threshold new Hashtable threshold  HashtableOfLong newHashtable HashtableOfLong elementSize currentKey keyTable currentKey keyTable newHashtable currentKey valueTable keyTable newHashtable keyTable valueTable newHashtable valueTable newHashtable
this threshold new Hashtable threshold public int size return element Size  newHashtable elementSize
public String to String String s NON NLS 1 Object object for int i 0 length value Table length i length i if object value Table i null s key Table i object to String n NON NLS 2 NON NLS 1 return s  toString valueTable valueTable keyTable toString

int threshold public Hashtable Of Object this 13  HashtableOfObject
public Hashtable Of Object int size this element Size 0 this threshold size size represents the expected number of elements int extra Room int size 1 75f if this threshold extra Room extra Room this key Table new char extra Room this value Table new Object extra Room  HashtableOfObject elementSize extraRoom extraRoom extraRoom keyTable extraRoom valueTable extraRoom
public Object clone throws Clone Not Supported Exception Hashtable Of Object result Hashtable Of Object super clone result element Size this element Size result threshold this threshold int length this key Table length result key Table new char length System arraycopy this key Table 0 result key Table 0 length length this value Table length result value Table new Object length System arraycopy this value Table 0 result value Table 0 length return result  CloneNotSupportedException HashtableOfObject HashtableOfObject elementSize elementSize keyTable keyTable keyTable keyTable valueTable valueTable valueTable valueTable
public boolean contains Key char key int index Char Operation hash Code key value Table length int key Length key length char current Key while current Key key Table index null if current Key length key Length Char Operation equals current Key key return true index index 1 key Table length return false  containsKey CharOperation hashCode valueTable keyLength currentKey currentKey keyTable currentKey keyLength CharOperation currentKey keyTable
public Object get char key int index Char Operation hash Code key value Table length int key Length key length char current Key while current Key key Table index null if current Key length key Length Char Operation equals current Key key return value Table index index index 1 key Table length return null  CharOperation hashCode valueTable keyLength currentKey currentKey keyTable currentKey keyLength CharOperation currentKey valueTable keyTable
public Object put char key Object value int index Char Operation hash Code key value Table length int key Length key length char current Key while current Key key Table index null if current Key length key Length Char Operation equals current Key key return value Table index value index index 1 key Table length key Table index key value Table index value assumes the threshold is never equal to the size of the table if element Size threshold rehash return value  CharOperation hashCode valueTable keyLength currentKey currentKey keyTable currentKey keyLength CharOperation currentKey valueTable keyTable keyTable valueTable elementSize
public Object remove Key char key int index Char Operation hash Code key value Table length int key Length key length char current Key while current Key key Table index null if current Key length key Length Char Operation equals current Key key Object value value Table index element Size key Table index null value Table index null rehash return value index index 1 key Table length return null  removeKey CharOperation hashCode valueTable keyLength currentKey currentKey keyTable currentKey keyLength CharOperation currentKey valueTable elementSize keyTable valueTable keyTable
private void rehash Hashtable Of Object new Hashtable new Hashtable Of Object element Size 2 double the number of expected elements char current Key for int i key Table length i 0 if current Key key Table i null new Hashtable put current Key value Table i this key Table new Hashtable key Table this value Table new Hashtable value Table this threshold new Hashtable threshold  HashtableOfObject newHashtable HashtableOfObject elementSize currentKey keyTable currentKey keyTable newHashtable currentKey valueTable keyTable newHashtable keyTable valueTable newHashtable valueTable newHashtable
public int size return element Size  elementSize
public String to String String s NON NLS 1 Object object for int i 0 length value Table length i length i if object value Table i null s new String key Table i object to String n NON NLS 2 NON NLS 1 return s  toString valueTable valueTable keyTable toString

public int element Size number of elements in the table int threshold public Hashtable Of Package this 3 usually not very large  elementSize HashtableOfPackage
public Hashtable Of Package int size this element Size 0 this threshold size size represents the expected number of elements int extra Room int size 1 75f if this threshold extra Room extra Room this key Table new char extra Room this value Table new Package Binding extra Room  HashtableOfPackage elementSize extraRoom extraRoom extraRoom keyTable extraRoom valueTable PackageBinding extraRoom
public boolean contains Key char key int index Char Operation hash Code key value Table length int key Length key length char current Key while current Key key Table index null if current Key length key Length Char Operation equals current Key key return true index index 1 key Table length return false  containsKey CharOperation hashCode valueTable keyLength currentKey currentKey keyTable currentKey keyLength CharOperation currentKey keyTable
public Package Binding get char key int index Char Operation hash Code key value Table length int key Length key length char current Key while current Key key Table index null if current Key length key Length Char Operation equals current Key key return value Table index index index 1 key Table length return null  PackageBinding CharOperation hashCode valueTable keyLength currentKey currentKey keyTable currentKey keyLength CharOperation currentKey valueTable keyTable
public Package Binding put char key Package Binding value int index Char Operation hash Code key value Table length int key Length key length char current Key while current Key key Table index null if current Key length key Length Char Operation equals current Key key return value Table index value index index 1 key Table length key Table index key value Table index value assumes the threshold is never equal to the size of the table if element Size threshold rehash return value  PackageBinding PackageBinding CharOperation hashCode valueTable keyLength currentKey currentKey keyTable currentKey keyLength CharOperation currentKey valueTable keyTable keyTable valueTable elementSize
private void rehash Hashtable Of Package new Hashtable new Hashtable Of Package element Size 2 double the number of expected elements char current Key for int i key Table length i 0 if current Key key Table i null new Hashtable put current Key value Table i this key Table new Hashtable key Table this value Table new Hashtable value Table this threshold new Hashtable threshold  HashtableOfPackage newHashtable HashtableOfPackage elementSize currentKey keyTable currentKey keyTable newHashtable currentKey valueTable keyTable newHashtable keyTable valueTable newHashtable valueTable newHashtable
this threshold new Hashtable threshold public int size return element Size  newHashtable elementSize
public String to String String s NON NLS 1 Package Binding pkg for int i 0 length value Table length i length i if pkg value Table i null s pkg to String n NON NLS 1 return s  toString PackageBinding valueTable valueTable toString

public int element Size number of elements in the table int threshold public Hashtable Of Type this 3  elementSize HashtableOfType
public Hashtable Of Type int size this element Size 0 this threshold size size represents the expected number of elements int extra Room int size 1 75f if this threshold extra Room extra Room this key Table new char extra Room this value Table new Reference Binding extra Room  HashtableOfType elementSize extraRoom extraRoom extraRoom keyTable extraRoom valueTable ReferenceBinding extraRoom
public boolean contains Key char key int index Char Operation hash Code key value Table length int key Length key length char current Key while current Key key Table index null if current Key length key Length Char Operation equals current Key key return true index index 1 key Table length return false  containsKey CharOperation hashCode valueTable keyLength currentKey currentKey keyTable currentKey keyLength CharOperation currentKey keyTable
public Reference Binding get char key int index Char Operation hash Code key value Table length int key Length key length char current Key while current Key key Table index null if current Key length key Length Char Operation equals current Key key return value Table index index index 1 key Table length return null  ReferenceBinding CharOperation hashCode valueTable keyLength currentKey currentKey keyTable currentKey keyLength CharOperation currentKey valueTable keyTable
public Reference Binding put char key Reference Binding value int index Char Operation hash Code key value Table length int key Length key length char current Key while current Key key Table index null if current Key length key Length Char Operation equals current Key key return value Table index value index index 1 key Table length key Table index key value Table index value assumes the threshold is never equal to the size of the table if element Size threshold rehash return value  ReferenceBinding ReferenceBinding CharOperation hashCode valueTable keyLength currentKey currentKey keyTable currentKey keyLength CharOperation currentKey valueTable keyTable keyTable valueTable elementSize
private void rehash Hashtable Of Type new Hashtable new Hashtable Of Type element Size 100 100 element Size 2 double the number of expected elements char current Key for int i key Table length i 0 if current Key key Table i null new Hashtable put current Key value Table i this key Table new Hashtable key Table this value Table new Hashtable value Table this threshold new Hashtable threshold  HashtableOfType newHashtable HashtableOfType elementSize elementSize currentKey keyTable currentKey keyTable newHashtable currentKey valueTable keyTable newHashtable keyTable valueTable newHashtable valueTable newHashtable
this threshold new Hashtable threshold public int size return element Size  newHashtable elementSize
public String to String String s NON NLS 1 Reference Binding type for int i 0 length value Table length i length i if type value Table i null s type to String n NON NLS 1 return s  toString ReferenceBinding valueTable valueTable toString

public Object Vector this max Size INITIAL SIZE this size 0 this elements new Object this max Size  ObjectVector maxSize INITIAL_SIZE maxSize
public void add Object new Element if this size this max Size knows that size starts max Size System arraycopy this elements 0 this elements new Object this max Size 2 0 this size this elements this size new Element  newElement maxSize maxSize maxSize newElement
public void add All Object new Elements if this size new Elements length this max Size max Size this size new Elements length assume no more elements will be added System arraycopy this elements 0 this elements new Object this max Size 0 this size System arraycopy new Elements 0 this elements size new Elements length this size new Elements length  addAll newElements newElements maxSize maxSize newElements maxSize newElements newElements newElements
public void add All Object Vector new Vector if this size new Vector size this max Size max Size this size new Vector size assume no more elements will be added System arraycopy this elements 0 this elements new Object this max Size 0 this size System arraycopy new Vector elements 0 this elements size new Vector size this size new Vector size  addAll ObjectVector newVector newVector maxSize maxSize newVector maxSize newVector newVector newVector
Identity check public boolean contains Identical Object element for int i this size i 0 if element this elements i return true return false  containsIdentical
Equality check public boolean contains Object element for int i this size i 0 if element equals this elements i return true return false 
public void copy Into Object target Array this copy Into target Array 0  copyInto targetArray copyInto targetArray
public void copy Into Object target Array int index System arraycopy this elements 0 target Array index this size  copyInto targetArray targetArray
public Object element At int index return this elements index  elementAt
public Object find Object element for int i this size i 0 if element equals this elements i return element return null 
public Object remove Object element assumes only one occurrence of the element exists for int i this size i 0 if element equals this elements i shift the remaining elements down one spot System arraycopy this elements i 1 this elements i this size i this elements this size null return element return null 
public void remove All for int i this size i 0 this elements i null this size 0  removeAll
public int size return this size 
public String to String String s NON NLS 1 for int i 0 i this size i s this elements i to String n NON NLS 1 return s  toString toString

public Simple Name Vector this max Size INITIAL SIZE this size 0 this elements new char this max Size  SimpleNameVector maxSize INITIAL_SIZE maxSize
public void add char new Element if this size this max Size knows that size starts max Size System arraycopy this elements 0 this elements new char this max Size 2 0 this size this elements size new Element  newElement maxSize maxSize maxSize newElement
public void add All char new Elements if this size new Elements length this max Size this max Size this size new Elements length assume no more elements will be added System arraycopy this elements 0 this elements new char this max Size 0 this size System arraycopy new Elements 0 this elements this size new Elements length this size new Elements length  addAll newElements newElements maxSize maxSize newElements maxSize newElements newElements newElements
public void copy Into Object target Array System arraycopy this elements 0 target Array 0 this size  copyInto targetArray targetArray
public boolean contains char element for int i this size i 0 if Char Operation equals element this elements i return true return false  CharOperation
public char element At int index return this elements index  elementAt
public char remove char element assumes only one occurrence of the element exists for int i this size i 0 if element this elements i shift the remaining elements down one spot System arraycopy this elements i 1 this elements i this size i this elements this size null return element return null 
public void remove All for int i this size i 0 this elements i null this size 0  removeAll
public int size return this size 
public String to String String Buffer buffer new String Buffer for int i 0 i this size i buffer append this elements i append n NON NLS 1 return buffer to String  toString StringBuffer StringBuffer toString

public interface Displayable String display String Object o  displayString
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings public static String bind String id String binding1 String binding2 return bind id new String binding1 binding2 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string public static String bind String id String binding return bind id new String binding 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string values public static String bind String id String bindings if id null return No message available NON NLS 1 String message null try message bundle get String id catch Missing Resource Exception e If we got an exception looking for the message fail gracefully by just returning the id we were looking for In most cases this is semi informative so is not too bad return Missing message id in bundle Name NON NLS 2 NON NLS 1 for compatibility with Message Format which eliminates double quotes in original message char message With No Double Quotes Char Operation replace message to Char Array DOUBLE QUOTES SINGLE QUOTE if bindings null return new String message With No Double Quotes int length message With No Double Quotes length int start 0 int end length String Buffer output null while true if end Char Operation index Of message With No Double Quotes start 1 if output null output new String Buffer length bindings length 20 output append message With No Double Quotes start end start if start Char Operation index Of message With No Double Quotes end 1 1 int index 1 String arg Id new String message With No Double Quotes end 1 start end 1 try index Integer parse Int arg Id output append bindings index catch Number Format Exception nfe could be nested message ID compiler name boolean done false if id equals arg Id String arg Message null try arg Message bundle get String arg Id output append arg Message done true catch Missing Resource Exception e unable to bind argument ignore will leave argument in if done output append message With No Double Quotes end 1 start end catch Array Index Out Of Bounds Exception e output append missing Integer to String index NON NLS 2 NON NLS 1 start else output append message With No Double Quotes end length break else if output null return new String message With No Double Quotes output append message With No Double Quotes start length start break return output to String  getString MissingResourceException bundleName MessageFormat messageWithNoDoubleQuotes CharOperation toCharArray DOUBLE_QUOTES SINGLE_QUOTE messageWithNoDoubleQuotes messageWithNoDoubleQuotes StringBuffer CharOperation indexOf messageWithNoDoubleQuotes StringBuffer messageWithNoDoubleQuotes CharOperation indexOf messageWithNoDoubleQuotes argId messageWithNoDoubleQuotes parseInt argId NumberFormatException argId argMessage argMessage getString argId argMessage MissingResourceException messageWithNoDoubleQuotes ArrayIndexOutOfBoundsException toString messageWithNoDoubleQuotes messageWithNoDoubleQuotes messageWithNoDoubleQuotes toString
Lookup the message with the given ID in this catalog public static String bind String id return bind id String null 
Creates a NLS catalog for the given locale public static void relocalize try bundle Resource Bundle get Bundle bundle Name Locale get Default catch Missing Resource Exception e System out println Missing resource bundle Name replace properties for locale Locale get Default NON NLS 1 NON NLS 2 throw e  ResourceBundle getBundle bundleName getDefault MissingResourceException bundleName getDefault
Returns the given bytes as a char array using a given encoding null means platform default public static char bytes To Char byte bytes String encoding throws IO Exception return get Input Stream As Char Array new Byte Array Input Stream bytes bytes length encoding  bytesToChar IOException getInputStreamAsCharArray ByteArrayInputStream
Returns the contents of the given file as a byte array throws IO Exception if a problem occured reading the file public static byte get File Byte Content File file throws IO Exception Input Stream stream null try stream new Buffered Input Stream new File Input Stream file return get Input Stream As Byte Array stream int file length finally if stream null try stream close catch IO Exception e ignore  IOException getFileByteContent IOException InputStream BufferedInputStream FileInputStream getInputStreamAsByteArray IOException
Returns the contents of the given file as a char array When encoding is null then the platform default one is used throws IO Exception if a problem occured reading the file public static char get File Char Content File file String encoding throws IO Exception Input Stream stream null try stream new Buffered Input Stream new File Input Stream file return get Input Stream As Char Array stream int file length encoding finally if stream null try stream close catch IO Exception e ignore  IOException getFileCharContent IOException InputStream BufferedInputStream FileInputStream getInputStreamAsCharArray IOException
Returns the given input stream s contents as a byte array If a length is specified ie if length 1 only length bytes are returned Otherwise all bytes in the stream are returned Note this doesn t close the stream throws IO Exception if a problem occured reading the stream public static byte get Input Stream As Byte Array Input Stream stream int length throws IO Exception byte contents if length 1 contents new byte 0 int contents Length 0 int amount Read 1 do int amount Requested Math max stream available DEFAULT READING SIZE read at least 8K resize contents if needed if contents Length amount Requested contents length System arraycopy contents 0 contents new byte contents Length amount Requested 0 contents Length read as many bytes as possible amount Read stream read contents contents Length amount Requested if amount Read 0 remember length of contents contents Length amount Read while amount Read 1 resize contents if necessary if contents Length contents length System arraycopy contents 0 contents new byte contents Length 0 contents Length else contents new byte length int len 0 int read Size 0 while read Size 1 len length See PR 1FMS89U We record first the read size In this case len is the actual read size len read Size read Size stream read contents len length len return contents  IOException getInputStreamAsByteArray InputStream IOException contentsLength amountRead amountRequested DEFAULT_READING_SIZE contentsLength amountRequested contentsLength amountRequested contentsLength amountRead contentsLength amountRequested amountRead contentsLength amountRead amountRead contentsLength contentsLength contentsLength readSize readSize readSize readSize
Returns the given input stream s contents as a character array If a length is specified ie if length 1 only length chars are returned Otherwise all chars in the stream are returned Note this doesn t close the stream throws IO Exception if a problem occured reading the stream public static char get Input Stream As Char Array Input Stream stream int length String encoding throws IO Exception Input Stream Reader reader null reader encoding null new Input Stream Reader stream new Input Stream Reader stream encoding char contents if length 1 contents Char Operation NO CHAR int contents Length 0 int amount Read 1 do int amount Requested Math max stream available DEFAULT READING SIZE read at least 8K resize contents if needed if contents Length amount Requested contents length System arraycopy contents 0 contents new char contents Length amount Requested 0 contents Length read as many chars as possible amount Read reader read contents contents Length amount Requested if amount Read 0 remember length of contents contents Length amount Read while amount Read 1 Do not keep first character for UTF 8 BOM encoding int start 0 if UTF 8 equals encoding NON NLS 1 if contents 0 0xFEFF if BOM char then skip contents Length start 1 resize contents if necessary if contents Length contents length System arraycopy contents start contents new char contents Length 0 contents Length else contents new char length int len 0 int read Size 0 while read Size 1 len length See PR 1FMS89U We record first the read size In this case len is the actual read size len read Size read Size reader read contents len length len Do not keep first character for UTF 8 BOM encoding int start 0 if UTF 8 equals encoding NON NLS 1 if contents 0 0xFEFF if BOM char then skip len start 1 See PR 1FMS89U Now we need to resize in case the default encoding used more than one byte for each character if len length System arraycopy contents start contents new char len 0 len return contents  IOException getInputStreamAsCharArray InputStream IOException InputStreamReader InputStreamReader InputStreamReader CharOperation NO_CHAR contentsLength amountRead amountRequested DEFAULT_READING_SIZE contentsLength amountRequested contentsLength amountRequested contentsLength amountRead contentsLength amountRequested amountRead contentsLength amountRead amountRead contentsLength contentsLength contentsLength contentsLength readSize readSize readSize readSize
Returns the contents of the given zip entry as a byte array throws IO Exception if a problem occured reading the zip entry public static byte get Zip Entry Byte Content Zip Entry ze Zip File zip throws IO Exception Input Stream stream null try stream new Buffered Input Stream zip get Input Stream ze return get Input Stream As Byte Array stream int ze get Size finally if stream null try stream close catch IO Exception e ignore  IOException getZipEntryByteContent ZipEntry ZipFile IOException InputStream BufferedInputStream getInputStream getInputStreamAsByteArray getSize IOException
Returns true iff str to Lower Case ends With jar str to Lower Case ends With zip implementation is not creating extra strings public final static boolean is Archive File Name String name int name Length name null 0 name length int suffix Length SUFFIX JAR length if name Length suffix Length return false try to match as JAR file for int i 0 i suffix Length i char c name char At name Length i 1 int suffix Index suffix Length i 1 if c SUFFIX jar suffix Index c SUFFIX JAR suffix Index try to match as ZIP file suffix Length SUFFIX ZIP length if name Length suffix Length return false for int j 0 j suffix Length j c name char At name Length j 1 suffix Index suffix Length j 1 if c SUFFIX zip suffix Index c SUFFIX ZIP suffix Index return false return true return true  toLowerCase endsWith toLowerCase endsWith isArchiveFileName nameLength suffixLength SUFFIX_JAR nameLength suffixLength suffixLength charAt nameLength suffixIndex suffixLength SUFFIX_jar suffixIndex SUFFIX_JAR suffixIndex suffixLength SUFFIX_ZIP nameLength suffixLength suffixLength charAt nameLength suffixIndex suffixLength SUFFIX_zip suffixIndex SUFFIX_ZIP suffixIndex
Returns true iff str to Lower Case ends With class implementation is not creating extra strings public final static boolean is Class File Name String name int name Length name null 0 name length int suffix Length SUFFIX CLASS length if name Length suffix Length return false for int i 0 i suffix Length i char c name char At name Length i 1 int suffix Index suffix Length i 1 if c SUFFIX class suffix Index c SUFFIX CLASS suffix Index return false return true  toLowerCase endsWith isClassFileName nameLength suffixLength SUFFIX_CLASS nameLength suffixLength suffixLength charAt nameLength suffixIndex suffixLength SUFFIX_class suffixIndex SUFFIX_CLASS suffixIndex
Returns true iff str to Lower Case ends With class implementation is not creating extra strings public final static boolean is Class File Name char name int name Length name null 0 name length int suffix Length SUFFIX CLASS length if name Length suffix Length return false for int i 0 offset name Length suffix Length i suffix Length i char c name offset i if c SUFFIX class i c SUFFIX CLASS i return false return true  toLowerCase endsWith isClassFileName nameLength suffixLength SUFFIX_CLASS nameLength suffixLength nameLength suffixLength suffixLength SUFFIX_class SUFFIX_CLASS
Returns true iff str to Lower Case ends With java implementation is not creating extra strings public final static boolean is Java File Name String name int name Length name null 0 name length int suffix Length SUFFIX JAVA length if name Length suffix Length return false for int i 0 i suffix Length i char c name char At name Length i 1 int suffix Index suffix Length i 1 if c SUFFIX java suffix Index c SUFFIX JAVA suffix Index return false return true  toLowerCase endsWith isJavaFileName nameLength suffixLength SUFFIX_JAVA nameLength suffixLength suffixLength charAt nameLength suffixIndex suffixLength SUFFIX_java suffixIndex SUFFIX_JAVA suffixIndex
Returns true iff str to Lower Case ends With java implementation is not creating extra strings public final static boolean is Java File Name char name int name Length name null 0 name length int suffix Length SUFFIX JAVA length if name Length suffix Length return false for int i 0 offset name Length suffix Length i suffix Length i char c name offset i if c SUFFIX java i c SUFFIX JAVA i return false return true  toLowerCase endsWith isJavaFileName nameLength suffixLength SUFFIX_JAVA nameLength suffixLength nameLength suffixLength suffixLength SUFFIX_java SUFFIX_JAVA
return to String objects new Displayable public String display String Object o if o null return null NON NLS 1 return o to String  toString displayString toString
Converts an array of Objects into String public static String to String Object objects return to String objects new Displayable public String display String Object o if o null return null NON NLS 1 return o to String  toString toString displayString toString
Converts an array of Objects into String public static String to String Object objects Displayable renderer if objects null return NON NLS 1 String Buffer buffer new String Buffer 10 for int i 0 i objects length i if i 0 buffer append NON NLS 1 buffer append renderer display String objects i return buffer to String  toString StringBuffer StringBuffer displayString toString
Converts a boolean value into Boolean param bool The boolean to convert return The corresponding Boolean object TRUE or FALSE public static Boolean to Boolean boolean bool if bool return Boolean TRUE else return Boolean FALSE  toBoolean

public final class Assert private Assert cannot be instantiated 
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression return is Legal expression NON NLS 1  IllegalArgumentException IllegalArgumentException isLegal isLegal
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression String message if expression throw new Illegal Argument Exception message return expression  IllegalArgumentException IllegalArgumentException isLegal IllegalArgumentException
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown param object the value to test exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object is Not Null object NON NLS 1  IllegalArgumentException isNotNull isNotNull
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param object the value to test param message the message to include in the exception exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object String message if object null throw new Assertion Failed Exception null argument message NON NLS 1  IllegalArgumentException isNotNull AssertionFailedException
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails public static boolean is True boolean expression return is True expression NON NLS 1  isTrue isTrue
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails public static boolean is True boolean expression String message if expression throw new Assertion Failed Exception Assertion failed message NON NLS 1 return expression  isTrue AssertionFailedException
public static class Assertion Failed Exception extends Runtime Exception public Assertion Failed Exception String detail super detail  AssertionFailedException RuntimeException AssertionFailedException

public Basic Compilation Unit char contents char package Name String file Name this contents contents this file Name file Name to Char Array this package Name package Name int start file Name last Index Of 1 NON NLS 1 if start 0 start file Name last Index Of NON NLS 1 start file Name last Index Of 1 NON NLS 1 int end file Name last Index Of NON NLS 1 if end 1 end file Name length this main Type Name file Name substring start end to Char Array this encoding null  BasicCompilationUnit packageName fileName fileName fileName toCharArray packageName packageName fileName lastIndexOf fileName lastIndexOf fileName lastIndexOf fileName lastIndexOf fileName mainTypeName fileName toCharArray
public Basic Compilation Unit char contents char package Name String file Name String encoding this contents package Name file Name this encoding encoding  BasicCompilationUnit packageName fileName packageName fileName
public Basic Compilation Unit char contents char package Name String file Name I Java Element java Element this contents package Name file Name init Encoding java Element  BasicCompilationUnit packageName fileName IJavaElement javaElement packageName fileName initEncoding javaElement
private void init Encoding I Java Element java Element if java Element null try I Java Project java Project java Element get Java Project switch java Element get Element Type case I Java Element COMPILATION UNIT I File file I File java Element get Resource if file null this encoding file get Charset break if no file then get project encoding default I Project project I Project java Project get Resource if project null this encoding project get Default Charset break catch Core Exception e1 this encoding null else this encoding null  initEncoding IJavaElement javaElement javaElement IJavaProject javaProject javaElement getJavaProject javaElement getElementType IJavaElement COMPILATION_UNIT IFile IFile javaElement getResource getCharset IProject IProject javaProject getResource getDefaultCharset CoreException
public char get Contents if this contents null return this contents answer the cached source otherwise retrieve it try return Util get File Char Content new File new String this file Name this encoding catch IO Exception e could not read file returns an empty array return Char Operation NO CHAR  getContents getFileCharContent fileName IOException CharOperation NO_CHAR
return Char Operation NO CHAR public char get File Name return this file Name  CharOperation NO_CHAR getFileName fileName
return this file Name public char get Main Type Name return this main Type Name  fileName getMainTypeName mainTypeName
return this main Type Name public char get Package Name return this package Name  mainTypeName getPackageName packageName
return this package Name public String to String return Compilation Unit new String this file Name NON NLS 1  packageName toString CompilationUnit fileName

public class Batch Operation extends Java Model Operation protected I Workspace Runnable runnable public Batch Operation I Workspace Runnable runnable this runnable runnable  BatchOperation JavaModelOperation IWorkspaceRunnable BatchOperation IWorkspaceRunnable
protected void execute Operation throws Java Model Exception try this runnable run this progress Monitor catch Core Exception ce if ce instanceof Java Model Exception throw Java Model Exception ce else if ce get Status get Code I Resource Status OPERATION FAILED Throwable e ce get Status get Exception if e instanceof Java Model Exception throw Java Model Exception e throw new Java Model Exception ce  executeOperation JavaModelException progressMonitor CoreException JavaModelException JavaModelException getStatus getCode IResourceStatus OPERATION_FAILED getStatus getException JavaModelException JavaModelException JavaModelException
see org eclipse jdt internal core Java Model Operation verify protected I Java Model Status verify cannot verify user defined operation return Java Model Status VERIFIED OK  JavaModelOperation IJavaModelStatus JavaModelStatus VERIFIED_OK

per Owner Working Copies map is not null if the working copy is a shared working copy public Become Working Copy Operation Compilation Unit working Copy I Problem Requestor problem Requestor super new I Java Element working Copy this problem Requestor problem Requestor  perOwnerWorkingCopies BecomeWorkingCopyOperation CompilationUnit workingCopy IProblemRequestor problemRequestor IJavaElement workingCopy problemRequestor problemRequestor
protected void execute Operation throws Java Model Exception open the working copy now to ensure contents are that of the current state of this element Compilation Unit working Copy get Working Copy Java Model Manager get Java Model Manager get Per Working Copy Info working Copy true create if needed true record usage this problem Requestor working Copy open When Closed working Copy create Element Info this progress Monitor if working Copy is Primary report added java delta for a non primary working copy Java Element Delta delta new Java Element Delta this get Java Model delta added working Copy add Delta delta else if working Copy get Resource is Accessible report a F PRIMARY WORKING COPY change delta for a primary working copy Java Element Delta delta new Java Element Delta this get Java Model delta changed working Copy I Java Element Delta F PRIMARY WORKING COPY add Delta delta else report an ADDED delta Java Element Delta delta new Java Element Delta this get Java Model delta added working Copy I Java Element Delta F PRIMARY WORKING COPY add Delta delta this result Elements new I Java Element working Copy  executeOperation JavaModelException CompilationUnit workingCopy getWorkingCopy JavaModelManager getJavaModelManager getPerWorkingCopyInfo workingCopy problemRequestor workingCopy openWhenClosed workingCopy createElementInfo progressMonitor workingCopy isPrimary JavaElementDelta JavaElementDelta getJavaModel workingCopy addDelta workingCopy getResource isAccessible F_PRIMARY_WORKING_COPY JavaElementDelta JavaElementDelta getJavaModel workingCopy IJavaElementDelta F_PRIMARY_WORKING_COPY addDelta JavaElementDelta JavaElementDelta getJavaModel workingCopy IJavaElementDelta F_PRIMARY_WORKING_COPY addDelta resultElements IJavaElement workingCopy
Returns the working copy this operation is working on protected Compilation Unit get Working Copy return Compilation Unit get Element To Process  CompilationUnit getWorkingCopy CompilationUnit getElementToProcess
see Java Model Operation is Read Only public boolean is Read Only return true  JavaModelOperation isReadOnly isReadOnly

Constructs a handle to the field with the given name in the specified type protected Binary Field Java Element parent String name super parent name  BinaryField JavaElement
super parent name public boolean equals Object o if o instanceof Binary Field return false return super equals o  BinaryField
see I Field public Object get Constant throws Java Model Exception I Binary Field info I Binary Field get Element Info return convert Constant info get Constant  IField getConstant JavaModelException IBinaryField IBinaryField getElementInfo convertConstant getConstant
see I Member public int get Flags throws Java Model Exception I Binary Field info I Binary Field get Element Info return info get Modifiers  IMember getFlags JavaModelException IBinaryField IBinaryField getElementInfo getModifiers
see I Java Element public int get Element Type return FIELD  IJavaElement getElementType
see Java Element get Handle Memento protected char get Handle Memento Delimiter return Java Element JEM FIELD  JavaElement getHandleMemento getHandleMementoDelimiter JavaElement JEM_FIELD
see I Field public String get Type Signature throws Java Model Exception I Binary Field info I Binary Field get Element Info return new String Class File translated Name info get Type Name  IField getTypeSignature JavaModelException IBinaryField IBinaryField getElementInfo ClassFile translatedName getTypeName
protected void to String Info int tab String Buffer buffer Object info buffer append this tab String tab if info null to String Name buffer buffer append not open NON NLS 1 else if info NO INFO to String Name buffer else try buffer append Signature to String this get Type Signature buffer append NON NLS 1 to String Name buffer catch Java Model Exception e buffer append Java Model Exception in to String of get Element Name NON NLS 1  toStringInfo StringBuffer tabString toStringName NO_INFO toStringName toString getTypeSignature toStringName JavaModelException JavaModelException toString getElementName

Constructs a binary member protected Binary Member Java Element parent String name super parent name  BinaryMember JavaElement
see I Source Manipulation public void copy I Java Element container I Java Element sibling String rename boolean force I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants READ ONLY this  ISourceManipulation IJavaElement IJavaElement IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants READ_ONLY
protected void generate Infos Object info Hash Map new Elements I Progress Monitor pm throws Java Model Exception Openable openable Parent Openable get Openable Parent if openable Parent null return Class File Info openable Parent Info Class File Info Java Model Manager get Java Model Manager get Info openable Parent if openable Parent Info null openable Parent generate Infos openable Parent create Element Info new Elements pm openable Parent Info Class File Info new Elements get openable Parent if openable Parent Info null return openable Parent Info get Binary Children new Elements forces the initialization  generateInfos HashMap newElements IProgressMonitor JavaModelException openableParent getOpenableParent openableParent ClassFileInfo openableParentInfo ClassFileInfo JavaModelManager getJavaModelManager getInfo openableParent openableParentInfo openableParent generateInfos openableParent createElementInfo newElements openableParentInfo ClassFileInfo newElements openableParent openableParentInfo openableParentInfo getBinaryChildren newElements
public I Source Range get Name Range throws Java Model Exception Source Mapper mapper get Source Mapper if mapper null ensure the class file s buffer is open so that source ranges are computed Class File get Class File get Buffer return mapper get Name Range this else return Source Mapper fg Unknown Range  ISourceRange getNameRange JavaModelException SourceMapper getSourceMapper ClassFile getClassFile getBuffer getNameRange SourceMapper fgUnknownRange
public I Source Range get Source Range throws Java Model Exception Source Mapper mapper get Source Mapper if mapper null ensure the class file s buffer is open so that source ranges are computed Class File get Class File get Buffer return mapper get Source Range this else return Source Mapper fg Unknown Range  ISourceRange getSourceRange JavaModelException SourceMapper getSourceMapper ClassFile getClassFile getBuffer getSourceRange SourceMapper fgUnknownRange
see I Member public boolean is Binary return true  IMember isBinary
see I Java Element public boolean is Structure Known throws Java Model Exception return I Java Element get Openable Parent is Structure Known  IJavaElement isStructureKnown JavaModelException IJavaElement getOpenableParent isStructureKnown
see I Source Manipulation public void move I Java Element container I Java Element sibling String rename boolean force I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants READ ONLY this  ISourceManipulation IJavaElement IJavaElement IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants READ_ONLY
see I Source Manipulation public void rename String new Name boolean force I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants READ ONLY this  ISourceManipulation newName IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants READ_ONLY
Throws an exception as this element is read only public void set Contents String contents I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants READ ONLY this  setContents IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants READ_ONLY

public void enter Method int declaration Start int modifiers char return Type Name char selector int name Source Start int name Source End char param Types char param Names char exceptions if param Names null int length param Names length this parameters Names new String length for int i 0 i length i this parameters Names i new String param Names i  enterMethod declarationStart returnTypeName nameSourceStart nameSourceEnd paramTypes paramNames paramNames paramNames parametersNames parametersNames paramNames
public void enter Constructor int declaration Start int modifiers char selector int name Source Start int name Source End char param Types char param Names char exceptions if param Names null int length param Names length this parameters Names new String length for int i 0 i length i this parameters Names i new String param Names i  enterConstructor declarationStart nameSourceStart nameSourceEnd paramTypes paramNames paramNames paramNames parametersNames parametersNames paramNames
public String get Parameters Names return this parameters Names  getParametersNames parametersNames
protected String return Type protected Binary Method Java Element parent String name String param Types super parent name Assert is True name index Of 1 if param Types null this parameter Types NO TYPES else this parameter Types param Types  returnType BinaryMethod JavaElement paramTypes isTrue indexOf paramTypes parameterTypes NO_TYPES parameterTypes paramTypes
public boolean equals Object o if o instanceof Binary Method return false return super equals o Util equal Arrays Or Null this parameter Types Binary Method o parameter Types  BinaryMethod equalArraysOrNull parameterTypes BinaryMethod parameterTypes
public String get Exception Types throws Java Model Exception if this exception Types null I Binary Method info I Binary Method get Element Info char e Type Names info get Exception Type Names if e Type Names null e Type Names length 0 this exception Types NO TYPES else e Type Names Class File translated Names e Type Names this exception Types new String e Type Names length for int j 0 length e Type Names length j length j 1G01HRY ITPJCORE WINNT method get Exception Type not in correct format int name Length e Type Names j length char converted Name new char name Length 2 System arraycopy e Type Names j 0 converted Name 1 name Length converted Name 0 L converted Name name Length 1 this exception Types j new String converted Name return this exception Types  getExceptionTypes JavaModelException exceptionTypes IBinaryMethod IBinaryMethod getElementInfo eTypeNames getExceptionTypeNames eTypeNames eTypeNames exceptionTypes NO_TYPES eTypeNames ClassFile translatedNames eTypeNames exceptionTypes eTypeNames eTypeNames getExceptionType nameLength eTypeNames convertedName nameLength eTypeNames convertedName nameLength convertedName convertedName nameLength exceptionTypes convertedName exceptionTypes
see I Java Element public int get Element Type return METHOD  IJavaElement getElementType
see I Member public int get Flags throws Java Model Exception I Binary Method info I Binary Method get Element Info return info get Modifiers  IMember getFlags JavaModelException IBinaryMethod IBinaryMethod getElementInfo getModifiers
public String get Handle Memento String Buffer buff new String Buffer Java Element get Parent get Handle Memento char delimiter get Handle Memento Delimiter buff append delimiter escape Memento Name buff get Element Name for int i 0 i this parameter Types length i buff append delimiter buff append this parameter Types i if this occurrence Count 1 buff append JEM COUNT buff append this occurrence Count return buff to String  getHandleMemento StringBuffer StringBuffer JavaElement getParent getHandleMemento getHandleMementoDelimiter escapeMementoName getElementName parameterTypes parameterTypes occurrenceCount JEM_COUNT occurrenceCount toString
see Java Element get Handle Memento protected char get Handle Memento Delimiter return Java Element JEM METHOD  JavaElement getHandleMemento getHandleMementoDelimiter JavaElement JEM_METHOD
see I Method public int get Number Of Parameters return this parameter Types null 0 this parameter Types length  IMethod getNumberOfParameters parameterTypes parameterTypes
public String get Parameter Names throws Java Model Exception if this parameter Names null force source mapping if not already done I Type type I Type get Parent Source Mapper mapper get Source Mapper if mapper null char param Names mapper get Method Parameter Names this map source and try to find parameter names if param Names null char source mapper find Source type if source null mapper map Source type source param Names mapper get Method Parameter Names this if parameter names exist convert parameter names to String array if param Names null this parameter Names new String param Names length for int i 0 i param Names length i this parameter Names i new String param Names i if still no parameter names produce fake ones if this parameter Names null I Binary Method info I Binary Method get Element Info int param Count Signature get Parameter Count new String info get Method Descriptor this parameter Names new String param Count for int i 0 i param Count i this parameter Names i arg i NON NLS 1 return this parameter Names  getParameterNames JavaModelException parameterNames IType IType getParent SourceMapper getSourceMapper paramNames getMethodParameterNames paramNames findSource mapSource paramNames getMethodParameterNames paramNames parameterNames paramNames paramNames parameterNames paramNames parameterNames IBinaryMethod IBinaryMethod getElementInfo paramCount getParameterCount getMethodDescriptor parameterNames paramCount paramCount parameterNames parameterNames
see I Method public String get Parameter Types return this parameter Types  IMethod getParameterTypes parameterTypes
see I Method get Type Parameter Signatures since 3 0 public String get Type Parameter Signatures throws Java Model Exception TODO jerome missing implementation return new String 0  IMethod getTypeParameterSignatures getTypeParameterSignatures JavaModelException
public String get Return Type throws Java Model Exception I Binary Method info I Binary Method get Element Info if this return Type null String return Type Name Signature get Return Type new String info get Method Descriptor this return Type new String Class File translated Name return Type Name to Char Array return this return Type  getReturnType JavaModelException IBinaryMethod IBinaryMethod getElementInfo returnType returnTypeName getReturnType getMethodDescriptor returnType ClassFile translatedName returnTypeName toCharArray returnType
see I Method public String get Signature throws Java Model Exception I Binary Method info I Binary Method get Element Info return new String info get Method Descriptor  IMethod getSignature JavaModelException IBinaryMethod IBinaryMethod getElementInfo getMethodDescriptor
see org eclipse jdt internal core Java Element hash Code public int hash Code int hash super hash Code for int i 0 length parameter Types length i length i hash Util combine Hash Codes hash parameter Types i hash Code return hash  JavaElement hashCode hashCode hashCode parameterTypes combineHashCodes parameterTypes hashCode
see I Method public boolean is Constructor throws Java Model Exception I Binary Method info I Binary Method get Element Info return info is Constructor  IMethod isConstructor JavaModelException IBinaryMethod IBinaryMethod getElementInfo isConstructor
see I Method is Main Method public boolean is Main Method throws Java Model Exception return this is Main Method this  IMethod isMainMethod isMainMethod JavaModelException isMainMethod
public boolean is Similar I Method method return this are Similar Methods this get Element Name this get Parameter Types method get Element Name method get Parameter Types null  isSimilar IMethod areSimilarMethods getElementName getParameterTypes getElementName getParameterTypes
public String readable Name String Buffer buffer new String Buffer super readable Name buffer append NON NLS 1 String param Types this parameter Types int length if param Types null length param Types length 0 for int i 0 i length i buffer append Signature to String param Types i if i length 1 buffer append NON NLS 1 buffer append NON NLS 1 return buffer to String  readableName StringBuffer StringBuffer readableName paramTypes parameterTypes paramTypes paramTypes toString paramTypes toString
protected void to String Info int tab String Buffer buffer Object info buffer append this tab String tab if info null to String Name buffer buffer append not open NON NLS 1 else if info NO INFO to String Name buffer else try if Flags is Static this get Flags buffer append static NON NLS 1 if this is Constructor buffer append Signature to String this get Return Type buffer append to String Name buffer catch Java Model Exception e buffer append Java Model Exception in to String of get Element Name NON NLS 1  toStringInfo StringBuffer tabString toStringName NO_INFO toStringName isStatic getFlags isConstructor toString getReturnType toStringName JavaModelException JavaModelException toString getElementName
protected void to String Name String Buffer buffer buffer append get Element Name buffer append String parameters this get Parameter Types int length if parameters null length parameters length 0 for int i 0 i length i buffer append Signature to String parameters i if i length 1 buffer append NON NLS 1 buffer append if this occurrence Count 1 buffer append NON NLS 1 buffer append this occurrence Count  toStringName StringBuffer getElementName getParameterTypes toString occurrenceCount occurrenceCount

private static final String NO STRINGS new String 0 protected Binary Type Java Element parent String name super parent name Assert is True name index Of 1  NO_STRINGS BinaryType JavaElement isTrue indexOf
Remove my cached children from the Java Model protected void closing Object info throws Java Model Exception Class File Info cfi get Class File Info cfi remove Binary Children  JavaModelException ClassFileInfo getClassFileInfo removeBinaryChildren
see I Type code Complete char int int char char int boolean I Completion Requestor public void code Complete char snippet int insertion int position char local Variable Type Names char local Variable Names int local Variable Modifiers boolean is Static I Completion Requestor requestor throws Java Model Exception code Complete snippet insertion position local Variable Type Names local Variable Names local Variable Modifiers is Static requestor Default Working Copy Owner PRIMARY  IType codeComplete ICompletionRequestor codeComplete localVariableTypeNames localVariableNames localVariableModifiers isStatic ICompletionRequestor JavaModelException codeComplete localVariableTypeNames localVariableNames localVariableModifiers isStatic DefaultWorkingCopyOwner
public void code Complete char snippet int insertion int position char local Variable Type Names char local Variable Names int local Variable Modifiers boolean is Static I Completion Requestor requestor Working Copy Owner owner throws Java Model Exception if requestor null throw new Illegal Argument Exception Completion requestor cannot be null NON NLS 1 Java Project project Java Project get Java Project Searchable Environment environment Searchable Environment project new Searchable Name Environment owner Completion Requestor Wrapper requestor Wrapper new Completion Requestor Wrapper requestor environment name Lookup Completion Engine engine new Completion Engine environment requestor Wrapper project get Options true project requestor Wrapper completion Engine engine String source get Class File get Source if source null insertion 1 insertion source length code complete char prefix Char Operation concat source substring 0 insertion to Char Array new char char suffix Char Operation concat new char source substring insertion to Char Array char fake Source Char Operation concat prefix snippet suffix Basic Compilation Unit cu new Basic Compilation Unit fake Source null get Element Name project use project to retrieve corresponding java I File engine complete cu prefix length position prefix length else engine complete this snippet position local Variable Type Names local Variable Names local Variable Modifiers is Static  codeComplete localVariableTypeNames localVariableNames localVariableModifiers isStatic ICompletionRequestor WorkingCopyOwner JavaModelException IllegalArgumentException JavaProject JavaProject getJavaProject SearchableEnvironment SearchableEnvironment newSearchableNameEnvironment CompletionRequestorWrapper requestorWrapper CompletionRequestorWrapper nameLookup CompletionEngine CompletionEngine requestorWrapper getOptions requestorWrapper completionEngine getClassFile getSource CharOperation toCharArray CharOperation toCharArray fakeSource CharOperation BasicCompilationUnit BasicCompilationUnit fakeSource getElementName IFile localVariableTypeNames localVariableNames localVariableModifiers isStatic
see I Type create Field String I Java Element boolean I Progress Monitor public I Field create Field String contents I Java Element sibling boolean force I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants READ ONLY this  IType createField IJavaElement IProgressMonitor IField createField IJavaElement IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants READ_ONLY
see I Type create Initializer String I Java Element I Progress Monitor public I Initializer create Initializer String contents I Java Element sibling I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants READ ONLY this  IType createInitializer IJavaElement IProgressMonitor IInitializer createInitializer IJavaElement IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants READ_ONLY
see I Type create Method String I Java Element boolean I Progress Monitor public I Method create Method String contents I Java Element sibling boolean force I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants READ ONLY this  IType createMethod IJavaElement IProgressMonitor IMethod createMethod IJavaElement IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants READ_ONLY
see I Type create Type String I Java Element boolean I Progress Monitor public I Type create Type String contents I Java Element sibling boolean force I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants READ ONLY this  IType createType IJavaElement IProgressMonitor IType createType IJavaElement IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants READ_ONLY
throw new Java Model Exception new Java Model Status I Java Model Status Constants READ ONLY this public boolean equals Object o if o instanceof Binary Type return false return super equals o  JavaModelException JavaModelStatus IJavaModelStatusConstants READ_ONLY BinaryType
public I Method find Methods I Method method try return this find Methods method this get Methods catch Java Model Exception e if type doesn t exist no matching method can exist return null  IMethod findMethods IMethod findMethods getMethods JavaModelException
public I Java Element get Children throws Java Model Exception ensure present fix for 1FWWVYT if exists throw new Not Present Exception get children Class File Info cfi get Class File Info if cfi binary Children null Java Model Manager manager Java Model Manager get Java Model Manager boolean had Temporary Cache manager has Temporary Cache try Object info manager get Info this Hash Map new Elements manager get Temporary Cache cfi read Binary Children new Elements I Binary Type info if had Temporary Cache manager put Infos this new Elements finally if had Temporary Cache manager reset Temporary Cache return cfi binary Children  IJavaElement getChildren JavaModelException newNotPresentException ClassFileInfo getClassFileInfo binaryChildren JavaModelManager JavaModelManager getJavaModelManager hadTemporaryCache hasTemporaryCache getInfo HashMap newElements getTemporaryCache readBinaryChildren newElements IBinaryType hadTemporaryCache putInfos newElements hadTemporaryCache resetTemporaryCache binaryChildren
return cfi binary Children protected Class File Info get Class File Info throws Java Model Exception Class File cf Class File this parent return Class File Info cf get Element Info  binaryChildren ClassFileInfo getClassFileInfo JavaModelException ClassFile ClassFile ClassFileInfo getElementInfo
public I Type get Declaring Type I Class File class File this get Class File if class File is Open try char enclosing Type Name I Binary Type get Element Info get Enclosing Type Name if enclosing Type Name null return null enclosing Type Name Class File unqualified Name enclosing Type Name workaround problem with class files compiled with javac 1 1 that return a non null enclosing type name for local types defined in anonymous e g A 1 B if class File get Element Name length enclosing Type Name length 1 Character is Digit class File get Element Name char At enclosing Type Name length 1 return null return get Package Fragment get Class File new String enclosing Type Name SUFFIX STRING class get Type catch Java Model Exception npe return null else cannot access class file without opening it and get Declaring Type is supposed to be a handle only method so default to assuming is an enclosing type separator String class File Name class File get Element Name int last Dollar 1 for int i 0 length class File Name length i length i char c class File Name char At i if Character is Digit c last Dollar i 1 anonymous or local type return null else if c last Dollar i if last Dollar 1 return null else String enclosing Name class File Name substring 0 last Dollar String enclosing Class File Name enclosing Name SUFFIX STRING class return new Binary Type Java Element this get Package Fragment get Class File enclosing Class File Name enclosing Name substring enclosing Name last Index Of 1  IType getDeclaringType IClassFile classFile getClassFile classFile isOpen enclosingTypeName IBinaryType getElementInfo getEnclosingTypeName enclosingTypeName enclosingTypeName ClassFile unqualifiedName enclosingTypeName classFile getElementName enclosingTypeName isDigit classFile getElementName charAt enclosingTypeName getPackageFragment getClassFile enclosingTypeName SUFFIX_STRING_class getType JavaModelException getDeclaringType classFileName classFile getElementName lastDollar classFileName classFileName charAt isDigit lastDollar lastDollar lastDollar enclosingName classFileName lastDollar enclosingClassFileName enclosingName SUFFIX_STRING_class BinaryType JavaElement getPackageFragment getClassFile enclosingClassFileName enclosingName enclosingName lastIndexOf
see I Java Element public int get Element Type return TYPE  IJavaElement getElementType
see I Type get Field String name public I Field get Field String field Name return new Binary Field this field Name  IType getField IField getField fieldName BinaryField fieldName
public I Field get Fields throws Java Model Exception Array List list get Children Of Type FIELD int size if size list size 0 return NO FIELDS else I Field array new I Field size list to Array array return array  IField getFields JavaModelException ArrayList getChildrenOfType NO_FIELDS IField IField toArray
see I Member get Flags public int get Flags throws Java Model Exception I Binary Type info I Binary Type get Element Info return info get Modifiers  IMember getFlags getFlags JavaModelException IBinaryType IBinaryType getElementInfo getModifiers
see I Type get Fully Qualified Name public String get Fully Qualified Name return this get Fully Qualified Name  IType getFullyQualifiedName getFullyQualifiedName getFullyQualifiedName
public String get Fully Qualified Name char enclosing Type Separator String package Name get Package Fragment get Element Name if package Name equals I Package Fragment DEFAULT PACKAGE NAME return get Type Qualified Name enclosing Type Separator return package Name get Type Qualified Name enclosing Type Separator  getFullyQualifiedName enclosingTypeSeparator packageName getPackageFragment getElementName packageName IPackageFragment DEFAULT_PACKAGE_NAME getTypeQualifiedName enclosingTypeSeparator packageName getTypeQualifiedName enclosingTypeSeparator
public I Java Element get Handle From Memento String token Memento Tokenizer memento Working Copy Owner working Copy Owner switch token char At 0 case JEM COUNT return get Handle Updating Count From Memento memento working Copy Owner case JEM FIELD String field Name memento next Token Java Element field Java Element get Field field Name return field get Handle From Memento memento working Copy Owner case JEM INITIALIZER String count memento next Token Java Element initializer Java Element get Initializer Integer parse Int count return initializer get Handle From Memento memento working Copy Owner case JEM METHOD String selector memento next Token Array List params new Array List next Param while memento has More Tokens token memento next Token switch token char At 0 case JEM TYPE break next Param case JEM METHOD String param memento next Token String Buffer buffer new String Buffer while Signature C ARRAY param char At 0 buffer append Signature C ARRAY param memento next Token params add buffer to String param break default break next Param String parameters new String params size params to Array parameters Java Element method Java Element get Method selector parameters if token null switch token char At 0 case JEM TYPE case JEM LOCALVARIABLE return method get Handle From Memento token memento working Copy Owner default return method else return method case JEM TYPE String type Name if memento has More Tokens type Name memento next Token char first Char type Name char At 0 if first Char JEM FIELD first Char JEM INITIALIZER first Char JEM METHOD first Char JEM TYPE first Char JEM COUNT token type Name type Name NON NLS 1 else token null else type Name NON NLS 1 token null Java Element type Java Element get Type type Name if token null return type get Handle From Memento memento working Copy Owner else return type get Handle From Memento token memento working Copy Owner return null  IJavaElement getHandleFromMemento MementoTokenizer WorkingCopyOwner workingCopyOwner charAt JEM_COUNT getHandleUpdatingCountFromMemento workingCopyOwner JEM_FIELD fieldName nextToken JavaElement JavaElement getField fieldName getHandleFromMemento workingCopyOwner JEM_INITIALIZER nextToken JavaElement JavaElement getInitializer parseInt getHandleFromMemento workingCopyOwner JEM_METHOD nextToken ArrayList ArrayList nextParam hasMoreTokens nextToken charAt JEM_TYPE nextParam JEM_METHOD nextToken StringBuffer StringBuffer C_ARRAY charAt C_ARRAY nextToken toString nextParam toArray JavaElement JavaElement getMethod charAt JEM_TYPE JEM_LOCALVARIABLE getHandleFromMemento workingCopyOwner JEM_TYPE typeName hasMoreTokens typeName nextToken firstChar typeName charAt firstChar JEM_FIELD firstChar JEM_INITIALIZER firstChar JEM_METHOD firstChar JEM_TYPE firstChar JEM_COUNT typeName typeName typeName JavaElement JavaElement getType typeName getHandleFromMemento workingCopyOwner getHandleFromMemento workingCopyOwner
see I Type get Initializer int occurrence Count public I Initializer get Initializer int count return new Initializer this count  IType getInitializer occurrenceCount IInitializer getInitializer
see I Type get Initializers public I Initializer get Initializers return NO INITIALIZERS  IType getInitializers IInitializer getInitializers NO_INITIALIZERS
see I Type get Method String name String parameter Type Signatures public I Method get Method String selector String parameter Type Signatures return new Binary Method this selector parameter Type Signatures  IType getMethod parameterTypeSignatures IMethod getMethod parameterTypeSignatures BinaryMethod parameterTypeSignatures
public I Method get Methods throws Java Model Exception Array List list get Children Of Type METHOD int size if size list size 0 return NO METHODS else I Method array new I Method size list to Array array return array  IMethod getMethods JavaModelException ArrayList getChildrenOfType NO_METHODS IMethod IMethod toArray
public I Package Fragment get Package Fragment I Java Element parent Element this parent while parent Element null if parent Element get Element Type I Java Element PACKAGE FRAGMENT return I Package Fragment parent Element else parent Element parent Element get Parent Assert is True false should not happen return null  IPackageFragment getPackageFragment IJavaElement parentElement parentElement parentElement getElementType IJavaElement PACKAGE_FRAGMENT IPackageFragment parentElement parentElement parentElement getParent isTrue
see I Type get Superclass Type Signature since 3 0 public String get Superclass Type Signature throws Java Model Exception I Binary Type info I Binary Type get Element Info char superclass Name info get Superclass Name if superclass Name null return null return new String Signature create Type Signature Class File translated Name superclass Name true  IType getSuperclassTypeSignature getSuperclassTypeSignature JavaModelException IBinaryType IBinaryType getElementInfo superclassName getSuperclassName superclassName createTypeSignature ClassFile translatedName superclassName
public String get Superclass Name throws Java Model Exception I Binary Type info I Binary Type get Element Info char superclass Name info get Superclass Name if superclass Name null return null return new String Class File translated Name superclass Name  getSuperclassName JavaModelException IBinaryType IBinaryType getElementInfo superclassName getSuperclassName superclassName ClassFile translatedName superclassName
public String get Super Interface Names throws Java Model Exception I Binary Type info I Binary Type get Element Info char names info get Interface Names int length if names null length names length 0 return NO STRINGS names Class File translated Names names String strings new String length for int i 0 i length i strings i new String names i return strings  getSuperInterfaceNames JavaModelException IBinaryType IBinaryType getElementInfo getInterfaceNames NO_STRINGS ClassFile translatedNames
see I Type get Super Interface Type Signatures since 3 0 public String get Super Interface Type Signatures throws Java Model Exception I Binary Type info I Binary Type get Element Info char names info get Interface Names int length if names null length names length 0 return NO STRINGS names Class File translated Names names String strings new String length for int i 0 i length i strings i new String Signature create Type Signature names i true return strings  IType getSuperInterfaceTypeSignatures getSuperInterfaceTypeSignatures JavaModelException IBinaryType IBinaryType getElementInfo getInterfaceNames NO_STRINGS ClassFile translatedNames createTypeSignature
see I Type get Type Parameter Signatures since 3 0 public String get Type Parameter Signatures throws Java Model Exception TODO jerome missing implementation return new String 0  IType getTypeParameterSignatures getTypeParameterSignatures JavaModelException
see I Type get Type String public I Type get Type String type Name I Class File class File get Package Fragment get Class File get Type Qualified Name type Name SUFFIX STRING class NON NLS 1 return new Binary Type Java Element class File type Name  IType getType IType getType typeName IClassFile classFile getPackageFragment getClassFile getTypeQualifiedName typeName SUFFIX_STRING_class BinaryType JavaElement classFile typeName
see I Type get Type Qualified Name public String get Type Qualified Name return this get Type Qualified Name  IType getTypeQualifiedName getTypeQualifiedName getTypeQualifiedName
public String get Type Qualified Name char enclosing Type Separator I Type declaring Type this get Declaring Type if declaring Type null String class File Name this get Class File get Element Name if class File Name index Of 1 top level class file name of type is same as name of class file return this name else anonymous or local class file return class File Name substring 0 class File Name last Index Of remove class else return declaring Type get Type Qualified Name enclosing Type Separator enclosing Type Separator this name  getTypeQualifiedName enclosingTypeSeparator IType declaringType getDeclaringType declaringType classFileName getClassFile getElementName classFileName indexOf classFileName classFileName lastIndexOf declaringType getTypeQualifiedName enclosingTypeSeparator enclosingTypeSeparator
public I Type get Types throws Java Model Exception Array List list get Children Of Type TYPE int size if size list size 0 return NO TYPES else I Type array new I Type size list to Array array return array  IType getTypes JavaModelException ArrayList getChildrenOfType NO_TYPES IType IType toArray
see I Type is Anonymous public boolean is Anonymous throws Java Model Exception I Binary Type info I Binary Type get Element Info return info is Anonymous  IType isAnonymous isAnonymous JavaModelException IBinaryType IBinaryType getElementInfo isAnonymous
see I Type is Class public boolean is Class throws Java Model Exception TODO jerome is Class should only return true for classes other than enum classes return is Interface  IType isClass isClass JavaModelException isClass isInterface
see I Type is Enum since 3 0 public boolean is Enum throws Java Model Exception TODO jerome missing implementation should only return true for enum classes return false  IType isEnum isEnum JavaModelException
public boolean is Interface throws Java Model Exception I Binary Type info I Binary Type get Element Info TODO jerome is Interface should not return true for annotation types return info is Interface  isInterface JavaModelException IBinaryType IBinaryType getElementInfo isInterface isInterface
see I Type is Annotation since 3 0 public boolean is Annotation throws Java Model Exception TODO jerome missing implementation should only return true for annotation types return false  IType isAnnotation isAnnotation JavaModelException
see I Type is Local public boolean is Local throws Java Model Exception I Binary Type info I Binary Type get Element Info return info is Local  IType isLocal isLocal JavaModelException IBinaryType IBinaryType getElementInfo isLocal
see I Type is Member public boolean is Member throws Java Model Exception I Binary Type info I Binary Type get Element Info return info is Member  IType isMember isMember JavaModelException IBinaryType IBinaryType getElementInfo isMember
see I Type public I Type Hierarchy load Type Hierachy Input Stream input I Progress Monitor monitor throws Java Model Exception return load Type Hierachy input Default Working Copy Owner PRIMARY monitor  IType ITypeHierarchy loadTypeHierachy InputStream IProgressMonitor JavaModelException loadTypeHierachy DefaultWorkingCopyOwner
see I Type public I Type Hierarchy load Type Hierachy Input Stream input Working Copy Owner owner I Progress Monitor monitor throws Java Model Exception return Type Hierarchy load this input owner  IType ITypeHierarchy loadTypeHierachy InputStream WorkingCopyOwner IProgressMonitor JavaModelException TypeHierarchy
see I Type new Supertype Hierarchy I Progress Monitor monitor public I Type Hierarchy new Supertype Hierarchy I Progress Monitor monitor throws Java Model Exception return this new Supertype Hierarchy Default Working Copy Owner PRIMARY monitor  IType newSupertypeHierarchy IProgressMonitor ITypeHierarchy newSupertypeHierarchy IProgressMonitor JavaModelException newSupertypeHierarchy DefaultWorkingCopyOwner
public I Type Hierarchy new Supertype Hierarchy I Compilation Unit working Copies I Progress Monitor monitor throws Java Model Exception Create Type Hierarchy Operation op new Create Type Hierarchy Operation this working Copies Search Engine create Workspace Scope false op run Operation monitor return op get Result  ITypeHierarchy newSupertypeHierarchy ICompilationUnit workingCopies IProgressMonitor JavaModelException CreateTypeHierarchyOperation CreateTypeHierarchyOperation workingCopies SearchEngine createWorkspaceScope runOperation getResult
param working Copies the working copies that take precedence over their original compilation units param monitor the given progress monitor return a type hierarchy for this type containing this type and all of its supertypes exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource see I Type new Supertype Hierarchy I Working Copy I Progress Monitor deprecated public I Type Hierarchy new Supertype Hierarchy I Working Copy working Copies I Progress Monitor monitor throws Java Model Exception I Compilation Unit copies if working Copies null copies null else int length working Copies length System arraycopy working Copies 0 copies new I Compilation Unit length 0 length return new Supertype Hierarchy copies monitor  workingCopies JavaModelException IType newSupertypeHierarchy IWorkingCopy IProgressMonitor ITypeHierarchy newSupertypeHierarchy IWorkingCopy workingCopies IProgressMonitor JavaModelException ICompilationUnit workingCopies workingCopies workingCopies ICompilationUnit newSupertypeHierarchy
public I Type Hierarchy new Supertype Hierarchy Working Copy Owner owner I Progress Monitor monitor throws Java Model Exception I Compilation Unit working Copies Java Model Manager get Java Model Manager get Working Copies owner true add primary working copies Create Type Hierarchy Operation op new Create Type Hierarchy Operation this working Copies Search Engine create Workspace Scope false op run Operation monitor return op get Result  ITypeHierarchy newSupertypeHierarchy WorkingCopyOwner IProgressMonitor JavaModelException ICompilationUnit workingCopies JavaModelManager getJavaModelManager getWorkingCopies CreateTypeHierarchyOperation CreateTypeHierarchyOperation workingCopies SearchEngine createWorkspaceScope runOperation getResult
see I Type new Type Hierarchy I Java Project I Progress Monitor public I Type Hierarchy new Type Hierarchy I Java Project project I Progress Monitor monitor throws Java Model Exception return new Type Hierarchy project Default Working Copy Owner PRIMARY monitor  IType newTypeHierarchy IJavaProject IProgressMonitor ITypeHierarchy newTypeHierarchy IJavaProject IProgressMonitor JavaModelException newTypeHierarchy DefaultWorkingCopyOwner
public I Type Hierarchy new Type Hierarchy I Java Project project Working Copy Owner owner I Progress Monitor monitor throws Java Model Exception if project null throw new Illegal Argument Exception Util bind hierarchy null Project NON NLS 1 I Compilation Unit working Copies Java Model Manager get Java Model Manager get Working Copies owner true add primary working copies I Compilation Unit projectW Cs null if working Copies null int length working Copies length projectW Cs new I Compilation Unit length int index 0 for int i 0 i length i I Compilation Unit wc working Copies i if project equals wc get Java Project projectW Cs index wc if index length System arraycopy projectW Cs 0 projectW Cs new I Compilation Unit index 0 index Create Type Hierarchy Operation op new Create Type Hierarchy Operation this projectW Cs project true op run Operation monitor return op get Result  ITypeHierarchy newTypeHierarchy IJavaProject WorkingCopyOwner IProgressMonitor JavaModelException IllegalArgumentException nullProject ICompilationUnit workingCopies JavaModelManager getJavaModelManager getWorkingCopies ICompilationUnit projectWCs workingCopies workingCopies projectWCs ICompilationUnit ICompilationUnit workingCopies getJavaProject projectWCs projectWCs projectWCs ICompilationUnit CreateTypeHierarchyOperation CreateTypeHierarchyOperation projectWCs runOperation getResult
param monitor the given progress monitor exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource return a type hierarchy for this type containing see I Type new Type Hierarchy I Progress Monitor monitor deprecated public I Type Hierarchy new Type Hierarchy I Progress Monitor monitor throws Java Model Exception return new Type Hierarchy I Working Copy null monitor  JavaModelException IType newTypeHierarchy IProgressMonitor ITypeHierarchy newTypeHierarchy IProgressMonitor JavaModelException newTypeHierarchy IWorkingCopy
public I Type Hierarchy new Type Hierarchy I Compilation Unit working Copies I Progress Monitor monitor throws Java Model Exception Create Type Hierarchy Operation op new Create Type Hierarchy Operation this working Copies Search Engine create Workspace Scope true op run Operation monitor return op get Result  ITypeHierarchy newTypeHierarchy ICompilationUnit workingCopies IProgressMonitor JavaModelException CreateTypeHierarchyOperation CreateTypeHierarchyOperation workingCopies SearchEngine createWorkspaceScope runOperation getResult
see I Type new Type Hierarchy I Working Copy I Progress Monitor deprecated public I Type Hierarchy new Type Hierarchy I Working Copy working Copies I Progress Monitor monitor throws Java Model Exception I Compilation Unit copies if working Copies null copies null else int length working Copies length System arraycopy working Copies 0 copies new I Compilation Unit length 0 length return new Type Hierarchy copies monitor  IType newTypeHierarchy IWorkingCopy IProgressMonitor ITypeHierarchy newTypeHierarchy IWorkingCopy workingCopies IProgressMonitor JavaModelException ICompilationUnit workingCopies workingCopies workingCopies ICompilationUnit newTypeHierarchy
public I Type Hierarchy new Type Hierarchy Working Copy Owner owner I Progress Monitor monitor throws Java Model Exception I Compilation Unit working Copies Java Model Manager get Java Model Manager get Working Copies owner true add primary working copies Create Type Hierarchy Operation op new Create Type Hierarchy Operation this working Copies Search Engine create Workspace Scope true op run Operation monitor return op get Result  ITypeHierarchy newTypeHierarchy WorkingCopyOwner IProgressMonitor JavaModelException ICompilationUnit workingCopies JavaModelManager getJavaModelManager getWorkingCopies CreateTypeHierarchyOperation CreateTypeHierarchyOperation workingCopies SearchEngine createWorkspaceScope runOperation getResult
see I Type resolve Type String public String resolve Type String type Name not implemented for binary types return null  IType resolveType resolveType typeName
see I Type resolve Type String Working Copy Owner public String resolve Type String type Name Working Copy Owner owner not implemented for binary types return null  IType resolveType WorkingCopyOwner resolveType typeName WorkingCopyOwner
protected void to String Info int tab String Buffer buffer Object info buffer append this tab String tab if info null to String Name buffer buffer append not open NON NLS 1 else if info NO INFO to String Name buffer else try if this is Interface buffer append interface NON NLS 1 else buffer append class NON NLS 1 to String Name buffer catch Java Model Exception e buffer append Java Model Exception in to String of get Element Name NON NLS 1  toStringInfo StringBuffer tabString toStringName NO_INFO toStringName isInterface toStringName JavaModelException JavaModelException toString getElementName

Creates a new buffer on an underlying resource protected Buffer I File file I Openable owner boolean read Only this file file this owner owner if file null set Read Only read Only  IFile IOpenable readOnly setReadOnly readOnly
see I Buffer public void add Buffer Changed Listener I Buffer Changed Listener listener if this change Listeners null this change Listeners new Array List 5 if this change Listeners contains listener this change Listeners add listener  IBuffer addBufferChangedListener IBufferChangedListener changeListeners changeListeners ArrayList changeListeners changeListeners
Append the code text code to the actual content the gap is moved to the end of the code text code public void append char text if is Read Only if text null text length 0 return int length get Length synchronized this lock if this contents null return move And Resize Gap length text length System arraycopy text 0 this contents length text length this gap Start text length this flags F HAS UNSAVED CHANGES notify Changed new Buffer Changed Event this length 0 new String text  isReadOnly getLength moveAndResizeGap gapStart F_HAS_UNSAVED_CHANGES notifyChanged BufferChangedEvent
Append the code text code to the actual content the gap is moved to the end of the code text code public void append String text if text null return this append text to Char Array  toCharArray
see I Buffer public void close Buffer Changed Event event null synchronized this lock if is Closed return event new Buffer Changed Event this 0 0 null this contents null this flags F IS CLOSED notify Changed event notify outside of synchronized block this change Listeners null  IBuffer BufferChangedEvent isClosed BufferChangedEvent F_IS_CLOSED notifyChanged changeListeners
see I Buffer public char get Char int position synchronized this lock if this contents null return Character MIN VALUE if position this gap Start return this contents position int gap Length this gap End this gap Start return this contents position gap Length  IBuffer getChar MIN_VALUE gapStart gapLength gapEnd gapStart gapLength
see I Buffer public char get Characters synchronized this lock if this contents null return null if this gap Start 0 return this contents int length this contents length char new Contents new char length this gap End this gap Start System arraycopy this contents 0 new Contents 0 this gap Start System arraycopy this contents this gap End new Contents this gap Start length this gap End return new Contents  IBuffer getCharacters gapStart newContents gapEnd gapStart newContents gapStart gapEnd newContents gapStart gapEnd newContents
see I Buffer public String get Contents char chars this get Characters if chars null return null return new String chars  IBuffer getContents getCharacters
see I Buffer public int get Length synchronized this lock if this contents null return 1 int length this gap End this gap Start return this contents length length  IBuffer getLength gapEnd gapStart
see I Buffer public I Openable get Owner return this owner  IBuffer IOpenable getOwner
see I Buffer public String get Text int offset int length synchronized this lock if this contents null return NON NLS 1 if offset length this gap Start return new String this contents offset length if this gap Start offset int gap Length this gap End this gap Start return new String this contents offset gap Length length String Buffer buf new String Buffer buf append this contents offset this gap Start offset buf append this contents this gap End offset length this gap Start return buf to String  IBuffer getText gapStart gapStart gapLength gapEnd gapStart gapLength StringBuffer StringBuffer gapStart gapEnd gapStart toString
see I Buffer public I Resource get Underlying Resource return this file  IBuffer IResource getUnderlyingResource
see I Buffer public boolean has Unsaved Changes return this flags F HAS UNSAVED CHANGES 0  IBuffer hasUnsavedChanges F_HAS_UNSAVED_CHANGES
see I Buffer public boolean is Closed return this flags F IS CLOSED 0  IBuffer isClosed F_IS_CLOSED
see I Buffer public boolean is Read Only return this flags F IS READ ONLY 0  IBuffer isReadOnly F_IS_READ_ONLY
Moves the gap to location and adjust its size to the anticipated change size The size represents the expected range of the gap that will be filled after the gap has been moved Thus the gap is resized to actual size the specified size and moved to the given position protected void move And Resize Gap int position int size char content null int old Size this gap End this gap Start if size 0 if old Size 0 content new char this contents length old Size System arraycopy this contents 0 content 0 this gap Start System arraycopy this contents this gap End content this gap Start content length this gap Start this contents content this gap Start this gap End position return content new char this contents length size old Size int new Gap Start position int new Gap End new Gap Start size if old Size 0 System arraycopy this contents 0 content 0 new Gap Start System arraycopy this contents new Gap Start content new Gap End content length new Gap End else if new Gap Start this gap Start int delta this gap Start new Gap Start System arraycopy this contents 0 content 0 new Gap Start System arraycopy this contents new Gap Start content new Gap End delta System arraycopy this contents this gap End content new Gap End delta this contents length this gap End else int delta new Gap Start this gap Start System arraycopy this contents 0 content 0 this gap Start System arraycopy this contents this gap End content this gap Start delta System arraycopy this contents this gap End delta content new Gap End content length new Gap End this contents content this gap Start new Gap Start this gap End new Gap End  moveAndResizeGap oldSize gapEnd gapStart oldSize oldSize gapStart gapEnd gapStart gapStart gapStart gapEnd oldSize newGapStart newGapEnd newGapStart oldSize newGapStart newGapStart newGapEnd newGapEnd newGapStart gapStart gapStart newGapStart newGapStart newGapStart newGapEnd gapEnd newGapEnd gapEnd newGapStart gapStart gapStart gapEnd gapStart gapEnd newGapEnd newGapEnd gapStart newGapStart gapEnd newGapEnd
final I Buffer Changed Listener listener I Buffer Changed Listener this change Listeners get i Platform run new I Safe Runnable public void handle Exception Throwable exception Util log exception Exception occurred in listener of buffer change notification NON NLS 1  IBufferChangedListener IBufferChangedListener changeListeners ISafeRunnable handleException
Util log exception Exception occurred in listener of buffer change notification NON NLS 1 public void run throws Exception listener buffer Changed event  bufferChanged
Notify the listeners that this buffer has changed To avoid deadlock this should not be called in a synchronized block protected void notify Changed final Buffer Changed Event event if this change Listeners null for int i 0 size this change Listeners size i size i final I Buffer Changed Listener listener I Buffer Changed Listener this change Listeners get i Platform run new I Safe Runnable public void handle Exception Throwable exception Util log exception Exception occurred in listener of buffer change notification NON NLS 1 public void run throws Exception listener buffer Changed event  notifyChanged BufferChangedEvent changeListeners changeListeners IBufferChangedListener IBufferChangedListener changeListeners ISafeRunnable handleException bufferChanged
see I Buffer public void remove Buffer Changed Listener I Buffer Changed Listener listener if this change Listeners null this change Listeners remove listener if this change Listeners size 0 this change Listeners null  IBuffer removeBufferChangedListener IBufferChangedListener changeListeners changeListeners changeListeners changeListeners
Replaces code length code characters starting from code position code with code text code After that operation the gap is placed at the end of the inserted code text code public void replace int position int length char text if is Read Only int text Length text null 0 text length synchronized this lock if this contents null return move gap move And Resize Gap position length text Length length overwrite int min Math min text Length length if min 0 System arraycopy text 0 this contents position min if length text Length enlarge the gap this gap Start length text Length else if text Length length shrink gap this gap Start text Length length System arraycopy text 0 this contents position text Length this flags F HAS UNSAVED CHANGES String string null if text Length 0 string new String text notify Changed new Buffer Changed Event this position length string  isReadOnly textLength moveAndResizeGap textLength textLength textLength gapStart textLength textLength gapStart textLength textLength F_HAS_UNSAVED_CHANGES textLength notifyChanged BufferChangedEvent
Replaces code length code characters starting from code position code with code text code After that operation the gap is placed at the end of the inserted code text code public void replace int position int length String text this replace position length text null null text to Char Array  toCharArray
see I Buffer public void save I Progress Monitor progress boolean force throws Java Model Exception determine if saving is required if is Read Only this file null return if has Unsaved Changes return use a platform operation to update the resource contents try String encoding null try encoding this file get Charset catch Core Exception ce use no encoding String string Contents this get Contents if string Contents null return byte bytes encoding null string Contents get Bytes string Contents get Bytes encoding Byte Array Input Stream stream new Byte Array Input Stream bytes if this file exists this file set Contents stream force I Resource FORCE I Resource KEEP HISTORY I Resource KEEP HISTORY null else this file create stream force null catch IO Exception e throw new Java Model Exception e I Java Model Status Constants IO EXCEPTION catch Core Exception e throw new Java Model Exception e the resource no longer has unsaved changes this flags F HAS UNSAVED CHANGES  IBuffer IProgressMonitor JavaModelException isReadOnly hasUnsavedChanges getCharset CoreException stringContents getContents stringContents stringContents getBytes stringContents getBytes ByteArrayInputStream ByteArrayInputStream setContents IResource IResource KEEP_HISTORY IResource KEEP_HISTORY IOException JavaModelException IJavaModelStatusConstants IO_EXCEPTION CoreException JavaModelException F_HAS_UNSAVED_CHANGES
see I Buffer public void set Contents char new Contents allow special case for first initialization after creation by buffer factory if this contents null synchronized this lock this contents new Contents this flags F HAS UNSAVED CHANGES return if is Read Only String string null if new Contents null string new String new Contents synchronized this lock if this contents null return ignore if buffer is closed as per spec this contents new Contents this flags F HAS UNSAVED CHANGES this gap Start 1 this gap End 1 Buffer Changed Event event new Buffer Changed Event this 0 this get Length string notify Changed event  IBuffer setContents newContents newContents F_HAS_UNSAVED_CHANGES isReadOnly newContents newContents newContents F_HAS_UNSAVED_CHANGES gapStart gapEnd BufferChangedEvent BufferChangedEvent getLength notifyChanged
see I Buffer public void set Contents String new Contents this set Contents new Contents to Char Array  IBuffer setContents newContents setContents newContents toCharArray
Sets this code Buffer code to be read only protected void set Read Only boolean read Only if read Only this flags F IS READ ONLY else this flags F IS READ ONLY  setReadOnly readOnly readOnly F_IS_READ_ONLY F_IS_READ_ONLY
public String to String String Buffer buffer new String Buffer buffer append Owner Java Element this owner to String With Ancestors NON NLS 1 buffer append n Has unsaved changes this has Unsaved Changes NON NLS 1 buffer append n Is readonly this is Read Only NON NLS 1 buffer append n Is closed this is Closed NON NLS 1 buffer append n Contents n NON NLS 1 char char Contents this get Characters if char Contents null buffer append null NON NLS 1 else int length char Contents length for int i 0 i length i char c char Contents i switch c case n buffer append n n NON NLS 1 break case r if i length 1 this contents i 1 n buffer append r n n NON NLS 1 i else buffer append r n NON NLS 1 break default buffer append c break return buffer to String  toString StringBuffer StringBuffer JavaElement toStringWithAncestors nHas hasUnsavedChanges nIs isReadOnly nIs isClosed nContents charContents getCharacters charContents charContents charContents toString

public class Buffer Cache extends OverflowingLRU Cache Constructs a new buffer cache of the given size public Buffer Cache int size super size  BufferCache OverflowingLRUCache BufferCache
Constructs a new buffer cache of the given size public Buffer Cache int size int overflow super size overflow  BufferCache
Returns true if the buffer is successfully closed and removed from the cache otherwise false p NOTE this triggers an external removal of this buffer by closing the buffer protected boolean close LRU Cache Entry entry I Buffer buffer I Buffer entry  fValue prevent buffer that have unsaved changes or working copy buffer to be removed see https bugs eclipse org bugs show bug cgi id 39311 if Openable buffer get Owner can Buffer Be Removed From Cache buffer return false else buffer close return true  LRUCacheEntry IBuffer IBuffer _fValue show_bug getOwner canBufferBeRemovedFromCache
Returns a new instance of the reciever protected LRU Cache new Instance int size int overflow return new Buffer Cache size overflow  LRUCache newInstance BufferCache

public org eclipse jdt core I Buffer Factory factory private Buffer Factory Wrapper org eclipse jdt core I Buffer Factory factory this factory factory  IBufferFactory BufferFactoryWrapper IBufferFactory
public static Working Copy Owner create org eclipse jdt core I Buffer Factory factory return new Buffer Factory Wrapper factory  WorkingCopyOwner IBufferFactory BufferFactoryWrapper
see org eclipse jdt core Working Copy Owner create Buffer org eclipse jdt core I Compilation Unit public I Buffer create Buffer I Compilation Unit working Copy if this factory null return super create Buffer working Copy return this factory create Buffer working Copy  WorkingCopyOwner createBuffer ICompilationUnit IBuffer createBuffer ICompilationUnit workingCopy createBuffer workingCopy createBuffer workingCopy
public boolean equals Object obj if obj instanceof Buffer Factory Wrapper return false Buffer Factory Wrapper other Buffer Factory Wrapper obj if this factory null return other factory null return this factory equals other factory  BufferFactoryWrapper BufferFactoryWrapper BufferFactoryWrapper
return this factory equals other factory public int hash Code if this factory null return 0 return this factory hash Code  hashCode hashCode
return this factory hash Code public String to String return Factory Wrapper for this factory NON NLS 1  hashCode toString FactoryWrapper

protected org eclipse jdt core I Buffer Factory default Buffer Factory new org eclipse jdt core I Buffer Factory deprecated public I Buffer create Buffer I Openable owner return Buffer Manager this create Buffer owner  IBufferFactory defaultBufferFactory IBufferFactory IBuffer createBuffer IOpenable BufferManager createBuffer
Adds a buffer to the table of open buffers protected void add Buffer I Buffer buffer if VERBOSE String owner Openable buffer get Owner to String With Ancestors System out println Adding buffer for owner NON NLS 1 this open Buffers put buffer get Owner buffer if VERBOSE System out println Buffer cache filling ratio Number Format get Instance format this open Buffers filling Ratio NON NLS 1 NON NLS 2  addBuffer IBuffer getOwner toStringWithAncestors openBuffers getOwner NumberFormat getInstance openBuffers fillingRatio
public I Buffer create Buffer I Openable owner I Java Element element I Java Element owner I Resource resource element get Resource return new Buffer resource instanceof I File I File resource null owner element is Read Only  IBuffer createBuffer IOpenable IJavaElement IJavaElement IResource getResource IFile IFile isReadOnly
Returns the open buffer associated with the given owner or code null code if the owner does not have an open buffer associated with it public I Buffer get Buffer I Openable owner return I Buffer this open Buffers get owner  IBuffer getBuffer IOpenable IBuffer openBuffers
Returns the default buffer manager public synchronized static Buffer Manager get Default Buffer Manager if DEFAULT BUFFER MANAGER null DEFAULT BUFFER MANAGER new Buffer Manager return DEFAULT BUFFER MANAGER  BufferManager getDefaultBufferManager DEFAULT_BUFFER_MANAGER DEFAULT_BUFFER_MANAGER BufferManager DEFAULT_BUFFER_MANAGER
Returns the default buffer factory deprecated public org eclipse jdt core I Buffer Factory get Default Buffer Factory return this default Buffer Factory  IBufferFactory getDefaultBufferFactory defaultBufferFactory
Returns an enumeration of all open buffers p The code Enumeration code answered is thread safe see OverflowingLRU Cache return Enumeration of I Buffer public Enumeration get Open Buffers synchronized this open Buffers this open Buffers shrink return this open Buffers elements  OverflowingLRUCache IBuffer getOpenBuffers openBuffers openBuffers openBuffers
Removes a buffer from the table of open buffers protected void remove Buffer I Buffer buffer if VERBOSE String owner Openable buffer get Owner to String With Ancestors System out println Removing buffer for owner NON NLS 1 this open Buffers remove buffer get Owner if VERBOSE System out println Buffer cache filling ratio Number Format get Instance format this open Buffers filling Ratio NON NLS 1 NON NLS 2  removeBuffer IBuffer getOwner toStringWithAncestors openBuffers getOwner NumberFormat getInstance openBuffers fillingRatio

protected String qualified Type Name public Abort Incremental Build Exception String qualified Type Name this qualified Type Name qualified Type Name  qualifiedTypeName AbortIncrementalBuildException qualifiedTypeName qualifiedTypeName qualifiedTypeName

protected Abstract Image Builder Java Builder java Builder this java Builder java Builder this new State new State java Builder local copies this name Environment java Builder name Environment this source Locations this name Environment source Locations this notifier java Builder notifier this compiler new Compiler this work Queue new Work Queue this problem Source Files new Array List 3  AbstractImageBuilder JavaBuilder javaBuilder javaBuilder javaBuilder newState javaBuilder nameEnvironment javaBuilder nameEnvironment sourceLocations nameEnvironment sourceLocations javaBuilder newCompiler workQueue WorkQueue problemSourceFiles ArrayList
public void accept Result Compilation Result result In Batch mode we write out the class files hold onto the dependency info additional types and report problems In Incremental mode when writing out a class file we need to compare it against the previous file remembering if structural changes occured Before reporting the new problems we need to update the problem count remove the old problems Plus delete additional class files that no longer exist Source File compilation Unit Source File result get Compilation Unit go directly back to the source File if work Queue is Compiled compilation Unit work Queue finished compilation Unit try update Problems For compilation Unit result record compilation problems before potentially adding duplicate errors update Tasks For compilation Unit result record tasks catch Core Exception e throw internal Exception e String type Locator compilation Unit type Locator Class File class Files result get Class Files int length class Files length Array List duplicate Type Names null Array List defined Type Names new Array List length for int i 0 i length i Class File class File class Files i char compound Name class File get Compound Name char type Name compound Name compound Name length 1 boolean is Nested Type class File enclosing Class File null Look for a possible collision if one exists report an error but do not write the class file if is Nested Type String qualified Type Name new String class File outer Most Enclosing Class File file Name if new State is Duplicate Locator qualified Type Name type Locator continue else String qualified Type Name new String class File file Name the qualified type name p1 p2 A if new State is Duplicate Locator qualified Type Name type Locator if duplicate Type Names null duplicate Type Names new Array List duplicate Type Names add compound Name create Problem For compilation Unit resource Util bind build duplicate Class File new String type Name Java Core ERROR NON NLS 1 continue new State record Locator For Type qualified Type Name type Locator try defined Type Names add write Class File class File compilation Unit is Nested Type catch Core Exception e Util log e Java Builder handling Core Exception NON NLS 1 if e get Status get Code I Resource Status CASE VARIANT EXISTS create Problem For compilation Unit resource Util bind build class File Collision e get Message Java Core ERROR NON NLS 1 else create Problem For compilation Unit resource Util bind build inconsistent Class File Java Core ERROR NON NLS 1 finished With type Locator result compilation Unit get Main Type Name defined Type Names duplicate Type Names notifier compiled compilation Unit  acceptResult CompilationResult SourceFile compilationUnit SourceFile getCompilationUnit sourceFile workQueue isCompiled compilationUnit workQueue compilationUnit updateProblemsFor compilationUnit updateTasksFor compilationUnit CoreException internalException typeLocator compilationUnit typeLocator ClassFile classFiles getClassFiles classFiles ArrayList duplicateTypeNames ArrayList definedTypeNames ArrayList ClassFile classFile classFiles compoundName classFile getCompoundName typeName compoundName compoundName isNestedType classFile enclosingClassFile isNestedType qualifiedTypeName classFile outerMostEnclosingClassFile fileName newState isDuplicateLocator qualifiedTypeName typeLocator qualifiedTypeName classFile fileName newState isDuplicateLocator qualifiedTypeName typeLocator duplicateTypeNames duplicateTypeNames ArrayList duplicateTypeNames compoundName createProblemFor compilationUnit duplicateClassFile typeName JavaCore newState recordLocatorForType qualifiedTypeName typeLocator definedTypeNames writeClassFile classFile compilationUnit isNestedType CoreException JavaBuilder CoreException getStatus getCode IResourceStatus CASE_VARIANT_EXISTS createProblemFor compilationUnit classFileCollision getMessage JavaCore createProblemFor compilationUnit inconsistentClassFile JavaCore finishedWith typeLocator compilationUnit getMainTypeName definedTypeNames duplicateTypeNames compilationUnit
protected void clean Up this name Environment cleanup this java Builder null this name Environment null this source Locations null this notifier null this compiler null this work Queue null this problem Source Files null  cleanUp nameEnvironment javaBuilder nameEnvironment sourceLocations workQueue problemSourceFiles
protected void compile Source File units int units Length units length this compiled All At Once units Length MAX AT ONCE if this compiled All At Once do them all now if Java Builder DEBUG for int i 0 i units Length i System out println About to compile units i type Locator NON NLS 1 compile units null else int i 0 boolean compiling First Group true while i units Length int do Now units Length MAX AT ONCE units Length MAX AT ONCE int index 0 Source File to Compile new Source File do Now while i units Length index do Now Although it needed compiling when this method was called it may have already been compiled when it was referenced by another unit Source File unit units i if compiling First Group work Queue is Waiting unit if Java Builder DEBUG System out println About to compile unit type Locator NON NLS 1 to Compile index unit if index do Now System arraycopy to Compile 0 to Compile new Source File index 0 index Source File additional Units new Source File units Length i System arraycopy units i additional Units 0 additional Units length compiling First Group false compile to Compile additional Units  SourceFile unitsLength compiledAllAtOnce unitsLength MAX_AT_ONCE compiledAllAtOnce JavaBuilder unitsLength typeLocator compilingFirstGroup unitsLength doNow unitsLength MAX_AT_ONCE unitsLength MAX_AT_ONCE SourceFile toCompile SourceFile doNow unitsLength doNow SourceFile compilingFirstGroup workQueue isWaiting JavaBuilder typeLocator toCompile doNow toCompile toCompile SourceFile SourceFile additionalUnits SourceFile unitsLength additionalUnits additionalUnits compilingFirstGroup toCompile additionalUnits
void compile Source File units Source File additional Units if units length 0 return notifier about To Compile units 0 just to change the message extend additional Filenames with all hierarchical problem types found during this entire build if problem Source Files is Empty int to Add problem Source Files size int length additional Units null 0 additional Units length if length 0 additional Units new Source File to Add else System arraycopy additional Units 0 additional Units new Source File length to Add 0 length for int i 0 i to Add i additional Units length i Source File problem Source Files get i String initial Type Names new String units length for int i 0 l units length i l i initial Type Names i units i initial Type Name name Environment set Names initial Type Names additional Units notifier check Cancel try in Compiler true compiler compile units catch Abort Compilation ignored ignore the Abort Compilcation coming from Build Notifier check Cancel Within Compiler the Compiler failed after the user has chose to cancel likely due to an Out Of Memory error finally in Compiler false Check for cancel immediately after a compile because the compiler may have been cancelled but without propagating the correct exception notifier check Cancel  SourceFile SourceFile additionalUnits aboutToCompile additionalFilenames problemSourceFiles isEmpty toAdd problemSourceFiles additionalUnits additionalUnits additionalUnits SourceFile toAdd additionalUnits additionalUnits SourceFile toAdd toAdd additionalUnits SourceFile problemSourceFiles initialTypeNames initialTypeNames initialTypeName nameEnvironment setNames initialTypeNames additionalUnits checkCancel inCompiler AbortCompilation AbortCompilcation BuildNotifier checkCancelWithinCompiler OutOfMemory inCompiler checkCancel
protected void create Problem For I Resource resource String message String problem Severity try I Marker marker resource create Marker I Java Model Marker JAVA MODEL PROBLEM MARKER int severity problem Severity equals Java Core WARNING I Marker SEVERITY WARNING I Marker SEVERITY ERROR marker set Attributes new String I Marker MESSAGE I Marker SEVERITY I Marker CHAR START I Marker CHAR END new Object message new Integer severity new Integer 0 new Integer 1 catch Core Exception e throw internal Exception e  createProblemFor IResource problemSeverity IMarker createMarker IJavaModelMarker JAVA_MODEL_PROBLEM_MARKER problemSeverity JavaCore IMarker SEVERITY_WARNING IMarker SEVERITY_ERROR setAttributes IMarker IMarker IMarker CHAR_START IMarker CHAR_END CoreException internalException
protected void finished With String source Locator Compilation Result result char main Type Name Array List defined Type Names Array List duplicate Type Names if duplicate Type Names null new State record source Locator result qualified References result simple Name References main Type Name defined Type Names return char qualified Refs result qualified References char simple Refs result simple Name References for each duplicate type p1 p2 A add the type name A package was already added next for int i 0 l duplicate Type Names size i l i char compound Name char duplicate Type Names get i char type Name compound Name compound Name length 1 int s Length simple Refs length for int j 0 j s Length j if Char Operation equals simple Refs j type Name continue next System arraycopy simple Refs 0 simple Refs new char s Length 1 0 s Length simple Refs s Length type Name new State record source Locator qualified Refs simple Refs main Type Name defined Type Names  finishedWith sourceLocator CompilationResult mainTypeName ArrayList definedTypeNames ArrayList duplicateTypeNames duplicateTypeNames newState sourceLocator qualifiedReferences simpleNameReferences mainTypeName definedTypeNames qualifiedRefs qualifiedReferences simpleRefs simpleNameReferences duplicateTypeNames compoundName duplicateTypeNames typeName compoundName compoundName sLength simpleRefs sLength CharOperation simpleRefs typeName simpleRefs simpleRefs sLength sLength simpleRefs sLength typeName newState sourceLocator qualifiedRefs simpleRefs mainTypeName definedTypeNames
protected I Container create Folder I Path package Path I Container output Folder throws Core Exception if package Path is Empty return output Folder I Folder folder output Folder get Folder package Path if folder exists create Folder package Path remove Last Segments 1 output Folder folder create true true null folder set Derived true return folder  IContainer createFolder IPath packagePath IContainer outputFolder CoreException packagePath isEmpty outputFolder IFolder outputFolder getFolder packagePath createFolder packagePath removeLastSegments outputFolder setDerived
protected Runtime Exception internal Exception Core Exception t Image Builder Internal Exception image Builder Exception new Image Builder Internal Exception t if in Compiler return new Abort Compilation true image Builder Exception return image Builder Exception  RuntimeException internalException CoreException ImageBuilderInternalException imageBuilderException ImageBuilderInternalException inCompiler AbortCompilation imageBuilderException imageBuilderException
protected Compiler new Compiler called once when the builder is initialized can override if needed Compiler new Compiler new Compiler name Environment Default Error Handling Policies proceed With All Problems java Builder java Project get Options true this Problem Factory get Problem Factory Locale get Default enable the compiler reference info support new Compiler options produce Reference Info true org eclipse jdt internal compiler lookup Lookup Environment env new Compiler lookup Environment synchronized env enable shared byte s used by Class File to avoid allocating M Bs during a build env shared Arrays Used false env shared Class File Header new byte 30000 env shared Class File Contents new byte 30000 return new Compiler  newCompiler newCompiler nameEnvironment DefaultErrorHandlingPolicies proceedWithAllProblems javaBuilder javaProject getOptions ProblemFactory getProblemFactory getDefault newCompiler produceReferenceInfo LookupEnvironment newCompiler lookupEnvironment ClassFile MBs sharedArraysUsed sharedClassFileHeader sharedClassFileContents newCompiler
protected boolean is Excluded From Project I Path child Path throws Java Model Exception answer whether the folder should be ignored when walking the project as a source folder if child Path segment Count 2 return false is a subfolder of a package for int j 0 k source Locations length j k j if child Path equals source Locations j binary Folder get Full Path return true if child Path equals source Locations j source Folder get Full Path return true skip default output folder which may not be used by any source folder return child Path equals java Builder java Project get Output Location  isExcludedFromProject IPath childPath JavaModelException childPath segmentCount sourceLocations childPath sourceLocations binaryFolder getFullPath childPath sourceLocations sourceFolder getFullPath childPath javaBuilder javaProject getOutputLocation
Creates a marker from each problem and adds it to the resource The marker is as follows its type is T PROBLEM its plugin ID is the Java Builder s plugin ID its message is the problem s message its priority reflects the severity of the problem its range is the problem s range it has an extra attribute ID which holds the problem s id protected void store Problems For Source File source File I Problem problems throws Core Exception if source File null problems null problems length 0 return String missing Class File null I Resource resource source File resource for int i 0 l problems length i l i I Problem problem problems i int id problem getID switch id case I Problem Is Class Path Correct Java Builder remove Problems And Tasks For java Builder current Project make this the only problem for this project String args problem get Arguments missing Class File args 0 break case I Problem Superclass Must BeA Class case I Problem Super Interface Must Be An Interface case I Problem Hierarchy Circularity Self Reference case I Problem Hierarchy Circularity case I Problem Hierarchy Has Problems case I Problem Superclass Not Found case I Problem Superclass Not Visible case I Problem Superclass Ambiguous case I Problem Superclass Internal Name Provided case I Problem Superclass Inherited Name Hides Enclosing Name case I Problem Interface Not Found case I Problem Interface Not Visible case I Problem Interface Ambiguous case I Problem Interface Internal Name Provided case I Problem Interface Inherited Name Hides Enclosing Name ensure that this file is always retrieved from source for the rest of the build if problem Source Files contains source File problem Source Files add source File break if id I Problem Task I Marker marker resource create Marker I Java Model Marker JAVA MODEL PROBLEM MARKER marker set Attributes new String I Marker MESSAGE I Marker SEVERITY I Java Model Marker ID I Marker CHAR START I Marker CHAR END I Marker LINE NUMBER I Java Model Marker ARGUMENTS new Object problem get Message new Integer problem is Error I Marker SEVERITY ERROR I Marker SEVERITY WARNING new Integer id new Integer problem get Source Start new Integer problem get Source End 1 new Integer problem get Source Line Number Util get Problem Arguments For Marker problem get Arguments Do NOT want to populate the Java Model just to find the matching Java element Also cannot query compilation units located in folders with invalid package names such as a b c d e compute a user friendly location I Java Element element Java Core create resource if element instanceof org eclipse jdt core I Compilation Unit try to find a finer grain element org eclipse jdt core I Compilation Unit unit org eclipse jdt core I Compilation Unit element I Java Element fragment unit get Element At problem get Source Start if fragment null element fragment String location null if element instanceof Java Element location Java Element element readable Name if location null marker set Attribute I Marker LOCATION location if missing Class File null throw new Missing Class File Exception missing Class File  T_PROBLEM JavaBuilder storeProblemsFor SourceFile sourceFile IProblem CoreException sourceFile missingClassFile IResource sourceFile IProblem IProblem IsClassPathCorrect JavaBuilder removeProblemsAndTasksFor javaBuilder currentProject getArguments missingClassFile IProblem SuperclassMustBeAClass IProblem SuperInterfaceMustBeAnInterface IProblem HierarchyCircularitySelfReference IProblem HierarchyCircularity IProblem HierarchyHasProblems IProblem SuperclassNotFound IProblem SuperclassNotVisible IProblem SuperclassAmbiguous IProblem SuperclassInternalNameProvided IProblem SuperclassInheritedNameHidesEnclosingName IProblem InterfaceNotFound IProblem InterfaceNotVisible IProblem InterfaceAmbiguous IProblem InterfaceInternalNameProvided IProblem InterfaceInheritedNameHidesEnclosingName problemSourceFiles sourceFile problemSourceFiles sourceFile IProblem IMarker createMarker IJavaModelMarker JAVA_MODEL_PROBLEM_MARKER setAttributes IMarker IMarker IJavaModelMarker IMarker CHAR_START IMarker CHAR_END IMarker LINE_NUMBER IJavaModelMarker getMessage isError IMarker SEVERITY_ERROR IMarker SEVERITY_WARNING getSourceStart getSourceEnd getSourceLineNumber getProblemArgumentsForMarker getArguments IJavaElement JavaCore ICompilationUnit ICompilationUnit ICompilationUnit IJavaElement getElementAt getSourceStart JavaElement JavaElement readableName setAttribute IMarker missingClassFile MissingClassFileException missingClassFile
protected void store Tasks For Source File source File I Problem tasks throws Core Exception if source File null tasks null tasks length 0 return I Resource resource source File resource for int i 0 l tasks length i l i I Problem task tasks i if task getID I Problem Task I Marker marker resource create Marker I Java Model Marker TASK MARKER int priority I Marker PRIORITY NORMAL String compiler Priority task get Arguments 2 if Java Core COMPILER TASK PRIORITY HIGH equals compiler Priority priority I Marker PRIORITY HIGH else if Java Core COMPILER TASK PRIORITY LOW equals compiler Priority priority I Marker PRIORITY LOW marker set Attributes new String I Marker MESSAGE I Marker PRIORITY I Marker DONE I Marker CHAR START I Marker CHAR END I Marker LINE NUMBER I Marker USER EDITABLE new Object task get Message new Integer priority org eclipse jdt internal compiler util Util to Boolean false new Integer task get Source Start new Integer task get Source End 1 new Integer task get Source Line Number new Boolean false  storeTasksFor SourceFile sourceFile IProblem CoreException sourceFile IResource sourceFile IProblem IProblem IMarker createMarker IJavaModelMarker TASK_MARKER IMarker PRIORITY_NORMAL compilerPriority getArguments JavaCore COMPILER_TASK_PRIORITY_HIGH compilerPriority IMarker PRIORITY_HIGH JavaCore COMPILER_TASK_PRIORITY_LOW compilerPriority IMarker PRIORITY_LOW setAttributes IMarker IMarker IMarker IMarker CHAR_START IMarker CHAR_END IMarker LINE_NUMBER IMarker USER_EDITABLE getMessage toBoolean getSourceStart getSourceEnd getSourceLineNumber
protected void update Problems For Source File source File Compilation Result result throws Core Exception I Problem problems result get Problems if problems null problems length 0 return notifier update Problem Counts problems store Problems For source File problems  updateProblemsFor SourceFile sourceFile CompilationResult CoreException IProblem getProblems updateProblemCounts storeProblemsFor sourceFile
protected void update Tasks For Source File source File Compilation Result result throws Core Exception I Problem tasks result get Tasks if tasks null tasks length 0 return store Tasks For source File tasks  updateTasksFor SourceFile sourceFile CompilationResult CoreException IProblem getTasks storeTasksFor sourceFile
protected char write Class File Class File class File Source File compilation Unit boolean is Secondary Type throws Core Exception String file Name new String class File file Name the qualified type name p1 p2 A I Path file Path new Path file Name I Container output Folder compilation Unit source Location binary Folder I Container container output Folder if file Path segment Count 1 container create Folder file Path remove Last Segments 1 output Folder file Path new Path file Path last Segment I File file container get File file Path add File Extension Suffix Constants EXTENSION class write Class File Bytes class File get Bytes file file Name is Secondary Type compilation Unit update Class File if class File own Shared Arrays org eclipse jdt internal compiler lookup Lookup Environment env this compiler lookup Environment synchronized env env shared Arrays Used false answer the name of the class file as in Y or Y M return file Path last Segment to Char Array  writeClassFile ClassFile classFile SourceFile compilationUnit isSecondaryType CoreException fileName classFile fileName IPath filePath fileName IContainer outputFolder compilationUnit sourceLocation binaryFolder IContainer outputFolder filePath segmentCount createFolder filePath removeLastSegments outputFolder filePath filePath lastSegment IFile getFile filePath addFileExtension SuffixConstants EXTENSION_class writeClassFileBytes classFile getBytes fileName isSecondaryType compilationUnit updateClassFile classFile ownSharedArrays LookupEnvironment lookupEnvironment sharedArraysUsed filePath lastSegment toCharArray
protected void write Class File Bytes byte bytes I File file String qualified File Name boolean is Secondary Type boolean update Class File throws Core Exception if file exists Deal with shared output folders last one wins no collision cases detected if Java Builder DEBUG System out println Writing changed class file file get Name NON NLS 1 file set Contents new Byte Array Input Stream bytes true false null if file is Derived file set Derived true else Default implementation just writes out the bytes for the new class file if Java Builder DEBUG System out println Writing new class file file get Name NON NLS 1 file create new Byte Array Input Stream bytes I Resource FORCE null file set Derived true  writeClassFileBytes IFile qualifiedFileName isSecondaryType updateClassFile CoreException JavaBuilder getName setContents ByteArrayInputStream isDerived setDerived JavaBuilder getName ByteArrayInputStream IResource setDerived

char defined Type Names protected Additional Type Collection char defined Type Names char qualified References char simple Name References super qualified References simple Name References this defined Type Names defined Type Names do not bother interning member type names ie A M  definedTypeNames AdditionalTypeCollection definedTypeNames qualifiedReferences simpleNameReferences qualifiedReferences simpleNameReferences definedTypeNames definedTypeNames

public class Batch Image Builder extends Abstract Image Builder protected Batch Image Builder Java Builder java Builder super java Builder this name Environment is Incremental Build false  BatchImageBuilder AbstractImageBuilder BatchImageBuilder JavaBuilder javaBuilder javaBuilder nameEnvironment isIncrementalBuild
public void build if Java Builder DEBUG System out println FULL build NON NLS 1 try notifier sub Task Util bind build cleaning Output NON NLS 1 Java Builder remove Problems And Tasks For java Builder current Project clean Output Folders true notifier update Progress Delta 0 1f notifier sub Task Util bind build analyzing Sources NON NLS 1 Array List source Files new Array List 33 add All Source Files source Files notifier update Progress Delta 0 15f if source Files size 0 Source File all Source Files new Source File source Files size source Files to Array all Source Files notifier set Progress Per Compilation Unit 0 75f all Source Files length work Queue add All all Source Files compile all Source Files if java Builder java Project has Cycle Marker java Builder must Propagate Structural Changes catch Core Exception e throw internal Exception e finally clean Up  JavaBuilder subTask cleaningOutput JavaBuilder removeProblemsAndTasksFor javaBuilder currentProject cleanOutputFolders updateProgressDelta subTask analyzingSources ArrayList sourceFiles ArrayList addAllSourceFiles sourceFiles updateProgressDelta sourceFiles SourceFile allSourceFiles SourceFile sourceFiles sourceFiles toArray allSourceFiles setProgressPerCompilationUnit allSourceFiles workQueue addAll allSourceFiles allSourceFiles javaBuilder javaProject hasCycleMarker javaBuilder mustPropagateStructuralChanges CoreException internalException cleanUp
new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception I Resource resource null switch proxy get Type case I Resource FILE if exclusion Patterns null inclusion Patterns null resource proxy request Resource if Util is Excluded resource inclusion Patterns exclusion Patterns return false if org eclipse jdt internal compiler util Util is Java File Name proxy get Name if resource null resource proxy request Resource source Files add new Source File I File resource source Location return false case I Resource FOLDER if exclusion Patterns null inclusion Patterns null if there are inclusion patterns then we must walk the children resource proxy request Resource if Util is Excluded resource inclusion Patterns exclusion Patterns return false if is Also Project is Excluded From Project proxy request Full Path return false return true  IResourceProxyVisitor IResourceProxy CoreException IResource getType IResource exclusionPatterns inclusionPatterns requestResource isExcluded inclusionPatterns exclusionPatterns isJavaFileName getName requestResource sourceFiles SourceFile IFile sourceLocation IResource exclusionPatterns inclusionPatterns requestResource isExcluded inclusionPatterns exclusionPatterns isAlsoProject isExcludedFromProject requestFullPath
protected void add All Source Files final Array List source Files throws Core Exception for int i 0 l source Locations length i l i final Classpath Multi Directory source Location source Locations i final char exclusion Patterns source Location exclusion Patterns final char inclusion Patterns source Location inclusion Patterns final boolean is Also Project source Location source Folder equals java Builder current Project source Location source Folder accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception I Resource resource null switch proxy get Type case I Resource FILE if exclusion Patterns null inclusion Patterns null resource proxy request Resource if Util is Excluded resource inclusion Patterns exclusion Patterns return false if org eclipse jdt internal compiler util Util is Java File Name proxy get Name if resource null resource proxy request Resource source Files add new Source File I File resource source Location return false case I Resource FOLDER if exclusion Patterns null inclusion Patterns null if there are inclusion patterns then we must walk the children resource proxy request Resource if Util is Excluded resource inclusion Patterns exclusion Patterns return false if is Also Project is Excluded From Project proxy request Full Path return false return true I Resource NONE notifier check Cancel  addAllSourceFiles ArrayList sourceFiles CoreException sourceLocations ClasspathMultiDirectory sourceLocation sourceLocations exclusionPatterns sourceLocation exclusionPatterns inclusionPatterns sourceLocation inclusionPatterns isAlsoProject sourceLocation sourceFolder javaBuilder currentProject sourceLocation sourceFolder IResourceProxyVisitor IResourceProxy CoreException IResource getType IResource exclusionPatterns inclusionPatterns requestResource isExcluded inclusionPatterns exclusionPatterns isJavaFileName getName requestResource sourceFiles SourceFile IFile sourceLocation IResource exclusionPatterns inclusionPatterns requestResource isExcluded inclusionPatterns exclusionPatterns isAlsoProject isExcludedFromProject requestFullPath IResource checkCancel
member accept new I Resource Visitor public boolean visit I Resource resource throws Core Exception resource set Derived true return resource get Type I Resource FILE  IResourceVisitor IResource CoreException setDerived getType IResource
new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception I Resource resource null if proxy get Type I Resource FILE if exclusion Patterns null inclusion Patterns null resource proxy request Resource if Util is Excluded resource inclusion Patterns exclusion Patterns return false if org eclipse jdt internal compiler util Util is Class File Name proxy get Name if resource null resource proxy request Resource resource delete I Resource FORCE null return false if exclusion Patterns null inclusion Patterns null if there are inclusion patterns then we must walk the children resource proxy request Resource if Util is Excluded resource inclusion Patterns exclusion Patterns return false notifier check Cancel return true  IResourceProxyVisitor IResourceProxy CoreException IResource getType IResource exclusionPatterns inclusionPatterns requestResource isExcluded inclusionPatterns exclusionPatterns isClassFileName getName requestResource IResource exclusionPatterns inclusionPatterns requestResource isExcluded inclusionPatterns exclusionPatterns checkCancel
protected void clean Output Folders boolean copy Back throws Core Exception boolean delete All Java Core CLEAN equals java Builder java Project get Option Java Core CORE JAVA BUILD CLEAN OUTPUT FOLDER true if delete All Array List visited new Array List source Locations length for int i 0 l source Locations length i l i notifier sub Task Util bind build cleaning Output NON NLS 1 Classpath Multi Directory source Location source Locations i if source Location has Independent Output Folder I Container output Folder source Location binary Folder if visited contains output Folder visited add output Folder I Resource members output Folder members for int j 0 m members length j m j I Resource member members j if member is Derived member accept new I Resource Visitor public boolean visit I Resource resource throws Core Exception resource set Derived true return resource get Type I Resource FILE member delete I Resource FORCE null notifier check Cancel if copy Back copy Extra Resources Back source Location true else boolean is Output Folder source Location source Folder equals source Location binary Folder final char exclusion Patterns is Output Folder source Location exclusion Patterns null ignore exclusion Patterns if output folder another source folder not this one final char inclusion Patterns is Output Folder source Location inclusion Patterns null ignore inclusion Patterns if output folder another source folder not this one source Location binary Folder accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception I Resource resource null if proxy get Type I Resource FILE if exclusion Patterns null inclusion Patterns null resource proxy request Resource if Util is Excluded resource inclusion Patterns exclusion Patterns return false if org eclipse jdt internal compiler util Util is Class File Name proxy get Name if resource null resource proxy request Resource resource delete I Resource FORCE null return false if exclusion Patterns null inclusion Patterns null if there are inclusion patterns then we must walk the children resource proxy request Resource if Util is Excluded resource inclusion Patterns exclusion Patterns return false notifier check Cancel return true I Resource NONE if is Output Folder copy Back notifier check Cancel copy Packages source Location notifier check Cancel else if copy Back for int i 0 l source Locations length i l i Classpath Multi Directory source Location source Locations i if source Location has Independent Output Folder copy Extra Resources Back source Location false else if source Location source Folder equals source Location binary Folder copy Packages source Location output folder is different from source folder notifier check Cancel  cleanOutputFolders copyBack CoreException deleteAll JavaCore javaBuilder javaProject getOption JavaCore CORE_JAVA_BUILD_CLEAN_OUTPUT_FOLDER deleteAll ArrayList ArrayList sourceLocations sourceLocations subTask cleaningOutput ClasspathMultiDirectory sourceLocation sourceLocations sourceLocation hasIndependentOutputFolder IContainer outputFolder sourceLocation binaryFolder outputFolder outputFolder IResource outputFolder IResource isDerived IResourceVisitor IResource CoreException setDerived getType IResource IResource checkCancel copyBack copyExtraResourcesBack sourceLocation isOutputFolder sourceLocation sourceFolder sourceLocation binaryFolder exclusionPatterns isOutputFolder sourceLocation exclusionPatterns exclusionPatterns inclusionPatterns isOutputFolder sourceLocation inclusionPatterns inclusionPatterns sourceLocation binaryFolder IResourceProxyVisitor IResourceProxy CoreException IResource getType IResource exclusionPatterns inclusionPatterns requestResource isExcluded inclusionPatterns exclusionPatterns isClassFileName getName requestResource IResource exclusionPatterns inclusionPatterns requestResource isExcluded inclusionPatterns exclusionPatterns checkCancel IResource isOutputFolder copyBack checkCancel copyPackages sourceLocation checkCancel copyBack sourceLocations ClasspathMultiDirectory sourceLocation sourceLocations sourceLocation hasIndependentOutputFolder copyExtraResourcesBack sourceLocation sourceLocation sourceFolder sourceLocation binaryFolder copyPackages sourceLocation checkCancel
new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception I Resource resource null switch proxy get Type case I Resource FILE if org eclipse jdt internal compiler util Util is Java File Name proxy get Name org eclipse jdt internal compiler util Util is Class File Name proxy get Name return false resource proxy request Resource if java Builder filter Extra Resource resource return false if exclusion Patterns null inclusion Patterns null if Util is Excluded resource inclusion Patterns exclusion Patterns return false I Path partial Path resource get Full Path remove First Segments segment Count I Resource copied Resource output Folder get File partial Path if copied Resource exists if deleted All I Resource original Resource find Original Resource partial Path String id original Resource get Full Path remove First Segments 1 to String create Problem For resource Util bind build duplicate Resource id NON NLS 1 java Builder java Project get Option Java Core CORE JAVA BUILD DUPLICATE RESOURCE true return false copied Resource delete I Resource FORCE null last one wins resource copy copied Resource get Full Path I Resource FORCE null copied Resource set Derived true copied Resource set Read Only false just in case the original was read only return false case I Resource FOLDER resource proxy request Resource if java Builder filter Extra Resource resource return false I Path folder Path resource get Full Path if is Also Project is Excluded From Project folder Path return false the source Folder project if exclusion Patterns null Util is Excluded resource inclusion Patterns exclusion Patterns return inclusion Patterns null need to go further only if inclusion Patterns are set create Folder folder Path remove First Segments segment Count output Folder return true  IResourceProxyVisitor IResourceProxy CoreException IResource getType IResource isJavaFileName getName isClassFileName getName requestResource javaBuilder filterExtraResource exclusionPatterns inclusionPatterns isExcluded inclusionPatterns exclusionPatterns IPath partialPath getFullPath removeFirstSegments segmentCount IResource copiedResource outputFolder getFile partialPath copiedResource deletedAll IResource originalResource findOriginalResource partialPath originalResource getFullPath removeFirstSegments toString createProblemFor duplicateResource javaBuilder javaProject getOption JavaCore CORE_JAVA_BUILD_DUPLICATE_RESOURCE copiedResource IResource copiedResource getFullPath IResource copiedResource setDerived copiedResource setReadOnly IResource requestResource javaBuilder filterExtraResource IPath folderPath getFullPath isAlsoProject isExcludedFromProject folderPath sourceFolder exclusionPatterns isExcluded inclusionPatterns exclusionPatterns inclusionPatterns inclusionPatterns createFolder folderPath removeFirstSegments segmentCount outputFolder
protected void copy Extra Resources Back Classpath Multi Directory source Location final boolean deleted All throws Core Exception When if ever does a builder need to copy resources files not java or class into the output folder If we wipe the output folder at the beginning of the build then all extra resources must be copied to the output folder notifier sub Task Util bind build copying Resources NON NLS 1 final int segment Count source Location source Folder get Full Path segment Count final char exclusion Patterns source Location exclusion Patterns final char inclusion Patterns source Location inclusion Patterns final I Container output Folder source Location binary Folder final boolean is Also Project source Location source Folder equals java Builder current Project source Location source Folder accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception I Resource resource null switch proxy get Type case I Resource FILE if org eclipse jdt internal compiler util Util is Java File Name proxy get Name org eclipse jdt internal compiler util Util is Class File Name proxy get Name return false resource proxy request Resource if java Builder filter Extra Resource resource return false if exclusion Patterns null inclusion Patterns null if Util is Excluded resource inclusion Patterns exclusion Patterns return false I Path partial Path resource get Full Path remove First Segments segment Count I Resource copied Resource output Folder get File partial Path if copied Resource exists if deleted All I Resource original Resource find Original Resource partial Path String id original Resource get Full Path remove First Segments 1 to String create Problem For resource Util bind build duplicate Resource id NON NLS 1 java Builder java Project get Option Java Core CORE JAVA BUILD DUPLICATE RESOURCE true return false copied Resource delete I Resource FORCE null last one wins resource copy copied Resource get Full Path I Resource FORCE null copied Resource set Derived true copied Resource set Read Only false just in case the original was read only return false case I Resource FOLDER resource proxy request Resource if java Builder filter Extra Resource resource return false I Path folder Path resource get Full Path if is Also Project is Excluded From Project folder Path return false the source Folder project if exclusion Patterns null Util is Excluded resource inclusion Patterns exclusion Patterns return inclusion Patterns null need to go further only if inclusion Patterns are set create Folder folder Path remove First Segments segment Count output Folder return true I Resource NONE  copyExtraResourcesBack ClasspathMultiDirectory sourceLocation deletedAll CoreException subTask copyingResources segmentCount sourceLocation sourceFolder getFullPath segmentCount exclusionPatterns sourceLocation exclusionPatterns inclusionPatterns sourceLocation inclusionPatterns IContainer outputFolder sourceLocation binaryFolder isAlsoProject sourceLocation sourceFolder javaBuilder currentProject sourceLocation sourceFolder IResourceProxyVisitor IResourceProxy CoreException IResource getType IResource isJavaFileName getName isClassFileName getName requestResource javaBuilder filterExtraResource exclusionPatterns inclusionPatterns isExcluded inclusionPatterns exclusionPatterns IPath partialPath getFullPath removeFirstSegments segmentCount IResource copiedResource outputFolder getFile partialPath copiedResource deletedAll IResource originalResource findOriginalResource partialPath originalResource getFullPath removeFirstSegments toString createProblemFor duplicateResource javaBuilder javaProject getOption JavaCore CORE_JAVA_BUILD_DUPLICATE_RESOURCE copiedResource IResource copiedResource getFullPath IResource copiedResource setDerived copiedResource setReadOnly IResource requestResource javaBuilder filterExtraResource IPath folderPath getFullPath isAlsoProject isExcludedFromProject folderPath sourceFolder exclusionPatterns isExcluded inclusionPatterns exclusionPatterns inclusionPatterns inclusionPatterns createFolder folderPath removeFirstSegments segmentCount outputFolder IResource
new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception switch proxy get Type case I Resource FILE return false case I Resource FOLDER I Resource resource proxy request Resource if java Builder filter Extra Resource resource return false I Path folder Path resource get Full Path if is Also Project is Excluded From Project folder Path return false the source Folder project if exclusion Patterns null Util is Excluded resource inclusion Patterns exclusion Patterns return inclusion Patterns null need to go further only if inclusion Patterns are set create Folder folder Path remove First Segments segment Count output Folder return true  IResourceProxyVisitor IResourceProxy CoreException getType IResource IResource IResource requestResource javaBuilder filterExtraResource IPath folderPath getFullPath isAlsoProject isExcludedFromProject folderPath sourceFolder exclusionPatterns isExcluded inclusionPatterns exclusionPatterns inclusionPatterns inclusionPatterns createFolder folderPath removeFirstSegments segmentCount outputFolder
protected void copy Packages Classpath Multi Directory source Location throws Core Exception final int segment Count source Location source Folder get Full Path segment Count final char exclusion Patterns source Location exclusion Patterns final char inclusion Patterns source Location inclusion Patterns final I Container output Folder source Location binary Folder final boolean is Also Project source Location source Folder equals java Builder current Project source Location source Folder accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception switch proxy get Type case I Resource FILE return false case I Resource FOLDER I Resource resource proxy request Resource if java Builder filter Extra Resource resource return false I Path folder Path resource get Full Path if is Also Project is Excluded From Project folder Path return false the source Folder project if exclusion Patterns null Util is Excluded resource inclusion Patterns exclusion Patterns return inclusion Patterns null need to go further only if inclusion Patterns are set create Folder folder Path remove First Segments segment Count output Folder return true I Resource NONE  copyPackages ClasspathMultiDirectory sourceLocation CoreException segmentCount sourceLocation sourceFolder getFullPath segmentCount exclusionPatterns sourceLocation exclusionPatterns inclusionPatterns sourceLocation inclusionPatterns IContainer outputFolder sourceLocation binaryFolder isAlsoProject sourceLocation sourceFolder javaBuilder currentProject sourceLocation sourceFolder IResourceProxyVisitor IResourceProxy CoreException getType IResource IResource IResource requestResource javaBuilder filterExtraResource IPath folderPath getFullPath isAlsoProject isExcludedFromProject folderPath sourceFolder exclusionPatterns isExcluded inclusionPatterns exclusionPatterns inclusionPatterns inclusionPatterns createFolder folderPath removeFirstSegments segmentCount outputFolder IResource
protected I Resource find Original Resource I Path partial Path for int i 0 l source Locations length i l i Classpath Multi Directory source Location source Locations i if source Location has Independent Output Folder I Resource original Resource source Location source Folder get File partial Path if original Resource exists return original Resource return null  IResource findOriginalResource IPath partialPath sourceLocations ClasspathMultiDirectory sourceLocation sourceLocations sourceLocation hasIndependentOutputFolder IResource originalResource sourceLocation sourceFolder getFile partialPath originalResource originalResource
public String to String return batch image builder for n tnew state new State NON NLS 1  toString newState

public static void reset Problem Counters New Error Count 0 Fixed Error Count 0 New Warning Count 0 Fixed Warning Count 0  resetProblemCounters NewErrorCount FixedErrorCount NewWarningCount FixedWarningCount
public Build Notifier I Progress Monitor monitor I Project project this monitor monitor this cancelling false this new Error Count New Error Count this fixed Error Count Fixed Error Count this new Warning Count New Warning Count this fixed Warning Count Fixed Warning Count this work Done 0 this total Work 1000000  BuildNotifier IProgressMonitor IProject newErrorCount NewErrorCount fixedErrorCount FixedErrorCount newWarningCount NewWarningCount fixedWarningCount FixedWarningCount workDone totalWork
Notification before a compile that a unit is about to be compiled public void about To Compile Source File unit String message Util bind build compiling unit resource get Full Path remove Last Segments 1 make Relative to String NON NLS 1 sub Task message  aboutToCompile SourceFile getFullPath removeLastSegments makeRelative toString subTask
public void begin if monitor null monitor begin Task total Work NON NLS 1 this previous Subtask null  beginTask totalWork previousSubtask
Check whether the build has been canceled public void check Cancel if monitor null monitor is Canceled throw new Operation Canceled Exception  checkCancel isCanceled OperationCanceledException
Check whether the build has been canceled Must use this call instead of check Cancel when within the compiler public void check Cancel Within Compiler if monitor null monitor is Canceled cancelling Once the compiler has been canceled don t check again set Cancelling true Only Abort Compilation can stop the compiler cleanly We check cancelation again following the call to compile throw new Abort Compilation true null  checkCancel checkCancelWithinCompiler isCanceled setCancelling AbortCompilation AbortCompilation
Notification while within a compile that a unit has finished being compiled public void compiled Source File unit String message Util bind build compiling unit resource get Full Path remove Last Segments 1 make Relative to String NON NLS 1 sub Task message update Progress Delta progress Per Compilation Unit check Cancel Within Compiler  SourceFile getFullPath removeLastSegments makeRelative toString subTask updateProgressDelta progressPerCompilationUnit checkCancelWithinCompiler
public void done New Error Count this new Error Count Fixed Error Count this fixed Error Count New Warning Count this new Warning Count Fixed Warning Count this fixed Warning Count update Progress 1 0f sub Task Util bind build done NON NLS 1 if monitor null monitor done this previous Subtask null  NewErrorCount newErrorCount FixedErrorCount fixedErrorCount NewWarningCount newWarningCount FixedWarningCount fixedWarningCount updateProgress subTask previousSubtask
Returns a string describing the problems protected String problems Message int num New new Error Count new Warning Count int num Fixed fixed Error Count fixed Warning Count if num New 0 num Fixed 0 return NON NLS 1 boolean display Both num New 0 num Fixed 0 String Buffer buffer new String Buffer buffer append if num New 0 Found x errors y warnings buffer append Util bind build found Header NON NLS 1 buffer append if display Both new Error Count 0 if new Error Count 1 buffer append Util bind build one Error NON NLS 1 else buffer append Util bind build multiple Errors String value Of new Error Count NON NLS 1 if display Both new Warning Count 0 buffer append NON NLS 1 if display Both new Warning Count 0 if new Warning Count 1 buffer append Util bind build one Warning NON NLS 1 else buffer append Util bind build multiple Warnings String value Of new Warning Count NON NLS 1 if num Fixed 0 buffer append NON NLS 1 if num Fixed 0 Fixed x errors y warnings or Found x errors y warnings Fixed x y buffer append Util bind build fixed Header NON NLS 1 buffer append if display Both buffer append String value Of fixed Error Count buffer append NON NLS 1 buffer append String value Of fixed Warning Count else if fixed Error Count 0 if fixed Error Count 1 buffer append Util bind build one Error NON NLS 1 else buffer append Util bind build multiple Errors String value Of fixed Error Count NON NLS 1 if fixed Warning Count 0 buffer append NON NLS 1 if fixed Warning Count 0 if fixed Warning Count 1 buffer append Util bind build one Warning NON NLS 1 else buffer append Util bind build multiple Warnings String value Of fixed Warning Count NON NLS 1 buffer append return buffer to String  problemsMessage numNew newErrorCount newWarningCount numFixed fixedErrorCount fixedWarningCount numNew numFixed displayBoth numNew numFixed StringBuffer StringBuffer numNew foundHeader displayBoth newErrorCount newErrorCount oneError multipleErrors valueOf newErrorCount displayBoth newWarningCount displayBoth newWarningCount newWarningCount oneWarning multipleWarnings valueOf newWarningCount numFixed numFixed fixedHeader displayBoth valueOf fixedErrorCount valueOf fixedWarningCount fixedErrorCount fixedErrorCount oneError multipleErrors valueOf fixedErrorCount fixedWarningCount fixedWarningCount fixedWarningCount oneWarning multipleWarnings valueOf fixedWarningCount toString
Sets the cancelling flag which indicates we are in the middle of being cancelled Certain places those callable indirectly from the compiler should not check cancel again while this is true to avoid Operation Canceled Exception being thrown at an inopportune time public void set Cancelling boolean cancelling this cancelling cancelling  OperationCanceledException setCancelling
Sets the amount of progress to report for compiling each compilation unit public void set Progress Per Compilation Unit float progress this progress Per Compilation Unit progress  setProgressPerCompilationUnit progressPerCompilationUnit
public void sub Task String message String pm problems Message String msg pm length 0 message pm message NON NLS 1 if msg equals this previous Subtask return avoid refreshing with same one if Java Builder DEBUG System out println msg if monitor null monitor sub Task msg this previous Subtask msg  subTask problemsMessage previousSubtask JavaBuilder subTask previousSubtask
protected void update Problem Counts I Problem new Problems for int i 0 l new Problems length i l i if new Problems i is Error new Error Count else new Warning Count  updateProblemCounts IProblem newProblems newProblems newProblems isError newErrorCount newWarningCount
Update the problem counts from one compilation result given the old and new problems either of which may be null protected void update Problem Counts I Marker old Problems I Problem new Problems if new Problems null next for int i 0 l new Problems length i l i I Problem new Problem new Problems i if new Problem getID I Problem Task continue skip task boolean is Error new Problem is Error String message new Problem get Message if old Problems null for int j 0 m old Problems length j m j I Marker pb old Problems j if pb null continue already matched up with a new problem boolean was Error I Marker SEVERITY ERROR pb get Attribute I Marker SEVERITY I Marker SEVERITY ERROR if is Error was Error message equals pb get Attribute I Marker MESSAGE NON NLS 1 old Problems j null continue next if is Error new Error Count else new Warning Count if old Problems null next for int i 0 l old Problems length i l i I Marker old Problem old Problems i if old Problem null continue next already matched up with a new problem boolean was Error I Marker SEVERITY ERROR old Problem get Attribute I Marker SEVERITY I Marker SEVERITY ERROR String message old Problem get Attribute I Marker MESSAGE NON NLS 1 if new Problems null for int j 0 m new Problems length j m j I Problem pb new Problems j if pb getID I Problem Task continue skip task if was Error pb is Error message equals pb get Message continue next if was Error fixed Error Count else fixed Warning Count  updateProblemCounts IMarker oldProblems IProblem newProblems newProblems newProblems IProblem newProblem newProblems newProblem IProblem isError newProblem isError newProblem getMessage oldProblems oldProblems IMarker oldProblems wasError IMarker SEVERITY_ERROR getAttribute IMarker IMarker SEVERITY_ERROR isError wasError getAttribute IMarker oldProblems isError newErrorCount newWarningCount oldProblems oldProblems IMarker oldProblem oldProblems oldProblem wasError IMarker SEVERITY_ERROR oldProblem getAttribute IMarker IMarker SEVERITY_ERROR oldProblem getAttribute IMarker newProblems newProblems IProblem newProblems IProblem wasError isError getMessage wasError fixedErrorCount fixedWarningCount
public void update Progress float new Percent Complete if new Percent Complete this percent Complete this percent Complete Math min new Percent Complete 1 0f int work Math round this percent Complete this total Work if work this work Done if monitor null monitor worked work this work Done if Java Builder DEBUG System out println java text Number Format get Percent Instance format this percent Complete this work Done work  updateProgress newPercentComplete newPercentComplete percentComplete percentComplete newPercentComplete percentComplete totalWork workDone workDone JavaBuilder NumberFormat getPercentInstance percentComplete workDone
public void update Progress Delta float percent Worked update Progress percent Complete percent Worked  updateProgressDelta percentWorked updateProgress percentComplete percentWorked

Classpath Directory I Container binary Folder boolean is Output Folder this binary Folder binary Folder this is Output Folder is Output Folder I Path location binary Folder get Location this binary Location location null location add Trailing Separator to String NON NLS 1 this directory Cache new Simple Lookup Table 5  ClasspathDirectory IContainer binaryFolder isOutputFolder binaryFolder binaryFolder isOutputFolder isOutputFolder IPath binaryFolder getLocation binaryLocation addTrailingSeparator toString directoryCache SimpleLookupTable
public void cleanup this directory Cache null  directoryCache
String directory List String qualified Package Name String dir List String directory Cache get qualified Package Name if dir List missing Package Holder return null package exists in another classpath directory or jar if dir List null return dir List try I Resource container binary Folder find Member qualified Package Name this is a case sensitive check if container instanceof I Container is Excluded container I Resource members I Container container members dir List new String members length int index 0 for int i 0 l members length i l i I Resource m members i if m get Type I Resource FILE org eclipse jdt internal compiler util Util is Class File Name m get Name add exclusion pattern check here if we want to hide class files dir List index m get Name if index dir List length System arraycopy dir List 0 dir List new String index 0 index directory Cache put qualified Package Name dir List return dir List catch Core Exception ignored ignore directory Cache put qualified Package Name missing Package Holder return null  directoryList qualifiedPackageName dirList directoryCache qualifiedPackageName dirList missingPackageHolder dirList dirList IResource binaryFolder findMember qualifiedPackageName IContainer isExcluded IResource IContainer dirList IResource getType IResource isClassFileName getName dirList getName dirList dirList dirList directoryCache qualifiedPackageName dirList dirList CoreException directoryCache qualifiedPackageName missingPackageHolder
boolean does File Exist String file Name String qualified Package Name String qualified Full Name String dir List directory List qualified Package Name if dir List null return false most common case for int i dir List length i 0 if file Name equals dir List i return true return false  doesFileExist fileName qualifiedPackageName qualifiedFullName dirList directoryList qualifiedPackageName dirList dirList fileName dirList
public boolean equals Object o if this o return true if o instanceof Classpath Directory return false return binary Folder equals Classpath Directory o binary Folder  ClasspathDirectory binaryFolder ClasspathDirectory binaryFolder
public Name Environment Answer find Class String binary File Name String qualified Package Name String qualified Binary File Name if does File Exist binary File Name qualified Package Name qualified Binary File Name return null most common case try Class File Reader reader Class File Reader read binary Location qualified Binary File Name if reader null return new Name Environment Answer reader catch Exception e handle the case when the project is the output folder and the top level package is a linked folder if binary Folder instanceof I Project I Resource file binary Folder find Member qualified Binary File Name if file instanceof I File I Path location file get Location if location null try Class File Reader reader Class File Reader read location to String if reader null return new Name Environment Answer reader catch Exception ignored treat as if class file is missing return null  NameEnvironmentAnswer findClass binaryFileName qualifiedPackageName qualifiedBinaryFileName doesFileExist binaryFileName qualifiedPackageName qualifiedBinaryFileName ClassFileReader ClassFileReader binaryLocation qualifiedBinaryFileName NameEnvironmentAnswer binaryFolder IProject IResource binaryFolder findMember qualifiedBinaryFileName IFile IPath getLocation ClassFileReader ClassFileReader toString NameEnvironmentAnswer
public I Path get Project Relative Path return binary Folder get Project Relative Path  IPath getProjectRelativePath binaryFolder getProjectRelativePath
protected boolean is Excluded I Resource resource return false  isExcluded IResource
public boolean is Output Folder return is Output Folder  isOutputFolder isOutputFolder
public boolean is Package String qualified Package Name return directory List qualified Package Name null  isPackage qualifiedPackageName directoryList qualifiedPackageName
public void reset this directory Cache new Simple Lookup Table 5  directoryCache SimpleLookupTable
public String to String return Binary classpath directory binary Folder get Full Path to String NON NLS 1  toString binaryFolder getFullPath toString

Package Cache Entry long last Modified long file Size Simple Set package Set this last Modified last Modified this file Size file Size this package Set package Set  PackageCacheEntry lastModified fileSize SimpleSet packageSet lastModified lastModified fileSize fileSize packageSet packageSet
Calculate and cache the package list available in the zip File param zip File The zip file to use return A Simple Set with the all the package names in the zip File static Simple Set find Package Set Zip File zip File String zip File Name zip File get Name File zip File Object new File zip File Name long last Modified zip File Object last Modified long file Size zip File Object length Package Cache Entry cache Entry Package Cache Entry Package Cache get zip File Name if cache Entry null cache Entry last Modified last Modified cache Entry file Size file Size return cache Entry package Set Simple Set package Set new Simple Set 41 package Set add NON NLS 1 next Entry for Enumeration e zip File entries e has More Elements String file Name Zip Entry e next Element get Name add the package name all of its parent packages int last file Name last Index Of while last 0 extract the package name String package Name file Name substring 0 last if package Set includes package Name continue next Entry package Set add package Name last package Name last Index Of Package Cache put zip File Name new Package Cache Entry last Modified file Size package Set return package Set  zipFile zipFile SimpleSet zipFile SimpleSet findPackageSet ZipFile zipFile zipFileName zipFile getName zipFileObject zipFileName lastModified zipFileObject lastModified fileSize zipFileObject PackageCacheEntry cacheEntry PackageCacheEntry PackageCache zipFileName cacheEntry cacheEntry lastModified lastModified cacheEntry fileSize fileSize cacheEntry packageSet SimpleSet packageSet SimpleSet packageSet nextEntry zipFile hasMoreElements fileName ZipEntry nextElement getName fileName lastIndexOf packageName fileName packageSet packageName nextEntry packageSet packageName packageName lastIndexOf PackageCache zipFileName PackageCacheEntry lastModified fileSize packageSet packageSet
Classpath Jar String zip Filename this zip Filename zip Filename this zip File null this known Package Names null  ClasspathJar zipFilename zipFilename zipFilename zipFile knownPackageNames
Classpath Jar I File resource this resource resource I Path location resource get Location this zip Filename location null location to String NON NLS 1 this zip File null this known Package Names null  ClasspathJar IFile IPath getLocation zipFilename toString zipFile knownPackageNames
public Classpath Jar Zip File zip File this zip Filename zip File get Name this zip File zip File this close Zip File At End false this known Package Names null  ClasspathJar ZipFile zipFile zipFilename zipFile getName zipFile zipFile closeZipFileAtEnd knownPackageNames
public void cleanup if this zip File null this close Zip File At End try this zip File close catch IO Exception e ignore it this zip File null this known Package Names null  zipFile closeZipFileAtEnd zipFile IOException zipFile knownPackageNames
public boolean equals Object o if this o return true if o instanceof Classpath Jar return false return zip Filename equals Classpath Jar o zip Filename  ClasspathJar zipFilename ClasspathJar zipFilename
public Name Environment Answer find Class String binary File Name String qualified Package Name String qualified Binary File Name if is Package qualified Package Name return null most common case try Class File Reader reader Class File Reader read this zip File qualified Binary File Name if reader null return new Name Environment Answer reader catch Exception e treat as if class file is missing return null  NameEnvironmentAnswer findClass binaryFileName qualifiedPackageName qualifiedBinaryFileName isPackage qualifiedPackageName ClassFileReader ClassFileReader zipFile qualifiedBinaryFileName NameEnvironmentAnswer
public I Path get Project Relative Path if this resource null return null return this resource get Project Relative Path  IPath getProjectRelativePath getProjectRelativePath
public boolean is Package String qualified Package Name if this known Package Names null return this known Package Names includes qualified Package Name try if this zip File null if org eclipse jdt internal core Java Model Manager ZIP ACCESS VERBOSE System out println Thread current Thread Classpath Jar is Package String Creating Zip File on zip Filename NON NLS 1 NON NLS 2 this zip File new Zip File zip Filename this close Zip File At End true this known Package Names find Package Set this zip File catch Exception e this known Package Names new Simple Set assume for this build the zip File is empty return this known Package Names includes qualified Package Name  isPackage qualifiedPackageName knownPackageNames knownPackageNames qualifiedPackageName zipFile JavaModelManager ZIP_ACCESS_VERBOSE currentThread ClasspathJar isPackage ZipFile zipFilename zipFile ZipFile zipFilename closeZipFileAtEnd knownPackageNames findPackageSet zipFile knownPackageNames SimpleSet zipFile knownPackageNames qualifiedPackageName
public String to String return Classpath jar file zip Filename NON NLS 1  toString zipFilename

public abstract class Classpath Location static Classpath Location for Source Folder I Container source Folder I Container output Folder char inclusion Patterns char exclusion Patterns return new Classpath Multi Directory source Folder output Folder inclusion Patterns exclusion Patterns  ClasspathLocation ClasspathLocation forSourceFolder IContainer sourceFolder IContainer outputFolder inclusionPatterns exclusionPatterns ClasspathMultiDirectory sourceFolder outputFolder inclusionPatterns exclusionPatterns
public static Classpath Location for Binary Folder I Container binary Folder boolean is Output Folder return new Classpath Directory binary Folder is Output Folder  ClasspathLocation forBinaryFolder IContainer binaryFolder isOutputFolder ClasspathDirectory binaryFolder isOutputFolder
static Classpath Location for Library String library Pathname return new Classpath Jar library Pathname  ClasspathLocation forLibrary libraryPathname ClasspathJar libraryPathname
static Classpath Location for Library I File library return new Classpath Jar library  ClasspathLocation forLibrary IFile ClasspathJar
public abstract Name Environment Answer find Class String binary File Name String qualified Package Name String qualified Binary File Name  NameEnvironmentAnswer findClass binaryFileName qualifiedPackageName qualifiedBinaryFileName
public abstract Name Environment Answer find Class String binary File Name String qualified Package Name String qualified Binary File Name public abstract I Path get Project Relative Path  NameEnvironmentAnswer findClass binaryFileName qualifiedPackageName qualifiedBinaryFileName IPath getProjectRelativePath
public abstract I Path get Project Relative Path public boolean is Output Folder return false  IPath getProjectRelativePath isOutputFolder
public abstract boolean is Package String qualified Package Name  isPackage qualifiedPackageName
public abstract boolean is Package String qualified Package Name public void cleanup free anything which is not required when the state is saved  isPackage qualifiedPackageName
free anything which is not required when the state is saved public void reset reset any internal caches before another compile loop starts 

Classpath Multi Directory I Container source Folder I Container binary Folder char inclusion Patterns char exclusion Patterns super binary Folder true this source Folder source Folder this inclusion Patterns inclusion Patterns this exclusion Patterns exclusion Patterns this has Independent Output Folder false handle the case when a state rebuilds a source folder if this inclusion Patterns null this inclusion Patterns length 0 this inclusion Patterns null if this exclusion Patterns null this exclusion Patterns length 0 this exclusion Patterns null  ClasspathMultiDirectory IContainer sourceFolder IContainer binaryFolder inclusionPatterns exclusionPatterns binaryFolder sourceFolder sourceFolder inclusionPatterns inclusionPatterns exclusionPatterns exclusionPatterns hasIndependentOutputFolder inclusionPatterns inclusionPatterns inclusionPatterns exclusionPatterns exclusionPatterns exclusionPatterns
public boolean equals Object o if this o return true if o instanceof Classpath Multi Directory return false Classpath Multi Directory md Classpath Multi Directory o return source Folder equals md source Folder binary Folder equals md binary Folder Char Operation equals inclusion Patterns md inclusion Patterns Char Operation equals exclusion Patterns md exclusion Patterns  ClasspathMultiDirectory ClasspathMultiDirectory ClasspathMultiDirectory sourceFolder sourceFolder binaryFolder binaryFolder CharOperation inclusionPatterns inclusionPatterns CharOperation exclusionPatterns exclusionPatterns
protected boolean is Excluded I Resource resource if this exclusion Patterns null this inclusion Patterns null if this source Folder equals this binary Folder return Util is Excluded resource this inclusion Patterns this exclusion Patterns return false  isExcluded IResource exclusionPatterns inclusionPatterns sourceFolder binaryFolder isExcluded inclusionPatterns exclusionPatterns
public String to String return Source classpath directory source Folder get Full Path to String NON NLS 1 with binary directory binary Folder get Full Path to String NON NLS 1  toString sourceFolder getFullPath toString binaryFolder getFullPath toString

protected Core Exception core Exception public Image Builder Internal Exception Core Exception e this core Exception e  CoreException coreException ImageBuilderInternalException CoreException coreException
public String get Localized Message I Status status this core Exception get Status if status is Multi Status I Status children status get Children if children null children length 0 return children 0 get Message return this core Exception get Localized Message  getLocalizedMessage IStatus coreException getStatus isMultiStatus IStatus getChildren getMessage coreException getLocalizedMessage
public Core Exception get Throwable return core Exception  CoreException getThrowable coreException
public void print Stack Trace if core Exception null System err println this System err println Stack trace of embedded core exception NON NLS 1 core Exception print Stack Trace else super print Stack Trace  printStackTrace coreException coreException printStackTrace printStackTrace

protected Incremental Image Builder Java Builder java Builder super java Builder this name Environment is Incremental Build true this new State copy From java Builder last State this source Files new Array List 33 this previous Source Files null this qualified Strings new String Set 3 this simple Strings new String Set 3 this has Structural Changes false this compile Loop 0  IncrementalImageBuilder JavaBuilder javaBuilder javaBuilder nameEnvironment isIncrementalBuild newState copyFrom javaBuilder lastState sourceFiles ArrayList previousSourceFiles qualifiedStrings StringSet simpleStrings StringSet hasStructuralChanges compileLoop
public boolean build Simple Lookup Table deltas initialize builder walk this project s deltas find changed source files walk prereq projects deltas find changed class files add affected source files use the build state to skip the deltas for certain prereq projects ignore changed zip jar files since they caused a full build compile the source files accept Result compare the produced class files against the existing ones on disk recompile all dependent source files of any type with structural changes or new removed secondary type keep a loop counter to abort perform a full build if Java Builder DEBUG System out println INCREMENTAL build NON NLS 1 try reset Collections notifier sub Task Util bind build analyzing Deltas NON NLS 1 I Resource Delta source Delta I Resource Delta deltas get java Builder current Project if source Delta null if find Source Files source Delta return false notifier update Progress Delta 0 10f Object key Table deltas key Table Object value Table deltas value Table for int i 0 l value Table length i l i I Resource Delta delta I Resource Delta value Table i if delta null I Project p I Project key Table i Classpath Location class Folders And Jars Classpath Location java Builder binary Locations Per Project get p if class Folders And Jars null if find Affected Source Files delta class Folders And Jars p return false notifier update Progress Delta 0 10f notifier sub Task Util bind build analyzing Sources NON NLS 1 add Affected Source Files notifier update Progress Delta 0 05f this compile Loop 0 float increment 0 40f while source Files size 0 added to in accept Result if this compile Loop Max Compile Loop if Java Builder DEBUG System out println ABORTING incremental build exceeded loop count NON NLS 1 return false notifier check Cancel Source File all Source Files new Source File source Files size source Files to Array all Source Files reset Collections work Queue add All all Source Files notifier set Progress Per Compilation Unit increment all Source Files length increment increment 2 compile all Source Files remove Secondary Types add Affected Source Files if this has Structural Changes java Builder java Project has Cycle Marker java Builder must Propagate Structural Changes catch Abort Incremental Build Exception e abort the incremental build and let the batch builder handle the problem if Java Builder DEBUG System out println ABORTING incremental build problem with e qualified Type Name NON NLS 1 Likely renamed inside its existing source file NON NLS 1 return false catch Core Exception e throw internal Exception e finally clean Up return true  SimpleLookupTable acceptResult JavaBuilder resetCollections subTask analyzingDeltas IResourceDelta sourceDelta IResourceDelta javaBuilder currentProject sourceDelta findSourceFiles sourceDelta updateProgressDelta keyTable keyTable valueTable valueTable valueTable IResourceDelta IResourceDelta valueTable IProject IProject keyTable ClasspathLocation classFoldersAndJars ClasspathLocation javaBuilder binaryLocationsPerProject classFoldersAndJars findAffectedSourceFiles classFoldersAndJars updateProgressDelta subTask analyzingSources addAffectedSourceFiles updateProgressDelta compileLoop sourceFiles acceptResult compileLoop MaxCompileLoop JavaBuilder checkCancel SourceFile allSourceFiles SourceFile sourceFiles sourceFiles toArray allSourceFiles resetCollections workQueue addAll allSourceFiles setProgressPerCompilationUnit allSourceFiles allSourceFiles removeSecondaryTypes addAffectedSourceFiles hasStructuralChanges javaBuilder javaProject hasCycleMarker javaBuilder mustPropagateStructuralChanges AbortIncrementalBuildException JavaBuilder qualifiedTypeName CoreException internalException cleanUp
protected void add Affected Source Files if qualified Strings element Size 0 simple Strings element Size 0 return the qualified Strings are of the form p1 p2 the simple Strings are just X char qualified Names Reference Collection intern Qualified Names qualified Strings if a well known qualified name was found then we can skip over these if qualified Names length qualified Strings element Size qualified Names null char simple Names Reference Collection intern Simple Names simple Strings if a well known name was found then we can skip over these if simple Names length simple Strings element Size simple Names null Object key Table new State references key Table Object value Table new State references value Table next for int i 0 l value Table length i l i Reference Collection refs Reference Collection value Table i if refs null refs includes qualified Names simple Names String type Locator String key Table i I File file java Builder current Project get File type Locator if file exists Classpath Multi Directory md source Locations 0 if source Locations length 1 I Path source File Full Path file get Full Path for int j 0 m source Locations length j m j if source Locations j source Folder get Full Path is Prefix Of source File Full Path md source Locations j if md exclusion Patterns null md inclusion Patterns null break if Util is Excluded file md inclusion Patterns md exclusion Patterns break Source File source File new Source File file md if source Files contains source File continue next if compiled All At Once previous Source Files null previous Source Files contains source File continue next can skip previously compiled files since already saw hierarchy related problems if Java Builder DEBUG System out println adding affected source file type Locator NON NLS 1 source Files add source File  addAffectedSourceFiles qualifiedStrings elementSize simpleStrings elementSize qualifiedStrings simpleStrings qualifiedNames ReferenceCollection internQualifiedNames qualifiedStrings qualifiedNames qualifiedStrings elementSize qualifiedNames simpleNames ReferenceCollection internSimpleNames simpleStrings simpleNames simpleStrings elementSize simpleNames keyTable newState keyTable valueTable newState valueTable valueTable ReferenceCollection ReferenceCollection valueTable qualifiedNames simpleNames typeLocator keyTable IFile javaBuilder currentProject getFile typeLocator ClasspathMultiDirectory sourceLocations sourceLocations IPath sourceFileFullPath getFullPath sourceLocations sourceLocations sourceFolder getFullPath isPrefixOf sourceFileFullPath sourceLocations exclusionPatterns inclusionPatterns isExcluded inclusionPatterns exclusionPatterns SourceFile sourceFile SourceFile sourceFiles sourceFile compiledAllAtOnce previousSourceFiles previousSourceFiles sourceFile JavaBuilder typeLocator sourceFiles sourceFile
protected void add Dependents Of I Path path boolean is Structural Change if is Structural Change this has Structural Changes new State tag As Structurally Changed this has Structural Changes true the qualified Strings are of the form p1 p2 the simple Strings are just X path path set Device null String package Name path remove Last Segments 1 to String qualified Strings add package Name String type Name path last Segment int member Index type Name index Of if member Index 0 type Name type Name substring 0 member Index if simple Strings add type Name Java Builder DEBUG System out println will look for dependents of NON NLS 1 type Name in package Name NON NLS 1  addDependentsOf IPath isStructuralChange isStructuralChange hasStructuralChanges newState tagAsStructurallyChanged hasStructuralChanges qualifiedStrings simpleStrings setDevice packageName removeLastSegments toString qualifiedStrings packageName typeName lastSegment memberIndex typeName indexOf memberIndex typeName typeName memberIndex simpleStrings typeName JavaBuilder typeName packageName
protected void clean Up super clean Up this source Files null this previous Source Files null this qualified Strings null this simple Strings null this secondary Types To Remove null this has Structural Changes false this compile Loop 0  cleanUp cleanUp sourceFiles previousSourceFiles qualifiedStrings simpleStrings secondaryTypesToRemove hasStructuralChanges compileLoop
protected boolean find Affected Source Files I Resource Delta delta Classpath Location class Folders And Jars I Project prereq Project for int i 0 l class Folders And Jars length i l i Classpath Location b Location class Folders And Jars i either a class file folder or a zip jar file if b Location null skip unchanged output folder I Path p b Location get Project Relative Path if p null I Resource Delta binary Delta delta find Member p if binary Delta null if b Location instanceof Classpath Jar if Java Builder DEBUG System out println ABORTING incremental build found delta to jar zip file NON NLS 1 return false do full build since jar file was changed added removed were caught as classpath change if binary Delta get Kind I Resource Delta ADDED binary Delta get Kind I Resource Delta REMOVED if Java Builder DEBUG System out println ABORTING incremental build found added removed binary folder NON NLS 1 return false added removed binary folder should not make it here classpath change but handle anyways int segment Count binary Delta get Full Path segment Count I Resource Delta children binary Delta get Affected Children class files from class folder String Set structurally Changed Types null if b Location is Output Folder structurally Changed Types this new State get Structurally Changed Types java Builder get Last State prereq Project for int j 0 m children length j m j find Affected Source Files children j segment Count structurally Changed Types notifier check Cancel return true  findAffectedSourceFiles IResourceDelta ClasspathLocation classFoldersAndJars IProject prereqProject classFoldersAndJars ClasspathLocation bLocation classFoldersAndJars bLocation IPath bLocation getProjectRelativePath IResourceDelta binaryDelta findMember binaryDelta bLocation ClasspathJar JavaBuilder binaryDelta getKind IResourceDelta binaryDelta getKind IResourceDelta JavaBuilder segmentCount binaryDelta getFullPath segmentCount IResourceDelta binaryDelta getAffectedChildren StringSet structurallyChangedTypes bLocation isOutputFolder structurallyChangedTypes newState getStructurallyChangedTypes javaBuilder getLastState prereqProject findAffectedSourceFiles segmentCount structurallyChangedTypes checkCancel
protected void find Affected Source Files I Resource Delta binary Delta int segment Count String Set structurally Changed Types When a package becomes a type or vice versa expect 2 deltas one on the folder one on the class file I Resource resource binary Delta get Resource switch resource get Type case I Resource FOLDER switch binary Delta get Kind case I Resource Delta ADDED case I Resource Delta REMOVED I Path package Path resource get Full Path remove First Segments segment Count String package Name package Path to String if binary Delta get Kind I Resource Delta ADDED see if any known source file is from the same package classpath already includes new package if new State is Known Package package Name if Java Builder DEBUG System out println Found added package package Name NON NLS 1 add Dependents Of package Path false return if Java Builder DEBUG System out println Skipped dependents of added package package Name NON NLS 1 else see if the package still exists on the classpath if name Environment is Package package Name if Java Builder DEBUG System out println Found removed package package Name NON NLS 1 add Dependents Of package Path false return if Java Builder DEBUG System out println Skipped dependents of removed package package Name NON NLS 1 fall thru traverse the sub packages and class files case I Resource Delta CHANGED I Resource Delta children binary Delta get Affected Children for int i 0 l children length i l i find Affected Source Files children i segment Count structurally Changed Types return case I Resource FILE if org eclipse jdt internal compiler util Util is Class File Name resource get Name I Path type Path resource get Full Path remove First Segments segment Count remove File Extension switch binary Delta get Kind case I Resource Delta ADDED case I Resource Delta REMOVED if Java Builder DEBUG System out println Found added removed class file type Path NON NLS 1 add Dependents Of type Path false return case I Resource Delta CHANGED if binary Delta get Flags I Resource Delta CONTENT 0 return skip it since it really isn t changed if structurally Changed Types null structurally Changed Types includes type Path to String return skip since it wasn t a structural change if Java Builder DEBUG System out println Found changed class file type Path NON NLS 1 add Dependents Of type Path false return  findAffectedSourceFiles IResourceDelta binaryDelta segmentCount StringSet structurallyChangedTypes IResource binaryDelta getResource getType IResource binaryDelta getKind IResourceDelta IResourceDelta IPath packagePath getFullPath removeFirstSegments segmentCount packageName packagePath toString binaryDelta getKind IResourceDelta newState isKnownPackage packageName JavaBuilder packageName addDependentsOf packagePath JavaBuilder packageName nameEnvironment isPackage packageName JavaBuilder packageName addDependentsOf packagePath JavaBuilder packageName IResourceDelta IResourceDelta binaryDelta getAffectedChildren findAffectedSourceFiles segmentCount structurallyChangedTypes IResource isClassFileName getName IPath typePath getFullPath removeFirstSegments segmentCount removeFileExtension binaryDelta getKind IResourceDelta IResourceDelta JavaBuilder typePath addDependentsOf typePath IResourceDelta binaryDelta getFlags IResourceDelta structurallyChangedTypes structurallyChangedTypes typePath toString JavaBuilder typePath addDependentsOf typePath
protected boolean find Source Files I Resource Delta delta throws Core Exception for int i 0 l source Locations length i l i Classpath Multi Directory md source Locations i if md source Folder equals java Builder current Project skip nested source output folders when the project is a source folder int segment Count delta get Full Path segment Count I Resource Delta children delta get Affected Children for int j 0 m children length j m j if is Excluded From Project children j get Full Path find Source Files children j md segment Count else I Resource Delta source Delta delta find Member md source Folder get Project Relative Path if source Delta null if source Delta get Kind I Resource Delta REMOVED if Java Builder DEBUG System out println ABORTING incremental build found removed source folder NON NLS 1 return false removed source folder should not make it here but handle anyways ADDED is supported int segment Count source Delta get Full Path segment Count I Resource Delta children source Delta get Affected Children try for int j 0 m children length j m j find Source Files children j md segment Count catch org eclipse core internal resources Resource Exception e catch the case that a package has been renamed and collides on disk with an as yet to be deleted package if e get Status get Code I Resource Status CASE VARIANT EXISTS if Java Builder DEBUG System out println ABORTING incremental build found renamed package NON NLS 1 return false throw e rethrow notifier check Cancel return true  findSourceFiles IResourceDelta CoreException sourceLocations ClasspathMultiDirectory sourceLocations sourceFolder javaBuilder currentProject segmentCount getFullPath segmentCount IResourceDelta getAffectedChildren isExcludedFromProject getFullPath findSourceFiles segmentCount IResourceDelta sourceDelta findMember sourceFolder getProjectRelativePath sourceDelta sourceDelta getKind IResourceDelta JavaBuilder segmentCount sourceDelta getFullPath segmentCount IResourceDelta sourceDelta getAffectedChildren findSourceFiles segmentCount ResourceException getStatus getCode IResourceStatus CASE_VARIANT_EXISTS JavaBuilder checkCancel
protected void find Source Files I Resource Delta source Delta Classpath Multi Directory md int segment Count throws Core Exception When a package becomes a type or vice versa expect 2 deltas one on the folder one on the source file I Resource resource source Delta get Resource remember that if inclusion exclusion patterns change then a full build is done boolean is Excluded md exclusion Patterns null md inclusion Patterns null Util is Excluded resource md inclusion Patterns md exclusion Patterns switch resource get Type case I Resource FOLDER if is Excluded md inclusion Patterns null return no need to go further with this delta since its children cannot be included switch source Delta get Kind case I Resource Delta ADDED if is Excluded I Path added Package Path resource get Full Path remove First Segments segment Count create Folder added Package Path md binary Folder ensure package exists in the output folder add dependents even when the package thinks it exists to be on the safe side if Java Builder DEBUG System out println Found added package added Package Path NON NLS 1 add Dependents Of added Package Path true fall thru collect all the source files case I Resource Delta CHANGED I Resource Delta children source Delta get Affected Children for int i 0 l children length i l i find Source Files children i md segment Count return case I Resource Delta REMOVED if is Excluded since this folder is excluded then there is nothing to delete from this md but must walk any included subfolders children source Delta get Affected Children for int i 0 l children length i l i find Source Files children i md segment Count return I Path removed Package Path resource get Full Path remove First Segments segment Count if source Locations length 1 for int i 0 l source Locations length i l i if source Locations i source Folder get Folder removed Package Path exists only a package fragment was removed same as removing multiple source files create Folder removed Package Path md binary Folder ensure package exists in the output folder I Resource Delta removed Children source Delta get Affected Children for int j 0 m removed Children length j m j find Source Files removed Children j md segment Count return I Folder removed Package Folder md binary Folder get Folder removed Package Path if removed Package Folder exists removed Package Folder delete I Resource FORCE null add dependents even when the package thinks it does not exist to be on the safe side if Java Builder DEBUG System out println Found removed package removed Package Path NON NLS 1 add Dependents Of removed Package Path true new State remove Package source Delta return case I Resource FILE if is Excluded return String resource Name resource get Name if org eclipse jdt internal compiler util Util is Java File Name resource Name I Path type Path resource get Full Path remove First Segments segment Count remove File Extension String type Locator resource get Project Relative Path to String switch source Delta get Kind case I Resource Delta ADDED if Java Builder DEBUG System out println Compile this added source file type Locator NON NLS 1 source Files add new Source File I File resource md true String type Name type Path to String if new State is Duplicate Locator type Name type Locator adding dependents results in 2 duplicate errors if Java Builder DEBUG System out println Found added source file type Name NON NLS 1 add Dependents Of type Path true return case I Resource Delta REMOVED char defined Type Names new State get Defined Type Names For type Locator if defined Type Names null defined a single type matching type Path remove Class File type Path md binary Folder if source Delta get Flags I Resource Delta MOVED TO 0 remove problems and tasks for a compilation unit that is being moved to another package or renamed if the target file is a compilation unit the new cu will be recompiled if the target file is a non java resource then markers are removed see bug 2857 I Resource moved File java Builder workspace Root get File source Delta get Moved To Path Java Builder remove Problems And Tasks For moved File else if Java Builder DEBUG System out println Found removed source file type Path to String NON NLS 1 add Dependents Of type Path true add dependents of the source file since it may be involved in a name collision if defined Type Names length 0 skip it if it failed to successfully define a type I Path package Path type Path remove Last Segments 1 for int i 0 l defined Type Names length i l i remove Class File package Path append new String defined Type Names i md binary Folder new State remove Locator type Locator return case I Resource Delta CHANGED if source Delta get Flags I Resource Delta CONTENT 0 return skip it since it really isn t changed if Java Builder DEBUG System out println Compile this changed source file type Locator NON NLS 1 source Files add new Source File I File resource md true return else if org eclipse jdt internal compiler util Util is Class File Name resource Name return skip class files else if md has Independent Output Folder if java Builder filter Extra Resource resource return copy all other resource deltas to the output folder I Path resource Path resource get Full Path remove First Segments segment Count I Resource output File md binary Folder get File resource Path switch source Delta get Kind case I Resource Delta ADDED if output File exists if Java Builder DEBUG System out println Deleting existing file resource Path NON NLS 1 output File delete I Resource FORCE null if Java Builder DEBUG System out println Copying added file resource Path NON NLS 1 create Folder resource Path remove Last Segments 1 md binary Folder ensure package exists in the output folder resource copy output File get Full Path I Resource FORCE null output File set Derived true output File set Read Only false just in case the original was read only return case I Resource Delta REMOVED if output File exists if Java Builder DEBUG System out println Deleting removed file resource Path NON NLS 1 output File delete I Resource FORCE null return case I Resource Delta CHANGED if source Delta get Flags I Resource Delta CONTENT 0 return skip it since it really isn t changed if output File exists if Java Builder DEBUG System out println Deleting existing file resource Path NON NLS 1 output File delete I Resource FORCE null if Java Builder DEBUG System out println Copying changed file resource Path NON NLS 1 create Folder resource Path remove Last Segments 1 md binary Folder ensure package exists in the output folder resource copy output File get Full Path I Resource FORCE null output File set Derived true output File set Read Only false just in case the original was read only return  findSourceFiles IResourceDelta sourceDelta ClasspathMultiDirectory segmentCount CoreException IResource sourceDelta getResource isExcluded exclusionPatterns inclusionPatterns isExcluded inclusionPatterns exclusionPatterns getType IResource isExcluded inclusionPatterns sourceDelta getKind IResourceDelta isExcluded IPath addedPackagePath getFullPath removeFirstSegments segmentCount createFolder addedPackagePath binaryFolder JavaBuilder addedPackagePath addDependentsOf addedPackagePath IResourceDelta IResourceDelta sourceDelta getAffectedChildren findSourceFiles segmentCount IResourceDelta isExcluded sourceDelta getAffectedChildren findSourceFiles segmentCount IPath removedPackagePath getFullPath removeFirstSegments segmentCount sourceLocations sourceLocations sourceLocations sourceFolder getFolder removedPackagePath createFolder removedPackagePath binaryFolder IResourceDelta removedChildren sourceDelta getAffectedChildren removedChildren findSourceFiles removedChildren segmentCount IFolder removedPackageFolder binaryFolder getFolder removedPackagePath removedPackageFolder removedPackageFolder IResource JavaBuilder removedPackagePath addDependentsOf removedPackagePath newState removePackage sourceDelta IResource isExcluded resourceName getName isJavaFileName resourceName IPath typePath getFullPath removeFirstSegments segmentCount removeFileExtension typeLocator getProjectRelativePath toString sourceDelta getKind IResourceDelta JavaBuilder typeLocator sourceFiles SourceFile IFile typeName typePath toString newState isDuplicateLocator typeName typeLocator JavaBuilder typeName addDependentsOf typePath IResourceDelta definedTypeNames newState getDefinedTypeNamesFor typeLocator definedTypeNames typePath removeClassFile typePath binaryFolder sourceDelta getFlags IResourceDelta MOVED_TO IResource movedFile javaBuilder workspaceRoot getFile sourceDelta getMovedToPath JavaBuilder removeProblemsAndTasksFor movedFile JavaBuilder typePath toString addDependentsOf typePath definedTypeNames IPath packagePath typePath removeLastSegments definedTypeNames removeClassFile packagePath definedTypeNames binaryFolder newState removeLocator typeLocator IResourceDelta sourceDelta getFlags IResourceDelta JavaBuilder typeLocator sourceFiles SourceFile IFile isClassFileName resourceName hasIndependentOutputFolder javaBuilder filterExtraResource IPath resourcePath getFullPath removeFirstSegments segmentCount IResource outputFile binaryFolder getFile resourcePath sourceDelta getKind IResourceDelta outputFile JavaBuilder resourcePath outputFile IResource JavaBuilder resourcePath createFolder resourcePath removeLastSegments binaryFolder outputFile getFullPath IResource outputFile setDerived outputFile setReadOnly IResourceDelta outputFile JavaBuilder resourcePath outputFile IResource IResourceDelta sourceDelta getFlags IResourceDelta outputFile JavaBuilder resourcePath outputFile IResource JavaBuilder resourcePath createFolder resourcePath removeLastSegments binaryFolder outputFile getFullPath IResource outputFile setDerived outputFile setReadOnly
protected void finished With String source Locator Compilation Result result char main Type Name Array List defined Type Names Array List duplicate Type Names char previous Type Names new State get Defined Type Names For source Locator if previous Type Names null previous Type Names new char main Type Name I Path package Path null next for int i 0 l previous Type Names length i l i char previous previous Type Names i for int j 0 m defined Type Names size j m j if Char Operation equals previous char defined Type Names get j continue next Source File source File Source File result get Compilation Unit if package Path null int count source File source Location source Folder get Full Path segment Count package Path source File resource get Full Path remove First Segments count remove Last Segments 1 if secondary Types To Remove null this secondary Types To Remove new Simple Lookup Table Array List types Array List secondary Types To Remove get source File source Location binary Folder if types null types new Array List defined Type Names size types add package Path append new String previous secondary Types To Remove put source File source Location binary Folder types super finished With source Locator result main Type Name defined Type Names duplicate Type Names  finishedWith sourceLocator CompilationResult mainTypeName ArrayList definedTypeNames ArrayList duplicateTypeNames previousTypeNames newState getDefinedTypeNamesFor sourceLocator previousTypeNames previousTypeNames mainTypeName IPath packagePath previousTypeNames previousTypeNames definedTypeNames CharOperation definedTypeNames SourceFile sourceFile SourceFile getCompilationUnit packagePath sourceFile sourceLocation sourceFolder getFullPath segmentCount packagePath sourceFile getFullPath removeFirstSegments removeLastSegments secondaryTypesToRemove secondaryTypesToRemove SimpleLookupTable ArrayList ArrayList secondaryTypesToRemove sourceFile sourceLocation binaryFolder ArrayList definedTypeNames packagePath secondaryTypesToRemove sourceFile sourceLocation binaryFolder finishedWith sourceLocator mainTypeName definedTypeNames duplicateTypeNames
protected void remove Class File I Path type Path I Container output Folder throws Core Exception if type Path last Segment index Of 1 is not a nested type new State remove Qualified Type Name type Path to String add dependents even when the type thinks it does not exist to be on the safe side if Java Builder DEBUG System out println Found removed type type Path NON NLS 1 add Dependents Of type Path true when member types are removed their enclosing type is structurally changed I File class File output Folder get File type Path add File Extension Suffix Constants EXTENSION class if class File exists if Java Builder DEBUG System out println Deleting class file of removed type type Path NON NLS 1 class File delete I Resource FORCE null  removeClassFile IPath typePath IContainer outputFolder CoreException typePath lastSegment indexOf newState removeQualifiedTypeName typePath toString JavaBuilder typePath addDependentsOf typePath IFile classFile outputFolder getFile typePath addFileExtension SuffixConstants EXTENSION_class classFile JavaBuilder typePath classFile IResource
protected void remove Secondary Types throws Core Exception if secondary Types To Remove null delayed deleting secondary types until the end of the compile loop Object key Table secondary Types To Remove key Table Object value Table secondary Types To Remove value Table for int i 0 l key Table length i l i I Container output Folder I Container key Table i if output Folder null Array List paths Array List value Table i for int j 0 m paths size j m j remove Class File I Path paths get j output Folder this secondary Types To Remove null if previous Source Files null previous Source Files size 1 this previous Source Files null cannot optimize recompile case when a secondary type is deleted  removeSecondaryTypes CoreException secondaryTypesToRemove keyTable secondaryTypesToRemove keyTable valueTable secondaryTypesToRemove valueTable keyTable IContainer outputFolder IContainer keyTable outputFolder ArrayList ArrayList valueTable removeClassFile IPath outputFolder secondaryTypesToRemove previousSourceFiles previousSourceFiles previousSourceFiles
protected void reset Collections previous Source Files source Files is Empty null Array List source Files clone source Files clear qualified Strings clear simple Strings clear work Queue clear  resetCollections previousSourceFiles sourceFiles isEmpty ArrayList sourceFiles sourceFiles qualifiedStrings simpleStrings workQueue
protected void update Problems For Source File source File Compilation Result result throws Core Exception I Marker markers Java Builder get Problems For source File resource I Problem problems result get Problems if problems null markers length 0 return notifier update Problem Counts markers problems Java Builder remove Problems For source File resource store Problems For source File problems  updateProblemsFor SourceFile sourceFile CompilationResult CoreException IMarker JavaBuilder getProblemsFor sourceFile IProblem getProblems updateProblemCounts JavaBuilder removeProblemsFor sourceFile storeProblemsFor sourceFile
protected void update Tasks For Source File source File Compilation Result result throws Core Exception I Marker markers Java Builder get Tasks For source File resource I Problem tasks result get Tasks if tasks null markers length 0 return Java Builder remove Tasks For source File resource store Tasks For source File tasks  updateTasksFor SourceFile sourceFile CompilationResult CoreException IMarker JavaBuilder getTasksFor sourceFile IProblem getTasks JavaBuilder removeTasksFor sourceFile storeTasksFor sourceFile
protected void write Class File Bytes byte bytes I File file String qualified File Name boolean is Secondary Type boolean update Class File throws Core Exception Before writing out the class file compare it to the previous file If structural changes occured then add dependent source files if file exists if write Class File Check file qualified File Name bytes update Class File see 46093 if Java Builder DEBUG System out println Writing changed class file file get Name NON NLS 1 file set Contents new Byte Array Input Stream bytes true false null if file is Derived file set Derived true else if Java Builder DEBUG System out println Skipped over unchanged class file file get Name NON NLS 1 else if is Secondary Type add Dependents Of new Path qualified File Name true new secondary type if Java Builder DEBUG System out println Writing new class file file get Name NON NLS 1 try file create new Byte Array Input Stream bytes I Resource FORCE null catch org eclipse core internal resources Resource Exception e if e get Status get Code I Resource Status CASE VARIANT EXISTS catch the case that a nested type has been renamed and collides on disk with an as yet to be deleted type throw new Abort Compilation true new Abort Incremental Build Exception qualified File Name throw e rethrow file set Derived true  writeClassFileBytes IFile qualifiedFileName isSecondaryType updateClassFile CoreException writeClassFileCheck qualifiedFileName updateClassFile JavaBuilder getName setContents ByteArrayInputStream isDerived setDerived JavaBuilder getName isSecondaryType addDependentsOf qualifiedFileName JavaBuilder getName ByteArrayInputStream IResource ResourceException getStatus getCode IResourceStatus CASE_VARIANT_EXISTS AbortCompilation AbortIncrementalBuildException qualifiedFileName setDerived
protected boolean write Class File Check I File file String file Name byte new Bytes throws Core Exception try byte old Bytes Util get Resource Contents As Byte Array file not Equal if new Bytes length old Bytes length for int i new Bytes length i 0 if new Bytes i old Bytes i break not Equal return false bytes are identical so skip them I Path location file get Location if location null return false unable to determine location of this class file Class File Reader reader new Class File Reader old Bytes location to String to Char Array ignore local types since they re only visible inside a single method if reader is Local reader is Anonymous reader has Structural Changes new Bytes if Java Builder DEBUG System out println Type has structural changes file Name NON NLS 1 add Dependents Of new Path file Name true this new State was Structurally Changed file Name catch Class Format Exception e add Dependents Of new Path file Name true this new State was Structurally Changed file Name return true  writeClassFileCheck IFile fileName newBytes CoreException oldBytes getResourceContentsAsByteArray notEqual newBytes oldBytes newBytes newBytes oldBytes notEqual IPath getLocation ClassFileReader ClassFileReader oldBytes toString toCharArray isLocal isAnonymous hasStructuralChanges newBytes JavaBuilder fileName addDependentsOf fileName newState wasStructurallyChanged fileName ClassFormatException addDependentsOf fileName newState wasStructurallyChanged fileName
public String to String return incremental image builder for n tnew state new State NON NLS 1  toString newState

public static I Marker get Problems For I Resource resource try if resource null resource exists return resource find Markers I Java Model Marker JAVA MODEL PROBLEM MARKER false I Resource DEPTH INFINITE catch Core Exception e assume there are no problems return new I Marker 0  IMarker getProblemsFor IResource findMarkers IJavaModelMarker JAVA_MODEL_PROBLEM_MARKER IResource DEPTH_INFINITE CoreException IMarker
public static I Marker get Tasks For I Resource resource try if resource null resource exists return resource find Markers I Java Model Marker TASK MARKER false I Resource DEPTH INFINITE catch Core Exception e assume there are no tasks return new I Marker 0  IMarker getTasksFor IResource findMarkers IJavaModelMarker TASK_MARKER IResource DEPTH_INFINITE CoreException IMarker
Hook allowing to initialize some static state before a complete build iteration This hook is invoked during PRE AUTO BUILD notification public static void build Starting do nothing TODO philippe is it still needed  PRE_AUTO_BUILD buildStarting
Hook allowing to reset some static state after a complete build iteration This hook is invoked during POST AUTO BUILD notification public static void build Finished Build Notifier reset Problem Counters  POST_AUTO_BUILD buildFinished BuildNotifier resetProblemCounters
public static void remove Problems For I Resource resource try if resource null resource exists resource delete Markers I Java Model Marker JAVA MODEL PROBLEM MARKER false I Resource DEPTH INFINITE catch Core Exception e assume there were no problems  removeProblemsFor IResource deleteMarkers IJavaModelMarker JAVA_MODEL_PROBLEM_MARKER IResource DEPTH_INFINITE CoreException
public static void remove Tasks For I Resource resource try if resource null resource exists resource delete Markers I Java Model Marker TASK MARKER false I Resource DEPTH INFINITE catch Core Exception e assume there were no problems  removeTasksFor IResource deleteMarkers IJavaModelMarker TASK_MARKER IResource DEPTH_INFINITE CoreException
public static void remove Problems And Tasks For I Resource resource try if resource null resource exists resource delete Markers I Java Model Marker JAVA MODEL PROBLEM MARKER false I Resource DEPTH INFINITE resource delete Markers I Java Model Marker TASK MARKER false I Resource DEPTH INFINITE catch Core Exception e assume there were no problems  removeProblemsAndTasksFor IResource deleteMarkers IJavaModelMarker JAVA_MODEL_PROBLEM_MARKER IResource DEPTH_INFINITE deleteMarkers IJavaModelMarker TASK_MARKER IResource DEPTH_INFINITE CoreException
public static State read State I Project project Data Input Stream in throws IO Exception return State read project in  readState IProject DataInputStream IOException
public static void write State Object state Data Output Stream out throws IO Exception State state write out  writeState DataOutputStream IOException
protected I Project build int kind Map ignored I Progress Monitor monitor throws Core Exception this current Project get Project if current Project null current Project is Accessible return new I Project 0 if DEBUG System out println n Starting build of current Project get Name NON NLS 1 new Date System current Time Millis NON NLS 1 this notifier new Build Notifier monitor current Project notifier begin boolean ok false try notifier check Cancel initialize Builder if is Worth Building if kind FULL BUILD build All else if this last State get Last State current Project null if DEBUG System out println Performing full build since last saved state was not found NON NLS 1 build All else if has Classpath Changed if the output location changes do not delete the binary files from old location the user may be trying something build All else if name Environment source Locations length 0 if there is no source to compile no classpath changes then we are done Simple Lookup Table deltas find Deltas if deltas null build All else if deltas element Size 0 build Deltas deltas else if DEBUG System out println Nothing to build since deltas were empty NON NLS 1 else if has Structural Delta double check that a jar file didn t get replaced in a binary project build All else if DEBUG System out println Nothing to build since there are no source folders and no deltas NON NLS 1 last State tag As Noop Build ok true catch Core Exception e Util log e Java Builder handling Core Exception while building current Project get Name NON NLS 1 I Marker marker current Project create Marker I Java Model Marker JAVA MODEL PROBLEM MARKER marker set Attribute I Marker MESSAGE Util bind build inconsistent Project e get Localized Message NON NLS 1 marker set Attribute I Marker SEVERITY I Marker SEVERITY ERROR catch Image Builder Internal Exception e Util log e get Throwable Java Builder handling Image Builder Internal Exception while building current Project get Name NON NLS 1 I Marker marker current Project create Marker I Java Model Marker JAVA MODEL PROBLEM MARKER marker set Attribute I Marker MESSAGE Util bind build inconsistent Project e get Localized Message NON NLS 1 marker set Attribute I Marker SEVERITY I Marker SEVERITY ERROR catch Missing Class File Exception e do not log this exception since its thrown to handle aborted compiles because of missing class files if DEBUG System out println Util bind build incomplete Class Path e missing Class File NON NLS 1 I Marker marker current Project create Marker I Java Model Marker JAVA MODEL PROBLEM MARKER marker set Attribute I Marker MESSAGE Util bind build incomplete Class Path e missing Class File NON NLS 1 marker set Attribute I Marker SEVERITY I Marker SEVERITY ERROR catch Missing Source File Exception e do not log this exception since its thrown to handle aborted compiles because of missing source files if DEBUG System out println Util bind build missing Source File e missing Source File NON NLS 1 remove Problems And Tasks For current Project make this the only problem for this project I Marker marker current Project create Marker I Java Model Marker JAVA MODEL PROBLEM MARKER marker set Attribute I Marker MESSAGE Util bind build missing Source File e missing Source File NON NLS 1 marker set Attribute I Marker SEVERITY I Marker SEVERITY ERROR finally if ok If the build failed clear the previously built state forcing a full build next time clear Last State notifier done cleanup I Project required Projects get Required Projects true if DEBUG System out println Finished build of current Project get Name NON NLS 1 new Date System current Time Millis NON NLS 1 return required Projects  IProject IProgressMonitor CoreException currentProject getProject currentProject currentProject isAccessible IProject nStarting currentProject getName currentTimeMillis BuildNotifier currentProject checkCancel initializeBuilder isWorthBuilding FULL_BUILD buildAll lastState getLastState currentProject buildAll hasClasspathChanged buildAll nameEnvironment sourceLocations SimpleLookupTable findDeltas buildAll elementSize buildDeltas hasStructuralDelta buildAll lastState tagAsNoopBuild CoreException JavaBuilder CoreException currentProject getName IMarker currentProject createMarker IJavaModelMarker JAVA_MODEL_PROBLEM_MARKER setAttribute IMarker inconsistentProject getLocalizedMessage setAttribute IMarker IMarker SEVERITY_ERROR ImageBuilderInternalException getThrowable JavaBuilder ImageBuilderInternalException currentProject getName IMarker currentProject createMarker IJavaModelMarker JAVA_MODEL_PROBLEM_MARKER setAttribute IMarker inconsistentProject getLocalizedMessage setAttribute IMarker IMarker SEVERITY_ERROR MissingClassFileException incompleteClassPath missingClassFile IMarker currentProject createMarker IJavaModelMarker JAVA_MODEL_PROBLEM_MARKER setAttribute IMarker incompleteClassPath missingClassFile setAttribute IMarker IMarker SEVERITY_ERROR MissingSourceFileException missingSourceFile missingSourceFile removeProblemsAndTasksFor currentProject IMarker currentProject createMarker IJavaModelMarker JAVA_MODEL_PROBLEM_MARKER setAttribute IMarker missingSourceFile missingSourceFile setAttribute IMarker IMarker SEVERITY_ERROR clearLastState IProject requiredProjects getRequiredProjects currentProject getName currentTimeMillis requiredProjects
private void build All notifier check Cancel notifier sub Task Util bind build preparing Build NON NLS 1 if DEBUG last State null System out println Clearing last state last State NON NLS 1 clear Last State Batch Image Builder image Builder new Batch Image Builder this image Builder build record New State image Builder new State  buildAll checkCancel subTask preparingBuild lastState lastState clearLastState BatchImageBuilder imageBuilder BatchImageBuilder imageBuilder recordNewState imageBuilder newState
private void build Deltas Simple Lookup Table deltas notifier check Cancel notifier sub Task Util bind build preparing Build NON NLS 1 if DEBUG last State null System out println Clearing last state last State NON NLS 1 clear Last State clear the previously built state so if the build fails a full build will occur next time Incremental Image Builder image Builder new Incremental Image Builder this if image Builder build deltas record New State image Builder new State else build All  buildDeltas SimpleLookupTable checkCancel subTask preparingBuild lastState lastState clearLastState IncrementalImageBuilder imageBuilder IncrementalImageBuilder imageBuilder recordNewState imageBuilder newState buildAll
protected void clean I Progress Monitor monitor throws Core Exception this current Project get Project if current Project null current Project is Accessible return if DEBUG System out println n Cleaning current Project get Name NON NLS 1 new Date System current Time Millis NON NLS 1 this notifier new Build Notifier monitor current Project notifier begin try notifier check Cancel initialize Builder if DEBUG System out println Clearing last state as part of clean last State NON NLS 1 clear Last State remove Problems And Tasks For current Project new Batch Image Builder this clean Output Folders false catch Core Exception e Util log e Java Builder handling Core Exception while cleaning current Project get Name NON NLS 1 I Marker marker current Project create Marker I Java Model Marker JAVA MODEL PROBLEM MARKER marker set Attribute I Marker MESSAGE Util bind build inconsistent Project e get Localized Message NON NLS 1 marker set Attribute I Marker SEVERITY I Marker SEVERITY ERROR finally notifier done cleanup if DEBUG System out println Finished cleaning current Project get Name NON NLS 1 new Date System current Time Millis NON NLS 1  IProgressMonitor CoreException currentProject getProject currentProject currentProject isAccessible nCleaning currentProject getName currentTimeMillis BuildNotifier currentProject checkCancel initializeBuilder lastState clearLastState removeProblemsAndTasksFor currentProject BatchImageBuilder cleanOutputFolders CoreException JavaBuilder CoreException currentProject getName IMarker currentProject createMarker IJavaModelMarker JAVA_MODEL_PROBLEM_MARKER setAttribute IMarker inconsistentProject getLocalizedMessage setAttribute IMarker IMarker SEVERITY_ERROR currentProject getName currentTimeMillis
private void cleanup this name Environment null this binary Locations Per Project null this last State null this notifier null this extra Resource File Filters null this extra Resource Folder Filters null  nameEnvironment binaryLocationsPerProject lastState extraResourceFileFilters extraResourceFolderFilters
private void clear Last State Java Model Manager get Java Model Manager set Last Built State current Project null  clearLastState JavaModelManager getJavaModelManager setLastBuiltState currentProject
boolean filter Extra Resource I Resource resource if extra Resource File Filters null char name resource get Name to Char Array for int i 0 l extra Resource File Filters length i l i if Char Operation match extra Resource File Filters i name true return true if extra Resource Folder Filters null I Path path resource get Project Relative Path String path Name path to String int count path segment Count if resource get Type I Resource FILE count for int i 0 l extra Resource Folder Filters length i l i if path Name index Of extra Resource Folder Filters i 1 for int j 0 j count j if extra Resource Folder Filters i equals path segment j return true return false  filterExtraResource IResource extraResourceFileFilters getName toCharArray extraResourceFileFilters CharOperation extraResourceFileFilters extraResourceFolderFilters IPath getProjectRelativePath pathName toString segmentCount getType IResource extraResourceFolderFilters pathName indexOf extraResourceFolderFilters extraResourceFolderFilters
private Simple Lookup Table find Deltas notifier sub Task Util bind build reading Delta current Project get Name NON NLS 1 I Resource Delta delta get Delta current Project Simple Lookup Table deltas new Simple Lookup Table 3 if delta null if delta get Kind I Resource Delta NO CHANGE if DEBUG System out println Found source delta for current Project get Name NON NLS 1 deltas put current Project delta else if DEBUG System out println Missing delta for current Project get Name NON NLS 1 notifier sub Task NON NLS 1 return null Object key Table binary Locations Per Project key Table Object value Table binary Locations Per Project value Table next Project for int i 0 l key Table length i l i I Project p I Project key Table i if p null p current Project State s get Last State p if last State was Structurally Changed p s see if we can skip its delta if s was Noop Build continue next Project project has no source folders and can be skipped Classpath Location class Folders And Jars Classpath Location value Table i boolean can Skip true for int j 0 m class Folders And Jars length j m j if class Folders And Jars j is Output Folder class Folders And Jars j null can ignore output folder since project was not structurally changed else can Skip false if can Skip continue next Project project has no structural changes in its output folders notifier sub Task Util bind build reading Delta p get Name NON NLS 1 delta get Delta p if delta null if delta get Kind I Resource Delta NO CHANGE if DEBUG System out println Found binary delta for p get Name NON NLS 1 deltas put p delta else if DEBUG System out println Missing delta for p get Name NON NLS 1 notifier sub Task NON NLS 1 return null notifier sub Task NON NLS 1 return deltas  SimpleLookupTable findDeltas subTask readingDelta currentProject getName IResourceDelta getDelta currentProject SimpleLookupTable SimpleLookupTable getKind IResourceDelta NO_CHANGE currentProject getName currentProject currentProject getName subTask keyTable binaryLocationsPerProject keyTable valueTable binaryLocationsPerProject valueTable nextProject keyTable IProject IProject keyTable currentProject getLastState lastState wasStructurallyChanged wasNoopBuild nextProject ClasspathLocation classFoldersAndJars ClasspathLocation valueTable canSkip classFoldersAndJars classFoldersAndJars isOutputFolder classFoldersAndJars canSkip canSkip nextProject subTask readingDelta getName getDelta getKind IResourceDelta NO_CHANGE getName getName subTask subTask
public State get Last State I Project project return State Java Model Manager get Java Model Manager get Last Built State project notifier monitor  getLastState IProject JavaModelManager getJavaModelManager getLastBuiltState
private I Project get Required Projects boolean include Binary Prerequisites if java Project null workspace Root null return new I Project 0 Array List projects new Array List try I Classpath Entry entries java Project get Expanded Classpath true for int i 0 l entries length i l i I Classpath Entry entry entries i I Path path entry get Path I Project p null switch entry get Entry Kind case I Classpath Entry CPE PROJECT p workspace Root get Project path last Segment missing projects are considered too break case I Classpath Entry CPE LIBRARY if include Binary Prerequisites path segment Count 1 some binary resources on the class path can come from projects that are not included in the project references I Resource resource workspace Root find Member path segment 0 if resource instanceof I Project p I Project resource if p null projects contains p projects add p catch Java Model Exception e return new I Project 0 I Project result new I Project projects size projects to Array result return result  IProject getRequiredProjects includeBinaryPrerequisites javaProject workspaceRoot IProject ArrayList ArrayList IClasspathEntry javaProject getExpandedClasspath IClasspathEntry IPath getPath IProject getEntryKind IClasspathEntry CPE_PROJECT workspaceRoot getProject lastSegment IClasspathEntry CPE_LIBRARY includeBinaryPrerequisites segmentCount IResource workspaceRoot findMember IProject IProject JavaModelException IProject IProject IProject toArray
private boolean has Classpath Changed Classpath Multi Directory new Source Locations name Environment source Locations Classpath Multi Directory old Source Locations last State source Locations int new Length new Source Locations length int old Length old Source Locations length int n o for n o 0 n new Length o old Length n o if new Source Locations n equals old Source Locations o continue checks source output folders try if new Source Locations n source Folder members length 0 added new empty source folder o continue catch Core Exception ignore skip it if DEBUG System out println new Source Locations n old Source Locations o NON NLS 1 return true while n new Length try if new Source Locations n source Folder members length 0 added new empty source folder n continue catch Core Exception ignore skip it if DEBUG System out println Added non empty source folder NON NLS 1 return true if o old Length if DEBUG System out println Removed source folder NON NLS 1 return true Classpath Location new Binary Locations name Environment binary Locations Classpath Location old Binary Locations last State binary Locations new Length new Binary Locations length old Length old Binary Locations length for n o 0 n new Length o old Length n o if new Binary Locations n equals old Binary Locations o continue if DEBUG System out println new Binary Locations n old Binary Locations o NON NLS 1 return true if n new Length o old Length if DEBUG System out println Number of binary folders jar files has changed NON NLS 1 return true return false  hasClasspathChanged ClasspathMultiDirectory newSourceLocations nameEnvironment sourceLocations ClasspathMultiDirectory oldSourceLocations lastState sourceLocations newLength newSourceLocations oldLength oldSourceLocations newLength oldLength newSourceLocations oldSourceLocations newSourceLocations sourceFolder CoreException newSourceLocations oldSourceLocations newLength newSourceLocations sourceFolder CoreException oldLength ClasspathLocation newBinaryLocations nameEnvironment binaryLocations ClasspathLocation oldBinaryLocations lastState binaryLocations newLength newBinaryLocations oldLength oldBinaryLocations newLength oldLength newBinaryLocations oldBinaryLocations newBinaryLocations oldBinaryLocations newLength oldLength
private boolean has Structural Delta handle case when current Project has only class file folders and or jar files no source output folders I Resource Delta delta get Delta current Project if delta null delta get Kind I Resource Delta NO CHANGE Classpath Location class Folders And Jars Classpath Location binary Locations Per Project get current Project if class Folders And Jars null for int i 0 l class Folders And Jars length i l i Classpath Location class Folder Or Jar class Folders And Jars i either a class file folder or a zip jar file if class Folder Or Jar null I Path p class Folder Or Jar get Project Relative Path if p null I Resource Delta binary Delta delta find Member p if binary Delta null binary Delta get Kind I Resource Delta NO CHANGE return true return false  hasStructuralDelta currentProject IResourceDelta getDelta currentProject getKind IResourceDelta NO_CHANGE ClasspathLocation classFoldersAndJars ClasspathLocation binaryLocationsPerProject currentProject classFoldersAndJars classFoldersAndJars ClasspathLocation classFolderOrJar classFoldersAndJars classFolderOrJar IPath classFolderOrJar getProjectRelativePath IResourceDelta binaryDelta findMember binaryDelta binaryDelta getKind IResourceDelta NO_CHANGE
private void initialize Builder throws Core Exception this java Project Java Project Java Core create current Project this workspace Root current Project get Workspace get Root Flush the existing external files cache if this is the beginning of a build cycle String project Name current Project get Name if built Projects null built Projects contains project Name Java Model flush External File Cache built Projects new Array List built Projects add project Name this binary Locations Per Project new Simple Lookup Table 3 this name Environment new Name Environment workspace Root java Project binary Locations Per Project String filter Sequence java Project get Option Java Core CORE JAVA BUILD RESOURCE COPY FILTER true char filters filter Sequence null filter Sequence length 0 Char Operation split And Trim On filter Sequence to Char Array null if filters null this extra Resource File Filters null this extra Resource Folder Filters null else int file Count 0 folder Count 0 for int i 0 l filters length i l i char f filters i if f length 0 continue if f f length 1 folder Count else file Count this extra Resource File Filters new char file Count this extra Resource Folder Filters new String folder Count for int i 0 l filters length i l i char f filters i if f length 0 continue if f f length 1 extra Resource Folder Filters folder Count new String Char Operation subarray f 0 f length 1 else extra Resource File Filters file Count f  initializeBuilder CoreException javaProject JavaProject JavaCore currentProject workspaceRoot currentProject getWorkspace getRoot projectName currentProject getName builtProjects builtProjects projectName JavaModel flushExternalFileCache builtProjects ArrayList builtProjects projectName binaryLocationsPerProject SimpleLookupTable nameEnvironment NameEnvironment workspaceRoot javaProject binaryLocationsPerProject filterSequence javaProject getOption JavaCore CORE_JAVA_BUILD_RESOURCE_COPY_FILTER filterSequence filterSequence CharOperation splitAndTrimOn filterSequence toCharArray extraResourceFileFilters extraResourceFolderFilters fileCount folderCount folderCount fileCount extraResourceFileFilters fileCount extraResourceFolderFilters folderCount extraResourceFolderFilters folderCount CharOperation extraResourceFileFilters fileCount
private boolean is Classpath Broken I Classpath Entry classpath I Project p throws Core Exception if classpath Java Project INVALID CLASSPATH the classpath file could not be read return true I Marker markers p find Markers I Java Model Marker BUILDPATH PROBLEM MARKER false I Resource DEPTH ZERO for int i 0 l markers length i l i if Integer markers i get Attribute I Marker SEVERITY int Value I Marker SEVERITY ERROR return true return false  isClasspathBroken IClasspathEntry IProject CoreException JavaProject INVALID_CLASSPATH IMarker findMarkers IJavaModelMarker BUILDPATH_PROBLEM_MARKER IResource DEPTH_ZERO getAttribute IMarker intValue IMarker SEVERITY_ERROR
private boolean is Worth Building throws Core Exception boolean abort Builds Java Core ABORT equals java Project get Option Java Core CORE JAVA BUILD INVALID CLASSPATH true if abort Builds return true Abort build only if there are classpath errors if is Classpath Broken java Project get Raw Classpath current Project if DEBUG System out println Aborted build because project has classpath errors incomplete or involved in cycle NON NLS 1 remove Problems And Tasks For current Project remove all compilation problems I Marker marker current Project create Marker I Java Model Marker JAVA MODEL PROBLEM MARKER marker set Attribute I Marker MESSAGE Util bind build abort Due To Classpath Problems NON NLS 1 marker set Attribute I Marker SEVERITY I Marker SEVERITY ERROR return false make sure all prereq projects have valid build states only when aborting builds since projects in cycles do not have build states except for projects involved in a warning cycle see below I Project required Projects get Required Projects false next for int i 0 l required Projects length i l i I Project p required Projects i if get Last State p null The prereq project has no build state if this prereq project has a warning cycle marker then allow build see bug id 23357 Java Project prereq Java Project Java Core create p if prereq has Cycle Marker Java Core WARNING equals java Project get Option Java Core CORE CIRCULAR CLASSPATH true continue if DEBUG System out println Aborted build because prereq project p get Name NON NLS 1 was not built NON NLS 1 remove Problems And Tasks For current Project make this the only problem for this project I Marker marker current Project create Marker I Java Model Marker JAVA MODEL PROBLEM MARKER marker set Attribute I Marker MESSAGE is Classpath Broken prereq get Raw Classpath p Util bind build prereq Project Has Classpath Problems p get Name NON NLS 1 Util bind build prereq Project Must Be Rebuilt p get Name NON NLS 1 marker set Attribute I Marker SEVERITY I Marker SEVERITY ERROR return false return true  isWorthBuilding CoreException abortBuilds JavaCore javaProject getOption JavaCore CORE_JAVA_BUILD_INVALID_CLASSPATH abortBuilds isClasspathBroken javaProject getRawClasspath currentProject removeProblemsAndTasksFor currentProject IMarker currentProject createMarker IJavaModelMarker JAVA_MODEL_PROBLEM_MARKER setAttribute IMarker abortDueToClasspathProblems setAttribute IMarker IMarker SEVERITY_ERROR IProject requiredProjects getRequiredProjects requiredProjects IProject requiredProjects getLastState JavaProject JavaProject JavaCore hasCycleMarker JavaCore javaProject getOption JavaCore CORE_CIRCULAR_CLASSPATH getName removeProblemsAndTasksFor currentProject IMarker currentProject createMarker IJavaModelMarker JAVA_MODEL_PROBLEM_MARKER setAttribute IMarker isClasspathBroken getRawClasspath prereqProjectHasClasspathProblems getName prereqProjectMustBeRebuilt getName setAttribute IMarker IMarker SEVERITY_ERROR
void must Propagate Structural Changes Hash Set cycle Participants new Hash Set 3 java Project update Cycle Participants new Array List cycle Participants workspace Root new Hash Set 3 null I Path current Path java Project get Path Iterator i cycle Participants iterator while i has Next I Path participant Path I Path i next if participant Path current Path I Project project workspace Root get Project participant Path segment 0 if has Been Built project if DEBUG System out println Requesting another build iteration since cycle participant project get Name NON NLS 1 has not yet seen some structural changes NON NLS 1 need Rebuild return  mustPropagateStructuralChanges HashSet cycleParticipants HashSet javaProject updateCycleParticipants ArrayList cycleParticipants workspaceRoot HashSet IPath currentPath javaProject getPath cycleParticipants hasNext IPath participantPath IPath participantPath currentPath IProject workspaceRoot getProject participantPath hasBeenBuilt getName needRebuild
private void record New State State state Object key Table binary Locations Per Project key Table for int i 0 l key Table length i l i I Project prereq Project I Project key Table i if prereq Project null prereq Project current Project state record Structural Dependency prereq Project get Last State prereq Project if DEBUG System out println Recording new state state NON NLS 1 state dump Java Model Manager get Java Model Manager set Last Built State current Project state  recordNewState keyTable binaryLocationsPerProject keyTable keyTable IProject prereqProject IProject keyTable prereqProject prereqProject currentProject recordStructuralDependency prereqProject getLastState prereqProject JavaModelManager getJavaModelManager setLastBuiltState currentProject
String representation for debugging purposes public String to String return current Project null Java Builder for unknown project NON NLS 1 Java Builder for current Project get Name NON NLS 1  toString currentProject JavaBuilder JavaBuilder currentProject getName

protected String missing Class File public Missing Class File Exception String missing Class File this missing Class File missing Class File  missingClassFile MissingClassFileException missingClassFile missingClassFile missingClassFile

protected String missing Source File public Missing Source File Exception String missing Source File this missing Source File missing Source File  missingSourceFile MissingSourceFileException missingSourceFile missingSourceFile missingSourceFile

Name Environment I Workspace Root root Java Project java Project Simple Lookup Table binary Locations Per Project throws Core Exception this is Incremental Build false compute Classpath Locations root java Project binary Locations Per Project set Names null null  NameEnvironment IWorkspaceRoot JavaProject javaProject SimpleLookupTable binaryLocationsPerProject CoreException isIncrementalBuild computeClasspathLocations javaProject binaryLocationsPerProject setNames
public Name Environment I Java Project java Project this is Incremental Build false try compute Classpath Locations java Project get Project get Workspace get Root Java Project java Project null catch Core Exception e this source Locations new Classpath Multi Directory 0 this binary Locations new Classpath Location 0 set Names null null  NameEnvironment IJavaProject javaProject isIncrementalBuild computeClasspathLocations javaProject getProject getWorkspace getRoot JavaProject javaProject CoreException sourceLocations ClasspathMultiDirectory binaryLocations ClasspathLocation setNames
private void compute Classpath Locations I Workspace Root root Java Project java Project Simple Lookup Table binary Locations Per Project throws Core Exception Update cycle marker I Marker cycle Marker java Project get Cycle Marker if cycle Marker null int severity Java Core ERROR equals java Project get Option Java Core CORE CIRCULAR CLASSPATH true I Marker SEVERITY ERROR I Marker SEVERITY WARNING if severity Integer cycle Marker get Attribute I Marker SEVERITY int Value cycle Marker set Attribute I Marker SEVERITY severity I Classpath Entry classpath Entries java Project get Expanded Classpath true ignore unresolved variable false don t create markers null preferred cp null preferred output Array List s Locations new Array List classpath Entries length Array List b Locations new Array List classpath Entries length next Entry for int i 0 l classpath Entries length i l i Classpath Entry entry Classpath Entry classpath Entries i I Path path entry get Path Object target Java Model get Target root path true if target null continue next Entry switch entry get Entry Kind case I Classpath Entry CPE SOURCE if target instanceof I Container continue next Entry I Path output Path entry get Output Location null entry get Output Location java Project get Output Location I Container output Folder if output Path segment Count 1 output Folder java Project get Project else output Folder root get Folder output Path if output Folder exists create Folder output Folder s Locations add Classpath Location for Source Folder I Container target output Folder entry full Inclusion Pattern Chars entry full Exclusion Pattern Chars continue next Entry case I Classpath Entry CPE PROJECT if target instanceof I Project continue next Entry I Project prereq Project I Project target if Java Project has Java Nature prereq Project continue next Entry if project doesn t have java nature or is not accessible Java Project prereq Java Project Java Project Java Core create prereq Project I Classpath Entry prereq Classpath Entries prereq Java Project get Raw Classpath Array List seen new Array List next Prereq Entry for int j 0 m prereq Classpath Entries length j m j I Classpath Entry prereq Entry prereq Classpath Entries j if prereq Entry get Entry Kind I Classpath Entry CPE SOURCE Object prereq Target Java Model get Target root prereq Entry get Path true if prereq Target instanceof I Container continue next Prereq Entry I Path prereq Output Path prereq Entry get Output Location null prereq Entry get Output Location prereq Java Project get Output Location I Container binary Folder prereq Output Path segment Count 1 I Container prereq Project I Container root get Folder prereq Output Path if binary Folder exists seen contains binary Folder seen add binary Folder Classpath Location b Location Classpath Location for Binary Folder binary Folder true b Locations add b Location if binary Locations Per Project null normal builder mode Classpath Location existing Locations Classpath Location binary Locations Per Project get prereq Project if existing Locations null existing Locations new Classpath Location b Location else int size existing Locations length System arraycopy existing Locations 0 existing Locations new Classpath Location size 1 0 size existing Locations size b Location binary Locations Per Project put prereq Project existing Locations continue next Entry case I Classpath Entry CPE LIBRARY if target instanceof I Resource I Resource resource I Resource target Classpath Location b Location null if resource instanceof I File if org eclipse jdt internal compiler util Util is Archive File Name path last Segment continue next Entry b Location Classpath Location for Library I File resource else if resource instanceof I Container b Location Classpath Location for Binary Folder I Container target false is library folder not output folder b Locations add b Location if binary Locations Per Project null normal builder mode I Project p resource get Project can be the project being built Classpath Location existing Locations Classpath Location binary Locations Per Project get p if existing Locations null existing Locations new Classpath Location b Location else int size existing Locations length System arraycopy existing Locations 0 existing Locations new Classpath Location size 1 0 size existing Locations size b Location binary Locations Per Project put p existing Locations else if target instanceof File if org eclipse jdt internal compiler util Util is Archive File Name path last Segment continue next Entry b Locations add Classpath Location for Library path to String continue next Entry now split the classpath locations place the output folders ahead of the other class file folders jars Array List output Folders new Array List 1 this source Locations new Classpath Multi Directory s Locations size if s Locations is Empty s Locations to Array this source Locations collect the output folders skipping duplicates next for int i 0 l source Locations length i l i Classpath Multi Directory md source Locations i I Path output Path md binary Folder get Full Path for int j 0 j i j compare against previously walked source folders if output Path equals source Locations j binary Folder get Full Path md has Independent Output Folder source Locations j has Independent Output Folder continue next output Folders add md also tag each source folder whose output folder is an independent folder is not also a source folder for int j 0 m source Locations length j m j if output Path equals source Locations j source Folder get Full Path continue next md has Independent Output Folder true combine the output folders with the binary folders jars place the output folders before other class file folders jars this binary Locations new Classpath Location output Folders size b Locations size int index 0 for int i 0 l output Folders size i l i this binary Locations index Classpath Location output Folders get i for int i 0 l b Locations size i l i this binary Locations index Classpath Location b Locations get i  computeClasspathLocations IWorkspaceRoot JavaProject javaProject SimpleLookupTable binaryLocationsPerProject CoreException IMarker cycleMarker javaProject getCycleMarker cycleMarker JavaCore javaProject getOption JavaCore CORE_CIRCULAR_CLASSPATH IMarker SEVERITY_ERROR IMarker SEVERITY_WARNING cycleMarker getAttribute IMarker intValue cycleMarker setAttribute IMarker IClasspathEntry classpathEntries javaProject getExpandedClasspath ArrayList sLocations ArrayList classpathEntries ArrayList bLocations ArrayList classpathEntries nextEntry classpathEntries ClasspathEntry ClasspathEntry classpathEntries IPath getPath JavaModel getTarget nextEntry getEntryKind IClasspathEntry CPE_SOURCE IContainer nextEntry IPath outputPath getOutputLocation getOutputLocation javaProject getOutputLocation IContainer outputFolder outputPath segmentCount outputFolder javaProject getProject outputFolder getFolder outputPath outputFolder createFolder outputFolder sLocations ClasspathLocation forSourceFolder IContainer outputFolder fullInclusionPatternChars fullExclusionPatternChars nextEntry IClasspathEntry CPE_PROJECT IProject nextEntry IProject prereqProject IProject JavaProject hasJavaNature prereqProject nextEntry JavaProject prereqJavaProject JavaProject JavaCore prereqProject IClasspathEntry prereqClasspathEntries prereqJavaProject getRawClasspath ArrayList ArrayList nextPrereqEntry prereqClasspathEntries IClasspathEntry prereqEntry prereqClasspathEntries prereqEntry getEntryKind IClasspathEntry CPE_SOURCE prereqTarget JavaModel getTarget prereqEntry getPath prereqTarget IContainer nextPrereqEntry IPath prereqOutputPath prereqEntry getOutputLocation prereqEntry getOutputLocation prereqJavaProject getOutputLocation IContainer binaryFolder prereqOutputPath segmentCount IContainer prereqProject IContainer getFolder prereqOutputPath binaryFolder binaryFolder binaryFolder ClasspathLocation bLocation ClasspathLocation forBinaryFolder binaryFolder bLocations bLocation binaryLocationsPerProject ClasspathLocation existingLocations ClasspathLocation binaryLocationsPerProject prereqProject existingLocations existingLocations ClasspathLocation bLocation existingLocations existingLocations existingLocations ClasspathLocation existingLocations bLocation binaryLocationsPerProject prereqProject existingLocations nextEntry IClasspathEntry CPE_LIBRARY IResource IResource IResource ClasspathLocation bLocation IFile isArchiveFileName lastSegment nextEntry bLocation ClasspathLocation forLibrary IFile IContainer bLocation ClasspathLocation forBinaryFolder IContainer bLocations bLocation binaryLocationsPerProject IProject getProject ClasspathLocation existingLocations ClasspathLocation binaryLocationsPerProject existingLocations existingLocations ClasspathLocation bLocation existingLocations existingLocations existingLocations ClasspathLocation existingLocations bLocation binaryLocationsPerProject existingLocations isArchiveFileName lastSegment nextEntry bLocations ClasspathLocation forLibrary toString nextEntry ArrayList outputFolders ArrayList sourceLocations ClasspathMultiDirectory sLocations sLocations isEmpty sLocations toArray sourceLocations sourceLocations ClasspathMultiDirectory sourceLocations IPath outputPath binaryFolder getFullPath outputPath sourceLocations binaryFolder getFullPath hasIndependentOutputFolder sourceLocations hasIndependentOutputFolder outputFolders sourceLocations outputPath sourceLocations sourceFolder getFullPath hasIndependentOutputFolder binaryLocations ClasspathLocation outputFolders bLocations outputFolders binaryLocations ClasspathLocation outputFolders bLocations binaryLocations ClasspathLocation bLocations
public void cleanup this initial Type Names null this additional Units null for int i 0 l source Locations length i l i source Locations i cleanup for int i 0 l binary Locations length i l i binary Locations i cleanup  initialTypeNames additionalUnits sourceLocations sourceLocations binaryLocations binaryLocations
private void create Folder I Container folder throws Core Exception if folder exists create Folder folder get Parent I Folder folder create true true null  createFolder IContainer CoreException createFolder getParent IFolder
private Name Environment Answer find Class String qualified Type Name char type Name if initial Type Names null for int i 0 l initial Type Names length i l i if qualified Type Name equals initial Type Names i if is Incremental Build catch the case that a type inside a source file has been renamed but other class files are looking for it throw new Abort Compilation true new Abort Incremental Build Exception qualified Type Name return null looking for a file which we know was provided at the beginning of the compilation if additional Units null source Locations length 0 if an additional source file is waiting to be compiled answer it BUT not if this is a secondary type search if we answer X java it no longer defines Y then the binary type looking for Y will think the class path is wrong let the recompile loop fix up dependents when the secondary type Y has been deleted from X java I Path q Source File Path new Path qualified Type Name SUFFIX STRING java int q Segment Count q Source File Path segment Count next for int i 0 l additional Units length i l i Source File additional Unit additional Units i I Path full Path additional Unit resource get Full Path int prefix Count additional Unit source Location source Folder get Full Path segment Count if q Segment Count full Path segment Count prefix Count for int j 0 j q Segment Count j if q Source File Path segment j equals full Path segment j prefix Count continue next return new Name Environment Answer additional Unit String q Binary File Name qualified Type Name SUFFIX STRING class String binary File Name q Binary File Name String q Package Name NON NLS 1 if qualified Type Name length type Name length int type Name Start q Binary File Name length type Name length 6 size of class q Package Name q Binary File Name substring 0 type Name Start 1 binary File Name q Binary File Name substring type Name Start NOTE the output folders are added at the beginning of the binary Locations for int i 0 l binary Locations length i l i Name Environment Answer answer binary Locations i find Class binary File Name q Package Name q Binary File Name if answer null return answer return null  NameEnvironmentAnswer findClass qualifiedTypeName typeName initialTypeNames initialTypeNames qualifiedTypeName initialTypeNames isIncrementalBuild AbortCompilation AbortIncrementalBuildException qualifiedTypeName additionalUnits sourceLocations IPath qSourceFilePath qualifiedTypeName SUFFIX_STRING_java qSegmentCount qSourceFilePath segmentCount additionalUnits SourceFile additionalUnit additionalUnits IPath fullPath additionalUnit getFullPath prefixCount additionalUnit sourceLocation sourceFolder getFullPath segmentCount qSegmentCount fullPath segmentCount prefixCount qSegmentCount qSourceFilePath fullPath prefixCount NameEnvironmentAnswer additionalUnit qBinaryFileName qualifiedTypeName SUFFIX_STRING_class binaryFileName qBinaryFileName qPackageName qualifiedTypeName typeName typeNameStart qBinaryFileName typeName qPackageName qBinaryFileName typeNameStart binaryFileName qBinaryFileName typeNameStart binaryLocations binaryLocations NameEnvironmentAnswer binaryLocations findClass binaryFileName qPackageName qBinaryFileName
public Name Environment Answer find Type char compound Name if compound Name null return find Class new String Char Operation concat With compound Name compound Name compound Name length 1 return null  NameEnvironmentAnswer findType compoundName compoundName findClass CharOperation concatWith compoundName compoundName compoundName
public Name Environment Answer find Type char type Name char package Name if type Name null return find Class new String Char Operation concat With package Name type Name type Name return null  NameEnvironmentAnswer findType typeName packageName typeName findClass CharOperation concatWith packageName typeName typeName
public boolean is Package char compound Name char package Name return is Package new String Char Operation concat With compound Name package Name  isPackage compoundName packageName isPackage CharOperation concatWith compoundName packageName
public boolean is Package String qualified Package Name NOTE the output folders are added at the beginning of the binary Locations for int i 0 l binary Locations length i l i if binary Locations i is Package qualified Package Name return true return false  isPackage qualifiedPackageName binaryLocations binaryLocations binaryLocations isPackage qualifiedPackageName
void set Names String initial Type Names Source File additional Units this initial Type Names initial Type Names this additional Units additional Units for int i 0 l source Locations length i l i source Locations i reset for int i 0 l binary Locations length i l i binary Locations i reset  setNames initialTypeNames SourceFile additionalUnits initialTypeNames initialTypeNames additionalUnits additionalUnits sourceLocations sourceLocations binaryLocations binaryLocations

public Name Set int size this element Size 0 this threshold size size represents the expected number of elements int extra Room int size 1 5f if this threshold extra Room extra Room this names new char extra Room  NameSet elementSize extraRoom extraRoom extraRoom extraRoom
public char add char name int length names length int index Char Operation hash Code name length char current while current names index null if Char Operation equals current name return current if index length index 0 names index name assumes the threshold is never equal to the size of the table if element Size threshold rehash return name  CharOperation hashCode CharOperation elementSize
private void rehash Name Set new Set new Name Set element Size 2 double the number of expected elements char current for int i names length i 0 if current names i null new Set add current this names new Set names this element Size new Set element Size this threshold new Set threshold  NameSet newSet NameSet elementSize newSet newSet elementSize newSet elementSize newSet
public String to String String s NON NLS 1 char name for int i 0 l names length i l i if name names i null s new String name n NON NLS 1 return s  toString

static Simple Lookup Table factories new Simple Lookup Table 5 private Problem Factory Locale locale super locale  SimpleLookupTable SimpleLookupTable ProblemFactory
public static Problem Factory get Problem Factory Locale locale Problem Factory factory Problem Factory factories get locale if factory null factories put locale factory new Problem Factory locale return factory  ProblemFactory getProblemFactory ProblemFactory ProblemFactory ProblemFactory

public Qualified Name Set int size this element Size 0 this threshold size size represents the expected number of elements int extra Room int size 1 5f if this threshold extra Room extra Room this qualified Names new char extra Room  QualifiedNameSet elementSize extraRoom extraRoom extraRoom qualifiedNames extraRoom
public char add char qualified Name int q Length qualified Name length if q Length 0 return Char Operation NO CHAR CHAR int length qualified Names length int index Char Operation hash Code qualified Name q Length 1 length char current while current qualified Names index null if Char Operation equals current qualified Name return current if index length index 0 qualified Names index qualified Name assumes the threshold is never equal to the size of the table if element Size threshold rehash return qualified Name  qualifiedName qLength qualifiedName qLength CharOperation NO_CHAR_CHAR qualifiedNames CharOperation hashCode qualifiedName qLength qualifiedNames CharOperation qualifiedName qualifiedNames qualifiedName elementSize qualifiedName
private void rehash Qualified Name Set new Set new Qualified Name Set element Size 2 double the number of expected elements char current for int i qualified Names length i 0 if current qualified Names i null new Set add current this qualified Names new Set qualified Names this element Size new Set element Size this threshold new Set threshold  QualifiedNameSet newSet QualifiedNameSet elementSize qualifiedNames qualifiedNames newSet qualifiedNames newSet qualifiedNames elementSize newSet elementSize newSet
public String to String String s NON NLS 1 char qualified Name for int i 0 l qualified Names length i l i if qualified Name qualified Names i null s Char Operation to String qualified Name n NON NLS 1 return s  toString qualifiedName qualifiedNames qualifiedName qualifiedNames CharOperation toString qualifiedName

char simple Name References protected Reference Collection char qualified Name References char simple Name References this qualified Name References intern Qualified Names qualified Name References this simple Name References intern Simple Names simple Name References true  simpleNameReferences ReferenceCollection qualifiedNameReferences simpleNameReferences qualifiedNameReferences internQualifiedNames qualifiedNameReferences simpleNameReferences internSimpleNames simpleNameReferences
boolean includes char simple Name for int i 0 l simple Name References length i l i if simple Name simple Name References i return true return false  simpleName simpleNameReferences simpleName simpleNameReferences
boolean includes char qualified Name for int i 0 l qualified Name References length i l i if qualified Name qualified Name References i return true return false  qualifiedName qualifiedNameReferences qualifiedName qualifiedNameReferences
boolean includes char qualified Names char simple Names if either collection of names is null it means it contained a well known name so we know it already has a match if simple Names null qualified Names null if simple Names null qualified Names null if Java Builder DEBUG System out println Found well known match NON NLS 1 return true else if qualified Names null for int i 0 l simple Names length i l i if includes simple Names i if Java Builder DEBUG System out println Found match in well known package to new String simple Names i NON NLS 1 return true else for int i 0 l qualified Names length i l i char qualified Name qualified Names i if qualified Name length 1 includes qualified Name 0 includes qualified Name if Java Builder DEBUG System out println Found well known match in Char Operation to String qualified Name NON NLS 1 return true else for int i 0 l simple Names length i l i if includes simple Names i for int j 0 m qualified Names length j m j char qualified Name qualified Names j if qualified Name length 1 includes qualified Name 0 includes qualified Name if Java Builder DEBUG System out println Found match in Char Operation to String qualified Name NON NLS 1 to new String simple Names i NON NLS 1 return true return false return false  qualifiedNames simpleNames simpleNames qualifiedNames simpleNames qualifiedNames JavaBuilder qualifiedNames simpleNames simpleNames JavaBuilder simpleNames qualifiedNames qualifiedName qualifiedNames qualifiedName qualifiedName qualifiedName JavaBuilder CharOperation toString qualifiedName simpleNames simpleNames qualifiedNames qualifiedName qualifiedNames qualifiedName qualifiedName qualifiedName JavaBuilder CharOperation toString qualifiedName simpleNames
static char intern Qualified Names String Set qualified Strings if qualified Strings null return Empty Qualified Names int length qualified Strings element Size if length 0 return Empty Qualified Names char result new char length String strings qualified Strings values for int i 0 l strings length i l i if strings i null result length Char Operation split On strings i to Char Array return intern Qualified Names result  internQualifiedNames StringSet qualifiedStrings qualifiedStrings EmptyQualifiedNames qualifiedStrings elementSize EmptyQualifiedNames qualifiedStrings CharOperation splitOn toCharArray internQualifiedNames
static char intern Qualified Names char qualified Names if qualified Names null return Empty Qualified Names int length qualified Names length if length 0 return Empty Qualified Names char keepers new char length int index 0 next for int i 0 i length i char qualified Name qualified Names i int q Length qualified Name length for int j 0 m Well Known Qualified Names length j m j char well Known Name Well Known Qualified Names j if q Length well Known Name length break all remaining well known names are shorter if Char Operation equals qualified Name well Known Name continue next Interned Qualified Names 0 is for the rest 7 1 Interned Qualified Names 1 is for size 2 Interned Qualified Names 6 is for size 7 Qualified Name Set interned Names Interned Qualified Names q Length Max Qualified Names q Length 1 0 qualified Name intern Simple Names qualified Name false keepers index interned Names add qualified Name if length index if length 0 return Empty Qualified Names System arraycopy keepers 0 keepers new char index 0 index return keepers  internQualifiedNames qualifiedNames qualifiedNames EmptyQualifiedNames qualifiedNames EmptyQualifiedNames qualifiedName qualifiedNames qLength qualifiedName WellKnownQualifiedNames wellKnownName WellKnownQualifiedNames qLength wellKnownName CharOperation qualifiedName wellKnownName InternedQualifiedNames InternedQualifiedNames InternedQualifiedNames QualifiedNameSet internedNames InternedQualifiedNames qLength MaxQualifiedNames qLength qualifiedName internSimpleNames qualifiedName internedNames qualifiedName EmptyQualifiedNames
static char intern Simple Names String Set simple Strings if simple Strings null return Empty Simple Names int length simple Strings element Size if length 0 return Empty Simple Names char result new char length String strings simple Strings values for int i 0 l strings length i l i if strings i null result length strings i to Char Array return intern Simple Names result true  internSimpleNames StringSet simpleStrings simpleStrings EmptySimpleNames simpleStrings elementSize EmptySimpleNames simpleStrings toCharArray internSimpleNames
static char intern Simple Names char simple Names boolean remove Well Known if simple Names null return Empty Simple Names int length simple Names length if length 0 return Empty Simple Names char keepers new char length int index 0 next for int i 0 i length i char name simple Names i int s Length name length for int j 0 m Well Known Simple Names length j m j char well Known Name Well Known Simple Names j if s Length well Known Name length break all remaining well known names are shorter if Char Operation equals name well Known Name if remove Well Known keepers index Well Known Simple Names j continue next Interned Simple Names 0 is for the rest 29 Interned Simple Names 1 is for size 1 Interned Simple Names 29 is for size 29 Name Set interned Names Interned Simple Names s Length Max Simple Names s Length 0 keepers index interned Names add name if length index if index 0 return Empty Simple Names System arraycopy keepers 0 keepers new char index 0 index return keepers  internSimpleNames simpleNames removeWellKnown simpleNames EmptySimpleNames simpleNames EmptySimpleNames simpleNames sLength WellKnownSimpleNames wellKnownName WellKnownSimpleNames sLength wellKnownName CharOperation wellKnownName removeWellKnown WellKnownSimpleNames InternedSimpleNames InternedSimpleNames InternedSimpleNames NameSet internedNames InternedSimpleNames sLength MaxSimpleNames sLength internedNames EmptySimpleNames

public Source File I File resource Classpath Multi Directory source Location this resource resource this source Location source Location this initial Type Name extract Type Name this update Class File false  SourceFile IFile ClasspathMultiDirectory sourceLocation sourceLocation sourceLocation initialTypeName extractTypeName updateClassFile
public Source File I File resource Classpath Multi Directory source Location boolean update Class File this resource source Location this update Class File update Class File  SourceFile IFile ClasspathMultiDirectory sourceLocation updateClassFile sourceLocation updateClassFile updateClassFile
public boolean equals Object o if this o return true if o instanceof Source File return false Source File f Source File o return this source Location f source Location this resource get Full Path equals f resource get Full Path  SourceFile SourceFile SourceFile sourceLocation sourceLocation getFullPath getFullPath
String extract Type Name answer a String with the qualified type name for the source file in the form p1 p2 A I Path full Path this resource get Full Path int resource Segment Count full Path segment Count int source Folder Segment Count this source Location source Folder get Full Path segment Count int char Count resource Segment Count source Folder Segment Count 1 5 length of java for int i source Folder Segment Count i resource Segment Count i char Count full Path segment i length char result new char char Count int offset 0 resource Segment Count deal with the last segment separately for int i source Folder Segment Count i resource Segment Count i String segment full Path segment i int size segment length segment get Chars 0 size result offset offset size result offset String segment full Path segment resource Segment Count int size segment length 5 length of java segment get Chars 0 size result offset return new String result  extractTypeName IPath fullPath getFullPath resourceSegmentCount fullPath segmentCount sourceFolderSegmentCount sourceLocation sourceFolder getFullPath segmentCount charCount resourceSegmentCount sourceFolderSegmentCount sourceFolderSegmentCount resourceSegmentCount charCount fullPath charCount resourceSegmentCount sourceFolderSegmentCount resourceSegmentCount fullPath getChars fullPath resourceSegmentCount getChars
public char get Contents try return Util get Resource Contents As Char Array this resource catch Core Exception e throw new Abort Compilation true new Missing Source File Exception this resource get Full Path to String  getContents getResourceContentsAsCharArray CoreException AbortCompilation MissingSourceFileException getFullPath toString
public char get File Name return this resource get Full Path to String to Char Array do not know what you want to return here  getFileName getFullPath toString toCharArray
public char get Main Type Name char type Name this initial Type Name to Char Array int last Index Char Operation last Index Of type Name return Char Operation subarray type Name last Index 1 1  getMainTypeName typeName initialTypeName toCharArray lastIndex CharOperation lastIndexOf typeName CharOperation typeName lastIndex
public char get Package Name char type Name this initial Type Name to Char Array int last Index Char Operation last Index Of type Name return Char Operation split On type Name 0 last Index  getPackageName typeName initialTypeName toCharArray lastIndex CharOperation lastIndexOf typeName CharOperation splitOn typeName lastIndex
String type Locator return this resource get Project Relative Path to String  typeLocator getProjectRelativePath toString
public String to String return Source File NON NLS 1 this resource get Full Path NON NLS 1  toString SourceFile getFullPath

static final byte INTERNAL JAR 4 State constructor with no argument  INTERNAL_JAR
protected State Java Builder java Builder this known Package Names null this previous Structural Build Time 1 this structurally Changed Types null this java Project Name java Builder current Project get Name this source Locations java Builder name Environment source Locations this binary Locations java Builder name Environment binary Locations this references new Simple Lookup Table 7 this type Locators new Simple Lookup Table 7 this build Number 0 indicates a full build this last Structural Build Time System current Time Millis this structural Build Times new Simple Lookup Table 3  JavaBuilder javaBuilder knownPackageNames previousStructuralBuildTime structurallyChangedTypes javaProjectName javaBuilder currentProject getName sourceLocations javaBuilder nameEnvironment sourceLocations binaryLocations javaBuilder nameEnvironment binaryLocations SimpleLookupTable typeLocators SimpleLookupTable buildNumber lastStructuralBuildTime currentTimeMillis structuralBuildTimes SimpleLookupTable
void copy From State last State this known Package Names null this previous Structural Build Time last State previous Structural Build Time this structurally Changed Types last State structurally Changed Types this build Number last State build Number 1 this last Structural Build Time last State last Structural Build Time this structural Build Times last State structural Build Times try this references Simple Lookup Table last State references clone this type Locators Simple Lookup Table last State type Locators clone catch Clone Not Supported Exception e this references new Simple Lookup Table last State references element Size Object key Table last State references key Table Object value Table last State references value Table for int i 0 l key Table length i l i if key Table i null this references put key Table i value Table i this type Locators new Simple Lookup Table last State type Locators element Size key Table last State type Locators key Table value Table last State type Locators value Table for int i 0 l key Table length i l i if key Table i null this type Locators put key Table i value Table i  copyFrom lastState knownPackageNames previousStructuralBuildTime lastState previousStructuralBuildTime structurallyChangedTypes lastState structurallyChangedTypes buildNumber lastState buildNumber lastStructuralBuildTime lastState lastStructuralBuildTime structuralBuildTimes lastState structuralBuildTimes SimpleLookupTable lastState typeLocators SimpleLookupTable lastState typeLocators CloneNotSupportedException SimpleLookupTable lastState elementSize keyTable lastState keyTable valueTable lastState valueTable keyTable keyTable keyTable valueTable typeLocators SimpleLookupTable lastState typeLocators elementSize keyTable lastState typeLocators keyTable valueTable lastState typeLocators valueTable keyTable keyTable typeLocators keyTable valueTable
char get Defined Type Names For String type Locator Object c references get type Locator if c instanceof Additional Type Collection return Additional Type Collection c defined Type Names return null means only one type is defined with the same name as the file saves space  getDefinedTypeNamesFor typeLocator typeLocator AdditionalTypeCollection AdditionalTypeCollection definedTypeNames
String Set get Structurally Changed Types State prereq State if prereq State null prereq State previous Structural Build Time 0 Object o structural Build Times get prereq State java Project Name long previous o null 0 Long o long Value if previous prereq State previous Structural Build Time return prereq State structurally Changed Types return null  StringSet getStructurallyChangedTypes prereqState prereqState prereqState previousStructuralBuildTime structuralBuildTimes prereqState javaProjectName longValue prereqState previousStructuralBuildTime prereqState structurallyChangedTypes
boolean is Duplicate Locator String qualified Type Name String type Locator String existing String type Locators get qualified Type Name return existing null existing equals type Locator  isDuplicateLocator qualifiedTypeName typeLocator typeLocators qualifiedTypeName typeLocator
boolean is Known Package String qualified Package Name if known Package Names null Array List names new Array List type Locators element Size Object key Table type Locators key Table for int i 0 l key Table length i l i if key Table i null String package Name String key Table i is a type name of the form p1 p2 A int last package Name last Index Of package Name last 1 null package Name substring 0 last while package Name null names contains package Name names add package Name last package Name last Index Of package Name last 1 null package Name substring 0 last known Package Names new String names size names to Array known Package Names for int i 0 l known Package Names length i l i if known Package Names i equals qualified Package Name return true return false  isKnownPackage qualifiedPackageName knownPackageNames ArrayList ArrayList typeLocators elementSize keyTable typeLocators keyTable keyTable keyTable packageName keyTable packageName lastIndexOf packageName packageName packageName packageName packageName packageName lastIndexOf packageName packageName knownPackageNames toArray knownPackageNames knownPackageNames knownPackageNames qualifiedPackageName
void record String type Locator char qualified Refs char simple Refs char main Type Name Array List type Names if type Names size 1 Char Operation equals main Type Name char type Names get 0 references put type Locator new Reference Collection qualified Refs simple Refs else char defined Type Names new char type Names size can be empty when no types are defined type Names to Array defined Type Names references put type Locator new Additional Type Collection defined Type Names qualified Refs simple Refs  typeLocator qualifiedRefs simpleRefs mainTypeName ArrayList typeNames typeNames CharOperation mainTypeName typeNames typeLocator ReferenceCollection qualifiedRefs simpleRefs definedTypeNames typeNames typeNames toArray definedTypeNames typeLocator AdditionalTypeCollection definedTypeNames qualifiedRefs simpleRefs
void record Locator For Type String qualified Type Name String type Locator this known Package Names null in the common case the qualified Type Name is a substring of the type Locator so share the char by using String substring int start type Locator index Of qualified Type Name 0 if start 0 qualified Type Name type Locator substring start start qualified Type Name length type Locators put qualified Type Name type Locator  recordLocatorForType qualifiedTypeName typeLocator knownPackageNames qualifiedTypeName typeLocator typeLocator indexOf qualifiedTypeName qualifiedTypeName typeLocator qualifiedTypeName typeLocators qualifiedTypeName typeLocator
void record Structural Dependency I Project prereq Project State prereq State if prereq State null if prereq State last Structural Build Time 0 can skip if 0 full build since its assumed to be 0 if unknown structural Build Times put prereq Project get Name new Long prereq State last Structural Build Time  recordStructuralDependency IProject prereqProject prereqState prereqState prereqState lastStructuralBuildTime structuralBuildTimes prereqProject getName prereqState lastStructuralBuildTime
void remove Locator String type Locator To Remove this known Package Names null references remove Key type Locator To Remove type Locators remove Value type Locator To Remove  removeLocator typeLocatorToRemove knownPackageNames removeKey typeLocatorToRemove typeLocators removeValue typeLocatorToRemove
void remove Package I Resource Delta source Delta I Resource resource source Delta get Resource switch resource get Type case I Resource FOLDER I Resource Delta children source Delta get Affected Children for int i 0 l children length i l i remove Package children i return case I Resource FILE I Path type Locator Path resource get Project Relative Path if org eclipse jdt internal compiler util Util is Java File Name type Locator Path last Segment remove Locator type Locator Path to String  removePackage IResourceDelta sourceDelta IResource sourceDelta getResource getType IResource IResourceDelta sourceDelta getAffectedChildren removePackage IResource IPath typeLocatorPath getProjectRelativePath isJavaFileName typeLocatorPath lastSegment removeLocator typeLocatorPath toString
void remove Qualified Type Name String qualified Type Name To Remove this known Package Names null type Locators remove Key qualified Type Name To Remove  removeQualifiedTypeName qualifiedTypeNameToRemove knownPackageNames typeLocators removeKey qualifiedTypeNameToRemove
static State read I Project project Data Input Stream in throws IO Exception if Java Builder DEBUG System out println About to read state NON NLS 1 if VERSION in read Byte if Java Builder DEBUG System out println Found non compatible state version answered null NON NLS 1 return null State new State new State new State java Project Name in readUTF if project get Name equals new State java Project Name if Java Builder DEBUG System out println Project s name does not match answered null NON NLS 1 return null new State build Number in read Int new State last Structural Build Time in read Long int length in read Int new State source Locations new Classpath Multi Directory length for int i 0 i length i I Container source Folder project output Folder project String folder Name if folder Name in readUTF length 0 source Folder project get Folder folder Name if folder Name in readUTF length 0 output Folder project get Folder folder Name Classpath Multi Directory md Classpath Multi Directory Classpath Location for Source Folder source Folder output Folder read Names in read Names in if in read Boolean md has Independent Output Folder true new State source Locations i md length in read Int new State binary Locations new Classpath Location length I Workspace Root root project get Workspace get Root for int i 0 i length i switch in read Byte case SOURCE FOLDER new State binary Locations i new State source Locations in read Int break case BINARY FOLDER I Path path new Path in readUTF I Container output Folder path segment Count 1 I Container root get Project path to String I Container root get Folder path new State binary Locations i Classpath Location for Binary Folder output Folder in read Boolean break case EXTERNAL JAR new State binary Locations i Classpath Location for Library in readUTF break case INTERNAL JAR new State binary Locations i Classpath Location for Library root get File new Path in readUTF new State structural Build Times new Simple Lookup Table length in read Int for int i 0 i length i new State structural Build Times put in readUTF new Long in read Long String interned Type Locators new String length in read Int for int i 0 i length i interned Type Locators i in readUTF new State type Locators new Simple Lookup Table length in read Int for int i 0 i length i new State record Locator For Type in readUTF interned Type Locators in read Int char interned Simple Names Reference Collection intern Simple Names read Names in false char interned Qualified Names new char length in read Int for int i 0 i length i int q Length in read Int char q Name new char q Length for int j 0 j q Length j q Name j interned Simple Names in read Int interned Qualified Names i q Name interned Qualified Names Reference Collection intern Qualified Names interned Qualified Names new State references new Simple Lookup Table length in read Int for int i 0 i length i String type Locator interned Type Locators in read Int Reference Collection collection null switch in read Byte case 1 char additional Type Names read Names in char qualified Names new char in read Int for int j 0 m qualified Names length j m j qualified Names j interned Qualified Names in read Int char simple Names new char in read Int for int j 0 m simple Names length j m j simple Names j interned Simple Names in read Int collection new Additional Type Collection additional Type Names qualified Names simple Names break case 2 char q Names new char in read Int for int j 0 m q Names length j m j q Names j interned Qualified Names in read Int char s Names new char in read Int for int j 0 m s Names length j m j s Names j interned Simple Names in read Int collection new Reference Collection q Names s Names new State references put type Locator collection if Java Builder DEBUG System out println Successfully read state for new State java Project Name NON NLS 1 return new State  IProject DataInputStream IOException JavaBuilder readByte JavaBuilder newState newState javaProjectName getName newState javaProjectName JavaBuilder newState buildNumber readInt newState lastStructuralBuildTime readLong readInt newState sourceLocations ClasspathMultiDirectory IContainer sourceFolder outputFolder folderName folderName sourceFolder getFolder folderName folderName outputFolder getFolder folderName ClasspathMultiDirectory ClasspathMultiDirectory ClasspathLocation forSourceFolder sourceFolder outputFolder readNames readNames readBoolean hasIndependentOutputFolder newState sourceLocations readInt newState binaryLocations ClasspathLocation IWorkspaceRoot getWorkspace getRoot readByte SOURCE_FOLDER newState binaryLocations newState sourceLocations readInt BINARY_FOLDER IPath IContainer outputFolder segmentCount IContainer getProject toString IContainer getFolder newState binaryLocations ClasspathLocation forBinaryFolder outputFolder readBoolean EXTERNAL_JAR newState binaryLocations ClasspathLocation forLibrary INTERNAL_JAR newState binaryLocations ClasspathLocation forLibrary getFile newState structuralBuildTimes SimpleLookupTable readInt newState structuralBuildTimes readLong internedTypeLocators readInt internedTypeLocators newState typeLocators SimpleLookupTable readInt newState recordLocatorForType internedTypeLocators readInt internedSimpleNames ReferenceCollection internSimpleNames readNames internedQualifiedNames readInt qLength readInt qName qLength qLength qName internedSimpleNames readInt internedQualifiedNames qName internedQualifiedNames ReferenceCollection internQualifiedNames internedQualifiedNames newState SimpleLookupTable readInt typeLocator internedTypeLocators readInt ReferenceCollection readByte additionalTypeNames readNames qualifiedNames readInt qualifiedNames qualifiedNames internedQualifiedNames readInt simpleNames readInt simpleNames simpleNames internedSimpleNames readInt AdditionalTypeCollection additionalTypeNames qualifiedNames simpleNames qNames readInt qNames qNames internedQualifiedNames readInt sNames readInt sNames sNames internedSimpleNames readInt ReferenceCollection qNames sNames newState typeLocator JavaBuilder newState javaProjectName newState
private static char read Names Data Input Stream in throws IO Exception int length in read Int char names new char length for int i 0 i length i int n Length in read Int char name new char n Length for int j 0 j n Length j name j in read Char names i name return names  readNames DataInputStream IOException readInt nLength readInt nLength nLength readChar
void tag As Noop Build this build Number 1 tag the project since it has no source folders and can be skipped  tagAsNoopBuild buildNumber
boolean was Noop Build return build Number 1  wasNoopBuild buildNumber
void tag As Structurally Changed this previous Structural Build Time this last Structural Build Time this structurally Changed Types new String Set 7 this last Structural Build Time System current Time Millis  tagAsStructurallyChanged previousStructuralBuildTime lastStructuralBuildTime structurallyChangedTypes StringSet lastStructuralBuildTime currentTimeMillis
boolean was Structurally Changed I Project prereq Project State prereq State if prereq State null Object o structural Build Times get prereq Project get Name long previous o null 0 Long o long Value if previous prereq State last Structural Build Time return false return true  wasStructurallyChanged IProject prereqProject prereqState prereqState structuralBuildTimes prereqProject getName longValue prereqState lastStructuralBuildTime
void was Structurally Changed String type Name if this structurally Changed Types null if this structurally Changed Types element Size Max Structurally Changed Types this structurally Changed Types null too many to keep track of else this structurally Changed Types add type Name  wasStructurallyChanged typeName structurallyChangedTypes structurallyChangedTypes elementSize MaxStructurallyChangedTypes structurallyChangedTypes structurallyChangedTypes typeName
void write Data Output Stream out throws IO Exception int length Object key Table Object value Table byte VERSION String project name int build number int last structural build number out write Byte VERSION out writeUTF java Project Name out write Int build Number out write Long last Structural Build Time Classpath Multi Directory int id String path s out write Int length source Locations length for int i 0 i length i Classpath Multi Directory md source Locations i out writeUTF md source Folder get Project Relative Path to String out writeUTF md binary Folder get Project Relative Path to String write Names md inclusion Patterns out write Names md exclusion Patterns out out write Boolean md has Independent Output Folder Classpath Location int id String path s out write Int length binary Locations length next for int i 0 i length i Classpath Location c binary Locations i if c instanceof Classpath Multi Directory out write Byte SOURCE FOLDER for int j 0 m source Locations length j m j if source Locations j c out write Int j continue next else if c instanceof Classpath Directory out write Byte BINARY FOLDER Classpath Directory cd Classpath Directory c out writeUTF cd binary Folder get Full Path to String out write Boolean cd is Output Folder else Classpath Jar jar Classpath Jar c if jar resource null out write Byte EXTERNAL JAR out writeUTF jar zip Filename else out write Byte INTERNAL JAR out writeUTF jar resource get Full Path to String Structural build numbers table String prereq project name int last structural build number out write Int length structural Build Times element Size if length 0 key Table structural Build Times key Table value Table structural Build Times value Table for int i 0 l key Table length i l i if key Table i null length out writeUTF String key Table i out write Long Long value Table i long Value if Java Builder DEBUG length 0 System out println structural Build Numbers table is inconsistent NON NLS 1 String Interned type locators out write Int length references element Size Array List interned Type Locators new Array List length if length 0 key Table references key Table for int i 0 l key Table length i l i if key Table i null length String key String key Table i out writeUTF key interned Type Locators add key if Java Builder DEBUG length 0 System out println references table is inconsistent NON NLS 1 Type locators table String type name int interned locator id out write Int length type Locators element Size if length 0 key Table type Locators key Table value Table type Locators value Table for int i 0 l key Table length i l i if key Table i null length out writeUTF String key Table i out write Int interned Type Locators index Of value Table i if Java Builder DEBUG length 0 System out println type Locators table is inconsistent NON NLS 1 char Interned qualified names char Interned simple names Array List interned Qualified Names new Array List 31 Array List interned Simple Names new Array List 31 value Table references value Table for int i 0 l value Table length i l i if value Table i null Reference Collection collection Reference Collection value Table i char q Names collection qualified Name References for int j 0 m q Names length j m j char q Name q Names j if interned Qualified Names contains q Name remember the names have been interned interned Qualified Names add q Name for int k 0 n q Name length k n k char s Name q Name k if interned Simple Names contains s Name remember the names have been interned interned Simple Names add s Name char s Names collection simple Name References for int j 0 m s Names length j m j char s Name s Names j if interned Simple Names contains s Name remember the names have been interned interned Simple Names add s Name char interned Array new char interned Simple Names size interned Simple Names to Array interned Array write Names interned Array out now write the interned qualified names as arrays of interned simple names out write Int length interned Qualified Names size for int i 0 i length i char q Name char interned Qualified Names get i int q Length q Name length out write Int q Length for int j 0 j q Length j out write Int interned Simple Names index Of q Name j References table int interned locator id Reference Collection out write Int length references element Size if length 0 key Table references key Table for int i 0 l key Table length i l i if key Table i null length out write Int interned Type Locators index Of key Table i Reference Collection collection Reference Collection value Table i if collection instanceof Additional Type Collection out write Byte 1 Additional Type Collection atc Additional Type Collection collection write Names atc defined Type Names out else out write Byte 2 char q Names collection qualified Name References int q Length q Names length out write Int q Length for int j 0 j q Length j out write Int interned Qualified Names index Of q Names j char s Names collection simple Name References int s Length s Names length out write Int s Length for int j 0 j s Length j out write Int interned Simple Names index Of s Names j if Java Builder DEBUG length 0 System out println references table is inconsistent NON NLS 1  DataOutputStream IOException keyTable valueTable writeByte javaProjectName writeInt buildNumber writeLong lastStructuralBuildTime ClasspathMultiDirectory writeInt sourceLocations ClasspathMultiDirectory sourceLocations sourceFolder getProjectRelativePath toString binaryFolder getProjectRelativePath toString writeNames inclusionPatterns writeNames exclusionPatterns writeBoolean hasIndependentOutputFolder ClasspathLocation writeInt binaryLocations ClasspathLocation binaryLocations ClasspathMultiDirectory writeByte SOURCE_FOLDER sourceLocations sourceLocations writeInt ClasspathDirectory writeByte BINARY_FOLDER ClasspathDirectory ClasspathDirectory binaryFolder getFullPath toString writeBoolean isOutputFolder ClasspathJar ClasspathJar writeByte EXTERNAL_JAR zipFilename writeByte INTERNAL_JAR getFullPath toString writeInt structuralBuildTimes elementSize keyTable structuralBuildTimes keyTable valueTable structuralBuildTimes valueTable keyTable keyTable keyTable writeLong valueTable longValue JavaBuilder structuralBuildNumbers writeInt elementSize ArrayList internedTypeLocators ArrayList keyTable keyTable keyTable keyTable keyTable internedTypeLocators JavaBuilder writeInt typeLocators elementSize keyTable typeLocators keyTable valueTable typeLocators valueTable keyTable keyTable keyTable writeInt internedTypeLocators indexOf valueTable JavaBuilder typeLocators ArrayList internedQualifiedNames ArrayList ArrayList internedSimpleNames ArrayList valueTable valueTable valueTable valueTable ReferenceCollection ReferenceCollection valueTable qNames qualifiedNameReferences qNames qName qNames internedQualifiedNames qName internedQualifiedNames qName qName sName qName internedSimpleNames sName internedSimpleNames sName sNames simpleNameReferences sNames sName sNames internedSimpleNames sName internedSimpleNames sName internedArray internedSimpleNames internedSimpleNames toArray internedArray writeNames internedArray writeInt internedQualifiedNames qName internedQualifiedNames qLength qName writeInt qLength qLength writeInt internedSimpleNames indexOf qName ReferenceCollection writeInt elementSize keyTable keyTable keyTable keyTable writeInt internedTypeLocators indexOf keyTable ReferenceCollection ReferenceCollection valueTable AdditionalTypeCollection writeByte AdditionalTypeCollection AdditionalTypeCollection writeNames definedTypeNames writeByte qNames qualifiedNameReferences qLength qNames writeInt qLength qLength writeInt internedQualifiedNames indexOf qNames sNames simpleNameReferences sLength sNames writeInt sLength sLength writeInt internedSimpleNames indexOf sNames JavaBuilder
private void write Names char names Data Output Stream out throws IO Exception int length names null 0 names length out write Int length for int i 0 i length i char name names i int n Length name length out write Int n Length for int j 0 j n Length j out write Char name j  writeNames DataOutputStream IOException writeInt nLength writeInt nLength nLength writeChar
Returns a string representation of the receiver public String to String return State for java Project Name NON NLS 1 build Number NON NLS 1 new Date last Structural Build Time NON NLS 1 NON NLS 1  toString javaProjectName buildNumber lastStructuralBuildTime

public String Set int size this element Size 0 this threshold size size represents the expected number of elements int extra Room int size 1 5f if this threshold extra Room extra Room this values new String extra Room  StringSet elementSize extraRoom extraRoom extraRoom extraRoom
public boolean add String value int length this values length int index value hash Code 0x7FFFFFFF length String current while current this values index null if value equals current return false did not add it since it already existed if index length index 0 this values index value assumes the threshold is never equal to the size of the table if element Size threshold rehash return true  hashCode elementSize
public void clear for int i this values length i 0 this values i null this element Size 0  elementSize
public boolean includes String value int length values length int index value hash Code 0x7FFFFFFF length String current while current this values index null if value equals current return true if index length index 0 return false  hashCode
private void rehash String Set new Set new String Set element Size 2 double the number of expected elements String current for int i this values length i 0 if current this values i null new Set add current this values new Set values this element Size new Set element Size this threshold new Set threshold  StringSet newSet StringSet elementSize newSet newSet elementSize newSet elementSize newSet
public String to String String s NON NLS 1 String value for int i 0 l this values length i l i if value this values i null s value n NON NLS 1 return s  toString

Array List compiled List public Work Queue this needs Compile List new Array List 11 this compiled List new Array List 11  ArrayList compiledList WorkQueue needsCompileList ArrayList compiledList ArrayList
public void add Source File element needs Compile List add element  SourceFile needsCompileList
public void add All Source File elements for int i 0 l elements length i l i add elements i  addAll SourceFile
public void clear this needs Compile List clear this compiled List clear  needsCompileList compiledList
public void finished Source File element needs Compile List remove element compiled List add element  SourceFile needsCompileList compiledList
public boolean is Compiled Source File element return compiled List contains element  isCompiled SourceFile compiledList
public boolean is Waiting Source File element return needs Compile List contains element  isWaiting SourceFile needsCompileList
public String to String return Work Queue needs Compile List NON NLS 1  toString WorkQueue needsCompileList

Creates a handle to a class file protected Class File Package Fragment parent String name super parent name this check Automatic Source Mapping false  ClassFile PackageFragment checkAutomaticSourceMapping
Creates the children elements for this class file adding the resulting new handles and info objects to the new Elements table Returns true if successful or false if an error is encountered parsing the class file see Openable see Signature protected boolean build Structure Openable Element Info info I Progress Monitor pm Map new Elements I Resource underlying Resource throws Java Model Exception check whether the class file can be opened if is Valid Class File throw new Not Present Exception if underlying Resource null underlying Resource is Accessible throw new Not Present Exception I Binary Type type Info get Binary Type Info I File underlying Resource if type Info null The structure of a class file is unknown if a class file format errors occurred during the creation of the diet class file representative of this Class File info set Children new I Java Element return false Make the type I Type type new Binary Type this new String simple Name type Info get Name info add Child type new Elements put type type Info return true  newElements buildStructure OpenableElementInfo IProgressMonitor newElements IResource underlyingResource JavaModelException isValidClassFile newNotPresentException underlyingResource underlyingResource isAccessible newNotPresentException IBinaryType typeInfo getBinaryTypeInfo IFile underlyingResource typeInfo ClassFile setChildren IJavaElement IType BinaryType simpleName typeInfo getName addChild newElements typeInfo
see I Code Assist code Complete int I Completion Requestor public void code Complete int offset I Completion Requestor requestor throws Java Model Exception code Complete offset requestor Default Working Copy Owner PRIMARY  ICodeAssist codeComplete ICompletionRequestor codeComplete ICompletionRequestor JavaModelException codeComplete DefaultWorkingCopyOwner
see I Code Assist code Complete int I Completion Requestor Working Copy Owner public void code Complete int offset I Completion Requestor requestor Working Copy Owner owner throws Java Model Exception String source get Source if source null String element Name get Element Name Basic Compilation Unit cu new Basic Compilation Unit get Source to Char Array null element Name substring 0 element Name length SUFFIX STRING class length SUFFIX STRING java get Java Project use project to retrieve corresponding java I File code Complete cu cu offset requestor owner  ICodeAssist codeComplete ICompletionRequestor WorkingCopyOwner codeComplete ICompletionRequestor WorkingCopyOwner JavaModelException getSource elementName getElementName BasicCompilationUnit BasicCompilationUnit getSource toCharArray elementName elementName SUFFIX_STRING_class SUFFIX_STRING_java getJavaProject IFile codeComplete
see org eclipse jdt core I Code Assist code Complete int org eclipse jdt core Completion Requestor public void code Complete int offset Completion Requestor requestor throws Java Model Exception TODO jerome Missing implementation throw new Runtime Exception Not implemented yet NON NLS 1  ICodeAssist codeComplete CompletionRequestor codeComplete CompletionRequestor JavaModelException RuntimeException
see org eclipse jdt core I Code Assist code Complete int org eclipse jdt core Completion Requestor org eclipse jdt core Working Copy Owner public void code Complete int offset Completion Requestor requestor Working Copy Owner wcowner throws Java Model Exception TODO jerome Missing implementation throw new Runtime Exception Not implemented yet NON NLS 1  ICodeAssist codeComplete CompletionRequestor WorkingCopyOwner codeComplete CompletionRequestor WorkingCopyOwner JavaModelException RuntimeException
see I Code Assist code Select int int public I Java Element code Select int offset int length throws Java Model Exception return code Select offset length Default Working Copy Owner PRIMARY  ICodeAssist codeSelect IJavaElement codeSelect JavaModelException codeSelect DefaultWorkingCopyOwner
see I Code Assist code Select int int Working Copy Owner public I Java Element code Select int offset int length Working Copy Owner owner throws Java Model Exception I Buffer buffer get Buffer char contents if buffer null contents buffer get Characters null String top Level Type Name get Top Level Type Name Basic Compilation Unit cu new Basic Compilation Unit contents null top Level Type Name SUFFIX STRING java return super code Select cu offset length owner else has no associated souce return new I Java Element  ICodeAssist codeSelect WorkingCopyOwner IJavaElement codeSelect WorkingCopyOwner JavaModelException IBuffer getBuffer getCharacters topLevelTypeName getTopLevelTypeName BasicCompilationUnit BasicCompilationUnit topLevelTypeName SUFFIX_STRING_java codeSelect IJavaElement
Returns a new element info for this element protected Object create Element Info return new Class File Info this  createElementInfo ClassFileInfo
return new Class File Info this public boolean equals Object o if o instanceof Class File return false return super equals o  ClassFileInfo ClassFile
return super equals o public boolean exists return super exists is Valid Class File  isValidClassFile
Finds the deepest code I Java Element code in the hierarchy of code elt elt s children including code elt code itself which has a source range that encloses code position code according to code mapper code protected I Java Element find Element I Java Element elt int position Source Mapper mapper Source Range range mapper get Source Range elt if range null position range get Offset range get Offset range get Length 1 position return null if elt instanceof I Parent try I Java Element children I Parent elt get Children for int i 0 i children length i I Java Element match find Element children i position mapper if match null return match catch Java Model Exception npe elt doesn t exist return the element return elt  IJavaElement IJavaElement findElement IJavaElement SourceMapper SourceRange getSourceRange getOffset getOffset getLength IParent IJavaElement IParent getChildren IJavaElement findElement JavaModelException
Returns the code Class File Reader code specific for this I Class File based on its underlying resource or code null code if unable to create the diet class file There are two cases to consider ul li a class file corresponding to an I File resource li li a class file corresponding to a zip entry in a JAR li ul exception Java Model Exception when the I File resource or JAR is not available or when this class file is not present in the JAR public I Binary Type get Binary Type Info I File file throws Java Model Exception Java Element le Java Element get Parent if le instanceof Jar Package Fragment try Jar Package Fragment Root root Jar Package Fragment Root le get Parent I Binary Type info null Zip File zip null try zip root get Jar String entry Name get Parent get Element Name entry Name entry Name replace if entry Name equals NON NLS 1 entry Name get Element Name else entry Name get Element Name info Class File Reader read zip entry Name true finally Java Model Manager get Java Model Manager close Zip File zip if info null throw new Not Present Exception return info catch Class Format Exception cfe the structure remains unknown if Java Core get Plugin is Debugging cfe print Stack Trace System err return null catch IO Exception ioe throw new Java Model Exception ioe I Java Model Status Constants IO EXCEPTION catch Core Exception e if e instanceof Java Model Exception throw Java Model Exception e else throw new Java Model Exception e else byte contents Util get Resource Contents As Byte Array file try return new Class File Reader contents get Element Name to Char Array catch Class Format Exception cfe the structure remains unknown return null  ClassFileReader IClassFile IFile JavaModelException IFile IBinaryType getBinaryTypeInfo IFile JavaModelException JavaElement JavaElement getParent JarPackageFragment JarPackageFragmentRoot JarPackageFragmentRoot getParent IBinaryType ZipFile getJar entryName getParent getElementName entryName entryName entryName entryName getElementName entryName getElementName ClassFileReader entryName JavaModelManager getJavaModelManager closeZipFile newNotPresentException ClassFormatException JavaCore getPlugin isDebugging printStackTrace IOException JavaModelException IJavaModelStatusConstants IO_EXCEPTION CoreException JavaModelException JavaModelException JavaModelException getResourceContentsAsByteArray ClassFileReader getElementName toCharArray ClassFormatException
public I Buffer get Buffer throws Java Model Exception if is Valid Class File return super get Buffer else class file not on classpath create a new buffer to be nice see https bugs eclipse org bugs show bug cgi id 41444 return open Buffer null null  IBuffer getBuffer JavaModelException isValidClassFile getBuffer show_bug openBuffer
see I Member public I Class File get Class File return this  IMember IClassFile getClassFile
A class file has a corresponding resource unless it is contained in a jar see I Java Element public I Resource get Corresponding Resource throws Java Model Exception I Package Fragment Root root I Package Fragment Root get Parent get Parent if root is Archive return null else return get Underlying Resource  IJavaElement IResource getCorrespondingResource JavaModelException IPackageFragmentRoot IPackageFragmentRoot getParent getParent isArchive getUnderlyingResource
see I Class File public I Java Element get Element At int position throws Java Model Exception I Java Element parent Element get Parent while parent Element get Element Type I Java Element PACKAGE FRAGMENT ROOT parent Element parent Element get Parent Package Fragment Root root Package Fragment Root parent Element Source Mapper mapper root get Source Mapper if mapper null return null else ensure this class file s buffer is open so that source ranges are computed get Buffer I Type type get Type return find Element type position mapper  IClassFile IJavaElement getElementAt JavaModelException IJavaElement parentElement getParent parentElement getElementType IJavaElement PACKAGE_FRAGMENT_ROOT parentElement parentElement getParent PackageFragmentRoot PackageFragmentRoot parentElement SourceMapper getSourceMapper getBuffer IType getType findElement
see I Java Element public int get Element Type return CLASS FILE  IJavaElement getElementType CLASS_FILE
public I Java Element get Handle From Memento String token Memento Tokenizer memento Working Copy Owner owner switch token char At 0 case JEM COUNT return get Handle Updating Count From Memento memento owner case JEM TYPE String type Name memento next Token Java Element type new Binary Type this type Name return type get Handle From Memento memento owner return null  IJavaElement getHandleFromMemento MementoTokenizer WorkingCopyOwner charAt JEM_COUNT getHandleUpdatingCountFromMemento JEM_TYPE typeName nextToken JavaElement BinaryType typeName getHandleFromMemento
see Java Element get Handle Memento protected char get Handle Memento Delimiter return Java Element JEM CLASSFILE  JavaElement getHandleMemento getHandleMementoDelimiter JavaElement JEM_CLASSFILE
public I Path get Path Package Fragment Root root get Package Fragment Root if root is Archive return root get Path else return get Parent get Path append get Element Name  IPath getPath PackageFragmentRoot getPackageFragmentRoot isArchive getPath getParent getPath getElementName
public I Resource get Resource Package Fragment Root root this get Package Fragment Root if root is Archive return root get Resource else return I Container this get Parent get Resource get File new Path this get Element Name  IResource getResource PackageFragmentRoot getPackageFragmentRoot isArchive getResource IContainer getParent getResource getFile getElementName
see I Source Reference public String get Source throws Java Model Exception I Buffer buffer get Buffer if buffer null return null return buffer get Contents  ISourceReference getSource JavaModelException IBuffer getBuffer getContents
see I Source Reference public I Source Range get Source Range throws Java Model Exception I Buffer buffer get Buffer if buffer null String contents buffer get Contents if contents null return null return new Source Range 0 contents length else return null  ISourceReference ISourceRange getSourceRange JavaModelException IBuffer getBuffer getContents SourceRange
public String get Top Level Type Name String top Level Type Name get Element Name int first Dollar top Level Type Name index Of if first Dollar 1 top Level Type Name top Level Type Name substring 0 first Dollar else top Level Type Name top Level Type Name substring 0 top Level Type Name length SUFFIX CLASS length return top Level Type Name  getTopLevelTypeName topLevelTypeName getElementName firstDollar topLevelTypeName indexOf firstDollar topLevelTypeName topLevelTypeName firstDollar topLevelTypeName topLevelTypeName topLevelTypeName SUFFIX_CLASS topLevelTypeName
see I Class File public I Type get Type if this binary Type null Remove the class from the name of the Class File always works since constructor fails if name does not end with class String type Name this name substring 0 this name last Index Of type Name type Name substring type Name last Index Of 1 int index type Name last Index Of if index 1 if type Name length index 1 Character is Digit type Name char At index 1 type Name type Name substring index 1 this binary Type new Binary Type this type Name return this binary Type  IClassFile IType getType binaryType ClassFile typeName lastIndexOf typeName typeName typeName lastIndexOf typeName lastIndexOf typeName isDigit typeName charAt typeName typeName binaryType BinaryType typeName binaryType
public I Compilation Unit get Working Copy Working Copy Owner owner I Progress Monitor monitor throws Java Model Exception get the source if possible char contents null Source Mapper mapper this get Source Mapper if mapper null contents mapper find Source get Type if contents null return null Class File Working Copy working Copy new Class File Working Copy I Buffer buffer owner null this get Buffer owner create Buffer working Copy working Copy buffer buffer set the buffer source if buffer null buffer get Characters null buffer set Contents contents return working Copy  ICompilationUnit getWorkingCopy WorkingCopyOwner IProgressMonitor JavaModelException SourceMapper getSourceMapper findSource getType ClassFileWorkingCopy workingCopy ClassFileWorkingCopy IBuffer getBuffer createBuffer workingCopy workingCopy getCharacters setContents workingCopy
see I Class File deprecated public I Java Element get Working Copy I Progress Monitor monitor org eclipse jdt core I Buffer Factory factory throws Java Model Exception return get Working Copy Buffer Factory Wrapper create factory monitor  IClassFile IJavaElement getWorkingCopy IProgressMonitor IBufferFactory JavaModelException getWorkingCopy BufferFactoryWrapper
see Openable protected boolean has Buffer return true  hasBuffer
see I Class File public boolean is Class throws Java Model Exception return get Type is Class  IClassFile isClass JavaModelException getType isClass
see I Class File public boolean is Interface throws Java Model Exception return get Type is Interface  IClassFile isInterface JavaModelException getType isInterface
Returns true class files are always read only public boolean is Read Only return true  isReadOnly
private boolean is Valid Class File I Package Fragment Root root get Package Fragment Root try if root get Kind I Package Fragment Root K BINARY return false catch Java Model Exception e return false if Util is Valid Class File Name get Element Name return false return true  isValidClassFile IPackageFragmentRoot getPackageFragmentRoot getKind IPackageFragmentRoot K_BINARY JavaModelException isValidClassFileName getElementName
Opens and returns buffer on the source code associated with this class file Maps the source code to the children elements of this class file If no source code is associated with this class file code null code is returned see Openable protected I Buffer open Buffer I Progress Monitor pm Object info throws Java Model Exception Source Mapper mapper get Source Mapper if mapper null return map Source mapper else if this check Automatic Source Mapping We try to see if we can automatically attach a source source files located inside the same folder than its class file See bug 36510 Package Fragment Root root get Package Fragment Root if root is Archive root is a jar file or a zip file String element Name get Element Name String Buffer source File Name new String Buffer element Name substring 0 element Name last Index Of source File Name append Suffix Constants SUFFIX java Jar Package Fragment Root jar Package Fragment Root Jar Package Fragment Root root Zip File jar null try jar jar Package Fragment Root get Jar I Package Fragment package Fragment I Package Fragment get Parent Zip Entry zip Entry null if package Fragment is Default Package zip Entry jar get Entry source File Name to String else zip Entry jar get Entry get Parent get Element Name source File Name to String if zip Entry null found a source file this check Automatic Source Mapping true root attach Source root get Path null null Source Mapper source Mapper get Source Mapper if source Mapper null return map Source source Mapper catch Core Exception e if e instanceof Java Model Exception throw Java Model Exception e throw new Java Model Exception e finally Java Model Manager get Java Model Manager close Zip File jar else Attempts to find the corresponding java file String qualified Name get Type get Fully Qualified Name Name Lookup lookup Java Project get Java Project new Name Lookup Default Working Copy Owner PRIMARY I Compilation Unit cu lookup find Compilation Unit qualified Name if cu null return cu get Buffer else root is a class folder I Path source File Path get Path remove File Extension add File Extension EXTENSION java I Workspace workspace Resources Plugin get Workspace if workspace null this check Automatic Source Mapping true we don t want to check again return null workaround for http bugs eclipse org bugs show bug cgi id 34069 if Java Model get Target workspace get Root source File Path make Relative ensure path is relative see http dev eclipse org bugs show bug cgi id 22517 true null found a source file we don t need to check again The source will be attached this check Automatic Source Mapping true root attach Source root get Path null null Source Mapper source Mapper get Source Mapper if source Mapper null return map Source source Mapper return null  IBuffer openBuffer IProgressMonitor JavaModelException SourceMapper getSourceMapper mapSource checkAutomaticSourceMapping PackageFragmentRoot getPackageFragmentRoot isArchive elementName getElementName StringBuffer sourceFileName StringBuffer elementName elementName lastIndexOf sourceFileName SuffixConstants SUFFIX_java JarPackageFragmentRoot jarPackageFragmentRoot JarPackageFragmentRoot ZipFile jarPackageFragmentRoot getJar IPackageFragment packageFragment IPackageFragment getParent ZipEntry zipEntry packageFragment isDefaultPackage zipEntry getEntry sourceFileName toString zipEntry getEntry getParent getElementName sourceFileName toString zipEntry checkAutomaticSourceMapping attachSource getPath SourceMapper sourceMapper getSourceMapper sourceMapper mapSource sourceMapper CoreException JavaModelException JavaModelException JavaModelException JavaModelManager getJavaModelManager closeZipFile qualifiedName getType getFullyQualifiedName NameLookup JavaProject getJavaProject newNameLookup DefaultWorkingCopyOwner ICompilationUnit findCompilationUnit qualifiedName getBuffer IPath sourceFilePath getPath removeFileExtension addFileExtension EXTENSION_java IWorkspace ResourcesPlugin getWorkspace checkAutomaticSourceMapping show_bug JavaModel getTarget getRoot sourceFilePath makeRelative show_bug checkAutomaticSourceMapping attachSource getPath SourceMapper sourceMapper getSourceMapper sourceMapper mapSource sourceMapper
private I Buffer map Source Source Mapper mapper char contents mapper find Source get Type if contents null create buffer I Buffer buffer get Buffer Manager create Buffer this if buffer null return null Buffer Manager buf Manager get Buffer Manager buf Manager add Buffer buffer set the buffer source if buffer get Characters null buffer set Contents contents listen to buffer changes buffer add Buffer Changed Listener this do the source mapping mapper map Source get Type contents return buffer return null  IBuffer mapSource SourceMapper findSource getType IBuffer getBufferManager createBuffer BufferManager bufManager getBufferManager bufManager addBuffer getCharacters setContents addBufferChangedListener mapSource getType
package static char simple Name char class Name if class Name null return null class Name unqualified Name class Name int count 0 int last Position class Name length 1 for int i last Position i 1 i if class Name i i last Position char name new char count System arraycopy class Name i 1 name 0 count if Character is Digit name 0 break return name count return class Name  simpleName className className className unqualifiedName className lastPosition className lastPosition className lastPosition className isDigit className
Returns the Java Model representation of the given name which is provided in diet class file format or code null code if the given name is code null code p code Class File Reader code format is similar to java lang Object and corresponding Java Model format is java lang Object public static char translated Name char name if name null return null int name Length name length char new Name new char name Length for int i 0 i name Length i if name i new Name i else new Name i name i return new Name  ClassFileReader translatedName nameLength newName nameLength nameLength newName newName newName
Returns the Java Model representation of the given names which are provided in diet class file format or code null code if the given names are code null code p code Class File Reader code format is similar to java lang Object and corresponding Java Model format is java lang Object package static char translated Names char names if names null return null int length names length char new Names new char length for int i 0 i length i new Names i translated Name names i return new Names  ClassFileReader translatedNames newNames newNames translatedName newNames
Returns the Java Model format of the unqualified class name for the given class Name which is provided in diet class file format or code null code if the given class Name is code null code This removes the package name but not enclosing type names p code Class File Reader code format is similar to java lang Object and corresponding Java Model simple name format is Object package static char unqualified Name char class Name if class Name null return null int count 0 for int i class Name length 1 i 1 i if class Name i char name new char count System arraycopy class Name i 1 name 0 count return name count return class Name  className className ClassFileReader unqualifiedName className className className className className className
offset new I Completion Requestor public void accept Anonymous Type char super Type Package Name char super Type Name char parameter Package Names char parameter Type Names char parameter Names char completion Name int modifiers int completion Start int completion End int relevance ignore  ICompletionRequestor acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart completionEnd
ignore public void accept Class char package Name char class Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Class package Name class Name completion Name modifiers completion Start completion End  acceptClass packageName className completionName completionStart completionEnd acceptClass packageName className completionName completionStart completionEnd
public void accept Error I Problem error if true return was disabled in 1 0 try I Marker marker Resources Plugin get Workspace get Root create Marker I Java Model Marker TRANSIENT PROBLEM marker set Attribute I Java Model Marker ID error getID marker set Attribute I Marker CHAR START error get Source Start marker set Attribute I Marker CHAR END error get Source End 1 marker set Attribute I Marker LINE NUMBER error get Source Line Number marker set Attribute I Marker MESSAGE error get Message marker set Attribute I Marker SEVERITY I Marker SEVERITY ERROR requestor accept Error marker catch Core Exception e marker could not be created ignore  acceptError IProblem IMarker ResourcesPlugin getWorkspace getRoot createMarker IJavaModelMarker TRANSIENT_PROBLEM setAttribute IJavaModelMarker setAttribute IMarker CHAR_START getSourceStart setAttribute IMarker CHAR_END getSourceEnd setAttribute IMarker LINE_NUMBER getSourceLineNumber setAttribute IMarker getMessage setAttribute IMarker IMarker SEVERITY_ERROR acceptError CoreException
public void accept Field char declaring Type Package Name char declaring Type Name char field Name char type Package Name char type Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Field declaring Type Package Name declaring Type Name field Name type Package Name type Name completion Name modifiers completion Start completion End  acceptField declaringTypePackageName declaringTypeName fieldName typePackageName typeName completionName completionStart completionEnd acceptField declaringTypePackageName declaringTypeName fieldName typePackageName typeName completionName completionStart completionEnd
requestor accept Field declaring Type Package Name declaring Type Name field Name type Package Name type Name completion Name modifiers completion Start completion End public void accept Interface char package Name char interface Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Interface package Name interface Name completion Name modifiers completion Start completion End  acceptField declaringTypePackageName declaringTypeName fieldName typePackageName typeName completionName completionStart completionEnd acceptInterface packageName interfaceName completionName completionStart completionEnd acceptInterface packageName interfaceName completionName completionStart completionEnd
requestor accept Interface package Name interface Name completion Name modifiers completion Start completion End public void accept Keyword char keyword Name int completion Start int completion End int relevance requestor accept Keyword keyword Name completion Start completion End  acceptInterface packageName interfaceName completionName completionStart completionEnd acceptKeyword keywordName completionStart completionEnd acceptKeyword keywordName completionStart completionEnd
requestor accept Keyword keyword Name completion Start completion End public void accept Label char label Name int completion Start int completion End int relevance requestor accept Label label Name completion Start completion End  acceptKeyword keywordName completionStart completionEnd acceptLabel labelName completionStart completionEnd acceptLabel labelName completionStart completionEnd
requestor accept Label label Name completion Start completion End public void accept Local Variable char local Var Name char type Package Name char type Name int modifiers int completion Start int completion End int relevance ignore  acceptLabel labelName completionStart completionEnd acceptLocalVariable localVarName typePackageName typeName completionStart completionEnd
ignore public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance skip parameter names requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names return Type Package Name return Type Name completion Name modifiers completion Start completion End  acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames returnTypePackageName returnTypeName completionName completionStart completionEnd
requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names return Type Package Name return Type Name completion Name modifiers completion Start completion End public void accept Method Declaration char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance ignore  acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd
ignore public void accept Modifier char modifier Name int completion Start int completion End int relevance requestor accept Modifier modifier Name completion Start completion End  acceptModifier modifierName completionStart completionEnd acceptModifier modifierName completionStart completionEnd
requestor accept Modifier modifier Name completion Start completion End public void accept Package char package Name char completion Name int completion Start int completion End int relevance requestor accept Package package Name completion Name completion Start completion End  acceptModifier modifierName completionStart completionEnd acceptPackage packageName completionName completionStart completionEnd acceptPackage packageName completionName completionStart completionEnd
requestor accept Package package Name completion Name completion Start completion End public void accept Type char package Name char type Name char completion Name int completion Start int completion End int relevance requestor accept Type package Name type Name completion Name completion Start completion End  acceptPackage packageName completionName completionStart completionEnd acceptType packageName typeName completionName completionStart completionEnd acceptType packageName typeName completionName completionStart completionEnd
requestor accept Type package Name type Name completion Name completion Start completion End public void accept Variable Name char type Package Name char type Name char var Name char completion Name int completion Start int completion End int relevance ignore  acceptType packageName typeName completionName completionStart completionEnd acceptVariableName typePackageName typeName varName completionName completionStart completionEnd
see I Code Assist code Complete int I Code Completion Requestor deprecated should use code Complete int I Completion Requestor instead public void code Complete int offset final org eclipse jdt core I Code Completion Requestor requestor throws Java Model Exception if requestor null code Complete offset I Completion Requestor null return code Complete offset new I Completion Requestor public void accept Anonymous Type char super Type Package Name char super Type Name char parameter Package Names char parameter Type Names char parameter Names char completion Name int modifiers int completion Start int completion End int relevance ignore public void accept Class char package Name char class Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Class package Name class Name completion Name modifiers completion Start completion End public void accept Error I Problem error if true return was disabled in 1 0 try I Marker marker Resources Plugin get Workspace get Root create Marker I Java Model Marker TRANSIENT PROBLEM marker set Attribute I Java Model Marker ID error getID marker set Attribute I Marker CHAR START error get Source Start marker set Attribute I Marker CHAR END error get Source End 1 marker set Attribute I Marker LINE NUMBER error get Source Line Number marker set Attribute I Marker MESSAGE error get Message marker set Attribute I Marker SEVERITY I Marker SEVERITY ERROR requestor accept Error marker catch Core Exception e marker could not be created ignore public void accept Field char declaring Type Package Name char declaring Type Name char field Name char type Package Name char type Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Field declaring Type Package Name declaring Type Name field Name type Package Name type Name completion Name modifiers completion Start completion End public void accept Interface char package Name char interface Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Interface package Name interface Name completion Name modifiers completion Start completion End public void accept Keyword char keyword Name int completion Start int completion End int relevance requestor accept Keyword keyword Name completion Start completion End public void accept Label char label Name int completion Start int completion End int relevance requestor accept Label label Name completion Start completion End public void accept Local Variable char local Var Name char type Package Name char type Name int modifiers int completion Start int completion End int relevance ignore public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance skip parameter names requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names return Type Package Name return Type Name completion Name modifiers completion Start completion End public void accept Method Declaration char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance ignore public void accept Modifier char modifier Name int completion Start int completion End int relevance requestor accept Modifier modifier Name completion Start completion End public void accept Package char package Name char completion Name int completion Start int completion End int relevance requestor accept Package package Name completion Name completion Start completion End public void accept Type char package Name char type Name char completion Name int completion Start int completion End int relevance requestor accept Type package Name type Name completion Name completion Start completion End public void accept Variable Name char type Package Name char type Name char var Name char completion Name int completion Start int completion End int relevance ignore  ICodeAssist codeComplete ICodeCompletionRequestor codeComplete ICompletionRequestor codeComplete ICodeCompletionRequestor JavaModelException codeComplete ICompletionRequestor codeComplete ICompletionRequestor acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart completionEnd acceptClass packageName className completionName completionStart completionEnd acceptClass packageName className completionName completionStart completionEnd acceptError IProblem IMarker ResourcesPlugin getWorkspace getRoot createMarker IJavaModelMarker TRANSIENT_PROBLEM setAttribute IJavaModelMarker setAttribute IMarker CHAR_START getSourceStart setAttribute IMarker CHAR_END getSourceEnd setAttribute IMarker LINE_NUMBER getSourceLineNumber setAttribute IMarker getMessage setAttribute IMarker IMarker SEVERITY_ERROR acceptError CoreException acceptField declaringTypePackageName declaringTypeName fieldName typePackageName typeName completionName completionStart completionEnd acceptField declaringTypePackageName declaringTypeName fieldName typePackageName typeName completionName completionStart completionEnd acceptInterface packageName interfaceName completionName completionStart completionEnd acceptInterface packageName interfaceName completionName completionStart completionEnd acceptKeyword keywordName completionStart completionEnd acceptKeyword keywordName completionStart completionEnd acceptLabel labelName completionStart completionEnd acceptLabel labelName completionStart completionEnd acceptLocalVariable localVarName typePackageName typeName completionStart completionEnd acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptModifier modifierName completionStart completionEnd acceptModifier modifierName completionStart completionEnd acceptPackage packageName completionName completionStart completionEnd acceptPackage packageName completionName completionStart completionEnd acceptType packageName typeName completionName completionStart completionEnd acceptType packageName typeName completionName completionStart completionEnd acceptVariableName typePackageName typeName varName completionName completionStart completionEnd

protected Class File class File null Creates a new code Class File Info code for code class File code Class File Info Class File class File this class File class File  ClassFile classFile ClassFileInfo classFile ClassFileInfo ClassFile classFile classFile classFile
Creates the handles and infos for the fields of the given binary type Adds new handles to the given vector private void generate Field Infos I Type type I Binary Type type Info Hash Map new Elements Array List children Handles Make the fields I Binary Field fields type Info get Fields if fields null return for int i 0 field Count fields length i field Count i I Binary Field field Info fields i I Field field new Binary Field Java Element type new String field Info get Name new Elements put field field Info children Handles add field  generateFieldInfos IType IBinaryType typeInfo HashMap newElements ArrayList childrenHandles IBinaryField typeInfo getFields fieldCount fieldCount IBinaryField fieldInfo IField BinaryField JavaElement fieldInfo getName newElements fieldInfo childrenHandles
Creates the handles for the inner types of the given binary type Adds new handles to the given vector private void generate Inner Class Handles I Type type I Binary Type type Info Array List children Handles Add inner types If the current type is an inner type inner Classes returns an extra entry for the current type This entry must be removed Can also return an entry for the enclosing type of an inner type I Binary Nested Type inner Types type Info get Member Types if inner Types null for int i 0 type Count inner Types length i type Count i I Binary Nested Type binary Type inner Types i I Class File parent Class File I Package Fragment this class File get Parent get Class File new String Class File unqualified Name binary Type get Name SUFFIX STRING class I Type inner Type new Binary Type Java Element parent Class File new String Class File simple Name binary Type get Name children Handles add inner Type  generateInnerClassHandles IType IBinaryType typeInfo ArrayList childrenHandles innerClasses IBinaryNestedType innerTypes typeInfo getMemberTypes innerTypes typeCount innerTypes typeCount IBinaryNestedType binaryType innerTypes IClassFile parentClassFile IPackageFragment classFile getParent getClassFile ClassFile unqualifiedName binaryType getName SUFFIX_STRING_class IType innerType BinaryType JavaElement parentClassFile ClassFile simpleName binaryType getName childrenHandles innerType
Creates the handles and infos for the methods of the given binary type Adds new handles to the given vector private void generate Method Infos I Type type I Binary Type type Info Hash Map new Elements Array List children Handles I Binary Method methods type Info get Methods if methods null return for int i 0 method Count methods length i method Count i I Binary Method method Info methods i TODO jerome filter out synthetic members indexer should not index them as well if method Info get Modifiers I Constants Acc Synthetic 0 continue skip synthetic String p Names Signature get Parameter Types new String method Info get Method Descriptor char param Names new char p Names length for int j 0 j p Names length j param Names j p Names j to Char Array char parameter Types Class File translated Names param Names String selector new String method Info get Selector if method Info is Constructor selector type get Element Name for int j 0 j p Names length j p Names j new String parameter Types j I Method method new Binary Method Java Element type selector p Names children Handles add method new Elements put method method Info  generateMethodInfos IType IBinaryType typeInfo HashMap newElements ArrayList childrenHandles IBinaryMethod typeInfo getMethods methodCount methodCount IBinaryMethod methodInfo methodInfo getModifiers IConstants AccSynthetic pNames getParameterTypes methodInfo getMethodDescriptor paramNames pNames pNames paramNames pNames toCharArray parameterTypes ClassFile translatedNames paramNames methodInfo getSelector methodInfo isConstructor getElementName pNames pNames parameterTypes IMethod BinaryMethod JavaElement pNames childrenHandles newElements methodInfo
Returns the list of children code Binary Member code s of the code Binary Type code of our code Class File code I Java Element get Binary Children Hash Map new Elements if this binary Children null read Binary Children new Elements null type info not known here return this binary Children  BinaryMember BinaryType ClassFile IJavaElement getBinaryChildren HashMap newElements binaryChildren readBinaryChildren newElements binaryChildren
Returns true iff the code read Binary Children code has already been called boolean has Read Binary Children return this binary Children null  readBinaryChildren hasReadBinaryChildren binaryChildren
Creates the handles for code Binary Member code s defined in this code Class File code and adds them to the code Java Model Manager code s cache protected void read Binary Children Hash Map new Elements I Binary Type type Info Array List children Handles new Array List Binary Type type null try type Binary Type this class File get Type if type Info null type Info I Binary Type new Elements get type if type Info null create a classfile reader type Info this class File get Binary Type Info I File this class File get Resource catch Java Model Exception npe return if type Info null may not be a valid class file generate Field Infos type type Info new Elements children Handles generate Method Infos type type Info new Elements children Handles generate Inner Class Handles type type Info children Handles Note inner class are separate openables that are not opened here no need to pass in new Elements this binary Children new Java Element children Handles size children Handles to Array this binary Children  BinaryMember ClassFile JavaModelManager readBinaryChildren HashMap newElements IBinaryType typeInfo ArrayList childrenHandles ArrayList BinaryType BinaryType classFile getType typeInfo typeInfo IBinaryType newElements typeInfo typeInfo classFile getBinaryTypeInfo IFile classFile getResource JavaModelException typeInfo generateFieldInfos typeInfo newElements childrenHandles generateMethodInfos typeInfo newElements childrenHandles generateInnerClassHandles typeInfo childrenHandles newElements binaryChildren JavaElement childrenHandles childrenHandles toArray binaryChildren
Removes the binary children handles and remove their infos from the code Java Model Manager code s cache void remove Binary Children throws Java Model Exception if this binary Children null Java Model Manager manager Java Model Manager get Java Model Manager for int i 0 i this binary Children length i Java Element child this binary Children i if child instanceof Binary Type manager remove Info And Children Java Element child get Parent else manager remove Info And Children child this binary Children Java Element NO ELEMENTS  JavaModelManager removeBinaryChildren JavaModelException binaryChildren JavaModelManager JavaModelManager getJavaModelManager binaryChildren JavaElement binaryChildren BinaryType removeInfoAndChildren JavaElement getParent removeInfoAndChildren binaryChildren JavaElement NO_ELEMENTS

see I Compilation Unit become Working Copy I Problem Requestor I Progress Monitor public void become Working Copy I Problem Requestor problem Requestor I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ICompilationUnit becomeWorkingCopy IProblemRequestor IProgressMonitor becomeWorkingCopy IProblemRequestor problemRequestor IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
public I Import Declaration create Import String name I Java Element sibling I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IImportDeclaration createImport IJavaElement IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
public I Import Declaration create Import String name I Java Element sibling int flags I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IImportDeclaration createImport IJavaElement IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
public I Package Declaration create Package Declaration String name I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IPackageDeclaration createPackageDeclaration IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
public I Type create Type String contents I Java Element sibling boolean force I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IType createType IJavaElement IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Compilation Unit discard Working Copy public void discard Working Copy throws Java Model Exception not a real working copy ignore  ICompilationUnit discardWorkingCopy discardWorkingCopy JavaModelException
see I Compilation Unit get All Types public I Type get All Types throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ICompilationUnit getAllTypes IType getAllTypes JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Compilation Unit get Element At int public I Java Element get Element At int position throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ICompilationUnit getElementAt IJavaElement getElementAt JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Compilation Unit get Import String public I Import Declaration get Import String name return null  ICompilationUnit getImport IImportDeclaration getImport
see I Compilation Unit get Import Container public I Import Container get Import Container return null  ICompilationUnit getImportContainer IImportContainer getImportContainer
see I Compilation Unit get Imports public I Import Declaration get Imports throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ICompilationUnit getImports IImportDeclaration getImports JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Java Element get Openable public I Openable get Openable return null  IJavaElement getOpenable IOpenable getOpenable
see I Compilation Unit get Owner public Working Copy Owner get Owner return null  ICompilationUnit getOwner WorkingCopyOwner getOwner
see I Compilation Unit get Package Declaration String public I Package Declaration get Package Declaration String name return null  ICompilationUnit getPackageDeclaration IPackageDeclaration getPackageDeclaration
see I Compilation Unit get Package Declarations public I Package Declaration get Package Declarations throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ICompilationUnit getPackageDeclarations IPackageDeclaration getPackageDeclarations JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Compilation Unit get Type String public I Type get Type String name return null  ICompilationUnit getType IType getType
see I Compilation Unit get Types public I Type get Types throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ICompilationUnit getTypes IType getTypes JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Java Element exists public boolean exists return false  IJavaElement
see I Working Copy public I Java Element find Elements I Java Element element return null  IWorkingCopy IJavaElement findElements IJavaElement
see I Working Copy public I Type find Primary Type return null  IWorkingCopy IType findPrimaryType
see I Java Element get Corresponding Resource public I Resource get Corresponding Resource throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IJavaElement getCorrespondingResource IResource getCorrespondingResource JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Java Element get Element Name public String get Element Name return null  IJavaElement getElementName getElementName
see I Java Element get Element Type public int get Element Type return 0  IJavaElement getElementType getElementType
see I Java Element get Handle Identifier public String get Handle Identifier return null  IJavaElement getHandleIdentifier getHandleIdentifier
see I Java Element get Java Model public I Java Model get Java Model return null  IJavaElement getJavaModel IJavaModel getJavaModel
see I Java Element get Java Project public I Java Project get Java Project return null  IJavaElement getJavaProject IJavaProject getJavaProject
see I Java Element get Parent public I Java Element get Parent return null  IJavaElement getParent IJavaElement getParent
see I Java Element public I Path get Path return null  IJavaElement IPath getPath
see I Compilation Unit get Primary public I Compilation Unit get Primary return this  ICompilationUnit getPrimary ICompilationUnit getPrimary
see I Compilation Unit get Primary Element public I Java Element get Primary Element return get Primary  ICompilationUnit getPrimaryElement IJavaElement getPrimaryElement getPrimary
see I Java Element public I Resource get Resource return null  IJavaElement IResource getResource
see I Java Element public I Scheduling Rule get Scheduling Rule return null  IJavaElement ISchedulingRule getSchedulingRule
see I Java Element get Underlying Resource public I Resource get Underlying Resource throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IJavaElement getUnderlyingResource IResource getUnderlyingResource JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Java Element is Read Only public boolean is Read Only return true  IJavaElement isReadOnly isReadOnly
see I Java Element is Structure Known public boolean is Structure Known return false  IJavaElement isStructureKnown isStructureKnown
see I Source Reference get Source public String get Source throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ISourceReference getSource getSource JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Source Reference get Source Range public I Source Range get Source Range throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ISourceReference getSourceRange ISourceRange getSourceRange JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Parent get Children public I Java Element get Children throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IParent getChildren IJavaElement getChildren JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Parent has Children public boolean has Children throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IParent hasChildren hasChildren JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Openable close public void close throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IOpenable JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Openable get Buffer public I Buffer get Buffer return this buffer  IOpenable getBuffer IBuffer getBuffer
see I Compilation Unit has Resource Changed public boolean has Resource Changed return false  ICompilationUnit hasResourceChanged hasResourceChanged
see I Openable has Unsaved Changes public boolean has Unsaved Changes return false  IOpenable hasUnsavedChanges hasUnsavedChanges
see I Openable is Consistent public boolean is Consistent return false  IOpenable isConsistent isConsistent
see I Openable is Open public boolean is Open return false  IOpenable isOpen isOpen
see I Openable make Consistent I Progress Monitor public void make Consistent I Progress Monitor progress throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IOpenable makeConsistent IProgressMonitor makeConsistent IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Openable open I Progress Monitor public void open I Progress Monitor progress throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IOpenable IProgressMonitor IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Openable save I Progress Monitor boolean public void save I Progress Monitor progress boolean force throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IOpenable IProgressMonitor IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Working Copy commit boolean I Progress Monitor deprecated public void commit boolean force I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IWorkingCopy IProgressMonitor IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Working Copy commit Working Copy boolean I Progress Monitor public void commit Working Copy boolean force I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IWorkingCopy commitWorkingCopy IProgressMonitor commitWorkingCopy IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Working Copy destroy deprecated public void destroy not a real working copy ignore  IWorkingCopy
see I Working Copy find Shared Working Copy I Buffer Factory deprecated public I Java Element find Shared Working Copy I Buffer Factory buffer Factory return null  IWorkingCopy findSharedWorkingCopy IBufferFactory IJavaElement findSharedWorkingCopy IBufferFactory bufferFactory
see I Compilation Unit find Working Copy Working Copy Owner public I Compilation Unit find Working Copy Working Copy Owner owner return null  ICompilationUnit findWorkingCopy WorkingCopyOwner ICompilationUnit findWorkingCopy WorkingCopyOwner
see I Working Copy get Original I Java Element deprecated public I Java Element get Original I Java Element working Copy Element return null  IWorkingCopy getOriginal IJavaElement IJavaElement getOriginal IJavaElement workingCopyElement
see I Working Copy get Original Element deprecated public I Java Element get Original Element return get Primary Element  IWorkingCopy getOriginalElement IJavaElement getOriginalElement getPrimaryElement
see I Working Copy get Shared Working Copy I Progress Monitor I Buffer Factory I Problem Requestor deprecated public I Java Element get Shared Working Copy I Progress Monitor monitor I Buffer Factory factory I Problem Requestor problem Requestor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IWorkingCopy getSharedWorkingCopy IProgressMonitor IBufferFactory IProblemRequestor IJavaElement getSharedWorkingCopy IProgressMonitor IBufferFactory IProblemRequestor problemRequestor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Working Copy get Working Copy deprecated public I Java Element get Working Copy throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IWorkingCopy getWorkingCopy IJavaElement getWorkingCopy JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Compilation Unit get Working Copy I Progress Monitor public I Compilation Unit get Working Copy I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ICompilationUnit getWorkingCopy IProgressMonitor ICompilationUnit getWorkingCopy IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Working Copy get Working Copy I Progress Monitor I Buffer Factory I Problem Requestor deprecated public I Java Element get Working Copy I Progress Monitor monitor I Buffer Factory factory I Problem Requestor problem Requestor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IWorkingCopy getWorkingCopy IProgressMonitor IBufferFactory IProblemRequestor IJavaElement getWorkingCopy IProgressMonitor IBufferFactory IProblemRequestor problemRequestor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see org eclipse jdt core I Compilation Unit get Working Copy org eclipse jdt core Working Copy Owner org eclipse jdt core I Problem Requestor org eclipse core runtime I Progress Monitor public I Compilation Unit get Working Copy Working Copy Owner owner I Problem Requestor problem Requestor I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ICompilationUnit getWorkingCopy WorkingCopyOwner IProblemRequestor IProgressMonitor ICompilationUnit getWorkingCopy WorkingCopyOwner IProblemRequestor problemRequestor IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Working Copy is Based On I Resource deprecated public boolean is Based On I Resource resource return false  IWorkingCopy isBasedOn IResource isBasedOn IResource
see I Working Copy is Working Copy public boolean is Working Copy return true  IWorkingCopy isWorkingCopy isWorkingCopy
see org eclipse jdt core I Working Copy reconcile deprecated public I Marker reconcile throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IWorkingCopy IMarker JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Compilation Unit reconcile int boolean Working Copy Owner I Progress Monitor since 3 0 public Compilation Unit reconcile int ast Level boolean force Problem Detection Working Copy Owner owner I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ICompilationUnit WorkingCopyOwner IProgressMonitor CompilationUnit astLevel forceProblemDetection WorkingCopyOwner IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
public void reconcile boolean force Problem Detection I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  forceProblemDetection IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see org eclipse jdt core I Working Copy restore public void restore throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  IWorkingCopy JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see org eclipse jdt core I Source Manipulation copy I Java Element I Java Element String boolean I Progress Monitor public void copy I Java Element container I Java Element sibling String rename boolean replace I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ISourceManipulation IJavaElement IJavaElement IProgressMonitor IJavaElement IJavaElement IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see org eclipse jdt core I Source Manipulation delete boolean I Progress Monitor public void delete boolean force I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ISourceManipulation IProgressMonitor IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see org eclipse jdt core I Source Manipulation move I Java Element I Java Element String boolean I Progress Monitor public void move I Java Element container I Java Element sibling String rename boolean replace I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ISourceManipulation IJavaElement IJavaElement IProgressMonitor IJavaElement IJavaElement IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see org eclipse jdt core I Source Manipulation rename String boolean I Progress Monitor public void rename String name boolean replace I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ISourceManipulation IProgressMonitor IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see org eclipse jdt core I Code Assist code Complete int I Completion Requestor public void code Complete int offset I Completion Requestor requestor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ICodeAssist codeComplete ICompletionRequestor codeComplete ICompletionRequestor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see org eclipse jdt core I Code Assist code Complete int I Completion Requestor Working Copy Owner public void code Complete int offset I Completion Requestor requestor Working Copy Owner owner throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ICodeAssist codeComplete ICompletionRequestor WorkingCopyOwner codeComplete ICompletionRequestor WorkingCopyOwner JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see org eclipse jdt core I Code Assist code Select int int public I Java Element code Select int offset int length throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ICodeAssist codeSelect IJavaElement codeSelect JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see org eclipse jdt core I Code Assist code Select int int Working Copy Owner public I Java Element code Select int offset int length Working Copy Owner owner throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ICodeAssist codeSelect WorkingCopyOwner IJavaElement codeSelect WorkingCopyOwner JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see org eclipse jdt core I Code Assist code Complete int I Code Completion Requestor deprecated public void code Complete int offset org eclipse jdt core I Code Completion Requestor requestor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  ICodeAssist codeComplete ICodeCompletionRequestor codeComplete ICodeCompletionRequestor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see org eclipse jdt core I Code Assist code Complete int org eclipse jdt core Completion Requestor public void code Complete int offset Completion Requestor requestor throws Java Model Exception TODO jerome Missing implementation throw new Runtime Exception Not implemented yet NON NLS 1  ICodeAssist codeComplete CompletionRequestor codeComplete CompletionRequestor JavaModelException RuntimeException
see org eclipse jdt core I Code Assist code Complete int org eclipse jdt core Completion Requestor org eclipse jdt core Working Copy Owner public void code Complete int offset Completion Requestor requestor Working Copy Owner wcowner throws Java Model Exception TODO jerome Missing implementation throw new Runtime Exception Not implemented yet NON NLS 1  ICodeAssist codeComplete CompletionRequestor WorkingCopyOwner codeComplete CompletionRequestor WorkingCopyOwner JavaModelException RuntimeException
see org eclipse core runtime I Adaptable get Adapter Class public Object get Adapter Class adapter return null  IAdaptable getAdapter getAdapter
see I Java Element get Ancestor int public I Java Element get Ancestor int ancestor Type return null  IJavaElement getAncestor IJavaElement getAncestor ancestorType

Creates a class path entry of the specified kind with the given path public Classpath Entry int content Kind int entry Kind I Path path I Path inclusion Patterns I Path exclusion Patterns I Path source Attachment Path I Path source Attachment Root Path I Path specific Output Location boolean is Exported this content Kind content Kind this entry Kind entry Kind this path path this inclusion Patterns inclusion Patterns if inclusion Patterns INCLUDE ALL inclusion Patterns length 0 this full Char Inclusion Patterns UNINIT PATTERNS else this full Char Inclusion Patterns null empty inclusion pattern means everything is included this exclusion Patterns exclusion Patterns if exclusion Patterns length 0 this full Char Exclusion Patterns UNINIT PATTERNS else this full Char Exclusion Patterns null empty exclusion pattern means nothing is excluded this source Attachment Path source Attachment Path this source Attachment Root Path source Attachment Root Path this specific Output Location specific Output Location this is Exported is Exported  ClasspathEntry contentKind entryKind IPath IPath inclusionPatterns IPath exclusionPatterns IPath sourceAttachmentPath IPath sourceAttachmentRootPath IPath specificOutputLocation isExported contentKind contentKind entryKind entryKind inclusionPatterns inclusionPatterns inclusionPatterns INCLUDE_ALL inclusionPatterns fullCharInclusionPatterns UNINIT_PATTERNS fullCharInclusionPatterns exclusionPatterns exclusionPatterns exclusionPatterns fullCharExclusionPatterns UNINIT_PATTERNS fullCharExclusionPatterns sourceAttachmentPath sourceAttachmentPath sourceAttachmentRootPath sourceAttachmentRootPath specificOutputLocation specificOutputLocation isExported isExported
public char full Exclusion Pattern Chars if this full Char Exclusion Patterns UNINIT PATTERNS int length this exclusion Patterns length this full Char Exclusion Patterns new char length I Path prefix Path this path remove Trailing Separator for int i 0 i length i this full Char Exclusion Patterns i prefix Path append this exclusion Patterns i to String to Char Array return this full Char Exclusion Patterns  fullExclusionPatternChars fullCharExclusionPatterns UNINIT_PATTERNS exclusionPatterns fullCharExclusionPatterns IPath prefixPath removeTrailingSeparator fullCharExclusionPatterns prefixPath exclusionPatterns toString toCharArray fullCharExclusionPatterns
public char full Inclusion Pattern Chars if this full Char Inclusion Patterns UNINIT PATTERNS int length this inclusion Patterns length this full Char Inclusion Patterns new char length I Path prefix Path this path remove Trailing Separator for int i 0 i length i this full Char Inclusion Patterns i prefix Path append this inclusion Patterns i to String to Char Array return this full Char Inclusion Patterns  fullInclusionPatternChars fullCharInclusionPatterns UNINIT_PATTERNS inclusionPatterns fullCharInclusionPatterns IPath prefixPath removeTrailingSeparator fullCharInclusionPatterns prefixPath inclusionPatterns toString toCharArray fullCharInclusionPatterns
Returns the XML encoding of the class path public void element Encode XML Writer writer I Path project Path boolean indent boolean new Line Hash Map parameters new Hash Map parameters put kind Classpath Entry kind To String this entry Kind NON NLS 1 I Path xml Path this path if this entry Kind I Classpath Entry CPE VARIABLE this entry Kind I Classpath Entry CPE CONTAINER translate to project relative from absolute unless a device path if xml Path is Absolute if project Path null project Path is Prefix Of xml Path if xml Path segment 0 equals project Path segment 0 xml Path xml Path remove First Segments 1 xml Path xml Path make Relative else xml Path xml Path make Absolute parameters put path String value Of xml Path NON NLS 1 if this source Attachment Path null xml Path this source Attachment Path translate to project relative from absolute if this entry Kind I Classpath Entry CPE VARIABLE project Path null project Path is Prefix Of xml Path if xml Path segment 0 equals project Path segment 0 xml Path xml Path remove First Segments 1 xml Path xml Path make Relative parameters put sourcepath String value Of xml Path NON NLS 1 if this source Attachment Root Path null parameters put rootpath String value Of this source Attachment Root Path NON NLS 1 if this is Exported parameters put exported true NON NLS 1 NON NLS 2 if this inclusion Patterns null this inclusion Patterns length 0 String Buffer include Rule new String Buffer 10 for int i 0 max this inclusion Patterns length i max i if i 0 include Rule append include Rule append this inclusion Patterns i parameters put including String value Of include Rule NON NLS 1 if this exclusion Patterns null this exclusion Patterns length 0 String Buffer exclude Rule new String Buffer 10 for int i 0 max this exclusion Patterns length i max i if i 0 exclude Rule append exclude Rule append this exclusion Patterns i parameters put excluding String value Of exclude Rule NON NLS 1 if this specific Output Location null I Path output Location this specific Output Location remove First Segments 1 output Location output Location make Relative parameters put output String value Of output Location NON NLS 1 writer print Tag classpathentry parameters indent new Line true NON NLS 1  elementEncode XMLWriter IPath projectPath newLine HashMap HashMap ClasspathEntry kindToString entryKind IPath xmlPath entryKind IClasspathEntry CPE_VARIABLE entryKind IClasspathEntry CPE_CONTAINER xmlPath isAbsolute projectPath projectPath isPrefixOf xmlPath xmlPath projectPath xmlPath xmlPath removeFirstSegments xmlPath xmlPath makeRelative xmlPath xmlPath makeAbsolute valueOf xmlPath sourceAttachmentPath xmlPath sourceAttachmentPath entryKind IClasspathEntry CPE_VARIABLE projectPath projectPath isPrefixOf xmlPath xmlPath projectPath xmlPath xmlPath removeFirstSegments xmlPath xmlPath makeRelative valueOf xmlPath sourceAttachmentRootPath valueOf sourceAttachmentRootPath isExported inclusionPatterns inclusionPatterns StringBuffer includeRule StringBuffer inclusionPatterns includeRule includeRule inclusionPatterns valueOf includeRule exclusionPatterns exclusionPatterns StringBuffer excludeRule StringBuffer exclusionPatterns excludeRule excludeRule exclusionPatterns valueOf excludeRule specificOutputLocation IPath outputLocation specificOutputLocation removeFirstSegments outputLocation outputLocation makeRelative valueOf outputLocation printTag newLine
public static I Classpath Entry element Decode Element element I Java Project project I Path project Path project get Project get Full Path String kind Attr element get Attribute kind NON NLS 1 String path Attr element get Attribute path NON NLS 1 ensure path is absolute I Path path new Path path Attr int kind kind From String kind Attr if kind I Classpath Entry CPE VARIABLE kind I Classpath Entry CPE CONTAINER path is Absolute path project Path append path source attachment info optional I Path source Attachment Path element has Attribute sourcepath NON NLS 1 new Path element get Attribute sourcepath NON NLS 1 null if kind I Classpath Entry CPE VARIABLE source Attachment Path null source Attachment Path is Absolute source Attachment Path project Path append source Attachment Path I Path source Attachment Root Path element has Attribute rootpath NON NLS 1 new Path element get Attribute rootpath NON NLS 1 null exported flag optional boolean is Exported element get Attribute exported equals true NON NLS 1 NON NLS 2 inclusion patterns optional String inclusion element get Attribute including NON NLS 1 I Path inclusion Patterns INCLUDE ALL if inclusion equals NON NLS 1 char patterns Char Operation split On inclusion to Char Array int pattern Count if pattern Count patterns length 0 inclusion Patterns new I Path pattern Count for int j 0 j patterns length j inclusion Patterns j new Path new String patterns j exclusion patterns optional String exclusion element get Attribute excluding NON NLS 1 I Path exclusion Patterns EXCLUDE NONE if exclusion equals NON NLS 1 char patterns Char Operation split On exclusion to Char Array int pattern Count if pattern Count patterns length 0 exclusion Patterns new I Path pattern Count for int j 0 j patterns length j exclusion Patterns j new Path new String patterns j custom output location I Path output Location element has Attribute output project Path append element get Attribute output null NON NLS 1 NON NLS 2 recreate the CP entry switch kind case I Classpath Entry CPE PROJECT return Java Core new Project Entry path is Exported case I Classpath Entry CPE LIBRARY return Java Core new Library Entry path source Attachment Path source Attachment Root Path is Exported case I Classpath Entry CPE SOURCE must be an entry in this project or specify another project String proj Segment path segment 0 if proj Segment null proj Segment equals project get Element Name this project return Java Core new Source Entry path inclusion Patterns exclusion Patterns output Location else another project return Java Core new Project Entry path is Exported case I Classpath Entry CPE VARIABLE return Java Core new Variable Entry path source Attachment Path source Attachment Root Path is Exported case I Classpath Entry CPE CONTAINER return Java Core new Container Entry path is Exported case Classpath Entry K OUTPUT if path is Absolute return null return new Classpath Entry Classpath Entry K OUTPUT I Classpath Entry CPE LIBRARY path Classpath Entry INCLUDE ALL Classpath Entry EXCLUDE NONE null source attachment null source attachment root null custom output location false default throw new Assert Assertion Failed Exception Util bind classpath unknown Kind kind Attr NON NLS 1  IClasspathEntry elementDecode IJavaProject IPath projectPath getProject getFullPath kindAttr getAttribute pathAttr getAttribute IPath pathAttr kindFromString kindAttr IClasspathEntry CPE_VARIABLE IClasspathEntry CPE_CONTAINER isAbsolute projectPath IPath sourceAttachmentPath hasAttribute getAttribute IClasspathEntry CPE_VARIABLE sourceAttachmentPath sourceAttachmentPath isAbsolute sourceAttachmentPath projectPath sourceAttachmentPath IPath sourceAttachmentRootPath hasAttribute getAttribute isExported getAttribute getAttribute IPath inclusionPatterns INCLUDE_ALL CharOperation splitOn toCharArray patternCount patternCount inclusionPatterns IPath patternCount inclusionPatterns getAttribute IPath exclusionPatterns EXCLUDE_NONE CharOperation splitOn toCharArray patternCount patternCount exclusionPatterns IPath patternCount exclusionPatterns IPath outputLocation hasAttribute projectPath getAttribute IClasspathEntry CPE_PROJECT JavaCore newProjectEntry isExported IClasspathEntry CPE_LIBRARY JavaCore newLibraryEntry sourceAttachmentPath sourceAttachmentRootPath isExported IClasspathEntry CPE_SOURCE projSegment projSegment projSegment getElementName JavaCore newSourceEntry inclusionPatterns exclusionPatterns outputLocation JavaCore newProjectEntry isExported IClasspathEntry CPE_VARIABLE JavaCore newVariableEntry sourceAttachmentPath sourceAttachmentRootPath isExported IClasspathEntry CPE_CONTAINER JavaCore newContainerEntry isExported ClasspathEntry K_OUTPUT isAbsolute ClasspathEntry ClasspathEntry K_OUTPUT IClasspathEntry CPE_LIBRARY ClasspathEntry INCLUDE_ALL ClasspathEntry EXCLUDE_NONE AssertionFailedException unknownKind kindAttr
Returns true if the given object is a classpath entry with equivalent attributes public boolean equals Object object if this object return true if object instanceof I Classpath Entry I Classpath Entry other Entry I Classpath Entry object if this content Kind other Entry get Content Kind return false if this entry Kind other Entry get Entry Kind return false if this is Exported other Entry is Exported return false if this path equals other Entry get Path return false I Path other Path other Entry get Source Attachment Path if this source Attachment Path null if other Path null return false else if this source Attachment Path equals other Path return false other Path other Entry get Source Attachment Root Path if this source Attachment Root Path null if other Path null return false else if this source Attachment Root Path equals other Path return false I Path other Includes other Entry get Inclusion Patterns if this inclusion Patterns other Includes if this inclusion Patterns null return false int include Length this inclusion Patterns length if other Includes null other Includes length include Length return false for int i 0 i include Length i compare to Strings instead of I Paths since I Path equals is specified to ignore trailing separators if this inclusion Patterns i to String equals other Includes i to String return false I Path other Excludes other Entry get Exclusion Patterns if this exclusion Patterns other Excludes if this exclusion Patterns null return false int exclude Length this exclusion Patterns length if other Excludes null other Excludes length exclude Length return false for int i 0 i exclude Length i compare to Strings instead of I Paths since I Path equals is specified to ignore trailing separators if this exclusion Patterns i to String equals other Excludes i to String return false other Path other Entry get Output Location if this specific Output Location null if other Path null return false else if this specific Output Location equals other Path return false return true else return false  IClasspathEntry IClasspathEntry otherEntry IClasspathEntry contentKind otherEntry getContentKind entryKind otherEntry getEntryKind isExported otherEntry isExported otherEntry getPath IPath otherPath otherEntry getSourceAttachmentPath sourceAttachmentPath otherPath sourceAttachmentPath otherPath otherPath otherEntry getSourceAttachmentRootPath sourceAttachmentRootPath otherPath sourceAttachmentRootPath otherPath IPath otherIncludes otherEntry getInclusionPatterns inclusionPatterns otherIncludes inclusionPatterns includeLength inclusionPatterns otherIncludes otherIncludes includeLength includeLength toStrings IPaths IPath inclusionPatterns toString otherIncludes toString IPath otherExcludes otherEntry getExclusionPatterns exclusionPatterns otherExcludes exclusionPatterns excludeLength exclusionPatterns otherExcludes otherExcludes excludeLength excludeLength toStrings IPaths IPath exclusionPatterns toString otherExcludes toString otherPath otherEntry getOutputLocation specificOutputLocation otherPath specificOutputLocation otherPath
see I Classpath Entry public int get Content Kind return this content Kind  IClasspathEntry getContentKind contentKind
see I Classpath Entry public int get Entry Kind return this entry Kind  IClasspathEntry getEntryKind entryKind
see I Classpath Entry get Exclusion Patterns public I Path get Exclusion Patterns return this exclusion Patterns  IClasspathEntry getExclusionPatterns IPath getExclusionPatterns exclusionPatterns
see I Classpath Entry get Exclusion Patterns public I Path get Inclusion Patterns return this inclusion Patterns  IClasspathEntry getExclusionPatterns IPath getInclusionPatterns inclusionPatterns
see I Classpath Entry get Output Location public I Path get Output Location return this specific Output Location  IClasspathEntry getOutputLocation IPath getOutputLocation specificOutputLocation
see I Classpath Entry public I Path get Path return this path  IClasspathEntry IPath getPath
see I Classpath Entry public I Path get Source Attachment Path return this source Attachment Path  IClasspathEntry IPath getSourceAttachmentPath sourceAttachmentPath
see I Classpath Entry public I Path get Source Attachment Root Path return this source Attachment Root Path  IClasspathEntry IPath getSourceAttachmentRootPath sourceAttachmentRootPath
Returns the hash code for this classpath entry public int hash Code return this path hash Code  hashCode hashCode
see I Classpath Entry is Exported public boolean is Exported return this is Exported  IClasspathEntry isExported isExported isExported
Returns the kind of a code Package Fragment Root code from its code String code form static int kind From String String kind Str if kind Str equals Ignore Case prj NON NLS 1 return I Classpath Entry CPE PROJECT if kind Str equals Ignore Case var NON NLS 1 return I Classpath Entry CPE VARIABLE if kind Str equals Ignore Case con NON NLS 1 return I Classpath Entry CPE CONTAINER if kind Str equals Ignore Case src NON NLS 1 return I Classpath Entry CPE SOURCE if kind Str equals Ignore Case lib NON NLS 1 return I Classpath Entry CPE LIBRARY if kind Str equals Ignore Case output NON NLS 1 return Classpath Entry K OUTPUT return 1  PackageFragmentRoot kindFromString kindStr kindStr equalsIgnoreCase IClasspathEntry CPE_PROJECT kindStr equalsIgnoreCase IClasspathEntry CPE_VARIABLE kindStr equalsIgnoreCase IClasspathEntry CPE_CONTAINER kindStr equalsIgnoreCase IClasspathEntry CPE_SOURCE kindStr equalsIgnoreCase IClasspathEntry CPE_LIBRARY kindStr equalsIgnoreCase ClasspathEntry K_OUTPUT
Returns a code String code for the kind of a class path entry static String kind To String int kind switch kind case I Classpath Entry CPE PROJECT return src backward compatibility NON NLS 1 case I Classpath Entry CPE SOURCE return src NON NLS 1 case I Classpath Entry CPE LIBRARY return lib NON NLS 1 case I Classpath Entry CPE VARIABLE return var NON NLS 1 case I Classpath Entry CPE CONTAINER return con NON NLS 1 case Classpath Entry K OUTPUT return output NON NLS 1 default return unknown NON NLS 1  kindToString IClasspathEntry CPE_PROJECT IClasspathEntry CPE_SOURCE IClasspathEntry CPE_LIBRARY IClasspathEntry CPE_VARIABLE IClasspathEntry CPE_CONTAINER ClasspathEntry K_OUTPUT
Returns a printable representation of this classpath entry public String to String String Buffer buffer new String Buffer buffer append get Path to String buffer append switch get Entry Kind case I Classpath Entry CPE LIBRARY buffer append CPE LIBRARY NON NLS 1 break case I Classpath Entry CPE PROJECT buffer append CPE PROJECT NON NLS 1 break case I Classpath Entry CPE SOURCE buffer append CPE SOURCE NON NLS 1 break case I Classpath Entry CPE VARIABLE buffer append CPE VARIABLE NON NLS 1 break case I Classpath Entry CPE CONTAINER buffer append CPE CONTAINER NON NLS 1 break buffer append NON NLS 1 switch get Content Kind case I Package Fragment Root K BINARY buffer append K BINARY NON NLS 1 break case I Package Fragment Root K SOURCE buffer append K SOURCE NON NLS 1 break case Classpath Entry K OUTPUT buffer append K OUTPUT NON NLS 1 break buffer append if get Source Attachment Path null buffer append source Path NON NLS 1 buffer append get Source Attachment Path buffer append if get Source Attachment Root Path null buffer append root Path NON NLS 1 buffer append get Source Attachment Root Path buffer append buffer append is Exported NON NLS 1 buffer append this is Exported buffer append I Path patterns get Inclusion Patterns int length if length patterns null 0 patterns length 0 buffer append including NON NLS 1 for int i 0 i length i buffer append patterns i if i length 1 buffer append buffer append patterns get Exclusion Patterns if length patterns null 0 patterns length 0 buffer append excluding NON NLS 1 for int i 0 i length i buffer append patterns i if i length 1 buffer append buffer append if get Output Location null buffer append output NON NLS 1 buffer append get Output Location buffer append return buffer to String  toString StringBuffer StringBuffer getPath toString getEntryKind IClasspathEntry CPE_LIBRARY CPE_LIBRARY IClasspathEntry CPE_PROJECT CPE_PROJECT IClasspathEntry CPE_SOURCE CPE_SOURCE IClasspathEntry CPE_VARIABLE CPE_VARIABLE IClasspathEntry CPE_CONTAINER CPE_CONTAINER getContentKind IPackageFragmentRoot K_BINARY K_BINARY IPackageFragmentRoot K_SOURCE K_SOURCE ClasspathEntry K_OUTPUT K_OUTPUT getSourceAttachmentPath sourcePath getSourceAttachmentPath getSourceAttachmentRootPath rootPath getSourceAttachmentRootPath isExported isExported IPath getInclusionPatterns getExclusionPatterns getOutputLocation getOutputLocation toString
Answers an ID which is used to distinguish entries during package fragment root computations public String rootID if this rootID null switch this entry Kind case I Classpath Entry CPE LIBRARY this rootID LIB this path NON NLS 1 break case I Classpath Entry CPE PROJECT this rootID PRJ this path NON NLS 1 break case I Classpath Entry CPE SOURCE this rootID SRC this path NON NLS 1 break case I Classpath Entry CPE VARIABLE this rootID VAR this path NON NLS 1 break case I Classpath Entry CPE CONTAINER this rootID CON this path NON NLS 1 break default this rootID NON NLS 1 break return this rootID  entryKind IClasspathEntry CPE_LIBRARY IClasspathEntry CPE_PROJECT IClasspathEntry CPE_SOURCE IClasspathEntry CPE_VARIABLE IClasspathEntry CPE_CONTAINER
see I Classpath Entry deprecated public I Classpath Entry get Resolved Entry return Java Core get Resolved Classpath Entry this  IClasspathEntry IClasspathEntry getResolvedEntry JavaCore getResolvedClasspathEntry
Validate a given classpath and output location for a project using the following rules ul li Classpath entries cannot collide with each other that is all entry paths must be unique li The project output location path cannot be null must be absolute and located inside the project li Specific output locations specified on source entries can be null if not they must be located inside the project li A project entry cannot refer to itself directly that is a project cannot prerequisite itself li Classpath entries or output locations cannot coincidate or be nested in each other except for the following scenarii listed below ul li A source folder can coincidate with its own output location in which case this output can then contain library archives However a specific output location cannot coincidate with any library or a distinct source folder than the one referring to it li li A source library folder can be nested in any source folder as long as the nested folder is excluded from the enclosing one li li An output location can be nested in a source folder if the source folder coincidates with the project itself or if the output location is excluded from the source folder li ul ul Note that the classpath entries are not validated automatically Only bound variables or containers are considered in the checking process this allows to perform a consistency check on a classpath which has references to yet non existing projects folders p This validation is intended to anticipate classpath issues prior to assigning it to a project In particular it will automatically be performed during the classpath setting operation if validation fails the classpath setting will not complete p param java Project the given java project param raw Classpath a given classpath param project Output Location a given output location return a status object with code code I Status OK code if the given classpath and output location are compatible otherwise a status object indicating what is wrong with the classpath or output location public static I Java Model Status validate Classpath I Java Project java Project I Classpath Entry raw Classpath I Path project Output Location I Project project java Project get Project I Path project Path project get Full Path String project Name java Project get Element Name validate output location if project Output Location null return new Java Model Status I Java Model Status Constants NULL PATH if project Output Location is Absolute if project Path is Prefix Of project Output Location return new Java Model Status I Java Model Status Constants PATH OUTSIDE PROJECT java Project project Output Location to String else return new Java Model Status I Java Model Status Constants RELATIVE PATH project Output Location boolean has Source false boolean has Lib Folder false tolerate null path it will be reset to default if raw Classpath null return Java Model Status VERIFIED OK retrieve resolved classpath I Classpath Entry classpath try classpath Java Project java Project get Resolved Classpath raw Classpath null output true ignore pb false no marker null no reverse map catch Java Model Exception e return e get Java Model Status int length classpath length int output Count 1 I Path output Locations new I Path length 1 boolean allow Nesting In Output Locations new boolean length 1 output Locations 0 project Output Location retrieve and check output locations I Path potential Nested Output null for error reporting purpose int source Entry Count 0 boolean disable Exclusion Patterns Java Core DISABLED equals java Project get Option Java Core CORE ENABLE CLASSPATH EXCLUSION PATTERNS true boolean disable Custom Output Locations Java Core DISABLED equals java Project get Option Java Core CORE ENABLE CLASSPATH MULTIPLE OUTPUT LOCATIONS true for int i 0 i length i I Classpath Entry resolved Entry classpath i switch resolved Entry get Entry Kind case I Classpath Entry CPE SOURCE source Entry Count if disable Exclusion Patterns resolved Entry get Inclusion Patterns null resolved Entry get Inclusion Patterns length 0 resolved Entry get Exclusion Patterns null resolved Entry get Exclusion Patterns length 0 return new Java Model Status I Java Model Status Constants DISABLED CP EXCLUSION PATTERNS java Project resolved Entry get Path I Path custom Output if custom Output resolved Entry get Output Location null if disable Custom Output Locations return new Java Model Status I Java Model Status Constants DISABLED CP MULTIPLE OUTPUT LOCATIONS java Project resolved Entry get Path ensure custom output is in project if custom Output is Absolute if java Project get Path is Prefix Of custom Output return new Java Model Status I Java Model Status Constants PATH OUTSIDE PROJECT java Project custom Output to String else return new Java Model Status I Java Model Status Constants RELATIVE PATH custom Output ensure custom output doesn t conflict with other outputs check exact match if Util index Of Matching Path custom Output output Locations output Count 1 continue already found accumulate all outputs will check nesting once all available to handle ordering issues output Locations output Count custom Output check nesting across output locations for int i 1 no check for default output i output Count i I Path custom Output output Locations i int index check nesting if index Util index Of Enclosing Path custom Output output Locations output Count 1 index i if index 0 custom output is nested in project s output need to check if all source entries have a custom output before complaining if potential Nested Output null potential Nested Output custom Output else return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath cannot Nest Output In Output custom Output make Relative to String output Locations index make Relative to String NON NLS 1 allow custom output nesting in project s output if all source entries have a custom output if source Entry Count output Count 1 allow Nesting In Output Locations 0 true else if potential Nested Output null return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath cannot Nest Output In Output potential Nested Output make Relative to String output Locations 0 make Relative to String NON NLS 1 for int i 0 i length i I Classpath Entry resolved Entry classpath i I Path path resolved Entry get Path int index switch resolved Entry get Entry Kind case I Classpath Entry CPE SOURCE has Source true if index Util index Of Matching Path path output Locations output Count 1 allow Nesting In Output Locations index true break case I Classpath Entry CPE LIBRARY has Lib Folder org eclipse jdt internal compiler util Util is Archive File Name path last Segment if index Util index Of Matching Path path output Locations output Count 1 allow Nesting In Output Locations index true break if has Source has Lib Folder if no source and no lib folder then allowed for int i 0 i output Count i allow Nesting In Output Locations i true Hash Set pathes new Hash Set length check all entries for int i 0 i length i I Classpath Entry entry classpath i if entry null continue I Path entry Path entry get Path int kind entry get Entry Kind Build some common strings for status message boolean is Project Relative entry Path segment 0 to String equals project Name String entry Path Msg is Project Relative entry Path remove First Segments 1 to String entry Path make Relative to String complain if duplicate path if pathes add entry Path return new Java Model Status I Java Model Status Constants NAME COLLISION Util bind classpath duplicate Entry Path entry Path Msg project Name NON NLS 1 no further check if entry coincidates with project or output location if entry Path equals project Path complain if self referring project entry if kind I Classpath Entry CPE PROJECT return new Java Model Status I Java Model Status Constants INVALID PATH Util bind classpath cannot Refer To Itself entry Path make Relative to String NON NLS 1 tolerate nesting output in src if src prj continue allow nesting source entries in each other as long as the outer entry excludes the inner one if kind I Classpath Entry CPE SOURCE kind I Classpath Entry CPE LIBRARY org eclipse jdt internal compiler util Util is Archive File Name entry Path last Segment for int j 0 j classpath length j I Classpath Entry other Entry classpath j if other Entry null continue int other Kind other Entry get Entry Kind I Path other Path other Entry get Path if entry other Entry other Kind I Classpath Entry CPE SOURCE other Kind I Classpath Entry CPE LIBRARY org eclipse jdt internal compiler util Util is Archive FileN javaProject rawClasspath projectOutputLocation IStatus IJavaModelStatus validateClasspath IJavaProject javaProject IClasspathEntry rawClasspath IPath projectOutputLocation IProject javaProject getProject IPath projectPath getFullPath projectName javaProject getElementName projectOutputLocation JavaModelStatus IJavaModelStatusConstants NULL_PATH projectOutputLocation isAbsolute projectPath isPrefixOf projectOutputLocation JavaModelStatus IJavaModelStatusConstants PATH_OUTSIDE_PROJECT javaProject projectOutputLocation toString JavaModelStatus IJavaModelStatusConstants RELATIVE_PATH projectOutputLocation hasSource hasLibFolder rawClasspath JavaModelStatus VERIFIED_OK IClasspathEntry JavaProject javaProject getResolvedClasspath rawClasspath JavaModelException getJavaModelStatus outputCount IPath outputLocations IPath allowNestingInOutputLocations outputLocations projectOutputLocation IPath potentialNestedOutput sourceEntryCount disableExclusionPatterns JavaCore javaProject getOption JavaCore CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS disableCustomOutputLocations JavaCore javaProject getOption JavaCore CORE_ENABLE_CLASSPATH_MULTIPLE_OUTPUT_LOCATIONS IClasspathEntry resolvedEntry resolvedEntry getEntryKind IClasspathEntry CPE_SOURCE sourceEntryCount disableExclusionPatterns resolvedEntry getInclusionPatterns resolvedEntry getInclusionPatterns resolvedEntry getExclusionPatterns resolvedEntry getExclusionPatterns JavaModelStatus IJavaModelStatusConstants DISABLED_CP_EXCLUSION_PATTERNS javaProject resolvedEntry getPath IPath customOutput customOutput resolvedEntry getOutputLocation disableCustomOutputLocations JavaModelStatus IJavaModelStatusConstants DISABLED_CP_MULTIPLE_OUTPUT_LOCATIONS javaProject resolvedEntry getPath customOutput isAbsolute javaProject getPath isPrefixOf customOutput JavaModelStatus IJavaModelStatusConstants PATH_OUTSIDE_PROJECT javaProject customOutput toString JavaModelStatus IJavaModelStatusConstants RELATIVE_PATH customOutput indexOfMatchingPath customOutput outputLocations outputCount outputLocations outputCount customOutput outputCount IPath customOutput outputLocations indexOfEnclosingPath customOutput outputLocations outputCount potentialNestedOutput potentialNestedOutput customOutput JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH cannotNestOutputInOutput customOutput makeRelative toString outputLocations makeRelative toString sourceEntryCount outputCount allowNestingInOutputLocations potentialNestedOutput JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH cannotNestOutputInOutput potentialNestedOutput makeRelative toString outputLocations makeRelative toString IClasspathEntry resolvedEntry IPath resolvedEntry getPath resolvedEntry getEntryKind IClasspathEntry CPE_SOURCE hasSource indexOfMatchingPath outputLocations outputCount allowNestingInOutputLocations IClasspathEntry CPE_LIBRARY hasLibFolder isArchiveFileName lastSegment indexOfMatchingPath outputLocations outputCount allowNestingInOutputLocations hasSource hasLibFolder outputCount allowNestingInOutputLocations HashSet HashSet IClasspathEntry IPath entryPath getPath getEntryKind isProjectRelative entryPath toString projectName entryPathMsg isProjectRelative entryPath removeFirstSegments toString entryPath makeRelative toString entryPath JavaModelStatus IJavaModelStatusConstants NAME_COLLISION duplicateEntryPath entryPathMsg projectName entryPath projectPath IClasspathEntry CPE_PROJECT JavaModelStatus IJavaModelStatusConstants INVALID_PATH cannotReferToItself entryPath makeRelative toString IClasspathEntry CPE_SOURCE IClasspathEntry CPE_LIBRARY isArchiveFileName entryPath lastSegment IClasspathEntry otherEntry otherEntry otherKind otherEntry getEntryKind IPath otherPath otherEntry getPath otherEntry otherKind IClasspathEntry CPE_SOURCE otherKind IClasspathEntry CPE_LIBRARY isArchiveFileN
Returns a Java model status describing the problem related to this classpath entry if any a status object with code code I Status OK code if the entry is fine that is if the given classpath entry denotes a valid element to be referenced onto a classpath param project the given java project param entry the given classpath entry param check Source Attachment a flag to determine if source attachement should be checked param recurse In Containers flag indicating whether validation should be applied to container entries recursively return a java model status describing the problem related to this classpath entry if any a status object with code code I Status OK code if the entry is fine public static I Java Model Status validate Classpath Entry I Java Project project I Classpath Entry entry boolean check Source Attachment boolean recurse In Containers I Workspace Root workspace Root Resources Plugin get Workspace get Root I Path path entry get Path Build some common strings for status message String project Name project get Element Name boolean path Starts With Project path segment 0 to String equals project Name String entry Path Msg path Starts With Project path remove First Segments 1 to String path make Relative to String switch entry get Entry Kind container entry check case I Classpath Entry CPE CONTAINER if path null path segment Count 1 try I Classpath Container container Java Model Manager get Java Model Manager get Classpath Container path project container retrieval is performing validation check on container entry kinds if container null return new Java Model Status I Java Model Status Constants CP CONTAINER PATH UNBOUND project path else if container Java Model Manager CONTAINER INITIALIZATION IN PROGRESS don t create a marker if initialization is in progress case of cp initialization batching return Java Model Status VERIFIED OK I Classpath Entry container Entries container get Classpath Entries if container Entries null for int i 0 length container Entries length i length i I Classpath Entry container Entry container Entries i int kind container Entry null 0 container Entry get Entry Kind if container Entry null kind I Classpath Entry CPE SOURCE kind I Classpath Entry CPE VARIABLE kind I Classpath Entry CPE CONTAINER String description container get Description if description null description path make Relative to String return new Java Model Status I Java Model Status Constants INVALID CP CONTAINER ENTRY project path if recurse In Containers I Java Model Status container Entry Status validate Classpath Entry project container Entry check Source Attachment recurse In Containers if container Entry Status isOK return container Entry Status catch Java Model Exception e return new Java Model Status e else return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath illegal Container Path entry Path Msg project Name NON NLS 1 break variable entry check case I Classpath Entry CPE VARIABLE if path null path segment Count 1 try entry Java Core get Resolved Classpath Entry entry catch Assert Assertion Failed Exception e Catch the assertion failure and throw java model exception instead see bug https bugs eclipse org bugs show bug cgi id 55992 return new Java Model Status I Java Model Status Constants INVALID PATH e get Message if entry null return new Java Model Status I Java Model Status Constants CP VARIABLE PATH UNBOUND project path return validate Classpath Entry project entry check Source Attachment recurse In Containers else return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath illegal Variable Path path make Relative to String project Name NON NLS 1 library entry check case I Classpath Entry CPE LIBRARY if path null path is Absolute path is Empty I Path source Attachment entry get Source Attachment Path Object target Java Model get Target workspace Root path true if target null project get Option Java Core CORE INCOMPATIBLE JDK LEVEL true Java Core IGNORE long project TargetJDK Compiler Options version To Jdk Level project get Option Java Core COMPILER CODEGEN TARGET PLATFORM true long libraryJDK Util get Jdk Level target if libraryJDK 0 libraryJDK project TargetJDK return new Java Model Status I Java Model Status Constants INCOMPATIBLE JDK LEVEL project path Compiler Options version From Jdk Level libraryJDK if target instanceof I Resource I Resource resolved Resource I Resource target switch resolved Resource get Type case I Resource FILE if org eclipse jdt internal compiler util Util is Archive File Name resolved Resource get Name if check Source Attachment source Attachment null source Attachment is Empty Java Model get Target workspace Root source Attachment true null return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath unbound Source Attachment new String source Attachment make Relative to String path make Relative to String project Name NON NLS 1 else return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath illegal Library Archive entry Path Msg project Name NON NLS 1 break case I Resource FOLDER internal binary folder if check Source Attachment source Attachment null source Attachment is Empty Java Model get Target workspace Root source Attachment true null return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath unbound Source Attachment new String source Attachment make Relative to String path make Relative to String project Name NON NLS 1 else if target instanceof File File file File target if file is File return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath illegal External Folder path toOS String project Name NON NLS 1 else if org eclipse jdt internal compiler util Util is Archive File Name file get Name return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath illegal Library Archive path toOS String project Name NON NLS 1 else if check Source Attachment source Attachment null source Attachment is Empty Java Model get Target workspace Root source Attachment true null return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath unbound Source Attachment new String source Attachment to String path make Relative to String project Name NON NLS 1 else return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath unbound Library path make Relative to String project Name NON NLS 1 else return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath illegal Library Path path make Relative to String project Name NON NLS 1 break project entry check case I Classpath Entry CPE PROJECT if path null path is Absolute path is Empty I Project prereq Project Rsc workspace Root get Project path segment 0 I Java Project prereq Project Java Core create prereq Project Rsc try if prereq Project Rsc exists prereq Project Rsc has Nature Java Core NATURE ID return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath unbound Project path make Relative segment 0 to String project Name NON NLS 1 if prereq Project Rsc is Open return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath closed Project path segment 0 to String NON NLS 1 if project get Option Java Core CORE INCOMPATIBLE JDK LEVEL true Java Core IGNORE long project TargetJDK Compiler Options version To Jdk Level project get Option Java Core COMPILER CODEGEN TARGET PLATFORM true long prereq Project TargetJDK Compiler Options version To Jdk Level prereq Project get Option Java Core COMPILER CODEGEN TARGET PLATFORM true if prereq Project TargetJDK project TargetJDK return new Java Model Status I Java Model Status Constants INCOMPATIBLE JDK LEVEL project path Compiler Options version From Jdk Level prereq Project TargetJDK catch Core Exception e return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath unbound Project path segment 0 to String project Name NON NLS 1 else return new Java Model Status I Java Model Status Constants INVALID CLASSPATH Util bind classpath illegal Project Path path segment 0 to String project Name NON NLS 1 break project source folder case I Classpath Entry CPE SOURCE if entry get Inclusion Patterns null entry get Inclusion Patterns length 0 entry get Exclusion Patterns n IStatus checkSourceAttachment recurseInContainers IStatus IJavaModelStatus validateClasspathEntry IJavaProject IClasspathEntry checkSourceAttachment recurseInContainers IWorkspaceRoot workspaceRoot ResourcesPlugin getWorkspace getRoot IPath getPath projectName getElementName pathStartsWithProject toString projectName entryPathMsg pathStartsWithProject removeFirstSegments toString makeRelative toString getEntryKind IClasspathEntry CPE_CONTAINER segmentCount IClasspathContainer JavaModelManager getJavaModelManager getClasspathContainer JavaModelStatus IJavaModelStatusConstants CP_CONTAINER_PATH_UNBOUND JavaModelManager CONTAINER_INITIALIZATION_IN_PROGRESS JavaModelStatus VERIFIED_OK IClasspathEntry containerEntries getClasspathEntries containerEntries containerEntries IClasspathEntry containerEntry containerEntries containerEntry containerEntry getEntryKind containerEntry IClasspathEntry CPE_SOURCE IClasspathEntry CPE_VARIABLE IClasspathEntry CPE_CONTAINER getDescription makeRelative toString JavaModelStatus IJavaModelStatusConstants INVALID_CP_CONTAINER_ENTRY recurseInContainers IJavaModelStatus containerEntryStatus validateClasspathEntry containerEntry checkSourceAttachment recurseInContainers containerEntryStatus containerEntryStatus JavaModelException JavaModelStatus JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH illegalContainerPath entryPathMsg projectName IClasspathEntry CPE_VARIABLE segmentCount JavaCore getResolvedClasspathEntry AssertionFailedException show_bug JavaModelStatus IJavaModelStatusConstants INVALID_PATH getMessage JavaModelStatus IJavaModelStatusConstants CP_VARIABLE_PATH_UNBOUND validateClasspathEntry checkSourceAttachment recurseInContainers JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH illegalVariablePath makeRelative toString projectName IClasspathEntry CPE_LIBRARY isAbsolute isEmpty IPath sourceAttachment getSourceAttachmentPath JavaModel getTarget workspaceRoot getOption JavaCore CORE_INCOMPATIBLE_JDK_LEVEL JavaCore projectTargetJDK CompilerOptions versionToJdkLevel getOption JavaCore COMPILER_CODEGEN_TARGET_PLATFORM getJdkLevel projectTargetJDK JavaModelStatus IJavaModelStatusConstants INCOMPATIBLE_JDK_LEVEL CompilerOptions versionFromJdkLevel IResource IResource resolvedResource IResource resolvedResource getType IResource isArchiveFileName resolvedResource getName checkSourceAttachment sourceAttachment sourceAttachment isEmpty JavaModel getTarget workspaceRoot sourceAttachment JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH unboundSourceAttachment sourceAttachment makeRelative toString makeRelative toString projectName JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH illegalLibraryArchive entryPathMsg projectName IResource checkSourceAttachment sourceAttachment sourceAttachment isEmpty JavaModel getTarget workspaceRoot sourceAttachment JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH unboundSourceAttachment sourceAttachment makeRelative toString makeRelative toString projectName isFile JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH illegalExternalFolder toOSString projectName isArchiveFileName getName JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH illegalLibraryArchive toOSString projectName checkSourceAttachment sourceAttachment sourceAttachment isEmpty JavaModel getTarget workspaceRoot sourceAttachment JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH unboundSourceAttachment sourceAttachment toString makeRelative toString projectName JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH unboundLibrary makeRelative toString projectName JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH illegalLibraryPath makeRelative toString projectName IClasspathEntry CPE_PROJECT isAbsolute isEmpty IProject prereqProjectRsc workspaceRoot getProject IJavaProject prereqProject JavaCore prereqProjectRsc prereqProjectRsc prereqProjectRsc hasNature JavaCore NATURE_ID JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH unboundProject makeRelative toString projectName prereqProjectRsc isOpen JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH closedProject toString getOption JavaCore CORE_INCOMPATIBLE_JDK_LEVEL JavaCore projectTargetJDK CompilerOptions versionToJdkLevel getOption JavaCore COMPILER_CODEGEN_TARGET_PLATFORM prereqProjectTargetJDK CompilerOptions versionToJdkLevel prereqProject getOption JavaCore COMPILER_CODEGEN_TARGET_PLATFORM prereqProjectTargetJDK projectTargetJDK JavaModelStatus IJavaModelStatusConstants INCOMPATIBLE_JDK_LEVEL CompilerOptions versionFromJdkLevel prereqProjectTargetJDK CoreException JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH unboundProject toString projectName JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH illegalProjectPath toString projectName IClasspathEntry CPE_SOURCE getInclusionPatterns getInclusionPatterns getExclusionPatterns

public class Commit Working Copy Operation extends Java Model Operation Constructs an operation to commit the contents of a working copy to its original compilation unit public Commit Working Copy Operation I Compilation Unit element boolean force super new I Java Element element force  CommitWorkingCopyOperation JavaModelOperation CommitWorkingCopyOperation ICompilationUnit IJavaElement
exception Java Model Exception if setting the source of the original compilation unit fails protected void execute Operation throws Java Model Exception try begin Task Util bind working Copy commit 2 NON NLS 1 Compilation Unit working Copy get Compilation Unit I File resource I File working Copy get Resource I Compilation Unit primary working Copy get Primary boolean is Primary working Copy is Primary Java Element Delta Builder delta Builder null Package Fragment Root root Package Fragment Root working Copy get Ancestor I Java Element PACKAGE FRAGMENT ROOT boolean is Included Util is Excluded working Copy if is Primary root is On Classpath is Included resource is Accessible Util is Valid Compilation Unit Name working Copy get Element Name force opening so that the delta builder can get the old info if is Primary primary is Open primary open null creates the delta builder this remembers the content of the cu if it is not excluded and it is not a primary or it is a non consistent primary if is Included is Primary working Copy is Consistent delta Builder new Java Element Delta Builder primary save the cu I Buffer primary Buffer primary get Buffer if is Primary if primary Buffer null return char primary Contents primary Buffer get Characters boolean has Saved false try I Buffer working Copy Buffer working Copy get Buffer if working Copy Buffer null return primary Buffer set Contents working Copy Buffer get Characters primary Buffer save this progress Monitor this force primary make Consistent this has Saved true finally if has Saved restore original buffer contents since something went wrong primary Buffer set Contents primary Contents else for a primary working copy no need to set the content of the buffer again primary Buffer save this progress Monitor this force primary make Consistent this else working copy on cu outside classpath OR resource doesn t exist yet String encoding null try encoding resource get Charset catch Core Exception ce use no encoding String contents working Copy get Source if contents null return try byte bytes encoding null contents get Bytes contents get Bytes encoding Byte Array Input Stream stream new Byte Array Input Stream bytes if resource exists resource set Contents stream this force I Resource FORCE I Resource KEEP HISTORY I Resource KEEP HISTORY null else resource create stream this force this progress Monitor catch Core Exception e throw new Java Model Exception e catch Unsupported Encoding Exception e throw new Java Model Exception e I Java Model Status Constants IO EXCEPTION set Attribute HAS MODIFIED RESOURCE ATTR TRUE make sure working copy is in sync working Copy update Time Stamp Compilation Unit primary working Copy make Consistent this worked 1 build the deltas if delta Builder null delta Builder build Deltas add the deltas to the list of deltas created during this operation if delta Builder delta null add Delta delta Builder delta worked 1 finally done  JavaModelException executeOperation JavaModelException beginTask workingCopy CompilationUnit workingCopy getCompilationUnit IFile IFile workingCopy getResource ICompilationUnit workingCopy getPrimary isPrimary workingCopy isPrimary JavaElementDeltaBuilder deltaBuilder PackageFragmentRoot PackageFragmentRoot workingCopy getAncestor IJavaElement PACKAGE_FRAGMENT_ROOT isIncluded isExcluded workingCopy isPrimary isOnClasspath isIncluded isAccessible isValidCompilationUnitName workingCopy getElementName isPrimary isOpen isIncluded isPrimary workingCopy isConsistent deltaBuilder JavaElementDeltaBuilder IBuffer primaryBuffer getBuffer isPrimary primaryBuffer primaryContents primaryBuffer getCharacters hasSaved IBuffer workingCopyBuffer workingCopy getBuffer workingCopyBuffer primaryBuffer setContents workingCopyBuffer getCharacters primaryBuffer progressMonitor makeConsistent hasSaved hasSaved primaryBuffer setContents primaryContents primaryBuffer progressMonitor makeConsistent getCharset CoreException workingCopy getSource getBytes getBytes ByteArrayInputStream ByteArrayInputStream setContents IResource IResource KEEP_HISTORY IResource KEEP_HISTORY progressMonitor CoreException JavaModelException UnsupportedEncodingException JavaModelException IJavaModelStatusConstants IO_EXCEPTION setAttribute HAS_MODIFIED_RESOURCE_ATTR workingCopy updateTimeStamp CompilationUnit workingCopy makeConsistent deltaBuilder deltaBuilder buildDeltas deltaBuilder addDelta deltaBuilder
Returns the compilation unit this operation is working on protected Compilation Unit get Compilation Unit return Compilation Unit get Element To Process  CompilationUnit getCompilationUnit CompilationUnit getElementToProcess
protected I Scheduling Rule get Scheduling Rule I Resource resource get Element To Process get Resource I Workspace workspace resource get Workspace if resource exists return workspace get Rule Factory modify Rule resource else return workspace get Rule Factory create Rule resource  ISchedulingRule getSchedulingRule IResource getElementToProcess getResource IWorkspace getWorkspace getRuleFactory modifyRule getRuleFactory createRule
Possible failures ul li INVALID ELEMENT TYPES the compilation unit supplied to this operation is not a working copy li ELEMENT NOT PRESENT the compilation unit the working copy is based on no longer exists li UPDATE CONFLICT the original compilation unit has changed since the working copy was created and the operation specifies no force li READ ONLY the original compilation unit is in read only mode ul public I Java Model Status verify Compilation Unit cu get Compilation Unit if cu is Working Copy return new Java Model Status I Java Model Status Constants INVALID ELEMENT TYPES cu if cu has Resource Changed this force return new Java Model Status I Java Model Status Constants UPDATE CONFLICT no read only check since some repository adapters can change the flag on save operation return Java Model Status VERIFIED OK  INVALID_ELEMENT_TYPES ELEMENT_NOT_PRESENT UPDATE_CONFLICT READ_ONLY IJavaModelStatus CompilationUnit getCompilationUnit isWorkingCopy JavaModelStatus IJavaModelStatusConstants INVALID_ELEMENT_TYPES hasResourceChanged JavaModelStatus IJavaModelStatusConstants UPDATE_CONFLICT JavaModelStatus VERIFIED_OK

Constructs a handle to a compilation unit with the given name in the specified package for the specified owner exception Illegal Argument Exception if the name of the compilation unit does not end with java protected Compilation Unit Package Fragment parent String name Working Copy Owner owner super parent name this owner owner  IllegalArgumentException CompilationUnit PackageFragment WorkingCopyOwner
Accepts the given visitor onto the parsed tree of this compilation unit after having runned the name resolution The visitor s corresponding code visit code method is called with the corresponding parse tree If the visitor returns code true code this method visits this parse node s members param visitor the visitor exception Java Model Exception if this method fails Reasons include ul li This element does not exist li li The visitor failed with this exception li ul public void accept AST Visitor visitor throws Java Model Exception Compilation Unit Visitor visit this visitor  JavaModelException ASTVisitor JavaModelException CompilationUnitVisitor
public void become Working Copy I Problem Requestor problem Requestor I Progress Monitor monitor throws Java Model Exception Java Model Manager manager Java Model Manager get Java Model Manager Java Model Manager Per Working Copy Info per Working Copy Info manager get Per Working Copy Info this false don t create true record usage null no problem requestor needed if per Working Copy Info null close cu and its children close Become Working Copy Operation operation new Become Working Copy Operation this problem Requestor operation run Operation monitor  becomeWorkingCopy IProblemRequestor problemRequestor IProgressMonitor JavaModelException JavaModelManager JavaModelManager getJavaModelManager JavaModelManager PerWorkingCopyInfo perWorkingCopyInfo getPerWorkingCopyInfo perWorkingCopyInfo BecomeWorkingCopyOperation BecomeWorkingCopyOperation problemRequestor runOperation
requestor parser parser Compilation Unit Declaration unit parser parse Compilation Unit new org eclipse jdt internal compiler env I Compilation Unit public char get Contents return contents  CompilationUnitDeclaration parseCompilationUnit ICompilationUnit getContents
return contents public char get Main Type Name return Compilation Unit this get Main Type Name  getMainTypeName CompilationUnit getMainTypeName
return Compilation Unit this get Main Type Name public char get Package Name return Compilation Unit this get Package Name  CompilationUnit getMainTypeName getPackageName CompilationUnit getPackageName
return Compilation Unit this get Package Name public char get File Name return Compilation Unit this get File Name  CompilationUnit getPackageName getFileName CompilationUnit getFileName
protected boolean build Structure Openable Element Info info final I Progress Monitor pm Map new Elements I Resource underlying Resource throws Java Model Exception check if this compilation unit can be opened if is Working Copy no check is done on root kind or exclusion pattern for working copies if I Package Fragment get Parent get Kind I Package Fragment Root K BINARY is Valid Compilation Unit underlying Resource is Accessible throw new Not Present Exception prevents reopening of non primary working copies they are closed when they are discarded and should not be reopened if is Primary get Per Working Copy Info null throw new Not Present Exception Compilation Unit Element Info unit Info Compilation Unit Element Info info get buffer contents I Buffer buffer get Buffer Manager get Buffer Compilation Unit this if buffer null buffer open Buffer pm unit Info open buffer independently from the info since we are building the info final char contents buffer null null buffer get Characters generate structure and compute syntax problems if needed Compilation Unit Structure Requestor requestor new Compilation Unit Structure Requestor this unit Info new Elements Java Model Manager Per Working Copy Info per Working Copy Info get Per Working Copy Info I Java Project project get Java Project boolean compute Problems Java Project has Java Nature project get Project per Working Copy Info null per Working Copy Info is Active I Problem Factory problem Factory new Default Problem Factory Map options project get Options true Source Element Parser parser new Source Element Parser requestor problem Factory new Compiler Options options true report local declarations parser report Only One Syntax Error compute Problems requestor parser parser Compilation Unit Declaration unit parser parse Compilation Unit new org eclipse jdt internal compiler env I Compilation Unit public char get Contents return contents public char get Main Type Name return Compilation Unit this get Main Type Name public char get Package Name return Compilation Unit this get Package Name public char get File Name return Compilation Unit this get File Name true full parse to find local elements update timestamp might be I Resource NULL STAMP if original does not exist if underlying Resource null underlying Resource get Resource unit Info timestamp I File underlying Resource get Modification Stamp compute other problems if needed Compilation Unit Declaration compilation Unit Declaration null try if compute Problems per Working Copy Info begin Reporting compilation Unit Declaration Compilation Unit Problem Finder process unit this contents parser this owner per Working Copy Info problem Factory false don t cleanup cu pm per Working Copy Info end Reporting if info instanceof AST HolderCU Info int ast Level AST HolderCU Info info ast Level org eclipse jdt core dom Compilation Unit cu AST convert Compilation Unit ast Level unit contents options compute Problems pm AST HolderCU Info info ast cu finally if compilation Unit Declaration null compilation Unit Declaration clean Up return unit Info is Structure Known  buildStructure OpenableElementInfo IProgressMonitor newElements IResource underlyingResource JavaModelException isWorkingCopy IPackageFragment getParent getKind IPackageFragmentRoot K_BINARY isValidCompilationUnit underlyingResource isAccessible newNotPresentException isPrimary getPerWorkingCopyInfo newNotPresentException CompilationUnitElementInfo unitInfo CompilationUnitElementInfo IBuffer getBufferManager getBuffer CompilationUnit openBuffer unitInfo getCharacters CompilationUnitStructureRequestor CompilationUnitStructureRequestor unitInfo newElements JavaModelManager PerWorkingCopyInfo perWorkingCopyInfo getPerWorkingCopyInfo IJavaProject getJavaProject computeProblems JavaProject hasJavaNature getProject perWorkingCopyInfo perWorkingCopyInfo isActive IProblemFactory problemFactory DefaultProblemFactory getOptions SourceElementParser SourceElementParser problemFactory CompilerOptions reportOnlyOneSyntaxError computeProblems CompilationUnitDeclaration parseCompilationUnit ICompilationUnit getContents getMainTypeName CompilationUnit getMainTypeName getPackageName CompilationUnit getPackageName getFileName CompilationUnit getFileName IResource NULL_STAMP underlyingResource underlyingResource getResource unitInfo IFile underlyingResource getModificationStamp CompilationUnitDeclaration compilationUnitDeclaration computeProblems perWorkingCopyInfo beginReporting compilationUnitDeclaration CompilationUnitProblemFinder perWorkingCopyInfo problemFactory perWorkingCopyInfo endReporting ASTHolderCUInfo astLevel ASTHolderCUInfo astLevel CompilationUnit convertCompilationUnit astLevel computeProblems ASTHolderCUInfo compilationUnitDeclaration compilationUnitDeclaration cleanUp unitInfo isStructureKnown
see Openable can Be Removed From Cache public boolean can Be Removed From Cache if get Per Working Copy Info null return false working copies should remain in the cache until they are destroyed return super can Be Removed From Cache  canBeRemovedFromCache canBeRemovedFromCache getPerWorkingCopyInfo canBeRemovedFromCache
see Openable can Buffer Be Removed From Cache public boolean can Buffer Be Removed From Cache I Buffer buffer if get Per Working Copy Info null return false working copy buffers should remain in the cache until working copy is destroyed return super can Buffer Be Removed From Cache buffer  canBufferBeRemovedFromCache canBufferBeRemovedFromCache IBuffer getPerWorkingCopyInfo canBufferBeRemovedFromCache
see I Openable close public void close throws Java Model Exception if get Per Working Copy Info null return a working copy must remain opened until it is discarded super close  IOpenable JavaModelException getPerWorkingCopyInfo
protected void closing Object info if get Per Working Copy Info null super closing info else the buffer of a working copy must remain open for the lifetime of the working copy  getPerWorkingCopyInfo
see I Code Assist code Complete int I Completion Requestor public void code Complete int offset I Completion Requestor requestor throws Java Model Exception code Complete offset requestor Default Working Copy Owner PRIMARY  ICodeAssist codeComplete ICompletionRequestor codeComplete ICompletionRequestor JavaModelException codeComplete DefaultWorkingCopyOwner
see I Code Assist code Complete int I Completion Requestor Working Copy Owner public void code Complete int offset I Completion Requestor requestor Working Copy Owner working Copy Owner throws Java Model Exception code Complete this is Working Copy org eclipse jdt internal compiler env I Compilation Unit get Original Element this offset requestor working Copy Owner  ICodeAssist codeComplete ICompletionRequestor WorkingCopyOwner codeComplete ICompletionRequestor WorkingCopyOwner workingCopyOwner JavaModelException codeComplete isWorkingCopy ICompilationUnit getOriginalElement workingCopyOwner
offset new I Completion Requestor public void accept Anonymous Type char super Type Package Name char super Type Name char parameter Package Names char parameter Type Names char parameter Names char completion Name int modifiers int completion Start int completion End int relevance ignore  ICompletionRequestor acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart completionEnd
ignore public void accept Class char package Name char class Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Class package Name class Name completion Name modifiers completion Start completion End  acceptClass packageName className completionName completionStart completionEnd acceptClass packageName className completionName completionStart completionEnd
public void accept Error I Problem error if true return was disabled in 1 0 try I Marker marker Resources Plugin get Workspace get Root create Marker I Java Model Marker TRANSIENT PROBLEM marker set Attribute I Java Model Marker ID error getID marker set Attribute I Marker CHAR START error get Source Start marker set Attribute I Marker CHAR END error get Source End 1 marker set Attribute I Marker LINE NUMBER error get Source Line Number marker set Attribute I Marker MESSAGE error get Message marker set Attribute I Marker SEVERITY I Marker SEVERITY ERROR requestor accept Error marker catch Core Exception e ignore  acceptError IProblem IMarker ResourcesPlugin getWorkspace getRoot createMarker IJavaModelMarker TRANSIENT_PROBLEM setAttribute IJavaModelMarker setAttribute IMarker CHAR_START getSourceStart setAttribute IMarker CHAR_END getSourceEnd setAttribute IMarker LINE_NUMBER getSourceLineNumber setAttribute IMarker getMessage setAttribute IMarker IMarker SEVERITY_ERROR acceptError CoreException
public void accept Field char declaring Type Package Name char declaring Type Name char field Name char type Package Name char type Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Field declaring Type Package Name declaring Type Name field Name type Package Name type Name completion Name modifiers completion Start completion End  acceptField declaringTypePackageName declaringTypeName fieldName typePackageName typeName completionName completionStart completionEnd acceptField declaringTypePackageName declaringTypeName fieldName typePackageName typeName completionName completionStart completionEnd
requestor accept Field declaring Type Package Name declaring Type Name field Name type Package Name type Name completion Name modifiers completion Start completion End public void accept Interface char package Name char interface Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Interface package Name interface Name completion Name modifiers completion Start completion End  acceptField declaringTypePackageName declaringTypeName fieldName typePackageName typeName completionName completionStart completionEnd acceptInterface packageName interfaceName completionName completionStart completionEnd acceptInterface packageName interfaceName completionName completionStart completionEnd
requestor accept Interface package Name interface Name completion Name modifiers completion Start completion End public void accept Keyword char keyword Name int completion Start int completion End int relevance requestor accept Keyword keyword Name completion Start completion End  acceptInterface packageName interfaceName completionName completionStart completionEnd acceptKeyword keywordName completionStart completionEnd acceptKeyword keywordName completionStart completionEnd
requestor accept Keyword keyword Name completion Start completion End public void accept Label char label Name int completion Start int completion End int relevance requestor accept Label label Name completion Start completion End  acceptKeyword keywordName completionStart completionEnd acceptLabel labelName completionStart completionEnd acceptLabel labelName completionStart completionEnd
requestor accept Label label Name completion Start completion End public void accept Local Variable char local Var Name char type Package Name char type Name int modifiers int completion Start int completion End int relevance ignore  acceptLabel labelName completionStart completionEnd acceptLocalVariable localVarName typePackageName typeName completionStart completionEnd
ignore public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance skip parameter names requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names return Type Package Name return Type Name completion Name modifiers completion Start completion End  acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames returnTypePackageName returnTypeName completionName completionStart completionEnd
requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names return Type Package Name return Type Name completion Name modifiers completion Start completion End public void accept Method Declaration char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance ignore  acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd
ignore public void accept Modifier char modifier Name int completion Start int completion End int relevance requestor accept Modifier modifier Name completion Start completion End  acceptModifier modifierName completionStart completionEnd acceptModifier modifierName completionStart completionEnd
requestor accept Modifier modifier Name completion Start completion End public void accept Package char package Name char completion Name int completion Start int completion End int relevance requestor accept Package package Name completion Name completion Start completion End  acceptModifier modifierName completionStart completionEnd acceptPackage packageName completionName completionStart completionEnd acceptPackage packageName completionName completionStart completionEnd
requestor accept Package package Name completion Name completion Start completion End public void accept Type char package Name char type Name char completion Name int completion Start int completion End int relevance requestor accept Type package Name type Name completion Name completion Start completion End  acceptPackage packageName completionName completionStart completionEnd acceptType packageName typeName completionName completionStart completionEnd acceptType packageName typeName completionName completionStart completionEnd
requestor accept Type package Name type Name completion Name completion Start completion End public void accept Variable Name char type Package Name char type Name char var Name char completion Name int completion Start int completion End int relevance ignore  acceptType packageName typeName completionName completionStart completionEnd acceptVariableName typePackageName typeName varName completionName completionStart completionEnd
see I Code Assist code Complete int I Code Completion Requestor deprecated use code Complete int I Completion Requestor public void code Complete int offset final I Code Completion Requestor requestor throws Java Model Exception if requestor null code Complete offset I Completion Requestor null return code Complete offset new I Completion Requestor public void accept Anonymous Type char super Type Package Name char super Type Name char parameter Package Names char parameter Type Names char parameter Names char completion Name int modifiers int completion Start int completion End int relevance ignore public void accept Class char package Name char class Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Class package Name class Name completion Name modifiers completion Start completion End public void accept Error I Problem error if true return was disabled in 1 0 try I Marker marker Resources Plugin get Workspace get Root create Marker I Java Model Marker TRANSIENT PROBLEM marker set Attribute I Java Model Marker ID error getID marker set Attribute I Marker CHAR START error get Source Start marker set Attribute I Marker CHAR END error get Source End 1 marker set Attribute I Marker LINE NUMBER error get Source Line Number marker set Attribute I Marker MESSAGE error get Message marker set Attribute I Marker SEVERITY I Marker SEVERITY ERROR requestor accept Error marker catch Core Exception e ignore public void accept Field char declaring Type Package Name char declaring Type Name char field Name char type Package Name char type Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Field declaring Type Package Name declaring Type Name field Name type Package Name type Name completion Name modifiers completion Start completion End public void accept Interface char package Name char interface Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Interface package Name interface Name completion Name modifiers completion Start completion End public void accept Keyword char keyword Name int completion Start int completion End int relevance requestor accept Keyword keyword Name completion Start completion End public void accept Label char label Name int completion Start int completion End int relevance requestor accept Label label Name completion Start completion End public void accept Local Variable char local Var Name char type Package Name char type Name int modifiers int completion Start int completion End int relevance ignore public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance skip parameter names requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names return Type Package Name return Type Name completion Name modifiers completion Start completion End public void accept Method Declaration char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance ignore public void accept Modifier char modifier Name int completion Start int completion End int relevance requestor accept Modifier modifier Name completion Start completion End public void accept Package char package Name char completion Name int completion Start int completion End int relevance requestor accept Package package Name completion Name completion Start completion End public void accept Type char package Name char type Name char completion Name int completion Start int completion End int relevance requestor accept Type package Name type Name completion Name completion Start completion End public void accept Variable Name char type Package Name char type Name char var Name char completion Name int completion Start int completion End int relevance ignore  ICodeAssist codeComplete ICodeCompletionRequestor codeComplete ICompletionRequestor codeComplete ICodeCompletionRequestor JavaModelException codeComplete ICompletionRequestor codeComplete ICompletionRequestor acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart completionEnd acceptClass packageName className completionName completionStart completionEnd acceptClass packageName className completionName completionStart completionEnd acceptError IProblem IMarker ResourcesPlugin getWorkspace getRoot createMarker IJavaModelMarker TRANSIENT_PROBLEM setAttribute IJavaModelMarker setAttribute IMarker CHAR_START getSourceStart setAttribute IMarker CHAR_END getSourceEnd setAttribute IMarker LINE_NUMBER getSourceLineNumber setAttribute IMarker getMessage setAttribute IMarker IMarker SEVERITY_ERROR acceptError CoreException acceptField declaringTypePackageName declaringTypeName fieldName typePackageName typeName completionName completionStart completionEnd acceptField declaringTypePackageName declaringTypeName fieldName typePackageName typeName completionName completionStart completionEnd acceptInterface packageName interfaceName completionName completionStart completionEnd acceptInterface packageName interfaceName completionName completionStart completionEnd acceptKeyword keywordName completionStart completionEnd acceptKeyword keywordName completionStart completionEnd acceptLabel labelName completionStart completionEnd acceptLabel labelName completionStart completionEnd acceptLocalVariable localVarName typePackageName typeName completionStart completionEnd acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptModifier modifierName completionStart completionEnd acceptModifier modifierName completionStart completionEnd acceptPackage packageName completionName completionStart completionEnd acceptPackage packageName completionName completionStart completionEnd acceptType packageName typeName completionName completionStart completionEnd acceptType packageName typeName completionName completionStart completionEnd acceptVariableName typePackageName typeName varName completionName completionStart completionEnd
see org eclipse jdt core I Code Assist code Complete int org eclipse jdt core Completion Requestor public void code Complete int offset Completion Requestor requestor throws Java Model Exception TODO jerome Missing implementation throw new Runtime Exception Not implemented yet NON NLS 1  ICodeAssist codeComplete CompletionRequestor codeComplete CompletionRequestor JavaModelException RuntimeException
see org eclipse jdt core I Code Assist code Complete int org eclipse jdt core Completion Requestor org eclipse jdt core Working Copy Owner public void code Complete int offset Completion Requestor requestor Working Copy Owner wcowner throws Java Model Exception TODO jerome Missing implementation throw new Runtime Exception Not implemented yet NON NLS 1  ICodeAssist codeComplete CompletionRequestor WorkingCopyOwner codeComplete CompletionRequestor WorkingCopyOwner JavaModelException RuntimeException
see I Code Assist code Select int int public I Java Element code Select int offset int length throws Java Model Exception return code Select offset length Default Working Copy Owner PRIMARY  ICodeAssist codeSelect IJavaElement codeSelect JavaModelException codeSelect DefaultWorkingCopyOwner
see I Code Assist code Select int int Working Copy Owner public I Java Element code Select int offset int length Working Copy Owner working Copy Owner throws Java Model Exception return super code Select this offset length working Copy Owner  ICodeAssist codeSelect WorkingCopyOwner IJavaElement codeSelect WorkingCopyOwner workingCopyOwner JavaModelException codeSelect workingCopyOwner
see I Working Copy commit boolean I Progress Monitor deprecated public void commit boolean force I Progress Monitor monitor throws Java Model Exception commit Working Copy force monitor  IWorkingCopy IProgressMonitor IProgressMonitor JavaModelException commitWorkingCopy
see I Compilation Unit commit Working Copy boolean I Progress Monitor public void commit Working Copy boolean force I Progress Monitor monitor throws Java Model Exception Commit Working Copy Operation op new Commit Working Copy Operation this force op run Operation monitor  ICompilationUnit commitWorkingCopy IProgressMonitor commitWorkingCopy IProgressMonitor JavaModelException CommitWorkingCopyOperation CommitWorkingCopyOperation runOperation
see I Source Manipulation copy I Java Element I Java Element String boolean I Progress Monitor public void copy I Java Element container I Java Element sibling String rename boolean force I Progress Monitor monitor throws Java Model Exception if container null throw new Illegal Argument Exception Util bind operation null Container NON NLS 1 I Java Element elements new I Java Element this I Java Element containers new I Java Element container String renamings null if rename null renamings new String rename get Java Model copy elements containers null renamings force monitor  ISourceManipulation IJavaElement IJavaElement IProgressMonitor IJavaElement IJavaElement IProgressMonitor JavaModelException IllegalArgumentException nullContainer IJavaElement IJavaElement IJavaElement IJavaElement getJavaModel
Returns a new element info for this element protected Object create Element Info return new Compilation Unit Element Info  createElementInfo CompilationUnitElementInfo
see I Compilation Unit create Import String I Java Element I Progress Monitor public I Import Declaration create Import String import Name I Java Element sibling I Progress Monitor monitor throws Java Model Exception return create Import import Name sibling Flags Acc Default monitor  ICompilationUnit createImport IJavaElement IProgressMonitor IImportDeclaration createImport importName IJavaElement IProgressMonitor JavaModelException createImport importName AccDefault
see I Compilation Unit create Import String I Java Element int I Progress Monitor since 3 0 public I Import Declaration create Import String import Name I Java Element sibling int flags I Progress Monitor monitor throws Java Model Exception TODO jerome consult flags to create static imports Create Import Operation op new Create Import Operation import Name this if sibling null op create Before sibling op run Operation monitor return get Import import Name  ICompilationUnit createImport IJavaElement IProgressMonitor IImportDeclaration createImport importName IJavaElement IProgressMonitor JavaModelException CreateImportOperation CreateImportOperation importName createBefore runOperation getImport importName
see I Compilation Unit create Package Declaration String I Progress Monitor public I Package Declaration create Package Declaration String pkg I Progress Monitor monitor throws Java Model Exception Create Package Declaration Operation op new Create Package Declaration Operation pkg this op run Operation monitor return get Package Declaration pkg  ICompilationUnit createPackageDeclaration IProgressMonitor IPackageDeclaration createPackageDeclaration IProgressMonitor JavaModelException CreatePackageDeclarationOperation CreatePackageDeclarationOperation runOperation getPackageDeclaration
see I Compilation Unit create Type String I Java Element boolean I Progress Monitor public I Type create Type String content I Java Element sibling boolean force I Progress Monitor monitor throws Java Model Exception if exists autogenerate this compilation unit I Package Fragment pkg I Package Fragment get Parent String source NON NLS 1 if pkg get Element Name length 0 not the default package add the package declaration source package pkg get Element Name org eclipse jdt internal compiler util Util LINE SEPARATOR org eclipse jdt internal compiler util Util LINE SEPARATOR NON NLS 1 NON NLS 2 Create Compilation Unit Operation op new Create Compilation Unit Operation pkg this name source force op run Operation monitor Create Type Operation op new Create Type Operation this content force if sibling null op create Before sibling op run Operation monitor return I Type op get Result Elements 0  ICompilationUnit createType IJavaElement IProgressMonitor IType createType IJavaElement IProgressMonitor JavaModelException IPackageFragment IPackageFragment getParent getElementName getElementName LINE_SEPARATOR LINE_SEPARATOR CreateCompilationUnitOperation CreateCompilationUnitOperation runOperation CreateTypeOperation CreateTypeOperation createBefore runOperation IType getResultElements
see I Source Manipulation delete boolean I Progress Monitor public void delete boolean force I Progress Monitor monitor throws Java Model Exception I Java Element elements new I Java Element this get Java Model delete elements force monitor  ISourceManipulation IProgressMonitor IProgressMonitor JavaModelException IJavaElement IJavaElement getJavaModel
see I Working Copy destroy deprecated public void destroy try discard Working Copy catch Java Model Exception e e print Stack Trace  IWorkingCopy discardWorkingCopy JavaModelException printStackTrace
public void discard Working Copy throws Java Model Exception discard working copy and its children Discard Working Copy Operation op new Discard Working Copy Operation this op run Operation null  discardWorkingCopy JavaModelException DiscardWorkingCopyOperation DiscardWorkingCopyOperation runOperation
Returns true if this handle represents the same Java element as the given handle see Object equals java lang Object public boolean equals Object obj if obj instanceof Compilation Unit return false Compilation Unit other Compilation Unit obj return this owner equals other owner super equals obj  CompilationUnit CompilationUnit CompilationUnit
see Java Element equalsDOM Node IDOM Node deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected boolean equalsDOM Node IDOM Node node String element Name get Element Name if node get Node Type IDOM Node COMPILATION UNIT element Name null String node Name node get Name if node Name null return false if element Name equals node Name return true else try iterate through all the types inside the receiver and see if one of them can fit I Type types get Types String type Node Name node Name substring 0 node Name index Of SUFFIX STRING java for int i 0 max types length i max i if types i get Element Name equals type Node Name return true catch Java Model Exception e return false return false  JavaElement equalsDOMNode IDOMNode equalsDOMNode IDOMNode elementName getElementName getNodeType IDOMNode COMPILATION_UNIT elementName nodeName getName nodeName elementName nodeName IType getTypes typeNodeName nodeName nodeName indexOf SUFFIX_STRING_java getElementName typeNodeName JavaModelException
public boolean exists working copy always exists in the model until it is gotten rid of even if not on classpath if get Per Working Copy Info null return true if not a working copy it exists only if it is a primary compilation unit return is Primary super exists is Valid Compilation Unit  getPerWorkingCopyInfo isPrimary isValidCompilationUnit
see I Compilation Unit find Elements I Java Element public I Java Element find Elements I Java Element element Array List children new Array List while element null element get Element Type I Java Element COMPILATION UNIT children add element element element get Parent if element null return null I Java Element current Element this for int i children size 1 i 0 i Java Element child Java Element children get i switch child get Element Type case I Java Element PACKAGE DECLARATION current Element I Compilation Unit current Element get Package Declaration child get Element Name break case I Java Element IMPORT CONTAINER current Element I Compilation Unit current Element get Import Container break case I Java Element IMPORT DECLARATION current Element I Import Container current Element get Import child get Element Name break case I Java Element TYPE switch current Element get Element Type case I Java Element COMPILATION UNIT current Element I Compilation Unit current Element get Type child get Element Name break case I Java Element TYPE current Element I Type current Element get Type child get Element Name break case I Java Element FIELD case I Java Element INITIALIZER case I Java Element METHOD current Element I Member current Element get Type child get Element Name child occurrence Count break break case I Java Element INITIALIZER current Element I Type current Element get Initializer child occurrence Count break case I Java Element FIELD current Element I Type current Element get Field child get Element Name break case I Java Element METHOD current Element I Type current Element get Method child get Element Name I Method child get Parameter Types break if current Element null current Element exists return new I Java Element current Element else return null  ICompilationUnit findElements IJavaElement IJavaElement findElements IJavaElement ArrayList ArrayList getElementType IJavaElement COMPILATION_UNIT getParent IJavaElement currentElement JavaElement JavaElement getElementType IJavaElement PACKAGE_DECLARATION currentElement ICompilationUnit currentElement getPackageDeclaration getElementName IJavaElement IMPORT_CONTAINER currentElement ICompilationUnit currentElement getImportContainer IJavaElement IMPORT_DECLARATION currentElement IImportContainer currentElement getImport getElementName IJavaElement currentElement getElementType IJavaElement COMPILATION_UNIT currentElement ICompilationUnit currentElement getType getElementName IJavaElement currentElement IType currentElement getType getElementName IJavaElement IJavaElement IJavaElement currentElement IMember currentElement getType getElementName occurrenceCount IJavaElement currentElement IType currentElement getInitializer occurrenceCount IJavaElement currentElement IType currentElement getField getElementName IJavaElement currentElement IType currentElement getMethod getElementName IMethod getParameterTypes currentElement currentElement IJavaElement currentElement
see I Compilation Unit find Primary Type public I Type find Primary Type String type Name Signature get Qualifier this get Element Name I Type primary Type this get Type type Name if primary Type exists return primary Type return null  ICompilationUnit findPrimaryType IType findPrimaryType typeName getQualifier getElementName IType primaryType getType typeName primaryType primaryType
see I Working Copy find Shared Working Copy I Buffer Factory deprecated public I Java Element find Shared Working Copy I Buffer Factory factory if factory is null default factory must be used if factory null factory this get Buffer Manager get Default Buffer Factory return find Working Copy Buffer Factory Wrapper create factory  IWorkingCopy findSharedWorkingCopy IBufferFactory IJavaElement findSharedWorkingCopy IBufferFactory getBufferManager getDefaultBufferFactory findWorkingCopy BufferFactoryWrapper
see I Compilation Unit find Working Copy Working Copy Owner public I Compilation Unit find Working Copy Working Copy Owner working Copy Owner Compilation Unit cu new Compilation Unit Package Fragment this parent get Element Name working Copy Owner if working Copy Owner Default Working Copy Owner PRIMARY return cu else must be a working copy Java Model Manager Per Working Copy Info per Working Copy Info cu get Per Working Copy Info if per Working Copy Info null return per Working Copy Info get Working Copy else return null  ICompilationUnit findWorkingCopy WorkingCopyOwner ICompilationUnit findWorkingCopy WorkingCopyOwner workingCopyOwner CompilationUnit CompilationUnit PackageFragment getElementName workingCopyOwner workingCopyOwner DefaultWorkingCopyOwner JavaModelManager PerWorkingCopyInfo perWorkingCopyInfo getPerWorkingCopyInfo perWorkingCopyInfo perWorkingCopyInfo getWorkingCopy
see I Compilation Unit get All Types public I Type get All Types throws Java Model Exception I Java Element types get Types int i Array List all Types new Array List types length Array List types To Traverse new Array List types length for i 0 i types length i types To Traverse add types i while types To Traverse is Empty I Type type I Type types To Traverse get 0 types To Traverse remove type all Types add type types type get Types for i 0 i types length i types To Traverse add types i I Type array Of All Types new I Type all Types size all Types to Array array Of All Types return array Of All Types  ICompilationUnit getAllTypes IType getAllTypes JavaModelException IJavaElement getTypes ArrayList allTypes ArrayList ArrayList typesToTraverse ArrayList typesToTraverse typesToTraverse isEmpty IType IType typesToTraverse typesToTraverse allTypes getTypes typesToTraverse IType arrayOfAllTypes IType allTypes allTypes toArray arrayOfAllTypes arrayOfAllTypes
see I Member get Compilation Unit public I Compilation Unit get Compilation Unit return this  IMember getCompilationUnit ICompilationUnit getCompilationUnit
see org eclipse jdt internal compiler env I Compilation Unit get Contents public char get Contents try I Buffer buffer this get Buffer return buffer null null buffer get Characters catch Java Model Exception e return Char Operation NO CHAR  ICompilationUnit getContents getContents IBuffer getBuffer getCharacters JavaModelException CharOperation NO_CHAR
A compilation unit has a corresponding resource unless it is contained in a jar see I Java Element get Corresponding Resource public I Resource get Corresponding Resource throws Java Model Exception I Package Fragment Root root I Package Fragment Root get Parent get Parent if root is Archive return null else return get Underlying Resource  IJavaElement getCorrespondingResource IResource getCorrespondingResource JavaModelException IPackageFragmentRoot IPackageFragmentRoot getParent getParent isArchive getUnderlyingResource
see I Compilation Unit get Element At int public I Java Element get Element At int position throws Java Model Exception I Java Element e get Source Element At position if e this return null else return e  ICompilationUnit getElementAt IJavaElement getElementAt JavaModelException IJavaElement getSourceElementAt
see I Java Element public int get Element Type return COMPILATION UNIT  IJavaElement getElementType COMPILATION_UNIT
return COMPILATION UNIT public char get File Name return get Element Name to Char Array  COMPILATION_UNIT getFileName getElementName toCharArray
public I Java Element get Handle From Memento String token Memento Tokenizer memento Working Copy Owner working Copy Owner switch token char At 0 case JEM COUNT return get Handle Updating Count From Memento memento working Copy Owner case JEM IMPORTDECLARATION Java Element container Java Element get Import Container return container get Handle From Memento token memento working Copy Owner case JEM PACKAGEDECLARATION String pkg Name memento next Token Java Element pkg Decl Java Element get Package Declaration pkg Name return pkg Decl get Handle From Memento memento working Copy Owner case JEM TYPE String type Name memento next Token Java Element type Java Element get Type type Name return type get Handle From Memento memento working Copy Owner return null  IJavaElement getHandleFromMemento MementoTokenizer WorkingCopyOwner workingCopyOwner charAt JEM_COUNT getHandleUpdatingCountFromMemento workingCopyOwner JEM_IMPORTDECLARATION JavaElement JavaElement getImportContainer getHandleFromMemento workingCopyOwner JEM_PACKAGEDECLARATION pkgName nextToken JavaElement pkgDecl JavaElement getPackageDeclaration pkgName pkgDecl getHandleFromMemento workingCopyOwner JEM_TYPE typeName nextToken JavaElement JavaElement getType typeName getHandleFromMemento workingCopyOwner
see Java Element get Handle Memento Delimiter protected char get Handle Memento Delimiter return Java Element JEM COMPILATIONUNIT  JavaElement getHandleMementoDelimiter getHandleMementoDelimiter JavaElement JEM_COMPILATIONUNIT
see I Compilation Unit get Import String public I Import Declaration get Import String import Name return new Import Declaration Import Container get Import Container import Name  ICompilationUnit getImport IImportDeclaration getImport importName ImportDeclaration ImportContainer getImportContainer importName
see I Compilation Unit get Import Container public I Import Container get Import Container return new Import Container this  ICompilationUnit getImportContainer IImportContainer getImportContainer ImportContainer
see I Compilation Unit get Imports public I Import Declaration get Imports throws Java Model Exception I Import Container container get Import Container if container exists I Java Element elements container get Children I Import Declaration imprts new I Import Declaration elements length System arraycopy elements 0 imprts 0 elements length return imprts else if exists throw new Not Present Exception else return new I Import Declaration 0  ICompilationUnit getImports IImportDeclaration getImports JavaModelException IImportContainer getImportContainer IJavaElement getChildren IImportDeclaration IImportDeclaration newNotPresentException IImportDeclaration
see org eclipse jdt internal compiler env I Compilation Unit get Main Type Name public char get Main Type Name String element Name get Element Name remove the java element Name element Name substring 0 element Name length 5 return element Name to Char Array  ICompilationUnit getMainTypeName getMainTypeName elementName getElementName elementName elementName elementName elementName toCharArray
see I Working Copy get Original I Java Element deprecated public I Java Element get Original I Java Element working Copy Element backward compatibility if is Working Copy return null Compilation Unit cu Compilation Unit working Copy Element get Ancestor COMPILATION UNIT if cu null this owner equals cu owner return null return working Copy Element get Primary Element  IWorkingCopy getOriginal IJavaElement IJavaElement getOriginal IJavaElement workingCopyElement isWorkingCopy CompilationUnit CompilationUnit workingCopyElement getAncestor COMPILATION_UNIT workingCopyElement getPrimaryElement
see I Working Copy get Original Element deprecated public I Java Element get Original Element backward compatibility if is Working Copy return null return get Primary Element  IWorkingCopy getOriginalElement IJavaElement getOriginalElement isWorkingCopy getPrimaryElement
see I Compilation Unit get Owner public Working Copy Owner get Owner return is Primary is Working Copy null this owner  ICompilationUnit getOwner WorkingCopyOwner getOwner isPrimary isWorkingCopy
see I Compilation Unit get Package Declaration String public I Package Declaration get Package Declaration String pkg return new Package Declaration this pkg  ICompilationUnit getPackageDeclaration IPackageDeclaration getPackageDeclaration PackageDeclaration
see I Compilation Unit get Package Declarations public I Package Declaration get Package Declarations throws Java Model Exception Array List list get Children Of Type PACKAGE DECLARATION I Package Declaration array new I Package Declaration list size list to Array array return array  ICompilationUnit getPackageDeclarations IPackageDeclaration getPackageDeclarations JavaModelException ArrayList getChildrenOfType PACKAGE_DECLARATION IPackageDeclaration IPackageDeclaration toArray
see org eclipse jdt internal compiler env I Compilation Unit get Package Name public char get Package Name return null  ICompilationUnit getPackageName getPackageName
see I Java Element get Path public I Path get Path Package Fragment Root root this get Package Fragment Root if root is Archive return root get Path else return this get Parent get Path append this get Element Name  IJavaElement getPath IPath getPath PackageFragmentRoot getPackageFragmentRoot isArchive getPath getParent getPath getElementName
Note the use count of the per working copy info is NOT incremented public Java Model Manager Per Working Copy Info get Per Working Copy Info return Java Model Manager get Java Model Manager get Per Working Copy Info this false don t create false don t record usage null no problem requestor needed  JavaModelManager PerWorkingCopyInfo getPerWorkingCopyInfo JavaModelManager getJavaModelManager getPerWorkingCopyInfo
see I Compilation Unit get Primary public I Compilation Unit get Primary return I Compilation Unit get Primary Element true  ICompilationUnit getPrimary ICompilationUnit getPrimary ICompilationUnit getPrimaryElement
see Java Element get Primary Element boolean public I Java Element get Primary Element boolean check Owner if check Owner is Primary return this return new Compilation Unit Package Fragment get Parent get Element Name Default Working Copy Owner PRIMARY  JavaElement getPrimaryElement IJavaElement getPrimaryElement checkOwner checkOwner isPrimary CompilationUnit PackageFragment getParent getElementName DefaultWorkingCopyOwner
see I Java Element get Resource public I Resource get Resource Package Fragment Root root this get Package Fragment Root if root is Archive return root get Resource else return I Container this get Parent get Resource get File new Path this get Element Name  IJavaElement getResource IResource getResource PackageFragmentRoot getPackageFragmentRoot isArchive getResource IContainer getParent getResource getFile getElementName
see I Source Reference get Source public String get Source throws Java Model Exception I Buffer buffer get Buffer if buffer null return NON NLS 1 return buffer get Contents  ISourceReference getSource getSource JavaModelException IBuffer getBuffer getContents
see I Source Reference get Source Range public I Source Range get Source Range throws Java Model Exception return Compilation Unit Element Info get Element Info get Source Range  ISourceReference getSourceRange ISourceRange getSourceRange JavaModelException CompilationUnitElementInfo getElementInfo getSourceRange
see I Compilation Unit get Type String public I Type get Type String type Name return new Source Type this type Name  ICompilationUnit getType IType getType typeName SourceType typeName
see I Compilation Unit get Types public I Type get Types throws Java Model Exception Array List list get Children Of Type TYPE I Type array new I Type list size list to Array array return array  ICompilationUnit getTypes IType getTypes JavaModelException ArrayList getChildrenOfType IType IType toArray
see I Java Element public I Resource get Underlying Resource throws Java Model Exception if is Working Copy is Primary return null return super get Underlying Resource  IJavaElement IResource getUnderlyingResource JavaModelException isWorkingCopy isPrimary getUnderlyingResource
see I Working Copy get Shared Working Copy I Progress Monitor I Buffer Factory I Problem Requestor deprecated public I Java Element get Shared Working Copy I Progress Monitor pm I Buffer Factory factory I Problem Requestor problem Requestor throws Java Model Exception if factory is null default factory must be used if factory null factory this get Buffer Manager get Default Buffer Factory return get Working Copy Buffer Factory Wrapper create factory problem Requestor pm  IWorkingCopy getSharedWorkingCopy IProgressMonitor IBufferFactory IProblemRequestor IJavaElement getSharedWorkingCopy IProgressMonitor IBufferFactory IProblemRequestor problemRequestor JavaModelException getBufferManager getDefaultBufferFactory getWorkingCopy BufferFactoryWrapper problemRequestor
see I Working Copy get Working Copy deprecated public I Java Element get Working Copy throws Java Model Exception return get Working Copy null  IWorkingCopy getWorkingCopy IJavaElement getWorkingCopy JavaModelException getWorkingCopy
see I Compilation Unit get Working Copy I Progress Monitor public I Compilation Unit get Working Copy I Progress Monitor monitor throws Java Model Exception return get Working Copy new Working Copy Owner non shared working copy null no problem requestor monitor  ICompilationUnit getWorkingCopy IProgressMonitor ICompilationUnit getWorkingCopy IProgressMonitor JavaModelException getWorkingCopy WorkingCopyOwner
see I Working Copy get Working Copy I Progress Monitor I Buffer Factory I Problem Requestor deprecated public I Java Element get Working Copy I Progress Monitor monitor I Buffer Factory factory I Problem Requestor problem Requestor throws Java Model Exception return get Working Copy Buffer Factory Wrapper create factory problem Requestor monitor  IWorkingCopy getWorkingCopy IProgressMonitor IBufferFactory IProblemRequestor IJavaElement getWorkingCopy IProgressMonitor IBufferFactory IProblemRequestor problemRequestor JavaModelException getWorkingCopy BufferFactoryWrapper problemRequestor
see I Compilation Unit get Working Copy Working Copy Owner I Problem Requestor I Progress Monitor public I Compilation Unit get Working Copy Working Copy Owner working Copy Owner I Problem Requestor problem Requestor I Progress Monitor monitor throws Java Model Exception if is Primary return this Java Model Manager manager Java Model Manager get Java Model Manager Compilation Unit working Copy new Compilation Unit Package Fragment get Parent get Element Name working Copy Owner Java Model Manager Per Working Copy Info per Working Copy Info manager get Per Working Copy Info working Copy false don t create true record usage null not used since don t create if per Working Copy Info null return per Working Copy Info get Working Copy return existing handle instead of the one created above Become Working Copy Operation op new Become Working Copy Operation working Copy problem Requestor op run Operation monitor return working Copy  ICompilationUnit getWorkingCopy WorkingCopyOwner IProblemRequestor IProgressMonitor ICompilationUnit getWorkingCopy WorkingCopyOwner workingCopyOwner IProblemRequestor problemRequestor IProgressMonitor JavaModelException isPrimary JavaModelManager JavaModelManager getJavaModelManager CompilationUnit workingCopy CompilationUnit PackageFragment getParent getElementName workingCopyOwner JavaModelManager PerWorkingCopyInfo perWorkingCopyInfo getPerWorkingCopyInfo workingCopy perWorkingCopyInfo perWorkingCopyInfo getWorkingCopy BecomeWorkingCopyOperation BecomeWorkingCopyOperation workingCopy problemRequestor runOperation workingCopy
see Openable has Buffer protected boolean has Buffer return true  hasBuffer hasBuffer
public boolean has Resource Changed if is Working Copy return false if resource got deleted then get Modification Stamp will answer I Resource NULL STAMP which is always different from the cached timestamp Object info Java Model Manager get Java Model Manager get Info this if info null return false return Compilation Unit Element Info info timestamp get Resource get Modification Stamp  hasResourceChanged isWorkingCopy getModificationStamp IResource NULL_STAMP JavaModelManager getJavaModelManager getInfo CompilationUnitElementInfo getResource getModificationStamp
see I Working Copy is Based On I Resource deprecated public boolean is Based On I Resource resource if is Working Copy return false if get Resource equals resource return false return has Resource Changed  IWorkingCopy isBasedOn IResource isBasedOn IResource isWorkingCopy getResource hasResourceChanged
see I Openable is Consistent public boolean is Consistent return Java Model Manager get Java Model Manager get Elements Out Of Synch With Buffers get this null  IOpenable isConsistent isConsistent JavaModelManager getJavaModelManager getElementsOutOfSynchWithBuffers
see I Openable public boolean is Open Object info Java Model Manager get Java Model Manager get Info this return info null Compilation Unit Element Info info is Open  IOpenable isOpen JavaModelManager getJavaModelManager getInfo CompilationUnitElementInfo isOpen
return info null Compilation Unit Element Info info is Open public boolean is Primary return this owner Default Working Copy Owner PRIMARY  CompilationUnitElementInfo isOpen isPrimary DefaultWorkingCopyOwner
see Openable is Source Element protected boolean is Source Element return true  isSourceElement isSourceElement
protected boolean is Valid Compilation Unit I Package Fragment Root root get Package Fragment Root try if root get Kind I Package Fragment Root K SOURCE return false catch Java Model Exception e return false I Resource resource get Resource if resource null char inclusion Patterns Package Fragment Root root full Inclusion Pattern Chars char exclusion Patterns Package Fragment Root root full Exclusion Pattern Chars if Util is Excluded resource inclusion Patterns exclusion Patterns return false if Util is Valid Compilation Unit Name get Element Name return false return true  isValidCompilationUnit IPackageFragmentRoot getPackageFragmentRoot getKind IPackageFragmentRoot K_SOURCE JavaModelException IResource getResource inclusionPatterns PackageFragmentRoot fullInclusionPatternChars exclusionPatterns PackageFragmentRoot fullExclusionPatternChars isExcluded inclusionPatterns exclusionPatterns isValidCompilationUnitName getElementName
public boolean is Working Copy For backward compatibility non primary working copies are always returning true in removal delta clients can still check that element was a working copy before being discarded return is Primary get Per Working Copy Info null  isWorkingCopy isPrimary getPerWorkingCopyInfo
see I Openable make Consistent I Progress Monitor public void make Consistent I Progress Monitor monitor throws Java Model Exception make Consistent false don t create AST 0 monitor  IOpenable makeConsistent IProgressMonitor makeConsistent IProgressMonitor JavaModelException makeConsistent
public org eclipse jdt core dom Compilation Unit make Consistent boolean createAST int ast Level I Progress Monitor monitor throws Java Model Exception if is Consistent return null create a new info and make it the current info this will remove the info and its children just before storing the new infos if createAST AST HolderCU Info info new AST HolderCU Info info ast Level ast Level open When Closed info monitor org eclipse jdt core dom Compilation Unit result info ast info ast null return result else open When Closed create Element Info monitor return null  CompilationUnit makeConsistent astLevel IProgressMonitor JavaModelException isConsistent ASTHolderCUInfo ASTHolderCUInfo astLevel astLevel openWhenClosed CompilationUnit openWhenClosed createElementInfo
see I Source Manipulation move I Java Element I Java Element String boolean I Progress Monitor public void move I Java Element container I Java Element sibling String rename boolean force I Progress Monitor monitor throws Java Model Exception if container null throw new Illegal Argument Exception Util bind operation null Container NON NLS 1 I Java Element elements new I Java Element this I Java Element containers new I Java Element container String renamings null if rename null renamings new String rename get Java Model move elements containers null renamings force monitor  ISourceManipulation IJavaElement IJavaElement IProgressMonitor IJavaElement IJavaElement IProgressMonitor JavaModelException IllegalArgumentException nullContainer IJavaElement IJavaElement IJavaElement IJavaElement getJavaModel
see Openable open Buffer I Progress Monitor Object protected I Buffer open Buffer I Progress Monitor pm Object info throws Java Model Exception create buffer boolean is Working Copy is Working Copy I Buffer buffer is Working Copy this owner create Buffer this Buffer Manager get Default Buffer Manager create Buffer this if buffer null return null set the buffer source if buffer get Characters null if is Working Copy I Compilation Unit original if is Primary original new Compilation Unit Package Fragment get Parent get Element Name Default Working Copy Owner PRIMARY is Open buffer set Contents original get Source else I File file I File get Resource if file null file exists initialize buffer with empty contents buffer set Contents Char Operation NO CHAR else buffer set Contents Util get Resource Contents As Char Array file else I File file I File this get Resource if file null file exists throw new Not Present Exception buffer set Contents Util get Resource Contents As Char Array file add buffer to buffer cache Buffer Manager buf Manager get Buffer Manager buf Manager add Buffer buffer listen to buffer changes buffer add Buffer Changed Listener this return buffer  openBuffer IProgressMonitor IBuffer openBuffer IProgressMonitor JavaModelException isWorkingCopy isWorkingCopy IBuffer isWorkingCopy createBuffer BufferManager getDefaultBufferManager createBuffer getCharacters isWorkingCopy ICompilationUnit isPrimary CompilationUnit PackageFragment getParent getElementName DefaultWorkingCopyOwner isOpen setContents getSource IFile IFile getResource setContents CharOperation NO_CHAR setContents getResourceContentsAsCharArray IFile IFile getResource newNotPresentException setContents getResourceContentsAsCharArray BufferManager bufManager getBufferManager bufManager addBuffer addBufferChangedListener
protected void open Parent Object child Info Hash Map new Elements I Progress Monitor pm throws Java Model Exception try super open Parent child Info new Elements pm catch Java Model Exception e allow parent to not exist for working copies defined outside classpath if is Working Copy e is Does Not Exist throw e  openParent childInfo HashMap newElements IProgressMonitor JavaModelException openParent childInfo newElements JavaModelException isWorkingCopy isDoesNotExist
see I Compilation Unit reconcile deprecated public I Marker reconcile throws Java Model Exception reconcile NO AST false don t force problem detection null use primary owner null no progress monitor return null  ICompilationUnit IMarker JavaModelException NO_AST
see I Compilation Unit reconcile int boolean Working Copy Owner I Progress Monitor public void reconcile boolean force Problem Detection I Progress Monitor monitor throws Java Model Exception reconcile NO AST force Problem Detection null use primary owner monitor  ICompilationUnit WorkingCopyOwner IProgressMonitor forceProblemDetection IProgressMonitor JavaModelException NO_AST forceProblemDetection
see I Compilation Unit reconcile int boolean Working Copy Owner I Progress Monitor since 3 0 public org eclipse jdt core dom Compilation Unit reconcile int ast Level boolean force Problem Detection Working Copy Owner working Copy Owner I Progress Monitor monitor throws Java Model Exception if is Working Copy return null Reconciling is not supported on non working copies if working Copy Owner null working Copy Owner Default Working Copy Owner PRIMARY boolean createAST false if ast Level AST JLS2 client asking for level 2 AST these are supported createAST true else if ast Level AST JLS3 client asking for level 3 AS Ts these are not supported TODO jerome these should also be supported in 1 5 stream createAST false else client asking for no AST 0 or unknown ast level either way request denied createAST false Reconcile Working Copy Operation op new Reconcile Working Copy Operation this createAST ast Level force Problem Detection working Copy Owner op run Operation monitor return op ast  ICompilationUnit WorkingCopyOwner IProgressMonitor CompilationUnit astLevel forceProblemDetection WorkingCopyOwner workingCopyOwner IProgressMonitor JavaModelException isWorkingCopy workingCopyOwner workingCopyOwner DefaultWorkingCopyOwner astLevel astLevel ASTs ReconcileWorkingCopyOperation ReconcileWorkingCopyOperation astLevel forceProblemDetection workingCopyOwner runOperation
see I Source Manipulation rename String boolean I Progress Monitor public void rename String new Name boolean force I Progress Monitor monitor throws Java Model Exception if new Name null throw new Illegal Argument Exception Util bind operation null Name NON NLS 1 I Java Element elements new I Java Element this I Java Element dests new I Java Element this get Parent String renamings new String new Name get Java Model rename elements dests renamings force monitor  ISourceManipulation IProgressMonitor newName IProgressMonitor JavaModelException newName IllegalArgumentException nullName IJavaElement IJavaElement IJavaElement IJavaElement getParent newName getJavaModel
public void restore throws Java Model Exception if is Working Copy return Compilation Unit original Compilation Unit get Original Element I Buffer buffer this get Buffer if buffer null return buffer set Contents original get Contents update Time Stamp original make Consistent null  JavaModelException isWorkingCopy CompilationUnit CompilationUnit getOriginalElement IBuffer getBuffer setContents getContents updateTimeStamp makeConsistent
see I Openable public void save I Progress Monitor pm boolean force throws Java Model Exception if is Working Copy no need to save the buffer for a working copy this is a noop reconcile not simply make Consistent also computes fine grain deltas in case the working copy is being reconciled already if not it would miss one iteration of deltas else super save pm force  IOpenable IProgressMonitor JavaModelException isWorkingCopy makeConsistent
private Debugging purposes protected void to String Info int tab String Buffer buffer Object info if is Primary buffer append this tab String tab buffer append Working copy NON NLS 1 to String Name buffer else if is Working Copy buffer append this tab String tab buffer append Working copy NON NLS 1 to String Name buffer if info null buffer append not open NON NLS 1 else super to String Info tab buffer info  toStringInfo StringBuffer isPrimary tabString toStringName isWorkingCopy tabString toStringName toStringInfo
protected void update Time Stamp Compilation Unit original throws Java Model Exception long time Stamp I File original get Resource get Modification Stamp if time Stamp I Resource NULL STAMP throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID RESOURCE Compilation Unit Element Info get Element Info timestamp time Stamp  updateTimeStamp CompilationUnit JavaModelException timeStamp IFile getResource getModificationStamp timeStamp IResource NULL_STAMP JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_RESOURCE CompilationUnitElementInfo getElementInfo timeStamp

protected long timestamp Returns the length of the source string public int get Source Length return this source Length  getSourceLength sourceLength
return this source Length protected I Source Range get Source Range return new Source Range 0 this source Length  sourceLength ISourceRange getSourceRange SourceRange sourceLength
return new Source Range 0 this source Length protected boolean is Open return true  SourceRange sourceLength isOpen
Sets the length of the source string public void set Source Length int new Source Length this source Length new Source Length  setSourceLength newSourceLength sourceLength newSourceLength

Answer a new Compilation Unit Visitor using the given name environment and compiler options The environment and options will be in effect for the lifetime of the compiler When the compiler is run compilation results are sent to the given requestor param environment org eclipse jdt internal compiler api env I Name Environment Environment used by the compiler in order to resolve type and package names The name environment implements the actual connection of the compiler to the outside world e g in batch mode the name environment is performing pure file accesses reuse previous build state or connection to repositories Note the name environment is responsible for implementing the actual classpath rules param policy org eclipse jdt internal compiler api problem I Error Handling Policy Configurable part for problem handling allowing the compiler client to specify the rules for handling problems stop on first error or accumulate them all and at the same time perform some actions such as opening a dialog in UI when compiling interactively see org eclipse jdt internal compiler Default Error Handling Policies param settings The settings to use for the resolution param requestor org eclipse jdt internal compiler api I Compiler Requestor Component which will receive and persist all compilation results and is intended to consume them as they are produced Typically in a batch compiler it is responsible for writing out the actual class files to the file system see org eclipse jdt internal compiler Compilation Result param problem Factory org eclipse jdt internal compiler api problem I Problem Factory Factory used inside the compiler to create problem descriptors It allows the compiler client to supply its own representation of compilation problems in order to avoid object conversions Note that the factory is not supposed to accumulate the created problems the compiler will gather them all and hand them back as part of the compilation unit result protected Compilation Unit Problem Finder I Name Environment environment I Error Handling Policy policy Map settings I Compiler Requestor requestor I Problem Factory problem Factory super environment policy settings requestor problem Factory true  CompilationUnitVisitor INameEnvironment IErrorHandlingPolicy DefaultErrorHandlingPolicies ICompilerRequestor CompilationResult problemFactory IProblemFactory CompilationUnitProblemFinder INameEnvironment IErrorHandlingPolicy ICompilerRequestor IProblemFactory problemFactory problemFactory
Add additional source types public void accept I Source Type source Types Package Binding package Binding ensure to jump back to toplevel type for first one could be a member while source Types 0 get Enclosing Type null source Types 0 source Types 0 get Enclosing Type Compilation Result result new Compilation Result source Types 0 get File Name 1 1 this options max Problems Per Unit need to hold onto this Compilation Unit Declaration unit Source Type Converter build Compilation Unit source Types source Types 0 is always toplevel here Source Type Converter FIELD AND METHOD need field and methods Source Type Converter MEMBER TYPE need member types Source Type Converter FIELD INITIALIZATION need field initialization this lookup Environment problem Reporter result if unit null this lookup Environment build Type Bindings unit this lookup Environment complete Type Bindings unit  ISourceType sourceTypes PackageBinding packageBinding sourceTypes getEnclosingType sourceTypes sourceTypes getEnclosingType CompilationResult CompilationResult sourceTypes getFileName maxProblemsPerUnit CompilationUnitDeclaration SourceTypeConverter buildCompilationUnit sourceTypes sourceTypes SourceTypeConverter FIELD_AND_METHOD SourceTypeConverter MEMBER_TYPE SourceTypeConverter FIELD_INITIALIZATION lookupEnvironment problemReporter lookupEnvironment buildTypeBindings lookupEnvironment completeTypeBindings
Low level API performing the actual compilation protected static I Error Handling Policy get Handling Policy return Default Error Handling Policies proceed With All Problems  IErrorHandlingPolicy getHandlingPolicy DefaultErrorHandlingPolicies proceedWithAllProblems
protected static I Compiler Requestor get Requestor return new I Compiler Requestor public void accept Result Compilation Result compilation Result default requestor doesn t handle compilation results back  ICompilerRequestor getRequestor ICompilerRequestor acceptResult CompilationResult compilationResult
public static Compilation Unit Declaration process Compilation Unit Declaration unit I Compilation Unit unit Element char contents Parser parser Working Copy Owner working Copy Owner I Problem Requestor problem Requestor I Problem Factory problem Factory boolean cleanupCU I Progress Monitor monitor throws Java Model Exception char file Name unit Element get Element Name to Char Array Java Project project Java Project unit Element get Java Project Compilation Unit Problem Finder problem Finder new Compilation Unit Problem Finder project new Searchable Name Environment working Copy Owner get Handling Policy project get Options true get Requestor problem Factory if parser null problem Finder parser parser try I Package Fragment package Fragment I Package Fragment unit Element get Ancestor I Java Element PACKAGE FRAGMENT char expected Package Name null if package Fragment null expected Package Name Char Operation split On package Fragment get Element Name to Char Array if unit null unit problem Finder resolve new Basic Compilation Unit contents expected Package Name new String file Name unit Element true verify methods true analyze code true generate code else problem Finder resolve unit null no need for source true verify methods true analyze code true generate code report Problems unit problem Requestor monitor return unit catch Runtime Exception e avoid breaking other tools due to internal compiler failure 40334 Util log e Exception occurred during problem detection NON NLS 1 throw new Java Model Exception e I Java Model Status Constants COMPILER FAILURE finally if cleanupCU unit null unit clean Up problem Finder lookup Environment reset  CompilationUnitDeclaration CompilationUnitDeclaration ICompilationUnit unitElement WorkingCopyOwner workingCopyOwner IProblemRequestor problemRequestor IProblemFactory problemFactory IProgressMonitor JavaModelException fileName unitElement getElementName toCharArray JavaProject JavaProject unitElement getJavaProject CompilationUnitProblemFinder problemFinder CompilationUnitProblemFinder newSearchableNameEnvironment workingCopyOwner getHandlingPolicy getOptions getRequestor problemFactory problemFinder IPackageFragment packageFragment IPackageFragment unitElement getAncestor IJavaElement PACKAGE_FRAGMENT expectedPackageName packageFragment expectedPackageName CharOperation splitOn packageFragment getElementName toCharArray problemFinder BasicCompilationUnit expectedPackageName fileName unitElement problemFinder reportProblems problemRequestor RuntimeException JavaModelException IJavaModelStatusConstants COMPILER_FAILURE cleanUp problemFinder lookupEnvironment
public static Compilation Unit Declaration process I Compilation Unit unit Element char contents Working Copy Owner working Copy Owner I Problem Requestor problem Requestor boolean cleanupCU I Progress Monitor monitor throws Java Model Exception return process null no Compilation Unit Declaration unit Element contents null use default Parser working Copy Owner problem Requestor new Default Problem Factory cleanupCU monitor  CompilationUnitDeclaration ICompilationUnit unitElement WorkingCopyOwner workingCopyOwner IProblemRequestor problemRequestor IProgressMonitor JavaModelException CompilationUnitDeclaration unitElement workingCopyOwner problemRequestor DefaultProblemFactory
private static void report Problems Compilation Unit Declaration unit I Problem Requestor problem Requestor I Progress Monitor monitor Compilation Result unit Result unit compilation Result I Problem problems unit Result get All Problems for int i 0 problem Length problems null 0 problems length i problem Length i if Java Model Manager VERBOSE System out println PROBLEM FOUND while reconciling problems i get Message NON NLS 1 if monitor null monitor is Canceled break problem Requestor accept Problem problems i  reportProblems CompilationUnitDeclaration IProblemRequestor problemRequestor IProgressMonitor CompilationResult unitResult compilationResult IProblem unitResult getAllProblems problemLength problemLength JavaModelManager getMessage isCanceled problemRequestor acceptProblem
see org eclipse jdt internal compiler Compiler initialize Parser public void initialize Parser this parser new Comment Recorder Parser this problem Reporter this options parse Literal Expressions As Constants  initializeParser initializeParser CommentRecorderParser problemReporter parseLiteralExpressionsAsConstants

protected Compilation Unit Structure Requestor I Compilation Unit unit Compilation Unit Element Info unit Info Map new Elements this unit unit this unit Info unit Info this new Elements new Elements this source File Name unit get Element Name to Char Array  CompilationUnitStructureRequestor ICompilationUnit CompilationUnitElementInfo unitInfo newElements unitInfo unitInfo newElements newElements sourceFileName getElementName toCharArray
see I Source Element Requestor public void accept Import int declaration Start int declaration End char name boolean on Demand int modifiers Java Element Info parent Info Java Element Info this info Stack peek Java Element parent Handle Java Element this handle Stack peek if parent Handle get Element Type I Java Element COMPILATION UNIT Assert is True false Should not happen I Compilation Unit parentCU I Compilation Unit parent Handle create the import container and its info Import Container import Container Import Container parentCU get Import Container if this import Container Info null this import Container Info new Java Element Info this import Container Info set Is Structure Known true parent Info add Child import Container this new Elements put import Container this import Container Info tack on the if it is on Demand String import Name if on Demand import Name new String name NON NLS 1 else import Name new String name Import Declaration handle new Import Declaration import Container import Name resolve Duplicates handle Import Declaration Element Info info new Import Declaration Element Info info set Source Range Start declaration Start info set Source Range End declaration End info set Flags modifiers info set Name name no trailing if on Demand info set On Demand on Demand this import Container Info add Child handle this new Elements put handle info  ISourceElementRequestor acceptImport declarationStart declarationEnd onDemand JavaElementInfo parentInfo JavaElementInfo infoStack JavaElement parentHandle JavaElement handleStack parentHandle getElementType IJavaElement COMPILATION_UNIT isTrue ICompilationUnit ICompilationUnit parentHandle ImportContainer importContainer ImportContainer getImportContainer importContainerInfo importContainerInfo JavaElementInfo importContainerInfo setIsStructureKnown parentInfo addChild importContainer newElements importContainer importContainerInfo onDemand importName onDemand importName importName ImportDeclaration ImportDeclaration importContainer importName resolveDuplicates ImportDeclarationElementInfo ImportDeclarationElementInfo setSourceRangeStart declarationStart setSourceRangeEnd declarationEnd setFlags setName onDemand setOnDemand onDemand importContainerInfo addChild newElements
public void accept Line Separator Positions int positions ignore line separator positions  acceptLineSeparatorPositions
see I Source Element Requestor public void accept Package int declaration Start int declaration End char name Java Element Info parent Info Java Element Info this info Stack peek Java Element parent Handle Java Element this handle Stack peek I Package Declaration handle null this package Name name if parent Handle get Element Type I Java Element COMPILATION UNIT handle new Package Declaration Compilation Unit parent Handle new String name else Assert is True false Should not happen resolve Duplicates handle Source Ref Element Info info new Source Ref Element Info info set Source Range Start declaration Start info set Source Range End declaration End parent Info add Child handle this new Elements put handle info  ISourceElementRequestor acceptPackage declarationStart declarationEnd JavaElementInfo parentInfo JavaElementInfo infoStack JavaElement parentHandle JavaElement handleStack IPackageDeclaration packageName parentHandle getElementType IJavaElement COMPILATION_UNIT PackageDeclaration CompilationUnit parentHandle isTrue resolveDuplicates SourceRefElementInfo SourceRefElementInfo setSourceRangeStart declarationStart setSourceRangeEnd declarationEnd parentInfo addChild newElements
public void accept Problem I Problem problem if problem getID I Problem Syntax 0 this has Syntax Errors true  acceptProblem IProblem IProblem hasSyntaxErrors
Convert these type names to signatures see Signature default static String convert Type Names To Sigs char type Names if type Names null return NO STRINGS int n type Names length if n 0 return NO STRINGS String type Sigs new String n for int i 0 i n i type Sigs i Signature create Type Signature type Names i false return type Sigs  convertTypeNamesToSigs typeNames typeNames NO_STRINGS typeNames NO_STRINGS typeSigs typeSigs createTypeSignature typeNames typeSigs
see I Source Element Requestor public void enter Class int declaration Start int modifiers char name int name Source Start int name Source End char superclass char superinterfaces enter Type declaration Start modifiers name name Source Start name Source End superclass superinterfaces  ISourceElementRequestor enterClass declarationStart nameSourceStart nameSourceEnd enterType declarationStart nameSourceStart nameSourceEnd
see I Source Element Requestor public void enter Compilation Unit this info Stack new Stack this handle Stack new Stack this info Stack push this unit Info this handle Stack push this unit  ISourceElementRequestor enterCompilationUnit infoStack handleStack infoStack unitInfo handleStack
see I Source Element Requestor public void enter Constructor int declaration Start int modifiers char name int name Source Start int name Source End char parameter Types char parameter Names char exception Types enter Method declaration Start modifiers null name name Source Start name Source End parameter Types parameter Names exception Types true  ISourceElementRequestor enterConstructor declarationStart nameSourceStart nameSourceEnd parameterTypes parameterNames exceptionTypes enterMethod declarationStart nameSourceStart nameSourceEnd parameterTypes parameterNames exceptionTypes
see I Source Element Requestor public void enter Field int declaration Start int modifiers char type char name int name Source Start int name Source End Source Type Element Info parent Info Source Type Element Info this info Stack peek Java Element parent Handle Java Element this handle Stack peek I Field handle null if parent Handle get Element Type I Java Element TYPE handle new Source Field parent Handle new String name else Assert is True false Should not happen resolve Duplicates handle Source Field Element Info info new Source Field Element Info info set Name name info set Name Source Start name Source Start info set Name Source End name Source End info set Source Range Start declaration Start info set Flags modifiers info set Type Name type parent Info add Child handle this new Elements put handle info this info Stack push info this handle Stack push handle  ISourceElementRequestor enterField declarationStart nameSourceStart nameSourceEnd SourceTypeElementInfo parentInfo SourceTypeElementInfo infoStack JavaElement parentHandle JavaElement handleStack IField parentHandle getElementType IJavaElement SourceField parentHandle isTrue resolveDuplicates SourceFieldElementInfo SourceFieldElementInfo setName setNameSourceStart nameSourceStart setNameSourceEnd nameSourceEnd setSourceRangeStart declarationStart setFlags setTypeName parentInfo addChild newElements infoStack handleStack
see I Source Element Requestor public void enter Initializer int declaration Source Start int modifiers Java Element Info parent Info Java Element Info this info Stack peek Java Element parent Handle Java Element this handle Stack peek I Initializer handle null if parent Handle get Element Type I Java Element TYPE handle I Type parent Handle get Initializer 1 else Assert is True false Should not happen resolve Duplicates handle Initializer Element Info info new Initializer Element Info info set Source Range Start declaration Source Start info set Flags modifiers parent Info add Child handle this new Elements put handle info this info Stack push info this handle Stack push handle  ISourceElementRequestor enterInitializer declarationSourceStart JavaElementInfo parentInfo JavaElementInfo infoStack JavaElement parentHandle JavaElement handleStack IInitializer parentHandle getElementType IJavaElement IType parentHandle getInitializer isTrue resolveDuplicates InitializerElementInfo InitializerElementInfo setSourceRangeStart declarationSourceStart setFlags parentInfo addChild newElements infoStack handleStack
see I Source Element Requestor public void enter Interface int declaration Start int modifiers char name int name Source Start int name Source End char superinterfaces enter Type declaration Start modifiers name name Source Start name Source End null superinterfaces  ISourceElementRequestor enterInterface declarationStart nameSourceStart nameSourceEnd enterType declarationStart nameSourceStart nameSourceEnd
see I Source Element Requestor public void enter Method int declaration Start int modifiers char return Type char name int name Source Start int name Source End char parameter Types char parameter Names char exception Types enter Method declaration Start modifiers return Type name name Source Start name Source End parameter Types parameter Names exception Types false  ISourceElementRequestor enterMethod declarationStart returnType nameSourceStart nameSourceEnd parameterTypes parameterNames exceptionTypes enterMethod declarationStart returnType nameSourceStart nameSourceEnd parameterTypes parameterNames exceptionTypes
see I Source Element Requestor protected void enter Method int declaration Start int modifiers char return Type char name int name Source Start int name Source End char parameter Types char parameter Names char exception Types boolean is Constructor Source Type Element Info parent Info Source Type Element Info this info Stack peek Java Element parent Handle Java Element this handle Stack peek I Method handle null translate nulls to empty arrays if parameter Types null parameter Types Char Operation NO CHAR CHAR if parameter Names null parameter Names Char Operation NO CHAR CHAR if exception Types null exception Types Char Operation NO CHAR CHAR String parameter Type Sigs convert Type Names To Sigs parameter Types if parent Handle get Element Type I Java Element TYPE handle new Source Method parent Handle new String name parameter Type Sigs else Assert is True false Should not happen resolve Duplicates handle Source Method Element Info info new Source Method Element Info info set Source Range Start declaration Start int flags modifiers info set Name name info set Name Source Start name Source Start info set Name Source End name Source End info set Constructor is Constructor info set Flags flags info set Argument Names parameter Names info set Argument Type Names parameter Types info set Return Type return Type null new char v o i d return Type info set Exception Type Names exception Types parent Info add Child handle this new Elements put handle info this info Stack push info this handle Stack push handle  ISourceElementRequestor enterMethod declarationStart returnType nameSourceStart nameSourceEnd parameterTypes parameterNames exceptionTypes isConstructor SourceTypeElementInfo parentInfo SourceTypeElementInfo infoStack JavaElement parentHandle JavaElement handleStack IMethod parameterTypes parameterTypes CharOperation NO_CHAR_CHAR parameterNames parameterNames CharOperation NO_CHAR_CHAR exceptionTypes exceptionTypes CharOperation NO_CHAR_CHAR parameterTypeSigs convertTypeNamesToSigs parameterTypes parentHandle getElementType IJavaElement SourceMethod parentHandle parameterTypeSigs isTrue resolveDuplicates SourceMethodElementInfo SourceMethodElementInfo setSourceRangeStart declarationStart setName setNameSourceStart nameSourceStart setNameSourceEnd nameSourceEnd setConstructor isConstructor setFlags setArgumentNames parameterNames setArgumentTypeNames parameterTypes setReturnType returnType returnType setExceptionTypeNames exceptionTypes parentInfo addChild newElements infoStack handleStack
Common processing for classes and interfaces protected void enter Type int declaration Start int modifiers char name int name Source Start int name Source End char superclass char superinterfaces Java Element Info parent Info Java Element Info this info Stack peek Java Element parent Handle Java Element this handle Stack peek I Type handle null String name String new String name switch parent Handle get Element Type case I Java Element COMPILATION UNIT handle I Compilation Unit parent Handle get Type name String break case I Java Element TYPE handle I Type parent Handle get Type name String break case I Java Element FIELD case I Java Element INITIALIZER case I Java Element METHOD handle I Member parent Handle get Type name String 1 NB occurence Count is computed in resolve Duplicates break default Assert is True false Should not happen resolve Duplicates handle Source Type Element Info info new Source Type Element Info info set Handle handle info set Source Range Start declaration Start info set Flags modifiers info set Name name info set Name Source Start name Source Start info set Name Source End name Source End info set Superclass Name superclass info set Super Interface Names superinterfaces info set Source File Name this source File Name info set Package Name this package Name parent Info add Child handle this new Elements put handle info this info Stack push info this handle Stack push handle  enterType declarationStart nameSourceStart nameSourceEnd JavaElementInfo parentInfo JavaElementInfo infoStack JavaElement parentHandle JavaElement handleStack IType nameString parentHandle getElementType IJavaElement COMPILATION_UNIT ICompilationUnit parentHandle getType nameString IJavaElement IType parentHandle getType nameString IJavaElement IJavaElement IJavaElement IMember parentHandle getType nameString occurenceCount resolveDuplicates isTrue resolveDuplicates SourceTypeElementInfo SourceTypeElementInfo setHandle setSourceRangeStart declarationStart setFlags setName setNameSourceStart nameSourceStart setNameSourceEnd nameSourceEnd setSuperclassName setSuperInterfaceNames setSourceFileName sourceFileName setPackageName packageName parentInfo addChild newElements infoStack handleStack
see I Source Element Requestor public void exit Class int declaration End exit Member declaration End  ISourceElementRequestor exitClass declarationEnd exitMember declarationEnd
see I Source Element Requestor public void exit Compilation Unit int declaration End this unit Info set Source Length declaration End 1 determine if there were any parsing errors this unit Info set Is Structure Known this has Syntax Errors  ISourceElementRequestor exitCompilationUnit declarationEnd unitInfo setSourceLength declarationEnd unitInfo setIsStructureKnown hasSyntaxErrors
see I Source Element Requestor public void exit Constructor int declaration End exit Member declaration End  ISourceElementRequestor exitConstructor declarationEnd exitMember declarationEnd
see I Source Element Requestor public void exit Field int initialization Start int declaration End int declaration Source End Source Field Element Info info Source Field Element Info this info Stack pop info set Source Range End declaration Source End remember initializer source if field is a constant if initialization Start 1 int flags info flags Object type Info if Flags is Static flags Flags is Final flags type Info this info Stack peek instanceof Source Type Element Info Flags is Interface Source Type Element Info type Info flags int length declaration End initialization Start if length 0 char initializer new char length System arraycopy this parser scanner source initialization Start initializer 0 length info initialization Source initializer this handle Stack pop  ISourceElementRequestor exitField initializationStart declarationEnd declarationSourceEnd SourceFieldElementInfo SourceFieldElementInfo infoStack setSourceRangeEnd declarationSourceEnd initializationStart typeInfo isStatic isFinal typeInfo infoStack SourceTypeElementInfo isInterface SourceTypeElementInfo typeInfo declarationEnd initializationStart initializationStart initializationSource handleStack
see I Source Element Requestor public void exit Initializer int declaration End exit Member declaration End  ISourceElementRequestor exitInitializer declarationEnd exitMember declarationEnd
see I Source Element Requestor public void exit Interface int declaration End exit Member declaration End  ISourceElementRequestor exitInterface declarationEnd exitMember declarationEnd
common processing for classes and interfaces protected void exit Member int declaration End Source Ref Element Info info Source Ref Element Info this info Stack pop info set Source Range End declaration End this handle Stack pop  exitMember declarationEnd SourceRefElementInfo SourceRefElementInfo infoStack setSourceRangeEnd declarationEnd handleStack
see I Source Element Requestor public void exit Method int declaration End exit Member declaration End  ISourceElementRequestor exitMethod declarationEnd exitMember declarationEnd
Resolves duplicate handles by incrementing the occurrence count of the handle being created until there is no conflict protected void resolve Duplicates I Java Element handle while this new Elements contains Key handle Java Element h Java Element handle h occurrence Count  resolveDuplicates IJavaElement newElements containsKey JavaElement JavaElement occurrenceCount

Answer a new Compilation Unit Visitor using the given name environment and compiler options The environment and options will be in effect for the lifetime of the compiler When the compiler is run compilation results are sent to the given requestor param environment org eclipse jdt internal compiler api env I Name Environment Environment used by the compiler in order to resolve type and package names The name environment implements the actual connection of the compiler to the outside world e g in batch mode the name environment is performing pure file accesses reuse previous build state or connection to repositories Note the name environment is responsible for implementing the actual classpath rules param policy org eclipse jdt internal compiler api problem I Error Handling Policy Configurable part for problem handling allowing the compiler client to specify the rules for handling problems stop on first error or accumulate them all and at the same time perform some actions such as opening a dialog in UI when compiling interactively see org eclipse jdt internal compiler Default Error Handling Policies param requestor org eclipse jdt internal compiler api I Compiler Requestor Component which will receive and persist all compilation results and is intended to consume them as they are produced Typically in a batch compiler it is responsible for writing out the actual class files to the file system see org eclipse jdt internal compiler Compilation Result param problem Factory org eclipse jdt internal compiler api problem I Problem Factory Factory used inside the compiler to create problem descriptors It allows the compiler client to supply its own representation of compilation problems in order to avoid object conversions Note that the factory is not supposed to accumulate the created problems the compiler will gather them all and hand them back as part of the compilation unit result public Compilation Unit Visitor I Name Environment environment I Error Handling Policy policy Map settings I Compiler Requestor requestor I Problem Factory problem Factory super environment policy settings requestor problem Factory  CompilationUnitVisitor INameEnvironment IErrorHandlingPolicy DefaultErrorHandlingPolicies ICompilerRequestor CompilationResult problemFactory IProblemFactory CompilationUnitVisitor INameEnvironment IErrorHandlingPolicy ICompilerRequestor IProblemFactory problemFactory problemFactory
Add additional source types public void accept I Source Type source Types Package Binding package Binding Compilation Result result new Compilation Result source Types 0 get File Name 1 1 this options max Problems Per Unit need to hold onto this Compilation Unit Declaration unit Source Type Converter build Compilation Unit source Types source Types 0 is always toplevel here Source Type Converter FIELD AND METHOD need field and methods Source Type Converter MEMBER TYPE need member types no need for field initialization this lookup Environment problem Reporter result if unit null this lookup Environment build Type Bindings unit this lookup Environment complete Type Bindings unit true  ISourceType sourceTypes PackageBinding packageBinding CompilationResult CompilationResult sourceTypes getFileName maxProblemsPerUnit CompilationUnitDeclaration SourceTypeConverter buildCompilationUnit sourceTypes sourceTypes SourceTypeConverter FIELD_AND_METHOD SourceTypeConverter MEMBER_TYPE lookupEnvironment problemReporter lookupEnvironment buildTypeBindings lookupEnvironment completeTypeBindings
passes the initial set of files to the batch oracle to avoid finding more than once the same units when case insensitive match return new I Error Handling Policy public boolean stop On First Error return false  IErrorHandlingPolicy stopOnFirstError
return false public boolean proceed On Errors return false stop if there are some errors  proceedOnErrors
protected static I Error Handling Policy get Handling Policy passes the initial set of files to the batch oracle to avoid finding more than once the same units when case insensitive match return new I Error Handling Policy public boolean stop On First Error return false public boolean proceed On Errors return false stop if there are some errors  IErrorHandlingPolicy getHandlingPolicy IErrorHandlingPolicy stopOnFirstError proceedOnErrors
protected static I Compiler Requestor get Requestor return new I Compiler Requestor public void accept Result Compilation Result compilation Result nothing to do  ICompilerRequestor getRequestor ICompilerRequestor acceptResult CompilationResult compilationResult
protected static I Compiler Requestor get Requestor return new I Compiler Requestor public void accept Result Compilation Result compilation Result nothing to do  ICompilerRequestor getRequestor ICompilerRequestor acceptResult CompilationResult compilationResult
public static void visit I Compilation Unit unit Element AST Visitor visitor throws Java Model Exception Java Project project Java Project unit Element get Java Project Compilation Unit Visitor compilation Unit Visitor new Compilation Unit Visitor project new Searchable Name Environment unit Element get Owner get Handling Policy project get Options true get Requestor get Problem Factory visitor Compilation Unit Declaration unit null try I Package Fragment package Fragment I Package Fragment unit Element get Ancestor I Java Element PACKAGE FRAGMENT char expected Package Name null if package Fragment null expected Package Name Char Operation split On package Fragment get Element Name to Char Array unit compilation Unit Visitor resolve new Basic Compilation Unit unit Element get Source to Char Array expected Package Name unit Element get Element Name unit Element true method verification false no flow analysis false no code generation if unit null unit traverse visitor unit scope finally if unit null unit clean Up  ICompilationUnit unitElement ASTVisitor JavaModelException JavaProject JavaProject unitElement getJavaProject CompilationUnitVisitor compilationUnitVisitor CompilationUnitVisitor newSearchableNameEnvironment unitElement getOwner getHandlingPolicy getOptions getRequestor getProblemFactory CompilationUnitDeclaration IPackageFragment packageFragment IPackageFragment unitElement getAncestor IJavaElement PACKAGE_FRAGMENT expectedPackageName packageFragment expectedPackageName CharOperation splitOn packageFragment getElementName toCharArray compilationUnitVisitor BasicCompilationUnit unitElement getSource toCharArray expectedPackageName unitElement getElementName unitElement cleanUp
return new Default Problem Factory Locale get Default public I Problem create Problem char originating File Name int problem Id String problem Arguments String message Arguments int severity int start Position int end Position int line Number I Problem problem super create Problem originating File Name problem Id problem Arguments message Arguments severity start Position end Position line Number visitor accept Problem problem return problem  DefaultProblemFactory getDefault IProblem createProblem originatingFileName problemId problemArguments messageArguments startPosition endPosition lineNumber IProblem createProblem originatingFileName problemId problemArguments messageArguments startPosition endPosition lineNumber acceptProblem
protected static I Problem Factory get Problem Factory final AST Visitor visitor return new Default Problem Factory Locale get Default public I Problem create Problem char originating File Name int problem Id String problem Arguments String message Arguments int severity int start Position int end Position int line Number I Problem problem super create Problem originating File Name problem Id problem Arguments message Arguments severity start Position end Position line Number visitor accept Problem problem return problem  IProblemFactory getProblemFactory ASTVisitor DefaultProblemFactory getDefault IProblem createProblem originatingFileName problemId problemArguments messageArguments startPosition endPosition lineNumber IProblem createProblem originatingFileName problemId problemArguments messageArguments startPosition endPosition lineNumber acceptProblem

Name Lookup name Lookup public Completion Requestor Wrapper I Completion Requestor client Requestor Name Lookup name Lookup this client Requestor client Requestor this name Lookup name Lookup  NameLookup nameLookup CompletionRequestorWrapper ICompletionRequestor clientRequestor NameLookup nameLookup clientRequestor clientRequestor nameLookup nameLookup
public void accept Anonymous Type char super Type Package Name char super Type Name char parameter Package Names char parameter Type Names char parameter Names char completion Name int modifiers int completion Start int completion End int relevance if parameter Names null parameter Names find Method Parameter Names super Type Package Name super Type Name super Type Name parameter Package Names parameter Type Names if Completion Engine DEBUG print Debug accept Anonymous Type new String NON NLS 1 String value Of super Type Package Name String value Of super Type Name String value Of parameter Package Names String value Of parameter Type Names String value Of parameter Names String value Of completion Name String value Of modifiers String value Of completion Start String value Of completion End String value Of relevance this client Requestor accept Anonymous Type super Type Package Name super Type Name parameter Package Names parameter Type Names parameter Names completion Name modifiers completion Start completion End relevance  acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart completionEnd parameterNames parameterNames findMethodParameterNames superTypePackageName superTypeName superTypeName parameterPackageNames parameterTypeNames CompletionEngine printDebug acceptAnonymousType valueOf superTypePackageName valueOf superTypeName valueOf parameterPackageNames valueOf parameterTypeNames valueOf parameterNames valueOf completionName valueOf valueOf completionStart valueOf completionEnd valueOf clientRequestor acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart completionEnd
See I Completion Requestor public void accept Class char package Name char class Name char completion Name int modifiers int completion Start int completion End int relevance if Completion Engine DEBUG print Debug accept Class new String NON NLS 1 String value Of package Name String value Of class Name String value Of completion Name String value Of modifiers String value Of completion Start String value Of completion End String value Of relevance this client Requestor accept Class package Name class Name completion Name modifiers completion Start completion End relevance  ICompletionRequestor acceptClass packageName className completionName completionStart completionEnd CompletionEngine printDebug acceptClass valueOf packageName valueOf className valueOf completionName valueOf valueOf completionStart valueOf completionEnd valueOf clientRequestor acceptClass packageName className completionName completionStart completionEnd
See I Completion Requestor public void accept Error I Problem error if Completion Engine DEBUG System out print COMPLETION accept Error NON NLS 1 System out print error System out println NON NLS 1 this client Requestor accept Error error  ICompletionRequestor acceptError IProblem CompletionEngine acceptError clientRequestor acceptError
See I Completion Requestor public void accept Field char declaring Type Package Name char declaring Type Name char name char type Package Name char type Name char completion Name int modifiers int completion Start int completion End int relevance if Completion Engine DEBUG print Debug accept Field new String NON NLS 1 String value Of declaring Type Package Name String value Of declaring Type Name String value Of name String value Of type Package Name String value Of type Name String value Of completion Name String value Of modifiers String value Of completion Start String value Of completion End String value Of relevance this client Requestor accept Field declaring Type Package Name declaring Type Name name type Package Name type Name completion Name modifiers completion Start completion End relevance  ICompletionRequestor acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart completionEnd CompletionEngine printDebug acceptField valueOf declaringTypePackageName valueOf declaringTypeName valueOf valueOf typePackageName valueOf typeName valueOf completionName valueOf valueOf completionStart valueOf completionEnd valueOf clientRequestor acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart completionEnd
See I Completion Requestor public void accept Interface char package Name char interface Name char completion Name int modifiers int completion Start int completion End int relevance if Completion Engine DEBUG print Debug accept Interface new String NON NLS 1 String value Of package Name String value Of interface Name String value Of completion Name String value Of modifiers String value Of completion Start String value Of completion End String value Of relevance this client Requestor accept Interface package Name interface Name completion Name modifiers completion Start completion End relevance  ICompletionRequestor acceptInterface packageName interfaceName completionName completionStart completionEnd CompletionEngine printDebug acceptInterface valueOf packageName valueOf interfaceName valueOf completionName valueOf valueOf completionStart valueOf completionEnd valueOf clientRequestor acceptInterface packageName interfaceName completionName completionStart completionEnd
See I Completion Requestor public void accept Keyword char keyword Name int completion Start int completion End int relevance if Completion Engine DEBUG print Debug accept Keyword new String NON NLS 1 String value Of keyword Name String value Of completion Start String value Of completion End String value Of relevance this client Requestor accept Keyword keyword Name completion Start completion End relevance  ICompletionRequestor acceptKeyword keywordName completionStart completionEnd CompletionEngine printDebug acceptKeyword valueOf keywordName valueOf completionStart valueOf completionEnd valueOf clientRequestor acceptKeyword keywordName completionStart completionEnd
See I Completion Requestor public void accept Label char label Name int completion Start int completion End int relevance if Completion Engine DEBUG print Debug accept Label new String NON NLS 1 String value Of label Name String value Of completion Start String value Of completion End String value Of relevance this client Requestor accept Label label Name completion Start completion End relevance  ICompletionRequestor acceptLabel labelName completionStart completionEnd CompletionEngine printDebug acceptLabel valueOf labelName valueOf completionStart valueOf completionEnd valueOf clientRequestor acceptLabel labelName completionStart completionEnd
See I Completion Requestor public void accept Local Variable char name char type Package Name char type Name int modifiers int completion Start int completion End int relevance if Completion Engine DEBUG print Debug accept Local Variable new String NON NLS 1 String value Of name String value Of type Package Name String value Of type Name String value Of modifiers String value Of completion Start String value Of completion End String value Of relevance this client Requestor accept Local Variable name type Package Name type Name modifiers completion Start completion End relevance  ICompletionRequestor acceptLocalVariable typePackageName typeName completionStart completionEnd CompletionEngine printDebug acceptLocalVariable valueOf valueOf typePackageName valueOf typeName valueOf valueOf completionStart valueOf completionEnd valueOf clientRequestor acceptLocalVariable typePackageName typeName completionStart completionEnd
See I Completion Requestor public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance if parameter Names null parameter Names find Method Parameter Names declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names if Completion Engine DEBUG print Debug accept Method new String NON NLS 1 String value Of declaring Type Package Name String value Of declaring Type Name String value Of selector String value Of parameter Package Names String value Of parameter Type Names String value Of parameter Names String value Of return Type Package Name String value Of return Type Name String value Of completion Name String value Of modifiers String value Of completion Start String value Of completion End String value Of relevance this client Requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names parameter Names return Type Package Name return Type Name completion Name modifiers completion Start completion End relevance  ICompletionRequestor acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd parameterNames parameterNames findMethodParameterNames declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames CompletionEngine printDebug acceptMethod valueOf declaringTypePackageName valueOf declaringTypeName valueOf valueOf parameterPackageNames valueOf parameterTypeNames valueOf parameterNames valueOf returnTypePackageName valueOf returnTypeName valueOf completionName valueOf valueOf completionStart valueOf completionEnd valueOf clientRequestor acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd
See I Completion Requestor public void accept Method Declaration char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance if parameter Names null int length parameter Type Names length parameter Names find Method Parameter Names declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names String Buffer completion new String Buffer completion Name length int start 0 int end Char Operation index Of completion Name completion append Char Operation subarray completion Name start end for int i 0 i length i completion append parameter Names i start end 1 end Char Operation index Of completion Name start if end 1 completion append Char Operation subarray completion Name start end else completion append Char Operation subarray completion Name start completion Name length completion Name completion to String to Char Array if Completion Engine DEBUG print Debug accept Method Declaration new String NON NLS 1 String value Of declaring Type Package Name String value Of declaring Type Name String value Of selector String value Of parameter Package Names String value Of parameter Type Names String value Of parameter Names String value Of return Type Package Name String value Of return Type Name String value Of completion Name String value Of modifiers String value Of completion Start String value Of completion End String value Of relevance this client Requestor accept Method Declaration declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names parameter Names return Type Package Name return Type Name completion Name modifiers completion Start completion End relevance  ICompletionRequestor acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd parameterNames parameterTypeNames parameterNames findMethodParameterNames declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames StringBuffer StringBuffer completionName CharOperation indexOf completionName CharOperation completionName parameterNames CharOperation indexOf completionName CharOperation completionName CharOperation completionName completionName completionName toString toCharArray CompletionEngine printDebug acceptMethodDeclaration valueOf declaringTypePackageName valueOf declaringTypeName valueOf valueOf parameterPackageNames valueOf parameterTypeNames valueOf parameterNames valueOf returnTypePackageName valueOf returnTypeName valueOf completionName valueOf valueOf completionStart valueOf completionEnd valueOf clientRequestor acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd
See I Completion Requestor public void accept Modifier char modifier Name int completion Start int completion End int relevance if Completion Engine DEBUG print Debug accept Modifier new String NON NLS 1 String value Of modifier Name String value Of completion Start String value Of completion End String value Of relevance this client Requestor accept Modifier modifier Name completion Start completion End relevance  ICompletionRequestor acceptModifier modifierName completionStart completionEnd CompletionEngine printDebug acceptModifier valueOf modifierName valueOf completionStart valueOf completionEnd valueOf clientRequestor acceptModifier modifierName completionStart completionEnd
See I Completion Requestor public void accept Package char package Name char completion Name int completion Start int completion End int relevance if Completion Engine DEBUG print Debug accept Package new String NON NLS 1 String value Of package Name String value Of completion Name String value Of completion Start String value Of completion End String value Of relevance this client Requestor accept Package package Name completion Name completion Start completion End relevance  ICompletionRequestor acceptPackage packageName completionName completionStart completionEnd CompletionEngine printDebug acceptPackage valueOf packageName valueOf completionName valueOf completionStart valueOf completionEnd valueOf clientRequestor acceptPackage packageName completionName completionStart completionEnd
See I Completion Requestor public void accept Type char package Name char type Name char completion Name int completion Start int completion End int relevance if Completion Engine DEBUG print Debug accept Type new String NON NLS 1 String value Of package Name String value Of type Name String value Of completion Name String value Of completion Start String value Of completion End String value Of relevance this client Requestor accept Type package Name type Name completion Name completion Start completion End relevance  ICompletionRequestor acceptType packageName typeName completionName completionStart completionEnd CompletionEngine printDebug acceptType valueOf packageName valueOf typeName valueOf completionName valueOf completionStart valueOf completionEnd valueOf clientRequestor acceptType packageName typeName completionName completionStart completionEnd
public void accept Variable Name char type Package Name char type Name char name char completion Name int completion Start int completion End int relevance if Completion Engine DEBUG print Debug accept Variable Name new String NON NLS 1 String value Of type Package Name String value Of type Name String value Of name String value Of completion Name String value Of completion Start String value Of completion End String value Of relevance this client Requestor accept Variable Name type Package Name type Name name completion Name completion Start completion End relevance  acceptVariableName typePackageName typeName completionName completionStart completionEnd CompletionEngine printDebug acceptVariableName valueOf typePackageName valueOf typeName valueOf valueOf completionName valueOf completionStart valueOf completionEnd valueOf clientRequestor acceptVariableName typePackageName typeName completionName completionStart completionEnd
private char find Method Parameter Names char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names null int length parameter Type Names length char type Name Char Operation concat declaring Type Package Name declaring Type Name Object cached Type this completion Engine type Cache get type Name I Type type null if cached Type null if cached Type NO ATTACHED SOURCE cached Type instanceof Binary Type type Binary Type cached Type else type this name Lookup find Type new String type Name false Name Lookup ACCEPT CLASSES Name Lookup ACCEPT INTERFACES if type instanceof Binary Type if Binary Type type get Source Mapper null this completion Engine type Cache put type Name type else this completion Engine type Cache put type Name NO ATTACHED SOURCE type null else type null if type null String args new String length for int i 0 i length i char parameter Type Char Operation concat parameter Package Names i parameter Type Names i args i Signature create Type Signature parameter Type true I Method method type get Method new String selector args try parameter Names new char length String params method get Parameter Names for int i 0 i length i parameter Names i params i to Char Array catch Java Model Exception e parameter Names null default parameters name if parameter Names null switch length case 0 parameter Names new char length break case 1 parameter Names ARGS1 break case 2 parameter Names ARGS2 break case 3 parameter Names ARGS3 break case 4 parameter Names ARGS4 break default parameter Names new char length for int i 0 i length i parameter Names i Char Operation concat ARG String value Of i to Char Array break return parameter Names  findMethodParameterNames declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames parameterTypeNames typeName CharOperation declaringTypePackageName declaringTypeName cachedType completionEngine typeCache typeName IType cachedType cachedType NO_ATTACHED_SOURCE cachedType BinaryType BinaryType cachedType nameLookup findType typeName NameLookup ACCEPT_CLASSES NameLookup ACCEPT_INTERFACES BinaryType BinaryType getSourceMapper completionEngine typeCache typeName completionEngine typeCache typeName NO_ATTACHED_SOURCE parameterType CharOperation parameterPackageNames parameterTypeNames createTypeSignature parameterType IMethod getMethod parameterNames getParameterNames parameterNames toCharArray JavaModelException parameterNames parameterNames parameterNames parameterNames parameterNames parameterNames parameterNames parameterNames parameterNames CharOperation valueOf toCharArray parameterNames
public void accept Potential Method Declaration char declaring Type Package Name char declaring Type Name char selector int completion Start int completion End int relevance if this client Requestor instanceof I Extended Completion Requestor if Completion Engine DEBUG print Debug accept Potential Method Declaration new String NON NLS 1 String value Of declaring Type Package Name String value Of declaring Type Name String value Of selector String value Of completion Start String value Of completion End String value Of relevance I Extended Completion Requestor this client Requestor accept Potential Method Declaration declaring Type Package Name declaring Type Name selector completion Start completion End relevance  acceptPotentialMethodDeclaration declaringTypePackageName declaringTypeName completionStart completionEnd clientRequestor IExtendedCompletionRequestor CompletionEngine printDebug acceptPotentialMethodDeclaration valueOf declaringTypePackageName valueOf declaringTypeName valueOf valueOf completionStart valueOf completionEnd valueOf IExtendedCompletionRequestor clientRequestor acceptPotentialMethodDeclaration declaringTypePackageName declaringTypeName completionStart completionEnd
private void print Debug String header String param String Buffer buffer new String Buffer buffer append COMPLETION NON NLS 1 buffer append header buffer append NON NLS 1 for int i 0 i param length i if i 0 buffer append NON NLS 1 buffer append param i buffer append NON NLS 1 System out println buffer to String  printDebug StringBuffer StringBuffer toString

private Map sources new Hash Map When executed this operation will copy the given elements to the given containers The elements and destination containers must be in the correct order If there is 1 destination the number of destinations must be the same as the number of elements being copied moved renamed public Copy Elements Operation I Java Element elements To Copy I Java Element dest Containers boolean force super elements To Copy dest Containers force  HashMap CopyElementsOperation IJavaElement elementsToCopy IJavaElement destContainers elementsToCopy destContainers
When executed this operation will copy the given elements to the given container public Copy Elements Operation I Java Element elements To Copy I Java Element dest Container boolean force this elements To Copy new I Java Element dest Container force  CopyElementsOperation IJavaElement elementsToCopy IJavaElement destContainer elementsToCopy IJavaElement destContainer
Returns the code String code to use as the main task name for progress monitoring protected String get Main Task Name return Util bind operation copy Element Progress NON NLS 1  getMainTaskName copyElementProgress
Returns the nested operation to use for processing this element protected Java Model Operation get Nested Operation I Java Element element try I Java Element dest get Destination Parent element switch element get Element Type case I Java Element PACKAGE DECLARATION return new Create Package Declaration Operation element get Element Name I Compilation Unit dest case I Java Element IMPORT DECLARATION return new Create Import Operation element get Element Name I Compilation Unit dest case I Java Element TYPE if is Renaming Main Type element dest return new Rename Resource Elements Operation new I Java Element dest new I Java Element dest get Parent new String get New Name For element SUFFIX STRING java this force NON NLS 1 else return new Create Type Operation dest get Source For element Util LINE SEPARATOR this force case I Java Element METHOD return new Create Method Operation I Type dest get Source For element Util LINE SEPARATOR this force case I Java Element FIELD return new Create Field Operation I Type dest get Source For element Util LINE SEPARATOR this force case I Java Element INITIALIZER return new Create Initializer Operation I Type dest get Source For element Util LINE SEPARATOR default return null catch Java Model Exception npe return null  JavaModelOperation getNestedOperation IJavaElement IJavaElement getDestinationParent getElementType IJavaElement PACKAGE_DECLARATION CreatePackageDeclarationOperation getElementName ICompilationUnit IJavaElement IMPORT_DECLARATION CreateImportOperation getElementName ICompilationUnit IJavaElement isRenamingMainType RenameResourceElementsOperation IJavaElement IJavaElement getParent getNewNameFor SUFFIX_STRING_java CreateTypeOperation getSourceFor LINE_SEPARATOR IJavaElement CreateMethodOperation IType getSourceFor LINE_SEPARATOR IJavaElement CreateFieldOperation IType getSourceFor LINE_SEPARATOR IJavaElement CreateInitializerOperation IType getSourceFor LINE_SEPARATOR JavaModelException
Returns the cached source for this element or compute it if not already cached private String get Source For I Java Element element throws Java Model Exception String source String this sources get element if source null element instanceof I Member I Member member I Member element I Compilation Unit cu member get Compilation Unit String cu Source cu get Source String cu Name cu get Element Name source compute Source For Element element cu Source cu Name this sources put element source return source  getSourceFor IJavaElement JavaModelException IMember IMember IMember ICompilationUnit getCompilationUnit cuSource getSource cuName getElementName computeSourceForElement cuSource cuName
deprecated marked deprecated to suppress JDOM related deprecation warnings TODO JDOM remove once model ported off of JDOM private String compute Source For Element I Java Element element String cu Source String cu Name String source IDOM Compilation Unit domCU new DOM Factory create Compilation Unit cu Source cu Name IDOM Node node Java Element element find Node domCU source new String node get Characters return source  computeSourceForElement IJavaElement cuSource cuName IDOMCompilationUnit DOMFactory createCompilationUnit cuSource cuName IDOMNode JavaElement findNode getCharacters
Returns code true code if this element is the main type of its compilation unit protected boolean is Renaming Main Type I Java Element element I Java Element dest if is Rename get New Name For element null dest get Element Type I Java Element COMPILATION UNIT String type Name dest get Element Name type Name type Name substring 0 type Name length 5 return element get Element Name equals type Name element get Parent equals dest return false  isRenamingMainType IJavaElement IJavaElement isRename getNewNameFor getElementType IJavaElement COMPILATION_UNIT typeName getElementName typeName typeName typeName getElementName typeName getParent
Copy move the element from the source to destination renaming the elements as specified honoring the collision policy exception Java Model Exception if the operation is unable to be completed protected void process Element I Java Element element throws Java Model Exception Java Model Operation op get Nested Operation element boolean create Element InCU Operation op instanceof Create Element InCU Operation if op null return if create Element InCU Operation I Java Element sibling I Java Element this insert Before Elements get element if sibling null Create Element InCU Operation op set Relative Position sibling Create Element InCU Operation INSERT BEFORE else if is Rename I Java Element anchor resolve Rename Anchor element if anchor null Create Element InCU Operation op set Relative Position anchor Create Element InCU Operation INSERT AFTER insert after so that the anchor is found before when deleted below String new Name get New Name For element if new Name null Create Element InCU Operation op set Altered Name new Name execute Nested Operation op 1 Java Element destination Java Element get Destination Parent element I Compilation Unit unit destination get Compilation Unit if unit is Working Copy unit close if create Element InCU Operation is Move is Renaming Main Type element destination Delete Elements Operation delete Op new Delete Elements Operation new I Java Element element this force execute Nested Operation delete Op 1  JavaModelException processElement IJavaElement JavaModelException JavaModelOperation getNestedOperation createElementInCUOperation CreateElementInCUOperation createElementInCUOperation IJavaElement IJavaElement insertBeforeElements CreateElementInCUOperation setRelativePosition CreateElementInCUOperation INSERT_BEFORE isRename IJavaElement resolveRenameAnchor CreateElementInCUOperation setRelativePosition CreateElementInCUOperation INSERT_AFTER newName getNewNameFor newName CreateElementInCUOperation setAlteredName newName executeNestedOperation JavaElement JavaElement getDestinationParent ICompilationUnit getCompilationUnit isWorkingCopy createElementInCUOperation isMove isRenamingMainType DeleteElementsOperation deleteOp DeleteElementsOperation IJavaElement executeNestedOperation deleteOp
Returns the anchor used for positioning in the destination for the element being renamed For renaming if no anchor has explicitly been provided the element is anchored in the same position private I Java Element resolve Rename Anchor I Java Element element throws Java Model Exception I Parent parent I Parent element get Parent I Java Element children parent get Children for int i 0 i children length i I Java Element child children i if child equals element return child return null  IJavaElement resolveRenameAnchor IJavaElement JavaModelException IParent IParent getParent IJavaElement getChildren IJavaElement
Possible failures ul li NO ELEMENTS TO PROCESS no elements supplied to the operation li INDEX OUT OF BOUNDS the number of renamings supplied to the operation does not match the number of elements that were supplied ul protected I Java Model Status verify I Java Model Status status super verify if status isOK return status if this renamings List null this renamings List length this elements To Process length return new Java Model Status I Java Model Status Constants INDEX OUT OF BOUNDS return Java Model Status VERIFIED OK  NO_ELEMENTS_TO_PROCESS INDEX_OUT_OF_BOUNDS IJavaModelStatus IJavaModelStatus renamingsList renamingsList elementsToProcess JavaModelStatus IJavaModelStatusConstants INDEX_OUT_OF_BOUNDS JavaModelStatus VERIFIED_OK
see Multi Operation Possible failure codes ul li ELEMENT DOES NOT EXIST code element code or its specified destination is is code null code or does not exist If a code null code element is supplied no element is provided in the status otherwise the non existant element is supplied in the status li INVALID ELEMENT TYPES code element code is not contained within a compilation unit This operation only operates on elements contained within compilation units li READ ONLY code element code is read only li INVALID DESTINATION The destination parent specified for code element code is of an incompatible type The destination for a package declaration or import declaration must be a compilation unit the destination for a type must be a type or compilation unit the destinaion for any type member other than a type must be a type When this error occurs the element provided in the operation status is the code element code li INVALID NAME the new name for code element code does not have valid syntax In this case the element and name are provided in the status ul protected void verify I Java Element element throws Java Model Exception if element null element exists error I Java Model Status Constants ELEMENT DOES NOT EXIST element if element get Element Type I Java Element TYPE error I Java Model Status Constants INVALID ELEMENT TYPES element Member local Context if element instanceof Member local Context Member element get Outer Most Local Context null local Context element JDOM doesn t support source manipulation in local anonymous types error I Java Model Status Constants INVALID ELEMENT TYPES element if element is Read Only error I Java Model Status Constants READ ONLY element I Java Element dest get Destination Parent element verify Destination element dest verify Sibling element dest if this renamings List null verify Renaming element  MultiOperation ELEMENT_DOES_NOT_EXIST INVALID_ELEMENT_TYPES READ_ONLY INVALID_DESTINATION INVALID_NAME IJavaElement JavaModelException IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST getElementType IJavaElement IJavaModelStatusConstants INVALID_ELEMENT_TYPES localContext localContext getOuterMostLocalContext localContext IJavaModelStatusConstants INVALID_ELEMENT_TYPES isReadOnly IJavaModelStatusConstants READ_ONLY IJavaElement getDestinationParent verifyDestination verifySibling renamingsList verifyRenaming

public Copy Package Fragment Root Operation I Package Fragment Root root I Path destination int update Resource Flags int update Model Flags I Classpath Entry sibling super root this destination destination this update Resource Flags update Resource Flags this update Model Flags update Model Flags this sibling sibling  CopyPackageFragmentRootOperation IPackageFragmentRoot IPath updateResourceFlags updateModelFlags IClasspathEntry updateResourceFlags updateResourceFlags updateModelFlags updateModelFlags
protected void execute Operation throws Java Model Exception I Package Fragment Root root I Package Fragment Root this get Element To Process I Classpath Entry root Entry root get Raw Classpath Entry I Workspace Root workspace Root Resources Plugin get Workspace get Root copy resource if root is External this update Model Flags I Package Fragment Root NO RESOURCE MODIFICATION 0 copy Resource root root Entry workspace Root update classpath if needed if this update Model Flags I Package Fragment Root DESTINATION PROJECT CLASSPATH 0 add Entry To Classpath root Entry workspace Root  executeOperation JavaModelException IPackageFragmentRoot IPackageFragmentRoot getElementToProcess IClasspathEntry rootEntry getRawClasspathEntry IWorkspaceRoot workspaceRoot ResourcesPlugin getWorkspace getRoot isExternal updateModelFlags IPackageFragmentRoot NO_RESOURCE_MODIFICATION copyResource rootEntry workspaceRoot updateModelFlags IPackageFragmentRoot DESTINATION_PROJECT_CLASSPATH addEntryToClasspath rootEntry workspaceRoot
I Resource Proxy Visitor visitor new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception if proxy get Type I Resource FOLDER I Path path proxy request Full Path if prefixes One Of path nested Folders if equals One Of path nested Folders nested source folder return false else folder containing nested source folder I Folder folder dest Folder get Folder path remove First Segments source Segment Count if update Model Flags I Package Fragment Root REPLACE 0 folder exists return true folder create update Resource Flags true progress Monitor return true else subtree doesn t contain any nested source folders I Path dest Path destination append path remove First Segments source Segment Count I Resource dest Res if update Model Flags I Package Fragment Root REPLACE 0 dest Res workspace Root find Member dest Path null dest Res delete update Resource Flags progress Monitor proxy request Resource copy dest Path update Resource Flags progress Monitor return false else I Path path proxy request Full Path I Path dest Path destination append path remove First Segments source Segment Count I Resource dest Res if update Model Flags I Package Fragment Root REPLACE 0 dest Res workspace Root find Member dest Path null dest Res delete update Resource Flags progress Monitor proxy request Resource copy dest Path update Resource Flags progress Monitor return false  IResourceProxyVisitor IResourceProxyVisitor IResourceProxy CoreException getType IResource IPath requestFullPath prefixesOneOf nestedFolders equalsOneOf nestedFolders IFolder destFolder getFolder removeFirstSegments sourceSegmentCount updateModelFlags IPackageFragmentRoot updateResourceFlags progressMonitor IPath destPath removeFirstSegments sourceSegmentCount IResource destRes updateModelFlags IPackageFragmentRoot destRes workspaceRoot findMember destPath destRes updateResourceFlags progressMonitor requestResource destPath updateResourceFlags progressMonitor IPath requestFullPath IPath destPath removeFirstSegments sourceSegmentCount IResource destRes updateModelFlags IPackageFragmentRoot destRes workspaceRoot findMember destPath destRes updateResourceFlags progressMonitor requestResource destPath updateResourceFlags progressMonitor
protected void copy Resource I Package Fragment Root root I Classpath Entry root Entry final I Workspace Root workspace Root throws Java Model Exception final char exclusion Patterns Classpath Entry root Entry full Exclusion Pattern Chars I Resource root Resource root get Resource if root get Kind I Package Fragment Root K BINARY exclusion Patterns null try I Resource dest Res if this update Model Flags I Package Fragment Root REPLACE 0 if root Entry get Path equals this destination return if dest Res workspace Root find Member this destination null dest Res delete this update Resource Flags progress Monitor root Resource copy this destination this update Resource Flags progress Monitor catch Core Exception e throw new Java Model Exception e else final int source Segment Count root Entry get Path segment Count final I Folder dest Folder workspace Root get Folder this destination final I Path nested Folders get Nested Folders root I Resource Proxy Visitor visitor new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception if proxy get Type I Resource FOLDER I Path path proxy request Full Path if prefixes One Of path nested Folders if equals One Of path nested Folders nested source folder return false else folder containing nested source folder I Folder folder dest Folder get Folder path remove First Segments source Segment Count if update Model Flags I Package Fragment Root REPLACE 0 folder exists return true folder create update Resource Flags true progress Monitor return true else subtree doesn t contain any nested source folders I Path dest Path destination append path remove First Segments source Segment Count I Resource dest Res if update Model Flags I Package Fragment Root REPLACE 0 dest Res workspace Root find Member dest Path null dest Res delete update Resource Flags progress Monitor proxy request Resource copy dest Path update Resource Flags progress Monitor return false else I Path path proxy request Full Path I Path dest Path destination append path remove First Segments source Segment Count I Resource dest Res if update Model Flags I Package Fragment Root REPLACE 0 dest Res workspace Root find Member dest Path null dest Res delete update Resource Flags progress Monitor proxy request Resource copy dest Path update Resource Flags progress Monitor return false try root Resource accept visitor I Resource NONE catch Core Exception e throw new Java Model Exception e this set Attribute HAS MODIFIED RESOURCE ATTR TRUE  copyResource IPackageFragmentRoot IClasspathEntry rootEntry IWorkspaceRoot workspaceRoot JavaModelException exclusionPatterns ClasspathEntry rootEntry fullExclusionPatternChars IResource rootResource getResource getKind IPackageFragmentRoot K_BINARY exclusionPatterns IResource destRes updateModelFlags IPackageFragmentRoot rootEntry getPath destRes workspaceRoot findMember destRes updateResourceFlags progressMonitor rootResource updateResourceFlags progressMonitor CoreException JavaModelException sourceSegmentCount rootEntry getPath segmentCount IFolder destFolder workspaceRoot getFolder IPath nestedFolders getNestedFolders IResourceProxyVisitor IResourceProxyVisitor IResourceProxy CoreException getType IResource IPath requestFullPath prefixesOneOf nestedFolders equalsOneOf nestedFolders IFolder destFolder getFolder removeFirstSegments sourceSegmentCount updateModelFlags IPackageFragmentRoot updateResourceFlags progressMonitor IPath destPath removeFirstSegments sourceSegmentCount IResource destRes updateModelFlags IPackageFragmentRoot destRes workspaceRoot findMember destPath destRes updateResourceFlags progressMonitor requestResource destPath updateResourceFlags progressMonitor IPath requestFullPath IPath destPath removeFirstSegments sourceSegmentCount IResource destRes updateModelFlags IPackageFragmentRoot destRes workspaceRoot findMember destPath destRes updateResourceFlags progressMonitor requestResource destPath updateResourceFlags progressMonitor rootResource IResource CoreException JavaModelException setAttribute HAS_MODIFIED_RESOURCE_ATTR
protected void add Entry To Classpath I Classpath Entry root Entry I Workspace Root workspace Root throws Java Model Exception I Project dest Project workspace Root get Project this destination segment 0 I Java Project j Project Java Core create dest Project I Classpath Entry classpath j Project get Raw Classpath int length classpath length I Classpath Entry new Classpath case of existing entry and REPLACE was specified if this update Model Flags I Package Fragment Root REPLACE 0 find existing entry for int i 0 i length i if this destination equals classpath i get Path new Classpath new I Classpath Entry length System arraycopy classpath 0 new Classpath 0 length new Classpath i copy root Entry j Project set Raw Classpath new Classpath progress Monitor return other cases int position if this sibling null insert at the end position length else insert before sibling position 1 for int i 0 i length i if this sibling equals classpath i position i break if position 1 throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID SIBLING this sibling to String new Classpath new I Classpath Entry length 1 if position 0 System arraycopy classpath 0 new Classpath 0 position if position length System arraycopy classpath position new Classpath position 1 length position I Classpath Entry new Entry copy root Entry new Classpath position new Entry j Project set Raw Classpath new Classpath progress Monitor  addEntryToClasspath IClasspathEntry rootEntry IWorkspaceRoot workspaceRoot JavaModelException IProject destProject workspaceRoot getProject IJavaProject jProject JavaCore destProject IClasspathEntry jProject getRawClasspath IClasspathEntry newClasspath updateModelFlags IPackageFragmentRoot getPath newClasspath IClasspathEntry newClasspath newClasspath rootEntry jProject setRawClasspath newClasspath progressMonitor JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_SIBLING toString newClasspath IClasspathEntry newClasspath newClasspath IClasspathEntry newEntry rootEntry newClasspath newEntry jProject setRawClasspath newClasspath progressMonitor
protected I Classpath Entry copy I Classpath Entry entry throws Java Model Exception switch entry get Entry Kind case I Classpath Entry CPE CONTAINER return Java Core new Container Entry entry get Path entry is Exported case I Classpath Entry CPE LIBRARY try return Java Core new Library Entry this destination entry get Source Attachment Path entry get Source Attachment Root Path entry is Exported catch Assert Assertion Failed Exception e I Java Model Status status new Java Model Status I Java Model Status Constants INVALID PATH e get Message throw new Java Model Exception status case I Classpath Entry CPE PROJECT return Java Core new Project Entry entry get Path entry is Exported case I Classpath Entry CPE SOURCE return Java Core new Source Entry this destination entry get Inclusion Patterns entry get Exclusion Patterns entry get Output Location case I Classpath Entry CPE VARIABLE try return Java Core new Variable Entry entry get Path entry get Source Attachment Path entry get Source Attachment Root Path entry is Exported catch Assert Assertion Failed Exception e I Java Model Status status new Java Model Status I Java Model Status Constants INVALID PATH e get Message throw new Java Model Exception status default throw new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this get Element To Process  IClasspathEntry IClasspathEntry JavaModelException getEntryKind IClasspathEntry CPE_CONTAINER JavaCore newContainerEntry getPath isExported IClasspathEntry CPE_LIBRARY JavaCore newLibraryEntry getSourceAttachmentPath getSourceAttachmentRootPath isExported AssertionFailedException IJavaModelStatus JavaModelStatus IJavaModelStatusConstants INVALID_PATH getMessage JavaModelException IClasspathEntry CPE_PROJECT JavaCore newProjectEntry getPath isExported IClasspathEntry CPE_SOURCE JavaCore newSourceEntry getInclusionPatterns getExclusionPatterns getOutputLocation IClasspathEntry CPE_VARIABLE JavaCore newVariableEntry getPath getSourceAttachmentPath getSourceAttachmentRootPath isExported AssertionFailedException IJavaModelStatus JavaModelStatus IJavaModelStatusConstants INVALID_PATH getMessage JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST getElementToProcess
public I Java Model Status verify I Java Model Status status super verify if status isOK return status I Package Fragment Root root I Package Fragment Root get Element To Process if root null root exists return new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST root I Resource resource root get Resource if resource instanceof I Folder if resource is Linked return new Java Model Status I Java Model Status Constants INVALID RESOURCE root if this update Model Flags I Package Fragment Root DESTINATION PROJECT CLASSPATH 0 String dest Project Name this destination segment 0 I Project project Resources Plugin get Workspace get Root get Project dest Project Name if Java Project has Java Nature project try I Java Project dest Project Java Core create project I Classpath Entry dest Classpath dest Project get Raw Classpath boolean found Sibling false boolean found Existing Entry false for int i 0 length dest Classpath length i length i I Classpath Entry entry dest Classpath i if entry equals this sibling found Sibling true break if entry get Path equals this destination found Existing Entry true if this sibling null found Sibling return new Java Model Status I Java Model Status Constants INVALID SIBLING this sibling null null this sibling to String NON NLS 1 if found Existing Entry this update Model Flags I Package Fragment Root REPLACE 0 return new Java Model Status I Java Model Status Constants NAME COLLISION Util bind status name Collision this destination to String NON NLS 1 catch Java Model Exception e return e get Java Model Status return Java Model Status VERIFIED OK  IJavaModelStatus IJavaModelStatus IPackageFragmentRoot IPackageFragmentRoot getElementToProcess JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST IResource getResource IFolder isLinked JavaModelStatus IJavaModelStatusConstants INVALID_RESOURCE updateModelFlags IPackageFragmentRoot DESTINATION_PROJECT_CLASSPATH destProjectName IProject ResourcesPlugin getWorkspace getRoot getProject destProjectName JavaProject hasJavaNature IJavaProject destProject JavaCore IClasspathEntry destClasspath destProject getRawClasspath foundSibling foundExistingEntry destClasspath IClasspathEntry destClasspath foundSibling getPath foundExistingEntry foundSibling JavaModelStatus IJavaModelStatusConstants INVALID_SIBLING toString foundExistingEntry updateModelFlags IPackageFragmentRoot JavaModelStatus IJavaModelStatusConstants NAME_COLLISION nameCollision toString JavaModelException getJavaModelStatus JavaModelStatus VERIFIED_OK

protected Array List f Renamed Compilation Units null When executed this operation will copy the given resources to the given container public Copy Resource Elements Operation I Java Element resources To Copy I Java Element dest Container boolean force this resources To Copy new I Java Element dest Container force  ArrayList fRenamedCompilationUnits CopyResourceElementsOperation IJavaElement resourcesToCopy IJavaElement destContainer resourcesToCopy IJavaElement destContainer
When executed this operation will copy the given resources to the given containers The resources and destination containers must be in the correct order If there is 1 destination the number of destinations must be the same as the number of resources being copied moved public Copy Resource Elements Operation I Java Element resources To Copy I Java Element dest Containers boolean force super resources To Copy dest Containers force initializeDOM Factory  CopyResourceElementsOperation IJavaElement resourcesToCopy IJavaElement destContainers resourcesToCopy destContainers initializeDOMFactory
deprecated marked deprecated to suppress JDOM related deprecation warnings TODO JDOM remove once model ported off of JDOM private void initializeDOM Factory f Factory new DOM Factory  initializeDOMFactory fFactory DOMFactory
Returns the children of code source code which are affected by this operation If code source code is a code K SOURCE code these are the code java code files if it is a code K BINARY code they are the code class code files private I Resource collect Resources Of Interest I Package Fragment source throws Java Model Exception I Java Element children source get Children int child Of Interest I Java Element COMPILATION UNIT if source get Kind I Package Fragment Root K BINARY child Of Interest I Java Element CLASS FILE Array List correct Kind Children new Array List children length for int i 0 i children length i I Java Element child children i if child get Element Type child Of Interest correct Kind Children add child get Resource Gather non java resources Object non Java Resources source get Non Java Resources int actual Non Java Resource Count 0 for int i 0 max non Java Resources length i max i if non Java Resources i instanceof I Resource actual Non Java Resource Count I Resource actual Non Java Resources new I Resource actual Non Java Resource Count for int i 0 max non Java Resources length index 0 i max i if non Java Resources i instanceof I Resource actual Non Java Resources index I Resource non Java Resources i if actual Non Java Resource Count 0 int correct Kind Children Size correct Kind Children size I Resource result new I Resource correct Kind Children Size actual Non Java Resource Count correct Kind Children to Array result System arraycopy actual Non Java Resources 0 result correct Kind Children Size actual Non Java Resource Count return result else I Resource result new I Resource correct Kind Children size correct Kind Children to Array result return result  K_SOURCE K_BINARY IResource collectResourcesOfInterest IPackageFragment JavaModelException IJavaElement getChildren childOfInterest IJavaElement COMPILATION_UNIT getKind IPackageFragmentRoot K_BINARY childOfInterest IJavaElement CLASS_FILE ArrayList correctKindChildren ArrayList IJavaElement getElementType childOfInterest correctKindChildren getResource nonJavaResources getNonJavaResources actualNonJavaResourceCount nonJavaResources nonJavaResources IResource actualNonJavaResourceCount IResource actualNonJavaResources IResource actualNonJavaResourceCount nonJavaResources nonJavaResources IResource actualNonJavaResources IResource nonJavaResources actualNonJavaResourceCount correctKindChildrenSize correctKindChildren IResource IResource correctKindChildrenSize actualNonJavaResourceCount correctKindChildren toArray actualNonJavaResources correctKindChildrenSize actualNonJavaResourceCount IResource IResource correctKindChildren correctKindChildren toArray
Creates any destination package fragment s which do not exists yet Return true if a read only package fragment has been found among package fragments false otherwise private boolean create Needed Package Fragments I Container source Folder I Package Fragment Root root String new Frag Name boolean move Folder throws Java Model Exception boolean contains Read Only Package Fragment false I Container parent Folder I Container root get Resource Java Element Delta project Delta null String names Util get Trimmed Simple Names new Frag Name String Buffer side Effect Package Name new String Buffer char inclusion Patterns Package Fragment Root root full Inclusion Pattern Chars char exclusion Patterns Package Fragment Root root full Exclusion Pattern Chars for int i 0 i names length i String sub Folder Name names i side Effect Package Name append sub Folder Name I Resource sub Folder parent Folder find Member sub Folder Name if sub Folder null create deepest folder only if not a move folder will be moved in process Package Fragment Resource if move Folder i names length 1 create Folder parent Folder sub Folder Name force parent Folder parent Folder get Folder new Path sub Folder Name source Folder source Folder get Folder new Path sub Folder Name if source Folder is Read Only contains Read Only Package Fragment true I Package Fragment side Effect Package root get Package Fragment side Effect Package Name to String if i names length 1 all but the last one are side effect packages Util is Excluded parent Folder inclusion Patterns exclusion Patterns if project Delta null project Delta get Delta For root get Java Project project Delta added side Effect Package created Elements add side Effect Package else parent Folder I Container sub Folder side Effect Package Name append return contains Read Only Package Fragment  createNeededPackageFragments IContainer sourceFolder IPackageFragmentRoot newFragName moveFolder JavaModelException containsReadOnlyPackageFragment IContainer parentFolder IContainer getResource JavaElementDelta projectDelta getTrimmedSimpleNames newFragName StringBuffer sideEffectPackageName StringBuffer inclusionPatterns PackageFragmentRoot fullInclusionPatternChars exclusionPatterns PackageFragmentRoot fullExclusionPatternChars subFolderName sideEffectPackageName subFolderName IResource subFolder parentFolder findMember subFolderName subFolder processPackageFragmentResource moveFolder createFolder parentFolder subFolderName parentFolder parentFolder getFolder subFolderName sourceFolder sourceFolder getFolder subFolderName sourceFolder isReadOnly containsReadOnlyPackageFragment IPackageFragment sideEffectPackage getPackageFragment sideEffectPackageName toString isExcluded parentFolder inclusionPatterns exclusionPatterns projectDelta projectDelta getDeltaFor getJavaProject projectDelta sideEffectPackage createdElements sideEffectPackage parentFolder IContainer subFolder sideEffectPackageName containsReadOnlyPackageFragment
Returns the code Java Element Delta code for code java Project code creating it and putting it in code f Deltas Per Project code if it does not exist yet private Java Element Delta get Delta For I Java Project java Project Java Element Delta delta Java Element Delta deltas Per Project get java Project if delta null delta new Java Element Delta java Project deltas Per Project put java Project delta return delta  JavaElementDelta javaProject fDeltasPerProject JavaElementDelta getDeltaFor IJavaProject javaProject JavaElementDelta JavaElementDelta deltasPerProject javaProject JavaElementDelta javaProject deltasPerProject javaProject
see Multi Operation protected String get Main Task Name return Util bind operation copy Resource Progress NON NLS 1  MultiOperation getMainTaskName copyResourceProgress
Sets the deltas to register the changes resulting from this operation for this source element and its destination If the operation is a cross project operation ul li On a copy the delta should be rooted in the dest project li On a move two deltas are generated ul li one rooted in the source project li one rooted in the destination project ul ul If the operation is rooted in a single project the delta is rooted in that project protected void prepare Deltas I Java Element source Element I Java Element destination Element boolean is Move if Util is Excluded source Element Util is Excluded destination Element return I Java Project dest Project destination Element get Java Project if is Move I Java Project source Project source Element get Java Project get Delta For source Project moved From source Element destination Element get Delta For dest Project moved To destination Element source Element else get Delta For dest Project added destination Element  prepareDeltas IJavaElement sourceElement IJavaElement destinationElement isMove isExcluded sourceElement isExcluded destinationElement IJavaProject destProject destinationElement getJavaProject isMove IJavaProject sourceProject sourceElement getJavaProject getDeltaFor sourceProject movedFrom sourceElement destinationElement getDeltaFor destProject movedTo destinationElement sourceElement getDeltaFor destProject destinationElement
Copies moves a compilation unit with the name code newCU Name code to the destination package br The package statement in the compilation unit is updated if necessary The main type of the compilation unit is renamed if necessary exception Java Model Exception if the operation is unable to complete private void process Compilation Unit Resource I Compilation Unit source I Package Fragment dest throws Java Model Exception String newCU Name get New Name For source String dest Name newCU Name null newCU Name source get Element Name String new Content updated Content source dest newCU Name null if unchanged TODO frederic remove when bug 67606 will be fixed bug 67823 store encoding fix bug 66898 I File source Resource I File source get Resource String source Encoding null try source Encoding source Resource get Charset false catch Core Exception ce no problem use default encoding end todo copy resource I Container dest Folder I Container dest get Resource can be an I Folder or an I Project I File dest File dest Folder get File new Path dest Name if dest File equals source Resource try if dest File exists if force we can remove it delete Resource dest File I Resource KEEP HISTORY else abort throw new Java Model Exception new Java Model Status I Java Model Status Constants NAME COLLISION Util bind status name Collision dest File get Full Path to String NON NLS 1 int flags force I Resource FORCE I Resource NONE if this is Move flags I Resource KEEP HISTORY source Resource move dest File get Full Path flags get Sub Progress Monitor 1 else if new Content null flags I Resource KEEP HISTORY source Resource copy dest File get Full Path flags get Sub Progress Monitor 1 this set Attribute HAS MODIFIED RESOURCE ATTR TRUE catch Java Model Exception e throw e catch Core Exception e throw new Java Model Exception e update new resource content if new Content null boolean was Read Only dest File is Read Only try String encoding null try TODO frederic remove when bug 67606 will be fixed bug 67823 fix bug 66898 if source Encoding null dest File set Charset source Encoding end todo encoding dest File get Charset catch Core Exception ce use no encoding when the file was copied its read only flag was preserved temporary set it to false note this doesn t interfer with repository providers as this is a new resource that cannot be under version control yet dest File set Read Only false dest File set Contents new Byte Array Input Stream encoding null new Content get Bytes new Content get Bytes encoding force I Resource FORCE I Resource KEEP HISTORY I Resource KEEP HISTORY get Sub Progress Monitor 1 catch IO Exception e throw new Java Model Exception e I Java Model Status Constants IO EXCEPTION catch Core Exception e throw new Java Model Exception e finally dest File set Read Only was Read Only register the correct change deltas I Compilation Unit destCU dest get Compilation Unit dest Name prepare Deltas source destCU is Move if newCU Name null the main type has been renamed String old Name source get Element Name old Name old Name substring 0 old Name length 5 String new Name newCU Name new Name new Name substring 0 new Name length 5 prepare Deltas source get Type old Name destCU get Type new Name is Move else if force throw new Java Model Exception new Java Model Status I Java Model Status Constants NAME COLLISION Util bind status name Collision dest File get Full Path to String NON NLS 1 update new resource content in case we do a saveas on the same resource we have to simply update the contents see http dev eclipse org bugs show bug cgi id 9351 try if new Content null String encoding null try TODO frederic remove when bug 67606 will be fixed bug 67823 fix bug 66898 if source Encoding null dest File set Charset source Encoding end todo encoding dest File get Charset catch Core Exception ce use no encoding dest File set Contents new Byte Array Input Stream encoding null new Content get Bytes new Content get Bytes encoding force I Resource FORCE I Resource KEEP HISTORY I Resource KEEP HISTORY get Sub Progress Monitor 1 catch IO Exception e throw new Java Model Exception e I Java Model Status Constants IO EXCEPTION catch Core Exception e throw new Java Model Exception e  newCUName JavaModelException processCompilationUnitResource ICompilationUnit IPackageFragment JavaModelException newCUName getNewNameFor destName newCUName newCUName getElementName newContent updatedContent newCUName IFile sourceResource IFile getResource sourceEncoding sourceEncoding sourceResource getCharset CoreException IContainer destFolder IContainer getResource IFolder IProject IFile destFile destFolder getFile destName destFile sourceResource destFile deleteResource destFile IResource KEEP_HISTORY JavaModelException JavaModelStatus IJavaModelStatusConstants NAME_COLLISION nameCollision destFile getFullPath toString IResource IResource isMove IResource KEEP_HISTORY sourceResource destFile getFullPath getSubProgressMonitor newContent IResource KEEP_HISTORY sourceResource destFile getFullPath getSubProgressMonitor setAttribute HAS_MODIFIED_RESOURCE_ATTR JavaModelException CoreException JavaModelException newContent wasReadOnly destFile isReadOnly sourceEncoding destFile setCharset sourceEncoding destFile getCharset CoreException destFile setReadOnly destFile setContents ByteArrayInputStream newContent getBytes newContent getBytes IResource IResource KEEP_HISTORY IResource KEEP_HISTORY getSubProgressMonitor IOException JavaModelException IJavaModelStatusConstants IO_EXCEPTION CoreException JavaModelException destFile setReadOnly wasReadOnly ICompilationUnit getCompilationUnit destName prepareDeltas isMove newCUName oldName getElementName oldName oldName oldName newName newCUName newName newName newName prepareDeltas getType oldName getType newName isMove JavaModelException JavaModelStatus IJavaModelStatusConstants NAME_COLLISION nameCollision destFile getFullPath toString show_bug newContent sourceEncoding destFile setCharset sourceEncoding destFile getCharset CoreException destFile setContents ByteArrayInputStream newContent getBytes newContent getBytes IResource IResource KEEP_HISTORY IResource KEEP_HISTORY getSubProgressMonitor IOException JavaModelException IJavaModelStatusConstants IO_EXCEPTION CoreException JavaModelException
Process all of the changed deltas generated by this operation protected void process Deltas for Iterator deltas this deltas Per Project values iterator deltas has Next add Delta I Java Element Delta deltas next  processDeltas deltasPerProject hasNext addDelta IJavaElementDelta
see Multi Operation This method delegates to code process Compilation Unit Resource code or code process Package Fragment Resource code depending on the type of code element code protected void process Element I Java Element element throws Java Model Exception I Java Element dest get Destination Parent element switch element get Element Type case I Java Element COMPILATION UNIT process Compilation Unit Resource I Compilation Unit element I Package Fragment dest created Elements add I Package Fragment dest get Compilation Unit element get Element Name break case I Java Element PACKAGE FRAGMENT process Package Fragment Resource I Package Fragment element I Package Fragment Root dest get New Name For element break default throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID ELEMENT TYPES element  MultiOperation processCompilationUnitResource processPackageFragmentResource processElement IJavaElement JavaModelException IJavaElement getDestinationParent getElementType IJavaElement COMPILATION_UNIT processCompilationUnitResource ICompilationUnit IPackageFragment createdElements IPackageFragment getCompilationUnit getElementName IJavaElement PACKAGE_FRAGMENT processPackageFragmentResource IPackageFragment IPackageFragmentRoot getNewNameFor JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_ELEMENT_TYPES
see Multi Operation Overridden to allow special processing of code Java Element Delta code s and code f Result Elements code protected void process Elements throws Java Model Exception created Elements new Array List elements To Process length try super process Elements catch Java Model Exception jme throw jme finally result Elements new I Java Element created Elements size created Elements to Array result Elements process Deltas  MultiOperation JavaElementDelta fResultElements processElements JavaModelException createdElements ArrayList elementsToProcess processElements JavaModelException resultElements IJavaElement createdElements createdElements toArray resultElements processDeltas
Copies moves a package fragment with the name code new Name code to the destination package br exception Java Model Exception if the operation is unable to complete deprecated marked deprecated to suppress JDOM related deprecation warnings TODO JDOM remove once model ported off of JDOM private void process Package Fragment Resource I Package Fragment source I Package Fragment Root root String new Name throws Java Model Exception try String new Frag Name new Name null source get Element Name new Name I Package Fragment new Frag root get Package Fragment new Frag Name I Resource resources collect Resources Of Interest source if is Move can we move the folder itself see http bugs eclipse org bugs show bug cgi id 22458 boolean should Move Folder is Move new Frag get Resource exists if new pkg fragment exists it is an override I Folder src Folder I Folder source get Resource I Path dest Path new Frag get Path if should Move Folder check if destination is not included in source if src Folder get Full Path is Prefix Of dest Path should Move Folder false else check if there are no sub packages I Resource members src Folder members for int i 0 i members length i if members i instanceof I Folder should Move Folder false break boolean contains Read Only Sub Package Fragments create Needed Package Fragments I Container source get Parent get Resource root new Frag Name should Move Folder boolean source Is Read Only src Folder is Read Only Process resources if should Move Folder move underlying resource TODO Revisit once bug 43044 is fixed if source Is Read Only src Folder set Read Only false src Folder move dest Path force true keep history get Sub Progress Monitor 1 if source Is Read Only src Folder set Read Only true this set Attribute HAS MODIFIED RESOURCE ATTR TRUE else process the leaf resources if resources length 0 if is Rename if dest Path equals source get Path move Resources resources dest Path else if is Move we need to delete this resource if this operation wants to override existing resources for int i 0 max resources length i max i I Resource destination Resource Resources Plugin get Workspace get Root find Member dest Path append resources i get Name if destination Resource null if force delete Resource destination Resource I Resource KEEP HISTORY else throw new Java Model Exception new Java Model Status I Java Model Status Constants NAME COLLISION Util bind status name Collision destination Resource get Full Path to String NON NLS 1 move Resources resources dest Path else we need to delete this resource if this operation wants to override existing resources for int i 0 max resources length i max i I Resource destination Resource Resources Plugin get Workspace get Root find Member dest Path append resources i get Name if destination Resource null if force we need to delete this resource if this operation wants to override existing resources delete Resource destination Resource I Resource KEEP HISTORY else throw new Java Model Exception new Java Model Status I Java Model Status Constants NAME COLLISION Util bind status name Collision destination Resource get Full Path to String NON NLS 1 copy Resources resources dest Path Update package statement in compilation unit if needed if new Frag get Element Name equals source get Element Name if package has been renamed update the compilation units char inclusion Patterns Package Fragment Root root full Inclusion Pattern Chars char exclusion Patterns Package Fragment Root root full Exclusion Pattern Chars for int i 0 i resources length i if resources i get Name ends With SUFFIX STRING java we only consider potential compilation units I Compilation Unit cu new Frag get Compilation Unit resources i get Name if Util is Excluded cu get Path inclusion Patterns exclusion Patterns false not a folder continue IDOM Compilation Unit domCU f Factory create Compilation Unit cu get Source cu get Element Name if domCU null update Package Statement domCU new Frag Name I Buffer buffer cu get Buffer if buffer null continue String buffer Contents buffer get Contents if buffer Contents null continue String domCU Contents domCU get Contents String cu Contents null if domCU Contents null cu Contents Util normalizeC Rs domCU get Contents buffer Contents else See PR http dev eclipse org bugs show bug cgi id 11285 cu Contents buffer Contents NON NLS 1 buffer set Contents cu Contents cu save null false Discard empty old package if still empty after the rename boolean is Empty true if is Move delete remaining files in this package class file in the case where Proj src bin in case of a copy update Read Only Package Fragments For Move I Container source get Parent get Resource root new Frag Name source Is Read Only if src Folder exists I Resource remaining src Folder members for int i 0 length remaining length i length i I Resource file remaining i if file instanceof I File if file is Read Only file set Read Only false this delete Resource file I Resource FORCE I Resource KEEP HISTORY else is Empty false if is Empty I Resource root Resource check if source is included in destination if dest Path is Prefix Of src Folder get Full Path root Resource new Frag get Resource else root Resource source get Parent get Resource delete recursively empty folders delete Empty Package Fragment source false root Resource else if contains Read Only Sub Package Fragments in case of a copy update Read Only Package Fragments For Copy I Container source get Parent get Resource root new Frag Name workaround for bug https bugs eclipse org bugs show bug cgi id 24505 if is Empty is Move Util is Excluded source Util is Excluded new Frag I Java Project source Project source get Java Project get Delta For source Project moved From source new Frag I Java Project dest Project new Frag get Java Project get Delta For dest Project moved To new Frag source catch DOM Exception dom throw new Java Model Exception dom I Java Model Status Constants DOM EXCEPTION catch Java Model Exception e throw e catch Core Exception ce throw new Java Model Exception ce  newName JavaModelException processPackageFragmentResource IPackageFragment IPackageFragmentRoot newName JavaModelException newFragName newName getElementName newName IPackageFragment newFrag getPackageFragment newFragName IResource collectResourcesOfInterest isMove show_bug shouldMoveFolder isMove newFrag getResource IFolder srcFolder IFolder getResource IPath destPath newFrag getPath shouldMoveFolder srcFolder getFullPath isPrefixOf destPath shouldMoveFolder IResource srcFolder IFolder shouldMoveFolder containsReadOnlySubPackageFragments createNeededPackageFragments IContainer getParent getResource newFragName shouldMoveFolder sourceIsReadOnly srcFolder isReadOnly shouldMoveFolder sourceIsReadOnly srcFolder setReadOnly srcFolder destPath getSubProgressMonitor sourceIsReadOnly srcFolder setReadOnly setAttribute HAS_MODIFIED_RESOURCE_ATTR isRename destPath getPath moveResources destPath isMove IResource destinationResource ResourcesPlugin getWorkspace getRoot findMember destPath getName destinationResource deleteResource destinationResource IResource KEEP_HISTORY JavaModelException JavaModelStatus IJavaModelStatusConstants NAME_COLLISION nameCollision destinationResource getFullPath toString moveResources destPath IResource destinationResource ResourcesPlugin getWorkspace getRoot findMember destPath getName destinationResource deleteResource destinationResource IResource KEEP_HISTORY JavaModelException JavaModelStatus IJavaModelStatusConstants NAME_COLLISION nameCollision destinationResource getFullPath toString copyResources destPath newFrag getElementName getElementName inclusionPatterns PackageFragmentRoot fullInclusionPatternChars exclusionPatterns PackageFragmentRoot fullExclusionPatternChars getName endsWith SUFFIX_STRING_java ICompilationUnit newFrag getCompilationUnit getName isExcluded getPath inclusionPatterns exclusionPatterns IDOMCompilationUnit fFactory createCompilationUnit getSource getElementName updatePackageStatement newFragName IBuffer getBuffer bufferContents getContents bufferContents domCUContents getContents cuContents domCUContents cuContents normalizeCRs getContents bufferContents show_bug cuContents bufferContents setContents cuContents isEmpty isMove updateReadOnlyPackageFragmentsForMove IContainer getParent getResource newFragName sourceIsReadOnly srcFolder IResource srcFolder IResource IFile isReadOnly setReadOnly deleteResource IResource IResource KEEP_HISTORY isEmpty isEmpty IResource rootResource destPath isPrefixOf srcFolder getFullPath rootResource newFrag getResource rootResource getParent getResource deleteEmptyPackageFragment rootResource containsReadOnlySubPackageFragments updateReadOnlyPackageFragmentsForCopy IContainer getParent getResource newFragName show_bug isEmpty isMove isExcluded isExcluded newFrag IJavaProject sourceProject getJavaProject getDeltaFor sourceProject movedFrom newFrag IJavaProject destProject newFrag getJavaProject getDeltaFor destProject movedTo newFrag DOMException JavaModelException IJavaModelStatusConstants DOM_EXCEPTION JavaModelException CoreException JavaModelException
Updates the content of code cu code modifying the type name and or package declaration as necessary return the new source deprecated marked deprecated to suppress JDOM related deprecation warnings TODO JDOM remove once model ported off of JDOM private String updated Content I Compilation Unit cu I Package Fragment dest String new Name throws Java Model Exception String curr Package Name cu get Parent get Element Name String dest Package Name dest get Element Name if curr Package Name equals dest Package Name new Name null return null nothing to change else String type Name cu get Element Name type Name type Name substring 0 type Name length 5 IDOM Compilation Unit cuDOM null I Buffer buffer cu get Buffer if buffer null return null char contents buffer get Characters if contents null return null cuDOM f Factory create Compilation Unit contents type Name update Type Name cu cuDOM cu get Element Name new Name update Package Statement cuDOM dest Package Name return cuDOM get Contents  updatedContent ICompilationUnit IPackageFragment newName JavaModelException currPackageName getParent getElementName destPackageName getElementName currPackageName destPackageName newName typeName getElementName typeName typeName typeName IDOMCompilationUnit IBuffer getBuffer getCharacters fFactory createCompilationUnit typeName updateTypeName getElementName newName updatePackageStatement destPackageName getContents
Makes sure that code cu code declares to be in the code pkg Name code package deprecated marked deprecated to suppress JDOM related deprecation warnings TODO JDOM remove once model ported off of JDOM private void update Package Statement IDOM Compilation Unit domCU String pkg Name boolean default Package pkg Name equals I Package Fragment DEFAULT PACKAGE NAME boolean seen Package Node false Enumeration nodes domCU get Children while nodes has More Elements IDOM Node node IDOM Node nodes next Element if node get Node Type IDOM Node PACKAGE if default Package node set Name pkg Name else node remove seen Package Node true break if seen Package Node default Package the cu was in a default package no package declaration create the new package declaration as the first child of the cu IDOM Package pkg f Factory create Package package pkg Name org eclipse jdt internal compiler util Util LINE SEPARATOR NON NLS 1 NON NLS 2 IDOM Node first Child domCU get First Child if first Child null first Child insert Sibling pkg else the cu was empty leave it empty  pkgName updatePackageStatement IDOMCompilationUnit pkgName defaultPackage pkgName IPackageFragment DEFAULT_PACKAGE_NAME seenPackageNode getChildren hasMoreElements IDOMNode IDOMNode nextElement getNodeType IDOMNode defaultPackage setName pkgName seenPackageNode seenPackageNode defaultPackage IDOMPackage fFactory createPackage pkgName LINE_SEPARATOR IDOMNode firstChild getFirstChild firstChild firstChild insertSibling
private void update Read Only Package Fragments For Copy I Container source Folder I Package Fragment Root root String new Frag Name I Container parent Folder I Container root get Resource String names Util get Trimmed Simple Names new Frag Name String Buffer side Effect Package Name new String Buffer for int i 0 name Length names length i name Length i String sub Folder Name names i side Effect Package Name append sub Folder Name parent Folder parent Folder get Folder new Path sub Folder Name source Folder source Folder get Folder new Path sub Folder Name if source Folder exists source Folder is Read Only parent Folder set Read Only true side Effect Package Name append  updateReadOnlyPackageFragmentsForCopy IContainer sourceFolder IPackageFragmentRoot newFragName IContainer parentFolder IContainer getResource getTrimmedSimpleNames newFragName StringBuffer sideEffectPackageName StringBuffer nameLength nameLength subFolderName sideEffectPackageName subFolderName parentFolder parentFolder getFolder subFolderName sourceFolder sourceFolder getFolder subFolderName sourceFolder sourceFolder isReadOnly parentFolder setReadOnly sideEffectPackageName
private void update Read Only Package Fragments For Move I Container source Folder I Package Fragment Root root String new Frag Name boolean source Folder Is Read Only I Container parent Folder I Container root get Resource String names Util get Trimmed Simple Names new Frag Name String Buffer side Effect Package Name new String Buffer for int i 0 name Length names length i name Length i String sub Folder Name names i side Effect Package Name append sub Folder Name parent Folder parent Folder get Folder new Path sub Folder Name source Folder source Folder get Folder new Path sub Folder Name if source Folder exists source Folder is Read Only i name Length 1 source Folder Is Read Only parent Folder set Read Only true the source folder will be deleted anyway move operation source Folder set Read Only false side Effect Package Name append  updateReadOnlyPackageFragmentsForMove IContainer sourceFolder IPackageFragmentRoot newFragName sourceFolderIsReadOnly IContainer parentFolder IContainer getResource getTrimmedSimpleNames newFragName StringBuffer sideEffectPackageName StringBuffer nameLength nameLength subFolderName sideEffectPackageName subFolderName parentFolder parentFolder getFolder subFolderName sourceFolder sourceFolder getFolder subFolderName sourceFolder sourceFolder isReadOnly nameLength sourceFolderIsReadOnly parentFolder setReadOnly sourceFolder setReadOnly sideEffectPackageName
Renames the main type in code cu code deprecated marked deprecated to suppress JDOM related deprecation warnings TODO JDOM remove once model ported off of JDOM private void update Type Name I Compilation Unit cu IDOM Compilation Unit domCU String old Name String new Name throws Java Model Exception if new Name null if f Renamed Compilation Units null f Renamed Compilation Units new Array List 1 f Renamed Compilation Units add cu String old Type Name old Name substring 0 old Name length 5 String new Type Name new Name substring 0 new Name length 5 update main type name I Type types cu get Types for int i 0 max types length i max i I Type current Type types i if current Type get Element Name equals old Type Name IDOM Node type Node Java Element current Type find Node domCU if type Node null type Node set Name new Type Name  updateTypeName ICompilationUnit IDOMCompilationUnit oldName newName JavaModelException newName fRenamedCompilationUnits fRenamedCompilationUnits ArrayList fRenamedCompilationUnits oldTypeName oldName oldName newTypeName newName newName IType getTypes IType currentType currentType getElementName oldTypeName IDOMNode typeNode JavaElement currentType findNode typeNode typeNode setName newTypeName
Possible failures ul li NO ELEMENTS TO PROCESS no elements supplied to the operation li INDEX OUT OF BOUNDS the number of renamings supplied to the operation does not match the number of elements that were supplied ul protected I Java Model Status verify I Java Model Status status super verify if status isOK return status if this renamings List null this renamings List length elements To Process length return new Java Model Status I Java Model Status Constants INDEX OUT OF BOUNDS return Java Model Status VERIFIED OK  NO_ELEMENTS_TO_PROCESS INDEX_OUT_OF_BOUNDS IJavaModelStatus IJavaModelStatus renamingsList renamingsList elementsToProcess JavaModelStatus IJavaModelStatusConstants INDEX_OUT_OF_BOUNDS JavaModelStatus VERIFIED_OK
see Multi Operation protected void verify I Java Element element throws Java Model Exception if element null element exists error I Java Model Status Constants ELEMENT DOES NOT EXIST element if element is Read Only is Rename is Move error I Java Model Status Constants READ ONLY element I Resource resource element get Resource if resource instanceof I Folder if resource is Linked error I Java Model Status Constants INVALID RESOURCE element int element Type element get Element Type if element Type I Java Element COMPILATION UNIT Compilation Unit compilation Unit Compilation Unit element if is Move compilation Unit is Working Copy compilation Unit is Primary error I Java Model Status Constants INVALID ELEMENT TYPES element else if element Type I Java Element PACKAGE FRAGMENT error I Java Model Status Constants INVALID ELEMENT TYPES element Java Element dest Java Element get Destination Parent element verify Destination element dest if this renamings null verify Renaming element  MultiOperation IJavaElement JavaModelException IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST isReadOnly isRename isMove IJavaModelStatusConstants READ_ONLY IResource getResource IFolder isLinked IJavaModelStatusConstants INVALID_RESOURCE elementType getElementType elementType IJavaElement COMPILATION_UNIT CompilationUnit compilationUnit CompilationUnit isMove compilationUnit isWorkingCopy compilationUnit isPrimary IJavaModelStatusConstants INVALID_ELEMENT_TYPES elementType IJavaElement PACKAGE_FRAGMENT IJavaModelStatusConstants INVALID_ELEMENT_TYPES JavaElement JavaElement getDestinationParent verifyDestination verifyRenaming

protected String f Source null When executed this operation will create a compilation unit with the given name The name should have the java suffix public Create Compilation Unit Operation I Package Fragment parent Element String name String source boolean force super null new I Java Element parent Element force f Name name f Source source  fSource CreateCompilationUnitOperation IPackageFragment parentElement IJavaElement parentElement fName fSource
Creates a compilation unit exception Java Model Exception if unable to create the compilation unit protected void execute Operation throws Java Model Exception try begin Task Util bind operation create Unit Progress 2 NON NLS 1 Java Element Delta delta new Java Element Delta I Compilation Unit unit get Compilation Unit I Package Fragment pkg I Package Fragment get Parent Element I Container folder I Container pkg get Resource worked 1 I File compilation Unit File folder get File new Path f Name if compilation Unit File exists update the contents of the existing unit if f Force is true if force I Buffer buffer unit get Buffer if buffer null return buffer set Contents f Source unit save new Null Progress Monitor false result Elements new I Java Element unit if Util is Excluded unit unit get Parent exists for int i 0 i result Elements length i delta changed result Elements i I Java Element Delta F CONTENT add Delta delta else throw new Java Model Exception new Java Model Status I Java Model Status Constants NAME COLLISION Util bind status name Collision compilation Unit File get Full Path to String NON NLS 1 else try String encoding null try encoding folder get Default Charset get folder encoding as file is not accessible catch Core Exception ce use no encoding Input Stream stream new Byte Array Input Stream encoding null f Source get Bytes f Source get Bytes encoding create File folder unit get Element Name stream force result Elements new I Java Element unit if Util is Excluded unit unit get Parent exists for int i 0 i result Elements length i delta added result Elements i add Delta delta catch IO Exception e throw new Java Model Exception e I Java Model Status Constants IO EXCEPTION worked 1 finally done  JavaModelException executeOperation JavaModelException beginTask createUnitProgress JavaElementDelta newJavaElementDelta ICompilationUnit getCompilationUnit IPackageFragment IPackageFragment getParentElement IContainer IContainer getResource IFile compilationUnitFile getFile fName compilationUnitFile fForce IBuffer getBuffer setContents fSource NullProgressMonitor resultElements IJavaElement isExcluded getParent resultElements resultElements IJavaElementDelta F_CONTENT addDelta JavaModelException JavaModelStatus IJavaModelStatusConstants NAME_COLLISION nameCollision compilationUnitFile getFullPath toString getDefaultCharset CoreException InputStream ByteArrayInputStream fSource getBytes fSource getBytes createFile getElementName resultElements IJavaElement isExcluded getParent resultElements resultElements addDelta IOException JavaModelException IJavaModelStatusConstants IO_EXCEPTION
see Create Element InCU Operation get Compilation Unit protected I Compilation Unit get Compilation Unit return I Package Fragment get Parent Element get Compilation Unit f Name  CreateElementInCUOperation getCompilationUnit ICompilationUnit getCompilationUnit IPackageFragment getParentElement getCompilationUnit fName
protected I Scheduling Rule get Scheduling Rule I Resource resource get Compilation Unit get Resource I Workspace workspace resource get Workspace if resource exists return workspace get Rule Factory modify Rule resource else return workspace get Rule Factory create Rule resource  ISchedulingRule getSchedulingRule IResource getCompilationUnit getResource IWorkspace getWorkspace getRuleFactory modifyRule getRuleFactory createRule
Possible failures ul li NO ELEMENTS TO PROCESS the package fragment supplied to the operation is code null code li INVALID NAME the compilation unit name provided to the operation is code null code or has an invalid syntax li INVALID CONTENTS the source specified for the compiliation unit is null ul public I Java Model Status verify if get Parent Element null return new Java Model Status I Java Model Status Constants NO ELEMENTS TO PROCESS if Java Conventions validate Compilation Unit Name f Name get Severity I Status ERROR return new Java Model Status I Java Model Status Constants INVALID NAME f Name if f Source null return new Java Model Status I Java Model Status Constants INVALID CONTENTS return Java Model Status VERIFIED OK  NO_ELEMENTS_TO_PROCESS INVALID_NAME INVALID_CONTENTS IJavaModelStatus getParentElement JavaModelStatus IJavaModelStatusConstants NO_ELEMENTS_TO_PROCESS JavaConventions validateCompilationUnitName fName getSeverity IStatus JavaModelStatus IJavaModelStatusConstants INVALID_NAME fName fSource JavaModelStatus IJavaModelStatusConstants INVALID_CONTENTS JavaModelStatus VERIFIED_OK

protected int f Replacement Length 1 Constructs an operation that creates a Java Language Element with the specified parent contained within a compilation unit public Create Element InCU Operation I Java Element parent Element super null new I Java Element parent Element initialize Default Position  fReplacementLength CreateElementInCUOperation IJavaElement parentElement IJavaElement parentElement initializeDefaultPosition
Only allow cancelling if this operation is not nested protected void check Canceled if is Nested super check Canceled  checkCanceled isNested checkCanceled
Instructs this operation to position the new element after the given sibling or to add the new element as the last child of its parent if code null code public void create After I Java Element sibling set Relative Position sibling INSERT AFTER  createAfter IJavaElement setRelativePosition INSERT_AFTER
Instructs this operation to position the new element before the given sibling or to add the new element as the last child of its parent if code null code public void create Before I Java Element sibling set Relative Position sibling INSERT BEFORE  createBefore IJavaElement setRelativePosition INSERT_BEFORE
Execute the operation generate new source for the compilation unit and save the results exception Java Model Exception if the operation is unable to complete protected void execute Operation throws Java Model Exception try begin Task get Main Task Name get Main Amount Of Work Java Element Delta delta new Java Element Delta I Compilation Unit unit get Compilation Unit generate New Compilation UnitDOM unit if f Creation Occurred a change has really occurred I Buffer buffer unit get Buffer if buffer null return char buffer Contents buffer get Characters if buffer Contents null return char element Contents Util normalizeC Rs get Created Element Characters buffer Contents switch f Replacement Length case 1 element is append at the end buffer append element Contents break case 0 element is inserted buffer replace f Insertion Position 0 element Contents break default element is replacing the previous one buffer replace f Insertion Position f Replacement Length element Contents unit save null false boolean is Working Copy unit is Working Copy if is Working Copy this set Attribute HAS MODIFIED RESOURCE ATTR TRUE worked 1 result Elements generate Result Handles if is Working Copy if unit is working copy then save will have already fired the delta Util is Excluded unit unit get Parent exists for int i 0 i result Elements length i delta added result Elements i add Delta delta else unit is created outside classpath non java resource delta will be notified by delta processor finally done  JavaModelException executeOperation JavaModelException beginTask getMainTaskName getMainAmountOfWork JavaElementDelta newJavaElementDelta ICompilationUnit getCompilationUnit generateNewCompilationUnitDOM fCreationOccurred IBuffer getBuffer bufferContents getCharacters bufferContents elementContents normalizeCRs getCreatedElementCharacters bufferContents fReplacementLength elementContents fInsertionPosition elementContents fInsertionPosition fReplacementLength elementContents isWorkingCopy isWorkingCopy isWorkingCopy setAttribute HAS_MODIFIED_RESOURCE_ATTR resultElements generateResultHandles isWorkingCopy isExcluded getParent resultElements resultElements addDelta
Returns the current contents of the created document fragment as a character array deprecated marked deprecated to suppress JDOM related deprecation warnings TODO JDOM remove once model ported off of JDOM private char get Created Element Characters return f Created Element get Characters  getCreatedElementCharacters fCreatedElement getCharacters
Returns a JDOM document fragment for the element being created deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM 
protected abstract IDOM Node generate ElementDOM throws Java Model Exception Returns the DOM with the new source to use for the given compilation unit deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected void generate New Compilation UnitDOM I Compilation Unit cu throws Java Model Exception I Buffer buffer cu get Buffer if buffer null return char prev Source buffer get Characters if prev Source null return create a JDOM for the compilation unit fCUDOM new DOM Factory create Compilation Unit prev Source cu get Element Name IDOM Node child generate ElementDOM if child null insertDOM Node fCUDOM child worked 1  IDOMNode generateElementDOM JavaModelException generateNewCompilationUnitDOM ICompilationUnit JavaModelException IBuffer getBuffer prevSource getCharacters prevSource DOMFactory createCompilationUnit prevSource getElementName IDOMNode generateElementDOM insertDOMNode
worked 1 Creates and returns the handle for the element this operation created protected abstract I Java Element generate Result Handle  IJavaElement generateResultHandle
protected abstract I Java Element generate Result Handle Creates and returns the handles for the elements this operation created protected I Java Element generate Result Handles return new I Java Element generate Result Handle  IJavaElement generateResultHandle IJavaElement generateResultHandles IJavaElement generateResultHandle
Returns the compilation unit in which the new element is being created protected I Compilation Unit get Compilation Unit return get Compilation Unit For get Parent Element  ICompilationUnit getCompilationUnit getCompilationUnitFor getParentElement
Returns the amount of work for the main task of this operation for progress reporting protected int get Main Amount Of Work return 2  getMainAmountOfWork
Returns the name of the main task of this operation for progress reporting 
protected I Scheduling Rule get Scheduling Rule I Resource resource get Compilation Unit get Resource I Workspace workspace resource get Workspace return workspace get Rule Factory modify Rule resource  ISchedulingRule getSchedulingRule IResource getCompilationUnit getResource IWorkspace getWorkspace getRuleFactory modifyRule
Sets the default position in which to create the new type member Operations that require a different default position must override this method protected void initialize Default Position By default the new element is positioned as the last child of the parent element in which it is created  initializeDefaultPosition
Inserts the given child into the given JDOM based on the position settings of this operation see create After I Java Element see create Before I Java Element deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected void insertDOM Node IDOM Node parent IDOM Node child if f Insertion Policy INSERT LAST IDOM Node sibling Java Element f Anchor Element find Node fCUDOM if sibling null f Insertion Policy INSERT AFTER sibling sibling get Next Node if sibling null sibling insert Sibling child f Created Element DOM Node child f Insertion Position DOM Node sibling get Start Position f Replacement Length 0 return add as the last element of the parent parent add Child child f Created Element org eclipse jdt internal core jdom DOM Node child f Insertion Position org eclipse jdt internal core jdom DOM Node parent get Insertion Position f Insertion Position last Child null DOM Node parent get Insertion Position last Child get Insertion Position f Replacement Length parent get Parent null 1 0  createAfter IJavaElement createBefore IJavaElement insertDOMNode IDOMNode IDOMNode fInsertionPolicy INSERT_LAST IDOMNode JavaElement fAnchorElement findNode fInsertionPolicy INSERT_AFTER getNextNode insertSibling fCreatedElement DOMNode fInsertionPosition DOMNode getStartPosition fReplacementLength addChild fCreatedElement DOMNode fInsertionPosition DOMNode getInsertionPosition fInsertionPosition lastChild DOMNode getInsertionPosition lastChild getInsertionPosition fReplacementLength getParent
Sets the name of the code DOM Node code that will be used to create this new element Used by the code Copy Elements Operation code for renaming Only used for code Create Type Member Operation code protected void set Altered Name String new Name implementation in Create Type Member Operation  DOMNode CopyElementsOperation CreateTypeMemberOperation setAlteredName newName CreateTypeMemberOperation
Instructs this operation to position the new element relative to the given sibling or to add the new element as the last child of its parent if code null code The code position code must be one of the position constants protected void set Relative Position I Java Element sibling int policy throws Illegal Argument Exception if sibling null f Anchor Element null f Insertion Policy INSERT LAST else f Anchor Element sibling f Insertion Policy policy  setRelativePosition IJavaElement IllegalArgumentException fAnchorElement fInsertionPolicy INSERT_LAST fAnchorElement fInsertionPolicy
Possible failures ul li NO ELEMENTS TO PROCESS the compilation unit supplied to the operation is code null code li INVALID NAME no name a name was null or not a valid import declaration name li INVALID SIBLING the sibling provided for positioning is not valid ul see I Java Model Status see org eclipse jdt core Java Conventions public I Java Model Status verify if get Parent Element null return new Java Model Status I Java Model Status Constants NO ELEMENTS TO PROCESS if f Anchor Element null I Java Element dom Present Parent f Anchor Element get Parent if dom Present Parent get Element Type I Java Element IMPORT CONTAINER dom Present Parent dom Present Parent get Parent if dom Present Parent equals get Parent Element return new Java Model Status I Java Model Status Constants INVALID SIBLING f Anchor Element return Java Model Status VERIFIED OK  NO_ELEMENTS_TO_PROCESS INVALID_NAME INVALID_SIBLING IJavaModelStatus JavaConventions IJavaModelStatus getParentElement JavaModelStatus IJavaModelStatusConstants NO_ELEMENTS_TO_PROCESS fAnchorElement IJavaElement domPresentParent fAnchorElement getParent domPresentParent getElementType IJavaElement IMPORT_CONTAINER domPresentParent domPresentParent getParent domPresentParent getParentElement JavaModelStatus IJavaModelStatusConstants INVALID_SIBLING fAnchorElement JavaModelStatus VERIFIED_OK

public class Create Field Operation extends Create Type Member Operation When executed this operation will create a field with the given name in the given type with the specified source p By default the new field is positioned after the last existing field declaration or as the first member in the type if there are no field declarations public Create Field Operation I Type parent Element String source boolean force super parent Element source force  CreateFieldOperation CreateTypeMemberOperation CreateFieldOperation IType parentElement parentElement
see Create Type Member Operation generate Syntax IncorrectDOM deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected IDOM Node generate ElementDOM throws Java Model Exception if fDOM Node null fDOM Node new DOM Factory create Field f Source if fDOM Node null fDOM Node generate Syntax IncorrectDOM if fDOM Node null throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID CONTENTS if f Altered Name null fDOM Node null fDOM Node set Name f Altered Name if fDOM Node instanceof IDOM Field throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID CONTENTS return fDOM Node  CreateTypeMemberOperation generateSyntaxIncorrectDOM IDOMNode generateElementDOM JavaModelException fDOMNode fDOMNode DOMFactory createField fSource fDOMNode fDOMNode generateSyntaxIncorrectDOM fDOMNode JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_CONTENTS fAlteredName fDOMNode fDOMNode setName fAlteredName fDOMNode IDOMField JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_CONTENTS fDOMNode
see Create Element InCU Operation generate Result Handle protected I Java Element generate Result Handle return get Type get Field getDOM Node Name  CreateElementInCUOperation generateResultHandle IJavaElement generateResultHandle getType getField getDOMNodeName
see Create Element InCU Operation get Main Task Name public String get Main Task Name return Util bind operation create Field Progress NON NLS 1  CreateElementInCUOperation getMainTaskName getMainTaskName createFieldProgress
By default the new field is positioned after the last existing field declaration or as the first member in the type if there are no field declarations protected void initialize Default Position I Type parent Element get Type try I Java Element elements parent Element get Fields if elements null elements length 0 create After elements elements length 1 else elements parent Element get Children if elements null elements length 0 create Before elements 0 catch Java Model Exception e type doesn t exist ignore  initializeDefaultPosition IType parentElement getType IJavaElement parentElement getFields createAfter parentElement getChildren createBefore JavaModelException
see Create Type Member Operation verify Name Collision protected I Java Model Status verify Name Collision I Type type get Type if type get Field getDOM Node Name exists return new Java Model Status I Java Model Status Constants NAME COLLISION Util bind status name Collision getDOM Node Name NON NLS 1 return Java Model Status VERIFIED OK  CreateTypeMemberOperation verifyNameCollision IJavaModelStatus verifyNameCollision IType getType getField getDOMNodeName JavaModelStatus IJavaModelStatusConstants NAME_COLLISION nameCollision getDOMNodeName JavaModelStatus VERIFIED_OK
deprecated marked deprecated to suppress JDOM related deprecation warnings TODO JDOM remove once model ported off of JDOM private String getDOM Node Name return fDOM Node get Name  getDOMNodeName fDOMNode getName

protected String f Import Name When executed this operation will add an import to the given compilation unit public Create Import Operation String import Name I Compilation Unit parent Element super parent Element f Import Name import Name  fImportName CreateImportOperation importName ICompilationUnit parentElement parentElement fImportName importName
see Create Type Member Operation deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected IDOM Node generate ElementDOM if fCUDOM get Child f Import Name null DOM Factory factory new DOM Factory not a duplicate IDOM Import imp factory create Import imp set Name f Import Name return imp no new import was generated f Creation Occurred false all the work has already been done return null  CreateTypeMemberOperation IDOMNode generateElementDOM getChild fImportName DOMFactory DOMFactory IDOMImport createImport setName fImportName fCreationOccurred
see Create Element InCU Operation generate Result Handle protected I Java Element generate Result Handle return get Compilation Unit get Import f Import Name  CreateElementInCUOperation generateResultHandle IJavaElement generateResultHandle getCompilationUnit getImport fImportName
see Create Element InCU Operation get Main Task Name public String get Main Task Name return Util bind operation create Imports Progress NON NLS 1  CreateElementInCUOperation getMainTaskName getMainTaskName createImportsProgress
Sets the correct position for the new import ul li after the last import li if no imports before the first type li if no type after the package statement li and if no package statement first thing in the CU protected void initialize Default Position try I Compilation Unit cu get Compilation Unit I Import Declaration imports cu get Imports if imports length 0 create After imports imports length 1 return I Type types cu get Types if types length 0 create Before types 0 return I Java Element children cu get Children look for the package declaration for int i 0 i children length i if children i get Element Type I Java Element PACKAGE DECLARATION create After children i return catch Java Model Exception e cu doesn t exit ignore  initializeDefaultPosition ICompilationUnit getCompilationUnit IImportDeclaration getImports createAfter IType getTypes createBefore IJavaElement getChildren getElementType IJavaElement PACKAGE_DECLARATION createAfter JavaModelException
Possible failures ul li NO ELEMENTS TO PROCESS the compilation unit supplied to the operation is code null code li INVALID NAME not a valid import declaration name ul see I Java Model Status see Java Conventions public I Java Model Status verify I Java Model Status status super verify if status isOK return status if Java Conventions validate Import Declaration f Import Name get Severity I Status ERROR return new Java Model Status I Java Model Status Constants INVALID NAME f Import Name return Java Model Status VERIFIED OK  NO_ELEMENTS_TO_PROCESS INVALID_NAME IJavaModelStatus JavaConventions IJavaModelStatus IJavaModelStatus JavaConventions validateImportDeclaration fImportName getSeverity IStatus JavaModelStatus IJavaModelStatusConstants INVALID_NAME fImportName JavaModelStatus VERIFIED_OK

protected int f Number Of Initializers 1 When executed this operation will create an initializer with the given name in the given type with the specified source p By default the new initializer is positioned after the last existing initializer declaration or as the first member in the type if there are no initializers public Create Initializer Operation I Type parent Element String source super parent Element source false  fNumberOfInitializers CreateInitializerOperation IType parentElement parentElement
see Create Type Member Operation generate Syntax IncorrectDOM deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected IDOM Node generate ElementDOM throws Java Model Exception if fDOM Node null fDOM Node new DOM Factory create Initializer f Source if fDOM Node null fDOM Node generate Syntax IncorrectDOM if fDOM Node null throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID CONTENTS if fDOM Node instanceof IDOM Initializer throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID CONTENTS return fDOM Node  CreateTypeMemberOperation generateSyntaxIncorrectDOM IDOMNode generateElementDOM JavaModelException fDOMNode fDOMNode DOMFactory createInitializer fSource fDOMNode fDOMNode generateSyntaxIncorrectDOM fDOMNode JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_CONTENTS fDOMNode IDOMInitializer JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_CONTENTS fDOMNode
see Create Element InCU Operation generate Result Handle protected I Java Element generate Result Handle try update the children to be current get Type get Compilation Unit close if f Anchor Element null return get Type get Initializer f Number Of Initializers else I Java Element children get Type get Children int count 0 for int i 0 i children length i I Java Element child children i if child equals f Anchor Element if child get Element Type I Java Element INITIALIZER f Insertion Policy Create Element InCU Operation INSERT AFTER count return get Type get Initializer count else if child get Element Type I Java Element INITIALIZER count catch Java Model Exception e type doesn t exist ignore return null  CreateElementInCUOperation generateResultHandle IJavaElement generateResultHandle getType getCompilationUnit fAnchorElement getType getInitializer fNumberOfInitializers IJavaElement getType getChildren IJavaElement fAnchorElement getElementType IJavaElement fInsertionPolicy CreateElementInCUOperation INSERT_AFTER getType getInitializer getElementType IJavaElement JavaModelException
see Create Element InCU Operation get Main Task Name public String get Main Task Name return Util bind operation create Initializer Progress NON NLS 1  CreateElementInCUOperation getMainTaskName getMainTaskName createInitializerProgress
By default the new initializer is positioned after the last existing initializer declaration or as the first member in the type if there are no initializers protected void initialize Default Position I Type parent Element get Type try I Java Element elements parent Element get Initializers if elements null elements length 0 f Number Of Initializers elements length create After elements elements length 1 else elements parent Element get Children if elements null elements length 0 create Before elements 0 catch Java Model Exception e type doesn t exist ignore  initializeDefaultPosition IType parentElement getType IJavaElement parentElement getInitializers fNumberOfInitializers createAfter parentElement getChildren createBefore JavaModelException

protected String f Parameter Types When executed this operation will create a method in the given type with the specified source public Create Method Operation I Type parent Element String source boolean force super parent Element source force  fParameterTypes CreateMethodOperation IType parentElement parentElement
Returns the type signatures of the parameter types of the current code DOM Method code deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected String convertDOM Method Types To Signatures if f Parameter Types null if isDOM Node Null String dom Parameter Types IDOM Method fDOM Node get Parameter Types if dom Parameter Types null f Parameter Types new String dom Parameter Types length convert the DOM types to signatures int i for i 0 i f Parameter Types length i f Parameter Types i Signature create Type Signature dom Parameter Types i to Char Array false return f Parameter Types  DOMMethod convertDOMMethodTypesToSignatures fParameterTypes isDOMNodeNull domParameterTypes IDOMMethod fDOMNode getParameterTypes domParameterTypes fParameterTypes domParameterTypes fParameterTypes fParameterTypes createTypeSignature domParameterTypes toCharArray fParameterTypes
see Create Type Member Operation generate Syntax IncorrectDOM deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected IDOM Node generate ElementDOM throws Java Model Exception if fDOM Node null fDOM Node new DOM Factory create Method f Source if fDOM Node null syntactically incorrect source fDOM Node generate Syntax IncorrectDOM if fDOM Node null throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID CONTENTS if f Altered Name null isDOM Node Null fDOM Node set Name f Altered Name if fDOM Node instanceof IDOM Method throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID CONTENTS return fDOM Node  CreateTypeMemberOperation generateSyntaxIncorrectDOM IDOMNode generateElementDOM JavaModelException fDOMNode fDOMNode DOMFactory createMethod fSource fDOMNode fDOMNode generateSyntaxIncorrectDOM fDOMNode JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_CONTENTS fAlteredName isDOMNodeNull fDOMNode setName fAlteredName fDOMNode IDOMMethod JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_CONTENTS fDOMNode
see Create Element InCU Operation generate Result Handle protected I Java Element generate Result Handle String types convertDOM Method Types To Signatures String name compute Name return get Type get Method name types  CreateElementInCUOperation generateResultHandle IJavaElement generateResultHandle convertDOMMethodTypesToSignatures computeName getType getMethod
deprecated marked deprecated to suppress JDOM related deprecation warnings TODO JDOM remove once model ported off of JDOM private String compute Name String name if IDOM Method fDOM Node is Constructor name fDOM Node get Parent get Name else name getDOM Node Name return name  computeName IDOMMethod fDOMNode isConstructor fDOMNode getParent getName getDOMNodeName
deprecated marked deprecated to suppress JDOM related deprecation warnings TODO JDOM remove once model ported off of JDOM private String getDOM Node Name return fDOM Node get Name  getDOMNodeName fDOMNode getName
see Create Element InCU Operation get Main Task Name public String get Main Task Name return Util bind operation create Method Progress NON NLS 1  CreateElementInCUOperation getMainTaskName getMainTaskName createMethodProgress
see Create Type Member Operation verify Name Collision protected I Java Model Status verify Name Collision if isDOM Node Null I Type type get Type String name getDOM Node Name if name null constructor name type get Element Name String types convertDOM Method Types To Signatures if type get Method name types exists return new Java Model Status I Java Model Status Constants NAME COLLISION Util bind status name Collision name NON NLS 1 return Java Model Status VERIFIED OK  CreateTypeMemberOperation verifyNameCollision IJavaModelStatus verifyNameCollision isDOMNodeNull IType getType getDOMNodeName getElementName convertDOMMethodTypesToSignatures getMethod JavaModelStatus IJavaModelStatusConstants NAME_COLLISION nameCollision JavaModelStatus VERIFIED_OK
deprecated marked deprecated to suppress JDOM related deprecation warnings TODO JDOM remove once model ported off of JDOM private boolean isDOM Node Null return fDOM Node null  isDOMNodeNull fDOMNode

protected String f Name null When executed this operation will add a package declaration to the given compilation unit public Create Package Declaration Operation String name I Compilation Unit parent Element super parent Element f Name name  fName CreatePackageDeclarationOperation ICompilationUnit parentElement parentElement fName
see Create Type Member Operation generate Syntax IncorrectDOM deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected IDOM Node generate ElementDOM throws Java Model Exception I Java Element children get Compilation Unit get Children look for an existing package declaration for int i 0 i children length i if children i get Element Type I Java Element PACKAGE DECLARATION I Package Declaration pck I Package Declaration children i IDOM Package pack IDOM Package Java Element pck find Node fCUDOM if pack get Name equals f Name get the insertion position before setting the name as this makes it a detailed node thus the start position is always 0 DOM Node node org eclipse jdt internal core jdom DOM Node pack f Insertion Position node get Start Position f Replacement Length node get End Position f Insertion Position 1 pack set Name f Name f Created Element org eclipse jdt internal core jdom DOM Node pack else equivalent package declaration already exists f Creation Occurred false return null IDOM Package pack new DOM Factory create Package pack set Name f Name return pack  CreateTypeMemberOperation generateSyntaxIncorrectDOM IDOMNode generateElementDOM JavaModelException IJavaElement getCompilationUnit getChildren getElementType IJavaElement PACKAGE_DECLARATION IPackageDeclaration IPackageDeclaration IDOMPackage IDOMPackage JavaElement findNode getName fName DOMNode DOMNode fInsertionPosition getStartPosition fReplacementLength getEndPosition fInsertionPosition setName fName fCreatedElement DOMNode fCreationOccurred IDOMPackage DOMFactory createPackage setName fName
Creates and returns the handle for the element this operation created protected I Java Element generate Result Handle return get Compilation Unit get Package Declaration f Name  IJavaElement generateResultHandle getCompilationUnit getPackageDeclaration fName
see Create Element InCU Operation get Main Task Name public String get Main Task Name return Util bind operation create Package Progress NON NLS 1  CreateElementInCUOperation getMainTaskName getMainTaskName createPackageProgress
Sets the correct position for new package declaration ul li before the first import li if no imports before the first type li if no type first thing in the CU li protected void initialize Default Position try I Compilation Unit cu get Compilation Unit I Import Declaration imports cu get Imports if imports length 0 create Before imports 0 return I Type types cu get Types if types length 0 create Before types 0 return catch Java Model Exception e cu doesn t exist ignore  initializeDefaultPosition ICompilationUnit getCompilationUnit IImportDeclaration getImports createBefore IType getTypes createBefore JavaModelException
Possible failures ul li NO ELEMENTS TO PROCESS no compilation unit was supplied to the operation li INVALID NAME a name supplied to the operation was not a valid package declaration name ul see I Java Model Status see Java Conventions public I Java Model Status verify I Java Model Status status super verify if status isOK return status if Java Conventions validate Package Name f Name get Severity I Status ERROR return new Java Model Status I Java Model Status Constants INVALID NAME f Name return Java Model Status VERIFIED OK  NO_ELEMENTS_TO_PROCESS INVALID_NAME IJavaModelStatus JavaConventions IJavaModelStatus IJavaModelStatus JavaConventions validatePackageName fName getSeverity IStatus JavaModelStatus IJavaModelStatusConstants INVALID_NAME fName JavaModelStatus VERIFIED_OK

protected String f Name When executed this operation will create a package fragment with the given name under the given package fragment root The dot separated name is broken into segments Intermediate folders are created as required for each segment If the folders already exist this operation has no effect public Create Package Fragment Operation I Package Fragment Root parent Element String package Name boolean force super null new I Java Element parent Element force f Name package Name  fName CreatePackageFragmentOperation IPackageFragmentRoot parentElement packageName IJavaElement parentElement fName packageName
Execute the operation creates the new package fragment and any side effect package fragments exception Java Model Exception if the operation is unable to complete protected void execute Operation throws Java Model Exception Java Element Delta delta null I Package Fragment Root root I Package Fragment Root get Parent Element String names Util get Trimmed Simple Names f Name begin Task Util bind operation create Package Fragment Progress names length NON NLS 1 I Container parent Folder I Container root get Resource String side Effect Package Name NON NLS 1 Array List results new Array List names length char inclusion Patterns Package Fragment Root root full Inclusion Pattern Chars char exclusion Patterns Package Fragment Root root full Exclusion Pattern Chars int i for i 0 i names length i String sub Folder Name names i side Effect Package Name sub Folder Name I Resource sub Folder parent Folder find Member sub Folder Name if sub Folder null create Folder parent Folder sub Folder Name force parent Folder parent Folder get Folder new Path sub Folder Name I Package Fragment added Frag root get Package Fragment side Effect Package Name if Util is Excluded parent Folder inclusion Patterns exclusion Patterns if delta null delta new Java Element Delta delta added added Frag results add added Frag else parent Folder I Container sub Folder side Effect Package Name worked 1 if results size 0 result Elements new I Java Element results size results to Array result Elements if delta null add Delta delta done  JavaModelException executeOperation JavaModelException JavaElementDelta IPackageFragmentRoot IPackageFragmentRoot getParentElement getTrimmedSimpleNames fName beginTask createPackageFragmentProgress IContainer parentFolder IContainer getResource sideEffectPackageName ArrayList ArrayList inclusionPatterns PackageFragmentRoot fullInclusionPatternChars exclusionPatterns PackageFragmentRoot fullExclusionPatternChars subFolderName sideEffectPackageName subFolderName IResource subFolder parentFolder findMember subFolderName subFolder createFolder parentFolder subFolderName parentFolder parentFolder getFolder subFolderName IPackageFragment addedFrag getPackageFragment sideEffectPackageName isExcluded parentFolder inclusionPatterns exclusionPatterns newJavaElementDelta addedFrag addedFrag parentFolder IContainer subFolder sideEffectPackageName resultElements IJavaElement toArray resultElements addDelta
Possible failures ul li NO ELEMENTS TO PROCESS the root supplied to the operation is code null code li INVALID NAME the name provided to the operation is code null code or is not a valid package fragment name li READ ONLY the root provided to this operation is read only li NAME COLLISION there is a pre existing resource file with the same name as a folder in the package fragment s hierarchy li ELEMENT NOT PRESENT the underlying resource for the root is missing ul see I Java Model Status see Java Conventions public I Java Model Status verify if get Parent Element null return new Java Model Status I Java Model Status Constants NO ELEMENTS TO PROCESS if f Name null f Name length 0 Java Conventions validate Package Name f Name get Severity I Status ERROR return new Java Model Status I Java Model Status Constants INVALID NAME f Name I Package Fragment Root root I Package Fragment Root get Parent Element if root is Read Only return new Java Model Status I Java Model Status Constants READ ONLY root String names Util get Trimmed Simple Names f Name I Container parent Folder I Container root get Resource int i for i 0 i names length i I Resource sub Folder parent Folder find Member names i if sub Folder null if sub Folder get Type I Resource FOLDER return new Java Model Status I Java Model Status Constants NAME COLLISION Util bind status name Collision sub Folder get Full Path to String NON NLS 1 parent Folder I Container sub Folder return Java Model Status VERIFIED OK  NO_ELEMENTS_TO_PROCESS INVALID_NAME READ_ONLY NAME_COLLISION ELEMENT_NOT_PRESENT IJavaModelStatus JavaConventions IJavaModelStatus getParentElement JavaModelStatus IJavaModelStatusConstants NO_ELEMENTS_TO_PROCESS fName fName JavaConventions validatePackageName fName getSeverity IStatus JavaModelStatus IJavaModelStatusConstants INVALID_NAME fName IPackageFragmentRoot IPackageFragmentRoot getParentElement isReadOnly JavaModelStatus IJavaModelStatusConstants READ_ONLY getTrimmedSimpleNames fName IContainer parentFolder IContainer getResource IResource subFolder parentFolder findMember subFolder subFolder getType IResource JavaModelStatus IJavaModelStatusConstants NAME_COLLISION nameCollision subFolder getFullPath toString parentFolder IContainer subFolder JavaModelStatus VERIFIED_OK

Constructs an operation to create a type hierarchy for the given type within the specified region in the context of the given project public Create Type Hierarchy Operation I Region region I Java Project project I Compilation Unit working Copies I Type element boolean compute Subtypes super element this type Hierarchy new Region Based Type Hierarchy region project working Copies element compute Subtypes  CreateTypeHierarchyOperation IRegion IJavaProject ICompilationUnit workingCopies IType computeSubtypes typeHierarchy RegionBasedTypeHierarchy workingCopies computeSubtypes
Constructs an operation to create a type hierarchy for the given type and working copies public Create Type Hierarchy Operation I Type element I Compilation Unit working Copies I Java Search Scope scope boolean compute Subtypes super element I Compilation Unit copies if working Copies null int length working Copies length copies new I Compilation Unit length System arraycopy working Copies 0 copies 0 length else copies null this type Hierarchy new Type Hierarchy element copies scope compute Subtypes  CreateTypeHierarchyOperation IType ICompilationUnit workingCopies IJavaSearchScope computeSubtypes ICompilationUnit workingCopies workingCopies ICompilationUnit workingCopies typeHierarchy TypeHierarchy computeSubtypes
Constructs an operation to create a type hierarchy for the given type and working copies public Create Type Hierarchy Operation I Type element I Compilation Unit working Copies I Java Project project boolean compute Subtypes super element I Compilation Unit copies if working Copies null int length working Copies length copies new I Compilation Unit length System arraycopy working Copies 0 copies 0 length else copies null this type Hierarchy new Type Hierarchy element copies project compute Subtypes  CreateTypeHierarchyOperation IType ICompilationUnit workingCopies IJavaProject computeSubtypes ICompilationUnit workingCopies workingCopies ICompilationUnit workingCopies typeHierarchy TypeHierarchy computeSubtypes
Performs the operation creates the type hierarchy exception Java Model Exception The operation has failed protected void execute Operation throws Java Model Exception this type Hierarchy refresh this  JavaModelException executeOperation JavaModelException typeHierarchy
Returns the generated type hierarchy public I Type Hierarchy get Result return this type Hierarchy  ITypeHierarchy getResult typeHierarchy
see Java Model Operation public boolean is Read Only return true  JavaModelOperation isReadOnly
Possible failures ul li NO ELEMENTS TO PROCESS at least one of a type or region must be provided to generate a type hierarchy li ELEMENT NOT PRESENT the provided type or type s project does not exist ul public I Java Model Status verify I Java Element element To Process get Element To Process if element To Process null this type Hierarchy instanceof Region Based Type Hierarchy return new Java Model Status I Java Model Status Constants NO ELEMENTS TO PROCESS if element To Process null element To Process exists return new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST element To Process I Java Project project this type Hierarchy java Project if project null project exists return new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST project return Java Model Status VERIFIED OK  NO_ELEMENTS_TO_PROCESS ELEMENT_NOT_PRESENT IJavaModelStatus IJavaElement elementToProcess getElementToProcess elementToProcess typeHierarchy RegionBasedTypeHierarchy JavaModelStatus IJavaModelStatusConstants NO_ELEMENTS_TO_PROCESS elementToProcess elementToProcess JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST elementToProcess IJavaProject typeHierarchy javaProject JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST JavaModelStatus VERIFIED_OK

protected IDOM Node fDOM Node When executed this operation will create a type member in the given parent element with the specified source public Create Type Member Operation I Java Element parent Element String source boolean force super parent Element f Source source this force force  IDOMNode fDOMNode CreateTypeMemberOperation IJavaElement parentElement parentElement fSource
see Create Element InCU Operation generate New Compilation UnitDOM deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected void generate New Compilation UnitDOM I Compilation Unit cu throws Java Model Exception I Buffer buffer cu get Buffer if buffer null return char prev Source buffer get Characters if prev Source null return create a JDOM for the compilation unit fCUDOM new DOM Factory create Compilation Unit prev Source cu get Element Name IDOM Node parent Java Element get Parent Element find Node fCUDOM if parent null find Node does not work for autogenerated C Us as the contents are empty parent fCUDOM IDOM Node child deprecated Generate ElementDOM if child null insertDOM Node parent child worked 1  CreateElementInCUOperation generateNewCompilationUnitDOM generateNewCompilationUnitDOM ICompilationUnit JavaModelException IBuffer getBuffer prevSource getCharacters prevSource DOMFactory createCompilationUnit prevSource getElementName IDOMNode JavaElement getParentElement findNode findNode CUs IDOMNode deprecatedGenerateElementDOM insertDOMNode
Generates a code IDOM Node code based on the source of this operation when there is likely a syntax error in the source deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected IDOM Node generate Syntax IncorrectDOM create some dummy source to generate a dom node String Buffer buff new String Buffer buff append Util LINE SEPARATOR public class A Util LINE SEPARATOR NON NLS 1 buff append f Source buff append Util LINE SEPARATOR append IDOM Compilation Unit domCU new DOM Factory create Compilation Unit buff to String A java NON NLS 1 IDOM Node node IDOM Node domCU get Child A get Children next Element NON NLS 1 if node null node remove return node  IDOMNode IDOMNode generateSyntaxIncorrectDOM StringBuffer StringBuffer LINE_SEPARATOR LINE_SEPARATOR fSource LINE_SEPARATOR IDOMCompilationUnit DOMFactory createCompilationUnit toString IDOMNode IDOMNode getChild getChildren nextElement
Returns the I Type the member is to be created in protected I Type get Type return I Type get Parent Element  IType IType getType IType getParentElement
Sets the name of the code DOM Node code that will be used to create this new element Used by the code Copy Elements Operation code for renaming protected void set Altered Name String new Name f Altered Name new Name  DOMNode CopyElementsOperation setAlteredName newName fAlteredName newName
Possible failures ul li NO ELEMENTS TO PROCESS the parent element supplied to the operation is code null code li INVALID CONTENTS The source is code null code or has serious syntax errors li NAME COLLISION A name collision occurred in the destination ul public I Java Model Status verify I Java Model Status status super verify if status isOK return status I Java Element parent get Parent Element non null since check was done in supper Member local Context if parent instanceof Member local Context Member parent get Outer Most Local Context null local Context parent JDOM doesn t support source manipulation in local anonymous types return new Java Model Status I Java Model Status Constants INVALID ELEMENT TYPES parent if f Source null return new Java Model Status I Java Model Status Constants INVALID CONTENTS if force check for name collisions try deprecated Generate ElementDOM catch Java Model Exception jme return jme get Java Model Status return verify Name Collision return Java Model Status VERIFIED OK  NO_ELEMENTS_TO_PROCESS INVALID_CONTENTS NAME_COLLISION IJavaModelStatus IJavaModelStatus IJavaElement getParentElement localContext localContext getOuterMostLocalContext localContext JavaModelStatus IJavaModelStatusConstants INVALID_ELEMENT_TYPES fSource JavaModelStatus IJavaModelStatusConstants INVALID_CONTENTS deprecatedGenerateElementDOM JavaModelException getJavaModelStatus verifyNameCollision JavaModelStatus VERIFIED_OK
deprecated marked deprecated to suppress JDOM related deprecation warnings TODO JDOM remove once model ported off of JDOM private IDOM Node deprecated Generate ElementDOM throws Java Model Exception return generate ElementDOM  IDOMNode deprecatedGenerateElementDOM JavaModelException generateElementDOM
Verify for a name collision in the destination container protected I Java Model Status verify Name Collision return Java Model Status VERIFIED OK  IJavaModelStatus verifyNameCollision JavaModelStatus VERIFIED_OK

public class Create Type Operation extends Create Type Member Operation When executed this operation will create a type unit in the given parent element a compilation unit type public Create Type Operation I Java Element parent Element String source boolean force super parent Element source force  CreateTypeOperation CreateTypeMemberOperation CreateTypeOperation IJavaElement parentElement parentElement
see Create Element InCU Operation generate ElementDOM deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected IDOM Node generate ElementDOM throws Java Model Exception if fDOM Node null fDOM Node new DOM Factory create Type f Source if fDOM Node null syntactically incorrect source fDOM Node generate Syntax IncorrectDOM if fDOM Node null throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID CONTENTS if f Altered Name null fDOM Node null fDOM Node set Name f Altered Name if fDOM Node instanceof IDOM Type throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID CONTENTS return fDOM Node  CreateElementInCUOperation generateElementDOM IDOMNode generateElementDOM JavaModelException fDOMNode fDOMNode DOMFactory createType fSource fDOMNode fDOMNode generateSyntaxIncorrectDOM fDOMNode JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_CONTENTS fAlteredName fDOMNode fDOMNode setName fAlteredName fDOMNode IDOMType JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_CONTENTS fDOMNode
see Create Element InCU Operation generate Result Handle protected I Java Element generate Result Handle I Java Element parent get Parent Element switch parent get Element Type case I Java Element COMPILATION UNIT return I Compilation Unit parent get Type getDOM Node Name case I Java Element TYPE return I Type parent get Type getDOM Node Name Note creating local anonymous type is not supported return null  CreateElementInCUOperation generateResultHandle IJavaElement generateResultHandle IJavaElement getParentElement getElementType IJavaElement COMPILATION_UNIT ICompilationUnit getType getDOMNodeName IJavaElement IType getType getDOMNodeName
see Create Element InCU Operation get Main Task Name public String get Main Task Name return Util bind operation create Type Progress NON NLS 1  CreateElementInCUOperation getMainTaskName getMainTaskName createTypeProgress
Returns the code I Type code the member is to be created in protected I Type get Type I Java Element parent get Parent Element if parent get Element Type I Java Element TYPE return I Type parent return null  IType IType getType IJavaElement getParentElement getElementType IJavaElement IType
see Create Type Member Operation verify Name Collision protected I Java Model Status verify Name Collision I Java Element parent get Parent Element switch parent get Element Type case I Java Element COMPILATION UNIT if I Compilation Unit parent get Type getDOM Node Name exists return new Java Model Status I Java Model Status Constants NAME COLLISION Util bind status name Collision getDOM Node Name NON NLS 1 break case I Java Element TYPE if I Type parent get Type getDOM Node Name exists return new Java Model Status I Java Model Status Constants NAME COLLISION Util bind status name Collision getDOM Node Name NON NLS 1 break Note creating local anonymous type is not supported return Java Model Status VERIFIED OK  CreateTypeMemberOperation verifyNameCollision IJavaModelStatus verifyNameCollision IJavaElement getParentElement getElementType IJavaElement COMPILATION_UNIT ICompilationUnit getType getDOMNodeName JavaModelStatus IJavaModelStatusConstants NAME_COLLISION nameCollision getDOMNodeName IJavaElement IType getType getDOMNodeName JavaModelStatus IJavaModelStatusConstants NAME_COLLISION nameCollision getDOMNodeName JavaModelStatus VERIFIED_OK
deprecated marked deprecated to suppress JDOM related deprecation warnings TODO JDOM remove once model ported off of JDOM private String getDOM Node Name return fDOM Node get Name  getDOMNodeName fDOMNode getName

public static final Default Working Copy Owner PRIMARY new Default Working Copy Owner private Default Working Copy Owner only one instance can be created  DefaultWorkingCopyOwner DefaultWorkingCopyOwner DefaultWorkingCopyOwner
deprecated Marked deprecated as it is using deprecated code public I Buffer create Buffer I Compilation Unit working Copy if this primary Buffer Provider null return this primary Buffer Provider create Buffer working Copy return super create Buffer working Copy  IBuffer createBuffer ICompilationUnit workingCopy primaryBufferProvider primaryBufferProvider createBuffer workingCopy createBuffer workingCopy
return super create Buffer working Copy public String to String return Primary owner NON NLS 1  createBuffer workingCopy toString

protected DOM Factory factory When executed this operation will delete the given elements The elements to delete cannot be code null code or empty and must be contained within a compilation unit public Delete Elements Operation I Java Element elements To Delete boolean force super elements To Delete force initDOM Factory  DOMFactory DeleteElementsOperation IJavaElement elementsToDelete elementsToDelete initDOMFactory
deprecated marked deprecated to suppress JDOM related deprecation warnings TODO JDOM remove once model ported off of JDOM private void initDOM Factory factory new DOM Factory  initDOMFactory DOMFactory
see Multi Operation protected String get Main Task Name return Util bind operation delete Element Progress NON NLS 1  MultiOperation getMainTaskName deleteElementProgress
Groups the elements to be processed by their compilation unit If parent child combinations are present children are discarded only the parents are processed Removes any duplicates specified in elements to be processed protected void group Elements throws Java Model Exception children To Remove new Hash Map 1 int uniqueC Us 0 for int i 0 length elements To Process length i length i I Java Element e elements To Process i I Compilation Unit cu get Compilation Unit For e if cu null throw new Java Model Exception new Java Model Status I Java Model Status Constants READ ONLY e else I Region region I Region children To Remove get cu if region null region new Region children To Remove put cu region uniqueC Us 1 region add e elements To Process new I Java Element uniqueC Us Iterator iter children To Remove key Set iterator int i 0 while iter has Next elements To Process i I Java Element iter next  groupElements JavaModelException childrenToRemove HashMap uniqueCUs elementsToProcess IJavaElement elementsToProcess ICompilationUnit getCompilationUnitFor JavaModelException JavaModelStatus IJavaModelStatusConstants READ_ONLY IRegion IRegion childrenToRemove childrenToRemove uniqueCUs elementsToProcess IJavaElement uniqueCUs childrenToRemove keySet hasNext elementsToProcess IJavaElement
Deletes this element from its compilation unit see Multi Operation protected void process Element I Java Element element throws Java Model Exception I Compilation Unit cu I Compilation Unit element keep track of the import statements if all are removed delete the import container and report it in the delta int number Of Imports cu get Imports length I Buffer buffer cu get Buffer if buffer null return Java Element Delta delta new Java Element Delta cu I Java Element cu Elements I Region children To Remove get cu get Elements for int i 0 length cu Elements length i length i I Java Element e cu Elements i if e exists char contents buffer get Characters if contents null continue String cu Name cu get Element Name replace Element In Buffer buffer e cu Name delta removed e if e get Element Type I Java Element IMPORT DECLARATION number Of Imports if number Of Imports 0 delta removed cu get Import Container if delta get Affected Children length 0 cu save get Sub Progress Monitor 1 force if cu is Working Copy if unit is working copy then save will have already fired the delta add Delta delta this set Attribute HAS MODIFIED RESOURCE ATTR TRUE  MultiOperation processElement IJavaElement JavaModelException ICompilationUnit ICompilationUnit numberOfImports getImports IBuffer getBuffer JavaElementDelta JavaElementDelta IJavaElement cuElements IRegion childrenToRemove getElements cuElements IJavaElement cuElements getCharacters cuName getElementName replaceElementInBuffer cuName getElementType IJavaElement IMPORT_DECLARATION numberOfImports numberOfImports getImportContainer getAffectedChildren getSubProgressMonitor isWorkingCopy addDelta setAttribute HAS_MODIFIED_RESOURCE_ATTR
deprecated marked deprecated to suppress JDOM related deprecation warnings TODO JDOM remove once model ported off of JDOM private void replace Element In Buffer I Buffer buffer I Java Element element To Remove String cu Name IDOM Compilation Unit cuDOM factory create Compilation Unit buffer get Characters cu Name org eclipse jdt internal core jdom DOM Node node org eclipse jdt internal core jdom DOM Node Java Element element To Remove find Node cuDOM if node null Assert is True false Failed to locate element To Remove get Element Name in cuDOM get Name NON NLS 1 NON NLS 2 int start Position node get Start Position buffer replace start Position node get End Position start Position 1 Char Operation NO CHAR  replaceElementInBuffer IBuffer IJavaElement elementToRemove cuName IDOMCompilationUnit createCompilationUnit getCharacters cuName DOMNode DOMNode JavaElement elementToRemove findNode isTrue elementToRemove getElementName getName startPosition getStartPosition startPosition getEndPosition startPosition CharOperation NO_CHAR
see Multi Operation This method first group the elements by code I Compilation Unit code and then processes the code I Compilation Unit code protected void process Elements throws Java Model Exception group Elements super process Elements  MultiOperation ICompilationUnit ICompilationUnit processElements JavaModelException groupElements processElements
see Multi Operation protected void verify I Java Element element throws Java Model Exception I Java Element children I Region children To Remove get element get Elements for int i 0 i children length i I Java Element child children i if child get Corresponding Resource null error I Java Model Status Constants INVALID ELEMENT TYPES child Member local Context if child instanceof Member local Context Member child get Outer Most Local Context null local Context child JDOM doesn t support source manipulation in local anonymous types error I Java Model Status Constants INVALID ELEMENT TYPES child if child is Read Only error I Java Model Status Constants READ ONLY child  MultiOperation IJavaElement JavaModelException IJavaElement IRegion childrenToRemove getElements IJavaElement getCorrespondingResource IJavaModelStatusConstants INVALID_ELEMENT_TYPES localContext localContext getOuterMostLocalContext localContext IJavaModelStatusConstants INVALID_ELEMENT_TYPES isReadOnly IJavaModelStatusConstants READ_ONLY

public Delete Package Fragment Root Operation I Package Fragment Root root int update Resource Flags int update Model Flags super root this update Resource Flags update Resource Flags this update Model Flags update Model Flags  DeletePackageFragmentRootOperation IPackageFragmentRoot updateResourceFlags updateModelFlags updateResourceFlags updateResourceFlags updateModelFlags updateModelFlags
protected void execute Operation throws Java Model Exception I Package Fragment Root root I Package Fragment Root this get Element To Process I Classpath Entry root Entry root get Raw Classpath Entry delete resource if root is External this update Model Flags I Package Fragment Root NO RESOURCE MODIFICATION 0 delete Resource root root Entry update classpath if needed if this update Model Flags I Package Fragment Root ORIGINATING PROJECT CLASSPATH 0 update Project Classpath root Entry get Path root get Java Project if this update Model Flags I Package Fragment Root OTHER REFERRING PROJECTS CLASSPATH 0 update Referring Project Classpaths root Entry get Path root get Java Project  executeOperation JavaModelException IPackageFragmentRoot IPackageFragmentRoot getElementToProcess IClasspathEntry rootEntry getRawClasspathEntry isExternal updateModelFlags IPackageFragmentRoot NO_RESOURCE_MODIFICATION deleteResource rootEntry updateModelFlags IPackageFragmentRoot ORIGINATING_PROJECT_CLASSPATH updateProjectClasspath rootEntry getPath getJavaProject updateModelFlags IPackageFragmentRoot OTHER_REFERRING_PROJECTS_CLASSPATH updateReferringProjectClasspaths rootEntry getPath getJavaProject
I Resource Proxy Visitor visitor new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception if proxy get Type I Resource FOLDER I Path path proxy request Full Path if prefixes One Of path nested Folders equals if nested source folder return equals One Of path nested Folders else subtree doesn t contain any nested source folders proxy request Resource delete update Resource Flags progress Monitor return false else proxy request Resource delete update Resource Flags progress Monitor return false  IResourceProxyVisitor IResourceProxyVisitor IResourceProxy CoreException getType IResource IPath requestFullPath prefixesOneOf nestedFolders equalsOneOf nestedFolders requestResource updateResourceFlags progressMonitor requestResource updateResourceFlags progressMonitor
protected void delete Resource I Package Fragment Root root I Classpath Entry root Entry throws Java Model Exception final char exclusion Patterns Classpath Entry root Entry full Exclusion Pattern Chars I Resource root Resource root get Resource if root Entry get Entry Kind I Classpath Entry CPE SOURCE exclusion Patterns null try root Resource delete this update Resource Flags progress Monitor catch Core Exception e throw new Java Model Exception e else final I Path nested Folders get Nested Folders root I Resource Proxy Visitor visitor new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception if proxy get Type I Resource FOLDER I Path path proxy request Full Path if prefixes One Of path nested Folders equals if nested source folder return equals One Of path nested Folders else subtree doesn t contain any nested source folders proxy request Resource delete update Resource Flags progress Monitor return false else proxy request Resource delete update Resource Flags progress Monitor return false try root Resource accept visitor I Resource NONE catch Core Exception e throw new Java Model Exception e this set Attribute HAS MODIFIED RESOURCE ATTR TRUE  deleteResource IPackageFragmentRoot IClasspathEntry rootEntry JavaModelException exclusionPatterns ClasspathEntry rootEntry fullExclusionPatternChars IResource rootResource getResource rootEntry getEntryKind IClasspathEntry CPE_SOURCE exclusionPatterns rootResource updateResourceFlags progressMonitor CoreException JavaModelException IPath nestedFolders getNestedFolders IResourceProxyVisitor IResourceProxyVisitor IResourceProxy CoreException getType IResource IPath requestFullPath prefixesOneOf nestedFolders equalsOneOf nestedFolders requestResource updateResourceFlags progressMonitor requestResource updateResourceFlags progressMonitor rootResource IResource CoreException JavaModelException setAttribute HAS_MODIFIED_RESOURCE_ATTR
protected void update Referring Project Classpaths I Path root Path I Java Project project Of Root throws Java Model Exception I Java Model model this get Java Model I Java Project projects model get Java Projects for int i 0 length projects length i length i I Java Project project projects i if project equals project Of Root continue update Project Classpath root Path project  updateReferringProjectClasspaths IPath rootPath IJavaProject projectOfRoot JavaModelException IJavaModel getJavaModel IJavaProject getJavaProjects IJavaProject projectOfRoot updateProjectClasspath rootPath
protected void update Project Classpath I Path root Path I Java Project project throws Java Model Exception I Classpath Entry classpath project get Raw Classpath I Classpath Entry new Classpath null int cp Length classpath length int newCP Index 1 for int j 0 j cp Length j I Classpath Entry entry classpath j if root Path equals entry get Path if new Classpath null new Classpath new I Classpath Entry cp Length 1 System arraycopy classpath 0 new Classpath 0 j newCP Index j else if new Classpath null new Classpath newCP Index entry if new Classpath null if newCP Index new Classpath length System arraycopy new Classpath 0 new Classpath new I Classpath Entry newCP Index 0 newCP Index project set Raw Classpath new Classpath progress Monitor  updateProjectClasspath IPath rootPath IJavaProject JavaModelException IClasspathEntry getRawClasspath IClasspathEntry newClasspath cpLength newCPIndex cpLength IClasspathEntry rootPath getPath newClasspath newClasspath IClasspathEntry cpLength newClasspath newCPIndex newClasspath newClasspath newCPIndex newClasspath newCPIndex newClasspath newClasspath newClasspath IClasspathEntry newCPIndex newCPIndex setRawClasspath newClasspath progressMonitor
protected I Java Model Status verify I Java Model Status status super verify if status isOK return status I Package Fragment Root root I Package Fragment Root this get Element To Process if root null root exists return new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST root I Resource resource root get Resource if resource instanceof I Folder if resource is Linked return new Java Model Status I Java Model Status Constants INVALID RESOURCE root return Java Model Status VERIFIED OK  IJavaModelStatus IJavaModelStatus IPackageFragmentRoot IPackageFragmentRoot getElementToProcess JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST IResource getResource IFolder isLinked JavaModelStatus IJavaModelStatusConstants INVALID_RESOURCE JavaModelStatus VERIFIED_OK

public class Delete Resource Elements Operation extends Multi Operation When executed this operation will delete the given elements The elements to delete cannot be code null code or empty and must have a corresponding resource protected Delete Resource Elements Operation I Java Element elements To Process boolean force super elements To Process force  DeleteResourceElementsOperation MultiOperation DeleteResourceElementsOperation IJavaElement elementsToProcess elementsToProcess
Deletes the direct children of code frag code corresponding to its kind K SOURCE or K BINARY and deletes the corresponding folder if it is then empty private void delete Package Fragment I Package Fragment frag throws Java Model Exception I Resource res frag get Resource if res null collect the children to remove I Java Element children Of Interest frag get Children if children Of Interest length 0 I Resource resources new I Resource children Of Interest length remove the children for int i 0 i children Of Interest length i resources i children Of Interest i get Corresponding Resource delete Resources resources force Discard non java resources Object non Java Resources frag get Non Java Resources int actual Resource Count 0 for int i 0 max non Java Resources length i max i if non Java Resources i instanceof I Resource actual Resource Count I Resource actual Non Java Resources new I Resource actual Resource Count for int i 0 max non Java Resources length index 0 i max i if non Java Resources i instanceof I Resource actual Non Java Resources index I Resource non Java Resources i delete Resources actual Non Java Resources force delete remaining files in this package class file in the case where Proj src bin I Resource remaining Files try remaining Files I Container res members catch Core Exception ce throw new Java Model Exception ce boolean is Empty true for int i 0 length remaining Files length i length i I Resource file remaining Files i if file instanceof I File org eclipse jdt internal compiler util Util is Class File Name file get Name this delete Resource file I Resource FORCE I Resource KEEP HISTORY else is Empty false if is Empty frag is Default Package don t delete default package s folder see https bugs eclipse org bugs show bug cgi id 38450 delete recursively empty folders I Resource frag Resource frag get Resource if frag Resource null delete Empty Package Fragment frag false frag Resource get Parent  K_SOURCE K_BINARY deletePackageFragment IPackageFragment JavaModelException IResource getResource IJavaElement childrenOfInterest getChildren childrenOfInterest IResource IResource childrenOfInterest childrenOfInterest childrenOfInterest getCorrespondingResource deleteResources nonJavaResources getNonJavaResources actualResourceCount nonJavaResources nonJavaResources IResource actualResourceCount IResource actualNonJavaResources IResource actualResourceCount nonJavaResources nonJavaResources IResource actualNonJavaResources IResource nonJavaResources deleteResources actualNonJavaResources IResource remainingFiles remainingFiles IContainer CoreException JavaModelException isEmpty remainingFiles IResource remainingFiles IFile isClassFileName getName deleteResource IResource IResource KEEP_HISTORY isEmpty isEmpty isDefaultPackage show_bug IResource fragResource getResource fragResource deleteEmptyPackageFragment fragResource getParent
see Multi Operation protected String get Main Task Name return Util bind operation delete Resource Progress NON NLS 1  MultiOperation getMainTaskName deleteResourceProgress
see Multi Operation This method delegate to code delete Resource code or code delete Package Fragment code depending on the type of code element code protected void process Element I Java Element element throws Java Model Exception switch element get Element Type case I Java Element CLASS FILE case I Java Element COMPILATION UNIT delete Resource element get Resource force I Resource FORCE I Resource KEEP HISTORY I Resource KEEP HISTORY break case I Java Element PACKAGE FRAGMENT delete Package Fragment I Package Fragment element break default throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID ELEMENT TYPES element ensure the element is closed if element instanceof I Openable I Openable element close  MultiOperation deleteResource deletePackageFragment processElement IJavaElement JavaModelException getElementType IJavaElement CLASS_FILE IJavaElement COMPILATION_UNIT deleteResource getResource IResource IResource KEEP_HISTORY IResource KEEP_HISTORY IJavaElement PACKAGE_FRAGMENT deletePackageFragment IPackageFragment JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_ELEMENT_TYPES IOpenable IOpenable
see Multi Operation protected void verify I Java Element element throws Java Model Exception if element null element exists error I Java Model Status Constants ELEMENT DOES NOT EXIST element int type element get Element Type if type I Java Element PACKAGE FRAGMENT ROOT type I Java Element COMPILATION UNIT error I Java Model Status Constants INVALID ELEMENT TYPES element else if type I Java Element PACKAGE FRAGMENT element instanceof Jar Package Fragment error I Java Model Status Constants INVALID ELEMENT TYPES element I Resource resource element get Resource if resource instanceof I Folder if resource is Linked error I Java Model Status Constants INVALID RESOURCE element  MultiOperation IJavaElement JavaModelException IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST getElementType IJavaElement PACKAGE_FRAGMENT_ROOT IJavaElement COMPILATION_UNIT IJavaModelStatusConstants INVALID_ELEMENT_TYPES IJavaElement PACKAGE_FRAGMENT JarPackageFragment IJavaModelStatusConstants INVALID_ELEMENT_TYPES IResource getResource IFolder isLinked IJavaModelStatusConstants INVALID_RESOURCE

Update projects references so that the build order is consistent with the classpath public void update Project References If Necessary throws Java Model Exception String old Required this project project Prerequisites this old Resolved Path if this new Resolved Path null this new Resolved Path this project get Resolved Classpath this new Raw Path null true true null no reverse map String new Required this project project Prerequisites this new Resolved Path try I Project project Resource this project get Project I Project Description description project Resource get Description I Project project References description get Dynamic References Hash Set old References new Hash Set project References length for int i 0 i project References length i String project Name project References i get Name old References add project Name Hash Set new References Hash Set old References clone for int i 0 i old Required length i String project Name old Required i new References remove project Name for int i 0 i new Required length i String project Name new Required i new References add project Name Iterator iter int new Size new References size check Identity if old References size new Size iter new References iterator while iter has Next if old References contains iter next break check Identity return String required Project Names new String new Size int index 0 iter new References iterator while iter has Next required Project Names index String iter next Util sort required Project Names ensure that if changed the order is consistent I Project required Project Array new I Project new Size I Workspace Root wks Root project Resource get Workspace get Root for int i 0 i new Size i required Project Array i wks Root get Project required Project Names i description set Dynamic References required Project Array project Resource set Description description null catch Core Exception e throw new Java Model Exception e  updateProjectReferencesIfNecessary JavaModelException oldRequired projectPrerequisites oldResolvedPath newResolvedPath newResolvedPath getResolvedClasspath newRawPath newRequired projectPrerequisites newResolvedPath IProject projectResource getProject IProjectDescription projectResource getDescription IProject projectReferences getDynamicReferences HashSet oldReferences HashSet projectReferences projectReferences projectName projectReferences getName oldReferences projectName HashSet newReferences HashSet oldReferences oldRequired projectName oldRequired newReferences projectName newRequired projectName newRequired newReferences projectName newSize newReferences checkIdentity oldReferences newSize newReferences hasNext oldReferences checkIdentity requiredProjectNames newSize newReferences hasNext requiredProjectNames requiredProjectNames IProject requiredProjectArray IProject newSize IWorkspaceRoot wksRoot projectResource getWorkspace getRoot newSize requiredProjectArray wksRoot getProject requiredProjectNames setDynamicReferences requiredProjectArray projectResource setDescription CoreException JavaModelException
public void add Element Changed Listener I Element Changed Listener listener int event Mask for int i 0 i this element Changed Listener Count i if this element Changed Listeners i equals listener only clone the masks since we could be in the middle of notifications and one listener decide to change any event mask of another listeners yet not notified int clone Length this element Changed Listener Masks length System arraycopy this element Changed Listener Masks 0 this element Changed Listener Masks new int clone Length 0 clone Length this element Changed Listener Masks i event Mask could be different return may need to grow no need to clone since iterators will have cached original arrays and max boundary and we only add to the end int length if length this element Changed Listeners length this element Changed Listener Count System arraycopy this element Changed Listeners 0 this element Changed Listeners new I Element Changed Listener length 2 0 length System arraycopy this element Changed Listener Masks 0 this element Changed Listener Masks new int length 2 0 length this element Changed Listeners this element Changed Listener Count listener this element Changed Listener Masks this element Changed Listener Count event Mask this element Changed Listener Count  addElementChangedListener IElementChangedListener eventMask elementChangedListenerCount elementChangedListeners cloneLength elementChangedListenerMasks elementChangedListenerMasks elementChangedListenerMasks cloneLength cloneLength elementChangedListenerMasks eventMask elementChangedListeners elementChangedListenerCount elementChangedListeners elementChangedListeners IElementChangedListener elementChangedListenerMasks elementChangedListenerMasks elementChangedListeners elementChangedListenerCount elementChangedListenerMasks elementChangedListenerCount eventMask elementChangedListenerCount
public void add Pre Resource Changed Listener I Resource Change Listener listener for int i 0 i this pre Resource Change Listener Count i if this pre Resource Change Listeners i equals listener return may need to grow no need to clone since iterators will have cached original arrays and max boundary and we only add to the end int length if length this pre Resource Change Listeners length this pre Resource Change Listener Count System arraycopy this pre Resource Change Listeners 0 this pre Resource Change Listeners new I Resource Change Listener length 2 0 length this pre Resource Change Listeners this pre Resource Change Listener Count listener this pre Resource Change Listener Count  addPreResourceChangedListener IResourceChangeListener preResourceChangeListenerCount preResourceChangeListeners preResourceChangeListeners preResourceChangeListenerCount preResourceChangeListeners preResourceChangeListeners IResourceChangeListener preResourceChangeListeners preResourceChangeListenerCount preResourceChangeListenerCount
public Delta Processor get Delta Processor Delta Processor delta Processor Delta Processor this delta Processors get if delta Processor null return delta Processor delta Processor new Delta Processor this Java Model Manager get Java Model Manager this delta Processors set delta Processor return delta Processor  DeltaProcessor getDeltaProcessor DeltaProcessor deltaProcessor DeltaProcessor deltaProcessors deltaProcessor deltaProcessor deltaProcessor DeltaProcessor JavaModelManager getJavaModelManager deltaProcessors deltaProcessor deltaProcessor
public void perform Classpath Resource Change Java Project project I Classpath Entry old Resolved Path I Classpath Entry new Resolved Path I Classpath Entry new Raw Path boolean can Change Resources throws Java Model Exception Project Update Info info new Project Update Info info project project info old Resolved Path old Resolved Path info new Resolved Path new Resolved Path info new Raw Path new Raw Path if can Change Resources this project Updates remove project remove possibly awaiting one info update Project References If Necessary return this record Project Update info  performClasspathResourceChange JavaProject IClasspathEntry oldResolvedPath IClasspathEntry newResolvedPath IClasspathEntry newRawPath canChangeResources JavaModelException ProjectUpdateInfo ProjectUpdateInfo oldResolvedPath oldResolvedPath newResolvedPath newResolvedPath newRawPath newRawPath canChangeResources projectUpdates updateProjectReferencesIfNecessary recordProjectUpdate
public void initialize Roots recompute root infos only if necessary Hash Map new Roots null Hash Map new Other Roots null Hash Map new Source Attachments null if this roots Are Stale Thread current Thread Thread current Thread boolean added Current Thread false try if reentering initialization through a container initializer for example no need to compute roots again see https bugs eclipse org bugs show bug cgi id 47213 if this initializing Threads add current Thread return added Current Thread true new Roots new Hash Map new Other Roots new Hash Map new Source Attachments new Hash Map I Java Model model Java Model Manager get Java Model Manager get Java Model I Java Project projects try projects model get Java Projects catch Java Model Exception e nothing can be done return for int i 0 length projects length i length i Java Project project Java Project projects i I Classpath Entry classpath try classpath project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress catch Java Model Exception e continue with next project continue for int j 0 classpath Length classpath length j classpath Length j I Classpath Entry entry classpath j if entry get Entry Kind I Classpath Entry CPE PROJECT continue root path I Path path entry get Path if new Roots get path null new Roots put path new Delta Processor Root Info project path Classpath Entry entry full Inclusion Pattern Chars Classpath Entry entry full Exclusion Pattern Chars entry get Entry Kind else Array List root List Array List new Other Roots get path if root List null root List new Array List new Other Roots put path root List root List add new Delta Processor Root Info project path Classpath Entry entry full Inclusion Pattern Chars Classpath Entry entry full Exclusion Pattern Chars entry get Entry Kind source attachment path if entry get Entry Kind I Classpath Entry CPE LIBRARY continue Qualified Name q Name new Qualified Name Java Core PLUGIN ID sourceattachment path toOS String NON NLS 1 String property String null try property String Resources Plugin get Workspace get Root get Persistent Property q Name catch Core Exception e continue I Path source Attachment Path if property String null int index property String last Index Of Package Fragment Root ATTACHMENT PROPERTY DELIMITER source Attachment Path index 0 new Path property String new Path property String substring 0 index else source Attachment Path entry get Source Attachment Path if source Attachment Path null new Source Attachments put source Attachment Path path finally if added Current Thread this initializing Threads remove current Thread synchronized this this old Roots this roots this old Other Roots this other Roots if this roots Are Stale new Roots null double check again this roots new Roots this other Roots new Other Roots this source Attachments new Source Attachments this roots Are Stale false  initializeRoots HashMap newRoots HashMap newOtherRoots HashMap newSourceAttachments rootsAreStale currentThread currentThread addedCurrentThread show_bug initializingThreads currentThread addedCurrentThread newRoots HashMap newOtherRoots HashMap newSourceAttachments HashMap IJavaModel JavaModelManager getJavaModelManager getJavaModel IJavaProject getJavaProjects JavaModelException JavaProject JavaProject IClasspathEntry getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress JavaModelException classpathLength classpathLength IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT IPath getPath newRoots newRoots DeltaProcessor RootInfo ClasspathEntry fullInclusionPatternChars ClasspathEntry fullExclusionPatternChars getEntryKind ArrayList rootList ArrayList newOtherRoots rootList rootList ArrayList newOtherRoots rootList rootList DeltaProcessor RootInfo ClasspathEntry fullInclusionPatternChars ClasspathEntry fullExclusionPatternChars getEntryKind getEntryKind IClasspathEntry CPE_LIBRARY QualifiedName qName QualifiedName JavaCore PLUGIN_ID toOSString propertyString propertyString ResourcesPlugin getWorkspace getRoot getPersistentProperty qName CoreException IPath sourceAttachmentPath propertyString propertyString lastIndexOf PackageFragmentRoot ATTACHMENT_PROPERTY_DELIMITER sourceAttachmentPath propertyString propertyString sourceAttachmentPath getSourceAttachmentPath sourceAttachmentPath newSourceAttachments sourceAttachmentPath addedCurrentThread initializingThreads currentThread oldRoots oldOtherRoots otherRoots rootsAreStale newRoots newRoots otherRoots newOtherRoots sourceAttachments newSourceAttachments rootsAreStale
public synchronized void record Project Update Project Update Info new Info Java Project project new Info project Project Update Info old Info Project Update Info this project Updates get project if old Info null refresh new classpath information old Info new Raw Path new Info new Raw Path old Info new Resolved Path new Info new Resolved Path else this project Updates put project new Info  recordProjectUpdate ProjectUpdateInfo newInfo JavaProject newInfo ProjectUpdateInfo oldInfo ProjectUpdateInfo projectUpdates oldInfo oldInfo newRawPath newInfo newRawPath oldInfo newResolvedPath newInfo newResolvedPath projectUpdates newInfo
public synchronized Project Update Info remove All Project Updates int length this project Updates size if length 0 return null Project Update Info updates new Project Update Info length this project Updates values to Array updates this project Updates clear return updates  ProjectUpdateInfo removeAllProjectUpdates projectUpdates ProjectUpdateInfo ProjectUpdateInfo projectUpdates toArray projectUpdates
public void remove Element Changed Listener I Element Changed Listener listener for int i 0 i this element Changed Listener Count i if this element Changed Listeners i equals listener need to clone defensively since we might be in the middle of listener notifications fire int length this element Changed Listeners length I Element Changed Listener new Listeners new I Element Changed Listener length System arraycopy this element Changed Listeners 0 new Listeners 0 i int new Masks new int length System arraycopy this element Changed Listener Masks 0 new Masks 0 i copy trailing listeners int trailing Length this element Changed Listener Count i 1 if trailing Length 0 System arraycopy this element Changed Listeners i 1 new Listeners i trailing Length System arraycopy this element Changed Listener Masks i 1 new Masks i trailing Length update manager listener state fire need to iterate over original listeners through a local variable to hold onto the original ones this element Changed Listeners new Listeners this element Changed Listener Masks new Masks this element Changed Listener Count return  removeElementChangedListener IElementChangedListener elementChangedListenerCount elementChangedListeners elementChangedListeners IElementChangedListener newListeners IElementChangedListener elementChangedListeners newListeners newMasks elementChangedListenerMasks newMasks trailingLength elementChangedListenerCount trailingLength elementChangedListeners newListeners trailingLength elementChangedListenerMasks newMasks trailingLength elementChangedListeners newListeners elementChangedListenerMasks newMasks elementChangedListenerCount
public void remove Pre Resource Changed Listener I Resource Change Listener listener for int i 0 i this pre Resource Change Listener Count i if this pre Resource Change Listeners i equals listener need to clone defensively since we might be in the middle of listener notifications fire int length this pre Resource Change Listeners length I Resource Change Listener new Listeners new I Resource Change Listener length System arraycopy this pre Resource Change Listeners 0 new Listeners 0 i copy trailing listeners int trailing Length this pre Resource Change Listener Count i 1 if trailing Length 0 System arraycopy this pre Resource Change Listeners i 1 new Listeners i trailing Length update manager listener state fire need to iterate over original listeners through a local variable to hold onto the original ones this pre Resource Change Listeners new Listeners this pre Resource Change Listener Count return  removePreResourceChangedListener IResourceChangeListener preResourceChangeListenerCount preResourceChangeListeners preResourceChangeListeners IResourceChangeListener newListeners IResourceChangeListener preResourceChangeListeners newListeners trailingLength preResourceChangeListenerCount trailingLength preResourceChangeListeners newListeners trailingLength preResourceChangeListeners newListeners preResourceChangeListenerCount
final I Resource Change Listener listener this pre Resource Change Listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Util log exception Exception occurred in listener of pre Java resource change notification NON NLS 1  IResourceChangeListener preResourceChangeListeners ISafeRunnable handleException
Util log exception Exception occurred in listener of pre Java resource change notification NON NLS 1 public void run throws Exception listener resource Changed event  resourceChanged
public void resource Changed final I Resource Change Event event boolean is Post Change event get Type I Resource Change Event POST CHANGE if is Post Change for int i 0 i this pre Resource Change Listener Count i wrap callbacks with Safe runnable for subsequent listeners to be called when some are causing grief final I Resource Change Listener listener this pre Resource Change Listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Util log exception Exception occurred in listener of pre Java resource change notification NON NLS 1 public void run throws Exception listener resource Changed event try get Delta Processor resource Changed event finally TODO jerome see 47631 may want to get rid of following so as to reuse delta processor if is Post Change this delta Processors set null  resourceChanged IResourceChangeEvent isPostChange getType IResourceChangeEvent POST_CHANGE isPostChange preResourceChangeListenerCount IResourceChangeListener preResourceChangeListeners ISafeRunnable handleException resourceChanged getDeltaProcessor resourceChanged isPostChange deltaProcessors
public synchronized void update Roots I Path container Path I Resource Delta container Delta Delta Processor delta Processor Map updated Roots Map other Updated Roots if container Delta get Kind I Resource Delta REMOVED updated Roots this old Roots other Updated Roots this old Other Roots else updated Roots this roots other Updated Roots this other Roots Iterator iterator updated Roots key Set iterator while iterator has Next I Path path I Path iterator next if container Path is Prefix Of path container Path equals path I Resource Delta root Delta container Delta find Member path remove First Segments 1 if root Delta null continue Delta Processor Root Info root Info Delta Processor Root Info updated Roots get path if root Info project get Path is Prefix Of path only consider roots that are not included in the container delta Processor update Current Delta And Index root Delta I Java Element PACKAGE FRAGMENT ROOT root Info Array List root List Array List other Updated Roots get path if root List null Iterator other Projects root List iterator while other Projects has Next root Info Delta Processor Root Info other Projects next if root Info project get Path is Prefix Of path only consider roots that are not included in the container delta Processor update Current Delta And Index root Delta I Java Element PACKAGE FRAGMENT ROOT root Info  updateRoots IPath containerPath IResourceDelta containerDelta DeltaProcessor deltaProcessor updatedRoots otherUpdatedRoots containerDelta getKind IResourceDelta updatedRoots oldRoots otherUpdatedRoots oldOtherRoots updatedRoots otherUpdatedRoots otherRoots updatedRoots keySet hasNext IPath IPath containerPath isPrefixOf containerPath IResourceDelta rootDelta containerDelta findMember removeFirstSegments rootDelta DeltaProcessor RootInfo rootInfo DeltaProcessor RootInfo updatedRoots rootInfo getPath isPrefixOf deltaProcessor updateCurrentDeltaAndIndex rootDelta IJavaElement PACKAGE_FRAGMENT_ROOT rootInfo ArrayList rootList ArrayList otherUpdatedRoots rootList otherProjects rootList otherProjects hasNext rootInfo DeltaProcessor RootInfo otherProjects rootInfo getPath isPrefixOf deltaProcessor updateCurrentDeltaAndIndex rootDelta IJavaElement PACKAGE_FRAGMENT_ROOT rootInfo

int traverse Modes Outputs Info I Path paths int traverse Modes int output Count this paths paths this traverse Modes traverse Modes this output Count output Count  traverseModes OutputsInfo IPath traverseModes outputCount traverseModes traverseModes outputCount outputCount
public String to String if this paths null return none NON NLS 1 String Buffer buffer new String Buffer for int i 0 i this output Count i buffer append path NON NLS 1 buffer append this paths i to String buffer append n traverse NON NLS 1 switch this traverse Modes i case BINARY buffer append BINARY NON NLS 1 break case IGNORE buffer append IGNORE NON NLS 1 break case SOURCE buffer append SOURCE NON NLS 1 break default buffer append unknown NON NLS 1 if i 1 this output Count buffer append n return buffer to String  toString StringBuffer StringBuffer outputCount toString traverseModes outputCount toString
I Package Fragment Root root Root Info Java Project project I Path root Path char inclusion Patterns char exclusion Patterns int entry Kind this project project this root Path root Path this inclusion Patterns inclusion Patterns this exclusion Patterns exclusion Patterns this entry Kind entry Kind  IPackageFragmentRoot RootInfo JavaProject IPath rootPath inclusionPatterns exclusionPatterns entryKind rootPath rootPath inclusionPatterns inclusionPatterns exclusionPatterns exclusionPatterns entryKind entryKind
I Package Fragment Root get Package Fragment Root I Resource resource if this root null if resource null this root this project get Package Fragment Root resource else Object target Java Model get Target Resources Plugin get Workspace get Root this root Path false don t check existence if target instanceof I Resource this root this project get Package Fragment Root I Resource target else this root this project get Package Fragment Root this root Path toOS String return this root  IPackageFragmentRoot getPackageFragmentRoot IResource getPackageFragmentRoot JavaModel getTarget ResourcesPlugin getWorkspace getRoot rootPath IResource getPackageFragmentRoot IResource getPackageFragmentRoot rootPath toOSString
return this root boolean is Root Of Project I Path path return this root Path equals path this project get Project get Full Path is Prefix Of path  isRootOfProject IPath rootPath getProject getFullPath isPrefixOf
public String to String String Buffer buffer new String Buffer project NON NLS 1 if this project null buffer append null NON NLS 1 else buffer append this project get Element Name buffer append npath NON NLS 1 if this root Path null buffer append null NON NLS 1 else buffer append this root Path to String buffer append nincluding NON NLS 1 if this inclusion Patterns null buffer append null NON NLS 1 else for int i 0 length this inclusion Patterns length i length i buffer append new String this inclusion Patterns i if i length 1 buffer append NON NLS 1 buffer append nexcluding NON NLS 1 if this exclusion Patterns null buffer append null NON NLS 1 else for int i 0 length this exclusion Patterns length i length i buffer append new String this exclusion Patterns i if i length 1 buffer append NON NLS 1 return buffer to String  toString StringBuffer StringBuffer getElementName rootPath rootPath toString inclusionPatterns inclusionPatterns inclusionPatterns exclusionPatterns exclusionPatterns exclusionPatterns toString
Used for detecting external JAR changes public static long get Time Stamp File file return file last Modified file length  getTimeStamp lastModified
public int overriden Event Type 1 public Delta Processor Delta Processing State state Java Model Manager manager this state state this manager manager  overridenEventType DeltaProcessor DeltaProcessingState JavaModelManager
private void add Dependent Projects I Path project Path Hash Set result I Java Project projects null try projects this manager get Java Model get Java Projects catch Java Model Exception e java model doesn t exist return for int i 0 length projects length i length i I Java Project project projects i I Classpath Entry classpath null try classpath Java Project project get Expanded Classpath true catch Java Model Exception e project doesn t exist continue with next project continue for int j 0 length2 classpath length j length2 j I Classpath Entry entry classpath j if entry get Entry Kind I Classpath Entry CPE PROJECT entry get Path equals project Path result add project  addDependentProjects IPath projectPath HashSet IJavaProject getJavaModel getJavaProjects JavaModelException IJavaProject IClasspathEntry JavaProject getExpandedClasspath JavaModelException IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT getPath projectPath
public void add For Refresh I Java Element element if this refreshed Elements null this refreshed Elements new Hash Set this refreshed Elements add element  addForRefresh IJavaElement refreshedElements refreshedElements HashSet refreshedElements
private void add To Parent Info Openable child Openable parent Openable child get Parent if parent null parent is Open try Java Element Info info Java Element Info parent get Element Info info add Child child catch Java Model Exception e do nothing we already checked if open  addToParentInfo getParent isOpen JavaElementInfo JavaElementInfo getElementInfo addChild JavaModelException
Adds the given project and its dependents to the list of the roots to refresh private void add To Roots To Refresh With Dependents I Java Project java Project this roots To Refresh add java Project this add Dependent Projects java Project get Path this roots To Refresh  addToRootsToRefreshWithDependents IJavaProject javaProject rootsToRefresh javaProject addDependentProjects javaProject getPath rootsToRefresh
public void check External Archive Changes I Java Element elements To Refresh I Progress Monitor monitor throws Java Model Exception try for int i 0 length elements To Refresh length i length i this add For Refresh elements To Refresh i boolean has Delta this create External Archive Delta monitor if monitor null monitor is Canceled return if has Delta force classpath marker refresh of affected projects Java Model flush External File Cache I Java Element Delta project Deltas this current Delta get Affected Children for int i 0 length project Deltas length i length i I Java Element Delta delta project Deltas i Java Project java Project Java Project delta get Element java Project get Resolved Classpath true ignore Unresolved Entry true generate Marker On Error false don t return Resolution In Progress try touch the project to force it to be recompiled java Project get Project touch monitor catch Core Exception e throw new Java Model Exception e if this current Delta null if delta has not been fired while creating markers this fire this current Delta DEFAULT CHANGE EVENT finally this current Delta null if monitor null monitor done  checkExternalArchiveChanges IJavaElement elementsToRefresh IProgressMonitor JavaModelException elementsToRefresh addForRefresh elementsToRefresh hasDelta createExternalArchiveDelta isCanceled hasDelta JavaModel flushExternalFileCache IJavaElementDelta projectDeltas currentDelta getAffectedChildren projectDeltas IJavaElementDelta projectDeltas JavaProject javaProject JavaProject getElement javaProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress javaProject getProject CoreException JavaModelException currentDelta currentDelta DEFAULT_CHANGE_EVENT currentDelta
private void check Projects Being Added Or Removed I Resource Delta delta I Resource resource delta get Resource boolean process Children false switch resource get Type case I Resource ROOT workaround for bug 15168 circular errors not reported if this state model Projects Cache null try this state model Projects Cache this manager get Java Model get Java Projects catch Java Model Exception e java model doesn t exist never happens process Children true break case I Resource PROJECT NB No need to check project s nature as if the project is not a java project if the project is added or changed this is a noop for projects Being Deleted if the project is closed it has already lost its java nature I Project project I Project resource Java Project java Project Java Project Java Core create project switch delta get Kind case I Resource Delta ADDED this manager batch Container Initializations true remember project and its dependents this add To Roots To Refresh With Dependents java Project workaround for bug 15168 circular errors not reported if Java Project has Java Nature project this add To Parent Info java Project this state roots Are Stale true break case I Resource Delta CHANGED if delta get Flags I Resource Delta OPEN 0 this manager batch Container Initializations true project opened or closed remember project and its dependents this add To Roots To Refresh With Dependents java Project workaround for bug 15168 circular errors not reported if project is Open if Java Project has Java Nature project this add To Parent Info java Project else try java Project close catch Java Model Exception e java project doesn t exist ignore this remove From Parent Info java Project this manager remove Per Project Info java Project this state roots Are Stale true else if delta get Flags I Resource Delta DESCRIPTION 0 boolean was Java Project this manager get Java Model find Java Project project null boolean is Java Project Java Project has Java Nature project if was Java Project is Java Project this manager batch Container Initializations true java nature added or removed remember project and its dependents this add To Roots To Refresh With Dependents java Project workaround for bug 15168 circular errors not reported if is Java Project this add To Parent Info java Project else remove classpath cache so that initialize Roots will not consider the project has a classpath this manager remove Per Project Info Java Project Java Core create project close project try java Project close catch Java Model Exception e java project doesn t exist ignore this remove From Parent Info java Project this state roots Are Stale true else in case the project was removed then added then changed see bug 19799 if is Java Project need nature check 18698 this add To Parent Info java Project process Children true else workaround for bug 15168 circular errors not reported in case the project was removed then added then changed if Java Project has Java Nature project need nature check 18698 this add To Parent Info java Project process Children true break case I Resource Delta REMOVED this manager batch Container Initializations true remove classpath cache so that initialize Roots will not consider the project has a classpath this manager remove Per Project Info Java Project Java Core create resource this state roots Are Stale true break in all cases refresh the external jars for this project add For Refresh java Project break case I Resource FILE I File file I File resource classpath file change if file get Name equals Java Project CLASSPATH FILENAME this manager batch Container Initializations true reconcile Classpath File Update delta Java Project Java Core create file get Project this state roots Are Stale true break if process Children I Resource Delta children delta get Affected Children for int i 0 i children length i check Projects Being Added Or Removed children i  checkProjectsBeingAddedOrRemoved IResourceDelta IResource getResource processChildren getType IResource modelProjectsCache modelProjectsCache getJavaModel getJavaProjects JavaModelException processChildren IResource projectsBeingDeleted IProject IProject JavaProject javaProject JavaProject JavaCore getKind IResourceDelta batchContainerInitializations addToRootsToRefreshWithDependents javaProject JavaProject hasJavaNature addToParentInfo javaProject rootsAreStale IResourceDelta getFlags IResourceDelta batchContainerInitializations addToRootsToRefreshWithDependents javaProject isOpen JavaProject hasJavaNature addToParentInfo javaProject javaProject JavaModelException removeFromParentInfo javaProject removePerProjectInfo javaProject rootsAreStale getFlags IResourceDelta wasJavaProject getJavaModel findJavaProject isJavaProject JavaProject hasJavaNature wasJavaProject isJavaProject batchContainerInitializations addToRootsToRefreshWithDependents javaProject isJavaProject addToParentInfo javaProject initializeRoots removePerProjectInfo JavaProject JavaCore javaProject JavaModelException removeFromParentInfo javaProject rootsAreStale isJavaProject addToParentInfo javaProject processChildren JavaProject hasJavaNature addToParentInfo javaProject processChildren IResourceDelta batchContainerInitializations initializeRoots removePerProjectInfo JavaProject JavaCore rootsAreStale addForRefresh javaProject IResource IFile IFile getName JavaProject CLASSPATH_FILENAME batchContainerInitializations reconcileClasspathFileUpdate JavaProject JavaCore getProject rootsAreStale processChildren IResourceDelta getAffectedChildren checkProjectsBeingAddedOrRemoved
private void check Source Attachment Change I Resource Delta delta I Resource res I Path root Path I Path this state source Attachments get res get Full Path if root Path null Root Info root Info this root Info root Path delta get Kind if root Info null I Java Project project Of Root root Info project I Package Fragment Root root null try close the root so that source attachement cache is flushed root project Of Root find Package Fragment Root root Path if root null root close catch Java Model Exception e root doesn t exist ignore if root null return switch delta get Kind case I Resource Delta ADDED current Delta source Attached root break case I Resource Delta CHANGED current Delta source Detached root current Delta source Attached root break case I Resource Delta REMOVED current Delta source Detached root break  checkSourceAttachmentChange IResourceDelta IResource IPath rootPath IPath sourceAttachments getFullPath rootPath RootInfo rootInfo rootInfo rootPath getKind rootInfo IJavaProject projectOfRoot rootInfo IPackageFragmentRoot projectOfRoot findPackageFragmentRoot rootPath JavaModelException getKind IResourceDelta currentDelta sourceAttached IResourceDelta currentDelta sourceDetached currentDelta sourceAttached IResourceDelta currentDelta sourceDetached
private void close Openable element try element close catch Java Model Exception e do nothing  JavaModelException
private void content Changed Openable element boolean is Primary false boolean is Primary Working Copy false if element get Element Type I Java Element COMPILATION UNIT Compilation Unit cu Compilation Unit element is Primary cu is Primary is Primary Working Copy is Primary cu is Working Copy if is Primary Working Copy filter out changes to primary compilation unit in working copy mode just report a change to the resource see https bugs eclipse org bugs show bug cgi id 59500 current Delta changed element I Java Element Delta F PRIMARY RESOURCE else close element int flags I Java Element Delta F CONTENT if element instanceof Jar Package Fragment Root flags I Java Element Delta F ARCHIVE CONTENT CHANGED if is Primary flags I Java Element Delta F PRIMARY RESOURCE current Delta changed element flags  contentChanged isPrimary isPrimaryWorkingCopy getElementType IJavaElement COMPILATION_UNIT CompilationUnit CompilationUnit isPrimary isPrimary isPrimaryWorkingCopy isPrimary isWorkingCopy isPrimaryWorkingCopy show_bug currentDelta IJavaElementDelta F_PRIMARY_RESOURCE IJavaElementDelta F_CONTENT JarPackageFragmentRoot IJavaElementDelta F_ARCHIVE_CONTENT_CHANGED isPrimary IJavaElementDelta F_PRIMARY_RESOURCE currentDelta
private Openable create Element I Resource resource int element Type Root Info root Info if resource null return null I Path path resource get Full Path I Java Element element null switch element Type case I Java Element JAVA PROJECT note that non java resources rooted at the project level will also enter this code with an element Type JAVA PROJECT see element Type if resource instanceof I Project this pop Until Prefix Of path if this current Element null this current Element get Element Type I Java Element JAVA PROJECT I Java Project this current Element get Project equals resource return this current Element if root Info null root Info project get Project equals resource element root Info project break I Project proj I Project resource if Java Project has Java Nature proj element Java Core create proj else java project may have been been closed or removed look for element amongst old java project s list element Openable this manager get Java Model find Java Project proj break case I Java Element PACKAGE FRAGMENT ROOT element root Info null Java Core create resource root Info get Package Fragment Root resource break case I Java Element PACKAGE FRAGMENT if root Info null if root Info project contains resource I Package Fragment Root root root Info get Package Fragment Root null create package handle I Path pkg Path path remove First Segments root Info root Path segment Count String pkg Util package Name pkg Path if pkg null return null element root get Package Fragment pkg else find the element that encloses the resource this pop Until Prefix Of path if this current Element null element Java Core create resource else find the root I Package Fragment Root root this current Element get Package Fragment Root if root null element Java Core create resource else if Java Project root get Java Project contains resource create package handle I Path pkg Path path remove First Segments root get Path segment Count String pkg Util package Name pkg Path if pkg null return null element root get Package Fragment pkg break case I Java Element COMPILATION UNIT case I Java Element CLASS FILE find the element that encloses the resource this pop Until Prefix Of path if this current Element null element root Info null Java Core create resource Java Model Manager create resource root Info project else find the package I Package Fragment pkg Fragment null switch this current Element get Element Type case I Java Element PACKAGE FRAGMENT ROOT I Package Fragment Root root I Package Fragment Root this current Element I Path root Path root get Path I Path pkg Path path remove Last Segments 1 String pkg Name Util package Name pkg Path remove First Segments root Path segment Count if pkg Name null pkg Fragment root get Package Fragment pkg Name break case I Java Element PACKAGE FRAGMENT Openable pkg this current Element if pkg get Path equals path remove Last Segments 1 pkg Fragment I Package Fragment pkg else case of package x which is a prefix of x y break case I Java Element COMPILATION UNIT case I Java Element CLASS FILE pkg Fragment I Package Fragment this current Element get Parent break if pkg Fragment null element root Info null Java Core create resource Java Model Manager create resource root Info project else if element Type I Java Element COMPILATION UNIT create compilation unit handle file Name validation has been done in element Type I Resource Delta int boolean String file Name path last Segment element pkg Fragment get Compilation Unit file Name else create class file handle file Name validation has been done in element Type I Resource Delta int boolean String file Name path last Segment element pkg Fragment get Class File file Name break if element null return null this current Element Openable element return this current Element  createElement IResource elementType RootInfo rootInfo IPath getFullPath IJavaElement elementType IJavaElement JAVA_PROJECT elementType JAVA_PROJECT elementType IProject popUntilPrefixOf currentElement currentElement getElementType IJavaElement JAVA_PROJECT IJavaProject currentElement getProject currentElement rootInfo rootInfo getProject rootInfo IProject IProject JavaProject hasJavaNature JavaCore getJavaModel findJavaProject IJavaElement PACKAGE_FRAGMENT_ROOT rootInfo JavaCore rootInfo getPackageFragmentRoot IJavaElement PACKAGE_FRAGMENT rootInfo rootInfo IPackageFragmentRoot rootInfo getPackageFragmentRoot IPath pkgPath removeFirstSegments rootInfo rootPath segmentCount packageName pkgPath getPackageFragment popUntilPrefixOf currentElement JavaCore IPackageFragmentRoot currentElement getPackageFragmentRoot JavaCore JavaProject getJavaProject IPath pkgPath removeFirstSegments getPath segmentCount packageName pkgPath getPackageFragment IJavaElement COMPILATION_UNIT IJavaElement CLASS_FILE popUntilPrefixOf currentElement rootInfo JavaCore JavaModelManager rootInfo IPackageFragment pkgFragment currentElement getElementType IJavaElement PACKAGE_FRAGMENT_ROOT IPackageFragmentRoot IPackageFragmentRoot currentElement IPath rootPath getPath IPath pkgPath removeLastSegments pkgName packageName pkgPath removeFirstSegments rootPath segmentCount pkgName pkgFragment getPackageFragment pkgName IJavaElement PACKAGE_FRAGMENT currentElement getPath removeLastSegments pkgFragment IPackageFragment IJavaElement COMPILATION_UNIT IJavaElement CLASS_FILE pkgFragment IPackageFragment currentElement getParent pkgFragment rootInfo JavaCore JavaModelManager rootInfo elementType IJavaElement COMPILATION_UNIT fileName elementType IResourceDelta fileName lastSegment pkgFragment getCompilationUnit fileName fileName elementType IResourceDelta fileName lastSegment pkgFragment getClassFile fileName currentElement currentElement
private boolean create External Archive Delta I Progress Monitor monitor if this refreshed Elements null return false Hash Map external Archives Status new Hash Map boolean has Delta false find JA Rs to refresh Hash Set archive Paths To Refresh new Hash Set Iterator iterator this refreshed Elements iterator this refreshed Elements null null out early to avoid concurrent modification exception see https bugs eclipse org bugs show bug cgi id 63534 while iterator has Next I Java Element element I Java Element iterator next switch element get Element Type case I Java Element PACKAGE FRAGMENT ROOT archive Paths To Refresh add element get Path break case I Java Element JAVA PROJECT Java Project project Java Project element if Java Project has Java Nature project get Project project is not accessible or has lost its Java nature break I Classpath Entry classpath try classpath project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress for int j 0 cp Length classpath length j cp Length j if classpath j get Entry Kind I Classpath Entry CPE LIBRARY archive Paths To Refresh add classpath j get Path catch Java Model Exception e project doesn t exist ignore break case I Java Element JAVA MODEL I Java Project projects try projects this manager get Java Model get Old Java Projects List catch Java Model Exception e1 cannot retrieve old projects list ignore continue for int j 0 projects Length projects length j projects Length j project Java Project projects j if Java Project has Java Nature project get Project project is not accessible or has lost its Java nature continue try classpath project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress catch Java Model Exception e2 project doesn t exist ignore continue for int k 0 cp Length classpath length k cp Length k if classpath k get Entry Kind I Classpath Entry CPE LIBRARY archive Paths To Refresh add classpath k get Path break perform refresh I Java Project projects try projects this manager get Java Model get Old Java Projects List catch Java Model Exception e cannot retrieve old projects list give up return false I Workspace Root wks Root Resources Plugin get Workspace get Root for int i 0 length projects length i length i if monitor null monitor is Canceled break Java Project project Java Project projects i if Java Project has Java Nature project get Project project is not accessible or has lost its Java nature continue I Classpath Entry entries try entries project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress catch Java Model Exception e1 project does not exist ignore continue for int j 0 j entries length j if entries j get Entry Kind I Classpath Entry CPE LIBRARY I Path entry Path entries j get Path if archive Paths To Refresh contains entry Path continue not supposed to be refreshed String status String external Archives Status get entry Path if status null compute shared status Object target Library Java Model get Target wks Root entry Path true if target Library null missing JAR if this state external Time Stamps remove entry Path null external Archives Status put entry Path EXTERNAL JAR REMOVED the jar was physically removed remove the index this manager index Manager remove Index entry Path else if target Library instanceof File external JAR File external File File target Library check timestamp to figure if JAR has changed in some way Long old Timestamp Long this state external Time Stamps get entry Path long new Time Stamp get Time Stamp external File if old Timestamp null if new Time Stamp 0 file doesn t exist external Archives Status put entry Path EXTERNAL JAR REMOVED this state external Time Stamps remove entry Path remove the index this manager index Manager remove Index entry Path else if old Timestamp long Value new Time Stamp external Archives Status put entry Path EXTERNAL JAR CHANGED this state external Time Stamps put entry Path new Long new Time Stamp first remove the index so that it is forced to be re indexed this manager index Manager remove Index entry Path then index the jar this manager index Manager index Library entry Path project get Project else external Archives Status put entry Path EXTERNAL JAR UNCHANGED else if new Time Stamp 0 jar still doesn t exist external Archives Status put entry Path EXTERNAL JAR UNCHANGED else external Archives Status put entry Path EXTERNAL JAR ADDED this state external Time Stamps put entry Path new Long new Time Stamp index the new jar this manager index Manager index Library entry Path project get Project else internal JAR external Archives Status put entry Path INTERNAL JAR IGNORE according to computed status generate a delta status String external Archives Status get entry Path if status null if status EXTERNAL JAR ADDED Package Fragment Root root Package Fragment Root project get Package Fragment Root entry Path to String if VERBOSE System out println External JAR ADDED affecting root root get Element Name NON NLS 1 element Added root null null has Delta true else if status EXTERNAL JAR CHANGED Package Fragment Root root Package Fragment Root project get Package Fragment Root entry Path to String if VERBOSE System out println External JAR CHANGED affecting root root get Element Name NON NLS 1 reset the corresponding project built state since the builder would miss this change this manager set Last Built State project get Project null no state content Changed root has Delta true else if status EXTERNAL JAR REMOVED Package Fragment Root root Package Fragment Root project get Package Fragment Root entry Path to String if VERBOSE System out println External JAR REMOVED affecting root root get Element Name NON NLS 1 element Removed root null null has Delta true return has Delta  createExternalArchiveDelta IProgressMonitor refreshedElements HashMap externalArchivesStatus HashMap hasDelta JARs HashSet archivePathsToRefresh HashSet refreshedElements refreshedElements show_bug hasNext IJavaElement IJavaElement getElementType IJavaElement PACKAGE_FRAGMENT_ROOT archivePathsToRefresh getPath IJavaElement JAVA_PROJECT JavaProject JavaProject JavaProject hasJavaNature getProject IClasspathEntry getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress cpLength cpLength getEntryKind IClasspathEntry CPE_LIBRARY archivePathsToRefresh getPath JavaModelException IJavaElement JAVA_MODEL IJavaProject getJavaModel getOldJavaProjectsList JavaModelException projectsLength projectsLength JavaProject JavaProject hasJavaNature getProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress JavaModelException cpLength cpLength getEntryKind IClasspathEntry CPE_LIBRARY archivePathsToRefresh getPath IJavaProject getJavaModel getOldJavaProjectsList JavaModelException IWorkspaceRoot wksRoot ResourcesPlugin getWorkspace getRoot isCanceled JavaProject JavaProject JavaProject hasJavaNature getProject IClasspathEntry getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress JavaModelException getEntryKind IClasspathEntry CPE_LIBRARY IPath entryPath getPath archivePathsToRefresh entryPath externalArchivesStatus entryPath targetLibrary JavaModel getTarget wksRoot entryPath targetLibrary externalTimeStamps entryPath externalArchivesStatus entryPath EXTERNAL_JAR_REMOVED indexManager removeIndex entryPath targetLibrary externalFile targetLibrary oldTimestamp externalTimeStamps entryPath newTimeStamp getTimeStamp externalFile oldTimestamp newTimeStamp externalArchivesStatus entryPath EXTERNAL_JAR_REMOVED externalTimeStamps entryPath indexManager removeIndex entryPath oldTimestamp longValue newTimeStamp externalArchivesStatus entryPath EXTERNAL_JAR_CHANGED externalTimeStamps entryPath newTimeStamp indexManager removeIndex entryPath indexManager indexLibrary entryPath getProject externalArchivesStatus entryPath EXTERNAL_JAR_UNCHANGED newTimeStamp externalArchivesStatus entryPath EXTERNAL_JAR_UNCHANGED externalArchivesStatus entryPath EXTERNAL_JAR_ADDED externalTimeStamps entryPath newTimeStamp indexManager indexLibrary entryPath getProject externalArchivesStatus entryPath INTERNAL_JAR_IGNORE externalArchivesStatus entryPath EXTERNAL_JAR_ADDED PackageFragmentRoot PackageFragmentRoot getPackageFragmentRoot entryPath toString getElementName elementAdded hasDelta EXTERNAL_JAR_CHANGED PackageFragmentRoot PackageFragmentRoot getPackageFragmentRoot entryPath toString getElementName setLastBuiltState getProject contentChanged hasDelta EXTERNAL_JAR_REMOVED PackageFragmentRoot PackageFragmentRoot getPackageFragmentRoot entryPath toString getElementName elementRemoved hasDelta hasDelta
private Java Element Delta current Delta if this current Delta null this current Delta new Java Element Delta this manager get Java Model return this current Delta  JavaElementDelta currentDelta currentDelta currentDelta JavaElementDelta getJavaModel currentDelta
private void deleting I Project project try discard indexing jobs that belong to this project so that the project can be deleted without interferences from the index manager this manager index Manager discard Jobs project get Name Java Project java Project Java Project Java Core create project remember roots of this project if this removed Roots null this removed Roots new Hash Map if java Project is Open this removed Roots put java Project java Project get Package Fragment Roots else compute roots without opening project this removed Roots put java Project java Project compute Package Fragment Roots java Project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress false java Project close workaround for bug 15168 circular errors not reported if this state model Projects Cache null this state model Projects Cache this manager get Java Model get Java Projects this remove From Parent Info java Project catch Java Model Exception e java project doesn t exist ignore  IProject indexManager discardJobs getName JavaProject javaProject JavaProject JavaCore removedRoots removedRoots HashMap javaProject isOpen removedRoots javaProject javaProject getPackageFragmentRoots removedRoots javaProject javaProject computePackageFragmentRoots javaProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress javaProject modelProjectsCache modelProjectsCache getJavaModel getJavaProjects removeFromParentInfo javaProject JavaModelException
private void element Added Openable element I Resource Delta delta Root Info root Info int element Type element get Element Type if element Type I Java Element JAVA PROJECT project add is handled by Java Project configure because when a project is created it does not yet have a java nature if delta null Java Project has Java Nature I Project delta get Resource add To Parent Info element if delta get Flags I Resource Delta MOVED FROM 0 Openable moved From Element Openable element get Java Model get Java Project delta get Moved From Path last Segment current Delta moved To element moved From Element else current Delta added element this state update Roots element get Path delta this refresh pkg fragment roots and caches of the project and its dependents this roots To Refresh add element this project Caches To Reset add element else if delta null delta get Flags I Resource Delta MOVED FROM 0 regular element addition if is Primary Working Copy element element Type filter out changes to primary compilation unit in working copy mode just report a change to the resource see https bugs eclipse org bugs show bug cgi id 59500 current Delta changed element I Java Element Delta F PRIMARY RESOURCE else add To Parent Info element Force the element to be closed as it might have been opened before the resource modification came in and it might have a new child For example in an I Workspace Runnable 1 create a package fragment p using a java model operation 2 open package p 3 add file X java in folder p When the resource delta comes in only the addition of p is notified but the package p is already opened thus its children are not recomputed and it appears empty close element current Delta added element else element is moved add To Parent Info element close element I Path moved From Path delta get Moved From Path I Resource res delta get Resource I Resource moved From Res if res instanceof I File moved From Res res get Workspace get Root get File moved From Path else moved From Res res get Workspace get Root get Folder moved From Path find the element type of the moved from element Root Info moved From Info this enclosing Root Info moved From Path I Resource Delta REMOVED int moved From Type this element Type moved From Res I Resource Delta REMOVED element get Parent get Element Type moved From Info reset current element as it might be inside a nested root pop Until Prefix Of may use the outer root this current Element null create the moved from element Openable moved From Element element Type I Java Element JAVA PROJECT moved From Type I Java Element JAVA PROJECT null outside classpath this create Element moved From Res moved From Type moved From Info if moved From Element null moved from outside classpath current Delta added element else current Delta moved To element moved From Element switch element Type case I Java Element PACKAGE FRAGMENT ROOT when a root is added and is on the classpath the project must be updated Java Project project Java Project element get Java Project refresh pkg fragment roots and caches of the project and its dependents this roots To Refresh add project this project Caches To Reset add project break case I Java Element PACKAGE FRAGMENT reset project s package fragment cache project Java Project element get Java Project this project Caches To Reset add project add subpackages if delta null Package Fragment Root root element get Package Fragment Root String name element get Element Name I Resource Delta children delta get Affected Children for int i 0 length children length i length i I Resource Delta child children i I Resource resource child get Resource if resource instanceof I Folder String folder Name resource get Name if Util is Valid Folder Name For Package folder Name String subpkg Name name length 0 folder Name name folder Name NON NLS 1 Openable subpkg Openable root get Package Fragment subpkg Name this update Index subpkg child this element Added subpkg child root Info break  elementAdded IResourceDelta RootInfo rootInfo elementType getElementType elementType IJavaElement JAVA_PROJECT JavaProject JavaProject hasJavaNature IProject getResource addToParentInfo getFlags IResourceDelta MOVED_FROM movedFromElement getJavaModel getJavaProject getMovedFromPath lastSegment currentDelta movedTo movedFromElement currentDelta updateRoots getPath rootsToRefresh projectCachesToReset getFlags IResourceDelta MOVED_FROM isPrimaryWorkingCopy elementType show_bug currentDelta IJavaElementDelta F_PRIMARY_RESOURCE addToParentInfo IWorkspaceRunnable currentDelta addToParentInfo IPath movedFromPath getMovedFromPath IResource getResource IResource movedFromRes IFile movedFromRes getWorkspace getRoot getFile movedFromPath movedFromRes getWorkspace getRoot getFolder movedFromPath RootInfo movedFromInfo enclosingRootInfo movedFromPath IResourceDelta movedFromType elementType movedFromRes IResourceDelta getParent getElementType movedFromInfo popUntilPrefixOf currentElement movedFromElement elementType IJavaElement JAVA_PROJECT movedFromType IJavaElement JAVA_PROJECT createElement movedFromRes movedFromType movedFromInfo movedFromElement currentDelta currentDelta movedTo movedFromElement elementType IJavaElement PACKAGE_FRAGMENT_ROOT JavaProject JavaProject getJavaProject rootsToRefresh projectCachesToReset IJavaElement PACKAGE_FRAGMENT JavaProject getJavaProject projectCachesToReset PackageFragmentRoot getPackageFragmentRoot getElementName IResourceDelta getAffectedChildren IResourceDelta IResource getResource IFolder folderName getName isValidFolderNameForPackage folderName subpkgName folderName folderName getPackageFragment subpkgName updateIndex elementAdded rootInfo
private void element Removed Openable element I Resource Delta delta Root Info root Info int element Type element get Element Type if delta null delta get Flags I Resource Delta MOVED TO 0 regular element removal if is Primary Working Copy element element Type filter out changes to primary compilation unit in working copy mode just report a change to the resource see https bugs eclipse org bugs show bug cgi id 59500 current Delta changed element I Java Element Delta F PRIMARY RESOURCE else close element remove From Parent Info element current Delta removed element else element is moved close element remove From Parent Info element I Path moved To Path delta get Moved To Path I Resource res delta get Resource I Resource moved To Res switch res get Type case I Resource PROJECT moved To Res res get Workspace get Root get Project moved To Path last Segment break case I Resource FOLDER moved To Res res get Workspace get Root get Folder moved To Path break case I Resource FILE moved To Res res get Workspace get Root get File moved To Path break default return find the element type of the moved from element Root Info moved To Info this enclosing Root Info moved To Path I Resource Delta ADDED int moved To Type this element Type moved To Res I Resource Delta ADDED element get Parent get Element Type moved To Info reset current element as it might be inside a nested root pop Until Prefix Of may use the outer root this current Element null create the moved To element Openable moved To Element element Type I Java Element JAVA PROJECT moved To Type I Java Element JAVA PROJECT null outside classpath this create Element moved To Res moved To Type moved To Info if moved To Element null moved outside classpath current Delta removed element else current Delta moved From element moved To Element switch element Type case I Java Element JAVA MODEL this manager index Manager reset break case I Java Element JAVA PROJECT this state update Roots element get Path delta this refresh pkg fragment roots and caches of the project and its dependents this roots To Refresh add element this project Caches To Reset add element break case I Java Element PACKAGE FRAGMENT ROOT Java Project project Java Project element get Java Project refresh pkg fragment roots and caches of the project and its dependents this roots To Refresh add project this project Caches To Reset add project break case I Java Element PACKAGE FRAGMENT reset package fragment cache project Java Project element get Java Project this project Caches To Reset add project remove subpackages if delta null Package Fragment Root root element get Package Fragment Root String name element get Element Name I Resource Delta children delta get Affected Children for int i 0 length children length i length i I Resource Delta child children i I Resource resource child get Resource if resource instanceof I Folder String folder Name resource get Name if Util is Valid Folder Name For Package folder Name String subpkg Name name length 0 folder Name name folder Name NON NLS 1 Openable subpkg Openable root get Package Fragment subpkg Name this update Index subpkg child this element Removed subpkg child root Info break  elementRemoved IResourceDelta RootInfo rootInfo elementType getElementType getFlags IResourceDelta MOVED_TO isPrimaryWorkingCopy elementType show_bug currentDelta IJavaElementDelta F_PRIMARY_RESOURCE removeFromParentInfo currentDelta removeFromParentInfo IPath movedToPath getMovedToPath IResource getResource IResource movedToRes getType IResource movedToRes getWorkspace getRoot getProject movedToPath lastSegment IResource movedToRes getWorkspace getRoot getFolder movedToPath IResource movedToRes getWorkspace getRoot getFile movedToPath RootInfo movedToInfo enclosingRootInfo movedToPath IResourceDelta movedToType elementType movedToRes IResourceDelta getParent getElementType movedToInfo popUntilPrefixOf currentElement movedToElement elementType IJavaElement JAVA_PROJECT movedToType IJavaElement JAVA_PROJECT createElement movedToRes movedToType movedToInfo movedToElement currentDelta currentDelta movedFrom movedToElement elementType IJavaElement JAVA_MODEL indexManager IJavaElement JAVA_PROJECT updateRoots getPath rootsToRefresh projectCachesToReset IJavaElement PACKAGE_FRAGMENT_ROOT JavaProject JavaProject getJavaProject rootsToRefresh projectCachesToReset IJavaElement PACKAGE_FRAGMENT JavaProject getJavaProject projectCachesToReset PackageFragmentRoot getPackageFragmentRoot getElementName IResourceDelta getAffectedChildren IResourceDelta IResource getResource IFolder folderName getName isValidFolderNameForPackage folderName subpkgName folderName folderName getPackageFragment subpkgName updateIndex elementRemoved rootInfo
private int element Type I Resource res int kind int parent Type Root Info root Info switch parent Type case I Java Element JAVA MODEL case of a moved To or moved From project other cases are handled in process Resource Delta return I Java Element JAVA PROJECT case NON JAVA RESOURCE case I Java Element JAVA PROJECT if root Info null root Info this enclosing Root Info res get Full Path kind if root Info null root Info is Root Of Project res get Full Path return I Java Element PACKAGE FRAGMENT ROOT not yet in a package fragment root or root of another project or package fragment to be included see below let it go through case I Java Element PACKAGE FRAGMENT ROOT case I Java Element PACKAGE FRAGMENT if root Info null root Info this enclosing Root Info res get Full Path kind if root Info null return NON JAVA RESOURCE if Util is Excluded res root Info inclusion Patterns root Info exclusion Patterns return NON JAVA RESOURCE if res get Type I Resource FOLDER if Util is Valid Folder Name For Package res get Name return I Java Element PACKAGE FRAGMENT return NON JAVA RESOURCE String file Name res get Name if Util is Valid Compilation Unit Name file Name return I Java Element COMPILATION UNIT else if Util is Valid Class File Name file Name return I Java Element CLASS FILE else if this root Info res get Full Path kind null case of proj src bin and resource is a jar file on the classpath return I Java Element PACKAGE FRAGMENT ROOT else return NON JAVA RESOURCE default return NON JAVA RESOURCE  elementType IResource parentType RootInfo rootInfo parentType IJavaElement JAVA_MODEL movedTo movedFrom processResourceDelta IJavaElement JAVA_PROJECT NON_JAVA_RESOURCE IJavaElement JAVA_PROJECT rootInfo rootInfo enclosingRootInfo getFullPath rootInfo rootInfo isRootOfProject getFullPath IJavaElement PACKAGE_FRAGMENT_ROOT IJavaElement PACKAGE_FRAGMENT_ROOT IJavaElement PACKAGE_FRAGMENT rootInfo rootInfo enclosingRootInfo getFullPath rootInfo NON_JAVA_RESOURCE isExcluded rootInfo inclusionPatterns rootInfo exclusionPatterns NON_JAVA_RESOURCE getType IResource isValidFolderNameForPackage getName IJavaElement PACKAGE_FRAGMENT NON_JAVA_RESOURCE fileName getName isValidCompilationUnitName fileName IJavaElement COMPILATION_UNIT isValidClassFileName fileName IJavaElement CLASS_FILE rootInfo getFullPath IJavaElement PACKAGE_FRAGMENT_ROOT NON_JAVA_RESOURCE NON_JAVA_RESOURCE
Flushes all deltas without firing them public void flush this java Model Deltas new Array List  javaModelDeltas ArrayList
private Root Info enclosing Root Info I Path path int kind while path null path segment Count 0 Root Info root Info this root Info path kind if root Info null return root Info path path remove Last Segments 1 return null  RootInfo enclosingRootInfo IPath segmentCount RootInfo rootInfo rootInfo rootInfo rootInfo removeLastSegments
public void fire I Java Element Delta custom Delta int event Type if this is Firing return if DEBUG System out println NON NLS 1 I Java Element Delta delta To Notify if custom Delta null delta To Notify this merge Deltas this java Model Deltas else delta To Notify custom Delta Refresh internal scopes if delta To Notify null Iterator scopes this manager search Scopes key Set iterator while scopes has Next Abstract Search Scope scope Abstract Search Scope scopes next scope process Delta delta To Notify Notification Important if any listener reacts to notification by updating the listeners list or mask these lists will be duplicated so it is necessary to remember original lists in a variable since field values may change under us I Element Changed Listener listeners this state element Changed Listeners int listener Mask this state element Changed Listener Masks int listener Count this state element Changed Listener Count switch event Type case DEFAULT CHANGE EVENT fire Post Change Delta delta To Notify listeners listener Mask listener Count fire Reconcile Delta listeners listener Mask listener Count break case Element Changed Event POST CHANGE fire Post Change Delta delta To Notify listeners listener Mask listener Count fire Reconcile Delta listeners listener Mask listener Count break  IJavaElementDelta customDelta eventType isFiring IJavaElementDelta deltaToNotify customDelta deltaToNotify mergeDeltas javaModelDeltas deltaToNotify customDelta deltaToNotify searchScopes keySet hasNext AbstractSearchScope AbstractSearchScope processDelta deltaToNotify IElementChangedListener elementChangedListeners listenerMask elementChangedListenerMasks listenerCount elementChangedListenerCount eventType DEFAULT_CHANGE_EVENT firePostChangeDelta deltaToNotify listenerMask listenerCount fireReconcileDelta listenerMask listenerCount ElementChangedEvent POST_CHANGE firePostChangeDelta deltaToNotify listenerMask listenerCount fireReconcileDelta listenerMask listenerCount
private void fire Post Change Delta I Java Element Delta delta To Notify I Element Changed Listener listeners int listener Mask int listener Count post change deltas if DEBUG System out println FIRING POST CHANGE Delta Thread current Thread NON NLS 1 NON NLS 2 System out println delta To Notify null NONE delta To Notify to String NON NLS 1 if delta To Notify null flush now so as to keep listener reactions to post their own deltas for subsequent iteration this flush notify Listeners delta To Notify Element Changed Event POST CHANGE listeners listener Mask listener Count  firePostChangeDelta IJavaElementDelta deltaToNotify IElementChangedListener listenerMask listenerCount POST_CHANGE currentThread deltaToNotify deltaToNotify toString deltaToNotify notifyListeners deltaToNotify ElementChangedEvent POST_CHANGE listenerMask listenerCount
private void fire Reconcile Delta I Element Changed Listener listeners int listener Mask int listener Count I Java Element Delta delta To Notify merge Deltas this reconcile Deltas values if DEBUG System out println FIRING POST RECONCILE Delta Thread current Thread NON NLS 1 NON NLS 2 System out println delta To Notify null NONE delta To Notify to String NON NLS 1 if delta To Notify null flush now so as to keep listener reactions to post their own deltas for subsequent iteration this reconcile Deltas new Hash Map notify Listeners delta To Notify Element Changed Event POST RECONCILE listeners listener Mask listener Count  fireReconcileDelta IElementChangedListener listenerMask listenerCount IJavaElementDelta deltaToNotify mergeDeltas reconcileDeltas POST_RECONCILE currentThread deltaToNotify deltaToNotify toString deltaToNotify reconcileDeltas HashMap notifyListeners deltaToNotify ElementChangedEvent POST_RECONCILE listenerMask listenerCount
root Delta accept new I Resource Delta Visitor public boolean visit I Resource Delta delta throws Core Exception switch delta get Kind case I Resource Delta ADDED case I Resource Delta REMOVED throw new Found Relevant Delta Exception case I Resource Delta CHANGED if any flag is set but SYNC or MARKER this delta should be considered if delta get Affected Children length 0 only check leaf delta nodes delta get Flags I Resource Delta SYNC I Resource Delta MARKERS 0 throw new Found Relevant Delta Exception return true  rootDelta IResourceDeltaVisitor IResourceDelta CoreException getKind IResourceDelta IResourceDelta FoundRelevantDeltaException IResourceDelta getAffectedChildren getFlags IResourceDelta IResourceDelta FoundRelevantDeltaException
private boolean is Affected By I Resource Delta root Delta if root Delta null System out println NULL DELTA long start System current Time Millis if root Delta null use local exception to quickly escape from delta traversal class Found Relevant Delta Exception extends Runtime Exception only the class name is used to differenciate from other Runtime Exceptions try root Delta accept new I Resource Delta Visitor public boolean visit I Resource Delta delta throws Core Exception switch delta get Kind case I Resource Delta ADDED case I Resource Delta REMOVED throw new Found Relevant Delta Exception case I Resource Delta CHANGED if any flag is set but SYNC or MARKER this delta should be considered if delta get Affected Children length 0 only check leaf delta nodes delta get Flags I Resource Delta SYNC I Resource Delta MARKERS 0 throw new Found Relevant Delta Exception return true catch Found Relevant Delta Exception e System out println RELEVANT DELTA detected in System current Time Millis start return true catch Core Exception e ignore delta if not able to traverse System out println IGNORE SYNC DELTA took System current Time Millis start return false  isAffectedBy IResourceDelta rootDelta rootDelta currentTimeMillis rootDelta FoundRelevantDeltaException RuntimeException RuntimeExceptions rootDelta IResourceDeltaVisitor IResourceDelta CoreException getKind IResourceDelta IResourceDelta FoundRelevantDeltaException IResourceDelta getAffectedChildren getFlags IResourceDelta IResourceDelta FoundRelevantDeltaException FoundRelevantDeltaException currentTimeMillis CoreException currentTimeMillis
private boolean is Primary Working Copy I Java Element element int element Type if element Type I Java Element COMPILATION UNIT Compilation Unit cu Compilation Unit element return cu is Primary cu is Working Copy return false  isPrimaryWorkingCopy IJavaElement elementType elementType IJavaElement COMPILATION_UNIT CompilationUnit CompilationUnit isPrimary isWorkingCopy
private boolean is Res Filtered From Output Outputs Info info I Resource res int element Type if info null I Path res Path res get Full Path for int i 0 i info output Count i if info paths i is Prefix Of res Path if info traverse Modes i IGNORE case of bin src if info traverse Modes i SOURCE element Type I Java Element CLASS FILE return true case of class file under project and no source folder proj bin if element Type I Java Element JAVA PROJECT res instanceof I File Util is Valid Class File Name res get Name return true else return true return false  isResFilteredFromOutput OutputsInfo IResource elementType IPath resPath getFullPath outputCount isPrefixOf resPath traverseModes traverseModes elementType IJavaElement CLASS_FILE elementType IJavaElement JAVA_PROJECT IFile isValidClassFileName getName
private I Java Element Delta merge Deltas Collection deltas if deltas size 0 return null if deltas size 1 return I Java Element Delta deltas iterator next if VERBOSE System out println MERGING deltas size DELTAS Thread current Thread NON NLS 1 NON NLS 2 NON NLS 3 Iterator iterator deltas iterator Java Element Delta root Delta new Java Element Delta this manager java Model boolean inserted Tree false while iterator has Next Java Element Delta delta Java Element Delta iterator next if VERBOSE System out println delta to String I Java Element element delta get Element if this manager java Model equals element I Java Element Delta children delta get Affected Children for int j 0 j children length j Java Element Delta project Delta Java Element Delta children j root Delta insert Delta Tree project Delta get Element project Delta inserted Tree true I Resource Delta resource Deltas delta get Resource Deltas if resource Deltas null for int i 0 length resource Deltas length i length i root Delta add Resource Delta resource Deltas i inserted Tree true else root Delta insert Delta Tree element delta inserted Tree true if inserted Tree return root Delta return null  IJavaElementDelta mergeDeltas IJavaElementDelta currentThread JavaElementDelta rootDelta JavaElementDelta javaModel insertedTree hasNext JavaElementDelta JavaElementDelta toString IJavaElement getElement javaModel IJavaElementDelta getAffectedChildren JavaElementDelta projectDelta JavaElementDelta rootDelta insertDeltaTree projectDelta getElement projectDelta insertedTree IResourceDelta resourceDeltas getResourceDeltas resourceDeltas resourceDeltas rootDelta addResourceDelta resourceDeltas insertedTree rootDelta insertDeltaTree insertedTree insertedTree rootDelta
wrap callbacks with Safe runnable for subsequent listeners to be called when some are causing grief Platform run new I Safe Runnable public void handle Exception Throwable exception Util log exception Exception occurred in listener of Java element change notification NON NLS 1  ISafeRunnable handleException
Util log exception Exception occurred in listener of Java element change notification NON NLS 1 public void run throws Exception listener element Changed extra Event  elementChanged extraEvent
private void notify Listeners I Java Element Delta delta To Notify int event Type I Element Changed Listener listeners int listener Mask int listener Count final Element Changed Event extra Event new Element Changed Event delta To Notify event Type for int i 0 i listener Count i if listener Mask i event Type 0 final I Element Changed Listener listener listeners i long start 1 if VERBOSE System out print Listener i 1 listener to String NON NLS 1 NON NLS 2 start System current Time Millis wrap callbacks with Safe runnable for subsequent listeners to be called when some are causing grief Platform run new I Safe Runnable public void handle Exception Throwable exception Util log exception Exception occurred in listener of Java element change notification NON NLS 1 public void run throws Exception listener element Changed extra Event if VERBOSE System out println System current Time Millis start ms NON NLS 1 NON NLS 2  notifyListeners IJavaElementDelta deltaToNotify eventType IElementChangedListener listenerMask listenerCount ElementChangedEvent extraEvent ElementChangedEvent deltaToNotify eventType listenerCount listenerMask eventType IElementChangedListener toString currentTimeMillis ISafeRunnable handleException elementChanged extraEvent currentTimeMillis
wrap callbacks with Safe runnable for subsequent listeners to be called when some are causing grief Platform run new I Safe Runnable public void handle Exception Throwable exception Util log exception Exception occurred in listener of Java element change notification NON NLS 1  ISafeRunnable handleException
public void run throws Exception Type Hierarchy type Hierarchy Type Hierarchy listener if type Hierarchy has Fine Grain Changes case of changes in primary working copies type Hierarchy needs Refresh true type Hierarchy fire Change  TypeHierarchy typeHierarchy TypeHierarchy typeHierarchy hasFineGrainChanges typeHierarchy needsRefresh typeHierarchy fireChange
private void notify Type Hierarchies I Element Changed Listener listeners int listener Count for int i 0 i listener Count i final I Element Changed Listener listener listeners i if listener instanceof Type Hierarchy continue wrap callbacks with Safe runnable for subsequent listeners to be called when some are causing grief Platform run new I Safe Runnable public void handle Exception Throwable exception Util log exception Exception occurred in listener of Java element change notification NON NLS 1 public void run throws Exception Type Hierarchy type Hierarchy Type Hierarchy listener if type Hierarchy has Fine Grain Changes case of changes in primary working copies type Hierarchy needs Refresh true type Hierarchy fire Change  notifyTypeHierarchies IElementChangedListener listenerCount listenerCount IElementChangedListener TypeHierarchy ISafeRunnable handleException TypeHierarchy typeHierarchy TypeHierarchy typeHierarchy hasFineGrainChanges typeHierarchy needsRefresh typeHierarchy fireChange
private void non Java Resources Changed Openable element I Resource Delta delta throws Java Model Exception reset non java resources if element was open if element is Open Java Element Info info Java Element Info element get Element Info switch element get Element Type case I Java Element JAVA MODEL Java Model Info info non Java Resources null current Delta add Resource Delta delta return case I Java Element JAVA PROJECT Java Project Element Info info set Non Java Resources null if a package fragment root is the project clear it too Java Project project Java Project element Package Fragment Root project Root Package Fragment Root project get Package Fragment Root project get Project if project Root is Open Package Fragment Root Info project Root get Element Info set Non Java Resources null break case I Java Element PACKAGE FRAGMENT Package Fragment Info info set Non Java Resources null break case I Java Element PACKAGE FRAGMENT ROOT Package Fragment Root Info info set Non Java Resources null Java Element Delta current current Delta Java Element Delta element Delta current find element if element Delta null don t use find after creating the delta as it can be null see https bugs eclipse org bugs show bug cgi id 63434 element Delta current changed element I Java Element Delta F CONTENT element Delta add Resource Delta delta  nonJavaResourcesChanged IResourceDelta JavaModelException isOpen JavaElementInfo JavaElementInfo getElementInfo getElementType IJavaElement JAVA_MODEL JavaModelInfo nonJavaResources currentDelta addResourceDelta IJavaElement JAVA_PROJECT JavaProjectElementInfo setNonJavaResources JavaProject JavaProject PackageFragmentRoot projectRoot PackageFragmentRoot getPackageFragmentRoot getProject projectRoot isOpen PackageFragmentRootInfo projectRoot getElementInfo setNonJavaResources IJavaElement PACKAGE_FRAGMENT PackageFragmentInfo setNonJavaResources IJavaElement PACKAGE_FRAGMENT_ROOT PackageFragmentRootInfo setNonJavaResources JavaElementDelta currentDelta JavaElementDelta elementDelta elementDelta show_bug elementDelta IJavaElementDelta F_CONTENT elementDelta addResourceDelta
private Array List other Roots Info I Path path int kind if kind I Resource Delta REMOVED return Array List this state old Other Roots get path return Array List this state other Roots get path  ArrayList otherRootsInfo IPath IResourceDelta ArrayList oldOtherRoots ArrayList otherRoots
private Outputs Info outputs Info Root Info root Info I Resource res try Java Project proj root Info null Java Project this create Element res get Project I Java Element JAVA PROJECT null root Info project if proj null I Path project Output proj get Output Location int traverse Mode IGNORE if proj get Project get Full Path equals project Output case of proj bin src return new Outputs Info new I Path project Output new int SOURCE 1 I Classpath Entry classpath proj get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress I Path outputs new I Path classpath length 1 int traverse Modes new int classpath length 1 int output Count 1 outputs 0 project Output traverse Modes 0 traverse Mode for int i 0 length classpath length i length i I Classpath Entry entry classpath i I Path entry Path entry get Path I Path output entry get Output Location if output null outputs output Count output check case of src bin if entry Path equals output traverse Modes output Count entry get Entry Kind I Classpath Entry CPE SOURCE SOURCE BINARY else traverse Modes output Count IGNORE check case of src bin if entry Path equals project Output traverse Modes 0 entry get Entry Kind I Classpath Entry CPE SOURCE SOURCE BINARY return new Outputs Info outputs traverse Modes output Count catch Java Model Exception e java project doesn t exist ignore return null  OutputsInfo outputsInfo RootInfo rootInfo IResource JavaProject rootInfo JavaProject createElement getProject IJavaElement JAVA_PROJECT rootInfo IPath projectOutput getOutputLocation traverseMode getProject getFullPath projectOutput OutputsInfo IPath projectOutput IClasspathEntry getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress IPath IPath traverseModes outputCount projectOutput traverseModes traverseMode IClasspathEntry IPath entryPath getPath IPath getOutputLocation outputCount entryPath traverseModes outputCount getEntryKind IClasspathEntry CPE_SOURCE traverseModes outputCount entryPath projectOutput traverseModes getEntryKind IClasspathEntry CPE_SOURCE OutputsInfo traverseModes outputCount JavaModelException
private void pop Until Prefix Of I Path path while this current Element null I Path current Element Path null if this current Element instanceof I Package Fragment Root current Element Path I Package Fragment Root this current Element get Path else I Resource current Element Resource this current Element get Resource if current Element Resource null current Element Path current Element Resource get Full Path if current Element Path null if this current Element instanceof I Package Fragment this current Element get Element Name length 0 current Element Path segment Count path segment Count 1 default package and path is not a direct child this current Element Openable this current Element get Parent if current Element Path is Prefix Of path return this current Element Openable this current Element get Parent  popUntilPrefixOf IPath currentElement IPath currentElementPath currentElement IPackageFragmentRoot currentElementPath IPackageFragmentRoot currentElement getPath IResource currentElementResource currentElement getResource currentElementResource currentElementPath currentElementResource getFullPath currentElementPath currentElement IPackageFragment currentElement getElementName currentElementPath segmentCount segmentCount currentElement currentElement getParent currentElementPath isPrefixOf currentElement currentElement getParent
private I Java Element Delta process Resource Delta I Resource Delta changes try I Java Model model this manager get Java Model if model is Open force opening of java model so that java element delta are reported try model open null catch Java Model Exception e if VERBOSE e print Stack Trace return null this state initialize Roots this current Element null get the workspace delta and start processing there I Resource Delta deltas changes get Affected Children for int i 0 i deltas length i I Resource Delta delta deltas i I Resource res delta get Resource find out the element type Root Info root Info null int element Type I Project proj I Project res boolean was Java Project this manager get Java Model find Java Project proj null boolean is Java Project Java Project has Java Nature proj if was Java Project is Java Project element Type NON JAVA RESOURCE else root Info this enclosing Root Info res get Full Path delta get Kind if root Info null root Info is Root Of Project res get Full Path element Type I Java Element PACKAGE FRAGMENT ROOT else element Type I Java Element JAVA PROJECT traverse delta this traverse Delta delta element Type root Info null if element Type NON JAVA RESOURCE was Java Project is Java Project delta get Kind I Resource Delta CHANGED project has changed nature description or open closed try add child as non java resource non Java Resources Changed Java Model model delta catch Java Model Exception e java model could not be opened refresh Package Fragment Roots reset Project Caches return this current Delta finally this current Delta null this roots To Refresh clear this project Caches To Reset clear  IJavaElementDelta processResourceDelta IResourceDelta IJavaModel getJavaModel isOpen JavaModelException printStackTrace initializeRoots currentElement IResourceDelta getAffectedChildren IResourceDelta IResource getResource RootInfo rootInfo elementType IProject IProject wasJavaProject getJavaModel findJavaProject isJavaProject JavaProject hasJavaNature wasJavaProject isJavaProject elementType NON_JAVA_RESOURCE rootInfo enclosingRootInfo getFullPath getKind rootInfo rootInfo isRootOfProject getFullPath elementType IJavaElement PACKAGE_FRAGMENT_ROOT elementType IJavaElement JAVA_PROJECT traverseDelta elementType rootInfo elementType NON_JAVA_RESOURCE wasJavaProject isJavaProject getKind IResourceDelta nonJavaResourcesChanged JavaModel JavaModelException refreshPackageFragmentRoots resetProjectCaches currentDelta currentDelta rootsToRefresh projectCachesToReset
private void reconcile Classpath File Update I Resource Delta delta Java Project project switch delta get Kind case I Resource Delta REMOVED recreate one based on in memory classpath try Java Model Manager Per Project Info info project get Per Project Info if info raw Classpath null if there is an in memory classpath project save Classpath info raw Classpath info output Location catch Java Model Exception e if project get Project is Accessible Util log e Could not save classpath for project get Path NON NLS 1 break case I Resource Delta CHANGED if delta get Flags I Resource Delta CONTENT 0 only consider content change delta get Flags I Resource Delta MOVED FROM 0 and also move and overide scenario see http dev eclipse org bugs show bug cgi id 21420 break fall through case I Resource Delta ADDED try project force Classpath Reload null catch Runtime Exception e if VERBOSE e print Stack Trace catch Java Model Exception e if VERBOSE e print Stack Trace  reconcileClasspathFileUpdate IResourceDelta JavaProject getKind IResourceDelta JavaModelManager PerProjectInfo getPerProjectInfo rawClasspath saveClasspath rawClasspath outputLocation JavaModelException getProject isAccessible getPath IResourceDelta getFlags IResourceDelta getFlags IResourceDelta MOVED_FROM show_bug IResourceDelta forceClasspathReload RuntimeException printStackTrace JavaModelException printStackTrace
void reconcile Preference File Update I Resource Delta delta I File file Java Project project switch delta get Kind case I Resource Delta REMOVED flush project custom settings project set Options null return case I Resource Delta CHANGED if delta get Flags I Resource Delta CONTENT 0 only consider content change delta get Flags I Resource Delta MOVED FROM 0 and also move and overide scenario break identity Check check if any actual difference force to re read the property file Preferences file Preferences project load Preferences if file Preferences null project set Options null should have got removed delta return Preferences project Preferences project get Preferences if project Preferences null return not a Java project compare preferences set to their default String default Project Property Names project Preferences default Property Names String default File Property Names file Preferences default Property Names if default Project Property Names length default File Property Names length for int i 0 i default Project Property Names length i String property Name default Project Property Names i if project Preferences get String property Name trim equals file Preferences get String property Name trim break identity Check else break identity Check compare custom preferences not set to their default String project Property Names project Preferences property Names String file Property Names file Preferences property Names if project Property Names length file Property Names length for int i 0 i project Property Names length i String property Name project Property Names i if project Preferences get String property Name trim equals file Preferences get String property Name trim break identity Check else break identity Check identical do nothing return case I Resource Delta ADDED not identical create delta and reset cached preferences project set Preferences null create delta f Current Delta changed project I Java Element Delta F OPTIONS CHANGED  reconcilePreferenceFileUpdate IResourceDelta IFile JavaProject getKind IResourceDelta setOptions IResourceDelta getFlags IResourceDelta getFlags IResourceDelta MOVED_FROM identityCheck filePreferences loadPreferences filePreferences setOptions projectPreferences getPreferences projectPreferences defaultProjectPropertyNames projectPreferences defaultPropertyNames defaultFilePropertyNames filePreferences defaultPropertyNames defaultProjectPropertyNames defaultFilePropertyNames defaultProjectPropertyNames propertyName defaultProjectPropertyNames projectPreferences getString propertyName filePreferences getString propertyName identityCheck identityCheck projectPropertyNames projectPreferences propertyNames filePropertyNames filePreferences propertyNames projectPropertyNames filePropertyNames projectPropertyNames propertyName projectPropertyNames projectPreferences getString propertyName filePreferences getString propertyName identityCheck identityCheck IResourceDelta setPreferences fCurrentDelta IJavaElementDelta F_OPTIONS_CHANGED
private void reset Project Caches Iterator iterator this project Caches To Reset iterator Hash Set affected Dependents new Hash Set while iterator has Next Java Project project Java Project iterator next project reset Caches add Dependent Projects project get Path affected Dependents reset caches of dependent projects iterator affected Dependents iterator while iterator has Next Java Project project Java Project iterator next project reset Caches  resetProjectCaches projectCachesToReset HashSet affectedDependents HashSet hasNext JavaProject JavaProject resetCaches addDependentProjects getPath affectedDependents affectedDependents hasNext JavaProject JavaProject resetCaches
private void refresh Package Fragment Roots Iterator iterator this roots To Refresh iterator while iterator has Next Java Project project Java Project iterator next project update Package Fragment Roots  refreshPackageFragmentRoots rootsToRefresh hasNext JavaProject JavaProject updatePackageFragmentRoots
Registers the given delta with this delta processor public void register Java Model Delta I Java Element Delta delta this java Model Deltas add delta  registerJavaModelDelta IJavaElementDelta javaModelDeltas
private void remove From Parent Info Openable child Openable parent Openable child get Parent if parent null parent is Open try Java Element Info info Java Element Info parent get Element Info info remove Child child catch Java Model Exception e do nothing we already checked if open  removeFromParentInfo getParent isOpen JavaElementInfo JavaElementInfo getElementInfo removeChild JavaModelException
public void resource Changed I Resource Change Event event if event get Source instanceof I Workspace int event Type this overriden Event Type 1 event get Type this overriden Event Type I Resource resource event get Resource I Resource Delta delta event get Delta switch event Type case I Resource Change Event PRE DELETE try if resource get Type I Resource PROJECT I Project resource has Nature Java Core NATURE ID deleting I Project resource catch Core Exception e project doesn t exist or is not open ignore return case I Resource Change Event POST CHANGE if is Affected By delta avoid populating for SYNC or MARKER deltas try try stop Deltas check Projects Being Added Or Removed delta if this refreshed Elements null create External Archive Delta null I Java Element Delta translated Delta process Resource Delta delta if translated Delta null register Java Model Delta translated Delta finally start Deltas notify Type Hierarchies this state element Changed Listeners this state element Changed Listener Count fire null Element Changed Event POST CHANGE finally workaround for bug 15168 circular errors not reported this state model Projects Cache null this removed Roots null return case I Resource Change Event PRE BUILD Delta Processing State Project Update Info updates this state remove All Project Updates if updates null for int i 0 length updates length i length i try updates i update Project References If Necessary catch Java Model Exception e do nothing this process Post Change false if is Affected By delta avoid populating for SYNC or MARKER deltas update Classpath Markers delta Java Builder build Starting does not fire any deltas return case I Resource Change Event POST BUILD Java Builder build Finished return  resourceChanged IResourceChangeEvent getSource IWorkspace eventType overridenEventType getType overridenEventType IResource getResource IResourceDelta getDelta eventType IResourceChangeEvent PRE_DELETE getType IResource IProject hasNature JavaCore NATURE_ID IProject CoreException IResourceChangeEvent POST_CHANGE isAffectedBy stopDeltas checkProjectsBeingAddedOrRemoved refreshedElements createExternalArchiveDelta IJavaElementDelta translatedDelta processResourceDelta translatedDelta registerJavaModelDelta translatedDelta startDeltas notifyTypeHierarchies elementChangedListeners elementChangedListenerCount ElementChangedEvent POST_CHANGE modelProjectsCache removedRoots IResourceChangeEvent PRE_BUILD DeltaProcessingState ProjectUpdateInfo removeAllProjectUpdates updateProjectReferencesIfNecessary JavaModelException processPostChange isAffectedBy updateClasspathMarkers JavaBuilder buildStarting IResourceChangeEvent POST_BUILD JavaBuilder buildFinished
private Root Info root Info I Path path int kind if kind I Resource Delta REMOVED return Root Info this state old Roots get path return Root Info this state roots get path  RootInfo rootInfo IPath IResourceDelta RootInfo oldRoots RootInfo
registered will be fired private void start Deltas this is Firing true  startDeltas isFiring
registered will not be fired until deltas are started again private void stop Deltas this is Firing false  stopDeltas isFiring
private void traverse Delta I Resource Delta delta int element Type Root Info root Info Outputs Info outputs Info I Resource res delta get Resource set stack of elements if this current Element null root Info null this current Element root Info project process current delta boolean process Children true if res instanceof I Project process Children this update Current Delta And Index delta element Type I Java Element PACKAGE FRAGMENT ROOT I Java Element JAVA PROJECT case of prj src element Type root Info else if root Info null process Children this update Current Delta And Index delta element Type root Info else not yet inside a package fragment root process Children true get the project s output locations and traverse mode if outputs Info null outputs Info this outputs Info root Info res process children if needed if process Children I Resource Delta children delta get Affected Children boolean one Child On Classpath false int length children length I Resource Delta orphan Children null Openable parent null boolean is Valid Parent true for int i 0 i length i I Resource Delta child children i I Resource child Res child get Resource check source attachment change this check Source Attachment Change child child Res find out whether the child is a package fragment root of the current project I Path child Path child Res get Full Path int child Kind child get Kind Root Info child Root Info this root Info child Path child Kind if child Root Info null child Root Info is Root Of Project child Path package fragment root of another project dealt with later child Root Info null compute child type int child Type this element Type child Res child Kind element Type root Info null child Root Info root Info is child Res in the output folder and is it filtered out boolean is Res Filtered From Output this is Res Filtered From Output outputs Info child Res child Type boolean is Nested Root root Info null child Root Info null if is Res Filtered From Output is Nested Root do not treat as non java rsc if nested root this traverse Delta child child Type root Info null child Root Info root Info outputs Info traverse delta for child in the same project if child Type NON JAVA RESOURCE if root Info null if inside a package fragment root if is Valid Parent continue if parent null find the parent of the non java resource to attach to if this current Element null root Info project equals this current Element get Java Project note if current Element is the I Java Model get Java Project is null force the current Project to be used this current Element root Info project if element Type I Java Element JAVA PROJECT element Type I Java Element PACKAGE FRAGMENT ROOT res instanceof I Project NB attach non java resource to project not to its package fragment root parent root Info project else parent this create Element res element Type root Info if parent null is Valid Parent false continue add child as non java resource try non Java Resources Changed parent child catch Java Model Exception e ignore else the non java resource or its parent folder will be attached to the java project if orphan Children null orphan Children new I Resource Delta length orphan Children i child else one Child On Classpath true else one Child On Classpath true to avoid reporting child delta as non java resource delta if child is a nested root or if it is not a package fragment root of the current project but it is a package fragment root of another project traverse delta too if is Nested Root child Root Info null child Root Info this root Info child Path child Kind null this traverse Delta child I Java Element PACKAGE FRAGMENT ROOT child Root Info null binary output of child Root Info project cannot be this root if the child is a package fragment root of one or several other projects Array List root List if root List this other Roots Info child Path child Kind null Iterator iterator root List iterator while iterator has Next child Root Info Root Info iterator next this traverse Delta child I Java Element PACKAGE FRAGMENT ROOT child Root Info null binary output of child Root Info project cannot be this root if orphan Children null one Child On Classpath orphan children are siblings of a package fragment root res instanceof I Project non java resource directly under a project attach orphan children I Project rsc Project res get Project Java Project adoptive Project Java Project Java Core create rsc Project if adoptive Project null Java Project has Java Nature rsc Project delta iff Java project 18698 for int i 0 i length i if orphan Children i null try non Java Resources Changed adoptive Project orphan Children i catch Java Model Exception e ignore else resource delta will be added by parent else resource delta will be added by parent  traverseDelta IResourceDelta elementType RootInfo rootInfo OutputsInfo outputsInfo IResource getResource currentElement rootInfo currentElement rootInfo processChildren IProject processChildren updateCurrentDeltaAndIndex elementType IJavaElement PACKAGE_FRAGMENT_ROOT IJavaElement JAVA_PROJECT elementType rootInfo rootInfo processChildren updateCurrentDeltaAndIndex elementType rootInfo processChildren outputsInfo outputsInfo outputsInfo rootInfo processChildren IResourceDelta getAffectedChildren oneChildOnClasspath IResourceDelta orphanChildren isValidParent IResourceDelta IResource childRes getResource checkSourceAttachmentChange childRes IPath childPath childRes getFullPath childKind getKind RootInfo childRootInfo rootInfo childPath childKind childRootInfo childRootInfo isRootOfProject childPath childRootInfo childType elementType childRes childKind elementType rootInfo childRootInfo rootInfo childRes isResFilteredFromOutput isResFilteredFromOutput outputsInfo childRes childType isNestedRoot rootInfo childRootInfo isResFilteredFromOutput isNestedRoot traverseDelta childType rootInfo childRootInfo rootInfo outputsInfo childType NON_JAVA_RESOURCE rootInfo isValidParent currentElement rootInfo currentElement getJavaProject currentElement IJavaModel getJavaProject currentProject currentElement rootInfo elementType IJavaElement JAVA_PROJECT elementType IJavaElement PACKAGE_FRAGMENT_ROOT IProject rootInfo createElement elementType rootInfo isValidParent nonJavaResourcesChanged JavaModelException orphanChildren orphanChildren IResourceDelta orphanChildren oneChildOnClasspath oneChildOnClasspath isNestedRoot childRootInfo childRootInfo rootInfo childPath childKind traverseDelta IJavaElement PACKAGE_FRAGMENT_ROOT childRootInfo childRootInfo ArrayList rootList rootList otherRootsInfo childPath childKind rootList hasNext childRootInfo RootInfo traverseDelta IJavaElement PACKAGE_FRAGMENT_ROOT childRootInfo childRootInfo orphanChildren oneChildOnClasspath IProject IProject rscProject getProject JavaProject adoptiveProject JavaProject JavaCore rscProject adoptiveProject JavaProject hasJavaNature rscProject orphanChildren nonJavaResourcesChanged adoptiveProject orphanChildren JavaModelException
private void update Classpath Markers I Resource Delta delta Hash Set affected Projects Map preferred Classpaths Map preferred Outputs I Resource resource delta get Resource boolean process Children false switch resource get Type case I Resource ROOT if delta get Kind I Resource Delta CHANGED process Children true break case I Resource PROJECT I Project project I Project resource int kind delta get Kind boolean is Java Project Java Project has Java Nature project switch kind case I Resource Delta ADDED process Children is Java Project affected Projects add project get Full Path break case I Resource Delta CHANGED process Children is Java Project if delta get Flags I Resource Delta OPEN 0 project opened or closed remember project and its dependents affected Projects add project get Full Path if is Java Project Java Project java Project Java Project Java Core create project java Project update Classpath Markers preferred Classpaths preferred Outputs in case classpath got modified while closed else if delta get Flags I Resource Delta DESCRIPTION 0 boolean was Java Project this manager get Java Model find Java Project project null if was Java Project is Java Project project no longer has Java nature discard Java related obsolete markers affected Projects add project get Full Path flush classpath markers Java Project java Project Java Project Java Core create project java Project flush Classpath Problem Markers true flush cycle markers true flush classpath format markers remove problems and tasks created by the builder Java Builder remove Problems And Tasks For project else if is Java Project check if all entries exist try Java Project java Project Java Project Java Core create project java Project get Resolved Classpath true ignore Unresolved Entry true generate Marker On Error false don t return Resolution In Progress catch Java Model Exception e project doesn t exist ignore break case I Resource Delta REMOVED affected Projects add project get Full Path break break case I Resource FILE check classpath file change I File file I File resource if file get Name equals Java Project CLASSPATH FILENAME affected Projects add file get Project get Full Path Java Project java Project Java Project Java Core create file get Project java Project update Classpath Markers preferred Classpaths preferred Outputs break check custom preference file change if file get Name equals Java Project PREF FILENAME reconcile Preference File Update delta file project break break if process Children I Resource Delta children delta get Affected Children for int i 0 i children length i update Classpath Markers children i affected Projects preferred Classpaths preferred Outputs  updateClasspathMarkers IResourceDelta HashSet affectedProjects preferredClasspaths preferredOutputs IResource getResource processChildren getType IResource getKind IResourceDelta processChildren IResource IProject IProject getKind isJavaProject JavaProject hasJavaNature IResourceDelta processChildren isJavaProject affectedProjects getFullPath IResourceDelta processChildren isJavaProject getFlags IResourceDelta affectedProjects getFullPath isJavaProject JavaProject javaProject JavaProject JavaCore javaProject updateClasspathMarkers preferredClasspaths preferredOutputs getFlags IResourceDelta wasJavaProject getJavaModel findJavaProject wasJavaProject isJavaProject affectedProjects getFullPath JavaProject javaProject JavaProject JavaCore javaProject flushClasspathProblemMarkers JavaBuilder removeProblemsAndTasksFor isJavaProject JavaProject javaProject JavaProject JavaCore javaProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress JavaModelException IResourceDelta affectedProjects getFullPath IResource IFile IFile getName JavaProject CLASSPATH_FILENAME affectedProjects getProject getFullPath JavaProject javaProject JavaProject JavaCore getProject javaProject updateClasspathMarkers preferredClasspaths preferredOutputs getName JavaProject PREF_FILENAME reconcilePreferenceFileUpdate processChildren IResourceDelta getAffectedChildren updateClasspathMarkers affectedProjects preferredClasspaths preferredOutputs
private void update Classpath Markers I Resource Delta delta Map preferred Classpaths new Hash Map 5 Map preferred Outputs new Hash Map 5 Hash Set affected Projects new Hash Set 5 read classpath files that have changed and create markers if format is wrong or if an entry cannot be found Java Model flush External File Cache update Classpath Markers delta affected Projects preferred Classpaths preferred Outputs update classpath format markers for affected projects dependent projects or projects that reference a library in one of the projects that have changed if affected Projects is Empty try I Workspace Root workspace Root Resources Plugin get Workspace get Root I Project projects workspace Root get Projects int length projects length for int i 0 i length i I Project project projects i Java Project java Project Java Project Java Core create project if preferred Classpaths get java Project null not already updated try I Path project Path project get Full Path I Classpath Entry classpath java Project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress allowed to reuse model cache for int j 0 cp Length classpath length j cp Length j I Classpath Entry entry classpath j switch entry get Entry Kind case I Classpath Entry CPE PROJECT if affected Projects contains entry get Path java Project update Classpath Markers null null break case I Classpath Entry CPE LIBRARY I Path entry Path entry get Path I Path lib Project Path entry Path remove Last Segments entry Path segment Count 1 if lib Project Path equals project Path if library contained in another project affected Projects contains lib Project Path java Project update Classpath Markers null null break catch Java Model Exception e project no longer exists update all cycle markers Java Project update All Cycle Markers preferred Classpaths catch Java Model Exception e project no longer exists  updateClasspathMarkers IResourceDelta preferredClasspaths HashMap preferredOutputs HashMap HashSet affectedProjects HashSet JavaModel flushExternalFileCache updateClasspathMarkers affectedProjects preferredClasspaths preferredOutputs affectedProjects isEmpty IWorkspaceRoot workspaceRoot ResourcesPlugin getWorkspace getRoot IProject workspaceRoot getProjects IProject JavaProject javaProject JavaProject JavaCore preferredClasspaths javaProject IPath projectPath getFullPath IClasspathEntry javaProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress cpLength cpLength IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT affectedProjects getPath javaProject updateClasspathMarkers IClasspathEntry CPE_LIBRARY IPath entryPath getPath IPath libProjectPath entryPath removeLastSegments entryPath segmentCount libProjectPath projectPath affectedProjects libProjectPath javaProject updateClasspathMarkers JavaModelException JavaProject updateAllCycleMarkers preferredClasspaths JavaModelException
public boolean update Current Delta And Index I Resource Delta delta int element Type Root Info root Info Openable element switch delta get Kind case I Resource Delta ADDED I Resource delta Res delta get Resource element create Element delta Res element Type root Info if element null resource might be containing shared roots see bug 19058 this state update Roots delta Res get Full Path delta this return root Info null root Info inclusion Patterns null update Index element delta element Added element delta root Info return false case I Resource Delta REMOVED delta Res delta get Resource element create Element delta Res element Type root Info if element null resource might be containing shared roots see bug 19058 this state update Roots delta Res get Full Path delta this return root Info null root Info inclusion Patterns null update Index element delta element Removed element delta root Info if delta Res get Type I Resource PROJECT reset the corresponding project built state since cannot reuse if added back this manager set Last Built State I Project delta Res null no state return false case I Resource Delta CHANGED int flags delta get Flags if flags I Resource Delta CONTENT 0 content has changed element create Element delta get Resource element Type root Info if element null return false update Index element delta content Changed element else if element Type I Java Element JAVA PROJECT if flags I Resource Delta OPEN 0 project has been opened or closed I Project res I Project delta get Resource element create Element res element Type root Info if element null resource might be containing shared roots see bug 19058 this state update Roots res get Full Path delta this return false if res is Open if Java Project has Java Nature res element Added element delta root Info this manager index Manager index All res else Java Model java Model this manager get Java Model boolean was Java Project java Model find Java Project res null if was Java Project element Removed element delta root Info this manager index Manager discard Jobs element get Element Name this manager index Manager remove Index Family res get Full Path return false when a project is open closed don t process children if flags I Resource Delta DESCRIPTION 0 I Project res I Project delta get Resource Java Model java Model this manager get Java Model boolean was Java Project java Model find Java Project res null boolean is Java Project Java Project has Java Nature res if was Java Project is Java Project project s nature has been added or removed element this create Element res element Type root Info if element null return false note its resources are still visible as roots to other projects if is Java Project element Added element delta root Info this manager index Manager index All res else element Removed element delta root Info this manager index Manager discard Jobs element get Element Name this manager index Manager remove Index Family res get Full Path reset the corresponding project built state since cannot reuse if added back this manager set Last Built State res null no state return false when a project s nature is added removed don t process children return true return true  updateCurrentDeltaAndIndex IResourceDelta elementType RootInfo rootInfo getKind IResourceDelta IResource deltaRes getResource createElement deltaRes elementType rootInfo updateRoots deltaRes getFullPath rootInfo rootInfo inclusionPatterns updateIndex elementAdded rootInfo IResourceDelta deltaRes getResource createElement deltaRes elementType rootInfo updateRoots deltaRes getFullPath rootInfo rootInfo inclusionPatterns updateIndex elementRemoved rootInfo deltaRes getType IResource setLastBuiltState IProject deltaRes IResourceDelta getFlags IResourceDelta createElement getResource elementType rootInfo updateIndex contentChanged elementType IJavaElement JAVA_PROJECT IResourceDelta IProject IProject getResource createElement elementType rootInfo updateRoots getFullPath isOpen JavaProject hasJavaNature elementAdded rootInfo indexManager indexAll JavaModel javaModel getJavaModel wasJavaProject javaModel findJavaProject wasJavaProject elementRemoved rootInfo indexManager discardJobs getElementName indexManager removeIndexFamily getFullPath IResourceDelta IProject IProject getResource JavaModel javaModel getJavaModel wasJavaProject javaModel findJavaProject isJavaProject JavaProject hasJavaNature wasJavaProject isJavaProject createElement elementType rootInfo isJavaProject elementAdded rootInfo indexManager indexAll elementRemoved rootInfo indexManager discardJobs getElementName indexManager removeIndexFamily getFullPath setLastBuiltState
private void update Index Openable element I Resource Delta delta Index Manager index Manager this manager index Manager if index Manager null return switch element get Element Type case I Java Element JAVA PROJECT switch delta get Kind case I Resource Delta ADDED index Manager index All element get Java Project get Project break case I Resource Delta REMOVED index Manager remove Index Family element get Java Project get Project get Full Path NB Discarding index jobs belonging to this project was done during PRE DELETE break NB Update of index if project is opened closed or its java nature is added or removed is done in update Current Delta And Index break case I Java Element PACKAGE FRAGMENT ROOT if element instanceof Jar Package Fragment Root Jar Package Fragment Root root Jar Package Fragment Root element index jar file only once if the root is in its declaring project I Path jar Path root get Path switch delta get Kind case I Resource Delta ADDED index the new jar index Manager index Library jar Path root get Java Project get Project break case I Resource Delta CHANGED first remove the index so that it is forced to be re indexed index Manager remove Index jar Path then index the jar index Manager index Library jar Path root get Java Project get Project break case I Resource Delta REMOVED the jar was physically removed remove the index index Manager discard Jobs jar Path to String index Manager remove Index jar Path break break int kind delta get Kind if kind I Resource Delta ADDED kind I Resource Delta REMOVED I Package Fragment Root root I Package Fragment Root element this update Root Index root root get Package Fragment delta NON NLS 1 break don t break as packages of the package fragment root can be indexed below case I Java Element PACKAGE FRAGMENT switch delta get Kind case I Resource Delta ADDED case I Resource Delta REMOVED I Package Fragment pkg null if element instanceof I Package Fragment Root I Package Fragment Root root I Package Fragment Root element pkg root get Package Fragment NON NLS 1 else pkg I Package Fragment element Root Info root Info root Info pkg get Parent get Path delta get Kind boolean is Source root Info null if null defaults to source root Info entry Kind I Classpath Entry CPE SOURCE I Resource Delta children delta get Affected Children for int i 0 length children length i length i I Resource Delta child children i I Resource resource child get Resource if resource instanceof I File String name resource get Name if is Source if org eclipse jdt internal compiler util Util is Java File Name name Openable cu Openable pkg get Compilation Unit name this update Index cu child else if org eclipse jdt internal compiler util Util is Class File Name name Openable class File Openable pkg get Class File name this update Index class File child break break case I Java Element CLASS FILE I File file I File delta get Resource I Java Project project element get Java Project I Path binary Folder Path element get Package Fragment Root get Path if the class file is part of the binary output it has been created by the java builder ignore try if binary Folder Path equals project get Output Location break catch Java Model Exception e project doesn t exist ignore switch delta get Kind case I Resource Delta CHANGED no need to index if the content has not changed if delta get Flags I Resource Delta CONTENT 0 break case I Resource Delta ADDED index Manager add Binary file binary Folder Path break case I Resource Delta REMOVED index Manager remove file get Full Path to String binary Folder Path break break case I Java Element COMPILATION UNIT file I File delta get Resource switch delta get Kind case I Resource Delta CHANGED no need to index if the content has not changed if delta get Flags I Resource Delta CONTENT 0 break case I Resource Delta ADDED index Manager add Source file file get Project get Full Path break case I Resource Delta REMOVED index Manager remove file get Full Path to String file get Project get Full Path break  updateIndex IResourceDelta IndexManager indexManager indexManager indexManager getElementType IJavaElement JAVA_PROJECT getKind IResourceDelta indexManager indexAll getJavaProject getProject IResourceDelta indexManager removeIndexFamily getJavaProject getProject getFullPath PRE_DELETE updateCurrentDeltaAndIndex IJavaElement PACKAGE_FRAGMENT_ROOT JarPackageFragmentRoot JarPackageFragmentRoot JarPackageFragmentRoot IPath jarPath getPath getKind IResourceDelta indexManager indexLibrary jarPath getJavaProject getProject IResourceDelta indexManager removeIndex jarPath indexManager indexLibrary jarPath getJavaProject getProject IResourceDelta indexManager discardJobs jarPath toString indexManager removeIndex jarPath getKind IResourceDelta IResourceDelta IPackageFragmentRoot IPackageFragmentRoot updateRootIndex getPackageFragment IJavaElement PACKAGE_FRAGMENT getKind IResourceDelta IResourceDelta IPackageFragment IPackageFragmentRoot IPackageFragmentRoot IPackageFragmentRoot getPackageFragment IPackageFragment RootInfo rootInfo rootInfo getParent getPath getKind isSource rootInfo rootInfo entryKind IClasspathEntry CPE_SOURCE IResourceDelta getAffectedChildren IResourceDelta IResource getResource IFile getName isSource isJavaFileName getCompilationUnit updateIndex isClassFileName classFile getClassFile updateIndex classFile IJavaElement CLASS_FILE IFile IFile getResource IJavaProject getJavaProject IPath binaryFolderPath getPackageFragmentRoot getPath binaryFolderPath getOutputLocation JavaModelException getKind IResourceDelta getFlags IResourceDelta IResourceDelta indexManager addBinary binaryFolderPath IResourceDelta indexManager getFullPath toString binaryFolderPath IJavaElement COMPILATION_UNIT IFile getResource getKind IResourceDelta getFlags IResourceDelta IResourceDelta indexManager addSource getProject getFullPath IResourceDelta indexManager getFullPath toString getProject getFullPath
public void update Java Model I Java Element Delta custom Delta if custom Delta null for int i 0 length this java Model Deltas size i length i I Java Element Delta delta I Java Element Delta this java Model Deltas get i this model Updater process Java Delta delta else this model Updater process Java Delta custom Delta  updateJavaModel IJavaElementDelta customDelta customDelta javaModelDeltas IJavaElementDelta IJavaElementDelta javaModelDeltas modelUpdater processJavaDelta modelUpdater processJavaDelta customDelta
private void update Root Index I Package Fragment Root root I Package Fragment pkg I Resource Delta delta this update Index Openable pkg delta I Resource Delta children delta get Affected Children String name pkg get Element Name for int i 0 length children length i length i I Resource Delta child children i I Resource resource child get Resource if resource instanceof I Folder String subpkg Name name length 0 resource get Name name resource get Name NON NLS 1 I Package Fragment subpkg root get Package Fragment subpkg Name this update Root Index root subpkg child  updateRootIndex IPackageFragmentRoot IPackageFragment IResourceDelta updateIndex IResourceDelta getAffectedChildren getElementName IResourceDelta IResource getResource IFolder subpkgName getName getName IPackageFragment getPackageFragment subpkgName updateRootIndex

public class Discard Working Copy Operation extends Java Model Operation public Discard Working Copy Operation I Java Element working Copy super new I Java Element working Copy  DiscardWorkingCopyOperation JavaModelOperation DiscardWorkingCopyOperation IJavaElement workingCopy IJavaElement workingCopy
protected void execute Operation throws Java Model Exception Compilation Unit working Copy get Working Copy int use Count Java Model Manager get Java Model Manager discard Per Working Copy Info working Copy if use Count 0 if working Copy is Primary report removed java delta for a non primary working copy Java Element Delta delta new Java Element Delta this get Java Model delta removed working Copy add Delta delta remove Reconcile Delta working Copy else if working Copy get Resource is Accessible report a F PRIMARY WORKING COPY change delta for a primary working copy Java Element Delta delta new Java Element Delta this get Java Model delta changed working Copy I Java Element Delta F PRIMARY WORKING COPY add Delta delta else report a REMOVED delta Java Element Delta delta new Java Element Delta this get Java Model delta removed working Copy I Java Element Delta F PRIMARY WORKING COPY add Delta delta  executeOperation JavaModelException CompilationUnit workingCopy getWorkingCopy useCount JavaModelManager getJavaModelManager discardPerWorkingCopyInfo workingCopy useCount workingCopy isPrimary JavaElementDelta JavaElementDelta getJavaModel workingCopy addDelta removeReconcileDelta workingCopy workingCopy getResource isAccessible F_PRIMARY_WORKING_COPY JavaElementDelta JavaElementDelta getJavaModel workingCopy IJavaElementDelta F_PRIMARY_WORKING_COPY addDelta JavaElementDelta JavaElementDelta getJavaModel workingCopy IJavaElementDelta F_PRIMARY_WORKING_COPY addDelta
Returns the working copy this operation is working on protected Compilation Unit get Working Copy return Compilation Unit get Element To Process  CompilationUnit getWorkingCopy CompilationUnit getElementToProcess
see Java Model Operation is Read Only public boolean is Read Only return true  JavaModelOperation isReadOnly isReadOnly

public AST Rewrite Analyzer I Document document Compilation Unit ast Root Text Edit root Edit Rewrite Event Store event Store Node Info Store node Infos Map options this ast Root ast Root this event Store event Store this document document this node Infos node Infos this token Scanner null this current Edit root Edit this source Copy Info To Edit new Identity Hash Map this source Copy End Nodes new Stack this formatter new AST Rewrite Formatter node Infos event Store options get Line Delimiter  ASTRewriteAnalyzer IDocument CompilationUnit astRoot TextEdit rootEdit RewriteEventStore eventStore NodeInfoStore nodeInfos astRoot astRoot eventStore eventStore nodeInfos nodeInfos tokenScanner currentEdit rootEdit sourceCopyInfoToEdit IdentityHashMap sourceCopyEndNodes ASTRewriteFormatter nodeInfos eventStore getLineDelimiter
final Token Scanner get Scanner if this token Scanner null I Scanner scanner Tool Factory create Scanner true false false false scanner set Source get Document get to Char Array this token Scanner new Token Scanner scanner get Document return this token Scanner  TokenScanner getScanner tokenScanner IScanner ToolFactory createScanner setSource getDocument toCharArray tokenScanner TokenScanner getDocument tokenScanner
final I Document get Document return this document  IDocument getDocument
final int get Extended Offset AST Node node return this ast Root get Extended Start Position node  getExtendedOffset ASTNode astRoot getExtendedStartPosition
final int get Extended Length AST Node node return this ast Root get Extended Length node  getExtendedLength ASTNode astRoot getExtendedLength
final int get Extended End AST Node node return this ast Root get Extended Start Position node this ast Root get Extended Length node  getExtendedEnd ASTNode astRoot getExtendedStartPosition astRoot getExtendedLength
final Text Edit get Copy Source Edit Copy Source Info info Text Edit edit Text Edit this source Copy Info To Edit get info if edit null int start get Extended Offset info get Start Node int end get Extended End info get End Node if info is Move Move Source Edit move Source Edit new Move Source Edit start end start move Source Edit set Target Edit new Move Target Edit 0 edit move Source Edit else Copy Source Edit copy Source Edit new Copy Source Edit start end start copy Source Edit set Target Edit new Copy Target Edit 0 edit copy Source Edit this source Copy Info To Edit put info edit return edit  TextEdit getCopySourceEdit CopySourceInfo TextEdit TextEdit sourceCopyInfoToEdit getExtendedOffset getStartNode getExtendedEnd getEndNode isMove MoveSourceEdit moveSourceEdit MoveSourceEdit moveSourceEdit setTargetEdit MoveTargetEdit moveSourceEdit CopySourceEdit copySourceEdit CopySourceEdit copySourceEdit setTargetEdit CopyTargetEdit copySourceEdit sourceCopyInfoToEdit
private final int get Change Kind AST Node node Structural Property Descriptor property Rewrite Event event get Event node property if event null return event get Change Kind return Rewrite Event UNCHANGED  getChangeKind ASTNode StructuralPropertyDescriptor RewriteEvent getEvent getChangeKind RewriteEvent
private final boolean has Children Changes AST Node node return this event Store has Changed Properties node  hasChildrenChanges ASTNode eventStore hasChangedProperties
private final boolean is Changed AST Node node Structural Property Descriptor property Rewrite Event event get Event node property if event null return event get Change Kind Rewrite Event UNCHANGED return false  isChanged ASTNode StructuralPropertyDescriptor RewriteEvent getEvent getChangeKind RewriteEvent
private final boolean is Collapsed AST Node node return this node Infos is Collapsed node  isCollapsed ASTNode nodeInfos isCollapsed
final boolean is Insert Bound To Previous AST Node node return this event Store is Insert Bound To Previous node  isInsertBoundToPrevious ASTNode eventStore isInsertBoundToPrevious
private final Text Edit Group get Edit Group AST Node parent Structural Property Descriptor property Rewrite Event event get Event parent property if event null return get Edit Group event return null  TextEditGroup getEditGroup ASTNode StructuralPropertyDescriptor RewriteEvent getEvent getEditGroup
final Rewrite Event get Event AST Node parent Structural Property Descriptor property return this event Store get Event parent property  RewriteEvent getEvent ASTNode StructuralPropertyDescriptor eventStore getEvent
final Text Edit Group get Edit Group Rewrite Event change return this event Store get Event Edit Group change  TextEditGroup getEditGroup RewriteEvent eventStore getEventEditGroup
private final Object get Original Value AST Node parent Structural Property Descriptor property return this event Store get Original Value parent property  getOriginalValue ASTNode StructuralPropertyDescriptor eventStore getOriginalValue
private final Object get New Value AST Node parent Structural Property Descriptor property return this event Store get New Value parent property  getNewValue ASTNode StructuralPropertyDescriptor eventStore getNewValue
final void add Edit Text Edit edit this current Edit add Child edit  addEdit TextEdit currentEdit addChild
final String get Line Delimiter return Text Utilities get Default Line Delimiter get Document  getLineDelimiter TextUtilities getDefaultLineDelimiter getDocument
final String create Indent String int indent return this formatter create Indent String indent  createIndentString createIndentString
final String get Indent At Offset int pos try I Region line get Document get Line Information Of Offset pos String str get Document get line get Offset line get Length return Indents get Indent String str this formatter get Tab Width catch Bad Location Exception e return NON NLS 1  getIndentAtOffset IRegion getDocument getLineInformationOfOffset getDocument getOffset getLength getIndentString getTabWidth BadLocationException
final void do Text Insert int offset String insert String Text Edit Group edit Group if insert String length 0 Text Edit edit new Insert Edit offset insert String add Edit edit if edit Group null add Edit Group edit Group edit  doTextInsert insertString TextEditGroup editGroup insertString TextEdit InsertEdit insertString addEdit editGroup addEditGroup editGroup
final void add Edit Group Text Edit Group edit Group Text Edit edit edit Group add Text Edit edit  addEditGroup TextEditGroup editGroup TextEdit editGroup addTextEdit
final Text Edit do Text Remove int offset int len Text Edit Group edit Group if len 0 return null Text Edit edit new Delete Edit offset len add Edit edit if edit Group null add Edit Group edit Group edit return edit  TextEdit doTextRemove TextEditGroup editGroup TextEdit DeleteEdit addEdit editGroup addEditGroup editGroup
final void do Text Remove And Visit int offset int len AST Node node Text Edit Group edit Group Text Edit edit do Text Remove offset len edit Group if edit null this current Edit edit do Visit node this current Edit edit get Parent else do Visit node  doTextRemoveAndVisit ASTNode TextEditGroup editGroup TextEdit doTextRemove editGroup currentEdit doVisit currentEdit getParent doVisit
final int do Visit AST Node node node accept this return node get Start Position node get Length  doVisit ASTNode getStartPosition getLength
private final int do Visit AST Node parent Structural Property Descriptor property int offset Object node get Original Value parent property if property is Child Property node null return do Visit AST Node node else if property is Child List Property boolean has Range Copy Sources this event Store has Range Copy Sources parent property return do Visit List List node offset has Range Copy Sources return offset  doVisit ASTNode StructuralPropertyDescriptor getOriginalValue isChildProperty doVisit ASTNode isChildListProperty hasRangeCopySources eventStore hasRangeCopySources doVisitList hasRangeCopySources
private int do Visit List List list int offset boolean has Range Copy Sources if has Range Copy Sources list with copy source ranges Stack node Range End Stack new Stack int end Pos offset for Iterator iter list iterator iter has Next AST Node curr AST Node iter next do Copy Source Pre Visit this event Store get Range Copy Sources curr node Range End Stack end Pos do Visit curr do Copy Source Post Visit curr node Range End Stack return end Pos else int end Pos offset for Iterator iter list iterator iter has Next AST Node curr AST Node iter next end Pos do Visit curr return end Pos  doVisitList hasRangeCopySources hasRangeCopySources nodeRangeEndStack endPos hasNext ASTNode ASTNode doCopySourcePreVisit eventStore getRangeCopySources nodeRangeEndStack endPos doVisit doCopySourcePostVisit nodeRangeEndStack endPos endPos hasNext ASTNode ASTNode endPos doVisit endPos
private final boolean do Visit Unchanged Children AST Node parent List properties parent structural Properties For Type for int i 0 i properties size i Structural Property Descriptor property Structural Property Descriptor properties get i if property is Child Property AST Node child AST Node parent get Structural Property property if child null do Visit child else if property is Child List Property List list List parent get Structural Property property boolean has Range Copy Sources this event Store has Range Copy Sources parent property do Visit List list 0 has Range Copy Sources return false  doVisitUnchangedChildren ASTNode structuralPropertiesForType StructuralPropertyDescriptor StructuralPropertyDescriptor isChildProperty ASTNode ASTNode getStructuralProperty doVisit isChildListProperty getStructuralProperty hasRangeCopySources eventStore hasRangeCopySources doVisitList hasRangeCopySources
private final void do Text Replace int offset int len String insert String Text Edit Group edit Group if len 0 insert String length 0 Text Edit edit new Replace Edit offset len insert String add Edit edit if edit Group null add Edit Group edit Group edit  doTextReplace insertString TextEditGroup editGroup insertString TextEdit ReplaceEdit insertString addEdit editGroup addEditGroup editGroup
private final Text Edit do Text Copy Text Edit source Edit int dest Offset int source Indent Level String dest Indent String int tab Width Text Edit Group edit Group Text Edit target Edit if source Edit instanceof Move Source Edit Move Source Edit move Edit Move Source Edit source Edit move Edit set Source Modifier new Source Modifier source Indent Level dest Indent String tab Width target Edit new Move Target Edit dest Offset move Edit add Edit target Edit else Copy Source Edit copy Edit Copy Source Edit source Edit copy Edit set Source Modifier new Source Modifier source Indent Level dest Indent String tab Width target Edit new Copy Target Edit dest Offset copy Edit add Edit target Edit if edit Group null add Edit Group edit Group target Edit add Edit Group edit Group target Edit return target Edit  TextEdit doTextCopy TextEdit sourceEdit destOffset sourceIndentLevel destIndentString tabWidth TextEditGroup editGroup TextEdit targetEdit sourceEdit MoveSourceEdit MoveSourceEdit moveEdit MoveSourceEdit sourceEdit moveEdit setSourceModifier SourceModifier sourceIndentLevel destIndentString tabWidth targetEdit MoveTargetEdit destOffset moveEdit addEdit targetEdit CopySourceEdit copyEdit CopySourceEdit sourceEdit copyEdit setSourceModifier SourceModifier sourceIndentLevel destIndentString tabWidth targetEdit CopyTargetEdit destOffset copyEdit addEdit targetEdit editGroup addEditGroup editGroup targetEdit addEditGroup editGroup targetEdit targetEdit
private void change Not Supported AST Node node Assert is True false Change not supported in node get Class get Name NON NLS 1  changeNotSupported ASTNode isTrue getClass getName
private Stack copy Range End Stack protected final AST Node get Original Node int index return AST Node this list index get Original Value  copyRangeEndStack ASTNode getOriginalNode ASTNode getOriginalValue
protected String get Separator String int node Index return this contant Separator  getSeparatorString nodeIndex contantSeparator
protected int get Initial Indent return get Indent this start Pos  getInitialIndent getIndent startPos
protected int get Node Indent int node Index AST Node node get Original Node node Index if node null for int i node Index 1 i 0 i AST Node curr get Original Node i if curr null return get Indent curr get Start Position return get Initial Indent return get Indent node get Start Position  getNodeIndent nodeIndex ASTNode getOriginalNode nodeIndex nodeIndex ASTNode getOriginalNode getIndent getStartPosition getInitialIndent getIndent getStartPosition
protected int get Start Of Next Node int next Index int default Pos for int i next Index i this list length i Rewrite Event elem this list i if elem get Change Kind Rewrite Event INSERTED AST Node node AST Node elem get Original Value return get Extended Offset node return default Pos  getStartOfNextNode nextIndex defaultPos nextIndex RewriteEvent getChangeKind RewriteEvent ASTNode ASTNode getOriginalValue getExtendedOffset defaultPos
protected int get End Of Node AST Node node return get Extended End node  getEndOfNode ASTNode getExtendedEnd
public final int rewrite List AST Node parent Structural Property Descriptor property int offset String keyword String separator this contant Separator separator return rewrite List parent property offset keyword  rewriteList ASTNode StructuralPropertyDescriptor contantSeparator rewriteList
private boolean insert After Separator AST Node node return is Insert Bound To Previous node  insertAfterSeparator ASTNode isInsertBoundToPrevious
public final int rewrite List AST Node parent Structural Property Descriptor property int offset String keyword this start Pos offset this list get Event parent property get Children init Copy Range Checks parent property int total this list length if total 0 return this start Pos int curr Pos 1 int last Non Insert 1 int last Non Delete 1 for int i 0 i total i int curr Mark this list i get Change Kind if curr Mark Rewrite Event INSERTED last Non Insert i if curr Pos 1 AST Node elem AST Node this list i get Original Value curr Pos get Extended Offset elem if curr Mark Rewrite Event REMOVED last Non Delete i if curr Pos 1 only inserts if keyword length 0 creating a new list insert keyword first e g throws Text Edit Group edit Group get Edit Group this list 0 first node is insert do Text Insert offset keyword edit Group curr Pos offset if last Non Delete 1 all removed set back to start so the keyword is removed as well curr Pos offset int prev End curr Pos final int NONE 0 NEW 1 EXISTING 2 int separator State NEW for int i 0 i total i Rewrite Event curr Event this list i int curr Mark curr Event get Change Kind int next Index i 1 if curr Mark Rewrite Event INSERTED Text Edit Group edit Group get Edit Group curr Event AST Node node AST Node curr Event get New Value if separator State NONE element after last existing element but not first do Text Insert curr Pos get Separator String i 1 edit Group insert separator separator State NEW if separator State NEW insert After Separator node do Text Insert curr Pos node get Node Indent i true edit Group insert node separator State NEW if i last Non Delete if this list next Index get Change Kind Rewrite Event INSERTED do Text Insert curr Pos get Separator String i edit Group insert separator else separator State NONE else EXISTING insert before separator do Text Insert prev End get Separator String i 1 edit Group do Text Insert prev End node get Node Indent i true edit Group else if curr Mark Rewrite Event REMOVED AST Node node AST Node curr Event get Original Value Text Edit Group edit Group get Edit Group curr Event int curr End get End Of Node node if i last Non Delete separator State EXISTING is last remove previous separator split delete to allow range copies do Text Remove prev End curr Pos prev End edit Group remove separator check For Range Start node do Text Remove And Visit curr Pos curr End curr Pos node edit Group remove node check For Range End node curr Pos curr End prev End curr End else remove element and next separator int end get Start Of Next Node next Index curr End start of next check For Range Start node do Text Remove And Visit curr Pos curr End curr Pos node get Edit Group curr Event remove node check For Range End node do Text Remove curr End end curr End edit Group remove separator curr Pos end prev End curr End separator State NEW else replaced or unchanged if curr Mark Rewrite Event REPLACED AST Node node AST Node curr Event get Original Value int curr End get End Of Node node Text Edit Group edit Group get Edit Group curr Event AST Node changed AST Node curr Event get New Value check For Range Start node do Text Remove And Visit curr Pos curr End curr Pos node edit Group do Text Insert curr Pos changed get Node Indent i true edit Group check For Range End node prev End curr End else is unchanged AST Node node AST Node curr Event get Original Value check For Range Start node do Visit node check For Range End node if i last Non Insert last node or next nodes are all inserts separator State NONE if curr Mark Rewrite Event UNCHANGED AST Node node AST Node curr Event get Original Value prev End get End Of Node node curr Pos prev End else if this list next Index get Change Kind Rewrite Event UNCHANGED no updates needed while nodes are unchanged if curr Mark Rewrite Event UNCHANGED AST Node node AST Node curr Event get Original Value prev End get End Of Node node curr Pos get Start Of Next Node next Index prev End start of next separator State EXISTING return curr Pos  rewriteList ASTNode StructuralPropertyDescriptor startPos getEvent getChildren initCopyRangeChecks startPos currPos lastNonInsert lastNonDelete currMark getChangeKind currMark RewriteEvent lastNonInsert currPos ASTNode ASTNode getOriginalValue currPos getExtendedOffset currMark RewriteEvent lastNonDelete currPos TextEditGroup editGroup getEditGroup doTextInsert editGroup currPos lastNonDelete currPos prevEnd currPos separatorState RewriteEvent currEvent currMark currEvent getChangeKind nextIndex currMark RewriteEvent TextEditGroup editGroup getEditGroup currEvent ASTNode ASTNode currEvent getNewValue separatorState doTextInsert currPos getSeparatorString editGroup separatorState separatorState insertAfterSeparator doTextInsert currPos getNodeIndent editGroup separatorState lastNonDelete nextIndex getChangeKind RewriteEvent doTextInsert currPos getSeparatorString editGroup separatorState doTextInsert prevEnd getSeparatorString editGroup doTextInsert prevEnd getNodeIndent editGroup currMark RewriteEvent ASTNode ASTNode currEvent getOriginalValue TextEditGroup editGroup getEditGroup currEvent currEnd getEndOfNode lastNonDelete separatorState doTextRemove prevEnd currPos prevEnd editGroup checkForRangeStart doTextRemoveAndVisit currPos currEnd currPos editGroup checkForRangeEnd currPos currEnd prevEnd currEnd getStartOfNextNode nextIndex currEnd checkForRangeStart doTextRemoveAndVisit currPos currEnd currPos getEditGroup currEvent checkForRangeEnd doTextRemove currEnd currEnd editGroup currPos prevEnd currEnd separatorState currMark RewriteEvent ASTNode ASTNode currEvent getOriginalValue currEnd getEndOfNode TextEditGroup editGroup getEditGroup currEvent ASTNode ASTNode currEvent getNewValue checkForRangeStart doTextRemoveAndVisit currPos currEnd currPos editGroup doTextInsert currPos getNodeIndent editGroup checkForRangeEnd prevEnd currEnd ASTNode ASTNode currEvent getOriginalValue checkForRangeStart doVisit checkForRangeEnd lastNonInsert separatorState currMark RewriteEvent ASTNode ASTNode currEvent getOriginalValue prevEnd getEndOfNode currPos prevEnd nextIndex getChangeKind RewriteEvent currMark RewriteEvent ASTNode ASTNode currEvent getOriginalValue prevEnd getEndOfNode currPos getStartOfNextNode nextIndex prevEnd separatorState currPos
private void init Copy Range Checks AST Node parent Structural Property Descriptor property if AST Rewrite Analyzer this event Store has Range Copy Sources parent property this copy Range End Stack new Stack  initCopyRangeChecks ASTNode StructuralPropertyDescriptor ASTRewriteAnalyzer eventStore hasRangeCopySources copyRangeEndStack
private void check For Range Start AST Node node if this copy Range End Stack null do Copy Source Pre Visit AST Rewrite Analyzer this event Store get Range Copy Sources node this copy Range End Stack  checkForRangeStart ASTNode copyRangeEndStack doCopySourcePreVisit ASTRewriteAnalyzer eventStore getRangeCopySources copyRangeEndStack
private void check For Range End AST Node node if this copy Range End Stack null do Copy Source Post Visit node this copy Range End Stack  checkForRangeEnd ASTNode copyRangeEndStack doCopySourcePostVisit copyRangeEndStack
private int rewrite Required Node AST Node parent Structural Property Descriptor property Rewrite Event event get Event parent property if event null event get Change Kind Rewrite Event REPLACED AST Node node AST Node event get Original Value Text Edit Group edit Group get Edit Group event int offset get Extended Offset node int length get Extended Length node do Text Remove And Visit offset length node edit Group do Text Insert offset AST Node event get New Value get Indent offset true edit Group return offset length return do Visit parent property 0  rewriteRequiredNode ASTNode StructuralPropertyDescriptor RewriteEvent getEvent getChangeKind RewriteEvent ASTNode ASTNode getOriginalValue TextEditGroup editGroup getEditGroup getExtendedOffset getExtendedLength doTextRemoveAndVisit editGroup doTextInsert ASTNode getNewValue getIndent editGroup doVisit
private int rewrite Node AST Node parent Structural Property Descriptor property int offset Prefix prefix Rewrite Event event get Event parent property if event null switch event get Change Kind case Rewrite Event INSERTED AST Node node AST Node event get New Value Text Edit Group edit Group get Edit Group event int indent get Indent offset do Text Insert offset prefix get Prefix indent get Line Delimiter edit Group do Text Insert offset node indent true edit Group return offset case Rewrite Event REMOVED AST Node node AST Node event get Original Value Text Edit Group edit Group get Edit Group event int node End get Extended End node if there is a prefix remove the prefix as well int len node End offset do Text Remove And Visit offset len node edit Group return node End case Rewrite Event REPLACED AST Node node AST Node event get Original Value Text Edit Group edit Group get Edit Group event int node Offset get Extended Offset node int node Len get Extended Length node do Text Remove And Visit node Offset node Len node edit Group do Text Insert node Offset AST Node event get New Value get Indent offset true edit Group return node Offset node Len return do Visit parent property offset  rewriteNode ASTNode StructuralPropertyDescriptor RewriteEvent getEvent getChangeKind RewriteEvent ASTNode ASTNode getNewValue TextEditGroup editGroup getEditGroup getIndent doTextInsert getPrefix getLineDelimiter editGroup doTextInsert editGroup RewriteEvent ASTNode ASTNode getOriginalValue TextEditGroup editGroup getEditGroup nodeEnd getExtendedEnd nodeEnd doTextRemoveAndVisit editGroup nodeEnd RewriteEvent ASTNode ASTNode getOriginalValue TextEditGroup editGroup getEditGroup nodeOffset getExtendedOffset nodeLen getExtendedLength doTextRemoveAndVisit nodeOffset nodeLen editGroup doTextInsert nodeOffset ASTNode getNewValue getIndent editGroup nodeOffset nodeLen doVisit
private int rewrite Javadoc AST Node node Structural Property Descriptor property int pos rewrite Node node property node get Start Position AST Rewrite Formatter NONE int change Kind get Change Kind node property if change Kind Rewrite Event INSERTED String indent get Line Delimiter get Indent At Offset pos do Text Insert pos indent get Edit Group node property else if change Kind Rewrite Event REMOVED try get Scanner read Next pos false do Text Remove pos get Scanner get Current Start Offset pos get Edit Group node property pos get Scanner get Current Start Offset catch Core Exception e handle Exception e return pos  rewriteJavadoc ASTNode StructuralPropertyDescriptor rewriteNode getStartPosition ASTRewriteFormatter changeKind getChangeKind changeKind RewriteEvent getLineDelimiter getIndentAtOffset doTextInsert getEditGroup changeKind RewriteEvent getScanner readNext doTextRemove getScanner getCurrentStartOffset getEditGroup getScanner getCurrentStartOffset CoreException handleException
private int rewrite Body Node AST Node parent Structural Property Descriptor property int offset int end Pos int indent Block Context context Rewrite Event event get Event parent property if event null switch event get Change Kind case Rewrite Event INSERTED AST Node node AST Node event get New Value Text Edit Group edit Group get Edit Group event String strings context get Prefix And Suffix indent get Line Delimiter node this event Store do Text Insert offset strings 0 edit Group do Text Insert offset node indent true edit Group do Text Insert offset strings 1 edit Group return offset case Rewrite Event REMOVED AST Node node AST Node event get Original Value if end Pos 1 end Pos get Extended End node Text Edit Group edit Group get Edit Group event if there is a prefix remove the prefix as well int len end Pos offset do Text Remove And Visit offset len node edit Group return end Pos case Rewrite Event REPLACED AST Node node AST Node event get Original Value if end Pos 1 end Pos get Extended End node Text Edit Group edit Group get Edit Group event int node Len end Pos offset AST Node replacing Node AST Node event get New Value String strings context get Prefix And Suffix indent get Line Delimiter replacing Node this event Store do Text Remove And Visit offset node Len node edit Group String prefix strings 0 do Text Insert offset prefix edit Group String line In Prefix get Current Line prefix prefix length if prefix length line In Prefix length prefix contains a new line update the indent to the one used in the prefix indent Indents compute Indent line In Prefix this formatter get Tab Width do Text Insert offset replacing Node indent true edit Group do Text Insert offset strings 1 edit Group return end Pos return do Visit parent property offset  rewriteBodyNode ASTNode StructuralPropertyDescriptor endPos BlockContext RewriteEvent getEvent getChangeKind RewriteEvent ASTNode ASTNode getNewValue TextEditGroup editGroup getEditGroup getPrefixAndSuffix getLineDelimiter eventStore doTextInsert editGroup doTextInsert editGroup doTextInsert editGroup RewriteEvent ASTNode ASTNode getOriginalValue endPos endPos getExtendedEnd TextEditGroup editGroup getEditGroup endPos doTextRemoveAndVisit editGroup endPos RewriteEvent ASTNode ASTNode getOriginalValue endPos endPos getExtendedEnd TextEditGroup editGroup getEditGroup nodeLen endPos ASTNode replacingNode ASTNode getNewValue getPrefixAndSuffix getLineDelimiter replacingNode eventStore doTextRemoveAndVisit nodeLen editGroup doTextInsert editGroup lineInPrefix getCurrentLine lineInPrefix computeIndent lineInPrefix getTabWidth doTextInsert replacingNode editGroup doTextInsert editGroup endPos doVisit
private int rewrite Optional Qualifier AST Node parent Structural Property Descriptor property int start Pos Rewrite Event event get Event parent property if event null switch event get Change Kind case Rewrite Event INSERTED AST Node node AST Node event get New Value Text Edit Group edit Group get Edit Group event do Text Insert start Pos node get Indent start Pos true edit Group do Text Insert start Pos edit Group NON NLS 1 return start Pos case Rewrite Event REMOVED try AST Node node AST Node event get Original Value Text Edit Group edit Group get Edit Group event int dot End get Scanner get Token End Offset I Terminal Symbols Token NameDOT node get Start Position node get Length do Text Remove And Visit start Pos dot End start Pos node edit Group return dot End catch Core Exception e handle Exception e break case Rewrite Event REPLACED AST Node node AST Node event get Original Value Text Edit Group edit Group get Edit Group event int offset get Extended Offset node int length get Extended Length node do Text Remove And Visit offset length node edit Group do Text Insert offset AST Node event get New Value get Indent start Pos true edit Group return offset length return do Visit parent property start Pos  rewriteOptionalQualifier ASTNode StructuralPropertyDescriptor startPos RewriteEvent getEvent getChangeKind RewriteEvent ASTNode ASTNode getNewValue TextEditGroup editGroup getEditGroup doTextInsert startPos getIndent startPos editGroup doTextInsert startPos editGroup startPos RewriteEvent ASTNode ASTNode getOriginalValue TextEditGroup editGroup getEditGroup dotEnd getScanner getTokenEndOffset ITerminalSymbols TokenNameDOT getStartPosition getLength doTextRemoveAndVisit startPos dotEnd startPos editGroup dotEnd CoreException handleException RewriteEvent ASTNode ASTNode getOriginalValue TextEditGroup editGroup getEditGroup getExtendedOffset getExtendedLength doTextRemoveAndVisit editGroup doTextInsert ASTNode getNewValue getIndent startPos editGroup doVisit startPos
private int separator Lines public Paragraph List Rewriter int initial Indent int separator this initial Indent initial Indent this separator Lines separator  separatorLines ParagraphListRewriter initialIndent initialIndent initialIndent separatorLines
protected int get Initial Indent return this initial Indent  getInitialIndent initialIndent
protected String get Separator String int node Index int new Lines this separator Lines 1 get New Lines node Index this separator Lines String line Delim get Line Delimiter String Buffer buf new String Buffer line Delim for int i 0 i new Lines i buf append line Delim buf append create Indent String get Node Indent node Index 1 return buf to String  getSeparatorString nodeIndex newLines separatorLines getNewLines nodeIndex separatorLines lineDelim getLineDelimiter StringBuffer StringBuffer lineDelim newLines lineDelim createIndentString getNodeIndent nodeIndex toString
private AST Node get Node int node Index AST Node elem AST Node this list node Index get Original Value if elem null elem AST Node this list node Index get New Value return elem  ASTNode getNode nodeIndex ASTNode ASTNode nodeIndex getOriginalValue ASTNode nodeIndex getNewValue
private int get New Lines int node Index AST Node curr get Node node Index AST Node next get Node node Index 1 int curr Kind curr get Node Type int next Kind next get Node Type AST Node last null AST Node second Last null for int i 0 i this list length i AST Node elem AST Node this list i get Original Value if elem null if last null if elem get Node Type next Kind last get Node Type curr Kind return count Empty Lines last second Last last last elem if curr Kind AST Node FIELD DECLARATION next Kind AST Node FIELD DECLARATION return 0 if second Last null return count Empty Lines second Last return DEFAULT SPACING  getNewLines nodeIndex ASTNode getNode nodeIndex ASTNode getNode nodeIndex currKind getNodeType nextKind getNodeType ASTNode ASTNode secondLast ASTNode ASTNode getOriginalValue getNodeType nextKind getNodeType currKind countEmptyLines secondLast currKind ASTNode FIELD_DECLARATION nextKind ASTNode FIELD_DECLARATION secondLast countEmptyLines secondLast DEFAULT_SPACING
private int count Empty Lines AST Node last I Document doc get Document try int last Line doc get Line Of Offset last get Start Position last get Length int scan Line last Line 1 int num Lines doc get Number Of Lines while scan Line num Lines contains Only Whitespaces doc scan Line scan Line return scan Line last Line 1 catch Bad Location Exception e handle Exception e return 0  countEmptyLines ASTNode IDocument getDocument lastLine getLineOfOffset getStartPosition getLength scanLine lastLine numLines getNumberOfLines scanLine numLines containsOnlyWhitespaces scanLine scanLine scanLine lastLine BadLocationException handleException
private boolean contains Only Whitespaces I Document doc int line throws Bad Location Exception int offset doc get Line Offset line int end offset doc get Line Length line while offset end Character is Whitespace doc get Char offset offset return offset end  containsOnlyWhitespaces IDocument BadLocationException getLineOffset getLineLength isWhitespace getChar
private int rewrite Paragraph List AST Node parent Structural Property Descriptor property int insert Pos int insert Indent int separator int lead Rewrite Event event get Event parent property if event null event get Change Kind Rewrite Event UNCHANGED return do Visit parent property insert Pos Rewrite Event events event get Children boolean has Existing false for int i 0 i events length i int change Kind events i get Change Kind has Existing change Kind Rewrite Event INSERTED Paragraph List Rewriter list Rewriter new Paragraph List Rewriter insert Indent separator String Buffer lead String new String Buffer if has Existing for int i 0 i lead i lead String append get Line Delimiter lead String append create Indent String insert Indent return list Rewriter rewrite List parent property insert Pos lead String to String  rewriteParagraphList ASTNode StructuralPropertyDescriptor insertPos insertIndent RewriteEvent getEvent getChangeKind RewriteEvent doVisit insertPos RewriteEvent getChildren hasExisting changeKind getChangeKind hasExisting changeKind RewriteEvent ParagraphListRewriter listRewriter ParagraphListRewriter insertIndent StringBuffer leadString StringBuffer hasExisting leadString getLineDelimiter leadString createIndentString insertIndent listRewriter rewriteList insertPos leadString toString
private int rewrite Node List AST Node parent Structural Property Descriptor property int pos String keyword String separator Rewrite Event event get Event parent property if event null event get Change Kind Rewrite Event UNCHANGED return new List Rewriter rewrite List parent property pos keyword separator return do Visit parent property pos  rewriteNodeList ASTNode StructuralPropertyDescriptor RewriteEvent getEvent getChangeKind RewriteEvent ListRewriter rewriteList doVisit
private void rewrite Method Body Method Declaration parent int start Pos Rewrite Event event get Event parent Method Declaration BODY PROPERTY if event null switch event get Change Kind case Rewrite Event INSERTED int end Pos parent get Start Position parent get Length Text Edit Group edit Group get Edit Group event AST Node body AST Node event get New Value do Text Remove start Pos end Pos start Pos edit Group int indent get Indent parent get Start Position String prefix this formatter METHOD BODY get Prefix indent get Line Delimiter do Text Insert start Pos prefix edit Group do Text Insert start Pos body indent true edit Group return case Rewrite Event REMOVED Text Edit Group edit Group get Edit Group event AST Node body AST Node event get Original Value int end Pos parent get Start Position parent get Length do Text Remove And Visit start Pos end Pos start Pos body edit Group do Text Insert start Pos edit Group NON NLS 1 return case Rewrite Event REPLACED Text Edit Group edit Group get Edit Group event AST Node body AST Node event get Original Value do Text Remove And Visit body get Start Position body get Length body edit Group do Text Insert body get Start Position AST Node event get New Value get Indent body get Start Position true edit Group return do Visit parent Method Declaration BODY PROPERTY start Pos  rewriteMethodBody MethodDeclaration startPos RewriteEvent getEvent MethodDeclaration BODY_PROPERTY getChangeKind RewriteEvent endPos getStartPosition getLength TextEditGroup editGroup getEditGroup ASTNode ASTNode getNewValue doTextRemove startPos endPos startPos editGroup getIndent getStartPosition METHOD_BODY getPrefix getLineDelimiter doTextInsert startPos editGroup doTextInsert startPos editGroup RewriteEvent TextEditGroup editGroup getEditGroup ASTNode ASTNode getOriginalValue endPos getStartPosition getLength doTextRemoveAndVisit startPos endPos startPos editGroup doTextInsert startPos editGroup RewriteEvent TextEditGroup editGroup getEditGroup ASTNode ASTNode getOriginalValue doTextRemoveAndVisit getStartPosition getLength editGroup doTextInsert getStartPosition ASTNode getNewValue getIndent getStartPosition editGroup doVisit MethodDeclaration BODY_PROPERTY startPos
private int rewrite Extra Dimensions AST Node parent Structural Property Descriptor property int pos Rewrite Event event get Event parent property if event null event get Change Kind Rewrite Event UNCHANGED return Integer get Original Value parent property int Value int old Dim Integer event get Original Value int Value int new Dim Integer event get New Value int Value if old Dim new Dim Text Edit Group edit Group get Edit Group event rewrite Extra Dimensions old Dim new Dim pos edit Group return old Dim  rewriteExtraDimensions ASTNode StructuralPropertyDescriptor RewriteEvent getEvent getChangeKind RewriteEvent getOriginalValue intValue oldDim getOriginalValue intValue newDim getNewValue intValue oldDim newDim TextEditGroup editGroup getEditGroup rewriteExtraDimensions oldDim newDim editGroup oldDim
private void rewrite Extra Dimensions int old Dim int new Dim int pos Text Edit Group edit Group if old Dim new Dim for int i old Dim i new Dim i do Text Insert pos edit Group NON NLS 1 else if new Dim old Dim try get Scanner set Offset pos for int i new Dim i old Dim i get Scanner read To Token I Terminal Symbols Token NameRBRACKET do Text Remove pos get Scanner get Current End Offset pos edit Group catch Core Exception e handle Exception e  rewriteExtraDimensions oldDim newDim TextEditGroup editGroup oldDim newDim oldDim newDim doTextInsert editGroup newDim oldDim getScanner setOffset newDim oldDim getScanner readToToken ITerminalSymbols TokenNameRBRACKET doTextRemove getScanner getCurrentEndOffset editGroup CoreException handleException
private int get Pos After Left Brace int pos try int next Token get Scanner read Next pos true if next Token I Terminal Symbols Token NameLBRACE return get Scanner get Current End Offset catch Core Exception e handle Exception e return pos  getPosAfterLeftBrace nextToken getScanner readNext nextToken ITerminalSymbols TokenNameLBRACE getScanner getCurrentEndOffset CoreException handleException
final int get Indent int pos try I Region line get Document get Line Information Of Offset pos String str get Document get line get Offset line get Length return Indents compute Indent str this formatter get Tab Width catch Bad Location Exception e return 0  getIndent IRegion getDocument getLineInformationOfOffset getDocument getOffset getLength computeIndent getTabWidth BadLocationException
final void do Text Insert int insert Offset AST Node node int initial Indent Level boolean remove Leading Indent Text Edit Group edit Group Array List markers new Array List String formatted this formatter get Formatted Result node initial Indent Level markers int tab Width this formatter get Tab Width int curr Pos 0 if remove Leading Indent while curr Pos formatted length Character is Whitespace formatted char At curr Pos curr Pos for int i 0 i markers size i markers size can change Node Marker curr Node Marker markers get i int offset curr offset if offset curr Pos String insert Str formatted substring curr Pos offset do Text Insert insert Offset insert Str edit Group insert until the marker s begin Object data curr data if data instanceof Text Edit Group tracking a node need to split and create 2 edits as tracking node can surround replaced node Text Edit edit new Range Marker insert Offset 0 add Edit Group Text Edit Group data edit add Edit edit if curr length 0 int end offset curr length int k i 1 while k markers size Node Marker markers get k offset end k curr offset end curr length 0 markers add k curr add again for end position curr Pos offset else String dest Indent String Indents get Indent String get Current Line formatted offset tab Width if data instanceof Copy Placeholder Data replace with a copy move target Copy Source Info copy Source Copy Placeholder Data data copy Source int src Indent Level get Indent copy Source get Start Node get Start Position Text Edit source Edit get Copy Source Edit copy Source do Text Copy source Edit insert Offset src Indent Level dest Indent String tab Width edit Group curr Pos offset curr length continue to insert after the replaced string else if data instanceof String Placeholder Data replace with a placeholder String code String Placeholder Data data code String str Indents change Indent code 0 tab Width dest Indent String get Line Delimiter do Text Insert insert Offset str edit Group curr Pos offset curr length continue to insert after the replaced string if curr Pos formatted length String insert Str formatted substring curr Pos do Text Insert insert Offset insert Str edit Group  doTextInsert insertOffset ASTNode initialIndentLevel removeLeadingIndent TextEditGroup editGroup ArrayList ArrayList getFormattedResult initialIndentLevel tabWidth getTabWidth currPos removeLeadingIndent currPos isWhitespace charAt currPos currPos NodeMarker NodeMarker currPos insertStr currPos doTextInsert insertOffset insertStr editGroup TextEditGroup TextEdit RangeMarker insertOffset addEditGroup TextEditGroup addEdit NodeMarker currPos destIndentString getIndentString getCurrentLine tabWidth CopyPlaceholderData CopySourceInfo copySource CopyPlaceholderData copySource srcIndentLevel getIndent copySource getStartNode getStartPosition TextEdit sourceEdit getCopySourceEdit copySource doTextCopy sourceEdit insertOffset srcIndentLevel destIndentString tabWidth editGroup currPos StringPlaceholderData StringPlaceholderData changeIndent tabWidth destIndentString getLineDelimiter doTextInsert insertOffset editGroup currPos currPos insertStr currPos doTextInsert insertOffset insertStr editGroup
private String get Current Line String str int pos for int i pos 1 i 0 i char ch str char At i if Indents is Line Delimiter Char ch return str substring i 1 pos return str substring 0 pos  getCurrentLine charAt isLineDelimiterChar
private void rewrite Modifiers AST Node parent Structural Property Descriptor property int offset Rewrite Event event get Event parent property if event null event get Change Kind Rewrite Event REPLACED return int old Modifiers Integer event get Original Value int Value int new Modifiers Integer event get New Value int Value Text Edit Group edit Group get Edit Group event try int tok get Scanner read Next offset true int start Pos get Scanner get Current Start Offset int end Pos start Pos loop while true boolean keep true switch tok case I Terminal Symbols Token Namepublic keep Modifier is Public new Modifiers break case I Terminal Symbols Token Nameprotected keep Modifier is Protected new Modifiers break case I Terminal Symbols Token Nameprivate keep Modifier is Private new Modifiers break case I Terminal Symbols Token Namestatic keep Modifier is Static new Modifiers break case I Terminal Symbols Token Namefinal keep Modifier is Final new Modifiers break case I Terminal Symbols Token Nameabstract keep Modifier is Abstract new Modifiers break case I Terminal Symbols Token Namenative keep Modifier is Native new Modifiers break case I Terminal Symbols Token Namevolatile keep Modifier is Volatile new Modifiers break case I Terminal Symbols Token Namestrictfp keep Modifier is Strictfp new Modifiers break case I Terminal Symbols Token Nametransient keep Modifier is Transient new Modifiers break case I Terminal Symbols Token Namesynchronized keep Modifier is Synchronized new Modifiers break default break loop tok get Scanner read Next true int curr Pos end Pos end Pos get Scanner get Current Start Offset if keep do Text Remove curr Pos end Pos curr Pos edit Group int added Modifiers new Modifiers old Modifiers if added Modifiers 0 if start Pos end Pos int visibility Modifiers added Modifiers Modifier PUBLIC Modifier PRIVATE Modifier PROTECTED if visibility Modifiers 0 String Buffer buf new String Buffer AST Rewrite Flattener print Modifiers visibility Modifiers buf do Text Insert start Pos buf to String edit Group added Modifiers visibility Modifiers String Buffer buf new String Buffer AST Rewrite Flattener print Modifiers added Modifiers buf do Text Insert end Pos buf to String edit Group catch Core Exception e ignore  rewriteModifiers ASTNode StructuralPropertyDescriptor RewriteEvent getEvent getChangeKind RewriteEvent oldModifiers getOriginalValue intValue newModifiers getNewValue intValue TextEditGroup editGroup getEditGroup getScanner readNext startPos getScanner getCurrentStartOffset endPos startPos ITerminalSymbols TokenNamepublic isPublic newModifiers ITerminalSymbols TokenNameprotected isProtected newModifiers ITerminalSymbols TokenNameprivate isPrivate newModifiers ITerminalSymbols TokenNamestatic isStatic newModifiers ITerminalSymbols TokenNamefinal isFinal newModifiers ITerminalSymbols TokenNameabstract isAbstract newModifiers ITerminalSymbols TokenNamenative isNative newModifiers ITerminalSymbols TokenNamevolatile isVolatile newModifiers ITerminalSymbols TokenNamestrictfp isStrictfp newModifiers ITerminalSymbols TokenNametransient isTransient newModifiers ITerminalSymbols TokenNamesynchronized isSynchronized newModifiers getScanner readNext currPos endPos endPos getScanner getCurrentStartOffset doTextRemove currPos endPos currPos editGroup addedModifiers newModifiers oldModifiers addedModifiers startPos endPos visibilityModifiers addedModifiers visibilityModifiers StringBuffer StringBuffer ASTRewriteFlattener printModifiers visibilityModifiers doTextInsert startPos toString editGroup addedModifiers visibilityModifiers StringBuffer StringBuffer ASTRewriteFlattener printModifiers addedModifiers doTextInsert endPos toString editGroup CoreException
private void replace Operation int pos Before Operation String new Operation Text Edit Group edit Group try get Scanner read Next pos Before Operation true do Text Replace get Scanner get Current Start Offset get Scanner get Current Length new Operation edit Group catch Core Exception e handle Exception e  replaceOperation posBeforeOperation newOperation TextEditGroup editGroup getScanner readNext posBeforeOperation doTextReplace getScanner getCurrentStartOffset getScanner getCurrentLength newOperation editGroup CoreException handleException
private void rewrite Operation AST Node parent Structural Property Descriptor property int pos Before Operation Rewrite Event event get Event parent property if event null event get Change Kind Rewrite Event UNCHANGED try String new Operation event get New Value to String Text Edit Group edit Group get Edit Group event get Scanner read Next pos Before Operation true do Text Replace get Scanner get Current Start Offset get Scanner get Current Length new Operation edit Group catch Core Exception e handle Exception e  rewriteOperation ASTNode StructuralPropertyDescriptor posBeforeOperation RewriteEvent getEvent getChangeKind RewriteEvent newOperation getNewValue toString TextEditGroup editGroup getEditGroup getScanner readNext posBeforeOperation doTextReplace getScanner getCurrentStartOffset getScanner getCurrentLength newOperation editGroup CoreException handleException
public void post Visit AST Node node Text Edit Group edit Group this event Store get Tracked Node Data node if edit Group null this current Edit this current Edit get Parent remove copy source edits do Copy Source Post Visit node this source Copy End Nodes  postVisit ASTNode TextEditGroup editGroup eventStore getTrackedNodeData editGroup currentEdit currentEdit getParent doCopySourcePostVisit sourceCopyEndNodes
public void pre Visit AST Node node copies then range marker Copy Source Info infos this event Store get Node Copy Sources node do Copy Source Pre Visit infos this source Copy End Nodes Text Edit Group edit Group this event Store get Tracked Node Data node if edit Group null int offset get Extended Offset node int length get Extended Length node Text Edit edit new Range Marker offset length add Edit Group edit Group edit add Edit edit this current Edit edit  preVisit ASTNode CopySourceInfo eventStore getNodeCopySources doCopySourcePreVisit sourceCopyEndNodes TextEditGroup editGroup eventStore getTrackedNodeData editGroup getExtendedOffset getExtendedLength TextEdit RangeMarker addEditGroup editGroup addEdit currentEdit
final void do Copy Source Pre Visit Copy Source Info infos Stack node End Stack if infos null for int i 0 i infos length i Copy Source Info curr infos i Text Edit edit get Copy Source Edit curr add Edit edit this current Edit edit node End Stack push curr get End Node  doCopySourcePreVisit CopySourceInfo nodeEndStack CopySourceInfo TextEdit getCopySourceEdit addEdit currentEdit nodeEndStack getEndNode
final void do Copy Source Post Visit AST Node node Stack node End Stack while node End Stack is Empty node End Stack peek node node End Stack pop this current Edit this current Edit get Parent  doCopySourcePostVisit ASTNode nodeEndStack nodeEndStack isEmpty nodeEndStack nodeEndStack currentEdit currentEdit getParent
public boolean visit Compilation Unit node if has Children Changes node return do Visit Unchanged Children node int start Pos rewrite Node node Compilation Unit PACKAGE PROPERTY 0 AST Rewrite Formatter NONE NON NLS 1 if get Change Kind node Compilation Unit PACKAGE PROPERTY Rewrite Event INSERTED do Text Insert 0 get Line Delimiter get Edit Group node Compilation Unit PACKAGE PROPERTY start Pos rewrite Paragraph List node Compilation Unit IMPORTS PROPERTY start Pos 0 0 2 rewrite Paragraph List node Compilation Unit TYPES PROPERTY start Pos 0 1 2 return false  CompilationUnit hasChildrenChanges doVisitUnchangedChildren startPos rewriteNode CompilationUnit PACKAGE_PROPERTY ASTRewriteFormatter getChangeKind CompilationUnit PACKAGE_PROPERTY RewriteEvent doTextInsert getLineDelimiter getEditGroup CompilationUnit PACKAGE_PROPERTY startPos rewriteParagraphList CompilationUnit IMPORTS_PROPERTY startPos rewriteParagraphList CompilationUnit TYPES_PROPERTY startPos
public boolean visit Type Declaration node if has Children Changes node return do Visit Unchanged Children node int pos rewrite Javadoc node Type Declaration JAVADOC PROPERTY rewrite Modifiers node Type Declaration MODIFIERS PROPERTY pos boolean is Interface Boolean get Original Value node Type Declaration INTERFACE PROPERTY boolean Value modifiers class interface boolean invert Type is Changed node Type Declaration INTERFACE PROPERTY if invert Type try int type Token is Interface I Terminal Symbols Token Nameinterface I Terminal Symbols Token Nameclass get Scanner read To Token type Token node get Start Position String str is Interface class interface NON NLS 1 NON NLS 2 int start get Scanner get Current Start Offset int end get Scanner get Current End Offset do Text Replace start end start str get Edit Group node Type Declaration INTERFACE PROPERTY catch Core Exception e ignore name pos rewrite Required Node node Type Declaration NAME PROPERTY superclass if is Interface invert Type Rewrite Event super Class Event get Event node Type Declaration SUPERCLASS PROPERTY int change Kind super Class Event null super Class Event get Change Kind Rewrite Event UNCHANGED switch change Kind case Rewrite Event INSERTED do Text Insert pos extends get Edit Group super Class Event NON NLS 1 do Text Insert pos AST Node super Class Event get New Value 0 false get Edit Group super Class Event break case Rewrite Event REMOVED AST Node super Class AST Node super Class Event get Original Value int end Pos get Extended End super Class do Text Remove And Visit pos end Pos pos super Class get Edit Group super Class Event pos end Pos break case Rewrite Event REPLACED AST Node super Class AST Node super Class Event get Original Value int offset get Extended Offset super Class int length get Extended Length super Class do Text Remove And Visit offset length super Class get Edit Group super Class Event do Text Insert offset AST Node super Class Event get New Value 0 false get Edit Group super Class Event pos offset length break case Rewrite Event UNCHANGED pos do Visit node Type Declaration SUPERCLASS PROPERTY pos extended interfaces Rewrite Event interface Event get Event node Type Declaration SUPER INTERFACES PROPERTY if interface Event null interface Event get Change Kind Rewrite Event UNCHANGED if invert Type List original Nodes List get Original Value node Type Declaration SUPER INTERFACES PROPERTY if original Nodes is Empty String keyword is Interface implements extends NON NLS 1 NON NLS 2 AST Node first Node AST Node original Nodes get 0 do Text Replace pos first Node get Start Position pos keyword get Edit Group node Type Declaration INTERFACE PROPERTY pos do Visit node Type Declaration SUPER INTERFACES PROPERTY pos else String keyword is Interface invert Type implements extends NON NLS 1 NON NLS 2 if invert Type List new Nodes List get New Value node Type Declaration SUPER INTERFACES PROPERTY if new Nodes is Empty List orig Nodes List get Original Value node Type Declaration SUPER INTERFACES PROPERTY int first Start pos if orig Nodes is Empty first Start AST Node orig Nodes get 0 get Start Position do Text Replace pos first Start pos keyword get Edit Group node Type Declaration INTERFACE PROPERTY keyword NON NLS 1 pos first Start pos rewrite Node List node Type Declaration SUPER INTERFACES PROPERTY pos keyword NON NLS 1 type members start Pos find position after left brace of type be aware that bracket might be missing int start Indent get Indent node get Start Position 1 int start Pos get Pos After Left Brace pos rewrite Paragraph List node Type Declaration BODY DECLARATIONS PROPERTY start Pos start Indent 1 2 return false  TypeDeclaration hasChildrenChanges doVisitUnchangedChildren rewriteJavadoc TypeDeclaration JAVADOC_PROPERTY rewriteModifiers TypeDeclaration MODIFIERS_PROPERTY isInterface getOriginalValue TypeDeclaration INTERFACE_PROPERTY booleanValue invertType isChanged TypeDeclaration INTERFACE_PROPERTY invertType typeToken isInterface ITerminalSymbols TokenNameinterface ITerminalSymbols TokenNameclass getScanner readToToken typeToken getStartPosition isInterface getScanner getCurrentStartOffset getScanner getCurrentEndOffset doTextReplace getEditGroup TypeDeclaration INTERFACE_PROPERTY CoreException rewriteRequiredNode TypeDeclaration NAME_PROPERTY isInterface invertType RewriteEvent superClassEvent getEvent TypeDeclaration SUPERCLASS_PROPERTY changeKind superClassEvent superClassEvent getChangeKind RewriteEvent changeKind RewriteEvent doTextInsert getEditGroup superClassEvent doTextInsert ASTNode superClassEvent getNewValue getEditGroup superClassEvent RewriteEvent ASTNode superClass ASTNode superClassEvent getOriginalValue endPos getExtendedEnd superClass doTextRemoveAndVisit endPos superClass getEditGroup superClassEvent endPos RewriteEvent ASTNode superClass ASTNode superClassEvent getOriginalValue getExtendedOffset superClass getExtendedLength superClass doTextRemoveAndVisit superClass getEditGroup superClassEvent doTextInsert ASTNode superClassEvent getNewValue getEditGroup superClassEvent RewriteEvent doVisit TypeDeclaration SUPERCLASS_PROPERTY RewriteEvent interfaceEvent getEvent TypeDeclaration SUPER_INTERFACES_PROPERTY interfaceEvent interfaceEvent getChangeKind RewriteEvent invertType originalNodes getOriginalValue TypeDeclaration SUPER_INTERFACES_PROPERTY originalNodes isEmpty isInterface ASTNode firstNode ASTNode originalNodes doTextReplace firstNode getStartPosition getEditGroup TypeDeclaration INTERFACE_PROPERTY doVisit TypeDeclaration SUPER_INTERFACES_PROPERTY isInterface invertType invertType newNodes getNewValue TypeDeclaration SUPER_INTERFACES_PROPERTY newNodes isEmpty origNodes getOriginalValue TypeDeclaration SUPER_INTERFACES_PROPERTY firstStart origNodes isEmpty firstStart ASTNode origNodes getStartPosition doTextReplace firstStart getEditGroup TypeDeclaration INTERFACE_PROPERTY firstStart rewriteNodeList TypeDeclaration SUPER_INTERFACES_PROPERTY startPos startIndent getIndent getStartPosition startPos getPosAfterLeftBrace rewriteParagraphList TypeDeclaration BODY_DECLARATIONS_PROPERTY startPos startIndent
private void rewrite Return Type Method Declaration node boolean is Constructor boolean is Constructor Change weakness in the AST return type always exists even if missing in source AST Node original Return Type AST Node get Original Value node Method Declaration RETURN TYPE PROPERTY boolean return Type Exists original Return Type null original Return Type get Start Position 1 if is Constructor Change return Type Exists rewrite Required Node node Method Declaration RETURN TYPE PROPERTY return AST Node new Return Type AST Node get New Value node Method Declaration RETURN TYPE PROPERTY if is Constructor Change return Type Exists new Return Type original Return Type try int start Pos node get Start Position get Scanner set Offset start Pos int token get Scanner read Next true while Token Scanner is Modifier token start Pos get Scanner get Current End Offset token get Scanner read Next true Text Edit Group edit Group get Edit Group node Method Declaration RETURN TYPE PROPERTY if is Constructor return Type Exists insert do Text Insert start Pos edit Group NON NLS 1 do Text Insert start Pos new Return Type get Indent start Pos true edit Group else remove int len get Extended End original Return Type start Pos do Text Remove And Visit start Pos len original Return Type edit Group catch Core Exception e handle Exception e  rewriteReturnType MethodDeclaration isConstructor isConstructorChange ASTNode originalReturnType ASTNode getOriginalValue MethodDeclaration RETURN_TYPE_PROPERTY returnTypeExists originalReturnType originalReturnType getStartPosition isConstructorChange returnTypeExists rewriteRequiredNode MethodDeclaration RETURN_TYPE_PROPERTY ASTNode newReturnType ASTNode getNewValue MethodDeclaration RETURN_TYPE_PROPERTY isConstructorChange returnTypeExists newReturnType originalReturnType startPos getStartPosition getScanner setOffset startPos getScanner readNext TokenScanner isModifier startPos getScanner getCurrentEndOffset getScanner readNext TextEditGroup editGroup getEditGroup MethodDeclaration RETURN_TYPE_PROPERTY isConstructor returnTypeExists doTextInsert startPos editGroup doTextInsert startPos newReturnType getIndent startPos editGroup getExtendedEnd originalReturnType startPos doTextRemoveAndVisit startPos originalReturnType editGroup CoreException handleException
public boolean visit Method Declaration node if has Children Changes node return do Visit Unchanged Children node int pos rewrite Javadoc node Method Declaration JAVADOC PROPERTY rewrite Modifiers node Method Declaration MODIFIERS PROPERTY pos boolean is Constructor Change is Changed node Method Declaration CONSTRUCTOR PROPERTY boolean is Constructor Boolean get Original Value node Method Declaration CONSTRUCTOR PROPERTY boolean Value if is Constructor is Constructor Change rewrite Return Type node is Constructor is Constructor Change method name pos rewrite Required Node node Method Declaration NAME PROPERTY parameters try if is Changed node Method Declaration PARAMETERS PROPERTY pos get Scanner get Token End Offset I Terminal Symbols Token NameLPAREN pos pos rewrite Node List node Method Declaration PARAMETERS PROPERTY pos NON NLS 1 NON NLS 2 else pos do Visit node Method Declaration PARAMETERS PROPERTY pos pos get Scanner get Token End Offset I Terminal Symbols Token NameRPAREN pos int extra Dims rewrite Extra Dimensions node Method Declaration EXTRA DIMENSIONS PROPERTY pos boolean has Exception Changes is Changed node Method Declaration THROWN EXCEPTIONS PROPERTY int body Change Kind get Change Kind node Method Declaration BODY PROPERTY if extra Dims 0 has Exception Changes body Change Kind Rewrite Event INSERTED body Change Kind Rewrite Event REMOVED int dim Integer get Original Value node Method Declaration EXTRA DIMENSIONS PROPERTY int Value while dim 0 pos get Scanner get Token End Offset I Terminal Symbols Token NameRBRACKET pos dim pos rewrite Node List node Method Declaration THROWN EXCEPTIONS PROPERTY pos throws NON NLS 1 NON NLS 2 rewrite Method Body node pos catch Core Exception e ignore return false  MethodDeclaration hasChildrenChanges doVisitUnchangedChildren rewriteJavadoc MethodDeclaration JAVADOC_PROPERTY rewriteModifiers MethodDeclaration MODIFIERS_PROPERTY isConstructorChange isChanged MethodDeclaration CONSTRUCTOR_PROPERTY isConstructor getOriginalValue MethodDeclaration CONSTRUCTOR_PROPERTY booleanValue isConstructor isConstructorChange rewriteReturnType isConstructor isConstructorChange rewriteRequiredNode MethodDeclaration NAME_PROPERTY isChanged MethodDeclaration PARAMETERS_PROPERTY getScanner getTokenEndOffset ITerminalSymbols TokenNameLPAREN rewriteNodeList MethodDeclaration PARAMETERS_PROPERTY doVisit MethodDeclaration PARAMETERS_PROPERTY getScanner getTokenEndOffset ITerminalSymbols TokenNameRPAREN extraDims rewriteExtraDimensions MethodDeclaration EXTRA_DIMENSIONS_PROPERTY hasExceptionChanges isChanged MethodDeclaration THROWN_EXCEPTIONS_PROPERTY bodyChangeKind getChangeKind MethodDeclaration BODY_PROPERTY extraDims hasExceptionChanges bodyChangeKind RewriteEvent bodyChangeKind RewriteEvent getOriginalValue MethodDeclaration EXTRA_DIMENSIONS_PROPERTY intValue getScanner getTokenEndOffset ITerminalSymbols TokenNameRBRACKET rewriteNodeList MethodDeclaration THROWN_EXCEPTIONS_PROPERTY rewriteMethodBody CoreException
public boolean visit Block node if has Children Changes node return do Visit Unchanged Children node int start Pos if is Collapsed node start Pos node get Start Position else start Pos get Pos After Left Brace node get Start Position int start Indent get Indent node get Start Position 1 rewrite Paragraph List node Block STATEMENTS PROPERTY start Pos start Indent 0 1 return false  hasChildrenChanges doVisitUnchangedChildren startPos isCollapsed startPos getStartPosition startPos getPosAfterLeftBrace getStartPosition startIndent getIndent getStartPosition rewriteParagraphList STATEMENTS_PROPERTY startPos startIndent
public boolean visit Return Statement node if has Children Changes node return do Visit Unchanged Children node try int offset get Scanner get Token End Offset I Terminal Symbols Token Namereturn node get Start Position rewrite Node node Return Statement EXPRESSION PROPERTY offset AST Rewrite Formatter SPACE NON NLS 1 catch Core Exception e handle Exception e return false  ReturnStatement hasChildrenChanges doVisitUnchangedChildren getScanner getTokenEndOffset ITerminalSymbols TokenNamereturn getStartPosition rewriteNode ReturnStatement EXPRESSION_PROPERTY ASTRewriteFormatter CoreException handleException
public boolean visit Anonymous Class Declaration node if has Children Changes node return do Visit Unchanged Children node int start Pos get Pos After Left Brace node get Start Position int start Indent get Indent node get Start Position 1 rewrite Paragraph List node Anonymous Class Declaration BODY DECLARATIONS PROPERTY start Pos start Indent 1 2 return false  AnonymousClassDeclaration hasChildrenChanges doVisitUnchangedChildren startPos getPosAfterLeftBrace getStartPosition startIndent getIndent getStartPosition rewriteParagraphList AnonymousClassDeclaration BODY_DECLARATIONS_PROPERTY startPos startIndent
public boolean visit Array Access node if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Array Access ARRAY PROPERTY rewrite Required Node node Array Access INDEX PROPERTY return false  ArrayAccess hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode ArrayAccess ARRAY_PROPERTY rewriteRequiredNode ArrayAccess INDEX_PROPERTY
public boolean visit Array Creation node if has Children Changes node return do Visit Unchanged Children node Array Type array Type Array Type get Original Value node Array Creation TYPE PROPERTY int n Old Brackets get Dimensions array Type number of total brackets int n New Brackets n Old Brackets Text Edit Group edit Group null Rewrite Event type Event get Event node Array Creation TYPE PROPERTY if type Event null type Event get Change Kind Rewrite Event REPLACED changed arraytype can have different dimension or type name Array Type replacing Type Array Type type Event get New Value edit Group get Edit Group type Event Type new Type replacing Type get Element Type Type old Type get Element Type array Type if new Type equals old Type int offset get Extended Offset old Type int length get Extended Length old Type do Text Remove offset length edit Group do Text Insert offset new Type 0 false edit Group n New Brackets replacing Type get Dimensions is replaced type do Visit array Type try int offset get Scanner get Token Start Offset I Terminal Symbols Token NameLBRACKET array Type get Start Position dimension node with expressions Rewrite Event dim Event get Event node Array Creation DIMENSIONS PROPERTY boolean has Dimension Changes dim Event null dim Event get Change Kind Rewrite Event UNCHANGED if has Dimension Changes Rewrite Event events dim Event get Children offset on first opening brace for int i 0 i events length i Rewrite Event event events i int change Kind event get Change Kind if change Kind Rewrite Event INSERTED insert new dimension edit Group get Edit Group event do Text Insert offset edit Group NON NLS 1 do Text Insert offset AST Node event get New Value 0 false edit Group do Text Insert offset edit Group NON NLS 1 n New Brackets else AST Node elem AST Node event get Original Value int elem End elem get Start Position elem get Length int end Pos get Scanner get Token End Offset I Terminal Symbols Token NameRBRACKET elem End if change Kind Rewrite Event REMOVED edit Group get Edit Group event do Text Remove And Visit offset end Pos offset elem edit Group else if change Kind Rewrite Event REPLACED edit Group get Edit Group event int elem Offset get Extended Offset elem int elem Length get Extended Length elem do Text Remove And Visit elem Offset elem Length elem edit Group do Text Insert elem Offset AST Node event get New Value 0 false edit Group n New Brackets else do Visit elem n New Brackets offset end Pos n Old Brackets else offset do Visit node Array Creation DIMENSIONS PROPERTY offset if n Old Brackets n New Brackets if has Dimension Changes offset get Scanner get Token End Offset I Terminal Symbols Token NameRBRACKET offset rewrite Extra Dimensions n Old Brackets n New Brackets offset edit Group int kind get Change Kind node Array Creation INITIALIZER PROPERTY if kind Rewrite Event REMOVED offset get Scanner get Previous Token End Offset I Terminal Symbols Token NameLBRACE offset else offset node get Start Position node get Length insert pos rewrite Node node Array Creation INITIALIZER PROPERTY offset AST Rewrite Formatter SPACE NON NLS 1 catch Core Exception e handle Exception e return false  ArrayCreation hasChildrenChanges doVisitUnchangedChildren ArrayType arrayType ArrayType getOriginalValue ArrayCreation TYPE_PROPERTY nOldBrackets getDimensions arrayType nNewBrackets nOldBrackets TextEditGroup editGroup RewriteEvent typeEvent getEvent ArrayCreation TYPE_PROPERTY typeEvent typeEvent getChangeKind RewriteEvent ArrayType replacingType ArrayType typeEvent getNewValue editGroup getEditGroup typeEvent newType replacingType getElementType oldType getElementType arrayType newType oldType getExtendedOffset oldType getExtendedLength oldType doTextRemove editGroup doTextInsert newType editGroup nNewBrackets replacingType getDimensions doVisit arrayType getScanner getTokenStartOffset ITerminalSymbols TokenNameLBRACKET arrayType getStartPosition RewriteEvent dimEvent getEvent ArrayCreation DIMENSIONS_PROPERTY hasDimensionChanges dimEvent dimEvent getChangeKind RewriteEvent hasDimensionChanges RewriteEvent dimEvent getChildren RewriteEvent changeKind getChangeKind changeKind RewriteEvent editGroup getEditGroup doTextInsert editGroup doTextInsert ASTNode getNewValue editGroup doTextInsert editGroup nNewBrackets ASTNode ASTNode getOriginalValue elemEnd getStartPosition getLength endPos getScanner getTokenEndOffset ITerminalSymbols TokenNameRBRACKET elemEnd changeKind RewriteEvent editGroup getEditGroup doTextRemoveAndVisit endPos editGroup changeKind RewriteEvent editGroup getEditGroup elemOffset getExtendedOffset elemLength getExtendedLength doTextRemoveAndVisit elemOffset elemLength editGroup doTextInsert elemOffset ASTNode getNewValue editGroup nNewBrackets doVisit nNewBrackets endPos nOldBrackets doVisit ArrayCreation DIMENSIONS_PROPERTY nOldBrackets nNewBrackets hasDimensionChanges getScanner getTokenEndOffset ITerminalSymbols TokenNameRBRACKET rewriteExtraDimensions nOldBrackets nNewBrackets editGroup getChangeKind ArrayCreation INITIALIZER_PROPERTY RewriteEvent getScanner getPreviousTokenEndOffset ITerminalSymbols TokenNameLBRACE getStartPosition getLength rewriteNode ArrayCreation INITIALIZER_PROPERTY ASTRewriteFormatter CoreException handleException
private Type get Element Type Array Type parent Type t Type get Original Value parent Array Type COMPONENT TYPE PROPERTY while t is Array Type t Type get Original Value t Array Type COMPONENT TYPE PROPERTY return t  getElementType ArrayType getOriginalValue ArrayType COMPONENT_TYPE_PROPERTY isArrayType getOriginalValue ArrayType COMPONENT_TYPE_PROPERTY
private int get Dimensions Array Type parent Type t Type get Original Value parent Array Type COMPONENT TYPE PROPERTY int dimensions 1 always include this array type while t is Array Type dimensions t Type get Original Value t Array Type COMPONENT TYPE PROPERTY return dimensions  getDimensions ArrayType getOriginalValue ArrayType COMPONENT_TYPE_PROPERTY isArrayType getOriginalValue ArrayType COMPONENT_TYPE_PROPERTY
public boolean visit Array Initializer node if has Children Changes node return do Visit Unchanged Children node int start Pos get Pos After Left Brace node get Start Position rewrite Node List node Array Initializer EXPRESSIONS PROPERTY start Pos NON NLS 1 NON NLS 2 return false  ArrayInitializer hasChildrenChanges doVisitUnchangedChildren startPos getPosAfterLeftBrace getStartPosition rewriteNodeList ArrayInitializer EXPRESSIONS_PROPERTY startPos
public boolean visit Array Type node if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Array Type COMPONENT TYPE PROPERTY return false  ArrayType hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode ArrayType COMPONENT_TYPE_PROPERTY
public boolean visit Assert Statement node if has Children Changes node return do Visit Unchanged Children node int offset rewrite Required Node node Assert Statement EXPRESSION PROPERTY rewrite Node node Assert Statement MESSAGE PROPERTY offset AST Rewrite Formatter ASSERT COMMENT return false  AssertStatement hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode AssertStatement EXPRESSION_PROPERTY rewriteNode AssertStatement MESSAGE_PROPERTY ASTRewriteFormatter ASSERT_COMMENT
public boolean visit Assignment node if has Children Changes node return do Visit Unchanged Children node int pos rewrite Required Node node Assignment LEFT HAND SIDE PROPERTY rewrite Operation node Assignment OPERATOR PROPERTY pos rewrite Required Node node Assignment RIGHT HAND SIDE PROPERTY return false  hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode LEFT_HAND_SIDE_PROPERTY rewriteOperation OPERATOR_PROPERTY rewriteRequiredNode RIGHT_HAND_SIDE_PROPERTY
public boolean visit Boolean Literal node if has Children Changes node return do Visit Unchanged Children node Boolean new Literal Boolean get New Value node Boolean Literal BOOLEAN VALUE PROPERTY Text Edit Group group get Edit Group node Boolean Literal BOOLEAN VALUE PROPERTY do Text Replace node get Start Position node get Length new Literal to String group return false  BooleanLiteral hasChildrenChanges doVisitUnchangedChildren newLiteral getNewValue BooleanLiteral BOOLEAN_VALUE_PROPERTY TextEditGroup getEditGroup BooleanLiteral BOOLEAN_VALUE_PROPERTY doTextReplace getStartPosition getLength newLiteral toString
public boolean visit Break Statement node if has Children Changes node return do Visit Unchanged Children node try int offset get Scanner get Token End Offset I Terminal Symbols Token Namebreak node get Start Position rewrite Node node Break Statement LABEL PROPERTY offset AST Rewrite Formatter SPACE space between break and label NON NLS 1 catch Core Exception e handle Exception e return false  BreakStatement hasChildrenChanges doVisitUnchangedChildren getScanner getTokenEndOffset ITerminalSymbols TokenNamebreak getStartPosition rewriteNode BreakStatement LABEL_PROPERTY ASTRewriteFormatter CoreException handleException
public boolean visit Cast Expression node if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Cast Expression TYPE PROPERTY rewrite Required Node node Cast Expression EXPRESSION PROPERTY return false  CastExpression hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode CastExpression TYPE_PROPERTY rewriteRequiredNode CastExpression EXPRESSION_PROPERTY
public boolean visit Catch Clause node catch Exception Block if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Catch Clause EXCEPTION PROPERTY rewrite Required Node node Catch Clause BODY PROPERTY return false  CatchClause hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode CatchClause EXCEPTION_PROPERTY rewriteRequiredNode CatchClause BODY_PROPERTY
public boolean visit Character Literal node if has Children Changes node return do Visit Unchanged Children node String escaped Seq String get New Value node Character Literal ESCAPED VALUE PROPERTY Text Edit Group group get Edit Group node Character Literal ESCAPED VALUE PROPERTY do Text Replace node get Start Position node get Length escaped Seq group return false  CharacterLiteral hasChildrenChanges doVisitUnchangedChildren escapedSeq getNewValue CharacterLiteral ESCAPED_VALUE_PROPERTY TextEditGroup getEditGroup CharacterLiteral ESCAPED_VALUE_PROPERTY doTextReplace getStartPosition getLength escapedSeq
public boolean visit Class Instance Creation node if has Children Changes node return do Visit Unchanged Children node rewrite Optional Qualifier node Class Instance Creation EXPRESSION PROPERTY node get Start Position int pos rewrite Required Node node Class Instance Creation NAME PROPERTY if is Changed node Class Instance Creation ARGUMENTS PROPERTY try int startpos get Scanner get Token End Offset I Terminal Symbols Token NameLPAREN pos rewrite Node List node Class Instance Creation ARGUMENTS PROPERTY startpos NON NLS 1 NON NLS 2 catch Core Exception e handle Exception e else do Visit node Class Instance Creation ARGUMENTS PROPERTY 0 int kind get Change Kind node Class Instance Creation ANONYMOUS CLASS DECLARATION PROPERTY if kind Rewrite Event REMOVED try pos get Scanner get Previous Token End Offset I Terminal Symbols Token NameLBRACE pos catch Core Exception e handle Exception e else pos node get Start Position node get Length insert pos rewrite Node node Class Instance Creation ANONYMOUS CLASS DECLARATION PROPERTY pos AST Rewrite Formatter SPACE NON NLS 1 return false  ClassInstanceCreation hasChildrenChanges doVisitUnchangedChildren rewriteOptionalQualifier ClassInstanceCreation EXPRESSION_PROPERTY getStartPosition rewriteRequiredNode ClassInstanceCreation NAME_PROPERTY isChanged ClassInstanceCreation ARGUMENTS_PROPERTY getScanner getTokenEndOffset ITerminalSymbols TokenNameLPAREN rewriteNodeList ClassInstanceCreation ARGUMENTS_PROPERTY CoreException handleException doVisit ClassInstanceCreation ARGUMENTS_PROPERTY getChangeKind ClassInstanceCreation ANONYMOUS_CLASS_DECLARATION_PROPERTY RewriteEvent getScanner getPreviousTokenEndOffset ITerminalSymbols TokenNameLBRACE CoreException handleException getStartPosition getLength rewriteNode ClassInstanceCreation ANONYMOUS_CLASS_DECLARATION_PROPERTY ASTRewriteFormatter
public boolean visit Conditional Expression node expression then Expression else Expression if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Conditional Expression EXPRESSION PROPERTY rewrite Required Node node Conditional Expression THEN EXPRESSION PROPERTY rewrite Required Node node Conditional Expression ELSE EXPRESSION PROPERTY return false  ConditionalExpression thenExpression elseExpression hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode ConditionalExpression EXPRESSION_PROPERTY rewriteRequiredNode ConditionalExpression THEN_EXPRESSION_PROPERTY rewriteRequiredNode ConditionalExpression ELSE_EXPRESSION_PROPERTY
public boolean visit Constructor Invocation node if has Children Changes node return do Visit Unchanged Children node try int startpos get Scanner get Token End Offset I Terminal Symbols Token NameLPAREN node get Start Position rewrite Node List node Constructor Invocation ARGUMENTS PROPERTY startpos NON NLS 1 NON NLS 2 catch Core Exception e handle Exception e return false  ConstructorInvocation hasChildrenChanges doVisitUnchangedChildren getScanner getTokenEndOffset ITerminalSymbols TokenNameLPAREN getStartPosition rewriteNodeList ConstructorInvocation ARGUMENTS_PROPERTY CoreException handleException
public boolean visit Continue Statement node if has Children Changes node return do Visit Unchanged Children node try int offset get Scanner get Token End Offset I Terminal Symbols Token Namecontinue node get Start Position rewrite Node node Continue Statement LABEL PROPERTY offset AST Rewrite Formatter SPACE space between continue and label NON NLS 1 catch Core Exception e handle Exception e return false  ContinueStatement hasChildrenChanges doVisitUnchangedChildren getScanner getTokenEndOffset ITerminalSymbols TokenNamecontinue getStartPosition rewriteNode ContinueStatement LABEL_PROPERTY ASTRewriteFormatter CoreException handleException
public boolean visit Do Statement node do statement while expression if has Children Changes node return do Visit Unchanged Children node int pos node get Start Position try Rewrite Event event get Event node Do Statement BODY PROPERTY if event null event get Change Kind Rewrite Event REPLACED int start Offset get Scanner get Token End Offset I Terminal Symbols Token Namedo pos AST Node body AST Node event get Original Value int body End body get Start Position body get Length int end Pos get Scanner get Token Start Offset I Terminal Symbols Token Namewhile body End rewrite Body Node node Do Statement BODY PROPERTY start Offset end Pos get Indent node get Start Position this formatter DO BLOCK body else do Visit node Do Statement BODY PROPERTY pos catch Core Exception e handle Exception e rewrite Required Node node Do Statement EXPRESSION PROPERTY return false  DoStatement hasChildrenChanges doVisitUnchangedChildren getStartPosition RewriteEvent getEvent DoStatement BODY_PROPERTY getChangeKind RewriteEvent startOffset getScanner getTokenEndOffset ITerminalSymbols TokenNamedo ASTNode ASTNode getOriginalValue bodyEnd getStartPosition getLength endPos getScanner getTokenStartOffset ITerminalSymbols TokenNamewhile bodyEnd rewriteBodyNode DoStatement BODY_PROPERTY startOffset endPos getIndent getStartPosition DO_BLOCK doVisit DoStatement BODY_PROPERTY CoreException handleException rewriteRequiredNode DoStatement EXPRESSION_PROPERTY
public boolean visit Empty Statement node if has Children Changes node return do Visit Unchanged Children node change Not Supported node no modification possible return false  EmptyStatement hasChildrenChanges doVisitUnchangedChildren changeNotSupported
public boolean visit Expression Statement node expression if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Expression Statement EXPRESSION PROPERTY return false  ExpressionStatement hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode ExpressionStatement EXPRESSION_PROPERTY
public boolean visit Field Access node expression name if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Field Access EXPRESSION PROPERTY expression rewrite Required Node node Field Access NAME PROPERTY name return false  FieldAccess hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode FieldAccess EXPRESSION_PROPERTY rewriteRequiredNode FieldAccess NAME_PROPERTY
public boolean visit Field Declaration node Modifier Type Variable Declaration Fragment Variable Declaration Fragment if has Children Changes node return do Visit Unchanged Children node int pos rewrite Javadoc node Field Declaration JAVADOC PROPERTY rewrite Modifiers node Field Declaration MODIFIERS PROPERTY pos pos rewrite Required Node node Field Declaration TYPE PROPERTY rewrite Node List node Field Declaration FRAGMENTS PROPERTY pos NON NLS 1 NON NLS 2 return false  FieldDeclaration VariableDeclarationFragment VariableDeclarationFragment hasChildrenChanges doVisitUnchangedChildren rewriteJavadoc FieldDeclaration JAVADOC_PROPERTY rewriteModifiers FieldDeclaration MODIFIERS_PROPERTY rewriteRequiredNode FieldDeclaration TYPE_PROPERTY rewriteNodeList FieldDeclaration FRAGMENTS_PROPERTY
public boolean visit For Statement node if has Children Changes node return do Visit Unchanged Children node try int pos node get Start Position if is Changed node For Statement INITIALIZERS PROPERTY position after opening parent int start Offset get Scanner get Token End Offset I Terminal Symbols Token NameLPAREN pos pos rewrite Node List node For Statement INITIALIZERS PROPERTY start Offset NON NLS 1 NON NLS 2 else pos do Visit node For Statement INITIALIZERS PROPERTY pos position after first semicolon pos get Scanner get Token End Offset I Terminal Symbols Token NameSEMICOLON pos pos rewrite Node node For Statement EXPRESSION PROPERTY pos AST Rewrite Formatter NONE if is Changed node For Statement UPDATERS PROPERTY int start Offset get Scanner get Token End Offset I Terminal Symbols Token NameSEMICOLON pos pos rewrite Node List node For Statement UPDATERS PROPERTY start Offset NON NLS 1 NON NLS 2 else pos do Visit node For Statement UPDATERS PROPERTY pos Rewrite Event body Event get Event node For Statement BODY PROPERTY if body Event null body Event get Change Kind Rewrite Event REPLACED int start Offset get Scanner get Token End Offset I Terminal Symbols Token NameRPAREN pos rewrite Body Node node For Statement BODY PROPERTY start Offset 1 get Indent node get Start Position this formatter FOR BLOCK body else do Visit node For Statement BODY PROPERTY 0 catch Core Exception e handle Exception e return false  ForStatement hasChildrenChanges doVisitUnchangedChildren getStartPosition isChanged ForStatement INITIALIZERS_PROPERTY startOffset getScanner getTokenEndOffset ITerminalSymbols TokenNameLPAREN rewriteNodeList ForStatement INITIALIZERS_PROPERTY startOffset doVisit ForStatement INITIALIZERS_PROPERTY getScanner getTokenEndOffset ITerminalSymbols TokenNameSEMICOLON rewriteNode ForStatement EXPRESSION_PROPERTY ASTRewriteFormatter isChanged ForStatement UPDATERS_PROPERTY startOffset getScanner getTokenEndOffset ITerminalSymbols TokenNameSEMICOLON rewriteNodeList ForStatement UPDATERS_PROPERTY startOffset doVisit ForStatement UPDATERS_PROPERTY RewriteEvent bodyEvent getEvent ForStatement BODY_PROPERTY bodyEvent bodyEvent getChangeKind RewriteEvent startOffset getScanner getTokenEndOffset ITerminalSymbols TokenNameRPAREN rewriteBodyNode ForStatement BODY_PROPERTY startOffset getIndent getStartPosition FOR_BLOCK doVisit ForStatement BODY_PROPERTY CoreException handleException
public boolean visit If Statement node if has Children Changes node return do Visit Unchanged Children node int pos rewrite Required Node node If Statement EXPRESSION PROPERTY statement Rewrite Event then Event get Event node If Statement THEN STATEMENT PROPERTY int else Change get Change Kind node If Statement ELSE STATEMENT PROPERTY if then Event null then Event get Change Kind Rewrite Event UNCHANGED try pos get Scanner get Token End Offset I Terminal Symbols Token NameRPAREN pos after the closing parent int indent get Indent node get Start Position int end Pos 1 Object else Statement get Original Value node If Statement ELSE STATEMENT PROPERTY if else Statement null AST Node then Statement AST Node then Event get Original Value end Pos get Scanner get Token Start Offset I Terminal Symbols Token Nameelse then Statement get Start Position then Statement get Length else keyword if else Statement null else Change Rewrite Event UNCHANGED pos rewrite Body Node node If Statement THEN STATEMENT PROPERTY pos end Pos indent this formatter IF BLOCK NO ELSE else pos rewrite Body Node node If Statement THEN STATEMENT PROPERTY pos end Pos indent this formatter IF BLOCK WITH ELSE catch Core Exception e handle Exception e else pos do Visit node If Statement THEN STATEMENT PROPERTY pos if else Change Rewrite Event UNCHANGED int indent get Indent node get Start Position Object new Then get New Value node If Statement THEN STATEMENT PROPERTY if new Then instanceof Block rewrite Body Node node If Statement ELSE STATEMENT PROPERTY pos 1 indent this formatter ELSE AFTER BLOCK else rewrite Body Node node If Statement ELSE STATEMENT PROPERTY pos 1 indent this formatter ELSE AFTER STATEMENT else pos do Visit node If Statement ELSE STATEMENT PROPERTY pos return false  IfStatement hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode IfStatement EXPRESSION_PROPERTY RewriteEvent thenEvent getEvent IfStatement THEN_STATEMENT_PROPERTY elseChange getChangeKind IfStatement ELSE_STATEMENT_PROPERTY thenEvent thenEvent getChangeKind RewriteEvent getScanner getTokenEndOffset ITerminalSymbols TokenNameRPAREN getIndent getStartPosition endPos elseStatement getOriginalValue IfStatement ELSE_STATEMENT_PROPERTY elseStatement ASTNode thenStatement ASTNode thenEvent getOriginalValue endPos getScanner getTokenStartOffset ITerminalSymbols TokenNameelse thenStatement getStartPosition thenStatement getLength elseStatement elseChange RewriteEvent rewriteBodyNode IfStatement THEN_STATEMENT_PROPERTY endPos IF_BLOCK_NO_ELSE rewriteBodyNode IfStatement THEN_STATEMENT_PROPERTY endPos IF_BLOCK_WITH_ELSE CoreException handleException doVisit IfStatement THEN_STATEMENT_PROPERTY elseChange RewriteEvent getIndent getStartPosition newThen getNewValue IfStatement THEN_STATEMENT_PROPERTY newThen rewriteBodyNode IfStatement ELSE_STATEMENT_PROPERTY ELSE_AFTER_BLOCK rewriteBodyNode IfStatement ELSE_STATEMENT_PROPERTY ELSE_AFTER_STATEMENT doVisit IfStatement ELSE_STATEMENT_PROPERTY
public boolean visit Import Declaration node if has Children Changes node return do Visit Unchanged Children node int pos rewrite Required Node node Import Declaration NAME PROPERTY Rewrite Event event get Event node Import Declaration ON DEMAND PROPERTY if event null event get Change Kind Rewrite Event UNCHANGED boolean is On Demand Boolean event get Original Value boolean Value if is On Demand do Text Insert pos get Edit Group event NON NLS 1 else try int end Pos get Scanner get Token Start Offset I Terminal Symbols Token NameSEMICOLON pos do Text Remove pos end Pos pos get Edit Group event catch Core Exception e handle Exception e return false  ImportDeclaration hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode ImportDeclaration NAME_PROPERTY RewriteEvent getEvent ImportDeclaration ON_DEMAND_PROPERTY getChangeKind RewriteEvent isOnDemand getOriginalValue booleanValue isOnDemand doTextInsert getEditGroup endPos getScanner getTokenStartOffset ITerminalSymbols TokenNameSEMICOLON doTextRemove endPos getEditGroup CoreException handleException
public boolean visit Infix Expression node if has Children Changes node return do Visit Unchanged Children node int pos rewrite Required Node node Infix Expression LEFT OPERAND PROPERTY boolean needs New Operation is Changed node Infix Expression OPERATOR PROPERTY String operation get New Value node Infix Expression OPERATOR PROPERTY to String if needs New Operation replace Operation pos operation get Edit Group node Infix Expression OPERATOR PROPERTY pos rewrite Required Node node Infix Expression RIGHT OPERAND PROPERTY Rewrite Event event get Event node Infix Expression EXTENDED OPERANDS PROPERTY String prefix String operation if needs New Operation int start Pos pos Text Edit Group edit Group get Edit Group node Infix Expression OPERATOR PROPERTY if event null event get Change Kind Rewrite Event UNCHANGED Rewrite Event extended Operands event get Children for int i 0 i extended Operands length i Rewrite Event curr extended Operands i AST Node elem AST Node curr get Original Value if elem null if curr get Change Kind Rewrite Event REPLACED replace Operation start Pos operation edit Group start Pos elem get Start Position elem get Length else List extended Operands List get Original Value node Infix Expression EXTENDED OPERANDS PROPERTY for int i 0 i extended Operands size i AST Node elem AST Node extended Operands get i replace Operation start Pos operation edit Group start Pos elem get Start Position elem get Length rewrite Node List node Infix Expression EXTENDED OPERANDS PROPERTY pos prefix String prefix String return false  InfixExpression hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode InfixExpression LEFT_OPERAND_PROPERTY needsNewOperation isChanged InfixExpression OPERATOR_PROPERTY getNewValue InfixExpression OPERATOR_PROPERTY toString needsNewOperation replaceOperation getEditGroup InfixExpression OPERATOR_PROPERTY rewriteRequiredNode InfixExpression RIGHT_OPERAND_PROPERTY RewriteEvent getEvent InfixExpression EXTENDED_OPERANDS_PROPERTY prefixString needsNewOperation startPos TextEditGroup editGroup getEditGroup InfixExpression OPERATOR_PROPERTY getChangeKind RewriteEvent RewriteEvent extendedOperands getChildren extendedOperands RewriteEvent extendedOperands ASTNode ASTNode getOriginalValue getChangeKind RewriteEvent replaceOperation startPos editGroup startPos getStartPosition getLength extendedOperands getOriginalValue InfixExpression EXTENDED_OPERANDS_PROPERTY extendedOperands ASTNode ASTNode extendedOperands replaceOperation startPos editGroup startPos getStartPosition getLength rewriteNodeList InfixExpression EXTENDED_OPERANDS_PROPERTY prefixString prefixString
public boolean visit Initializer node if has Children Changes node return do Visit Unchanged Children node int pos rewrite Javadoc node Initializer JAVADOC PROPERTY rewrite Modifiers node Initializer MODIFIERS PROPERTY pos rewrite Required Node node Initializer BODY PROPERTY return false  hasChildrenChanges doVisitUnchangedChildren rewriteJavadoc JAVADOC_PROPERTY rewriteModifiers MODIFIERS_PROPERTY rewriteRequiredNode BODY_PROPERTY
public boolean visit Instanceof Expression node if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Instanceof Expression LEFT OPERAND PROPERTY rewrite Required Node node Instanceof Expression RIGHT OPERAND PROPERTY return false  InstanceofExpression hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode InstanceofExpression LEFT_OPERAND_PROPERTY rewriteRequiredNode InstanceofExpression RIGHT_OPERAND_PROPERTY
public boolean visit Javadoc node if has Children Changes node return do Visit Unchanged Children node int start Pos node get Start Position 3 String separator get Line Delimiter get Indent At Offset node get Start Position NON NLS 1 rewrite Node List node Javadoc TAGS PROPERTY start Pos separator separator return false  hasChildrenChanges doVisitUnchangedChildren startPos getStartPosition getLineDelimiter getIndentAtOffset getStartPosition rewriteNodeList TAGS_PROPERTY startPos
public boolean visit Labeled Statement node if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Labeled Statement LABEL PROPERTY rewrite Required Node node Labeled Statement BODY PROPERTY return false  LabeledStatement hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode LabeledStatement LABEL_PROPERTY rewriteRequiredNode LabeledStatement BODY_PROPERTY
public boolean visit Method Invocation node if has Children Changes node return do Visit Unchanged Children node rewrite Optional Qualifier node Method Invocation EXPRESSION PROPERTY node get Start Position int pos rewrite Required Node node Method Invocation NAME PROPERTY if is Changed node Method Invocation ARGUMENTS PROPERTY eval position after opening parent try int start Offset get Scanner get Token End Offset I Terminal Symbols Token NameLPAREN pos rewrite Node List node Method Invocation ARGUMENTS PROPERTY start Offset NON NLS 1 NON NLS 2 catch Core Exception e handle Exception e else do Visit node Method Invocation ARGUMENTS PROPERTY 0 return false  MethodInvocation hasChildrenChanges doVisitUnchangedChildren rewriteOptionalQualifier MethodInvocation EXPRESSION_PROPERTY getStartPosition rewriteRequiredNode MethodInvocation NAME_PROPERTY isChanged MethodInvocation ARGUMENTS_PROPERTY startOffset getScanner getTokenEndOffset ITerminalSymbols TokenNameLPAREN rewriteNodeList MethodInvocation ARGUMENTS_PROPERTY startOffset CoreException handleException doVisit MethodInvocation ARGUMENTS_PROPERTY
public boolean visit Null Literal node if has Children Changes node return do Visit Unchanged Children node change Not Supported node no modification possible return false  NullLiteral hasChildrenChanges doVisitUnchangedChildren changeNotSupported
public boolean visit Number Literal node if has Children Changes node return do Visit Unchanged Children node String new Literal String get New Value node Number Literal TOKEN PROPERTY Text Edit Group group get Edit Group node Number Literal TOKEN PROPERTY do Text Replace node get Start Position node get Length new Literal group return false  NumberLiteral hasChildrenChanges doVisitUnchangedChildren newLiteral getNewValue NumberLiteral TOKEN_PROPERTY TextEditGroup getEditGroup NumberLiteral TOKEN_PROPERTY doTextReplace getStartPosition getLength newLiteral
public boolean visit Package Declaration node if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Package Declaration NAME PROPERTY return false  PackageDeclaration hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode PackageDeclaration NAME_PROPERTY
public boolean visit Parenthesized Expression node if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Parenthesized Expression EXPRESSION PROPERTY return false  ParenthesizedExpression hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode ParenthesizedExpression EXPRESSION_PROPERTY
public boolean visit Postfix Expression node if has Children Changes node return do Visit Unchanged Children node int pos rewrite Required Node node Postfix Expression OPERAND PROPERTY rewrite Operation node Postfix Expression OPERATOR PROPERTY pos return false  PostfixExpression hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode PostfixExpression OPERAND_PROPERTY rewriteOperation PostfixExpression OPERATOR_PROPERTY
public boolean visit Prefix Expression node if has Children Changes node return do Visit Unchanged Children node rewrite Operation node Prefix Expression OPERATOR PROPERTY node get Start Position rewrite Required Node node Prefix Expression OPERAND PROPERTY return false  PrefixExpression hasChildrenChanges doVisitUnchangedChildren rewriteOperation PrefixExpression OPERATOR_PROPERTY getStartPosition rewriteRequiredNode PrefixExpression OPERAND_PROPERTY
public boolean visit Primitive Type node if has Children Changes node return do Visit Unchanged Children node Primitive Type Code new Code Primitive Type Code get New Value node Primitive Type PRIMITIVE TYPE CODE PROPERTY Text Edit Group group get Edit Group node Primitive Type PRIMITIVE TYPE CODE PROPERTY do Text Replace node get Start Position node get Length new Code to String group return false  PrimitiveType hasChildrenChanges doVisitUnchangedChildren PrimitiveType newCode PrimitiveType getNewValue PrimitiveType PRIMITIVE_TYPE_CODE_PROPERTY TextEditGroup getEditGroup PrimitiveType PRIMITIVE_TYPE_CODE_PROPERTY doTextReplace getStartPosition getLength newCode toString
public boolean visit Qualified Name node if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Qualified Name QUALIFIER PROPERTY rewrite Required Node node Qualified Name NAME PROPERTY return false  QualifiedName hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode QualifiedName QUALIFIER_PROPERTY rewriteRequiredNode QualifiedName NAME_PROPERTY
public boolean visit Simple Name node if has Children Changes node return do Visit Unchanged Children node String new String String get New Value node Simple Name IDENTIFIER PROPERTY Text Edit Group group get Edit Group node Simple Name IDENTIFIER PROPERTY do Text Replace node get Start Position node get Length new String group return false  SimpleName hasChildrenChanges doVisitUnchangedChildren newString getNewValue SimpleName IDENTIFIER_PROPERTY TextEditGroup getEditGroup SimpleName IDENTIFIER_PROPERTY doTextReplace getStartPosition getLength newString
public boolean visit Simple Type node if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Simple Type NAME PROPERTY return false  SimpleType hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode SimpleType NAME_PROPERTY
public boolean visit Single Variable Declaration node if has Children Changes node return do Visit Unchanged Children node rewrite Modifiers node Single Variable Declaration MODIFIERS PROPERTY node get Start Position rewrite Required Node node Single Variable Declaration TYPE PROPERTY int pos rewrite Required Node node Single Variable Declaration NAME PROPERTY int extra Dims rewrite Extra Dimensions node Single Variable Declaration EXTRA DIMENSIONS PROPERTY pos if extra Dims 0 int kind get Change Kind node Single Variable Declaration INITIALIZER PROPERTY if kind Rewrite Event REMOVED try pos get Scanner get Previous Token End Offset I Terminal Symbols Token NameEQUAL pos catch Core Exception e handle Exception e else pos node get Start Position node get Length insert pos rewrite Node node Single Variable Declaration INITIALIZER PROPERTY pos this formatter VAR INITIALIZER return false  SingleVariableDeclaration hasChildrenChanges doVisitUnchangedChildren rewriteModifiers SingleVariableDeclaration MODIFIERS_PROPERTY getStartPosition rewriteRequiredNode SingleVariableDeclaration TYPE_PROPERTY rewriteRequiredNode SingleVariableDeclaration NAME_PROPERTY extraDims rewriteExtraDimensions SingleVariableDeclaration EXTRA_DIMENSIONS_PROPERTY extraDims getChangeKind SingleVariableDeclaration INITIALIZER_PROPERTY RewriteEvent getScanner getPreviousTokenEndOffset ITerminalSymbols TokenNameEQUAL CoreException handleException getStartPosition getLength rewriteNode SingleVariableDeclaration INITIALIZER_PROPERTY VAR_INITIALIZER
public boolean visit String Literal node if has Children Changes node return do Visit Unchanged Children node String escaped Seq String get New Value node String Literal ESCAPED VALUE PROPERTY Text Edit Group group get Edit Group node String Literal ESCAPED VALUE PROPERTY do Text Replace node get Start Position node get Length escaped Seq group return false  StringLiteral hasChildrenChanges doVisitUnchangedChildren escapedSeq getNewValue StringLiteral ESCAPED_VALUE_PROPERTY TextEditGroup getEditGroup StringLiteral ESCAPED_VALUE_PROPERTY doTextReplace getStartPosition getLength escapedSeq
public boolean visit Super Constructor Invocation node if has Children Changes node return do Visit Unchanged Children node int pos rewrite Optional Qualifier node Super Constructor Invocation EXPRESSION PROPERTY node get Start Position if is Changed node Super Constructor Invocation ARGUMENTS PROPERTY eval position after opening parent try pos get Scanner get Token End Offset I Terminal Symbols Token NameLPAREN pos rewrite Node List node Super Constructor Invocation ARGUMENTS PROPERTY pos NON NLS 1 NON NLS 2 catch Core Exception e handle Exception e else do Visit node Super Constructor Invocation ARGUMENTS PROPERTY 0 return false  SuperConstructorInvocation hasChildrenChanges doVisitUnchangedChildren rewriteOptionalQualifier SuperConstructorInvocation EXPRESSION_PROPERTY getStartPosition isChanged SuperConstructorInvocation ARGUMENTS_PROPERTY getScanner getTokenEndOffset ITerminalSymbols TokenNameLPAREN rewriteNodeList SuperConstructorInvocation ARGUMENTS_PROPERTY CoreException handleException doVisit SuperConstructorInvocation ARGUMENTS_PROPERTY
public boolean visit Super Field Access node if has Children Changes node return do Visit Unchanged Children node rewrite Optional Qualifier node Super Field Access QUALIFIER PROPERTY node get Start Position rewrite Required Node node Super Field Access NAME PROPERTY return false  SuperFieldAccess hasChildrenChanges doVisitUnchangedChildren rewriteOptionalQualifier SuperFieldAccess QUALIFIER_PROPERTY getStartPosition rewriteRequiredNode SuperFieldAccess NAME_PROPERTY
public boolean visit Super Method Invocation node if has Children Changes node return do Visit Unchanged Children node rewrite Optional Qualifier node Super Method Invocation QUALIFIER PROPERTY node get Start Position int pos rewrite Required Node node Super Method Invocation NAME PROPERTY if is Changed node Super Method Invocation ARGUMENTS PROPERTY eval position after opening parent try pos get Scanner get Token End Offset I Terminal Symbols Token NameLPAREN pos rewrite Node List node Super Method Invocation ARGUMENTS PROPERTY pos NON NLS 1 NON NLS 2 catch Core Exception e handle Exception e else do Visit node Super Method Invocation ARGUMENTS PROPERTY 0 return false  SuperMethodInvocation hasChildrenChanges doVisitUnchangedChildren rewriteOptionalQualifier SuperMethodInvocation QUALIFIER_PROPERTY getStartPosition rewriteRequiredNode SuperMethodInvocation NAME_PROPERTY isChanged SuperMethodInvocation ARGUMENTS_PROPERTY getScanner getTokenEndOffset ITerminalSymbols TokenNameLPAREN rewriteNodeList SuperMethodInvocation ARGUMENTS_PROPERTY CoreException handleException doVisit SuperMethodInvocation ARGUMENTS_PROPERTY
public boolean visit Switch Case node if has Children Changes node return do Visit Unchanged Children node dont allow switching from case to default or back New statements should be created rewrite Required Node node Switch Case EXPRESSION PROPERTY return false  SwitchCase hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode SwitchCase EXPRESSION_PROPERTY
private class Switch List Rewriter extends Paragraph List Rewriter public Switch List Rewriter int initial Indent super initial Indent 0  SwitchListRewriter ParagraphListRewriter SwitchListRewriter initialIndent initialIndent
protected int get Node Indent int node Index int indent get Initial Indent AST Node node AST Node this list node Index get Original Value if node null node AST Node this list node Index get New Value if node get Node Type AST Node SWITCH CASE indent return indent  getNodeIndent nodeIndex getInitialIndent ASTNode ASTNode nodeIndex getOriginalValue ASTNode nodeIndex getNewValue getNodeType ASTNode SWITCH_CASE
public boolean visit Switch Statement node if has Children Changes node return do Visit Unchanged Children node int pos rewrite Required Node node Switch Statement EXPRESSION PROPERTY Child List Property Descriptor property Switch Statement STATEMENTS PROPERTY if get Change Kind node property Rewrite Event UNCHANGED try pos get Scanner get Token End Offset I Terminal Symbols Token NameLBRACE pos int insert Indent get Indent node get Start Position 1 Paragraph List Rewriter list Rewriter new Switch List Rewriter insert Indent String Buffer lead String new String Buffer lead String append get Line Delimiter lead String append create Indent String insert Indent list Rewriter rewrite List node property pos lead String to String catch Core Exception e handle Exception e else do Visit node Switch Statement STATEMENTS PROPERTY 0 return false  SwitchStatement hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode SwitchStatement EXPRESSION_PROPERTY ChildListPropertyDescriptor SwitchStatement STATEMENTS_PROPERTY getChangeKind RewriteEvent getScanner getTokenEndOffset ITerminalSymbols TokenNameLBRACE insertIndent getIndent getStartPosition ParagraphListRewriter listRewriter SwitchListRewriter insertIndent StringBuffer leadString StringBuffer leadString getLineDelimiter leadString createIndentString insertIndent listRewriter rewriteList leadString toString CoreException handleException doVisit SwitchStatement STATEMENTS_PROPERTY
public boolean visit Synchronized Statement node if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Synchronized Statement EXPRESSION PROPERTY rewrite Required Node node Synchronized Statement BODY PROPERTY return false  SynchronizedStatement hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode SynchronizedStatement EXPRESSION_PROPERTY rewriteRequiredNode SynchronizedStatement BODY_PROPERTY
public boolean visit This Expression node if has Children Changes node return do Visit Unchanged Children node rewrite Optional Qualifier node This Expression QUALIFIER PROPERTY node get Start Position return false  ThisExpression hasChildrenChanges doVisitUnchangedChildren rewriteOptionalQualifier ThisExpression QUALIFIER_PROPERTY getStartPosition
public boolean visit Throw Statement node if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Throw Statement EXPRESSION PROPERTY return false  ThrowStatement hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode ThrowStatement EXPRESSION_PROPERTY
public boolean visit Try Statement node if has Children Changes node return do Visit Unchanged Children node int pos rewrite Required Node node Try Statement BODY PROPERTY if is Changed node Try Statement CATCH CLAUSES PROPERTY int indent get Indent node get Start Position String prefix this formatter CATCH BLOCK get Prefix indent get Line Delimiter pos rewrite Node List node Try Statement CATCH CLAUSES PROPERTY pos prefix prefix else pos do Visit node Try Statement CATCH CLAUSES PROPERTY pos rewrite Node node Try Statement FINALLY PROPERTY pos this formatter FINALLY BLOCK return false  TryStatement hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode TryStatement BODY_PROPERTY isChanged TryStatement CATCH_CLAUSES_PROPERTY getIndent getStartPosition CATCH_BLOCK getPrefix getLineDelimiter rewriteNodeList TryStatement CATCH_CLAUSES_PROPERTY doVisit TryStatement CATCH_CLAUSES_PROPERTY rewriteNode TryStatement FINALLY_PROPERTY FINALLY_BLOCK
public boolean visit Type Declaration Statement node if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Type Declaration Statement TYPE DECLARATION PROPERTY return false  TypeDeclarationStatement hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode TypeDeclarationStatement TYPE_DECLARATION_PROPERTY
public boolean visit Type Literal node if has Children Changes node return do Visit Unchanged Children node rewrite Required Node node Type Literal TYPE PROPERTY return false  TypeLiteral hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode TypeLiteral TYPE_PROPERTY
public boolean visit Variable Declaration Expression node if has Children Changes node return do Visit Unchanged Children node same code as Field Declaration rewrite Modifiers node Variable Declaration Expression MODIFIERS PROPERTY node get Start Position int pos rewrite Required Node node Variable Declaration Expression TYPE PROPERTY rewrite Node List node Variable Declaration Expression FRAGMENTS PROPERTY pos NON NLS 1 NON NLS 2 return false  VariableDeclarationExpression hasChildrenChanges doVisitUnchangedChildren FieldDeclaration rewriteModifiers VariableDeclarationExpression MODIFIERS_PROPERTY getStartPosition rewriteRequiredNode VariableDeclarationExpression TYPE_PROPERTY rewriteNodeList VariableDeclarationExpression FRAGMENTS_PROPERTY
public boolean visit Variable Declaration Fragment node if has Children Changes node return do Visit Unchanged Children node int pos rewrite Required Node node Variable Declaration Fragment NAME PROPERTY int extra Dims rewrite Extra Dimensions node Variable Declaration Fragment EXTRA DIMENSIONS PROPERTY pos if extra Dims 0 int kind get Change Kind node Variable Declaration Fragment INITIALIZER PROPERTY if kind Rewrite Event REMOVED try pos get Scanner get Previous Token End Offset I Terminal Symbols Token NameEQUAL pos catch Core Exception e handle Exception e else pos node get Start Position node get Length insert pos rewrite Node node Variable Declaration Fragment INITIALIZER PROPERTY pos this formatter VAR INITIALIZER return false  VariableDeclarationFragment hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode VariableDeclarationFragment NAME_PROPERTY extraDims rewriteExtraDimensions VariableDeclarationFragment EXTRA_DIMENSIONS_PROPERTY extraDims getChangeKind VariableDeclarationFragment INITIALIZER_PROPERTY RewriteEvent getScanner getPreviousTokenEndOffset ITerminalSymbols TokenNameEQUAL CoreException handleException getStartPosition getLength rewriteNode VariableDeclarationFragment INITIALIZER_PROPERTY VAR_INITIALIZER
public boolean visit Variable Declaration Statement node if has Children Changes node return do Visit Unchanged Children node same code as Field Declaration rewrite Modifiers node Variable Declaration Statement MODIFIERS PROPERTY node get Start Position int pos rewrite Required Node node Variable Declaration Statement TYPE PROPERTY rewrite Node List node Variable Declaration Statement FRAGMENTS PROPERTY pos NON NLS 1 NON NLS 2 return false  VariableDeclarationStatement hasChildrenChanges doVisitUnchangedChildren FieldDeclaration rewriteModifiers VariableDeclarationStatement MODIFIERS_PROPERTY getStartPosition rewriteRequiredNode VariableDeclarationStatement TYPE_PROPERTY rewriteNodeList VariableDeclarationStatement FRAGMENTS_PROPERTY
public boolean visit While Statement node if has Children Changes node return do Visit Unchanged Children node int pos rewrite Required Node node While Statement EXPRESSION PROPERTY try if is Changed node While Statement BODY PROPERTY int start Offset get Scanner get Token End Offset I Terminal Symbols Token NameRPAREN pos rewrite Body Node node While Statement BODY PROPERTY start Offset 1 get Indent node get Start Position this formatter WHILE BLOCK body else do Visit node While Statement BODY PROPERTY 0 catch Core Exception e handle Exception e return false  WhileStatement hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode WhileStatement EXPRESSION_PROPERTY isChanged WhileStatement BODY_PROPERTY startOffset getScanner getTokenEndOffset ITerminalSymbols TokenNameRPAREN rewriteBodyNode WhileStatement BODY_PROPERTY startOffset getIndent getStartPosition WHILE_BLOCK doVisit WhileStatement BODY_PROPERTY CoreException handleException
public boolean visit Member Ref node if has Children Changes node return do Visit Unchanged Children node rewrite Node node Member Ref QUALIFIER PROPERTY node get Start Position AST Rewrite Formatter NONE NON NLS 1 rewrite Required Node node Member Ref NAME PROPERTY return false  MemberRef hasChildrenChanges doVisitUnchangedChildren rewriteNode MemberRef QUALIFIER_PROPERTY getStartPosition ASTRewriteFormatter rewriteRequiredNode MemberRef NAME_PROPERTY
public boolean visit Method Ref node if has Children Changes node return do Visit Unchanged Children node rewrite Node node Method Ref QUALIFIER PROPERTY node get Start Position AST Rewrite Formatter NONE NON NLS 1 int pos rewrite Required Node node Method Ref NAME PROPERTY if is Changed node Method Ref PARAMETERS PROPERTY eval position after opening parent try int start Offset get Scanner get Token End Offset I Terminal Symbols Token NameLPAREN pos rewrite Node List node Method Ref PARAMETERS PROPERTY start Offset NON NLS 1 NON NLS 2 catch Core Exception e handle Exception e else do Visit node Method Ref PARAMETERS PROPERTY 0 return false  MethodRef hasChildrenChanges doVisitUnchangedChildren rewriteNode MethodRef QUALIFIER_PROPERTY getStartPosition ASTRewriteFormatter rewriteRequiredNode MethodRef NAME_PROPERTY isChanged MethodRef PARAMETERS_PROPERTY startOffset getScanner getTokenEndOffset ITerminalSymbols TokenNameLPAREN rewriteNodeList MethodRef PARAMETERS_PROPERTY startOffset CoreException handleException doVisit MethodRef PARAMETERS_PROPERTY
public boolean visit Method Ref Parameter node if has Children Changes node return do Visit Unchanged Children node int pos rewrite Required Node node Method Ref Parameter TYPE PROPERTY rewrite Node node Method Ref Parameter NAME PROPERTY pos AST Rewrite Formatter SPACE NON NLS 1 return false  MethodRefParameter hasChildrenChanges doVisitUnchangedChildren rewriteRequiredNode MethodRefParameter TYPE_PROPERTY rewriteNode MethodRefParameter NAME_PROPERTY ASTRewriteFormatter
public boolean visit Tag Element node if has Children Changes node return do Visit Unchanged Children node int change Kind get Change Kind node Tag Element TAG NAME PROPERTY switch change Kind case Rewrite Event INSERTED String new Tag Name String get New Value node Tag Element TAG NAME PROPERTY do Text Insert node get Start Position new Tag Name get Edit Group node Tag Element TAG NAME PROPERTY break case Rewrite Event REMOVED String old Tag String get Original Value node Tag Element TAG NAME PROPERTY int tag End find Tag Name Start node old Tag length do Text Remove node get Start Position tag End node get Start Position get Edit Group node Tag Element TAG NAME PROPERTY break case Rewrite Event REPLACED String new Tag Name String get New Value node Tag Element TAG NAME PROPERTY String old Tag String get Original Value node Tag Element TAG NAME PROPERTY int tag Start find Tag Name Start node do Text Replace tag Start old Tag length new Tag Name get Edit Group node Tag Element TAG NAME PROPERTY break if is Changed node Tag Element FRAGMENTS PROPERTY eval position after name int start Offset node get Start Position String old Tag String get Original Value node Tag Element TAG NAME PROPERTY if old Tag null start Offset find Tag Name Start node old Tag length rewrite Node List node Tag Element FRAGMENTS PROPERTY start Offset NON NLS 1 NON NLS 2 else do Visit node Tag Element FRAGMENTS PROPERTY 0 return false  TagElement hasChildrenChanges doVisitUnchangedChildren changeKind getChangeKind TagElement TAG_NAME_PROPERTY changeKind RewriteEvent newTagName getNewValue TagElement TAG_NAME_PROPERTY doTextInsert getStartPosition newTagName getEditGroup TagElement TAG_NAME_PROPERTY RewriteEvent oldTag getOriginalValue TagElement TAG_NAME_PROPERTY tagEnd findTagNameStart oldTag doTextRemove getStartPosition tagEnd getStartPosition getEditGroup TagElement TAG_NAME_PROPERTY RewriteEvent newTagName getNewValue TagElement TAG_NAME_PROPERTY oldTag getOriginalValue TagElement TAG_NAME_PROPERTY tagStart findTagNameStart doTextReplace tagStart oldTag newTagName getEditGroup TagElement TAG_NAME_PROPERTY isChanged TagElement FRAGMENTS_PROPERTY startOffset getStartPosition oldTag getOriginalValue TagElement TAG_NAME_PROPERTY oldTag startOffset findTagNameStart oldTag rewriteNodeList TagElement FRAGMENTS_PROPERTY startOffset doVisit TagElement FRAGMENTS_PROPERTY
private int find Tag Name Start AST Node tag Node try I Document doc get Document int i tag Node get Start Position int end i tag Node get Length while i end Character is Java Identifier Start doc get Char i i return i catch Bad Location Exception e handle Exception e return tag Node get Start Position  findTagNameStart ASTNode tagNode IDocument getDocument tagNode getStartPosition tagNode getLength isJavaIdentifierStart getChar BadLocationException handleException tagNode getStartPosition
public boolean visit Text Element node if has Children Changes node return do Visit Unchanged Children node String new Text String get New Value node Text Element TEXT PROPERTY Text Edit Group group get Edit Group node Text Element TEXT PROPERTY do Text Replace node get Start Position node get Length new Text group return false  TextElement hasChildrenChanges doVisitUnchangedChildren newText getNewValue TextElement TEXT_PROPERTY TextEditGroup getEditGroup TextElement TEXT_PROPERTY doTextReplace getStartPosition getLength newText
final void handle Exception Throwable e Illegal Argument Exception runtime Exception new Illegal Argument Exception Document does not match the AST NON NLS 1 runtime Exception init Cause e throw runtime Exception  handleException IllegalArgumentException runtimeException IllegalArgumentException runtimeException initCause runtimeException

public static String as String AST Node node Rewrite Event Store store AST Rewrite Flattener flattener new AST Rewrite Flattener store node accept flattener return flattener get Result  asString ASTNode RewriteEventStore ASTRewriteFlattener ASTRewriteFlattener getResult
private Rewrite Event Store store public AST Rewrite Flattener Rewrite Event Store store this store store this result new String Buffer  RewriteEventStore ASTRewriteFlattener RewriteEventStore StringBuffer
Returns the string accumulated in the visit return the serialized public String get Result convert to a string but lose any extra space in the string buffer by copying return new String this result to String  getResult toString
Resets this printer so that it can be used again public void reset this result set Length 0  setLength
protected boolean visit Node AST Node node Assert is True false No implementation to flatten node node to String NON NLS 1 return false  visitNode ASTNode isTrue toString
Appends the text representation of the given modifier flags followed by a single space param modifiers the modifiers param buf The code String Buffer code to write the result to public static void print Modifiers int modifiers String Buffer buf if Modifier is Public modifiers buf append public NON NLS 1 if Modifier is Protected modifiers buf append protected NON NLS 1 if Modifier is Private modifiers buf append private NON NLS 1 if Modifier is Static modifiers buf append static NON NLS 1 if Modifier is Abstract modifiers buf append abstract NON NLS 1 if Modifier is Final modifiers buf append final NON NLS 1 if Modifier is Synchronized modifiers buf append synchronized NON NLS 1 if Modifier is Volatile modifiers buf append volatile NON NLS 1 if Modifier is Native modifiers buf append native NON NLS 1 if Modifier is Strictfp modifiers buf append strictfp NON NLS 1 if Modifier is Transient modifiers buf append transient NON NLS 1  StringBuffer printModifiers StringBuffer isPublic isProtected isPrivate isStatic isAbstract isFinal isSynchronized isVolatile isNative isStrictfp isTransient
protected List get Child List AST Node parent Structural Property Descriptor child Property return List get Attribute parent child Property  getChildList ASTNode StructuralPropertyDescriptor childProperty getAttribute childProperty
protected AST Node get Child Node AST Node parent Structural Property Descriptor child Property return AST Node get Attribute parent child Property  ASTNode getChildNode ASTNode StructuralPropertyDescriptor childProperty ASTNode getAttribute childProperty
protected int get Int Attribute AST Node parent Structural Property Descriptor child Property return Integer get Attribute parent child Property int Value  getIntAttribute ASTNode StructuralPropertyDescriptor childProperty getAttribute childProperty intValue
protected boolean get Boolean Attribute AST Node parent Structural Property Descriptor child Property return Boolean get Attribute parent child Property boolean Value  getBooleanAttribute ASTNode StructuralPropertyDescriptor childProperty getAttribute childProperty booleanValue
protected Object get Attribute AST Node parent Structural Property Descriptor child Property return this store get New Value parent child Property  getAttribute ASTNode StructuralPropertyDescriptor childProperty getNewValue childProperty
protected void visit List AST Node parent Structural Property Descriptor child Property String separator List list get Child List parent child Property for int i 0 i list size i if separator null i 0 this result append separator AST Node list get i accept this  visitList ASTNode StructuralPropertyDescriptor childProperty getChildList childProperty ASTNode
protected void visit List AST Node parent Structural Property Descriptor child Property String separator String lead List list get Child List parent child Property if list is Empty this result append lead for int i 0 i list size i if separator null i 0 this result append separator AST Node list get i accept this  visitList ASTNode StructuralPropertyDescriptor childProperty getChildList childProperty isEmpty ASTNode
public boolean visit Anonymous Class Declaration node this result append visit List node Anonymous Class Declaration BODY DECLARATIONS PROPERTY null this result append return false  AnonymousClassDeclaration visitList AnonymousClassDeclaration BODY_DECLARATIONS_PROPERTY
public boolean visit Array Access node get Child Node node Array Access ARRAY PROPERTY accept this this result append get Child Node node Array Access INDEX PROPERTY accept this this result append return false  ArrayAccess getChildNode ArrayAccess ARRAY_PROPERTY getChildNode ArrayAccess INDEX_PROPERTY
public boolean visit Array Creation node this result append new NON NLS 1 Array Type array Type Array Type get Child Node node Array Creation TYPE PROPERTY get the element type and count dimensions Type element Type Type get Child Node array Type Array Type COMPONENT TYPE PROPERTY int dimensions 1 always include this array type while element Type is Array Type dimensions element Type Type get Child Node element Type Array Type COMPONENT TYPE PROPERTY element Type accept this List list get Child List node Array Creation DIMENSIONS PROPERTY for int i 0 i list size i this result append AST Node list get i accept this this result append dimensions add empty for each extra array dimension for int i 0 i dimensions i this result append NON NLS 1 AST Node initializer get Child Node node Array Creation INITIALIZER PROPERTY if initializer null get Child Node node Array Creation INITIALIZER PROPERTY accept this return false  ArrayCreation ArrayType arrayType ArrayType getChildNode ArrayCreation TYPE_PROPERTY elementType getChildNode arrayType ArrayType COMPONENT_TYPE_PROPERTY elementType isArrayType elementType getChildNode elementType ArrayType COMPONENT_TYPE_PROPERTY elementType getChildList ArrayCreation DIMENSIONS_PROPERTY ASTNode ASTNode getChildNode ArrayCreation INITIALIZER_PROPERTY getChildNode ArrayCreation INITIALIZER_PROPERTY
public boolean visit Array Initializer node this result append visit List node Array Initializer EXPRESSIONS PROPERTY String value Of this result append return false  ArrayInitializer visitList ArrayInitializer EXPRESSIONS_PROPERTY valueOf
public boolean visit Array Type node get Child Node node Array Type COMPONENT TYPE PROPERTY accept this this result append NON NLS 1 return false  ArrayType getChildNode ArrayType COMPONENT_TYPE_PROPERTY
public boolean visit Assert Statement node this result append assert NON NLS 1 get Child Node node Assert Statement EXPRESSION PROPERTY accept this AST Node message get Child Node node Assert Statement MESSAGE PROPERTY if message null this result append message accept this this result append return false  AssertStatement getChildNode AssertStatement EXPRESSION_PROPERTY ASTNode getChildNode AssertStatement MESSAGE_PROPERTY
public boolean visit Assignment node get Child Node node Assignment LEFT HAND SIDE PROPERTY accept this this result append get Attribute node Assignment OPERATOR PROPERTY to String get Child Node node Assignment RIGHT HAND SIDE PROPERTY accept this return false  getChildNode LEFT_HAND_SIDE_PROPERTY getAttribute OPERATOR_PROPERTY toString getChildNode RIGHT_HAND_SIDE_PROPERTY
public boolean visit Block node this result append visit List node Block STATEMENTS PROPERTY null this result append return false  visitList STATEMENTS_PROPERTY
public boolean visit Boolean Literal node if node boolean Value true this result append true NON NLS 1 else this result append false NON NLS 1 return false  BooleanLiteral booleanValue
public boolean visit Break Statement node this result append break NON NLS 1 AST Node label get Child Node node Break Statement LABEL PROPERTY if label null this result append label accept this this result append return false  BreakStatement ASTNode getChildNode BreakStatement LABEL_PROPERTY
public boolean visit Cast Expression node this result append get Child Node node Cast Expression TYPE PROPERTY accept this this result append get Child Node node Cast Expression EXPRESSION PROPERTY accept this return false  CastExpression getChildNode CastExpression TYPE_PROPERTY getChildNode CastExpression EXPRESSION_PROPERTY
public boolean visit Catch Clause node this result append catch NON NLS 1 get Child Node node Catch Clause EXCEPTION PROPERTY accept this this result append get Child Node node Catch Clause BODY PROPERTY accept this return false  CatchClause getChildNode CatchClause EXCEPTION_PROPERTY getChildNode CatchClause BODY_PROPERTY
see AST Visitor visit Character Literal public boolean visit Character Literal node this result append get Attribute node Character Literal ESCAPED VALUE PROPERTY return false  ASTVisitor CharacterLiteral CharacterLiteral getAttribute CharacterLiteral ESCAPED_VALUE_PROPERTY
public boolean visit Class Instance Creation node AST Node expression get Child Node node Class Instance Creation EXPRESSION PROPERTY if expression null expression accept this this result append this result append new NON NLS 1 get Child Node node Class Instance Creation NAME PROPERTY accept this this result append visit List node Class Instance Creation ARGUMENTS PROPERTY String value Of this result append AST Node decl get Child Node node Class Instance Creation ANONYMOUS CLASS DECLARATION PROPERTY if decl null decl accept this return false  ClassInstanceCreation ASTNode getChildNode ClassInstanceCreation EXPRESSION_PROPERTY getChildNode ClassInstanceCreation NAME_PROPERTY visitList ClassInstanceCreation ARGUMENTS_PROPERTY valueOf ASTNode getChildNode ClassInstanceCreation ANONYMOUS_CLASS_DECLARATION_PROPERTY
public boolean visit Compilation Unit node AST Node pack get Child Node node Compilation Unit PACKAGE PROPERTY if pack null pack accept this visit List node Compilation Unit IMPORTS PROPERTY null visit List node Compilation Unit TYPES PROPERTY null return false  CompilationUnit ASTNode getChildNode CompilationUnit PACKAGE_PROPERTY visitList CompilationUnit IMPORTS_PROPERTY visitList CompilationUnit TYPES_PROPERTY
public boolean visit Conditional Expression node get Child Node node Conditional Expression EXPRESSION PROPERTY accept this this result append get Child Node node Conditional Expression THEN EXPRESSION PROPERTY accept this this result append get Child Node node Conditional Expression ELSE EXPRESSION PROPERTY accept this return false  ConditionalExpression getChildNode ConditionalExpression EXPRESSION_PROPERTY getChildNode ConditionalExpression THEN_EXPRESSION_PROPERTY getChildNode ConditionalExpression ELSE_EXPRESSION_PROPERTY
public boolean visit Constructor Invocation node this result append this NON NLS 1 visit List node Constructor Invocation ARGUMENTS PROPERTY String value Of this result append NON NLS 1 return false  ConstructorInvocation visitList ConstructorInvocation ARGUMENTS_PROPERTY valueOf
public boolean visit Continue Statement node this result append continue NON NLS 1 AST Node label get Child Node node Continue Statement LABEL PROPERTY if label null this result append label accept this this result append return false  ContinueStatement ASTNode getChildNode ContinueStatement LABEL_PROPERTY
public boolean visit Do Statement node this result append do NON NLS 1 get Child Node node Do Statement BODY PROPERTY accept this this result append while NON NLS 1 get Child Node node Do Statement EXPRESSION PROPERTY accept this this result append NON NLS 1 return false  DoStatement getChildNode DoStatement BODY_PROPERTY getChildNode DoStatement EXPRESSION_PROPERTY
see AST Visitor visit Empty Statement public boolean visit Empty Statement node this result append return false  ASTVisitor EmptyStatement EmptyStatement
public boolean visit Expression Statement node get Child Node node Expression Statement EXPRESSION PROPERTY accept this this result append return false  ExpressionStatement getChildNode ExpressionStatement EXPRESSION_PROPERTY
public boolean visit Field Access node get Child Node node Field Access EXPRESSION PROPERTY accept this this result append get Child Node node Field Access NAME PROPERTY accept this return false  FieldAccess getChildNode FieldAccess EXPRESSION_PROPERTY getChildNode FieldAccess NAME_PROPERTY
public boolean visit Field Declaration node AST Node javadoc get Child Node node Field Declaration JAVADOC PROPERTY if javadoc null javadoc accept this print Modifiers get Int Attribute node Field Declaration MODIFIERS PROPERTY this result get Child Node node Field Declaration TYPE PROPERTY accept this this result append visit List node Field Declaration FRAGMENTS PROPERTY String value Of this result append return false  FieldDeclaration ASTNode getChildNode FieldDeclaration JAVADOC_PROPERTY printModifiers getIntAttribute FieldDeclaration MODIFIERS_PROPERTY getChildNode FieldDeclaration TYPE_PROPERTY visitList FieldDeclaration FRAGMENTS_PROPERTY valueOf
public boolean visit For Statement node this result append for NON NLS 1 visit List node For Statement INITIALIZERS PROPERTY null this result append AST Node expression get Child Node node For Statement EXPRESSION PROPERTY if expression null expression accept this this result append visit List node For Statement UPDATERS PROPERTY null this result append get Child Node node For Statement BODY PROPERTY accept this return false  ForStatement visitList ForStatement INITIALIZERS_PROPERTY ASTNode getChildNode ForStatement EXPRESSION_PROPERTY visitList ForStatement UPDATERS_PROPERTY getChildNode ForStatement BODY_PROPERTY
public boolean visit If Statement node this result append if NON NLS 1 get Child Node node If Statement EXPRESSION PROPERTY accept this this result append get Child Node node If Statement THEN STATEMENT PROPERTY accept this AST Node else Statement get Child Node node If Statement ELSE STATEMENT PROPERTY if else Statement null this result append else NON NLS 1 else Statement accept this return false  IfStatement getChildNode IfStatement EXPRESSION_PROPERTY getChildNode IfStatement THEN_STATEMENT_PROPERTY ASTNode elseStatement getChildNode IfStatement ELSE_STATEMENT_PROPERTY elseStatement elseStatement
public boolean visit Import Declaration node this result append import NON NLS 1 get Child Node node Import Declaration NAME PROPERTY accept this if get Boolean Attribute node Import Declaration ON DEMAND PROPERTY this result append NON NLS 1 this result append return false  ImportDeclaration getChildNode ImportDeclaration NAME_PROPERTY getBooleanAttribute ImportDeclaration ON_DEMAND_PROPERTY
public boolean visit Infix Expression node get Child Node node Infix Expression LEFT OPERAND PROPERTY accept this this result append String operator get Attribute node Infix Expression OPERATOR PROPERTY to String this result append operator this result append get Child Node node Infix Expression RIGHT OPERAND PROPERTY accept this List list get Child List node Infix Expression EXTENDED OPERANDS PROPERTY for int i 0 i list size i this result append operator AST Node list get i accept this return false  InfixExpression getChildNode InfixExpression LEFT_OPERAND_PROPERTY getAttribute InfixExpression OPERATOR_PROPERTY toString getChildNode InfixExpression RIGHT_OPERAND_PROPERTY getChildList InfixExpression EXTENDED_OPERANDS_PROPERTY ASTNode
public boolean visit Instanceof Expression node get Child Node node Instanceof Expression LEFT OPERAND PROPERTY accept this this result append instanceof NON NLS 1 get Child Node node Instanceof Expression RIGHT OPERAND PROPERTY accept this return false  InstanceofExpression getChildNode InstanceofExpression LEFT_OPERAND_PROPERTY getChildNode InstanceofExpression RIGHT_OPERAND_PROPERTY
public boolean visit Initializer node AST Node javadoc get Child Node node Initializer JAVADOC PROPERTY if javadoc null javadoc accept this print Modifiers get Int Attribute node Initializer MODIFIERS PROPERTY this result get Child Node node Initializer BODY PROPERTY accept this return false  ASTNode getChildNode JAVADOC_PROPERTY printModifiers getIntAttribute MODIFIERS_PROPERTY getChildNode BODY_PROPERTY
public boolean visit Javadoc node this result append NON NLS 1 List list get Child List node Javadoc TAGS PROPERTY for int i 0 i list size i this result append n NON NLS 1 AST Node list get i accept this this result append n NON NLS 1 return false  getChildList TAGS_PROPERTY ASTNode
public boolean visit Labeled Statement node get Child Node node Labeled Statement LABEL PROPERTY accept this this result append NON NLS 1 get Child Node node Labeled Statement BODY PROPERTY accept this return false  LabeledStatement getChildNode LabeledStatement LABEL_PROPERTY getChildNode LabeledStatement BODY_PROPERTY
public boolean visit Method Declaration node AST Node javadoc get Child Node node Method Declaration JAVADOC PROPERTY if javadoc null javadoc accept this print Modifiers get Int Attribute node Method Declaration MODIFIERS PROPERTY this result if get Boolean Attribute node Method Declaration CONSTRUCTOR PROPERTY get Child Node node Method Declaration RETURN TYPE PROPERTY accept this this result append get Child Node node Method Declaration NAME PROPERTY accept this this result append visit List node Method Declaration PARAMETERS PROPERTY String value Of this result append int extra Dims get Int Attribute node Method Declaration EXTRA DIMENSIONS PROPERTY for int i 0 i extra Dims i this result append NON NLS 1 visit List node Method Declaration THROWN EXCEPTIONS PROPERTY String value Of throws NON NLS 1 AST Node body get Child Node node Method Declaration BODY PROPERTY if body null this result append else body accept this return false  MethodDeclaration ASTNode getChildNode MethodDeclaration JAVADOC_PROPERTY printModifiers getIntAttribute MethodDeclaration MODIFIERS_PROPERTY getBooleanAttribute MethodDeclaration CONSTRUCTOR_PROPERTY getChildNode MethodDeclaration RETURN_TYPE_PROPERTY getChildNode MethodDeclaration NAME_PROPERTY visitList MethodDeclaration PARAMETERS_PROPERTY valueOf extraDims getIntAttribute MethodDeclaration EXTRA_DIMENSIONS_PROPERTY extraDims visitList MethodDeclaration THROWN_EXCEPTIONS_PROPERTY valueOf ASTNode getChildNode MethodDeclaration BODY_PROPERTY
public boolean visit Method Invocation node AST Node expression get Child Node node Method Invocation EXPRESSION PROPERTY if expression null expression accept this this result append get Child Node node Method Invocation NAME PROPERTY accept this this result append visit List node Method Invocation ARGUMENTS PROPERTY String value Of this result append return false  MethodInvocation ASTNode getChildNode MethodInvocation EXPRESSION_PROPERTY getChildNode MethodInvocation NAME_PROPERTY visitList MethodInvocation ARGUMENTS_PROPERTY valueOf
see AST Visitor visit Null Literal public boolean visit Null Literal node this result append null NON NLS 1 return false  ASTVisitor NullLiteral NullLiteral
see AST Visitor visit Number Literal public boolean visit Number Literal node this result append get Attribute node Number Literal TOKEN PROPERTY to String return false  ASTVisitor NumberLiteral NumberLiteral getAttribute NumberLiteral TOKEN_PROPERTY toString
public boolean visit Package Declaration node this result append package NON NLS 1 get Child Node node Package Declaration NAME PROPERTY accept this this result append return false  PackageDeclaration getChildNode PackageDeclaration NAME_PROPERTY
public boolean visit Parenthesized Expression node this result append get Child Node node Parenthesized Expression EXPRESSION PROPERTY accept this this result append return false  ParenthesizedExpression getChildNode ParenthesizedExpression EXPRESSION_PROPERTY
public boolean visit Postfix Expression node get Child Node node Postfix Expression OPERAND PROPERTY accept this this result append get Attribute node Postfix Expression OPERATOR PROPERTY to String return false  PostfixExpression getChildNode PostfixExpression OPERAND_PROPERTY getAttribute PostfixExpression OPERATOR_PROPERTY toString
public boolean visit Prefix Expression node this result append get Attribute node Prefix Expression OPERATOR PROPERTY to String get Child Node node Prefix Expression OPERAND PROPERTY accept this return false  PrefixExpression getAttribute PrefixExpression OPERATOR_PROPERTY toString getChildNode PrefixExpression OPERAND_PROPERTY
see AST Visitor visit Primitive Type public boolean visit Primitive Type node this result append get Attribute node Primitive Type PRIMITIVE TYPE CODE PROPERTY to String return false  ASTVisitor PrimitiveType PrimitiveType getAttribute PrimitiveType PRIMITIVE_TYPE_CODE_PROPERTY toString
public boolean visit Qualified Name node get Child Node node Qualified Name QUALIFIER PROPERTY accept this this result append get Child Node node Qualified Name NAME PROPERTY accept this return false  QualifiedName getChildNode QualifiedName QUALIFIER_PROPERTY getChildNode QualifiedName NAME_PROPERTY
public boolean visit Return Statement node this result append return NON NLS 1 AST Node expression get Child Node node Return Statement EXPRESSION PROPERTY if expression null this result append expression accept this this result append return false  ReturnStatement ASTNode getChildNode ReturnStatement EXPRESSION_PROPERTY
see AST Visitor visit Simple Name public boolean visit Simple Name node this result append get Attribute node Simple Name IDENTIFIER PROPERTY return false  ASTVisitor SimpleName SimpleName getAttribute SimpleName IDENTIFIER_PROPERTY
see AST Visitor visit Simple Type public boolean visit Simple Type node return true  ASTVisitor SimpleType SimpleType
public boolean visit Single Variable Declaration node print Modifiers get Int Attribute node Single Variable Declaration MODIFIERS PROPERTY this result get Child Node node Single Variable Declaration TYPE PROPERTY accept this this result append get Child Node node Single Variable Declaration NAME PROPERTY accept this int extra Dimensions get Int Attribute node Single Variable Declaration EXTRA DIMENSIONS PROPERTY for int i 0 i extra Dimensions i this result append NON NLS 1 AST Node initializer get Child Node node Single Variable Declaration INITIALIZER PROPERTY if initializer null this result append initializer accept this return false  SingleVariableDeclaration printModifiers getIntAttribute SingleVariableDeclaration MODIFIERS_PROPERTY getChildNode SingleVariableDeclaration TYPE_PROPERTY getChildNode SingleVariableDeclaration NAME_PROPERTY extraDimensions getIntAttribute SingleVariableDeclaration EXTRA_DIMENSIONS_PROPERTY extraDimensions ASTNode getChildNode SingleVariableDeclaration INITIALIZER_PROPERTY
see AST Visitor visit String Literal public boolean visit String Literal node this result append get Attribute node String Literal ESCAPED VALUE PROPERTY return false  ASTVisitor StringLiteral StringLiteral getAttribute StringLiteral ESCAPED_VALUE_PROPERTY
public boolean visit Super Constructor Invocation node AST Node expression get Child Node node Super Constructor Invocation EXPRESSION PROPERTY if expression null expression accept this this result append this result append super NON NLS 1 visit List node Super Constructor Invocation ARGUMENTS PROPERTY String value Of this result append NON NLS 1 return false  SuperConstructorInvocation ASTNode getChildNode SuperConstructorInvocation EXPRESSION_PROPERTY visitList SuperConstructorInvocation ARGUMENTS_PROPERTY valueOf
public boolean visit Super Field Access node AST Node qualifier get Child Node node Super Field Access QUALIFIER PROPERTY if qualifier null qualifier accept this this result append this result append super NON NLS 1 get Child Node node Super Field Access NAME PROPERTY accept this return false  SuperFieldAccess ASTNode getChildNode SuperFieldAccess QUALIFIER_PROPERTY getChildNode SuperFieldAccess NAME_PROPERTY
public boolean visit Super Method Invocation node AST Node qualifier get Child Node node Super Method Invocation QUALIFIER PROPERTY if qualifier null qualifier accept this this result append this result append super NON NLS 1 get Child Node node Super Method Invocation NAME PROPERTY accept this this result append visit List node Super Method Invocation ARGUMENTS PROPERTY String value Of this result append return false  SuperMethodInvocation ASTNode getChildNode SuperMethodInvocation QUALIFIER_PROPERTY getChildNode SuperMethodInvocation NAME_PROPERTY visitList SuperMethodInvocation ARGUMENTS_PROPERTY valueOf
public boolean visit Switch Case node AST Node expression get Child Node node Switch Case EXPRESSION PROPERTY if expression null this result append default NON NLS 1 else this result append case NON NLS 1 expression accept this this result append return false  SwitchCase ASTNode getChildNode SwitchCase EXPRESSION_PROPERTY
public boolean visit Switch Statement node this result append switch NON NLS 1 get Child Node node Switch Statement EXPRESSION PROPERTY accept this this result append this result append visit List node Switch Statement STATEMENTS PROPERTY null this result append return false  SwitchStatement getChildNode SwitchStatement EXPRESSION_PROPERTY visitList SwitchStatement STATEMENTS_PROPERTY
public boolean visit Synchronized Statement node this result append synchronized NON NLS 1 get Child Node node Synchronized Statement EXPRESSION PROPERTY accept this this result append get Child Node node Synchronized Statement BODY PROPERTY accept this return false  SynchronizedStatement getChildNode SynchronizedStatement EXPRESSION_PROPERTY getChildNode SynchronizedStatement BODY_PROPERTY
public boolean visit This Expression node AST Node qualifier get Child Node node This Expression QUALIFIER PROPERTY if qualifier null qualifier accept this this result append this result append this NON NLS 1 return false  ThisExpression ASTNode getChildNode ThisExpression QUALIFIER_PROPERTY
public boolean visit Throw Statement node this result append throw NON NLS 1 get Child Node node Throw Statement EXPRESSION PROPERTY accept this this result append return false  ThrowStatement getChildNode ThrowStatement EXPRESSION_PROPERTY
public boolean visit Try Statement node this result append try NON NLS 1 get Child Node node Try Statement BODY PROPERTY accept this this result append visit List node Try Statement CATCH CLAUSES PROPERTY null AST Node finally Clause get Child Node node Try Statement FINALLY PROPERTY if finally Clause null this result append finally NON NLS 1 finally Clause accept this return false  TryStatement getChildNode TryStatement BODY_PROPERTY visitList TryStatement CATCH_CLAUSES_PROPERTY ASTNode finallyClause getChildNode TryStatement FINALLY_PROPERTY finallyClause finallyClause
public boolean visit Type Declaration node AST Node javadoc get Child Node node Type Declaration JAVADOC PROPERTY if javadoc null javadoc accept this print Modifiers get Int Attribute node Type Declaration MODIFIERS PROPERTY this result boolean is Interface get Boolean Attribute node Type Declaration INTERFACE PROPERTY this result append is Interface interface class NON NLS 1 NON NLS 2 get Child Node node Type Declaration NAME PROPERTY accept this this result append AST Node superclass get Child Node node Type Declaration SUPERCLASS PROPERTY if superclass null this result append extends NON NLS 1 superclass accept this this result append String lead is Interface extends implements NON NLS 1 NON NLS 2 visit List node Type Declaration SUPER INTERFACES PROPERTY String value Of lead this result append visit List node Type Declaration BODY DECLARATIONS PROPERTY null this result append return false  TypeDeclaration ASTNode getChildNode TypeDeclaration JAVADOC_PROPERTY printModifiers getIntAttribute TypeDeclaration MODIFIERS_PROPERTY isInterface getBooleanAttribute TypeDeclaration INTERFACE_PROPERTY isInterface getChildNode TypeDeclaration NAME_PROPERTY ASTNode getChildNode TypeDeclaration SUPERCLASS_PROPERTY isInterface visitList TypeDeclaration SUPER_INTERFACES_PROPERTY valueOf visitList TypeDeclaration BODY_DECLARATIONS_PROPERTY
see AST Visitor visit Type Declaration Statement public boolean visit Type Declaration Statement node get Child Node node Type Declaration Statement TYPE DECLARATION PROPERTY accept this return false  ASTVisitor TypeDeclarationStatement TypeDeclarationStatement getChildNode TypeDeclarationStatement TYPE_DECLARATION_PROPERTY
public boolean visit Type Literal node get Child Node node Type Literal TYPE PROPERTY accept this this result append class NON NLS 1 return false  TypeLiteral getChildNode TypeLiteral TYPE_PROPERTY
public boolean visit Variable Declaration Expression node print Modifiers get Int Attribute node Variable Declaration Expression MODIFIERS PROPERTY this result get Child Node node Variable Declaration Expression TYPE PROPERTY accept this this result append visit List node Variable Declaration Expression FRAGMENTS PROPERTY String value Of return false  VariableDeclarationExpression printModifiers getIntAttribute VariableDeclarationExpression MODIFIERS_PROPERTY getChildNode VariableDeclarationExpression TYPE_PROPERTY visitList VariableDeclarationExpression FRAGMENTS_PROPERTY valueOf
public boolean visit Variable Declaration Fragment node get Child Node node Variable Declaration Fragment NAME PROPERTY accept this int extra Dimensions get Int Attribute node Variable Declaration Fragment EXTRA DIMENSIONS PROPERTY for int i 0 i extra Dimensions i this result append NON NLS 1 AST Node initializer get Child Node node Variable Declaration Fragment INITIALIZER PROPERTY if initializer null this result append initializer accept this return false  VariableDeclarationFragment getChildNode VariableDeclarationFragment NAME_PROPERTY extraDimensions getIntAttribute VariableDeclarationFragment EXTRA_DIMENSIONS_PROPERTY extraDimensions ASTNode getChildNode VariableDeclarationFragment INITIALIZER_PROPERTY
public boolean visit Variable Declaration Statement node print Modifiers get Int Attribute node Variable Declaration Statement MODIFIERS PROPERTY this result get Child Node node Variable Declaration Statement TYPE PROPERTY accept this this result append visit List node Variable Declaration Statement FRAGMENTS PROPERTY String value Of this result append return false  VariableDeclarationStatement printModifiers getIntAttribute VariableDeclarationStatement MODIFIERS_PROPERTY getChildNode VariableDeclarationStatement TYPE_PROPERTY visitList VariableDeclarationStatement FRAGMENTS_PROPERTY valueOf
public boolean visit While Statement node this result append while NON NLS 1 get Child Node node While Statement EXPRESSION PROPERTY accept this this result append get Child Node node While Statement BODY PROPERTY accept this return false  WhileStatement getChildNode WhileStatement EXPRESSION_PROPERTY getChildNode WhileStatement BODY_PROPERTY
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Block Comment public boolean visit Block Comment node return false cant flatten needs source  ASTVisitor BlockComment BlockComment
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Line Comment public boolean visit Line Comment node return false cant flatten needs source  ASTVisitor LineComment LineComment
public boolean visit Member Ref node AST Node qualifier get Child Node node Member Ref QUALIFIER PROPERTY if qualifier null qualifier accept this this result append get Child Node node Member Ref NAME PROPERTY accept this return false  MemberRef ASTNode getChildNode MemberRef QUALIFIER_PROPERTY getChildNode MemberRef NAME_PROPERTY
public boolean visit Method Ref node AST Node qualifier get Child Node node Method Ref QUALIFIER PROPERTY if qualifier null qualifier accept this this result append get Child Node node Method Ref NAME PROPERTY accept this this result append visit List node Method Ref PARAMETERS PROPERTY NON NLS 1 this result append return false  MethodRef ASTNode getChildNode MethodRef QUALIFIER_PROPERTY getChildNode MethodRef NAME_PROPERTY visitList MethodRef PARAMETERS_PROPERTY
public boolean visit Method Ref Parameter node get Child Node node Method Ref Parameter TYPE PROPERTY accept this AST Node name get Child Node node Method Ref Parameter NAME PROPERTY if name null this result append name accept this return false  MethodRefParameter getChildNode MethodRefParameter TYPE_PROPERTY ASTNode getChildNode MethodRefParameter NAME_PROPERTY
public boolean visit Tag Element node Object tag Name get Attribute node Tag Element TAG NAME PROPERTY if tag Name null this result append String tag Name List list get Child List node Tag Element FRAGMENTS PROPERTY for int i 0 i list size i if i 0 tag Name null this result append AST Node curr AST Node list get i if curr instanceof Tag Element this result append curr accept this this result append else curr accept this return false  TagElement tagName getAttribute TagElement TAG_NAME_PROPERTY tagName tagName getChildList TagElement FRAGMENTS_PROPERTY tagName ASTNode ASTNode TagElement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Text Element public boolean visit Text Element node this result append get Attribute node Text Element TEXT PROPERTY return false  ASTVisitor TextElement TextElement getAttribute TextElement TEXT_PROPERTY

private Array List positions public Extended Flattener Rewrite Event Store store super store this positions new Array List  ArrayList ExtendedFlattener RewriteEventStore ArrayList
public void pre Visit AST Node node Object track Data get Event Store get Tracked Node Data node if track Data null add Marker track Data this result length 0 Object placeholder Data get Placeholders get Placeholder Data node if placeholder Data null add Marker placeholder Data this result length 0  preVisit ASTNode trackData getEventStore getTrackedNodeData trackData addMarker trackData placeholderData getPlaceholders getPlaceholderData placeholderData addMarker placeholderData
public void post Visit AST Node node Object placeholder Data get Placeholders get Placeholder Data node if placeholder Data null fixup Length placeholder Data this result length Object track Data get Event Store get Tracked Node Data node if track Data null fixup Length track Data this result length  postVisit ASTNode placeholderData getPlaceholders getPlaceholderData placeholderData fixupLength placeholderData trackData getEventStore getTrackedNodeData trackData fixupLength trackData
public boolean visit Block node if get Placeholders is Collapsed node visit List node Block STATEMENTS PROPERTY null return false return super visit node  getPlaceholders isCollapsed visitList STATEMENTS_PROPERTY
private Node Marker add Marker Object annotation int start Offset int length Node Marker marker new Node Marker marker offset start Offset marker length length marker data annotation this positions add marker return marker  NodeMarker addMarker startOffset NodeMarker NodeMarker startOffset
private void fixup Length Object data int end Offset for int i this positions size 1 i 0 i Node Marker marker Node Marker this positions get i if marker data data marker length end Offset marker offset return  fixupLength endOffset NodeMarker NodeMarker endOffset
public Node Marker get Markers return Node Marker this positions to Array new Node Marker this positions size  NodeMarker getMarkers NodeMarker toArray NodeMarker
public AST Rewrite Formatter Node Info Store placeholders Rewrite Event Store event Store Map options String line Delimiter this placeholders placeholders this event Store event Store if options null options Java Core get Options options put Default Code Formatter Constants FORMATTER LINE SPLIT String value Of 9999 this options options this line Delimiter line Delimiter int tab Width Val try tab Width Val Integer parse Int String options get Default Code Formatter Constants FORMATTER TAB SIZE catch Number Format Exception e tab Width Val 4 this tab Width tab Width Val String indent String code x NON NLS 1 Text Edit edit format String Code Formatter K EXPRESSION code 1 options NON NLS 1 if edit null String str evaluate Formatter Edit code edit null indent str substring 0 str index Of code else indent String value Of t this single Indent String indent  ASTRewriteFormatter NodeInfoStore RewriteEventStore eventStore lineDelimiter eventStore eventStore JavaCore getOptions DefaultCodeFormatterConstants FORMATTER_LINE_SPLIT valueOf lineDelimiter lineDelimiter tabWidthVal tabWidthVal parseInt DefaultCodeFormatterConstants FORMATTER_TAB_SIZE NumberFormatException tabWidthVal tabWidth tabWidthVal TextEdit formatString CodeFormatter K_EXPRESSION evaluateFormatterEdit indexOf valueOf singleIndentString
public int get Tab Width return this tab Width  getTabWidth tabWidth
public Node Info Store get Placeholders return this placeholders  NodeInfoStore getPlaceholders
public Rewrite Event Store get Event Store return this event Store  RewriteEventStore getEventStore eventStore
public Map get Options return this options  getOptions
Returns the string accumulated in the visit formatted using the default formatter Updates the existing node s positions param node The node to flatten param initial Indentation Level The initial indentation level param resulting Markers Resulting the updated Node Markers return Returns the serialized and formatted code public String get Formatted Result AST Node node int initial Indentation Level Collection resulting Markers Extended Flattener flattener new Extended Flattener this event Store node accept flattener Node Marker markers flattener get Markers for int i 0 i markers length i resulting Markers add markers i add to result String unformatted flattener get Result Text Edit edit format Node node unformatted initial Indentation Level this line Delimiter this options if edit null if initial Indentation Level 0 at least correct the indent String indent String create Indent String initial Indentation Level Replace Edit edits Indents get Change Indent Edits unformatted 0 this tab Width indent String edit new Multi Text Edit edit add Child new Insert Edit 0 indent String edit add Children edits else return unformatted return evaluate Formatter Edit unformatted edit markers  initialIndentationLevel resultingMarkers NodeMarkers getFormattedResult ASTNode initialIndentationLevel resultingMarkers ExtendedFlattener ExtendedFlattener eventStore NodeMarker getMarkers resultingMarkers getResult TextEdit formatNode initialIndentationLevel lineDelimiter initialIndentationLevel indentString createIndentString initialIndentationLevel ReplaceEdit getChangeIndentEdits tabWidth indentString MultiTextEdit addChild InsertEdit indentString addChildren evaluateFormatterEdit
Creates a string that represents the given number of indents can be spaces or tabs param indent return public String create Indent String int indent String Buffer buf new String Buffer indent this single Indent String length for int i 0 i indent i buf append this single Indent String return buf to String  createIndentString StringBuffer StringBuffer singleIndentString singleIndentString toString
Evaluates the edit on the given string param string The string to format param edit The edit resulted from the code formatter param positions Positions to update or code null code return The formatted string throws Illegal Argument Exception If the positions are not inside the string a Illegal Argument Exception is thrown public static String evaluate Formatter Edit String string Text Edit edit Position positions try Document doc create Document string positions edit apply doc 0 if positions null for int i 0 i positions length i Assert is True positions i is Deleted Position got deleted NON NLS 1 return doc get catch Bad Location Exception e Java Plugin log e bug in the formatter Assert is True false Fromatter created edits with wrong positions e get Message NON NLS 1 return null  IllegalArgumentException IllegalArgumentException evaluateFormatterEdit TextEdit createDocument isTrue isDeleted BadLocationException JavaPlugin isTrue getMessage
public static Text Edit format String int kind String string int indentation Level String line Separator Map options return Tool Factory create Code Formatter options format kind string 0 string length indentation Level line Separator  TextEdit formatString indentationLevel lineSeparator ToolFactory createCodeFormatter indentationLevel lineSeparator
Creates edits that describe how to format the given string Returns code null code if the code could not be formatted for the given kind param node Node describing the type of the string param str The unformatted string param indentation Level param line Separator param options return Returns the edit representing the result of the formatter throws Illegal Argument Exception If the offset and length are not inside the string a Illegal Argument Exception is thrown private static Text Edit format Node AST Node node String str int indentation Level String line Separator Map options int code String prefix NON NLS 1 String suffix NON NLS 1 if node instanceof Statement code Code Formatter K STATEMENTS if node get Node Type AST Node SWITCH CASE prefix switch 1 NON NLS 1 suffix NON NLS 1 code Code Formatter K STATEMENTS else if node instanceof Expression node get Node Type AST Node VARIABLE DECLARATION EXPRESSION code Code Formatter K EXPRESSION else switch node get Node Type case AST Node METHOD DECLARATION case AST Node TYPE DECLARATION case AST Node FIELD DECLARATION case AST Node INITIALIZER code Code Formatter K CLASS BODY DECLARATIONS break case AST Node ARRAY TYPE case AST Node PRIMITIVE TYPE case AST Node SIMPLE TYPE suffix x NON NLS 1 code Code Formatter K EXPRESSION break case AST Node COMPILATION UNIT code Code Formatter K COMPILATION UNIT break case AST Node VARIABLE DECLARATION EXPRESSION case AST Node SINGLE VARIABLE DECLARATION suffix NON NLS 1 code Code Formatter K STATEMENTS break case AST Node VARIABLE DECLARATION FRAGMENT prefix A NON NLS 1 suffix NON NLS 1 code Code Formatter K STATEMENTS break case AST Node PACKAGE DECLARATION case AST Node IMPORT DECLARATION suffix nclass A NON NLS 1 code Code Formatter K COMPILATION UNIT break case AST Node JAVADOC suffix void foo NON NLS 1 code Code Formatter K CLASS BODY DECLARATIONS break case AST Node CATCH CLAUSE prefix try NON NLS 1 code Code Formatter K STATEMENTS break case AST Node ANONYMOUS CLASS DECLARATION prefix new A NON NLS 1 suffix NON NLS 1 code Code Formatter K STATEMENTS break case AST Node MEMBER REF case AST Node METHOD REF case AST Node METHOD REF PARAMETER case AST Node TAG ELEMENT case AST Node TEXT ELEMENT not supported return null default Assert is True false Node type not covered node get Class get Name NON NLS 1 return null String concat Str prefix str suffix Text Edit edit Tool Factory create Code Formatter options format code concat Str prefix length str length indentation Level line Separator if prefix length 0 edit shif Edit edit prefix length return edit  indentationLevel lineSeparator IllegalArgumentException IllegalArgumentException TextEdit formatNode ASTNode indentationLevel lineSeparator CodeFormatter K_STATEMENTS getNodeType ASTNode SWITCH_CASE CodeFormatter K_STATEMENTS getNodeType ASTNode VARIABLE_DECLARATION_EXPRESSION CodeFormatter K_EXPRESSION getNodeType ASTNode METHOD_DECLARATION ASTNode TYPE_DECLARATION ASTNode FIELD_DECLARATION ASTNode CodeFormatter K_CLASS_BODY_DECLARATIONS ASTNode ARRAY_TYPE ASTNode PRIMITIVE_TYPE ASTNode SIMPLE_TYPE CodeFormatter K_EXPRESSION ASTNode COMPILATION_UNIT CodeFormatter K_COMPILATION_UNIT ASTNode VARIABLE_DECLARATION_EXPRESSION ASTNode SINGLE_VARIABLE_DECLARATION CodeFormatter K_STATEMENTS ASTNode VARIABLE_DECLARATION_FRAGMENT CodeFormatter K_STATEMENTS ASTNode PACKAGE_DECLARATION ASTNode IMPORT_DECLARATION CodeFormatter K_COMPILATION_UNIT ASTNode CodeFormatter K_CLASS_BODY_DECLARATIONS ASTNode CATCH_CLAUSE CodeFormatter K_STATEMENTS ASTNode ANONYMOUS_CLASS_DECLARATION CodeFormatter K_STATEMENTS ASTNode MEMBER_REF ASTNode METHOD_REF ASTNode METHOD_REF_PARAMETER ASTNode TAG_ELEMENT ASTNode TEXT_ELEMENT isTrue getClass getName concatStr TextEdit ToolFactory createCodeFormatter concatStr indentationLevel lineSeparator shifEdit
private static Text Edit shif Edit Text Edit old Edit int diff Text Edit new Edit if old Edit instanceof Replace Edit Replace Edit edit Replace Edit old Edit new Edit new Replace Edit edit get Offset diff edit get Length edit get Text else if old Edit instanceof Insert Edit Insert Edit edit Insert Edit old Edit new Edit new Insert Edit edit get Offset diff edit get Text else if old Edit instanceof Delete Edit Delete Edit edit Delete Edit old Edit new Edit new Delete Edit edit get Offset diff edit get Length else if old Edit instanceof Multi Text Edit new Edit new Multi Text Edit else return null not supported Text Edit children old Edit get Children for int i 0 i children length i Text Edit shifted shif Edit children i diff if shifted null new Edit add Child shifted return new Edit  TextEdit shifEdit TextEdit oldEdit TextEdit newEdit oldEdit ReplaceEdit ReplaceEdit ReplaceEdit oldEdit newEdit ReplaceEdit getOffset getLength getText oldEdit InsertEdit InsertEdit InsertEdit oldEdit newEdit InsertEdit getOffset getText oldEdit DeleteEdit DeleteEdit DeleteEdit oldEdit newEdit DeleteEdit getOffset getLength oldEdit MultiTextEdit newEdit MultiTextEdit TextEdit oldEdit getChildren TextEdit shifEdit newEdit addChild newEdit
doc add Position Updater new Default Position Updater POS CATEGORY protected boolean not Deleted int start this f Offset int end start this f Length if start this f Position offset this f Position offset this f Position length end this f Position offset end deleted positions set to end of remove return false return true  addPositionUpdater DefaultPositionUpdater POS_CATEGORY notDeleted fOffset fLength fPosition fPosition fPosition fPosition
private static Document create Document String string Position positions throws Illegal Argument Exception Document doc new Document string try if positions null final String POS CATEGORY my Category NON NLS 1 doc add Position Category POS CATEGORY doc add Position Updater new Default Position Updater POS CATEGORY protected boolean not Deleted int start this f Offset int end start this f Length if start this f Position offset this f Position offset this f Position length end this f Position offset end deleted positions set to end of remove return false return true for int i 0 i positions length i try doc add Position POS CATEGORY positions i catch Bad Location Exception e throw new Illegal Argument Exception Position outside of string offset positions i offset length positions i length string size string length NON NLS 1 NON NLS 2 NON NLS 3 catch Bad Position Category Exception cannot Happen can not happen category is correctly set up return doc  createDocument IllegalArgumentException POS_CATEGORY myCategory addPositionCategory POS_CATEGORY addPositionUpdater DefaultPositionUpdater POS_CATEGORY notDeleted fOffset fLength fPosition fPosition fPosition fPosition addPosition POS_CATEGORY BadLocationException IllegalArgumentException BadPositionCategoryException cannotHappen
public static interface Prefix String get Prefix int indent String line Delim  getPrefix lineDelim
public static interface Block Context String get Prefix And Suffix int indent String line Delim AST Node node Rewrite Event Store events  BlockContext getPrefixAndSuffix lineDelim ASTNode RewriteEventStore
private String prefix public Const Prefix String prefix this prefix prefix  ConstPrefix
public String get Prefix int indent String line Delim return this prefix  getPrefix lineDelim
public Formatting Prefix String string String sub int kind this start string index Of sub this length sub length this string string this kind kind  FormattingPrefix indexOf
public String get Prefix int indent String line Delim Position pos new Position this start this length String str this string Text Edit res format String this kind str indent line Delim get Options if res null str evaluate Formatter Edit str res new Position pos return str substring pos offset 1 pos offset pos length 1  getPrefix lineDelim TextEdit formatString lineDelim getOptions evaluateFormatterEdit
private int start public Block Formatting Prefix String prefix int start this start start this prefix prefix  BlockFormattingPrefix
public String get Prefix And Suffix int indent String line Delim AST Node node Rewrite Event Store events String node String AST Rewrite Flattener as String node events String str this prefix node String Position pos new Position this start this prefix length 1 this start Text Edit res format String Code Formatter K STATEMENTS str indent line Delim get Options if res null str evaluate Formatter Edit str res new Position pos return new String str substring pos offset 1 pos offset pos length 1 NON NLS 1  getPrefixAndSuffix lineDelim ASTNode RewriteEventStore nodeString ASTRewriteFlattener asString nodeString TextEdit formatString CodeFormatter K_STATEMENTS lineDelim getOptions evaluateFormatterEdit
public Block Formatting Prefix Suffix String prefix String suffix int start this start start this suffix suffix this prefix prefix  BlockFormattingPrefixSuffix
public String get Prefix And Suffix int indent String line Delim AST Node node Rewrite Event Store events String node String AST Rewrite Flattener as String node events int node Start this prefix length int node End node Start node String length 1 String str this prefix node String this suffix Position pos1 new Position this start node Start 1 this start Position pos2 new Position node End 2 Text Edit res format String Code Formatter K STATEMENTS str indent line Delim get Options if res null str evaluate Formatter Edit str res new Position pos1 pos2 return new String str substring pos1 offset 1 pos1 offset pos1 length 1 str substring pos2 offset 1 pos2 offset pos2 length 1  getPrefixAndSuffix lineDelim ASTNode RewriteEventStore nodeString ASTRewriteFlattener asString nodeStart nodeEnd nodeStart nodeString nodeString nodeStart nodeEnd TextEdit formatString CodeFormatter K_STATEMENTS lineDelim getOptions evaluateFormatterEdit

Hooks for subclasses protected boolean visit Node AST Node node return true  visitNode ASTNode
protected void end Visit Node AST Node node do nothing  endVisitNode ASTNode
public boolean visit Anonymous Class Declaration node return visit Node node  AnonymousClassDeclaration visitNode
return visit Node node public boolean visit Array Access node return visit Node node  visitNode ArrayAccess visitNode
return visit Node node public boolean visit Array Creation node return visit Node node  visitNode ArrayCreation visitNode
return visit Node node public boolean visit Array Initializer node return visit Node node  visitNode ArrayInitializer visitNode
return visit Node node public boolean visit Array Type node return visit Node node  visitNode ArrayType visitNode
return visit Node node public boolean visit Assert Statement node return visit Node node  visitNode AssertStatement visitNode
return visit Node node public boolean visit Assignment node return visit Node node  visitNode visitNode
return visit Node node public boolean visit Block node return visit Node node  visitNode visitNode
return visit Node node public boolean visit Boolean Literal node return visit Node node  visitNode BooleanLiteral visitNode
return visit Node node public boolean visit Break Statement node return visit Node node  visitNode BreakStatement visitNode
return visit Node node public boolean visit Cast Expression node return visit Node node  visitNode CastExpression visitNode
return visit Node node public boolean visit Catch Clause node return visit Node node  visitNode CatchClause visitNode
return visit Node node public boolean visit Character Literal node return visit Node node  visitNode CharacterLiteral visitNode
return visit Node node public boolean visit Class Instance Creation node return visit Node node  visitNode ClassInstanceCreation visitNode
return visit Node node public boolean visit Compilation Unit node return visit Node node  visitNode CompilationUnit visitNode
return visit Node node public boolean visit Conditional Expression node return visit Node node  visitNode ConditionalExpression visitNode
return visit Node node public boolean visit Constructor Invocation node return visit Node node  visitNode ConstructorInvocation visitNode
return visit Node node public boolean visit Continue Statement node return visit Node node  visitNode ContinueStatement visitNode
return visit Node node public boolean visit Do Statement node return visit Node node  visitNode DoStatement visitNode
return visit Node node public boolean visit Empty Statement node return visit Node node  visitNode EmptyStatement visitNode
return visit Node node public boolean visit Expression Statement node return visit Node node  visitNode ExpressionStatement visitNode
return visit Node node public boolean visit Field Access node return visit Node node  visitNode FieldAccess visitNode
return visit Node node public boolean visit Field Declaration node return visit Node node  visitNode FieldDeclaration visitNode
return visit Node node public boolean visit For Statement node return visit Node node  visitNode ForStatement visitNode
return visit Node node public boolean visit If Statement node return visit Node node  visitNode IfStatement visitNode
return visit Node node public boolean visit Import Declaration node return visit Node node  visitNode ImportDeclaration visitNode
return visit Node node public boolean visit Infix Expression node return visit Node node  visitNode InfixExpression visitNode
return visit Node node public boolean visit Instanceof Expression node return visit Node node  visitNode InstanceofExpression visitNode
return visit Node node public boolean visit Initializer node return visit Node node  visitNode visitNode
return visit Node node public boolean visit Javadoc node return visit Node node  visitNode visitNode
return visit Node node public boolean visit Labeled Statement node return visit Node node  visitNode LabeledStatement visitNode
return visit Node node public boolean visit Method Declaration node return visit Node node  visitNode MethodDeclaration visitNode
return visit Node node public boolean visit Method Invocation node return visit Node node  visitNode MethodInvocation visitNode
return visit Node node public boolean visit Null Literal node return visit Node node  visitNode NullLiteral visitNode
return visit Node node public boolean visit Number Literal node return visit Node node  visitNode NumberLiteral visitNode
return visit Node node public boolean visit Package Declaration node return visit Node node  visitNode PackageDeclaration visitNode
return visit Node node public boolean visit Parenthesized Expression node return visit Node node  visitNode ParenthesizedExpression visitNode
return visit Node node public boolean visit Postfix Expression node return visit Node node  visitNode PostfixExpression visitNode
return visit Node node public boolean visit Prefix Expression node return visit Node node  visitNode PrefixExpression visitNode
return visit Node node public boolean visit Primitive Type node return visit Node node  visitNode PrimitiveType visitNode
return visit Node node public boolean visit Qualified Name node return visit Node node  visitNode QualifiedName visitNode
return visit Node node public boolean visit Return Statement node return visit Node node  visitNode ReturnStatement visitNode
return visit Node node public boolean visit Simple Name node return visit Node node  visitNode SimpleName visitNode
return visit Node node public boolean visit Simple Type node return visit Node node  visitNode SimpleType visitNode
return visit Node node public boolean visit String Literal node return visit Node node  visitNode StringLiteral visitNode
return visit Node node public boolean visit Super Constructor Invocation node return visit Node node  visitNode SuperConstructorInvocation visitNode
return visit Node node public boolean visit Super Field Access node return visit Node node  visitNode SuperFieldAccess visitNode
return visit Node node public boolean visit Super Method Invocation node return visit Node node  visitNode SuperMethodInvocation visitNode
return visit Node node public boolean visit Switch Case node return visit Node node  visitNode SwitchCase visitNode
return visit Node node public boolean visit Switch Statement node return visit Node node  visitNode SwitchStatement visitNode
return visit Node node public boolean visit Synchronized Statement node return visit Node node  visitNode SynchronizedStatement visitNode
return visit Node node public boolean visit This Expression node return visit Node node  visitNode ThisExpression visitNode
return visit Node node public boolean visit Throw Statement node return visit Node node  visitNode ThrowStatement visitNode
return visit Node node public boolean visit Try Statement node return visit Node node  visitNode TryStatement visitNode
return visit Node node public boolean visit Type Declaration node return visit Node node  visitNode TypeDeclaration visitNode
return visit Node node public boolean visit Type Declaration Statement node return visit Node node  visitNode TypeDeclarationStatement visitNode
return visit Node node public boolean visit Type Literal node return visit Node node  visitNode TypeLiteral visitNode
return visit Node node public boolean visit Single Variable Declaration node return visit Node node  visitNode SingleVariableDeclaration visitNode
return visit Node node public boolean visit Variable Declaration Expression node return visit Node node  visitNode VariableDeclarationExpression visitNode
return visit Node node public boolean visit Variable Declaration Statement node return visit Node node  visitNode VariableDeclarationStatement visitNode
return visit Node node public boolean visit Variable Declaration Fragment node return visit Node node  visitNode VariableDeclarationFragment visitNode
return visit Node node public boolean visit While Statement node return visit Node node  visitNode WhileStatement visitNode
public void end Visit Anonymous Class Declaration node end Visit Node node  endVisit AnonymousClassDeclaration endVisitNode
end Visit Node node public void end Visit Array Access node end Visit Node node  endVisitNode endVisit ArrayAccess endVisitNode
end Visit Node node public void end Visit Array Creation node end Visit Node node  endVisitNode endVisit ArrayCreation endVisitNode
end Visit Node node public void end Visit Array Initializer node end Visit Node node  endVisitNode endVisit ArrayInitializer endVisitNode
end Visit Node node public void end Visit Array Type node end Visit Node node  endVisitNode endVisit ArrayType endVisitNode
end Visit Node node public void end Visit Assert Statement node end Visit Node node  endVisitNode endVisit AssertStatement endVisitNode
end Visit Node node public void end Visit Assignment node end Visit Node node  endVisitNode endVisit endVisitNode
end Visit Node node public void end Visit Block node end Visit Node node  endVisitNode endVisit endVisitNode
end Visit Node node public void end Visit Boolean Literal node end Visit Node node  endVisitNode endVisit BooleanLiteral endVisitNode
end Visit Node node public void end Visit Break Statement node end Visit Node node  endVisitNode endVisit BreakStatement endVisitNode
end Visit Node node public void end Visit Cast Expression node end Visit Node node  endVisitNode endVisit CastExpression endVisitNode
end Visit Node node public void end Visit Catch Clause node end Visit Node node  endVisitNode endVisit CatchClause endVisitNode
end Visit Node node public void end Visit Character Literal node end Visit Node node  endVisitNode endVisit CharacterLiteral endVisitNode
end Visit Node node public void end Visit Class Instance Creation node end Visit Node node  endVisitNode endVisit ClassInstanceCreation endVisitNode
end Visit Node node public void end Visit Compilation Unit node end Visit Node node  endVisitNode endVisit CompilationUnit endVisitNode
end Visit Node node public void end Visit Conditional Expression node end Visit Node node  endVisitNode endVisit ConditionalExpression endVisitNode
end Visit Node node public void end Visit Constructor Invocation node end Visit Node node  endVisitNode endVisit ConstructorInvocation endVisitNode
end Visit Node node public void end Visit Continue Statement node end Visit Node node  endVisitNode endVisit ContinueStatement endVisitNode
end Visit Node node public void end Visit Do Statement node end Visit Node node  endVisitNode endVisit DoStatement endVisitNode
end Visit Node node public void end Visit Empty Statement node end Visit Node node  endVisitNode endVisit EmptyStatement endVisitNode
end Visit Node node public void end Visit Expression Statement node end Visit Node node  endVisitNode endVisit ExpressionStatement endVisitNode
end Visit Node node public void end Visit Field Access node end Visit Node node  endVisitNode endVisit FieldAccess endVisitNode
end Visit Node node public void end Visit Field Declaration node end Visit Node node  endVisitNode endVisit FieldDeclaration endVisitNode
end Visit Node node public void end Visit For Statement node end Visit Node node  endVisitNode endVisit ForStatement endVisitNode
end Visit Node node public void end Visit If Statement node end Visit Node node  endVisitNode endVisit IfStatement endVisitNode
end Visit Node node public void end Visit Import Declaration node end Visit Node node  endVisitNode endVisit ImportDeclaration endVisitNode
end Visit Node node public void end Visit Infix Expression node end Visit Node node  endVisitNode endVisit InfixExpression endVisitNode
end Visit Node node public void end Visit Instanceof Expression node end Visit Node node  endVisitNode endVisit InstanceofExpression endVisitNode
end Visit Node node public void end Visit Initializer node end Visit Node node  endVisitNode endVisit endVisitNode
end Visit Node node public void end Visit Javadoc node end Visit Node node  endVisitNode endVisit endVisitNode
end Visit Node node public void end Visit Labeled Statement node end Visit Node node  endVisitNode endVisit LabeledStatement endVisitNode
end Visit Node node public void end Visit Method Declaration node end Visit Node node  endVisitNode endVisit MethodDeclaration endVisitNode
end Visit Node node public void end Visit Method Invocation node end Visit Node node  endVisitNode endVisit MethodInvocation endVisitNode
end Visit Node node public void end Visit Null Literal node end Visit Node node  endVisitNode endVisit NullLiteral endVisitNode
end Visit Node node public void end Visit Number Literal node end Visit Node node  endVisitNode endVisit NumberLiteral endVisitNode
end Visit Node node public void end Visit Package Declaration node end Visit Node node  endVisitNode endVisit PackageDeclaration endVisitNode
end Visit Node node public void end Visit Parenthesized Expression node end Visit Node node  endVisitNode endVisit ParenthesizedExpression endVisitNode
end Visit Node node public void end Visit Postfix Expression node end Visit Node node  endVisitNode endVisit PostfixExpression endVisitNode
end Visit Node node public void end Visit Prefix Expression node end Visit Node node  endVisitNode endVisit PrefixExpression endVisitNode
end Visit Node node public void end Visit Primitive Type node end Visit Node node  endVisitNode endVisit PrimitiveType endVisitNode
end Visit Node node public void end Visit Qualified Name node end Visit Node node  endVisitNode endVisit QualifiedName endVisitNode
end Visit Node node public void end Visit Return Statement node end Visit Node node  endVisitNode endVisit ReturnStatement endVisitNode
end Visit Node node public void end Visit Simple Name node end Visit Node node  endVisitNode endVisit SimpleName endVisitNode
end Visit Node node public void end Visit Simple Type node end Visit Node node  endVisitNode endVisit SimpleType endVisitNode
end Visit Node node public void end Visit String Literal node end Visit Node node  endVisitNode endVisit StringLiteral endVisitNode
end Visit Node node public void end Visit Super Constructor Invocation node end Visit Node node  endVisitNode endVisit SuperConstructorInvocation endVisitNode
end Visit Node node public void end Visit Super Field Access node end Visit Node node  endVisitNode endVisit SuperFieldAccess endVisitNode
end Visit Node node public void end Visit Super Method Invocation node end Visit Node node  endVisitNode endVisit SuperMethodInvocation endVisitNode
end Visit Node node public void end Visit Switch Case node end Visit Node node  endVisitNode endVisit SwitchCase endVisitNode
end Visit Node node public void end Visit Switch Statement node end Visit Node node  endVisitNode endVisit SwitchStatement endVisitNode
end Visit Node node public void end Visit Synchronized Statement node end Visit Node node  endVisitNode endVisit SynchronizedStatement endVisitNode
end Visit Node node public void end Visit This Expression node end Visit Node node  endVisitNode endVisit ThisExpression endVisitNode
end Visit Node node public void end Visit Throw Statement node end Visit Node node  endVisitNode endVisit ThrowStatement endVisitNode
end Visit Node node public void end Visit Try Statement node end Visit Node node  endVisitNode endVisit TryStatement endVisitNode
end Visit Node node public void end Visit Type Declaration node end Visit Node node  endVisitNode endVisit TypeDeclaration endVisitNode
end Visit Node node public void end Visit Type Declaration Statement node end Visit Node node  endVisitNode endVisit TypeDeclarationStatement endVisitNode
end Visit Node node public void end Visit Type Literal node end Visit Node node  endVisitNode endVisit TypeLiteral endVisitNode
end Visit Node node public void end Visit Single Variable Declaration node end Visit Node node  endVisitNode endVisit SingleVariableDeclaration endVisitNode
end Visit Node node public void end Visit Variable Declaration Expression node end Visit Node node  endVisitNode endVisit VariableDeclarationExpression endVisitNode
end Visit Node node public void end Visit Variable Declaration Statement node end Visit Node node  endVisitNode endVisit VariableDeclarationStatement endVisitNode
end Visit Node node public void end Visit Variable Declaration Fragment node end Visit Node node  endVisitNode endVisit VariableDeclarationFragment endVisitNode
end Visit Node node public void end Visit While Statement node end Visit Node node  endVisitNode endVisit WhileStatement endVisitNode

public class Indents private Indents don t instanciate 
Indent char is a space char but not a line delimiters code Character is Whitespace ch ch n ch r code param ch return public static boolean is Indent Char char ch return Character is Whitespace ch is Line Delimiter Char ch  isWhitespace isIndentChar isWhitespace isLineDelimiterChar
Line delimiter chars are n and r param ch The character to test return Returns true if this the character is a line delimiter character public static boolean is Line Delimiter Char char ch return ch n ch r  isLineDelimiterChar
Returns the indent of the given string param line the text line param tab Width the width of the t character return Returns the indent of the given string public static int compute Indent String line int tab Width int result 0 int blanks 0 int size line length for int i 0 i size i char c line char At i if c t result blanks 0 else if is Indent Char c blanks if blanks tab Width result blanks 0 else return result return result  tabWidth computeIndent tabWidth charAt isIndentChar tabWidth
Removes the given number of idents from the line Asserts that the given line has the requested number of indents If code indents To Remove 0 code the line is returned param line The line to trim the indent param indents To Remove The indent level to remove param tab Width The current tab width return public static String trim Indent String line int indents To Remove int tab Width if line null indents To Remove 0 return line int start 0 int indents 0 int blanks 0 int size line length for int i 0 i size i char c line char At i if c t indents blanks 0 else if is Indent Char c blanks if blanks tab Width indents blanks 0 else Assert is True false Line does not have requested number of indents NON NLS 1 start i break if indents indents To Remove start i 1 break if start size return NON NLS 1 else return line substring start  indentsToRemove indentsToRemove tabWidth trimIndent indentsToRemove tabWidth indentsToRemove charAt isIndentChar tabWidth isTrue indentsToRemove
public static String get Indent String String line int tab Width int size line length int end 0 int blanks 0 for int i 0 i size i char c line char At i if c t end i 1 blanks 0 else if is Indent Char c blanks if blanks tab Width end i 1 blanks 0 else break if end 0 return NON NLS 1 else if end size return line else return line substring 0 end  getIndentString tabWidth charAt isIndentChar tabWidth
Returns the length of the string representing the number of indents in the given string code line code Returns code 1 code if the line isn t prefixed with an indent of the given number of indents param line param number Of Indents param tab Width return Returns the length of the string representing the number of indents public static int compute Indent Length String line int number Of Indents int tab Width Assert is True number Of Indents 0 Assert is True tab Width 0 int size line length int result 1 int indents 0 int blanks 0 for int i 0 i size indents number Of Indents i char c line char At i if c t indents result i blanks 0 else if is Indent Char c blanks if blanks tab Width result i indents blanks 0 else break if indents number Of Indents return 1 return result 1  numberOfIndents tabWidth computeIndentLength numberOfIndents tabWidth isTrue numberOfIndents isTrue tabWidth numberOfIndents charAt isIndentChar tabWidth numberOfIndents
Change the indent of possible muti line code range The current indent is removed a new indent added The first line of the code will not be changed It is considered to have no indent as it might start in the middle of a line param code The code to change the indent of param code Indent Level The indent level of the code param tab Width The current tab width setting param new Indent The new Indent string param line Delim T He current line delimiter return public static String change Indent String code int code Indent Level int tab Width String new Indent String line Delim try I Line Tracker tracker new Default Line Tracker tracker set code int n Lines tracker get Number Of Lines if n Lines 1 return code String Buffer buf new String Buffer for int i 0 i n Lines i I Region region tracker get Line Information i int start region get Offset int end start region get Length String line code substring start end if i 0 no indent for first line contained in the formatted string buf append line else no new line after last line buf append line Delim buf append new Indent buf append trim Indent line code Indent Level tab Width return buf to String catch Bad Location Exception e can not happen return code  codeIndentLevel tabWidth newIndent lineDelim THe changeIndent codeIndentLevel tabWidth newIndent lineDelim ILineTracker DefaultLineTracker nLines getNumberOfLines nLines StringBuffer StringBuffer nLines IRegion getLineInformation getOffset getLength lineDelim newIndent trimIndent codeIndentLevel tabWidth toString BadLocationException
Change the indent of possible muti line code range The current indent is removed a new indent added The first line of the code will not be changed It is considered to have no indent as it might start in the middle of a line param source The code to change the indent of param source Indent Level The indent level of the code param tab Width The current tab width setting param new Indent The new Indent string return Returns the resulting text edits public static Replace Edit get Change Indent Edits String source int source Indent Level int tab Width String new Indent Array List result new Array List try I Line Tracker tracker new Default Line Tracker tracker set source int n Lines tracker get Number Of Lines if n Lines 1 return Replace Edit result to Array new Replace Edit result size for int i 1 i n Lines i I Region region tracker get Line Information i int offset region get Offset String line source substring offset offset region get Length int length Indents compute Indent Length line source Indent Level tab Width if length 0 result add new Replace Edit offset length new Indent else length Indents compute Indent line tab Width result add new Replace Edit offset length NON NLS 1 catch Bad Location Exception cannot Happen can not happen return Replace Edit result to Array new Replace Edit result size  sourceIndentLevel tabWidth newIndent ReplaceEdit getChangeIndentEdits sourceIndentLevel tabWidth newIndent ArrayList ArrayList ILineTracker DefaultLineTracker nLines getNumberOfLines nLines ReplaceEdit toArray ReplaceEdit nLines IRegion getLineInformation getOffset getLength computeIndentLength sourceIndentLevel tabWidth ReplaceEdit newIndent computeIndent tabWidth ReplaceEdit BadLocationException cannotHappen ReplaceEdit toArray ReplaceEdit

Creates a List Rewrite Event from the original AST Nodes The resulting event represents the unmodified list param original Nodes The original nodes type AST Node public List Rewrite Event List original Nodes this original Nodes new Array List original Nodes  ListRewriteEvent ASTNodes originalNodes ASTNode ListRewriteEvent originalNodes originalNodes ArrayList originalNodes
Creates a List Rewrite Event from existing rewrite events param children The rewrite events for this list public List Rewrite Event Rewrite Event children this list Entries new Array List children length 2 this original Nodes new Array List children length 2 for int i 0 i children length i Rewrite Event curr children i this list Entries add curr if curr get Original Value null this original Nodes add curr get Original Value  ListRewriteEvent ListRewriteEvent RewriteEvent listEntries ArrayList originalNodes ArrayList RewriteEvent listEntries getOriginalValue originalNodes getOriginalValue
private List get Entries if this list Entries null create if not yet existing int n Nodes this original Nodes size this list Entries new Array List n Nodes 2 for int i 0 i n Nodes i AST Node node AST Node this original Nodes get i all nodes unchanged this list Entries add new Node Rewrite Event node node return this list Entries  getEntries listEntries nNodes originalNodes listEntries ArrayList nNodes nNodes ASTNode ASTNode originalNodes listEntries NodeRewriteEvent listEntries
public int get Change Kind if this list Entries null for int i 0 i this list Entries size i Rewrite Event curr Rewrite Event this list Entries get i if curr get Change Kind UNCHANGED return CHILDREN CHANGED return UNCHANGED  getChangeKind listEntries listEntries RewriteEvent RewriteEvent listEntries getChangeKind CHILDREN_CHANGED
see org eclipse jdt internal corext dom AST Rewrite Change is List Change public boolean is List Rewrite return true  ASTRewriteChange isListChange isListRewrite
see org eclipse jdt internal corext dom Rewrite Event get Children public Rewrite Event get Children List entries get Entries return Rewrite Event entries to Array new Rewrite Event entries size  RewriteEvent getChildren RewriteEvent getChildren getEntries RewriteEvent toArray RewriteEvent
see org eclipse jdt internal corext dom Rewrite Event get Original Node public Object get Original Value return this original Nodes  RewriteEvent getOriginalNode getOriginalValue originalNodes
public Object get New Value List entries get Entries Array List res new Array List entries size for int i 0 i entries size i Rewrite Event curr Rewrite Event entries get i Object new Val curr get New Value if new Val null res add new Val return res  getNewValue getEntries ArrayList ArrayList RewriteEvent RewriteEvent newVal getNewValue newVal newVal
API to modify the list nodes public Rewrite Event remove Entry AST Node original Entry return replace Entry original Entry null  RewriteEvent removeEntry ASTNode originalEntry replaceEntry originalEntry
public Rewrite Event replace Entry AST Node original Entry AST Node new Entry if original Entry null throw new Illegal Argument Exception List entries get Entries int n Entries entries size for int i 0 i n Entries i Node Rewrite Event curr Node Rewrite Event entries get i if curr get Original Value original Entry curr set New Value new Entry return curr return null  RewriteEvent replaceEntry ASTNode originalEntry ASTNode newEntry originalEntry IllegalArgumentException getEntries nEntries nEntries NodeRewriteEvent NodeRewriteEvent getOriginalValue originalEntry setNewValue newEntry
public void revert Change Node Rewrite Event event Object original Value event get Original Value if original Value null List entries get Entries entries remove event else event set New Value original Value  revertChange NodeRewriteEvent originalValue getOriginalValue originalValue getEntries setNewValue originalValue
public int get Index AST Node node int kind List entries get Entries for int i entries size 1 i 0 i Rewrite Event curr Rewrite Event entries get i if kind OLD 0 curr get Original Value node return i if kind NEW 0 curr get New Value node return i return 1  getIndex ASTNode getEntries RewriteEvent RewriteEvent getOriginalValue getNewValue
public Rewrite Event insert AST Node inserted Node int insert Index Node Rewrite Event change new Node Rewrite Event null inserted Node if insert Index 1 get Entries add insert Index change else get Entries add change return change  RewriteEvent ASTNode insertedNode insertIndex NodeRewriteEvent NodeRewriteEvent insertedNode insertIndex getEntries insertIndex getEntries
public void set New Value AST Node new Value int insert Index Node Rewrite Event curr Node Rewrite Event get Entries get insert Index curr set New Value new Value  setNewValue ASTNode newValue insertIndex NodeRewriteEvent NodeRewriteEvent getEntries insertIndex setNewValue newValue
public int get Change Kind int index return Node Rewrite Event get Entries get index get Change Kind  getChangeKind NodeRewriteEvent getEntries getChangeKind
public String to String String Buffer buf new String Buffer buf append list change n t NON NLS 1 Rewrite Event events get Children for int i 0 i events length i if i 0 buf append n t NON NLS 1 buf append events i buf append n NON NLS 1 return buf to String  toString StringBuffer StringBuffer RewriteEvent getChildren toString

public Node Info Store AST ast super this ast ast this placeholder Nodes null this collapsed Nodes null  NodeInfoStore placeholderNodes collapsedNodes
Marks a node as a placehoder for a plain string content The type of the node should correspond to the code s code content param placeholder The placeholder node that acts for the string content param code The string content public final void mark As String Placeholder AST Node placeholder String code String Placeholder Data data new String Placeholder Data data code code set Placeholder Data placeholder data  markAsStringPlaceholder ASTNode StringPlaceholderData StringPlaceholderData setPlaceholderData
Marks a node as a copy or move target The copy target represents a copied node at the target copied site param target The node at the target site Can be a placeholder node but also the source node itself param copy Source The info at the source site public final void mark As Copy Target AST Node target Copy Source Info copy Source Copy Placeholder Data data new Copy Placeholder Data data copy Source copy Source set Placeholder Data target data  copySource markAsCopyTarget ASTNode CopySourceInfo copySource CopyPlaceholderData CopyPlaceholderData copySource copySource setPlaceholderData
Creates a placeholder node of the given type code null code if the type is not supported param node Type Type of the node to create Use the type constants in link Node Info Store return Returns a place holder node public final AST Node new Placeholder Node int node Type try AST Node node this ast create Instance node Type switch node get Node Type case AST Node FIELD DECLARATION Field Declaration node fragments add this ast new Variable Declaration Fragment break case AST Node MODIFIER Modifier node set Keyword Modifier Modifier Keyword ABSTRACT KEYWORD break case AST Node TRY STATEMENT Try Statement node set Finally this ast new Block have to set at least a finally block to be legal code break case AST Node VARIABLE DECLARATION EXPRESSION Variable Declaration Expression node fragments add this ast new Variable Declaration Fragment break case AST Node VARIABLE DECLARATION STATEMENT Variable Declaration Statement node fragments add this ast new Variable Declaration Fragment break return node catch Illegal Argument Exception e return null  nodeType NodeInfoStore ASTNode newPlaceholderNode nodeType ASTNode createInstance nodeType getNodeType ASTNode FIELD_DECLARATION FieldDeclaration newVariableDeclarationFragment ASTNode setKeyword ModifierKeyword ABSTRACT_KEYWORD ASTNode TRY_STATEMENT TryStatement setFinally newBlock ASTNode VARIABLE_DECLARATION_EXPRESSION VariableDeclarationExpression newVariableDeclarationFragment ASTNode VARIABLE_DECLARATION_STATEMENT VariableDeclarationStatement newVariableDeclarationFragment IllegalArgumentException
public Block create Collapse Placeholder Block place Holder this ast new Block if this collapsed Nodes null this collapsed Nodes new Hash Set this collapsed Nodes add place Holder return place Holder  createCollapsePlaceholder placeHolder newBlock collapsedNodes collapsedNodes HashSet collapsedNodes placeHolder placeHolder
public boolean is Collapsed AST Node node if this collapsed Nodes null return this collapsed Nodes contains node return false  isCollapsed ASTNode collapsedNodes collapsedNodes
public Object get Placeholder Data AST Node node if this placeholder Nodes null return this placeholder Nodes get node return null  getPlaceholderData ASTNode placeholderNodes placeholderNodes
private void set Placeholder Data AST Node node Placeholder Data data if this placeholder Nodes null this placeholder Nodes new Identity Hash Map this placeholder Nodes put node data  setPlaceholderData ASTNode PlaceholderData placeholderNodes placeholderNodes IdentityHashMap placeholderNodes
protected static final class Copy Placeholder Data extends Placeholder Data public Copy Source Info copy Source public String to String return placeholder this copy Source NON NLS 1 NON NLS 2  CopyPlaceholderData PlaceholderData CopySourceInfo copySource toString copySource
protected static final class String Placeholder Data extends Placeholder Data public String code public String to String return placeholder string this code NON NLS 1 NON NLS 2  StringPlaceholderData PlaceholderData toString
public void clear this placeholder Nodes null this collapsed Nodes null  placeholderNodes collapsedNodes

private Object new Value public Node Rewrite Event Object original Value Object new Value this original Value original Value this new Value new Value  newValue NodeRewriteEvent originalValue newValue originalValue originalValue newValue newValue
return Returns the new value public Object get New Value return this new Value  getNewValue newValue
return Returns the original value public Object get Original Value return this original Value  getOriginalValue originalValue
public int get Change Kind if this original Value this new Value return UNCHANGED if this original Value null return INSERTED if this new Value null return REMOVED if this original Value equals this new Value return UNCHANGED return REPLACED  getChangeKind originalValue newValue originalValue newValue originalValue newValue
see org eclipse jdt internal corext dom Rewrite Event is List Rewrite public boolean is List Rewrite return false  RewriteEvent isListRewrite isListRewrite
param new Value The new value to set public void set New Value Object new Value this new Value new Value  newValue setNewValue newValue newValue newValue
see org eclipse jdt internal corext dom Rewrite Event get Children public Rewrite Event get Children return null  RewriteEvent getChildren RewriteEvent getChildren
public String to String String Buffer buf new String Buffer switch get Change Kind case INSERTED buf append inserted NON NLS 1 buf append get New Value buf append break case REPLACED buf append replaced NON NLS 1 buf append get Original Value buf append NON NLS 1 buf append get New Value buf append break case REMOVED buf append removed NON NLS 1 buf append get Original Value buf append break default buf append unchanged NON NLS 1 return buf to String  toString StringBuffer StringBuffer getChangeKind getNewValue getOriginalValue getNewValue getOriginalValue toString

public static final int UNCHANGED 0 return Returns the event s change kind public abstract int get Change Kind  getChangeKind
public abstract int get Change Kind return Returns true if the given event is a list event public abstract boolean is List Rewrite  getChangeKind isListRewrite
return Returns the original value For lists this is a code List code of AST Node s for non list events this can be an AST Node for node properties Integer for an integer property Boolean for boolean node properties or properties like Operator code null code is returned if the event is a insert event  ASTNode ASTNode
return Returns the new value For lists this is a code List code of AST Node s for non list events this can be an AST Node for node properties Integer for an integer property Boolean for boolean node properties or properties like Operator code null code is returned if the event is a remove event  ASTNode ASTNode
return Return the events describing the changes in a list returns code null code if the event is not a list event 

private Structural Property Descriptor property public Property Location AST Node parent Structural Property Descriptor property this parent parent this property property  StructuralPropertyDescriptor PropertyLocation ASTNode StructuralPropertyDescriptor
public AST Node get Parent return this parent  ASTNode getParent
public Structural Property Descriptor get Property return this property  StructuralPropertyDescriptor getProperty
public static interface I Node Property Mapper Returns the node attribute for a given property name param parent The parent node param child Property The child property to access return The child node at the given property location  INodePropertyMapper childProperty
public Event Holder AST Node parent Structural Property Descriptor child Property Rewrite Event change this parent parent this child Property child Property this event change  EventHolder ASTNode StructuralPropertyDescriptor childProperty RewriteEvent childProperty childProperty
public String to String String Buffer buf new String Buffer buf append this parent append NON NLS 1 buf append this child Property get Id append NON NLS 1 buf append this event append n return buf to String  toString StringBuffer StringBuffer childProperty getId toString
public Copy Source Info AST Node parent Structural Property Descriptor child Property AST Node first AST Node last boolean is Move this parent parent this child Property child Property this first first this last last this is Move is Move  CopySourceInfo ASTNode StructuralPropertyDescriptor childProperty ASTNode ASTNode isMove childProperty childProperty isMove isMove
public AST Node get Start Node return this first  ASTNode getStartNode
public AST Node get End Node return this last  ASTNode getEndNode
public String to String String Buffer buf new String Buffer if this first this last buf append range NON NLS 1 if this is Move buf append move source NON NLS 1 else buf append copy source NON NLS 1 buf append this first if this first this last buf append NON NLS 1 buf append this last return buf to String  toString StringBuffer StringBuffer isMove toString
public int compare Object o1 Object o2 Copy Source Info e1 Copy Source Info o1 Copy Source Info e2 Copy Source Info o2 if e1 is Move return 1 else if e2 is Move return 1 return e2 get End Node get Start Position e1 get End Node get Start Position  CopySourceInfo CopySourceInfo CopySourceInfo CopySourceInfo isMove isMove getEndNode getStartPosition getEndNode getStartPosition
public Parent Iterator this event Iter Rewrite Event Store this events iterator if Rewrite Event Store this node Copy Sources null this source Node Iter Rewrite Event Store this node Copy Sources iterator else this source Node Iter Collections EMPTY LIST iterator if Rewrite Event Store this range Copy Sources null this range Node Iter Rewrite Event Store this range Copy Sources iterator else this range Node Iter Collections EMPTY LIST iterator if Rewrite Event Store this tracked Nodes null this tracked Node Iter Rewrite Event Store this tracked Nodes key Set iterator else this tracked Node Iter Collections EMPTY LIST iterator  ParentIterator eventIter RewriteEventStore RewriteEventStore nodeCopySources sourceNodeIter RewriteEventStore nodeCopySources sourceNodeIter EMPTY_LIST RewriteEventStore rangeCopySources rangeNodeIter RewriteEventStore rangeCopySources rangeNodeIter EMPTY_LIST RewriteEventStore trackedNodes trackedNodeIter RewriteEventStore trackedNodes keySet trackedNodeIter EMPTY_LIST
see java util Iterator has Next public boolean has Next return this event Iter has Next this source Node Iter has Next this range Node Iter has Next this tracked Node Iter has Next  hasNext hasNext eventIter hasNext sourceNodeIter hasNext rangeNodeIter hasNext trackedNodeIter hasNext
public Object next if this event Iter has Next return Event Holder this event Iter next parent if this source Node Iter has Next return Copy Source Info this source Node Iter next get Start Node if this range Node Iter has Next return Copy Source Info this range Node Iter next parent return this tracked Node Iter next  eventIter hasNext EventHolder eventIter sourceNodeIter hasNext CopySourceInfo sourceNodeIter getStartNode rangeNodeIter hasNext CopySourceInfo rangeNodeIter trackedNodeIter
see java util Iterator remove public void remove throw new Unsupported Operation Exception  UnsupportedOperationException
public Rewrite Event Store this events new Array List this last Event null this edit Groups null lazy initialization this tracked Nodes null this insert Bound To Previous null this node Property Mapper null this node Copy Sources null  RewriteEventStore ArrayList lastEvent editGroups trackedNodes insertBoundToPrevious nodePropertyMapper nodeCopySources
Override the default way how to access children from a parent node param node Property Mapper The new code I Node Property Mapper code or code null code to use the default public void set Node Property Mapper I Node Property Mapper node Property Mapper this node Property Mapper node Property Mapper  nodePropertyMapper INodePropertyMapper setNodePropertyMapper INodePropertyMapper nodePropertyMapper nodePropertyMapper nodePropertyMapper
public void clear this events clear this last Event null this tracked Nodes null this edit Groups null lazy initialization this insert Bound To Previous null this node Copy Sources null  lastEvent trackedNodes editGroups insertBoundToPrevious nodeCopySources
public void add Event AST Node parent Structural Property Descriptor child Property Rewrite Event event validate Has Child Property parent child Property if event is List Rewrite validate Is List Property child Property Event Holder holder new Event Holder parent child Property event check if already in list for int i 0 i this events size i Event Holder curr Event Holder this events get i if curr parent parent curr child Property child Property this events set i holder this last Event null return this events add holder  addEvent ASTNode StructuralPropertyDescriptor childProperty RewriteEvent validateHasChildProperty childProperty isListRewrite validateIsListProperty childProperty EventHolder EventHolder childProperty EventHolder EventHolder childProperty childProperty lastEvent
public Rewrite Event get Event AST Node parent Structural Property Descriptor property validate Has Child Property parent property if this last Event null this last Event parent parent this last Event child Property property return this last Event event for int i 0 i this events size i Event Holder holder Event Holder this events get i if holder parent parent holder child Property property this last Event holder return holder event return null  RewriteEvent getEvent ASTNode StructuralPropertyDescriptor validateHasChildProperty lastEvent lastEvent lastEvent childProperty lastEvent EventHolder EventHolder childProperty lastEvent
public Node Rewrite Event get Node Event AST Node parent Structural Property Descriptor child Property boolean force Creation validate Is Node Property child Property Node Rewrite Event event Node Rewrite Event get Event parent child Property if event null force Creation Object original Value access Original Value parent child Property event new Node Rewrite Event original Value original Value add Event parent child Property event return event  NodeRewriteEvent getNodeEvent ASTNode StructuralPropertyDescriptor childProperty forceCreation validateIsNodeProperty childProperty NodeRewriteEvent NodeRewriteEvent getEvent childProperty forceCreation originalValue accessOriginalValue childProperty NodeRewriteEvent originalValue originalValue addEvent childProperty
public List Rewrite Event get List Event AST Node parent Structural Property Descriptor child Property boolean force Creation validate Is List Property child Property List Rewrite Event event List Rewrite Event get Event parent child Property if event null force Creation List original Value List access Original Value parent child Property event new List Rewrite Event original Value add Event parent child Property event return event  ListRewriteEvent getListEvent ASTNode StructuralPropertyDescriptor childProperty forceCreation validateIsListProperty childProperty ListRewriteEvent ListRewriteEvent getEvent childProperty forceCreation originalValue accessOriginalValue childProperty ListRewriteEvent originalValue addEvent childProperty
public Iterator get Change Root Iterator return new Parent Iterator  getChangeRootIterator ParentIterator
public boolean has Changed Properties AST Node parent for int i 0 i this events size i Event Holder holder Event Holder this events get i if holder parent parent if holder event get Change Kind Rewrite Event UNCHANGED return true return false  hasChangedProperties ASTNode EventHolder EventHolder getChangeKind RewriteEvent
public Property Location get Property Location Object value int kind for int i 0 i this events size i Event Holder holder Event Holder this events get i Rewrite Event event holder event if is Node In Event event value kind return new Property Location holder parent holder child Property if event is List Rewrite Rewrite Event children event get Children for int k 0 k children length k if is Node In Event children k value kind return new Property Location holder parent holder child Property if value instanceof AST Node AST Node node AST Node value return new Property Location node get Parent node get Location In Parent return null  PropertyLocation getPropertyLocation EventHolder EventHolder RewriteEvent isNodeInEvent PropertyLocation childProperty isListRewrite RewriteEvent getChildren isNodeInEvent PropertyLocation childProperty ASTNode ASTNode ASTNode PropertyLocation getParent getLocationInParent
Kind is either ORIGINAL NEW or BOTH param value param kind return public Rewrite Event find Event Object value int kind for int i 0 i this events size i Rewrite Event event Event Holder this events get i event if is Node In Event event value kind return event if event is List Rewrite Rewrite Event children event get Children for int k 0 k children length k if is Node In Event children k value kind return children k return null  RewriteEvent findEvent RewriteEvent EventHolder isNodeInEvent isListRewrite RewriteEvent getChildren isNodeInEvent
private boolean is Node In Event Rewrite Event event Object value int kind if kind NEW 0 event get New Value value return true if kind ORIGINAL 0 event get Original Value value return true return false  isNodeInEvent RewriteEvent getNewValue getOriginalValue
public Object get Original Value AST Node parent Structural Property Descriptor property Rewrite Event event get Event parent property if event null return event get Original Value return access Original Value parent property  getOriginalValue ASTNode StructuralPropertyDescriptor RewriteEvent getEvent getOriginalValue accessOriginalValue
public Object get New Value AST Node parent Structural Property Descriptor property Rewrite Event event get Event parent property if event null return event get New Value return access Original Value parent property  getNewValue ASTNode StructuralPropertyDescriptor RewriteEvent getEvent getNewValue accessOriginalValue
public int get Change Kind AST Node node Rewrite Event event find Event node ORIGINAL if event null return event get Change Kind return Rewrite Event UNCHANGED  getChangeKind ASTNode RewriteEvent findEvent getChangeKind RewriteEvent
private Object access Original Value AST Node parent Structural Property Descriptor child Property if this node Property Mapper null return this node Property Mapper get Original Value parent child Property return parent get Structural Property child Property  accessOriginalValue ASTNode StructuralPropertyDescriptor childProperty nodePropertyMapper nodePropertyMapper getOriginalValue childProperty getStructuralProperty childProperty
public Text Edit Group get Event Edit Group Rewrite Event event if this edit Groups null return null return Text Edit Group this edit Groups get event  TextEditGroup getEventEditGroup RewriteEvent editGroups TextEditGroup editGroups
public void set Event Edit Group Rewrite Event event Text Edit Group edit Group if this edit Groups null this edit Groups new Identity Hash Map 5 this edit Groups put event edit Group  setEventEditGroup RewriteEvent TextEditGroup editGroup editGroups editGroups IdentityHashMap editGroups editGroup
public final Text Edit Group get Tracked Node Data AST Node node if this tracked Nodes null return Text Edit Group this tracked Nodes get node return null  TextEditGroup getTrackedNodeData ASTNode trackedNodes TextEditGroup trackedNodes
public void set Tracked Node Data AST Node node Text Edit Group edit Group if this tracked Nodes null this tracked Nodes new Identity Hash Map this tracked Nodes put node edit Group  setTrackedNodeData ASTNode TextEditGroup editGroup trackedNodes trackedNodes IdentityHashMap trackedNodes editGroup
Marks a node as tracked The edits added to the group edit Group can be used to get the position of the node after the rewrite operation param node The node to track param edit Group Collects the range markers describing the node position public final void mark As Tracked AST Node node Text Edit Group edit Group if get Tracked Node Data node null throw new Illegal Argument Exception Node is already marked as tracked NON NLS 1 set Tracked Node Data node edit Group  editGroup editGroup markAsTracked ASTNode TextEditGroup editGroup getTrackedNodeData IllegalArgumentException setTrackedNodeData editGroup
public final Copy Source Info mark As Copy Source AST Node parent Structural Property Descriptor property AST Node node boolean is Move Copy Source Info copy Source new Copy Source Info parent property node node is Move if this node Copy Sources null this node Copy Sources new Array List this node Copy Sources add copy Source return copy Source  CopySourceInfo markAsCopySource ASTNode StructuralPropertyDescriptor ASTNode isMove CopySourceInfo copySource CopySourceInfo isMove nodeCopySources nodeCopySources ArrayList nodeCopySources copySource copySource
public final Copy Source Info mark As Range Copy Source AST Node parent Structural Property Descriptor property AST Node first AST Node last boolean is Move Copy Source Info copy Source new Copy Source Info parent property first last is Move assert No Overlap copy Source if this range Copy Sources null this range Copy Sources new Array List this range Copy Sources add copy Source return copy Source  CopySourceInfo markAsRangeCopySource ASTNode StructuralPropertyDescriptor ASTNode ASTNode isMove CopySourceInfo copySource CopySourceInfo isMove assertNoOverlap copySource rangeCopySources rangeCopySources ArrayList rangeCopySources copySource copySource
public Copy Source Info get Node Copy Sources AST Node node if this node Copy Sources null return null return internal Get Copy Sources this node Copy Sources node  CopySourceInfo getNodeCopySources ASTNode nodeCopySources internalGetCopySources nodeCopySources
public Copy Source Info get Range Copy Sources AST Node node if this range Copy Sources null return null return internal Get Copy Sources this range Copy Sources node  CopySourceInfo getRangeCopySources ASTNode rangeCopySources internalGetCopySources rangeCopySources
public boolean has Range Copy Sources AST Node parent Structural Property Descriptor property if this range Copy Sources null return false for int i 0 i this range Copy Sources size i Copy Source Info curr Copy Source Info this range Copy Sources get i if curr parent parent curr child Property property return true return false  hasRangeCopySources ASTNode StructuralPropertyDescriptor rangeCopySources rangeCopySources CopySourceInfo CopySourceInfo rangeCopySources childProperty
public Copy Source Info internal Get Copy Sources List copy Sources AST Node node Array List res new Array List 3 for int i 0 i copy Sources size i Copy Source Info curr Copy Source Info copy Sources get i if curr get Start Node node res add curr if res is Empty return null Copy Source Info arr Copy Source Info res to Array new Copy Source Info res size if arr length 1 Arrays sort arr new Copy Source Info Sorter return arr  CopySourceInfo internalGetCopySources copySources ASTNode ArrayList ArrayList copySources CopySourceInfo CopySourceInfo copySources getStartNode isEmpty CopySourceInfo CopySourceInfo toArray CopySourceInfo CopySourceInfoSorter
private void assert No Overlap Copy Source Info copy Source todo  assertNoOverlap CopySourceInfo copySource
Make sure all moved nodes are marked as removed or replaced public void mark Moved Nodes Removed if this node Copy Sources null return for int i 0 i this node Copy Sources size i Copy Source Info curr Copy Source Info this node Copy Sources get i if curr is Move do Mark Moved As Removed curr  markMovedNodesRemoved nodeCopySources nodeCopySources CopySourceInfo CopySourceInfo nodeCopySources isMove doMarkMovedAsRemoved
private void do Mark Moved As Removed Copy Source Info curr if curr child Property is Child List Property List Rewrite Event event get List Event curr parent curr child Property true int index event get Index curr get Start Node List Rewrite Event OLD if index 1 event get Change Kind index Rewrite Event UNCHANGED event set New Value null index else Node Rewrite Event event get Node Event curr parent curr child Property true if event get Change Kind Rewrite Event UNCHANGED event set New Value null  doMarkMovedAsRemoved CopySourceInfo childProperty isChildListProperty ListRewriteEvent getListEvent childProperty getIndex getStartNode ListRewriteEvent getChangeKind RewriteEvent setNewValue NodeRewriteEvent getNodeEvent childProperty getChangeKind RewriteEvent setNewValue
public boolean is Insert Bound To Previous AST Node node if this insert Bound To Previous null return this insert Bound To Previous contains node return false  isInsertBoundToPrevious ASTNode insertBoundToPrevious insertBoundToPrevious
public void set Insert Bound To Previous AST Node node if this insert Bound To Previous null this insert Bound To Previous new Hash Set this insert Bound To Previous add node  setInsertBoundToPrevious ASTNode insertBoundToPrevious insertBoundToPrevious HashSet insertBoundToPrevious
private void validate Is List Property Structural Property Descriptor property if property is Child List Property String message property get Id is not a list property NON NLS 1 throw new Illegal Argument Exception message  validateIsListProperty StructuralPropertyDescriptor isChildListProperty getId IllegalArgumentException
private void validate Has Child Property AST Node parent Structural Property Descriptor property if parent structural Properties For Type contains property String message Signature get Simple Name parent get Class get Name has no property property get Id NON NLS 1 throw new Illegal Argument Exception message  validateHasChildProperty ASTNode StructuralPropertyDescriptor structuralPropertiesForType getSimpleName getClass getName getId IllegalArgumentException
private void validate Is Node Property Structural Property Descriptor property if property is Child List Property String message property get Id is not a node property NON NLS 1 throw new Illegal Argument Exception message  validateIsNodeProperty StructuralPropertyDescriptor isChildListProperty getId IllegalArgumentException
public String to String String Buffer buf new String Buffer for int i 0 i this events size i buf append this events get i to String append n return buf to String  toString StringBuffer StringBuffer toString toString
public static boolean is New Node AST Node node return node get Flags AST Node ORIGINAL 0  isNewNode ASTNode getFlags ASTNode

public Source Modifier int source Indent Level String destination Indent int tab Width this destination Indent destination Indent this source Indent Level source Indent Level this tab Width tab Width  SourceModifier sourceIndentLevel destinationIndent tabWidth destinationIndent destinationIndent sourceIndentLevel sourceIndentLevel tabWidth tabWidth
public I Source Modifier copy We are state less return this  ISourceModifier
public Replace Edit get Modifications String source List result new Array List int dest Indent Level Indents compute Indent this destination Indent this tab Width if dest Indent Level this source Indent Level return Replace Edit result to Array new Replace Edit result size return Indents get Change Indent Edits source this source Indent Level this tab Width this destination Indent  ReplaceEdit getModifications ArrayList destIndentLevel computeIndent destinationIndent tabWidth destIndentLevel sourceIndentLevel ReplaceEdit toArray ReplaceEdit getChangeIndentEdits sourceIndentLevel tabWidth destinationIndent

Creates a Token Scanner param scanner The scanner to be wrapped The scanner has to support line information if the comment position methods are used public Token Scanner I Scanner scanner this scanner null  TokenScanner TokenScanner IScanner
Creates a Token Scanner param scanner The scanner to be wrapped param document The document used for line information if specified public Token Scanner I Scanner scanner I Document document this scanner scanner this end Position this scanner get Source length 1 this document document  TokenScanner TokenScanner IScanner IDocument endPosition getSource
Creates a Token Scanner param document The textbuffer to create the scanner on public Token Scanner I Document document this scanner Tool Factory create Scanner true false false false this scanner set Source document get to Char Array this document document this end Position this scanner get Source length 1  TokenScanner TokenScanner IDocument ToolFactory createScanner setSource toCharArray endPosition getSource
Returns the wrapped scanner return I Scanner public I Scanner get Scanner return this scanner  IScanner IScanner getScanner
Sets the scanner offset to the given offset param offset The offset to set public void set Offset int offset this scanner reset To offset this end Position  setOffset resetTo endPosition
return Returns the offset after the current token public int get Current End Offset return this scanner get Current Token End Position 1  getCurrentEndOffset getCurrentTokenEndPosition
return Returns the start offset of the current token public int get Current Start Offset return this scanner get Current Token Start Position  getCurrentStartOffset getCurrentTokenStartPosition
return Returns the length of the current token public int get Current Length return get Current End Offset get Current Start Offset  getCurrentLength getCurrentEndOffset getCurrentStartOffset
Reads the next token param ignore Comments If set comments will be overread return Return the token id exception Core Exception Thrown when the end of the file has been reached code END OF FILE or a lexical error was detected while scanning code LEXICAL ERROR public int read Next boolean ignore Comments throws Core Exception int curr 0 do try curr this scanner get Next Token if curr I Terminal Symbols Token NameEOF throw new Core Exception create Error END OF FILE End Of File null NON NLS 1 catch Invalid Input Exception e throw new Core Exception create Error LEXICAL ERROR e get Message e NON NLS 1 while ignore Comments is Comment curr return curr  ignoreComments CoreException END_OF_FILE LEXICAL_ERROR readNext ignoreComments CoreException getNextToken ITerminalSymbols TokenNameEOF CoreException createError END_OF_FILE InvalidInputException CoreException createError LEXICAL_ERROR getMessage ignoreComments isComment
Reads the next token param ignore Comments If set comments will be overread return Return the token id exception Core Exception Thrown when the end of the file has been reached code END OF FILE or a lexical error was detected while scanning code LEXICAL ERROR private int read Next WithEOF boolean ignore Comments throws Core Exception int curr 0 do try curr this scanner get Next Token catch Invalid Input Exception e throw new Core Exception create Error LEXICAL ERROR e get Message e NON NLS 1 while ignore Comments is Comment curr return curr  ignoreComments CoreException END_OF_FILE LEXICAL_ERROR readNextWithEOF ignoreComments CoreException getNextToken InvalidInputException CoreException createError LEXICAL_ERROR getMessage ignoreComments isComment
Reads the next token from the given offset param offset The offset to start reading from param ignore Comments If set comments will be overread return Returns the token id exception Core Exception Thrown when the end of the file has been reached code END OF FILE or a lexical error was detected while scanning code LEXICAL ERROR public int read Next int offset boolean ignore Comments throws Core Exception set Offset offset return read Next ignore Comments  ignoreComments CoreException END_OF_FILE LEXICAL_ERROR readNext ignoreComments CoreException setOffset readNext ignoreComments
Reads the next token from the given offset and returns the start offset of the token param offset The offset to start reading from param ignore Comments If set comments will be overread return Returns the start position of the next token exception Core Exception Thrown when the end of the file has been reached code END OF FILE or a lexical error was detected while scanning code LEXICAL ERROR public int get Next Start Offset int offset boolean ignore Comments throws Core Exception read Next offset ignore Comments return get Current Start Offset  ignoreComments CoreException END_OF_FILE LEXICAL_ERROR getNextStartOffset ignoreComments CoreException readNext ignoreComments getCurrentStartOffset
Reads the next token from the given offset and returns the offset after the token param offset The offset to start reading from param ignore Comments If set comments will be overread return Returns the start position of the next token exception Core Exception Thrown when the end of the file has been reached code END OF FILE or a lexical error was detected while scanning code LEXICAL ERROR public int get Next End Offset int offset boolean ignore Comments throws Core Exception read Next offset ignore Comments return get Current End Offset  ignoreComments CoreException END_OF_FILE LEXICAL_ERROR getNextEndOffset ignoreComments CoreException readNext ignoreComments getCurrentEndOffset
Reads until a token is reached param tok The token to read to exception Core Exception Thrown when the end of the file has been reached code END OF FILE or a lexical error was detected while scanning code LEXICAL ERROR public void read To Token int tok throws Core Exception int curr 0 do curr read Next false while curr tok  CoreException END_OF_FILE LEXICAL_ERROR readToToken CoreException readNext
Reads until a token is reached starting from the given offset param tok The token to read to param offset The offset to start reading from exception Core Exception Thrown when the end of the file has been reached code END OF FILE or a lexical error was detected while scanning code LEXICAL ERROR public void read To Token int tok int offset throws Core Exception set Offset offset read To Token tok  CoreException END_OF_FILE LEXICAL_ERROR readToToken CoreException setOffset readToToken
Reads from the given offset until a token is reached and returns the start offset of the token param token The token to be found param start Offset The offset to start reading from return Returns the start position of the found token exception Core Exception Thrown when the end of the file has been reached code END OF FILE or a lexical error was detected while scanning code LEXICAL ERROR public int get Token Start Offset int token int start Offset throws Core Exception read To Token token start Offset return get Current Start Offset  startOffset CoreException END_OF_FILE LEXICAL_ERROR getTokenStartOffset startOffset CoreException readToToken startOffset getCurrentStartOffset
Reads from the given offset until a token is reached and returns the offset after the token param token The token to be found param start Offset Offset to start reading from return Returns the end position of the found token exception Core Exception Thrown when the end of the file has been reached code END OF FILE or a lexical error was detected while scanning code LEXICAL ERROR public int get Token End Offset int token int start Offset throws Core Exception read To Token token start Offset return get Current End Offset  startOffset CoreException END_OF_FILE LEXICAL_ERROR getTokenEndOffset startOffset CoreException readToToken startOffset getCurrentEndOffset
Reads from the given offset until a token is reached and returns the offset after the previous token param token The token to be found param start Offset The offset to start scanning from return Returns the end offset of the token previous to the given token exception Core Exception Thrown when the end of the file has been reached code END OF FILE or a lexical error was detected while scanning code LEXICAL ERROR public int get Previous Token End Offset int token int start Offset throws Core Exception set Offset start Offset int res start Offset int curr read Next false while curr token res get Current End Offset curr read Next false return res  startOffset CoreException END_OF_FILE LEXICAL_ERROR getPreviousTokenEndOffset startOffset CoreException setOffset startOffset startOffset readNext getCurrentEndOffset readNext
Evaluates the start offset of comments directly ahead of a token specified by its start offset param last Pos An offset to before the node start offset Can be 0 but better is the end location of the previous node param node Start Start offset of the node to find the comments for return Returns the start offset of comments directly ahead of a token exception Core Exception Thrown when a lexical error was detected while scanning code LEXICAL ERROR public int get Token Comment Start int last Pos int node Start throws Core Exception set Offset last Pos int prev End Pos last Pos int prev End Line prev End Pos 0 get Line Of Offset prev End Pos 1 0 int node Line get Line Of Offset node Start int res 1 int curr read Next WithEOF false int curr Start Pos get Current Start Offset int curr Start Line get Line Of Offset curr Start Pos while curr I Terminal Symbols Token NameEOF node Start curr Start Pos if Token Scanner is Comment curr int lines Difference curr Start Line prev End Line if lines Difference 1 res 1 lines Difference 0 node Line curr Start Line res curr Start Pos begin new else res 1 if curr I Terminal Symbols TokenNameCOMMENT LINE prev End Line curr Start Line else prev End Line get Line Of Offset get Current End Offset 1 curr read Next WithEOF false curr Start Pos get Current Start Offset curr Start Line get Line Of Offset curr Start Pos if res 1 curr I Terminal Symbols Token NameEOF return node Start if curr Start Line prev End Line 1 return node Start return res  lastPos nodeStart CoreException LEXICAL_ERROR getTokenCommentStart lastPos nodeStart CoreException setOffset lastPos prevEndPos lastPos prevEndLine prevEndPos getLineOfOffset prevEndPos nodeLine getLineOfOffset nodeStart readNextWithEOF currStartPos getCurrentStartOffset currStartLine getLineOfOffset currStartPos ITerminalSymbols TokenNameEOF nodeStart currStartPos TokenScanner isComment linesDifference currStartLine prevEndLine linesDifference linesDifference nodeLine currStartLine currStartPos ITerminalSymbols TokenNameCOMMENT_LINE prevEndLine currStartLine prevEndLine getLineOfOffset getCurrentEndOffset readNextWithEOF currStartPos getCurrentStartOffset currStartLine getLineOfOffset currStartPos ITerminalSymbols TokenNameEOF nodeStart currStartLine prevEndLine nodeStart
Looks for comments after a node and returns the end position of the comment still belonging to the node param node End The end position of the node param next Token Start The start positoion of the next node Optional can be 1 the line information shoould be taken from the scanner object return Returns returns the end position of the comment still belonging to the node exception Core Exception Thrown when the end of the file has been reached code END OF FILE or a lexical error was detected while scanning code LEXICAL ERROR public int get Token Comment End int node End int next Token Start throws Core Exception assign comments to the previous comments as long they are all on the same line as the node end position or if they are on the next line but there is a separation from the next node aa aa bb public void b cc cc dd public void d int prev End Line get Line Of Offset node End 1 int prev End Pos node End int res node End boolean same Line Comment true set Offset node End int curr read Next WithEOF false while curr I Terminal Symbols TokenNameCOMMENT LINE curr I Terminal Symbols TokenNameCOMMENT BLOCK int curr Start Line get Line Of Offset get Current Start Offset int lines Difference curr Start Line prev End Line if lines Difference 1 return prev End Pos separated comments if curr I Terminal Symbols TokenNameCOMMENT LINE prev End Pos get Line End curr Start Line prev End Line curr Start Line else prev End Pos get Current End Offset prev End Line get Line Of Offset prev End Pos 1 if same Line Comment if lines Difference 0 res prev End Pos else same Line Comment false curr read Next WithEOF false if curr I Terminal Symbols Token NameEOF return prev End Pos int curr Start Line get Line Of Offset get Current Start Offset int lines Difference curr Start Line prev End Line if lines Difference 1 return prev End Pos separated comments return res  nodeEnd nextTokenStart CoreException END_OF_FILE LEXICAL_ERROR getTokenCommentEnd nodeEnd nextTokenStart CoreException prevEndLine getLineOfOffset nodeEnd prevEndPos nodeEnd nodeEnd sameLineComment setOffset nodeEnd readNextWithEOF ITerminalSymbols TokenNameCOMMENT_LINE ITerminalSymbols TokenNameCOMMENT_BLOCK currStartLine getLineOfOffset getCurrentStartOffset linesDifference currStartLine prevEndLine linesDifference prevEndPos ITerminalSymbols TokenNameCOMMENT_LINE prevEndPos getLineEnd currStartLine prevEndLine currStartLine prevEndPos getCurrentEndOffset prevEndLine getLineOfOffset prevEndPos sameLineComment linesDifference prevEndPos sameLineComment readNextWithEOF ITerminalSymbols TokenNameEOF prevEndPos currStartLine getLineOfOffset getCurrentStartOffset linesDifference currStartLine prevEndLine linesDifference prevEndPos
private int get Line Of Offset int offset throws Core Exception if this document null try return this document get Line Of Offset offset catch Bad Location Exception e String message Illegal offset offset NON NLS 1 throw new Core Exception create Error DOCUMENT ERROR message e NON NLS 1 return get Scanner get Line Number offset  getLineOfOffset CoreException getLineOfOffset BadLocationException CoreException createError DOCUMENT_ERROR getScanner getLineNumber
private int get Line End int line throws Core Exception if this document null try I Region region this document get Line Information line return region get Offset region get Length catch Bad Location Exception e String message Illegal line line NON NLS 1 throw new Core Exception create Error DOCUMENT ERROR message e NON NLS 1 return get Scanner get Line End line  getLineEnd CoreException IRegion getLineInformation getOffset getLength BadLocationException CoreException createError DOCUMENT_ERROR getScanner getLineEnd
public static boolean is Comment int token return token I Terminal Symbols TokenNameCOMMENT BLOCK token I Terminal Symbols TokenNameCOMMENT JAVADOC token I Terminal Symbols TokenNameCOMMENT LINE  isComment ITerminalSymbols TokenNameCOMMENT_BLOCK ITerminalSymbols TokenNameCOMMENT_JAVADOC ITerminalSymbols TokenNameCOMMENT_LINE
public static boolean is Modifier int token switch token case I Terminal Symbols Token Namepublic case I Terminal Symbols Token Nameprotected case I Terminal Symbols Token Nameprivate case I Terminal Symbols Token Namestatic case I Terminal Symbols Token Namefinal case I Terminal Symbols Token Nameabstract case I Terminal Symbols Token Namenative case I Terminal Symbols Token Namevolatile case I Terminal Symbols Token Namestrictfp case I Terminal Symbols Token Nametransient case I Terminal Symbols Token Namesynchronized return true default return false  isModifier ITerminalSymbols TokenNamepublic ITerminalSymbols TokenNameprotected ITerminalSymbols TokenNameprivate ITerminalSymbols TokenNamestatic ITerminalSymbols TokenNamefinal ITerminalSymbols TokenNameabstract ITerminalSymbols TokenNamenative ITerminalSymbols TokenNamevolatile ITerminalSymbols TokenNamestrictfp ITerminalSymbols TokenNametransient ITerminalSymbols TokenNamesynchronized
public static I Status create Error int code String message Throwable throwable return new Status I Status ERROR Java Core PLUGIN ID code message throwable  IStatus createError IStatus JavaCore PLUGIN_ID

private final AST Node node public Tracked Node Position Text Edit Group group AST Node node this group group this node node  ASTNode TrackedNodePosition TextEditGroup ASTNode
public int get Start Position if this group is Empty return this node get Start Position return Text Edit get Coverage this group get Text Edits get Offset  getStartPosition isEmpty getStartPosition TextEdit getCoverage getTextEdits getOffset
public int get Length if this group is Empty return this node get Length return Text Edit get Coverage this group get Text Edits get Length  getLength isEmpty getLength TextEdit getCoverage getTextEdits getLength

public class Element Cache extends OverflowingLRU Cache Constructs a new element cache of the given size public Element Cache int size super size  ElementCache OverflowingLRUCache ElementCache
Constructs a new element cache of the given size public Element Cache int size int overflow super size overflow  ElementCache
Returns true if the element is successfully closed and removed from the cache otherwise false p NOTE this triggers an external removal of this element by closing the element protected boolean close LRU Cache Entry entry Openable element Openable entry  fKey try if element can Be Removed From Cache return false else We must close an entire Jar Package Fragment Root at once if element instanceof Jar Package Fragment Jar Package Fragment package Fragment Jar Package Fragment element Jar Package Fragment Root root Jar Package Fragment Root package Fragment get Parent root close else element close return true catch Java Model Exception npe return false  LRUCacheEntry _fKey canBeRemovedFromCache JarPackageFragmentRoot JarPackageFragment JarPackageFragment packageFragment JarPackageFragment JarPackageFragmentRoot JarPackageFragmentRoot packageFragment getParent JavaModelException
Returns a new instance of the reciever protected LRU Cache new Instance int size int overflow return new Element Cache size overflow  LRUCache newInstance ElementCache

protected Java Project project Creates a new wrapper around the given infrastructure evaluation context and project public Evaluation Context Wrapper Evaluation Context context Java Project project this context context this project project  JavaProject EvaluationContextWrapper EvaluationContext JavaProject
see org eclipse jdt core eval I Evaluation Context all Variables public I Global Variable all Variables Global Variable vars this context all Variables int length vars length Global Variable Wrapper result new Global Variable Wrapper length for int i 0 i length i result i new Global Variable Wrapper vars i return result  IEvaluationContext allVariables IGlobalVariable allVariables GlobalVariable allVariables GlobalVariableWrapper GlobalVariableWrapper GlobalVariableWrapper
Checks to ensure that there is a previously built state protected void check Builder State return  checkBuilderState
see org eclipse jdt core eval I Evaluation Context code Complete String int I Completion Requestor public void code Complete String code Snippet int position I Completion Requestor requestor throws Java Model Exception code Complete code Snippet position requestor Default Working Copy Owner PRIMARY  IEvaluationContext codeComplete ICompletionRequestor codeComplete codeSnippet ICompletionRequestor JavaModelException codeComplete codeSnippet DefaultWorkingCopyOwner
see org eclipse jdt core eval I Evaluation Context code Complete String int I Completion Requestor Working Copy Owner public void code Complete String code Snippet int position I Completion Requestor requestor Working Copy Owner owner throws Java Model Exception Searchable Environment environment Searchable Environment this project new Searchable Name Environment owner this context complete code Snippet to Char Array position environment new Completion Requestor Wrapper requestor environment name Lookup this project get Options true this project  IEvaluationContext codeComplete ICompletionRequestor WorkingCopyOwner codeComplete codeSnippet ICompletionRequestor WorkingCopyOwner JavaModelException SearchableEnvironment SearchableEnvironment newSearchableNameEnvironment codeSnippet toCharArray CompletionRequestorWrapper nameLookup getOptions
see org eclipse jdt core eval I Evaluation Context code Select String int int public I Java Element code Select String code Snippet int offset int length throws Java Model Exception return code Select code Snippet offset length Default Working Copy Owner PRIMARY  IEvaluationContext codeSelect IJavaElement codeSelect codeSnippet JavaModelException codeSelect codeSnippet DefaultWorkingCopyOwner
see org eclipse jdt core eval I Evaluation Context code Select String int int Working Copy Owner public I Java Element code Select String code Snippet int offset int length Working Copy Owner owner throws Java Model Exception Searchable Environment environment Searchable Environment this project new Searchable Name Environment owner Selection Requestor requestor new Selection Requestor environment name Lookup null null because there is no need to look inside the code snippet itself this context select code Snippet to Char Array offset offset length 1 environment requestor this project get Options true return requestor get Elements  IEvaluationContext codeSelect WorkingCopyOwner IJavaElement codeSelect codeSnippet WorkingCopyOwner JavaModelException SearchableEnvironment SearchableEnvironment newSearchableNameEnvironment SelectionRequestor SelectionRequestor nameLookup codeSnippet toCharArray getOptions getElements
see org eclipse jdt core eval I Evaluation Context delete Variable I Global Variable public void delete Variable I Global Variable variable if variable instanceof Global Variable Wrapper Global Variable Wrapper wrapper Global Variable Wrapper variable this context delete Variable wrapper variable else throw new Error Unknown implementation of I Global Variable NON NLS 1  IEvaluationContext deleteVariable IGlobalVariable deleteVariable IGlobalVariable GlobalVariableWrapper GlobalVariableWrapper GlobalVariableWrapper deleteVariable IGlobalVariable
see I Evaluation Context evaluate Code Snippet String String String int I Type boolean boolean I Code Snippet Requestor I Progress Monitor public void evaluate Code Snippet String code Snippet String local Variable Type Names String local Variable Names int local Variable Modifiers I Type declaring Type boolean is Static boolean is Constructor Call I Code Snippet Requestor requestor I Progress Monitor progress Monitor throws org eclipse jdt core Java Model Exception check Builder State int length local Variable Type Names length char var Type Names new char length for int i 0 i length i var Type Names i local Variable Type Names i to Char Array length local Variable Names length char var Names new char length for int i 0 i length i var Names i local Variable Names i to Char Array Map options this project get Options true transfer the imports of the I Type to the evaluation context if declaring Type null retrieves the package statement this context set Package Name declaring Type get Package Fragment get Element Name to Char Array I Compilation Unit compilation Unit declaring Type get Compilation Unit if compilation Unit null retrieves the import statement I Import Declaration imports compilation Unit get Imports int imports Length imports length if imports Length 0 char imports Names new char imports Length for int i 0 i imports Length i imports Names i imports i get Element Name to Char Array this context set Imports imports Names turn off import complaints for implicitly added ones options put Compiler Options OPTION ReportUnusedImport Compiler Options IGNORE else try to retrieve imports from the source Source Mapper source Mapper Class File declaring Type get Class File get Source Mapper if source Mapper null char imports source Mapper get Imports Binary Type declaring Type if imports null this context set Imports imports turn off import complaints for implicitly added ones options put Compiler Options OPTION ReportUnusedImport Compiler Options IGNORE I Name Environment environment null try this context evaluate code Snippet to Char Array var Type Names var Names local Variable Modifiers declaring Type null null declaring Type get Fully Qualified Name to Char Array is Static is Constructor Call environment get Build Name Environment options get Infrastructure Evaluation Requestor requestor get Problem Factory catch Install Exception e handle Install Exception e finally if environment null environment cleanup  IEvaluationContext evaluateCodeSnippet IType ICodeSnippetRequestor IProgressMonitor evaluateCodeSnippet codeSnippet localVariableTypeNames localVariableNames localVariableModifiers IType declaringType isStatic isConstructorCall ICodeSnippetRequestor IProgressMonitor progressMonitor JavaModelException checkBuilderState localVariableTypeNames varTypeNames varTypeNames localVariableTypeNames toCharArray localVariableNames varNames varNames localVariableNames toCharArray getOptions IType declaringType setPackageName declaringType getPackageFragment getElementName toCharArray ICompilationUnit compilationUnit declaringType getCompilationUnit compilationUnit IImportDeclaration compilationUnit getImports importsLength importsLength importsNames importsLength importsLength importsNames getElementName toCharArray setImports importsNames CompilerOptions OPTION_ReportUnusedImport CompilerOptions SourceMapper sourceMapper ClassFile declaringType getClassFile getSourceMapper sourceMapper sourceMapper getImports BinaryType declaringType setImports CompilerOptions OPTION_ReportUnusedImport CompilerOptions INameEnvironment codeSnippet toCharArray varTypeNames varNames localVariableModifiers declaringType declaringType getFullyQualifiedName toCharArray isStatic isConstructorCall getBuildNameEnvironment getInfrastructureEvaluationRequestor getProblemFactory InstallException handleInstallException
see I Evaluation Context evaluate Code Snippet String I Code Snippet Requestor I Progress Monitor public void evaluate Code Snippet String code Snippet I Code Snippet Requestor requestor I Progress Monitor progress Monitor throws Java Model Exception check Builder State I Name Environment environment null try this context evaluate code Snippet to Char Array environment get Build Name Environment this project get Options true get Infrastructure Evaluation Requestor requestor get Problem Factory catch Install Exception e handle Install Exception e finally if environment null environment cleanup  IEvaluationContext evaluateCodeSnippet ICodeSnippetRequestor IProgressMonitor evaluateCodeSnippet codeSnippet ICodeSnippetRequestor IProgressMonitor progressMonitor JavaModelException checkBuilderState INameEnvironment codeSnippet toCharArray getBuildNameEnvironment getOptions getInfrastructureEvaluationRequestor getProblemFactory InstallException handleInstallException
see I Evaluation Context evaluate Variable I Global Variable I Code Snippet Requestor I Progress Monitor public void evaluate Variable I Global Variable variable I Code Snippet Requestor requestor I Progress Monitor progress Monitor throws Java Model Exception check Builder State I Name Environment environment null try this context evaluate Variable Global Variable Wrapper variable variable environment get Build Name Environment this project get Options true get Infrastructure Evaluation Requestor requestor get Problem Factory catch Install Exception e handle Install Exception e finally if environment null environment cleanup  IEvaluationContext evaluateVariable IGlobalVariable ICodeSnippetRequestor IProgressMonitor evaluateVariable IGlobalVariable ICodeSnippetRequestor IProgressMonitor progressMonitor JavaModelException checkBuilderState INameEnvironment evaluateVariable GlobalVariableWrapper getBuildNameEnvironment getOptions getInfrastructureEvaluationRequestor getProblemFactory InstallException handleInstallException
Returns a name environment for the last built state protected I Name Environment get Build Name Environment return new Name Environment get Project  INameEnvironment getBuildNameEnvironment NameEnvironment getProject
see org eclipse jdt core eval I Evaluation Context get Imports public String get Imports char imports this context get Imports int length imports length String result new String length for int i 0 i length i result i new String imports i return result  IEvaluationContext getImports getImports getImports
Returns the infrastructure evaluation context public Evaluation Context get Infrastructure Evaluation Context return this context  EvaluationContext getInfrastructureEvaluationContext
Returns a new infrastructure evaluation requestor instance protected I Requestor get Infrastructure Evaluation Requestor I Code Snippet Requestor requestor return new Requestor Wrapper requestor  IRequestor getInfrastructureEvaluationRequestor ICodeSnippetRequestor RequestorWrapper
see org eclipse jdt core eval I Evaluation Context get Package Name public String get Package Name return new String this context get Package Name  IEvaluationContext getPackageName getPackageName getPackageName
Returns the problem factory to be used during evaluation protected I Problem Factory get Problem Factory return Problem Factory get Problem Factory Locale get Default  IProblemFactory getProblemFactory ProblemFactory getProblemFactory getDefault
see org eclipse jdt core eval I Evaluation Context get Project public I Java Project get Project return this project  IEvaluationContext getProject IJavaProject getProject
Handles an install exception by throwing a Java Model exception protected void handle Install Exception Install Exception e throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants EVALUATION ERROR e to String  handleInstallException InstallException JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants EVALUATION_ERROR toString
see org eclipse jdt core eval I Evaluation Context new Variable String String String public I Global Variable new Variable String type Name String name String initializer Global Variable new Var this context new Variable type Name to Char Array name to Char Array initializer null null initializer to Char Array return new Global Variable Wrapper new Var  IEvaluationContext newVariable IGlobalVariable newVariable typeName GlobalVariable newVar newVariable typeName toCharArray toCharArray toCharArray GlobalVariableWrapper newVar
see org eclipse jdt core eval I Evaluation Context set Imports String public void set Imports String imports int length imports length char result new char length for int i 0 i length i result i imports i to Char Array this context set Imports result  IEvaluationContext setImports setImports toCharArray setImports
see org eclipse jdt core eval I Evaluation Context set Package Name String public void set Package Name String package Name this context set Package Name package Name to Char Array  IEvaluationContext setPackageName setPackageName packageName setPackageName packageName toCharArray
see I Evaluation Context validate Imports I Code Snippet Requestor public void validate Imports I Code Snippet Requestor requestor check Builder State I Name Environment environment null try this context evaluate Imports environment get Build Name Environment get Infrastructure Evaluation Requestor requestor get Problem Factory finally if environment null environment cleanup  IEvaluationContext validateImports ICodeSnippetRequestor validateImports ICodeSnippetRequestor checkBuilderState INameEnvironment evaluateImports getBuildNameEnvironment getInfrastructureEvaluationRequestor getProblemFactory
position new I Completion Requestor public void accept Anonymous Type char super Type Package Name char super Type Name char parameter Package Names char parameter Type Names char parameter Names char completion Name int modifiers int completion Start int completion End int relevance implements interface method  ICompletionRequestor acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart completionEnd
implements interface method public void accept Class char package Name char class Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Class package Name class Name completion Name modifiers completion Start completion End  acceptClass packageName className completionName completionStart completionEnd acceptClass packageName className completionName completionStart completionEnd
public void accept Error I Problem error if true return was disabled in 1 0 try I Marker marker Resources Plugin get Workspace get Root create Marker I Java Model Marker TRANSIENT PROBLEM marker set Attribute I Java Model Marker ID error getID marker set Attribute I Marker CHAR START error get Source Start marker set Attribute I Marker CHAR END error get Source End 1 marker set Attribute I Marker LINE NUMBER error get Source Line Number marker set Attribute I Marker MESSAGE error get Message marker set Attribute I Marker SEVERITY I Marker SEVERITY ERROR requestor accept Error marker catch Core Exception e ignore  acceptError IProblem IMarker ResourcesPlugin getWorkspace getRoot createMarker IJavaModelMarker TRANSIENT_PROBLEM setAttribute IJavaModelMarker setAttribute IMarker CHAR_START getSourceStart setAttribute IMarker CHAR_END getSourceEnd setAttribute IMarker LINE_NUMBER getSourceLineNumber setAttribute IMarker getMessage setAttribute IMarker IMarker SEVERITY_ERROR acceptError CoreException
public void accept Field char declaring Type Package Name char declaring Type Name char name char type Package Name char type Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Field declaring Type Package Name declaring Type Name name type Package Name type Name completion Name modifiers completion Start completion End  acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart completionEnd acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart completionEnd
requestor accept Field declaring Type Package Name declaring Type Name name type Package Name type Name completion Name modifiers completion Start completion End public void accept Interface char package Name char interface Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Interface package Name interface Name completion Name modifiers completion Start completion End  acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart completionEnd acceptInterface packageName interfaceName completionName completionStart completionEnd acceptInterface packageName interfaceName completionName completionStart completionEnd
requestor accept Interface package Name interface Name completion Name modifiers completion Start completion End public void accept Keyword char keyword Name int completion Start int completion End int relevance requestor accept Keyword keyword Name completion Start completion End  acceptInterface packageName interfaceName completionName completionStart completionEnd acceptKeyword keywordName completionStart completionEnd acceptKeyword keywordName completionStart completionEnd
requestor accept Keyword keyword Name completion Start completion End public void accept Label char label Name int completion Start int completion End int relevance requestor accept Label label Name completion Start completion End  acceptKeyword keywordName completionStart completionEnd acceptLabel labelName completionStart completionEnd acceptLabel labelName completionStart completionEnd
requestor accept Label label Name completion Start completion End public void accept Local Variable char name char type Package Name char type Name int modifiers int completion Start int completion End int relevance ignore  acceptLabel labelName completionStart completionEnd acceptLocalVariable typePackageName typeName completionStart completionEnd
ignore public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance skip parameter names requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names return Type Package Name return Type Name completion Name modifiers completion Start completion End  acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames returnTypePackageName returnTypeName completionName completionStart completionEnd
requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names return Type Package Name return Type Name completion Name modifiers completion Start completion End public void accept Method Declaration char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance ignore  acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd
ignore public void accept Modifier char modifier Name int completion Start int completion End int relevance requestor accept Modifier modifier Name completion Start completion End  acceptModifier modifierName completionStart completionEnd acceptModifier modifierName completionStart completionEnd
requestor accept Modifier modifier Name completion Start completion End public void accept Package char package Name char completion Name int completion Start int completion End int relevance requestor accept Package package Name completion Name completion Start completion End  acceptModifier modifierName completionStart completionEnd acceptPackage packageName completionName completionStart completionEnd acceptPackage packageName completionName completionStart completionEnd
requestor accept Package package Name completion Name completion Start completion End public void accept Type char package Name char type Name char completion Name int completion Start int completion End int relevance requestor accept Type package Name type Name completion Name completion Start completion End  acceptPackage packageName completionName completionStart completionEnd acceptType packageName typeName completionName completionStart completionEnd acceptType packageName typeName completionName completionStart completionEnd
requestor accept Type package Name type Name completion Name completion Start completion End public void accept Variable Name char type Package Name char type Name char name char completion Name int completion Start int completion End int relevance ignore  acceptType packageName typeName completionName completionStart completionEnd acceptVariableName typePackageName typeName completionName completionStart completionEnd
see I Evaluation Context code Complete String int I Code Completion Requestor deprecated use code Complete String int I Completion Requestor instead public void code Complete String code Snippet int position final org eclipse jdt core I Code Completion Requestor requestor throws Java Model Exception if requestor null code Complete code Snippet position I Completion Requestor null return code Complete code Snippet position new I Completion Requestor public void accept Anonymous Type char super Type Package Name char super Type Name char parameter Package Names char parameter Type Names char parameter Names char completion Name int modifiers int completion Start int completion End int relevance implements interface method public void accept Class char package Name char class Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Class package Name class Name completion Name modifiers completion Start completion End public void accept Error I Problem error if true return was disabled in 1 0 try I Marker marker Resources Plugin get Workspace get Root create Marker I Java Model Marker TRANSIENT PROBLEM marker set Attribute I Java Model Marker ID error getID marker set Attribute I Marker CHAR START error get Source Start marker set Attribute I Marker CHAR END error get Source End 1 marker set Attribute I Marker LINE NUMBER error get Source Line Number marker set Attribute I Marker MESSAGE error get Message marker set Attribute I Marker SEVERITY I Marker SEVERITY ERROR requestor accept Error marker catch Core Exception e ignore public void accept Field char declaring Type Package Name char declaring Type Name char name char type Package Name char type Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Field declaring Type Package Name declaring Type Name name type Package Name type Name completion Name modifiers completion Start completion End public void accept Interface char package Name char interface Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Interface package Name interface Name completion Name modifiers completion Start completion End public void accept Keyword char keyword Name int completion Start int completion End int relevance requestor accept Keyword keyword Name completion Start completion End public void accept Label char label Name int completion Start int completion End int relevance requestor accept Label label Name completion Start completion End public void accept Local Variable char name char type Package Name char type Name int modifiers int completion Start int completion End int relevance ignore public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance skip parameter names requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names return Type Package Name return Type Name completion Name modifiers completion Start completion End public void accept Method Declaration char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance ignore public void accept Modifier char modifier Name int completion Start int completion End int relevance requestor accept Modifier modifier Name completion Start completion End public void accept Package char package Name char completion Name int completion Start int completion End int relevance requestor accept Package package Name completion Name completion Start completion End public void accept Type char package Name char type Name char completion Name int completion Start int completion End int relevance requestor accept Type package Name type Name completion Name completion Start completion End public void accept Variable Name char type Package Name char type Name char name char completion Name int completion Start int completion End int relevance ignore  IEvaluationContext codeComplete ICodeCompletionRequestor codeComplete ICompletionRequestor codeComplete codeSnippet ICodeCompletionRequestor JavaModelException codeComplete codeSnippet ICompletionRequestor codeComplete codeSnippet ICompletionRequestor acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart completionEnd acceptClass packageName className completionName completionStart completionEnd acceptClass packageName className completionName completionStart completionEnd acceptError IProblem IMarker ResourcesPlugin getWorkspace getRoot createMarker IJavaModelMarker TRANSIENT_PROBLEM setAttribute IJavaModelMarker setAttribute IMarker CHAR_START getSourceStart setAttribute IMarker CHAR_END getSourceEnd setAttribute IMarker LINE_NUMBER getSourceLineNumber setAttribute IMarker getMessage setAttribute IMarker IMarker SEVERITY_ERROR acceptError CoreException acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart completionEnd acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart completionEnd acceptInterface packageName interfaceName completionName completionStart completionEnd acceptInterface packageName interfaceName completionName completionStart completionEnd acceptKeyword keywordName completionStart completionEnd acceptKeyword keywordName completionStart completionEnd acceptLabel labelName completionStart completionEnd acceptLabel labelName completionStart completionEnd acceptLocalVariable typePackageName typeName completionStart completionEnd acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptModifier modifierName completionStart completionEnd acceptModifier modifierName completionStart completionEnd acceptPackage packageName completionName completionStart completionEnd acceptPackage packageName completionName completionStart completionEnd acceptType packageName typeName completionName completionStart completionEnd acceptType packageName typeName completionName completionStart completionEnd acceptVariableName typePackageName typeName completionName completionStart completionEnd

Global Variable variable Creates a new wrapper around the given infrastructure global variable Global Variable Wrapper Global Variable variable this variable variable  GlobalVariable GlobalVariableWrapper GlobalVariable
see org eclipse jdt core eval I Global Variable get Initializer public String get Initializer char initializer this variable get Initializer if initializer null return new String initializer else return null  IGlobalVariable getInitializer getInitializer getInitializer
see org eclipse jdt core eval I Global Variable get Name public String get Name return new String this variable get Name  IGlobalVariable getName getName getName
see org eclipse jdt core eval I Global Variable get Type Name public String get Type Name return new String this variable get Type Name  IGlobalVariable getTypeName getTypeName getTypeName

public class Requestor Wrapper implements I Requestor I Code Snippet Requestor requestor public Requestor Wrapper I Code Snippet Requestor requestor this requestor requestor  RequestorWrapper IRequestor ICodeSnippetRequestor RequestorWrapper ICodeSnippetRequestor
see I Code Snippet Requestor public boolean accept Class Files Class File class Files char code Snippet Class Name int length class Files length byte class File Bytes new byte length String compound Names new String length for int i 0 i length i Class File class File class Files i class File Bytes i class File get Bytes char class File Compund Name class File get Compound Name int length2 class File Compund Name length String compound Name new String length2 for int j 0 j length2 j compound Name j new String class File Compund Name j compound Names i compound Name return this requestor accept Class Files class File Bytes compound Names code Snippet Class Name null null new String code Snippet Class Name  ICodeSnippetRequestor acceptClassFiles ClassFile classFiles codeSnippetClassName classFiles classFileBytes compoundNames ClassFile classFile classFiles classFileBytes classFile getBytes classFileCompundName classFile getCompoundName classFileCompundName compoundName compoundName classFileCompundName compoundNames compoundName acceptClassFiles classFileBytes compoundNames codeSnippetClassName codeSnippetClassName
see I Code Snippet Requestor public void accept Problem I Problem problem char fragment Source int fragment Kind try I Marker marker Resources Plugin get Workspace get Root create Marker I Java Model Marker TRANSIENT PROBLEM marker set Attribute I Java Model Marker ID problem getID marker set Attribute I Marker CHAR START problem get Source Start marker set Attribute I Marker CHAR END problem get Source End 1 marker set Attribute I Marker LINE NUMBER problem get Source Line Number marker set Attribute I Marker LOCATION problem get Source Line Number marker set Attribute I Marker MESSAGE problem get Message marker set Attribute I Marker SEVERITY problem is Warning I Marker SEVERITY WARNING I Marker SEVERITY ERROR this requestor accept Problem marker new String fragment Source fragment Kind catch Core Exception e e print Stack Trace  ICodeSnippetRequestor acceptProblem IProblem fragmentSource fragmentKind IMarker ResourcesPlugin getWorkspace getRoot createMarker IJavaModelMarker TRANSIENT_PROBLEM setAttribute IJavaModelMarker setAttribute IMarker CHAR_START getSourceStart setAttribute IMarker CHAR_END getSourceEnd setAttribute IMarker LINE_NUMBER getSourceLineNumber setAttribute IMarker getSourceLineNumber setAttribute IMarker getMessage setAttribute IMarker isWarning IMarker SEVERITY_WARNING IMarker SEVERITY_ERROR acceptProblem fragmentSource fragmentKind CoreException printStackTrace

Type Hierarchy hierarchy public Change Collector Type Hierarchy hierarchy this hierarchy hierarchy  TypeHierarchy ChangeCollector TypeHierarchy
private void add Affected Children I Java Element Delta delta throws Java Model Exception I Java Element Delta children delta get Affected Children for int i 0 length children length i length i I Java Element Delta child children i I Java Element child Element child get Element switch child Element get Element Type case I Java Element IMPORT CONTAINER add Change I Import Container child Element child break case I Java Element IMPORT DECLARATION add Change I Import Declaration child Element child break case I Java Element TYPE add Change I Type child Element child break case I Java Element INITIALIZER case I Java Element FIELD case I Java Element METHOD add Change I Member child Element child break  addAffectedChildren IJavaElementDelta JavaModelException IJavaElementDelta getAffectedChildren IJavaElementDelta IJavaElement childElement getElement childElement getElementType IJavaElement IMPORT_CONTAINER addChange IImportContainer childElement IJavaElement IMPORT_DECLARATION addChange IImportDeclaration childElement IJavaElement addChange IType childElement IJavaElement IJavaElement IJavaElement addChange IMember childElement
public void add Change I Compilation Unit cu I Java Element Delta new Delta throws Java Model Exception int new Kind new Delta get Kind switch new Kind case I Java Element Delta ADDED Array List all Types new Array List get All Types From Element cu all Types for int i 0 length all Types size i length i I Type type I Type all Types get i add Type Addition type Simple Delta this changes get type break case I Java Element Delta REMOVED all Types new Array List get All Types From Hierarchy Java Element cu all Types for int i 0 length all Types size i length i I Type type I Type all Types get i add Type Removal type Simple Delta this changes get type break case I Java Element Delta CHANGED add Affected Children new Delta break  addChange ICompilationUnit IJavaElementDelta newDelta JavaModelException newKind newDelta getKind newKind IJavaElementDelta ArrayList allTypes ArrayList getAllTypesFromElement allTypes allTypes IType IType allTypes addTypeAddition SimpleDelta IJavaElementDelta allTypes ArrayList getAllTypesFromHierarchy JavaElement allTypes allTypes IType IType allTypes addTypeRemoval SimpleDelta IJavaElementDelta addAffectedChildren newDelta
private void add Change I Import Container import Container I Java Element Delta new Delta throws Java Model Exception int new Kind new Delta get Kind if new Kind I Java Element Delta CHANGED add Affected Children new Delta return Simple Delta existing Delta Simple Delta this changes get import Container if existing Delta null switch new Kind case I Java Element Delta ADDED if existing Delta get Kind I Java Element Delta REMOVED REMOVED then ADDED this changes remove import Container break case I Java Element Delta REMOVED if existing Delta get Kind I Java Element Delta ADDED ADDED then REMOVED this changes remove import Container break CHANGED handled above else Simple Delta delta new Simple Delta switch new Kind case I Java Element Delta ADDED delta added break case I Java Element Delta REMOVED delta removed break this changes put import Container delta  addChange IImportContainer importContainer IJavaElementDelta newDelta JavaModelException newKind newDelta getKind newKind IJavaElementDelta addAffectedChildren newDelta SimpleDelta existingDelta SimpleDelta importContainer existingDelta newKind IJavaElementDelta existingDelta getKind IJavaElementDelta importContainer IJavaElementDelta existingDelta getKind IJavaElementDelta importContainer SimpleDelta SimpleDelta newKind IJavaElementDelta IJavaElementDelta importContainer
private void add Change I Import Declaration import Decl I Java Element Delta new Delta Simple Delta existing Delta Simple Delta this changes get import Decl int new Kind new Delta get Kind if existing Delta null switch new Kind case I Java Element Delta ADDED if existing Delta get Kind I Java Element Delta REMOVED REMOVED then ADDED this changes remove import Decl break case I Java Element Delta REMOVED if existing Delta get Kind I Java Element Delta ADDED ADDED then REMOVED this changes remove import Decl break CHANGED cannot happen for import declaration else Simple Delta delta new Simple Delta switch new Kind case I Java Element Delta ADDED delta added break case I Java Element Delta REMOVED delta removed break this changes put import Decl delta  addChange IImportDeclaration importDecl IJavaElementDelta newDelta SimpleDelta existingDelta SimpleDelta importDecl newKind newDelta getKind existingDelta newKind IJavaElementDelta existingDelta getKind IJavaElementDelta importDecl IJavaElementDelta existingDelta getKind IJavaElementDelta importDecl SimpleDelta SimpleDelta newKind IJavaElementDelta IJavaElementDelta importDecl
private void add Change I Member member I Java Element Delta new Delta throws Java Model Exception int new Kind new Delta get Kind switch new Kind case I Java Element Delta ADDED Array List all Types new Array List get All Types From Element member all Types for int i 0 length all Types size i length i I Type inner Type I Type all Types get i add Type Addition inner Type Simple Delta this changes get inner Type break case I Java Element Delta REMOVED all Types new Array List get All Types From Hierarchy Java Element member all Types for int i 0 length all Types size i length i I Type type I Type all Types get i add Type Removal type Simple Delta this changes get type break case I Java Element Delta CHANGED add Affected Children new Delta break  addChange IMember IJavaElementDelta newDelta JavaModelException newKind newDelta getKind newKind IJavaElementDelta ArrayList allTypes ArrayList getAllTypesFromElement allTypes allTypes IType innerType IType allTypes addTypeAddition innerType SimpleDelta innerType IJavaElementDelta allTypes ArrayList getAllTypesFromHierarchy JavaElement allTypes allTypes IType IType allTypes addTypeRemoval SimpleDelta IJavaElementDelta addAffectedChildren newDelta
private void add Change I Type type I Java Element Delta new Delta throws Java Model Exception int new Kind new Delta get Kind Simple Delta existing Delta Simple Delta this changes get type switch new Kind case I Java Element Delta ADDED add Type Addition type existing Delta Array List all Types new Array List get All Types From Element type all Types for int i 0 length all Types size i length i I Type inner Type I Type all Types get i add Type Addition inner Type Simple Delta this changes get inner Type break case I Java Element Delta REMOVED add Type Removal type existing Delta all Types new Array List get All Types From Hierarchy Java Element type all Types for int i 0 length all Types size i length i I Type inner Type I Type all Types get i add Type Removal inner Type Simple Delta this changes get inner Type break case I Java Element Delta CHANGED add Type Change type new Delta get Flags existing Delta add Affected Children new Delta break  addChange IType IJavaElementDelta newDelta JavaModelException newKind newDelta getKind SimpleDelta existingDelta SimpleDelta newKind IJavaElementDelta addTypeAddition existingDelta ArrayList allTypes ArrayList getAllTypesFromElement allTypes allTypes IType innerType IType allTypes addTypeAddition innerType SimpleDelta innerType IJavaElementDelta addTypeRemoval existingDelta allTypes ArrayList getAllTypesFromHierarchy JavaElement allTypes allTypes IType innerType IType allTypes addTypeRemoval innerType SimpleDelta innerType IJavaElementDelta addTypeChange newDelta getFlags existingDelta addAffectedChildren newDelta
private void add Type Addition I Type type Simple Delta existing Delta throws Java Model Exception if existing Delta null switch existing Delta get Kind case I Java Element Delta REMOVED REMOVED then ADDED boolean has Change false if has Super Type Change type existing Delta super Types has Change true if has Visibility Change type existing Delta modifiers has Change true if has Change this changes remove type break CHANGED then ADDED or ADDED then ADDED should not happen else check whether the type addition affects the hierarchy String type Name type get Element Name if this hierarchy has Supertype type Name this hierarchy subtypes Include Supertype Of type this hierarchy missing Types contains type Name Simple Delta delta new Simple Delta delta added this changes put type delta  addTypeAddition IType SimpleDelta existingDelta JavaModelException existingDelta existingDelta getKind IJavaElementDelta hasChange hasSuperTypeChange existingDelta superTypes hasChange hasVisibilityChange existingDelta hasChange hasChange typeName getElementName hasSupertype typeName subtypesIncludeSupertypeOf missingTypes typeName SimpleDelta SimpleDelta
private void add Type Change I Type type int new Flags Simple Delta existing Delta throws Java Model Exception if existing Delta null switch existing Delta get Kind case I Java Element Delta CHANGED CHANGED then CHANGED int existing Flags existing Delta get Flags boolean has Change false if existing Flags I Java Element Delta F SUPER TYPES 0 has Super Type Change type existing Delta super Types has Change true if existing Flags I Java Element Delta F MODIFIERS 0 has Visibility Change type existing Delta modifiers has Change true if has Change super types and visibility are back to the ones in the existing hierarchy this changes remove type break ADDED then CHANGED leave it as ADDED REMOVED then CHANGED should not happen else check whether the type change affects the hierarchy Simple Delta type Delta null if new Flags I Java Element Delta F SUPER TYPES 0 this hierarchy includes Type Or Supertype type type Delta new Simple Delta type Delta super Types if new Flags I Java Element Delta F MODIFIERS 0 this hierarchy has Supertype type get Element Name if type Delta null type Delta new Simple Delta type Delta modifiers if type Delta null this changes put type type Delta  addTypeChange IType newFlags SimpleDelta existingDelta JavaModelException existingDelta existingDelta getKind IJavaElementDelta existingFlags existingDelta getFlags hasChange existingFlags IJavaElementDelta F_SUPER_TYPES hasSuperTypeChange existingDelta superTypes hasChange existingFlags IJavaElementDelta F_MODIFIERS hasVisibilityChange existingDelta hasChange hasChange SimpleDelta typeDelta newFlags IJavaElementDelta F_SUPER_TYPES includesTypeOrSupertype typeDelta SimpleDelta typeDelta superTypes newFlags IJavaElementDelta F_MODIFIERS hasSupertype getElementName typeDelta typeDelta SimpleDelta typeDelta typeDelta typeDelta
private void add Type Removal I Type type Simple Delta existing Delta if existing Delta null switch existing Delta get Kind case I Java Element Delta ADDED ADDED then REMOVED this changes remove type break case I Java Element Delta CHANGED CHANGED then REMOVED existing Delta removed break REMOVED then REMOVED should not happen else check whether the type removal affects the hierarchy if this hierarchy contains type Simple Delta type Delta new Simple Delta type Delta removed this changes put type type Delta  addTypeRemoval IType SimpleDelta existingDelta existingDelta existingDelta getKind IJavaElementDelta IJavaElementDelta existingDelta SimpleDelta typeDelta SimpleDelta typeDelta typeDelta
private void get All Types From Element I Java Element element Array List all Types throws Java Model Exception switch element get Element Type case I Java Element COMPILATION UNIT I Type types I Compilation Unit element get Types for int i 0 length types length i length i I Type type types i all Types add type get All Types From Element type all Types break case I Java Element TYPE types I Type element get Types for int i 0 length types length i length i I Type type types i all Types add type get All Types From Element type all Types break case I Java Element INITIALIZER case I Java Element FIELD case I Java Element METHOD I Java Element children I Member element get Children for int i 0 length children length i length i I Type type I Type children i all Types add type get All Types From Element type all Types break  getAllTypesFromElement IJavaElement ArrayList allTypes JavaModelException getElementType IJavaElement COMPILATION_UNIT IType ICompilationUnit getTypes IType allTypes getAllTypesFromElement allTypes IJavaElement IType getTypes IType allTypes getAllTypesFromElement allTypes IJavaElement IJavaElement IJavaElement IJavaElement IMember getChildren IType IType allTypes getAllTypesFromElement allTypes
private void get All Types From Hierarchy Java Element element Array List all Types switch element get Element Type case I Java Element COMPILATION UNIT Array List types Array List this hierarchy files get element if types null all Types add All types break case I Java Element TYPE case I Java Element INITIALIZER case I Java Element FIELD case I Java Element METHOD types Array List this hierarchy files get I Member element get Compilation Unit if types null for int i 0 length types size i length i I Type type I Type types get i if element is Ancestor Of type all Types add type break  getAllTypesFromHierarchy JavaElement ArrayList allTypes getElementType IJavaElement COMPILATION_UNIT ArrayList ArrayList allTypes addAll IJavaElement IJavaElement IJavaElement IJavaElement ArrayList IMember getCompilationUnit IType IType isAncestorOf allTypes
private boolean has Super Type Change I Type type throws Java Model Exception check super class I Type superclass this hierarchy get Superclass type String existing Superclass Name superclass null null superclass get Element Name String new Superclass Name type get Superclass Name if existing Superclass Name null existing Superclass Name equals new Superclass Name return true check super interfaces I Type existing Super Interfaces this hierarchy get Super Interfaces type String new Super Interfaces type get Super Interface Names if existing Super Interfaces length new Super Interfaces length return true for int i 0 length new Super Interfaces length i length i String super Interface Name new Super Interfaces i if super Interface Name equals new Super Interfaces i return true return false  hasSuperTypeChange IType JavaModelException IType getSuperclass existingSuperclassName getElementName newSuperclassName getSuperclassName existingSuperclassName existingSuperclassName newSuperclassName IType existingSuperInterfaces getSuperInterfaces newSuperInterfaces getSuperInterfaceNames existingSuperInterfaces newSuperInterfaces newSuperInterfaces superInterfaceName newSuperInterfaces superInterfaceName newSuperInterfaces
private boolean has Visibility Change I Type type throws Java Model Exception int existing Flags this hierarchy get Cached Flags type int new Flags type get Flags return existing Flags new Flags  hasVisibilityChange IType JavaModelException existingFlags getCachedFlags newFlags getFlags existingFlags newFlags
Whether the hierarchy needs refresh according to the changes collected so far public boolean needs Refresh return changes size 0  needsRefresh
public String to String String Buffer buffer new String Buffer Iterator iterator this changes entry Set iterator while iterator has Next Map Entry entry Map Entry iterator next buffer append Java Element entry get Key to Debug String buffer append entry get Value if iterator has Next buffer append n return buffer to String  toString StringBuffer StringBuffer entrySet hasNext JavaElement getKey toDebugString getValue hasNext toString

public Hierarchy Binary Type int modifiers char qualification char type Name char enclosing Type Name char class Or Interface this modifiers modifiers this is Class class Or Interface I Index Constants CLASS SUFFIX if enclosing Type Name null this name Char Operation concat qualification type Name else this name Char Operation concat qualification enclosing Type Name type Name rebuild A B name this enclosing Type Name Char Operation concat qualification enclosing Type Name Char Operation replace this enclosing Type Name Char Operation replace this name  HierarchyBinaryType typeName enclosingTypeName classOrInterface isClass classOrInterface IIndexConstants CLASS_SUFFIX enclosingTypeName CharOperation typeName CharOperation enclosingTypeName typeName enclosingTypeName CharOperation enclosingTypeName CharOperation enclosingTypeName CharOperation
Answer the resolved name of the enclosing type in the class file format as specified in section 4 2 of the Java 2 VM spec or null if the receiver is a top level type For example java lang String is java lang String public char get Enclosing Type Name return this enclosing Type Name  getEnclosingTypeName enclosingTypeName
Answer the receiver s fields or null if the array is empty public I Binary Field get Fields return null  IBinaryField getFields
Answer the file name which defines the type The path part optional must be separated from the actual file proper name by a java io File separator The proper file name includes the suffix extension e g java e g c com ibm compiler java api Compiler java public char get File Name return null  getFileName
Answer the resolved names of the receiver s interfaces in the class file format as specified in section 4 2 of the Java 2 VM spec or null if the array is empty For example java lang String is java lang String public char get Interface Names return this super Interfaces  getInterfaceNames superInterfaces
Answer the receiver s nested types or null if the array is empty This nested type info is extracted from the inner class attributes Ask the name environment to find a member type using its compound name public I Binary Nested Type get Member Types return null  IBinaryNestedType getMemberTypes
Answer the receiver s methods or null if the array is empty public I Binary Method get Methods return null  IBinaryMethod getMethods
Answer an int whose bits are set according the access constants defined by the VM spec public int get Modifiers return this modifiers  getModifiers
Answer the resolved name of the type in the class file format as specified in section 4 2 of the Java 2 VM spec For example java lang String is java lang String public char get Name return this name  getName
Answer the resolved name of the receiver s superclass in the class file format as specified in section 4 2 of the Java 2 VM spec or null if it does not have one For example java lang String is java lang String public char get Superclass Name return this superclass  getSuperclassName
return this superclass public boolean is Anonymous return false index did not record this information since unused for hierarchies  isAnonymous
Answer whether the receiver contains the resolved binary form or the unresolved source form of the type public boolean is Binary Type return true  isBinaryType
is Class method comment public boolean is Class return this is Class  isClass isClass isClass
is Interface method comment public boolean is Interface return this is Class  isInterface isInterface isClass
return this is Class public boolean is Local return false index did not record this information since unused for hierarchies  isClass isLocal
return false index did not record this information since unused for hierarchies public boolean is Member return false index did not record this information since unused for hierarchies  isMember
public void record Super Type char super Type Name char super Qualification char super Class Or Interface index encoding of p A B was B p A rebuild the proper name if super Qualification null int length super Qualification length if super Qualification length 1 char enclosing Super Name Char Operation last Segment super Qualification super Type Name Char Operation concat enclosing Super Name super Type Name super Qualification Char Operation subarray super Qualification 0 length enclosing Super Name length 1 if super Class Or Interface I Index Constants CLASS SUFFIX interfaces are indexed as having superclass references to Object by default this is an artifact used for being able to query them only if this is Class return char encoded Name Char Operation concat super Qualification super Type Name Char Operation replace encoded Name this superclass encoded Name else char encoded Name Char Operation concat super Qualification super Type Name Char Operation replace encoded Name if this super Interfaces No Interface this super Interfaces new char encoded Name else int length this super Interfaces length System arraycopy this super Interfaces 0 this super Interfaces new char length 1 0 length this super Interfaces length encoded Name  recordSuperType superTypeName superQualification superClassOrInterface superQualification superQualification superQualification enclosingSuperName CharOperation lastSegment superQualification superTypeName CharOperation enclosingSuperName superTypeName superQualification CharOperation superQualification enclosingSuperName superClassOrInterface IIndexConstants CLASS_SUFFIX isClass encodedName CharOperation superQualification superTypeName CharOperation encodedName encodedName encodedName CharOperation superQualification superTypeName CharOperation encodedName superInterfaces NoInterface superInterfaces encodedName superInterfaces superInterfaces superInterfaces superInterfaces encodedName
public String to String String Buffer buffer new String Buffer if this modifiers I Constants Acc Public buffer append public NON NLS 1 if this is Class buffer append class NON NLS 1 else buffer append interface NON NLS 1 if this name null buffer append this name if this superclass null buffer append n extends NON NLS 1 buffer append this superclass int length if this super Interfaces null length this super Interfaces length 0 buffer append n implements NON NLS 1 for int i 0 i length i buffer append this super Interfaces i if i length 1 buffer append NON NLS 1 return buffer to String  toString StringBuffer StringBuffer IConstants AccPublic isClass superInterfaces superInterfaces superInterfaces toString
see org eclipse jdt internal compiler env I Binary Type public char source File Name return null  IBinaryType sourceFileName

protected Map info To Handle public Hierarchy Builder Type Hierarchy hierarchy throws Java Model Exception this hierarchy hierarchy Java Project project Java Project hierarchy java Project I Type focus Type hierarchy get Type org eclipse jdt core I Compilation Unit unit To Look Inside focus Type null null focus Type get Compilation Unit org eclipse jdt core I Compilation Unit working Copies this hierarchy working Copies org eclipse jdt core I Compilation Unit units To Look Inside if unit To Look Inside null int wc Length working Copies null 0 working Copies length if wc Length 0 units To Look Inside new org eclipse jdt core I Compilation Unit unit To Look Inside else units To Look Inside new org eclipse jdt core I Compilation Unit wc Length 1 units To Look Inside 0 unit To Look Inside System arraycopy working Copies 0 units To Look Inside 1 wc Length else units To Look Inside working Copies Searchable Environment searchable Environment Searchable Environment project new Searchable Name Environment units To Look Inside this name Lookup searchable Environment name Lookup this hierarchy Resolver new Hierarchy Resolver searchable Environment project get Options true this new Default Problem Factory this info To Handle new Hash Map 5  infoToHandle HierarchyBuilder TypeHierarchy JavaModelException JavaProject JavaProject javaProject IType focusType getType ICompilationUnit unitToLookInside focusType focusType getCompilationUnit ICompilationUnit workingCopies workingCopies ICompilationUnit unitsToLookInside unitToLookInside wcLength workingCopies workingCopies wcLength unitsToLookInside ICompilationUnit unitToLookInside unitsToLookInside ICompilationUnit wcLength unitsToLookInside unitToLookInside workingCopies unitsToLookInside wcLength unitsToLookInside workingCopies SearchableEnvironment searchableEnvironment SearchableEnvironment newSearchableNameEnvironment unitsToLookInside nameLookup searchableEnvironment nameLookup hierarchyResolver HierarchyResolver searchableEnvironment getOptions DefaultProblemFactory infoToHandle HashMap
public abstract void build boolean compute Subtypes throws Java Model Exception Core Exception  computeSubtypes JavaModelException CoreException
throws Java Model Exception Core Exception Configure this type hierarchy by computing the supertypes only protected void build Supertypes I Type focus Type this get Type if focus Type null return get generic type from focus type I Generic Type type try type I Generic Type Java Element focus Type get Element Info catch Java Model Exception e if the focus type is not present or if cannot get workbench path we cannot create the hierarchy return NB no need to set focus type on hierarchy resolver since no other type is injected in the hierarchy resolver thus there is no need to check that a type is a sub or super type of the focus type this hierarchy Resolver resolve type Add focus if not already in case of a type with no explicit super type if this hierarchy contains focus Type this hierarchy add Root Class focus Type  JavaModelException CoreException buildSupertypes IType focusType getType focusType IGenericType IGenericType JavaElement focusType getElementInfo JavaModelException hierarchyResolver focusType addRootClass focusType
see I Hierarchy Requestor public void connect I Generic Type supplied Type I Generic Type superclass I Generic Type superinterfaces convert all infos to handles I Type type Handle get Handle supplied Type Temporary workaround for 1G2O5WK ITPJCORE WINNT Null Pointer Exception when selecting Show in Type Hierarchy for a inner class if type Handle null return I Type super Handle null if superclass null if superclass instanceof Hierarchy Resolver Missing Type this hierarchy missing Types add Hierarchy Resolver Missing Type superclass simple Name else super Handle get Handle superclass I Type interface Handles null if superinterfaces null superinterfaces length 0 int length superinterfaces length I Type resolved Interface Handles new I Type length int index 0 for int i 0 i length i I Generic Type super Interface superinterfaces i if super Interface null if super Interface instanceof Hierarchy Resolver Missing Type this hierarchy missing Types add Hierarchy Resolver Missing Type super Interface simple Name else resolved Interface Handles index get Handle super Interface if resolved Interface Handles index null index resize System arraycopy resolved Interface Handles 0 interface Handles new I Type index 0 index if Type Hierarchy DEBUG System out println Connecting Java Element type Handle to String With Ancestors NON NLS 1 System out println to superclass NON NLS 1 super Handle null None NON NLS 1 Java Element super Handle to String With Ancestors System out print and superinterfaces NON NLS 1 if interface Handles null interface Handles length 0 System out println None NON NLS 1 else System out println for int i 0 length interface Handles length i length i System out println Java Element interface Handles i to String With Ancestors NON NLS 1 now do the caching if supplied Type is Class if super Handle null this hierarchy add Root Class type Handle else this hierarchy cache Superclass type Handle super Handle else this hierarchy add Interface type Handle if interface Handles null interface Handles Type Hierarchy NO TYPE this hierarchy cache Super Interfaces type Handle interface Handles record flags this hierarchy cache Flags type Handle supplied Type get Modifiers  IHierarchyRequestor IGenericType suppliedType IGenericType IGenericType IType typeHandle getHandle suppliedType NullPointerException typeHandle IType superHandle HierarchyResolver MissingType missingTypes HierarchyResolver MissingType simpleName superHandle getHandle IType interfaceHandles IType resolvedInterfaceHandles IType IGenericType superInterface superInterface superInterface HierarchyResolver MissingType missingTypes HierarchyResolver MissingType superInterface simpleName resolvedInterfaceHandles getHandle superInterface resolvedInterfaceHandles resolvedInterfaceHandles interfaceHandles IType TypeHierarchy JavaElement typeHandle toStringWithAncestors superHandle JavaElement superHandle toStringWithAncestors interfaceHandles interfaceHandles interfaceHandles JavaElement interfaceHandles toStringWithAncestors suppliedType isClass superHandle addRootClass typeHandle cacheSuperclass typeHandle superHandle addInterface typeHandle interfaceHandles interfaceHandles TypeHierarchy NO_TYPE cacheSuperInterfaces typeHandle interfaceHandles cacheFlags typeHandle suppliedType getModifiers
Returns a handle for the given generic type or null if not found protected I Type get Handle I Generic Type generic Type if generic Type null return null if generic Type instanceof Hierarchy Type I Type handle I Type this info To Handle get generic Type if handle null handle Hierarchy Type generic Type type Handle this info To Handle put generic Type handle return handle else if generic Type is Binary Type I Class File class File I Class File this info To Handle get generic Type if it s null it s from outside the region so do lookup if class File null I Type handle lookup Binary Handle I Binary Type generic Type if handle null return null case of an anonymous type see 1G2O5WK ITPJCORE WINNT Null Pointer Exception when selecting Show in Type Hierarchy for a inner class optimization remember the handle for next call case of java io Serializable that a lot of classes implement this info To Handle put generic Type handle get Parent return handle else try return class File get Type catch Java Model Exception e return null else if generic Type instanceof Source Type Element Info return Source Type Element Info generic Type get Handle else return null  IType getHandle IGenericType genericType genericType genericType HierarchyType IType IType infoToHandle genericType HierarchyType genericType typeHandle infoToHandle genericType genericType isBinaryType IClassFile classFile IClassFile infoToHandle genericType classFile IType lookupBinaryHandle IBinaryType genericType NullPointerException infoToHandle genericType getParent classFile getType JavaModelException genericType SourceTypeElementInfo SourceTypeElementInfo genericType getHandle
return null protected I Type get Type return this hierarchy get Type  IType getType getType
Looks up and returns a handle for the given binary info protected I Type lookup Binary Handle I Binary Type type Info int flag String qualified Name if type Info is Class flag Name Lookup ACCEPT CLASSES else flag Name Lookup ACCEPT INTERFACES char b Name type Info get Name qualified Name new String Class File translated Name b Name return this name Lookup find Type qualified Name false flag  IType lookupBinaryHandle IBinaryType typeInfo qualifiedName typeInfo isClass NameLookup ACCEPT_CLASSES NameLookup ACCEPT_INTERFACES bName typeInfo getName qualifiedName ClassFile translatedName bName nameLookup findType qualifiedName
protected void worked I Progress Monitor monitor int work if monitor null if monitor is Canceled throw new Operation Canceled Exception else monitor worked work  IProgressMonitor isCanceled OperationCanceledException
Create an I Compilation Unit info from the given compilation unit on disk protected I Compilation Unit create Compilation Unit From Path Openable handle String os Path return new Basic Compilation Unit null null os Path handle  ICompilationUnit ICompilationUnit createCompilationUnitFromPath osPath BasicCompilationUnit osPath
Creates the type info from the given class file on disk and adds it to the given list of infos protected I Binary Type create Info From Class File Openable handle String os Path I Binary Type info null try info org eclipse jdt internal compiler classfmt Class File Reader read os Path catch org eclipse jdt internal compiler classfmt Class Format Exception e if Type Hierarchy DEBUG e print Stack Trace return null catch java io IO Exception e if Type Hierarchy DEBUG e print Stack Trace return null this info To Handle put info handle return info  IBinaryType createInfoFromClassFile osPath IBinaryType ClassFileReader osPath ClassFormatException TypeHierarchy printStackTrace IOException TypeHierarchy printStackTrace infoToHandle
Create a type info from the given class file in a jar and adds it to the given list of infos protected I Binary Type create Info From Class File In Jar Openable class File I Java Element pkg class File get Parent String class File Path pkg get Element Name replace class File get Element Name NON NLS 1 I Binary Type info null java util zip Zip File zip File null try zip File Jar Package Fragment Root pkg get Parent get Jar info org eclipse jdt internal compiler classfmt Class File Reader read zip File class File Path catch org eclipse jdt internal compiler classfmt Class Format Exception e if Type Hierarchy DEBUG e print Stack Trace return null catch java io IO Exception e if Type Hierarchy DEBUG e print Stack Trace return null catch Core Exception e if Type Hierarchy DEBUG e print Stack Trace return null finally Java Model Manager get Java Model Manager close Zip File zip File this info To Handle put info class File return info  IBinaryType createInfoFromClassFileInJar classFile IJavaElement classFile getParent classFilePath getElementName classFile getElementName IBinaryType ZipFile zipFile zipFile JarPackageFragmentRoot getParent getJar ClassFileReader zipFile classFilePath ClassFormatException TypeHierarchy printStackTrace IOException TypeHierarchy printStackTrace CoreException TypeHierarchy printStackTrace JavaModelManager getJavaModelManager closeZipFile zipFile infoToHandle classFile

public String simple Name public Missing Type String simple Name this simple Name simple Name  simpleName MissingType simpleName simpleName simpleName
see I Dependent get File Name public char get File Name return null  IDependent getFileName getFileName
see I Generic Type get Modifiers public int get Modifiers return 0  IGenericType getModifiers getModifiers
see I Generic Type is Binary Type public boolean is Binary Type return false  IGenericType isBinaryType isBinaryType
see I Generic Type is Class public boolean is Class return false  IGenericType isClass isClass
see I Generic Type is Interface public boolean is Interface return false  IGenericType isInterface isInterface
public String to String return Missing type this simple Name NON NLS 1  toString simpleName
public Hierarchy Resolver I Name Environment name Environment Map settings Hierarchy Builder requestor I Problem Factory problem Factory create a problem handler with the exit after all problems handling policy this options new Compiler Options settings I Error Handling Policy policy Default Error Handling Policies exit After All Problems Problem Reporter problem Reporter new Problem Reporter policy this options problem Factory this set Environment new Lookup Environment this this options problem Reporter name Environment requestor  HierarchyResolver INameEnvironment nameEnvironment HierarchyBuilder IProblemFactory problemFactory CompilerOptions IErrorHandlingPolicy DefaultErrorHandlingPolicies exitAfterAllProblems ProblemReporter problemReporter ProblemReporter problemFactory setEnvironment LookupEnvironment problemReporter nameEnvironment
requestor public Hierarchy Resolver Lookup Environment lookup Environment Hierarchy Builder requestor this set Environment lookup Environment requestor  HierarchyResolver LookupEnvironment lookupEnvironment HierarchyBuilder setEnvironment lookupEnvironment
Add an additional binary type param binary Type param package Binding public void accept I Binary Type binary Type Package Binding package Binding Binary Type Binding type Binding this lookup Environment create Binary Type From binary Type package Binding try this remember binary Type type Binding catch Abort Compilation e ignore  binaryType packageBinding IBinaryType binaryType PackageBinding packageBinding BinaryTypeBinding typeBinding lookupEnvironment createBinaryTypeFrom binaryType packageBinding binaryType typeBinding AbortCompilation
Add an additional compilation unit param source Unit public void accept I Compilation Unit source Unit System out println Cannot accept compilation units inside the Hierarchy Resolver this lookup Environment problem Reporter abort Due To Internal Error new String Buffer Util bind accept cannot NON NLS 1 append source Unit get File Name to String  sourceUnit ICompilationUnit sourceUnit HierarchyResolver lookupEnvironment problemReporter abortDueToInternalError StringBuffer sourceUnit getFileName toString
Add additional source types param source Types param package Binding public void accept I Source Type source Types Package Binding package Binding find most enclosing type first needed when explicit ask For Type is done with a member type e g p A B I Source Type source Type source Types 0 while source Type get Enclosing Type null source Type source Type get Enclosing Type build corresponding compilation unit Compilation Result result new Compilation Result source Type get File Name 1 1 this options max Problems Per Unit Compilation Unit Declaration unit Source Type Converter build Compilation Unit new I Source Type source Type ignore secondary types to improve laziness Source Type Converter MEMBER TYPE need member types no need for field initialization this lookup Environment problem Reporter result build bindings if unit null try this lookup Environment build Type Bindings unit org eclipse jdt core I Compilation Unit cu Source Type Element Info source Type get Handle get Compilation Unit remember All Types unit cu false this lookup Environment complete Type Bindings unit true build constructor only catch Abort Compilation e missing java lang package ignore  sourceTypes packageBinding ISourceType sourceTypes PackageBinding packageBinding askForType ISourceType sourceType sourceTypes sourceType getEnclosingType sourceType sourceType getEnclosingType CompilationResult CompilationResult sourceType getFileName maxProblemsPerUnit CompilationUnitDeclaration SourceTypeConverter buildCompilationUnit ISourceType sourceType SourceTypeConverter MEMBER_TYPE lookupEnvironment problemReporter lookupEnvironment buildTypeBindings ICompilationUnit SourceTypeElementInfo sourceType getHandle getCompilationUnit rememberAllTypes lookupEnvironment completeTypeBindings AbortCompilation
private I Generic Type find Super Class I Generic Type type Reference Binding type Binding Reference Binding super Binding type Binding superclass if super Binding null if super Binding id Type Ids T JavaLangObject type Binding is Hierarchy Inconsistent char superclass Name char separator if type instanceof I Binary Type superclass Name I Binary Type type get Superclass Name separator else if type instanceof I Source Type superclass Name I Source Type type get Superclass Name separator else if type instanceof Hierarchy Type superclass Name Hierarchy Type type superclass Name separator else return null if superclass Name null check whether subclass of Object due to broken hierarchy as opposed to explicitly extending it int last Separator Char Operation last Index Of separator superclass Name char simple Name last Separator 1 superclass Name Char Operation subarray superclass Name last Separator 1 superclass Name length if Char Operation equals simple Name Type Constants OBJECT this has Missing Super Class true return new Missing Type new String simple Name for int t this type Index t 0 t if this type Bindings t super Binding return this type Models t return null  IGenericType findSuperClass IGenericType ReferenceBinding typeBinding ReferenceBinding superBinding typeBinding superBinding superBinding TypeIds T_JavaLangObject typeBinding isHierarchyInconsistent superclassName IBinaryType superclassName IBinaryType getSuperclassName ISourceType superclassName ISourceType getSuperclassName HierarchyType superclassName HierarchyType superclassName superclassName lastSeparator CharOperation lastIndexOf superclassName simpleName lastSeparator superclassName CharOperation superclassName lastSeparator superclassName CharOperation simpleName TypeConstants hasMissingSuperClass MissingType simpleName typeIndex typeBindings superBinding typeModels
private I Generic Type find Super Interfaces I Generic Type type Reference Binding type Binding char super Interface Names char separator if type instanceof I Binary Type super Interface Names I Binary Type type get Interface Names separator else if type instanceof I Source Type I Source Type source Type I Source Type type if source Type get Name length 0 if anonymous type if type Binding super Interfaces null type Binding super Interfaces length 0 super Interface Names new char source Type get Superclass Name else super Interface Names source Type get Interface Names else super Interface Names source Type get Interface Names separator else if type instanceof Hierarchy Type Hierarchy Type hierarchy Type Hierarchy Type type if hierarchy Type name length 0 if anonymous type if type Binding super Interfaces null type Binding super Interfaces length 0 super Interface Names new char hierarchy Type superclass Name else super Interface Names hierarchy Type super Interface Names else super Interface Names hierarchy Type super Interface Names separator else return null Reference Binding interface Bindings type Binding super Interfaces int binding Index 0 int binding Length interface Bindings null 0 interface Bindings length int length super Interface Names null 0 super Interface Names length I Generic Type superinterfaces new I Generic Type length next for int i 0 i length i char super Interface Name super Interface Names i int last Separator Char Operation last Index Of separator super Interface Name char simple Name last Separator 1 super Interface Name Char Operation subarray super Interface Name last Separator 1 super Interface Name length case of binary inner type take the last part int start Char Operation last Index Of simple Name 1 if start 0 int name Length simple Name length start System arraycopy simple Name start simple Name new char name Length 0 name Length if binding Index binding Length Reference Binding interface Binding interface Bindings binding Index ensure that the binding corresponds to the interface defined by the user if Char Operation equals simple Name interface Binding source Name binding Index for int t this type Index t 0 t if this type Bindings t interface Binding superinterfaces i this type Models t continue next superinterfaces i new Missing Type new String simple Name return superinterfaces  IGenericType findSuperInterfaces IGenericType ReferenceBinding typeBinding superInterfaceNames IBinaryType superInterfaceNames IBinaryType getInterfaceNames ISourceType ISourceType sourceType ISourceType sourceType getName typeBinding superInterfaces typeBinding superInterfaces superInterfaceNames sourceType getSuperclassName superInterfaceNames sourceType getInterfaceNames superInterfaceNames sourceType getInterfaceNames HierarchyType HierarchyType hierarchyType HierarchyType hierarchyType typeBinding superInterfaces typeBinding superInterfaces superInterfaceNames hierarchyType superclassName superInterfaceNames hierarchyType superInterfaceNames superInterfaceNames hierarchyType superInterfaceNames ReferenceBinding interfaceBindings typeBinding superInterfaces bindingIndex bindingLength interfaceBindings interfaceBindings superInterfaceNames superInterfaceNames IGenericType IGenericType superInterfaceName superInterfaceNames lastSeparator CharOperation lastIndexOf superInterfaceName simpleName lastSeparator superInterfaceName CharOperation superInterfaceName lastSeparator superInterfaceName CharOperation lastIndexOf simpleName nameLength simpleName simpleName simpleName nameLength nameLength bindingIndex bindingLength ReferenceBinding interfaceBinding interfaceBindings bindingIndex CharOperation simpleName interfaceBinding sourceName bindingIndex typeIndex typeBindings interfaceBinding typeModels MissingType simpleName
private void remember I Generic Type supplied Type Reference Binding type Binding if type Binding null return if this type Index this type Models length System arraycopy this type Models 0 this type Models new I Generic Type this type Index 2 0 this type Index System arraycopy this type Bindings 0 this type Bindings new Reference Binding this type Index 2 0 this type Index this type Models this type Index supplied Type this type Bindings this type Index type Binding  IGenericType suppliedType ReferenceBinding typeBinding typeBinding typeIndex typeModels typeModels typeModels IGenericType typeIndex typeIndex typeBindings typeBindings ReferenceBinding typeIndex typeIndex typeModels typeIndex suppliedType typeBindings typeIndex typeBinding
private void remember I Type type Reference Binding type Binding if Compilation Unit type get Compilation Unit is Open try I Generic Type generic Type I Generic Type Java Element type get Element Info remember generic Type type Binding catch Java Model Exception e cannot happen since element is open return else if type Binding null return Type Declaration type Declaration Source Type Binding type Binding scope reference Type simple super class name char superclass Name null Type Reference superclass if type Declaration bits AST Node Is Anonymous TypeMASK 0 superclass type Declaration allocation type else superclass type Declaration superclass if superclass null char type Name superclass get Type Name superclass Name type Name null null type Name type Name length 1 simple super interface names char super Interface Names null Type Reference super Interfaces type Declaration super Interfaces if super Interfaces null int length super Interfaces length super Interface Names new char length for int i 0 i length i Type Reference super Interface super Interfaces i char type Name super Interface get Type Name super Interface Names i type Name type Name length 1 Hierarchy Type hierarchy Type new Hierarchy Type type type Declaration is Interface type Declaration name type Declaration binding modifiers superclass Name super Interface Names remember hierarchy Type type Declaration binding  IType ReferenceBinding typeBinding CompilationUnit getCompilationUnit isOpen IGenericType genericType IGenericType JavaElement getElementInfo genericType typeBinding JavaModelException typeBinding TypeDeclaration typeDeclaration SourceTypeBinding typeBinding referenceType superclassName TypeReference typeDeclaration ASTNode IsAnonymousTypeMASK typeDeclaration typeDeclaration typeName getTypeName superclassName typeName typeName typeName superInterfaceNames TypeReference superInterfaces typeDeclaration superInterfaces superInterfaces superInterfaces superInterfaceNames TypeReference superInterface superInterfaces typeName superInterface getTypeName superInterfaceNames typeName typeName HierarchyType hierarchyType HierarchyType typeDeclaration isInterface typeDeclaration typeDeclaration superclassName superInterfaceNames hierarchyType typeDeclaration
private void remember All Types Compilation Unit Declaration parsed Unit org eclipse jdt core I Compilation Unit cu boolean include Local Types Type Declaration types parsed Unit types if types null for int i 0 length types length i length i Type Declaration type types i remember With Member Types type cu get Type new String type name if include Local Types parsed Unit local Types null Handle Factory factory new Handle Factory Hash Set existing Elements new Hash Set parsed Unit local Type Count Hash Map known Scopes new Hash Map parsed Unit local Type Count for int i 0 i parsed Unit local Type Count i Local Type Binding local Type parsed Unit local Types i Class Scope class Scope local Type scope Type Declaration type Decl class Scope reference Type I Type type Handle I Type factory create Element class Scope cu existing Elements known Scopes remember With Member Types type Decl type Handle  rememberAllTypes CompilationUnitDeclaration parsedUnit ICompilationUnit includeLocalTypes TypeDeclaration parsedUnit TypeDeclaration rememberWithMemberTypes getType includeLocalTypes parsedUnit localTypes HandleFactory HandleFactory HashSet existingElements HashSet parsedUnit localTypeCount HashMap knownScopes HashMap parsedUnit localTypeCount parsedUnit localTypeCount LocalTypeBinding localType parsedUnit localTypes ClassScope classScope localType TypeDeclaration typeDecl classScope referenceType IType typeHandle IType createElement classScope existingElements knownScopes rememberWithMemberTypes typeDecl typeHandle
private void remember With Member Types Type Declaration type Decl I Type type Handle remember type Handle type Decl binding Type Declaration member Types type Decl member Types if member Types null for int i 0 length member Types length i length i Type Declaration member Type member Types i remember With Member Types member Type type Handle get Type new String member Type name  rememberWithMemberTypes TypeDeclaration typeDecl IType typeHandle typeHandle typeDecl TypeDeclaration memberTypes typeDecl memberTypes memberTypes memberTypes TypeDeclaration memberType memberTypes rememberWithMemberTypes memberType typeHandle getType memberType
private void report Hierarchy I Type focus Compilation Unit Declaration parsed Unit Reference Binding binary Type Binding set focus type binding if focus null if binary Type Binding null binary type this focus Type binary Type Binding else source type Member declaring Member Member focus get Outer Most Local Context if declaring Member null top level or member type char fully Qualified Name focus get Fully Qualified Name to Char Array set Focus Type Char Operation split On fully Qualified Name else anonymous or local type if parsed Unit null Type Declaration type Decl new AST Node Finder parsed Unit find Type focus if type Decl null this focus Type type Decl binding int object Index 1 for int current this type Index current 0 current Reference Binding type Binding this type Bindings current java lang Object treated at the end if type Binding id Type Ids T JavaLangObject object Index current continue I Generic Type supplied Type this type Models current if sub Or Super Of Focus type Binding continue ignore types outside of hierarchy I Generic Type superclass if type Binding is Interface do not connect interfaces to Object superclass null else superclass find Super Class supplied Type type Binding I Generic Type superinterfaces find Super Interfaces supplied Type type Binding this requestor connect supplied Type superclass superinterfaces add java lang Object only if the super class is not missing if this has Missing Super Class object Index 1 this requestor connect this type Models object Index null null  reportHierarchy IType CompilationUnitDeclaration parsedUnit ReferenceBinding binaryTypeBinding binaryTypeBinding focusType binaryTypeBinding declaringMember getOuterMostLocalContext declaringMember fullyQualifiedName getFullyQualifiedName toCharArray setFocusType CharOperation splitOn fullyQualifiedName parsedUnit TypeDeclaration typeDecl ASTNodeFinder parsedUnit findType typeDecl focusType typeDecl objectIndex typeIndex ReferenceBinding typeBinding typeBindings typeBinding TypeIds T_JavaLangObject objectIndex IGenericType suppliedType typeModels subOrSuperOfFocus typeBinding IGenericType typeBinding isInterface findSuperClass suppliedType typeBinding IGenericType findSuperInterfaces suppliedType typeBinding suppliedType hasMissingSuperClass objectIndex typeModels objectIndex
private void reset this lookup Environment reset this focus Type null this super Types Only false this type Index 1 this type Models new I Generic Type 5 this type Bindings new Reference Binding 5  lookupEnvironment focusType superTypesOnly typeIndex typeModels IGenericType typeBindings ReferenceBinding
Resolve the supertypes for the supplied source type Inform the requestor of the resolved supertypes using connect I Source Type supplied Type I Generic Type superclass I Generic Type superinterfaces param supplied Type public void resolve I Generic Type supplied Type try if supplied Type is Binary Type Binary Type Binding binary Type Binding this lookup Environment cache Binary Type I Binary Type supplied Type remember supplied Type binary Type Binding We still need to add superclasses and superinterfaces bindings see https bugs eclipse org bugs show bug cgi id 53095 int start Index this type Index for int i start Index i this type Index i I Generic Type ig Type this type Models i if ig Type null ig Type is Binary Type fault in its hierarchy try Reference Binding type Binding this type Bindings i type Binding superclass type Binding super Interfaces catch Abort Compilation e classpath problem for this type ignore this super Types Only true report Hierarchy this requestor get Type null binary Type Binding else org eclipse jdt core I Compilation Unit cu Source Type Element Info supplied Type get Handle get Compilation Unit Hash Set local Types new Hash Set local Types add cu get Path to String this super Types Only true resolve new Openable Openable cu local Types null catch Abort Compilation e ignore this exception for now since it typically means we cannot find java lang Object finally reset  ISourceType suppliedType IGenericType IGenericType suppliedType IGenericType suppliedType suppliedType isBinaryType BinaryTypeBinding binaryTypeBinding lookupEnvironment cacheBinaryType IBinaryType suppliedType suppliedType binaryTypeBinding show_bug startIndex typeIndex startIndex typeIndex IGenericType igType typeModels igType igType isBinaryType ReferenceBinding typeBinding typeBindings typeBinding typeBinding superInterfaces AbortCompilation superTypesOnly reportHierarchy getType binaryTypeBinding ICompilationUnit SourceTypeElementInfo suppliedType getHandle getCompilationUnit HashSet localTypes HashSet localTypes getPath toString superTypesOnly localTypes AbortCompilation
Resolve the supertypes for the types contained in the given openables I Compilation Units and or I Class Files Inform the requestor of the resolved supertypes for each supplied source type using connect I Source Type supplied Type I Generic Type superclass I Generic Type superinterfaces Also inform the requestor of the supertypes of each additional requested super type which is also a source type instead of a binary type param openables param local Types param monitor public void resolve Openable openables Hash Set local Types I Progress Monitor monitor try int openables Length openables length Compilation Unit Declaration parsed Units new Compilation Unit Declaration openables Length boolean has Local Type new boolean openables Length org eclipse jdt core I Compilation Unit cus new org eclipse jdt core I Compilation Unit openables Length int units Index 0 Compilation Unit Declaration focus Unit null Reference Binding focus Binary Binding null I Type focus this requestor get Type Openable focus Openable null if focus null if focus is Binary focus Openable Openable focus get Class File else focus Openable Openable focus get Compilation Unit build type bindings Parser parser new Parser this lookup Environment problem Reporter true for int i 0 i openables Length i Openable openable openables i if openable instanceof org eclipse jdt core I Compilation Unit org eclipse jdt core I Compilation Unit cu org eclipse jdt core I Compilation Unit openable contains a potential subtype as a local or anonymous type boolean contains Local Type false if local Types null case of hierarchy on region contains Local Type true else I Path path cu get Path contains Local Type local Types contains path to String build parsed unit Compilation Unit Declaration parsed Unit null if cu is Open create parsed unit from source element infos Compilation Result result new Compilation Result I Compilation Unit cu get File Name i openables Length this options max Problems Per Unit Source Type Element Info type Infos null try I Type top Level Types cu get Types int top Level Length top Level Types length if top Level Length 0 continue empty cu no need to parse see https bugs eclipse org bugs show bug cgi id 65677 type Infos new Source Type Element Info top Level Length for int j 0 j top Level Length j I Type top Level Type top Level Types j type Infos j Source Type Element Info Java Element top Level Type get Element Info catch Java Model Exception e types cu exist since cu is opened if contains Local Type parsed Unit Source Type Converter build Compilation Unit type Infos Source Type Converter MEMBER TYPE need member types no need for field initialization this lookup Environment problem Reporter result else parsed Unit Element Info Converter build Compilation Unit type Infos true need local types this lookup Environment problem Reporter result parsed Unit bits AST Node Has All Method Bodies else create parsed unit from file I Resource file cu get Resource String os Path file get Location toOS String I Compilation Unit source Unit this requestor create Compilation Unit From Path openable os Path Compilation Result unit Result new Compilation Result source Unit i openables Length this options max Problems Per Unit parsed Unit parser diet Parse source Unit unit Result if parsed Unit null has Local Type units Index contains Local Type cus units Index cu parsed Units units Index parsed Unit try this lookup Environment build Type Bindings parsed Unit if openable equals focus Openable focus Unit parsed Unit catch Abort Compilation e classpath problem for this type ignore else cache binary type binding Class File class File Class File openable I Binary Type binary Type null if class File is Open create binary type from info I Type type class File get Type try binary Type I Binary Type Java Element type get Element Info catch Java Model Exception e type exists since class file is opened else create binary type from file if class File get Package Fragment Root is Archive binary Type this requestor create Info From Class File In Jar class File else I Resource file class File get Resource String os Path file get Location toOS String binary Type this requestor create Info From Class File class File os Path if binary Type null try Binary Type Binding binary Type Binding this lookup Environment cache Binary Type binary Type remember binary Type binary Type Binding if openable equals focus Openable focus Binary Binding binary Type Binding catch Abort Compilation e classpath problem for this type ignore for int i 0 i this type Index i I Generic Type supplied Type this type Models i if supplied Type null supplied Type is Binary Type fault in its hierarchy try Reference Binding type Binding this type Bindings i type Binding superclass type Binding super Interfaces catch Abort Compilation e classpath problem for this type ignore complete type bindings ie connect super types for int i 0 i units Index i Compilation Unit Declaration parsed Unit parsed Units i if parsed Unit null try boolean contains Local Type has Local Type i if contains Local Type NB no op if method bodies have been already parsed parser get Method Bodies parsed Unit this lookup Environment complete Type Bindings parsed Unit true build constructor only catch Abort Compilation e classpath problem for this type don t try to resolve see https bugs eclipse org bugs show bug cgi id 49809 has Local Type i false worked monitor 1 remember type bindings for int i 0 i units Index i Compilation Unit Declaration parsed Unit parsed Units i if parsed Unit null boolean contains Local Type has Local Type i if contains Local Type parsed Unit scope fault In Types parsed Unit resolve remember All Types parsed Unit cus i contains Local Type if no potential subtype was a real subtype of the binary focus type no need to go further see https bugs eclipse org bugs show bug cgi id 54043 if focus Binary Binding null focus null focus is Binary char fully Qualified Name focus get Fully Qualified Name to Char Array focus Binary Binding this lookup Environment get Cached Type Char Operation split On fully Qualified Name if focus Binary Binding null return report Hierarchy focus focus Unit focus Binary Binding catch Class Cast Exception e work around for 1GF5W1S can happen in case duplicates are fed to the hierarchy with binaries hiding sources catch Abort Compilation e ignore this exception for now since it typically means we cannot find java lang Object finally reset  ICompilationUnits IClassFiles ISourceType suppliedType IGenericType IGenericType localTypes HashSet localTypes IProgressMonitor openablesLength CompilationUnitDeclaration parsedUnits CompilationUnitDeclaration openablesLength hasLocalType openablesLength ICompilationUnit ICompilationUnit openablesLength unitsIndex CompilationUnitDeclaration focusUnit ReferenceBinding focusBinaryBinding IType getType focusOpenable isBinary focusOpenable getClassFile focusOpenable getCompilationUnit lookupEnvironment problemReporter openablesLength ICompilationUnit ICompilationUnit ICompilationUnit containsLocalType localTypes containsLocalType IPath getPath containsLocalType localTypes toString CompilationUnitDeclaration parsedUnit isOpen CompilationResult CompilationResult ICompilationUnit getFileName openablesLength maxProblemsPerUnit SourceTypeElementInfo typeInfos IType topLevelTypes getTypes topLevelLength topLevelTypes topLevelLength show_bug typeInfos SourceTypeElementInfo topLevelLength topLevelLength IType topLevelType topLevelTypes typeInfos SourceTypeElementInfo JavaElement topLevelType getElementInfo JavaModelException containsLocalType parsedUnit SourceTypeConverter buildCompilationUnit typeInfos SourceTypeConverter MEMBER_TYPE lookupEnvironment problemReporter parsedUnit ElementInfoConverter buildCompilationUnit typeInfos lookupEnvironment problemReporter parsedUnit ASTNode HasAllMethodBodies IResource getResource osPath getLocation toOSString ICompilationUnit sourceUnit createCompilationUnitFromPath osPath CompilationResult unitResult CompilationResult sourceUnit openablesLength maxProblemsPerUnit parsedUnit dietParse sourceUnit unitResult parsedUnit hasLocalType unitsIndex containsLocalType unitsIndex parsedUnits unitsIndex parsedUnit lookupEnvironment buildTypeBindings parsedUnit focusOpenable focusUnit parsedUnit AbortCompilation ClassFile classFile ClassFile IBinaryType binaryType classFile isOpen IType classFile getType binaryType IBinaryType JavaElement getElementInfo JavaModelException classFile getPackageFragmentRoot isArchive binaryType createInfoFromClassFileInJar classFile IResource classFile getResource osPath getLocation toOSString binaryType createInfoFromClassFile classFile osPath binaryType BinaryTypeBinding binaryTypeBinding lookupEnvironment cacheBinaryType binaryType binaryType binaryTypeBinding focusOpenable focusBinaryBinding binaryTypeBinding AbortCompilation typeIndex IGenericType suppliedType typeModels suppliedType suppliedType isBinaryType ReferenceBinding typeBinding typeBindings typeBinding typeBinding superInterfaces AbortCompilation unitsIndex CompilationUnitDeclaration parsedUnit parsedUnits parsedUnit containsLocalType hasLocalType containsLocalType getMethodBodies parsedUnit lookupEnvironment completeTypeBindings parsedUnit AbortCompilation show_bug hasLocalType unitsIndex CompilationUnitDeclaration parsedUnit parsedUnits parsedUnit containsLocalType hasLocalType containsLocalType parsedUnit faultInTypes parsedUnit rememberAllTypes parsedUnit containsLocalType show_bug focusBinaryBinding isBinary fullyQualifiedName getFullyQualifiedName toCharArray focusBinaryBinding lookupEnvironment getCachedType CharOperation splitOn fullyQualifiedName focusBinaryBinding reportHierarchy focusUnit focusBinaryBinding ClassCastException AbortCompilation
private void set Environment Lookup Environment lookup Environment Hierarchy Builder requestor this lookup Environment lookup Environment this requestor requestor this type Index 1 this type Models new I Generic Type 5 this type Bindings new Reference Binding 5  setEnvironment LookupEnvironment lookupEnvironment HierarchyBuilder lookupEnvironment lookupEnvironment typeIndex typeModels IGenericType typeBindings ReferenceBinding
Set the focus type ie the type that this resolver is computing the hierarch for Returns the binding of this focus type or null if it could not be found param compound Name return public Reference Binding set Focus Type char compound Name if compound Name null this lookup Environment null return null this focus Type this lookup Environment get Cached Type compound Name if this focus Type null this focus Type this lookup Environment ask For Type compound Name return this focus Type  compoundName ReferenceBinding setFocusType compoundName compoundName lookupEnvironment focusType lookupEnvironment getCachedType compoundName focusType focusType lookupEnvironment askForType compoundName focusType
public boolean sub Or Super Of Focus Reference Binding type Binding if this focus Type null return true accept all types case of hierarchy in a region try if this sub Type Of Type this focus Type type Binding return true if this super Types Only this sub Type Of Type type Binding this focus Type return true catch Abort Compilation e unresolved superclass superinterface ignore return false  subOrSuperOfFocus ReferenceBinding typeBinding focusType subTypeOfType focusType typeBinding superTypesOnly subTypeOfType typeBinding focusType AbortCompilation
private boolean sub Type Of Type Reference Binding sub Type Reference Binding type Binding if type Binding null sub Type null return false if sub Type type Binding return true Reference Binding superclass sub Type superclass if superclass null superclass id Type Ids T JavaLangObject sub Type is Hierarchy Inconsistent return false if this sub Type Of Type superclass type Binding return true Reference Binding super Interfaces sub Type super Interfaces if super Interfaces null for int i 0 length super Interfaces length i length i if this sub Type Of Type super Interfaces i type Binding return true return false  subTypeOfType ReferenceBinding subType ReferenceBinding typeBinding typeBinding subType subType typeBinding ReferenceBinding subType TypeIds T_JavaLangObject subType isHierarchyInconsistent subTypeOfType typeBinding ReferenceBinding superInterfaces subType superInterfaces superInterfaces superInterfaces subTypeOfType superInterfaces typeBinding
protected void worked I Progress Monitor monitor int work if monitor null if monitor is Canceled throw new Operation Canceled Exception else monitor worked work  IProgressMonitor isCanceled OperationCanceledException

public Hierarchy Type I Type type Handle boolean is Class char name int modifiers char superclass Name char super Interface Names this type Handle type Handle this is Class is Class this name name this modifiers modifiers this superclass Name superclass Name this super Interface Names super Interface Names  HierarchyType IType typeHandle isClass superclassName superInterfaceNames typeHandle typeHandle isClass isClass superclassName superclassName superInterfaceNames superInterfaceNames
Answer the file name which defines the type The path part optional must be separated from the actual file proper name by a java io File separator The proper file name includes the suffix extension e g java e g c com ibm compiler java api Compiler java public char get File Name return this type Handle get Compilation Unit get Element Name to Char Array  getFileName typeHandle getCompilationUnit getElementName toCharArray
Answer an int whose bits are set according the access constants defined by the VM spec public int get Modifiers return this modifiers  getModifiers
Answer whether the receiver contains the resolved binary form or the unresolved source form of the type public boolean is Binary Type return false  isBinaryType
is Class method comment public boolean is Class return this is Class  isClass isClass isClass
is Interface method comment public boolean is Interface return is Class  isInterface isInterface isClass

public interface I Hierarchy Requestor Connect the supplied type to its superclass superinterfaces The superclass superinterfaces are the identical binary or source types as supplied by the name environment  IHierarchyRequestor

public int end 1 public void add char name if this end this names length this end this start System arraycopy this names this start this names new char this end 2 0 this end this start 0 this names this end name 
public char retrieve if this start this end return null none char name this names this start if this start this end this start 0 this end 1 return name 
public String to String String Buffer buffer new String Buffer Queue n NON NLS 1 for int i this start i this end i buffer append this names i append n return buffer to String  toString StringBuffer StringBuffer toString
public Index Based Hierarchy Builder Type Hierarchy hierarchy I Java Search Scope scope throws Java Model Exception super hierarchy this cu To Handle new Hash Map 5 this binaries From Index Matches new Hash Map 10 this scope scope  IndexBasedHierarchyBuilder TypeHierarchy IJavaSearchScope JavaModelException cuToHandle HashMap binariesFromIndexMatches HashMap
public void build boolean compute Subtypes Java Model Manager manager Java Model Manager get Java Model Manager try optimize access to zip files while building hierarchy manager cache Zip Files if compute Subtypes Note by construction there always is a focus type here I Type focus Type get Type boolean focus Is Object focus Type get Element Name equals new String I Index Constants OBJECT int amount Of Work For Subtypes focus Is Object 5 80 percentage of work needed to get possible subtypes I Progress Monitor possible Subtypes Monitor this hierarchy progress Monitor null null new Sub Progress Monitor this hierarchy progress Monitor amount Of Work For Subtypes Hash Set local Types new Hash Set 10 contains the paths that have potential subtypes that are local anonymous types String all Possible Subtypes if Member focus Type get Outer Most Local Context null top level or member type all Possible Subtypes this determine Possible Sub Types local Types possible Subtypes Monitor else local or anonymous type all Possible Subtypes new String 0 if all Possible Subtypes null I Progress Monitor build Monitor this hierarchy progress Monitor null null new Sub Progress Monitor this hierarchy progress Monitor 100 amount Of Work For Subtypes this hierarchy initialize all Possible Subtypes length build From Potential Subtypes all Possible Subtypes local Types build Monitor else this hierarchy initialize 1 this build Supertypes finally manager flush Zip Files  computeSubtypes JavaModelManager JavaModelManager getJavaModelManager cacheZipFiles computeSubtypes IType focusType getType focusIsObject focusType getElementName IIndexConstants amountOfWorkForSubtypes focusIsObject IProgressMonitor possibleSubtypesMonitor progressMonitor SubProgressMonitor progressMonitor amountOfWorkForSubtypes HashSet localTypes HashSet allPossibleSubtypes focusType getOuterMostLocalContext allPossibleSubtypes determinePossibleSubTypes localTypes possibleSubtypesMonitor allPossibleSubtypes allPossibleSubtypes IProgressMonitor buildMonitor progressMonitor SubProgressMonitor progressMonitor amountOfWorkForSubtypes allPossibleSubtypes buildFromPotentialSubtypes allPossibleSubtypes localTypes buildMonitor buildSupertypes flushZipFiles
private void build For Project Java Project project Array List potential Subtypes org eclipse jdt core I Compilation Unit working Copies Hash Set local Types I Progress Monitor monitor throws Java Model Exception copy vectors into arrays int openables Length potential Subtypes size Openable openables new Openable openables Length potential Subtypes to Array openables resolve if openables Length 0 I Type focus Type this get Type boolean in Project Of Focus Type focus Type null focus Type get Java Project equals project org eclipse jdt core I Compilation Unit units To Look Inside null if in Project Of Focus Type org eclipse jdt core I Compilation Unit unit To Look Inside focus Type get Compilation Unit if unit To Look Inside null int wc Length working Copies null 0 working Copies length if wc Length 0 units To Look Inside new org eclipse jdt core I Compilation Unit unit To Look Inside else units To Look Inside new org eclipse jdt core I Compilation Unit wc Length 1 units To Look Inside 0 unit To Look Inside System arraycopy working Copies 0 units To Look Inside 1 wc Length else units To Look Inside working Copies Searchable Environment searchable Environment Searchable Environment project new Searchable Name Environment units To Look Inside this name Lookup searchable Environment name Lookup this hierarchy Resolver new Hierarchy Resolver searchable Environment project get Options true this new Default Problem Factory if focus Type null Member declaring Member Member focus Type get Outer Most Local Context if declaring Member null top level or member type char fully Qualified Name focus Type get Fully Qualified Name to Char Array if in Project Of Focus Type searchable Environment find Type Char Operation split On fully Qualified Name null focus type is not visible in this project no need to go further return else local or anonymous type Openable openable if declaring Member is Binary openable Openable declaring Member get Class File else openable Openable declaring Member get Compilation Unit local Types new Hash Set local Types add openable get Path to String this hierarchy Resolver resolve new Openable openable local Types monitor return this hierarchy Resolver resolve openables local Types monitor  buildForProject JavaProject ArrayList potentialSubtypes ICompilationUnit workingCopies HashSet localTypes IProgressMonitor JavaModelException openablesLength potentialSubtypes openablesLength potentialSubtypes toArray openablesLength IType focusType getType inProjectOfFocusType focusType focusType getJavaProject ICompilationUnit unitsToLookInside inProjectOfFocusType ICompilationUnit unitToLookInside focusType getCompilationUnit unitToLookInside wcLength workingCopies workingCopies wcLength unitsToLookInside ICompilationUnit unitToLookInside unitsToLookInside ICompilationUnit wcLength unitsToLookInside unitToLookInside workingCopies unitsToLookInside wcLength unitsToLookInside workingCopies SearchableEnvironment searchableEnvironment SearchableEnvironment newSearchableNameEnvironment unitsToLookInside nameLookup searchableEnvironment nameLookup hierarchyResolver HierarchyResolver searchableEnvironment getOptions DefaultProblemFactory focusType declaringMember focusType getOuterMostLocalContext declaringMember fullyQualifiedName focusType getFullyQualifiedName toCharArray inProjectOfFocusType searchableEnvironment findType CharOperation splitOn fullyQualifiedName declaringMember isBinary declaringMember getClassFile declaringMember getCompilationUnit localTypes HashSet localTypes getPath toString hierarchyResolver localTypes hierarchyResolver localTypes
Configure this type hierarchy based on the given potential subtypes private void build From Potential Subtypes String all Potential Sub Types Hash Set local Types I Progress Monitor monitor I Type focus Type this get Type substitute compilation units with working copies Hash Map wc Paths new Hash Map a map from path to working copies int wc Length org eclipse jdt core I Compilation Unit working Copies this hierarchy working Copies if working Copies null wc Length working Copies length 0 String new Paths new String wc Length for int i 0 i wc Length i org eclipse jdt core I Compilation Unit working Copy working Copies i String path working Copy get Path to String wc Paths put path working Copy new Paths i path int potential Subtypes Length all Potential Sub Types length System arraycopy all Potential Sub Types 0 all Potential Sub Types new String potential Subtypes Length wc Length 0 potential Subtypes Length System arraycopy new Paths 0 all Potential Sub Types potential Subtypes Length wc Length int length all Potential Sub Types length inject the compilation unit of the focus type so that types in this cu have special visibility permission this is also usefull when the cu is a working copy Openable focusCU Openable focus Type get Compilation Unit String focus Path null if focusCU null focus Path focusCU get Path to String if length 0 System arraycopy all Potential Sub Types 0 all Potential Sub Types new String length 1 0 length all Potential Sub Types length focus Path else all Potential Sub Types new String focus Path length sort by projects NOTE To workaround pb with hierarchy resolver that requests top level types in the process of caching an enclosing type this needs to be sorted in reverse alphabetical order so that top level types are cached before their inner types org eclipse jdt internal core util Util sort Reverse Order all Potential Sub Types Array List potential Subtypes new Array List try create element infos for subtypes Handle Factory factory new Handle Factory I Java Project current Project null if monitor null monitor begin Task length 2 1 for build binding 1 for connect hierarchy NON NLS 1 for int i 0 i length i try String resource Path all Potential Sub Types i skip duplicate paths e g if focus path was injected when it was already a potential subtype if i 0 resource Path equals all Potential Sub Types i 1 continue Openable handle org eclipse jdt core I Compilation Unit working Copy org eclipse jdt core I Compilation Unit wc Paths get resource Path if working Copy null handle Openable working Copy else handle resource Path equals focus Path focusCU factory create Openable resource Path this scope if handle null continue match is outside classpath I Java Project project handle get Java Project if current Project null current Project project potential Subtypes new Array List 5 else if current Project equals project build current project this build For Project Java Project current Project potential Subtypes working Copies local Types monitor current Project project potential Subtypes new Array List 5 potential Subtypes add handle catch Java Model Exception e continue build last project try if current Project null case of no potential subtypes current Project focus Type get Java Project if focus Type is Binary potential Subtypes add focus Type get Class File else potential Subtypes add focus Type get Compilation Unit this build For Project Java Project current Project potential Subtypes working Copies local Types monitor catch Java Model Exception e ignore Compute hierarchy of focus type if not already done case of a type with potential subtypes that are not real subtypes if this hierarchy contains focus Type try current Project focus Type get Java Project potential Subtypes new Array List if focus Type is Binary potential Subtypes add focus Type get Class File else potential Subtypes add focus Type get Compilation Unit this build For Project Java Project current Project potential Subtypes working Copies local Types monitor catch Java Model Exception e ignore Add focus if not already in case of a type with no explicit super type if this hierarchy contains focus Type this hierarchy add Root Class focus Type finally if monitor null monitor done  buildFromPotentialSubtypes allPotentialSubTypes HashSet localTypes IProgressMonitor IType focusType getType HashMap wcPaths HashMap wcLength ICompilationUnit workingCopies workingCopies workingCopies wcLength workingCopies newPaths wcLength wcLength ICompilationUnit workingCopy workingCopies workingCopy getPath toString wcPaths workingCopy newPaths potentialSubtypesLength allPotentialSubTypes allPotentialSubTypes allPotentialSubTypes potentialSubtypesLength wcLength potentialSubtypesLength newPaths allPotentialSubTypes potentialSubtypesLength wcLength allPotentialSubTypes focusType getCompilationUnit focusPath focusPath getPath toString allPotentialSubTypes allPotentialSubTypes allPotentialSubTypes focusPath allPotentialSubTypes focusPath sortReverseOrder allPotentialSubTypes ArrayList potentialSubtypes ArrayList HandleFactory HandleFactory IJavaProject currentProject beginTask resourcePath allPotentialSubTypes resourcePath allPotentialSubTypes ICompilationUnit workingCopy ICompilationUnit wcPaths resourcePath workingCopy workingCopy resourcePath focusPath createOpenable resourcePath IJavaProject getJavaProject currentProject currentProject potentialSubtypes ArrayList currentProject buildForProject JavaProject currentProject potentialSubtypes workingCopies localTypes currentProject potentialSubtypes ArrayList potentialSubtypes JavaModelException currentProject currentProject focusType getJavaProject focusType isBinary potentialSubtypes focusType getClassFile potentialSubtypes focusType getCompilationUnit buildForProject JavaProject currentProject potentialSubtypes workingCopies localTypes JavaModelException focusType currentProject focusType getJavaProject potentialSubtypes ArrayList focusType isBinary potentialSubtypes focusType getClassFile potentialSubtypes focusType getCompilationUnit buildForProject JavaProject currentProject potentialSubtypes workingCopies localTypes JavaModelException focusType addRootClass focusType
protected I Compilation Unit create Compilation Unit From Path Openable handle String os Path I Compilation Unit unit super create Compilation Unit From Path handle os Path this cu To Handle put unit handle return unit  ICompilationUnit createCompilationUnitFromPath osPath ICompilationUnit createCompilationUnitFromPath osPath cuToHandle
protected I Binary Type create Info From Class File Openable class File String os Path String document Path class File get Path to String I Binary Type binary Type I Binary Type this binaries From Index Matches get document Path if binary Type null this info To Handle put binary Type class File return binary Type else return super create Info From Class File class File os Path  IBinaryType createInfoFromClassFile classFile osPath documentPath classFile getPath toString IBinaryType binaryType IBinaryType binariesFromIndexMatches documentPath binaryType infoToHandle binaryType classFile binaryType createInfoFromClassFile classFile osPath
protected I Binary Type create Info From Class File In Jar Openable class File String file Path Class File class File get Type get Fully Qualified Name replace Suffix Constants SUFFIX STRING class I Package Fragment Root root class File get Package Fragment Root String root Path root is External root get Path toOS String root get Path to String String document Path root Path I Java Search Scope JAR FILE ENTRY SEPARATOR file Path I Binary Type binary Type I Binary Type this binaries From Index Matches get document Path if binary Type null this info To Handle put binary Type class File return binary Type else return super create Info From Class File In Jar class File  IBinaryType createInfoFromClassFileInJar classFile filePath ClassFile classFile getType getFullyQualifiedName SuffixConstants SUFFIX_STRING_class IPackageFragmentRoot classFile getPackageFragmentRoot rootPath isExternal getPath toOSString getPath toString documentPath rootPath IJavaSearchScope JAR_FILE_ENTRY_SEPARATOR filePath IBinaryType binaryType IBinaryType binariesFromIndexMatches documentPath binaryType infoToHandle binaryType classFile binaryType createInfoFromClassFileInJar classFile
Hash Set paths new Hash Set 10 public void accept Path String path boolean contains Local Types this paths add path if contains Local Types local Types add path  HashSet HashSet acceptPath containsLocalTypes containsLocalTypes localTypes
Returns all of the possible subtypes of this type hierarchy Returns null if they could not be determine private String determine Possible Sub Types final Hash Set local Types I Progress Monitor monitor class Path Collector implements I Path Requestor Hash Set paths new Hash Set 10 public void accept Path String path boolean contains Local Types this paths add path if contains Local Types local Types add path Path Collector collector new Path Collector try if monitor null monitor begin Task MAXTICKS NON NLS 1 search All Possible Sub Types this get Type this scope this binaries From Index Matches collector I Java Search Constants WAIT UNTIL READY TO SEARCH monitor finally if monitor null monitor done Hash Set paths collector paths int length paths size String result new String length int count 0 for Iterator iter paths iterator iter has Next result count String iter next return result  determinePossibleSubTypes HashSet localTypes IProgressMonitor PathCollector IPathRequestor HashSet HashSet acceptPath containsLocalTypes containsLocalTypes localTypes PathCollector PathCollector beginTask searchAllPossibleSubTypes getType binariesFromIndexMatches IJavaSearchConstants WAIT_UNTIL_READY_TO_SEARCH HashSet hasNext
Index Query Requestor search Requestor new Index Query Requestor public boolean accept Index Match String document Path Search Pattern index Record Search Participant participant Super Type Reference Pattern record Super Type Reference Pattern index Record path Requestor accept Path document Path record enclosing Type Name I Index Constants ONE ZERO char type Name record simple Name int suffix document Path to Lower Case index Of SUFFIX STRING class if suffix 1 Hierarchy Binary Type binary Type Hierarchy Binary Type binaries From Index Matches get document Path if binary Type null char enclosing Type Name record enclosing Type Name if enclosing Type Name I Index Constants ONE ZERO local or anonymous type int last Slash document Path last Index Of int last Dollar document Path last Index Of if last Dollar 1 malformed local or anonymous type it doesn t contain a in its name treat it as a top level type enclosing Type Name null type Name document Path substring last Slash 1 suffix to Char Array else enclosing Type Name document Path substring last Slash 1 last Dollar to Char Array type Name document Path substring last Dollar 1 suffix to Char Array binary Type new Hierarchy Binary Type record modifiers record pkg Name type Name enclosing Type Name record class Or Interface binaries From Index Matches put document Path binary Type binary Type record Super Type record super Simple Name record super Qualification record super Class Or Interface if found Super Names contains Key type Name found Super Names put type Name type Name queue add type Name return true  IndexQueryRequestor searchRequestor IndexQueryRequestor acceptIndexMatch documentPath SearchPattern indexRecord SearchParticipant SuperTypeReferencePattern SuperTypeReferencePattern indexRecord pathRequestor acceptPath documentPath enclosingTypeName IIndexConstants ONE_ZERO typeName simpleName documentPath toLowerCase indexOf SUFFIX_STRING_class HierarchyBinaryType binaryType HierarchyBinaryType binariesFromIndexMatches documentPath binaryType enclosingTypeName enclosingTypeName enclosingTypeName IIndexConstants ONE_ZERO lastSlash documentPath lastIndexOf lastDollar documentPath lastIndexOf lastDollar enclosingTypeName typeName documentPath lastSlash toCharArray enclosingTypeName documentPath lastSlash lastDollar toCharArray typeName documentPath lastDollar toCharArray binaryType HierarchyBinaryType pkgName typeName enclosingTypeName classOrInterface binariesFromIndexMatches documentPath binaryType binaryType recordSuperType superSimpleName superQualification superClassOrInterface foundSuperNames containsKey typeName foundSuperNames typeName typeName typeName
Find the set of candidate subtypes of a given type The requestor is notified of super type references with actual path of its occurrence for all types which are potentially involved inside a particular hierarchy The match locator is not used here to narrow down the results the type hierarchy resolver is rather used to compute the whole hierarchy at once param type param scope param binaries From Index Matches param path Requestor param waiting Policy param progress Monitor public static void search All Possible Sub Types I Type type I Java Search Scope scope final Map binaries From Index Matches final I Path Requestor path Requestor int waiting Policy Wait Until Ready To Search Force Immediate Search Cancel If Not Ready To Search I Progress Monitor progress Monitor embed constructs inside arrays so as to pass them to inner collector final Queue queue new Queue final Hashtable Of Object found Super Names new Hashtable Of Object 5 Index Manager index Manager Java Model Manager get Java Model Manager get Index Manager use a special collector to collect paths and queue new subtype names Index Query Requestor search Requestor new Index Query Requestor public boolean accept Index Match String document Path Search Pattern index Record Search Participant participant Super Type Reference Pattern record Super Type Reference Pattern index Record path Requestor accept Path document Path record enclosing Type Name I Index Constants ONE ZERO char type Name record simple Name int suffix document Path to Lower Case index Of SUFFIX STRING class if suffix 1 Hierarchy Binary Type binary Type Hierarchy Binary Type binaries From Index Matches get document Path if binary Type null char enclosing Type Name record enclosing Type Name if enclosing Type Name I Index Constants ONE ZERO local or anonymous type int last Slash document Path last Index Of int last Dollar document Path last Index Of if last Dollar 1 malformed local or anonymous type it doesn t contain a in its name treat it as a top level type enclosing Type Name null type Name document Path substring last Slash 1 suffix to Char Array else enclosing Type Name document Path substring last Slash 1 last Dollar to Char Array type Name document Path substring last Dollar 1 suffix to Char Array binary Type new Hierarchy Binary Type record modifiers record pkg Name type Name enclosing Type Name record class Or Interface binaries From Index Matches put document Path binary Type binary Type record Super Type record super Simple Name record super Qualification record super Class Or Interface if found Super Names contains Key type Name found Super Names put type Name type Name queue add type Name return true Super Type Reference Pattern pattern new Super Type Reference Pattern null null false Search Pattern R EXACT MATCH Search Pattern R CASE SENSITIVE Match Locator set Focus pattern type Sub Type Search Job job new Sub Type Search Job pattern new Java Search Participant java search only scope search Requestor int ticks 0 queue add type get Element Name to Char Array try while queue start queue end if progress Monitor null progress Monitor is Canceled return all subclasses of OBJECT are actually all types char current Type Name queue retrieve if Char Operation equals current Type Name I Index Constants OBJECT current Type Name null search all index references to a given supertype pattern super Simple Name current Type Name index Manager perform Concurrent Job job waiting Policy null no sub progress monitor since its too costly for deep hierarchies if progress Monitor null ticks MAXTICKS progress Monitor worked 1 in case we search all subtypes no need to search further if current Type Name null break finally job finished  binariesFromIndexMatches pathRequestor waitingPolicy progressMonitor searchAllPossibleSubTypes IType IJavaSearchScope binariesFromIndexMatches IPathRequestor pathRequestor waitingPolicy WaitUntilReadyToSearch ForceImmediateSearch CancelIfNotReadyToSearch IProgressMonitor progressMonitor HashtableOfObject foundSuperNames HashtableOfObject IndexManager indexManager JavaModelManager getJavaModelManager getIndexManager IndexQueryRequestor searchRequestor IndexQueryRequestor acceptIndexMatch documentPath SearchPattern indexRecord SearchParticipant SuperTypeReferencePattern SuperTypeReferencePattern indexRecord pathRequestor acceptPath documentPath enclosingTypeName IIndexConstants ONE_ZERO typeName simpleName documentPath toLowerCase indexOf SUFFIX_STRING_class HierarchyBinaryType binaryType HierarchyBinaryType binariesFromIndexMatches documentPath binaryType enclosingTypeName enclosingTypeName enclosingTypeName IIndexConstants ONE_ZERO lastSlash documentPath lastIndexOf lastDollar documentPath lastIndexOf lastDollar enclosingTypeName typeName documentPath lastSlash toCharArray enclosingTypeName documentPath lastSlash lastDollar toCharArray typeName documentPath lastDollar toCharArray binaryType HierarchyBinaryType pkgName typeName enclosingTypeName classOrInterface binariesFromIndexMatches documentPath binaryType binaryType recordSuperType superSimpleName superQualification superClassOrInterface foundSuperNames containsKey typeName foundSuperNames typeName typeName typeName SuperTypeReferencePattern SuperTypeReferencePattern SearchPattern R_EXACT_MATCH SearchPattern R_CASE_SENSITIVE MatchLocator setFocus SubTypeSearchJob SubTypeSearchJob JavaSearchParticipant searchRequestor getElementName toCharArray progressMonitor progressMonitor isCanceled currentTypeName CharOperation currentTypeName IIndexConstants currentTypeName superSimpleName currentTypeName indexManager performConcurrentJob waitingPolicy progressMonitor progressMonitor currentTypeName

public Region Based Hierarchy Builder Type Hierarchy hierarchy throws Java Model Exception super hierarchy  RegionBasedHierarchyBuilder TypeHierarchy JavaModelException
public void build boolean compute Subtypes Java Model Manager manager Java Model Manager get Java Model Manager try optimize access to zip files while building hierarchy manager cache Zip Files if this hierarchy focus Type null compute Subtypes I Progress Monitor type In Region Monitor this hierarchy progress Monitor null null new Sub Progress Monitor this hierarchy progress Monitor 30 Array List all Openables In Region determine Openables In Region type In Region Monitor this hierarchy initialize all Openables In Region size I Progress Monitor build Monitor this hierarchy progress Monitor null null new Sub Progress Monitor this hierarchy progress Monitor 70 create Type Hierarchy Based On Region all Openables In Region build Monitor Region Based Type Hierarchy this hierarchy prune Dead Branches else this hierarchy initialize 1 this build Supertypes finally manager flush Zip Files  computeSubtypes JavaModelManager JavaModelManager getJavaModelManager cacheZipFiles focusType computeSubtypes IProgressMonitor typeInRegionMonitor progressMonitor SubProgressMonitor progressMonitor ArrayList allOpenablesInRegion determineOpenablesInRegion typeInRegionMonitor allOpenablesInRegion IProgressMonitor buildMonitor progressMonitor SubProgressMonitor progressMonitor createTypeHierarchyBasedOnRegion allOpenablesInRegion buildMonitor RegionBasedTypeHierarchy pruneDeadBranches buildSupertypes flushZipFiles
Configure this type hierarchy that is based on a region private void create Type Hierarchy Based On Region Array List all Openables In Region I Progress Monitor monitor int size all Openables In Region size if size 0 this info To Handle new Hash Map size Openable openables new Openable size all Openables In Region to Array openables try resolve if monitor null monitor begin Task size 2 1 for build binding 1 for connect hierarchy NON NLS 1 if size 0 this hierarchy Resolver resolve openables null monitor finally if monitor null monitor done  createTypeHierarchyBasedOnRegion ArrayList allOpenablesInRegion IProgressMonitor allOpenablesInRegion infoToHandle HashMap allOpenablesInRegion toArray beginTask hierarchyResolver
Returns all of the openables defined in the region of this type hierarchy private Array List determine Openables In Region I Progress Monitor monitor try Array List openables new Array List I Java Element roots Region Based Type Hierarchy this hierarchy region get Elements int length roots length if monitor null monitor begin Task length NON NLS 1 for int i 0 i length i I Java Element root roots i switch root get Element Type case I Java Element JAVA PROJECT inject All Openables For Java Project I Java Project root openables break case I Java Element PACKAGE FRAGMENT ROOT inject All Openables For Package Fragment Root I Package Fragment Root root openables break case I Java Element PACKAGE FRAGMENT inject All Openables For Package Fragment I Package Fragment root openables break case I Java Element CLASS FILE case I Java Element COMPILATION UNIT openables add root break case I Java Element TYPE I Type type I Type root if type is Binary openables add type get Class File else openables add type get Compilation Unit break default break worked monitor 1 return openables finally if monitor null monitor done  ArrayList determineOpenablesInRegion IProgressMonitor ArrayList ArrayList IJavaElement RegionBasedTypeHierarchy getElements beginTask IJavaElement getElementType IJavaElement JAVA_PROJECT injectAllOpenablesForJavaProject IJavaProject IJavaElement PACKAGE_FRAGMENT_ROOT injectAllOpenablesForPackageFragmentRoot IPackageFragmentRoot IJavaElement PACKAGE_FRAGMENT injectAllOpenablesForPackageFragment IPackageFragment IJavaElement CLASS_FILE IJavaElement COMPILATION_UNIT IJavaElement IType IType isBinary getClassFile getCompilationUnit
Adds all of the openables defined within this java project to the list private void inject All Openables For Java Project I Java Project project Array List openables try I Package Fragment Root dev Path Roots Java Project project get Package Fragment Roots if dev Path Roots null return for int j 0 j dev Path Roots length j I Package Fragment Root root dev Path Roots j inject All Openables For Package Fragment Root root openables catch Java Model Exception e ignore  injectAllOpenablesForJavaProject IJavaProject ArrayList IPackageFragmentRoot devPathRoots JavaProject getPackageFragmentRoots devPathRoots devPathRoots IPackageFragmentRoot devPathRoots injectAllOpenablesForPackageFragmentRoot JavaModelException
Adds all of the openables defined within this package fragment to the list private void inject All Openables For Package Fragment I Package Fragment pack Frag Array List openables try I Package Fragment Root root I Package Fragment Root pack Frag get Parent int kind root get Kind if kind 0 boolean is Source Package Fragment kind I Package Fragment Root K SOURCE if is Source Package Fragment I Compilation Unit cus pack Frag get Compilation Units for int i 0 length cus length i length i openables add cus i else I Class File class Files pack Frag get Class Files for int i 0 length class Files length i length i openables add class Files i catch Java Model Exception e ignore  injectAllOpenablesForPackageFragment IPackageFragment packFrag ArrayList IPackageFragmentRoot IPackageFragmentRoot packFrag getParent getKind isSourcePackageFragment IPackageFragmentRoot K_SOURCE isSourcePackageFragment ICompilationUnit packFrag getCompilationUnits IClassFile classFiles packFrag getClassFiles classFiles classFiles JavaModelException
Adds all of the openables defined within this package fragment root to the list private void inject All Openables For Package Fragment Root I Package Fragment Root root Array List openables try I Java Element pack Frags root get Children for int k 0 k pack Frags length k I Package Fragment pack Frag I Package Fragment pack Frags k inject All Openables For Package Fragment pack Frag openables catch Java Model Exception e return  injectAllOpenablesForPackageFragmentRoot IPackageFragmentRoot ArrayList IJavaElement packFrags getChildren packFrags IPackageFragment packFrag IPackageFragment packFrags injectAllOpenablesForPackageFragment packFrag JavaModelException

Creates a Type Hierarchy on the types in the specified region considering first the given working copies using the given project for a name lookup contenxt If a specific type is also specified the type hierarchy is pruned to only contain the branch including the specified type public Region Based Type Hierarchy I Region region I Java Project project I Compilation Unit working Copies I Type type boolean compute Subtypes super type working Copies I Java Search Scope null compute Subtypes this region region this project project  TypeHierarchy RegionBasedTypeHierarchy IRegion IJavaProject ICompilationUnit workingCopies IType computeSubtypes workingCopies IJavaSearchScope computeSubtypes
protected void initialize Regions super initialize Regions I Java Element roots this region get Elements for int i 0 i roots length i I Java Element root roots i if root instanceof I Openable this files put root new Array List else Openable o Openable Java Element root get Openable Parent if o null this files put o new Array List check Canceled  initializeRegions initializeRegions IJavaElement getElements IJavaElement IOpenable ArrayList JavaElement getOpenableParent ArrayList checkCanceled
Compute this type hierarchy protected void compute throws Java Model Exception Core Exception Hierarchy Builder builder new Region Based Hierarchy Builder this builder build this compute Subtypes  JavaModelException CoreException HierarchyBuilder RegionBasedHierarchyBuilder computeSubtypes
protected boolean is Affected By Openable I Java Element Delta delta I Java Element element change to working copy if element instanceof Compilation Unit Compilation Unit element is Working Copy return super is Affected By Openable delta element if no focus hierarchy is affected if the element is part of the region if this focus Type null return this region contains element else return super is Affected By Openable delta element  isAffectedByOpenable IJavaElementDelta IJavaElement CompilationUnit CompilationUnit isWorkingCopy isAffectedByOpenable focusType isAffectedByOpenable
Returns the java project this hierarchy was created in public I Java Project java Project return this project  IJavaProject javaProject
return this project public void prune Dead Branches prune Dead Branches get Root Classes  pruneDeadBranches pruneDeadBranches getRootClasses
private boolean prune Dead Branches I Type type Type Vector subtypes Type Vector this type To Subtypes get type if subtypes null return true prune Dead Branches subtypes copy elements subtypes Type Vector this type To Subtypes get type return subtypes null subtypes size 0  pruneDeadBranches IType TypeVector TypeVector typeToSubtypes pruneDeadBranches TypeVector typeToSubtypes
private void prune Dead Branches I Type types for int i 0 length types length i length i I Type type types i if prune Dead Branches type this region contains type remove Type type  pruneDeadBranches IType IType pruneDeadBranches removeType
Removes all the subtypes of the given type from the type hierarchy removes its superclass entry and removes the references from its super types protected void remove Type I Type type I Type subtypes this get Subtypes type this type To Subtypes remove type if subtypes null for int i 0 i subtypes length i this remove Type subtypes i I Type superclass I Type this class To Superclass remove type if superclass null Type Vector types Type Vector this type To Subtypes get superclass if types null types remove type I Type superinterfaces I Type this type To Super Interfaces remove type if superinterfaces null for int i 0 length superinterfaces length i length i I Type superinterface superinterfaces i Type Vector types Type Vector this type To Subtypes get superinterface if types null types remove type  removeType IType IType getSubtypes typeToSubtypes removeType IType IType classToSuperclass TypeVector TypeVector typeToSubtypes IType IType typeToSuperInterfaces IType TypeVector TypeVector typeToSubtypes

Creates an empty Type Hierarchy public Type Hierarchy Creates an empty Type Hierarchy  TypeHierarchy TypeHierarchy TypeHierarchy
Creates a Type Hierarchy on the given type public Type Hierarchy I Type type I Compilation Unit working Copies I Java Project project boolean compute Subtypes this type working Copies Search Engine create Java Search Scope new I Java Element project compute Subtypes this project project  TypeHierarchy TypeHierarchy IType ICompilationUnit workingCopies IJavaProject computeSubtypes workingCopies SearchEngine createJavaSearchScope IJavaElement computeSubtypes
Creates a Type Hierarchy on the given type public Type Hierarchy I Type type I Compilation Unit working Copies I Java Search Scope scope boolean compute Subtypes this focus Type type this working Copies working Copies this compute Subtypes compute Subtypes this scope scope  TypeHierarchy TypeHierarchy IType ICompilationUnit workingCopies IJavaSearchScope computeSubtypes focusType workingCopies workingCopies computeSubtypes computeSubtypes
Initializes the file package and project regions protected void initialize Regions I Type all Types get All Types for int i 0 i all Types length i I Type type all Types i Openable o Openable Java Element type get Openable Parent if o null Array List types Array List this files get o if types null types new Array List this files put o types types add type I Package Fragment pkg type get Package Fragment this package Region add pkg I Java Project declaring Project type get Java Project if declaring Project null this project Region add declaring Project check Canceled  initializeRegions IType allTypes getAllTypes allTypes IType allTypes JavaElement getOpenableParent ArrayList ArrayList ArrayList IPackageFragment getPackageFragment packageRegion IJavaProject declaringProject getJavaProject declaringProject projectRegion declaringProject checkCanceled
Adds all of the elements in the collection to the list if the element is not already in the list private void add All Checking Duplicates Array List list I Type collection for int i 0 i collection length i I Type element collection i if list contains element list add element  addAllCheckingDuplicates ArrayList IType IType
Adds the type to the collection of interfaces protected void add Interface I Type type this interfaces add type  addInterface IType
Adds the type to the collection of root classes if the classes is not already present in the collection protected void add Root Class I Type type if this root Classes contains type return this root Classes add type  addRootClass IType rootClasses rootClasses
Adds the given subtype to the type protected void add Subtype I Type type I Type subtype Type Vector subtypes Type Vector this type To Subtypes get type if subtypes null subtypes new Type Vector this type To Subtypes put type subtypes if subtypes contains subtype subtypes add subtype  addSubtype IType IType TypeVector TypeVector typeToSubtypes TypeVector typeToSubtypes
see I Type Hierarchy public synchronized void add Type Hierarchy Changed Listener I Type Hierarchy Changed Listener listener Array List listeners this change Listeners if listeners null this change Listeners listeners new Array List register with Java Core to get Java element delta on first listener added if listeners size 0 Java Core add Element Changed Listener this add listener only if it is not already present if listeners index Of listener 1 listeners add listener  ITypeHierarchy addTypeHierarchyChangedListener ITypeHierarchyChangedListener ArrayList changeListeners changeListeners ArrayList JavaCore JavaCore addElementChangedListener indexOf
private static Integer bytes To Flags byte bytes if bytes null bytes length 0 return new Integer new String bytes else return null  bytesToFlags
cache Flags public void cache Flags I Type type int flags this type Flags put type new Integer flags  cacheFlags cacheFlags IType typeFlags
Caches the handle of the superclass for the specified type As a side effect cache this type as a subtype of the superclass protected void cache Superclass I Type type I Type superclass if superclass null this class To Superclass put type superclass add Subtype superclass type  cacheSuperclass IType IType classToSuperclass addSubtype
Caches all of the superinterfaces that are specified for the type protected void cache Super Interfaces I Type type I Type superinterfaces this type To Super Interfaces put type superinterfaces for int i 0 i superinterfaces length i I Type superinterface superinterfaces i if superinterface null add Subtype superinterface type  cacheSuperInterfaces IType IType typeToSuperInterfaces IType addSubtype
Checks with the progress monitor to see whether the creation of the type hierarchy should be canceled Should be regularly called so that the user can cancel exception Operation Canceled Exception if cancelling the operation has been requested see I Progress Monitor is Canceled protected void check Canceled if this progress Monitor null this progress Monitor is Canceled throw new Operation Canceled Exception  OperationCanceledException IProgressMonitor isCanceled checkCanceled progressMonitor progressMonitor isCanceled OperationCanceledException
Compute this type hierarchy protected void compute throws Java Model Exception Core Exception if this focus Type null Hierarchy Builder builder new Index Based Hierarchy Builder this this scope builder build this compute Subtypes else a Region Based Type Hierarchy should be used  JavaModelException CoreException focusType HierarchyBuilder IndexBasedHierarchyBuilder computeSubtypes RegionBasedTypeHierarchy
see I Type Hierarchy public boolean contains I Type type classes if this class To Superclass get type null return true root classes if this root Classes contains type return true interfaces if this interfaces contains type return true return false  ITypeHierarchy IType classToSuperclass rootClasses
Determines if the change effects this hierarchy and fires change notification if required public void element Changed Element Changed Event event type hierarchy change has already been fired if this needs Refresh return if is Affected event get Delta this needs Refresh true fire Change  elementChanged ElementChangedEvent needsRefresh isAffected getDelta needsRefresh fireChange
see I Type Hierarchy public boolean exists if this needs Refresh return true return this focus Type null this focus Type exists this java Project exists  ITypeHierarchy needsRefresh focusType focusType javaProject
final I Type Hierarchy Changed Listener listener I Type Hierarchy Changed Listener listeners get i Platform run new I Safe Runnable public void handle Exception Throwable exception Util log exception Exception occurred in listener of Type hierarchy change notification NON NLS 1  ITypeHierarchyChangedListener ITypeHierarchyChangedListener ISafeRunnable handleException
Util log exception Exception occurred in listener of Type hierarchy change notification NON NLS 1 public void run throws Exception listener type Hierarchy Changed Type Hierarchy this  typeHierarchyChanged TypeHierarchy
Notifies listeners that this hierarchy has changed and needs refreshing Note that listeners can be removed as we iterate through the list public void fire Change Array List listeners this change Listeners if listeners null return if DEBUG System out println FIRING hierarchy change Thread current Thread NON NLS 1 NON NLS 2 if this focus Type null System out println for hierarchy focused on Java Element this focus Type to String With Ancestors NON NLS 1 clone so that a listener cannot have a side effect on this list when being notified listeners Array List listeners clone for int i 0 i listeners size i final I Type Hierarchy Changed Listener listener I Type Hierarchy Changed Listener listeners get i Platform run new I Safe Runnable public void handle Exception Throwable exception Util log exception Exception occurred in listener of Type hierarchy change notification NON NLS 1 public void run throws Exception listener type Hierarchy Changed Type Hierarchy this  fireChange ArrayList changeListeners currentThread focusType JavaElement focusType toStringWithAncestors ArrayList ITypeHierarchyChangedListener ITypeHierarchyChangedListener ISafeRunnable handleException typeHierarchyChanged TypeHierarchy
private static byte flags To Bytes Integer flags if flags null return flags to String get Bytes else return NO FLAGS  flagsToBytes toString getBytes NO_FLAGS
see I Type Hierarchy public I Type get All Classes Type Vector classes this root Classes copy for Iterator iter this class To Superclass key Set iterator iter has Next classes add I Type iter next return classes elements  ITypeHierarchy IType getAllClasses TypeVector rootClasses classToSuperclass keySet hasNext IType
see I Type Hierarchy public I Type get All Interfaces I Type collection new I Type this interfaces size this interfaces to Array collection return collection  ITypeHierarchy IType getAllInterfaces IType IType toArray
see I Type Hierarchy public I Type get All Subtypes I Type type return get All Subtypes For Type type  ITypeHierarchy IType getAllSubtypes IType getAllSubtypesForType
see get All Subtypes I Type private I Type get All Subtypes For Type I Type type Array List sub Types new Array List get All Subtypes For Type0 type sub Types I Type sub Classes new I Type sub Types size sub Types to Array sub Classes return sub Classes  getAllSubtypes IType IType getAllSubtypesForType IType ArrayList subTypes ArrayList getAllSubtypesForType0 subTypes IType subClasses IType subTypes subTypes toArray subClasses subClasses
private void get All Subtypes For Type0 I Type type Array List subs I Type sub Types get Subtypes For Type type if sub Types length 0 for int i 0 i sub Types length i I Type sub Type sub Types i subs add sub Type get All Subtypes For Type0 sub Type subs  getAllSubtypesForType0 IType ArrayList IType subTypes getSubtypesForType subTypes subTypes IType subType subTypes subType getAllSubtypesForType0 subType
see I Type Hierarchy public I Type get All Superclasses I Type type I Type superclass get Superclass type Type Vector supers new Type Vector while superclass null supers add superclass superclass get Superclass superclass return supers elements  ITypeHierarchy IType getAllSuperclasses IType IType getSuperclass TypeVector TypeVector getSuperclass
see I Type Hierarchy public I Type get All Super Interfaces I Type type Array List supers new Array List if this type To Super Interfaces get type null return NO TYPE get All Super Interfaces0 type supers I Type superinterfaces new I Type supers size supers to Array superinterfaces return superinterfaces  ITypeHierarchy IType getAllSuperInterfaces IType ArrayList ArrayList typeToSuperInterfaces NO_TYPE getAllSuperInterfaces0 IType IType toArray
private void get All Super Interfaces0 I Type type Array List supers I Type superinterfaces I Type this type To Super Interfaces get type if superinterfaces null superinterfaces length 0 add All Checking Duplicates supers superinterfaces for int i 0 i superinterfaces length i get All Super Interfaces0 superinterfaces i supers I Type superclass I Type this class To Superclass get type if superclass null get All Super Interfaces0 superclass supers  getAllSuperInterfaces0 IType ArrayList IType IType typeToSuperInterfaces addAllCheckingDuplicates getAllSuperInterfaces0 IType IType classToSuperclass getAllSuperInterfaces0
see I Type Hierarchy public I Type get All Supertypes I Type type Array List supers new Array List if this type To Super Interfaces get type null return NO TYPE get All Supertypes0 type supers I Type supertypes new I Type supers size supers to Array supertypes return supertypes  ITypeHierarchy IType getAllSupertypes IType ArrayList ArrayList typeToSuperInterfaces NO_TYPE getAllSupertypes0 IType IType toArray
private void get All Supertypes0 I Type type Array List supers I Type superinterfaces I Type this type To Super Interfaces get type if superinterfaces null superinterfaces length 0 add All Checking Duplicates supers superinterfaces for int i 0 i superinterfaces length i get All Super Interfaces0 superinterfaces i supers I Type superclass I Type this class To Superclass get type if superclass null supers add superclass get All Supertypes0 superclass supers  getAllSupertypes0 IType ArrayList IType IType typeToSuperInterfaces addAllCheckingDuplicates getAllSuperInterfaces0 IType IType classToSuperclass getAllSupertypes0
see I Type Hierarchy public I Type get All Types I Type classes get All Classes int classes Length classes length I Type all Interfaces get All Interfaces int interfaces Length all Interfaces length I Type all new I Type classes Length interfaces Length System arraycopy classes 0 all 0 classes Length System arraycopy all Interfaces 0 all classes Length interfaces Length return all  ITypeHierarchy IType getAllTypes IType getAllClasses classesLength IType allInterfaces getAllInterfaces interfacesLength allInterfaces IType IType classesLength interfacesLength classesLength allInterfaces classesLength interfacesLength
see I Type Hierarchy get Cached Flags I Type public int get Cached Flags I Type type Integer flag Object Integer this type Flags get type if flag Object null return flag Object int Value return 1  ITypeHierarchy getCachedFlags IType getCachedFlags IType flagObject typeFlags flagObject flagObject intValue
see I Type Hierarchy public I Type get Extending Interfaces I Type type if this is Interface type return NO TYPE return get Extending Interfaces0 type  ITypeHierarchy IType getExtendingInterfaces IType isInterface NO_TYPE getExtendingInterfaces0
Assumes that the type is an interface see get Extending Interfaces private I Type get Extending Interfaces0 I Type extended Interface Iterator iter this type To Super Interfaces key Set iterator Array List interface List new Array List while iter has Next I Type type I Type iter next if this is Interface type continue I Type super Interfaces I Type this type To Super Interfaces get type if super Interfaces null for int i 0 i super Interfaces length i I Type super Interface super Interfaces i if super Interface equals extended Interface interface List add type I Type extending Interfaces new I Type interface List size interface List to Array extending Interfaces return extending Interfaces  getExtendingInterfaces IType getExtendingInterfaces0 IType extendedInterface typeToSuperInterfaces keySet ArrayList interfaceList ArrayList hasNext IType IType isInterface IType superInterfaces IType typeToSuperInterfaces superInterfaces superInterfaces IType superInterface superInterfaces superInterface extendedInterface interfaceList IType extendingInterfaces IType interfaceList interfaceList toArray extendingInterfaces extendingInterfaces
see I Type Hierarchy public I Type get Implementing Classes I Type type if this is Interface type return NO TYPE return get Implementing Classes0 type  ITypeHierarchy IType getImplementingClasses IType isInterface NO_TYPE getImplementingClasses0
Assumes that the type is an interface see get Implementing Classes private I Type get Implementing Classes0 I Type interfce Iterator iter this type To Super Interfaces key Set iterator Array List i Menters new Array List while iter has Next I Type type I Type iter next if this is Interface type continue I Type types I Type this type To Super Interfaces get type for int i 0 i types length i I Type i Face types i if i Face equals interfce i Menters add type I Type implementers new I Type i Menters size i Menters to Array implementers return implementers  getImplementingClasses IType getImplementingClasses0 IType typeToSuperInterfaces keySet ArrayList iMenters ArrayList hasNext IType IType isInterface IType IType typeToSuperInterfaces IType iFace iFace iMenters IType IType iMenters iMenters toArray
see I Type Hierarchy public I Type get Root Classes return this root Classes elements  ITypeHierarchy IType getRootClasses rootClasses
see I Type Hierarchy public I Type get Root Interfaces I Type all Interfaces get All Interfaces I Type roots new I Type all Interfaces length int root Number 0 for int i 0 i all Interfaces length i I Type super Interfaces get Super Interfaces all Interfaces i if super Interfaces null super Interfaces length 0 roots root Number all Interfaces i I Type result new I Type root Number if result length 0 System arraycopy roots 0 result 0 root Number return result  ITypeHierarchy IType getRootInterfaces IType allInterfaces getAllInterfaces IType IType allInterfaces rootNumber allInterfaces IType superInterfaces getSuperInterfaces allInterfaces superInterfaces superInterfaces rootNumber allInterfaces IType IType rootNumber rootNumber
see I Type Hierarchy public I Type get Subclasses I Type type if this is Interface type return NO TYPE Type Vector vector Type Vector this type To Subtypes get type if vector null return NO TYPE else return vector elements  ITypeHierarchy IType getSubclasses IType isInterface NO_TYPE TypeVector TypeVector typeToSubtypes NO_TYPE
see I Type Hierarchy public I Type get Subtypes I Type type return get Subtypes For Type type  ITypeHierarchy IType getSubtypes IType getSubtypesForType
Returns an array of subtypes for the given type will never return null private I Type get Subtypes For Type I Type type Type Vector vector Type Vector this type To Subtypes get type if vector null return NO TYPE else return vector elements  IType getSubtypesForType IType TypeVector TypeVector typeToSubtypes NO_TYPE
see I Type Hierarchy public I Type get Superclass I Type type if this is Interface type return null return I Type this class To Superclass get type  ITypeHierarchy IType getSuperclass IType isInterface IType classToSuperclass
see I Type Hierarchy public I Type get Super Interfaces I Type type I Type types I Type this type To Super Interfaces get type if types null return NO TYPE return types  ITypeHierarchy IType getSuperInterfaces IType IType IType typeToSuperInterfaces NO_TYPE
see I Type Hierarchy public I Type get Supertypes I Type type I Type superclass get Superclass type if superclass null return get Super Interfaces type else Type Vector super Types new Type Vector get Super Interfaces type super Types add superclass return super Types elements  ITypeHierarchy IType getSupertypes IType IType getSuperclass getSuperInterfaces TypeVector superTypes TypeVector getSuperInterfaces superTypes superTypes
see I Type Hierarchy public I Type get Type return this focus Type  ITypeHierarchy IType getType focusType
Adds the new elements to a new array that contains all of the elements of the old array Returns the new array protected I Type grow And Add To Array I Type array I Type additions if array null array length 0 return additions I Type old array array new I Type old length additions length System arraycopy old 0 array 0 old length System arraycopy additions 0 array old length additions length return array  IType growAndAddToArray IType IType IType IType
Adds the new element to a new array that contains all of the elements of the old array Returns the new array protected I Type grow And Add To Array I Type array I Type addition if array null array length 0 return new I Type addition I Type old array array new I Type old length 1 System arraycopy old 0 array 0 old length array old length addition return array  IType growAndAddToArray IType IType IType IType IType
Whether fine grained deltas where collected and affects this hierarchy public boolean has Fine Grain Changes Change Collector collector this change Collector return collector null collector needs Refresh  hasFineGrainChanges ChangeCollector changeCollector needsRefresh
Returns whether one of the subtypes in this hierarchy has the given simple name or this type has the given simple name private boolean has Subtype Named String simple Name if this focus Type null this focus Type get Element Name equals simple Name return true I Type types this focus Type null get All Types get All Subtypes this focus Type for int i 0 length types length i length i if types i get Element Name equals simple Name return true return false  hasSubtypeNamed simpleName focusType focusType getElementName simpleName IType focusType getAllTypes getAllSubtypes focusType getElementName simpleName
Returns whether one of the types in this hierarchy has the given simple name private boolean has Type Named String simple Name I Type types this get All Types for int i 0 length types length i length i if types i get Element Name equals simple Name return true return false  hasTypeNamed simpleName IType getAllTypes getElementName simpleName
Returns whether the simple name of the given type or one of its supertypes is the simple name of one of the types in this hierarchy boolean includes Type Or Supertype I Type type try check type if has Type Named type get Element Name return true check superclass String superclass Name type get Superclass Name if superclass Name null int last Separator superclass Name last Index Of String simple Name last Separator 1 superclass Name substring last Separator superclass Name if has Type Named simple Name return true check superinterfaces String superinterface Names type get Super Interface Names if superinterface Names null for int i 0 length superinterface Names length i length i String superinterface Name superinterface Names i int last Separator superinterface Name last Index Of String simple Name last Separator 1 superinterface Name substring last Separator superinterface Name if has Type Named simple Name return true catch Java Model Exception e ignore return false  includesTypeOrSupertype IType hasTypeNamed getElementName superclassName getSuperclassName superclassName lastSeparator superclassName lastIndexOf simpleName lastSeparator superclassName lastSeparator superclassName hasTypeNamed simpleName superinterfaceNames getSuperInterfaceNames superinterfaceNames superinterfaceNames superinterfaceName superinterfaceNames lastSeparator superinterfaceName lastIndexOf simpleName lastSeparator superinterfaceName lastSeparator superinterfaceName hasTypeNamed simpleName JavaModelException
Initializes this hierarchy s internal tables with the given size protected void initialize int size if size 10 size 10 int small Size size 2 this class To Superclass new Hash Map size this interfaces new Array List small Size this missing Types new Array List small Size this root Classes new Type Vector this type To Subtypes new Hash Map small Size this type To Super Interfaces new Hash Map small Size this type Flags new Hash Map small Size this project Region new Region this package Region new Region this files new Hash Map 5  smallSize classToSuperclass HashMap ArrayList smallSize missingTypes ArrayList smallSize rootClasses TypeVector typeToSubtypes HashMap smallSize typeToSuperInterfaces HashMap smallSize typeFlags HashMap smallSize projectRegion packageRegion HashMap
Returns true if the given delta could change this type hierarchy public synchronized boolean is Affected I Java Element Delta delta I Java Element element delta get Element switch element get Element Type case I Java Element JAVA MODEL return is Affected By Java Model delta element case I Java Element JAVA PROJECT return is Affected By Java Project delta element case I Java Element PACKAGE FRAGMENT ROOT return is Affected By Package Fragment Root delta element case I Java Element PACKAGE FRAGMENT return is Affected By Package Fragment delta element case I Java Element CLASS FILE case I Java Element COMPILATION UNIT return is Affected By Openable delta element return false  isAffected IJavaElementDelta IJavaElement getElement getElementType IJavaElement JAVA_MODEL isAffectedByJavaModel IJavaElement JAVA_PROJECT isAffectedByJavaProject IJavaElement PACKAGE_FRAGMENT_ROOT isAffectedByPackageFragmentRoot IJavaElement PACKAGE_FRAGMENT isAffectedByPackageFragment IJavaElement CLASS_FILE IJavaElement COMPILATION_UNIT isAffectedByOpenable
Returns true if any of the children of a project package fragment root or package fragment have changed in a way that effects this type hierarchy private boolean is Affected By Children I Java Element Delta delta if delta get Flags I Java Element Delta F CHILDREN 0 I Java Element Delta children delta get Affected Children for int i 0 i children length i if is Affected children i return true return false  isAffectedByChildren IJavaElementDelta getFlags IJavaElementDelta F_CHILDREN IJavaElementDelta getAffectedChildren isAffected
Returns true if the given java model delta could affect this type hierarchy private boolean is Affected By Java Model I Java Element Delta delta I Java Element element switch delta get Kind case I Java Element Delta ADDED case I Java Element Delta REMOVED return element equals this java Project get Java Model case I Java Element Delta CHANGED return is Affected By Children delta return false  isAffectedByJavaModel IJavaElementDelta IJavaElement getKind IJavaElementDelta IJavaElementDelta javaProject getJavaModel IJavaElementDelta isAffectedByChildren
Returns true if the given java project delta could affect this type hierarchy private boolean is Affected By Java Project I Java Element Delta delta I Java Element element switch delta get Kind case I Java Element Delta ADDED try if the added project is on the classpath then the hierarchy has changed I Classpath Entry classpath Java Project this java Project get Expanded Classpath true for int i 0 i classpath length i if classpath i get Entry Kind I Classpath Entry CPE PROJECT classpath i get Path equals element get Path return true return false catch Java Model Exception e return false case I Java Element Delta REMOVED removed project if it contains packages we are interested in then the type hierarchy has changed I Java Element pkgs this package Region get Elements for int i 0 i pkgs length i I Java Project java Project pkgs i get Java Project if java Project null java Project equals element return true return false case I Java Element Delta CHANGED return is Affected By Children delta return false  isAffectedByJavaProject IJavaElementDelta IJavaElement getKind IJavaElementDelta IClasspathEntry JavaProject javaProject getExpandedClasspath getEntryKind IClasspathEntry CPE_PROJECT getPath getPath JavaModelException IJavaElementDelta IJavaElement packageRegion getElements IJavaProject javaProject getJavaProject javaProject javaProject IJavaElementDelta isAffectedByChildren
Returns true if the given package fragment delta could affect this type hierarchy private boolean is Affected By Package Fragment I Java Element Delta delta I Java Element element switch delta get Kind case I Java Element Delta ADDED if the package fragment is in the projects being considered this could introduce new types changing the hierarchy return this project Region contains element case I Java Element Delta REMOVED is a change if the package fragment contains types in this hierarchy return package Region Contains Same Package Fragment element case I Java Element Delta CHANGED look at the files in the package fragment return is Affected By Children delta return false  isAffectedByPackageFragment IJavaElementDelta IJavaElement getKind IJavaElementDelta projectRegion IJavaElementDelta packageRegionContainsSamePackageFragment IJavaElementDelta isAffectedByChildren
Returns true if the given package fragment root delta could affect this type hierarchy private boolean is Affected By Package Fragment Root I Java Element Delta delta I Java Element element switch delta get Kind case I Java Element Delta ADDED return this project Region contains element case I Java Element Delta REMOVED case I Java Element Delta CHANGED int flags delta get Flags if flags I Java Element Delta F ADDED TO CLASSPATH 0 check if the root is in the classpath of one of the projects of this hierarchy if this project Region null I Package Fragment Root root I Package Fragment Root element I Path root Path root get Path I Java Element elements this project Region get Elements for int i 0 i elements length i Java Project java Project Java Project elements i try I Classpath Entry classpath java Project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress for int j 0 j classpath length j I Classpath Entry entry classpath j if entry get Path equals root Path return true catch Java Model Exception e igmore this project if flags I Java Element Delta F REMOVED FROM CLASSPATH 0 flags I Java Element Delta F CONTENT 0 1 removed from classpath if it contains packages we are interested in the the type hierarchy has changed 2 content of a jar changed if it contains packages we are interested in the the type hierarchy has changed I Java Element pkgs this package Region get Elements for int i 0 i pkgs length i if pkgs i get Parent equals element return true return false return is Affected By Children delta  isAffectedByPackageFragmentRoot IJavaElementDelta IJavaElement getKind IJavaElementDelta projectRegion IJavaElementDelta IJavaElementDelta getFlags IJavaElementDelta F_ADDED_TO_CLASSPATH projectRegion IPackageFragmentRoot IPackageFragmentRoot IPath rootPath getPath IJavaElement projectRegion getElements JavaProject javaProject JavaProject IClasspathEntry javaProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress IClasspathEntry getPath rootPath JavaModelException IJavaElementDelta F_REMOVED_FROM_CLASSPATH IJavaElementDelta F_CONTENT IJavaElement packageRegion getElements getParent isAffectedByChildren
Returns true if the given type delta a compilation unit delta or a class file delta could affect this type hierarchy protected boolean is Affected By Openable I Java Element Delta delta I Java Element element if element instanceof Compilation Unit Compilation Unit cu Compilation Unit element Change Collector collector this change Collector if collector null collector new Change Collector this try collector add Change cu delta catch Java Model Exception e e print Stack Trace if cu is Working Copy changes to working copies are batched this change Collector collector return false else return collector needs Refresh else if element instanceof Class File switch delta get Kind case I Java Element Delta REMOVED return this files get element null case I Java Element Delta ADDED I Type type Class File element get Type String type Name type get Element Name if has Supertype type Name subtypes Include Supertype Of type this missing Types contains type Name return true break case I Java Element Delta CHANGED I Java Element Delta children delta get Affected Children for int i 0 length children length i length i I Java Element Delta child children i I Java Element child Element child get Element if child Element instanceof I Type type I Type child Element boolean has Visibility Change delta get Flags I Java Element Delta F MODIFIERS 0 boolean has Supertype Change delta get Flags I Java Element Delta F SUPER TYPES 0 if has Visibility Change has Supertype type get Element Name has Supertype Change includes Type Or Supertype type return true break return false  isAffectedByOpenable IJavaElementDelta IJavaElement CompilationUnit CompilationUnit CompilationUnit ChangeCollector changeCollector ChangeCollector addChange JavaModelException printStackTrace isWorkingCopy changeCollector needsRefresh ClassFile getKind IJavaElementDelta IJavaElementDelta IType ClassFile getType typeName getElementName hasSupertype typeName subtypesIncludeSupertypeOf missingTypes typeName IJavaElementDelta IJavaElementDelta getAffectedChildren IJavaElementDelta IJavaElement childElement getElement childElement IType IType childElement hasVisibilityChange getFlags IJavaElementDelta F_MODIFIERS hasSupertypeChange getFlags IJavaElementDelta F_SUPER_TYPES hasVisibilityChange hasSupertype getElementName hasSupertypeChange includesTypeOrSupertype
private boolean is Interface I Type type int flags this get Cached Flags type if flags 1 try return type is Interface catch Java Model Exception e return false else return Flags is Interface flags  isInterface IType getCachedFlags isInterface JavaModelException isInterface
Returns the java project this hierarchy was created in public I Java Project java Project return this focus Type get Java Project  IJavaProject javaProject focusType getJavaProject
return this focus Type get Java Project protected static byte read Until Input Stream input byte separator throws Java Model Exception IO Exception return read Until input separator 0  focusType getJavaProject readUntil InputStream JavaModelException IOException readUntil
protected static byte read Until Input Stream input byte separator int offset throws IO Exception Java Model Exception int length 0 byte bytes new byte SIZE byte b while b byte input read separator b 1 if bytes length length System arraycopy bytes 0 bytes new byte length 2 0 length bytes length b if b 1 throw new Java Model Exception new Java Model Status I Status ERROR System arraycopy bytes 0 bytes new byte length offset offset length return bytes  readUntil InputStream IOException JavaModelException JavaModelException JavaModelStatus IStatus
public static I Type Hierarchy load I Type type Input Stream input Working Copy Owner owner throws Java Model Exception try Type Hierarchy type Hierarchy new Type Hierarchy type Hierarchy initialize 1 I Type types new I Type SIZE int type Count 0 byte version byte input read if version VERSION throw new Java Model Exception new Java Model Status I Status ERROR byte general Info byte input read if general Info COMPUTE SUBTYPES 0 type Hierarchy compute Subtypes true byte b byte bytes read project bytes read Until input SEPARATOR1 if bytes length 0 type Hierarchy project I Java Project Java Core create new String bytes type Hierarchy scope Search Engine create Java Search Scope new I Java Element type Hierarchy project else type Hierarchy project null type Hierarchy scope Search Engine create Workspace Scope read missing type bytes read Until input SEPARATOR1 byte missing int j 0 int length bytes length for int i 0 i length i b bytes i if b SEPARATOR2 missing new byte i j System arraycopy bytes j missing 0 i j type Hierarchy missing Types add new String missing j i 1 System arraycopy bytes j missing new byte length j 0 length j type Hierarchy missing Types add new String missing read types while b byte input read SEPARATOR1 b 1 bytes read Until input SEPARATOR4 1 bytes 0 b I Type element I Type Java Core create new String bytes owner if types length type Count System arraycopy types 0 types new I Type type Count 2 0 type Count types type Count element read flags bytes read Until input SEPARATOR4 Integer flags bytes To Flags bytes if flags null type Hierarchy cache Flags element flags int Value read info byte info byte input read if info INTERFACE 0 type Hierarchy add Interface element if info COMPUTED FOR 0 if element equals type throw new Java Model Exception new Java Model Status I Status ERROR type Hierarchy focus Type element if info ROOT 0 type Hierarchy add Root Class element read super class while b byte input read SEPARATOR1 b 1 bytes read Until input SEPARATOR3 1 bytes 0 b int sub Class new Integer new String bytes int Value read super type bytes read Until input SEPARATOR1 int super Class new Integer new String bytes int Value type Hierarchy cache Superclass types sub Class types super Class read super interface while b byte input read SEPARATOR1 b 1 bytes read Until input SEPARATOR3 1 bytes 0 b int sub Class new Integer new String bytes int Value read super interface bytes read Until input SEPARATOR1 I Type super Interfaces new I Type bytes length 2 1 int interface Count 0 int j 0 byte b2 for int i 0 i bytes length i if bytes i SEPARATOR2 b2 new byte i j System arraycopy bytes j b2 0 i j j i 1 super Interfaces interface Count types new Integer new String b2 int Value b2 new byte bytes length j System arraycopy bytes j b2 0 bytes length j super Interfaces interface Count types new Integer new String b2 int Value System arraycopy super Interfaces 0 super Interfaces new I Type interface Count 0 interface Count type Hierarchy cache Super Interfaces types sub Class super Interfaces if b 1 throw new Java Model Exception new Java Model Status I Status ERROR return type Hierarchy catch IO Exception e throw new Java Model Exception e I Java Model Status Constants IO EXCEPTION  ITypeHierarchy IType InputStream WorkingCopyOwner JavaModelException TypeHierarchy typeHierarchy TypeHierarchy typeHierarchy IType IType typeCount JavaModelException JavaModelStatus IStatus generalInfo generalInfo COMPUTE_SUBTYPES typeHierarchy computeSubtypes readUntil typeHierarchy IJavaProject JavaCore typeHierarchy SearchEngine createJavaSearchScope IJavaElement typeHierarchy typeHierarchy typeHierarchy SearchEngine createWorkspaceScope readUntil typeHierarchy missingTypes typeHierarchy missingTypes readUntil IType IType JavaCore typeCount IType typeCount typeCount typeCount readUntil bytesToFlags typeHierarchy cacheFlags intValue typeHierarchy addInterface COMPUTED_FOR JavaModelException JavaModelStatus IStatus typeHierarchy focusType typeHierarchy addRootClass readUntil subClass intValue readUntil superClass intValue typeHierarchy cacheSuperclass subClass superClass readUntil subClass intValue readUntil IType superInterfaces IType interfaceCount superInterfaces interfaceCount intValue superInterfaces interfaceCount intValue superInterfaces superInterfaces IType interfaceCount interfaceCount typeHierarchy cacheSuperInterfaces subClass superInterfaces JavaModelException JavaModelStatus IStatus typeHierarchy IOException JavaModelException IJavaModelStatusConstants IO_EXCEPTION
Returns code true code if an equivalent package fragment is included in the package region Package fragments are equivalent if they both have the same name protected boolean package Region Contains Same Package Fragment I Java Element element I Java Element pkgs this package Region get Elements for int i 0 i pkgs length i if pkgs i get Element Name equals element get Element Name return true return false  packageRegionContainsSamePackageFragment IJavaElement IJavaElement packageRegion getElements getElementName getElementName
see I Type Hierarchy TODO jerome should use a Per Thread Object to build the hierarchy instead of synchronizing see also is Affected I Java Element Delta public synchronized void refresh I Progress Monitor monitor throws Java Model Exception try this progress Monitor monitor if monitor null if this focus Type null monitor begin Task Util bind hierarchy creating On Type this focus Type get Fully Qualified Name 100 NON NLS 1 else monitor begin Task Util bind hierarchy creating 100 NON NLS 1 long start 1 if DEBUG start System current Time Millis if this compute Subtypes System out println CREATING TYPE HIERARCHY Thread current Thread NON NLS 1 NON NLS 2 else System out println CREATING SUPER TYPE HIERARCHY Thread current Thread NON NLS 1 NON NLS 2 if this focus Type null System out println on type Java Element this focus Type to String With Ancestors NON NLS 1 compute initialize Regions this needs Refresh false this change Collector null if DEBUG if this compute Subtypes System out println CREATED TYPE HIERARCHY in System current Time Millis start ms NON NLS 1 NON NLS 2 else System out println CREATED SUPER TYPE HIERARCHY in System current Time Millis start ms NON NLS 1 NON NLS 2 System out println this to String catch Java Model Exception e throw e catch Core Exception e throw new Java Model Exception e finally if monitor null monitor done this progress Monitor null  ITypeHierarchy PerThreadObject isAffected IJavaElementDelta IProgressMonitor JavaModelException progressMonitor focusType beginTask creatingOnType focusType getFullyQualifiedName beginTask currentTimeMillis computeSubtypes currentThread currentThread focusType JavaElement focusType toStringWithAncestors initializeRegions needsRefresh changeCollector computeSubtypes currentTimeMillis currentTimeMillis toString JavaModelException CoreException JavaModelException progressMonitor
see I Type Hierarchy public synchronized void remove Type Hierarchy Changed Listener I Type Hierarchy Changed Listener listener Array List listeners this change Listeners if listeners null return listeners remove listener deregister from Java Core on last listener removed if listeners is Empty Java Core remove Element Changed Listener this  ITypeHierarchy removeTypeHierarchyChangedListener ITypeHierarchyChangedListener ArrayList changeListeners JavaCore isEmpty JavaCore removeElementChangedListener
see I Type Hierarchy public void store Output Stream output I Progress Monitor monitor throws Java Model Exception try compute types in hierarchy Hashtable hashtable new Hashtable Hashtable hashtable2 new Hashtable int count 0 if this focus Type null Integer index new Integer count hashtable put this focus Type index hashtable2 put index this focus Type Object types this class To Superclass key Set to Array for int i 0 i types length i Object t types i if hashtable get t null Integer index new Integer count hashtable put t index hashtable2 put index t Object super Class this class To Superclass get t if super Class null hashtable get super Class null Integer index new Integer count hashtable put super Class index hashtable2 put index super Class types this type To Super Interfaces key Set to Array for int i 0 i types length i Object t types i if hashtable get t null Integer index new Integer count hashtable put t index hashtable2 put index t Object sp Object this type To Super Interfaces get t if sp null for int j 0 j sp length j Object super Interface sp j if sp j null hashtable get super Interface null Integer index new Integer count hashtable put super Interface index hashtable2 put index super Interface save version of the hierarchy format output write VERSION save general info byte general Info 0 if this compute Subtypes general Info COMPUTE SUBTYPES output write general Info save project if this project null output write this project get Handle Identifier get Bytes output write SEPARATOR1 save missing types for int i 0 i this missing Types size i if i 0 output write SEPARATOR2 output write String this missing Types get i get Bytes output write SEPARATOR1 save types for int i 0 i count i I Type t I Type hashtable2 get new Integer i n bytes output write t get Handle Identifier get Bytes output write SEPARATOR4 output write flags To Bytes Integer this type Flags get t output write SEPARATOR4 byte info CLASS if this focus Type null this focus Type equals t info COMPUTED FOR if this interfaces contains t info INTERFACE if this root Classes contains t info ROOT output write info output write SEPARATOR1 save superclasses types this class To Superclass key Set to Array for int i 0 i types length i I Java Element key I Java Element types i I Java Element value I Java Element this class To Superclass get key output write Integer hashtable get key to String get Bytes output write output write Integer hashtable get value to String get Bytes output write SEPARATOR1 output write SEPARATOR1 save superinterfaces types this type To Super Interfaces key Set to Array for int i 0 i types length i I Java Element key I Java Element types i I Java Element values I Java Element this type To Super Interfaces get key if values length 0 output write Integer hashtable get key to String get Bytes output write SEPARATOR3 for int j 0 j values length j I Java Element value values j if j 0 output write SEPARATOR2 output write Integer hashtable get value to String get Bytes output write SEPARATOR1 output write SEPARATOR1 catch IO Exception e throw new Java Model Exception e I Java Model Status Constants IO EXCEPTION  ITypeHierarchy OutputStream IProgressMonitor JavaModelException focusType focusType focusType classToSuperclass keySet toArray superClass classToSuperclass superClass superClass superClass superClass typeToSuperInterfaces keySet toArray typeToSuperInterfaces superInterface superInterface superInterface superInterface generalInfo computeSubtypes generalInfo COMPUTE_SUBTYPES generalInfo getHandleIdentifier getBytes missingTypes missingTypes getBytes IType IType getHandleIdentifier getBytes flagsToBytes typeFlags focusType focusType COMPUTED_FOR rootClasses classToSuperclass keySet toArray IJavaElement IJavaElement IJavaElement IJavaElement classToSuperclass toString getBytes toString getBytes typeToSuperInterfaces keySet toArray IJavaElement IJavaElement IJavaElement IJavaElement typeToSuperInterfaces toString getBytes IJavaElement toString getBytes IOException JavaModelException IJavaModelStatusConstants IO_EXCEPTION
Returns whether the simple name of a supertype of the given type is the simple name of one of the subtypes in this hierarchy or the simple name of this type boolean subtypes Include Supertype Of I Type type look for superclass String superclass Name null try superclass Name type get Superclass Name catch Java Model Exception e if DEBUG e print Stack Trace return false if superclass Name null superclass Name Object NON NLS 1 int dot 1 String simple Super dot superclass Name last Index Of 1 superclass Name substring dot 1 superclass Name if has Subtype Named simple Super return true look for super interfaces String interface Names null try interface Names type get Super Interface Names catch Java Model Exception e e print Stack Trace return false for int i 0 length interface Names length i length i dot 1 String interface Name interface Names i String simple Interface dot interface Name last Index Of 1 interface Name substring dot interface Name if has Subtype Named simple Interface return true return false  subtypesIncludeSupertypeOf IType superclassName superclassName getSuperclassName JavaModelException printStackTrace superclassName superclassName simpleSuper superclassName lastIndexOf superclassName superclassName hasSubtypeNamed simpleSuper interfaceNames interfaceNames getSuperInterfaceNames JavaModelException printStackTrace interfaceNames interfaceName interfaceNames simpleInterface interfaceName lastIndexOf interfaceName interfaceName hasSubtypeNamed simpleInterface
see I Type Hierarchy public String to String String Buffer buffer new String Buffer buffer append Focus NON NLS 1 buffer append this focus Type null NONE Java Element this focus Type to String With Ancestors NON NLS 1 buffer append n NON NLS 1 if exists if this focus Type null buffer append Super types n NON NLS 1 to String buffer this focus Type 1 true buffer append Sub types n NON NLS 1 to String buffer this focus Type 1 false else buffer append Sub types of root classes n NON NLS 1 I Type roots get Root Classes for int i 0 i roots length i to String buffer roots i 1 false if this root Classes size 1 buffer append Root classes n NON NLS 1 I Type roots this get Root Classes for int i 0 length roots length i length i I Type type roots i to String buffer type 1 false else if this root Classes size 0 see http bugs eclipse org bugs show bug cgi id 24691 buffer append No root classes NON NLS 1 else buffer append Hierarchy became stale NON NLS 1 return buffer to String  ITypeHierarchy toString StringBuffer StringBuffer focusType JavaElement focusType toStringWithAncestors focusType toString focusType toString focusType IType getRootClasses toString rootClasses IType getRootClasses IType toString rootClasses show_bug toString
Append a String to the given buffer representing the hierarchy for the type beginning with the specified indentation level If ascendant shows the super types otherwise show the sub types private void to String String Buffer buffer I Type type int indent boolean ascendant I Type types ascendant get Supertypes type get Subtypes type for int i 0 i types length i for int j 0 j indent j buffer append NON NLS 1 Java Element element Java Element types i buffer append element to String With Ancestors buffer append n to String buffer types i indent 1 ascendant  toString StringBuffer IType IType getSupertypes getSubtypes JavaElement JavaElement toStringWithAncestors toString
Returns whether one of the types in this hierarchy has a supertype whose simple name is the given simple name boolean has Supertype String simple Name for Iterator iter this class To Superclass values iterator iter has Next I Type super Type I Type iter next if super Type get Element Name equals simple Name return true return false  hasSupertype simpleName classToSuperclass hasNext IType superType IType superType getElementName simpleName
see I Progress Monitor protected void worked int work if this progress Monitor null this progress Monitor worked work check Canceled  IProgressMonitor progressMonitor progressMonitor checkCanceled

public interface I Java Element Requestor public void accept Field I Field field  IJavaElementRequestor acceptField IField
public interface I Java Element Requestor public void accept Field I Field field public void accept Initializer I Initializer initializer  IJavaElementRequestor acceptField IField acceptInitializer IInitializer
public void accept Field I Field field public void accept Initializer I Initializer initializer public void accept Member Type I Type type  acceptField IField acceptInitializer IInitializer acceptMemberType IType
public void accept Initializer I Initializer initializer public void accept Member Type I Type type public void accept Method I Method method  acceptInitializer IInitializer acceptMemberType IType acceptMethod IMethod
public void accept Member Type I Type type public void accept Method I Method method public void accept Package Fragment I Package Fragment package Fragment  acceptMemberType IType acceptMethod IMethod acceptPackageFragment IPackageFragment packageFragment
public void accept Method I Method method public void accept Package Fragment I Package Fragment package Fragment public void accept Type I Type type  acceptMethod IMethod acceptPackageFragment IPackageFragment packageFragment acceptType IType
public void accept Type I Type type Returns code true code if this I Java Element Requestor does not want to receive any more results  acceptType IType IJavaElementRequestor

public class Import Container extends Source Ref Element implements I Import Container protected Import Container Compilation Unit parent super parent NON NLS 1  ImportContainer SourceRefElement IImportContainer ImportContainer CompilationUnit
super parent NON NLS 1 public boolean equals Object o if o instanceof Import Container return false return super equals o  ImportContainer
see I Java Element public int get Element Type return IMPORT CONTAINER  IJavaElement getElementType IMPORT_CONTAINER
public I Java Element get Handle From Memento String token Memento Tokenizer memento Working Copy Owner working Copy Owner switch token char At 0 case JEM COUNT return get Handle Updating Count From Memento memento working Copy Owner case JEM IMPORTDECLARATION if memento has More Tokens String import Name memento next Token Java Element import Decl Java Element get Import import Name return import Decl get Handle From Memento memento working Copy Owner else return this return null  IJavaElement getHandleFromMemento MementoTokenizer WorkingCopyOwner workingCopyOwner charAt JEM_COUNT getHandleUpdatingCountFromMemento workingCopyOwner JEM_IMPORTDECLARATION hasMoreTokens importName nextToken JavaElement importDecl JavaElement getImport importName importDecl getHandleFromMemento workingCopyOwner
see Java Element get Handle Memento protected char get Handle Memento Delimiter return Java Element JEM IMPORTDECLARATION  JavaElement getHandleMemento getHandleMementoDelimiter JavaElement JEM_IMPORTDECLARATION
see I Import Container public I Import Declaration get Import String import Name return new Import Declaration this import Name  IImportContainer IImportDeclaration getImport importName ImportDeclaration importName
public I Java Element get Primary Element boolean check Owner Compilation Unit cu Compilation Unit this parent if check Owner cu is Primary return this return cu get Import Container  IJavaElement getPrimaryElement checkOwner CompilationUnit CompilationUnit checkOwner isPrimary getImportContainer
see I Source Reference public I Source Range get Source Range throws Java Model Exception I Java Element imports get Children I Source Range first Range I Source Reference imports 0 get Source Range I Source Range last Range I Source Reference imports imports length 1 get Source Range Source Range range new Source Range first Range get Offset last Range get Offset last Range get Length first Range get Offset return range  ISourceReference ISourceRange getSourceRange JavaModelException IJavaElement getChildren ISourceRange firstRange ISourceReference getSourceRange ISourceRange lastRange ISourceReference getSourceRange SourceRange SourceRange firstRange getOffset lastRange getOffset lastRange getLength firstRange getOffset
Import containers only exist if they have children see I Parent public boolean has Children return true  IParent hasChildren
public String readable Name return null  readableName
private Debugging purposes protected void to String int tab String Buffer buffer Object info Java Model Manager get Java Model Manager peek At Info this if info null info instanceof Java Element Info return I Java Element children Java Element Info info get Children for int i 0 i children length i if i 0 buffer append n NON NLS 1 Java Element children i to String tab buffer  toString StringBuffer JavaModelManager getJavaModelManager peekAtInfo JavaElementInfo IJavaElement JavaElementInfo getChildren JavaElement toString
Debugging purposes protected void to String Info int tab String Buffer buffer Object info buffer append this tab String tab buffer append import container NON NLS 1 if info null buffer append not open NON NLS 1  toStringInfo StringBuffer tabString

Constructs an Import Declaration in the given import container with the given name protected Import Declaration Import Container parent String name super parent name  ImportDeclaration ImportDeclaration ImportContainer
super parent name public boolean equals Object o if o instanceof Import Declaration return false return super equals o  ImportDeclaration
see Java Element equalsDOM Node deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected boolean equalsDOM Node IDOM Node node return node get Node Type IDOM Node IMPORT get Element Name equals node get Name  JavaElement equalsDOMNode equalsDOMNode IDOMNode getNodeType IDOMNode getElementName getName
see I Java Element public int get Element Type return IMPORT DECLARATION  IJavaElement getElementType IMPORT_DECLARATION
see org eclipse jdt core I Import Declaration get Flags public int get Flags throws Java Model Exception Import Declaration Element Info info Import Declaration Element Info get Element Info return info get Modifiers  IImportDeclaration getFlags getFlags JavaModelException ImportDeclarationElementInfo ImportDeclarationElementInfo getElementInfo getModifiers
see Java Element get Handle Memento For import declarations the handle delimiter is associated to the import container already public String get Handle Memento String Buffer buff new String Buffer Java Element get Parent get Handle Memento escape Memento Name buff get Element Name if this occurrence Count 1 buff append JEM COUNT buff append this occurrence Count return buff to String  JavaElement getHandleMemento getHandleMemento StringBuffer StringBuffer JavaElement getParent getHandleMemento escapeMementoName getElementName occurrenceCount JEM_COUNT occurrenceCount toString
see Java Element get Handle Memento protected char get Handle Memento Delimiter For import declarations the handle delimiter is associated to the import container already Assert is True false Should not be called NON NLS 1 return 0  JavaElement getHandleMemento getHandleMementoDelimiter isTrue
public I Java Element get Primary Element boolean check Owner Compilation Unit cu Compilation Unit this parent get Parent if check Owner cu is Primary return this return cu get Import this name  IJavaElement getPrimaryElement checkOwner CompilationUnit CompilationUnit getParent checkOwner isPrimary getImport
Returns true if the import is on demand ends with public boolean is On Demand return this name ends With NON NLS 1  isOnDemand endsWith
public String readable Name return null  readableName
private Debugging purposes protected void to String Info int tab String Buffer buffer Object info buffer append this tab String tab buffer append import NON NLS 1 to String Name buffer if info null buffer append not open NON NLS 1  toStringInfo StringBuffer tabString toStringName

see org eclipse jdt internal compiler env I Source Import on Demand public boolean on Demand return this on Demand  ISourceImport onDemand onDemand onDemand
public void set On Demand boolean on Demand this on Demand on Demand  setOnDemand onDemand onDemand onDemand

public interface I Naming Requestor void accept Name With Prefix And Suffix char name boolean is First Prefix boolean is First Suffix  INamingRequestor acceptNameWithPrefixAndSuffix isFirstPrefix isFirstSuffix
public interface I Naming Requestor void accept Name With Prefix And Suffix char name boolean is First Prefix boolean is First Suffix void accept Name With Prefix char name boolean is First Prefix  INamingRequestor acceptNameWithPrefixAndSuffix isFirstPrefix isFirstSuffix acceptNameWithPrefix isFirstPrefix
void accept Name With Prefix And Suffix char name boolean is First Prefix boolean is First Suffix void accept Name With Prefix char name boolean is First Prefix void accept Name With Suffix char name boolean is First Suffix  acceptNameWithPrefixAndSuffix isFirstPrefix isFirstSuffix acceptNameWithPrefix isFirstPrefix acceptNameWithSuffix isFirstSuffix
void accept Name With Prefix char name boolean is First Prefix void accept Name With Suffix char name boolean is First Suffix void accept Name Without Prefix And Suffix char name  acceptNameWithPrefix isFirstPrefix acceptNameWithSuffix isFirstSuffix acceptNameWithoutPrefixAndSuffix

int elements Int List int elements this elements elements this size elements length  IntList
void add int new Element if this size this elements length int new Size this size 3 if new Size 7 new Size 7 System arraycopy this elements 0 this elements new int new Size 0 this size this elements this size new Element  newElement newSize newSize newSize newSize newElement
int as Array int result new int this size System arraycopy this elements 0 result 0 this size return result  asArray
Disk Index String file Name this file Name file Name clear cached items this header Info Offset 1 this number Of Chunks 1 this size Of Last Chunk 1 this chunk Offsets null this document Reference Size 1 this cache User Count 1 this cached Chunks null this category Tables null this category Offsets null  DiskIndex fileName fileName fileName headerInfoOffset numberOfChunks sizeOfLastChunk chunkOffsets documentReferenceSize cacheUserCount cachedChunks categoryTables categoryOffsets
Simple Set add Document Names String substring Memory Index memory Index throws IO Exception must skip over documents which have been added changed deleted in the memory index String doc Names read All Document Names Simple Set results new Simple Set doc Names length if substring null if memory Index null for int i 0 l doc Names length i l i results add doc Names i else Simple Lookup Table docs To Refs memory Index docs To References for int i 0 l doc Names length i l i String doc Name doc Names i if docs To Refs contains Key doc Name results add doc Name else if memory Index null for int i 0 l doc Names length i l i if doc Names i starts With substring 0 results add doc Names i else Simple Lookup Table docs To Refs memory Index docs To References for int i 0 l doc Names length i l i String doc Name doc Names i if doc Name starts With substring 0 docs To Refs contains Key doc Name results add doc Name return results  SimpleSet addDocumentNames MemoryIndex memoryIndex IOException docNames readAllDocumentNames SimpleSet SimpleSet docNames memoryIndex docNames docNames SimpleLookupTable docsToRefs memoryIndex docsToReferences docNames docName docNames docsToRefs containsKey docName docName memoryIndex docNames docNames startsWith docNames SimpleLookupTable docsToRefs memoryIndex docsToReferences docNames docName docNames docName startsWith docsToRefs containsKey docName docName
private void add Query Result Hashtable Of Object results char word Hashtable Of Object words To Doc Numbers Memory Index memory Index throws IO Exception must skip over documents which have been added changed deleted in the memory index Entry Result result Entry Result results get word if memory Index null if result null results put word new Entry Result word words To Doc Numbers else result add Document Table words To Doc Numbers else Simple Lookup Table docs To Refs memory Index docs To References if result null result new Entry Result word null int doc Numbers read Document Numbers words To Doc Numbers get word for int i 0 l doc Numbers length i l i String doc Name read Document Name doc Numbers i if docs To Refs contains Key doc Name result add Document Name doc Name if result is Empty results put word result  addQueryResult HashtableOfObject HashtableOfObject wordsToDocNumbers MemoryIndex memoryIndex IOException EntryResult EntryResult memoryIndex EntryResult wordsToDocNumbers addDocumentTable wordsToDocNumbers SimpleLookupTable docsToRefs memoryIndex docsToReferences EntryResult docNumbers readDocumentNumbers wordsToDocNumbers docNumbers docName readDocumentName docNumbers docsToRefs containsKey docName addDocumentName docName isEmpty
Hashtable Of Object add Query Results char categories char key int match Rule Memory Index memory Index throws IO Exception assumes sender has called start Query will call stop Query when finished Hashtable Of Object results new Hashtable Of Object 13 if this category Offsets null return results file is empty if match Rule Search Pattern R EXACT MATCH Search Pattern R CASE SENSITIVE for int i 0 l categories length i l i Hashtable Of Object words To Doc Numbers read Category Table categories i false if words To Doc Numbers null words To Doc Numbers contains Key key add Query Result results key words To Doc Numbers memory Index else for int i 0 l categories length i l i Hashtable Of Object words To Doc Numbers read Category Table categories i false if words To Doc Numbers null char words words To Doc Numbers key Table for int j 0 m words length j m j char word words j if word null Index is Match key word match Rule add Query Result results word words To Doc Numbers memory Index return results  HashtableOfObject addQueryResults matchRule MemoryIndex memoryIndex IOException startQuery stopQuery HashtableOfObject HashtableOfObject categoryOffsets matchRule SearchPattern R_EXACT_MATCH SearchPattern R_CASE_SENSITIVE HashtableOfObject wordsToDocNumbers readCategoryTable wordsToDocNumbers wordsToDocNumbers containsKey addQueryResult wordsToDocNumbers memoryIndex HashtableOfObject wordsToDocNumbers readCategoryTable wordsToDocNumbers wordsToDocNumbers keyTable isMatch matchRule addQueryResult wordsToDocNumbers memoryIndex
private String compute Document Names String on Disk Names int positions Simple Lookup Table indexed Documents Memory Index memory Index int on Disk Length on Disk Names length Object doc Names memory Index docs To References key Table Object reference Tables memory Index docs To References value Table if on Disk Length 0 disk index was empty so add every indexed document for int i 0 l reference Tables length i l i if reference Tables i null indexed Documents put doc Names i null remember each new document String new Doc Names new String indexed Documents element Size int count 0 Object added indexed Documents key Table for int i 0 l added length i l i if added i null new Doc Names count String added i Util sort new Doc Names for int i 0 l new Doc Names length i l i indexed Documents put new Doc Names i new Integer i return new Doc Names initialize positions as if each document will remain in the same position for int i 0 i on Disk Length i positions i i find out if the memory index has any new or deleted documents if not then the names positions are the same int num Deleted Doc Names 0 int num Reindexed Doc Names 0 next Path for int i 0 l doc Names length i l i String doc Name String doc Names i if doc Name null for int j 0 j on Disk Length j if doc Name equals on Disk Names j if reference Tables i null positions j DELETED num Deleted Doc Names else positions j RE INDEXED num Reindexed Doc Names continue next Path if reference Tables i null indexed Documents put doc Name null remember each new document skip deleted documents which were never saved String new Doc Names on Disk Names if num Deleted Doc Names 0 indexed Documents element Size 0 some new documents have been added or some old ones deleted new Doc Names new String on Disk Length indexed Documents element Size num Deleted Doc Names int count 0 for int i 0 i on Disk Length i if positions i RE INDEXED new Doc Names count on Disk Names i keep each unchanged document Object added indexed Documents key Table for int i 0 l added length i l i if added i null new Doc Names count String added i add each new document Util sort new Doc Names for int i 0 l new Doc Names length i l i if indexed Documents contains Key new Doc Names i indexed Documents put new Doc Names i new Integer i remember the position for each new document need to be able to look up an old position ref from a ref and map it to its new position if its old position DELETED then its forgotton if its old position ReINDEXED then its also forgotten but its new position is needed to map references int count 1 for int i 0 i on Disk Length switch positions i case DELETED i skip over deleted references are forgotten break case RE INDEXED String new Name new Doc Names count if new Name equals on Disk Names i indexed Documents put new Name new Integer count the reindexed doc Name that was at position i is now at position count i break default if new Doc Names count equals on Disk Names i positions i count the unchanged doc Name that was at position i is now at position count return new Doc Names  computeDocumentNames onDiskNames SimpleLookupTable indexedDocuments MemoryIndex memoryIndex onDiskLength onDiskNames docNames memoryIndex docsToReferences keyTable referenceTables memoryIndex docsToReferences valueTable onDiskLength referenceTables referenceTables indexedDocuments docNames newDocNames indexedDocuments elementSize indexedDocuments keyTable newDocNames newDocNames newDocNames indexedDocuments newDocNames newDocNames onDiskLength numDeletedDocNames numReindexedDocNames nextPath docNames docName docNames docName onDiskLength docName onDiskNames referenceTables numDeletedDocNames RE_INDEXED numReindexedDocNames nextPath referenceTables indexedDocuments docName newDocNames onDiskNames numDeletedDocNames indexedDocuments elementSize newDocNames onDiskLength indexedDocuments elementSize numDeletedDocNames onDiskLength RE_INDEXED newDocNames onDiskNames indexedDocuments keyTable newDocNames newDocNames newDocNames indexedDocuments containsKey newDocNames indexedDocuments newDocNames onDiskLength RE_INDEXED newName newDocNames newName onDiskNames indexedDocuments newName docName newDocNames onDiskNames docName newDocNames
private void copy Query Results Hashtable Of Object category To Words int new Position throws IO Exception char category Names category To Words key Table Object word Sets category To Words value Table for int i 0 l category Names length i l i char category Name category Names i if category Name null Simple Word Set word Set Simple Word Set word Sets i Hashtable Of Object words To Docs Hashtable Of Object this category Tables get category Name if words To Docs null this category Tables put category Name words To Docs new Hashtable Of Object word Set element Size char words word Set words for int j 0 m words length j m j char word words j if word null Object o words To Docs get word if o null words To Docs put word new int new Position else if o instanceof Int List Int List o add new Position else Int List list new Int List int o list add new Position words To Docs put word list  copyQueryResults HashtableOfObject categoryToWords newPosition IOException categoryNames categoryToWords keyTable wordSets categoryToWords valueTable categoryNames categoryName categoryNames categoryName SimpleWordSet wordSet SimpleWordSet wordSets HashtableOfObject wordsToDocs HashtableOfObject categoryTables categoryName wordsToDocs categoryTables categoryName wordsToDocs HashtableOfObject wordSet elementSize wordSet wordsToDocs wordsToDocs newPosition IntList IntList newPosition IntList IntList newPosition wordsToDocs
File get Index File if this file Name null return null return new File this file Name  getIndexFile fileName fileName
void initialize boolean reuse Existing File throws IO Exception File index File get Index File if index File exists if reuse Existing File Random Access File file new Random Access File this file Name r NON NLS 1 try String signature file readUTF if signature equals SIGNATURE throw new IO Exception Util bind exception wrong Format NON NLS 1 this header Info Offset file read Int if this header Info Offset 0 file is empty if its not set read Header Info file finally file close return if index File delete if DEBUG System out println initialize Failed to delete index this file Name NON NLS 1 throw new IO Exception Failed to delete index this file Name NON NLS 1 if index File create New File Random Access File file new Random Access File this file Name rw NON NLS 1 try file writeUTF SIGNATURE file write Int 1 file is empty finally file close else if DEBUG System out println initialize Failed to create new index this file Name NON NLS 1 throw new IO Exception Failed to create new index this file Name NON NLS 1  reuseExistingFile IOException indexFile getIndexFile indexFile reuseExistingFile RandomAccessFile RandomAccessFile fileName IOException wrongFormat headerInfoOffset readInt headerInfoOffset readHeaderInfo indexFile fileName IOException fileName indexFile createNewFile RandomAccessFile RandomAccessFile fileName writeInt fileName IOException fileName
private void initialize From Disk Index disk Index File new Index File throws IO Exception if new Index File exists new Index File delete delete the temporary index file if DEBUG System out println initialize From Failed to delete temp index this file Name NON NLS 1 else if new Index File create New File if DEBUG System out println initialize From Failed to create temp index this file Name NON NLS 1 throw new IO Exception Failed to create temp index this file Name NON NLS 1 int size disk Index category Offsets null 8 disk Index category Offsets element Size this category Offsets new Hashtable Of Int Values size this category Tables new Hashtable Of Object size  initializeFrom DiskIndex diskIndex newIndexFile IOException newIndexFile newIndexFile initializeFrom fileName newIndexFile createNewFile initializeFrom fileName IOException fileName diskIndex categoryOffsets diskIndex categoryOffsets elementSize categoryOffsets HashtableOfIntValues categoryTables HashtableOfObject
private void merge Categories Disk Index on Disk int positions Data Output Stream stream throws IO Exception at this point this category Tables contains the names words To Docs added in copy Query Results char old Names on Disk category Offsets key Table for int i 0 l old Names length i l i char old Name old Names i if old Name null this category Tables contains Key old Name this category Tables put old Name null char category Names this category Tables key Table for int i 0 l category Names length i l i if category Names i null merge Category category Names i on Disk positions stream this category Tables null  mergeCategories DiskIndex onDisk DataOutputStream IOException categoryTables wordsToDocs copyQueryResults oldNames onDisk categoryOffsets keyTable oldNames oldName oldNames oldName categoryTables containsKey oldName categoryTables oldName categoryNames categoryTables keyTable categoryNames categoryNames mergeCategory categoryNames onDisk categoryTables
private void merge Category char category Name Disk Index on Disk int positions Data Output Stream stream throws IO Exception Hashtable Of Object words To Docs Hashtable Of Object this category Tables get category Name if words To Docs null words To Docs new Hashtable Of Object 3 Hashtable Of Object old Words To Docs on Disk read Category Table category Name true if old Words To Docs null char old Words old Words To Docs key Table Object old Array Offsets old Words To Docs value Table next Word for int i 0 l old Words length i l i char old Word old Words i if old Word null int old Doc Numbers int old Array Offsets i int length old Doc Numbers length int mapped Numbers new int length int count 0 for int j 0 j length j int pos positions old Doc Numbers j if pos RE INDEXED forget any reference to a document which was deleted or re indexed mapped Numbers count pos if count length if count 0 continue next Word skip words which no longer have any references System arraycopy mapped Numbers 0 mapped Numbers new int count 0 count Object o words To Docs get old Word if o null words To Docs put old Word mapped Numbers else Int List list null if o instanceof Int List list Int List o else list new Int List int o words To Docs put old Word list for int j 0 j count j list add mapped Numbers j on Disk category Tables put category Name null flush cached table write Category Table category Name words To Docs stream  mergeCategory categoryName DiskIndex onDisk DataOutputStream IOException HashtableOfObject wordsToDocs HashtableOfObject categoryTables categoryName wordsToDocs wordsToDocs HashtableOfObject HashtableOfObject oldWordsToDocs onDisk readCategoryTable categoryName oldWordsToDocs oldWords oldWordsToDocs keyTable oldArrayOffsets oldWordsToDocs valueTable nextWord oldWords oldWord oldWords oldWord oldDocNumbers oldArrayOffsets oldDocNumbers mappedNumbers oldDocNumbers RE_INDEXED re_indexed mappedNumbers nextWord mappedNumbers mappedNumbers wordsToDocs oldWord wordsToDocs oldWord mappedNumbers IntList IntList IntList IntList wordsToDocs oldWord mappedNumbers onDisk categoryTables categoryName writeCategoryTable categoryName wordsToDocs
Disk Index merge With Memory Index memory Index throws IO Exception assume write lock is held compute write out new doc Names String doc Names read All Document Names int previous Length doc Names length int positions new int previous Length keeps track of the position of each document in the new sorted doc Names Simple Lookup Table indexed Documents new Simple Lookup Table 3 for each new changed document in the memory Index doc Names compute Document Names doc Names positions indexed Documents memory Index if doc Names length 0 if previous Length 0 return this nothing to do memory index contained deleted documents that had never been saved index is now empty since all the saved documents were removed Disk Index new Disk Index new Disk Index this file Name new Disk Index initialize false return new Disk Index Disk Index new Disk Index new Disk Index this file Name tmp NON NLS 1 File new Index File new Disk Index get Index File try new Disk Index initialize From this new Index File Data Output Stream stream new Data Output Stream new Buffered Output Stream new File Output Stream new Index File false 2048 int offset To Header 1 try new Disk Index write All Document Names doc Names stream doc Names null free up the space add each new changed doc to empty category tables using its new position if indexed Documents element Size 0 Object names indexed Documents key Table Object integer Positions indexed Documents value Table for int i 0 l names length i l i if names i null new Disk Index copy Query Results Hashtable Of Object memory Index docs To References get names i Integer integer Positions i int Value indexed Documents null free up the space merge each category table with the new ones write them out if previous Length 0 new Disk Index write Categories stream else new Disk Index merge Categories this positions stream offset To Header stream size new Disk Index write Header Info stream positions null free up the space finally stream close new Disk Index write Offset To Header offset To Header rename file by deleting previous index file renaming temp one File old get Index File if old delete if DEBUG System out println merge With Failed to delete this file Name NON NLS 1 throw new IO Exception Failed to delete index file this file Name NON NLS 1 if new Index File rename To old if DEBUG System out println merge With Failed to rename this file Name NON NLS 1 throw new IO Exception Failed to rename index file this file Name NON NLS 1 catch IO Exception e if new Index File exists new Index File delete if DEBUG System out println merge With Failed to delete temp index new Disk Index file Name NON NLS 1 throw e new Disk Index file Name this file Name return new Disk Index  DiskIndex mergeWith MemoryIndex memoryIndex IOException docNames docNames readAllDocumentNames previousLength docNames previousLength docNames SimpleLookupTable indexedDocuments SimpleLookupTable memoryIndex docNames computeDocumentNames docNames indexedDocuments memoryIndex docNames previousLength DiskIndex newDiskIndex DiskIndex fileName newDiskIndex newDiskIndex DiskIndex newDiskIndex DiskIndex fileName newIndexFile newDiskIndex getIndexFile newDiskIndex initializeFrom newIndexFile DataOutputStream DataOutputStream BufferedOutputStream FileOutputStream newIndexFile offsetToHeader newDiskIndex writeAllDocumentNames docNames docNames indexedDocuments elementSize indexedDocuments keyTable integerPositions indexedDocuments valueTable newDiskIndex copyQueryResults HashtableOfObject memoryIndex docsToReferences integerPositions intValue indexedDocuments previousLength newDiskIndex writeCategories newDiskIndex mergeCategories offsetToHeader newDiskIndex writeHeaderInfo newDiskIndex writeOffsetToHeader offsetToHeader getIndexFile mergeWith fileName IOException fileName newIndexFile renameTo mergeWith fileName IOException fileName IOException newIndexFile newIndexFile mergeWith newDiskIndex fileName newDiskIndex fileName fileName newDiskIndex
private synchronized String read All Document Names throws IO Exception if this number Of Chunks 0 return new String 0 Data Input Stream stream new Data Input Stream new Buffered Input Stream new File Input Stream get Index File 2048 try stream skip this chunk Offsets 0 int last Index this number Of Chunks 1 String doc Names new String last Index CHUNK SIZE size Of Last Chunk for int i 0 i this number Of Chunks i read Chunk doc Names stream i CHUNK SIZE i last Index CHUNK SIZE size Of Last Chunk return doc Names finally stream close  readAllDocumentNames IOException numberOfChunks DataInputStream DataInputStream BufferedInputStream FileInputStream getIndexFile chunkOffsets lastIndex numberOfChunks docNames lastIndex CHUNK_SIZE sizeOfLastChunk numberOfChunks readChunk docNames CHUNK_SIZE lastIndex CHUNK_SIZE sizeOfLastChunk docNames
private synchronized Hashtable Of Object read Category Table char category Name boolean cache Doc Numbers throws IO Exception result will be null if category Name is unknown int offset this category Offsets get category Name if offset Hashtable Of Int Values NO VALUE return null if this category Tables null this category Tables new Hashtable Of Object this category Offsets element Size else Hashtable Of Object cached Table Hashtable Of Object this category Tables get category Name if cached Table null return cached Table Data Input Stream stream new Data Input Stream new Buffered Input Stream new File Input Stream get Index File 2048 Hashtable Of Object category Table null char matching Words null int count 0 int first Offset 1 try stream skip offset int size stream read Int category Table new Hashtable Of Object size if cache Doc Numbers matching Words new char size for int i 0 i size i char word Util readUTF stream int array Offset stream read Int if array Offset 0 if matching Words null if count 0 first Offset array Offset matching Words count word category Table put word new Integer array Offset offset to array in the file else category Table put word new int array Offset stored a 1 element array by negating the document Number this category Tables put category Name category Table finally stream close if count 0 stream new Data Input Stream new Buffered Input Stream new File Input Stream get Index File 2048 try stream skip first Offset for int i 0 i count i each array follows the previous one category Table put matching Words i read Document Array stream finally stream close return category Table  HashtableOfObject readCategoryTable categoryName cacheDocNumbers IOException categoryName categoryOffsets categoryName HashtableOfIntValues NO_VALUE categoryTables categoryTables HashtableOfObject categoryOffsets elementSize HashtableOfObject cachedTable HashtableOfObject categoryTables categoryName cachedTable cachedTable DataInputStream DataInputStream BufferedInputStream FileInputStream getIndexFile HashtableOfObject categoryTable matchingWords firstOffset readInt categoryTable HashtableOfObject cacheDocNumbers matchingWords arrayOffset readInt arrayOffset matchingWords firstOffset arrayOffset matchingWords categoryTable arrayOffset categoryTable arrayOffset documentNumber categoryTables categoryName categoryTable DataInputStream BufferedInputStream FileInputStream getIndexFile firstOffset categoryTable matchingWords readDocumentArray categoryTable
private void read Chunk String doc Names Data Input Stream stream int index int size throws IO Exception String current stream readUTF doc Names index current for int i 1 i size i int start stream read Unsigned Byte number of identical characters at the beginning int end stream read Unsigned Byte number of identical characters at the end String next stream readUTF if start 0 if end 0 int length current length next current substring 0 start next current substring length end length else next current substring 0 start next else if end 0 int length current length next next current substring length end length doc Names index next current next  readChunk docNames DataInputStream IOException docNames readUnsignedByte readUnsignedByte docNames
private int read Document Array Data Input Stream stream throws IO Exception int array Size stream read Short if array Size 0x7FFF array Size stream read Int int result new int array Size for int i 0 i array Size i switch this document Reference Size case 1 result i stream read Unsigned Byte break case 2 result i stream read Unsigned Short break default result i stream read Int break return result  readDocumentArray DataInputStream IOException arraySize readShort arraySize arraySize readInt arraySize arraySize documentReferenceSize readUnsignedByte readUnsignedShort readInt
synchronized String read Document Name int doc Number throws IO Exception if this cached Chunks null this cached Chunks new String this number Of Chunks int chunk Number doc Number CHUNK SIZE String chunk this cached Chunks chunk Number if chunk null Data Input Stream stream new Data Input Stream new Buffered Input Stream new File Input Stream get Index File 2048 try stream skip this chunk Offsets chunk Number int size chunk Number this number Of Chunks 1 this size Of Last Chunk CHUNK SIZE chunk new String size read Chunk chunk stream 0 size finally stream close this cached Chunks chunk Number chunk return chunk doc Number chunk Number CHUNK SIZE  readDocumentName docNumber IOException cachedChunks cachedChunks numberOfChunks chunkNumber docNumber CHUNK_SIZE cachedChunks chunkNumber DataInputStream DataInputStream BufferedInputStream FileInputStream getIndexFile chunkOffsets chunkNumber chunkNumber numberOfChunks sizeOfLastChunk CHUNK_SIZE readChunk cachedChunks chunkNumber docNumber chunkNumber CHUNK_SIZE
synchronized int read Document Numbers Object array Offset throws IO Exception array Offset is either a cached array of doc Numbers or an Integer offset in the file if array Offset instanceof int return int array Offset Data Input Stream stream new Data Input Stream new Buffered Input Stream new File Input Stream get Index File 2048 try stream skip Integer array Offset int Value return read Document Array stream finally stream close  readDocumentNumbers arrayOffset IOException arrayOffset docNumbers arrayOffset arrayOffset DataInputStream DataInputStream BufferedInputStream FileInputStream getIndexFile arrayOffset intValue readDocumentArray
private void read Header Info Random Access File file throws IO Exception file seek this header Info Offset must be same order as write Header Info this number Of Chunks file read Int this size Of Last Chunk file read Unsigned Byte this document Reference Size file read Unsigned Byte this chunk Offsets new int this number Of Chunks for int i 0 i this number Of Chunks i this chunk Offsets i file read Int int size file read Int this category Offsets new Hashtable Of Int Values size for int i 0 i size i this category Offsets put Util readUTF file file read Int cache offset to category table this category Tables new Hashtable Of Object size  readHeaderInfo RandomAccessFile IOException headerInfoOffset writeHeaderInfo numberOfChunks readInt sizeOfLastChunk readUnsignedByte documentReferenceSize readUnsignedByte chunkOffsets numberOfChunks numberOfChunks chunkOffsets readInt readInt categoryOffsets HashtableOfIntValues categoryOffsets readInt categoryTables HashtableOfObject
this category Tables new Hashtable Of Object size synchronized void start Query this cache User Count  categoryTables HashtableOfObject startQuery cacheUserCount
synchronized void stop Query if this cache User Count 0 clear cached items this cache User Count 1 this cached Chunks null this category Tables null  stopQuery cacheUserCount cacheUserCount cachedChunks categoryTables
private void write All Document Names String sorted Doc Names Data Output Stream stream throws IO Exception if sorted Doc Names length 0 throw new Illegal Argument Exception assume the file was just created by initialize From in order write SIGNATURE header Info Offset place holder then each compressed chunk of document names stream writeUTF SIGNATURE this header Info Offset stream size stream write Int 1 will overwrite with correct value later int size sorted Doc Names length this number Of Chunks size CHUNK SIZE 1 this size Of Last Chunk size CHUNK SIZE if this size Of Last Chunk 0 this number Of Chunks this size Of Last Chunk CHUNK SIZE this document Reference Size size 0x7F 1 size 0x7FFF 2 4 number of bytes used to encode a reference this chunk Offsets new int this number Of Chunks int last Index this number Of Chunks 1 for int i 0 i this number Of Chunks i this chunk Offsets i stream size int chunk Size i last Index this size Of Last Chunk CHUNK SIZE int chunk Index i CHUNK SIZE String current sorted Doc Names chunk Index stream writeUTF current for int j 1 j chunk Size j String next sorted Doc Names chunk Index j int len1 current length int len2 next length int max len1 len2 len1 len2 int start 0 number of identical characters at the beginning also the index of first character that is different while current char At start next char At start start if max start break current is abba next is abbab if start 255 start 255 int end 0 number of identical characters at the end while current char At len1 next char At len2 end if len2 start break current is abbba next is abba if end 255 end 255 stream write Byte start stream write Byte end int last next length end stream writeUTF start last next substring start last NON NLS 1 current next  writeAllDocumentNames sortedDocNames DataOutputStream IOException sortedDocNames IllegalArgumentException initializeFrom headerInfoOffset headerInfoOffset writeInt sortedDocNames numberOfChunks CHUNK_SIZE sizeOfLastChunk CHUNK_SIZE sizeOfLastChunk numberOfChunks sizeOfLastChunk CHUNK_SIZE documentReferenceSize chunkOffsets numberOfChunks lastIndex numberOfChunks numberOfChunks chunkOffsets chunkSize lastIndex sizeOfLastChunk CHUNK_SIZE chunkIndex CHUNK_SIZE sortedDocNames chunkIndex chunkSize sortedDocNames chunkIndex charAt charAt charAt charAt writeByte writeByte
private void write Categories Data Output Stream stream throws IO Exception char category Names this category Tables key Table Object tables this category Tables value Table for int i 0 l category Names length i l i if category Names i null write Category Table category Names i Hashtable Of Object tables i stream this category Tables null  writeCategories DataOutputStream IOException categoryNames categoryTables keyTable categoryTables valueTable categoryNames categoryNames writeCategoryTable categoryNames HashtableOfObject categoryTables
private void write Category Table char category Name Hashtable Of Object words To Docs Data Output Stream stream throws IO Exception append the file with the document number arrays remember the offsets Object values words To Docs value Table for int i 0 l values length i l i Object o values i if o null int document Numbers o instanceof int int o Int List o as Array int length document Numbers length if length 1 values i new Integer document Numbers 0 store an array of 1 element by negating the document Number can be zero else values i new Integer stream size write Document Numbers document Numbers stream append the file with the arrays followed by the words offsets this category Offsets put category Name stream size remember the offset to the start of the table this category Tables put category Name null flush cached table stream write Int words To Docs element Size char words words To Docs key Table for int i 0 l words length i l i if words i null Util writeUTF stream words i stream write Int Integer values i int Value offset in the file of the array of document numbers  writeCategoryTable categoryName HashtableOfObject wordsToDocs DataOutputStream IOException wordsToDocs valueTable documentNumbers IntList asArray documentNumbers documentNumbers documentNumber writeDocumentNumbers documentNumbers categoryOffsets categoryName categoryTables categoryName writeInt wordsToDocs elementSize wordsToDocs keyTable writeInt intValue
private void write Document Numbers int document Numbers Data Output Stream stream throws IO Exception int length document Numbers length if length 0x7FFF if length 0 throw new Illegal Argument Exception stream write Short length else stream write Short 0x7FFF stream write Int length Util sort document Numbers for int i 0 i length i switch this document Reference Size case 1 stream write Byte document Numbers i break case 2 stream write Short document Numbers i break default stream write Int document Numbers i break  writeDocumentNumbers documentNumbers DataOutputStream IOException documentNumbers IllegalArgumentException writeShort writeShort writeInt documentNumbers documentReferenceSize writeByte documentNumbers writeShort documentNumbers writeInt documentNumbers
private void write Header Info Data Output Stream stream throws IO Exception stream write Int this number Of Chunks stream write Byte this size Of Last Chunk stream write Byte this document Reference Size apend the file with chunk offsets for int i 0 i this number Of Chunks i stream write Int this chunk Offsets i append the file with the category offsets of name offset pairs followed by each name an offset to its word doc table stream write Int this category Offsets element Size char category Names this category Offsets key Table int offsets this category Offsets value Table for int i 0 l category Names length i l i if category Names i null Util writeUTF stream category Names i stream write Int offsets i  writeHeaderInfo DataOutputStream IOException writeInt numberOfChunks writeByte sizeOfLastChunk writeByte documentReferenceSize numberOfChunks writeInt chunkOffsets writeInt categoryOffsets elementSize categoryNames categoryOffsets keyTable categoryOffsets valueTable categoryNames categoryNames categoryNames writeInt
private void write Offset To Header int offset To Header throws IO Exception if offset To Header 0 Random Access File file new Random Access File this file Name rw NON NLS 1 try file seek this header Info Offset offset to position in header file write Int offset To Header this header Info Offset offset To Header update to reflect the correct offset finally file close  writeOffsetToHeader offsetToHeader IOException offsetToHeader RandomAccessFile RandomAccessFile fileName headerInfoOffset writeInt offsetToHeader headerInfoOffset offsetToHeader

public Entry Result char word Hashtable Of Object table this word word if table null this document Tables new Hashtable Of Object table  EntryResult HashtableOfObject documentTables HashtableOfObject
public void add Document Name String document Name if this document Names null this document Names new Simple Set 3 this document Names add document Name  addDocumentName documentName documentNames documentNames SimpleSet documentNames documentName
public void add Document Table Hashtable Of Object table if this document Tables null this document Tables new Hashtable Of Object table return int length this document Tables length System arraycopy this document Tables 0 this document Tables new Hashtable Of Object length 1 0 length this document Tables length table  addDocumentTable HashtableOfObject documentTables documentTables HashtableOfObject documentTables documentTables documentTables HashtableOfObject documentTables
this document Tables length table public char get Word return this word  documentTables getWord
public String get Document Names Index index throws java io IO Exception if this document Tables null for int i 0 l this document Tables length i l i Object offset this document Tables i get word int numbers index disk Index read Document Numbers offset for int j 0 k numbers length j k j add Document Name index disk Index read Document Name numbers j if this document Names null return new String 0 String names new String this document Names element Size int count 0 Object values this document Names values for int i 0 l values length i l i if values i null names count String values i return names  getDocumentNames IOException documentTables documentTables documentTables diskIndex readDocumentNumbers addDocumentName diskIndex readDocumentName documentNames documentNames elementSize documentNames
return names public boolean is Empty return this document Tables null this document Names null  isEmpty documentTables documentNames

Returns the path represented by path String converted back to a path relative to the local file system param path String the path to convert ul li an absolute I Path relative to the workspace root if the path represents a resource in the workspace li a relative I Path relative to the workspace root followed by JAR FILE ENTRY SEPARATOR followed by an absolute path relative to the jar if the path represents a class file in an internal jar li an absolute path relative to the file system followed by JAR FILE ENTRY SEPARATOR followed by an absolute path relative to the jar if the path represents a class file in an external jar ul return the converted path ul li the original path String if the path represents a resource in the workspace li an absolute path relative to the file system followed by JAR FILE ENTRY SEPARATOR followed by an absolute path relative to the jar if the path represents a class file in an external or internal jar ul public static String convert Path String path String int index path String index Of I Java Search Scope JAR FILE ENTRY SEPARATOR if index 1 return path String Path jar Path new Path path String substring 0 index return jar Path is Absolute jar Path toOS String jar Path make Absolute to String path String substring index path String length  pathString pathString IPath IPath JAR_FILE_ENTRY_SEPARATOR JAR_FILE_ENTRY_SEPARATOR pathString JAR_FILE_ENTRY_SEPARATOR convertPath pathString pathString indexOf IJavaSearchScope JAR_FILE_ENTRY_SEPARATOR pathString jarPath pathString jarPath isAbsolute jarPath toOSString jarPath makeAbsolute toString pathString pathString
public static boolean is Match char pattern char word int match Rule if pattern null return true switch match Rule case Search Pattern R EXACT MATCH return Char Operation equals pattern word false case Search Pattern R PREFIX MATCH return Char Operation prefix Equals pattern word false case Search Pattern R PATTERN MATCH return Char Operation match pattern word false case Search Pattern R EXACT MATCH Search Pattern R CASE SENSITIVE return Char Operation equals pattern word case Search Pattern R PREFIX MATCH Search Pattern R CASE SENSITIVE return Char Operation prefix Equals pattern word case Search Pattern R PATTERN MATCH Search Pattern R CASE SENSITIVE return Char Operation match pattern word true return false  isMatch matchRule matchRule SearchPattern R_EXACT_MATCH CharOperation SearchPattern R_PREFIX_MATCH CharOperation prefixEquals SearchPattern R_PATTERN_MATCH CharOperation SearchPattern R_EXACT_MATCH SearchPattern R_CASE_SENSITIVE CharOperation SearchPattern R_PREFIX_MATCH SearchPattern R_CASE_SENSITIVE CharOperation prefixEquals SearchPattern R_PATTERN_MATCH SearchPattern R_CASE_SENSITIVE CharOperation
public Index String file Name String printable Name boolean reuse Existing File throws IO Exception this printable Name printable Name this monitor new Read Write Monitor this memory Index new Memory Index this disk Index new Disk Index file Name this disk Index initialize reuse Existing File  fileName printableName reuseExistingFile IOException printableName printableName ReadWriteMonitor memoryIndex MemoryIndex diskIndex DiskIndex fileName diskIndex reuseExistingFile
this disk Index initialize reuse Existing File public void add Index Entry char category char key Internal Search Document document this memory Index add Index Entry category key document  diskIndex reuseExistingFile addIndexEntry InternalSearchDocument memoryIndex addIndexEntry
public File get Index File if this disk Index null return null return this disk Index get Index File  getIndexFile diskIndex diskIndex getIndexFile
return this disk Index get Index File public boolean has Changed return this memory Index has Changed  diskIndex getIndexFile hasChanged memoryIndex hasChanged
Returns the entries containing the given key in a group of categories or null if no matches are found The match Rule dictates whether its an exact prefix or pattern match as well as case sensitive or insensitive If the key is null then all entries in specified categories are returned public Entry Result query char categories char key int match Rule throws IO Exception if this memory Index should Merge monitor exit Read Enter Write try save finally monitor exit Write Enter Read Hashtable Of Object results if this memory Index has Changed results this disk Index add Query Results categories key match Rule this memory Index this memory Index add Query Results categories key match Rule results else results this disk Index add Query Results categories key match Rule null if results element Size 0 return null Entry Result entry Results new Entry Result results element Size int count 0 Object values results value Table for int i 0 l values length i l i Entry Result result Entry Result values i if result null entry Results count result return entry Results  matchRule EntryResult matchRule IOException memoryIndex shouldMerge exitReadEnterWrite exitWriteEnterRead HashtableOfObject memoryIndex hasChanged diskIndex addQueryResults matchRule memoryIndex memoryIndex addQueryResults matchRule diskIndex addQueryResults matchRule elementSize EntryResult entryResults EntryResult elementSize valueTable EntryResult EntryResult entryResults entryResults
Returns the document names that contain the given substring if null then returns all of them public String query Document Names String substring throws IO Exception Simple Set results if this memory Index has Changed results this disk Index add Document Names substring this memory Index this memory Index add Document Names substring results else results this disk Index add Document Names substring null if results element Size 0 return null String document Names new String results element Size int count 0 Object paths results values for int i 0 l paths length i l i if paths i null document Names count String paths i return document Names  queryDocumentNames IOException SimpleSet memoryIndex hasChanged diskIndex addDocumentNames memoryIndex memoryIndex addDocumentNames diskIndex addDocumentNames elementSize documentNames elementSize documentNames documentNames
return document Names public void remove String document Name this memory Index remove document Name  documentNames documentName memoryIndex documentName
public void save throws IO Exception must own the write lock of the monitor if has Changed return int number Of Changes this memory Index docs To References element Size this disk Index this disk Index merge With this memory Index this memory Index new Memory Index if number Of Changes 1000 System gc reclaim space if the Memory Index was very BIG  IOException hasChanged numberOfChanges memoryIndex docsToReferences elementSize diskIndex diskIndex mergeWith memoryIndex memoryIndex MemoryIndex numberOfChanges MemoryIndex
System gc reclaim space if the Memory Index was very BIG public void start Query throws IO Exception if this disk Index null this disk Index start Query  MemoryIndex startQuery IOException diskIndex diskIndex startQuery
this disk Index start Query public void stop Query throws IO Exception if this disk Index null this disk Index stop Query  diskIndex startQuery stopQuery IOException diskIndex diskIndex stopQuery
this disk Index stop Query public String to String if this printable Name null return this printable Name return super to String  diskIndex stopQuery toString printableName printableName toString

Simple Word Set all Words save space by locally interning the referenced words since an indexer can generate numerous duplicates Memory Index this docs To References new Simple Lookup Table 7 this all Words new Simple Word Set 7  SimpleWordSet allWords MemoryIndex docsToReferences SimpleLookupTable allWords SimpleWordSet
void add Document Names String substring Simple Set results assumed the disk index already skipped over documents which have been added changed deleted Object paths this docs To References key Table Object reference Tables this docs To References value Table if substring null add all new changed documents for int i 0 l reference Tables length i l i if reference Tables i null results add paths i else for int i 0 l reference Tables length i l i if reference Tables i null String paths i starts With substring 0 results add paths i  addDocumentNames SimpleSet docsToReferences keyTable referenceTables docsToReferences valueTable referenceTables referenceTables referenceTables referenceTables startsWith
void add Index Entry char category char key Internal Search Document document assumed a document was removed before its reindexed String document Name document get Path Hashtable Of Object reference Table Hashtable Of Object this docs To References get document Name if reference Table null this docs To References put document Name reference Table new Hashtable Of Object 3 Simple Word Set existing Words Simple Word Set reference Table get category if existing Words null reference Table put category existing Words new Simple Word Set 1 existing Words add this all Words add key  addIndexEntry InternalSearchDocument documentName getPath HashtableOfObject referenceTable HashtableOfObject docsToReferences documentName referenceTable docsToReferences documentName referenceTable HashtableOfObject SimpleWordSet existingWords SimpleWordSet referenceTable existingWords referenceTable existingWords SimpleWordSet existingWords allWords
void add Query Results char categories char key int match Rule Hashtable Of Object results assumed the disk index already skipped over documents which have been added changed deleted results maps a word Entry Result Object paths this docs To References key Table Object reference Tables this docs To References value Table if match Rule Search Pattern R EXACT MATCH Search Pattern R CASE SENSITIVE key null next Path for int i 0 l reference Tables length i l i Hashtable Of Object category To Words Hashtable Of Object reference Tables i if category To Words null for int j 0 m categories length j m j Simple Word Set word Set Simple Word Set category To Words get categories j if word Set null word Set includes key Entry Result result Entry Result results get key if result null results put key result new Entry Result key null result add Document Name String paths i continue next Path else for int i 0 l reference Tables length i l i Hashtable Of Object category To Words Hashtable Of Object reference Tables i if category To Words null for int j 0 m categories length j m j Simple Word Set word Set Simple Word Set category To Words get categories j if word Set null char words word Set words for int k 0 n words length k n k char word words k if word null Index is Match key word match Rule Entry Result result Entry Result results get word if result null results put word result new Entry Result word null result add Document Name String paths i  addQueryResults matchRule HashtableOfObject EntryResult docsToReferences keyTable referenceTables docsToReferences valueTable matchRule SearchPattern R_EXACT_MATCH SearchPattern R_CASE_SENSITIVE nextPath referenceTables HashtableOfObject categoryToWords HashtableOfObject referenceTables categoryToWords SimpleWordSet wordSet SimpleWordSet categoryToWords wordSet wordSet EntryResult EntryResult EntryResult addDocumentName nextPath referenceTables HashtableOfObject categoryToWords HashtableOfObject referenceTables categoryToWords SimpleWordSet wordSet SimpleWordSet categoryToWords wordSet wordSet isMatch matchRule EntryResult EntryResult EntryResult addDocumentName
boolean has Changed return this docs To References element Size 0  hasChanged docsToReferences elementSize
return this docs To References element Size 0 void remove String document Name this docs To References put document Name null  docsToReferences elementSize documentName docsToReferences documentName
this docs To References put document Name null boolean should Merge return this docs To References element Size NUM CHANGES  docsToReferences documentName shouldMerge docsToReferences elementSize NUM_CHANGES

protected Initializer Java Element parent int count super parent NON NLS 1 0 is not valid this first occurrence is occurrence 1 if count 0 throw new Illegal Argument Exception this occurrence Count count  JavaElement IllegalArgumentException occurrenceCount
this occurrence Count count public boolean equals Object o if o instanceof Initializer return false return super equals o  occurrenceCount
see Java Element equalsDOM Node deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected boolean equalsDOM Node IDOM Node node if node get Node Type IDOM Node INITIALIZER try return node get Contents trim equals get Source catch Java Model Exception e return false else return false  JavaElement equalsDOMNode equalsDOMNode IDOMNode getNodeType IDOMNode getContents getSource JavaModelException
see I Java Element public int get Element Type return INITIALIZER  IJavaElement getElementType
see Java Element get Handle Memento public String get Handle Memento String Buffer buff new String Buffer Java Element get Parent get Handle Memento buff append get Handle Memento Delimiter buff append this occurrence Count return buff to String  JavaElement getHandleMemento getHandleMemento StringBuffer StringBuffer JavaElement getParent getHandleMemento getHandleMementoDelimiter occurrenceCount toString
see Java Element get Handle Memento protected char get Handle Memento Delimiter return Java Element JEM INITIALIZER  JavaElement getHandleMemento getHandleMementoDelimiter JavaElement JEM_INITIALIZER
return Java Element JEM INITIALIZER public int hash Code return Util combine Hash Codes this parent hash Code this occurrence Count  JavaElement JEM_INITIALIZER hashCode combineHashCodes hashCode occurrenceCount
public String readable Name return Java Element get Declaring Type readable Name  readableName JavaElement getDeclaringType readableName
see I Source Manipulation public void rename String new Name boolean force I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID ELEMENT TYPES this  ISourceManipulation newName IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_ELEMENT_TYPES
see I Member public I Source Range get Name Range return null  IMember ISourceRange getNameRange
public I Java Element get Primary Element boolean check Owner if check Owner Compilation Unit cu Compilation Unit get Ancestor COMPILATION UNIT if cu null cu is Primary return this I Java Element primary Parent this parent get Primary Element false return I Type primary Parent get Initializer this occurrence Count  IJavaElement getPrimaryElement checkOwner checkOwner CompilationUnit CompilationUnit getAncestor COMPILATION_UNIT isPrimary IJavaElement primaryParent getPrimaryElement IType primaryParent getInitializer occurrenceCount
private Debugging purposes protected void to String Info int tab String Buffer buffer Object info buffer append this tab String tab if info null buffer append initializer NON NLS 1 buffer append this occurrence Count buffer append not open NON NLS 1 else if info NO INFO buffer append initializer NON NLS 1 buffer append this occurrence Count buffer append NON NLS 1 else try buffer append NON NLS 1 if Flags is Static this get Flags buffer append static NON NLS 1 buffer append initializer NON NLS 1 buffer append this occurrence Count buffer append NON NLS 1 catch Java Model Exception e buffer append Java Model Exception in to String of get Element Name NON NLS 1  toStringInfo StringBuffer tabString occurrenceCount NO_INFO occurrenceCount isStatic getFlags occurrenceCount JavaModelException JavaModelException toString getElementName

private static Scanner get Name Scanner Compiler Options compiler Options return new Scanner false comment false whitespace false nls compiler Options source Level source Level null task Tags null task Priorities true task Case Sensitive  getNameScanner CompilerOptions compilerOptions compilerOptions sourceLevel sourceLevel taskTags taskPriorities taskCaseSensitive
public static void suggest Argument Names I Java Project java Project char package Name char qualified Type Name int dim char excluded Names I Naming Requestor requestor Map options java Project get Options true Compiler Options compiler Options new Compiler Options options Assist Options assist Options new Assist Options options suggest Names package Name qualified Type Name dim assist Options argument Prefixes assist Options argument Suffixes excluded Names get Name Scanner compiler Options requestor  suggestArgumentNames IJavaProject javaProject packageName qualifiedTypeName excludedNames INamingRequestor javaProject getOptions CompilerOptions compilerOptions CompilerOptions AssistOptions assistOptions AssistOptions suggestNames packageName qualifiedTypeName assistOptions argumentPrefixes assistOptions argumentSuffixes excludedNames getNameScanner compilerOptions
public static void suggest Field Names I Java Project java Project char package Name char qualified Type Name int dim int modifiers char excluded Names I Naming Requestor requestor boolean is Static Flags is Static modifiers Map options java Project get Options true Compiler Options compiler Options new Compiler Options options Assist Options assist Options new Assist Options options suggest Names package Name qualified Type Name dim is Static assist Options static Field Prefixes assist Options field Prefixes is Static assist Options static Field Suffixes assist Options field Suffixes excluded Names get Name Scanner compiler Options requestor  suggestFieldNames IJavaProject javaProject packageName qualifiedTypeName excludedNames INamingRequestor isStatic isStatic javaProject getOptions CompilerOptions compilerOptions CompilerOptions AssistOptions assistOptions AssistOptions suggestNames packageName qualifiedTypeName isStatic assistOptions staticFieldPrefixes assistOptions fieldPrefixes isStatic assistOptions staticFieldSuffixes assistOptions fieldSuffixes excludedNames getNameScanner compilerOptions
public static void suggest Local Variable Names I Java Project java Project char package Name char qualified Type Name int dim char excluded Names I Naming Requestor requestor Map options java Project get Options true Compiler Options compiler Options new Compiler Options options Assist Options assist Options new Assist Options options suggest Names package Name qualified Type Name dim assist Options local Prefixes assist Options local Suffixes excluded Names get Name Scanner compiler Options requestor  suggestLocalVariableNames IJavaProject javaProject packageName qualifiedTypeName excludedNames INamingRequestor javaProject getOptions CompilerOptions compilerOptions CompilerOptions AssistOptions assistOptions AssistOptions suggestNames packageName qualifiedTypeName assistOptions localPrefixes assistOptions localSuffixes excludedNames getNameScanner compilerOptions
private static void suggest Names char package Name char qualified Type Name int dim char prefixes char suffixes char excluded Names Scanner name Scanner I Naming Requestor requestor if qualified Type Name null qualified Type Name length 0 return char type Name Char Operation last Segment qualified Type Name if prefixes null prefixes length 0 prefixes new char 1 0 else int length prefixes length System arraycopy prefixes 0 prefixes new char length 1 0 length prefixes length Char Operation NO CHAR if suffixes null suffixes length 0 suffixes new char 1 0 else int length suffixes length System arraycopy suffixes 0 suffixes new char length 1 0 length suffixes length Char Operation NO CHAR char temp Names null compute variable name for base type try name Scanner set Source type Name switch name Scanner get Next Token case Terminal Tokens Token Nameint case Terminal Tokens Token Namebyte case Terminal Tokens Token Nameshort case Terminal Tokens Token Namechar case Terminal Tokens Token Namelong case Terminal Tokens Token Namefloat case Terminal Tokens Token Namedouble case Terminal Tokens Token Nameboolean char name compute Base Type Names type Name 0 excluded Names if name null temp Names new char name break catch Invalid Input Exception e ignore compute variable name for non base type if temp Names null temp Names compute Names type Name boolean accept Default Name true for int i 0 i temp Names length i char temp Name temp Names i if dim 0 int length temp Name length if temp Name length 1 s if temp Name length 1 temp Name length 2 s System arraycopy temp Name 0 temp Name new char length 2 0 length temp Name length e temp Name length 1 s else if temp Name length 1 y System arraycopy temp Name 0 temp Name new char length 2 0 length temp Name length 1 i temp Name length e temp Name length 1 s else System arraycopy temp Name 0 temp Name new char length 1 0 length temp Name length s for int j 0 j prefixes length j if prefixes j length 0 Character is Letter Or Digit prefixes j prefixes j length 1 temp Name 0 Character to Upper Case temp Name 0 else temp Name 0 Character to Lower Case temp Name 0 char prefix Name Char Operation concat prefixes j temp Name for int k 0 k suffixes length k char suffix Name Char Operation concat prefix Name suffixes k suffix Name exclude Names suffix Name prefix Name suffixes k excluded Names if Java Conventions validate Field Name new String suffix Name isOK accept Name suffix Name prefixes j suffixes k j 0 k 0 requestor accept Default Name false else suffix Name Char Operation concat prefix Name String value Of 1 to Char Array suffixes k suffix Name exclude Names suffix Name prefix Name suffixes k excluded Names if Java Conventions validate Field Name new String suffix Name isOK accept Name suffix Name prefixes j suffixes k j 0 k 0 requestor accept Default Name false if no names were found if accept Default Name char name exclude Names DEFAULT NAME DEFAULT NAME Char Operation NO CHAR excluded Names requestor accept Name Without Prefix And Suffix name  suggestNames packageName qualifiedTypeName excludedNames nameScanner INamingRequestor qualifiedTypeName qualifiedTypeName typeName CharOperation lastSegment qualifiedTypeName CharOperation NO_CHAR CharOperation NO_CHAR tempNames nameScanner setSource typeName nameScanner getNextToken TerminalTokens TokenNameint TerminalTokens TokenNamebyte TerminalTokens TokenNameshort TerminalTokens TokenNamechar TerminalTokens TokenNamelong TerminalTokens TokenNamefloat TerminalTokens TokenNamedouble TerminalTokens TokenNameboolean computeBaseTypeNames typeName excludedNames tempNames InvalidInputException tempNames tempNames computeNames typeName acceptDefaultName tempNames tempName tempNames tempName tempName tempName tempName tempName tempName tempName tempName tempName tempName tempName tempName tempName tempName tempName tempName tempName isLetterOrDigit tempName toUpperCase tempName tempName toLowerCase tempName prefixName CharOperation tempName suffixName CharOperation prefixName suffixName excludeNames suffixName prefixName excludedNames JavaConventions validateFieldName suffixName acceptName suffixName acceptDefaultName suffixName CharOperation prefixName valueOf toCharArray suffixName excludeNames suffixName prefixName excludedNames JavaConventions validateFieldName suffixName acceptName suffixName acceptDefaultName acceptDefaultName excludeNames DEFAULT_NAME DEFAULT_NAME CharOperation NO_CHAR excludedNames acceptNameWithoutPrefixAndSuffix
private static void accept Name char name char prefix char suffix boolean is First Prefix boolean is First Suffix I Naming Requestor requestor if prefix length 0 suffix length 0 requestor accept Name With Prefix And Suffix name is First Prefix is First Suffix else if prefix length 0 requestor accept Name With Prefix name is First Prefix else if suffix length 0 requestor accept Name With Suffix name is First Suffix else requestor accept Name Without Prefix And Suffix name  acceptName isFirstPrefix isFirstSuffix INamingRequestor acceptNameWithPrefixAndSuffix isFirstPrefix isFirstSuffix acceptNameWithPrefix isFirstPrefix acceptNameWithSuffix isFirstSuffix acceptNameWithoutPrefixAndSuffix
private static char compute Base Type Names char first Name char excluded Names char name new char first Name for int i 0 i excluded Names length i if Char Operation equals name excluded Names i false name 0 if name 0 z name 0 a if name 0 first Name return null i 0 return name  computeBaseTypeNames firstName excludedNames firstName excludedNames CharOperation excludedNames firstName
private static char compute Names char source Name char names new char 5 int name Count 0 boolean previous Is Upper Case false boolean previous Is Letter true for int i source Name length 1 i 0 i boolean is Upper Case Character is Upper Case source Name i boolean is Letter Character is Letter source Name i if is Upper Case previous Is Upper Case previous Is Letter char name Char Operation subarray source Name i source Name length if name length 1 if name Count names length System arraycopy names 0 names new char name Count 2 0 name Count name 0 Character to Lower Case name 0 names name Count name previous Is Upper Case is Upper Case previous Is Letter is Letter if name Count 0 names name Count Char Operation to Lower Case source Name System arraycopy names 0 names new char name Count 0 name Count return names  computeNames sourceName nameCount previousIsUpperCase previousIsLetter sourceName isUpperCase isUpperCase sourceName isLetter isLetter sourceName isUpperCase previousIsUpperCase previousIsLetter CharOperation sourceName sourceName nameCount nameCount nameCount toLowerCase nameCount previousIsUpperCase isUpperCase previousIsLetter isLetter nameCount nameCount CharOperation toLowerCase sourceName nameCount nameCount
private static char exclude Names char suffix Name char prefix Name char suffix char excluded Names int count 2 int m 0 while m excluded Names length if Char Operation equals suffix Name excluded Names m false suffix Name Char Operation concat prefix Name String value Of count to Char Array suffix m 0 else m return suffix Name  excludeNames suffixName prefixName excludedNames excludedNames CharOperation suffixName excludedNames suffixName CharOperation prefixName valueOf toCharArray suffixName

public interface I Path Requestor void accept Path String path boolean contains Local Types  IPathRequestor acceptPath containsLocalTypes

public Jar Entry File String entry Name String zip Name this entry Name entry Name this zip Name zip Name this path new Path this entry Name  JarEntryFile entryName zipName entryName entryName zipName zipName entryName
public Input Stream get Contents throws Core Exception try if Java Model Manager ZIP ACCESS VERBOSE System out println Thread current Thread Jar Entry File get Contents Creating Zip File on this zip Name NON NLS 1 NON NLS 2 Zip File zip File new Zip File this zip Name Zip Entry zip Entry zip File get Entry this entry Name if zip Entry null throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID PATH this entry Name return zip File get Input Stream zip Entry catch IO Exception e throw new Java Model Exception e I Java Model Status Constants IO EXCEPTION  InputStream getContents CoreException JavaModelManager ZIP_ACCESS_VERBOSE currentThread JarEntryFile getContents ZipFile zipName ZipFile zipFile ZipFile zipName ZipEntry zipEntry zipFile getEntry entryName zipEntry JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_PATH entryName zipFile getInputStream zipEntry IOException JavaModelException IJavaModelStatusConstants IO_EXCEPTION
see I Storage get Full Path public I Path get Full Path return this path  IStorage getFullPath IPath getFullPath
see I Storage get Name public String get Name return this path last Segment  IStorage getName getName lastSegment
see I Storage is Read Only public boolean is Read Only return true  IStorage isReadOnly isReadOnly
see I Storage is Read Only public String to String return Jar Entry File this zip Name this entry Name NON NLS 2 NON NLS 3 NON NLS 1  IStorage isReadOnly toString JarEntryFile zipName entryName

class Jar Package Fragment extends Package Fragment implements Suffix Constants Constructs a package fragment that is contained within a jar or a zip protected Jar Package Fragment Package Fragment Root root String name super root name  JarPackageFragment PackageFragment SuffixConstants JarPackageFragment PackageFragmentRoot
Compute the children of this package fragment Children of jar package fragments can only be I Class File representing class files protected boolean compute Children Openable Element Info info Array List entry Names if entry Names null entry Names size 0 Array List v Children new Array List for Iterator iter entry Names iterator iter has Next String child String iter next I Class File class File get Class File child v Children add class File I Java Element children new I Java Element v Children size v Children to Array children info set Children children else info set Children NO ELEMENTS return true  IClassFile computeChildren OpenableElementInfo ArrayList entryNames entryNames entryNames ArrayList vChildren ArrayList entryNames hasNext IClassFile classFile getClassFile vChildren classFile IJavaElement IJavaElement vChildren vChildren toArray setChildren setChildren NO_ELEMENTS
Compute all the non java resources according to the entry name found in the jar file package void compute Non Java Resources String res Names Jar Package Fragment Info info String zip Name if res Names null info set Non Java Resources null return int max res Names length if max 0 info set Non Java Resources Java Element Info NO NON JAVA RESOURCES else Object res new Object max int index 0 for int i 0 i max i String res Name res Names i consider that a java file is not a non java resource see bug 12246 Packages view shows class and java files when JAR has source if res Name to Lower Case ends With SUFFIX STRING java if this is Default Package res Name this get Element Name replace res Name NON NLS 1 res index new Jar Entry File res Name zip Name if index max System arraycopy res 0 res new Object index 0 index info set Non Java Resources res  computeNonJavaResources resNames JarPackageFragmentInfo zipName resNames setNonJavaResources resNames setNonJavaResources JavaElementInfo NO_NON_JAVA_RESOURCES resName resNames resName toLowerCase endsWith SUFFIX_STRING_java isDefaultPackage resName getElementName resName JarEntryFile resName zipName setNonJavaResources
Returns true if this fragment contains at least one java resource Returns false otherwise public boolean contains Java Resources throws Java Model Exception return Jar Package Fragment Info get Element Info contains Java Resources  containsJavaResources JavaModelException JarPackageFragmentInfo getElementInfo containsJavaResources
see org eclipse jdt core I Package Fragment public I Compilation Unit create Compilation Unit String cu Name String contents boolean force I Progress Monitor monitor throws Java Model Exception throw new Java Model Exception new Java Model Status I Java Model Status Constants READ ONLY this  IPackageFragment ICompilationUnit createCompilationUnit cuName IProgressMonitor JavaModelException JavaModelException JavaModelStatus IJavaModelStatusConstants READ_ONLY
see Java Element protected Object create Element Info return null not used for Jar Package Fragments info is created when jar is opened  JavaElement createElementInfo JarPackageFragments
protected void generate Infos Object info Hash Map new Elements I Progress Monitor pm throws Java Model Exception Open my jar this creates all the pkg infos Openable openable Parent Openable this parent if openable Parent is Open openable Parent generate Infos openable Parent create Element Info new Elements pm  generateInfos HashMap newElements IProgressMonitor JavaModelException openableParent openableParent isOpen openableParent generateInfos openableParent createElementInfo newElements
see org eclipse jdt core I Package Fragment public I Class File get Class Files throws Java Model Exception Array List list get Children Of Type CLASS FILE I Class File array new I Class File list size list to Array array return array  IPackageFragment IClassFile getClassFiles JavaModelException ArrayList getChildrenOfType CLASS_FILE IClassFile IClassFile toArray
A jar package fragment never contains compilation units see org eclipse jdt core I Package Fragment public I Compilation Unit get Compilation Units return NO COMPILATION UNITS  IPackageFragment ICompilationUnit getCompilationUnits NO_COMPILATION_UNITS
A package fragment in a jar has no corresponding resource see I Java Element public I Resource get Corresponding Resource return null  IJavaElement IResource getCorrespondingResource
Returns an array of non java resources contained in the receiver public Object get Non Java Resources throws Java Model Exception if this is Default Package We don t want to show non java resources of the default package see PR 1G58NB8 return Java Element Info NO NON JAVA RESOURCES else return this stored Non Java Resources  getNonJavaResources JavaModelException isDefaultPackage JavaElementInfo NO_NON_JAVA_RESOURCES storedNonJavaResources
Jars and jar entries are all read only public boolean is Read Only return true  isReadOnly
return true protected Object stored Non Java Resources throws Java Model Exception return Jar Package Fragment Info get Element Info get Non Java Resources  storedNonJavaResources JavaModelException JarPackageFragmentInfo getElementInfo getNonJavaResources

class Jar Package Fragment Info extends Package Fragment Info Returns an array of non java resources contained in the receiver Object get Non Java Resources return this non Java Resources  JarPackageFragmentInfo PackageFragmentInfo getNonJavaResources nonJavaResources

Constructs a package fragment root which is the root of the Java package directory hierarchy based on a JAR file that is not contained in a code I Java Project code and does not have an associated code I Resource code protected Jar Package Fragment Root I Path jar Path Java Project project super null project jar Path last Segment this jar Path jar Path  IJavaProject IResource JarPackageFragmentRoot IPath jarPath JavaProject jarPath lastSegment jarPath jarPath
Constructs a package fragment root which is the root of the Java package directory hierarchy based on a JAR file protected Jar Package Fragment Root I Resource resource Java Project project super resource project resource get Name this jar Path resource get Full Path  JarPackageFragmentRoot IResource JavaProject getName jarPath getFullPath
Compute the package fragment children of this package fragment root These are all of the directory zip entries and any directories implied by the path of class files contained in the jar of this package fragment root Has the side effect of opening the package fragment children protected boolean compute Children Openable Element Info info Map new Elements throws Java Model Exception Array List v Children new Array List final int JAVA 0 final int NON JAVA 1 Zip File jar null try jar get Jar Hash Map package Frag To Types new Hash Map always create the default package package Frag To Types put I Package Fragment DEFAULT PACKAGE NAME new Array List EMPTY LIST EMPTY LIST for Enumeration e jar entries e has More Elements Zip Entry member Zip Entry e next Element String entry Name member get Name if member is Directory int last entry Name length 1 entry Name entry Name substring 0 last entry Name entry Name replace add the package name all of its parent packages while true extract the package name if package Frag To Types contains Key entry Name break package Frag To Types put entry Name new Array List EMPTY LIST EMPTY LIST if last entry Name last Index Of 0 break entry Name entry Name substring 0 last else store the class file non java rsc entry name to be cached in the appropriate package fragment zip entries only use int last Separator entry Name last Index Of String package Name String file Name if last Separator 1 not in the default package entry Name entry Name replace file Name entry Name substring last Separator 1 package Name entry Name substring 0 last Separator else file Name entry Name package Name I Package Fragment DEFAULT PACKAGE NAME add the package name all of its parent packages String current Package Name package Name while true extract the package name if package Frag To Types contains Key current Package Name break package Frag To Types put current Package Name new Array List EMPTY LIST EMPTY LIST int last if last current Package Name last Index Of 0 break current Package Name current Package Name substring 0 last add classfile info amongst children Array List children Array List package Frag To Types get package Name if org eclipse jdt internal compiler util Util is Class File Name entry Name if children JAVA EMPTY LIST children JAVA new Array List children JAVA add file Name else if children NON JAVA EMPTY LIST children NON JAVA new Array List children NON JAVA add file Name loop through all of referenced packages creating package fragments if necessary and cache the entry names in the infos created for those package fragments Iterator packages package Frag To Types key Set iterator while packages has Next String pack Name String packages next Array List entries Array List package Frag To Types get pack Name Jar Package Fragment pack Frag Jar Package Fragment get Package Fragment pack Name Jar Package Fragment Info frag Info new Jar Package Fragment Info int res Length entries NON JAVA size if res Length 0 pack Frag compute Non Java Resources NO STRINGS frag Info jar get Name else String res Names new String res Length entries NON JAVA to Array res Names pack Frag compute Non Java Resources res Names frag Info jar get Name pack Frag compute Children frag Info entries JAVA new Elements put pack Frag frag Info v Children add pack Frag catch Core Exception e if e instanceof Java Model Exception throw Java Model Exception e throw new Java Model Exception e finally Java Model Manager get Java Model Manager close Zip File jar I Java Element children new I Java Element v Children size v Children to Array children info set Children children return true  computeChildren OpenableElementInfo newElements JavaModelException ArrayList vChildren ArrayList NON_JAVA ZipFile getJar HashMap packageFragToTypes HashMap packageFragToTypes IPackageFragment DEFAULT_PACKAGE_NAME ArrayList EMPTY_LIST EMPTY_LIST hasMoreElements ZipEntry ZipEntry nextElement entryName getName isDirectory entryName entryName entryName entryName entryName packageFragToTypes containsKey entryName packageFragToTypes entryName ArrayList EMPTY_LIST EMPTY_LIST entryName lastIndexOf entryName entryName lastSeparator entryName lastIndexOf packageName fileName lastSeparator entryName entryName fileName entryName lastSeparator packageName entryName lastSeparator fileName entryName packageName IPackageFragment DEFAULT_PACKAGE_NAME currentPackageName packageName packageFragToTypes containsKey currentPackageName packageFragToTypes currentPackageName ArrayList EMPTY_LIST EMPTY_LIST currentPackageName lastIndexOf currentPackageName currentPackageName ArrayList ArrayList packageFragToTypes packageName isClassFileName entryName EMPTY_LIST ArrayList fileName NON_JAVA EMPTY_LIST NON_JAVA ArrayList NON_JAVA fileName packageFragToTypes keySet hasNext packName ArrayList ArrayList packageFragToTypes packName JarPackageFragment packFrag JarPackageFragment getPackageFragment packName JarPackageFragmentInfo fragInfo JarPackageFragmentInfo resLength NON_JAVA resLength packFrag computeNonJavaResources NO_STRINGS fragInfo getName resNames resLength NON_JAVA toArray resNames packFrag computeNonJavaResources resNames fragInfo getName packFrag computeChildren fragInfo newElements packFrag fragInfo vChildren packFrag CoreException JavaModelException JavaModelException JavaModelException JavaModelManager getJavaModelManager closeZipFile IJavaElement IJavaElement vChildren vChildren toArray setChildren
Returns a new element info for this element protected Object create Element Info return new Jar Package Fragment Root Info  createElementInfo JarPackageFragmentRootInfo
A Jar is always K BINARY protected int determine Kind I Resource underlying Resource return I Package Fragment Root K BINARY  K_BINARY determineKind IResource underlyingResource IPackageFragmentRoot K_BINARY
Returns true if this handle represents the same jar as the given handle Two jars are equal if they share the same zip file see Object equals public boolean equals Object o if this o return true if o instanceof Jar Package Fragment Root Jar Package Fragment Root other Jar Package Fragment Root o return this jar Path equals other jar Path return false  JarPackageFragmentRoot JarPackageFragmentRoot JarPackageFragmentRoot jarPath jarPath
Returns the underlying Zip File for this Jar package fragment root exception Core Exception if an error occurs accessing the jar public Zip File get Jar throws Core Exception return Java Model Manager get Java Model Manager get Zip File get Path  ZipFile CoreException ZipFile getJar CoreException JavaModelManager getJavaModelManager getZipFile getPath
see I Package Fragment Root public int get Kind return I Package Fragment Root K BINARY  IPackageFragmentRoot getKind IPackageFragmentRoot K_BINARY
Returns an array of non java resources contained in the receiver public Object get Non Java Resources throws Java Model Exception We want to show non java resources of the default package at the root see PR 1G58NB8 return Jar Package Fragment this get Package Fragment I Package Fragment DEFAULT PACKAGE NAME stored Non Java Resources  getNonJavaResources JavaModelException JarPackageFragment getPackageFragment IPackageFragment DEFAULT_PACKAGE_NAME storedNonJavaResources
see I Package Fragment Root public I Package Fragment get Package Fragment String package Name return new Jar Package Fragment this package Name  IPackageFragmentRoot IPackageFragment getPackageFragment packageName JarPackageFragment packageName
see I Package Fragment Root public I Path get Path if is External return this jar Path else return super get Path  IPackageFragmentRoot IPath getPath isExternal jarPath getPath
public I Resource get Resource if this resource null this resource Java Model get Target Resources Plugin get Workspace get Root this jar Path false if this resource instanceof I Resource return super get Resource else external jar return null  IResource getResource JavaModel getTarget ResourcesPlugin getWorkspace getRoot jarPath IResource getResource
see I Java Element public I Resource get Underlying Resource throws Java Model Exception if is External if exists throw new Not Present Exception return null else return super get Underlying Resource  IJavaElement IResource getUnderlyingResource JavaModelException isExternal newNotPresentException getUnderlyingResource
public int hash Code return this jar Path hash Code  hashCode jarPath hashCode
see I Package Fragment Root public boolean is Archive return true  IPackageFragmentRoot isArchive
see I Package Fragment Root public boolean is External return get Resource null  IPackageFragmentRoot isExternal getResource
Jars and jar entries are all read only public boolean is Read Only return true  isReadOnly
Returns whether the corresponding resource or associated file exists protected boolean resource Exists if this is External return Java Model get Target Resources Plugin get Workspace get Root this get Path don t make the path relative as this is an external archive true null else return super resource Exists  resourceExists isExternal JavaModel getTarget ResourcesPlugin getWorkspace getRoot getPath resourceExists

class Jar Package Fragment Root Info extends Package Fragment Root Info Returns an array of non java resources contained in the receiver public Object get Non Java Resources f Non Java Resources NO NON JAVA RESOURCES return f Non Java Resources  JarPackageFragmentRootInfo PackageFragmentRootInfo getNonJavaResources fNonJavaResources NO_NON_JAVA_RESOURCES fNonJavaResources

Constructs a handle for a java element with the given parent element and name param parent The parent of java element param name The name of java element exception Illegal Argument Exception if the type is not one of the valid Java element type constants protected Java Element Java Element parent String name throws Illegal Argument Exception this parent parent this name name  IllegalArgumentException JavaElement JavaElement IllegalArgumentException
see I Openable public void close throws Java Model Exception Java Model Manager get Java Model Manager remove Info And Children this  IOpenable JavaModelException JavaModelManager getJavaModelManager removeInfoAndChildren
Java Model Manager get Java Model Manager remove Info And Children this This element is being closed Do any necessary cleanup protected abstract void closing Object info throws Java Model Exception  JavaModelManager getJavaModelManager removeInfoAndChildren JavaModelException
Returns a new element info for this element protected abstract Object create Element Info  createElementInfo
protected abstract Object create Element Info Returns true if this handle represents the same Java element as the given handle By default two handles represent the same element if they are identical or if they represent the same type of element have equal names parents and occurrence counts p If a subclass has other requirements for equality this method must be overridden see Object equals public boolean equals Object o if this o return true Java model parent is null if this parent null return super equals o assume instanceof check is done in subclass Java Element other Java Element o return this occurrence Count other occurrence Count this name equals other name this parent equals other parent  createElementInfo JavaElement JavaElement occurrenceCount occurrenceCount
Returns true if this code Java Element code is equivalent to the given code IDOM Node code deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected boolean equalsDOM Node IDOM Node node return false  JavaElement IDOMNode equalsDOMNode IDOMNode
protected void escape Memento Name String Buffer buffer String memento Name for int i 0 length memento Name length i length i char character memento Name char At i switch character case JEM ESCAPE case JEM COUNT case JEM JAVAPROJECT case JEM PACKAGEFRAGMENTROOT case JEM PACKAGEFRAGMENT case JEM FIELD case JEM METHOD case JEM INITIALIZER case JEM COMPILATIONUNIT case JEM CLASSFILE case JEM TYPE case JEM PACKAGEDECLARATION case JEM IMPORTDECLARATION case JEM LOCALVARIABLE buffer append JEM ESCAPE buffer append character  escapeMementoName StringBuffer mementoName mementoName mementoName charAt JEM_ESCAPE JEM_COUNT JEM_JAVAPROJECT JEM_PACKAGEFRAGMENTROOT JEM_PACKAGEFRAGMENT JEM_FIELD JEM_METHOD JEM_INITIALIZER JEM_COMPILATIONUNIT JEM_CLASSFILE JEM_TYPE JEM_PACKAGEDECLARATION JEM_IMPORTDECLARATION JEM_LOCALVARIABLE JEM_ESCAPE
see I Java Element public boolean exists try get Element Info return true catch Java Model Exception e element doesn t exist return false return false  IJavaElement getElementInfo JavaModelException
Returns the code IDOM Node code that corresponds to this code Java Element code or code null code if there is no corresponding node deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM public IDOM Node find Node IDOM Compilation Unit dom int type get Element Type if type I Java Element COMPILATION UNIT type I Java Element FIELD type I Java Element IMPORT DECLARATION type I Java Element INITIALIZER type I Java Element METHOD type I Java Element PACKAGE DECLARATION type I Java Element TYPE Array List path new Array List I Java Element element this while element null element get Element Type I Java Element COMPILATION UNIT if element get Element Type I Java Element IMPORT CONTAINER the DOM does not have import containers so skip them path add 0 element element element get Parent if path size 0 if equalsDOM Node dom return dom else return null return Java Element path get 0 follow Path path 0 dom get First Child else return null  IDOMNode JavaElement IDOMNode findNode IDOMCompilationUnit getElementType IJavaElement COMPILATION_UNIT IJavaElement IJavaElement IMPORT_DECLARATION IJavaElement IJavaElement IJavaElement PACKAGE_DECLARATION IJavaElement ArrayList ArrayList IJavaElement getElementType IJavaElement COMPILATION_UNIT getElementType IJavaElement IMPORT_CONTAINER getParent equalsDOMNode JavaElement followPath getFirstChild
deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected IDOM Node follow Path Array List path int position IDOM Node node if equalsDOM Node node if position path size 1 return node else if node get First Child null position return Java Element path get position follow Path path position node get First Child else return null else if node get Next Node null return follow Path path position node get Next Node else return null  IDOMNode followPath ArrayList IDOMNode equalsDOMNode getFirstChild JavaElement followPath getFirstChild getNextNode followPath getNextNode
Generates the element infos for this element its ancestors if they are not opened and its children if it is an Openable Puts the newly created element info in the given map 
protected abstract void generate Infos Object info Hash Map new Elements I Progress Monitor pm throws Java Model Exception see I Java Element public I Java Element get Ancestor int ancestor Type I Java Element element this while element null if element get Element Type ancestor Type return element element element get Parent return null  generateInfos HashMap newElements IProgressMonitor JavaModelException IJavaElement IJavaElement getAncestor ancestorType IJavaElement getElementType ancestorType getParent
see I Parent public I Java Element get Children throws Java Model Exception Object element Info get Element Info if element Info instanceof Java Element Info return Java Element Info element Info get Children else return NO ELEMENTS  IParent IJavaElement getChildren JavaModelException elementInfo getElementInfo elementInfo JavaElementInfo JavaElementInfo elementInfo getChildren NO_ELEMENTS
Returns a collection of immediate children of this node of the specified type param type one of the JEM  constants defined by Java Element public Array List get Children Of Type int type throws Java Model Exception I Java Element children get Children int size children length Array List list new Array List size for int i 0 i size i Java Element elt Java Element children i if elt get Element Type type list add elt return list  JEM_ JavaElement ArrayList getChildrenOfType JavaModelException IJavaElement getChildren ArrayList ArrayList JavaElement JavaElement getElementType
see I Member public I Class File get Class File return null  IMember IClassFile getClassFile
see I Member public I Compilation Unit get Compilation Unit return null  IMember ICompilationUnit getCompilationUnit
Returns the info for this handle If this element is not already open it and all of its parents are opened Does not return null NOTE Binary Type infos are NOT rooted under Java Element Info exception Java Model Exception if the element is not present or not accessible public Object get Element Info throws Java Model Exception return get Element Info null  BinaryType JavaElementInfo JavaModelException getElementInfo JavaModelException getElementInfo
Returns the info for this handle If this element is not already open it and all of its parents are opened Does not return null NOTE Binary Type infos are NOT rooted under Java Element Info exception Java Model Exception if the element is not present or not accessible public Object get Element Info I Progress Monitor monitor throws Java Model Exception Java Model Manager manager Java Model Manager get Java Model Manager Object info manager get Info this if info null return info return open When Closed create Element Info monitor  BinaryType JavaElementInfo JavaModelException getElementInfo IProgressMonitor JavaModelException JavaModelManager JavaModelManager getJavaModelManager getInfo openWhenClosed createElementInfo
see I Adaptable public String get Element Name return this name  IAdaptable getElementName
The given working copy owner is used only for compilation unit handles public abstract I Java Element get Handle From Memento String token Memento Tokenizer memento Working Copy Owner owner  IJavaElement getHandleFromMemento MementoTokenizer WorkingCopyOwner
public I Java Element get Handle From Memento Memento Tokenizer memento Working Copy Owner owner if memento has More Tokens return this String token memento next Token return get Handle From Memento token memento owner  IJavaElement getHandleFromMemento MementoTokenizer WorkingCopyOwner hasMoreTokens nextToken getHandleFromMemento
public I Java Element get Handle Updating Count From Memento Memento Tokenizer memento Working Copy Owner owner this occurrence Count Integer parse Int memento next Token if memento has More Tokens return this String token memento next Token return get Handle From Memento token memento owner  IJavaElement getHandleUpdatingCountFromMemento MementoTokenizer WorkingCopyOwner occurrenceCount parseInt nextToken hasMoreTokens nextToken getHandleFromMemento
see I Java Element public String get Handle Identifier return get Handle Memento  IJavaElement getHandleIdentifier getHandleMemento
see Java Element get Handle Memento public String get Handle Memento String Buffer buff new String Buffer Java Element get Parent get Handle Memento buff append get Handle Memento Delimiter escape Memento Name buff get Element Name if this occurrence Count 1 buff append JEM COUNT buff append this occurrence Count return buff to String  JavaElement getHandleMemento getHandleMemento StringBuffer StringBuffer JavaElement getParent getHandleMemento getHandleMementoDelimiter escapeMementoName getElementName occurrenceCount JEM_COUNT occurrenceCount toString
Returns the code char code that marks the start of this handles contribution to a memento 
protected abstract char get Handle Memento Delimiter see I Java Element public I Java Model get Java Model I Java Element current this do if current instanceof I Java Model return I Java Model current while current current get Parent null return null  getHandleMementoDelimiter IJavaElement IJavaModel getJavaModel IJavaElement IJavaModel IJavaModel getParent
see I Java Element public I Java Project get Java Project I Java Element current this do if current instanceof I Java Project return I Java Project current while current current get Parent null return null  IJavaElement IJavaProject getJavaProject IJavaElement IJavaProject IJavaProject getParent
see I Java Element public I Openable get Openable return this get Openable Parent  IJavaElement IOpenable getOpenable getOpenableParent
Return the first instance of I Openable in the parent hierarchy of this element p Subclasses that are not I Openable s must override this method public I Openable get Openable Parent return I Openable this parent  IOpenable IOpenable IOpenable getOpenableParent IOpenable
see I Java Element public I Java Element get Parent return this parent  IJavaElement IJavaElement getParent
see I Java Element get Primary Element public I Java Element get Primary Element return get Primary Element true  IJavaElement getPrimaryElement IJavaElement getPrimaryElement getPrimaryElement
return this element public I Java Element get Primary Element boolean check Owner return this  IJavaElement getPrimaryElement checkOwner
Returns the element that is located at the given source position in this element This is a helper method for code I Compilation Unit get Element At code and only works on compilation units and types The position given is known to be within this element s source range already and if no finer grained element is found at the position this element is returned protected I Java Element get Source Element At int position throws Java Model Exception if this instanceof I Source Reference I Java Element children get Children for int i children length 1 i 0 i I Java Element a Child children i if a Child instanceof Source Ref Element Source Ref Element child Source Ref Element children i I Source Range range child get Source Range int start range get Offset int end start range get Length if start position position end if child instanceof I Field check muti declaration case see https bugs eclipse org bugs show bug cgi id 39943 int declaration Start start Source Ref Element candidate null do check name range range I Field child get Name Range if position range get Offset range get Length candidate child else return candidate null child get Source Element At position candidate get Source Element At position child i 0 Source Ref Element children i null while child null child get Source Range get Offset declaration Start position in field s type use first field return candidate get Source Element At position else if child instanceof I Parent return child get Source Element At position else return child else should not happen Assert is True false return this  ICompilationUnit getElementAt IJavaElement getSourceElementAt JavaModelException ISourceReference IJavaElement getChildren IJavaElement aChild aChild SourceRefElement SourceRefElement SourceRefElement ISourceRange getSourceRange getOffset getLength IField show_bug declarationStart SourceRefElement IField getNameRange getOffset getLength getSourceElementAt getSourceElementAt SourceRefElement getSourceRange getOffset declarationStart getSourceElementAt IParent getSourceElementAt isTrue
Returns the Source Mapper facility for this element or code null code if this element does not have a Source Mapper public Source Mapper get Source Mapper return Java Element get Parent get Source Mapper  SourceMapper SourceMapper SourceMapper getSourceMapper JavaElement getParent getSourceMapper
class No Resource Scheduling Rule implements I Scheduling Rule public I Path path public No Resource Scheduling Rule I Path path this path path  NoResourceSchedulingRule ISchedulingRule IPath NoResourceSchedulingRule IPath
public boolean contains I Scheduling Rule rule if rule instanceof No Resource Scheduling Rule return this path is Prefix Of No Resource Scheduling Rule rule path else return false  ISchedulingRule NoResourceSchedulingRule isPrefixOf NoResourceSchedulingRule
public boolean is Conflicting I Scheduling Rule rule if rule instanceof No Resource Scheduling Rule I Path other Path No Resource Scheduling Rule rule path return this path is Prefix Of other Path other Path is Prefix Of this path else return false  isConflicting ISchedulingRule NoResourceSchedulingRule IPath otherPath NoResourceSchedulingRule isPrefixOf otherPath otherPath isPrefixOf
public I Scheduling Rule get Scheduling Rule I Resource resource get Resource if resource null class No Resource Scheduling Rule implements I Scheduling Rule public I Path path public No Resource Scheduling Rule I Path path this path path public boolean contains I Scheduling Rule rule if rule instanceof No Resource Scheduling Rule return this path is Prefix Of No Resource Scheduling Rule rule path else return false public boolean is Conflicting I Scheduling Rule rule if rule instanceof No Resource Scheduling Rule I Path other Path No Resource Scheduling Rule rule path return this path is Prefix Of other Path other Path is Prefix Of this path else return false return new No Resource Scheduling Rule get Path else return resource  ISchedulingRule getSchedulingRule IResource getResource NoResourceSchedulingRule ISchedulingRule IPath NoResourceSchedulingRule IPath ISchedulingRule NoResourceSchedulingRule isPrefixOf NoResourceSchedulingRule isConflicting ISchedulingRule NoResourceSchedulingRule IPath otherPath NoResourceSchedulingRule isPrefixOf otherPath otherPath isPrefixOf NoResourceSchedulingRule getPath
see I Parent public boolean has Children throws Java Model Exception if I am not open return true to avoid opening case of a Java project a compilation unit or a class file also see https bugs eclipse org bugs show bug cgi id 52474 Object element Info Java Model Manager get Java Model Manager get Info this if element Info instanceof Java Element Info return Java Element Info element Info get Children length 0 else return true  IParent hasChildren JavaModelException show_bug elementInfo JavaModelManager getJavaModelManager getInfo elementInfo JavaElementInfo JavaElementInfo elementInfo getChildren
Returns the hash code for this Java element By default the hash code for an element is a combination of its name and parent s hash code Elements with other requirements must override this method public int hash Code if this parent null return super hash Code return Util combine Hash Codes this name hash Code this parent hash Code  hashCode hashCode combineHashCodes hashCode hashCode
Returns true if this element is an ancestor of the given element otherwise false public boolean is Ancestor Of I Java Element e I Java Element parent Element e get Parent while parent Element null parent Element equals this parent Element parent Element get Parent return parent Element null  isAncestorOf IJavaElement IJavaElement parentElement getParent parentElement parentElement parentElement parentElement getParent parentElement
see I Java Element public boolean is Read Only return false  IJavaElement isReadOnly
see I Java Element public boolean is Structure Known throws Java Model Exception return Java Element Info get Element Info is Structure Known  IJavaElement isStructureKnown JavaModelException JavaElementInfo getElementInfo isStructureKnown
Creates and returns and not present exception for this element protected Java Model Exception new Not Present Exception return new Java Model Exception new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST this  JavaModelException newNotPresentException JavaModelException JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
protected Object open When Closed Object info I Progress Monitor monitor throws Java Model Exception Java Model Manager manager Java Model Manager get Java Model Manager boolean had Temporary Cache manager has Temporary Cache try Hash Map new Elements manager get Temporary Cache generate Infos info new Elements monitor if info null info new Elements get this if info null a source ref element could not be opened close the buffer that was opened for the openable parent close only the openable s buffer see https bugs eclipse org bugs show bug cgi id 62854 Openable openable Openable get Openable if new Elements contains Key openable openable close Buffer throw new Not Present Exception if had Temporary Cache manager put Infos this new Elements finally if had Temporary Cache manager reset Temporary Cache return info  openWhenClosed IProgressMonitor JavaModelException JavaModelManager JavaModelManager getJavaModelManager hadTemporaryCache hasTemporaryCache HashMap newElements getTemporaryCache generateInfos newElements newElements show_bug getOpenable newElements containsKey closeBuffer newNotPresentException hadTemporaryCache putInfos newElements hadTemporaryCache resetTemporaryCache
public String readable Name return this get Element Name  readableName getElementName
protected String tab String int tab String Buffer buffer new String Buffer for int i tab i 0 i buffer append NON NLS 1 return buffer to String  tabString StringBuffer StringBuffer toString
Debugging purposes public String to Debug String String Buffer buffer new String Buffer this to String Info 0 buffer NO INFO return buffer to String  toDebugString StringBuffer StringBuffer toStringInfo NO_INFO toString
Debugging purposes public String to String String Buffer buffer new String Buffer to String 0 buffer return buffer to String  toString StringBuffer StringBuffer toString toString
Debugging purposes protected void to String int tab String Buffer buffer Object info this to String Info tab buffer if tab 0 this to String Ancestors buffer this to String Children tab buffer info  toString StringBuffer toStringInfo toStringAncestors toStringChildren
Debugging purposes public String to String With Ancestors String Buffer buffer new String Buffer this to String Info 0 buffer NO INFO this to String Ancestors buffer return buffer to String  toStringWithAncestors StringBuffer StringBuffer toStringInfo NO_INFO toStringAncestors toString
Debugging purposes protected void to String Ancestors String Buffer buffer Java Element parent Element Java Element this get Parent if parent Element null parent Element get Parent null buffer append in NON NLS 1 parent Element to String Info 0 buffer NO INFO parent Element to String Ancestors buffer buffer append NON NLS 1  toStringAncestors StringBuffer JavaElement parentElement JavaElement getParent parentElement parentElement getParent parentElement toStringInfo NO_INFO parentElement toStringAncestors
Debugging purposes protected void to String Children int tab String Buffer buffer Object info if info null info instanceof Java Element Info return I Java Element children Java Element Info info get Children for int i 0 i children length i buffer append n NON NLS 1 Java Element children i to String tab 1 buffer  toStringChildren StringBuffer JavaElementInfo IJavaElement JavaElementInfo getChildren JavaElement toString
Debugging purposes public Object to String Info int tab String Buffer buffer Object info Java Model Manager get Java Model Manager peek At Info this this to String Info tab buffer info return info  toStringInfo StringBuffer JavaModelManager getJavaModelManager peekAtInfo toStringInfo
Debugging purposes protected void to String Info int tab String Buffer buffer Object info buffer append this tab String tab to String Name buffer if info null buffer append not open NON NLS 1  toStringInfo StringBuffer tabString toStringName
Debugging purposes protected void to String Name String Buffer buffer buffer append get Element Name if this occurrence Count 1 buffer append NON NLS 1 buffer append this occurrence Count  toStringName StringBuffer getElementName occurrenceCount occurrenceCount

protected static I Java Element Delta fg Empty Delta new I Java Element Delta Creates the root delta To create the nested delta hierarchies use the following convenience methods The root delta can be created at any level for example project package root package fragment ul li code added I Java Element code li code changed I Java Element code li code moved I Java Element I Java Element code li code removed I Java Element code li code renamed I Java Element I Java Element code ul public Java Element Delta I Java Element element this changed Element element  IJavaElementDelta fgEmptyDelta IJavaElementDelta IJavaElement IJavaElement IJavaElement IJavaElement IJavaElement IJavaElement IJavaElement JavaElementDelta IJavaElement changedElement
Adds the child delta to the collection of affected children If the child is already in the collection walk down the hierarchy protected void add Affected Child Java Element Delta child switch this kind case ADDED case REMOVED no need to add a child if this parent is added or removed return case CHANGED this change Flags F CHILDREN break default this kind CHANGED this change Flags F CHILDREN if a child delta is added to a compilation unit delta or below it s a fine grained delta if this changed Element get Element Type I Java Element COMPILATION UNIT this fine Grained if f Affected Children length 0 f Affected Children new I Java Element Delta child return Java Element Delta existing Child null int existing Child Index 1 if f Affected Children null for int i 0 i f Affected Children length i if this equals And Same Parent f Affected Children i get Element child get Element handle case of two jars that can be equals but not in the same project existing Child Java Element Delta f Affected Children i existing Child Index i break if existing Child null new affected child f Affected Children grow And Add To Array f Affected Children child else switch existing Child get Kind case ADDED switch child get Kind case ADDED child was added then added it is added case CHANGED child was added then changed it is added return case REMOVED child was added then removed noop f Affected Children this remove And Shrink Array f Affected Children existing Child Index return break case REMOVED switch child get Kind case ADDED child was removed then added it is changed child kind CHANGED f Affected Children existing Child Index child return case CHANGED child was removed then changed it is removed case REMOVED child was removed then removed it is removed return break case CHANGED switch child get Kind case ADDED child was changed then added it is added case REMOVED child was changed then removed it is removed f Affected Children existing Child Index child return case CHANGED child was changed then changed it is changed I Java Element Delta children child get Affected Children for int i 0 i children length i Java Element Delta childs Child Java Element Delta children i existing Child add Affected Child childs Child update flags boolean child Had Content Flag child change Flags F CONTENT 0 boolean existing Child Had Children Flag existing Child change Flags F CHILDREN 0 existing Child change Flags child change Flags remove F CONTENT flag if existing child had F CHILDREN flag set case of fine grained delta existing child and delta coming from Delta Processor child if child Had Content Flag existing Child Had Children Flag existing Child change Flags F CONTENT add the non java resource deltas if needed note that the child delta always takes precedence over this existing child delta as non java resource deltas are always created last by the Delta Processor I Resource Delta res Deltas child get Resource Deltas if res Deltas null existing Child resource Deltas res Deltas existing Child resource Deltas Counter child resource Deltas Counter return break default unknown existing child becomes the child with the existing child s flags int flags existing Child get Flags f Affected Children existing Child Index child child change Flags flags  addAffectedChild JavaElementDelta changeFlags F_CHILDREN changeFlags F_CHILDREN changedElement getElementType IJavaElement COMPILATION_UNIT fineGrained fAffectedChildren fAffectedChildren IJavaElementDelta JavaElementDelta existingChild existingChildIndex fAffectedChildren fAffectedChildren equalsAndSameParent fAffectedChildren getElement getElement existingChild JavaElementDelta fAffectedChildren existingChildIndex existingChild fAffectedChildren growAndAddToArray fAffectedChildren existingChild getKind getKind fAffectedChildren removeAndShrinkArray fAffectedChildren existingChildIndex getKind fAffectedChildren existingChildIndex getKind fAffectedChildren existingChildIndex IJavaElementDelta getAffectedChildren JavaElementDelta childsChild JavaElementDelta existingChild addAffectedChild childsChild childHadContentFlag changeFlags F_CONTENT existingChildHadChildrenFlag existingChild changeFlags F_CHILDREN existingChild changeFlags changeFlags F_CONTENT F_CHILDREN DeltaProcessor childHadContentFlag existingChildHadChildrenFlag existingChild changeFlags F_CONTENT DeltaProcessor IResourceDelta resDeltas getResourceDeltas resDeltas existingChild resourceDeltas resDeltas existingChild resourceDeltasCounter resourceDeltasCounter existingChild getFlags fAffectedChildren existingChildIndex changeFlags
Creates the nested deltas resulting from an add operation Convenience method for creating add deltas The constructor should be used to create the root delta and then an add operation should call this method public void added I Java Element element added element 0  IJavaElement
public void added I Java Element element int flags Java Element Delta added Delta new Java Element Delta element added Delta added added Delta change Flags flags insert Delta Tree element added Delta  IJavaElement JavaElementDelta addedDelta JavaElementDelta addedDelta addedDelta changeFlags insertDeltaTree addedDelta
Adds the child delta to the collection of affected children If the child is already in the collection walk down the hierarchy protected void add Resource Delta I Resource Delta child switch this kind case ADDED case REMOVED no need to add a child if this parent is added or removed return case CHANGED this change Flags F CONTENT break default this kind CHANGED this change Flags F CONTENT if resource Deltas null resource Deltas new I Resource Delta 5 resource Deltas resource Deltas Counter child return if resource Deltas length resource Deltas Counter need a resize System arraycopy resource Deltas 0 resource Deltas new I Resource Delta resource Deltas Counter 2 0 resource Deltas Counter resource Deltas resource Deltas Counter child  addResourceDelta IResourceDelta changeFlags F_CONTENT changeFlags F_CONTENT resourceDeltas resourceDeltas IResourceDelta resourceDeltas resourceDeltasCounter resourceDeltas resourceDeltasCounter resourceDeltas resourceDeltas IResourceDelta resourceDeltasCounter resourceDeltasCounter resourceDeltas resourceDeltasCounter
Creates the nested deltas resulting from a change operation Convenience method for creating change deltas The constructor should be used to create the root delta and then a change operation should call this method public Java Element Delta changed I Java Element element int change Flag Java Element Delta changed Delta new Java Element Delta element changed Delta changed change Flag insert Delta Tree element changed Delta return changed Delta  JavaElementDelta IJavaElement changeFlag JavaElementDelta changedDelta JavaElementDelta changedDelta changeFlag insertDeltaTree changedDelta changedDelta
Mark this delta as a content changed delta public void content Changed this change Flags F CONTENT  contentChanged changeFlags F_CONTENT
Creates the nested deltas for a closed element public void closed I Java Element element Java Element Delta delta new Java Element Delta element delta changed F CLOSED insert Delta Tree element delta  IJavaElement JavaElementDelta JavaElementDelta F_CLOSED insertDeltaTree
Creates the nested delta deltas based on the affected element its delta and the root of this delta tree Returns the root of the created delta tree protected Java Element Delta create Delta Tree I Java Element element Java Element Delta delta Java Element Delta child Delta delta Array List ancestors get Ancestors element if ancestors null if this equals And Same Parent delta get Element get Element handle case of two jars that can be equals but not in the same project the element being changed is the root element this kind delta kind this change Flags delta change Flags f Moved To Handle delta f Moved To Handle f Moved From Handle delta f Moved From Handle else for int i 0 size ancestors size i size i I Java Element ancestor I Java Element ancestors get i Java Element Delta ancestor Delta new Java Element Delta ancestor ancestor Delta add Affected Child child Delta child Delta ancestor Delta return child Delta  JavaElementDelta createDeltaTree IJavaElement JavaElementDelta JavaElementDelta childDelta ArrayList getAncestors equalsAndSameParent getElement getElement changeFlags changeFlags fMovedToHandle fMovedToHandle fMovedFromHandle fMovedFromHandle IJavaElement IJavaElement JavaElementDelta ancestorDelta JavaElementDelta ancestorDelta addAffectedChild childDelta childDelta ancestorDelta childDelta
Returns whether the two java elements are equals and have the same parent protected boolean equals And Same Parent I Java Element e1 I Java Element e2 I Java Element parent1 return e1 equals e2 parent1 e1 get Parent null parent1 equals e2 get Parent  equalsAndSameParent IJavaElement IJavaElement IJavaElement getParent getParent
Returns the code Java Element Delta code for the given element in the delta tree or null if no delta for the given element is found protected Java Element Delta find I Java Element e if this equals And Same Parent this changed Element e handle case of two jars that can be equals but not in the same project return this else for int i 0 i f Affected Children length i Java Element Delta delta Java Element Delta f Affected Children i find e if delta null return delta return null  JavaElementDelta JavaElementDelta IJavaElement equalsAndSameParent changedElement fAffectedChildren JavaElementDelta JavaElementDelta fAffectedChildren
Mark this delta as a fine grained delta public void fine Grained changed F FINE GRAINED  fineGrained F_FINE_GRAINED
see I Java Element Delta public I Java Element Delta get Added Children return get Children Of Type ADDED  IJavaElementDelta IJavaElementDelta getAddedChildren getChildrenOfType
see I Java Element Delta public I Java Element Delta get Affected Children return f Affected Children  IJavaElementDelta IJavaElementDelta getAffectedChildren fAffectedChildren
Returns a collection of all the parents of this element up to but not including the root of this tree in bottom up order If the given element is not a descendant of the root of this tree code null code is returned private Array List get Ancestors I Java Element element I Java Element parent element get Parent if parent null return null Array List parents new Array List while parent equals this changed Element parents add parent parent parent get Parent if parent null return null parents trim To Size return parents  ArrayList getAncestors IJavaElement IJavaElement getParent ArrayList ArrayList changedElement getParent trimToSize
see I Java Element Delta public I Java Element Delta get Changed Children return get Children Of Type CHANGED  IJavaElementDelta IJavaElementDelta getChangedChildren getChildrenOfType
see I Java Element Delta protected I Java Element Delta get Children Of Type int type int length f Affected Children length if length 0 return new I Java Element Delta Array List children new Array List length for int i 0 i length i if f Affected Children i get Kind type children add f Affected Children i I Java Element Delta children Of Type new I Java Element Delta children size children to Array children Of Type return children Of Type  IJavaElementDelta IJavaElementDelta getChildrenOfType fAffectedChildren IJavaElementDelta ArrayList ArrayList fAffectedChildren getKind fAffectedChildren IJavaElementDelta childrenOfType IJavaElementDelta toArray childrenOfType childrenOfType
Returns the delta for a given element Only looks below this delta protected Java Element Delta get Delta For I Java Element element if this equals And Same Parent get Element element handle case of two jars that can be equals but not in the same project return this if f Affected Children length 0 return null int children Count f Affected Children length for int i 0 i children Count i Java Element Delta delta Java Element Delta f Affected Children i if this equals And Same Parent delta get Element element handle case of two jars that can be equals but not in the same project return delta else delta delta get Delta For element if delta null return delta return null  JavaElementDelta getDeltaFor IJavaElement equalsAndSameParent getElement fAffectedChildren childrenCount fAffectedChildren childrenCount JavaElementDelta JavaElementDelta fAffectedChildren equalsAndSameParent getElement getDeltaFor
see I Java Element Delta public I Java Element get Element return this changed Element  IJavaElementDelta IJavaElement getElement changedElement
see I Java Element Delta public I Java Element get Moved From Element return f Moved From Handle  IJavaElementDelta IJavaElement getMovedFromElement fMovedFromHandle
see I Java Element Delta public I Java Element get Moved To Element return f Moved To Handle  IJavaElementDelta IJavaElement getMovedToElement fMovedToHandle
see I Java Element Delta public I Java Element Delta get Removed Children return get Children Of Type REMOVED  IJavaElementDelta IJavaElementDelta getRemovedChildren getChildrenOfType
Return the collection of resource deltas Return null if none public I Resource Delta get Resource Deltas if resource Deltas null return null if resource Deltas length resource Deltas Counter System arraycopy resource Deltas 0 resource Deltas new I Resource Delta resource Deltas Counter 0 resource Deltas Counter return resource Deltas  IResourceDelta getResourceDeltas resourceDeltas resourceDeltas resourceDeltasCounter resourceDeltas resourceDeltas IResourceDelta resourceDeltasCounter resourceDeltasCounter resourceDeltas
Adds the new element to a new array that contains all of the elements of the old array Returns the new array protected I Java Element Delta grow And Add To Array I Java Element Delta array I Java Element Delta addition I Java Element Delta old array array new I Java Element Delta old length 1 System arraycopy old 0 array 0 old length array old length addition return array  IJavaElementDelta growAndAddToArray IJavaElementDelta IJavaElementDelta IJavaElementDelta IJavaElementDelta
Creates the delta tree for the given element and delta and then inserts the tree as an affected child of this node protected void insert Delta Tree I Java Element element Java Element Delta delta Java Element Delta child Delta create Delta Tree element delta if this equals And Same Parent element get Element handle case of two jars that can be equals but not in the same project add Affected Child child Delta  insertDeltaTree IJavaElement JavaElementDelta JavaElementDelta childDelta createDeltaTree equalsAndSameParent getElement addAffectedChild childDelta
Creates the nested deltas resulting from an move operation Convenience method for creating the move from delta The constructor should be used to create the root delta and then the move operation should call this method public void moved From I Java Element moved From Element I Java Element moved To Element Java Element Delta removed Delta new Java Element Delta moved From Element removed Delta kind REMOVED removed Delta change Flags F MOVED TO removed Delta f Moved To Handle moved To Element insert Delta Tree moved From Element removed Delta  movedFrom IJavaElement movedFromElement IJavaElement movedToElement JavaElementDelta removedDelta JavaElementDelta movedFromElement removedDelta removedDelta changeFlags F_MOVED_TO removedDelta fMovedToHandle movedToElement insertDeltaTree movedFromElement removedDelta
Creates the nested deltas resulting from an move operation Convenience method for creating the move to delta The constructor should be used to create the root delta and then the move operation should call this method public void moved To I Java Element moved To Element I Java Element moved From Element Java Element Delta added Delta new Java Element Delta moved To Element added Delta kind ADDED added Delta change Flags F MOVED FROM added Delta f Moved From Handle moved From Element insert Delta Tree moved To Element added Delta  movedTo IJavaElement movedToElement IJavaElement movedFromElement JavaElementDelta addedDelta JavaElementDelta movedToElement addedDelta addedDelta changeFlags F_MOVED_FROM addedDelta fMovedFromHandle movedFromElement insertDeltaTree movedToElement addedDelta
Creates the nested deltas for an opened element public void opened I Java Element element Java Element Delta delta new Java Element Delta element delta changed F OPENED insert Delta Tree element delta  IJavaElement JavaElementDelta JavaElementDelta F_OPENED insertDeltaTree
Removes the child delta from the collection of affected children protected void remove Affected Child Java Element Delta child int index 1 if f Affected Children null for int i 0 i f Affected Children length i if this equals And Same Parent f Affected Children i get Element child get Element handle case of two jars that can be equals but not in the same project index i break if index 0 f Affected Children remove And Shrink Array f Affected Children index  removeAffectedChild JavaElementDelta fAffectedChildren fAffectedChildren equalsAndSameParent fAffectedChildren getElement getElement fAffectedChildren removeAndShrinkArray fAffectedChildren
Removes the element from the array Returns the a new array which has shrunk protected I Java Element Delta remove And Shrink Array I Java Element Delta old int index I Java Element Delta array new I Java Element Delta old length 1 if index 0 System arraycopy old 0 array 0 index int rest old length index 1 if rest 0 System arraycopy old index 1 array index rest return array  IJavaElementDelta removeAndShrinkArray IJavaElementDelta IJavaElementDelta IJavaElementDelta
Creates the nested deltas resulting from an delete operation Convenience method for creating removed deltas The constructor should be used to create the root delta and then the delete operation should call this method public void removed I Java Element element removed element 0  IJavaElement
public void removed I Java Element element int flags Java Element Delta removed Delta new Java Element Delta element insert Delta Tree element removed Delta Java Element Delta actual Delta get Delta For element if actual Delta null actual Delta removed actual Delta change Flags flags actual Delta f Affected Children fg Empty Delta  IJavaElement JavaElementDelta removedDelta JavaElementDelta insertDeltaTree removedDelta JavaElementDelta actualDelta getDeltaFor actualDelta actualDelta actualDelta changeFlags actualDelta fAffectedChildren fgEmptyDelta
Creates the nested deltas resulting from a change operation Convenience method for creating change deltas The constructor should be used to create the root delta and then a change operation should call this method public void source Attached I Java Element element Java Element Delta attached Delta new Java Element Delta element attached Delta changed F SOURCEATTACHED insert Delta Tree element attached Delta  sourceAttached IJavaElement JavaElementDelta attachedDelta JavaElementDelta attachedDelta F_SOURCEATTACHED insertDeltaTree attachedDelta
Creates the nested deltas resulting from a change operation Convenience method for creating change deltas The constructor should be used to create the root delta and then a change operation should call this method public void source Detached I Java Element element Java Element Delta detached Delta new Java Element Delta element detached Delta changed F SOURCEDETACHED insert Delta Tree element detached Delta  sourceDetached IJavaElement JavaElementDelta detachedDelta JavaElementDelta detachedDelta F_SOURCEDETACHED insertDeltaTree detachedDelta
Returns a string representation of this delta s structure suitable for debug purposes see to String public String to Debug String int depth String Buffer buffer new String Buffer for int i 0 i depth i buffer append t buffer append Java Element get Element to Debug String to Debug String buffer I Java Element Delta children get Affected Children if children null for int i 0 i children length i buffer append n NON NLS 1 buffer append Java Element Delta children i to Debug String depth 1 for int i 0 i resource Deltas Counter i buffer append n NON NLS 1 for int j 0 j depth 1 j buffer append t I Resource Delta resource Delta resource Deltas i buffer append resource Delta to String buffer append NON NLS 1 switch resource Delta get Kind case I Resource Delta ADDED buffer append break case I Resource Delta REMOVED buffer append break case I Resource Delta CHANGED buffer append break default buffer append break buffer append NON NLS 1 return buffer to String  toString toDebugString StringBuffer StringBuffer JavaElement getElement toDebugString toDebugString IJavaElementDelta getAffectedChildren JavaElementDelta toDebugString resourceDeltasCounter IResourceDelta resourceDelta resourceDeltas resourceDelta toString resourceDelta getKind IResourceDelta IResourceDelta IResourceDelta toString
protected boolean to Debug String String Buffer buffer int flags boolean prev super to Debug String buffer flags if flags I Java Element Delta F CHILDREN 0 if prev buffer append NON NLS 1 buffer append CHILDREN NON NLS 1 prev true if flags I Java Element Delta F CONTENT 0 if prev buffer append NON NLS 1 buffer append CONTENT NON NLS 1 prev true if flags I Java Element Delta F MOVED FROM 0 if prev buffer append NON NLS 1 buffer append MOVED FROM Java Element get Moved From Element to String With Ancestors NON NLS 1 NON NLS 2 prev true if flags I Java Element Delta F MOVED TO 0 if prev buffer append NON NLS 1 buffer append MOVED TO Java Element get Moved To Element to String With Ancestors NON NLS 1 NON NLS 2 prev true if flags I Java Element Delta F ADDED TO CLASSPATH 0 if prev buffer append NON NLS 1 buffer append ADDED TO CLASSPATH NON NLS 1 prev true if flags I Java Element Delta F REMOVED FROM CLASSPATH 0 if prev buffer append NON NLS 1 buffer append REMOVED FROM CLASSPATH NON NLS 1 prev true if flags I Java Element Delta F REORDER 0 if prev buffer append NON NLS 1 buffer append REORDERED NON NLS 1 prev true if flags I Java Element Delta F ARCHIVE CONTENT CHANGED 0 if prev buffer append NON NLS 1 buffer append ARCHIVE CONTENT CHANGED NON NLS 1 prev true if flags I Java Element Delta F SOURCEATTACHED 0 if prev buffer append NON NLS 1 buffer append SOURCE ATTACHED NON NLS 1 prev true if flags I Java Element Delta F SOURCEDETACHED 0 if prev buffer append NON NLS 1 buffer append SOURCE DETACHED NON NLS 1 prev true if flags I Java Element Delta F FINE GRAINED 0 if prev buffer append NON NLS 1 buffer append FINE GRAINED NON NLS 1 prev true if flags I Java Element Delta F PRIMARY WORKING COPY 0 if prev buffer append NON NLS 1 buffer append PRIMARY WORKING COPY NON NLS 1 prev true if flags I Java Element Delta F CLASSPATH CHANGED 0 if prev buffer append NON NLS 1 buffer append CLASSPATH CHANGED NON NLS 1 prev true if flags I Java Element Delta F PRIMARY RESOURCE 0 if prev buffer append NON NLS 1 buffer append PRIMARY RESOURCE NON NLS 1 prev true if flags I Java Element Delta F OPENED 0 if prev buffer append NON NLS 1 buffer append OPENED NON NLS 1 prev true if flags I Java Element Delta F CLOSED 0 if prev buffer append NON NLS 1 buffer append CLOSED NON NLS 1 prev true return prev  toDebugString StringBuffer toDebugString IJavaElementDelta F_CHILDREN IJavaElementDelta F_CONTENT IJavaElementDelta F_MOVED_FROM MOVED_FROM JavaElement getMovedFromElement toStringWithAncestors IJavaElementDelta F_MOVED_TO MOVED_TO JavaElement getMovedToElement toStringWithAncestors IJavaElementDelta F_ADDED_TO_CLASSPATH IJavaElementDelta F_REMOVED_FROM_CLASSPATH IJavaElementDelta F_REORDER IJavaElementDelta F_ARCHIVE_CONTENT_CHANGED IJavaElementDelta F_SOURCEATTACHED IJavaElementDelta F_SOURCEDETACHED IJavaElementDelta F_FINE_GRAINED IJavaElementDelta F_PRIMARY_WORKING_COPY IJavaElementDelta F_CLASSPATH_CHANGED IJavaElementDelta F_PRIMARY_RESOURCE IJavaElementDelta F_OPENED IJavaElementDelta F_CLOSED
Returns a string representation of this delta s structure suitable for debug purposes public String to String return to Debug String 0  toString toDebugString

public I Java Element next public List Item I Java Element previous I Java Element next this previous previous this next next  IJavaElement ListItem IJavaElement IJavaElement
Creates a java element comparator on a java element looking as deep as necessary public Java Element Delta Builder I Java Element java Element this java Element java Element this initialize this record Element Info java Element Java Model this java Element get Java Model 0  JavaElementDeltaBuilder IJavaElement javaElement javaElement javaElement recordElementInfo javaElement JavaModel javaElement getJavaModel
Creates a java element comparator on a java element looking only max Depth levels deep public Java Element Delta Builder I Java Element java Element int max Depth this java Element java Element this max Depth max Depth this initialize this record Element Info java Element Java Model this java Element get Java Model 0  maxDepth JavaElementDeltaBuilder IJavaElement javaElement maxDepth javaElement javaElement maxDepth maxDepth recordElementInfo javaElement JavaModel javaElement getJavaModel
Repairs the positioning information after an element has been added private void added I Java Element element this added add element List Item current this get New Position element List Item previous null next null if current previous null previous this get New Position current previous if current next null next this get New Position current next if previous null previous next current next if next null next previous current previous  IJavaElement ListItem getNewPosition ListItem getNewPosition getNewPosition
Builds the java element deltas between the old content of the compilation unit and its new content public void build Deltas this record New Positions this java Element 0 this find Additions this java Element 0 this find Deletions this find Changes In Positioning this java Element 0 this trim Delta this delta if this delta get Affected Children length 0 this is a fine grained but not children affected mark as content changed this delta content Changed  buildDeltas recordNewPositions javaElement findAdditions javaElement findDeletions findChangesInPositioning javaElement trimDelta getAffectedChildren contentChanged
Finds elements which have been added or changed private void find Additions I Java Element new Element int depth Java Element Info old Info this get Element Info new Element if old Info null depth this max Depth this delta added new Element added new Element else this remove Element Info new Element if depth this max Depth mark element as changed this delta changed new Element I Java Element Delta F CONTENT return Java Element Info new Info null try new Info Java Element Info Java Element new Element get Element Info catch Java Model Exception npe return this find Content Change old Info new Info new Element if old Info null new Element instanceof I Parent I Java Element children new Info get Children if children null int length children length for int i 0 i length i this find Additions children i depth 1  findAdditions IJavaElement newElement JavaElementInfo oldInfo getElementInfo newElement oldInfo maxDepth newElement newElement removeElementInfo newElement maxDepth newElement IJavaElementDelta F_CONTENT JavaElementInfo newInfo newInfo JavaElementInfo JavaElement newElement getElementInfo JavaModelException findContentChange oldInfo newInfo newElement oldInfo newElement IParent IJavaElement newInfo getChildren findAdditions
Looks for changed positioning of elements private void find Changes In Positioning I Java Element element int depth if depth this max Depth this added contains element this removed contains element return if is Positioned Correctly element this delta changed element I Java Element Delta F REORDER if element instanceof I Parent Java Element Info info null try info Java Element Info Java Element element get Element Info catch Java Model Exception npe return I Java Element children info get Children if children null int length children length for int i 0 i length i this find Changes In Positioning children i depth 1  findChangesInPositioning IJavaElement maxDepth isPositionedCorrectly IJavaElementDelta F_REORDER IParent JavaElementInfo JavaElementInfo JavaElement getElementInfo JavaModelException IJavaElement getChildren findChangesInPositioning
The elements are equivalent but might have content changes private void find Content Change Java Element Info old Info Java Element Info new Info I Java Element new Element if old Info instanceof Member Element Info new Info instanceof Member Element Info if Member Element Info old Info get Modifiers Member Element Info new Info get Modifiers this delta changed new Element I Java Element Delta F MODIFIERS else if old Info instanceof Source Method Element Info new Info instanceof Source Method Element Info if Char Operation equals Source Method Element Info old Info get Return Type Name Source Method Element Info new Info get Return Type Name this delta changed new Element I Java Element Delta F CONTENT else if old Info instanceof Source Field Element Info new Info instanceof Source Field Element Info if Char Operation equals Source Field Element Info old Info get Type Name Source Field Element Info new Info get Type Name this delta changed new Element I Java Element Delta F CONTENT if old Info instanceof Source Type Element Info new Info instanceof Source Type Element Info Source Type Element Info old Source Type Info Source Type Element Info old Info Source Type Element Info new Source Type Info Source Type Element Info new Info if Char Operation equals old Source Type Info get Superclass Name new Source Type Info get Superclass Name Char Operation equals old Source Type Info get Interface Names new Source Type Info get Interface Names this delta changed new Element I Java Element Delta F SUPER TYPES  findContentChange JavaElementInfo oldInfo JavaElementInfo newInfo IJavaElement newElement oldInfo MemberElementInfo newInfo MemberElementInfo MemberElementInfo oldInfo getModifiers MemberElementInfo newInfo getModifiers newElement IJavaElementDelta F_MODIFIERS oldInfo SourceMethodElementInfo newInfo SourceMethodElementInfo CharOperation SourceMethodElementInfo oldInfo getReturnTypeName SourceMethodElementInfo newInfo getReturnTypeName newElement IJavaElementDelta F_CONTENT oldInfo SourceFieldElementInfo newInfo SourceFieldElementInfo CharOperation SourceFieldElementInfo oldInfo getTypeName SourceFieldElementInfo newInfo getTypeName newElement IJavaElementDelta F_CONTENT oldInfo SourceTypeElementInfo newInfo SourceTypeElementInfo SourceTypeElementInfo oldSourceTypeInfo SourceTypeElementInfo oldInfo SourceTypeElementInfo newSourceTypeInfo SourceTypeElementInfo newInfo CharOperation oldSourceTypeInfo getSuperclassName newSourceTypeInfo getSuperclassName CharOperation oldSourceTypeInfo getInterfaceNames newSourceTypeInfo getInterfaceNames newElement IJavaElementDelta F_SUPER_TYPES
Adds removed deltas for any handles left in the table private void find Deletions Iterator iter this infos key Set iterator while iter has Next I Java Element element I Java Element iter next this delta removed element this removed element  findDeletions keySet hasNext IJavaElement IJavaElement
private Java Element Info get Element Info I Java Element element return Java Element Info this infos get element  JavaElementInfo getElementInfo IJavaElement JavaElementInfo
return Java Element Info this infos get element private List Item get New Position I Java Element element return List Item this new Positions get element  JavaElementInfo ListItem getNewPosition IJavaElement ListItem newPositions
return List Item this new Positions get element private List Item get Old Position I Java Element element return List Item this old Positions get element  ListItem newPositions ListItem getOldPosition IJavaElement ListItem oldPositions
private void initialize this infos new Hash Map 20 this old Positions new Hash Map 20 this new Positions new Hash Map 20 this put Old Position this java Element new List Item null null this put New Position this java Element new List Item null null this delta new Java Element Delta java Element if building a delta on a compilation unit or below it s a fine grained delta if java Element get Element Type I Java Element COMPILATION UNIT this delta fine Grained this added new Array List 5 this removed new Array List 5  HashMap oldPositions HashMap newPositions HashMap putOldPosition javaElement ListItem putNewPosition javaElement ListItem JavaElementDelta javaElement javaElement getElementType IJavaElement COMPILATION_UNIT fineGrained ArrayList ArrayList
Inserts position information for the elements into the new or old positions table private void insert Positions I Java Element elements boolean is New int length elements length I Java Element previous null current null next length 0 elements 0 null for int i 0 i length i previous current current next next i 1 length elements i 1 null if is New this put New Position current new List Item previous next else this put Old Position current new List Item previous next  insertPositions IJavaElement isNew IJavaElement isNew putNewPosition ListItem putOldPosition ListItem
Returns whether the elements position has not changed private boolean is Positioned Correctly I Java Element element List Item old List Item this get Old Position element if old List Item null return false List Item new List Item this get New Position element if new List Item null return false I Java Element old Previous old List Item previous I Java Element new Previous new List Item previous if old Previous null return new Previous null else return old Previous equals new Previous  isPositionedCorrectly IJavaElement ListItem oldListItem getOldPosition oldListItem ListItem newListItem getNewPosition newListItem IJavaElement oldPrevious oldListItem IJavaElement newPrevious newListItem oldPrevious newPrevious oldPrevious newPrevious
private void put Element Info I Java Element element Java Element Info info this infos put element info  putElementInfo IJavaElement JavaElementInfo
this infos put element info private void put New Position I Java Element element List Item position this new Positions put element position  putNewPosition IJavaElement ListItem newPositions
this new Positions put element position private void put Old Position I Java Element element List Item position this old Positions put element position  newPositions putOldPosition IJavaElement ListItem oldPositions
Records this elements info and attempts to record the info for the children private void record Element Info I Java Element element Java Model model int depth if depth this max Depth return Java Element Info info Java Element Info Java Model Manager get Java Model Manager get Info element if info null no longer in the java model return this put Element Info element info if element instanceof I Parent I Java Element children info get Children if children null insert Positions children false for int i 0 length children length i length i record Element Info children i model depth 1  recordElementInfo IJavaElement JavaModel maxDepth JavaElementInfo JavaElementInfo JavaModelManager getJavaModelManager getInfo putElementInfo IParent IJavaElement getChildren insertPositions recordElementInfo
Fills the new Positions hashtable with the new position information private void record New Positions I Java Element new Element int depth if depth this max Depth new Element instanceof I Parent Java Element Info info null try info Java Element Info Java Element new Element get Element Info catch Java Model Exception npe return I Java Element children info get Children if children null insert Positions children true for int i 0 length children length i length i record New Positions children i depth 1  newPositions recordNewPositions IJavaElement newElement maxDepth newElement IParent JavaElementInfo JavaElementInfo JavaElement newElement getElementInfo JavaModelException IJavaElement getChildren insertPositions recordNewPositions
Repairs the positioning information after an element has been removed private void removed I Java Element element this removed add element List Item current this get Old Position element List Item previous null next null if current previous null previous this get Old Position current previous if current next null next this get Old Position current next if previous null previous next current next if next null next previous current previous  IJavaElement ListItem getOldPosition ListItem getOldPosition getOldPosition
private void remove Element Info I Java Element element this infos remove element  removeElementInfo IJavaElement
public String to String String Buffer buffer new String Buffer buffer append Built delta n NON NLS 1 buffer append this delta to String return buffer to String  toString StringBuffer StringBuffer toString toString
Trims deletion deltas to only report the highest level of deletion private void trim Delta Java Element Delta element Delta if element Delta get Kind I Java Element Delta REMOVED I Java Element Delta children element Delta get Affected Children for int i 0 length children length i length i element Delta remove Affected Child Java Element Delta children i else I Java Element Delta children element Delta get Affected Children for int i 0 length children length i length i trim Delta Java Element Delta children i  trimDelta JavaElementDelta elementDelta elementDelta getKind IJavaElementDelta IJavaElementDelta elementDelta getAffectedChildren elementDelta removeAffectedChild JavaElementDelta IJavaElementDelta elementDelta getAffectedChildren trimDelta JavaElementDelta

static Object NO NON JAVA RESOURCES new Object protected Java Element Info this children Java Element NO ELEMENTS  NO_NON_JAVA_RESOURCES JavaElementInfo JavaElement NO_ELEMENTS
public void add Child I Java Element child if this children Java Element NO ELEMENTS set Children new I Java Element child else if includes Child child set Children grow And Add To Array this children child  addChild IJavaElement JavaElement NO_ELEMENTS setChildren IJavaElement includesChild setChildren growAndAddToArray
public Object clone try return super clone catch Clone Not Supported Exception e throw new Error  CloneNotSupportedException
public I Java Element get Children return this children  IJavaElement getChildren
Adds the new element to a new array that contains all of the elements of the old array Returns the new array protected I Java Element grow And Add To Array I Java Element array I Java Element addition I Java Element old array array new I Java Element old length 1 System arraycopy old 0 array 0 old length array old length addition return array  IJavaElement growAndAddToArray IJavaElement IJavaElement IJavaElement IJavaElement
Returns code true code if this child is in my children collection protected boolean includes Child I Java Element child for int i 0 i this children length i if this children i equals child return true return false  includesChild IJavaElement
see I Java Element is Structure Known public boolean is Structure Known return this is Structure Known  IJavaElement isStructureKnown isStructureKnown isStructureKnown
Returns an array with all the same elements as the specified array except for the element to remove Assumes that the deletion is contained in the array protected I Java Element remove And Shrink Array I Java Element array I Java Element deletion I Java Element old array array new I Java Element old length 1 int j 0 for int i 0 i old length i if old i equals deletion array j old i else System arraycopy old i 1 array j old length i 1 return array j return array  IJavaElement removeAndShrinkArray IJavaElement IJavaElement IJavaElement IJavaElement
public void remove Child I Java Element child if includes Child child set Children remove And Shrink Array this children child  removeChild IJavaElement includesChild setChildren removeAndShrinkArray
public void set Children I Java Element children this children children  setChildren IJavaElement
Sets whether the structure of this element known see I Java Element is Structure Known public void set Is Structure Known boolean new Is Structure Known this is Structure Known new Is Structure Known  IJavaElement isStructureKnown setIsStructureKnown newIsStructureKnown isStructureKnown newIsStructureKnown

protected static I Method fg Empty Method Array new I Method 0 see I Java Element Requestor public void accept Field I Field field if f Fields null f Fields new Array List f Fields add field  IMethod fgEmptyMethodArray IMethod IJavaElementRequestor acceptField IField fFields fFields ArrayList fFields
see I Java Element Requestor public void accept Initializer I Initializer initializer if f Initializers null f Initializers new Array List f Initializers add initializer  IJavaElementRequestor acceptInitializer IInitializer fInitializers fInitializers ArrayList fInitializers
see I Java Element Requestor public void accept Member Type I Type type if f Member Types null f Member Types new Array List f Member Types add type  IJavaElementRequestor acceptMemberType IType fMemberTypes fMemberTypes ArrayList fMemberTypes
see I Java Element Requestor public void accept Method I Method method if f Methods null f Methods new Array List f Methods add method  IJavaElementRequestor acceptMethod IMethod fMethods fMethods ArrayList fMethods
see I Java Element Requestor public void accept Package Fragment I Package Fragment package Fragment if f Package Fragments null f Package Fragments new Array List f Package Fragments add package Fragment  IJavaElementRequestor acceptPackageFragment IPackageFragment packageFragment fPackageFragments fPackageFragments ArrayList fPackageFragments packageFragment
see I Java Element Requestor public void accept Type I Type type if f Types null f Types new Array List f Types add type  IJavaElementRequestor acceptType IType fTypes fTypes ArrayList fTypes
see I Java Element Requestor public I Field get Fields if f Fields null return fg Empty Field Array int size f Fields size I Field results new I Field size f Fields to Array results return results  IJavaElementRequestor IField getFields fFields fgEmptyFieldArray fFields IField IField fFields toArray
see I Java Element Requestor public I Initializer get Initializers if f Initializers null return fg Empty Initializer Array int size f Initializers size I Initializer results new I Initializer size f Initializers to Array results return results  IJavaElementRequestor IInitializer getInitializers fInitializers fgEmptyInitializerArray fInitializers IInitializer IInitializer fInitializers toArray
see I Java Element Requestor public I Type get Member Types if f Member Types null return fg Empty Type Array int size f Member Types size I Type results new I Type size f Member Types to Array results return results  IJavaElementRequestor IType getMemberTypes fMemberTypes fgEmptyTypeArray fMemberTypes IType IType fMemberTypes toArray
see I Java Element Requestor public I Method get Methods if f Methods null return fg Empty Method Array int size f Methods size I Method results new I Method size f Methods to Array results return results  IJavaElementRequestor IMethod getMethods fMethods fgEmptyMethodArray fMethods IMethod IMethod fMethods toArray
see I Java Element Requestor public I Package Fragment get Package Fragments if f Package Fragments null return fg Empty Package Fragment Array int size f Package Fragments size I Package Fragment results new I Package Fragment size f Package Fragments to Array results return results  IJavaElementRequestor IPackageFragment getPackageFragments fPackageFragments fgEmptyPackageFragmentArray fPackageFragments IPackageFragment IPackageFragment fPackageFragments toArray
see I Java Element Requestor public I Type get Types if f Types null return fg Empty Type Array int size f Types size I Type results new I Type size f Types to Array results return results  IJavaElementRequestor IType getTypes fTypes fgEmptyTypeArray fTypes IType IType fTypes toArray
see I Java Element Requestor public boolean is Canceled return f Canceled  IJavaElementRequestor isCanceled fCanceled
Reset the state of this requestor public void reset f Canceled false f Fields null f Initializers null f Member Types null f Methods null f Package Fragments null f Types null  fCanceled fFields fInitializers fMemberTypes fMethods fPackageFragments fTypes
Sets the is Canceled state of this requestor to true or false public void set Canceled boolean b f Canceled b  isCanceled setCanceled fCanceled

Constructs a new Java Model on the given workspace Note that only one instance of Java Model handle should ever be created One should only indirect through Java Model Manager get Java Model to get access to it exception Error if called more than once protected Java Model throws Error super null workspace has empty name NON NLS 1  JavaModel JavaModelManager getJavaModel JavaModel
protected boolean build Structure Openable Element Info info I Progress Monitor pm Map new Elements I Resource underlying Resource throws Java Model Exception determine my children I Project projects Resources Plugin get Workspace get Root get Projects for int i 0 max projects length i max i I Project project projects i if Java Project has Java Nature project info add Child get Java Project project new Elements put this info return true  buildStructure OpenableElementInfo IProgressMonitor newElements IResource underlyingResource JavaModelException IProject ResourcesPlugin getWorkspace getRoot getProjects IProject JavaProject hasJavaNature addChild getJavaProject newElements
public boolean contains I Resource resource switch resource get Type case I Resource ROOT case I Resource PROJECT return true file or folder I Java Project projects try projects this get Java Projects catch Java Model Exception e return false for int i 0 length projects length i length i Java Project project Java Project projects i if project contains resource return false return true  IResource getType IResource IResource IJavaProject getJavaProjects JavaModelException JavaProject JavaProject
see I Java Model public void copy I Java Element elements I Java Element containers I Java Element siblings String renamings boolean force I Progress Monitor monitor throws Java Model Exception if elements null elements length 0 elements 0 null elements 0 get Element Type I Java Element TYPE run Operation new Copy Resource Elements Operation elements containers force elements siblings renamings monitor else run Operation new Copy Elements Operation elements containers force elements siblings renamings monitor  IJavaModel IJavaElement IJavaElement IJavaElement IProgressMonitor JavaModelException getElementType IJavaElement runOperation CopyResourceElementsOperation runOperation CopyElementsOperation
Returns a new element info for this element protected Object create Element Info return new Java Model Info  createElementInfo JavaModelInfo
see I Java Model public void delete I Java Element elements boolean force I Progress Monitor monitor throws Java Model Exception if elements null elements length 0 elements 0 null elements 0 get Element Type I Java Element TYPE new Delete Resource Elements Operation elements force run Operation monitor else new Delete Elements Operation elements force run Operation monitor  IJavaModel IJavaElement IProgressMonitor JavaModelException getElementType IJavaElement DeleteResourceElementsOperation runOperation DeleteElementsOperation runOperation
public boolean equals Object o if o instanceof Java Model return false return super equals o  JavaModel
Finds the given project in the list of the java model s children Returns null if not found public I Java Project find Java Project I Project project try I Java Project projects this get Old Java Projects List for int i 0 length projects length i length i I Java Project java Project projects i if project equals java Project get Project return java Project catch Java Model Exception e java model doesn t exist cannot find any project return null  IJavaProject findJavaProject IProject IJavaProject getOldJavaProjectsList IJavaProject javaProject javaProject getProject javaProject JavaModelException
see I Java Element public int get Element Type return JAVA MODEL  IJavaElement getElementType JAVA_MODEL
Flushes the cache of external files known to be existing public static void flush External File Cache existing External Files new Hash Set  flushExternalFileCache existingExternalFiles HashSet
public I Java Element get Handle From Memento String token Memento Tokenizer memento Working Copy Owner owner switch token char At 0 case JEM COUNT return get Handle Updating Count From Memento memento owner case JEM JAVAPROJECT String project Name memento next Token Java Element project Java Element get Java Project project Name return project get Handle From Memento memento owner return null  IJavaElement getHandleFromMemento MementoTokenizer WorkingCopyOwner charAt JEM_COUNT getHandleUpdatingCountFromMemento JEM_JAVAPROJECT projectName nextToken JavaElement JavaElement getJavaProject projectName getHandleFromMemento
see Java Element get Handle Memento public String get Handle Memento return get Element Name  JavaElement getHandleMemento getHandleMemento getElementName
Returns the code char code that marks the start of this handles contribution to a memento protected char get Handle Memento Delimiter Assert is True false Should not be called NON NLS 1 return 0  getHandleMementoDelimiter isTrue
see I Java Model public I Java Project get Java Project String project Name return new Java Project Resources Plugin get Workspace get Root get Project project Name this  IJavaModel IJavaProject getJavaProject projectName JavaProject ResourcesPlugin getWorkspace getRoot getProject projectName
Returns the active Java project associated with the specified resource or code null code if no Java project yet exists for the resource exception Illegal Argument Exception if the given resource is not one of an I Project I Folder or I File public I Java Project get Java Project I Resource resource switch resource get Type case I Resource FOLDER return new Java Project I Folder resource get Project this case I Resource FILE return new Java Project I File resource get Project this case I Resource PROJECT return new Java Project I Project resource this default throw new Illegal Argument Exception Util bind element invalid Resource For Project NON NLS 1  IllegalArgumentException IProject IFolder IFile IJavaProject getJavaProject IResource getType IResource JavaProject IFolder getProject IResource JavaProject IFile getProject IResource JavaProject IProject IllegalArgumentException invalidResourceForProject
see I Java Model public I Java Project get Java Projects throws Java Model Exception Array List list get Children Of Type JAVA PROJECT I Java Project array new I Java Project list size list to Array array return array  IJavaModel IJavaProject getJavaProjects JavaModelException ArrayList getChildrenOfType JAVA_PROJECT IJavaProject IJavaProject toArray
see I Java Model public Object get Non Java Resources throws Java Model Exception return Java Model Info get Element Info get Non Java Resources  IJavaModel getNonJavaResources JavaModelException JavaModelInfo getElementInfo getNonJavaResources
Workaround for bug 15168 circular errors not reported Returns the list of java projects before resource delta processing has started public I Java Project get Old Java Projects List throws Java Model Exception Java Model Manager manager Java Model Manager get Java Model Manager return manager delta State model Projects Cache null this get Java Projects manager delta State model Projects Cache  IJavaProject getOldJavaProjectsList JavaModelException JavaModelManager JavaModelManager getJavaModelManager deltaState modelProjectsCache getJavaProjects deltaState modelProjectsCache
see I Java Element public I Path get Path return Path ROOT  IJavaElement IPath getPath
see I Java Element public I Resource get Resource return Resources Plugin get Workspace get Root  IJavaElement IResource getResource ResourcesPlugin getWorkspace getRoot
see I Openable public I Resource get Underlying Resource return null  IOpenable IResource getUnderlyingResource
Returns the workbench associated with this object public I Workspace get Workspace return Resources Plugin get Workspace  IWorkspace getWorkspace ResourcesPlugin getWorkspace
see I Java Model public void move I Java Element elements I Java Element containers I Java Element siblings String renamings boolean force I Progress Monitor monitor throws Java Model Exception if elements null elements length 0 elements 0 null elements 0 get Element Type I Java Element TYPE run Operation new Move Resource Elements Operation elements containers force elements siblings renamings monitor else run Operation new Move Elements Operation elements containers force elements siblings renamings monitor  IJavaModel IJavaElement IJavaElement IJavaElement IProgressMonitor JavaModelException getElementType IJavaElement runOperation MoveResourceElementsOperation runOperation MoveElementsOperation
see I Java Model refresh External Archives I Java Element I Progress Monitor public void refresh External Archives I Java Element elements Scope I Progress Monitor monitor throws Java Model Exception if elements Scope null elements Scope new I Java Element this Java Model Manager get Java Model Manager get Delta Processor check External Archive Changes elements Scope monitor  IJavaModel refreshExternalArchives IJavaElement IProgressMonitor refreshExternalArchives IJavaElement elementsScope IProgressMonitor JavaModelException elementsScope elementsScope IJavaElement JavaModelManager getJavaModelManager getDeltaProcessor checkExternalArchiveChanges elementsScope
see I Java Model public void rename I Java Element elements I Java Element destinations String renamings boolean force I Progress Monitor monitor throws Java Model Exception Multi Operation op if elements null elements length 0 elements 0 null elements 0 get Element Type I Java Element TYPE op new Rename Resource Elements Operation elements destinations renamings force else op new Rename Elements Operation elements destinations renamings force op run Operation monitor  IJavaModel IJavaElement IJavaElement IProgressMonitor JavaModelException MultiOperation getElementType IJavaElement RenameResourceElementsOperation RenameElementsOperation runOperation
Configures and runs the code Multi Operation code protected void run Operation Multi Operation op I Java Element elements I Java Element siblings String renamings I Progress Monitor monitor throws Java Model Exception op set Renamings renamings if siblings null for int i 0 i elements length i op set Insert Before elements i siblings i op run Operation monitor  MultiOperation runOperation MultiOperation IJavaElement IJavaElement IProgressMonitor JavaModelException setRenamings setInsertBefore runOperation
private Debugging purposes protected void to String Info int tab String Buffer buffer Object info buffer append this tab String tab buffer append Java Model NON NLS 1 if info null buffer append not open NON NLS 1  toStringInfo StringBuffer tabString
Helper method returns the targeted item I Resource if internal or java io File if external or null if unbound Internal items must be referred to using container relative paths public static Object get Target I Container container I Path path boolean check Resource Existence if path null return null lookup inside the container if path get Device null container relative paths should not contain a device see http dev eclipse org bugs show bug cgi id 18684 case of a workspace rooted at d I Resource resource container find Member path if resource null if check Resource Existence resource exists return resource return null if path is relative it cannot be an external path see http dev eclipse org bugs show bug cgi id 22517 if path is Absolute return null lookup outside the container File external File new File path toOS String if check Resource Existence return external File else if existing External Files contains external File return external File else if Java Model Manager ZIP ACCESS VERBOSE System out println Thread current Thread Java Model get Target Checking existence of path to String NON NLS 1 NON NLS 2 if external File exists cache external file existing External Files add external File return external File return null  IResource getTarget IContainer IPath checkResourceExistence getDevice show_bug IResource findMember checkResourceExistence show_bug isAbsolute externalFile toOSString checkResourceExistence externalFile existingExternalFiles externalFile externalFile JavaModelManager ZIP_ACCESS_VERBOSE currentThread JavaModel getTarget toString externalFile existingExternalFiles externalFile externalFile

public Java Model Cache this project And Root Cache new Hash Map 50 this pkg Cache new Hash Map PKG CACHE SIZE this openable Cache new Element Cache OPENABLE CACHE SIZE this children Cache new Hash Map OPENABLE CACHE SIZE 20 average 20 chilren per openable  JavaModelCache projectAndRootCache HashMap pkgCache HashMap PKG_CACHE_SIZE openableCache ElementCache OPENABLE_CACHE_SIZE childrenCache HashMap OPENABLE_CACHE_SIZE
public double openable Filling Ratio return this openable Cache filling Ratio  openableFillingRatio openableCache fillingRatio
return this openable Cache filling Ratio public int pkg Size return this pkg Cache size  openableCache fillingRatio pkgSize pkgCache
Returns the info for the element public Object get Info I Java Element element switch element get Element Type case I Java Element JAVA MODEL return this model Info case I Java Element JAVA PROJECT case I Java Element PACKAGE FRAGMENT ROOT return this project And Root Cache get element case I Java Element PACKAGE FRAGMENT return this pkg Cache get element case I Java Element COMPILATION UNIT case I Java Element CLASS FILE return this openable Cache get element default return this children Cache get element  getInfo IJavaElement getElementType IJavaElement JAVA_MODEL modelInfo IJavaElement JAVA_PROJECT IJavaElement PACKAGE_FRAGMENT_ROOT projectAndRootCache IJavaElement PACKAGE_FRAGMENT pkgCache IJavaElement COMPILATION_UNIT IJavaElement CLASS_FILE openableCache childrenCache
Returns the info for this element without disturbing the cache ordering protected Object peek At Info I Java Element element switch element get Element Type case I Java Element JAVA MODEL return this model Info case I Java Element JAVA PROJECT case I Java Element PACKAGE FRAGMENT ROOT return this project And Root Cache get element case I Java Element PACKAGE FRAGMENT return this pkg Cache get element case I Java Element COMPILATION UNIT case I Java Element CLASS FILE return this openable Cache peek element default return this children Cache get element  peekAtInfo IJavaElement getElementType IJavaElement JAVA_MODEL modelInfo IJavaElement JAVA_PROJECT IJavaElement PACKAGE_FRAGMENT_ROOT projectAndRootCache IJavaElement PACKAGE_FRAGMENT pkgCache IJavaElement COMPILATION_UNIT IJavaElement CLASS_FILE openableCache childrenCache
Remember the info for the element protected void put Info I Java Element element Object info switch element get Element Type case I Java Element JAVA MODEL this model Info Java Model Info info break case I Java Element JAVA PROJECT case I Java Element PACKAGE FRAGMENT ROOT this project And Root Cache put element info break case I Java Element PACKAGE FRAGMENT this pkg Cache put element info break case I Java Element COMPILATION UNIT case I Java Element CLASS FILE this openable Cache put element info break default this children Cache put element info  putInfo IJavaElement getElementType IJavaElement JAVA_MODEL modelInfo JavaModelInfo IJavaElement JAVA_PROJECT IJavaElement PACKAGE_FRAGMENT_ROOT projectAndRootCache IJavaElement PACKAGE_FRAGMENT pkgCache IJavaElement COMPILATION_UNIT IJavaElement CLASS_FILE openableCache childrenCache
Removes the info of the element from the cache protected void remove Info I Java Element element switch element get Element Type case I Java Element JAVA MODEL this model Info null break case I Java Element JAVA PROJECT case I Java Element PACKAGE FRAGMENT ROOT this project And Root Cache remove element break case I Java Element PACKAGE FRAGMENT this pkg Cache remove element break case I Java Element COMPILATION UNIT case I Java Element CLASS FILE this openable Cache remove element break default this children Cache remove element  removeInfo IJavaElement getElementType IJavaElement JAVA_MODEL modelInfo IJavaElement JAVA_PROJECT IJavaElement PACKAGE_FRAGMENT_ROOT projectAndRootCache IJavaElement PACKAGE_FRAGMENT pkgCache IJavaElement COMPILATION_UNIT IJavaElement CLASS_FILE openableCache childrenCache

Compute the non java resources contained in this java project private Object compute Non Java Resources I Project projects Resources Plugin get Workspace get Root get Projects int length projects length Object resources null int index 0 for int i 0 i length i I Project project projects i if Java Project has Java Nature project if resources null resources new Object length resources index project if index 0 return NO NON JAVA RESOURCES if index length System arraycopy resources 0 resources new Object index 0 index return resources  computeNonJavaResources IProject ResourcesPlugin getWorkspace getRoot getProjects IProject JavaProject hasJavaNature NO_NON_JAVA_RESOURCES
Returns an array of non java resources contained in the receiver Object get Non Java Resources if this non Java Resources null this non Java Resources compute Non Java Resources return this non Java Resources  getNonJavaResources nonJavaResources nonJavaResources computeNonJavaResources nonJavaResources

public final static I Path VARIABLE INITIALIZATION IN PROGRESS new Path Variable Initialization In Progress NON NLS 1 public final static I Classpath Container CONTAINER INITIALIZATION IN PROGRESS new I Classpath Container public I Classpath Entry get Classpath Entries return null  IPath VARIABLE_INITIALIZATION_IN_PROGRESS IClasspathContainer CONTAINER_INITIALIZATION_IN_PROGRESS IClasspathContainer IClasspathEntry getClasspathEntries
public final static I Classpath Container CONTAINER INITIALIZATION IN PROGRESS new I Classpath Container public I Classpath Entry get Classpath Entries return null public String get Description return Container Initialization In Progress NON NLS 1  IClasspathContainer CONTAINER_INITIALIZATION_IN_PROGRESS IClasspathContainer IClasspathEntry getClasspathEntries getDescription
public I Classpath Entry get Classpath Entries return null public String get Description return Container Initialization In Progress NON NLS 1 public int get Kind return 0  IClasspathEntry getClasspathEntries getDescription getKind
public String get Description return Container Initialization In Progress NON NLS 1 public int get Kind return 0 public I Path get Path return null  getDescription getKind IPath getPath
public int get Kind return 0 public I Path get Path return null public String to String return get Description  getKind IPath getPath toString getDescription
Returns whether the given full path for a package conflicts with the output location of the given project public static boolean conflicts With Output Location I Path folder Path Java Project project try I Path output Location project get Output Location if output Location null in doubt there is a conflict return true if output Location is Prefix Of folder Path only allow nesting in project s output if there is a corresponding source folder or if the project s output is not used in other words if all source folders have their custom output I Classpath Entry classpath project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress boolean is Output Used false for int i 0 length classpath length i length i I Classpath Entry entry classpath i if entry get Entry Kind I Classpath Entry CPE SOURCE if entry get Path equals output Location return false if entry get Output Location null is Output Used true return is Output Used return false catch Java Model Exception e in doubt there is a conflict return true  conflictsWithOutputLocation IPath folderPath JavaProject IPath outputLocation getOutputLocation outputLocation outputLocation isPrefixOf folderPath IClasspathEntry getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress isOutputUsed IClasspathEntry getEntryKind IClasspathEntry CPE_SOURCE getPath outputLocation getOutputLocation isOutputUsed isOutputUsed JavaModelException
public synchronized I Classpath Container container Get I Java Project project I Path container Path check initialization in progress first Hash Set project Initializations container Initialization In Progress project if project Initializations contains container Path return CONTAINER INITIALIZATION IN PROGRESS Map project Containers Map this containers get project if project Containers null return null I Classpath Container container I Classpath Container project Containers get container Path return container  IClasspathContainer containerGet IJavaProject IPath containerPath HashSet projectInitializations containerInitializationInProgress projectInitializations containerPath CONTAINER_INITIALIZATION_IN_PROGRESS projectContainers projectContainers IClasspathContainer IClasspathContainer projectContainers containerPath
private synchronized Map container Clone I Java Project project Map original Project Containers Map this containers get project if original Project Containers null return null Map project Containers new Hash Map original Project Containers size project Containers put All original Project Containers return project Containers  containerClone IJavaProject originalProjectContainers originalProjectContainers projectContainers HashMap originalProjectContainers projectContainers putAll originalProjectContainers projectContainers
private Hash Set container Initialization In Progress I Java Project project Map initializations Map this container Initialization In Progress get if initializations null initializations new Hash Map this container Initialization In Progress set initializations Hash Set project Initializations Hash Set initializations get project if project Initializations null project Initializations new Hash Set initializations put project project Initializations return project Initializations  HashSet containerInitializationInProgress IJavaProject containerInitializationInProgress HashMap containerInitializationInProgress HashSet projectInitializations HashSet projectInitializations projectInitializations HashSet projectInitializations projectInitializations
public synchronized void container Put I Java Project project I Path container Path I Classpath Container container set unset the initialization in progress Hash Set project Initializations container Initialization In Progress project if container CONTAINER INITIALIZATION IN PROGRESS project Initializations add container Path do not write out intermediate initialization value return else project Initializations remove container Path if project Initializations size 0 Map initializations Map this container Initialization In Progress get initializations remove project Map project Containers Map this containers get project if project Containers null project Containers new Hash Map 1 this containers put project project Containers if container null project Containers remove container Path else project Containers put container Path container discard obsoleted information about previous session Map previous Containers Map this previous Session Containers get project if previous Containers null previous Containers remove container Path container values are persisted in preferences during save operations see saving I Save Context  containerPut IJavaProject IPath containerPath IClasspathContainer HashSet projectInitializations containerInitializationInProgress CONTAINER_INITIALIZATION_IN_PROGRESS projectInitializations containerPath projectInitializations containerPath projectInitializations containerInitializationInProgress projectContainers projectContainers projectContainers HashMap projectContainers projectContainers containerPath projectContainers containerPath previousContainers previousSessionContainers previousContainers previousContainers containerPath ISaveContext
private synchronized void containers Reset String containerI Ds for int i 0 i containerI Ds length i String containerID containerI Ds i Iterator project Iterator this containers key Set iterator while project Iterator has Next I Java Project project I Java Project project Iterator next Map project Containers Map this containers get project if project Containers null Iterator container Iterator project Containers key Set iterator while container Iterator has Next I Path container Path I Path container Iterator next if container Path segment 0 equals containerID registered container project Containers put container Path null reset container value but leave entry in Map  containersReset containerIDs containerIDs containerIDs projectIterator keySet projectIterator hasNext IJavaProject IJavaProject projectIterator projectContainers projectContainers containerIterator projectContainers keySet containerIterator hasNext IPath containerPath IPath containerIterator containerPath projectContainers containerPath
Returns the Java element corresponding to the given resource or code null code if unable to associate the given resource with a Java element p The resource must be one of ul li a project the element returned is the corresponding code I Java Project code li li a code java code file the element returned is the corresponding code I Compilation Unit code li li a code class code file the element returned is the corresponding code I Class File code li li a code jar code file the element returned is the corresponding code I Package Fragment Root code li li a folder the element returned is the corresponding code I Package Fragment Root code or code I Package Fragment code li li the workspace root resource the element returned is the code I Java Model code li ul p Creating a Java element has the side effect of creating and opening all of the element s parents if they are not yet open public static I Java Element create I Resource resource I Java Project project if resource null return null int type resource get Type switch type case I Resource PROJECT return Java Core create I Project resource case I Resource FILE return create I File resource project case I Resource FOLDER return create I Folder resource project case I Resource ROOT return Java Core create I Workspace Root resource default return null  IJavaProject ICompilationUnit IClassFile IPackageFragmentRoot IPackageFragmentRoot IPackageFragment IJavaModel IJavaElement IResource IJavaProject getType IResource JavaCore IProject IResource IFile IResource IFolder IResource JavaCore IWorkspaceRoot
Returns the Java element corresponding to the given file its project being the given project Returns code null code if unable to associate the given file with a Java element p The file must be one of ul li a code java code file the element returned is the corresponding code I Compilation Unit code li li a code class code file the element returned is the corresponding code I Class File code li li a code jar code file the element returned is the corresponding code I Package Fragment Root code li ul p Creating a Java element has the side effect of creating and opening all of the element s parents if they are not yet open public static I Java Element create I File file I Java Project project if file null return null if project null project Java Core create file get Project if file get File Extension null String name file get Name if org eclipse jdt internal compiler util Util is Java File Name name return create Compilation Unit From file project if org eclipse jdt internal compiler util Util is Class File Name name return create Class File From file project if org eclipse jdt internal compiler util Util is Archive File Name name return create Jar Package Fragment Root From file project return null  ICompilationUnit IClassFile IPackageFragmentRoot IJavaElement IFile IJavaProject JavaCore getProject getFileExtension getName isJavaFileName createCompilationUnitFrom isClassFileName createClassFileFrom isArchiveFileName createJarPackageFragmentRootFrom
Returns the package fragment or package fragment root corresponding to the given folder its parent or great parent being the given project or code null code if unable to associate the given folder with a Java element p Note that a package fragment root is returned rather than a default package p Creating a Java element has the side effect of creating and opening all of the element s parents if they are not yet open public static I Java Element create I Folder folder I Java Project project if folder null return null if project null project Java Core create folder get Project I Java Element element determine If On Classpath folder project if conflicts With Output Location folder get Full Path Java Project project folder get Name index Of 0 element instanceof I Package Fragment Root return null only package fragment roots are allowed with dot names else return element  IJavaElement IFolder IJavaProject JavaCore getProject IJavaElement determineIfOnClasspath conflictsWithOutputLocation getFullPath JavaProject getName indexOf IPackageFragmentRoot
Creates and returns a class file element for the given code class code file its project being the given project Returns code null code if unable to recognize the class file public static I Class File create Class File From I File file I Java Project project if file null return null if project null project Java Core create file get Project I Package Fragment pkg I Package Fragment determine If On Classpath file project if pkg null fix for 1FVS7WE not on classpath make the root its folder and a default package I Package Fragment Root root project get Package Fragment Root file get Parent pkg root get Package Fragment I Package Fragment DEFAULT PACKAGE NAME return pkg get Class File file get Name  IClassFile createClassFileFrom IFile IJavaProject JavaCore getProject IPackageFragment IPackageFragment determineIfOnClasspath IPackageFragmentRoot getPackageFragmentRoot getParent getPackageFragment IPackageFragment DEFAULT_PACKAGE_NAME getClassFile getName
Creates and returns a compilation unit element for the given code java code file its project being the given project Returns code null code if unable to recognize the compilation unit public static I Compilation Unit create Compilation Unit From I File file I Java Project project if file null return null if project null project Java Core create file get Project I Package Fragment pkg I Package Fragment determine If On Classpath file project if pkg null not on classpath make the root its folder and a default package I Package Fragment Root root project get Package Fragment Root file get Parent pkg root get Package Fragment I Package Fragment DEFAULT PACKAGE NAME if VERBOSE System out println WARNING creating unit element outside classpath Thread current Thread file get Full Path NON NLS 1 NON NLS 2 return pkg get Compilation Unit file get Name  ICompilationUnit createCompilationUnitFrom IFile IJavaProject JavaCore getProject IPackageFragment IPackageFragment determineIfOnClasspath IPackageFragmentRoot getPackageFragmentRoot getParent getPackageFragment IPackageFragment DEFAULT_PACKAGE_NAME currentThread getFullPath getCompilationUnit getName
Creates and returns a handle for the given JAR file its project being the given project The Java model associated with the JAR s project may be created as a side effect Returns code null code if unable to create a JAR package fragment root for example if the JAR file represents a non Java resource public static I Package Fragment Root create Jar Package Fragment Root From I File file I Java Project project if file null return null if project null project Java Core create file get Project Create a jar package fragment root only if on the classpath I Path resource Path file get Full Path try I Classpath Entry entries Java Project project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress for int i 0 length entries length i length i I Classpath Entry entry entries i I Path root Path entry get Path if root Path equals resource Path return project get Package Fragment Root file catch Java Model Exception e project doesn t exist return null return null  IPackageFragmentRoot createJarPackageFragmentRootFrom IFile IJavaProject JavaCore getProject IPath resourcePath getFullPath IClasspathEntry JavaProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress IClasspathEntry IPath rootPath getPath rootPath resourcePath getPackageFragmentRoot JavaModelException
Returns the package fragment root represented by the resource or the package fragment the given resource is located in or code null code if the given resource is not on the classpath of the given project public static I Java Element determine If On Classpath I Resource resource I Java Project project I Path resource Path resource get Full Path try I Classpath Entry entries org eclipse jdt internal compiler util Util is Java File Name resource Path last Segment project get Raw Classpath JAVA file can only live inside SRC folder on the raw path Java Project project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress for int i 0 i entries length i I Classpath Entry entry entries i if entry get Entry Kind I Classpath Entry CPE PROJECT continue I Path root Path entry get Path if root Path equals resource Path return project get Package Fragment Root resource else if root Path is Prefix Of resource Path allow creation of package fragment if it contains a java file that is included if Util is Excluded resource Classpath Entry entry full Inclusion Pattern Chars Classpath Entry entry full Exclusion Pattern Chars given we have a resource child of the root it cannot be a JAR pkg root I Package Fragment Root root Java Project project get Folder Package Fragment Root root Path if root null return null I Path pkg Path resource Path remove First Segments root Path segment Count if resource get Type I Resource FILE if the resource is a file then remove the last segment which is the file name in the package pkg Path pkg Path remove Last Segments 1 String pkg Name Util package Name pkg Path if pkg Name null Java Conventions validate Package Name pkg Name get Severity I Status ERROR return null return root get Package Fragment pkg Name catch Java Model Exception npe return null return null  IJavaElement determineIfOnClasspath IResource IJavaProject IPath resourcePath getFullPath IClasspathEntry isJavaFileName resourcePath lastSegment getRawClasspath JavaProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT IPath rootPath getPath rootPath resourcePath getPackageFragmentRoot rootPath isPrefixOf resourcePath isExcluded ClasspathEntry fullInclusionPatternChars ClasspathEntry fullExclusionPatternChars IPackageFragmentRoot JavaProject getFolderPackageFragmentRoot rootPath IPath pkgPath resourcePath removeFirstSegments rootPath segmentCount getType IResource pkgPath pkgPath removeLastSegments pkgName packageName pkgPath pkgName JavaConventions validatePackageName pkgName getSeverity IStatus getPackageFragment pkgName JavaModelException
public Per Project Info I Project project this tried Read false this saved State null this project project  PerProjectInfo IProject triedRead savedState
updating raw classpath need to flush obsoleted cached information about resolved entries public synchronized void update Classpath Information I Classpath Entry new Raw Classpath this raw Classpath new Raw Classpath this resolved Classpath null this resolved Path To Raw Entries null  updateClasspathInformation IClasspathEntry newRawClasspath rawClasspath newRawClasspath resolvedClasspath resolvedPathToRawEntries
public String to String String Buffer buffer new String Buffer buffer append Info for NON NLS 1 buffer append this project get Full Path buffer append n Raw classpath n NON NLS 1 if this raw Classpath null buffer append null n NON NLS 1 else for int i 0 length this raw Classpath length i length i buffer append NON NLS 1 buffer append this raw Classpath i buffer append n buffer append Resolved classpath n NON NLS 1 I Classpath Entry resolvedCP this resolved Classpath if resolvedCP null buffer append null n NON NLS 1 else for int i 0 length resolvedCP length i length i buffer append NON NLS 1 buffer append resolvedCP i buffer append n buffer append Output location n NON NLS 1 if this output Location null buffer append null NON NLS 1 else buffer append this output Location return buffer to String  toString StringBuffer StringBuffer getFullPath nRaw rawClasspath rawClasspath rawClasspath IClasspathEntry resolvedClasspath outputLocation outputLocation toString
I Problem Requestor problem Requestor I Compilation Unit working Copy public Per Working Copy Info I Compilation Unit working Copy I Problem Requestor problem Requestor this working Copy working Copy this problem Requestor problem Requestor  IProblemRequestor problemRequestor ICompilationUnit workingCopy PerWorkingCopyInfo ICompilationUnit workingCopy IProblemRequestor problemRequestor workingCopy workingCopy problemRequestor problemRequestor
this problem Requestor problem Requestor public void accept Problem I Problem problem if this problem Requestor null return this problem Requestor accept Problem problem  problemRequestor problemRequestor acceptProblem IProblem problemRequestor problemRequestor acceptProblem
this problem Requestor accept Problem problem public void begin Reporting if this problem Requestor null return this problem Requestor begin Reporting  problemRequestor acceptProblem beginReporting problemRequestor problemRequestor beginReporting
this problem Requestor begin Reporting public void end Reporting if this problem Requestor null return this problem Requestor end Reporting  problemRequestor beginReporting endReporting problemRequestor problemRequestor endReporting
this problem Requestor end Reporting public I Compilation Unit get Working Copy return this working Copy  problemRequestor endReporting ICompilationUnit getWorkingCopy workingCopy
return this working Copy public boolean is Active return this problem Requestor null this problem Requestor is Active  workingCopy isActive problemRequestor problemRequestor isActive
public String to String String Buffer buffer new String Buffer buffer append Info for NON NLS 1 buffer append Java Element working Copy to String With Ancestors buffer append n Use count NON NLS 1 buffer append this use Count buffer append n Problem requestor n NON NLS 1 buffer append this problem Requestor return buffer to String  toString StringBuffer StringBuffer JavaElement workingCopy toStringWithAncestors nUse useCount nProblem problemRequestor toString
public static class Plugin Preferences Listener implements Preferences I Property Change Listener see org eclipse core runtime Preferences I Property Change Listener property Change Preferences Property Change Event public void property Change Preferences Property Change Event event String property Name event get Property if property Name starts With CP VARIABLE PREFERENCES PREFIX String var Name property Name substring CP VARIABLE PREFERENCES PREFIX length String new Value String event get New Value if new Value null new Value new Value trim equals CP ENTRY IGNORE get Java Model Manager variables put var Name new Path new Value else get Java Model Manager variables remove var Name if property Name starts With CP CONTAINER PREFERENCES PREFIX recreate Persisted Container property Name String event get New Value false  PluginPreferencesListener IPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent propertyName getProperty propertyName startsWith CP_VARIABLE_PREFERENCES_PREFIX varName propertyName CP_VARIABLE_PREFERENCES_PREFIX newValue getNewValue newValue newValue newValue CP_ENTRY_IGNORE getJavaModelManager varName newValue getJavaModelManager varName propertyName startsWith CP_CONTAINER_PREFERENCES_PREFIX recreatePersistedContainer propertyName getNewValue
Constructs a new Java Model Manager private Java Model Manager singleton prevent others from creating a new instance  JavaModelManager JavaModelManager
Starts caching Zip Files Ignores if there are already clients public void cache Zip Files if this zip Files get null return this zip Files set new Hash Map  ZipFiles cacheZipFiles zipFiles zipFiles HashMap
public void close Zip File Zip File zip File if zip File null return if this zip Files get null return zip file will be closed by call to flush Zip Files try if Java Model Manager ZIP ACCESS VERBOSE System out println Thread current Thread Java Model Manager close Zip File Zip File Closing Zip File on zip File get Name NON NLS 1 NON NLS 2 zip File close catch IO Exception e problem occured closing zip file cannot do much more  closeZipFile ZipFile zipFile zipFile zipFiles flushZipFiles JavaModelManager ZIP_ACCESS_VERBOSE currentThread JavaModelManager closeZipFile ZipFile ZipFile zipFile getName zipFile IOException
Configure the plugin with respect to option settings defined in options file public void configure Plugin Debug Options if Java Core get Plugin is Debugging String option Platform get Debug Option BUFFER MANAGER DEBUG if option null Buffer Manager VERBOSE option equals Ignore Case true NON NLS 1 option Platform get Debug Option BUILDER DEBUG if option null Java Builder DEBUG option equals Ignore Case true NON NLS 1 option Platform get Debug Option COMPILER DEBUG if option null Compiler DEBUG option equals Ignore Case true NON NLS 1 option Platform get Debug Option COMPLETION DEBUG if option null Completion Engine DEBUG option equals Ignore Case true NON NLS 1 option Platform get Debug Option CP RESOLVE DEBUG if option null Java Model Manager CP RESOLVE VERBOSE option equals Ignore Case true NON NLS 1 option Platform get Debug Option DELTA DEBUG if option null Delta Processor DEBUG option equals Ignore Case true NON NLS 1 option Platform get Debug Option DELTA DEBUG VERBOSE if option null Delta Processor VERBOSE option equals Ignore Case true NON NLS 1 option Platform get Debug Option HIERARCHY DEBUG if option null Type Hierarchy DEBUG option equals Ignore Case true NON NLS 1 option Platform get Debug Option INDEX MANAGER DEBUG if option null Job Manager VERBOSE option equals Ignore Case true NON NLS 1 option Platform get Debug Option JAVAMODEL DEBUG if option null Java Model Manager VERBOSE option equals Ignore Case true NON NLS 1 option Platform get Debug Option POST ACTION DEBUG if option null Java Model Operation POST ACTION VERBOSE option equals Ignore Case true NON NLS 1 option Platform get Debug Option SEARCH DEBUG if option null Search Engine VERBOSE option equals Ignore Case true NON NLS 1 option Platform get Debug Option SELECTION DEBUG if option null Selection Engine DEBUG option equals Ignore Case true NON NLS 1 option Platform get Debug Option ZIP ACCESS DEBUG if option null Java Model Manager ZIP ACCESS VERBOSE option equals Ignore Case true NON NLS 1  configurePluginDebugOptions JavaCore getPlugin isDebugging getDebugOption BUFFER_MANAGER_DEBUG BufferManager equalsIgnoreCase getDebugOption BUILDER_DEBUG JavaBuilder equalsIgnoreCase getDebugOption COMPILER_DEBUG equalsIgnoreCase getDebugOption COMPLETION_DEBUG CompletionEngine equalsIgnoreCase getDebugOption CP_RESOLVE_DEBUG JavaModelManager CP_RESOLVE_VERBOSE equalsIgnoreCase getDebugOption DELTA_DEBUG DeltaProcessor equalsIgnoreCase getDebugOption DELTA_DEBUG_VERBOSE DeltaProcessor equalsIgnoreCase getDebugOption HIERARCHY_DEBUG TypeHierarchy equalsIgnoreCase getDebugOption INDEX_MANAGER_DEBUG JobManager equalsIgnoreCase getDebugOption JAVAMODEL_DEBUG JavaModelManager equalsIgnoreCase getDebugOption POST_ACTION_DEBUG JavaModelOperation POST_ACTION_VERBOSE equalsIgnoreCase getDebugOption SEARCH_DEBUG SearchEngine equalsIgnoreCase getDebugOption SELECTION_DEBUG SelectionEngine equalsIgnoreCase getDebugOption ZIP_ACCESS_DEBUG JavaModelManager ZIP_ACCESS_VERBOSE equalsIgnoreCase
public int discard Per Working Copy Info Compilation Unit working Copy throws Java Model Exception create the delta builder this remembers the current content of the working copy outside the per Working Copy Infos lock see bug 50667 Java Element Delta Builder delta Builder null if working Copy is Primary delta Builder new Java Element Delta Builder working Copy Per Working Copy Info info null synchronized per Working Copy Infos Working Copy Owner owner working Copy owner Map working Copy To Infos Map this per Working Copy Infos get owner if working Copy To Infos null return 1 info Per Working Copy Info working Copy To Infos get working Copy if info null return 1 if info use Count 0 remove per working copy info working Copy To Infos remove working Copy if working Copy To Infos is Empty this per Working Copy Infos remove owner if info use Count 0 info cannot be null here check was done above remove infos close buffer since no longer working copy outside the per Working Copy Infos lock see bug 50667 remove Info And Children working Copy working Copy close Buffer compute the delta if needed and register it if there are changes if delta Builder null delta Builder build Deltas if delta Builder delta null delta Builder delta get Affected Children length 0 get Delta Processor register Java Model Delta delta Builder delta return info use Count  discardPerWorkingCopyInfo CompilationUnit workingCopy JavaModelException perWorkingCopyInfos JavaElementDeltaBuilder deltaBuilder workingCopy isPrimary deltaBuilder JavaElementDeltaBuilder workingCopy PerWorkingCopyInfo perWorkingCopyInfos WorkingCopyOwner workingCopy workingCopyToInfos perWorkingCopyInfos workingCopyToInfos PerWorkingCopyInfo workingCopyToInfos workingCopy useCount workingCopyToInfos workingCopy workingCopyToInfos isEmpty perWorkingCopyInfos useCount perWorkingCopyInfos removeInfoAndChildren workingCopy workingCopy closeBuffer deltaBuilder deltaBuilder buildDeltas deltaBuilder deltaBuilder getAffectedChildren getDeltaProcessor registerJavaModelDelta deltaBuilder useCount
see I Save Participant public void done Saving I Save Context context nothing to do for jdt core  ISaveParticipant doneSaving ISaveContext
Flushes Zip Files cache if there are no more clients public void flush Zip Files Thread current Thread Thread current Thread Hash Map map Hash Map this zip Files get if map null return this zip Files set null Iterator iterator map values iterator while iterator has Next try Zip File zip File Zip File iterator next if Java Model Manager ZIP ACCESS VERBOSE System out println current Thread Java Model Manager flush Zip Files Closing Zip File on zip File get Name NON NLS 1 NON NLS 2 zip File close catch IO Exception e problem occured closing zip file cannot do much more  ZipFiles flushZipFiles currentThread currentThread HashMap HashMap zipFiles zipFiles hasNext ZipFile zipFile ZipFile JavaModelManager ZIP_ACCESS_VERBOSE currentThread JavaModelManager flushZipFiles ZipFile zipFile getName zipFile IOException
public I Classpath Container get Classpath Container I Path container Path I Java Project project throws Java Model Exception I Classpath Container container container Get project container Path if container null if this batch Container Initializations avoid deep recursion while initializaing container on workspace restart see https bugs eclipse org bugs show bug cgi id 60437 this batch Container Initializations false return initialize All Containers project container Path return initialize Container project container Path return container  IClasspathContainer getClasspathContainer IPath containerPath IJavaProject JavaModelException IClasspathContainer containerGet containerPath batchContainerInitializations show_bug batchContainerInitializations initializeAllContainers containerPath initializeContainer containerPath
public Delta Processor get Delta Processor return this delta State get Delta Processor  DeltaProcessor getDeltaProcessor deltaState getDeltaProcessor
Returns the set of elements which are out of synch with their buffers protected Map get Elements Out Of Synch With Buffers return this elements Out Of Synch With Buffers  getElementsOutOfSynchWithBuffers elementsOutOfSynchWithBuffers
public Index Manager get Index Manager return this index Manager  IndexManager getIndexManager indexManager
Returns the info for the element public synchronized Object get Info I Java Element element Hash Map temp Cache Hash Map this temporary Cache get if temp Cache null Object result temp Cache get element if result null return result return this cache get Info element  getInfo IJavaElement HashMap tempCache HashMap temporaryCache tempCache tempCache getInfo
Returns the handle to the active Java Model public final Java Model get Java Model return java Model  JavaModel getJavaModel javaModel
Returns the singleton Java Model Manager public final static Java Model Manager get Java Model Manager return MANAGER  JavaModelManager JavaModelManager getJavaModelManager
Returns the last built state for the given project or null if there is none Deserializes the state if necessary For use by image builder and evaluation support only public Object get Last Built State I Project project I Progress Monitor monitor if Java Project has Java Nature project return null should never be requested on non Java projects Per Project Info info get Per Project Info project true create if missing if info tried Read info tried Read true try if monitor null monitor sub Task Util bind build read State Progress project get Name NON NLS 1 info saved State read State project catch Core Exception e e print Stack Trace return info saved State  getLastBuiltState IProject IProgressMonitor JavaProject hasJavaNature PerProjectInfo getPerProjectInfo triedRead triedRead subTask readStateProgress getName savedState readState CoreException printStackTrace savedState
public Per Project Info get Per Project Info I Project project boolean create synchronized per Project Infos use the per Project Info collection as its own lock Per Project Info info Per Project Info per Project Infos get project if info null create info new Per Project Info project per Project Infos put project info return info  PerProjectInfo getPerProjectInfo IProject perProjectInfos perProjectInfo PerProjectInfo PerProjectInfo perProjectInfos PerProjectInfo perProjectInfos
public Per Project Info get Per Project Info Check Existence I Project project throws Java Model Exception Java Model Manager Per Project Info info get Per Project Info project false don t create info if info null if Java Project has Java Nature project throw Java Project Java Core create project new Not Present Exception info get Per Project Info project true create info return info  PerProjectInfo getPerProjectInfoCheckExistence IProject JavaModelException JavaModelManager PerProjectInfo getPerProjectInfo JavaProject hasJavaNature JavaProject JavaCore newNotPresentException getPerProjectInfo
public Per Working Copy Info get Per Working Copy Info Compilation Unit working Copy boolean create boolean record Usage I Problem Requestor problem Requestor synchronized per Working Copy Infos use the per Working Copy Info collection as its own lock Working Copy Owner owner working Copy owner Map working Copy To Infos Map this per Working Copy Infos get owner if working Copy To Infos null create working Copy To Infos new Hash Map this per Working Copy Infos put owner working Copy To Infos Per Working Copy Info info working Copy To Infos null null Per Working Copy Info working Copy To Infos get working Copy if info null create info new Per Working Copy Info working Copy problem Requestor working Copy To Infos put working Copy info if info null record Usage info use Count return info  PerWorkingCopyInfo getPerWorkingCopyInfo CompilationUnit workingCopy recordUsage IProblemRequestor problemRequestor perWorkingCopyInfos perWorkingCopyInfo WorkingCopyOwner workingCopy workingCopyToInfos perWorkingCopyInfos workingCopyToInfos workingCopyToInfos HashMap perWorkingCopyInfos workingCopyToInfos PerWorkingCopyInfo workingCopyToInfos PerWorkingCopyInfo workingCopyToInfos workingCopy PerWorkingCopyInfo workingCopy problemRequestor workingCopyToInfos workingCopy recordUsage useCount
Returns a persisted container from previous session if any Note that it is not the original container from previous session i e it did not get serialized but rather a summary of its entries recreated for CP initialization purpose As such it should not be stored into container caches public I Classpath Container get Previous Session Container I Path container Path I Java Project project Map previous Container Values Map this previous Session Containers get project if previous Container Values null I Classpath Container previous Container I Classpath Container previous Container Values get container Path if previous Container null if Java Model Manager CP RESOLVE VERBOSE String Buffer buffer new String Buffer buffer append CP Container INIT reentering access to project container during its initialization will see previous value n NON NLS 1 buffer append project project get Element Name n NON NLS 1 buffer append container path container Path n NON NLS 1 buffer append previous value NON NLS 1 buffer append previous Container get Description buffer append n NON NLS 1 I Classpath Entry entries previous Container get Classpath Entries if entries null for int j 0 j entries length j buffer append NON NLS 1 buffer append entries j buffer append n buffer append NON NLS 1 Util verbose buffer to String new Exception Fake exception print Stack Trace System out NON NLS 1 return previous Container return null break cycle if none found  IClasspathContainer getPreviousSessionContainer IPath containerPath IJavaProject previousContainerValues previousSessionContainers previousContainerValues IClasspathContainer previousContainer IClasspathContainer previousContainerValues containerPath previousContainer JavaModelManager CP_RESOLVE_VERBOSE StringBuffer StringBuffer CPContainer getElementName containerPath previousContainer getDescription IClasspathEntry previousContainer getClasspathEntries toString printStackTrace previousContainer
Returns a persisted container from previous session if any public I Path get Previous Session Variable String variable Name I Path previous Path I Path this previous Session Variables get variable Name if previous Path null if CP RESOLVE VERBOSE Util verbose CP Variable INIT reentering access to variable during its initialization will see previous value n NON NLS 1 variable variable Name n NON NLS 1 previous value previous Path NON NLS 1 new Exception Fake exception print Stack Trace System out NON NLS 1 return previous Path return null break cycle  IPath getPreviousSessionVariable variableName IPath previousPath IPath previousSessionVariables variableName previousPath CP_RESOLVE_VERBOSE CPVariable variableName previousPath printStackTrace previousPath
Returns the temporary cache for newly opened elements for the current thread Creates it if not already created public Hash Map get Temporary Cache Hash Map result Hash Map this temporary Cache get if result null result new Hash Map this temporary Cache set result return result  HashMap getTemporaryCache HashMap HashMap temporaryCache HashMap temporaryCache
Returns the name of the variables for which an CP variable initializer is registered through an extension point public static String get Registered Variable Names Plugin jdt Core Plugin Java Core get Plugin if jdt Core Plugin null return null Array List variable List new Array List 5 I Extension Point extension Platform get Extension Registry get Extension Point Java Core PLUGIN ID Java Model Manager CPVARIABLE INITIALIZER EXTPOINT ID if extension null I Extension extensions extension get Extensions for int i 0 i extensions length i I Configuration Element config Elements extensions i get Configuration Elements for int j 0 j config Elements length j String var Attribute config Elements j get Attribute variable NON NLS 1 if var Attribute null variable List add var Attribute String variable Names new String variable List size variable List to Array variable Names return variable Names  getRegisteredVariableNames jdtCorePlugin JavaCore getPlugin jdtCorePlugin ArrayList variableList ArrayList IExtensionPoint getExtensionRegistry getExtensionPoint JavaCore PLUGIN_ID JavaModelManager CPVARIABLE_INITIALIZER_EXTPOINT_ID IExtension getExtensions IConfigurationElement configElements getConfigurationElements configElements varAttribute configElements getAttribute varAttribute variableList varAttribute variableNames variableList variableList toArray variableNames variableNames
Returns the name of the container I Ds for which an CP container initializer is registered through an extension point public static String get Registered ContainerI Ds Plugin jdt Core Plugin Java Core get Plugin if jdt Core Plugin null return null Array List containerID List new Array List 5 I Extension Point extension Platform get Extension Registry get Extension Point Java Core PLUGIN ID Java Model Manager CPCONTAINER INITIALIZER EXTPOINT ID if extension null I Extension extensions extension get Extensions for int i 0 i extensions length i I Configuration Element config Elements extensions i get Configuration Elements for int j 0 j config Elements length j String id Attribute config Elements j get Attribute id NON NLS 1 if id Attribute null containerID List add id Attribute String containerI Ds new String containerID List size containerID List to Array containerI Ds return containerI Ds  IDs getRegisteredContainerIDs jdtCorePlugin JavaCore getPlugin jdtCorePlugin ArrayList containerIDList ArrayList IExtensionPoint getExtensionRegistry getExtensionPoint JavaCore PLUGIN_ID JavaModelManager CPCONTAINER_INITIALIZER_EXTPOINT_ID IExtension getExtensions IConfigurationElement configElements getConfigurationElements configElements idAttribute configElements getAttribute idAttribute containerIDList idAttribute containerIDs containerIDList containerIDList toArray containerIDs containerIDs
Returns the File to use for saving and restoring the last built state for the given project private File get Serialization File I Project project if project exists return null I Path working Location project get Working Location Java Core PLUGIN ID return working Location append state dat to File NON NLS 1  getSerializationFile IProject IPath workingLocation getWorkingLocation JavaCore PLUGIN_ID workingLocation toFile
public I Compilation Unit get Working Copies Working Copy Owner owner boolean add Primary synchronized per Working Copy Infos I Compilation Unit primaryW Cs add Primary owner Default Working Copy Owner PRIMARY get Working Copies Default Working Copy Owner PRIMARY false null Map working Copy To Infos Map per Working Copy Infos get owner if working Copy To Infos null return primaryW Cs int primary Length primaryW Cs null 0 primaryW Cs length int size working Copy To Infos size note size is 0 otherwise path To Per Working Copy Infos would be null I Compilation Unit result new I Compilation Unit primary Length size if primaryW Cs null System arraycopy primaryW Cs 0 result 0 primary Length Iterator iterator working Copy To Infos values iterator int index primary Length while iterator has Next result index Java Model Manager Per Working Copy Info iterator next get Working Copy return result  ICompilationUnit getWorkingCopies WorkingCopyOwner addPrimary perWorkingCopyInfos ICompilationUnit primaryWCs addPrimary DefaultWorkingCopyOwner getWorkingCopies DefaultWorkingCopyOwner workingCopyToInfos perWorkingCopyInfos workingCopyToInfos primaryWCs primaryLength primaryWCs primaryWCs workingCopyToInfos pathToPerWorkingCopyInfos ICompilationUnit ICompilationUnit primaryLength primaryWCs primaryWCs primaryLength workingCopyToInfos primaryLength hasNext JavaModelManager PerWorkingCopyInfo getWorkingCopy
Returns the open Zip File at the given location If the Zip File does not yet exist it is created opened and added to the cache of open Zip Files The path must be absolute exception Core Exception If unable to create open the Zip File public Zip File get Zip File I Path path throws Core Exception Hash Map map Zip File zip File if map Hash Map this zip Files get null zip File Zip File map get path null return zip File String file System Path null I Workspace Root root Resources Plugin get Workspace get Root I Resource file root find Member path if file null internal resource I Path location if file get Type I Resource FILE location file get Location null throw new Core Exception new Status I Status ERROR Java Core PLUGIN ID 1 Util bind file not Found path to String null NON NLS 1 file System Path location toOS String else external resource file System Path path toOS String try if ZIP ACCESS VERBOSE System out println Thread current Thread Java Model Manager get Zip File I Path Creating Zip File on file System Path NON NLS 1 NON NLS 2 zip File new Zip File file System Path if map null map put path zip File return zip File catch IO Exception e throw new Core Exception new Status I Status ERROR Java Core PLUGIN ID 1 Util bind status IO Exception e NON NLS 1  ZipFile ZipFile ZipFiles CoreException ZipFile ZipFile getZipFile IPath CoreException HashMap ZipFile zipFile HashMap zipFiles zipFile ZipFile zipFile fileSystemPath IWorkspaceRoot ResourcesPlugin getWorkspace getRoot IResource findMember IPath getType IResource getLocation CoreException IStatus JavaCore PLUGIN_ID notFound toString fileSystemPath toOSString fileSystemPath toOSString ZIP_ACCESS_VERBOSE currentThread JavaModelManager getZipFile IPath ZipFile fileSystemPath zipFile ZipFile fileSystemPath zipFile zipFile IOException CoreException IStatus JavaCore PLUGIN_ID IOException
Returns whether there is a temporary cache for the current thread public boolean has Temporary Cache return this temporary Cache get null  hasTemporaryCache temporaryCache
private I Classpath Container initialize All Containers I Java Project java Project To Init I Path container To Init throws Java Model Exception if CP RESOLVE VERBOSE Util verbose CP Container INIT batching containers initialization n NON NLS 1 project to init java Project To Init get Element Name n NON NLS 1 container path to init container To Init NON NLS 1 collect all container paths Hash Map all Container Paths new Hash Map I Project projects Resources Plugin get Workspace get Root get Projects for int i 0 length projects length i length i I Project project projects i if Java Project has Java Nature project continue I Java Project java Project new Java Project project get Java Model Hash Set paths null I Classpath Entry raw Classpath java Project get Raw Classpath for int j 0 length2 raw Classpath length j length2 j I Classpath Entry entry raw Classpath j I Path path entry get Path if entry get Entry Kind I Classpath Entry CPE CONTAINER container Get java Project path null if paths null paths new Hash Set all Container Paths put java Project paths paths add path if java Project equals java Project To Init if paths null paths new Hash Set all Container Paths put java Project paths paths add container To Init mark all containers as being initialized this container Initialization In Progress set all Container Paths initialize all containers boolean ok false try Set keys all Container Paths key Set int length keys size I Java Project java Projects new I Java Project length clone as the following will have a side effect keys to Array java Projects for int i 0 i length i I Java Project java Project java Projects i Hash Set path Set Hash Set all Container Paths get java Project if path Set null continue int length2 path Set size I Path paths new I Path length2 path Set to Array paths clone as the following will have a side effect for int j 0 j length2 j I Path path paths j initialize Container java Project path ok true finally if ok if we re being traversed by an exception ensure that that containers are no longer marked as initialization in progress see https bugs eclipse org bugs show bug cgi id 66437 this container Initialization In Progress set null return container Get java Project To Init container To Init  IClasspathContainer initializeAllContainers IJavaProject javaProjectToInit IPath containerToInit JavaModelException CP_RESOLVE_VERBOSE CPContainer javaProjectToInit getElementName containerToInit HashMap allContainerPaths HashMap IProject ResourcesPlugin getWorkspace getRoot getProjects IProject JavaProject hasJavaNature IJavaProject javaProject JavaProject getJavaModel HashSet IClasspathEntry rawClasspath javaProject getRawClasspath rawClasspath IClasspathEntry rawClasspath IPath getPath getEntryKind IClasspathEntry CPE_CONTAINER containerGet javaProject HashSet allContainerPaths javaProject javaProject javaProjectToInit HashSet allContainerPaths javaProject containerToInit containerInitializationInProgress allContainerPaths allContainerPaths keySet IJavaProject javaProjects IJavaProject toArray javaProjects IJavaProject javaProject javaProjects HashSet pathSet HashSet allContainerPaths javaProject pathSet pathSet IPath IPath pathSet toArray IPath initializeContainer javaProject show_bug containerInitializationInProgress containerGet javaProjectToInit containerToInit
private I Classpath Container initialize Container I Java Project project I Path container Path throws Java Model Exception I Classpath Container container null final Classpath Container Initializer initializer Java Core get Classpath Container Initializer container Path segment 0 if initializer null if CP RESOLVE VERBOSE Util verbose CP Container INIT triggering initialization n NON NLS 1 project project get Element Name n NON NLS 1 container path container Path n NON NLS 1 initializer initializer n NON NLS 1 invocation stack trace NON NLS 1 new Exception Fake exception print Stack Trace System out NON NLS 1 container Put project container Path CONTAINER INITIALIZATION IN PROGRESS avoid initialization cycles boolean ok false try let Operation Canceled Exception go through see https bugs eclipse org bugs show bug cgi id 59363 initializer initialize container Path project retrieve value if initialization was successful container container Get project container Path if container CONTAINER INITIALIZATION IN PROGRESS return null break cycle ok true catch Core Exception e if e instanceof Java Model Exception throw Java Model Exception e else throw new Java Model Exception e catch Runtime Exception e if Java Model Manager CP RESOLVE VERBOSE e print Stack Trace throw e catch Error e if Java Model Manager CP RESOLVE VERBOSE e print Stack Trace throw e finally if ok container Put project container Path null flush cache if CP RESOLVE VERBOSE if container CONTAINER INITIALIZATION IN PROGRESS Util verbose CP Container INIT FAILED initializer did not initialize container n NON NLS 1 project project get Element Name n NON NLS 1 container path container Path n NON NLS 1 initializer initializer NON NLS 1 else Util verbose CP Container INIT FAILED see exception above n NON NLS 1 project project get Element Name n NON NLS 1 container path container Path n NON NLS 1 initializer initializer NON NLS 1 if CP RESOLVE VERBOSE String Buffer buffer new String Buffer buffer append CP Container INIT after resolution n NON NLS 1 buffer append project project get Element Name n NON NLS 1 buffer append container path container Path n NON NLS 1 if container null buffer append container container get Description n NON NLS 2 NON NLS 1 I Classpath Entry entries container get Classpath Entries if entries null for int i 0 i entries length i buffer append entries i n NON NLS 1 buffer append NON NLS 1 else buffer append container unbound NON NLS 1 Util verbose buffer to String else if CP RESOLVE VERBOSE Util verbose CP Container INIT no initializer found n NON NLS 1 project project get Element Name n NON NLS 1 container path container Path NON NLS 1 return container  IClasspathContainer initializeContainer IJavaProject IPath containerPath JavaModelException IClasspathContainer ClasspathContainerInitializer JavaCore getClasspathContainerInitializer containerPath CP_RESOLVE_VERBOSE CPContainer getElementName containerPath printStackTrace containerPut containerPath CONTAINER_INITIALIZATION_IN_PROGRESS OperationCanceledException show_bug containerPath containerGet containerPath CONTAINER_INITIALIZATION_IN_PROGRESS CoreException JavaModelException JavaModelException JavaModelException RuntimeException JavaModelManager CP_RESOLVE_VERBOSE printStackTrace JavaModelManager CP_RESOLVE_VERBOSE printStackTrace containerPut containerPath CP_RESOLVE_VERBOSE CONTAINER_INITIALIZATION_IN_PROGRESS CPContainer getElementName containerPath CPContainer getElementName containerPath CP_RESOLVE_VERBOSE StringBuffer StringBuffer CPContainer getElementName containerPath getDescription IClasspathEntry getClasspathEntries toString CP_RESOLVE_VERBOSE CPContainer getElementName containerPath
private Hash Set get Classpath Being Resolved Hash Set result Hash Set this classpaths Being Resolved get if result null result new Hash Set this classpaths Being Resolved set result return result  HashSet getClasspathBeingResolved HashSet HashSet classpathsBeingResolved HashSet classpathsBeingResolved
public boolean is Classpath Being Resolved I Java Project project return get Classpath Being Resolved contains project  isClasspathBeingResolved IJavaProject getClasspathBeingResolved
public void set Classpath Being Resolved I Java Project project boolean classpath Is Resolved if classpath Is Resolved get Classpath Being Resolved add project else get Classpath Being Resolved remove project  setClasspathBeingResolved IJavaProject classpathIsResolved classpathIsResolved getClasspathBeingResolved getClasspathBeingResolved
public void load Variables And Containers throws Core Exception backward compatibility consider persistent property Qualified Name q Name new Qualified Name Java Core PLUGIN ID variables NON NLS 1 String xml String Resources Plugin get Workspace get Root get Persistent Property q Name try if xml String null String Reader reader new String Reader xml String Element cp Element try Document Builder parser Document Builder Factory new Instance new Document Builder cp Element parser parse new Input Source reader get Document Element catch SAX Exception e return catch Parser Configuration Exception e return finally reader close if cp Element null return if cp Element get Node Name equals Ignore Case variables NON NLS 1 return Node List list cp Element get Child Nodes int length list get Length for int i 0 i length i Node node list item i short type node get Node Type if type Node ELEMENT NODE Element element Element node if element get Node Name equals Ignore Case variable NON NLS 1 variable Put element get Attribute name NON NLS 1 new Path element get Attribute path NON NLS 1 catch IO Exception e problem loading xml file nothing we can do finally if xml String null Resources Plugin get Workspace get Root set Persistent Property q Name null flush old one load variables and containers from preferences into cache Preferences preferences Java Core get Plugin get Plugin Preferences only get variable from preferences not set to their default String property Names preferences property Names int variable Prefix Length CP VARIABLE PREFERENCES PREFIX length for int i 0 i property Names length i String property Name property Names i if property Name starts With CP VARIABLE PREFERENCES PREFIX String var Name property Name substring variable Prefix Length I Path var Path new Path preferences get String property Name trim this variables put var Name var Path this previous Session Variables put var Name var Path if property Name starts With CP CONTAINER PREFERENCES PREFIX recreate Persisted Container property Name preferences get String property Name true add to container values override persisted values for variables which have a registered initializer String registered Variables get Registered Variable Names for int i 0 i registered Variables length i String var Name registered Variables i this variables put var Name null reset variable but leave its entry in the Map so it will be part of variable names override persisted values for containers which have a registered initializer containers Reset get Registered ContainerI Ds  loadVariablesAndContainers CoreException QualifiedName qName QualifiedName JavaCore PLUGIN_ID xmlString ResourcesPlugin getWorkspace getRoot getPersistentProperty qName xmlString StringReader StringReader xmlString cpElement DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder cpElement InputSource getDocumentElement SAXException ParserConfigurationException cpElement cpElement getNodeName equalsIgnoreCase NodeList cpElement getChildNodes getLength getNodeType ELEMENT_NODE getNodeName equalsIgnoreCase variablePut getAttribute getAttribute IOException xmlString ResourcesPlugin getWorkspace getRoot setPersistentProperty qName JavaCore getPlugin getPluginPreferences propertyNames propertyNames variablePrefixLength CP_VARIABLE_PREFERENCES_PREFIX propertyNames propertyName propertyNames propertyName startsWith CP_VARIABLE_PREFERENCES_PREFIX varName propertyName variablePrefixLength IPath varPath getString propertyName varName varPath previousSessionVariables varName varPath propertyName startsWith CP_CONTAINER_PREFERENCES_PREFIX recreatePersistedContainer propertyName getString propertyName registeredVariables getRegisteredVariableNames registeredVariables varName registeredVariables varName containersReset getRegisteredContainerIDs
Returns the info for this element without disturbing the cache ordering protected synchronized Object peek At Info I Java Element element Hash Map temp Cache Hash Map this temporary Cache get if temp Cache null Object result temp Cache get element if result null return result return this cache peek At Info element  peekAtInfo IJavaElement HashMap tempCache HashMap temporaryCache tempCache tempCache peekAtInfo
see I Save Participant public void prepare To Save I Save Context context throws Core Exception nothing to do  ISaveParticipant prepareToSave ISaveContext CoreException
protected synchronized void put Infos I Java Element opened Element Map new Elements remove children Object existing Info this cache peek At Info opened Element if opened Element instanceof I Parent existing Info instanceof Java Element Info I Java Element children Java Element Info existing Info get Children for int i 0 size children length i size i Java Element child Java Element children i try child close catch Java Model Exception e ignore Iterator iterator new Elements key Set iterator while iterator has Next I Java Element element I Java Element iterator next Object info new Elements get element this cache put Info element info  putInfos IJavaElement openedElement newElements existingInfo peekAtInfo openedElement openedElement IParent existingInfo JavaElementInfo IJavaElement JavaElementInfo existingInfo getChildren JavaElement JavaElement JavaModelException newElements keySet hasNext IJavaElement IJavaElement newElements putInfo
Reads the build state for the relevant project protected Object read State I Project project throws Core Exception File file get Serialization File project if file null file exists try Data Input Stream in new Data Input Stream new Buffered Input Stream new File Input Stream file try String pluginID in readUTF if pluginID equals Java Core PLUGIN ID throw new IO Exception Util bind build wrong File Format NON NLS 1 String kind in readUTF if kind equals STATE NON NLS 1 throw new IO Exception Util bind build wrong File Format NON NLS 1 if in read Boolean return Java Builder read State project in if Java Builder DEBUG System out println Saved state thinks last build failed for project get Name NON NLS 1 finally in close catch Exception e e print Stack Trace throw new Core Exception new Status I Status ERROR Java Core PLUGIN ID Platform PLUGIN ERROR Error reading last build state for project project get Name e NON NLS 1 return null  readState IProject CoreException getSerializationFile DataInputStream DataInputStream BufferedInputStream FileInputStream JavaCore PLUGIN_ID IOException wrongFileFormat IOException wrongFileFormat readBoolean JavaBuilder readState JavaBuilder getName printStackTrace CoreException IStatus JavaCore PLUGIN_ID PLUGIN_ERROR getName
if container Entries null container Entries Java Project INVALID CLASSPATH I Classpath Container container new I Classpath Container public I Classpath Entry get Classpath Entries return container Entries  containerEntries containerEntries JavaProject INVALID_CLASSPATH IClasspathContainer IClasspathContainer IClasspathEntry getClasspathEntries containerEntries
return container Entries public String get Description return Persisted container container Path for project project Name NON NLS 1 NON NLS 2 NON NLS 3  containerEntries getDescription containerPath projectName
return Persisted container container Path for project project Name NON NLS 1 NON NLS 2 NON NLS 3 public int get Kind return 0  containerPath projectName getKind
return 0 public I Path get Path return container Path  IPath getPath containerPath
return container Path public String to String return get Description  containerPath toString getDescription
public static void recreate Persisted Container String property Name String container String boolean add To Container Values int container Prefix Length CP CONTAINER PREFERENCES PREFIX length int index property Name index Of container Prefix Length if container String null container String container String trim if index 0 final String project Name property Name substring container Prefix Length index trim Java Project project Java Project get Java Model Manager get Java Model get Java Project project Name final I Path container Path new Path property Name substring index 1 trim if container String null container String equals CP ENTRY IGNORE get Java Model Manager container Put project container Path null else final I Classpath Entry container Entries project decode Classpath container String false false if container Entries null container Entries Java Project INVALID CLASSPATH I Classpath Container container new I Classpath Container public I Classpath Entry get Classpath Entries return container Entries public String get Description return Persisted container container Path for project project Name NON NLS 1 NON NLS 2 NON NLS 3 public int get Kind return 0 public I Path get Path return container Path public String to String return get Description if add To Container Values get Java Model Manager container Put project container Path container Map project Containers Map get Java Model Manager previous Session Containers get project if project Containers null project Containers new Hash Map 1 get Java Model Manager previous Session Containers put project project Containers project Containers put container Path container  recreatePersistedContainer propertyName containerString addToContainerValues containerPrefixLength CP_CONTAINER_PREFERENCES_PREFIX propertyName indexOf containerPrefixLength containerString containerString containerString projectName propertyName containerPrefixLength JavaProject JavaProject getJavaModelManager getJavaModel getJavaProject projectName IPath containerPath propertyName containerString containerString CP_ENTRY_IGNORE getJavaModelManager containerPut containerPath IClasspathEntry containerEntries decodeClasspath containerString containerEntries containerEntries JavaProject INVALID_CLASSPATH IClasspathContainer IClasspathContainer IClasspathEntry getClasspathEntries containerEntries getDescription containerPath projectName getKind IPath getPath containerPath toString getDescription addToContainerValues getJavaModelManager containerPut containerPath projectContainers getJavaModelManager previousSessionContainers projectContainers projectContainers HashMap getJavaModelManager previousSessionContainers projectContainers projectContainers containerPath
Remembers the given scope in a weak set so no need to remove it it will be removed by the garbage collector public void remember Scope Abstract Search Scope scope NB The value has to be null so as to not create a strong reference on the scope this search Scopes put scope null  rememberScope AbstractSearchScope searchScopes
public synchronized Object remove Info And Children Java Element element throws Java Model Exception Object info this cache peek At Info element if info null boolean was Verbose false try if VERBOSE System out println CLOSING Element Thread current Thread element to String With Ancestors NON NLS 1 NON NLS 2 was Verbose true VERBOSE false element closing info if element instanceof I Parent info instanceof Java Element Info I Java Element children Java Element Info info get Children for int i 0 size children length i size i Java Element child Java Element children i child close this cache remove Info element if was Verbose System out println Package cache size this cache pkg Size NON NLS 1 System out println Openable cache filling ratio Number Format get Instance format this cache openable Filling Ratio NON NLS 1 NON NLS 2 finally Java Model Manager VERBOSE was Verbose return info return null  removeInfoAndChildren JavaElement JavaModelException peekAtInfo wasVerbose currentThread toStringWithAncestors wasVerbose IParent JavaElementInfo IJavaElement JavaElementInfo getChildren JavaElement JavaElement removeInfo wasVerbose pkgSize NumberFormat getInstance openableFillingRatio JavaModelManager wasVerbose
public void remove Per Project Info Java Project java Project synchronized per Project Infos use the per Project Info collection as its own lock I Project project java Project get Project Per Project Info info Per Project Info per Project Infos get project if info null per Project Infos remove project  removePerProjectInfo JavaProject javaProject perProjectInfos perProjectInfo IProject javaProject getProject PerProjectInfo PerProjectInfo perProjectInfos perProjectInfos
Resets the temporary cache for newly created elements to null public void reset Temporary Cache this temporary Cache set null  resetTemporaryCache temporaryCache
see I Save Participant public void rollback I Save Context context nothing to do  ISaveParticipant ISaveContext
private void save State Per Project Info info I Save Context context throws Core Exception passed this point save actions are non trivial if context get Kind I Save Context SNAPSHOT return save built state if info tried Read save Built State info  saveState PerProjectInfo ISaveContext CoreException getKind ISaveContext triedRead saveBuiltState
Saves the built state for the project private void save Built State Per Project Info info throws Core Exception if Java Builder DEBUG System out println Util bind build save State Progress info project get Name NON NLS 1 File file get Serialization File info project if file null return long t System current Time Millis try Data Output Stream out new Data Output Stream new Buffered Output Stream new File Output Stream file try out writeUTF Java Core PLUGIN ID out writeUTF STATE NON NLS 1 if info saved State null out write Boolean false else out write Boolean true Java Builder write State info saved State out finally out close catch Runtime Exception e try file delete catch Security Exception se could not delete file cannot do much more throw new Core Exception new Status I Status ERROR Java Core PLUGIN ID Platform PLUGIN ERROR Util bind build cannot Save State info project get Name e NON NLS 1 catch IO Exception e try file delete catch Security Exception se could not delete file cannot do much more throw new Core Exception new Status I Status ERROR Java Core PLUGIN ID Platform PLUGIN ERROR Util bind build cannot Save State info project get Name e NON NLS 1 if Java Builder DEBUG t System current Time Millis t System out println Util bind build save State Complete String value Of t NON NLS 1  saveBuiltState PerProjectInfo CoreException JavaBuilder saveStateProgress getName getSerializationFile currentTimeMillis DataOutputStream DataOutputStream BufferedOutputStream FileOutputStream JavaCore PLUGIN_ID savedState writeBoolean writeBoolean JavaBuilder writeState savedState RuntimeException SecurityException CoreException IStatus JavaCore PLUGIN_ID PLUGIN_ERROR cannotSaveState getName IOException SecurityException CoreException IStatus JavaCore PLUGIN_ID PLUGIN_ERROR cannotSaveState getName JavaBuilder currentTimeMillis saveStateComplete valueOf
see I Save Participant public void saving I Save Context context throws Core Exception save container values on snapshot full save Preferences preferences Java Core get Plugin get Plugin Preferences I Java Project projects get Java Model get Java Projects for int i 0 length projects length i length i I Java Project project projects i clone while iterating see https bugs eclipse org bugs show bug cgi id 59638 Map project Containers container Clone project if project Containers null continue for Iterator keys project Containers key Set iterator keys has Next I Path container Path I Path keys next I Classpath Container container I Classpath Container project Containers get container Path String container Key CP CONTAINER PREFERENCES PREFIX project get Element Name container Path NON NLS 1 String container String CP ENTRY IGNORE try if container null container String Java Project project encode Classpath container get Classpath Entries null false catch Java Model Exception e could not encode entry leave it as CP ENTRY IGNORE preferences set Default container Key CP ENTRY IGNORE use this default to get rid of removed ones preferences set Value container Key container String Java Core get Plugin save Plugin Preferences if context get Kind I Save Context FULL SAVE will need delta since this save see https bugs eclipse org bugs show bug cgi id 38658 context need Delta clean up indexes on workspace full save see https bugs eclipse org bugs show bug cgi id 52347 Index Manager manager this index Manager if manager null manager clean Up Indexes I Project saved Project context get Project if saved Project null if Java Project has Java Nature saved Project return ignore Per Project Info info get Per Project Info saved Project true create info save State info context return Array List v Stats null lazy initialized for Iterator iter per Project Infos values iterator iter has Next try Per Project Info info Per Project Info iter next save State info context catch Core Exception e if v Stats null v Stats new Array List v Stats add e get Status if v Stats null I Status stats new I Status v Stats size v Stats to Array stats throw new Core Exception new Multi Status Java Core PLUGIN ID I Status ERROR stats Util bind build cannot Save States null NON NLS 1  ISaveParticipant ISaveContext CoreException JavaCore getPlugin getPluginPreferences IJavaProject getJavaModel getJavaProjects IJavaProject show_bug projectContainers containerClone projectContainers projectContainers keySet hasNext IPath containerPath IPath IClasspathContainer IClasspathContainer projectContainers containerPath containerKey CP_CONTAINER_PREFERENCES_PREFIX getElementName containerPath containerString CP_ENTRY_IGNORE containerString JavaProject encodeClasspath getClasspathEntries JavaModelException CP_ENTRY_IGNORE setDefault containerKey CP_ENTRY_IGNORE setValue containerKey containerString JavaCore getPlugin savePluginPreferences getKind ISaveContext FULL_SAVE show_bug needDelta show_bug IndexManager indexManager cleanUpIndexes IProject savedProject getProject savedProject JavaProject hasJavaNature savedProject PerProjectInfo getPerProjectInfo savedProject saveState ArrayList vStats perProjectInfos hasNext PerProjectInfo PerProjectInfo saveState CoreException vStats vStats ArrayList vStats getStatus vStats IStatus IStatus vStats vStats toArray CoreException MultiStatus JavaCore PLUGIN_ID IStatus cannotSaveStates
Record the order in which to build the java projects batch build This order is based on the projects classpath settings protected void set Build Order String java Build Order throws Java Model Exception optional behaviour possible value of index 0 is Compute if Java Core COMPUTE equals Java Core get Option Java Core CORE JAVA BUILD ORDER return cannot be customized at project level if java Build Order null java Build Order length 1 return I Workspace workspace Resources Plugin get Workspace I Workspace Description description workspace get Description String wks Build Order description get Build Order String new Order if wks Build Order null new Order java Build Order else remove projects which are already mentionned in java builder order int java Count java Build Order length Hash Map new Set new Hash Map java Count create a set for fast check for int i 0 i java Count i new Set put java Build Order i java Build Order i int removed 0 int old Count wks Build Order length for int i 0 i old Count i if new Set contains Key wks Build Order i wks Build Order i null removed add Java ones first new Order new String old Count removed java Count System arraycopy java Build Order 0 new Order 0 java Count java projects are built first copy previous items in their respective order int index java Count for int i 0 i old Count i if wks Build Order i null new Order index wks Build Order i commit the new build order out description set Build Order new Order try workspace set Description description catch Core Exception e throw new Java Model Exception e  setBuildOrder javaBuildOrder JavaModelException JavaCore JavaCore getOption JavaCore CORE_JAVA_BUILD_ORDER javaBuildOrder javaBuildOrder IWorkspace ResourcesPlugin getWorkspace IWorkspaceDescription getDescription wksBuildOrder getBuildOrder newOrder wksBuildOrder newOrder javaBuildOrder javaCount javaBuildOrder HashMap newSet HashMap javaCount javaCount newSet javaBuildOrder javaBuildOrder oldCount wksBuildOrder oldCount newSet containsKey wksBuildOrder wksBuildOrder newOrder oldCount javaCount javaBuildOrder newOrder javaCount javaCount oldCount wksBuildOrder newOrder wksBuildOrder setBuildOrder newOrder setDescription CoreException JavaModelException
Sets the last built state for the given project or null to reset it public void set Last Built State I Project project Object state if Java Project has Java Nature project should never be requested on non Java projects Per Project Info info get Per Project Info project true create if missing info tried Read true no point trying to re read once using setter info saved State state if state null delete state file to ensure a full build happens if the workspace crashes try File file get Serialization File project if file null file exists file delete catch Security Exception se could not delete file cannot do much more  setLastBuiltState IProject JavaProject hasJavaNature PerProjectInfo getPerProjectInfo triedRead savedState getSerializationFile SecurityException
public void shutdown if this index Manager null no more indexing this index Manager shutdown Note no need to close the Java model as this just removes Java element infos from the Java model cache  indexManager indexManager
public synchronized I Path variable Get String variable Name check initialization in progress first Hash Set initializations variable Initialization In Progress if initializations contains variable Name return VARIABLE INITIALIZATION IN PROGRESS return I Path this variables get variable Name  IPath variableGet variableName HashSet variableInitializationInProgress variableName VARIABLE_INITIALIZATION_IN_PROGRESS IPath variableName
new I Workspace Runnable public void run I Progress Monitor progress Monitor throws Core Exception propagate classpath change Iterator projects To Update affected Project Classpaths key Set iterator while projects To Update has Next if progress Monitor null progress Monitor is Canceled return Java Project affected Project Java Project projects To Update next if CP RESOLVE VERBOSE Util verbose CP Variable SET updating affected project due to setting variables n NON NLS 1 project affected Project get Element Name n NON NLS 1 variables org eclipse jdt internal compiler util Util to String dbg Variable Names NON NLS 1 affected Project set Raw Classpath affected Project get Raw Classpath Set Classpath Operation Reuse Output Location null don t call begin Task on the monitor see http bugs eclipse org bugs show bug cgi id 3717 can Change Resources I Classpath Entry affected Project Classpaths get affected Project false updating no need for early validation false updating no need to save  IWorkspaceRunnable IProgressMonitor progressMonitor CoreException projectsToUpdate affectedProjectClasspaths keySet projectsToUpdate hasNext progressMonitor progressMonitor isCanceled JavaProject affectedProject JavaProject projectsToUpdate CP_RESOLVE_VERBOSE CPVariable affectedProject getElementName toString dbgVariableNames affectedProject setRawClasspath affectedProject getRawClasspath SetClasspathOperation ReuseOutputLocation beginTask show_bug canChangeResources IClasspathEntry affectedProjectClasspaths affectedProject
public void update Variable Values String variable Names I Path variable Paths I Progress Monitor monitor throws Java Model Exception if monitor null monitor is Canceled return if CP RESOLVE VERBOSE Util verbose CP Variable SET setting variables n NON NLS 1 variables org eclipse jdt internal compiler util Util to String variable Names n NON NLS 1 values org eclipse jdt internal compiler util Util to String variable Paths NON NLS 1 int var Length variable Names length gather classpath information for updating final Hash Map affected Project Classpaths new Hash Map 5 I Java Model model get Java Model filter out unmodified variables int discard Count 0 for int i 0 i var Length i String variable Name variable Names i I Path old Path this variable Get variable Name if reentering will provide previous session value if old Path VARIABLE INITIALIZATION IN PROGRESS I Path previous Path I Path this previous Session Variables get variable Name if previous Path null if CP RESOLVE VERBOSE Util verbose CP Variable INIT reentering access to variable during its initialization will see previous value n NON NLS 1 variable variable Name n NON NLS 1 previous value previous Path NON NLS 1 this variable Put variable Name previous Path replace value so reentering calls are seeing old value old Path null 33695 cannot filter out restored variable must update affected project to reset cached CP if old Path null old Path equals variable Paths i variable Names i null discard Count if discard Count 0 if discard Count var Length return int changed Length var Length discard Count String changed Variable Names new String changed Length I Path changed Variable Paths new I Path changed Length for int i 0 index 0 i var Length i if variable Names i null changed Variable Names index variable Names i changed Variable Paths index variable Paths i index variable Names changed Variable Names variable Paths changed Variable Paths var Length changed Length if monitor null monitor is Canceled return if model null I Java Project projects model get Java Projects next Project for int i 0 project Length projects length i project Length i Java Project project Java Project projects i check to see if any of the modified variables is present on the classpath I Classpath Entry classpath project get Raw Classpath for int j 0 cp Length classpath length j cp Length j I Classpath Entry entry classpath j for int k 0 k var Length k String variable Name variable Names k if entry get Entry Kind I Classpath Entry CPE VARIABLE if variable Name equals entry get Path segment 0 affected Project Classpaths put project project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress continue next Project I Path source Path source Root Path if source Path entry get Source Attachment Path null variable Name equals source Path segment 0 source Root Path entry get Source Attachment Root Path null variable Name equals source Root Path segment 0 affected Project Classpaths put project project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress continue next Project update variables for int i 0 i var Length i this variable Put variable Names i variable Paths i final String dbg Variable Names variable Names update affected project classpaths if affected Project Classpaths is Empty try final boolean can Change Resources Resources Plugin get Workspace is Tree Locked Java Core run new I Workspace Runnable public void run I Progress Monitor progress Monitor throws Core Exception propagate classpath change Iterator projects To Update affected Project Classpaths key Set iterator while projects To Update has Next if progress Monitor null progress Monitor is Canceled return Java Project affected Project Java Project projects To Update next if CP RESOLVE VERBOSE Util verbose CP Variable SET updating affected project due to setting variables n NON NLS 1 project affected Project get Element Name n NON NLS 1 variables org eclipse jdt internal compiler util Util to String dbg Variable Names NON NLS 1 affected Project set Raw Classpath affected Project get Raw Classpath Set Classpath Operation Reuse Output Location null don t call begin Task on the monitor see http bugs eclipse org bugs show bug cgi id 3717 can Change Resources I Classpath Entry affected Project Classpaths get affected Project false updating no need for early validation false updating no need to save null no need to lock anything monitor catch Core Exception e if CP RESOLVE VERBOSE Util verbose CP Variable SET FAILED DUE TO EXCEPTION n NON NLS 1 variables org eclipse jdt internal compiler util Util to String dbg Variable Names NON NLS 1 System err e print Stack Trace if e instanceof Java Model Exception throw Java Model Exception e else throw new Java Model Exception e  updateVariableValues variableNames IPath variablePaths IProgressMonitor JavaModelException isCanceled CP_RESOLVE_VERBOSE CPVariable toString variableNames toString variablePaths varLength variableNames HashMap affectedProjectClasspaths HashMap IJavaModel getJavaModel discardCount varLength variableName variableNames IPath oldPath variableGet variableName oldPath VARIABLE_INITIALIZATION_IN_PROGRESS IPath previousPath IPath previousSessionVariables variableName previousPath CP_RESOLVE_VERBOSE CPVariable variableName previousPath variablePut variableName previousPath oldPath oldPath oldPath variablePaths variableNames discardCount discardCount discardCount varLength changedLength varLength discardCount changedVariableNames changedLength IPath changedVariablePaths IPath changedLength varLength variableNames changedVariableNames variableNames changedVariablePaths variablePaths variableNames changedVariableNames variablePaths changedVariablePaths varLength changedLength isCanceled IJavaProject getJavaProjects nextProject projectLength projectLength JavaProject JavaProject IClasspathEntry getRawClasspath cpLength cpLength IClasspathEntry varLength variableName variableNames getEntryKind IClasspathEntry CPE_VARIABLE variableName getPath affectedProjectClasspaths getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress nextProject IPath sourcePath sourceRootPath sourcePath getSourceAttachmentPath variableName sourcePath sourceRootPath getSourceAttachmentRootPath variableName sourceRootPath affectedProjectClasspaths getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress nextProject varLength variablePut variableNames variablePaths dbgVariableNames variableNames affectedProjectClasspaths isEmpty canChangeResources ResourcesPlugin getWorkspace isTreeLocked JavaCore IWorkspaceRunnable IProgressMonitor progressMonitor CoreException projectsToUpdate affectedProjectClasspaths keySet projectsToUpdate hasNext progressMonitor progressMonitor isCanceled JavaProject affectedProject JavaProject projectsToUpdate CP_RESOLVE_VERBOSE CPVariable affectedProject getElementName toString dbgVariableNames affectedProject setRawClasspath affectedProject getRawClasspath SetClasspathOperation ReuseOutputLocation beginTask show_bug canChangeResources IClasspathEntry affectedProjectClasspaths affectedProject CoreException CP_RESOLVE_VERBOSE CPVariable toString dbgVariableNames printStackTrace JavaModelException JavaModelException JavaModelException
private Hash Set variable Initialization In Progress Hash Set initializations Hash Set this variable Initialization In Progress get if initializations null initializations new Hash Set this variable Initialization In Progress set initializations return initializations  HashSet variableInitializationInProgress HashSet HashSet variableInitializationInProgress HashSet variableInitializationInProgress
public synchronized String variable Names int length this variables size String result new String length Iterator vars this variables key Set iterator int index 0 while vars has Next result index String vars next return result  variableNames keySet hasNext
public synchronized void variable Put String variable Name I Path variable Path set unset the initialization in progress Hash Set initializations variable Initialization In Progress if variable Path VARIABLE INITIALIZATION IN PROGRESS initializations add variable Name do not write out intermediate initialization value return else initializations remove variable Name update cache do not only rely on listener refresh if variable Path null this variables remove variable Name else this variables put variable Name variable Path discard obsoleted information about previous session this previous Session Variables remove variable Name Preferences preferences Java Core get Plugin get Plugin Preferences String variable Key CP VARIABLE PREFERENCES PREFIX variable Name String variable String variable Path null CP ENTRY IGNORE variable Path to String preferences set Default variable Key CP ENTRY IGNORE use this default to get rid of removed ones preferences set Value variable Key variable String Java Core get Plugin save Plugin Preferences  variablePut variableName IPath variablePath HashSet variableInitializationInProgress variablePath VARIABLE_INITIALIZATION_IN_PROGRESS variableName variableName variablePath variableName variableName variablePath previousSessionVariables variableName JavaCore getPlugin getPluginPreferences variableKey CP_VARIABLE_PREFERENCES_PREFIX variableName variableString variablePath CP_ENTRY_IGNORE variablePath toString setDefault variableKey CP_ENTRY_IGNORE setValue variableKey variableString JavaCore getPlugin savePluginPreferences

see Java Model Operation post Action String getID  JavaModelOperation postAction
Run this action void run throws Java Model Exception  JavaModelException
protected static Thread Local operation Stacks new Thread Local protected Java Model Operation default constructor used in subclasses  ThreadLocal operationStacks ThreadLocal JavaModelOperation
A common constructor for all Java Model operations protected Java Model Operation I Java Element elements this elements To Process elements  JavaModelOperation IJavaElement elementsToProcess
Common constructor for all Java Model operations protected Java Model Operation I Java Element elements To Process I Java Element parent Elements this elements To Process elements To Process this parent Elements parent Elements  JavaModelOperation IJavaElement elementsToProcess IJavaElement parentElements elementsToProcess elementsToProcess parentElements parentElements
A common constructor for all Java Model operations protected Java Model Operation I Java Element elements To Process I Java Element parent Elements boolean force this elements To Process elements To Process this parent Elements parent Elements this force force  JavaModelOperation IJavaElement elementsToProcess IJavaElement parentElements elementsToProcess elementsToProcess parentElements parentElements
A common constructor for all Java Model operations protected Java Model Operation I Java Element elements boolean force this elements To Process elements this force force  JavaModelOperation IJavaElement elementsToProcess
Common constructor for all Java Model operations protected Java Model Operation I Java Element element this elements To Process new I Java Element element  JavaModelOperation IJavaElement elementsToProcess IJavaElement
A common constructor for all Java Model operations protected Java Model Operation I Java Element element boolean force this elements To Process new I Java Element element this force force  JavaModelOperation IJavaElement elementsToProcess IJavaElement
protected void add Action I Post Action action int length this actions length if length this actions End System arraycopy this actions 0 this actions new I Post Action length 2 0 length this actions this actions End action  addAction IPostAction actionsEnd IPostAction actionsEnd
Registers the given delta with the Java Model Manager protected void add Delta I Java Element Delta delta Java Model Manager get Java Model Manager get Delta Processor register Java Model Delta delta  addDelta IJavaElementDelta JavaModelManager getJavaModelManager getDeltaProcessor registerJavaModelDelta
protected void add Reconcile Delta I Compilation Unit working Copy I Java Element Delta delta Hash Map reconcile Deltas Java Model Manager get Java Model Manager get Delta Processor reconcile Deltas Java Element Delta previous Delta Java Element Delta reconcile Deltas get working Copy if previous Delta null I Java Element Delta children delta get Affected Children for int i 0 length children length i length i Java Element Delta child Java Element Delta children i previous Delta insert Delta Tree child get Element child else reconcile Deltas put working Copy delta  addReconcileDelta ICompilationUnit workingCopy IJavaElementDelta HashMap reconcileDeltas JavaModelManager getJavaModelManager getDeltaProcessor reconcileDeltas JavaElementDelta previousDelta JavaElementDelta reconcileDeltas workingCopy previousDelta IJavaElementDelta getAffectedChildren JavaElementDelta JavaElementDelta previousDelta insertDeltaTree getElement reconcileDeltas workingCopy
Deregister the reconcile delta for the given working copy protected void remove Reconcile Delta I Compilation Unit working Copy Java Model Manager get Java Model Manager get Delta Processor reconcile Deltas remove working Copy  removeReconcileDelta ICompilationUnit workingCopy JavaModelManager getJavaModelManager getDeltaProcessor reconcileDeltas workingCopy
see I Progress Monitor public void begin Task String name int total Work if progress Monitor null progress Monitor begin Task name total Work  IProgressMonitor beginTask totalWork progressMonitor progressMonitor beginTask totalWork
Checks with the progress monitor to see whether this operation should be canceled An operation should regularly call this method during its operation so that the user can cancel it exception Operation Canceled Exception if cancelling the operation has been requested see I Progress Monitor is Canceled protected void check Canceled if is Canceled throw new Operation Canceled Exception Util bind operation cancelled NON NLS 1  OperationCanceledException IProgressMonitor isCanceled checkCanceled isCanceled OperationCanceledException
Common code used to verify the elements this operation is processing see Java Model Operation verify protected I Java Model Status common Verify if elements To Process null elements To Process length 0 return new Java Model Status I Java Model Status Constants NO ELEMENTS TO PROCESS for int i 0 i elements To Process length i if elements To Process i null return new Java Model Status I Java Model Status Constants NO ELEMENTS TO PROCESS return Java Model Status VERIFIED OK  JavaModelOperation IJavaModelStatus commonVerify elementsToProcess elementsToProcess JavaModelStatus IJavaModelStatusConstants NO_ELEMENTS_TO_PROCESS elementsToProcess elementsToProcess JavaModelStatus IJavaModelStatusConstants NO_ELEMENTS_TO_PROCESS JavaModelStatus VERIFIED_OK
Convenience method to copy resources protected void copy Resources I Resource resources I Path destination Path throws Java Model Exception I Progress Monitor sub Progress Monitor get Sub Progress Monitor resources length I Workspace workspace resources 0 get Workspace try workspace copy resources destination Path false sub Progress Monitor this set Attribute HAS MODIFIED RESOURCE ATTR TRUE catch Core Exception e throw new Java Model Exception e  copyResources IResource IPath destinationPath JavaModelException IProgressMonitor subProgressMonitor getSubProgressMonitor IWorkspace getWorkspace destinationPath subProgressMonitor setAttribute HAS_MODIFIED_RESOURCE_ATTR CoreException JavaModelException
Convenience method to create a file protected void create File I Container folder String name Input Stream contents boolean force Flag throws Java Model Exception I File file folder get File new Path name try file create contents force Flag I Resource FORCE I Resource KEEP HISTORY I Resource KEEP HISTORY get Sub Progress Monitor 1 this set Attribute HAS MODIFIED RESOURCE ATTR TRUE catch Core Exception e throw new Java Model Exception e  createFile IContainer InputStream forceFlag JavaModelException IFile getFile forceFlag IResource IResource KEEP_HISTORY IResource KEEP_HISTORY getSubProgressMonitor setAttribute HAS_MODIFIED_RESOURCE_ATTR CoreException JavaModelException
Convenience method to create a folder protected void create Folder I Container parent Folder String name boolean force Flag throws Java Model Exception I Folder folder parent Folder get Folder new Path name try we should use true to create the file locally Only VCM should use tru false folder create force Flag I Resource FORCE I Resource KEEP HISTORY I Resource KEEP HISTORY true local get Sub Progress Monitor 1 this set Attribute HAS MODIFIED RESOURCE ATTR TRUE catch Core Exception e throw new Java Model Exception e  createFolder IContainer parentFolder forceFlag JavaModelException IFolder parentFolder getFolder forceFlag IResource IResource KEEP_HISTORY IResource KEEP_HISTORY getSubProgressMonitor setAttribute HAS_MODIFIED_RESOURCE_ATTR CoreException JavaModelException
Convenience method to delete an empty package fragment protected void delete Empty Package Fragment I Package Fragment fragment boolean force Flag I Resource root Resource throws Java Model Exception I Container resource I Container fragment get Resource try resource delete force Flag I Resource FORCE I Resource KEEP HISTORY I Resource KEEP HISTORY get Sub Progress Monitor 1 this set Attribute HAS MODIFIED RESOURCE ATTR TRUE while resource instanceof I Folder deleting a package delete the parent if it is empty eg deleting x y where folder x doesn t have resources but y without deleting the package fragment root resource resource get Parent if resource equals root Resource resource members length 0 resource delete force Flag I Resource FORCE I Resource KEEP HISTORY I Resource KEEP HISTORY get Sub Progress Monitor 1 this set Attribute HAS MODIFIED RESOURCE ATTR TRUE catch Core Exception e throw new Java Model Exception e  deleteEmptyPackageFragment IPackageFragment forceFlag IResource rootResource JavaModelException IContainer IContainer getResource forceFlag IResource IResource KEEP_HISTORY IResource KEEP_HISTORY getSubProgressMonitor setAttribute HAS_MODIFIED_RESOURCE_ATTR IFolder getParent rootResource forceFlag IResource IResource KEEP_HISTORY IResource KEEP_HISTORY getSubProgressMonitor setAttribute HAS_MODIFIED_RESOURCE_ATTR CoreException JavaModelException
Convenience method to delete a resource protected void delete Resource I Resource resource int flags throws Java Model Exception try resource delete flags get Sub Progress Monitor 1 this set Attribute HAS MODIFIED RESOURCE ATTR TRUE catch Core Exception e throw new Java Model Exception e  deleteResource IResource JavaModelException getSubProgressMonitor setAttribute HAS_MODIFIED_RESOURCE_ATTR CoreException JavaModelException
Convenience method to delete resources protected void delete Resources I Resource resources boolean force Flag throws Java Model Exception if resources null resources length 0 return I Progress Monitor sub Progress Monitor get Sub Progress Monitor resources length I Workspace workspace resources 0 get Workspace try workspace delete resources force Flag I Resource FORCE I Resource KEEP HISTORY I Resource KEEP HISTORY sub Progress Monitor this set Attribute HAS MODIFIED RESOURCE ATTR TRUE catch Core Exception e throw new Java Model Exception e  deleteResources IResource forceFlag JavaModelException IProgressMonitor subProgressMonitor getSubProgressMonitor IWorkspace getWorkspace forceFlag IResource IResource KEEP_HISTORY IResource KEEP_HISTORY subProgressMonitor setAttribute HAS_MODIFIED_RESOURCE_ATTR CoreException JavaModelException
see I Progress Monitor public void done if progress Monitor null progress Monitor done  IProgressMonitor progressMonitor progressMonitor
protected boolean equals One Of I Path path I Path other Paths for int i 0 length other Paths length i length i if path equals other Paths i return true return false  equalsOneOf IPath IPath otherPaths otherPaths otherPaths
Convenience method to run an operation within this operation public void execute Nested Operation Java Model Operation operation int sub Work Amount throws Java Model Exception I Java Model Status status operation verify if status isOK throw new Java Model Exception status I Progress Monitor sub Progress Monitor get Sub Progress Monitor sub Work Amount fix for 1FW7IKC part 1 try operation set Nested true operation run sub Progress Monitor catch Core Exception ce if ce instanceof Java Model Exception throw Java Model Exception ce else translate the core exception to a java model exception if ce get Status get Code I Resource Status OPERATION FAILED Throwable e ce get Status get Exception if e instanceof Java Model Exception throw Java Model Exception e throw new Java Model Exception ce  executeNestedOperation JavaModelOperation subWorkAmount JavaModelException IJavaModelStatus JavaModelException IProgressMonitor subProgressMonitor getSubProgressMonitor subWorkAmount setNested subProgressMonitor CoreException JavaModelException JavaModelException getStatus getCode IResourceStatus OPERATION_FAILED getStatus getException JavaModelException JavaModelException JavaModelException
Performs the operation specific behavior Subclasses must override protected abstract void execute Operation throws Java Model Exception  executeOperation JavaModelException
protected Object get Attribute Object key Array List stack this get Current Operation Stack if stack size 0 return null Java Model Operation top Level Op Java Model Operation stack get 0 if top Level Op attributes null return null else return top Level Op attributes get key  getAttribute ArrayList getCurrentOperationStack JavaModelOperation topLevelOp JavaModelOperation topLevelOp topLevelOp
Returns the compilation unit the given element is contained in or the element itself if it is a compilation unit otherwise code null code protected I Compilation Unit get Compilation Unit For I Java Element element return Java Element element get Compilation Unit  ICompilationUnit getCompilationUnitFor IJavaElement JavaElement getCompilationUnit
protected Array List get Current Operation Stack Array List stack Array List operation Stacks get if stack null stack new Array List operation Stacks set stack return stack  ArrayList getCurrentOperationStack ArrayList ArrayList operationStacks ArrayList operationStacks
Returns the elements to which this operation applies or code null code if not applicable protected I Java Element get Elements To Process return elements To Process  IJavaElement getElementsToProcess elementsToProcess
Returns the element to which this operation applies or code null code if not applicable protected I Java Element get Element To Process if elements To Process null elements To Process length 0 return null return elements To Process 0  IJavaElement getElementToProcess elementsToProcess elementsToProcess elementsToProcess
Returns the Java Model this operation is operating in public I Java Model get Java Model if elements To Process null elements To Process length 0 return get Parent Element get Java Model else return elements To Process 0 get Java Model  IJavaModel getJavaModel elementsToProcess elementsToProcess getParentElement getJavaModel elementsToProcess getJavaModel
protected I Path get Nested Folders I Package Fragment Root root throws Java Model Exception I Path root Path root get Path I Classpath Entry classpath root get Java Project get Raw Classpath int length classpath length I Path result new I Path length int index 0 for int i 0 i length i I Path path classpath i get Path if root Path is Prefix Of path root Path equals path result index path if index length System arraycopy result 0 result new I Path index 0 index return result  IPath getNestedFolders IPackageFragmentRoot JavaModelException IPath rootPath getPath IClasspathEntry getJavaProject getRawClasspath IPath IPath IPath getPath rootPath isPrefixOf rootPath IPath
Returns the parent element to which this operation applies or code null code if not applicable protected I Java Element get Parent Element if parent Elements null parent Elements length 0 return null return parent Elements 0  IJavaElement getParentElement parentElements parentElements parentElements
Returns the parent elements to which this operation applies or code null code if not applicable protected I Java Element get Parent Elements return parent Elements  IJavaElement getParentElements parentElements
Returns the elements created by this operation public I Java Element get Result Elements return result Elements  IJavaElement getResultElements resultElements
Subclasses can override protected I Scheduling Rule get Scheduling Rule return Resources Plugin get Workspace get Root  ISchedulingRule getSchedulingRule ResourcesPlugin getWorkspace getRoot
Creates and returns a subprogress monitor if appropriate protected I Progress Monitor get Sub Progress Monitor int work Amount I Progress Monitor sub null if progress Monitor null sub new Sub Progress Monitor progress Monitor work Amount Sub Progress Monitor PREPEND MAIN LABEL TO SUBTASK return sub  IProgressMonitor getSubProgressMonitor workAmount IProgressMonitor progressMonitor SubProgressMonitor progressMonitor workAmount SubProgressMonitor PREPEND_MAIN_LABEL_TO_SUBTASK
Returns whether this operation has performed any resource modifications Returns false if this operation has not been executed yet public boolean has Modified Resource return this is Read Only this get Attribute HAS MODIFIED RESOURCE ATTR TRUE  hasModifiedResource isReadOnly getAttribute HAS_MODIFIED_RESOURCE_ATTR
public void internal Worked double work if progress Monitor null progress Monitor internal Worked work  internalWorked progressMonitor progressMonitor internalWorked
see I Progress Monitor public boolean is Canceled if progress Monitor null return progress Monitor is Canceled return false  IProgressMonitor isCanceled progressMonitor progressMonitor isCanceled
Returns code true code if this operation performs no resource modifications otherwise code false code Subclasses must override public boolean is Read Only return false  isReadOnly
protected boolean is Top Level Operation Array List stack return stack this get Current Operation Stack size 0 stack get 0 this  isTopLevelOperation ArrayList getCurrentOperationStack
protected int first Action WithID String id int start for int i start i this actions End i if this actions i getID equals id return i return 1  firstActionWithID actionsEnd
Convenience method to move resources protected void move Resources I Resource resources I Path destination Path throws Java Model Exception I Progress Monitor sub Progress Monitor null if progress Monitor null sub Progress Monitor new Sub Progress Monitor progress Monitor resources length Sub Progress Monitor PREPEND MAIN LABEL TO SUBTASK I Workspace workspace resources 0 get Workspace try workspace move resources destination Path false sub Progress Monitor this set Attribute HAS MODIFIED RESOURCE ATTR TRUE catch Core Exception e throw new Java Model Exception e  moveResources IResource IPath destinationPath JavaModelException IProgressMonitor subProgressMonitor progressMonitor subProgressMonitor SubProgressMonitor progressMonitor SubProgressMonitor PREPEND_MAIN_LABEL_TO_SUBTASK IWorkspace getWorkspace destinationPath subProgressMonitor setAttribute HAS_MODIFIED_RESOURCE_ATTR CoreException JavaModelException
Creates and returns a new code I Java Element Delta code on the Java Model public Java Element Delta new Java Element Delta return new Java Element Delta get Java Model  IJavaElementDelta JavaElementDelta newJavaElementDelta JavaElementDelta getJavaModel
protected Java Model Operation pop Operation Array List stack get Current Operation Stack int size stack size if size 0 if size 1 top level operation operation Stacks set null release reference see http bugs eclipse org bugs show bug cgi id 33927 return Java Model Operation stack remove size 1 else return null  JavaModelOperation popOperation ArrayList getCurrentOperationStack operationStacks show_bug JavaModelOperation
protected void post Action I Post Action action int insertion Mode if POST ACTION VERBOSE System out print Thread current Thread Java Model Operation post Action I Post Action int Posting action action getID NON NLS 1 NON NLS 2 switch insertion Mode case REMOVEALL APPEND System out println REMOVEALL APPEND NON NLS 1 break case KEEP EXISTING System out println KEEP EXISTING NON NLS 1 break case APPEND System out println APPEND NON NLS 1 break Java Model Operation top Level Op Java Model Operation get Current Operation Stack get 0 I Post Action post Actions top Level Op actions if post Actions null top Level Op actions post Actions new I Post Action 1 post Actions 0 action top Level Op actions End 0 else String id action getID switch insertion Mode case REMOVEALL APPEND int index this actions Start 1 while index top Level Op first Action WithID id index 1 0 remove action index System arraycopy post Actions index 1 post Actions index top Level Op actions End index post Actions top Level Op actions End null top Level Op add Action action break case KEEP EXISTING if top Level Op first Action WithID id 0 0 top Level Op add Action action break case APPEND top Level Op add Action action break  postAction IPostAction insertionMode POST_ACTION_VERBOSE currentThread JavaModelOperation postAction IPostAction insertionMode REMOVEALL_APPEND REMOVEALL_APPEND KEEP_EXISTING KEEP_EXISTING JavaModelOperation topLevelOp JavaModelOperation getCurrentOperationStack IPostAction postActions topLevelOp postActions topLevelOp postActions IPostAction postActions topLevelOp actionsEnd insertionMode REMOVEALL_APPEND actionsStart topLevelOp firstActionWithID postActions postActions topLevelOp actionsEnd postActions topLevelOp actionsEnd topLevelOp addAction KEEP_EXISTING topLevelOp firstActionWithID topLevelOp addAction topLevelOp addAction
protected boolean prefixes One Of I Path path I Path other Paths for int i 0 length other Paths length i length i if path is Prefix Of other Paths i return true return false  prefixesOneOf IPath IPath otherPaths otherPaths isPrefixOf otherPaths
Pushes the given operation on the stack of operations currently running in this thread protected void push Operation Java Model Operation operation get Current Operation Stack add operation  pushOperation JavaModelOperation getCurrentOperationStack
protected void remove All Post Action String actionID if POST ACTION VERBOSE System out println Thread current Thread Java Model Operation remove All Post Action String Removing actions actionID NON NLS 1 NON NLS 2 Java Model Operation top Level Op Java Model Operation get Current Operation Stack get 0 I Post Action post Actions top Level Op actions if post Actions null return int index this actions Start 1 while index top Level Op first Action WithID actionID index 1 0 remove action index System arraycopy post Actions index 1 post Actions index top Level Op actions End index post Actions top Level Op actions End null  removeAllPostAction POST_ACTION_VERBOSE currentThread JavaModelOperation removeAllPostAction JavaModelOperation topLevelOp JavaModelOperation getCurrentOperationStack IPostAction postActions topLevelOp postActions actionsStart topLevelOp firstActionWithID postActions postActions topLevelOp actionsEnd postActions topLevelOp actionsEnd
Runs this operation and registers any deltas created see I Workspace Runnable exception Core Exception if the operation fails public void run I Progress Monitor monitor throws Core Exception Java Model Manager manager Java Model Manager get Java Model Manager Delta Processor delta Processor manager get Delta Processor int previous Delta Count delta Processor java Model Deltas size try progress Monitor monitor push Operation this try computes the root infos before executing the operation noop if aready initialized Java Model Manager get Java Model Manager delta State initialize Roots execute Operation finally if this is Top Level Operation this run Post Actions finally try update Java Model using deltas that were recorded during this operation for int i previous Delta Count size delta Processor java Model Deltas size i size i delta Processor update Java Model I Java Element Delta delta Processor java Model Deltas get i fire only iff the operation is a top level operation the operation did produce some delta s but the operation has not modified any resource if this is Top Level Operation if delta Processor java Model Deltas size previous Delta Count delta Processor reconcile Deltas is Empty this has Modified Resource delta Processor fire null Delta Processor DEFAULT CHANGE EVENT else deltas are fired while processing the resource delta finally pop Operation  IWorkspaceRunnable CoreException IProgressMonitor CoreException JavaModelManager JavaModelManager getJavaModelManager DeltaProcessor deltaProcessor getDeltaProcessor previousDeltaCount deltaProcessor javaModelDeltas progressMonitor pushOperation JavaModelManager getJavaModelManager deltaState initializeRoots executeOperation isTopLevelOperation runPostActions JavaModel previousDeltaCount deltaProcessor javaModelDeltas deltaProcessor updateJavaModel IJavaElementDelta deltaProcessor javaModelDeltas isTopLevelOperation deltaProcessor javaModelDeltas previousDeltaCount deltaProcessor reconcileDeltas isEmpty hasModifiedResource deltaProcessor DeltaProcessor DEFAULT_CHANGE_EVENT popOperation
Main entry point for Java Model operations Runs a Java Model Operation as an I Workspace Runnable if not read only public void run Operation I Progress Monitor monitor throws Java Model Exception I Java Model Status status verify if status isOK throw new Java Model Exception status try if is Read Only run monitor else Use I Workspace run to ensure that a build will be done in autobuild mode Note that if the tree is locked this will throw a Core Exception but this is ok as this operation is modifying the tree not read only and a Core Exception will be thrown anyway Resources Plugin get Workspace run this get Scheduling Rule I Workspace AVOID UPDATE monitor catch Core Exception ce if ce instanceof Java Model Exception throw Java Model Exception ce else if ce get Status get Code I Resource Status OPERATION FAILED Throwable e ce get Status get Exception if e instanceof Java Model Exception throw Java Model Exception e throw new Java Model Exception ce  IWorkspaceRunnable runOperation IProgressMonitor JavaModelException IJavaModelStatus JavaModelException isReadOnly IWorkspace CoreException CoreException ResourcesPlugin getWorkspace getSchedulingRule IWorkspace AVOID_UPDATE CoreException JavaModelException JavaModelException getStatus getCode IResourceStatus OPERATION_FAILED getStatus getException JavaModelException JavaModelException JavaModelException
protected void run Post Actions throws Java Model Exception while this actions Start this actions End I Post Action post Action this actions this actions Start if POST ACTION VERBOSE System out println Thread current Thread Java Model Operation run Post Actions Running action post Action getID NON NLS 1 NON NLS 2 post Action run  runPostActions JavaModelException actionsStart actionsEnd IPostAction postAction actionsStart POST_ACTION_VERBOSE currentThread JavaModelOperation runPostActions postAction postAction
protected void set Attribute Object key Object attribute Java Model Operation top Level Op Java Model Operation this get Current Operation Stack get 0 if top Level Op attributes null top Level Op attributes new Hash Map top Level Op attributes put key attribute  setAttribute JavaModelOperation topLevelOp JavaModelOperation getCurrentOperationStack topLevelOp topLevelOp HashMap topLevelOp
see I Progress Monitor public void set Canceled boolean b if progress Monitor null progress Monitor set Canceled b  IProgressMonitor setCanceled progressMonitor progressMonitor setCanceled
Sets whether this operation is nested or not see Create Element InCU Operation check Canceled protected void set Nested boolean nested is Nested nested  CreateElementInCUOperation checkCanceled setNested isNested
see I Progress Monitor public void set Task Name String name if progress Monitor null progress Monitor set Task Name name  IProgressMonitor setTaskName progressMonitor progressMonitor setTaskName
see I Progress Monitor public void sub Task String name if progress Monitor null progress Monitor sub Task name  IProgressMonitor subTask progressMonitor progressMonitor subTask
Returns a status indicating if there is any known reason this operation will fail Operations are verified before they are run Subclasses must override if they have any conditions to verify before this operation executes see I Java Model Status protected I Java Model Status verify return common Verify  IJavaModelStatus IJavaModelStatus commonVerify
see I Progress Monitor public void worked int work if progress Monitor null progress Monitor worked work check Canceled  IProgressMonitor progressMonitor progressMonitor checkCanceled

Constructs an Java model status with no corresponding elements public Java Model Status no code for an multi status super ERROR Java Core PLUGIN ID 0 Java Model Status null NON NLS 1  JavaModelStatus JavaCore PLUGIN_ID JavaModelStatus
Constructs an Java model status with no corresponding elements public Java Model Status int code super ERROR Java Core PLUGIN ID code Java Model Status null NON NLS 1 this elements Java Element NO ELEMENTS  JavaModelStatus JavaCore PLUGIN_ID JavaModelStatus JavaElement NO_ELEMENTS
Constructs an Java model status with the given corresponding elements public Java Model Status int code I Java Element elements super ERROR Java Core PLUGIN ID code Java Model Status null NON NLS 1 this elements elements this path null  JavaModelStatus IJavaElement JavaCore PLUGIN_ID JavaModelStatus
Constructs an Java model status with no corresponding elements public Java Model Status int code String string this ERROR code string  JavaModelStatus
Constructs an Java model status with no corresponding elements public Java Model Status int severity int code String string super severity Java Core PLUGIN ID code Java Model Status null NON NLS 1 this elements Java Element NO ELEMENTS this path null this string string  JavaModelStatus JavaCore PLUGIN_ID JavaModelStatus JavaElement NO_ELEMENTS
Constructs an Java model status with no corresponding elements public Java Model Status int code Throwable throwable super ERROR Java Core PLUGIN ID code Java Model Status throwable NON NLS 1 this elements Java Element NO ELEMENTS  JavaModelStatus JavaCore PLUGIN_ID JavaModelStatus JavaElement NO_ELEMENTS
Constructs an Java model status with no corresponding elements public Java Model Status int code I Path path super ERROR Java Core PLUGIN ID code Java Model Status null NON NLS 1 this elements Java Element NO ELEMENTS this path path  JavaModelStatus IPath JavaCore PLUGIN_ID JavaModelStatus JavaElement NO_ELEMENTS
Constructs an Java model status with the given corresponding element public Java Model Status int code I Java Element element this code new I Java Element element  JavaModelStatus IJavaElement IJavaElement
Constructs an Java model status with the given corresponding element and string public Java Model Status int code I Java Element element String string this code new I Java Element element this string string  JavaModelStatus IJavaElement IJavaElement
Constructs an Java model status with the given corresponding element and path public Java Model Status int code I Java Element element I Path path this code new I Java Element element this path path  JavaModelStatus IJavaElement IPath IJavaElement
Constructs an Java model status with the given corresponding element path and string public Java Model Status int code I Java Element element I Path path String string this code new I Java Element element this path path this string string  JavaModelStatus IJavaElement IPath IJavaElement
Constructs an Java model status with no corresponding elements public Java Model Status Core Exception core Exception super ERROR Java Core PLUGIN ID CORE EXCEPTION Java Model Status core Exception NON NLS 1 elements Java Element NO ELEMENTS  JavaModelStatus CoreException coreException JavaCore PLUGIN_ID CORE_EXCEPTION JavaModelStatus coreException JavaElement NO_ELEMENTS
protected int get Bits int severity 1 get Code 100 33 int category 1 get Code 100 3 return severity category  getBits getCode getCode
see I Status public I Status get Children return children  IStatus IStatus getChildren
see I Java Model Status public I Java Element get Elements return elements  IJavaModelStatus IJavaElement getElements
Returns the message that is relevant to the code of this status public String get Message Throwable exception get Exception if exception null switch get Code case CORE EXCEPTION return Util bind status core Exception NON NLS 1 case BUILDER INITIALIZATION ERROR return Util bind build initialization Error NON NLS 1 case BUILDER SERIALIZATION ERROR return Util bind build serialization Error NON NLS 1 case DEVICE PATH return Util bind status cannot Use Device On Path get Path to String NON NLS 1 case DOM EXCEPTION return Util bind status JDOM Error NON NLS 1 case ELEMENT DOES NOT EXIST return Util bind element does Not Exist Java Element elements 0 to String With Ancestors NON NLS 1 case EVALUATION ERROR return Util bind status evaluation Error string NON NLS 1 case INDEX OUT OF BOUNDS return Util bind status index Out Of Bounds NON NLS 1 case INVALID CONTENTS return Util bind status invalid Contents NON NLS 1 case INVALID DESTINATION return Util bind status invalid Destination Java Element elements 0 to String With Ancestors NON NLS 1 case INVALID ELEMENT TYPES String Buffer buff new String Buffer Util bind operation not Supported NON NLS 1 for int i 0 i elements length i if i 0 buff append NON NLS 1 buff append Java Element elements i to String With Ancestors return buff to String case INVALID NAME return Util bind status invalid Name string NON NLS 1 case INVALID PACKAGE return Util bind status invalid Package string NON NLS 1 case INVALID PATH if string null return string else return Util bind status invalid Path get Path null null get Path to String NON NLS 1 NON NLS 2 case INVALID PROJECT return Util bind status invalid Project string NON NLS 1 case INVALID RESOURCE return Util bind status invalid Resource string NON NLS 1 case INVALID RESOURCE TYPE return Util bind status invalid Resource Type string NON NLS 1 case INVALID SIBLING if string null return Util bind status invalid Sibling string NON NLS 1 else return Util bind status invalid Sibling Java Element elements 0 to String With Ancestors NON NLS 1 case IO EXCEPTION return Util bind status IO Exception NON NLS 1 case NAME COLLISION if elements null elements length 0 I Java Element element elements 0 String name element get Element Name if element instanceof I Package Fragment name equals I Package Fragment DEFAULT PACKAGE NAME return Util bind operation cannot Rename Default Package NON NLS 1 if string null return string else return Util bind status name Collision NON NLS 1 NON NLS 2 case NO ELEMENTS TO PROCESS return Util bind operation need Elements NON NLS 1 case NULL NAME return Util bind operation need Name NON NLS 1 case NULL PATH return Util bind operation need Path NON NLS 1 case NULL STRING return Util bind operation need String NON NLS 1 case PATH OUTSIDE PROJECT return Util bind operation path Outside Project string Java Element elements 0 to String With Ancestors NON NLS 1 case READ ONLY I Java Element element elements 0 String name element get Element Name if element instanceof I Package Fragment name equals I Package Fragment DEFAULT PACKAGE NAME return Util bind status default Package Read Only NON NLS 1 return Util bind status read Only name NON NLS 1 case RELATIVE PATH return Util bind operation need Absolute Path get Path to String NON NLS 1 case TARGET EXCEPTION return Util bind status target Exception NON NLS 1 case UPDATE CONFLICT return Util bind status update Conflict NON NLS 1 case NO LOCAL CONTENTS return Util bind status no Local Contents get Path to String NON NLS 1 case CP CONTAINER PATH UNBOUND I Java Project java Project I Java Project elements 0 Classpath Container Initializer initializer Java Core get Classpath Container Initializer this path segment 0 String description null if initializer null description initializer get Description this path java Project if description null description path make Relative to String return Util bind classpath unbound Container Path description java Project get Element Name NON NLS 1 case INVALID CP CONTAINER ENTRY java Project I Java Project elements 0 I Classpath Container container null description null try container Java Core get Classpath Container path java Project catch Java Model Exception e project doesn t exist ignore if container null initializer Java Core get Classpath Container Initializer path segment 0 if initializer null description initializer get Description path java Project else description container get Description if description null description path make Relative to String return Util bind classpath invalid Container description java Project get Element Name NON NLS 1 case CP VARIABLE PATH UNBOUND java Project I Java Project elements 0 return Util bind classpath unbound Variable Path path make Relative to String java Project get Element Name NON NLS 1 case CLASSPATH CYCLE java Project I Java Project elements 0 return Util bind classpath cycle java Project get Element Name NON NLS 1 case DISABLED CP EXCLUSION PATTERNS java Project I Java Project elements 0 String project Name java Project get Element Name I Path new Path path if path segment 0 to String equals project Name new Path path remove First Segments 1 return Util bind classpath disabled Inclusion Exclusion Patterns new Path make Relative to String project Name NON NLS 1 case DISABLED CP MULTIPLE OUTPUT LOCATIONS java Project I Java Project elements 0 project Name java Project get Element Name new Path path if path segment 0 to String equals project Name new Path path remove First Segments 1 return Util bind classpath disabled Multiple Output Locations new Path make Relative to String project Name NON NLS 1 case INCOMPATIBLE JDK LEVEL java Project I Java Project elements 0 return Util bind classpath incompatible LibraryJDK Level new String NON NLS 1 java Project get Element Name java Project get Option Java Core COMPILER CODEGEN TARGET PLATFORM true path make Relative to String string if string null return string else return NON NLS 1 else String message exception get Message if message null return message else return exception to String  getMessage getException getCode CORE_EXCEPTION coreException BUILDER_INITIALIZATION_ERROR initializationError BUILDER_SERIALIZATION_ERROR serializationError DEVICE_PATH cannotUseDeviceOnPath getPath toString DOM_EXCEPTION JDOMError ELEMENT_DOES_NOT_EXIST doesNotExist JavaElement toStringWithAncestors EVALUATION_ERROR evaluationError INDEX_OUT_OF_BOUNDS indexOutOfBounds INVALID_CONTENTS invalidContents INVALID_DESTINATION invalidDestination JavaElement toStringWithAncestors INVALID_ELEMENT_TYPES StringBuffer StringBuffer notSupported JavaElement toStringWithAncestors toString INVALID_NAME invalidName INVALID_PACKAGE invalidPackage INVALID_PATH invalidPath getPath getPath toString INVALID_PROJECT invalidProject INVALID_RESOURCE invalidResource INVALID_RESOURCE_TYPE invalidResourceType INVALID_SIBLING invalidSibling invalidSibling JavaElement toStringWithAncestors IO_EXCEPTION IOException NAME_COLLISION IJavaElement getElementName IPackageFragment IPackageFragment DEFAULT_PACKAGE_NAME cannotRenameDefaultPackage nameCollision NO_ELEMENTS_TO_PROCESS needElements NULL_NAME needName NULL_PATH needPath NULL_STRING needString PATH_OUTSIDE_PROJECT pathOutsideProject JavaElement toStringWithAncestors READ_ONLY IJavaElement getElementName IPackageFragment IPackageFragment DEFAULT_PACKAGE_NAME defaultPackageReadOnly readOnly RELATIVE_PATH needAbsolutePath getPath toString TARGET_EXCEPTION targetException UPDATE_CONFLICT updateConflict NO_LOCAL_CONTENTS noLocalContents getPath toString CP_CONTAINER_PATH_UNBOUND IJavaProject javaProject IJavaProject ClasspathContainerInitializer JavaCore getClasspathContainerInitializer getDescription javaProject makeRelative toString unboundContainerPath javaProject getElementName INVALID_CP_CONTAINER_ENTRY javaProject IJavaProject IClasspathContainer JavaCore getClasspathContainer javaProject JavaModelException JavaCore getClasspathContainerInitializer getDescription javaProject getDescription makeRelative toString invalidContainer javaProject getElementName CP_VARIABLE_PATH_UNBOUND javaProject IJavaProject unboundVariablePath makeRelative toString javaProject getElementName CLASSPATH_CYCLE javaProject IJavaProject javaProject getElementName DISABLED_CP_EXCLUSION_PATTERNS javaProject IJavaProject projectName javaProject getElementName IPath newPath toString projectName newPath removeFirstSegments disabledInclusionExclusionPatterns newPath makeRelative toString projectName DISABLED_CP_MULTIPLE_OUTPUT_LOCATIONS javaProject IJavaProject projectName javaProject getElementName newPath toString projectName newPath removeFirstSegments disabledMultipleOutputLocations newPath makeRelative toString projectName INCOMPATIBLE_JDK_LEVEL javaProject IJavaProject incompatibleLibraryJDKLevel javaProject getElementName javaProject getOption JavaCore COMPILER_CODEGEN_TARGET_PLATFORM makeRelative toString getMessage toString
see I Java Model Status get Path public I Path get Path return path  IJavaModelStatus getPath IPath getPath
see I Status get Severity public int get Severity if children NO CHILDREN return super get Severity int severity 1 for int i 0 max children length i max i int children Severity children i get Severity if children Severity severity severity children Severity return severity  IStatus getSeverity getSeverity NO_CHILDREN getSeverity childrenSeverity getSeverity childrenSeverity childrenSeverity
see I Java Model Status get String deprecated public String get String return string  IJavaModelStatus getString getString
see I Java Model Status is Does Not Exist public boolean is Does Not Exist return get Code ELEMENT DOES NOT EXIST  IJavaModelStatus isDoesNotExist isDoesNotExist getCode ELEMENT_DOES_NOT_EXIST
see I Status is Multi Status public boolean is Multi Status return children NO CHILDREN  IStatus isMultiStatus isMultiStatus NO_CHILDREN
see I Status isOK public boolean isOK return get Code OK  IStatus getCode
see I Status matches int public boolean matches int mask if is Multi Status return matches this mask else for int i 0 max children length i max i if matches Java Model Status children i mask return true return false  IStatus isMultiStatus JavaModelStatus
Helper for matches int protected boolean matches Java Model Status status int mask int severity Mask mask 0x7 int category Mask mask 0x7 int bits status get Bits return severity Mask 0 bits severity Mask 0 category Mask 0 bits category Mask 0  JavaModelStatus severityMask categoryMask getBits severityMask severityMask categoryMask categoryMask
Creates and returns a new code I Java Model Status code that is a a multi status status see I Status is Multi Status public static I Java Model Status new Multi Status I Java Model Status children Java Model Status jms new Java Model Status jms children children return jms  IJavaModelStatus IStatus isMultiStatus IJavaModelStatus newMultiStatus IJavaModelStatus JavaModelStatus JavaModelStatus
Returns a printable representation of this exception for debugging purposes public String to String if this VERIFIED OK return Java Model Status OK NON NLS 1 String Buffer buffer new String Buffer buffer append Java Model Status NON NLS 1 buffer append get Message buffer append NON NLS 1 return buffer to String  toString VERIFIED_OK JavaModelStatus StringBuffer StringBuffer getMessage toString

Returns a canonicalized path from the given external path Note that the return path contains the same number of segments and it contains a device only if the given path contained one param external Path I Path see java io File for the definition of a canonicalized path return I Path public static I Path canonicalized Path I Path external Path if external Path null return null if Java Model Manager VERBOSE System out println JAVA MODEL Canonicalizing external Path to String NON NLS 1 if IS CASE SENSITIVE if Java Model Manager VERBOSE System out println JAVA MODEL Canonical path is original path file system is case sensitive NON NLS 1 return external Path if not external path return original path I Workspace workspace Resources Plugin get Workspace if workspace null return external Path protection during shutdown 30487 if workspace get Root find Member external Path null if Java Model Manager VERBOSE System out println JAVA MODEL Canonical path is original path member of workspace NON NLS 1 return external Path I Path canonical Path null try canonical Path new Path new File external Path toOS String get Canonical Path catch IO Exception e default to original path if Java Model Manager VERBOSE System out println JAVA MODEL Canonical path is original path IO Exception NON NLS 1 return external Path I Path result int canonical Length canonical Path segment Count if canonical Length 0 the java io File canonicalization failed if Java Model Manager VERBOSE System out println JAVA MODEL Canonical path is original path canonical path is empty NON NLS 1 return external Path else if external Path is Absolute result canonical Path else if path is relative remove the first segments that were added by the java io File canonicalization e g lib classes zip was converted to d myfolder lib classes zip int external Length external Path segment Count if canonical Length external Length result canonical Path remove First Segments canonical Length external Length else if Java Model Manager VERBOSE System out println JAVA MODEL Canonical path is original path canonical path is canonical Path to String NON NLS 1 NON NLS 2 return external Path keep device only if it was specified this is because File get Canonical Path converts lib classed zip to d lib classes zip if external Path get Device null result result set Device null if Java Model Manager VERBOSE System out println JAVA MODEL Canonical path is result to String NON NLS 1 return result  externalPath IPath IPath IPath canonicalizedPath IPath externalPath externalPath JavaModelManager externalPath toString IS_CASE_SENSITIVE JavaModelManager externalPath IWorkspace ResourcesPlugin getWorkspace externalPath getRoot findMember externalPath JavaModelManager externalPath IPath canonicalPath canonicalPath externalPath toOSString getCanonicalPath IOException JavaModelManager IOException externalPath IPath canonicalLength canonicalPath segmentCount canonicalLength JavaModelManager externalPath externalPath isAbsolute canonicalPath externalLength externalPath segmentCount canonicalLength externalLength canonicalPath removeFirstSegments canonicalLength externalLength JavaModelManager canonicalPath toString externalPath getCanonicalPath externalPath getDevice setDevice JavaModelManager toString
Constructor needed for code I Project get Nature code and code I Project add Nature code see set Project I Project public Java Project super null null  IProject getNature IProject addNature setProject IProject JavaProject
public Java Project I Project project Java Element parent super parent project get Name this project project  JavaProject IProject JavaElement getName
Adds a builder to the build spec for the given project protected void add To Build Spec String builderID throws Core Exception I Project Description description this project get Description int java Command Index get Java Command Index description get Build Spec if java Command Index 1 Add a Java command to the build spec I Command command description new Command command set Builder Name builderID set Java Command description command  addToBuildSpec CoreException IProjectDescription getDescription javaCommandIndex getJavaCommandIndex getBuildSpec javaCommandIndex ICommand newCommand setBuilderName setJavaCommand
see Openable protected boolean build Structure Openable Element Info info I Progress Monitor pm Map new Elements I Resource underlying Resource throws Java Model Exception check whether the java project can be opened if underlying Resource is Accessible throw new Not Present Exception I Workspace workspace Resources Plugin get Workspace I Workspace Root w Root workspace get Root cannot refresh cp markers on opening emulate cp check on startup since can create deadlocks see bug 37274 I Classpath Entry resolved Classpath get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress compute the pkg fragment roots info set Children compute Package Fragment Roots resolved Classpath false remember the timestamps of external libraries the first time they are looked up for int i 0 length resolved Classpath length i length i I Classpath Entry entry resolved Classpath i if entry get Entry Kind I Classpath Entry CPE LIBRARY I Path path entry get Path Object target Java Model get Target w Root path true if target instanceof java io File Map external Time Stamps Java Model Manager get Java Model Manager delta State external Time Stamps if external Time Stamps get path null long timestamp Delta Processor get Time Stamp java io File target external Time Stamps put path new Long timestamp return true  buildStructure OpenableElementInfo IProgressMonitor newElements IResource underlyingResource JavaModelException underlyingResource isAccessible newNotPresentException IWorkspace ResourcesPlugin getWorkspace IWorkspaceRoot wRoot getRoot IClasspathEntry resolvedClasspath getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress setChildren computePackageFragmentRoots resolvedClasspath resolvedClasspath IClasspathEntry resolvedClasspath getEntryKind IClasspathEntry CPE_LIBRARY IPath getPath JavaModel getTarget wRoot externalTimeStamps JavaModelManager getJavaModelManager deltaState externalTimeStamps externalTimeStamps DeltaProcessor getTimeStamp externalTimeStamps
protected void closing Object info forget source attachment recommendations Object children Java Element Info info children for int i 0 length children length i length i Object child children i if child instanceof Jar Package Fragment Root Jar Package Fragment Root child set Source Attachment Property null super closing info  JavaElementInfo JarPackageFragmentRoot JarPackageFragmentRoot setSourceAttachmentProperty
Computes the collection of package fragment roots local ones and set it on the given info Need to check all package fragment roots in order to reset Name Lookup param info Java Project Element Info throws Java Model Exception public void compute Children Java Project Element Info info throws Java Model Exception I Classpath Entry classpath get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress I Package Fragment Root old Roots info all Pkg Fragment Roots Cache if old Roots null I Package Fragment Root new Roots compute Package Fragment Roots classpath true check Identical compare all pkg fragment root lists if old Roots length new Roots length for int i 0 length old Roots length i length i if old Roots i equals new Roots i break check Identical return no need to update info reset Caches discard caches hold onto roots and pkg fragments info set Non Java Resources null info set Children compute Package Fragment Roots classpath false  NameLookup JavaProjectElementInfo JavaModelException computeChildren JavaProjectElementInfo JavaModelException IClasspathEntry getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress IPackageFragmentRoot oldRoots allPkgFragmentRootsCache oldRoots IPackageFragmentRoot newRoots computePackageFragmentRoots checkIdentical oldRoots newRoots oldRoots oldRoots newRoots checkIdentical resetCaches setNonJavaResources setChildren computePackageFragmentRoots
Internal computation of an expanded classpath It will eliminate duplicates and produce copies of exported classpath entries to avoid possible side effects ever after private void compute Expanded Classpath Java Project initial Project boolean ignore Unresolved Variable boolean generate Marker On Error Hash Set rootI Ds Object Vector accumulated Entries Map preferred Classpaths Map preferred Outputs throws Java Model Exception String project Root Id this rootID if rootI Ds contains project Root Id return break cycles if any rootI Ds add project Root Id I Classpath Entry preferred Classpath preferred Classpaths null I Classpath Entry preferred Classpaths get this null I Path preferred Output preferred Outputs null I Path preferred Outputs get this null I Classpath Entry immediate Classpath preferred Classpath null get Resolved Classpath preferred Classpath preferred Output ignore Unresolved Variable generate Marker On Error null get Resolved Classpath ignore Unresolved Variable generate Marker On Error false don t return Resolution In Progress I Workspace Root workspace Root Resources Plugin get Workspace get Root boolean is Initial Project this equals initial Project for int i 0 length immediate Classpath length i length i Classpath Entry entry Classpath Entry immediate Classpath i if is Initial Project entry is Exported String rootID entry rootID if rootI Ds contains rootID continue accumulated Entries add entry recurse in project to get all its indirect exports only consider exported entries from there on if entry get Entry Kind I Classpath Entry CPE PROJECT I Resource member workspace Root find Member entry get Path if member null member get Type I Resource PROJECT double check if bound to project 23977 I Project proj Rsc I Project member if Java Project has Java Nature proj Rsc Java Project java Project Java Project Java Core create proj Rsc java Project compute Expanded Classpath initial Project ignore Unresolved Variable false no marker when recursing in prereq rootI Ds accumulated Entries preferred Classpaths preferred Outputs else rootI Ds add rootID  computeExpandedClasspath JavaProject initialProject ignoreUnresolvedVariable generateMarkerOnError HashSet rootIDs ObjectVector accumulatedEntries preferredClasspaths preferredOutputs JavaModelException projectRootId rootIDs projectRootId rootIDs projectRootId IClasspathEntry preferredClasspath preferredClasspaths IClasspathEntry preferredClasspaths IPath preferredOutput preferredOutputs IPath preferredOutputs IClasspathEntry immediateClasspath preferredClasspath getResolvedClasspath preferredClasspath preferredOutput ignoreUnresolvedVariable generateMarkerOnError getResolvedClasspath ignoreUnresolvedVariable generateMarkerOnError returnResolutionInProgress IWorkspaceRoot workspaceRoot ResourcesPlugin getWorkspace getRoot isInitialProject initialProject immediateClasspath ClasspathEntry ClasspathEntry immediateClasspath isInitialProject isExported rootIDs accumulatedEntries getEntryKind IClasspathEntry CPE_PROJECT IResource workspaceRoot findMember getPath getType IResource IProject projRsc IProject JavaProject hasJavaNature projRsc JavaProject javaProject JavaProject JavaCore projRsc javaProject computeExpandedClasspath initialProject ignoreUnresolvedVariable rootIDs accumulatedEntries preferredClasspaths preferredOutputs rootIDs
Returns local all the package fragment roots identified by the given project s classpath Note this follows project classpath references to find required project contributions eliminating duplicates silently Only works with resolved entries param resolved Classpath I Classpath Entry param retrieve Exported Roots boolean return I Package Fragment Root throws Java Model Exception public I Package Fragment Root compute Package Fragment Roots I Classpath Entry resolved Classpath boolean retrieve Exported Roots throws Java Model Exception Object Vector accumulated Roots new Object Vector compute Package Fragment Roots resolved Classpath accumulated Roots new Hash Set 5 rootI Ds true inside original project true check existency retrieve Exported Roots I Package Fragment Root root Array new I Package Fragment Root accumulated Roots size accumulated Roots copy Into root Array return root Array  resolvedClasspath IClasspathEntry retrieveExportedRoots IPackageFragmentRoot JavaModelException IPackageFragmentRoot computePackageFragmentRoots IClasspathEntry resolvedClasspath retrieveExportedRoots JavaModelException ObjectVector accumulatedRoots ObjectVector computePackageFragmentRoots resolvedClasspath accumulatedRoots HashSet rootIDs retrieveExportedRoots IPackageFragmentRoot rootArray IPackageFragmentRoot accumulatedRoots accumulatedRoots copyInto rootArray rootArray
Computes the package fragment roots identified by the given entry Only works with resolved entry param resolved Entry I Classpath Entry return I Package Fragment Root public I Package Fragment Root compute Package Fragment Roots I Classpath Entry resolved Entry try return compute Package Fragment Roots new I Classpath Entry resolved Entry false don t retrieve exported roots catch Java Model Exception e return new I Package Fragment Root  resolvedEntry IClasspathEntry IPackageFragmentRoot IPackageFragmentRoot computePackageFragmentRoots IClasspathEntry resolvedEntry computePackageFragmentRoots IClasspathEntry resolvedEntry JavaModelException IPackageFragmentRoot
Returns the package fragment roots identified by the given entry In case it refers to a project it will follow its classpath so as to find exported roots as well Only works with resolved entry param resolved Entry I Classpath Entry param accumulated Roots Object Vector param rootI Ds Hash Set param inside Original Project boolean param check Existency boolean param retrieve Exported Roots boolean throws Java Model Exception public void compute Package Fragment Roots I Classpath Entry resolved Entry Object Vector accumulated Roots Hash Set rootI Ds boolean inside Original Project boolean check Existency boolean retrieve Exported Roots throws Java Model Exception String rootID Classpath Entry resolved Entry rootID if rootI Ds contains rootID return I Path project Path this project get Full Path I Path entry Path resolved Entry get Path I Workspace Root workspace Root Resources Plugin get Workspace get Root switch resolved Entry get Entry Kind source folder case I Classpath Entry CPE SOURCE if project Path is Prefix Of entry Path if check Existency Object target Java Model get Target workspace Root entry Path check Existency if target null return if target instanceof I Folder target instanceof I Project accumulated Roots add get Package Fragment Root I Resource target rootI Ds add rootID else I Package Fragment Root root get Folder Package Fragment Root entry Path if root null accumulated Roots add root rootI Ds add rootID break internal external JAR or folder case I Classpath Entry CPE LIBRARY if inside Original Project resolved Entry is Exported return if check Existency Object target Java Model get Target workspace Root entry Path check Existency if target null return if target instanceof I Resource internal target I Resource resource I Resource target I Package Fragment Root root get Package Fragment Root resource if root null accumulated Roots add root rootI Ds add rootID else external target only JA Rs allowed if java io File target is File org eclipse jdt internal compiler util Util is Archive File Name entry Path last Segment accumulated Roots add new Jar Package Fragment Root entry Path this rootI Ds add rootID else I Package Fragment Root root get Package Fragment Root entry Path if root null accumulated Roots add root rootI Ds add rootID break recurse into required project case I Classpath Entry CPE PROJECT if retrieve Exported Roots return if inside Original Project resolved Entry is Exported return I Resource member workspace Root find Member entry Path if member null member get Type I Resource PROJECT double check if bound to project 23977 I Project required Project Rsc I Project member if Java Project has Java Nature required Project Rsc special builder binary output rootI Ds add rootID Java Project required Project Java Project Java Core create required Project Rsc required Project compute Package Fragment Roots required Project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress accumulated Roots rootI Ds false check Existency retrieve Exported Roots break  resolvedEntry IClasspathEntry accumulatedRoots ObjectVector rootIDs HashSet insideOriginalProject checkExistency retrieveExportedRoots JavaModelException computePackageFragmentRoots IClasspathEntry resolvedEntry ObjectVector accumulatedRoots HashSet rootIDs insideOriginalProject checkExistency retrieveExportedRoots JavaModelException ClasspathEntry resolvedEntry rootIDs IPath projectPath getFullPath IPath entryPath resolvedEntry getPath IWorkspaceRoot workspaceRoot ResourcesPlugin getWorkspace getRoot resolvedEntry getEntryKind IClasspathEntry CPE_SOURCE projectPath isPrefixOf entryPath checkExistency JavaModel getTarget workspaceRoot entryPath checkExistency IFolder IProject accumulatedRoots getPackageFragmentRoot IResource rootIDs IPackageFragmentRoot getFolderPackageFragmentRoot entryPath accumulatedRoots rootIDs IClasspathEntry CPE_LIBRARY insideOriginalProject resolvedEntry isExported checkExistency JavaModel getTarget workspaceRoot entryPath checkExistency IResource IResource IResource IPackageFragmentRoot getPackageFragmentRoot accumulatedRoots rootIDs JARs isFile isArchiveFileName entryPath lastSegment accumulatedRoots JarPackageFragmentRoot entryPath rootIDs IPackageFragmentRoot getPackageFragmentRoot entryPath accumulatedRoots rootIDs IClasspathEntry CPE_PROJECT retrieveExportedRoots insideOriginalProject resolvedEntry isExported IResource workspaceRoot findMember entryPath getType IResource IProject requiredProjectRsc IProject JavaProject hasJavaNature requiredProjectRsc rootIDs JavaProject requiredProject JavaProject JavaCore requiredProjectRsc requiredProject computePackageFragmentRoots requiredProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress accumulatedRoots rootIDs checkExistency retrieveExportedRoots
Returns local all the package fragment roots identified by the given project s classpath Note this follows project classpath references to find required project contributions eliminating duplicates silently Only works with resolved entries param resolved Classpath I Classpath Entry param accumulated Roots Object Vector param rootI Ds Hash Set param inside Original Project boolean param check Existency boolean param retrieve Exported Roots boolean throws Java Model Exception public void compute Package Fragment Roots I Classpath Entry resolved Classpath Object Vector accumulated Roots Hash Set rootI Ds boolean inside Original Project boolean check Existency boolean retrieve Exported Roots throws Java Model Exception if inside Original Project rootI Ds add rootID for int i 0 length resolved Classpath length i length i compute Package Fragment Roots resolved Classpath i accumulated Roots rootI Ds inside Original Project check Existency retrieve Exported Roots  resolvedClasspath IClasspathEntry accumulatedRoots ObjectVector rootIDs HashSet insideOriginalProject checkExistency retrieveExportedRoots JavaModelException computePackageFragmentRoots IClasspathEntry resolvedClasspath ObjectVector accumulatedRoots HashSet rootIDs insideOriginalProject checkExistency retrieveExportedRoots JavaModelException insideOriginalProject rootIDs resolvedClasspath computePackageFragmentRoots resolvedClasspath accumulatedRoots rootIDs insideOriginalProject checkExistency retrieveExportedRoots
Compute the file name to use for a given shared property param q Name Qualified Name return String public String compute Shared Property File Name Qualified Name q Name return q Name get Local Name  qName QualifiedName computeSharedPropertyFileName QualifiedName qName qName getLocalName
Configure the project with Java nature public void configure throws Core Exception register Java builder add To Build Spec Java Core BUILDER ID  CoreException addToBuildSpec JavaCore BUILDER_ID
public boolean contains I Resource resource I Classpath Entry classpath I Path output try classpath get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress output get Output Location catch Java Model Exception e return false I Path full Path resource get Full Path I Path inner Most Output output is Prefix Of full Path output null I Classpath Entry inner Most Entry null for int j 0 cp Length classpath length j cp Length j I Classpath Entry entry classpath j I Path entry Path entry get Path if inner Most Entry null inner Most Entry get Path is Prefix Of entry Path entry Path is Prefix Of full Path inner Most Entry entry I Path entry Output classpath j get Output Location if entry Output null entry Output is Prefix Of full Path inner Most Output entry Output if inner Most Entry null special case prj src and nested output location if inner Most Output null inner Most Output segment Count 1 output isn t project inner Most Entry get Path segment Count 1 1 segment must be project name return false if resource instanceof I Folder folders are always included in src lib entries return true switch inner Most Entry get Entry Kind case I Classpath Entry CPE SOURCE class files are not visible in source folders return org eclipse jdt internal compiler util Util is Class File Name full Path last Segment case I Classpath Entry CPE LIBRARY java files are not visible in library folders return org eclipse jdt internal compiler util Util is Java File Name full Path last Segment if inner Most Output null return false return true  IResource IClasspathEntry IPath getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress getOutputLocation JavaModelException IPath fullPath getFullPath IPath innerMostOutput isPrefixOf fullPath IClasspathEntry innerMostEntry cpLength cpLength IClasspathEntry IPath entryPath getPath innerMostEntry innerMostEntry getPath isPrefixOf entryPath entryPath isPrefixOf fullPath innerMostEntry IPath entryOutput getOutputLocation entryOutput entryOutput isPrefixOf fullPath innerMostOutput entryOutput innerMostEntry innerMostOutput innerMostOutput segmentCount innerMostEntry getPath segmentCount IFolder innerMostEntry getEntryKind IClasspathEntry CPE_SOURCE isClassFileName fullPath lastSegment IClasspathEntry CPE_LIBRARY isJavaFileName fullPath lastSegment innerMostOutput
Record a new marker denoting a classpath problem void create Classpath Problem Marker I Java Model Status status I Marker marker null int severity String arguments new String 0 boolean is Cycle Problem false is Classpath File Format Problem false switch status get Code case I Java Model Status Constants CLASSPATH CYCLE is Cycle Problem true if Java Core ERROR equals get Option Java Core CORE CIRCULAR CLASSPATH true severity I Marker SEVERITY ERROR else severity I Marker SEVERITY WARNING break case I Java Model Status Constants INVALID CLASSPATH FILE FORMAT is Classpath File Format Problem true severity I Marker SEVERITY ERROR break case I Java Model Status Constants INCOMPATIBLE JDK LEVEL String setting get Option Java Core CORE INCOMPATIBLE JDK LEVEL true if Java Core ERROR equals setting severity I Marker SEVERITY ERROR else if Java Core WARNING equals setting severity I Marker SEVERITY WARNING else return setting IGNORE break default I Path path status get Path if path null arguments new String path to String if Java Core ERROR equals get Option Java Core CORE INCOMPLETE CLASSPATH true severity I Marker SEVERITY ERROR else severity I Marker SEVERITY WARNING break try marker this project create Marker I Java Model Marker BUILDPATH PROBLEM MARKER marker set Attributes new String I Marker MESSAGE I Marker SEVERITY I Marker LOCATION I Java Model Marker CYCLE DETECTED I Java Model Marker CLASSPATH FILE FORMAT I Java Model Marker ID I Java Model Marker ARGUMENTS new Object status get Message new Integer severity Util bind classpath build Path NON NLS 1 is Cycle Problem true false NON NLS 1 NON NLS 2 is Classpath File Format Problem true false NON NLS 1 NON NLS 2 new Integer status get Code Util get Problem Arguments For Marker arguments catch Core Exception e could not create marker cannot do much if Java Model Manager VERBOSE e print Stack Trace  createClasspathProblemMarker IJavaModelStatus IMarker isCycleProblem isClasspathFileFormatProblem getCode IJavaModelStatusConstants CLASSPATH_CYCLE isCycleProblem JavaCore getOption JavaCore CORE_CIRCULAR_CLASSPATH IMarker SEVERITY_ERROR IMarker SEVERITY_WARNING IJavaModelStatusConstants INVALID_CLASSPATH_FILE_FORMAT isClasspathFileFormatProblem IMarker SEVERITY_ERROR IJavaModelStatusConstants INCOMPATIBLE_JDK_LEVEL getOption JavaCore CORE_INCOMPATIBLE_JDK_LEVEL JavaCore IMarker SEVERITY_ERROR JavaCore IMarker SEVERITY_WARNING IPath getPath toString JavaCore getOption JavaCore CORE_INCOMPLETE_CLASSPATH IMarker SEVERITY_ERROR IMarker SEVERITY_WARNING createMarker IJavaModelMarker BUILDPATH_PROBLEM_MARKER setAttributes IMarker IMarker IMarker IJavaModelMarker CYCLE_DETECTED IJavaModelMarker CLASSPATH_FILE_FORMAT IJavaModelMarker IJavaModelMarker getMessage buildPath isCycleProblem isClasspathFileFormatProblem getCode getProblemArgumentsForMarker CoreException JavaModelManager printStackTrace
Returns a new element info for this element protected Object create Element Info return new Java Project Element Info  createElementInfo JavaProjectElementInfo
Reads and decode an XML classpath string protected I Classpath Entry decode Classpath String xml Classpath boolean create Marker boolean log Problems Array List paths new Array List I Classpath Entry default Output null try if xml Classpath null return null String Reader reader new String Reader xml Classpath Element cp Element try Document Builder parser Document Builder Factory new Instance new Document Builder cp Element parser parse new Input Source reader get Document Element catch SAX Exception e throw new IO Exception Util bind file bad Format NON NLS 1 catch Parser Configuration Exception e throw new IO Exception Util bind file bad Format NON NLS 1 finally reader close if cp Element get Node Name equals Ignore Case classpath NON NLS 1 throw new IO Exception Util bind file bad Format NON NLS 1 Node List list cp Element get Elements By Tag Name classpathentry NON NLS 1 int length list get Length for int i 0 i length i Node node list item i if node get Node Type Node ELEMENT NODE I Classpath Entry entry Classpath Entry element Decode Element node this if entry null if entry get Content Kind Classpath Entry K OUTPUT default Output entry separate output else paths add entry catch IO Exception e bad format if create Marker this project is Accessible this create Classpath Problem Marker new Java Model Status I Java Model Status Constants INVALID CLASSPATH FILE FORMAT Util bind classpath xml Format Error this get Element Name e get Message NON NLS 1 if log Problems Util log e Exception while retrieving this get Path NON NLS 1 classpath will mark classpath as invalid NON NLS 1 return INVALID CLASSPATH catch Assert Assertion Failed Exception e failed creating CP entries from file if create Marker this project is Accessible this create Classpath Problem Marker new Java Model Status I Java Model Status Constants INVALID CLASSPATH FILE FORMAT Util bind classpath illegal Entry In Classpath File this get Element Name e get Message NON NLS 1 if log Problems Util log e Exception while retrieving this get Path NON NLS 1 classpath will mark classpath as invalid NON NLS 1 return INVALID CLASSPATH int path Size paths size if path Size 0 default Output null I Classpath Entry entries new I Classpath Entry path Size default Output null 0 1 paths to Array entries if default Output null entries path Size default Output ensure output is last item return entries else return null  IClasspathEntry decodeClasspath xmlClasspath createMarker logProblems ArrayList ArrayList IClasspathEntry defaultOutput xmlClasspath StringReader StringReader xmlClasspath cpElement DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder cpElement InputSource getDocumentElement SAXException IOException badFormat ParserConfigurationException IOException badFormat cpElement getNodeName equalsIgnoreCase IOException badFormat NodeList cpElement getElementsByTagName getLength getNodeType ELEMENT_NODE IClasspathEntry ClasspathEntry elementDecode getContentKind ClasspathEntry K_OUTPUT defaultOutput IOException createMarker isAccessible createClasspathProblemMarker JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH_FILE_FORMAT xmlFormatError getElementName getMessage logProblems getPath INVALID_CLASSPATH AssertionFailedException createMarker isAccessible createClasspathProblemMarker JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH_FILE_FORMAT illegalEntryInClasspathFile getElementName getMessage logProblems getPath INVALID_CLASSPATH pathSize pathSize defaultOutput IClasspathEntry IClasspathEntry pathSize defaultOutput toArray defaultOutput pathSize defaultOutput
Removes the Java nature from the project public void deconfigure throws Core Exception deregister Java builder remove From Build Spec Java Core BUILDER ID  CoreException removeFromBuildSpec JavaCore BUILDER_ID
Returns a default class path This is the root of the project protected I Classpath Entry default Classpath return new I Classpath Entry Java Core new Source Entry this project get Full Path  IClasspathEntry defaultClasspath IClasspathEntry JavaCore newSourceEntry getFullPath
Returns a default output location This is the project bin folder protected I Path default Output Location return this project get Full Path append bin NON NLS 1  IPath defaultOutputLocation getFullPath
Returns the XML String encoding of the class path protected String encode Classpath I Classpath Entry classpath I Path output Location boolean indent throws Java Model Exception try Byte Array Output Stream s new Byte Array Output Stream Output Stream Writer writer new Output Stream Writer s UTF8 NON NLS 1 XML Writer xml Writer new XML Writer writer xml Writer start Tag classpath indent NON NLS 1 for int i 0 i classpath length i Classpath Entry classpath i element Encode xml Writer this project get Full Path indent true if output Location null output Location output Location remove First Segments 1 output Location output Location make Relative Hash Map parameters new Hash Map parameters put kind Classpath Entry kind To String Classpath Entry K OUTPUT NON NLS 1 parameters put path String value Of output Location NON NLS 1 xml Writer print Tag classpathentry parameters indent true true NON NLS 1 xml Writer end Tag classpath indent NON NLS 1 writer flush writer close return s to String UTF8 NON NLS 1 catch IO Exception e throw new Java Model Exception e I Java Model Status Constants IO EXCEPTION  encodeClasspath IClasspathEntry IPath outputLocation JavaModelException ByteArrayOutputStream ByteArrayOutputStream OutputStreamWriter OutputStreamWriter XMLWriter xmlWriter XMLWriter xmlWriter startTag ClasspathEntry elementEncode xmlWriter getFullPath outputLocation outputLocation outputLocation removeFirstSegments outputLocation outputLocation makeRelative HashMap HashMap ClasspathEntry kindToString ClasspathEntry K_OUTPUT valueOf outputLocation xmlWriter printTag xmlWriter endTag toString IOException JavaModelException IJavaModelStatusConstants IO_EXCEPTION
Returns true if this handle represents the same Java project as the given handle Two handles represent the same project if they are identical or if they represent a project with the same underlying resource and occurrence counts see Java Element equals Object public boolean equals Object o if this o return true if o instanceof Java Project return false Java Project other Java Project o return this project equals other get Project this occurrence Count other occurrence Count  JavaElement JavaProject JavaProject JavaProject getProject occurrenceCount occurrenceCount
public boolean exists return has Java Nature this project  hasJavaNature
see I Java Project public I Java Element find Element I Path path throws Java Model Exception return find Element path Default Working Copy Owner PRIMARY  IJavaProject IJavaElement findElement IPath JavaModelException findElement DefaultWorkingCopyOwner
see I Java Project public I Java Element find Element I Path path Working Copy Owner owner throws Java Model Exception if path null path is Absolute throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID PATH path try String extension path get File Extension if extension null String package Name path to String replace I Path SEPARATOR Name Lookup lookup new Name Lookup Working Copy Owner null no need to look at working copies for pkgs I Package Fragment pkg Fragments lookup find Package Fragments package Name false if pkg Fragments null return null else try to return one that is a child of this project for int i 0 length pkg Fragments length i length i I Package Fragment pkg Fragment pkg Fragments i if this equals pkg Fragment get Parent get Parent return pkg Fragment default to the first one return pkg Fragments 0 else if extension equals Ignore Case EXTENSION java extension equals Ignore Case EXTENSION class I Path package Path path remove Last Segments 1 String package Name package Path to String replace I Path SEPARATOR String type Name path last Segment type Name type Name substring 0 type Name length extension length 1 String qualified Name null if package Name length 0 qualified Name package Name type Name NON NLS 1 else qualified Name type Name lookup type Name Lookup lookup new Name Lookup owner I Type type lookup find Type qualified Name false Name Lookup ACCEPT CLASSES Name Lookup ACCEPT INTERFACES if type null return type get Parent else return null else unsupported extension return null catch Java Model Exception e if e get Status get Code I Java Model Status Constants ELEMENT DOES NOT EXIST return null else throw e  IJavaProject IJavaElement findElement IPath WorkingCopyOwner JavaModelException isAbsolute JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_PATH getFileExtension packageName toString IPath NameLookup newNameLookup WorkingCopyOwner IPackageFragment pkgFragments findPackageFragments packageName pkgFragments pkgFragments IPackageFragment pkgFragment pkgFragments pkgFragment getParent getParent pkgFragment pkgFragments equalsIgnoreCase EXTENSION_java equalsIgnoreCase EXTENSION_class IPath packagePath removeLastSegments packageName packagePath toString IPath typeName lastSegment typeName typeName typeName qualifiedName packageName qualifiedName packageName typeName qualifiedName typeName NameLookup newNameLookup IType findType qualifiedName NameLookup ACCEPT_CLASSES NameLookup ACCEPT_INTERFACES getParent JavaModelException getStatus getCode IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST
see I Java Project public I Package Fragment find Package Fragment I Path path throws Java Model Exception return find Package Fragment0 Java Project canonicalized Path path  IJavaProject IPackageFragment findPackageFragment IPath JavaModelException findPackageFragment0 JavaProject canonicalizedPath
private I Package Fragment find Package Fragment0 I Path path throws Java Model Exception Name Lookup lookup new Name Lookup Working Copy Owner null no need to look at working copies for pkgs return lookup find Package Fragment path  IPackageFragment findPackageFragment0 IPath JavaModelException NameLookup newNameLookup WorkingCopyOwner findPackageFragment
see I Java Project public I Package Fragment Root find Package Fragment Root I Path path throws Java Model Exception return find Package Fragment Root0 Java Project canonicalized Path path  IJavaProject IPackageFragmentRoot findPackageFragmentRoot IPath JavaModelException findPackageFragmentRoot0 JavaProject canonicalizedPath
public I Package Fragment Root find Package Fragment Root0 I Path path throws Java Model Exception I Package Fragment Root all Roots this get All Package Fragment Roots if path is Absolute throw new Illegal Argument Exception Util bind path must Be Absolute NON NLS 1 for int i 0 i all Roots length i I Package Fragment Root classpath Root all Roots i if classpath Root get Path equals path return classpath Root return null  IPackageFragmentRoot findPackageFragmentRoot0 IPath JavaModelException IPackageFragmentRoot allRoots getAllPackageFragmentRoots isAbsolute IllegalArgumentException mustBeAbsolute allRoots IPackageFragmentRoot classpathRoot allRoots classpathRoot getPath classpathRoot
see I Java Project public I Package Fragment Root find Package Fragment Roots I Classpath Entry entry try I Classpath Entry classpath this get Raw Classpath for int i 0 length classpath length i length i if classpath i equals entry entry may need to be resolved return compute Package Fragment Roots get Resolved Classpath new I Classpath Entry entry null true false null no reverse map false don t retrieve exported roots catch Java Model Exception e project doesn t exist return an empty array return new I Package Fragment Root  IJavaProject IPackageFragmentRoot findPackageFragmentRoots IClasspathEntry IClasspathEntry getRawClasspath computePackageFragmentRoots getResolvedClasspath IClasspathEntry JavaModelException IPackageFragmentRoot
see I Java Project find Type String public I Type find Type String fully Qualified Name throws Java Model Exception return find Type fully Qualified Name Default Working Copy Owner PRIMARY  IJavaProject findType IType findType fullyQualifiedName JavaModelException findType fullyQualifiedName DefaultWorkingCopyOwner
see I Java Project find Type String Working Copy Owner public I Type find Type String fully Qualified Name Working Copy Owner owner throws Java Model Exception Name Lookup lookup new Name Lookup owner I Type type lookup find Type fully Qualified Name false Name Lookup ACCEPT CLASSES Name Lookup ACCEPT INTERFACES if type null try to find enclosing type int last Dot fully Qualified Name last Index Of if last Dot 1 return null type this find Type fully Qualified Name substring 0 last Dot if type null type type get Type fully Qualified Name substring last Dot 1 if type exists return null return type  IJavaProject findType WorkingCopyOwner IType findType fullyQualifiedName WorkingCopyOwner JavaModelException NameLookup newNameLookup IType findType fullyQualifiedName NameLookup ACCEPT_CLASSES NameLookup ACCEPT_INTERFACES lastDot fullyQualifiedName lastIndexOf lastDot findType fullyQualifiedName lastDot getType fullyQualifiedName lastDot
see I Java Project find Type String String public I Type find Type String package Name String type Qualified Name throws Java Model Exception return find Type package Name type Qualified Name Default Working Copy Owner PRIMARY  IJavaProject findType IType findType packageName typeQualifiedName JavaModelException findType packageName typeQualifiedName DefaultWorkingCopyOwner
see I Java Project find Type String String Working Copy Owner public I Type find Type String package Name String type Qualified Name Working Copy Owner owner throws Java Model Exception Name Lookup lookup new Name Lookup owner return lookup find Type type Qualified Name package Name false Name Lookup ACCEPT CLASSES Name Lookup ACCEPT INTERFACES  IJavaProject findType WorkingCopyOwner IType findType packageName typeQualifiedName WorkingCopyOwner JavaModelException NameLookup newNameLookup findType typeQualifiedName packageName NameLookup ACCEPT_CLASSES NameLookup ACCEPT_INTERFACES
Remove all markers denoting classpath problems TODO philippe should improve to use a bitmask instead of booleans CYCLE FORMAT VALID protected void flush Classpath Problem Markers boolean flush Cycle Markers boolean flush Classpath Format Markers try if this project is Accessible I Marker markers this project find Markers I Java Model Marker BUILDPATH PROBLEM MARKER false I Resource DEPTH ZERO for int i 0 length markers length i length i I Marker marker markers i if flush Cycle Markers flush Classpath Format Markers marker delete else String cycle Attr String marker get Attribute I Java Model Marker CYCLE DETECTED String classpath File Format Attr String marker get Attribute I Java Model Marker CLASSPATH FILE FORMAT if flush Cycle Markers cycle Attr null cycle Attr equals true NON NLS 1 flush Classpath Format Markers classpath File Format Attr null classpath File Format Attr equals true NON NLS 1 marker delete catch Core Exception e could not flush markers not much we can do if Java Model Manager VERBOSE e print Stack Trace  flushClasspathProblemMarkers flushCycleMarkers flushClasspathFormatMarkers isAccessible IMarker findMarkers IJavaModelMarker BUILDPATH_PROBLEM_MARKER IResource DEPTH_ZERO IMarker flushCycleMarkers flushClasspathFormatMarkers cycleAttr getAttribute IJavaModelMarker CYCLE_DETECTED classpathFileFormatAttr getAttribute IJavaModelMarker CLASSPATH_FILE_FORMAT flushCycleMarkers cycleAttr cycleAttr flushClasspathFormatMarkers classpathFileFormatAttr classpathFileFormatAttr CoreException JavaModelManager printStackTrace
protected void force Classpath Reload I Progress Monitor monitor throws Java Model Exception if monitor null monitor is Canceled return check if any actual difference boolean was Successful false flag recording if classpath file change got reflected try force to re read the property file I Classpath Entry file Entries read Classpath File false don t create markers false don t log problems if file Entries null return could not read ignore Java Model Manager Per Project Info info get Per Project Info if info raw Classpath null if there is an in memory classpath if is Classpath Equals To info raw Classpath info output Location file Entries was Successful true return will force an update of the classpath output location based on the file information extract out the output location I Path output Location null if file Entries null file Entries length 0 I Classpath Entry entry file Entries file Entries length 1 if entry get Content Kind Classpath Entry K OUTPUT output Location entry get Path I Classpath Entry copy new I Classpath Entry file Entries length 1 System arraycopy file Entries 0 copy 0 copy length file Entries copy restore output location if output Location null output Location Set Classpath Operation Reuse Output Location clean mode will also default to reusing current one I Classpath Entry old Resolved Classpath info resolved Classpath set Raw Classpath file Entries output Location monitor Resources Plugin get Workspace is Tree Locked can Change Resource old Resolved Classpath null old Resolved Classpath get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress true need Validation false no need to save if reach that far the classpath file change got absorbed was Successful true catch Runtime Exception e set Raw Classpath might fire a delta and a listener may throw an exception if this project is Accessible Util log e Could not set classpath for get Path NON NLS 1 throw e rethrow catch Java Model Exception e CP failed validation if Resources Plugin get Workspace is Tree Locked if this project is Accessible if e get Java Model Status get Exception instanceof Core Exception happens if the classpath could not be written to disk create Classpath Problem Marker new Java Model Status I Java Model Status Constants INVALID CLASSPATH FILE FORMAT Util bind classpath could Not Write Classpath File get Element Name e get Message NON NLS 1 else create Classpath Problem Marker new Java Model Status I Java Model Status Constants INVALID CLASSPATH FILE FORMAT Util bind classpath invalid Classpath In Classpath File get Element Name e get Message NON NLS 1 throw e rethrow finally if was Successful try this get Per Project Info update Classpath Information Java Project INVALID CLASSPATH update Package Fragment Roots catch Java Model Exception e ignore  forceClasspathReload IProgressMonitor JavaModelException isCanceled wasSuccessful IClasspathEntry fileEntries readClasspathFile fileEntries JavaModelManager PerProjectInfo getPerProjectInfo rawClasspath isClasspathEqualsTo rawClasspath outputLocation fileEntries wasSuccessful IPath outputLocation fileEntries fileEntries IClasspathEntry fileEntries fileEntries getContentKind ClasspathEntry K_OUTPUT outputLocation getPath IClasspathEntry IClasspathEntry fileEntries fileEntries fileEntries outputLocation outputLocation SetClasspathOperation ReuseOutputLocation IClasspathEntry oldResolvedClasspath resolvedClasspath setRawClasspath fileEntries outputLocation ResourcesPlugin getWorkspace isTreeLocked canChangeResource oldResolvedClasspath oldResolvedClasspath getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress needValidation wasSuccessful RuntimeException setRawClasspath isAccessible getPath JavaModelException ResourcesPlugin getWorkspace isTreeLocked isAccessible getJavaModelStatus getException CoreException createClasspathProblemMarker JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH_FILE_FORMAT couldNotWriteClasspathFile getElementName getMessage createClasspathProblemMarker JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH_FILE_FORMAT invalidClasspathInClasspathFile getElementName getMessage wasSuccessful getPerProjectInfo updateClasspathInformation JavaProject INVALID_CLASSPATH updatePackageFragmentRoots JavaModelException
see I Java Project public I Package Fragment Root get All Package Fragment Roots throws Java Model Exception return compute Package Fragment Roots get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress true retrieve Exported Roots  IJavaProject IPackageFragmentRoot getAllPackageFragmentRoots JavaModelException computePackageFragmentRoots getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress retrieveExportedRoots
Returns the classpath entry that refers to the given path or code null code if there is no reference to the path param path I Path return I Classpath Entry throws Java Model Exception public I Classpath Entry get Classpath Entry For I Path path throws Java Model Exception I Classpath Entry entries get Expanded Classpath true for int i 0 i entries length i if entries i get Path equals path return entries i return null  IPath IClasspathEntry JavaModelException IClasspathEntry getClasspathEntryFor IPath JavaModelException IClasspathEntry getExpandedClasspath getPath
public I Marker get Cycle Marker try if this project is Accessible I Marker markers this project find Markers I Java Model Marker BUILDPATH PROBLEM MARKER false I Resource DEPTH ZERO for int i 0 length markers length i length i I Marker marker markers i String cycle Attr String marker get Attribute I Java Model Marker CYCLE DETECTED if cycle Attr null cycle Attr equals true NON NLS 1 return marker catch Core Exception e could not get markers return null return null  IMarker getCycleMarker isAccessible IMarker findMarkers IJavaModelMarker BUILDPATH_PROBLEM_MARKER IResource DEPTH_ZERO IMarker cycleAttr getAttribute IJavaModelMarker CYCLE_DETECTED cycleAttr cycleAttr CoreException
see I Java Element public int get Element Type return JAVA PROJECT  IJavaElement getElementType JAVA_PROJECT
This is a helper method returning the expanded classpath for the project as a list of classpath entries where all classpath variable entries have been resolved and substituted with their final target entries All project exports have been appended to project entries param ignore Unresolved Variable boolean return I Classpath Entry throws Java Model Exception public I Classpath Entry get Expanded Classpath boolean ignore Unresolved Variable throws Java Model Exception return get Expanded Classpath ignore Unresolved Variable false don t create markers null null  ignoreUnresolvedVariable IClasspathEntry JavaModelException IClasspathEntry getExpandedClasspath ignoreUnresolvedVariable JavaModelException getExpandedClasspath ignoreUnresolvedVariable
Internal variant which can create marker on project for invalid entries it will also perform classpath expansion in presence of project prerequisites exporting their entries param ignore Unresolved Variable boolean param generate Marker On Error boolean param preferred Classpaths Map param preferred Outputs Map return I Classpath Entry throws Java Model Exception public I Classpath Entry get Expanded Classpath boolean ignore Unresolved Variable boolean generate Marker On Error Map preferred Classpaths Map preferred Outputs throws Java Model Exception Object Vector accumulated Entries new Object Vector compute Expanded Classpath this ignore Unresolved Variable generate Marker On Error new Hash Set 5 accumulated Entries preferred Classpaths preferred Outputs I Classpath Entry expanded Path new I Classpath Entry accumulated Entries size accumulated Entries copy Into expanded Path return expanded Path  ignoreUnresolvedVariable generateMarkerOnError preferredClasspaths preferredOutputs IClasspathEntry JavaModelException IClasspathEntry getExpandedClasspath ignoreUnresolvedVariable generateMarkerOnError preferredClasspaths preferredOutputs JavaModelException ObjectVector accumulatedEntries ObjectVector computeExpandedClasspath ignoreUnresolvedVariable generateMarkerOnError HashSet accumulatedEntries preferredClasspaths preferredOutputs IClasspathEntry expandedPath IClasspathEntry accumulatedEntries accumulatedEntries copyInto expandedPath expandedPath
public I Java Element get Handle From Memento String token Memento Tokenizer memento Working Copy Owner owner switch token char At 0 case JEM COUNT return get Handle Updating Count From Memento memento owner case JEM PACKAGEFRAGMENTROOT String root Path I Package Fragment Root DEFAULT PACKAGEROOT PATH token null while memento has More Tokens token memento next Token char first Char token char At 0 if first Char JEM PACKAGEFRAGMENT first Char JEM COUNT root Path token else break Java Element root Java Element get Package Fragment Root new Path root Path if token null token char At 0 JEM PACKAGEFRAGMENT return root get Handle From Memento token memento owner else return root get Handle From Memento memento owner return null  IJavaElement getHandleFromMemento MementoTokenizer WorkingCopyOwner charAt JEM_COUNT getHandleUpdatingCountFromMemento JEM_PACKAGEFRAGMENTROOT rootPath IPackageFragmentRoot DEFAULT_PACKAGEROOT_PATH hasMoreTokens nextToken firstChar charAt firstChar JEM_PACKAGEFRAGMENT firstChar JEM_COUNT rootPath JavaElement JavaElement getPackageFragmentRoot rootPath charAt JEM_PACKAGEFRAGMENT getHandleFromMemento getHandleFromMemento
Returns the code char code that marks the start of this handles contribution to a memento protected char get Handle Memento Delimiter return JEM JAVAPROJECT  getHandleMementoDelimiter JEM_JAVAPROJECT
Find the specific Java command amongst the given build spec and return its index or 1 if not found private int get Java Command Index I Command build Spec for int i 0 i build Spec length i if build Spec i get Builder Name equals Java Core BUILDER ID return i return 1  getJavaCommandIndex ICommand buildSpec buildSpec buildSpec getBuilderName JavaCore BUILDER_ID
Convenience method that returns the specific type of info for a Java project protected Java Project Element Info get Java Project Element Info throws Java Model Exception return Java Project Element Info get Element Info  JavaProjectElementInfo getJavaProjectElementInfo JavaModelException JavaProjectElementInfo getElementInfo
Returns an array of non java resources contained in the receiver public Object get Non Java Resources throws Java Model Exception return Java Project Element Info get Element Info get Non Java Resources this  getNonJavaResources JavaModelException JavaProjectElementInfo getElementInfo getNonJavaResources
see org eclipse jdt core I Java Project get Option String boolean public String get Option String option Name boolean inherit Java Core Options String property Name option Name if Java Model Manager get Java Model Manager option Names contains property Name Preferences preferences get Preferences if preferences null preferences is Default property Name return inherit Java Core Options Java Core get Option property Name null return preferences get String property Name trim return null  IJavaProject getOption getOption optionName inheritJavaCoreOptions propertyName optionName JavaModelManager getJavaModelManager optionNames propertyName getPreferences isDefault propertyName inheritJavaCoreOptions JavaCore getOption propertyName getString propertyName
see org eclipse jdt core I Java Project get Options boolean public Map get Options boolean inherit Java Core Options initialize to the defaults from Java Core options pool Map options inherit Java Core Options Java Core get Options new Hashtable 5 Preferences preferences get Preferences if preferences null return options cannot do better non Java project Hash Set option Names Java Model Manager get Java Model Manager option Names project cannot hold custom preferences set to their default as it uses CUSTOM DEFAULT OPTION VALUE get custom preferences not set to their default String property Names preferences property Names for int i 0 i property Names length i String property Name property Names i String value preferences get String property Name trim if option Names contains property Name options put property Name value return options  IJavaProject getOptions getOptions inheritJavaCoreOptions JavaCore inheritJavaCoreOptions JavaCore getOptions getPreferences HashSet optionNames JavaModelManager getJavaModelManager optionNames CUSTOM_DEFAULT_OPTION_VALUE propertyNames propertyNames propertyNames propertyName propertyNames getString propertyName optionNames propertyName propertyName
see I Java Project public I Path get Output Location throws Java Model Exception Do not create marker but log problems while getting output location return this get Output Location false true  IJavaProject IPath getOutputLocation JavaModelException getOutputLocation
param create Markers boolean param log Problems boolean return I Path throws Java Model Exception public I Path get Output Location boolean create Markers boolean log Problems throws Java Model Exception Java Model Manager Per Project Info per Project Info get Per Project Info I Path output Location per Project Info output Location if output Location null return output Location force to read classpath will position output location as well this get Raw Classpath create Markers log Problems output Location per Project Info output Location if output Location null return default Output Location return output Location  createMarkers logProblems IPath JavaModelException IPath getOutputLocation createMarkers logProblems JavaModelException JavaModelManager PerProjectInfo perProjectInfo getPerProjectInfo IPath outputLocation perProjectInfo outputLocation outputLocation outputLocation getRawClasspath createMarkers logProblems outputLocation perProjectInfo outputLocation outputLocation defaultOutputLocation outputLocation
param path I Path return A handle to the package fragment root identified by the given path This method is handle only and the element may or may not exist Returns code null code if unable to generate a handle from the path for example an absolute path that has less than 1 segment The path may be relative or absolute public I Package Fragment Root get Package Fragment Root I Path path if path is Absolute path get Path append path int segment Count path segment Count switch segment Count case 0 return null case 1 default root return get Package Fragment Root this project default a path ending with jar zip is still ambiguous and could still resolve to a source lib folder thus will try to guess based on existing resource if org eclipse jdt internal compiler util Util is Archive File Name path last Segment I Resource resource this project get Workspace get Root find Member path if resource null resource get Type I Resource FOLDER return get Package Fragment Root resource return get Package Fragment Root0 path else return get Package Fragment Root this project get Workspace get Root get Folder path  IPath IPackageFragmentRoot getPackageFragmentRoot IPath isAbsolute getPath segmentCount segmentCount segmentCount getPackageFragmentRoot isArchiveFileName lastSegment IResource getWorkspace getRoot findMember getType IResource getPackageFragmentRoot getPackageFragmentRoot0 getPackageFragmentRoot getWorkspace getRoot getFolder
The path is known to match a source library folder entry param path I Path return I Package Fragment Root public I Package Fragment Root get Folder Package Fragment Root I Path path if path segment Count 1 default project root return get Package Fragment Root this project return get Package Fragment Root this project get Workspace get Root get Folder path  IPath IPackageFragmentRoot IPackageFragmentRoot getFolderPackageFragmentRoot IPath segmentCount getPackageFragmentRoot getPackageFragmentRoot getWorkspace getRoot getFolder
see I Java Project public I Package Fragment Root get Package Fragment Root I Resource resource switch resource get Type case I Resource FILE if org eclipse jdt internal compiler util Util is Archive File Name resource get Name return new Jar Package Fragment Root resource this else return null case I Resource FOLDER return new Package Fragment Root resource this resource get Name case I Resource PROJECT return new Package Fragment Root resource this NON NLS 1 default return null  IJavaProject IPackageFragmentRoot getPackageFragmentRoot IResource getType IResource isArchiveFileName getName JarPackageFragmentRoot IResource PackageFragmentRoot getName IResource PackageFragmentRoot
see I Java Project public I Package Fragment Root get Package Fragment Root String jar Path return get Package Fragment Root0 Java Project canonicalized Path new Path jar Path  IJavaProject IPackageFragmentRoot getPackageFragmentRoot jarPath getPackageFragmentRoot0 JavaProject canonicalizedPath jarPath
no path canonicalization public I Package Fragment Root get Package Fragment Root0 I Path jar Path return new Jar Package Fragment Root jar Path this  IPackageFragmentRoot getPackageFragmentRoot0 IPath jarPath JarPackageFragmentRoot jarPath
see I Java Project public I Package Fragment Root get Package Fragment Roots throws Java Model Exception Object children int length I Package Fragment Root roots System arraycopy children get Children 0 roots new I Package Fragment Root length children length 0 length return roots  IJavaProject IPackageFragmentRoot getPackageFragmentRoots JavaModelException IPackageFragmentRoot getChildren IPackageFragmentRoot
see I Java Project deprecated public I Package Fragment Root get Package Fragment Roots I Classpath Entry entry return find Package Fragment Roots entry  IJavaProject IPackageFragmentRoot getPackageFragmentRoots IClasspathEntry findPackageFragmentRoots
Returns the package fragment root prefixed by the given path or an empty collection if there are no such elements in the model protected I Package Fragment Root get Package Fragment Roots I Path path throws Java Model Exception I Package Fragment Root roots get All Package Fragment Roots Array List matches new Array List for int i 0 i roots length i if path is Prefix Of roots i get Path matches add roots i I Package Fragment Root copy new I Package Fragment Root matches size matches to Array copy return copy  IPackageFragmentRoot getPackageFragmentRoots IPath JavaModelException IPackageFragmentRoot getAllPackageFragmentRoots ArrayList ArrayList isPrefixOf getPath IPackageFragmentRoot IPackageFragmentRoot toArray
see I Java Project public I Package Fragment get Package Fragments throws Java Model Exception I Package Fragment Root roots get Package Fragment Roots return get Package Fragments In Roots roots  IJavaProject IPackageFragment getPackageFragments JavaModelException IPackageFragmentRoot getPackageFragmentRoots getPackageFragmentsInRoots
Returns all the package fragments found in the specified package fragment roots param roots I Package Fragment Root return I Package Fragment public I Package Fragment get Package Fragments In Roots I Package Fragment Root roots Array List frags new Array List for int i 0 i roots length i I Package Fragment Root root roots i try I Java Element root Fragments root get Children for int j 0 j root Fragments length j frags add root Fragments j catch Java Model Exception e do nothing I Package Fragment fragments new I Package Fragment frags size frags to Array fragments return fragments  IPackageFragmentRoot IPackageFragment IPackageFragment getPackageFragmentsInRoots IPackageFragmentRoot ArrayList ArrayList IPackageFragmentRoot IJavaElement rootFragments getChildren rootFragments rootFragments JavaModelException IPackageFragment IPackageFragment toArray
see I Java Element public I Path get Path return this project get Full Path  IJavaElement IPath getPath getFullPath
public Java Model Manager Per Project Info get Per Project Info throws Java Model Exception return Java Model Manager get Java Model Manager get Per Project Info Check Existence this project  JavaModelManager PerProjectInfo getPerProjectInfo JavaModelException JavaModelManager getJavaModelManager getPerProjectInfoCheckExistence
see I Java Project get Project public I Project get Project return this project  IJavaProject getProject IProject getProject
Returns the project custom preference pool Project preferences may include custom encoding return Preferences public Preferences get Preferences if Java Project has Java Nature this project return null Java Model Manager Per Project Info per Project Info Java Model Manager get Java Model Manager get Per Project Info this project true Preferences preferences per Project Info preferences if preferences null return preferences preferences load Preferences if preferences null preferences new Preferences per Project Info preferences preferences return preferences  getPreferences JavaProject hasJavaNature JavaModelManager PerProjectInfo perProjectInfo JavaModelManager getJavaModelManager getPerProjectInfo perProjectInfo loadPreferences perProjectInfo
see I Java Project public I Classpath Entry get Raw Classpath throws Java Model Exception Do not create marker but log problems while getting raw classpath return get Raw Classpath false true  IJavaProject IClasspathEntry getRawClasspath JavaModelException getRawClasspath
public I Classpath Entry get Raw Classpath boolean create Markers boolean log Problems throws Java Model Exception Java Model Manager Per Project Info per Project Info null I Classpath Entry classpath if create Markers this flush Classpath Problem Markers false cycle true format classpath this read Classpath File create Markers log Problems else per Project Info get Per Project Info classpath per Project Info raw Classpath if classpath null return classpath classpath this read Classpath File create Markers log Problems extract out the output location I Path output Location null if classpath null classpath length 0 I Classpath Entry entry classpath classpath length 1 if entry get Content Kind Classpath Entry K OUTPUT output Location entry get Path I Classpath Entry copy new I Classpath Entry classpath length 1 System arraycopy classpath 0 copy 0 copy length classpath copy if classpath null return default Classpath Disable validate classpath can contain CP variables and container that need to be resolved if classpath INVALID CLASSPATH Java Conventions validate Classpath this classpath output Location isOK classpath INVALID CLASSPATH if create Markers per Project Info raw Classpath classpath per Project Info output Location output Location return classpath  IClasspathEntry getRawClasspath createMarkers logProblems JavaModelException JavaModelManager PerProjectInfo perProjectInfo IClasspathEntry createMarkers flushClasspathProblemMarkers readClasspathFile createMarkers logProblems perProjectInfo getPerProjectInfo perProjectInfo rawClasspath readClasspathFile createMarkers logProblems IPath outputLocation IClasspathEntry getContentKind ClasspathEntry K_OUTPUT outputLocation getPath IClasspathEntry IClasspathEntry defaultClasspath INVALID_CLASSPATH JavaConventions validateClasspath outputLocation INVALID_CLASSPATH createMarkers perProjectInfo rawClasspath perProjectInfo outputLocation outputLocation
see I Java Project get Required Project Names public String get Required Project Names throws Java Model Exception return this project Prerequisites get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress  IJavaProject getRequiredProjectNames getRequiredProjectNames JavaModelException projectPrerequisites getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress
see I Java Project public I Classpath Entry get Resolved Classpath boolean ignore Unresolved Entry throws Java Model Exception return get Resolved Classpath ignore Unresolved Entry false don t generate Marker On Error true return Resolution In Progress  IJavaProject IClasspathEntry getResolvedClasspath ignoreUnresolvedEntry JavaModelException getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress
see I Java Project public I Classpath Entry get Resolved Classpath boolean ignore Unresolved Entry boolean generate Marker On Error throws Java Model Exception return get Resolved Classpath ignore Unresolved Entry generate Marker On Error true return Resolution In Progress  IJavaProject IClasspathEntry getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError JavaModelException getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress
public I Classpath Entry get Resolved Classpath boolean ignore Unresolved Entry boolean generate Marker On Error boolean return Resolution In Progress throws Java Model Exception Java Model Manager manager Java Model Manager get Java Model Manager Java Model Manager Per Project Info per Project Info null if ignore Unresolved Entry generate Marker On Error per Project Info get Per Project Info if per Project Info null resolved path is cached on its info I Classpath Entry info Path per Project Info resolved Classpath if info Path null return info Path else if return Resolution In Progress manager is Classpath Being Resolved this if Java Model Manager CP RESOLVE VERBOSE Util verbose CP Resolution reentering raw classpath resolution will use empty classpath instead NON NLS 1 project get Element Name n NON NLS 1 invocation stack trace NON NLS 1 new Exception Fake exception print Stack Trace System out NON NLS 1 return RESOLUTION IN PROGRESS Map reverse Map per Project Info null null new Hash Map 5 I Classpath Entry resolved Path null boolean null Old ResolvedCP per Project Info null per Project Info resolved Classpath null try protect against misbehaving clients see https bugs eclipse org bugs show bug cgi id 61040 if null Old ResolvedCP manager set Classpath Being Resolved this true resolved Path get Resolved Classpath get Raw Classpath generate Marker On Error generate Marker On Error generate Marker On Error get Output Location null ignore Unresolved Entry generate Marker On Error reverse Map finally if null Old ResolvedCP per Project Info resolved Classpath null if per Project Info null if per Project Info raw Classpath null classpath file could not be read generate Marker On Error Java Project has Java Nature this project flush classpath format markers bug 39877 but only when file cannot be read bug 42366 this flush Classpath Problem Markers false true this create Classpath Problem Marker new Java Model Status I Java Model Status Constants INVALID CLASSPATH FILE FORMAT Util bind classpath cannot Read Classpath File this get Element Name NON NLS 1 per Project Info resolved Classpath resolved Path per Project Info resolved Path To Raw Entries reverse Map manager set Classpath Being Resolved this false return resolved Path  IClasspathEntry getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress JavaModelException JavaModelManager JavaModelManager getJavaModelManager JavaModelManager PerProjectInfo perProjectInfo ignoreUnresolvedEntry generateMarkerOnError perProjectInfo getPerProjectInfo perProjectInfo IClasspathEntry infoPath perProjectInfo resolvedClasspath infoPath infoPath returnResolutionInProgress isClasspathBeingResolved JavaModelManager CP_RESOLVE_VERBOSE CPResolution getElementName printStackTrace RESOLUTION_IN_PROGRESS reverseMap perProjectInfo HashMap IClasspathEntry resolvedPath nullOldResolvedCP perProjectInfo perProjectInfo resolvedClasspath show_bug nullOldResolvedCP setClasspathBeingResolved resolvedPath getResolvedClasspath getRawClasspath generateMarkerOnError generateMarkerOnError generateMarkerOnError getOutputLocation ignoreUnresolvedEntry generateMarkerOnError reverseMap nullOldResolvedCP perProjectInfo resolvedClasspath perProjectInfo perProjectInfo rawClasspath generateMarkerOnError JavaProject hasJavaNature flushClasspathProblemMarkers createClasspathProblemMarker JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH_FILE_FORMAT cannotReadClasspathFile getElementName perProjectInfo resolvedClasspath resolvedPath perProjectInfo resolvedPathToRawEntries reverseMap setClasspathBeingResolved resolvedPath
Internal variant which can process any arbitrary classpath param classpath Entries I Classpath Entry param project Output Location I Path param ignore Unresolved Entry boolean param generate Marker On Error boolean param reverse Map Map return I Classpath Entry throws Java Model Exception public I Classpath Entry get Resolved Classpath I Classpath Entry classpath Entries I Path project Output Location only set if needing full classpath validation and markers boolean ignore Unresolved Entry if unresolved entries are met should it trigger initializations boolean generate Marker On Error Map reverse Map can be null if not interested in reverse mapping throws Java Model Exception I Java Model Status status if generate Marker On Error flush Classpath Problem Markers false false int length classpath Entries length Array List resolved Entries new Array List for int i 0 i length i I Classpath Entry raw Entry classpath Entries i I Path resolved Path status null validation if needed if generate Marker On Error ignore Unresolved Entry status Classpath Entry validate Classpath Entry this raw Entry false ignore src attach false do not recurse in containers done later to accumulate if generate Marker On Error status isOK create Classpath Problem Marker status switch raw Entry get Entry Kind case I Classpath Entry CPE VARIABLE I Classpath Entry resolved Entry null try resolved Entry Java Core get Resolved Classpath Entry raw Entry catch Assert Assertion Failed Exception e Catch the assertion failure and throw java model exception instead see bug https bugs eclipse org bugs show bug cgi id 55992 if ignored Unresolved Entry is false status is set by by Classpath Entry validate Classpath Entry called above as validation was needed if ignore Unresolved Entry throw new Java Model Exception status if resolved Entry null if ignore Unresolved Entry throw new Java Model Exception status else if reverse Map null reverse Map get resolved Path resolved Entry get Path null reverse Map put resolved Path raw Entry resolved Entries add resolved Entry break case I Classpath Entry CPE CONTAINER I Classpath Container container Java Core get Classpath Container raw Entry get Path this if container null if ignore Unresolved Entry throw new Java Model Exception status break I Classpath Entry container Entries container get Classpath Entries if container Entries null break container was bound for int j 0 container Length container Entries length j container Length j I Classpath Entry c Entry container Entries j if generate Marker On Error I Java Model Status container Status Classpath Entry validate Classpath Entry this c Entry false true recurse if container Status isOK create Classpath Problem Marker container Status if container is exported then its nested entries must in turn be exported 21749 if raw Entry is Exported c Entry new Classpath Entry c Entry get Content Kind c Entry get Entry Kind c Entry get Path c Entry get Inclusion Patterns c Entry get Exclusion Patterns c Entry get Source Attachment Path c Entry get Source Attachment Root Path c Entry get Output Location true duplicate container entry for tagging it as exported if reverse Map null reverse Map get resolved Path c Entry get Path null reverse Map put resolved Path raw Entry resolved Entries add c Entry break default if reverse Map null reverse Map get resolved Path raw Entry get Path null reverse Map put resolved Path raw Entry resolved Entries add raw Entry I Classpath Entry resolved Path new I Classpath Entry resolved Entries size resolved Entries to Array resolved Path if generate Marker On Error project Output Location null status Classpath Entry validate Classpath this resolved Path project Output Location if status isOK create Classpath Problem Marker status return resolved Path  classpathEntries IClasspathEntry projectOutputLocation IPath ignoreUnresolvedEntry generateMarkerOnError reverseMap IClasspathEntry JavaModelException IClasspathEntry getResolvedClasspath IClasspathEntry classpathEntries IPath projectOutputLocation ignoreUnresolvedEntry generateMarkerOnError reverseMap JavaModelException IJavaModelStatus generateMarkerOnError flushClasspathProblemMarkers classpathEntries ArrayList resolvedEntries ArrayList IClasspathEntry rawEntry classpathEntries IPath resolvedPath generateMarkerOnError ignoreUnresolvedEntry ClasspathEntry validateClasspathEntry rawEntry generateMarkerOnError createClasspathProblemMarker rawEntry getEntryKind IClasspathEntry CPE_VARIABLE IClasspathEntry resolvedEntry resolvedEntry JavaCore getResolvedClasspathEntry rawEntry AssertionFailedException show_bug ignoredUnresolvedEntry ClasspathEntry validateClasspathEntry ignoreUnresolvedEntry JavaModelException resolvedEntry ignoreUnresolvedEntry JavaModelException reverseMap reverseMap resolvedPath resolvedEntry getPath reverseMap resolvedPath rawEntry resolvedEntries resolvedEntry IClasspathEntry CPE_CONTAINER IClasspathContainer JavaCore getClasspathContainer rawEntry getPath ignoreUnresolvedEntry JavaModelException IClasspathEntry containerEntries getClasspathEntries containerEntries containerLength containerEntries containerLength IClasspathEntry cEntry containerEntries generateMarkerOnError IJavaModelStatus containerStatus ClasspathEntry validateClasspathEntry cEntry containerStatus createClasspathProblemMarker containerStatus rawEntry isExported cEntry ClasspathEntry cEntry getContentKind cEntry getEntryKind cEntry getPath cEntry getInclusionPatterns cEntry getExclusionPatterns cEntry getSourceAttachmentPath cEntry getSourceAttachmentRootPath cEntry getOutputLocation reverseMap reverseMap resolvedPath cEntry getPath reverseMap resolvedPath rawEntry resolvedEntries cEntry reverseMap reverseMap resolvedPath rawEntry getPath reverseMap resolvedPath rawEntry resolvedEntries rawEntry IClasspathEntry resolvedPath IClasspathEntry resolvedEntries resolvedEntries toArray resolvedPath generateMarkerOnError projectOutputLocation ClasspathEntry validateClasspath resolvedPath projectOutputLocation createClasspathProblemMarker resolvedPath
see I Java Element public I Resource get Resource return this project  IJavaElement IResource getResource
Retrieve a shared property on a project If the property is not defined answers null Note that it is orthogonal to I Resource persistent properties and client code has to decide which form of storage to use appropriately Shared properties produce real resource files which can be shared through a VCM onto a server Persistent properties are not shareable param key String see Java Project set Shared Property String String return String throws Core Exception public String get Shared Property String key throws Core Exception String property null I File rsc File this project get File key if rsc File exists property new String Util get Resource Contents As Byte Array rsc File return property  IResource JavaProject setSharedProperty CoreException getSharedProperty CoreException IFile rscFile getFile rscFile getResourceContentsAsByteArray rscFile
see Java Element public Source Mapper get Source Mapper return null  JavaElement SourceMapper getSourceMapper
see I Java Element public I Resource get Underlying Resource throws Java Model Exception if exists throw new Not Present Exception return this project  IJavaElement IResource getUnderlyingResource JavaModelException newNotPresentException
see I Java Project public boolean has Build State return Java Model Manager get Java Model Manager get Last Built State this project null null  IJavaProject hasBuildState JavaModelManager getJavaModelManager getLastBuiltState
see I Java Project public boolean has Classpath Cycle I Classpath Entry preferred Classpath Hash Set cycle Participants new Hash Set Hash Map preferred Classpaths new Hash Map 1 preferred Classpaths put this preferred Classpath update Cycle Participants new Array List 2 cycle Participants Resources Plugin get Workspace get Root new Hash Set 2 preferred Classpaths return cycle Participants is Empty  IJavaProject hasClasspathCycle IClasspathEntry preferredClasspath HashSet cycleParticipants HashSet HashMap preferredClasspaths HashMap preferredClasspaths preferredClasspath updateCycleParticipants ArrayList cycleParticipants ResourcesPlugin getWorkspace getRoot HashSet preferredClasspaths cycleParticipants isEmpty
public boolean has Cycle Marker return this get Cycle Marker null  hasCycleMarker getCycleMarker
public int hash Code return this project hash Code  hashCode hashCode
Returns true if the given project is accessible and it has a java nature otherwise false param project I Project return boolean public static boolean has Java Nature I Project project try return project has Nature Java Core NATURE ID catch Core Exception e project does not exist or is not open return false  IProject hasJavaNature IProject hasNature JavaCore NATURE_ID CoreException
Answers true if the project potentially contains any source A project which has no source is immutable return boolean public boolean has Source look if any source folder on the classpath no need for resolved path given source folder cannot be abstracted I Classpath Entry entries try entries this get Raw Classpath catch Java Model Exception e return true unsure for int i 0 max entries length i max i if entries i get Entry Kind I Classpath Entry CPE SOURCE return true return false  hasSource IClasspathEntry getRawClasspath JavaModelException getEntryKind IClasspathEntry CPE_SOURCE
Compare current classpath with given one to see if any different Note that the argument classpath contains its binary output param new Classpath I Classpath Entry param new Output Location I Path param other Classpath With Output I Classpath Entry return boolean public boolean is Classpath Equals To I Classpath Entry new Classpath I Path new Output Location I Classpath Entry other Classpath With Output if other Classpath With Output null other Classpath With Output length 0 int length other Classpath With Output length if length new Classpath length 1 output is amongst file entries last one compare classpath entries for int i 0 i length 1 i if other Classpath With Output i equals new Classpath i return false compare binary outputs I Classpath Entry output other Classpath With Output length 1 if output get Content Kind Classpath Entry K OUTPUT output get Path equals new Output Location return true return false  newClasspath IClasspathEntry newOutputLocation IPath otherClasspathWithOutput IClasspathEntry isClasspathEqualsTo IClasspathEntry newClasspath IPath newOutputLocation IClasspathEntry otherClasspathWithOutput otherClasspathWithOutput otherClasspathWithOutput otherClasspathWithOutput newClasspath otherClasspathWithOutput newClasspath IClasspathEntry otherClasspathWithOutput getContentKind ClasspathEntry K_OUTPUT getPath newOutputLocation
public boolean is On Classpath I Java Element element I Path path element get Path I Classpath Entry classpath try classpath get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress catch Java Model Exception e return false not a Java project boolean is Folder Path false switch element get Element Type case I Java Element PACKAGE FRAGMENT ROOT package fragment roots must match exactly entry pathes no exclusion there for int i 0 i classpath length i I Classpath Entry entry classpath i I Path entry Path entry get Path if entry Path equals path return true return false case I Java Element PACKAGE FRAGMENT if I Package Fragment Root element get Parent is Archive ensure that folders are only excluded if all of their children are excluded is Folder Path true break for int i 0 i classpath length i I Classpath Entry entry classpath i I Path entry Path entry get Path if entry Path is Prefix Of path Util is Excluded path Classpath Entry entry full Inclusion Pattern Chars Classpath Entry entry full Exclusion Pattern Chars is Folder Path return true return false  isOnClasspath IJavaElement IPath getPath IClasspathEntry getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress JavaModelException isFolderPath getElementType IJavaElement PACKAGE_FRAGMENT_ROOT IClasspathEntry IPath entryPath getPath entryPath IJavaElement PACKAGE_FRAGMENT IPackageFragmentRoot getParent isArchive isFolderPath IClasspathEntry IPath entryPath getPath entryPath isPrefixOf isExcluded ClasspathEntry fullInclusionPatternChars ClasspathEntry fullExclusionPatternChars isFolderPath
public boolean is On Classpath I Resource resource I Path exact Path resource get Full Path I Path path exact Path ensure that folders are only excluded if all of their children are excluded boolean is Folder Path resource get Type I Resource FOLDER I Classpath Entry classpath try classpath this get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress catch Java Model Exception e return false not a Java project for int i 0 i classpath length i I Classpath Entry entry classpath i I Path entry Path entry get Path if entry Path equals exact Path package fragment roots must match exactly entry pathes no exclusion there return true if entry Path is Prefix Of path Util is Excluded path Classpath Entry entry full Inclusion Pattern Chars Classpath Entry entry full Exclusion Pattern Chars is Folder Path return true return false  isOnClasspath IResource IPath exactPath getFullPath IPath exactPath isFolderPath getType IResource IClasspathEntry getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress JavaModelException IClasspathEntry IPath entryPath getPath entryPath exactPath entryPath isPrefixOf isExcluded ClasspathEntry fullInclusionPatternChars ClasspathEntry fullExclusionPatternChars isFolderPath
private I Path get Plugin Working Location return this project get Working Location Java Core PLUGIN ID  IPath getPluginWorkingLocation getWorkingLocation JavaCore PLUGIN_ID
public Preferences load Preferences Preferences preferences new Preferences File pref File this project get Location append PREF FILENAME to File I Path project Meta Location get Plugin Working Location if project Meta Location null File pref File project Meta Location append PREF FILENAME to File if pref File exists load preferences from file Input Stream in null try in new Buffered Input Stream new File Input Stream pref File preferences load in return preferences catch IO Exception e problems loading preference store quietly ignore finally if in null try in close catch IO Exception e ignore problems with close return null  loadPreferences prefFile getLocation PREF_FILENAME toFile IPath projectMetaLocation getPluginWorkingLocation projectMetaLocation prefFile projectMetaLocation PREF_FILENAME toFile prefFile InputStream BufferedInputStream FileInputStream prefFile IOException IOException
see I Java Project new Evaluation Context public I Evaluation Context new Evaluation Context return new Evaluation Context Wrapper new Evaluation Context this  IJavaProject newEvaluationContext IEvaluationContext newEvaluationContext EvaluationContextWrapper EvaluationContext
public Name Lookup new Name Lookup I Compilation Unit working Copies throws Java Model Exception Java Project Element Info info get Java Project Element Info lock on the project info to avoid race condition while computing the pkg fragment roots and package fragment caches synchronized info return new Name Lookup info get All Package Fragment Roots this info get All Package Fragments this working Copies  NameLookup newNameLookup ICompilationUnit workingCopies JavaModelException JavaProjectElementInfo getJavaProjectElementInfo NameLookup getAllPackageFragmentRoots getAllPackageFragments workingCopies
public Name Lookup new Name Lookup Working Copy Owner owner throws Java Model Exception Java Model Manager manager Java Model Manager get Java Model Manager I Compilation Unit working Copies owner null null manager get Working Copies owner true add primary W Cs return new Name Lookup working Copies  NameLookup newNameLookup WorkingCopyOwner JavaModelException JavaModelManager JavaModelManager getJavaModelManager ICompilationUnit workingCopies getWorkingCopies WCs newNameLookup workingCopies
Returns a new search name environment for this project This name environment first looks in the given working copies public I Searchable Name Environment new Searchable Name Environment I Compilation Unit working Copies throws Java Model Exception return new Searchable Environment this working Copies  ISearchableNameEnvironment newSearchableNameEnvironment ICompilationUnit workingCopies JavaModelException SearchableEnvironment workingCopies
of the given owner public I Searchable Name Environment new Searchable Name Environment Working Copy Owner owner throws Java Model Exception return new Searchable Environment this owner  ISearchableNameEnvironment newSearchableNameEnvironment WorkingCopyOwner JavaModelException SearchableEnvironment
see I Java Project public I Type Hierarchy new Type Hierarchy I Region region I Progress Monitor monitor throws Java Model Exception return new Type Hierarchy region Default Working Copy Owner PRIMARY monitor  IJavaProject ITypeHierarchy newTypeHierarchy IRegion IProgressMonitor JavaModelException newTypeHierarchy DefaultWorkingCopyOwner
see I Java Project public I Type Hierarchy new Type Hierarchy I Region region Working Copy Owner owner I Progress Monitor monitor throws Java Model Exception if region null throw new Illegal Argument Exception Util bind hierarchy null Region NON NLS 1 I Compilation Unit working Copies Java Model Manager get Java Model Manager get Working Copies owner true add primary working copies Create Type Hierarchy Operation op new Create Type Hierarchy Operation region this working Copies null true op run Operation monitor return op get Result  IJavaProject ITypeHierarchy newTypeHierarchy IRegion WorkingCopyOwner IProgressMonitor JavaModelException IllegalArgumentException nullRegion ICompilationUnit workingCopies JavaModelManager getJavaModelManager getWorkingCopies CreateTypeHierarchyOperation CreateTypeHierarchyOperation workingCopies runOperation getResult
see I Java Project public I Type Hierarchy new Type Hierarchy I Type type I Region region I Progress Monitor monitor throws Java Model Exception return new Type Hierarchy type region Default Working Copy Owner PRIMARY monitor  IJavaProject ITypeHierarchy newTypeHierarchy IType IRegion IProgressMonitor JavaModelException newTypeHierarchy DefaultWorkingCopyOwner
see I Java Project public I Type Hierarchy new Type Hierarchy I Type type I Region region Working Copy Owner owner I Progress Monitor monitor throws Java Model Exception if type null throw new Illegal Argument Exception Util bind hierarchy null Focus Type NON NLS 1 if region null throw new Illegal Argument Exception Util bind hierarchy null Region NON NLS 1 I Compilation Unit working Copies Java Model Manager get Java Model Manager get Working Copies owner true add primary working copies Create Type Hierarchy Operation op new Create Type Hierarchy Operation region this working Copies type true op run Operation monitor return op get Result  IJavaProject ITypeHierarchy newTypeHierarchy IType IRegion WorkingCopyOwner IProgressMonitor JavaModelException IllegalArgumentException nullFocusType IllegalArgumentException nullRegion ICompilationUnit workingCopies JavaModelManager getJavaModelManager getWorkingCopies CreateTypeHierarchyOperation CreateTypeHierarchyOperation workingCopies runOperation getResult
public String project Prerequisites I Classpath Entry entries throws Java Model Exception Array List prerequisites new Array List need resolution entries get Resolved Classpath entries null true false null no reverse map for int i 0 length entries length i length i I Classpath Entry entry entries i if entry get Entry Kind I Classpath Entry CPE PROJECT prerequisites add entry get Path last Segment int size prerequisites size if size 0 return NO PREREQUISITES else String result new String size prerequisites to Array result return result  projectPrerequisites IClasspathEntry JavaModelException ArrayList ArrayList getResolvedClasspath IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT getPath lastSegment NO_PREREQUISITES toArray
Reads the classpath file from disk and returns the list of entries it contains including output location entry Returns null if classfile is not present Returns INVALID CLASSPATH if it has a format problem protected I Classpath Entry read Classpath File boolean create Marker boolean log Problems try String xml Classpath get Shared Property CLASSPATH FILENAME if xml Classpath null if create Marker this project is Accessible this create Classpath Problem Marker new Java Model Status I Java Model Status Constants INVALID CLASSPATH FILE FORMAT Util bind classpath cannot Read Classpath File this get Element Name NON NLS 1 return null return decode Classpath xml Classpath create Marker log Problems catch Core Exception e file does not exist or not accessible if create Marker this project is Accessible this create Classpath Problem Marker new Java Model Status I Java Model Status Constants INVALID CLASSPATH FILE FORMAT Util bind classpath cannot Read Classpath File this get Element Name NON NLS 1 if log Problems Util log e Exception while retrieving this get Path NON NLS 1 classpath will revert to default classpath NON NLS 1 return null  INVALID_CLASSPATH IClasspathEntry readClasspathFile createMarker logProblems xmlClasspath getSharedProperty CLASSPATH_FILENAME xmlClasspath createMarker isAccessible createClasspathProblemMarker JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH_FILE_FORMAT cannotReadClasspathFile getElementName decodeClasspath xmlClasspath createMarker logProblems CoreException createMarker isAccessible createClasspathProblemMarker JavaModelStatus IJavaModelStatusConstants INVALID_CLASSPATH_FILE_FORMAT cannotReadClasspathFile getElementName logProblems getPath
see I Java Project public I Path read Output Location Read classpath file without creating markers nor logging problems I Classpath Entry classpath this read Classpath File false false extract the output location I Path output Location null if classpath null classpath length 0 I Classpath Entry entry classpath classpath length 1 if entry get Content Kind Classpath Entry K OUTPUT output Location entry get Path return output Location  IJavaProject IPath readOutputLocation IClasspathEntry readClasspathFile IPath outputLocation IClasspathEntry getContentKind ClasspathEntry K_OUTPUT outputLocation getPath outputLocation
see I Java Project public I Classpath Entry read Raw Classpath Read classpath file without creating markers nor logging problems I Classpath Entry classpath this read Classpath File false false discard the output location if classpath null classpath length 0 I Classpath Entry entry classpath classpath length 1 if entry get Content Kind Classpath Entry K OUTPUT I Classpath Entry copy new I Classpath Entry classpath length 1 System arraycopy classpath 0 copy 0 copy length classpath copy return classpath  IJavaProject IClasspathEntry readRawClasspath IClasspathEntry readClasspathFile IClasspathEntry getContentKind ClasspathEntry K_OUTPUT IClasspathEntry IClasspathEntry
Removes the given builder from the build spec for the given project protected void remove From Build Spec String builderID throws Core Exception I Project Description description this project get Description I Command commands description get Build Spec for int i 0 i commands length i if commands i get Builder Name equals builderID I Command new Commands new I Command commands length 1 System arraycopy commands 0 new Commands 0 i System arraycopy commands i 1 new Commands i commands length i 1 description set Build Spec new Commands this project set Description description null return  removeFromBuildSpec CoreException IProjectDescription getDescription ICommand getBuildSpec getBuilderName ICommand newCommands ICommand newCommands newCommands setBuildSpec newCommands setDescription
public void reset Caches Java Project Element Info info Java Project Element Info Java Model Manager get Java Model Manager peek At Info this if info null info reset Caches  resetCaches JavaProjectElementInfo JavaProjectElementInfo JavaModelManager getJavaModelManager peekAtInfo resetCaches
Answers an ID which is used to distinguish project entries during package fragment root computations return String public String rootID return PRJ this project get Full Path NON NLS 1  getFullPath
Saves the classpath in a shareable format VCM wise only when necessary that is if it is semantically different from the existing one in file Will never write an identical one param new Classpath I Classpath Entry param new Output Location I Path return boolean Return whether the classpath file was modified throws Java Model Exception public boolean save Classpath I Classpath Entry new Classpath I Path new Output Location throws Java Model Exception if this project is Accessible return false I Classpath Entry file Entries read Classpath File false don t create markers false don t log problems if file Entries null is Classpath Equals To new Classpath new Output Location file Entries no need to save it it is the same return false actual file saving try set Shared Property CLASSPATH FILENAME encode Classpath new Classpath new Output Location true return true catch Core Exception e throw new Java Model Exception e  newClasspath IClasspathEntry newOutputLocation IPath JavaModelException saveClasspath IClasspathEntry newClasspath IPath newOutputLocation JavaModelException isAccessible IClasspathEntry fileEntries readClasspathFile fileEntries isClasspathEqualsTo newClasspath newOutputLocation fileEntries setSharedProperty CLASSPATH_FILENAME encodeClasspath newClasspath newOutputLocation CoreException JavaModelException
Save project custom preferences to shareable file jprefs private void save Preferences Preferences preferences if Java Project has Java Nature this project return ignore if preferences null preferences needs Saving preferences property Names length 0 nothing to save return preferences need to be saved the preferences file is located in the plug in s state area at a well known name jprefs File pref File this project get Location append PREF FILENAME to File File pref File get Plugin Working Location append PREF FILENAME to File if preferences property Names length 0 there are no preference settings rather than write an empty file just delete any existing file if pref File exists pref File delete don t worry if delete unsuccessful return write file overwriting an existing one Output Stream out null try do it as carefully as we know how so that we don t lose mangle the setting in times of stress out new Buffered Output Stream new File Output Stream pref File preferences store out null catch IO Exception e problems saving preference store quietly ignore finally if out null try out close catch IO Exception e ignore problems with close  savePreferences JavaProject hasJavaNature needsSaving propertyNames prefFile getLocation PREF_FILENAME toFile prefFile getPluginWorkingLocation PREF_FILENAME toFile propertyNames prefFile prefFile OutputStream BufferedOutputStream FileOutputStream prefFile IOException IOException
Update the Java command in the build spec replace existing one if present add one first if none private void set Java Command I Project Description description I Command new Command throws Core Exception I Command old Build Spec description get Build Spec int old Java Command Index get Java Command Index old Build Spec I Command new Commands if old Java Command Index 1 Add a Java build spec before other builders 1FWJK7I new Commands new I Command old Build Spec length 1 System arraycopy old Build Spec 0 new Commands 1 old Build Spec length new Commands 0 new Command else old Build Spec old Java Command Index new Command new Commands old Build Spec Commit the spec change into the project description set Build Spec new Commands this project set Description description null  setJavaCommand IProjectDescription ICommand newCommand CoreException ICommand oldBuildSpec getBuildSpec oldJavaCommandIndex getJavaCommandIndex oldBuildSpec ICommand newCommands oldJavaCommandIndex newCommands ICommand oldBuildSpec oldBuildSpec newCommands oldBuildSpec newCommands newCommand oldBuildSpec oldJavaCommandIndex newCommand newCommands oldBuildSpec setBuildSpec newCommands setDescription
see org eclipse jdt core I Java Project set Option java lang String java lang String public void set Option String option Name String option Value if Java Model Manager get Java Model Manager option Names contains option Name return unrecognized option Preferences preferences get Preferences preferences set Default option Name CUSTOM DEFAULT OPTION VALUE empty string isn t the default 26251 preferences set Value option Name option Value save Preferences preferences  IJavaProject setOption setOption optionName optionValue JavaModelManager getJavaModelManager optionNames optionName getPreferences setDefault optionName CUSTOM_DEFAULT_OPTION_VALUE setValue optionName optionValue savePreferences
see org eclipse jdt core I Java Project set Options Map public void set Options Map new Options Preferences preferences get Preferences if new Options null Iterator keys new Options key Set iterator while keys has Next String key String keys next if Java Model Manager get Java Model Manager option Names contains key continue unrecognized option no filtering for encoding custom encoding for project is allowed String value String new Options get key preferences set Default key CUSTOM DEFAULT OPTION VALUE empty string isn t the default 26251 preferences set Value key value reset to default all options not in new map see https bugs eclipse org bugs show bug cgi id 26255 see https bugs eclipse org bugs show bug cgi id 49691 String p Names preferences property Names int ln p Names length for int i 0 i ln i String key p Names i if new Options null new Options contains Key key preferences set To Default key set default remove from preferences table persist options save Preferences preferences  IJavaProject setOptions setOptions newOptions getPreferences newOptions newOptions keySet hasNext JavaModelManager getJavaModelManager optionNames newOptions setDefault CUSTOM_DEFAULT_OPTION_VALUE setValue show_bug show_bug pNames propertyNames pNames pNames newOptions newOptions containsKey setToDefault savePreferences
see I Java Project public void set Output Location I Path path I Progress Monitor monitor throws Java Model Exception if path null throw new Illegal Argument Exception Util bind path null Path NON NLS 1 if path equals get Output Location return this set Raw Classpath Set Classpath Operation Reuse Classpath path monitor  IJavaProject setOutputLocation IPath IProgressMonitor JavaModelException IllegalArgumentException nullPath getOutputLocation setRawClasspath SetClasspathOperation ReuseClasspath
public void set Preferences Preferences preferences if Java Project has Java Nature this project return ignore Java Model Manager Per Project Info per Project Info Java Model Manager get Java Model Manager get Per Project Info this project true per Project Info preferences preferences  setPreferences JavaProject hasJavaNature JavaModelManager PerProjectInfo perProjectInfo JavaModelManager getJavaModelManager getPerProjectInfo perProjectInfo
Sets the underlying kernel project of this Java project and fills in its parent and name Called by I Project get Nature see I Project Nature set Project I Project public void set Project I Project project this project project this parent Java Model Manager get Java Model Manager get Java Model this name project get Name  IProject getNature IProjectNature setProject IProject setProject IProject JavaModelManager getJavaModelManager getJavaModel getName
see I Java Project set Raw Classpath I Classpath Entry I Path I Progress Monitor public void set Raw Classpath I Classpath Entry entries I Path output Location I Progress Monitor monitor throws Java Model Exception set Raw Classpath entries output Location monitor true can Change Resource as per API contract get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress true need Validation true need to save  IJavaProject setRawClasspath IClasspathEntry IPath IProgressMonitor setRawClasspath IClasspathEntry IPath outputLocation IProgressMonitor JavaModelException setRawClasspath outputLocation canChangeResource getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress needValidation
public void set Raw Classpath I Classpath Entry new Entries I Path new Output Location I Progress Monitor monitor boolean can Change Resource I Classpath Entry old Resolved Path boolean need Validation boolean need Save throws Java Model Exception Java Model Manager manager Java Model Manager get Java Model Manager try I Classpath Entry new Raw Path new Entries if new Raw Path null are we already with the default classpath new Raw Path default Classpath Set Classpath Operation op new Set Classpath Operation this old Resolved Path new Raw Path new Output Location can Change Resource need Validation need Save op run Operation monitor catch Java Model Exception e manager get Delta Processor flush throw e  setRawClasspath IClasspathEntry newEntries IPath newOutputLocation IProgressMonitor canChangeResource IClasspathEntry oldResolvedPath needValidation needSave JavaModelException JavaModelManager JavaModelManager getJavaModelManager IClasspathEntry newRawPath newEntries newRawPath newRawPath defaultClasspath SetClasspathOperation SetClasspathOperation oldResolvedPath newRawPath newOutputLocation canChangeResource needValidation needSave runOperation JavaModelException getDeltaProcessor
see I Java Project public void set Raw Classpath I Classpath Entry entries I Progress Monitor monitor throws Java Model Exception set Raw Classpath entries Set Classpath Operation Reuse Output Location monitor true can Change Resource as per API contract get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress true need Validation true need to save  IJavaProject setRawClasspath IClasspathEntry IProgressMonitor JavaModelException setRawClasspath SetClasspathOperation ReuseOutputLocation canChangeResource getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress needValidation
Record a shared persistent property onto a project Note that it is orthogonal to I Resource persistent properties and client code has to decide which form of storage to use appropriately Shared properties produce real resource files which can be shared through a VCM onto a server Persistent properties are not shareable shared properties end up in resource files and thus cannot be modified during delta notifications a Core Exception would then be thrown param key String param value String see Java Project get Shared Property String key throws Core Exception public void set Shared Property String key String value throws Core Exception I File rsc File this project get File key Input Stream input Stream new Byte Array Input Stream value get Bytes update the resource content if rsc File exists if rsc File is Read Only provide opportunity to checkout read only classpath file 23984 Resources Plugin get Workspace validate Edit new I File rsc File null rsc File set Contents input Stream I Resource FORCE null else rsc File create input Stream I Resource FORCE null  IResource CoreException JavaProject getSharedProperty CoreException setSharedProperty CoreException IFile rscFile getFile InputStream inputStream ByteArrayInputStream getBytes rscFile rscFile isReadOnly ResourcesPlugin getWorkspace validateEdit IFile rscFile rscFile setContents inputStream IResource rscFile inputStream IResource
Update cycle markers for all java projects param preferred Classpaths Map throws Java Model Exception public static void update All Cycle Markers Map preferred Classpaths throws Java Model Exception long start System current Time Millis I Workspace Root workspace Root Resources Plugin get Workspace get Root I Project rsc Projects workspace Root get Projects int length rsc Projects length Java Project projects new Java Project length Hash Set cycle Participants new Hash Set Hash Set traversed new Hash Set compute cycle participants Array List prereq Chain new Array List for int i 0 i length i if has Java Nature rsc Projects i Java Project project projects i Java Project Java Core create rsc Projects i if traversed contains project get Path prereq Chain clear project update Cycle Participants prereq Chain cycle Participants workspace Root traversed preferred Classpaths System out println update All Cycle Markers System current Time Millis start ms for int i 0 i length i Java Project project projects i if project null if cycle Participants contains project get Path I Marker cycle Marker project get Cycle Marker String circularCP Option project get Option Java Core CORE CIRCULAR CLASSPATH true int circularCP Severity Java Core ERROR equals circularCP Option I Marker SEVERITY ERROR I Marker SEVERITY WARNING if cycle Marker null update existing cycle marker if needed try int existing Severity Integer cycle Marker get Attribute I Marker SEVERITY int Value if existing Severity circularCP Severity cycle Marker set Attribute I Marker SEVERITY circularCP Severity catch Core Exception e throw new Java Model Exception e else create new marker project create Classpath Problem Marker new Java Model Status I Java Model Status Constants CLASSPATH CYCLE project else project flush Classpath Problem Markers true false  preferredClasspaths JavaModelException updateAllCycleMarkers preferredClasspaths JavaModelException currentTimeMillis IWorkspaceRoot workspaceRoot ResourcesPlugin getWorkspace getRoot IProject rscProjects workspaceRoot getProjects rscProjects JavaProject JavaProject HashSet cycleParticipants HashSet HashSet HashSet ArrayList prereqChain ArrayList hasJavaNature rscProjects JavaProject JavaProject JavaCore rscProjects getPath prereqChain updateCycleParticipants prereqChain cycleParticipants workspaceRoot preferredClasspaths updateAllCycleMarkers currentTimeMillis JavaProject cycleParticipants getPath IMarker cycleMarker getCycleMarker circularCPOption getOption JavaCore CORE_CIRCULAR_CLASSPATH circularCPSeverity JavaCore circularCPOption IMarker SEVERITY_ERROR IMarker SEVERITY_WARNING cycleMarker existingSeverity cycleMarker getAttribute IMarker intValue existingSeverity circularCPSeverity cycleMarker setAttribute IMarker circularCPSeverity CoreException JavaModelException createClasspathProblemMarker JavaModelStatus IJavaModelStatusConstants CLASSPATH_CYCLE flushClasspathProblemMarkers
If a cycle is detected then cycle Participants contains all the paths of projects involved in this cycle directly and indirectly no cycle if the set is empty and started empty param prereq Chain Array List param cycle Participants Hash Set param workspace Root I Workspace Root param traversed Hash Set param preferred Classpaths Map public void update Cycle Participants Array List prereq Chain Hash Set cycle Participants I Workspace Root workspace Root Hash Set traversed Map preferred Classpaths I Path path this get Path prereq Chain add path traversed add path try I Classpath Entry classpath null if preferred Classpaths null classpath I Classpath Entry preferred Classpaths get this if classpath null classpath get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress for int i 0 length classpath length i length i I Classpath Entry entry classpath i if entry get Entry Kind I Classpath Entry CPE PROJECT I Path prereq Project Path entry get Path int index cycle Participants contains prereq Project Path 0 prereq Chain index Of prereq Project Path if index 0 refer to cycle or in cycle itself for int size prereq Chain size index size index cycle Participants add prereq Chain get index else if traversed contains prereq Project Path I Resource member workspace Root find Member prereq Project Path if member null member get Type I Resource PROJECT Java Project java Project Java Project Java Core create I Project member java Project update Cycle Participants prereq Chain cycle Participants workspace Root traversed preferred Classpaths catch Java Model Exception e project doesn t exist ignore prereq Chain remove path  cycleParticipants prereqChain ArrayList cycleParticipants HashSet workspaceRoot IWorkspaceRoot HashSet preferredClasspaths updateCycleParticipants ArrayList prereqChain HashSet cycleParticipants IWorkspaceRoot workspaceRoot HashSet preferredClasspaths IPath getPath prereqChain IClasspathEntry preferredClasspaths IClasspathEntry preferredClasspaths getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT IPath prereqProjectPath getPath cycleParticipants prereqProjectPath prereqChain indexOf prereqProjectPath prereqChain cycleParticipants prereqChain prereqProjectPath IResource workspaceRoot findMember prereqProjectPath getType IResource JavaProject javaProject JavaProject JavaCore IProject javaProject updateCycleParticipants prereqChain cycleParticipants workspaceRoot preferredClasspaths JavaModelException prereqChain
public void update Classpath Markers Map preferred Classpaths Map preferred Outputs this flush Classpath Problem Markers false cycle true format this flush Classpath Problem Markers false cycle false format I Classpath Entry classpath this read Classpath File true marker false log I Path output null discard the output location if classpath null classpath length 0 I Classpath Entry entry classpath classpath length 1 if entry get Content Kind Classpath Entry K OUTPUT I Classpath Entry copy new I Classpath Entry classpath length 1 System arraycopy classpath 0 copy 0 copy length classpath copy output entry get Path remember invalid path so as to avoid reupdating it again later on if preferred Classpaths null preferred Classpaths put this classpath null INVALID CLASSPATH classpath if preferred Outputs null preferred Outputs put this output null default Output Location output force classpath marker refresh if classpath null output null for int i 0 i classpath length i I Java Model Status status Classpath Entry validate Classpath Entry this classpath i false src attach true recurse in container if status isOK this create Classpath Problem Marker status I Java Model Status status Classpath Entry validate Classpath this classpath output if status isOK this create Classpath Problem Marker status  updateClasspathMarkers preferredClasspaths preferredOutputs flushClasspathProblemMarkers flushClasspathProblemMarkers IClasspathEntry readClasspathFile IPath IClasspathEntry getContentKind ClasspathEntry K_OUTPUT IClasspathEntry IClasspathEntry getPath preferredClasspaths preferredClasspaths INVALID_CLASSPATH preferredOutputs preferredOutputs defaultOutputLocation IJavaModelStatus ClasspathEntry validateClasspathEntry createClasspathProblemMarker IJavaModelStatus ClasspathEntry validateClasspath createClasspathProblemMarker
Reset the collection of package fragment roots local ones only if opened public void update Package Fragment Roots if this is Open try Java Project Element Info info get Java Project Element Info compute Children info catch Java Model Exception e try close could not do better catch Java Model Exception ex ignore  updatePackageFragmentRoots isOpen JavaProjectElementInfo getJavaProjectElementInfo computeChildren JavaModelException JavaModelException

Create and initialize a new instance of the receiver public Java Project Element Info this non Java Resources null  JavaProjectElementInfo nonJavaResources
Compute the non java resources contained in this java project private Object compute Non Java Resources Java Project project determine if src project and or if bin project I Path project Path project get Project get Full Path boolean src Is Project false boolean bin Is Project false char inclusion Patterns null char exclusion Patterns null I Classpath Entry classpath null I Path project Output null try classpath project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress for int i 0 i classpath length i I Classpath Entry entry classpath i if project Path equals entry get Path src Is Project true inclusion Patterns Classpath Entry entry full Inclusion Pattern Chars exclusion Patterns Classpath Entry entry full Exclusion Pattern Chars break project Output project get Output Location bin Is Project project Path equals project Output catch Java Model Exception e ignore Object resources new I Resource 5 int resources Counter 0 try I Resource members I Container project get Resource members for int i 0 max members length i max i I Resource res members i switch res get Type case I Resource FILE I Path res Full Path res get Full Path String res Name res get Name ignore a jar file on the classpath if org eclipse jdt internal compiler util Util is Archive File Name res Name this is Classpath Entry Or Output Location res Full Path classpath project Output break ignore java file if src project if src Is Project Util is Valid Compilation Unit Name res Name Util is Excluded res inclusion Patterns exclusion Patterns break ignore class file if bin project if bin Is Project Util is Valid Class File Name res Name break else add non java resource if resources length resources Counter resize System arraycopy resources 0 resources new I Resource resources Counter 2 0 resources Counter resources resources Counter res break case I Resource FOLDER res Full Path res get Full Path ignore non excluded folders on the classpath or that correspond to an output location if src Is Project Util is Excluded res inclusion Patterns exclusion Patterns Util is Valid Folder Name For Package res get Name this is Classpath Entry Or Output Location res Full Path classpath project Output break else add non java resource if resources length resources Counter resize System arraycopy resources 0 resources new I Resource resources Counter 2 0 resources Counter resources resources Counter res if resources length resources Counter System arraycopy resources 0 resources new I Resource resources Counter 0 resources Counter catch Core Exception e resources NO NON JAVA RESOURCES resources Counter 0 return resources  computeNonJavaResources JavaProject IPath projectPath getProject getFullPath srcIsProject binIsProject inclusionPatterns exclusionPatterns IClasspathEntry IPath projectOutput getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress IClasspathEntry projectPath getPath srcIsProject inclusionPatterns ClasspathEntry fullInclusionPatternChars exclusionPatterns ClasspathEntry fullExclusionPatternChars projectOutput getOutputLocation binIsProject projectPath projectOutput JavaModelException IResource resourcesCounter IResource IContainer getResource IResource getType IResource IPath resFullPath getFullPath resName getName isArchiveFileName resName isClasspathEntryOrOutputLocation resFullPath projectOutput srcIsProject isValidCompilationUnitName resName isExcluded inclusionPatterns exclusionPatterns binIsProject isValidClassFileName resName resourcesCounter IResource resourcesCounter resourcesCounter resourcesCounter IResource resFullPath getFullPath srcIsProject isExcluded inclusionPatterns exclusionPatterns isValidFolderNameForPackage getName isClasspathEntryOrOutputLocation resFullPath projectOutput resourcesCounter IResource resourcesCounter resourcesCounter resourcesCounter resourcesCounter IResource resourcesCounter resourcesCounter CoreException NO_NON_JAVA_RESOURCES resourcesCounter
I Package Fragment Root get All Package Fragment Roots Java Project project if this all Pkg Fragment Roots Cache null try this all Pkg Fragment Roots Cache project get All Package Fragment Roots catch Java Model Exception e project does not exist cannot happend since this is the info of the project return this all Pkg Fragment Roots Cache  IPackageFragmentRoot getAllPackageFragmentRoots JavaProject allPkgFragmentRootsCache allPkgFragmentRootsCache getAllPackageFragmentRoots JavaModelException allPkgFragmentRootsCache
Hash Map get All Package Fragments Java Project project if this all Pkg Fragments Cache null Hash Map cache new Hash Map I Package Fragment Root roots get All Package Fragment Roots project I Package Fragment frags this get Package Fragments In Roots roots project for int i 0 i frags length i I Package Fragment fragment frags i I Package Fragment entry I Package Fragment cache get fragment get Element Name if entry null entry new I Package Fragment 1 entry 0 fragment cache put fragment get Element Name entry else I Package Fragment copy new I Package Fragment entry length 1 System arraycopy entry 0 copy 0 entry length copy entry length fragment cache put fragment get Element Name copy this all Pkg Fragments Cache cache return this all Pkg Fragments Cache  HashMap getAllPackageFragments JavaProject allPkgFragmentsCache HashMap HashMap IPackageFragmentRoot getAllPackageFragmentRoots IPackageFragment getPackageFragmentsInRoots IPackageFragment IPackageFragment IPackageFragment getElementName IPackageFragment getElementName IPackageFragment IPackageFragment getElementName allPkgFragmentsCache allPkgFragmentsCache
Returns an array of non java resources contained in the receiver Object get Non Java Resources Java Project project if this non Java Resources null this non Java Resources compute Non Java Resources project return this non Java Resources  getNonJavaResources JavaProject nonJavaResources nonJavaResources computeNonJavaResources nonJavaResources
Returns all the package fragments found in the specified package fragment roots Make sure the returned fragments have the given project as great parent This ensures the name lookup will not refer to another project through jar package fragment roots private I Package Fragment get Package Fragments In Roots I Package Fragment Root roots I Java Project project The following code assumes that all the roots have the given project as their parent Array List frags new Array List for int i 0 i roots length i I Package Fragment Root root roots i try I Java Element pkgs root get Children 2 jar package fragment roots can be equals but not belonging to the same project As a result they share the same element info So this jar package fragment root could get the children of another jar package fragment root The following code ensures that the children of this jar package fragment root have the given project as a great parent int length pkgs length if length 0 continue if pkgs 0 get Parent get Parent equals project the children have the right parent simply add them to the list for int j 0 j length j frags add pkgs j else create a new handle with the root as the parent for int j 0 j length j frags add root get Package Fragment pkgs j get Element Name catch Java Model Exception e do nothing I Package Fragment fragments new I Package Fragment frags size frags to Array fragments return fragments  IPackageFragment getPackageFragmentsInRoots IPackageFragmentRoot IJavaProject ArrayList ArrayList IPackageFragmentRoot IJavaElement getChildren getParent getParent getPackageFragment getElementName JavaModelException IPackageFragment IPackageFragment toArray
private boolean is Classpath Entry Or Output Location I Path path I Classpath Entry resolved Classpath I Path project Output if project Output equals path return true for int i 0 length resolved Classpath length i length i I Classpath Entry entry resolved Classpath i if entry get Path equals path return true I Path output if output entry get Output Location null output equals path return true return false  isClasspathEntryOrOutputLocation IPath IClasspathEntry resolvedClasspath IPath projectOutput projectOutput resolvedClasspath IClasspathEntry resolvedClasspath getPath IPath getOutputLocation
Reset the package fragment roots and package fragment caches void reset Caches this all Pkg Fragment Roots Cache null this all Pkg Fragments Cache null  resetCaches allPkgFragmentRootsCache allPkgFragmentsCache
Set the f Non Java Resources to res value void set Non Java Resources Object resources this non Java Resources resources  fNonJavaResources setNonJavaResources nonJavaResources

protected DOM Node f Node AbstractDOM Builder constructor public AbstractDOM Builder super  DOMNode fNode AbstractDOMBuilder AbstractDOMBuilder
Accepts the line separator table and converts it into a line start table p A line separator might corresponds to several characters in the source see org eclipse jdt internal compiler I Document Element Requestor accept Line Separator Positions int public void accept Line Separator Positions int positions if positions null int length positions length if length 0 f Line Start Positions new int length 1 f Line Start Positions 0 0 int document Length f Document length for int i 0 i length i int i Plus One i 1 int position Plus One positions i 1 if position Plus One document Length if i Plus One length more separators f Line Start Positions i Plus One position Plus One else no more separators if f Document position Plus One n f Line Start Positions i Plus One position Plus One 1 else f Line Start Positions i Plus One position Plus One else f Line Start Positions i Plus One position Plus One  IDocumentElementRequestor acceptLineSeparatorPositions acceptLineSeparatorPositions fLineStartPositions fLineStartPositions documentLength fDocument iPlusOne positionPlusOne positionPlusOne documentLength iPlusOne fLineStartPositions iPlusOne positionPlusOne fDocument positionPlusOne fLineStartPositions iPlusOne positionPlusOne fLineStartPositions iPlusOne positionPlusOne fLineStartPositions iPlusOne positionPlusOne
Adds the given node to the current enclosing scope building the JDOM tree Nodes are only added to an enclosing scope when a compilation unit or type is being built since those are the only nodes that have children p NOTE nodes are added to the JDOM via the method basic Add Child such that the nodes in the newly created JDOM are not fragmented protected void add Child IDOM Node child if f Stack size 0 DOM Node parent DOM Node f Stack peek if f BuildingCU f Building Type parent basic Add Child child  basicAddChild addChild IDOMNode fStack DOMNode DOMNode fStack fBuildingCU fBuildingType basicAddChild
see IDOM Factory create Compilation Unit String String public IDOM Compilation Unit create Compilation Unit char contents char name return create Compilation Unit new Compilation Unit contents name  IDOMFactory createCompilationUnit IDOMCompilationUnit createCompilationUnit createCompilationUnit CompilationUnit
see IDOM Factory create Compilation Unit String String public IDOM Compilation Unit create Compilation Unit I Compilation Unit compilation Unit if f Abort return null f Node normalize this return IDOM Compilation Unit f Node  IDOMFactory createCompilationUnit IDOMCompilationUnit createCompilationUnit ICompilationUnit compilationUnit fAbort fNode IDOMCompilationUnit fNode
see org eclipse jdt internal compiler I Document Element Requestor enter Class int int int int int char int int char int int char int int int public void enter Compilation Unit if f BuildingCU IDOM Compilation Unit cu new DOM Compilation Unit f Document new int 0 f Document length 1 f Stack push cu  IDocumentElementRequestor enterClass enterCompilationUnit fBuildingCU IDOMCompilationUnit DOMCompilationUnit fDocument fDocument fStack
Finishes the configuration of the compilation unit DOM object which was created by a previous enter Compilation Unit call see org eclipse jdt internal compiler I Document Element Requestor exit Compilation Unit int public void exit Compilation Unit int declaration End DOM Compilation Unit cu DOM Compilation Unit f Stack pop cu set Source Range End declaration End f Node cu  enterCompilationUnit IDocumentElementRequestor exitCompilationUnit exitCompilationUnit declarationEnd DOMCompilationUnit DOMCompilationUnit fStack setSourceRangeEnd declarationEnd fNode
Finishes the configuration of the class and interface DOM objects param body End a source position corresponding to the closing bracket of the class param declaration End a source position corresponding to the end of the class declaration This can include whitespace and comments following the closing bracket protected void exit Type int body End int declaration End DOM Type type DOM Type f Stack pop type set Source Range End declaration End type set Close Body Range Start body End type set Close Body Range End body End f Node type  bodyEnd declarationEnd exitType bodyEnd declarationEnd DOMType DOMType fStack setSourceRangeEnd declarationEnd setCloseBodyRangeStart bodyEnd setCloseBodyRangeEnd bodyEnd fNode
see I Line Start Finder get Line Start int public int get Line Start int position int line Separator Count f Line Start Positions length reverse traversal intentional for int i line Separator Count 1 i 0 i if f Line Start Positions i position return f Line Start Positions i return 0  ILineStartFinder getLineStart getLineStart lineSeparatorCount fLineStartPositions lineSeparatorCount fLineStartPositions fLineStartPositions
Initializes the builder to create a document fragment param source Code the document containing the source code to be analyzed param building Compilation Unit true if a the document is being analyzed to create a compilation unit otherwise false param building Type true if the document is being analyzed to create a type or compilation unit protected void initialize Build char source Code boolean building Compilation Unit boolean building Type f BuildingCU building Compilation Unit f Building Type building Type f Stack new Stack f Document source Code f Field Count 0 f Abort false  sourceCode buildingCompilationUnit buildingType initializeBuild sourceCode buildingCompilationUnit buildingType fBuildingCU buildingCompilationUnit fBuildingType buildingType fStack fDocument sourceCode fFieldCount fAbort

protected char f Main Type Name public Compilation Unit char contents char filename f Contents contents f File Name filename String file new String filename int start file last Index Of 1 NON NLS 1 if start 0 start file last Index Of NON NLS 1 start file last Index Of 1 NON NLS 1 int end file last Index Of NON NLS 1 if end 1 end file length f Main Type Name file substring start end to Char Array  fMainTypeName CompilationUnit fContents fFileName lastIndexOf lastIndexOf lastIndexOf lastIndexOf fMainTypeName toCharArray
f Main Type Name file substring start end to Char Array public char get Contents return f Contents  fMainTypeName toCharArray getContents fContents
return f Contents public char get File Name return f File Name  fContents getFileName fFileName
return f File Name public char get Main Type Name return f Main Type Name  fFileName getMainTypeName fMainTypeName
return f Main Type Name public char get Package Name return null  fMainTypeName getPackageName
return null public String to String return Compilation Unit new String f File Name NON NLS 2 NON NLS 1  toString CompilationUnit fFileName

Creates a new DOM Builder public DOM Builder Creates a new DOM Builder  DOMBuilder DOMBuilder DOMBuilder
see I Document Element Requestor accept Import int declaration Start int declaration End int java Doc Positions char name int name Start Position boolean on Demand public void accept Import int declaration Start int declaration End int java Doc Positions char name int name Start boolean on Demand int source Range declaration Start declaration End int name Range name Start declaration End 1 See 1FVII1P String import Name new String Char Operation subarray f Document name Range 0 name Range 1 1 f Node new DOM Import f Document source Range import Name name Range on Demand add Child f Node if f Building Single Member f Finished Single Member true  IDocumentElementRequestor acceptImport declarationStart declarationEnd javaDocPositions nameStartPosition onDemand acceptImport declarationStart declarationEnd javaDocPositions nameStart onDemand sourceRange declarationStart declarationEnd nameRange nameStart declarationEnd importName CharOperation fDocument nameRange nameRange fNode DOMImport fDocument sourceRange importName nameRange onDemand addChild fNode fBuildingSingleMember fFinishedSingleMember
see I Document Element Requestor accept Initializer int declaration Start int declaration End int java Doc Positions int modifiers int modifiers Start int body Start int body End public void accept Initializer int declaration Start int declaration End int java Doc Positions int modifiers int modifiers Start int body Start int body End int source Range declaration Start declaration End int comment Range 1 1 if java Doc Positions null int length java Doc Positions length comment Range 0 java Doc Positions length 2 comment Range 1 java Doc Positions length 1 int modifiers Range 1 1 if modifiers Start declaration Start modifiers Range 0 modifiers Start modifiers Range 1 body Start 1 f Node new DOM Initializer f Document source Range comment Range modifiers modifiers Range body Start add Child f Node if f Building Single Member f Finished Single Member true  IDocumentElementRequestor acceptInitializer declarationStart declarationEnd javaDocPositions modifiersStart bodyStart bodyEnd acceptInitializer declarationStart declarationEnd javaDocPositions modifiersStart bodyStart bodyEnd sourceRange declarationStart declarationEnd commentRange javaDocPositions javaDocPositions commentRange javaDocPositions commentRange javaDocPositions modifiersRange modifiersStart declarationStart modifiersRange modifiersStart modifiersRange bodyStart fNode DOMInitializer fDocument sourceRange commentRange modifiersRange bodyStart addChild fNode fBuildingSingleMember fFinishedSingleMember
see I Document Element Requestor accept Package int declaration Start int declaration End int java Doc Positions char name int name Start Position public void accept Package int declaration Start int declaration End int java Doc Positions char name int name Start Position int source Range declaration Start declaration End int name Range name Start Position declaration End 1 f Node new DOM Package f Document source Range Char Operation char To String name name Range add Child f Node if f Building Single Member f Finished Single Member true  IDocumentElementRequestor acceptPackage declarationStart declarationEnd javaDocPositions nameStartPosition acceptPackage declarationStart declarationEnd javaDocPositions nameStartPosition sourceRange declarationStart declarationEnd nameRange nameStartPosition declarationEnd fNode DOMPackage fDocument sourceRange CharOperation charToString nameRange addChild fNode fBuildingSingleMember fFinishedSingleMember
Sets the abort flag to true The parser has encountered an error in the current document If we are only building a single member and we are done with the member don t worry about the error see I Document Element Requestor public void accept Problem I Problem problem if f Building Single Member f Finished Single Member return f Abort true  IDocumentElementRequestor acceptProblem IProblem fBuildingSingleMember fFinishedSingleMember fAbort
Adds the given node to the current enclosing scope building the JDOM tree Nodes are only added to an enclosing scope when a compilation unit or type is being built since those are the only nodes that have children p NOTE nodes are added to the JDOM via the method basic Add Child such that the nodes in the newly created JDOM are not fragmented protected void add Child IDOM Node child super add Child child if f Stack is Empty f Fields null f Fields add child  basicAddChild addChild IDOMNode addChild fStack isEmpty fFields fFields
see IDOM Factory create Compilation Unit public IDOM Compilation Unit create Compilation Unit return new DOM Compilation Unit  IDOMFactory createCompilationUnit IDOMCompilationUnit createCompilationUnit DOMCompilationUnit
see IDOM Factory create Compilation Unit String String public IDOM Compilation Unit create Compilation Unit I Compilation Unit compilation Unit initialize Build compilation Unit get Contents true true false get Parser options parse Compilation Unit compilation Unit return super create Compilation Unit compilation Unit  IDOMFactory createCompilationUnit IDOMCompilationUnit createCompilationUnit ICompilationUnit compilationUnit initializeBuild compilationUnit getContents getParser parseCompilationUnit compilationUnit createCompilationUnit compilationUnit
see IDOM Factory create Field String public IDOM Field create Field char source Code initialize Build source Code false false true get Parser options parse Field source Code if f Abort f Node null return null we only accept field declarations with one field if f Field Count 1 return null f Node normalize this return IDOM Field f Node  IDOMFactory createField IDOMField createField sourceCode initializeBuild sourceCode getParser parseField sourceCode fAbort fNode fFieldCount fNode IDOMField fNode
public IDOM Field create Fields char source Code initialize Build source Code false false false f Fields new Array List get Parser options parse Field source Code if f Abort return null IDOM Field fields new IDOM Field f Fields size f Fields to Array fields for int i 0 i fields length i DOM Node node DOM Node fields i if i fields length 1 DOM Node next DOM Node fields i 1 node f Next Node next next f Previous Node node DOM Node fields i normalize this return fields  IDOMField createFields sourceCode initializeBuild sourceCode fFields ArrayList getParser parseField sourceCode fAbort IDOMField IDOMField fFields fFields toArray DOMNode DOMNode DOMNode DOMNode fNextNode fPreviousNode DOMNode
see IDOM Factory create Import public IDOM Import create Import return new DOM Import  IDOMFactory createImport IDOMImport createImport DOMImport
see IDOM Factory create Import String public IDOM Import create Import char source Code initialize Build source Code false false true get Parser options parse Import source Code if f Abort f Node null return null f Node normalize this return IDOM Import f Node  IDOMFactory createImport IDOMImport createImport sourceCode initializeBuild sourceCode getParser parseImport sourceCode fAbort fNode fNode IDOMImport fNode
Creates an INITIALIZER document fragment from the given source see IDOM Factory create Initializer String public IDOM Initializer create Initializer char source Code initialize Build source Code false false true get Parser options parse Initializer source Code if f Abort f Node null f Node instanceof IDOM Initializer return null f Node normalize this return IDOM Initializer f Node  IDOMFactory createInitializer IDOMInitializer createInitializer sourceCode initializeBuild sourceCode getParser parseInitializer sourceCode fAbort fNode fNode IDOMInitializer fNode IDOMInitializer fNode
see IDOM Factory create Method String public IDOM Method create Method char source Code initialize Build source Code false false true get Parser options parse Method source Code if f Abort f Node null return null f Node normalize this return IDOM Method f Node  IDOMFactory createMethod IDOMMethod createMethod sourceCode initializeBuild sourceCode getParser parseMethod sourceCode fAbort fNode fNode IDOMMethod fNode
see IDOM Factory create Package public IDOM Package create Package return new DOM Package  IDOMFactory createPackage IDOMPackage createPackage DOMPackage
see IDOM Factory create Package String public IDOM Package create Package char source Code initialize Build source Code false false true get Parser options parse Package source Code if f Abort f Node null return null f Node normalize this return IDOM Package f Node  IDOMFactory createPackage IDOMPackage createPackage sourceCode initializeBuild sourceCode getParser parsePackage sourceCode fAbort fNode fNode IDOMPackage fNode
see IDOM Factory create Type String public IDOM Type create Type char source Code initialize Build source Code false true false get Parser options parse Type source Code if f Abort return null if f Node null f Node normalize this return IDOM Type f Node  IDOMFactory createType IDOMType createType sourceCode initializeBuild sourceCode getParser parseType sourceCode fAbort fNode fNode IDOMType fNode
Creates a new DOM Method and inizializes param declaration Start a source position corresponding to the first character of this constructor declaration param modifiers the modifiers for this constructor converted to a flag param modifiers Start a source position corresponding to the first character of the textual modifiers param return Type the name of the return type param return Type Start a source position corresponding to the first character of the return type param return Type End a source position corresponding to the last character of the return type param return Type Dimension Count the array dimension count as supplied on the return type for instance public int foo param name the name of this constructor param name Start a source position corresponding to the first character of the name param name End a source position corresponding to the last character of the name param parameter Types a list of parameter type names param parameter Type Starts a list of source positions corresponding to the first character of each parameter type name param parameter Type Ends a list of source positions corresponding to the last character of each parameter type name param parameter Names a list of the names of the parameters param parameters End a source position corresponding to the last character of the parameter list extended Return Type Dimension Count the array dimension count as supplied on the end of the parameter list for instance public int foo extended Return Type Dimension End a source position corresponding to the last character of the extended return type dimension param exception Types a list of the exception types param exception Type Starts a list of source positions corresponding to the first character of the respective exception types param exception Type Ends a list of source positions corresponding to the last character of the respective exception types param body Start a source position corresponding to the start of this constructor s body protected void enter Abstract Method int declaration Start int java Doc Positions int modifiers int modifiers Start char return Type int return Type Start int return Type End int return Type Dimension Count char name int name Start int name End char parameter Types int parameter Type Starts int parameter Type Ends char parameter Names int parameter Name Starts int parameter Name Ends int parameters End int extended Return Type Dimension Count int extended Return Type Dimension End char exception Types int exception Type Starts int exception Type Ends int body Start boolean is Constructor int source Range declaration Start 1 will be fixed up on exit int name Range name Start name End int comment Range 1 1 if java Doc Positions null int length java Doc Positions length comment Range 0 java Doc Positions 0 comment Range 1 java Doc Positions length 1 int modifiers Range 1 1 if modifiers Start 1 modifiers Range 0 modifiers Start if is Constructor modifiers Range 1 name Start 1 else modifiers Range 1 return Type Start 1 int return Type Range null if extended Return Type Dimension Count 0 return Type Range new int return Type Start return Type End parameters End 1 extended Return Type Dimension End else return Type Range new int return Type Start return Type End int parameter Range name End 1 parameters End int exception Range 1 1 if exception Types null exception Types length 0 int exception Count exception Types length exception Range 0 exception Type Starts 0 exception Range 1 exception Type Ends exception Count 1 int body Range null if exception Range 1 1 body Range new int exception Range 1 1 1 will be fixed up on exit else body Range new int parameters End 1 1 f Node new DOM Method f Document source Range Char Operation char To String name name Range comment Range modifiers modifiers Range is Constructor Char Operation char To String return Type return Type Range Char Operation char Array To String Array parameter Types Char Operation char Array To String Array parameter Names parameter Range Char Operation char Array To String Array exception Types exception Range body Range add Child f Node f Stack push f Node  DOMMethod declarationStart modifiersStart returnType returnTypeStart returnTypeEnd returnTypeDimensionCount nameStart nameEnd parameterTypes parameterTypeStarts parameterTypeEnds parameterNames parametersEnd extendedReturnTypeDimensionCount extendedReturnTypeDimensionEnd exceptionTypes exceptionTypeStarts exceptionTypeEnds bodyStart enterAbstractMethod declarationStart javaDocPositions modifiersStart returnType returnTypeStart returnTypeEnd returnTypeDimensionCount nameStart nameEnd parameterTypes parameterTypeStarts parameterTypeEnds parameterNames parameterNameStarts parameterNameEnds parametersEnd extendedReturnTypeDimensionCount extendedReturnTypeDimensionEnd exceptionTypes exceptionTypeStarts exceptionTypeEnds bodyStart isConstructor sourceRange declarationStart nameRange nameStart nameEnd commentRange javaDocPositions javaDocPositions commentRange javaDocPositions commentRange javaDocPositions modifiersRange modifiersStart modifiersRange modifiersStart isConstructor modifiersRange nameStart modifiersRange returnTypeStart returnTypeRange extendedReturnTypeDimensionCount returnTypeRange returnTypeStart returnTypeEnd parametersEnd extendedReturnTypeDimensionEnd returnTypeRange returnTypeStart returnTypeEnd parameterRange nameEnd parametersEnd exceptionRange exceptionTypes exceptionTypes exceptionCount exceptionTypes exceptionRange exceptionTypeStarts exceptionRange exceptionTypeEnds exceptionCount bodyRange exceptionRange bodyRange exceptionRange bodyRange parametersEnd fNode DOMMethod fDocument sourceRange CharOperation charToString nameRange commentRange modifiersRange isConstructor CharOperation charToString returnType returnTypeRange CharOperation charArrayToStringArray parameterTypes CharOperation charArrayToStringArray parameterNames parameterRange CharOperation charArrayToStringArray exceptionTypes exceptionRange bodyRange addChild fNode fStack fNode
see I Document Element Requestor enter Class int declaration Start int java Doc Positions int modifiers int modifiers Start int class Start char name int name Start int name End char superclass int superclass Start int superclass End char superinterfaces int superinterface Starts int superinterface Ends int body Start public void enter Class int declaration Start int java Doc Positions int modifiers int modifiers Start int keyword Start char name int name Start int name End char superclass int superclass Start int superclass End char superinterfaces int superinterface Starts int superinterface Ends int body Start enter Type declaration Start java Doc Positions modifiers modifiers Start keyword Start name name Start name End superclass superclass Start superclass End superinterfaces superinterface Starts superinterface Ends body Start true  IDocumentElementRequestor enterClass declarationStart javaDocPositions modifiersStart classStart nameStart nameEnd superclassStart superclassEnd superinterfaceStarts superinterfaceEnds bodyStart enterClass declarationStart javaDocPositions modifiersStart keywordStart nameStart nameEnd superclassStart superclassEnd superinterfaceStarts superinterfaceEnds bodyStart enterType declarationStart javaDocPositions modifiersStart keywordStart nameStart nameEnd superclassStart superclassEnd superinterfaceStarts superinterfaceEnds bodyStart
see I Document Element Requestor enter Constructor int declaration Start int java Doc Positions int modifiers int modifiers Start char name int name Start int name End char parameter Types int parameter Type Starts int parameter Type Ends char parameter Names int parameter Name Starts int parameter Name Ends int parameters End char exception Types int exception Type Starts int exception Type Ends int body Start public void enter Constructor int declaration Start int java Doc Positions int modifiers int modifiers Start char name int name Start int name End char parameter Types int parameter Type Starts int parameter Type Ends char parameter Names int parameter Name Starts int parameter Name Ends int parameters End char exception Types int exception Type Starts int exception Type Ends int body Start see 1FVIIQZ String name String new String f Document name Start name End name Start int open Paren Position name String index Of if open Paren Position 1 name End name Start open Paren Position 1 enter Abstract Method declaration Start java Doc Positions modifiers modifiers Start null 1 1 0 name name Start name End parameter Types parameter Type Starts parameter Type Ends parameter Names parameter Name Starts parameter Name Ends parameters End 0 1 exception Types exception Type Starts exception Type Ends body Start true  IDocumentElementRequestor enterConstructor declarationStart javaDocPositions modifiersStart nameStart nameEnd parameterTypes parameterTypeStarts parameterTypeEnds parameterNames parameterNameStarts parameterNameEnds parametersEnd exceptionTypes exceptionTypeStarts exceptionTypeEnds bodyStart enterConstructor declarationStart javaDocPositions modifiersStart nameStart nameEnd parameterTypes parameterTypeStarts parameterTypeEnds parameterNames parameterNameStarts parameterNameEnds parametersEnd exceptionTypes exceptionTypeStarts exceptionTypeEnds bodyStart nameString fDocument nameStart nameEnd nameStart openParenPosition nameString indexOf openParenPosition nameEnd nameStart openParenPosition enterAbstractMethod declarationStart javaDocPositions modifiersStart nameStart nameEnd parameterTypes parameterTypeStarts parameterTypeEnds parameterNames parameterNameStarts parameterNameEnds parametersEnd exceptionTypes exceptionTypeStarts exceptionTypeEnds bodyStart
see I Document Element Requestor enter Field int declaration Start int java Doc Positions int modifiers int modifiers Start char type int type Start int type End int type Dimension Count char name int name Start int name End int extended Type Dimension Count int extended Type Dimension End public void enter Field int declaration Start int java Doc Positions int modifiers int modifiers Start char type int type Start int type End int type Dimension Count char name int name Start int name End int extended Type Dimension Count int extended Type Dimension End int source Range declaration Start extended Type Dimension End name End extended Type Dimension End name End int name Range name Start name End int comment Range 1 1 if java Doc Positions null int length java Doc Positions length comment Range 0 java Doc Positions 0 comment Range 1 java Doc Positions length 1 int modifiers Range 1 1 if modifiers Start 1 modifiers Range 0 modifiers Start modifiers Range 1 type Start 1 int type Range type Start type End boolean has Initializer false fixed on exit Field int initializer Range 1 1 fixed on exit Field boolean is Variable Declarator false if f Node instanceof DOM Field DOM Field field DOM Field f Node if field f Type Range 0 type Start is Variable Declarator true f Node new DOM Field f Document source Range Char Operation char To String name name Range comment Range modifiers modifiers Range type Range Char Operation char To String type has Initializer initializer Range is Variable Declarator add Child f Node f Stack push f Node  IDocumentElementRequestor enterField declarationStart javaDocPositions modifiersStart typeStart typeEnd typeDimensionCount nameStart nameEnd extendedTypeDimensionCount extendedTypeDimensionEnd enterField declarationStart javaDocPositions modifiersStart typeStart typeEnd typeDimensionCount nameStart nameEnd extendedTypeDimensionCount extendedTypeDimensionEnd sourceRange declarationStart extendedTypeDimensionEnd nameEnd extendedTypeDimensionEnd nameEnd nameRange nameStart nameEnd commentRange javaDocPositions javaDocPositions commentRange javaDocPositions commentRange javaDocPositions modifiersRange modifiersStart modifiersRange modifiersStart modifiersRange typeStart typeRange typeStart typeEnd hasInitializer exitField initializerRange exitField isVariableDeclarator fNode DOMField DOMField DOMField fNode fTypeRange typeStart isVariableDeclarator fNode DOMField fDocument sourceRange CharOperation charToString nameRange commentRange modifiersRange typeRange CharOperation charToString hasInitializer initializerRange isVariableDeclarator addChild fNode fStack fNode
see I Document Element Requestor enter Interface int declaration Start int java Doc Positions int modifiers int modifiers Start int interface Start char name int name Start int name End char superinterfaces int superinterface Starts int superinterface Ends int body Start public void enter Interface int declaration Start int java Doc Positions int modifiers int modifiers Start int keyword Start char name int name Start int name End char superinterfaces int superinterface Starts int superinterface Ends int body Start enter Type declaration Start java Doc Positions modifiers modifiers Start keyword Start name name Start name End null 1 1 superinterfaces superinterface Starts superinterface Ends body Start false  IDocumentElementRequestor enterInterface declarationStart javaDocPositions modifiersStart interfaceStart nameStart nameEnd superinterfaceStarts superinterfaceEnds bodyStart enterInterface declarationStart javaDocPositions modifiersStart keywordStart nameStart nameEnd superinterfaceStarts superinterfaceEnds bodyStart enterType declarationStart javaDocPositions modifiersStart keywordStart nameStart nameEnd superinterfaceStarts superinterfaceEnds bodyStart
see I Document Element Requestor enter Method int declaration Start int java Doc Positions int modifiers int modifiers Start char return Type int return Type Start int return Type End int return Type Dimension Count char name int name Start int name End char parameter Types int parameter Type Starts int parameter Type Ends char parameter Names int parameter Name Starts int parameter Name Ends int parameters End int extended Return Type Dimension Count int extended Return Type Dimension End char exception Types int exception Type Starts int exception Type Ends int body Start public void enter Method int declaration Start int java Doc Positions int modifiers int modifiers Start char return Type int return Type Start int return Type End int return Type Dimension Count char name int name Start int name End char parameter Types int parameter Type Starts int parameter Type Ends char parameter Names int parameter Name Starts int parameter Name Ends int parameters End int extended Return Type Dimension Count int extended Return Type Dimension End char exception Types int exception Type Starts int exception Type Ends int body Start enter Abstract Method declaration Start java Doc Positions modifiers modifiers Start return Type return Type Start return Type End return Type Dimension Count name name Start name End parameter Types parameter Type Starts parameter Type Ends parameter Names parameter Name Starts parameter Name Ends parameters End extended Return Type Dimension Count extended Return Type Dimension End exception Types exception Type Starts exception Type Ends body Start false  IDocumentElementRequestor enterMethod declarationStart javaDocPositions modifiersStart returnType returnTypeStart returnTypeEnd returnTypeDimensionCount nameStart nameEnd parameterTypes parameterTypeStarts parameterTypeEnds parameterNames parameterNameStarts parameterNameEnds parametersEnd extendedReturnTypeDimensionCount extendedReturnTypeDimensionEnd exceptionTypes exceptionTypeStarts exceptionTypeEnds bodyStart enterMethod declarationStart javaDocPositions modifiersStart returnType returnTypeStart returnTypeEnd returnTypeDimensionCount nameStart nameEnd parameterTypes parameterTypeStarts parameterTypeEnds parameterNames parameterNameStarts parameterNameEnds parametersEnd extendedReturnTypeDimensionCount extendedReturnTypeDimensionEnd exceptionTypes exceptionTypeStarts exceptionTypeEnds bodyStart enterAbstractMethod declarationStart javaDocPositions modifiersStart returnType returnTypeStart returnTypeEnd returnTypeDimensionCount nameStart nameEnd parameterTypes parameterTypeStarts parameterTypeEnds parameterNames parameterNameStarts parameterNameEnds parametersEnd extendedReturnTypeDimensionCount extendedReturnTypeDimensionEnd exceptionTypes exceptionTypeStarts exceptionTypeEnds bodyStart
protected void enter Type int declaration Start int java Doc Positions int modifiers int modifiers Start int keyword Start char name int name Start int name End char superclass int superclass Start int superclass End char superinterfaces int superinterface Starts int superinterface Ends int body Start boolean is Class if f Building Type int source Range declaration Start 1 will be fixed in the exit int comment Range 1 1 if java Doc Positions null int length java Doc Positions length comment Range 0 java Doc Positions 0 comment Range 1 java Doc Positions length 1 int modifiers Range 1 1 if modifiers Start 1 modifiers Range 0 modifiers Start modifiers Range 1 modifiers Start 1 keyword Start 1 1 int type Keyword Range keyword Start name Start 1 int name Range new int name Start name End int extends Keyword Range 1 1 int superclass Range 1 1 int implements Keyword Range 1 1 int interfaces Range 1 1 if is Class if superclass null extends Keyword Range 0 name End 1 extends Keyword Range 1 superclass Start 1 superclass Range 0 superclass Start superclass Range 1 superclass End if superinterfaces null superinterfaces length 0 superclass Range 1 superclass End if superclass End 1 implements Keyword Range 0 superclass End 1 else implements Keyword Range 0 name End 1 implements Keyword Range 1 superinterface Starts 0 1 interfaces Range 0 superinterface Starts 0 interfaces Range 1 superinterface Ends superinterfaces length 1 else if superinterfaces null superinterfaces length 0 extends Keyword Range 0 name End 1 extends Keyword Range 1 superinterface Starts 0 1 interfaces Range 0 superinterface Starts 0 interfaces Range 1 superinterface Ends superinterfaces length 1 int open Body Range body Start 1 fixed by set Type Ranges DOM Node int close Body Range 1 1 will be fixed in exit f Node new DOM Type f Document source Range new String name name Range comment Range modifiers modifiers Range type Keyword Range superclass Range extends Keyword Range Char Operation char Array To String Array superinterfaces interfaces Range implements Keyword Range open Body Range close Body Range is Class add Child f Node f Stack push f Node  enterType declarationStart javaDocPositions modifiersStart keywordStart nameStart nameEnd superclassStart superclassEnd superinterfaceStarts superinterfaceEnds bodyStart isClass fBuildingType sourceRange declarationStart commentRange javaDocPositions javaDocPositions commentRange javaDocPositions commentRange javaDocPositions modifiersRange modifiersStart modifiersRange modifiersStart modifiersRange modifiersStart keywordStart typeKeywordRange keywordStart nameStart nameRange nameStart nameEnd extendsKeywordRange superclassRange implementsKeywordRange interfacesRange isClass extendsKeywordRange nameEnd extendsKeywordRange superclassStart superclassRange superclassStart superclassRange superclassEnd superclassRange superclassEnd superclassEnd implementsKeywordRange superclassEnd implementsKeywordRange nameEnd implementsKeywordRange superinterfaceStarts interfacesRange superinterfaceStarts interfacesRange superinterfaceEnds extendsKeywordRange nameEnd extendsKeywordRange superinterfaceStarts interfacesRange superinterfaceStarts interfacesRange superinterfaceEnds openBodyRange bodyStart setTypeRanges DOMNode closeBodyRange fNode DOMType fDocument sourceRange nameRange commentRange modifiersRange typeKeywordRange superclassRange extendsKeywordRange CharOperation charArrayToStringArray interfacesRange implementsKeywordRange openBodyRange closeBodyRange isClass addChild fNode fStack fNode
Finishes the configuration of the constructors and methods param body End a source position corresponding to the closing bracket of the method param declaration End a source position corresponding to the end of the method declaration This can include whitespace and comments following the closing bracket protected void exit Abstract Method int body End int declaration End DOM Method method DOM Method f Stack pop method set Source Range End declaration End method set Body Range End body End 1 f Node method if f Building Single Member f Finished Single Member true  bodyEnd declarationEnd exitAbstractMethod bodyEnd declarationEnd DOMMethod DOMMethod fStack setSourceRangeEnd declarationEnd setBodyRangeEnd bodyEnd fNode fBuildingSingleMember fFinishedSingleMember
Finishes the configuration of the class DOM object which was created by a previous enter Class call see I Document Element Requestor exit Class int int public void exit Class int body End int declaration End exit Type body End declaration End  enterClass IDocumentElementRequestor exitClass exitClass bodyEnd declarationEnd exitType bodyEnd declarationEnd
Finishes the configuration of the method DOM object which was created by a previous enter Constructor call see I Document Element Requestor exit Constructor int int public void exit Constructor int body End int declaration End exit Abstract Method body End declaration End  enterConstructor IDocumentElementRequestor exitConstructor exitConstructor bodyEnd declarationEnd exitAbstractMethod bodyEnd declarationEnd
Finishes the configuration of the field DOM object which was created by a previous enter Field call see I Document Element Requestor exit Field int int public void exit Field int body End int declaration End DOM Field field DOM Field f Stack pop if field get End Position declaration End field set Source Range End declaration End int name End field f Name Range 1 if name End body End see 1FVIIV8 obtain initializer range String initializer new String f Document name End 1 body End name End int index initializer index Of if index 1 field set Has Initializer true field set Initializer Range name End index 2 body End f Field Count f Node field if f Building Single Member f Finished Single Member true  enterField IDocumentElementRequestor exitField exitField bodyEnd declarationEnd DOMField DOMField fStack getEndPosition declarationEnd setSourceRangeEnd declarationEnd nameEnd fNameRange nameEnd bodyEnd fDocument nameEnd bodyEnd nameEnd indexOf setHasInitializer setInitializerRange nameEnd bodyEnd fFieldCount fNode fBuildingSingleMember fFinishedSingleMember
Finishes the configuration of the interface DOM object which was created by a previous enter Interface call see I Document Element Requestor exit Interface int int public void exit Interface int body End int declaration End exit Type body End declaration End  enterInterface IDocumentElementRequestor exitInterface exitInterface bodyEnd declarationEnd exitType bodyEnd declarationEnd
Finishes the configuration of the method DOM object which was created by a previous enter Method call see I Document Element Requestor exit Method int int public void exit Method int body End int declaration End exit Abstract Method body End declaration End  enterMethod IDocumentElementRequestor exitMethod exitMethod bodyEnd declarationEnd exitAbstractMethod bodyEnd declarationEnd
Creates a new parser protected Document Element Parser get Parser Map settings return new Document Element Parser this new Default Problem Factory new Compiler Options settings  DocumentElementParser getParser DocumentElementParser DefaultProblemFactory CompilerOptions
Initializes the builder to create a document fragment param source Code the document containing the source code to be analyzed param building Compilation Unit true if a the document is being analyzed to create a compilation unit otherwise false param building Type true if the document is being analyzed to create a type or compilation unit param single Member true if building a single member protected void initialize Build char source Code boolean building Compilation Unit boolean building Type boolean single Member super initialize Build source Code building Compilation Unit building Type f Building Single Member single Member f Finished Single Member false  sourceCode buildingCompilationUnit buildingType singleMember initializeBuild sourceCode buildingCompilationUnit buildingType singleMember initializeBuild sourceCode buildingCompilationUnit buildingType fBuildingSingleMember singleMember fFinishedSingleMember

protected String f Header Creates a new empty COMPILATION UNIT document fragment DOM Compilation Unit f Header NON NLS 1  fHeader COMPILATION_UNIT DOMCompilationUnit fHeader
Creates a new COMPILATION UNIT on the given range of the document param document the document containing this node s original contents param source Range a two element array of integers describing the entire inclusive source range of this node within its document A compilation unit s source range is the entire document the first integer is zero and the second integer is the position of the last character in the document DOM Compilation Unit char document int source Range super document source Range null new int 1 1 f Header NON NLS 1  COMPILATION_UNIT sourceRange DOMCompilationUnit sourceRange sourceRange fHeader
see DOM Node append Contents Char Array Buffer protected void append Fragmented Contents Char Array Buffer buffer buffer append get Header append Contents Of Children buffer  DOMNode appendContents CharArrayBuffer appendFragmentedContents CharArrayBuffer getHeader appendContentsOfChildren
see IDOM Node can Have Children public boolean can Have Children return true  IDOMNode canHaveChildren canHaveChildren
see IDOM Compilation Unit get Header public String get Header return f Header  IDOMCompilationUnit getHeader getHeader fHeader
see IDOM Node get Java Element public I Java Element get Java Element I Java Element parent throws Illegal Argument Exception if parent get Element Type I Java Element PACKAGE FRAGMENT return I Package Fragment parent get Compilation Unit get Name else throw new Illegal Argument Exception Util bind element illegal Parent NON NLS 1  IDOMNode getJavaElement IJavaElement getJavaElement IJavaElement IllegalArgumentException getElementType IJavaElement PACKAGE_FRAGMENT IPackageFragment getCompilationUnit getName IllegalArgumentException illegalParent
see IDOM Compilation Unit get Name public String get Name IDOM Type top Level Type null IDOM Type first Type null IDOM Node child f First Child while child null if child get Node Type IDOM Node TYPE IDOM Type type IDOM Type child if first Type null first Type type if Flags is Public type get Flags top Level Type type break child child get Next Node if top Level Type null top Level Type first Type if top Level Type null return top Level Type get Name SUFFIX STRING java else return null  IDOMCompilationUnit getName getName IDOMType topLevelType IDOMType firstType IDOMNode fFirstChild getNodeType IDOMNode IDOMType IDOMType firstType firstType isPublic getFlags topLevelType getNextNode topLevelType topLevelType firstType topLevelType topLevelType getName SUFFIX_STRING_java
see IDOM Node get Node Type public int get Node Type return IDOM Node COMPILATION UNIT  IDOMNode getNodeType getNodeType IDOMNode COMPILATION_UNIT
Sets the header protected void initalize Header DOM Node child DOM Node get First Child if child null int child Start child get Start Position if child Start 1 set Header new String Char Operation subarray f Document 0 child Start  initalizeHeader DOMNode DOMNode getFirstChild childStart getStartPosition childStart setHeader CharOperation fDocument childStart
see IDOM Node is Allowable Child IDOM Node public boolean is Allowable Child IDOM Node node if node null int type node get Node Type return type IDOM Node PACKAGE type IDOM Node IMPORT type IDOM Node TYPE else return false  IDOMNode isAllowableChild IDOMNode isAllowableChild IDOMNode getNodeType IDOMNode IDOMNode IDOMNode
see DOM Node protected DOM Node newDOM Node return new DOM Compilation Unit  DOMNode DOMNode newDOMNode DOMCompilationUnit
Normalizes this code DOM Node code s source positions to include whitespace preceeding the node on the line on which the node starts and all whitespace after the node up to the next node s start void normalize I Line Start Finder finder super normalize finder initalize Header  DOMNode ILineStartFinder initalizeHeader
see IDOM Compilation Unit set Header String public void set Header String comment f Header comment fragment  IDOMCompilationUnit setHeader setHeader fHeader
see IDOM Compilation Unit set Name String public void set Name String name nothing to do  IDOMCompilationUnit setName setName
see DOM Node share Contents DOM Node protected void share Contents DOM Node node super share Contents node f Header DOM Compilation Unit node f Header  DOMNode shareContents DOMNode shareContents DOMNode shareContents fHeader DOMCompilationUnit fHeader
see IDOM Node to String public String to String return COMPILATION UNIT get Name NON NLS 1  IDOMNode toString toString COMPILATION_UNIT getName

Constructs an empty field node DOM Field Constructs an empty field node  DOMField
Creates a new detailed FIELD document fragment on the given range of the document param document the document containing this node s original contents param source Range a two element array of integers describing the entire inclusive source range of this node within its document Contents start on and include the character at the first position Contents end on and include the character at the last position An array of 1 s indicates this node s contents do not exist in the document param name the identifier portion of the name of this field corresponding to Variable Declarator Id JLS 8 3 param name Range a two element array of integers describing the entire inclusive source range of this node s name within its document including any array qualifiers that might follow the name param comment Range a two element array describing the comments that precede the member declaration The first matches the start of this node s source Range and the second is the new line or first non whitespace character following the last comment If no comments are present this array contains two 1 s param flags an integer representing the modifiers for this member The integer can be analyzed with org eclipse jdt core Flags param modifier Range a two element array describing the location of modifiers for this member within its source range The first integer is the first character of the first modifier for this member and the second integer is the last whitespace character preceeding the next part of this member declaration If there are no modifiers present in this node s source code that is package default visibility this array contains two 1 s param type Range a two element array describing the location of the type Name in the document the positions of the first and last characters of the type Name param type the type of the field in normalized form as defined in Type in Field Declaration JLS 8 3 param has Initializer true if this field declaration includes an initializer otherwise false param init Range a two element array describing the location of the initializer in the declaration The first integer is the position of the character following the equals sign and the position of the last character is the last in the initializer If this field has no initializer this array contains two 1 s param is Variable Declarator true if the field is a seconday variable declarator for a previous field declaration DOM Field char document int source Range String name int name Range int comment Range int flags int modifier Range int type Range String type boolean has Initializer int init Range boolean is Variable Declarator super document source Range name name Range comment Range flags modifier Range f Type type f Type Range type Range set Has Initializer has Initializer f Initializer Range init Range set Is Variable Declarator is Variable Declarator set Mask MASK DETAILED SOURCE INDEXES true  sourceRange VariableDeclaratorId nameRange commentRange sourceRange modifierRange typeRange typeName typeName hasInitializer initRange isVariableDeclarator DOMField sourceRange nameRange commentRange modifierRange typeRange hasInitializer initRange isVariableDeclarator sourceRange nameRange commentRange modifierRange fType fTypeRange typeRange setHasInitializer hasInitializer fInitializerRange initRange setIsVariableDeclarator isVariableDeclarator setMask MASK_DETAILED_SOURCE_INDEXES
Creates a new simple FIELD document fragment on the given range of the document param document the document containing this node s original contents param source Range a two element array of integers describing the entire inclusive source range of this node within its document Contents start on and include the character at the first position Contents end on and include the character at the last position An array of 1 s indicates this node s contents do not exist in the document param name the identifier portion of the name of this field corresponding to Variable Declarator Id JLS 8 3 param name Range a two element array of integers describing the entire inclusive source range of this node s name within its document including any array qualifiers that might follow the name param flags an integer representing the modifiers for this member The integer can be analyzed with org eclipse jdt core Flags param type the type of the field in normalized form as defined in Type in Field Declaration JLS 8 3 param is Variable Declarator true if the field is a seconday variable declarator for a previous field declaration DOM Field char document int source Range String name int name Range int flags String type boolean is Variable Declarator this document source Range name name Range new int 1 1 flags new int 1 1 new int 1 1 type false new int 1 1 is Variable Declarator set Mask MASK DETAILED SOURCE INDEXES false  sourceRange VariableDeclaratorId nameRange isVariableDeclarator DOMField sourceRange nameRange isVariableDeclarator sourceRange nameRange isVariableDeclarator setMask MASK_DETAILED_SOURCE_INDEXES
Appends this member s body contents to the given Char Array Buffer Body contents include the member body and any trailing whitespace p A field does not have a body see DOM Member append Member Body Contents Char Array Buffer protected void append Member Body Contents Char Array Buffer buffer nothing to do  CharArrayBuffer DOMMember appendMemberBodyContents CharArrayBuffer appendMemberBodyContents CharArrayBuffer
see DOM Member append Member Declaration Contents Char Array Buffer protected void append Member Declaration Contents Char Array Buffer buffer if is Variable Declarator buffer append f Document f Source Range 0 f Name Range 0 f Source Range 0 else buffer append get Type Contents append f Document f Type Range 1 1 f Name Range 0 f Type Range 1 1 buffer append get Name Contents if has Initializer if f Initializer Range 0 0 buffer append append f Initializer append f Document f Name Range 1 1 f Source Range 1 f Name Range 1 else buffer append f Document f Name Range 1 1 f Initializer Range 0 f Name Range 1 1 append get Initializer append f Document f Initializer Range 1 1 f Source Range 1 f Initializer Range 1 else if f Initializer Range 0 0 buffer append f Document f Name Range 1 1 f Source Range 1 f Name Range 1 else buffer append f Document f Initializer Range 1 1 f Source Range 1 f Initializer Range 1  DOMMember appendMemberDeclarationContents CharArrayBuffer appendMemberDeclarationContents CharArrayBuffer isVariableDeclarator fDocument fSourceRange fNameRange fSourceRange getTypeContents fDocument fTypeRange fNameRange fTypeRange getNameContents hasInitializer fInitializerRange fInitializer fDocument fNameRange fSourceRange fNameRange fDocument fNameRange fInitializerRange fNameRange getInitializer fDocument fInitializerRange fSourceRange fInitializerRange fInitializerRange fDocument fNameRange fSourceRange fNameRange fDocument fInitializerRange fSourceRange fInitializerRange
Appends this member s header contents to the given Char Array Buffer Header contents include any preceding comments and modifiers p If this field is a secondary variable declarator there is no header see DOM Member append Member Header Fragment Char Array Buffer protected void append Member Header Fragment Char Array Buffer buffer if is Variable Declarator return else super append Member Header Fragment buffer  CharArrayBuffer DOMMember appendMemberHeaderFragment CharArrayBuffer appendMemberHeaderFragment CharArrayBuffer isVariableDeclarator appendMemberHeaderFragment
see DOM Member append Simple Contents Char Array Buffer protected void append Simple Contents Char Array Buffer buffer append eveything before my name buffer append f Document f Source Range 0 f Name Range 0 f Source Range 0 append my name buffer append f Name append everything after my name buffer append f Document f Name Range 1 1 f Source Range 1 f Name Range 1  DOMMember appendSimpleContents CharArrayBuffer appendSimpleContents CharArrayBuffer fDocument fSourceRange fNameRange fSourceRange fName fDocument fNameRange fSourceRange fNameRange
Generates detailed source indexes for this node if possible exception DOM Exception if unable to generate detailed source indexes for this node protected void become Detailed throws DOM Exception if is Detailed if is Variable Declarator has Multiple Variable Declarators DOM Node first get First Field Declaration DOM Node last get Last Field Declaration DOM Node node first String source first get Contents while node last node node f Next Node source node get Contents DOM Builder builder new DOM Builder IDOM Field details builder create Fields source to Char Array if details length 0 throw new DOM Exception Util bind dom cannot Detail NON NLS 1 else node this for int i 0 i details length i node share Contents DOM Node details i node node f Next Node else super become Detailed  DOMException becomeDetailed DOMException isDetailed isVariableDeclarator hasMultipleVariableDeclarators DOMNode getFirstFieldDeclaration DOMNode getLastFieldDeclaration DOMNode getContents fNextNode getContents DOMBuilder DOMBuilder IDOMField createFields toCharArray DOMException cannotDetail shareContents DOMNode fNextNode becomeDetailed
see IDOM Node clone public Object clone if is Variable Declarator has Multiple Variable Declarators return get Factory create Field new String get Single Variable Declarator Contents else return super clone  IDOMNode isVariableDeclarator hasMultipleVariableDeclarators getFactory createField getSingleVariableDeclaratorContents
Expands all variable declarators in this field declaration into stand alone field declarations protected void expand if is Variable Declarator has Multiple Variable Declarators Enumeration siblings new Sibling Enumeration get First Field Declaration DOM Field field DOM Field siblings next Element DOM Node next field f Next Node while siblings has More Elements next instanceof DOM Field DOM Field next is Variable Declarator field localize Contents if field f Parent null field f Parent fragment field DOM Field siblings next Element next field f Next Node field localize Contents  isVariableDeclarator hasMultipleVariableDeclarators SiblingEnumeration getFirstFieldDeclaration DOMField DOMField nextElement DOMNode fNextNode hasMoreElements DOMField DOMField isVariableDeclarator localizeContents fParent fParent DOMField nextElement fNextNode localizeContents
see DOM Node get Detailed Node protected DOM Node get Detailed Node if is Variable Declarator has Multiple Variable Declarators return DOM Node get Factory create Field new String get Single Variable Declarator Contents else return DOM Node get Factory create Field get Contents  DOMNode getDetailedNode DOMNode getDetailedNode isVariableDeclarator hasMultipleVariableDeclarators DOMNode getFactory createField getSingleVariableDeclaratorContents DOMNode getFactory createField getContents
Returns the first field document fragment that defines the type for this variable declarator protected DOM Field get First Field Declaration if is Variable Declarator return DOM Field f Previous Node get First Field Declaration else return this  DOMField getFirstFieldDeclaration isVariableDeclarator DOMField fPreviousNode getFirstFieldDeclaration
see IDOM Field get Initializer public String get Initializer become Detailed if has Initializer if f Initializer null return f Initializer else return new String Char Operation subarray f Document f Initializer Range 0 f Initializer Range 1 1 else return null  IDOMField getInitializer getInitializer becomeDetailed hasInitializer fInitializer fInitializer CharOperation fDocument fInitializerRange fInitializerRange
see IDOM Node get Java Element public I Java Element get Java Element I Java Element parent throws Illegal Argument Exception if parent get Element Type I Java Element TYPE return I Type parent get Field get Name else throw new Illegal Argument Exception Util bind element illegal Parent NON NLS 1  IDOMNode getJavaElement IJavaElement getJavaElement IJavaElement IllegalArgumentException getElementType IJavaElement IType getField getName IllegalArgumentException illegalParent
Returns the last field document fragment in this muli declarator statement protected DOM Field get Last Field Declaration DOM Field field this while field is Variable Declarator field has Multiple Variable Declarators if field f Next Node instanceof DOM Field DOM Field field f Next Node is Variable Declarator field DOM Field field f Next Node else break return field  DOMField getLastFieldDeclaration DOMField isVariableDeclarator hasMultipleVariableDeclarators fNextNode DOMField DOMField fNextNode isVariableDeclarator DOMField fNextNode
see DOM Member get Member Declaration Start Position protected int get Member Declaration Start Position return f Type Range 0  DOMMember getMemberDeclarationStartPosition getMemberDeclarationStartPosition fTypeRange
see IDOM Node get Node Type public int get Node Type return IDOM Node FIELD  IDOMNode getNodeType getNodeType IDOMNode
Returns a String representing this field declaration as a field declaration with one variable declarator protected char get Single Variable Declarator Contents Char Array Buffer buffer new Char Array Buffer DOM Field first get First Field Declaration if first is Detailed first append Member Header Fragment buffer buffer append get Type if is Variable Declarator buffer append else buffer append f Document f Type Range 1 1 f Name Range 0 f Type Range 1 1 else buffer append first f Document first f Source Range 0 first f Name Range 0 first f Source Range 0 buffer append get Name if has Initializer if f Initializer Range 0 0 buffer append append f Initializer append append Util LINE SEPARATOR else buffer append f Document f Name Range 1 1 f Initializer Range 0 f Name Range 1 1 append get Initializer append append Util LINE SEPARATOR else buffer append append Util LINE SEPARATOR return buffer get Contents  getSingleVariableDeclaratorContents CharArrayBuffer CharArrayBuffer DOMField getFirstFieldDeclaration isDetailed appendMemberHeaderFragment getType isVariableDeclarator fDocument fTypeRange fNameRange fTypeRange fDocument fSourceRange fNameRange fSourceRange getName hasInitializer fInitializerRange fInitializer LINE_SEPARATOR fDocument fNameRange fInitializerRange fNameRange getInitializer LINE_SEPARATOR LINE_SEPARATOR getContents
see IDOM Field get Type public String get Type return f Type  IDOMField getType getType fType
Returns the souce code to be used for this field s type protected char get Type Contents if is Type Altered return f Type to Char Array else return Char Operation subarray f Document f Type Range 0 f Type Range 1 1  getTypeContents isTypeAltered fType toCharArray CharOperation fDocument fTypeRange fTypeRange
Returns true if this field has an initializer expression otherwise false protected boolean has Initializer return get Mask MASK FIELD HAS INITIALIZER  hasInitializer getMask MASK_FIELD_HAS_INITIALIZER
Returns true is this field declarations has more than one variable declarator otherwise false protected boolean has Multiple Variable Declarators return f Next Node null f Next Node instanceof DOM Field DOM Field f Next Node is Variable Declarator  hasMultipleVariableDeclarators fNextNode fNextNode DOMField DOMField fNextNode isVariableDeclarator
Inserts the given un parented node as a sibling of this node immediately before this node Once inserted the sibling is only dependent on this document fragment p When a sibling is inserted before a variable declarator it must first be expanded see IDOM Node insert Sibling IDOM Node public void insert Sibling IDOM Node sibling throws Illegal Argument Exception DOM Exception if is Variable Declarator expand super insert Sibling sibling  IDOMNode insertSibling IDOMNode insertSibling IDOMNode IllegalArgumentException DOMException isVariableDeclarator insertSibling
Returns true if this field s type has been altered from the original document contents protected boolean is Type Altered return get Mask MASK FIELD TYPE ALTERED  isTypeAltered getMask MASK_FIELD_TYPE_ALTERED
Returns true if this field is declared as a secondary variable declarator for a previous field declaration protected boolean is Variable Declarator return get Mask MASK FIELD IS VARIABLE DECLARATOR  isVariableDeclarator getMask MASK_FIELD_IS_VARIABLE_DECLARATOR
see DOM Node protected DOM Node newDOM Node return new DOM Field  DOMNode DOMNode newDOMNode DOMField
Normalizes this code DOM Node code s end position void normalize End Position I Line Start Finder finder DOM Node next if next null this node s end position includes all of the characters up to the end of the enclosing node DOM Node parent DOM Node get Parent if parent null parent instanceof DOM Compilation Unit set Source Range End f Document length 1 else parent is a type int temp DOM Type parent get Close Body Position 1 set Source Range End temp f Insertion Position Math max finder get Line Start temp 1 get End Position else this node s end position is just before the start of the next node unless the next node is a field that is declared along with this one int temp next get Start Position 1 f Insertion Position Math max finder get Line Start temp 1 get End Position next normalize Start Position get End Position finder if next instanceof DOM Field DOM Field field DOM Field next if field is Variable Declarator f Type Range 0 field f Type Range 0 return set Source Range End next get Start Position 1  DOMNode normalizeEndPosition ILineStartFinder DOMNode DOMNode DOMNode getParent DOMCompilationUnit setSourceRangeEnd fDocument DOMType getCloseBodyPosition setSourceRangeEnd fInsertionPosition getLineStart getEndPosition getStartPosition fInsertionPosition getLineStart getEndPosition normalizeStartPosition getEndPosition DOMField DOMField DOMField isVariableDeclarator fTypeRange fTypeRange setSourceRangeEnd getStartPosition
Normalizes this code DOM Node code s start position void normalize Start Position int end Position I Line Start Finder finder if is Variable Declarator start position is end of last element set Start Position f Previous Node get End Position 1 else super normalize Start Position end Position finder  DOMNode normalizeStartPosition endPosition ILineStartFinder isVariableDeclarator setStartPosition fPreviousNode getEndPosition normalizeStartPosition endPosition
Offsets all the source indexes in this node by the given amount protected void offset int offset super offset offset offset Range f Initializer Range offset offset Range f Type Range offset  offsetRange fInitializerRange offsetRange fTypeRange
Separates this node from its parent and siblings maintaining any ties that this node has to the underlying document fragment p When a field with multiple declarators is removed its declaration must first be expanded see IDOM Node remove public void remove expand super remove  IDOMNode
see IDOM Member set Comment String public void set Comment String comment expand super set Comment comment  IDOMMember setComment setComment setComment
see IDOM Member set Flags int public void set Flags int flags expand super set Flags flags  IDOMMember setFlags setFlags setFlags
Sets the state of this field declaration as having an initializer expression protected void set Has Initializer boolean has Initializer set Mask MASK FIELD HAS INITIALIZER has Initializer  setHasInitializer hasInitializer setMask MASK_FIELD_HAS_INITIALIZER hasInitializer
see IDOM Field set Initializer String public void set Initializer String initializer become Detailed fragment set Has Initializer initializer null f Initializer initializer  IDOMField setInitializer setInitializer becomeDetailed setHasInitializer fInitializer
Sets the initializer range void set Initializer Range int start int end f Initializer Range 0 start f Initializer Range 1 end  setInitializerRange fInitializerRange fInitializerRange
Sets the state of this field declaration as being a secondary variable declarator for a previous field declaration protected void set Is Variable Declarator boolean is Variable Declarator set Mask MASK FIELD IS VARIABLE DECLARATOR is Variable Declarator  setIsVariableDeclarator isVariableDeclarator setMask MASK_FIELD_IS_VARIABLE_DECLARATOR isVariableDeclarator
see IDOM Field set Name String public void set Name String name throws Illegal Argument Exception if name null throw new Illegal Argument Exception Util bind element null Name NON NLS 1 else super set Name name set Type Altered true  IDOMField setName setName IllegalArgumentException IllegalArgumentException nullName setName setTypeAltered
see IDOM Field set Type String public void set Type String type Name throws Illegal Argument Exception if type Name null throw new Illegal Argument Exception Util bind element null Type NON NLS 1 become Detailed expand fragment set Type Altered true set Name Altered true f Type type Name  IDOMField setType setType typeName IllegalArgumentException typeName IllegalArgumentException nullType becomeDetailed setTypeAltered setNameAltered fType typeName
Sets the state of this field declaration as having the field type altered from the original document protected void set Type Altered boolean type Altered set Mask MASK FIELD TYPE ALTERED type Altered  setTypeAltered typeAltered setMask MASK_FIELD_TYPE_ALTERED typeAltered
see DOM Node share Contents DOM Node protected void share Contents DOM Node node super share Contents node DOM Field field DOM Field node f Initializer field f Initializer f Initializer Range range Copy field f Initializer Range f Type field f Type f Type Range range Copy field f Type Range  DOMNode shareContents DOMNode shareContents DOMNode shareContents DOMField DOMField fInitializer fInitializer fInitializerRange rangeCopy fInitializerRange fType fType fTypeRange rangeCopy fTypeRange
see IDOM Node to String public String to String return FIELD get Name NON NLS 1  IDOMNode toString toString getName

Creates a new empty IMPORT node DOM Import f Name java lang NON NLS 1 set Mask MASK DETAILED SOURCE INDEXES true  DOMImport fName setMask MASK_DETAILED_SOURCE_INDEXES
Creates a new detailed IMPORT document fragment on the given range of the document param document the document containing this node s original contents param source Range a two element array of integers describing the entire inclusive source range of this node within its document Contents start on and include the character at the first position Contents end on and include the character at the last position An array of 1 s indicates this node s contents do not exist in the document param name the identifier portion of the name of this node or code null code if this node does not have a name param name Range a two element array of integers describing the entire inclusive source range of this node s name within its document including any array qualifiers that might immediately follow the name or 1 s if this node does not have a name param on Demand indicates if this import is an on demand style import DOM Import char document int source Range String name int name Range boolean on Demand super document source Range name name Range f On Demand on Demand set Mask MASK DETAILED SOURCE INDEXES true  sourceRange nameRange onDemand DOMImport sourceRange nameRange onDemand sourceRange nameRange fOnDemand onDemand setMask MASK_DETAILED_SOURCE_INDEXES
Creates a new simple IMPORT document fragment on the given range of the document param document the document containing this node s original contents param source Range a two element array of integers describing the entire inclusive source range of this node within its document Contents start on and include the character at the first position Contents end on and include the character at the last position An array of 1 s indicates this node s contents do not exist in the document param name the identifier portion of the name of this node or code null code if this node does not have a name param on Demand indicates if this import is an on demand style import DOM Import char document int source Range String name boolean on Demand this document source Range name new int 1 1 on Demand f On Demand on Demand set Mask MASK DETAILED SOURCE INDEXES false  sourceRange onDemand DOMImport sourceRange onDemand sourceRange onDemand fOnDemand onDemand setMask MASK_DETAILED_SOURCE_INDEXES
see DOM Node append Fragmented Contents Char Array Buffer protected void append Fragmented Contents Char Array Buffer buffer if f Name Range 0 0 buffer append import NON NLS 1 append f Name append append Util LINE SEPARATOR else buffer append f Document f Source Range 0 f Name Range 0 f Source Range 0 buffer append f Document f Name Range 0 f Name Range 1 f Name Range 0 1 buffer append f Name buffer append f Document f Name Range 1 1 f Source Range 1 f Name Range 1  DOMNode appendFragmentedContents CharArrayBuffer appendFragmentedContents CharArrayBuffer fNameRange fName LINE_SEPARATOR fDocument fSourceRange fNameRange fSourceRange fDocument fNameRange fNameRange fNameRange fName fDocument fNameRange fSourceRange fNameRange
see IDOM Node get Contents public String get Contents if f Name null return null else return super get Contents  IDOMNode getContents getContents fName getContents
see DOM Node get Detailed Node protected DOM Node get Detailed Node return DOM Node get Factory create Import get Contents  DOMNode getDetailedNode DOMNode getDetailedNode DOMNode getFactory createImport getContents
see IDOM Node get Java Element public I Java Element get Java Element I Java Element parent throws Illegal Argument Exception if parent get Element Type I Java Element COMPILATION UNIT return I Compilation Unit parent get Import get Name else throw new Illegal Argument Exception Util bind element illegal Parent NON NLS 1  IDOMNode getJavaElement IJavaElement getJavaElement IJavaElement IllegalArgumentException getElementType IJavaElement COMPILATION_UNIT ICompilationUnit getImport getName IllegalArgumentException illegalParent
see IDOM Node get Node Type public int get Node Type return IDOM Node IMPORT  IDOMNode getNodeType getNodeType IDOMNode
see IDOM Import is On Demand public boolean is On Demand return f On Demand  IDOMImport isOnDemand isOnDemand fOnDemand
see DOM Node protected DOM Node newDOM Node return new DOM Import  DOMNode DOMNode newDOMNode DOMImport
see IDOM Node set Name String public void set Name String name if name null throw new Illegal Argument Exception Util bind element null Name NON NLS 1 become Detailed super set Name name f On Demand name ends With NON NLS 1  IDOMNode setName setName IllegalArgumentException nullName becomeDetailed setName fOnDemand endsWith
see IDOM Node to String public String to String return IMPORT get Name NON NLS 1  IDOMNode toString toString getName
see IDOM Import get Flags since 3 0 public int get Flags return this f Flags  IDOMImport getFlags getFlags fFlags
see IDOM Import set Flags int since 3 0 public void set Flags int flags this f Flags flags  IDOMImport setFlags setFlags fFlags

Constructs an empty initializer node DOM Initializer Constructs an empty initializer node  DOMInitializer
Creates a new detailed INITIALIZER document fragment on the given range of the document param document the document containing this node s original contents param source Range a two element array of integers describing the entire inclusive source range of this node within its document Contents start on and include the character at the first position Contents end on and include the character at the last position An array of 1 s indicates this node s contents do not exist in the document param comment Range a two element array describing the comments that precede the member declaration The first matches the start of this node s source Range and the second is the new line or first non whitespace character following the last comment If no comments are present this array contains two 1 s param flags an integer representing the modifiers for this member The integer can be analyzed with org eclipse jdt core Flags param modifier Range a two element array describing the location of modifiers for this member within its source range The first integer is the first character of the first modifier for this member and the second integer is the last whitespace character preceeding the next part of this member declaration If there are no modifiers present in this node s source code that is package default visibility this array contains two 1 s param body Start Position the position of the open brace of the body of this initialzer DOM Initializer char document int source Range int comment Range int flags int modifier Range int body Start Position super document source Range null new int 1 1 comment Range flags modifier Range f Body Range new int 2 f Body Range 0 body Start Position f Body Range 1 source Range 1 set Has Body true set Mask MASK DETAILED SOURCE INDEXES true  sourceRange commentRange sourceRange modifierRange bodyStartPosition DOMInitializer sourceRange commentRange modifierRange bodyStartPosition sourceRange commentRange modifierRange fBodyRange fBodyRange bodyStartPosition fBodyRange sourceRange setHasBody setMask MASK_DETAILED_SOURCE_INDEXES
Creates a new simple INITIALIZER document fragment on the given range of the document param document the document containing this node s original contents param source Range a two element array of integers describing the entire inclusive source range of this node within its document Contents start on and include the character at the first position Contents end on and include the character at the last position An array of 1 s indicates this node s contents do not exist in the document param flags an integer representing the modifiers for this member The integer can be analyzed with org eclipse jdt core Flags DOM Initializer char document int source Range int flags this document source Range new int 1 1 flags new int 1 1 1 set Mask MASK DETAILED SOURCE INDEXES false  sourceRange DOMInitializer sourceRange sourceRange setMask MASK_DETAILED_SOURCE_INDEXES
see DOM Member append Member Body Contents Char Array Buffer protected void append Member Body Contents Char Array Buffer buffer if has Body buffer append get Body append f Document f Body Range 1 1 f Source Range 1 f Body Range 1 else buffer append append Util LINE SEPARATOR NON NLS 1  DOMMember appendMemberBodyContents CharArrayBuffer appendMemberBodyContents CharArrayBuffer hasBody getBody fDocument fBodyRange fSourceRange fBodyRange LINE_SEPARATOR
see DOM Member append Member Declaration Contents Char Array Buffer protected void append Member Declaration Contents Char Array Buffer buffer nothing to do  DOMMember appendMemberDeclarationContents CharArrayBuffer appendMemberDeclarationContents CharArrayBuffer
see DOM Member append Simple Contents Char Array Buffer protected void append Simple Contents Char Array Buffer buffer append eveything before my name buffer append f Document f Source Range 0 f Name Range 0 f Source Range 0 append my name buffer append f Name append everything after my name buffer append f Document f Name Range 1 1 f Source Range 1 f Name Range 1  DOMMember appendSimpleContents CharArrayBuffer appendSimpleContents CharArrayBuffer fDocument fSourceRange fNameRange fSourceRange fName fDocument fNameRange fSourceRange fNameRange
see IDOM Initializer get Body public String get Body become Detailed if has Body if f Body null return f Body else return new String Char Operation subarray f Document f Body Range 0 f Body Range 1 1 else return null  IDOMInitializer getBody getBody becomeDetailed hasBody fBody fBody CharOperation fDocument fBodyRange fBodyRange
see DOM Node get Detailed Node protected DOM Node get Detailed Node return DOM Node get Factory create Initializer get Contents  DOMNode getDetailedNode DOMNode getDetailedNode DOMNode getFactory createInitializer getContents
see IDOM Node get Java Element public I Java Element get Java Element I Java Element parent throws Illegal Argument Exception if parent get Element Type I Java Element TYPE int count 1 IDOM Node previous Node get Previous Node while previous Node null if previous Node instanceof DOM Initializer count previous Node previous Node get Previous Node return I Type parent get Initializer count else throw new Illegal Argument Exception Util bind element illegal Parent NON NLS 1  IDOMNode getJavaElement IJavaElement getJavaElement IJavaElement IllegalArgumentException getElementType IJavaElement IDOMNode previousNode getPreviousNode previousNode previousNode DOMInitializer previousNode previousNode getPreviousNode IType getInitializer IllegalArgumentException illegalParent
see DOM Member get Member Declaration Start Position protected int get Member Declaration Start Position return f Body Range 0  DOMMember getMemberDeclarationStartPosition getMemberDeclarationStartPosition fBodyRange
see IDOM Node get Node Type public int get Node Type return IDOM Node INITIALIZER  IDOMNode getNodeType getNodeType IDOMNode
see IDOM Node is Signature Equal IDOM Node p This method always answers false since an initializer does not have a signature public boolean is Signature Equal IDOM Node node return false  IDOMNode isSignatureEqual IDOMNode isSignatureEqual IDOMNode
see DOM Node protected DOM Node newDOM Node return new DOM Initializer  DOMNode DOMNode newDOMNode DOMInitializer
Offsets all the source indexes in this node by the given amount protected void offset int offset super offset offset offset Range f Body Range offset  offsetRange fBodyRange
see IDOM Initializer set Body String public void set Body String body become Detailed f Body body set Has Body body null fragment  IDOMInitializer setBody setBody becomeDetailed fBody setHasBody
see IDOM Initializer set Name String public void set Name String name initializers have no name  IDOMInitializer setName setName
see DOM Node share Contents DOM Node protected void share Contents DOM Node node super share Contents node DOM Initializer init DOM Initializer node f Body init f Body f Body Range range Copy init f Body Range  DOMNode shareContents DOMNode shareContents DOMNode shareContents DOMInitializer DOMInitializer fBody fBody fBodyRange rangeCopy fBodyRange
see IDOM Node to String public String to String return INITIALIZER NON NLS 1  IDOMNode toString toString

Constructs an empty member node DOM Member Constructs an empty member node  DOMMember
Creates a new member document fragment on the given range of the document param document the document containing this node s original contents param source Range a two element array of integers describing the entire inclusive source range of this node within its document Contents start on and include the character at the first position Contents end on and include the character at the last position An array of 1 s indicates this node s contents do not exist in the document param name the identifier portion of the name of this node or code null code if this node does not have a name param name Range a two element array of integers describing the entire inclusive source range of this node s name within its document including any array qualifiers that might immediately follow the name param comment Range a two element array describing the comments that precede the member declaration The first matches the start of this node s source Range and the second is the new line or first non whitespace character following the last comment If no comments are present this array contains two 1 s param flags an integer representing the modifiers for this member The integer can be analyzed with org eclipse jdt core Flags param modifier Range a two element array describing the location of modifiers for this member within its source range The first integer is the first character of the first modifier for this member and the second integer is the last whitespace character preceeding the next part of this member declaration If there are no modifiers present in this node s source code that is package default visibility this array contains two 1 s DOM Member char document int source Range String name int name Range int comment Range int flags int modifier Range super document source Range name name Range f Flags flags f Comment null f Comment Range comment Range f Modifier Range modifier Range set Has Comment comment Range 0 0  sourceRange nameRange commentRange sourceRange modifierRange DOMMember sourceRange nameRange commentRange modifierRange sourceRange nameRange fFlags fComment fCommentRange commentRange fModifierRange modifierRange setHasComment commentRange
Appends the contents of this node to the given Char Array Buffer using the original document and indicies as a form for the current attribute values of this node p To facilitate the implementation of generating contents for members the content of members is split into three sections the header declaration and body sections The header section includes any preceding comments and modifiers The declaration section includes the portion of the member declaration that follows any modifiers and precedes the member body The body section includes the member body and any trailing whitespace see DOM Node append Fragmented Contents Char Array Buffer protected void append Fragmented Contents Char Array Buffer buffer if is Detailed append Member Header Fragment buffer append Member Declaration Contents buffer append Member Body Contents buffer else append Simple Contents buffer  CharArrayBuffer DOMNode appendFragmentedContents CharArrayBuffer appendFragmentedContents CharArrayBuffer isDetailed appendMemberHeaderFragment appendMemberDeclarationContents appendMemberBodyContents appendSimpleContents
Appends this member s body contents to the given Char Array Buffer Body contents include the member body and any trailing whitespace  CharArrayBuffer
protected abstract void append Member Body Contents Char Array Buffer buffer Appends this member s declaration contents to the given Char Array Buffer The declaration contents includes the portion of this member that appears after any modifiers and precedes the body  appendMemberBodyContents CharArrayBuffer CharArrayBuffer
protected abstract void append Member Declaration Contents Char Array Buffer buffer Appends this member s header contents to the given Char Array Buffer Header contents include any preceding comments and modifiers protected void append Member Header Fragment Char Array Buffer buffer int space Start space End space before comment if has Comment space Start f Source Range 0 space End f Comment Range 0 if space End 0 buffer append f Document space Start space End space Start String fragment get Comment if fragment null buffer append fragment if f Comment Range 1 0 space Start f Comment Range 1 1 else space Start f Source Range 0 if f Modifier Range 0 0 space End f Modifier Range 0 1 else space End get Member Declaration Start Position 1 if space End space Start buffer append f Document space Start space End 1 space Start buffer append get Modifiers Text  appendMemberDeclarationContents CharArrayBuffer CharArrayBuffer appendMemberHeaderFragment CharArrayBuffer spaceStart spaceEnd hasComment spaceStart fSourceRange spaceEnd fCommentRange spaceEnd fDocument spaceStart spaceEnd spaceStart getComment fCommentRange spaceStart fCommentRange spaceStart fSourceRange fModifierRange spaceEnd fModifierRange spaceEnd getMemberDeclarationStartPosition spaceEnd spaceStart fDocument spaceStart spaceEnd spaceStart getModifiersText
Appends the contents of this node to the given Char Array Buffer using the original document and indicies as a form for the current attribute values of this node This method is called when this node is know not to have detailed source indexes  CharArrayBuffer
protected abstract void append Simple Contents Char Array Buffer buffer Returns a copy of the given array with the new element appended to the end of the array protected String append String String list String element String copy new String list length 1 System arraycopy list 0 copy 0 list length copy list length element return copy  appendSimpleContents CharArrayBuffer appendString
Returns a code String code describing the modifiers for this member ending with whitespace if not empty This value serves as a replacement value for the member s modifier range when the modifiers have been altered from their original contents protected char generate Flags char flags Flags to String get Flags to Char Array if flags length 0 return flags else return Char Operation concat flags new char  generateFlags toString getFlags toCharArray CharOperation
see IDOM Member get Comment public String get Comment become Detailed if has Comment if f Comment null return f Comment else return new String Char Operation subarray f Document f Comment Range 0 f Comment Range 1 1 else return null  IDOMMember getComment getComment becomeDetailed hasComment fComment fComment CharOperation fDocument fCommentRange fCommentRange
see IDOM Member get Flags public int get Flags return f Flags  IDOMMember getFlags getFlags fFlags
Returns the location of the first character in the member s declaration section 
protected abstract int get Member Declaration Start Position Returns the String to be used for this member s flags when generating contents either the original contents in the document or the replacement value protected char get Modifiers Text if f Modifiers null if f Modifier Range 0 0 return null else return Char Operation subarray f Document f Modifier Range 0 f Modifier Range 1 1 else return f Modifiers  getMemberDeclarationStartPosition getModifiersText fModifiers fModifierRange CharOperation fDocument fModifierRange fModifierRange fModifiers
Returns true if this member currently has a body protected boolean has Body return get Mask MASK HAS BODY  hasBody getMask MASK_HAS_BODY
Returns true if this member currently has a comment protected boolean has Comment return get Mask MASK HAS COMMENT  hasComment getMask MASK_HAS_COMMENT
Offsets all the source indexes in this node by the given amount protected void offset int offset super offset offset offset Range f Comment Range offset offset Range f Modifier Range offset  offsetRange fCommentRange offsetRange fModifierRange
see IDOM Member set Comment String public void set Comment String comment become Detailed f Comment comment fragment set Has Comment comment null see 1FVIJAH if comment null comment index Of deprecated 0 NON NLS 1 f Flags f Flags I Constants Acc Deprecated return f Flags f Flags I Constants Acc Deprecated  IDOMMember setComment setComment becomeDetailed fComment setHasComment indexOf fFlags fFlags IConstants AccDeprecated fFlags fFlags IConstants AccDeprecated
see IDOM Member set Flags int public void set Flags int flags become Detailed if Flags is Deprecated f Flags f Flags flags I Constants Acc Deprecated else f Flags flags I Constants Acc Deprecated fragment f Modifiers generate Flags  IDOMMember setFlags setFlags becomeDetailed isDeprecated fFlags fFlags IConstants AccDeprecated fFlags IConstants AccDeprecated fModifiers generateFlags
Sets the state of this member declaration as having a body protected void set Has Body boolean has Body set Mask MASK HAS BODY has Body  setHasBody hasBody setMask MASK_HAS_BODY hasBody
Sets the state of this member declaration as having a preceding comment protected void set Has Comment boolean has Comment set Mask MASK HAS COMMENT has Comment  setHasComment hasComment setMask MASK_HAS_COMMENT hasComment
Sets the original position of the first character of this node s contents in its document This method is only used during DOM creation while normalizing the source range of each node Synchronize the start of the comment position with the start of the node protected void set Start Position int start if f Comment Range 0 0 f Comment Range 0 start super set Start Position start  setStartPosition fCommentRange fCommentRange setStartPosition
see DOM Node share Contents DOM Node protected void share Contents DOM Node node super share Contents node DOM Member member DOM Member node f Comment member f Comment f Comment Range range Copy member f Comment Range f Flags member f Flags f Modifiers member f Modifiers f Modifier Range range Copy member f Modifier Range  DOMNode shareContents DOMNode shareContents DOMNode shareContents DOMMember DOMMember fComment fComment fCommentRange rangeCopy fCommentRange fFlags fFlags fModifiers fModifiers fModifierRange rangeCopy fModifierRange

Constructs an empty method node DOM Method Constructs an empty method node  DOMMethod
Creates a new detailed METHOD document fragment on the given range of the document param document the document containing this node s original contents param source Range a two element array of integers describing the entire inclusive source range of this node within its document Contents start on and include the character at the first position Contents end on and include the character at the last position An array of 1 s indicates this node s contents do not exist in the document param name the identifier portion of the name of this node or code null code if this node does not have a name param name Range a two element array of integers describing the entire inclusive source range of this node s name within its document including any array qualifiers that might immediately follow the name or 1 s if this node does not have a name param comment Range a two element array describing the comments that precede the member declaration The first matches the start of this node s source Range and the second is the new line or first non whitespace character following the last comment If no comments are present this array contains two 1 s param flags an integer representing the modifiers for this member The integer can be analyzed with org eclipse jdt core Flags param modifier Range a two element array describing the location of modifiers for this member within its source range The first integer is the first character of the first modifier for this member and the second integer is the last whitespace character preceeding the next part of this member declaration If there are no modifiers present in this node s source code that is package default visibility this array contains two 1 s param is Constructor true if the method is a contructor otherwise false param return Type the normalized return type of this method param return Type Range a two element array describing the location of the return type within the method s source range The first integer is is the position of the first character in the return type and the second integer is the position of the last character in the return type For constructors the contents of this array are 1 s If the return type of this method is qualified with following the parameter list this array has four entries In this case the last two entries of the array are the inclusive source range of the array qualifiers param parameter Types an array of parameter types in the method declaration or code null code if the method has no parameters param parameter Names an array of parameter names in the method declaration or code null code if the method has no parameters param parameter Range a two element array describing the location of the parameter list in the method The first integer is the location of the open parenthesis and the second integer is the location of the closing parenthesis param exceptions an array of the names of exceptions thrown by this method or code null code if the method throws no exceptions param exception Range a two element array describing the location of the exception list in the method declaration The first integer is the position of the first character in the first exception the method throws and the second integer is the position of the last character of the last exception this method throws param body Range a two element array describing the location of the method s body The first integer is the first character following the method s parameter list or exception list if present The second integer is the location of the last character in the method s source range DOM Method char document int source Range String name int name Range int comment Range int flags int modifier Range boolean is Constructor String return Type int return Type Range String parameter Types String parameter Names int parameter Range String exceptions int exception Range int body Range super document source Range name name Range comment Range flags modifier Range set Mask MASK IS CONSTRUCTOR is Constructor f Return Type return Type f Return Type Range return Type Range f Parameter Types parameter Types f Parameter Names parameter Names f Parameter Range parameter Range f Exception Range exception Range f Exceptions exceptions set Has Body true f Body Range body Range set Mask MASK DETAILED SOURCE INDEXES true  sourceRange nameRange commentRange sourceRange modifierRange isConstructor returnType returnTypeRange parameterTypes parameterNames parameterRange exceptionRange bodyRange DOMMethod sourceRange nameRange commentRange modifierRange isConstructor returnType returnTypeRange parameterTypes parameterNames parameterRange exceptionRange bodyRange sourceRange nameRange commentRange modifierRange setMask MASK_IS_CONSTRUCTOR isConstructor fReturnType returnType fReturnTypeRange returnTypeRange fParameterTypes parameterTypes fParameterNames parameterNames fParameterRange parameterRange fExceptionRange exceptionRange fExceptions setHasBody fBodyRange bodyRange setMask MASK_DETAILED_SOURCE_INDEXES
Creates a new simple METHOD document fragment on the given range of the document param document the document containing this node s original contents param source Range a two element array of integers describing the entire inclusive source range of this node within its document Contents start on and include the character at the first position Contents end on and include the character at the last position An array of 1 s indicates this node s contents do not exist in the document param name the identifier portion of the name of this node or code null code if this node does not have a name param name Range a two element array of integers describing the entire inclusive source range of this node s name within its document including any array qualifiers that might immediately follow the name or 1 s if this node does not have a name param flags an integer representing the modifiers for this member The integer can be analyzed with org eclipse jdt core Flags param is Constructor true if the method is a contructor otherwise false param return Type the normalized return type of this method param parameter Types an array of parameter types in the method declaration or code null code if the method has no parameters param parameter Names an array of parameter names in the method declaration or code null code if the method has no parameters param exceptions an array of the names of exceptions thrown by this method or code null code if the method throws no exceptions DOM Method char document int source Range String name int name Range int flags boolean is Constructor String return Type String parameter Types String parameter Names String exceptions this document source Range name name Range new int 1 1 flags new int 1 1 is Constructor return Type new int 1 1 parameter Types parameter Names new int 1 1 exceptions new int 1 1 new int 1 1 set Mask MASK DETAILED SOURCE INDEXES false  sourceRange nameRange isConstructor returnType parameterTypes parameterNames DOMMethod sourceRange nameRange isConstructor returnType parameterTypes parameterNames sourceRange nameRange isConstructor returnType parameterTypes parameterNames setMask MASK_DETAILED_SOURCE_INDEXES
see IDOM Method add Exception String public void add Exception String name throws Illegal Argument Exception if name null throw new Illegal Argument Exception Util bind dom null Exception Type NON NLS 1 if f Exceptions null f Exceptions new String 1 f Exceptions 0 name else f Exceptions append String f Exceptions name set Exceptions f Exceptions  IDOMMethod addException addException IllegalArgumentException IllegalArgumentException nullExceptionType fExceptions fExceptions fExceptions fExceptions appendString fExceptions setExceptions fExceptions
see IDOM Method add Parameter String String public void add Parameter String type String name throws Illegal Argument Exception if type null throw new Illegal Argument Exception Util bind dom null Type Parameter NON NLS 1 if name null throw new Illegal Argument Exception Util bind dom null Name Parameter NON NLS 1 if f Parameter Names null f Parameter Names new String 1 f Parameter Names 0 name else f Parameter Names append String f Parameter Names name if f Parameter Types null f Parameter Types new String 1 f Parameter Types 0 type else f Parameter Types append String f Parameter Types type set Parameters f Parameter Types f Parameter Names  IDOMMethod addParameter addParameter IllegalArgumentException IllegalArgumentException nullTypeParameter IllegalArgumentException nullNameParameter fParameterNames fParameterNames fParameterNames fParameterNames appendString fParameterNames fParameterTypes fParameterTypes fParameterTypes fParameterTypes appendString fParameterTypes setParameters fParameterTypes fParameterNames
see DOM Member append Member Body Contents Char Array Buffer protected void append Member Body Contents Char Array Buffer buffer if f Body null buffer append f Body else buffer append f Document f Body Range 0 f Body Range 1 1 f Body Range 0  DOMMember appendMemberBodyContents CharArrayBuffer appendMemberBodyContents CharArrayBuffer fBody fBody fDocument fBodyRange fBodyRange fBodyRange
see DOM Member append Member Declaration Contents Char Array Buffer protected void append Member Declaration Contents Char Array Buffer buffer if is Constructor buffer append get Constructor Name append f Document f Name Range 1 1 f Parameter Range 0 f Name Range 1 1 else buffer append get Return Type Contents if f Return Type Range 0 0 buffer append f Document f Return Type Range 1 1 f Name Range 0 f Return Type Range 1 1 else buffer append buffer append get Name Contents append f Document f Name Range 1 1 f Parameter Range 0 f Name Range 1 1 if f Parameter List null buffer append f Parameter List else buffer append f Document f Parameter Range 0 f Parameter Range 1 1 f Parameter Range 0 int start if has Trailing Array Qualifier is Return Type Altered start f Return Type Range 3 1 else start f Parameter Range 1 1 if f Exceptions null add throws keyword if f Exception Range 0 0 buffer append f Document start f Exception Range 0 start else buffer append throws NON NLS 1 add exception list if f Exception List null buffer append f Exception List add space before body if f Exception Range 0 0 buffer append f Document f Exception Range 1 1 f Body Range 0 f Exception Range 1 1 else buffer append f Document f Parameter Range 1 1 f Body Range 0 f Parameter Range 1 1 else add list and space before body buffer append f Document f Exception Range 0 f Body Range 0 f Exception Range 0 else add space before body if f Exception Range 0 0 buffer append f Document f Exception Range 1 1 f Body Range 0 f Exception Range 1 1 else buffer append f Document start f Body Range 0 start  DOMMember appendMemberDeclarationContents CharArrayBuffer appendMemberDeclarationContents CharArrayBuffer isConstructor getConstructorName fDocument fNameRange fParameterRange fNameRange getReturnTypeContents fReturnTypeRange fDocument fReturnTypeRange fNameRange fReturnTypeRange getNameContents fDocument fNameRange fParameterRange fNameRange fParameterList fParameterList fDocument fParameterRange fParameterRange fParameterRange hasTrailingArrayQualifier isReturnTypeAltered fReturnTypeRange fParameterRange fExceptions fExceptionRange fDocument fExceptionRange fExceptionList fExceptionList fExceptionRange fDocument fExceptionRange fBodyRange fExceptionRange fDocument fParameterRange fBodyRange fParameterRange fDocument fExceptionRange fBodyRange fExceptionRange fExceptionRange fDocument fExceptionRange fBodyRange fExceptionRange fDocument fBodyRange
see DOM Member append Simple Contents Char Array Buffer protected void append Simple Contents Char Array Buffer buffer append eveything before my name buffer append f Document f Source Range 0 f Name Range 0 f Source Range 0 append my name if is Constructor buffer append get Constructor Name else buffer append f Name append everything after my name buffer append f Document f Name Range 1 1 f Source Range 1 f Name Range 1  DOMMember appendSimpleContents CharArrayBuffer appendSimpleContents CharArrayBuffer fDocument fSourceRange fNameRange fSourceRange isConstructor getConstructorName fName fDocument fNameRange fSourceRange fNameRange
see IDOM Method get Body public String get Body become Detailed if has Body if f Body null return f Body else return new String Char Operation subarray f Document f Body Range 0 f Body Range 1 1 else return null  IDOMMethod getBody getBody becomeDetailed hasBody fBody fBody CharOperation fDocument fBodyRange fBodyRange
Returns the simple name of the enclsoing type for this constructor If the constuctor is not currently enclosed in a type the original name of the constructor as found in the documnent is returned protected String get Constructor Name if is Constructor if get Parent null return get Parent get Name else If there is no parent use the original name return new String get Name Contents else return null  getConstructorName isConstructor getParent getParent getName getNameContents
see DOM Node get Detailed Node protected DOM Node get Detailed Node return DOM Node get Factory create Method get Contents  DOMNode getDetailedNode DOMNode getDetailedNode DOMNode getFactory createMethod getContents
see IDOM Method get Exceptions public String get Exceptions return f Exceptions  IDOMMethod getExceptions getExceptions fExceptions
see IDOM Node get Java Element public I Java Element get Java Element I Java Element parent throws Illegal Argument Exception if parent get Element Type I Java Element TYPE translate parameter types to signatures String sigs null if f Parameter Types null sigs new String f Parameter Types length int i for i 0 i f Parameter Types length i sigs i Signature create Type Signature f Parameter Types i to Char Array false String name null if is Constructor name get Constructor Name else name get Name return I Type parent get Method name sigs else throw new Illegal Argument Exception Util bind element illegal Parent NON NLS 1  IDOMNode getJavaElement IJavaElement getJavaElement IJavaElement IllegalArgumentException getElementType IJavaElement fParameterTypes fParameterTypes fParameterTypes createTypeSignature fParameterTypes toCharArray isConstructor getConstructorName getName IType getMethod IllegalArgumentException illegalParent
see DOM Member get Member Declaration Start Position protected int get Member Declaration Start Position if f Return Type Range 0 0 return f Return Type Range 0 else return f Name Range 0  DOMMember getMemberDeclarationStartPosition getMemberDeclarationStartPosition fReturnTypeRange fReturnTypeRange fNameRange
see IDOM Node get Name public String get Name if is Constructor return null else return super get Name  IDOMNode getName getName isConstructor getName
see IDOM Node get Node Type public int get Node Type return IDOM Node METHOD  IDOMNode getNodeType getNodeType IDOMNode
see IDOM Method get Parameter Names public String get Parameter Names return f Parameter Names  IDOMMethod getParameterNames getParameterNames fParameterNames
see IDOM Method get Parameter Types public String get Parameter Types return f Parameter Types  IDOMMethod getParameterTypes getParameterTypes fParameterTypes
see IDOM Method get Return Type public String get Return Type if is Constructor return null else return f Return Type  IDOMMethod getReturnType getReturnType isConstructor fReturnType
Returns the source code to be used for this method s return type protected char get Return Type Contents if is Constructor return null else if is Return Type Altered return f Return Type to Char Array else return Char Operation subarray f Document f Return Type Range 0 f Return Type Range 1 1  getReturnTypeContents isConstructor isReturnTypeAltered fReturnType toCharArray CharOperation fDocument fReturnTypeRange fReturnTypeRange
Returns true if this method s return type has array qualifiers following the parameter list protected boolean has Trailing Array Qualifier return f Return Type Range length 2  hasTrailingArrayQualifier fReturnTypeRange
see IDOM Method is Constructor public boolean is Constructor return get Mask MASK IS CONSTRUCTOR  IDOMMethod isConstructor isConstructor getMask MASK_IS_CONSTRUCTOR
Returns true if this method s return type has been altered from the original document contents protected boolean is Return Type Altered return get Mask MASK RETURN TYPE ALTERED  isReturnTypeAltered getMask MASK_RETURN_TYPE_ALTERED
see IDOM Node is Signature Equal IDOM Node p Two methods have equal signatures if there names are the same and their parameter types are the same public boolean is Signature Equal IDOM Node node boolean ok node get Node Type get Node Type if ok IDOM Method method IDOM Method node ok is Constructor method is Constructor is Constructor method is Constructor if ok is Constructor ok get Name equals method get Name if ok return false String types method get Parameter Types if f Parameter Types null f Parameter Types length 0 this method has no parameters if types null types length 0 the other method has no parameters either return true else this method has parameters if types null types length 0 the other method has no parameters return false if f Parameter Types length types length the methods have a different number of parameters return false int i for i 0 i types length i if f Parameter Types i equals types i return false return true return false  IDOMNode isSignatureEqual IDOMNode isSignatureEqual IDOMNode getNodeType getNodeType IDOMMethod IDOMMethod isConstructor isConstructor isConstructor isConstructor isConstructor getName getName getParameterTypes fParameterTypes fParameterTypes fParameterTypes fParameterTypes
see DOM Node protected DOM Node newDOM Node return new DOM Method  DOMNode DOMNode newDOMNode DOMMethod
Offsets all the source indexes in this node by the given amount protected void offset int offset super offset offset offset Range f Body Range offset offset Range f Exception Range offset offset Range f Parameter Range offset offset Range f Return Type Range offset  offsetRange fBodyRange offsetRange fExceptionRange offsetRange fParameterRange offsetRange fReturnTypeRange
see IDOM Method set Body public void set Body String body become Detailed fragment f Body body set Has Body body null if has Body f Body Util LINE SEPARATOR NON NLS 1  IDOMMethod setBody setBody becomeDetailed fBody setHasBody hasBody fBody LINE_SEPARATOR
Sets the end of the body range void set Body Range End int end f Body Range 1 end  setBodyRangeEnd fBodyRange
see IDOM Method set Constructor boolean public void set Constructor boolean b become Detailed set Mask MASK IS CONSTRUCTOR b fragment  IDOMMethod setConstructor setConstructor becomeDetailed setMask MASK_IS_CONSTRUCTOR
see IDOM Method set Exceptions String public void set Exceptions String names become Detailed if names null names length 0 f Exceptions null else f Exceptions names Char Array Buffer buffer new Char Array Buffer char comma new char for int i 0 length names length i length i if i 0 buffer append comma buffer append names i f Exception List buffer get Contents fragment  IDOMMethod setExceptions setExceptions becomeDetailed fExceptions fExceptions CharArrayBuffer CharArrayBuffer fExceptionList getContents
see IDOM Method set Name public void set Name String name if name null throw new Illegal Argument Exception Util bind element null Name NON NLS 1 else super set Name name  IDOMMethod setName setName IllegalArgumentException nullName setName
see IDOM Method set Parameters String String public void set Parameters String types String names throws Illegal Argument Exception become Detailed if types null names null if types null names null f Parameter Types null f Parameter Names null f Parameter List new char else throw new Illegal Argument Exception Util bind dom mismatch Arg Names And Types NON NLS 1 else if names length types length throw new Illegal Argument Exception Util bind dom mismatch Arg Names And Types NON NLS 1 else if names length 0 set Parameters null null else f Parameter Names names f Parameter Types types Char Array Buffer parameters Buffer new Char Array Buffer parameters Buffer append NON NLS 1 char comma new char for int i 0 i names length i if i 0 parameters Buffer append comma parameters Buffer append types i append append names i parameters Buffer append f Parameter List parameters Buffer get Contents fragment  IDOMMethod setParameters setParameters IllegalArgumentException becomeDetailed fParameterTypes fParameterNames fParameterList IllegalArgumentException mismatchArgNamesAndTypes IllegalArgumentException mismatchArgNamesAndTypes setParameters fParameterNames fParameterTypes CharArrayBuffer parametersBuffer CharArrayBuffer parametersBuffer parametersBuffer parametersBuffer parametersBuffer fParameterList parametersBuffer getContents
see IDOM Method set Return Type String public void set Return Type String name throws Illegal Argument Exception if name null throw new Illegal Argument Exception Util bind dom null Return Type NON NLS 1 become Detailed fragment set Return Type Altered true f Return Type name  IDOMMethod setReturnType setReturnType IllegalArgumentException IllegalArgumentException nullReturnType becomeDetailed setReturnTypeAltered fReturnType
Sets the state of this method declaration as having the return type altered from the original document protected void set Return Type Altered boolean type Altered set Mask MASK RETURN TYPE ALTERED type Altered  setReturnTypeAltered typeAltered setMask MASK_RETURN_TYPE_ALTERED typeAltered
protected void set Source Range End int end super set Source Range End end f Body Range 1 end  setSourceRangeEnd setSourceRangeEnd fBodyRange
see DOM Node share Contents DOM Node protected void share Contents DOM Node node super share Contents node DOM Method method DOM Method node f Body method f Body f Body Range range Copy method f Body Range f Exception List method f Exception List f Exception Range range Copy method f Exception Range f Exceptions method f Exceptions f Parameter List method f Parameter List f Parameter Names method f Parameter Names f Parameter Range range Copy method f Parameter Range f Parameter Types method f Parameter Types f Return Type method f Return Type f Return Type Range range Copy method f Return Type Range  DOMNode shareContents DOMNode shareContents DOMNode shareContents DOMMethod DOMMethod fBody fBody fBodyRange rangeCopy fBodyRange fExceptionList fExceptionList fExceptionRange rangeCopy fExceptionRange fExceptions fExceptions fParameterList fParameterList fParameterNames fParameterNames fParameterRange rangeCopy fParameterRange fParameterTypes fParameterTypes fReturnType fReturnType fReturnTypeRange rangeCopy fReturnTypeRange
see IDOM Node to String public String to String if is Constructor return CONSTRUCTOR NON NLS 1 else return METHOD get Name NON NLS 1  IDOMNode toString toString isConstructor getName
see IDOM Method set Default java lang String since 3 0 public void set Default String default Value this f Default Value default Value  IDOMMethod setDefault setDefault defaultValue fDefaultValue defaultValue
see IDOM Method get Default since 3 0 public String get Default return this f Default Value  IDOMMethod getDefault getDefault fDefaultValue
see IDOM Method get Type Parameters since 3 0 public String get Type Parameters return this f Type Parameters  IDOMMethod getTypeParameters getTypeParameters fTypeParameters
see IDOM Method set Type Parameters java lang String since 3 0 public void set Type Parameters String type Parameters this f Type Parameters type Parameters  IDOMMethod setTypeParameters setTypeParameters typeParameters fTypeParameters typeParameters

Creates a new empty document fragment DOM Node f Name null f Document null f Source Range new int 1 1 f Name Range new int 1 1 fragment  DOMNode fName fDocument fSourceRange fNameRange
Creates a new document fragment on the given range of the document param document the document containing this node s original contents param source Range a two element array of integers describing the entire inclusive source range of this node within its document Contents start on and include the character at the first position Contents end on and include the character at the last position An array of 1 s indicates this node s contents do not exist in the document param name the identifier portion of the name of this node or code null code if this node does not have a name param name Range a two element array of integers describing the entire inclusive source range of this node s name within its document including any array qualifiers that might immediately follow the name or 1 s if this node does not have a name DOM Node char document int source Range String name int name Range super f Document document f Source Range source Range f Name name f Name Range name Range  sourceRange nameRange DOMNode sourceRange nameRange fDocument fSourceRange sourceRange fName fNameRange nameRange
Adds the given un parented node document fragment as the last child of this node p When a child is added this node must be considered fragmented such that the contents of this node are properly generated see IDOM Node add Child IDOM Node public void add Child IDOM Node child throws Illegal Argument Exception DOM Exception basic Add Child child if the node is a constructor it must also be fragmented to update the constructor s name if child get Node Type IDOM Node METHOD IDOM Method child is Constructor DOM Node child fragment else fragment  IDOMNode addChild IDOMNode addChild IDOMNode IllegalArgumentException DOMException basicAddChild getNodeType IDOMNode IDOMMethod isConstructor DOMNode
Appends the current contents of this document fragment to the given code Char Array Buffer code p If this node is fragmented contents must be generated by using the original document and indicies as a form for the current attribute values of this node If this node not fragmented the contents can be obtained from the document protected void append Contents Char Array Buffer buffer if is Fragmented append Fragmented Contents buffer else buffer append f Document f Source Range 0 f Source Range 1 1 f Source Range 0  CharArrayBuffer appendContents CharArrayBuffer isFragmented appendFragmentedContents fDocument fSourceRange fSourceRange fSourceRange
Appends the contents of all children of this node to the given code Char Array Buffer code p This algorithm used minimizes String generation by merging adjacent unfragmented children into one substring operation protected void append Contents Of Children Char Array Buffer buffer DOM Node child f First Child DOM Node sibling int start 0 end 0 if child null start child get Start Position end child get End Position while child null sibling child f Next Node if sibling null if sibling is Content Mergable With child end sibling get End Position else if child is Fragmented child append Contents buffer else buffer append child get Document start end 1 start start sibling get Start Position end sibling get End Position else if child is Fragmented child append Contents buffer else buffer append child get Document start end 1 start child sibling  CharArrayBuffer appendContentsOfChildren CharArrayBuffer DOMNode fFirstChild DOMNode getStartPosition getEndPosition fNextNode isContentMergableWith getEndPosition isFragmented appendContents getDocument getStartPosition getEndPosition isFragmented appendContents getDocument
Appends the contents of this node to the given code Char Array Bufer code using the original document and indicies as a form for the current attribute values of this node  CharArrayBufer
protected abstract void append Fragmented Contents Char Array Buffer buffer Adds the given un parented node document fragment as the last child of this node without setting this node s fragmented flag This method is only used by the code DOM Builder code when creating a new DOM such that a new DOM is unfragmented void basic Add Child IDOM Node child throws Illegal Argument Exception DOM Exception verify child may be added if can Have Children throw new DOM Exception Util bind dom unable Add Child NON NLS 1 if child null throw new Illegal Argument Exception Util bind dom add Null Child NON NLS 1 if is Allowable Child child throw new DOM Exception Util bind dom add Incompatible Child NON NLS 1 if child get Parent null throw new DOM Exception Util bind dom add Child With Parent NON NLS 1 NOTE To test if the child is an ancestor of this node we need only test if the root of this node is the child the child is already a root since we have just guarenteed it has no parent if child get Root throw new DOM Exception Util bind dom add Ancestor As Child NON NLS 1 DOM Node node DOM Node child if the child is not already part of this document localize its contents before adding it to the tree if node get Document get Document node localize Contents add the child last if f First Child null this is the first and only child f First Child node else f Last Child f Next Node node node f Previous Node f Last Child f Last Child node node f Parent this  appendFragmentedContents CharArrayBuffer DOMBuilder basicAddChild IDOMNode IllegalArgumentException DOMException canHaveChildren DOMException unableAddChild IllegalArgumentException addNullChild isAllowableChild DOMException addIncompatibleChild getParent DOMException addChildWithParent getRoot DOMException addAncestorAsChild DOMNode DOMNode getDocument getDocument localizeContents fFirstChild fFirstChild fLastChild fNextNode fPreviousNode fLastChild fLastChild fParent
Generates detailed source indexes for this node if possible exception DOM Exception if unable to generate detailed source indexes for this node protected void become Detailed throws DOM Exception if is Detailed DOM Node detailed get Detailed Node if detailed null throw new DOM Exception Util bind dom cannot Detail NON NLS 1 if detailed this share Contents detailed  DOMException becomeDetailed DOMException isDetailed DOMNode getDetailedNode DOMException cannotDetail shareContents
Returns true if this node is allowed to have children otherwise false p Default implementation of code IDOM Node code interface method returns false this method must be overridden by subclasses that implement nodes that allow children see IDOM Node can Have Children public boolean can Have Children return false  IDOMNode IDOMNode canHaveChildren canHaveChildren
see IDOM Node clone public Object clone create a new buffer with all my contents and children contents int length 0 char buffer null int offset f Source Range 0 if offset 0 length f Source Range 1 offset 1 buffer new char length System arraycopy f Document offset buffer 0 length DOM Node clone newDOM Node clone share Contents this clone f Document buffer if offset 0 clone offset 0 offset clone my children if can Have Children Enumeration children get Children while children has More Elements DOM Node child DOM Node children next Element if child f Document f Document DOM Node child Clone child clone Sharing Document buffer offset clone basic Add Child child Clone else DOM Node child Clone DOM Node child clone clone add Child child Clone return clone  IDOMNode fSourceRange fSourceRange fDocument DOMNode newDOMNode shareContents fDocument canHaveChildren getChildren hasMoreElements DOMNode DOMNode nextElement fDocument fDocument DOMNode childClone cloneSharingDocument basicAddChild childClone DOMNode childClone DOMNode addChild childClone
private DOM Node clone Sharing Document char document int root Offset DOM Node clone newDOM Node clone share Contents this clone f Document document if root Offset 0 clone offset 0 root Offset if can Have Children Enumeration children get Children while children has More Elements DOM Node child DOM Node children next Element if child f Document f Document DOM Node child Clone child clone Sharing Document document root Offset clone basic Add Child child Clone else DOM Node child Clone DOM Node child clone clone add Child child Clone return clone  DOMNode cloneSharingDocument rootOffset DOMNode newDOMNode shareContents fDocument rootOffset rootOffset canHaveChildren getChildren hasMoreElements DOMNode DOMNode nextElement fDocument fDocument DOMNode childClone cloneSharingDocument rootOffset basicAddChild childClone DOMNode childClone DOMNode addChild childClone
Sets this node s fragmented flag and all ancestor fragmented flags to code true code This happens when an attribute of this node or a descendant node has been altered When a node is fragmented its contents must be generated from its attributes and original form rather than from the original contents in the document protected void fragment if is Fragmented f Is Fragmented true if f Parent null f Parent fragment  isFragmented fIsFragmented fParent fParent
see IDOM Node get Characters public char get Characters Char Array Buffer buffer new Char Array Buffer append Contents buffer return buffer get Contents  IDOMNode getCharacters getCharacters CharArrayBuffer CharArrayBuffer appendContents getContents
see IDOM Node get Child String public IDOM Node get Child String name DOM Node child f First Child while child null String n child get Name if name null if n null return child else if name equals n return child child child f Next Node return null  IDOMNode getChild IDOMNode getChild DOMNode fFirstChild getName fNextNode
see IDOM Node get Children public Enumeration get Children return new Sibling Enumeration f First Child  IDOMNode getChildren getChildren SiblingEnumeration fFirstChild
Returns the current contents of this document fragment or code null code if this node has no contents p If this node is fragmented contents must be generated by using the original document and indicies as a form for the current attribute values of this node If this node not fragmented the contents can be obtained from the document see IDOM Node get Contents public String get Contents Char Array Buffer buffer new Char Array Buffer append Contents buffer return buffer to String  IDOMNode getContents getContents CharArrayBuffer CharArrayBuffer appendContents toString
Returns a new document fragment representing this node with detailed source indexes Subclasses that provide a detailed implementation must override this method protected DOM Node get Detailed Node return this  DOMNode getDetailedNode
Returns the document containing this node s original contents The document may be shared by other nodes protected char get Document return f Document  getDocument fDocument
Returns the original position of the last character of this node s contents in its document public int get End Position return f Source Range 1  getEndPosition fSourceRange
Returns a factory with which to create new document fragments protected IDOM Factory get Factory return new DOM Factory  IDOMFactory getFactory DOMFactory
see IDOM Node get First Child public IDOM Node get First Child return f First Child  IDOMNode getFirstChild IDOMNode getFirstChild fFirstChild
Returns the position at which the first child of this node should be inserted public int get Insertion Position return f Insertion Position  getInsertionPosition fInsertionPosition
Returns code true code if the given mask of this node s state flag is turned on otherwise code false code protected boolean get Mask int mask return f State Mask mask 0  getMask fStateMask
see IDOM Node get Name public String get Name return f Name  IDOMNode getName getName fName
Returns the source code to be used for this node s name protected char get Name Contents if is Name Altered return f Name to Char Array else if f Name null f Name Range 0 0 return null else int length f Name Range 1 1 f Name Range 0 char result new char length System arraycopy f Document f Name Range 0 result 0 length return result  getNameContents isNameAltered fName toCharArray fName fNameRange fNameRange fNameRange fDocument fNameRange
see IDOM Node get Next Node public IDOM Node get Next Node return f Next Node  IDOMNode getNextNode IDOMNode getNextNode fNextNode
see IDOM Node get Parent public IDOM Node get Parent return f Parent  IDOMNode getParent IDOMNode getParent fParent
Answers a source position which corresponds to the end of the parent element s declaration protected int get Parent End Declaration IDOM Node parent get Parent if parent null return 0 else if parent instanceof IDOM Compilation Unit return 0 else return DOM Type parent get Open Body End  getParentEndDeclaration IDOMNode getParent IDOMCompilationUnit DOMType getOpenBodyEnd
see IDOM Node get Previous Node public IDOM Node get Previous Node return f Previous Node  IDOMNode getPreviousNode IDOMNode getPreviousNode fPreviousNode
Returns the root node of this document fragment protected IDOM Node get Root if f Parent null return this else return f Parent get Root  IDOMNode getRoot fParent fParent getRoot
Returns the original position of the first character of this node s contents in its document public int get Start Position return f Source Range 0  getStartPosition fSourceRange
see IDOM Node insert Sibling IDOM Node public void insert Sibling IDOM Node sibling throws Illegal Argument Exception DOM Exception verify sibling may be added if sibling null throw new Illegal Argument Exception Util bind dom add Null Sibling NON NLS 1 if f Parent null throw new DOM Exception Util bind dom add Sibling Before Root NON NLS 1 if f Parent is Allowable Child sibling throw new DOM Exception Util bind dom add Incompatible Sibling NON NLS 1 if sibling get Parent null throw new DOM Exception Util bind dom add Sibling With Parent NON NLS 1 NOTE To test if the sibling is an ancestor of this node we need only test if the root of this node is the child the sibling is already a root since we have just guaranteed it has no parent if sibling get Root throw new DOM Exception Util bind dom add Ancestor As Sibling NON NLS 1 DOM Node node DOM Node sibling if the sibling is not already part of this document localize its contents before inserting it into the tree if node get Document get Document node localize Contents insert the node if f Previous Node null f Parent f First Child node else f Previous Node f Next Node node node f Parent f Parent node f Previous Node f Previous Node node f Next Node this f Previous Node node if the node is a constructor it must also be fragmented to update the constructor s name if node get Node Type IDOM Node METHOD IDOM Method node is Constructor node fragment else f Parent fragment  IDOMNode insertSibling IDOMNode insertSibling IDOMNode IllegalArgumentException DOMException IllegalArgumentException addNullSibling fParent DOMException addSiblingBeforeRoot fParent isAllowableChild DOMException addIncompatibleSibling getParent DOMException addSiblingWithParent getRoot DOMException addAncestorAsSibling DOMNode DOMNode getDocument getDocument localizeContents fPreviousNode fParent fFirstChild fPreviousNode fNextNode fParent fParent fPreviousNode fPreviousNode fNextNode fPreviousNode getNodeType IDOMNode IDOMMethod isConstructor fParent
see IDOM Node public boolean is Allowable Child IDOM Node node return false  IDOMNode isAllowableChild IDOMNode
Returns code true code if the contents of this node are from the same document as the given node the contents of this node immediately follow the contents of the given node and neither this node or the given node are fragmented otherwise code false code protected boolean is Content Mergable With DOM Node node return node is Fragmented is Fragmented node get Document get Document node get End Position 1 get Start Position  isContentMergableWith DOMNode isFragmented isFragmented getDocument getDocument getEndPosition getStartPosition
Returns code true code if this node has detailed source index information or code false code if this node has limited source index information To perform some manipulations detailed indexes are required protected boolean is Detailed return get Mask MASK DETAILED SOURCE INDEXES  isDetailed getMask MASK_DETAILED_SOURCE_INDEXES
Returns code true code if this node s or a descendant node s contents have been altered since this node was created This indicates that the contents of this node are no longer consistent with the contents of this node s document protected boolean is Fragmented return f Is Fragmented  isFragmented fIsFragmented
Returns code true code if this noed s name has been altered from the original document contents protected boolean is Name Altered return get Mask MASK NAME ALTERED  isNameAltered getMask MASK_NAME_ALTERED
see IDOM Node is Signature Equal IDOM Node p By default the signatures of two nodes are equal if their type and names are equal Node types that have other requirements for equality must override this method public boolean is Signature Equal IDOM Node node return get Node Type node get Node Type get Name equals node get Name  IDOMNode isSignatureEqual IDOMNode isSignatureEqual IDOMNode getNodeType getNodeType getName getName
Localizes the contents of this node and all descendant nodes such that this node is no longer dependent on its original document in order to generate its contents This node and all descendant nodes become unfragmented and share a new document protected void localize Contents DOM Node clone DOM Node clone share Contents clone  localizeContents DOMNode DOMNode shareContents
Returns a new empty code DOM Node code for this instance protected abstract DOM Node newDOM Node  DOMNode DOMNode newDOMNode
protected abstract DOM Node newDOM Node Normalizes this code DOM Node code s source positions to include whitespace preceeding the node on the line on which the node starts and all whitespace after the node up to the next node s start void normalize I Line Start Finder finder if get Previous Node null normalize Start Position get Parent End Declaration finder Set the children s position if can Have Children Enumeration children get Children while children has More Elements DOM Node children next Element normalize finder normalize End Position finder DOM Node get Next Node  DOMNode newDOMNode DOMNode ILineStartFinder getPreviousNode normalizeStartPosition getParentEndDeclaration canHaveChildren getChildren hasMoreElements DOMNode nextElement normalizeEndPosition DOMNode getNextNode
Normalizes this code DOM Node code s end position void normalize End Position I Line Start Finder finder DOM Node next if next null this node s end position includes all of the characters up to the end of the enclosing node DOM Node parent DOM Node get Parent if parent null parent instanceof DOM Compilation Unit set Source Range End f Document length 1 else parent is a type int temp DOM Type parent get Close Body Position 1 set Source Range End temp f Insertion Position Math max finder get Line Start temp 1 get End Position else this node s end position is just before the start of the next node int temp next get Start Position 1 f Insertion Position Math max finder get Line Start temp 1 get End Position next normalize Start Position get End Position finder set Source Range End next get Start Position 1  DOMNode normalizeEndPosition ILineStartFinder DOMNode DOMNode DOMNode getParent DOMCompilationUnit setSourceRangeEnd fDocument DOMType getCloseBodyPosition setSourceRangeEnd fInsertionPosition getLineStart getEndPosition getStartPosition fInsertionPosition getLineStart getEndPosition normalizeStartPosition getEndPosition setSourceRangeEnd getStartPosition
Normalizes this code DOM Node code s start position void normalize Start Position int previous End I Line Start Finder finder int node Start get Start Position int line Start finder get Line Start node Start if node Start line Start line Start previous End previous End 0 line Start 0 set Start Position line Start  DOMNode normalizeStartPosition previousEnd ILineStartFinder nodeStart getStartPosition lineStart getLineStart nodeStart nodeStart lineStart lineStart previousEnd previousEnd lineStart setStartPosition lineStart
Offsets all the source indexes in this node by the given amount protected void offset int offset offset Range f Name Range offset offset Range f Source Range offset  offsetRange fNameRange offsetRange fSourceRange
Offsets the source range by the given amount protected void offset Range int range int offset for int i 0 i range length i range i offset if range i 0 range i 1  offsetRange
Returns a copy of the given range protected int range Copy int range int copy new int range length for int i 0 i range length i copy i range i return copy  rangeCopy
Separates this node from its parent and siblings maintaining any ties that this node has to the underlying document fragment p When a child is removed its parent is fragmented such that it properly generates its contents see IDOM Node remove public void remove if f Parent null f Parent fragment link siblings if f Next Node null f Next Node f Previous Node f Previous Node if f Previous Node null f Previous Node f Next Node f Next Node fix parent s pointers if f Parent null if f Parent f First Child this f Parent f First Child f Next Node if f Parent f Last Child this f Parent f Last Child f Previous Node remove myself f Parent null f Next Node null f Previous Node null  IDOMNode fParent fParent fNextNode fNextNode fPreviousNode fPreviousNode fPreviousNode fPreviousNode fNextNode fNextNode fParent fParent fFirstChild fParent fFirstChild fNextNode fParent fLastChild fParent fLastChild fPreviousNode fParent fNextNode fPreviousNode
Sets the specified mask of this node s state mask on or off based on the boolean value true on false off protected void set Mask int mask boolean on if on f State Mask mask else f State Mask mask  setMask fStateMask fStateMask
see IDOM Node set Name public void set Name String name f Name name set Name Altered true fragment  IDOMNode setName setName fName setNameAltered
Sets the state of this node as having its name attribute altered from the original document contents protected void set Name Altered boolean altered set Mask MASK NAME ALTERED altered  setNameAltered setMask MASK_NAME_ALTERED
Sets the original position of the last character of this node s contents in its document This method is only used during DOM creation while normalizing the source range of each node protected void set Source Range End int end f Source Range 1 end  setSourceRangeEnd fSourceRange
Sets the original position of the first character of this node s contents in its document This method is only used during DOM creation while normalizing the source range of each node protected void set Start Position int start f Source Range 0 start  setStartPosition fSourceRange
Sets the contents of this node and descendant nodes to be the identical contents of the given node and its descendants This does not effect this node s parent and sibling configuration only the contents of this node This is used only to localize the contents of this node protected void share Contents DOM Node node f Document node f Document f Is Fragmented node f Is Fragmented f Name node f Name f Name Range range Copy node f Name Range f Source Range range Copy node f Source Range f State Mask node f State Mask if can Have Children Enumeration my Children get Children Enumeration other Children node get Children DOM Node my Child other Child while my Children has More Elements my Child DOM Node my Children next Element other Child DOM Node other Children next Element my Child share Contents other Child  shareContents DOMNode fDocument fDocument fIsFragmented fIsFragmented fName fName fNameRange rangeCopy fNameRange fSourceRange rangeCopy fSourceRange fStateMask fStateMask canHaveChildren myChildren getChildren otherChildren getChildren DOMNode myChild otherChild myChildren hasMoreElements myChild DOMNode myChildren nextElement otherChild DOMNode otherChildren nextElement myChild shareContents otherChild
Returns a code String code representing this node for Debug purposes only public abstract String to String  toString

Creates an empty PACKAGE node DOM Package set Mask MASK DETAILED SOURCE INDEXES true  DOMPackage setMask MASK_DETAILED_SOURCE_INDEXES
Creates a new simple PACKAGE document fragment on the given range of the document param document the document containing this node s original contents param source Range a two element array of integers describing the entire inclusive source range of this node within its document Contents start on and include the character at the first position Contents end on and include the character at the last position An array of 1 s indicates this node s contents do not exist in the document param name the identifier portion of the name of this node or code null code if this node does not have a name DOM Package char document int source Range String name super document source Range name new int 1 1 set Mask MASK DETAILED SOURCE INDEXES false  sourceRange DOMPackage sourceRange sourceRange setMask MASK_DETAILED_SOURCE_INDEXES
Creates a new detailed PACKAGE document fragment on the given range of the document param document the document containing this node s original contents param source Range a two element array of integers describing the entire inclusive source range of this node within its document Contents start on and include the character at the first position Contents end on and include the character at the last position An array of 1 s indicates this node s contents do not exist in the document param name the identifier portion of the name of this node or code null code if this node does not have a name param name Range a two element array of integers describing the entire inclusive source range of this node s name within its document including any array qualifiers that might immediately follow the name or 1 s if this node does not have a name DOM Package char document int source Range String name int name Range super document source Range name name Range set Mask MASK DETAILED SOURCE INDEXES true  sourceRange nameRange DOMPackage sourceRange nameRange sourceRange nameRange setMask MASK_DETAILED_SOURCE_INDEXES
see DOM Node append Fragmented Contents Char Array Buffer protected void append Fragmented Contents Char Array Buffer buffer if f Name Range 0 0 buffer append package NON NLS 1 append f Name append append Util LINE SEPARATOR append Util LINE SEPARATOR else buffer append f Document f Source Range 0 f Name Range 0 f Source Range 0 append f Name append f Document f Name Range 1 1 f Source Range 1 f Name Range 1  DOMNode appendFragmentedContents CharArrayBuffer appendFragmentedContents CharArrayBuffer fNameRange fName LINE_SEPARATOR LINE_SEPARATOR fDocument fSourceRange fNameRange fSourceRange fName fDocument fNameRange fSourceRange fNameRange
see IDOM Node get Contents public String get Contents if f Name null return null else return super get Contents  IDOMNode getContents getContents fName getContents
see DOM Node get Detailed Node protected DOM Node get Detailed Node return DOM Node get Factory create Package get Contents  DOMNode getDetailedNode DOMNode getDetailedNode DOMNode getFactory createPackage getContents
see IDOM Node get Java Element public I Java Element get Java Element I Java Element parent throws Illegal Argument Exception if parent get Element Type I Java Element COMPILATION UNIT return I Compilation Unit parent get Package Declaration get Name else throw new Illegal Argument Exception Util bind element illegal Parent NON NLS 1  IDOMNode getJavaElement IJavaElement getJavaElement IJavaElement IllegalArgumentException getElementType IJavaElement COMPILATION_UNIT ICompilationUnit getPackageDeclaration getName IllegalArgumentException illegalParent
see IDOM Node get Node Type public int get Node Type return IDOM Node PACKAGE  IDOMNode getNodeType getNodeType IDOMNode
see DOM Node protected DOM Node newDOM Node return new DOM Package  DOMNode DOMNode newDOMNode DOMPackage
see IDOM Node set Name public void set Name String name become Detailed super set Name name  IDOMNode setName setName becomeDetailed setName
see IDOM Node to String public String to String return PACKAGE get Name NON NLS 1  IDOMNode toString toString getName

Constructs an empty type node DOM Type Constructs an empty type node  DOMType
Creates a new detailed TYPE document fragment on the given range of the document param document the document containing this node s original contents param source Range a two element array of integers describing the entire inclusive source range of this node within its document Contents start on and include the character at the first position Contents end on and include the character at the last position An array of 1 s indicates this node s contents do not exist in the document param name the identifier portion of the name of this node or code null code if this node does not have a name param name Range a two element array of integers describing the entire inclusive source range of this node s name within its document including any array qualifiers that might immediately follow the name or 1 s if this node does not have a name param comment Range a two element array describing the comments that precede the member declaration The first matches the start of this node s source Range and the second is the new line or first non whitespace character following the last comment If no comments are present this array contains two 1 s param flags an integer representing the modifiers for this member The integer can be analyzed with org eclipse jdt core Flags param modifier Range a two element array describing the location of modifiers for this member within its source range The first integer is the first character of the first modifier for this member and the second integer is the last whitespace character preceeding the next part of this member declaration If there are no modifiers present in this node s source code that is package default visibility this array contains two 1 s param type Range a two element array describing the location of the class or interface keyword in the type declaration first and last character positions param superclass Range a two element array describing the location of the superclass name in the type declaration first and last character positions or two 1 s if a superclass is not present in the document param extends Range a two element array describing the location of the extends keyword in the type declaration including any surrounding whitespace or 1 s if the extends keyword is not present in the document param implements List an array of names of the interfaces this type implements or extends or code null code if this type does not implement or extend any interfaces param implements Range a two element array describing the location of the comment delimited list of interfaces this type implements or extends not including any surrounding whitespace or 1 s if no interface list is present in the document param implements Keyword Range a two element array describing the location of the implements keyword including any surrounding whitespace or 1 s if no implements keyword is present in the document param open Body Range a two element array describing the location of the open brace of the type s body and whitespace following the type declaration and preceeding the first member in the type param close Body Range a two element array describing the source range of the first new line or non whitespace character preceeding the close brace of the type s body up to the close brace param is Class true is the type is a class false if it is an interface DOM Type char document int source Range String name int name Range int comment Range int flags int modifier Range int type Range int superclass Range int extends Range String implements List int implements Range int implements Keyword Range int open Body Range int close Body Range boolean is Class super document source Range name name Range comment Range flags modifier Range f Type Range type Range set Mask MASK TYPE IS CLASS is Class f Extends Range extends Range f Implements Range implements Keyword Range f Superclass Range superclass Range f Interfaces Range implements Range f Close Body Range close Body Range set Mask MASK TYPE HAS SUPERCLASS superclass Range 0 0 set Mask MASK TYPE HAS INTERFACES implements List null f Super Interfaces implements List f Open Body Range open Body Range f Close Body Range close Body Range set Mask MASK DETAILED SOURCE INDEXES true  sourceRange nameRange commentRange sourceRange modifierRange typeRange superclassRange extendsRange implementsList implementsRange implementsKeywordRange openBodyRange closeBodyRange isClass DOMType sourceRange nameRange commentRange modifierRange typeRange superclassRange extendsRange implementsList implementsRange implementsKeywordRange openBodyRange closeBodyRange isClass sourceRange nameRange commentRange modifierRange fTypeRange typeRange setMask MASK_TYPE_IS_CLASS isClass fExtendsRange extendsRange fImplementsRange implementsKeywordRange fSuperclassRange superclassRange fInterfacesRange implementsRange fCloseBodyRange closeBodyRange setMask MASK_TYPE_HAS_SUPERCLASS superclassRange setMask MASK_TYPE_HAS_INTERFACES implementsList fSuperInterfaces implementsList fOpenBodyRange openBodyRange fCloseBodyRange closeBodyRange setMask MASK_DETAILED_SOURCE_INDEXES
Creates a new simple TYPE document fragment on the given range of the document param document the document containing this node s original contents param source Range a two element array of integers describing the entire inclusive source range of this node within its document Contents start on and include the character at the first position Contents end on and include the character at the last position An array of 1 s indicates this node s contents do not exist in the document param name the identifier portion of the name of this node or code null code if this node does not have a name param name Range a two element array of integers describing the entire inclusive source range of this node s name within its document including any array qualifiers that might immediately follow the name or 1 s if this node does not have a name param flags an integer representing the modifiers for this member The integer can be analyzed with org eclipse jdt core Flags param implements List an array of names of the interfaces this type implements or extends or code null code if this type does not implement or extend any interfaces param is Class true is the type is a class false if it is an interface DOM Type char document int source Range String name int name Range int flags String implements List boolean is Class this document source Range name name Range new int 1 1 flags new int 1 1 new int 1 1 new int 1 1 new int 1 1 implements List new int 1 1 new int 1 1 new int 1 1 new int source Range 1 source Range 1 is Class set Mask MASK DETAILED SOURCE INDEXES false  sourceRange nameRange implementsList isClass DOMType sourceRange nameRange implementsList isClass sourceRange nameRange implementsList sourceRange sourceRange isClass setMask MASK_DETAILED_SOURCE_INDEXES
see IDOM Type add Super Interface String public void add Super Interface String name throws Illegal Argument Exception if name null throw new Illegal Argument Exception Util bind dom add Null Interface NON NLS 1 if f Super Interfaces null f Super Interfaces new String 1 f Super Interfaces 0 name else f Super Interfaces append String f Super Interfaces name set Super Interfaces f Super Interfaces  IDOMType addSuperInterface addSuperInterface IllegalArgumentException IllegalArgumentException addNullInterface fSuperInterfaces fSuperInterfaces fSuperInterfaces fSuperInterfaces appendString fSuperInterfaces setSuperInterfaces fSuperInterfaces
see DOM Member append Member Body Contents Char Array Buffer protected void append Member Body Contents Char Array Buffer buffer buffer append f Document f Open Body Range 0 f Open Body Range 1 1 f Open Body Range 0 append Contents Of Children buffer buffer append f Document f Close Body Range 0 f Close Body Range 1 1 f Close Body Range 0 buffer append f Document f Close Body Range 1 1 f Source Range 1 f Close Body Range 1  DOMMember appendMemberBodyContents CharArrayBuffer appendMemberBodyContents CharArrayBuffer fDocument fOpenBodyRange fOpenBodyRange fOpenBodyRange appendContentsOfChildren fDocument fCloseBodyRange fCloseBodyRange fCloseBodyRange fDocument fCloseBodyRange fSourceRange fCloseBodyRange
see DOM Member append Member Declaration Contents Char Array Buffer protected void append Member Declaration Contents Char Array Buffer buffer if f Type Keyword null buffer append f Type Keyword buffer append f Document f Type Range 1 f Name Range 0 f Type Range 1 else buffer append f Document f Type Range 0 f Type Range 1 1 f Type Range 0 buffer append get Name if is Class boolean has Interfaces false if get Mask MASK TYPE HAS SUPERCLASS if f Extends Range 0 0 buffer append extends NON NLS 1 else buffer append f Document f Extends Range 0 f Extends Range 1 1 f Extends Range 0 if f Superclass null buffer append f Superclass else buffer append f Document f Superclass Range 0 f Superclass Range 1 1 f Superclass Range 0 if get Mask MASK TYPE HAS INTERFACES has Interfaces true if f Implements Range 0 0 buffer append implements NON NLS 1 else buffer append f Document f Implements Range 0 f Implements Range 1 1 f Implements Range 0 if f Interfaces null buffer append f Interfaces else buffer append f Document f Interfaces Range 0 f Interfaces Range 1 1 f Interfaces Range 0 if has Interfaces if f Implements Range 0 0 buffer append else buffer append f Document f Interfaces Range 1 1 f Open Body Range 0 f Interfaces Range 1 1 else if f Superclass Range 0 0 buffer append else buffer append f Document f Superclass Range 1 1 f Open Body Range 0 f Superclass Range 1 1 else if get Mask MASK TYPE HAS INTERFACES if f Extends Range 0 0 buffer append extends NON NLS 1 else buffer append f Document f Extends Range 0 f Extends Range 1 1 f Extends Range 0 if f Interfaces null buffer append f Interfaces buffer append else buffer append f Document f Interfaces Range 0 f Interfaces Range 1 1 f Interfaces Range 0 else buffer append f Document f Name Range 1 1 f Open Body Range 0 f Name Range 1 1  DOMMember appendMemberDeclarationContents CharArrayBuffer appendMemberDeclarationContents CharArrayBuffer fTypeKeyword fTypeKeyword fDocument fTypeRange fNameRange fTypeRange fDocument fTypeRange fTypeRange fTypeRange getName isClass hasInterfaces getMask MASK_TYPE_HAS_SUPERCLASS fExtendsRange fDocument fExtendsRange fExtendsRange fExtendsRange fSuperclass fSuperclass fDocument fSuperclassRange fSuperclassRange fSuperclassRange getMask MASK_TYPE_HAS_INTERFACES hasInterfaces fImplementsRange fDocument fImplementsRange fImplementsRange fImplementsRange fInterfaces fInterfaces fDocument fInterfacesRange fInterfacesRange fInterfacesRange hasInterfaces fImplementsRange fDocument fInterfacesRange fOpenBodyRange fInterfacesRange fSuperclassRange fDocument fSuperclassRange fOpenBodyRange fSuperclassRange getMask MASK_TYPE_HAS_INTERFACES fExtendsRange fDocument fExtendsRange fExtendsRange fExtendsRange fInterfaces fInterfaces fDocument fInterfacesRange fInterfacesRange fInterfacesRange fDocument fNameRange fOpenBodyRange fNameRange
see DOM Member append Simple Contents Char Array Buffer protected void append Simple Contents Char Array Buffer buffer append eveything before my name buffer append f Document f Source Range 0 f Name Range 0 f Source Range 0 append my name buffer append f Name append everything after my name and before my first child buffer append f Document f Name Range 1 1 f Open Body Range 1 f Name Range 1 append my children append Contents Of Children buffer append from my last child to my end buffer append f Document f Close Body Range 0 f Source Range 1 f Close Body Range 0 1  DOMMember appendSimpleContents CharArrayBuffer appendSimpleContents CharArrayBuffer fDocument fSourceRange fNameRange fSourceRange fName fDocument fNameRange fOpenBodyRange fNameRange appendContentsOfChildren fDocument fCloseBodyRange fSourceRange fCloseBodyRange
see IDOM Node can Have Children public boolean can Have Children return true  IDOMNode canHaveChildren canHaveChildren
Returns the position of the closing brace for the body of this type This value this method returns is only valid before the type has been normalized and is present only for normalization int get Close Body Position return f Close Body Range 0  getCloseBodyPosition fCloseBodyRange
see DOM Node get Detailed Node protected DOM Node get Detailed Node return DOM Node get Factory create Type get Contents  DOMNode getDetailedNode DOMNode getDetailedNode DOMNode getFactory createType getContents
see DOM Node get Insertion Position public int get Insertion Position this should return the position of the end of the last line separator before the closing brace of the type See PR 1GELSDQ ITPJUI WINNT JDOM I Type create Method does not insert nicely for inner types return f Insertion Position  DOMNode getInsertionPosition getInsertionPosition IType createMethod fInsertionPosition
see IDOM Node get Java Element public I Java Element get Java Element I Java Element parent throws Illegal Argument Exception switch parent get Element Type case I Java Element COMPILATION UNIT return I Compilation Unit parent get Type get Name case I Java Element TYPE return I Type parent get Type get Name Note creating local anonymous type is not supported default throw new Illegal Argument Exception Util bind element illegal Parent NON NLS 1  IDOMNode getJavaElement IJavaElement getJavaElement IJavaElement IllegalArgumentException getElementType IJavaElement COMPILATION_UNIT ICompilationUnit getType getName IJavaElement IType getType getName IllegalArgumentException illegalParent
see DOM Member get Member Declaration Start Position protected int get Member Declaration Start Position return f Type Range 0  DOMMember getMemberDeclarationStartPosition getMemberDeclarationStartPosition fTypeRange
see IDOM Node get Node Type public int get Node Type return IDOM Node TYPE  IDOMNode getNodeType getNodeType IDOMNode
Answers the open body range end position int get Open Body End return f Open Body Range 1  getOpenBodyEnd fOpenBodyRange
see IDOM Type get Superclass public String get Superclass become Detailed if get Mask MASK TYPE HAS SUPERCLASS if f Superclass null return f Superclass else return new String Char Operation subarray f Document f Superclass Range 0 f Superclass Range 1 1 else return null  IDOMType getSuperclass getSuperclass becomeDetailed getMask MASK_TYPE_HAS_SUPERCLASS fSuperclass fSuperclass CharOperation fDocument fSuperclassRange fSuperclassRange
see IDOM Type get Super Interfaces public String get Super Interfaces return f Super Interfaces  IDOMType getSuperInterfaces getSuperInterfaces fSuperInterfaces
see IDOM Node public boolean is Allowable Child IDOM Node node if node null int type node get Node Type return type IDOM Node TYPE type IDOM Node FIELD type IDOM Node METHOD type IDOM Node INITIALIZER else return false  IDOMNode isAllowableChild IDOMNode getNodeType IDOMNode IDOMNode IDOMNode IDOMNode
see IDOM Type is Class public boolean is Class return get Mask MASK TYPE IS CLASS  IDOMType isClass isClass getMask MASK_TYPE_IS_CLASS
see DOM Node protected DOM Node newDOM Node return new DOM Type  DOMNode DOMNode newDOMNode DOMType
Normalizes this code DOM Node code s source positions to include whitespace preceeding the node on the line on which the node starts and all whitespace after the node up to the next node s start void normalize I Line Start Finder finder perform final changes to the open and close body ranges int open Body End open Body Start close Body Start close Body End DOM Node first DOM Node get First Child DOM Node last Node null look for the open body Scanner scanner new Scanner scanner set Source f Document scanner reset To f Name Range 1 1 f Document length try int current Token scanner get Next Token while current Token Terminal Tokens Token NameLBRACE current Token Terminal Tokens Token NameEOF current Token scanner get Next Token if current Token Terminal Tokens Token NameLBRACE open Body End scanner current Position 1 open Body Start scanner start Position else open Body End f Document length open Body Start f Document length catch Invalid Input Exception e open Body End f Document length open Body Start f Document length if first null int line Start finder get Line Start first get Start Position if line Start open Body End open Body End line Start 1 else open Body End first get Start Position 1 last Node DOM Node first get Next Node if last Node null last Node first else while last Node get Next Node null last Node DOM Node last Node get Next Node scanner set Source f Document scanner reset To last Node get End Position 1 f Document length try int current Token scanner get Next Token while current Token Terminal Tokens Token NameRBRACE current Token Terminal Tokens Token NameEOF current Token scanner get Next Token if current Token Terminal Tokens Token NameRBRACE close Body Start scanner start Position close Body End scanner current Position 1 else close Body Start f Document length close Body End f Document length catch Invalid Input Exception e close Body Start f Document length close Body End f Document length else scanner reset To open Body End f Document length try int current Token scanner get Next Token while current Token Terminal Tokens Token NameRBRACE current Token Terminal Tokens Token NameEOF current Token scanner get Next Token if current Token Terminal Tokens Token NameRBRACE close Body Start scanner start Position close Body End scanner current Position 1 else close Body Start f Document length close Body End f Document length catch Invalid Input Exception e close Body Start f Document length close Body End f Document length open Body End close Body End 1 set Open Body Range End open Body End set Open Body Range Start open Body Start set Close Body Range Start close Body Start set Close Body Range End close Body End f Insertion Position finder get Line Start close Body Start if last Node null f Insertion Position last Node get End Position f Insertion Position get Close Body Position if f Insertion Position open Body End f Insertion Position get Close Body Position super normalize finder  DOMNode ILineStartFinder openBodyEnd openBodyStart closeBodyStart closeBodyEnd DOMNode DOMNode getFirstChild DOMNode lastNode setSource fDocument resetTo fNameRange fDocument currentToken getNextToken currentToken TerminalTokens TokenNameLBRACE currentToken TerminalTokens TokenNameEOF currentToken getNextToken currentToken TerminalTokens TokenNameLBRACE openBodyEnd currentPosition openBodyStart startPosition openBodyEnd fDocument openBodyStart fDocument InvalidInputException openBodyEnd fDocument openBodyStart fDocument lineStart getLineStart getStartPosition lineStart openBodyEnd openBodyEnd lineStart openBodyEnd getStartPosition lastNode DOMNode getNextNode lastNode lastNode lastNode getNextNode lastNode DOMNode lastNode getNextNode setSource fDocument resetTo lastNode getEndPosition fDocument currentToken getNextToken currentToken TerminalTokens TokenNameRBRACE currentToken TerminalTokens TokenNameEOF currentToken getNextToken currentToken TerminalTokens TokenNameRBRACE closeBodyStart startPosition closeBodyEnd currentPosition closeBodyStart fDocument closeBodyEnd fDocument InvalidInputException closeBodyStart fDocument closeBodyEnd fDocument resetTo openBodyEnd fDocument currentToken getNextToken currentToken TerminalTokens TokenNameRBRACE currentToken TerminalTokens TokenNameEOF currentToken getNextToken currentToken TerminalTokens TokenNameRBRACE closeBodyStart startPosition closeBodyEnd currentPosition closeBodyStart fDocument closeBodyEnd fDocument InvalidInputException closeBodyStart fDocument closeBodyEnd fDocument openBodyEnd closeBodyEnd setOpenBodyRangeEnd openBodyEnd setOpenBodyRangeStart openBodyStart setCloseBodyRangeStart closeBodyStart setCloseBodyRangeEnd closeBodyEnd fInsertionPosition getLineStart closeBodyStart lastNode fInsertionPosition lastNode getEndPosition fInsertionPosition getCloseBodyPosition fInsertionPosition openBodyEnd fInsertionPosition getCloseBodyPosition
Normalizes this code DOM Node code s end position void normalize End Position I Line Start Finder finder DOM Node next if next null this node s end position includes all of the characters up to the end of the enclosing node DOM Node parent DOM Node get Parent if parent null parent instanceof DOM Compilation Unit set Source Range End f Document length 1 else parent is a type set Source Range End DOM Type parent get Close Body Position 1 else this node s end position is just before the start of the next node next normalize Start Position get End Position finder set Source Range End next get Start Position 1  DOMNode normalizeEndPosition ILineStartFinder DOMNode DOMNode DOMNode getParent DOMCompilationUnit setSourceRangeEnd fDocument setSourceRangeEnd DOMType getCloseBodyPosition normalizeStartPosition getEndPosition setSourceRangeEnd getStartPosition
Offsets all the source indexes in this node by the given amount protected void offset int offset super offset offset offset Range f Close Body Range offset offset Range f Extends Range offset offset Range f Implements Range offset offset Range f Interfaces Range offset offset Range f Open Body Range offset offset Range f Superclass Range offset offset Range f Type Range offset  offsetRange fCloseBodyRange offsetRange fExtendsRange offsetRange fImplementsRange offsetRange fInterfacesRange offsetRange fOpenBodyRange offsetRange fSuperclassRange offsetRange fTypeRange
see IDOM Type set Class boolean public void set Class boolean b become Detailed fragment set Mask MASK TYPE IS CLASS b if b f Type Keyword class NON NLS 1 else f Type Keyword interface NON NLS 1 set Superclass null  IDOMType setClass setClass becomeDetailed setMask MASK_TYPE_IS_CLASS fTypeKeyword fTypeKeyword setSuperclass
Sets the end of the close body range void set Close Body Range End int end f Close Body Range 1 end  setCloseBodyRangeEnd fCloseBodyRange
Sets the start of the close body range void set Close Body Range Start int start f Close Body Range 0 start  setCloseBodyRangeStart fCloseBodyRange
Sets the name of this node p When the name of a type is set all of its constructors must be marked as fragmented since the names of the constructors must reflect the name of this type see IDOM Node set Name String public void set Name String name throws Illegal Argument Exception if name null throw new Illegal Argument Exception Util bind element null Name NON NLS 1 super set Name name Enumeration children get Children while children has More Elements IDOM Node child IDOM Node children next Element if child get Node Type IDOM Node METHOD IDOM Method child is Constructor DOM Node child fragment  IDOMNode setName setName IllegalArgumentException IllegalArgumentException nullName setName getChildren hasMoreElements IDOMNode IDOMNode nextElement getNodeType IDOMNode IDOMMethod isConstructor DOMNode
Sets the end of the open body range void set Open Body Range End int end f Open Body Range 1 end  setOpenBodyRangeEnd fOpenBodyRange
Sets the start of the open body range void set Open Body Range Start int start f Open Body Range 0 start  setOpenBodyRangeStart fOpenBodyRange
see IDOM Type set Superclass String public void set Superclass String superclass Name become Detailed fragment f Superclass superclass Name set Mask MASK TYPE HAS SUPERCLASS superclass Name null  IDOMType setSuperclass setSuperclass superclassName becomeDetailed fSuperclass superclassName setMask MASK_TYPE_HAS_SUPERCLASS superclassName
see IDOM Type set Super Interfaces String public void set Super Interfaces String names become Detailed if names null throw new Illegal Argument Exception Util bind dom null Interfaces NON NLS 1 fragment f Super Interfaces names if names length 0 f Interfaces null f Super Interfaces EMPTY SUPERINTERFACES set Mask MASK TYPE HAS INTERFACES false else set Mask MASK TYPE HAS INTERFACES true Char Array Buffer buffer new Char Array Buffer for int i 0 i names length i if i 0 buffer append NON NLS 1 buffer append names i f Interfaces buffer get Contents  IDOMType setSuperInterfaces setSuperInterfaces becomeDetailed IllegalArgumentException nullInterfaces fSuperInterfaces fInterfaces fSuperInterfaces EMPTY_SUPERINTERFACES setMask MASK_TYPE_HAS_INTERFACES setMask MASK_TYPE_HAS_INTERFACES CharArrayBuffer CharArrayBuffer fInterfaces getContents
Sets the type keyword void set Type Keyword String keyword f Type Keyword keyword  setTypeKeyword fTypeKeyword
see DOM Node share Contents DOM Node protected void share Contents DOM Node node super share Contents node DOM Type type DOM Type node f Close Body Range range Copy type f Close Body Range f Extends Range type f Extends Range f Implements Range range Copy type f Implements Range f Interfaces type f Interfaces f Interfaces Range range Copy type f Interfaces Range f Open Body Range range Copy type f Open Body Range f Superclass type f Superclass f Superclass Range range Copy type f Superclass Range f Super Interfaces type f Super Interfaces f Type Keyword type f Type Keyword f Type Range range Copy type f Type Range  DOMNode shareContents DOMNode shareContents DOMNode shareContents DOMType DOMType fCloseBodyRange rangeCopy fCloseBodyRange fExtendsRange fExtendsRange fImplementsRange rangeCopy fImplementsRange fInterfaces fInterfaces fInterfacesRange rangeCopy fInterfacesRange fOpenBodyRange rangeCopy fOpenBodyRange fSuperclass fSuperclass fSuperclassRange rangeCopy fSuperclassRange fSuperInterfaces fSuperInterfaces fTypeKeyword fTypeKeyword fTypeRange rangeCopy fTypeRange
see IDOM Node to String public String to String return TYPE get Name NON NLS 1  IDOMNode toString toString getName
see IDOM Type get Type Parameters since 3 0 public String get Type Parameters return this f Type Parameters  IDOMType getTypeParameters getTypeParameters fTypeParameters
see IDOM Type is Enum since 3 0 public boolean is Enum return this f Is Enum  IDOMType isEnum isEnum fIsEnum
see IDOM Type is Annotation since 3 0 public boolean is Annotation return this f Is Annotation  IDOMType isAnnotation isAnnotation fIsAnnotation
see IDOM Type set Enum boolean since 3 0 public void set Enum boolean b this f Is Enum b if this f Is Enum enums are always classes with no superclass set Class true set Superclass null  IDOMType setEnum setEnum fIsEnum fIsEnum setClass setSuperclass
see IDOM Type set Annotation boolean since 3 0 public void set Annotation boolean b this f Is Annotation b if this f Is Annotation annotation types are always interface with no superclass or superinterfaces set Class false set Superclass null set Super Interfaces new String 0  IDOMType setAnnotation setAnnotation fIsAnnotation fIsAnnotation setClass setSuperclass setSuperInterfaces
see IDOM Type set Type Parameters java lang String since 3 0 public void set Type Parameters String type Parameters this f Type Parameters type Parameters  IDOMType setTypeParameters setTypeParameters typeParameters fTypeParameters typeParameters

public interface I Line Start Finder Returns the position of the start of the line at or before the given source position p This defaults to zero if the position corresponds to a position on the first line of the source  ILineStartFinder

protected IDOM Node f Current Element Creates an enumeration of silbings starting at the given node If the given node is code null code the enumeration is empty Sibling Enumeration IDOM Node child f Current Element child  IDOMNode fCurrentElement SiblingEnumeration IDOMNode fCurrentElement
see java util Enumeration has More Elements public boolean has More Elements return f Current Element null  hasMoreElements hasMoreElements fCurrentElement
see java util Enumeration next Element public Object next Element IDOM Node curr f Current Element if curr null f Current Element f Current Element get Next Node return curr  nextElement nextElement IDOMNode fCurrentElement fCurrentElement fCurrentElement getNextNode

Does nothing public void accept Problem I Problem problem nothing to do  acceptProblem IProblem
public void accept Import int declaration Start int declaration End char name boolean on Demand int modifiers int source Range declaration Start declaration End String import Name new String name name is set to contain the if on Demand import Name NON NLS 1 f Node new DOM Import f Document source Range import Name on Demand add Child f Node  acceptImport declarationStart declarationEnd onDemand sourceRange declarationStart declarationEnd importName onDemand importName fNode DOMImport fDocument sourceRange importName onDemand addChild fNode
public void accept Package int declaration Start int declaration End char name int source Range new int declaration Start declaration End f Node new DOM Package f Document source Range Char Operation char To String name add Child f Node  acceptPackage declarationStart declarationEnd sourceRange declarationStart declarationEnd fNode DOMPackage fDocument sourceRange CharOperation charToString addChild fNode
see IDOM Factory create Compilation Unit String String public IDOM Compilation Unit create Compilation Unit String source Code String name return create Compilation Unit source Code to Char Array name to Char Array  IDOMFactory createCompilationUnit IDOMCompilationUnit createCompilationUnit sourceCode createCompilationUnit sourceCode toCharArray toCharArray
see IDOM Factory create Compilation Unit String String public IDOM Compilation Unit create Compilation Unit I Compilation Unit compilation Unit initialize Build compilation Unit get Contents true true get Parser Java Core get Options parse Compilation Unit compilation Unit false diet parse return super create Compilation Unit compilation Unit  IDOMFactory createCompilationUnit IDOMCompilationUnit createCompilationUnit ICompilationUnit compilationUnit initializeBuild compilationUnit getContents getParser JavaCore getOptions parseCompilationUnit compilationUnit createCompilationUnit compilationUnit
Creates a new DOM Method and inizializes param declaration Start a source position corresponding to the first character of this constructor declaration param modifiers the modifiers for this constructor converted to a flag param return Type the name of the return type param name the name of this constructor param name Start a source position corresponding to the first character of the name param name End a source position corresponding to the last character of the name param parameter Types a list of parameter type names param parameter Names a list of the names of the parameters param exception Types a list of the exception types protected void enter Abstract Method int declaration Start int modifiers char return Type char name int name Start int name End char parameter Types char parameter Names char exception Types boolean is Constructor int source Range declaration Start 1 will be fixed up on exit int name Range name Start name End f Node new DOM Method f Document source Range Char Operation char To String name name Range modifiers is Constructor Char Operation char To String return Type Char Operation char Array To String Array parameter Types Char Operation char Array To String Array parameter Names Char Operation char Array To String Array exception Types add Child f Node f Stack push f Node  DOMMethod declarationStart returnType nameStart nameEnd parameterTypes parameterNames exceptionTypes enterAbstractMethod declarationStart returnType nameStart nameEnd parameterTypes parameterNames exceptionTypes isConstructor sourceRange declarationStart nameRange nameStart nameEnd fNode DOMMethod fDocument sourceRange CharOperation charToString nameRange isConstructor CharOperation charToString returnType CharOperation charArrayToStringArray parameterTypes CharOperation charArrayToStringArray parameterNames CharOperation charArrayToStringArray exceptionTypes addChild fNode fStack fNode
public void enter Class int declaration Start int modifiers char name int name Start int name End char superclass char superinterfaces enter Type declaration Start modifiers name name Start name End superclass superinterfaces true  enterClass declarationStart nameStart nameEnd enterType declarationStart nameStart nameEnd
public void enter Constructor int declaration Start int modifiers char name int name Start int name End char parameter Types char parameter Names char exception Types see 1FVIIQZ String name String new String f Document name Start name End name Start int open Paren Position name String index Of if open Paren Position 1 name End name Start open Paren Position 1 enter Abstract Method declaration Start modifiers null name name Start name End parameter Types parameter Names exception Types true  enterConstructor declarationStart nameStart nameEnd parameterTypes parameterNames exceptionTypes nameString fDocument nameStart nameEnd nameStart openParenPosition nameString indexOf openParenPosition nameEnd nameStart openParenPosition enterAbstractMethod declarationStart nameStart nameEnd parameterTypes parameterNames exceptionTypes
public void enter Field int declaration Start int modifiers char type char name int name Start int name End int source Range declaration Start 1 int name Range name Start name End boolean is Secondary false if f Node instanceof DOM Field is Secondary declaration Start f Node f Source Range 0 f Node new DOM Field f Document source Range Char Operation char To String name name Range modifiers Char Operation char To String type is Secondary add Child f Node f Stack push f Node  enterField declarationStart nameStart nameEnd sourceRange declarationStart nameRange nameStart nameEnd isSecondary fNode DOMField isSecondary declarationStart fNode fSourceRange fNode DOMField fDocument sourceRange CharOperation charToString nameRange CharOperation charToString isSecondary addChild fNode fStack fNode
public void enter Initializer int declaration Source Start int modifiers int source Range declaration Source Start 1 f Node new DOM Initializer f Document source Range modifiers add Child f Node f Stack push f Node  enterInitializer declarationSourceStart sourceRange declarationSourceStart fNode DOMInitializer fDocument sourceRange addChild fNode fStack fNode
public void enter Interface int declaration Start int modifiers char name int name Start int name End char superinterfaces enter Type declaration Start modifiers name name Start name End null superinterfaces false  enterInterface declarationStart nameStart nameEnd enterType declarationStart nameStart nameEnd
public void enter Method int declaration Start int modifiers char return Type char name int name Start int name End char parameter Types char parameter Names char exception Types enter Abstract Method declaration Start modifiers return Type name name Start name End parameter Types parameter Names exception Types false  enterMethod declarationStart returnType nameStart nameEnd parameterTypes parameterNames exceptionTypes enterAbstractMethod declarationStart returnType nameStart nameEnd parameterTypes parameterNames exceptionTypes
protected void enter Type int declaration Start int modifiers char name int name Start int name End char superclass char superinterfaces boolean is Class if f Building Type int source Range declaration Start 1 will be fixed in the exit int name Range new int name Start name End f Node new DOM Type f Document source Range new String name name Range modifiers Char Operation char Array To String Array superinterfaces is Class add Child f Node f Stack push f Node  enterType declarationStart nameStart nameEnd isClass fBuildingType sourceRange declarationStart nameRange nameStart nameEnd fNode DOMType fDocument sourceRange nameRange CharOperation charArrayToStringArray isClass addChild fNode fStack fNode
Finishes the configuration of the class DOM object which was created by a previous enter Class call see I Source Element Requestor exit Class int public void exit Class int declaration End exit Type declaration End  enterClass ISourceElementRequestor exitClass exitClass declarationEnd exitType declarationEnd
Finishes the configuration of the method DOM object which was created by a previous enter Constructor call see I Source Element Requestor exit Constructor int public void exit Constructor int declaration End exit Member declaration End  enterConstructor ISourceElementRequestor exitConstructor exitConstructor declarationEnd exitMember declarationEnd
public void exit Field int initialization Start int declaration End int declaration Source End exit Member declaration End  exitField initializationStart declarationEnd declarationSourceEnd exitMember declarationEnd
public void exit Initializer int declaration End exit Member declaration End  exitInitializer declarationEnd exitMember declarationEnd
public void exit Interface int declaration End exit Type declaration End  exitInterface declarationEnd exitType declarationEnd
Finishes the configuration of the member param declaration End a source position corresponding to the end of the method declaration This can include whitespace and comments following the closing bracket protected void exit Member int declaration End DOM Member m DOM Member f Stack pop m set Source Range End declaration End f Node m  declarationEnd exitMember declarationEnd DOMMember DOMMember fStack setSourceRangeEnd declarationEnd fNode
public void exit Method int declaration End exit Member declaration End  exitMethod declarationEnd exitMember declarationEnd
see AbstractDOM Builder exit Type param declaration End a source position corresponding to the end of the class declaration This can include whitespace and comments following the closing bracket protected void exit Type int declaration End exit Type declaration End declaration End  AbstractDOMBuilder exitType declarationEnd exitType declarationEnd exitType declarationEnd declarationEnd
Creates a new parser protected Source Element Parser get Parser Map settings return new Source Element Parser this new Default Problem Factory new Compiler Options settings  SourceElementParser getParser SourceElementParser DefaultProblemFactory CompilerOptions

public Local Variable Java Element parent String name int declaration Source Start int declaration Source End int name Start int name End String type Signature super parent name this declaration Source Start declaration Source Start this declaration Source End declaration Source End this name Start name Start this name End name End this type Signature type Signature  LocalVariable JavaElement declarationSourceStart declarationSourceEnd nameStart nameEnd typeSignature declarationSourceStart declarationSourceStart declarationSourceEnd declarationSourceEnd nameStart nameStart nameEnd nameEnd typeSignature typeSignature
protected void closing Object info a local variable has no info 
protected Object create Element Info a local variable has no info return null  createElementInfo
public boolean equals Object o if o instanceof Local Variable return false Local Variable other Local Variable o return this declaration Source Start other declaration Source Start this declaration Source End other declaration Source End this name Start other name Start this name End other name End super equals o  LocalVariable LocalVariable LocalVariable declarationSourceStart declarationSourceStart declarationSourceEnd declarationSourceEnd nameStart nameStart nameEnd nameEnd
public boolean exists return this parent exists see https bugs eclipse org bugs show bug cgi id 46192  show_bug
protected void generate Infos Object info Hash Map new Elements I Progress Monitor pm a local variable has no info  generateInfos HashMap newElements IProgressMonitor
public I Java Element get Handle From Memento String token Memento Tokenizer memento Working Copy Owner owner switch token char At 0 case JEM COUNT return get Handle Updating Count From Memento memento owner return this  IJavaElement getHandleFromMemento MementoTokenizer WorkingCopyOwner charAt JEM_COUNT getHandleUpdatingCountFromMemento
public String get Handle Memento String Buffer buff new String Buffer Java Element get Parent get Handle Memento buff append get Handle Memento Delimiter buff append this name buff append JEM COUNT buff append this declaration Source Start buff append JEM COUNT buff append this declaration Source End buff append JEM COUNT buff append this name Start buff append JEM COUNT buff append this name End buff append JEM COUNT buff append this type Signature if this occurrence Count 1 buff append JEM COUNT buff append this occurrence Count return buff to String  getHandleMemento StringBuffer StringBuffer JavaElement getParent getHandleMemento getHandleMementoDelimiter JEM_COUNT declarationSourceStart JEM_COUNT declarationSourceEnd JEM_COUNT nameStart JEM_COUNT nameEnd JEM_COUNT typeSignature occurrenceCount JEM_COUNT occurrenceCount toString
protected char get Handle Memento Delimiter return Java Element JEM LOCALVARIABLE  getHandleMementoDelimiter JavaElement JEM_LOCALVARIABLE
public I Resource get Corresponding Resource return null  IResource getCorrespondingResource
public int get Element Type return LOCAL VARIABLE  getElementType LOCAL_VARIABLE
public I Source Range get Name Range return new Source Range this name Start this name End this name Start 1  ISourceRange getNameRange SourceRange nameStart nameEnd nameStart
public I Path get Path return this parent get Path  IPath getPath getPath
public I Resource get Resource return this parent get Resource  IResource getResource getResource
see I Source Reference public String get Source throws Java Model Exception I Openable openable this parent get Openable Parent I Buffer buffer openable get Buffer if buffer null return null I Source Range range get Source Range int offset range get Offset int length range get Length if offset 1 length 0 return null try return buffer get Text offset length catch Runtime Exception e return null  ISourceReference getSource JavaModelException IOpenable getOpenableParent IBuffer getBuffer ISourceRange getSourceRange getOffset getLength getText RuntimeException
see I Source Reference public I Source Range get Source Range return new Source Range this declaration Source Start this declaration Source End this declaration Source Start 1  ISourceReference ISourceRange getSourceRange SourceRange declarationSourceStart declarationSourceEnd declarationSourceStart
public String get Type Signature return this type Signature  getTypeSignature typeSignature
public I Resource get Underlying Resource throws Java Model Exception return this parent get Underlying Resource  IResource getUnderlyingResource JavaModelException getUnderlyingResource
public int hash Code return Util combine Hash Codes this parent hash Code this name Start  hashCode combineHashCodes hashCode nameStart
public boolean is Structure Known throws Java Model Exception return true  isStructureKnown JavaModelException
protected void to String Info int tab String Buffer buffer Object info buffer append this tab String tab if info NO INFO buffer append Signature to String this get Type Signature buffer append NON NLS 1 to String Name buffer  toStringInfo StringBuffer tabString NO_INFO toString getTypeSignature toStringName

Constructor public LRU Enumerator Element Object value f Value value  LRUEnumeratorElement fValue
Creates a Cache Enumerator on the list of code LRU Enumerator Elements code public LRU Cache Enumerator LRU Enumerator Element first Element f Element Queue first Element  CacheEnumerator LRUEnumeratorElements LRUCacheEnumerator LRUEnumeratorElement firstElement fElementQueue firstElement
Returns true if more elements exist public boolean has More Elements return f Element Queue null  hasMoreElements fElementQueue
Returns the next element public Object next Element Object temp f Element Queue f Value f Element Queue f Element Queue f Next return temp  nextElement fElementQueue fValue fElementQueue fElementQueue fNext

public abstract class Member extends Source Ref Element implements I Member protected Member Java Element parent String name super parent name  SourceRefElement IMember JavaElement
protected boolean are Similar Methods String name1 String params1 String name2 String params2 String simple Names1 if name1 equals name2 int params1 Length params1 length if params1 Length params2 length for int i 0 i params1 Length i String simple Name1 simple Names1 null Signature get Simple Name Signature to String params1 i simple Names1 i String simple Name2 Signature get Simple Name Signature to String params2 i if simple Name1 equals simple Name2 return false return true return false  areSimilarMethods simpleNames1 params1Length params1Length params1Length simpleName1 simpleNames1 getSimpleName toString simpleNames1 simpleName2 getSimpleName toString simpleName1 simpleName2
Converts a field constant from the compiler s representation to the Java Model constant representation Number or String protected static Object convert Constant Constant constant if constant null return null if constant Constant NotA Constant return null switch constant typeID case Type Ids T boolean return constant boolean Value Boolean TRUE Boolean FALSE case Type Ids T byte return new Byte constant byte Value case Type Ids T char return new Character constant char Value case Type Ids T double return new Double constant double Value case Type Ids T float return new Float constant float Value case Type Ids T int return new Integer constant int Value case Type Ids T long return new Long constant long Value case Type Ids T short return new Short constant short Value case Type Ids T String return constant string Value default return null  convertConstant NotAConstant TypeIds T_boolean booleanValue TypeIds T_byte byteValue TypeIds T_char charValue TypeIds T_double doubleValue TypeIds T_float floatValue TypeIds T_int intValue TypeIds T_long longValue TypeIds T_short shortValue TypeIds T_String stringValue
see Java Element equalsDOM Node deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected boolean equalsDOM Node IDOM Node node return get Element Name equals node get Name  JavaElement equalsDOMNode equalsDOMNode IDOMNode getElementName getName
protected I Method find Methods I Method method I Method methods String element Name method get Element Name String parameters method get Parameter Types int param Length parameters length String simple Names new String param Length for int i 0 i param Length i simple Names i Signature get Simple Name Signature to String parameters i Array List list new Array List next for int i 0 length methods length i length i I Method existing Method methods i if this are Similar Methods element Name parameters existing Method get Element Name existing Method get Parameter Types simple Names list add existing Method int size list size if size 0 return null else I Method result new I Method size list to Array result return result  IMethod findMethods IMethod IMethod elementName getElementName getParameterTypes paramLength simpleNames paramLength paramLength simpleNames getSimpleName toString ArrayList ArrayList IMethod existingMethod areSimilarMethods elementName existingMethod getElementName existingMethod getParameterTypes simpleNames existingMethod IMethod IMethod toArray
see I Member public I Class File get Class File return Java Element get Parent get Class File  IMember IClassFile getClassFile JavaElement getParent getClassFile
see I Member public I Type get Declaring Type Java Element parent Element Java Element get Parent if parent Element get Element Type TYPE return I Type parent Element return null  IMember IType getDeclaringType JavaElement parentElement JavaElement getParent parentElement getElementType IType parentElement
see I Member public int get Flags throws Java Model Exception Member Element Info info Member Element Info get Element Info return info get Modifiers  IMember getFlags JavaModelException MemberElementInfo MemberElementInfo getElementInfo getModifiers
public I Java Element get Handle From Memento String token Memento Tokenizer memento Working Copy Owner working Copy Owner switch token char At 0 case JEM COUNT return get Handle Updating Count From Memento memento working Copy Owner case JEM TYPE String type Name if memento has More Tokens type Name memento next Token char first Char type Name char At 0 if first Char JEM FIELD first Char JEM INITIALIZER first Char JEM METHOD first Char JEM TYPE first Char JEM COUNT token type Name type Name NON NLS 1 else token null else type Name NON NLS 1 token null Java Element type Java Element get Type type Name 1 if token null return type get Handle From Memento memento working Copy Owner else return type get Handle From Memento token memento working Copy Owner case JEM LOCALVARIABLE String var Name memento next Token memento next Token JEM COUNT int declaration Start Integer parse Int memento next Token memento next Token JEM COUNT int declaration End Integer parse Int memento next Token memento next Token JEM COUNT int name Start Integer parse Int memento next Token memento next Token JEM COUNT int name End Integer parse Int memento next Token memento next Token JEM COUNT String type Signature memento next Token return new Local Variable this var Name declaration Start declaration End name Start name End type Signature return null  IJavaElement getHandleFromMemento MementoTokenizer WorkingCopyOwner workingCopyOwner charAt JEM_COUNT getHandleUpdatingCountFromMemento workingCopyOwner JEM_TYPE typeName hasMoreTokens typeName nextToken firstChar typeName charAt firstChar JEM_FIELD firstChar JEM_INITIALIZER firstChar JEM_METHOD firstChar JEM_TYPE firstChar JEM_COUNT typeName typeName typeName JavaElement JavaElement getType typeName getHandleFromMemento workingCopyOwner getHandleFromMemento workingCopyOwner JEM_LOCALVARIABLE varName nextToken nextToken JEM_COUNT declarationStart parseInt nextToken nextToken JEM_COUNT declarationEnd parseInt nextToken nextToken JEM_COUNT nameStart parseInt nextToken nextToken JEM_COUNT nameEnd parseInt nextToken nextToken JEM_COUNT typeSignature nextToken LocalVariable varName declarationStart declarationEnd nameStart nameEnd typeSignature
see Java Element get Handle Memento protected char get Handle Memento Delimiter return Java Element JEM TYPE  JavaElement getHandleMemento getHandleMementoDelimiter JavaElement JEM_TYPE
public Member get Outer Most Local Context I Java Element current this Member last Local Context null parent Loop while true switch current get Element Type case CLASS FILE case COMPILATION UNIT break parent Loop done recursing case TYPE cannot be a local context break case INITIALIZER case FIELD case METHOD these elements can define local members last Local Context Member current break current current get Parent return last Local Context  getOuterMostLocalContext IJavaElement lastLocalContext parentLoop getElementType CLASS_FILE COMPILATION_UNIT parentLoop lastLocalContext getParent lastLocalContext
see I Member public I Source Range get Name Range throws Java Model Exception Member Element Info info Member Element Info get Element Info return new Source Range info get Name Source Start info get Name Source End info get Name Source Start 1  IMember ISourceRange getNameRange JavaModelException MemberElementInfo MemberElementInfo getElementInfo SourceRange getNameSourceStart getNameSourceEnd getNameSourceStart
see I Member public I Type get Type String type Name int count if is Binary throw new Illegal Argument Exception Not a source member to String With Ancestors NON NLS 1 else Source Type type new Source Type this type Name type occurrence Count count return type  IMember IType getType typeName isBinary IllegalArgumentException toStringWithAncestors SourceType SourceType typeName occurrenceCount
see I Member public boolean is Binary return false  IMember isBinary
protected boolean is Main Method I Method method throws Java Model Exception if main equals method get Element Name Signature SIG VOID equals method get Return Type NON NLS 1 int flags method get Flags if Flags is Static flags Flags is Public flags String param Types method get Parameter Types if param Types length 1 String type Signature Signature to String param Types 0 return String equals Signature get Simple Name type Signature NON NLS 1 return false  isMainMethod IMethod JavaModelException getElementName SIG_VOID getReturnType getFlags isStatic isPublic paramTypes getParameterTypes paramTypes typeSignature toString paramTypes getSimpleName typeSignature
see I Java Element public boolean is Read Only return get Class File null  IJavaElement isReadOnly getClassFile
public String readable Name I Java Element declaring Type get Declaring Type if declaring Type null String declaring Name Java Element get Declaring Type readable Name String Buffer buffer new String Buffer declaring Name buffer append buffer append this get Element Name return buffer to String else return super readable Name  readableName IJavaElement declaringType getDeclaringType declaringType declaringName JavaElement getDeclaringType readableName StringBuffer StringBuffer declaringName getElementName toString readableName
Updates the name range for this element protected void update Name Range int name Start int name End try Member Element Info info Member Element Info get Element Info info set Name Source Start name Start info set Name Source End name End catch Java Model Exception npe return  updateNameRange nameStart nameEnd MemberElementInfo MemberElementInfo getElementInfo setNameSourceStart nameStart setNameSourceEnd nameEnd JavaModelException

protected char name see org eclipse jdt internal compiler env I Generic Type get Modifiers see org eclipse jdt internal compiler env I Generic Method get Modifiers see org eclipse jdt internal compiler env I Generic Field get Modifiers public int get Modifiers return this flags  IGenericType getModifiers IGenericMethod getModifiers IGenericField getModifiers getModifiers
see org eclipse jdt internal compiler env I Source Type get Name public char get Name return this name  ISourceType getName getName
see org eclipse jdt internal compiler env I Source Type get Name Source End see org eclipse jdt internal compiler env I Source Method get Name Source End see org eclipse jdt internal compiler env I Source Field get Name Source End public int get Name Source End return this name End  ISourceType getNameSourceEnd ISourceMethod getNameSourceEnd ISourceField getNameSourceEnd getNameSourceEnd nameEnd
see org eclipse jdt internal compiler env I Source Type get Name Source Start see org eclipse jdt internal compiler env I Source Method get Name Source Start see org eclipse jdt internal compiler env I Source Field get Name Source Start public int get Name Source Start return this name Start  ISourceType getNameSourceStart ISourceMethod getNameSourceStart ISourceField getNameSourceStart getNameSourceStart nameStart
return this name Start protected void set Flags int flags this flags flags  nameStart setFlags
Sets this member s name protected void set Name char name this name name  setName
Sets the last position of this member s name relative to its openable s source buffer protected void set Name Source End int end this name End end  setNameSourceEnd nameEnd
Sets the start position of this member s name relative to its openable s source buffer protected void set Name Source Start int start this name Start start  setNameSourceStart nameStart

Adds the given child handle to its parent s cache of children protected void add To Parent Info Openable child Openable parent Openable child get Parent if parent null parent is Open try Java Element Info info Java Element Info parent get Element Info info add Child child catch Java Model Exception e do nothing we already checked if open  addToParentInfo getParent isOpen JavaElementInfo JavaElementInfo getElementInfo addChild JavaModelException
Closes the given element which removes it from the cache of open elements protected static void close Openable element try element close catch Java Model Exception e do nothing  JavaModelException
Processing for an element that has been added ul li If the element is a project do nothing and do not process children as when a project is created it does not yet have any natures specifically a java nature li If the elemet is not a project process it as added see code basic Element Added code ul protected void element Added Openable element int element Type element get Element Type if element Type I Java Element JAVA PROJECT project add is handled by Java Project configure because when a project is created it does not yet have a java nature add To Parent Info element this projects To Update add element else add To Parent Info element Force the element to be closed as it might have been opened before the resource modification came in and it might have a new child For example in an I Workspace Runnable 1 create a package fragment p using a java model operation 2 open package p 3 add file X java in folder p When the resource delta comes in only the addition of p is notified but the package p is already opened thus its children are not recomputed and it appears empty close element switch element Type case I Java Element PACKAGE FRAGMENT ROOT when a root is added and is on the classpath the project must be updated this projects To Update add element get Java Project break case I Java Element PACKAGE FRAGMENT get rid of package fragment cache Java Project project Java Project element get Java Project project reset Caches break  basicElementAdded elementAdded elementType getElementType elementType IJavaElement JAVA_PROJECT JavaProject addToParentInfo projectsToUpdate addToParentInfo IWorkspaceRunnable elementType IJavaElement PACKAGE_FRAGMENT_ROOT projectsToUpdate getJavaProject IJavaElement PACKAGE_FRAGMENT JavaProject JavaProject getJavaProject resetCaches
Generic processing for elements with changed contents ul li The element is closed such that any subsequent accesses will re open the element reflecting its new structure ul protected void element Changed Openable element close element  elementChanged
Generic processing for a removed element ul li Close the element removing its structure from the cache li Remove the element from its parent s cache of children li Add a REMOVED entry in the delta ul protected void element Removed Openable element if element is Open close element remove From Parent Info element int element Type element get Element Type switch element Type case I Java Element JAVA MODEL Java Model Manager get Java Model Manager get Index Manager reset break case I Java Element JAVA PROJECT Java Model Manager get Java Model Manager remove Per Project Info Java Project element break case I Java Element PACKAGE FRAGMENT ROOT this projects To Update add element get Java Project break case I Java Element PACKAGE FRAGMENT get rid of package fragment cache Java Project project Java Project element get Java Project project reset Caches break  elementRemoved isOpen removeFromParentInfo elementType getElementType elementType IJavaElement JAVA_MODEL JavaModelManager getJavaModelManager getIndexManager IJavaElement JAVA_PROJECT JavaModelManager getJavaModelManager removePerProjectInfo JavaProject IJavaElement PACKAGE_FRAGMENT_ROOT projectsToUpdate getJavaProject IJavaElement PACKAGE_FRAGMENT JavaProject JavaProject getJavaProject resetCaches
Converts a code I Resource Delta code rooted in a code Workspace code into the corresponding set of code I Java Element Delta code rooted in the relevant code Java Model code s public void process Java Delta I Java Element Delta delta if Delta Processor VERBOSE System out println UPDATING Model with Delta Thread current Thread delta NON NLS 1 NON NLS 2 NON NLS 3 try this traverse Delta delta null null traverse delta update package fragment roots of projects that were affected Iterator iterator this projects To Update iterator while iterator has Next Java Project project Java Project iterator next project update Package Fragment Roots finally this projects To Update new Hash Set  IResourceDelta IJavaElementDelta JavaModel processJavaDelta IJavaElementDelta DeltaProcessor currentThread traverseDelta projectsToUpdate hasNext JavaProject JavaProject updatePackageFragmentRoots projectsToUpdate HashSet
Removes the given element from its parents cache of children If the element does not have a parent or the parent is not currently open this has no effect protected void remove From Parent Info Openable child Openable parent Openable child get Parent if parent null parent is Open try Java Element Info info Java Element Info parent get Element Info info remove Child child catch Java Model Exception e do nothing we already checked if open  removeFromParentInfo getParent isOpen JavaElementInfo JavaElementInfo getElementInfo removeChild JavaModelException
Converts an code I Resource Delta code and its children into the corresponding code I Java Element Delta code s Return whether the delta corresponds to a resource on the classpath If it is not a resource on the classpath it will be added as a non java resource by the sender of this method protected void traverse Delta I Java Element Delta delta I Package Fragment Root root I Java Project project boolean process Children true Openable element Openable delta get Element switch element get Element Type case I Java Element JAVA PROJECT project I Java Project element break case I Java Element PACKAGE FRAGMENT ROOT root I Package Fragment Root element break case I Java Element COMPILATION UNIT filter out working copies that are not primary we don t want to add remove them to from the package fragment Compilation Unit cu Compilation Unit element if cu is Working Copy cu is Primary return case I Java Element CLASS FILE process Children false break switch delta get Kind case I Java Element Delta ADDED element Added element break case I Java Element Delta REMOVED element Removed element break case I Java Element Delta CHANGED if delta get Flags I Java Element Delta F CONTENT 0 element Changed element break if process Children I Java Element Delta children delta get Affected Children for int i 0 i children length i I Java Element Delta child Delta children i this traverse Delta child Delta root project  IResourceDelta IJavaElementDelta traverseDelta IJavaElementDelta IPackageFragmentRoot IJavaProject processChildren getElement getElementType IJavaElement JAVA_PROJECT IJavaProject IJavaElement PACKAGE_FRAGMENT_ROOT IPackageFragmentRoot IJavaElement COMPILATION_UNIT CompilationUnit CompilationUnit isWorkingCopy isPrimary IJavaElement CLASS_FILE processChildren getKind IJavaElementDelta elementAdded IJavaElementDelta elementRemoved IJavaElementDelta getFlags IJavaElementDelta F_CONTENT elementChanged processChildren IJavaElementDelta getAffectedChildren IJavaElementDelta childDelta traverseDelta childDelta

public class Move Elements Operation extends Copy Elements Operation When executed this operation will move the given elements to the given containers public Move Elements Operation I Java Element elements To Move I Java Element dest Containers boolean force super elements To Move dest Containers force  MoveElementsOperation CopyElementsOperation MoveElementsOperation IJavaElement elementsToMove IJavaElement destContainers elementsToMove destContainers
Returns the code String code to use as the main task name for progress monitoring protected String get Main Task Name return Util bind operation move Element Progress NON NLS 1  getMainTaskName moveElementProgress
see Copy Elements Operation is Move protected boolean is Move return true  CopyElementsOperation isMove isMove

protected void rename Entry In Classpath I Path root Path I Java Project project throws Java Model Exception I Classpath Entry classpath project get Raw Classpath I Classpath Entry new Classpath null int cp Length classpath length int newCP Index 1 for int i 0 i cp Length i I Classpath Entry entry classpath i I Path entry Path entry get Path if root Path equals entry Path rename entry if new Classpath null new Classpath new I Classpath Entry cp Length System arraycopy classpath 0 new Classpath 0 i newCP Index i new Classpath newCP Index copy entry else if this destination equals entry Path remove entry equals to destination if new Classpath null new Classpath new I Classpath Entry cp Length System arraycopy classpath 0 new Classpath 0 i newCP Index i else if new Classpath null new Classpath newCP Index entry if new Classpath null if newCP Index new Classpath length System arraycopy new Classpath 0 new Classpath new I Classpath Entry newCP Index 0 newCP Index project set Raw Classpath new Classpath progress Monitor  renameEntryInClasspath IPath rootPath IJavaProject JavaModelException IClasspathEntry getRawClasspath IClasspathEntry newClasspath cpLength newCPIndex cpLength IClasspathEntry IPath entryPath getPath rootPath entryPath newClasspath newClasspath IClasspathEntry cpLength newClasspath newCPIndex newClasspath newCPIndex entryPath newClasspath newClasspath IClasspathEntry cpLength newClasspath newCPIndex newClasspath newClasspath newCPIndex newClasspath newCPIndex newClasspath newClasspath newClasspath IClasspathEntry newCPIndex newCPIndex setRawClasspath newClasspath progressMonitor
public Move Package Fragment Root Operation I Package Fragment Root root I Path destination int update Resource Flags int update Model Flags I Classpath Entry sibling super root destination update Resource Flags update Model Flags sibling  MovePackageFragmentRootOperation IPackageFragmentRoot IPath updateResourceFlags updateModelFlags IClasspathEntry updateResourceFlags updateModelFlags
protected void execute Operation throws Java Model Exception I Package Fragment Root root I Package Fragment Root this get Element To Process I Classpath Entry root Entry root get Raw Classpath Entry I Workspace Root workspace Root Resources Plugin get Workspace get Root move resource if root is External this update Model Flags I Package Fragment Root NO RESOURCE MODIFICATION 0 move Resource root root Entry workspace Root update refering projects classpath excluding orignating project I Java Project originating Project root get Java Project if this update Model Flags I Package Fragment Root OTHER REFERRING PROJECTS CLASSPATH 0 update Referring Project Classpaths root Entry get Path originating Project boolean is Rename this destination segment 0 equals originating Project get Element Name boolean update Originating this update Model Flags I Package Fragment Root ORIGINATING PROJECT CLASSPATH 0 boolean update Destination this update Model Flags I Package Fragment Root DESTINATION PROJECT CLASSPATH 0 update originating classpath if update Originating if is Rename update Destination rename Entry In Classpath root Entry get Path originating Project else remove Entry From Classpath root Entry get Path originating Project update destination classpath if update Destination if is Rename update Originating add Entry To Classpath root Entry workspace Root else reference has been updated when updating originating project classpath  executeOperation JavaModelException IPackageFragmentRoot IPackageFragmentRoot getElementToProcess IClasspathEntry rootEntry getRawClasspathEntry IWorkspaceRoot workspaceRoot ResourcesPlugin getWorkspace getRoot isExternal updateModelFlags IPackageFragmentRoot NO_RESOURCE_MODIFICATION moveResource rootEntry workspaceRoot IJavaProject originatingProject getJavaProject updateModelFlags IPackageFragmentRoot OTHER_REFERRING_PROJECTS_CLASSPATH updateReferringProjectClasspaths rootEntry getPath originatingProject isRename originatingProject getElementName updateOriginating updateModelFlags IPackageFragmentRoot ORIGINATING_PROJECT_CLASSPATH updateDestination updateModelFlags IPackageFragmentRoot DESTINATION_PROJECT_CLASSPATH updateOriginating isRename updateDestination renameEntryInClasspath rootEntry getPath originatingProject removeEntryFromClasspath rootEntry getPath originatingProject updateDestination isRename updateOriginating addEntryToClasspath rootEntry workspaceRoot
I Resource Proxy Visitor visitor new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception if proxy get Type I Resource FOLDER I Path path proxy request Full Path if prefixes One Of path nested Folders if equals One Of path nested Folders nested source folder return false else folder containing nested source folder I Folder folder dest Folder get Folder path remove First Segments source Segment Count if update Model Flags I Package Fragment Root REPLACE 0 folder exists return true folder create update Resource Flags true progress Monitor return true else subtree doesn t contain any nested source folders I Path dest Path destination append path remove First Segments source Segment Count I Resource dest Res if update Model Flags I Package Fragment Root REPLACE 0 dest Res workspace Root find Member dest Path null dest Res delete update Resource Flags progress Monitor proxy request Resource move dest Path update Resource Flags progress Monitor return false else I Path path proxy request Full Path I Path dest Path destination append path remove First Segments source Segment Count I Resource dest Res if update Model Flags I Package Fragment Root REPLACE 0 dest Res workspace Root find Member dest Path null dest Res delete update Resource Flags progress Monitor proxy request Resource move dest Path update Resource Flags progress Monitor return false  IResourceProxyVisitor IResourceProxyVisitor IResourceProxy CoreException getType IResource IPath requestFullPath prefixesOneOf nestedFolders equalsOneOf nestedFolders IFolder destFolder getFolder removeFirstSegments sourceSegmentCount updateModelFlags IPackageFragmentRoot updateResourceFlags progressMonitor IPath destPath removeFirstSegments sourceSegmentCount IResource destRes updateModelFlags IPackageFragmentRoot destRes workspaceRoot findMember destPath destRes updateResourceFlags progressMonitor requestResource destPath updateResourceFlags progressMonitor IPath requestFullPath IPath destPath removeFirstSegments sourceSegmentCount IResource destRes updateModelFlags IPackageFragmentRoot destRes workspaceRoot findMember destPath destRes updateResourceFlags progressMonitor requestResource destPath updateResourceFlags progressMonitor
protected void move Resource I Package Fragment Root root I Classpath Entry root Entry final I Workspace Root workspace Root throws Java Model Exception final char exclusion Patterns Classpath Entry root Entry full Exclusion Pattern Chars I Resource root Resource root get Resource if root Entry get Entry Kind I Classpath Entry CPE SOURCE exclusion Patterns null try I Resource dest Res if this update Model Flags I Package Fragment Root REPLACE 0 dest Res workspace Root find Member this destination null dest Res delete this update Resource Flags progress Monitor root Resource move this destination this update Resource Flags progress Monitor catch Core Exception e throw new Java Model Exception e else final int source Segment Count root Entry get Path segment Count final I Folder dest Folder workspace Root get Folder this destination final I Path nested Folders get Nested Folders root I Resource Proxy Visitor visitor new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception if proxy get Type I Resource FOLDER I Path path proxy request Full Path if prefixes One Of path nested Folders if equals One Of path nested Folders nested source folder return false else folder containing nested source folder I Folder folder dest Folder get Folder path remove First Segments source Segment Count if update Model Flags I Package Fragment Root REPLACE 0 folder exists return true folder create update Resource Flags true progress Monitor return true else subtree doesn t contain any nested source folders I Path dest Path destination append path remove First Segments source Segment Count I Resource dest Res if update Model Flags I Package Fragment Root REPLACE 0 dest Res workspace Root find Member dest Path null dest Res delete update Resource Flags progress Monitor proxy request Resource move dest Path update Resource Flags progress Monitor return false else I Path path proxy request Full Path I Path dest Path destination append path remove First Segments source Segment Count I Resource dest Res if update Model Flags I Package Fragment Root REPLACE 0 dest Res workspace Root find Member dest Path null dest Res delete update Resource Flags progress Monitor proxy request Resource move dest Path update Resource Flags progress Monitor return false try root Resource accept visitor I Resource NONE catch Core Exception e throw new Java Model Exception e this set Attribute HAS MODIFIED RESOURCE ATTR TRUE  moveResource IPackageFragmentRoot IClasspathEntry rootEntry IWorkspaceRoot workspaceRoot JavaModelException exclusionPatterns ClasspathEntry rootEntry fullExclusionPatternChars IResource rootResource getResource rootEntry getEntryKind IClasspathEntry CPE_SOURCE exclusionPatterns IResource destRes updateModelFlags IPackageFragmentRoot destRes workspaceRoot findMember destRes updateResourceFlags progressMonitor rootResource updateResourceFlags progressMonitor CoreException JavaModelException sourceSegmentCount rootEntry getPath segmentCount IFolder destFolder workspaceRoot getFolder IPath nestedFolders getNestedFolders IResourceProxyVisitor IResourceProxyVisitor IResourceProxy CoreException getType IResource IPath requestFullPath prefixesOneOf nestedFolders equalsOneOf nestedFolders IFolder destFolder getFolder removeFirstSegments sourceSegmentCount updateModelFlags IPackageFragmentRoot updateResourceFlags progressMonitor IPath destPath removeFirstSegments sourceSegmentCount IResource destRes updateModelFlags IPackageFragmentRoot destRes workspaceRoot findMember destPath destRes updateResourceFlags progressMonitor requestResource destPath updateResourceFlags progressMonitor IPath requestFullPath IPath destPath removeFirstSegments sourceSegmentCount IResource destRes updateModelFlags IPackageFragmentRoot destRes workspaceRoot findMember destPath destRes updateResourceFlags progressMonitor requestResource destPath updateResourceFlags progressMonitor rootResource IResource CoreException JavaModelException setAttribute HAS_MODIFIED_RESOURCE_ATTR
protected void update Referring Project Classpaths I Path root Path I Java Project project Of Root throws Java Model Exception I Java Model model this get Java Model I Java Project projects model get Java Projects for int i 0 length projects length i length i I Java Project project projects i if project equals project Of Root continue rename Entry In Classpath root Path project  updateReferringProjectClasspaths IPath rootPath IJavaProject projectOfRoot JavaModelException IJavaModel getJavaModel IJavaProject getJavaProjects IJavaProject projectOfRoot renameEntryInClasspath rootPath
protected void remove Entry From Classpath I Path root Path I Java Project project throws Java Model Exception I Classpath Entry classpath project get Raw Classpath I Classpath Entry new Classpath null int cp Length classpath length int newCP Index 1 for int i 0 i cp Length i I Classpath Entry entry classpath i if root Path equals entry get Path if new Classpath null new Classpath new I Classpath Entry cp Length System arraycopy classpath 0 new Classpath 0 i newCP Index i else if new Classpath null new Classpath newCP Index entry if new Classpath null if newCP Index new Classpath length System arraycopy new Classpath 0 new Classpath new I Classpath Entry newCP Index 0 newCP Index project set Raw Classpath new Classpath progress Monitor  removeEntryFromClasspath IPath rootPath IJavaProject JavaModelException IClasspathEntry getRawClasspath IClasspathEntry newClasspath cpLength newCPIndex cpLength IClasspathEntry rootPath getPath newClasspath newClasspath IClasspathEntry cpLength newClasspath newCPIndex newClasspath newClasspath newCPIndex newClasspath newCPIndex newClasspath newClasspath newClasspath IClasspathEntry newCPIndex newCPIndex setRawClasspath newClasspath progressMonitor

public class Move Resource Elements Operation extends Copy Resource Elements Operation When executed this operation will move the given elements to the given containers public Move Resource Elements Operation I Java Element elements To Move I Java Element dest Containers boolean force super elements To Move dest Containers force  MoveResourceElementsOperation CopyResourceElementsOperation MoveResourceElementsOperation IJavaElement elementsToMove IJavaElement destContainers elementsToMove destContainers
see Multi Operation protected String get Main Task Name return Util bind operation move Resource Progress NON NLS 1  MultiOperation getMainTaskName moveResourceProgress
see Copy Resource Elements Operation is Move protected boolean is Move return true  CopyResourceElementsOperation isMove isMove

protected String renamings List null Creates a new code Multi Operation code on code elements To Process code protected Multi Operation I Java Element elements To Process boolean force super elements To Process force  renamingsList MultiOperation elementsToProcess MultiOperation IJavaElement elementsToProcess elementsToProcess
Creates a new code Multi Operation code protected Multi Operation I Java Element elements To Process I Java Element parent Elements boolean force super elements To Process parent Elements force this new Parents new Hash Map elements To Process length if elements To Process length parent Elements length for int i 0 i elements To Process length i this new Parents put elements To Process i parent Elements i else same destination for all elements to be moved copied renamed for int i 0 i elements To Process length i this new Parents put elements To Process i parent Elements 0  MultiOperation MultiOperation IJavaElement elementsToProcess IJavaElement parentElements elementsToProcess parentElements newParents HashMap elementsToProcess elementsToProcess parentElements elementsToProcess newParents elementsToProcess parentElements elementsToProcess newParents elementsToProcess parentElements
Convenience method to create a code Java Model Exception code embending a code Java Model Status code protected void error int code I Java Element element throws Java Model Exception throw new Java Model Exception new Java Model Status code element  JavaModelException JavaModelStatus IJavaElement JavaModelException JavaModelException JavaModelStatus
Executes the operation exception Java Model Exception if one or several errors occured during the operation If multiple errors occured the corresponding code Java Model Status code is a multi status Otherwise it is a simple one protected void execute Operation throws Java Model Exception process Elements  JavaModelException JavaModelStatus executeOperation JavaModelException processElements
Returns the parent of the element being copied moved renamed protected I Java Element get Destination Parent I Java Element child return I Java Element this new Parents get child  IJavaElement getDestinationParent IJavaElement IJavaElement newParents
return I Java Element this new Parents get child Returns the name to be used by the progress monitor protected abstract String get Main Task Name  IJavaElement newParents getMainTaskName
protected abstract String get Main Task Name Returns the new name for code element code or code null code if there are no renamings specified protected String get New Name For I Java Element element if this renamings null return String this renamings get element else return null  getMainTaskName getNewNameFor IJavaElement
Sets up the renamings hashtable keys are the elements and values are the new name private void initialize Renamings if this renamings List null this renamings List length this elements To Process length this renamings new Hash Map this renamings List length for int i 0 i this renamings List length i if this renamings List i null this renamings put this elements To Process i this renamings List i  initializeRenamings renamingsList renamingsList elementsToProcess HashMap renamingsList renamingsList renamingsList elementsToProcess renamingsList
Returns code true code if this operation represents a move or rename code false code if this operation represents a copy br Note a rename is just a move within the same parent with a name change protected boolean is Move return false  isMove
Returns code true code if this operation represents a rename code false code if this operation represents a copy or move protected boolean is Rename return false  isRename
Subclasses must implement this method to process a given code I Java Element code protected abstract void process Element I Java Element element throws Java Model Exception  IJavaElement processElement IJavaElement JavaModelException
protected abstract void process Element I Java Element element throws Java Model Exception Processes all the code I Java Element code s in turn collecting errors and updating the progress monitor exception Java Model Exception if one or several operation s was unable to be completed protected void process Elements throws Java Model Exception begin Task get Main Task Name this elements To Process length I Java Model Status errors new I Java Model Status 3 int errors Counter 0 for int i 0 i this elements To Process length i try verify this elements To Process i process Element this elements To Process i catch Java Model Exception jme if errors Counter errors length resize System arraycopy errors 0 errors new I Java Model Status errors Counter 2 0 errors Counter errors errors Counter jme get Java Model Status finally worked 1 done if errors Counter 1 throw new Java Model Exception errors 0 else if errors Counter 1 if errors Counter errors length resize System arraycopy errors 0 errors new I Java Model Status errors Counter 0 errors Counter throw new Java Model Exception Java Model Status new Multi Status errors  processElement IJavaElement JavaModelException IJavaElement JavaModelException processElements JavaModelException beginTask getMainTaskName elementsToProcess IJavaModelStatus IJavaModelStatus errorsCounter elementsToProcess elementsToProcess processElement elementsToProcess JavaModelException errorsCounter IJavaModelStatus errorsCounter errorsCounter errorsCounter getJavaModelStatus errorsCounter JavaModelException errorsCounter errorsCounter IJavaModelStatus errorsCounter errorsCounter JavaModelException JavaModelStatus newMultiStatus
Sets the insertion position in the new container for the modified element The element being modified will be inserted before the specified new sibling The given sibling must be a child of the destination container specified for the modified element The default is code null code which indicates that the element is to be inserted at the end of the container public void set Insert Before I Java Element modified Element I Java Element new Sibling this insert Before Elements put modified Element new Sibling  setInsertBefore IJavaElement modifiedElement IJavaElement newSibling insertBeforeElements modifiedElement newSibling
Sets the new names to use for each element being copied The renamings correspond to the elements being processed and the number of renamings must match the number of elements being processed A code null code entry in the list indicates that an element is not to be renamed p Note that some renamings may not be used If both a parent and a child have been selected for copy move only the parent is changed Therefore if a new name is specified for the child the child s name will not be changed public void set Renamings String renamings List this renamings List renamings List initialize Renamings  setRenamings renamingsList renamingsList renamingsList initializeRenamings
This method is called for each code I Java Element code before code process Element code It should check that this code element code can be processed  IJavaElement processElement
protected abstract void verify I Java Element element throws Java Model Exception Verifies that the code destination code specified for the code element code is valid for the types of the code element code and code destination code protected void verify Destination I Java Element element I Java Element destination throws Java Model Exception if destination null destination exists error I Java Model Status Constants ELEMENT DOES NOT EXIST destination int dest Type destination get Element Type switch element get Element Type case I Java Element PACKAGE DECLARATION case I Java Element IMPORT DECLARATION if dest Type I Java Element COMPILATION UNIT error I Java Model Status Constants INVALID DESTINATION element break case I Java Element TYPE if dest Type I Java Element COMPILATION UNIT dest Type I Java Element TYPE error I Java Model Status Constants INVALID DESTINATION element break case I Java Element METHOD case I Java Element FIELD case I Java Element INITIALIZER if dest Type I Java Element TYPE destination instanceof Binary Type error I Java Model Status Constants INVALID DESTINATION element break case I Java Element COMPILATION UNIT if dest Type I Java Element PACKAGE FRAGMENT error I Java Model Status Constants INVALID DESTINATION element else Compilation Unit cu Compilation Unit element if is Move cu is Working Copy cu is Primary error I Java Model Status Constants INVALID ELEMENT TYPES element break case I Java Element PACKAGE FRAGMENT I Package Fragment fragment I Package Fragment element I Java Element parent fragment get Parent if parent is Read Only error I Java Model Status Constants READ ONLY element else if dest Type I Java Element PACKAGE FRAGMENT ROOT error I Java Model Status Constants INVALID DESTINATION element break default error I Java Model Status Constants INVALID ELEMENT TYPES element  IJavaElement JavaModelException verifyDestination IJavaElement IJavaElement JavaModelException IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST destType getElementType getElementType IJavaElement PACKAGE_DECLARATION IJavaElement IMPORT_DECLARATION destType IJavaElement COMPILATION_UNIT IJavaModelStatusConstants INVALID_DESTINATION IJavaElement destType IJavaElement COMPILATION_UNIT destType IJavaElement IJavaModelStatusConstants INVALID_DESTINATION IJavaElement IJavaElement IJavaElement destType IJavaElement BinaryType IJavaModelStatusConstants INVALID_DESTINATION IJavaElement COMPILATION_UNIT destType IJavaElement PACKAGE_FRAGMENT IJavaModelStatusConstants INVALID_DESTINATION CompilationUnit CompilationUnit isMove isWorkingCopy isPrimary IJavaModelStatusConstants INVALID_ELEMENT_TYPES IJavaElement PACKAGE_FRAGMENT IPackageFragment IPackageFragment IJavaElement getParent isReadOnly IJavaModelStatusConstants READ_ONLY destType IJavaElement PACKAGE_FRAGMENT_ROOT IJavaModelStatusConstants INVALID_DESTINATION IJavaModelStatusConstants INVALID_ELEMENT_TYPES
Verify that the new name specified for code element code is valid for that type of Java element protected void verify Renaming I Java Element element throws Java Model Exception String new Name get New Name For element boolean is Valid true switch element get Element Type case I Java Element PACKAGE FRAGMENT if element get Element Name equals I Package Fragment DEFAULT PACKAGE NAME don t allow renaming of default package see PR 1G47GUM throw new Java Model Exception new Java Model Status I Java Model Status Constants NAME COLLISION element is Valid Java Conventions validate Package Name new Name get Severity I Status ERROR break case I Java Element COMPILATION UNIT is Valid Java Conventions validate Compilation Unit Name new Name get Severity I Status ERROR break case I Java Element INITIALIZER is Valid false cannot rename initializers break default is Valid Java Conventions validate Identifier new Name get Severity I Status ERROR break if is Valid throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID NAME element new Name  verifyRenaming IJavaElement JavaModelException newName getNewNameFor isValid getElementType IJavaElement PACKAGE_FRAGMENT getElementName IPackageFragment DEFAULT_PACKAGE_NAME JavaModelException JavaModelStatus IJavaModelStatusConstants NAME_COLLISION isValid JavaConventions validatePackageName newName getSeverity IStatus IJavaElement COMPILATION_UNIT isValid JavaConventions validateCompilationUnitName newName getSeverity IStatus IJavaElement isValid isValid JavaConventions validateIdentifier newName getSeverity IStatus isValid JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_NAME newName
Verifies that the positioning sibling specified for the code element code is exists and its parent is the destination container of this code element code protected void verify Sibling I Java Element element I Java Element destination throws Java Model Exception I Java Element insert Before Element I Java Element this insert Before Elements get element if insert Before Element null if insert Before Element exists insert Before Element get Parent equals destination error I Java Model Status Constants INVALID SIBLING insert Before Element  verifySibling IJavaElement IJavaElement JavaModelException IJavaElement insertBeforeElement IJavaElement insertBeforeElements insertBeforeElement insertBeforeElement insertBeforeElement getParent IJavaModelStatusConstants INVALID_SIBLING insertBeforeElement

public Name Lookup I Package Fragment Root package Fragment Roots Hash Map package Fragments I Compilation Unit working Copies this package Fragment Roots package Fragment Roots this package Fragments package Fragments if working Copies null this units To Look Inside new Hash Map for int i 0 length working Copies length i length i I Compilation Unit unit To Look Inside working Copies i I Compilation Unit original unit To Look Inside get Primary this units To Look Inside put original unit To Look Inside  NameLookup IPackageFragmentRoot packageFragmentRoots HashMap packageFragments ICompilationUnit workingCopies packageFragmentRoots packageFragmentRoots packageFragments packageFragments workingCopies unitsToLookInside HashMap workingCopies ICompilationUnit unitToLookInside workingCopies ICompilationUnit unitToLookInside getPrimary unitsToLookInside unitToLookInside
Returns true if ul li the given type is an existing class and the flag s code ACCEPT CLASSES code bit is on li the given type is an existing interface and the code ACCEPT INTERFACES code bit is on li neither the code ACCEPT CLASSES code or code ACCEPT INTERFACES code bit is on ul Otherwise false is returned protected boolean accept Type I Type type int accept Flags if accept Flags 0 return true no flags always accepted try if type is Class return accept Flags ACCEPT CLASSES 0 else return accept Flags ACCEPT INTERFACES 0 catch Java Model Exception npe return false the class is not present do not accept  ACCEPT_CLASSES ACCEPT_INTERFACES ACCEPT_CLASSES ACCEPT_INTERFACES acceptType IType acceptFlags acceptFlags isClass acceptFlags ACCEPT_CLASSES acceptFlags ACCEPT_INTERFACES JavaModelException
Finds every type in the project whose simple name matches the prefix informing the requestor of each hit The requestor is polled for cancellation at regular intervals p The code partial Match code argument indicates partial matches should be considered private void find All Types String prefix boolean partial Match int accept Flags I Java Element Requestor requestor int count this package Fragment Roots length for int i 0 i count i if requestor is Canceled return I Package Fragment Root root this package Fragment Roots i I Java Element packages null try packages root get Children catch Java Model Exception npe continue the root is not present continue if packages null for int j 0 package Count packages length j package Count j if requestor is Canceled return seek Types prefix I Package Fragment packages j partial Match accept Flags requestor  partialMatch findAllTypes partialMatch acceptFlags IJavaElementRequestor packageFragmentRoots isCanceled IPackageFragmentRoot packageFragmentRoots IJavaElement getChildren JavaModelException packageCount packageCount isCanceled seekTypes IPackageFragment partialMatch acceptFlags
Returns the code I Compilation Unit code which defines the type named code qualified Type Name code or code null code if none exists The domain of the search is bounded by the classpath of the code I Java Project code this code Name Lookup code was obtained from p The name must be fully qualified eg java lang Object java util Hashtable Entry public I Compilation Unit find Compilation Unit String qualified Type Name String pkg Name I Package Fragment DEFAULT PACKAGE NAME String cu Name qualified Type Name int index qualified Type Name last Index Of if index 1 pkg Name qualified Type Name substring 0 index cu Name qualified Type Name substring index 1 index cu Name index Of if index 1 cu Name cu Name substring 0 index cu Name SUFFIX STRING java I Package Fragment frags I Package Fragment this package Fragments get pkg Name if frags null for int i 0 i frags length i I Package Fragment frag frags i if frag instanceof Jar Package Fragment I Compilation Unit cu frag get Compilation Unit cu Name if cu null cu exists return cu return null  ICompilationUnit qualifiedTypeName IJavaProject NameLookup ICompilationUnit findCompilationUnit qualifiedTypeName pkgName IPackageFragment DEFAULT_PACKAGE_NAME cuName qualifiedTypeName qualifiedTypeName lastIndexOf pkgName qualifiedTypeName cuName qualifiedTypeName cuName indexOf cuName cuName cuName SUFFIX_STRING_java IPackageFragment IPackageFragment packageFragments pkgName IPackageFragment JarPackageFragment ICompilationUnit getCompilationUnit cuName
Returns the package fragment whose path matches the given absolute path or code null code if none exist The domain of the search is bounded by the classpath of the code I Java Project code this code Name Lookup code was obtained from The path can be internal to the workbench Project src external to the workbench c jdk classes zip java lang public I Package Fragment find Package Fragment I Path path if path is Absolute throw new Illegal Argument Exception Util bind path must Be Absolute NON NLS 1 this code should rather use the package fragment map to find the candidate package then check if the respective enclosing root maps to the one on this given I Path I Resource possible Fragment Resources Plugin get Workspace get Root find Member path if possible Fragment null external jar for int i 0 i this package Fragment Roots length i I Package Fragment Root root this package Fragment Roots i if root is External continue I Path root Path root get Path int matching Count root Path matching First Segments path if matching Count 0 String name path toOS String 1 is for the File separator Char name name substring root Path toOS String length 1 name length name name replace File separator Char I Java Element list null try list root get Children catch Java Model Exception npe continue the package fragment root is not present int element Count list length for int j 0 j element Count j I Package Fragment package Fragment I Package Fragment list j if name Matches name package Fragment false return package Fragment else I Java Element from Factory Java Core create possible Fragment if from Factory null return null switch from Factory get Element Type case I Java Element PACKAGE FRAGMENT return I Package Fragment from Factory case I Java Element JAVA PROJECT default package in a default root Java Project project Java Project from Factory try I Classpath Entry entry project get Classpath Entry For path if entry null I Package Fragment Root root project get Package Fragment Root project get Resource I Package Fragment pkgs I Package Fragment this package Fragments get I Package Fragment DEFAULT PACKAGE NAME if pkgs null return null for int i 0 i pkgs length i if pkgs i get Parent equals root return pkgs i catch Java Model Exception e return null return null case I Java Element PACKAGE FRAGMENT ROOT return I Package Fragment Root from Factory get Package Fragment I Package Fragment DEFAULT PACKAGE NAME return null  IJavaProject NameLookup IPackageFragment findPackageFragment IPath isAbsolute IllegalArgumentException mustBeAbsolute IPath IResource possibleFragment ResourcesPlugin getWorkspace getRoot findMember possibleFragment packageFragmentRoots IPackageFragmentRoot packageFragmentRoots isExternal IPath rootPath getPath matchingCount rootPath matchingFirstSegments matchingCount toOSString separatorChar rootPath toOSString separatorChar IJavaElement getChildren JavaModelException elementCount elementCount IPackageFragment packageFragment IPackageFragment nameMatches packageFragment packageFragment IJavaElement fromFactory JavaCore possibleFragment fromFactory fromFactory getElementType IJavaElement PACKAGE_FRAGMENT IPackageFragment fromFactory IJavaElement JAVA_PROJECT JavaProject JavaProject fromFactory IClasspathEntry getClasspathEntryFor IPackageFragmentRoot getPackageFragmentRoot getResource IPackageFragment IPackageFragment packageFragments IPackageFragment DEFAULT_PACKAGE_NAME getParent JavaModelException IJavaElement PACKAGE_FRAGMENT_ROOT IPackageFragmentRoot fromFactory getPackageFragment IPackageFragment DEFAULT_PACKAGE_NAME
Returns the package fragments whose name matches the given qualified name or code null code if none exist The name can be empty qualified pack pack1 pack2 param partial Match partial name matches qualify when code true code only exact name matches qualify when code false code public I Package Fragment find Package Fragments String name boolean partial Match int count this package Fragment Roots length if partial Match name name to Lower Case for int i 0 i count i I Package Fragment Root root this package Fragment Roots i I Java Element list null try list root get Children catch Java Model Exception npe continue the package fragment root is not present int element Count list length I Package Fragment result new I Package Fragment element Count int result Length 0 for int j 0 j element Count j I Package Fragment package Fragment I Package Fragment list j if name Matches name package Fragment true result result Length package Fragment if result Length 0 System arraycopy result 0 result new I Package Fragment result Length 0 result Length return result else return null else I Package Fragment fragments I Package Fragment this package Fragments get name if fragments null I Package Fragment result new I Package Fragment fragments length int result Length 0 for int i 0 i fragments length i I Package Fragment package Fragment fragments i result result Length package Fragment if result Length 0 System arraycopy result 0 result new I Package Fragment result Length 0 result Length return result else return null return null  partialMatch IPackageFragment findPackageFragments partialMatch packageFragmentRoots partialMatch toLowerCase IPackageFragmentRoot packageFragmentRoots IJavaElement getChildren JavaModelException elementCount IPackageFragment IPackageFragment elementCount resultLength elementCount IPackageFragment packageFragment IPackageFragment nameMatches packageFragment resultLength packageFragment resultLength IPackageFragment resultLength resultLength IPackageFragment IPackageFragment packageFragments IPackageFragment IPackageFragment resultLength IPackageFragment packageFragment resultLength packageFragment resultLength IPackageFragment resultLength resultLength
public I Type find Type String type Name String package Name boolean partial Match int accept Flags if package Name null package Name length 0 package Name I Package Fragment DEFAULT PACKAGE NAME else if type Name length 0 Character is Lower Case type Name char At 0 see if this is a known package and not a type if find Package Fragments package Name type Name false null return null NON NLS 1 Java Element Requestor element Requestor new Java Element Requestor seek Package Fragments package Name false element Requestor I Package Fragment packages element Requestor get Package Fragments for int i 0 length packages length i length i I Type type find Type type Name packages i partial Match accept Flags if type null return type return null  IType findType typeName packageName partialMatch acceptFlags packageName packageName packageName IPackageFragment DEFAULT_PACKAGE_NAME typeName isLowerCase typeName charAt findPackageFragments packageName typeName JavaElementRequestor elementRequestor JavaElementRequestor seekPackageFragments packageName elementRequestor IPackageFragment elementRequestor getPackageFragments IType findType typeName partialMatch acceptFlags
Returns the first type in the given package whose name matches the given unqualified name or code null code if none exist Specifying a code null code package will result in no matches The domain of the search is bounded by the Java project from which this name lookup was obtained param name the name of the type to find param pkg the package to search param partial Match partial name matches qualify when code true code only exact name matches qualify when code false code param accept Flags a bit mask describing if classes interfaces or both classes and interfaces are desired results If no flags are specified all types are returned see ACCEPT CLASSES see ACCEPT INTERFACES public I Type find Type String name I Package Fragment pkg boolean partial Match int accept Flags if pkg null return null Return first found ignore duplicates Single Type Requestor type Requestor new Single Type Requestor seek Types name pkg partial Match accept Flags type Requestor I Type type type Requestor get Type if type null type find Secondary Type name pkg partial Match accept Flags return type  partialMatch acceptFlags ACCEPT_CLASSES ACCEPT_INTERFACES IType findType IPackageFragment partialMatch acceptFlags SingleTypeRequestor typeRequestor SingleTypeRequestor seekTypes partialMatch acceptFlags typeRequestor IType typeRequestor getType findSecondaryType partialMatch acceptFlags
I Type Name Requestor name Requestor new I Type Name Requestor public void accept Class char package Name char simple Type Name char enclosing Type Names String path if accept Flags ACCEPT CLASSES 0 if enclosing Type Names null enclosing Type Names length 0 accept only top level types paths add path  ITypeNameRequestor nameRequestor ITypeNameRequestor acceptClass packageName simpleTypeName enclosingTypeNames acceptFlags ACCEPT_CLASSES enclosingTypeNames enclosingTypeNames
public void accept Interface char package Name char simple Type Name char enclosing Type Names String path if accept Flags ACCEPT INTERFACES 0 if enclosing Type Names null enclosing Type Names length 0 accept only top level types paths add path  acceptInterface packageName simpleTypeName enclosingTypeNames acceptFlags ACCEPT_INTERFACES enclosingTypeNames enclosingTypeNames
TODO kent enable once index support is in I Type find Secondary Type String type Name I Package Fragment pkg boolean partial Match final int accept Flags try final Array List paths new Array List I Type Name Requestor name Requestor new I Type Name Requestor public void accept Class char package Name char simple Type Name char enclosing Type Names String path if accept Flags ACCEPT CLASSES 0 if enclosing Type Names null enclosing Type Names length 0 accept only top level types paths add path public void accept Interface char package Name char simple Type Name char enclosing Type Names String path if accept Flags ACCEPT INTERFACES 0 if enclosing Type Names null enclosing Type Names length 0 accept only top level types paths add path int match Mode partial Match Search Pattern R PREFIX MATCH Search Pattern R EXACT MATCH int match Rule partial Match match Mode Search Pattern R CASE SENSITIVE match Mode new Search Engine search All Type Names pkg get Element Name to Char Array type Name to Char Array match Rule I Java Search Constants TYPE Search Engine create Java Search Scope new I Java Element pkg false name Requestor I Java Search Constants CANCEL IF NOT READY TO SEARCH null if paths is Empty I Workspace workspace Resources Plugin get Workspace for int i 0 l paths size i l i String pathname String paths get i if org eclipse jdt internal compiler util Util is Java File Name pathname I File file workspace get Root get File new Path pathname I Compilation Unit unit Java Core create Compilation Unit From file return unit get Type type Name catch Java Model Exception e ignore catch Operation Canceled Exception ignore ignore return null  IType findSecondaryType typeName IPackageFragment partialMatch acceptFlags ArrayList ArrayList ITypeNameRequestor nameRequestor ITypeNameRequestor acceptClass packageName simpleTypeName enclosingTypeNames acceptFlags ACCEPT_CLASSES enclosingTypeNames enclosingTypeNames acceptInterface packageName simpleTypeName enclosingTypeNames acceptFlags ACCEPT_INTERFACES enclosingTypeNames enclosingTypeNames matchMode partialMatch SearchPattern R_PREFIX_MATCH SearchPattern R_EXACT_MATCH matchRule partialMatch matchMode SearchPattern R_CASE_SENSITIVE matchMode SearchEngine searchAllTypeNames getElementName toCharArray typeName toCharArray matchRule IJavaSearchConstants SearchEngine createJavaSearchScope IJavaElement nameRequestor IJavaSearchConstants CANCEL_IF_NOT_READY_TO_SEARCH isEmpty IWorkspace ResourcesPlugin getWorkspace isJavaFileName IFile getRoot getFile ICompilationUnit JavaCore createCompilationUnitFrom getType typeName JavaModelException OperationCanceledException
Returns the type specified by the qualified name or code null code if none exist The domain of the search is bounded by the Java project from which this name lookup was obtained param name the name of the type to find param partial Match partial name matches qualify when code true code only exact name matches qualify when code false code param accept Flags a bit mask describing if classes interfaces or both classes and interfaces are desired results If no flags are specified all types are returned see ACCEPT CLASSES see ACCEPT INTERFACES public I Type find Type String name boolean partial Match int accept Flags int index name last Index Of String class Name null package Name null if index 1 package Name I Package Fragment DEFAULT PACKAGE NAME class Name name else package Name name substring 0 index class Name name substring index 1 return find Type class Name package Name partial Match accept Flags  partialMatch acceptFlags ACCEPT_CLASSES ACCEPT_INTERFACES IType findType partialMatch acceptFlags lastIndexOf className packageName packageName IPackageFragment DEFAULT_PACKAGE_NAME className packageName className findType className packageName partialMatch acceptFlags
Returns true if the given element s name matches the specified code search Name code otherwise false p The code partial Match code argument indicates partial matches should be considered NOTE in partial Match mode the case will be ignored and the search Name must already have been lowercased protected boolean name Matches String search Name I Java Element element boolean partial Match if partial Match partial matches are used in completion mode thus case insensitive mode return element get Element Name to Lower Case starts With search Name else return element get Element Name equals search Name  searchName partialMatch partialMatch searchName nameMatches searchName IJavaElement partialMatch partialMatch getElementName toLowerCase startsWith searchName getElementName searchName
Notifies the given requestor of all package fragments with the given name Checks the requestor at regular intervals to see if the requestor has canceled The domain of the search is bounded by the code I Java Project code this code Name Lookup code was obtained from param partial Match partial name matches qualify when code true code only exact name matches qualify when code false code public void seek Package Fragments String name boolean partial Match I Java Element Requestor requestor int count this package Fragment Roots length String match Name partial Match name to Lower Case name for int i 0 i count i if requestor is Canceled return I Package Fragment Root root this package Fragment Roots i I Java Element list null try list root get Children catch Java Model Exception npe continue this root package fragment is not present int element Count list length for int j 0 j element Count j if requestor is Canceled return I Package Fragment package Fragment I Package Fragment list j if name Matches match Name package Fragment partial Match requestor accept Package Fragment package Fragment  IJavaProject NameLookup partialMatch seekPackageFragments partialMatch IJavaElementRequestor packageFragmentRoots matchName partialMatch toLowerCase isCanceled IPackageFragmentRoot packageFragmentRoots IJavaElement getChildren JavaModelException elementCount elementCount isCanceled IPackageFragment packageFragment IPackageFragment nameMatches matchName packageFragment partialMatch acceptPackageFragment packageFragment
Notifies the given requestor of all types classes and interfaces in the given package fragment with the given unqualified name Checks the requestor at regular intervals to see if the requestor has canceled If the given package fragment is code null code all types in the project whose simple name matches the given name are found param name The name to search param pkg The corresponding package fragment param partial Match partial name matches qualify when code true code only exact name matches qualify when code false code param accept Flags a bit mask describing if classes interfaces or both classes and interfaces are desired results If no flags are specified all types are returned param requestor The requestor that collects the result see ACCEPT CLASSES see ACCEPT INTERFACES public void seek Types String name I Package Fragment pkg boolean partial Match int accept Flags I Java Element Requestor requestor String match Name partial Match name to Lower Case name if match Name index Of 0 looks for member type A B match Name match Name replace if pkg null find All Types match Name partial Match accept Flags requestor return I Package Fragment Root root I Package Fragment Root pkg get Parent try int package Flavor root get Kind switch package Flavor case I Package Fragment Root K BINARY seek Types In Binary Package match Name pkg partial Match accept Flags requestor break case I Package Fragment Root K SOURCE seek Types In Source Package match Name pkg partial Match accept Flags requestor break default return catch Java Model Exception e return  partialMatch acceptFlags ACCEPT_CLASSES ACCEPT_INTERFACES seekTypes IPackageFragment partialMatch acceptFlags IJavaElementRequestor matchName partialMatch toLowerCase matchName indexOf matchName matchName findAllTypes matchName partialMatch acceptFlags IPackageFragmentRoot IPackageFragmentRoot getParent packageFlavor getKind packageFlavor IPackageFragmentRoot K_BINARY seekTypesInBinaryPackage matchName partialMatch acceptFlags IPackageFragmentRoot K_SOURCE seekTypesInSourcePackage matchName partialMatch acceptFlags JavaModelException
Performs type search in a binary package protected void seek Types In Binary Package String name I Package Fragment pkg boolean partial Match int accept Flags I Java Element Requestor requestor I Class File class Files null try class Files pkg get Class Files catch Java Model Exception npe return the package is not present int length class Files length String unqualified Name name int index name last Index Of if index 1 the type name of the inner type unqualified Name name substring index 1 name length unqualified Name is empty if the name ends with a sign See http dev eclipse org bugs show bug cgi id 14642 if unqualified Name length 0 Character is Digit unqualified Name char At 0 unqualified Name length 0 unqualified Name name String match Name partial Match name to Lower Case name for int i 0 i length i if requestor is Canceled return I Class File class File class Files i String element Name class File get Element Name if partial Match element Name element Name to Lower Case Must use start With because match Name will never have the extension class and the element Name always will if element Name starts With match Name I Type type null try type class File get Type catch Java Model Exception npe continue the class File is not present if partial Match type get Element Name length 0 Character is Digit type get Element Name char At 0 not an anonymous type if name Matches unqualified Name type partial Match accept Type type accept Flags requestor accept Type type  seekTypesInBinaryPackage IPackageFragment partialMatch acceptFlags IJavaElementRequestor IClassFile classFiles classFiles getClassFiles JavaModelException classFiles unqualifiedName lastIndexOf unqualifiedName unqualifiedName show_bug unqualifiedName isDigit unqualifiedName charAt unqualifiedName unqualifiedName matchName partialMatch toLowerCase isCanceled IClassFile classFile classFiles elementName classFile getElementName partialMatch elementName elementName toLowerCase startWith matchName elementName elementName startsWith matchName IType classFile getType JavaModelException classFile partialMatch getElementName isDigit getElementName charAt nameMatches unqualifiedName partialMatch acceptType acceptFlags acceptType
Performs type search in a source package protected void seek Types In Source Package String name I Package Fragment pkg boolean partial Match int accept Flags I Java Element Requestor requestor I Compilation Unit compilation Units null try compilation Units pkg get Compilation Units catch Java Model Exception npe return the package is not present replace with working copies to look inside int length compilation Units length boolean is Working Copy new boolean length int working Copies Size if this units To Look Inside null working Copies Size this units To Look Inside size 0 Map temp new Hash Map working Copies Size temp put All this units To Look Inside for int i 0 i length i I Compilation Unit unit compilation Units i I Compilation Unit working Copy I Compilation Unit temp remove unit if working Copy null compilation Units i working Copy is Working Copy i true add remaining working copies that belong to this package int index 0 Collection values temp values Iterator iterator values iterator while iterator has Next I Compilation Unit working Copy I Compilation Unit iterator next if pkg equals working Copy get Parent if index 0 int values Length values size index length length values Length System arraycopy compilation Units 0 compilation Units new I Compilation Unit length 0 index System arraycopy is Working Copy 0 is Working Copy new boolean length 0 index is Working Copy index true compilation Units index working Copy if index 0 index length System arraycopy compilation Units 0 compilation Units new I Compilation Unit index 0 index System arraycopy is Working Copy 0 is Working Copy new boolean index 0 index length index String match Name name int index name index Of boolean potential Member Type false String potential Match Name null if index 1 the compilation unit name of the inner type potential Match Name name substring 0 index potential Member Type true In the following match Name will never have the extension java and the compilation Units always will So add it if we re looking for an exact match String unit Name partial Match match Name to Lower Case match Name SUFFIX STRING java String potential Unit Name null if potential Member Type potential Unit Name partial Match potential Match Name to Lower Case potential Match Name SUFFIX STRING java for int i 0 i length i if requestor is Canceled return I Compilation Unit compilation Unit compilation Units i if is Working Copy i potential Member Type name Matches unit Name compilation Unit partial Match I Type types null try types compilation Unit get Types catch Java Model Exception npe continue the compilation unit is not present int type Length types length for int j 0 j type Length j if requestor is Canceled return I Type type types j if name Matches match Name type partial Match if accept Type type accept Flags requestor accept Type type else if potential Member Type name Matches potential Unit Name compilation Unit partial Match I Type types null try types compilation Unit get Types catch Java Model Exception npe continue the compilation unit is not present int type Length types length for int j 0 j type Length j if requestor is Canceled return I Type type types j if name Matches potential Match Name type partial Match seek Qualified Member Types name substring index 1 name length type partial Match requestor accept Flags  seekTypesInSourcePackage IPackageFragment partialMatch acceptFlags IJavaElementRequestor ICompilationUnit compilationUnits compilationUnits getCompilationUnits JavaModelException compilationUnits isWorkingCopy workingCopiesSize unitsToLookInside workingCopiesSize unitsToLookInside HashMap workingCopiesSize putAll unitsToLookInside ICompilationUnit compilationUnits ICompilationUnit workingCopy ICompilationUnit workingCopy compilationUnits workingCopy isWorkingCopy hasNext ICompilationUnit workingCopy ICompilationUnit workingCopy getParent valuesLength valuesLength compilationUnits compilationUnits ICompilationUnit isWorkingCopy isWorkingCopy isWorkingCopy compilationUnits workingCopy compilationUnits compilationUnits ICompilationUnit isWorkingCopy isWorkingCopy matchName indexOf potentialMemberType potentialMatchName potentialMatchName potentialMemberType matchName compilationUnits unitName partialMatch matchName toLowerCase matchName SUFFIX_STRING_java potentialUnitName potentialMemberType potentialUnitName partialMatch potentialMatchName toLowerCase potentialMatchName SUFFIX_STRING_java isCanceled ICompilationUnit compilationUnit compilationUnits isWorkingCopy potentialMemberType nameMatches unitName compilationUnit partialMatch IType compilationUnit getTypes JavaModelException typeLength typeLength isCanceled IType nameMatches matchName partialMatch acceptType acceptFlags acceptType potentialMemberType nameMatches potentialUnitName compilationUnit partialMatch IType compilationUnit getTypes JavaModelException typeLength typeLength isCanceled IType nameMatches potentialMatchName partialMatch seekQualifiedMemberTypes partialMatch acceptFlags
Notifies the given requestor of all types classes and interfaces in the given type with the given possibly qualified name Checks the requestor at regular intervals to see if the requestor has canceled param partial Match partial name matches qualify when code true code only exact name matches qualify when code false code protected void seek Qualified Member Types String qualified Name I Type type boolean partial Match I Java Element Requestor requestor int accept Flags if type null return I Type types null try types type get Types catch Java Model Exception npe return the enclosing type is not present String match Name qualified Name int index qualified Name index Of boolean nested false if index 1 match Name qualified Name substring 0 index nested true int length types length for int i 0 i length i if requestor is Canceled return I Type member Type types i if name Matches match Name member Type partial Match if nested seek Qualified Member Types qualified Name substring index 1 qualified Name length member Type partial Match requestor accept Flags else if accept Type member Type accept Flags requestor accept Member Type member Type  partialMatch seekQualifiedMemberTypes qualifiedName IType partialMatch IJavaElementRequestor acceptFlags IType getTypes JavaModelException matchName qualifiedName qualifiedName indexOf matchName qualifiedName isCanceled IType memberType nameMatches matchName memberType partialMatch seekQualifiedMemberTypes qualifiedName qualifiedName memberType partialMatch acceptFlags acceptType memberType acceptFlags acceptMemberType memberType

public abstract class Openable extends Java Element implements I Openable I Buffer Changed Listener protected Openable Java Element parent String name super parent name  JavaElement IOpenable IBufferChangedListener JavaElement
The buffer associated with this element has changed Registers this element as being out of synch with its buffer s contents If the buffer has been closed this element is set as NOT out of synch with the contents see I Buffer Changed Listener public void buffer Changed Buffer Changed Event event if event get Buffer is Closed Java Model Manager get Java Model Manager get Elements Out Of Synch With Buffers remove this get Buffer Manager remove Buffer event get Buffer else Java Model Manager get Java Model Manager get Elements Out Of Synch With Buffers put this this  IBufferChangedListener bufferChanged BufferChangedEvent getBuffer isClosed JavaModelManager getJavaModelManager getElementsOutOfSynchWithBuffers getBufferManager removeBuffer getBuffer JavaModelManager getJavaModelManager getElementsOutOfSynchWithBuffers
Builds this element s structure and properties in the given info object based on this element s current contents reuse buffer contents if this element has an open buffer or resource contents if this element does not have an open buffer Children are placed in the given new Elements table note this element has already been placed in the new Elements table Returns true if successful or false if an error is encountered while determining the structure of this element  newElements newElements
public boolean can Be Removed From Cache try return has Unsaved Changes catch Java Model Exception e return false  canBeRemovedFromCache hasUnsavedChanges JavaModelException
Returns whether the buffer of this element can be removed from the Java model cache to make space public boolean can Buffer Be Removed From Cache I Buffer buffer return buffer has Unsaved Changes  canBufferBeRemovedFromCache IBuffer hasUnsavedChanges
Close the buffer associated with this element if any protected void close Buffer if has Buffer return nothing to do I Buffer buffer get Buffer Manager get Buffer this if buffer null buffer close buffer remove Buffer Changed Listener this  closeBuffer hasBuffer IBuffer getBufferManager getBuffer removeBufferChangedListener
This element is being closed Do any necessary cleanup protected void closing Object info close Buffer  closeBuffer
protected void code Complete org eclipse jdt internal compiler env I Compilation Unit cu org eclipse jdt internal compiler env I Compilation Unit unit To Skip int position I Completion Requestor requestor Working Copy Owner owner throws Java Model Exception if requestor null throw new Illegal Argument Exception Completion requestor cannot be null NON NLS 1 I Buffer buffer get Buffer if buffer null return if position 1 position buffer get Length throw new Java Model Exception new Java Model Status I Java Model Status Constants INDEX OUT OF BOUNDS Java Project project Java Project get Java Project Searchable Environment environment Searchable Environment project new Searchable Name Environment owner set unit to skip environment unit To Skip unit To Skip code complete Completion Requestor Wrapper requestor Wrapper new Completion Requestor Wrapper requestor environment name Lookup Completion Engine engine new Completion Engine environment requestor Wrapper project get Options true project requestor Wrapper completion Engine engine engine complete cu position 0  codeComplete ICompilationUnit ICompilationUnit unitToSkip ICompletionRequestor WorkingCopyOwner JavaModelException IllegalArgumentException IBuffer getBuffer getLength JavaModelException JavaModelStatus IJavaModelStatusConstants INDEX_OUT_OF_BOUNDS JavaProject JavaProject getJavaProject SearchableEnvironment SearchableEnvironment newSearchableNameEnvironment unitToSkip unitToSkip CompletionRequestorWrapper requestorWrapper CompletionRequestorWrapper nameLookup CompletionEngine CompletionEngine requestorWrapper getOptions requestorWrapper completionEngine
protected I Java Element code Select org eclipse jdt internal compiler env I Compilation Unit cu int offset int length Working Copy Owner owner throws Java Model Exception Java Project project Java Project get Java Project Searchable Environment environment Searchable Environment project new Searchable Name Environment owner Selection Requestor requestor new Selection Requestor environment name Lookup this I Buffer buffer get Buffer if buffer null return requestor get Elements int end buffer get Length if offset 0 length 0 offset length end throw new Java Model Exception new Java Model Status I Java Model Status Constants INDEX OUT OF BOUNDS fix for 1FVXGDK Selection Engine engine new Selection Engine environment requestor project get Options true engine select cu offset offset length 1 return requestor get Elements  IJavaElement codeSelect ICompilationUnit WorkingCopyOwner JavaModelException JavaProject JavaProject getJavaProject SearchableEnvironment SearchableEnvironment newSearchableNameEnvironment SelectionRequestor SelectionRequestor nameLookup IBuffer getBuffer getElements getLength JavaModelException JavaModelStatus IJavaModelStatusConstants INDEX_OUT_OF_BOUNDS SelectionEngine SelectionEngine getOptions getElements
Returns a new element info for this element protected Object create Element Info return new Openable Element Info  createElementInfo OpenableElementInfo
see I Java Element public boolean exists Java Model Manager manager Java Model Manager get Java Model Manager if manager get Info this null return true if parent Exists return false Package Fragment Root root get Package Fragment Root if root null root this root is Archive return resource Exists return super exists  IJavaElement JavaModelManager JavaModelManager getJavaModelManager getInfo parentExists PackageFragmentRoot getPackageFragmentRoot isArchive resourceExists
protected void generate Infos Object info Hash Map new Elements I Progress Monitor monitor throws Java Model Exception if Java Model Manager VERBOSE System out println OPENING Element Thread current Thread this to String With Ancestors NON NLS 1 NON NLS 2 open the parent if necessary open Parent info new Elements monitor if monitor null monitor is Canceled return puts the info before building the structure so that questions to the handle behave as if the element existed case of compilation units becoming working copies new Elements put this info build the structure of the openable this will open the buffer if needed try Openable Element Info openable Element Info Openable Element Info info boolean is Structure Known build Structure openable Element Info monitor new Elements get Resource openable Element Info set Is Structure Known is Structure Known catch Java Model Exception e new Elements remove this throw e remove out of sync buffer for this element Java Model Manager get Java Model Manager get Elements Out Of Synch With Buffers remove this if Java Model Manager VERBOSE System out println Package cache size Java Model Manager get Java Model Manager cache pkg Size NON NLS 1 System out println Openable cache filling ratio Number Format get Instance format Java Model Manager get Java Model Manager cache openable Filling Ratio NON NLS 1 NON NLS 2  generateInfos HashMap newElements IProgressMonitor JavaModelException JavaModelManager currentThread toStringWithAncestors openParent newElements isCanceled newElements OpenableElementInfo openableElementInfo OpenableElementInfo isStructureKnown buildStructure openableElementInfo newElements getResource openableElementInfo setIsStructureKnown isStructureKnown JavaModelException newElements JavaModelManager getJavaModelManager getElementsOutOfSynchWithBuffers JavaModelManager JavaModelManager getJavaModelManager pkgSize NumberFormat getInstance JavaModelManager getJavaModelManager openableFillingRatio
Note a buffer with no unsaved changes can be closed by the Java Model since it has a finite number of buffers allowed open at one time If this is the first time a request is being made for the buffer an attempt is made to create and fill this element s buffer If the buffer has been closed since it was first opened the buffer is re created see I Openable public I Buffer get Buffer throws Java Model Exception if has Buffer ensure element is open Object info get Element Info I Buffer buffer get Buffer Manager get Buffer this if buffer null try to re open a buffer buffer open Buffer null info return buffer else return null  IOpenable IBuffer getBuffer JavaModelException hasBuffer getElementInfo IBuffer getBufferManager getBuffer openBuffer
Answers the buffer factory to use for creating new buffers deprecated public I Buffer Factory get Buffer Factory return get Buffer Manager get Default Buffer Factory  IBufferFactory getBufferFactory getBufferManager getDefaultBufferFactory
Returns the buffer manager for this element protected Buffer Manager get Buffer Manager return Buffer Manager get Default Buffer Manager  BufferManager getBufferManager BufferManager getDefaultBufferManager
Return my underlying resource Elements that may not have a corresponding resource must override this method see I Java Element public I Resource get Corresponding Resource throws Java Model Exception return get Underlying Resource  IJavaElement IResource getCorrespondingResource JavaModelException getUnderlyingResource
see I Java Element public I Openable get Openable return this  IJavaElement IOpenable getOpenable
see I Java Element public I Resource get Underlying Resource throws Java Model Exception I Resource parent Resource this parent get Underlying Resource if parent Resource null return null int type parent Resource get Type if type I Resource FOLDER type I Resource PROJECT I Container folder I Container parent Resource I Resource resource folder find Member this name if resource null throw new Not Present Exception else return resource else return parent Resource  IJavaElement IResource getUnderlyingResource JavaModelException IResource parentResource getUnderlyingResource parentResource parentResource getType IResource IResource IContainer IContainer parentResource IResource findMember newNotPresentException parentResource
Returns true if this element may have an associated source buffer otherwise false Subclasses must override as required protected boolean has Buffer return false  hasBuffer
see I Openable public boolean has Unsaved Changes throws Java Model Exception if is Read Only is Open return false I Buffer buf this get Buffer if buf null buf has Unsaved Changes return true for package fragments package fragment roots and projects must check open buffers to see if they have an child with unsaved changes int element Type get Element Type if element Type PACKAGE FRAGMENT element Type PACKAGE FRAGMENT ROOT element Type JAVA PROJECT element Type JAVA MODEL fix for 1FWNMHH Enumeration open Buffers get Buffer Manager get Open Buffers while open Buffers has More Elements I Buffer buffer I Buffer open Buffers next Element if buffer has Unsaved Changes I Java Element owner I Java Element buffer get Owner if is Ancestor Of owner return true return false  IOpenable hasUnsavedChanges JavaModelException isReadOnly isOpen IBuffer getBuffer hasUnsavedChanges elementType getElementType elementType PACKAGE_FRAGMENT elementType PACKAGE_FRAGMENT_ROOT elementType JAVA_PROJECT elementType JAVA_MODEL openBuffers getBufferManager getOpenBuffers openBuffers hasMoreElements IBuffer IBuffer openBuffers nextElement hasUnsavedChanges IJavaElement IJavaElement getOwner isAncestorOf
Subclasses must override as required see I Openable public boolean is Consistent return true  IOpenable isConsistent
see I Openable public boolean is Open return Java Model Manager get Java Model Manager get Info this null  IOpenable isOpen JavaModelManager getJavaModelManager getInfo
Returns true if this represents a source element Openable source elements have an associated buffer created when they are opened protected boolean is Source Element return false  isSourceElement
see I Openable public void make Consistent I Progress Monitor monitor throws Java Model Exception if is Consistent return create a new info and make it the current info this will remove the info and its children just before storing the new infos Java Model Manager manager Java Model Manager get Java Model Manager boolean had Temporary Cache manager has Temporary Cache try Hash Map new Elements manager get Temporary Cache open When Closed new Elements monitor if new Elements get this null close any buffer that was opened for the new elements Iterator iterator new Elements key Set iterator while iterator has Next I Java Element element I Java Element iterator next if element instanceof Openable Openable element close Buffer throw new Not Present Exception if had Temporary Cache manager put Infos this new Elements finally if had Temporary Cache manager reset Temporary Cache  IOpenable makeConsistent IProgressMonitor JavaModelException isConsistent JavaModelManager JavaModelManager getJavaModelManager hadTemporaryCache hasTemporaryCache HashMap newElements getTemporaryCache openWhenClosed newElements newElements newElements keySet hasNext IJavaElement IJavaElement closeBuffer newNotPresentException hadTemporaryCache putInfos newElements hadTemporaryCache resetTemporaryCache
see I Openable public void open I Progress Monitor pm throws Java Model Exception get Element Info pm  IOpenable IProgressMonitor JavaModelException getElementInfo
Opens a buffer on the contents of this element and returns the buffer or returns code null code if opening fails By default do nothing subclasses that have buffers must override as required protected I Buffer open Buffer I Progress Monitor pm Object info throws Java Model Exception return null  IBuffer openBuffer IProgressMonitor JavaModelException
Open the parent element if necessary protected void open Parent Object child Info Hash Map new Elements I Progress Monitor pm throws Java Model Exception Openable openable Parent Openable get Openable Parent if openable Parent null openable Parent is Open openable Parent generate Infos openable Parent create Element Info new Elements pm  openParent childInfo HashMap newElements IProgressMonitor JavaModelException openableParent getOpenableParent openableParent openableParent isOpen openableParent generateInfos openableParent createElementInfo newElements
Answers true if the parent exists null parent is answering true protected boolean parent Exists I Java Element parent Element get Parent if parent Element null return true return parent Element exists  parentExists IJavaElement parentElement getParent parentElement parentElement
Returns whether the corresponding resource or associated file exists protected boolean resource Exists I Workspace workspace Resources Plugin get Workspace if workspace null return false workaround for http bugs eclipse org bugs show bug cgi id 34069 return Java Model get Target workspace get Root this get Path make Relative ensure path is relative see http dev eclipse org bugs show bug cgi id 22517 true null  resourceExists IWorkspace ResourcesPlugin getWorkspace show_bug JavaModel getTarget getRoot getPath makeRelative show_bug
see I Openable public void save I Progress Monitor pm boolean force throws Java Model Exception if is Read Only throw new Java Model Exception new Java Model Status I Java Model Status Constants READ ONLY this I Buffer buf get Buffer if buf null some Openables like a Java Project don t have a buffer buf save pm force this make Consistent pm update the element info of this element  IOpenable IProgressMonitor JavaModelException isReadOnly JavaModelException JavaModelStatus IJavaModelStatusConstants READ_ONLY IBuffer getBuffer JavaProject makeConsistent
Find enclosing package fragment root if any public Package Fragment Root get Package Fragment Root I Java Element current this do if current instanceof Package Fragment Root return Package Fragment Root current current current get Parent while current null return null  PackageFragmentRoot getPackageFragmentRoot IJavaElement PackageFragmentRoot PackageFragmentRoot getParent
see I Code Assist deprecated use code Complete I Compilation Unit I Compilation Unit int I Completion Requestor instead protected void code Complete org eclipse jdt internal compiler env I Compilation Unit cu org eclipse jdt internal compiler env I Compilation Unit unit To Skip int position final I Code Completion Requestor requestor throws Java Model Exception if requestor null code Complete cu unit To Skip position null Default Working Copy Owner PRIMARY return code Complete cu unit To Skip position new I Completion Requestor public void accept Anonymous Type char super Type Package Name char super Type Name char parameter Package Names char parameter Type Names char parameter Names char completion Name int modifiers int completion Start int completion End int relevance ignore public void accept Class char package Name char class Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Class package Name class Name completion Name modifiers completion Start completion End public void accept Error I Problem error if true return was disabled in 1 0 try I Marker marker Resources Plugin get Workspace get Root create Marker I Java Model Marker TRANSIENT PROBLEM marker set Attribute I Java Model Marker ID error getID marker set Attribute I Marker CHAR START error get Source Start marker set Attribute I Marker CHAR END error get Source End 1 marker set Attribute I Marker LINE NUMBER error get Source Line Number marker set Attribute I Marker MESSAGE error get Message marker set Attribute I Marker SEVERITY I Marker SEVERITY ERROR requestor accept Error marker catch Core Exception e could not create marker ignore public void accept Field char declaring Type Package Name char declaring Type Name char field Name char type Package Name char type Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Field declaring Type Package Name declaring Type Name field Name type Package Name type Name completion Name modifiers completion Start completion End public void accept Interface char package Name char interface Name char completion Name int modifiers int completion Start int completion End int relevance requestor accept Interface package Name interface Name completion Name modifiers completion Start completion End public void accept Keyword char keyword Name int completion Start int completion End int relevance requestor accept Keyword keyword Name completion Start completion End public void accept Label char label Name int completion Start int completion End int relevance requestor accept Label label Name completion Start completion End public void accept Local Variable char local Var Name char type Package Name char type Name int modifiers int completion Start int completion End int relevance ignore public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance skip parameter names requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names return Type Package Name return Type Name completion Name modifiers completion Start completion End public void accept Method Declaration char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance ignore public void accept Modifier char modifier Name int completion Start int completion End int relevance requestor accept Modifier modifier Name completion Start completion End public void accept Package char package Name char completion Name int completion Start int completion End int relevance requestor accept Package package Name completion Name completion Start completion End public void accept Type char package Name char type Name char completion Name int completion Start int completion End int relevance requestor accept Type package Name type Name completion Name completion Start completion End public void accept Variable Name char type Package Name char type Name char var Name char completion Name int completion Start int completion End int relevance ignore Default Working Copy Owner PRIMARY  ICodeAssist codeComplete ICompilationUnit ICompilationUnit ICompletionRequestor codeComplete ICompilationUnit ICompilationUnit unitToSkip ICodeCompletionRequestor JavaModelException codeComplete unitToSkip DefaultWorkingCopyOwner codeComplete unitToSkip ICompletionRequestor acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart completionEnd acceptClass packageName className completionName completionStart completionEnd acceptClass packageName className completionName completionStart completionEnd acceptError IProblem IMarker ResourcesPlugin getWorkspace getRoot createMarker IJavaModelMarker TRANSIENT_PROBLEM setAttribute IJavaModelMarker setAttribute IMarker CHAR_START getSourceStart setAttribute IMarker CHAR_END getSourceEnd setAttribute IMarker LINE_NUMBER getSourceLineNumber setAttribute IMarker getMessage setAttribute IMarker IMarker SEVERITY_ERROR acceptError CoreException acceptField declaringTypePackageName declaringTypeName fieldName typePackageName typeName completionName completionStart completionEnd acceptField declaringTypePackageName declaringTypeName fieldName typePackageName typeName completionName completionStart completionEnd acceptInterface packageName interfaceName completionName completionStart completionEnd acceptInterface packageName interfaceName completionName completionStart completionEnd acceptKeyword keywordName completionStart completionEnd acceptKeyword keywordName completionStart completionEnd acceptLabel labelName completionStart completionEnd acceptLabel labelName completionStart completionEnd acceptLocalVariable localVarName typePackageName typeName completionStart completionEnd acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd acceptModifier modifierName completionStart completionEnd acceptModifier modifierName completionStart completionEnd acceptPackage packageName completionName completionStart completionEnd acceptPackage packageName completionName completionStart completionEnd acceptType packageName typeName completionName completionStart completionEnd acceptType packageName typeName completionName completionStart completionEnd acceptVariableName typePackageName typeName varName completionName completionStart completionEnd DefaultWorkingCopyOwner

protected double f Load Factor 0 333 Creates a OverflowingLRU Cache param size Size limit of cache public OverflowingLRU Cache int size this size 0  fLoadFactor OverflowingLRUCache OverflowingLRUCache
Creates a OverflowingLRU Cache param size Size limit of cache param overflow Size of the overflow public OverflowingLRU Cache int size int overflow super size f Overflow overflow  OverflowingLRUCache OverflowingLRUCache fOverflow
Returns a new cache containing the same contents return New copy of this object public Object clone OverflowingLRU Cache new Cache OverflowingLRU Cache new Instance f Space Limit f Overflow LRU Cache Entry q Entry Preserve order of entries by copying from oldest to newest q Entry this f Entry Queue Tail while q Entry null new Cache private Add q Entry  fKey q Entry  fValue q Entry  fSpace q Entry q Entry  fPrevious return new Cache  OverflowingLRUCache newCache OverflowingLRUCache newInstance fSpaceLimit fOverflow LRUCacheEntry qEntry qEntry fEntryQueueTail qEntry newCache privateAdd qEntry _fKey qEntry _fValue qEntry _fSpace qEntry qEntry _fPrevious newCache
Returns true if the element is successfully closed and removed from the cache otherwise false p NOTE this triggers an external remove from the cache by closing the obejct 
protected abstract boolean close LRU Cache Entry entry Returns an enumerator of the values in the cache with the most recently used first public Enumeration elements if f Entry Queue null return new LRU Cache Enumerator null LRU Cache Enumerator LRU Enumerator Element head new LRU Cache Enumerator LRU Enumerator Element f Entry Queue  fValue LRU Cache Entry current Entry f Entry Queue  fNext LRU Cache Enumerator LRU Enumerator Element current Element head while current Entry null current Element f Next new LRU Cache Enumerator LRU Enumerator Element current Entry  fValue current Element current Element f Next current Entry current Entry  fNext return new LRU Cache Enumerator head  LRUCacheEntry fEntryQueue LRUCacheEnumerator LRUCacheEnumerator LRUEnumeratorElement LRUCacheEnumerator LRUEnumeratorElement fEntryQueue _fValue LRUCacheEntry currentEntry fEntryQueue _fNext LRUCacheEnumerator LRUEnumeratorElement currentElement currentEntry currentElement fNext LRUCacheEnumerator LRUEnumeratorElement currentEntry _fValue currentElement currentElement fNext currentEntry currentEntry _fNext LRUCacheEnumerator
return new LRU Cache Enumerator head public double filling Ratio return f Current Space f Overflow 100 0 f Space Limit  LRUCacheEnumerator fillingRatio fCurrentSpace fOverflow fSpaceLimit
For internal testing only This method exposed only for testing purposes return Hashtable of entries public java util Hashtable get Entry Table return f Entry Table  getEntryTable fEntryTable
Returns the load factor for the cache The load factor determines how much space is reclaimed when the cache exceeds its space limit return double public double get Load Factor return f Load Factor  getLoadFactor fLoadFactor
return The space by which the cache has overflown public int get Overflow return f Overflow  getOverflow fOverflow
Ensures there is the specified amount of free space in the receiver by removing old entries if necessary Returns true if the requested space was made available false otherwise May not be able to free enough space since some elements cannot be removed until they are saved param space Amount of space to free up protected boolean make Space int space int limit f Space Limit if f Overflow 0 if space is already available if f Current Space space limit return true Free up space by removing oldest entries int space Needed int 1 f Load Factor f Space Limit space Needed space Needed space space Needed space LRU Cache Entry entry f Entry Queue Tail try disable timestamps update while making space so that the previous and next links are not changed by a call to get Object for example f Timestamps On false while f Current Space space Needed limit entry null this private Remove Entry entry false false entry entry  fPrevious finally f Timestamps On true check again since we may have aquired enough space if f Current Space space limit f Overflow 0 return true update f Overflow f Overflow f Current Space space limit return false  makeSpace fSpaceLimit fOverflow fCurrentSpace spaceNeeded fLoadFactor fSpaceLimit spaceNeeded spaceNeeded spaceNeeded LRUCacheEntry fEntryQueueTail fTimestampsOn fCurrentSpace spaceNeeded privateRemoveEntry _fPrevious fTimestampsOn fCurrentSpace fOverflow fOverflow fOverflow fCurrentSpace
return false Returns a new instance of the reciever protected abstract LRU Cache new Instance int size int overflow  LRUCache newInstance
protected abstract LRU Cache new Instance int size int overflow Answers the value in the cache at the given key If the value is not in the cache returns null This function does not modify timestamps public Object peek Object key LRU Cache Entry entry LRU Cache Entry f Entry Table get key if entry null return null return entry  fValue  LRUCache newInstance LRUCacheEntry LRUCacheEntry fEntryTable _fValue
public Class f Class public int f Count public Temp Class a Class f Class a Class f Count 1  fClass fCount aClass fClass aClass fCount
f Count 1 public String to String return Class f Class has f Count entries NON NLS 2 NON NLS 3 NON NLS 1  fCount toString fClass fCount
For testing purposes only public void print Stats int forward List Length 0 LRU Cache Entry entry f Entry Queue while entry null forward List Length entry entry  fNext System out println Forward length forward List Length NON NLS 1 int backward List Length 0 entry f Entry Queue Tail while entry null backward List Length entry entry  fPrevious System out println Backward length backward List Length NON NLS 1 Enumeration keys f Entry Table keys class Temp public Class f Class public int f Count public Temp Class a Class f Class a Class f Count 1 public String to String return Class f Class has f Count entries NON NLS 2 NON NLS 3 NON NLS 1 java util Hash Map h new java util Hash Map while keys has More Elements entry LRU Cache Entry f Entry Table get keys next Element Class key entry  fValue get Class Temp t Temp h get key if t null h put key new Temp key else t f Count for Iterator iter h key Set iterator iter has Next System out println h get iter next  printStats forwardListLength LRUCacheEntry fEntryQueue forwardListLength _fNext forwardListLength backwardListLength fEntryQueueTail backwardListLength _fPrevious backwardListLength fEntryTable fClass fCount aClass fClass aClass fCount toString fClass fCount HashMap HashMap hasMoreElements LRUCacheEntry fEntryTable nextElement _fValue getClass fCount keySet hasNext
Removes the entry from the entry queue Calls code private Remove Entry code with the external functionality enabled param shuffle indicates whether we are just shuffling the queue in which case the entry table is not modified protected void private Remove Entry LRU Cache Entry entry boolean shuffle private Remove Entry entry shuffle true  privateRemoveEntry privateRemoveEntry LRUCacheEntry privateRemoveEntry
Removes the entry from the entry queue If i external i is true the entry is removed without checking if it can be removed It is assumed that the client has already closed the element it is trying to remove or will close it promptly If i external i is false and the entry could not be closed it is not removed and the pointers are not changed param shuffle indicates whether we are just shuffling the queue in which case the entry table is not modified protected void private Remove Entry LRU Cache Entry entry boolean shuffle boolean external if shuffle if external f Entry Table remove entry  fKey f Current Space entry  fSpace private Notify Deletion From Cache entry else if close entry return buffer close will recursively call private Remove Entry with external true thus entry will already be removed if reaching this point if f Entry Table get entry  fKey null return else basic removal f Entry Table remove entry  fKey f Current Space entry  fSpace private Notify Deletion From Cache entry LRU Cache Entry previous entry  fPrevious LRU Cache Entry next entry  fNext if this was the first entry if previous null f Entry Queue next else previous  fNext next if this was the last entry if next null f Entry Queue Tail previous else next  fPrevious previous  privateRemoveEntry LRUCacheEntry fEntryTable _fKey fCurrentSpace _fSpace privateNotifyDeletionFromCache privateRemoveEntry fEntryTable _fKey fEntryTable _fKey fCurrentSpace _fSpace privateNotifyDeletionFromCache LRUCacheEntry _fPrevious LRUCacheEntry _fNext fEntryQueue _fNext fEntryQueueTail _fPrevious
Sets the value in the cache at the given key Returns the value param key Key of object to add param value Value of object to add return added value public Object put Object key Object value attempt to rid ourselves of the overflow if there is any if f Overflow 0 shrink Check whether there s an entry in the cache int new Space space For value LRU Cache Entry entry LRU Cache Entry f Entry Table get key if entry null Replace the entry in the cache if it would not overflow the cache Otherwise flush the entry and re add it so as to keep cache within budget int old Space entry  fSpace int new Total f Current Space old Space new Space if new Total f Space Limit update Timestamp entry entry  fValue value entry  fSpace new Space f Current Space new Total f Overflow 0 return value else private Remove Entry entry false false attempt to make new space make Space new Space add without worring about space it will be handled later in a make Space call private Add key value new Space return value  fOverflow newSpace spaceFor LRUCacheEntry LRUCacheEntry fEntryTable oldSpace _fSpace newTotal fCurrentSpace oldSpace newSpace newTotal fSpaceLimit updateTimestamp _fValue _fSpace newSpace fCurrentSpace newTotal fOverflow privateRemoveEntry makeSpace newSpace makeSpace privateAdd newSpace
Removes and returns the value in the cache for the given key If the key is not in the cache returns null param key Key of object to remove from cache return Value removed from cache public Object remove Object key return remove Key key  removeKey
Sets the load factor for the cache The load factor determines how much space is reclaimed when the cache exceeds its space limit param new Load Factor double throws Illegal Argument Exception when the new load factor is not in 0 0 1 0 public void set Load Factor double new Load Factor throws Illegal Argument Exception if new Load Factor 1 0 new Load Factor 0 0 f Load Factor new Load Factor else throw new Illegal Argument Exception Util bind cache invalid Load Factor NON NLS 1  newLoadFactor IllegalArgumentException setLoadFactor newLoadFactor IllegalArgumentException newLoadFactor newLoadFactor fLoadFactor newLoadFactor IllegalArgumentException invalidLoadFactor
Sets the maximum amount of space that the cache can store param limit Number of units of cache space public void set Space Limit int limit if limit f Space Limit make Space f Space Limit limit f Space Limit limit  setSpaceLimit fSpaceLimit makeSpace fSpaceLimit fSpaceLimit
Attempts to shrink the cache if it has overflown Returns true if the cache shrinks to less than or equal to code f Space Limit code public boolean shrink if f Overflow 0 return make Space 0 return true  fSpaceLimit fOverflow makeSpace
Returns a String that represents the value of this object This method is for debugging purposes only public String to String return OverflowingLRU Cache Number Format get Instance format this filling Ratio full n NON NLS 1 NON NLS 2 this to String Contents  toString OverflowingLRUCache NumberFormat getInstance fillingRatio toStringContents
Updates the timestamp for the given entry ensuring that the queue is kept in correct order The entry must exist p This method will do nothing if timestamps have been disabled protected void update Timestamp LRU Cache Entry entry if f Timestamps On entry  fTimestamp f Timestamp Counter if f Entry Queue entry this private Remove Entry entry true this private Add Entry entry true  updateTimestamp LRUCacheEntry fTimestampsOn _fTimestamp fTimestampCounter fEntryQueue privateRemoveEntry privateAddEntry

package class Package Declaration extends Source Ref Element implements I Package Declaration protected Package Declaration Compilation Unit parent String name super parent name  PackageDeclaration SourceRefElement IPackageDeclaration PackageDeclaration CompilationUnit
super parent name public boolean equals Object o if o instanceof Package Declaration return false return super equals o  PackageDeclaration
see Java Element equalsDOM Node deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected boolean equalsDOM Node IDOM Node node return node get Node Type IDOM Node PACKAGE get Element Name equals node get Name  JavaElement equalsDOMNode equalsDOMNode IDOMNode getNodeType IDOMNode getElementName getName
see I Java Element public int get Element Type return PACKAGE DECLARATION  IJavaElement getElementType PACKAGE_DECLARATION
see Java Element get Handle Memento protected char get Handle Memento Delimiter return Java Element JEM PACKAGEDECLARATION  JavaElement getHandleMemento getHandleMementoDelimiter JavaElement JEM_PACKAGEDECLARATION
public I Java Element get Primary Element boolean check Owner Compilation Unit cu Compilation Unit get Ancestor COMPILATION UNIT if check Owner cu is Primary return this return cu get Package Declaration this name  IJavaElement getPrimaryElement checkOwner CompilationUnit CompilationUnit getAncestor COMPILATION_UNIT checkOwner isPrimary getPackageDeclaration
private Debugging purposes protected void to String Info int tab String Buffer buffer Object info buffer append this tab String tab buffer append package NON NLS 1 to String Name buffer if info null buffer append not open NON NLS 1  toStringInfo StringBuffer tabString toStringName

protected static final I Compilation Unit NO COMPILATION UNITS new I Compilation Unit Constructs a handle for a package fragment see I Package Fragment protected Package Fragment Package Fragment Root root String name super root name  ICompilationUnit NO_COMPILATION_UNITS ICompilationUnit IPackageFragment PackageFragment PackageFragmentRoot
see Openable protected boolean build Structure Openable Element Info info I Progress Monitor pm Map new Elements I Resource underlying Resource throws Java Model Exception check whether this pkg can be opened if underlying Resource is Accessible throw new Not Present Exception int kind get Kind String ext Type if kind I Package Fragment Root K SOURCE ext Type EXTENSION java else ext Type EXTENSION class add compilation units class files from resources Hash Set v Children new Hash Set try Package Fragment Root root get Package Fragment Root char inclusion Patterns root full Inclusion Pattern Chars char exclusion Patterns root full Exclusion Pattern Chars I Resource members I Container underlying Resource members for int i 0 max members length i max i I Resource child members i if child get Type I Resource FOLDER Util is Excluded child inclusion Patterns exclusion Patterns String extension child get Project Relative Path get File Extension if extension null if extension equals Ignore Case ext Type I Java Element child Element if kind I Package Fragment Root K SOURCE Util is Valid Compilation Unit Name child get Name child Element new Compilation Unit this child get Name Default Working Copy Owner PRIMARY v Children add child Element else if Util is Valid Class File Name child get Name child Element get Class File child get Name v Children add child Element catch Core Exception e throw new Java Model Exception e if kind I Package Fragment Root K SOURCE add primary compilation units I Compilation Unit primary Compilation Units get Compilation Units Default Working Copy Owner PRIMARY for int i 0 length primary Compilation Units length i length i I Compilation Unit primary primary Compilation Units i v Children add primary I Java Element children new I Java Element v Children size v Children to Array children info set Children children return true  buildStructure OpenableElementInfo IProgressMonitor newElements IResource underlyingResource JavaModelException underlyingResource isAccessible newNotPresentException getKind extType IPackageFragmentRoot K_SOURCE extType EXTENSION_java extType EXTENSION_class HashSet vChildren HashSet PackageFragmentRoot getPackageFragmentRoot inclusionPatterns fullInclusionPatternChars exclusionPatterns fullExclusionPatternChars IResource IContainer underlyingResource IResource getType IResource isExcluded inclusionPatterns exclusionPatterns getProjectRelativePath getFileExtension equalsIgnoreCase extType IJavaElement childElement IPackageFragmentRoot K_SOURCE isValidCompilationUnitName getName childElement CompilationUnit getName DefaultWorkingCopyOwner vChildren childElement isValidClassFileName getName childElement getClassFile getName vChildren childElement CoreException JavaModelException IPackageFragmentRoot K_SOURCE ICompilationUnit primaryCompilationUnits getCompilationUnits DefaultWorkingCopyOwner primaryCompilationUnits ICompilationUnit primaryCompilationUnits vChildren IJavaElement IJavaElement vChildren vChildren toArray setChildren
Returns true if this fragment contains at least one java resource Returns false otherwise public boolean contains Java Resources throws Java Model Exception return Package Fragment Info get Element Info contains Java Resources  containsJavaResources JavaModelException PackageFragmentInfo getElementInfo containsJavaResources
see I Source Manipulation public void copy I Java Element container I Java Element sibling String rename boolean force I Progress Monitor monitor throws Java Model Exception if container null throw new Illegal Argument Exception Util bind operation null Container NON NLS 1 I Java Element elements new I Java Element this I Java Element containers new I Java Element container I Java Element siblings null if sibling null siblings new I Java Element sibling String renamings null if rename null renamings new String rename get Java Model copy elements containers siblings renamings force monitor  ISourceManipulation IJavaElement IJavaElement IProgressMonitor JavaModelException IllegalArgumentException nullContainer IJavaElement IJavaElement IJavaElement IJavaElement IJavaElement IJavaElement getJavaModel
see I Package Fragment public I Compilation Unit create Compilation Unit String cu Name String contents boolean force I Progress Monitor monitor throws Java Model Exception Create Compilation Unit Operation op new Create Compilation Unit Operation this cu Name contents force op run Operation monitor return new Compilation Unit this cu Name Default Working Copy Owner PRIMARY  IPackageFragment ICompilationUnit createCompilationUnit cuName IProgressMonitor JavaModelException CreateCompilationUnitOperation CreateCompilationUnitOperation cuName runOperation CompilationUnit cuName DefaultWorkingCopyOwner
see Java Element protected Object create Element Info return new Package Fragment Info  JavaElement createElementInfo PackageFragmentInfo
see I Source Manipulation public void delete boolean force I Progress Monitor monitor throws Java Model Exception I Java Element elements new I Java Element this get Java Model delete elements force monitor  ISourceManipulation IProgressMonitor JavaModelException IJavaElement IJavaElement getJavaModel
get Java Model delete elements force monitor public boolean equals Object o if o instanceof Package Fragment return false return super equals o  getJavaModel PackageFragment
see I Package Fragment get Class File String exception Illegal Argument Exception if the name does not end with class public I Class File get Class File String class File Name if org eclipse jdt internal compiler util Util is Class File Name class File Name throw new Illegal Argument Exception Util bind element invalid Class File Name NON NLS 1 return new Class File this class File Name  IPackageFragment getClassFile IllegalArgumentException IClassFile getClassFile classFileName isClassFileName classFileName IllegalArgumentException invalidClassFileName ClassFile classFileName
Returns a the collection of class files in this a folder package fragment which has a root that has its kind set to code I Package Fragment Root K Source code does not recognize class files see I Package Fragment get Class Files public I Class File get Class Files throws Java Model Exception if get Kind I Package Fragment Root K SOURCE return NO CLASSFILES Array List list get Children Of Type CLASS FILE I Class File array new I Class File list size list to Array array return array  IPackageFragmentRoot K_Source IPackageFragment getClassFiles IClassFile getClassFiles JavaModelException getKind IPackageFragmentRoot K_SOURCE NO_CLASSFILES ArrayList getChildrenOfType CLASS_FILE IClassFile IClassFile toArray
see I Package Fragment get Compilation Unit String exception Illegal Argument Exception if the name does not end with java public I Compilation Unit get Compilation Unit String cu Name if org eclipse jdt internal compiler util Util is Java File Name cu Name throw new Illegal Argument Exception Util bind convention unit not Java Name NON NLS 1 return new Compilation Unit this cu Name Default Working Copy Owner PRIMARY  IPackageFragment getCompilationUnit IllegalArgumentException ICompilationUnit getCompilationUnit cuName isJavaFileName cuName IllegalArgumentException notJavaName CompilationUnit cuName DefaultWorkingCopyOwner
see I Package Fragment get Compilation Units public I Compilation Unit get Compilation Units throws Java Model Exception if get Kind I Package Fragment Root K BINARY return NO COMPILATION UNITS Array List list get Children Of Type COMPILATION UNIT I Compilation Unit array new I Compilation Unit list size list to Array array return array  IPackageFragment getCompilationUnits ICompilationUnit getCompilationUnits JavaModelException getKind IPackageFragmentRoot K_BINARY NO_COMPILATION_UNITS ArrayList getChildrenOfType COMPILATION_UNIT ICompilationUnit ICompilationUnit toArray
see I Package Fragment get Compilation Units Working Copy Owner public I Compilation Unit get Compilation Units Working Copy Owner owner I Compilation Unit working Copies Java Model Manager get Java Model Manager get Working Copies owner false don t add primary if working Copies null return Java Model Manager NO WORKING COPY int length working Copies length I Compilation Unit result new I Compilation Unit length int index 0 for int i 0 i length i I Compilation Unit wc working Copies i if equals wc get Parent Util is Excluded wc 59933 excluded wc shouldn t be answered back result index wc if index length System arraycopy result 0 result new I Compilation Unit index 0 index return result  IPackageFragment getCompilationUnits WorkingCopyOwner ICompilationUnit getCompilationUnits WorkingCopyOwner ICompilationUnit workingCopies JavaModelManager getJavaModelManager getWorkingCopies workingCopies JavaModelManager NO_WORKING_COPY workingCopies ICompilationUnit ICompilationUnit ICompilationUnit workingCopies getParent isExcluded ICompilationUnit
see I Java Element public int get Element Type return PACKAGE FRAGMENT  IJavaElement getElementType PACKAGE_FRAGMENT
public I Java Element get Handle From Memento String token Memento Tokenizer memento Working Copy Owner owner switch token char At 0 case JEM COUNT return get Handle Updating Count From Memento memento owner case JEM CLASSFILE String class File Name memento next Token Java Element class File Java Element get Class File class File Name return class File get Handle From Memento memento owner case JEM COMPILATIONUNIT String cu Name memento next Token Java Element cu new Compilation Unit this cu Name owner return cu get Handle From Memento memento owner return null  IJavaElement getHandleFromMemento MementoTokenizer WorkingCopyOwner charAt JEM_COUNT getHandleUpdatingCountFromMemento JEM_CLASSFILE classFileName nextToken JavaElement classFile JavaElement getClassFile classFileName classFile getHandleFromMemento JEM_COMPILATIONUNIT cuName nextToken JavaElement CompilationUnit cuName getHandleFromMemento
see Java Element get Handle Memento Delimiter protected char get Handle Memento Delimiter return Java Element JEM PACKAGEFRAGMENT  JavaElement getHandleMementoDelimiter getHandleMementoDelimiter JavaElement JEM_PACKAGEFRAGMENT
see I Package Fragment get Kind public int get Kind throws Java Model Exception return I Package Fragment Root get Parent get Kind  IPackageFragment getKind getKind JavaModelException IPackageFragmentRoot getParent getKind
Returns an array of non java resources contained in the receiver public Object get Non Java Resources throws Java Model Exception if this is Default Package We don t want to show non java resources of the default package see PR 1G58NB8 return Java Element Info NO NON JAVA RESOURCES else return Package Fragment Info get Element Info get Non Java Resources get Resource get Package Fragment Root  getNonJavaResources JavaModelException isDefaultPackage JavaElementInfo NO_NON_JAVA_RESOURCES PackageFragmentInfo getElementInfo getNonJavaResources getResource getPackageFragmentRoot
see I Java Element get Path public I Path get Path Package Fragment Root root this get Package Fragment Root if root is Archive return root get Path else return root get Path append this get Element Name replace  IJavaElement getPath IPath getPath PackageFragmentRoot getPackageFragmentRoot isArchive getPath getPath getElementName
see I Java Element get Resource public I Resource get Resource Package Fragment Root root this get Package Fragment Root if root is Archive return root get Resource else String element Name this get Element Name if element Name length 0 return root get Resource else return I Container root get Resource get Folder new Path this get Element Name replace  IJavaElement getResource IResource getResource PackageFragmentRoot getPackageFragmentRoot isArchive getResource elementName getElementName elementName getResource IContainer getResource getFolder getElementName
see I Java Element get Underlying Resource public I Resource get Underlying Resource throws Java Model Exception I Resource root Resource this parent get Underlying Resource if root Resource null jar package fragment root that has no associated resource return null the underlying resource may be a folder or a project in the case that the project folder is atually the package fragment root if root Resource get Type I Resource FOLDER root Resource get Type I Resource PROJECT I Container folder I Container root Resource String segs Signature get Simple Names this name for int i 0 i segs length i I Resource child folder find Member segs i if child null child get Type I Resource FOLDER throw new Not Present Exception folder I Folder child return folder else return root Resource  IJavaElement getUnderlyingResource IResource getUnderlyingResource JavaModelException IResource rootResource getUnderlyingResource rootResource rootResource getType IResource rootResource getType IResource IContainer IContainer rootResource getSimpleNames IResource findMember getType IResource newNotPresentException IFolder rootResource
see I Parent public boolean has Children throws Java Model Exception return get Children length 0  IParent hasChildren JavaModelException getChildren
see I Package Fragment has Subpackages public boolean has Subpackages throws Java Model Exception I Java Element packages I Package Fragment Root get Parent get Children String element Name get Element Name int name Length element Name length String package Name is Default Package element Name element Name NON NLS 1 for int i 0 i packages length i String other Name packages i get Element Name if other Name length name Length other Name starts With package Name return true return false  IPackageFragment hasSubpackages hasSubpackages JavaModelException IJavaElement IPackageFragmentRoot getParent getChildren elementName getElementName nameLength elementName packageName isDefaultPackage elementName elementName otherName getElementName otherName nameLength otherName startsWith packageName
see I Package Fragment is Default Package public boolean is Default Package return this get Element Name length 0  IPackageFragment isDefaultPackage isDefaultPackage getElementName
see I Source Manipulation move I Java Element I Java Element String boolean I Progress Monitor public void move I Java Element container I Java Element sibling String rename boolean force I Progress Monitor monitor throws Java Model Exception if container null throw new Illegal Argument Exception Util bind operation null Container NON NLS 1 I Java Element elements new I Java Element this I Java Element containers new I Java Element container I Java Element siblings null if sibling null siblings new I Java Element sibling String renamings null if rename null renamings new String rename get Java Model move elements containers siblings renamings force monitor  ISourceManipulation IJavaElement IJavaElement IProgressMonitor IJavaElement IJavaElement IProgressMonitor JavaModelException IllegalArgumentException nullContainer IJavaElement IJavaElement IJavaElement IJavaElement IJavaElement IJavaElement getJavaModel
see I Source Manipulation rename String boolean I Progress Monitor public void rename String new Name boolean force I Progress Monitor monitor throws Java Model Exception if new Name null throw new Illegal Argument Exception Util bind element null Name NON NLS 1 I Java Element elements new I Java Element this I Java Element dests new I Java Element this get Parent String renamings new String new Name get Java Model rename elements dests renamings force monitor  ISourceManipulation IProgressMonitor newName IProgressMonitor JavaModelException newName IllegalArgumentException nullName IJavaElement IJavaElement IJavaElement IJavaElement getParent newName getJavaModel
Debugging purposes protected void to String Children int tab String Buffer buffer Object info if tab 0 super to String Children tab buffer info  toStringChildren StringBuffer toStringChildren
Debugging purposes protected void to String Info int tab String Buffer buffer Object info buffer append this tab String tab if get Element Name length 0 buffer append default NON NLS 1 else to String Name buffer if info null buffer append not open NON NLS 1 else if tab 0 buffer append NON NLS 1  toStringInfo StringBuffer tabString getElementName toStringName

Create and initialize a new instance of the receiver public Package Fragment Info this non Java Resources null  PackageFragmentInfo nonJavaResources
boolean contains Java Resources return this children length 0  containsJavaResources
Returns an array of non java resources contained in the receiver Object get Non Java Resources I Resource underlying Resource Package Fragment Root root Handle if this non Java Resources null try this non Java Resources Package Fragment Root Info compute Folder Non Java Resources Java Project root Handle get Java Project I Container underlying Resource root Handle full Inclusion Pattern Chars root Handle full Exclusion Pattern Chars catch Java Model Exception e root doesn t exist consider package has no non Java Resources this non Java Resources NO NON JAVA RESOURCES return this non Java Resources  getNonJavaResources IResource underlyingResource PackageFragmentRoot rootHandle nonJavaResources nonJavaResources PackageFragmentRootInfo computeFolderNonJavaResources JavaProject rootHandle getJavaProject IContainer underlyingResource rootHandle fullInclusionPatternChars rootHandle fullExclusionPatternChars JavaModelException nonJavaResources nonJavaResources NO_NON_JAVA_RESOURCES nonJavaResources
Set the non Java Resources to res value void set Non Java Resources Object resources this non Java Resources resources  nonJavaResources setNonJavaResources nonJavaResources

Constructs a package fragment root which is the root of the java package directory hierarchy protected Package Fragment Root I Resource resource Java Project project String name super project name this resource resource  PackageFragmentRoot IResource JavaProject
see I Package Fragment Root public void attach Source I Path source Path I Path root Path I Progress Monitor monitor throws Java Model Exception try verify Attach Source source Path if monitor null monitor begin Task Util bind element attaching Source 2 NON NLS 1 Source Mapper old Mapper get Source Mapper I Workspace workspace Resources Plugin get Workspace boolean root Needs To Be Closed false if source Path null source being detached root Needs To Be Closed true set Source Mapper null Disable deltas see 1GDTUSD fire a delta to notify the UI about the source detachement Java Model Manager manager Java Model Manager Java Model Manager get Java Model Manager Java Model model Java Model get Java Model Java Element Delta attached Source Delta new Java Element Delta model attached Source Delta source Detached this this would be a Package Fragment Root manager register Resource Delta attached Source Delta manager fire maybe you want to fire the change later Let us know about it else fire a delta to notify the UI about the source attachement Java Model Manager manager Java Model Manager Java Model Manager get Java Model Manager Java Model model Java Model get Java Model Java Element Delta attached Source Delta new Java Element Delta model attached Source Delta source Attached this this would be a Package Fragment Root manager register Resource Delta attached Source Delta manager fire maybe you want to fire the change later Let us know about it check if different from the current attachment I Path stored Source Path get Source Attachment Path I Path stored Root Path get Source Attachment Root Path if monitor null monitor worked 1 if stored Source Path null if stored Source Path equals source Path root Path null root Path equals stored Root Path stored Root Path null root Needs To Be Closed true check if source path is valid Object target Java Model get Target workspace get Root source Path false if target null if monitor null monitor done throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID PATH source Path Source Mapper mapper create Source Mapper source Path root Path if root Path null mapper root Path null as a side effect of calling the Source Mapper constructor the root path was computed root Path new Path mapper root Path set Source Mapper mapper if source Path null set Source Attachment Property null remove the property else set the property to the path of the mapped source set Source Attachment Property source Path to String root Path null ATTACHMENT PROPERTY DELIMITER root Path to String NON NLS 1 if root Needs To Be Closed if old Mapper null old Mapper close Buffer Manager manager Buffer Manager get Default Buffer Manager Enumeration open Buffers manager get Open Buffers while open Buffers has More Elements I Buffer buffer I Buffer open Buffers next Element I Openable possible Member buffer get Owner if is Ancestor Of I Java Element possible Member buffer close if monitor null monitor worked 1 catch Java Model Exception e set Source Attachment Property null loose info will be recomputed throw e finally if monitor null monitor done  IPackageFragmentRoot attachSource IPath sourcePath IPath rootPath IProgressMonitor JavaModelException verifyAttachSource sourcePath beginTask attachingSource SourceMapper oldMapper getSourceMapper IWorkspace ResourcesPlugin getWorkspace rootNeedsToBeClosed sourcePath rootNeedsToBeClosed setSourceMapper JavaModelManager JavaModelManager JavaModelManager getJavaModelManager JavaModel JavaModel getJavaModel JavaElementDelta attachedSourceDelta JavaElementDelta attachedSourceDelta sourceDetached PackageFragmentRoot registerResourceDelta attachedSourceDelta JavaModelManager JavaModelManager JavaModelManager getJavaModelManager JavaModel JavaModel getJavaModel JavaElementDelta attachedSourceDelta JavaElementDelta attachedSourceDelta sourceAttached PackageFragmentRoot registerResourceDelta attachedSourceDelta IPath storedSourcePath getSourceAttachmentPath IPath storedRootPath getSourceAttachmentRootPath storedSourcePath storedSourcePath sourcePath rootPath rootPath storedRootPath storedRootPath rootNeedsToBeClosed JavaModel getTarget getRoot sourcePath JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_PATH sourcePath SourceMapper createSourceMapper sourcePath rootPath rootPath rootPath SourceMapper rootPath rootPath setSourceMapper sourcePath setSourceAttachmentProperty setSourceAttachmentProperty sourcePath toString rootPath ATTACHMENT_PROPERTY_DELIMITER rootPath toString rootNeedsToBeClosed oldMapper oldMapper BufferManager BufferManager getDefaultBufferManager openBuffers getOpenBuffers openBuffers hasMoreElements IBuffer IBuffer openBuffers nextElement IOpenable possibleMember getOwner isAncestorOf IJavaElement possibleMember JavaModelException setSourceAttachmentProperty
see Openable protected boolean build Structure Openable Element Info info I Progress Monitor pm Map new Elements I Resource underlying Resource throws Java Model Exception check whether this pkg fragment root can be opened if resource Exists is On Classpath throw new Not Present Exception Package Fragment Root Info info set Root Kind determine Kind underlying Resource return compute Children info new Elements  buildStructure OpenableElementInfo IProgressMonitor newElements IResource underlyingResource JavaModelException resourceExists isOnClasspath newNotPresentException PackageFragmentRootInfo setRootKind determineKind underlyingResource computeChildren newElements
Source Mapper create Source Mapper I Path source Path I Path root Path Source Mapper mapper new Source Mapper source Path root Path null null root Path toOS String this is External Java Core get Options this get Java Project get Options true only project options if associated with resource return mapper  SourceMapper createSourceMapper IPath sourcePath IPath rootPath SourceMapper SourceMapper sourcePath rootPath rootPath toOSString isExternal JavaCore getOptions getJavaProject getOptions
public void delete int update Resource Flags int update Model Flags I Progress Monitor monitor throws Java Model Exception Delete Package Fragment Root Operation op new Delete Package Fragment Root Operation this update Resource Flags update Model Flags op run Operation monitor  updateResourceFlags updateModelFlags IProgressMonitor JavaModelException DeletePackageFragmentRootOperation DeletePackageFragmentRootOperation updateResourceFlags updateModelFlags runOperation
Compute the package fragment children of this package fragment root exception Java Model Exception The resource associated with this package fragment root does not exist protected boolean compute Children Openable Element Info info Map new Elements throws Java Model Exception Note the children are not opened so not added to new Elements for a regular package fragment root Howver they are opened for a Jar package fragment root see Jar Package Fragment Root compute Children try the underlying resource may be a folder or a project in the case that the project folder is actually the package fragment root I Resource underlying Resource get Resource if underlying Resource get Type I Resource FOLDER underlying Resource get Type I Resource PROJECT Array List v Children new Array List 5 I Container root Folder I Container underlying Resource char inclusion Patterns full Inclusion Pattern Chars char exclusion Patterns full Exclusion Pattern Chars compute Folder Children root Folder Util is Excluded root Folder inclusion Patterns exclusion Patterns v Children inclusion Patterns exclusion Patterns NON NLS 1 I Java Element children new I Java Element v Children size v Children to Array children info set Children children catch Java Model Exception e problem resolving children structure remains unknown info set Children new I Java Element throw e return true  JavaModelException computeChildren OpenableElementInfo newElements JavaModelException newElements JarPackageFragmentRoot computeChildren IResource underlyingResource getResource underlyingResource getType IResource underlyingResource getType IResource ArrayList vChildren ArrayList IContainer rootFolder IContainer underlyingResource inclusionPatterns fullInclusionPatternChars exclusionPatterns fullExclusionPatternChars computeFolderChildren rootFolder isExcluded rootFolder inclusionPatterns exclusionPatterns vChildren inclusionPatterns exclusionPatterns IJavaElement IJavaElement vChildren vChildren toArray setChildren JavaModelException setChildren IJavaElement
Starting at this folder create package fragments and add the fragments that are not exclused to the collection of children exception Java Model Exception The resource associated with this package fragment does not exist protected void compute Folder Children I Container folder boolean is Included String prefix Array List v Children char inclusion Patterns char exclusion Patterns throws Java Model Exception if is Included I Package Fragment pkg get Package Fragment prefix v Children add pkg try Java Project java Project Java Project get Java Project I Resource members folder members boolean has Included is Included for int i 0 max members length i max i I Resource member members i String member Name member get Name switch member get Type case I Resource FOLDER if Util is Valid Folder Name For Package member Name boolean is Member Included Util is Excluded member inclusion Patterns exclusion Patterns keep looking inside as long as included already or may have child included due to inclusion patterns if is Member Included inclusion Patterns null eliminate binary output only if nested inside direct subfolders if java Project contains member String new Prefix if prefix length 0 new Prefix member Name else new Prefix prefix member Name NON NLS 1 compute Folder Children I Folder member is Member Included new Prefix v Children inclusion Patterns exclusion Patterns break case I Resource FILE inclusion filter may only include files in which case we still want to include the immediate parent package lazily if has Included Util is Valid Compilation Unit Name member Name Util is Excluded member inclusion Patterns exclusion Patterns has Included true I Package Fragment pkg get Package Fragment prefix v Children add pkg break catch Illegal Argument Exception e throw new Java Model Exception e I Java Model Status Constants ELEMENT DOES NOT EXIST could be thrown by Element Tree when path is not found catch Core Exception e throw new Java Model Exception e  JavaModelException computeFolderChildren IContainer isIncluded ArrayList vChildren inclusionPatterns exclusionPatterns JavaModelException isIncluded IPackageFragment getPackageFragment vChildren JavaProject javaProject JavaProject getJavaProject IResource hasIncluded isIncluded IResource memberName getName getType IResource isValidFolderNameForPackage memberName isMemberIncluded isExcluded inclusionPatterns exclusionPatterns isMemberIncluded inclusionPatterns javaProject newPrefix newPrefix memberName newPrefix memberName computeFolderChildren IFolder isMemberIncluded newPrefix vChildren inclusionPatterns exclusionPatterns IResource hasIncluded isValidCompilationUnitName memberName isExcluded inclusionPatterns exclusionPatterns hasIncluded IPackageFragment getPackageFragment vChildren IllegalArgumentException JavaModelException IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST ElementTree CoreException JavaModelException
public void copy I Path destination int update Resource Flags int update Model Flags I Classpath Entry sibling I Progress Monitor monitor throws Java Model Exception Copy Package Fragment Root Operation op new Copy Package Fragment Root Operation this destination update Resource Flags update Model Flags sibling op run Operation monitor  IPath updateResourceFlags updateModelFlags IClasspathEntry IProgressMonitor JavaModelException CopyPackageFragmentRootOperation CopyPackageFragmentRootOperation updateResourceFlags updateModelFlags runOperation
Returns a new element info for this element protected Object create Element Info return new Package Fragment Root Info  createElementInfo PackageFragmentRootInfo
see I Package Fragment Root public I Package Fragment create Package Fragment String pkg Name boolean force I Progress Monitor monitor throws Java Model Exception Create Package Fragment Operation op new Create Package Fragment Operation this pkg Name force op run Operation monitor return get Package Fragment pkg Name  IPackageFragmentRoot IPackageFragment createPackageFragment pkgName IProgressMonitor JavaModelException CreatePackageFragmentOperation CreatePackageFragmentOperation pkgName runOperation getPackageFragment pkgName
Returns the root s kind K SOURCE or K BINARY defaults to K SOURCE if it is not on the classpath exception Java Model Exception if the project and root do not exist protected int determine Kind I Resource underlying Resource throws Java Model Exception I Classpath Entry entries Java Project get Java Project get Expanded Classpath true for int i 0 i entries length i I Classpath Entry entry entries i if entry get Path equals underlying Resource get Full Path return entry get Content Kind return I Package Fragment Root K SOURCE  K_SOURCE K_BINARY K_SOURCE JavaModelException determineKind IResource underlyingResource JavaModelException IClasspathEntry JavaProject getJavaProject getExpandedClasspath IClasspathEntry getPath underlyingResource getFullPath getContentKind IPackageFragmentRoot K_SOURCE
Compares two objects for equality for code Package Fragment Root code s equality is having the same parent same resources and occurrence count public boolean equals Object o if this o return true if o instanceof Package Fragment Root return false Package Fragment Root other Package Fragment Root o return this resource equals other resource this occurrence Count other occurrence Count this parent equals other parent  PackageFragmentRoot PackageFragmentRoot PackageFragmentRoot PackageFragmentRoot occurrenceCount occurrenceCount
see I Java Element public boolean exists return super exists is On Classpath  IJavaElement isOnClasspath
public I Classpath Entry find Source Attachment Recommendation try I Path root Path this get Path I Classpath Entry entry I Workspace Root workspace Root Resources Plugin get Workspace get Root try on enclosing project first Java Project parent Project Java Project get Java Project try entry parent Project get Classpath Entry For root Path if entry null Object target Java Model get Target workspace Root entry get Source Attachment Path true if target instanceof I Resource if target instanceof I File I File file I File target if org eclipse jdt internal compiler util Util is Archive File Name file get Name return entry else if target instanceof I Container return entry else if target instanceof java io File java io File file java io File target if file is File if org eclipse jdt internal compiler util Util is Archive File Name file get Name return entry else external directory return entry catch Java Model Exception e ignore iterate over all projects I Java Model model get Java Model I Java Project j Projects model get Java Projects for int i 0 max j Projects length i max i Java Project j Project Java Project j Projects i if j Project parent Project continue already done try entry j Project get Classpath Entry For root Path if entry null Object target Java Model get Target workspace Root entry get Source Attachment Path true if target instanceof I Resource if target instanceof I File I File file I File target if org eclipse jdt internal compiler util Util is Archive File Name file get Name return entry else if target instanceof I Container return entry else if target instanceof java io File java io File file java io File target if file is File if org eclipse jdt internal compiler util Util is Archive File Name file get Name return entry else external directory return entry catch Java Model Exception e ignore catch Java Model Exception e ignore return null  IClasspathEntry findSourceAttachmentRecommendation IPath rootPath getPath IClasspathEntry IWorkspaceRoot workspaceRoot ResourcesPlugin getWorkspace getRoot JavaProject parentProject JavaProject getJavaProject parentProject getClasspathEntryFor rootPath JavaModel getTarget workspaceRoot getSourceAttachmentPath IResource IFile IFile IFile isArchiveFileName getName IContainer isFile isArchiveFileName getName JavaModelException IJavaModel getJavaModel IJavaProject jProjects getJavaProjects jProjects JavaProject jProject JavaProject jProjects jProject parentProject jProject getClasspathEntryFor rootPath JavaModel getTarget workspaceRoot getSourceAttachmentPath IResource IFile IFile IFile isArchiveFileName getName IContainer isFile isArchiveFileName getName JavaModelException JavaModelException
public char full Exclusion Pattern Chars try if this is Open this get Kind I Package Fragment Root K SOURCE return null Classpath Entry entry Classpath Entry get Raw Classpath Entry if entry null return null else return entry full Exclusion Pattern Chars catch Java Model Exception e return null  fullExclusionPatternChars isOpen getKind IPackageFragmentRoot K_SOURCE ClasspathEntry ClasspathEntry getRawClasspathEntry fullExclusionPatternChars JavaModelException
public char full Inclusion Pattern Chars try if this is Open this get Kind I Package Fragment Root K SOURCE return null Classpath Entry entry Classpath Entry get Raw Classpath Entry if entry null return null else return entry full Inclusion Pattern Chars catch Java Model Exception e return null  fullInclusionPatternChars isOpen getKind IPackageFragmentRoot K_SOURCE ClasspathEntry ClasspathEntry getRawClasspathEntry fullInclusionPatternChars JavaModelException
see I Java Element public int get Element Type return PACKAGE FRAGMENT ROOT  IJavaElement getElementType PACKAGE_FRAGMENT_ROOT
see Java Element get Handle Memento protected char get Handle Memento Delimiter return Java Element JEM PACKAGEFRAGMENTROOT  JavaElement getHandleMemento getHandleMementoDelimiter JavaElement JEM_PACKAGEFRAGMENTROOT
public I Java Element get Handle From Memento String token Memento Tokenizer memento Working Copy Owner owner switch token char At 0 case JEM COUNT return get Handle Updating Count From Memento memento owner case JEM PACKAGEFRAGMENT String pkg Name if memento has More Tokens pkg Name memento next Token char first Char pkg Name char At 0 if first Char JEM CLASSFILE first Char JEM COMPILATIONUNIT first Char JEM COUNT token pkg Name pkg Name I Package Fragment DEFAULT PACKAGE NAME else token null else pkg Name I Package Fragment DEFAULT PACKAGE NAME token null Java Element pkg Java Element get Package Fragment pkg Name if token null return pkg get Handle From Memento memento owner else return pkg get Handle From Memento token memento owner return null  IJavaElement getHandleFromMemento MementoTokenizer WorkingCopyOwner charAt JEM_COUNT getHandleUpdatingCountFromMemento JEM_PACKAGEFRAGMENT pkgName hasMoreTokens pkgName nextToken firstChar pkgName charAt firstChar JEM_CLASSFILE firstChar JEM_COMPILATIONUNIT firstChar JEM_COUNT pkgName pkgName IPackageFragment DEFAULT_PACKAGE_NAME pkgName IPackageFragment DEFAULT_PACKAGE_NAME JavaElement JavaElement getPackageFragment pkgName getHandleFromMemento getHandleFromMemento
see Java Element get Handle Memento public String get Handle Memento I Path path I Resource underlying Resource get Resource if underlying Resource null internal jar or regular root if get Resource get Project equals get Java Project get Project path underlying Resource get Project Relative Path else path underlying Resource get Full Path else external jar path get Path String Buffer buff new String Buffer Java Element get Parent get Handle Memento buff append get Handle Memento Delimiter escape Memento Name buff path to String if this occurrence Count 1 buff append JEM COUNT buff append this occurrence Count return buff to String  JavaElement getHandleMemento getHandleMemento IPath IResource underlyingResource getResource underlyingResource getResource getProject getJavaProject getProject underlyingResource getProjectRelativePath underlyingResource getFullPath getPath StringBuffer StringBuffer JavaElement getParent getHandleMemento getHandleMementoDelimiter escapeMementoName toString occurrenceCount JEM_COUNT occurrenceCount toString
see I Package Fragment Root public int get Kind throws Java Model Exception return Package Fragment Root Info get Element Info get Root Kind  IPackageFragmentRoot getKind JavaModelException PackageFragmentRootInfo getElementInfo getRootKind
Returns an array of non java resources contained in the receiver public Object get Non Java Resources throws Java Model Exception return Package Fragment Root Info get Element Info get Non Java Resources get Java Project get Resource this  getNonJavaResources JavaModelException PackageFragmentRootInfo getElementInfo getNonJavaResources getJavaProject getResource
see I Package Fragment Root public I Package Fragment get Package Fragment String package Name if package Name index Of 1 tolerate package names with spaces e g x y http bugs eclipse org bugs show bug cgi id 21957 char compound Name Util to Compound Chars package Name String Buffer buffer new String Buffer package Name length for int i 0 length compound Name length i length i buffer append Char Operation trim compound Name i if i length 1 buffer append package Name buffer to String return new Package Fragment this package Name  IPackageFragmentRoot IPackageFragment getPackageFragment packageName packageName indexOf show_bug compoundName toCompoundChars packageName StringBuffer StringBuffer packageName compoundName CharOperation compoundName packageName toString PackageFragment packageName
Returns the package name for the given folder which is a decendent of this root protected String get Package Name I Folder folder I Path my Path get Path I Path pkg Path folder get Full Path int my Segment Count my Path segment Count int pkg Segment Count pkg Path segment Count String Buffer pkg Name new String Buffer I Package Fragment DEFAULT PACKAGE NAME for int i my Segment Count i pkg Segment Count i if i my Segment Count pkg Name append pkg Name append pkg Path segment i return pkg Name to String  getPackageName IFolder IPath myPath getPath IPath pkgPath getFullPath mySegmentCount myPath segmentCount pkgSegmentCount pkgPath segmentCount StringBuffer pkgName StringBuffer IPackageFragment DEFAULT_PACKAGE_NAME mySegmentCount pkgSegmentCount mySegmentCount pkgName pkgName pkgPath pkgName toString
see I Java Element public I Path get Path return get Resource get Full Path  IJavaElement IPath getPath getResource getFullPath
public I Classpath Entry get Raw Classpath Entry throws Java Model Exception I Classpath Entry raw Entry null Java Project project Java Project this get Java Project project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress force the reverse raw Entry cache to be populated Java Model Manager Per Project Info per Project Info project get Per Project Info if per Project Info null per Project Info resolved Path To Raw Entries null raw Entry I Classpath Entry per Project Info resolved Path To Raw Entries get this get Path return raw Entry  IClasspathEntry getRawClasspathEntry JavaModelException IClasspathEntry rawEntry JavaProject JavaProject getJavaProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress rawEntry JavaModelManager PerProjectInfo perProjectInfo getPerProjectInfo perProjectInfo perProjectInfo resolvedPathToRawEntries rawEntry IClasspathEntry perProjectInfo resolvedPathToRawEntries getPath rawEntry
see I Java Element public I Resource get Resource return I Resource this resource  IJavaElement IResource getResource IResource
see I Package Fragment Root public I Path get Source Attachment Path throws Java Model Exception if get Kind K BINARY return null String server Path String get Source Attachment Property if server Path String null return null int index server Path String last Index Of ATTACHMENT PROPERTY DELIMITER if index 0 no root path specified return new Path server Path String else String server Source Path String server Path String substring 0 index return new Path server Source Path String  IPackageFragmentRoot IPath getSourceAttachmentPath JavaModelException getKind K_BINARY serverPathString getSourceAttachmentProperty serverPathString serverPathString lastIndexOf ATTACHMENT_PROPERTY_DELIMITER serverPathString serverSourcePathString serverPathString serverSourcePathString
Returns the server property for this package fragment root s source attachement protected String get Source Attachment Property throws Java Model Exception String property String null Qualified Name q Name get Source Attachment Property Name try property String Resources Plugin get Workspace get Root get Persistent Property q Name if no existing source attachment information then lookup a recommendation from classpath entries if property String null I Classpath Entry recommendation find Source Attachment Recommendation if recommendation null I Path root Path recommendation get Source Attachment Root Path property String recommendation get Source Attachment Path to String root Path null NON NLS 1 ATTACHMENT PROPERTY DELIMITER root Path to String set Source Attachment Property property String else mark as being already looked up set Source Attachment Property NO SOURCE ATTACHMENT else if NO SOURCE ATTACHMENT equals property String already looked up and no source attachment found return null return property String catch Core Exception ce throw new Java Model Exception ce  getSourceAttachmentProperty JavaModelException propertyString QualifiedName qName getSourceAttachmentPropertyName propertyString ResourcesPlugin getWorkspace getRoot getPersistentProperty qName propertyString IClasspathEntry findSourceAttachmentRecommendation IPath rootPath getSourceAttachmentRootPath propertyString getSourceAttachmentPath toString rootPath ATTACHMENT_PROPERTY_DELIMITER rootPath toString setSourceAttachmentProperty propertyString setSourceAttachmentProperty NO_SOURCE_ATTACHMENT NO_SOURCE_ATTACHMENT propertyString propertyString CoreException JavaModelException
Returns the qualified name for the source attachment property of this root protected Qualified Name get Source Attachment Property Name return new Qualified Name Java Core PLUGIN ID sourceattachment this get Path toOS String NON NLS 1  QualifiedName getSourceAttachmentPropertyName QualifiedName JavaCore PLUGIN_ID getPath toOSString
public void set Source Attachment Property String property try Resources Plugin get Workspace get Root set Persistent Property this get Source Attachment Property Name property catch Core Exception ce ignore  setSourceAttachmentProperty ResourcesPlugin getWorkspace getRoot setPersistentProperty getSourceAttachmentPropertyName CoreException
For use by code Attach Source Operation code only Sets the source mapper associated with this root public void set Source Mapper Source Mapper mapper throws Java Model Exception Package Fragment Root Info get Element Info set Source Mapper mapper  AttachSourceOperation setSourceMapper SourceMapper JavaModelException PackageFragmentRootInfo getElementInfo setSourceMapper
see I Package Fragment Root public I Path get Source Attachment Root Path throws Java Model Exception if get Kind K BINARY return null String server Path String get Source Attachment Property if server Path String null return null int index server Path String last Index Of ATTACHMENT PROPERTY DELIMITER if index 1 return null String server Root Path String I Package Fragment Root DEFAULT PACKAGEROOT PATH if index server Path String length 1 server Root Path String server Path String substring index 1 return new Path server Root Path String  IPackageFragmentRoot IPath getSourceAttachmentRootPath JavaModelException getKind K_BINARY serverPathString getSourceAttachmentProperty serverPathString serverPathString lastIndexOf ATTACHMENT_PROPERTY_DELIMITER serverRootPathString IPackageFragmentRoot DEFAULT_PACKAGEROOT_PATH serverPathString serverRootPathString serverPathString serverRootPathString
see Java Element public Source Mapper get Source Mapper Source Mapper mapper try Package Fragment Root Info root Info Package Fragment Root Info get Element Info mapper root Info get Source Mapper if mapper null first call to this method I Path source Path get Source Attachment Path if source Path null I Path root Path get Source Attachment Root Path mapper this create Source Mapper source Path root Path if root Path null mapper root Path null as a side effect of calling the Source Mapper constructor the root path was computed root Path new Path mapper root Path set the property to the path of the mapped source this set Source Attachment Property source Path to String ATTACHMENT PROPERTY DELIMITER root Path to String root Info set Source Mapper mapper else remember that no source is attached root Info set Source Mapper NO SOURCE MAPPER mapper null else if mapper NO SOURCE MAPPER a previous call to this method found out that no source was attached mapper null catch Java Model Exception e no source can be attached mapper null return mapper  JavaElement SourceMapper getSourceMapper SourceMapper PackageFragmentRootInfo rootInfo PackageFragmentRootInfo getElementInfo rootInfo getSourceMapper IPath sourcePath getSourceAttachmentPath sourcePath IPath rootPath getSourceAttachmentRootPath createSourceMapper sourcePath rootPath rootPath rootPath SourceMapper rootPath rootPath setSourceAttachmentProperty sourcePath toString ATTACHMENT_PROPERTY_DELIMITER rootPath toString rootInfo setSourceMapper rootInfo setSourceMapper NO_SOURCE_MAPPER NO_SOURCE_MAPPER JavaModelException
see I Java Element public I Resource get Underlying Resource throws Java Model Exception if exists throw new Not Present Exception return get Resource  IJavaElement IResource getUnderlyingResource JavaModelException newNotPresentException getResource
see I Parent public boolean has Children throws Java Model Exception a package fragment root always has the default package as a child return true  IParent hasChildren JavaModelException
public int hash Code return this resource hash Code  hashCode hashCode
see I Package Fragment Root public boolean is Archive return false  IPackageFragmentRoot isArchive
see I Package Fragment Root public boolean is External return false  IPackageFragmentRoot isExternal
protected boolean is On Classpath I Path path this get Path try check package fragment root on classpath of its project Java Project project Java Project get Java Project I Classpath Entry classpath project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress for int i 0 length classpath length i length i I Classpath Entry entry classpath i if entry get Path equals path return true catch Java Model Exception e could not read classpath then assume it is outside return false  isOnClasspath IPath getPath JavaProject JavaProject getJavaProject IClasspathEntry getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress IClasspathEntry getPath JavaModelException
public void move I Path destination int update Resource Flags int update Model Flags I Classpath Entry sibling I Progress Monitor monitor throws Java Model Exception Move Package Fragment Root Operation op new Move Package Fragment Root Operation this destination update Resource Flags update Model Flags sibling op run Operation monitor  IPath updateResourceFlags updateModelFlags IClasspathEntry IProgressMonitor JavaModelException MovePackageFragmentRootOperation MovePackageFragmentRootOperation updateResourceFlags updateModelFlags runOperation
private Debugging purposes protected void to String Info int tab String Buffer buffer Object info buffer append this tab String tab I Path path get Path if get Java Project get Element Name equals path segment 0 if path segment Count 1 buffer append project root NON NLS 1 else buffer append path remove First Segments 1 make Relative else if is External buffer append path toOS String else buffer append path if info null buffer append not open NON NLS 1  toStringInfo StringBuffer tabString IPath getPath getJavaProject getElementName segmentCount removeFirstSegments makeRelative isExternal toOSString
Possible failures ul li ELEMENT NOT PRESENT the root supplied to the operation does not exist li INVALID ELEMENT TYPES the root is not of kind K BINARY li RELATIVE PATH the path supplied to this operation must be an absolute path ul protected void verify Attach Source I Path source Path throws Java Model Exception if exists throw new Not Present Exception else if this get Kind K BINARY throw new Java Model Exception new Java Model Status I Java Model Status Constants INVALID ELEMENT TYPES this else if source Path null source Path is Absolute throw new Java Model Exception new Java Model Status I Java Model Status Constants RELATIVE PATH source Path  ELEMENT_NOT_PRESENT INVALID_ELEMENT_TYPES K_BINARY RELATIVE_PATH verifyAttachSource IPath sourcePath JavaModelException newNotPresentException getKind K_BINARY JavaModelException JavaModelStatus IJavaModelStatusConstants INVALID_ELEMENT_TYPES sourcePath sourcePath isAbsolute JavaModelException JavaModelStatus IJavaModelStatusConstants RELATIVE_PATH sourcePath

protected Object f Non Java Resources Create and initialize a new instance of the receiver public Package Fragment Root Info this f Non Java Resources null  fNonJavaResources PackageFragmentRootInfo fNonJavaResources
Starting at this folder create non java resources for this package fragment root and add them to the non java resources collection exception Java Model Exception The resource associated with this package fragment does not exist static Object compute Folder Non Java Resources Java Project project I Container folder char inclusion Patterns char exclusion Patterns throws Java Model Exception Object non Java Resources new I Resource 5 int non Java Resources Counter 0 try I Classpath Entry classpath project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress I Resource members folder members next Resource for int i 0 max members length i max i I Resource member members i switch member get Type case I Resource FILE String file Name member get Name ignore java files that are not excluded if Util is Valid Compilation Unit Name file Name Util is Excluded member inclusion Patterns exclusion Patterns continue next Resource ignore class files if Util is Valid Class File Name file Name continue next Resource ignore zip or jar file on classpath if org eclipse jdt internal compiler util Util is Archive File Name file Name is Classpath Entry member get Full Path classpath continue next Resource break case I Resource FOLDER ignore valid packages or excluded folders that correspond to a nested pkg fragment root if Util is Valid Folder Name For Package member get Name Util is Excluded member inclusion Patterns exclusion Patterns is Classpath Entry member get Full Path classpath continue next Resource break if non Java Resources length non Java Resources Counter resize System arraycopy non Java Resources 0 non Java Resources new I Resource non Java Resources Counter 2 0 non Java Resources Counter non Java Resources non Java Resources Counter member if non Java Resources length non Java Resources Counter System arraycopy non Java Resources 0 non Java Resources new I Resource non Java Resources Counter 0 non Java Resources Counter return non Java Resources catch Core Exception e throw new Java Model Exception e  JavaModelException computeFolderNonJavaResources JavaProject IContainer inclusionPatterns exclusionPatterns JavaModelException nonJavaResources IResource nonJavaResourcesCounter IClasspathEntry getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress IResource nextResource IResource getType IResource fileName getName isValidCompilationUnitName fileName isExcluded inclusionPatterns exclusionPatterns nextResource isValidClassFileName fileName nextResource isArchiveFileName fileName isClasspathEntry getFullPath nextResource IResource isValidFolderNameForPackage getName isExcluded inclusionPatterns exclusionPatterns isClasspathEntry getFullPath nextResource nonJavaResources nonJavaResourcesCounter nonJavaResources nonJavaResources IResource nonJavaResourcesCounter nonJavaResourcesCounter nonJavaResources nonJavaResourcesCounter nonJavaResources nonJavaResourcesCounter nonJavaResources nonJavaResources IResource nonJavaResourcesCounter nonJavaResourcesCounter nonJavaResources CoreException JavaModelException
Compute the non package resources of this package fragment root private Object compute Non Java Resources I Java Project project I Resource underlying Resource Package Fragment Root handle Object non Java Resources NO NON JAVA RESOURCES try the underlying resource may be a folder or a project in the case that the project folder is actually the package fragment root if underlying Resource get Type I Resource FOLDER underlying Resource get Type I Resource PROJECT non Java Resources compute Folder Non Java Resources Java Project project I Container underlying Resource handle full Inclusion Pattern Chars handle full Exclusion Pattern Chars catch Java Model Exception e ignore return non Java Resources  computeNonJavaResources IJavaProject IResource underlyingResource PackageFragmentRoot nonJavaResources NO_NON_JAVA_RESOURCES underlyingResource getType IResource underlyingResource getType IResource nonJavaResources computeFolderNonJavaResources JavaProject IContainer underlyingResource fullInclusionPatternChars fullExclusionPatternChars JavaModelException nonJavaResources
Returns an array of non java resources contained in the receiver synchronized Object get Non Java Resources I Java Project project I Resource underlying Resource Package Fragment Root handle Object non Java Resources this f Non Java Resources if non Java Resources null non Java Resources this compute Non Java Resources project underlying Resource handle this f Non Java Resources non Java Resources return non Java Resources  getNonJavaResources IJavaProject IResource underlyingResource PackageFragmentRoot nonJavaResources fNonJavaResources nonJavaResources nonJavaResources computeNonJavaResources underlyingResource fNonJavaResources nonJavaResources nonJavaResources
Returns the kind of this root public int get Root Kind return this f Root Kind  getRootKind fRootKind
Retuns the Source Mapper for this root or code null code if this root does not have attached source protected Source Mapper get Source Mapper return this source Mapper  SourceMapper SourceMapper getSourceMapper sourceMapper
private static boolean is Classpath Entry I Path path I Classpath Entry resolved Classpath for int i 0 length resolved Classpath length i length i I Classpath Entry entry resolved Classpath i if entry get Path equals path return true return false  isClasspathEntry IPath IClasspathEntry resolvedClasspath resolvedClasspath IClasspathEntry resolvedClasspath getPath
Set the f Non Java Resources to res value void set Non Java Resources Object resources this f Non Java Resources resources  fNonJavaResources setNonJavaResources fNonJavaResources
Sets the kind of this root protected void set Root Kind int new Root Kind this f Root Kind new Root Kind  setRootKind newRootKind fRootKind newRootKind
Sets the Source Mapper for this root protected void set Source Mapper Source Mapper mapper this source Mapper mapper  SourceMapper setSourceMapper SourceMapper sourceMapper

public Reconcile Working Copy Operation I Java Element working Copy boolean creatAST int ast Level boolean force Problem Detection Working Copy Owner working Copy Owner super new I Java Element working Copy this createAST creatAST this ast Level ast Level this force Problem Detection force Problem Detection this working Copy Owner working Copy Owner  ReconcileWorkingCopyOperation IJavaElement workingCopy astLevel forceProblemDetection WorkingCopyOwner workingCopyOwner IJavaElement workingCopy astLevel astLevel forceProblemDetection forceProblemDetection workingCopyOwner workingCopyOwner
exception Java Model Exception if setting the source of the original compilation unit fails protected void execute Operation throws Java Model Exception if this progress Monitor null if this progress Monitor is Canceled return this progress Monitor begin Task Util bind element reconciling 2 NON NLS 1 Compilation Unit working Copy get Working Copy boolean was Consistent working Copy is Consistent try if was Consistent create the delta builder this remembers the current content of the cu Java Element Delta Builder delta Builder new Java Element Delta Builder working Copy update the element infos with the content of the working copy this ast working Copy make Consistent this createAST this ast Level this progress Monitor delta Builder build Deltas if progress Monitor null progress Monitor worked 2 register the deltas if delta Builder delta null add Reconcile Delta working Copy delta Builder delta else force problem detection if structure was consistent if force Problem Detection I Problem Requestor problem Requestor working Copy get Per Working Copy Info if problem Requestor null problem Requestor is Active Compilation Unit Declaration unit null try problem Requestor begin Reporting char contents working Copy get Contents unit Compilation Unit Problem Finder process working Copy contents this working Copy Owner problem Requestor false don t cleanup cu this progress Monitor problem Requestor end Reporting if progress Monitor null progress Monitor worked 1 if this createAST unit null Map options working Copy get Java Project get Options true this ast AST convert Compilation Unit this ast Level unit contents options true is Resolved this progress Monitor if progress Monitor null progress Monitor worked 1 finally if unit null unit clean Up finally if progress Monitor null progress Monitor done  JavaModelException executeOperation JavaModelException progressMonitor progressMonitor isCanceled progressMonitor beginTask CompilationUnit workingCopy getWorkingCopy wasConsistent workingCopy isConsistent wasConsistent JavaElementDeltaBuilder deltaBuilder JavaElementDeltaBuilder workingCopy workingCopy makeConsistent astLevel progressMonitor deltaBuilder buildDeltas progressMonitor progressMonitor deltaBuilder addReconcileDelta workingCopy deltaBuilder forceProblemDetection IProblemRequestor problemRequestor workingCopy getPerWorkingCopyInfo problemRequestor problemRequestor isActive CompilationUnitDeclaration problemRequestor beginReporting workingCopy getContents CompilationUnitProblemFinder workingCopy workingCopyOwner problemRequestor progressMonitor problemRequestor endReporting progressMonitor progressMonitor workingCopy getJavaProject getOptions convertCompilationUnit astLevel isResolved progressMonitor progressMonitor progressMonitor cleanUp progressMonitor progressMonitor
Returns the working copy this operation is working on protected Compilation Unit get Working Copy return Compilation Unit get Element To Process  CompilationUnit getWorkingCopy CompilationUnit getElementToProcess
see Java Model Operation is Read Only public boolean is Read Only return true  JavaModelOperation isReadOnly isReadOnly
protected I Java Model Status verify I Java Model Status status super verify if status isOK return status Compilation Unit working Copy get Working Copy if working Copy is Working Copy return new Java Model Status I Java Model Status Constants ELEMENT DOES NOT EXIST working Copy was destroyed return status  IJavaModelStatus IJavaModelStatus CompilationUnit workingCopy getWorkingCopy workingCopy isWorkingCopy JavaModelStatus IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST workingCopy

protected Array List f Root Elements Creates an empty region see I Region public Region f Root Elements new Array List 1  ArrayList fRootElements IRegion fRootElements ArrayList
see I Region add I Java Element public void add I Java Element element if contains element new element added to region remove All Children element f Root Elements add element f Root Elements trim To Size  IRegion IJavaElement IJavaElement removeAllChildren fRootElements fRootElements trimToSize
see I Region public boolean contains I Java Element element int size f Root Elements size Array List parents get Ancestors element for int i 0 i size i I Java Element a Top I Java Element f Root Elements get i if a Top equals element return true for int j 0 p Size parents size j p Size j if a Top equals parents get j an ancestor is already included return true return false  IRegion IJavaElement fRootElements ArrayList getAncestors IJavaElement aTop IJavaElement fRootElements aTop pSize pSize aTop
Returns a collection of all the parents of this element in bottom up order private Array List get Ancestors I Java Element element Array List parents new Array List I Java Element parent element get Parent while parent null parents add parent parent parent get Parent parents trim To Size return parents  ArrayList getAncestors IJavaElement ArrayList ArrayList IJavaElement getParent getParent trimToSize
see I Region public I Java Element get Elements int size f Root Elements size I Java Element roots new I Java Element size for int i 0 i size i roots i I Java Element f Root Elements get i return roots  IRegion IJavaElement getElements fRootElements IJavaElement IJavaElement IJavaElement fRootElements
see I Region remove I Java Element public boolean remove I Java Element element remove All Children element return f Root Elements remove element  IRegion IJavaElement IJavaElement removeAllChildren fRootElements
Removes any children of this element that are contained within this region as this parent is about to be added to the region p Children are all children not just direct children private void remove All Children I Java Element element if element instanceof I Parent Array List new Root Elements new Array List for int i 0 size f Root Elements size i size i I Java Element current Root I Java Element f Root Elements get i walk the current root hierarchy I Java Element parent current Root get Parent boolean is Child false while parent null if parent equals element is Child true break parent parent get Parent if is Child new Root Elements add current Root f Root Elements new Root Elements  removeAllChildren IJavaElement IParent ArrayList newRootElements ArrayList fRootElements IJavaElement currentRoot IJavaElement fRootElements IJavaElement currentRoot getParent isChild isChild getParent isChild newRootElements currentRoot fRootElements newRootElements
Returns a printable representation of this region public String to String String Buffer buffer new String Buffer I Java Element roots get Elements buffer append for int i 0 i roots length i buffer append roots i get Element Name if i roots length 1 buffer append NON NLS 1 buffer append return buffer to String  toString StringBuffer StringBuffer IJavaElement getElements getElementName toString

public class Rename Elements Operation extends Move Elements Operation When executed this operation will rename the specified elements with the given names in the corresponding destinations public Rename Elements Operation I Java Element elements I Java Element destinations String new Names boolean force a rename is a move to the same parent with a new name specified these elements are from different parents super elements destinations force set Renamings new Names  RenameElementsOperation MoveElementsOperation RenameElementsOperation IJavaElement IJavaElement newNames setRenamings newNames
see Multi Operation protected String get Main Task Name return Util bind operation rename Element Progress NON NLS 1  MultiOperation getMainTaskName renameElementProgress
see Copy Elements Operation is Rename protected boolean is Rename return true  CopyElementsOperation isRename isRename
see Multi Operation protected I Java Model Status verify I Java Model Status status super verify if status isOK return status if this renamings List null this renamings List length 0 return new Java Model Status I Java Model Status Constants NULL NAME return Java Model Status VERIFIED OK  MultiOperation IJavaModelStatus IJavaModelStatus renamingsList renamingsList JavaModelStatus IJavaModelStatusConstants NULL_NAME JavaModelStatus VERIFIED_OK
see Multi Operation protected void verify I Java Element element throws Java Model Exception int element Type element get Element Type if element null element exists error I Java Model Status Constants ELEMENT DOES NOT EXIST element if element is Read Only error I Java Model Status Constants READ ONLY element if element instanceof I Source Reference error I Java Model Status Constants INVALID ELEMENT TYPES element if element Type I Java Element TYPE element Type I Java Element INITIALIZER error I Java Model Status Constants INVALID ELEMENT TYPES element Member local Context if element instanceof Member local Context Member element get Outer Most Local Context null local Context element JDOM doesn t support source manipulation in local anonymous types error I Java Model Status Constants INVALID ELEMENT TYPES element verify Renaming element  MultiOperation IJavaElement JavaModelException elementType getElementType IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST isReadOnly IJavaModelStatusConstants READ_ONLY ISourceReference IJavaModelStatusConstants INVALID_ELEMENT_TYPES elementType IJavaElement elementType IJavaElement IJavaModelStatusConstants INVALID_ELEMENT_TYPES localContext localContext getOuterMostLocalContext localContext IJavaModelStatusConstants INVALID_ELEMENT_TYPES verifyRenaming

public class Rename Resource Elements Operation extends Move Resource Elements Operation When executed this operation will rename the specified elements with the given names in the corresponding destinations public Rename Resource Elements Operation I Java Element elements I Java Element destinations String new Names boolean force a rename is a move to the same parent with a new name specified these elements are from different parents super elements destinations force set Renamings new Names  RenameResourceElementsOperation MoveResourceElementsOperation RenameResourceElementsOperation IJavaElement IJavaElement newNames setRenamings newNames
see Multi Operation protected String get Main Task Name return Util bind operation rename Resource Progress NON NLS 1  MultiOperation getMainTaskName renameResourceProgress
see Copy Resource Elements Operation is Rename protected boolean is Rename return true  CopyResourceElementsOperation isRename isRename
see Multi Operation protected void verify I Java Element element throws Java Model Exception super verify element int element Type element get Element Type if element Type I Java Element COMPILATION UNIT element Type I Java Element PACKAGE FRAGMENT error I Java Model Status Constants INVALID ELEMENT TYPES element if element Type I Java Element COMPILATION UNIT Compilation Unit cu Compilation Unit element if cu is Working Copy cu is Primary error I Java Model Status Constants INVALID ELEMENT TYPES element verify Renaming element  MultiOperation IJavaElement JavaModelException elementType getElementType elementType IJavaElement COMPILATION_UNIT elementType IJavaElement PACKAGE_FRAGMENT IJavaModelStatusConstants INVALID_ELEMENT_TYPES elementType IJavaElement COMPILATION_UNIT CompilationUnit CompilationUnit isWorkingCopy isPrimary IJavaModelStatusConstants INVALID_ELEMENT_TYPES verifyRenaming

Creates a Searchable Environment on the given project public Searchable Environment Java Project project org eclipse jdt core I Compilation Unit working Copies throws Java Model Exception this project project this name Lookup project new Name Lookup working Copies Create search scope with visible entry on the project s classpath this search Scope Search Engine create Java Search Scope this project get All Package Fragment Roots  SearchableEnvironment SearchableEnvironment JavaProject ICompilationUnit workingCopies JavaModelException nameLookup newNameLookup workingCopies searchScope SearchEngine createJavaSearchScope getAllPackageFragmentRoots
Creates a Searchable Environment on the given project public Searchable Environment Java Project project Working Copy Owner owner throws Java Model Exception this project project this name Lookup project new Name Lookup owner Create search scope with visible entry on the project s classpath this search Scope Search Engine create Java Search Scope this project get All Package Fragment Roots  SearchableEnvironment SearchableEnvironment JavaProject WorkingCopyOwner JavaModelException nameLookup newNameLookup searchScope SearchEngine createJavaSearchScope getAllPackageFragmentRoots
Returns the given type in the the given package if it exists otherwise code null code protected Name Environment Answer find String type Name String package Name if package Name null package Name I Package Fragment DEFAULT PACKAGE NAME I Type type this name Lookup find Type type Name package Name false Name Lookup ACCEPT CLASSES Name Lookup ACCEPT INTERFACES if type null if type instanceof Binary Type try return new Name Environment Answer I Binary Type Binary Type type get Element Info catch Java Model Exception npe return null else Source Type try retrieve the requested type Source Type Element Info source Type Source Type Element Info Source Type type get Element Info I Source Type top Level Type source Type while top Level Type get Enclosing Type null top Level Type top Level Type get Enclosing Type find all siblings other types declared in same unit since may be used for name resolution I Type types source Type get Handle get Compilation Unit get Types I Source Type source Types new I Source Type types length in the resulting collection ensure the requested type is the first one source Types 0 source Type int length types length for int i 0 index 1 i length i I Source Type other Type I Source Type Java Element types i get Element Info if other Type equals top Level Type index length check that the index is in bounds see https bugs eclipse org bugs show bug cgi id 62861 source Types index other Type return new Name Environment Answer source Types catch Java Model Exception npe return null return null  NameEnvironmentAnswer typeName packageName packageName packageName IPackageFragment DEFAULT_PACKAGE_NAME IType nameLookup findType typeName packageName NameLookup ACCEPT_CLASSES NameLookup ACCEPT_INTERFACES BinaryType NameEnvironmentAnswer IBinaryType BinaryType getElementInfo JavaModelException SourceType SourceTypeElementInfo sourceType SourceTypeElementInfo SourceType getElementInfo ISourceType topLevelType sourceType topLevelType getEnclosingType topLevelType topLevelType getEnclosingType IType sourceType getHandle getCompilationUnit getTypes ISourceType sourceTypes ISourceType sourceTypes sourceType ISourceType otherType ISourceType JavaElement getElementInfo otherType topLevelType show_bug sourceTypes otherType NameEnvironmentAnswer sourceTypes JavaModelException
see I Searchable Name Environment find Packages char I Search Requestor public void find Packages char prefix I Search Requestor requestor this name Lookup seek Package Fragments new String prefix true new Searchable Environment Requestor requestor  ISearchableNameEnvironment findPackages ISearchRequestor findPackages ISearchRequestor nameLookup seekPackageFragments SearchableEnvironmentRequestor
see org eclipse jdt internal compiler env I Name Environment find Type char public Name Environment Answer find Type char compound Type Name if compound Type Name null return null int length compound Type Name length if length 1 if length 0 return null return find new String compound Type Name 0 null int lengthM1 length 1 char package Name new char lengthM1 System arraycopy compound Type Name 0 package Name 0 lengthM1 return find new String compound Type Name lengthM1 Char Operation to String package Name  INameEnvironment findType NameEnvironmentAnswer findType compoundTypeName compoundTypeName compoundTypeName compoundTypeName packageName compoundTypeName packageName compoundTypeName CharOperation toString packageName
see org eclipse jdt internal compiler env I Name Environment find Type char char public Name Environment Answer find Type char name char package Name if name null return null return find new String name package Name null package Name length 0 null Char Operation to String package Name  INameEnvironment findType NameEnvironmentAnswer findType packageName packageName packageName CharOperation toString packageName
see I Searchable Name Environment find Types char I Search Requestor public void find Types char prefix final I Search Requestor storage if true find Types new String prefix storage Name Lookup ACCEPT CLASSES Name Lookup ACCEPT INTERFACES return try final String exclude Path if this unit To Skip null if this unit To Skip instanceof I Java Element revert to model investigation find Types new String prefix storage Name Lookup ACCEPT CLASSES Name Lookup ACCEPT INTERFACES return exclude Path I Java Element this unit To Skip get Path to String else exclude Path null int last Dot Index Char Operation last Index Of prefix char qualification simple Name if last Dot Index 0 qualification null simple Name Char Operation to Lower Case prefix else qualification Char Operation subarray prefix 0 last Dot Index simple Name Char Operation to Lower Case Char Operation subarray prefix last Dot Index 1 prefix length I Progress Monitor progress Monitor new I Progress Monitor boolean is Canceled false public void begin Task String name int total Work implements interface method public void done implements interface method public void internal Worked double work implements interface method public boolean is Canceled return is Canceled public void set Canceled boolean value is Canceled value public void set Task Name String name implements interface method public void sub Task String name implements interface method public void worked int work implements interface method I Type Name Requestor name Requestor new I Type Name Requestor public void accept Class char package Name char simple Type Name char enclosing Type Names String path if exclude Path null exclude Path equals path return if enclosing Type Names null enclosing Type Names length 0 return accept only top level types storage accept Class package Name simple Type Name I Constants Acc Public public void accept Interface char package Name char simple Type Name char enclosing Type Names String path if exclude Path null exclude Path equals path return if enclosing Type Names null enclosing Type Names length 0 return accept only top level types storage accept Interface package Name simple Type Name I Constants Acc Public try new Search Engine search All Type Names qualification simple Name Search Pattern R PREFIX MATCH not case sensitive I Java Search Constants TYPE this search Scope name Requestor CANCEL IF NOT READY TO SEARCH progress Monitor catch Operation Canceled Exception e find Types new String prefix storage Name Lookup ACCEPT CLASSES Name Lookup ACCEPT INTERFACES catch Java Model Exception e find Types new String prefix storage Name Lookup ACCEPT CLASSES Name Lookup ACCEPT INTERFACES  ISearchableNameEnvironment findTypes ISearchRequestor findTypes ISearchRequestor findTypes NameLookup ACCEPT_CLASSES NameLookup ACCEPT_INTERFACES excludePath unitToSkip unitToSkip IJavaElement findTypes NameLookup ACCEPT_CLASSES NameLookup ACCEPT_INTERFACES excludePath IJavaElement unitToSkip getPath toString excludePath lastDotIndex CharOperation lastIndexOf simpleName lastDotIndex simpleName CharOperation toLowerCase CharOperation lastDotIndex simpleName CharOperation toLowerCase CharOperation lastDotIndex IProgressMonitor progressMonitor IProgressMonitor isCanceled beginTask totalWork internalWorked isCanceled isCanceled setCanceled isCanceled setTaskName subTask ITypeNameRequestor nameRequestor ITypeNameRequestor acceptClass packageName simpleTypeName enclosingTypeNames excludePath excludePath enclosingTypeNames enclosingTypeNames acceptClass packageName simpleTypeName IConstants AccPublic acceptInterface packageName simpleTypeName enclosingTypeNames excludePath excludePath enclosingTypeNames enclosingTypeNames acceptInterface packageName simpleTypeName IConstants AccPublic SearchEngine searchAllTypeNames simpleName SearchPattern R_PREFIX_MATCH IJavaSearchConstants searchScope nameRequestor CANCEL_IF_NOT_READY_TO_SEARCH progressMonitor OperationCanceledException findTypes NameLookup ACCEPT_CLASSES NameLookup ACCEPT_INTERFACES JavaModelException findTypes NameLookup ACCEPT_CLASSES NameLookup ACCEPT_INTERFACES
Returns all types whose name starts with the given qualified code prefix code If the code prefix code is unqualified all types whose simple name matches the code prefix code are returned private void find Types String prefix I Search Requestor storage int type Searchable Environment Requestor requestor new Searchable Environment Requestor storage this unit To Skip int index prefix last Index Of if index 1 this name Lookup seek Types prefix null true type requestor else String package Name prefix substring 0 index Java Element Requestor element Requestor new Java Element Requestor this name Lookup seek Package Fragments package Name false element Requestor I Package Fragment fragments element Requestor get Package Fragments if fragments null String class Name prefix substring index 1 for int i 0 length fragments length i length i if fragments i null this name Lookup seek Types class Name fragments i true type requestor  findTypes ISearchRequestor SearchableEnvironmentRequestor SearchableEnvironmentRequestor unitToSkip lastIndexOf nameLookup seekTypes packageName JavaElementRequestor elementRequestor JavaElementRequestor nameLookup seekPackageFragments packageName elementRequestor IPackageFragment elementRequestor getPackageFragments className nameLookup seekTypes className
see org eclipse jdt internal compiler env I Name Environment is Package char char public boolean is Package char parent Package Name char sub Package Name if sub Package Name null Char Operation contains sub Package Name return false if parent Package Name null parent Package Name length 0 return is Top Level Package sub Package Name for int i 0 length parent Package Name length i length i if parent Package Name i null Char Operation contains parent Package Name i return false String package Name new String Char Operation concat With parent Package Name sub Package Name return this name Lookup find Package Fragments package Name false null  INameEnvironment isPackage isPackage parentPackageName subPackageName subPackageName CharOperation subPackageName parentPackageName parentPackageName isTopLevelPackage subPackageName parentPackageName parentPackageName CharOperation parentPackageName packageName CharOperation concatWith parentPackageName subPackageName nameLookup findPackageFragments packageName
public boolean is Top Level Package char package Name return package Name null Char Operation contains package Name this name Lookup find Package Fragments new String package Name false null  isTopLevelPackage packageName packageName CharOperation packageName nameLookup findPackageFragments packageName
Returns a printable string for the array protected String to String Char char name return NON NLS 1 new String name NON NLS 1  toStringChar
Returns a printable string for the array protected String to String Char Char char names String Buffer result new String Buffer for int i 0 i names length i result append to String Char names i return result to String  toStringCharChar StringBuffer StringBuffer toStringChar toString
public void cleanup nothing to do 

protected I Compilation Unit f Unit To Skip Constructs a Searchable Environment Requestor that wraps the given Search Requestor public Searchable Environment Requestor I Search Requestor requestor f Requestor requestor f Unit To Skip null  ICompilationUnit fUnitToSkip SearchableEnvironmentRequestor SearchRequestor SearchableEnvironmentRequestor ISearchRequestor fRequestor fUnitToSkip
Constructs a Searchable Environment Requestor that wraps the given Search Requestor The requestor will not accept types in the code unit To Skip code public Searchable Environment Requestor I Search Requestor requestor I Compilation Unit unit To Skip f Requestor requestor f Unit To Skip unit To Skip  SearchableEnvironmentRequestor SearchRequestor unitToSkip SearchableEnvironmentRequestor ISearchRequestor ICompilationUnit unitToSkip fRequestor fUnitToSkip unitToSkip
Do nothing a Search Requestor does not accept initializers so there is no need to forward this results see I Java Element Requestor public void accept Initializer I Initializer initializer implements interface method  SearchRequestor IJavaElementRequestor acceptInitializer IInitializer
see I Java Element Requestor public void accept Package Fragment I Package Fragment package Fragment f Requestor accept Package package Fragment get Element Name to Char Array  IJavaElementRequestor acceptPackageFragment IPackageFragment packageFragment fRequestor acceptPackage packageFragment getElementName toCharArray
see I Java Element Requestor public void accept Type I Type type try if f Unit To Skip null f Unit To Skip equals type get Compilation Unit return if type is Class f Requestor accept Class type get Package Fragment get Element Name to Char Array type get Element Name to Char Array type get Flags else f Requestor accept Interface type get Package Fragment get Element Name to Char Array type get Element Name to Char Array type get Flags catch Java Model Exception jme ignore  IJavaElementRequestor acceptType IType fUnitToSkip fUnitToSkip getCompilationUnit isClass fRequestor acceptClass getPackageFragment getElementName toCharArray getElementName toCharArray getFlags fRequestor acceptInterface getPackageFragment getElementName toCharArray getElementName toCharArray getFlags JavaModelException

see I Java Search Scope includes Binaries deprecated public boolean includes Binaries return true  IJavaSearchScope includesBinaries includesBinaries
see I Java Search Scope includes Classpaths deprecated public boolean includes Classpaths return true  IJavaSearchScope includesClasspaths includesClasspaths
Returns whether the internal state was refreshed public abstract void process Delta I Java Element Delta delta  processDelta IJavaElementDelta
see I Java Search Scope set Includes Binaries boolean deprecated public void set Includes Binaries boolean includes Binaries implements interface method  IJavaSearchScope setIncludesBinaries setIncludesBinaries includesBinaries
see I Java Search Scope set Includes Classpaths boolean deprecated public void set Includes Classpaths boolean includes Classpaths implements interface method  IJavaSearchScope setIncludesClasspaths setIncludesClasspaths includesClasspaths

public void add I Resource element if this element Count this elements length System arraycopy this elements 0 this elements new I Resource this element Count 2 0 this element Count elements element Count element  IResource elementCount IResource elementCount elementCount elementCount
public Hierarchy Scope I Type type Working Copy Owner owner throws Java Model Exception this focus Type type this owner owner this enclosing Projects And Jars this compute Projects And Jars type resource path I Package Fragment Root root I Package Fragment Root type get Package Fragment get Parent if root is Archive I Path jar Path root get Path Object target Java Model get Target Resources Plugin get Workspace get Root jar Path true String zip File Name if target instanceof I File internal jar zip File Name jar Path to String else if target instanceof File external jar zip File Name File target get Path else return unknown target this focus Path zip File Name JAR FILE ENTRY SEPARATOR type get Fully Qualified Name replace SUFFIX STRING class else this focus Path type get Path to String this needs Refresh true disabled for now as this could be expensive Java Model Manager get Java Model Manager remember Scope this  HierarchyScope IType WorkingCopyOwner JavaModelException focusType enclosingProjectsAndJars computeProjectsAndJars IPackageFragmentRoot IPackageFragmentRoot getPackageFragment getParent isArchive IPath jarPath getPath JavaModel getTarget ResourcesPlugin getWorkspace getRoot jarPath zipFileName IFile zipFileName jarPath toString zipFileName getPath focusPath zipFileName JAR_FILE_ENTRY_SEPARATOR getFullyQualifiedName SUFFIX_STRING_class focusPath getPath toString needsRefresh JavaModelManager getJavaModelManager rememberScope
private void build Resource Vector Hash Map resources new Hash Map Hash Map paths new Hash Map this types this hierarchy get All Types I Workspace Root workspace Root Resources Plugin get Workspace get Root for int i 0 i this types length i I Type type this types i I Resource resource type get Resource if resource null resources get resource null resources put resource resource add resource I Package Fragment Root root I Package Fragment Root type get Package Fragment get Parent if root instanceof Jar Package Fragment Root type in a jar Jar Package Fragment Root jar Jar Package Fragment Root root I Path jar Path jar get Path Object target Java Model get Target workspace Root jar Path true String zip File Name if target instanceof I File internal jar zip File Name jar Path to String else if target instanceof File external jar zip File Name File target get Path else continue unknown target String resource Path zip File Name JAR FILE ENTRY SEPARATOR type get Fully Qualified Name replace SUFFIX STRING class this resource Paths add resource Path paths put jar Path type else type is a project paths put type get Java Project get Project get Full Path type this enclosing Projects And Jars new I Path paths size int i 0 for Iterator iter paths key Set iterator iter has Next this enclosing Projects And Jars i I Path iter next  buildResourceVector HashMap HashMap HashMap HashMap getAllTypes IWorkspaceRoot workspaceRoot ResourcesPlugin getWorkspace getRoot IType IResource getResource IPackageFragmentRoot IPackageFragmentRoot getPackageFragment getParent JarPackageFragmentRoot JarPackageFragmentRoot JarPackageFragmentRoot IPath jarPath getPath JavaModel getTarget workspaceRoot jarPath zipFileName IFile zipFileName jarPath toString zipFileName getPath resourcePath zipFileName JAR_FILE_ENTRY_SEPARATOR getFullyQualifiedName SUFFIX_STRING_class resourcePaths resourcePath jarPath getJavaProject getProject getFullPath enclosingProjectsAndJars IPath keySet hasNext enclosingProjectsAndJars IPath
private I Path compute Projects And Jars I Type type throws Java Model Exception Hash Set set new Hash Set I Package Fragment Root root I Package Fragment Root type get Package Fragment get Parent if root is Archive add the root set add root get Path add all projects that reference this archive and their dependents I Path root Path root get Path I Java Model model Java Model Manager get Java Model Manager get Java Model I Java Project projects model get Java Projects Hash Set visited new Hash Set for int i 0 i projects length i Java Project project Java Project projects i I Classpath Entry classpath project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress for int j 0 j classpath length j if root Path equals classpath j get Path add the project and its binary pkg fragment roots I Package Fragment Root roots project get All Package Fragment Roots set add project get Path for int k 0 k roots length k I Package Fragment Root pkg Fragment Root roots k if pkg Fragment Root get Kind I Package Fragment Root K BINARY set add pkg Fragment Root get Path add the dependent projects this compute Dependents project set visited break else add all the project s pkg fragment roots I Java Project project I Java Project root get Parent I Package Fragment Root roots project get All Package Fragment Roots for int i 0 i roots length i I Package Fragment Root pkg Fragment Root roots i if pkg Fragment Root get Kind I Package Fragment Root K BINARY set add pkg Fragment Root get Path else set add pkg Fragment Root get Parent get Path add the dependent projects this compute Dependents project set new Hash Set I Path result new I Path set size set to Array result return result  IPath computeProjectsAndJars IType JavaModelException HashSet HashSet IPackageFragmentRoot IPackageFragmentRoot getPackageFragment getParent isArchive getPath IPath rootPath getPath IJavaModel JavaModelManager getJavaModelManager getJavaModel IJavaProject getJavaProjects HashSet HashSet JavaProject JavaProject IClasspathEntry getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress rootPath getPath IPackageFragmentRoot getAllPackageFragmentRoots getPath IPackageFragmentRoot pkgFragmentRoot pkgFragmentRoot getKind IPackageFragmentRoot K_BINARY pkgFragmentRoot getPath computeDependents IJavaProject IJavaProject getParent IPackageFragmentRoot getAllPackageFragmentRoots IPackageFragmentRoot pkgFragmentRoot pkgFragmentRoot getKind IPackageFragmentRoot K_BINARY pkgFragmentRoot getPath pkgFragmentRoot getParent getPath computeDependents HashSet IPath IPath toArray
private void compute Dependents I Java Project project Hash Set set Hash Set visited if visited contains project return visited add project I Project dependents project get Project get Referencing Projects for int i 0 i dependents length i try I Java Project dependent Java Core create dependents i I Package Fragment Root roots dependent get Package Fragment Roots set add dependent get Path for int j 0 j roots length j I Package Fragment Root pkg Fragment Root roots j if pkg Fragment Root is Archive set add pkg Fragment Root get Path this compute Dependents dependent set visited catch Java Model Exception e project is not a java project  computeDependents IJavaProject HashSet HashSet IProject getProject getReferencingProjects IJavaProject JavaCore IPackageFragmentRoot getPackageFragmentRoots getPath IPackageFragmentRoot pkgFragmentRoot pkgFragmentRoot isArchive pkgFragmentRoot getPath computeDependents JavaModelException
public boolean encloses String resource Path if this hierarchy null if resource Path equals this focus Path return true else if this needs Refresh try this initialize catch Java Model Exception e return false else the scope is used only to find enclosing projects and jars clients is responsible for filtering out elements not in the hierarchy see Search Engine return true if this needs Refresh try this refresh catch Java Model Exception e return false int separator Index resource Path index Of JAR FILE ENTRY SEPARATOR if separator Index 1 return this resource Paths contains resource Path else for int i 0 i this element Count i if resource Path starts With this elements i get Full Path to String return true return false  resourcePath resourcePath focusPath needsRefresh JavaModelException SearchEngine needsRefresh JavaModelException separatorIndex resourcePath indexOf JAR_FILE_ENTRY_SEPARATOR separatorIndex resourcePaths resourcePath elementCount resourcePath startsWith getFullPath toString
public boolean encloses I Java Element element if this hierarchy null if this focus Type equals element get Ancestor I Java Element TYPE return true else if this needs Refresh try this initialize catch Java Model Exception e return false else the scope is used only to find enclosing projects and jars clients is responsible for filtering out elements not in the hierarchy see Search Engine return true if this needs Refresh try this refresh catch Java Model Exception e return false I Type type null if element instanceof I Type type I Type element else if element instanceof I Member type I Member element get Declaring Type if type null if this hierarchy contains type return true else be flexible look at original element see bug 14106 Declarations in Hierarchy does not find declarations in hierarchy I Type original if type is Binary original I Type type get Primary Element null return this hierarchy contains original return false  IJavaElement focusType getAncestor IJavaElement needsRefresh JavaModelException SearchEngine needsRefresh JavaModelException IType IType IType IMember IMember getDeclaringType IType isBinary IType getPrimaryElement
public I Path enclosing Projects And Jars if this needs Refresh try this refresh catch Java Model Exception e return new I Path 0 return this enclosing Projects And Jars  IPath enclosingProjectsAndJars needsRefresh JavaModelException IPath enclosingProjectsAndJars
protected void initialize throws Java Model Exception this resource Paths new Hash Set this elements new I Resource 5 this element Count 0 this needs Refresh false if this hierarchy null this hierarchy this focus Type new Type Hierarchy this owner null else this hierarchy refresh null this build Resource Vector  JavaModelException resourcePaths HashSet IResource elementCount needsRefresh focusType newTypeHierarchy buildResourceVector
see Abstract Search Scope process Delta I Java Element Delta public void process Delta I Java Element Delta delta if this needs Refresh return this needs Refresh this hierarchy null false Type Hierarchy this hierarchy is Affected delta  AbstractSearchScope processDelta IJavaElementDelta processDelta IJavaElementDelta needsRefresh needsRefresh TypeHierarchy isAffected
protected void refresh throws Java Model Exception if this hierarchy null this initialize  JavaModelException
public String to String return Hierarchy Scope on Java Element this focus Type to String With Ancestors NON NLS 1  toString HierarchyScope JavaElement focusType toStringWithAncestors

Search Document document public Abstract Indexer Search Document document this document document  SearchDocument AbstractIndexer SearchDocument
public void add Class Declaration int modifiers char package Name char name char enclosing Type Names char superclass char superinterfaces add Index Entry TYPE DECL Type Declaration Pattern create Index Key name package Name enclosing Type Names CLASS SUFFIX if superclass null add Type Reference superclass add Index Entry SUPER REF Super Type Reference Pattern create Index Key modifiers package Name name enclosing Type Names CLASS SUFFIX superclass CLASS SUFFIX if superinterfaces null for int i 0 max superinterfaces length i max i add Type Reference superinterfaces i add Index Entry SUPER REF Super Type Reference Pattern create Index Key modifiers package Name name enclosing Type Names CLASS SUFFIX superinterfaces i INTERFACE SUFFIX  addClassDeclaration packageName enclosingTypeNames addIndexEntry TYPE_DECL TypeDeclarationPattern createIndexKey packageName enclosingTypeNames CLASS_SUFFIX addTypeReference addIndexEntry SUPER_REF SuperTypeReferencePattern createIndexKey packageName enclosingTypeNames CLASS_SUFFIX CLASS_SUFFIX addTypeReference addIndexEntry SUPER_REF SuperTypeReferencePattern createIndexKey packageName enclosingTypeNames CLASS_SUFFIX INTERFACE_SUFFIX
public void add Constructor Declaration char type Name char parameter Types char exception Types int arg Count parameter Types null 0 parameter Types length add Index Entry CONSTRUCTOR DECL Constructor Pattern create Index Key Char Operation last Segment type Name arg Count for int i 0 i arg Count i add Type Reference parameter Types i if exception Types null for int i 0 max exception Types length i max i add Type Reference exception Types i  addConstructorDeclaration typeName parameterTypes exceptionTypes argCount parameterTypes parameterTypes addIndexEntry CONSTRUCTOR_DECL ConstructorPattern createIndexKey CharOperation lastSegment typeName argCount argCount addTypeReference parameterTypes exceptionTypes exceptionTypes addTypeReference exceptionTypes
public void add Constructor Reference char type Name int arg Count char simple Type Name Char Operation last Segment type Name add Type Reference simple Type Name add Index Entry CONSTRUCTOR REF Constructor Pattern create Index Key simple Type Name arg Count  addConstructorReference typeName argCount simpleTypeName CharOperation lastSegment typeName addTypeReference simpleTypeName addIndexEntry CONSTRUCTOR_REF ConstructorPattern createIndexKey simpleTypeName argCount
add Index Entry CONSTRUCTOR REF Constructor Pattern create Index Key simple Type Name arg Count public void add Field Declaration char type Name char field Name add Index Entry FIELD DECL Field Pattern create Index Key field Name add Type Reference type Name  addIndexEntry CONSTRUCTOR_REF ConstructorPattern createIndexKey simpleTypeName argCount addFieldDeclaration typeName fieldName addIndexEntry FIELD_DECL FieldPattern createIndexKey fieldName addTypeReference typeName
add Type Reference type Name public void add Field Reference char field Name add Name Reference field Name  addTypeReference typeName addFieldReference fieldName addNameReference fieldName
add Name Reference field Name protected void add Index Entry char category char key this document add Index Entry category key  addNameReference fieldName addIndexEntry addIndexEntry
public void add Interface Declaration int modifiers char package Name char name char enclosing Type Names char superinterfaces add Index Entry TYPE DECL Type Declaration Pattern create Index Key name package Name enclosing Type Names INTERFACE SUFFIX if superinterfaces null for int i 0 max superinterfaces length i max i add Type Reference superinterfaces i add Index Entry SUPER REF Super Type Reference Pattern create Index Key modifiers package Name name enclosing Type Names INTERFACE SUFFIX superinterfaces i INTERFACE SUFFIX  addInterfaceDeclaration packageName enclosingTypeNames addIndexEntry TYPE_DECL TypeDeclarationPattern createIndexKey packageName enclosingTypeNames INTERFACE_SUFFIX addTypeReference addIndexEntry SUPER_REF SuperTypeReferencePattern createIndexKey packageName enclosingTypeNames INTERFACE_SUFFIX INTERFACE_SUFFIX
public void add Method Declaration char method Name char parameter Types char return Type char exception Types int arg Count parameter Types null 0 parameter Types length add Index Entry METHOD DECL Method Pattern create Index Key method Name arg Count for int i 0 i arg Count i add Type Reference parameter Types i if exception Types null for int i 0 max exception Types length i max i add Type Reference exception Types i if return Type null add Type Reference return Type  addMethodDeclaration methodName parameterTypes returnType exceptionTypes argCount parameterTypes parameterTypes addIndexEntry METHOD_DECL MethodPattern createIndexKey methodName argCount argCount addTypeReference parameterTypes exceptionTypes exceptionTypes addTypeReference exceptionTypes returnType addTypeReference returnType
add Type Reference return Type public void add Method Reference char method Name int arg Count add Index Entry METHOD REF Method Pattern create Index Key method Name arg Count  addTypeReference returnType addMethodReference methodName argCount addIndexEntry METHOD_REF MethodPattern createIndexKey methodName argCount
add Index Entry METHOD REF Method Pattern create Index Key method Name arg Count public void add Name Reference char name add Index Entry REF name  addIndexEntry METHOD_REF MethodPattern createIndexKey methodName argCount addNameReference addIndexEntry
add Index Entry REF name public void add Type Reference char type Name add Name Reference Char Operation last Segment type Name  addIndexEntry addTypeReference typeName addNameReference CharOperation lastSegment typeName
add Name Reference Char Operation last Segment type Name public abstract void index Document  addNameReference CharOperation lastSegment typeName indexDocument

public Add Folder To Index I Path folder Path I Project project char inclusion Patterns char exclusion Patterns Index Manager manager super project get Full Path manager this folder Path folder Path this project project this inclusion Patterns inclusion Patterns this exclusion Patterns exclusion Patterns  AddFolderToIndex IPath folderPath IProject inclusionPatterns exclusionPatterns IndexManager getFullPath folderPath folderPath inclusionPatterns inclusionPatterns exclusionPatterns exclusionPatterns
new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception if proxy get Type I Resource FILE if org eclipse jdt internal compiler util Util is Java File Name proxy get Name index Manager add Source I File proxy request Resource container return false return true  IResourceProxyVisitor IResourceProxy CoreException getType IResource isJavaFileName getName indexManager addSource IFile requestResource
new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception switch proxy get Type case I Resource FILE if org eclipse jdt internal compiler util Util is Java File Name proxy get Name I Resource resource proxy request Resource if Util is Excluded resource inclusion Patterns exclusion Patterns index Manager add Source I File resource container return false case I Resource FOLDER if exclusion Patterns null inclusion Patterns null if there are inclusion patterns then we must walk the children if Util is Excluded proxy request Full Path inclusion Patterns exclusion Patterns true return false return true  IResourceProxyVisitor IResourceProxy CoreException getType IResource isJavaFileName getName IResource requestResource isExcluded inclusionPatterns exclusionPatterns indexManager addSource IFile IResource exclusionPatterns inclusionPatterns isExcluded requestFullPath inclusionPatterns exclusionPatterns
public boolean execute I Progress Monitor progress Monitor if this is Cancelled progress Monitor null progress Monitor is Canceled return true if project is Accessible return true nothing to do I Resource folder this project get Parent find Member this folder Path if folder null folder get Type I Resource FILE return true nothing to do source folder was removed ensure no concurrent write access to index Index index this manager get Index this container Path true reuse index file true create if none if index null return true Read Write Monitor monitor index monitor if monitor null return true index got deleted since acquired try monitor enter Read ask permission to read final I Path container this container Path final Index Manager index Manager this manager if this exclusion Patterns null this inclusion Patterns null folder accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception if proxy get Type I Resource FILE if org eclipse jdt internal compiler util Util is Java File Name proxy get Name index Manager add Source I File proxy request Resource container return false return true I Resource NONE else folder accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception switch proxy get Type case I Resource FILE if org eclipse jdt internal compiler util Util is Java File Name proxy get Name I Resource resource proxy request Resource if Util is Excluded resource inclusion Patterns exclusion Patterns index Manager add Source I File resource container return false case I Resource FOLDER if exclusion Patterns null inclusion Patterns null if there are inclusion patterns then we must walk the children if Util is Excluded proxy request Full Path inclusion Patterns exclusion Patterns true return false return true I Resource NONE catch Core Exception e if Job Manager VERBOSE Util verbose failed to add this folder Path to index because of the following exception System err NON NLS 1 NON NLS 2 e print Stack Trace return false finally monitor exit Read free read lock return true  IProgressMonitor progressMonitor isCancelled progressMonitor progressMonitor isCanceled isAccessible IResource getParent findMember folderPath getType IResource getIndex containerPath ReadWriteMonitor enterRead IPath containerPath IndexManager indexManager exclusionPatterns inclusionPatterns IResourceProxyVisitor IResourceProxy CoreException getType IResource isJavaFileName getName indexManager addSource IFile requestResource IResource IResourceProxyVisitor IResourceProxy CoreException getType IResource isJavaFileName getName IResource requestResource isExcluded inclusionPatterns exclusionPatterns indexManager addSource IFile IResource exclusionPatterns inclusionPatterns isExcluded requestFullPath inclusionPatterns exclusionPatterns IResource CoreException JobManager folderPath printStackTrace exitRead
return true public String to String return adding this folder Path to index this container Path NON NLS 1 NON NLS 2  toString folderPath containerPath

I File resource public Add Jar File To Index I File resource Index Manager manager super resource get Full Path manager this resource resource  IFile AddJarFileToIndex IFile IndexManager getFullPath
this resource resource public Add Jar File To Index I Path jar Path Index Manager manager external JAR scenario no resource super jar Path manager  AddJarFileToIndex IPath jarPath IndexManager jarPath
public boolean equals Object o if o instanceof Add Jar File To Index if this resource null return this resource equals Add Jar File To Index o resource if this container Path null return this container Path equals Add Jar File To Index o container Path return false  AddJarFileToIndex AddJarFileToIndex containerPath containerPath AddJarFileToIndex containerPath
public int hash Code if this resource null return this resource hash Code if this container Path null return this container Path hash Code return 1  hashCode hashCode containerPath containerPath hashCode
public boolean execute I Progress Monitor progress Monitor if this is Cancelled progress Monitor null progress Monitor is Canceled return true try if index is already cached then do not perform any check MUST reset the Index Manager if a jar file is changed Index index this manager get Index For Update this container Path false do not reuse index file false do not create if none if index null if Job Manager VERBOSE org eclipse jdt internal core util Util verbose no indexing required index already exists for this container Path NON NLS 1 return true index this manager get Index For Update this container Path true reuse index file true create if none if index null if Job Manager VERBOSE org eclipse jdt internal core util Util verbose index could not be created for this container Path NON NLS 1 return true Read Write Monitor monitor index monitor if monitor null if Job Manager VERBOSE org eclipse jdt internal core util Util verbose index for this container Path just got deleted NON NLS 1 NON NLS 2 return true index got deleted since acquired Zip File zip null try this path will be a relative path to the workspace in case the zipfile in the workspace otherwise it will be a path in the local file system Path zip File Path null monitor enter Write ask permission to write if resource null I Path location this resource get Location if location null return false if Java Model Manager ZIP ACCESS VERBOSE System out println Thread current Thread Add Jar File To Index execute Creating Zip File on location NON NLS 1 NON NLS 2 zip new Zip File location to File zip File Path Path this resource get Full Path make Relative absolute path relative to the workspace else if Java Model Manager ZIP ACCESS VERBOSE System out println Thread current Thread Add Jar File To Index execute Creating Zip File on this container Path NON NLS 1 NON NLS 2 zip new Zip File this container Path to File zip File Path Path this container Path path is already canonical since coming from a library classpath entry if this is Cancelled if Job Manager VERBOSE org eclipse jdt internal core util Util verbose indexing of zip get Name has been cancelled NON NLS 1 NON NLS 2 return false if Job Manager VERBOSE org eclipse jdt internal core util Util verbose indexing zip get Name NON NLS 1 long initial Time System current Time Millis String paths index query Document Names all file names NON NLS 1 int max paths null 0 paths length if max 0 check integrity of the existing index file if the length is equal to 0 we want to index the whole jar again If not then we want to check that there is no missing entry if one entry is missing then we recreate the index String EXISTS OK NON NLS 1 String DELETED DELETED NON NLS 1 Simple Lookup Table indexed File Names new Simple Lookup Table max 0 33 max 11 for int i 0 i max i indexed File Names put paths i DELETED for Enumeration e zip entries e has More Elements iterate each entry to index it Zip Entry ze Zip Entry e next Element if Util is Class File Name ze get Name Java Search Document entry Document new Java Search Document ze zip File Path null null indexed File Names put entry Document get Path EXISTS boolean need To Reindex indexed File Names element Size max a new file was added if need To Reindex Object value Table indexed File Names value Table for int i 0 l value Table length i l i if value Table i DELETED need To Reindex true a file was deleted so re index break if need To Reindex if Job Manager VERBOSE org eclipse jdt internal core util Util verbose no indexing required index is consistent with library for NON NLS 1 zip get Name NON NLS 1 System current Time Millis initial Time ms NON NLS 1 return true Index the jar for the first time or reindex the jar in case the previous index file has been corrupted index already existed recreate it so that we forget about previous entries Search Participant participant Search Engine get Default Search Participant index manager recreate Index this container Path for Enumeration e zip entries e has More Elements if this is Cancelled if Job Manager VERBOSE org eclipse jdt internal core util Util verbose indexing of zip get Name has been cancelled NON NLS 1 NON NLS 2 return false iterate each entry to index it Zip Entry ze Zip Entry e next Element if Util is Class File Name ze get Name final byte class File Bytes org eclipse jdt internal compiler util Util get Zip Entry Byte Content ze zip Java Search Document entry Document new Java Search Document ze zip File Path class File Bytes participant this manager index Document entry Document participant index this container Path this manager save Index index if Job Manager VERBOSE org eclipse jdt internal core util Util verbose done indexing of NON NLS 1 zip get Name NON NLS 1 System current Time Millis initial Time ms NON NLS 1 finally if zip null if Java Model Manager ZIP ACCESS VERBOSE System out println Thread current Thread Add Jar File To Index execute Closing Zip File zip NON NLS 1 NON NLS 2 zip close monitor exit Write free write lock catch IO Exception e if Job Manager VERBOSE org eclipse jdt internal core util Util verbose failed to index this container Path because of the following exception NON NLS 1 NON NLS 2 e print Stack Trace manager remove Index this container Path return false return true  IProgressMonitor progressMonitor isCancelled progressMonitor progressMonitor isCanceled IndexManager getIndexForUpdate containerPath JobManager containerPath getIndexForUpdate containerPath JobManager containerPath ReadWriteMonitor JobManager containerPath ZipFile zipFilePath enterWrite IPath getLocation JavaModelManager ZIP_ACCESS_VERBOSE currentThread AddJarFileToIndex ZipFile ZipFile toFile zipFilePath getFullPath makeRelative JavaModelManager ZIP_ACCESS_VERBOSE currentThread AddJarFileToIndex ZipFile containerPath ZipFile containerPath toFile zipFilePath containerPath isCancelled JobManager getName JobManager getName initialTime currentTimeMillis queryDocumentNames SimpleLookupTable indexedFileNames SimpleLookupTable indexedFileNames hasMoreElements ZipEntry ZipEntry nextElement isClassFileName getName JavaSearchDocument entryDocument JavaSearchDocument zipFilePath indexedFileNames entryDocument getPath needToReindex indexedFileNames elementSize needToReindex valueTable indexedFileNames valueTable valueTable valueTable needToReindex needToReindex JobManager getName currentTimeMillis initialTime SearchParticipant SearchEngine getDefaultSearchParticipant recreateIndex containerPath hasMoreElements isCancelled JobManager getName ZipEntry ZipEntry nextElement isClassFileName getName classFileBytes getZipEntryByteContent JavaSearchDocument entryDocument JavaSearchDocument zipFilePath classFileBytes indexDocument entryDocument containerPath saveIndex JobManager getName currentTimeMillis initialTime JavaModelManager ZIP_ACCESS_VERBOSE currentThread AddJarFileToIndex ZipFile exitWrite IOException JobManager containerPath printStackTrace removeIndex containerPath
return true protected Integer updated Index State return Index Manager REBUILDING STATE  updatedIndexState IndexManager REBUILDING_STATE
return Index Manager REBUILDING STATE public String to String return indexing this container Path to String NON NLS 1  IndexManager REBUILDING_STATE toString containerPath toString

private static final char INIT init to Char Array NON NLS 1 public Binary Indexer Search Document document super document  toCharArray BinaryIndexer SearchDocument
public void add Type Reference char type Name int length type Name length if length 2 type Name length 2 switch type Name length 1 case 0 case 1 case 2 case 3 case 4 case 5 case 6 case 7 case 8 case 9 return skip local type names consider that A B is a member type so replace with see https bugs eclipse org bugs show bug cgi id 40116 if Char Operation index Of type Name 0 System arraycopy type Name 0 type Name new char length 0 length copy it so the original is not modified Char Operation replace type Name super add Type Reference type Name  addTypeReference typeName typeName typeName typeName show_bug CharOperation indexOf typeName typeName typeName CharOperation typeName addTypeReference typeName
For example int foo String is Ljava lang String I java lang String in a char void foo int is I V int private void convert To Array Type char parameter Types int counter int array Dim int length parameter Types counter length char array Type new char length array Dim 2 System arraycopy parameter Types counter 0 array Type 0 length for int i 0 i array Dim i array Type length i 2 array Type length i 2 1 parameter Types counter array Type  convertToArrayType parameterTypes arrayDim parameterTypes arrayType arrayDim parameterTypes arrayType arrayDim arrayType arrayType parameterTypes arrayType
For example int foo String is Ljava lang String I java lang String in a char void foo int is I V int private char convert To Array Type char type Name int array Dim int length type Name length char array Type new char length array Dim 2 System arraycopy type Name 0 array Type 0 length for int i 0 i array Dim i array Type length i 2 array Type length i 2 1 return array Type  convertToArrayType typeName arrayDim typeName arrayType arrayDim typeName arrayType arrayDim arrayType arrayType arrayType
private char decode Field Type char signature throws Class Format Exception if signature null return null int array Dim 0 for int i 0 max signature length i max i switch signature i case B if array Dim 0 return convert To Array Type BYTE array Dim return BYTE case C if array Dim 0 return convert To Array Type CHAR array Dim return CHAR case D if array Dim 0 return convert To Array Type DOUBLE array Dim return DOUBLE case F if array Dim 0 return convert To Array Type FLOAT array Dim return FLOAT case I if array Dim 0 return convert To Array Type INT array Dim return INT case J if array Dim 0 return convert To Array Type LONG array Dim return LONG case L int index Of Semi Colon Char Operation index Of signature i 1 if index Of Semi Colon 1 throw new Class Format Exception Class Format Exception Err Invalid Method Signature if array Dim 0 return convert To Array Type replace Char Operation subarray signature i 1 index Of Semi Colon array Dim return replace Char Operation subarray signature i 1 index Of Semi Colon case S if array Dim 0 return convert To Array Type SHORT array Dim return SHORT case Z if array Dim 0 return convert To Array Type BOOLEAN array Dim return BOOLEAN case V return VOID case array Dim break default throw new Class Format Exception Class Format Exception Err Invalid Method Signature return null  decodeFieldType ClassFormatException arrayDim arrayDim convertToArrayType arrayDim arrayDim convertToArrayType arrayDim arrayDim convertToArrayType arrayDim arrayDim convertToArrayType arrayDim arrayDim convertToArrayType arrayDim arrayDim convertToArrayType arrayDim indexOfSemiColon CharOperation indexOf indexOfSemiColon ClassFormatException ClassFormatException ErrInvalidMethodSignature arrayDim convertToArrayType CharOperation indexOfSemiColon arrayDim CharOperation indexOfSemiColon arrayDim convertToArrayType arrayDim arrayDim convertToArrayType arrayDim arrayDim ClassFormatException ClassFormatException ErrInvalidMethodSignature
For example int foo String is Ljava lang String I java lang String in a char void foo int is I V int private char decode Parameter Types char signature throws Class Format Exception if signature null return null int index Of Closing Paren Char Operation last Index Of signature if index Of Closing Paren 1 there is no parameter return null if index Of Closing Paren 1 throw new Class Format Exception Class Format Exception Err Invalid Method Signature char parameter Types new char 3 int parameter Types Counter 0 int array Dim 0 for int i 1 i index Of Closing Paren i if parameter Types Counter parameter Types length resize System arraycopy parameter Types 0 parameter Types new char parameter Types Counter 2 0 parameter Types Counter switch signature i case B parameter Types parameter Types Counter BYTE if array Dim 0 convert To Array Type parameter Types parameter Types Counter 1 array Dim array Dim 0 break case C parameter Types parameter Types Counter CHAR if array Dim 0 convert To Array Type parameter Types parameter Types Counter 1 array Dim array Dim 0 break case D parameter Types parameter Types Counter DOUBLE if array Dim 0 convert To Array Type parameter Types parameter Types Counter 1 array Dim array Dim 0 break case F parameter Types parameter Types Counter FLOAT if array Dim 0 convert To Array Type parameter Types parameter Types Counter 1 array Dim array Dim 0 break case I parameter Types parameter Types Counter INT if array Dim 0 convert To Array Type parameter Types parameter Types Counter 1 array Dim array Dim 0 break case J parameter Types parameter Types Counter LONG if array Dim 0 convert To Array Type parameter Types parameter Types Counter 1 array Dim array Dim 0 break case L int index Of Semi Colon Char Operation index Of signature i 1 if index Of Semi Colon 1 throw new Class Format Exception Class Format Exception Err Invalid Method Signature parameter Types parameter Types Counter replace Char Operation subarray signature i 1 index Of Semi Colon if array Dim 0 convert To Array Type parameter Types parameter Types Counter 1 array Dim i index Of Semi Colon array Dim 0 break case S parameter Types parameter Types Counter SHORT if array Dim 0 convert To Array Type parameter Types parameter Types Counter 1 array Dim array Dim 0 break case Z parameter Types parameter Types Counter BOOLEAN if array Dim 0 convert To Array Type parameter Types parameter Types Counter 1 array Dim array Dim 0 break case array Dim break default throw new Class Format Exception Class Format Exception Err Invalid Method Signature if parameter Types length parameter Types Counter System arraycopy parameter Types 0 parameter Types new char parameter Types Counter 0 parameter Types Counter return parameter Types  decodeParameterTypes ClassFormatException indexOfClosingParen CharOperation lastIndexOf indexOfClosingParen indexOfClosingParen ClassFormatException ClassFormatException ErrInvalidMethodSignature parameterTypes parameterTypesCounter arrayDim indexOfClosingParen parameterTypesCounter parameterTypes parameterTypes parameterTypes parameterTypesCounter parameterTypesCounter parameterTypes parameterTypesCounter arrayDim convertToArrayType parameterTypes parameterTypesCounter arrayDim arrayDim parameterTypes parameterTypesCounter arrayDim convertToArrayType parameterTypes parameterTypesCounter arrayDim arrayDim parameterTypes parameterTypesCounter arrayDim convertToArrayType parameterTypes parameterTypesCounter arrayDim arrayDim parameterTypes parameterTypesCounter arrayDim convertToArrayType parameterTypes parameterTypesCounter arrayDim arrayDim parameterTypes parameterTypesCounter arrayDim convertToArrayType parameterTypes parameterTypesCounter arrayDim arrayDim parameterTypes parameterTypesCounter arrayDim convertToArrayType parameterTypes parameterTypesCounter arrayDim arrayDim indexOfSemiColon CharOperation indexOf indexOfSemiColon ClassFormatException ClassFormatException ErrInvalidMethodSignature parameterTypes parameterTypesCounter CharOperation indexOfSemiColon arrayDim convertToArrayType parameterTypes parameterTypesCounter arrayDim indexOfSemiColon arrayDim parameterTypes parameterTypesCounter arrayDim convertToArrayType parameterTypes parameterTypesCounter arrayDim arrayDim parameterTypes parameterTypesCounter arrayDim convertToArrayType parameterTypes parameterTypesCounter arrayDim arrayDim arrayDim ClassFormatException ClassFormatException ErrInvalidMethodSignature parameterTypes parameterTypesCounter parameterTypes parameterTypes parameterTypesCounter parameterTypesCounter parameterTypes
private char decode Return Type char signature throws Class Format Exception if signature null return null int index Of Closing Paren Char Operation last Index Of signature if index Of Closing Paren 1 throw new Class Format Exception Class Format Exception Err Invalid Method Signature int array Dim 0 for int i index Of Closing Paren 1 max signature length i max i switch signature i case B if array Dim 0 return convert To Array Type BYTE array Dim return BYTE case C if array Dim 0 return convert To Array Type CHAR array Dim return CHAR case D if array Dim 0 return convert To Array Type DOUBLE array Dim return DOUBLE case F if array Dim 0 return convert To Array Type FLOAT array Dim return FLOAT case I if array Dim 0 return convert To Array Type INT array Dim return INT case J if array Dim 0 return convert To Array Type LONG array Dim return LONG case L int index Of Semi Colon Char Operation index Of signature i 1 if index Of Semi Colon 1 throw new Class Format Exception Class Format Exception Err Invalid Method Signature if array Dim 0 return convert To Array Type replace Char Operation subarray signature i 1 index Of Semi Colon array Dim return replace Char Operation subarray signature i 1 index Of Semi Colon case S if array Dim 0 return convert To Array Type SHORT array Dim return SHORT case Z if array Dim 0 return convert To Array Type BOOLEAN array Dim return BOOLEAN case V return VOID case array Dim break default throw new Class Format Exception Class Format Exception Err Invalid Method Signature return null  decodeReturnType ClassFormatException indexOfClosingParen CharOperation lastIndexOf indexOfClosingParen ClassFormatException ClassFormatException ErrInvalidMethodSignature arrayDim indexOfClosingParen arrayDim convertToArrayType arrayDim arrayDim convertToArrayType arrayDim arrayDim convertToArrayType arrayDim arrayDim convertToArrayType arrayDim arrayDim convertToArrayType arrayDim arrayDim convertToArrayType arrayDim indexOfSemiColon CharOperation indexOf indexOfSemiColon ClassFormatException ClassFormatException ErrInvalidMethodSignature arrayDim convertToArrayType CharOperation indexOfSemiColon arrayDim CharOperation indexOfSemiColon arrayDim convertToArrayType arrayDim arrayDim convertToArrayType arrayDim arrayDim ClassFormatException ClassFormatException ErrInvalidMethodSignature
private int extract Arg Count char signature throws Class Format Exception int index Of Closing Paren Char Operation last Index Of signature if index Of Closing Paren 1 there is no parameter return 0 if index Of Closing Paren 1 throw new Class Format Exception Class Format Exception Err Invalid Method Signature int parameter Types Counter 0 for int i 1 i index Of Closing Paren i switch signature i case B case C case D case F case I case J case S case Z parameter Types Counter break case L int index Of Semi Colon Char Operation index Of signature i 1 if index Of Semi Colon 1 throw new Class Format Exception Class Format Exception Err Invalid Method Signature parameter Types Counter i index Of Semi Colon break case break default throw new Class Format Exception Class Format Exception Err Invalid Method Signature return parameter Types Counter  extractArgCount ClassFormatException indexOfClosingParen CharOperation lastIndexOf indexOfClosingParen indexOfClosingParen ClassFormatException ClassFormatException ErrInvalidMethodSignature parameterTypesCounter indexOfClosingParen parameterTypesCounter indexOfSemiColon CharOperation indexOf indexOfSemiColon ClassFormatException ClassFormatException ErrInvalidMethodSignature parameterTypesCounter indexOfSemiColon ClassFormatException ClassFormatException ErrInvalidMethodSignature parameterTypesCounter
private char extract Class Name int constant Pool Offsets Class File Reader reader int index the entry at i has to be a field ref or a method interface method ref int class index reader u2 At constant Pool Offsets index 1 int utf8 Offset constant Pool Offsets reader u2 At constant Pool Offsets class index 1 return reader utf8 At utf8 Offset 3 reader u2 At utf8 Offset 1  extractClassName constantPoolOffsets ClassFileReader class_index u2At constantPoolOffsets utf8Offset constantPoolOffsets u2At constantPoolOffsets class_index utf8At utf8Offset u2At utf8Offset
private char extract Name int constant Pool Offsets Class File Reader reader int index int name And Type Index reader u2 At constant Pool Offsets index 3 int utf8 Offset constant Pool Offsets reader u2 At constant Pool Offsets name And Type Index 1 return reader utf8 At utf8 Offset 3 reader u2 At utf8 Offset 1  extractName constantPoolOffsets ClassFileReader nameAndTypeIndex u2At constantPoolOffsets utf8Offset constantPoolOffsets u2At constantPoolOffsets nameAndTypeIndex utf8At utf8Offset u2At utf8Offset
private char extract Class Reference int constant Pool Offsets Class File Reader reader int index the entry at i has to be a class ref int utf8 Offset constant Pool Offsets reader u2 At constant Pool Offsets index 1 return reader utf8 At utf8 Offset 3 reader u2 At utf8 Offset 1  extractClassReference constantPoolOffsets ClassFileReader utf8Offset constantPoolOffsets u2At constantPoolOffsets utf8At utf8Offset u2At utf8Offset
Extract all type method field and interface method references from the constant pool private void extract Reference From Constant Pool byte contents Class File Reader reader throws Class Format Exception int constant Pool Offsets reader get Constant Pool Offsets int constant Pool Count constant Pool Offsets length for int i 1 i constant Pool Count i int tag reader u1 At constant Pool Offsets i u1 tag u2 class index u2 name and type index char name null char type null switch tag case Class File Constants Field Ref Tag add reference to the class interface and field name and type name extract Name constant Pool Offsets reader i add Field Reference name break case Class File Constants Method Ref Tag add reference to the class and method name and type case Class File Constants Interface Method Ref Tag add reference to the interface and method name and type name extract Name constant Pool Offsets reader i type extract Type constant Pool Offsets reader i if Char Operation equals INIT name add a constructor reference char class Name replace extract Class Name constant Pool Offsets reader i so that it looks like java lang String add Constructor Reference class Name extract Arg Count type else add a method reference add Method Reference name extract Arg Count type break case Class File Constants Class Tag add a type reference name extract Class Reference constant Pool Offsets reader i if name length 0 name 0 break skip over array references name replace name so that it looks like java lang String add Type Reference name also add a simple reference on each segment of the qualification see http bugs eclipse org bugs show bug cgi id 24741 char qualification Char Operation split On name for int j 0 length qualification length j length j add Name Reference qualification j break  extractReferenceFromConstantPool ClassFileReader ClassFormatException constantPoolOffsets getConstantPoolOffsets constantPoolCount constantPoolOffsets constantPoolCount u1At constantPoolOffsets class_index name_and_type_index ClassFileConstants FieldRefTag extractName constantPoolOffsets addFieldReference ClassFileConstants MethodRefTag ClassFileConstants InterfaceMethodRefTag extractName constantPoolOffsets extractType constantPoolOffsets CharOperation className extractClassName constantPoolOffsets addConstructorReference className extractArgCount addMethodReference extractArgCount ClassFileConstants ClassTag extractClassReference constantPoolOffsets addTypeReference show_bug CharOperation splitOn addNameReference
private char extract Type int constant Pool Offsets Class File Reader reader int index int constant Pool Index reader u2 At constant Pool Offsets index 3 int utf8 Offset constant Pool Offsets reader u2 At constant Pool Offsets constant Pool Index 3 return reader utf8 At utf8 Offset 3 reader u2 At utf8 Offset 1  extractType constantPoolOffsets ClassFileReader constantPoolIndex u2At constantPoolOffsets utf8Offset constantPoolOffsets u2At constantPoolOffsets constantPoolIndex utf8At utf8Offset u2At utf8Offset
public void index Document try byte contents this document get Byte Contents Class File Reader reader new Class File Reader contents this document get Path to Char Array first add type references char class Name replace reader get Name looks like java lang String need to extract the package name and the simple name int package Name Index Char Operation last Index Of class Name char package Name null char name null if package Name Index 0 package Name Char Operation subarray class Name 0 package Name Index name Char Operation subarray class Name package Name Index 1 class Name length else package Name Char Operation NO CHAR name class Name char enclosing Type Name null if reader is Nested Type if reader is Anonymous name Char Operation NO CHAR else name reader get Inner Source Name if reader is Local reader is Anonymous enclosing Type Name ONE ZERO else char full Enclosing Name reader get Enclosing Type Name int name Length full Enclosing Name length package Name Index 1 if name Length 0 See PR 1GIR345 ITPJCORE ALL Indexer Negative Array Size Exception return enclosing Type Name new char name Length System arraycopy full Enclosing Name package Name Index 1 enclosing Type Name 0 name Length eliminate invalid innerclasses 1G4KCF7 if name null return char superinterfaces replace reader get Interface Names char enclosing Type Names enclosing Type Name null null new char enclosing Type Name if reader is Interface add Interface Declaration reader get Modifiers package Name name enclosing Type Names superinterfaces else char superclass replace reader get Superclass Name add Class Declaration reader get Modifiers package Name name enclosing Type Names superclass superinterfaces first reference all methods declarations and field declarations Method Info methods Method Info reader get Methods if methods null for int i 0 max methods length i max i Method Info method methods i char descriptor method get Method Descriptor char parameter Types decode Parameter Types descriptor char return Type decode Return Type descriptor char exception Types replace method get Exception Type Names if method is Constructor add Constructor Declaration class Name parameter Types exception Types else if method is Clinit add Method Declaration method get Selector parameter Types return Type exception Types Field Info fields Field Info reader get Fields if fields null for int i 0 max fields length i max i Field Info field fields i char field Name field get Name char field Type decode Field Type replace field get Type Name add Field Declaration field Type field Name record all references found inside the class file extract Reference From Constant Pool contents reader catch Class Format Exception e ignore  indexDocument getByteContents ClassFileReader ClassFileReader getPath toCharArray className getName packageNameIndex CharOperation lastIndexOf className packageName packageNameIndex packageName CharOperation className packageNameIndex CharOperation className packageNameIndex className packageName CharOperation NO_CHAR className enclosingTypeName isNestedType isAnonymous CharOperation NO_CHAR getInnerSourceName isLocal isAnonymous enclosingTypeName ONE_ZERO fullEnclosingName getEnclosingTypeName nameLength fullEnclosingName packageNameIndex nameLength NegativeArraySizeException enclosingTypeName nameLength fullEnclosingName packageNameIndex enclosingTypeName nameLength getInterfaceNames enclosingTypeNames enclosingTypeName enclosingTypeName isInterface addInterfaceDeclaration getModifiers packageName enclosingTypeNames getSuperclassName addClassDeclaration getModifiers packageName enclosingTypeNames MethodInfo MethodInfo getMethods MethodInfo getMethodDescriptor parameterTypes decodeParameterTypes returnType decodeReturnType exceptionTypes getExceptionTypeNames isConstructor addConstructorDeclaration className parameterTypes exceptionTypes isClinit addMethodDeclaration getSelector parameterTypes returnType exceptionTypes FieldInfo FieldInfo getFields FieldInfo fieldName getName fieldType decodeFieldType getTypeName addFieldDeclaration fieldType fieldName extractReferenceFromConstantPool ClassFormatException
private char replace char to Be Replaced char new Char char array if array null return null for int i 0 max array length i max i replace to Be Replaced new Char array i return array  toBeReplaced newChar toBeReplaced newChar
private char replace char to Be Replaced char new Char char array if array null return null for int i 0 max array length i max i if array i to Be Replaced array i new Char return array  toBeReplaced newChar toBeReplaced newChar

I Project project public Index All Project I Project project Index Manager manager super project get Full Path manager this project project  IProject IndexAllProject IProject IndexManager getFullPath
public boolean equals Object o if o instanceof Index All Project return this project equals Index All Project o project return false  IndexAllProject IndexAllProject
new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy if is Cancelled return false switch proxy get Type case I Resource FILE if org eclipse jdt internal compiler util Util is Java File Name proxy get Name I File file I File proxy request Resource if file get Location null return false if exclusion Patterns null inclusion Patterns null if Util is Excluded file inclusion Patterns exclusion Patterns return false indexed File Names put file get Full Path to String file return false case I Resource FOLDER if exclusion Patterns null inclusion Patterns null if there are inclusion patterns then we must walk the children if Util is Excluded proxy request Full Path inclusion Patterns exclusion Patterns true return false if has Outputs outputs contains proxy request Full Path return false return true  IResourceProxyVisitor IResourceProxy isCancelled getType IResource isJavaFileName getName IFile IFile requestResource getLocation exclusionPatterns inclusionPatterns isExcluded inclusionPatterns exclusionPatterns indexedFileNames getFullPath toString IResource exclusionPatterns inclusionPatterns isExcluded requestFullPath inclusionPatterns exclusionPatterns hasOutputs requestFullPath
new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy if is Cancelled return false switch proxy get Type case I Resource FILE if org eclipse jdt internal compiler util Util is Java File Name proxy get Name I File file I File proxy request Resource I Path location file get Location if location null return false if exclusion Patterns null inclusion Patterns null if Util is Excluded file inclusion Patterns exclusion Patterns return false String path file get Full Path to String indexed File Names put path indexed File Names get path null index Last Modified location to File last Modified Object file Object OK return false case I Resource FOLDER if exclusion Patterns null inclusion Patterns null if Util is Excluded proxy request Resource inclusion Patterns exclusion Patterns return false if has Outputs outputs contains proxy request Full Path return false return true  IResourceProxyVisitor IResourceProxy isCancelled getType IResource isJavaFileName getName IFile IFile requestResource IPath getLocation exclusionPatterns inclusionPatterns isExcluded inclusionPatterns exclusionPatterns getFullPath toString indexedFileNames indexedFileNames indexLastModified toFile lastModified IResource exclusionPatterns inclusionPatterns isExcluded requestResource inclusionPatterns exclusionPatterns hasOutputs requestFullPath
Ensure consistency of a project index Need to walk all nested resources and discover resources which have either been changed added or deleted since the index was produced public boolean execute I Progress Monitor progress Monitor if this is Cancelled progress Monitor null progress Monitor is Canceled return true if project is Accessible return true nothing to do Index index this manager get Index For Update this container Path true reuse index file true create if none if index null return true Read Write Monitor monitor index monitor if monitor null return true index got deleted since acquired try monitor enter Read ask permission to read String paths index query Document Names all file names NON NLS 1 int max paths null 0 paths length final Simple Lookup Table indexed File Names new Simple Lookup Table max 0 33 max 11 final String OK OK NON NLS 1 final String DELETED DELETED NON NLS 1 for int i 0 i max i indexed File Names put paths i DELETED final long index Last Modified max 0 0L index get Index File last Modified Java Project java Project Java Project Java Core create this project Do not create marker nor log problems while getting raw classpath see bug 41859 I Classpath Entry entries java Project get Raw Classpath false false I Workspace Root root this project get Workspace get Root for int i 0 length entries length i length i if this is Cancelled return false I Classpath Entry entry entries i if entry get Entry Kind I Classpath Entry CPE SOURCE Index only source folders Libraries are done as a separate job I Resource source Folder root find Member entry get Path if source Folder null collect output locations if source is project see http bugs eclipse org bugs show bug cgi id 32041 final Hash Set outputs new Hash Set if source Folder get Type I Resource PROJECT Do not create marker nor log problems while getting output location see bug 41859 outputs add java Project get Output Location false false for int j 0 j length j I Path output entries j get Output Location if output null outputs add output final boolean has Outputs outputs is Empty final char inclusion Patterns Classpath Entry entry full Inclusion Pattern Chars final char exclusion Patterns Classpath Entry entry full Exclusion Pattern Chars if max 0 source Folder accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy if is Cancelled return false switch proxy get Type case I Resource FILE if org eclipse jdt internal compiler util Util is Java File Name proxy get Name I File file I File proxy request Resource if file get Location null return false if exclusion Patterns null inclusion Patterns null if Util is Excluded file inclusion Patterns exclusion Patterns return false indexed File Names put file get Full Path to String file return false case I Resource FOLDER if exclusion Patterns null inclusion Patterns null if there are inclusion patterns then we must walk the children if Util is Excluded proxy request Full Path inclusion Patterns exclusion Patterns true return false if has Outputs outputs contains proxy request Full Path return false return true I Resource NONE else source Folder accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy if is Cancelled return false switch proxy get Type case I Resource FILE if org eclipse jdt internal compiler util Util is Java File Name proxy get Name I File file I File proxy request Resource I Path location file get Location if location null return false if exclusion Patterns null inclusion Patterns null if Util is Excluded file inclusion Patterns exclusion Patterns return false String path file get Full Path to String indexed File Names put path indexed File Names get path null index Last Modified location to File last Modified Object file Object OK return false case I Resource FOLDER if exclusion Patterns null inclusion Patterns null if Util is Excluded proxy request Resource inclusion Patterns exclusion Patterns return false if has Outputs outputs contains proxy request Full Path return false return true I Resource NONE Object names indexed File Names key Table Object values indexed File Names value Table for int i 0 length names length i length i String name String names i if name null if this is Cancelled return false Object value values i if value OK if value DELETED this manager remove name this container Path else this manager add Source I File value this container Path request to save index when all cus have been indexed also sets state to SAVED STATE this manager request new Save Index this container Path this manager catch Core Exception e if Job Manager VERBOSE Util verbose failed to index this project because of the following exception System err NON NLS 1 NON NLS 2 e print Stack Trace this manager remove Index this container Path return false catch IO Exception e if Job Manager VERBOSE Util verbose failed to index this project because of the following exception System err NON NLS 1 NON NLS 2 e print Stack Trace this manager remove Index this container Path return false finally monitor exit Read free read lock return true  IProgressMonitor progressMonitor isCancelled progressMonitor progressMonitor isCanceled isAccessible getIndexForUpdate containerPath ReadWriteMonitor enterRead queryDocumentNames SimpleLookupTable indexedFileNames SimpleLookupTable indexedFileNames indexLastModified getIndexFile lastModified JavaProject javaProject JavaProject JavaCore IClasspathEntry javaProject getRawClasspath IWorkspaceRoot getWorkspace getRoot isCancelled IClasspathEntry getEntryKind IClasspathEntry CPE_SOURCE IResource sourceFolder findMember getPath sourceFolder show_bug HashSet HashSet sourceFolder getType IResource javaProject getOutputLocation IPath getOutputLocation hasOutputs isEmpty inclusionPatterns ClasspathEntry fullInclusionPatternChars exclusionPatterns ClasspathEntry fullExclusionPatternChars sourceFolder IResourceProxyVisitor IResourceProxy isCancelled getType IResource isJavaFileName getName IFile IFile requestResource getLocation exclusionPatterns inclusionPatterns isExcluded inclusionPatterns exclusionPatterns indexedFileNames getFullPath toString IResource exclusionPatterns inclusionPatterns isExcluded requestFullPath inclusionPatterns exclusionPatterns hasOutputs requestFullPath IResource sourceFolder IResourceProxyVisitor IResourceProxy isCancelled getType IResource isJavaFileName getName IFile IFile requestResource IPath getLocation exclusionPatterns inclusionPatterns isExcluded inclusionPatterns exclusionPatterns getFullPath toString indexedFileNames indexedFileNames indexLastModified toFile lastModified IResource exclusionPatterns inclusionPatterns isExcluded requestResource inclusionPatterns exclusionPatterns hasOutputs requestFullPath IResource indexedFileNames keyTable indexedFileNames valueTable isCancelled containerPath addSource IFile containerPath SAVED_STATE SaveIndex containerPath CoreException JobManager printStackTrace removeIndex containerPath IOException JobManager printStackTrace removeIndex containerPath exitRead
return true public int hash Code return this project hash Code  hashCode hashCode
return this project hash Code protected Integer updated Index State return Index Manager REBUILDING STATE  hashCode updatedIndexState IndexManager REBUILDING_STATE
return Index Manager REBUILDING STATE public String to String return indexing project this project get Full Path NON NLS 1  IndexManager REBUILDING_STATE toString getFullPath

I Folder folder public Index Binary Folder I Folder folder Index Manager manager super folder get Full Path manager this folder folder  IFolder IndexBinaryFolder IFolder IndexManager getFullPath
public boolean equals Object o if o instanceof Index Binary Folder return this folder equals Index Binary Folder o folder return false  IndexBinaryFolder IndexBinaryFolder
this folder accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy if is Cancelled return false if proxy get Type I Resource FILE if org eclipse jdt internal compiler util Util is Class File Name proxy get Name I File file I File proxy request Resource if file get Location null indexed File Names put file get Full Path to String file return false return true  IResourceProxyVisitor IResourceProxy isCancelled getType IResource isClassFileName getName IFile IFile requestResource getLocation indexedFileNames getFullPath toString
new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy if is Cancelled return false if proxy get Type I Resource FILE if org eclipse jdt internal compiler util Util is Class File Name proxy get Name I File file I File proxy request Resource I Path location file get Location if location null String path file get Full Path to String indexed File Names put path indexed File Names get path null index Last Modified location to File last Modified Object file Object OK return false return true  IResourceProxyVisitor IResourceProxy isCancelled getType IResource isClassFileName getName IFile IFile requestResource IPath getLocation getFullPath toString indexedFileNames indexedFileNames indexLastModified toFile lastModified
Ensure consistency of a folder index Need to walk all nested resources and discover resources which have either been changed added or deleted since the index was produced public boolean execute I Progress Monitor progress Monitor if this is Cancelled progress Monitor null progress Monitor is Canceled return true if this folder is Accessible return true nothing to do Index index this manager get Index For Update this container Path true reuse index file true create if none if index null return true Read Write Monitor monitor index monitor if monitor null return true index got deleted since acquired try monitor enter Read ask permission to read String paths index query Document Names all file names NON NLS 1 int max paths null 0 paths length final Simple Lookup Table indexed File Names new Simple Lookup Table max 0 33 max 11 final String OK OK NON NLS 1 final String DELETED DELETED NON NLS 1 if max 0 this folder accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy if is Cancelled return false if proxy get Type I Resource FILE if org eclipse jdt internal compiler util Util is Class File Name proxy get Name I File file I File proxy request Resource if file get Location null indexed File Names put file get Full Path to String file return false return true I Resource NONE else for int i 0 i max i indexed File Names put paths i DELETED final long index Last Modified index get Index File last Modified this folder accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy if is Cancelled return false if proxy get Type I Resource FILE if org eclipse jdt internal compiler util Util is Class File Name proxy get Name I File file I File proxy request Resource I Path location file get Location if location null String path file get Full Path to String indexed File Names put path indexed File Names get path null index Last Modified location to File last Modified Object file Object OK return false return true I Resource NONE Object names indexed File Names key Table Object values indexed File Names value Table for int i 0 length names length i length i String name String names i if name null if this is Cancelled return false Object value values i if value OK if value DELETED this manager remove name this container Path else this manager add Binary I File value this container Path request to save index when all class files have been indexed also sets state to SAVED STATE this manager request new Save Index this container Path this manager catch Core Exception e if Job Manager VERBOSE Util verbose failed to index this folder because of the following exception System err NON NLS 1 NON NLS 2 e print Stack Trace this manager remove Index this container Path return false catch IO Exception e if Job Manager VERBOSE Util verbose failed to index this folder because of the following exception System err NON NLS 1 NON NLS 2 e print Stack Trace this manager remove Index this container Path return false finally monitor exit Read free read lock return true  IProgressMonitor progressMonitor isCancelled progressMonitor progressMonitor isCanceled isAccessible getIndexForUpdate containerPath ReadWriteMonitor enterRead queryDocumentNames SimpleLookupTable indexedFileNames SimpleLookupTable IResourceProxyVisitor IResourceProxy isCancelled getType IResource isClassFileName getName IFile IFile requestResource getLocation indexedFileNames getFullPath toString IResource indexedFileNames indexLastModified getIndexFile lastModified IResourceProxyVisitor IResourceProxy isCancelled getType IResource isClassFileName getName IFile IFile requestResource IPath getLocation getFullPath toString indexedFileNames indexedFileNames indexLastModified toFile lastModified IResource indexedFileNames keyTable indexedFileNames valueTable isCancelled containerPath addBinary IFile containerPath SAVED_STATE SaveIndex containerPath CoreException JobManager printStackTrace removeIndex containerPath IOException JobManager printStackTrace removeIndex containerPath exitRead
return true public int hash Code return this folder hash Code  hashCode hashCode
return this folder hash Code protected Integer updated Index State return Index Manager REBUILDING STATE  hashCode updatedIndexState IndexManager REBUILDING_STATE
return Index Manager REBUILDING STATE public String to String return indexing binary folder this folder get Full Path NON NLS 1  IndexManager REBUILDING_STATE toString getFullPath

public synchronized void about To Update Index I Path container Path Integer new Index State new Index State is either UPDATING STATE or REBUILDING STATE must tag the index as inconsistent in case we exit before the update job is started String index Location compute Index Location container Path Object state get Index States get index Location Integer current Index State state null UNKNOWN STATE Integer state if current Index State equals REBUILDING STATE return already rebuilding the index int compare new Index State compare To current Index State if compare 0 so UPDATING STATE replaces SAVED STATE and REBUILDING STATE replaces everything update Index State index Location new Index State else if compare 0 this indexes get index Location null if already cached index then there is nothing more to do rebuild Index index Location container Path  aboutToUpdateIndex IPath containerPath newIndexState newIndexState UPDATING_STATE REBUILDING_STATE indexLocation computeIndexLocation containerPath getIndexStates indexLocation currentIndexState UNKNOWN_STATE currentIndexState REBUILDING_STATE newIndexState compareTo currentIndexState UPDATING_STATE SAVED_STATE REBUILDING_STATE updateIndexState indexLocation newIndexState indexLocation rebuildIndex indexLocation containerPath
Trigger addition of a resource to an index Note the actual operation is performed in background public void add Binary I File resource I Path container Path if Java Core get Plugin null return Search Participant participant Search Engine get Default Search Participant Search Document document participant get Document resource get Full Path to String String index Location compute Index Location container Path schedule Document Indexing document container Path index Location participant  addBinary IFile IPath containerPath JavaCore getPlugin SearchParticipant SearchEngine getDefaultSearchParticipant SearchDocument getDocument getFullPath toString indexLocation computeIndexLocation containerPath scheduleDocumentIndexing containerPath indexLocation
Trigger addition of a resource to an index Note the actual operation is performed in background public void add Source I File resource I Path container Path if Java Core get Plugin null return Search Participant participant Search Engine get Default Search Participant Search Document document participant get Document resource get Full Path to String String index Location compute Index Location container Path schedule Document Indexing document container Path index Location participant  addSource IFile IPath containerPath JavaCore getPlugin SearchParticipant SearchEngine getDefaultSearchParticipant SearchDocument getDocument getFullPath toString indexLocation computeIndexLocation containerPath scheduleDocumentIndexing containerPath indexLocation
public void clean Up Indexes Simple Lookup Table known Paths new Simple Lookup Table I Java Search Scope scope new Java Workspace Scope Pattern Search Job job new Pattern Search Job null Search Engine get Default Search Participant scope null Index selected Indexes job get Indexes null for int j 0 max selected Indexes length j max j TODO should use get Java Plugin Working Location index simple name to avoid bugs such as https bugs eclipse org bugs show bug cgi id 62267 String path selected Indexes j get Index File get Absolute Path known Paths put path path if index States null Object keys index States key Table for int i 0 l keys length i l i String key String keys i if key null known Paths contains Key key update Index State key null File indexes Directory new File get Java Plugin Working Location toOS String if indexes Directory is Directory File indexes Files indexes Directory list Files if indexes Files null for int i 0 indexes Files Length indexes Files length i indexes Files Length i String file Name indexes Files i get Absolute Path if known Paths contains Key file Name file Name to Lower Case ends With index NON NLS 1 if VERBOSE Util verbose Deleting index file indexes Files i NON NLS 1 indexes Files i delete  cleanUpIndexes SimpleLookupTable knownPaths SimpleLookupTable IJavaSearchScope JavaWorkspaceScope PatternSearchJob PatternSearchJob SearchEngine getDefaultSearchParticipant selectedIndexes getIndexes selectedIndexes getJavaPluginWorkingLocation show_bug selectedIndexes getIndexFile getAbsolutePath knownPaths indexStates indexStates keyTable knownPaths containsKey updateIndexState indexesDirectory getJavaPluginWorkingLocation toOSString indexesDirectory isDirectory indexesFiles indexesDirectory listFiles indexesFiles indexesFilesLength indexesFiles indexesFilesLength fileName indexesFiles getAbsolutePath knownPaths containsKey fileName fileName toLowerCase endsWith indexesFiles indexesFiles
public String compute Index Location I Path container Path String index Location String this index Locations get container Path if index Location null String path String container Path toOS String checksum Calculator reset checksum Calculator update path String get Bytes String file Name Long to String checksum Calculator get Value index NON NLS 1 if VERBOSE Util verbose index name for path String is file Name NON NLS 1 NON NLS 2 index Location get Java Plugin Working Location append file Name toOS String this index Locations put container Path index Location return index Location  computeIndexLocation IPath containerPath indexLocation indexLocations containerPath indexLocation pathString containerPath toOSString checksumCalculator checksumCalculator pathString getBytes fileName toString checksumCalculator getValue pathString fileName indexLocation getJavaPluginWorkingLocation fileName toOSString indexLocations containerPath indexLocation indexLocation
public void ensure Index Exists String index Location I Path container Path Simple Lookup Table states get Index States Object state states get index Location if state null update Index State index Location REBUILDING STATE get Index container Path index Location true true  ensureIndexExists indexLocation IPath containerPath SimpleLookupTable getIndexStates indexLocation updateIndexState indexLocation REBUILDING_STATE getIndex containerPath indexLocation
Returns the index for a given project according to the following algorithm if index is already in memory answers this one back if reuse Existing File then read it and return this index and record it in memory if create If Missing then create a new empty index and record it in memory Warning Does not check whether index is consistent not being used public synchronized Index get Index I Path container Path String index Location boolean reuse Existing File boolean create If Missing Path is already canonical per construction Index index Index indexes get index Location if index null Object state get Index States get index Location Integer current Index State state null UNKNOWN STATE Integer state if current Index State UNKNOWN STATE should only be reachable for query jobs IF you put an index in the cache then Add Jar File To Index fails because it thinks there is nothing to do rebuild Index index Location container Path return null index isn t cached consider reusing an existing index file if reuse Existing File File index File new File index Location if index File exists check before creating index so as to avoid creating a new empty index if file is missing try index new Index index Location Index for container Path toOS String true reuse index file NON NLS 1 indexes put index Location index return index catch IO Exception e failed to read the existing file or its no longer compatible if current Index State REBUILDING STATE rebuild index if existing file is corrupt unless the index is already being rebuilt if VERBOSE Util verbose cannot reuse existing index index Location path container Path toOS String NON NLS 1 NON NLS 2 rebuild Index index Location container Path return null index null will fall thru to create If Missing create a empty index for the rebuild all job to populate if current Index State SAVED STATE rebuild index if existing file is missing rebuild Index index Location container Path return null index wasn t found on disk consider creating an empty new one if create If Missing try if VERBOSE Util verbose create empty index index Location path container Path toOS String NON NLS 1 NON NLS 2 index new Index index Location Index for container Path toOS String false do not reuse index file NON NLS 1 indexes put index Location index return index catch IO Exception e if VERBOSE Util verbose unable to create empty index index Location path container Path toOS String NON NLS 1 NON NLS 2 The file could not be created Possible reason the project has been deleted return null System out println index name path toOS String index get Index File get Name return index  reuseExistingFile createIfMissing getIndex IPath containerPath indexLocation reuseExistingFile createIfMissing indexLocation getIndexStates indexLocation currentIndexState UNKNOWN_STATE currentIndexState UNKNOWN_STATE AddJarFileToIndex rebuildIndex indexLocation containerPath reuseExistingFile indexFile indexLocation indexFile indexLocation containerPath toOSString indexLocation IOException currentIndexState REBUILDING_STATE indexLocation containerPath toOSString rebuildIndex indexLocation containerPath createIfMissing currentIndexState SAVED_STATE rebuildIndex indexLocation containerPath createIfMissing indexLocation containerPath toOSString indexLocation containerPath toOSString indexLocation IOException indexLocation containerPath toOSString toOSString getIndexFile getName
Returns the index for a given project according to the following algorithm if index is already in memory answers this one back if reuse Existing File then read it and return this index and record it in memory if create If Missing then create a new empty index and record it in memory Warning Does not check whether index is consistent not being used public synchronized Index get Index I Path container Path boolean reuse Existing File boolean create If Missing String index Location compute Index Location container Path return get Index container Path index Location reuse Existing File create If Missing  reuseExistingFile createIfMissing getIndex IPath containerPath reuseExistingFile createIfMissing indexLocation computeIndexLocation containerPath getIndex containerPath indexLocation reuseExistingFile createIfMissing
public synchronized Index get Index For Update I Path container Path boolean reuse Existing File boolean create If Missing String index Location compute Index Location container Path if get Index States get index Location REBUILDING STATE return get Index container Path index Location reuse Existing File create If Missing return null abort the job since the index has been removed from the REBUILDING STATE  getIndexForUpdate IPath containerPath reuseExistingFile createIfMissing indexLocation computeIndexLocation containerPath getIndexStates indexLocation REBUILDING_STATE getIndex containerPath indexLocation reuseExistingFile createIfMissing REBUILDING_STATE
private Simple Lookup Table get Index States if index States null return index States this index States new Simple Lookup Table char saved Index Names read Index State if saved Index Names length 0 char names Char Operation split On n saved Index Names for int i 0 l names length i l i char name names i if name length 0 this index States put new String name SAVED STATE return this index States  SimpleLookupTable getIndexStates indexStates indexStates indexStates SimpleLookupTable savedIndexNames readIndexState savedIndexNames CharOperation splitOn savedIndexNames indexStates SAVED_STATE indexStates
private I Path get Java Plugin Working Location if this java Plugin Location null return this java Plugin Location I Path state Location Java Core get Plugin get State Location TODO jerome workaround for https bugs eclipse org bugs show bug cgi id 62267 String device state Location get Device if device null device char At 0 state Location state Location set Device device substring 1 return this java Plugin Location state Location  IPath getJavaPluginWorkingLocation javaPluginLocation javaPluginLocation IPath stateLocation JavaCore getPlugin getStateLocation show_bug stateLocation getDevice charAt stateLocation stateLocation setDevice javaPluginLocation stateLocation
public void index Document Search Document search Document Search Participant search Participant Index index I Path index Location throws IO Exception try Internal Search Document search Document index index search Participant index Document search Document index Location finally Internal Search Document search Document index null  indexDocument SearchDocument searchDocument SearchParticipant searchParticipant IPath indexLocation IOException InternalSearchDocument searchDocument searchParticipant indexDocument searchDocument indexLocation InternalSearchDocument searchDocument
Trigger addition of the entire content of a project Note the actual operation is performed in background public void index All I Project project if Java Core get Plugin null return Also request indexing of binaries on the classpath determine the new children try Java Model model Java Model Manager get Java Model Manager get Java Model Java Project java Project Java Project model get Java Project project only consider immediate libraries each project will do the same NOTE force to resolve CP variables before calling indexer 19303 so that initializers will be run in the current thread I Classpath Entry entries java Project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress for int i 0 i entries length i I Classpath Entry entry entries i if entry get Entry Kind I Classpath Entry CPE LIBRARY this index Library entry get Path project catch Java Model Exception e cannot retrieve classpath info check if the same request is not already in the queue Index Request request new Index All Project project this for int i this job End i this job Start i NB don t check job at job Start as it may have already started see http bugs eclipse org bugs show bug cgi id 32488 if request equals this awaiting Jobs i return this request request  indexAll IProject JavaCore getPlugin JavaModel JavaModelManager getJavaModelManager getJavaModel JavaProject javaProject JavaProject getJavaProject IClasspathEntry javaProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress IClasspathEntry getEntryKind IClasspathEntry CPE_LIBRARY indexLibrary getPath JavaModelException IndexRequest IndexAllProject jobEnd jobStart jobStart show_bug awaitingJobs
Trigger addition of a library to an index Note the actual operation is performed in background public void index Library I Path path I Project requesting Project requesting Project is no longer used to cancel jobs but leave it here just in case if Java Core get Plugin null return Object target Java Model get Target Resources Plugin get Workspace get Root path true Index Request request null if target instanceof I File request new Add Jar File To Index I File target this else if target instanceof java io File if java io File target is File request new Add Jar File To Index path this else return else if target instanceof I Folder request new Index Binary Folder I Folder target this else return check if the same request is not already in the queue for int i this job End i this job Start i NB don t check job at job Start as it may have already started see http bugs eclipse org bugs show bug cgi id 32488 if request equals this awaiting Jobs i return this request request  indexLibrary IPath IProject requestingProject requestingProject JavaCore getPlugin JavaModel getTarget ResourcesPlugin getWorkspace getRoot IndexRequest IFile AddJarFileToIndex IFile isFile AddJarFileToIndex IFolder IndexBinaryFolder IFolder jobEnd jobStart jobStart show_bug awaitingJobs
Index the content of the given source folder public void index Source Folder Java Project java Project I Path source Folder char inclusion Patterns char exclusion Patterns I Project project java Project get Project if this job End this job Start check if a job to index the project is not already in the queue Index Request request new Index All Project project this for int i this job End i this job Start i NB don t check job at job Start as it may have already started see http bugs eclipse org bugs show bug cgi id 32488 if request equals this awaiting Jobs i return this request new Add Folder To Index source Folder project inclusion Patterns exclusion Patterns this  indexSourceFolder JavaProject javaProject IPath sourceFolder inclusionPatterns exclusionPatterns IProject javaProject getProject jobEnd jobStart IndexRequest IndexAllProject jobEnd jobStart jobStart show_bug awaitingJobs AddFolderToIndex sourceFolder inclusionPatterns exclusionPatterns
public void job Was Cancelled I Path container Path String index Location compute Index Location container Path Object o this indexes get index Location if o instanceof Index Index o monitor null this indexes remove index Location update Index State index Location UNKNOWN STATE  jobWasCancelled IPath containerPath indexLocation computeIndexLocation containerPath indexLocation indexLocation updateIndexState indexLocation UNKNOWN_STATE
Advance to the next available job once the current one has been completed Note clients awaiting until the job count is zero are still waiting at this point protected synchronized void move To Next Job remember that one job was executed and we will need to save indexes at some point need To Save true super move To Next Job  moveToNextJob needToSave moveToNextJob
No more job awaiting protected void notify Idle long idling Time if idling Time 1000 need To Save save Indexes  notifyIdle idlingTime idlingTime needToSave saveIndexes
Name of the background process public String process Name return Util bind process name NON NLS 1  processName
private void rebuild Index String index Location I Path container Path I Workspace workspace Resources Plugin get Workspace if workspace null return Object target Java Model get Target workspace get Root container Path true if target null return if VERBOSE Util verbose request to rebuild index index Location path container Path toOS String NON NLS 1 NON NLS 2 update Index State index Location REBUILDING STATE Index Request request null if target instanceof I Project I Project p I Project target if Java Project has Java Nature p request new Index All Project p this else if target instanceof I Folder request new Index Binary Folder I Folder target this else if target instanceof I File request new Add Jar File To Index I File target this else if target instanceof java io File request new Add Jar File To Index container Path this if request null request request  rebuildIndex indexLocation IPath containerPath IWorkspace ResourcesPlugin getWorkspace JavaModel getTarget getRoot containerPath indexLocation containerPath toOSString updateIndexState indexLocation REBUILDING_STATE IndexRequest IProject IProject IProject JavaProject hasJavaNature IndexAllProject IFolder IndexBinaryFolder IFolder IFile AddJarFileToIndex IFile AddJarFileToIndex containerPath
Recreates the index for a given path keeping the same read write monitor Returns the new empty index or null if it didn t exist before Warning Does not check whether index is consistent not being used public synchronized Index recreate Index I Path container Path only called to over write an existing cached index try Path is already canonical String index Location compute Index Location container Path Index index Index this indexes get index Location Read Write Monitor monitor index null null index monitor if VERBOSE Util verbose recreating index index Location for path container Path toOS String NON NLS 1 NON NLS 2 index new Index index Location Index for container Path toOS String false reuse index file NON NLS 1 this indexes put index Location index index monitor monitor return index catch IO Exception e The file could not be created Possible reason the project has been deleted if VERBOSE Util verbose failed to recreate index for path container Path toOS String NON NLS 1 NON NLS 2 e print Stack Trace return null  recreateIndex IPath containerPath indexLocation computeIndexLocation containerPath indexLocation ReadWriteMonitor indexLocation containerPath toOSString indexLocation containerPath toOSString indexLocation IOException containerPath toOSString printStackTrace
Trigger removal of a resource to an index Note the actual operation is performed in background public void remove String resource Name I Path indexed Container request new Remove From Index resource Name indexed Container this  resourceName IPath indexedContainer RemoveFromIndex resourceName indexedContainer
Removes the index for a given path This is a no op if the index did not exist public synchronized void remove Index I Path container Path if VERBOSE Util verbose removing index container Path NON NLS 1 String index Location compute Index Location container Path File index File new File index Location if index File exists index File delete Object o this indexes get index Location if o instanceof Index Index o monitor null this indexes remove index Location update Index State index Location null  removeIndex IPath containerPath containerPath indexLocation computeIndexLocation containerPath indexFile indexLocation indexFile indexFile indexLocation indexLocation updateIndexState indexLocation
Removes all indexes whose paths start with or are equal to the given path public synchronized void remove Index Family I Path path only finds cached index files shutdown removes all non cached index files Array List to Remove null Object container Paths this index Locations key Table for int i 0 length container Paths length i length i I Path container Path I Path container Paths i if container Path null continue if path is Prefix Of container Path if to Remove null to Remove new Array List to Remove add container Path if to Remove null for int i 0 length to Remove size i length i this remove Index I Path to Remove get i  removeIndexFamily IPath ArrayList toRemove containerPaths indexLocations keyTable containerPaths IPath containerPath IPath containerPaths containerPath isPrefixOf containerPath toRemove toRemove ArrayList toRemove containerPath toRemove toRemove removeIndex IPath toRemove
Remove the content of the given source folder from the index public void remove Source Folder From Index Java Project java Project I Path source Folder char inclusion Patterns char exclusion Patterns I Project project java Project get Project if this job End this job Start check if a job to index the project is not already in the queue Index Request request new Index All Project project this for int i this job End i this job Start i NB don t check job at job Start as it may have already started see http bugs eclipse org bugs show bug cgi id 32488 if request equals this awaiting Jobs i return this request new Remove Folder From Index source Folder inclusion Patterns exclusion Patterns project this  removeSourceFolderFromIndex JavaProject javaProject IPath sourceFolder inclusionPatterns exclusionPatterns IProject javaProject getProject jobEnd jobStart IndexRequest IndexAllProject jobEnd jobStart jobStart show_bug awaitingJobs RemoveFolderFromIndex sourceFolder inclusionPatterns exclusionPatterns
Flush current state public synchronized void reset super reset if this indexes null this indexes new Hash Map 5 this index States null this index Locations new Simple Lookup Table this java Plugin Location null  HashMap indexStates indexLocations SimpleLookupTable javaPluginLocation
public void save Index Index index throws IO Exception must have permission to write from the write monitor if index has Changed if VERBOSE Util verbose saving index index get Index File NON NLS 1 index save TODO should use get Java Plugin Working Location index simple name to avoid bugs such as https bugs eclipse org bugs show bug cgi id 62267 String index Location index get Index File get Path if this job End this job Start Object container Path this index Locations key For Value index Location if container Path null for int i this job End i this job Start i skip the current job I Job job this awaiting Jobs i if job instanceof Index Request if Index Request job container Path equals container Path return update Index State index Location SAVED STATE  saveIndex IOException hasChanged getIndexFile getJavaPluginWorkingLocation show_bug indexLocation getIndexFile getPath jobEnd jobStart containerPath indexLocations keyForValue indexLocation containerPath jobEnd jobStart IJob awaitingJobs IndexRequest IndexRequest containerPath containerPath updateIndexState indexLocation SAVED_STATE
Commit all index memory changes to disk public void save Indexes only save cached indexes the rest were not modified Array List to Save new Array List synchronized this for Iterator iter this indexes values iterator iter has Next Object o iter next if o instanceof Index to Save add o boolean all Saved true for int i 0 length to Save size i length i Index index Index to Save get i Read Write Monitor monitor index monitor if monitor null continue index got deleted since acquired try take read lock before checking if index has changed don t take write lock yet since it can cause a deadlock see https bugs eclipse org bugs show bug cgi id 50571 monitor enter Read if index has Changed if monitor exit Read Enter Write try save Index index catch IO Exception e if VERBOSE Util verbose got the following exception while saving System err NON NLS 1 e print Stack Trace all Saved false finally monitor exit Write Enter Read else all Saved false finally monitor exit Read this need To Save all Saved  saveIndexes ArrayList toSave ArrayList hasNext toSave allSaved toSave toSave ReadWriteMonitor show_bug enterRead hasChanged exitReadEnterWrite saveIndex IOException printStackTrace allSaved exitWriteEnterRead allSaved exitRead needToSave allSaved
request new Index Request container Path this public boolean execute I Progress Monitor progress Monitor if this is Cancelled progress Monitor null progress Monitor is Canceled return true ensure no concurrent write access to index Index index get Index container Path index Location true reuse index file true create if none if index null return true Read Write Monitor monitor index monitor if monitor null return true index got deleted since acquired try monitor enter Write ask permission to write index Document search Document search Participant index new Path index Location catch IO Exception e if Job Manager VERBOSE Util verbose failed to index search Document get Path because of the following exception System err NON NLS 1 NON NLS 2 e print Stack Trace return false finally monitor exit Write free write lock return true  IndexRequest containerPath IProgressMonitor progressMonitor isCancelled progressMonitor progressMonitor isCanceled getIndex containerPath indexLocation ReadWriteMonitor enterWrite indexDocument searchDocument searchParticipant indexLocation IOException JobManager searchDocument getPath printStackTrace exitWrite
return true public String to String return indexing search Document get Path NON NLS 1  toString searchDocument getPath
public void schedule Document Indexing final Search Document search Document I Path container Path final String index Location final Search Participant search Participant request new Index Request container Path this public boolean execute I Progress Monitor progress Monitor if this is Cancelled progress Monitor null progress Monitor is Canceled return true ensure no concurrent write access to index Index index get Index container Path index Location true reuse index file true create if none if index null return true Read Write Monitor monitor index monitor if monitor null return true index got deleted since acquired try monitor enter Write ask permission to write index Document search Document search Participant index new Path index Location catch IO Exception e if Job Manager VERBOSE Util verbose failed to index search Document get Path because of the following exception System err NON NLS 1 NON NLS 2 e print Stack Trace return false finally monitor exit Write free write lock return true public String to String return indexing search Document get Path NON NLS 1  scheduleDocumentIndexing SearchDocument searchDocument IPath containerPath indexLocation SearchParticipant searchParticipant IndexRequest containerPath IProgressMonitor progressMonitor isCancelled progressMonitor progressMonitor isCanceled getIndex containerPath indexLocation ReadWriteMonitor enterWrite indexDocument searchDocument searchParticipant indexLocation IOException JobManager searchDocument getPath printStackTrace exitWrite toString searchDocument getPath
public String to String String Buffer buffer new String Buffer 10 buffer append super to String buffer append In memory indexes n NON NLS 1 int count 0 for Iterator iter this indexes values iterator iter has Next buffer append count append append iter next to String append n NON NLS 1 return buffer to String  toString StringBuffer StringBuffer toString hasNext toString toString
private char read Index State try return org eclipse jdt internal compiler util Util get File Char Content saved Index Names File null catch IO Exception ignored if VERBOSE Util verbose Failed to read saved index file names NON NLS 1 return new char 0  readIndexState getFileCharContent savedIndexNamesFile IOException
private synchronized void update Index State String index Location Integer index State get Index States ensure the states are initialized if index State null if index State equals index States get index Location return not changed index States put index Location index State else if index States contains Key index Location return did not exist anyway index States remove Key index Location Buffered Writer writer null try writer new Buffered Writer new File Writer saved Index Names File Object keys index States key Table Object states index States value Table for int i 0 l states length i l i if states i SAVED STATE writer write String keys i writer write n catch IO Exception ignored if VERBOSE Util verbose Failed to write saved index file names System err NON NLS 1 finally if writer null try writer close catch IO Exception e ignore if VERBOSE String state NON NLS 1 if index State SAVED STATE state SAVED NON NLS 1 else if index State UPDATING STATE state UPDATING NON NLS 1 else if index State UNKNOWN STATE state UNKNOWN NON NLS 1 else if index State REBUILDING STATE state REBUILDING NON NLS 1 Util verbose index state updated to state for index Location NON NLS 1 NON NLS 2  updateIndexState indexLocation indexState getIndexStates indexState indexState indexStates indexLocation indexStates indexLocation indexState indexStates containsKey indexLocation indexStates removeKey indexLocation BufferedWriter BufferedWriter FileWriter savedIndexNamesFile indexStates keyTable indexStates valueTable SAVED_STATE IOException IOException indexState SAVED_STATE indexState UPDATING_STATE indexState UNKNOWN_STATE indexState REBUILDING_STATE indexLocation

protected Index Manager manager public Index Request I Path container Path Index Manager manager this container Path container Path this manager manager  IndexManager IndexRequest IPath containerPath IndexManager containerPath containerPath
public boolean belongs To String project Name Or Jar Path used to remove pending jobs because the project was deleted not to delete index files can be found either by project name or JAR path name return project Name Or Jar Path equals this container Path segment 0 project Name Or Jar Path equals this container Path to String  belongsTo projectNameOrJarPath projectNameOrJarPath containerPath projectNameOrJarPath containerPath toString
project Name Or Jar Path equals this container Path to String public void cancel this manager job Was Cancelled this container Path this is Cancelled true  projectNameOrJarPath containerPath toString jobWasCancelled containerPath isCancelled
this is Cancelled true public void ensure Ready To Run tag the index as inconsistent this manager about To Update Index this container Path updated Index State  isCancelled ensureReadyToRun aboutToUpdateIndex containerPath updatedIndexState
this manager about To Update Index this container Path updated Index State protected Integer updated Index State return Index Manager UPDATING STATE  aboutToUpdateIndex containerPath updatedIndexState updatedIndexState IndexManager UPDATING_STATE

Hidden by API Search Document subclass public void add Index Entry char category char key if this index null index add Index Entry category key this  SearchDocument addIndexEntry addIndexEntry
Hidden by API Search Document subclass public void remove All Index Entries if this index null index remove get Path  SearchDocument removeAllIndexEntries getPath
Hidden by API Search Document subclass public String get Path return null implemented by subclass  SearchDocument getPath

private int status 0 Concurrent reading is allowed Blocking only when already writing public synchronized void enter Read while status 0 try wait catch Interrupted Exception e ignore status  enterRead InterruptedException
Only one writer at a time is allowed to perform Blocking only when already writing or reading public synchronized void enter Write while status 0 try wait catch Interrupted Exception e ignore status  enterWrite InterruptedException
Only notify waiting writer s if last reader public synchronized void exit Read if status 0 notify All  exitRead notifyAll
When writing is over all readers and possible writers are granted permission to restart concurrently public synchronized void exit Write if status 0 notify All  exitWrite notifyAll
Atomic exit Read enter Write Allows to keep monitor in between exit read and next enter write Use when writing changes is optional otherwise call the individual methods Returns false if multiple readers are accessing the index public synchronized boolean exit Read Enter Write if status 1 return false only continue if this is the only reader status 1 return true  exitRead enterWrite exitReadEnterWrite
Atomic exit Write enter Read Allows to keep monitor in between exit write and next enter read When writing is over all readers are granted permissing to restart concurrently This is the same as pre synchronized monitor monitor exit Write monitor enter Read pre public synchronized void exit Write Enter Read this exit Write this enter Read  exitWrite enterRead exitWrite enterRead exitWriteEnterRead exitWrite enterRead
public String to String String Buffer buffer new String Buffer if status 0 buffer append Monitor idle NON NLS 1 else if status 0 buffer append Monitor writing NON NLS 1 else if status 0 buffer append Monitor reading NON NLS 1 buffer append status NON NLS 1 buffer append this status buffer append NON NLS 1 return buffer to String  toString StringBuffer StringBuffer toString

public Remove Folder From Index I Path folder Path char inclusion Patterns char exclusion Patterns I Project project Index Manager manager super project get Full Path manager this folder Path folder Path this inclusion Patterns inclusion Patterns this exclusion Patterns exclusion Patterns this project project  RemoveFolderFromIndex IPath folderPath inclusionPatterns exclusionPatterns IProject IndexManager getFullPath folderPath folderPath inclusionPatterns inclusionPatterns exclusionPatterns exclusionPatterns
public boolean execute I Progress Monitor progress Monitor if this is Cancelled progress Monitor null progress Monitor is Canceled return true ensure no concurrent write access to index Index index this manager get Index this container Path true reuse index file false create if none if index null return true Read Write Monitor monitor index monitor if monitor null return true index got deleted since acquired try monitor enter Read ask permission to read String paths index query Document Names this folder Path to String all file names belonging to the folder or its subfolders and that are not excluded see http bugs eclipse org bugs show bug cgi id 32607 if this exclusion Patterns null this inclusion Patterns null for int i 0 max paths null 0 paths length i max i manager remove paths i this container Path write lock will be acquired by the remove operation else for int i 0 max paths null 0 paths length i max i String document Path paths i if Util is Excluded new Path document Path this inclusion Patterns this exclusion Patterns false manager remove document Path this container Path write lock will be acquired by the remove operation catch IO Exception e if Job Manager VERBOSE Util verbose failed to remove this folder Path from index because of the following exception System err NON NLS 1 NON NLS 2 e print Stack Trace return false finally monitor exit Read free read lock return true  IProgressMonitor progressMonitor isCancelled progressMonitor progressMonitor isCanceled getIndex containerPath ReadWriteMonitor enterRead queryDocumentNames folderPath toString show_bug exclusionPatterns inclusionPatterns containerPath documentPath isExcluded documentPath inclusionPatterns exclusionPatterns documentPath containerPath IOException JobManager folderPath printStackTrace exitRead
return true public String to String return removing this folder Path from index this container Path NON NLS 1 NON NLS 2  toString folderPath containerPath

String resource Name public Remove From Index String resource Name I Path container Path Index Manager manager super container Path manager this resource Name resource Name  resourceName RemoveFromIndex resourceName IPath containerPath IndexManager containerPath resourceName resourceName
public boolean execute I Progress Monitor progress Monitor if this is Cancelled progress Monitor null progress Monitor is Canceled return true ensure no concurrent write access to index Index index this manager get Index this container Path true reuse index file false create if none if index null return true Read Write Monitor monitor index monitor if monitor null return true index got deleted since acquired try monitor enter Write ask permission to write index remove resource Name finally monitor exit Write free write lock return true  IProgressMonitor progressMonitor isCancelled progressMonitor progressMonitor isCanceled getIndex containerPath ReadWriteMonitor enterWrite resourceName exitWrite
return true public String to String return removing this resource Name from index this container Path NON NLS 1 NON NLS 2  toString resourceName containerPath

public class Save Index extends Index Request public Save Index I Path container Path Index Manager manager super container Path manager  SaveIndex IndexRequest SaveIndex IPath containerPath IndexManager containerPath
public boolean execute I Progress Monitor progress Monitor if this is Cancelled progress Monitor null progress Monitor is Canceled return true ensure no concurrent write access to index Index index this manager get Index this container Path true reuse index file false don t create if none if index null return true Read Write Monitor monitor index monitor if monitor null return true index got deleted since acquired try monitor enter Write ask permission to write this manager save Index index catch IO Exception e if Job Manager VERBOSE Util verbose failed to save index this container Path because of the following exception System err NON NLS 1 NON NLS 2 e print Stack Trace return false finally monitor exit Write free write lock return true  IProgressMonitor progressMonitor isCancelled progressMonitor progressMonitor isCanceled getIndex containerPath ReadWriteMonitor enterWrite saveIndex IOException JobManager containerPath printStackTrace exitWrite
return true public String to String return saving index for this container Path NON NLS 1  toString containerPath

protected Default Problem Factory problem Factory new Default Problem Factory Locale get Default public Source Indexer Search Document document super document  DefaultProblemFactory problemFactory DefaultProblemFactory getDefault SourceIndexer SearchDocument
public void index Document Create a new Parser Source Indexer Requestor requestor new Source Indexer Requestor this String document Path this document get Path I Path path new Path document Path I Project project Resources Plugin get Workspace get Root get Project path segment 0 Source Element Parser parser new Source Element Parser requestor this problem Factory new Compiler Options Java Core create project get Options true true index local declarations parser report Only One Syntax Error true Always check javadoc while indexing parser javadoc Parser check Doc Comment true Launch the parser char source null char name null try source document get Char Contents name document Path to Char Array catch Exception e ignore if source null name null return could not retrieve document info e g resource was discarded Compilation Unit compilation Unit new Compilation Unit source name try parser parse Compilation Unit compilation Unit true full parse catch Exception e if Job Manager VERBOSE e print Stack Trace  indexDocument SourceIndexerRequestor SourceIndexerRequestor documentPath getPath IPath documentPath IProject ResourcesPlugin getWorkspace getRoot getProject SourceElementParser SourceElementParser problemFactory CompilerOptions JavaCore getOptions reportOnlyOneSyntaxError javadocParser checkDocComment getCharContents documentPath toCharArray CompilationUnit compilationUnit CompilationUnit parseCompilationUnit compilationUnit JobManager printStackTrace

int method Depth 0 public Source Indexer Requestor Source Indexer indexer this indexer indexer  methodDepth SourceIndexerRequestor SourceIndexer
see I Source Element Requestor accept Constructor Reference char int int public void accept Constructor Reference char type Name int arg Count int source Position this indexer add Constructor Reference type Name arg Count int last Dot Char Operation last Index Of type Name if last Dot 1 char qualification Char Operation split On Char Operation subarray type Name 0 last Dot for int i 0 length qualification length i length i this indexer add Name Reference qualification i  ISourceElementRequestor acceptConstructorReference acceptConstructorReference typeName argCount sourcePosition addConstructorReference typeName argCount lastDot CharOperation lastIndexOf typeName lastDot CharOperation splitOn CharOperation typeName lastDot addNameReference
see I Source Element Requestor accept Field Reference char int public void accept Field Reference char field Name int source Position this indexer add Field Reference field Name  ISourceElementRequestor acceptFieldReference acceptFieldReference fieldName sourcePosition addFieldReference fieldName
see I Source Element Requestor accept Import int int char boolean int public void accept Import int declaration Start int declaration End char name boolean on Demand int modifiers char qualification Char Operation split On Char Operation subarray name 0 Char Operation last Index Of name for int i 0 length qualification length i length i this indexer add Name Reference qualification i  ISourceElementRequestor acceptImport acceptImport declarationStart declarationEnd onDemand CharOperation splitOn CharOperation CharOperation lastIndexOf addNameReference
see I Source Element Requestor accept Line Separator Positions int public void accept Line Separator Positions int positions implements interface method  ISourceElementRequestor acceptLineSeparatorPositions acceptLineSeparatorPositions
see I Source Element Requestor accept Method Reference char int int public void accept Method Reference char method Name int arg Count int source Position this indexer add Method Reference method Name arg Count  ISourceElementRequestor acceptMethodReference acceptMethodReference methodName argCount sourcePosition addMethodReference methodName argCount
see I Source Element Requestor accept Package int int char public void accept Package int declaration Start int declaration End char name this package Name name  ISourceElementRequestor acceptPackage acceptPackage declarationStart declarationEnd packageName
see I Source Element Requestor accept Problem I Problem public void accept Problem I Problem problem implements interface method  ISourceElementRequestor acceptProblem IProblem acceptProblem IProblem
see I Source Element Requestor accept Type Reference char int int public void accept Type Reference char type Name int source Start int source End int length type Name length for int i 0 i length 1 i accept Unknown Reference type Name i 0 accept Type Reference type Name length 1 0  ISourceElementRequestor acceptTypeReference acceptTypeReference typeName sourceStart sourceEnd typeName acceptUnknownReference typeName acceptTypeReference typeName
see I Source Element Requestor accept Type Reference char int public void accept Type Reference char simple Type Name int source Position this indexer add Type Reference simple Type Name  ISourceElementRequestor acceptTypeReference acceptTypeReference simpleTypeName sourcePosition addTypeReference simpleTypeName
see I Source Element Requestor accept Unknown Reference char int int public void accept Unknown Reference char name int source Start int source End for int i 0 i name length i accept Unknown Reference name i 0  ISourceElementRequestor acceptUnknownReference acceptUnknownReference sourceStart sourceEnd acceptUnknownReference
see I Source Element Requestor accept Unknown Reference char int public void accept Unknown Reference char name int source Position this indexer add Name Reference name  ISourceElementRequestor acceptUnknownReference acceptUnknownReference sourcePosition addNameReference
public char enclosing Type Names if depth 0 return null char qualification new char this depth System arraycopy this enclosing Type Names 0 qualification 0 this depth return qualification  enclosingTypeNames enclosingTypeNames
see I Source Element Requestor enter Class int int char int int char char public void enter Class int declaration Start int modifiers char name int name Source Start int name Source End char superclass char superinterfaces eliminate possible qualifications given they need to be fully resolved again if superclass null superclass Char Operation last Segment superclass add implicit constructor reference to default constructor this indexer add Constructor Reference superclass 0 if superinterfaces null for int i 0 length superinterfaces length i length i superinterfaces i Char Operation last Segment superinterfaces i char type Names if this method Depth 0 type Names ONE ZERO CHAR else type Names this enclosing Type Names this indexer add Class Declaration modifiers this package Name name type Names superclass superinterfaces this push Type Name name  ISourceElementRequestor enterClass enterClass declarationStart nameSourceStart nameSourceEnd CharOperation lastSegment addConstructorReference CharOperation lastSegment typeNames methodDepth typeNames ONE_ZERO_CHAR typeNames enclosingTypeNames addClassDeclaration packageName typeNames pushTypeName
see I Source Element Requestor enter Compilation Unit public void enter Compilation Unit implements interface method  ISourceElementRequestor enterCompilationUnit enterCompilationUnit
see I Source Element Requestor enter Constructor int int char int int char char char public void enter Constructor int declaration Start int modifiers char name int name Source Start int name Source End char parameter Types char parameter Names char exception Types this indexer add Constructor Declaration name parameter Types exception Types this method Depth  ISourceElementRequestor enterConstructor enterConstructor declarationStart nameSourceStart nameSourceEnd parameterTypes parameterNames exceptionTypes addConstructorDeclaration parameterTypes exceptionTypes methodDepth
see I Source Element Requestor enter Field int int char char int int public void enter Field int declaration Start int modifiers char type char name int name Source Start int name Source End this indexer add Field Declaration type name this method Depth  ISourceElementRequestor enterField enterField declarationStart nameSourceStart nameSourceEnd addFieldDeclaration methodDepth
see I Source Element Requestor enter Initializer int int public void enter Initializer int declaration Source Start int modifiers this method Depth  ISourceElementRequestor enterInitializer enterInitializer declarationSourceStart methodDepth
see I Source Element Requestor enter Interface int int char int int char public void enter Interface int declaration Start int modifiers char name int name Source Start int name Source End char superinterfaces eliminate possible qualifications given they need to be fully resolved again if superinterfaces null for int i 0 length superinterfaces length i length i superinterfaces i Char Operation last Segment superinterfaces i char type Names if this method Depth 0 type Names ONE ZERO CHAR else type Names this enclosing Type Names this indexer add Interface Declaration modifiers package Name name type Names superinterfaces this push Type Name name  ISourceElementRequestor enterInterface enterInterface declarationStart nameSourceStart nameSourceEnd CharOperation lastSegment typeNames methodDepth typeNames ONE_ZERO_CHAR typeNames enclosingTypeNames addInterfaceDeclaration packageName typeNames pushTypeName
see I Source Element Requestor enter Method int int char char int int char char char public void enter Method int declaration Start int modifiers char return Type char name int name Source Start int name Source End char parameter Types char parameter Names char exception Types this indexer add Method Declaration name parameter Types return Type exception Types this method Depth  ISourceElementRequestor enterMethod enterMethod declarationStart returnType nameSourceStart nameSourceEnd parameterTypes parameterNames exceptionTypes addMethodDeclaration parameterTypes returnType exceptionTypes methodDepth
see I Source Element Requestor exit Class int public void exit Class int declaration End pop Type Name  ISourceElementRequestor exitClass exitClass declarationEnd popTypeName
see I Source Element Requestor exit Compilation Unit int public void exit Compilation Unit int declaration End implements interface method  ISourceElementRequestor exitCompilationUnit exitCompilationUnit declarationEnd
see I Source Element Requestor exit Constructor int public void exit Constructor int declaration End this method Depth  ISourceElementRequestor exitConstructor exitConstructor declarationEnd methodDepth
see I Source Element Requestor exit Field int int int public void exit Field int initialization Start int declaration End int declaration Source End this method Depth  ISourceElementRequestor exitField exitField initializationStart declarationEnd declarationSourceEnd methodDepth
see I Source Element Requestor exit Initializer int public void exit Initializer int declaration End this method Depth  ISourceElementRequestor exitInitializer exitInitializer declarationEnd methodDepth
see I Source Element Requestor exit Interface int public void exit Interface int declaration End pop Type Name  ISourceElementRequestor exitInterface exitInterface declarationEnd popTypeName
see I Source Element Requestor exit Method int public void exit Method int declaration End this method Depth  ISourceElementRequestor exitMethod exitMethod declarationEnd methodDepth
public void pop Type Name if depth 0 enclosing Type Names depth null else if Job Manager VERBOSE dump a trace so it can be tracked down try enclosing Type Names 1 null catch Array Index Out Of Bounds Exception e e print Stack Trace  popTypeName enclosingTypeNames JobManager enclosingTypeNames ArrayIndexOutOfBoundsException printStackTrace
public void push Type Name char type Name if depth enclosing Type Names length System arraycopy enclosing Type Names 0 enclosing Type Names new char depth 2 0 depth enclosing Type Names depth type Name  pushTypeName typeName enclosingTypeNames enclosingTypeNames enclosingTypeNames enclosingTypeNames typeName

answer false if requesting cancel public abstract boolean accept Index Match String document Path Search Pattern index Record Search Participant participant  acceptIndexMatch documentPath SearchPattern indexRecord SearchParticipant

public Index Selector I Java Search Scope search Scope Search Pattern pattern this search Scope search Scope this pattern pattern  IndexSelector IJavaSearchScope searchScope SearchPattern searchScope searchScope
Returns whether elements of the given project or jar can see the given focus an I Java Project or a Jar Package Fragment Rot either because the focus is part of the project or the jar or because it is accessible throught the project s classpath public static boolean can See Focus I Java Element focus boolean is Polymorphic Search I Path project Or Jar Path try I Java Model model focus get Java Model I Java Project project get Java Project project Or Jar Path model if project null project Or Jar Path is a jar it can see the focus only if it is on the classpath of a project that can see the focus I Java Project all Projects model get Java Projects for int i 0 length all Projects length i length i Java Project other Project Java Project all Projects i I Classpath Entry entries other Project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress for int j 0 length2 entries length j length2 j I Classpath Entry entry entries j if entry get Entry Kind I Classpath Entry CPE LIBRARY entry get Path equals project Or Jar Path if can See Focus focus is Polymorphic Search other Project get Path return true return false project Or Jar Path is a project Java Project focus Project focus instanceof Jar Package Fragment Root Java Project focus get Parent Java Project focus if is Polymorphic Search look for refering project I Classpath Entry entries focus Project get Expanded Classpath true for int i 0 length entries length i length i I Classpath Entry entry entries i if entry get Entry Kind I Classpath Entry CPE PROJECT entry get Path equals project Or Jar Path return true if focus instanceof Jar Package Fragment Root focus is part of a jar I Path focus Path focus get Path I Classpath Entry entries Java Project project get Expanded Classpath true for int i 0 length entries length i length i I Classpath Entry entry entries i if entry get Entry Kind I Classpath Entry CPE LIBRARY entry get Path equals focus Path return true return false focus is part of a project if focus equals project return true look for dependent projects I Path focus Path focus Project get Project get Full Path I Classpath Entry entries Java Project project get Expanded Classpath true for int i 0 length entries length i length i I Classpath Entry entry entries i if entry get Entry Kind I Classpath Entry CPE PROJECT entry get Path equals focus Path return true return false catch Java Model Exception e return false  IJavaProject JarPackageFragmentRot canSeeFocus IJavaElement isPolymorphicSearch IPath projectOrJarPath IJavaModel getJavaModel IJavaProject getJavaProject projectOrJarPath projectOrJarPath IJavaProject allProjects getJavaProjects allProjects JavaProject otherProject JavaProject allProjects IClasspathEntry otherProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress IClasspathEntry getEntryKind IClasspathEntry CPE_LIBRARY getPath projectOrJarPath canSeeFocus isPolymorphicSearch otherProject getPath projectOrJarPath JavaProject focusProject JarPackageFragmentRoot JavaProject getParent JavaProject isPolymorphicSearch IClasspathEntry focusProject getExpandedClasspath IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT getPath projectOrJarPath JarPackageFragmentRoot IPath focusPath getPath IClasspathEntry JavaProject getExpandedClasspath IClasspathEntry getEntryKind IClasspathEntry CPE_LIBRARY getPath focusPath IPath focusPath focusProject getProject getFullPath IClasspathEntry JavaProject getExpandedClasspath IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT getPath focusPath JavaModelException
private void initialize Index Locations Array List required Index Keys new Array List I Path projects And Jars this search Scope enclosing Projects And Jars I Workspace Root root Resources Plugin get Workspace get Root I Java Element project Or Jar Focus Match Locator project Or Jar Focus this pattern boolean is Polymorphic Search this pattern null false Match Locator is Polymorphic Search this pattern Index Manager manager Java Model Manager get Java Model Manager get Index Manager for int i 0 i projects And Jars length i I Path location I Path path projects And Jars i if root get Project path last Segment exists if project does not exist path segment Count 1 location root get File path get Location null new java io File location toOS String exists and internal jar file does not exist new java io File path toOS String exists and external jar file does not exist continue if project Or Jar Focus null can See Focus project Or Jar Focus is Polymorphic Search path if required Index Keys index Of path 1 required Index Keys add new Path manager compute Index Location path this index Locations new I Path required Index Keys size required Index Keys to Array this index Locations  initializeIndexLocations ArrayList requiredIndexKeys ArrayList IPath projectsAndJars searchScope enclosingProjectsAndJars IWorkspaceRoot ResourcesPlugin getWorkspace getRoot IJavaElement projectOrJarFocus MatchLocator projectOrJarFocus isPolymorphicSearch MatchLocator isPolymorphicSearch IndexManager JavaModelManager getJavaModelManager getIndexManager projectsAndJars IPath IPath projectsAndJars getProject lastSegment segmentCount getFile getLocation toOSString toOSString projectOrJarFocus canSeeFocus projectOrJarFocus isPolymorphicSearch requiredIndexKeys indexOf requiredIndexKeys computeIndexLocation indexLocations IPath requiredIndexKeys requiredIndexKeys toArray indexLocations
public I Path get Index Locations if this index Locations null this initialize Index Locations return this index Locations  IPath getIndexLocations indexLocations initializeIndexLocations indexLocations
Returns the java project that corresponds to the given path Returns null if the path doesn t correspond to a project private static I Java Project get Java Project I Path path I Java Model model I Java Project project model get Java Project path last Segment if project exists return project return null  IJavaProject getJavaProject IPath IJavaModel IJavaProject getJavaProject lastSegment

protected char char Contents public Java Search Document String document Path Search Participant participant super document Path participant  charContents JavaSearchDocument documentPath SearchParticipant documentPath
super document Path participant public Java Search Document I File file Search Participant participant super file get Full Path to String participant this file file  documentPath JavaSearchDocument IFile SearchParticipant getFullPath toString
this file file public Java Search Document java util zip Zip Entry zip Entry I Path zip File Path byte contents Search Participant participant super zip File Path I Java Search Scope JAR FILE ENTRY SEPARATOR zip Entry get Name participant this byte Contents contents  JavaSearchDocument ZipEntry zipEntry IPath zipFilePath SearchParticipant zipFilePath IJavaSearchScope JAR_FILE_ENTRY_SEPARATOR zipEntry getName byteContents
public byte get Byte Contents if this byte Contents null return this byte Contents try return org eclipse jdt internal compiler util Util get File Byte Content get Location to File catch IO Exception e if Search Engine VERBOSE Job Manager VERBOSE used during search and during indexing e print Stack Trace return null  getByteContents byteContents byteContents getFileByteContent getLocation toFile IOException SearchEngine JobManager printStackTrace
public char get Char Contents if this char Contents null return this char Contents try return org eclipse jdt internal compiler util Util get File Char Content get Location to File get Encoding catch IO Exception e if Search Engine VERBOSE Job Manager VERBOSE used during search and during indexing e print Stack Trace return null  getCharContents charContents charContents getFileCharContent getLocation toFile getEncoding IOException SearchEngine JobManager printStackTrace
public String get Encoding Return the encoding of the associated file I File resource get File if resource null try return resource get Charset catch Core Exception ce try return Resources Plugin get Workspace get Root get Default Charset catch Core Exception e use no encoding return null  getEncoding IFile getFile getCharset CoreException ResourcesPlugin getWorkspace getRoot getDefaultCharset CoreException
private I File get File if this file null this file Resources Plugin get Workspace get Root get File new Path get Path return this file  IFile getFile ResourcesPlugin getWorkspace getRoot getFile getPath
private I Path get Location I File resource get File if resource null return resource get Location return new Path get Path external file  IPath getLocation IFile getFile getLocation getPath
return new Path get Path external file public String to String return Search Document for get Path NON NLS 1  getPath toString SearchDocument getPath

see org eclipse jdt core search Search Participant begin Searching public void begin Searching super begin Searching this index Selector null  SearchParticipant beginSearching beginSearching beginSearching indexSelector
see org eclipse jdt core search Search Participant done Searching public void done Searching this index Selector null super done Searching  SearchParticipant doneSearching doneSearching indexSelector doneSearching
see org eclipse jdt core search Search Participant get Name public String get Description return Java NON NLS 1  SearchParticipant getName getDescription
see org eclipse jdt core search Search Participant get Document String public Search Document get Document String document Path return new Java Search Document document Path this  SearchParticipant getDocument SearchDocument getDocument documentPath JavaSearchDocument documentPath
public void index Document Search Document document I Path index Path TODO must verify that the document index Path match when this is not called from schedule Document Indexing document remove All Index Entries in case the document was already indexed String document Path document get Path if org eclipse jdt internal compiler util Util is Java File Name document Path new Source Indexer document index Document else if org eclipse jdt internal compiler util Util is Class File Name document Path new Binary Indexer document index Document  indexDocument SearchDocument IPath indexPath indexPath scheduleDocumentIndexing removeAllIndexEntries documentPath getPath isJavaFileName documentPath SourceIndexer indexDocument isClassFileName documentPath BinaryIndexer indexDocument
public void locate Matches Search Document index Matches Search Pattern pattern I Java Search Scope scope Search Requestor requestor I Progress Monitor monitor throws Core Exception Match Locator match Locator new Match Locator pattern requestor scope monitor null null new Sub Progress Monitor monitor 95 eliminating false matches and locating them if monitor null monitor is Canceled throw new Operation Canceled Exception match Locator locate Matches index Matches if monitor null monitor is Canceled throw new Operation Canceled Exception match Locator locate Package Declarations this  locateMatches SearchDocument indexMatches SearchPattern IJavaSearchScope SearchRequestor IProgressMonitor CoreException MatchLocator matchLocator MatchLocator SubProgressMonitor isCanceled OperationCanceledException matchLocator locateMatches indexMatches isCanceled OperationCanceledException matchLocator locatePackageDeclarations
public I Path select Indexes Search Pattern pattern I Java Search Scope scope if this index Selector null this index Selector new Index Selector scope pattern return this index Selector get Index Locations  IPath selectIndexes SearchPattern IJavaSearchScope indexSelector indexSelector IndexSelector indexSelector getIndexLocations

public Java Search Scope this initialize disabled for now as this could be expensive Java Model Manager get Java Model Manager remember Scope this  JavaSearchScope JavaModelManager getJavaModelManager rememberScope
private void add Enclosing Project Or Jar I Path path int length this enclosing Projects And Jars length for int i 0 i length i if this enclosing Projects And Jars i equals path return System arraycopy this enclosing Projects And Jars 0 this enclosing Projects And Jars new I Path length 1 0 length this enclosing Projects And Jars length path  addEnclosingProjectOrJar IPath enclosingProjectsAndJars enclosingProjectsAndJars enclosingProjectsAndJars enclosingProjectsAndJars IPath enclosingProjectsAndJars
public void add Java Project java Project int include Mask Hash Set visited Projects throws Java Model Exception I Project project java Project get Project if project is Accessible visited Projects add project return this add Enclosing Project Or Jar project get Full Path I Classpath Entry entries java Project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress I Java Model model java Project get Java Model for int i 0 length entries length i length i I Classpath Entry entry entries i switch entry get Entry Kind case I Classpath Entry CPE LIBRARY I Classpath Entry raw Entry null Java Model Manager Per Project Info per Project Info java Project get Per Project Info if per Project Info null per Project Info resolved Path To Raw Entries null raw Entry I Classpath Entry per Project Info resolved Path To Raw Entries get entry get Path if raw Entry null break switch raw Entry get Entry Kind case I Classpath Entry CPE LIBRARY case I Classpath Entry CPE VARIABLE if include Mask APPLICATION LIBRARIES 0 I Path path entry get Path add path true add Enclosing Project Or Jar path break case I Classpath Entry CPE CONTAINER I Classpath Container container Java Core get Classpath Container raw Entry get Path java Project if container null break if container get Kind I Classpath Container K APPLICATION include Mask APPLICATION LIBRARIES 0 include Mask SYSTEM LIBRARIES 0 I Path path entry get Path add path true add Enclosing Project Or Jar path break break case I Classpath Entry CPE PROJECT if include Mask REFERENCED PROJECTS 0 add Java Project model get Java Project entry get Path last Segment include Mask visited Projects break case I Classpath Entry CPE SOURCE if include Mask SOURCES 0 add entry get Path true break  JavaProject javaProject includeMask HashSet visitedProjects JavaModelException IProject javaProject getProject isAccessible visitedProjects addEnclosingProjectOrJar getFullPath IClasspathEntry javaProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress IJavaModel javaProject getJavaModel IClasspathEntry getEntryKind IClasspathEntry CPE_LIBRARY IClasspathEntry rawEntry JavaModelManager PerProjectInfo perProjectInfo javaProject getPerProjectInfo perProjectInfo perProjectInfo resolvedPathToRawEntries rawEntry IClasspathEntry perProjectInfo resolvedPathToRawEntries getPath rawEntry rawEntry getEntryKind IClasspathEntry CPE_LIBRARY IClasspathEntry CPE_VARIABLE includeMask APPLICATION_LIBRARIES IPath getPath addEnclosingProjectOrJar IClasspathEntry CPE_CONTAINER IClasspathContainer JavaCore getClasspathContainer rawEntry getPath javaProject getKind IClasspathContainer K_APPLICATION includeMask APPLICATION_LIBRARIES includeMask SYSTEM_LIBRARIES IPath getPath addEnclosingProjectOrJar IClasspathEntry CPE_PROJECT includeMask REFERENCED_PROJECTS JavaProject getJavaProject getPath lastSegment includeMask visitedProjects IClasspathEntry CPE_SOURCE includeMask getPath
public void add I Java Element element throws Java Model Exception I Package Fragment Root root null switch element get Element Type case I Java Element JAVA MODEL a workspace sope should be used break case I Java Element JAVA PROJECT int include Mask SOURCES APPLICATION LIBRARIES SYSTEM LIBRARIES this add Java Project element include Mask new Hash Set 2 break case I Java Element PACKAGE FRAGMENT ROOT root I Package Fragment Root element this add root get Path true break case I Java Element PACKAGE FRAGMENT root I Package Fragment Root element get Parent if root is Archive this add root get Path append new Path element get Element Name replace false else I Resource resource element get Resource if resource null resource is Accessible this add resource get Full Path false break default remember sub cu or sub class file java elements if element instanceof I Member if this elements null this elements new Array List this elements add element this add this full Path element true find package fragment root including this java element I Java Element parent element get Parent while parent null parent instanceof I Package Fragment Root parent parent get Parent if parent instanceof I Package Fragment Root root I Package Fragment Root parent if root null if root get Kind I Package Fragment Root K BINARY this add Enclosing Project Or Jar root get Path else this add Enclosing Project Or Jar root get Java Project get Project get Full Path  IJavaElement JavaModelException IPackageFragmentRoot getElementType IJavaElement JAVA_MODEL IJavaElement JAVA_PROJECT includeMask APPLICATION_LIBRARIES SYSTEM_LIBRARIES JavaProject includeMask HashSet IJavaElement PACKAGE_FRAGMENT_ROOT IPackageFragmentRoot getPath IJavaElement PACKAGE_FRAGMENT IPackageFragmentRoot getParent isArchive getPath getElementName IResource getResource isAccessible getFullPath IMember ArrayList fullPath IJavaElement getParent IPackageFragmentRoot getParent IPackageFragmentRoot IPackageFragmentRoot getKind IPackageFragmentRoot K_BINARY addEnclosingProjectOrJar getPath addEnclosingProjectOrJar getJavaProject getProject getFullPath
Adds the given path to this search scope Remember if subfolders need to be included as well private void add I Path path boolean with Sub Folders if this paths length this paths Count System arraycopy this paths 0 this paths new I Path this paths Count 2 0 this paths Count System arraycopy this path With Sub Folders 0 this path With Sub Folders new boolean this paths Count 2 0 this paths Count this paths this paths Count path this path With Sub Folders this paths Count with Sub Folders  IPath withSubFolders pathsCount IPath pathsCount pathsCount pathWithSubFolders pathWithSubFolders pathsCount pathsCount pathsCount pathWithSubFolders pathsCount withSubFolders
public boolean encloses String resource Path String I Path resource Path int separator Index resource Path String index Of JAR FILE ENTRY SEPARATOR if separator Index 1 resource Path new Path resource Path String substring 0 separator Index append new Path resource Path String substring separator Index 1 else resource Path new Path resource Path String return this encloses resource Path  resourcePathString IPath resourcePath separatorIndex resourcePathString indexOf JAR_FILE_ENTRY_SEPARATOR separatorIndex resourcePath resourcePathString separatorIndex resourcePathString separatorIndex resourcePath resourcePathString resourcePath
Returns whether this search scope encloses the given path private boolean encloses I Path path for int i 0 i this paths Count i if this path With Sub Folders i if this paths i is Prefix Of path return true else if not looking at subfolders this scope encloses the given path if this path is a direct child of the scope s ressource or if this path is the scope s resource see bug 13919 Declaration for package not found if scope is not project I Path scope Path this paths i if scope Path is Prefix Of path scope Path segment Count path segment Count 1 scope Path segment Count path segment Count return true return false  IPath pathsCount pathWithSubFolders isPrefixOf IPath scopePath scopePath isPrefixOf scopePath segmentCount segmentCount scopePath segmentCount segmentCount
public boolean encloses I Java Element element if this elements null for int i 0 length this elements size i length i I Java Element scope Element I Java Element this elements get i I Java Element searched Element element while searched Element null if searched Element equals scope Element return true searched Element searched Element get Parent return false return this encloses this full Path element  IJavaElement IJavaElement scopeElement IJavaElement IJavaElement searchedElement searchedElement searchedElement scopeElement searchedElement searchedElement getParent fullPath
see I Java Search Scope enclosing Projects And Jars public I Path enclosing Projects And Jars return this enclosing Projects And Jars  IJavaSearchScope enclosingProjectsAndJars IPath enclosingProjectsAndJars enclosingProjectsAndJars
private I Path full Path I Java Element element if element instanceof I Package Fragment Root return I Package Fragment Root element get Path I Java Element parent element get Parent I Path parent Path parent null null this full Path parent I Path child Path if element instanceof I Package Fragment child Path new Path element get Element Name replace else if element instanceof I Openable child Path new Path element get Element Name else return parent Path return parent Path null child Path parent Path append child Path  IPath fullPath IJavaElement IPackageFragmentRoot IPackageFragmentRoot getPath IJavaElement getParent IPath parentPath fullPath IPath childPath IPackageFragment childPath getElementName IOpenable childPath getElementName parentPath parentPath childPath parentPath childPath
protected void initialize this paths new I Path 1 this path With Sub Folders new boolean 1 this paths Count 0 this enclosing Projects And Jars new I Path 0  IPath pathWithSubFolders pathsCount enclosingProjectsAndJars IPath
public void process Delta I Java Element Delta delta switch delta get Kind case I Java Element Delta CHANGED I Java Element Delta children delta get Affected Children for int i 0 length children length i length i I Java Element Delta child children i this process Delta child break case I Java Element Delta REMOVED I Java Element element delta get Element if this encloses element if this elements null this elements remove element I Path path null switch element get Element Type case I Java Element JAVA PROJECT path I Java Project element get Project get Full Path case I Java Element PACKAGE FRAGMENT ROOT if path null path I Package Fragment Root element get Path int to Remove 1 for int i 0 i this paths Count i if this paths i equals path to Remove i break if to Remove 1 int last this paths Count 1 if to Remove last this paths to Remove this paths last this path With Sub Folders to Remove this path With Sub Folders last this paths Count break  processDelta IJavaElementDelta getKind IJavaElementDelta IJavaElementDelta getAffectedChildren IJavaElementDelta processDelta IJavaElementDelta IJavaElement getElement IPath getElementType IJavaElement JAVA_PROJECT IJavaProject getProject getFullPath IJavaElement PACKAGE_FRAGMENT_ROOT IPackageFragmentRoot getPath toRemove pathsCount toRemove toRemove pathsCount toRemove toRemove pathWithSubFolders toRemove pathWithSubFolders pathsCount
public String to String String Buffer result new String Buffer Java Search Scope on NON NLS 1 if this elements null result append NON NLS 1 for int i 0 length this elements size i length i Java Element element Java Element this elements get i result append n t NON NLS 1 result append element to String With Ancestors result append n NON NLS 1 else if this paths Count 0 result append empty scope NON NLS 1 else result append NON NLS 1 for int i 0 i this paths Count i I Path path this paths i result append n t NON NLS 1 result append path to String result append n NON NLS 1 return result to String  toString StringBuffer StringBuffer JavaSearchScope JavaElement JavaElement toStringWithAncestors pathsCount pathsCount IPath toString toString

protected boolean needs Initialize public Java Workspace Scope Java Model Manager get Java Model Manager remember Scope this  needsInitialize JavaWorkspaceScope JavaModelManager getJavaModelManager rememberScope
public boolean encloses I Java Element element if this needs Initialize this initialize return super encloses element A workspace scope encloses all java elements this assumes that the index selector and thus enclosing Project And Jars returns indexes on the classpath only and that these indexes are consistent NOTE Returning true gains 20 of a hierarchy build on Object return true  IJavaElement needsInitialize enclosingProjectAndJars
public boolean encloses String resource Path String if this needs Initialize this initialize return super encloses resource Path String A workspace scope encloses all resources this assumes that the index selector and thus enclosing Project And Jars returns indexes on the classpath only and that these indexes are consistent NOTE Returning true gains 20 of a hierarchy build on Object return true  resourcePathString needsInitialize resourcePathString enclosingProjectAndJars
public I Path enclosing Projects And Jars if this needs Initialize this initialize return super enclosing Projects And Jars  IPath enclosingProjectsAndJars needsInitialize enclosingProjectsAndJars
return super enclosing Projects And Jars public boolean equals Object o return o instanceof Java Workspace Scope  enclosingProjectsAndJars JavaWorkspaceScope
return o instanceof Java Workspace Scope public int hash Code return Java Workspace Scope class hash Code  JavaWorkspaceScope hashCode JavaWorkspaceScope hashCode
public void initialize super initialize try I Java Project projects Java Model Manager get Java Model Manager get Java Model get Java Projects for int i 0 length projects length i length i int include Mask SOURCES APPLICATION LIBRARIES SYSTEM LIBRARIES this add Java Project projects i include Mask new Hash Set 2 catch Java Model Exception ignored ignore this needs Initialize false  IJavaProject JavaModelManager getJavaModelManager getJavaModel getJavaProjects includeMask APPLICATION_LIBRARIES SYSTEM_LIBRARIES JavaProject includeMask HashSet JavaModelException needsInitialize
public void process Delta I Java Element Delta delta if this needs Initialize return I Java Element element delta get Element switch element get Element Type case I Java Element JAVA MODEL I Java Element Delta children delta get Affected Children for int i 0 length children length i length i I Java Element Delta child children i this process Delta child break case I Java Element JAVA PROJECT int kind delta get Kind switch kind case I Java Element Delta ADDED case I Java Element Delta REMOVED this needs Initialize true break case I Java Element Delta CHANGED children delta get Affected Children for int i 0 length children length i length i I Java Element Delta child children i this process Delta child break break case I Java Element PACKAGE FRAGMENT ROOT kind delta get Kind switch kind case I Java Element Delta ADDED case I Java Element Delta REMOVED this needs Initialize true break case I Java Element Delta CHANGED int flags delta get Flags if flags I Java Element Delta F ADDED TO CLASSPATH 0 flags I Java Element Delta F REMOVED FROM CLASSPATH 0 this needs Initialize true break break  processDelta IJavaElementDelta needsInitialize IJavaElement getElement getElementType IJavaElement JAVA_MODEL IJavaElementDelta getAffectedChildren IJavaElementDelta processDelta IJavaElement JAVA_PROJECT getKind IJavaElementDelta IJavaElementDelta needsInitialize IJavaElementDelta getAffectedChildren IJavaElementDelta processDelta IJavaElement PACKAGE_FRAGMENT_ROOT getKind IJavaElementDelta IJavaElementDelta needsInitialize IJavaElementDelta getFlags IJavaElementDelta F_ADDED_TO_CLASSPATH IJavaElementDelta F_REMOVED_FROM_CLASSPATH needsInitialize
public String to String return Java Workspace Scope NON NLS 1  toString JavaWorkspaceScope

public abstract class And Pattern extends Java Search Pattern TODO should rename Intersecting Pattern and make And Pattern a true subclass public And Pattern int pattern Kind int match Rule super pattern Kind match Rule  AndPattern JavaSearchPattern IntersectingPattern AndPattern AndPattern patternKind matchRule patternKind matchRule
public void find Index Matches Index index Index Query Requestor requestor Search Participant participant I Java Search Scope scope I Progress Monitor progress Monitor throws IO Exception if progress Monitor null progress Monitor is Canceled throw new Operation Canceled Exception this reset Query Simple Set intersected Names null try index start Query do Search Pattern pattern Internal Search Pattern this current Pattern Entry Result entries Internal Search Pattern pattern query In index if entries null return Search Pattern decoded Result pattern get Blank Pattern Simple Set new Intersected Names new Simple Set 3 for int i 0 l entries length i l i if progress Monitor null progress Monitor is Canceled throw new Operation Canceled Exception Entry Result entry entries i decoded Result decode Index Key entry get Word if pattern matches Decoded Key decoded Result String names entry get Document Names index if intersected Names null for int j 0 n names length j n j if intersected Names includes names j new Intersected Names add names j else for int j 0 n names length j n j new Intersected Names add names j if new Intersected Names element Size 0 return intersected Names new Intersected Names while this has Next Query finally index stop Query if intersected Names null return Object names intersected Names values for int i 0 l names length i l i if names i null Internal Search Pattern this accept Match String names i null requestor participant scope And Patterns cannot provide the decoded result  findIndexMatches IndexQueryRequestor SearchParticipant IJavaSearchScope IProgressMonitor progressMonitor IOException progressMonitor progressMonitor isCanceled OperationCanceledException resetQuery SimpleSet intersectedNames startQuery SearchPattern InternalSearchPattern currentPattern EntryResult InternalSearchPattern queryIn SearchPattern decodedResult getBlankPattern SimpleSet newIntersectedNames SimpleSet progressMonitor progressMonitor isCanceled OperationCanceledException EntryResult decodedResult decodeIndexKey getWord matchesDecodedKey decodedResult getDocumentNames intersectedNames intersectedNames newIntersectedNames newIntersectedNames newIntersectedNames elementSize intersectedNames newIntersectedNames hasNextQuery stopQuery intersectedNames intersectedNames InternalSearchPattern acceptMatch AndPatterns
Internal Search Pattern this accept Match String names i null requestor participant scope And Patterns cannot provide the decoded result Returns whether another query must be done protected abstract boolean has Next Query  InternalSearchPattern acceptMatch AndPatterns hasNextQuery
protected abstract boolean has Next Query Resets the query and prepares this pattern to be queried protected abstract void reset Query  hasNextQuery resetQuery

public static char convert Class File Format char name for int i 0 l name length i l i if name i char new Name char name clone Char Operation replace new Name return new Name return name  convertClassFileFormat newName CharOperation newName newName
boolean check Declaring Type I Binary Type enclosing Binary Type char simple Name char qualification boolean is Case Sensitive if simple Name null qualification null return true if enclosing Binary Type null return true char declaring Type Name convert Class File Format enclosing Binary Type get Name return check Type Name simple Name qualification declaring Type Name is Case Sensitive  checkDeclaringType IBinaryType enclosingBinaryType simpleName isCaseSensitive simpleName enclosingBinaryType declaringTypeName convertClassFileFormat enclosingBinaryType getName checkTypeName simpleName declaringTypeName isCaseSensitive
boolean check Parameters char method Descriptor char parameter Simple Names char parameter Qualifications boolean is Case Sensitive char arguments Signature get Parameter Types method Descriptor int parameter Count parameter Simple Names length if parameter Count arguments length return false for int i 0 i parameter Count i if check Type Name parameter Simple Names i parameter Qualifications i Signature to Char Array arguments i is Case Sensitive return false return true  checkParameters methodDescriptor parameterSimpleNames parameterQualifications isCaseSensitive getParameterTypes methodDescriptor parameterCount parameterSimpleNames parameterCount parameterCount checkTypeName parameterSimpleNames parameterQualifications toCharArray isCaseSensitive
boolean check Type Name char simple Name char qualification char fully Qualified Type Name boolean is Case Sensitive NOTE if case insensitive then simple Name qualification are assumed to be lowercase char wildcard Pattern Pattern Locator qualified Pattern simple Name qualification if wildcard Pattern null return true return Char Operation match wildcard Pattern fully Qualified Type Name is Case Sensitive  checkTypeName simpleName fullyQualifiedTypeName isCaseSensitive simpleName wildcardPattern PatternLocator qualifiedPattern simpleName wildcardPattern CharOperation wildcardPattern fullyQualifiedTypeName isCaseSensitive
Locate declaration in the current class file This class file is always in a jar public void locate Matches Match Locator locator Class File class File I Binary Type info throws Core Exception check class definition Search Pattern pattern locator pattern Binary Type binary Type Binary Type class File get Type if match Binary pattern info null locator report Binary Member Declaration null binary Type info Search Match A ACCURATE int accuracy Search Match A ACCURATE if Internal Search Pattern pattern must Resolve try Binary Type Binding binding locator cache Binary Type binary Type if binding null filter out element not in hierarchy scope if locator type In Hierarchy binding return Method Binding methods binding methods for int i 0 l methods length i l i Method Binding method methods i if locator pattern Locator resolve Level method Pattern Locator ACCURATE MATCH I Method method Handle binary Type get Method new String method is Constructor binding compound Name binding compound Name length 1 method selector Char Operation to Strings Signature get Parameter Types convert Class File Format method signature locator report Binary Member Declaration null method Handle info Search Match A ACCURATE Field Binding fields binding fields for int i 0 l fields length i l i Field Binding field fields i if locator pattern Locator resolve Level field Pattern Locator ACCURATE MATCH I Field field Handle binary Type get Field new String field name locator report Binary Member Declaration null field Handle info Search Match A ACCURATE no need to check binary info since resolve was successful return catch Abort Compilation e if compilation was aborted it is a problem with the class path report as a potential match if binary info matches the pattern accuracy Search Match A INACCURATE I Binary Method methods info get Methods if methods null for int i 0 l methods length i l i I Binary Method method methods i if match Binary pattern method info I Method method Handle binary Type get Method new String method is Constructor info get Name method get Selector Char Operation to Strings Signature get Parameter Types convert Class File Format method get Method Descriptor locator report Binary Member Declaration null method Handle info accuracy I Binary Field fields info get Fields if fields null for int i 0 l fields length i l i I Binary Field field fields i if match Binary pattern field info I Field field Handle binary Type get Field new String field get Name locator report Binary Member Declaration null field Handle info accuracy  locateMatches MatchLocator ClassFile classFile IBinaryType CoreException SearchPattern BinaryType binaryType BinaryType classFile getType matchBinary reportBinaryMemberDeclaration binaryType SearchMatch A_ACCURATE SearchMatch A_ACCURATE InternalSearchPattern mustResolve BinaryTypeBinding cacheBinaryType binaryType typeInHierarchy MethodBinding MethodBinding patternLocator resolveLevel PatternLocator ACCURATE_MATCH IMethod methodHandle binaryType getMethod isConstructor compoundName compoundName CharOperation toStrings getParameterTypes convertClassFileFormat reportBinaryMemberDeclaration methodHandle SearchMatch A_ACCURATE FieldBinding FieldBinding patternLocator resolveLevel PatternLocator ACCURATE_MATCH IField fieldHandle binaryType getField reportBinaryMemberDeclaration fieldHandle SearchMatch A_ACCURATE AbortCompilation SearchMatch A_INACCURATE IBinaryMethod getMethods IBinaryMethod matchBinary IMethod methodHandle binaryType getMethod isConstructor getName getSelector CharOperation toStrings getParameterTypes convertClassFileFormat getMethodDescriptor reportBinaryMemberDeclaration methodHandle IBinaryField getFields IBinaryField matchBinary IField fieldHandle binaryType getField getName reportBinaryMemberDeclaration fieldHandle
Finds out whether the given binary info matches the search pattern Default is to return false boolean match Binary Search Pattern pattern Object binary Info I Binary Type enclosing Binary Type switch Internal Search Pattern pattern kind case CONSTRUCTOR PATTERN return match Constructor Constructor Pattern pattern binary Info enclosing Binary Type case FIELD PATTERN return match Field Field Pattern pattern binary Info enclosing Binary Type case METHOD PATTERN return match Method Method Pattern pattern binary Info enclosing Binary Type case SUPER REF PATTERN return match Super Type Reference Super Type Reference Pattern pattern binary Info enclosing Binary Type case TYPE DECL PATTERN return match Type Declaration Type Declaration Pattern pattern binary Info enclosing Binary Type case OR PATTERN Search Pattern patterns Or Pattern pattern patterns for int i 0 length patterns length i length i if match Binary patterns i binary Info enclosing Binary Type return true return false  matchBinary SearchPattern binaryInfo IBinaryType enclosingBinaryType InternalSearchPattern CONSTRUCTOR_PATTERN matchConstructor ConstructorPattern binaryInfo enclosingBinaryType FIELD_PATTERN matchField FieldPattern binaryInfo enclosingBinaryType METHOD_PATTERN matchMethod MethodPattern binaryInfo enclosingBinaryType SUPER_REF_PATTERN matchSuperTypeReference SuperTypeReferencePattern binaryInfo enclosingBinaryType TYPE_DECL_PATTERN matchTypeDeclaration TypeDeclarationPattern binaryInfo enclosingBinaryType OR_PATTERN SearchPattern OrPattern matchBinary binaryInfo enclosingBinaryType
boolean match Constructor Constructor Pattern pattern Object binary Info I Binary Type enclosing Binary Type if pattern find Declarations return false only relevant when finding declarations if binary Info instanceof I Binary Method return false I Binary Method method I Binary Method binary Info if method is Constructor return false if check Declaring Type enclosing Binary Type pattern declaring Simple Name pattern declaring Qualification pattern is Case Sensitive return false if pattern parameter Simple Names null char method Descriptor convert Class File Format method get Method Descriptor if check Parameters method Descriptor pattern parameter Simple Names pattern parameter Qualifications pattern is Case Sensitive return false return true  matchConstructor ConstructorPattern binaryInfo IBinaryType enclosingBinaryType findDeclarations binaryInfo IBinaryMethod IBinaryMethod IBinaryMethod binaryInfo isConstructor checkDeclaringType enclosingBinaryType declaringSimpleName declaringQualification isCaseSensitive parameterSimpleNames methodDescriptor convertClassFileFormat getMethodDescriptor checkParameters methodDescriptor parameterSimpleNames parameterQualifications isCaseSensitive
boolean match Field Field Pattern pattern Object binary Info I Binary Type enclosing Binary Type if pattern find Declarations return false only relevant when finding declarations if binary Info instanceof I Binary Field return false I Binary Field field I Binary Field binary Info if pattern matches Name pattern name field get Name return false if check Declaring Type enclosing Binary Type pattern declaring Simple Name pattern declaring Qualification pattern is Case Sensitive return false char field Type Signature Signature to Char Array convert Class File Format field get Type Name return check Type Name pattern type Simple Name pattern type Qualification field Type Signature pattern is Case Sensitive  matchField FieldPattern binaryInfo IBinaryType enclosingBinaryType findDeclarations binaryInfo IBinaryField IBinaryField IBinaryField binaryInfo matchesName getName checkDeclaringType enclosingBinaryType declaringSimpleName declaringQualification isCaseSensitive fieldTypeSignature toCharArray convertClassFileFormat getTypeName checkTypeName typeSimpleName typeQualification fieldTypeSignature isCaseSensitive
boolean match Method Method Pattern pattern Object binary Info I Binary Type enclosing Binary Type if pattern find Declarations return false only relevant when finding declarations if binary Info instanceof I Binary Method return false I Binary Method method I Binary Method binary Info if pattern matches Name pattern selector method get Selector return false if check Declaring Type enclosing Binary Type pattern declaring Simple Name pattern declaring Qualification pattern is Case Sensitive return false look at return type only if declaring type is not specified boolean check Return Type pattern declaring Simple Name null pattern return Simple Name null pattern return Qualification null boolean check Parameters pattern parameter Simple Names null if check Return Type check Parameters char method Descriptor convert Class File Format method get Method Descriptor if check Return Type char return Type Signature Signature to Char Array Signature get Return Type method Descriptor if check Type Name pattern return Simple Name pattern return Qualification return Type Signature pattern is Case Sensitive return false if check Parameters check Parameters method Descriptor pattern parameter Simple Names pattern parameter Qualifications pattern is Case Sensitive return false return true  matchMethod MethodPattern binaryInfo IBinaryType enclosingBinaryType findDeclarations binaryInfo IBinaryMethod IBinaryMethod IBinaryMethod binaryInfo matchesName getSelector checkDeclaringType enclosingBinaryType declaringSimpleName declaringQualification isCaseSensitive checkReturnType declaringSimpleName returnSimpleName returnQualification checkParameters parameterSimpleNames checkReturnType checkParameters methodDescriptor convertClassFileFormat getMethodDescriptor checkReturnType returnTypeSignature toCharArray getReturnType methodDescriptor checkTypeName returnSimpleName returnQualification returnTypeSignature isCaseSensitive checkParameters checkParameters methodDescriptor parameterSimpleNames parameterQualifications isCaseSensitive
boolean match Super Type Reference Super Type Reference Pattern pattern Object binary Info I Binary Type enclosing Binary Type if binary Info instanceof I Binary Type return false I Binary Type type I Binary Type binary Info if pattern check Only Superinterfaces char vm Name type get Superclass Name if vm Name null char superclass Name convert Class File Format vm Name if check Type Name pattern super Simple Name pattern super Qualification superclass Name pattern is Case Sensitive return true char super Interfaces type get Interface Names if super Interfaces null for int i 0 max super Interfaces length i max i char super Interface Name convert Class File Format super Interfaces i if check Type Name pattern super Simple Name pattern super Qualification super Interface Name pattern is Case Sensitive return true return false  matchSuperTypeReference SuperTypeReferencePattern binaryInfo IBinaryType enclosingBinaryType binaryInfo IBinaryType IBinaryType IBinaryType binaryInfo checkOnlySuperinterfaces vmName getSuperclassName vmName superclassName convertClassFileFormat vmName checkTypeName superSimpleName superQualification superclassName isCaseSensitive superInterfaces getInterfaceNames superInterfaces superInterfaces superInterfaceName convertClassFileFormat superInterfaces checkTypeName superSimpleName superQualification superInterfaceName isCaseSensitive
boolean match Type Declaration Type Declaration Pattern pattern Object binary Info I Binary Type enclosing Binary Type if binary Info instanceof I Binary Type return false I Binary Type type I Binary Type binary Info char fully Qualified Type Name convert Class File Format type get Name if pattern enclosing Type Names null pattern instanceof Qualified Type Declaration Pattern if check Type Name pattern simple Name pattern pkg fully Qualified Type Name pattern is Case Sensitive return false else char enclosing Type Name Char Operation concat With pattern enclosing Type Names char pattern String pattern pkg null enclosing Type Name Char Operation concat pattern pkg enclosing Type Name if check Type Name pattern simple Name pattern String fully Qualified Type Name pattern is Case Sensitive return false switch pattern class Or Interface case CLASS SUFFIX return type is Interface case INTERFACE SUFFIX return type is Interface case TYPE SUFFIX nothing return true  matchTypeDeclaration TypeDeclarationPattern binaryInfo IBinaryType enclosingBinaryType binaryInfo IBinaryType IBinaryType IBinaryType binaryInfo fullyQualifiedTypeName convertClassFileFormat getName enclosingTypeNames QualifiedTypeDeclarationPattern checkTypeName simpleName fullyQualifiedTypeName isCaseSensitive enclosingTypeName CharOperation concatWith enclosingTypeNames patternString enclosingTypeName CharOperation enclosingTypeName checkTypeName simpleName patternString fullyQualifiedTypeName isCaseSensitive classOrInterface CLASS_SUFFIX isInterface INTERFACE_SUFFIX isInterface TYPE_SUFFIX

Classpath Source Directory I Container source Folder this source Folder source Folder I Path location source Folder get Location this source Location location null location add Trailing Separator to String NON NLS 1 Store default encoding try this encoding this source Folder get Default Charset catch Core Exception ce let use no encoding by default this directory Cache new Simple Lookup Table 5  ClasspathSourceDirectory IContainer sourceFolder sourceFolder sourceFolder IPath sourceFolder getLocation sourceLocation addTrailingSeparator toString sourceFolder getDefaultCharset CoreException directoryCache SimpleLookupTable
public void cleanup this directory Cache null  directoryCache
String directory List String qualified Package Name String dir List String directory Cache get qualified Package Name if dir List missing Package Holder return null package exists in another classpath directory or jar if dir List null return dir List try I Resource container source Folder find Member qualified Package Name this is a case sensitive check if container instanceof I Container I Resource members I Container container members dir List new String members length int index 0 for int i 0 l members length i l i I Resource m members i String name if m get Type I Resource FILE org eclipse jdt internal compiler util Util is Java File Name name m get Name dir List index name if index dir List length System arraycopy dir List 0 dir List new String index 0 index directory Cache put qualified Package Name dir List return dir List catch Core Exception ignored treat as if missing directory Cache put qualified Package Name missing Package Holder return null  directoryList qualifiedPackageName dirList directoryCache qualifiedPackageName dirList missingPackageHolder dirList dirList IResource sourceFolder findMember qualifiedPackageName IContainer IResource IContainer dirList IResource getType IResource isJavaFileName getName dirList dirList dirList dirList directoryCache qualifiedPackageName dirList dirList CoreException directoryCache qualifiedPackageName missingPackageHolder
boolean does File Exist String file Name String qualified Package Name String dir List directory List qualified Package Name if dir List null return false most common case for int i dir List length i 0 if file Name equals dir List i return true return false  doesFileExist fileName qualifiedPackageName dirList directoryList qualifiedPackageName dirList dirList fileName dirList
public boolean equals Object o if this o return true if o instanceof Classpath Source Directory return false return source Folder equals Classpath Source Directory o source Folder  ClasspathSourceDirectory sourceFolder ClasspathSourceDirectory sourceFolder
public Name Environment Answer find Class String source File Name String qualified Package Name String qualified Source File Name if does File Exist source File Name qualified Package Name return null most common case String full Source Path this source Location qualified Source File Name I Path path new Path qualified Source File Name I File file this source Folder get File path String file Encoding this encoding try file Encoding file get Charset catch Core Exception ce let use default encoding return new Name Environment Answer new Compilation Unit null full Source Path file Encoding  NameEnvironmentAnswer findClass sourceFileName qualifiedPackageName qualifiedSourceFileName doesFileExist sourceFileName qualifiedPackageName fullSourcePath sourceLocation qualifiedSourceFileName IPath qualifiedSourceFileName IFile sourceFolder getFile fileEncoding fileEncoding getCharset CoreException NameEnvironmentAnswer CompilationUnit fullSourcePath fileEncoding
public I Path get Project Relative Path return source Folder get Project Relative Path  IPath getProjectRelativePath sourceFolder getProjectRelativePath
public boolean is Package String qualified Package Name return directory List qualified Package Name null  isPackage qualifiedPackageName directoryList qualifiedPackageName
public void reset this directory Cache new Simple Lookup Table 5  directoryCache SimpleLookupTable
public String to String return Source classpath directory source Folder get Full Path to String NON NLS 1  toString sourceFolder getFullPath toString

public Constructor Locator Constructor Pattern pattern super pattern this pattern pattern  ConstructorLocator ConstructorPattern
public int match AST Node node Matching Node Set node Set interested in Explicit Constructor Call if this pattern find References return IMPOSSIBLE MATCH if node instanceof Explicit Constructor Call return IMPOSSIBLE MATCH if this pattern parameter Simple Names null int length this pattern parameter Simple Names length Expression args Explicit Constructor Call node arguments int args Length args null 0 args length if length args Length return IMPOSSIBLE MATCH return node Set add Match node Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH  ASTNode MatchingNodeSet nodeSet ExplicitConstructorCall findReferences IMPOSSIBLE_MATCH ExplicitConstructorCall IMPOSSIBLE_MATCH parameterSimpleNames parameterSimpleNames ExplicitConstructorCall argsLength argsLength IMPOSSIBLE_MATCH nodeSet addMatch InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH
public int match Constructor Declaration node Matching Node Set node Set int references Level this pattern find References match Level For References node IMPOSSIBLE MATCH int declarations Level this pattern find Declarations match Level For Declarations node IMPOSSIBLE MATCH return node Set add Match node references Level declarations Level references Level declarations Level use the stronger match  ConstructorDeclaration MatchingNodeSet nodeSet referencesLevel findReferences matchLevelForReferences IMPOSSIBLE_MATCH declarationsLevel findDeclarations matchLevelForDeclarations IMPOSSIBLE_MATCH nodeSet addMatch referencesLevel declarationsLevel referencesLevel declarationsLevel
public int match Expression node Matching Node Set node Set interested in Allocation Expression if this pattern find References return IMPOSSIBLE MATCH if node instanceof Allocation Expression return IMPOSSIBLE MATCH constructor name is simple type name Allocation Expression allocation Allocation Expression node char type Name allocation type get Type Name if this pattern declaring Simple Name null matches Name this pattern declaring Simple Name type Name type Name length 1 return IMPOSSIBLE MATCH if this pattern parameter Simple Names null int length this pattern parameter Simple Names length Expression args allocation arguments int args Length args null 0 args length if length args Length return IMPOSSIBLE MATCH return node Set add Match node Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH  MatchingNodeSet nodeSet AllocationExpression findReferences IMPOSSIBLE_MATCH AllocationExpression IMPOSSIBLE_MATCH AllocationExpression AllocationExpression typeName getTypeName declaringSimpleName matchesName declaringSimpleName typeName typeName IMPOSSIBLE_MATCH parameterSimpleNames parameterSimpleNames argsLength argsLength IMPOSSIBLE_MATCH nodeSet addMatch InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH
public int match Reference node Matching Node Set node Set SKIP IT public int match Type Declaration node Matching Node Set node Set if this pattern find References return IMPOSSIBLE MATCH need to look for a generated default constructor return node Set add Match node Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH  MatchingNodeSet nodeSet TypeDeclaration MatchingNodeSet nodeSet findReferences IMPOSSIBLE_MATCH nodeSet addMatch InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH
protected int match Container if this pattern find References return ALL CONTAINER handles both declarations references just references COMPILATION UNIT CONTAINER implicit constructor call case of Y extends X and Y doesn t define any constructor CLASS CONTAINER implicit constructor call case of constructor declaration with no explicit super call METHOD CONTAINER reference in another constructor FIELD CONTAINER anonymous in a field initializer declarations are only found in Class return CLASS CONTAINER  matchContainer findReferences ALL_CONTAINER COMPILATION_UNIT_CONTAINER CLASS_CONTAINER METHOD_CONTAINER FIELD_CONTAINER CLASS_CONTAINER
protected int match Level For References Constructor Declaration constructor Explicit Constructor Call constructor Call constructor constructor Call if constructor Call null constructor Call access Mode Explicit Constructor Call Implicit Super return IMPOSSIBLE MATCH if this pattern parameter Simple Names null int length this pattern parameter Simple Names length Expression args constructor Call arguments int args Length args null 0 args length if length args Length return IMPOSSIBLE MATCH return Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH  matchLevelForReferences ConstructorDeclaration ExplicitConstructorCall constructorCall constructorCall constructorCall constructorCall accessMode ExplicitConstructorCall ImplicitSuper IMPOSSIBLE_MATCH parameterSimpleNames parameterSimpleNames constructorCall argsLength argsLength IMPOSSIBLE_MATCH InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH
protected int match Level For Declarations Constructor Declaration constructor constructor name is stored in selector field if this pattern declaring Simple Name null matches Name this pattern declaring Simple Name constructor selector return IMPOSSIBLE MATCH if this pattern parameter Simple Names null int length this pattern parameter Simple Names length Argument args constructor arguments int args Length args null 0 args length if length args Length return IMPOSSIBLE MATCH for int i 0 i length i if matches Type Reference this pattern parameter Simple Names i args i type return IMPOSSIBLE MATCH return Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH  matchLevelForDeclarations ConstructorDeclaration declaringSimpleName matchesName declaringSimpleName IMPOSSIBLE_MATCH parameterSimpleNames parameterSimpleNames argsLength argsLength IMPOSSIBLE_MATCH matchesTypeReference parameterSimpleNames IMPOSSIBLE_MATCH InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH
public int resolve Level AST Node node if this pattern find References if node instanceof Allocation Expression return resolve Level Allocation Expression node if node instanceof Explicit Constructor Call return resolve Level Explicit Constructor Call node binding if node instanceof Type Declaration return resolve Level Type Declaration node if node instanceof Constructor Declaration return resolve Level Constructor Declaration node true return IMPOSSIBLE MATCH  resolveLevel ASTNode findReferences AllocationExpression resolveLevel AllocationExpression ExplicitConstructorCall resolveLevel ExplicitConstructorCall TypeDeclaration resolveLevel TypeDeclaration ConstructorDeclaration resolveLevel ConstructorDeclaration IMPOSSIBLE_MATCH
return IMPOSSIBLE MATCH protected int reference Type return I Java Element METHOD  IMPOSSIBLE_MATCH referenceType IJavaElement
protected int resolve Level Allocation Expression allocation constructor name is simple type name char type Name allocation type get Type Name if this pattern declaring Simple Name null matches Name this pattern declaring Simple Name type Name type Name length 1 return IMPOSSIBLE MATCH return resolve Level allocation binding  resolveLevel AllocationExpression typeName getTypeName declaringSimpleName matchesName declaringSimpleName typeName typeName IMPOSSIBLE_MATCH resolveLevel
public int resolve Level Binding binding if binding null return INACCURATE MATCH if binding instanceof Method Binding return IMPOSSIBLE MATCH Method Binding method Method Binding binding if method is Constructor return IMPOSSIBLE MATCH declaring type simple name has already been matched by match Index Entry int level resolve Level For Type this pattern declaring Simple Name this pattern declaring Qualification method declaring Class if level IMPOSSIBLE MATCH return IMPOSSIBLE MATCH parameter types int parameter Count this pattern parameter Simple Names null 1 this pattern parameter Simple Names length if parameter Count 1 if method parameters null return INACCURATE MATCH if parameter Count method parameters length return IMPOSSIBLE MATCH for int i 0 i parameter Count i int new Level resolve Level For Type this pattern parameter Simple Names i this pattern parameter Qualifications i method parameters i if level new Level if new Level IMPOSSIBLE MATCH return IMPOSSIBLE MATCH level new Level can only be downgraded return level  resolveLevel INACCURATE_MATCH MethodBinding IMPOSSIBLE_MATCH MethodBinding MethodBinding isConstructor IMPOSSIBLE_MATCH matchIndexEntry resolveLevelForType declaringSimpleName declaringQualification declaringClass IMPOSSIBLE_MATCH IMPOSSIBLE_MATCH parameterCount parameterSimpleNames parameterSimpleNames parameterCount INACCURATE_MATCH parameterCount IMPOSSIBLE_MATCH parameterCount newLevel resolveLevelForType parameterSimpleNames parameterQualifications newLevel newLevel IMPOSSIBLE_MATCH IMPOSSIBLE_MATCH newLevel
protected int resolve Level Constructor Declaration constructor boolean check Declarations int references Level IMPOSSIBLE MATCH if this pattern find References Explicit Constructor Call constructor Call constructor constructor Call if constructor Call null constructor Call access Mode Explicit Constructor Call Implicit Super eliminate explicit super call as it will be treated with match Level Explicit Constructor Call boolean references Level resolve Level constructor Call binding if references Level ACCURATE MATCH return ACCURATE MATCH cannot get better if check Declarations return references Level int declarations Level this pattern find Declarations resolve Level constructor binding IMPOSSIBLE MATCH return references Level declarations Level references Level declarations Level answer the stronger match  resolveLevel ConstructorDeclaration checkDeclarations referencesLevel IMPOSSIBLE_MATCH findReferences ExplicitConstructorCall constructorCall constructorCall constructorCall constructorCall accessMode ExplicitConstructorCall ImplicitSuper matchLevel ExplicitConstructorCall referencesLevel resolveLevel constructorCall referencesLevel ACCURATE_MATCH ACCURATE_MATCH checkDeclarations referencesLevel declarationsLevel findDeclarations resolveLevel IMPOSSIBLE_MATCH referencesLevel declarationsLevel referencesLevel declarationsLevel
protected int resolve Level Type Declaration type find default constructor Abstract Method Declaration methods type methods if methods null for int i 0 length methods length i length i Abstract Method Declaration method methods i if method is Default Constructor method source Start type body Start if synthetic return resolve Level Constructor Declaration method false return IMPOSSIBLE MATCH  resolveLevel TypeDeclaration AbstractMethodDeclaration AbstractMethodDeclaration isDefaultConstructor sourceStart bodyStart resolveLevel ConstructorDeclaration IMPOSSIBLE_MATCH
return IMPOSSIBLE MATCH public String to String return Locator for this pattern to String NON NLS 1  IMPOSSIBLE_MATCH toString toString

Constructor entries are encoded as Type Name Arity e g X 0 public static char create Index Key char type Name int arg Count char count Chars arg Count 10 COUNTS arg Count String value Of arg Count to Char Array NON NLS 1 return Char Operation concat type Name count Chars  TypeName createIndexKey typeName argCount countChars argCount argCount valueOf argCount toCharArray CharOperation typeName countChars
public Constructor Pattern boolean find Declarations boolean find References char declaring Simple Name char declaring Qualification char parameter Qualifications char parameter Simple Names int match Rule this match Rule this find Declarations find Declarations this find References find References this declaring Qualification is Case Sensitive declaring Qualification Char Operation to Lower Case declaring Qualification this declaring Simple Name is Case Sensitive declaring Simple Name Char Operation to Lower Case declaring Simple Name if parameter Simple Names null this parameter Count parameter Simple Names length this parameter Qualifications new char this parameter Count this parameter Simple Names new char this parameter Count for int i 0 i this parameter Count i this parameter Qualifications i is Case Sensitive parameter Qualifications i Char Operation to Lower Case parameter Qualifications i this parameter Simple Names i is Case Sensitive parameter Simple Names i Char Operation to Lower Case parameter Simple Names i else this parameter Count 1 Internal Search Pattern this must Resolve must Resolve  ConstructorPattern findDeclarations findReferences declaringSimpleName declaringQualification parameterQualifications parameterSimpleNames matchRule matchRule findDeclarations findDeclarations findReferences findReferences declaringQualification isCaseSensitive declaringQualification CharOperation toLowerCase declaringQualification declaringSimpleName isCaseSensitive declaringSimpleName CharOperation toLowerCase declaringSimpleName parameterSimpleNames parameterCount parameterSimpleNames parameterQualifications parameterCount parameterSimpleNames parameterCount parameterCount parameterQualifications isCaseSensitive parameterQualifications CharOperation toLowerCase parameterQualifications parameterSimpleNames isCaseSensitive parameterSimpleNames CharOperation toLowerCase parameterSimpleNames parameterCount InternalSearchPattern mustResolve mustResolve
Internal Search Pattern this must Resolve must Resolve Constructor Pattern int match Rule super CONSTRUCTOR PATTERN match Rule  InternalSearchPattern mustResolve mustResolve ConstructorPattern matchRule CONSTRUCTOR_PATTERN matchRule
public void decode Index Key char key int size key length int last Separator Index Char Operation last Index Of SEPARATOR key this parameter Count Integer parse Int new String key last Separator Index 1 size last Separator Index 1 this declaring Simple Name Char Operation subarray key 0 last Separator Index  decodeIndexKey lastSeparatorIndex CharOperation lastIndexOf parameterCount parseInt lastSeparatorIndex lastSeparatorIndex declaringSimpleName CharOperation lastSeparatorIndex
this declaring Simple Name Char Operation subarray key 0 last Separator Index public Search Pattern get Blank Pattern return new Constructor Pattern R EXACT MATCH R CASE SENSITIVE  declaringSimpleName CharOperation lastSeparatorIndex SearchPattern getBlankPattern ConstructorPattern R_EXACT_MATCH R_CASE_SENSITIVE
public char get Index Categories if this find References return this find Declarations REF AND DECL CATEGORIES REF CATEGORIES if this find Declarations return DECL CATEGORIES return Char Operation NO CHAR CHAR  getIndexCategories findReferences findDeclarations REF_AND_DECL_CATEGORIES REF_CATEGORIES findDeclarations DECL_CATEGORIES CharOperation NO_CHAR_CHAR
public boolean matches Decoded Key Search Pattern decoded Pattern Constructor Pattern pattern Constructor Pattern decoded Pattern return this parameter Count pattern parameter Count this parameter Count 1 matches Name this declaring Simple Name pattern declaring Simple Name  matchesDecodedKey SearchPattern decodedPattern ConstructorPattern ConstructorPattern decodedPattern parameterCount parameterCount parameterCount matchesName declaringSimpleName declaringSimpleName
protected boolean must Resolve if this declaring Qualification null return true parameter types if this parameter Simple Names null for int i 0 max this parameter Simple Names length i max i if this parameter Qualifications i null return true return this find References need to check resolved default constructors and explicit constructor calls  mustResolve declaringQualification parameterSimpleNames parameterSimpleNames parameterQualifications findReferences
Entry Result query In Index index throws IO Exception char key this declaring Simple Name can be null int match Rule get Match Rule switch get Match Mode case R EXACT MATCH if this declaring Simple Name null this parameter Count 0 key create Index Key this declaring Simple Name this parameter Count else do a prefix query with the declaring Simple Name match Rule match Rule R EXACT MATCH R PREFIX MATCH break case R PREFIX MATCH do a prefix query with the declaring Simple Name break case R PATTERN MATCH if this parameter Count 0 key create Index Key this declaring Simple Name null ONE STAR this declaring Simple Name this parameter Count else if this declaring Simple Name null this declaring Simple Name this declaring Simple Name length 1 key Char Operation concat this declaring Simple Name ONE STAR SEPARATOR else do a pattern query with just the declaring Simple Name break return index query get Index Categories key match Rule match rule is irrelevant when the key is null  EntryResult queryIn IOException declaringSimpleName matchRule getMatchRule getMatchMode R_EXACT_MATCH declaringSimpleName parameterCount createIndexKey declaringSimpleName parameterCount declaringSimpleName matchRule matchRule R_EXACT_MATCH R_PREFIX_MATCH R_PREFIX_MATCH declaringSimpleName R_PATTERN_MATCH parameterCount createIndexKey declaringSimpleName ONE_STAR declaringSimpleName parameterCount declaringSimpleName declaringSimpleName declaringSimpleName CharOperation declaringSimpleName ONE_STAR declaringSimpleName getIndexCategories matchRule
public String to String String Buffer buffer new String Buffer 20 if this find Declarations buffer append this find References Constructor Combined Pattern NON NLS 1 Constructor Declaration Pattern NON NLS 1 else buffer append Constructor Reference Pattern NON NLS 1 if declaring Qualification null buffer append declaring Qualification append if declaring Simple Name null buffer append declaring Simple Name else if declaring Qualification null buffer append NON NLS 1 buffer append if parameter Simple Names null buffer append NON NLS 1 else for int i 0 max parameter Simple Names length i max i if i 0 buffer append NON NLS 1 if parameter Qualifications i null buffer append parameter Qualifications i append if parameter Simple Names i null buffer append else buffer append parameter Simple Names i buffer append buffer append NON NLS 1 switch get Match Mode case R EXACT MATCH buffer append exact match NON NLS 1 break case R PREFIX MATCH buffer append prefix match NON NLS 1 break case R PATTERN MATCH buffer append pattern match NON NLS 1 break buffer append is Case Sensitive case sensitive case insensitive NON NLS 1 NON NLS 2 return buffer to String  toString StringBuffer StringBuffer findDeclarations findReferences ConstructorCombinedPattern ConstructorDeclarationPattern ConstructorReferencePattern declaringQualification declaringQualification declaringSimpleName declaringSimpleName declaringQualification parameterSimpleNames parameterSimpleNames parameterQualifications parameterQualifications parameterSimpleNames parameterSimpleNames getMatchMode R_EXACT_MATCH R_PREFIX_MATCH R_PATTERN_MATCH isCaseSensitive toString

public Declaration Of Accessed Fields Pattern I Java Element enclosing Element super false true true null null null null null R PATTERN MATCH this enclosing Element enclosing Element this known Fields new Simple Set Internal Search Pattern this must Resolve true  DeclarationOfAccessedFieldsPattern IJavaElement enclosingElement R_PATTERN_MATCH enclosingElement enclosingElement knownFields SimpleSet InternalSearchPattern mustResolve

public Declaration Of Referenced Methods Pattern I Java Element enclosing Element super false true null null null null null null null null R PATTERN MATCH this enclosing Element enclosing Element this known Methods new Simple Set Internal Search Pattern this must Resolve true  DeclarationOfReferencedMethodsPattern IJavaElement enclosingElement R_PATTERN_MATCH enclosingElement enclosingElement knownMethods SimpleSet InternalSearchPattern mustResolve

public Declaration Of Referenced Types Pattern I Java Element enclosing Element super null null R PATTERN MATCH this enclosing Element enclosing Element this known Types new Simple Set Internal Search Pattern this must Resolve true  DeclarationOfReferencedTypesPattern IJavaElement enclosingElement R_PATTERN_MATCH enclosingElement enclosingElement knownTypes SimpleSet InternalSearchPattern mustResolve

public Field Locator Field Pattern pattern super pattern this is Declaration Of Accessed Fields Pattern this pattern instanceof Declaration Of Accessed Fields Pattern  FieldLocator FieldPattern isDeclarationOfAccessedFieldsPattern DeclarationOfAccessedFieldsPattern
public int match Constructor Declaration node Matching Node Set node Set SKIP IT public int match Field Declaration node Matching Node Set node Set int references Level IMPOSSIBLE MATCH if this pattern find References must be a write only access with an initializer if this pattern write Access this pattern read Access node initialization null if matches Name this pattern name node name references Level Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH int declarations Level IMPOSSIBLE MATCH if this pattern find Declarations if node is Field ignore field initializers if matches Name this pattern name node name if matches Type Reference Field Pattern this pattern type Simple Name node type declarations Level Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH return node Set add Match node references Level declarations Level references Level declarations Level use the stronger match  ConstructorDeclaration MatchingNodeSet nodeSet FieldDeclaration MatchingNodeSet nodeSet referencesLevel IMPOSSIBLE_MATCH findReferences writeAccess readAccess matchesName referencesLevel InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH declarationsLevel IMPOSSIBLE_MATCH findDeclarations isField matchesName matchesTypeReference FieldPattern typeSimpleName declarationsLevel InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH nodeSet addMatch referencesLevel declarationsLevel referencesLevel declarationsLevel
protected int match Container if this pattern find References need to look almost everywhere to find in javadocs return CLASS CONTAINER METHOD CONTAINER FIELD CONTAINER return CLASS CONTAINER  matchContainer findReferences CLASS_CONTAINER METHOD_CONTAINER FIELD_CONTAINER CLASS_CONTAINER
protected int match Field Field Binding field boolean match Name if field null return INACCURATE MATCH if match Name matches Name this pattern name field readable Name return IMPOSSIBLE MATCH Field Pattern field Pattern Field Pattern this pattern Reference Binding receiver Binding field declaring Class if receiver Binding null if field Array Binding Array Length optimized case for length field of an array return field Pattern declaring Qualification null field Pattern declaring Simple Name null ACCURATE MATCH IMPOSSIBLE MATCH return INACCURATE MATCH Note there is no dynamic lookup for field access int declaring Level resolve Level For Type field Pattern declaring Simple Name field Pattern declaring Qualification receiver Binding if declaring Level IMPOSSIBLE MATCH return IMPOSSIBLE MATCH look at field type only if declaring type is not specified if field Pattern declaring Simple Name null return declaring Level int type Level resolve Level For Type field Pattern type Simple Name field Pattern type Qualification field type return declaring Level type Level type Level declaring Level return the weaker match  matchField FieldBinding matchName INACCURATE_MATCH matchName matchesName readableName IMPOSSIBLE_MATCH FieldPattern fieldPattern FieldPattern ReferenceBinding receiverBinding declaringClass receiverBinding ArrayBinding ArrayLength fieldPattern declaringQualification fieldPattern declaringSimpleName ACCURATE_MATCH IMPOSSIBLE_MATCH INACCURATE_MATCH declaringLevel resolveLevelForType fieldPattern declaringSimpleName fieldPattern declaringQualification receiverBinding declaringLevel IMPOSSIBLE_MATCH IMPOSSIBLE_MATCH fieldPattern declaringSimpleName declaringLevel typeLevel resolveLevelForType fieldPattern typeSimpleName fieldPattern typeQualification declaringLevel typeLevel typeLevel declaringLevel
protected int match Reference Reference node Matching Node Set node Set boolean write Only Access if node instanceof Field Reference if matches Name this pattern name Field Reference node token return node Set add Match node Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH return IMPOSSIBLE MATCH return super match Reference node node Set write Only Access  matchReference MatchingNodeSet nodeSet writeOnlyAccess FieldReference matchesName FieldReference nodeSet addMatch InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH IMPOSSIBLE_MATCH matchReference nodeSet writeOnlyAccess
protected void match Report Reference AST Node reference I Java Element element int accuracy Match Locator locator throws Core Exception if this is Declaration Of Accessed Fields Pattern need exact match to be able to open on type ref if accuracy Search Match A ACCURATE return element that references the field must be included in the enclosing element Declaration Of Accessed Fields Pattern decl Pattern Declaration Of Accessed Fields Pattern this pattern while element null decl Pattern enclosing Element equals element element element get Parent if element null if reference instanceof Field Reference report Declaration Field Reference reference binding locator decl Pattern known Fields else if reference instanceof Qualified Name Reference Qualified Name Reference q Name Ref Qualified Name Reference reference Binding binding q Name Ref binding if binding instanceof Field Binding report Declaration Field Binding binding locator decl Pattern known Fields int other Max q Name Ref other Bindings null 0 q Name Ref other Bindings length for int i 0 i other Max i report Declaration q Name Ref other Bindings i locator decl Pattern known Fields else if reference instanceof Single Name Reference report Declaration Field Binding Single Name Reference reference binding locator decl Pattern known Fields else if reference instanceof Field Reference Field Reference field Reference Field Reference reference long position field Reference name Source Position int start int position 32 int end int position Search Match match locator new Field Reference Match element accuracy start end start 1 field Reference locator report match else if reference instanceof Single Name Reference int offset reference source Start Search Match match locator new Field Reference Match element accuracy offset reference source End offset 1 reference locator report match else if reference instanceof Qualified Name Reference Qualified Name Reference q Name Ref Qualified Name Reference reference int length q Name Ref tokens length int accuracies new int length Binding binding q Name Ref binding int index Of First Field Binding q Name Ref index Of First Field Binding 0 q Name Ref index Of First Field Binding 1 0 for int i 0 i index Of First Field Binding i accuracies i 1 first token if matches Name this pattern name q Name Ref tokens index Of First Field Binding binding instanceof Local Variable Binding Field Binding field Binding binding instanceof Field Binding Field Binding binding null if field Binding null accuracies index Of First Field Binding accuracy else switch match Field field Binding false case ACCURATE MATCH accuracies index Of First Field Binding Search Match A ACCURATE break case INACCURATE MATCH accuracies index Of First Field Binding Search Match A INACCURATE break default accuracies index Of First Field Binding 1 else accuracies index Of First Field Binding 1 other tokens for int i index Of First Field Binding 1 i length i char token q Name Ref tokens i if matches Name this pattern name token Field Binding other Binding q Name Ref other Bindings null null q Name Ref other Bindings i index Of First Field Binding 1 if other Binding null accuracies i accuracy else switch match Field other Binding false case ACCURATE MATCH accuracies i Search Match A ACCURATE break case INACCURATE MATCH accuracies i Search Match A INACCURATE break default accuracies i 1 else accuracies i 1 locator report Accurate Field Reference q Name Ref element accuracies  matchReportReference ASTNode IJavaElement MatchLocator CoreException isDeclarationOfAccessedFieldsPattern SearchMatch A_ACCURATE DeclarationOfAccessedFieldsPattern declPattern DeclarationOfAccessedFieldsPattern declPattern enclosingElement getParent FieldReference reportDeclaration FieldReference declPattern knownFields QualifiedNameReference QualifiedNameReference qNameRef QualifiedNameReference qNameRef FieldBinding reportDeclaration FieldBinding declPattern knownFields otherMax qNameRef otherBindings qNameRef otherBindings otherMax reportDeclaration qNameRef otherBindings declPattern knownFields SingleNameReference reportDeclaration FieldBinding SingleNameReference declPattern knownFields FieldReference FieldReference fieldReference FieldReference fieldReference nameSourcePosition SearchMatch newFieldReferenceMatch fieldReference SingleNameReference sourceStart SearchMatch newFieldReferenceMatch sourceEnd QualifiedNameReference QualifiedNameReference qNameRef QualifiedNameReference qNameRef qNameRef indexOfFirstFieldBinding qNameRef indexOfFirstFieldBinding qNameRef indexOfFirstFieldBinding indexOfFirstFieldBinding matchesName qNameRef indexOfFirstFieldBinding LocalVariableBinding FieldBinding fieldBinding FieldBinding FieldBinding fieldBinding indexOfFirstFieldBinding matchField fieldBinding ACCURATE_MATCH indexOfFirstFieldBinding SearchMatch A_ACCURATE INACCURATE_MATCH indexOfFirstFieldBinding SearchMatch A_INACCURATE indexOfFirstFieldBinding indexOfFirstFieldBinding indexOfFirstFieldBinding qNameRef matchesName FieldBinding otherBinding qNameRef otherBindings qNameRef otherBindings indexOfFirstFieldBinding otherBinding matchField otherBinding ACCURATE_MATCH SearchMatch A_ACCURATE INACCURATE_MATCH SearchMatch A_INACCURATE reportAccurateFieldReference qNameRef
protected void report Declaration Field Binding field Binding Match Locator locator Simple Set known Fields throws Core Exception ignore length field if field Binding Array Binding Array Length return Reference Binding declaring Class field Binding declaring Class I Type type locator lookup Type declaring Class if type null return case of a secondary type char binding Name field Binding name I Field field type get Field new String binding Name if known Fields includes field return known Fields add field I Resource resource type get Resource boolean is Binary type is Binary I Binary Type info null if is Binary if resource null resource type get Java Project get Project info locator get Binary Info org eclipse jdt internal core Class File type get Class File resource locator report Binary Member Declaration resource field info Search Match A ACCURATE else Class Scope scope Source Type Binding declaring Class scope if scope null Type Declaration type Decl scope reference Context Field Declaration field Decl null Field Declaration field Decls type Decl fields for int i 0 length field Decls length i length i if Char Operation equals binding Name field Decls i name field Decl field Decls i break if field Decl null int offset field Decl source Start Search Match match new Field Declaration Match field Search Match A ACCURATE offset field Decl source End offset 1 locator get Participant resource locator report match  reportDeclaration FieldBinding fieldBinding MatchLocator SimpleSet knownFields CoreException fieldBinding ArrayBinding ArrayLength ReferenceBinding declaringClass fieldBinding declaringClass IType lookupType declaringClass bindingName fieldBinding IField getField bindingName knownFields knownFields IResource getResource isBinary isBinary IBinaryType isBinary getJavaProject getProject getBinaryInfo ClassFile getClassFile reportBinaryMemberDeclaration SearchMatch A_ACCURATE ClassScope SourceTypeBinding declaringClass TypeDeclaration typeDecl referenceContext FieldDeclaration fieldDecl FieldDeclaration fieldDecls typeDecl fieldDecls CharOperation bindingName fieldDecls fieldDecl fieldDecls fieldDecl fieldDecl sourceStart SearchMatch FieldDeclarationMatch SearchMatch A_ACCURATE fieldDecl sourceEnd getParticipant
protected int reference Type return I Java Element FIELD  referenceType IJavaElement
public int resolve Level AST Node possiblel Matching Node if this pattern find References if possiblel Matching Node instanceof Field Reference return match Field Field Reference possiblel Matching Node binding true else if possiblel Matching Node instanceof Name Reference return resolve Level Name Reference possiblel Matching Node if possiblel Matching Node instanceof Field Declaration return match Field Field Declaration possiblel Matching Node binding true return IMPOSSIBLE MATCH  resolveLevel ASTNode possiblelMatchingNode findReferences possiblelMatchingNode FieldReference matchField FieldReference possiblelMatchingNode possiblelMatchingNode NameReference resolveLevel NameReference possiblelMatchingNode possiblelMatchingNode FieldDeclaration matchField FieldDeclaration possiblelMatchingNode IMPOSSIBLE_MATCH
public int resolve Level Binding binding if binding null return INACCURATE MATCH if binding instanceof Field Binding return IMPOSSIBLE MATCH return match Field Field Binding binding true  resolveLevel INACCURATE_MATCH FieldBinding IMPOSSIBLE_MATCH matchField FieldBinding
protected int resolve Level Name Reference name Ref if name Ref instanceof Single Name Reference return resolve Level name Ref binding Binding binding name Ref binding Qualified Name Reference q Name Ref Qualified Name Reference name Ref Field Binding field Binding null if binding instanceof Field Binding field Binding Field Binding binding char binding Name field Binding name int last Dot Char Operation last Index Of binding Name if last Dot 1 binding Name Char Operation subarray binding Name last Dot 1 binding Name length if matches Name this pattern name binding Name int level match Field field Binding false if level IMPOSSIBLE MATCH return level int other Max q Name Ref other Bindings null 0 q Name Ref other Bindings length for int i 0 i other Max i char token q Name Ref tokens i q Name Ref index Of First Field Binding if matches Name this pattern name token Field Binding other Binding q Name Ref other Bindings i int level match Field other Binding false if level IMPOSSIBLE MATCH return level return IMPOSSIBLE MATCH  resolveLevel NameReference nameRef nameRef SingleNameReference resolveLevel nameRef nameRef QualifiedNameReference qNameRef QualifiedNameReference nameRef FieldBinding fieldBinding FieldBinding fieldBinding FieldBinding bindingName fieldBinding lastDot CharOperation lastIndexOf bindingName lastDot bindingName CharOperation bindingName lastDot bindingName matchesName bindingName matchField fieldBinding IMPOSSIBLE_MATCH otherMax qNameRef otherBindings qNameRef otherBindings otherMax qNameRef qNameRef indexOfFirstFieldBinding matchesName FieldBinding otherBinding qNameRef otherBindings matchField otherBinding IMPOSSIBLE_MATCH IMPOSSIBLE_MATCH

protected static char DECL CATEGORIES FIELD DECL public static char create Index Key char field Name return field Name  DECL_CATEGORIES FIELD_DECL createIndexKey fieldName fieldName
public Field Pattern boolean find Declarations boolean read Access boolean write Access char name char declaring Qualification char declaring Simple Name char type Qualification char type Simple Name int match Rule super FIELD PATTERN find Declarations read Access write Access name match Rule this declaring Qualification is Case Sensitive declaring Qualification Char Operation to Lower Case declaring Qualification this declaring Simple Name is Case Sensitive declaring Simple Name Char Operation to Lower Case declaring Simple Name this type Qualification is Case Sensitive type Qualification Char Operation to Lower Case type Qualification this type Simple Name is Case Sensitive type Simple Name Char Operation to Lower Case type Simple Name Internal Search Pattern this must Resolve must Resolve  FieldPattern findDeclarations readAccess writeAccess declaringQualification declaringSimpleName typeQualification typeSimpleName matchRule FIELD_PATTERN findDeclarations readAccess writeAccess matchRule declaringQualification isCaseSensitive declaringQualification CharOperation toLowerCase declaringQualification declaringSimpleName isCaseSensitive declaringSimpleName CharOperation toLowerCase declaringSimpleName typeQualification isCaseSensitive typeQualification CharOperation toLowerCase typeQualification typeSimpleName isCaseSensitive typeSimpleName CharOperation toLowerCase typeSimpleName InternalSearchPattern mustResolve mustResolve
Internal Search Pattern this must Resolve must Resolve public void decode Index Key char key this name key  InternalSearchPattern mustResolve mustResolve decodeIndexKey
this name key public Search Pattern get Blank Pattern return new Field Pattern false false false null null null null null R EXACT MATCH R CASE SENSITIVE  SearchPattern getBlankPattern FieldPattern R_EXACT_MATCH R_CASE_SENSITIVE
return new Field Pattern false false false null null null null null R EXACT MATCH R CASE SENSITIVE public char get Index Key return this name  FieldPattern R_EXACT_MATCH R_CASE_SENSITIVE getIndexKey
public char get Index Categories if this find References return this find Declarations this write Access REF AND DECL CATEGORIES REF CATEGORIES if this find Declarations return DECL CATEGORIES return Char Operation NO CHAR CHAR  getIndexCategories findReferences findDeclarations writeAccess REF_AND_DECL_CATEGORIES REF_CATEGORIES findDeclarations DECL_CATEGORIES CharOperation NO_CHAR_CHAR
return Char Operation NO CHAR CHAR public boolean matches Decoded Key Search Pattern decoded Pattern return true index key is not encoded so query results all match  CharOperation NO_CHAR_CHAR matchesDecodedKey SearchPattern decodedPattern
protected boolean must Resolve if this declaring Simple Name null this declaring Qualification null return true if this type Simple Name null this type Qualification null return true return super must Resolve  mustResolve declaringSimpleName declaringQualification typeSimpleName typeQualification mustResolve
public String to String String Buffer buffer new String Buffer 20 if this find Declarations buffer append this find References Field Combined Pattern NON NLS 1 Field Declaration Pattern NON NLS 1 else buffer append Field Reference Pattern NON NLS 1 if declaring Qualification null buffer append declaring Qualification append if declaring Simple Name null buffer append declaring Simple Name append else if declaring Qualification null buffer append NON NLS 1 if name null buffer append NON NLS 1 else buffer append name if type Qualification null buffer append append type Qualification append NON NLS 1 else if type Simple Name null buffer append NON NLS 1 if type Simple Name null buffer append type Simple Name else if type Qualification null buffer append NON NLS 1 buffer append NON NLS 1 switch get Match Mode case R EXACT MATCH buffer append exact match NON NLS 1 break case R PREFIX MATCH buffer append prefix match NON NLS 1 break case R PATTERN MATCH buffer append pattern match NON NLS 1 break buffer append is Case Sensitive case sensitive case insensitive NON NLS 1 NON NLS 2 return buffer to String  toString StringBuffer StringBuffer findDeclarations findReferences FieldCombinedPattern FieldDeclarationPattern FieldReferencePattern declaringQualification declaringQualification declaringSimpleName declaringSimpleName declaringQualification typeQualification typeQualification typeSimpleName typeSimpleName typeSimpleName typeQualification getMatchMode R_EXACT_MATCH R_PREFIX_MATCH R_PATTERN_MATCH isCaseSensitive toString

void accept Match String document Name Search Pattern pattern Index Query Requestor requestor Search Participant participant I Java Search Scope scope String document Path Index convert Path document Name if scope encloses document Path if requestor accept Index Match document Path pattern participant throw new Operation Canceled Exception  acceptMatch documentName SearchPattern IndexQueryRequestor SearchParticipant IJavaSearchScope documentPath convertPath documentName documentPath acceptIndexMatch documentPath OperationCanceledException
throw new Operation Canceled Exception Search Pattern current Pattern return Search Pattern this  OperationCanceledException SearchPattern currentPattern SearchPattern
Query a given index for matching entries Assumes the sender has opened the index and will close when finished void find Index Matches Index index Index Query Requestor requestor Search Participant participant I Java Search Scope scope I Progress Monitor monitor throws IO Exception if monitor null monitor is Canceled throw new Operation Canceled Exception try index start Query Search Pattern pattern current Pattern Entry Result entries Internal Search Pattern pattern query In index if entries null return Search Pattern decoded Result pattern get Blank Pattern for int i 0 l entries length i l i if monitor null monitor is Canceled throw new Operation Canceled Exception Entry Result entry entries i decoded Result decode Index Key entry get Word if pattern matches Decoded Key decoded Result String names entry get Document Names index for int j 0 n names length j n j accept Match names j decoded Result requestor participant scope finally index stop Query  findIndexMatches IndexQueryRequestor SearchParticipant IJavaSearchScope IProgressMonitor IOException isCanceled OperationCanceledException startQuery SearchPattern currentPattern EntryResult InternalSearchPattern queryIn SearchPattern decodedResult getBlankPattern isCanceled OperationCanceledException EntryResult decodedResult decodeIndexKey getWord matchesDecodedKey decodedResult getDocumentNames acceptMatch decodedResult stopQuery
boolean is Polymorphic Search return false  isPolymorphicSearch
return false Entry Result query In Index index throws IO Exception Search Pattern pattern Search Pattern this return index query pattern get Index Categories pattern get Index Key pattern get Match Rule  EntryResult queryIn IOException SearchPattern SearchPattern getIndexCategories getIndexKey getMatchRule

public Java Search Name Environment I Java Project java Project org eclipse jdt core I Compilation Unit copies compute Classpath Locations java Project get Project get Workspace get Root Java Project java Project try int length copies null 0 copies length this working Copies new Hash Map length for int i 0 i length i org eclipse jdt core I Compilation Unit working Copy copies i I Package Declaration pkgs working Copy get Package Declarations String pkg pkgs length 0 pkgs 0 get Element Name NON NLS 1 String cu Name working Copy get Element Name String main Type Name cu Name substring 0 cu Name length SUFFIX JAVA length String qualified Main Type Name pkg length 0 main Type Name pkg replace main Type Name this working Copies put qualified Main Type Name working Copy catch Java Model Exception e working copy doesn t exist cannot happen  JavaSearchNameEnvironment IJavaProject javaProject ICompilationUnit computeClasspathLocations javaProject getProject getWorkspace getRoot JavaProject javaProject workingCopies HashMap ICompilationUnit workingCopy IPackageDeclaration workingCopy getPackageDeclarations getElementName cuName workingCopy getElementName mainTypeName cuName cuName SUFFIX_JAVA qualifiedMainTypeName mainTypeName mainTypeName workingCopies qualifiedMainTypeName workingCopy JavaModelException
public void cleanup for int i 0 length this locations length i length i this locations i cleanup 
private void compute Classpath Locations I Workspace Root workspace Root Java Project java Project I Package Fragment Root roots null try roots java Project get All Package Fragment Roots catch Java Model Exception e project doesn t exist this locations new Classpath Location 0 return int length roots length Classpath Location cp Locations new Classpath Location length int index 0 Java Model Manager manager Java Model Manager get Java Model Manager for int i 0 i length i I Package Fragment Root root roots i I Path path root get Path try if root is Archive Zip File zip File manager get Zip File path cp Locations index new Classpath Jar zip File else Object target Java Model get Target workspace Root path false if root get Kind I Package Fragment Root K SOURCE cp Locations index new Classpath Source Directory I Container target else cp Locations index Classpath Location for Binary Folder I Container target false catch Core Exception e1 problem opening zip file or getting root kind consider root corrupt and ignore just resize cp Locations System arraycopy cp Locations 0 cp Locations new Classpath Location cp Locations length 1 0 index this locations cp Locations  computeClasspathLocations IWorkspaceRoot workspaceRoot JavaProject javaProject IPackageFragmentRoot javaProject getAllPackageFragmentRoots JavaModelException ClasspathLocation ClasspathLocation cpLocations ClasspathLocation JavaModelManager JavaModelManager getJavaModelManager IPackageFragmentRoot IPath getPath isArchive ZipFile zipFile getZipFile cpLocations ClasspathJar zipFile JavaModel getTarget workspaceRoot getKind IPackageFragmentRoot K_SOURCE cpLocations ClasspathSourceDirectory IContainer cpLocations ClasspathLocation forBinaryFolder IContainer CoreException cpLocations cpLocations cpLocations ClasspathLocation cpLocations cpLocations
private Name Environment Answer find Class String qualified Type Name char type Name String binary File Name null q Binary File Name null source File Name null q Source File Name null q Package Name null for int i 0 length this locations length i length i Classpath Location location this locations i Name Environment Answer answer if location instanceof Classpath Source Directory if source File Name null q Source File Name qualified Type Name SUFFIX STRING java source File Name q Source File Name q Package Name NON NLS 1 if qualified Type Name length type Name length int type Name Start q Source File Name length type Name length 5 size of java q Package Name q Source File Name substring 0 type Name Start 1 source File Name q Source File Name substring type Name Start I Compilation Unit working Copy I Compilation Unit this working Copies get qualified Type Name if working Copy null answer new Name Environment Answer working Copy else answer location find Class source File Name q Package Name q Source File Name else if binary File Name null q Binary File Name qualified Type Name SUFFIX STRING class binary File Name q Binary File Name q Package Name NON NLS 1 if qualified Type Name length type Name length int type Name Start q Binary File Name length type Name length 6 size of class q Package Name q Binary File Name substring 0 type Name Start 1 binary File Name q Binary File Name substring type Name Start answer location find Class binary File Name q Package Name q Binary File Name if answer null return answer return null  NameEnvironmentAnswer findClass qualifiedTypeName typeName binaryFileName qBinaryFileName sourceFileName qSourceFileName qPackageName ClasspathLocation NameEnvironmentAnswer ClasspathSourceDirectory sourceFileName qSourceFileName qualifiedTypeName SUFFIX_STRING_java sourceFileName qSourceFileName qPackageName qualifiedTypeName typeName typeNameStart qSourceFileName typeName qPackageName qSourceFileName typeNameStart sourceFileName qSourceFileName typeNameStart ICompilationUnit workingCopy ICompilationUnit workingCopies qualifiedTypeName workingCopy NameEnvironmentAnswer workingCopy findClass sourceFileName qPackageName qSourceFileName binaryFileName qBinaryFileName qualifiedTypeName SUFFIX_STRING_class binaryFileName qBinaryFileName qPackageName qualifiedTypeName typeName typeNameStart qBinaryFileName typeName qPackageName qBinaryFileName typeNameStart binaryFileName qBinaryFileName typeNameStart findClass binaryFileName qPackageName qBinaryFileName
public Name Environment Answer find Type char type Name char package Name if type Name null return find Class new String Char Operation concat With package Name type Name type Name return null  NameEnvironmentAnswer findType typeName packageName typeName findClass CharOperation concatWith packageName typeName typeName
public Name Environment Answer find Type char compound Name if compound Name null return find Class new String Char Operation concat With compound Name compound Name compound Name length 1 return null  NameEnvironmentAnswer findType compoundName compoundName findClass CharOperation concatWith compoundName compoundName compoundName
public boolean is Package char compound Name char package Name return is Package new String Char Operation concat With compound Name package Name  isPackage compoundName packageName isPackage CharOperation concatWith compoundName packageName
public boolean is Package String qualified Package Name for int i 0 length this locations length i length i if this locations i is Package qualified Package Name return true return false  isPackage qualifiedPackageName isPackage qualifiedPackageName

protected Java Search Pattern int pattern Kind int match Rule super match Rule Internal Search Pattern this kind pattern Kind this is Case Sensitive match Rule R CASE SENSITIVE 0 this match Mode match Rule this is Case Sensitive R CASE SENSITIVE 0  JavaSearchPattern patternKind matchRule matchRule InternalSearchPattern patternKind isCaseSensitive matchRule R_CASE_SENSITIVE matchMode matchRule isCaseSensitive R_CASE_SENSITIVE
public Search Pattern get Blank Pattern return null  SearchPattern getBlankPattern
int get Match Mode return this match Mode  getMatchMode matchMode
boolean is Case Sensitive return this is Case Sensitive  isCaseSensitive isCaseSensitive
public boolean matches Name char pattern char name if pattern null return true null is as if it was if name null switch this match Mode case R EXACT MATCH return Char Operation equals pattern name this is Case Sensitive case R PREFIX MATCH return Char Operation prefix Equals pattern name this is Case Sensitive case R PATTERN MATCH if this is Case Sensitive pattern Char Operation to Lower Case pattern return Char Operation match pattern name this is Case Sensitive case R REGEXP MATCH TODO jerome implement regular expression match return true return false  matchesName matchMode R_EXACT_MATCH CharOperation isCaseSensitive R_PREFIX_MATCH CharOperation prefixEquals isCaseSensitive R_PATTERN_MATCH isCaseSensitive CharOperation toLowerCase CharOperation isCaseSensitive R_REGEXP_MATCH

public class Local Variable Locator extends Variable Locator public Local Variable Locator Local Variable Pattern pattern super pattern  LocalVariableLocator VariableLocator LocalVariableLocator LocalVariablePattern
public int match Local Declaration node Matching Node Set node Set int references Level IMPOSSIBLE MATCH if this pattern find References must be a write only access with an initializer if this pattern write Access this pattern read Access node initialization null if matches Name this pattern name node name references Level Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH int declarations Level IMPOSSIBLE MATCH if this pattern find Declarations if matches Name this pattern name node name if node declaration Source Start get Local Variable declaration Source Start declarations Level Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH return node Set add Match node references Level declarations Level references Level declarations Level use the stronger match  LocalDeclaration MatchingNodeSet nodeSet referencesLevel IMPOSSIBLE_MATCH findReferences writeAccess readAccess matchesName referencesLevel InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH declarationsLevel IMPOSSIBLE_MATCH findDeclarations matchesName declarationSourceStart getLocalVariable declarationSourceStart declarationsLevel InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH nodeSet addMatch referencesLevel declarationsLevel referencesLevel declarationsLevel
return node Set add Match node references Level declarations Level references Level declarations Level use the stronger match private Local Variable get Local Variable return Local Variable Pattern this pattern local Variable  nodeSet addMatch referencesLevel declarationsLevel referencesLevel declarationsLevel LocalVariable getLocalVariable LocalVariablePattern localVariable
protected void match Report Reference AST Node reference I Java Element element int accuracy Match Locator locator throws Core Exception if reference instanceof Single Name Reference int offset reference source Start Search Match match locator new Local Variable Reference Match element accuracy offset reference source End offset 1 reference locator report match else if reference instanceof Qualified Name Reference Qualified Name Reference q Name Ref Qualified Name Reference reference long source Position q Name Ref source Positions 0 int start int source Position 32 int end int source Position Search Match match locator new Local Variable Reference Match element accuracy start end start 1 reference locator report match else if reference instanceof Local Declaration Local Variable local Variable get Local Variable int offset local Variable name Start Search Match match locator new Local Variable Reference Match local Variable accuracy offset local Variable name End offset 1 reference locator report match  matchReportReference ASTNode IJavaElement MatchLocator CoreException SingleNameReference sourceStart SearchMatch newLocalVariableReferenceMatch sourceEnd QualifiedNameReference QualifiedNameReference qNameRef QualifiedNameReference sourcePosition qNameRef sourcePositions sourcePosition sourcePosition SearchMatch newLocalVariableReferenceMatch LocalDeclaration LocalVariable localVariable getLocalVariable localVariable nameStart SearchMatch newLocalVariableReferenceMatch localVariable localVariable nameEnd
protected int match Container return METHOD CONTAINER  matchContainer METHOD_CONTAINER
protected int match Local Variable Local Variable Binding variable boolean match Name if variable null return INACCURATE MATCH if match Name matches Name this pattern name variable readable Name return IMPOSSIBLE MATCH return variable declaration declaration Source Start get Local Variable declaration Source Start ACCURATE MATCH IMPOSSIBLE MATCH  matchLocalVariable LocalVariableBinding matchName INACCURATE_MATCH matchName matchesName readableName IMPOSSIBLE_MATCH declarationSourceStart getLocalVariable declarationSourceStart ACCURATE_MATCH IMPOSSIBLE_MATCH
IMPOSSIBLE MATCH protected int reference Type return I Java Element LOCAL VARIABLE  IMPOSSIBLE_MATCH referenceType IJavaElement LOCAL_VARIABLE
public int resolve Level AST Node possiblel Matching Node if this pattern find References if possiblel Matching Node instanceof Name Reference return resolve Level Name Reference possiblel Matching Node if possiblel Matching Node instanceof Local Declaration return match Local Variable Local Declaration possiblel Matching Node binding true return IMPOSSIBLE MATCH  resolveLevel ASTNode possiblelMatchingNode findReferences possiblelMatchingNode NameReference resolveLevel NameReference possiblelMatchingNode possiblelMatchingNode LocalDeclaration matchLocalVariable LocalDeclaration possiblelMatchingNode IMPOSSIBLE_MATCH
public int resolve Level Binding binding if binding null return INACCURATE MATCH if binding instanceof Local Variable Binding return IMPOSSIBLE MATCH return match Local Variable Local Variable Binding binding true  resolveLevel INACCURATE_MATCH LocalVariableBinding IMPOSSIBLE_MATCH matchLocalVariable LocalVariableBinding
return match Local Variable Local Variable Binding binding true protected int resolve Level Name Reference name Ref return resolve Level name Ref binding  matchLocalVariable LocalVariableBinding resolveLevel NameReference nameRef resolveLevel nameRef

Local Variable local Variable public Local Variable Pattern boolean find Declarations boolean read Access boolean write Access Local Variable local Variable int match Rule super LOCAL VAR PATTERN find Declarations read Access write Access local Variable get Element Name to Char Array match Rule this local Variable local Variable  LocalVariable localVariable LocalVariablePattern findDeclarations readAccess writeAccess LocalVariable localVariable matchRule LOCAL_VAR_PATTERN findDeclarations readAccess writeAccess localVariable getElementName toCharArray matchRule localVariable localVariable
public void find Index Matches Index index Index Query Requestor requestor Search Participant participant I Java Search Scope scope I Progress Monitor progress Monitor I Package Fragment Root root I Package Fragment Root this local Variable get Ancestor I Java Element PACKAGE FRAGMENT ROOT String path if root is Archive I Type type I Type this local Variable get Ancestor I Java Element TYPE String file Path type get Fully Qualified Name replace Suffix Constants SUFFIX STRING class path root get Path I Java Search Scope JAR FILE ENTRY SEPARATOR file Path else path this local Variable get Path to String if scope encloses path if requestor accept Index Match path this participant throw new Operation Canceled Exception  findIndexMatches IndexQueryRequestor SearchParticipant IJavaSearchScope IProgressMonitor progressMonitor IPackageFragmentRoot IPackageFragmentRoot localVariable getAncestor IJavaElement PACKAGE_FRAGMENT_ROOT isArchive IType IType localVariable getAncestor IJavaElement filePath getFullyQualifiedName SuffixConstants SUFFIX_STRING_class getPath IJavaSearchScope JAR_FILE_ENTRY_SEPARATOR filePath localVariable getPath toString acceptIndexMatch OperationCanceledException
public String to String String Buffer buffer new String Buffer 20 if this find Declarations buffer append this find References Local Var Combined Pattern NON NLS 1 Local Var Declaration Pattern NON NLS 1 else buffer append Local Var Reference Pattern NON NLS 1 buffer append this local Variable to String With Ancestors buffer append NON NLS 1 switch get Match Mode case R EXACT MATCH buffer append exact match NON NLS 1 break case R PREFIX MATCH buffer append prefix match NON NLS 1 break case R PATTERN MATCH buffer append pattern match NON NLS 1 break buffer append is Case Sensitive case sensitive case insensitive NON NLS 1 NON NLS 2 return buffer to String  toString StringBuffer StringBuffer findDeclarations findReferences LocalVarCombinedPattern LocalVarDeclarationPattern LocalVarReferencePattern localVariable toStringWithAncestors getMatchMode R_EXACT_MATCH R_PREFIX_MATCH R_PATTERN_MATCH isCaseSensitive toString

public int add Match AST Node node int match Level switch match Level case Pattern Locator INACCURATE MATCH add Trusted Match node false break case Pattern Locator POSSIBLE MATCH add Possible Match node break case Pattern Locator ACCURATE MATCH add Trusted Match node true return match Level  addMatch ASTNode matchLevel matchLevel PatternLocator INACCURATE_MATCH addTrustedMatch PatternLocator POSSIBLE_MATCH addPossibleMatch PatternLocator ACCURATE_MATCH addTrustedMatch matchLevel
public void add Possible Match AST Node node remove existing node at same position from set case of recovery that created the same node several time see http bugs eclipse org bugs show bug cgi id 29366 long key long node source Start 32 node source End AST Node existing AST Node this possible Matching Nodes Keys get key if existing null existing get Class equals node get Class this possible Matching Nodes Set remove existing add node to set this possible Matching Nodes Set add node this possible Matching Nodes Keys put key node  addPossibleMatch ASTNode show_bug sourceStart sourceEnd ASTNode ASTNode possibleMatchingNodesKeys getClass getClass possibleMatchingNodesSet possibleMatchingNodesSet possibleMatchingNodesKeys
public void add Trusted Match AST Node node boolean is Exact remove existing node at same position from set case of recovery that created the same node several time see http bugs eclipse org bugs show bug cgi id 29366 long key long node source Start 32 node source End AST Node existing AST Node this matching Nodes Keys get key if existing null existing get Class equals node get Class this matching Nodes remove Key existing map node to its accuracy level this matching Nodes put node is Exact EXACT MATCH POTENTIAL MATCH this matching Nodes Keys put key node  addTrustedMatch ASTNode isExact show_bug sourceStart sourceEnd ASTNode ASTNode matchingNodesKeys getClass getClass matchingNodes removeKey matchingNodes isExact EXACT_MATCH POTENTIAL_MATCH matchingNodesKeys
protected boolean has Possible Nodes int start int end Object nodes this possible Matching Nodes Set values for int i 0 l nodes length i l i AST Node node AST Node nodes i if node null start node source Start node source End end return true nodes this matching Nodes key Table for int i 0 l nodes length i l i AST Node node AST Node nodes i if node null start node source Start node source End end return true return false  hasPossibleNodes possibleMatchingNodesSet ASTNode ASTNode sourceStart sourceEnd matchingNodes keyTable ASTNode ASTNode sourceStart sourceEnd
Returns the matching nodes that are in the given range in the source order protected AST Node matching Nodes int start int end Array List nodes null Object key Table this matching Nodes key Table for int i 0 l key Table length i l i AST Node node AST Node key Table i if node null start node source Start node source End end if nodes null nodes new Array List nodes add node if nodes null return null AST Node result new AST Node nodes size nodes to Array result sort nodes by source starts Util Comparer comparer new Util Comparer public int compare Object o1 Object o2 return AST Node o1 source Start AST Node o2 source Start Util sort result comparer return result  ASTNode matchingNodes ArrayList keyTable matchingNodes keyTable keyTable ASTNode ASTNode keyTable sourceStart sourceEnd ArrayList ASTNode ASTNode toArray ASTNode sourceStart ASTNode sourceStart
public Object remove Possible Match AST Node node long key long node source Start 32 node source End AST Node existing AST Node this possible Matching Nodes Keys get key if existing null return null this possible Matching Nodes Keys put key null return this possible Matching Nodes Set remove node  removePossibleMatch ASTNode sourceStart sourceEnd ASTNode ASTNode possibleMatchingNodesKeys possibleMatchingNodesKeys possibleMatchingNodesSet
public Object remove Trusted Match AST Node node long key long node source Start 32 node source End AST Node existing AST Node this matching Nodes Keys get key if existing null return null this matching Nodes Keys put key null return this matching Nodes remove Key node  removeTrustedMatch ASTNode sourceStart sourceEnd ASTNode ASTNode matchingNodesKeys matchingNodesKeys matchingNodes removeKey
public String to String TODO jerome should show both tables String Buffer result new String Buffer result append Exact matches NON NLS 1 Object key Table this matching Nodes key Table Object value Table this matching Nodes value Table for int i 0 l key Table length i l i AST Node node AST Node key Table i if node null continue result append n t NON NLS 1 result append value Table i EXACT MATCH ACCURATE MATCH NON NLS 1 INACCURATE MATCH NON NLS 1 node print 0 result result append n Possible matches NON NLS 1 Object nodes this possible Matching Nodes Set values for int i 0 l nodes length i l i AST Node node AST Node nodes i if node null continue result append nPOSSIBLE MATCH NON NLS 1 node print 0 result return result to String  toString StringBuffer StringBuffer keyTable matchingNodes keyTable valueTable matchingNodes valueTable keyTable ASTNode ASTNode keyTable valueTable EXACT_MATCH ACCURATE_MATCH INACCURATE_MATCH nPossible possibleMatchingNodesSet ASTNode ASTNode nPOSSIBLE_MATCH toString

Matching Node Set node Set Hashtable Of Int Values occurrences Counts new Hashtable Of Int Values key class name char value occurrence Count int public Local Declaration Visitor I Java Element enclosing Element Matching Node Set node Set this enclosing Element enclosing Element this node Set node Set  MatchingNodeSet nodeSet HashtableOfIntValues occurrencesCounts HashtableOfIntValues occurrenceCount LocalDeclarationVisitor IJavaElement enclosingElement MatchingNodeSet nodeSet enclosingElement enclosingElement nodeSet nodeSet
public boolean visit Type Declaration type Declaration Block Scope unused try char simple Name if type Declaration bits AST Node Is Anonymous TypeMASK 0 simple Name Char Operation NO CHAR else simple Name type Declaration name int occurrence Count occurrences Counts get simple Name if occurrence Count Hashtable Of Int Values NO VALUE occurrence Count 1 else occurrence Count occurrence Count 1 occurrences Counts put simple Name occurrence Count if type Declaration bits AST Node Is Anonymous TypeMASK 0 report Matching type Declaration enclosing Element 1 node Set occurrence Count else Integer level Integer node Set matching Nodes remove Key type Declaration report Matching type Declaration enclosing Element level null level int Value 1 node Set occurrence Count return false don t visit members as this was done during report Matching catch Core Exception e throw new Wrapped Core Exception e  TypeDeclaration typeDeclaration BlockScope simpleName typeDeclaration ASTNode IsAnonymousTypeMASK simpleName CharOperation NO_CHAR simpleName typeDeclaration occurrenceCount occurrencesCounts simpleName occurrenceCount HashtableOfIntValues NO_VALUE occurrenceCount occurrenceCount occurrenceCount occurrencesCounts simpleName occurrenceCount typeDeclaration ASTNode IsAnonymousTypeMASK reportMatching typeDeclaration enclosingElement nodeSet occurrenceCount nodeSet matchingNodes removeKey typeDeclaration reportMatching typeDeclaration enclosingElement intValue nodeSet occurrenceCount reportMatching CoreException WrappedCoreException
public org eclipse jdt core I Compilation Unit working Copy Working Copy Document org eclipse jdt core I Compilation Unit working Copy Search Participant participant super working Copy get Path to String participant this char Contents Compilation Unit working Copy get Contents this working Copy working Copy  ICompilationUnit workingCopy WorkingCopyDocument ICompilationUnit workingCopy SearchParticipant workingCopy getPath toString charContents CompilationUnit workingCopy getContents workingCopy workingCopy
this working Copy working Copy public String to String return Working Copy Document for get Path NON NLS 1  workingCopy workingCopy toString WorkingCopyDocument getPath
public class Wrapped Core Exception extends Runtime Exception public Core Exception core Exception public Wrapped Core Exception Core Exception core Exception this core Exception core Exception  WrappedCoreException RuntimeException CoreException coreException WrappedCoreException CoreException coreException coreException coreException
public static Search Document add Working Copies Internal Search Pattern pattern Search Document index Matches org eclipse jdt core I Compilation Unit copies Search Participant participant working copies take precedence over corresponding compilation units Hash Map working Copy Documents working Copies That Can See Focus copies pattern focus pattern is Polymorphic Search participant Search Document matches null int length index Matches length for int i 0 i length i Search Document search Document index Matches i if search Document get Participant participant Search Document working Copy Document Search Document working Copy Documents remove search Document get Path if working Copy Document null if matches null System arraycopy index Matches 0 matches new Search Document length 0 length matches i working Copy Document if matches null no working copy matches index Matches int remaining Working Copies Size working Copy Documents size if remaining Working Copies Size 0 System arraycopy matches 0 matches new Search Document length remaining Working Copies Size 0 length Iterator iterator working Copy Documents values iterator int index length while iterator has Next matches index Search Document iterator next return matches  SearchDocument addWorkingCopies InternalSearchPattern SearchDocument indexMatches ICompilationUnit SearchParticipant HashMap workingCopyDocuments workingCopiesThatCanSeeFocus isPolymorphicSearch SearchDocument indexMatches SearchDocument searchDocument indexMatches searchDocument getParticipant SearchDocument workingCopyDocument SearchDocument workingCopyDocuments searchDocument getPath workingCopyDocument indexMatches SearchDocument workingCopyDocument indexMatches remainingWorkingCopiesSize workingCopyDocuments remainingWorkingCopiesSize SearchDocument remainingWorkingCopiesSize workingCopyDocuments hasNext SearchDocument
public static void set Focus Internal Search Pattern pattern I Java Element focus pattern focus focus  setFocus InternalSearchPattern IJavaElement
private static Hash Map working Copies That Can See Focus org eclipse jdt core I Compilation Unit copies I Java Element focus boolean is Polymorphic Search Search Participant participant if copies null return new Hash Map if focus null while focus instanceof I Java Project focus instanceof Jar Package Fragment Root focus focus get Parent Hash Map result new Hash Map for int i 0 length copies length i length i org eclipse jdt core I Compilation Unit working Copy copies i I Path project Or Jar Match Locator get Project Or Jar working Copy get Path if focus null Index Selector can See Focus focus is Polymorphic Search project Or Jar result put working Copy get Path to String new Working Copy Document working Copy participant return result  HashMap workingCopiesThatCanSeeFocus ICompilationUnit IJavaElement isPolymorphicSearch SearchParticipant HashMap IJavaProject JarPackageFragmentRoot getParent HashMap HashMap ICompilationUnit workingCopy IPath projectOrJar MatchLocator getProjectOrJar workingCopy getPath IndexSelector canSeeFocus isPolymorphicSearch projectOrJar workingCopy getPath toString WorkingCopyDocument workingCopy
public static Class File Reader class File Reader I Type type I Class File class File type get Class File Java Model Manager manager Java Model Manager get Java Model Manager if class File is Open return Class File Reader manager get Info type I Package Fragment pkg type get Package Fragment I Package Fragment Root root I Package Fragment Root pkg get Parent try if root is Archive return Class File Reader read type get Path toOS String I Path zip Path root is External root get Path root get Resource get Location if zip Path null return null location is null Zip File zip File null try if Java Model Manager ZIP ACCESS VERBOSE System out println Thread current Thread Match Locator class File Reader Creating Zip File on zip Path NON NLS 1 NON NLS 2 zip File manager get Zip File zip Path char pkg Path pkg get Element Name to Char Array Char Operation replace pkg Path char class File Name class File get Element Name to Char Array char path pkg Path length 0 class File Name Char Operation concat pkg Path class File Name return Class File Reader read zip File new String path finally manager close Zip File zip File catch Class Format Exception e invalid class file return null catch Core Exception e cannot read class file return null catch IO Exception e cannot read class file return null return null  ClassFileReader classFileReader IType IClassFile classFile getClassFile JavaModelManager JavaModelManager getJavaModelManager classFile isOpen ClassFileReader getInfo IPackageFragment getPackageFragment IPackageFragmentRoot IPackageFragmentRoot getParent isArchive ClassFileReader getPath toOSString IPath zipPath isExternal getPath getResource getLocation zipPath ZipFile zipFile JavaModelManager ZIP_ACCESS_VERBOSE currentThread MatchLocator classFileReader ZipFile zipPath zipFile getZipFile zipPath pkgPath getElementName toCharArray CharOperation pkgPath classFileName classFile getElementName toCharArray pkgPath classFileName CharOperation pkgPath classFileName ClassFileReader zipFile closeZipFile zipFile ClassFormatException CoreException IOException
return new And Pattern 0 no kind 0 no rule Search Pattern current left Pattern public Search Pattern current Pattern return current  AndPattern SearchPattern leftPattern SearchPattern currentPattern
protected boolean has Next Query if current left Pattern current right Pattern return true return false  hasNextQuery leftPattern rightPattern
return false protected void reset Query current left Pattern  resetQuery leftPattern
public static Search Pattern create And Pattern final Search Pattern left Pattern final Search Pattern right Pattern return new And Pattern 0 no kind 0 no rule Search Pattern current left Pattern public Search Pattern current Pattern return current protected boolean has Next Query if current left Pattern current right Pattern return true return false protected void reset Query current left Pattern  SearchPattern createAndPattern SearchPattern leftPattern SearchPattern rightPattern AndPattern SearchPattern leftPattern SearchPattern currentPattern hasNextQuery leftPattern rightPattern resetQuery leftPattern
Query a given index for matching entries Assumes the sender has opened the index and will close when finished public static void find Index Matches Internal Search Pattern pattern Index index Index Query Requestor requestor Search Participant participant I Java Search Scope scope I Progress Monitor monitor throws IO Exception pattern find Index Matches index requestor participant scope monitor  findIndexMatches InternalSearchPattern IndexQueryRequestor SearchParticipant IJavaSearchScope IProgressMonitor IOException findIndexMatches
public static I Java Element get Project Or Jar I Java Element element while element instanceof I Java Project element instanceof Jar Package Fragment Root element element get Parent return element  IJavaElement getProjectOrJar IJavaElement IJavaProject JarPackageFragmentRoot getParent
public static boolean is Polymorphic Search Internal Search Pattern pattern return pattern is Polymorphic Search  isPolymorphicSearch InternalSearchPattern isPolymorphicSearch
public static I Java Element project Or Jar Focus Internal Search Pattern pattern return pattern null pattern focus null null get Project Or Jar pattern focus  IJavaElement projectOrJarFocus InternalSearchPattern getProjectOrJar
public Match Locator Search Pattern pattern Search Requestor requestor I Java Search Scope scope I Progress Monitor progress Monitor this pattern pattern this pattern Locator Pattern Locator pattern Locator this pattern this match Container this pattern Locator match Container this requestor requestor this scope scope this progress Monitor progress Monitor  MatchLocator SearchPattern SearchRequestor IJavaSearchScope IProgressMonitor progressMonitor patternLocator PatternLocator patternLocator matchContainer patternLocator matchContainer progressMonitor progressMonitor
Add an additional binary type public void accept I Binary Type binary Type Package Binding package Binding this lookup Environment create Binary Type From binary Type package Binding  IBinaryType binaryType PackageBinding packageBinding lookupEnvironment createBinaryTypeFrom binaryType packageBinding
Add an additional compilation unit into the loop build compilation unit declarations their bindings and record their results public void accept I Compilation Unit source Unit Switch the current policy and compilation result for this unit to the requested one Compilation Result unit Result new Compilation Result source Unit 1 1 this options max Problems Per Unit try Compilation Unit Declaration parsed Unit basic Parser diet Parse source Unit unit Result lookup Environment build Type Bindings parsed Unit lookup Environment complete Type Bindings parsed Unit true catch Abort Compilation Unit e at this point current Compilation Unit Result may not be source Unit but some other one requested further along to resolve source Unit if unit Result compilation Unit source Unit only report once requestor accept Result unit Result tag As Accepted else throw e want to abort enclosing request to compile  ICompilationUnit sourceUnit CompilationResult unitResult CompilationResult sourceUnit maxProblemsPerUnit CompilationUnitDeclaration parsedUnit basicParser dietParse sourceUnit unitResult lookupEnvironment buildTypeBindings parsedUnit lookupEnvironment completeTypeBindings parsedUnit AbortCompilationUnit currentCompilationUnitResult sourceUnit sourceUnit unitResult compilationUnit sourceUnit acceptResult unitResult tagAsAccepted
Add additional source types public void accept I Source Type source Types Package Binding package Binding case of Searchable Environment of an I Java Project is used I Source Type source Type source Types 0 while source Type get Enclosing Type null source Type source Type get Enclosing Type if source Type instanceof Source Type Element Info get source Source Type Element Info element Info Source Type Element Info source Type I Type type element Info get Handle I Compilation Unit source Unit I Compilation Unit type get Compilation Unit accept source Unit else Compilation Result result new Compilation Result source Type get File Name 1 1 0 Compilation Unit Declaration unit Source Type Converter build Compilation Unit source Types Source Type Converter FIELD AND METHOD need field and methods Source Type Converter MEMBER TYPE need member types no need for field initialization lookup Environment problem Reporter result this lookup Environment build Type Bindings unit this lookup Environment complete Type Bindings unit true  ISourceType sourceTypes PackageBinding packageBinding SearchableEnvironment IJavaProject ISourceType sourceType sourceTypes sourceType getEnclosingType sourceType sourceType getEnclosingType sourceType SourceTypeElementInfo SourceTypeElementInfo elementInfo SourceTypeElementInfo sourceType IType elementInfo getHandle ICompilationUnit sourceUnit ICompilationUnit getCompilationUnit sourceUnit CompilationResult CompilationResult sourceType getFileName CompilationUnitDeclaration SourceTypeConverter buildCompilationUnit sourceTypes SourceTypeConverter FIELD_AND_METHOD SourceTypeConverter MEMBER_TYPE lookupEnvironment problemReporter lookupEnvironment buildTypeBindings lookupEnvironment completeTypeBindings
protected Parser basic Parser if this basic Parser null Problem Reporter problem Reporter new Problem Reporter Default Error Handling Policies proceed With All Problems this options new Default Problem Factory this basic Parser new Parser problem Reporter false this basic Parser report Only One Syntax Error true return this basic Parser  basicParser basicParser ProblemReporter problemReporter ProblemReporter DefaultErrorHandlingPolicies proceedWithAllProblems DefaultProblemFactory basicParser problemReporter basicParser reportOnlyOneSyntaxError basicParser
Add the possible Match to the loop build compilation unit declarations their bindings and record their results protected void parse And Build Bindings Possible Match possible Match boolean must Resolve if this progress Monitor null this progress Monitor is Canceled throw new Operation Canceled Exception try if Search Engine VERBOSE System out println Parsing possible Match openable to String With Ancestors NON NLS 1 this parser node Set possible Match node Set Compilation Result unit Result new Compilation Result possible Match 1 1 this options max Problems Per Unit Compilation Unit Declaration parsed Unit this parser diet Parse possible Match unit Result if parsed Unit null if must Resolve parsed Unit is Empty this lookup Environment build Type Bindings parsed Unit add the possible Match with its parsed Unit to matches To Process possible Match parsed Unit parsed Unit int size this matches To Process length if this number Of Matches size System arraycopy this matches To Process 0 this matches To Process new Possible Match size 0 1 size 2 0 this number Of Matches this matches To Process this number Of Matches possible Match finally this parser node Set null  possibleMatch parseAndBuildBindings PossibleMatch possibleMatch mustResolve progressMonitor progressMonitor isCanceled OperationCanceledException SearchEngine possibleMatch toStringWithAncestors nodeSet possibleMatch nodeSet CompilationResult unitResult CompilationResult possibleMatch maxProblemsPerUnit CompilationUnitDeclaration parsedUnit dietParse possibleMatch unitResult parsedUnit mustResolve parsedUnit isEmpty lookupEnvironment buildTypeBindings parsedUnit possibleMatch parsedUnit matchesToProcess possibleMatch parsedUnit parsedUnit matchesToProcess numberOfMatches matchesToProcess matchesToProcess PossibleMatch numberOfMatches matchesToProcess numberOfMatches possibleMatch nodeSet
protected Binary Type Binding cache Binary Type I Type type throws Java Model Exception I Type enclosing Type type get Declaring Type if enclosing Type null cache Binary Type enclosing Type cache enclosing types first so that binary type can be found in lookup enviroment I Binary Type binary Type I Binary Type Binary Type type get Element Info Binary Type Binding binding this lookup Environment cache Binary Type binary Type if binding null it was already cached as a result of a previous query char compound Name Char Operation split On type get Fully Qualified Name to Char Array Reference Binding reference Binding this lookup Environment get Cached Type compound Name if reference Binding null reference Binding instanceof Binary Type Binding binding Binary Type Binding reference Binding if the binding could be found and if it comes from a binary type return binding  BinaryTypeBinding cacheBinaryType IType JavaModelException IType enclosingType getDeclaringType enclosingType cacheBinaryType enclosingType IBinaryType binaryType IBinaryType BinaryType getElementInfo BinaryTypeBinding lookupEnvironment cacheBinaryType binaryType compoundName CharOperation splitOn getFullyQualifiedName toCharArray ReferenceBinding referenceBinding lookupEnvironment getCachedType compoundName referenceBinding referenceBinding BinaryTypeBinding BinaryTypeBinding referenceBinding
protected char compute Super Type Names I Type focus Type String fully Qualified Name focus Type get Fully Qualified Name int last Dot fully Qualified Name last Index Of char qualification last Dot 1 Char Operation NO CHAR fully Qualified Name substring 0 last Dot to Char Array char simple Name focus Type get Element Name to Char Array Super Type Names Collector super Type Names Collector new Super Type Names Collector this pattern simple Name qualification new Match Locator this pattern this requestor this scope this progress Monitor clone Match Locator so that it has no side effect focus Type this progress Monitor try this all Super Type Names super Type Names Collector collect catch Java Model Exception e problem collecting super type names leave it null return this all Super Type Names  computeSuperTypeNames IType focusType fullyQualifiedName focusType getFullyQualifiedName lastDot fullyQualifiedName lastIndexOf lastDot CharOperation NO_CHAR fullyQualifiedName lastDot toCharArray simpleName focusType getElementName toCharArray SuperTypeNamesCollector superTypeNamesCollector SuperTypeNamesCollector simpleName MatchLocator progressMonitor MatchLocator focusType progressMonitor allSuperTypeNames superTypeNamesCollector JavaModelException allSuperTypeNames
Creates an I Method from the given method declaration and type protected I Java Element create Handle Abstract Method Declaration method I Java Element parent if parent instanceof I Type return parent I Type type I Type parent Argument arguments method arguments int arg Count arguments null 0 arguments length if type is Binary don t cache the methods of the binary type fall thru if its a constructor with a synthetic argument find it the slower way Class File Reader reader class File Reader type if reader null I Binary Method methods reader get Methods if methods null boolean first Is Synthetic false if reader is Member method is Constructor Flags is Static reader get Modifiers see https bugs eclipse org bugs show bug cgi id 48261 first Is Synthetic true arg Count next Method for int i 0 methods Length methods length i methods Length i I Binary Method binary Method methods i char selector binary Method is Constructor type get Element Name to Char Array binary Method get Selector if Char Operation equals selector method selector char parameter Types Signature get Parameter Types binary Method get Method Descriptor if arg Count parameter Types length continue next Method for int j 0 j arg Count j char type Name if j 0 first Is Synthetic type Name type get Declaring Type get Fully Qualified Name to Char Array else Type Reference type Ref arguments first Is Synthetic j 1 j type type Name Char Operation concat With type Ref get Type Name for int k 0 dim type Ref dimensions k dim k type Name Char Operation concat type Name new char char parameter Type Name Class File Match Locator convert Class File Format parameter Types j if Char Operation ends With Signature to Char Array parameter Type Name type Name continue next Method parameter Types j parameter Type Name return type get Method new String selector Char Operation to Strings parameter Types return null String parameter Type Signatures new String arg Count for int i 0 i arg Count i Type Reference type Ref arguments i type char type Name Char Operation concat With type Ref get Type Name for int j 0 dim type Ref dimensions j dim j type Name Char Operation concat type Name new char parameter Type Signatures i Signature create Type Signature type Name false return type get Method new String method selector parameter Type Signatures  IMethod IJavaElement createHandle AbstractMethodDeclaration IJavaElement IType IType IType argCount isBinary ClassFileReader classFileReader IBinaryMethod getMethods firstIsSynthetic isMember isConstructor isStatic getModifiers show_bug firstIsSynthetic argCount nextMethod methodsLength methodsLength IBinaryMethod binaryMethod binaryMethod isConstructor getElementName toCharArray binaryMethod getSelector CharOperation parameterTypes getParameterTypes binaryMethod getMethodDescriptor argCount parameterTypes nextMethod argCount typeName firstIsSynthetic typeName getDeclaringType getFullyQualifiedName toCharArray TypeReference typeRef firstIsSynthetic typeName CharOperation concatWith typeRef getTypeName typeRef typeName CharOperation typeName parameterTypeName ClassFileMatchLocator convertClassFileFormat parameterTypes CharOperation endsWith toCharArray parameterTypeName typeName nextMethod parameterTypes parameterTypeName getMethod CharOperation toStrings parameterTypes parameterTypeSignatures argCount argCount TypeReference typeRef typeName CharOperation concatWith typeRef getTypeName typeRef typeName CharOperation typeName parameterTypeSignatures createTypeSignature typeName getMethod parameterTypeSignatures
Creates an I Field from the given field declaration and type protected I Java Element create Handle Field Declaration field Declaration Type Declaration type Declaration I Java Element parent if parent instanceof I Type return parent if field Declaration is Field return I Type parent get Field new String field Declaration name find occurence count of the given initializer in its type declaration int occurrence Count 0 Field Declaration fields type Declaration fields for int i 0 length fields length i length i if fields i is Field occurrence Count if fields i equals field Declaration break return I Type parent get Initializer occurrence Count  IField IJavaElement createHandle FieldDeclaration fieldDeclaration TypeDeclaration typeDeclaration IJavaElement IType fieldDeclaration isField IType getField fieldDeclaration occurrenceCount FieldDeclaration typeDeclaration isField occurrenceCount fieldDeclaration IType getInitializer occurrenceCount
protected boolean create Hierarchy Resolver I Type focus Type Possible Match possible Matches cache focus type if not a possible match char compound Name Char Operation split On focus Type get Fully Qualified Name to Char Array boolean is Possible Match false for int i 0 length possible Matches length i length i if Char Operation equals possible Matches i compound Name compound Name is Possible Match true break if is Possible Match if focus Type is Binary try cache Binary Type focus Type catch Java Model Exception e return false else cache all types in the focus compilation unit even secondary types accept I Compilation Unit focus Type get Compilation Unit resolve focus type this hierarchy Resolver new Hierarchy Resolver this lookup Environment null hierarchy is not going to be computed Reference Binding binding this hierarchy Resolver set Focus Type compound Name return binding null binding is Valid Binding binding tag Bits Tag Bits Hierarchy Has Problems 0  createHierarchyResolver IType focusType PossibleMatch possibleMatches compoundName CharOperation splitOn focusType getFullyQualifiedName toCharArray isPossibleMatch possibleMatches CharOperation possibleMatches compoundName compoundName isPossibleMatch isPossibleMatch focusType isBinary cacheBinaryType focusType JavaModelException ICompilationUnit focusType getCompilationUnit hierarchyResolver HierarchyResolver lookupEnvironment ReferenceBinding hierarchyResolver setFocusType compoundName isValidBinding tagBits TagBits HierarchyHasProblems
Creates an I Import Declaration from the given import statement protected I Java Element create Import Handle Import Reference import Ref char import Name Char Operation concat With import Ref get Import Name if import Ref on Demand import Name Char Operation concat import Name to Char Array NON NLS 1 Openable openable this current Possible Match openable if openable instanceof Compilation Unit return Compilation Unit openable get Import new String import Name binary types do not contain import statements so just answer the top level type as the element I Type binary Type Class File openable get Type String type Name binary Type get Element Name int last Dollar type Name last Index Of if last Dollar 1 return binary Type return create Type Handle type Name substring 0 last Dollar  IImportDeclaration IJavaElement createImportHandle ImportReference importRef importName CharOperation concatWith importRef getImportName importRef onDemand importName CharOperation importName toCharArray currentPossibleMatch CompilationUnit CompilationUnit getImport importName IType binaryType ClassFile getType typeName binaryType getElementName lastDollar typeName lastIndexOf lastDollar binaryType createTypeHandle typeName lastDollar
Creates an I Type from the given simple top level type name protected I Type create Type Handle String simple Type Name Openable openable this current Possible Match openable if openable instanceof Compilation Unit return Compilation Unit openable get Type simple Type Name I Type binary Type Class File openable get Type if simple Type Name equals binary Type get Type Qualified Name return binary Type answer only top level types sometimes the class File is for a member local type try I Class File class File binary Type get Package Fragment get Class File simple Type Name Suffix Constants SUFFIX STRING class return class File get Type catch Java Model Exception e ignore as implementation of get Type cannot throw this exception return null  IType IType createTypeHandle simpleTypeName currentPossibleMatch CompilationUnit CompilationUnit getType simpleTypeName IType binaryType ClassFile getType simpleTypeName binaryType getTypeQualifiedName binaryType classFile IClassFile classFile binaryType getPackageFragment getClassFile simpleTypeName SuffixConstants SUFFIX_STRING_class classFile getType JavaModelException getType
return null protected boolean encloses I Java Element element return element null this scope encloses element  IJavaElement
protected I Binary Type get Binary Info Class File class File I Resource resource throws Core Exception Binary Type binary Type Binary Type class File get Type if class File is Open return I Binary Type binary Type get Element Info reuse the info from the java model cache create a temporary info I Binary Type info try I Java Element pkg class File get Parent Package Fragment Root root Package Fragment Root pkg get Parent if root is Archive class file in a jar String pkg Path pkg get Element Name replace String class File Path pkg Path length 0 pkg Path class File get Element Name NON NLS 1 class File get Element Name Zip File zip File null try zip File Jar Package Fragment Root root get Jar info Class File Reader read zip File class File Path finally Java Model Manager get Java Model Manager close Zip File zip File else class file in a directory String os Path resource get Location toOS String info Class File Reader read os Path return info catch Class Format Exception e e print Stack Trace return null catch java io IO Exception e throw new Java Model Exception e I Java Model Status Constants IO EXCEPTION  IBinaryType getBinaryInfo ClassFile classFile IResource CoreException BinaryType binaryType BinaryType classFile getType classFile isOpen IBinaryType binaryType getElementInfo IBinaryType IJavaElement classFile getParent PackageFragmentRoot PackageFragmentRoot getParent isArchive pkgPath getElementName classFilePath pkgPath pkgPath classFile getElementName classFile getElementName ZipFile zipFile zipFile JarPackageFragmentRoot getJar ClassFileReader zipFile classFilePath JavaModelManager getJavaModelManager closeZipFile zipFile osPath getLocation toOSString ClassFileReader osPath ClassFormatException printStackTrace IOException JavaModelException IJavaModelStatusConstants IO_EXCEPTION
protected I Type get Focus Type return this scope instanceof Hierarchy Scope Hierarchy Scope this scope focus Type null  IType getFocusType HierarchyScope HierarchyScope focusType
protected void get Method Bodies Compilation Unit Declaration unit if unit ignore Method Bodies unit ignore Further Investigation true return if initial diet parse did not work no need to dig into method bodies save existing values to restore them at the end of the parsing process see bug 47079 for more details int old Line Ends this parser scanner line Ends int old Line Ptr this parser scanner line Ptr try char contents unit compilation Result compilation Unit get Contents this parser scanner set Source contents inline old set Line Ends final int line Separator Positions unit compilation Result line Separator Positions this parser scanner line Ends line Separator Positions this parser scanner line Ptr line Separator Positions length 1 if this parser javadoc Parser check Doc Comment this parser javadoc Parser scanner set Source contents this parser node Set this current Possible Match node Set this parser parse Bodies unit finally this parser node Set null this is done to prevent any side effects on the compilation unit result line separator positions array this parser scanner line Ends old Line Ends this parser scanner line Ptr old Line Ptr  getMethodBodies CompilationUnitDeclaration ignoreMethodBodies ignoreFurtherInvestigation oldLineEnds lineEnds oldLinePtr linePtr compilationResult compilationUnit getContents setSource setLineEnds lineSeparatorPositions compilationResult lineSeparatorPositions lineEnds lineSeparatorPositions linePtr lineSeparatorPositions javadocParser checkDocComment javadocParser setSource nodeSet currentPossibleMatch nodeSet parseBodies nodeSet lineEnds oldLineEnds linePtr oldLinePtr
protected boolean has Already Defined Type Compilation Unit Declaration parsed Unit Compilation Result result parsed Unit compilation Result if result null return false for int i 0 i result problem Count i if result problems i getID I Problem Duplicate Types return true return false  hasAlreadyDefinedType CompilationUnitDeclaration parsedUnit CompilationResult parsedUnit compilationResult problemCount IProblem DuplicateTypes
Create a new parser for the given project as well as a lookup environment public void initialize Java Project project int possible Match Size throws Java Model Exception if this name Environment null this name Environment cleanup Searchable Environment searchable Environment Searchable Environment project new Searchable Name Environment this working Copies if only one possible match a file name environment costs too much so use the existing searchable environment which will populate the java model only for this possible match and its required types this name Environment possible Match Size 1 I Name Environment searchable Environment I Name Environment new Java Search Name Environment project this working Copies create lookup environment this options new Compiler Options project get Options true Problem Reporter problem Reporter new Problem Reporter Default Error Handling Policies proceed With All Problems this options new Default Problem Factory this lookup Environment new Lookup Environment this this options problem Reporter this name Environment this parser Match Locator Parser create Parser problem Reporter this remember project s name lookup this name Lookup searchable Environment name Lookup initialize queue of units this number Of Matches 0 this matches To Process new Possible Match possible Match Size  JavaProject possibleMatchSize JavaModelException nameEnvironment nameEnvironment SearchableEnvironment searchableEnvironment SearchableEnvironment newSearchableNameEnvironment workingCopies nameEnvironment possibleMatchSize INameEnvironment searchableEnvironment INameEnvironment JavaSearchNameEnvironment workingCopies CompilerOptions getOptions ProblemReporter problemReporter ProblemReporter DefaultErrorHandlingPolicies proceedWithAllProblems DefaultProblemFactory lookupEnvironment LookupEnvironment problemReporter nameEnvironment MatchLocatorParser createParser problemReporter nameLookup searchableEnvironment nameLookup numberOfMatches matchesToProcess PossibleMatch possibleMatchSize
protected void locate Matches Java Project java Project Possible Match possible Matches int start int length throws Core Exception initialize java Project length create and resolve binding equivalent to begin Compilation in Compiler boolean must Resolve Internal Search Pattern this pattern must Resolve boolean bindings Were Created must Resolve try for int i start max Units start length i max Units i Possible Match possible Match possible Matches i try parse And Build Bindings possible Match must Resolve if must Resolve process possible Match bindings Were Created finally if must Resolve possible Match clean Up if must Resolve lookup Environment complete Type Bindings create hierarchy resolver if needed I Type focus Type get Focus Type if focus Type null this hierarchy Resolver null else if create Hierarchy Resolver focus Type possible Matches focus type is not visible use the super type names instead of the bindings if compute Super Type Names focus Type null return catch Abort Compilation e bindings Were Created false if must Resolve return possible match resolution for int i 0 i this number Of Matches i if this progress Monitor null this progress Monitor is Canceled throw new Operation Canceled Exception Possible Match possible Match this matches To Process i this matches To Process i null release reference to processed possible match try process possible Match bindings Were Created catch Abort Compilation e problem with class path it could not find base classes continue and try next matching openable reporting innacurate matches since bindings will be null bindings Were Created false catch Java Model Exception e problem with class path it could not find base classes continue and try next matching openable reporting innacurate matches since bindings will be null bindings Were Created false finally if this options verbose System out println Util bind compilation done NON NLS 1 new String String value Of i 1 String value Of number Of Matches new String possible Match parsed Unit get File Name cleanup compilation unit result possible Match clean Up  locateMatches JavaProject javaProject PossibleMatch possibleMatches CoreException javaProject beginCompilation mustResolve InternalSearchPattern mustResolve bindingsWereCreated mustResolve maxUnits maxUnits PossibleMatch possibleMatch possibleMatches parseAndBuildBindings possibleMatch mustResolve mustResolve possibleMatch bindingsWereCreated mustResolve possibleMatch cleanUp mustResolve lookupEnvironment completeTypeBindings IType focusType getFocusType focusType hierarchyResolver createHierarchyResolver focusType possibleMatches computeSuperTypeNames focusType AbortCompilation bindingsWereCreated mustResolve numberOfMatches progressMonitor progressMonitor isCanceled OperationCanceledException PossibleMatch possibleMatch matchesToProcess matchesToProcess possibleMatch bindingsWereCreated AbortCompilation bindingsWereCreated JavaModelException bindingsWereCreated valueOf valueOf numberOfMatches possibleMatch parsedUnit getFileName possibleMatch cleanUp
Locate the matches amongst the possible matches protected void locate Matches Java Project java Project Possible Match Set match Set throws Core Exception Possible Match possible Matches match Set get Possible Matches java Project get Package Fragment Roots for int index 0 length possible Matches length index length int max Math min MAX AT ONCE length index locate Matches java Project possible Matches index max index max if this progress Monitor null this progress Monitor worked max  locateMatches JavaProject javaProject PossibleMatchSet matchSet CoreException PossibleMatch possibleMatches matchSet getPossibleMatches javaProject getPackageFragmentRoots possibleMatches MAX_AT_ONCE locateMatches javaProject possibleMatches progressMonitor progressMonitor
Possible Match Set match Set new Possible Match Set Util sort search Documents new Util Comparer public int compare Object a Object b return Search Document a get Path compare To Search Document b get Path  PossibleMatchSet matchSet PossibleMatchSet searchDocuments SearchDocument getPath compareTo SearchDocument getPath
Locate the matches in the given files and report them using the search requestor public void locate Matches Search Document search Documents throws Core Exception if Search Engine VERBOSE System out println Locating matches in documents NON NLS 1 for int i 0 length search Documents length i length i System out println t search Documents i NON NLS 1 System out println NON NLS 1 extract working copies Array List copies new Array List for int i 0 length search Documents length i length i Search Document document search Documents i if document instanceof Working Copy Document copies add Working Copy Document document working Copy int copies Length copies size this working Copies new org eclipse jdt core I Compilation Unit copies Length copies to Array this working Copies Java Model Manager manager Java Model Manager get Java Model Manager try optimize access to zip files during search operation manager cache Zip Files initialize handle factory used as a cache of handles so as to optimize space if this handle Factory null this handle Factory new Handle Factory if this progress Monitor null this progress Monitor begin Task search Documents length NON NLS 1 initialize pattern for polymorphic search ie method reference pattern this pattern Locator initialize Polymorphic Search this Java Project previous Java Project null int skipped 0 Possible Match Set match Set new Possible Match Set Util sort search Documents new Util Comparer public int compare Object a Object b return Search Document a get Path compare To Search Document b get Path for int i 0 l search Documents length i l i if this progress Monitor null this progress Monitor is Canceled throw new Operation Canceled Exception skip duplicate paths Search Document search Document search Documents i String path String search Document get Path if i 0 path String equals search Documents i 1 get Path skipped continue Openable openable org eclipse jdt core I Compilation Unit working Copy null if search Document instanceof Working Copy Document working Copy Working Copy Document search Document working Copy openable Openable working Copy else openable this handle Factory create Openable path String this scope if openable null continue match is outside classpath create new parser and lookup environment if this is a new project I Resource resource null Java Project java Project Java Project openable get Java Project resource working Copy null working Copy get Resource openable get Resource if resource null resource java Project get Project case of a file in an external jar if java Project equals previous Java Project locate matches in previous project if previous Java Project null try locate Matches previous Java Project match Set catch Java Model Exception e problem with classpath in this project skip it if this progress Monitor null this progress Monitor worked skipped match Set reset previous Java Project java Project skipped 0 match Set add new Possible Match this resource openable search Document skipped last project if previous Java Project null try locate Matches previous Java Project match Set catch Java Model Exception e problem with classpath in last project ignore if this progress Monitor null this progress Monitor worked skipped if this progress Monitor null this progress Monitor done finally if this name Environment null this name Environment cleanup manager flush Zip Files  locateMatches SearchDocument searchDocuments CoreException SearchEngine searchDocuments searchDocuments ArrayList ArrayList searchDocuments SearchDocument searchDocuments WorkingCopyDocument WorkingCopyDocument workingCopy copiesLength workingCopies ICompilationUnit copiesLength toArray workingCopies JavaModelManager JavaModelManager getJavaModelManager cacheZipFiles handleFactory handleFactory HandleFactory progressMonitor progressMonitor beginTask searchDocuments patternLocator initializePolymorphicSearch JavaProject previousJavaProject PossibleMatchSet matchSet PossibleMatchSet searchDocuments SearchDocument getPath compareTo SearchDocument getPath searchDocuments progressMonitor progressMonitor isCanceled OperationCanceledException SearchDocument searchDocument searchDocuments pathString searchDocument getPath pathString searchDocuments getPath ICompilationUnit workingCopy searchDocument WorkingCopyDocument workingCopy WorkingCopyDocument searchDocument workingCopy workingCopy handleFactory createOpenable pathString IResource JavaProject javaProject JavaProject getJavaProject workingCopy workingCopy getResource getResource javaProject getProject javaProject previousJavaProject previousJavaProject locateMatches previousJavaProject matchSet JavaModelException progressMonitor progressMonitor matchSet previousJavaProject javaProject matchSet PossibleMatch searchDocument previousJavaProject locateMatches previousJavaProject matchSet JavaModelException progressMonitor progressMonitor progressMonitor progressMonitor nameEnvironment nameEnvironment flushZipFiles
Locates the package declarations corresponding to this locator s pattern public void locate Package Declarations Search Participant participant throws Core Exception locate Package Declarations this pattern participant  locatePackageDeclarations SearchParticipant CoreException locatePackageDeclarations
Locates the package declarations corresponding to the search pattern protected void locate Package Declarations Search Pattern search Pattern Search Participant participant throws Core Exception if search Pattern instanceof Or Pattern Search Pattern patterns Or Pattern search Pattern patterns for int i 0 length patterns length i length i locate Package Declarations patterns i participant else if search Pattern instanceof Package Declaration Pattern I Java Element focus Internal Search Pattern search Pattern focus if focus null Search Document document participant get Document focus get Path to String this current Possible Match new Possible Match this focus get Resource null document if encloses focus Search Match match new Declaration Match focus Search Match A ACCURATE 1 1 report match return Package Declaration Pattern pkg Pattern Package Declaration Pattern search Pattern I Java Project projects Java Model Manager get Java Model Manager get Java Model get Java Projects for int i 0 length projects length i length i I Java Project java Project projects i I Package Fragment Root roots java Project get Package Fragment Roots for int j 0 roots Length roots length j roots Length j I Java Element pkgs roots j get Children for int k 0 pks Length pkgs length k pks Length k I Package Fragment pkg I Package Fragment pkgs k if pkg get Children length 0 pkg Pattern matches Name pkg Pattern pkg Name pkg get Element Name to Char Array I Resource resource pkg get Resource if resource null case of a file in an external jar resource java Project get Project Search Document document participant get Document resource get Full Path to String this current Possible Match new Possible Match this resource null document try if encloses pkg Search Match match new Declaration Match pkg Search Match A ACCURATE 1 1 report match catch Java Model Exception e throw e catch Core Exception e throw new Java Model Exception e  locatePackageDeclarations SearchPattern searchPattern SearchParticipant CoreException searchPattern OrPattern SearchPattern OrPattern searchPattern locatePackageDeclarations searchPattern PackageDeclarationPattern IJavaElement InternalSearchPattern searchPattern SearchDocument getDocument getPath toString currentPossibleMatch PossibleMatch getResource SearchMatch newDeclarationMatch SearchMatch A_ACCURATE PackageDeclarationPattern pkgPattern PackageDeclarationPattern searchPattern IJavaProject JavaModelManager getJavaModelManager getJavaModel getJavaProjects IJavaProject javaProject IPackageFragmentRoot javaProject getPackageFragmentRoots rootsLength rootsLength IJavaElement getChildren pksLength pksLength IPackageFragment IPackageFragment getChildren pkgPattern matchesName pkgPattern pkgName getElementName toCharArray IResource getResource javaProject getProject SearchDocument getDocument getFullPath toString currentPossibleMatch PossibleMatch SearchMatch newDeclarationMatch SearchMatch A_ACCURATE JavaModelException CoreException JavaModelException
protected I Type lookup Type Reference Binding type Binding if type Binding null return null char package Name type Binding qualified Package Name I Package Fragment pkgs this name Lookup find Package Fragments package Name null package Name length 0 I Package Fragment DEFAULT PACKAGE NAME new String package Name false iterate type lookup in each package fragment char source Name type Binding qualified Source Name String type Name new String source Name for int i 0 length pkgs null 0 pkgs length i length i I Type type this name Lookup find Type type Name pkgs i false type Binding is Class Name Lookup ACCEPT CLASSES Name Lookup ACCEPT INTERFACES if type null return type search inside enclosing element char qualified Name Char Operation split On source Name int length qualified Name length if length 0 return null I Type type create Type Handle new String qualified Name 0 find the top level type if type null return null for int i 1 i length i type type get Type new String qualified Name i if type null return null if type exists return type return null  IType lookupType ReferenceBinding typeBinding typeBinding packageName typeBinding qualifiedPackageName IPackageFragment nameLookup findPackageFragments packageName packageName IPackageFragment DEFAULT_PACKAGE_NAME packageName sourceName typeBinding qualifiedSourceName typeName sourceName IType nameLookup findType typeName typeBinding isClass NameLookup ACCEPT_CLASSES NameLookup ACCEPT_INTERFACES qualifiedName CharOperation splitOn sourceName qualifiedName IType createTypeHandle qualifiedName getType qualifiedName
public Search Match new Declaration Match I Java Element element int accuracy int offset int length Search Participant participant get Participant I Resource resource this current Possible Match resource return new Declaration Match element accuracy offset length participant resource  SearchMatch newDeclarationMatch IJavaElement SearchParticipant getParticipant IResource currentPossibleMatch newDeclarationMatch
public Search Match new Declaration Match I Java Element element int accuracy int offset int length Search Participant participant I Resource resource switch element get Element Type case I Java Element PACKAGE FRAGMENT return new Package Declaration Match element accuracy offset length participant resource case I Java Element TYPE return new Type Declaration Match element accuracy offset length participant resource case I Java Element FIELD return new Field Declaration Match element accuracy offset length participant resource case I Java Element METHOD return new Method Declaration Match element accuracy offset length participant resource case I Java Element LOCAL VARIABLE return new Local Variable Declaration Match element accuracy offset length participant resource default return null  SearchMatch newDeclarationMatch IJavaElement SearchParticipant IResource getElementType IJavaElement PACKAGE_FRAGMENT PackageDeclarationMatch IJavaElement TypeDeclarationMatch IJavaElement FieldDeclarationMatch IJavaElement MethodDeclarationMatch IJavaElement LOCAL_VARIABLE LocalVariableDeclarationMatch
public Search Match new Field Reference Match I Java Element enclosing Element int accuracy int offset int length AST Node reference int bits reference bits boolean is Coupound Assigned bits AST Node Is Compound AssignedMASK 0 boolean is Read Access is Coupound Assigned bits AST Node Is Strictly AssignedMASK 0 boolean is Write Access is Coupound Assigned bits AST Node Is Strictly AssignedMASK 0 boolean inside Doc Comment bits AST Node Inside Javadoc 0 Search Participant participant get Participant I Resource resource this current Possible Match resource return new Field Reference Match enclosing Element accuracy offset length is Read Access is Write Access inside Doc Comment participant resource  SearchMatch newFieldReferenceMatch IJavaElement enclosingElement ASTNode isCoupoundAssigned ASTNode IsCompoundAssignedMASK isReadAccess isCoupoundAssigned ASTNode IsStrictlyAssignedMASK isWriteAccess isCoupoundAssigned ASTNode IsStrictlyAssignedMASK insideDocComment ASTNode InsideJavadoc SearchParticipant getParticipant IResource currentPossibleMatch FieldReferenceMatch enclosingElement isReadAccess isWriteAccess insideDocComment
public Search Match new Local Variable Reference Match I Java Element enclosing Element int accuracy int offset int length AST Node reference int bits reference bits boolean is Coupound Assigned bits AST Node Is Compound AssignedMASK 0 boolean is Read Access is Coupound Assigned bits AST Node Is Strictly AssignedMASK 0 boolean is Write Access is Coupound Assigned bits AST Node Is Strictly AssignedMASK 0 boolean inside Doc Comment bits AST Node Inside Javadoc 0 Search Participant participant get Participant I Resource resource this current Possible Match resource return new Local Variable Reference Match enclosing Element accuracy offset length is Read Access is Write Access inside Doc Comment participant resource  SearchMatch newLocalVariableReferenceMatch IJavaElement enclosingElement ASTNode isCoupoundAssigned ASTNode IsCompoundAssignedMASK isReadAccess isCoupoundAssigned ASTNode IsStrictlyAssignedMASK isWriteAccess isCoupoundAssigned ASTNode IsStrictlyAssignedMASK insideDocComment ASTNode InsideJavadoc SearchParticipant getParticipant IResource currentPossibleMatch LocalVariableReferenceMatch enclosingElement isReadAccess isWriteAccess insideDocComment
public Search Match new Method Reference Match I Java Element enclosing Element int accuracy int offset int length AST Node reference Search Participant participant get Participant I Resource resource this current Possible Match resource boolean inside Doc Comment reference bits AST Node Inside Javadoc 0 return new Method Reference Match enclosing Element accuracy offset length inside Doc Comment participant resource  SearchMatch newMethodReferenceMatch IJavaElement enclosingElement ASTNode SearchParticipant getParticipant IResource currentPossibleMatch insideDocComment ASTNode InsideJavadoc MethodReferenceMatch enclosingElement insideDocComment
public Search Match new Package Reference Match I Java Element enclosing Element int accuracy int offset int length AST Node reference Search Participant participant get Participant I Resource resource this current Possible Match resource boolean inside Doc Comment reference bits AST Node Inside Javadoc 0 return new Package Reference Match enclosing Element accuracy offset length inside Doc Comment participant resource  SearchMatch newPackageReferenceMatch IJavaElement enclosingElement ASTNode SearchParticipant getParticipant IResource currentPossibleMatch insideDocComment ASTNode InsideJavadoc PackageReferenceMatch enclosingElement insideDocComment
public Search Match new Type Reference Match I Java Element enclosing Element int accuracy int offset int length AST Node reference Search Participant participant get Participant I Resource resource this current Possible Match resource boolean inside Doc Comment reference bits AST Node Inside Javadoc 0 return new Type Reference Match enclosing Element accuracy offset length inside Doc Comment participant resource  SearchMatch newTypeReferenceMatch IJavaElement enclosingElement ASTNode SearchParticipant getParticipant IResource currentPossibleMatch insideDocComment ASTNode InsideJavadoc TypeReferenceMatch enclosingElement insideDocComment
protected void process Possible Match possible Match boolean bindings Were Created throws Core Exception this current Possible Match possible Match Compilation Unit Declaration unit possible Match parsed Unit try if unit is Empty if this current Possible Match openable instanceof Class File Class File class File Class File this current Possible Match openable I Binary Type info get Binary Info class File this current Possible Match resource if info null new Class File Match Locator locate Matches this class File info return if has Already Defined Type unit return skip type has it is hidden so not visible get Method Bodies unit if bindings Were Created Internal Search Pattern this pattern must Resolve unit types null if Search Engine VERBOSE System out println Resolving this current Possible Match openable to String With Ancestors NON NLS 1 reduce Parse Tree unit if unit scope null unit scope fault In Types fault in fields methods unit resolve report Matching unit true else report Matching unit Internal Search Pattern this pattern must Resolve catch Abort Compilation e could not resolve report innacurate matches report Matching unit true was partially resolved if e instanceof Abort Compilation Unit problem with class path throw e finally this current Possible Match null  PossibleMatch possibleMatch bindingsWereCreated CoreException currentPossibleMatch possibleMatch CompilationUnitDeclaration possibleMatch parsedUnit isEmpty currentPossibleMatch ClassFile ClassFile classFile ClassFile currentPossibleMatch IBinaryType getBinaryInfo classFile currentPossibleMatch ClassFileMatchLocator locateMatches classFile hasAlreadyDefinedType getMethodBodies bindingsWereCreated InternalSearchPattern mustResolve SearchEngine currentPossibleMatch toStringWithAncestors reduceParseTree faultInTypes reportMatching reportMatching InternalSearchPattern mustResolve AbortCompilation reportMatching AbortCompilationUnit currentPossibleMatch
protected void purge Method Statements Type Declaration type boolean check Each Method check Each Method check Each Method this current Possible Match node Set has Possible Nodes type declaration Source Start type declaration Source End Abstract Method Declaration methods type methods if methods null if check Each Method for int j 0 length methods length j length j Abstract Method Declaration method methods j if this current Possible Match node Set has Possible Nodes method declaration Source Start method declaration Source End method statements null method javadoc null else for int j 0 length methods length j length j methods j statements null methods j javadoc null Type Declaration member Types type member Types if member Types null for int i 0 l member Types length i l i purge Method Statements member Types i check Each Method  purgeMethodStatements TypeDeclaration checkEachMethod checkEachMethod checkEachMethod currentPossibleMatch nodeSet hasPossibleNodes declarationSourceStart declarationSourceEnd AbstractMethodDeclaration checkEachMethod AbstractMethodDeclaration currentPossibleMatch nodeSet hasPossibleNodes declarationSourceStart declarationSourceEnd TypeDeclaration memberTypes memberTypes memberTypes memberTypes purgeMethodStatements memberTypes checkEachMethod
Called prior to the unit being resolved Reduce the parse tree where possible protected void reduce Parse Tree Compilation Unit Declaration unit remove statements from methods that have no possible matching nodes Type Declaration types unit types for int i 0 l types length i l i purge Method Statements types i true  reduceParseTree CompilationUnitDeclaration TypeDeclaration purgeMethodStatements
purge Method Statements types i true public Search Participant get Participant return this current Possible Match document get Participant  purgeMethodStatements SearchParticipant getParticipant currentPossibleMatch getParticipant
protected void report Search Match match throws Core Exception long start 1 if Search Engine VERBOSE start System current Time Millis System out println Reporting match NON NLS 1 System out println t Resource match get Resource NON NLS 2 NON NLS 1 System out println t Positions offset match get Offset length match get Length NON NLS 1 NON NLS 2 NON NLS 3 System out println t Java element Java Element match get Element to String With Ancestors NON NLS 1 System out println match get Accuracy Search Match A ACCURATE t Accuracy EXACT MATCH NON NLS 1 t Accuracy POTENTIAL MATCH NON NLS 1 this requestor accept Search Match match if Search Engine VERBOSE this result Collector Time System current Time Millis start  SearchMatch CoreException SearchEngine currentTimeMillis tResource getResource tPositions getOffset getLength tJava JavaElement getElement toStringWithAncestors getAccuracy SearchMatch A_ACCURATE tAccuracy EXACT_MATCH tAccuracy POTENTIAL_MATCH acceptSearchMatch SearchEngine resultCollectorTime currentTimeMillis
Finds the accurate positions of the sequence of tokens given by qualified Name in the source and reports a reference to this this qualified name to the search requestor protected void report Accurate Type Reference AST Node type Ref char name I Java Element element int accuracy throws Core Exception if accuracy 1 return if encloses element return int source Start type Ref source Start int source End type Ref source End compute source positions of the qualified reference Scanner scanner this parser scanner scanner set Source this current Possible Match get Contents scanner reset To source Start source End int token 1 int current Position do current Position scanner current Position try token scanner get Next Token catch Invalid Input Exception e ignore if token Terminal Tokens Token Name Identifier this pattern matches Name name scanner get Current Token Source int length scanner current Position current Position Search Match match new Type Reference Match element accuracy current Position length type Ref report match return while token Terminal Tokens Token NameEOF Search Match match new Type Reference Match element accuracy source Start source End source Start 1 type Ref report match  qualifiedName reportAccurateTypeReference ASTNode typeRef IJavaElement CoreException sourceStart typeRef sourceStart sourceEnd typeRef sourceEnd setSource currentPossibleMatch getContents resetTo sourceStart sourceEnd currentPosition currentPosition currentPosition getNextToken InvalidInputException TerminalTokens TokenNameIdentifier matchesName getCurrentTokenSource currentPosition currentPosition SearchMatch newTypeReferenceMatch currentPosition typeRef TerminalTokens TokenNameEOF SearchMatch newTypeReferenceMatch sourceStart sourceEnd sourceStart typeRef
Finds the accurate positions of each valid token in the source and reports a reference to this token to the search requestor A token is valid if it has an accuracy which is not 1 protected void report Accurate Field Reference Qualified Name Reference q Name Ref I Java Element element int accuracies throws Core Exception if encloses element return int source Start q Name Ref source Start int source End q Name Ref source End char tokens q Name Ref tokens compute source positions of the qualified reference Scanner scanner this parser scanner scanner set Source this current Possible Match get Contents scanner reset To source Start source End int ref Source Start 1 ref Source End 1 int length tokens length int token 1 int previous Valid 1 int i 0 int accuracy Index 0 do int current Position scanner current Position read token try token scanner get Next Token catch Invalid Input Exception e ignore if token Terminal Tokens Token NameEOF char current Token Source scanner get Current Token Source boolean equals false while i length equals this pattern matches Name tokens i current Token Source empty if equals previous Valid 1 previous Valid i 2 previous Valid i 1 if ref Source Start 1 ref Source Start current Position ref Source End scanner current Position 1 else i 0 ref Source Start 1 previous Valid 1 read try token scanner get Next Token catch Invalid Input Exception e ignore if accuracies accuracy Index 1 accept reference if ref Source Start 1 Search Match match new Field Reference Match element accuracies accuracy Index ref Source Start ref Source End ref Source Start 1 q Name Ref report match else Search Match match new Field Reference Match element accuracies accuracy Index source Start source End source Start 1 q Name Ref report match i 0 ref Source Start 1 previous Valid 1 if accuracy Index accuracies length 1 accuracy Index while token Terminal Tokens Token NameEOF  reportAccurateFieldReference QualifiedNameReference qNameRef IJavaElement CoreException sourceStart qNameRef sourceStart sourceEnd qNameRef sourceEnd qNameRef setSource currentPossibleMatch getContents resetTo sourceStart sourceEnd refSourceStart refSourceEnd previousValid accuracyIndex currentPosition currentPosition getNextToken InvalidInputException TerminalTokens TokenNameEOF currentTokenSource getCurrentTokenSource matchesName currentTokenSource previousValid previousValid previousValid refSourceStart refSourceStart currentPosition refSourceEnd currentPosition refSourceStart previousValid getNextToken InvalidInputException accuracyIndex refSourceStart SearchMatch newFieldReferenceMatch accuracyIndex refSourceStart refSourceEnd refSourceStart qNameRef SearchMatch newFieldReferenceMatch accuracyIndex sourceStart sourceEnd sourceStart qNameRef refSourceStart previousValid accuracyIndex accuracyIndex TerminalTokens TokenNameEOF
protected void report Binary Member Declaration I Resource resource I Member binary Member I Binary Type info int accuracy throws Core Exception Class File class File Class File binary Member get Class File I Source Range range class File is Open binary Member get Name Range Source Mapper fg Unknown Range if range get Offset 1 Source Mapper mapper class File get Source Mapper if mapper null I Type type class File get Type String source File Name mapper find Source File Name type info if source File Name null char contents mapper find Source type source File Name if contents null range mapper map Source type contents binary Member if resource null resource this current Possible Match resource Search Match match new Declaration Match binary Member accuracy range get Offset range get Length get Participant resource report match  reportBinaryMemberDeclaration IResource IMember binaryMember IBinaryType CoreException ClassFile classFile ClassFile binaryMember getClassFile ISourceRange classFile isOpen binaryMember getNameRange SourceMapper fgUnknownRange getOffset SourceMapper classFile getSourceMapper IType classFile getType sourceFileName findSourceFileName sourceFileName findSource sourceFileName mapSource binaryMember currentPossibleMatch SearchMatch newDeclarationMatch binaryMember getOffset getLength getParticipant
Visit the given method declaration and report the nodes that match exactly the search pattern ie the ones in the matching nodes set Note that the method declaration has already been checked protected void report Matching Abstract Method Declaration method I Java Element parent int accuracy boolean type In Hierarchy Matching Node Set node Set throws Core Exception I Java Element enclosing Element null if accuracy 1 enclosing Element create Handle method parent if enclosing Element null skip if unable to find method compute source positions of the selector Scanner scanner parser scanner int name Source Start method source Start scanner set Source this current Possible Match get Contents scanner reset To name Source Start method source End try scanner get Next Token catch Invalid Input Exception e ignore if encloses enclosing Element int length scanner current Position name Source Start Search Match match new Declaration Match enclosing Element accuracy name Source Start length report match handle nodes for the local type first if method bits AST Node Has Local TypeMASK 0 if enclosing Element null enclosing Element create Handle method parent Local Declaration Visitor local Declaration Visitor new Local Declaration Visitor enclosing Element node Set try method traverse local Declaration Visitor Class Scope null catch Wrapped Core Exception e throw e core Exception references in this method if type In Hierarchy AST Node nodes node Set matching Nodes method declaration Source Start method declaration Source End if nodes null if this match Container Pattern Locator METHOD CONTAINER 0 if enclosing Element null enclosing Element create Handle method parent if encloses enclosing Element for int i 0 l nodes length i l i AST Node node nodes i Integer level Integer node Set matching Nodes remove Key node this pattern Locator match Report Reference node enclosing Element level int Value this return for int i 0 l nodes length i l i node Set matching Nodes remove Key nodes i  reportMatching AbstractMethodDeclaration IJavaElement typeInHierarchy MatchingNodeSet nodeSet CoreException IJavaElement enclosingElement enclosingElement createHandle enclosingElement nameSourceStart sourceStart setSource currentPossibleMatch getContents resetTo nameSourceStart sourceEnd getNextToken InvalidInputException enclosingElement currentPosition nameSourceStart SearchMatch newDeclarationMatch enclosingElement nameSourceStart ASTNode HasLocalTypeMASK enclosingElement enclosingElement createHandle LocalDeclarationVisitor localDeclarationVisitor LocalDeclarationVisitor enclosingElement nodeSet localDeclarationVisitor ClassScope WrappedCoreException coreException typeInHierarchy ASTNode nodeSet matchingNodes declarationSourceStart declarationSourceEnd matchContainer PatternLocator METHOD_CONTAINER enclosingElement enclosingElement createHandle enclosingElement ASTNode nodeSet matchingNodes removeKey patternLocator matchReportReference enclosingElement intValue nodeSet matchingNodes removeKey
Visit the given resolved parse tree and report the nodes that match the search pattern protected void report Matching Compilation Unit Declaration unit boolean must Resolve throws Core Exception Matching Node Set node Set this current Possible Match node Set if must Resolve move the possible matching nodes that exactly match the search pattern to the matching nodes set Object nodes node Set possible Matching Nodes Set values for int i 0 l nodes length i l i AST Node node AST Node nodes i if node null continue if node instanceof Import Reference special case for import refs they don t know their binding import ref cannot be in the hirarchy of a type if this hierarchy Resolver null continue Import Reference import Ref Import Reference node Binding binding import Ref on Demand unit scope get Type Or Package Char Operation subarray import Ref tokens 0 import Ref tokens length unit scope get Type Or Package import Ref tokens this pattern Locator match Level And Report Import Ref import Ref binding this else if node instanceof Javadoc Single Type Reference special case for javadoc single type reference Javadoc Single Type Reference single Ref Javadoc Single Type Reference node if single Ref package Binding null char tokens new char single Ref token long positions new long long single Ref source Start 32 single Ref source End int tag Start single Ref tag Source Start int tag End single Ref tag Source End Javadoc Import Reference import Ref new Javadoc Import Reference tokens positions tag Start tag End this pattern Locator match Level And Report Import Ref import Ref single Ref package Binding this continue else if node instanceof Javadoc Qualified Type Reference special case for javadoc qualified type reference Javadoc Qualified Type Reference qualif Ref Javadoc Qualified Type Reference node if qualif Ref package Binding null char tokens qualif Ref tokens long positions qualif Ref source Positions int tag Start qualif Ref tag Source Start int tag End qualif Ref tag Source End Javadoc Import Reference import Ref new Javadoc Import Reference tokens positions tag Start tag End this pattern Locator match Level And Report Import Ref import Ref qualif Ref package Binding this continue node Set add Match node this pattern Locator resolve Level node node Set possible Matching Nodes Set new Simple Set 3 if node Set matching Nodes element Size 0 return no matching nodes were found boolean matched Unit Container this match Container Pattern Locator COMPILATION UNIT CONTAINER 0 if matched Unit Container Currently a no op Import Reference pkg unit current Package if pkg null node Set matching Nodes remove Key pkg null report Package Declaration pkg Import Reference imports unit imports if imports null for int i 0 l imports length i l i Import Reference import Ref imports i Integer level Integer node Set matching Nodes remove Key import Ref if level null this pattern Locator match Report Import Ref import Ref null create Import Handle import Ref level int Value this Type Declaration types unit types if types null for int i 0 l types length i l i if node Set matching Nodes element Size 0 return reported all the matching nodes Type Declaration type types i Integer level Integer node Set matching Nodes remove Key type int accuracy level null matched Unit Container level int Value 1 report Matching type null accuracy node Set 1  reportMatching CompilationUnitDeclaration mustResolve CoreException MatchingNodeSet nodeSet currentPossibleMatch nodeSet mustResolve nodeSet possibleMatchingNodesSet ASTNode ASTNode ImportReference hierarchyResolver ImportReference importRef ImportReference importRef onDemand getTypeOrPackage CharOperation importRef importRef getTypeOrPackage importRef patternLocator matchLevelAndReportImportRef importRef JavadocSingleTypeReference JavadocSingleTypeReference singleRef JavadocSingleTypeReference singleRef packageBinding singleRef singleRef sourceStart singleRef sourceEnd tagStart singleRef tagSourceStart tagEnd singleRef tagSourceEnd JavadocImportReference importRef JavadocImportReference tagStart tagEnd patternLocator matchLevelAndReportImportRef importRef singleRef packageBinding JavadocQualifiedTypeReference JavadocQualifiedTypeReference qualifRef JavadocQualifiedTypeReference qualifRef packageBinding qualifRef qualifRef sourcePositions tagStart qualifRef tagSourceStart tagEnd qualifRef tagSourceEnd JavadocImportReference importRef JavadocImportReference tagStart tagEnd patternLocator matchLevelAndReportImportRef importRef qualifRef packageBinding nodeSet addMatch patternLocator resolveLevel nodeSet possibleMatchingNodesSet SimpleSet nodeSet matchingNodes elementSize matchedUnitContainer matchContainer PatternLocator COMPILATION_UNIT_CONTAINER matchedUnitContainer ImportReference currentPackage nodeSet matchingNodes removeKey reportPackageDeclaration ImportReference ImportReference importRef nodeSet matchingNodes removeKey importRef patternLocator matchReportImportRef importRef createImportHandle importRef intValue TypeDeclaration nodeSet matchingNodes elementSize TypeDeclaration nodeSet matchingNodes removeKey matchedUnitContainer intValue reportMatching nodeSet
Visit the given field declaration and report the nodes that match exactly the search pattern ie the ones in the matching nodes set protected void report Matching Field Declaration field Type Declaration type I Java Element parent int accuracy boolean type In Hierarchy Matching Node Set node Set throws Core Exception I Java Element enclosing Element null if accuracy 1 enclosing Element create Handle field type parent if encloses enclosing Element int offset field source Start Search Match match new Declaration Match enclosing Element accuracy offset field source End offset 1 report match handle the nodes for the local type first if field bits AST Node Has Local TypeMASK 0 if enclosing Element null enclosing Element create Handle field type parent Local Declaration Visitor local Declaration Visitor new Local Declaration Visitor enclosing Element node Set try field traverse local Declaration Visitor null catch Wrapped Core Exception e throw e core Exception if type In Hierarchy AST Node nodes node Set matching Nodes field declaration Source Start field declaration Source End if nodes null if this match Container Pattern Locator FIELD CONTAINER 0 for int i 0 l nodes length i l i node Set matching Nodes remove Key nodes i else if enclosing Element null enclosing Element create Handle field type parent if encloses enclosing Element for int i 0 l nodes length i l i AST Node node nodes i Integer level Integer node Set matching Nodes remove Key node this pattern Locator match Report Reference node enclosing Element level int Value this  reportMatching FieldDeclaration TypeDeclaration IJavaElement typeInHierarchy MatchingNodeSet nodeSet CoreException IJavaElement enclosingElement enclosingElement createHandle enclosingElement sourceStart SearchMatch newDeclarationMatch enclosingElement sourceEnd ASTNode HasLocalTypeMASK enclosingElement enclosingElement createHandle LocalDeclarationVisitor localDeclarationVisitor LocalDeclarationVisitor enclosingElement nodeSet localDeclarationVisitor WrappedCoreException coreException typeInHierarchy ASTNode nodeSet matchingNodes declarationSourceStart declarationSourceEnd matchContainer PatternLocator FIELD_CONTAINER nodeSet matchingNodes removeKey enclosingElement enclosingElement createHandle enclosingElement ASTNode nodeSet matchingNodes removeKey patternLocator matchReportReference enclosingElement intValue
Visit the given type declaration and report the nodes that match exactly the search pattern ie the ones in the matching nodes set protected void report Matching Type Declaration type I Java Element parent int accuracy Matching Node Set node Set int occurrence Count throws Core Exception create type handle I Java Element enclosing Element parent if enclosing Element null enclosing Element create Type Handle new String type name else if enclosing Element instanceof I Type enclosing Element I Type parent get Type new String type name else if enclosing Element instanceof I Member I Member member I Member parent if member is Binary enclosing Element parent else enclosing Element member get Type new String type name occurrence Count if enclosing Element null return report the type declaration if accuracy 1 encloses enclosing Element int offset type source Start Search Match match new Declaration Match enclosing Element accuracy offset type source End offset 1 report match boolean matched Class Container this match Container Pattern Locator CLASS CONTAINER 0 javadoc if type javadoc null AST Node nodes node Set matching Nodes type declaration Source Start type source Start if nodes null if matched Class Container for int i 0 l nodes length i l i node Set matching Nodes remove Key nodes i else for int i 0 l nodes length i l i AST Node node nodes i Integer level Integer node Set matching Nodes remove Key node if encloses enclosing Element this pattern Locator match Report Reference node enclosing Element level int Value this super types if type bits AST Node Is Anonymous TypeMASK 0 Type Reference super Type type allocation type if super Type null Integer level Integer node Set matching Nodes remove Key super Type if level null matched Class Container this pattern Locator match Report Reference super Type enclosing Element level int Value this else Type Reference super Class type superclass if super Class null Integer level Integer node Set matching Nodes remove Key super Class if level null matched Class Container this pattern Locator match Report Reference super Class enclosing Element level int Value this Type Reference super Interfaces type super Interfaces if super Interfaces null for int i 0 l super Interfaces length i l i Type Reference super Interface super Interfaces i Integer level Integer node Set matching Nodes remove Key super Interface if level null matched Class Container this pattern Locator match Report Reference super Interface enclosing Element level int Value this filter out element not in hierarchy scope boolean type In Hierarchy type binding null type In Hierarchy type binding matched Class Container matched Class Container type In Hierarchy Field Declaration fields type fields if fields null if node Set matching Nodes element Size 0 return reported all the matching nodes for int i 0 l fields length i l i Field Declaration field fields i Integer level Integer node Set matching Nodes remove Key field int value level null matched Class Container level int Value 1 report Matching field type enclosing Element value type In Hierarchy node Set Abstract Method Declaration methods type methods if methods null if node Set matching Nodes element Size 0 return reported all the matching nodes for int i 0 l methods length i l i Abstract Method Declaration method methods i Integer level Integer node Set matching Nodes remove Key method int value level null matched Class Container level int Value 1 report Matching method enclosing Element value type In Hierarchy node Set Type Declaration member Types type member Types if member Types null for int i 0 l member Types length i l i if node Set matching Nodes element Size 0 return reported all the matching nodes Type Declaration member Type member Types i Integer level Integer node Set matching Nodes remove Key member Type int value level null matched Class Container level int Value 1 report Matching member Type enclosing Element value node Set 1  reportMatching TypeDeclaration IJavaElement MatchingNodeSet nodeSet occurrenceCount CoreException IJavaElement enclosingElement enclosingElement enclosingElement createTypeHandle enclosingElement IType enclosingElement IType getType enclosingElement IMember IMember IMember isBinary enclosingElement enclosingElement getType occurrenceCount enclosingElement enclosingElement sourceStart SearchMatch newDeclarationMatch enclosingElement sourceEnd matchedClassContainer matchContainer PatternLocator CLASS_CONTAINER ASTNode nodeSet matchingNodes declarationSourceStart sourceStart matchedClassContainer nodeSet matchingNodes removeKey ASTNode nodeSet matchingNodes removeKey enclosingElement patternLocator matchReportReference enclosingElement intValue ASTNode IsAnonymousTypeMASK TypeReference superType superType nodeSet matchingNodes removeKey superType matchedClassContainer patternLocator matchReportReference superType enclosingElement intValue TypeReference superClass superClass nodeSet matchingNodes removeKey superClass matchedClassContainer patternLocator matchReportReference superClass enclosingElement intValue TypeReference superInterfaces superInterfaces superInterfaces superInterfaces TypeReference superInterface superInterfaces nodeSet matchingNodes removeKey superInterface matchedClassContainer patternLocator matchReportReference superInterface enclosingElement intValue typeInHierarchy typeInHierarchy matchedClassContainer matchedClassContainer typeInHierarchy FieldDeclaration nodeSet matchingNodes elementSize FieldDeclaration nodeSet matchingNodes removeKey matchedClassContainer intValue reportMatching enclosingElement typeInHierarchy nodeSet AbstractMethodDeclaration nodeSet matchingNodes elementSize AbstractMethodDeclaration nodeSet matchingNodes removeKey matchedClassContainer intValue reportMatching enclosingElement typeInHierarchy nodeSet TypeDeclaration memberTypes memberTypes memberTypes memberTypes nodeSet matchingNodes elementSize TypeDeclaration memberType memberTypes nodeSet matchingNodes removeKey memberType matchedClassContainer intValue reportMatching memberType enclosingElement nodeSet
protected boolean type In Hierarchy Reference Binding binding if this hierarchy Resolver null return true not a hierarchy scope if this hierarchy Resolver sub Or Super Of Focus binding return true if this all Super Type Names null char compound Name binding compound Name for int i 0 length this all Super Type Names length i length i if Char Operation equals compound Name this all Super Type Names i return true return false  typeInHierarchy ReferenceBinding hierarchyResolver hierarchyResolver subOrSuperOfFocus allSuperTypeNames compoundName compoundName allSuperTypeNames CharOperation compoundName allSuperTypeNames

public static Match Locator Parser create Parser Problem Reporter problem Reporter Match Locator locator if locator match Container Pattern Locator COMPILATION UNIT CONTAINER 0 return new Import Match Locator Parser problem Reporter locator return new Match Locator Parser problem Reporter locator  MatchLocatorParser createParser ProblemReporter problemReporter MatchLocator matchContainer PatternLocator COMPILATION_UNIT_CONTAINER ImportMatchLocatorParser problemReporter MatchLocatorParser problemReporter
public class No Class No Method Declaration Visitor extends AST Visitor public boolean visit Constructor Declaration constructor Declaration Class Scope scope return constructor Declaration bits AST Node Has Local TypeMASK 0 continue only if it has local type  NoClassNoMethodDeclarationVisitor ASTVisitor ConstructorDeclaration constructorDeclaration ClassScope constructorDeclaration ASTNode HasLocalTypeMASK
return constructor Declaration bits AST Node Has Local TypeMASK 0 continue only if it has local type public boolean visit Field Declaration field Declaration Method Scope scope return field Declaration bits AST Node Has Local TypeMASK 0 continue only if it has local type  constructorDeclaration ASTNode HasLocalTypeMASK FieldDeclaration fieldDeclaration MethodScope fieldDeclaration ASTNode HasLocalTypeMASK
return field Declaration bits AST Node Has Local TypeMASK 0 continue only if it has local type public boolean visit Initializer initializer Method Scope scope return initializer bits AST Node Has Local TypeMASK 0 continue only if it has local type  fieldDeclaration ASTNode HasLocalTypeMASK MethodScope ASTNode HasLocalTypeMASK
return initializer bits AST Node Has Local TypeMASK 0 continue only if it has local type public boolean visit Method Declaration method Declaration Class Scope scope return method Declaration bits AST Node Has Local TypeMASK 0 continue only if it has local type  ASTNode HasLocalTypeMASK MethodDeclaration methodDeclaration ClassScope methodDeclaration ASTNode HasLocalTypeMASK
public class Method But No Class Declaration Visitor extends No Class No Method Declaration Visitor public boolean visit Type Declaration local Type Declaration Block Scope scope pattern Locator match local Type Declaration node Set return true  MethodButNoClassDeclarationVisitor NoClassNoMethodDeclarationVisitor TypeDeclaration localTypeDeclaration BlockScope patternLocator localTypeDeclaration nodeSet
public class Class But No Method Declaration Visitor extends AST Visitor public boolean visit Constructor Declaration constructor Declaration Class Scope scope pattern Locator match constructor Declaration node Set return constructor Declaration bits AST Node Has Local TypeMASK 0 continue only if it has local type  ClassButNoMethodDeclarationVisitor ASTVisitor ConstructorDeclaration constructorDeclaration ClassScope patternLocator constructorDeclaration nodeSet constructorDeclaration ASTNode HasLocalTypeMASK
return constructor Declaration bits AST Node Has Local TypeMASK 0 continue only if it has local type public boolean visit Field Declaration field Declaration Method Scope scope pattern Locator match field Declaration node Set return field Declaration bits AST Node Has Local TypeMASK 0 continue only if it has local type  constructorDeclaration ASTNode HasLocalTypeMASK FieldDeclaration fieldDeclaration MethodScope patternLocator fieldDeclaration nodeSet fieldDeclaration ASTNode HasLocalTypeMASK
return field Declaration bits AST Node Has Local TypeMASK 0 continue only if it has local type public boolean visit Initializer initializer Method Scope scope pattern Locator match initializer node Set return initializer bits AST Node Has Local TypeMASK 0 continue only if it has local type  fieldDeclaration ASTNode HasLocalTypeMASK MethodScope patternLocator nodeSet ASTNode HasLocalTypeMASK
return initializer bits AST Node Has Local TypeMASK 0 continue only if it has local type public boolean visit Type Declaration member Type Declaration Class Scope scope pattern Locator match member Type Declaration node Set return true  ASTNode HasLocalTypeMASK TypeDeclaration memberTypeDeclaration ClassScope patternLocator memberTypeDeclaration nodeSet
return true public boolean visit Method Declaration method Declaration Class Scope scope pattern Locator match method Declaration node Set return method Declaration bits AST Node Has Local TypeMASK 0 continue only if it has local type  MethodDeclaration methodDeclaration ClassScope patternLocator methodDeclaration nodeSet methodDeclaration ASTNode HasLocalTypeMASK
public class Class And Method Declaration Visitor extends Class But No Method Declaration Visitor public boolean visit Type Declaration local Type Declaration Block Scope scope pattern Locator match local Type Declaration node Set return true  ClassAndMethodDeclarationVisitor ClassButNoMethodDeclarationVisitor TypeDeclaration localTypeDeclaration BlockScope patternLocator localTypeDeclaration nodeSet
protected Match Locator Parser Problem Reporter problem Reporter Match Locator locator super problem Reporter true this report Only One Syntax Error true this pattern Locator locator pattern Locator if locator match Container Pattern Locator CLASS CONTAINER 0 this local Declaration Visitor locator match Container Pattern Locator METHOD CONTAINER 0 new Class And Method Declaration Visitor new Class But No Method Declaration Visitor else this local Declaration Visitor locator match Container Pattern Locator METHOD CONTAINER 0 new Method But No Class Declaration Visitor new No Class No Method Declaration Visitor  MatchLocatorParser ProblemReporter problemReporter MatchLocator problemReporter reportOnlyOneSyntaxError patternLocator patternLocator matchContainer PatternLocator CLASS_CONTAINER localDeclarationVisitor matchContainer PatternLocator METHOD_CONTAINER ClassAndMethodDeclarationVisitor ClassButNoMethodDeclarationVisitor localDeclarationVisitor matchContainer PatternLocator METHOD_CONTAINER MethodButNoClassDeclarationVisitor NoClassNoMethodDeclarationVisitor
public void check Comment super check Comment if this javadoc Parser check Doc Comment this javadoc null Search for pattern locator matches in javadoc comment throws exception tags Type Reference thrown Exceptions this javadoc thrown Exceptions int throws Tags Length thrown Exceptions null 0 thrown Exceptions length for int i 0 i throws Tags Length i Type Reference type Ref thrown Exceptions i this pattern Locator match type Ref this node Set Search for pattern locator matches in javadoc comment see tags Expression references this javadoc references int see Tags Length references null 0 references length for int i 0 i see Tags Length i Expression reference references i if reference instanceof Type Reference Type Reference type Ref Type Reference reference this pattern Locator match type Ref this node Set else if reference instanceof Javadoc Field Reference Javadoc Field Reference field Ref Javadoc Field Reference reference this pattern Locator match field Ref this node Set if field Ref receiver instanceof Type Reference field Ref receiver is This Type Reference type Ref Type Reference field Ref receiver this pattern Locator match type Ref this node Set else if reference instanceof Javadoc Message Send Javadoc Message Send message Send Javadoc Message Send reference this pattern Locator match message Send this node Set if message Send receiver instanceof Type Reference message Send receiver is This Type Reference type Ref Type Reference message Send receiver this pattern Locator match type Ref this node Set else if reference instanceof Javadoc Allocation Expression Javadoc Allocation Expression constructor Javadoc Allocation Expression reference this pattern Locator match constructor this node Set if constructor type null constructor type is This this pattern Locator match constructor type this node Set  checkComment checkComment javadocParser checkDocComment TypeReference thrownExceptions thrownExceptions throwsTagsLength thrownExceptions thrownExceptions throwsTagsLength TypeReference typeRef thrownExceptions patternLocator typeRef nodeSet seeTagsLength seeTagsLength TypeReference TypeReference typeRef TypeReference patternLocator typeRef nodeSet JavadocFieldReference JavadocFieldReference fieldRef JavadocFieldReference patternLocator fieldRef nodeSet fieldRef TypeReference fieldRef isThis TypeReference typeRef TypeReference fieldRef patternLocator typeRef nodeSet JavadocMessageSend JavadocMessageSend messageSend JavadocMessageSend patternLocator messageSend nodeSet messageSend TypeReference messageSend isThis TypeReference typeRef TypeReference messageSend patternLocator typeRef nodeSet JavadocAllocationExpression JavadocAllocationExpression JavadocAllocationExpression patternLocator nodeSet isThis patternLocator nodeSet
protected void class Instance Creation boolean always Qualified super class Instance Creation always Qualified this pattern Locator match this expression Stack this expression Ptr this node Set  classInstanceCreation alwaysQualified classInstanceCreation alwaysQualified patternLocator expressionStack expressionPtr nodeSet
this pattern Locator match this expression Stack this expression Ptr this node Set protected void consume Assignment super consume Assignment this pattern Locator match this expression Stack this expression Ptr this node Set  patternLocator expressionStack expressionPtr nodeSet consumeAssignment consumeAssignment patternLocator expressionStack expressionPtr nodeSet
this pattern Locator match this expression Stack this expression Ptr this node Set protected void consume Explicit Constructor Invocation int flag int rec Flag super consume Explicit Constructor Invocation flag rec Flag this pattern Locator match this ast Stack this ast Ptr this node Set  patternLocator expressionStack expressionPtr nodeSet consumeExplicitConstructorInvocation recFlag consumeExplicitConstructorInvocation recFlag patternLocator astStack astPtr nodeSet
protected void consume Field Access boolean is Super Access super consume Field Access is Super Access this is always a Reference this pattern Locator match Reference this expression Stack this expression Ptr this node Set  consumeFieldAccess isSuperAccess consumeFieldAccess isSuperAccess patternLocator expressionStack expressionPtr nodeSet
protected void consume Local Variable Declaration super consume Local Variable Declaration this is always a Local Declaration this pattern Locator match Local Declaration this ast Stack this ast Ptr this node Set  consumeLocalVariableDeclaration consumeLocalVariableDeclaration LocalDeclaration patternLocator LocalDeclaration astStack astPtr nodeSet
protected void consume Method Invocation Name super consume Method Invocation Name this is always a Message Send this pattern Locator match Message Send this expression Stack this expression Ptr this node Set  consumeMethodInvocationName consumeMethodInvocationName MessageSend patternLocator MessageSend expressionStack expressionPtr nodeSet
protected void consume Method Invocation Primary super consume Method Invocation Primary this is always a Message Send this pattern Locator match Message Send this expression Stack this expression Ptr this node Set  consumeMethodInvocationPrimary consumeMethodInvocationPrimary MessageSend patternLocator MessageSend expressionStack expressionPtr nodeSet
protected void consume Method Invocation Super super consume Method Invocation Super this is always a Message Send this pattern Locator match Message Send this expression Stack this expression Ptr this node Set  consumeMethodInvocationSuper consumeMethodInvocationSuper MessageSend patternLocator MessageSend expressionStack expressionPtr nodeSet
protected void consume Primary No New Array pop parenthesis positions and don t update expression positions see http bugs eclipse org bugs show bug cgi id 23329 int Ptr int Ptr  consumePrimaryNoNewArray show_bug intPtr intPtr
int Ptr protected void consume Unary Expression int op boolean post super consume Unary Expression op post this pattern Locator match this expression Stack this expression Ptr this node Set  intPtr consumeUnaryExpression consumeUnaryExpression patternLocator expressionStack expressionPtr nodeSet
protected Type Reference copy Dims Type Reference type Ref int dim Type Reference result super copy Dims type Ref dim if this node Set remove Possible Match type Ref null this node Set add Possible Match result else if this node Set remove Trusted Match type Ref null this node Set add Trusted Match result true return result  TypeReference copyDims TypeReference typeRef TypeReference copyDims typeRef nodeSet removePossibleMatch typeRef nodeSet addPossibleMatch nodeSet removeTrustedMatch typeRef nodeSet addTrustedMatch
protected Type Reference get Type Reference int dim Type Reference type Ref super get Type Reference dim this pattern Locator match type Ref this node Set NB Don t check container since type reference can happen anywhere return type Ref  TypeReference getTypeReference TypeReference typeRef getTypeReference patternLocator typeRef nodeSet typeRef
protected Name Reference get Unspecified Reference Name Reference name Ref super get Unspecified Reference this pattern Locator match name Ref this node Set NB Don t check container since unspecified reference can happen anywhere return name Ref  NameReference getUnspecifiedReference NameReference nameRef getUnspecifiedReference patternLocator nameRef nodeSet nameRef
protected Name Reference get Unspecified Reference Optimized Name Reference name Ref super get Unspecified Reference Optimized this pattern Locator match name Ref this node Set NB Don t check container since unspecified reference can happen anywhere return name Ref  NameReference getUnspecifiedReferenceOptimized NameReference nameRef getUnspecifiedReferenceOptimized patternLocator nameRef nodeSet nameRef
Parses the method bodies in the given compilation unit param unit Compilation Unit Declaration public void parse Bodies Compilation Unit Declaration unit Type Declaration types unit types if types null return for int i 0 i types length i Type Declaration type types i this pattern Locator match type this node Set this parse Bodies type unit  CompilationUnitDeclaration parseBodies CompilationUnitDeclaration TypeDeclaration TypeDeclaration patternLocator nodeSet parseBodies
Parses the member bodies in the given type param type Type Declaration param unit Compilation Unit Declaration protected void parse Bodies Type Declaration type Compilation Unit Declaration unit Field Declaration fields type fields if fields null for int i 0 i fields length i Field Declaration field fields i if field instanceof Initializer this parse Initializer field type unit field traverse local Declaration Visitor null Abstract Method Declaration methods type methods if methods null for int i 0 i methods length i Abstract Method Declaration method methods i if method source Start type body Start if not synthetic if method instanceof Method Declaration Method Declaration method Declaration Method Declaration method this parse method Declaration unit method Declaration traverse local Declaration Visitor Class Scope null else if method instanceof Constructor Declaration Constructor Declaration constructor Declaration Constructor Declaration method this parse constructor Declaration unit constructor Declaration traverse local Declaration Visitor Class Scope null else if method is Default Constructor method parse Statements this unit Type Declaration member Types type member Types if member Types null for int i 0 i member Types length i Type Declaration member Type member Types i this parse Bodies member Type unit member Type traverse local Declaration Visitor Class Scope null  TypeDeclaration CompilationUnitDeclaration parseBodies TypeDeclaration CompilationUnitDeclaration FieldDeclaration FieldDeclaration localDeclarationVisitor AbstractMethodDeclaration AbstractMethodDeclaration sourceStart bodyStart MethodDeclaration MethodDeclaration methodDeclaration MethodDeclaration methodDeclaration methodDeclaration localDeclarationVisitor ClassScope ConstructorDeclaration ConstructorDeclaration constructorDeclaration ConstructorDeclaration constructorDeclaration constructorDeclaration localDeclarationVisitor ClassScope isDefaultConstructor parseStatements TypeDeclaration memberTypes memberTypes memberTypes memberTypes TypeDeclaration memberType memberTypes parseBodies memberType memberType localDeclarationVisitor ClassScope
class Import Match Locator Parser extends Match Locator Parser protected Import Match Locator Parser Problem Reporter problem Reporter Match Locator locator super problem Reporter locator  ImportMatchLocatorParser MatchLocatorParser ImportMatchLocatorParser ProblemReporter problemReporter MatchLocator problemReporter
super problem Reporter locator protected void consume Single Type Import Declaration Name super consume Single Type Import Declaration Name this pattern Locator match this ast Stack this ast Ptr this node Set  problemReporter consumeSingleTypeImportDeclarationName consumeSingleTypeImportDeclarationName patternLocator astStack astPtr nodeSet
this pattern Locator match this ast Stack this ast Ptr this node Set protected void consume Type Import On Demand Declaration Name super consume Type Import On Demand Declaration Name this pattern Locator match this ast Stack this ast Ptr this node Set  patternLocator astStack astPtr nodeSet consumeTypeImportOnDemandDeclarationName consumeTypeImportOnDemandDeclarationName patternLocator astStack astPtr nodeSet

public Method Locator Method Pattern pattern super pattern this pattern pattern this is Declaration Of Referenced Methods Pattern this pattern instanceof Declaration Of Referenced Methods Pattern  MethodLocator MethodPattern isDeclarationOfReferencedMethodsPattern DeclarationOfReferencedMethodsPattern
public void initialize Polymorphic Search Match Locator locator try this all Super Declaring Type Names new Super Type Names Collector this pattern this pattern declaring Simple Name this pattern declaring Qualification locator this pattern declaring Type locator progress Monitor collect catch Java Model Exception e inaccurate matches will be found  initializePolymorphicSearch MatchLocator allSuperDeclaringTypeNames SuperTypeNamesCollector declaringSimpleName declaringQualification declaringType progressMonitor JavaModelException
Returns whether the code gen will use an invoke virtual for this message send or not protected boolean is Virtual Invoke Method Binding method Message Send message Send return method is Static method is Private message Send is Super Access  isVirtualInvoke MethodBinding MessageSend messageSend isStatic isPrivate messageSend isSuperAccess
public int match Field Declaration node Matching Node Set node Set SKIP IT public int match Method Declaration node Matching Node Set node Set if this pattern find Declarations return IMPOSSIBLE MATCH if matches Name this pattern selector node selector return IMPOSSIBLE MATCH if this pattern parameter Simple Names null int length this pattern parameter Simple Names length AST Node args node arguments int args Length args null 0 args length if length args Length return IMPOSSIBLE MATCH for int i 0 i args Length i if matches Type Reference this pattern parameter Simple Names i Argument args i type return IMPOSSIBLE MATCH if matches Type Reference this pattern return Simple Name node return Type return IMPOSSIBLE MATCH return node Set add Match node Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH  FieldDeclaration MatchingNodeSet nodeSet MethodDeclaration MatchingNodeSet nodeSet findDeclarations IMPOSSIBLE_MATCH matchesName IMPOSSIBLE_MATCH parameterSimpleNames parameterSimpleNames ASTNode argsLength argsLength IMPOSSIBLE_MATCH argsLength matchesTypeReference parameterSimpleNames IMPOSSIBLE_MATCH matchesTypeReference returnSimpleName returnType IMPOSSIBLE_MATCH nodeSet addMatch InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH
public int match Message Send node Matching Node Set node Set if this pattern find References return IMPOSSIBLE MATCH if matches Name this pattern selector node selector return IMPOSSIBLE MATCH if this pattern parameter Simple Names null int length this pattern parameter Simple Names length AST Node args node arguments int args Length args null 0 args length if length args Length return IMPOSSIBLE MATCH return node Set add Match node Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH  MessageSend MatchingNodeSet nodeSet findReferences IMPOSSIBLE_MATCH matchesName IMPOSSIBLE_MATCH parameterSimpleNames parameterSimpleNames ASTNode argsLength argsLength IMPOSSIBLE_MATCH nodeSet addMatch InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH
protected int match Container if this pattern find References need to look almost everywhere to find in javadocs return CLASS CONTAINER METHOD CONTAINER FIELD CONTAINER return CLASS CONTAINER  matchContainer findReferences CLASS_CONTAINER METHOD_CONTAINER FIELD_CONTAINER CLASS_CONTAINER
protected int match Method Method Binding method if matches Name this pattern selector method selector return IMPOSSIBLE MATCH int level ACCURATE MATCH look at return type only if declaring type is not specified if this pattern declaring Simple Name null int new Level resolve Level For Type this pattern return Simple Name this pattern return Qualification method return Type if level new Level if new Level IMPOSSIBLE MATCH return IMPOSSIBLE MATCH level new Level can only be downgraded parameter types int parameter Count this pattern parameter Simple Names null 1 this pattern parameter Simple Names length if parameter Count 1 if method parameters null return INACCURATE MATCH if parameter Count method parameters length return IMPOSSIBLE MATCH for int i 0 i parameter Count i int new Level resolve Level For Type this pattern parameter Simple Names i this pattern parameter Qualifications i method parameters i if level new Level if new Level IMPOSSIBLE MATCH return IMPOSSIBLE MATCH level new Level can only be downgraded return level  matchMethod MethodBinding matchesName IMPOSSIBLE_MATCH ACCURATE_MATCH declaringSimpleName newLevel resolveLevelForType returnSimpleName returnQualification returnType newLevel newLevel IMPOSSIBLE_MATCH IMPOSSIBLE_MATCH newLevel parameterCount parameterSimpleNames parameterSimpleNames parameterCount INACCURATE_MATCH parameterCount IMPOSSIBLE_MATCH parameterCount newLevel resolveLevelForType parameterSimpleNames parameterQualifications newLevel newLevel IMPOSSIBLE_MATCH IMPOSSIBLE_MATCH newLevel
see org eclipse jdt internal core search matching Pattern Locator match Report Reference org eclipse jdt internal compiler ast AST Node org eclipse jdt core I Java Element int org eclipse jdt internal core search matching Match Locator protected void match Report Reference AST Node reference I Java Element element int accuracy Match Locator locator throws Core Exception if this is Declaration Of Referenced Methods Pattern need exact match to be able to open on type ref if accuracy Search Match A ACCURATE return element that references the method must be included in the enclosing element Declaration Of Referenced Methods Pattern decl Pattern Declaration Of Referenced Methods Pattern this pattern while element null decl Pattern enclosing Element equals element element element get Parent if element null report Declaration Message Send reference binding locator decl Pattern known Methods else if this pattern find References reference instanceof Message Send int offset int Message Send reference name Source Position 32 Search Match match locator new Method Reference Match element accuracy offset reference source End offset 1 reference locator report match else int offset reference source Start Search Match match locator new Method Reference Match element accuracy offset reference source End offset 1 reference locator report match  PatternLocator matchReportReference ASTNode IJavaElement MatchLocator matchReportReference ASTNode IJavaElement MatchLocator CoreException isDeclarationOfReferencedMethodsPattern SearchMatch A_ACCURATE DeclarationOfReferencedMethodsPattern declPattern DeclarationOfReferencedMethodsPattern declPattern enclosingElement getParent reportDeclaration MessageSend declPattern knownMethods findReferences MessageSend MessageSend nameSourcePosition SearchMatch newMethodReferenceMatch sourceEnd sourceStart SearchMatch newMethodReferenceMatch sourceEnd
protected int reference Type return I Java Element METHOD  referenceType IJavaElement
protected void report Declaration Method Binding method Binding Match Locator locator Simple Set known Methods throws Core Exception Reference Binding declaring Class method Binding declaring Class I Type type locator lookup Type declaring Class if type null return case of a secondary type char binding Selector method Binding selector Type Binding parameters method Binding parameters int parameter Length parameters length String parameter Types new String parameter Length for int i 0 i parameter Length i parameter Types i Signature create Type Signature parameters i source Name false I Method method type get Method new String binding Selector parameter Types if known Methods includes method return known Methods add method I Resource resource type get Resource boolean is Binary type is Binary I Binary Type info null if is Binary if resource null resource type get Java Project get Project info locator get Binary Info org eclipse jdt internal core Class File type get Class File resource locator report Binary Member Declaration resource method info Search Match A ACCURATE else Class Scope scope Source Type Binding declaring Class scope if scope null Type Declaration type Decl scope reference Context Abstract Method Declaration method Decl null Abstract Method Declaration method Decls type Decl methods for int i 0 length method Decls length i length i if Char Operation equals binding Selector method Decls i selector method Decl method Decls i break if method Decl null int offset method Decl source Start Search Match match new Method Declaration Match method Search Match A ACCURATE offset method Decl source End offset 1 locator get Participant resource locator report match  reportDeclaration MethodBinding methodBinding MatchLocator SimpleSet knownMethods CoreException ReferenceBinding declaringClass methodBinding declaringClass IType lookupType declaringClass bindingSelector methodBinding TypeBinding methodBinding parameterLength parameterTypes parameterLength parameterLength parameterTypes createTypeSignature sourceName IMethod getMethod bindingSelector parameterTypes knownMethods knownMethods IResource getResource isBinary isBinary IBinaryType isBinary getJavaProject getProject getBinaryInfo ClassFile getClassFile reportBinaryMemberDeclaration SearchMatch A_ACCURATE ClassScope SourceTypeBinding declaringClass TypeDeclaration typeDecl referenceContext AbstractMethodDeclaration methodDecl AbstractMethodDeclaration methodDecls typeDecl methodDecls CharOperation bindingSelector methodDecls methodDecl methodDecls methodDecl methodDecl sourceStart SearchMatch MethodDeclarationMatch SearchMatch A_ACCURATE methodDecl sourceEnd getParticipant
public int resolve Level AST Node possible Matching Node if this pattern find References possible Matching Node instanceof Message Send return resolve Level Message Send possible Matching Node if this pattern find Declarations possible Matching Node instanceof Method Declaration return resolve Level Method Declaration possible Matching Node binding return IMPOSSIBLE MATCH  resolveLevel ASTNode possibleMatchingNode findReferences possibleMatchingNode MessageSend resolveLevel MessageSend possibleMatchingNode findDeclarations possibleMatchingNode MethodDeclaration resolveLevel MethodDeclaration possibleMatchingNode IMPOSSIBLE_MATCH
public int resolve Level Binding binding if binding null return INACCURATE MATCH if binding instanceof Method Binding return IMPOSSIBLE MATCH Method Binding method Method Binding binding int method Level match Method method if method Level IMPOSSIBLE MATCH return IMPOSSIBLE MATCH declaring type char qualified Pattern qualified Pattern this pattern declaring Simple Name this pattern declaring Qualification if qualified Pattern null return method Level since any declaring class will do int declaring Level method is Static method is Private resolve Level As Subtype qualified Pattern method declaring Class resolve Level For Type qualified Pattern method declaring Class return method Level declaring Level declaring Level method Level return the weaker match  resolveLevel INACCURATE_MATCH MethodBinding IMPOSSIBLE_MATCH MethodBinding MethodBinding methodLevel matchMethod methodLevel IMPOSSIBLE_MATCH IMPOSSIBLE_MATCH qualifiedPattern qualifiedPattern declaringSimpleName declaringQualification qualifiedPattern methodLevel declaringLevel isStatic isPrivate resolveLevelAsSubtype qualifiedPattern declaringClass resolveLevelForType qualifiedPattern declaringClass methodLevel declaringLevel declaringLevel methodLevel
protected int resolve Level Message Send message Send Method Binding method message Send binding if method null return INACCURATE MATCH int method Level match Method method if method Level IMPOSSIBLE MATCH return IMPOSSIBLE MATCH receiver type char qualified Pattern qualified Pattern this pattern declaring Simple Name this pattern declaring Qualification if qualified Pattern null return method Level since any declaring class will do int declaring Level if is Virtual Invoke method message Send message Send receiver Type instanceof Array Binding declaring Level resolve Level As Subtype qualified Pattern method declaring Class if declaring Level IMPOSSIBLE MATCH if method declaring Class null this all Super Declaring Type Names null declaring Level INACCURATE MATCH else char compound Name method declaring Class compound Name for int i 0 max this all Super Declaring Type Names length i max i if Char Operation equals this all Super Declaring Type Names i compound Name return method Level since this is an ACCURATE MATCH so return the possibly weaker match else declaring Level resolve Level For Type qualified Pattern method declaring Class return method Level declaring Level declaring Level method Level return the weaker match  resolveLevel MessageSend messageSend MethodBinding messageSend INACCURATE_MATCH methodLevel matchMethod methodLevel IMPOSSIBLE_MATCH IMPOSSIBLE_MATCH qualifiedPattern qualifiedPattern declaringSimpleName declaringQualification qualifiedPattern methodLevel declaringLevel isVirtualInvoke messageSend messageSend receiverType ArrayBinding declaringLevel resolveLevelAsSubtype qualifiedPattern declaringClass declaringLevel IMPOSSIBLE_MATCH declaringClass allSuperDeclaringTypeNames declaringLevel INACCURATE_MATCH compoundName declaringClass compoundName allSuperDeclaringTypeNames CharOperation allSuperDeclaringTypeNames compoundName methodLevel ACCURATE_MATCH declaringLevel resolveLevelForType qualifiedPattern declaringClass methodLevel declaringLevel declaringLevel methodLevel
Returns whether the given reference type binding matches or is a subtype of a type that matches the given qualified pattern Returns ACCURATE MATCH if it does Returns INACCURATE MATCH if resolve fails Returns IMPOSSIBLE MATCH if it doesn t protected int resolve Level As Subtype char qualified Pattern Reference Binding type if type null return INACCURATE MATCH int level resolve Level For Type qualified Pattern type if level IMPOSSIBLE MATCH return level matches superclass if type is Interface Char Operation equals type compound Name Type Constants JAVA LANG OBJECT level resolve Level As Subtype qualified Pattern type superclass if level IMPOSSIBLE MATCH return level matches interfaces Reference Binding interfaces type super Interfaces if interfaces null return INACCURATE MATCH for int i 0 i interfaces length i level resolve Level As Subtype qualified Pattern interfaces i if level IMPOSSIBLE MATCH return level return IMPOSSIBLE MATCH  ACCURATE_MATCH INACCURATE_MATCH IMPOSSIBLE_MATCH resolveLevelAsSubtype qualifiedPattern ReferenceBinding INACCURATE_MATCH resolveLevelForType qualifiedPattern IMPOSSIBLE_MATCH isInterface CharOperation compoundName TypeConstants JAVA_LANG_OBJECT resolveLevelAsSubtype qualifiedPattern IMPOSSIBLE_MATCH ReferenceBinding superInterfaces INACCURATE_MATCH resolveLevelAsSubtype qualifiedPattern IMPOSSIBLE_MATCH IMPOSSIBLE_MATCH
return IMPOSSIBLE MATCH public String to String return Locator for this pattern to String NON NLS 1  IMPOSSIBLE_MATCH toString toString

Method entries are encoded as selector Arity e g foo 0 public static char create Index Key char selector int arg Count char count Chars arg Count 10 COUNTS arg Count String value Of arg Count to Char Array NON NLS 1 return Char Operation concat selector count Chars  createIndexKey argCount countChars argCount argCount valueOf argCount toCharArray CharOperation countChars
public Method Pattern boolean find Declarations boolean find References char selector char declaring Qualification char declaring Simple Name char return Qualification char return Simple Name char parameter Qualifications char parameter Simple Names I Type declaring Type int match Rule this match Rule this find Declarations find Declarations this find References find References this selector is Case Sensitive selector Char Operation to Lower Case selector this declaring Qualification is Case Sensitive declaring Qualification Char Operation to Lower Case declaring Qualification this declaring Simple Name is Case Sensitive declaring Simple Name Char Operation to Lower Case declaring Simple Name this return Qualification is Case Sensitive return Qualification Char Operation to Lower Case return Qualification this return Simple Name is Case Sensitive return Simple Name Char Operation to Lower Case return Simple Name if parameter Simple Names null this parameter Count parameter Simple Names length this parameter Qualifications new char this parameter Count this parameter Simple Names new char this parameter Count for int i 0 i this parameter Count i this parameter Qualifications i is Case Sensitive parameter Qualifications i Char Operation to Lower Case parameter Qualifications i this parameter Simple Names i is Case Sensitive parameter Simple Names i Char Operation to Lower Case parameter Simple Names i else this parameter Count 1 this declaring Type declaring Type Internal Search Pattern this must Resolve must Resolve  MethodPattern findDeclarations findReferences declaringQualification declaringSimpleName returnQualification returnSimpleName parameterQualifications parameterSimpleNames IType declaringType matchRule matchRule findDeclarations findDeclarations findReferences findReferences isCaseSensitive CharOperation toLowerCase declaringQualification isCaseSensitive declaringQualification CharOperation toLowerCase declaringQualification declaringSimpleName isCaseSensitive declaringSimpleName CharOperation toLowerCase declaringSimpleName returnQualification isCaseSensitive returnQualification CharOperation toLowerCase returnQualification returnSimpleName isCaseSensitive returnSimpleName CharOperation toLowerCase returnSimpleName parameterSimpleNames parameterCount parameterSimpleNames parameterQualifications parameterCount parameterSimpleNames parameterCount parameterCount parameterQualifications isCaseSensitive parameterQualifications CharOperation toLowerCase parameterQualifications parameterSimpleNames isCaseSensitive parameterSimpleNames CharOperation toLowerCase parameterSimpleNames parameterCount declaringType declaringType InternalSearchPattern mustResolve mustResolve
Internal Search Pattern this must Resolve must Resolve Method Pattern int match Rule super METHOD PATTERN match Rule  InternalSearchPattern mustResolve mustResolve MethodPattern matchRule METHOD_PATTERN matchRule
public void decode Index Key char key int size key length int last Separator Index Char Operation last Index Of SEPARATOR key this parameter Count Integer parse Int new String key last Separator Index 1 size last Separator Index 1 this selector Char Operation subarray key 0 last Separator Index  decodeIndexKey lastSeparatorIndex CharOperation lastIndexOf parameterCount parseInt lastSeparatorIndex lastSeparatorIndex CharOperation lastSeparatorIndex
this selector Char Operation subarray key 0 last Separator Index public Search Pattern get Blank Pattern return new Method Pattern R EXACT MATCH R CASE SENSITIVE  CharOperation lastSeparatorIndex SearchPattern getBlankPattern MethodPattern R_EXACT_MATCH R_CASE_SENSITIVE
public char get Index Categories if this find References return this find Declarations REF AND DECL CATEGORIES REF CATEGORIES if this find Declarations return DECL CATEGORIES return Char Operation NO CHAR CHAR  getIndexCategories findReferences findDeclarations REF_AND_DECL_CATEGORIES REF_CATEGORIES findDeclarations DECL_CATEGORIES CharOperation NO_CHAR_CHAR
return Char Operation NO CHAR CHAR boolean is Polymorphic Search return this find References  CharOperation NO_CHAR_CHAR isPolymorphicSearch findReferences
public boolean matches Decoded Key Search Pattern decoded Pattern Method Pattern pattern Method Pattern decoded Pattern return this parameter Count pattern parameter Count this parameter Count 1 matches Name this selector pattern selector  matchesDecodedKey SearchPattern decodedPattern MethodPattern MethodPattern decodedPattern parameterCount parameterCount parameterCount matchesName
Returns whether a method declaration or message send must be resolved to find out if this method pattern matches it protected boolean must Resolve declaring type If declaring type is specified even with simple name always resolves if declaring Simple Name null declaring Qualification null return true return type If return type is specified even with simple name always resolves if return Simple Name null return Qualification null return true parameter types if parameter Simple Names null for int i 0 max parameter Simple Names length i max i if parameter Qualifications i null return true return false  mustResolve declaringSimpleName declaringQualification returnSimpleName returnQualification parameterSimpleNames parameterSimpleNames parameterQualifications
Entry Result query In Index index throws IO Exception char key this selector can be null int match Rule get Match Rule switch get Match Mode case R EXACT MATCH if this selector null this parameter Count 0 key create Index Key this selector this parameter Count else do a prefix query with the selector match Rule match Rule R EXACT MATCH R PREFIX MATCH break case R PREFIX MATCH do a prefix query with the selector break case R PATTERN MATCH if this parameter Count 0 key create Index Key this selector null ONE STAR this selector this parameter Count else if this selector null this selector this selector length 1 key Char Operation concat this selector ONE STAR SEPARATOR else do a pattern query with just the selector break return index query get Index Categories key match Rule match rule is irrelevant when the key is null  EntryResult queryIn IOException matchRule getMatchRule getMatchMode R_EXACT_MATCH parameterCount createIndexKey parameterCount matchRule matchRule R_EXACT_MATCH R_PREFIX_MATCH R_PREFIX_MATCH R_PATTERN_MATCH parameterCount createIndexKey ONE_STAR parameterCount CharOperation ONE_STAR getIndexCategories matchRule
public String to String String Buffer buffer new String Buffer 20 if this find Declarations buffer append this find References Method Combined Pattern NON NLS 1 Method Declaration Pattern NON NLS 1 else buffer append Method Reference Pattern NON NLS 1 if declaring Qualification null buffer append declaring Qualification append if declaring Simple Name null buffer append declaring Simple Name append else if declaring Qualification null buffer append NON NLS 1 if selector null buffer append selector else buffer append NON NLS 1 buffer append if parameter Simple Names null buffer append NON NLS 1 else for int i 0 max parameter Simple Names length i max i if i 0 buffer append NON NLS 1 if parameter Qualifications i null buffer append parameter Qualifications i append if parameter Simple Names i null buffer append else buffer append parameter Simple Names i buffer append if return Qualification null buffer append append return Qualification append NON NLS 1 else if return Simple Name null buffer append NON NLS 1 if return Simple Name null buffer append return Simple Name else if return Qualification null buffer append NON NLS 1 buffer append NON NLS 1 switch get Match Mode case R EXACT MATCH buffer append exact match NON NLS 1 break case R PREFIX MATCH buffer append prefix match NON NLS 1 break case R PATTERN MATCH buffer append pattern match NON NLS 1 break buffer append is Case Sensitive case sensitive case insensitive NON NLS 1 NON NLS 2 return buffer to String  toString StringBuffer StringBuffer findDeclarations findReferences MethodCombinedPattern MethodDeclarationPattern MethodReferencePattern declaringQualification declaringQualification declaringSimpleName declaringSimpleName declaringQualification parameterSimpleNames parameterSimpleNames parameterQualifications parameterQualifications parameterSimpleNames parameterSimpleNames returnQualification returnQualification returnSimpleName returnSimpleName returnSimpleName returnQualification getMatchMode R_EXACT_MATCH R_PREFIX_MATCH R_PATTERN_MATCH isCaseSensitive toString

public Or Locator Or Pattern pattern super pattern Search Pattern patterns pattern patterns int length patterns length this pattern Locators new Pattern Locator length for int i 0 i length i this pattern Locators i Pattern Locator pattern Locator patterns i  OrLocator OrPattern SearchPattern patternLocators PatternLocator patternLocators PatternLocator patternLocator
this pattern Locators i Pattern Locator pattern Locator patterns i public void initialize Polymorphic Search Match Locator locator for int i 0 length this pattern Locators length i length i this pattern Locators i initialize Polymorphic Search locator  patternLocators PatternLocator patternLocator initializePolymorphicSearch MatchLocator patternLocators patternLocators initializePolymorphicSearch
public int match AST Node node Matching Node Set node Set int level IMPOSSIBLE MATCH for int i 0 length this pattern Locators length i length i int new Level this pattern Locators i match node node Set if new Level level if new Level ACCURATE MATCH return ACCURATE MATCH level new Level return level  ASTNode MatchingNodeSet nodeSet IMPOSSIBLE_MATCH patternLocators newLevel patternLocators nodeSet newLevel newLevel ACCURATE_MATCH ACCURATE_MATCH newLevel
public int match Constructor Declaration node Matching Node Set node Set int level IMPOSSIBLE MATCH for int i 0 length this pattern Locators length i length i int new Level this pattern Locators i match node node Set if new Level level if new Level ACCURATE MATCH return ACCURATE MATCH level new Level return level  ConstructorDeclaration MatchingNodeSet nodeSet IMPOSSIBLE_MATCH patternLocators newLevel patternLocators nodeSet newLevel newLevel ACCURATE_MATCH ACCURATE_MATCH newLevel
public int match Expression node Matching Node Set node Set int level IMPOSSIBLE MATCH for int i 0 length this pattern Locators length i length i int new Level this pattern Locators i match node node Set if new Level level if new Level ACCURATE MATCH return ACCURATE MATCH level new Level return level  MatchingNodeSet nodeSet IMPOSSIBLE_MATCH patternLocators newLevel patternLocators nodeSet newLevel newLevel ACCURATE_MATCH ACCURATE_MATCH newLevel
public int match Field Declaration node Matching Node Set node Set int level IMPOSSIBLE MATCH for int i 0 length this pattern Locators length i length i int new Level this pattern Locators i match node node Set if new Level level if new Level ACCURATE MATCH return ACCURATE MATCH level new Level return level  FieldDeclaration MatchingNodeSet nodeSet IMPOSSIBLE_MATCH patternLocators newLevel patternLocators nodeSet newLevel newLevel ACCURATE_MATCH ACCURATE_MATCH newLevel
public int match Local Declaration node Matching Node Set node Set int level IMPOSSIBLE MATCH for int i 0 length this pattern Locators length i length i int new Level this pattern Locators i match node node Set if new Level level if new Level ACCURATE MATCH return ACCURATE MATCH level new Level return level  LocalDeclaration MatchingNodeSet nodeSet IMPOSSIBLE_MATCH patternLocators newLevel patternLocators nodeSet newLevel newLevel ACCURATE_MATCH ACCURATE_MATCH newLevel
public int match Method Declaration node Matching Node Set node Set int level IMPOSSIBLE MATCH for int i 0 length this pattern Locators length i length i int new Level this pattern Locators i match node node Set if new Level level if new Level ACCURATE MATCH return ACCURATE MATCH level new Level return level  MethodDeclaration MatchingNodeSet nodeSet IMPOSSIBLE_MATCH patternLocators newLevel patternLocators nodeSet newLevel newLevel ACCURATE_MATCH ACCURATE_MATCH newLevel
public int match Message Send node Matching Node Set node Set int level IMPOSSIBLE MATCH for int i 0 length this pattern Locators length i length i int new Level this pattern Locators i match node node Set if new Level level if new Level ACCURATE MATCH return ACCURATE MATCH level new Level return level  MessageSend MatchingNodeSet nodeSet IMPOSSIBLE_MATCH patternLocators newLevel patternLocators nodeSet newLevel newLevel ACCURATE_MATCH ACCURATE_MATCH newLevel
public int match Reference node Matching Node Set node Set int level IMPOSSIBLE MATCH for int i 0 length this pattern Locators length i length i int new Level this pattern Locators i match node node Set if new Level level if new Level ACCURATE MATCH return ACCURATE MATCH level new Level return level  MatchingNodeSet nodeSet IMPOSSIBLE_MATCH patternLocators newLevel patternLocators nodeSet newLevel newLevel ACCURATE_MATCH ACCURATE_MATCH newLevel
public int match Type Declaration node Matching Node Set node Set int level IMPOSSIBLE MATCH for int i 0 length this pattern Locators length i length i int new Level this pattern Locators i match node node Set if new Level level if new Level ACCURATE MATCH return ACCURATE MATCH level new Level return level  TypeDeclaration MatchingNodeSet nodeSet IMPOSSIBLE_MATCH patternLocators newLevel patternLocators nodeSet newLevel newLevel ACCURATE_MATCH ACCURATE_MATCH newLevel
public int match Type Reference node Matching Node Set node Set int level IMPOSSIBLE MATCH for int i 0 length this pattern Locators length i length i int new Level this pattern Locators i match node node Set if new Level level if new Level ACCURATE MATCH return ACCURATE MATCH level new Level return level  TypeReference MatchingNodeSet nodeSet IMPOSSIBLE_MATCH patternLocators newLevel patternLocators nodeSet newLevel newLevel ACCURATE_MATCH ACCURATE_MATCH newLevel
protected int match Container int result 0 for int i 0 length this pattern Locators length i length i result this pattern Locators i match Container return result  matchContainer patternLocators patternLocators matchContainer
protected void match Level And Report Import Ref Import Reference import Ref Binding binding Match Locator locator throws Core Exception Pattern Locator closest Pattern null int level IMPOSSIBLE MATCH for int i 0 length this pattern Locators length i length i Pattern Locator pattern Locator this pattern Locators i int new Level pattern Locator reference Type 0 IMPOSSIBLE MATCH pattern Locator resolve Level binding if new Level level closest Pattern pattern Locator if new Level ACCURATE MATCH break level new Level if closest Pattern null closest Pattern match Level And Report Import Ref import Ref binding locator  matchLevelAndReportImportRef ImportReference importRef MatchLocator CoreException PatternLocator closestPattern IMPOSSIBLE_MATCH patternLocators PatternLocator patternLocator patternLocators newLevel patternLocator referenceType IMPOSSIBLE_MATCH patternLocator resolveLevel newLevel closestPattern patternLocator newLevel ACCURATE_MATCH newLevel closestPattern closestPattern matchLevelAndReportImportRef importRef
protected void match Report Import Ref Import Reference import Ref Binding binding I Java Element element int accuracy Match Locator locator throws Core Exception Pattern Locator closest Pattern null int level IMPOSSIBLE MATCH for int i 0 length this pattern Locators length i length i int new Level this pattern Locators i match Level import Ref if new Level level closest Pattern this pattern Locators i if new Level ACCURATE MATCH break level new Level if closest Pattern null closest Pattern match Report Import Ref import Ref binding element accuracy locator  matchReportImportRef ImportReference importRef IJavaElement MatchLocator CoreException PatternLocator closestPattern IMPOSSIBLE_MATCH patternLocators newLevel patternLocators matchLevel importRef newLevel closestPattern patternLocators newLevel ACCURATE_MATCH newLevel closestPattern closestPattern matchReportImportRef importRef
protected void match Report Reference AST Node reference I Java Element element int accuracy Match Locator locator throws Core Exception Pattern Locator closest Pattern null int level IMPOSSIBLE MATCH for int i 0 length this pattern Locators length i length i Pattern Locator pattern Locator this pattern Locators i int new Level pattern Locator reference Type 0 IMPOSSIBLE MATCH pattern Locator resolve Level reference if new Level level closest Pattern pattern Locator if new Level ACCURATE MATCH break level new Level if closest Pattern null closest Pattern match Report Reference reference element accuracy locator  matchReportReference ASTNode IJavaElement MatchLocator CoreException PatternLocator closestPattern IMPOSSIBLE_MATCH patternLocators PatternLocator patternLocator patternLocators newLevel patternLocator referenceType IMPOSSIBLE_MATCH patternLocator resolveLevel newLevel closestPattern patternLocator newLevel ACCURATE_MATCH newLevel closestPattern closestPattern matchReportReference
public int resolve Level AST Node node int level IMPOSSIBLE MATCH for int i 0 length this pattern Locators length i length i int new Level this pattern Locators i resolve Level node if new Level level if new Level ACCURATE MATCH return ACCURATE MATCH level new Level want to answer the stronger match return level  resolveLevel ASTNode IMPOSSIBLE_MATCH patternLocators newLevel patternLocators resolveLevel newLevel newLevel ACCURATE_MATCH ACCURATE_MATCH newLevel
public int resolve Level Binding binding int level IMPOSSIBLE MATCH for int i 0 length this pattern Locators length i length i int new Level this pattern Locators i resolve Level binding if new Level level if new Level ACCURATE MATCH return ACCURATE MATCH level new Level want to answer the stronger match return level  resolveLevel IMPOSSIBLE_MATCH patternLocators newLevel patternLocators resolveLevel newLevel newLevel ACCURATE_MATCH ACCURATE_MATCH newLevel

public Or Pattern Search Pattern left Pattern Search Pattern right Pattern super Math max left Pattern get Match Rule right Pattern get Match Rule Internal Search Pattern this kind OR PATTERN Internal Search Pattern this must Resolve Internal Search Pattern left Pattern must Resolve Internal Search Pattern right Pattern must Resolve Search Pattern left Patterns left Pattern instanceof Or Pattern Or Pattern left Pattern patterns null Search Pattern right Patterns right Pattern instanceof Or Pattern Or Pattern right Pattern patterns null int left Size left Patterns null 1 left Patterns length int right Size right Patterns null 1 right Patterns length this patterns new Search Pattern left Size right Size if left Patterns null this patterns 0 left Pattern else System arraycopy left Patterns 0 this patterns 0 left Size if right Patterns null this patterns left Size right Pattern else System arraycopy right Patterns 0 this patterns left Size right Size  OrPattern SearchPattern leftPattern SearchPattern rightPattern leftPattern getMatchRule rightPattern getMatchRule InternalSearchPattern OR_PATTERN InternalSearchPattern mustResolve InternalSearchPattern leftPattern mustResolve InternalSearchPattern rightPattern mustResolve SearchPattern leftPatterns leftPattern OrPattern OrPattern leftPattern SearchPattern rightPatterns rightPattern OrPattern OrPattern rightPattern leftSize leftPatterns leftPatterns rightSize rightPatterns rightPatterns SearchPattern leftSize rightSize leftPatterns leftPattern leftPatterns leftSize rightPatterns leftSize rightPattern rightPatterns leftSize rightSize
void find Index Matches Index index Index Query Requestor requestor Search Participant participant I Java Search Scope scope I Progress Monitor progress Monitor throws IO Exception per construction OR pattern can only be used with a Path Collector which already gather results using a set try index start Query for int i 0 length this patterns length i length i Internal Search Pattern this patterns i find Index Matches index requestor participant scope progress Monitor finally index stop Query  findIndexMatches IndexQueryRequestor SearchParticipant IJavaSearchScope IProgressMonitor progressMonitor IOException PathCollector startQuery InternalSearchPattern findIndexMatches progressMonitor stopQuery
public Search Pattern get Blank Pattern return null  SearchPattern getBlankPattern
boolean is Polymorphic Search for int i 0 length this patterns length i length i if Internal Search Pattern this patterns i is Polymorphic Search return true return false  isPolymorphicSearch InternalSearchPattern isPolymorphicSearch
public String to String String Buffer buffer new String Buffer buffer append this patterns 0 to String for int i 1 length this patterns length i length i buffer append n NON NLS 1 buffer append this patterns i to String return buffer to String  toString StringBuffer StringBuffer toString toString toString

public Package Declaration Locator Package Declaration Pattern pattern super pattern this pattern pattern  PackageDeclarationLocator PackageDeclarationPattern
this pattern pattern protected int match Container return 0  matchContainer
return 0 public String to String return Locator for this pattern to String NON NLS 1  toString toString

protected char pkg Name public Package Declaration Pattern char pkg Name int match Rule super PKG DECL PATTERN match Rule this pkg Name pkg Name  pkgName PackageDeclarationPattern pkgName matchRule PKG_DECL_PATTERN matchRule pkgName pkgName
this pkg Name pkg Name Entry Result query In Index index package declarations are not indexed return null  pkgName pkgName EntryResult queryIn
public String to String String Buffer buffer new String Buffer 20 buffer append Package Declaration Pattern NON NLS 1 if this pkg Name null buffer append this pkg Name else buffer append NON NLS 1 buffer append NON NLS 1 switch get Match Mode case R EXACT MATCH buffer append exact match NON NLS 1 break case R PREFIX MATCH buffer append prefix match NON NLS 1 break case R PATTERN MATCH buffer append pattern match NON NLS 1 break if is Case Sensitive buffer append case sensitive NON NLS 1 else buffer append case insensitive NON NLS 1 return buffer to String  toString StringBuffer StringBuffer PackageDeclarationPattern pkgName pkgName getMatchMode R_EXACT_MATCH R_PREFIX_MATCH R_PATTERN_MATCH isCaseSensitive toString

check that referenced type is actually defined in this package fragment public static boolean is Declaring Package Fragment I Package Fragment package Fragment Reference Binding type Binding char file Name type Binding get File Name if file Name null retrieve the actual file name from the full path sources are generally only containing it already Char Operation replace file Name file Name Char Operation last Segment file Name try switch package Fragment get Kind case I Package Fragment Root K SOURCE if Util is Java File Name file Name package Fragment get Compilation Unit new String file Name exists return false unit doesn t live in selected package break case I Package Fragment Root K BINARY if Util is Java File Name file Name binary with attached source int length file Name length System arraycopy file Name 0 file Name new char length 0 length 4 copy all but extension System arraycopy Suffix Constants SUFFIX class 0 file Name length 4 4 if Util is Class File Name file Name package Fragment get Class File new String file Name exists return false classfile doesn t live in selected package break catch Java Model Exception e unable to determine kind tolerate this match return true by default do not eliminate  isDeclaringPackageFragment IPackageFragment packageFragment ReferenceBinding typeBinding fileName typeBinding getFileName fileName CharOperation fileName fileName CharOperation lastSegment fileName packageFragment getKind IPackageFragmentRoot K_SOURCE isJavaFileName fileName packageFragment getCompilationUnit fileName IPackageFragmentRoot K_BINARY isJavaFileName fileName fileName fileName fileName SuffixConstants SUFFIX_class fileName isClassFileName fileName packageFragment getClassFile fileName JavaModelException
public Package Reference Locator Package Reference Pattern pattern super pattern this pattern pattern  PackageReferenceLocator PackageReferencePattern
public int match AST Node node Matching Node Set node Set interested in Import Reference if node instanceof Import Reference return IMPOSSIBLE MATCH return node Set add Match node match Level Import Reference node  ASTNode MatchingNodeSet nodeSet ImportReference ImportReference IMPOSSIBLE_MATCH nodeSet addMatch matchLevel ImportReference
public int match Message Send node Matching Node Set node Set SKIP IT public int match Reference node Matching Node Set node Set interested in Qualified Name Reference if node instanceof Qualified Name Reference return IMPOSSIBLE MATCH return node Set add Match node match Level For Tokens Qualified Name Reference node tokens  MessageSend MatchingNodeSet nodeSet MatchingNodeSet nodeSet QualifiedNameReference QualifiedNameReference IMPOSSIBLE_MATCH nodeSet addMatch matchLevelForTokens QualifiedNameReference
public int match Type Declaration node Matching Node Set node Set SKIP IT public int match Type Reference node Matching Node Set node Set interested in Qualified Type Reference only if node instanceof Javadoc Single Type Reference char tokens new char Javadoc Single Type Reference node token return node Set add Match node match Level For Tokens tokens if node instanceof Qualified Type Reference return IMPOSSIBLE MATCH return node Set add Match node match Level For Tokens Qualified Type Reference node tokens  TypeDeclaration MatchingNodeSet nodeSet TypeReference MatchingNodeSet nodeSet QualifiedTypeReference JavadocSingleTypeReference JavadocSingleTypeReference nodeSet addMatch matchLevelForTokens QualifiedTypeReference IMPOSSIBLE_MATCH nodeSet addMatch matchLevelForTokens QualifiedTypeReference
protected int match Level Import Reference import Ref if import Ref on Demand return match Level For Tokens import Ref tokens return matches Name this pattern pkg Name Char Operation concat With import Ref tokens ACCURATE MATCH IMPOSSIBLE MATCH  matchLevel ImportReference importRef importRef onDemand matchLevelForTokens importRef matchesName pkgName CharOperation concatWith importRef ACCURATE_MATCH IMPOSSIBLE_MATCH
protected int match Level For Tokens char tokens if this pattern pkg Name null return ACCURATE MATCH switch this match Mode case Search Pattern R EXACT MATCH case Search Pattern R PREFIX MATCH if Char Operation prefix Equals this pattern pkg Name Char Operation concat With tokens this is Case Sensitive return POSSIBLE MATCH break case Search Pattern R PATTERN MATCH char pattern Name this pattern pkg Name this pattern pkg Name length 1 this pattern pkg Name Char Operation concat this pattern pkg Name to Char Array NON NLS 1 if Char Operation match pattern Name Char Operation concat With tokens this is Case Sensitive return POSSIBLE MATCH break return IMPOSSIBLE MATCH  matchLevelForTokens pkgName ACCURATE_MATCH matchMode SearchPattern R_EXACT_MATCH SearchPattern R_PREFIX_MATCH CharOperation prefixEquals pkgName CharOperation concatWith isCaseSensitive POSSIBLE_MATCH SearchPattern R_PATTERN_MATCH patternName pkgName pkgName pkgName CharOperation pkgName toCharArray CharOperation patternName CharOperation concatWith isCaseSensitive POSSIBLE_MATCH IMPOSSIBLE_MATCH
protected void match Report Import Ref Import Reference import Ref Binding binding I Java Element element int accuracy Match Locator locator throws Core Exception if binding null this match Report Reference import Ref element accuracy locator else if locator encloses element long positions import Ref source Positions int last positions length 1 if binding instanceof Problem Reference Binding binding Problem Reference Binding binding original if binding instanceof Reference Binding Package Binding pkg Binding Reference Binding binding f Package if pkg Binding null last pkg Binding compound Name length if binding instanceof Package Binding last Package Binding binding compound Name length int start int positions 0 32 int end int positions last 1 Search Match match locator new Package Reference Match element accuracy start end start 1 import Ref locator report match  matchReportImportRef ImportReference importRef IJavaElement MatchLocator CoreException matchReportReference importRef importRef sourcePositions ProblemReferenceBinding ProblemReferenceBinding ReferenceBinding PackageBinding pkgBinding ReferenceBinding fPackage pkgBinding pkgBinding compoundName PackageBinding PackageBinding compoundName SearchMatch newPackageReferenceMatch importRef
protected void match Report Reference AST Node reference I Java Element element int accuracy Match Locator locator throws Core Exception long positions null int last 1 if reference instanceof Import Reference Import Reference import Ref Import Reference reference positions import Ref source Positions last import Ref on Demand positions length positions length 1 else Type Binding type Binding null if reference instanceof Qualified Name Reference Qualified Name Reference q Name Ref Qualified Name Reference reference positions q Name Ref source Positions switch q Name Ref bits AST Node Restrictive FlagMASK case Binding Ids FIELD reading a field type Binding q Name Ref actual Receiver Type break case Binding Ids TYPE only type if q Name Ref binding instanceof Type Binding type Binding Type Binding q Name Ref binding break case Binding Ids VARIABLE unbound cases case Binding Ids TYPE Binding Ids VARIABLE Binding binding q Name Ref binding if binding instanceof Type Binding type Binding Type Binding binding else if binding instanceof Problem Field Binding type Binding q Name Ref actual Receiver Type last q Name Ref tokens length q Name Ref other Bindings null 2 q Name Ref other Bindings length 2 else if binding instanceof Problem Binding Problem Binding pb Binding Problem Binding binding type Binding pb Binding search Type last Char Operation occurences Of pb Binding name break else if reference instanceof Qualified Type Reference Qualified Type Reference q Type Ref Qualified Type Reference reference positions q Type Ref source Positions type Binding q Type Ref resolved Type if type Binding instanceof Array Binding type Binding Array Binding type Binding leaf Component Type if type Binding instanceof Problem Reference Binding type Binding Problem Reference Binding type Binding original if type Binding instanceof Reference Binding Package Binding pkg Binding Reference Binding type Binding f Package if pkg Binding null last pkg Binding compound Name length if last 1 last this pattern segments length if last 0 return if last positions length last positions length int source Start int positions 0 32 int source End int positions last 1 Search Match match locator new Package Reference Match element accuracy source Start source End source Start 1 reference locator report match  matchReportReference ASTNode IJavaElement MatchLocator CoreException ImportReference ImportReference importRef ImportReference importRef sourcePositions importRef onDemand TypeBinding typeBinding QualifiedNameReference QualifiedNameReference qNameRef QualifiedNameReference qNameRef sourcePositions qNameRef ASTNode RestrictiveFlagMASK BindingIds typeBinding qNameRef actualReceiverType BindingIds qNameRef TypeBinding typeBinding TypeBinding qNameRef BindingIds BindingIds BindingIds qNameRef TypeBinding typeBinding TypeBinding ProblemFieldBinding typeBinding qNameRef actualReceiverType qNameRef qNameRef otherBindings qNameRef otherBindings ProblemBinding ProblemBinding pbBinding ProblemBinding typeBinding pbBinding searchType CharOperation occurencesOf pbBinding QualifiedTypeReference QualifiedTypeReference qTypeRef QualifiedTypeReference qTypeRef sourcePositions typeBinding qTypeRef resolvedType typeBinding ArrayBinding typeBinding ArrayBinding typeBinding leafComponentType typeBinding ProblemReferenceBinding typeBinding ProblemReferenceBinding typeBinding typeBinding ReferenceBinding PackageBinding pkgBinding ReferenceBinding typeBinding fPackage pkgBinding pkgBinding compoundName sourceStart sourceEnd SearchMatch newPackageReferenceMatch sourceStart sourceEnd sourceStart
locator report match protected int reference Type return I Java Element PACKAGE FRAGMENT  referenceType IJavaElement PACKAGE_FRAGMENT
public int resolve Level AST Node node if node instanceof Qualified Type Reference return resolve Level Qualified Type Reference node resolved Type if node instanceof Qualified Name Reference return this resolve Level Qualified Name Reference node if node instanceof Import Reference Not called when resolve is true see Matching Node Set report Matching unit return IMPOSSIBLE MATCH  resolveLevel ASTNode QualifiedTypeReference resolveLevel QualifiedTypeReference resolvedType QualifiedNameReference resolveLevel QualifiedNameReference ImportReference MatchingNodeSet reportMatching IMPOSSIBLE_MATCH
public int resolve Level Binding binding if binding null return INACCURATE MATCH char compound Name null if binding instanceof Import Binding compound Name Import Binding binding compound Name else if binding instanceof Package Binding compound Name Package Binding binding compound Name else if binding instanceof Array Binding binding Array Binding binding leaf Component Type if binding instanceof Problem Reference Binding binding Problem Reference Binding binding original if binding null return INACCURATE MATCH if binding instanceof Reference Binding Package Binding pkg Binding Reference Binding binding f Package if pkg Binding null return INACCURATE MATCH compound Name pkg Binding compound Name if compound Name null matches Name this pattern pkg Name Char Operation concat With compound Name if Internal Search Pattern this pattern focus instanceof I Package Fragment binding instanceof Reference Binding check that type is located inside this instance of a package fragment if is Declaring Package Fragment I Package Fragment Internal Search Pattern this pattern focus Reference Binding binding return IMPOSSIBLE MATCH return ACCURATE MATCH else return IMPOSSIBLE MATCH  resolveLevel INACCURATE_MATCH compoundName ImportBinding compoundName ImportBinding compoundName PackageBinding compoundName PackageBinding compoundName ArrayBinding ArrayBinding leafComponentType ProblemReferenceBinding ProblemReferenceBinding INACCURATE_MATCH ReferenceBinding PackageBinding pkgBinding ReferenceBinding fPackage pkgBinding INACCURATE_MATCH compoundName pkgBinding compoundName compoundName matchesName pkgName CharOperation concatWith compoundName InternalSearchPattern IPackageFragment ReferenceBinding isDeclaringPackageFragment IPackageFragment InternalSearchPattern ReferenceBinding IMPOSSIBLE_MATCH ACCURATE_MATCH IMPOSSIBLE_MATCH
protected int resolve Level Qualified Name Reference q Name Ref Type Binding type Binding null switch q Name Ref bits AST Node Restrictive FlagMASK case Binding Ids FIELD reading a field if q Name Ref tokens length q Name Ref other Bindings null 3 q Name Ref other Bindings length 3 return IMPOSSIBLE MATCH must be at least p1 A x type Binding q Name Ref actual Receiver Type break case Binding Ids LOCAL reading a local variable return IMPOSSIBLE MATCH no package match in it case Binding Ids TYPE only type if q Name Ref binding instanceof Type Binding type Binding Type Binding q Name Ref binding break Handling of unbound qualified name references The match may reside in the resolved fragment which is recorded inside the problem binding along with the portion of the name until it became a problem case Binding Ids VARIABLE unbound cases case Binding Ids TYPE Binding Ids VARIABLE Binding binding q Name Ref binding if binding instanceof Problem Reference Binding type Binding Type Binding binding else if binding instanceof Problem Field Binding if q Name Ref tokens length q Name Ref other Bindings null 3 q Name Ref other Bindings length 3 return IMPOSSIBLE MATCH must be at least p1 A x type Binding q Name Ref actual Receiver Type else if binding instanceof Problem Binding Problem Binding pb Binding Problem Binding binding if Char Operation occurences Of pb Binding name 0 index of last bound token is one before the pb token return INACCURATE MATCH type Binding pb Binding search Type break return resolve Level type Binding  resolveLevel QualifiedNameReference qNameRef TypeBinding typeBinding qNameRef ASTNode RestrictiveFlagMASK BindingIds qNameRef qNameRef otherBindings qNameRef otherBindings IMPOSSIBLE_MATCH typeBinding qNameRef actualReceiverType BindingIds IMPOSSIBLE_MATCH BindingIds qNameRef TypeBinding typeBinding TypeBinding qNameRef BindingIds BindingIds BindingIds qNameRef ProblemReferenceBinding typeBinding TypeBinding ProblemFieldBinding qNameRef qNameRef otherBindings qNameRef otherBindings IMPOSSIBLE_MATCH typeBinding qNameRef actualReceiverType ProblemBinding ProblemBinding pbBinding ProblemBinding CharOperation occurencesOf pbBinding INACCURATE_MATCH typeBinding pbBinding searchType resolveLevel typeBinding
return resolve Level type Binding public String to String return Locator for this pattern to String NON NLS 1  resolveLevel typeBinding toString toString

public Package Reference Pattern char pkg Name int match Rule this match Rule if pkg Name null pkg Name length 0 this pkg Name null this segments new char Char Operation NO CHAR Internal Search Pattern this must Resolve false else this pkg Name is Case Sensitive pkg Name Char Operation to Lower Case pkg Name this segments Char Operation split On this pkg Name Internal Search Pattern this must Resolve true  PackageReferencePattern pkgName matchRule matchRule pkgName pkgName pkgName CharOperation NO_CHAR InternalSearchPattern mustResolve pkgName isCaseSensitive pkgName CharOperation toLowerCase pkgName CharOperation splitOn pkgName InternalSearchPattern mustResolve
Package Reference Pattern int match Rule super PKG REF PATTERN match Rule  PackageReferencePattern matchRule PKG_REF_PATTERN matchRule
super PKG REF PATTERN match Rule public void decode Index Key char key Package reference keys are encoded as name where name is the last segment of the package name this pkg Name key  PKG_REF_PATTERN matchRule decodeIndexKey pkgName
this pkg Name key public Search Pattern get Blank Pattern return new Package Reference Pattern R EXACT MATCH R CASE SENSITIVE  pkgName SearchPattern getBlankPattern PackageReferencePattern R_EXACT_MATCH R_CASE_SENSITIVE
public char get Index Key Package reference keys are encoded as name where name is the last segment of the package name if this current Segment 0 return this segments this current Segment return null  getIndexKey currentSegment currentSegment
return null public char get Index Categories return CATEGORIES  getIndexCategories
protected boolean has Next Query if package has at least 4 segments don t look at the first 2 since they are mostly redundant eg in org eclipse jdt core org eclipse is used all the time return this current Segment this segments length 4 2 0  hasNextQuery currentSegment
return this current Segment this segments length 4 2 0 public boolean matches Decoded Key Search Pattern decoded Pattern return true index key is not encoded so query results all match  currentSegment matchesDecodedKey SearchPattern decodedPattern
return true index key is not encoded so query results all match protected void reset Query walk the segments from end to start as it will find less potential references using lang than java this current Segment this segments length 1  resetQuery currentSegment
public String to String String Buffer buffer new String Buffer 20 buffer append Package Reference Pattern NON NLS 1 if this pkg Name null buffer append this pkg Name else buffer append NON NLS 1 buffer append NON NLS 1 switch get Match Mode case R EXACT MATCH buffer append exact match NON NLS 1 break case R PREFIX MATCH buffer append prefix match NON NLS 1 break case R PATTERN MATCH buffer append pattern match NON NLS 1 break case R REGEXP MATCH buffer append regexp match NON NLS 1 if is Case Sensitive buffer append case sensitive NON NLS 1 else buffer append case insensitive NON NLS 1 return buffer to String  toString StringBuffer StringBuffer PackageReferencePattern pkgName pkgName getMatchMode R_EXACT_MATCH R_PREFIX_MATCH R_PATTERN_MATCH R_REGEXP_MATCH isCaseSensitive toString

public static Pattern Locator pattern Locator Search Pattern pattern switch Internal Search Pattern pattern kind case I Index Constants PKG REF PATTERN return new Package Reference Locator Package Reference Pattern pattern case I Index Constants PKG DECL PATTERN return new Package Declaration Locator Package Declaration Pattern pattern case I Index Constants TYPE REF PATTERN return new Type Reference Locator Type Reference Pattern pattern case I Index Constants TYPE DECL PATTERN return new Type Declaration Locator Type Declaration Pattern pattern case I Index Constants SUPER REF PATTERN return new Super Type Reference Locator Super Type Reference Pattern pattern case I Index Constants CONSTRUCTOR PATTERN return new Constructor Locator Constructor Pattern pattern case I Index Constants FIELD PATTERN return new Field Locator Field Pattern pattern case I Index Constants METHOD PATTERN return new Method Locator Method Pattern pattern case I Index Constants OR PATTERN return new Or Locator Or Pattern pattern case I Index Constants LOCAL VAR PATTERN return new Local Variable Locator Local Variable Pattern pattern return null  PatternLocator patternLocator SearchPattern InternalSearchPattern IIndexConstants PKG_REF_PATTERN PackageReferenceLocator PackageReferencePattern IIndexConstants PKG_DECL_PATTERN PackageDeclarationLocator PackageDeclarationPattern IIndexConstants TYPE_REF_PATTERN TypeReferenceLocator TypeReferencePattern IIndexConstants TYPE_DECL_PATTERN TypeDeclarationLocator TypeDeclarationPattern IIndexConstants SUPER_REF_PATTERN SuperTypeReferenceLocator SuperTypeReferencePattern IIndexConstants CONSTRUCTOR_PATTERN ConstructorLocator ConstructorPattern IIndexConstants FIELD_PATTERN FieldLocator FieldPattern IIndexConstants METHOD_PATTERN MethodLocator MethodPattern IIndexConstants OR_PATTERN OrLocator OrPattern IIndexConstants LOCAL_VAR_PATTERN LocalVariableLocator LocalVariablePattern
public static char qualified Pattern char simple Name Pattern char qualification Pattern NOTE if case insensitive search then simple Name Pattern qualification Pattern are assumed to be lowercase if simple Name Pattern null if qualification Pattern null return null return Char Operation concat qualification Pattern ONE STAR else return qualification Pattern null Char Operation concat ONE STAR simple Name Pattern Char Operation concat qualification Pattern simple Name Pattern  qualifiedPattern simpleNamePattern qualificationPattern simpleNamePattern qualificationPattern simpleNamePattern qualificationPattern CharOperation qualificationPattern ONE_STAR qualificationPattern CharOperation ONE_STAR simpleNamePattern CharOperation qualificationPattern simpleNamePattern
public static char qualified Source Name Type Binding binding if binding instanceof Reference Binding Reference Binding type Reference Binding binding if type is Local Type return type is Member Type Char Operation concat qualified Source Name type enclosing Type type source Name Char Operation concat qualified Source Name type enclosing Type new char 1 type source Name return binding null binding qualified Source Name null  qualifiedSourceName TypeBinding ReferenceBinding ReferenceBinding ReferenceBinding isLocalType isMemberType CharOperation qualifiedSourceName enclosingType sourceName CharOperation qualifiedSourceName enclosingType sourceName qualifiedSourceName
public Pattern Locator Search Pattern pattern int match Rule pattern get Match Rule this is Case Sensitive match Rule Search Pattern R CASE SENSITIVE 0 this match Mode match Rule this is Case Sensitive Search Pattern R CASE SENSITIVE 0  PatternLocator SearchPattern matchRule getMatchRule isCaseSensitive matchRule SearchPattern R_CASE_SENSITIVE matchMode matchRule isCaseSensitive SearchPattern R_CASE_SENSITIVE
Initializes this search pattern so that polymorphic search can be performed public void initialize Polymorphic Search Match Locator locator default is to do nothing  initializePolymorphicSearch MatchLocator
Check if the given ast node syntactically matches this pattern If it does add it to the match set Returns the match level public int match AST Node node Matching Node Set node Set needed for some generic nodes each subtype should override if needed return IMPOSSIBLE MATCH  ASTNode MatchingNodeSet nodeSet IMPOSSIBLE_MATCH
return IMPOSSIBLE MATCH public int match Constructor Declaration node Matching Node Set node Set each subtype should override if needed return IMPOSSIBLE MATCH  IMPOSSIBLE_MATCH ConstructorDeclaration MatchingNodeSet nodeSet IMPOSSIBLE_MATCH
return IMPOSSIBLE MATCH public int match Expression node Matching Node Set node Set each subtype should override if needed return IMPOSSIBLE MATCH  IMPOSSIBLE_MATCH MatchingNodeSet nodeSet IMPOSSIBLE_MATCH
return IMPOSSIBLE MATCH public int match Field Declaration node Matching Node Set node Set each subtype should override if needed return IMPOSSIBLE MATCH  IMPOSSIBLE_MATCH FieldDeclaration MatchingNodeSet nodeSet IMPOSSIBLE_MATCH
return IMPOSSIBLE MATCH public int match Local Declaration node Matching Node Set node Set each subtype should override if needed return IMPOSSIBLE MATCH  IMPOSSIBLE_MATCH LocalDeclaration MatchingNodeSet nodeSet IMPOSSIBLE_MATCH
return IMPOSSIBLE MATCH public int match Method Declaration node Matching Node Set node Set each subtype should override if needed return IMPOSSIBLE MATCH  IMPOSSIBLE_MATCH MethodDeclaration MatchingNodeSet nodeSet IMPOSSIBLE_MATCH
return IMPOSSIBLE MATCH public int match Message Send node Matching Node Set node Set each subtype should override if needed return IMPOSSIBLE MATCH  IMPOSSIBLE_MATCH MessageSend MatchingNodeSet nodeSet IMPOSSIBLE_MATCH
return IMPOSSIBLE MATCH public int match Reference node Matching Node Set node Set each subtype should override if needed return IMPOSSIBLE MATCH  IMPOSSIBLE_MATCH MatchingNodeSet nodeSet IMPOSSIBLE_MATCH
return IMPOSSIBLE MATCH public int match Type Declaration node Matching Node Set node Set each subtype should override if needed return IMPOSSIBLE MATCH  IMPOSSIBLE_MATCH TypeDeclaration MatchingNodeSet nodeSet IMPOSSIBLE_MATCH
return IMPOSSIBLE MATCH public int match Type Reference node Matching Node Set node Set each subtype should override if needed return IMPOSSIBLE MATCH  IMPOSSIBLE_MATCH TypeReference MatchingNodeSet nodeSet IMPOSSIBLE_MATCH
Returns the type s of container for this pattern It is a bit combination of types denoting compilation unit class declarations field declarations or method declarations protected int match Container override if the pattern can be more specific return ALL CONTAINER  matchContainer ALL_CONTAINER
Returns whether the given name matches the given pattern protected boolean matches Name char pattern char name if pattern null return true null is as if it was if name null switch this match Mode case Search Pattern R EXACT MATCH return Char Operation equals pattern name this is Case Sensitive case Search Pattern R PREFIX MATCH return Char Operation prefix Equals pattern name this is Case Sensitive case Search Pattern R PATTERN MATCH if this is Case Sensitive pattern Char Operation to Lower Case pattern return Char Operation match pattern name this is Case Sensitive return false  matchesName matchMode SearchPattern R_EXACT_MATCH CharOperation isCaseSensitive SearchPattern R_PREFIX_MATCH CharOperation prefixEquals isCaseSensitive SearchPattern R_PATTERN_MATCH isCaseSensitive CharOperation toLowerCase CharOperation isCaseSensitive
Returns whether the given type reference matches the given pattern protected boolean matches Type Reference char pattern Type Reference type if pattern null return true null is as if it was if type null return true treat as an inexact match char compound Name type get Type Name char simple Name compound Name compound Name length 1 int dimensions type dimensions 2 if dimensions 0 int length simple Name length char result new char length dimensions System arraycopy simple Name 0 result 0 length for int i length l result length i l result i result i simple Name result return matches Name pattern simple Name  matchesTypeReference TypeReference compoundName getTypeName simpleName compoundName compoundName simpleName simpleName simpleName matchesName simpleName
Returns the match level for the given import Ref protected int match Level Import Reference import Ref override if interested in import references which are caught by the generic version of match AST Node Matching Node Set return IMPOSSIBLE MATCH  importRef matchLevel ImportReference importRef ASTNode MatchingNodeSet IMPOSSIBLE_MATCH
Reports the match of the given import reference if the resolve Level is high enough protected void match Level And Report Import Ref Import Reference import Ref Binding binding Match Locator locator throws Core Exception int level resolve Level binding if level INACCURATE MATCH match Report Import Ref import Ref binding locator create Import Handle import Ref level ACCURATE MATCH Search Match A ACCURATE Search Match A INACCURATE locator  resolveLevel matchLevelAndReportImportRef ImportReference importRef MatchLocator CoreException resolveLevel INACCURATE_MATCH matchReportImportRef importRef createImportHandle importRef ACCURATE_MATCH SearchMatch A_ACCURATE SearchMatch A_INACCURATE
Reports the match of the given import reference protected void match Report Import Ref Import Reference import Ref Binding binding I Java Element element int accuracy Match Locator locator throws Core Exception if locator encloses element default is to report a match as a regular ref this match Report Reference import Ref element accuracy locator  matchReportImportRef ImportReference importRef IJavaElement MatchLocator CoreException matchReportReference importRef
Reports the match of the given reference protected void match Report Reference AST Node reference I Java Element element int accuracy Match Locator locator throws Core Exception Search Match match null int reference Type reference Type int offset reference source Start switch reference Type case I Java Element PACKAGE FRAGMENT match locator new Package Reference Match element accuracy offset reference source End offset 1 reference break case I Java Element TYPE match locator new Type Reference Match element accuracy offset reference source End offset 1 reference break case I Java Element FIELD match locator new Field Reference Match element accuracy offset reference source End offset 1 reference break case I Java Element METHOD match locator new Method Reference Match element accuracy offset reference source End offset 1 reference break case I Java Element LOCAL VARIABLE match locator new Local Variable Reference Match element accuracy offset reference source End offset 1 reference break if match null locator report match  matchReportReference ASTNode IJavaElement MatchLocator CoreException SearchMatch referenceType referenceType sourceStart referenceType IJavaElement PACKAGE_FRAGMENT newPackageReferenceMatch sourceEnd IJavaElement newTypeReferenceMatch sourceEnd IJavaElement newFieldReferenceMatch sourceEnd IJavaElement newMethodReferenceMatch sourceEnd IJavaElement LOCAL_VARIABLE newLocalVariableReferenceMatch sourceEnd
protected int reference Type return 0 defaults to unknown a generic Java Search Match will be created  referenceType JavaSearchMatch
Finds out whether the given ast node matches this search pattern Returns IMPOSSIBLE MATCH if it doesn t Returns INACCURATE MATCH if it potentially matches this search pattern ie it has already been resolved but resolving failed Returns ACCURATE MATCH if it matches exactly this search pattern ie it doesn t need to be resolved or it has already been resolved public int resolve Level AST Node possible Matching Node only called with nodes which were possible matches to the call to match Level need to do instance of checks to find out exact type of AST Node return IMPOSSIBLE MATCH  IMPOSSIBLE_MATCH INACCURATE_MATCH ACCURATE_MATCH resolveLevel ASTNode possibleMatchingNode matchLevel ASTNode IMPOSSIBLE_MATCH
Finds out whether the given binding matches this search pattern Returns ACCURATE MATCH if it does Returns INACCURATE MATCH if resolve failed but match is still possible Returns IMPOSSIBLE MATCH otherwise Default is to return INACCURATE MATCH public int resolve Level Binding binding override if the pattern can match the binding return INACCURATE MATCH  ACCURATE_MATCH INACCURATE_MATCH IMPOSSIBLE_MATCH INACCURATE_MATCH resolveLevel INACCURATE_MATCH
Returns whether the given type binding matches the given simple name pattern and qualification pattern Returns ACCURATE MATCH if it does Returns INACCURATE MATCH if resolve failed Returns IMPOSSIBLE MATCH if it doesn t protected int resolve Level For Type char simple Name Pattern char qualification Pattern Type Binding type return resolve Level For Type qualified Pattern simple Name Pattern qualification Pattern type  ACCURATE_MATCH INACCURATE_MATCH IMPOSSIBLE_MATCH resolveLevelForType simpleNamePattern qualificationPattern TypeBinding resolveLevelForType qualifiedPattern simpleNamePattern qualificationPattern
Returns whether the given type binding matches the given qualified pattern Returns ACCURATE MATCH if it does Returns INACCURATE MATCH if resolve failed Returns IMPOSSIBLE MATCH if it doesn t protected int resolve Level For Type char qualified Pattern Type Binding type if qualified Pattern null return ACCURATE MATCH if type null return INACCURATE MATCH NOTE if case insensitive search then qualified Pattern is assumed to be lowercase char qualified Package Name type qualified Package Name char qualified Source Name qualified Source Name type char fully Qualified Type Name qualified Package Name length 0 qualified Source Name Char Operation concat qualified Package Name qualified Source Name return Char Operation match qualified Pattern fully Qualified Type Name this is Case Sensitive ACCURATE MATCH IMPOSSIBLE MATCH  ACCURATE_MATCH INACCURATE_MATCH IMPOSSIBLE_MATCH resolveLevelForType qualifiedPattern TypeBinding qualifiedPattern ACCURATE_MATCH INACCURATE_MATCH qualifiedPattern qualifiedPackageName qualifiedPackageName qualifiedSourceName qualifiedSourceName fullyQualifiedTypeName qualifiedPackageName qualifiedSourceName CharOperation qualifiedPackageName qualifiedSourceName CharOperation qualifiedPattern fullyQualifiedTypeName isCaseSensitive ACCURATE_MATCH IMPOSSIBLE_MATCH
IMPOSSIBLE MATCH public String to String return Search Pattern NON NLS 1  IMPOSSIBLE_MATCH toString SearchPattern

public Possible Match Match Locator locator I Resource resource Openable openable Search Document document this resource resource this openable openable this document document this node Set new Matching Node Set char qualified Name get Qualified Name if qualified Name null this compound Name Char Operation split On qualified Name  PossibleMatch MatchLocator IResource SearchDocument nodeSet MatchingNodeSet qualifiedName getQualifiedName qualifiedName compoundName CharOperation splitOn qualifiedName
public void clean Up this source null if this parsed Unit null this parsed Unit clean Up this parsed Unit null this node Set null  cleanUp parsedUnit parsedUnit cleanUp parsedUnit nodeSet
public boolean equals Object obj if this compound Name null return super equals obj if obj instanceof Possible Match return false By using the compound Name of the source file multiple class files A A M are considered equal Even class files for secondary types and their nested types return Char Operation equals this compound Name Possible Match obj compound Name  compoundName PossibleMatch compoundName CharOperation compoundName PossibleMatch compoundName
public char get Contents if this source null return this source if this openable instanceof Class File String file Name get Source File Name if file Name NO SOURCE FILE NAME return null Source Mapper source Mapper this openable get Source Mapper I Type type Class File this openable get Type return this source source Mapper find Source type file Name return this source this document get Char Contents  getContents ClassFile fileName getSourceFileName fileName NO_SOURCE_FILE_NAME SourceMapper sourceMapper getSourceMapper IType ClassFile getType sourceMapper findSource fileName getCharContents
The exact openable file name In particular will be the originating class file for binary openable with attached source see Package Reference Locator is Declaring Package Fragment I Package Fragment org eclipse jdt internal compiler lookup Reference Binding public char get File Name return this openable get Element Name to Char Array  PackageReferenceLocator isDeclaringPackageFragment IPackageFragment ReferenceBinding getFileName getElementName toCharArray
return this openable get Element Name to Char Array public char get Main Type Name The file is no longer opened to get its name remove fix for bug 32182 return this compound Name this compound Name length 1  getElementName toCharArray getMainTypeName compoundName compoundName
public char get Package Name int length this compound Name length if length 1 return Char Operation NO CHAR CHAR return Char Operation subarray this compound Name 0 length 1  getPackageName compoundName CharOperation NO_CHAR_CHAR CharOperation compoundName
private char get Qualified Name if this openable instanceof Compilation Unit get file name String file Name this resource get Full Path last Segment get main type name char main Type Name file Name substring 0 file Name length 5 to Char Array Compilation Unit cu Compilation Unit this openable return cu get Type new String main Type Name get Fully Qualified Name to Char Array else if this openable instanceof Class File String file Name get Source File Name if file Name NO SOURCE FILE NAME return Class File this openable get Type get Fully Qualified Name to Char Array String simple Name file Name substring 0 file Name length 5 length java length String pkg Name this openable get Parent get Element Name if pkg Name length 0 return simple Name to Char Array return pkg Name simple Name to Char Array return null  getQualifiedName CompilationUnit fileName getFullPath lastSegment mainTypeName fileName fileName toCharArray CompilationUnit CompilationUnit getType mainTypeName getFullyQualifiedName toCharArray ClassFile fileName getSourceFileName fileName NO_SOURCE_FILE_NAME ClassFile getType getFullyQualifiedName toCharArray simpleName fileName fileName pkgName getParent getElementName pkgName simpleName toCharArray pkgName simpleName toCharArray
private String get Source File Name if this source File Name null return this source File Name this source File Name NO SOURCE FILE NAME Source Mapper source Mapper this openable get Source Mapper if source Mapper null I Type type Class File this openable get Type Class File Reader reader Match Locator class File Reader type if reader null this source File Name source Mapper find Source File Name type reader return this source File Name  getSourceFileName sourceFileName sourceFileName sourceFileName NO_SOURCE_FILE_NAME SourceMapper sourceMapper getSourceMapper sourceMapper IType ClassFile getType ClassFileReader MatchLocator classFileReader sourceFileName sourceMapper findSourceFileName sourceFileName
public int hash Code if this compound Name null return super hash Code int hash Code 0 for int i 0 length this compound Name length i length i hash Code Char Operation hash Code this compound Name i return hash Code  hashCode compoundName hashCode hashCode compoundName hashCode CharOperation hashCode compoundName hashCode
return hash Code public String to String return this openable null Fake Possible Match this openable to String NON NLS 1  hashCode toString PossibleMatch toString

public void add Possible Match possible Match I Path path possible Match openable get Package Fragment Root get Path Object Vector possible Matches Object Vector this roots To Possible Matches get path if possible Matches null if possible Matches contains possible Match return else this roots To Possible Matches put path possible Matches new Object Vector possible Matches add possible Match this element Count  PossibleMatch possibleMatch IPath possibleMatch getPackageFragmentRoot getPath ObjectVector possibleMatches ObjectVector rootsToPossibleMatches possibleMatches possibleMatches possibleMatch rootsToPossibleMatches possibleMatches ObjectVector possibleMatches possibleMatch elementCount
public Possible Match get Possible Matches I Package Fragment Root roots Possible Match result new Possible Match this element Count int index 0 for int i 0 length roots length i length i Object Vector possible Matches Object Vector this roots To Possible Matches get roots i get Path if possible Matches null possible Matches copy Into result index index possible Matches size if index this element Count System arraycopy result 0 result new Possible Match index 0 index return result  PossibleMatch getPossibleMatches IPackageFragmentRoot PossibleMatch PossibleMatch elementCount ObjectVector possibleMatches ObjectVector rootsToPossibleMatches getPath possibleMatches possibleMatches copyInto possibleMatches elementCount PossibleMatch
return result public void reset this roots To Possible Matches new Simple Lookup Table 5 this element Count 0  rootsToPossibleMatches SimpleLookupTable elementCount

public Qualified Type Declaration Pattern char qualification char simple Name char class Or Interface int match Rule this match Rule this qualification is Case Sensitive qualification Char Operation to Lower Case qualification this simple Name is Case Sensitive simple Name Char Operation to Lower Case simple Name this class Or Interface class Or Interface Internal Search Pattern this must Resolve this qualification null  QualifiedTypeDeclarationPattern simpleName classOrInterface matchRule matchRule isCaseSensitive CharOperation toLowerCase simpleName isCaseSensitive simpleName CharOperation toLowerCase simpleName classOrInterface classOrInterface InternalSearchPattern mustResolve
Internal Search Pattern this must Resolve this qualification null Qualified Type Declaration Pattern int match Rule super match Rule  InternalSearchPattern mustResolve QualifiedTypeDeclarationPattern matchRule matchRule
public void decode Index Key char key int slash Char Operation index Of SEPARATOR key 0 this simple Name Char Operation subarray key 0 slash int start slash 1 slash Char Operation index Of SEPARATOR key start int second Slash Char Operation index Of SEPARATOR key slash 1 if start 1 second Slash this qualification Char Operation NO CHAR no package name or enclosing Type Names else if slash 1 second Slash this qualification Char Operation subarray key start slash only a package name else this qualification Char Operation subarray key start second Slash this qualification slash start this class Or Interface key key length 1  decodeIndexKey CharOperation indexOf simpleName CharOperation CharOperation indexOf secondSlash CharOperation indexOf secondSlash CharOperation NO_CHAR enclosingTypeNames secondSlash CharOperation CharOperation secondSlash classOrInterface
this class Or Interface key key length 1 public Search Pattern get Blank Pattern return new Qualified Type Declaration Pattern R EXACT MATCH R CASE SENSITIVE  classOrInterface SearchPattern getBlankPattern QualifiedTypeDeclarationPattern R_EXACT_MATCH R_CASE_SENSITIVE
public boolean matches Decoded Key Search Pattern decoded Pattern Qualified Type Declaration Pattern pattern Qualified Type Declaration Pattern decoded Pattern switch this class Or Interface case CLASS SUFFIX case INTERFACE SUFFIX if this class Or Interface pattern class Or Interface return false return matches Name this simple Name pattern simple Name matches Name this qualification pattern qualification  matchesDecodedKey SearchPattern decodedPattern QualifiedTypeDeclarationPattern QualifiedTypeDeclarationPattern decodedPattern classOrInterface CLASS_SUFFIX INTERFACE_SUFFIX classOrInterface classOrInterface matchesName simpleName simpleName matchesName
public String to String String Buffer buffer new String Buffer 20 switch class Or Interface case CLASS SUFFIX buffer append Class Declaration Pattern qualification NON NLS 1 break case INTERFACE SUFFIX buffer append Interface Declaration Pattern qualification NON NLS 1 break default buffer append Type Declaration Pattern qualification NON NLS 1 break if this qualification null buffer append this qualification else buffer append NON NLS 1 buffer append type NON NLS 1 if simple Name null buffer append simple Name else buffer append NON NLS 1 buffer append NON NLS 1 switch get Match Mode case R EXACT MATCH buffer append exact match NON NLS 1 break case R PREFIX MATCH buffer append prefix match NON NLS 1 break case R PATTERN MATCH buffer append pattern match NON NLS 1 break if is Case Sensitive buffer append case sensitive NON NLS 1 else buffer append case insensitive NON NLS 1 return buffer to String  toString StringBuffer StringBuffer classOrInterface CLASS_SUFFIX ClassDeclarationPattern INTERFACE_SUFFIX InterfaceDeclarationPattern TypeDeclarationPattern simpleName simpleName getMatchMode R_EXACT_MATCH R_PREFIX_MATCH R_PATTERN_MATCH isCaseSensitive toString

public class Type Declaration Visitor extends AST Visitor public boolean visit Type Declaration type Declaration Block Scope scope Reference Binding binding type Declaration binding if Super Type Names Collector this matches binding Super Type Names Collector this collect Super Type Names binding return true  TypeDeclarationVisitor ASTVisitor TypeDeclaration typeDeclaration BlockScope ReferenceBinding typeDeclaration SuperTypeNamesCollector SuperTypeNamesCollector collectSuperTypeNames
public boolean visit Type Declaration type Declaration Compilation Unit Scope scope Reference Binding binding type Declaration binding if Super Type Names Collector this matches binding Super Type Names Collector this collect Super Type Names binding return true  TypeDeclaration typeDeclaration CompilationUnitScope ReferenceBinding typeDeclaration SuperTypeNamesCollector SuperTypeNamesCollector collectSuperTypeNames
public boolean visit Type Declaration member Type Declaration Class Scope scope Reference Binding binding member Type Declaration binding if Super Type Names Collector this matches binding Super Type Names Collector this collect Super Type Names binding return true  TypeDeclaration memberTypeDeclaration ClassScope ReferenceBinding memberTypeDeclaration SuperTypeNamesCollector SuperTypeNamesCollector collectSuperTypeNames
return true public boolean visit Field Declaration field Declaration Method Scope scope return false don t visit field declarations  FieldDeclaration fieldDeclaration MethodScope
return false don t visit field declarations public boolean visit Initializer initializer Method Scope scope return false don t visit initializers  MethodScope
return false don t visit initializers public boolean visit Constructor Declaration constructor Declaration Class Scope scope return false don t visit constructor declarations  ConstructorDeclaration constructorDeclaration ClassScope
return false don t visit constructor declarations public boolean visit Method Declaration method Declaration Class Scope scope return false don t visit method declarations  MethodDeclaration methodDeclaration ClassScope
public Super Type Names Collector Search Pattern pattern char type Simple Name char type Qualification Match Locator locator I Type type I Progress Monitor progress Monitor this pattern pattern this type Simple Name type Simple Name this type Qualification type Qualification this locator locator this type type this progress Monitor progress Monitor  SuperTypeNamesCollector SearchPattern typeSimpleName typeQualification MatchLocator IType IProgressMonitor progressMonitor typeSimpleName typeSimpleName typeQualification typeQualification progressMonitor progressMonitor
protected void add To Result char compound Name int result Length this result length for int i 0 i result Length i if Char Operation equals this result i compound Name return already known if result Length this result Index System arraycopy this result 0 this result new char result Length 2 0 result Length this result this result Index compound Name  addToResult compoundName resultLength resultLength CharOperation compoundName resultLength resultIndex resultLength resultLength resultIndex compoundName
org eclipse jdt internal compiler env I Compilation Unit source Unit new org eclipse jdt internal compiler env I Compilation Unit public char get Contents return source  ICompilationUnit sourceUnit ICompilationUnit getContents
new org eclipse jdt internal compiler env I Compilation Unit public char get Contents return source public char get File Name return file Name to Char Array  ICompilationUnit getContents getFileName fileName toCharArray
public char get Contents return source public char get File Name return file Name to Char Array public char get Main Type Name return main Type Name  getContents getFileName fileName toCharArray getMainTypeName mainTypeName
public char get File Name return file Name to Char Array public char get Main Type Name return main Type Name public char get Package Name return null  getFileName fileName toCharArray getMainTypeName mainTypeName getPackageName
protected Compilation Unit Declaration build Bindings I Compilation Unit compilation Unit boolean is Top Level Or Member throws Java Model Exception final I File file I File compilation Unit get Resource final String file Name file get Full Path last Segment final char main Type Name file Name substring 0 file Name length 5 to Char Array source unit I Buffer buffer compilation Unit get Buffer final char source compilation Unit is Working Copy buffer null null buffer get Characters Util get Resource Contents As Char Array file org eclipse jdt internal compiler env I Compilation Unit source Unit new org eclipse jdt internal compiler env I Compilation Unit public char get Contents return source public char get File Name return file Name to Char Array public char get Main Type Name return main Type Name public char get Package Name return null Compilation Result compilation Result new Compilation Result source Unit 1 1 0 Compilation Unit Declaration unit is Top Level Or Member this locator basic Parser diet Parse source Unit compilation Result this locator basic Parser parse source Unit compilation Result if unit null this locator lookup Environment build Type Bindings unit this locator lookup Environment complete Type Bindings unit is Top Level Or Member if is Top Level Or Member if unit scope null unit scope fault In Types fault in fields methods unit resolve return unit  CompilationUnitDeclaration buildBindings ICompilationUnit compilationUnit isTopLevelOrMember JavaModelException IFile IFile compilationUnit getResource fileName getFullPath lastSegment mainTypeName fileName fileName toCharArray IBuffer compilationUnit getBuffer compilationUnit isWorkingCopy getCharacters getResourceContentsAsCharArray ICompilationUnit sourceUnit ICompilationUnit getContents getFileName fileName toCharArray getMainTypeName mainTypeName getPackageName CompilationResult compilationResult CompilationResult sourceUnit CompilationUnitDeclaration isTopLevelOrMember basicParser dietParse sourceUnit compilationResult basicParser sourceUnit compilationResult lookupEnvironment buildTypeBindings lookupEnvironment completeTypeBindings isTopLevelOrMember isTopLevelOrMember faultInTypes
public char collect throws Java Model Exception if this type null Collect the paths of the cus that are in the hierarchy of the given type this result new char 1 this result Index 0 Java Project java Project Java Project this type get Java Project this locator initialize java Project 0 try if this type is Binary Binary Type Binding binding this locator cache Binary Type this type if binding null collect Super Type Names binding else I Compilation Unit unit this type get Compilation Unit Source Type source Type Source Type this type boolean is Top Level Or Member source Type get Outer Most Local Context null Compilation Unit Declaration parsed Unit build Bindings unit is Top Level Or Member if parsed Unit null Type Declaration type Decl new AST Node Finder parsed Unit find Type this type if type Decl null type Decl binding null collect Super Type Names type Decl binding catch Abort Compilation e problem with classpath report inacurrate matches return null if this result length this result Index System arraycopy this result 0 this result new char this result Index 0 this result Index return this result Collect the paths of the cus that declare a type which matches declaring Qualification declaring Simple Name String paths this get Paths Of Declaring Type if paths null return null Create bindings from source types and binary types and collect super type names of the type declaration that match the given declaring type Util sort paths sort by projects Java Project previous Project null this result new char 1 this result Index 0 for int i 0 length paths length i length i try Openable openable this locator handle Factory create Openable paths i this locator scope if openable null continue outside classpath I Java Project project openable get Java Project if project equals previous Project previous Project Java Project project this locator initialize previous Project 0 if openable instanceof I Compilation Unit I Compilation Unit unit I Compilation Unit openable Compilation Unit Declaration parsed Unit build Bindings unit true only toplevel and member types are visible to the focus type if parsed Unit null parsed Unit traverse new Type Declaration Visitor parsed Unit scope else if openable instanceof I Class File I Class File class File I Class File openable Binary Type Binding binding this locator cache Binary Type class File get Type if matches binding collect Super Type Names binding catch Abort Compilation e ignore continue with next element catch Java Model Exception e ignore continue with next element if this result length this result Index System arraycopy this result 0 this result new char this result Index 0 this result Index return this result  JavaModelException resultIndex JavaProject javaProject JavaProject getJavaProject javaProject isBinary BinaryTypeBinding cacheBinaryType collectSuperTypeNames ICompilationUnit getCompilationUnit SourceType sourceType SourceType isTopLevelOrMember sourceType getOuterMostLocalContext CompilationUnitDeclaration parsedUnit buildBindings isTopLevelOrMember parsedUnit TypeDeclaration typeDecl ASTNodeFinder parsedUnit findType typeDecl typeDecl collectSuperTypeNames typeDecl AbortCompilation resultIndex resultIndex resultIndex declaringQualification declaringSimpleName getPathsOfDeclaringType JavaProject previousProject resultIndex handleFactory createOpenable IJavaProject getJavaProject previousProject previousProject JavaProject previousProject ICompilationUnit ICompilationUnit ICompilationUnit CompilationUnitDeclaration parsedUnit buildBindings parsedUnit parsedUnit TypeDeclarationVisitor parsedUnit IClassFile IClassFile classFile IClassFile BinaryTypeBinding cacheBinaryType classFile getType collectSuperTypeNames AbortCompilation JavaModelException resultIndex resultIndex resultIndex
Collects the names of all the supertypes of the given type protected void collect Super Type Names Reference Binding binding Reference Binding superclass binding superclass if superclass null this add To Result superclass compound Name this collect Super Type Names superclass Reference Binding interfaces binding super Interfaces if interfaces null for int i 0 i interfaces length i Reference Binding interface Binding interfaces i this add To Result interface Binding compound Name this collect Super Type Names interface Binding  collectSuperTypeNames ReferenceBinding ReferenceBinding addToResult compoundName collectSuperTypeNames ReferenceBinding superInterfaces ReferenceBinding interfaceBinding addToResult interfaceBinding compoundName collectSuperTypeNames interfaceBinding
Index Query Requestor search Requestor new Index Query Requestor public boolean accept Index Match String document Path Search Pattern index Record Search Participant participant Type Declaration Pattern record Type Declaration Pattern index Record if record enclosing Type Names I Index Constants ONE ZERO CHAR filter out local and anonymous classes path Collector accept Index Match document Path index Record participant return true  IndexQueryRequestor searchRequestor IndexQueryRequestor acceptIndexMatch documentPath SearchPattern indexRecord SearchParticipant TypeDeclarationPattern TypeDeclarationPattern indexRecord enclosingTypeNames IIndexConstants ONE_ZERO_CHAR pathCollector acceptIndexMatch documentPath indexRecord
protected String get Paths Of Declaring Type if this type Qualification null this type Simple Name null return null final Path Collector path Collector new Path Collector I Java Search Scope scope Search Engine create Workspace Scope Index Manager index Manager Java Model Manager get Java Model Manager get Index Manager Search Pattern search Pattern new Type Declaration Pattern this type Simple Name null null this type Qualification use the qualification only if no simple name null do find member types this type Simple Name I Index Constants TYPE SUFFIX this pattern get Match Rule Index Query Requestor search Requestor new Index Query Requestor public boolean accept Index Match String document Path Search Pattern index Record Search Participant participant Type Declaration Pattern record Type Declaration Pattern index Record if record enclosing Type Names I Index Constants ONE ZERO CHAR filter out local and anonymous classes path Collector accept Index Match document Path index Record participant return true index Manager perform Concurrent Job new Pattern Search Job search Pattern new Java Search Participant scope search Requestor I Java Search Constants WAIT UNTIL READY TO SEARCH progress Monitor null null new Sub Progress Monitor progress Monitor 100 return path Collector get Paths  getPathsOfDeclaringType typeQualification typeSimpleName PathCollector pathCollector PathCollector IJavaSearchScope SearchEngine createWorkspaceScope IndexManager indexManager JavaModelManager getJavaModelManager getIndexManager SearchPattern searchPattern TypeDeclarationPattern typeSimpleName typeQualification typeSimpleName IIndexConstants TYPE_SUFFIX getMatchRule IndexQueryRequestor searchRequestor IndexQueryRequestor acceptIndexMatch documentPath SearchPattern indexRecord SearchParticipant TypeDeclarationPattern TypeDeclarationPattern indexRecord enclosingTypeNames IIndexConstants ONE_ZERO_CHAR pathCollector acceptIndexMatch documentPath indexRecord indexManager performConcurrentJob PatternSearchJob searchPattern JavaSearchParticipant searchRequestor IJavaSearchConstants WAIT_UNTIL_READY_TO_SEARCH progressMonitor SubProgressMonitor progressMonitor pathCollector getPaths
protected boolean matches char compound Name int length compound Name length if length 0 return false char simple Name compound Name length 1 int last length 1 if this type Simple Name null this pattern matches Name simple Name this type Simple Name most frequent case simple name equals last segment of compound Name char qualification new char last System arraycopy compound Name 0 qualification 0 last return this pattern matches Name this type Qualification Char Operation concat With qualification if Char Operation ends With simple Name this type Simple Name return false member type transform A B C D into A B C D System arraycopy compound Name 0 compound Name new char length 1 0 last int dollar Char Operation index Of simple Name if dollar 1 return false compound Name last Char Operation subarray simple Name 0 dollar compound Name length Char Operation subarray simple Name dollar 1 simple Name length return this matches compound Name  compoundName compoundName simpleName compoundName typeSimpleName matchesName simpleName typeSimpleName compoundName compoundName matchesName typeQualification CharOperation concatWith CharOperation endsWith simpleName typeSimpleName compoundName compoundName CharOperation indexOf simpleName compoundName CharOperation simpleName compoundName CharOperation simpleName simpleName compoundName
return this matches compound Name protected boolean matches Reference Binding binding return binding null binding compound Name null this matches binding compound Name  compoundName ReferenceBinding compoundName compoundName

public Super Type Reference Locator Super Type Reference Pattern pattern super pattern this pattern pattern  SuperTypeReferenceLocator SuperTypeReferencePattern
public int match Type Declaration node Matching Node Set node Set SKIP IT public int match Type Reference node Matching Node Set node Set if this pattern super Simple Name null return node Set add Match node Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH char type Ref Simple Name null if node instanceof Single Type Reference type Ref Simple Name Single Type Reference node token else Qualified Type Reference char tokens Qualified Type Reference node tokens type Ref Simple Name tokens tokens length 1 if matches Name this pattern super Simple Name type Ref Simple Name return node Set add Match node Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH return IMPOSSIBLE MATCH  TypeDeclaration MatchingNodeSet nodeSet TypeReference MatchingNodeSet nodeSet superSimpleName nodeSet addMatch InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH typeRefSimpleName SingleTypeReference typeRefSimpleName SingleTypeReference QualifiedTypeReference QualifiedTypeReference typeRefSimpleName matchesName superSimpleName typeRefSimpleName nodeSet addMatch InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH IMPOSSIBLE_MATCH
protected int match Container return CLASS CONTAINER  matchContainer CLASS_CONTAINER
return CLASS CONTAINER protected int reference Type return I Java Element TYPE  CLASS_CONTAINER referenceType IJavaElement
public int resolve Level AST Node node if node instanceof Type Reference return IMPOSSIBLE MATCH Type Reference type Ref Type Reference node Type Binding binding type Ref resolved Type if binding null return INACCURATE MATCH return resolve Level For Type this pattern super Simple Name this pattern super Qualification binding  resolveLevel ASTNode TypeReference IMPOSSIBLE_MATCH TypeReference typeRef TypeReference TypeBinding typeRef resolvedType INACCURATE_MATCH resolveLevelForType superSimpleName superQualification
public int resolve Level Binding binding if binding null return INACCURATE MATCH if binding instanceof Reference Binding return IMPOSSIBLE MATCH Reference Binding type Reference Binding binding int level IMPOSSIBLE MATCH if this pattern check Only Superinterfaces level resolve Level For Type this pattern super Simple Name this pattern super Qualification type superclass if level ACCURATE MATCH return ACCURATE MATCH Reference Binding super Interfaces type super Interfaces for int i 0 max super Interfaces length i max i int new Level resolve Level For Type this pattern super Simple Name this pattern super Qualification super Interfaces i if new Level level if new Level ACCURATE MATCH return ACCURATE MATCH level new Level return level  resolveLevel INACCURATE_MATCH ReferenceBinding IMPOSSIBLE_MATCH ReferenceBinding ReferenceBinding IMPOSSIBLE_MATCH checkOnlySuperinterfaces resolveLevelForType superSimpleName superQualification ACCURATE_MATCH ACCURATE_MATCH ReferenceBinding superInterfaces superInterfaces superInterfaces newLevel resolveLevelForType superSimpleName superQualification superInterfaces newLevel newLevel ACCURATE_MATCH ACCURATE_MATCH newLevel
return level public String to String return Locator for this pattern to String NON NLS 1  toString toString

public static char create Index Key int modifiers char package Name char type Name char enclosing Type Names char class Or Interface char super Type Name char super Class Or Interface if super Type Name null super Type Name OBJECT char super Simple Name Char Operation last Segment super Type Name char super Qualification null if super Simple Name super Type Name int length super Type Name length super Simple Name length 1 super Qualification new char length System arraycopy super Type Name 0 super Qualification 0 length if the supertype name contains a then split it into source name and append the prefix to the qualification e g p A B p A B char super Type Source Name Char Operation last Segment super Simple Name if super Type Source Name super Simple Name int start super Qualification null 0 super Qualification length 1 int prefix Length super Simple Name length super Type Source Name length char mangled Qualification new char start prefix Length if super Qualification null System arraycopy super Qualification 0 mangled Qualification 0 start 1 mangled Qualification start 1 System arraycopy super Simple Name 0 mangled Qualification start prefix Length super Qualification mangled Qualification super Simple Name super Type Source Name char simple Name Char Operation last Segment type Name char enclosing Type Name Char Operation concat With enclosing Type Names if super Qualification null Char Operation equals super Qualification package Name package Name ONE ZERO save some space super Simple Name super Qualification simple Name enclosing Type Name package Name super Class Or Interface class Or Interface modifiers int super Length super Simple Name null 0 super Simple Name length int superQ Length super Qualification null 0 super Qualification length int simple Length simple Name null 0 simple Name length int enclosing Length enclosing Type Name null 0 enclosing Type Name length int package Length package Name null 0 package Name length char result new char super Length superQ Length simple Length enclosing Length package Length 8 int pos 0 if super Length 0 System arraycopy super Simple Name 0 result pos super Length pos super Length result pos SEPARATOR if superQ Length 0 System arraycopy super Qualification 0 result pos superQ Length pos superQ Length result pos SEPARATOR if simple Length 0 System arraycopy simple Name 0 result pos simple Length pos simple Length result pos SEPARATOR if enclosing Length 0 System arraycopy enclosing Type Name 0 result pos enclosing Length pos enclosing Length result pos SEPARATOR if package Length 0 System arraycopy package Name 0 result pos package Length pos package Length result pos SEPARATOR result pos super Class Or Interface result pos class Or Interface result pos char modifiers return result  createIndexKey packageName typeName enclosingTypeNames classOrInterface superTypeName superClassOrInterface superTypeName superTypeName superSimpleName CharOperation lastSegment superTypeName superQualification superSimpleName superTypeName superTypeName superSimpleName superQualification superTypeName superQualification superTypeSourceName CharOperation lastSegment superSimpleName superTypeSourceName superSimpleName superQualification superQualification prefixLength superSimpleName superTypeSourceName mangledQualification prefixLength superQualification superQualification mangledQualification mangledQualification superSimpleName mangledQualification prefixLength superQualification mangledQualification superSimpleName superTypeSourceName simpleName CharOperation lastSegment typeName enclosingTypeName CharOperation concatWith enclosingTypeNames superQualification CharOperation superQualification packageName packageName ONE_ZERO superSimpleName superQualification simpleName enclosingTypeName packageName superClassOrInterface classOrInterface superLength superSimpleName superSimpleName superQLength superQualification superQualification simpleLength simpleName simpleName enclosingLength enclosingTypeName enclosingTypeName packageLength packageName packageName superLength superQLength simpleLength enclosingLength packageLength superLength superSimpleName superLength superLength superQLength superQualification superQLength superQLength simpleLength simpleName simpleLength simpleLength enclosingLength enclosingTypeName enclosingLength enclosingLength packageLength packageName packageLength packageLength superClassOrInterface classOrInterface
public Super Type Reference Pattern char super Qualification char super Simple Name boolean check Only Superinterfaces int match Rule this match Rule this super Qualification is Case Sensitive super Qualification Char Operation to Lower Case super Qualification this super Simple Name is Case Sensitive super Simple Name Char Operation to Lower Case super Simple Name Internal Search Pattern this must Resolve super Qualification null this check Only Superinterfaces check Only Superinterfaces ie skip the superclass  SuperTypeReferencePattern superQualification superSimpleName checkOnlySuperinterfaces matchRule matchRule superQualification isCaseSensitive superQualification CharOperation toLowerCase superQualification superSimpleName isCaseSensitive superSimpleName CharOperation toLowerCase superSimpleName InternalSearchPattern mustResolve superQualification checkOnlySuperinterfaces checkOnlySuperinterfaces
this check Only Superinterfaces check Only Superinterfaces ie skip the superclass Super Type Reference Pattern int match Rule super SUPER REF PATTERN match Rule  checkOnlySuperinterfaces checkOnlySuperinterfaces SuperTypeReferencePattern matchRule SUPER_REF_PATTERN matchRule
public void decode Index Key char key int slash Char Operation index Of SEPARATOR key 0 this super Simple Name Char Operation subarray key 0 slash some values may not have been know when indexed so decode as null int start slash 1 slash Char Operation index Of SEPARATOR key start this super Qualification slash start null Char Operation subarray key start slash slash Char Operation index Of SEPARATOR key start slash 1 this simple Name Char Operation subarray key start slash slash Char Operation index Of SEPARATOR key start slash 1 if slash start this enclosing Type Name null else char names Char Operation subarray key start slash this enclosing Type Name Char Operation equals ONE ZERO names ONE ZERO names slash Char Operation index Of SEPARATOR key start slash 1 if slash start this pkg Name null else char names Char Operation subarray key start slash this pkg Name Char Operation equals ONE ZERO names this super Qualification names this super Class Or Interface key slash 1 this class Or Interface key slash 2 this modifiers key slash 3 implicit cast to int type  decodeIndexKey CharOperation indexOf superSimpleName CharOperation CharOperation indexOf superQualification CharOperation CharOperation indexOf simpleName CharOperation CharOperation indexOf enclosingTypeName CharOperation enclosingTypeName CharOperation ONE_ZERO ONE_ZERO CharOperation indexOf pkgName CharOperation pkgName CharOperation ONE_ZERO superQualification superClassOrInterface classOrInterface
this modifiers key slash 3 implicit cast to int type public Search Pattern get Blank Pattern return new Super Type Reference Pattern R EXACT MATCH R CASE SENSITIVE  SearchPattern getBlankPattern SuperTypeReferencePattern R_EXACT_MATCH R_CASE_SENSITIVE
return new Super Type Reference Pattern R EXACT MATCH R CASE SENSITIVE public char get Index Categories return CATEGORIES  SuperTypeReferencePattern R_EXACT_MATCH R_CASE_SENSITIVE getIndexCategories
public boolean matches Decoded Key Search Pattern decoded Pattern Super Type Reference Pattern pattern Super Type Reference Pattern decoded Pattern if this check Only Superinterfaces if pattern super Class Or Interface I Index Constants INTERFACE SUFFIX return false if pattern super Qualification null if matches Name this super Qualification pattern super Qualification return false return matches Name this super Simple Name pattern super Simple Name  matchesDecodedKey SearchPattern decodedPattern SuperTypeReferencePattern SuperTypeReferencePattern decodedPattern checkOnlySuperinterfaces superClassOrInterface IIndexConstants INTERFACE_SUFFIX superQualification matchesName superQualification superQualification matchesName superSimpleName superSimpleName
Entry Result query In Index index throws IO Exception char key this super Simple Name can be null int match Rule get Match Rule cannot include the super Qualification since it may not exist in the index switch get Match Mode case R EXACT MATCH do a prefix query with the super Simple Name match Rule match Rule R EXACT MATCH R PREFIX MATCH if this super Simple Name null key Char Operation append this super Simple Name SEPARATOR break case R PREFIX MATCH do a prefix query with the super Simple Name break case R PATTERN MATCH do a pattern query with the super Simple Name break return index query get Index Categories key match Rule match rule is irrelevant when the key is null  EntryResult queryIn IOException superSimpleName matchRule getMatchRule superQualification getMatchMode R_EXACT_MATCH superSimpleName matchRule matchRule R_EXACT_MATCH R_PREFIX_MATCH superSimpleName CharOperation superSimpleName R_PREFIX_MATCH superSimpleName R_PATTERN_MATCH superSimpleName getIndexCategories matchRule
public String to String String Buffer buffer new String Buffer 20 buffer append this check Only Superinterfaces Super Interface Reference Pattern NON NLS 1 Super Type Reference Pattern NON NLS 1 if super Simple Name null buffer append super Simple Name else buffer append NON NLS 1 buffer append NON NLS 1 switch get Match Mode case R EXACT MATCH buffer append exact match NON NLS 1 break case R PREFIX MATCH buffer append prefix match NON NLS 1 break case R PATTERN MATCH buffer append pattern match NON NLS 1 break if is Case Sensitive buffer append case sensitive NON NLS 1 else buffer append case insensitive NON NLS 1 return buffer to String  toString StringBuffer StringBuffer checkOnlySuperinterfaces SuperInterfaceReferencePattern SuperTypeReferencePattern superSimpleName superSimpleName getMatchMode R_EXACT_MATCH R_PREFIX_MATCH R_PATTERN_MATCH isCaseSensitive toString

public Type Declaration Locator Type Declaration Pattern pattern super pattern this pattern pattern  TypeDeclarationLocator TypeDeclarationPattern
public int match Reference node Matching Node Set node Set SKIP IT public int match Type Declaration node Matching Node Set node Set if this pattern simple Name null matches Name this pattern simple Name node name return node Set add Match node Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH return IMPOSSIBLE MATCH  MatchingNodeSet nodeSet TypeDeclaration MatchingNodeSet nodeSet simpleName matchesName simpleName nodeSet addMatch InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH IMPOSSIBLE_MATCH
public int resolve Level AST Node node if node instanceof Type Declaration return IMPOSSIBLE MATCH return resolve Level Type Declaration node binding  resolveLevel ASTNode TypeDeclaration IMPOSSIBLE_MATCH resolveLevel TypeDeclaration
public int resolve Level Binding binding if binding null return INACCURATE MATCH if binding instanceof Type Binding return IMPOSSIBLE MATCH Type Binding type Type Binding binding switch this pattern class Or Interface case CLASS SUFFIX if type is Interface return IMPOSSIBLE MATCH break case INTERFACE SUFFIX if type is Interface return IMPOSSIBLE MATCH break case TYPE SUFFIX nothing fully qualified name if this pattern instanceof Qualified Type Declaration Pattern Qualified Type Declaration Pattern qualified Pattern Qualified Type Declaration Pattern this pattern return resolve Level For Type qualified Pattern simple Name qualified Pattern qualification type else char enclosing Type Name this pattern enclosing Type Names null null Char Operation concat With this pattern enclosing Type Names return resolve Level For Type this pattern simple Name this pattern pkg enclosing Type Name type  resolveLevel INACCURATE_MATCH TypeBinding IMPOSSIBLE_MATCH TypeBinding TypeBinding classOrInterface CLASS_SUFFIX isInterface IMPOSSIBLE_MATCH INTERFACE_SUFFIX isInterface IMPOSSIBLE_MATCH TYPE_SUFFIX QualifiedTypeDeclarationPattern QualifiedTypeDeclarationPattern qualifiedPattern QualifiedTypeDeclarationPattern resolveLevelForType qualifiedPattern simpleName qualifiedPattern enclosingTypeName enclosingTypeNames CharOperation concatWith enclosingTypeNames resolveLevelForType simpleName enclosingTypeName
Returns whether the given type binding matches the given simple name pattern qualification pattern and enclosing type name pattern protected int resolve Level For Type char simple Name Pattern char qualification Pattern char enclosing Name Pattern Type Binding type if enclosing Name Pattern null return resolve Level For Type simple Name Pattern qualification Pattern type if qualification Pattern null return resolve Level For Type simple Name Pattern enclosing Name Pattern type case of an import reference while searching for ALL OCCURENCES of a type see bug 37166 if type instanceof Problem Reference Binding return IMPOSSIBLE MATCH pattern was created from a Java element qualification is the package name char full Qualification Pattern Char Operation concat qualification Pattern enclosing Name Pattern if Char Operation equals this pattern pkg Char Operation concat With type get Package compound Name return resolve Level For Type simple Name Pattern full Qualification Pattern type return IMPOSSIBLE MATCH  resolveLevelForType simpleNamePattern qualificationPattern enclosingNamePattern TypeBinding enclosingNamePattern resolveLevelForType simpleNamePattern qualificationPattern qualificationPattern resolveLevelForType simpleNamePattern enclosingNamePattern ALL_OCCURENCES ProblemReferenceBinding IMPOSSIBLE_MATCH fullQualificationPattern CharOperation qualificationPattern enclosingNamePattern CharOperation CharOperation concatWith getPackage compoundName resolveLevelForType simpleNamePattern fullQualificationPattern IMPOSSIBLE_MATCH
return IMPOSSIBLE MATCH public String to String return Locator for this pattern to String NON NLS 1  IMPOSSIBLE_MATCH toString toString

public static char create Index Key char type Name char package Name char enclosing Type Names char class Or Interface int type Name Length type Name null 0 type Name length int package Length package Name null 0 package Name length int enclosing Names Length 0 if enclosing Type Names null for int i 0 length enclosing Type Names length i length enclosing Names Length enclosing Type Names i length if i length enclosing Names Length for the separator char result new char type Name Length package Length enclosing Names Length 4 int pos 0 if type Name Length 0 System arraycopy type Name 0 result pos type Name Length pos type Name Length result pos SEPARATOR if package Length 0 System arraycopy package Name 0 result pos package Length pos package Length result pos SEPARATOR if enclosing Names Length 0 for int i 0 length enclosing Type Names length i length char enclosing Name enclosing Type Names i int its Length enclosing Name length System arraycopy enclosing Name 0 result pos its Length pos its Length if i length result pos result pos SEPARATOR result pos class Or Interface return result  createIndexKey typeName packageName enclosingTypeNames classOrInterface typeNameLength typeName typeName packageLength packageName packageName enclosingNamesLength enclosingTypeNames enclosingTypeNames enclosingNamesLength enclosingTypeNames enclosingNamesLength typeNameLength packageLength enclosingNamesLength typeNameLength typeName typeNameLength typeNameLength packageLength packageName packageLength packageLength enclosingNamesLength enclosingTypeNames enclosingName enclosingTypeNames itsLength enclosingName enclosingName itsLength itsLength classOrInterface
public Type Declaration Pattern char pkg char enclosing Type Names char simple Name char class Or Interface int match Rule this match Rule this pkg is Case Sensitive pkg Char Operation to Lower Case pkg if is Case Sensitive enclosing Type Names null this enclosing Type Names enclosing Type Names else int length enclosing Type Names length this enclosing Type Names new char length for int i 0 i length i this enclosing Type Names i Char Operation to Lower Case enclosing Type Names i this simple Name is Case Sensitive simple Name Char Operation to Lower Case simple Name this class Or Interface class Or Interface Internal Search Pattern this must Resolve this pkg null this enclosing Type Names null  TypeDeclarationPattern enclosingTypeNames simpleName classOrInterface matchRule matchRule isCaseSensitive CharOperation toLowerCase isCaseSensitive enclosingTypeNames enclosingTypeNames enclosingTypeNames enclosingTypeNames enclosingTypeNames enclosingTypeNames CharOperation toLowerCase enclosingTypeNames simpleName isCaseSensitive simpleName CharOperation toLowerCase simpleName classOrInterface classOrInterface InternalSearchPattern mustResolve enclosingTypeNames
Internal Search Pattern this must Resolve this pkg null this enclosing Type Names null Type Declaration Pattern int match Rule super TYPE DECL PATTERN match Rule  InternalSearchPattern mustResolve enclosingTypeNames TypeDeclarationPattern matchRule TYPE_DECL_PATTERN matchRule
public void decode Index Key char key int slash Char Operation index Of SEPARATOR key 0 this simple Name Char Operation subarray key 0 slash int start slash 1 slash Char Operation index Of SEPARATOR key start this pkg slash start Char Operation NO CHAR Char Operation subarray key start slash slash Char Operation index Of SEPARATOR key start slash 1 if slash start this enclosing Type Names Char Operation NO CHAR CHAR else char names Char Operation subarray key start slash this enclosing Type Names Char Operation equals ONE ZERO names ONE ZERO CHAR Char Operation split On names this class Or Interface key key length 1  decodeIndexKey CharOperation indexOf simpleName CharOperation CharOperation indexOf CharOperation NO_CHAR CharOperation CharOperation indexOf enclosingTypeNames CharOperation NO_CHAR_CHAR CharOperation enclosingTypeNames CharOperation ONE_ZERO ONE_ZERO_CHAR CharOperation splitOn classOrInterface
this class Or Interface key key length 1 public Search Pattern get Blank Pattern return new Type Declaration Pattern R EXACT MATCH R CASE SENSITIVE  classOrInterface SearchPattern getBlankPattern TypeDeclarationPattern R_EXACT_MATCH R_CASE_SENSITIVE
return new Type Declaration Pattern R EXACT MATCH R CASE SENSITIVE public char get Index Categories return CATEGORIES  TypeDeclarationPattern R_EXACT_MATCH R_CASE_SENSITIVE getIndexCategories
public boolean matches Decoded Key Search Pattern decoded Pattern Type Declaration Pattern pattern Type Declaration Pattern decoded Pattern switch this class Or Interface case CLASS SUFFIX case INTERFACE SUFFIX if this class Or Interface pattern class Or Interface return false if matches Name this simple Name pattern simple Name return false check package exact match only if this pkg null Char Operation equals this pkg pattern pkg is Case Sensitive return false check enclosing Type Names exact match only if this enclosing Type Names null if this enclosing Type Names length 0 return pattern enclosing Type Names length 0 if this enclosing Type Names length 1 pattern enclosing Type Names length 1 return Char Operation equals this enclosing Type Names 0 pattern enclosing Type Names 0 is Case Sensitive if pattern enclosing Type Names ONE ZERO CHAR return true is a local or anonymous type return Char Operation equals this enclosing Type Names pattern enclosing Type Names is Case Sensitive return true  matchesDecodedKey SearchPattern decodedPattern TypeDeclarationPattern TypeDeclarationPattern decodedPattern classOrInterface CLASS_SUFFIX INTERFACE_SUFFIX classOrInterface classOrInterface matchesName simpleName simpleName CharOperation isCaseSensitive enclosingTypeNames enclosingTypeNames enclosingTypeNames enclosingTypeNames enclosingTypeNames enclosingTypeNames CharOperation enclosingTypeNames enclosingTypeNames isCaseSensitive enclosingTypeNames ONE_ZERO_CHAR CharOperation enclosingTypeNames enclosingTypeNames isCaseSensitive
Entry Result query In Index index throws IO Exception char key this simple Name can be null int match Rule get Match Rule switch get Match Mode case R PREFIX MATCH do a prefix query with the simple Name break case R EXACT MATCH if this simple Name null match Rule match Rule R EXACT MATCH R PREFIX MATCH key this pkg null Char Operation append this simple Name SEPARATOR Char Operation concat this simple Name SEPARATOR this pkg SEPARATOR Char Operation NO CHAR break do a prefix query with the simple Name and possibly the pkg match Rule match Rule R EXACT MATCH R PATTERN MATCH fall thru to encode the key and do a pattern query case R PATTERN MATCH if this pkg null if this simple Name null if this class Or Interface CLASS SUFFIX this class Or Interface INTERFACE SUFFIX key new char ONE STAR 0 SEPARATOR this class Or Interface find all classes or all interfaces else if this simple Name this simple Name length 1 key Char Operation concat this simple Name ONE STAR SEPARATOR break do a pattern query with the current encoded key must decode to check enclosing Type Names due to the encoding of local types key Char Operation concat this simple Name null ONE STAR this simple Name SEPARATOR this pkg SEPARATOR ONE STAR break return index query get Index Categories key match Rule match rule is irrelevant when the key is null  EntryResult queryIn IOException simpleName matchRule getMatchRule getMatchMode R_PREFIX_MATCH simpleName R_EXACT_MATCH simpleName matchRule matchRule R_EXACT_MATCH R_PREFIX_MATCH CharOperation simpleName CharOperation simpleName CharOperation NO_CHAR simpleName matchRule matchRule R_EXACT_MATCH R_PATTERN_MATCH R_PATTERN_MATCH simpleName classOrInterface CLASS_SUFFIX classOrInterface INTERFACE_SUFFIX ONE_STAR classOrInterface simpleName simpleName CharOperation simpleName ONE_STAR enclosingTypeNames CharOperation simpleName ONE_STAR simpleName ONE_STAR getIndexCategories matchRule
public String to String String Buffer buffer new String Buffer 20 switch class Or Interface case CLASS SUFFIX buffer append Class Declaration Pattern pkg NON NLS 1 break case INTERFACE SUFFIX buffer append Interface Declaration Pattern pkg NON NLS 1 break default buffer append Type Declaration Pattern pkg NON NLS 1 break if pkg null buffer append pkg else buffer append NON NLS 1 buffer append enclosing NON NLS 1 if enclosing Type Names null for int i 0 i enclosing Type Names length i buffer append enclosing Type Names i if i enclosing Type Names length 1 buffer append else buffer append NON NLS 1 buffer append type NON NLS 1 if simple Name null buffer append simple Name else buffer append NON NLS 1 buffer append NON NLS 1 switch get Match Mode case R EXACT MATCH buffer append exact match NON NLS 1 break case R PREFIX MATCH buffer append prefix match NON NLS 1 break case R PATTERN MATCH buffer append pattern match NON NLS 1 break if is Case Sensitive buffer append case sensitive NON NLS 1 else buffer append case insensitive NON NLS 1 return buffer to String  toString StringBuffer StringBuffer classOrInterface CLASS_SUFFIX ClassDeclarationPattern INTERFACE_SUFFIX InterfaceDeclarationPattern TypeDeclarationPattern enclosingTypeNames enclosingTypeNames enclosingTypeNames enclosingTypeNames simpleName simpleName getMatchMode R_EXACT_MATCH R_PREFIX_MATCH R_PATTERN_MATCH isCaseSensitive toString

public Type Reference Locator Type Reference Pattern pattern super pattern this pattern pattern this is Declaration Of Referenced Types Pattern this pattern instanceof Declaration Of Referenced Types Pattern  TypeReferenceLocator TypeReferencePattern isDeclarationOfReferencedTypesPattern DeclarationOfReferencedTypesPattern
protected I Java Element find Element I Java Element element int accuracy need exact match to be able to open on type ref if accuracy Search Match A ACCURATE return null element that references the type must be included in the enclosing element Declaration Of Referenced Types Pattern decl Pattern Declaration Of Referenced Types Pattern this pattern while element null decl Pattern enclosing Element equals element element element get Parent return element  IJavaElement findElement IJavaElement SearchMatch A_ACCURATE DeclarationOfReferencedTypesPattern declPattern DeclarationOfReferencedTypesPattern declPattern enclosingElement getParent
public int match AST Node node Matching Node Set node Set interested in Import Reference if node instanceof Import Reference return IMPOSSIBLE MATCH return node Set add Match node match Level Import Reference node  ASTNode MatchingNodeSet nodeSet ImportReference ImportReference IMPOSSIBLE_MATCH nodeSet addMatch matchLevel ImportReference
public int match Message Send node Matching Node Set node Set SKIP IT public int match Reference node Matching Node Set node Set interested in Name Reference its subtypes if node instanceof Name Reference return IMPOSSIBLE MATCH if this pattern simple Name null return node Set add Match node Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH if node instanceof Single Name Reference if matches Name this pattern simple Name Single Name Reference node token return node Set add Match node POSSIBLE MATCH resolution is needed to find out if it is a type ref else char tokens Qualified Name Reference node tokens for int i 0 max tokens length i max i if matches Name this pattern simple Name tokens i return node Set add Match node POSSIBLE MATCH resolution is needed to find out if it is a type ref return IMPOSSIBLE MATCH  MessageSend MatchingNodeSet nodeSet MatchingNodeSet nodeSet NameReference NameReference IMPOSSIBLE_MATCH simpleName nodeSet addMatch InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH SingleNameReference matchesName simpleName SingleNameReference nodeSet addMatch POSSIBLE_MATCH QualifiedNameReference matchesName simpleName nodeSet addMatch POSSIBLE_MATCH IMPOSSIBLE_MATCH
public int match Type Declaration node Matching Node Set node Set SKIP IT public int match Type Reference node Matching Node Set node Set if this pattern simple Name null return node Set add Match node Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH if node instanceof Single Type Reference if matches Name this pattern simple Name Single Type Reference node token return node Set add Match node Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH else char tokens Qualified Type Reference node tokens for int i 0 max tokens length i max i if matches Name this pattern simple Name tokens i return node Set add Match node POSSIBLE MATCH resolution is needed to find out if it is a type ref return IMPOSSIBLE MATCH  TypeDeclaration MatchingNodeSet nodeSet TypeReference MatchingNodeSet nodeSet simpleName nodeSet addMatch InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH SingleTypeReference matchesName simpleName SingleTypeReference nodeSet addMatch InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH QualifiedTypeReference matchesName simpleName nodeSet addMatch POSSIBLE_MATCH IMPOSSIBLE_MATCH
protected int match Level Import Reference import Ref if this pattern qualification null if this pattern simple Name null return ACCURATE MATCH char tokens import Ref tokens for int i 0 length tokens length i length i if matches Name this pattern simple Name tokens i return ACCURATE MATCH else char tokens import Ref tokens char qualified Pattern this pattern simple Name null this pattern qualification Char Operation concat this pattern qualification this pattern simple Name char qualified Type Name Char Operation concat With tokens switch this match Mode case Search Pattern R EXACT MATCH case Search Pattern R PREFIX MATCH if Char Operation prefix Equals qualified Pattern qualified Type Name this is Case Sensitive return POSSIBLE MATCH break case Search Pattern R PATTERN MATCH if Char Operation match qualified Pattern qualified Type Name this is Case Sensitive return POSSIBLE MATCH break return IMPOSSIBLE MATCH  matchLevel ImportReference importRef simpleName ACCURATE_MATCH importRef matchesName simpleName ACCURATE_MATCH importRef qualifiedPattern simpleName CharOperation simpleName qualifiedTypeName CharOperation concatWith matchMode SearchPattern R_EXACT_MATCH SearchPattern R_PREFIX_MATCH CharOperation prefixEquals qualifiedPattern qualifiedTypeName isCaseSensitive POSSIBLE_MATCH SearchPattern R_PATTERN_MATCH CharOperation qualifiedPattern qualifiedTypeName isCaseSensitive POSSIBLE_MATCH IMPOSSIBLE_MATCH
protected void match Report Import Ref Import Reference import Ref Binding binding I Java Element element int accuracy Match Locator locator throws Core Exception if this is Declaration Of Referenced Types Pattern if element find Element element accuracy null Simple Set known Types Declaration Of Referenced Types Pattern this pattern known Types while binding instanceof Reference Binding Reference Binding type Binding Reference Binding binding report Declaration type Binding 1 locator known Types binding type Binding enclosing Type return if binding instanceof Reference Binding int last Index import Ref tokens length 1 Reference Binding type Binding Reference Binding binding if type Binding instanceof Problem Reference Binding Problem Reference Binding pb Binding Problem Reference Binding type Binding type Binding pb Binding original last Index pb Binding compound Name length 1 try to match all enclosing types for which the token matches as well while type Binding null last Index 0 if resolve Level For Type this pattern simple Name this pattern qualification type Binding ACCURATE MATCH if locator encloses element long positions import Ref source Positions int start int positions this pattern qualification null last Index 0 32 int end int positions last Index Search Match match locator new Type Reference Match element accuracy start end start 1 import Ref locator report match return last Index type Binding type Binding enclosing Type locator report Accurate Type Reference import Ref this pattern simple Name element accuracy  matchReportImportRef ImportReference importRef IJavaElement MatchLocator CoreException isDeclarationOfReferencedTypesPattern findElement SimpleSet knownTypes DeclarationOfReferencedTypesPattern knownTypes ReferenceBinding ReferenceBinding typeBinding ReferenceBinding reportDeclaration typeBinding knownTypes typeBinding enclosingType ReferenceBinding lastIndex importRef ReferenceBinding typeBinding ReferenceBinding typeBinding ProblemReferenceBinding ProblemReferenceBinding pbBinding ProblemReferenceBinding typeBinding typeBinding pbBinding lastIndex pbBinding compoundName typeBinding lastIndex resolveLevelForType simpleName typeBinding ACCURATE_MATCH importRef sourcePositions lastIndex lastIndex SearchMatch newTypeReferenceMatch importRef lastIndex typeBinding typeBinding enclosingType reportAccurateTypeReference importRef simpleName
protected void match Report Reference Array Type Reference array Ref I Java Element element int accuracy Match Locator locator throws Core Exception if this pattern simple Name null if locator encloses element int offset array Ref source Start Search Match match locator new Type Reference Match element accuracy offset array Ref source End offset 1 array Ref locator report match else locator report Accurate Type Reference array Ref this pattern simple Name element accuracy  matchReportReference ArrayTypeReference arrayRef IJavaElement MatchLocator CoreException simpleName arrayRef sourceStart SearchMatch newTypeReferenceMatch arrayRef sourceEnd arrayRef reportAccurateTypeReference arrayRef simpleName
protected void match Report Reference AST Node reference I Java Element element int accuracy Match Locator locator throws Core Exception if this is Declaration Of Referenced Types Pattern if element find Element element accuracy null report Declaration reference element locator Declaration Of Referenced Types Pattern this pattern known Types return if reference instanceof Qualified Name Reference match Report Reference Qualified Name Reference reference element accuracy locator else if reference instanceof Qualified Type Reference match Report Reference Qualified Type Reference reference element accuracy locator else if reference instanceof Array Type Reference match Report Reference Array Type Reference reference element accuracy locator else int offset reference source Start Search Match match locator new Type Reference Match element accuracy offset reference source End offset 1 reference locator report match  matchReportReference ASTNode IJavaElement MatchLocator CoreException isDeclarationOfReferencedTypesPattern findElement reportDeclaration DeclarationOfReferencedTypesPattern knownTypes QualifiedNameReference matchReportReference QualifiedNameReference QualifiedTypeReference matchReportReference QualifiedTypeReference ArrayTypeReference matchReportReference ArrayTypeReference sourceStart SearchMatch newTypeReferenceMatch sourceEnd
protected void match Report Reference Qualified Name Reference q Name Ref I Java Element element int accuracy Match Locator locator throws Core Exception Binding binding q Name Ref binding Type Binding type Binding null int last Index q Name Ref tokens length 1 switch q Name Ref bits AST Node Restrictive FlagMASK case Binding Ids FIELD reading a field type Binding q Name Ref actual Receiver Type last Index q Name Ref other Bindings null 1 q Name Ref other Bindings length 1 break case Binding Ids TYPE only type if binding instanceof Type Binding type Binding Type Binding binding break case Binding Ids VARIABLE unbound cases case Binding Ids TYPE Binding Ids VARIABLE if binding instanceof Problem Reference Binding type Binding Type Binding binding else if binding instanceof Problem Field Binding type Binding q Name Ref actual Receiver Type last Index q Name Ref other Bindings null 1 q Name Ref other Bindings length 1 else if binding instanceof Problem Binding type Binding Problem Binding binding search Type break if type Binding instanceof Problem Reference Binding Problem Reference Binding pb Binding Problem Reference Binding type Binding type Binding pb Binding original last Index pb Binding compound Name length 1 try to match all enclosing types for which the token matches as well if type Binding instanceof Reference Binding Reference Binding ref Binding Reference Binding type Binding while ref Binding null last Index 0 if resolve Level For Type this pattern simple Name this pattern qualification ref Binding ACCURATE MATCH if locator encloses element long positions q Name Ref source Positions int start int positions this pattern qualification null last Index 0 32 int end int positions last Index Search Match match locator new Type Reference Match element accuracy start end start 1 q Name Ref locator report match return last Index ref Binding ref Binding enclosing Type locator report Accurate Type Reference q Name Ref this pattern simple Name element accuracy  matchReportReference QualifiedNameReference qNameRef IJavaElement MatchLocator CoreException qNameRef TypeBinding typeBinding lastIndex qNameRef qNameRef ASTNode RestrictiveFlagMASK BindingIds typeBinding qNameRef actualReceiverType lastIndex qNameRef otherBindings qNameRef otherBindings BindingIds TypeBinding typeBinding TypeBinding BindingIds BindingIds BindingIds ProblemReferenceBinding typeBinding TypeBinding ProblemFieldBinding typeBinding qNameRef actualReceiverType lastIndex qNameRef otherBindings qNameRef otherBindings ProblemBinding typeBinding ProblemBinding searchType typeBinding ProblemReferenceBinding ProblemReferenceBinding pbBinding ProblemReferenceBinding typeBinding typeBinding pbBinding lastIndex pbBinding compoundName typeBinding ReferenceBinding ReferenceBinding refBinding ReferenceBinding typeBinding refBinding lastIndex resolveLevelForType simpleName refBinding ACCURATE_MATCH qNameRef sourcePositions lastIndex lastIndex SearchMatch newTypeReferenceMatch qNameRef lastIndex refBinding refBinding enclosingType reportAccurateTypeReference qNameRef simpleName
protected void match Report Reference Qualified Type Reference q Type Ref I Java Element element int accuracy Match Locator locator throws Core Exception Type Binding type Binding q Type Ref resolved Type int last Index q Type Ref tokens length 1 if type Binding instanceof Array Binding type Binding Array Binding type Binding leaf Component Type if type Binding instanceof Problem Reference Binding Problem Reference Binding pb Binding Problem Reference Binding type Binding type Binding pb Binding original last Index pb Binding compound Name length 1 try to match all enclosing types for which the token matches as well if type Binding instanceof Reference Binding Reference Binding ref Binding Reference Binding type Binding while ref Binding null last Index 0 if resolve Level For Type this pattern simple Name this pattern qualification ref Binding ACCURATE MATCH if locator encloses element long positions q Type Ref source Positions int start int positions this pattern qualification null last Index 0 32 int end int positions last Index Search Match match locator new Type Reference Match element accuracy start end start 1 q Type Ref locator report match return last Index ref Binding ref Binding enclosing Type locator report Accurate Type Reference q Type Ref this pattern simple Name element accuracy  matchReportReference QualifiedTypeReference qTypeRef IJavaElement MatchLocator CoreException TypeBinding typeBinding qTypeRef resolvedType lastIndex qTypeRef typeBinding ArrayBinding typeBinding ArrayBinding typeBinding leafComponentType typeBinding ProblemReferenceBinding ProblemReferenceBinding pbBinding ProblemReferenceBinding typeBinding typeBinding pbBinding lastIndex pbBinding compoundName typeBinding ReferenceBinding ReferenceBinding refBinding ReferenceBinding typeBinding refBinding lastIndex resolveLevelForType simpleName refBinding ACCURATE_MATCH qTypeRef sourcePositions lastIndex lastIndex SearchMatch newTypeReferenceMatch qTypeRef lastIndex refBinding refBinding enclosingType reportAccurateTypeReference qTypeRef simpleName
locator report Accurate Type Reference q Type Ref this pattern simple Name element accuracy protected int reference Type return I Java Element TYPE  reportAccurateTypeReference qTypeRef simpleName referenceType IJavaElement
protected void report Declaration AST Node reference I Java Element element Match Locator locator Simple Set known Types throws Core Exception int max Type 1 Type Binding type Binding null if reference instanceof Type Reference type Binding Type Reference reference resolved Type max Type Integer MAX VALUE else if reference instanceof Qualified Name Reference Qualified Name Reference q Name Ref Qualified Name Reference reference Binding binding q Name Ref binding max Type q Name Ref tokens length 1 switch q Name Ref bits AST Node Restrictive FlagMASK case Binding Ids FIELD reading a field type Binding q Name Ref actual Receiver Type max Type q Name Ref other Bindings null 1 q Name Ref other Bindings length 1 break case Binding Ids TYPE only type if binding instanceof Type Binding type Binding Type Binding binding break case Binding Ids VARIABLE unbound cases case Binding Ids TYPE Binding Ids VARIABLE if binding instanceof Problem Field Binding type Binding q Name Ref actual Receiver Type max Type q Name Ref other Bindings null 1 q Name Ref other Bindings length 1 else if binding instanceof Problem Binding Problem Binding pb Binding Problem Binding binding type Binding pb Binding search Type second chance with recorded type so far char partial Qualified Name pb Binding name max Type Char Operation occurences Of partial Qualified Name 1 index of last bound token is one before the pb token if type Binding null max Type 0 return break else if reference instanceof Single Name Reference type Binding Type Binding Single Name Reference reference binding max Type 1 if type Binding instanceof Array Binding type Binding Array Binding type Binding leaf Component Type if type Binding null type Binding instanceof Base Type Binding return if type Binding instanceof Problem Reference Binding type Binding Problem Reference Binding type Binding original report Declaration Reference Binding type Binding max Type locator known Types  reportDeclaration ASTNode IJavaElement MatchLocator SimpleSet knownTypes CoreException maxType TypeBinding typeBinding TypeReference typeBinding TypeReference resolvedType maxType MAX_VALUE QualifiedNameReference QualifiedNameReference qNameRef QualifiedNameReference qNameRef maxType qNameRef qNameRef ASTNode RestrictiveFlagMASK BindingIds typeBinding qNameRef actualReceiverType maxType qNameRef otherBindings qNameRef otherBindings BindingIds TypeBinding typeBinding TypeBinding BindingIds BindingIds BindingIds ProblemFieldBinding typeBinding qNameRef actualReceiverType maxType qNameRef otherBindings qNameRef otherBindings ProblemBinding ProblemBinding pbBinding ProblemBinding typeBinding pbBinding searchType partialQualifiedName pbBinding maxType CharOperation occurencesOf partialQualifiedName typeBinding maxType SingleNameReference typeBinding TypeBinding SingleNameReference maxType typeBinding ArrayBinding typeBinding ArrayBinding typeBinding leafComponentType typeBinding typeBinding BaseTypeBinding typeBinding ProblemReferenceBinding typeBinding ProblemReferenceBinding typeBinding reportDeclaration ReferenceBinding typeBinding maxType knownTypes
protected void report Declaration Reference Binding type Binding int max Type Match Locator locator Simple Set known Types throws Core Exception I Type type locator lookup Type type Binding if type null return case of a secondary type I Resource resource type get Resource boolean is Binary type is Binary I Binary Type info null if is Binary if resource null resource type get Java Project get Project info locator get Binary Info org eclipse jdt internal core Class File type get Class File resource while max Type 0 type null if known Types includes type if is Binary locator report Binary Member Declaration resource type info Search Match A ACCURATE else Class Scope scope Source Type Binding type Binding scope if scope null Type Declaration type Decl scope reference Context int offset type Decl source Start Search Match match new Type Declaration Match type Search Match A ACCURATE offset type Decl source End offset 1 locator get Participant resource locator report match known Types add type type Binding type Binding enclosing Type I Java Element parent type get Parent if parent instanceof I Type type I Type parent else type null max Type  reportDeclaration ReferenceBinding typeBinding maxType MatchLocator SimpleSet knownTypes CoreException IType lookupType typeBinding IResource getResource isBinary isBinary IBinaryType isBinary getJavaProject getProject getBinaryInfo ClassFile getClassFile maxType knownTypes isBinary reportBinaryMemberDeclaration SearchMatch A_ACCURATE ClassScope SourceTypeBinding typeBinding TypeDeclaration typeDecl referenceContext typeDecl sourceStart SearchMatch TypeDeclarationMatch SearchMatch A_ACCURATE typeDecl sourceEnd getParticipant knownTypes typeBinding typeBinding enclosingType IJavaElement getParent IType IType maxType
public int resolve Level AST Node node if node instanceof Type Reference return resolve Level Type Reference node if node instanceof Name Reference return resolve Level Name Reference node if node instanceof Import Reference Not called when resolve is true see Matching Node Set report Matching unit return IMPOSSIBLE MATCH  resolveLevel ASTNode TypeReference resolveLevel TypeReference NameReference resolveLevel NameReference ImportReference MatchingNodeSet reportMatching IMPOSSIBLE_MATCH
public int resolve Level Binding binding if binding null return INACCURATE MATCH if binding instanceof Type Binding return IMPOSSIBLE MATCH Type Binding type Binding Type Binding binding if type Binding instanceof Array Binding type Binding Array Binding type Binding leaf Component Type if type Binding instanceof Problem Reference Binding type Binding Problem Reference Binding type Binding original if Internal Search Pattern this pattern focus instanceof I Type type Binding instanceof Reference Binding I Package Fragment pkg I Type Internal Search Pattern this pattern focus get Package Fragment check that type is located inside this instance of a package fragment if Package Reference Locator is Declaring Package Fragment pkg Reference Binding type Binding return IMPOSSIBLE MATCH return resolve Level For Type Or Enclosing Types this pattern simple Name this pattern qualification type Binding  resolveLevel INACCURATE_MATCH TypeBinding IMPOSSIBLE_MATCH TypeBinding typeBinding TypeBinding typeBinding ArrayBinding typeBinding ArrayBinding typeBinding leafComponentType typeBinding ProblemReferenceBinding typeBinding ProblemReferenceBinding typeBinding InternalSearchPattern IType typeBinding ReferenceBinding IPackageFragment IType InternalSearchPattern getPackageFragment PackageReferenceLocator isDeclaringPackageFragment ReferenceBinding typeBinding IMPOSSIBLE_MATCH resolveLevelForTypeOrEnclosingTypes simpleName typeBinding
protected int resolve Level Name Reference name Ref Binding binding name Ref binding if name Ref instanceof Single Name Reference if binding instanceof Problem Reference Binding binding Problem Reference Binding binding original if binding instanceof Reference Binding return resolve Level For Type this pattern simple Name this pattern qualification Reference Binding binding return binding null binding instanceof Problem Binding INACCURATE MATCH IMPOSSIBLE MATCH Type Binding type Binding null Qualified Name Reference q Name Ref Qualified Name Reference name Ref switch q Name Ref bits AST Node Restrictive FlagMASK case Binding Ids FIELD reading a field if q Name Ref tokens length q Name Ref other Bindings null 2 q Name Ref other Bindings length 2 return IMPOSSIBLE MATCH must be at least A x type Binding name Ref actual Receiver Type break case Binding Ids LOCAL reading a local variable return IMPOSSIBLE MATCH no type match in it case Binding Ids TYPE only type if binding instanceof Type Binding type Binding Type Binding binding break Handling of unbound qualified name references The match may reside in the resolved fragment which is recorded inside the problem binding along with the portion of the name until it became a problem case Binding Ids VARIABLE unbound cases case Binding Ids TYPE Binding Ids VARIABLE if binding instanceof Problem Reference Binding type Binding Type Binding binding else if binding instanceof Problem Field Binding if q Name Ref tokens length q Name Ref other Bindings null 2 q Name Ref other Bindings length 2 return IMPOSSIBLE MATCH must be at least A x type Binding name Ref actual Receiver Type else if binding instanceof Problem Binding Problem Binding pb Binding Problem Binding binding if Char Operation occurences Of pb Binding name 0 index of last bound token is one before the pb token return INACCURATE MATCH type Binding pb Binding search Type break return resolve Level type Binding  resolveLevel NameReference nameRef nameRef nameRef SingleNameReference ProblemReferenceBinding ProblemReferenceBinding ReferenceBinding resolveLevelForType simpleName ReferenceBinding ProblemBinding INACCURATE_MATCH IMPOSSIBLE_MATCH TypeBinding typeBinding QualifiedNameReference qNameRef QualifiedNameReference nameRef qNameRef ASTNode RestrictiveFlagMASK BindingIds qNameRef qNameRef otherBindings qNameRef otherBindings IMPOSSIBLE_MATCH typeBinding nameRef actualReceiverType BindingIds IMPOSSIBLE_MATCH BindingIds TypeBinding typeBinding TypeBinding BindingIds BindingIds BindingIds ProblemReferenceBinding typeBinding TypeBinding ProblemFieldBinding qNameRef qNameRef otherBindings qNameRef otherBindings IMPOSSIBLE_MATCH typeBinding nameRef actualReceiverType ProblemBinding ProblemBinding pbBinding ProblemBinding CharOperation occurencesOf pbBinding INACCURATE_MATCH typeBinding pbBinding searchType resolveLevel typeBinding
protected int resolve Level Type Reference type Ref Type Binding type Binding type Ref resolved Type if type Binding instanceof Array Binding type Binding Array Binding type Binding leaf Component Type if type Binding instanceof Problem Reference Binding type Binding Problem Reference Binding type Binding original if type Ref instanceof Single Type Reference return resolve Level For Type this pattern simple Name this pattern qualification type Binding else return resolve Level For Type Or Enclosing Types this pattern simple Name this pattern qualification type Binding  resolveLevel TypeReference typeRef TypeBinding typeBinding typeRef resolvedType typeBinding ArrayBinding typeBinding ArrayBinding typeBinding leafComponentType typeBinding ProblemReferenceBinding typeBinding ProblemReferenceBinding typeBinding typeRef SingleTypeReference resolveLevelForType simpleName typeBinding resolveLevelForTypeOrEnclosingTypes simpleName typeBinding
Returns whether the given type binding or one of its enclosing types matches the given simple name pattern and qualification pattern Returns ACCURATE MATCH if it does Returns INACCURATE MATCH if resolve failed Returns IMPOSSIBLE MATCH if it doesn t protected int resolve Level For Type Or Enclosing Types char simple Name Pattern char qualification Pattern Type Binding binding if binding null return INACCURATE MATCH if binding instanceof Reference Binding Reference Binding type Reference Binding binding char qualified Pattern qualified Pattern simple Name Pattern qualification Pattern while type null if resolve Level For Type qualified Pattern type ACCURATE MATCH return ACCURATE MATCH type type enclosing Type return IMPOSSIBLE MATCH  ACCURATE_MATCH INACCURATE_MATCH IMPOSSIBLE_MATCH resolveLevelForTypeOrEnclosingTypes simpleNamePattern qualificationPattern TypeBinding INACCURATE_MATCH ReferenceBinding ReferenceBinding ReferenceBinding qualifiedPattern qualifiedPattern simpleNamePattern qualificationPattern resolveLevelForType qualifiedPattern ACCURATE_MATCH ACCURATE_MATCH enclosingType IMPOSSIBLE_MATCH
return IMPOSSIBLE MATCH public String to String return Locator for this pattern to String NON NLS 1  IMPOSSIBLE_MATCH toString toString

public Type Reference Pattern char qualification char simple Name int match Rule this match Rule this qualification is Case Sensitive qualification Char Operation to Lower Case qualification this simple Name is Case Sensitive simple Name Char Operation to Lower Case simple Name if simple Name null this segments this qualification null ONE STAR CHAR Char Operation split On this qualification else this segments null Internal Search Pattern this must Resolve true always resolve in case of a simple name reference being a potential match  TypeReferencePattern simpleName matchRule matchRule isCaseSensitive CharOperation toLowerCase simpleName isCaseSensitive simpleName CharOperation toLowerCase simpleName simpleName ONE_STAR_CHAR CharOperation splitOn InternalSearchPattern mustResolve
Internal Search Pattern this must Resolve true always resolve in case of a simple name reference being a potential match Type Reference Pattern int match Rule super TYPE REF PATTERN match Rule  InternalSearchPattern mustResolve TypeReferencePattern matchRule TYPE_REF_PATTERN matchRule
super TYPE REF PATTERN match Rule public void decode Index Key char key this simple Name key  TYPE_REF_PATTERN matchRule decodeIndexKey simpleName
this simple Name key public Search Pattern get Blank Pattern return new Type Reference Pattern R EXACT MATCH R CASE SENSITIVE  simpleName SearchPattern getBlankPattern TypeReferencePattern R_EXACT_MATCH R_CASE_SENSITIVE
public char get Index Key if this simple Name null return this simple Name Optimization eg type reference is org eclipse jdt core if this current Segment 0 return this segments this current Segment return null  getIndexKey simpleName simpleName currentSegment currentSegment
return null public char get Index Categories return CATEGORIES  getIndexCategories
protected boolean has Next Query if this segments null return false Optimization eg type reference is org eclipse jdt core if package has at least 4 segments don t look at the first 2 since they are mostly redundant eg in org eclipse jdt core org eclipse is used all the time return this current Segment this segments length 4 2 0  hasNextQuery currentSegment
return this current Segment this segments length 4 2 0 public boolean matches Decoded Key Search Pattern decoded Pattern return true index key is not encoded so query results all match  currentSegment matchesDecodedKey SearchPattern decodedPattern
protected void reset Query walk the segments from end to start as it will find less potential references using lang than java if this segments null this current Segment this segments length 1  resetQuery currentSegment
public String to String String Buffer buffer new String Buffer 20 buffer append Type Reference Pattern qualification NON NLS 1 if qualification null buffer append qualification else buffer append NON NLS 1 buffer append type NON NLS 1 if simple Name null buffer append simple Name else buffer append NON NLS 1 buffer append NON NLS 1 switch get Match Mode case R EXACT MATCH buffer append exact match NON NLS 1 break case R PREFIX MATCH buffer append prefix match NON NLS 1 break case R PATTERN MATCH buffer append pattern match NON NLS 1 break if is Case Sensitive buffer append case sensitive NON NLS 1 else buffer append case insensitive NON NLS 1 return buffer to String  toString StringBuffer StringBuffer TypeReferencePattern simpleName simpleName getMatchMode R_EXACT_MATCH R_PREFIX_MATCH R_PATTERN_MATCH isCaseSensitive toString

public Variable Locator Variable Pattern pattern super pattern this pattern pattern  VariableLocator VariablePattern
public int match Expression node Matching Node Set node Set interested in Assignment if this pattern write Access if this pattern read Access return IMPOSSIBLE MATCH already checked the lhs in match Reference before we reached here if node instanceof Assignment Expression lhs Assignment node lhs if lhs instanceof Reference return match Reference Reference lhs node Set true else if this pattern read Access if node instanceof Assignment node instanceof Compound Assignment the lhs of a simple assignment may be added in match Reference before we reach here for example the field Ref to this x in the statement this x x is not considered a read Access Expression lhs Assignment node lhs node Set remove Possible Match lhs node Set remove Trusted Match lhs return IMPOSSIBLE MATCH  MatchingNodeSet nodeSet writeAccess readAccess IMPOSSIBLE_MATCH matchReference nodeSet readAccess CompoundAssignment fieldRef readAccess nodeSet removePossibleMatch nodeSet removeTrustedMatch IMPOSSIBLE_MATCH
public int match Reference node Matching Node Set node Set interested in Name Reference its subtypes return this pattern read Access match Reference node node Set false IMPOSSIBLE MATCH  MatchingNodeSet nodeSet NameReference readAccess matchReference nodeSet IMPOSSIBLE_MATCH
protected int match Reference Reference node Matching Node Set node Set boolean write Only Access if node instanceof Name Reference if this pattern name null return node Set add Match node Internal Search Pattern this pattern must Resolve POSSIBLE MATCH ACCURATE MATCH else if node instanceof Single Name Reference if matches Name this pattern name Single Name Reference node token return node Set add Match node POSSIBLE MATCH else Qualified Name Reference q Name Ref Qualified Name Reference node char tokens q Name Ref tokens if write Only Access in the case of the assigment of a qualified name reference the match must be on the last token if matches Name this pattern name tokens tokens length 1 return node Set add Match node POSSIBLE MATCH else for int i 0 max tokens length i max i if matches Name this pattern name tokens i return node Set add Match node POSSIBLE MATCH return IMPOSSIBLE MATCH  matchReference MatchingNodeSet nodeSet writeOnlyAccess NameReference nodeSet addMatch InternalSearchPattern mustResolve POSSIBLE_MATCH ACCURATE_MATCH SingleNameReference matchesName SingleNameReference nodeSet addMatch POSSIBLE_MATCH QualifiedNameReference qNameRef QualifiedNameReference qNameRef writeOnlyAccess matchesName nodeSet addMatch POSSIBLE_MATCH matchesName nodeSet addMatch POSSIBLE_MATCH IMPOSSIBLE_MATCH
return IMPOSSIBLE MATCH public String to String return Locator for this pattern to String NON NLS 1  IMPOSSIBLE_MATCH toString toString

public Variable Pattern int pattern Kind boolean find Declarations boolean read Access boolean write Access char name int match Rule super pattern Kind match Rule this find Declarations find Declarations set to find declarations all occurences this read Access read Access set to find any reference read only references all occurences this write Access write Access set to find any reference write only references all occurences this find References read Access write Access this name is Case Sensitive name Char Operation to Lower Case name  VariablePattern patternKind findDeclarations readAccess writeAccess matchRule patternKind matchRule findDeclarations findDeclarations readAccess readAccess writeAccess writeAccess findReferences readAccess writeAccess isCaseSensitive CharOperation toLowerCase
find out if this method pattern matches it protected boolean must Resolve would like to change this so that we only do it if generic references are found return this find References always resolve in case of a simple name reference being a potential match  mustResolve findReferences

see Index Query Requestor accept Index Match Index Record Search Participant Search Pattern public boolean accept Index Match String document Path Search Pattern index Record Search Participant participant paths add document Path return true  seeIndexQueryRequestor acceptIndexMatch IndexRecord SearchParticipant SearchPattern acceptIndexMatch documentPath SearchPattern indexRecord SearchParticipant documentPath
Returns the paths that have been collected public String get Paths String result new String this paths size int i 0 for Iterator iter this paths iterator iter has Next result i String iter next return result  getPaths hasNext

public Pattern Search Job Search Pattern pattern Search Participant participant I Java Search Scope scope Index Query Requestor requestor this pattern pattern this participant participant this scope scope this requestor requestor  PatternSearchJob SearchPattern SearchParticipant IJavaSearchScope IndexQueryRequestor
this requestor requestor public boolean belongs To String job Family return true  belongsTo jobFamily
return true public void cancel search job is cancelled through progress 
search job is cancelled through progress public void ensure Ready To Run if this are Indexes Ready get Indexes null progress may trigger some index recreation  ensureReadyToRun areIndexesReady getIndexes
public boolean execute I Progress Monitor progress Monitor if progress Monitor null progress Monitor is Canceled throw new Operation Canceled Exception boolean is Complete COMPLETE execution Time 0 Index indexes get Indexes progress Monitor try int max indexes length if progress Monitor null progress Monitor begin Task max NON NLS 1 for int i 0 i max i is Complete search indexes i progress Monitor if progress Monitor null if progress Monitor is Canceled throw new Operation Canceled Exception progress Monitor worked 1 if Job Manager VERBOSE Util verbose execution time execution Time ms this NON NLS 1 NON NLS 2 return is Complete finally if progress Monitor null progress Monitor done  IProgressMonitor progressMonitor progressMonitor progressMonitor isCanceled OperationCanceledException isComplete executionTime getIndexes progressMonitor progressMonitor progressMonitor beginTask isComplete progressMonitor progressMonitor progressMonitor isCanceled OperationCanceledException progressMonitor JobManager executionTime isComplete progressMonitor progressMonitor
public Index get Indexes I Progress Monitor progress Monitor acquire the in memory indexes on the fly I Path index Locations this participant select Indexes this pattern this scope int length index Locations length Index indexes new Index length int count 0 Index Manager index Manager Java Model Manager get Java Model Manager get Index Manager for int i 0 i length i if progress Monitor null progress Monitor is Canceled throw new Operation Canceled Exception may trigger some index recreation work String index Location index Locations i toOS String I Path container Path I Path index Manager index Locations key For Value index Location Index index index Manager get Index container Path index Locations i toOS String true reuse index file false do not create if none if index null indexes count index only consider indexes which are ready if count length this are Indexes Ready true else System arraycopy indexes 0 indexes new Index count 0 count return indexes  getIndexes IProgressMonitor progressMonitor IPath indexLocations selectIndexes indexLocations IndexManager indexManager JavaModelManager getJavaModelManager getIndexManager progressMonitor progressMonitor isCanceled OperationCanceledException indexLocation indexLocations toOSString IPath containerPath IPath indexManager indexLocations keyForValue indexLocation indexManager getIndex containerPath indexLocations toOSString areIndexesReady
public boolean search Index index I Progress Monitor progress Monitor if index null return COMPLETE if progress Monitor null progress Monitor is Canceled throw new Operation Canceled Exception Read Write Monitor monitor index monitor if monitor null return COMPLETE index got deleted since acquired try monitor enter Read ask permission to read long start System current Time Millis Match Locator find Index Matches this pattern index requestor this participant this scope progress Monitor execution Time System current Time Millis start return COMPLETE catch IO Exception e if e instanceof java io EOF Exception e print Stack Trace return FAILED finally monitor exit Read finished reading  IProgressMonitor progressMonitor progressMonitor progressMonitor isCanceled OperationCanceledException ReadWriteMonitor enterRead currentTimeMillis MatchLocator findIndexMatches progressMonitor executionTime currentTimeMillis IOException EOFException printStackTrace exitRead
public String to String return searching pattern to String NON NLS 1  toString toString

boolean COMPLETE true Answer true if the job belongs to a given family tag public boolean belongs To String job Family  belongsTo jobFamily
public boolean belongs To String job Family Asks this job to cancel its execution The cancellation can take an undertermined amount of time  belongsTo jobFamily
public void cancel Ensures that this job is ready to run public void ensure Ready To Run  ensureReadyToRun
public void ensure Ready To Run Execute the current job answer whether it was successful public boolean execute I Progress Monitor progress  ensureReadyToRun IProgressMonitor

Invoked exactly once in background before starting processing any job public void activate Processing this activated true  activateProcessing
Answer the amount of awaiting jobs public synchronized int awaiting Jobs Count pretend busy in case concurrent job attempts performing before activated return this activated this job End this job Start 1 1  awaitingJobsCount jobEnd jobStart
Answers the first job in the queue or null if there is no job available Until the job has completed the job manager will keep answering the same job public synchronized I Job current Job if this enable Count 0 this job Start this job End return this awaiting Jobs this job Start return null  IJob currentJob enableCount jobStart jobEnd awaitingJobs jobStart
public void disable this enable Count if VERBOSE Util verbose DISABLING background indexing NON NLS 1  enableCount
Remove the index from cache for a given project Passing null as a job family discards them all public void discard Jobs String job Family if VERBOSE Util verbose DISCARD background job family job Family NON NLS 1 try I Job current Job cancel current job if it belongs to the given family synchronized this current Job this current Job disable if current Job null job Family null current Job belongs To job Family current Job cancel wait until current active job has finished while this processing Thread null this executing try if VERBOSE Util verbose waiting end of current background job current Job NON NLS 1 NON NLS 2 Thread sleep 50 catch Interrupted Exception e ignore flush and compact awaiting jobs int loc 1 synchronized this for int i this job Start i this job End i current Job this awaiting Jobs i this awaiting Jobs i null if job Family null current Job belongs To job Family copy down compacting this awaiting Jobs loc current Job else if VERBOSE Util verbose discarding background job current Job NON NLS 1 current Job cancel this job Start 0 this job End loc finally enable if VERBOSE Util verbose DISCARD DONE with background job family job Family NON NLS 1  discardJobs jobFamily jobFamily IJob currentJob currentJob currentJob currentJob jobFamily currentJob belongsTo jobFamily currentJob processingThread currentJob InterruptedException jobStart jobEnd currentJob awaitingJobs awaitingJobs jobFamily currentJob belongsTo jobFamily awaitingJobs currentJob currentJob currentJob jobStart jobEnd jobFamily
public synchronized void enable this enable Count if VERBOSE Util verbose ENABLING background indexing NON NLS 1 this notify All wake up the background thread if it is waiting context must be synchronized  enableCount notifyAll
Advance to the next available job once the current one has been completed Note clients awaiting until the job count is zero are still waiting at this point protected synchronized void move To Next Job if enabled return if this job Start this job End this awaiting Jobs this job Start null if this job Start this job End this job Start 0 this job End 1  moveToNextJob jobStart jobEnd awaitingJobs jobStart jobStart jobEnd jobStart jobEnd
When idle give chance to do something protected void notify Idle long idling Time do nothing  notifyIdle idlingTime
This API is allowing to run one job in concurrence with background processing Indeed since other jobs are performed in background resource sharing might be an issue Therefore this functionality allows a given job to be run without colliding with background ones Note multiple thread might attempt to perform concurrent jobs at the same time and should synchronize it is deliberately left to clients to decide whether concurrent jobs might interfere or not In general multiple read jobs are ok Waiting policy can be I Job Constants Force Immediate Search I Job Constants Cancel If Not Ready To Search I Job Constants Wait Until Ready To Search public boolean perform Concurrent Job I Job search Job int waiting Policy I Progress Monitor progress if VERBOSE Util verbose STARTING concurrent job search Job NON NLS 1 search Job ensure Ready To Run int concurrent Job Work 100 if progress null progress begin Task concurrent Job Work NON NLS 1 boolean status I Job FAILED if awaiting Jobs Count 0 switch waiting Policy case I Job Force Immediate if VERBOSE Util verbose NOT READY forcing immediate search Job NON NLS 1 try disable pause indexing status search Job execute progress null null new Sub Progress Monitor progress concurrent Job Work finally enable if VERBOSE Util verbose FINISHED concurrent job search Job NON NLS 1 return status case I Job Cancel If Not Ready if VERBOSE Util verbose NOT READY cancelling search Job NON NLS 1 if progress null progress set Canceled true if VERBOSE Util verbose CANCELED concurrent job search Job NON NLS 1 throw new Operation Canceled Exception case I Job Wait Until Ready int awaiting Work I Job previous Job null I Job current Job I Progress Monitor sub Progress null int total Work this awaiting Jobs Count if progress null total Work 0 sub Progress new Sub Progress Monitor progress concurrent Job Work 2 sub Progress begin Task total Work NON NLS 1 concurrent Job Work concurrent Job Work 2 use local variable to avoid potential NPE see bug 20435 NPE when searching java method and bug 42760 Null Pointer Exception in Job Manager when searching Thread t this processing Thread int original Priority t null 1 t get Priority try if t null t set Priority Thread current Thread get Priority synchronized this this awaiting Clients while awaiting Work awaiting Jobs Count 0 if sub Progress null sub Progress is Canceled throw new Operation Canceled Exception current Job current Job current Job can be null when jobs have been added to the queue but job manager is not enabled if current Job null current Job previous Job if VERBOSE Util verbose NOT READY waiting until ready search Job NON NLS 1 if sub Progress null sub Progress sub Task Util bind manager files To Index Integer to String awaiting Work NON NLS 1 sub Progress worked 1 previous Job current Job try if VERBOSE Util verbose GOING TO SLEEP search Job NON NLS 1 Thread sleep 50 catch Interrupted Exception e ignore finally synchronized this this awaiting Clients if original Priority 1 t is Alive t set Priority original Priority if sub Progress null sub Progress done status search Job execute progress null null new Sub Progress Monitor progress concurrent Job Work if progress null progress done if VERBOSE Util verbose FINISHED concurrent job search Job NON NLS 1 return status  IJobConstants ForceImmediateSearch IJobConstants CancelIfNotReadyToSearch IJobConstants WaitUntilReadyToSearch performConcurrentJob IJob searchJob waitingPolicy IProgressMonitor searchJob searchJob ensureReadyToRun concurrentJobWork beginTask concurrentJobWork IJob awaitingJobsCount waitingPolicy IJob ForceImmediate searchJob searchJob SubProgressMonitor concurrentJobWork searchJob IJob CancelIfNotReady searchJob setCanceled searchJob OperationCanceledException IJob WaitUntilReady awaitingWork IJob previousJob IJob currentJob IProgressMonitor subProgress totalWork awaitingJobsCount totalWork subProgress SubProgressMonitor concurrentJobWork subProgress beginTask totalWork concurrentJobWork concurrentJobWork NullPointerException JobManager processingThread originalPriority getPriority setPriority currentThread getPriority awaitingClients awaitingWork awaitingJobsCount subProgress subProgress isCanceled OperationCanceledException currentJob currentJob currentJob currentJob currentJob previousJob searchJob subProgress subProgress subTask filesToIndex toString awaitingWork subProgress previousJob currentJob searchJob InterruptedException awaitingClients originalPriority isAlive setPriority originalPriority subProgress subProgress searchJob SubProgressMonitor concurrentJobWork searchJob
return status public abstract String process Name  processName
public synchronized void request I Job job job ensure Ready To Run append the job to the list of ones to process later on int size this awaiting Jobs length if this job End size when growing relocate jobs starting at position 0 this job End this job Start System arraycopy this awaiting Jobs this job Start this awaiting Jobs new I Job size 2 0 this job End this job Start 0 this awaiting Jobs this job End job if VERBOSE Util verbose REQUEST background job job NON NLS 1 Util verbose AWAITING JOBS count awaiting Jobs Count NON NLS 1 notify All wake up the background thread if it is waiting  IJob ensureReadyToRun awaitingJobs jobEnd jobEnd jobStart awaitingJobs jobStart awaitingJobs IJob jobEnd jobStart awaitingJobs jobEnd awaitingJobsCount notifyAll
Flush current state public synchronized void reset if VERBOSE Util verbose Reset NON NLS 1 if this processing Thread null discard Jobs null discard all jobs else initiate background processing this processing Thread new Thread this this process Name this processing Thread set Daemon true less prioritary by default priority is raised if clients are actively waiting on it this processing Thread set Priority Thread NORM PRIORITY 1 this processing Thread start  processingThread discardJobs processingThread processName processingThread setDaemon processingThread setPriority NORM_PRIORITY processingThread
try class Progress Job extends Job Progress Job String name super name  ProgressJob ProgressJob
protected I Status run I Progress Monitor monitor int awaiting Jobs Count while awaiting Jobs Count awaiting Jobs Count 0 monitor sub Task Util bind manager files To Index Integer to String awaiting Jobs Count NON NLS 1 try Thread sleep 500 catch Interrupted Exception e ignore return Status OK STATUS  IStatus IProgressMonitor awaitingJobsCount awaitingJobsCount awaitingJobsCount subTask filesToIndex toString awaitingJobsCount InterruptedException OK_STATUS
Infinite loop performing resource indexing public void run long idling Start 1 activate Processing try class Progress Job extends Job Progress Job String name super name protected I Status run I Progress Monitor monitor int awaiting Jobs Count while awaiting Jobs Count awaiting Jobs Count 0 monitor sub Task Util bind manager files To Index Integer to String awaiting Jobs Count NON NLS 1 try Thread sleep 500 catch Interrupted Exception e ignore return Status OK STATUS Progress Job progress Job null while this processing Thread null try I Job job synchronized this handle shutdown case when notify All came before the wait but after the while loop was entered if this processing Thread null continue must check for new job inside this sync block to avoid timing hole if job current Job null if progress Job null progress Job null if idling Start 0 idling Start System current Time Millis else notify Idle System current Time Millis idling Start this wait wait until a new job is posted or reenabled 38901 else idling Start 1 if job null notify Idle System current Time Millis idling Start just woke up delay before processing any new jobs allow some time for the active thread to finish Thread sleep 500 continue if VERBOSE Util verbose awaiting Jobs Count awaiting jobs NON NLS 1 Util verbose STARTING background job job NON NLS 1 try this executing true if progress Job null progress Job new Progress Job Util bind manager indexing In Progress NON NLS 1 progress Job set Priority Job LONG progress Job set System true progress Job schedule boolean status job execute null if status FAILED request job finally this executing false if VERBOSE Util verbose FINISHED background job job NON NLS 1 move To Next Job if this awaiting Clients 0 Thread sleep 50 catch Interrupted Exception e background indexing was interrupted catch Runtime Exception e if this processing Thread null if not shutting down log exception Util log e Background Indexer Crash Recovery NON NLS 1 keep job manager alive this discard Jobs null this processing Thread null this reset this will fork a new thread with no waiting jobs some indexes will be inconsistent throw e catch Error e if this processing Thread null e instanceof Thread Death log exception Util log e Background Indexer Crash Recovery NON NLS 1 keep job manager alive this discard Jobs null this processing Thread null this reset this will fork a new thread with no waiting jobs some indexes will be inconsistent throw e  idlingStart activateProcessing ProgressJob ProgressJob IStatus IProgressMonitor awaitingJobsCount awaitingJobsCount awaitingJobsCount subTask filesToIndex toString awaitingJobsCount InterruptedException OK_STATUS ProgressJob progressJob processingThread IJob notifyAll processingThread currentJob progressJob progressJob idlingStart idlingStart currentTimeMillis notifyIdle currentTimeMillis idlingStart idlingStart notifyIdle currentTimeMillis idlingStart awaitingJobsCount progressJob progressJob ProgressJob indexingInProgress progressJob setPriority progressJob setSystem progressJob moveToNextJob awaitingClients InterruptedException RuntimeException processingThread discardJobs processingThread processingThread ThreadDeath discardJobs processingThread
Stop background processing and wait until the current job is completed before returning public void shutdown if VERBOSE Util verbose Shutdown NON NLS 1 disable discard Jobs null will wait until current executing job has completed Thread thread this processing Thread try if thread null see http bugs eclipse org bugs show bug cgi id 31858 synchronized this this processing Thread null mark the job manager as shutting down so that the thread will stop by itself this notify All ensure its awake so it can be shutdown in case processing thread is handling a job thread join catch Interrupted Exception e ignore  discardJobs processingThread show_bug processingThread notifyAll InterruptedException
public String to String String Buffer buffer new String Buffer 10 buffer append Enable count append this enable Count append n NON NLS 1 int num Jobs this job End this job Start 1 buffer append Jobs in queue append num Jobs append n NON NLS 1 for int i 0 i num Jobs i 15 i buffer append i append job i append this awaiting Jobs this job Start i append n NON NLS 1 NON NLS 2 return buffer to String  toString StringBuffer StringBuffer enableCount numJobs jobEnd jobStart numJobs numJobs awaitingJobs jobStart toString

Simple Set indexes new Simple Set 5 public Sub Type Search Job Search Pattern pattern Search Participant participant I Java Search Scope scope Index Query Requestor requestor super pattern participant scope requestor  SimpleSet SimpleSet SubTypeSearchJob SearchPattern SearchParticipant IJavaSearchScope IndexQueryRequestor
public void finished try Object values this indexes values for int i 0 l values length i l i if values i null Index values i stop Query catch IO Exception e ignore  stopQuery IOException
public boolean search Index index I Progress Monitor progress Monitor if index null return COMPLETE try if indexes includes index indexes add index index start Query catch IO Exception e return FAILED return super search index progress Monitor  IProgressMonitor progressMonitor startQuery IOException progressMonitor

Creates a selection requestor that uses that given name lookup facility to resolve names Fix for 1FVXGDK public Selection Requestor Name Lookup name Lookup Openable openable super this name Lookup name Lookup this openable openable  SelectionRequestor NameLookup nameLookup nameLookup nameLookup
Resolve the binary method fix for 1FWFT6Q protected void accept Binary Method I Type type char selector char parameter Package Names char parameter Type Names String parameter Types null if parameter Type Names null parameter Types new String parameter Type Names length for int i 0 max parameter Type Names length i max i String pkg I Package Fragment DEFAULT PACKAGE NAME if parameter Package Names i null parameter Package Names i length 0 pkg new String parameter Package Names i NON NLS 1 String type Name new String parameter Type Names i if type Name index Of 0 type Name type Name replace parameter Types i Signature create Type Signature pkg type Name true I Method method type get Method new String selector parameter Types if method exists add Element method if Selection Engine DEBUG System out print SELECTION accept method NON NLS 1 System out print method to String System out println NON NLS 1  acceptBinaryMethod IType parameterPackageNames parameterTypeNames parameterTypes parameterTypeNames parameterTypes parameterTypeNames parameterTypeNames IPackageFragment DEFAULT_PACKAGE_NAME parameterPackageNames parameterPackageNames parameterPackageNames typeName parameterTypeNames typeName indexOf typeName typeName parameterTypes createTypeSignature typeName IMethod getMethod parameterTypes addElement SelectionEngine toString
Resolve the class public void accept Class char package Name char class Name boolean need Qualification boolean is Declaration int start int end accept Type package Name class Name Name Lookup ACCEPT CLASSES need Qualification is Declaration start end  acceptClass packageName className needQualification isDeclaration acceptType packageName className NameLookup ACCEPT_CLASSES needQualification isDeclaration
see I Selection Requestor accept Error public void accept Error I Problem error do nothing  ISelectionRequestor acceptError acceptError IProblem
Resolve the field public void accept Field char declaring Type Package Name char declaring Type Name char name boolean is Declaration int start int end if is Declaration I Type type resolve Type By Location declaring Type Package Name declaring Type Name Name Lookup ACCEPT CLASSES Name Lookup ACCEPT INTERFACES start end if type null try I Field fields type get Fields for int i 0 i fields length i I Field field fields i I Source Range range field get Name Range if range get Offset start range get Offset range get Length end field get Element Name equals new String name add Element fields i if Selection Engine DEBUG System out print SELECTION accept field NON NLS 1 System out print field to String System out println NON NLS 1 return only one method is possible catch Java Model Exception e return else I Type type resolve Type declaring Type Package Name declaring Type Name Name Lookup ACCEPT CLASSES Name Lookup ACCEPT INTERFACES if type null I Field field type get Field new String name if field exists add Element field if Selection Engine DEBUG System out print SELECTION accept field NON NLS 1 System out print field to String System out println NON NLS 1  acceptField declaringTypePackageName declaringTypeName isDeclaration isDeclaration IType resolveTypeByLocation declaringTypePackageName declaringTypeName NameLookup ACCEPT_CLASSES NameLookup ACCEPT_INTERFACES IField getFields IField ISourceRange getNameRange getOffset getOffset getLength getElementName addElement SelectionEngine toString JavaModelException IType resolveType declaringTypePackageName declaringTypeName NameLookup ACCEPT_CLASSES NameLookup ACCEPT_INTERFACES IField getField addElement SelectionEngine toString
Resolve the interface public void accept Interface char package Name char interface Name boolean need Qualification boolean is Declaration int start int end accept Type package Name interface Name Name Lookup ACCEPT INTERFACES need Qualification is Declaration start end  acceptInterface packageName interfaceName needQualification isDeclaration acceptType packageName interfaceName NameLookup ACCEPT_INTERFACES needQualification isDeclaration
public void accept Local Field Source Type Binding type Binding char name Compilation Unit Declaration parsed Unit I Type type I Type this handle Factory create Element type Binding scope reference Context parsed Unit this openable if type null I Field field type get Field new String name if field exists add Element field if Selection Engine DEBUG System out print SELECTION accept field NON NLS 1 System out print field to String System out println NON NLS 1  acceptLocalField SourceTypeBinding typeBinding CompilationUnitDeclaration parsedUnit IType IType handleFactory createElement typeBinding referenceContext parsedUnit IField getField addElement SelectionEngine toString
public void accept Local Method Source Type Binding type Binding char selector char parameter Package Names char parameter Type Names boolean is Constructor Compilation Unit Declaration parsed Unit boolean is Declaration int start int end I Type type I Type this handle Factory create Element type Binding scope reference Context parsed Unit this openable fix for 1FWFT6Q if type null if type is Binary need to add a paramater for constructor in binary type I Type declaring Declaring Type type get Declaring Type boolean is Static false try is Static Flags is Static type get Flags catch Java Model Exception e is Static false if declaring Declaring Type null is Constructor is Static int length parameter Package Names length System arraycopy parameter Package Names 0 parameter Package Names new char length 1 1 length System arraycopy parameter Type Names 0 parameter Type Names new char length 1 1 length parameter Package Names 0 declaring Declaring Type get Package Fragment get Element Name to Char Array parameter Type Names 0 declaring Declaring Type get Type Qualified Name to Char Array accept Binary Method type selector parameter Package Names parameter Type Names else accept Source Method type selector parameter Package Names parameter Type Names  acceptLocalMethod SourceTypeBinding typeBinding parameterPackageNames parameterTypeNames isConstructor CompilationUnitDeclaration parsedUnit isDeclaration IType IType handleFactory createElement typeBinding referenceContext parsedUnit isBinary IType declaringDeclaringType getDeclaringType isStatic isStatic isStatic getFlags JavaModelException isStatic declaringDeclaringType isConstructor isStatic parameterPackageNames parameterPackageNames parameterPackageNames parameterTypeNames parameterTypeNames parameterPackageNames declaringDeclaringType getPackageFragment getElementName toCharArray parameterTypeNames declaringDeclaringType getTypeQualifiedName toCharArray acceptBinaryMethod parameterPackageNames parameterTypeNames acceptSourceMethod parameterPackageNames parameterTypeNames
public void accept Local Type Source Type Binding type Binding Compilation Unit Declaration parsed Unit I Java Element type this handle Factory create Element type Binding scope reference Context parsed Unit this openable if type null add Element type if Selection Engine DEBUG System out print SELECTION accept local type NON NLS 1 System out print type to String System out println NON NLS 1  acceptLocalType SourceTypeBinding typeBinding CompilationUnitDeclaration parsedUnit IJavaElement handleFactory createElement typeBinding referenceContext parsedUnit addElement SelectionEngine toString
public void accept Local Variable Local Variable Binding binding Compilation Unit Declaration parsed Unit I Java Element local Var this handle Factory create Element binding declaration parsed Unit this openable if local Var null add Element local Var if Selection Engine DEBUG System out print SELECTION accept local variable NON NLS 1 System out print local Var to String System out println NON NLS 1  acceptLocalVariable LocalVariableBinding CompilationUnitDeclaration parsedUnit IJavaElement localVar handleFactory createElement parsedUnit localVar addElement localVar SelectionEngine localVar toString
Resolve the method public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names boolean is Constructor boolean is Declaration int start int end if is Declaration I Type type resolve Type By Location declaring Type Package Name declaring Type Name Name Lookup ACCEPT CLASSES Name Lookup ACCEPT INTERFACES start end if type null this accept Method Declaration type selector start end else I Type type resolve Type declaring Type Package Name declaring Type Name Name Lookup ACCEPT CLASSES Name Lookup ACCEPT INTERFACES fix for 1FWFT6Q if type null if type is Binary need to add a paramater for constructor in binary type I Type declaring Declaring Type type get Declaring Type boolean is Static false try is Static Flags is Static type get Flags catch Java Model Exception e is Static false if declaring Declaring Type null is Constructor is Static int length parameter Package Names length System arraycopy parameter Package Names 0 parameter Package Names new char length 1 1 length System arraycopy parameter Type Names 0 parameter Type Names new char length 1 1 length parameter Package Names 0 declaring Declaring Type get Package Fragment get Element Name to Char Array parameter Type Names 0 declaring Declaring Type get Type Qualified Name to Char Array accept Binary Method type selector parameter Package Names parameter Type Names else accept Source Method type selector parameter Package Names parameter Type Names  acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames isConstructor isDeclaration isDeclaration IType resolveTypeByLocation declaringTypePackageName declaringTypeName NameLookup ACCEPT_CLASSES NameLookup ACCEPT_INTERFACES acceptMethodDeclaration IType resolveType declaringTypePackageName declaringTypeName NameLookup ACCEPT_CLASSES NameLookup ACCEPT_INTERFACES isBinary IType declaringDeclaringType getDeclaringType isStatic isStatic isStatic getFlags JavaModelException isStatic declaringDeclaringType isConstructor isStatic parameterPackageNames parameterPackageNames parameterPackageNames parameterTypeNames parameterTypeNames parameterPackageNames declaringDeclaringType getPackageFragment getElementName toCharArray parameterTypeNames declaringDeclaringType getTypeQualifiedName toCharArray acceptBinaryMethod parameterPackageNames parameterTypeNames acceptSourceMethod parameterPackageNames parameterTypeNames
Resolve the package public void accept Package char package Name I Package Fragment pkgs this name Lookup find Package Fragments new String package Name false if pkgs null for int i 0 length pkgs length i length i add Element pkgs i if Selection Engine DEBUG System out print SELECTION accept package NON NLS 1 System out print pkgs i to String System out println NON NLS 1  acceptPackage packageName IPackageFragment nameLookup findPackageFragments packageName addElement SelectionEngine toString
Resolve the source method fix for 1FWFT6Q protected void accept Source Method I Type type char selector char parameter Package Names char parameter Type Names String name new String selector I Method methods null try methods type get Methods for int i 0 i methods length i if methods i get Element Name equals name methods i get Parameter Types length parameter Type Names length add Element methods i catch Java Model Exception e return if no matches nothing to report if this element Index 1 no match was actually found but a method was originally given default constructor add Element type if Selection Engine DEBUG System out print SELECTION accept type NON NLS 1 System out print type to String System out println NON NLS 1 return if there is only one match we ve got it if this element Index 0 if Selection Engine DEBUG System out print SELECTION accept method NON NLS 1 System out print this elements 0 to String System out println NON NLS 1 return more than one match must match simple parameter types I Java Element matches this elements int matches Index this element Index this elements Java Element NO ELEMENTS this element Index 1 for int i 0 i matches Index i I Method method I Method matches i String signatures method get Parameter Types boolean match true for int p 0 p signatures length p String simple Name Signature get Simple Name Signature to String signatures p char simple Parameter Name Char Operation last Segment parameter Type Names p if simple Name equals new String simple Parameter Name match false break if match add Element method if Selection Engine DEBUG System out print SELECTION accept method NON NLS 1 System out print method to String System out println NON NLS 1  acceptSourceMethod IType parameterPackageNames parameterTypeNames IMethod getMethods getElementName getParameterTypes parameterTypeNames addElement JavaModelException elementIndex addElement SelectionEngine toString elementIndex SelectionEngine toString IJavaElement matchesIndex elementIndex JavaElement NO_ELEMENTS elementIndex matchesIndex IMethod IMethod getParameterTypes simpleName getSimpleName toString simpleParameterName CharOperation lastSegment parameterTypeNames simpleName simpleParameterName addElement SelectionEngine toString
protected void accept Method Declaration I Type type char selector int start int end String name new String selector I Method methods null try methods type get Methods for int i 0 i methods length i I Source Range range methods i get Name Range if range get Offset start range get Offset range get Length end methods i get Element Name equals name add Element methods i if Selection Engine DEBUG System out print SELECTION accept method NON NLS 1 System out print this elements 0 to String System out println NON NLS 1 return only one method is possible catch Java Model Exception e return no match was actually found add Element type if Selection Engine DEBUG System out print SELECTION accept type NON NLS 1 System out print type to String System out println NON NLS 1 return  acceptMethodDeclaration IType IMethod getMethods ISourceRange getNameRange getOffset getOffset getLength getElementName addElement SelectionEngine toString JavaModelException addElement SelectionEngine toString
Resolve the type adding to the resolved elements protected void accept Type char package Name char type Name int accept Flags boolean need Qualification boolean is Declaration int start int end I Type type null if is Declaration type resolve Type By Location package Name type Name accept Flags start end else type resolve Type package Name type Name accept Flags if type null add Element type if Selection Engine DEBUG System out print SELECTION accept type NON NLS 1 System out print type to String System out println NON NLS 1  acceptType packageName typeName acceptFlags needQualification isDeclaration IType isDeclaration resolveTypeByLocation packageName typeName acceptFlags resolveType packageName typeName acceptFlags addElement SelectionEngine toString
protected void add Element I Java Element element int element Length this element Index 1 if element Length this elements length System arraycopy this elements 0 this elements new I Java Element element Length 2 1 0 element Length this elements this element Index element  addElement IJavaElement elementLength elementIndex elementLength IJavaElement elementLength elementLength elementIndex
Returns the resolved elements public I Java Element get Elements int element Length this element Index 1 if this elements length element Length System arraycopy this elements 0 this elements new I Java Element element Length 0 element Length return this elements  IJavaElement getElements elementLength elementIndex elementLength IJavaElement elementLength elementLength
Resolve the type protected I Type resolve Type char package Name char type Name int accept Flags I Type type null if this openable instanceof Compilation Unit Compilation Unit this openable is Working Copy Compilation Unit wc Compilation Unit this openable try if package Name null package Name length 0 wc get Package Declarations length 0 package Name null package Name length 0 wc get Package Declaration new String package Name exists char compound Name Char Operation split On type Name if compound Name length 0 type wc get Type new String compound Name 0 for int i 1 length compound Name length i length i type type get Type new String compound Name i if type null type exists type null catch Java Model Exception e type null if type null I Package Fragment pkgs this name Lookup find Package Fragments package Name null package Name length 0 I Package Fragment DEFAULT PACKAGE NAME new String package Name false iterate type lookup in each package fragment for int i 0 length pkgs null 0 pkgs length i length i type this name Lookup find Type new String type Name pkgs i false accept Flags if type null break if type null String p Name I Package Fragment DEFAULT PACKAGE NAME if package Name null p Name new String package Name if this openable null this openable get Parent get Element Name equals p Name look inside the type in which we are resolving in String t Name new String type Name t Name t Name replace I Type all Types null try Array List list this openable get Children Of Type I Java Element TYPE all Types new I Type list size list to Array all Types catch Java Model Exception e return null for int i 0 i all Types length i if all Types i get Type Qualified Name equals t Name return all Types i return type  IType resolveType packageName typeName acceptFlags IType CompilationUnit CompilationUnit isWorkingCopy CompilationUnit CompilationUnit packageName packageName getPackageDeclarations packageName packageName getPackageDeclaration packageName compoundName CharOperation splitOn typeName compoundName getType compoundName compoundName getType compoundName JavaModelException IPackageFragment nameLookup findPackageFragments packageName packageName IPackageFragment DEFAULT_PACKAGE_NAME packageName nameLookup findType typeName acceptFlags pName IPackageFragment DEFAULT_PACKAGE_NAME packageName pName packageName getParent getElementName pName tName typeName tName tName IType allTypes ArrayList getChildrenOfType IJavaElement allTypes IType toArray allTypes JavaModelException allTypes allTypes getTypeQualifiedName tName allTypes
protected I Type resolve Type By Location char package Name char type Name int accept Flags int start int end I Type type null TODO david post 3 0 should remove is Open check and investigate reusing I Compilation Unit get Element At may need to optimize get Element At to remove recursions if this openable instanceof Compilation Unit Compilation Unit this openable is Open Compilation Unit wc Compilation Unit this openable try if package Name null package Name length 0 wc get Package Declarations length 0 package Name null package Name length 0 wc get Package Declaration new String package Name exists char compound Name Char Operation split On type Name if compound Name length 0 I Type t Types wc get Types int i 0 int depth 0 done while i t Types length I Source Range range t Types i get Source Range if range get Offset start range get Offset range get Length end t Types i get Element Name equals new String compound Name depth if depth compound Name length 1 type t Types i break done t Types t Types i get Types i 0 depth continue done i if type null type exists type null catch Java Model Exception e type null if type null I Package Fragment pkgs this name Lookup find Package Fragments package Name null package Name length 0 I Package Fragment DEFAULT PACKAGE NAME new String package Name false iterate type lookup in each package fragment for int i 0 length pkgs null 0 pkgs length i length i type this name Lookup find Type new String type Name pkgs i false accept Flags if type null break if type null String p Name I Package Fragment DEFAULT PACKAGE NAME if package Name null p Name new String package Name if this openable null this openable get Parent get Element Name equals p Name look inside the type in which we are resolving in String t Name new String type Name t Name t Name replace I Type all Types null try Array List list this openable get Children Of Type I Java Element TYPE all Types new I Type list size list to Array all Types catch Java Model Exception e return null for int i 0 i all Types length i if all Types i get Type Qualified Name equals t Name return all Types i return type  IType resolveTypeByLocation packageName typeName acceptFlags IType isOpen ICompilationUnit getElementAt getElementAt CompilationUnit CompilationUnit isOpen CompilationUnit CompilationUnit packageName packageName getPackageDeclarations packageName packageName getPackageDeclaration packageName compoundName CharOperation splitOn typeName compoundName IType tTypes getTypes tTypes ISourceRange tTypes getSourceRange getOffset getOffset getLength tTypes getElementName compoundName compoundName tTypes tTypes tTypes getTypes JavaModelException IPackageFragment nameLookup findPackageFragments packageName packageName IPackageFragment DEFAULT_PACKAGE_NAME packageName nameLookup findType typeName acceptFlags pName IPackageFragment DEFAULT_PACKAGE_NAME packageName pName packageName getParent getElementName pName tName typeName tName tName IType allTypes ArrayList getChildrenOfType IJavaElement allTypes IType toArray allTypes JavaModelException allTypes allTypes getTypeQualifiedName tName allTypes

When executed this operation sets the classpath of the given project public Set Classpath Operation Java Project project I Classpath Entry old Resolved Path I Classpath Entry new Raw Path I Path new Output Location boolean can Change Resource boolean need Validation boolean need Save super new I Java Element project this old Resolved Path old Resolved Path this new Raw Path new Raw Path this new Output Location new Output Location this can Change Resources can Change Resource this need Validation need Validation this need Save need Save this project project  SetClasspathOperation JavaProject IClasspathEntry oldResolvedPath IClasspathEntry newRawPath IPath newOutputLocation canChangeResource needValidation needSave IJavaElement oldResolvedPath oldResolvedPath newRawPath newRawPath newOutputLocation newOutputLocation canChangeResources canChangeResource needValidation needValidation needSave needSave
Adds deltas for the given roots with the specified change flag and closes the root Helper method for set Classpath protected void add Classpath Deltas I Package Fragment Root roots int flag Java Element Delta delta for int i 0 i roots length i I Package Fragment Root root roots i delta changed root flag if flag I Java Element Delta F REMOVED FROM CLASSPATH 0 flag I Java Element Delta F SOURCEATTACHED 0 flag I Java Element Delta F SOURCEDETACHED 0 try root close catch Java Model Exception e ignore force detach source on jar package fragment roots source will be lazily computed when needed Package Fragment Root root set Source Attachment Property null loose info will be recomputed  setClasspath addClasspathDeltas IPackageFragmentRoot JavaElementDelta IPackageFragmentRoot IJavaElementDelta F_REMOVED_FROM_CLASSPATH IJavaElementDelta F_SOURCEATTACHED IJavaElementDelta F_SOURCEDETACHED JavaModelException PackageFragmentRoot setSourceAttachmentProperty
Returns the index of the item in the list if the given list contains the specified entry If the list does not contain the entry 1 is returned A helper method for set Classpath protected int classpath Contains I Classpath Entry list I Classpath Entry entry I Path exclusion Patterns entry get Exclusion Patterns I Path inclusion Patterns entry get Inclusion Patterns next Entry for int i 0 i list length i I Classpath Entry other list i if other get Content Kind entry get Content Kind other get Entry Kind entry get Entry Kind other is Exported entry is Exported other get Path equals entry get Path check custom outputs I Path entry Output entry get Output Location I Path other Output other get Output Location if entry Output null if other Output null continue else if entry Output equals other Output continue check inclusion patterns I Path other Includes other get Inclusion Patterns if inclusion Patterns other Includes if inclusion Patterns null continue int include Length inclusion Patterns length if other Includes null other Includes length include Length continue for int j 0 j include Length j compare to Strings instead of I Paths since I Path equals is specified to ignore trailing separators if inclusion Patterns j to String equals other Includes j to String continue next Entry check exclusion patterns I Path other Excludes other get Exclusion Patterns if exclusion Patterns other Excludes if exclusion Patterns null continue int exclude Length exclusion Patterns length if other Excludes null other Excludes length exclude Length continue for int j 0 j exclude Length j compare to Strings instead of I Paths since I Path equals is specified to ignore trailing separators if exclusion Patterns j to String equals other Excludes j to String continue next Entry return i return 1  setClasspath classpathContains IClasspathEntry IClasspathEntry IPath exclusionPatterns getExclusionPatterns IPath inclusionPatterns getInclusionPatterns nextEntry IClasspathEntry getContentKind getContentKind getEntryKind getEntryKind isExported isExported getPath getPath IPath entryOutput getOutputLocation IPath otherOutput getOutputLocation entryOutput otherOutput entryOutput otherOutput IPath otherIncludes getInclusionPatterns inclusionPatterns otherIncludes inclusionPatterns includeLength inclusionPatterns otherIncludes otherIncludes includeLength includeLength toStrings IPaths IPath inclusionPatterns toString otherIncludes toString nextEntry IPath otherExcludes getExclusionPatterns exclusionPatterns otherExcludes exclusionPatterns excludeLength exclusionPatterns otherExcludes otherExcludes excludeLength excludeLength toStrings IPaths IPath exclusionPatterns toString otherExcludes toString nextEntry
Recursively adds all subfolders of code folder code to the given collection protected void collect All Subfolders I Folder folder Array List collection throws Java Model Exception try I Resource members folder members for int i 0 max members length i max i I Resource r members i if r get Type I Resource FOLDER collection add r collect All Subfolders I Folder r collection catch Core Exception e throw new Java Model Exception e  collectAllSubfolders IFolder ArrayList JavaModelException IResource IResource getType IResource collectAllSubfolders IFolder CoreException JavaModelException
Returns a collection of package fragments that have been added removed as the result of changing the output location to from the given location The collection is empty if no package fragments are affected protected Array List determine Affected Package Fragments I Path location throws Java Model Exception Array List fragments new Array List see if this will cause any package fragments to be affected I Workspace workspace Resources Plugin get Workspace I Resource resource null if location null resource workspace get Root find Member location if resource null resource get Type I Resource FOLDER I Folder folder I Folder resource only changes if it actually existed I Classpath Entry classpath project get Expanded Classpath true for int i 0 i classpath length i I Classpath Entry entry classpath i I Path path classpath i get Path if entry get Entry Kind I Classpath Entry CPE PROJECT path is Prefix Of location path equals location I Package Fragment Root roots project compute Package Fragment Roots classpath i I Package Fragment Root root roots 0 now the output location becomes a package fragment along with any subfolders Array List folders new Array List folders add folder collect All Subfolders folder folders Iterator elements folders iterator int segments path segment Count while elements has Next I Folder f I Folder elements next I Path relative Path f get Full Path remove First Segments segments String name relative Path toOS String name name replace File path Separator Char if name ends With NON NLS 1 name name substring 0 name length 1 I Package Fragment pkg root get Package Fragment name fragments add pkg return fragments  ArrayList determineAffectedPackageFragments IPath JavaModelException ArrayList ArrayList IWorkspace ResourcesPlugin getWorkspace IResource getRoot findMember getType IResource IFolder IFolder IClasspathEntry getExpandedClasspath IClasspathEntry IPath getPath getEntryKind IClasspathEntry CPE_PROJECT isPrefixOf IPackageFragmentRoot computePackageFragmentRoots IPackageFragmentRoot ArrayList ArrayList collectAllSubfolders segmentCount hasNext IFolder IFolder IPath relativePath getFullPath removeFirstSegments relativePath toOSString pathSeparatorChar endsWith IPackageFragment getPackageFragment
Sets the classpath of the pre specified project protected void execute Operation throws Java Model Exception project reference updated may throw an exception if unable to write project file update Project References If Necessary classpath file updated may throw an exception if unable to write classpath file save Classpath If Necessary perform classpath and output location updates if exception occurs in classpath update make sure the output location is updated before surfacing the exception in case the output location update also throws an exception give priority to the classpath update one Java Model Exception original Exception null try if this new Raw Path Update Classpath this new Raw Path project get Raw Classpath if this new Raw Path Reuse Classpath update Classpath project update Package Fragment Roots Java Model Manager get Java Model Manager get Delta Processor add For Refresh project catch Java Model Exception e original Exception e throw e finally if traversed by an exception we still need to update the output location when necessary try if this new Output Location Reuse Output Location update Output Location catch Java Model Exception e if original Exception null throw original Exception throw e finally ensures the project is getting rebuilt if only variable is modified if this identical Roots this can Change Resources try this project get Project touch this progress Monitor catch Core Exception e if Java Model Manager CP RESOLVE VERBOSE Util verbose CP Container INIT FAILED to touch project this project get Element Name System err NON NLS 1 e print Stack Trace done  executeOperation JavaModelException updateProjectReferencesIfNecessary saveClasspathIfNecessary JavaModelException originalException newRawPath UpdateClasspath newRawPath getRawClasspath newRawPath ReuseClasspath updateClasspath updatePackageFragmentRoots JavaModelManager getJavaModelManager getDeltaProcessor addForRefresh JavaModelException originalException newOutputLocation ReuseOutputLocation updateOutputLocation JavaModelException originalException originalException identicalRoots canChangeResources getProject progressMonitor CoreException JavaModelManager CP_RESOLVE_VERBOSE CPContainer getElementName printStackTrace
final char exclusion Patterns Classpath Entry old Entry full Exclusion Pattern Chars post Action new I Post Action public String getID return path to String  exclusionPatterns ClasspathEntry oldEntry fullExclusionPatternChars postAction IPostAction toString
return path to String public void run throws Java Model Exception index Manager remove Source Folder From Index project path inclusion Patterns exclusion Patterns  toString JavaModelException indexManager removeSourceFolderFromIndex inclusionPatterns exclusionPatterns
final Delta Processing State delta State manager delta State post Action new I Post Action public String getID return path to String  DeltaProcessingState deltaState deltaState postAction IPostAction toString
public void run throws Java Model Exception if delta State other Roots get path null if root was not shared index Manager discard Jobs path to String index Manager remove Index path TODO kent we could just remove the in memory index and have the indexing check for timestamps  JavaModelException deltaState otherRoots indexManager discardJobs toString indexManager removeIndex
if path Has Changed post Action new I Post Action public String getID return new Path to String  pathHasChanged postAction IPostAction newPath toString
return new Path to String public void run throws Java Model Exception index Manager index Library new Path project get Project  newPath toString JavaModelException indexManager indexLibrary newPath getProject
final char exclusion Patterns Classpath Entry entry full Exclusion Pattern Chars post Action new I Post Action public String getID return path to String  exclusionPatterns ClasspathEntry fullExclusionPatternChars postAction IPostAction toString
return path to String public void run throws Java Model Exception index Manager index Source Folder project path inclusion Patterns exclusion Patterns  toString JavaModelException indexManager indexSourceFolder inclusionPatterns exclusionPatterns
Generates the delta of removed added reordered roots Use three deltas in case the same root is removed added reordered for instance if it is changed from K SOURCE to K BINARY or vice versa protected void generate Classpath Change Deltas Java Model Manager manager Java Model Manager get Java Model Manager boolean need To Update Dependents false Java Element Delta delta new Java Element Delta get Java Model boolean has Delta false if this classpath Was Saved delta changed this project I Java Element Delta F CLASSPATH CHANGED has Delta true int old Length old Resolved Path length int new Length new Resolved Path length final Index Manager index Manager manager get Index Manager Map old Roots null I Package Fragment Root roots null if project is Open try roots project get Package Fragment Roots catch Java Model Exception e ignore else Map all Removed Roots if all Removed Roots manager get Delta Processor removed Roots null roots I Package Fragment Root all Removed Roots get project if roots null old Roots new Hash Map for int i 0 i roots length i I Package Fragment Root root roots i old Roots put root get Path root for int i 0 i old Length i int index classpath Contains new Resolved Path old Resolved Path i if index 1 do not notify remote project changes if old Resolved Path i get Entry Kind I Classpath Entry CPE PROJECT need To Update Dependents true this need Cycle Check true continue I Package Fragment Root pkg Fragment Roots null if old Roots null I Package Fragment Root old Root I Package Fragment Root old Roots get old Resolved Path i get Path if old Root null use old root if any could be none if entry wasn t bound pkg Fragment Roots new I Package Fragment Root old Root if pkg Fragment Roots null try Object Vector accumulated Roots new Object Vector Hash Set rootI Ds new Hash Set 5 rootI Ds add project rootID project compute Package Fragment Roots old Resolved Path i accumulated Roots rootI Ds true inside original project false don t check existency false don t retrieve exported roots pkg Fragment Roots new I Package Fragment Root accumulated Roots size accumulated Roots copy Into pkg Fragment Roots catch Java Model Exception e pkg Fragment Roots new I Package Fragment Root add Classpath Deltas pkg Fragment Roots I Java Element Delta F REMOVED FROM CLASSPATH delta int change Kind old Resolved Path i get Entry Kind need To Update Dependents change Kind I Classpath Entry CPE SOURCE old Resolved Path i is Exported Remove the java files from the index for a source folder For a lib folder or a jar file remove the corresponding index if not shared if index Manager null I Classpath Entry old Entry old Resolved Path i final I Path path old Entry get Path switch change Kind case I Classpath Entry CPE SOURCE final char inclusion Patterns Classpath Entry old Entry full Inclusion Pattern Chars final char exclusion Patterns Classpath Entry old Entry full Exclusion Pattern Chars post Action new I Post Action public String getID return path to String public void run throws Java Model Exception index Manager remove Source Folder From Index project path inclusion Patterns exclusion Patterns REMOVEALL APPEND break case I Classpath Entry CPE LIBRARY final Delta Processing State delta State manager delta State post Action new I Post Action public String getID return path to String public void run throws Java Model Exception if delta State other Roots get path null if root was not shared index Manager discard Jobs path to String index Manager remove Index path TODO kent we could just remove the in memory index and have the indexing check for timestamps REMOVEALL APPEND break has Delta true else do not notify remote project changes if old Resolved Path i get Entry Kind I Classpath Entry CPE PROJECT this need Cycle Check old Resolved Path i is Exported new Resolved Path index is Exported continue need To Update Dependents old Resolved Path i is Exported new Resolved Path index is Exported if index i reordering of the classpath add Classpath Deltas project compute Package Fragment Roots old Resolved Path i I Java Element Delta F REORDER delta int change Kind old Resolved Path i get Entry Kind need To Update Dependents change Kind I Classpath Entry CPE SOURCE has Delta true check source attachment I Path new Source Path new Resolved Path index get Source Attachment Path int source Attachment Flags this get Source Attachment Delta Flag old Resolved Path i get Source Attachment Path new Source Path I Path old Root Path old Resolved Path i get Source Attachment Root Path I Path new Root Path new Resolved Path index get Source Attachment Root Path int source Attachment Root Flags get Source Attachment Delta Flag old Root Path new Root Path int flags source Attachment Flags source Attachment Root Flags if flags 0 add Classpath Deltas project compute Package Fragment Roots old Resolved Path i flags delta has Delta true else if old Root Path null new Root Path null if source path is specified and no root path it needs to be recomputed dynamically force detach source on jar package fragment roots source will be lazily computed when needed I Package Fragment Root computed Roots project compute Package Fragment Roots old Resolved Path i for int j 0 j computed Roots length j I Package Fragment Root root computed Roots j force detach source on jar package fragment roots source will be lazily computed when needed try root close catch Java Model Exception e ignore Package Fragment Root root set Source Attachment Property null loose info will be recomputed for int i 0 i new Length i int index classpath Contains old Resolved Path new Resolved Path i if index 1 do not notify remote project changes if new Resolved Path i get Entry Kind I Classpath Entry CPE PROJECT need To Update Dependents true this need Cycle Check true continue add Classpath Deltas project compute Package Fragment Roots new Resolved Path i I Java Element Delta F ADDED TO CLASSPATH delta int change Kind new Resolved Path i get Entry Kind Request indexing if index Manager null switch change Kind case I Classpath Entry CPE LIBRARY boolean path Has Changed true final I Path new Path new Resolved Path i get Path for int j 0 j old Length j I Classpath Entry old Entry old Resolved Path j if old Entry get Path equals new Path path Has Changed false break if path Has Changed post Action new I Post Action public String getID return new Path to String public void run throws Java Model Exception index Manager index Library new Path project get Project REMOVEALL APPEND break case I Classpath Entry CPE SOURCE I Classpath Entry entry new Resolved Path i final I Path path entry get Path final char inclusion Patterns Classpath Entry entry full Inclusion Pattern Chars final char exclusion Patterns Classpath Entry entry full Exclusion Pattern Chars post Action new I Post Action public String getID return path to String public void run throws Java Model Exception index Manager index Source Folder project path inclusion Patterns exclusion Patterns APPEND append so that a remove Source Folder action is not removed break need To Update Dependents change Kind I Classpath Entry CPE SOURCE new Resolved Path i is Exported has Delta true classpath reordering has already been generated in previous loop if has Delta this add Delta delta else this identical Roots true if need To Update Dependents update Affected Projects project get Project get Full Path  K_SOURCE K_BINARY generateClasspathChangeDeltas JavaModelManager JavaModelManager getJavaModelManager needToUpdateDependents JavaElementDelta JavaElementDelta getJavaModel hasDelta classpathWasSaved IJavaElementDelta F_CLASSPATH_CHANGED hasDelta oldLength oldResolvedPath newLength newResolvedPath IndexManager indexManager getIndexManager oldRoots IPackageFragmentRoot isOpen getPackageFragmentRoots JavaModelException allRemovedRoots allRemovedRoots getDeltaProcessor removedRoots IPackageFragmentRoot allRemovedRoots oldRoots HashMap IPackageFragmentRoot oldRoots getPath oldLength classpathContains newResolvedPath oldResolvedPath oldResolvedPath getEntryKind IClasspathEntry CPE_PROJECT needToUpdateDependents needCycleCheck IPackageFragmentRoot pkgFragmentRoots oldRoots IPackageFragmentRoot oldRoot IPackageFragmentRoot oldRoots oldResolvedPath getPath oldRoot pkgFragmentRoots IPackageFragmentRoot oldRoot pkgFragmentRoots ObjectVector accumulatedRoots ObjectVector HashSet rootIDs HashSet rootIDs computePackageFragmentRoots oldResolvedPath accumulatedRoots rootIDs pkgFragmentRoots IPackageFragmentRoot accumulatedRoots accumulatedRoots copyInto pkgFragmentRoots JavaModelException pkgFragmentRoots IPackageFragmentRoot addClasspathDeltas pkgFragmentRoots IJavaElementDelta F_REMOVED_FROM_CLASSPATH changeKind oldResolvedPath getEntryKind needToUpdateDependents changeKind IClasspathEntry CPE_SOURCE oldResolvedPath isExported indexManager IClasspathEntry oldEntry oldResolvedPath IPath oldEntry getPath changeKind IClasspathEntry CPE_SOURCE inclusionPatterns ClasspathEntry oldEntry fullInclusionPatternChars exclusionPatterns ClasspathEntry oldEntry fullExclusionPatternChars postAction IPostAction toString JavaModelException indexManager removeSourceFolderFromIndex inclusionPatterns exclusionPatterns REMOVEALL_APPEND IClasspathEntry CPE_LIBRARY DeltaProcessingState deltaState deltaState postAction IPostAction toString JavaModelException deltaState otherRoots indexManager discardJobs toString indexManager removeIndex REMOVEALL_APPEND hasDelta oldResolvedPath getEntryKind IClasspathEntry CPE_PROJECT needCycleCheck oldResolvedPath isExported newResolvedPath isExported needToUpdateDependents oldResolvedPath isExported newResolvedPath isExported addClasspathDeltas computePackageFragmentRoots oldResolvedPath IJavaElementDelta F_REORDER changeKind oldResolvedPath getEntryKind needToUpdateDependents changeKind IClasspathEntry CPE_SOURCE hasDelta IPath newSourcePath newResolvedPath getSourceAttachmentPath sourceAttachmentFlags getSourceAttachmentDeltaFlag oldResolvedPath getSourceAttachmentPath newSourcePath IPath oldRootPath oldResolvedPath getSourceAttachmentRootPath IPath newRootPath newResolvedPath getSourceAttachmentRootPath sourceAttachmentRootFlags getSourceAttachmentDeltaFlag oldRootPath newRootPath sourceAttachmentFlags sourceAttachmentRootFlags addClasspathDeltas computePackageFragmentRoots oldResolvedPath hasDelta oldRootPath newRootPath IPackageFragmentRoot computedRoots computePackageFragmentRoots oldResolvedPath computedRoots IPackageFragmentRoot computedRoots JavaModelException PackageFragmentRoot setSourceAttachmentProperty newLength classpathContains oldResolvedPath newResolvedPath newResolvedPath getEntryKind IClasspathEntry CPE_PROJECT needToUpdateDependents needCycleCheck addClasspathDeltas computePackageFragmentRoots newResolvedPath IJavaElementDelta F_ADDED_TO_CLASSPATH changeKind newResolvedPath getEntryKind indexManager changeKind IClasspathEntry CPE_LIBRARY pathHasChanged IPath newPath newResolvedPath getPath oldLength IClasspathEntry oldEntry oldResolvedPath oldEntry getPath newPath pathHasChanged pathHasChanged postAction IPostAction newPath toString JavaModelException indexManager indexLibrary newPath getProject REMOVEALL_APPEND IClasspathEntry CPE_SOURCE IClasspathEntry newResolvedPath IPath getPath inclusionPatterns ClasspathEntry fullInclusionPatternChars exclusionPatterns ClasspathEntry fullExclusionPatternChars postAction IPostAction toString JavaModelException indexManager indexSourceFolder inclusionPatterns exclusionPatterns removeSourceFolder needToUpdateDependents changeKind IClasspathEntry CPE_SOURCE newResolvedPath isExported hasDelta hasDelta addDelta identicalRoots needToUpdateDependents updateAffectedProjects getProject getFullPath
private int get Source Attachment Delta Flag I Path old Path I Path new Path if old Path null if new Path null return I Java Element Delta F SOURCEATTACHED else return 0 else if new Path null return I Java Element Delta F SOURCEDETACHED else if old Path equals new Path return I Java Element Delta F SOURCEATTACHED I Java Element Delta F SOURCEDETACHED else return 0  getSourceAttachmentDeltaFlag IPath oldPath IPath newPath oldPath newPath IJavaElementDelta F_SOURCEATTACHED newPath IJavaElementDelta F_SOURCEDETACHED oldPath newPath IJavaElementDelta F_SOURCEATTACHED IJavaElementDelta F_SOURCEDETACHED
Returns code true code if this operation performs no resource modifications otherwise code false code Subclasses must override public boolean is Read Only return this can Change Resources  isReadOnly canChangeResources
protected void save Classpath If Necessary throws Java Model Exception if this can Change Resources this need Save return I Classpath Entry classpath For Save if this new Raw Path Reuse Classpath this new Raw Path Update Classpath classpath For Save project get Raw Classpath else classpath For Save this new Raw Path I Path output Location For Save if this new Output Location Reuse Output Location output Location For Save project get Output Location else output Location For Save this new Output Location if read only classpath then the classpath setting will never been performed completely if project save Classpath classpath For Save output Location For Save this classpath Was Saved true this set Attribute HAS MODIFIED RESOURCE ATTR TRUE  saveClasspathIfNecessary JavaModelException canChangeResources needSave IClasspathEntry classpathForSave newRawPath ReuseClasspath newRawPath UpdateClasspath classpathForSave getRawClasspath classpathForSave newRawPath IPath outputLocationForSave newOutputLocation ReuseOutputLocation outputLocationForSave getOutputLocation outputLocationForSave newOutputLocation saveClasspath classpathForSave outputLocationForSave classpathWasSaved setAttribute HAS_MODIFIED_RESOURCE_ATTR
public String to String String Buffer buffer new String Buffer 20 buffer append Set Classpath Operation n NON NLS 1 buffer append classpath NON NLS 1 if this new Raw Path Reuse Classpath buffer append Reuse Existing Classpath NON NLS 1 else buffer append NON NLS 1 for int i 0 i this new Raw Path length i if i 0 buffer append NON NLS 1 I Classpath Entry element this new Raw Path i buffer append append element to String NON NLS 1 buffer append n output location NON NLS 1 if this new Output Location Reuse Output Location buffer append Reuse Existing Output Location NON NLS 1 else buffer append this new Output Location to String NON NLS 1 return buffer to String  toString StringBuffer StringBuffer SetClasspathOperation newRawPath ReuseClasspath newRawPath IClasspathEntry newRawPath toString newOutputLocation ReuseOutputLocation newOutputLocation toString toString
private void update Classpath throws Java Model Exception begin Task Util bind classpath setting Progress project get Element Name 2 NON NLS 1 SIDE EFFECT from thereon the classpath got modified project get Per Project Info update Classpath Information this new Raw Path resolve new path asking for marker creation if problems if this new Resolved Path null this new Resolved Path project get Resolved Classpath true this can Change Resources false don t return Resolution In Progress if this old Resolved Path null generate Classpath Change Deltas else this need Cycle Check true update Affected Projects project get Project get Full Path update Cycle Markers If Necessary  updateClasspath JavaModelException beginTask settingProgress getElementName getPerProjectInfo updateClasspathInformation newRawPath newResolvedPath newResolvedPath getResolvedClasspath canChangeResources returnResolutionInProgress oldResolvedPath generateClasspathChangeDeltas needCycleCheck updateAffectedProjects getProject getFullPath updateCycleMarkersIfNecessary
post Action new I Post Action public String getID return affected Project get Path to String  postAction IPostAction affectedProject getPath toString
public void run throws Java Model Exception affected Project set Raw Classpath Update Classpath Set Classpath Operation Reuse Output Location Set Classpath Operation this progress Monitor Set Classpath Operation this can Change Resources affected Project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress false updating only no validation false updating only no need to save  JavaModelException affectedProject setRawClasspath UpdateClasspath SetClasspathOperation ReuseOutputLocation SetClasspathOperation progressMonitor SetClasspathOperation canChangeResources affectedProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress
Update projects which are affected by this classpath change those which refers to the current project as source indirectly protected void update Affected Projects I Path prerequisite Project Path remove all update classpath post actions for this project remove All Post Action prerequisite Project Path to String try I Java Model model Java Model Manager get Java Model Manager get Java Model I Java Project initial Project this project I Java Project projects model get Java Projects for int i 0 project Count projects length i project Count i try final Java Project affected Project Java Project projects i if affected Project equals initial Project continue skip itself consider ALL dependents even indirect ones since they may need to flush their respective namelookup caches all pkg fragment roots I Classpath Entry classpath affected Project get Expanded Classpath true for int j 0 entry Count classpath length j entry Count j I Classpath Entry entry classpath j if entry get Entry Kind I Classpath Entry CPE PROJECT entry get Path equals prerequisite Project Path post Action new I Post Action public String getID return affected Project get Path to String public void run throws Java Model Exception affected Project set Raw Classpath Update Classpath Set Classpath Operation Reuse Output Location Set Classpath Operation this progress Monitor Set Classpath Operation this can Change Resources affected Project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress false updating only no validation false updating only no need to save REMOVEALL APPEND break catch Java Model Exception e ignore catch Java Model Exception e ignore  updateAffectedProjects IPath prerequisiteProjectPath removeAllPostAction prerequisiteProjectPath toString IJavaModel JavaModelManager getJavaModelManager getJavaModel IJavaProject initialProject IJavaProject getJavaProjects projectCount projectCount JavaProject affectedProject JavaProject affectedProject initialProject IClasspathEntry affectedProject getExpandedClasspath entryCount entryCount IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT getPath prerequisiteProjectPath postAction IPostAction affectedProject getPath toString JavaModelException affectedProject setRawClasspath UpdateClasspath SetClasspathOperation ReuseOutputLocation SetClasspathOperation progressMonitor SetClasspathOperation canChangeResources affectedProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress REMOVEALL_APPEND JavaModelException JavaModelException
post Action new I Post Action public String getID return update Cycle Markers NON NLS 1  postAction IPostAction updateCycleMarkers
return update Cycle Markers NON NLS 1 public void run throws Java Model Exception Java Project update All Cycle Markers null  updateCycleMarkers JavaModelException JavaProject updateAllCycleMarkers
Update cycle markers protected void update Cycle Markers If Necessary if this need Cycle Check return if this can Change Resources return if project has Cycle Marker project has Classpath Cycle new Resolved Path return post Action new I Post Action public String getID return update Cycle Markers NON NLS 1 public void run throws Java Model Exception Java Project update All Cycle Markers null REMOVEALL APPEND  updateCycleMarkersIfNecessary needCycleCheck canChangeResources hasCycleMarker hasClasspathCycle newResolvedPath postAction IPostAction updateCycleMarkers JavaModelException JavaProject updateAllCycleMarkers REMOVEALL_APPEND
Sets the output location of the pre specified project p This can cause changes in package fragments in case either the old or new output location folder are considered as a package fragment protected void update Output Location throws Java Model Exception begin Task Util bind classpath setting Output Location Progress project get Element Name 2 NON NLS 1 I Path old Location project get Output Location see if this will cause any package fragments to be added boolean delta To Fire false Java Element Delta delta new Java Element Delta Array List added determine Affected Package Fragments old Location Iterator iter added iterator while iter has Next I Package Fragment frag I Package Fragment iter next I Package Fragment Root frag get Parent close if Util is Excluded frag delta added frag delta To Fire true see if this will cause any package fragments to be removed Array List removed determine Affected Package Fragments this new Output Location iter removed iterator while iter has Next I Package Fragment frag I Package Fragment iter next I Package Fragment Root frag get Parent close if Util is Excluded frag delta removed frag delta To Fire true Java Model Manager Per Project Info per Project Info project get Per Project Info synchronized per Project Info per Project Info output Location this new Output Location if delta To Fire add Delta delta worked 1  updateOutputLocation JavaModelException beginTask settingOutputLocationProgress getElementName IPath oldLocation getOutputLocation deltaToFire JavaElementDelta newJavaElementDelta ArrayList determineAffectedPackageFragments oldLocation hasNext IPackageFragment IPackageFragment IPackageFragmentRoot getParent isExcluded deltaToFire ArrayList determineAffectedPackageFragments newOutputLocation hasNext IPackageFragment IPackageFragment IPackageFragmentRoot getParent isExcluded deltaToFire JavaModelManager PerProjectInfo perProjectInfo getPerProjectInfo perProjectInfo perProjectInfo outputLocation newOutputLocation deltaToFire addDelta
Update projects references so that the build order is consistent with the classpath protected void update Project References If Necessary throws Java Model Exception if this new Raw Path Reuse Classpath this new Raw Path Update Classpath return will run now or be deferred until next pre auto build notification if resource tree is locked Java Model Manager get Java Model Manager delta State perform Classpath Resource Change project old Resolved Path new Resolved Path new Raw Path can Change Resources  updateProjectReferencesIfNecessary JavaModelException newRawPath ReuseClasspath newRawPath UpdateClasspath JavaModelManager getJavaModelManager deltaState performClasspathResourceChange oldResolvedPath newResolvedPath newRawPath canChangeResources
public I Java Model Status verify I Java Model Status status super verify if status isOK return status if need Validation retrieve classpath I Classpath Entry entries this new Raw Path if entries Reuse Classpath try entries project get Raw Classpath catch Java Model Exception e return e get Java Model Status retrieve output location I Path output Location this new Output Location if output Location Reuse Output Location try output Location project get Output Location catch Java Model Exception e return e get Java Model Status perform validation return Classpath Entry validate Classpath project entries output Location return Java Model Status VERIFIED OK  IJavaModelStatus IJavaModelStatus needValidation IClasspathEntry newRawPath ReuseClasspath getRawClasspath JavaModelException getJavaModelStatus IPath outputLocation newOutputLocation outputLocation ReuseOutputLocation outputLocation getOutputLocation JavaModelException getJavaModelStatus ClasspathEntry validateClasspath outputLocation JavaModelStatus VERIFIED_OK

Marks this delta as added public void added this kind I Java Element Delta ADDED  IJavaElementDelta
Marks this delta as changed with the given change flag public void changed int flags this kind I Java Element Delta CHANGED this change Flags flags  IJavaElementDelta changeFlags
see I Java Element Delta get Flags public int get Flags return this change Flags  IJavaElementDelta getFlags getFlags changeFlags
see I Java Element Delta get Kind public int get Kind return this kind  IJavaElementDelta getKind getKind
Mark this delta has a having a modifiers change public void modifiers changed I Java Element Delta F MODIFIERS  IJavaElementDelta F_MODIFIERS
Marks this delta as removed public void removed this kind I Java Element Delta REMOVED this change Flags 0  IJavaElementDelta changeFlags
Mark this delta has a having a super type change public void super Types changed I Java Element Delta F SUPER TYPES  superTypes IJavaElementDelta F_SUPER_TYPES
protected void to Debug String String Buffer buffer buffer append NON NLS 1 switch get Kind case I Java Element Delta ADDED buffer append break case I Java Element Delta REMOVED buffer append break case I Java Element Delta CHANGED buffer append break default buffer append break buffer append NON NLS 1 to Debug String buffer get Flags buffer append NON NLS 1  toDebugString StringBuffer getKind IJavaElementDelta IJavaElementDelta IJavaElementDelta toDebugString getFlags
protected boolean to Debug String String Buffer buffer int flags boolean prev false if flags I Java Element Delta F MODIFIERS 0 if prev buffer append NON NLS 1 buffer append MODIFIERS CHANGED NON NLS 1 prev true if flags I Java Element Delta F SUPER TYPES 0 if prev buffer append NON NLS 1 buffer append SUPER TYPES CHANGED NON NLS 1 prev true return prev  toDebugString StringBuffer IJavaElementDelta F_MODIFIERS IJavaElementDelta F_SUPER_TYPES
public String to String String Buffer buffer new String Buffer to Debug String buffer return buffer to String  toString StringBuffer StringBuffer toDebugString toString

protected I Type f Element null see I Java Element Requestor public void accept Field I Field field implements interface method  IType fElement IJavaElementRequestor acceptField IField
see I Java Element Requestor public void accept Initializer I Initializer initializer implements interface method  IJavaElementRequestor acceptInitializer IInitializer
see I Java Element Requestor public void accept Member Type I Type type f Element type  IJavaElementRequestor acceptMemberType IType fElement
see I Java Element Requestor public void accept Method I Method method implements interface method  IJavaElementRequestor acceptMethod IMethod
see I Java Element Requestor public void accept Package Fragment I Package Fragment package Fragment implements interface method  IJavaElementRequestor acceptPackageFragment IPackageFragment packageFragment
see I Java Element Requestor public void accept Type I Type type f Element type  IJavaElementRequestor acceptType IType fElement
Returns the type accepted by this requestor or code null code if no type has been accepted public I Type get Type return f Element  IType getType fElement
see I Java Element Requestor public boolean is Canceled return f Element null  IJavaElementRequestor isCanceled fElement
Reset the state of this requestor public void reset f Element null  fElement

abstract class Sort Element extends Sort Java Element Sort Element int source Start int modifiers super Sort Element Builder this this source Start normalize Source Start source Start modifiers I Constants Acc Interface remove Acc Interface flags modifiers Compiler Modifiers Acc Just Flag this modifiers modifiers this children count 0  SortElement SortJavaElement SortElement sourceStart SortElementBuilder sourceStart normalizeSourceStart sourceStart IConstants AccInterface AccInterface CompilerModifiers AccJustFlag children_count
protected void set Parameters Method Declaration method Declaration String parameter Names String parameter Types for int i 0 max parameter Names length i max i String param Type parameter Types i Single Variable Declaration single Variable Declaration ast new Single Variable Declaration single Variable Declaration set Name ast new Simple Name parameter Names i int index Of Array Brace if param Type index Of 1 String type Parts split On param Type int length type Parts length index Of Array Brace type Parts length 1 index Of if index Of Array Brace 1 int dimensions occurences Of type Parts length 1 type Parts length 1 type Parts length 1 substring 0 index Of Array Brace String type Substrings new String length for int j 0 j length j type Substrings j type Parts j single Variable Declaration set Type ast new Array Type ast new Simple Type ast new Name type Substrings dimensions else String type Substrings new String length for int j 0 j length j type Substrings j new String type Parts j single Variable Declaration set Type ast new Simple Type ast new Name type Substrings else if index Of Array Brace param Type index Of 1 int dimensions occurences Of param Type param Type param Type substring 0 index Of Array Brace single Variable Declaration set Type ast new Array Type new Type param Type dimensions else single Variable Declaration set Type new Type param Type method Declaration parameters add single Variable Declaration  setParameters MethodDeclaration methodDeclaration parameterNames parameterTypes parameterNames paramType parameterTypes SingleVariableDeclaration singleVariableDeclaration newSingleVariableDeclaration singleVariableDeclaration setName newSimpleName parameterNames indexOfArrayBrace paramType indexOf typeParts splitOn paramType typeParts indexOfArrayBrace typeParts indexOf indexOfArrayBrace occurencesOf typeParts typeParts typeParts indexOfArrayBrace typeSubstrings typeSubstrings typeParts singleVariableDeclaration setType newArrayType newSimpleType newName typeSubstrings typeSubstrings typeSubstrings typeParts singleVariableDeclaration setType newSimpleType newName typeSubstrings indexOfArrayBrace paramType indexOf occurencesOf paramType paramType paramType indexOfArrayBrace singleVariableDeclaration setType newArrayType newType paramType singleVariableDeclaration setType newType paramType methodDeclaration singleVariableDeclaration
protected String split On char divider String string To Split int length string To Split null 0 string To Split length if length 0 return new String string To Split int word Count 1 for int i 0 i length i if string To Split char At i divider word Count String split new String word Count int last 0 current Word 0 for int i 0 i length i if string To Split char At i divider split current Word string To Split substring last i last i 1 split current Word string To Split substring last length return split  splitOn stringToSplit stringToSplit stringToSplit stringToSplit wordCount stringToSplit charAt wordCount wordCount currentWord stringToSplit charAt currentWord stringToSplit currentWord stringToSplit
protected int occurences Of char to Be Found String s if s null return 0 int count 0 for int i 0 max s length i max i if to Be Found s char At i count return count  occurencesOf toBeFound toBeFound charAt
protected Type new Type String type Source check if type is a primitive type scanner set Source type Source to Char Array scanner reset To 0 type Source length int token 0 try token scanner get Next Token catch Invalid Input Exception e return null if token Terminal Tokens Token Name Identifier return ast new Simple Type ast new Simple Name type Source else switch token case Terminal Tokens Token Nameint return ast new Primitive Type Primitive Type INT case Terminal Tokens Token Namebyte return ast new Primitive Type Primitive Type BYTE case Terminal Tokens Token Nameboolean return ast new Primitive Type Primitive Type BOOLEAN case Terminal Tokens Token Namechar return ast new Primitive Type Primitive Type CHAR case Terminal Tokens Token Namedouble return ast new Primitive Type Primitive Type DOUBLE case Terminal Tokens Token Namefloat return ast new Primitive Type Primitive Type FLOAT case Terminal Tokens Token Namelong return ast new Primitive Type Primitive Type LONG case Terminal Tokens Token Nameshort return ast new Primitive Type Primitive Type SHORT case Terminal Tokens Token Namevoid return ast new Primitive Type Primitive Type VOID return null  newType typeSource setSource typeSource toCharArray resetTo typeSource getNextToken InvalidInputException TerminalTokens TokenNameIdentifier newSimpleType newSimpleName typeSource TerminalTokens TokenNameint newPrimitiveType PrimitiveType TerminalTokens TokenNamebyte newPrimitiveType PrimitiveType TerminalTokens TokenNameboolean newPrimitiveType PrimitiveType TerminalTokens TokenNamechar newPrimitiveType PrimitiveType TerminalTokens TokenNamedouble newPrimitiveType PrimitiveType TerminalTokens TokenNamefloat newPrimitiveType PrimitiveType TerminalTokens TokenNamelong newPrimitiveType PrimitiveType TerminalTokens TokenNameshort newPrimitiveType PrimitiveType TerminalTokens TokenNamevoid newPrimitiveType PrimitiveType
abstract AST Node convert  ASTNode
Sort Abstract Method Declaration int source Start int modifiers char name char parameters Names char parameters Types char thrown Exceptions super source Start modifiers this name new String name if parameters Names null int length parameters Names length this parameters Names new String length this parameters Types new String length for int i 0 i length i this parameters Names i new String parameters Names i this parameters Types i new String parameters Types i if thrown Exceptions null int length thrown Exceptions length this thrown Exceptions new String length for int i 0 i length i this thrown Exceptions i new String thrown Exceptions i  SortAbstractMethodDeclaration sourceStart parametersNames parametersTypes thrownExceptions sourceStart parametersNames parametersNames parametersNames parametersTypes parametersNames parametersNames parametersTypes parametersTypes thrownExceptions thrownExceptions thrownExceptions thrownExceptions thrownExceptions
public String decode Signature String Buffer buffer new String Buffer buffer append NON NLS 1 if this parameters Names null int length parameters Names length for int i 0 i length 1 i buffer append parameters Types i parameters Names i NON NLS 1 NON NLS 2 buffer append parameters Types length 1 parameters Names length 1 NON NLS 1 buffer append NON NLS 1 return buffer to String  decodeSignature StringBuffer StringBuffer parametersNames parametersNames parametersTypes parametersNames parametersTypes parametersNames toString
see org eclipse jdt internal core Sort Element Builder Sort Element generate Source java lang String Buffer protected void generate Source String Buffer buffer super generate Source buffer int length this children count if length 0 int start this source Start int end this first Child Before Sorting source Start 1 for int i 0 i length i buffer append Sort Element Builder this source start end start 1 this children i generate Source buffer if i length 1 start this children i source End 1 else start this last Child Before Sorting source End 1 if i length 1 end this children i 1 source Start 1 else end this source End buffer append Sort Element Builder this source start end start 1 else buffer append Sort Element Builder this source this source Start this source End this source Start 1  SortElementBuilder SortElement generateSource StringBuffer generateSource StringBuffer generateSource children_count sourceStart firstChildBeforeSorting sourceStart SortElementBuilder generateSource sourceEnd lastChildBeforeSorting sourceEnd sourceStart sourceEnd SortElementBuilder SortElementBuilder sourceStart sourceEnd sourceStart
protected void map Positions int length this children count if length 0 int start this source Start int end this first Child Before Sorting source Start 1 for int i 0 i length i map Next Position this start end this children i map Positions if i length 1 start this children i source End 1 else start this last Child Before Sorting source End 1 if i length 1 end this children i 1 source Start 1 else end this source End map Next Position this start end else map Next Position this this source Start this source End  mapPositions children_count sourceStart firstChildBeforeSorting sourceStart mapNextPosition mapPositions sourceEnd lastChildBeforeSorting sourceEnd sourceStart sourceEnd mapNextPosition mapNextPosition sourceStart sourceEnd
class Sort Method Declaration extends Sort Abstract Method Declaration Sort Method Declaration int source Start int modifiers char name char parameters Names char parameters Types char thrown Exceptions char return Type super source Start modifiers name parameters Names parameters Types thrown Exceptions this id METHOD if return Type null this return Type new String return Type  SortMethodDeclaration SortAbstractMethodDeclaration SortMethodDeclaration sourceStart parametersNames parametersTypes thrownExceptions returnType sourceStart parametersNames parametersTypes thrownExceptions returnType returnType returnType
void display String Buffer buffer int tab buffer append tab tab append method NON NLS 1 append name append decode Signature if return Type null buffer append return Type LINE SEPARATOR NON NLS 1 else buffer append LINE SEPARATOR NON NLS 1  StringBuffer decodeSignature returnType returnType LINE_SEPARATOR LINE_SEPARATOR
AST Node convert Method Declaration method Declaration ast new Method Declaration method Declaration set Constructor false method Declaration set Modifiers this modifiers method Declaration set Name ast new Simple Name this name method Declaration set Property Compilation Unit Sorter RELATIVE ORDER new Integer this source Start set parameter names and types if this parameters Names null set Parameters method Declaration this parameters Names this parameters Types set thrown exceptions if this thrown Exceptions null for int j 0 max2 this thrown Exceptions length j max2 j String current Exception this thrown Exceptions j Name exception Name if current Exception index Of 1 exception Name ast new Simple Name current Exception else exception Name ast new Name split On current Exception method Declaration thrown Exceptions add exception Name set return type int index Of Array Brace String current Return Type this return Type if current Return Type null if current Return Type index Of 1 String return Type Substrings split On current Return Type int length return Type Substrings length index Of Array Brace return Type Substrings length 1 index Of if index Of Array Brace 1 int dimensions occurences Of return Type Substrings length 1 return Type Substrings length 1 return Type Substrings length 1 substring 0 index Of Array Brace method Declaration set Return Type ast new Array Type ast new Simple Type ast new Name return Type Substrings dimensions else method Declaration set Return Type ast new Simple Type ast new Name return Type Substrings else if index Of Array Brace current Return Type index Of 1 int dimensions occurences Of current Return Type current Return Type current Return Type substring 0 index Of Array Brace method Declaration set Return Type ast new Array Type new Type current Return Type dimensions else method Declaration set Return Type new Type current Return Type return method Declaration  ASTNode MethodDeclaration methodDeclaration newMethodDeclaration methodDeclaration setConstructor methodDeclaration setModifiers methodDeclaration setName newSimpleName methodDeclaration setProperty CompilationUnitSorter RELATIVE_ORDER sourceStart parametersNames setParameters methodDeclaration parametersNames parametersTypes thrownExceptions thrownExceptions currentException thrownExceptions exceptionName currentException indexOf exceptionName newSimpleName currentException exceptionName newName splitOn currentException methodDeclaration thrownExceptions exceptionName indexOfArrayBrace currentReturnType returnType currentReturnType currentReturnType indexOf returnTypeSubstrings splitOn currentReturnType returnTypeSubstrings indexOfArrayBrace returnTypeSubstrings indexOf indexOfArrayBrace occurencesOf returnTypeSubstrings returnTypeSubstrings returnTypeSubstrings indexOfArrayBrace methodDeclaration setReturnType newArrayType newSimpleType newName returnTypeSubstrings methodDeclaration setReturnType newSimpleType newName returnTypeSubstrings indexOfArrayBrace currentReturnType indexOf occurencesOf currentReturnType currentReturnType currentReturnType indexOfArrayBrace methodDeclaration setReturnType newArrayType newType currentReturnType methodDeclaration setReturnType newType currentReturnType methodDeclaration
class Sort Constructor Declaration extends Sort Abstract Method Declaration Sort Constructor Declaration int source Start int modifiers char name char parameters Names char parameters Types char thrown Exceptions super source Start modifiers name parameters Names parameters Types thrown Exceptions this id CONSTRUCTOR  SortConstructorDeclaration SortAbstractMethodDeclaration SortConstructorDeclaration sourceStart parametersNames parametersTypes thrownExceptions sourceStart parametersNames parametersTypes thrownExceptions
void display String Buffer buffer int tab buffer append tab tab append constructor NON NLS 1 append decode Signature LINE SEPARATOR  StringBuffer decodeSignature LINE_SEPARATOR
AST Node convert Method Declaration method Declaration ast new Method Declaration method Declaration set Constructor true method Declaration set Modifiers this modifiers method Declaration set Name ast new Simple Name this name method Declaration set Property Compilation Unit Sorter RELATIVE ORDER new Integer this source Start set parameter names and types if this parameters Names null set Parameters method Declaration this parameters Names this parameters Types set thrown exceptions if this thrown Exceptions null for int j 0 max2 this thrown Exceptions length j max2 j String current Exception this thrown Exceptions j Name exception Name if current Exception index Of 1 exception Name ast new Simple Name current Exception else exception Name ast new Name split On current Exception method Declaration thrown Exceptions add exception Name return method Declaration  ASTNode MethodDeclaration methodDeclaration newMethodDeclaration methodDeclaration setConstructor methodDeclaration setModifiers methodDeclaration setName newSimpleName methodDeclaration setProperty CompilationUnitSorter RELATIVE_ORDER sourceStart parametersNames setParameters methodDeclaration parametersNames parametersTypes thrownExceptions thrownExceptions currentException thrownExceptions exceptionName currentException indexOf exceptionName newSimpleName currentException exceptionName newName splitOn currentException methodDeclaration thrownExceptions exceptionName methodDeclaration
Sort Field Declaration int source Start int modifiers char type char name int name Source Start super source Start modifiers this declaration Start source Start this id FIELD this type new String type this name new String name this name Source Start name Source Start  SortFieldDeclaration sourceStart nameSourceStart sourceStart declarationStart sourceStart nameSourceStart nameSourceStart
void display String Buffer buffer int tab buffer append tab tab append field NON NLS 1 append type name LINE SEPARATOR NON NLS 1  StringBuffer LINE_SEPARATOR
AST Node convert Variable Declaration Fragment variable Declaration Fragment ast new Variable Declaration Fragment variable Declaration Fragment set Name ast new Simple Name this name Field Declaration field Declaration ast new Field Declaration variable Declaration Fragment String current Field Type this type int index Of Array Brace if current Field Type index Of 1 String type Parts split On current Field Type int length type Parts length index Of Array Brace type Parts length 1 index Of if index Of Array Brace 1 int dimensions occurences Of type Parts length 1 type Parts length 1 type Parts length 1 substring 0 index Of Array Brace field Declaration set Type ast new Array Type ast new Simple Type ast new Name type Parts dimensions else field Declaration set Type ast new Simple Type ast new Name type Parts else if index Of Array Brace current Field Type index Of 1 int dimensions occurences Of current Field Type current Field Type current Field Type substring 0 index Of Array Brace field Declaration set Type ast new Array Type new Type current Field Type dimensions else field Declaration set Type new Type current Field Type field Declaration set Modifiers this modifiers field Declaration set Property Compilation Unit Sorter RELATIVE ORDER new Integer this source Start return field Declaration  ASTNode VariableDeclarationFragment variableDeclarationFragment newVariableDeclarationFragment variableDeclarationFragment setName newSimpleName FieldDeclaration fieldDeclaration newFieldDeclaration variableDeclarationFragment currentFieldType indexOfArrayBrace currentFieldType indexOf typeParts splitOn currentFieldType typeParts indexOfArrayBrace typeParts indexOf indexOfArrayBrace occurencesOf typeParts typeParts typeParts indexOfArrayBrace fieldDeclaration setType newArrayType newSimpleType newName typeParts fieldDeclaration setType newSimpleType newName typeParts indexOfArrayBrace currentFieldType indexOf occurencesOf currentFieldType currentFieldType currentFieldType indexOfArrayBrace fieldDeclaration setType newArrayType newType currentFieldType fieldDeclaration setType newType currentFieldType fieldDeclaration setModifiers fieldDeclaration setProperty CompilationUnitSorter RELATIVE_ORDER sourceStart fieldDeclaration
see org eclipse jdt internal core Sort Element Builder Sort Element generate Source java lang String Buffer protected void generate Source String Buffer buffer super generate Source buffer int length this children count if length 0 int start this source Start int end this first Child Before Sorting source Start 1 for int i 0 i length i buffer append Sort Element Builder this source start end start 1 this children i generate Source buffer if i length 1 start this children i source End 1 else start this last Child Before Sorting source End 1 if i length 1 end this children i 1 source Start 1 else end this declaration Source End buffer append Sort Element Builder this source start end start 1 else buffer append Sort Element Builder this source this source Start this declaration Source End this source Start 1  SortElementBuilder SortElement generateSource StringBuffer generateSource StringBuffer generateSource children_count sourceStart firstChildBeforeSorting sourceStart SortElementBuilder generateSource sourceEnd lastChildBeforeSorting sourceEnd sourceStart declarationSourceEnd SortElementBuilder SortElementBuilder sourceStart declarationSourceEnd sourceStart
protected void generate Reduce Source String Buffer buffer int length this children count if length 0 int start this name Source Start int end this first Child Before Sorting source Start 1 for int i 0 i length i buffer append Sort Element Builder this source start end start 1 this children i generate Source buffer if i length 1 start this children i source End 1 else start this last Child Before Sorting source End 1 if i length 1 end this children i 1 source Start 1 else end this source End buffer append Sort Element Builder this source start end start 1 else buffer append Sort Element Builder this source this name Source Start this source End this name Source Start 1  generateReduceSource StringBuffer children_count nameSourceStart firstChildBeforeSorting sourceStart SortElementBuilder generateSource sourceEnd lastChildBeforeSorting sourceEnd sourceStart sourceEnd SortElementBuilder SortElementBuilder nameSourceStart sourceEnd nameSourceStart
protected void map Reduced Positions int length this children count if length 0 int start this name Source Start int end this first Child Before Sorting source Start 1 map Next Position this start end for int i 0 i length i this children i map Positions if i length 1 start this children i source End 1 else start this last Child Before Sorting source End 1 if i length 1 end this children i 1 source Start 1 else end this source End map Next Position this start end else map Next Position this this name Source Start this source End  mapReducedPositions children_count nameSourceStart firstChildBeforeSorting sourceStart mapNextPosition mapPositions sourceEnd lastChildBeforeSorting sourceEnd sourceStart sourceEnd mapNextPosition mapNextPosition nameSourceStart sourceEnd
protected void map Positions int length this children count if length 0 int start this source Start int end this first Child Before Sorting source Start 1 for int i 0 i length i map Next Position this start end this children i map Positions if i length 1 start this children i source End 1 else start this last Child Before Sorting source End 1 if i length 1 end this children i 1 source Start 1 else end this declaration Source End map Next Position this start end else map Next Position this this source Start this declaration Source End  mapPositions children_count sourceStart firstChildBeforeSorting sourceStart mapNextPosition mapPositions sourceEnd lastChildBeforeSorting sourceEnd sourceStart declarationSourceEnd mapNextPosition mapNextPosition sourceStart declarationSourceEnd
class Sort Multiple Field Declaration extends Sort Element Sort Multiple Field Declaration Sort Field Declaration field Declaration super field Declaration declaration Start field Declaration modifiers this declaration Start field Declaration declaration Start this id MULTIPLE FIELD this inner Fields new Sort Field Declaration 1 this field Counter 0 this inner Fields this field Counter field Declaration this type field Declaration type this source Start field Declaration source Start field Declaration source End field Declaration previous Source End  SortMultipleFieldDeclaration SortElement SortMultipleFieldDeclaration SortFieldDeclaration fieldDeclaration fieldDeclaration declarationStart fieldDeclaration declarationStart fieldDeclaration declarationStart MULTIPLE_FIELD innerFields SortFieldDeclaration fieldCounter innerFields fieldCounter fieldDeclaration fieldDeclaration sourceStart fieldDeclaration sourceStart fieldDeclaration sourceEnd fieldDeclaration previousSourceEnd
void add Field Sort Field Declaration field Declaration System arraycopy this inner Fields 0 this inner Fields new Sort Field Declaration this field Counter 1 0 this field Counter this inner Fields this field Counter field Declaration field Declaration source End field Declaration previous Source End  addField SortFieldDeclaration fieldDeclaration innerFields innerFields SortFieldDeclaration fieldCounter fieldCounter innerFields fieldCounter fieldDeclaration fieldDeclaration sourceEnd fieldDeclaration previousSourceEnd
void display String Buffer buffer int tab buffer append tab tab append multiple fields NON NLS 1 append LINE SEPARATOR if this inner Fields null buffer append tab tab 1 append INNER FIELDS LINE SEPARATOR NON NLS 1 for int i 0 i this field Counter i buffer append this inner Fields i to String tab 2 buffer append LINE SEPARATOR  StringBuffer LINE_SEPARATOR innerFields LINE_SEPARATOR fieldCounter innerFields toString LINE_SEPARATOR
AST Node convert Variable Declaration Fragment variable Declaration Fragment ast new Variable Declaration Fragment variable Declaration Fragment set Name ast new Simple Name this inner Fields 0 name Field Declaration field Declaration ast new Field Declaration variable Declaration Fragment for int j 1 max2 this inner Fields length j max2 j Variable Declaration Fragment fragment ast new Variable Declaration Fragment fragment set Name ast new Simple Name new String this inner Fields j name String current Field Type this type int index Of Array Brace if current Field Type index Of 1 String type Parts split On current Field Type int length type Parts length index Of Array Brace type Parts length 1 index Of if index Of Array Brace 1 int dimensions occurences Of type Parts length 1 type Parts length 1 type Parts length 1 substring 0 index Of Array Brace field Declaration set Type ast new Array Type ast new Simple Type ast new Name type Parts dimensions else field Declaration set Type ast new Simple Type ast new Name type Parts else if index Of Array Brace current Field Type index Of 1 int dimensions occurences Of current Field Type current Field Type current Field Type substring 0 index Of Array Brace field Declaration set Type ast new Array Type new Type current Field Type dimensions else field Declaration set Type new Type current Field Type field Declaration set Property Compilation Unit Sorter RELATIVE ORDER new Integer this source Start field Declaration set Modifiers this modifiers return field Declaration  ASTNode VariableDeclarationFragment variableDeclarationFragment newVariableDeclarationFragment variableDeclarationFragment setName newSimpleName innerFields FieldDeclaration fieldDeclaration newFieldDeclaration variableDeclarationFragment innerFields VariableDeclarationFragment newVariableDeclarationFragment setName newSimpleName innerFields currentFieldType indexOfArrayBrace currentFieldType indexOf typeParts splitOn currentFieldType typeParts indexOfArrayBrace typeParts indexOf indexOfArrayBrace occurencesOf typeParts typeParts typeParts indexOfArrayBrace fieldDeclaration setType newArrayType newSimpleType newName typeParts fieldDeclaration setType newSimpleType newName typeParts indexOfArrayBrace currentFieldType indexOf occurencesOf currentFieldType currentFieldType currentFieldType indexOfArrayBrace fieldDeclaration setType newArrayType newType currentFieldType fieldDeclaration setType newType currentFieldType fieldDeclaration setProperty CompilationUnitSorter RELATIVE_ORDER sourceStart fieldDeclaration setModifiers fieldDeclaration
see org eclipse jdt internal core Sort Element Builder Sort Element generate Source java lang String Buffer protected void generate Source String Buffer buffer super generate Source buffer int length this field Counter int start this inner Fields 0 source Start int end this inner Fields 0 name Source Start 1 buffer append Sort Element Builder this source start end start 1 for int i 0 i length i this inner Fields i new Source Start this new Source Start this inner Fields i generate Reduce Source buffer if i length 1 start this inner Fields i source End 1 end this inner Fields i 1 name Source Start 1 buffer append Sort Element Builder this source start end start 1 start this inner Fields length 1 source End 1 end this inner Fields length 1 declaration Source End buffer append Sort Element Builder this source start end start 1  SortElementBuilder SortElement generateSource StringBuffer generateSource StringBuffer generateSource fieldCounter innerFields sourceStart innerFields nameSourceStart SortElementBuilder innerFields newSourceStart newSourceStart innerFields generateReduceSource innerFields sourceEnd innerFields nameSourceStart SortElementBuilder innerFields sourceEnd innerFields declarationSourceEnd SortElementBuilder
protected void map Positions int length this field Counter int start this inner Fields 0 source Start int end this inner Fields 0 name Source Start 1 map Next Position this start end for int i 0 i length i this inner Fields i new Source Start this new Source Start this inner Fields i map Reduced Positions if i length 1 start this inner Fields i source End 1 end this inner Fields i 1 name Source Start 1 map Next Position this start end start this inner Fields length 1 source End 1 end this inner Fields length 1 declaration Source End map Next Position this start end  mapPositions fieldCounter innerFields sourceStart innerFields nameSourceStart mapNextPosition innerFields newSourceStart newSourceStart innerFields mapReducedPositions innerFields sourceEnd innerFields nameSourceStart mapNextPosition innerFields sourceEnd innerFields declarationSourceEnd mapNextPosition
protected void sort for int i 0 max this field Counter i max i this inner Fields i sort  fieldCounter innerFields
class Sort Initializer extends Sort Element Sort Initializer int source Start int modifiers super source Start modifiers this id INITIALIZER  SortInitializer SortElement SortInitializer sourceStart sourceStart
void display String Buffer buffer int tab buffer append tab tab append initializer LINE SEPARATOR NON NLS 1  StringBuffer LINE_SEPARATOR
AST Node convert Initializer initializer ast new Initializer initializer set Modifiers this modifiers initializer set Property Compilation Unit Sorter RELATIVE ORDER new Integer this source Start return initializer  ASTNode newInitializer setModifiers setProperty CompilationUnitSorter RELATIVE_ORDER sourceStart
see org eclipse jdt internal core Sort Element Builder Sort Element generate Source java lang String Buffer protected void generate Source String Buffer buffer super generate Source buffer int length this children count if length 0 int start this source Start int end this first Child Before Sorting source Start 1 for int i 0 i length i buffer append Sort Element Builder this source start end start 1 this children i generate Source buffer if i length 1 start this children i source End 1 else start this last Child Before Sorting source End 1 if i length 1 end this children i 1 source Start 1 else end this source End buffer append Sort Element Builder this source start end start 1 else buffer append Sort Element Builder this source this source Start this source End this source Start 1  SortElementBuilder SortElement generateSource StringBuffer generateSource StringBuffer generateSource children_count sourceStart firstChildBeforeSorting sourceStart SortElementBuilder generateSource sourceEnd lastChildBeforeSorting sourceEnd sourceStart sourceEnd SortElementBuilder SortElementBuilder sourceStart sourceEnd sourceStart
protected void map Positions int length this children count if length 0 int start this source Start int end this first Child Before Sorting source Start 1 for int i 0 i length i map Next Position this start end this children i map Positions if i length 1 start this children i source End 1 else start this last Child Before Sorting source End 1 if i length 1 end this children i 1 source Start 1 else end this source End map Next Position this start end else map Next Position this this source Start this source End  mapPositions children_count sourceStart firstChildBeforeSorting sourceStart mapNextPosition mapPositions sourceEnd lastChildBeforeSorting sourceEnd sourceStart sourceEnd mapNextPosition mapNextPosition sourceStart sourceEnd
class Sort Class Declaration extends Sort Type Sort Class Declaration int source Start int modifiers char name char superclass char superinterfaces super source Start modifiers name superinterfaces this id CLASS TYPE if superclass null this superclass new String superclass  SortClassDeclaration SortType SortClassDeclaration sourceStart sourceStart
void display String Buffer buffer int tab buffer append tab tab append class NON NLS 1 append this name if this superclass null buffer append extends this superclass NON NLS 1 if this super Interfaces null int length this super Interfaces length buffer append implements NON NLS 1 for int i 0 i length 1 i buffer append this super Interfaces i NON NLS 1 buffer append this super Interfaces length 1 buffer append LINE SEPARATOR  StringBuffer superInterfaces superInterfaces superInterfaces superInterfaces LINE_SEPARATOR
AST Node convert Type Declaration type Declaration ast new Type Declaration type Declaration set Interface false type Declaration set Modifiers this modifiers type Declaration set Name ast new Simple Name this name set superclass if this superclass null if this superclass index Of 1 the superclass is a simple name type Declaration set Superclass ast new Simple Name this superclass else the superclass is a qualified name String superclass Names split On this superclass type Declaration set Superclass ast new Name superclass Names set superinterfaces if this super Interfaces null for int j 0 max2 this super Interfaces length j max2 j String current Interface Name this super Interfaces j Name interface Name if current Interface Name index Of 1 the superclass is a simple name interface Name ast new Simple Name current Interface Name else the superclass is a qualified name String interface Names split On current Interface Name interface Name ast new Name interface Names type Declaration super Interfaces add interface Name type Declaration set Property Compilation Unit Sorter RELATIVE ORDER new Integer this source Start return type Declaration  ASTNode TypeDeclaration typeDeclaration newTypeDeclaration typeDeclaration setInterface typeDeclaration setModifiers typeDeclaration setName newSimpleName indexOf typeDeclaration setSuperclass newSimpleName superclassNames splitOn typeDeclaration setSuperclass newName superclassNames superInterfaces superInterfaces currentInterfaceName superInterfaces interfaceName currentInterfaceName indexOf interfaceName newSimpleName currentInterfaceName interfaceNames splitOn currentInterfaceName interfaceName newName interfaceNames typeDeclaration superInterfaces interfaceName typeDeclaration setProperty CompilationUnitSorter RELATIVE_ORDER sourceStart typeDeclaration
abstract class Sort Type extends Sort Element Sort Type int source Start int modifier char name char superinterfaces super source Start modifier this name new String name if superinterfaces null int length superinterfaces length this super Interfaces new String length for int i 0 i length i this super Interfaces i new String superinterfaces i  SortType SortElement SortType sourceStart sourceStart superInterfaces superInterfaces
see org eclipse jdt internal core Sort Element Builder Sort Element generate Source java lang String Buffer protected void generate Source String Buffer buffer super generate Source buffer int length this children count int start this source Start if length 0 int end this first Child Before Sorting source Start buffer append Sort Element Builder this source start end start for int i 0 i length i Sort Element Builder Sort Element this ast Nodes i get Property CORRESPONDING ELEMENT generate Source buffer start this last Child Before Sorting source End 1 buffer append Sort Element Builder this source start this source End start 1 else buffer append Sort Element Builder this source start this source End start 1  SortElementBuilder SortElement generateSource StringBuffer generateSource StringBuffer generateSource children_count sourceStart firstChildBeforeSorting sourceStart SortElementBuilder SortElementBuilder SortElement astNodes getProperty CORRESPONDING_ELEMENT generateSource lastChildBeforeSorting sourceEnd SortElementBuilder sourceEnd SortElementBuilder sourceEnd
protected void map Positions int length this children count int start this source Start if length 0 int end this first Child Before Sorting source Start 1 map Next Position this start end for int i 0 i length i children i map Positions start this last Child Before Sorting source End 1 map Next Position this start this source End else map Next Position this start this source End  mapPositions children_count sourceStart firstChildBeforeSorting sourceStart mapNextPosition mapPositions lastChildBeforeSorting sourceEnd mapNextPosition sourceEnd mapNextPosition sourceEnd
class Sort Interface Declaration extends Sort Type Sort Interface Declaration int source Start int modifiers char name char superinterfaces super source Start modifiers name superinterfaces this id TYPE INTERFACE  SortInterfaceDeclaration SortType SortInterfaceDeclaration sourceStart sourceStart
void display String Buffer buffer int tab buffer append tab tab append interface NON NLS 1 append this name if this super Interfaces null int length this super Interfaces length buffer append implements NON NLS 1 for int i 0 i length 1 i buffer append this super Interfaces i NON NLS 1 buffer append this super Interfaces length 1 buffer append LINE SEPARATOR  StringBuffer superInterfaces superInterfaces superInterfaces superInterfaces LINE_SEPARATOR
AST Node convert Type Declaration type Declaration ast new Type Declaration type Declaration set Interface true type Declaration set Modifiers this modifiers type Declaration set Name ast new Simple Name this name set superinterfaces if this super Interfaces null for int j 0 max2 this super Interfaces length j max2 j String current Interface Name this super Interfaces j Name interface Name if current Interface Name index Of 1 the superclass is a simple name interface Name ast new Simple Name current Interface Name else the superclass is a qualified name String interface Names split On current Interface Name interface Name ast new Name interface Names type Declaration super Interfaces add interface Name type Declaration set Property Compilation Unit Sorter RELATIVE ORDER new Integer this source Start return type Declaration  ASTNode TypeDeclaration typeDeclaration newTypeDeclaration typeDeclaration setInterface typeDeclaration setModifiers typeDeclaration setName newSimpleName superInterfaces superInterfaces currentInterfaceName superInterfaces interfaceName currentInterfaceName indexOf interfaceName newSimpleName currentInterfaceName interfaceNames splitOn currentInterfaceName interfaceName newName interfaceNames typeDeclaration superInterfaces interfaceName typeDeclaration setProperty CompilationUnitSorter RELATIVE_ORDER sourceStart typeDeclaration
class Sort Compilation Unit extends Sort Element Sort Compilation Unit int source Start super source Start 0 this id COMPILATION UNIT  SortCompilationUnit SortElement SortCompilationUnit sourceStart sourceStart COMPILATION_UNIT
this id COMPILATION UNIT void display String Buffer buffer int tab nothing to do  COMPILATION_UNIT StringBuffer
AST Node convert return ast new Compilation Unit  ASTNode newCompilationUnit
see org eclipse jdt internal core Sort Element Builder Sort Element generate Source java lang String Buffer protected void generate Source String Buffer buffer super generate Source buffer int length this children count if length 0 int end this first Child Before Sorting source Start int start this last Child Before Sorting source End 1 buffer append Sort Element Builder this source 0 end for int i 0 i length i Sort Element Builder Sort Element this ast Nodes i get Property CORRESPONDING ELEMENT generate Source buffer buffer append Sort Element Builder this source start this source End start 1  SortElementBuilder SortElement generateSource StringBuffer generateSource StringBuffer generateSource children_count firstChildBeforeSorting sourceStart lastChildBeforeSorting sourceEnd SortElementBuilder SortElementBuilder SortElement astNodes getProperty CORRESPONDING_ELEMENT generateSource SortElementBuilder sourceEnd
protected void map Positions int length this children count if length 0 int end this first Child Before Sorting source Start int start this last Child Before Sorting source End 1 map Next Position this 0 end for int i 0 i length i children i map Positions map Next Position this start this source End else map Next Position this this source Start this source End  mapPositions children_count firstChildBeforeSorting sourceStart lastChildBeforeSorting sourceEnd mapNextPosition mapPositions mapNextPosition sourceEnd mapNextPosition sourceStart sourceEnd
public Sort Element Builder char source int positions To Map Comparator comparator this source source this comparator comparator this positions To Map positions To Map this scanner new Scanner false false false Class File Constants JDK1 3 source Level null null true task Case Sensitive this ast AST newAST AST JLS2  SortElementBuilder positionsToMap positionsToMap positionsToMap ClassFileConstants JDK1_3 sourceLevel taskCaseSensitive
see I Source Element Requestor accept Line Separator Positions int public void accept Line Separator Positions int positions this line Ends positions  ISourceElementRequestor acceptLineSeparatorPositions acceptLineSeparatorPositions lineEnds
public String get Source String Buffer buffer new String Buffer this positions To Map Index 0 this compilation Unit generate Source buffer if this positions To Map null this compilation Unit map Positions return buffer to String  getSource StringBuffer StringBuffer positionsToMapIndex compilationUnit generateSource positionsToMap compilationUnit mapPositions toString
private static int search Line Number int start Line Indexes int position this code is completely useless but it is the same implementation than org eclipse jdt internal compiler problem Problem Handler search Line Number int int if start Line Indexes null return 1 int length start Line Indexes length if length 0 return 1 int g 0 d length 1 int m 0 while g d m g d 2 if position start Line Indexes m d m 1 else if position start Line Indexes m g m 1 else return m 1 if position start Line Indexes m return m 1 return m 2  searchLineNumber startLineIndexes ProblemHandler searchLineNumber startLineIndexes startLineIndexes startLineIndexes startLineIndexes startLineIndexes
void sort this compilation Unit sort  compilationUnit
void map Next Position Sort Java Element node int start int end int i this positions To Map Index for i this positions To Map length i int next Position this positions To Map i if next Position start next Position end this positions To Map i node new Source Start node source Start else break this positions To Map Index i  mapNextPosition SortJavaElement positionsToMapIndex positionsToMap nextPosition positionsToMap nextPosition nextPosition positionsToMap newSourceStart sourceStart positionsToMapIndex
see org eclipse jdt internal compiler I Source Element Requestor enter Class int int char int int char char public void enter Class int declaration Start int modifiers char name int name Source Start int name Source End char superclass char superinterfaces Sort Type type new Sort Class Declaration declaration Start modifiers name superclass superinterfaces this current Element add Child type push type  ISourceElementRequestor enterClass enterClass declarationStart nameSourceStart nameSourceEnd SortType SortClassDeclaration declarationStart currentElement addChild
see org eclipse jdt internal compiler I Source Element Requestor enter Compilation Unit public void enter Compilation Unit this stack new Stack push this compilation Unit new Sort Compilation Unit 0  ISourceElementRequestor enterCompilationUnit enterCompilationUnit compilationUnit SortCompilationUnit
see org eclipse jdt internal compiler I Source Element Requestor enter Constructor int int char int int char char char public void enter Constructor int declaration Start int modifiers char name int name Source Start int name Source End char parameter Types char parameter Names char exception Types if this current Element id Sort Java Element TYPE 0 Sort Constructor Declaration constructor Declaration new Sort Constructor Declaration declaration Start modifiers name parameter Names parameter Types exception Types this current Element add Child constructor Declaration push constructor Declaration  ISourceElementRequestor enterConstructor enterConstructor declarationStart nameSourceStart nameSourceEnd parameterTypes parameterNames exceptionTypes currentElement SortJavaElement SortConstructorDeclaration constructorDeclaration SortConstructorDeclaration declarationStart parameterNames parameterTypes exceptionTypes currentElement addChild constructorDeclaration constructorDeclaration
see org eclipse jdt internal compiler I Source Element Requestor enter Field int int char char int int public void enter Field int declaration Start int modifiers char type char name int name Source Start int name Source End if this current Element id Sort Java Element TYPE 0 Sort Field Declaration field Declaration new Sort Field Declaration declaration Start modifiers type name name Source Start Sort Element current Element Children this current Element children if current Element Children null Sort Element previous Element this current Element children this current Element children count 1 if previous Element id Sort Java Element FIELD Sort Field Declaration previous Element declaration Start declaration Start Sort Multiple Field Declaration multiple Fiel Declaration new Sort Multiple Field Declaration Sort Field Declaration previous Element multiple Fiel Declaration add Field field Declaration this current Element children this current Element children count 1 multiple Fiel Declaration else if previous Element id Sort Java Element MULTIPLE FIELD Sort Multiple Field Declaration previous Element declaration Start declaration Start Sort Multiple Field Declaration previous Element add Field field Declaration else this current Element add Child field Declaration else this current Element add Child field Declaration push field Declaration  ISourceElementRequestor enterField enterField declarationStart nameSourceStart nameSourceEnd currentElement SortJavaElement SortFieldDeclaration fieldDeclaration SortFieldDeclaration declarationStart nameSourceStart SortElement currentElementChildren currentElement currentElementChildren SortElement previousElement currentElement currentElement children_count previousElement SortJavaElement SortFieldDeclaration previousElement declarationStart declarationStart SortMultipleFieldDeclaration multipleFielDeclaration SortMultipleFieldDeclaration SortFieldDeclaration previousElement multipleFielDeclaration addField fieldDeclaration currentElement currentElement children_count multipleFielDeclaration previousElement SortJavaElement MULTIPLE_FIELD SortMultipleFieldDeclaration previousElement declarationStart declarationStart SortMultipleFieldDeclaration previousElement addField fieldDeclaration currentElement addChild fieldDeclaration currentElement addChild fieldDeclaration fieldDeclaration
see org eclipse jdt internal compiler I Source Element Requestor enter Initializer int int public void enter Initializer int declaration Start int modifiers if this current Element id Sort Java Element TYPE 0 Sort Initializer initializer new Sort Initializer declaration Start modifiers this current Element add Child initializer push initializer  ISourceElementRequestor enterInitializer enterInitializer declarationStart currentElement SortJavaElement SortInitializer SortInitializer declarationStart currentElement addChild
see org eclipse jdt internal compiler I Source Element Requestor enter Interface int int char int int char public void enter Interface int declaration Start int modifiers char name int name Source Start int name Source End char superinterfaces Sort Type type new Sort Interface Declaration declaration Start modifiers name superinterfaces this current Element add Child type push type  ISourceElementRequestor enterInterface enterInterface declarationStart nameSourceStart nameSourceEnd SortType SortInterfaceDeclaration declarationStart currentElement addChild
see org eclipse jdt internal compiler I Source Element Requestor enter Method int int char char int int char char char public void enter Method int declaration Start int modifiers char return Type char name int name Source Start int name Source End char parameter Types char parameter Names char exception Types if this current Element id Sort Java Element TYPE 0 Sort Method Declaration method Declaration new Sort Method Declaration declaration Start modifiers name parameter Names parameter Types exception Types return Type this current Element add Child method Declaration push method Declaration  ISourceElementRequestor enterMethod enterMethod declarationStart returnType nameSourceStart nameSourceEnd parameterTypes parameterNames exceptionTypes currentElement SortJavaElement SortMethodDeclaration methodDeclaration SortMethodDeclaration declarationStart parameterNames parameterTypes exceptionTypes returnType currentElement addChild methodDeclaration methodDeclaration
see org eclipse jdt internal compiler I Source Element Requestor exit Class int public void exit Class int declaration End pop declaration End  ISourceElementRequestor exitClass exitClass declarationEnd declarationEnd
see org eclipse jdt internal compiler I Source Element Requestor exit Compilation Unit int public void exit Compilation Unit int declaration End pop declaration End sort  ISourceElementRequestor exitCompilationUnit exitCompilationUnit declarationEnd declarationEnd
see org eclipse jdt internal compiler I Source Element Requestor exit Constructor int public void exit Constructor int declaration End pop declaration End  ISourceElementRequestor exitConstructor exitConstructor declarationEnd declarationEnd
see org eclipse jdt internal compiler I Source Element Requestor exit Field int int int public void exit Field int initialization Start int declaration End int declaration Source End int normalized Declaration Source End this normalize Source End declaration Source End if this current Element id Sort Java Element FIELD Sort Field Declaration field Declaration Sort Field Declaration this current Element field Declaration declaration Source End normalized Declaration Source End pop declaration End if this current Element children null Sort Element element this current Element children this current Element children count 1 switch element id case Sort Java Element MULTIPLE FIELD Sort Multiple Field Declaration multiple Fiel Declaration Sort Multiple Field Declaration element multiple Fiel Declaration inner Fields multiple Fiel Declaration field Counter 1 declaration Source End normalized Declaration Source End multiple Fiel Declaration source End normalized Declaration Source End break case Sort Java Element FIELD Sort Field Declaration field Declaration Sort Field Declaration element we will revert to the previous source end in case this field is part of a multiple field declaration field Declaration previous Source End field Declaration source End field Declaration source End normalized Declaration Source End  ISourceElementRequestor exitField exitField initializationStart declarationEnd declarationSourceEnd normalizedDeclarationSourceEnd normalizeSourceEnd declarationSourceEnd currentElement SortJavaElement SortFieldDeclaration fieldDeclaration SortFieldDeclaration currentElement fieldDeclaration declarationSourceEnd normalizedDeclarationSourceEnd declarationEnd currentElement SortElement currentElement currentElement children_count SortJavaElement MULTIPLE_FIELD SortMultipleFieldDeclaration multipleFielDeclaration SortMultipleFieldDeclaration multipleFielDeclaration innerFields multipleFielDeclaration fieldCounter declarationSourceEnd normalizedDeclarationSourceEnd multipleFielDeclaration sourceEnd normalizedDeclarationSourceEnd SortJavaElement SortFieldDeclaration fieldDeclaration SortFieldDeclaration fieldDeclaration previousSourceEnd fieldDeclaration sourceEnd fieldDeclaration sourceEnd normalizedDeclarationSourceEnd
see org eclipse jdt internal compiler I Source Element Requestor exit Initializer int public void exit Initializer int declaration End pop declaration End  ISourceElementRequestor exitInitializer exitInitializer declarationEnd declarationEnd
see org eclipse jdt internal compiler I Source Element Requestor exit Interface int public void exit Interface int declaration End pop declaration End  ISourceElementRequestor exitInterface exitInterface declarationEnd declarationEnd
see org eclipse jdt internal compiler I Source Element Requestor exit Method int public void exit Method int declaration End pop declaration End  ISourceElementRequestor exitMethod exitMethod declarationEnd declarationEnd
final int normalize Source Start int position if position 0 return 0 int index position 1 while index 0 Character is Whitespace this source index index int original Line Number search Line Number this line Ends position int new Line Number search Line Number this line Ends index if original Line Number new Line Number return index 1 else return this line Ends new Line Number 1 1  normalizeSourceStart isWhitespace originalLineNumber searchLineNumber lineEnds newLineNumber searchLineNumber lineEnds originalLineNumber newLineNumber lineEnds newLineNumber
final int normalize Source End int position int line Number search Line Number this line Ends position if line Number 1 return position int normalize Source End 0 if line Number 1 this line Ends length normalize Source End this source length 1 else normalize Source End this line Ends line Number 1 int index position 1 while index normalize Source End Character is Whitespace this source index index if index normalize Source End return normalize Source End else return position  normalizeSourceEnd lineNumber searchLineNumber lineEnds lineNumber normalizeSourceEnd lineNumber lineEnds normalizeSourceEnd normalizeSourceEnd lineEnds lineNumber normalizeSourceEnd isWhitespace normalizeSourceEnd normalizeSourceEnd
private void pop int declaration End this current Element source End normalize Source End declaration End this current Element close Collections this stack pop if this stack is Empty this current Element Sort Element this stack peek  declarationEnd currentElement sourceEnd normalizeSourceEnd declarationEnd currentElement closeCollections isEmpty currentElement SortElement
private void push Sort Element sort Element this current Element sort Element this stack push sort Element  SortElement sortElement currentElement sortElement sortElement

Constructor for Sort Elements Operation param elements param positions param comparator public Sort Elements Operation I Java Element elements int positions Comparator comparator super elements this comparator comparator this positions positions  SortElementsOperation SortElementsOperation IJavaElement
Returns the amount of work for the main task of this operation for progress reporting protected int get Main Amount Of Work return this elements To Process length  getMainAmountOfWork elementsToProcess
see org eclipse jdt internal core Java Model Operation execute Operation protected void execute Operation throws Java Model Exception try begin Task Util bind operation sortelements get Main Amount Of Work NON NLS 1 Compilation Unit copy Compilation Unit this elements To Process 0 I Compilation Unit unit copy get Primary I Buffer buffer copy get Buffer if buffer null return char buffer Contents buffer get Characters String result process Element unit this positions buffer Contents if Char Operation equals result to Char Array buffer Contents copy get Buffer set Contents result worked 1 finally done  JavaModelOperation executeOperation executeOperation JavaModelException beginTask getMainAmountOfWork CompilationUnit CompilationUnit elementsToProcess ICompilationUnit getPrimary IBuffer getBuffer bufferContents getCharacters processElement bufferContents CharOperation toCharArray bufferContents getBuffer setContents
Method process Element param unit param positions To Map param source private String process Element I Compilation Unit unit int positions To Map char source Sort Element Builder builder new Sort Element Builder source positions To Map this comparator Source Element Parser parser new Source Element Parser builder Problem Factory get Problem Factory Locale get Default new Compiler Options Java Core get Options true if unit exists I Package Fragment package Fragment I Package Fragment unit get Ancestor I Java Element PACKAGE FRAGMENT char expected Package Name null if package Fragment null expected Package Name Char Operation split On package Fragment get Element Name to Char Array parser parse Compilation Unit new Basic Compilation Unit source expected Package Name unit get Element Name unit false diet parse else parser parse Compilation Unit new Basic Compilation Unit source null NON NLS 1 unit get Java Project NON NLS 1 false diet parse return builder get Source  processElement positionsToMap processElement ICompilationUnit positionsToMap SortElementBuilder SortElementBuilder positionsToMap SourceElementParser SourceElementParser ProblemFactory getProblemFactory getDefault CompilerOptions JavaCore getOptions IPackageFragment packageFragment IPackageFragment getAncestor IJavaElement PACKAGE_FRAGMENT expectedPackageName packageFragment expectedPackageName CharOperation splitOn packageFragment getElementName toCharArray parseCompilationUnit BasicCompilationUnit expectedPackageName getElementName parseCompilationUnit BasicCompilationUnit getJavaProject getSource
Possible failures ul li NO ELEMENTS TO PROCESS the compilation unit supplied to the operation is code null code li li INVALID ELEMENT TYPES the supplied elements are not an instance of I Working Copy li ul return I Java Model Status public I Java Model Status verify if this elements To Process length 1 return new Java Model Status I Java Model Status Constants NO ELEMENTS TO PROCESS if this elements To Process 0 null return new Java Model Status I Java Model Status Constants NO ELEMENTS TO PROCESS if this elements To Process 0 instanceof I Compilation Unit I Compilation Unit this elements To Process 0 is Working Copy return new Java Model Status I Java Model Status Constants INVALID ELEMENT TYPES this elements To Process 0 return Java Model Status VERIFIED OK  NO_ELEMENTS_TO_PROCESS INVALID_ELEMENT_TYPES IWorkingCopy IJavaModelStatus IJavaModelStatus elementsToProcess JavaModelStatus IJavaModelStatusConstants NO_ELEMENTS_TO_PROCESS elementsToProcess JavaModelStatus IJavaModelStatusConstants NO_ELEMENTS_TO_PROCESS elementsToProcess ICompilationUnit ICompilationUnit elementsToProcess isWorkingCopy JavaModelStatus IJavaModelStatusConstants INVALID_ELEMENT_TYPES elementsToProcess JavaModelStatus VERIFIED_OK

protected int declaration Source End Sort Java Element Sort Element Builder builder this builder builder this options Java Core get Options  declarationSourceEnd SortJavaElement SortElementBuilder JavaCore getOptions
see java lang Comparable compare To java lang Object public int compare To Object o return this builder comparator compare this o  compareTo compareTo
protected void add Child Sort Element sort Element if this children count 0 this children new Sort Element 3 else if this children count this children length System arraycopy this children 0 this children new Sort Element this children count 2 0 this children count this children this children count sort Element  addChild SortElement sortElement children_count SortElement children_count SortElement children_count children_count children_count sortElement
protected void close Collections int length this children count if length 0 length this children length System arraycopy this children 0 this children new Sort Element length 0 length  closeCollections children_count SortElement
abstract void display String Buffer buffer int tab  StringBuffer
abstract void display String Buffer buffer int tab protected void generate Source String Buffer buffer this new Source Start buffer length  StringBuffer generateSource StringBuffer newSourceStart
abstract void map Positions  mapPositions
public String to String int tab String Buffer buffer new String Buffer display buffer tab if this children null buffer append tab tab append CHILDREN LINE SEPARATOR NON NLS 1 for int i 0 i this children count i buffer append this children i to String tab 1 buffer append LINE SEPARATOR return buffer to String  toString StringBuffer StringBuffer LINE_SEPARATOR children_count toString LINE_SEPARATOR toString
protected char tab int tab char tabs new char tab Arrays fill tabs t return tabs 
public String to String return to String 0  toString toString
protected void sort if this children null this first Child Before Sorting children 0 this last Child Before Sorting children this children count 1 switch this id case CLASS TYPE case INTERFACE TYPE case COMPILATION UNIT this ast Nodes convert Children Arrays sort ast Nodes this builder comparator for int i 0 max this children count i max i children i sort  firstChildBeforeSorting lastChildBeforeSorting children_count COMPILATION_UNIT astNodes convertChildren astNodes children_count
private AST Node convert Children AST Node converted Nodes new AST Node this children count for int i 0 max this children count i max i Sort Element Builder Sort Element current Element this children i AST Node new Node current Element convert new Node set Property CORRESPONDING ELEMENT current Element converted Nodes i new Node return converted Nodes  ASTNode convertChildren ASTNode convertedNodes ASTNode children_count children_count SortElementBuilder SortElement currentElement ASTNode newNode currentElement newNode setProperty CORRESPONDING_ELEMENT currentElement convertedNodes newNode convertedNodes

Constructs a handle to the field with the given name in the specified type protected Source Field Java Element parent String name super parent name  SourceField JavaElement
super parent name public boolean equals Object o if o instanceof Source Field return false return super equals o  SourceField
see Java Element equalsDOM Node deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected boolean equalsDOM Node IDOM Node node return node get Node Type IDOM Node FIELD super equalsDOM Node node  JavaElement equalsDOMNode equalsDOMNode IDOMNode getNodeType IDOMNode equalsDOMNode
see I Field public Object get Constant throws Java Model Exception Object constant null Source Field Element Info info Source Field Element Info get Element Info if info initialization Source null return null String constant Source new String info initialization Source String signature info get Type Signature if signature equals Signature SIG INT constant new Integer constant Source else if signature equals Signature SIG SHORT constant new Short constant Source else if signature equals Signature SIG BYTE constant new Byte constant Source else if signature equals Signature SIG BOOLEAN constant Boolean value Of constant Source else if signature equals Signature SIG CHAR constant new Character constant Source char At 0 else if signature equals Signature SIG DOUBLE constant new Double constant Source else if signature equals Signature SIG FLOAT constant new Float constant Source else if signature equals Signature SIG LONG if constant Source ends With L constant Source ends With l NON NLS 1 NON NLS 2 int index constant Source last Index Of L NON NLS 1 if index 1 constant new Long constant Source substring 0 index else constant new Long constant Source substring 0 constant Source last Index Of l NON NLS 1 else constant new Long constant Source else if signature equals Q String NON NLS 1 constant constant Source return constant  IField getConstant JavaModelException SourceFieldElementInfo SourceFieldElementInfo getElementInfo initializationSource constantSource initializationSource getTypeSignature SIG_INT constantSource SIG_SHORT constantSource SIG_BYTE constantSource SIG_BOOLEAN valueOf constantSource SIG_CHAR constantSource charAt SIG_DOUBLE constantSource SIG_FLOAT constantSource SIG_LONG constantSource endsWith constantSource endsWith constantSource lastIndexOf constantSource constantSource constantSource lastIndexOf constantSource QString constantSource
see I Java Element public int get Element Type return FIELD  IJavaElement getElementType
see Java Element get Handle Memento protected char get Handle Memento Delimiter return Java Element JEM FIELD  JavaElement getHandleMemento getHandleMementoDelimiter JavaElement JEM_FIELD
public I Java Element get Primary Element boolean check Owner if check Owner Compilation Unit cu Compilation Unit get Ancestor COMPILATION UNIT if cu is Primary return this I Java Element primary Parent this parent get Primary Element false return I Type primary Parent get Field this name  IJavaElement getPrimaryElement checkOwner checkOwner CompilationUnit CompilationUnit getAncestor COMPILATION_UNIT isPrimary IJavaElement primaryParent getPrimaryElement IType primaryParent getField
see I Field public String get Type Signature throws Java Model Exception Source Field Element Info info Source Field Element Info get Element Info return info get Type Signature  IField getTypeSignature JavaModelException SourceFieldElementInfo SourceFieldElementInfo getElementInfo getTypeSignature
private Debugging purposes protected void to String Info int tab String Buffer buffer Object info buffer append this tab String tab if info null to String Name buffer buffer append not open NON NLS 1 else if info NO INFO to String Name buffer else try buffer append Signature to String this get Type Signature buffer append NON NLS 1 to String Name buffer catch Java Model Exception e buffer append Java Model Exception in to String of get Element Name NON NLS 1  toStringInfo StringBuffer tabString toStringName NO_INFO toStringName toString getTypeSignature toStringName JavaModelException JavaModelException toString getElementName

Returns null if the field is not a constant or if it has no initialization public char get Initialization Source return this initialization Source  getInitializationSource initializationSource
Returns the type name of the field public char get Type Name return this type Name  getTypeName typeName
Returns the type signature of the field see Signature protected String get Type Signature return Signature create Type Signature this type Name false  getTypeSignature createTypeSignature typeName
Sets the type name of the field protected void set Type Name char type Name this type Name type Name  setTypeName typeName typeName typeName

private static final Filename Filter FILENAME FILTER new Filename Filter public boolean accept File dir String name return name ends With SUFFIX STRING JAVA name ends With SUFFIX STRING java NON NLS 1  FilenameFilter FILENAME_FILTER FilenameFilter endsWith SUFFIX_STRING_JAVA endsWith SUFFIX_STRING_java
private boolean are Root Paths Computed public Source Mapper this are Root Paths Computed false  areRootPathsComputed SourceMapper areRootPathsComputed
Creates a code Source Mapper code that locates source in the zip file at the given location in the specified package fragment root public Source Mapper I Path source Path String root Path Map options this are Root Paths Computed false this options options try this encoding Resources Plugin get Workspace get Root get Default Charset catch Core Exception e use no encoding if root Path null this root Paths new Hash Set this root Paths add root Path this source Path source Path this f Source Ranges new Hash Map this f Parameter Names new Hash Map this imports Table new Hash Map this imports Counter Table new Hash Map  SourceMapper SourceMapper IPath sourcePath rootPath areRootPathsComputed ResourcesPlugin getWorkspace getRoot getDefaultCharset CoreException rootPath rootPaths HashSet rootPaths rootPath sourcePath sourcePath fSourceRanges HashMap fParameterNames HashMap importsTable HashMap importsCounterTable HashMap
see I Source Element Requestor public void accept Import int declaration Start int declaration End char name boolean on Demand int modifiers char imports char this imports Table get f Type int imports Counter if imports null imports new char 5 imports Counter 0 else imports Counter Integer this imports Counter Table get f Type int Value if imports length imports Counter System arraycopy imports 0 imports new char imports Counter 2 0 imports Counter if on Demand int name Length name length System arraycopy name 0 name new char name Length 2 0 name Length name name Length name name Length 1 imports imports Counter name this imports Table put f Type imports this imports Counter Table put f Type new Integer imports Counter  ISourceElementRequestor acceptImport declarationStart declarationEnd onDemand importsTable fType importsCounter importsCounter importsCounter importsCounterTable fType intValue importsCounter importsCounter importsCounter onDemand nameLength nameLength nameLength nameLength nameLength importsCounter importsTable fType importsCounterTable fType importsCounter
see I Source Element Requestor public void accept Line Separator Positions int positions do nothing  ISourceElementRequestor acceptLineSeparatorPositions
see I Source Element Requestor public void accept Package int declaration Start int declaration End char name do nothing  ISourceElementRequestor acceptPackage declarationStart declarationEnd
see I Source Element Requestor public void accept Problem I Problem problem do nothing  ISourceElementRequestor acceptProblem IProblem
Closes this code Source Mapper code s zip file Once this is done this code Source Mapper code cannot be used again public void close f Source Ranges null f Parameter Names null  SourceMapper SourceMapper fSourceRanges fParameterNames
Converts these type names to unqualified signatures This needs to be done in order to be consistent with the way the source range is retrieved see Source Mapper get Unqualified Method Handle see Signature private String convert Type Names To Sigs char type Names if type Names null return fg Empty String Array int n type Names length if n 0 return fg Empty String Array String type Sigs new String n for int i 0 i n i String type Sig Signature create Type Signature type Names i false int last Index type Sig last Index Of if last Index 1 type Sigs i type Sig else int array End 0 while type Sig char At array End Signature C ARRAY array End type Sigs i type Sig substring 0 array End Signature C UNRESOLVED type Sig substring last Index 1 type Sig length return type Sigs  SourceMapper getUnqualifiedMethodHandle convertTypeNamesToSigs typeNames typeNames fgEmptyStringArray typeNames fgEmptyStringArray typeSigs typeSig createTypeSignature typeNames lastIndex typeSig lastIndexOf lastIndex typeSigs typeSig arrayEnd typeSig charAt arrayEnd C_ARRAY arrayEnd typeSigs typeSig arrayEnd C_UNRESOLVED typeSig lastIndex typeSig typeSigs
private void compute All Root Paths I Package Fragment Root root if this root Paths null this root Paths new Hash Set long time 0 if VERBOSE System out println compute all root paths for root get Element Name NON NLS 1 time System current Time Millis final Hash Set first Level Package Names new Hash Set boolean containsA Default Package false if root is Archive Jar Package Fragment Root jar Package Fragment Root Jar Package Fragment Root root Java Model Manager manager Java Model Manager get Java Model Manager Zip File zip null try zip manager get Zip File jar Package Fragment Root get Path for Enumeration entries zip entries entries has More Elements Zip Entry entry Zip Entry entries next Element String entry Name entry get Name if entry is Directory int index entry Name index Of if index 1 Util is Class File Name entry Name String first Level Package Name entry Name substring 0 index I Status status Java Conventions validate Package Name first Level Package Name if status isOK status get Severity I Status WARNING first Level Package Names add first Level Package Name else if Util is Class File Name entry Name containsA Default Package true catch Core Exception e ignore finally manager close Zip File zip handle null case else Object target Java Model get Target Resources Plugin get Workspace get Root root get Path true if target instanceof I Resource I Resource resource I Resource target if resource instanceof I Container try I Resource members I Container resource members for int i 0 max members length i max i I Resource member members i if member get Type I Resource FOLDER first Level Package Names add member get Name else if Util is Class File Name member get Name containsA Default Package true catch Core Exception e ignore else if target instanceof File File file File target if file is Directory File files file list Files for int i 0 max files length i max i File current File files i if current File is Directory first Level Package Names add current File get Name else if Util is Class File Name current File get Name containsA Default Package true if Util is Archive File Name this source Path last Segment Java Model Manager manager Java Model Manager get Java Model Manager Zip File zip null try zip manager get Zip File this source Path for Enumeration entries zip entries entries has More Elements Zip Entry entry Zip Entry entries next Element if entry is Directory I Path path new Path entry get Name int segment Count path segment Count if segment Count 1 loop for int i 0 max path segment Count 1 i max i if first Level Package Names contains path segment i this root Paths add path upto Segment i to String break loop if i max 1 containsA Default Package this root Paths add path upto Segment max to String else if containsA Default Package this root Paths add NON NLS 1 catch Core Exception e ignore finally manager close Zip File zip handle null case else Object target Java Model get Target Resources Plugin get Workspace get Root this source Path true if target instanceof I Resource if target instanceof I Container compute Root Path I Container target first Level Package Names containsA Default Package else if target instanceof File File file File target if file is Directory compute Root Path file first Level Package Names containsA Default Package if VERBOSE System out println Found this root Paths size root paths NON NLS 1 NON NLS 2 System out println Spent System current Time Millis time ms NON NLS 1 NON NLS 2 this are Root Paths Computed true  computeAllRootPaths IPackageFragmentRoot rootPaths rootPaths HashSet getElementName currentTimeMillis HashSet firstLevelPackageNames HashSet containsADefaultPackage isArchive JarPackageFragmentRoot jarPackageFragmentRoot JarPackageFragmentRoot JavaModelManager JavaModelManager getJavaModelManager ZipFile getZipFile jarPackageFragmentRoot getPath hasMoreElements ZipEntry ZipEntry nextElement entryName getName isDirectory entryName indexOf isClassFileName entryName firstLevelPackageName entryName IStatus JavaConventions validatePackageName firstLevelPackageName getSeverity IStatus firstLevelPackageNames firstLevelPackageName isClassFileName entryName containsADefaultPackage CoreException closeZipFile JavaModel getTarget ResourcesPlugin getWorkspace getRoot getPath IResource IResource IResource IContainer IResource IContainer IResource getType IResource firstLevelPackageNames getName isClassFileName getName containsADefaultPackage CoreException isDirectory listFiles currentFile currentFile isDirectory firstLevelPackageNames currentFile getName isClassFileName currentFile getName containsADefaultPackage isArchiveFileName sourcePath lastSegment JavaModelManager JavaModelManager getJavaModelManager ZipFile getZipFile sourcePath hasMoreElements ZipEntry ZipEntry nextElement isDirectory IPath getName segmentCount segmentCount segmentCount segmentCount firstLevelPackageNames rootPaths uptoSegment toString containsADefaultPackage rootPaths uptoSegment toString containsADefaultPackage rootPaths CoreException closeZipFile JavaModel getTarget ResourcesPlugin getWorkspace getRoot sourcePath IResource IContainer computeRootPath IContainer firstLevelPackageNames containsADefaultPackage isDirectory computeRootPath firstLevelPackageNames containsADefaultPackage rootPaths currentTimeMillis areRootPathsComputed
private void compute Root Path File directory Hash Set first Level Package Names boolean has Default Package File files directory list Files boolean has Sub Directories false loop for int i 0 max files length i max i File file files i if file is Directory has Sub Directories true if first Level Package Names contains file get Name I Path full Path new Path file get Parent File get Path I Path root Path Entry full Path remove First Segments this source Path segment Count set Device null this root Paths add root Path Entry to String break loop else compute Root Path file first Level Package Names has Default Package else if i max 1 has Sub Directories has Default Package File parent Dir file get Parent File if parent Dir list FILENAME FILTER length 0 I Path full Path new Path parent Dir get Path I Path root Path Entry full Path remove First Segments this source Path segment Count set Device null this root Paths add root Path Entry to String  computeRootPath HashSet firstLevelPackageNames hasDefaultPackage listFiles hasSubDirectories isDirectory hasSubDirectories firstLevelPackageNames getName IPath fullPath getParentFile getPath IPath rootPathEntry fullPath removeFirstSegments sourcePath segmentCount setDevice rootPaths rootPathEntry toString computeRootPath firstLevelPackageNames hasDefaultPackage hasSubDirectories hasDefaultPackage parentDir getParentFile parentDir FILENAME_FILTER IPath fullPath parentDir getPath IPath rootPathEntry fullPath removeFirstSegments sourcePath segmentCount setDevice rootPaths rootPathEntry toString
private void compute Root Path I Container container Hash Set first Level Package Names boolean has Default Package try I Resource resources container members boolean has Sub Directories false loop for int i 0 max resources length i max i I Resource resource resources i if resource get Type I Resource FOLDER has Sub Directories true if first Level Package Names contains resource get Name I Path full Path container get Full Path I Path root Path Entry full Path remove First Segments this source Path segment Count set Device null this root Paths add root Path Entry to String break loop else compute Root Path I Folder resource first Level Package Names has Default Package if i max 1 has Sub Directories has Default Package check if one member is a java file boolean has Java Source File false for int j 0 j max j if Util is Java File Name resources i get Name has Java Source File true break if has Java Source File I Path full Path container get Full Path I Path root Path Entry full Path remove First Segments this source Path segment Count set Device null this root Paths add root Path Entry to String catch Core Exception e ignore  computeRootPath IContainer HashSet firstLevelPackageNames hasDefaultPackage IResource hasSubDirectories IResource getType IResource hasSubDirectories firstLevelPackageNames getName IPath fullPath getFullPath IPath rootPathEntry fullPath removeFirstSegments sourcePath segmentCount setDevice rootPaths rootPathEntry toString computeRootPath IFolder firstLevelPackageNames hasDefaultPackage hasSubDirectories hasDefaultPackage hasJavaSourceFile isJavaFileName getName hasJavaSourceFile hasJavaSourceFile IPath fullPath getFullPath IPath rootPathEntry fullPath removeFirstSegments sourcePath segmentCount setDevice rootPaths rootPathEntry toString CoreException
see I Source Element Requestor public void enter Class int declaration Start int modifiers char name int name Source Start int name Source End char superclass char superinterfaces this type Depth if this type Depth this types length need to grow System arraycopy this types 0 this types new I Type this type Depth 2 0 this type Depth System arraycopy this type Name Ranges 0 this type Name Ranges new Source Range this type Depth 2 0 this type Depth System arraycopy this type Declaration Starts 0 this type Declaration Starts new int this type Depth 2 0 this type Depth System arraycopy this f Member Name 0 this f Member Name new String this type Depth 2 0 this type Depth System arraycopy this f Member Declaration Start 0 this f Member Declaration Start new int this type Depth 2 0 this type Depth System arraycopy this f Member Name Range 0 this f Member Name Range new Source Range this type Depth 2 0 this type Depth System arraycopy this f Method Parameter Types 0 this f Method Parameter Types new char this type Depth 2 0 this type Depth System arraycopy this f Method Parameter Names 0 this f Method Parameter Names new char this type Depth 2 0 this type Depth if name length 0 this anonymous Counter if this anonymous Counter this anonymous Class Name this types type Depth this get Type f Type get Element Name else this types type Depth this get Type new String name else this types type Depth this get Type new String name this type Name Ranges type Depth new Source Range name Source Start name Source End name Source Start 1 this type Declaration Starts type Depth declaration Start  ISourceElementRequestor enterClass declarationStart nameSourceStart nameSourceEnd typeDepth typeDepth IType typeDepth typeDepth typeNameRanges typeNameRanges SourceRange typeDepth typeDepth typeDeclarationStarts typeDeclarationStarts typeDepth typeDepth fMemberName fMemberName typeDepth typeDepth fMemberDeclarationStart fMemberDeclarationStart typeDepth typeDepth fMemberNameRange fMemberNameRange SourceRange typeDepth typeDepth fMethodParameterTypes fMethodParameterTypes typeDepth typeDepth fMethodParameterNames fMethodParameterNames typeDepth typeDepth anonymousCounter anonymousCounter anonymousClassName typeDepth getType fType getElementName typeDepth getType typeDepth getType typeNameRanges typeDepth SourceRange nameSourceStart nameSourceEnd nameSourceStart typeDeclarationStarts typeDepth declarationStart
see I Source Element Requestor public void enter Compilation Unit do nothing  ISourceElementRequestor enterCompilationUnit
see I Source Element Requestor public void enter Constructor int declaration Start int modifiers char name int name Source Start int name Source End char parameter Types char parameter Names char exception Types enter Method declaration Start modifiers null name name Source Start name Source End parameter Types parameter Names exception Types  ISourceElementRequestor enterConstructor declarationStart nameSourceStart nameSourceEnd parameterTypes parameterNames exceptionTypes enterMethod declarationStart nameSourceStart nameSourceEnd parameterTypes parameterNames exceptionTypes
see I Source Element Requestor public void enter Field int declaration Start int modifiers char type char name int name Source Start int name Source End if type Depth 0 f Member Declaration Start type Depth declaration Start f Member Name Range type Depth new Source Range name Source Start name Source End name Source Start 1 f Member Name type Depth new String name  ISourceElementRequestor enterField declarationStart nameSourceStart nameSourceEnd typeDepth fMemberDeclarationStart typeDepth declarationStart fMemberNameRange typeDepth SourceRange nameSourceStart nameSourceEnd nameSourceStart fMemberName typeDepth
see I Source Element Requestor public void enter Initializer int declaration Source Start int modifiers do nothing  ISourceElementRequestor enterInitializer declarationSourceStart
see I Source Element Requestor public void enter Interface int declaration Start int modifiers char name int name Source Start int name Source End char superinterfaces enter Class declaration Start modifiers name name Source Start name Source End null superinterfaces  ISourceElementRequestor enterInterface declarationStart nameSourceStart nameSourceEnd enterClass declarationStart nameSourceStart nameSourceEnd
see I Source Element Requestor public void enter Method int declaration Start int modifiers char return Type char name int name Source Start int name Source End char parameter Types char parameter Names char exception Types if type Depth 0 f Member Name type Depth new String name f Member Name Range type Depth new Source Range name Source Start name Source End name Source Start 1 f Member Declaration Start type Depth declaration Start f Method Parameter Types type Depth parameter Types f Method Parameter Names type Depth parameter Names  ISourceElementRequestor enterMethod declarationStart returnType nameSourceStart nameSourceEnd parameterTypes parameterNames exceptionTypes typeDepth fMemberName typeDepth fMemberNameRange typeDepth SourceRange nameSourceStart nameSourceEnd nameSourceStart fMemberDeclarationStart typeDepth declarationStart fMethodParameterTypes typeDepth parameterTypes fMethodParameterNames typeDepth parameterNames
see I Source Element Requestor public void exit Class int declaration End if type Depth 0 I Type current Type this types type Depth set Source Range current Type new Source Range this type Declaration Starts type Depth declaration End this type Declaration Starts type Depth 1 this type Name Ranges type Depth this type Depth  ISourceElementRequestor exitClass declarationEnd typeDepth IType currentType typeDepth setSourceRange currentType SourceRange typeDeclarationStarts typeDepth declarationEnd typeDeclarationStarts typeDepth typeNameRanges typeDepth typeDepth
see I Source Element Requestor public void exit Compilation Unit int declaration End do nothing  ISourceElementRequestor exitCompilationUnit declarationEnd
see I Source Element Requestor public void exit Constructor int declaration End exit Method declaration End  ISourceElementRequestor exitConstructor declarationEnd exitMethod declarationEnd
see I Source Element Requestor public void exit Field int initialization Start int declaration End int declaration Source End if type Depth 0 I Type current Type this types type Depth set Source Range current Type get Field f Member Name type Depth new Source Range f Member Declaration Start type Depth declaration End f Member Declaration Start type Depth 1 f Member Name Range type Depth  ISourceElementRequestor exitField initializationStart declarationEnd declarationSourceEnd typeDepth IType currentType typeDepth setSourceRange currentType getField fMemberName typeDepth SourceRange fMemberDeclarationStart typeDepth declarationEnd fMemberDeclarationStart typeDepth fMemberNameRange typeDepth
see I Source Element Requestor public void exit Initializer int declaration End implements abstract method  ISourceElementRequestor exitInitializer declarationEnd
see I Source Element Requestor public void exit Interface int declaration End exit Class declaration End  ISourceElementRequestor exitInterface declarationEnd exitClass declarationEnd
see I Source Element Requestor public void exit Method int declaration End if type Depth 0 I Type current Type this types type Depth Source Range source Range new Source Range f Member Declaration Start type Depth declaration End f Member Declaration Start type Depth 1 I Method method current Type get Method f Member Name type Depth convert Type Names To Sigs f Method Parameter Types type Depth set Source Range method source Range f Member Name Range type Depth set Method Parameter Names method f Method Parameter Names type Depth  ISourceElementRequestor exitMethod declarationEnd typeDepth IType currentType typeDepth SourceRange sourceRange SourceRange fMemberDeclarationStart typeDepth declarationEnd fMemberDeclarationStart typeDepth IMethod currentType getMethod fMemberName typeDepth convertTypeNamesToSigs fMethodParameterTypes typeDepth setSourceRange sourceRange fMemberNameRange typeDepth setMethodParameterNames fMethodParameterNames typeDepth
Locates and returns source code for the given binary type in this Source Mapper s ZIP file or returns code null code if source code cannot be found public char find Source I Type type if type is Binary return null Binary Type parent Binary Type type get Declaring Type Binary Type decl Type Binary Type type while parent null decl Type parent parent Binary Type decl Type get Declaring Type I Binary Type info null try info I Binary Type decl Type get Element Info catch Java Model Exception e return null String simple Source File Name find Source File Name type info if simple Source File Name null return null return this find Source type simple Source File Name  SourceMapper findSource IType isBinary BinaryType BinaryType getDeclaringType BinaryType declType BinaryType declType BinaryType declType getDeclaringType IBinaryType IBinaryType declType getElementInfo JavaModelException simpleSourceFileName findSourceFileName simpleSourceFileName findSource simpleSourceFileName
Locates and returns source code for the given binary type in this Source Mapper s ZIP file or returns code null code if source code cannot be found The given simple Source File Name is the java file name without the enclosing folder used to create the given type e g A java for x y A Inner class public char find Source I Type type String simple Source File Name long time 0 if VERBOSE time System current Time Millis String name simple Source File Name I Package Fragment pkg Frag type get Package Fragment if pkg Frag is Default Package String pkg pkg Frag get Element Name replace name pkg name char source null if are Root Paths Computed compute All Root Paths I Package Fragment Root type get Package Fragment get Parent if this root Path null source get Source For Root Path this root Path name if source null We should try all existing root paths If none works try to recompute it If it still doesn t work then return null if this root Paths null loop for Iterator iterator this root Paths iterator iterator has Next String current Root Path String iterator next if current Root Path equals this root Path source get Source For Root Path current Root Path name if source null remember right root path this root Path current Root Path break loop if VERBOSE System out println spent System current Time Millis time ms for type get Element Name NON NLS 1 NON NLS 2 return source  SourceMapper simpleSourceFileName findSource IType simpleSourceFileName currentTimeMillis simpleSourceFileName IPackageFragment pkgFrag getPackageFragment pkgFrag isDefaultPackage pkgFrag getElementName areRootPathsComputed computeAllRootPaths IPackageFragmentRoot getPackageFragment getParent rootPath getSourceForRootPath rootPath rootPaths rootPaths hasNext currentRootPath currentRootPath rootPath getSourceForRootPath currentRootPath rootPath currentRootPath currentTimeMillis getElementName
public String find Source File Name I Type type I Binary Type info char source File Name info source File Name if source File Name null We assume that this type has been compiled from a file with its name For example A class comes from A java and p A class comes from a file A java in the folder p if info is Member I Type enclosing Type type get Declaring Type if enclosing Type null return null play it safe while enclosing Type get Declaring Type null enclosing Type enclosing Type get Declaring Type return enclosing Type get Element Name SUFFIX STRING java else if info is Local info is Anonymous String type Qualified Name type get Type Qualified Name int dollar type Qualified Name index Of if dollar 1 malformed inner type name doesn t contain a dollar return type get Element Name SUFFIX STRING java return type Qualified Name substring 0 dollar SUFFIX STRING java else return type get Element Name SUFFIX STRING java else return new String source File Name  findSourceFileName IType IBinaryType sourceFileName sourceFileName sourceFileName isMember IType enclosingType getDeclaringType enclosingType enclosingType getDeclaringType enclosingType enclosingType getDeclaringType enclosingType getElementName SUFFIX_STRING_java isLocal isAnonymous typeQualifiedName getTypeQualifiedName typeQualifiedName indexOf getElementName SUFFIX_STRING_java typeQualifiedName SUFFIX_STRING_java getElementName SUFFIX_STRING_java sourceFileName
private char get Source For Root Path String current Root Path String name String new Full Name if current Root Path equals I Package Fragment Root DEFAULT PACKAGEROOT PATH if current Root Path ends With NON NLS 1 new Full Name current Root Path name else new Full Name current Root Path name else new Full Name name return this find Source new Full Name  getSourceForRootPath currentRootPath newFullName currentRootPath IPackageFragmentRoot DEFAULT_PACKAGEROOT_PATH currentRootPath endsWith newFullName currentRootPath newFullName currentRootPath newFullName findSource newFullName
public char find Source String full Name char source null if Util is Archive File Name this source Path last Segment try to get the entry Zip Entry entry null Zip File zip null Java Model Manager manager Java Model Manager get Java Model Manager try zip manager get Zip File this source Path entry zip get Entry full Name if entry null now read the source code source read Source entry zip catch Core Exception e return null finally manager close Zip File zip handle null case else Object target Java Model get Target Resources Plugin get Workspace get Root this source Path true if target instanceof I Resource if target instanceof I Container I Resource res I Container target find Member full Name if res instanceof I File try source org eclipse jdt internal core util Util get Resource Contents As Char Array I File res catch Java Model Exception e ignore else if target instanceof File File file File target if file is Directory File source File new File file full Name if source File is File try source Util get File Char Content source File this encoding catch IO Exception e ignore return source  findSource fullName isArchiveFileName sourcePath lastSegment ZipEntry ZipFile JavaModelManager JavaModelManager getJavaModelManager getZipFile sourcePath getEntry fullName readSource CoreException closeZipFile JavaModel getTarget ResourcesPlugin getWorkspace getRoot sourcePath IResource IContainer IResource IContainer findMember fullName IFile getResourceContentsAsCharArray IFile JavaModelException isDirectory sourceFile fullName sourceFile isFile getFileCharContent sourceFile IOException
Returns the Source Range for the name of the given element or 1 1 if no source range is known for the name of the element public Source Range get Name Range I Java Element element if element get Element Type I Java Element METHOD I Member element is Binary I Java Element el get Unqualified Method Handle I Method element false if el 1 null f Source Ranges get el 0 null element get Unqualified Method Handle I Method element true 0 else element el 0 Source Range ranges Source Range f Source Ranges get element if ranges null return fg Unknown Range else return ranges 1  SourceRange SourceRange getNameRange IJavaElement getElementType IJavaElement IMember isBinary IJavaElement getUnqualifiedMethodHandle IMethod fSourceRanges getUnqualifiedMethodHandle IMethod SourceRange SourceRange fSourceRanges fgUnknownRange
Returns parameters names for the given method or null if no parameter names are known for the method public char get Method Parameter Names I Method method if method is Binary I Java Element el get Unqualified Method Handle method false if el 1 null f Parameter Names get el 0 null method I Method get Unqualified Method Handle method true 0 else method I Method el 0 char parameter Names char f Parameter Names get method if parameter Names null return null else return parameter Names  getMethodParameterNames IMethod isBinary IJavaElement getUnqualifiedMethodHandle fParameterNames IMethod getUnqualifiedMethodHandle IMethod parameterNames fParameterNames parameterNames parameterNames
Returns the code Source Range code for the given element or 1 1 if no source range is known for the element public Source Range get Source Range I Java Element element if element get Element Type I Java Element METHOD I Member element is Binary I Java Element el get Unqualified Method Handle I Method element false if el 1 null f Source Ranges get el 0 null element get Unqualified Method Handle I Method element true 0 else element el 0 Source Range ranges Source Range f Source Ranges get element if ranges null return fg Unknown Range else return ranges 0  SourceRange SourceRange getSourceRange IJavaElement getElementType IJavaElement IMember isBinary IJavaElement getUnqualifiedMethodHandle IMethod fSourceRanges getUnqualifiedMethodHandle IMethod SourceRange SourceRange fSourceRanges fgUnknownRange
Returns the type with the given code type Name code Returns inner classes as well protected I Type get Type String type Name if f Type get Element Name equals type Name return f Type else return f Type get Type type Name  typeName IType getType typeName fType getElementName typeName fType fType getType typeName
Creates a handle that has parameter types that are not fully qualified so that the correct source is found protected I Java Element get Unqualified Method Handle I Method method boolean no Dollar boolean has Dollar false String qualified Parameter Types method get Parameter Types String unqualified Parameter Types new String qualified Parameter Types length for int i 0 i qualified Parameter Types length i String Buffer unqualified Name new String Buffer String qualified Name qualified Parameter Types i int count 0 while qualified Name char At count Signature C ARRAY unqualified Name append Signature C ARRAY count if qualified Name char At count Signature C RESOLVED unqualified Name append Signature C UNRESOLVED String simple Name Signature get Simple Name qualified Name substring count 1 if no Dollar if has Dollar simple Name index Of 1 has Dollar true unqualified Name append simple Name else unqualified Name append Char Operation last Segment simple Name to Char Array else unqualified Name append qualified Name substring count qualified Name length unqualified Parameter Types i unqualified Name to String I Java Element result new I Java Element 2 result 0 I Type method get Parent get Method method get Element Name unqualified Parameter Types if has Dollar result 1 result 0 return result  IJavaElement getUnqualifiedMethodHandle IMethod noDollar hasDollar qualifiedParameterTypes getParameterTypes unqualifiedParameterTypes qualifiedParameterTypes qualifiedParameterTypes StringBuffer unqualifiedName StringBuffer qualifiedName qualifiedParameterTypes qualifiedName charAt C_ARRAY unqualifiedName C_ARRAY qualifiedName charAt C_RESOLVED unqualifiedName C_UNRESOLVED simpleName getSimpleName qualifiedName noDollar hasDollar simpleName indexOf hasDollar unqualifiedName simpleName unqualifiedName CharOperation lastSegment simpleName toCharArray unqualifiedName qualifiedName qualifiedName unqualifiedParameterTypes unqualifiedName toString IJavaElement IJavaElement IType getParent getMethod getElementName unqualifiedParameterTypes hasDollar
Maps the given source code to the given binary type and its children public void map Source I Type type char contents this map Source type contents null  mapSource IType mapSource
Maps the given source code to the given binary type and its children If a non null java element is passed finds the name range for the given java element without storing it public synchronized I Source Range map Source I Type type char contents I Java Element element To Find f Type Binary Type type check whether it is already mapped if this f Source Ranges get type null return element To Find null this get Name Range element To Find null this imports Table remove f Type this imports Counter Table remove f Type this searched Element element To Find this types new I Type 1 this type Declaration Starts new int 1 this type Name Ranges new Source Range 1 this type Depth 1 this f Member Declaration Start new int 1 this f Member Name new String 1 this f Member Name Range new Source Range 1 this f Method Parameter Types new char 1 this f Method Parameter Names new char 1 this anonymous Counter 0 Hash Map old Source Ranges Hash Map f Source Ranges clone try I Problem Factory factory new Default Problem Factory Source Element Parser parser null boolean is Anonymous Class false char full Name null this anonymous Class Name 0 try I Binary Type bin Type I Binary Type f Type get Element Info is Anonymous Class bin Type is Anonymous full Name bin Type get Name catch Java Model Exception e ignore if is Anonymous Class String elt Name f Type get Element Name elt Name elt Name substring elt Name last Index Of 1 elt Name length try this anonymous Class Name Integer parse Int elt Name catch Number Format Exception e ignore boolean do Full Parse has To Retrieve Source Ranges For Local Class full Name parser new Source Element Parser this factory new Compiler Options this options do Full Parse I Java Element java Element this f Type get Compilation Unit if java Element null java Element this f Type get Parent parser parse Compilation Unit new Basic Compilation Unit contents null type get Element Name SUFFIX STRING java java Element do Full Parse if element To Find null I Source Range range this get Name Range element To Find return range else return null finally if element To Find null f Source Ranges old Source Ranges f Type null this searched Element null this types null this type Declaration Starts null this type Name Ranges null this type Depth 1  ISourceRange mapSource IType IJavaElement elementToFind fType BinaryType fSourceRanges elementToFind getNameRange elementToFind importsTable fType importsCounterTable fType searchedElement elementToFind IType typeDeclarationStarts typeNameRanges SourceRange typeDepth fMemberDeclarationStart fMemberName fMemberNameRange SourceRange fMethodParameterTypes fMethodParameterNames anonymousCounter HashMap oldSourceRanges HashMap fSourceRanges IProblemFactory DefaultProblemFactory SourceElementParser isAnonymousClass fullName anonymousClassName IBinaryType binType IBinaryType fType getElementInfo isAnonymousClass binType isAnonymous fullName binType getName JavaModelException isAnonymousClass eltName fType getElementName eltName eltName eltName lastIndexOf eltName anonymousClassName parseInt eltName NumberFormatException doFullParse hasToRetrieveSourceRangesForLocalClass fullName SourceElementParser CompilerOptions doFullParse IJavaElement javaElement fType getCompilationUnit javaElement javaElement fType getParent parseCompilationUnit BasicCompilationUnit getElementName SUFFIX_STRING_java javaElement doFullParse elementToFind ISourceRange getNameRange elementToFind elementToFind fSourceRanges oldSourceRanges fType searchedElement typeDeclarationStarts typeNameRanges typeDepth
private char read Source Zip Entry entry Zip File zip try byte bytes Util get Zip Entry Byte Content entry zip if bytes null return Util bytes To Char bytes this encoding catch IO Exception e ignore return null  readSource ZipEntry ZipFile getZipEntryByteContent bytesToChar IOException
Sets the mapping for this method to its parameter names see f Parameter Names protected void set Method Parameter Names I Method method char parameter Names if parameter Names null parameter Names Char Operation NO CHAR CHAR f Parameter Names put method parameter Names  fParameterNames setMethodParameterNames IMethod parameterNames parameterNames parameterNames CharOperation NO_CHAR_CHAR fParameterNames parameterNames
Sets the mapping for this element to its source ranges for its source range and name range see f Source Ranges protected void set Source Range I Java Element element Source Range source Range Source Range name Range f Source Ranges put element new Source Range source Range name Range  fSourceRanges setSourceRange IJavaElement SourceRange sourceRange SourceRange nameRange fSourceRanges SourceRange sourceRange nameRange
Return a char array containing the imports of the attached source for the f Type binary public char get Imports Binary Type type char imports char this imports Table get type if imports null int imports Counter Integer this imports Counter Table get type int Value if imports length imports Counter System arraycopy imports 0 imports new char imports Counter 0 imports Counter this imports Table put type imports return imports  fType getImports BinaryType importsTable importsCounter importsCounterTable intValue importsCounter importsCounter importsCounter importsTable
private boolean has To Retrieve Source Ranges For Local Class char elt Name A 1 B 2 true A B B 2 true A C B D false A F B D 1 F true A 1 true A B false if elt Name null return false int index 0 int dollar Index Char Operation index Of elt Name index if dollar Index 1 index dollar Index 1 dollar Index Char Operation index Of elt Name index if dollar Index 1 dollar Index elt Name length while dollar Index 1 for int i index i dollar Index i if Character is Digit elt Name i index dollar Index 1 i dollar Index if index elt Name length return false dollar Index Char Operation index Of elt Name index if dollar Index 1 dollar Index elt Name length continue return true return false  hasToRetrieveSourceRangesForLocalClass eltName eltName dollarIndex CharOperation indexOf eltName dollarIndex dollarIndex dollarIndex CharOperation indexOf eltName dollarIndex dollarIndex eltName dollarIndex dollarIndex isDigit eltName dollarIndex dollarIndex eltName dollarIndex CharOperation indexOf eltName dollarIndex dollarIndex eltName

protected static final String fg Empty List new String protected Source Method Java Element parent String name String parameter Types super parent name Assert is True name index Of 1 if parameter Types null f Parameter Types fg Empty List else f Parameter Types parameter Types  fgEmptyList SourceMethod JavaElement parameterTypes isTrue indexOf parameterTypes fParameterTypes fgEmptyList fParameterTypes parameterTypes
public boolean equals Object o if o instanceof Source Method return false return super equals o Util equal Arrays Or Null f Parameter Types Source Method o f Parameter Types  SourceMethod equalArraysOrNull fParameterTypes SourceMethod fParameterTypes
see Java Element equalsDOM Node deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected boolean equalsDOM Node IDOM Node node if node get Node Type IDOM Node METHOD try IDOM Method m IDOM Method node if is Constructor return m is Constructor m get Name equals this get Element Name case of a constructor that is being renamed signature Equals m else return super equalsDOM Node node signature Equals m catch Java Model Exception e return false else return false  JavaElement equalsDOMNode equalsDOMNode IDOMNode getNodeType IDOMNode IDOMMethod IDOMMethod isConstructor isConstructor getName getElementName signatureEquals equalsDOMNode signatureEquals JavaModelException
see I Java Element public int get Element Type return METHOD  IJavaElement getElementType
see I Method public String get Exception Types throws Java Model Exception Source Method Element Info info Source Method Element Info get Element Info char exs info get Exception Type Names return Compilation Unit Structure Requestor convert Type Names To Sigs exs  IMethod getExceptionTypes JavaModelException SourceMethodElementInfo SourceMethodElementInfo getElementInfo getExceptionTypeNames CompilationUnitStructureRequestor convertTypeNamesToSigs
see Java Element get Handle Memento public String get Handle Memento String Buffer buff new String Buffer Java Element get Parent get Handle Memento char delimiter get Handle Memento Delimiter buff append delimiter escape Memento Name buff get Element Name for int i 0 i f Parameter Types length i buff append delimiter buff append f Parameter Types i if this occurrence Count 1 buff append JEM COUNT buff append this occurrence Count return buff to String  JavaElement getHandleMemento getHandleMemento StringBuffer StringBuffer JavaElement getParent getHandleMemento getHandleMementoDelimiter escapeMementoName getElementName fParameterTypes fParameterTypes occurrenceCount JEM_COUNT occurrenceCount toString
see Java Element get Handle Memento protected char get Handle Memento Delimiter return Java Element JEM METHOD  JavaElement getHandleMemento getHandleMementoDelimiter JavaElement JEM_METHOD
see I Method public int get Number Of Parameters return f Parameter Types null 0 f Parameter Types length  IMethod getNumberOfParameters fParameterTypes fParameterTypes
see I Method public String get Parameter Names throws Java Model Exception Source Method Element Info info Source Method Element Info get Element Info char names info get Argument Names if names null names length 0 return fg Empty List String strings new String names length for int i 0 i names length i strings i new String names i return strings  IMethod getParameterNames JavaModelException SourceMethodElementInfo SourceMethodElementInfo getElementInfo getArgumentNames fgEmptyList
see I Method public String get Parameter Types return f Parameter Types  IMethod getParameterTypes fParameterTypes
see I Method get Type Parameter Signatures since 3 0 public String get Type Parameter Signatures throws Java Model Exception TODO jerome missing implementation return new String 0  IMethod getTypeParameterSignatures getTypeParameterSignatures JavaModelException
public I Java Element get Primary Element boolean check Owner if check Owner Compilation Unit cu Compilation Unit get Ancestor COMPILATION UNIT if cu is Primary return this I Java Element primary Parent this parent get Primary Element false return I Type primary Parent get Method this name f Parameter Types  IJavaElement getPrimaryElement checkOwner checkOwner CompilationUnit CompilationUnit getAncestor COMPILATION_UNIT isPrimary IJavaElement primaryParent getPrimaryElement IType primaryParent getMethod fParameterTypes
see I Method public String get Return Type throws Java Model Exception Source Method Element Info info Source Method Element Info get Element Info return Signature create Type Signature info get Return Type Name false  IMethod getReturnType JavaModelException SourceMethodElementInfo SourceMethodElementInfo getElementInfo createTypeSignature getReturnTypeName
see I Method public String get Signature throws Java Model Exception Source Method Element Info info Source Method Element Info get Element Info return info get Signature  IMethod getSignature JavaModelException SourceMethodElementInfo SourceMethodElementInfo getElementInfo getSignature
see org eclipse jdt internal core Java Element hash Code public int hash Code int hash super hash Code for int i 0 length f Parameter Types length i length i hash Util combine Hash Codes hash f Parameter Types i hash Code return hash  JavaElement hashCode hashCode hashCode fParameterTypes combineHashCodes fParameterTypes hashCode
see I Method public boolean is Constructor throws Java Model Exception Source Method Element Info info Source Method Element Info get Element Info return info is Constructor  IMethod isConstructor JavaModelException SourceMethodElementInfo SourceMethodElementInfo getElementInfo isConstructor
see I Method is Main Method public boolean is Main Method throws Java Model Exception return this is Main Method this  IMethod isMainMethod isMainMethod JavaModelException isMainMethod
see I Method is Similar I Method public boolean is Similar I Method method return this are Similar Methods this get Element Name this get Parameter Types method get Element Name method get Parameter Types null  IMethod isSimilar IMethod isSimilar IMethod areSimilarMethods getElementName getParameterTypes getElementName getParameterTypes
public String readable Name String Buffer buffer new String Buffer super readable Name buffer append String parameter Types this get Parameter Types int length if parameter Types null length parameter Types length 0 for int i 0 i length i buffer append Signature to String parameter Types i if i length 1 buffer append NON NLS 1 buffer append return buffer to String  readableName StringBuffer StringBuffer readableName parameterTypes getParameterTypes parameterTypes parameterTypes toString parameterTypes toString
Returns code true code if the signature of this code Source Method code matches that of the given code IDOM Method code otherwise code false code deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected boolean signature Equals IDOM Method method String other Types method get Parameter Types String types get Parameter Types boolean ok true ensure the number of parameters match if other Types null other Types length 0 ok types null types length 0 else if types null ok other Types length types length else return false ensure the parameter type signatures match if ok if types null int i for i 0 i types length i String other Type Signature create Type Signature other Types i to Char Array false if types i equals other Type ok false break return ok  SourceMethod IDOMMethod signatureEquals IDOMMethod otherTypes getParameterTypes getParameterTypes otherTypes otherTypes otherTypes otherType createTypeSignature otherTypes toCharArray otherType
private Debugging purposes protected void to String Info int tab String Buffer buffer Object info buffer append this tab String tab if info null to String Name buffer buffer append not open NON NLS 1 else if info NO INFO to String Name buffer else try if Flags is Static this get Flags buffer append static NON NLS 1 if this is Constructor buffer append Signature to String this get Return Type buffer append to String Name buffer catch Java Model Exception e buffer append Java Model Exception in to String of get Element Name NON NLS 1  toStringInfo StringBuffer tabString toStringName NO_INFO toStringName isStatic getFlags isConstructor toString getReturnType toStringName JavaModelException JavaModelException toString getElementName
protected void to String Name String Buffer buffer buffer append get Element Name buffer append String parameters this get Parameter Types int length if parameters null length parameters length 0 for int i 0 i length i buffer append Signature to String parameters i if i length 1 buffer append NON NLS 1 buffer append if this occurrence Count 1 buffer append NON NLS 1 buffer append this occurrence Count  toStringName StringBuffer getElementName getParameterTypes toString occurrenceCount occurrenceCount

protected boolean is Constructor false public char get Argument Names return this argument Names  isConstructor getArgumentNames argumentNames
return this argument Names public char get Argument Type Names return this argument Type Names  argumentNames getArgumentTypeNames argumentTypeNames
return this argument Type Names public char get Exception Type Names return this exception Types  argumentTypeNames getExceptionTypeNames exceptionTypes
return this exception Types public char get Return Type Name return this return Type  exceptionTypes getReturnTypeName returnType
return this return Type public char get Selector return this name  returnType getSelector
protected String get Signature String param Signatures new String this argument Type Names length for int i 0 i this argument Type Names length i param Signatures i Signature create Type Signature this argument Type Names i false return Signature create Method Signature param Signatures Signature create Type Signature this return Type false  getSignature paramSignatures argumentTypeNames argumentTypeNames paramSignatures createTypeSignature argumentTypeNames createMethodSignature paramSignatures createTypeSignature returnType
return Signature create Method Signature param Signatures Signature create Type Signature this return Type false public boolean is Constructor return this is Constructor  createMethodSignature paramSignatures createTypeSignature returnType isConstructor isConstructor
return this is Constructor protected void set Argument Names char names this argument Names names  isConstructor setArgumentNames argumentNames
this argument Names names protected void set Argument Type Names char types this argument Type Names types  argumentNames setArgumentTypeNames argumentTypeNames
this argument Type Names types protected void set Constructor boolean is Constructor this is Constructor is Constructor  argumentTypeNames setConstructor isConstructor isConstructor isConstructor
this is Constructor is Constructor protected void set Exception Type Names char types this exception Types types  isConstructor isConstructor setExceptionTypeNames exceptionTypes
this exception Types types protected void set Return Type char type this return Type type  exceptionTypes setReturnType returnType

protected int offset length public Source Range int offset int length this offset offset this length length  SourceRange
see I Source Range public int get Length return this length  ISourceRange getLength
see I Source Range public int get Offset return this offset  ISourceRange getOffset
public String to String String Buffer buffer new String Buffer buffer append offset NON NLS 1 buffer append this offset buffer append length NON NLS 1 buffer append this length buffer append NON NLS 1 return buffer to String  toString StringBuffer StringBuffer toString

package abstract class Source Ref Element extends Java Element implements I Source Reference protected Source Ref Element Java Element parent String name super parent name  SourceRefElement JavaElement ISourceReference SourceRefElement JavaElement
This element is being closed Do any necessary cleanup protected void closing Object info throws Java Model Exception Do any necessary cleanup  JavaModelException
Returns a new element info for this element protected Object create Element Info return null not used for source ref elements  createElementInfo
see I Source Manipulation public void copy I Java Element container I Java Element sibling String rename boolean force I Progress Monitor monitor throws Java Model Exception if container null throw new Illegal Argument Exception Util bind operation null Container NON NLS 1 I Java Element elements new I Java Element this I Java Element containers new I Java Element container I Java Element siblings null if sibling null siblings new I Java Element sibling String renamings null if rename null renamings new String rename get Java Model copy elements containers siblings renamings force monitor  ISourceManipulation IJavaElement IJavaElement IProgressMonitor JavaModelException IllegalArgumentException nullContainer IJavaElement IJavaElement IJavaElement IJavaElement IJavaElement IJavaElement getJavaModel
see I Source Manipulation public void delete boolean force I Progress Monitor monitor throws Java Model Exception I Java Element elements new I Java Element this get Java Model delete elements force monitor  ISourceManipulation IProgressMonitor JavaModelException IJavaElement IJavaElement getJavaModel
protected void generate Infos Object info Hash Map new Elements I Progress Monitor pm throws Java Model Exception Openable openable Parent Openable get Openable Parent if openable Parent null return Java Element Info openable Parent Info Java Element Info Java Model Manager get Java Model Manager get Info openable Parent if openable Parent Info null openable Parent generate Infos openable Parent create Element Info new Elements pm  generateInfos HashMap newElements IProgressMonitor JavaModelException openableParent getOpenableParent openableParent JavaElementInfo openableParentInfo JavaElementInfo JavaModelManager getJavaModelManager getInfo openableParent openableParentInfo openableParent generateInfos openableParent createElementInfo newElements
see I Member public I Compilation Unit get Compilation Unit return Java Element get Parent get Compilation Unit  IMember ICompilationUnit getCompilationUnit JavaElement getParent getCompilationUnit
Elements within compilation units and class files have no corresponding resource see I Java Element public I Resource get Corresponding Resource throws Java Model Exception if exists throw new Not Present Exception return null  IJavaElement IResource getCorrespondingResource JavaModelException newNotPresentException
public I Java Element get Handle From Memento String token Memento Tokenizer memento Working Copy Owner working Copy Owner switch token char At 0 case JEM COUNT return get Handle Updating Count From Memento memento working Copy Owner return this  IJavaElement getHandleFromMemento MementoTokenizer WorkingCopyOwner workingCopyOwner charAt JEM_COUNT getHandleUpdatingCountFromMemento workingCopyOwner
Return the first instance of I Openable in the hierarchy of this type going up the hierarchy from this type public I Openable get Openable Parent I Java Element current get Parent while current null if current instanceof I Openable return I Openable current current current get Parent return null  IOpenable IOpenable getOpenableParent IJavaElement getParent IOpenable IOpenable getParent
see I Java Element public I Path get Path return this get Parent get Path  IJavaElement IPath getPath getParent getPath
see I Java Element public I Resource get Resource return this get Parent get Resource  IJavaElement IResource getResource getParent getResource
see I Source Reference public String get Source throws Java Model Exception I Openable openable get Openable Parent I Buffer buffer openable get Buffer if buffer null return null I Source Range range get Source Range int offset range get Offset int length range get Length if offset 1 length 0 return null try return buffer get Text offset length catch Runtime Exception e return null  ISourceReference getSource JavaModelException IOpenable getOpenableParent IBuffer getBuffer ISourceRange getSourceRange getOffset getLength getText RuntimeException
see I Source Reference public I Source Range get Source Range throws Java Model Exception Source Ref Element Info info Source Ref Element Info get Element Info return info get Source Range  ISourceReference ISourceRange getSourceRange JavaModelException SourceRefElementInfo SourceRefElementInfo getElementInfo getSourceRange
see I Java Element public I Resource get Underlying Resource throws Java Model Exception if exists throw new Not Present Exception return get Parent get Underlying Resource  IJavaElement IResource getUnderlyingResource JavaModelException newNotPresentException getParent getUnderlyingResource
see I Parent public boolean has Children throws Java Model Exception return get Children length 0  IParent hasChildren JavaModelException getChildren
see I Source Manipulation public void move I Java Element container I Java Element sibling String rename boolean force I Progress Monitor monitor throws Java Model Exception if container null throw new Illegal Argument Exception Util bind operation null Container NON NLS 1 I Java Element elements new I Java Element this I Java Element containers new I Java Element container I Java Element siblings null if sibling null siblings new I Java Element sibling String renamings null if rename null renamings new String rename get Java Model move elements containers siblings renamings force monitor  ISourceManipulation IJavaElement IJavaElement IProgressMonitor JavaModelException IllegalArgumentException nullContainer IJavaElement IJavaElement IJavaElement IJavaElement IJavaElement IJavaElement getJavaModel
see I Source Manipulation public void rename String new Name boolean force I Progress Monitor monitor throws Java Model Exception if new Name null throw new Illegal Argument Exception Util bind element null Name NON NLS 1 I Java Element elements new I Java Element this I Java Element dests new I Java Element this get Parent String renamings new String new Name get Java Model rename elements dests renamings force monitor  ISourceManipulation newName IProgressMonitor JavaModelException newName IllegalArgumentException nullName IJavaElement IJavaElement IJavaElement IJavaElement getParent newName getJavaModel

package class Source Ref Element Info extends Java Element Info protected int f Source Range Start f Source Range End protected Source Ref Element Info set Is Structure Known true  SourceRefElementInfo JavaElementInfo fSourceRangeStart fSourceRangeEnd SourceRefElementInfo setIsStructureKnown
see org eclipse jdt internal compiler env I Source Type get Declaration Source End see org eclipse jdt internal compiler env I Source Method get Declaration Source End see org eclipse jdt internal compiler env I Source Field get Declaration Source End public int get Declaration Source End return f Source Range End  ISourceType getDeclarationSourceEnd ISourceMethod getDeclarationSourceEnd ISourceField getDeclarationSourceEnd getDeclarationSourceEnd fSourceRangeEnd
see org eclipse jdt internal compiler env I Source Type get Declaration Source Start see org eclipse jdt internal compiler env I Source Method get Declaration Source Start see org eclipse jdt internal compiler env I Source Field get Declaration Source Start public int get Declaration Source Start return f Source Range Start  ISourceType getDeclarationSourceStart ISourceMethod getDeclarationSourceStart ISourceField getDeclarationSourceStart getDeclarationSourceStart fSourceRangeStart
return f Source Range Start protected I Source Range get Source Range return new Source Range f Source Range Start f Source Range End f Source Range Start 1  fSourceRangeStart ISourceRange getSourceRange SourceRange fSourceRangeStart fSourceRangeEnd fSourceRangeStart
return new Source Range f Source Range Start f Source Range End f Source Range Start 1 protected void set Source Range End int end f Source Range End end  SourceRange fSourceRangeStart fSourceRangeEnd fSourceRangeStart setSourceRangeEnd fSourceRangeEnd
f Source Range End end protected void set Source Range Start int start f Source Range Start start  fSourceRangeEnd setSourceRangeStart fSourceRangeStart

protected static final String fg Empty List new String protected Source Type Java Element parent String name super parent name Assert is True name index Of 1 Util bind sourcetype invalid Name name NON NLS 1  fgEmptyList SourceType JavaElement isTrue indexOf invalidName
see I Type public void code Complete char snippet int insertion int position char local Variable Type Names char local Variable Names int local Variable Modifiers boolean is Static I Completion Requestor requestor throws Java Model Exception code Complete snippet insertion position local Variable Type Names local Variable Names local Variable Modifiers is Static requestor Default Working Copy Owner PRIMARY  IType codeComplete localVariableTypeNames localVariableNames localVariableModifiers isStatic ICompletionRequestor JavaModelException codeComplete localVariableTypeNames localVariableNames localVariableModifiers isStatic DefaultWorkingCopyOwner
see I Type public void code Complete char snippet int insertion int position char local Variable Type Names char local Variable Names int local Variable Modifiers boolean is Static I Completion Requestor requestor Working Copy Owner owner throws Java Model Exception if requestor null throw new Illegal Argument Exception Completion requestor cannot be null NON NLS 1 Java Project project Java Project get Java Project Searchable Environment environment Searchable Environment project new Searchable Name Environment owner Completion Requestor Wrapper requestor Wrapper new Completion Requestor Wrapper requestor environment name Lookup Completion Engine engine new Completion Engine environment requestor Wrapper project get Options true project requestor Wrapper completion Engine engine String source get Compilation Unit get Source if source null insertion 1 insertion source length char prefix Char Operation concat source substring 0 insertion to Char Array new char char suffix Char Operation concat new char source substring insertion to Char Array char fake Source Char Operation concat prefix snippet suffix Basic Compilation Unit cu new Basic Compilation Unit fake Source null get Element Name get Parent engine complete cu prefix length position prefix length else engine complete this snippet position local Variable Type Names local Variable Names local Variable Modifiers is Static  IType codeComplete localVariableTypeNames localVariableNames localVariableModifiers isStatic ICompletionRequestor WorkingCopyOwner JavaModelException IllegalArgumentException JavaProject JavaProject getJavaProject SearchableEnvironment SearchableEnvironment newSearchableNameEnvironment CompletionRequestorWrapper requestorWrapper CompletionRequestorWrapper nameLookup CompletionEngine CompletionEngine requestorWrapper getOptions requestorWrapper completionEngine getCompilationUnit getSource CharOperation toCharArray CharOperation toCharArray fakeSource CharOperation BasicCompilationUnit BasicCompilationUnit fakeSource getElementName getParent localVariableTypeNames localVariableNames localVariableModifiers isStatic
see I Type public I Field create Field String contents I Java Element sibling boolean force I Progress Monitor monitor throws Java Model Exception Create Field Operation op new Create Field Operation this contents force if sibling null op create Before sibling op run Operation monitor return I Field op get Result Elements 0  IType IField createField IJavaElement IProgressMonitor JavaModelException CreateFieldOperation CreateFieldOperation createBefore runOperation IField getResultElements
see I Type public I Initializer create Initializer String contents I Java Element sibling I Progress Monitor monitor throws Java Model Exception Create Initializer Operation op new Create Initializer Operation this contents if sibling null op create Before sibling op run Operation monitor return I Initializer op get Result Elements 0  IType IInitializer createInitializer IJavaElement IProgressMonitor JavaModelException CreateInitializerOperation CreateInitializerOperation createBefore runOperation IInitializer getResultElements
see I Type public I Method create Method String contents I Java Element sibling boolean force I Progress Monitor monitor throws Java Model Exception Create Method Operation op new Create Method Operation this contents force if sibling null op create Before sibling op run Operation monitor return I Method op get Result Elements 0  IType IMethod createMethod IJavaElement IProgressMonitor JavaModelException CreateMethodOperation CreateMethodOperation createBefore runOperation IMethod getResultElements
see I Type public I Type create Type String contents I Java Element sibling boolean force I Progress Monitor monitor throws Java Model Exception Create Type Operation op new Create Type Operation this contents force if sibling null op create Before sibling op run Operation monitor return I Type op get Result Elements 0  IType IType createType IJavaElement IProgressMonitor JavaModelException CreateTypeOperation CreateTypeOperation createBefore runOperation IType getResultElements
return I Type op get Result Elements 0 public boolean equals Object o if o instanceof Source Type return false return super equals o  IType getResultElements SourceType
see Java Element equalsDOM Node deprecated JDOM is obsolete TODO JDOM remove once model ported off of JDOM protected boolean equalsDOM Node IDOM Node node return node get Node Type IDOM Node TYPE super equalsDOM Node node  JavaElement equalsDOMNode equalsDOMNode IDOMNode getNodeType IDOMNode equalsDOMNode
public I Method find Methods I Method method try return this find Methods method this get Methods catch Java Model Exception e if type doesn t exist no matching method can exist return null  IMethod findMethods IMethod findMethods getMethods JavaModelException
see I Member public I Type get Declaring Type I Java Element parent Element get Parent while parent Element null if parent Element get Element Type I Java Element TYPE return I Type parent Element else if parent Element instanceof I Member parent Element parent Element get Parent else return null return null  IMember IType getDeclaringType IJavaElement parentElement getParent parentElement parentElement getElementType IJavaElement IType parentElement parentElement IMember parentElement parentElement getParent
see I Java Element public int get Element Type return TYPE  IJavaElement getElementType
see I Type get Field public I Field get Field String field Name return new Source Field this field Name  IType getField IField getField fieldName SourceField fieldName
see I Type public I Field get Fields throws Java Model Exception Array List list get Children Of Type FIELD I Field array new I Field list size list to Array array return array  IType IField getFields JavaModelException ArrayList getChildrenOfType IField IField toArray
see I Type get Fully Qualified Name public String get Fully Qualified Name return this get Fully Qualified Name  IType getFullyQualifiedName getFullyQualifiedName getFullyQualifiedName
see I Type get Fully Qualified Name char public String get Fully Qualified Name char enclosing Type Separator String package Name get Package Fragment get Element Name if package Name equals I Package Fragment DEFAULT PACKAGE NAME return get Type Qualified Name enclosing Type Separator return package Name get Type Qualified Name enclosing Type Separator  IType getFullyQualifiedName getFullyQualifiedName enclosingTypeSeparator packageName getPackageFragment getElementName packageName IPackageFragment DEFAULT_PACKAGE_NAME getTypeQualifiedName enclosingTypeSeparator packageName getTypeQualifiedName enclosingTypeSeparator
public I Java Element get Handle From Memento String token Memento Tokenizer memento Working Copy Owner working Copy Owner switch token char At 0 case JEM COUNT return get Handle Updating Count From Memento memento working Copy Owner case JEM FIELD String field Name memento next Token Java Element field Java Element get Field field Name return field get Handle From Memento memento working Copy Owner case JEM INITIALIZER String count memento next Token Java Element initializer Java Element get Initializer Integer parse Int count return initializer get Handle From Memento memento working Copy Owner case JEM METHOD String selector memento next Token Array List params new Array List next Param while memento has More Tokens token memento next Token switch token char At 0 case JEM TYPE break next Param case JEM METHOD String param memento next Token String Buffer buffer new String Buffer while Signature C ARRAY param char At 0 buffer append Signature C ARRAY param memento next Token params add buffer to String param break default break next Param String parameters new String params size params to Array parameters Java Element method Java Element get Method selector parameters if token null switch token char At 0 case JEM TYPE case JEM LOCALVARIABLE return method get Handle From Memento token memento working Copy Owner default return method else return method case JEM TYPE String type Name if memento has More Tokens type Name memento next Token char first Char type Name char At 0 if first Char JEM FIELD first Char JEM INITIALIZER first Char JEM METHOD first Char JEM TYPE first Char JEM COUNT token type Name type Name NON NLS 1 else token null else type Name NON NLS 1 token null Java Element type Java Element get Type type Name if token null return type get Handle From Memento memento working Copy Owner else return type get Handle From Memento token memento working Copy Owner return null  IJavaElement getHandleFromMemento MementoTokenizer WorkingCopyOwner workingCopyOwner charAt JEM_COUNT getHandleUpdatingCountFromMemento workingCopyOwner JEM_FIELD fieldName nextToken JavaElement JavaElement getField fieldName getHandleFromMemento workingCopyOwner JEM_INITIALIZER nextToken JavaElement JavaElement getInitializer parseInt getHandleFromMemento workingCopyOwner JEM_METHOD nextToken ArrayList ArrayList nextParam hasMoreTokens nextToken charAt JEM_TYPE nextParam JEM_METHOD nextToken StringBuffer StringBuffer C_ARRAY charAt C_ARRAY nextToken toString nextParam toArray JavaElement JavaElement getMethod charAt JEM_TYPE JEM_LOCALVARIABLE getHandleFromMemento workingCopyOwner JEM_TYPE typeName hasMoreTokens typeName nextToken firstChar typeName charAt firstChar JEM_FIELD firstChar JEM_INITIALIZER firstChar JEM_METHOD firstChar JEM_TYPE firstChar JEM_COUNT typeName typeName typeName JavaElement JavaElement getType typeName getHandleFromMemento workingCopyOwner getHandleFromMemento workingCopyOwner
see I Type public I Initializer get Initializer int count return new Initializer this count  IType IInitializer getInitializer
see I Type public I Initializer get Initializers throws Java Model Exception Array List list get Children Of Type INITIALIZER I Initializer array new I Initializer list size list to Array array return array  IType IInitializer getInitializers JavaModelException ArrayList getChildrenOfType IInitializer IInitializer toArray
see I Type get Method public I Method get Method String selector String parameter Type Signatures return new Source Method this selector parameter Type Signatures  IType getMethod IMethod getMethod parameterTypeSignatures SourceMethod parameterTypeSignatures
see I Type public I Method get Methods throws Java Model Exception Array List list get Children Of Type METHOD I Method array new I Method list size list to Array array return array  IType IMethod getMethods JavaModelException ArrayList getChildrenOfType IMethod IMethod toArray
see I Type public I Package Fragment get Package Fragment I Java Element parent Element this parent while parent Element null if parent Element get Element Type I Java Element PACKAGE FRAGMENT return I Package Fragment parent Element else parent Element parent Element get Parent Assert is True false should not happen return null  IType IPackageFragment getPackageFragment IJavaElement parentElement parentElement parentElement getElementType IJavaElement PACKAGE_FRAGMENT IPackageFragment parentElement parentElement parentElement getParent isTrue
public I Java Element get Primary Element boolean check Owner if check Owner Compilation Unit cu Compilation Unit get Ancestor COMPILATION UNIT if cu is Primary return this I Java Element primary Parent this parent get Primary Element false switch primary Parent get Element Type case I Java Element COMPILATION UNIT return I Compilation Unit primary Parent get Type this name case I Java Element TYPE return I Type primary Parent get Type this name case I Java Element FIELD case I Java Element INITIALIZER case I Java Element METHOD return I Member primary Parent get Type this name this occurrence Count return this  IJavaElement getPrimaryElement checkOwner checkOwner CompilationUnit CompilationUnit getAncestor COMPILATION_UNIT isPrimary IJavaElement primaryParent getPrimaryElement primaryParent getElementType IJavaElement COMPILATION_UNIT ICompilationUnit primaryParent getType IJavaElement IType primaryParent getType IJavaElement IJavaElement IJavaElement IMember primaryParent getType occurrenceCount
see I Type public String get Superclass Name throws Java Model Exception Source Type Element Info info Source Type Element Info get Element Info char superclass Name info get Superclass Name if superclass Name null return null return new String superclass Name  IType getSuperclassName JavaModelException SourceTypeElementInfo SourceTypeElementInfo getElementInfo superclassName getSuperclassName superclassName superclassName
see I Type get Superclass Type Signature since 3 0 public String get Superclass Type Signature throws Java Model Exception Source Type Element Info info Source Type Element Info get Element Info char superclass Name info get Superclass Name if superclass Name null return null return new String Signature create Type Signature superclass Name false  IType getSuperclassTypeSignature getSuperclassTypeSignature JavaModelException SourceTypeElementInfo SourceTypeElementInfo getElementInfo superclassName getSuperclassName superclassName createTypeSignature superclassName
see I Type public String get Super Interface Names throws Java Model Exception Source Type Element Info info Source Type Element Info get Element Info char names info get Interface Names if names null return fg Empty List String strings new String names length for int i 0 i names length i strings i new String names i return strings  IType getSuperInterfaceNames JavaModelException SourceTypeElementInfo SourceTypeElementInfo getElementInfo getInterfaceNames fgEmptyList
see I Type get Super Interface Type Signatures since 3 0 public String get Super Interface Type Signatures throws Java Model Exception Source Type Element Info info Source Type Element Info get Element Info char names info get Interface Names if names null return fg Empty List String strings new String names length for int i 0 i names length i strings i new String Signature create Type Signature names i false return strings  IType getSuperInterfaceTypeSignatures getSuperInterfaceTypeSignatures JavaModelException SourceTypeElementInfo SourceTypeElementInfo getElementInfo getInterfaceNames fgEmptyList createTypeSignature
see I Type get Type Parameter Signatures since 3 0 public String get Type Parameter Signatures throws Java Model Exception TODO jerome missing implementation return new String 0  IType getTypeParameterSignatures getTypeParameterSignatures JavaModelException
see I Type public I Type get Type String type Name return new Source Type this type Name  IType IType getType typeName SourceType typeName
see I Type get Type Qualified Name public String get Type Qualified Name return this get Type Qualified Name  IType getTypeQualifiedName getTypeQualifiedName getTypeQualifiedName
see I Type get Type Qualified Name char public String get Type Qualified Name char enclosing Type Separator switch this parent get Element Type case I Java Element COMPILATION UNIT return this name case I Java Element TYPE String simple Name this name length 0 Integer to String this occurrence Count this name return I Type this parent get Type Qualified Name enclosing Type Separator enclosing Type Separator simple Name case I Java Element FIELD case I Java Element INITIALIZER case I Java Element METHOD simple Name this name length 0 Integer to String this occurrence Count this name return I Member this parent get Declaring Type get Type Qualified Name enclosing Type Separator enclosing Type Separator simple Name return null  IType getTypeQualifiedName getTypeQualifiedName enclosingTypeSeparator getElementType IJavaElement COMPILATION_UNIT IJavaElement simpleName toString occurrenceCount IType getTypeQualifiedName enclosingTypeSeparator enclosingTypeSeparator simpleName IJavaElement IJavaElement IJavaElement simpleName toString occurrenceCount IMember getDeclaringType getTypeQualifiedName enclosingTypeSeparator enclosingTypeSeparator simpleName
see I Type public I Type get Types throws Java Model Exception Array List list get Children Of Type TYPE I Type array new I Type list size list to Array array return array  IType IType getTypes JavaModelException ArrayList getChildrenOfType IType IType toArray
see I Type is Anonymous public boolean is Anonymous return this name length 0  IType isAnonymous isAnonymous
see I Type public boolean is Class throws Java Model Exception TODO jerome is Class should only return true for classes other than enum classes return is Interface  IType isClass JavaModelException isClass isInterface
see I Type is Enum since 3 0 public boolean is Enum throws Java Model Exception TODO jerome missing implementation should only return true for enum classes return false  IType isEnum isEnum JavaModelException
see I Type public boolean is Interface throws Java Model Exception Source Type Element Info info Source Type Element Info get Element Info TODO jerome is Interface should not return true for annotation types return info is Interface  IType isInterface JavaModelException SourceTypeElementInfo SourceTypeElementInfo getElementInfo isInterface isInterface
see I Type is Annotation since 3 0 public boolean is Annotation throws Java Model Exception TODO jerome missing implementation should only return true for annotation types return false  IType isAnnotation isAnnotation JavaModelException
see I Type is Local public boolean is Local return this parent instanceof I Method this parent instanceof I Initializer  IType isLocal isLocal IMethod IInitializer
see I Type is Member public boolean is Member return get Declaring Type null  IType isMember isMember getDeclaringType
see I Type public I Type Hierarchy load Type Hierachy Input Stream input I Progress Monitor monitor throws Java Model Exception return load Type Hierachy input Default Working Copy Owner PRIMARY monitor  IType ITypeHierarchy loadTypeHierachy InputStream IProgressMonitor JavaModelException loadTypeHierachy DefaultWorkingCopyOwner
NOTE This method is not part of the API has it is not clear clients would easily use it they would need to first make sure all working copies for the given owner exist before calling it This is especially har at startup time In case clients want this API here is how it should be specified p Loads a previously saved I Type Hierarchy from an input stream A type hierarchy can be stored using I Type Hierachy store Output Stream A compilation unit of a loaded type has the given owner if such a working copy exists otherwise the type s compilation unit is a primary compilation unit Only hierarchies originally created by the following methods can be loaded ul li I Type new Supertype Hierarchy I Progress Monitor li li I Type new Supertype Hierarchy Working Copy Owner I Progress Monitor li li I Type new Type Hierarchy I Java Project I Progress Monitor li li I Type new Type Hierarchy I Java Project Working Copy Owner I Progress Monitor li li I Type new Type Hierarchy I Progress Monitor li li I Type new Type Hierarchy Working Copy Owner I Progress Monitor li u param input stream where hierarchy will be read param monitor the given progress monitor return the stored hierarchy exception Java Model Exception if the hierarchy could not be restored reasons include type is not the focus of the hierarchy or unable to read the input stream wrong format IO Exception during reading see I Type Hierarchy store java io Output Stream I Progress Monitor since 3 0 public I Type Hierarchy load Type Hierachy Input Stream input Working Copy Owner owner I Progress Monitor monitor throws Java Model Exception TODO monitor should be passed to Type Hierarchy load return Type Hierarchy load this input owner  ITypeHierarchy ITypeHierachy OutputStream IType newSupertypeHierarchy IProgressMonitor IType newSupertypeHierarchy WorkingCopyOwner IProgressMonitor IType newTypeHierarchy IJavaProject IProgressMonitor IType newTypeHierarchy IJavaProject WorkingCopyOwner IProgressMonitor IType newTypeHierarchy IProgressMonitor IType newTypeHierarchy WorkingCopyOwner IProgressMonitor JavaModelException IOException ITypeHierarchy OutputStream IProgressMonitor ITypeHierarchy loadTypeHierachy InputStream WorkingCopyOwner IProgressMonitor JavaModelException TypeHierarchy TypeHierarchy
see I Type public I Type Hierarchy new Supertype Hierarchy I Progress Monitor monitor throws Java Model Exception return this new Supertype Hierarchy Default Working Copy Owner PRIMARY monitor  IType ITypeHierarchy newSupertypeHierarchy IProgressMonitor JavaModelException newSupertypeHierarchy DefaultWorkingCopyOwner
public I Type Hierarchy new Supertype Hierarchy I Compilation Unit working Copies I Progress Monitor monitor throws Java Model Exception Create Type Hierarchy Operation op new Create Type Hierarchy Operation this working Copies Search Engine create Workspace Scope false op run Operation monitor return op get Result  ITypeHierarchy newSupertypeHierarchy ICompilationUnit workingCopies IProgressMonitor JavaModelException CreateTypeHierarchyOperation CreateTypeHierarchyOperation workingCopies SearchEngine createWorkspaceScope runOperation getResult
param working Copies the working copies that take precedence over their original compilation units param monitor the given progress monitor return a type hierarchy for this type containing this type and all of its supertypes exception Java Model Exception if this element does not exist or if an exception occurs while accessing its corresponding resource see I Type new Supertype Hierarchy I Working Copy I Progress Monitor deprecated public I Type Hierarchy new Supertype Hierarchy I Working Copy working Copies I Progress Monitor monitor throws Java Model Exception I Compilation Unit copies if working Copies null copies null else int length working Copies length System arraycopy working Copies 0 copies new I Compilation Unit length 0 length return new Supertype Hierarchy copies monitor  workingCopies JavaModelException IType newSupertypeHierarchy IWorkingCopy IProgressMonitor ITypeHierarchy newSupertypeHierarchy IWorkingCopy workingCopies IProgressMonitor JavaModelException ICompilationUnit workingCopies workingCopies workingCopies ICompilationUnit newSupertypeHierarchy
see I Type new Supertype Hierarchy Working Copy Owner I Progress Monitor public I Type Hierarchy new Supertype Hierarchy Working Copy Owner owner I Progress Monitor monitor throws Java Model Exception I Compilation Unit working Copies Java Model Manager get Java Model Manager get Working Copies owner true add primary working copies Create Type Hierarchy Operation op new Create Type Hierarchy Operation this working Copies Search Engine create Workspace Scope false op run Operation monitor return op get Result  IType newSupertypeHierarchy WorkingCopyOwner IProgressMonitor ITypeHierarchy newSupertypeHierarchy WorkingCopyOwner IProgressMonitor JavaModelException ICompilationUnit workingCopies JavaModelManager getJavaModelManager getWorkingCopies CreateTypeHierarchyOperation CreateTypeHierarchyOperation workingCopies SearchEngine createWorkspaceScope runOperation getResult
see I Type public I Type Hierarchy new Type Hierarchy I Java Project project I Progress Monitor monitor throws Java Model Exception return new Type Hierarchy project Default Working Copy Owner PRIMARY monitor  IType ITypeHierarchy newTypeHierarchy IJavaProject IProgressMonitor JavaModelException newTypeHierarchy DefaultWorkingCopyOwner
see I Type new Type Hierarchy I Java Project Working Copy Owner I Progress Monitor public I Type Hierarchy new Type Hierarchy I Java Project project Working Copy Owner owner I Progress Monitor monitor throws Java Model Exception if project null throw new Illegal Argument Exception Util bind hierarchy null Project NON NLS 1 I Compilation Unit working Copies Java Model Manager get Java Model Manager get Working Copies owner true add primary working copies I Compilation Unit projectW Cs null if working Copies null int length working Copies length projectW Cs new I Compilation Unit length int index 0 for int i 0 i length i I Compilation Unit wc working Copies i if project equals wc get Java Project projectW Cs index wc if index length System arraycopy projectW Cs 0 projectW Cs new I Compilation Unit index 0 index Create Type Hierarchy Operation op new Create Type Hierarchy Operation this projectW Cs project true op run Operation monitor return op get Result  IType newTypeHierarchy IJavaProject WorkingCopyOwner IProgressMonitor ITypeHierarchy newTypeHierarchy IJavaProject WorkingCopyOwner IProgressMonitor JavaModelException IllegalArgumentException nullProject ICompilationUnit workingCopies JavaModelManager getJavaModelManager getWorkingCopies ICompilationUnit projectWCs workingCopies workingCopies projectWCs ICompilationUnit ICompilationUnit workingCopies getJavaProject projectWCs projectWCs projectWCs ICompilationUnit CreateTypeHierarchyOperation CreateTypeHierarchyOperation projectWCs runOperation getResult
see I Type public I Type Hierarchy new Type Hierarchy I Progress Monitor monitor throws Java Model Exception Create Type Hierarchy Operation op new Create Type Hierarchy Operation this null Search Engine create Workspace Scope true op run Operation monitor return op get Result  IType ITypeHierarchy newTypeHierarchy IProgressMonitor JavaModelException CreateTypeHierarchyOperation CreateTypeHierarchyOperation SearchEngine createWorkspaceScope runOperation getResult
public I Type Hierarchy new Type Hierarchy I Compilation Unit working Copies I Progress Monitor monitor throws Java Model Exception Create Type Hierarchy Operation op new Create Type Hierarchy Operation this working Copies Search Engine create Workspace Scope true op run Operation monitor return op get Result  ITypeHierarchy newTypeHierarchy ICompilationUnit workingCopies IProgressMonitor JavaModelException CreateTypeHierarchyOperation CreateTypeHierarchyOperation workingCopies SearchEngine createWorkspaceScope runOperation getResult
see I Type new Type Hierarchy I Working Copy I Progress Monitor deprecated public I Type Hierarchy new Type Hierarchy I Working Copy working Copies I Progress Monitor monitor throws Java Model Exception I Compilation Unit copies if working Copies null copies null else int length working Copies length System arraycopy working Copies 0 copies new I Compilation Unit length 0 length return new Type Hierarchy copies monitor  IType newTypeHierarchy IWorkingCopy IProgressMonitor ITypeHierarchy newTypeHierarchy IWorkingCopy workingCopies IProgressMonitor JavaModelException ICompilationUnit workingCopies workingCopies workingCopies ICompilationUnit newTypeHierarchy
see I Type new Type Hierarchy Working Copy Owner I Progress Monitor public I Type Hierarchy new Type Hierarchy Working Copy Owner owner I Progress Monitor monitor throws Java Model Exception I Compilation Unit working Copies Java Model Manager get Java Model Manager get Working Copies owner true add primary working copies Create Type Hierarchy Operation op new Create Type Hierarchy Operation this working Copies Search Engine create Workspace Scope true op run Operation monitor return op get Result  IType newTypeHierarchy WorkingCopyOwner IProgressMonitor ITypeHierarchy newTypeHierarchy WorkingCopyOwner IProgressMonitor JavaModelException ICompilationUnit workingCopies JavaModelManager getJavaModelManager getWorkingCopies CreateTypeHierarchyOperation CreateTypeHierarchyOperation workingCopies SearchEngine createWorkspaceScope runOperation getResult
see I Type resolve Type String public String resolve Type String type Name throws Java Model Exception return resolve Type type Name Default Working Copy Owner PRIMARY  IType resolveType resolveType typeName JavaModelException resolveType typeName DefaultWorkingCopyOwner
String answers null void accept Type String answer if this answers null this answers new String answer else grow int length this answers length System arraycopy this answers 0 this answers new String length 1 0 length this answers length answer  acceptType
public void accept Class char package Name char class Name boolean need Qualification boolean is Declaration int start int end accept Type new String new String package Name new String class Name  acceptClass packageName className needQualification isDeclaration acceptType packageName className
public void accept Interface char package Name char interface Name boolean need Qualification boolean is Declaration int start int end accept Type new String new String package Name new String interface Name  acceptInterface packageName interfaceName needQualification isDeclaration acceptType packageName interfaceName
public void accept Error I Problem error ignore  acceptError IProblem
ignore public void accept Field char declaring Type Package Name char declaring Type Name char field Name boolean is Declaration int start int end ignore  acceptField declaringTypePackageName declaringTypeName fieldName isDeclaration
ignore public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names boolean is Constructor boolean is Declaration int start int end ignore  acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames isConstructor isDeclaration
ignore public void accept Package char package Name ignore  acceptPackage packageName
see I Type resolve Type String Working Copy Owner public String resolve Type String type Name Working Copy Owner owner throws Java Model Exception I Source Type info I Source Type get Element Info Java Project project Java Project get Java Project I Searchable Name Environment environment project new Searchable Name Environment owner class Type Resolve Requestor implements I Selection Requestor String answers null void accept Type String answer if this answers null this answers new String answer else grow int length this answers length System arraycopy this answers 0 this answers new String length 1 0 length this answers length answer public void accept Class char package Name char class Name boolean need Qualification boolean is Declaration int start int end accept Type new String new String package Name new String class Name public void accept Interface char package Name char interface Name boolean need Qualification boolean is Declaration int start int end accept Type new String new String package Name new String interface Name public void accept Error I Problem error ignore public void accept Field char declaring Type Package Name char declaring Type Name char field Name boolean is Declaration int start int end ignore public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names boolean is Constructor boolean is Declaration int start int end ignore public void accept Package char package Name ignore Type Resolve Requestor requestor new Type Resolve Requestor Selection Engine engine new Selection Engine environment requestor project get Options true I Type top Level Types get Compilation Unit get Types int length top Level Types length Source Type Element Info top Level Infos new Source Type Element Info length for int i 0 i length i top Level Infos i Source Type Element Info Source Type top Level Types i get Element Info engine select Type info type Name to Char Array top Level Infos false return requestor answers  IType resolveType WorkingCopyOwner resolveType typeName WorkingCopyOwner JavaModelException ISourceType ISourceType getElementInfo JavaProject JavaProject getJavaProject ISearchableNameEnvironment newSearchableNameEnvironment TypeResolveRequestor ISelectionRequestor acceptType acceptClass packageName className needQualification isDeclaration acceptType packageName className acceptInterface packageName interfaceName needQualification isDeclaration acceptType packageName interfaceName acceptError IProblem acceptField declaringTypePackageName declaringTypeName fieldName isDeclaration acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames isConstructor isDeclaration acceptPackage packageName TypeResolveRequestor TypeResolveRequestor SelectionEngine SelectionEngine getOptions IType topLevelTypes getCompilationUnit getTypes topLevelTypes SourceTypeElementInfo topLevelInfos SourceTypeElementInfo topLevelInfos SourceTypeElementInfo SourceType topLevelTypes getElementInfo selectType typeName toCharArray topLevelInfos
private Debugging purposes protected void to String Info int tab String Buffer buffer Object info buffer append tab String tab if info null String element Name get Element Name if element Name length 0 buffer append anonymous NON NLS 1 buffer append this occurrence Count buffer append NON NLS 1 else to String Name buffer buffer append not open NON NLS 1 else if info NO INFO String element Name get Element Name if element Name length 0 buffer append anonymous NON NLS 1 buffer append this occurrence Count buffer append NON NLS 1 else to String Name buffer else try if this is Interface buffer append interface NON NLS 1 else buffer append class NON NLS 1 String element Name get Element Name if element Name length 0 buffer append anonymous NON NLS 1 buffer append this occurrence Count buffer append NON NLS 1 else to String Name buffer catch Java Model Exception e buffer append Java Model Exception in to String of get Element Name NON NLS 1  toStringInfo StringBuffer tabString elementName getElementName elementName occurrenceCount toStringName NO_INFO elementName getElementName elementName occurrenceCount toStringName isInterface elementName getElementName elementName occurrenceCount toStringName JavaModelException JavaModelException toString getElementName

Returns the I Source Type that is the enclosing type for this type or code null code if this type is a top level type public I Source Type get Enclosing Type I Java Element parent this handle get Parent if parent null parent get Element Type I Java Element TYPE try return I Source Type Java Element parent get Element Info catch Java Model Exception e return null else return null  ISourceType ISourceType getEnclosingType IJavaElement getParent getElementType IJavaElement ISourceType JavaElement getElementInfo JavaModelException
see I Source Type public I Source Field get Fields int length this children length if length 0 return NO FIELDS I Source Field fields new I Source Field length int field Index 0 for int i 0 i length i I Java Element child this children i if child instanceof Source Field try I Source Field field I Source Field Source Field child get Element Info fields field Index field catch Java Model Exception e ignore if field Index 0 return NO FIELDS System arraycopy fields 0 fields new I Source Field field Index 0 field Index return fields  ISourceType ISourceField getFields NO_FIELDS ISourceField ISourceField fieldIndex IJavaElement SourceField ISourceField ISourceField SourceField getElementInfo fieldIndex JavaModelException fieldIndex NO_FIELDS ISourceField fieldIndex fieldIndex
see I Source Type public char get File Name return this source File Name  ISourceType getFileName sourceFileName
Returns the handle for this type info public I Type get Handle return this handle  IType getHandle
see I Source Type public I Source Import get Imports if this imports null try I Import Declaration import Declarations this handle get Compilation Unit get Imports int length import Declarations length if length 0 this imports NO IMPORTS else I Source Import source Imports new I Source Import length for int i 0 i length i source Imports i Import Declaration Element Info Import Declaration import Declarations i get Element Info this imports source Imports only commit at the end once completed bug 36854 catch Java Model Exception e this imports NO IMPORTS return this imports  ISourceType ISourceImport getImports IImportDeclaration importDeclarations getCompilationUnit getImports importDeclarations NO_IMPORTS ISourceImport sourceImports ISourceImport sourceImports ImportDeclarationElementInfo ImportDeclaration importDeclarations getElementInfo sourceImports JavaModelException NO_IMPORTS
public Initializer Element Info get Initializers int length this children length if length 0 return NO INITIALIZERS Initializer Element Info initializers new Initializer Element Info length int initializer Index 0 for int i 0 i length i I Java Element child this children i if child instanceof Initializer try Initializer Element Info initializer Initializer Element Info Initializer child get Element Info initializers initializer Index initializer catch Java Model Exception e ignore if initializer Index 0 return NO INITIALIZERS System arraycopy initializers 0 initializers new Initializer Element Info initializer Index 0 initializer Index return initializers  InitializerElementInfo getInitializers NO_INITIALIZERS InitializerElementInfo InitializerElementInfo initializerIndex IJavaElement InitializerElementInfo InitializerElementInfo getElementInfo initializerIndex JavaModelException initializerIndex NO_INITIALIZERS InitializerElementInfo initializerIndex initializerIndex
see I Source Type public char get Interface Names if this handle get Element Name length 0 if anonymous type return null return this super Interface Names  ISourceType getInterfaceNames getElementName superInterfaceNames
see I Source Type public I Source Type get Member Types int length this children length if length 0 return NO TYPES I Source Type member Types new I Source Type length int type Index 0 for int i 0 i length i I Java Element child this children i if child instanceof Source Type try I Source Type type I Source Type Source Type child get Element Info member Types type Index type catch Java Model Exception e ignore if type Index 0 return NO TYPES System arraycopy member Types 0 member Types new I Source Type type Index 0 type Index return member Types  ISourceType ISourceType getMemberTypes NO_TYPES ISourceType memberTypes ISourceType typeIndex IJavaElement SourceType ISourceType ISourceType SourceType getElementInfo memberTypes typeIndex JavaModelException typeIndex NO_TYPES memberTypes memberTypes ISourceType typeIndex typeIndex memberTypes
see I Source Type public I Source Method get Methods int length this children length if length 0 return NO METHODS I Source Method methods new I Source Method length int method Index 0 for int i 0 i length i I Java Element child this children i if child instanceof Source Method try I Source Method method I Source Method Source Method child get Element Info methods method Index method catch Java Model Exception e ignore if method Index 0 return NO METHODS System arraycopy methods 0 methods new I Source Method method Index 0 method Index return methods  ISourceType ISourceMethod getMethods NO_METHODS ISourceMethod ISourceMethod methodIndex IJavaElement SourceMethod ISourceMethod ISourceMethod SourceMethod getElementInfo methodIndex JavaModelException methodIndex NO_METHODS ISourceMethod methodIndex methodIndex
see I Source Type public char get Package Name return this package Name  ISourceType getPackageName packageName
see I Source Type public char get Superclass Name if this handle get Element Name length 0 if anonymous type char interface Names this super Interface Names if interface Names null interface Names length 0 return interface Names 0 return this superclass Name  ISourceType getSuperclassName getElementName interfaceNames superInterfaceNames interfaceNames interfaceNames interfaceNames superclassName
see I Source Type public boolean is Binary Type return false  ISourceType isBinaryType
see I Source Type public boolean is Class return this flags I Constants Acc Interface 0  ISourceType isClass IConstants AccInterface
see I Source Type public boolean is Interface return this flags I Constants Acc Interface 0  ISourceType isInterface IConstants AccInterface
Sets the handle for this type info protected void set Handle I Type handle this handle handle  setHandle IType
Sets the name of the package this type is declared in protected void set Package Name char name this package Name name  setPackageName packageName
Sets the name of the source file this type is declared in protected void set Source File Name char name this source File Name name  setSourceFileName sourceFileName
Sets the unqualified name of this type s superclass protected void set Superclass Name char superclass Name this superclass Name superclass Name  setSuperclassName superclassName superclassName superclassName
Sets the unqualified names of the interfaces this type implements or extends protected void set Super Interface Names char super Interface Names this super Interface Names super Interface Names  setSuperInterfaceNames superInterfaceNames superInterfaceNames superInterfaceNames
this super Interface Names super Interface Names public String to String return Info for this handle to String NON NLS 1  superInterfaceNames superInterfaceNames toString toString

Convert a type into an AST type declaration and put it in the given compilation unit public static Type Declaration build Type Declaration I Type type Compilation Unit Declaration compilation Unit Compilation Result compilation Result throws Java Model Exception char package Name type get Package Fragment get Element Name to Char Array if package Name null package Name length 0 compilation Unit current Package new Import Reference Char Operation split On package Name new long 0 false Compiler Modifiers Acc Default convert type Type Declaration type Declaration convert type null null compilation Result I Type already Computed Member type I Type parent type get Declaring Type Type Declaration previous Declaration type Declaration while parent null Type Declaration declaration convert parent already Computed Member previous Declaration compilation Result already Computed Member parent previous Declaration declaration parent parent get Declaring Type compilation Unit types new Type Declaration previous Declaration return type Declaration  TypeDeclaration buildTypeDeclaration IType CompilationUnitDeclaration compilationUnit CompilationResult compilationResult JavaModelException packageName getPackageFragment getElementName toCharArray packageName packageName compilationUnit currentPackage ImportReference CharOperation splitOn packageName CompilerModifiers AccDefault TypeDeclaration typeDeclaration compilationResult IType alreadyComputedMember IType getDeclaringType TypeDeclaration previousDeclaration typeDeclaration TypeDeclaration alreadyComputedMember previousDeclaration compilationResult alreadyComputedMember previousDeclaration getDeclaringType compilationUnit TypeDeclaration previousDeclaration typeDeclaration
private static Field Declaration convert I Field field I Type type throws Java Model Exception Field Declaration field Declaration new Field Declaration field Declaration name field get Element Name to Char Array field Declaration type create Type Reference Signature to String field get Type Signature to Char Array type field Declaration modifiers field get Flags return field Declaration  FieldDeclaration IField IType JavaModelException FieldDeclaration fieldDeclaration FieldDeclaration fieldDeclaration getElementName toCharArray fieldDeclaration createTypeReference toString getTypeSignature toCharArray fieldDeclaration getFlags fieldDeclaration
private static Abstract Method Declaration convert I Method method I Type type Compilation Result compilation Result throws Java Model Exception Abstract Method Declaration method Declaration if method is Constructor Constructor Declaration decl new Constructor Declaration compilation Result decl is Default Constructor false method Declaration decl else Method Declaration decl new Method Declaration compilation Result convert return type decl return Type create Type Reference Signature to String method get Return Type to Char Array type method Declaration decl method Declaration selector method get Element Name to Char Array method Declaration modifiers method get Flags convert arguments String argument Type Names method get Parameter Types String argument Names method get Parameter Names int argument Count argument Type Names null 0 argument Type Names length method Declaration arguments new Argument argument Count for int i 0 i argument Count i method Declaration arguments i new Argument argument Names i to Char Array 0 create Type Reference Signature to String argument Type Names i to Char Array type Compiler Modifiers Acc Default do not care whether was final or not convert thrown exceptions String exception Type Names method get Exception Types int exception Count exception Type Names null 0 exception Type Names length if exception Count 0 method Declaration thrown Exceptions new Type Reference exception Count for int i 0 i exception Count i method Declaration thrown Exceptions i create Type Reference Signature to String exception Type Names i to Char Array type return method Declaration  AbstractMethodDeclaration IMethod IType CompilationResult compilationResult JavaModelException AbstractMethodDeclaration methodDeclaration isConstructor ConstructorDeclaration ConstructorDeclaration compilationResult isDefaultConstructor methodDeclaration MethodDeclaration MethodDeclaration compilationResult returnType createTypeReference toString getReturnType toCharArray methodDeclaration methodDeclaration getElementName toCharArray methodDeclaration getFlags argumentTypeNames getParameterTypes argumentNames getParameterNames argumentCount argumentTypeNames argumentTypeNames methodDeclaration argumentCount argumentCount methodDeclaration argumentNames toCharArray createTypeReference toString argumentTypeNames toCharArray CompilerModifiers AccDefault exceptionTypeNames getExceptionTypes exceptionCount exceptionTypeNames exceptionTypeNames exceptionCount methodDeclaration thrownExceptions TypeReference exceptionCount exceptionCount methodDeclaration thrownExceptions createTypeReference toString exceptionTypeNames toCharArray methodDeclaration
private static Type Declaration convert I Type type I Type already Computed Member Type Declaration already Computed Member Declaration Compilation Result compilation Result throws Java Model Exception create type declaration can be member type Type Declaration type Declaration new Type Declaration compilation Result if type get Declaring Type null type Declaration bits AST Node Is Member TypeMASK type Declaration name type get Element Name to Char Array type Declaration modifiers type get Flags set superclass and superinterfaces if type get Superclass Name null type Declaration superclass create Type Reference type get Superclass Name to Char Array type String interface Names type get Super Interface Names int interface Count interface Names null 0 interface Names length type Declaration super Interfaces new Type Reference interface Count for int i 0 i interface Count i type Declaration super Interfaces i create Type Reference interface Names i to Char Array type convert member types I Type member Types type get Types int member Type Count member Types null 0 member Types length type Declaration member Types new Type Declaration member Type Count for int i 0 i member Type Count i if already Computed Member null already Computed Member get Fully Qualified Name equals member Types i get Fully Qualified Name type Declaration member Types i already Computed Member Declaration else type Declaration member Types i convert member Types i null null compilation Result convert fields I Field fields type get Fields int field Count fields null 0 fields length type Declaration fields new Field Declaration field Count for int i 0 i field Count i type Declaration fields i convert fields i type convert methods need to add default constructor if necessary I Method methods type get Methods int method Count methods null 0 methods length source type has a constructor by default we assume that one is needed int needed Count 1 for int i 0 i method Count i if methods i is Constructor needed Count 0 Does not need the extra constructor since one constructor already exists break boolean is Interface type is Interface needed Count is Interface 0 needed Count type Declaration methods new Abstract Method Declaration method Count needed Count if needed Count 0 add default constructor in first position type Declaration methods 0 type Declaration creates Internal Constructor false false for int i 0 i method Count i Abstract Method Declaration method convert methods i type compilation Result if is Interface method is Abstract fix up flag method modifiers Compiler Modifiers Acc Semicolon Body type Declaration methods needed Count i method return type Declaration  TypeDeclaration IType IType alreadyComputedMember TypeDeclaration alreadyComputedMemberDeclaration CompilationResult compilationResult JavaModelException TypeDeclaration typeDeclaration TypeDeclaration compilationResult getDeclaringType typeDeclaration ASTNode IsMemberTypeMASK typeDeclaration getElementName toCharArray typeDeclaration getFlags getSuperclassName typeDeclaration createTypeReference getSuperclassName toCharArray interfaceNames getSuperInterfaceNames interfaceCount interfaceNames interfaceNames typeDeclaration superInterfaces TypeReference interfaceCount interfaceCount typeDeclaration superInterfaces createTypeReference interfaceNames toCharArray IType memberTypes getTypes memberTypeCount memberTypes memberTypes typeDeclaration memberTypes TypeDeclaration memberTypeCount memberTypeCount alreadyComputedMember alreadyComputedMember getFullyQualifiedName memberTypes getFullyQualifiedName typeDeclaration memberTypes alreadyComputedMemberDeclaration typeDeclaration memberTypes memberTypes compilationResult IField getFields fieldCount typeDeclaration FieldDeclaration fieldCount fieldCount typeDeclaration IMethod getMethods methodCount neededCount methodCount isConstructor neededCount isInterface isInterface neededCount isInterface neededCount typeDeclaration AbstractMethodDeclaration methodCount neededCount neededCount typeDeclaration typeDeclaration createsInternalConstructor methodCount AbstractMethodDeclaration compilationResult isInterface isAbstract CompilerModifiers AccSemicolonBody typeDeclaration neededCount typeDeclaration
private static Type Reference create Type Reference char type I Type context Type try String resolved Name context Type resolve Type new String type if resolved Name null resolved Name length 1 type Char Operation concat resolved Name 0 0 to Char Array resolved Name 0 1 to Char Array catch Java Model Exception e ignore count identifiers and dimensions int max type length int dim Start max int dim 0 int ident Count 1 for int i 0 i max i switch type i case if dim 0 dim Start i dim break case ident Count break rebuild identifiers and dimensions if ident Count 1 simple type reference if dim 0 return new Single Type Reference type 0 else char identifier new char dim Start System arraycopy type 0 identifier 0 dim Start return new Array Type Reference identifier dim 0 else qualified type reference char identifiers Char Operation split On type 0 dim Start if dim 0 return new Qualified Type Reference identifiers new long 0 else return new Array Qualified Type Reference identifiers dim new long 0  TypeReference createTypeReference IType contextType resolvedName contextType resolveType resolvedName resolvedName CharOperation resolvedName toCharArray resolvedName toCharArray JavaModelException dimStart identCount dimStart identCount identCount SingleTypeReference dimStart dimStart ArrayTypeReference CharOperation splitOn dimStart QualifiedTypeReference ArrayQualifiedTypeReference

public Type Vector max Size INITIAL SIZE size 0 elements new I Type max Size  TypeVector maxSize INITIAL_SIZE IType maxSize
public Type Vector I Type types this size types length this max Size this size 1 when an element is added it assumes that the length is 0 elements new I Type this max Size System arraycopy types 0 elements 0 this size  TypeVector IType maxSize IType maxSize
public Type Vector I Type type this max Size INITIAL SIZE this size 1 elements new I Type this max Size elements 0 type  TypeVector IType maxSize INITIAL_SIZE IType maxSize
public void add I Type new Element if size max Size knows that size starts max Size System arraycopy elements 0 elements new I Type max Size 2 0 size elements size new Element  IType newElement maxSize maxSize IType maxSize newElement
public void add All I Type new Elements if size new Elements length max Size max Size size new Elements length assume no more elements will be added System arraycopy elements 0 elements new I Type max Size 0 size System arraycopy new Elements 0 elements size new Elements length size new Elements length  addAll IType newElements newElements maxSize maxSize newElements IType maxSize newElements newElements newElements
public boolean contains I Type element for int i size i 0 if element equals elements i return true return false  IType
public Type Vector copy Type Vector clone new Type Vector int length this elements length System arraycopy this elements 0 clone elements new I Type length 0 length clone size this size clone max Size this max Size return clone  TypeVector TypeVector TypeVector IType maxSize maxSize
return clone public I Type element At int index return elements index  IType elementAt
public I Type elements do not resize to 0 if empty since may add more elements later if this size 0 return No Elements if this size this max Size max Size size System arraycopy this elements 0 this elements new I Type max Size 0 size return this elements  IType NoElements maxSize maxSize IType maxSize
public I Type find I Type element for int i size i 0 if element elements i return elements i return null  IType IType
public I Type remove I Type element assumes only one occurrence of the element exists for int i size i 0 if element elements i shift the remaining elements down one spot System arraycopy elements i 1 elements i size i elements size null return element return null  IType IType
public void remove All for int i size i 0 elements i null size 0  removeAll
public String to String String Buffer buffer new String Buffer NON NLS 1 for int i 0 i size i buffer append n NON NLS 1 buffer append elements i buffer append n NON NLS 1 return buffer to String  toString StringBuffer StringBuffer toString

public User Library I Classpath Entry entries boolean is System Library Assert is Not Null entries this entries entries this is System Library is System Library  UserLibrary IClasspathEntry isSystemLibrary isNotNull isSystemLibrary isSystemLibrary
public I Classpath Entry get Entries return this entries  IClasspathEntry getEntries
public boolean is System Library return this is System Library  isSystemLibrary isSystemLibrary
public boolean equals Object obj if obj null obj get Class get Class User Library other User Library obj if this entries length other entries length this is System Library other is System Library for int i 0 i this entries length i if this entries i equals other entries i return false return true return false  getClass getClass UserLibrary UserLibrary isSystemLibrary isSystemLibrary
public int hash Code int hash Code 0 if this is System Library hash Code for int i 0 i this entries length i hash Code hash Code 17 this entries hash Code return hash Code  hashCode hashCode isSystemLibrary hashCode hashCode hashCode hashCode hashCode
package String serialize throws IO Exception Byte Array Output Stream s new Byte Array Output Stream Output Stream Writer writer new Output Stream Writer s UTF8 NON NLS 1 XML Writer xml Writer new XML Writer writer Hash Map library new Hash Map library put TAG VERSION String value Of CURRENT VERSION library put TAG SYSTEMLIBRARY String value Of this is System Library xml Writer print Tag TAG USERLIBRARY library true true false for int i 0 i this entries length i I Classpath Entry curr this entries i Hash Map archive new Hash Map archive put TAG PATH curr get Path to String I Path source Attach curr get Source Attachment Path if source Attach null archive put TAG SOURCEATTACHMENT source Attach I Path source Attach Root curr get Source Attachment Root Path if source Attach Root null archive put TAG SOURCEATTACHMENTROOT source Attach Root xml Writer print Tag TAG ARCHIVE archive true true true xml Writer end Tag TAG USERLIBRARY true writer flush writer close return s to String UTF8 NON NLS 1  IOException ByteArrayOutputStream ByteArrayOutputStream OutputStreamWriter OutputStreamWriter XMLWriter xmlWriter XMLWriter HashMap HashMap TAG_VERSION valueOf CURRENT_VERSION TAG_SYSTEMLIBRARY valueOf isSystemLibrary xmlWriter printTag TAG_USERLIBRARY IClasspathEntry HashMap HashMap TAG_PATH getPath toString IPath sourceAttach getSourceAttachmentPath sourceAttach TAG_SOURCEATTACHMENT sourceAttach IPath sourceAttachRoot getSourceAttachmentRootPath sourceAttachRoot TAG_SOURCEATTACHMENTROOT sourceAttachRoot xmlWriter printTag TAG_ARCHIVE xmlWriter endTag TAG_USERLIBRARY toString
package static User Library create From String Reader reader throws IO Exception Element cp Element try Document Builder parser Document Builder Factory new Instance new Document Builder cp Element parser parse new Input Source reader get Document Element catch SAX Exception e throw new IO Exception Util bind file bad Format NON NLS 1 catch Parser Configuration Exception e throw new IO Exception Util bind file bad Format NON NLS 1 finally reader close if cp Element get Node Name equals Ignore Case TAG USERLIBRARY NON NLS 1 throw new IO Exception Util bind file bad Format NON NLS 1 String version cp Element get Attribute TAG VERSION in case we update the format add code to read older versions boolean is System Boolean value Of cp Element get Attribute TAG SYSTEMLIBRARY boolean Value Node List list cp Element get Child Nodes int length list get Length Array List res new Array List length for int i 0 i length i Node node list item i if node get Node Type Node ELEMENT NODE Element element Element node if element get Node Name equals TAG ARCHIVE String path element get Attribute TAG PATH I Path source Attach element has Attribute TAG SOURCEATTACHMENT new Path element get Attribute TAG SOURCEATTACHMENT null I Path source Attach Root element has Attribute TAG SOURCEATTACHMENTROOT new Path element get Attribute TAG SOURCEATTACHMENTROOT null res add Java Core new Library Entry new Path path source Attach source Attach Root I Classpath Entry entries I Classpath Entry res to Array new I Classpath Entry res size return new User Library entries is System  UserLibrary createFromString IOException cpElement DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder cpElement InputSource getDocumentElement SAXException IOException badFormat ParserConfigurationException IOException badFormat cpElement getNodeName equalsIgnoreCase TAG_USERLIBRARY IOException badFormat cpElement getAttribute TAG_VERSION isSystem valueOf cpElement getAttribute TAG_SYSTEMLIBRARY booleanValue NodeList cpElement getChildNodes getLength ArrayList ArrayList getNodeType ELEMENT_NODE getNodeName TAG_ARCHIVE getAttribute TAG_PATH IPath sourceAttach hasAttribute TAG_SOURCEATTACHMENT getAttribute TAG_SOURCEATTACHMENT IPath sourceAttachRoot hasAttribute TAG_SOURCEATTACHMENTROOT getAttribute TAG_SOURCEATTACHMENTROOT JavaCore newLibraryEntry sourceAttach sourceAttachRoot IClasspathEntry IClasspathEntry toArray IClasspathEntry UserLibrary isSystem
public String to String if this entries null return null NON NLS 1 String Buffer buffer new String Buffer int length this entries length for int i 0 i length i buffer append this entries i to String n return buffer to String  toString StringBuffer StringBuffer toString toString

private String name public User Library Classpath Container String lib Name this name lib Name  UserLibraryClasspathContainer libName libName
private User Library get User Library return User Library Manager get User Library this name  UserLibrary getUserLibrary UserLibraryManager getUserLibrary
public I Classpath Entry get Classpath Entries User Library library get User Library if library null return library get Entries return new I Classpath Entry 0  IClasspathEntry getClasspathEntries UserLibrary getUserLibrary getEntries IClasspathEntry
see org eclipse jdt core I Classpath Container get Description public String get Description return this name  IClasspathContainer getDescription getDescription
public int get Kind User Library library get User Library if library null library is System Library return K SYSTEM return K APPLICATION  getKind UserLibrary getUserLibrary isSystemLibrary K_SYSTEM K_APPLICATION
see org eclipse jdt core I Classpath Container get Path public I Path get Path return new Path Java Core USER LIBRARY CONTAINER ID append this name  IClasspathContainer getPath IPath getPath JavaCore USER_LIBRARY_CONTAINER_ID

public void initialize I Path container Path I Java Project project throws Core Exception if is User Library Container container Path String user Lib Name container Path segment 1 User Library entries User Library Manager get User Library user Lib Name if entries null User Library Classpath Container container new User Library Classpath Container user Lib Name Java Core set Classpath Container container Path new I Java Project project new I Classpath Container container null  IPath containerPath IJavaProject CoreException isUserLibraryContainer containerPath userLibName containerPath UserLibrary UserLibraryManager getUserLibrary userLibName UserLibraryClasspathContainer UserLibraryClasspathContainer userLibName JavaCore setClasspathContainer containerPath IJavaProject IClasspathContainer
private boolean is User Library Container I Path path return path null path segment Count 2 Java Core USER LIBRARY CONTAINER ID equals path segment 0  isUserLibraryContainer IPath segmentCount JavaCore USER_LIBRARY_CONTAINER_ID
see org eclipse jdt core Classpath Container Initializer can Update Classpath Container org eclipse core runtime I Path org eclipse jdt core I Java Project public boolean can Update Classpath Container I Path container Path I Java Project project return is User Library Container container Path  ClasspathContainerInitializer canUpdateClasspathContainer IPath IJavaProject canUpdateClasspathContainer IPath containerPath IJavaProject isUserLibraryContainer containerPath
see org eclipse jdt core Classpath Container Initializer request Classpath Container Update org eclipse core runtime I Path org eclipse jdt core I Java Project org eclipse jdt core I Classpath Container public void request Classpath Container Update I Path container Path I Java Project project I Classpath Container container Suggestion throws Core Exception if is User Library Container container Path String name container Path segment 1 if container Suggestion null User Library library new User Library container Suggestion get Classpath Entries container Suggestion get Kind I Classpath Container K SYSTEM User Library Manager set User Library name library null should use a real progress monitor else User Library Manager set User Library name null null should use a real progress monitor  ClasspathContainerInitializer requestClasspathContainerUpdate IPath IJavaProject IClasspathContainer requestClasspathContainerUpdate IPath containerPath IJavaProject IClasspathContainer containerSuggestion CoreException isUserLibraryContainer containerPath containerPath containerSuggestion UserLibrary UserLibrary containerSuggestion getClasspathEntries containerSuggestion getKind IClasspathContainer K_SYSTEM UserLibraryManager setUserLibrary UserLibraryManager setUserLibrary
see org eclipse jdt core Classpath Container Initializer get Description org eclipse core runtime I Path org eclipse jdt core I Java Project public String get Description I Path container Path I Java Project project if is User Library Container container Path return container Path segment 1 return super get Description container Path project  ClasspathContainerInitializer getDescription IPath IJavaProject getDescription IPath containerPath IJavaProject isUserLibraryContainer containerPath containerPath getDescription containerPath
see org eclipse jdt core Classpath Container Initializer get ComparisonID org eclipse core runtime I Path org eclipse jdt core I Java Project public Object get ComparisonID I Path container Path I Java Project project return container Path  ClasspathContainerInitializer getComparisonID IPath IJavaProject getComparisonID IPath containerPath IJavaProject containerPath

public void property Change Property Change Event event String key event get Property if key starts With CP USERLIBRARY PREFERENCES PREFIX try recreate Persisted User Library Entry key String event get New Value false true catch Java Model Exception e if log Problems Util log e Exception while rebinding user library key substring CP USERLIBRARY PREFERENCES PREFIX length NON NLS 1 NON NLS 2  propertyChange PropertyChangeEvent getProperty startsWith CP_USERLIBRARY_PREFERENCES_PREFIX recreatePersistedUserLibraryEntry getNewValue JavaModelException logProblems CP_USERLIBRARY_PREFERENCES_PREFIX
private User Library Manager do not instantiate  UserLibraryManager
Returns the names of all defined user libraries The corresponding classpath container path is the name appended to the CONTAINER ID return Return an array containing the names of all known user defined public static String get User Library Names Set set get Library Map key Set return String set to Array new String set size  CONTAINER_ID getUserLibraryNames getLibraryMap keySet toArray
Gets the library for a given name or code null code if no such library exists param name The name of the library return The library registered for the given name or code null code public static User Library get User Library String name return User Library get Library Map get name  UserLibrary getUserLibrary UserLibrary getLibraryMap
Registers user libraries for given names If a library for the given name already exists its value will be updated This call will also rebind all related classpath container param new Names The names to register the libraries for param new Libs The libraries to register param monitor A progress monitor used when rebinding the classpath containers throws Java Model Exception public static void set User Libraries String new Names User Library new Libs I Progress Monitor monitor throws Java Model Exception Assert is True new Names length new Libs length names and libraries should have the same length NON NLS 1 if monitor null monitor new Null Progress Monitor monitor begin Task Configure user libraries new Names length NON NLS 1 try int last new Names length 1 for int i 0 i new Libs length i internal Set User Library new Names i new Libs i i last true new Sub Progress Monitor monitor 1 finally monitor done  newNames newLibs JavaModelException setUserLibraries newNames UserLibrary newLibs IProgressMonitor JavaModelException isTrue newNames newLibs NullProgressMonitor beginTask newNames newNames newLibs internalSetUserLibrary newNames newLibs SubProgressMonitor
Registers a user library for a given name If a library for the given name already exists its value will be updated This call will also rebind all related classpath container param name The name to register the library for param library The library to register param monitor A progress monitor used when rebinding the classpath containers throws Java Model Exception public static void set User Library String name User Library library I Progress Monitor monitor throws Java Model Exception internal Set User Library name library true true monitor  JavaModelException setUserLibrary UserLibrary IProgressMonitor JavaModelException internalSetUserLibrary
static Map get Library Map if user Libraries null user Libraries new Hash Map load variables and containers from preferences into cache Preferences preferences Java Core get Plugin get Plugin Preferences preferences add Property Change Listener listener only get variable from preferences not set to their default String property Names preferences property Names for int i 0 i property Names length i String property Name property Names i if property Name starts With CP USERLIBRARY PREFERENCES PREFIX try recreate Persisted User Library Entry property Name preferences get String property Name false false catch Java Model Exception e won t happen no rebinding return user Libraries  getLibraryMap userLibraries userLibraries HashMap JavaCore getPlugin getPluginPreferences addPropertyChangeListener propertyNames propertyNames propertyNames propertyName propertyNames propertyName startsWith CP_USERLIBRARY_PREFERENCES_PREFIX recreatePersistedUserLibraryEntry propertyName getString propertyName JavaModelException userLibraries
static void recreate Persisted User Library Entry String property Name String saved String boolean save boolean rebind throws Java Model Exception String lib Name property Name substring CP USERLIBRARY PREFERENCES PREFIX length if saved String null saved String equals CP ENTRY IGNORE internal Set User Library lib Name null save rebind null else try String Reader reader new String Reader saved String User Library library User Library create From String reader internal Set User Library lib Name library save rebind null catch IO Exception e if log Problems Util log e Exception while retrieving user library property Name library will be removed NON NLS 1 NON NLS 2 internal Set User Library lib Name null save rebind null  recreatePersistedUserLibraryEntry propertyName savedString JavaModelException libName propertyName CP_USERLIBRARY_PREFERENCES_PREFIX savedString savedString CP_ENTRY_IGNORE internalSetUserLibrary libName StringReader StringReader savedString UserLibrary UserLibrary createFromString internalSetUserLibrary libName IOException logProblems propertyName internalSetUserLibrary libName
static void internal Set User Library String name User Library library boolean save boolean rebind I Progress Monitor monitor throws Java Model Exception if library null Object previous get Library Map remove name if previous null return no change else Object previous get Library Map put name library if library equals previous return no change Preferences preferences Java Core get Plugin get Plugin Preferences String container Key CP USERLIBRARY PREFERENCES PREFIX name String container String CP ENTRY IGNORE if library null try container String library serialize catch IO Exception e could not encode entry leave it as CP ENTRY IGNORE preferences remove Property Change Listener listener try preferences set Default container Key CP ENTRY IGNORE use this default to get rid of removed ones preferences set Value container Key container String if save Java Core get Plugin save Plugin Preferences if rebind rebind Classpath Entries name library null monitor finally preferences add Property Change Listener listener  internalSetUserLibrary UserLibrary IProgressMonitor JavaModelException getLibraryMap getLibraryMap JavaCore getPlugin getPluginPreferences containerKey CP_USERLIBRARY_PREFERENCES_PREFIX containerString CP_ENTRY_IGNORE containerString IOException CP_ENTRY_IGNORE removePropertyChangeListener setDefault containerKey CP_ENTRY_IGNORE setValue containerKey containerString JavaCore getPlugin savePluginPreferences rebindClasspathEntries addPropertyChangeListener
private static void rebind Classpath Entries String name boolean remove I Progress Monitor monitor throws Java Model Exception I Workspace Root root Resources Plugin get Workspace get Root I Java Project projects Java Core create root get Java Projects I Path container Path new Path Java Core USER LIBRARY CONTAINER ID append name Array List affected Projects new Array List for int i 0 i projects length i I Java Project project projects i I Classpath Entry entries project get Raw Classpath for int k 0 k entries length k I Classpath Entry curr entries k if curr get Entry Kind I Classpath Entry CPE CONTAINER if container Path equals curr get Path affected Projects add project break if affected Projects is Empty I Java Project affected I Java Project affected Projects to Array new I Java Project affected Projects size I Classpath Container containers new I Classpath Container affected length if remove Previously containers array only contained a null value Then user library classpath entry was first removed and then added a while after when post change delta event on classpath file was fired Unfortunately in some cases this event was fired a little bit too late and missed the refresh of Package Explorer see bug https bugs eclipse org bugs show bug cgi id 61872 So now instanciate a new user library classpath container instead which allow to refresh its content immediately as there s no classpath entry removal Note that it works because equals Object method is not overridden for User Library Classpath Container If it was the update wouldn t happen while setting classpath container see java Core set Classpath Container I Path I Java Project I Classpath Container I Progress Monitor User Library Classpath Container container new User Library Classpath Container name containers 0 container Java Core set Classpath Container container Path affected containers monitor else if monitor null monitor done  rebindClasspathEntries IProgressMonitor JavaModelException IWorkspaceRoot ResourcesPlugin getWorkspace getRoot IJavaProject JavaCore getJavaProjects IPath containerPath JavaCore USER_LIBRARY_CONTAINER_ID ArrayList affectedProjects ArrayList IJavaProject IClasspathEntry getRawClasspath IClasspathEntry getEntryKind IClasspathEntry CPE_CONTAINER containerPath getPath affectedProjects affectedProjects isEmpty IJavaProject IJavaProject affectedProjects toArray IJavaProject affectedProjects IClasspathContainer IClasspathContainer show_bug UserLibraryClasspathContainer javaCore setClasspathContainer IPath IJavaProject IClasspathContainer IProgressMonitor UserLibraryClasspathContainer UserLibraryClasspathContainer JavaCore setClasspathContainer containerPath

File f Directory Creates an anonymous file source which creates files in the given directory public Anonymous File Source File directory if directory exists directory mkdirs else if directory is Directory throw new Illegal Argument Exception Directory arguments should be a directory NON NLS 1 f Directory directory  fDirectory AnonymousFileSource isDirectory IllegalArgumentException fDirectory
Allocates and returns a Random Access File in R W mode on a new anonymous file Guaranteed to be unallocated synchronized public Random Access File allocate Anonymous File throws IO Exception File file get Anonymous File return new Random Access File file rw NON NLS 1  RandomAccessFile RandomAccessFile allocateAnonymousFile IOException getAnonymousFile RandomAccessFile
Returns a URL on a newly allocated file with the given initial content Guaranteed to be unallocated synchronized public URL allocate AnonymousURL byte bytes throws IO Exception try byte hasharray java security Message Digest get Instance SHA digest bytes NON NLS 1 String Buffer sb new String Buffer for int i 0 i hasharray length i sb append Character for Digit hasharray i 4 0x0F 16 sb append Character for Digit hasharray i 0x0F 16 sb append jnk NON NLS 1 String file Name sb to String File file file For Name file Name if file exists Random Access File raf new Random Access File file rw NON NLS 1 raf write bytes raf close return convert File ToURL file catch java security No Such Algorithm Exception e throw new IO Exception e get Message  allocateAnonymousURL IOException MessageDigest getInstance StringBuffer StringBuffer forDigit forDigit fileName toString fileForName fileName RandomAccessFile RandomAccessFile convertFileToURL NoSuchAlgorithmException IOException getMessage
Returns a URL using the file protocol corresponding to the given File static public URL convert File ToURL File file try String path file get Canonical Path replace java io File separator Char return new URL file path NON NLS 1 NON NLS 2 NON NLS 3 catch IO Exception ioe throw new Error  convertFileToURL getCanonicalPath separatorChar IOException
Answer a File to use for the given simple file name File file For Name String file Name File dir if file Name length 1 String dir Name Integer to Hex String file Name hash Code 255 255 dir new File f Directory dir Name dir mkdirs else dir f Directory return new File dir file Name  fileForName fileName fileName dirName toHexString fileName hashCode fDirectory dirName fDirectory fileName
Returns a new anonymous file but does not allocate it Not guaranteed to be free when used since it is unallocated synchronized public File get Anonymous File File file file file For Name get Anonymous File Name while file exists try Thread sleep 1 catch Interrupted Exception e ignore file file For Name get Anonymous File Name return file  getAnonymousFile fileForName getAnonymousFileName InterruptedException fileForName getAnonymousFileName
Returns a new anonymous file name Not guaranteed to be free since its directory is unknown synchronized public String get Anonymous File Name return get Anonymous File Name System current Time Millis  getAnonymousFileName getAnonymousFileName currentTimeMillis
Returns a new anonymous file name based on the given long Not guaranteed to be free since its directory is unknown synchronized public String get Anonymous File Name long l if l 0 l l String Buffer sb new String Buffer sb append Character for Digit int l 26 10 36 l 26 while l 0 sb append Character for Digit int l 36 36 l 36 sb append jnk NON NLS 1 return sb to String  getAnonymousFileName StringBuffer StringBuffer forDigit forDigit toString

private Compilation Unit Declaration unit public AST Node Finder Compilation Unit Declaration unit this unit unit  CompilationUnitDeclaration ASTNodeFinder CompilationUnitDeclaration
public Field Declaration find Field I Field field Handle Type Declaration type Decl find Type I Type field Handle get Parent if type Decl null return null Field Declaration fields type Decl fields if fields null char field Name field Handle get Element Name to Char Array for int i 0 length fields length i length i Field Declaration field fields i if Char Operation equals field Name field name return field return null  FieldDeclaration findField IField fieldHandle TypeDeclaration typeDecl findType IType fieldHandle getParent typeDecl FieldDeclaration typeDecl fieldName fieldHandle getElementName toCharArray FieldDeclaration CharOperation fieldName
public Initializer find Initializer I Initializer initializer Handle Type Declaration type Decl find Type I Type initializer Handle get Parent if type Decl null return null Field Declaration fields type Decl fields if fields null int occurence Count Java Element initializer Handle occurrence Count for int i 0 length fields length i length i Field Declaration field fields i if field instanceof Initializer occurence Count 0 return Initializer field return null  findInitializer IInitializer initializerHandle TypeDeclaration typeDecl findType IType initializerHandle getParent typeDecl FieldDeclaration typeDecl occurenceCount JavaElement initializerHandle occurrenceCount FieldDeclaration occurenceCount
public Abstract Method Declaration find Method I Method method Handle Type Declaration type Decl find Type I Type method Handle get Parent if type Decl null return null Abstract Method Declaration methods type Decl methods if methods null char selector method Handle get Element Name to Char Array String parameter Type Signatures method Handle get Parameter Types int parameter Count parameter Type Signatures length next Method for int i 0 length methods length i length i Abstract Method Declaration method methods i if Char Operation equals selector method selector Argument args method arguments int args Length args null 0 args length if args Length parameter Count for int j 0 j parameter Count j Type Reference type args j type String signature Util type Signature type if signature equals parameter Type Signatures j continue next Method return method return null  AbstractMethodDeclaration findMethod IMethod methodHandle TypeDeclaration typeDecl findType IType methodHandle getParent typeDecl AbstractMethodDeclaration typeDecl methodHandle getElementName toCharArray parameterTypeSignatures methodHandle getParameterTypes parameterCount parameterTypeSignatures nextMethod AbstractMethodDeclaration CharOperation argsLength argsLength parameterCount parameterCount TypeReference typeSignature parameterTypeSignatures nextMethod
int count 0 public boolean visit Type Declaration type Declaration Block Scope scope if result null return false if type Declaration bits AST Node Is Anonymous TypeMASK 0 if find Anonymous count occurence Count result type Declaration else if find Anonymous Char Operation equals type Name type Declaration name result type Declaration return false visit only one level  TypeDeclaration typeDeclaration BlockScope typeDeclaration ASTNode IsAnonymousTypeMASK findAnonymous occurenceCount typeDeclaration findAnonymous CharOperation typeName typeDeclaration typeDeclaration
public Type Declaration find Type I Type type Handle I Java Element parent type Handle get Parent final char type Name type Handle get Element Name to Char Array final int occurence Count Source Type type Handle occurrence Count final boolean find Anonymous type Name length 0 class Visitor extends AST Visitor Type Declaration result int count 0 public boolean visit Type Declaration type Declaration Block Scope scope if result null return false if type Declaration bits AST Node Is Anonymous TypeMASK 0 if find Anonymous count occurence Count result type Declaration else if find Anonymous Char Operation equals type Name type Declaration name result type Declaration return false visit only one level switch parent get Element Type case I Java Element COMPILATION UNIT Type Declaration types this unit types if types null for int i 0 length types length i length i Type Declaration type types i if Char Operation equals type Name type name return type break case I Java Element TYPE Type Declaration parent Decl find Type I Type parent if parent Decl null return null types parent Decl member Types if types null for int i 0 length types length i length i Type Declaration type types i if Char Operation equals type Name type name return type break case I Java Element FIELD Field Declaration field Decl find Field I Field parent if field Decl null return null Visitor visitor new Visitor field Decl traverse visitor null return visitor result case I Java Element INITIALIZER Initializer initializer find Initializer I Initializer parent if initializer null return null visitor new Visitor initializer traverse visitor null return visitor result case I Java Element METHOD Abstract Method Declaration method Decl find Method I Method parent if method Decl null return null visitor new Visitor method Decl traverse visitor Class Scope null return visitor result return null  TypeDeclaration findType IType typeHandle IJavaElement typeHandle getParent typeName typeHandle getElementName toCharArray occurenceCount SourceType typeHandle occurrenceCount findAnonymous typeName ASTVisitor TypeDeclaration TypeDeclaration typeDeclaration BlockScope typeDeclaration ASTNode IsAnonymousTypeMASK findAnonymous occurenceCount typeDeclaration findAnonymous CharOperation typeName typeDeclaration typeDeclaration getElementType IJavaElement COMPILATION_UNIT TypeDeclaration TypeDeclaration CharOperation typeName IJavaElement TypeDeclaration parentDecl findType IType parentDecl parentDecl memberTypes TypeDeclaration CharOperation typeName IJavaElement FieldDeclaration fieldDecl findField IField fieldDecl fieldDecl IJavaElement findInitializer IInitializer IJavaElement AbstractMethodDeclaration methodDecl findMethod IMethod methodDecl methodDecl ClassScope

protected int f Ranges Creates a code Char Array Buffer code with the default buffer size 10 public Char Array Buffer this null DEFAULT BUFFER SIZE  fRanges CharArrayBuffer CharArrayBuffer DEFAULT_BUFFER_SIZE
Creates a code Char Array Buffer code with the default buffer size and sets the first element in the buffer to be the given char param first the first element to be placed in the buffer ignored if null public Char Array Buffer char first this first DEFAULT BUFFER SIZE  CharArrayBuffer CharArrayBuffer DEFAULT_BUFFER_SIZE
Creates a code Char Array Buffer code with the given buffer size and sets the first element in the buffer to be the given char array param first the first element of the buffer ignored if null param size the buffer size if less than 1 set to the DEFAULT BUFFER SIZE public Char Array Buffer char first int size f Size size 0 size DEFAULT BUFFER SIZE f Buffer new char f Size f Ranges new int f Size f End 0 if first null append first 0 first length  CharArrayBuffer DEFAULT_BUFFER_SIZE CharArrayBuffer fSize DEFAULT_BUFFER_SIZE fBuffer fSize fRanges fSize fEnd
Creates a code Char Array Buffer code with the given buffer size param size the size of the buffer public Char Array Buffer int size this null size  CharArrayBuffer CharArrayBuffer
Appends the entire given char array Given for convenience param src a char array which is appended to the end of the buffer public Char Array Buffer append char src if src null append src 0 src length return this  CharArrayBuffer
Appends a sub array of the given array to the buffer param src the next array of characters to be appended to the buffer ignored if null param start the start index in the src array param length the number of characters from start to be appended throws Array Index Out Of Bounds Exception if arguments specify an array index out of bounds public Char Array Buffer append char src int start int length if start 0 throw new Array Index Out Of Bounds Exception if length 0 throw new Array Index Out Of Bounds Exception if src null int src Length src length if start src Length throw new Array Index Out Of Bounds Exception if length start src Length throw new Array Index Out Of Bounds Exception do length check here to allow exceptions to be thrown if length 0 if f End f Size int size2 f Size 2 System arraycopy f Buffer 0 f Buffer new char size2 0 f Size System arraycopy f Ranges 0 f Ranges new int size2 0 f Size f Size 2 f Buffer f End src f Ranges f End new int start length f End return this  ArrayIndexOutOfBoundsException CharArrayBuffer ArrayIndexOutOfBoundsException ArrayIndexOutOfBoundsException srcLength srcLength ArrayIndexOutOfBoundsException srcLength ArrayIndexOutOfBoundsException fEnd fSize fSize fBuffer fBuffer fSize fRanges fRanges fSize fSize fBuffer fEnd fRanges fEnd fEnd
Appends the given char Given for convenience param c a char which is appended to the end of the buffer public Char Array Buffer append char c append new char c 0 1 return this  CharArrayBuffer
Appends the given String to the buffer Given for convenience use append char if possible param src a char array which is appended to the end of the buffer public Char Array Buffer append String src if src null append src to Char Array 0 src length return this  CharArrayBuffer toCharArray
Returns the entire contents of the buffer as one char or null if nothing has been put in the buffer public char get Contents if f End 0 return null determine the size of the array int size 0 for int i 0 i f End i size f Ranges i 1 if size 0 char result new char size int current 0 copy the results for int i 0 i f End i int range f Ranges i int length range 1 System arraycopy f Buffer i range 0 result current length current length return result return null  getContents fEnd fEnd fRanges fEnd fRanges fBuffer
Returns the contents of the buffer as a String or code null code if the buffer is empty public String to String char contents get Contents return contents null new String contents null  toString getContents

public Class File Attribute byte class File Bytes I Constant Pool constant Pool int offset throws Class Format Exception this attribute Name Index u2 At class File Bytes 0 offset this attribute Length u4 At class File Bytes 2 offset I Constant Pool Entry constant Pool Entry constant Pool decode Entry this attribute Name Index if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Utf8 throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY this attribute Name constant Pool Entry get Utf8 Value  ClassFileAttribute classFileBytes IConstantPool constantPool ClassFormatException attributeNameIndex u2At classFileBytes attributeLength u4At classFileBytes IConstantPoolEntry constantPoolEntry constantPool decodeEntry attributeNameIndex constantPoolEntry getKind IConstantPoolConstant CONSTANT_Utf8 ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY attributeName constantPoolEntry getUtf8Value
public int get Attribute Name Index return this attribute Name Index  getAttributeNameIndex attributeNameIndex
see I Class File Attribute get Attribute Name public char get Attribute Name return this attribute Name  IClassFileAttribute getAttributeName getAttributeName attributeName
see I Class File Attribute get Attribute Length public long get Attribute Length return this attribute Length  IClassFileAttribute getAttributeLength getAttributeLength attributeLength

Constructor for Class File Reader param class File Bytes the raw bytes of the class file param decoding Flags the decoding flags see I Class File Reader ALL see I Class File Reader CLASSFILE ATTRIBUTES see I Class File Reader CONSTANT POOL see I Class File Reader FIELD INFOS public Class File Reader byte class File Bytes int decoding Flags throws Class Format Exception This method looks ugly but is actually quite simple the constant Pool is constructed in 3 passes All non primitive constant pool members that usually refer to other members by index are tweaked to have their value in inst vars this minor cost at read time makes all subsequent uses of the constant pool element faster int constant Pool Count int constant Pool Offsets try this magic Number int u4 At class File Bytes 0 0 int read Offset 10 this minor Version this u2 At class File Bytes 4 0 this major Version this u2 At class File Bytes 6 0 if decoding Flags I Class File Reader CONSTANT POOL 0 no need to go further return constant Pool Count this u2 At class File Bytes 8 0 Pass 1 Fill in all primitive constants constant Pool Offsets new int constant Pool Count for int i 1 i constant Pool Count i int tag this u1 At class File Bytes read Offset 0 switch tag case I Constant Pool Constant CONSTANT Utf8 constant Pool Offsets i read Offset read Offset u2 At class File Bytes read Offset 1 0 read Offset I Constant Pool Constant CONSTANT Utf8 SIZE break case I Constant Pool Constant CONSTANT Integer constant Pool Offsets i read Offset read Offset I Constant Pool Constant CONSTANT Integer SIZE break case I Constant Pool Constant CONSTANT Float constant Pool Offsets i read Offset read Offset I Constant Pool Constant CONSTANT Float SIZE break case I Constant Pool Constant CONSTANT Long constant Pool Offsets i read Offset read Offset I Constant Pool Constant CONSTANT Long SIZE i break case I Constant Pool Constant CONSTANT Double constant Pool Offsets i read Offset read Offset I Constant Pool Constant CONSTANT Double SIZE i break case I Constant Pool Constant CONSTANT Class constant Pool Offsets i read Offset read Offset I Constant Pool Constant CONSTANT Class SIZE break case I Constant Pool Constant CONSTANT String constant Pool Offsets i read Offset read Offset I Constant Pool Constant CONSTANT String SIZE break case I Constant Pool Constant CONSTANT Fieldref constant Pool Offsets i read Offset read Offset I Constant Pool Constant CONSTANT Fieldref SIZE break case I Constant Pool Constant CONSTANT Methodref constant Pool Offsets i read Offset read Offset I Constant Pool Constant CONSTANT Methodref SIZE break case I Constant Pool Constant CONSTANT InterfaceMethodref constant Pool Offsets i read Offset read Offset I Constant Pool Constant CONSTANT InterfaceMethodref SIZE break case I Constant Pool Constant CONSTANT NameAndType constant Pool Offsets i read Offset read Offset I Constant Pool Constant CONSTANT NameAndType SIZE this constant Pool new Constant Pool class File Bytes constant Pool Offsets Read and validate access flags this access Flags u2 At class File Bytes read Offset 0 read Offset 2 Read the classname use exception handlers to catch bad format this class Name Index u2 At class File Bytes read Offset 0 this class Name get Constant Class Name At class File Bytes constant Pool Offsets this class Name Index read Offset 2 Read the superclass name can be zero for java lang Object this superclass Name Index u2 At class File Bytes read Offset 0 read Offset 2 if superclass Name Index is equals to 0 there is no need to set a value for the field this superclass Name null is fine if superclass Name Index 0 this superclass Name get Constant Class Name At class File Bytes constant Pool Offsets this superclass Name Index Read the interfaces use exception handlers to catch bad format this interfaces Count u2 At class File Bytes read Offset 0 read Offset 2 this interface Names NO INTERFACES NAMES this interface Indexes NO INTERFACE INDEXES if this interfaces Count 0 if decoding Flags I Class File Reader SUPER INTERFACES I Class File Reader CONSTANT POOL this interface Names new char this interfaces Count this interface Indexes new int this interfaces Count for int i 0 i this interfaces Count i this interface Indexes i u2 At class File Bytes read Offset 0 this interface Names i get Constant Class Name At class File Bytes constant Pool Offsets this interface Indexes i read Offset 2 else read Offset 2 this interfaces Count Read the this fields use exception handlers to catch bad format this fields Count u2 At class File Bytes read Offset 0 read Offset 2 this fields NO FIELD INFOS if this fields Count 0 if decoding Flags I Class File Reader FIELD INFOS I Class File Reader CONSTANT POOL Field Info field this fields new Field Info this fields Count for int i 0 i this fields Count i field new Field Info class File Bytes this constant Pool read Offset this fields i field read Offset field size In Bytes else for int i 0 i this fields Count i int attribute Count For Field u2 At class File Bytes 6 read Offset read Offset 8 if attribute Count For Field 0 for int j 0 j attribute Count For Field j int attribute Length int u4 At class File Bytes 2 read Offset read Offset 6 attribute Length Read the this methods this methods Count u2 At class File Bytes read Offset 0 read Offset 2 this methods NO METHOD INFOS if this methods Count 0 if decoding Flags I Class File Reader METHOD INFOS I Class File Reader CONSTANT POOL this methods new Method Info this methods Count Method Info method for int i 0 i this methods Count i method new Method Info class File Bytes this constant Pool read Offset decoding Flags this methods i method read Offset method size In Bytes else for int i 0 i this methods Count i int attribute Count For Method u2 At class File Bytes 6 read Offset read Offset 8 if attribute Count For Method 0 for int j 0 j attribute Count For Method j int attribute Length int u4 At class File Bytes 2 read Offset read Offset 6 attribute Length Read the attributes this attributes Count u2 At class File Bytes read Offset 0 read Offset 2 int attributes Index 0 this attributes Class File Attribute NO ATTRIBUTES if this attributes Count 0 if decoding Flags I Class File Reader CLASSFILE ATTRIBUTES I Class File Reader CONSTANT POOL this attributes new I Class File Attribute this attributes Count for int i 0 i attributes Count i int utf8 Offset constant Pool Offsets u2 At class File Bytes read Offset 0 char attribute Name utf8 At class File Bytes utf8 Offset 3 0 u2 At class File Bytes utf8 Offset 1 0 if equals attribute Name I Attribute Names Constants DEPRECATED this attributes attributes Index new Class File Attribute class File Bytes this constant Pool read Offset else if equals attribute Name I Attribute Names Constants INNER CLASSES this inner Classes Attribute new Inner Classes Attribute class File Bytes this constant Pool read Offset this attributes attributes Index this inner Classes Attribute else if equals attribute Name I Attribute Names Constants SOURCE this source File Attribute new Source File Attribute class File Bytes this constant Pool read Offset this attributes attributes Index this source File Attribute else if equals attribute Name I Attribute Names Constants SYNTHETIC this attributes attributes Index new Class File Attribute class File Bytes this constant Pool read Offset else this attributes attributes Index new Class File Attribute class File Bytes this constant Pool read Offset read Offset 6 u4 At class File Bytes read Offset 2 0 else for int i 0 i attributes Count i read Offset 6 u4 At class File Bytes read Offset 2 0 if read Offset class File Bytes length throw new Class Format Exception Class Format Exception TOO MANY BYTES catch Class Format Exception e throw e catch Exception e throw new Class Format Exception Class Format Exception ERROR TRUNCATED INPUT  ClassFileReader classFileBytes decodingFlags IClassFileReader IClassFileReader CLASSFILE_ATTRIBUTES IClassFileReader CONSTANT_POOL IClassFileReader FIELD_INFOS ClassFileReader classFileBytes decodingFlags ClassFormatException constantPool constantPoolCount constantPoolOffsets magicNumber u4At classFileBytes readOffset minorVersion u2At classFileBytes majorVersion u2At classFileBytes decodingFlags IClassFileReader CONSTANT_POOL constantPoolCount u2At classFileBytes constantPoolOffsets constantPoolCount constantPoolCount u1At classFileBytes readOffset IConstantPoolConstant CONSTANT_Utf8 constantPoolOffsets readOffset readOffset u2At classFileBytes readOffset readOffset IConstantPoolConstant CONSTANT_Utf8_SIZE IConstantPoolConstant CONSTANT_Integer constantPoolOffsets readOffset readOffset IConstantPoolConstant CONSTANT_Integer_SIZE IConstantPoolConstant CONSTANT_Float constantPoolOffsets readOffset readOffset IConstantPoolConstant CONSTANT_Float_SIZE IConstantPoolConstant CONSTANT_Long constantPoolOffsets readOffset readOffset IConstantPoolConstant CONSTANT_Long_SIZE IConstantPoolConstant CONSTANT_Double constantPoolOffsets readOffset readOffset IConstantPoolConstant CONSTANT_Double_SIZE IConstantPoolConstant CONSTANT_Class constantPoolOffsets readOffset readOffset IConstantPoolConstant CONSTANT_Class_SIZE IConstantPoolConstant CONSTANT_String constantPoolOffsets readOffset readOffset IConstantPoolConstant CONSTANT_String_SIZE IConstantPoolConstant CONSTANT_Fieldref constantPoolOffsets readOffset readOffset IConstantPoolConstant CONSTANT_Fieldref_SIZE IConstantPoolConstant CONSTANT_Methodref constantPoolOffsets readOffset readOffset IConstantPoolConstant CONSTANT_Methodref_SIZE IConstantPoolConstant CONSTANT_InterfaceMethodref constantPoolOffsets readOffset readOffset IConstantPoolConstant CONSTANT_InterfaceMethodref_SIZE IConstantPoolConstant CONSTANT_NameAndType constantPoolOffsets readOffset readOffset IConstantPoolConstant CONSTANT_NameAndType_SIZE constantPool ConstantPool classFileBytes constantPoolOffsets accessFlags u2At classFileBytes readOffset readOffset classNameIndex u2At classFileBytes readOffset className getConstantClassNameAt classFileBytes constantPoolOffsets classNameIndex readOffset superclassNameIndex u2At classFileBytes readOffset readOffset superclassNameIndex superclassName superclassNameIndex superclassName getConstantClassNameAt classFileBytes constantPoolOffsets superclassNameIndex interfacesCount u2At classFileBytes readOffset readOffset interfaceNames NO_INTERFACES_NAMES interfaceIndexes NO_INTERFACE_INDEXES interfacesCount decodingFlags IClassFileReader SUPER_INTERFACES IClassFileReader CONSTANT_POOL interfaceNames interfacesCount interfaceIndexes interfacesCount interfacesCount interfaceIndexes u2At classFileBytes readOffset interfaceNames getConstantClassNameAt classFileBytes constantPoolOffsets interfaceIndexes readOffset readOffset interfacesCount fieldsCount u2At classFileBytes readOffset readOffset NO_FIELD_INFOS fieldsCount decodingFlags IClassFileReader FIELD_INFOS IClassFileReader CONSTANT_POOL FieldInfo FieldInfo fieldsCount fieldsCount FieldInfo classFileBytes constantPool readOffset readOffset sizeInBytes fieldsCount attributeCountForField u2At classFileBytes readOffset readOffset attributeCountForField attributeCountForField attributeLength u4At classFileBytes readOffset readOffset attributeLength methodsCount u2At classFileBytes readOffset readOffset NO_METHOD_INFOS methodsCount decodingFlags IClassFileReader METHOD_INFOS IClassFileReader CONSTANT_POOL MethodInfo methodsCount MethodInfo methodsCount MethodInfo classFileBytes constantPool readOffset decodingFlags readOffset sizeInBytes methodsCount attributeCountForMethod u2At classFileBytes readOffset readOffset attributeCountForMethod attributeCountForMethod attributeLength u4At classFileBytes readOffset readOffset attributeLength attributesCount u2At classFileBytes readOffset readOffset attributesIndex ClassFileAttribute NO_ATTRIBUTES attributesCount decodingFlags IClassFileReader CLASSFILE_ATTRIBUTES IClassFileReader CONSTANT_POOL IClassFileAttribute attributesCount attributesCount utf8Offset constantPoolOffsets u2At classFileBytes readOffset attributeName utf8At classFileBytes utf8Offset u2At classFileBytes utf8Offset attributeName IAttributeNamesConstants attributesIndex ClassFileAttribute classFileBytes constantPool readOffset attributeName IAttributeNamesConstants INNER_CLASSES innerClassesAttribute InnerClassesAttribute classFileBytes constantPool readOffset attributesIndex innerClassesAttribute attributeName IAttributeNamesConstants sourceFileAttribute SourceFileAttribute classFileBytes constantPool readOffset attributesIndex sourceFileAttribute attributeName IAttributeNamesConstants attributesIndex ClassFileAttribute classFileBytes constantPool readOffset attributesIndex ClassFileAttribute classFileBytes constantPool readOffset readOffset u4At classFileBytes readOffset attributesCount readOffset u4At classFileBytes readOffset readOffset classFileBytes ClassFormatException ClassFormatException TOO_MANY_BYTES ClassFormatException ClassFormatException ClassFormatException ERROR_TRUNCATED_INPUT
see I Class File Reader get Access Flags public int get Access Flags return this access Flags  IClassFileReader getAccessFlags getAccessFlags accessFlags
see I Class File Reader get Source File Attribute public I Source Attribute get Source File Attribute return this source File Attribute  IClassFileReader getSourceFileAttribute ISourceAttribute getSourceFileAttribute sourceFileAttribute
see I Class File Reader get Constant Pool public I Constant Pool get Constant Pool return this constant Pool  IClassFileReader getConstantPool IConstantPool getConstantPool constantPool
see I Class File Reader get Field Infos public I Field Info get Field Infos return this fields  IClassFileReader getFieldInfos IFieldInfo getFieldInfos
see I Class File Reader get Inner Classes Attribute public I Inner Classes Attribute get Inner Classes Attribute return this inner Classes Attribute  IClassFileReader getInnerClassesAttribute IInnerClassesAttribute getInnerClassesAttribute innerClassesAttribute
see I Class File Reader get Interface Names public char get Interface Names return this interface Names  IClassFileReader getInterfaceNames getInterfaceNames interfaceNames
see I Class File Reader get Method Infos public I Method Info get Method Infos return this methods  IClassFileReader getMethodInfos IMethodInfo getMethodInfos
see I Class File Reader get Class Name public char get Class Name return this class Name  IClassFileReader getClassName getClassName className
see I Class File Reader get Superclass Name public char get Superclass Name return this superclass Name  IClassFileReader getSuperclassName getSuperclassName superclassName
see I Class File Reader is Class public boolean is Class return is Interface  IClassFileReader isClass isClass isInterface
see I Class File Reader is Interface public boolean is Interface return get Access Flags I Modifier Constants ACC INTERFACE 0  IClassFileReader isInterface isInterface getAccessFlags IModifierConstants ACC_INTERFACE
see I Class File Reader get Major Version public int get Major Version return this major Version  IClassFileReader getMajorVersion getMajorVersion majorVersion
see I Class File Reader get Minor Version public int get Minor Version return this minor Version  IClassFileReader getMinorVersion getMinorVersion minorVersion
private char get Constant Class Name At byte class File Bytes int constant Pool Offsets int constant Pool Index int utf8 Offset constant Pool Offsets u2 At class File Bytes constant Pool Offsets constant Pool Index 1 0 return utf8 At class File Bytes utf8 Offset 3 0 u2 At class File Bytes utf8 Offset 1 0  getConstantClassNameAt classFileBytes constantPoolOffsets constantPoolIndex utf8Offset constantPoolOffsets u2At classFileBytes constantPoolOffsets constantPoolIndex utf8At classFileBytes utf8Offset u2At classFileBytes utf8Offset
see I Class File Reader get Attribute Count public int get Attribute Count return this attributes Count  IClassFileReader getAttributeCount getAttributeCount attributesCount
see I Class File Reader get Class Index public int get Class Index return this class Name Index  IClassFileReader getClassIndex getClassIndex classNameIndex
see I Class File Reader get Interface Indexes public int get Interface Indexes return this interface Indexes  IClassFileReader getInterfaceIndexes getInterfaceIndexes interfaceIndexes
see I Class File Reader get Superclass Index public int get Superclass Index return this superclass Name Index  IClassFileReader getSuperclassIndex getSuperclassIndex superclassNameIndex
see I Class File Reader get Magic public int get Magic return this magic Number  IClassFileReader getMagic getMagic magicNumber
see I Class File Reader get Fields Count public int get Fields Count return this fields Count  IClassFileReader getFieldsCount getFieldsCount fieldsCount
see I Class File Reader get Methods Count public int get Methods Count return this methods Count  IClassFileReader getMethodsCount getMethodsCount methodsCount
see I Class File Reader get Attributes public I Class File Attribute get Attributes return this attributes  IClassFileReader getAttributes IClassFileAttribute getAttributes

public abstract class Class File Struct protected double double At byte reference int relative Offset int struct Offset return Double long Bits To Double this i8 At reference relative Offset struct Offset  ClassFileStruct doubleAt relativeOffset structOffset longBitsToDouble i8At relativeOffset structOffset
protected float float At byte reference int relative Offset int struct Offset return Float int Bits To Float this i4 At reference relative Offset struct Offset  floatAt relativeOffset structOffset intBitsToFloat i4At relativeOffset structOffset
return Float int Bits To Float this i4 At reference relative Offset struct Offset protected int i1 At byte reference int relative Offset int struct Offset return reference relative Offset struct Offset  intBitsToFloat i4At relativeOffset structOffset i1At relativeOffset structOffset relativeOffset structOffset
return reference relative Offset struct Offset protected int i2 At byte reference int relative Offset int struct Offset int position relative Offset struct Offset return reference position 8 reference position 0xFF  relativeOffset structOffset i2At relativeOffset structOffset relativeOffset structOffset
protected int i4 At byte reference int relative Offset int struct Offset int position relative Offset struct Offset return reference position 0xFF 24 reference position 0xFF 16 reference position 0xFF 8 reference position 0xFF  i4At relativeOffset structOffset relativeOffset structOffset
protected long i8 At byte reference int relative Offset int struct Offset int position relative Offset struct Offset return long reference position 0xFF 56 long reference position 0xFF 48 long reference position 0xFF 40 long reference position 0xFF 32 long reference position 0xFF 24 long reference position 0xFF 16 long reference position 0xFF 8 reference position 0xFF  i8At relativeOffset structOffset relativeOffset structOffset
protected int u1 At byte reference int relative Offset int struct Offset return reference relative Offset struct Offset 0xFF  u1At relativeOffset structOffset relativeOffset structOffset
return reference relative Offset struct Offset 0xFF protected int u2 At byte reference int relative Offset int struct Offset int position relative Offset struct Offset return reference position 0xFF 8 reference position 0xFF  relativeOffset structOffset u2At relativeOffset structOffset relativeOffset structOffset
protected long u4 At byte reference int relative Offset int struct Offset int position relative Offset struct Offset return reference position 0xFFL 24 reference position 0xFF 16 reference position 0xFF 8 reference position 0xFF  u4At relativeOffset structOffset relativeOffset structOffset
protected char utf8 At byte reference int relative Offset int struct Offset int bytes Available int length bytes Available char output Buf new char bytes Available int output Pos 0 int read Offset struct Offset relative Offset while length 0 int x reference read Offset 0xFF length if 0x80 x 0 if x 0x20 0 length 2 x x 0xF 12 reference read Offset 0x3F 6 reference read Offset 0x3F else length x x 0x1F 6 reference read Offset 0x3F output Buf output Pos char x if output Pos bytes Available System arraycopy output Buf 0 output Buf new char output Pos 0 output Pos return output Buf  utf8At relativeOffset structOffset bytesAvailable bytesAvailable outputBuf bytesAvailable outputPos readOffset structOffset relativeOffset readOffset readOffset readOffset readOffset outputBuf outputPos outputPos bytesAvailable outputBuf outputBuf outputPos outputPos outputBuf
final boolean equals char first char second if first second return true if first null second null return false if first length second length return false for int i first length i 0 if first i second i return false return true 

Code Attribute byte class File Bytes I Constant Pool constant Pool int offset throws Class Format Exception super class File Bytes constant Pool offset this class File Bytes class File Bytes this constant Pool constant Pool this max Stack u2 At class File Bytes 6 offset this max Locals u2 At class File Bytes 8 offset this code Length u4 At class File Bytes 10 offset this code Offset offset 14 int read Offset int 14 this code Length this exception Table Length u2 At class File Bytes read Offset offset read Offset 2 this exception Table Entries NO EXCEPTION TABLE if this exception Table Length 0 this exception Table Entries new Exception Table Entry this exception Table Length for int i 0 i this exception Table Length i this exception Table Entries i new Exception Table Entry class File Bytes constant Pool offset read Offset read Offset 8 this attributes Count u2 At class File Bytes read Offset offset this attributes Class File Attribute NO ATTRIBUTES if this attributes Count 0 this attributes new I Class File Attribute this attributes Count int attributes Index 0 read Offset 2 for int i 0 i this attributes Count i I Constant Pool Entry constant Pool Entry constant Pool decode Entry u2 At class File Bytes read Offset offset if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Utf8 throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY char attribute Name constant Pool Entry get Utf8 Value if equals attribute Name I Attribute Names Constants LINE NUMBER this line Number Attribute new Line Number Attribute class File Bytes constant Pool offset read Offset this attributes attributes Index this line Number Attribute else if equals attribute Name I Attribute Names Constants LOCAL VARIABLE this local Variable Attribute new Local Variable Attribute class File Bytes constant Pool offset read Offset this attributes attributes Index this local Variable Attribute else this attributes attributes Index new Class File Attribute class File Bytes constant Pool offset read Offset read Offset 6 u4 At class File Bytes read Offset 2 offset  CodeAttribute classFileBytes IConstantPool constantPool ClassFormatException classFileBytes constantPool classFileBytes classFileBytes constantPool constantPool maxStack u2At classFileBytes maxLocals u2At classFileBytes codeLength u4At classFileBytes codeOffset readOffset codeLength exceptionTableLength u2At classFileBytes readOffset readOffset exceptionTableEntries NO_EXCEPTION_TABLE exceptionTableLength exceptionTableEntries ExceptionTableEntry exceptionTableLength exceptionTableLength exceptionTableEntries ExceptionTableEntry classFileBytes constantPool readOffset readOffset attributesCount u2At classFileBytes readOffset ClassFileAttribute NO_ATTRIBUTES attributesCount IClassFileAttribute attributesCount attributesIndex readOffset attributesCount IConstantPoolEntry constantPoolEntry constantPool decodeEntry u2At classFileBytes readOffset constantPoolEntry getKind IConstantPoolConstant CONSTANT_Utf8 ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY attributeName constantPoolEntry getUtf8Value attributeName IAttributeNamesConstants LINE_NUMBER lineNumberAttribute LineNumberAttribute classFileBytes constantPool readOffset attributesIndex lineNumberAttribute attributeName IAttributeNamesConstants LOCAL_VARIABLE localVariableAttribute LocalVariableAttribute classFileBytes constantPool readOffset attributesIndex localVariableAttribute attributesIndex ClassFileAttribute classFileBytes constantPool readOffset readOffset u4At classFileBytes readOffset
see I Code Attribute get Max Locals public int get Max Locals return this max Locals  ICodeAttribute getMaxLocals getMaxLocals maxLocals
see I Code Attribute get Max Stack public int get Max Stack return this max Stack  ICodeAttribute getMaxStack getMaxStack maxStack
see I Code Attribute get Line Number Attribute public I Line Number Attribute get Line Number Attribute return this line Number Attribute  ICodeAttribute getLineNumberAttribute ILineNumberAttribute getLineNumberAttribute lineNumberAttribute
see I Code Attribute get Local Variable Attribute public I Local Variable Attribute get Local Variable Attribute return this local Variable Attribute  ICodeAttribute getLocalVariableAttribute ILocalVariableAttribute getLocalVariableAttribute localVariableAttribute
see I Code Attribute get Bytecodes public byte get Bytecodes if this bytecodes null System arraycopy this class File Bytes this code Offset this bytecodes new byte int this code Length 0 int this code Length return this bytecodes  ICodeAttribute getBytecodes getBytecodes classFileBytes codeOffset codeLength codeLength
see I Code Attribute traverse I Bytecode Visitor visitor public void traverse I Bytecode Visitor visitor throws Class Format Exception int pc this code Offset int opcode index  const branch Offset I Constant Pool Entry constant Pool Entry while true opcode u1 At this class File Bytes 0 pc switch opcode case I Opcode Mnemonics NOP visitor  nop pc this code Offset pc break case I Opcode Mnemonics ACONST NULL visitor  aconst null pc this code Offset pc break case I Opcode Mnemonics ICONST M1 visitor  iconst m1 pc this code Offset pc break case I Opcode Mnemonics ICONST 0 visitor  iconst 0 pc this code Offset pc break case I Opcode Mnemonics ICONST 1 visitor  iconst 1 pc this code Offset pc break case I Opcode Mnemonics ICONST 2 visitor  iconst 2 pc this code Offset pc break case I Opcode Mnemonics ICONST 3 visitor  iconst 3 pc this code Offset pc break case I Opcode Mnemonics ICONST 4 visitor  iconst 4 pc this code Offset pc break case I Opcode Mnemonics ICONST 5 visitor  iconst 5 pc this code Offset pc break case I Opcode Mnemonics LCONST 0 visitor  lconst 0 pc this code Offset pc break case I Opcode Mnemonics LCONST 1 visitor  lconst 1 pc this code Offset pc break case I Opcode Mnemonics FCONST 0 visitor  fconst 0 pc this code Offset pc break case I Opcode Mnemonics FCONST 1 visitor  fconst 1 pc this code Offset pc break case I Opcode Mnemonics FCONST 2 visitor  fconst 2 pc this code Offset pc break case I Opcode Mnemonics DCONST 0 visitor  dconst 0 pc this code Offset pc break case I Opcode Mnemonics DCONST 1 visitor  dconst 1 pc this code Offset pc break case I Opcode Mnemonics BIPUSH visitor  bipush pc this code Offset byte i1 At this class File Bytes 1 pc pc 2 break case I Opcode Mnemonics SIPUSH visitor  sipush pc this code Offset short i2 At this class File Bytes 1 pc pc 3 break case I Opcode Mnemonics LDC index u1 At this class File Bytes 1 pc constant Pool Entry this constant Pool decode Entry index if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Float constant Pool Entry get Kind I Constant Pool Constant CONSTANT Integer constant Pool Entry get Kind I Constant Pool Constant CONSTANT String throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY visitor  ldc pc this code Offset index constant Pool Entry pc 2 break case I Opcode Mnemonics LDC W index u2 At this class File Bytes 1 pc constant Pool Entry this constant Pool decode Entry index if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Float constant Pool Entry get Kind I Constant Pool Constant CONSTANT Integer constant Pool Entry get Kind I Constant Pool Constant CONSTANT String constant Pool Entry get Kind I Constant Pool Constant CONSTANT Class throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY visitor  ldc w pc this code Offset index constant Pool Entry pc 3 break case I Opcode Mnemonics LDC2 W index u2 At this class File Bytes 1 pc constant Pool Entry this constant Pool decode Entry index if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Double constant Pool Entry get Kind I Constant Pool Constant CONSTANT Long throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY visitor  ldc2 w pc this code Offset index constant Pool Entry pc 3 break case I Opcode Mnemonics ILOAD index u1 At this class File Bytes 1 pc visitor  iload pc this code Offset index pc 2 break case I Opcode Mnemonics LLOAD index u1 At this class File Bytes 1 pc visitor  lload pc this code Offset index pc 2 break case I Opcode Mnemonics FLOAD index u1 At this class File Bytes 1 pc visitor  fload pc this code Offset index pc 2 break case I Opcode Mnemonics DLOAD index u1 At this class File Bytes 1 pc visitor  dload pc this code Offset index pc 2 break case I Opcode Mnemonics ALOAD index u1 At this class File Bytes 1 pc visitor  aload pc this code Offset index pc 2 break case I Opcode Mnemonics ILOAD 0 visitor  iload 0 pc this code Offset pc break case I Opcode Mnemonics ILOAD 1 visitor  iload 1 pc this code Offset pc break case I Opcode Mnemonics ILOAD 2 visitor  iload 2 pc this code Offset pc break case I Opcode Mnemonics ILOAD 3 visitor  iload 3 pc this code Offset pc break case I Opcode Mnemonics LLOAD 0 visitor  lload 0 pc this code Offset pc break case I Opcode Mnemonics LLOAD 1 visitor  lload 1 pc this code Offset pc break case I Opcode Mnemonics LLOAD 2 visitor  lload 2 pc this code Offset pc break case I Opcode Mnemonics LLOAD 3 visitor  lload 3 pc this code Offset pc break case I Opcode Mnemonics FLOAD 0 visitor  fload 0 pc this code Offset pc break case I Opcode Mnemonics FLOAD 1 visitor  fload 1 pc this code Offset pc break case I Opcode Mnemonics FLOAD 2 visitor  fload 2 pc this code Offset pc break case I Opcode Mnemonics FLOAD 3 visitor  fload 3 pc this code Offset pc break case I Opcode Mnemonics DLOAD 0 visitor  dload 0 pc this code Offset pc break case I Opcode Mnemonics DLOAD 1 visitor  dload 1 pc this code Offset pc break case I Opcode Mnemonics DLOAD 2 visitor  dload 2 pc this code Offset pc break case I Opcode Mnemonics DLOAD 3 visitor  dload 3 pc this code Offset pc break case I Opcode Mnemonics ALOAD 0 visitor  aload 0 pc this code Offset pc break case I Opcode Mnemonics ALOAD 1 visitor  aload 1 pc this code Offset pc break case I Opcode Mnemonics ALOAD 2 visitor  aload 2 pc this code Offset pc break case I Opcode Mnemonics ALOAD 3 visitor  aload 3 pc this code Offset pc break case I Opcode Mnemonics IALOAD visitor  iaload pc this code Offset pc break case I Opcode Mnemonics LALOAD visitor  laload pc this code Offset pc break case I Opcode Mnemonics FALOAD visitor  faload pc this code Offset pc break case I Opcode Mnemonics DALOAD visitor  daload pc this code Offset pc break case I Opcode Mnemonics AALOAD visitor  aaload pc this code Offset pc break case I Opcode Mnemonics BALOAD visitor  baload pc this code Offset pc break case I Opcode Mnemonics CALOAD visitor  caload pc this code Offset pc break case I Opcode Mnemonics SALOAD visitor  saload pc this code Offset pc break case I Opcode Mnemonics ISTORE index u1 At this class File Bytes 1 pc visitor  istore pc this code Offset index pc 2 break case I Opcode Mnemonics LSTORE index u1 At this class File Bytes 1 pc visitor  lstore pc this code Offset index pc 2 break case I Opcode Mnemonics FSTORE index u1 At this class File Bytes 1 pc visitor  fstore pc this code Offset index pc 2 break case I Opcode Mnemonics DSTORE index u1 At this class File Bytes 1 pc visitor  dstore pc this code Offset index pc 2 break case I Opcode Mnemonics ASTORE index u1 At this class File Bytes 1 pc visitor  astore pc this code Offset index pc 2 break case I Opcode Mnemonics ISTORE 0 visitor  istore 0 pc this code Offset pc break case I Opcode Mnemonics ISTORE 1 visitor  istore 1 pc this code Offset pc break case I Opcode Mnemonics ISTORE 2 visitor  istore 2 pc this code Offset pc break case I Opcode Mnemonics ISTORE 3 visitor  istore 3 pc this code Offset pc break case I Opcode Mnemonics LSTORE 0 visitor  lstore 0 pc this code Offset pc break case I Opcode Mnemonics LSTORE 1 visitor  lstore 1 pc this code Offset pc break case I Opcode Mnemonics LSTORE 2 visitor  lstore 2 pc this code Offset pc break case I Opcode Mnemonics LSTORE 3 visitor  lstore 3 pc this code Offset pc break case I Opcode Mnemonics FSTORE 0 visitor  fstore 0 pc this code Offset pc break case I Opcode Mnemonics FSTORE 1 visitor  fstore 1 pc this code Offset pc break case I Opcode Mnemonics FSTORE 2 visitor  fstore 2 pc this code Offset pc break case I Opcode Mnemonics FSTORE 3 visitor  fstore 3 pc this code Offset pc break case I Opcode Mnemonics DSTORE 0 visitor  dstore 0 pc this code Offset pc break case I Opcode Mnemonics DSTORE 1 visitor  dstore 1 pc this code Offset pc break case I Opcode Mnemonics DST ICodeAttribute IBytecodeVisitor IBytecodeVisitor ClassFormatException codeOffset _const branchOffset IConstantPoolEntry constantPoolEntry u1At classFileBytes IOpcodeMnemonics _nop codeOffset IOpcodeMnemonics ACONST_NULL _aconst_null codeOffset IOpcodeMnemonics ICONST_M1 _iconst_m1 codeOffset IOpcodeMnemonics ICONST_0 _iconst_0 codeOffset IOpcodeMnemonics ICONST_1 _iconst_1 codeOffset IOpcodeMnemonics ICONST_2 _iconst_2 codeOffset IOpcodeMnemonics ICONST_3 _iconst_3 codeOffset IOpcodeMnemonics ICONST_4 _iconst_4 codeOffset IOpcodeMnemonics ICONST_5 _iconst_5 codeOffset IOpcodeMnemonics LCONST_0 _lconst_0 codeOffset IOpcodeMnemonics LCONST_1 _lconst_1 codeOffset IOpcodeMnemonics FCONST_0 _fconst_0 codeOffset IOpcodeMnemonics FCONST_1 _fconst_1 codeOffset IOpcodeMnemonics FCONST_2 _fconst_2 codeOffset IOpcodeMnemonics DCONST_0 _dconst_0 codeOffset IOpcodeMnemonics DCONST_1 _dconst_1 codeOffset IOpcodeMnemonics _bipush codeOffset i1At classFileBytes IOpcodeMnemonics _sipush codeOffset i2At classFileBytes IOpcodeMnemonics u1At classFileBytes constantPoolEntry constantPool decodeEntry constantPoolEntry getKind IConstantPoolConstant CONSTANT_Float constantPoolEntry getKind IConstantPoolConstant CONSTANT_Integer constantPoolEntry getKind IConstantPoolConstant CONSTANT_String ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY _ldc codeOffset constantPoolEntry IOpcodeMnemonics LDC_W u2At classFileBytes constantPoolEntry constantPool decodeEntry constantPoolEntry getKind IConstantPoolConstant CONSTANT_Float constantPoolEntry getKind IConstantPoolConstant CONSTANT_Integer constantPoolEntry getKind IConstantPoolConstant CONSTANT_String constantPoolEntry getKind IConstantPoolConstant CONSTANT_Class ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY _ldc_w codeOffset constantPoolEntry IOpcodeMnemonics LDC2_W u2At classFileBytes constantPoolEntry constantPool decodeEntry constantPoolEntry getKind IConstantPoolConstant CONSTANT_Double constantPoolEntry getKind IConstantPoolConstant CONSTANT_Long ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY _ldc2_w codeOffset constantPoolEntry IOpcodeMnemonics u1At classFileBytes _iload codeOffset IOpcodeMnemonics u1At classFileBytes _lload codeOffset IOpcodeMnemonics u1At classFileBytes _fload codeOffset IOpcodeMnemonics u1At classFileBytes _dload codeOffset IOpcodeMnemonics u1At classFileBytes _aload codeOffset IOpcodeMnemonics ILOAD_0 _iload_0 codeOffset IOpcodeMnemonics ILOAD_1 _iload_1 codeOffset IOpcodeMnemonics ILOAD_2 _iload_2 codeOffset IOpcodeMnemonics ILOAD_3 _iload_3 codeOffset IOpcodeMnemonics LLOAD_0 _lload_0 codeOffset IOpcodeMnemonics LLOAD_1 _lload_1 codeOffset IOpcodeMnemonics LLOAD_2 _lload_2 codeOffset IOpcodeMnemonics LLOAD_3 _lload_3 codeOffset IOpcodeMnemonics FLOAD_0 _fload_0 codeOffset IOpcodeMnemonics FLOAD_1 _fload_1 codeOffset IOpcodeMnemonics FLOAD_2 _fload_2 codeOffset IOpcodeMnemonics FLOAD_3 _fload_3 codeOffset IOpcodeMnemonics DLOAD_0 _dload_0 codeOffset IOpcodeMnemonics DLOAD_1 _dload_1 codeOffset IOpcodeMnemonics DLOAD_2 _dload_2 codeOffset IOpcodeMnemonics DLOAD_3 _dload_3 codeOffset IOpcodeMnemonics ALOAD_0 _aload_0 codeOffset IOpcodeMnemonics ALOAD_1 _aload_1 codeOffset IOpcodeMnemonics ALOAD_2 _aload_2 codeOffset IOpcodeMnemonics ALOAD_3 _aload_3 codeOffset IOpcodeMnemonics _iaload codeOffset IOpcodeMnemonics _laload codeOffset IOpcodeMnemonics _faload codeOffset IOpcodeMnemonics _daload codeOffset IOpcodeMnemonics _aaload codeOffset IOpcodeMnemonics _baload codeOffset IOpcodeMnemonics _caload codeOffset IOpcodeMnemonics _saload codeOffset IOpcodeMnemonics u1At classFileBytes _istore codeOffset IOpcodeMnemonics u1At classFileBytes _lstore codeOffset IOpcodeMnemonics u1At classFileBytes _fstore codeOffset IOpcodeMnemonics u1At classFileBytes _dstore codeOffset IOpcodeMnemonics u1At classFileBytes _astore codeOffset IOpcodeMnemonics ISTORE_0 _istore_0 codeOffset IOpcodeMnemonics ISTORE_1 _istore_1 codeOffset IOpcodeMnemonics ISTORE_2 _istore_2 codeOffset IOpcodeMnemonics ISTORE_3 _istore_3 codeOffset IOpcodeMnemonics LSTORE_0 _lstore_0 codeOffset IOpcodeMnemonics LSTORE_1 _lstore_1 codeOffset IOpcodeMnemonics LSTORE_2 _lstore_2 codeOffset IOpcodeMnemonics LSTORE_3 _lstore_3 codeOffset IOpcodeMnemonics FSTORE_0 _fstore_0 codeOffset IOpcodeMnemonics FSTORE_1 _fstore_1 codeOffset IOpcodeMnemonics FSTORE_2 _fstore_2 codeOffset IOpcodeMnemonics FSTORE_3 _fstore_3 codeOffset IOpcodeMnemonics DSTORE_0 _dstore_0 codeOffset IOpcodeMnemonics DSTORE_1 _dstore_1 codeOffset IOpcodeMnemonics
see I Code Attribute get Exception Table public I Exception Table Entry get Exception Table return this exception Table Entries  ICodeAttribute getExceptionTable IExceptionTableEntry getExceptionTable exceptionTableEntries
see I Code Attribute get Attributes Count public int get Attributes Count return this attributes Count  ICodeAttribute getAttributesCount getAttributesCount attributesCount
see I Code Attribute get Code Length public long get Code Length return this code Length  ICodeAttribute getCodeLength getCodeLength codeLength
see I Code Attribute get Exception Table Length public int get Exception Table Length return this exception Table Length  ICodeAttribute getExceptionTableLength getExceptionTableLength exceptionTableLength
see I Class File Attribute get Attribute Name public char get Attribute Name return I Attribute Names Constants CODE  IClassFileAttribute getAttributeName getAttributeName IAttributeNamesConstants
see I Code Attribute get Attributes public I Class File Attribute get Attributes return this attributes  ICodeAttribute getAttributes IClassFileAttribute getAttributes

private Recorded Parsing Information get Recorded Parsing Information Compilation Result compilation Result Comment Recorder Parser parser int problems Count compilation Result problem Count I Problem problems null if problems Count 0 final I Problem compilation Result Problems compilation Result problems if compilation Result Problems length problems Count problems compilation Result Problems else System arraycopy compilation Result Problems 0 problems new I Problem problems Count 0 problems Count return new Recorded Parsing Information problems compilation Result line Separator Positions parser get Comments Positions  RecordedParsingInformation getRecordedParsingInformation CompilationResult compilationResult CommentRecorderParser problemsCount compilationResult problemCount IProblem problemsCount IProblem compilationResultProblems compilationResult compilationResultProblems problemsCount compilationResultProblems compilationResultProblems IProblem problemsCount problemsCount RecordedParsingInformation compilationResult lineSeparatorPositions getCommentsPositions
public AST Node parse Class Body Declarations char source Map settings boolean record Parsing Information return parse Class Body Declarations source 0 source length settings record Parsing Information  ASTNode parseClassBodyDeclarations recordParsingInformation parseClassBodyDeclarations recordParsingInformation
public AST Node parse Class Body Declarations char source int offset int length Map settings boolean record Parsing Information if source null throw new Illegal Argument Exception Compiler Options compiler Options new Compiler Options settings final Problem Reporter problem Reporter new Problem Reporter Default Error Handling Policies proceed With All Problems compiler Options new Default Problem Factory Locale get Default Comment Recorder Parser parser new Comment Recorder Parser problem Reporter false I Compilation Unit source Unit new Compilation Unit source NON NLS 1 compiler Options default Encoding Compilation Result compilation Result new Compilation Result source Unit 0 0 compiler Options max Problems Per Unit final Compilation Unit Declaration compilation Unit Declaration new Compilation Unit Declaration problem Reporter compilation Result source length AST Node result parser parse Class Body Declarations source offset length compilation Unit Declaration if record Parsing Information this recorded Parsing Information get Recorded Parsing Information compilation Result parser return result  ASTNode parseClassBodyDeclarations recordParsingInformation IllegalArgumentException CompilerOptions compilerOptions CompilerOptions ProblemReporter problemReporter ProblemReporter DefaultErrorHandlingPolicies proceedWithAllProblems compilerOptions DefaultProblemFactory getDefault CommentRecorderParser CommentRecorderParser problemReporter ICompilationUnit sourceUnit CompilationUnit compilerOptions defaultEncoding CompilationResult compilationResult CompilationResult sourceUnit compilerOptions maxProblemsPerUnit CompilationUnitDeclaration compilationUnitDeclaration CompilationUnitDeclaration problemReporter compilationResult ASTNode parseClassBodyDeclarations compilationUnitDeclaration recordParsingInformation recordedParsingInformation getRecordedParsingInformation compilationResult
public Compilation Unit Declaration parse Compilation Unit char source Map settings boolean record Parsing Information if source null throw new Illegal Argument Exception Compiler Options compiler Options new Compiler Options settings Comment Recorder Parser parser new Comment Recorder Parser new Problem Reporter Default Error Handling Policies proceed With All Problems compiler Options new Default Problem Factory Locale get Default false I Compilation Unit source Unit new Compilation Unit source NON NLS 1 compiler Options default Encoding final Compilation Result compilation Result new Compilation Result source Unit 0 0 compiler Options max Problems Per Unit Compilation Unit Declaration compilation Unit Declaration parser diet Parse source Unit compilation Result if record Parsing Information this recorded Parsing Information get Recorded Parsing Information compilation Result parser if compilation Unit Declaration ignore Method Bodies compilation Unit Declaration ignore Further Investigation true if initial diet parse did not work no need to dig into method bodies return compilation Unit Declaration fill the methods bodies in order for the code to be generated real parse of the method parser scanner set Source source org eclipse jdt internal compiler ast Type Declaration types compilation Unit Declaration types if types null for int i types length i 0 types i parse Method parser compilation Unit Declaration if record Parsing Information this recorded Parsing Information update Recorded Parsing Information compilation Result return compilation Unit Declaration  CompilationUnitDeclaration parseCompilationUnit recordParsingInformation IllegalArgumentException CompilerOptions compilerOptions CompilerOptions CommentRecorderParser CommentRecorderParser ProblemReporter DefaultErrorHandlingPolicies proceedWithAllProblems compilerOptions DefaultProblemFactory getDefault ICompilationUnit sourceUnit CompilationUnit compilerOptions defaultEncoding CompilationResult compilationResult CompilationResult sourceUnit compilerOptions maxProblemsPerUnit CompilationUnitDeclaration compilationUnitDeclaration dietParse sourceUnit compilationResult recordParsingInformation recordedParsingInformation getRecordedParsingInformation compilationResult compilationUnitDeclaration ignoreMethodBodies compilationUnitDeclaration ignoreFurtherInvestigation compilationUnitDeclaration setSource TypeDeclaration compilationUnitDeclaration parseMethod compilationUnitDeclaration recordParsingInformation recordedParsingInformation updateRecordedParsingInformation compilationResult compilationUnitDeclaration
public Expression parse Expression char source Map settings boolean record Parsing Information return parse Expression source 0 source length settings record Parsing Information  parseExpression recordParsingInformation parseExpression recordParsingInformation
public Expression parse Expression char source int offset int length Map settings boolean record Parsing Information if source null throw new Illegal Argument Exception Compiler Options compiler Options new Compiler Options settings final Problem Reporter problem Reporter new Problem Reporter Default Error Handling Policies proceed With All Problems compiler Options new Default Problem Factory Locale get Default Comment Recorder Parser parser new Comment Recorder Parser problem Reporter false I Compilation Unit source Unit new Compilation Unit source NON NLS 1 compiler Options default Encoding Compilation Result compilation Result new Compilation Result source Unit 0 0 compiler Options max Problems Per Unit Expression result parser parse Expression source offset length new Compilation Unit Declaration problem Reporter compilation Result source length if record Parsing Information this recorded Parsing Information get Recorded Parsing Information compilation Result parser return result  parseExpression recordParsingInformation IllegalArgumentException CompilerOptions compilerOptions CompilerOptions ProblemReporter problemReporter ProblemReporter DefaultErrorHandlingPolicies proceedWithAllProblems compilerOptions DefaultProblemFactory getDefault CommentRecorderParser CommentRecorderParser problemReporter ICompilationUnit sourceUnit CompilationUnit compilerOptions defaultEncoding CompilationResult compilationResult CompilationResult sourceUnit compilerOptions maxProblemsPerUnit parseExpression CompilationUnitDeclaration problemReporter compilationResult recordParsingInformation recordedParsingInformation getRecordedParsingInformation compilationResult
public Constructor Declaration parse Statements char source Map settings boolean record Parsing Information return parse Statements source 0 source length settings record Parsing Information  ConstructorDeclaration parseStatements recordParsingInformation parseStatements recordParsingInformation
public Constructor Declaration parse Statements char source int offset int length Map settings boolean record Parsing Information if source null throw new Illegal Argument Exception Compiler Options compiler Options new Compiler Options settings final Problem Reporter problem Reporter new Problem Reporter Default Error Handling Policies proceed With All Problems compiler Options new Default Problem Factory Locale get Default Comment Recorder Parser parser new Comment Recorder Parser problem Reporter false I Compilation Unit source Unit new Compilation Unit source NON NLS 1 compiler Options default Encoding final Compilation Result compilation Result new Compilation Result source Unit 0 0 compiler Options max Problems Per Unit Compilation Unit Declaration compilation Unit Declaration new Compilation Unit Declaration problem Reporter compilation Result length Constructor Declaration constructor Declaration new Constructor Declaration compilation Result constructor Declaration source End 1 constructor Declaration declaration Source End offset length 1 constructor Declaration body Start offset constructor Declaration body End offset length 1 parser scanner set Source source parser scanner reset To offset offset length parser parse constructor Declaration compilation Unit Declaration true if record Parsing Information this recorded Parsing Information get Recorded Parsing Information compilation Result parser return constructor Declaration  ConstructorDeclaration parseStatements recordParsingInformation IllegalArgumentException CompilerOptions compilerOptions CompilerOptions ProblemReporter problemReporter ProblemReporter DefaultErrorHandlingPolicies proceedWithAllProblems compilerOptions DefaultProblemFactory getDefault CommentRecorderParser CommentRecorderParser problemReporter ICompilationUnit sourceUnit CompilationUnit compilerOptions defaultEncoding CompilationResult compilationResult CompilationResult sourceUnit compilerOptions maxProblemsPerUnit CompilationUnitDeclaration compilationUnitDeclaration CompilationUnitDeclaration problemReporter compilationResult ConstructorDeclaration constructorDeclaration ConstructorDeclaration compilationResult constructorDeclaration sourceEnd constructorDeclaration declarationSourceEnd constructorDeclaration bodyStart constructorDeclaration bodyEnd setSource resetTo constructorDeclaration compilationUnitDeclaration recordParsingInformation recordedParsingInformation getRecordedParsingInformation compilationResult constructorDeclaration

param problem Reporter param optimize String Literals public Comment Recorder Parser Problem Reporter problem Reporter boolean optimize String Literals super problem Reporter optimize String Literals  problemReporter optimizeStringLiterals CommentRecorderParser ProblemReporter problemReporter optimizeStringLiterals problemReporter optimizeStringLiterals
for backward compatibility with 2 1 DOM public void check Comment if this current Element null this scanner comment Ptr 0 flush Comments Defined Prior To this end Statement Position discard obsolete comments boolean deprecated false boolean check Deprecated false int last Comment Index 1 since jdk1 2 look only in the last java doc comment next Comment for last Comment Index this scanner comment Ptr last Comment Index 0 last Comment Index look for deprecated into the first javadoc comment preceeding the declaration int comment Source Start this scanner comment Starts last Comment Index javadoc only non javadoc comment have negative end positions if comment Source Start 0 this modifiers Source Start 1 this modifiers Source Start comment Source Start this scanner comment Stops last Comment Index 0 continue next Comment check Deprecated true int comment Source End this scanner comment Stops last Comment Index 1 stop is one over deprecated this javadoc Parser check Deprecation comment Source Start comment Source End this javadoc this javadoc Parser doc Comment break next Comment if deprecated check And Set Modifiers Acc Deprecated modify the modifier source start to point at the first comment if last Comment Index 0 check Deprecated this modifiers Source Start this scanner comment Starts last Comment Index if this modifiers Source Start 0 this modifiers Source Start this modifiers Source Start  checkComment currentElement commentPtr flushCommentsDefinedPriorTo endStatementPosition checkDeprecated lastCommentIndex nextComment lastCommentIndex commentPtr lastCommentIndex lastCommentIndex commentSourceStart commentStarts lastCommentIndex commentSourceStart modifiersSourceStart modifiersSourceStart commentSourceStart commentStops lastCommentIndex nextComment checkDeprecated commentSourceEnd commentStops lastCommentIndex javadocParser checkDeprecation commentSourceStart commentSourceEnd javadocParser docComment nextComment checkAndSetModifiers AccDeprecated lastCommentIndex checkDeprecated modifiersSourceStart commentStarts lastCommentIndex modifiersSourceStart modifiersSourceStart modifiersSourceStart
see org eclipse jdt internal compiler parser Parser consume Class Header protected void consume Class Header push On Comments Stack 0 this scanner comment Ptr super consume Class Header  consumeClassHeader consumeClassHeader pushOnCommentsStack commentPtr consumeClassHeader
see org eclipse jdt internal compiler parser Parser consume Empty Class Member Declaration protected void consume Empty Class Member Declaration push On Comments Stack 0 this scanner comment Ptr super consume Empty Class Member Declaration  consumeEmptyClassMemberDeclaration consumeEmptyClassMemberDeclaration pushOnCommentsStack commentPtr consumeEmptyClassMemberDeclaration
see org eclipse jdt internal compiler parser Parser consume Empty Type Declaration protected void consume Empty Type Declaration push On Comments Stack 0 this scanner comment Ptr super consume Empty Type Declaration  consumeEmptyTypeDeclaration consumeEmptyTypeDeclaration pushOnCommentsStack commentPtr consumeEmptyTypeDeclaration
see org eclipse jdt internal compiler parser Parser consume Interface Header protected void consume Interface Header push On Comments Stack 0 this scanner comment Ptr super consume Interface Header  consumeInterfaceHeader consumeInterfaceHeader pushOnCommentsStack commentPtr consumeInterfaceHeader
Insure that start position is always positive see org eclipse jdt internal compiler parser Parser contains Comment int int public boolean contains Comment int source Start int source End int i Comment this scanner comment Ptr for i Comment 0 i Comment int comment Start this scanner comment Starts i Comment if comment Start 0 comment Start comment Start ignore comments before start if comment Start source Start continue ignore comments after end if comment Start source End continue return true return false  containsComment containsComment sourceStart sourceEnd iComment commentPtr iComment iComment commentStart commentStarts iComment commentStart commentStart commentStart commentStart sourceStart commentStart sourceEnd
protected Compilation Unit Declaration end Parse int act Compilation Unit Declaration unit super end Parse act if unit comments null push On Comments Stack 0 this scanner comment Ptr unit comments get Comments Positions return unit  CompilationUnitDeclaration endParse CompilationUnitDeclaration endParse pushOnCommentsStack commentPtr getCommentsPositions
public int flush Comments Defined Prior To int position int last Comment Index this scanner comment Ptr if last Comment Index 0 return position no comment compute the index of the first obsolete comment int index last Comment Index int valid Count 0 while index 0 int comment End this scanner comment Stops index if comment End 0 comment End comment End negative end position for non javadoc comments if comment End position break index valid Count if the source at position is immediately followed by a line comment then flush this comment and shift position to the comment end if valid Count 0 int immediate Comment End 0 while index last Comment Index immediate Comment End this scanner comment Stops index 1 0 only tolerating non javadoc comments non javadoc comment end positions are negative is there any line break until the end of the immediate comment thus only tolerating line comment immediate Comment End comment end in one char too far if this scanner get Line Number position this scanner get Line Number immediate Comment End break position immediate Comment End valid Count flush this comment index if index 0 return position no obsolete comment push On Comments Stack 0 index store comment before flushing them if valid Count 0 move valid comment infos overriding obsolete comment infos System arraycopy this scanner comment Starts index 1 this scanner comment Starts 0 valid Count System arraycopy this scanner comment Stops index 1 this scanner comment Stops 0 valid Count this scanner comment Ptr valid Count 1 return position  flushCommentsDefinedPriorTo lastCommentIndex commentPtr lastCommentIndex lastCommentIndex validCount commentEnd commentStops commentEnd commentEnd commentEnd commentEnd validCount validCount immediateCommentEnd lastCommentIndex immediateCommentEnd commentStops immediateCommentEnd getLineNumber getLineNumber immediateCommentEnd immediateCommentEnd validCount pushOnCommentsStack validCount commentStarts commentStarts validCount commentStops commentStops validCount commentPtr validCount
public int get Comments Positions int positions new int this comment Ptr 1 2 for int i 0 max this comment Ptr i max i positions i 0 this comment Starts i positions i 1 this comment Stops i return positions  getCommentsPositions commentPtr commentPtr commentStarts commentStops
see org eclipse jdt internal compiler parser Parser initialize public void initialize super initialize this comment Ptr 1  commentPtr
public void initialize Scanner this scanner new Comment Recorder Scanner false comment false whitespace this options get Severity Compiler Options Non Externalized String Problem Severities Ignore nls this options source Level source Level this options task Tags task Tags this options task Priorites task Priorities this options is Task Case Sensitive task Case Sensitive  initializeScanner CommentRecorderScanner getSeverity CompilerOptions NonExternalizedString ProblemSeverities sourceLevel sourceLevel taskTags taskTags taskPriorites taskPriorities isTaskCaseSensitive taskCaseSensitive
private void push On Comments Stack int start int end for int i start i end i First see if comment hasn t been already stored int scanner Start this scanner comment Starts i 0 this scanner comment Starts i this scanner comment Starts i int comment Start this comment Ptr 1 1 this comment Starts this comment Ptr 0 this comment Starts this comment Ptr this comment Starts this comment Ptr if comment Start 1 scanner Start comment Start int stack Length this comment Starts length if this comment Ptr stack Length System arraycopy this comment Starts 0 this comment Starts new int stack Length Comment Increment 0 stack Length System arraycopy this comment Stops 0 this comment Stops new int stack Length Comment Increment 0 stack Length this comment Starts this comment Ptr this scanner comment Starts i this comment Stops this comment Ptr this scanner comment Stops i  pushOnCommentsStack scannerStart commentStarts commentStarts commentStarts commentStart commentPtr commentStarts commentPtr commentStarts commentPtr commentStarts commentPtr commentStart scannerStart commentStart stackLength commentStarts commentPtr stackLength commentStarts commentStarts stackLength CommentIncrement stackLength commentStops commentStops stackLength CommentIncrement stackLength commentStarts commentPtr commentStarts commentStops commentPtr commentStops
see org eclipse jdt internal compiler parser Parser reset Modifiers protected void reset Modifiers push On Comments Stack 0 this scanner comment Ptr super reset Modifiers  resetModifiers resetModifiers pushOnCommentsStack commentPtr resetModifiers

public Comment Recorder Scanner boolean tokenize Comments boolean tokenize White Space boolean check Non Externalized String Literals long source Level char task Tags char task Priorities boolean is Task Case Sensitive super tokenize Comments tokenize White Space check Non Externalized String Literals source Level task Tags task Priorities is Task Case Sensitive  CommentRecorderScanner tokenizeComments tokenizeWhiteSpace checkNonExternalizedStringLiterals sourceLevel taskTags taskPriorities isTaskCaseSensitive tokenizeComments tokenizeWhiteSpace checkNonExternalizedStringLiterals sourceLevel taskTags taskPriorities isTaskCaseSensitive
Set start position negative for line comments see org eclipse jdt internal compiler parser Scanner record Comment int public void record Comment int token super record Comment token if token TokenNameCOMMENT LINE for comment line both positions are negative this comment Starts this comment Ptr this comment Starts this comment Ptr  recordComment recordComment recordComment TokenNameCOMMENT_LINE commentStarts commentPtr commentStarts commentPtr

Constant Pool byte reference int constant Pool Offset this constant Pool Count constant Pool Offset length this constant Pool Offset constant Pool Offset this class File Bytes reference this constant Pool Entry new Constant Pool Entry  ConstantPool constantPoolOffset constantPoolCount constantPoolOffset constantPoolOffset constantPoolOffset classFileBytes constantPoolEntry ConstantPoolEntry
see I Constant Pool decode Entry int public I Constant Pool Entry decode Entry int index this constant Pool Entry reset int kind get Entry Kind index this constant Pool Entry set Kind kind switch kind case I Constant Pool Constant CONSTANT Class this constant Pool Entry set Class Info Name Index u2 At this class File Bytes 1 this constant Pool Offset index this constant Pool Entry set Class Info Name get Utf8 Value At this constant Pool Entry get Class Info Name Index break case I Constant Pool Constant CONSTANT Double this constant Pool Entry set Double Value double At class File Bytes 1 this constant Pool Offset index break case I Constant Pool Constant CONSTANT Fieldref this constant Pool Entry set Class Index u2 At this class File Bytes 1 this constant Pool Offset index int declaring Class Index u2 At this class File Bytes 1 this constant Pool Offset this constant Pool Entry get Class Index this constant Pool Entry set Class Name get Utf8 Value At declaring Class Index this constant Pool Entry set Name And Type Index u2 At this class File Bytes 3 this constant Pool Offset index int field Name Index u2 At this class File Bytes 1 this constant Pool Offset this constant Pool Entry get Name And Type Index int field Descriptor Index u2 At this class File Bytes 3 this constant Pool Offset this constant Pool Entry get Name And Type Index this constant Pool Entry set Field Name get Utf8 Value At field Name Index this constant Pool Entry set Field Descriptor get Utf8 Value At field Descriptor Index break case I Constant Pool Constant CONSTANT Methodref case I Constant Pool Constant CONSTANT InterfaceMethodref this constant Pool Entry set Class Index u2 At this class File Bytes 1 this constant Pool Offset index declaring Class Index u2 At this class File Bytes 1 this constant Pool Offset this constant Pool Entry get Class Index this constant Pool Entry set Class Name get Utf8 Value At declaring Class Index this constant Pool Entry set Name And Type Index u2 At this class File Bytes 3 this constant Pool Offset index int method Name Index u2 At this class File Bytes 1 this constant Pool Offset this constant Pool Entry get Name And Type Index int method Descriptor Index u2 At this class File Bytes 3 this constant Pool Offset this constant Pool Entry get Name And Type Index this constant Pool Entry set Method Name get Utf8 Value At method Name Index this constant Pool Entry set Method Descriptor get Utf8 Value At method Descriptor Index break case I Constant Pool Constant CONSTANT Float this constant Pool Entry set Float Value float At class File Bytes 1 this constant Pool Offset index break case I Constant Pool Constant CONSTANT Integer this constant Pool Entry set Integer Value i4 At class File Bytes 1 this constant Pool Offset index break case I Constant Pool Constant CONSTANT Long this constant Pool Entry set Long Value i8 At class File Bytes 1 this constant Pool Offset index break case I Constant Pool Constant CONSTANT NameAndType this constant Pool Entry set Name And Type Name Index u2 At this class File Bytes 1 this constant Pool Offset index this constant Pool Entry set Name And Type Descriptor Index u2 At this class File Bytes 3 this constant Pool Offset index break case I Constant Pool Constant CONSTANT String this constant Pool Entry set String Index u2 At this class File Bytes 1 this constant Pool Offset index this constant Pool Entry set String Value get Utf8 Value At this constant Pool Entry get String Index break case I Constant Pool Constant CONSTANT Utf8 this constant Pool Entry set Utf8 Length u2 At this class File Bytes 1 this constant Pool Offset index this constant Pool Entry set Utf8 Value get Utf8 Value At index return this constant Pool Entry  IConstantPool decodeEntry IConstantPoolEntry decodeEntry constantPoolEntry getEntryKind constantPoolEntry setKind IConstantPoolConstant CONSTANT_Class constantPoolEntry setClassInfoNameIndex u2At classFileBytes constantPoolOffset constantPoolEntry setClassInfoName getUtf8ValueAt constantPoolEntry getClassInfoNameIndex IConstantPoolConstant CONSTANT_Double constantPoolEntry setDoubleValue doubleAt classFileBytes constantPoolOffset IConstantPoolConstant CONSTANT_Fieldref constantPoolEntry setClassIndex u2At classFileBytes constantPoolOffset declaringClassIndex u2At classFileBytes constantPoolOffset constantPoolEntry getClassIndex constantPoolEntry setClassName getUtf8ValueAt declaringClassIndex constantPoolEntry setNameAndTypeIndex u2At classFileBytes constantPoolOffset fieldNameIndex u2At classFileBytes constantPoolOffset constantPoolEntry getNameAndTypeIndex fieldDescriptorIndex u2At classFileBytes constantPoolOffset constantPoolEntry getNameAndTypeIndex constantPoolEntry setFieldName getUtf8ValueAt fieldNameIndex constantPoolEntry setFieldDescriptor getUtf8ValueAt fieldDescriptorIndex IConstantPoolConstant CONSTANT_Methodref IConstantPoolConstant CONSTANT_InterfaceMethodref constantPoolEntry setClassIndex u2At classFileBytes constantPoolOffset declaringClassIndex u2At classFileBytes constantPoolOffset constantPoolEntry getClassIndex constantPoolEntry setClassName getUtf8ValueAt declaringClassIndex constantPoolEntry setNameAndTypeIndex u2At classFileBytes constantPoolOffset methodNameIndex u2At classFileBytes constantPoolOffset constantPoolEntry getNameAndTypeIndex methodDescriptorIndex u2At classFileBytes constantPoolOffset constantPoolEntry getNameAndTypeIndex constantPoolEntry setMethodName getUtf8ValueAt methodNameIndex constantPoolEntry setMethodDescriptor getUtf8ValueAt methodDescriptorIndex IConstantPoolConstant CONSTANT_Float constantPoolEntry setFloatValue floatAt classFileBytes constantPoolOffset IConstantPoolConstant CONSTANT_Integer constantPoolEntry setIntegerValue i4At classFileBytes constantPoolOffset IConstantPoolConstant CONSTANT_Long constantPoolEntry setLongValue i8At classFileBytes constantPoolOffset IConstantPoolConstant CONSTANT_NameAndType constantPoolEntry setNameAndTypeNameIndex u2At classFileBytes constantPoolOffset constantPoolEntry setNameAndTypeDescriptorIndex u2At classFileBytes constantPoolOffset IConstantPoolConstant CONSTANT_String constantPoolEntry setStringIndex u2At classFileBytes constantPoolOffset constantPoolEntry setStringValue getUtf8ValueAt constantPoolEntry getStringIndex IConstantPoolConstant CONSTANT_Utf8 constantPoolEntry setUtf8Length u2At classFileBytes constantPoolOffset constantPoolEntry setUtf8Value getUtf8ValueAt constantPoolEntry
see I Constant Pool get Constant Pool Count public int get Constant Pool Count return this constant Pool Count  IConstantPool getConstantPoolCount getConstantPoolCount constantPoolCount
see I Constant Pool get Entry Kind int public int get Entry Kind int index return this u1 At this class File Bytes 0 this constant Pool Offset index  IConstantPool getEntryKind getEntryKind u1At classFileBytes constantPoolOffset
private char get Utf8 Value At int utf8 Index int utf8 Offset this constant Pool Offset utf8 Index return utf8 At class File Bytes 0 utf8 Offset 3 u2 At class File Bytes 0 utf8 Offset 1  getUtf8ValueAt utf8Index utf8Offset constantPoolOffset utf8Index utf8At classFileBytes utf8Offset u2At classFileBytes utf8Offset

see I Constant Pool Entry get Kind public int get Kind return this kind  IConstantPoolEntry getKind getKind
Sets the kind param kind The kind to set public void set Kind int kind this kind kind  setKind
see I Constant Pool Entry get Class Info Name Index public int get Class Info Name Index return this class Info Name Index  IConstantPoolEntry getClassInfoNameIndex getClassInfoNameIndex classInfoNameIndex
see I Constant Pool Entry get Class Index public int get Class Index return this class Index  IConstantPoolEntry getClassIndex getClassIndex classIndex
see I Constant Pool Entry get Name And Type Index public int get Name And Type Index return this name And Type Index  IConstantPoolEntry getNameAndTypeIndex getNameAndTypeIndex nameAndTypeIndex
see I Constant Pool Entry get String Index public int get String Index return this string Index  IConstantPoolEntry getStringIndex getStringIndex stringIndex
see I Constant Pool Entry get String Value public String get String Value return new String this string Value  IConstantPoolEntry getStringValue getStringValue stringValue
see I Constant Pool Entry get Integer Value public int get Integer Value return this integer Value  IConstantPoolEntry getIntegerValue getIntegerValue integerValue
see I Constant Pool Entry get Float Value public float get Float Value return this float Value  IConstantPoolEntry getFloatValue getFloatValue floatValue
see I Constant Pool Entry get Double Value public double get Double Value return this double Value  IConstantPoolEntry getDoubleValue getDoubleValue doubleValue
see I Constant Pool Entry get Long Value public long get Long Value return this long Value  IConstantPoolEntry getLongValue getLongValue longValue
see I Constant Pool Entry get Name And Type Info Descriptor Index public int get Name And Type Info Descriptor Index return this name And Type Descriptor Index  IConstantPoolEntry getNameAndTypeInfoDescriptorIndex getNameAndTypeInfoDescriptorIndex nameAndTypeDescriptorIndex
see I Constant Pool Entry get Name And Type Info Name Index public int get Name And Type Info Name Index return this name And Type Name Index  IConstantPoolEntry getNameAndTypeInfoNameIndex getNameAndTypeInfoNameIndex nameAndTypeNameIndex
see I Constant Pool Entry get Class Name public char get Class Name return this class Name  IConstantPoolEntry getClassName getClassName className
see I Constant Pool Entry get Field Name public char get Field Name return this field Name  IConstantPoolEntry getFieldName getFieldName fieldName
see I Constant Pool Entry get Method Name public char get Method Name return this method Name  IConstantPoolEntry getMethodName getMethodName methodName
see I Constant Pool Entry get Field Descriptor public char get Field Descriptor return this field Descriptor  IConstantPoolEntry getFieldDescriptor getFieldDescriptor fieldDescriptor
see I Constant Pool Entry get Method Descriptor public char get Method Descriptor return this method Descriptor  IConstantPoolEntry getMethodDescriptor getMethodDescriptor methodDescriptor
see I Constant Pool Entry get Utf8 Value public char get Utf8 Value return this utf8 Value  IConstantPoolEntry getUtf8Value getUtf8Value utf8Value
see I Constant Pool Entry get Class Info Name public char get Class Info Name return this class Info Name  IConstantPoolEntry getClassInfoName getClassInfoName classInfoName
Sets the class Info Name Index param class Info Name Index The class Info Name Index to set public void set Class Info Name Index int class Info Name Index this class Info Name Index class Info Name Index  classInfoNameIndex classInfoNameIndex classInfoNameIndex setClassInfoNameIndex classInfoNameIndex classInfoNameIndex classInfoNameIndex
Sets the class Index param class Index The class Index to set public void set Class Index int class Index this class Index class Index  classIndex classIndex classIndex setClassIndex classIndex classIndex classIndex
Sets the name And Type Index param name And Type Index The name And Type Index to set public void set Name And Type Index int name And Type Index this name And Type Index name And Type Index  nameAndTypeIndex nameAndTypeIndex nameAndTypeIndex setNameAndTypeIndex nameAndTypeIndex nameAndTypeIndex nameAndTypeIndex
Sets the string Index param string Index The string Index to set public void set String Index int string Index this string Index string Index  stringIndex stringIndex stringIndex setStringIndex stringIndex stringIndex stringIndex
Sets the string Value param string Value The string Value to set public void set String Value char string Value this string Value string Value  stringValue stringValue stringValue setStringValue stringValue stringValue stringValue
Sets the integer Value param integer Value The integer Value to set public void set Integer Value int integer Value this integer Value integer Value  integerValue integerValue integerValue setIntegerValue integerValue integerValue integerValue
Sets the float Value param float Value The float Value to set public void set Float Value float float Value this float Value float Value  floatValue floatValue floatValue setFloatValue floatValue floatValue floatValue
Sets the double Value param double Value The double Value to set public void set Double Value double double Value this double Value double Value  doubleValue doubleValue doubleValue setDoubleValue doubleValue doubleValue doubleValue
Sets the long Value param long Value The long Value to set public void set Long Value long long Value this long Value long Value  longValue longValue longValue setLongValue longValue longValue longValue
Gets the name And Type Descriptor Index return Returns a int public int get Name And Type Descriptor Index return name And Type Descriptor Index  nameAndTypeDescriptorIndex getNameAndTypeDescriptorIndex nameAndTypeDescriptorIndex
Sets the name And Type Descriptor Index param name And Type Descriptor Index The name And Type Descriptor Index to set public void set Name And Type Descriptor Index int name And Type Descriptor Index this name And Type Descriptor Index name And Type Descriptor Index  nameAndTypeDescriptorIndex nameAndTypeDescriptorIndex nameAndTypeDescriptorIndex setNameAndTypeDescriptorIndex nameAndTypeDescriptorIndex nameAndTypeDescriptorIndex nameAndTypeDescriptorIndex
Gets the name And Type Name Index return Returns a int public int get Name And Type Name Index return name And Type Name Index  nameAndTypeNameIndex getNameAndTypeNameIndex nameAndTypeNameIndex
Sets the name And Type Name Index param name And Type Name Index The name And Type Name Index to set public void set Name And Type Name Index int name And Type Name Index this name And Type Name Index name And Type Name Index  nameAndTypeNameIndex nameAndTypeNameIndex nameAndTypeNameIndex setNameAndTypeNameIndex nameAndTypeNameIndex nameAndTypeNameIndex nameAndTypeNameIndex
Sets the class Name param class Name The class Name to set public void set Class Name char class Name this class Name class Name  className className className setClassName className className className
Sets the field Name param field Name The field Name to set public void set Field Name char field Name this field Name field Name  fieldName fieldName fieldName setFieldName fieldName fieldName fieldName
Sets the method Name param method Name The method Name to set public void set Method Name char method Name this method Name method Name  methodName methodName methodName setMethodName methodName methodName methodName
Sets the field Descriptor param field Descriptor The field Descriptor to set public void set Field Descriptor char field Descriptor this field Descriptor field Descriptor  fieldDescriptor fieldDescriptor fieldDescriptor setFieldDescriptor fieldDescriptor fieldDescriptor fieldDescriptor
Sets the method Descriptor param method Descriptor The method Descriptor to set public void set Method Descriptor char method Descriptor this method Descriptor method Descriptor  methodDescriptor methodDescriptor methodDescriptor setMethodDescriptor methodDescriptor methodDescriptor methodDescriptor
Sets the utf8 Value param utf8 Value The utf8 Value to set public void set Utf8 Value char utf8 Value this utf8 Value utf8 Value  utf8Value utf8Value utf8Value setUtf8Value utf8Value utf8Value utf8Value
Sets the class Info Name param class Info Name The class Info Name to set public void set Class Info Name char class Info Name this class Info Name class Info Name  classInfoName classInfoName classInfoName setClassInfoName classInfoName classInfoName classInfoName
see I Constant Pool Entry get Utf8 Length public int get Utf8 Length return this utf8 Length  IConstantPoolEntry getUtf8Length getUtf8Length utf8Length
Sets the utf8 Length param utf8 Length The utf8 Length to set public void set Utf8 Length int utf8 Length this utf8 Length utf8 Length  utf8Length utf8Length utf8Length setUtf8Length utf8Length utf8Length utf8Length
public void reset this kind 0 this class Info Name Index 0 this class Index 0 this name And Type Index 0 this string Index 0 this string Value null this integer Value 0 this float Value 0 0f this double Value 0 0 this long Value 0L this name And Type Descriptor Index 0 this name And Type Name Index 0 this class Name null this field Name null this method Name null this field Descriptor null this method Descriptor null this utf8 Value null this utf8 Length 0 this class Info Name null  classInfoNameIndex classIndex nameAndTypeIndex stringIndex stringValue integerValue floatValue doubleValue longValue nameAndTypeDescriptorIndex nameAndTypeNameIndex className fieldName methodName fieldDescriptor methodDescriptor utf8Value utf8Length classInfoName

Constant Value Attribute byte class File Bytes I Constant Pool constant Pool int offset throws Class Format Exception super class File Bytes constant Pool offset this constant Value Index u2 At class File Bytes 6 offset this constant Pool constant Pool  ConstantValueAttribute classFileBytes IConstantPool constantPool ClassFormatException classFileBytes constantPool constantValueIndex u2At classFileBytes constantPool constantPool
see I Constant Value Attribute get Constant Value public I Constant Pool Entry get Constant Value return this constant Pool decode Entry this constant Value Index  IConstantValueAttribute getConstantValue IConstantPoolEntry getConstantValue constantPool decodeEntry constantValueIndex
see I Constant Value Attribute get Constant Value Index public int get Constant Value Index return this constant Value Index  IConstantValueAttribute getConstantValueIndex getConstantValueIndex constantValueIndex
see org eclipse jdt core util I Class File Attribute get Attribute Name public char get Attribute Name return I Attribute Names Constants CONSTANT VALUE  IClassFileAttribute getAttributeName getAttributeName IAttributeNamesConstants CONSTANT_VALUE

public Default Bytecode Visitor long code Length String Buffer buffer String line Separator int tab Number this buffer buffer this line Separator line Separator this tab Number tab Number 1 this digit Number ForPC int Math log code Length 1 Math log 10  DefaultBytecodeVisitor codeLength StringBuffer lineSeparator tabNumber lineSeparator lineSeparator tabNumber tabNumber digitNumberForPC codeLength
see I Bytecode Visitor  aaload int public void  aaload int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics AALOAD write New Line  IBytecodeVisitor _aaload _aaload dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
private void dump Pc Number int pc write Tabs int digit ForPC 0 if pc 0 digit ForPC int Math log pc Math log 10 for int i 0 max this digit Number ForPC digit ForPC i max i buffer append buffer append pc buffer append Util bind disassembler identation NON NLS 1  dumpPcNumber writeTabs digitForPC digitForPC digitNumberForPC digitForPC
see I Bytecode Visitor  aastore int public void  aastore int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics AASTORE write New Line  IBytecodeVisitor _aastore _aastore dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  aconst null int public void  aconst null int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ACONST NULL write New Line  IBytecodeVisitor _aconst_null _aconst_null dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ACONST_NULL writeNewLine
see I Bytecode Visitor  aload 0 int public void  aload 0 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ALOAD 0 write New Line  IBytecodeVisitor _aload_0 _aload_0 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ALOAD_0 writeNewLine
see I Bytecode Visitor  aload 1 int public void  aload 1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ALOAD 1 write New Line  IBytecodeVisitor _aload_1 _aload_1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ALOAD_1 writeNewLine
see I Bytecode Visitor  aload 2 int public void  aload 2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ALOAD 2 write New Line  IBytecodeVisitor _aload_2 _aload_2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ALOAD_2 writeNewLine
see I Bytecode Visitor  aload 3 int public void  aload 3 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ALOAD 3 write New Line  IBytecodeVisitor _aload_3 _aload_3 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ALOAD_3 writeNewLine
see I Bytecode Visitor  aload int int public void  aload int pc int index dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ALOAD append Util bind disassembler space NON NLS 1 append index write New Line  IBytecodeVisitor _aload _aload dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  anewarray int int I Constant Pool Entry public void  anewarray int pc int index I Constant Pool Entry constant Class dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ANEWARRAY append Util bind disassembler constantpoolindex NON NLS 1 append index append Util bind disassembler space NON NLS 1 append return Constant Class Name constant Class write New Line  IBytecodeVisitor _anewarray IConstantPoolEntry _anewarray IConstantPoolEntry constantClass dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics returnConstantClassName constantClass writeNewLine
see I Bytecode Visitor  areturn int public void  areturn int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ARETURN write New Line  IBytecodeVisitor _areturn _areturn dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  arraylength int public void  arraylength int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ARRAYLENGTH write New Line  IBytecodeVisitor _arraylength _arraylength dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  astore 0 int public void  astore 0 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ASTORE 0 write New Line  IBytecodeVisitor _astore_0 _astore_0 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ASTORE_0 writeNewLine
see I Bytecode Visitor  astore 1 int public void  astore 1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ASTORE 1 write New Line  IBytecodeVisitor _astore_1 _astore_1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ASTORE_1 writeNewLine
see I Bytecode Visitor  astore 2 int public void  astore 2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ASTORE 2 write New Line  IBytecodeVisitor _astore_2 _astore_2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ASTORE_2 writeNewLine
see I Bytecode Visitor  astore 3 int public void  astore 3 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ASTORE 3 write New Line  IBytecodeVisitor _astore_3 _astore_3 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ASTORE_3 writeNewLine
see I Bytecode Visitor  astore int int public void  astore int pc int index dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ASTORE append Util bind disassembler space NON NLS 1 append index write New Line  IBytecodeVisitor _astore _astore dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  athrow int public void  athrow int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ATHROW write New Line  IBytecodeVisitor _athrow _athrow dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  baload int public void  baload int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics BALOAD write New Line  IBytecodeVisitor _baload _baload dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  bastore int public void  bastore int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics BASTORE write New Line  IBytecodeVisitor _bastore _bastore dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  bipush int byte public void  bipush int pc byte  byte dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics BIPUSH append Util bind disassembler space NON NLS 1 append  byte write New Line  IBytecodeVisitor _bipush _bipush _byte dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics _byte writeNewLine
see I Bytecode Visitor  caload int public void  caload int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics CALOAD write New Line  IBytecodeVisitor _caload _caload dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  castore int public void  castore int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics CASTORE write New Line  IBytecodeVisitor _castore _castore dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  checkcast int int I Constant Pool Entry public void  checkcast int pc int index I Constant Pool Entry constant Class dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics CHECKCAST append Util bind disassembler constantpoolindex NON NLS 1 append index append Util bind disassembler space NON NLS 1 append return Constant Class Name constant Class write New Line  IBytecodeVisitor _checkcast IConstantPoolEntry _checkcast IConstantPoolEntry constantClass dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics returnConstantClassName constantClass writeNewLine
see I Bytecode Visitor  d2f int public void  d2f int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics D2F write New Line  IBytecodeVisitor _d2f _d2f dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  d2i int public void  d2i int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics D2I write New Line  IBytecodeVisitor _d2i _d2i dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  d2l int public void  d2l int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics D2L write New Line  IBytecodeVisitor _d2l _d2l dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  dadd int public void  dadd int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DADD write New Line  IBytecodeVisitor _dadd _dadd dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  daload int public void  daload int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DALOAD write New Line  IBytecodeVisitor _daload _daload dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  dastore int public void  dastore int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DASTORE write New Line  IBytecodeVisitor _dastore _dastore dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  dcmpg int public void  dcmpg int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DCMPG write New Line  IBytecodeVisitor _dcmpg _dcmpg dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  dcmpl int public void  dcmpl int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DCMPL write New Line  IBytecodeVisitor _dcmpl _dcmpl dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  dconst 0 int public void  dconst 0 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DCONST 0 write New Line  IBytecodeVisitor _dconst_0 _dconst_0 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics DCONST_0 writeNewLine
see I Bytecode Visitor  dconst 1 int public void  dconst 1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DCONST 1 write New Line  IBytecodeVisitor _dconst_1 _dconst_1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics DCONST_1 writeNewLine
see I Bytecode Visitor  ddiv int public void  ddiv int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DDIV write New Line  IBytecodeVisitor _ddiv _ddiv dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  dload 0 int public void  dload 0 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DLOAD 0 write New Line  IBytecodeVisitor _dload_0 _dload_0 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics DLOAD_0 writeNewLine
see I Bytecode Visitor  dload 1 int public void  dload 1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DLOAD 1 write New Line  IBytecodeVisitor _dload_1 _dload_1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics DLOAD_1 writeNewLine
see I Bytecode Visitor  dload 2 int public void  dload 2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DLOAD 2 write New Line  IBytecodeVisitor _dload_2 _dload_2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics DLOAD_2 writeNewLine
see I Bytecode Visitor  dload 3 int public void  dload 3 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DLOAD 3 write New Line  IBytecodeVisitor _dload_3 _dload_3 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics DLOAD_3 writeNewLine
see I Bytecode Visitor  dload int int public void  dload int pc int index dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DLOAD append Util bind disassembler space NON NLS 1 append index write New Line  IBytecodeVisitor _dload _dload dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  dmul int public void  dmul int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DMUL write New Line  IBytecodeVisitor _dmul _dmul dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  dneg int public void  dneg int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DNEG write New Line  IBytecodeVisitor _dneg _dneg dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  drem int public void  drem int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DREM write New Line  IBytecodeVisitor _drem _drem dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  dreturn int public void  dreturn int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DRETURN write New Line  IBytecodeVisitor _dreturn _dreturn dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  dstore 0 int public void  dstore 0 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DSTORE 0 write New Line  IBytecodeVisitor _dstore_0 _dstore_0 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics DSTORE_0 writeNewLine
see I Bytecode Visitor  dstore 1 int public void  dstore 1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DSTORE 1 write New Line  IBytecodeVisitor _dstore_1 _dstore_1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics DSTORE_1 writeNewLine
see I Bytecode Visitor  dstore 2 int public void  dstore 2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DSTORE 2 write New Line  IBytecodeVisitor _dstore_2 _dstore_2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics DSTORE_2 writeNewLine
see I Bytecode Visitor  dstore 3 int public void  dstore 3 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DSTORE 3 write New Line  IBytecodeVisitor _dstore_3 _dstore_3 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics DSTORE_3 writeNewLine
see I Bytecode Visitor  dstore int int public void  dstore int pc int index dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DSTORE append Util bind disassembler space NON NLS 1 append index write New Line  IBytecodeVisitor _dstore _dstore dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  dsub int public void  dsub int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DSUB write New Line  IBytecodeVisitor _dsub _dsub dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  dup x1 int public void  dup x1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DUP X1 write New Line  IBytecodeVisitor _dup_x1 _dup_x1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics DUP_X1 writeNewLine
see I Bytecode Visitor  dup x2 int public void  dup x2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DUP X2 write New Line  IBytecodeVisitor _dup_x2 _dup_x2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics DUP_X2 writeNewLine
see I Bytecode Visitor  dup int public void  dup int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DUP write New Line  IBytecodeVisitor _dup _dup dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  dup2 x1 int public void  dup2 x1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DUP2 X1 write New Line  IBytecodeVisitor _dup2_x1 _dup2_x1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics DUP2_X1 writeNewLine
see I Bytecode Visitor  dup2 x2 int public void  dup2 x2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DUP2 X2 write New Line  IBytecodeVisitor _dup2_x2 _dup2_x2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics DUP2_X2 writeNewLine
see I Bytecode Visitor  dup2 int public void  dup2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics DUP2 write New Line  IBytecodeVisitor _dup2 _dup2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  f2d int public void  f2d int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics F2D write New Line  IBytecodeVisitor _f2d _f2d dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  f2i int public void  f2i int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics F2I write New Line  IBytecodeVisitor _f2i _f2i dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  f2l int public void  f2l int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics F2L write New Line  IBytecodeVisitor _f2l _f2l dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  fadd int public void  fadd int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FADD write New Line  IBytecodeVisitor _fadd _fadd dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  faload int public void  faload int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FALOAD write New Line  IBytecodeVisitor _faload _faload dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  fastore int public void  fastore int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FASTORE write New Line  IBytecodeVisitor _fastore _fastore dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  fcmpg int public void  fcmpg int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FCMPG write New Line  IBytecodeVisitor _fcmpg _fcmpg dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  fcmpl int public void  fcmpl int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FCMPL write New Line  IBytecodeVisitor _fcmpl _fcmpl dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  fconst 0 int public void  fconst 0 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FCONST 0 write New Line  IBytecodeVisitor _fconst_0 _fconst_0 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics FCONST_0 writeNewLine
see I Bytecode Visitor  fconst 1 int public void  fconst 1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FCONST 1 write New Line  IBytecodeVisitor _fconst_1 _fconst_1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics FCONST_1 writeNewLine
see I Bytecode Visitor  fconst 2 int public void  fconst 2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FCONST 2 write New Line  IBytecodeVisitor _fconst_2 _fconst_2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics FCONST_2 writeNewLine
see I Bytecode Visitor  fdiv int public void  fdiv int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FDIV write New Line  IBytecodeVisitor _fdiv _fdiv dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  fload 0 int public void  fload 0 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FLOAD 0 write New Line  IBytecodeVisitor _fload_0 _fload_0 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics FLOAD_0 writeNewLine
see I Bytecode Visitor  fload 1 int public void  fload 1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FLOAD 1 write New Line  IBytecodeVisitor _fload_1 _fload_1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics FLOAD_1 writeNewLine
see I Bytecode Visitor  fload 2 int public void  fload 2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FLOAD 2 write New Line  IBytecodeVisitor _fload_2 _fload_2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics FLOAD_2 writeNewLine
see I Bytecode Visitor  fload 3 int public void  fload 3 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FLOAD 3 write New Line  IBytecodeVisitor _fload_3 _fload_3 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics FLOAD_3 writeNewLine
see I Bytecode Visitor  fload int int public void  fload int pc int index dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FLOAD append Util bind disassembler space NON NLS 1 append index write New Line  IBytecodeVisitor _fload _fload dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  fmul int public void  fmul int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FMUL write New Line  IBytecodeVisitor _fmul _fmul dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  fneg int public void  fneg int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FNEG write New Line  IBytecodeVisitor _fneg _fneg dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  frem int public void  frem int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FREM write New Line  IBytecodeVisitor _frem _frem dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  freturn int public void  freturn int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FRETURN write New Line  IBytecodeVisitor _freturn _freturn dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  fstore 0 int public void  fstore 0 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FSTORE 0 write New Line  IBytecodeVisitor _fstore_0 _fstore_0 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics FSTORE_0 writeNewLine
see I Bytecode Visitor  fstore 1 int public void  fstore 1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FSTORE 1 write New Line  IBytecodeVisitor _fstore_1 _fstore_1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics FSTORE_1 writeNewLine
see I Bytecode Visitor  fstore 2 int public void  fstore 2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FSTORE 2 write New Line  IBytecodeVisitor _fstore_2 _fstore_2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics FSTORE_2 writeNewLine
see I Bytecode Visitor  fstore 3 int public void  fstore 3 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FSTORE 3 write New Line  IBytecodeVisitor _fstore_3 _fstore_3 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics FSTORE_3 writeNewLine
see I Bytecode Visitor  fstore int int public void  fstore int pc int index dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FSTORE append Util bind disassembler space NON NLS 1 append index write New Line  IBytecodeVisitor _fstore _fstore dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  fsub int public void  fsub int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics FSUB write New Line  IBytecodeVisitor _fsub _fsub dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  getfield int int I Constant Pool Entry public void  getfield int pc int index I Constant Pool Entry constant Fieldref dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics GETFIELD append Util bind disassembler constantpoolindex NON NLS 1 append index append Util bind classformat getfield NON NLS 1 append return Declaring Class Name constant Fieldref append Util bind disassembler classmemberseparator NON NLS 1 append constant Fieldref get Field Name append Util bind disassembler space NON NLS 1 append constant Fieldref get Field Descriptor append Util bind classformat getfieldclose NON NLS 1 write New Line  IBytecodeVisitor _getfield IConstantPoolEntry _getfield IConstantPoolEntry constantFieldref dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics returnDeclaringClassName constantFieldref constantFieldref getFieldName constantFieldref getFieldDescriptor writeNewLine
see I Bytecode Visitor  getstatic int int I Constant Pool Entry public void  getstatic int pc int index I Constant Pool Entry constant Fieldref dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics GETSTATIC append Util bind disassembler constantpoolindex NON NLS 1 append index append Util bind classformat getstatic NON NLS 1 append return Declaring Class Name constant Fieldref append Util bind disassembler classmemberseparator NON NLS 1 append constant Fieldref get Field Name append Util bind disassembler space NON NLS 1 append constant Fieldref get Field Descriptor append Util bind classformat getstaticclose NON NLS 1 write New Line  IBytecodeVisitor _getstatic IConstantPoolEntry _getstatic IConstantPoolEntry constantFieldref dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics returnDeclaringClassName constantFieldref constantFieldref getFieldName constantFieldref getFieldDescriptor writeNewLine
see I Bytecode Visitor  goto w int int public void  goto w int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics GOTO W append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _goto_w _goto_w branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics GOTO_W branchOffset writeNewLine
see I Bytecode Visitor  goto int int public void  goto int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics GOTO append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _goto _goto branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics branchOffset writeNewLine
see I Bytecode Visitor  i2b int public void  i2b int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics I2B write New Line  IBytecodeVisitor _i2b _i2b dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  i2c int public void  i2c int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics I2C write New Line  IBytecodeVisitor _i2c _i2c dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  i2d int public void  i2d int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics I2D write New Line  IBytecodeVisitor _i2d _i2d dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  i2f int public void  i2f int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics I2F write New Line  IBytecodeVisitor _i2f _i2f dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  i2l int public void  i2l int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics I2L write New Line  IBytecodeVisitor _i2l _i2l dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  i2s int public void  i2s int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics I2S write New Line  IBytecodeVisitor _i2s _i2s dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  iadd int public void  iadd int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IADD write New Line  IBytecodeVisitor _iadd _iadd dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  iaload int public void  iaload int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IALOAD write New Line  IBytecodeVisitor _iaload _iaload dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  iand int public void  iand int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IAND write New Line  IBytecodeVisitor _iand _iand dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  iastore int public void  iastore int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IASTORE write New Line  IBytecodeVisitor _iastore _iastore dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  if acmpeq int int public void  if acmpeq int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IF ACMPEQ append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _if_acmpeq _if_acmpeq branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics IF_ACMPEQ branchOffset writeNewLine
see I Bytecode Visitor  if acmpne int int public void  if acmpne int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IF ACMPNE append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _if_acmpne _if_acmpne branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics IF_ACMPNE branchOffset writeNewLine
see I Bytecode Visitor  if icmpeq int int public void  if icmpeq int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IF ICMPEQ append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _if_icmpeq _if_icmpeq branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics IF_ICMPEQ branchOffset writeNewLine
see I Bytecode Visitor  if icmpge int int public void  if icmpge int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IF ICMPGE append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _if_icmpge _if_icmpge branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics IF_ICMPGE branchOffset writeNewLine
see I Bytecode Visitor  if icmpgt int int public void  if icmpgt int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IF ICMPGT append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _if_icmpgt _if_icmpgt branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics IF_ICMPGT branchOffset writeNewLine
see I Bytecode Visitor  if icmple int int public void  if icmple int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IF ICMPLE append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _if_icmple _if_icmple branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics IF_ICMPLE branchOffset writeNewLine
see I Bytecode Visitor  if icmplt int int public void  if icmplt int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IF ICMPLT append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _if_icmplt _if_icmplt branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics IF_ICMPLT branchOffset writeNewLine
see I Bytecode Visitor  if icmpne int int public void  if icmpne int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IF ICMPNE append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _if_icmpne _if_icmpne branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics IF_ICMPNE branchOffset writeNewLine
see I Bytecode Visitor  iconst 0 int public void  iconst 0 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ICONST 0 write New Line  IBytecodeVisitor _iconst_0 _iconst_0 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ICONST_0 writeNewLine
see I Bytecode Visitor  iconst 1 int public void  iconst 1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ICONST 1 write New Line  IBytecodeVisitor _iconst_1 _iconst_1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ICONST_1 writeNewLine
see I Bytecode Visitor  iconst 2 int public void  iconst 2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ICONST 2 write New Line  IBytecodeVisitor _iconst_2 _iconst_2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ICONST_2 writeNewLine
see I Bytecode Visitor  iconst 3 int public void  iconst 3 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ICONST 3 write New Line  IBytecodeVisitor _iconst_3 _iconst_3 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ICONST_3 writeNewLine
see I Bytecode Visitor  iconst 4 int public void  iconst 4 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ICONST 4 write New Line  IBytecodeVisitor _iconst_4 _iconst_4 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ICONST_4 writeNewLine
see I Bytecode Visitor  iconst 5 int public void  iconst 5 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ICONST 5 write New Line  IBytecodeVisitor _iconst_5 _iconst_5 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ICONST_5 writeNewLine
see I Bytecode Visitor  iconst m1 int public void  iconst m1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ICONST M1 write New Line  IBytecodeVisitor _iconst_m1 _iconst_m1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ICONST_M1 writeNewLine
see I Bytecode Visitor  idiv int public void  idiv int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IDIV write New Line  IBytecodeVisitor _idiv _idiv dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  ifeq int int public void  ifeq int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IFEQ append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _ifeq _ifeq branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics branchOffset writeNewLine
see I Bytecode Visitor  ifge int int public void  ifge int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IFGE append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _ifge _ifge branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics branchOffset writeNewLine
see I Bytecode Visitor  ifgt int int public void  ifgt int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IFGT append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _ifgt _ifgt branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics branchOffset writeNewLine
see I Bytecode Visitor  ifle int int public void  ifle int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IFLE append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _ifle _ifle branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics branchOffset writeNewLine
see I Bytecode Visitor  iflt int int public void  iflt int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IFLT append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _iflt _iflt branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics branchOffset writeNewLine
see I Bytecode Visitor  ifne int int public void  ifne int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IFNE append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _ifne _ifne branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics branchOffset writeNewLine
see I Bytecode Visitor  ifnonnull int int public void  ifnonnull int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IFNONNULL append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _ifnonnull _ifnonnull branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics branchOffset writeNewLine
see I Bytecode Visitor  ifnull int int public void  ifnull int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IFNULL append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _ifnull _ifnull branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics branchOffset writeNewLine
see I Bytecode Visitor  iinc int int int public void  iinc int pc int index int  const dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IINC append Util bind disassembler space NON NLS 1 append index append Util bind disassembler space NON NLS 1 append  const write New Line  IBytecodeVisitor _iinc _iinc _const dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics _const writeNewLine
see I Bytecode Visitor  iload 0 int public void  iload 0 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ILOAD 0 write New Line  IBytecodeVisitor _iload_0 _iload_0 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ILOAD_0 writeNewLine
see I Bytecode Visitor  iload 1 int public void  iload 1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ILOAD 1 write New Line  IBytecodeVisitor _iload_1 _iload_1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ILOAD_1 writeNewLine
see I Bytecode Visitor  iload 2 int public void  iload 2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ILOAD 2 write New Line  IBytecodeVisitor _iload_2 _iload_2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ILOAD_2 writeNewLine
see I Bytecode Visitor  iload 3 int public void  iload 3 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ILOAD 3 write New Line  IBytecodeVisitor _iload_3 _iload_3 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ILOAD_3 writeNewLine
see I Bytecode Visitor  iload int int public void  iload int pc int index dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ILOAD append Util bind disassembler space NON NLS 1 append index write New Line  IBytecodeVisitor _iload _iload dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  imul int public void  imul int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IMUL write New Line  IBytecodeVisitor _imul _imul dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  ineg int public void  ineg int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics INEG write New Line  IBytecodeVisitor _ineg _ineg dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  instanceof int int I Constant Pool Entry public void  instanceof int pc int index I Constant Pool Entry constant Class dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics INSTANCEOF append Util bind disassembler constantpoolindex NON NLS 1 append index append Util bind disassembler space NON NLS 1 append return Constant Class Name constant Class write New Line  IBytecodeVisitor _instanceof IConstantPoolEntry _instanceof IConstantPoolEntry constantClass dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics returnConstantClassName constantClass writeNewLine
see I Bytecode Visitor  invokeinterface int int byte I Constant Pool Entry public void  invokeinterface int pc int index byte nargs I Constant Pool Entry constant Interface Methodref dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics INVOKEINTERFACE append Util bind classformat nargs NON NLS 1 append nargs append Util bind classformat interfacemethodrefindex NON NLS 1 append index append Util bind classformat invokeinterfacemethod NON NLS 1 append return Declaring Class Name constant Interface Methodref append Util bind disassembler classmemberseparator NON NLS 1 append constant Interface Methodref get Method Name append constant Interface Methodref get Method Descriptor append Util bind classformat invokeinterfacemethodclose NON NLS 1 write New Line  IBytecodeVisitor _invokeinterface IConstantPoolEntry _invokeinterface IConstantPoolEntry constantInterfaceMethodref dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics returnDeclaringClassName constantInterfaceMethodref constantInterfaceMethodref getMethodName constantInterfaceMethodref getMethodDescriptor writeNewLine
see I Bytecode Visitor  invokespecial int int I Constant Pool Entry public void  invokespecial int pc int index I Constant Pool Entry constant Methodref dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics INVOKESPECIAL append Util bind disassembler constantpoolindex NON NLS 1 append index append Util bind classformat invokespecialmethod NON NLS 1 append return Declaring Class Name constant Methodref append Util bind disassembler classmemberseparator NON NLS 1 append constant Methodref get Method Name append constant Methodref get Method Descriptor append Util bind classformat invokespecialmethodclose NON NLS 1 write New Line  IBytecodeVisitor _invokespecial IConstantPoolEntry _invokespecial IConstantPoolEntry constantMethodref dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics returnDeclaringClassName constantMethodref constantMethodref getMethodName constantMethodref getMethodDescriptor writeNewLine
see I Bytecode Visitor  invokestatic int int I Constant Pool Entry public void  invokestatic int pc int index I Constant Pool Entry constant Methodref dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics INVOKESTATIC append Util bind disassembler constantpoolindex NON NLS 1 append index append Util bind classformat invokestaticmethod NON NLS 1 append return Declaring Class Name constant Methodref append Util bind disassembler classmemberseparator NON NLS 1 append constant Methodref get Method Name append constant Methodref get Method Descriptor append Util bind classformat invokestaticmethodclose NON NLS 1 write New Line  IBytecodeVisitor _invokestatic IConstantPoolEntry _invokestatic IConstantPoolEntry constantMethodref dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics returnDeclaringClassName constantMethodref constantMethodref getMethodName constantMethodref getMethodDescriptor writeNewLine
see I Bytecode Visitor  invokevirtual int int I Constant Pool Entry public void  invokevirtual int pc int index I Constant Pool Entry constant Methodref dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics INVOKEVIRTUAL append Util bind disassembler constantpoolindex NON NLS 1 append index append Util bind classformat invokevirtualmethod NON NLS 1 append return Declaring Class Name constant Methodref append Util bind disassembler classmemberseparator NON NLS 1 append constant Methodref get Method Name append constant Methodref get Method Descriptor append Util bind classformat invokevirtualmethodclose NON NLS 1 write New Line  IBytecodeVisitor _invokevirtual IConstantPoolEntry _invokevirtual IConstantPoolEntry constantMethodref dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics returnDeclaringClassName constantMethodref constantMethodref getMethodName constantMethodref getMethodDescriptor writeNewLine
see I Bytecode Visitor  ior int public void  ior int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IOR write New Line  IBytecodeVisitor _ior _ior dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  irem int public void  irem int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IREM write New Line  IBytecodeVisitor _irem _irem dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  ireturn int public void  ireturn int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IRETURN write New Line  IBytecodeVisitor _ireturn _ireturn dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  ishl int public void  ishl int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ISHL write New Line  IBytecodeVisitor _ishl _ishl dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  ishr int public void  ishr int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ISHR write New Line  IBytecodeVisitor _ishr _ishr dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  istore 0 int public void  istore 0 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ISTORE 0 write New Line  IBytecodeVisitor _istore_0 _istore_0 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ISTORE_0 writeNewLine
see I Bytecode Visitor  istore 1 int public void  istore 1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ISTORE 1 write New Line  IBytecodeVisitor _istore_1 _istore_1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ISTORE_1 writeNewLine
see I Bytecode Visitor  istore 2 int public void  istore 2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ISTORE 2 write New Line  IBytecodeVisitor _istore_2 _istore_2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ISTORE_2 writeNewLine
see I Bytecode Visitor  istore 3 int public void  istore 3 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ISTORE 3 write New Line  IBytecodeVisitor _istore_3 _istore_3 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics ISTORE_3 writeNewLine
see I Bytecode Visitor  istore int int public void  istore int pc int index dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ISTORE append Util bind disassembler space NON NLS 1 append index write New Line  IBytecodeVisitor _istore _istore dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  isub int public void  isub int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics ISUB write New Line  IBytecodeVisitor _isub _isub dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  iushr int public void  iushr int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IUSHR write New Line  IBytecodeVisitor _iushr _iushr dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  ixor int public void  ixor int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IXOR write New Line  IBytecodeVisitor _ixor _ixor dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  jsr w int int public void  jsr w int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics JSR W append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _jsr_w _jsr_w branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics JSR_W branchOffset writeNewLine
see I Bytecode Visitor  jsr int int public void  jsr int pc int branch Offset dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics JSR append Util bind disassembler space NON NLS 1 append branch Offset pc write New Line  IBytecodeVisitor _jsr _jsr branchOffset dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics branchOffset writeNewLine
see I Bytecode Visitor  l2d int public void  l2d int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics L2D write New Line  IBytecodeVisitor _l2d _l2d dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  l2f int public void  l2f int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics L2F write New Line  IBytecodeVisitor _l2f _l2f dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  l2i int public void  l2i int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics L2I write New Line  IBytecodeVisitor _l2i _l2i dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  ladd int public void  ladd int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LADD write New Line  IBytecodeVisitor _ladd _ladd dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  laload int public void  laload int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LALOAD write New Line  IBytecodeVisitor _laload _laload dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  land int public void  land int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LAND write New Line  IBytecodeVisitor _land _land dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  lastore int public void  lastore int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LASTORE write New Line  IBytecodeVisitor _lastore _lastore dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  lcmp int public void  lcmp int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LCMP write New Line  IBytecodeVisitor _lcmp _lcmp dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  lconst 0 int public void  lconst 0 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LCONST 0 write New Line  IBytecodeVisitor _lconst_0 _lconst_0 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics LCONST_0 writeNewLine
see I Bytecode Visitor  lconst 1 int public void  lconst 1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LCONST 1 write New Line  IBytecodeVisitor _lconst_1 _lconst_1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics LCONST_1 writeNewLine
see I Bytecode Visitor  ldc w int int I Constant Pool Entry public void  ldc w int pc int index I Constant Pool Entry constant Pool Entry dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LDC W append Util bind disassembler constantpoolindex NON NLS 1 append index append Util bind disassembler space NON NLS 1 switch constant Pool Entry get Kind case I Constant Pool Constant CONSTANT Float append Outputfor Constant Float constant Pool Entry break case I Constant Pool Constant CONSTANT Integer append Outputfor Constant Integer constant Pool Entry break case I Constant Pool Constant CONSTANT String append Output For Constant String constant Pool Entry break case I Constant Pool Constant CONSTANT Class append Output For Constant Class constant Pool Entry write New Line  IBytecodeVisitor _ldc_w IConstantPoolEntry _ldc_w IConstantPoolEntry constantPoolEntry dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics LDC_W constantPoolEntry getKind IConstantPoolConstant CONSTANT_Float appendOutputforConstantFloat constantPoolEntry IConstantPoolConstant CONSTANT_Integer appendOutputforConstantInteger constantPoolEntry IConstantPoolConstant CONSTANT_String appendOutputForConstantString constantPoolEntry IConstantPoolConstant CONSTANT_Class appendOutputForConstantClass constantPoolEntry writeNewLine
see I Bytecode Visitor  ldc int int I Constant Pool Entry public void  ldc int pc int index I Constant Pool Entry constant Pool Entry dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LDC append Util bind disassembler constantpoolindex NON NLS 1 append index append Util bind disassembler space NON NLS 1 switch constant Pool Entry get Kind case I Constant Pool Constant CONSTANT Float append Outputfor Constant Float constant Pool Entry break case I Constant Pool Constant CONSTANT Integer append Outputfor Constant Integer constant Pool Entry break case I Constant Pool Constant CONSTANT String append Output For Constant String constant Pool Entry break case I Constant Pool Constant CONSTANT Class append Output For Constant Class constant Pool Entry write New Line  IBytecodeVisitor _ldc IConstantPoolEntry _ldc IConstantPoolEntry constantPoolEntry dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics constantPoolEntry getKind IConstantPoolConstant CONSTANT_Float appendOutputforConstantFloat constantPoolEntry IConstantPoolConstant CONSTANT_Integer appendOutputforConstantInteger constantPoolEntry IConstantPoolConstant CONSTANT_String appendOutputForConstantString constantPoolEntry IConstantPoolConstant CONSTANT_Class appendOutputForConstantClass constantPoolEntry writeNewLine
see I Bytecode Visitor  ldc2 w int int I Constant Pool Entry public void  ldc2 w int pc int index I Constant Pool Entry constant Pool Entry dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LDC2 W append Util bind disassembler constantpoolindex NON NLS 1 append index append Util bind disassembler space NON NLS 1 switch constant Pool Entry get Kind case I Constant Pool Constant CONSTANT Long append Output For Constant Long constant Pool Entry break case I Constant Pool Constant CONSTANT Double append Output For Constant Double constant Pool Entry write New Line  IBytecodeVisitor _ldc2_w IConstantPoolEntry _ldc2_w IConstantPoolEntry constantPoolEntry dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics LDC2_W constantPoolEntry getKind IConstantPoolConstant CONSTANT_Long appendOutputForConstantLong constantPoolEntry IConstantPoolConstant CONSTANT_Double appendOutputForConstantDouble constantPoolEntry writeNewLine
see I Bytecode Visitor  ldiv int public void  ldiv int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LDIV write New Line  IBytecodeVisitor _ldiv _ldiv dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  lload 0 int public void  lload 0 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LLOAD 0 write New Line  IBytecodeVisitor _lload_0 _lload_0 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics LLOAD_0 writeNewLine
see I Bytecode Visitor  lload 1 int public void  lload 1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LLOAD 1 write New Line  IBytecodeVisitor _lload_1 _lload_1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics LLOAD_1 writeNewLine
see I Bytecode Visitor  lload 2 int public void  lload 2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LLOAD 2 write New Line  IBytecodeVisitor _lload_2 _lload_2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics LLOAD_2 writeNewLine
see I Bytecode Visitor  lload 3 int public void  lload 3 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LLOAD 3 write New Line  IBytecodeVisitor _lload_3 _lload_3 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics LLOAD_3 writeNewLine
see I Bytecode Visitor  lload int int public void  lload int pc int index dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LLOAD append Util bind disassembler space NON NLS 1 append index write New Line  IBytecodeVisitor _lload _lload dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  lmul int public void  lmul int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LMUL write New Line  IBytecodeVisitor _lmul _lmul dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  lneg int public void  lneg int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LNEG write New Line  IBytecodeVisitor _lneg _lneg dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  lookupswitch int int int int public void  lookupswitch int pc int defaultoffset int npairs int offset pairs dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LOOKUPSWITCH append default NON NLS 1 append defaultoffset pc write New Line for int i 0 i npairs i write Extra Tabs 3 buffer append case NON NLS 1 append offset pairs i 0 append NON NLS 1 append offset pairs i 1 pc write New Line  IBytecodeVisitor _lookupswitch _lookupswitch offset_pairs dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine writeExtraTabs offset_pairs offset_pairs writeNewLine
see I Bytecode Visitor  lor int public void  lor int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LOR write New Line  IBytecodeVisitor _lor _lor dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  lrem int public void  lrem int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LREM write New Line  IBytecodeVisitor _lrem _lrem dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  lreturn int public void  lreturn int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LRETURN write New Line  IBytecodeVisitor _lreturn _lreturn dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  lshl int public void  lshl int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LSHL write New Line  IBytecodeVisitor _lshl _lshl dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  lshr int public void  lshr int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LSHR write New Line  IBytecodeVisitor _lshr _lshr dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  lstore 0 int public void  lstore 0 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LSTORE 0 write New Line  IBytecodeVisitor _lstore_0 _lstore_0 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics LSTORE_0 writeNewLine
see I Bytecode Visitor  lstore 1 int public void  lstore 1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LSTORE 1 write New Line  IBytecodeVisitor _lstore_1 _lstore_1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics LSTORE_1 writeNewLine
see I Bytecode Visitor  lstore 2 int public void  lstore 2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LSTORE 2 write New Line  IBytecodeVisitor _lstore_2 _lstore_2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics LSTORE_2 writeNewLine
see I Bytecode Visitor  lstore 3 int public void  lstore 3 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LSTORE 3 write New Line  IBytecodeVisitor _lstore_3 _lstore_3 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics LSTORE_3 writeNewLine
see I Bytecode Visitor  lstore int int public void  lstore int pc int index dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LSTORE append Util bind disassembler space NON NLS 1 append index write New Line  IBytecodeVisitor _lstore _lstore dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  lsub int public void  lsub int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LSUB write New Line  IBytecodeVisitor _lsub _lsub dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  lushr int public void  lushr int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LUSHR write New Line  IBytecodeVisitor _lushr _lushr dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  lxor int public void  lxor int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics LXOR write New Line  IBytecodeVisitor _lxor _lxor dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  monitorenter int public void  monitorenter int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics MONITORENTER write New Line  IBytecodeVisitor _monitorenter _monitorenter dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  monitorexit int public void  monitorexit int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics MONITOREXIT write New Line  IBytecodeVisitor _monitorexit _monitorexit dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  multianewarray int int int I Constant Pool Entry public void  multianewarray int pc int index int dimensions I Constant Pool Entry constant Class dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics MULTIANEWARRAY append Util bind disassembler constantpoolindex NON NLS 1 append index append Util bind disassembler space NON NLS 1 append return Constant Class Name constant Class append Dimensions dimensions write New Line  IBytecodeVisitor _multianewarray IConstantPoolEntry _multianewarray IConstantPoolEntry constantClass dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics returnConstantClassName constantClass appendDimensions writeNewLine
see I Bytecode Visitor  new int int I Constant Pool Entry public void  new int pc int index I Constant Pool Entry constant Class dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics NEW append Util bind disassembler constantpoolindex NON NLS 1 append index append Util bind disassembler space NON NLS 1 append return Constant Class Name constant Class write New Line  IBytecodeVisitor _new IConstantPoolEntry _new IConstantPoolEntry constantClass dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics returnConstantClassName constantClass writeNewLine
see I Bytecode Visitor  newarray int int public void  newarray int pc int atype dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics NEWARRAY append Util bind disassembler constantpoolindex NON NLS 1 append atype append Util bind disassembler space NON NLS 1 append Get Array Type atype write New Line  IBytecodeVisitor _newarray _newarray dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics appendGetArrayType writeNewLine
see I Bytecode Visitor  nop int public void  nop int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics NOP write New Line  IBytecodeVisitor _nop _nop dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  pop int public void  pop int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics POP write New Line  IBytecodeVisitor _pop _pop dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  pop2 int public void  pop2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics POP2 write New Line  IBytecodeVisitor _pop2 _pop2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  putfield int int I Constant Pool Entry public void  putfield int pc int index I Constant Pool Entry constant Fieldref dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics PUTFIELD append Util bind disassembler constantpoolindex NON NLS 1 append index append Util bind classformat putfield NON NLS 1 append return Declaring Class Name constant Fieldref append Util bind disassembler classmemberseparator NON NLS 1 append constant Fieldref get Field Name append Util bind disassembler space NON NLS 1 append constant Fieldref get Field Descriptor append Util bind classformat putfieldclose NON NLS 1 write New Line  IBytecodeVisitor _putfield IConstantPoolEntry _putfield IConstantPoolEntry constantFieldref dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics returnDeclaringClassName constantFieldref constantFieldref getFieldName constantFieldref getFieldDescriptor writeNewLine
see I Bytecode Visitor  putstatic int int I Constant Pool Entry public void  putstatic int pc int index I Constant Pool Entry constant Fieldref dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics PUTSTATIC append Util bind disassembler constantpoolindex NON NLS 1 append index append Util bind classformat putstatic NON NLS 1 append return Declaring Class Name constant Fieldref append Util bind disassembler classmemberseparator NON NLS 1 append constant Fieldref get Field Name append Util bind disassembler space NON NLS 1 append constant Fieldref get Field Descriptor append Util bind classformat putstaticclose NON NLS 1 write New Line  IBytecodeVisitor _putstatic IConstantPoolEntry _putstatic IConstantPoolEntry constantFieldref dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics returnDeclaringClassName constantFieldref constantFieldref getFieldName constantFieldref getFieldDescriptor writeNewLine
see I Bytecode Visitor  ret int int public void  ret int pc int index dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics RET append Util bind disassembler space NON NLS 1 append index write New Line  IBytecodeVisitor _ret _ret dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  return int public void  return int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics RETURN write New Line  IBytecodeVisitor _return _return dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  saload int public void  saload int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics SALOAD write New Line  IBytecodeVisitor _saload _saload dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  sastore int public void  sastore int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics SASTORE write New Line  IBytecodeVisitor _sastore _sastore dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  sipush int short public void  sipush int pc short value dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics SIPUSH append Util bind disassembler space NON NLS 1 append value write New Line  IBytecodeVisitor _sipush _sipush dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  swap int public void  swap int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics SWAP write New Line  IBytecodeVisitor _swap _swap dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  tableswitch int int int int int public void  tableswitch int pc int defaultoffset int low int high int jump offsets dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics TABLESWITCH append default NON NLS 1 append defaultoffset pc write New Line for int i low i high 1 i write Extra Tabs 3 buffer append case NON NLS 1 append i append NON NLS 1 append jump offsets i low pc write New Line  IBytecodeVisitor _tableswitch _tableswitch jump_offsets dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine writeExtraTabs jump_offsets writeNewLine
see I Bytecode Visitor  wide int int int public void  wide int pc int iincopcode int index int  const dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics WIDE write New Line  iinc pc 1 index  const  IBytecodeVisitor _wide _wide _const dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine _iinc _const
see I Bytecode Visitor  wide int int int public void  wide int pc int opcode int index dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics WIDE write New Line switch opcode case I Opcode Mnemonics ILOAD  iload pc 1 index break case I Opcode Mnemonics FLOAD  fload pc 1 index break case I Opcode Mnemonics ALOAD  aload pc 1 index break case I Opcode Mnemonics LLOAD  lload pc 1 index break case I Opcode Mnemonics DLOAD  dload pc 1 index break case I Opcode Mnemonics ISTORE  istore pc 1 index break case I Opcode Mnemonics FSTORE  fstore pc 1 index break case I Opcode Mnemonics ASTORE  astore pc 1 index break case I Opcode Mnemonics LSTORE  lstore pc 1 index break case I Opcode Mnemonics DSTORE  dstore pc 1 index break case I Opcode Mnemonics RET  ret pc 1 index  IBytecodeVisitor _wide _wide dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine IOpcodeMnemonics _iload IOpcodeMnemonics _fload IOpcodeMnemonics _aload IOpcodeMnemonics _lload IOpcodeMnemonics _dload IOpcodeMnemonics _istore IOpcodeMnemonics _fstore IOpcodeMnemonics _astore IOpcodeMnemonics _lstore IOpcodeMnemonics _dstore IOpcodeMnemonics _ret
see I Bytecode Visitor  breakpoint int public void  breakpoint int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics BREAKPOINT write New Line  IBytecodeVisitor _breakpoint _breakpoint dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  impdep1 int public void  impdep1 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IMPDEP1 write New Line  IBytecodeVisitor _impdep1 _impdep1 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
see I Bytecode Visitor  impdep2 int public void  impdep2 int pc dump Pc Number pc buffer append Opcode String Values BYTECODE NAMES I Opcode Mnemonics IMPDEP2 write New Line  IBytecodeVisitor _impdep2 _impdep2 dumpPcNumber OpcodeStringValues BYTECODE_NAMES IOpcodeMnemonics writeNewLine
private void append Dimensions int dimensions for int i 0 i dimensions i this buffer append Util bind disassembler arraydimensions NON NLS 1  appendDimensions
private void append Get Array Type int atype switch atype case T BOOLEAN this buffer append boolean NON NLS 1 break case T CHAR this buffer append char NON NLS 1 break case T FLOAT this buffer append float NON NLS 1 break case T DOUBLE this buffer append double NON NLS 1 break case T BYTE this buffer append byte NON NLS 1 break case T SHORT this buffer append short NON NLS 1 break case T INT this buffer append int NON NLS 1 break case T LONG this buffer append long NON NLS 1  appendGetArrayType T_BOOLEAN T_CHAR T_FLOAT T_DOUBLE T_BYTE T_SHORT T_INT T_LONG
private String return Constant Class Name I Constant Pool Entry constant Class char class Info Name constant Class get Class Info Name if class Info Name length 0 return EMPTY CLASS NAME else return new String class Info Name  returnConstantClassName IConstantPoolEntry constantClass classInfoName constantClass getClassInfoName classInfoName EMPTY_CLASS_NAME classInfoName
private String return Declaring Class Name I Constant Pool Entry constant Ref return new String constant Ref get Class Name  returnDeclaringClassName IConstantPoolEntry constantRef constantRef getClassName
private void append Output For Constant Double I Constant Pool Entry constant Pool Entry this buffer append Double NON NLS 1 append constant Pool Entry get Double Value append NON NLS 1  appendOutputForConstantDouble IConstantPoolEntry constantPoolEntry constantPoolEntry getDoubleValue
private void append Output For Constant Long I Constant Pool Entry constant Pool Entry this buffer append Long NON NLS 1 append constant Pool Entry get Long Value append NON NLS 1  appendOutputForConstantLong IConstantPoolEntry constantPoolEntry constantPoolEntry getLongValue
private void append Output For Constant String I Constant Pool Entry constant Pool Entry this buffer append String NON NLS 1 append constant Pool Entry get String Value append NON NLS 1  appendOutputForConstantString IConstantPoolEntry constantPoolEntry constantPoolEntry getStringValue
private void append Outputfor Constant Integer I Constant Pool Entry constant Pool Entry this buffer append Integer NON NLS 1 append constant Pool Entry get Integer Value append NON NLS 1  appendOutputforConstantInteger IConstantPoolEntry constantPoolEntry constantPoolEntry getIntegerValue
private void append Outputfor Constant Float I Constant Pool Entry constant Pool Entry this buffer append Float NON NLS 1 append constant Pool Entry get Float Value append NON NLS 1  appendOutputforConstantFloat IConstantPoolEntry constantPoolEntry constantPoolEntry getFloatValue
private void append Output For Constant Class I Constant Pool Entry constant Pool Entry this buffer append Class NON NLS 1 append return Constant Class Name constant Pool Entry append NON NLS 1  appendOutputForConstantClass IConstantPoolEntry constantPoolEntry returnConstantClassName constantPoolEntry
private void write New Line this buffer append line Separator  writeNewLine lineSeparator
private void write Tabs for int i 0 max this tab Number i max i this buffer append Util bind disassembler identation NON NLS 1  writeTabs tabNumber
private void write Extra Tabs int extra Tabs for int i 0 max this tab Number extra Tabs i max i this buffer append Util bind disassembler identation NON NLS 1  writeExtraTabs extraTabs tabNumber extraTabs

private void decode Modifiers For Field String Buffer buffer int access Flags boolean first Modifier true if access Flags I Modifier Constants ACC FINAL 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append final NON NLS 1 if access Flags I Modifier Constants ACC PRIVATE 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append private NON NLS 1 if access Flags I Modifier Constants ACC PROTECTED 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append protected NON NLS 1 if access Flags I Modifier Constants ACC PUBLIC 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append public NON NLS 1 if access Flags I Modifier Constants ACC STATIC 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append static NON NLS 1 if access Flags I Modifier Constants ACC TRANSIENT 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append transient NON NLS 1 if access Flags I Modifier Constants ACC VOLATILE 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append volatile NON NLS 1 if access Flags I Modifier Constants ACC ENUM 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append enum NON NLS 1 if first Modifier buffer append Util bind disassembler space NON NLS 1  decodeModifiersForField StringBuffer accessFlags firstModifier accessFlags IModifierConstants ACC_FINAL firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_PRIVATE firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_PROTECTED firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_PUBLIC firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_STATIC firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_TRANSIENT firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_VOLATILE firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_ENUM firstModifier firstModifier firstModifier firstModifier
private final void decode Modifiers For Inner Classes String Buffer buffer int access Flags boolean first Modifier true if access Flags I Modifier Constants ACC PUBLIC 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append public NON NLS 1 if access Flags I Modifier Constants ACC PRIVATE 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append private NON NLS 1 if access Flags I Modifier Constants ACC PROTECTED 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append protected NON NLS 1 if access Flags I Modifier Constants ACC STATIC 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append static NON NLS 1 if access Flags I Modifier Constants ACC FINAL 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append final NON NLS 1 if access Flags I Modifier Constants ACC ABSTRACT 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append abstract NON NLS 1 if first Modifier buffer append Util bind disassembler space NON NLS 1  decodeModifiersForInnerClasses StringBuffer accessFlags firstModifier accessFlags IModifierConstants ACC_PUBLIC firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_PRIVATE firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_PROTECTED firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_STATIC firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_FINAL firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_ABSTRACT firstModifier firstModifier firstModifier firstModifier
private final void decode Modifiers For Method String Buffer buffer int access Flags boolean first Modifier true if access Flags I Modifier Constants ACC ABSTRACT 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append abstract NON NLS 1 if access Flags I Modifier Constants ACC FINAL 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append final NON NLS 1 if access Flags I Modifier Constants ACC NATIVE 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append native NON NLS 1 if access Flags I Modifier Constants ACC PRIVATE 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append private NON NLS 1 if access Flags I Modifier Constants ACC PROTECTED 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append protected NON NLS 1 if access Flags I Modifier Constants ACC PUBLIC 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append public NON NLS 1 if access Flags I Modifier Constants ACC STATIC 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append static NON NLS 1 if access Flags I Modifier Constants ACC STRICT 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append strictfp NON NLS 1 if access Flags I Modifier Constants ACC SYNCHRONIZED 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append synchronized NON NLS 1 if access Flags I Modifier Constants ACC BRIDGE 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append bridge NON NLS 1 if access Flags I Modifier Constants ACC VARARGS 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append varargs NON NLS 1 if first Modifier buffer append Util bind disassembler space NON NLS 1  decodeModifiersForMethod StringBuffer accessFlags firstModifier accessFlags IModifierConstants ACC_ABSTRACT firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_FINAL firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_NATIVE firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_PRIVATE firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_PROTECTED firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_PUBLIC firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_STATIC firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_STRICT firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_SYNCHRONIZED firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_BRIDGE firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_VARARGS firstModifier firstModifier firstModifier firstModifier
private final void decode Modifiers For Type String Buffer buffer int access Flags boolean first Modifier true if access Flags I Modifier Constants ACC ABSTRACT 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append abstract NON NLS 1 if access Flags I Modifier Constants ACC FINAL 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append final NON NLS 1 if access Flags I Modifier Constants ACC PUBLIC 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append public NON NLS 1 if access Flags I Modifier Constants ACC ANNOTATION 0 if first Modifier buffer append Util bind disassembler space NON NLS 1 if first Modifier first Modifier false buffer append NON NLS 1 if first Modifier buffer append Util bind disassembler space NON NLS 1  decodeModifiersForType StringBuffer accessFlags firstModifier accessFlags IModifierConstants ACC_ABSTRACT firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_FINAL firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_PUBLIC firstModifier firstModifier firstModifier accessFlags IModifierConstants ACC_ANNOTATION firstModifier firstModifier firstModifier firstModifier
private String decode String Value String s String Buffer buffer new String Buffer char chars s to Char Array for int i 0 max chars length i max i char c chars i switch c case b buffer append b NON NLS 1 break case t buffer append t NON NLS 1 break case n buffer append n NON NLS 1 break case f buffer append f NON NLS 1 break case r buffer append r NON NLS 1 break case buffer append NON NLS 1 break case buffer append NON NLS 1 break case buffer append NON NLS 1 break case 0 buffer append 0 NON NLS 1 break case 1 buffer append 1 NON NLS 1 break case 2 buffer append 2 NON NLS 1 break case 3 buffer append 3 NON NLS 1 break case 4 buffer append 4 NON NLS 1 break case 5 buffer append 5 NON NLS 1 break case 6 buffer append 6 NON NLS 1 break case 7 buffer append 7 NON NLS 1 break default buffer append c return buffer to String  decodeStringValue StringBuffer StringBuffer toCharArray toString
see org eclipse jdt core util Class File Bytes Disassembler disassemble byte java lang String public String disassemble byte class File Bytes String line Separator throws Class Format Exception return disassemble new Class File Reader class File Bytes I Class File Reader ALL line Separator Class File Bytes Disassembler DEFAULT  ClassFileBytesDisassembler classFileBytes lineSeparator ClassFormatException ClassFileReader classFileBytes IClassFileReader lineSeparator ClassFileBytesDisassembler
see org eclipse jdt core util Class File Bytes Disassembler disassemble byte java lang String int public String disassemble byte class File Bytes String line Separator int mode throws Class Format Exception return disassemble new Class File Reader class File Bytes I Class File Reader ALL line Separator mode  ClassFileBytesDisassembler classFileBytes lineSeparator ClassFormatException ClassFileReader classFileBytes IClassFileReader lineSeparator
see disassemble org eclipse jdt core util I Class File Reader java lang String int public String disassemble I Class File Reader class File Reader String line Separator return disassemble class File Reader line Separator Class File Bytes Disassembler DEFAULT  IClassFileReader IClassFileReader classFileReader lineSeparator classFileReader lineSeparator ClassFileBytesDisassembler
Answers back the disassembled string of the I Class File Reader according to the mode This is an output quite similar to the javap tool param class File Reader The class File Reader to be disassembled param line Separator the line separator to use param mode the mode used to disassemble the I Class File Reader return the disassembled string of the I Class File Reader according to the mode public String disassemble I Class File Reader class File Reader String line Separator int mode if class File Reader null return EMPTY OUTPUT String Buffer buffer new String Buffer I Source Attribute source Attribute class File Reader get Source File Attribute I Class File Attribute class File Attribute Util get Attribute class File Reader I Attribute Names Constants SIGNATURE I Signature Attribute signature Attribute I Signature Attribute class File Attribute final int accesss Flags class File Reader get Access Flags if mode Class File Bytes Disassembler DETAILED int minor Version class File Reader get Minor Version int major Version class File Reader get Major Version buffer append Util bind disassembler begincommentline NON NLS 1 if source Attribute null buffer append Util bind disassembler sourceattributeheader NON NLS 1 buffer append source Attribute get Source File Name String version Number VERSION UNKNOWN NON NLS 1 if minor Version 3 major Version 45 version Number Java Core VERSION 1 1 else if minor Version 0 major Version 46 version Number Java Core VERSION 1 2 else if minor Version 0 major Version 47 version Number Java Core VERSION 1 3 else if minor Version 0 major Version 48 version Number Java Core VERSION 1 4 else if minor Version 0 major Version 49 version Number Java Core VERSION 1 5 buffer append Util bind classfileformat versiondetails NON NLS 1 new String version Number Integer to String major Version Integer to String minor Version accesss Flags I Modifier Constants ACC SUPER 0 Util bind classfileformat superflagisset NON NLS 1 Util bind classfileformat superflagisnotset NON NLS 1 is Deprecated class File Reader deprecated EMPTY OUTPUT NON NLS 1 write New Line buffer line Separator 0 if signature Attribute null buffer append Util bind disassembler begincommentline NON NLS 1 append Util bind disassembler signatureattributeheader NON NLS 1 append signature Attribute get Signature write New Line buffer line Separator 0 char class Name class File Reader get Class Name if class Name null incomplete initialization We cannot go further return buffer to String I Inner Classes Attribute inner Classes Attribute class File Reader get Inner Classes Attribute if inner Classes Attribute null search the right entry I Inner Classes Attribute Entry entries inner Classes Attribute get Inner Class Attributes Entries for int i 0 max entries length i max i I Inner Classes Attribute Entry entry entries i char inner Class Name entry get Inner Class Name if inner Class Name null if Char Operation equals class File Reader get Class Name inner Class Name decode Modifiers For Inner Classes buffer entry get Access Flags else decode Modifiers For Type buffer accesss Flags if is Synthetic class File Reader buffer append synthetic NON NLS 1 buffer append Util bind disassembler space NON NLS 1 if accesss Flags I Modifier Constants ACC ENUM 0 buffer append enum NON NLS 1 else if class File Reader is Class buffer append class NON NLS 1 else buffer append interface NON NLS 1 Char Operation replace class Name buffer append class Name char superclass Name class File Reader get Superclass Name if superclass Name null buffer append extends NON NLS 1 Char Operation replace superclass Name buffer append superclass Name char superclass Interfaces class File Reader get Interface Names int length superclass Interfaces length if length 0 buffer append implements NON NLS 1 for int i 0 i length 1 i char superinterface superclass Interfaces i Char Operation replace superinterface buffer append superinterface append Util bind disassembler comma NON NLS 1 append Util bind disassembler space NON NLS 1 char superinterface superclass Interfaces length 1 Char Operation replace superinterface buffer append superinterface buffer append Util bind disassembler opentypedeclaration NON NLS 1 disassemble Type Members class File Reader buffer line Separator 1 mode if mode Class File Bytes Disassembler DETAILED I Class File Attribute attributes class File Reader get Attributes length attributes length I Enclosing Method Attribute enclosing Method Attribute get Enclosing Method Attribute class File Reader int remaining Attributes Length length if inner Classes Attribute null remaining Attributes Length if enclosing Method Attribute null remaining Attributes Length if source Attribute null remaining Attributes Length if signature Attribute null remaining Attributes Length if inner Classes Attribute null enclosing Method Attribute null remaining Attributes Length 0 write New Line buffer line Separator 0 if inner Classes Attribute null disassemble inner Classes Attribute buffer line Separator 1 if enclosing Method Attribute null disassemble enclosing Method Attribute buffer line Separator 0 if length 0 for int i 0 i length i I Class File Attribute attribute attributes i if attribute inner Classes Attribute attribute source Attribute attribute signature Attribute attribute enclosing Method Attribute Char Operation equals attribute get Attribute Name I Attribute Names Constants DEPRECATED Char Operation equals attribute get Attribute Name I Attribute Names Constants SYNTHETIC disassemble attribute buffer line Separator 0 write New Line buffer line Separator 0 buffer append Util bind disassembler closetypedeclaration NON NLS 1 return buffer to String  IClassFileReader classFileReader classFileReader lineSeparator IClassFileReader IClassFileReader IClassFileReader classFileReader lineSeparator classFileReader EMPTY_OUTPUT StringBuffer StringBuffer ISourceAttribute sourceAttribute classFileReader getSourceFileAttribute IClassFileAttribute classFileAttribute getAttribute classFileReader IAttributeNamesConstants ISignatureAttribute signatureAttribute ISignatureAttribute classFileAttribute accesssFlags classFileReader getAccessFlags ClassFileBytesDisassembler minorVersion classFileReader getMinorVersion majorVersion classFileReader getMajorVersion sourceAttribute sourceAttribute getSourceFileName versionNumber VERSION_UNKNOWN minorVersion majorVersion versionNumber JavaCore VERSION_1_1 minorVersion majorVersion versionNumber JavaCore VERSION_1_2 minorVersion majorVersion versionNumber JavaCore VERSION_1_3 minorVersion majorVersion versionNumber JavaCore VERSION_1_4 minorVersion majorVersion versionNumber JavaCore VERSION_1_5 versionNumber toString majorVersion toString minorVersion accesssFlags IModifierConstants ACC_SUPER isDeprecated classFileReader EMPTY_OUTPUT writeNewLine lineSeparator signatureAttribute signatureAttribute getSignature writeNewLine lineSeparator className classFileReader getClassName className toString IInnerClassesAttribute innerClassesAttribute classFileReader getInnerClassesAttribute innerClassesAttribute IInnerClassesAttributeEntry innerClassesAttribute getInnerClassAttributesEntries IInnerClassesAttributeEntry innerClassName getInnerClassName innerClassName CharOperation classFileReader getClassName innerClassName decodeModifiersForInnerClasses getAccessFlags decodeModifiersForType accesssFlags isSynthetic classFileReader accesssFlags IModifierConstants ACC_ENUM classFileReader isClass CharOperation className className superclassName classFileReader getSuperclassName superclassName CharOperation superclassName superclassName superclassInterfaces classFileReader getInterfaceNames superclassInterfaces superclassInterfaces CharOperation superclassInterfaces CharOperation disassembleTypeMembers classFileReader lineSeparator ClassFileBytesDisassembler IClassFileAttribute classFileReader getAttributes IEnclosingMethodAttribute enclosingMethodAttribute getEnclosingMethodAttribute classFileReader remainingAttributesLength innerClassesAttribute remainingAttributesLength enclosingMethodAttribute remainingAttributesLength sourceAttribute remainingAttributesLength signatureAttribute remainingAttributesLength innerClassesAttribute enclosingMethodAttribute remainingAttributesLength writeNewLine lineSeparator innerClassesAttribute innerClassesAttribute lineSeparator enclosingMethodAttribute enclosingMethodAttribute lineSeparator IClassFileAttribute innerClassesAttribute sourceAttribute signatureAttribute enclosingMethodAttribute CharOperation getAttributeName IAttributeNamesConstants CharOperation getAttributeName IAttributeNamesConstants lineSeparator writeNewLine lineSeparator toString
private void disassemble I Inner Classes Attribute inner Classes Attribute String Buffer buffer String line Separator int tab Number write New Line buffer line Separator tab Number buffer append Util bind disassembler innerattributesheader NON NLS 1 write New Line buffer line Separator tab Number 1 I Inner Classes Attribute Entry inner Classes Attribute Entries inner Classes Attribute get Inner Class Attributes Entries int length inner Classes Attribute Entries length int inner Class Name Index outer Class Name Index inner Name Index access Flags I Inner Classes Attribute Entry inner Classes Attribute Entry for int i 0 i length 1 i inner Classes Attribute Entry inner Classes Attribute Entries i inner Class Name Index inner Classes Attribute Entry get Inner Class Name Index outer Class Name Index inner Classes Attribute Entry get Outer Class Name Index inner Name Index inner Classes Attribute Entry get Inner Name Index access Flags inner Classes Attribute Entry get Access Flags buffer append Util bind disassembler openinnerclassentry NON NLS 1 append Util bind disassembler inner class info name NON NLS 1 append Util bind disassembler constantpoolindex NON NLS 1 append inner Class Name Index if inner Class Name Index 0 buffer append Util bind disassembler space NON NLS 1 append inner Classes Attribute Entry get Inner Class Name buffer append Util bind disassembler comma NON NLS 1 append Util bind disassembler space NON NLS 1 append Util bind disassembler outer class info name NON NLS 1 append Util bind disassembler constantpoolindex NON NLS 1 append outer Class Name Index if outer Class Name Index 0 buffer append Util bind disassembler space NON NLS 1 append inner Classes Attribute Entry get Outer Class Name write New Line buffer line Separator tab Number dump Tab tab Number buffer buffer append Util bind disassembler space NON NLS 1 buffer append Util bind disassembler inner name NON NLS 1 append Util bind disassembler constantpoolindex NON NLS 1 append inner Name Index if inner Name Index 0 buffer append Util bind disassembler space NON NLS 1 append inner Classes Attribute Entry get Inner Name buffer append Util bind disassembler comma NON NLS 1 append Util bind disassembler space NON NLS 1 append Util bind disassembler inner accessflags NON NLS 1 append access Flags append Util bind disassembler space NON NLS 1 decode Modifiers For Inner Classes buffer access Flags buffer append Util bind disassembler closeinnerclassentry NON NLS 1 append Util bind disassembler comma NON NLS 1 write New Line buffer line Separator tab Number 1 last entry inner Classes Attribute Entry inner Classes Attribute Entries length 1 inner Class Name Index inner Classes Attribute Entry get Inner Class Name Index outer Class Name Index inner Classes Attribute Entry get Outer Class Name Index inner Name Index inner Classes Attribute Entry get Inner Name Index access Flags inner Classes Attribute Entry get Access Flags buffer append Util bind disassembler openinnerclassentry NON NLS 1 append Util bind disassembler inner class info name NON NLS 1 append Util bind disassembler constantpoolindex NON NLS 1 append inner Class Name Index if inner Class Name Index 0 buffer append Util bind disassembler space NON NLS 1 append inner Classes Attribute Entry get Inner Class Name buffer append Util bind disassembler comma NON NLS 1 append Util bind disassembler space NON NLS 1 append Util bind disassembler outer class info name NON NLS 1 append Util bind disassembler constantpoolindex NON NLS 1 append outer Class Name Index if outer Class Name Index 0 buffer append Util bind disassembler space NON NLS 1 append inner Classes Attribute Entry get Outer Class Name write New Line buffer line Separator tab Number dump Tab tab Number buffer buffer append Util bind disassembler space NON NLS 1 buffer append Util bind disassembler inner name NON NLS 1 append Util bind disassembler constantpoolindex NON NLS 1 append inner Name Index if inner Name Index 0 buffer append Util bind disassembler space NON NLS 1 append inner Classes Attribute Entry get Inner Name buffer append Util bind disassembler comma NON NLS 1 append Util bind disassembler space NON NLS 1 append Util bind disassembler inner accessflags NON NLS 1 append access Flags append Util bind disassembler space NON NLS 1 decode Modifiers For Inner Classes buffer access Flags buffer append Util bind disassembler closeinnerclassentry NON NLS 1  IInnerClassesAttribute innerClassesAttribute StringBuffer lineSeparator tabNumber writeNewLine lineSeparator tabNumber writeNewLine lineSeparator tabNumber IInnerClassesAttributeEntry innerClassesAttributeEntries innerClassesAttribute getInnerClassAttributesEntries innerClassesAttributeEntries innerClassNameIndex outerClassNameIndex innerNameIndex accessFlags IInnerClassesAttributeEntry innerClassesAttributeEntry innerClassesAttributeEntry innerClassesAttributeEntries innerClassNameIndex innerClassesAttributeEntry getInnerClassNameIndex outerClassNameIndex innerClassesAttributeEntry getOuterClassNameIndex innerNameIndex innerClassesAttributeEntry getInnerNameIndex accessFlags innerClassesAttributeEntry getAccessFlags inner_class_info_name innerClassNameIndex innerClassNameIndex innerClassesAttributeEntry getInnerClassName outer_class_info_name outerClassNameIndex outerClassNameIndex innerClassesAttributeEntry getOuterClassName writeNewLine lineSeparator tabNumber dumpTab tabNumber inner_name innerNameIndex innerNameIndex innerClassesAttributeEntry getInnerName inner_accessflags accessFlags decodeModifiersForInnerClasses accessFlags writeNewLine lineSeparator tabNumber innerClassesAttributeEntry innerClassesAttributeEntries innerClassNameIndex innerClassesAttributeEntry getInnerClassNameIndex outerClassNameIndex innerClassesAttributeEntry getOuterClassNameIndex innerNameIndex innerClassesAttributeEntry getInnerNameIndex accessFlags innerClassesAttributeEntry getAccessFlags inner_class_info_name innerClassNameIndex innerClassNameIndex innerClassesAttributeEntry getInnerClassName outer_class_info_name outerClassNameIndex outerClassNameIndex innerClassesAttributeEntry getOuterClassName writeNewLine lineSeparator tabNumber dumpTab tabNumber inner_name innerNameIndex innerNameIndex innerClassesAttributeEntry getInnerName inner_accessflags accessFlags decodeModifiersForInnerClasses accessFlags
Disassemble a field info private void disassemble I Field Info field Info String Buffer buffer String line Separator int tab Number int mode write New Line buffer line Separator tab Number char field Descriptor field Info get Descriptor I Class File Attribute class File Attribute Util get Attribute field Info I Attribute Names Constants SIGNATURE I Signature Attribute signature Attribute I Signature Attribute class File Attribute if mode DETAILED buffer append Util bind disassembler begincommentline NON NLS 1 append Util bind classfileformat fieldddescriptor NON NLS 1 append Util bind classfileformat fielddescriptorindex NON NLS 1 append field Info get Descriptor Index append Util bind disassembler space NON NLS 1 append field Descriptor if field Info is Deprecated buffer append Util bind disassembler deprecated NON NLS 1 write New Line buffer line Separator tab Number if signature Attribute null buffer append Util bind disassembler begincommentline NON NLS 1 append Util bind disassembler signatureattributeheader NON NLS 1 append signature Attribute get Signature write New Line buffer line Separator tab Number decode Modifiers For Field buffer field Info get Access Flags if field Info is Synthetic buffer append synthetic NON NLS 1 buffer append Util bind disassembler space NON NLS 1 buffer append get Signature For Field field Descriptor buffer append Util bind disassembler space NON NLS 1 buffer append new String field Info get Name I Constant Value Attribute constant Value Attribute field Info get Constant Value Attribute if constant Value Attribute null buffer append Util bind disassembler fieldhasconstant NON NLS 1 I Constant Pool Entry constant Pool Entry constant Value Attribute get Constant Value switch constant Pool Entry get Kind case I Constant Pool Constant CONSTANT Long buffer append constant Pool Entry get Long Value L NON NLS 1 break case I Constant Pool Constant CONSTANT Float buffer append constant Pool Entry get Float Value f NON NLS 1 break case I Constant Pool Constant CONSTANT Double buffer append constant Pool Entry get Double Value break case I Constant Pool Constant CONSTANT Integer switch field Descriptor 0 case C buffer append char constant Pool Entry get Integer Value NON NLS 1 NON NLS 2 break case Z buffer append constant Pool Entry get Integer Value 1 true false NON NLS 1 NON NLS 2 break case B buffer append constant Pool Entry get Integer Value break case S buffer append constant Pool Entry get Integer Value break case I buffer append constant Pool Entry get Integer Value break case I Constant Pool Constant CONSTANT String buffer append decode String Value constant Pool Entry get String Value NON NLS 1 NON NLS 2 buffer append Util bind disassembler endoffieldheader NON NLS 1 if mode DETAILED I Class File Attribute attributes field Info get Attributes int length attributes length if length 0 for int i 0 i length i I Class File Attribute attribute attributes i if attribute constant Value Attribute attribute signature Attribute Char Operation equals attribute get Attribute Name I Attribute Names Constants DEPRECATED Char Operation equals attribute get Attribute Name I Attribute Names Constants SYNTHETIC disassemble attribute buffer line Separator tab Number  IFieldInfo fieldInfo StringBuffer lineSeparator tabNumber writeNewLine lineSeparator tabNumber fieldDescriptor fieldInfo getDescriptor IClassFileAttribute classFileAttribute getAttribute fieldInfo IAttributeNamesConstants ISignatureAttribute signatureAttribute ISignatureAttribute classFileAttribute fieldInfo getDescriptorIndex fieldDescriptor fieldInfo isDeprecated writeNewLine lineSeparator tabNumber signatureAttribute signatureAttribute getSignature writeNewLine lineSeparator tabNumber decodeModifiersForField fieldInfo getAccessFlags fieldInfo isSynthetic getSignatureForField fieldDescriptor fieldInfo getName IConstantValueAttribute constantValueAttribute fieldInfo getConstantValueAttribute constantValueAttribute IConstantPoolEntry constantPoolEntry constantValueAttribute getConstantValue constantPoolEntry getKind IConstantPoolConstant CONSTANT_Long constantPoolEntry getLongValue IConstantPoolConstant CONSTANT_Float constantPoolEntry getFloatValue IConstantPoolConstant CONSTANT_Double constantPoolEntry getDoubleValue IConstantPoolConstant CONSTANT_Integer fieldDescriptor constantPoolEntry getIntegerValue constantPoolEntry getIntegerValue constantPoolEntry getIntegerValue constantPoolEntry getIntegerValue constantPoolEntry getIntegerValue IConstantPoolConstant CONSTANT_String decodeStringValue constantPoolEntry getStringValue IClassFileAttribute fieldInfo getAttributes IClassFileAttribute constantValueAttribute signatureAttribute CharOperation getAttributeName IAttributeNamesConstants CharOperation getAttributeName IAttributeNamesConstants lineSeparator tabNumber
Disassemble a method info header private void disassemble I Class File Reader class File Reader I Method Info method Info String Buffer buffer String line Separator int tab Number int mode write New Line buffer line Separator tab Number I Code Attribute code Attribute method Info get Code Attribute char method Descriptor method Info get Descriptor I Class File Attribute class File Attribute Util get Attribute method Info I Attribute Names Constants SIGNATURE I Signature Attribute signature Attribute I Signature Attribute class File Attribute if mode DETAILED buffer append Util bind disassembler begincommentline NON NLS 1 append Util bind classfileformat methoddescriptor NON NLS 1 append Util bind disassembler constantpoolindex NON NLS 1 append method Info get Descriptor Index append Util bind disassembler space NON NLS 1 append method Descriptor if method Info is Deprecated buffer append Util bind disassembler deprecated NON NLS 1 write New Line buffer line Separator tab Number if signature Attribute null buffer append Util bind disassembler begincommentline NON NLS 1 append Util bind disassembler signatureattributeheader NON NLS 1 append signature Attribute get Signature write New Line buffer line Separator tab Number if code Attribute null buffer append Util bind disassembler begincommentline NON NLS 1 append Util bind classfileformat max Stack NON NLS 1 append code Attribute get Max Stack append Util bind disassembler comma NON NLS 1 append Util bind disassembler space NON NLS 1 append Util bind classfileformat max Locals NON NLS 1 append code Attribute get Max Locals write New Line buffer line Separator tab Number int access Flags method Info get Access Flags decode Modifiers For Method buffer access Flags if method Info is Synthetic buffer append synthetic NON NLS 1 buffer append Util bind disassembler space NON NLS 1 Char Operation replace method Descriptor char method Name null if method Info is Constructor method Name class File Reader get Class Name buffer append Signature to Char Array method Descriptor method Name get Parameter Names method Descriptor code Attribute access Flags true false else if method Info is Clinit method Name Util bind classfileformat clinitname to Char Array NON NLS 1 buffer append method Name else method Name method Info get Name buffer append Signature to Char Array method Descriptor method Name get Parameter Names method Descriptor code Attribute access Flags false true I Exception Attribute exception Attribute method Info get Exception Attribute if exception Attribute null buffer append throws NON NLS 1 char exception Names exception Attribute get Exception Names int length exception Names length for int i 0 i length 1 i char exception Name exception Names i Char Operation replace exception Name buffer append exception Name append Util bind disassembler comma NON NLS 1 append Util bind disassembler space NON NLS 1 char exception Name exception Names length 1 Char Operation replace exception Name buffer append exception Name buffer append Util bind disassembler endofmethodheader NON NLS 1 if mode DETAILED I Class File Attribute attributes method Info get Attributes int length attributes length if length 0 for int i 0 i length i I Class File Attribute attribute attributes i if attribute code Attribute attribute exception Attribute attribute signature Attribute Char Operation equals attribute get Attribute Name I Attribute Names Constants DEPRECATED Char Operation equals attribute get Attribute Name I Attribute Names Constants SYNTHETIC disassemble attribute buffer line Separator tab Number write New Line buffer line Separator tab Number if code Attribute null disassemble code Attribute buffer line Separator tab Number  IClassFileReader classFileReader IMethodInfo methodInfo StringBuffer lineSeparator tabNumber writeNewLine lineSeparator tabNumber ICodeAttribute codeAttribute methodInfo getCodeAttribute methodDescriptor methodInfo getDescriptor IClassFileAttribute classFileAttribute getAttribute methodInfo IAttributeNamesConstants ISignatureAttribute signatureAttribute ISignatureAttribute classFileAttribute methodInfo getDescriptorIndex methodDescriptor methodInfo isDeprecated writeNewLine lineSeparator tabNumber signatureAttribute signatureAttribute getSignature writeNewLine lineSeparator tabNumber codeAttribute maxStack codeAttribute getMaxStack maxLocals codeAttribute getMaxLocals writeNewLine lineSeparator tabNumber accessFlags methodInfo getAccessFlags decodeModifiersForMethod accessFlags methodInfo isSynthetic CharOperation methodDescriptor methodName methodInfo isConstructor methodName classFileReader getClassName toCharArray methodDescriptor methodName getParameterNames methodDescriptor codeAttribute accessFlags methodInfo isClinit methodName toCharArray methodName methodName methodInfo getName toCharArray methodDescriptor methodName getParameterNames methodDescriptor codeAttribute accessFlags IExceptionAttribute exceptionAttribute methodInfo getExceptionAttribute exceptionAttribute exceptionNames exceptionAttribute getExceptionNames exceptionNames exceptionName exceptionNames CharOperation exceptionName exceptionName exceptionName exceptionNames CharOperation exceptionName exceptionName IClassFileAttribute methodInfo getAttributes IClassFileAttribute codeAttribute exceptionAttribute signatureAttribute CharOperation getAttributeName IAttributeNamesConstants CharOperation getAttributeName IAttributeNamesConstants lineSeparator tabNumber writeNewLine lineSeparator tabNumber codeAttribute codeAttribute lineSeparator tabNumber
private void disassemble I Class File Attribute class File Attribute String Buffer buffer String line Separator int tab Number write New Line buffer line Separator tab Number 1 buffer append Util bind disassembler genericattributeheader NON NLS 1 buffer append Util bind disassembler genericattributename NON NLS 1 append class File Attribute get Attribute Name append Util bind disassembler genericattributelength NON NLS 1 append class File Attribute get Attribute Length  IClassFileAttribute classFileAttribute StringBuffer lineSeparator tabNumber writeNewLine lineSeparator tabNumber classFileAttribute getAttributeName classFileAttribute getAttributeLength
private void disassemble I Code Attribute code Attribute String Buffer buffer String line Separator int tab Number write New Line buffer line Separator tab Number 1 Default Bytecode Visitor visitor new Default Bytecode Visitor code Attribute get Code Length buffer line Separator tab Number try code Attribute traverse visitor catch Class Format Exception e dump Tab tab Number 2 buffer buffer append Class format Exception NON NLS 1 write New Line buffer line Separator tab Number 1 int exception Table Length code Attribute get Exception Table Length if exception Table Length 0 final int tab Number For Exception Attribute tab Number 2 dump Tab tab Number For Exception Attribute buffer I Exception Table Entry exception Table Entries code Attribute get Exception Table buffer append Util bind disassembler exceptiontableheader NON NLS 1 write New Line buffer line Separator tab Number For Exception Attribute 1 for int i 0 i exception Table Length 1 i I Exception Table Entry exception Table Entry exception Table Entries i buffer append Util bind classfileformat exceptiontablefrom NON NLS 1 append exception Table Entry get StartPC append Util bind classfileformat exceptiontableto NON NLS 1 append exception Table Entry get EndPC append Util bind classfileformat exceptiontablegoto NON NLS 1 append exception Table Entry get HandlerPC append Util bind classfileformat exceptiontablewhen NON NLS 1 if exception Table Entry get Catch Type Index 0 buffer append ANY EXCEPTION else char catch Type exception Table Entry get Catch Type Char Operation replace catch Type buffer append catch Type write New Line buffer line Separator tab Number For Exception Attribute 1 I Exception Table Entry exception Table Entry exception Table Entries exception Table Length 1 buffer append Util bind classfileformat exceptiontablefrom NON NLS 1 append exception Table Entry get StartPC append Util bind classfileformat exceptiontableto NON NLS 1 append exception Table Entry get EndPC append Util bind classfileformat exceptiontablegoto NON NLS 1 append exception Table Entry get HandlerPC append Util bind classfileformat exceptiontablewhen NON NLS 1 if exception Table Entry get Catch Type Index 0 buffer append ANY EXCEPTION else char catch Type exception Table Entry get Catch Type Char Operation replace catch Type buffer append catch Type write New Line buffer line Separator 0 I Line Number Attribute line Number Attribute code Attribute get Line Number Attribute int line Attribute Length line Number Attribute null 0 line Number Attribute get Line Number Table Length if line Attribute Length 0 int tab Number For Line Attribute tab Number 2 dump Tab tab Number For Line Attribute buffer buffer append Util bind disassembler linenumberattributeheader NON NLS 1 write New Line buffer line Separator tab Number For Line Attribute 1 int lineattributes Entries line Number Attribute get Line Number Table for int i 0 i line Attribute Length 1 i buffer append Util bind classfileformat linenumbertablefrom NON NLS 1 append lineattributes Entries i 0 append Util bind classfileformat linenumbertableto NON NLS 1 append lineattributes Entries i 1 append Util bind classfileformat linenumbertableclose NON NLS 1 write New Line buffer line Separator tab Number For Line Attribute 1 buffer append Util bind classfileformat linenumbertablefrom NON NLS 1 append lineattributes Entries line Attribute Length 1 0 append Util bind classfileformat linenumbertableto NON NLS 1 append lineattributes Entries line Attribute Length 1 1 append Util bind classfileformat linenumbertableclose NON NLS 1 I Local Variable Attribute local Variable Attribute code Attribute get Local Variable Attribute int local Variable Attribute Length local Variable Attribute null 0 local Variable Attribute get Local Variable Table Length if local Variable Attribute Length 0 int tab Number For Local Variable Attribute tab Number 2 write New Line buffer line Separator tab Number For Local Variable Attribute buffer append Util bind disassembler localvariabletableattributeheader NON NLS 1 write New Line buffer line Separator tab Number For Local Variable Attribute 1 I Local Variable Table Entry local Variable Table Entries local Variable Attribute get Local Variable Table for int i 0 i local Variable Attribute Length 1 i I Local Variable Table Entry local Variable Table Entry local Variable Table Entries i int index local Variable Table Entry get Index int startPC local Variable Table Entry get StartPC int length local Variable Table Entry get Length buffer append Util bind classfileformat localvariabletablefrom NON NLS 1 append startPC append Util bind classfileformat localvariabletableto NON NLS 1 append startPC length append Util bind classfileformat localvariabletablelocalname NON NLS 1 append local Variable Table Entry get Name append Util bind classfileformat localvariabletablelocalindex NON NLS 1 append index append Util bind classfileformat localvariabletablelocaltype NON NLS 1 buffer append local Variable Table Entry get Descriptor write New Line buffer line Separator tab Number For Local Variable Attribute 1 I Local Variable Table Entry local Variable Table Entry local Variable Table Entries local Variable Attribute Length 1 int index local Variable Table Entry get Index int startPC local Variable Table Entry get StartPC int length local Variable Table Entry get Length buffer append Util bind classfileformat localvariabletablefrom NON NLS 1 append startPC append Util bind classfileformat localvariabletableto NON NLS 1 append startPC length append Util bind classfileformat localvariabletablelocalname NON NLS 1 append local Variable Table Entry get Name append Util bind classfileformat localvariabletablelocalindex NON NLS 1 append index append Util bind classfileformat localvariabletablelocaltype NON NLS 1 buffer append local Variable Table Entry get Descriptor I Local Variable Type Table Attribute local Variable Type Attribute get Local Variable Type Attribute code Attribute int local Variable Type Table Length local Variable Type Attribute null 0 local Variable Type Attribute get Local Variable Type Table Length if local Variable Type Table Length 0 int tab Number For Local Variable Attribute tab Number 2 write New Line buffer line Separator tab Number For Local Variable Attribute buffer append Util bind disassembler localvariabletypetableattributeheader NON NLS 1 write New Line buffer line Separator tab Number For Local Variable Attribute 1 I Local Variable Type Table Entry local Variable Type Table Entries local Variable Type Attribute get Local Variable Type Table for int i 0 i local Variable Type Table Length 1 i I Local Variable Type Table Entry local Variable Type Table Entry local Variable Type Table Entries i int index local Variable Type Table Entry get Index int startPC local Variable Type Table Entry get StartPC int length local Variable Type Table Entry get Length buffer append Util bind classfileformat localvariabletablefrom NON NLS 1 append startPC append Util bind classfileformat localvariabletableto NON NLS 1 append startPC length append Util bind classfileformat localvariabletablelocalname NON NLS 1 append local Variable Type Table Entry get Name append Util bind classfileformat localvariabletablelocalindex NON NLS 1 append index append Util bind classfileformat localvariabletablelocaltype NON NLS 1 buffer append local Variable Type Table Entry get Signature write New Line buffer line Separator tab Number For Local Variable Attribute 1 I Local Variable Type Table Entry local Variable Type Table Entry local Variable Type Table Entries local Variable Type Table Length 1 int index local Variable Type Table Entry get Index int startPC local Variable Type Table Entry get StartPC int length local Variable Type Table Entry get Length buffer append Util bind classfileformat localvariabletablefrom NON NLS 1 append startPC append Util bind classfileformat localvariabletableto NON NLS 1 append startPC length append Util bind classfileformat localvariabletablelocalname NON NLS 1 append local Variable Type Table Entry get Name append Util bind classfileformat localvariabletablelocalindex NON NLS 1 append index append Util bind classfileformat localvariabletablelocaltype NON NLS 1 append local Variable Type Table Entry get Signature  ICodeAttribute codeAttribute StringBuffer lineSeparator tabNumber writeNewLine lineSeparator tabNumber DefaultBytecodeVisitor DefaultBytecodeVisitor codeAttribute getCodeLength lineSeparator tabNumber codeAttribute ClassFormatException dumpTab tabNumber writeNewLine lineSeparator tabNumber exceptionTableLength codeAttribute getExceptionTableLength exceptionTableLength tabNumberForExceptionAttribute tabNumber dumpTab tabNumberForExceptionAttribute IExceptionTableEntry exceptionTableEntries codeAttribute getExceptionTable writeNewLine lineSeparator tabNumberForExceptionAttribute exceptionTableLength IExceptionTableEntry exceptionTableEntry exceptionTableEntries exceptionTableEntry getStartPC exceptionTableEntry getEndPC exceptionTableEntry getHandlerPC exceptionTableEntry getCatchTypeIndex ANY_EXCEPTION catchType exceptionTableEntry getCatchType CharOperation catchType catchType writeNewLine lineSeparator tabNumberForExceptionAttribute IExceptionTableEntry exceptionTableEntry exceptionTableEntries exceptionTableLength exceptionTableEntry getStartPC exceptionTableEntry getEndPC exceptionTableEntry getHandlerPC exceptionTableEntry getCatchTypeIndex ANY_EXCEPTION catchType exceptionTableEntry getCatchType CharOperation catchType catchType writeNewLine lineSeparator ILineNumberAttribute lineNumberAttribute codeAttribute getLineNumberAttribute lineAttributeLength lineNumberAttribute lineNumberAttribute getLineNumberTableLength lineAttributeLength tabNumberForLineAttribute tabNumber dumpTab tabNumberForLineAttribute writeNewLine lineSeparator tabNumberForLineAttribute lineattributesEntries lineNumberAttribute getLineNumberTable lineAttributeLength lineattributesEntries lineattributesEntries writeNewLine lineSeparator tabNumberForLineAttribute lineattributesEntries lineAttributeLength lineattributesEntries lineAttributeLength ILocalVariableAttribute localVariableAttribute codeAttribute getLocalVariableAttribute localVariableAttributeLength localVariableAttribute localVariableAttribute getLocalVariableTableLength localVariableAttributeLength tabNumberForLocalVariableAttribute tabNumber writeNewLine lineSeparator tabNumberForLocalVariableAttribute writeNewLine lineSeparator tabNumberForLocalVariableAttribute ILocalVariableTableEntry localVariableTableEntries localVariableAttribute getLocalVariableTable localVariableAttributeLength ILocalVariableTableEntry localVariableTableEntry localVariableTableEntries localVariableTableEntry getIndex localVariableTableEntry getStartPC localVariableTableEntry getLength localVariableTableEntry getName localVariableTableEntry getDescriptor writeNewLine lineSeparator tabNumberForLocalVariableAttribute ILocalVariableTableEntry localVariableTableEntry localVariableTableEntries localVariableAttributeLength localVariableTableEntry getIndex localVariableTableEntry getStartPC localVariableTableEntry getLength localVariableTableEntry getName localVariableTableEntry getDescriptor ILocalVariableTypeTableAttribute localVariableTypeAttribute getLocalVariableTypeAttribute codeAttribute localVariableTypeTableLength localVariableTypeAttribute localVariableTypeAttribute getLocalVariableTypeTableLength localVariableTypeTableLength tabNumberForLocalVariableAttribute tabNumber writeNewLine lineSeparator tabNumberForLocalVariableAttribute writeNewLine lineSeparator tabNumberForLocalVariableAttribute ILocalVariableTypeTableEntry localVariableTypeTableEntries localVariableTypeAttribute getLocalVariableTypeTable localVariableTypeTableLength ILocalVariableTypeTableEntry localVariableTypeTableEntry localVariableTypeTableEntries localVariableTypeTableEntry getIndex localVariableTypeTableEntry getStartPC localVariableTypeTableEntry getLength localVariableTypeTableEntry getName localVariableTypeTableEntry getSignature writeNewLine lineSeparator tabNumberForLocalVariableAttribute ILocalVariableTypeTableEntry localVariableTypeTableEntry localVariableTypeTableEntries localVariableTypeTableLength localVariableTypeTableEntry getIndex localVariableTypeTableEntry getStartPC localVariableTypeTableEntry getLength localVariableTypeTableEntry getName localVariableTypeTableEntry getSignature
private void disassemble I Enclosing Method Attribute enclosing Method Attribute String Buffer buffer String line Separator int tab Number write New Line buffer line Separator tab Number 1 buffer append Util bind disassembler enclosingmethodheader NON NLS 1 buffer append Util bind disassembler constantpoolindex NON NLS 1 append enclosing Method Attribute get Enclosing Class Index append NON NLS 1 append Util bind disassembler constantpoolindex NON NLS 1 append enclosing Method Attribute get Method Name And Type Index append NON NLS 1 append enclosing Method Attribute get Enclosing Class NON NLS 1 append NON NLS 1 append enclosing Method Attribute get Method Name NON NLS 1 append enclosing Method Attribute get Method Descriptor NON NLS 1  IEnclosingMethodAttribute enclosingMethodAttribute StringBuffer lineSeparator tabNumber writeNewLine lineSeparator tabNumber enclosingMethodAttribute getEnclosingClassIndex enclosingMethodAttribute getMethodNameAndTypeIndex enclosingMethodAttribute getEnclosingClass enclosingMethodAttribute getMethodName enclosingMethodAttribute getMethodDescriptor
private void disassemble Type Members I Class File Reader class File Reader String Buffer buffer String line Separator int tab Number int mode I Field Info fields class File Reader get Field Infos for int i 0 max fields length i max i write New Line buffer line Separator tab Number disassemble fields i buffer line Separator tab Number mode I Method Info methods class File Reader get Method Infos for int i 0 max methods length i max i write New Line buffer line Separator tab Number disassemble class File Reader methods i buffer line Separator tab Number mode  disassembleTypeMembers IClassFileReader classFileReader StringBuffer lineSeparator tabNumber IFieldInfo classFileReader getFieldInfos writeNewLine lineSeparator tabNumber lineSeparator tabNumber IMethodInfo classFileReader getMethodInfos writeNewLine lineSeparator tabNumber classFileReader lineSeparator tabNumber
private final void dump Tab int tab Number String Buffer buffer for int i 0 i tab Number i buffer append Util bind disassembler identation NON NLS 1  dumpTab tabNumber StringBuffer tabNumber
see org eclipse jdt core util Class File Bytes Disassembler get Description public String get Description return Util bind disassembler description NON NLS 1  ClassFileBytesDisassembler getDescription getDescription
private I Enclosing Method Attribute get Enclosing Method Attribute I Class File Reader class File Reader I Class File Attribute attributes class File Reader get Attributes for int i 0 max attributes length i max i if Char Operation equals attributes i get Attribute Name I Attribute Names Constants ENCLOSING METHOD return I Enclosing Method Attribute attributes i return null  IEnclosingMethodAttribute getEnclosingMethodAttribute IClassFileReader classFileReader IClassFileAttribute classFileReader getAttributes CharOperation getAttributeName IAttributeNamesConstants ENCLOSING_METHOD IEnclosingMethodAttribute
Method get Entry For param local Index param entries return I Local Variable Table Entry private I Local Variable Table Entry get Entry For int local Index I Local Variable Table Entry entries for int i 0 max entries length i max i I Local Variable Table Entry entry entries i if local Index entry get Index return entry return null  getEntryFor localIndex ILocalVariableTableEntry ILocalVariableTableEntry getEntryFor localIndex ILocalVariableTableEntry ILocalVariableTableEntry localIndex getIndex
private I Local Variable Type Table Attribute get Local Variable Type Attribute I Code Attribute code Attribute I Class File Attribute attributes code Attribute get Attributes for int i 0 max attributes length i max i if Char Operation equals attributes i get Attribute Name I Attribute Names Constants LOCAL VARIABLE TYPE TABLE return I Local Variable Type Table Attribute attributes i return null  ILocalVariableTypeTableAttribute getLocalVariableTypeAttribute ICodeAttribute codeAttribute IClassFileAttribute codeAttribute getAttributes CharOperation getAttributeName IAttributeNamesConstants LOCAL_VARIABLE_TYPE_TABLE ILocalVariableTypeTableAttribute
private char get Signature For Field char field Descriptor final int length field Descriptor length char new Field Descriptor new char length System arraycopy field Descriptor 0 new Field Descriptor 0 length Char Operation replace new Field Descriptor Char Operation replace new Field Descriptor char field Descriptor Signature Signature to Char Array new Field Descriptor Char Operation replace field Descriptor Signature return field Descriptor Signature  getSignatureForField fieldDescriptor fieldDescriptor newFieldDescriptor fieldDescriptor newFieldDescriptor CharOperation newFieldDescriptor CharOperation newFieldDescriptor fieldDescriptorSignature toCharArray newFieldDescriptor CharOperation fieldDescriptorSignature fieldDescriptorSignature
private boolean is Deprecated I Class File Reader class File Reader I Class File Attribute attributes class File Reader get Attributes for int i 0 max attributes length i max i if Char Operation equals attributes i get Attribute Name I Attribute Names Constants DEPRECATED return true return false  isDeprecated IClassFileReader classFileReader IClassFileAttribute classFileReader getAttributes CharOperation getAttributeName IAttributeNamesConstants
private boolean is Synthetic I Class File Reader class File Reader int flags class File Reader get Access Flags if flags I Modifier Constants ACC SYNTHETIC 0 return true I Class File Attribute attributes class File Reader get Attributes for int i 0 max attributes length i max i if Char Operation equals attributes i get Attribute Name I Attribute Names Constants SYNTHETIC return true return false  isSynthetic IClassFileReader classFileReader classFileReader getAccessFlags IModifierConstants ACC_SYNTHETIC IClassFileAttribute classFileReader getAttributes CharOperation getAttributeName IAttributeNamesConstants
private char get Parameter Names char method Descriptor I Code Attribute code Attribute int access Flags int param Count Signature get Parameter Count method Descriptor char parameter Names new char param Count check if the code attribute has debug info for this method if code Attribute null I Local Variable Attribute local Variable Attribute code Attribute get Local Variable Attribute if local Variable Attribute null I Local Variable Table Entry entries local Variable Attribute get Local Variable Table int starting Index access Flags I Modifier Constants ACC STATIC 0 0 1 for int i 0 i param Count i I Local Variable Table Entry searched Entry get Entry For starting Index i entries if searched Entry null parameter Names i searched Entry get Name else parameter Names i Util bind disassembler parametername to Char Array NON NLS 1 else for int i 0 i param Count i parameter Names i Util bind disassembler parametername to Char Array NON NLS 1 else for int i 0 i param Count i parameter Names i Util bind disassembler parametername to Char Array NON NLS 1 return parameter Names  getParameterNames methodDescriptor ICodeAttribute codeAttribute accessFlags paramCount getParameterCount methodDescriptor parameterNames paramCount codeAttribute ILocalVariableAttribute localVariableAttribute codeAttribute getLocalVariableAttribute localVariableAttribute ILocalVariableTableEntry localVariableAttribute getLocalVariableTable startingIndex accessFlags IModifierConstants ACC_STATIC paramCount ILocalVariableTableEntry searchedEntry getEntryFor startingIndex searchedEntry parameterNames searchedEntry getName parameterNames toCharArray paramCount parameterNames toCharArray paramCount parameterNames toCharArray parameterNames
private void write New Line String Buffer buffer String line Separator int tab Number buffer append line Separator dump Tab tab Number buffer  writeNewLine StringBuffer lineSeparator tabNumber lineSeparator dumpTab tabNumber

public static Compilation Unit Declaration build Compilation Unit Source Type Element Info source Types boolean need Local Types Problem Reporter problem Reporter Compilation Result compilation Result return new Element Info Converter need Local Types problem Reporter convert source Types compilation Result  CompilationUnitDeclaration buildCompilationUnit SourceTypeElementInfo sourceTypes needLocalTypes ProblemReporter problemReporter CompilationResult compilationResult ElementInfoConverter needLocalTypes problemReporter sourceTypes compilationResult
private Compilation Unit Declaration unit private Element Info Converter boolean need Local Types Problem Reporter problem Reporter this need Local Types need Local Types this problem Reporter problem Reporter  CompilationUnitDeclaration ElementInfoConverter needLocalTypes ProblemReporter problemReporter needLocalTypes needLocalTypes problemReporter problemReporter
private Initializer convert Initializer Element Info initializer Info Compilation Result compilation Result Block block new Block 0 Initializer initializer new Initializer block I Constants Acc Default int start initializer Info get Declaration Source Start int end initializer Info get Declaration Source End initializer name initializer Info get Name initializer source Start initializer declaration Source Start start initializer source End initializer declaration Source End end initializer modifiers initializer Info get Modifiers convert local and anonymous types I Java Element children initializer Info get Children int types Length children length if types Length 0 Statement statements new Statement types Length for int i 0 i types Length i Java Element type Java Element children i try Type Declaration local Type convert Source Type Element Info type get Element Info compilation Result if local Type bits AST Node Is Anonymous TypeMASK 0 Qualified Allocation Expression expression new Qualified Allocation Expression local Type expression type local Type superclass local Type superclass null local Type super Interfaces null local Type allocation expression statements i expression else statements i local Type catch Java Model Exception e ignore block statements statements return initializer  InitializerElementInfo initializerInfo CompilationResult compilationResult IConstants AccDefault initializerInfo getDeclarationSourceStart initializerInfo getDeclarationSourceEnd initializerInfo getName sourceStart declarationSourceStart sourceEnd declarationSourceEnd initializerInfo getModifiers IJavaElement initializerInfo getChildren typesLength typesLength typesLength typesLength JavaElement JavaElement TypeDeclaration localType SourceTypeElementInfo getElementInfo compilationResult localType ASTNode IsAnonymousTypeMASK QualifiedAllocationExpression QualifiedAllocationExpression localType localType localType localType superInterfaces localType localType JavaModelException
private Field Declaration convert Source Field Element Info source Field Compilation Result compilation Result Field Declaration field new Field Declaration int start source Field get Name Source Start int end source Field get Name Source End field name source Field get Name field source Start start field source End end field type create Type Reference source Field get Type Name start end field declaration Source Start source Field get Declaration Source Start field declaration Source End source Field get Declaration Source End field modifiers source Field get Modifiers convert local and anonymous types if this need Local Types I Java Element children source Field get Children int types Length children length if types Length 0 Array Initializer initializer new Array Initializer field initialization initializer Expression expressions new Expression types Length initializer expressions expressions for int i 0 i types Length i I Java Element local Type children i try Type Declaration anonymous Local Type Declaration convert Source Type Element Info Java Element local Type get Element Info compilation Result Qualified Allocation Expression expression new Qualified Allocation Expression anonymous Local Type Declaration expression type anonymous Local Type Declaration superclass anonymous Local Type Declaration superclass null anonymous Local Type Declaration super Interfaces null anonymous Local Type Declaration allocation expression expressions i expression catch Java Model Exception e ignore return field  FieldDeclaration SourceFieldElementInfo sourceField CompilationResult compilationResult FieldDeclaration FieldDeclaration sourceField getNameSourceStart sourceField getNameSourceEnd sourceField getName sourceStart sourceEnd createTypeReference sourceField getTypeName declarationSourceStart sourceField getDeclarationSourceStart declarationSourceEnd sourceField getDeclarationSourceEnd sourceField getModifiers needLocalTypes IJavaElement sourceField getChildren typesLength typesLength ArrayInitializer ArrayInitializer typesLength typesLength IJavaElement localType TypeDeclaration anonymousLocalTypeDeclaration SourceTypeElementInfo JavaElement localType getElementInfo compilationResult QualifiedAllocationExpression QualifiedAllocationExpression anonymousLocalTypeDeclaration anonymousLocalTypeDeclaration anonymousLocalTypeDeclaration anonymousLocalTypeDeclaration superInterfaces anonymousLocalTypeDeclaration JavaModelException
private Abstract Method Declaration convert Source Method Element Info source Method Compilation Result compilation Result Abstract Method Declaration method only source positions available int start source Method get Name Source Start int end source Method get Name Source End if source Method is Constructor Constructor Declaration decl new Constructor Declaration compilation Result decl is Default Constructor false method decl else Method Declaration decl new Method Declaration compilation Result convert return type decl return Type create Type Reference source Method get Return Type Name start end method decl method selector source Method get Selector method modifiers source Method get Modifiers method source Start start method source End end method declaration Source Start source Method get Declaration Source Start method declaration Source End source Method get Declaration Source End convert arguments char argument Type Names source Method get Argument Type Names char argument Names source Method get Argument Names int argument Count argument Type Names null 0 argument Type Names length long position long start 32 end method arguments new Argument argument Count for int i 0 i argument Count i method arguments i new Argument argument Names i position create Type Reference argument Type Names i start end Acc Default do not care whether was final or not convert thrown exceptions char exception Type Names source Method get Exception Type Names int exception Count exception Type Names null 0 exception Type Names length method thrown Exceptions new Type Reference exception Count for int i 0 i exception Count i method thrown Exceptions i create Type Reference exception Type Names i start end convert local and anonymous types if this need Local Types I Java Element children source Method get Children int types Length children length if types Length 0 Statement statements new Statement types Length for int i 0 i types Length i Java Element type Java Element children i try Type Declaration local Type convert Source Type Element Info type get Element Info compilation Result if local Type bits AST Node Is Anonymous TypeMASK 0 Qualified Allocation Expression expression new Qualified Allocation Expression local Type expression type local Type superclass local Type superclass null local Type super Interfaces null local Type allocation expression statements i expression else statements i local Type catch Java Model Exception e ignore method statements statements return method  AbstractMethodDeclaration SourceMethodElementInfo sourceMethod CompilationResult compilationResult AbstractMethodDeclaration sourceMethod getNameSourceStart sourceMethod getNameSourceEnd sourceMethod isConstructor ConstructorDeclaration ConstructorDeclaration compilationResult isDefaultConstructor MethodDeclaration MethodDeclaration compilationResult returnType createTypeReference sourceMethod getReturnTypeName sourceMethod getSelector sourceMethod getModifiers sourceStart sourceEnd declarationSourceStart sourceMethod getDeclarationSourceStart declarationSourceEnd sourceMethod getDeclarationSourceEnd argumentTypeNames sourceMethod getArgumentTypeNames argumentNames sourceMethod getArgumentNames argumentCount argumentTypeNames argumentTypeNames argumentCount argumentCount argumentNames createTypeReference argumentTypeNames AccDefault exceptionTypeNames sourceMethod getExceptionTypeNames exceptionCount exceptionTypeNames exceptionTypeNames thrownExceptions TypeReference exceptionCount exceptionCount thrownExceptions createTypeReference exceptionTypeNames needLocalTypes IJavaElement sourceMethod getChildren typesLength typesLength typesLength typesLength JavaElement JavaElement TypeDeclaration localType SourceTypeElementInfo getElementInfo compilationResult localType ASTNode IsAnonymousTypeMASK QualifiedAllocationExpression QualifiedAllocationExpression localType localType localType localType superInterfaces localType localType JavaModelException
private Type Declaration convert Source Type Element Info source Type Compilation Result compilation Result create type declaration can be member type local type or anonymous type Type Declaration type new Type Declaration compilation Result if source Type get Enclosing Type null I Type type Handle source Type get Handle try if type Handle is Anonymous type name Type Declaration ANONYMOUS EMPTY NAME type bits AST Node Anonymous And Local Mask else if type Handle is Local type bits AST Node Is Local TypeMASK catch Java Model Exception e could not figure assume toplevel else type bits AST Node Is Member TypeMASK if type bits AST Node Is Anonymous TypeMASK 0 type name source Type get Name int start end only positions available type source Start start source Type get Name Source Start type source End end source Type get Name Source End type modifiers source Type get Modifiers type declaration Source Start source Type get Declaration Source Start type declaration Source End source Type get Declaration Source End type body End type declaration Source End set superclass and superinterfaces if source Type get Superclass Name null type superclass create Type Reference source Type get Superclass Name start end char interface Names source Type get Interface Names int interface Count interface Names null 0 interface Names length type super Interfaces new Type Reference interface Count for int i 0 i interface Count i type super Interfaces i create Type Reference interface Names i start end convert member types I Source Type source Member Types source Type get Member Types int source Member Type Count source Member Types null 0 source Member Types length type member Types new Type Declaration source Member Type Count for int i 0 i source Member Type Count i type member Types i convert Source Type Element Info source Member Types i compilation Result convert fields and initializers I Source Field source Fields source Type get Fields int source Field Count source Fields null 0 source Fields length Initializer Element Info initializers null int initializer Count 0 if this need Local Types initializers source Type get Initializers initializer Count initializers length type fields new Field Declaration initializer Count source Field Count for int i 0 i initializer Count i type fields i convert initializers i compilation Result else type fields new Field Declaration source Field Count int length initializer Count source Field Count int index 0 for int i initializer Count i length i type fields i convert Source Field Element Info source Fields index compilation Result convert methods need to add default constructor if necessary I Source Method source Methods source Type get Methods int source Method Count source Methods null 0 source Methods length source type has a constructor by default we assume that one is needed int needed Count 0 if type is Interface needed Count 1 for int i 0 i source Method Count i if source Methods i is Constructor needed Count 0 Does not need the extra constructor since one constructor already exists break type methods new Abstract Method Declaration source Method Count needed Count if needed Count 0 add default constructor in first position type methods 0 type creates Internal Constructor false false boolean is Interface type is Interface for int i 0 i source Method Count i Abstract Method Declaration method convert Source Method Element Info source Methods i compilation Result if is Interface method is Abstract fix up flag method modifiers Acc Semicolon Body type methods needed Count i method return type  TypeDeclaration SourceTypeElementInfo sourceType CompilationResult compilationResult TypeDeclaration TypeDeclaration compilationResult sourceType getEnclosingType IType typeHandle sourceType getHandle typeHandle isAnonymous TypeDeclaration ANONYMOUS_EMPTY_NAME ASTNode AnonymousAndLocalMask typeHandle isLocal ASTNode IsLocalTypeMASK JavaModelException ASTNode IsMemberTypeMASK ASTNode IsAnonymousTypeMASK sourceType getName sourceStart sourceType getNameSourceStart sourceEnd sourceType getNameSourceEnd sourceType getModifiers declarationSourceStart sourceType getDeclarationSourceStart declarationSourceEnd sourceType getDeclarationSourceEnd bodyEnd declarationSourceEnd sourceType getSuperclassName createTypeReference sourceType getSuperclassName interfaceNames sourceType getInterfaceNames interfaceCount interfaceNames interfaceNames superInterfaces TypeReference interfaceCount interfaceCount superInterfaces createTypeReference interfaceNames ISourceType sourceMemberTypes sourceType getMemberTypes sourceMemberTypeCount sourceMemberTypes sourceMemberTypes memberTypes TypeDeclaration sourceMemberTypeCount sourceMemberTypeCount memberTypes SourceTypeElementInfo sourceMemberTypes compilationResult ISourceField sourceFields sourceType getFields sourceFieldCount sourceFields sourceFields InitializerElementInfo initializerCount needLocalTypes sourceType getInitializers initializerCount FieldDeclaration initializerCount sourceFieldCount initializerCount compilationResult FieldDeclaration sourceFieldCount initializerCount sourceFieldCount initializerCount SourceFieldElementInfo sourceFields compilationResult ISourceMethod sourceMethods sourceType getMethods sourceMethodCount sourceMethods sourceMethods neededCount isInterface neededCount sourceMethodCount sourceMethods isConstructor neededCount AbstractMethodDeclaration sourceMethodCount neededCount neededCount createsInternalConstructor isInterface isInterface sourceMethodCount AbstractMethodDeclaration SourceMethodElementInfo sourceMethods compilationResult isInterface isAbstract AccSemicolonBody neededCount
private Compilation Unit Declaration convert Source Type Element Info source Types Compilation Result compilation Result Source Type Element Info source Type source Types 0 if source Type get Name null return null do a basic test that the source Type is valid this unit new Compilation Unit Declaration this problem Reporter compilation Result 0 not filled at this point only positions available int start source Type get Name Source Start int end source Type get Name Source End convert package and imports if source Type get Package Name null source Type get Package Name length 0 if its null then it is defined in the default package this unit current Package create Import Reference source Type get Package Name start end false Acc Default I Source Import source Imports source Type get Imports int import Count source Imports null 0 source Imports length this unit imports new Import Reference import Count for int i 0 i import Count i I Source Import source Import source Imports i this unit imports i create Import Reference source Import get Name source Import get Declaration Source Start source Import get Declaration Source End source Import on Demand source Import get Modifiers convert type s int type Count source Types length this unit types new Type Declaration type Count for int i 0 i type Count i this unit types i convert source Types i compilation Result return this unit  CompilationUnitDeclaration SourceTypeElementInfo sourceTypes CompilationResult compilationResult SourceTypeElementInfo sourceType sourceTypes sourceType getName sourceType CompilationUnitDeclaration problemReporter compilationResult sourceType getNameSourceStart sourceType getNameSourceEnd sourceType getPackageName sourceType getPackageName currentPackage createImportReference sourceType getPackageName AccDefault ISourceImport sourceImports sourceType getImports importCount sourceImports sourceImports ImportReference importCount importCount ISourceImport sourceImport sourceImports createImportReference sourceImport getName sourceImport getDeclarationSourceStart sourceImport getDeclarationSourceEnd sourceImport onDemand sourceImport getModifiers typeCount sourceTypes TypeDeclaration typeCount typeCount sourceTypes compilationResult
private Import Reference create Import Reference char import Name int start int end boolean on Demand int modifiers char q Import Name Char Operation split On import Name long positions new long q Import Name length long position long start 32 end for int i 0 i q Import Name length i positions i position dummy positions return new Import Reference q Import Name positions on Demand modifiers  ImportReference createImportReference importName onDemand qImportName CharOperation splitOn importName qImportName qImportName ImportReference qImportName onDemand
private Type Reference create Type Reference char type Signature int start int end count identifiers and dimensions int max type Signature length int dim Start max int dim 0 int ident Count 1 for int i 0 i max i switch type Signature i case if dim 0 dim Start i dim break case ident Count break rebuild identifiers and dimensions if ident Count 1 simple type reference if dim 0 return new Single Type Reference type Signature long start 32 end else char identifier new char dim Start System arraycopy type Signature 0 identifier 0 dim Start return new Array Type Reference identifier dim long start 32 end else qualified type reference long positions new long ident Count long pos long start 32 end for int i 0 i ident Count i positions i pos char identifiers Char Operation split On type Signature 0 dim Start if dim 0 return new Qualified Type Reference identifiers positions else return new Array Qualified Type Reference identifiers dim positions  TypeReference createTypeReference typeSignature typeSignature dimStart identCount typeSignature dimStart identCount identCount SingleTypeReference typeSignature dimStart typeSignature dimStart ArrayTypeReference identCount identCount CharOperation splitOn typeSignature dimStart QualifiedTypeReference ArrayQualifiedTypeReference

Exception Attribute byte class File Bytes I Constant Pool constant Pool int offset throws Class Format Exception super class File Bytes constant Pool offset this exceptions Number u2 At class File Bytes 6 offset int exception Length this exceptions Number this exception Names NO EXCEPTION NAMES this exception Indexes NO EXCEPTION INDEXES if exception Length 0 this exception Names new char exception Length this exception Indexes new int exception Length int read Offset 8 I Constant Pool Entry constant Pool Entry for int i 0 i exception Length i exception Indexes i u2 At class File Bytes read Offset offset constant Pool Entry constant Pool decode Entry exception Indexes i if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Class throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY exception Names i constant Pool Entry get Class Info Name read Offset 2  ExceptionAttribute classFileBytes IConstantPool constantPool ClassFormatException classFileBytes constantPool exceptionsNumber u2At classFileBytes exceptionLength exceptionsNumber exceptionNames NO_EXCEPTION_NAMES exceptionIndexes NO_EXCEPTION_INDEXES exceptionLength exceptionNames exceptionLength exceptionIndexes exceptionLength readOffset IConstantPoolEntry constantPoolEntry exceptionLength exceptionIndexes u2At classFileBytes readOffset constantPoolEntry constantPool decodeEntry exceptionIndexes constantPoolEntry getKind IConstantPoolConstant CONSTANT_Class ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY exceptionNames constantPoolEntry getClassInfoName readOffset
see I Exception Attribute get Exception Indexes public int get Exception Indexes return this exception Indexes  IExceptionAttribute getExceptionIndexes getExceptionIndexes exceptionIndexes
see I Exception Attribute get Exception Names public char get Exception Names return this exception Names  IExceptionAttribute getExceptionNames getExceptionNames exceptionNames
see I Exception Attribute get Exceptions Number public int get Exceptions Number return this exceptions Number  IExceptionAttribute getExceptionsNumber getExceptionsNumber exceptionsNumber
see org eclipse jdt core util I Class File Attribute get Attribute Name public char get Attribute Name return I Attribute Names Constants EXCEPTIONS  IClassFileAttribute getAttributeName getAttributeName IAttributeNamesConstants

Exception Table Entry byte class File Bytes I Constant Pool constant Pool int offset throws Class Format Exception this startPC u2 At class File Bytes 0 offset this endPC u2 At class File Bytes 2 offset this handlerPC u2 At class File Bytes 4 offset this catch Type Index u2 At class File Bytes 6 offset if this catch Type Index 0 I Constant Pool Entry constant Pool Entry constant Pool decode Entry this catch Type Index if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Class throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY this catch Type constant Pool Entry get Class Info Name  ExceptionTableEntry classFileBytes IConstantPool constantPool ClassFormatException u2At classFileBytes u2At classFileBytes u2At classFileBytes catchTypeIndex u2At classFileBytes catchTypeIndex IConstantPoolEntry constantPoolEntry constantPool decodeEntry catchTypeIndex constantPoolEntry getKind IConstantPoolConstant CONSTANT_Class ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY catchType constantPoolEntry getClassInfoName
see I Exception Table Entry get StartPC public int get StartPC return this startPC  IExceptionTableEntry getStartPC getStartPC
see I Exception Table Entry get EndPC public int get EndPC return this endPC  IExceptionTableEntry getEndPC getEndPC
see I Exception Table Entry get HandlerPC public int get HandlerPC return this handlerPC  IExceptionTableEntry getHandlerPC getHandlerPC
see I Exception Table Entry get Catch Type Index public int get Catch Type Index return this catch Type Index  IExceptionTableEntry getCatchTypeIndex getCatchTypeIndex catchTypeIndex
see I Exception Table Entry get Catch Type public char get Catch Type return this catch Type  IExceptionTableEntry getCatchType getCatchType catchType

param class File Bytes byte param constant Pool I Constant Pool param offset int public Field Info byte class File Bytes I Constant Pool constant Pool int offset throws Class Format Exception this access Flags u2 At class File Bytes 0 offset this name Index u2 At class File Bytes 2 offset I Constant Pool Entry constant Pool Entry constant Pool decode Entry this name Index if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Utf8 throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY this name constant Pool Entry get Utf8 Value this descriptor Index u2 At class File Bytes 4 offset constant Pool Entry constant Pool decode Entry this descriptor Index if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Utf8 throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY this descriptor constant Pool Entry get Utf8 Value this attributes Count u2 At class File Bytes 6 offset this attributes Class File Attribute NO ATTRIBUTES int read Offset 8 if this attributes Count 0 this attributes new I Class File Attribute this attributes Count int attributes Index 0 for int i 0 i this attributes Count i constant Pool Entry constant Pool decode Entry u2 At class File Bytes read Offset offset if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Utf8 throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY char attribute Name constant Pool Entry get Utf8 Value if equals attribute Name I Attribute Names Constants DEPRECATED this is Deprecated true this attributes attributes Index new Class File Attribute class File Bytes constant Pool offset read Offset else if equals attribute Name I Attribute Names Constants SYNTHETIC this is Synthetic true this attributes attributes Index new Class File Attribute class File Bytes constant Pool offset read Offset else if equals attribute Name I Attribute Names Constants CONSTANT VALUE this constant Value Attribute new Constant Value Attribute class File Bytes constant Pool offset read Offset this attributes attributes Index this constant Value Attribute else this attributes attributes Index new Class File Attribute class File Bytes constant Pool offset read Offset read Offset 6 u4 At class File Bytes read Offset 2 offset this attribute Bytes read Offset  classFileBytes constantPool IConstantPool FieldInfo classFileBytes IConstantPool constantPool ClassFormatException accessFlags u2At classFileBytes nameIndex u2At classFileBytes IConstantPoolEntry constantPoolEntry constantPool decodeEntry nameIndex constantPoolEntry getKind IConstantPoolConstant CONSTANT_Utf8 ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY constantPoolEntry getUtf8Value descriptorIndex u2At classFileBytes constantPoolEntry constantPool decodeEntry descriptorIndex constantPoolEntry getKind IConstantPoolConstant CONSTANT_Utf8 ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY constantPoolEntry getUtf8Value attributesCount u2At classFileBytes ClassFileAttribute NO_ATTRIBUTES readOffset attributesCount IClassFileAttribute attributesCount attributesIndex attributesCount constantPoolEntry constantPool decodeEntry u2At classFileBytes readOffset constantPoolEntry getKind IConstantPoolConstant CONSTANT_Utf8 ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY attributeName constantPoolEntry getUtf8Value attributeName IAttributeNamesConstants isDeprecated attributesIndex ClassFileAttribute classFileBytes constantPool readOffset attributeName IAttributeNamesConstants isSynthetic attributesIndex ClassFileAttribute classFileBytes constantPool readOffset attributeName IAttributeNamesConstants CONSTANT_VALUE constantValueAttribute ConstantValueAttribute classFileBytes constantPool readOffset attributesIndex constantValueAttribute attributesIndex ClassFileAttribute classFileBytes constantPool readOffset readOffset u4At classFileBytes readOffset attributeBytes readOffset
see I Field Info get Access Flags public int get Access Flags return this access Flags  IFieldInfo getAccessFlags getAccessFlags accessFlags
see I Field Info get Constant Value Attribute public I Constant Value Attribute get Constant Value Attribute return this constant Value Attribute  IFieldInfo getConstantValueAttribute IConstantValueAttribute getConstantValueAttribute constantValueAttribute
see I Field Info get Descriptor public char get Descriptor return this descriptor  IFieldInfo getDescriptor getDescriptor
see I Field Info get Name public char get Name return this name  IFieldInfo getName getName
see I Field Info has Constant Value Attribute public boolean has Constant Value Attribute return this constant Value Attribute null  IFieldInfo hasConstantValueAttribute hasConstantValueAttribute constantValueAttribute
see I Field Info is Deprecated public boolean is Deprecated return this is Deprecated  IFieldInfo isDeprecated isDeprecated isDeprecated
see I Field Info is Synthetic public boolean is Synthetic return this is Synthetic  IFieldInfo isSynthetic isSynthetic isSynthetic
int size In Bytes return this attribute Bytes  sizeInBytes attributeBytes
see I Field Info get Attribute Count public int get Attribute Count return this attributes Count  IFieldInfo getAttributeCount getAttributeCount attributesCount
see I Field Info get Descriptor Index public int get Descriptor Index return this descriptor Index  IFieldInfo getDescriptorIndex getDescriptorIndex descriptorIndex
see I Field Info get Name Index public int get Name Index return this name Index  IFieldInfo getNameIndex getNameIndex nameIndex
see I Field Info get Attributes public I Class File Attribute get Attributes return this attributes  IFieldInfo getAttributes IClassFileAttribute getAttributes

private Java Model java Model public Handle Factory this java Model Java Model Manager get Java Model Manager get Java Model  JavaModel javaModel HandleFactory javaModel JavaModelManager getJavaModelManager getJavaModel
Creates an Openable handle from the given resource path The resource path can be a path to a file in the workbench eg Proj com ibm jdt core Handle Factory java or a path to a file in a jar file it then contains the path to the jar file and the path to the file in the jar eg c jdk1 2 2 jre lib rt jar java lang Object class or Proj rt jar java lang Object class NOTE This assumes that the resource path is the to String of an I Path in other words it uses the I Path SEPARATOR for file path and it uses for entries in a zip file If not null uses the given scope as a hint for getting Java project handles public Openable create Openable String resource Path I Java Search Scope scope int separator Index if separator Index resource Path index Of I Java Search Scope JAR FILE ENTRY SEPARATOR 1 path to a class file inside a jar String jar Path resource Path substring 0 separator Index Optimization cache package fragment root handle and package handles if jar Path equals this last Pkg Fragment Root Path I Package Fragment Root root this get Jar Pkg Fragment Root jar Path scope if root null return null match is outside classpath this last Pkg Fragment Root Path jar Path this last Pkg Fragment Root root this package Handles new Hash Map 5 create handle String class File Path resource Path substring separator Index 1 int last Slash class File Path last Index Of String package Name last Slash 1 class File Path substring 0 last Slash replace I Package Fragment DEFAULT PACKAGE NAME I Package Fragment pkg Fragment I Package Fragment this package Handles get package Name if pkg Fragment null pkg Fragment this last Pkg Fragment Root get Package Fragment package Name this package Handles put package Name pkg Fragment I Class File class File pkg Fragment get Class File class File Path substring last Slash 1 return Openable class File else path to a file in a directory Optimization cache package fragment root handle and package handles int length 1 if this last Pkg Fragment Root Path null resource Path starts With this last Pkg Fragment Root Path length this last Pkg Fragment Root Path length 0 resource Path char At length I Package Fragment Root root this get Pkg Fragment Root resource Path if root null return null match is outside classpath this last Pkg Fragment Root root this last Pkg Fragment Root Path this last Pkg Fragment Root get Path to String this package Handles new Hash Map 5 create handle int last Slash resource Path last Index Of I Path SEPARATOR String package Name last Slash length this last Pkg Fragment Root Path length resource Path substring length 1 last Slash replace I Path SEPARATOR I Package Fragment DEFAULT PACKAGE NAME I Package Fragment pkg Fragment I Package Fragment this package Handles get package Name if pkg Fragment null pkg Fragment this last Pkg Fragment Root get Package Fragment package Name this package Handles put package Name pkg Fragment String simple Name resource Path substring last Slash 1 if org eclipse jdt internal compiler util Util is Java File Name simple Name I Compilation Unit unit pkg Fragment get Compilation Unit simple Name return Openable unit else I Class File class File pkg Fragment get Class File simple Name return Openable class File  HandleFactory toString IPath IPath createOpenable resourcePath IJavaSearchScope separatorIndex separatorIndex resourcePath indexOf IJavaSearchScope JAR_FILE_ENTRY_SEPARATOR jarPath resourcePath separatorIndex jarPath lastPkgFragmentRootPath IPackageFragmentRoot getJarPkgFragmentRoot jarPath lastPkgFragmentRootPath jarPath lastPkgFragmentRoot packageHandles HashMap classFilePath resourcePath separatorIndex lastSlash classFilePath lastIndexOf packageName lastSlash classFilePath lastSlash IPackageFragment DEFAULT_PACKAGE_NAME IPackageFragment pkgFragment IPackageFragment packageHandles packageName pkgFragment pkgFragment lastPkgFragmentRoot getPackageFragment packageName packageHandles packageName pkgFragment IClassFile classFile pkgFragment getClassFile classFilePath lastSlash classFile lastPkgFragmentRootPath resourcePath startsWith lastPkgFragmentRootPath lastPkgFragmentRootPath resourcePath charAt IPackageFragmentRoot getPkgFragmentRoot resourcePath lastPkgFragmentRoot lastPkgFragmentRootPath lastPkgFragmentRoot getPath toString packageHandles HashMap lastSlash resourcePath lastIndexOf IPath packageName lastSlash lastPkgFragmentRootPath resourcePath lastSlash IPath IPackageFragment DEFAULT_PACKAGE_NAME IPackageFragment pkgFragment IPackageFragment packageHandles packageName pkgFragment pkgFragment lastPkgFragmentRoot getPackageFragment packageName packageHandles packageName pkgFragment simpleName resourcePath lastSlash isJavaFileName simpleName ICompilationUnit pkgFragment getCompilationUnit simpleName IClassFile classFile pkgFragment getClassFile simpleName classFile
public void push AST Node node if this node Index this node Stack length System arraycopy this node Stack 0 this node Stack new AST Node this node Stack length 2 0 this node Index 1 this node Stack this node Index node  ASTNode nodeIndex nodeStack nodeStack nodeStack ASTNode nodeStack nodeIndex nodeStack nodeIndex
public void pop AST Node node while this node Index 0 this node Stack this node Index node empty  ASTNode nodeIndex nodeStack nodeIndex
public boolean visit Argument node Block Scope scope push node if node to Be Found throw new End Visit return true  BlockScope toBeFound EndVisit
return true public void end Visit Argument node Block Scope scope pop node  endVisit BlockScope
public boolean visit Constructor Declaration node Class Scope scope push node if node to Be Found throw new End Visit return true  ConstructorDeclaration ClassScope toBeFound EndVisit
return true public void end Visit Constructor Declaration node Class Scope scope pop node  endVisit ConstructorDeclaration ClassScope
public boolean visit Field Declaration node Method Scope scope push node if node to Be Found throw new End Visit return true  FieldDeclaration MethodScope toBeFound EndVisit
return true public void end Visit Field Declaration node Method Scope scope pop node  endVisit FieldDeclaration MethodScope
public boolean visit Initializer node Method Scope scope push node if node to Be Found throw new End Visit return true  MethodScope toBeFound EndVisit
public boolean visit Local Declaration node Block Scope scope push node if node to Be Found throw new End Visit return true  LocalDeclaration BlockScope toBeFound EndVisit
return true public void end Visit Local Declaration node Block Scope scope pop node  endVisit LocalDeclaration BlockScope
public boolean visit Type Declaration node Block Scope scope push node if node to Be Found throw new End Visit return true  TypeDeclaration BlockScope toBeFound EndVisit
public void end Visit Type Declaration node Block Scope scope if node bits AST Node Is Member TypeMASK 0 pop node don t pop local anonymous types used to count how many occurrences are in the method  endVisit TypeDeclaration BlockScope ASTNode IsMemberTypeMASK
public boolean visit Type Declaration node Class Scope scope push node if node to Be Found throw new End Visit return true  TypeDeclaration ClassScope toBeFound EndVisit
public void end Visit Type Declaration node Class Scope scope if node bits AST Node Is Member TypeMASK 0 pop node don t pop local anonymous types used to count how many occurrences are in the initializer  endVisit TypeDeclaration ClassScope ASTNode IsMemberTypeMASK
public boolean visit Method Declaration node Class Scope scope push node if node to Be Found throw new End Visit return true  MethodDeclaration ClassScope toBeFound EndVisit
return true public void end Visit Method Declaration node Class Scope scope pop node  endVisit MethodDeclaration ClassScope
public boolean visit Type Declaration node Compilation Unit Scope scope push node if node to Be Found throw new End Visit return true  TypeDeclaration CompilationUnitScope toBeFound EndVisit
return true public void end Visit Type Declaration node Compilation Unit Scope scope pop node  endVisit TypeDeclaration CompilationUnitScope
public I Java Element create Element final AST Node to Be Found Compilation Unit Declaration parsed Unit Openable openable class End Visit extends Runtime Exception marker to stop traversing ast class Visitor extends AST Visitor AST Node node Stack new AST Node 10 int node Index 1 public void push AST Node node if this node Index this node Stack length System arraycopy this node Stack 0 this node Stack new AST Node this node Stack length 2 0 this node Index 1 this node Stack this node Index node public void pop AST Node node while this node Index 0 this node Stack this node Index node empty public boolean visit Argument node Block Scope scope push node if node to Be Found throw new End Visit return true public void end Visit Argument node Block Scope scope pop node public boolean visit Constructor Declaration node Class Scope scope push node if node to Be Found throw new End Visit return true public void end Visit Constructor Declaration node Class Scope scope pop node public boolean visit Field Declaration node Method Scope scope push node if node to Be Found throw new End Visit return true public void end Visit Field Declaration node Method Scope scope pop node public boolean visit Initializer node Method Scope scope push node if node to Be Found throw new End Visit return true don t pop initializers used to count how many occurrences are in the type public boolean visit Local Declaration node Block Scope scope push node if node to Be Found throw new End Visit return true public void end Visit Local Declaration node Block Scope scope pop node public boolean visit Type Declaration node Block Scope scope push node if node to Be Found throw new End Visit return true public void end Visit Type Declaration node Block Scope scope if node bits AST Node Is Member TypeMASK 0 pop node don t pop local anonymous types used to count how many occurrences are in the method public boolean visit Type Declaration node Class Scope scope push node if node to Be Found throw new End Visit return true public void end Visit Type Declaration node Class Scope scope if node bits AST Node Is Member TypeMASK 0 pop node don t pop local anonymous types used to count how many occurrences are in the initializer public boolean visit Method Declaration node Class Scope scope push node if node to Be Found throw new End Visit return true public void end Visit Method Declaration node Class Scope scope pop node public boolean visit Type Declaration node Compilation Unit Scope scope push node if node to Be Found throw new End Visit return true public void end Visit Type Declaration node Compilation Unit Scope scope pop node Visitor visitor new Visitor try parsed Unit traverse visitor parsed Unit scope catch End Visit e AST Node node Stack visitor node Stack int end visitor node Index int start 0 find the inner most type declaration if binary type AST Node type Decl null if openable instanceof Class File for int i end i 0 i if node Stack i instanceof Type Declaration type Decl node Stack i start i break find the openable corresponding to this type declaration if type Decl null openable get Openable type Decl openable return create Element node Stack start end openable return null  IJavaElement createElement ASTNode toBeFound CompilationUnitDeclaration parsedUnit EndVisit RuntimeException ASTVisitor ASTNode nodeStack ASTNode nodeIndex ASTNode nodeIndex nodeStack nodeStack nodeStack ASTNode nodeStack nodeIndex nodeStack nodeIndex ASTNode nodeIndex nodeStack nodeIndex BlockScope toBeFound EndVisit endVisit BlockScope ConstructorDeclaration ClassScope toBeFound EndVisit endVisit ConstructorDeclaration ClassScope FieldDeclaration MethodScope toBeFound EndVisit endVisit FieldDeclaration MethodScope MethodScope toBeFound EndVisit LocalDeclaration BlockScope toBeFound EndVisit endVisit LocalDeclaration BlockScope TypeDeclaration BlockScope toBeFound EndVisit endVisit TypeDeclaration BlockScope ASTNode IsMemberTypeMASK TypeDeclaration ClassScope toBeFound EndVisit endVisit TypeDeclaration ClassScope ASTNode IsMemberTypeMASK MethodDeclaration ClassScope toBeFound EndVisit endVisit MethodDeclaration ClassScope TypeDeclaration CompilationUnitScope toBeFound EndVisit endVisit TypeDeclaration CompilationUnitScope parsedUnit parsedUnit EndVisit ASTNode nodeStack nodeStack nodeIndex ASTNode typeDecl ClassFile nodeStack TypeDeclaration typeDecl nodeStack typeDecl getOpenable typeDecl createElement nodeStack
private I Java Element create Element AST Node node Stack int start int end I Java Element parent if start end return parent AST Node node node Stack start I Java Element element parent switch parent get Element Type case I Java Element COMPILATION UNIT String type Name new String Type Declaration node name element I Compilation Unit parent get Type type Name break case I Java Element CLASS FILE try element I Class File parent get Type catch Java Model Exception e class file doesn t exist ignore break case I Java Element TYPE I Type type I Type parent if node instanceof Constructor Declaration element type get Method parent get Element Name Util type Parameter Signatures Constructor Declaration node else if node instanceof Method Declaration Method Declaration method Method Declaration node element type get Method new String method selector Util type Parameter Signatures method else if node instanceof Initializer int occurrence Count 1 while start end if node Stack start 1 instanceof Initializer start occurrence Count else break element type get Initializer occurrence Count else if node instanceof Field Declaration String field Name new String Field Declaration node name element type get Field field Name else if node instanceof Type Declaration type Name new String Type Declaration node name element type get Type type Name break case I Java Element FIELD I Field field I Field parent if field is Binary return null else child of a field can only be anonymous type element field get Type 1 NON NLS 1 break case I Java Element METHOD case I Java Element INITIALIZER I Member member I Member parent if node instanceof Type Declaration if member is Binary return null else int type Index start while type Index end AST Node type Decl node Stack type Index 1 if type Decl instanceof Type Declaration type Decl bits AST Node Anonymous And Local Mask 0 type Index else break char name Type Declaration node Stack type Index name int occurrence Count 1 for int i start i type Index i if Char Operation equals name Type Declaration node Stack i name occurrence Count start type Index type Name node bits AST Node Is Anonymous TypeMASK 0 new String name NON NLS 1 element member get Type type Name occurrence Count else if node instanceof Local Declaration if start end Local Declaration local Local Declaration node element new Local Variable Java Element parent new String local name local declaration Source Start local declaration Source End local source Start local source End Util type Signature local type else the next node is an anonymous initializer of the local variable break return create Element node Stack start 1 end element  IJavaElement createElement ASTNode nodeStack IJavaElement ASTNode nodeStack IJavaElement getElementType IJavaElement COMPILATION_UNIT typeName TypeDeclaration ICompilationUnit getType typeName IJavaElement CLASS_FILE IClassFile getType JavaModelException IJavaElement IType IType ConstructorDeclaration getMethod getElementName typeParameterSignatures ConstructorDeclaration MethodDeclaration MethodDeclaration MethodDeclaration getMethod typeParameterSignatures occurrenceCount nodeStack occurrenceCount getInitializer occurrenceCount FieldDeclaration fieldName FieldDeclaration getField fieldName TypeDeclaration typeName TypeDeclaration getType typeName IJavaElement IField IField isBinary getType IJavaElement IJavaElement IMember IMember TypeDeclaration isBinary typeIndex typeIndex ASTNode typeDecl nodeStack typeIndex typeDecl TypeDeclaration typeDecl ASTNode AnonymousAndLocalMask typeIndex TypeDeclaration nodeStack typeIndex occurrenceCount typeIndex CharOperation TypeDeclaration nodeStack occurrenceCount typeIndex typeName ASTNode IsAnonymousTypeMASK getType typeName occurrenceCount LocalDeclaration LocalDeclaration LocalDeclaration LocalVariable JavaElement declarationSourceStart declarationSourceEnd sourceStart sourceEnd typeSignature createElement nodeStack
Returns a handle denoting the class member identified by its scope public I Java Element create Element Class Scope scope I Compilation Unit unit Hash Set existing Elements Hash Map known Scopes return create Element scope scope reference Context source Start unit existing Elements known Scopes  IJavaElement createElement ClassScope ICompilationUnit HashSet existingElements HashMap knownScopes createElement referenceContext sourceStart existingElements knownScopes
Create handle by adding child to parent obtained by recursing into parent scopes private I Java Element create Element Scope scope int element Position I Compilation Unit unit Hash Set existing Elements Hash Map known Scopes I Java Element new Element I Java Element known Scopes get scope if new Element null return new Element switch scope kind case Scope COMPILATION UNIT SCOPE new Element unit break case Scope CLASS SCOPE I Java Element parent Element create Element scope parent element Position unit existing Elements known Scopes switch parent Element get Element Type case I Java Element COMPILATION UNIT new Element I Compilation Unit parent Element get Type new String scope enclosing Source Type source Name break case I Java Element TYPE new Element I Type parent Element get Type new String scope enclosing Source Type source Name break case I Java Element FIELD case I Java Element INITIALIZER case I Java Element METHOD I Member member I Member parent Element if member is Binary return null else new Element member get Type new String scope enclosing Source Type source Name 1 increment occurrence count if collision is detected if new Element null while existing Elements add new Element Java Element new Element occurrence Count break if new Element null known Scopes put scope new Element break case Scope METHOD SCOPE I Type parent Type I Type create Element scope parent element Position unit existing Elements known Scopes Method Scope method Scope Method Scope scope if method Scope is Inside Initializer inside field or initializer must find proper one Type Declaration type method Scope reference Type int occurence Count 1 for int i 0 length type fields length i length i Field Declaration field type fields i if field declaration Source Start element Position field declaration Source End element Position if field is Field new Element parent Type get Field new String field name else new Element parent Type get Initializer occurence Count break else if field is Field occurence Count else method element Abstract Method Declaration method method Scope reference Method new Element parent Type get Method new String method selector Util type Parameter Signatures method if new Element null known Scopes put scope new Element break case Scope BLOCK SCOPE standard block no element per se new Element create Element scope parent element Position unit existing Elements known Scopes break return new Element  IJavaElement createElement elementPosition ICompilationUnit HashSet existingElements HashMap knownScopes IJavaElement newElement IJavaElement knownScopes newElement newElement COMPILATION_UNIT_SCOPE newElement CLASS_SCOPE IJavaElement parentElement createElement elementPosition existingElements knownScopes parentElement getElementType IJavaElement COMPILATION_UNIT newElement ICompilationUnit parentElement getType enclosingSourceType sourceName IJavaElement newElement IType parentElement getType enclosingSourceType sourceName IJavaElement IJavaElement IJavaElement IMember IMember parentElement isBinary newElement getType enclosingSourceType sourceName newElement existingElements newElement JavaElement newElement occurrenceCount newElement knownScopes newElement METHOD_SCOPE IType parentType IType createElement elementPosition existingElements knownScopes MethodScope methodScope MethodScope methodScope isInsideInitializer TypeDeclaration methodScope referenceType occurenceCount FieldDeclaration declarationSourceStart elementPosition declarationSourceEnd elementPosition isField newElement parentType getField newElement parentType getInitializer occurenceCount isField occurenceCount AbstractMethodDeclaration methodScope referenceMethod newElement parentType getMethod typeParameterSignatures newElement knownScopes newElement BLOCK_SCOPE newElement createElement elementPosition existingElements knownScopes newElement
Returns the package fragment root that corresponds to the given jar path See create Openable for the format of the jar path string If not null uses the given scope as a hint for getting Java project handles private I Package Fragment Root get Jar Pkg Fragment Root String jar Path String I Java Search Scope scope I Path jar Path new Path jar Path String Object target Java Model get Target Resources Plugin get Workspace get Root jar Path false if target instanceof I File internal jar is it on the classpath of its project e g org eclipse swt win32 ws win32 swt jar is NOT on the classpath of org eclipse swt win32 I File jar File I File target Java Project java Project Java Project this java Model get Java Project jar File I Classpath Entry classpath Entries try classpath Entries java Project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress for int j 0 entry Count classpath Entries length j entry Count j if classpath Entries j get Path equals jar Path return java Project get Package Fragment Root jar File catch Java Model Exception e ignore and try to find another project walk projects in the scope and find the first one that has the given jar path in its classpath I Java Project projects if scope null I Path enclosing Projects And Jars scope enclosing Projects And Jars int length enclosing Projects And Jars length projects new I Java Project length int index 0 for int i 0 i length i I Path path enclosing Projects And Jars i if org eclipse jdt internal compiler util Util is Archive File Name path last Segment projects index this java Model get Java Project path segment 0 if index length System arraycopy projects 0 projects new I Java Project index 0 index I Package Fragment Root root get Jar Pkg Fragment Root jar Path target projects if root null return root not found in the scope walk all projects try projects this java Model get Java Projects catch Java Model Exception e java model is not accessible return null return get Jar Pkg Fragment Root jar Path target projects  createOpenable IPackageFragmentRoot getJarPkgFragmentRoot jarPathString IJavaSearchScope IPath jarPath jarPathString JavaModel getTarget ResourcesPlugin getWorkspace getRoot jarPath IFile IFile jarFile IFile JavaProject javaProject JavaProject javaModel getJavaProject jarFile IClasspathEntry classpathEntries classpathEntries javaProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress entryCount classpathEntries entryCount classpathEntries getPath jarPath javaProject getPackageFragmentRoot jarFile JavaModelException IJavaProject IPath enclosingProjectsAndJars enclosingProjectsAndJars enclosingProjectsAndJars IJavaProject IPath enclosingProjectsAndJars isArchiveFileName lastSegment javaModel getJavaProject IJavaProject IPackageFragmentRoot getJarPkgFragmentRoot jarPath javaModel getJavaProjects JavaModelException getJarPkgFragmentRoot jarPath
private I Package Fragment Root get Jar Pkg Fragment Root I Path jar Path Object target I Java Project projects for int i 0 project Count projects length i project Count i try Java Project java Project Java Project projects i I Classpath Entry classpath Entries java Project get Resolved Classpath true ignore Unresolved Entry false don t generate Marker On Error false don t return Resolution In Progress for int j 0 entry Count classpath Entries length j entry Count j if classpath Entries j get Path equals jar Path if target instanceof I File internal jar return java Project get Package Fragment Root I File target else external jar return java Project get Package Fragment Root0 jar Path catch Java Model Exception e Java Model Exception from get Resolved Classpath a problem occured while accessing project nothing we can do ignore return null  IPackageFragmentRoot getJarPkgFragmentRoot IPath jarPath IJavaProject projectCount projectCount JavaProject javaProject JavaProject IClasspathEntry classpathEntries javaProject getResolvedClasspath ignoreUnresolvedEntry generateMarkerOnError returnResolutionInProgress entryCount classpathEntries entryCount classpathEntries getPath jarPath IFile javaProject getPackageFragmentRoot IFile javaProject getPackageFragmentRoot0 jarPath JavaModelException JavaModelException getResolvedClasspath
private Openable get Openable AST Node to Be Found Openable openable if openable instanceof Class File try int source Start to Be Found source Start int source End to Be Found source End Class File class File Class File openable I Source Range source Range class File get Type get Source Range int offset source Range get Offset if offset source Start offset source Range get Length source End return openable else String prefix class File get Top Level Type Name I Package Fragment pkg I Package Fragment class File get Parent I Class File children pkg get Class Files for int i 0 length children length i length i I Class File child children i if child get Element Name starts With prefix source Range child get Type get Source Range offset source Range get Offset if offset source Start offset source Range get Length source End return Openable child catch Java Model Exception e class file doesn t exist ignore return openable  getOpenable ASTNode toBeFound ClassFile sourceStart toBeFound sourceStart sourceEnd toBeFound sourceEnd ClassFile classFile ClassFile ISourceRange sourceRange classFile getType getSourceRange sourceRange getOffset sourceStart sourceRange getLength sourceEnd classFile getTopLevelTypeName IPackageFragment IPackageFragment classFile getParent IClassFile getClassFiles IClassFile getElementName startsWith sourceRange getType getSourceRange sourceRange getOffset sourceStart sourceRange getLength sourceEnd JavaModelException
Returns the package fragment root that contains the given resource path private I Package Fragment Root get Pkg Fragment Root String path String I Path path new Path path String I Project projects Resources Plugin get Workspace get Root get Projects for int i 0 max projects length i max i try I Project project projects i if project is Accessible project has Nature Java Core NATURE ID continue I Java Project java Project this java Model get Java Project project I Package Fragment Root roots java Project get Package Fragment Roots for int j 0 root Count roots length j root Count j Package Fragment Root root Package Fragment Root roots j if root get Path is Prefix Of path Util is Excluded path root full Inclusion Pattern Chars root full Exclusion Pattern Chars false return root catch Core Exception e Core Exception from has Nature should not happen since we check that the project is accessible Java Model Exception from get Package Fragment Roots a problem occured while accessing project nothing we can do ignore return null  IPackageFragmentRoot getPkgFragmentRoot pathString IPath pathString IProject ResourcesPlugin getWorkspace getRoot getProjects IProject isAccessible hasNature JavaCore NATURE_ID IJavaProject javaProject javaModel getJavaProject IPackageFragmentRoot javaProject getPackageFragmentRoots rootCount rootCount PackageFragmentRoot PackageFragmentRoot getPath isPrefixOf isExcluded fullInclusionPatternChars fullExclusionPatternChars CoreException CoreException hasNature JavaModelException getPackageFragmentRoots

public interface I Cache Enumeration extends Enumeration Returns the value of the previously accessed key in the enumeration Must be called after a call to next Element return Value of current cache entry  ICacheEnumeration nextElement

public interface ILRU Cacheable Returns the space the receiver consumes in an LRU Cache The default space value is 1 return int Amount of cache space taken by the receiver  ILRUCacheable

private I Inner Classes Attribute Entry entries Constructor for Inner Classes Attribute param class File Bytes param constant Pool param offset throws Class Format Exception public Inner Classes Attribute byte class File Bytes I Constant Pool constant Pool int offset throws Class Format Exception super class File Bytes constant Pool offset this number Of Classes u2 At class File Bytes 6 offset int length this number Of Classes this entries NO ENTRIES if length 0 int read Offset 8 this entries new I Inner Classes Attribute Entry length for int i 0 i length i this entries i new Inner Classes Attribute Entry class File Bytes constant Pool offset read Offset read Offset 8  IInnerClassesAttributeEntry InnerClassesAttribute classFileBytes constantPool ClassFormatException InnerClassesAttribute classFileBytes IConstantPool constantPool ClassFormatException classFileBytes constantPool numberOfClasses u2At classFileBytes numberOfClasses NO_ENTRIES readOffset IInnerClassesAttributeEntry InnerClassesAttributeEntry classFileBytes constantPool readOffset readOffset
see I Inner Classes Attribute get Inner Class Attributes Entries public I Inner Classes Attribute Entry get Inner Class Attributes Entries return this entries  IInnerClassesAttribute getInnerClassAttributesEntries IInnerClassesAttributeEntry getInnerClassAttributesEntries
see I Inner Classes Attribute get Number Of Classes public int get Number Of Classes return this number Of Classes  IInnerClassesAttribute getNumberOfClasses getNumberOfClasses numberOfClasses

public Inner Classes Attribute Entry byte class File Bytes I Constant Pool constant Pool int offset throws Class Format Exception this inner Class Name Index u2 At class File Bytes 0 offset this outer Class Name Index u2 At class File Bytes 2 offset this inner Name Index u2 At class File Bytes 4 offset this access Flags u2 At class File Bytes 6 offset I Constant Pool Entry constant Pool Entry if this inner Class Name Index 0 constant Pool Entry constant Pool decode Entry this inner Class Name Index if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Class throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY this inner Class Name constant Pool Entry get Class Info Name if outer Class Name Index 0 constant Pool Entry constant Pool decode Entry this outer Class Name Index if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Class throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY this outer Class Name constant Pool Entry get Class Info Name if inner Name Index 0 constant Pool Entry constant Pool decode Entry this inner Name Index if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Utf8 throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY this inner Name constant Pool Entry get Utf8 Value  InnerClassesAttributeEntry classFileBytes IConstantPool constantPool ClassFormatException innerClassNameIndex u2At classFileBytes outerClassNameIndex u2At classFileBytes innerNameIndex u2At classFileBytes accessFlags u2At classFileBytes IConstantPoolEntry constantPoolEntry innerClassNameIndex constantPoolEntry constantPool decodeEntry innerClassNameIndex constantPoolEntry getKind IConstantPoolConstant CONSTANT_Class ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY innerClassName constantPoolEntry getClassInfoName outerClassNameIndex constantPoolEntry constantPool decodeEntry outerClassNameIndex constantPoolEntry getKind IConstantPoolConstant CONSTANT_Class ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY outerClassName constantPoolEntry getClassInfoName innerNameIndex constantPoolEntry constantPool decodeEntry innerNameIndex constantPoolEntry getKind IConstantPoolConstant CONSTANT_Utf8 ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY innerName constantPoolEntry getUtf8Value
see I Inner Classes Attribute Entry get Access Flags public int get Access Flags return this access Flags  IInnerClassesAttributeEntry getAccessFlags getAccessFlags accessFlags
see I Inner Classes Attribute Entry get Inner Class Name public char get Inner Class Name return this inner Class Name  IInnerClassesAttributeEntry getInnerClassName getInnerClassName innerClassName
see I Inner Classes Attribute Entry get Inner Class Name Index public int get Inner Class Name Index return this inner Class Name Index  IInnerClassesAttributeEntry getInnerClassNameIndex getInnerClassNameIndex innerClassNameIndex
see I Inner Classes Attribute Entry get Inner Name public char get Inner Name return this inner Name  IInnerClassesAttributeEntry getInnerName getInnerName innerName
see I Inner Classes Attribute Entry get Inner Name Index public int get Inner Name Index return this inner Name Index  IInnerClassesAttributeEntry getInnerNameIndex getInnerNameIndex innerNameIndex
see I Inner Classes Attribute Entry get Outer Class Name public char get Outer Class Name return this outer Class Name  IInnerClassesAttributeEntry getOuterClassName getOuterClassName outerClassName
see I Inner Classes Attribute Entry get Outer Class Name Index public int get Outer Class Name Index return this outer Class Name Index  IInnerClassesAttributeEntry getOuterClassNameIndex getOuterClassNameIndex outerClassNameIndex

Constructor for Line Number Attribute param class File Bytes param constant Pool param offset throws Class Format Exception public Line Number Attribute byte class File Bytes I Constant Pool constant Pool int offset throws Class Format Exception super class File Bytes constant Pool offset this line Number Table Length u2 At class File Bytes 6 offset this line Number Table NO ENTRIES if this line Number Table Length 0 this line Number Table new int this line Number Table Length 2 int read Offset 8 for int i 0 max this line Number Table Length i max i this line Number Table i 0 u2 At class File Bytes read Offset offset this line Number Table i 1 u2 At class File Bytes read Offset 2 offset read Offset 4  LineNumberAttribute classFileBytes constantPool ClassFormatException LineNumberAttribute classFileBytes IConstantPool constantPool ClassFormatException classFileBytes constantPool lineNumberTableLength u2At classFileBytes lineNumberTable NO_ENTRIES lineNumberTableLength lineNumberTable lineNumberTableLength readOffset lineNumberTableLength lineNumberTable u2At classFileBytes readOffset lineNumberTable u2At classFileBytes readOffset readOffset
see org eclipse jdt core util I Class File Attribute get Attribute Name public char get Attribute Name return I Attribute Names Constants LINE NUMBER  IClassFileAttribute getAttributeName getAttributeName IAttributeNamesConstants LINE_NUMBER
see I Line Number Attribute get Line Number Table public int get Line Number Table return this line Number Table  ILineNumberAttribute getLineNumberTable getLineNumberTable lineNumberTable
see I Line Number Attribute get Line Number Table Length public int get Line Number Table Length return this line Number Table Length  ILineNumberAttribute getLineNumberTableLength getLineNumberTableLength lineNumberTableLength

Constructor for Local Variable Attribute param class File Bytes param constant Pool param offset throws Class Format Exception public Local Variable Attribute byte class File Bytes I Constant Pool constant Pool int offset throws Class Format Exception super class File Bytes constant Pool offset this local Variable Table Length u2 At class File Bytes 6 offset int read Offset 8 int length this local Variable Table Length this local Variable Table NO ENTRIES if length 0 this local Variable Table new Local Variable Table Entry length for int i 0 i length i this local Variable Table i new Local Variable Table Entry class File Bytes constant Pool offset read Offset read Offset 10  LocalVariableAttribute classFileBytes constantPool ClassFormatException LocalVariableAttribute classFileBytes IConstantPool constantPool ClassFormatException classFileBytes constantPool localVariableTableLength u2At classFileBytes readOffset localVariableTableLength localVariableTable NO_ENTRIES localVariableTable LocalVariableTableEntry localVariableTable LocalVariableTableEntry classFileBytes constantPool readOffset readOffset
see org eclipse jdt core util I Class File Attribute get Attribute Name public char get Attribute Name return I Attribute Names Constants LOCAL VARIABLE  IClassFileAttribute getAttributeName getAttributeName IAttributeNamesConstants LOCAL_VARIABLE
see I Local Variable Attribute get Local Variable Table public I Local Variable Table Entry get Local Variable Table return this local Variable Table  ILocalVariableAttribute getLocalVariableTable ILocalVariableTableEntry getLocalVariableTable localVariableTable
see I Local Variable Attribute get Local Variable Table Length public int get Local Variable Table Length return this local Variable Table Length  ILocalVariableAttribute getLocalVariableTableLength getLocalVariableTableLength localVariableTableLength

Constructor for Local Variable Table Entry param class File Bytes param constant Pool param offset throws Class Format Exception public Local Variable Table Entry byte class File Bytes I Constant Pool constant Pool int offset throws Class Format Exception this startPC u2 At class File Bytes 0 offset this length u2 At class File Bytes 2 offset this name Index u2 At class File Bytes 4 offset this descriptor Index u2 At class File Bytes 6 offset this index u2 At class File Bytes 8 offset I Constant Pool Entry constant Pool Entry constant Pool decode Entry this name Index if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Utf8 throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY this name constant Pool Entry get Utf8 Value constant Pool Entry constant Pool decode Entry this descriptor Index if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Utf8 throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY this descriptor constant Pool Entry get Utf8 Value  LocalVariableTableEntry classFileBytes constantPool ClassFormatException LocalVariableTableEntry classFileBytes IConstantPool constantPool ClassFormatException u2At classFileBytes u2At classFileBytes nameIndex u2At classFileBytes descriptorIndex u2At classFileBytes u2At classFileBytes IConstantPoolEntry constantPoolEntry constantPool decodeEntry nameIndex constantPoolEntry getKind IConstantPoolConstant CONSTANT_Utf8 ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY constantPoolEntry getUtf8Value constantPoolEntry constantPool decodeEntry descriptorIndex constantPoolEntry getKind IConstantPoolConstant CONSTANT_Utf8 ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY constantPoolEntry getUtf8Value
see I Local Variable Table Entry get StartPC public int get StartPC return this startPC  ILocalVariableTableEntry getStartPC getStartPC
see I Local Variable Table Entry get Length public int get Length return this length  ILocalVariableTableEntry getLength getLength
see I Local Variable Table Entry get Name Index public int get Name Index return this name Index  ILocalVariableTableEntry getNameIndex getNameIndex nameIndex
see I Local Variable Table Entry get Descriptor Index public int get Descriptor Index return this descriptor Index  ILocalVariableTableEntry getDescriptorIndex getDescriptorIndex descriptorIndex
see I Local Variable Table Entry get Index public int get Index return this index  ILocalVariableTableEntry getIndex getIndex
see I Local Variable Table Entry get Name public char get Name return this name  ILocalVariableTableEntry getName getName
see I Local Variable Table Entry get Descriptor public char get Descriptor return this descriptor  ILocalVariableTableEntry getDescriptor getDescriptor

Creates a new instance of the receiver with the provided values for key value and space public LRU Cache Entry Object key Object value int space  fKey key  fValue value  fSpace space  LRUCacheEntry _fKey _fValue _fSpace
Returns a String that represents the value of this object public String to String return LRU Cache Entry  fKey  fValue NON NLS 3 NON NLS 1 NON NLS 2  toString LRUCacheEntry _fKey _fValue
protected static final int DEFAULT SPACELIMIT 100 Creates a new cache Size of cache is defined by code DEFAULT SPACELIMIT code public LRU Cache this DEFAULT SPACELIMIT  DEFAULT_SPACELIMIT DEFAULT_SPACELIMIT LRUCache DEFAULT_SPACELIMIT
Creates a new cache param size Size of Cache public LRU Cache int size f Timestamp Counter f Current Space 0 f Entry Queue f Entry Queue Tail null f Entry Table new Hashtable size f Space Limit size  LRUCache fTimestampCounter fCurrentSpace fEntryQueue fEntryQueueTail fEntryTable fSpaceLimit
Returns a new cache containing the same contents return New copy of object public Object clone LRU Cache new Cache new Instance f Space Limit LRU Cache Entry q Entry Preserve order of entries by copying from oldest to newest q Entry this f Entry Queue Tail while q Entry null new Cache private Add q Entry  fKey q Entry  fValue q Entry  fSpace q Entry q Entry  fPrevious return new Cache  LRUCache newCache newInstance fSpaceLimit LRUCacheEntry qEntry qEntry fEntryQueueTail qEntry newCache privateAdd qEntry _fKey qEntry _fValue qEntry _fSpace qEntry qEntry _fPrevious newCache
Flushes all entries from the cache public void flush f Current Space 0 LRU Cache Entry entry f Entry Queue Tail Remember last entry f Entry Table new Hashtable Clear it out f Entry Queue f Entry Queue Tail null while entry null send deletion notifications in LRU order private Notify Deletion From Cache entry entry entry  fPrevious  fCurrentSpace LRUCacheEntry fEntryQueueTail fEntryTable fEntryQueue fEntryQueueTail privateNotifyDeletionFromCache _fPrevious
Flushes the given entry from the cache Does nothing if entry does not exist in cache param key Key of object to flush public void flush Object key LRU Cache Entry entry entry LRU Cache Entry f Entry Table get key If entry does not exist return if entry null return this private Remove Entry entry false  LRUCacheEntry LRUCacheEntry fEntryTable privateRemoveEntry
Answers the value in the cache at the given key If the value is not in the cache returns null param key Hash table key of object to retrieve return Retreived object or null if object does not exist public Object get Object key LRU Cache Entry entry LRU Cache Entry f Entry Table get key if entry null return null this update Timestamp entry return entry  fValue  LRUCacheEntry LRUCacheEntry fEntryTable updateTimestamp _fValue
Returns the amount of space that is current used in the cache public int get Current Space return f Current Space  getCurrentSpace fCurrentSpace
Returns the maximum amount of space available in the cache public int get Space Limit return f Space Limit  getSpaceLimit fSpaceLimit
Returns an Enumeration of the keys currently in the cache public Enumeration keys return f Entry Table keys  fEntryTable
LRU Cache Entry f Entry public boolean has More Elements return f Values has More Elements  LRUCacheEntry fEntry hasMoreElements fValues hasMoreElements
public Object next Element f Entry LRU Cache Entry f Values next Element return f Entry  fKey  nextElement fEntry LRUCacheEntry fValues nextElement fEntry _fKey
public Object get Value if f Entry null throw new java util No Such Element Exception return f Entry  fValue  getValue fEntry NoSuchElementException fEntry _fValue
Returns an enumeration that iterates over all the keys and values currently in the cache public I Cache Enumeration keys And Values return new I Cache Enumeration Enumeration f Values f Entry Table elements LRU Cache Entry f Entry public boolean has More Elements return f Values has More Elements public Object next Element f Entry LRU Cache Entry f Values next Element return f Entry  fKey public Object get Value if f Entry null throw new java util No Such Element Exception return f Entry  fValue  ICacheEnumeration keysAndValues ICacheEnumeration fValues fEntryTable LRUCacheEntry fEntry hasMoreElements fValues hasMoreElements nextElement fEntry LRUCacheEntry fValues nextElement fEntry _fKey getValue fEntry NoSuchElementException fEntry _fValue
Ensures there is the specified amount of free space in the receiver by removing old entries if necessary Returns true if the requested space was made available false otherwise param space Amount of space to free up protected boolean make Space int space int limit limit this get Space Limit if space is already available if f Current Space space limit return true if entry is too big for cache if space limit return false Free up space by removing oldest entries while f Current Space space limit f Entry Queue Tail null this private Remove Entry f Entry Queue Tail false return true  makeSpace getSpaceLimit fCurrentSpace fCurrentSpace fEntryQueueTail privateRemoveEntry fEntryQueueTail
Returns a new LRU Cache instance protected LRU Cache new Instance int size return new LRU Cache size  LRUCache LRUCache newInstance LRUCache
Adds an entry for the given key value space protected void private Add Object key Object value int space LRU Cache Entry entry entry new LRU Cache Entry key value space this private Add Entry entry false  privateAdd LRUCacheEntry LRUCacheEntry privateAddEntry
Adds the given entry from the receiver param shuffle Indicates whether we are just shuffling the queue in which case the entry table is not modified protected void private Add Entry LRU Cache Entry entry boolean shuffle if shuffle f Entry Table put entry  fKey entry f Current Space entry  fSpace entry  fTimestamp f Timestamp Counter entry  fNext this f Entry Queue entry  fPrevious null if f Entry Queue null this is the first and last entry f Entry Queue Tail entry else f Entry Queue  fPrevious entry f Entry Queue entry  privateAddEntry LRUCacheEntry fEntryTable _fKey fCurrentSpace _fSpace _fTimestamp fTimestampCounter _fNext fEntryQueue _fPrevious fEntryQueue fEntryQueueTail fEntryQueue _fPrevious fEntryQueue
An entry has been removed from the cache for example because it has fallen off the bottom of the LRU queue Subclasses could over ride this to implement a persistent cache below the LRU cache protected void private Notify Deletion From Cache LRU Cache Entry entry Default is NOP  privateNotifyDeletionFromCache LRUCacheEntry
Removes the entry from the entry queue param shuffle indicates whether we are just shuffling the queue in which case the entry table is not modified protected void private Remove Entry LRU Cache Entry entry boolean shuffle LRU Cache Entry previous next previous entry  fPrevious next entry  fNext if shuffle f Entry Table remove entry  fKey f Current Space entry  fSpace private Notify Deletion From Cache entry if this was the first entry if previous null f Entry Queue next else previous  fNext next if this was the last entry if next null f Entry Queue Tail previous else next  fPrevious previous  privateRemoveEntry LRUCacheEntry LRUCacheEntry _fPrevious _fNext fEntryTable _fKey fCurrentSpace _fSpace privateNotifyDeletionFromCache fEntryQueue _fNext fEntryQueueTail _fPrevious
Sets the value in the cache at the given key Returns the value param key Key of object to add param value Value of object to add return added value public Object put Object key Object value int new Space old Space new Total LRU Cache Entry entry Check whether there s an entry in the cache new Space space For value entry LRU Cache Entry f Entry Table get key if entry null Replace the entry in the cache if it would not overflow the cache Otherwise flush the entry and re add it so as to keep cache within budget old Space entry  fSpace new Total get Current Space old Space new Space if new Total get Space Limit update Timestamp entry entry  fValue value entry  fSpace new Space this f Current Space new Total return value else private Remove Entry entry false if make Space new Space private Add key value new Space return value  newSpace oldSpace newTotal LRUCacheEntry newSpace spaceFor LRUCacheEntry fEntryTable oldSpace _fSpace newTotal getCurrentSpace oldSpace newSpace newTotal getSpaceLimit updateTimestamp _fValue _fSpace newSpace fCurrentSpace newTotal privateRemoveEntry makeSpace newSpace privateAdd newSpace
Removes and returns the value in the cache for the given key If the key is not in the cache returns null param key Key of object to remove from cache return Value removed from cache public Object remove Key Object key LRU Cache Entry entry LRU Cache Entry f Entry Table get key if entry null return null Object value entry  fValue this private Remove Entry entry false return value  removeKey LRUCacheEntry LRUCacheEntry fEntryTable _fValue privateRemoveEntry
Sets the maximum amount of space that the cache can store param limit Number of units of cache space public void set Space Limit int limit if limit f Space Limit make Space f Space Limit limit f Space Limit limit  setSpaceLimit fSpaceLimit makeSpace fSpaceLimit fSpaceLimit
Returns the space taken by the given value protected int space For Object value if value instanceof ILRU Cacheable return ILRU Cacheable value get Cache Footprint else return 1  spaceFor ILRUCacheable ILRUCacheable getCacheFootprint
Returns a String that represents the value of this object This method is for debugging purposes only public String to String return LRU Cache f Current Space 100 0 f Space Limit full n NON NLS 1 NON NLS 2 this to String Contents  toString LRUCache fCurrentSpace fSpaceLimit toStringContents
Returns a String that represents the contents of this object This method is for debugging purposes only protected String to String Contents String Buffer result new String Buffer int length f Entry Table size Object unsorted Keys new Object length String unsorted To Strings new String length Enumeration e this keys for int i 0 i length i Object key e next Element unsorted Keys i key unsorted To Strings i key instanceof org eclipse jdt internal core Java Element org eclipse jdt internal core Java Element key get Element Name key to String To String Sorter sorter new To String Sorter sorter sort unsorted Keys unsorted To Strings for int i 0 i length i String to String sorter sorted Strings i Object value this get sorter sorted Objects i result append to String result append NON NLS 1 result append value result append n NON NLS 1 return result to String  toStringContents StringBuffer StringBuffer fEntryTable unsortedKeys unsortedToStrings nextElement unsortedKeys unsortedToStrings JavaElement JavaElement getElementName toString ToStringSorter ToStringSorter unsortedKeys unsortedToStrings toString sortedStrings sortedObjects toString toString
Updates the timestamp for the given entry ensuring that the queue is kept in correct order The entry must exist protected void update Timestamp LRU Cache Entry entry entry  fTimestamp f Timestamp Counter if f Entry Queue entry this private Remove Entry entry true this private Add Entry entry true return  updateTimestamp LRUCacheEntry _fTimestamp fTimestampCounter fEntryQueue privateRemoveEntry privateAddEntry

private int index 0 public Memento Tokenizer String memento this memento memento to Char Array this length this memento length  MementoTokenizer toCharArray
public boolean has More Tokens return this index this length  hasMoreTokens
public String next Token int start this index String Buffer buffer null switch this memento this index case Java Element JEM ESCAPE buffer new String Buffer buffer append this memento this index start this index break case Java Element JEM COUNT return COUNT case Java Element JEM JAVAPROJECT return JAVAPROJECT case Java Element JEM PACKAGEFRAGMENTROOT return PACKAGEFRAGMENTROOT case Java Element JEM PACKAGEFRAGMENT return PACKAGEFRAGMENT case Java Element JEM FIELD return FIELD case Java Element JEM METHOD return METHOD case Java Element JEM INITIALIZER return INITIALIZER case Java Element JEM COMPILATIONUNIT return COMPILATIONUNIT case Java Element JEM CLASSFILE return CLASSFILE case Java Element JEM TYPE return TYPE case Java Element JEM PACKAGEDECLARATION return PACKAGEDECLARATION case Java Element JEM IMPORTDECLARATION return IMPORTDECLARATION case Java Element JEM LOCALVARIABLE return LOCALVARIABLE loop while this index this length switch this memento this index case Java Element JEM ESCAPE if buffer null buffer new String Buffer buffer append Char Operation subarray this memento start this index start this index break case Java Element JEM COUNT case Java Element JEM JAVAPROJECT case Java Element JEM PACKAGEFRAGMENTROOT case Java Element JEM PACKAGEFRAGMENT case Java Element JEM FIELD case Java Element JEM METHOD case Java Element JEM INITIALIZER case Java Element JEM COMPILATIONUNIT case Java Element JEM CLASSFILE case Java Element JEM TYPE case Java Element JEM PACKAGEDECLARATION case Java Element JEM IMPORTDECLARATION case Java Element JEM LOCALVARIABLE break loop this index if buffer null buffer append Char Operation subarray this memento start this index return buffer to String else return new String Char Operation subarray this memento start this index  nextToken StringBuffer JavaElement JEM_ESCAPE StringBuffer JavaElement JEM_COUNT JavaElement JEM_JAVAPROJECT JavaElement JEM_PACKAGEFRAGMENTROOT JavaElement JEM_PACKAGEFRAGMENT JavaElement JEM_FIELD JavaElement JEM_METHOD JavaElement JEM_INITIALIZER JavaElement JEM_COMPILATIONUNIT JavaElement JEM_CLASSFILE JavaElement JEM_TYPE JavaElement JEM_PACKAGEDECLARATION JavaElement JEM_IMPORTDECLARATION JavaElement JEM_LOCALVARIABLE JavaElement JEM_ESCAPE StringBuffer CharOperation JavaElement JEM_COUNT JavaElement JEM_JAVAPROJECT JavaElement JEM_PACKAGEFRAGMENTROOT JavaElement JEM_PACKAGEFRAGMENT JavaElement JEM_FIELD JavaElement JEM_METHOD JavaElement JEM_INITIALIZER JavaElement JEM_COMPILATIONUNIT JavaElement JEM_CLASSFILE JavaElement JEM_TYPE JavaElement JEM_PACKAGEDECLARATION JavaElement JEM_IMPORTDECLARATION JavaElement JEM_LOCALVARIABLE CharOperation toString CharOperation

param class File Bytes byte param constant Pool I Constant Pool param offset int param decoding Flags int public Method Info byte class File Bytes I Constant Pool constant Pool int offset int decoding Flags throws Class Format Exception boolean no code attribute decoding Flags I Class File Reader METHOD BODIES 0 this access Flags u2 At class File Bytes 0 offset this name Index u2 At class File Bytes 2 offset I Constant Pool Entry constant Pool Entry constant Pool decode Entry this name Index if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Utf8 throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY this name constant Pool Entry get Utf8 Value this descriptor Index u2 At class File Bytes 4 offset constant Pool Entry constant Pool decode Entry this descriptor Index if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Utf8 throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY this descriptor constant Pool Entry get Utf8 Value this attributes Count u2 At class File Bytes 6 offset this attributes Class File Attribute NO ATTRIBUTES if this attributes Count 0 if no code attribute is Abstract is Native if this attributes Count 1 this attributes new I Class File Attribute this attributes Count 1 else this attributes new I Class File Attribute this attributes Count int attributes Index 0 int read Offset 8 for int i 0 i this attributes Count i constant Pool Entry constant Pool decode Entry u2 At class File Bytes read Offset offset if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Utf8 throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY char attribute Name constant Pool Entry get Utf8 Value if equals attribute Name I Attribute Names Constants DEPRECATED this is Deprecated true this attributes attributes Index new Class File Attribute class File Bytes constant Pool offset read Offset else if equals attribute Name I Attribute Names Constants SYNTHETIC this is Synthetic true this attributes attributes Index new Class File Attribute class File Bytes constant Pool offset read Offset else if equals attribute Name I Attribute Names Constants CODE if no code attribute this code Attribute new Code Attribute class File Bytes constant Pool offset read Offset this attributes attributes Index this code Attribute else if equals attribute Name I Attribute Names Constants EXCEPTIONS this exception Attribute new Exception Attribute class File Bytes constant Pool offset read Offset this attributes attributes Index this exception Attribute else this attributes attributes Index new Class File Attribute class File Bytes constant Pool offset read Offset read Offset 6 u4 At class File Bytes read Offset 2 offset this attribute Bytes read Offset  classFileBytes constantPool IConstantPool decodingFlags MethodInfo classFileBytes IConstantPool constantPool decodingFlags ClassFormatException no_code_attribute decodingFlags IClassFileReader METHOD_BODIES accessFlags u2At classFileBytes nameIndex u2At classFileBytes IConstantPoolEntry constantPoolEntry constantPool decodeEntry nameIndex constantPoolEntry getKind IConstantPoolConstant CONSTANT_Utf8 ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY constantPoolEntry getUtf8Value descriptorIndex u2At classFileBytes constantPoolEntry constantPool decodeEntry descriptorIndex constantPoolEntry getKind IConstantPoolConstant CONSTANT_Utf8 ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY constantPoolEntry getUtf8Value attributesCount u2At classFileBytes ClassFileAttribute NO_ATTRIBUTES attributesCount no_code_attribute isAbstract isNative attributesCount IClassFileAttribute attributesCount IClassFileAttribute attributesCount attributesIndex readOffset attributesCount constantPoolEntry constantPool decodeEntry u2At classFileBytes readOffset constantPoolEntry getKind IConstantPoolConstant CONSTANT_Utf8 ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY attributeName constantPoolEntry getUtf8Value attributeName IAttributeNamesConstants isDeprecated attributesIndex ClassFileAttribute classFileBytes constantPool readOffset attributeName IAttributeNamesConstants isSynthetic attributesIndex ClassFileAttribute classFileBytes constantPool readOffset attributeName IAttributeNamesConstants no_code_attribute codeAttribute CodeAttribute classFileBytes constantPool readOffset attributesIndex codeAttribute attributeName IAttributeNamesConstants exceptionAttribute ExceptionAttribute classFileBytes constantPool readOffset attributesIndex exceptionAttribute attributesIndex ClassFileAttribute classFileBytes constantPool readOffset readOffset u4At classFileBytes readOffset attributeBytes readOffset
see I Method Info get Access Flags public int get Access Flags return this access Flags  IMethodInfo getAccessFlags getAccessFlags accessFlags
see I Method Info get Code Attribute public I Code Attribute get Code Attribute return this code Attribute  IMethodInfo getCodeAttribute ICodeAttribute getCodeAttribute codeAttribute
see I Method Info get Descriptor public char get Descriptor return this descriptor  IMethodInfo getDescriptor getDescriptor
see I Method Info get Name public char get Name return this name  IMethodInfo getName getName
see I Method Info is Clinit public boolean is Clinit return this name 0 this name length 8 Can only match clinit  IMethodInfo isClinit isClinit
see I Method Info is Constructor public boolean is Constructor return this name 0 this name length 6 Can only match init  IMethodInfo isConstructor isConstructor
see I Method Info is Deprecated public boolean is Deprecated return this is Deprecated  IMethodInfo isDeprecated isDeprecated isDeprecated
see I Method Info is Synthetic public boolean is Synthetic return this is Synthetic  IMethodInfo isSynthetic isSynthetic isSynthetic
see I Method Info get Exception Attribute public I Exception Attribute get Exception Attribute return this exception Attribute  IMethodInfo getExceptionAttribute IExceptionAttribute getExceptionAttribute exceptionAttribute
see I Method Info get Attribute Count public int get Attribute Count return this attributes Count  IMethodInfo getAttributeCount getAttributeCount attributesCount
see I Method Info get Descriptor Index public int get Descriptor Index return this descriptor Index  IMethodInfo getDescriptorIndex getDescriptorIndex descriptorIndex
see I Method Info get Name Index public int get Name Index return this name Index  IMethodInfo getNameIndex getNameIndex nameIndex
int size In Bytes return this attribute Bytes  sizeInBytes attributeBytes
see I Method Info get Attributes public I Class File Attribute get Attributes return this attributes  IMethodInfo getAttributes IClassFileAttribute getAttributes
private boolean is Abstract return this access Flags I Modifier Constants ACC ABSTRACT 0  isAbstract accessFlags IModifierConstants ACC_ABSTRACT
private boolean is Native return this access Flags I Modifier Constants ACC NATIVE 0  isNative accessFlags IModifierConstants ACC_NATIVE

public static final int Bracket Kinds 3 public Public Scanner this false comment false whitespace false nls Class File Constants JDK1 3 source Level null task Tag null task Priorities true task Case Sensitive  BracketKinds PublicScanner ClassFileConstants JDK1_3 sourceLevel taskTag taskPriorities taskCaseSensitive
public Public Scanner boolean tokenize Comments boolean tokenize White Space boolean check Non Externalized String Literals long source Level char task Tags char task Priorities boolean is Task Case Sensitive this eof Position Integer MAX VALUE this tokenize Comments tokenize Comments this tokenize White Space tokenize White Space this check Non Externalized String Literals check Non Externalized String Literals this assert Mode source Level Class File Constants JDK1 4 this task Tags task Tags this task Priorities task Priorities this is Task Case Sensitive is Task Case Sensitive  PublicScanner tokenizeComments tokenizeWhiteSpace checkNonExternalizedStringLiterals sourceLevel taskTags taskPriorities isTaskCaseSensitive eofPosition MAX_VALUE tokenizeComments tokenizeComments tokenizeWhiteSpace tokenizeWhiteSpace checkNonExternalizedStringLiterals checkNonExternalizedStringLiterals assertMode sourceLevel ClassFileConstants JDK1_4 taskTags taskTags taskPriorities taskPriorities isTaskCaseSensitive isTaskCaseSensitive
public final boolean at End This code is not relevant if source is Only a part of the real stream input return this source length this current Position  atEnd currentPosition
private void check Non Externalized String if this current Line null return parse Tags this current Line  checkNonExternalizedString currentLine parseTags currentLine
TODO frederic see if we need to take unicode characters into account public void check Task Tag int comment Start int comment End char src this source only look for newer task tags if this found Task Count 0 this found Task Positions this found Task Count 1 0 comment Start return int found Task Index this found Task Count char previous src comment Start 1 should be or next Char for int i comment Start 2 i comment End i this eof Position i char tag null char priority null check for tag occurrence only if not ambiguous with javadoc tag if previous next Tag for int itag 0 itag this task Tags length itag tag this task Tags itag int tag Length tag length if tag Length 0 continue next Tag ensure tag is not leaded with letter if tag starts with a letter if Character is Java Identifier Start tag 0 if Character is Java Identifier Part previous continue next Tag for int t 0 t tag Length t char sc tc int x i t if x this eof Position x comment End continue next Tag if sc src i t tc tag t case sensitive check if this is Task Case Sensitive Character to Lower Case sc Character to Lower Case tc case insensitive check continue next Tag ensure tag is not followed with letter if tag finishes with a letter if i tag Length comment End Character is Java Identifier Part src i tag Length 1 if Character is Java Identifier Part src i tag Length continue next Tag if this found Task Tags null this found Task Tags new char 5 this found Task Messages new char 5 this found Task Priorities new char 5 this found Task Positions new int 5 else if this found Task Count this found Task Tags length System arraycopy this found Task Tags 0 this found Task Tags new char this found Task Count 2 0 this found Task Count System arraycopy this found Task Messages 0 this found Task Messages new char this found Task Count 2 0 this found Task Count System arraycopy this found Task Priorities 0 this found Task Priorities new char this found Task Count 2 0 this found Task Count System arraycopy this found Task Positions 0 this found Task Positions new int this found Task Count 2 0 this found Task Count priority this task Priorities null itag this task Priorities length this task Priorities itag null this found Task Tags this found Task Count tag this found Task Priorities this found Task Count priority this found Task Positions this found Task Count new int i i tag Length 1 this found Task Messages this found Task Count Char Operation NO CHAR this found Task Count i tag Length 1 will be incremented when looping break next Tag previous src i for int i found Task Index i this found Task Count i retrieve message start and end positions int msg Start this found Task Positions i 0 this found Task Tags i length int max value i 1 this found Task Count this found Task Positions i 1 0 1 comment End 1 at most beginning of next task if max value msg Start max value msg Start would only occur if tag is before EOF int end 1 char c for int j msg Start j max value j if c src j n c r end j 1 break if end 1 for int j max value j msg Start j if c src j end j 1 break if end 1 end max value if msg Start end continue empty trim the message while Char Operation is Whitespace src end msg Start end end while Char Operation is Whitespace src msg Start msg Start end msg Start update the end position of the task this found Task Positions i 1 end get the message source final int message Length end msg Start 1 char message new char message Length System arraycopy src msg Start message 0 message Length this found Task Messages i message  checkTaskTag commentStart commentEnd foundTaskCount foundTaskPositions foundTaskCount commentStart foundTaskIndex foundTaskCount commentStart nextChar commentStart commentEnd eofPosition nextTag taskTags taskTags tagLength tagLength nextTag isJavaIdentifierStart isJavaIdentifierPart nextTag tagLength eofPosition commentEnd nextTag isTaskCaseSensitive toLowerCase toLowerCase nextTag tagLength commentEnd isJavaIdentifierPart tagLength isJavaIdentifierPart tagLength nextTag foundTaskTags foundTaskTags foundTaskMessages foundTaskPriorities foundTaskPositions foundTaskCount foundTaskTags foundTaskTags foundTaskTags foundTaskCount foundTaskCount foundTaskMessages foundTaskMessages foundTaskCount foundTaskCount foundTaskPriorities foundTaskPriorities foundTaskCount foundTaskCount foundTaskPositions foundTaskPositions foundTaskCount foundTaskCount taskPriorities taskPriorities taskPriorities foundTaskTags foundTaskCount foundTaskPriorities foundTaskCount foundTaskPositions foundTaskCount tagLength foundTaskMessages foundTaskCount CharOperation NO_CHAR foundTaskCount tagLength nextTag foundTaskIndex foundTaskCount msgStart foundTaskPositions foundTaskTags max_value foundTaskCount foundTaskPositions commentEnd max_value msgStart max_value msgStart msgStart max_value max_value msgStart max_value msgStart CharOperation isWhitespace msgStart CharOperation isWhitespace msgStart msgStart msgStart foundTaskPositions messageLength msgStart messageLength msgStart messageLength foundTaskMessages
public char get Current Identifier Source return the token REAL source aka unicodes are precomputed char result if this without Unicode Ptr 0 0 is used as a fast test flag so the real first char is in position 1 System arraycopy this without Unicode Buffer 1 result new char this without Unicode Ptr 0 this without Unicode Ptr else int length this current Position this start Position if length this source length return this source switch length see Optimized Length case 1 return optimized Current Token Source1 case 2 return optimized Current Token Source2 case 3 return optimized Current Token Source3 case 4 return optimized Current Token Source4 case 5 return optimized Current Token Source5 case 6 return optimized Current Token Source6 no optimization System arraycopy this source this start Position result new char length 0 length return result  getCurrentIdentifierSource withoutUnicodePtr withoutUnicodeBuffer withoutUnicodePtr withoutUnicodePtr currentPosition startPosition OptimizedLength optimizedCurrentTokenSource1 optimizedCurrentTokenSource2 optimizedCurrentTokenSource3 optimizedCurrentTokenSource4 optimizedCurrentTokenSource5 optimizedCurrentTokenSource6 startPosition
return result public int get Current Token End Position return this current Position 1  getCurrentTokenEndPosition currentPosition
public final char get Current Token Source Return the token REAL source aka unicodes are precomputed char result if this without Unicode Ptr 0 0 is used as a fast test flag so the real first char is in position 1 System arraycopy this without Unicode Buffer 1 result new char this without Unicode Ptr 0 this without Unicode Ptr else int length System arraycopy this source this start Position result new char length this current Position this start Position 0 length return result  getCurrentTokenSource withoutUnicodePtr withoutUnicodeBuffer withoutUnicodePtr withoutUnicodePtr startPosition currentPosition startPosition
public final char get Current Token Source String return the token REAL source aka unicodes are precomputed REMOVE the two that are at the beginning and the end char result if this without Unicode Ptr 0 0 is used as a fast test flag so the real first char is in position 1 System arraycopy this without Unicode Buffer 2 2 is 1 real start 1 to jump over the result new char this without Unicode Ptr 2 0 this without Unicode Ptr 2 else int length System arraycopy this source this start Position 1 result new char length this current Position this start Position 2 0 length return result  getCurrentTokenSourceString withoutUnicodePtr withoutUnicodeBuffer withoutUnicodePtr withoutUnicodePtr startPosition currentPosition startPosition
public final char get Raw Token Source int length this current Position this start Position char token Source new char length System arraycopy this source this start Position token Source 0 length return token Source  getRawTokenSource currentPosition startPosition tokenSource startPosition tokenSource tokenSource
public final char get Raw Token Source End int length this eof Position this current Position 1 char source End new char length System arraycopy this source this current Position source End 0 length return source End  getRawTokenSourceEnd eofPosition currentPosition sourceEnd currentPosition sourceEnd sourceEnd
public int get Current Token Start Position return this start Position  getCurrentTokenStartPosition startPosition
public final int get Line End int line Number if this line Ends null return 1 if line Number this line Ends length 1 return 1 if line Number 0 return 1 if line Number this line Ends length 1 return this eof Position return this line Ends line Number 1 next line start one character behind the line End of the previous line  getLineEnd lineNumber lineEnds lineNumber lineEnds lineNumber lineNumber lineEnds eofPosition lineEnds lineNumber lineEnd
public final int get Line Ends return a bounded copy of this line Ends int copy System arraycopy this line Ends 0 copy new int this line Ptr 1 0 this line Ptr 1 return copy  getLineEnds lineEnds lineEnds linePtr linePtr
Search the source position corresponding to the beginning of a given line number Line numbers are 1 based and relative to the scanner initial Position Character positions are 0 based e g get Line Start 1 0 indicates that the first line starts at character 0 In case the given line number is inconsistent answers 1 param line Number int return int public final int get Line Start int line Number if this line Ends null return 1 if line Number this line Ends length 1 return 1 if line Number 0 return 1 if line Number 1 return this initial Position return this line Ends line Number 2 1 next line start one character behind the line End of the previous line  initialPosition getLineStart lineNumber getLineStart lineNumber lineEnds lineNumber lineEnds lineNumber lineNumber initialPosition lineEnds lineNumber lineEnd
public final int get Next Char try if this current Character this source this current Position this source this current Position u unicode traitement int c1 c2 c3 c4 int unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 return 1 this current Character char c1 16 c2 16 c3 16 c4 this unicode As Back Slash this current Character need the unicode buffer if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position unicode Size this start Position fill the buffer with the char unicode Store At this without Unicode Ptr return this current Character end unicode traitement else this unicode As Back Slash false if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr return this current Character catch Index Out Of Bounds Exception e return 1  getNextChar currentCharacter currentPosition currentPosition unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentCharacter unicodeAsBackSlash currentCharacter withoutUnicodePtr unicodeInitializeBuffer currentPosition unicodeSize startPosition unicodeStoreAt withoutUnicodePtr currentCharacter unicodeAsBackSlash withoutUnicodePtr unicodeStoreAt withoutUnicodePtr currentCharacter IndexOutOfBoundsException
public final boolean get Next Char char tested Char BOOLEAN handle the case of unicode when a unicode appears then we must use a buffer that holds char internal values At the end of this method current Character holds the new visited char and current Position points right next after it Both previous lines are true if the current Character is to the tested Char On false no side effect has occured ALL get Next Char ARE OPTIMIZED COPIES if this current Position this source length handle the obvious case upfront this unicode As Back Slash false return false int temp this current Position try if this current Character this source this current Position this source this current Position u unicode traitement int c1 c2 c3 c4 int unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 this current Position temp return false this current Character char c1 16 c2 16 c3 16 c4 if this current Character tested Char this current Position temp return false this unicode As Back Slash this current Character need the unicode buffer if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position unicode Size this start Position fill the buffer with the char unicode Store At this without Unicode Ptr return true end unicode traitement else if this current Character tested Char this current Position temp return false this unicode As Back Slash false if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr return true catch Index Out Of Bounds Exception e this unicode As Back Slash false this current Position temp return false  getNextChar testedChar currentCharacter currentPosition currentCharacter testedChar getNextChar currentPosition unicodeAsBackSlash currentPosition currentCharacter currentPosition currentPosition unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentPosition currentCharacter currentCharacter testedChar currentPosition unicodeAsBackSlash currentCharacter withoutUnicodePtr unicodeInitializeBuffer currentPosition unicodeSize startPosition unicodeStoreAt withoutUnicodePtr currentCharacter testedChar currentPosition unicodeAsBackSlash withoutUnicodePtr unicodeStoreAt withoutUnicodePtr IndexOutOfBoundsException unicodeAsBackSlash currentPosition
public final int get Next Char char tested Char1 char tested Char2 INT 0 test Char1 1 tested Char2 1 others test can be done with x 0 for the first and x 0 for the second handle the case of unicode when a unicode appears then we must use a buffer that holds char internal values At the end of this method current Character holds the new visited char and current Position points right next after it Both previous lines are true if the current Character is to the tested Char1 2 On false no side effect has occured ALL get Next Char ARE OPTIMIZED COPIES if this current Position this source length handle the obvious case upfront return 1 int temp this current Position try int result if this current Character this source this current Position this source this current Position u unicode traitement int c1 c2 c3 c4 int unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 this current Position temp return 2 this current Character char c1 16 c2 16 c3 16 c4 if this current Character tested Char1 result 0 else if this current Character tested Char2 result 1 else this current Position temp return 1 need the unicode buffer if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position unicode Size this start Position fill the buffer with the char unicode Store At this without Unicode Ptr return result end unicode traitement else if this current Character tested Char1 result 0 else if this current Character tested Char2 result 1 else this current Position temp return 1 if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr return result catch Index Out Of Bounds Exception e this current Position temp return 1  getNextChar testedChar1 testedChar2 testChar1 testedChar2 currentCharacter currentPosition currentCharacter testedChar1 getNextChar currentPosition currentPosition currentCharacter currentPosition currentPosition unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentPosition currentCharacter currentCharacter testedChar1 currentCharacter testedChar2 currentPosition withoutUnicodePtr unicodeInitializeBuffer currentPosition unicodeSize startPosition unicodeStoreAt withoutUnicodePtr currentCharacter testedChar1 currentCharacter testedChar2 currentPosition withoutUnicodePtr unicodeStoreAt withoutUnicodePtr IndexOutOfBoundsException currentPosition
public final boolean get Next Char As Digit BOOLEAN handle the case of unicode when a unicode appears then we must use a buffer that holds char internal values At the end of this method current Character holds the new visited char and current Position points right next after it Both previous lines are true if the current Character is a digit On false no side effect has occured ALL get Next Char ARE OPTIMIZED COPIES if this current Position this source length handle the obvious case upfront return false int temp this current Position try if this current Character this source this current Position this source this current Position u unicode traitement int c1 c2 c3 c4 int unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 this current Position temp return false this current Character char c1 16 c2 16 c3 16 c4 if Character is Digit this current Character this current Position temp return false need the unicode buffer if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position unicode Size this start Position fill the buffer with the char unicode Store At this without Unicode Ptr return true end unicode traitement else if Character is Digit this current Character this current Position temp return false if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr return true catch Index Out Of Bounds Exception e this current Position temp return false  getNextCharAsDigit currentCharacter currentPosition currentCharacter getNextChar currentPosition currentPosition currentCharacter currentPosition currentPosition unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentPosition currentCharacter isDigit currentCharacter currentPosition withoutUnicodePtr unicodeInitializeBuffer currentPosition unicodeSize startPosition unicodeStoreAt withoutUnicodePtr isDigit currentCharacter currentPosition withoutUnicodePtr unicodeStoreAt withoutUnicodePtr IndexOutOfBoundsException currentPosition
public final boolean get Next Char As Digit int radix BOOLEAN handle the case of unicode when a unicode appears then we must use a buffer that holds char internal values At the end of this method current Character holds the new visited char and current Position points right next after it Both previous lines are true if the current Character is a digit base on radix On false no side effect has occured ALL get Next Char ARE OPTIMIZED COPIES if this current Position this source length handle the obvious case upfront return false int temp this current Position try if this current Character this source this current Position this source this current Position u unicode traitement int c1 c2 c3 c4 int unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 this current Position temp return false this current Character char c1 16 c2 16 c3 16 c4 if Character digit this current Character radix 1 this current Position temp return false need the unicode buffer if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position unicode Size this start Position fill the buffer with the char unicode Store At this without Unicode Ptr return true end unicode traitement else if Character digit this current Character radix 1 this current Position temp return false if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr return true catch Index Out Of Bounds Exception e this current Position temp return false  getNextCharAsDigit currentCharacter currentPosition currentCharacter getNextChar currentPosition currentPosition currentCharacter currentPosition currentPosition unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentPosition currentCharacter currentCharacter currentPosition withoutUnicodePtr unicodeInitializeBuffer currentPosition unicodeSize startPosition unicodeStoreAt withoutUnicodePtr currentCharacter currentPosition withoutUnicodePtr unicodeStoreAt withoutUnicodePtr IndexOutOfBoundsException currentPosition
public boolean get Next Char As Java Identifier Part BOOLEAN handle the case of unicode when a unicode appears then we must use a buffer that holds char internal values At the end of this method current Character holds the new visited char and current Position points right next after it Both previous lines are true if the current Character is a Java Identifier Part On false no side effect has occured ALL get Next Char ARE OPTIMIZED COPIES if this current Position this source length handle the obvious case upfront return false int temp this current Position try if this current Character this source this current Position this source this current Position u unicode traitement int c1 c2 c3 c4 int unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 this current Position temp return false this current Character char c1 16 c2 16 c3 16 c4 if Character is Java Identifier Part this current Character this current Position temp return false need the unicode buffer if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position unicode Size this start Position fill the buffer with the char unicode Store At this without Unicode Ptr return true end unicode traitement else if Character is Java Identifier Part this current Character this current Position temp return false if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr return true catch Index Out Of Bounds Exception e this current Position temp return false  getNextCharAsJavaIdentifierPart currentCharacter currentPosition currentCharacter JavaIdentifierPart getNextChar currentPosition currentPosition currentCharacter currentPosition currentPosition unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentPosition currentCharacter isJavaIdentifierPart currentCharacter currentPosition withoutUnicodePtr unicodeInitializeBuffer currentPosition unicodeSize startPosition unicodeStoreAt withoutUnicodePtr isJavaIdentifierPart currentCharacter currentPosition withoutUnicodePtr unicodeStoreAt withoutUnicodePtr IndexOutOfBoundsException currentPosition
public int get Next Token throws Invalid Input Exception this was Acr false if this diet jump Over Method Body this diet false return this current Position this source length Token NameEOF Token NameRBRACE int white Start 0 try while true loop for jumping over comments this without Unicode Ptr 0 start with a new token even comment written with unicode Consume white space and handles start Position white Start this current Position boolean is White Space has White Spaces false int offset 0 do this start Position this current Position boolean check If Unicode false try check If Unicode this current Character this source this current Position this source this current Position u catch Index Out Of Bounds Exception e if this tokenize White Space white Start this current Position 1 reposition scanner in case we are interested by spaces as tokens this current Position this start Position white Start return Token NameWHITESPACE if this current Position this eof Position return Token NameEOF if check If Unicode is White Space jump Over Unicode White Space offset 6 else offset 1 if this current Character r this current Character n check Non Externalized String if this record Line Separator push Line Separator else this current Line null is White Space this current Character Char Operation is Whitespace this current Character if is White Space has White Spaces true while is White Space if this tokenize White Space has White Spaces reposition scanner in case we are interested by spaces as tokens this current Position offset this start Position white Start return Token NameWHITESPACE little trick to get out in the middle of a source compuation if this current Position this eof Position return Token NameEOF Identify the next token switch this current Character case return Token NameLPAREN case return Token NameRPAREN case return Token NameLBRACE case return Token NameRBRACE case return Token NameLBRACKET case return Token NameRBRACKET case return Token NameSEMICOLON case return Token NameCOMMA case if get Next Char As Digit return scan Number true return Token NameDOT case int test if test get Next Char 0 return TokenNamePLUS PLUS if test 0 return TokenNamePLUS EQUAL return Token NamePLUS case int test if test get Next Char 0 return TokenNameMINUS MINUS if test 0 return TokenNameMINUS EQUAL return Token NameMINUS case return Token NameTWIDDLE case if get Next Char return TokenNameNOT EQUAL return Token NameNOT case if get Next Char return TokenNameMULTIPLY EQUAL return Token NameMULTIPLY case if get Next Char return TokenNameREMAINDER EQUAL return Token NameREMAINDER case int test if test get Next Char 0 return TokenNameLESS EQUAL if test 0 if get Next Char return TokenNameLEFT SHIFT EQUAL return TokenNameLEFT SHIFT return Token NameLESS case int test if test get Next Char 0 return TokenNameGREATER EQUAL if test 0 if test get Next Char 0 return TokenNameRIGHT SHIFT EQUAL if test 0 if get Next Char return TokenNameUNSIGNED RIGHT SHIFT EQUAL return TokenNameUNSIGNED RIGHT SHIFT return TokenNameRIGHT SHIFT return Token NameGREATER case if get Next Char return TokenNameEQUAL EQUAL return Token NameEQUAL case int test if test get Next Char 0 return TokenNameAND AND if test 0 return TokenNameAND EQUAL return Token NameAND case int test if test get Next Char 0 return TokenNameOR OR if test 0 return TokenNameOR EQUAL return Token NameOR case if get Next Char return TokenNameXOR EQUAL return Token NameXOR case return Token NameQUESTION case return Token NameCOLON case int test if test get Next Char n r 0 throw new Invalid Input Exception INVALID CHARACTER CONSTANT if test 0 relocate if finding another quote fairly close thus unicode u000D will be fully consumed for int look Ahead 0 look Ahead 3 look Ahead if this current Position look Ahead this source length break if this source this current Position look Ahead n break if this source this current Position look Ahead this current Position look Ahead 1 break throw new Invalid Input Exception INVALID CHARACTER CONSTANT if get Next Char relocate if finding another quote fairly close thus unicode u000D will be fully consumed for int look Ahead 0 look Ahead 3 look Ahead if this current Position look Ahead this source length break if this source this current Position look Ahead n break if this source this current Position look Ahead this current Position look Ahead 1 break throw new Invalid Input Exception INVALID CHARACTER CONSTANT if get Next Char scan Escape Character else consume next character this unicode As Back Slash false boolean check If Unicode false try check If Unicode this current Character this source this current Position this source this current Position u catch Index Out Of Bounds Exception e this current Position throw new Invalid Input Exception INVALID CHARACTER CONSTANT if check If Unicode get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr if get Next Char return Token Name Character Literal relocate if finding another quote fairly close thus unicode u000D will be fully consumed for int look Ahead 0 look Ahead 20 look Ahead if this current Position look Ahead this source length break if this source this current Position look Ahead n break if this source this current Position look Ahead this current Position look Ahead 1 break throw new Invalid Input Exception INVALID CHARACTER CONSTANT case try consume next character this unicode As Back Slash false boolean is Unicode false if this current Character this source this current Position this source this current Position u get Next Unicode Char is Unicode true else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr while this current Character r and n are not valid in string literals if this current Character n this current Character r relocate if finding another quote fairly close thus unicode u000D will be fully consumed if is Unicode int start this current Position for int look Ahead 0 look Ahead 50 look Ahead if this current Position this eof Position this current Position start break if this current Character this source this current Position this source this current Position u is Unicode true get Next Unicode Char else is Unicode false if is Unicode this current Character n this current Position set current position on new line character break if this current Character throw new Invalid Input Exception INVALID CHAR IN STRING else this current Position set current position on new line character throw new Invalid Input Exception INVALID CHAR IN STRING if this current Character int escape Size this current Position boolean back Slash As Unicode In String this unicode As Back Slash scan Escape Character make a side effect on this value and we need the previous value few lines down this one scan Escape Character escape Size this current Position escape Size if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position escape Size 1 this start Position unicode Store At this without Unicode Ptr else overwrite the in the buffer  getNextToken InvalidInputException wasAcr jumpOverMethodBody currentPosition TokenNameEOF TokenNameRBRACE whiteStart withoutUnicodePtr startPosition whiteStart currentPosition isWhiteSpace hasWhiteSpaces startPosition currentPosition checkIfUnicode checkIfUnicode currentCharacter currentPosition currentPosition IndexOutOfBoundsException tokenizeWhiteSpace whiteStart currentPosition currentPosition startPosition whiteStart TokenNameWHITESPACE currentPosition eofPosition TokenNameEOF checkIfUnicode isWhiteSpace jumpOverUnicodeWhiteSpace currentCharacter currentCharacter checkNonExternalizedString recordLineSeparator pushLineSeparator currentLine isWhiteSpace currentCharacter CharOperation isWhitespace currentCharacter isWhiteSpace hasWhiteSpaces isWhiteSpace tokenizeWhiteSpace hasWhiteSpaces currentPosition startPosition whiteStart TokenNameWHITESPACE currentPosition eofPosition TokenNameEOF currentCharacter TokenNameLPAREN TokenNameRPAREN TokenNameLBRACE TokenNameRBRACE TokenNameLBRACKET TokenNameRBRACKET TokenNameSEMICOLON TokenNameCOMMA getNextCharAsDigit scanNumber TokenNameDOT getNextChar TokenNamePLUS_PLUS TokenNamePLUS_EQUAL TokenNamePLUS getNextChar TokenNameMINUS_MINUS TokenNameMINUS_EQUAL TokenNameMINUS TokenNameTWIDDLE getNextChar TokenNameNOT_EQUAL TokenNameNOT getNextChar TokenNameMULTIPLY_EQUAL TokenNameMULTIPLY getNextChar TokenNameREMAINDER_EQUAL TokenNameREMAINDER getNextChar TokenNameLESS_EQUAL getNextChar TokenNameLEFT_SHIFT_EQUAL TokenNameLEFT_SHIFT TokenNameLESS getNextChar TokenNameGREATER_EQUAL getNextChar TokenNameRIGHT_SHIFT_EQUAL getNextChar TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL TokenNameUNSIGNED_RIGHT_SHIFT TokenNameRIGHT_SHIFT TokenNameGREATER getNextChar TokenNameEQUAL_EQUAL TokenNameEQUAL getNextChar TokenNameAND_AND TokenNameAND_EQUAL TokenNameAND getNextChar TokenNameOR_OR TokenNameOR_EQUAL TokenNameOR getNextChar TokenNameXOR_EQUAL TokenNameXOR TokenNameQUESTION TokenNameCOLON getNextChar InvalidInputException INVALID_CHARACTER_CONSTANT lookAhead lookAhead lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead InvalidInputException INVALID_CHARACTER_CONSTANT getNextChar lookAhead lookAhead lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead InvalidInputException INVALID_CHARACTER_CONSTANT getNextChar scanEscapeCharacter unicodeAsBackSlash checkIfUnicode checkIfUnicode currentCharacter currentPosition currentPosition IndexOutOfBoundsException currentPosition InvalidInputException INVALID_CHARACTER_CONSTANT checkIfUnicode getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr getNextChar TokenNameCharacterLiteral lookAhead lookAhead lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead currentPosition lookAhead InvalidInputException INVALID_CHARACTER_CONSTANT unicodeAsBackSlash isUnicode currentCharacter currentPosition currentPosition getNextUnicodeChar isUnicode withoutUnicodePtr unicodeStoreAt withoutUnicodePtr currentCharacter currentCharacter currentCharacter isUnicode currentPosition lookAhead lookAhead lookAhead currentPosition eofPosition currentPosition currentCharacter currentPosition currentPosition isUnicode getNextUnicodeChar isUnicode isUnicode currentCharacter currentPosition currentCharacter InvalidInputException INVALID_CHAR_IN_STRING currentPosition InvalidInputException INVALID_CHAR_IN_STRING currentCharacter escapeSize currentPosition backSlashAsUnicodeInString unicodeAsBackSlash scanEscapeCharacter scanEscapeCharacter escapeSize currentPosition escapeSize withoutUnicodePtr unicodeInitializeBuffer currentPosition escapeSize startPosition unicodeStoreAt withoutUnicodePtr
public final void get Next Unicode Char throws Invalid Input Exception VOID handle the case of unicode when a unicode appears then we must use a buffer that holds char internal values At the end of this method current Character holds the new visited char and current Position points right next after it ALL get Next Char ARE OPTIMIZED COPIES try int c1 0 c2 0 c3 0 c4 0 unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 throw new Invalid Input Exception INVALID UNICODE ESCAPE else this current Character char c1 16 c2 16 c3 16 c4 need the unicode buffer if this without Unicode Ptr 0 buffer all the entries that have been left aside unicode Initialize Buffer this current Position unicode Size this start Position fill the buffer with the char unicode Store At this without Unicode Ptr this unicode As Back Slash this current Character catch Array Index Out Of Bounds Exception e this current Position throw new Invalid Input Exception INVALID UNICODE ESCAPE  getNextUnicodeChar InvalidInputException currentCharacter currentPosition getNextChar unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition InvalidInputException INVALID_UNICODE_ESCAPE currentCharacter withoutUnicodePtr unicodeInitializeBuffer currentPosition unicodeSize startPosition unicodeStoreAt withoutUnicodePtr unicodeAsBackSlash currentCharacter ArrayIndexOutOfBoundsException currentPosition InvalidInputException INVALID_UNICODE_ESCAPE
public char get Source return this source  getSource
public final void jump Over Method Body this was Acr false int found 1 try while true loop for jumping over comments Consume white space and handles start Position boolean is White Space do this start Position this current Position if this current Character this source this current Position this source this current Position u is White Space jump Over Unicode White Space else if this record Line Separator this current Character r this current Character n push Line Separator is White Space Char Operation is Whitespace this current Character while is White Space consume token until is found switch this current Character case found break case found if found 0 return break case boolean test test get Next Char if test try scan Escape Character catch Invalid Input Exception ex ignore else try consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr catch Invalid Input Exception ex ignore get Next Char break case try try consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr catch Invalid Input Exception ex ignore while this current Character if this current Character r if this source this current Position n this current Position break the string cannot go further that the line if this current Character n break the string cannot go further that the line if this current Character try scan Escape Character catch Invalid Input Exception ex ignore try consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr catch Invalid Input Exception ex ignore catch Index Out Of Bounds Exception e return break case int test if test get Next Char 0 line comment try this last Comment Line Position this current Position get the next char if this current Character this source this current Position this source this current Position u unicode traitement int c1 0 c2 0 c3 0 c4 0 this current Position while this source this current Position u this current Position if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 error don t care of the value this current Character A something different from n and r else this current Character char c1 16 c2 16 c3 16 c4 handle the u case manually into comment if this current Character if this source this current Position this current Position jump over the boolean is Unicode false while this current Character r this current Character n this last Comment Line Position this current Position get the next char is Unicode false if this current Character this source this current Position this source this current Position u is Unicode true unicode traitement int c1 0 c2 0 c3 0 c4 0 this current Position while this source this current Position u this current Position if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 error don t care of the value this current Character A something different from n and r else this current Character char c1 16 c2 16 c3 16 c4 handle the u case manually into comment if this current Character if this source this current Position this current Position jump over the We need to completely consume the line break if this current Character r this source length this current Position if this source this current Position n this current Position this current Character n else if this source this current Position this source this current Position 1 u is Unicode true char unicode Char int index this current Position 1 index while this source index u index unicode traitement int c1 0 c2 0 c3 0 c4 0 if c1 Character get Numeric Value this source index 15 c1 0 c2 Character get Numeric Value this source index 15 c2 0 c3 Character get Numeric Value this source index 15 c3 0 c4 Character get Numeric Value this source index 15 c4 0 error don t care of the value unicode Char A else unicode Char char c1 16 c2 16 c3 16 c4 if unicode Char n this current Position index this current Character n record Comment TokenNameCOMMENT LINE if this record Line Separator this current Character r this current Character n if is Unicode push Unicode Line Separator else push Line Separator catch Index Out Of Bounds Exception e an eof will then be generated this current Position record Comment TokenNameCOMMENT LINE if this tokenize Comments this current Position break if test 0 traditional and javadoc comment boolean is Javadoc false try get the next char boolean star false boolean is Unicode false consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char is Unicode true else is Unicode false if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr if this current Character is Javadoc true star true if this current Character r this current Character n if this record Line Separator if is Unicode push Unicode Line Separator else push Line Separator else this current Line null is Unicode false if this current Character this source this current Position this source this current Position u unicode traitement get Next Unicode Char is Unicode true else is Unicode false handle the u case manually into comment if this current Character if this source this current Position this current Position jump over the empty comment is not a javadoc if this current Character  jumpOverMethodBody wasAcr startPosition isWhiteSpace startPosition currentPosition currentCharacter currentPosition currentPosition isWhiteSpace jumpOverUnicodeWhiteSpace recordLineSeparator currentCharacter currentCharacter pushLineSeparator isWhiteSpace CharOperation isWhitespace currentCharacter isWhiteSpace currentCharacter getNextChar scanEscapeCharacter InvalidInputException unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr InvalidInputException getNextChar unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr InvalidInputException currentCharacter currentCharacter currentPosition currentPosition currentCharacter currentCharacter scanEscapeCharacter InvalidInputException unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr InvalidInputException IndexOutOfBoundsException getNextChar lastCommentLinePosition currentPosition currentCharacter currentPosition currentPosition currentPosition currentPosition currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentCharacter currentCharacter currentCharacter currentPosition currentPosition isUnicode currentCharacter currentCharacter lastCommentLinePosition currentPosition isUnicode currentCharacter currentPosition currentPosition isUnicode currentPosition currentPosition currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition currentCharacter currentCharacter currentCharacter currentPosition currentPosition currentCharacter currentPosition currentPosition currentPosition currentCharacter currentPosition currentPosition isUnicode unicodeChar currentPosition getNumericValue getNumericValue getNumericValue getNumericValue unicodeChar unicodeChar unicodeChar currentPosition currentCharacter recordComment TokenNameCOMMENT_LINE recordLineSeparator currentCharacter currentCharacter isUnicode pushUnicodeLineSeparator pushLineSeparator IndexOutOfBoundsException currentPosition recordComment TokenNameCOMMENT_LINE tokenizeComments currentPosition isJavadoc isUnicode unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar isUnicode isUnicode withoutUnicodePtr unicodeStoreAt withoutUnicodePtr currentCharacter isJavadoc currentCharacter currentCharacter recordLineSeparator isUnicode pushUnicodeLineSeparator pushLineSeparator currentLine isUnicode currentCharacter currentPosition currentPosition getNextUnicodeChar isUnicode isUnicode currentCharacter currentPosition currentPosition currentCharacter
public final boolean jump Over Unicode White Space throws Invalid Input Exception BOOLEAN handle the case of unicode Jump over the next white Space making start Position pointing on the next available char On false the current Character is filled up with a potential correct char try this was Acr false int c1 c2 c3 c4 int unicode Size 6 this current Position while this source this current Position u this current Position unicode Size if c1 Character get Numeric Value this source this current Position 15 c1 0 c2 Character get Numeric Value this source this current Position 15 c2 0 c3 Character get Numeric Value this source this current Position 15 c3 0 c4 Character get Numeric Value this source this current Position 15 c4 0 throw new Invalid Input Exception INVALID UNICODE ESCAPE this current Character char c1 16 c2 16 c3 16 c4 if Char Operation is Whitespace this current Character return true buffer the new char which is not a white space unicode Store At this without Unicode Ptr this without Unicode Ptr 1 is true here return false catch Index Out Of Bounds Exception e this current Position throw new Invalid Input Exception INVALID UNICODE ESCAPE  jumpOverUnicodeWhiteSpace InvalidInputException whiteSpace startPosition currentCharacter wasAcr unicodeSize currentPosition currentPosition currentPosition unicodeSize getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition getNumericValue currentPosition InvalidInputException INVALID_UNICODE_ESCAPE currentCharacter CharOperation isWhitespace currentCharacter unicodeStoreAt withoutUnicodePtr withoutUnicodePtr IndexOutOfBoundsException currentPosition InvalidInputException INVALID_UNICODE_ESCAPE
final char optimized Current Token Source1 return always the same char build only once optimization at no speed cost of 99 5 of the single Char Identifier char char One this source this start Position switch char One case a return charArray a case b return charArray b case c return charArray c case d return charArray d case e return charArray e case f return charArray f case g return charArray g case h return charArray h case i return charArray i case j return charArray j case k return charArray k case l return charArray l case m return charArray m case n return charArray n case o return charArray o case p return charArray p case q return charArray q case r return charArray r case s return charArray s case t return charArray t case u return charArray u case v return charArray v case w return charArray w case x return charArray x case y return charArray y case z return charArray z default return new char char One  optimizedCurrentTokenSource1 singleCharIdentifier charOne startPosition charOne charArray_a charArray_b charArray_c charArray_d charArray_e charArray_f charArray_g charArray_h charArray_i charArray_j charArray_k charArray_l charArray_m charArray_n charArray_o charArray_p charArray_q charArray_r charArray_s charArray_t charArray_u charArray_v charArray_w charArray_x charArray_y charArray_z charOne
final char optimized Current Token Source2 try to return the same char build only once char c0 c1 int hash c0 this source this start Position 6 c1 this source this start Position 1 Table Size char table this charArray length 0 hash int i new Entry2 while i Internal Table Size char char Array table i if c0 char Array 0 c1 char Array 1 return char Array other side i 1 int max new Entry2 while i max char char Array table i if c0 char Array 0 c1 char Array 1 return char Array add the entry if max Internal Table Size max 0 char r table max r new char c0 c1 new Entry2 max return r  optimizedCurrentTokenSource2 startPosition startPosition TableSize charArray_length newEntry2 InternalTableSize charArray charArray charArray charArray newEntry2 charArray charArray charArray charArray InternalTableSize newEntry2
final char optimized Current Token Source3 try to return the same char build only once char c0 c1 c2 int hash c0 this source this start Position 12 c1 this source this start Position 1 6 c2 this source this start Position 2 Table Size char table this charArray length 1 hash int i new Entry3 while i Internal Table Size char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 return char Array other side i 1 int max new Entry3 while i max char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 return char Array add the entry if max Internal Table Size max 0 char r table max r new char c0 c1 c2 new Entry3 max return r  optimizedCurrentTokenSource3 startPosition startPosition startPosition TableSize charArray_length newEntry3 InternalTableSize charArray charArray charArray charArray charArray newEntry3 charArray charArray charArray charArray charArray InternalTableSize newEntry3
final char optimized Current Token Source4 try to return the same char build only once char c0 c1 c2 c3 long hash long c0 this source this start Position 18 c1 this source this start Position 1 12 c2 this source this start Position 2 6 c3 this source this start Position 3 Table Size char table this charArray length 2 int hash int i new Entry4 while i Internal Table Size char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 c3 char Array 3 return char Array other side i 1 int max new Entry4 while i max char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 c3 char Array 3 return char Array add the entry if max Internal Table Size max 0 char r table max r new char c0 c1 c2 c3 new Entry4 max return r  optimizedCurrentTokenSource4 startPosition startPosition startPosition startPosition TableSize charArray_length newEntry4 InternalTableSize charArray charArray charArray charArray charArray charArray newEntry4 charArray charArray charArray charArray charArray charArray InternalTableSize newEntry4
final char optimized Current Token Source5 try to return the same char build only once char c0 c1 c2 c3 c4 long hash long c0 this source this start Position 24 long c1 this source this start Position 1 18 c2 this source this start Position 2 12 c3 this source this start Position 3 6 c4 this source this start Position 4 Table Size char table this charArray length 3 int hash int i new Entry5 while i Internal Table Size char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 c3 char Array 3 c4 char Array 4 return char Array other side i 1 int max new Entry5 while i max char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 c3 char Array 3 c4 char Array 4 return char Array add the entry if max Internal Table Size max 0 char r table max r new char c0 c1 c2 c3 c4 new Entry5 max return r  optimizedCurrentTokenSource5 startPosition startPosition startPosition startPosition startPosition TableSize charArray_length newEntry5 InternalTableSize charArray charArray charArray charArray charArray charArray charArray newEntry5 charArray charArray charArray charArray charArray charArray charArray InternalTableSize newEntry5
final char optimized Current Token Source6 try to return the same char build only once char c0 c1 c2 c3 c4 c5 long hash long c0 this source this start Position 32 long c1 this source this start Position 1 24 long c2 this source this start Position 2 18 c3 this source this start Position 3 12 c4 this source this start Position 4 6 c5 this source this start Position 5 Table Size char table this charArray length 4 int hash int i new Entry6 while i Internal Table Size char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 c3 char Array 3 c4 char Array 4 c5 char Array 5 return char Array other side i 1 int max new Entry6 while i max char char Array table i if c0 char Array 0 c1 char Array 1 c2 char Array 2 c3 char Array 3 c4 char Array 4 c5 char Array 5 return char Array add the entry if max Internal Table Size max 0 char r table max r new char c0 c1 c2 c3 c4 c5 new Entry6 max return r  optimizedCurrentTokenSource6 startPosition startPosition startPosition startPosition startPosition startPosition TableSize charArray_length newEntry6 InternalTableSize charArray charArray charArray charArray charArray charArray charArray charArray newEntry6 charArray charArray charArray charArray charArray charArray charArray charArray InternalTableSize newEntry6
private void parse Tags NLS Line line String s new String get Current Token Source int pos s index Of TAG PREFIX int line Length line size while pos 1 int start pos TAG PREFIX LENGTH int end s index Of TAG POSTFIX start if end 1 String index s substring start end int i 0 try i Integer parse Int index 1 Tags are one based not zero based catch Number Format Exception e i 1 we don t want to consider this as a valid NLS tag if line exists i line set i null pos s index Of TAG PREFIX start this nonNLS Strings new String Literal line Length int nonNLS Counter 0 for Iterator iterator line iterator iterator has Next String Literal literal String Literal iterator next if literal null this nonNLS Strings nonNLS Counter literal if nonNLS Counter 0 this nonNLS Strings null this current Line null return this was Non Externalized String Literal true if nonNLS Counter line Length System arraycopy this nonNLS Strings 0 this nonNLS Strings new String Literal nonNLS Counter 0 nonNLS Counter this current Line null  parseTags NLSLine getCurrentTokenSource indexOf TAG_PREFIX lineLength TAG_PREFIX_LENGTH indexOf TAG_POSTFIX parseInt NumberFormatException indexOf TAG_PREFIX nonNLSStrings StringLiteral lineLength nonNLSCounter hasNext StringLiteral StringLiteral nonNLSStrings nonNLSCounter nonNLSCounter nonNLSStrings currentLine wasNonExternalizedStringLiteral nonNLSCounter lineLength nonNLSStrings nonNLSStrings StringLiteral nonNLSCounter nonNLSCounter currentLine
public final void push Line Separator see comment on is Line Delimiter char for the use of n and r final int INCREMENT 250 if this check Non Externalized String Literals reinitialize the current line for non externalize strings purpose this current Line null current Character is at position current Position 1 cr 000D if this current Character r int separator Pos this current Position 1 TODO olivier david why the following line was if this line Ptr 0 this line Ends this line Ptr separator Pos return if this line Ptr 0 this line Ends this line Ptr separator Pos return System out println CR separator Pos int length this line Ends length if this line Ptr length System arraycopy this line Ends 0 this line Ends new int length INCREMENT 0 length this line Ends this line Ptr separator Pos look ahead for merged cr lf try if this source this current Position n System out println look ahead LF this current Position this line Ends this line Ptr this current Position this current Position this was Acr false else this was Acr true catch Index Out Of Bounds Exception e this was Acr true else lf 000A if this current Character n must merge eventual cr followed by lf if this was Acr this line Ends this line Ptr this current Position 2 System out println merge LF this current Position 1 this line Ends this line Ptr this current Position 1 else int separator Pos this current Position 1 TODO olivier david why the following line was if this line Ptr 0 this line Ends this line Ptr separator Pos return if this line Ptr 0 this line Ends this line Ptr separator Pos return System out println LF separator Pos int length this line Ends length if this line Ptr length System arraycopy this line Ends 0 this line Ends new int length INCREMENT 0 length this line Ends this line Ptr separator Pos this was Acr false  pushLineSeparator isLineDelimiter checkNonExternalizedStringLiterals currentLine currentCharacter currentPosition currentCharacter separatorPos currentPosition linePtr lineEnds linePtr separatorPos linePtr lineEnds linePtr separatorPos separatorPos lineEnds linePtr lineEnds lineEnds lineEnds linePtr separatorPos currentPosition currentPosition lineEnds linePtr currentPosition currentPosition wasAcr wasAcr IndexOutOfBoundsException wasAcr currentCharacter wasAcr lineEnds linePtr currentPosition currentPosition lineEnds linePtr currentPosition separatorPos currentPosition linePtr lineEnds linePtr separatorPos linePtr lineEnds linePtr separatorPos separatorPos lineEnds linePtr lineEnds lineEnds lineEnds linePtr separatorPos wasAcr
public final void push Unicode Line Separator if this check Non Externalized String Literals reinitialize the current line for non externalize strings purpose this current Line null cr 000D if this current Character r if this source this current Position n this was Acr false else this was Acr true else lf 000A if this current Character n must merge eventual cr followed by lf this was Acr false  pushUnicodeLineSeparator checkNonExternalizedStringLiterals currentLine currentCharacter currentPosition wasAcr wasAcr currentCharacter wasAcr
public void record Comment int token compute position int stop Position this current Position switch token case TokenNameCOMMENT LINE stop Position this last Comment Line Position break case TokenNameCOMMENT BLOCK stop Position this current Position break a new comment is recorded int length this comment Stops length if this comment Ptr length System arraycopy this comment Stops 0 this comment Stops new int length 30 0 length grows the positions buffers too System arraycopy this comment Starts 0 this comment Starts new int length 30 0 length this comment Stops this comment Ptr stop Position this comment Starts this comment Ptr this start Position  recordComment stopPosition currentPosition TokenNameCOMMENT_LINE stopPosition lastCommentLinePosition TokenNameCOMMENT_BLOCK stopPosition currentPosition commentStops commentPtr commentStops commentStops commentStarts commentStarts commentStops commentPtr stopPosition commentStarts commentPtr startPosition
Reposition the scanner on some portion of the original source The given end Position is the last valid position Beyond this position the scanner will answer EOF tokens code I Terminal Symbols Token NameEOF code param begin the given start position param end the given end position public void reset To int begin int end reset the scanner to a given position where it may rescan again this diet false this initial Position this start Position this current Position begin this eof Position end Integer MAX VALUE end 1 end this comment Ptr 1 reset comment stack this found Task Count 0 if reset To is used with being than end if begin this eof Position begin this eof Position  endPosition ITerminalSymbols TokenNameEOF resetTo initialPosition startPosition currentPosition eofPosition MAX_VALUE commentPtr foundTaskCount resetTo eofPosition eofPosition
public final void scan Escape Character throws Invalid Input Exception the string with u is a legal string of two chars and u thus we use a direct access to the source for regular cases if this unicode As Back Slash consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr else this current Character this source this current Position switch this current Character case b this current Character b break case t this current Character t break case n this current Character n break case f this current Character f break case r this current Character r break case this current Character break case this current Character break case this current Character break default octal escape Octal Digit Octal Digit Octal Digit Zero To Three Octal Digit Octal Digit int number Character get Numeric Value this current Character if number 0 number 7 boolean zero To Three Not number 3 if Character is Digit this current Character this source this current Position int digit Character get Numeric Value this current Character if digit 0 digit 7 number number 8 digit if Character is Digit this current Character this source this current Position if zero To Three Not has read Not Zero To Three Octal Digit Digit ignore last character this current Position else digit Character get Numeric Value this current Character if digit 0 digit 7 has read Zero To Three Octal Digit Octal Digit number number 8 digit else has read Zero To Three Octal Digit Non Octal Digit ignore last character this current Position else has read Octal Digit Non Digit ignore last character this current Position else has read Octal Digit Non Octal Digit ignore last character this current Position else has read Octal Digit ignore last character this current Position if number 255 throw new Invalid Input Exception INVALID ESCAPE this current Character char number else throw new Invalid Input Exception INVALID ESCAPE  scanEscapeCharacter InvalidInputException unicodeAsBackSlash unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr currentCharacter currentPosition currentCharacter currentCharacter currentCharacter currentCharacter currentCharacter currentCharacter currentCharacter currentCharacter currentCharacter OctalDigit OctalDigit OctalDigit ZeroToThree OctalDigit OctalDigit getNumericValue currentCharacter zeroToThreeNot isDigit currentCharacter currentPosition getNumericValue currentCharacter isDigit currentCharacter currentPosition zeroToThreeNot NotZeroToThree OctalDigit currentPosition getNumericValue currentCharacter ZeroToThree OctalDigit OctalDigit ZeroToThree OctalDigit NonOctalDigit currentPosition OctalDigit NonDigit currentPosition OctalDigit NonOctalDigit currentPosition OctalDigit currentPosition InvalidInputException INVALID_ESCAPE currentCharacter InvalidInputException INVALID_ESCAPE
public int scan Identifier Or Keyword test keywords first dispatch on the first char then the length If there are several keywors with the same length AND the same first char then do another dispatch on the second char this use Assert As An Indentifier false while get Next Char As Java Identifier Part empty int index length char data char first Letter if this without Unicode Ptr 0 quick test on length 1 but not on length 12 while most identifier have a length which is 12 but there are lots of identifier with only one char if length this current Position this start Position 1 return Token Name Identifier data this source index this start Position else if length this without Unicode Ptr 1 return Token Name Identifier data this without Unicode Buffer index 1 first Letter data index switch first Letter case a switch length case 8 abstract if data index b data index s data index t data index r data index a data index c data index t return Token Nameabstract else return Token Name Identifier case 6 assert if data index s data index s data index e data index r data index t if this assert Mode this contains Assert Keyword true return Token Nameassert else this use Assert As An Indentifier true return Token Name Identifier else return Token Name Identifier default return Token Name Identifier case b boolean break byte switch length case 4 if data index y data index t data index e return Token Namebyte else return Token Name Identifier case 5 if data index r data index e data index a data index k return Token Namebreak else return Token Name Identifier case 7 if data index o data index o data index l data index e data index a data index n return Token Nameboolean else return Token Name Identifier default return Token Name Identifier case c case char catch const class continue switch length case 4 if data index a if data index s data index e return Token Namecase else return Token Name Identifier else if data index h data index a data index r return Token Namechar else return Token Name Identifier case 5 if data index a if data index t data index c data index h return Token Namecatch else return Token Name Identifier else if data index l if data index a data index s data index s return Token Nameclass else return Token Name Identifier else if data index o data index n data index s data index t return Token NameERROR const is not used in java else return Token Name Identifier case 8 if data index o data index n data index t data index i data index n data index u data index e return Token Namecontinue else return Token Name Identifier default return Token Name Identifier case d default do double switch length case 2 if data index o return Token Namedo else return Token Name Identifier case 6 if data index o data index u data index b data index l data index e return Token Namedouble else return Token Name Identifier case 7 if data index e data index f data index a data index u data index l data index t return Token Namedefault else return Token Name Identifier default return Token Name Identifier case e else extends switch length case 4 if data index l data index s data index e return Token Nameelse else return Token Name Identifier case 7 if data index x data index t data index e data index n data index d data index s return Token Nameextends else return Token Name Identifier default return Token Name Identifier case f final finally float for false switch length case 3 if data index o data index r return Token Namefor else return Token Name Identifier case 5 if data index i if data index n data index a data index l return Token Namefinal else return Token Name Identifier else if data index l if data index o data index a data index t return Token Namefloat else return Token Name Identifier else if data index a data index l data index s data index e return Token Namefalse else return Token Name Identifier case 7 if data index i data index n data index a data index l data index l data index y return Token Namefinally else return Token Name Identifier default return Token Name Identifier case g goto if length 4 if data index o data index t data index o return Token NameERROR no goto in java are allowed so why java removes this keyword return Token Name Identifier case i if implements import instanceof int interface switch length case 2 if data index f return Token Nameif else return Token Name Identifier case 3 if data index n data index t return Token Nameint else return Token Name Identifier case 6 if data index m data index p data index o data index r data index t return Token Nameimport else return Token Name Identifier case 9 if data index n data index t data index e data index r data index f data index a data index c data index e return Token Nameinterface else return Token Name Identifier case 10 if data index m if data index p data index l data index e data index m data index e data index n data index t data index s return Token Nameimplements else return Token Name Identifier else if data index n data index s data index t data index a data index n data index c data index e data index o data index f return Token Nameinstanceof else return Token Name Identifier default return Token Name Identifier case l long if length 4 if data index o data index n data index g return Token Namelong return Token Name Identifier case n native new null switch length case 3 if data index e data index w return Token Namenew else return Token Name Identifier case 4 if data index u data index l data index l return Token Namenull else return Token Name Identifier case 6 if data index a data index t data index i data index v data index e return Token Namenative else return Token Name Identifier default return Token Name Identifier case p package private protected public switch length case 6 if data index u data index b data index l data index i data index c return Token Namepublic else return Token Name Identifier case 7 if data index a if data index c data index k data index a data index  scanIdentifierOrKeyword useAssertAsAnIndentifier getNextCharAsJavaIdentifierPart firstLetter withoutUnicodePtr currentPosition startPosition TokenNameIdentifier startPosition withoutUnicodePtr TokenNameIdentifier withoutUnicodeBuffer firstLetter firstLetter TokenNameabstract TokenNameIdentifier assertMode containsAssertKeyword TokenNameassert useAssertAsAnIndentifier TokenNameIdentifier TokenNameIdentifier TokenNameIdentifier TokenNamebyte TokenNameIdentifier TokenNamebreak TokenNameIdentifier TokenNameboolean TokenNameIdentifier TokenNameIdentifier TokenNamecase TokenNameIdentifier TokenNamechar TokenNameIdentifier TokenNamecatch TokenNameIdentifier TokenNameclass TokenNameIdentifier TokenNameERROR TokenNameIdentifier TokenNamecontinue TokenNameIdentifier TokenNameIdentifier TokenNamedo TokenNameIdentifier TokenNamedouble TokenNameIdentifier TokenNamedefault TokenNameIdentifier TokenNameIdentifier TokenNameelse TokenNameIdentifier TokenNameextends TokenNameIdentifier TokenNameIdentifier TokenNamefor TokenNameIdentifier TokenNamefinal TokenNameIdentifier TokenNamefloat TokenNameIdentifier TokenNamefalse TokenNameIdentifier TokenNamefinally TokenNameIdentifier TokenNameIdentifier TokenNameERROR TokenNameIdentifier TokenNameif TokenNameIdentifier TokenNameint TokenNameIdentifier TokenNameimport TokenNameIdentifier TokenNameinterface TokenNameIdentifier TokenNameimplements TokenNameIdentifier TokenNameinstanceof TokenNameIdentifier TokenNameIdentifier TokenNamelong TokenNameIdentifier TokenNamenew TokenNameIdentifier TokenNamenull TokenNameIdentifier TokenNamenative TokenNameIdentifier TokenNameIdentifier TokenNamepublic TokenNameIdentifier
public int scan Number boolean dot Prefix throws Invalid Input Exception when entering this method the current Character is the first digit of the number It may be preceeded by a when dot Prefix is true boolean floating dot Prefix if dot Prefix this current Character 0 if get Next Char x X 0 hexa force the first char of the hexa number do exist consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr if Character digit this current Character 16 1 throw new Invalid Input Exception INVALID HEXA end forcing while get Next Char As Digit 16 empty if get Next Char l L 0 return Token Name Long Literal else return Token Name Integer Literal there is x or X in the number potential octal some one may write 000099 0 thus 00100 00078 0 is true crazy language if get Next Char As Digit potential octal while get Next Char As Digit empty if get Next Char l L 0 return Token Name Long Literal if get Next Char f F 0 return Token Name Floating Point Literal if get Next Char d D 0 return Token Name Double Literal else make the distinction between octal and float boolean is Integer true if get Next Char is Integer false while get Next Char As Digit empty if get Next Char e E 0 consume next character is Integer false this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr if this current Character this current Character consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr if Character is Digit this current Character throw new Invalid Input Exception INVALID FLOAT while get Next Char As Digit empty if get Next Char f F 0 return Token Name Floating Point Literal if get Next Char d D 0 is Integer return Token Name Double Literal return Token Name Integer Literal else carry on while get Next Char As Digit empty if dot Prefix get Next Char l L 0 return Token Name Long Literal if dot Prefix get Next Char decimal part that can be empty while get Next Char As Digit empty floating true if floating is true both exponant and suffix may be optional if get Next Char e E 0 floating true consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr if this current Character this current Character consume next character this unicode As Back Slash false if this current Character this source this current Position this source this current Position u get Next Unicode Char else if this without Unicode Ptr 0 unicode Store At this without Unicode Ptr if Character is Digit this current Character throw new Invalid Input Exception INVALID FLOAT while get Next Char As Digit empty if get Next Char d D 0 return Token Name Double Literal if get Next Char f F 0 return Token Name Floating Point Literal the long flag has been tested before return floating Token Name Double Literal Token Name Integer Literal  scanNumber dotPrefix InvalidInputException currentCharacter dotPrefix dotPrefix dotPrefix currentCharacter getNextChar unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr currentCharacter InvalidInputException INVALID_HEXA getNextCharAsDigit getNextChar TokenNameLongLiteral TokenNameIntegerLiteral getNextCharAsDigit getNextCharAsDigit getNextChar TokenNameLongLiteral getNextChar TokenNameFloatingPointLiteral getNextChar TokenNameDoubleLiteral isInteger getNextChar isInteger getNextCharAsDigit getNextChar isInteger unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr currentCharacter currentCharacter unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr isDigit currentCharacter InvalidInputException INVALID_FLOAT getNextCharAsDigit getNextChar TokenNameFloatingPointLiteral getNextChar isInteger TokenNameDoubleLiteral TokenNameIntegerLiteral getNextCharAsDigit dotPrefix getNextChar TokenNameLongLiteral dotPrefix getNextChar getNextCharAsDigit getNextChar unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr currentCharacter currentCharacter unicodeAsBackSlash currentCharacter currentPosition currentPosition getNextUnicodeChar withoutUnicodePtr unicodeStoreAt withoutUnicodePtr isDigit currentCharacter InvalidInputException INVALID_FLOAT getNextCharAsDigit getNextChar TokenNameDoubleLiteral getNextChar TokenNameFloatingPointLiteral TokenNameDoubleLiteral TokenNameIntegerLiteral
Search the line number corresponding to a specific position param position int return int public final int get Line Number int position if this line Ends null return 1 int length this line Ptr 1 if length 0 return 1 int g 0 d length 1 int m 0 while g d m g d 2 if position this line Ends m d m 1 else if position this line Ends m g m 1 else return m 1 if position this line Ends m return m 1 return m 2  getLineNumber lineEnds linePtr lineEnds lineEnds lineEnds
public final void set Source char source String the source buffer is set to source String int source Length if source String null this source Char Operation NO CHAR source Length 0 else this source source String source Length source String length this start Position 1 this eof Position source Length this initial Position this current Position 0 this contains Assert Keyword false  setSource sourceString sourceString sourceLength sourceString CharOperation NO_CHAR sourceLength sourceString sourceLength sourceString startPosition eofPosition sourceLength initialPosition currentPosition containsAssertKeyword
public String to String if this start Position this source length return EOF n n new String this source NON NLS 1 if this current Position this source length return behind the EOF n n new String this source NON NLS 1 char front new char this start Position System arraycopy this source 0 front 0 this start Position int middle Length this current Position 1 this start Position 1 char middle if middle Length 1 middle new char middle Length System arraycopy this source this start Position middle 0 middle Length else middle Char Operation NO CHAR char end new char this source length this current Position 1 System arraycopy this source this current Position 1 1 end 0 this source length this current Position 1 1 return new String front n n Starts here NON NLS 1 new String middle Ends here n n NON NLS 1 new String end  toString startPosition currentPosition startPosition startPosition middleLength currentPosition startPosition middleLength middleLength startPosition middleLength CharOperation NO_CHAR currentPosition currentPosition currentPosition nStarts
public final String to String Action int act switch act case Token Name Identifier return Identifier new String get Current Token Source NON NLS 1 NON NLS 2 case Token Nameabstract return abstract NON NLS 1 case Token Nameboolean return boolean NON NLS 1 case Token Namebreak return break NON NLS 1 case Token Namebyte return byte NON NLS 1 case Token Namecase return case NON NLS 1 case Token Namecatch return catch NON NLS 1 case Token Namechar return char NON NLS 1 case Token Nameclass return class NON NLS 1 case Token Namecontinue return continue NON NLS 1 case Token Namedefault return default NON NLS 1 case Token Namedo return do NON NLS 1 case Token Namedouble return double NON NLS 1 case Token Nameelse return else NON NLS 1 case Token Nameextends return extends NON NLS 1 case Token Namefalse return false NON NLS 1 case Token Namefinal return final NON NLS 1 case Token Namefinally return finally NON NLS 1 case Token Namefloat return float NON NLS 1 case Token Namefor return for NON NLS 1 case Token Nameif return if NON NLS 1 case Token Nameimplements return implements NON NLS 1 case Token Nameimport return import NON NLS 1 case Token Nameinstanceof return instanceof NON NLS 1 case Token Nameint return int NON NLS 1 case Token Nameinterface return interface NON NLS 1 case Token Namelong return long NON NLS 1 case Token Namenative return native NON NLS 1 case Token Namenew return new NON NLS 1 case Token Namenull return null NON NLS 1 case Token Namepackage return package NON NLS 1 case Token Nameprivate return private NON NLS 1 case Token Nameprotected return protected NON NLS 1 case Token Namepublic return public NON NLS 1 case Token Namereturn return return NON NLS 1 case Token Nameshort return short NON NLS 1 case Token Namestatic return static NON NLS 1 case Token Namesuper return super NON NLS 1 case Token Nameswitch return switch NON NLS 1 case Token Namesynchronized return synchronized NON NLS 1 case Token Namethis return this NON NLS 1 case Token Namethrow return throw NON NLS 1 case Token Namethrows return throws NON NLS 1 case Token Nametransient return transient NON NLS 1 case Token Nametrue return true NON NLS 1 case Token Nametry return try NON NLS 1 case Token Namevoid return void NON NLS 1 case Token Namevolatile return volatile NON NLS 1 case Token Namewhile return while NON NLS 1 case Token Name Integer Literal return Integer new String get Current Token Source NON NLS 1 NON NLS 2 case Token Name Long Literal return Long new String get Current Token Source NON NLS 1 NON NLS 2 case Token Name Floating Point Literal return Float new String get Current Token Source NON NLS 1 NON NLS 2 case Token Name Double Literal return Double new String get Current Token Source NON NLS 1 NON NLS 2 case Token Name Character Literal return Char new String get Current Token Source NON NLS 1 NON NLS 2 case Token Name String Literal return String new String get Current Token Source NON NLS 1 NON NLS 2 case TokenNamePLUS PLUS return NON NLS 1 case TokenNameMINUS MINUS return NON NLS 1 case TokenNameEQUAL EQUAL return NON NLS 1 case TokenNameLESS EQUAL return NON NLS 1 case TokenNameGREATER EQUAL return NON NLS 1 case TokenNameNOT EQUAL return NON NLS 1 case TokenNameLEFT SHIFT return NON NLS 1 case TokenNameRIGHT SHIFT return NON NLS 1 case TokenNameUNSIGNED RIGHT SHIFT return NON NLS 1 case TokenNamePLUS EQUAL return NON NLS 1 case TokenNameMINUS EQUAL return NON NLS 1 case TokenNameMULTIPLY EQUAL return NON NLS 1 case TokenNameDIVIDE EQUAL return NON NLS 1 case TokenNameAND EQUAL return NON NLS 1 case TokenNameOR EQUAL return NON NLS 1 case TokenNameXOR EQUAL return NON NLS 1 case TokenNameREMAINDER EQUAL return NON NLS 1 case TokenNameLEFT SHIFT EQUAL return NON NLS 1 case TokenNameRIGHT SHIFT EQUAL return NON NLS 1 case TokenNameUNSIGNED RIGHT SHIFT EQUAL return NON NLS 1 case TokenNameOR OR return NON NLS 1 case TokenNameAND AND return NON NLS 1 case Token NamePLUS return NON NLS 1 case Token NameMINUS return NON NLS 1 case Token NameNOT return NON NLS 1 case Token NameREMAINDER return NON NLS 1 case Token NameXOR return NON NLS 1 case Token NameAND return NON NLS 1 case Token NameMULTIPLY return NON NLS 1 case Token NameOR return NON NLS 1 case Token NameTWIDDLE return NON NLS 1 case Token NameDIVIDE return NON NLS 1 case Token NameGREATER return NON NLS 1 case Token NameLESS return NON NLS 1 case Token NameLPAREN return NON NLS 1 case Token NameRPAREN return NON NLS 1 case Token NameLBRACE return NON NLS 1 case Token NameRBRACE return NON NLS 1 case Token NameLBRACKET return NON NLS 1 case Token NameRBRACKET return NON NLS 1 case Token NameSEMICOLON return NON NLS 1 case Token NameQUESTION return NON NLS 1 case Token NameCOLON return NON NLS 1 case Token NameCOMMA return NON NLS 1 case Token NameDOT return NON NLS 1 case Token NameEQUAL return NON NLS 1 case Token NameEOF return EOF NON NLS 1 default return not a token NON NLS 1  toStringAction TokenNameIdentifier getCurrentTokenSource TokenNameabstract TokenNameboolean TokenNamebreak TokenNamebyte TokenNamecase TokenNamecatch TokenNamechar TokenNameclass TokenNamecontinue TokenNamedefault TokenNamedo TokenNamedouble TokenNameelse TokenNameextends TokenNamefalse TokenNamefinal TokenNamefinally TokenNamefloat TokenNamefor TokenNameif TokenNameimplements TokenNameimport TokenNameinstanceof TokenNameint TokenNameinterface TokenNamelong TokenNamenative TokenNamenew TokenNamenull TokenNamepackage TokenNameprivate TokenNameprotected TokenNamepublic TokenNamereturn TokenNameshort TokenNamestatic TokenNamesuper TokenNameswitch TokenNamesynchronized TokenNamethis TokenNamethrow TokenNamethrows TokenNametransient TokenNametrue TokenNametry TokenNamevoid TokenNamevolatile TokenNamewhile TokenNameIntegerLiteral getCurrentTokenSource TokenNameLongLiteral getCurrentTokenSource TokenNameFloatingPointLiteral getCurrentTokenSource TokenNameDoubleLiteral getCurrentTokenSource TokenNameCharacterLiteral getCurrentTokenSource TokenNameStringLiteral getCurrentTokenSource TokenNamePLUS_PLUS TokenNameMINUS_MINUS TokenNameEQUAL_EQUAL TokenNameLESS_EQUAL TokenNameGREATER_EQUAL TokenNameNOT_EQUAL TokenNameLEFT_SHIFT TokenNameRIGHT_SHIFT TokenNameUNSIGNED_RIGHT_SHIFT TokenNamePLUS_EQUAL TokenNameMINUS_EQUAL TokenNameMULTIPLY_EQUAL TokenNameDIVIDE_EQUAL TokenNameAND_EQUAL TokenNameOR_EQUAL TokenNameXOR_EQUAL TokenNameREMAINDER_EQUAL TokenNameLEFT_SHIFT_EQUAL TokenNameRIGHT_SHIFT_EQUAL TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL TokenNameOR_OR TokenNameAND_AND TokenNamePLUS TokenNameMINUS TokenNameNOT TokenNameREMAINDER TokenNameXOR TokenNameAND TokenNameMULTIPLY TokenNameOR TokenNameTWIDDLE TokenNameDIVIDE TokenNameGREATER TokenNameLESS TokenNameLPAREN TokenNameRPAREN TokenNameLBRACE TokenNameRBRACE TokenNameLBRACKET TokenNameRBRACKET TokenNameSEMICOLON TokenNameQUESTION TokenNameCOLON TokenNameCOMMA TokenNameDOT TokenNameEQUAL TokenNameEOF
public void unicode Initialize Buffer int length this without Unicode Ptr length if this without Unicode Buffer null this without Unicode Buffer new char length 1 10 int b Length this without Unicode Buffer length if 1 length b Length System arraycopy this without Unicode Buffer 0 this without Unicode Buffer new char length 1 10 0 b Length System arraycopy this source this start Position this without Unicode Buffer 1 length  unicodeInitializeBuffer withoutUnicodePtr withoutUnicodeBuffer withoutUnicodeBuffer bLength withoutUnicodeBuffer bLength withoutUnicodeBuffer withoutUnicodeBuffer bLength startPosition withoutUnicodeBuffer
public void unicode Store At int pos if this without Unicode Buffer null this without Unicode Buffer new char 10 int length this without Unicode Buffer length if pos length System arraycopy this without Unicode Buffer 0 this without Unicode Buffer new char length 2 0 length this without Unicode Buffer pos this current Character  unicodeStoreAt withoutUnicodeBuffer withoutUnicodeBuffer withoutUnicodeBuffer withoutUnicodeBuffer withoutUnicodeBuffer withoutUnicodeBuffer currentCharacter

public Recorded Parsing Information I Problem problems int line Ends int comment Positions this problems problems this line Ends line Ends this comment Positions comment Positions this problems Count problems null problems length 0  RecordedParsingInformation IProblem lineEnds commentPositions lineEnds lineEnds commentPositions commentPositions problemsCount
void update Recorded Parsing Information Compilation Result compilation Result if compilation Result problems null this problems compilation Result problems this problems Count this problems length  updateRecordedParsingInformation CompilationResult compilationResult compilationResult compilationResult problemsCount

public abstract class Reference Info Adapter Does nothing public void accept Constructor Reference char type Name int arg Count int source Position Does nothing  ReferenceInfoAdapter acceptConstructorReference typeName argCount sourcePosition
Does nothing public void accept Field Reference char field Name int source Position Does nothing  acceptFieldReference fieldName sourcePosition
Does nothing public void accept Method Reference char method Name int arg Count int source Position Does nothing  acceptMethodReference methodName argCount sourcePosition
Does nothing public void accept Type Reference char type Name int source Start int source End Does nothing  acceptTypeReference typeName sourceStart sourceEnd
Does nothing public void accept Type Reference char type Name int source Position Does nothing  acceptTypeReference typeName sourcePosition
Does nothing public void accept Unknown Reference char name int source Start int source End Does nothing  acceptUnknownReference sourceStart sourceEnd
Does nothing public void accept Unknown Reference char name int source Position Does nothing  acceptUnknownReference sourcePosition

public Simple Document String source this buffer new String Buffer source  SimpleDocument StringBuffer
see org eclipse jface text I Document get Char int public char get Char int offset return 0  IDocument getChar getChar
see org eclipse jface text I Document get Length public int get Length return this buffer length  IDocument getLength getLength
see org eclipse jface text I Document get public String get return this buffer to String  IDocument toString
see org eclipse jface text I Document get int int public String get int offset int length return this buffer substring offset offset length  IDocument
see org eclipse jface text I Document set java lang String public void set String text defining interface method  IDocument
see org eclipse jface text I Document replace int int java lang String public void replace int offset int length String text this buffer replace offset offset length text  IDocument
see org eclipse jface text I Document add Document Listener org eclipse jface text I Document Listener public void add Document Listener I Document Listener listener defining interface method  IDocument addDocumentListener IDocumentListener addDocumentListener IDocumentListener
see org eclipse jface text I Document remove Document Listener org eclipse jface text I Document Listener public void remove Document Listener I Document Listener listener defining interface method  IDocument removeDocumentListener IDocumentListener removeDocumentListener IDocumentListener
see org eclipse jface text I Document add Prenotified Document Listener org eclipse jface text I Document Listener public void add Prenotified Document Listener I Document Listener document Adapter defining interface method  IDocument addPrenotifiedDocumentListener IDocumentListener addPrenotifiedDocumentListener IDocumentListener documentAdapter
see org eclipse jface text I Document remove Prenotified Document Listener org eclipse jface text I Document Listener public void remove Prenotified Document Listener I Document Listener document Adapter defining interface method  IDocument removePrenotifiedDocumentListener IDocumentListener removePrenotifiedDocumentListener IDocumentListener documentAdapter
see org eclipse jface text I Document add Position Category java lang String public void add Position Category String category defining interface method  IDocument addPositionCategory addPositionCategory
see org eclipse jface text I Document remove Position Category java lang String public void remove Position Category String category defining interface method  IDocument removePositionCategory removePositionCategory
see org eclipse jface text I Document get Position Categories public String get Position Categories defining interface method return null  IDocument getPositionCategories getPositionCategories
see org eclipse jface text I Document contains Position Category java lang String public boolean contains Position Category String category defining interface method return false  IDocument containsPositionCategory containsPositionCategory
see org eclipse jface text I Document add Position org eclipse jface text Position public void add Position Position position defining interface method  IDocument addPosition addPosition
see org eclipse jface text I Document remove Position org eclipse jface text Position public void remove Position Position position defining interface method  IDocument removePosition removePosition
see org eclipse jface text I Document add Position java lang String org eclipse jface text Position public void add Position String category Position position defining interface method  IDocument addPosition addPosition
see org eclipse jface text I Document remove Position java lang String org eclipse jface text Position public void remove Position String category Position position defining interface method  IDocument removePosition removePosition
see org eclipse jface text I Document get Positions java lang String public Position get Positions String category defining interface method return null  IDocument getPositions getPositions
see org eclipse jface text I Document contains Position java lang String int int public boolean contains Position String category int offset int length defining interface method return false  IDocument containsPosition containsPosition
see org eclipse jface text I Document compute Index In Category java lang String int public int compute Index In Category String category int offset defining interface method return 0  IDocument computeIndexInCategory computeIndexInCategory
see org eclipse jface text I Document add Position Updater org eclipse jface text I Position Updater public void add Position Updater I Position Updater updater defining interface method  IDocument addPositionUpdater IPositionUpdater addPositionUpdater IPositionUpdater
see org eclipse jface text I Document remove Position Updater org eclipse jface text I Position Updater public void remove Position Updater I Position Updater updater defining interface method  IDocument removePositionUpdater IPositionUpdater removePositionUpdater IPositionUpdater
see org eclipse jface text I Document insert Position Updater org eclipse jface text I Position Updater int public void insert Position Updater I Position Updater updater int index defining interface method  IDocument insertPositionUpdater IPositionUpdater insertPositionUpdater IPositionUpdater
see org eclipse jface text I Document get Position Updaters public I Position Updater get Position Updaters defining interface method return null  IDocument getPositionUpdaters IPositionUpdater getPositionUpdaters
see org eclipse jface text I Document get Legal Content Types public String get Legal Content Types defining interface method return null  IDocument getLegalContentTypes getLegalContentTypes
see org eclipse jface text I Document get Content Type int public String get Content Type int offset defining interface method return null  IDocument getContentType getContentType
see org eclipse jface text I Document get Partition int public I Typed Region get Partition int offset defining interface method return null  IDocument getPartition ITypedRegion getPartition
see org eclipse jface text I Document compute Partitioning int int public I Typed Region compute Partitioning int offset int length defining interface method return null  IDocument computePartitioning ITypedRegion computePartitioning
see org eclipse jface text I Document add Document Partitioning Listener org eclipse jface text I Document Partitioning Listener public void add Document Partitioning Listener I Document Partitioning Listener listener defining interface method  IDocument addDocumentPartitioningListener IDocumentPartitioningListener addDocumentPartitioningListener IDocumentPartitioningListener
see org eclipse jface text I Document remove Document Partitioning Listener org eclipse jface text I Document Partitioning Listener public void remove Document Partitioning Listener I Document Partitioning Listener listener defining interface method  IDocument removeDocumentPartitioningListener IDocumentPartitioningListener removeDocumentPartitioningListener IDocumentPartitioningListener
see org eclipse jface text I Document set Document Partitioner org eclipse jface text I Document Partitioner public void set Document Partitioner I Document Partitioner partitioner defining interface method  IDocument setDocumentPartitioner IDocumentPartitioner setDocumentPartitioner IDocumentPartitioner
see org eclipse jface text I Document get Document Partitioner public I Document Partitioner get Document Partitioner defining interface method return null  IDocument getDocumentPartitioner IDocumentPartitioner getDocumentPartitioner
see org eclipse jface text I Document get Line Length int public int get Line Length int line defining interface method return 0  IDocument getLineLength getLineLength
see org eclipse jface text I Document get Line Of Offset int public int get Line Of Offset int offset defining interface method return 0  IDocument getLineOfOffset getLineOfOffset
see org eclipse jface text I Document get Line Offset int public int get Line Offset int line defining interface method return 0  IDocument getLineOffset getLineOffset
see org eclipse jface text I Document get Line Information int public I Region get Line Information int line defining interface method return null  IDocument getLineInformation IRegion getLineInformation
see org eclipse jface text I Document get Line Information Of Offset int public I Region get Line Information Of Offset int offset defining interface method return null  IDocument getLineInformationOfOffset IRegion getLineInformationOfOffset
see org eclipse jface text I Document get Number Of Lines public int get Number Of Lines defining interface method return 0  IDocument getNumberOfLines getNumberOfLines
see org eclipse jface text I Document get Number Of Lines int int public int get Number Of Lines int offset int length defining interface method return 0  IDocument getNumberOfLines getNumberOfLines
see org eclipse jface text I Document compute Number Of Lines java lang String public int compute Number Of Lines String text defining interface method return 0  IDocument computeNumberOfLines computeNumberOfLines
see org eclipse jface text I Document get Legal Line Delimiters public String get Legal Line Delimiters defining interface method return null  IDocument getLegalLineDelimiters getLegalLineDelimiters
see org eclipse jface text I Document get Line Delimiter int public String get Line Delimiter int line defining interface method return null  IDocument getLineDelimiter getLineDelimiter
see org eclipse jface text I Document search int java lang String boolean boolean boolean deprecated public int search int start Offset String find String boolean forward Search boolean case Sensitive boolean whole Word defining interface method return 0  IDocument startOffset findString forwardSearch caseSensitive wholeWord

public int threshold public Simple Lookup Table this 13  SimpleLookupTable
public Simple Lookup Table int size this element Size 0 this threshold size size represents the expected number of elements int extra Room int size 1 5f if this threshold extra Room extra Room this key Table new Object extra Room this value Table new Object extra Room  SimpleLookupTable elementSize extraRoom extraRoom extraRoom keyTable extraRoom valueTable extraRoom
public Object clone throws Clone Not Supported Exception Simple Lookup Table result Simple Lookup Table super clone result element Size this element Size result threshold this threshold int length this key Table length result key Table new Object length System arraycopy this key Table 0 result key Table 0 length length this value Table length result value Table new Object length System arraycopy this value Table 0 result value Table 0 length return result  CloneNotSupportedException SimpleLookupTable SimpleLookupTable elementSize elementSize keyTable keyTable keyTable keyTable valueTable valueTable valueTable valueTable
public boolean contains Key Object key int length key Table length int index key hash Code 0x7FFFFFFF length Object current Key while current Key key Table index null if current Key equals key return true if index length index 0 return false  containsKey keyTable hashCode currentKey currentKey keyTable currentKey
public Object get Object key int length key Table length int index key hash Code 0x7FFFFFFF length Object current Key while current Key key Table index null if current Key equals key return value Table index if index length index 0 return null  keyTable hashCode currentKey currentKey keyTable currentKey valueTable
public Object key For Value Object value To Match if value To Match null for int i 0 l value Table length i l i if value To Match equals value Table i return key Table i return null  keyForValue valueToMatch valueToMatch valueTable valueToMatch valueTable keyTable
public Object put Object key Object value int length key Table length int index key hash Code 0x7FFFFFFF length Object current Key while current Key key Table index null if current Key equals key return value Table index value if index length index 0 key Table index key value Table index value assumes the threshold is never equal to the size of the table if element Size threshold rehash return value  keyTable hashCode currentKey currentKey keyTable currentKey valueTable keyTable valueTable elementSize
public Object remove Key Object key int length key Table length int index key hash Code 0x7FFFFFFF length Object current Key while current Key key Table index null if current Key equals key element Size Object old Value value Table index key Table index null value Table index null if key Table index 1 length 0 index 1 null rehash only needed if a possible collision existed return old Value if index length index 0 return null  removeKey keyTable hashCode currentKey currentKey keyTable currentKey elementSize oldValue valueTable keyTable valueTable keyTable oldValue
public void remove Value Object value To Remove boolean rehash false for int i 0 l value Table length i l i Object value value Table i if value null value equals value To Remove element Size key Table i null value Table i null if rehash key Table i 1 l 0 i 1 null rehash true only needed if a possible collision existed if rehash rehash  removeValue valueToRemove valueTable valueTable valueToRemove elementSize keyTable valueTable keyTable
private void rehash Simple Lookup Table new Lookup Table new Simple Lookup Table element Size 2 double the number of expected elements Object current Key for int i key Table length i 0 if current Key key Table i null new Lookup Table put current Key value Table i this key Table new Lookup Table key Table this value Table new Lookup Table value Table this element Size new Lookup Table element Size this threshold new Lookup Table threshold  SimpleLookupTable newLookupTable SimpleLookupTable elementSize currentKey keyTable currentKey keyTable newLookupTable currentKey valueTable keyTable newLookupTable keyTable valueTable newLookupTable valueTable elementSize newLookupTable elementSize newLookupTable
public String to String String s NON NLS 1 Object object for int i 0 l value Table length i l i if object value Table i null s key Table i to String object to String n NON NLS 2 NON NLS 1 return s  toString valueTable valueTable keyTable toString toString

public int threshold public Simple Set this 13  SimpleSet
public Simple Set int size if size 3 size 3 this element Size 0 this threshold size 1 size is the expected number of elements this values new Object 2 size 1  SimpleSet elementSize
public Object add Object object int length values length int index object hash Code 0x7FFFFFFF length Object current while current values index null if current equals object return values index object if index length index 0 values index object assumes the threshold is never equal to the size of the table if element Size threshold rehash return object  hashCode elementSize
public Object clone throws Clone Not Supported Exception Simple Set result Simple Set super clone result element Size this element Size result threshold this threshold int length this values length result values new Object length System arraycopy this values 0 result values 0 length return result  CloneNotSupportedException SimpleSet SimpleSet elementSize elementSize
public boolean includes Object object int length values length int index object hash Code 0x7FFFFFFF length Object current while current values index null if current equals object return true if index length index 0 return false  hashCode
public Object remove Object object int length values length int index object hash Code 0x7FFFFFFF length Object current while current values index null if current equals object element Size Object old Value values index values index null if values index 1 length 0 index 1 null rehash only needed if a possible collision existed return old Value if index length index 0 return null  hashCode elementSize oldValue oldValue
private void rehash Simple Set new Set new Simple Set element Size 2 double the number of expected elements Object current for int i values length i 0 if current values i null new Set add current this values new Set values this element Size new Set element Size this threshold new Set threshold  SimpleSet newSet SimpleSet elementSize newSet newSet elementSize newSet elementSize newSet
public String to String String s NON NLS 1 Object object for int i 0 l values length i l i if object values i null s object to String n NON NLS 1 return s  toString toString

public Simple Word Set int size this element Size 0 this threshold size size represents the expected number of elements int extra Room int size 1 5f if this threshold extra Room extra Room this words new char extra Room  SimpleWordSet elementSize extraRoom extraRoom extraRoom extraRoom
public char add char word int length this words length int index Char Operation hash Code word length char current while current words index null if Char Operation equals current word return current if index length index 0 words index word assumes the threshold is never equal to the size of the table if element Size threshold rehash return word  CharOperation hashCode CharOperation elementSize
public boolean includes char word int length this words length int index Char Operation hash Code word length char current while current words index null if Char Operation equals current word return true if index length index 0 return false  CharOperation hashCode CharOperation
private void rehash Simple Word Set new Set new Simple Word Set element Size 2 double the number of expected elements char current for int i words length i 0 if current words i null new Set add current this words new Set words this element Size new Set element Size this threshold new Set threshold  SimpleWordSet newSet SimpleWordSet elementSize newSet newSet elementSize newSet elementSize newSet

Constructor for Source File Attribute param class File Bytes param constant Pool param offset throws Class Format Exception public Source File Attribute byte class File Bytes I Constant Pool constant Pool int offset throws Class Format Exception super class File Bytes constant Pool offset this source File Index u2 At class File Bytes 6 offset I Constant Pool Entry constant Pool Entry constant Pool decode Entry this source File Index if constant Pool Entry get Kind I Constant Pool Constant CONSTANT Utf8 throw new Class Format Exception Class Format Exception INVALID CONSTANT POOL ENTRY this source File Name constant Pool Entry get Utf8 Value  SourceFileAttribute classFileBytes constantPool ClassFormatException SourceFileAttribute classFileBytes IConstantPool constantPool ClassFormatException classFileBytes constantPool sourceFileIndex u2At classFileBytes IConstantPoolEntry constantPoolEntry constantPool decodeEntry sourceFileIndex constantPoolEntry getKind IConstantPoolConstant CONSTANT_Utf8 ClassFormatException ClassFormatException INVALID_CONSTANT_POOL_ENTRY sourceFileName constantPoolEntry getUtf8Value
see org eclipse jdt core util I Class File Attribute get Attribute Name public char get Attribute Name return I Attribute Names Constants SOURCE  IClassFileAttribute getAttributeName getAttributeName IAttributeNamesConstants
see I Source Attribute get Source File Index public int get Source File Index return this source File Index  ISourceAttribute getSourceFileIndex getSourceFileIndex sourceFileIndex
see I Source Attribute get Source File Name public char get Source File Name return this source File Name  ISourceAttribute getSourceFileName getSourceFileName sourceFileName

String sorted Strings Returns true if string Two is greater than string One This is the ordering method of the sort operation public boolean compare String string One String string Two return string One compare To string Two 0  sortedStrings stringTwo stringOne stringOne stringTwo stringOne compareTo stringTwo
Sort the objects in sorted collection and return that collection private void quick Sort int left int right int original Left left int original Right right int mid Index left right 2 String mid To String this sorted Strings mid Index do while compare this sorted Strings left mid To String left while compare mid To String this sorted Strings right right if left right Object tmp this sorted Objects left this sorted Objects left this sorted Objects right this sorted Objects right tmp String tmp To String this sorted Strings left this sorted Strings left this sorted Strings right this sorted Strings right tmp To String left right while left right if original Left right quick Sort original Left right if left original Right quick Sort left original Right  quickSort originalLeft originalRight midIndex midToString sortedStrings midIndex sortedStrings midToString midToString sortedStrings sortedObjects sortedObjects sortedObjects sortedObjects tmpToString sortedStrings sortedStrings sortedStrings sortedStrings tmpToString originalLeft quickSort originalLeft originalRight quickSort originalRight
Return a new sorted collection from this unsorted collection Sort using quick sort public void sort Object un Sorted Objects String unsorted Strings int size un Sorted Objects length this sorted Objects new Object size this sorted Strings new String size copy the array so can return a new sorted collection System arraycopy un Sorted Objects 0 this sorted Objects 0 size System arraycopy unsorted Strings 0 this sorted Strings 0 size if size 1 quick Sort 0 size 1  unSortedObjects unsortedStrings unSortedObjects sortedObjects sortedStrings unSortedObjects sortedObjects unsortedStrings sortedStrings quickSort

public interface Comparable Returns 0 if this and c are equal 0 if this is greater than c or 0 if this is less than c 
public interface Comparer Returns 0 if a and b are equal 0 if a is greater than b or 0 if a is less than b 
private Util cannot be instantiated 
Lookup the message with the given ID in this catalog public static String bind String id return bind id String null 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string public static String bind String id String binding return bind id new String binding 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings public static String bind String id String binding1 String binding2 return bind id new String binding1 binding2 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string values public static String bind String id String bindings if id null return No message available NON NLS 1 String message null try message bundle get String id catch Missing Resource Exception e If we got an exception looking for the message fail gracefully by just returning the id we were looking for In most cases this is semi informative so is not too bad return Missing message id in bundle Name NON NLS 2 NON NLS 1 for compatibility with Message Format which eliminates double quotes in original message char message With No Double Quotes Char Operation replace message to Char Array DOUBLE QUOTES SINGLE QUOTE if bindings null return new String message With No Double Quotes int length message With No Double Quotes length int start 0 int end length String Buffer output null while true if end Char Operation index Of message With No Double Quotes start 1 if output null output new String Buffer length bindings length 20 output append message With No Double Quotes start end start if start Char Operation index Of message With No Double Quotes end 1 1 int index 1 String arg Id new String message With No Double Quotes end 1 start end 1 try index Integer parse Int arg Id output append bindings index catch Number Format Exception nfe could be nested message ID compiler name boolean done false if id equals arg Id String arg Message null try arg Message bundle get String arg Id output append arg Message done true catch Missing Resource Exception e unable to bind argument ignore will leave argument in if done output append message With No Double Quotes end 1 start end catch Array Index Out Of Bounds Exception e output append missing Integer to String index NON NLS 2 NON NLS 1 start else output append message With No Double Quotes end length break else if output null return new String message With No Double Quotes output append message With No Double Quotes start length start break return output to String  getString MissingResourceException bundleName MessageFormat messageWithNoDoubleQuotes CharOperation toCharArray DOUBLE_QUOTES SINGLE_QUOTE messageWithNoDoubleQuotes messageWithNoDoubleQuotes StringBuffer CharOperation indexOf messageWithNoDoubleQuotes StringBuffer messageWithNoDoubleQuotes CharOperation indexOf messageWithNoDoubleQuotes argId messageWithNoDoubleQuotes parseInt argId NumberFormatException argId argMessage argMessage getString argId argMessage MissingResourceException messageWithNoDoubleQuotes ArrayIndexOutOfBoundsException toString messageWithNoDoubleQuotes messageWithNoDoubleQuotes messageWithNoDoubleQuotes toString
Checks the type signature in String sig starting at start and ending before end end is not included Returns the index of the character immediately after the signature if valid or 1 if not valid private static int check Type Signature String sig int start int end boolean allow Void if start end return 1 int i start char c sig char At i int nesting Depth 0 while c nesting Depth if i end return 1 c sig char At i switch c case B case C case D case F case I case J case S case Z break case V if allow Void return 1 array of void is not allowed if nesting Depth 0 return 1 break case L int semicolon sig index Of i Must have at least one character between L and if semicolon i semicolon end return 1 i semicolon 1 break default return 1 return i  checkTypeSignature allowVoid charAt nestingDepth nestingDepth charAt allowVoid nestingDepth indexOf
Combines two hash codes to make a new one public static int combine Hash Codes int hash Code1 int hash Code2 return hash Code1 17 hash Code2  combineHashCodes hashCode1 hashCode2 hashCode1 hashCode2
Compares two byte arrays Returns 0 if a byte in a is less than the corresponding byte in b or if a is shorter or if a is null Returns 0 if a byte in a is greater than the corresponding byte in b or if a is longer or if b is null Returns 0 if they are equal or both null public static int compare byte a byte b if a b return 0 if a null return 1 if b null return 1 int len Math min a length b length for int i 0 i len i int diff a i b i if diff 0 return diff if a length len return 1 if b length len return 1 return 0 
Compares two strings lexicographically The comparison is based on the Unicode value of each character in the strings return the value code 0 code if the str1 is equal to str2 a value less than code 0 code if str1 is lexicographically less than str2 and a value greater than code 0 code if str1 is lexicographically greater than str2 public static int compare char str1 char str2 int len1 str1 length int len2 str2 length int n Math min len1 len2 int i 0 while n 0 char c1 str1 i char c2 str2 i if c1 c2 return c1 c2 return len1 len2 
Concatenate two strings with a char in between see concat String String public static String concat String s1 char c String s2 if s1 null s1 null NON NLS 1 if s2 null s2 null NON NLS 1 int l1 s1 length int l2 s2 length char buf new char l1 1 l2 s1 get Chars 0 l1 buf 0 buf l1 c s2 get Chars 0 l2 buf l1 1 return new String buf  getChars getChars
Concatenate two strings Much faster than using which creates a String Buffer which is synchronized of default size so the resulting char array is often larger than needed This implementation creates an extra char array since the String constructor copies its argument but there s no way around this public static String concat String s1 String s2 if s1 null s1 null NON NLS 1 if s2 null s2 null NON NLS 1 int l1 s1 length int l2 s2 length char buf new char l1 l2 s1 get Chars 0 l1 buf 0 s2 get Chars 0 l2 buf l1 return new String buf  StringBuffer getChars getChars
Concatenate three strings see concat String String public static String concat String s1 String s2 String s3 if s1 null s1 null NON NLS 1 if s2 null s2 null NON NLS 1 if s3 null s3 null NON NLS 1 int l1 s1 length int l2 s2 length int l3 s3 length char buf new char l1 l2 l3 s1 get Chars 0 l1 buf 0 s2 get Chars 0 l2 buf l1 s3 get Chars 0 l3 buf l1 l2 return new String buf  getChars getChars getChars
Converts a type signature from the I Binary Type representation to the DC representation public static String convert Type Signature char sig return new String sig replace  IBinaryType convertTypeSignature
Apply the given edit on the given string and return the updated string Return the given string if anything wrong happen while applying the edit param original the given string param edit the given edit return the updated string public final static String edited String String original Text Edit edit if edit null return original Simple Document document new Simple Document original try edit apply document Text Edit NONE return document get catch Malformed Tree Exception e e print Stack Trace catch Bad Location Exception e e print Stack Trace return original  editedString TextEdit SimpleDocument SimpleDocument TextEdit MalformedTreeException printStackTrace BadLocationException printStackTrace
Returns true iff str to Lower Case ends With end to Lower Case implementation is not creating extra strings public final static boolean ends With Ignore Case String str String end int str Length str null 0 str length int end Length end null 0 end length return false if the string is smaller than the end if end Length str Length return false return false if any character of the end are not the same in lower case for int i 1 i end Length i if Character to Lower Case end char At end Length i Character to Lower Case str char At str Length i return false return true  toLowerCase endsWith toLowerCase endsWithIgnoreCase strLength endLength endLength strLength endLength toLowerCase charAt endLength toLowerCase charAt strLength
Compares two arrays using equals on the elements Either or both arrays may be null Returns true if both are null Returns false if only one is null If both are arrays returns true iff they have the same length and all elements are equal public static boolean equal Arrays Or Null int a int b if a b return true if a null b null return false int len a length if len b length return false for int i 0 i len i if a i b i return false return true  equalArraysOrNull
Compares two arrays using equals on the elements Either or both arrays may be null Returns true if both are null Returns false if only one is null If both are arrays returns true iff they have the same length and all elements compare true with equals public static boolean equal Arrays Or Null Object a Object b if a b return true if a null b null return false int len a length if len b length return false for int i 0 i len i if a i null if b i null return false else if a i equals b i return false return true  equalArraysOrNull
Compares two arrays using equals on the elements The arrays are first sorted Either or both arrays may be null Returns true if both are null Returns false if only one is null If both are arrays returns true iff they have the same length and iff after sorting both arrays all elements compare true with equals The original arrays are left untouched public static boolean equal Arrays Or Null Sort First Comparable a Comparable b if a b return true if a null b null return false int len a length if len b length return false if len 2 only need to sort if more than two items a sort Copy a b sort Copy b for int i 0 i len i if a i equals b i return false return true  equalArraysOrNullSortFirst sortCopy sortCopy
Compares two String arrays using equals on the elements The arrays are first sorted Either or both arrays may be null Returns true if both are null Returns false if only one is null If both are arrays returns true iff they have the same length and iff after sorting both arrays all elements compare true with equals The original arrays are left untouched public static boolean equal Arrays Or Null Sort First String a String b if a b return true if a null b null return false int len a length if len b length return false if len 2 only need to sort if more than two items a sort Copy a b sort Copy b for int i 0 i len i if a i equals b i return false return true  equalArraysOrNullSortFirst sortCopy sortCopy
Compares two objects using equals Either or both array may be null Returns true if both are null Returns false if only one is null Otherwise return the result of comparing with equals public static boolean equal Or Null Object a Object b if a b return true if a null b null return false return a equals b  equalOrNull
Given a qualified name extract the last component If the input is not qualified the same string is answered public static String extract Last Name String qualified Name int i qualified Name last Index Of if i 1 return qualified Name return qualified Name substring i 1  extractLastName qualifiedName qualifiedName lastIndexOf qualifiedName qualifiedName
Extracts the parameter types from a method signature public static String extract Parameter Types char sig int count get Parameter Count sig String result new String count if count 0 return result int i Char Operation index Of sig 1 count 0 int len sig length int start i for if i len break char c sig i if c break if c i else if c L i Char Operation index Of sig i 1 1 Assert is True i 0 result count convert Type Signature Char Operation subarray sig start i start i else i result count convert Type Signature Char Operation subarray sig start i start i return result  extractParameterTypes getParameterCount CharOperation indexOf CharOperation indexOf isTrue convertTypeSignature CharOperation convertTypeSignature CharOperation
Extracts the return type from a method signature public static String extract Return Type String sig int i sig last Index Of Assert is True i 1 return sig substring i 1  extractReturnType lastIndexOf isTrue
private static I File find First Class File I Folder folder try I Resource members folder members for int i 0 max members length i max i I Resource member members i if member get Type I Resource FOLDER return find First Class File I Folder member else if org eclipse jdt internal compiler util Util is Class File Name member get Name return I File member catch Core Exception e ignore return null  IFile findFirstClassFile IFolder IResource IResource getType IResource findFirstClassFile IFolder isClassFileName getName IFile CoreException
Finds the first line separator used by the given text return code n code or code r code or code r n code or code null code if none found public static String find Line Separator char text find the first line separator int length text length if length 0 char next Char text 0 for int i 0 i length i char current Char next Char next Char i length 1 text i 1 switch current Char case n return n NON NLS 1 case r return next Char n r n r NON NLS 1 NON NLS 2 not found return null  findLineSeparator nextChar currentChar nextChar nextChar currentChar nextChar
public static I Class File Attribute get Attribute I Class File Reader class File Reader char attribute Name I Class File Attribute attributes class File Reader get Attributes for int i 0 max attributes length i max i if Char Operation equals attributes i get Attribute Name attribute Name return attributes i return null  IClassFileAttribute getAttribute IClassFileReader classFileReader attributeName IClassFileAttribute classFileReader getAttributes CharOperation getAttributeName attributeName
public static I Class File Attribute get Attribute I Code Attribute code Attribute char attribute Name I Class File Attribute attributes code Attribute get Attributes for int i 0 max attributes length i max i if Char Operation equals attributes i get Attribute Name attribute Name return attributes i return null  IClassFileAttribute getAttribute ICodeAttribute codeAttribute attributeName IClassFileAttribute codeAttribute getAttributes CharOperation getAttributeName attributeName
public static I Class File Attribute get Attribute I Field Info field Info char attribute Name I Class File Attribute attributes field Info get Attributes for int i 0 max attributes length i max i if Char Operation equals attributes i get Attribute Name attribute Name return attributes i return null  IClassFileAttribute getAttribute IFieldInfo fieldInfo attributeName IClassFileAttribute fieldInfo getAttributes CharOperation getAttributeName attributeName
public static I Class File Attribute get Attribute I Method Info method Info char attribute Name I Class File Attribute attributes method Info get Attributes for int i 0 max attributes length i max i if Char Operation equals attributes i get Attribute Name attribute Name return attributes i return null  IClassFileAttribute getAttribute IMethodInfo methodInfo attributeName IClassFileAttribute methodInfo getAttributes CharOperation getAttributeName attributeName
Get the jdk level of this root The value can be ul li major 16 minor see predefined constants on Class File Constants li li code 0 null if the root is a source package fragment root or if a Java model exception occured li ul Returns the jdk level public static long get Jdk Level Object target Library try Class File Reader reader null if target Library instanceof I Folder I File class File find First Class File I Folder target Library only internal classfolders are allowed if class File null byte bytes Util get Resource Contents As Byte Array class File I Path location class File get Location reader new Class File Reader bytes location null null location to String to Char Array else root is a jar file or a zip file Zip File jar null try I Path path null if target Library instanceof I Resource path I Resource target Library get Location else if target Library instanceof File File f File target Library if f is Directory path new Path File target Library get Path if path null jar Java Model Manager get Java Model Manager get Zip File path for Enumeration e jar entries e has More Elements Zip Entry member Zip Entry e next Element String entry Name member get Name if org eclipse jdt internal compiler util Util is Class File Name entry Name reader Class File Reader read jar entry Name break catch Core Exception e ignore finally Java Model Manager get Java Model Manager close Zip File jar if reader null return reader get Version catch Java Model Exception e ignore catch Class Format Exception e ignore catch IO Exception e ignore return 0  ClassFileConstants getJdkLevel targetLibrary ClassFileReader targetLibrary IFolder IFile classFile findFirstClassFile IFolder targetLibrary classFile getResourceContentsAsByteArray classFile IPath classFile getLocation ClassFileReader toString toCharArray ZipFile IPath targetLibrary IResource IResource targetLibrary getLocation targetLibrary targetLibrary isDirectory targetLibrary getPath JavaModelManager getJavaModelManager getZipFile hasMoreElements ZipEntry ZipEntry nextElement entryName getName isClassFileName entryName ClassFileReader entryName CoreException JavaModelManager getJavaModelManager closeZipFile getVersion JavaModelException ClassFormatException IOException
Returns the line separator used by the given buffer Uses the given text if none found return code n code or code r code or code r n code private static String get Line Separator char text char buffer search in this buffer s contents first String line Separator find Line Separator buffer if line Separator null search in the given text line Separator find Line Separator text if line Separator null default to system line separator return org eclipse jdt internal compiler util Util LINE SEPARATOR return line Separator  getLineSeparator lineSeparator findLineSeparator lineSeparator lineSeparator findLineSeparator lineSeparator LINE_SEPARATOR lineSeparator
Returns the number of parameter types in a method signature public static int get Parameter Count char sig int i Char Operation index Of sig 1 Assert is True i 0 int count 0 int len sig length for if i len break char c sig i if c break if c i else if c L count i Char Operation index Of sig i 1 1 Assert is True i 0 else count i return count  getParameterCount CharOperation indexOf isTrue CharOperation indexOf isTrue
Put all the arguments in one String public static String get Problem Arguments For Marker String arguments String Buffer args new String Buffer 10 args append arguments length args append for int j 0 j arguments length j if j 0 args append ARGUMENTS DELIMITER if arguments j length 0 args append EMPTY ARGUMENT else args append arguments j return args to String  getProblemArgumentsForMarker StringBuffer StringBuffer ARGUMENTS_DELIMITER EMPTY_ARGUMENT toString
Separate all the arguments of a String made by get Problem Arguments For Marker public static String get Problem Arguments From Marker String arguments String if arguments String null return null int index arguments String index Of if index 1 return null int length arguments String length int number Of Arg try number Of Arg Integer parse Int arguments String substring 0 index catch Number Format Exception e return null arguments String arguments String substring index 1 length String args new String length int count 0 String Tokenizer tokenizer new String Tokenizer arguments String ARGUMENTS DELIMITER while tokenizer has More Tokens String argument tokenizer next Token if argument equals EMPTY ARGUMENT argument NON NLS 1 args count argument if count number Of Arg return null System arraycopy args 0 args new String count 0 count return args  getProblemArgumentsForMarker getProblemArgumentsFromMarker argumentsString argumentsString argumentsString indexOf argumentsString numberOfArg numberOfArg parseInt argumentsString NumberFormatException argumentsString argumentsString StringTokenizer StringTokenizer argumentsString ARGUMENTS_DELIMITER hasMoreTokens nextToken EMPTY_ARGUMENT numberOfArg
Returns the given file s contents as a byte array public static byte get Resource Contents As Byte Array I File file throws Java Model Exception Input Stream stream null try stream new Buffered Input Stream file get Contents true catch Core Exception e throw new Java Model Exception e try return org eclipse jdt internal compiler util Util get Input Stream As Byte Array stream 1 catch IO Exception e throw new Java Model Exception e I Java Model Status Constants IO EXCEPTION finally try stream close catch IO Exception e ignore  getResourceContentsAsByteArray IFile JavaModelException InputStream BufferedInputStream getContents CoreException JavaModelException getInputStreamAsByteArray IOException JavaModelException IJavaModelStatusConstants IO_EXCEPTION IOException
Returns the given file s contents as a character array public static char get Resource Contents As Char Array I File file throws Java Model Exception Get encoding from file String encoding null try encoding file get Charset catch Core Exception ce do not use any encoding return get Resource Contents As Char Array file encoding  getResourceContentsAsCharArray IFile JavaModelException getCharset CoreException getResourceContentsAsCharArray
public static char get Resource Contents As Char Array I File file String encoding throws Java Model Exception Get resource contents Input Stream stream null try stream new Buffered Input Stream file get Contents true catch Core Exception e throw new Java Model Exception e I Java Model Status Constants ELEMENT DOES NOT EXIST try return org eclipse jdt internal compiler util Util get Input Stream As Char Array stream 1 encoding catch IO Exception e throw new Java Model Exception e I Java Model Status Constants IO EXCEPTION finally try stream close catch IO Exception e ignore  getResourceContentsAsCharArray IFile JavaModelException InputStream BufferedInputStream getContents CoreException JavaModelException IJavaModelStatusConstants ELEMENT_DOES_NOT_EXIST getInputStreamAsCharArray IOException JavaModelException IJavaModelStatusConstants IO_EXCEPTION IOException
Returns a trimmed version the simples names returned by Signature public static String get Trimmed Simple Names String name String result Signature get Simple Names name if result null return null for int i 0 length result length i length i result i result i trim return result  getTrimmedSimpleNames getSimpleNames
public static int index Of Enclosing Path I Path checked Path I Path paths int path Count int best Match 1 best Length 1 for int i 0 i path Count i if paths i equals checked Path continue if paths i is Prefix Of checked Path int current Length paths i segment Count if current Length best Length best Length current Length best Match i return best Match  indexOfEnclosingPath IPath checkedPath IPath pathCount bestMatch bestLength pathCount checkedPath isPrefixOf checkedPath currentLength segmentCount currentLength bestLength bestLength currentLength bestMatch bestMatch
public static int index Of Matching Path I Path checked Path I Path paths int path Count for int i 0 i path Count i if paths i equals checked Path return i return 1  indexOfMatchingPath IPath checkedPath IPath pathCount pathCount checkedPath
public static int index Of Nested Path I Path checked Path I Path paths int path Count for int i 0 i path Count i if checked Path equals paths i continue if checked Path is Prefix Of paths i return i return 1  indexOfNestedPath IPath checkedPath IPath pathCount pathCount checkedPath checkedPath isPrefixOf
public static final boolean is Excluded I Java Element element int element Type element get Element Type switch element Type case I Java Element JAVA MODEL case I Java Element JAVA PROJECT case I Java Element PACKAGE FRAGMENT ROOT return false case I Java Element PACKAGE FRAGMENT Package Fragment Root root Package Fragment Root element get Ancestor I Java Element PACKAGE FRAGMENT ROOT I Resource resource element get Resource return resource null is Excluded resource root full Inclusion Pattern Chars root full Exclusion Pattern Chars case I Java Element COMPILATION UNIT root Package Fragment Root element get Ancestor I Java Element PACKAGE FRAGMENT ROOT resource element get Resource if resource null is Excluded resource root full Inclusion Pattern Chars root full Exclusion Pattern Chars return true return is Excluded element get Parent default I Java Element cu element get Ancestor I Java Element COMPILATION UNIT return cu null is Excluded cu  isExcluded IJavaElement elementType getElementType elementType IJavaElement JAVA_MODEL IJavaElement JAVA_PROJECT IJavaElement PACKAGE_FRAGMENT_ROOT IJavaElement PACKAGE_FRAGMENT PackageFragmentRoot PackageFragmentRoot getAncestor IJavaElement PACKAGE_FRAGMENT_ROOT IResource getResource isExcluded fullInclusionPatternChars fullExclusionPatternChars IJavaElement COMPILATION_UNIT PackageFragmentRoot getAncestor IJavaElement PACKAGE_FRAGMENT_ROOT getResource isExcluded fullInclusionPatternChars fullExclusionPatternChars isExcluded getParent IJavaElement getAncestor IJavaElement COMPILATION_UNIT isExcluded
public final static boolean is Excluded I Path resource Path char inclusion Patterns char exclusion Patterns boolean is Folder Path if inclusion Patterns null exclusion Patterns null return false char path resource Path to String to Char Array inclusion Check if inclusion Patterns null for int i 0 length inclusion Patterns length i length i char pattern inclusion Patterns i char folder Pattern pattern if is Folder Path int last Slash Char Operation last Index Of pattern if last Slash 1 last Slash pattern length 1 trailing slash adds for free see http ant apache org manual dirtasks html int star Char Operation index Of pattern last Slash if star 1 star pattern length 1 pattern star 1 folder Pattern Char Operation subarray pattern 0 last Slash if Char Operation path Match folder Pattern path true break inclusion Check return true never included if is Folder Path path Char Operation concat path new char exclusion Check if exclusion Patterns null for int i 0 length exclusion Patterns length i length i if Char Operation path Match exclusion Patterns i path true return true return false  isExcluded IPath resourcePath inclusionPatterns exclusionPatterns isFolderPath inclusionPatterns exclusionPatterns resourcePath toString toCharArray inclusionCheck inclusionPatterns inclusionPatterns inclusionPatterns folderPattern isFolderPath lastSlash CharOperation lastIndexOf lastSlash lastSlash CharOperation indexOf lastSlash folderPattern CharOperation lastSlash CharOperation pathMatch folderPattern inclusionCheck isFolderPath CharOperation exclusionCheck exclusionPatterns exclusionPatterns CharOperation pathMatch exclusionPatterns
public final static boolean is Excluded I Resource resource char inclusion Patterns char exclusion Patterns I Path path resource get Full Path ensure that folders are only excluded if all of their children are excluded return is Excluded path inclusion Patterns exclusion Patterns resource get Type I Resource FOLDER  isExcluded IResource inclusionPatterns exclusionPatterns IPath getFullPath isExcluded inclusionPatterns exclusionPatterns getType IResource
Validate the given class file name A class file name must obey the following rules ul li it must not be null li it must include the code class code suffix li its prefix must be a valid identifier ul p param name the name of a class file return a status object with code code I Status OK code if the given name is valid as a class file name otherwise a status object indicating what is wrong with the name public static boolean is Valid Class File Name String name return Java Conventions validate Class File Name name get Severity I Status ERROR  IStatus isValidClassFileName JavaConventions validateClassFileName getSeverity IStatus
Validate the given compilation unit name A compilation unit name must obey the following rules ul li it must not be null li it must include the code java code suffix li its prefix must be a valid identifier ul p param name the name of a compilation unit return a status object with code code I Status OK code if the given name is valid as a compilation unit name otherwise a status object indicating what is wrong with the name public static boolean is Valid Compilation Unit Name String name return Java Conventions validate Compilation Unit Name name get Severity I Status ERROR  IStatus isValidCompilationUnitName JavaConventions validateCompilationUnitName getSeverity IStatus
Returns true if the given folder name is valid for a package false if it is not public static boolean is Valid Folder Name For Package String folder Name return Java Conventions validate Identifier folder Name get Severity I Status ERROR  isValidFolderNameForPackage folderName JavaConventions validateIdentifier folderName getSeverity IStatus
Returns true if the given method signature is valid false if it is not public static boolean is Valid Method Signature String sig int len sig length if len 0 return false int i 0 char c sig char At i if c return false if i len return false while sig char At i Void is not allowed as a parameter type i check Type Signature sig i len false if i 1 return false if i len return false i i check Type Signature sig i len true return i len  isValidMethodSignature charAt charAt checkTypeSignature checkTypeSignature
Returns true if the given type signature is valid false if it is not public static boolean is Valid Type Signature String sig boolean allow Void int len sig length return check Type Signature sig 0 len allow Void len  isValidTypeSignature allowVoid checkTypeSignature allowVoid
public static void log Throwable e String message Throwable nested Exception if e instanceof Java Model Exception nested Exception Java Model Exception e get Exception null e nested Exception I Status status new Status I Status ERROR Java Core PLUGIN ID I Status ERROR message e Java Core get Plugin get Log log status  nestedException JavaModelException nestedException JavaModelException getException nestedException IStatus IStatus JavaCore PLUGIN_ID IStatus JavaCore getPlugin getLog
Normalizes the cariage returns in the given text They are all changed to use the given buffer s line separator public static char normalizeC Rs char text char buffer Char Array Buffer result new Char Array Buffer int line Start 0 int length text length if length 0 return text String line Separator get Line Separator text buffer char next Char text 0 for int i 0 i length i char current Char next Char next Char i length 1 text i 1 switch current Char case n int line Length i line Start char line new char line Length System arraycopy text line Start line 0 line Length result append line result append line Separator line Start i 1 break case r line Length i line Start if line Length 0 line new char line Length System arraycopy text line Start line 0 line Length result append line result append line Separator if next Char n next Char line Start i 2 else when line separator are mixed in the same file r might not be followed by a n If not we should increment line Start by one and not by two line Start i 1 else when line separator are mixed in the same file we need to prevent Negative Array Size Exception line Start i 1 break char last Line if line Start 0 int last Line Length length line Start if last Line Length 0 last Line new char last Line Length System arraycopy text line Start last Line 0 last Line Length result append last Line return result get Contents return text  normalizeCRs CharArrayBuffer CharArrayBuffer lineStart lineSeparator getLineSeparator nextChar currentChar nextChar nextChar currentChar lineLength lineStart lineLength lineStart lineLength lineSeparator lineStart lineLength lineStart lineLength lineLength lineStart lineLength lineSeparator nextChar nextChar lineStart lineStart lineStart NegativeArraySizeException lineStart lastLine lineStart lastLineLength lineStart lastLineLength lastLine lastLineLength lineStart lastLine lastLineLength lastLine getContents
Normalizes the cariage returns in the given text They are all changed to use given buffer s line sepatator public static String normalizeC Rs String text String buffer return new String normalizeC Rs text to Char Array buffer to Char Array  normalizeCRs normalizeCRs toCharArray toCharArray
Converts the given relative path into a package name Returns null if the path is not a valid package name public static String package Name I Path pkg Path String Buffer pkg Name new String Buffer I Package Fragment DEFAULT PACKAGE NAME for int j 0 max pkg Path segment Count j max j String segment pkg Path segment j if is Valid Folder Name For Package segment return null pkg Name append segment if j pkg Path segment Count 1 pkg Name append NON NLS 1 return pkg Name to String  packageName IPath pkgPath StringBuffer pkgName StringBuffer IPackageFragment DEFAULT_PACKAGE_NAME pkgPath segmentCount pkgPath isValidFolderNameForPackage pkgName pkgPath segmentCount pkgName pkgName toString
Returns the length of the common prefix between s1 and s2 public static int prefix Length char s1 char s2 int len 0 int max Math min s1 length s2 length for int i 0 i max s1 i s2 i i len return len  prefixLength
Returns the length of the common prefix between s1 and s2 public static int prefix Length String s1 String s2 int len 0 int max Math min s1 length s2 length for int i 0 i max s1 char At i s2 char At i i len return len  prefixLength charAt charAt
private static void quick Sort char list int left int right int original left left int original right right char mid list left right 2 do while compare list left mid 0 left while compare mid list right 0 right if left right char tmp list left list left list right list right tmp left right while left right if original left right quick Sort list original left right if left original right quick Sort list left original right  quickSort original_left original_right original_left quickSort original_left original_right quickSort original_right
Sort the comparable objects in the given collection private static void quick Sort Comparable sorted Collection int left int right int original left left int original right right Comparable mid sorted Collection left right 2 do while sorted Collection left compare To mid 0 left while mid compare To sorted Collection right 0 right if left right Comparable tmp sorted Collection left sorted Collection left sorted Collection right sorted Collection right tmp left right while left right if original left right quick Sort sorted Collection original left right if left original right quick Sort sorted Collection left original right  quickSort sortedCollection original_left original_right sortedCollection sortedCollection compareTo compareTo sortedCollection sortedCollection sortedCollection sortedCollection sortedCollection original_left quickSort sortedCollection original_left original_right quickSort sortedCollection original_right
private static void quick Sort int list int left int right int original left left int original right right int mid list left right 2 do while list left mid left while mid list right right if left right int tmp list left list left list right list right tmp left right while left right if original left right quick Sort list original left right if left original right quick Sort list left original right  quickSort original_left original_right original_left quickSort original_left original_right quickSort original_right
Sort the objects in the given collection using the given comparer private static void quick Sort Object sorted Collection int left int right Comparer comparer int original left left int original right right Object mid sorted Collection left right 2 do while comparer compare sorted Collection left mid 0 left while comparer compare mid sorted Collection right 0 right if left right Object tmp sorted Collection left sorted Collection left sorted Collection right sorted Collection right tmp left right while left right if original left right quick Sort sorted Collection original left right comparer if left original right quick Sort sorted Collection left original right comparer  quickSort sortedCollection original_left original_right sortedCollection sortedCollection sortedCollection sortedCollection sortedCollection sortedCollection sortedCollection original_left quickSort sortedCollection original_left original_right quickSort sortedCollection original_right
Sort the objects in the given collection using the given sort order private static void quick Sort Object sorted Collection int left int right int sort Order int original left left int original right right int mid sort Order left right 2 do while sort Order left mid left while mid sort Order right right if left right Object tmp sorted Collection left sorted Collection left sorted Collection right sorted Collection right tmp int tmp2 sort Order left sort Order left sort Order right sort Order right tmp2 left right while left right if original left right quick Sort sorted Collection original left right sort Order if left original right quick Sort sorted Collection left original right sort Order  quickSort sortedCollection sortOrder original_left original_right sortOrder sortOrder sortOrder sortedCollection sortedCollection sortedCollection sortedCollection sortOrder sortOrder sortOrder sortOrder original_left quickSort sortedCollection original_left sortOrder original_right quickSort sortedCollection original_right sortOrder
Sort the strings in the given collection private static void quick Sort String sorted Collection int left int right int original left left int original right right String mid sorted Collection left right 2 do while sorted Collection left compare To mid 0 left while mid compare To sorted Collection right 0 right if left right String tmp sorted Collection left sorted Collection left sorted Collection right sorted Collection right tmp left right while left right if original left right quick Sort sorted Collection original left right if left original right quick Sort sorted Collection left original right  quickSort sortedCollection original_left original_right sortedCollection sortedCollection compareTo compareTo sortedCollection sortedCollection sortedCollection sortedCollection sortedCollection original_left quickSort sortedCollection original_left original_right quickSort sortedCollection original_right
Sort the strings in the given collection in reverse alphabetical order private static void quick Sort Reverse String sorted Collection int left int right int original left left int original right right String mid sorted Collection left right 2 do while sorted Collection left compare To mid 0 left while mid compare To sorted Collection right 0 right if left right String tmp sorted Collection left sorted Collection left sorted Collection right sorted Collection right tmp left right while left right if original left right quick Sort Reverse sorted Collection original left right if left original right quick Sort Reverse sorted Collection left original right  quickSortReverse sortedCollection original_left original_right sortedCollection sortedCollection compareTo compareTo sortedCollection sortedCollection sortedCollection sortedCollection sortedCollection original_left quickSortReverse sortedCollection original_left original_right quickSortReverse sortedCollection original_right
Reads in a string from the specified data input stream The string has been encoded using a modified UTF 8 format p The first two bytes are read as if by code read Unsigned Short code This value gives the number of following bytes that are in the encoded string not the length of the resulting string The following bytes are then interpreted as bytes encoding characters in the UTF 8 format and are converted into characters p This method blocks until all the bytes are read the end of the stream is detected or an exception is thrown param in a data input stream return a Unicode string exception EOF Exception if the input stream reaches the end before all the bytes exception IO Exception if an I O error occurs exception UTF Data Format Exception if the bytes do not represent a valid UTF 8 encoding of a Unicode string see java io Data Input Stream read Unsigned Short public final static char readUTF Data Input in throws IO Exception int utflen in read Unsigned Short char str new char utflen int count 0 int strlen 0 while count utflen int c in read Unsigned Byte int char2 char3 switch c 4 case 0 case 1 case 2 case 3 case 4 case 5 case 6 case 7 0xxxxxxx count str strlen char c break case 12 case 13 110x xxxx 10xx xxxx count 2 if count utflen throw new UTF Data Format Exception char2 in read Unsigned Byte if char2 0xC0 0x80 throw new UTF Data Format Exception str strlen char c 0x1F 6 char2 0x3F break case 14 1110 xxxx 10xx xxxx 10xx xxxx count 3 if count utflen throw new UTF Data Format Exception char2 in read Unsigned Byte char3 in read Unsigned Byte if char2 0xC0 0x80 char3 0xC0 0x80 throw new UTF Data Format Exception str strlen char c 0x0F 12 char2 0x3F 6 char3 0x3F 0 break default 10xx xxxx 1111 xxxx throw new UTF Data Format Exception if strlen utflen System arraycopy str 0 str new char strlen 0 strlen return str  readUnsignedShort EOFException IOException UTFDataFormatException DataInputStream readUnsignedShort DataInput IOException readUnsignedShort readUnsignedByte UTFDataFormatException readUnsignedByte UTFDataFormatException UTFDataFormatException readUnsignedByte readUnsignedByte UTFDataFormatException UTFDataFormatException
Creates a NLS catalog for the given locale public static void relocalize try bundle Resource Bundle get Bundle bundle Name Locale get Default catch Missing Resource Exception e System out println Missing resource bundle Name replace properties for locale Locale get Default NON NLS 1 NON NLS 2 throw e  ResourceBundle getBundle bundleName getDefault MissingResourceException bundleName getDefault
public static void sort char list if list length 1 quick Sort list 0 list length 1  quickSort
Sorts an array of Comparable objects in place public static void sort Comparable objects if objects length 1 quick Sort objects 0 objects length 1  quickSort
quick Sort objects 0 objects length 1 public static void sort int list if list length 1 quick Sort list 0 list length 1  quickSort quickSort
Sorts an array of objects in place The given comparer compares pairs of items public static void sort Object objects Comparer comparer if objects length 1 quick Sort objects 0 objects length 1 comparer  quickSort
Sorts an array of objects in place using the sort order given for each item public static void sort Object objects int sort Order if objects length 1 quick Sort objects 0 objects length 1 sort Order  sortOrder quickSort sortOrder
Sorts an array of strings in place using quicksort public static void sort String strings if strings length 1 quick Sort strings 0 strings length 1  quickSort
Sorts an array of Comparable objects returning a new array with the sorted items The original array is left untouched public static Comparable sort Copy Comparable objects int len objects length Comparable copy new Comparable len System arraycopy objects 0 copy 0 len sort copy return copy  sortCopy
Sorts an array of Strings returning a new array with the sorted items The original array is left untouched public static Object sort Copy Object objects Comparer comparer int len objects length Object copy new Object len System arraycopy objects 0 copy 0 len sort copy comparer return copy  sortCopy
Sorts an array of Strings returning a new array with the sorted items The original array is left untouched public static String sort Copy String objects int len objects length String copy new String len System arraycopy objects 0 copy 0 len sort copy return copy  sortCopy
Sorts an array of strings in place using quicksort in reverse alphabetical order public static void sort Reverse Order String strings if strings length 1 quick Sort Reverse strings 0 strings length 1  sortReverseOrder quickSortReverse
Converts a String to char public static char to Char Arrays String a int len a length char result new char len for int i 0 i len i result i to Chars a i return result  toCharArrays toChars
Converts a String to char public static char to Chars String s int len s length char chars new char len s get Chars 0 len chars 0 return chars  toChars getChars
Converts a String to char where segments are separate by public static char to Compound Chars String s int len s length if len 0 return Char Operation NO CHAR CHAR int seg Count 1 for int off s index Of off 1 off s index Of off 1 seg Count char segs new char seg Count int start 0 for int i 0 i seg Count i int dot s index Of start int end dot 1 s length dot segs i new char end start s get Chars start end segs i 0 start end 1 return segs  toCompoundChars CharOperation NO_CHAR_CHAR segCount indexOf indexOf segCount segCount segCount indexOf getChars
Converts a char to String public static String to String char c return new String c  toString
Converts a char to String where segments are separated by public static String to String char c String Buffer sb new String Buffer for int i 0 max c length i max i if i 0 sb append sb append c i return sb to String  toString StringBuffer StringBuffer toString
Converts a char and a char to String where segments are separated by public static String to String char c char d if c null return new String d String Buffer sb new String Buffer for int i 0 max c length i max i sb append c i sb append sb append d return sb to String  toString StringBuffer StringBuffer toString
public static String type Parameter Signatures Abstract Method Declaration method Argument args method arguments if args null int length args length String signatures new String length for int i 0 i args length i Argument arg args i signatures i type Signature arg type return signatures return new String 0  typeParameterSignatures AbstractMethodDeclaration typeSignature
public static String type Signature Type Reference type char compound Name type get Type Name char type Name Char Operation concat With compound Name String signature Signature create Type Signature type Name false don t resolve int dimensions type dimensions if dimensions 0 signature Signature create Array Signature signature dimensions return signature  typeSignature TypeReference compoundName getTypeName typeName CharOperation concatWith compoundName createTypeSignature typeName createArraySignature
Asserts that the given method signature is valid public static void validate Method Signature String sig Assert is True is Valid Method Signature sig  validateMethodSignature isTrue isValidMethodSignature
Asserts that the given type signature is valid public static void validate Type Signature String sig boolean allow Void Assert is True is Valid Type Signature sig allow Void  validateTypeSignature allowVoid isTrue isValidTypeSignature allowVoid
Assert is True is Valid Type Signature sig allow Void public static void verbose String log verbose log System out  isTrue isValidTypeSignature allowVoid
public static synchronized void verbose String log Print Stream print Stream int start 0 do int end log index Of n start print Stream print Thread current Thread print Stream print NON NLS 1 print Stream print log substring start end 1 log length end 1 start end 1 while start 0 print Stream println  PrintStream printStream indexOf printStream currentThread printStream printStream printStream
Writes a string to the given output stream using UTF 8 encoding in a machine independent manner p First two bytes are written to the output stream as if by the code write Short code method giving the number of bytes to follow This value is the number of bytes actually written out not the length of the string Following the length each character of the string is output in sequence using the UTF 8 encoding for the character param str a string to be written return the number of bytes written to the stream exception IO Exception if an I O error occurs since JDK1 0 public static int writeUTF Output Stream out char str throws IO Exception int strlen str length int utflen 0 for int i 0 i strlen i int c str i if c 0x0001 c 0x007F utflen else if c 0x07FF utflen 3 else utflen 2 if utflen 65535 throw new UTF Data Format Exception out write utflen 8 0xFF out write utflen 0 0xFF if strlen utflen for int i 0 i strlen i out write str i else for int i 0 i strlen i int c str i if c 0x0001 c 0x007F out write c else if c 0x07FF out write 0xE0 c 12 0x0F out write 0x80 c 6 0x3F out write 0x80 c 0 0x3F else out write 0xC0 c 6 0x1F out write 0x80 c 0 0x3F return utflen 2 the number of bytes written to the stream  writeShort IOException OutputStream IOException UTFDataFormatException

private static final String XML VERSION xml version 1 0 encoding UTF 8 NON NLS 1 private static void append Escaped Char String Buffer buffer char c String replacement get Replacement c if replacement null buffer append buffer append replacement buffer append else buffer append c  XML_VERSION appendEscapedChar StringBuffer getReplacement
private static String get Escaped String s String Buffer result new String Buffer s length 10 for int i 0 i s length i append Escaped Char result s char At i return result to String  getEscaped StringBuffer StringBuffer appendEscapedChar charAt toString
private static String get Replacement char c Encode special XML characters into the equivalent character references These five are defined by default for all XML documents switch c case return lt NON NLS 1 case return gt NON NLS 1 case return quot NON NLS 1 case return apos NON NLS 1 case return amp NON NLS 1 return null  getReplacement
private int tab public XML Writer Writer writer super writer tab 0 println XML VERSION  XMLWriter XML_VERSION
println XML VERSION public void end Tag String name boolean insert Tab tab print Tag name null insert Tab true false  XML_VERSION endTag insertTab printTag insertTab
print Tag name null insert Tab true false private void print Tabulation for int i 0 i tab i super print t  printTag insertTab printTabulation
public void print Tag String name Hash Map parameters boolean insert Tab boolean insert New Line boolean close Tag String Buffer sb new String Buffer sb append NON NLS 1 sb append name if parameters null for Enumeration en Collections enumeration parameters key Set en has More Elements sb append NON NLS 1 String key String en next Element sb append key sb append NON NLS 1 sb append get Escaped String value Of parameters get key sb append NON NLS 1 if close Tag sb append NON NLS 1 else sb append NON NLS 1 if insert Tab print Tabulation if insert New Line println sb to String else print sb to String  printTag HashMap insertTab insertNewLine closeTag StringBuffer StringBuffer keySet hasMoreElements nextElement getEscaped valueOf closeTag insertTab printTabulation insertNewLine toString toString
public void start Tag String name boolean insert Tab print Tag name null insert Tab true false tab  startTag insertTab printTag insertTab

Constructs a new exception public Assertion Failed Exception  AssertionFailedException
Constructs a new exception with the given message public Assertion Failed Exception String detail super detail  AssertionFailedException
This class is not intended to be instantiated private Assert 
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown p As a general rule parameters passed to API methods must not be code null code unless b explicitly b allowed in the method s specification Similarly results returned from API methods are never code null code unless b explicitly b allowed in the method s specification Implementations are encouraged to make regular use of code Assert is Not Null code to ensure that code null code parameters are detected as early as possible p param object the value to test public static void is Not Null Object object succeed as quickly as possible if object null return is Not Null object NON NLS 1  isNotNull isNotNull isNotNull
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging p As a general rule parameters passed to API methods must not be code null code unless b explicitly b allowed in the method s specification Similarly results returned from API methods are never code null code unless b explicitly b allowed in the method s specification Implementations are encouraged to make regular use of code Assert is Not Null code to ensure that code null code parameters are detected as early as possible p param object the value to test param message the message to include in the exception public static void is Not Null Object object String message if object null throw new Assertion Failed Exception Refactoring Core Messages get String Assert null argument message NON NLS 1  isNotNull isNotNull AssertionFailedException RefactoringCoreMessages getString null_argument
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown param expression the outcome of the check return code true code if the check passes does not return if the check fails public static boolean is True boolean expression succeed as quickly as possible if expression return true return is True expression NON NLS 1  isTrue isTrue
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param expression the outcome of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails public static boolean is True boolean expression String message if expression throw new Assertion Failed Exception Refactoring Core Messages get String Assert assertion failed message NON NLS 1 return expression  isTrue AssertionFailedException RefactoringCoreMessages getString assertion_failed

public void set Settings Code Generation Settings settings settings create Comments create Comments settings use Keyword This use Keyword This settings import Order import Order settings import Threshold import Threshold settings tab Width tab Width  setSettings CodeGenerationSettings createComments createComments useKeywordThis useKeywordThis importOrder importOrder importThreshold importThreshold tabWidth tabWidth

Finds a type by its qualified type name dot separated param jproject The java project to search in param fully Qualified Name The fully qualified name type name with enclosing type names and package all separated by dots return The type found or null if not existing public static I Type find Type I Java Project jproject String fully Qualified Name throws Java Model Exception workaround for bug 22883 I Type type jproject find Type fully Qualified Name if type null return type I Package Fragment Root roots jproject get Package Fragment Roots for int i 0 i roots length i I Package Fragment Root root roots i type find Type root fully Qualified Name if type null type exists return type return null  fullyQualifiedName IType findType IJavaProject fullyQualifiedName JavaModelException IType findType fullyQualifiedName IPackageFragmentRoot getPackageFragmentRoots IPackageFragmentRoot findType fullyQualifiedName
Returns code true code if the given package fragment root is referenced This means it is own by a different project but is referenced by the root s parent Returns code false code if the given root doesn t have an underlying resource public static boolean is Referenced I Package Fragment Root root I Resource resource root get Resource if resource null I Project jar Project resource get Project I Project container root get Java Project get Project return container equals jar Project return false  isReferenced IPackageFragmentRoot IResource getResource IProject jarProject getProject IProject getJavaProject getProject jarProject
private static I Type find Type I Package Fragment Root root String fully Qualified Name throws Java Model Exception I Java Element children root get Children for int i 0 i children length i I Java Element element children i if element get Element Type I Java Element PACKAGE FRAGMENT I Package Fragment pack I Package Fragment element if fully Qualified Name starts With pack get Element Name continue I Type type find Type pack fully Qualified Name if type null type exists return type return null  IType findType IPackageFragmentRoot fullyQualifiedName JavaModelException IJavaElement getChildren IJavaElement getElementType IJavaElement PACKAGE_FRAGMENT IPackageFragment IPackageFragment fullyQualifiedName startsWith getElementName IType findType fullyQualifiedName
private static I Type find Type I Package Fragment pack String fully Qualified Name throws Java Model Exception I Compilation Unit cus pack get Compilation Units for int i 0 i cus length i I Compilation Unit unit cus i I Type type find Type unit fully Qualified Name if type null type exists return type return null  IType findType IPackageFragment fullyQualifiedName JavaModelException ICompilationUnit getCompilationUnits ICompilationUnit IType findType fullyQualifiedName
private static I Type find Type I Compilation Unit cu String fully Qualified Name throws Java Model Exception I Type types cu get All Types for int i 0 i types length i I Type type types i if get Fully Qualified Name type equals fully Qualified Name return type return null  IType findType ICompilationUnit fullyQualifiedName JavaModelException IType getAllTypes IType getFullyQualifiedName fullyQualifiedName
Finds a type by package and type name param jproject the java project to search in param pack The package name param type Qualified Name the type qualified name type name with enclosing type names separated by dots return the type found or null if not existing deprecated Use I Java Project find Type String String instead public static I Type find Type I Java Project jproject String pack String type Qualified Name throws Java Model Exception return jproject find Type pack type Qualified Name  typeQualifiedName IJavaProject findType IType findType IJavaProject typeQualifiedName JavaModelException findType typeQualifiedName
Finds a type container by container name The returned element will be of type code I Type code or a code I Package Fragment code code null code is returned if the type container could not be found param jproject The Java project defining the context to search param type Container Name A dot separarted name of the type container see get Type Container Name I Type public static I Java Element find Type Container I Java Project jproject String type Container Name throws Java Model Exception try to find it as type I Java Element result jproject find Type type Container Name if result null find it as package I Path path new Path type Container Name replace result jproject find Element path if result instanceof I Package Fragment result null return result  IType IPackageFragment typeContainerName getTypeContainerName IType IJavaElement findTypeContainer IJavaProject typeContainerName JavaModelException IJavaElement findType typeContainerName IPath typeContainerName findElement IPackageFragment
Finds a type in a compilation unit Typical usage is to find the corresponding type in a working copy param cu the compilation unit to search in param type Qualified Name the type qualified name type name with enclosing type names separated by dots return the type found or null if not existing public static I Type find Type In Compilation Unit I Compilation Unit cu String type Qualified Name throws Java Model Exception I Type types cu get All Types for int i 0 i types length i String curr Name get Type Qualified Name types i if type Qualified Name equals curr Name return types i return null  typeQualifiedName IType findTypeInCompilationUnit ICompilationUnit typeQualifiedName JavaModelException IType getAllTypes currName getTypeQualifiedName typeQualifiedName currName
Finds a a member in a compilation unit Typical usage is to find the corresponding member in a working copy param cu the compilation unit eg working copy to search in param member the member eg from the original return the member found or null if not existing public static I Member find Member In Compilation Unit I Compilation Unit cu I Member member I Java Element elements cu find Elements member if elements null elements length 0 return I Member elements 0 return null  IMember findMemberInCompilationUnit ICompilationUnit IMember IJavaElement findElements IMember
Returns the element of the given compilation unit which is equal to the given element Note that the given element usually has a parent different from the given compilation unit param cu the cu to search in param element the element to look for return an element of the given cu equal to the given element public static I Java Element find In Compilation Unit I Compilation Unit cu I Java Element element I Java Element elements cu find Elements element if elements null elements length 0 return elements 0 return null  IJavaElement findInCompilationUnit ICompilationUnit IJavaElement IJavaElement findElements
Returns the qualified type name of the given type using as separators This is a replace for I Type get Type Qualified Name which uses as separators As is also a valid character in an id this is ambiguous Java Core PR 1GCFUNT public static String get Type Qualified Name I Type type return type get Type Qualified Name  IType getTypeQualifiedName JavaCore getTypeQualifiedName IType getTypeQualifiedName
Returns the fully qualified name of the given type using as separators This is a replace for I Type get Fully Qualified Type Name which uses as separators As is also a valid character in an id this is ambiguous Java Core PR 1GCFUNT public static String get Fully Qualified Name I Type type return type get Fully Qualified Name  IType getFullyQualifiedTypeName JavaCore getFullyQualifiedName IType getFullyQualifiedName
Returns the fully qualified name of a type s container package name or enclosing type name public static String get Type Container Name I Type type I Type outer Type type get Declaring Type if outer Type null return outer Type get Fully Qualified Name else return type get Package Fragment get Element Name  getTypeContainerName IType IType outerType getDeclaringType outerType outerType getFullyQualifiedName getPackageFragment getElementName
Concatenates two names Uses a dot for separation Both strings can be empty or code null code public static String concatenate Name String name1 String name2 String Buffer buf new String Buffer if name1 null name1 length 0 buf append name1 if name2 null name2 length 0 if buf length 0 buf append buf append name2 return buf to String  concatenateName StringBuffer StringBuffer toString
Concatenates two names Uses a dot for separation Both strings can be empty or code null code public static String concatenate Name char name1 char name2 String Buffer buf new String Buffer if name1 null name1 length 0 buf append name1 if name2 null name2 length 0 if buf length 0 buf append buf append name2 return buf to String  concatenateName StringBuffer StringBuffer toString
Evaluates if a member possible from another package is visible from elements in a package param member The member to test the visibility for param pack The package in focus public static boolean is Visible I Member member I Package Fragment pack throws Java Model Exception int type member get Element Type if type I Java Element INITIALIZER type I Java Element METHOD member get Element Name starts With NON NLS 1 return false int otherflags member get Flags I Type declaring Type member get Declaring Type if Flags is Public otherflags declaring Type null declaring Type is Interface return true else if Flags is Private otherflags return false I Package Fragment otherpack I Package Fragment find Parent Of Kind member I Java Element PACKAGE FRAGMENT return pack null otherpack null is Same Package pack otherpack  isVisible IMember IPackageFragment JavaModelException getElementType IJavaElement IJavaElement getElementName startsWith getFlags IType declaringType getDeclaringType isPublic declaringType declaringType isInterface isPrivate IPackageFragment IPackageFragment findParentOfKind IJavaElement PACKAGE_FRAGMENT isSamePackage
Evaluates if a member in the focus element hierarchy is visible from elements in a package param member The member to test the visibility for param pack The package of the focus element focus public static boolean is Visible In Hierarchy I Member member I Package Fragment pack throws Java Model Exception int type member get Element Type if type I Java Element INITIALIZER type I Java Element METHOD member get Element Name starts With NON NLS 1 return false int otherflags member get Flags I Type declaring Type member get Declaring Type if Flags is Public otherflags Flags is Protected otherflags declaring Type null declaring Type is Interface return true else if Flags is Private otherflags return false I Package Fragment otherpack I Package Fragment find Parent Of Kind member I Java Element PACKAGE FRAGMENT return pack null pack equals otherpack  isVisibleInHierarchy IMember IPackageFragment JavaModelException getElementType IJavaElement IJavaElement getElementName startsWith getFlags IType declaringType getDeclaringType isPublic isProtected declaringType declaringType isInterface isPrivate IPackageFragment IPackageFragment findParentOfKind IJavaElement PACKAGE_FRAGMENT
Returns the package fragment root of code I Java Element code If the given element is already a package fragment root the element itself is returned public static I Package Fragment Root get Package Fragment Root I Java Element element return I Package Fragment Root element get Ancestor I Java Element PACKAGE FRAGMENT ROOT  IJavaElement IPackageFragmentRoot getPackageFragmentRoot IJavaElement IPackageFragmentRoot getAncestor IJavaElement PACKAGE_FRAGMENT_ROOT
Returns the parent of the supplied java element that conforms to the given parent type or code null code if such a parent doesn t exit deprecated Use element get Parent get Ancestor kind public static I Java Element find Parent Of Kind I Java Element element int kind if element null element get Parent null return element get Parent get Ancestor kind return null  getParent getAncestor IJavaElement findParentOfKind IJavaElement getParent getParent getAncestor
Finds a method in a type This searches for a method with the same name and signature Parameter types are only compared by the simple name no resolving for the fully qualified type name is done Constructors are only compared by parameters not the name param name The name of the method to find param param Types The type signatures of the parameters e g code Q String I code param is Constructor If the method is a constructor return The first found method or code null code if nothing found public static I Method find Method String name String param Types boolean is Constructor I Type type throws Java Model Exception return find Method name param Types is Constructor type get Methods  paramTypes QString isConstructor IMethod findMethod paramTypes isConstructor IType JavaModelException findMethod paramTypes isConstructor getMethods
Finds a method by name This searches for a method with a name and signature Parameter types are only compared by the simple name no resolving for the fully qualified type name is done Constructors are only compared by parameters not the name param name The name of the method to find param param Types The type signatures of the parameters e g code Q String I code param is Constructor If the method is a constructor param methods The methods to search in return The found method or code null code if nothing found public static I Method find Method String name String param Types boolean is Constructor I Method methods throws Java Model Exception for int i methods length 1 i 0 i if is Same Method Signature name param Types is Constructor methods i return methods i return null  paramTypes QString isConstructor IMethod findMethod paramTypes isConstructor IMethod JavaModelException isSameMethodSignature paramTypes isConstructor
Finds a method declararion in a type s hierarchy The search is top down so this returns the first declaration of the method in the hierarchy This searches for a method with a name and signature Parameter types are only compared by the simple name no resolving for the fully qualified type name is done Constructors are only compared by parameters not the name param type Searches in this type s supertypes param name The name of the method to find param param Types The type signatures of the parameters e g code Q String I code param is Constructor If the method is a constructor return The first method found or null if nothing found public static I Method find Method Declaration In Hierarchy I Type Hierarchy hierarchy I Type type String name String param Types boolean is Constructor throws Java Model Exception I Type super Types hierarchy get All Supertypes type for int i super Types length 1 i 0 i I Method first find Method name param Types is Constructor super Types i if first null Flags is Private first get Flags the order get All Supertypes does make assumptions of the order of inner elements search recursivly I Method res find Method Declaration In Hierarchy hierarchy first get Declaring Type name param Types is Constructor if res null return res return first return null  paramTypes QString isConstructor IMethod findMethodDeclarationInHierarchy ITypeHierarchy IType paramTypes isConstructor JavaModelException IType superTypes getAllSupertypes superTypes IMethod findMethod paramTypes isConstructor superTypes isPrivate getFlags getAllSupertypes IMethod findMethodDeclarationInHierarchy getDeclaringType paramTypes isConstructor
Finds a method implementation in a type s classhierarchy The search is bottom up so this returns the nearest overridden method Does not find methods in interfaces or abstract methods This searches for a method with a name and signature Parameter types are only compared by the simple name no resolving for the fully qualified type name is done Constructors are only compared by parameters not the name param type Type to search the superclasses param name The name of the method to find param param Types The type signatures of the parameters e g code Q String I code param is Constructor If the method is a constructor return The first method found or null if nothing found public static I Method find Method Implementation In Hierarchy I Type Hierarchy hierarchy I Type type String name String param Types boolean is Constructor throws Java Model Exception I Type super Types hierarchy get All Superclasses type for int i 0 i super Types length i I Method found find Method name param Types is Constructor super Types i if found null if Flags is Abstract found get Flags return null return found return null  paramTypes QString isConstructor IMethod findMethodImplementationInHierarchy ITypeHierarchy IType paramTypes isConstructor JavaModelException IType superTypes getAllSuperclasses superTypes IMethod findMethod paramTypes isConstructor superTypes isAbstract getFlags
private static I Method find Method In Hierarchy I Type Hierarchy hierarchy I Type type String name String param Types boolean is Constructor throws Java Model Exception I Method method find Method name param Types is Constructor type if method null return method I Type super Class hierarchy get Superclass type if super Class null I Method res find Method In Hierarchy hierarchy super Class name param Types is Constructor if res null return res if is Constructor I Type super Interfaces hierarchy get Super Interfaces type for int i 0 i super Interfaces length i I Method res find Method In Hierarchy hierarchy super Interfaces i name param Types false if res null return res return method  IMethod findMethodInHierarchy ITypeHierarchy IType paramTypes isConstructor JavaModelException IMethod findMethod paramTypes isConstructor IType superClass getSuperclass superClass IMethod findMethodInHierarchy superClass paramTypes isConstructor isConstructor IType superInterfaces getSuperInterfaces superInterfaces IMethod findMethodInHierarchy superInterfaces paramTypes
Finds the method that is defines declares the given method The search is bottom up so this returns the nearest defining declaring method param test Visibility If true the result is tested on visibility Null is returned if the method is not visible throws Java Model Exception public static I Method find Method Defininition I Type Hierarchy type Hierarchy I Type type String method Name String param Types boolean is Constructor boolean test Visibility throws Java Model Exception I Type super Class type Hierarchy get Superclass type if super Class null I Method res find Method In Hierarchy type Hierarchy super Class method Name param Types is Constructor if res null Flags is Private res get Flags if test Visibility is Visible In Hierarchy res type get Package Fragment return res if is Constructor I Type interfaces type Hierarchy get Super Interfaces type for int i 0 i interfaces length i I Method res find Method In Hierarchy type Hierarchy interfaces i method Name param Types false if res null return res methods from interfaces are always public and therefore visible return null  testVisibility JavaModelException IMethod findMethodDefininition ITypeHierarchy typeHierarchy IType methodName paramTypes isConstructor testVisibility JavaModelException IType superClass typeHierarchy getSuperclass superClass IMethod findMethodInHierarchy typeHierarchy superClass methodName paramTypes isConstructor isPrivate getFlags testVisibility isVisibleInHierarchy getPackageFragment isConstructor IType typeHierarchy getSuperInterfaces IMethod findMethodInHierarchy typeHierarchy methodName paramTypes
Tests if a method equals to the given signature Parameter types are only compared by the simple name no resolving for the fully qualified type name is done Constructors are only compared by parameters not the name param name Name of the method param param Types The type signatures of the parameters e g code Q String I code param is Constructor Specifies if the method is a constructor return Returns code true code if the method has the given name and parameter types and constructor state public static boolean is Same Method Signature String name String param Types boolean is Constructor I Method curr throws Java Model Exception if is Constructor name equals curr get Element Name if is Constructor curr is Constructor String curr Param Types curr get Parameter Types if param Types length curr Param Types length for int i 0 i param Types length i String t1 Signature get Simple Name Signature to String param Types i String t2 Signature get Simple Name Signature to String curr Param Types i if t1 equals t2 return false return true return false  paramTypes QString isConstructor isSameMethodSignature paramTypes isConstructor IMethod JavaModelException isConstructor getElementName isConstructor isConstructor currParamTypes getParameterTypes paramTypes currParamTypes paramTypes getSimpleName toString paramTypes getSimpleName toString currParamTypes
Tests if two code I Package Fragment code s represent the same logical java package return code true code if the package fragments names are equal public static boolean is Same Package I Package Fragment pack1 I Package Fragment pack2 return pack1 get Element Name equals pack2 get Element Name  IPackageFragment isSamePackage IPackageFragment IPackageFragment getElementName getElementName
Checks whether the given type has a valid main method or not public static boolean has Main Method I Type type throws Java Model Exception I Method methods type get Methods for int i 0 i methods length i if methods i is Main Method return true return false  hasMainMethod IType JavaModelException IMethod getMethods isMainMethod
Checks if the field is boolean public static boolean is Boolean I Field field throws Java Model Exception return field get Type Signature equals Signature SIG BOOLEAN  isBoolean IField JavaModelException getTypeSignature SIG_BOOLEAN
Returns true if the element is on the build path of the given project deprecated Use jproject is On Classpath element public static boolean is On Build Path I Java Project jproject I Java Element element return jproject is On Classpath element  isOnClasspath isOnBuildPath IJavaProject IJavaElement isOnClasspath
Tests if the given element is on the class path of its containing project Handles the case that the containing project isn t a Java project public static boolean is On Classpath I Java Element element I Java Project project element get Java Project if project exists return false return project is On Classpath element  isOnClasspath IJavaElement IJavaProject getJavaProject isOnClasspath
Resolves a type name in the context of the declaring type param ref Type Sig the type name in signature notation for example Q Vector this can also be an array type but dimensions will be ignored param declaring Type the context for resolving type where the reference was made in return returns the fully qualified type name or build in type name if a unresoved type couldn t be resolved null is returned public static String get Resolved Type Name String ref Type Sig I Type declaring Type throws Java Model Exception int array Count Signature get Array Count ref Type Sig char type ref Type Sig char At array Count if type Signature C UNRESOLVED int semi ref Type Sig index Of Signature C SEMICOLON array Count 1 if semi 1 throw new Illegal Argument Exception String name ref Type Sig substring array Count 1 semi String resolved Names declaring Type resolve Type name if resolved Names null resolved Names length 0 return Java Model Util concatenate Name resolved Names 0 0 resolved Names 0 1 return null else return Signature to String ref Type Sig substring array Count  refTypeSig QVector declaringType getResolvedTypeName refTypeSig IType declaringType JavaModelException arrayCount getArrayCount refTypeSig refTypeSig charAt arrayCount C_UNRESOLVED refTypeSig indexOf C_SEMICOLON arrayCount IllegalArgumentException refTypeSig arrayCount resolvedNames declaringType resolveType resolvedNames resolvedNames JavaModelUtil concatenateName resolvedNames resolvedNames toString refTypeSig arrayCount
Returns if a CU can be edited public static boolean is Editable I Compilation Unit cu I Resource resource to Original cu get Resource return resource exists resource is Read Only  isEditable ICompilationUnit IResource toOriginal getResource isReadOnly
Finds a qualified import for a type name public static I Import Declaration find Import I Compilation Unit cu String simple Name throws Java Model Exception I Import Declaration existing cu get Imports for int i 0 i existing length i String curr existing i get Element Name if curr ends With simple Name int dot Pos curr length simple Name length 1 if dot Pos 1 dot Pos 0 curr char At dot Pos return existing i return null  IImportDeclaration findImport ICompilationUnit simpleName JavaModelException IImportDeclaration getImports getElementName endsWith simpleName dotPos simpleName dotPos dotPos charAt dotPos
Returns the original if the given member If the member is already an original the input is returned The returned member might not exist public static I Member to Original I Member member if PRIMARY ONLY test Compilation Unit Owner to Original member get Compilation Unit NON NLS 1 if member instanceof I Method return to Original Method I Method member return I Member member get Primary Element I Compilation Unit cu member get Compilation Unit if cu null cu is Working Copy return I Member cu get Original member return member  IMember toOriginal IMember PRIMARY_ONLY testCompilationUnitOwner toOriginal getCompilationUnit IMethod toOriginalMethod IMethod IMember getPrimaryElement ICompilationUnit getCompilationUnit isWorkingCopy IMember getOriginal
private static I Method to Original Method I Method method I Compilation Unit cu method get Compilation Unit if cu null is Primary cu return method try use the workaround only if needed if method get Element Name equals method get Declaring Type get Element Name return I Method method get Primary Element I Type original Type I Type to Original method get Declaring Type I Method methods original Type find Methods method boolean is Constructor method is Constructor for int i 0 i methods length i if methods i is Constructor is Constructor return methods i return null catch Java Model Exception e return null  IMethod toOriginalMethod IMethod ICompilationUnit getCompilationUnit isPrimary getElementName getDeclaringType getElementName IMethod getPrimaryElement IType originalType IType toOriginal getDeclaringType IMethod originalType findMethods isConstructor isConstructor isConstructor isConstructor JavaModelException
Returns the original cu if the given cu is a working copy If the cu is already an original the input cu is returned The returned cu might not exist public static I Compilation Unit to Original I Compilation Unit cu if PRIMARY ONLY test Compilation Unit Owner to Original cu NON NLS 1 To stay compatible with old version returned null if cu is null if cu null return cu return cu get Primary  ICompilationUnit toOriginal ICompilationUnit PRIMARY_ONLY testCompilationUnitOwner toOriginal getPrimary
Returns the original element if the given element is a working copy If the cu is already an original the input element is returned The returned element might not exist public static I Java Element to Original I Java Element element return element get Primary Element  IJavaElement toOriginal IJavaElement getPrimaryElement
private static void test Compilation Unit Owner String method Name I Compilation Unit cu if cu null return if is Primary cu Java Plugin log Error Message method Name operating with non primary cu NON NLS 1  testCompilationUnitOwner methodName ICompilationUnit isPrimary JavaPlugin logErrorMessage methodName
deprecated Inline this method public static I Member to Working Copy I Member member return member  IMember toWorkingCopy IMember
deprecated Inline this method public static I Package Declaration to Working Copy I Package Declaration declaration return declaration  IPackageDeclaration toWorkingCopy IPackageDeclaration
deprecated Inline this method public static I Java Element to Working Copy I Java Element elem return elem  IJavaElement toWorkingCopy IJavaElement
deprecated Inline this method public static I Import Container to Working Copy I Import Container container return container  IImportContainer toWorkingCopy IImportContainer
deprecated Inline this method public static I Import Declaration to Working Copy I Import Declaration import Declaration return import Declaration  IImportDeclaration toWorkingCopy IImportDeclaration importDeclaration importDeclaration
deprecated Inline this method public static I Compilation Unit to Working Copy I Compilation Unit cu return cu  ICompilationUnit toWorkingCopy ICompilationUnit
Returns true if a cu is a primary cu original or shared working copy public static boolean is Primary I Compilation Unit cu return cu get Owner null  isPrimary ICompilationUnit getOwner
public static boolean filter Not Present Exception Core Exception exception if exception instanceof Java Model Exception return true Java Model Exception je Java Model Exception exception if je is Does Not Exist return true I Java Element elements je get Java Model Status get Elements for int i 0 i elements length i I Java Element element elements i I Compilation Unit unit I Compilation Unit element get Ancestor I Java Element COMPILATION UNIT if unit null return true if unit is Working Copy return true return false  filterNotPresentException CoreException JavaModelException JavaModelException JavaModelException isDoesNotExist IJavaElement getJavaModelStatus getElements IJavaElement ICompilationUnit ICompilationUnit getAncestor IJavaElement COMPILATION_UNIT isWorkingCopy
public static I Type get All Super Types I Type type I Progress Monitor pm throws Java Model Exception workaround for 23656 Set types new Hash Set Arrays as List type new Supertype Hierarchy pm get All Supertypes type I Type objekt type get Java Project find Type java lang Object NON NLS 1 if objekt null types add objekt return I Type types to Array new I Type types size  IType getAllSuperTypes IType IProgressMonitor JavaModelException HashSet asList newSupertypeHierarchy getAllSupertypes IType getJavaProject findType IType toArray IType
public static boolean is Excluded Path I Path resource Path I Path exclusion Patterns char path resource Path to String to Char Array for int i 0 length exclusion Patterns length i length i char pattern exclusion Patterns i to String to Char Array if Char Operation path Match pattern path true return true return false  isExcludedPath IPath resourcePath IPath exclusionPatterns resourcePath toString toCharArray exclusionPatterns exclusionPatterns toString toCharArray CharOperation pathMatch
public final static boolean is Excluded I Path resource Path char exclusion Patterns if exclusion Patterns null return false char path resource Path to String to Char Array for int i 0 length exclusion Patterns length i length i if Char Operation path Match exclusion Patterns i path true return true return false  isExcluded IPath resourcePath exclusionPatterns exclusionPatterns resourcePath toString toCharArray exclusionPatterns CharOperation pathMatch exclusionPatterns
Force a reconcile of a compilation unit param unit public static void reconcile I Compilation Unit unit throws Java Model Exception synchronized unit unit reconcile  ICompilationUnit JavaModelException
Return true if JRE 1 5 in enabled public static boolean isJDTCore 1 5 if fgIsJDTCore 1 5 null fgIsJDTCore 1 5 new Boolean Java Core get Default Options contains Key org eclipse jdt core compiler problem unsafe Type Operation NON NLS 1 return fgIsJDTCore 1 5 boolean Value  isJDTCore_1_5 fgIsJDTCore_1_5 fgIsJDTCore_1_5 JavaCore getDefaultOptions containsKey unsafeTypeOperation fgIsJDTCore_1_5 booleanValue
Helper method that tests if an classpath entry can be found in a container code null code is returned if the entry can not be found or if the container does not allows the configuration of source attachments param jproject The container s parent project param container Path The path of the container param lib Path The path of the library to be found return I Classpath Entry A classpath entry from the container of code null code if the container can not be modified public static I Classpath Entry get Classpath Entry To Edit I Java Project jproject I Path container Path I Path lib Path throws Java Model Exception I Classpath Container container Java Core get Classpath Container container Path jproject Classpath Container Initializer initializer Java Core get Classpath Container Initializer container Path segment 0 if container null initializer null initializer can Update Classpath Container container Path jproject I Classpath Entry entries container get Classpath Entries for int i 0 i entries length i I Classpath Entry curr entries i I Classpath Entry resolved Java Core get Resolved Classpath Entry curr if resolved null lib Path equals resolved get Path return curr return the real entry return null attachment not possible  containerPath libPath IClasspathEntry IClasspathEntry getClasspathEntryToEdit IJavaProject IPath containerPath IPath libPath JavaModelException IClasspathContainer JavaCore getClasspathContainer containerPath ClasspathContainerInitializer JavaCore getClasspathContainerInitializer containerPath canUpdateClasspathContainer containerPath IClasspathEntry getClasspathEntries IClasspathEntry IClasspathEntry JavaCore getResolvedClasspathEntry libPath getPath

protected Type Info String pkg String name char enclosing Types boolean is Interface f Package pkg f Name name f Is Interface is Interface f Enclosing Names enclosing Types  TypeInfo enclosingTypes isInterface fPackage fName fIsInterface isInterface fEnclosingNames enclosingTypes
Returns this type info s kind encoded as an integer return the type info s kind 
Returns the path reported by the tt I Type Name Requestor tt return the path of the type info  ITypeNameRequestor
Returns the tt I Java Element tt this type info stands for param scope the scope used to resolve the tt I Java Element tt return the tt I Java Element tt this info stands for throws Java Model Exception if an error occurs while access the Java model  IJavaElement IJavaElement IJavaElement JavaModelException
Returns the package fragment root path of this type info return the package fragment root as an tt I Path tt  IPath
Returns the type name return the info s type name public String get Type Name return f Name  getTypeName fName
Returns the package name return the info s package name public String get Package Name return f Package  getPackageName fPackage
Returns true iff the type info describes an interface public boolean is Interface return f Is Interface  isInterface fIsInterface
Returns true if the info is enclosed in the given scope public boolean is Enclosed I Java Search Scope scope return scope encloses get Path  isEnclosed IJavaSearchScope getPath
Gets the enclosing name dot separated public String get Enclosing Name String Buffer buf new String Buffer if f Enclosing Names null for int i 0 i f Enclosing Names length i if i 0 buf append buf append f Enclosing Names i return buf to String  getEnclosingName StringBuffer StringBuffer fEnclosingNames fEnclosingNames fEnclosingNames toString
Gets the type qualified name Includes enclosing type names but not package name Identifiers are separated by dots public String get Type Qualified Name if f Enclosing Names null f Enclosing Names length 0 String Buffer buf new String Buffer for int i 0 i f Enclosing Names length i buf append f Enclosing Names i buf append buf append f Name return buf to String return f Name  getTypeQualifiedName fEnclosingNames fEnclosingNames StringBuffer StringBuffer fEnclosingNames fEnclosingNames fName toString fName
Gets the fully qualified type name Includes enclosing type names and package All identifiers are separated by dots public String get Fully Qualified Name String Buffer buf new String Buffer if f Package length 0 buf append f Package buf append if f Enclosing Names null for int i 0 i f Enclosing Names length i buf append f Enclosing Names i buf append buf append f Name return buf to String  getFullyQualifiedName StringBuffer StringBuffer fPackage fPackage fEnclosingNames fEnclosingNames fEnclosingNames fName toString
Gets the fully qualified type container name Package name or enclosing type name with package name All identifiers are separated by dots public String get Type Container Name if f Enclosing Names null f Enclosing Names length 0 String Buffer buf new String Buffer if f Package length 0 buf append f Package for int i 0 i f Enclosing Names length i if buf length 0 buf append buf append f Enclosing Names i return buf to String return f Package  getTypeContainerName fEnclosingNames fEnclosingNames StringBuffer StringBuffer fPackage fPackage fEnclosingNames fEnclosingNames toString fPackage
Resolves the type in a scope if was searched for The parent project of JAR files is the first project found in scope Returns null if the type could not be resolved public I Type resolve Type I Java Search Scope scope throws Java Model Exception I Java Element elem get Java Element scope if elem instanceof I Compilation Unit return Java Model Util find Type In Compilation Unit I Compilation Unit elem get Type Qualified Name else if elem instanceof I Class File return I Class File elem get Type return null  IType resolveType IJavaSearchScope JavaModelException IJavaElement getJavaElement ICompilationUnit JavaModelUtil findTypeInCompilationUnit ICompilationUnit getTypeQualifiedName IClassFile IClassFile getType
public String to String String Buffer buf new String Buffer buf append path NON NLS 1 buf append get Path buf append pkg NON NLS 1 buf append f Package buf append enclosing NON NLS 1 buf append get Enclosing Name buf append name NON NLS 1 buf append f Name return buf to String  toString StringBuffer StringBuffer getPath fPackage getEnclosingName fName toString

protected static final String fg Expired Enabled Attributes new String EXPIRED ENABLED public Java Breakpoint f Requests By Target new Hash Map 1 f Filtered Threads By Target new Hash Map 1  fgExpiredEnabledAttributes JavaBreakpoint fRequestsByTarget HashMap fFilteredThreadsByTarget HashMap
see I Breakpoint get Model Identifier public String get Model Identifier return JDI Debug Model get Plugin Identifier  IBreakpoint getModelIdentifier getModelIdentifier JDIDebugModel getPluginIdentifier
see I Breakpoint set Marker I Marker public void set Marker I Marker marker throws Core Exception super set Marker marker configure At Startup  IBreakpoint setMarker IMarker setMarker IMarker CoreException setMarker configureAtStartup
Add this breakpoint to the breakpoint manager or sets it as unregistered protected void register boolean register throws Core Exception if register Debug Plugin get Default get Breakpoint Manager add Breakpoint this else set Registered false  CoreException DebugPlugin getDefault getBreakpointManager addBreakpoint setRegistered
Add the given event request to the given debug target If the request is the breakpoint request associated with this breakpoint increment the install count protected void register Request Event Request request JDI Debug Target target throws Core Exception if request null return List reqs get Requests target if reqs is Empty f Requests By Target put target reqs reqs add request target addJDI Event Listener this request update the install attibute on the breakpoint if request instanceof Class Prepare Request increment Install Count notification fire Installed target  registerRequest EventRequest JDIDebugTarget CoreException getRequests isEmpty fRequestsByTarget addJDIEventListener ClassPrepareRequest incrementInstallCount fireInstalled
Returns a String corresponding to the reference type name to the top enclosing type in which this breakpoint is located or code null code if no reference type could be found protected String get Enclosing Reference Type Name throws Core Exception String name get Type Name int index name index Of if index 1 return name else return name substring 0 index  getEnclosingReferenceTypeName CoreException getTypeName indexOf
Returns the requests that this breakpoint has installed in the given target protected Array List get Requests JDI Debug Target target Array List list Array List f Requests By Target get target if list null list new Array List 2 return list  ArrayList getRequests JDIDebugTarget ArrayList ArrayList fRequestsByTarget ArrayList
Remove the given request from the given target If the request is the breakpoint request associated with this breakpoint decrement the install count protected void deregister Request Event Request request JDI Debug Target target throws Core Exception target removeJDI Event Listener this request A request may be getting deregistered because the breakpoint has been deleted It may be that this occurred because of a marker deletion Don t try updating the marker decrementing the install count if it no longer exists if request instanceof Class Prepare Request get Marker exists decrement Install Count  deregisterRequest EventRequest JDIDebugTarget CoreException removeJDIEventListener ClassPrepareRequest getMarker decrementInstallCount
see IJDI Event Listener handle Event Event JDI Debug Target public boolean handle Event Event event JDI Debug Target target if event instanceof Class Prepare Event return handle Class Prepare Event Class Prepare Event event target else Thread Reference thread Ref Locatable Event event thread JDI Thread thread target find Thread thread Ref if thread null thread is Ignoring Breakpoints return true return handle Breakpoint Event event target thread  IJDIEventListener handleEvent JDIDebugTarget handleEvent JDIDebugTarget ClassPrepareEvent handleClassPrepareEvent ClassPrepareEvent ThreadReference threadRef LocatableEvent JDIThread findThread threadRef isIgnoringBreakpoints handleBreakpointEvent
Handle the given class prepare event which was generated by the class prepare event installed in the given target by this breakpoint If the class which has been loaded is a class in which this breakpoint should install create a breakpoint request for that class public boolean handle Class Prepare Event Class Prepare Event event JDI Debug Target target try if installable Reference Type event reference Type target Don t install this breakpoint in an inappropriate type return true create Request target event reference Type catch Core Exception e JDI Debug Plugin log e return true  handleClassPrepareEvent ClassPrepareEvent JDIDebugTarget installableReferenceType referenceType createRequest referenceType CoreException JDIDebugPlugin
see IJDI Event Listener handle Event Event JDI Debug Target Handle the given event which was generated by the breakpoint request installed in the given target by this breakpoint public boolean handle Breakpoint Event Event event JDI Debug Target target JDI Thread thread expire Hit Count event return suspend thread Resume if suspend fails  IJDIEventListener handleEvent JDIDebugTarget handleBreakpointEvent JDIDebugTarget JDIThread expireHitCount
Deletegates to the given thread to suspend and returns whether the thread suspended It is possible that the thread will not suspend as directed by a Java breakpoint listener see I Java Breakpoint Listener breakpoint Hit I Java Thread I Java Breakpoint protected boolean suspend JDI Thread thread return thread handle Suspend For Breakpoint this true  IJavaBreakpointListener breakpointHit IJavaThread IJavaBreakpoint JDIThread handleSuspendForBreakpoint
Returns whether the given reference type is appropriate for this breakpoint to be installed in the given target Query registered breakpoint listeners protected boolean installable Reference Type Reference Type type JDI Debug Target target throws Core Exception String installable Type get Type Name String queried Type type name if installable Type null queried Type null return false TODO need to decide if we should create breakpoint with 1 5 type name and remove this substring remove the generic arguments from queried Type int index queried Type index Of if index 1 queried Type queried Type substring 0 index if installable Type equals queried Type return query Install Listeners target type index queried Type index Of 0 if index 1 return false if installable Type region Matches 0 queried Type 0 index return query Install Listeners target type return false  installableReferenceType ReferenceType JDIDebugTarget CoreException installableType getTypeName queriedType installableType queriedType queriedType queriedType indexOf queriedType queriedType installableType queriedType queryInstallListeners queriedType indexOf installableType regionMatches queriedType queryInstallListeners
Called when a breakpoint event is encountered Expires the hit count in the event s request and updates the marker param event the event whose request should have its hit count expired or code null code to only update the breakpoint marker protected void expire Hit Count Event event Integer request Count null Event Request request null if event null request event request request Count Integer request get Property HIT COUNT if request Count null if request null request put Property EXPIRED Boolean TRUE try set Attributes fg Expired Enabled Attributes new Object Boolean TRUE Boolean FALSE make a note that we auto disabled this breakpoint catch Core Exception ce JDI Debug Plugin log ce  expireHitCount requestCount EventRequest requestCount getProperty HIT_COUNT requestCount putProperty setAttributes fgExpiredEnabledAttributes CoreException JDIDebugPlugin
Returns whether this breakpoint should be skipped Breakpoints are skipped if the breakpoint manager is disabled and the breakpoint is registered with the manager return whether this breakpoint should be skipped public boolean should Skip Breakpoint throws Core Exception return is Registered Debug Plugin get Default get Breakpoint Manager is Enabled  shouldSkipBreakpoint CoreException isRegistered DebugPlugin getDefault getBreakpointManager isEnabled
Attempts to create a breakpoint request for this breakpoint in the given reference type in the given target return Whether a request was created protected boolean create Request JDI Debug Target target Reference Type type throws Core Exception if should Skip Breakpoint return false Event Request request new Request target type if request null return false f Installed Type Name type name register Request request target return true  createRequest JDIDebugTarget ReferenceType CoreException shouldSkipBreakpoint EventRequest newRequest fInstalledTypeName registerRequest
Configure a breakpoint request with common properties ul li code JAVA BREAKPOINT PROPERTY code li li code HIT COUNT code li li code EXPIRED code li ul and sets the suspend policy of the request to suspend the event thread protected void configure Request Event Request request JDI Debug Target target throws Core Exception request set Suspend Policy getJDI Suspend Policy request put Property JAVA BREAKPOINT PROPERTY this configure Request Thread Filter request target configure Request Hit Count request configure Instance Filters request target Important only enable a request after it has been configured update Enabled State request  JAVA_BREAKPOINT_PROPERTY HIT_COUNT configureRequest EventRequest JDIDebugTarget CoreException setSuspendPolicy getJDISuspendPolicy putProperty JAVA_BREAKPOINT_PROPERTY configureRequestThreadFilter configureRequestHitCount configureInstanceFilters updateEnabledState
Adds an instance filter to the given request Since the implementation is request specific subclasses must override param request param object instance filter 
Configure the thread filter property of the given request protected void configure Request Thread Filter Event Request request JDI Debug Target target I Java Thread thread I Java Thread f Filtered Threads By Target get target if thread null thread instanceof JDI Thread return set Request Thread Filter request JDI Thread thread get Underlying Thread  configureRequestThreadFilter EventRequest JDIDebugTarget IJavaThread IJavaThread fFilteredThreadsByTarget JDIThread setRequestThreadFilter JDIThread getUnderlyingThread
Configure the given request s hit count protected void configure Request Hit Count Event Request request throws Core Exception int hit Count get Hit Count if hit Count 0 request add Count Filter hit Count request put Property HIT COUNT new Integer hit Count request put Property EXPIRED Boolean FALSE  configureRequestHitCount EventRequest CoreException hitCount getHitCount hitCount addCountFilter hitCount putProperty HIT_COUNT hitCount putProperty
protected void configure Instance Filters Event Request request JDI Debug Target target if f Instance Filters null f Instance Filters is Empty Iterator iter f Instance Filters iterator while iter has Next I Java Object object I Java Object iter next if object get Debug Target equals target add Instance Filter request JDI Object Value object get Underlying Object  configureInstanceFilters EventRequest JDIDebugTarget fInstanceFilters fInstanceFilters isEmpty fInstanceFilters hasNext IJavaObject IJavaObject getDebugTarget addInstanceFilter JDIObjectValue getUnderlyingObject
Creates and returns a breakpoint request for this breakpoint which has been installed in the given reference type and registered in the given target return the event request which was created or code null code if the request creation failed 
Add this breakpoint to the given target After it has been added to the given target this breakpoint will suspend execution of that target as appropriate public void add To Target JDI Debug Target target throws Core Exception pre notification fire Adding target create event requests create Requests target  addToTarget JDIDebugTarget CoreException fireAdding createRequests
Creates event requests for the given target protected void create Requests JDI Debug Target target throws Core Exception if target is Terminated should Skip Breakpoint return String reference Type Name get Type Name String enclosing Type Name get Enclosing Reference Type Name if reference Type Name null enclosing Type Name null return create request to listen to class loads if reference Type Name index Of 1 register Request target create Class Prepare Request enclosing Type Name target register to ensure we hear about local and anonymous inner classes register Request target create Class Prepare Request enclosing Type Name target NON NLS 1 else register Request target create Class Prepare Request reference Type Name target register to ensure we hear about local and anonymous inner classes register Request target create Class Prepare Request enclosing Type Name reference Type Name target NON NLS 1 create breakpoint requests for each class currently loaded List classes target jdi Classes By Name reference Type Name if classes is Empty enclosing Type Name equals reference Type Name return boolean success false Iterator iter classes iterator while iter has Next Reference Type type Reference Type iter next if create Request target type success true if success add To Target For Local Type target enclosing Type Name  createRequests JDIDebugTarget CoreException isTerminated shouldSkipBreakpoint referenceTypeName getTypeName enclosingTypeName getEnclosingReferenceTypeName referenceTypeName enclosingTypeName referenceTypeName indexOf registerRequest createClassPrepareRequest enclosingTypeName registerRequest createClassPrepareRequest enclosingTypeName registerRequest createClassPrepareRequest referenceTypeName registerRequest createClassPrepareRequest enclosingTypeName referenceTypeName jdiClassesByName referenceTypeName isEmpty enclosingTypeName referenceTypeName hasNext ReferenceType ReferenceType createRequest addToTargetForLocalType enclosingTypeName
Local types types defined in methods are handled specially due to the different types that the local type is associated with as well as the performance problems of using Reference Type nested Types From the Java model perspective a local type is defined within a method of a type Therefore the type of a breakpoint placed in a local type is the type that encloses the method where the local type was defined The local type is enclosed within the top level type according to the VM So if normal attempts to create a request when a breakpoint is being added to a target fail we must be dealing with a local type and therefore resort to looking up all of the nested types of the top level enclosing type protected void add To Target For Local Type JDI Debug Target target String enclosing Type Name throws Core Exception List classes target jdi Classes By Name enclosing Type Name if classes is Empty Iterator iter classes iterator while iter has Next Reference Type type Reference Type iter next Iterator nested Types type nested Types iterator while nested Types has Next Reference Type nested Type Reference Type nested Types next if create Request target nested Type break  ReferenceType nestedTypes addToTargetForLocalType JDIDebugTarget enclosingTypeName CoreException jdiClassesByName enclosingTypeName isEmpty hasNext ReferenceType ReferenceType nestedTypes nestedTypes nestedTypes hasNext ReferenceType nestedType ReferenceType nestedTypes createRequest nestedType
Returns the JDI suspend policy that corresponds to this breakpoint s suspend policy return the JDI suspend policy that corresponds to this breakpoint s suspend policy exception Core Exception if unable to access this breakpoint s suspend policy setting protected int getJDI Suspend Policy throws Core Exception int breakpoint Policy get Suspend Policy if breakpoint Policy I Java Breakpoint SUSPEND THREAD return Event Request SUSPEND EVENT THREAD return Event Request SUSPEND ALL  CoreException getJDISuspendPolicy CoreException breakpointPolicy getSuspendPolicy breakpointPolicy IJavaBreakpoint SUSPEND_THREAD EventRequest SUSPEND_EVENT_THREAD EventRequest SUSPEND_ALL
Returns whether the hit Count of this breakpoint is equal to the hit Count of the associated request protected boolean has Hit Count Changed Event Request request throws Core Exception int hit Count get Hit Count Integer request Count Integer request get Property HIT COUNT int old Count 1 if request Count null old Count request Count int Value return hit Count old Count  hitCount hitCount hasHitCountChanged EventRequest CoreException hitCount getHitCount requestCount getProperty HIT_COUNT oldCount requestCount oldCount requestCount intValue hitCount oldCount
Removes this breakpoint from the given tagret public void remove From Target final JDI Debug Target target throws Core Exception remove Requests target Object removed f Filtered Threads By Target remove target boolean changed removed null boolean marker Exists marker Exists if marker Exists marker Exists get Install Count 0 f Installed Type Name null remove instance filters if f Instance Filters null f Instance Filters is Empty for int i 0 i f Instance Filters size i I Java Object object I Java Object f Instance Filters get i if object get Debug Target equals target f Instance Filters remove i changed true fire change notification if required if changed fire Changed notification fire Removed target  removeFromTarget JDIDebugTarget CoreException removeRequests fFilteredThreadsByTarget markerExists markerExists markerExists markerExists getInstallCount fInstalledTypeName fInstanceFilters fInstanceFilters isEmpty fInstanceFilters IJavaObject IJavaObject fInstanceFilters getDebugTarget fInstanceFilters fireChanged fireRemoved
Remove all requests that this breakpoint has installed in the given debug target protected void remove Requests final JDI Debug Target target throws Core Exception removing was previously done is a workspace runnable but that is not possible since it can be a resouce callback marker deletion that causes a breakpoint to be removed Array List requests Array List get Requests target clone Iterate over a copy of the requests since this list of requests can be changed in other threads which would cause an Concurrent Modification Exception Iterator iter requests iterator Event Request req while iter has Next req Event Request iter next try if target is Available is Expired req cannot delete an expired request Event Request Manager manager target get Event Request Manager if manager null manager delete Event Request req disable remove catch VM Disconnected Exception e if target is Available JDI Debug Plugin log e catch Runtime Exception e JDI Debug Plugin log e finally deregister Request req target f Requests By Target remove target  removeRequests JDIDebugTarget CoreException ArrayList ArrayList getRequests ConcurrentModificationException EventRequest hasNext EventRequest isAvailable isExpired EventRequestManager getEventRequestManager deleteEventRequest VMDisconnectedException isAvailable JDIDebugPlugin RuntimeException JDIDebugPlugin deregisterRequest fRequestsByTarget
Update the enabled state of the given request in the given target which is associated with this breakpoint Set the enabled state of the request to the enabled state of this breakpoint protected void update Enabled State Event Request request throws Core Exception internal Update Enabled State request is Enabled  updateEnabledState EventRequest CoreException internalUpdateEnabledState isEnabled
Set the enabled state of the given request to the given value also taking into account instance filters protected void internal Update Enabled State Event Request request boolean enabled if request is Enabled enabled change the enabled state try if the request has expired do not disable Breakpoint Requests that have expired cannot be deleted if is Expired request request set Enabled enabled catch VM Disconnected Exception e catch Runtime Exception e JDI Debug Plugin log e  internalUpdateEnabledState EventRequest isEnabled BreakpointRequests isExpired setEnabled VMDisconnectedException RuntimeException JDIDebugPlugin
Returns whether this breakpoint has expired public boolean is Expired throws Core Exception return ensure Marker get Attribute EXPIRED false  isExpired CoreException ensureMarker getAttribute
Returns whether the given request is expired protected boolean is Expired Event Request request Boolean request Expired Boolean request get Property EXPIRED if request Expired null return false return request Expired boolean Value  isExpired EventRequest requestExpired getProperty requestExpired requestExpired booleanValue
see I Java Breakpoint is Installed public boolean is Installed throws Core Exception return ensure Marker get Attribute INSTALL COUNT 0 0  IJavaBreakpoint isInstalled isInstalled CoreException ensureMarker getAttribute INSTALL_COUNT
Increments the install count of this breakpoint protected void increment Install Count throws Core Exception int count get Install Count set Attribute INSTALL COUNT count 1  incrementInstallCount CoreException getInstallCount setAttribute INSTALL_COUNT
Returns the code INSTALL COUNT code attribute of this breakpoint or 0 if the attribute is not set public int get Install Count throws Core Exception return ensure Marker get Attribute INSTALL COUNT 0  INSTALL_COUNT getInstallCount CoreException ensureMarker getAttribute INSTALL_COUNT
Decrements the install count of this breakpoint protected void decrement Install Count throws Core Exception int count get Install Count if count 0 set Attribute INSTALL COUNT count 1 if count 1 if is Expired if breakpoint was auto disabled re enable it set Attributes fg Expired Enabled Attributes new Object Boolean FALSE Boolean TRUE  decrementInstallCount CoreException getInstallCount setAttribute INSTALL_COUNT isExpired setAttributes fgExpiredEnabledAttributes
Sets the type name in which to install this breakpoint protected void set Type Name String type Name throws Core Exception set Attribute TYPE NAME type Name  setTypeName typeName CoreException setAttribute TYPE_NAME typeName
see I Java Breakpoint get Type Name public String get Type Name throws Core Exception if f Installed Type Name null return ensure Marker get Attribute TYPE NAME null else return f Installed Type Name  IJavaBreakpoint getTypeName getTypeName CoreException fInstalledTypeName ensureMarker getAttribute TYPE_NAME fInstalledTypeName
Execute the given workspace runnable protected void run I Scheduling Rule rule I Workspace Runnable wr throws Debug Exception try Resources Plugin get Workspace run wr rule 0 null catch Core Exception e throw new Debug Exception e get Status  ISchedulingRule IWorkspaceRunnable DebugException ResourcesPlugin getWorkspace CoreException DebugException getStatus
Resets the install count attribute on this breakpoint s marker to 0 Resets the expired attribute on all breakpoint markers to code false code Resets the enabled attribute on the breakpoint marker to code true code If a workbench crashes the attributes could have been persisted in an incorrect state private void configure At Startup throws Core Exception List attributes null List values null if is Installed attributes new Array List 3 values new Array List 3 attributes add INSTALL COUNT values add new Integer 0 if is Expired if attributes null attributes new Array List 3 values new Array List 3 if breakpoint was auto disabled re enable it attributes add EXPIRED values add Boolean FALSE attributes add ENABLED values add Boolean TRUE if attributes null String str Attributes new String attributes size set Attributes String attributes to Array str Attributes values to Array  configureAtStartup CoreException isInstalled ArrayList ArrayList INSTALL_COUNT isExpired ArrayList ArrayList strAttributes setAttributes toArray strAttributes toArray
see I Java Breakpoint get Hit Count public int get Hit Count throws Core Exception return ensure Marker get Attribute HIT COUNT 1  IJavaBreakpoint getHitCount getHitCount CoreException ensureMarker getAttribute HIT_COUNT
see I Java Breakpoint set Hit Count int public void set Hit Count int count throws Core Exception if get Hit Count count if is Enabled count 1 set Attributes new String ENABLED HIT COUNT EXPIRED new Object Boolean TRUE new Integer count Boolean FALSE else set Attributes new String HIT COUNT EXPIRED new Object new Integer count Boolean FALSE recreate  IJavaBreakpoint setHitCount setHitCount CoreException getHitCount isEnabled setAttributes HIT_COUNT setAttributes HIT_COUNT
protected String get Marker Message int hit Count int suspend Policy String Buffer buff new String Buffer if hit Count 0 buff append Message Format format JDI Debug Breakpoint Messages get String Java Breakpoint   Hit Count   0  1 new Object Integer to String hit Count NON NLS 1 buff append String suspend Policy String if suspend Policy I Java Breakpoint SUSPEND THREAD suspend Policy String JDI Debug Breakpoint Messages get String Java Breakpoint suspend policy  thread  1 NON NLS 1 else suspend Policy String JDI Debug Breakpoint Messages get String Java Breakpoint suspend policy  VM  2 NON NLS 1 buff append suspend Policy String return buff to String  getMarkerMessage hitCount suspendPolicy StringBuffer StringBuffer hitCount MessageFormat JDIDebugBreakpointMessages getString JavaBreakpoint _ Hit_Count__ _1 toString hitCount suspendPolicyString suspendPolicy IJavaBreakpoint SUSPEND_THREAD suspendPolicyString JDIDebugBreakpointMessages getString JavaBreakpoint suspend_policy__thread _1 suspendPolicyString JDIDebugBreakpointMessages getString JavaBreakpoint suspend_policy__VM _2 suspendPolicyString toString
Sets whether this breakpoint s hit count has expired public void set Expired boolean expired throws Core Exception set Attribute EXPIRED expired  setExpired CoreException setAttribute
see I Java Breakpoint get Suspend Policy public int get Suspend Policy throws Core Exception return ensure Marker get Attribute SUSPEND POLICY I Java Breakpoint SUSPEND THREAD  IJavaBreakpoint getSuspendPolicy getSuspendPolicy CoreException ensureMarker getAttribute SUSPEND_POLICY IJavaBreakpoint SUSPEND_THREAD
see I Java Breakpoint set Suspend Policy int public void set Suspend Policy int suspend Policy throws Core Exception if get Suspend Policy suspend Policy set Attributes new String SUSPEND POLICY new Object new Integer suspend Policy recreate  IJavaBreakpoint setSuspendPolicy setSuspendPolicy suspendPolicy CoreException getSuspendPolicy suspendPolicy setAttributes SUSPEND_POLICY suspendPolicy
Notifies listeners this breakpoint is to be added to the given target param target debug target protected void fire Adding I Java Debug Target target JDI Debug Plugin get Default fire Breakpoint Adding target this  fireAdding IJavaDebugTarget JDIDebugPlugin getDefault fireBreakpointAdding
Notifies listeners this breakpoint has been remvoed from the given target param target debug target protected void fire Removed I Java Debug Target target JDI Debug Plugin get Default fire Breakpoint Removed target this set Installed In target false  fireRemoved IJavaDebugTarget JDIDebugPlugin getDefault fireBreakpointRemoved setInstalledIn
Notifies listeners this breakpoint has been installed in the given target param target debug target protected void fire Installed I Java Debug Target target if is Installed In target JDI Debug Plugin get Default fire Breakpoint Installed target this set Installed In target true  fireInstalled IJavaDebugTarget isInstalledIn JDIDebugPlugin getDefault fireBreakpointInstalled setInstalledIn
Returns whether this breakpoint is installed in the given target param target return whether this breakpoint is installed in the given target protected boolean is Installed In I Java Debug Target target return f Installed Targets null f Installed Targets contains target  isInstalledIn IJavaDebugTarget fInstalledTargets fInstalledTargets
Sets this breakpoint as installed in the given target param target param installed whether installed protected void set Installed In I Java Debug Target target boolean installed if installed if f Installed Targets null f Installed Targets new Hash Set f Installed Targets add target else if f Installed Targets null f Installed Targets remove target  setInstalledIn IJavaDebugTarget fInstalledTargets fInstalledTargets HashSet fInstalledTargets fInstalledTargets fInstalledTargets
see I Java Breakpoint set Thread Filter I Java Thread public void set Thread Filter I Java Thread thread throws Core Exception if thread get Debug Target instanceof JDI Debug Target thread instanceof JDI Thread return JDI Debug Target target JDI Debug Target thread get Debug Target if thread f Filtered Threads By Target put target thread recreate the breakpoint only if it is not the same thread Other breakpoints set attributes on the underlying marker and the marker changes are eventually propagated to the target The target then asks the breakpoint to update its request Since thread filters are transient properties they are not set on the marker Thus we must update the request here recreate target fire Changed  IJavaBreakpoint setThreadFilter IJavaThread setThreadFilter IJavaThread CoreException getDebugTarget JDIDebugTarget JDIThread JDIDebugTarget JDIDebugTarget getDebugTarget fFilteredThreadsByTarget fireChanged
see I Debug Event Set Listener handle Debug Events Debug Event Cleanup on thread termination public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i if event get Kind Debug Event TERMINATE Object source event get Source if source instanceof JDI Thread return try cleanup For Thread Termination JDI Thread source catch VM Disconnected Exception exception Thread death often occurs at shutdown A VM Disconnected Exception trying to update the breakpoint request is acceptable  IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent DebugEvent getKind DebugEvent getSource JDIThread cleanupForThreadTermination JDIThread VMDisconnectedException VMDisconnectedException
Removes cached information relevant to this thread which has terminated Remove thread filters for terminated threads Subclasses may override but need to call super protected void cleanup For Thread Termination JDI Thread thread JDI Debug Target target JDI Debug Target thread get Debug Target try if thread get Thread Filter target remove Thread Filter target catch Core Exception exception JDI Debug Plugin log exception  cleanupForThreadTermination JDIThread JDIDebugTarget JDIDebugTarget getDebugTarget getThreadFilter removeThreadFilter CoreException JDIDebugPlugin
Event Request does not support thread filters so they can t be set generically here However each of the breakpoint subclasses of Event Request do support thread filters So subclasses can set thread filters on their specific request type  EventRequest EventRequest
see I Java Breakpoint get Thread Filter I Java Debug Target public I Java Thread get Thread Filter I Java Debug Target target return I Java Thread f Filtered Threads By Target get target  IJavaBreakpoint getThreadFilter IJavaDebugTarget IJavaThread getThreadFilter IJavaDebugTarget IJavaThread fFilteredThreadsByTarget
see I Java Breakpoint get Thread Filters public I Java Thread get Thread Filters I Java Thread threads null Collection values f Filtered Threads By Target values threads new I Java Thread values size values to Array threads return threads  IJavaBreakpoint getThreadFilters IJavaThread getThreadFilters IJavaThread fFilteredThreadsByTarget IJavaThread toArray
see I Java Breakpoint remove Thread Filter I Java Thread public void remove Thread Filter I Java Debug Target java Target throws Core Exception if java Target instanceof JDI Debug Target return JDI Debug Target target JDI Debug Target java Target if f Filtered Threads By Target remove target null recreate target fire Changed  IJavaBreakpoint removeThreadFilter IJavaThread removeThreadFilter IJavaDebugTarget javaTarget CoreException javaTarget JDIDebugTarget JDIDebugTarget JDIDebugTarget javaTarget fFilteredThreadsByTarget fireChanged
Returns whether this breakpoint should be installed in the given reference type in the given target according to registered breakpoint listeners param target debug target param type reference type or code null code if this breakpoint is not installed in a specific type protected boolean query Install Listeners JDI Debug Target target Reference Type type I Java Type jt null if type null jt JDI Type create Type target type return JDI Debug Plugin get Default fire Installing target this jt  queryInstallListeners JDIDebugTarget ReferenceType IJavaType JDIType createType JDIDebugPlugin getDefault fireInstalling
see org eclipse jdt debug core I Java Breakpoint add Instance Filter I Java Object public void add Instance Filter I Java Object object throws Core Exception if f Instance Filters null f Instance Filters new Array List if f Instance Filters contains object f Instance Filters add object recreate JDI Debug Target object get Debug Target fire Changed  IJavaBreakpoint addInstanceFilter IJavaObject addInstanceFilter IJavaObject CoreException fInstanceFilters fInstanceFilters ArrayList fInstanceFilters fInstanceFilters JDIDebugTarget getDebugTarget fireChanged
Change notification when there are no marker changes If the marker does not exist do not fire a change notificaiton the marker may not exist if the associated project was closed protected void fire Changed if marker Exists Debug Plugin get Default get Breakpoint Manager fire Breakpoint Changed this  fireChanged markerExists DebugPlugin getDefault getBreakpointManager fireBreakpointChanged
see org eclipse jdt debug core I Java Breakpoint get Instance Filters public I Java Object get Instance Filters if f Instance Filters null f Instance Filters is Empty return fg Empty Instance Filters return I Java Object f Instance Filters to Array new I Java Object f Instance Filters size  IJavaBreakpoint getInstanceFilters IJavaObject getInstanceFilters fInstanceFilters fInstanceFilters isEmpty fgEmptyInstanceFilters IJavaObject fInstanceFilters toArray IJavaObject fInstanceFilters
see org eclipse jdt debug core I Java Breakpoint remove Instance Filter I Java Object public void remove Instance Filter I Java Object object throws Core Exception if f Instance Filters null return if f Instance Filters remove object recreate JDI Debug Target object get Debug Target fire Changed  IJavaBreakpoint removeInstanceFilter IJavaObject removeInstanceFilter IJavaObject CoreException fInstanceFilters fInstanceFilters JDIDebugTarget getDebugTarget fireChanged
An attribute of this breakpoint has changed recreate event requests in all targets protected void recreate throws Core Exception I Debug Target targets Debug Plugin get Default get Launch Manager get Debug Targets for int i 0 i targets length i I Debug Target target targets i Multi Status multi Status new Multi Status JDI Debug Plugin get Unique Identifier JDI Debug Plugin INTERNAL ERROR JDI Debug Breakpoint Messages get String Java Breakpoint Exception null NON NLS 1 I Java Debug Target jdi Target I Java Debug Target target get Adapter I Java Debug Target class if jdi Target null try recreate JDI Debug Target jdi Target catch Core Exception e multi Status add e get Status if multi Status isOK throw new Core Exception multi Status  CoreException IDebugTarget DebugPlugin getDefault getLaunchManager getDebugTargets IDebugTarget MultiStatus multiStatus MultiStatus JDIDebugPlugin getUniqueIdentifier JDIDebugPlugin INTERNAL_ERROR JDIDebugBreakpointMessages getString JavaBreakpoint IJavaDebugTarget jdiTarget IJavaDebugTarget getAdapter IJavaDebugTarget jdiTarget JDIDebugTarget jdiTarget CoreException multiStatus getStatus multiStatus CoreException multiStatus
Recreate this breakpoint in the given target as long as the target already contains this breakpoint param target the target in which to re create the breakpoint protected void recreate JDI Debug Target target throws Core Exception if target is Available target get Breakpoints contains this remove Requests target create Requests target  JDIDebugTarget CoreException isAvailable getBreakpoints removeRequests createRequests
see org eclipse debug core model I Breakpoint set Enabled boolean public void set Enabled boolean enabled throws Core Exception super set Enabled enabled recreate  IBreakpoint setEnabled setEnabled CoreException setEnabled
see org eclipse jdt debug core I Java Breakpoint supports Instance Filters public boolean supports Instance Filters return true  IJavaBreakpoint supportsInstanceFilters supportsInstanceFilters
see org eclipse jdt debug core I Java Breakpoint supports Thread Filters public boolean supports Thread Filters return true  IJavaBreakpoint supportsThreadFilters supportsThreadFilters

public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker JAVA CLASS PREPARE BREAKPOINT add attributes attributes put I Breakpoint ID get Model Identifier attributes put I Marker CHAR START new Integer char Start attributes put I Marker CHAR END new Integer char End attributes put TYPE NAME type Name attributes put MEMBER TYPE new Integer member Type attributes put ENABLED Boolean TRUE ensure Marker set Attributes attributes register add  IProgressMonitor CoreException setMarker createMarker JAVA_CLASS_PREPARE_BREAKPOINT IBreakpoint getModelIdentifier IMarker CHAR_START charStart IMarker CHAR_END charEnd TYPE_NAME typeName MEMBER_TYPE memberType ensureMarker setAttributes
Creates and returns a Java class prepare breakpoint for the given type param resource the resource on which to create the associated breakpoint marker param type Name the fully qualified name of the type for which to create the breakpoint param member Type one of code TYPE CLASS code or code TYPE INTERFACE code param char Start the first character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param char End the last character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param add whether to add this breakpoint to the breakpoint manager return a Java class prepare breakpoint exception Debug Exception if unable to create the associated marker due to a lower level exception public Java Class Prepare Breakpoint final I Resource resource final String type Name final int member Type final int char Start final int char End final boolean add final Map attributes throws Debug Exception I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker JAVA CLASS PREPARE BREAKPOINT add attributes attributes put I Breakpoint ID get Model Identifier attributes put I Marker CHAR START new Integer char Start attributes put I Marker CHAR END new Integer char End attributes put TYPE NAME type Name attributes put MEMBER TYPE new Integer member Type attributes put ENABLED Boolean TRUE ensure Marker set Attributes attributes register add run null wr  typeName memberType TYPE_CLASS TYPE_INTERFACE charStart charEnd DebugException JavaClassPrepareBreakpoint IResource typeName memberType charStart charEnd DebugException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker JAVA_CLASS_PREPARE_BREAKPOINT IBreakpoint getModelIdentifier IMarker CHAR_START charStart IMarker CHAR_END charEnd TYPE_NAME typeName MEMBER_TYPE memberType ensureMarker setAttributes
public Java Class Prepare Breakpoint  JavaClassPrepareBreakpoint
Creates event requests for the given target protected void create Requests JDI Debug Target target throws Core Exception if target is Terminated should Skip Breakpoint return String reference Type Name get Type Name if reference Type Name null return Class Prepare Request request target create Class Prepare Request reference Type Name null false configure Request Hit Count request update Enabled State request register Request request target TODO do we show anything for types already loaded increment Install Count  createRequests JDIDebugTarget CoreException isTerminated shouldSkipBreakpoint referenceTypeName getTypeName referenceTypeName ClassPrepareRequest createClassPrepareRequest referenceTypeName configureRequestHitCount updateEnabledState registerRequest incrementInstallCount
Remove the given request from the given target If the request is the breakpoint request associated with this breakpoint decrement the install count protected void deregister Request Event Request request JDI Debug Target target throws Core Exception target removeJDI Event Listener this request A request may be getting deregistered because the breakpoint has been deleted It may be that this occurred because of a marker deletion Don t try updating the marker decrementing the install count if it no longer exists if get Marker exists decrement Install Count  deregisterRequest EventRequest JDIDebugTarget CoreException removeJDIEventListener getMarker decrementInstallCount
see org eclipse jdt internal debug core breakpoints Java Breakpoint add Instance Filter com sun jdi request Event Request com sun jdi Object Reference protected void add Instance Filter Event Request request Object Reference object  JavaBreakpoint addInstanceFilter EventRequest ObjectReference addInstanceFilter EventRequest ObjectReference
see org eclipse jdt internal debug core breakpoints Java Breakpoint new Request org eclipse jdt internal debug core model JDI Debug Target com sun jdi Reference Type protected Event Request new Request JDI Debug Target target Reference Type type throws Core Exception return null  JavaBreakpoint newRequest JDIDebugTarget ReferenceType EventRequest newRequest JDIDebugTarget ReferenceType CoreException
see org eclipse jdt internal debug core breakpoints Java Breakpoint set Request Thread Filter com sun jdi request Event Request com sun jdi Thread Reference protected void set Request Thread Filter Event Request request Thread Reference thread  JavaBreakpoint setRequestThreadFilter EventRequest ThreadReference setRequestThreadFilter EventRequest ThreadReference
public boolean handle Class Prepare Event Class Prepare Event event JDI Debug Target target try if is Enabled event reference Type name equals get Type Name Thread Reference thread Ref event thread JDI Thread thread target find Thread thread Ref if thread null thread is Ignoring Breakpoints return true return handle Breakpoint Event event target thread catch Core Exception e return true  handleClassPrepareEvent ClassPrepareEvent JDIDebugTarget isEnabled referenceType getTypeName ThreadReference threadRef JDIThread findThread threadRef isIgnoringBreakpoints handleBreakpointEvent CoreException
see org eclipse jdt debug core I Java Class Prepare Breakpoint get Member Type public int get Member Type throws Core Exception return ensure Marker get Attribute MEMBER TYPE I Java Class Prepare Breakpoint TYPE CLASS  IJavaClassPrepareBreakpoint getMemberType getMemberType CoreException ensureMarker getAttribute MEMBER_TYPE IJavaClassPrepareBreakpoint TYPE_CLASS
see org eclipse jdt debug core I Java Breakpoint supports Instance Filters public boolean supports Instance Filters return false  IJavaBreakpoint supportsInstanceFilters supportsInstanceFilters
see org eclipse jdt debug core I Java Breakpoint add Instance Filter org eclipse jdt debug core I Java Object public void add Instance Filter I Java Object object throws Core Exception throw new Core Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED JDI Debug Breakpoint Messages get String Java Class Prepare Breakpoint 2 null NON NLS 1  IJavaBreakpoint addInstanceFilter IJavaObject addInstanceFilter IJavaObject CoreException CoreException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED JDIDebugBreakpointMessages getString JavaClassPrepareBreakpoint
see org eclipse jdt debug core I Java Breakpoint set Thread Filter org eclipse jdt debug core I Java Thread public void set Thread Filter I Java Thread thread throws Core Exception throw new Core Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED JDI Debug Breakpoint Messages get String Java Class Prepare Breakpoint 3 null NON NLS 1  IJavaBreakpoint setThreadFilter IJavaThread setThreadFilter IJavaThread CoreException CoreException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED JDIDebugBreakpointMessages getString JavaClassPrepareBreakpoint
see org eclipse jdt debug core I Java Breakpoint supports Thread Filters public boolean supports Thread Filters return false  IJavaBreakpoint supportsThreadFilters supportsThreadFilters

protected String f Exclusion Class Filters null public Java Exception Breakpoint  fExclusionClassFilters JavaExceptionBreakpoint
public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker JAVA EXCEPTION BREAKPOINT add attributes attributes put I Breakpoint ID get Model Identifier attributes put TYPE NAME exception Name attributes put ENABLED Boolean TRUE attributes put CAUGHT new Boolean caught attributes put UNCAUGHT new Boolean uncaught attributes put CHECKED new Boolean checked ensure Marker set Attributes attributes register add  IProgressMonitor CoreException setMarker createMarker JAVA_EXCEPTION_BREAKPOINT IBreakpoint getModelIdentifier TYPE_NAME exceptionName ensureMarker setAttributes
Creates and returns an exception breakpoint for the given throwable type Caught and uncaught specify where the exception should cause thread suspensions that is in caught and or uncaught locations Checked indicates if the given exception is a checked exception param resource the resource on which to create the associated breakpoint marker param exception Name the fully qualified name of the exception for which to create the breakpoint param caught whether to suspend in caught locations param uncaught whether to suspend in uncaught locations param checked whether the exception is a checked exception param add whether to add this breakpoint to the breakpoint manager return a Java exception breakpoint exception Debug Exception if unable to create the associated marker due to a lower level exception public Java Exception Breakpoint final I Resource resource final String exception Name final boolean caught final boolean uncaught final boolean checked final boolean add final Map attributes throws Debug Exception I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker JAVA EXCEPTION BREAKPOINT add attributes attributes put I Breakpoint ID get Model Identifier attributes put TYPE NAME exception Name attributes put ENABLED Boolean TRUE attributes put CAUGHT new Boolean caught attributes put UNCAUGHT new Boolean uncaught attributes put CHECKED new Boolean checked ensure Marker set Attributes attributes register add run null wr  exceptionName DebugException JavaExceptionBreakpoint IResource exceptionName DebugException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker JAVA_EXCEPTION_BREAKPOINT IBreakpoint getModelIdentifier TYPE_NAME exceptionName ensureMarker setAttributes
Creates a request in the given target to suspend when the given exception type is thrown The request is returned installed configured and enabled as appropriate for this breakpoint protected Event Request new Request JDI Debug Target target Reference Type type throws Core Exception if is Caught is Uncaught return null Exception Request request null Event Request Manager manager target get Event Request Manager if manager null target request Failed JDI Debug Breakpoint Messages get String Java Exception Breakpoint Unable to create breakpoint request   VM disconnected  1 null NON NLS 1 try request manager create Exception Request type is Caught is Uncaught configure Request request target catch VM Disconnected Exception e if target is Available JDI Debug Plugin log e return null catch Runtime Exception e JDI Debug Plugin log e return null return request  EventRequest newRequest JDIDebugTarget ReferenceType CoreException isCaught isUncaught ExceptionRequest EventRequestManager getEventRequestManager requestFailed JDIDebugBreakpointMessages getString JavaExceptionBreakpoint Unable_to_create_breakpoint_request_ _VM_disconnected _1 createExceptionRequest isCaught isUncaught configureRequest VMDisconnectedException isAvailable JDIDebugPlugin RuntimeException JDIDebugPlugin
Enable this exception breakpoint If the exception breakpoint is not catching caught or uncaught turn both modes on If this isn t done the resulting state enabled with caught and uncaught both disabled is ambiguous public void set Enabled boolean enabled throws Core Exception if enabled if is Caught is Uncaught set Attributes new String CAUGHT UNCAUGHT new Object Boolean TRUE Boolean TRUE super set Enabled enabled  setEnabled CoreException isCaught isUncaught setAttributes setEnabled
Sets the values for whether this breakpoint will suspend execution when the associated exception is thrown and caught or not caught protected void set Caught And Uncaught boolean caught boolean uncaught throws Core Exception Object values new Object new Boolean caught new Boolean uncaught String attributes new String CAUGHT UNCAUGHT set Attributes attributes values  setCaughtAndUncaught CoreException setAttributes
see I Java Exception Breakpoint is Caught public boolean is Caught throws Core Exception return ensure Marker get Attribute CAUGHT false  IJavaExceptionBreakpoint isCaught isCaught CoreException ensureMarker getAttribute
see I Java Exception Breakpoint set Caught boolean public void set Caught boolean caught throws Core Exception if caught is Caught return set Attribute CAUGHT caught if caught is Enabled set Enabled true else if caught is Uncaught set Enabled false recreate  IJavaExceptionBreakpoint setCaught setCaught CoreException isCaught setAttribute isEnabled setEnabled isUncaught setEnabled
see I Java Exception Breakpoint is Uncaught public boolean is Uncaught throws Core Exception return ensure Marker get Attribute UNCAUGHT false  IJavaExceptionBreakpoint isUncaught isUncaught CoreException ensureMarker getAttribute
see I Java Exception Breakpoint set Uncaught boolean public void set Uncaught boolean uncaught throws Core Exception if uncaught is Uncaught return set Attribute UNCAUGHT uncaught if uncaught is Enabled set Enabled true else if uncaught is Caught set Enabled false recreate  IJavaExceptionBreakpoint setUncaught setUncaught CoreException isUncaught setAttribute isEnabled setEnabled isCaught setEnabled
see I Java Exception Breakpoint is Checked public boolean is Checked throws Core Exception return ensure Marker get Attribute CHECKED false  IJavaExceptionBreakpoint isChecked isChecked CoreException ensureMarker getAttribute
see Java Breakpoint set Request Thread Filter Event Request protected void set Request Thread Filter Event Request request Thread Reference thread Exception Request request add Thread Filter thread  JavaBreakpoint setRequestThreadFilter EventRequest setRequestThreadFilter EventRequest ThreadReference ExceptionRequest addThreadFilter
see Java Breakpoint handle Breakpoint Event Event JDI Debug Target JDI Thread public boolean handle Breakpoint Event Event event JDI Debug Target target JDI Thread thread if event instanceof Exception Event set Exception Name Exception Event event exception type name if get Exclusion Class Filters length 1 get Inclusion Class Filters length 1 get Exclusion Class Filters length get Inclusion Class Filters length 2 filters Include Default Package f Inclusion Class Filters filters Include Default Package f Exclusion Class Filters Location location Exception Event event location String type Name location declaring Type name boolean default Package type Name index Of 1 boolean included true String filters get Inclusion Class Filters if filters length 0 included matches Filters filters type Name default Package boolean excluded false filters get Exclusion Class Filters if filters length 0 excluded matches Filters filters type Name default Package if included excluded return suspend thread else return true else return suspend thread return true  JavaBreakpoint handleBreakpointEvent JDIDebugTarget JDIThread handleBreakpointEvent JDIDebugTarget JDIThread ExceptionEvent setExceptionName ExceptionEvent getExclusionClassFilters getInclusionClassFilters getExclusionClassFilters getInclusionClassFilters filtersIncludeDefaultPackage fInclusionClassFilters filtersIncludeDefaultPackage fExclusionClassFilters ExceptionEvent typeName declaringType defaultPackage typeName indexOf getInclusionClassFilters matchesFilters typeName defaultPackage getExclusionClassFilters matchesFilters typeName defaultPackage
protected boolean filters Include Default Package String filters for int i 0 i filters length i if filters i length 0 filters i index Of 1 return true return false  filtersIncludeDefaultPackage indexOf
Returns whether the given type is in the given filter set param filters the filter set param type Name fully qualified type name param default Package whether the type name is in the default package return boolean protected boolean matches Filters String filters String type Name boolean default Package for int i 0 i filters length i String filter filters i if default Package filter length 0 return true String Matcher matcher new String Matcher filter false false if matcher match type Name return true return false  typeName defaultPackage matchesFilters typeName defaultPackage defaultPackage StringMatcher StringMatcher typeName
Sets the name of the exception that was last hit param name fully qualified exception name protected void set Exception Name String name f Exception Name name  setExceptionName fExceptionName
see I Java Exception Breakpoint get Exception Type Name public String get Exception Type Name return f Exception Name  IJavaExceptionBreakpoint getExceptionTypeName getExceptionTypeName fExceptionName
see I Java Exception Breakpoint get Filters deprecated public String get Filters String i Filters get Inclusion Filters String e Filters get Exclusion Filters String filters new String i Filters length e Filters length System arraycopy i Filters 0 filters 0 i Filters length System arraycopy e Filters 0 filters i Filters length e Filters length return filters  IJavaExceptionBreakpoint getFilters getFilters iFilters getInclusionFilters eFilters getExclusionFilters iFilters eFilters iFilters iFilters eFilters iFilters eFilters
see I Java Exception Breakpoint set Filters String boolean deprecated public void set Filters String filters boolean inclusive throws Core Exception if inclusive set Inclusion Filters filters else set Exclusion Filters filters recreate  IJavaExceptionBreakpoint setFilters setFilters CoreException setInclusionFilters setExclusionFilters
Adds the filtering to the exception request protected void configure Request Event Request e Request JDI Debug Target target throws Core Exception String i Filters get Inclusion Class Filters String e Filters get Exclusion Class Filters Exception Request request Exception Request e Request if i Filters length 1 if e Filters length 0 request add Class Filter i Filters 0 else if e Filters length 1 if i Filters length 0 request add Class Exclusion Filter e Filters 0 super configure Request e Request target  configureRequest EventRequest eRequest JDIDebugTarget CoreException iFilters getInclusionClassFilters eFilters getExclusionClassFilters ExceptionRequest ExceptionRequest eRequest iFilters eFilters addClassFilter iFilters eFilters iFilters addClassExclusionFilter eFilters configureRequest eRequest
Serializes the array of Strings into one comma separated String Removes duplicates protected String serialize List String list if list null return NON NLS 1 Set set new Hash Set list length String Buffer buffer new String Buffer for int i 0 i list length i if i 0 buffer append String pattern list i if set contains pattern if pattern length 0 serialize the default package pattern NON NLS 1 buffer append pattern return buffer to String  serializeList HashSet StringBuffer StringBuffer toString
Parses the comma separated String into an array of Strings protected String parse List String list String List list new Array List 10 String Tokenizer tokenizer new String Tokenizer list String NON NLS 1 while tokenizer has More Tokens String token tokenizer next Token if token equals NON NLS 1 serialized form for the default package see serialize List String token NON NLS 1 list add token return String list to Array new String list size  parseList listString ArrayList StringTokenizer StringTokenizer listString hasMoreTokens nextToken serializeList toArray
see I Java Exception Breakpoint is Inclusive Filtered deprecated public boolean is Inclusive Filtered throws Core Exception return ensure Marker get Attribute INCLUSION FILTERS length 0 NON NLS 1  IJavaExceptionBreakpoint isInclusiveFiltered isInclusiveFiltered CoreException ensureMarker getAttribute INCLUSION_FILTERS
protected String get Inclusion Class Filters if f Inclusion Class Filters null try f Inclusion Class Filters parse List ensure Marker get Attribute INCLUSION FILTERS NON NLS 1 catch Core Exception ce f Inclusion Class Filters new String return f Inclusion Class Filters  getInclusionClassFilters fInclusionClassFilters fInclusionClassFilters parseList ensureMarker getAttribute INCLUSION_FILTERS CoreException fInclusionClassFilters fInclusionClassFilters
protected void set Inclusion Class Filters String filters f Inclusion Class Filters filters  setInclusionClassFilters fInclusionClassFilters
protected String get Exclusion Class Filters if f Exclusion Class Filters null try f Exclusion Class Filters parse List ensure Marker get Attribute EXCLUSION FILTERS NON NLS 1 catch Core Exception ce f Exclusion Class Filters new String return f Exclusion Class Filters  getExclusionClassFilters fExclusionClassFilters fExclusionClassFilters parseList ensureMarker getAttribute EXCLUSION_FILTERS CoreException fExclusionClassFilters fExclusionClassFilters
protected void set Exclusion Class Filters String filters f Exclusion Class Filters filters  setExclusionClassFilters fExclusionClassFilters
see Java Breakpoint installable Reference Type Reference Type JDI Debug Target protected boolean installable Reference Type Reference Type type JDI Debug Target target throws Core Exception String installable Type get Type Name String queried Type type name if installable Type null queried Type null return false if installable Type equals queried Type return query Install Listeners target type return false  JavaBreakpoint installableReferenceType ReferenceType JDIDebugTarget installableReferenceType ReferenceType JDIDebugTarget CoreException installableType getTypeName queriedType installableType queriedType installableType queriedType queryInstallListeners
see org eclipse jdt debug core I Java Exception Breakpoint get Exclusion Filters public String get Exclusion Filters return get Exclusion Class Filters  IJavaExceptionBreakpoint getExclusionFilters getExclusionFilters getExclusionClassFilters
see org eclipse jdt debug core I Java Exception Breakpoint get Inclusion Filters public String get Inclusion Filters return get Inclusion Class Filters  IJavaExceptionBreakpoint getInclusionFilters getInclusionFilters getInclusionClassFilters
see org eclipse jdt debug core I Java Exception Breakpoint set Exclusion Filters String public void set Exclusion Filters String filters throws Core Exception String serialized Filters serialize List filters if serialized Filters equals ensure Marker get Attribute EXCLUSION FILTERS NON NLS 1 no change return set Exclusion Class Filters filters set Attribute EXCLUSION FILTERS serialized Filters recreate  IJavaExceptionBreakpoint setExclusionFilters setExclusionFilters CoreException serializedFilters serializeList serializedFilters ensureMarker getAttribute EXCLUSION_FILTERS setExclusionClassFilters setAttribute EXCLUSION_FILTERS serializedFilters
see org eclipse jdt debug core I Java Exception Breakpoint set Inclusion Filters String public void set Inclusion Filters String filters throws Core Exception String serialized Filters serialize List filters if serialized Filters equals ensure Marker get Attribute INCLUSION FILTERS NON NLS 1 no change return set Inclusion Class Filters filters set Attribute INCLUSION FILTERS serialized Filters recreate  IJavaExceptionBreakpoint setInclusionFilters setInclusionFilters CoreException serializedFilters serializeList serializedFilters ensureMarker getAttribute INCLUSION_FILTERS setInclusionClassFilters setAttribute INCLUSION_FILTERS serializedFilters
see org eclipse jdt internal debug core breakpoints Java Breakpoint add Instance Filter Event Request Object Reference protected void add Instance Filter Event Request request Object Reference object if request instanceof Exception Request Exception Request request add Instance Filter object  JavaBreakpoint addInstanceFilter EventRequest ObjectReference addInstanceFilter EventRequest ObjectReference ExceptionRequest ExceptionRequest addInstanceFilter

public static final int NO LINE NUMBERS 162 public Java Line Breakpoint  NO_LINE_NUMBERS JavaLineBreakpoint
see JDI Debug Model create Line Breakpoint I Resource String int int int int boolean Map public Java Line Breakpoint I Resource resource String type Name int line Number int char Start int char End int hit Count boolean add Map attributes throws Debug Exception this resource type Name line Number char Start char End hit Count add attributes JAVA LINE BREAKPOINT  JDIDebugModel createLineBreakpoint IResource JavaLineBreakpoint IResource typeName lineNumber charStart charEnd hitCount DebugException typeName lineNumber charStart charEnd hitCount JAVA_LINE_BREAKPOINT
I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker marker Type add attributes add Line Breakpoint Attributes attributes get Model Identifier true line Number char Start char End add Type Name And Hit Count attributes type Name hit Count set attributes ensure Marker set Attributes attributes add to breakpoint manager if requested register add  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker markerType addLineBreakpointAttributes getModelIdentifier lineNumber charStart charEnd addTypeNameAndHitCount typeName hitCount ensureMarker setAttributes
protected Java Line Breakpoint final I Resource resource final String type Name final int line Number final int char Start final int char End final int hit Count final boolean add final Map attributes final String marker Type throws Debug Exception I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker marker Type add attributes add Line Breakpoint Attributes attributes get Model Identifier true line Number char Start char End add Type Name And Hit Count attributes type Name hit Count set attributes ensure Marker set Attributes attributes add to breakpoint manager if requested register add run null wr  JavaLineBreakpoint IResource typeName lineNumber charStart charEnd hitCount markerType DebugException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker markerType addLineBreakpointAttributes getModelIdentifier lineNumber charStart charEnd addTypeNameAndHitCount typeName hitCount ensureMarker setAttributes
see org eclipse jdt internal debug core breakpoints Java Breakpoint add To Target org eclipse jdt internal debug core model JDI Debug Target public void add To Target JDI Debug Target target throws Core Exception clear Cached Expression For target super add To Target target  JavaBreakpoint addToTarget JDIDebugTarget addToTarget JDIDebugTarget CoreException clearCachedExpressionFor addToTarget
public void remove From Target JDI Debug Target target throws Core Exception clear Cached Expression For target clear Cached Suspend Events target f Condition Values remove target super remove From Target target  removeFromTarget JDIDebugTarget CoreException clearCachedExpressionFor clearCachedSuspendEvents fConditionValues removeFromTarget
Removes all suspend events which are currently being cached for threads in the given target protected void clear Cached Suspend Events JDI Debug Target target remove Cached Threads f Suspend Events target  clearCachedSuspendEvents JDIDebugTarget removeCachedThreads fSuspendEvents
private void remove Cached Threads Map map JDI Debug Target target Set threads map key Set List threads To Remove new Array List Iterator iter threads iterator JDI Thread thread while iter has Next thread JDI Thread iter next if thread get Debug Target target threads To Remove add thread iter threads To Remove iterator while iter has Next map remove iter next  removeCachedThreads JDIDebugTarget keySet threadsToRemove ArrayList JDIThread hasNext JDIThread getDebugTarget threadsToRemove threadsToRemove hasNext
Removes all compiled expressions which are currently being cached for threads in the given target protected void clear Cached Expression For JDI Debug Target target remove Cached Threads f Compiled Expressions target  clearCachedExpressionFor JDIDebugTarget removeCachedThreads fCompiledExpressions
see org eclipse debug core model I Line Breakpoint get Line Number public int get Line Number throws Core Exception return ensure Marker get Attribute I Marker LINE NUMBER 1  ILineBreakpoint getLineNumber getLineNumber CoreException ensureMarker getAttribute IMarker LINE_NUMBER
see org eclipse debug core model I Line Breakpoint get Char Start public int get Char Start throws Core Exception return ensure Marker get Attribute I Marker CHAR START 1  ILineBreakpoint getCharStart getCharStart CoreException ensureMarker getAttribute IMarker CHAR_START
see org eclipse debug core model I Line Breakpoint get Char End public int get Char End throws Core Exception return ensure Marker get Attribute I Marker CHAR END 1  ILineBreakpoint getCharEnd getCharEnd CoreException ensureMarker getAttribute IMarker CHAR_END
Returns the type of marker associated with Java line breakpoints public static String get Marker Type return JAVA LINE BREAKPOINT  getMarkerType JAVA_LINE_BREAKPOINT
protected Event Request new Request JDI Debug Target target Reference Type type throws Core Exception Location location null int line Number get Line Number location determine Location line Number type if location null could be an inner type not yet loaded or line information not available return null Event Request request create Line Breakpoint Request location target return request  EventRequest newRequest JDIDebugTarget ReferenceType CoreException lineNumber getLineNumber determineLocation lineNumber EventRequest createLineBreakpointRequest
Creates installs and returns a line breakpoint request at the given location for this breakpoint protected Breakpoint Request create Line Breakpoint Request Location location JDI Debug Target target throws Core Exception Breakpoint Request request null Event Request Manager manager target get Event Request Manager if manager null target request Failed JDI Debug Breakpoint Messages get String Java Line Breakpoint Unable to create breakpoint request   VM disconnected  1 null NON NLS 1 try request manager create Breakpoint Request location configure Request request target catch VM Disconnected Exception e if target is Available return null JDI Debug Plugin log e catch Runtime Exception e JDI Debug Plugin log e return null return request  BreakpointRequest createLineBreakpointRequest JDIDebugTarget CoreException BreakpointRequest EventRequestManager getEventRequestManager requestFailed JDIDebugBreakpointMessages getString JavaLineBreakpoint Unable_to_create_breakpoint_request_ _VM_disconnected _1 createBreakpointRequest configureRequest VMDisconnectedException isAvailable JDIDebugPlugin RuntimeException JDIDebugPlugin
see Java Breakpoint set Request Thread Filter Event Request protected void set Request Thread Filter Event Request request Thread Reference thread Breakpoint Request request add Thread Filter thread  JavaBreakpoint setRequestThreadFilter EventRequest setRequestThreadFilter EventRequest ThreadReference BreakpointRequest addThreadFilter
Returns a location for the line number in the given type Returns code null code if a location cannot be determined protected Location determine Location int line Number Reference Type type List locations null try locations type locations Of Line line Number catch Absent Information Exception aie I Status status new Status I Status ERROR JDI Debug Plugin get Unique Identifier NO LINE NUMBERS JDI Debug Breakpoint Messages get String Java Line Breakpoint Absent Line Number Information 1 null NON NLS 1 I Status Handler handler Debug Plugin get Default get Status Handler status if handler null try handler handle Status status type catch Core Exception e return null catch Native Method Exception e return null catch Invalid Line Number Exception e possibly in a nested type will be handled when that class is loaded return null catch VM Disconnected Exception e return null catch Class Not Prepared Exception e could be a nested type that is not yet loaded return null catch Runtime Exception e not able to retrieve line info JDI Debug Plugin log e return null if locations null locations size 0 return Location locations get 0 return null  determineLocation lineNumber ReferenceType locationsOfLine lineNumber AbsentInformationException IStatus IStatus JDIDebugPlugin getUniqueIdentifier NO_LINE_NUMBERS JDIDebugBreakpointMessages getString JavaLineBreakpoint Absent_Line_Number_Information_1 IStatusHandler DebugPlugin getDefault getStatusHandler handleStatus CoreException NativeMethodException InvalidLineNumberException VMDisconnectedException ClassNotPreparedException RuntimeException JDIDebugPlugin
Adds the standard attributes of a line breakpoint to the given attribute map The standard attributes are ol li I Breakpoint ID li li I Breakpoint ENABLED li li I Marker LINE NUMBER li li I Marker CHAR START li li I Marker CHAR END li ol public void add Line Breakpoint Attributes Map attributes String model Identifier boolean enabled int line Number int char Start int char End attributes put I Breakpoint ID model Identifier attributes put I Breakpoint ENABLED new Boolean enabled attributes put I Marker LINE NUMBER new Integer line Number attributes put I Marker CHAR START new Integer char Start attributes put I Marker CHAR END new Integer char End  IBreakpoint IBreakpoint IMarker LINE_NUMBER IMarker CHAR_START IMarker CHAR_END addLineBreakpointAttributes modelIdentifier lineNumber charStart charEnd IBreakpoint modelIdentifier IBreakpoint IMarker LINE_NUMBER lineNumber IMarker CHAR_START charStart IMarker CHAR_END charEnd
Adds type name and hit count attributes to the given map If code hit Count 0 code adds the code HIT COUNT code attribute to the given breakpoint and resets the code EXPIRED code attribute to false since if the hit count is changed the breakpoint should no longer be expired public void add Type Name And Hit Count Map attributes String type Name int hit Count attributes put TYPE NAME type Name if hit Count 0 attributes put HIT COUNT new Integer hit Count attributes put EXPIRED Boolean FALSE  hitCount HIT_COUNT addTypeNameAndHitCount typeName hitCount TYPE_NAME typeName hitCount HIT_COUNT hitCount
see org eclipse jdt internal debug core breakpoints Java Breakpoint handle Breakpoint Event com sun jdi event Event org eclipse jdt internal debug core model JDI Debug Target org eclipse jdt internal debug core model JDI Thread From referenced Java Doc Returns whethers the thread should be resumed public boolean handle Breakpoint Event Event event JDI Debug Target target JDI Thread thread if has Condition try return handle Conditional Breakpoint Event event thread target catch Core Exception exception JDI Debug Plugin log exception return suspend For Event event thread else return suspend For Event event thread Resume if suspend fails  JavaBreakpoint handleBreakpointEvent JDIDebugTarget JDIThread JavaDoc handleBreakpointEvent JDIDebugTarget JDIThread hasCondition handleConditionalBreakpointEvent CoreException JDIDebugPlugin suspendForEvent suspendForEvent
Returns whether this breakpoint has an enabled condition protected boolean has Condition try String condition get Condition return is Condition Enabled condition null condition length 0 catch Core Exception exception JDI Debug Plugin log exception return false  hasCondition getCondition isConditionEnabled CoreException JDIDebugPlugin
Suspends the given thread for the given breakpoint event Returns whether the thread suspends protected boolean suspend For Event Event event JDI Thread thread expire Hit Count event return suspend thread  suspendForEvent JDIThread expireHitCount
Suspends the given thread for the given breakpoint event after a conditional expression evaluation This method tells the thread to fire a suspend event immediately instead of queueing the event This is required because of the asynchronous nature of expression evaluation The Event Dispatcher has already fired queued events by the time the evaluation completes protected boolean suspend For Condition Event event JDI Thread thread expire Hit Count event return thread handle Suspend For Breakpoint this false  EventDispatcher suspendForCondition JDIThread expireHitCount handleSuspendForBreakpoint
Returns whether this breakpoint should resume based on the value of its condition If there is not an enabled condition which evaluates to code true code the thread should resume protected boolean handle Conditional Breakpoint Event Event event JDI Thread thread JDI Debug Target target throws Core Exception synchronized thread if thread is Performing Evaluation If an evaluation is already being computed for this thread we can t perform another return suspend For Event event thread final String condition get Condition if has Condition return suspend For Event event thread Evaluation Listener listener new Evaluation Listener int suspend Policy SUSPEND THREAD try suspend Policy get Suspend Policy catch Core Exception e if suspend Policy SUSPEND VM JDI Debug Target thread get Debug Target prepare To Suspend By Breakpoint this else thread handle Suspend For Breakpoint Quiet this List frames thread compute New Stack Frames if frames size 0 return suspend For Event event thread JDI Stack Frame frame JDI Stack Frame frames get 0 I Java Project project get Java Project frame if project null throw new Core Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED JDI Debug Breakpoint Messages get String Java Line Breakpoint Unable to compile conditional breakpoint   missing Java project context  1 null NON NLS 1 I Ast Evaluation Engine engine get Evaluation Engine target project if engine null If no engine is available suspend return suspend For Event event thread I Compiled Expression expression I Compiled Expression f Compiled Expressions get thread if expression null expression engine get Compiled Expression condition frame f Compiled Expressions put thread expression if condition Has Errors expression fire Condition Has Errors expression return suspend For Event event thread f Suspend Events put thread event engine evaluate Expression expression frame listener Debug Event EVALUATION IMPLICIT false Do not resume When the evaluation returns the evaluation listener will resume the thread if necessary or update for suspension return false  handleConditionalBreakpointEvent JDIThread JDIDebugTarget CoreException isPerformingEvaluation suspendForEvent getCondition hasCondition suspendForEvent EvaluationListener EvaluationListener suspendPolicy SUSPEND_THREAD suspendPolicy getSuspendPolicy CoreException suspendPolicy SUSPEND_VM JDIDebugTarget getDebugTarget prepareToSuspendByBreakpoint handleSuspendForBreakpointQuiet computeNewStackFrames suspendForEvent JDIStackFrame JDIStackFrame IJavaProject getJavaProject CoreException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED JDIDebugBreakpointMessages getString JavaLineBreakpoint Unable_to_compile_conditional_breakpoint_ _missing_Java_project_context _1 IAstEvaluationEngine getEvaluationEngine suspendForEvent ICompiledExpression ICompiledExpression fCompiledExpressions getCompiledExpression fCompiledExpressions conditionHasErrors fireConditionHasErrors suspendForEvent fSuspendEvents evaluateExpression DebugEvent EVALUATION_IMPLICIT
private I Java Project get Java Project JDI Stack Frame stack Frame I Launch launch stack Frame get Launch if launch null return null I Source Locator locator launch get Source Locator if locator null return null Object source Element null try if locator instanceof I Source Lookup Director stack Frame is Static I Java Type this Type stack Frame get This get Java Type if this Type instanceof JDI Reference Type String source Paths JDI Reference Type this Type get Source Paths null if source Paths length 0 source Element I Source Lookup Director locator get Source Element source Paths 0 catch Debug Exception e Debug Plugin log e if source Element null source Element locator get Source Element stack Frame if source Element instanceof I Java Element source Element instanceof I Adaptable source Element I Adaptable source Element get Adapter I Java Element class if source Element instanceof I Java Element return I Java Element source Element get Java Project else if source Element instanceof I Resource I Java Project project Java Core create I Resource source Element get Project if project exists return project return null  IJavaProject getJavaProject JDIStackFrame stackFrame ILaunch stackFrame getLaunch ISourceLocator getSourceLocator sourceElement ISourceLookupDirector stackFrame isStatic IJavaType thisType stackFrame getThis getJavaType thisType JDIReferenceType sourcePaths JDIReferenceType thisType getSourcePaths sourcePaths sourceElement ISourceLookupDirector getSourceElement sourcePaths DebugException DebugPlugin sourceElement sourceElement getSourceElement stackFrame sourceElement IJavaElement sourceElement IAdaptable sourceElement IAdaptable sourceElement getAdapter IJavaElement sourceElement IJavaElement IJavaElement sourceElement getJavaProject sourceElement IResource IJavaProject JavaCore IResource sourceElement getProject
class Evaluation Listener implements I Evaluation Listener public void evaluation Complete I Evaluation Result result JDI Thread thread JDI Thread result get Thread Event event Event f Suspend Events get thread if result has Errors Debug Exception exception result get Exception Throwable wrapped Exception exception get Status get Exception if wrapped Exception instanceof VM Disconnected Exception JDI Debug Plugin log wrapped Exception try thread resume Quiet catch Debug Exception e JDI Debug Plugin log e else fire Condition Has Runtime Errors exception suspend For Condition event thread return try I Value value result get Value if is Condition Suspend On True if value instanceof I Java Primitive Value Suspend when the condition evaluates true I Java Primitive Value java Value I Java Primitive Value value if is Condition Suspend On True if java Value get Java Type get Name equals boolean java Value get Boolean Value NON NLS 1 suspend For Condition event thread return else I Debug Target debug Target thread get Debug Target I Value last Value I Value f Condition Values get debug Target f Condition Values put debug Target value if value equals last Value suspend For Condition event thread return int suspend Policy SUSPEND THREAD try suspend Policy get Suspend Policy catch Core Exception e if suspend Policy SUSPEND VM JDI Debug Target thread get Debug Target resume Quiet else thread resume Quiet return catch Debug Exception e JDI Debug Plugin log e Suspend when an error occurs suspend For Event event thread  EvaluationListener IEvaluationListener evaluationComplete IEvaluationResult JDIThread JDIThread getThread fSuspendEvents hasErrors DebugException getException wrappedException getStatus getException wrappedException VMDisconnectedException JDIDebugPlugin wrappedException resumeQuiet DebugException JDIDebugPlugin fireConditionHasRuntimeErrors suspendForCondition IValue getValue isConditionSuspendOnTrue IJavaPrimitiveValue IJavaPrimitiveValue javaValue IJavaPrimitiveValue isConditionSuspendOnTrue javaValue getJavaType getName javaValue getBooleanValue suspendForCondition IDebugTarget debugTarget getDebugTarget IValue lastValue IValue fConditionValues debugTarget fConditionValues debugTarget lastValue suspendForCondition suspendPolicy SUSPEND_THREAD suspendPolicy getSuspendPolicy CoreException suspendPolicy SUSPEND_VM JDIDebugTarget getDebugTarget resumeQuiet resumeQuiet DebugException JDIDebugPlugin suspendForEvent
private void fire Condition Has Runtime Errors Debug Exception exception JDI Debug Plugin get Default fire Breakpoint Has Runtime Exception this exception  fireConditionHasRuntimeErrors DebugException JDIDebugPlugin getDefault fireBreakpointHasRuntimeException
Notifies listeners that a conditional breakpoint expression has been compiled that contains errors private void fire Condition Has Errors I Compiled Expression expression JDI Debug Plugin get Default fire Breakpoint Has Compilation Errors this get Messages expression  fireConditionHasErrors ICompiledExpression JDIDebugPlugin getDefault fireBreakpointHasCompilationErrors getMessages
Convert an array of code String code to an array of code Message code private Message get Messages I Compiled Expression expression String error Messages expression get Error Messages Message messages new Message error Messages length for int i 0 i messages length i messages i new Message error Messages i 1 return messages  getMessages ICompiledExpression errorMessages getErrorMessages errorMessages errorMessages
Returns whether the cached conditional expression has errors or code false code if there is no cached expression public boolean condition Has Errors I Compiled Expression expression return expression has Errors  conditionHasErrors ICompiledExpression hasErrors
Returns an evaluation engine for evaluating this breakpoint s condition in the given target and project context public I Ast Evaluation Engine get Evaluation Engine I Java Debug Target vm I Java Project project return JDI Debug Target vm get Evaluation Engine project  IAstEvaluationEngine getEvaluationEngine IJavaDebugTarget IJavaProject JDIDebugTarget getEvaluationEngine
see org eclipse jdt debug core I Java Line Breakpoint supports Condition public boolean supports Condition return true  IJavaLineBreakpoint supportsCondition supportsCondition
see org eclipse jdt debug core I Java Line Breakpoint get Condition public String get Condition throws Core Exception return ensure Marker get Attribute CONDITION null  IJavaLineBreakpoint getCondition getCondition CoreException ensureMarker getAttribute
public void set Condition String condition throws Core Exception Clear the cached compiled expressions f Compiled Expressions clear f Condition Values clear f Suspend Events clear if condition null condition trim length 0 condition null set Attributes new String CONDITION new Object condition recreate  setCondition CoreException fCompiledExpressions fConditionValues fSuspendEvents setAttributes
protected String get Marker Message boolean condition Enabled String condition int hit Count int suspend Policy int line Number String Buffer message new String Buffer super get Marker Message hit Count suspend Policy if line Number 1 message append Message Format format JDI Debug Breakpoint Messages get String Java Line Breakpoint   line   0  1 new Object Integer to String line Number NON NLS 1 if condition Enabled condition null message append Message Format format JDI Debug Breakpoint Messages get String Java Line Breakpoint   Condition   0  2 new Object condition NON NLS 1 return message to String  getMarkerMessage conditionEnabled hitCount suspendPolicy lineNumber StringBuffer StringBuffer getMarkerMessage hitCount suspendPolicy lineNumber MessageFormat JDIDebugBreakpointMessages getString JavaLineBreakpoint _ line__ _1 toString lineNumber conditionEnabled MessageFormat JDIDebugBreakpointMessages getString JavaLineBreakpoint _ Condition__ _2 toString
see org eclipse jdt debug core I Java Line Breakpoint is Condition Enabled public boolean is Condition Enabled throws Core Exception return ensure Marker get Attribute CONDITION ENABLED false  IJavaLineBreakpoint isConditionEnabled isConditionEnabled CoreException ensureMarker getAttribute CONDITION_ENABLED
see org eclipse jdt debug core I Java Line Breakpoint set Condition Enabled boolean public void set Condition Enabled boolean condition Enabled throws Core Exception set Attributes new String CONDITION ENABLED new Object new Boolean condition Enabled recreate  IJavaLineBreakpoint setConditionEnabled setConditionEnabled conditionEnabled CoreException setAttributes CONDITION_ENABLED conditionEnabled
protected void cleanup For Thread Termination JDI Thread thread f Suspend Events remove thread f Compiled Expressions remove thread super cleanup For Thread Termination thread  cleanupForThreadTermination JDIThread fSuspendEvents fCompiledExpressions cleanupForThreadTermination
protected void add Instance Filter Event Request request Object Reference object if request instanceof Breakpoint Request Breakpoint Request request add Instance Filter object  addInstanceFilter EventRequest ObjectReference BreakpointRequest BreakpointRequest addInstanceFilter
see org eclipse jdt debug core I Java Line Breakpoint is Condition Suspend On True public boolean is Condition Suspend On True throws Debug Exception return ensure Marker get Attribute CONDITION SUSPEND ON TRUE true  IJavaLineBreakpoint isConditionSuspendOnTrue isConditionSuspendOnTrue DebugException ensureMarker getAttribute CONDITION_SUSPEND_ON_TRUE
public void set Condition Suspend On True boolean suspend On True throws Core Exception if is Condition Suspend On True suspend On True set Attributes new String CONDITION SUSPEND ON TRUE new Object new Boolean suspend On True f Condition Values clear recreate  setConditionSuspendOnTrue suspendOnTrue CoreException isConditionSuspendOnTrue suspendOnTrue setAttributes CONDITION_SUSPEND_ON_TRUE suspendOnTrue fConditionValues

Constructs a new unconfigured method breakpoint public Java Method Breakpoint  JavaMethodBreakpoint
I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker JAVA METHOD BREAKPOINT add attributes add Line Breakpoint Attributes attributes get Model Identifier true line Number char Start char End add Method Name And Signature attributes method Name method Signature add Type Name And Hit Count attributes type Pattern hit Count attributes put ENTRY new Boolean entry attributes put EXIT new Boolean exit attributes put NATIVE new Boolean native Only set attributes ensure Marker set Attributes attributes register register  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker JAVA_METHOD_BREAKPOINT addLineBreakpointAttributes getModelIdentifier lineNumber charStart charEnd addMethodNameAndSignature methodName methodSignature addTypeNameAndHitCount typePattern hitCount nativeOnly ensureMarker setAttributes
public Java Method Breakpoint final I Resource resource final String type Pattern final String method Name final String method Signature final boolean entry final boolean exit final boolean native Only final int line Number final int char Start final int char End final int hit Count final boolean register final Map attributes throws Core Exception I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker JAVA METHOD BREAKPOINT add attributes add Line Breakpoint Attributes attributes get Model Identifier true line Number char Start char End add Method Name And Signature attributes method Name method Signature add Type Name And Hit Count attributes type Pattern hit Count attributes put ENTRY new Boolean entry attributes put EXIT new Boolean exit attributes put NATIVE new Boolean native Only set attributes ensure Marker set Attributes attributes register register run null wr f Matcher new String Matcher type Pattern false false  JavaMethodBreakpoint IResource typePattern methodName methodSignature nativeOnly lineNumber charStart charEnd hitCount CoreException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker JAVA_METHOD_BREAKPOINT addLineBreakpointAttributes getModelIdentifier lineNumber charStart charEnd addMethodNameAndSignature methodName methodSignature addTypeNameAndHitCount typePattern hitCount nativeOnly ensureMarker setAttributes fMatcher StringMatcher typePattern
Creates and installs an entry and exit requests in the given type name configuring the requests as appropriate for this breakpoint The requests are then enabled based on whether this breakpoint is an entry breakpoint exit breakpoint or both Finally the requests are registered with the given target protected void create Request JDI Debug Target target String type Pattern throws Core Exception Method Entry Request entry Request create Method Entry Request target type Pattern Method Exit Request exit Request create Method Exit Request target type Pattern register Request entry Request target register Request exit Request target  createRequest JDIDebugTarget typePattern CoreException MethodEntryRequest entryRequest createMethodEntryRequest typePattern MethodExitRequest exitRequest createMethodExitRequest typePattern registerRequest entryRequest registerRequest exitRequest
Returns a new method entry request for this breakpoint s criteria param the target in which to create the request param type the type on which to create the request return method entry request exception Core Exception if an exception occurs accessing this breakpoint s underlying marker protected Method Entry Request create Method Entry Request JDI Debug Target target String type Pattern throws Core Exception return Method Entry Request create Method Request target type Pattern true  CoreException MethodEntryRequest createMethodEntryRequest JDIDebugTarget typePattern CoreException MethodEntryRequest createMethodRequest typePattern
Returns a new method exit request for this breakpoint s criteria param target the target in which to create the request param type the type on which to create the request return method exit request exception Core Exception if an exception occurs accessing this breakpoint s underlying marker protected Method Exit Request create Method Exit Request JDI Debug Target target String type Pattern throws Core Exception return Method Exit Request create Method Request target type Pattern false  CoreException MethodExitRequest createMethodExitRequest JDIDebugTarget typePattern CoreException MethodExitRequest createMethodRequest typePattern
Returns a new method entry request for this breakpoint s criteria param the target in which to create the request param type the type on which to create the request return method entry request exception Core Exception if an exception occurs accessing this breakpoint s underlying marker protected Event Request create Method Entry Request JDI Debug Target target Reference Type type throws Core Exception return create Method Request target type true  CoreException EventRequest createMethodEntryRequest JDIDebugTarget ReferenceType CoreException createMethodRequest
Returns a new method exit request for the given reference type param target the target in which to create the request param type the type on which to create the request return method exit request exception Core Exception if an exception occurs accessing this breakpoint s underlying marker protected Event Request create Method Exit Request JDI Debug Target target Reference Type type throws Core Exception return create Method Request target type false  CoreException EventRequest createMethodExitRequest JDIDebugTarget ReferenceType CoreException createMethodRequest
see Java Method Breakpoint create Method Entry Request JDI Debug Target Reference Type or Java Method Breakpoint create Method Exit Request JDI Debug Target Reference Type Returns a code Method Entry Request code or code Breakpoint Request code if entry is code true code a code Method Exit Request code if entry is code false code param target the debug target in which to create the request param class Filter a filter which specifies the scope of the method request This parameter must be either a code String code or a code Reference Type code param entry whether or not the request will be a method entry request If code false code the request will be a method exit request private Event Request create Method Request JDI Debug Target target Object class Filter boolean entry throws Core Exception Event Request request null Event Request Manager manager target get Event Request Manager if manager null target request Failed JDI Debug Breakpoint Messages get String Java Method Breakpoint Unable to create breakpoint request   VM disconnected  1 null NON NLS 1 try if entry if class Filter instanceof Class Type get Method Name null get Method Signature null use a line breakpoint if possible for better performance Class Type clazz Class Type class Filter if clazz name equals get Type Name only use line breakpoint when there is an exact match Method method clazz concrete Method By Name get Method Name get Method Signature if method null method is Native Location location method location if location null location code Index 1 request manager create Breakpoint Request location if request null request manager create Method Entry Request if class Filter instanceof String Method Entry Request request add Class Filter String class Filter else if class Filter instanceof Reference Type Method Entry Request request add Class Filter Reference Type class Filter else request manager create Method Exit Request if class Filter instanceof String Method Exit Request request add Class Filter String class Filter else if class Filter instanceof Reference Type Method Exit Request request add Class Filter Reference Type class Filter configure Request request target catch VM Disconnected Exception e if target is Available return null JDI Debug Plugin log e catch Runtime Exception e JDI Debug Plugin log e return request  JavaMethodBreakpoint createMethodEntryRequest JDIDebugTarget ReferenceType JavaMethodBreakpoint createMethodExitRequest JDIDebugTarget ReferenceType MethodEntryRequest BreakpointRequest MethodExitRequest classFilter ReferenceType EventRequest createMethodRequest JDIDebugTarget classFilter CoreException EventRequest EventRequestManager getEventRequestManager requestFailed JDIDebugBreakpointMessages getString JavaMethodBreakpoint Unable_to_create_breakpoint_request_ _VM_disconnected _1 classFilter ClassType getMethodName getMethodSignature ClassType ClassType classFilter getTypeName concreteMethodByName getMethodName getMethodSignature isNative codeIndex createBreakpointRequest createMethodEntryRequest classFilter MethodEntryRequest addClassFilter classFilter classFilter ReferenceType MethodEntryRequest addClassFilter ReferenceType classFilter createMethodExitRequest classFilter MethodExitRequest addClassFilter classFilter classFilter ReferenceType MethodExitRequest addClassFilter ReferenceType classFilter configureRequest VMDisconnectedException isAvailable JDIDebugPlugin RuntimeException JDIDebugPlugin
see Java Breakpoint set Request Thread Filter Event Request protected void set Request Thread Filter Event Request request Thread Reference thread if request instanceof Method Entry Request Method Entry Request request add Thread Filter thread else if request instanceof Method Exit Request Method Exit Request request add Thread Filter thread else if request instanceof Breakpoint Request Breakpoint Request request add Thread Filter thread  JavaBreakpoint setRequestThreadFilter EventRequest setRequestThreadFilter EventRequest ThreadReference MethodEntryRequest MethodEntryRequest addThreadFilter MethodExitRequest MethodExitRequest addThreadFilter BreakpointRequest BreakpointRequest addThreadFilter
Configure the given request s hit count Since method entry exit requests do not support hit counts we simulate a hit count by manually updating a counter stored on the request protected void configure Request Hit Count Event Request request throws Core Exception if request instanceof Breakpoint Request super configure Request Hit Count request else int hit Count get Hit Count if hit Count 0 request put Property HIT COUNT new Integer hit Count  configureRequestHitCount EventRequest CoreException BreakpointRequest configureRequestHitCount hitCount getHitCount hitCount putProperty HIT_COUNT hitCount
see Java Breakpoint update Enabled State Event Request protected void update Enabled State Event Request request throws Core Exception boolean enabled is Enabled if request instanceof Method Entry Request request instanceof Breakpoint Request enabled enabled is Entry else if request instanceof Method Exit Request enabled enabled is Exit if enabled request is Enabled internal Update Enabled State request enabled  JavaBreakpoint updateEnabledState EventRequest updateEnabledState EventRequest CoreException isEnabled MethodEntryRequest BreakpointRequest isEntry MethodExitRequest isExit isEnabled internalUpdateEnabledState
Adds the method name and signature attributes to the given attribute map and intializes the local cache of method name and signature private void add Method Name And Signature Map attributes String method Name String method Signature if method Name null attributes put METHOD NAME method Name if method Signature null attributes put METHOD SIGNATURE method Signature f Method Name method Name f Method Signature method Signature  addMethodNameAndSignature methodName methodSignature methodName METHOD_NAME methodName methodSignature METHOD_SIGNATURE methodSignature fMethodName methodName fMethodSignature methodSignature
see I Java Method Breakpoint is Entry Suspend I Debug Target public boolean is Entry Suspend I Debug Target target Integer last Event Type Integer f Last Event Types get target if last Event Type null return false return last Event Type equals ENTRY EVENT  IJavaMethodBreakpoint isEntrySuspend IDebugTarget isEntrySuspend IDebugTarget lastEventType fLastEventTypes lastEventType lastEventType ENTRY_EVENT
see Java Breakpoint handle Breakpoint Event Event JDI Debug Target JDI Thread public boolean handle Breakpoint Event Event event JDI Debug Target target JDI Thread thread if event instanceof Method Entry Event Method Entry Event entry Event Method Entry Event event f Last Event Types put target ENTRY EVENT return handle Method Event entry Event entry Event method target thread else if event instanceof Method Exit Event Method Exit Event exit Event Method Exit Event event f Last Event Types put target EXIT EVENT return handle Method Event exit Event exit Event method target thread else if event instanceof Breakpoint Event f Last Event Types put target ENTRY EVENT return super handle Breakpoint Event event target thread return true  JavaBreakpoint handleBreakpointEvent JDIDebugTarget JDIThread handleBreakpointEvent JDIDebugTarget JDIThread MethodEntryEvent MethodEntryEvent entryEvent MethodEntryEvent fLastEventTypes ENTRY_EVENT handleMethodEvent entryEvent entryEvent MethodExitEvent MethodExitEvent exitEvent MethodExitEvent fLastEventTypes EXIT_EVENT handleMethodEvent exitEvent exitEvent BreakpointEvent fLastEventTypes ENTRY_EVENT handleBreakpointEvent
Method entry exit events are fired each time any method is invoked in a class in which a method entry exit breakpoint has been installed When a method entry exit event is received by this breakpoint ensure that the event has been fired by a method invocation that this breakpoint is interested in If it is not do nothing protected boolean handle Method Event Locatable Event event Method method JDI Debug Target target JDI Thread thread try if is Native Only if method is Native return true if get Method Name null if method name equals get Method Name return true if get Method Signature null if method signature equals get Method Signature return true if f Matcher null if f Matcher match method declaring Type name return true simulate hit count Integer count Integer event request get Property HIT COUNT if count null handle Hit Count event count return true else no hit count if has Condition try return handle Conditional Breakpoint Event event thread target catch Core Exception exception log error return suspend For Event event thread else return suspend For Event event thread Resume if suspend fails catch Core Exception e JDI Debug Plugin log e return true  handleMethodEvent LocatableEvent JDIDebugTarget JDIThread isNativeOnly isNative getMethodName getMethodName getMethodSignature getMethodSignature fMatcher fMatcher declaringType getProperty HIT_COUNT handleHitCount hasCondition handleConditionalBreakpointEvent CoreException suspendForEvent suspendForEvent CoreException JDIDebugPlugin
Method breakpoints simulate hit count When a method event is received decrement the hit count property on the request and suspend if the hit count reaches 0 private boolean handle Hit Count Locatable Event event Integer count decrement count and suspend if 0 int hit Count count int Value if hit Count 0 hit Count count new Integer hit Count event request put Property HIT COUNT count if hit Count 0 the count has reached 0 breakpoint hit try make a note that we auto disabled the breakpoint order is important here see method Entry Changed set Expired true set Enabled false catch Core Exception e JDI Debug Plugin log e return false else count still 0 keep running return true else hit count expired keep running return true  handleHitCount LocatableEvent hitCount intValue hitCount hitCount hitCount putProperty HIT_COUNT hitCount methodEntryChanged setExpired setEnabled CoreException JDIDebugPlugin
see org eclipse jdt debug core I Java Method Entry Breakpoint get Method Name public String get Method Name return f Method Name  IJavaMethodEntryBreakpoint getMethodName getMethodName fMethodName
see org eclipse jdt debug core I Java Method Entry Breakpoint get Method Signature public String get Method Signature return f Method Signature  IJavaMethodEntryBreakpoint getMethodSignature getMethodSignature fMethodSignature
see I Java Method Breakpoint is Entry public boolean is Entry throws Core Exception return ensure Marker get Attribute ENTRY false  IJavaMethodBreakpoint isEntry isEntry CoreException ensureMarker getAttribute
see I Java Method Breakpoint is Exit public boolean is Exit throws Core Exception return ensure Marker get Attribute EXIT false  IJavaMethodBreakpoint isExit isExit CoreException ensureMarker getAttribute
see I Java Method Breakpoint is Native public boolean is Native Only throws Core Exception return ensure Marker get Attribute NATIVE false  IJavaMethodBreakpoint isNative isNativeOnly CoreException ensureMarker getAttribute
see I Java Method Breakpoint set Entry boolean public void set Entry boolean entry throws Core Exception if is Entry entry set Attribute ENTRY entry if entry is Enabled set Enabled true else if entry is Exit set Enabled false recreate  IJavaMethodBreakpoint setEntry setEntry CoreException isEntry setAttribute isEnabled setEnabled isExit setEnabled
see I Java Method Breakpoint set Exit boolean public void set Exit boolean exit throws Core Exception if is Exit exit set Attribute EXIT exit if exit is Enabled set Enabled true else if exit is Entry set Enabled false recreate  IJavaMethodBreakpoint setExit setExit CoreException isExit setAttribute isEnabled setEnabled isEntry setEnabled
see I Java Method Breakpoint set Native Only boolean public void set Native Only boolean native Only throws Core Exception if is Native Only native Only set Attribute NATIVE native Only recreate  IJavaMethodBreakpoint setNativeOnly setNativeOnly nativeOnly CoreException isNativeOnly nativeOnly setAttribute nativeOnly
Initialize cache of attributes see org eclipse debug core model I Breakpoint set Marker I Marker public void set Marker I Marker marker throws Core Exception super set Marker marker f Method Name marker get Attribute METHOD NAME null f Method Signature marker get Attribute METHOD SIGNATURE null String type Pattern marker get Attribute TYPE NAME NON NLS 1 if type Pattern null f Matcher new String Matcher type Pattern false false  IBreakpoint setMarker IMarker setMarker IMarker CoreException setMarker fMethodName getAttribute METHOD_NAME fMethodSignature getAttribute METHOD_SIGNATURE typePattern getAttribute TYPE_NAME typePattern fMatcher StringMatcher typePattern
If this breakpoint is not entry or exit enabled set the default entry see org eclipse debug core model I Breakpoint set Enabled boolean public void set Enabled boolean enabled throws Core Exception if enabled if is Entry is Exit set Default Entry And Exit super set Enabled enabled  IBreakpoint setEnabled setEnabled CoreException isEntry isExit setDefaultEntryAndExit setEnabled
Sets the default entry and exit attributes of the method breakpoint The default values are ul li entry code true code li exit code false code ul protected void set Default Entry And Exit throws Core Exception Object values new Object Boolean TRUE Boolean FALSE String attributes new String ENTRY EXIT set Attributes attributes values  setDefaultEntryAndExit CoreException setAttributes
see org eclipse jdt debug core I Java Line Breakpoint supports Condition public boolean supports Condition return true  IJavaLineBreakpoint supportsCondition supportsCondition
see Java Breakpoint add To Target JDI Debug Target public void add To Target JDI Debug Target target throws Core Exception if uses Type Pattern pre notification fire Adding target String reference Type Name Pattern get Type Name if reference Type Name Pattern null return create Request target reference Type Name Pattern else super add To Target target  JavaBreakpoint addToTarget JDIDebugTarget addToTarget JDIDebugTarget CoreException usesTypePattern fireAdding referenceTypeNamePattern getTypeName referenceTypeNamePattern createRequest referenceTypeNamePattern addToTarget
see org eclipse jdt internal debug core breakpoints Java Breakpoint remove From Target JDI Debug Target public void remove From Target JDI Debug Target target throws Core Exception f Last Event Types remove target super remove From Target target  JavaBreakpoint removeFromTarget JDIDebugTarget removeFromTarget JDIDebugTarget CoreException fLastEventTypes removeFromTarget
Returns whether this breakpoint uses type name pattern matching return whether this breakpoint uses type name pattern matching protected boolean uses Type Pattern throws Core Exception if f Uses Type Pattern null String name get Type Name f Uses Type Pattern new Boolean name null name starts With name ends With NON NLS 1 NON NLS 2 return f Uses Type Pattern boolean Value  usesTypePattern CoreException fUsesTypePattern getTypeName fUsesTypePattern startsWith endsWith fUsesTypePattern booleanValue
Used when this breakpoint is for a specific type i e not using type name pattern matching see org eclipse jdt internal debug core breakpoints Java Breakpoint create Request JDI Debug Target Reference Type protected boolean create Request JDI Debug Target target Reference Type type throws Core Exception if type name equals get Type Name should Skip Breakpoint do not create requests for inner outer types if this is for a specific type return false Event Request entry Request create Method Entry Request target type Event Request exit Request create Method Exit Request target type register Request entry Request target register Request exit Request target return true  JavaBreakpoint createRequest JDIDebugTarget ReferenceType createRequest JDIDebugTarget ReferenceType CoreException getTypeName shouldSkipBreakpoint EventRequest entryRequest createMethodEntryRequest EventRequest exitRequest createMethodExitRequest registerRequest entryRequest registerRequest exitRequest
see org eclipse jdt internal debug core breakpoints Java Breakpoint set Type Name String protected void set Type Name String type Name throws Core Exception f Uses Type Pattern null super set Type Name type Name  JavaBreakpoint setTypeName setTypeName typeName CoreException fUsesTypePattern setTypeName typeName
see org eclipse jdt internal debug core breakpoints Java Breakpoint add Instance Filter Event Request Object Reference protected void add Instance Filter Event Request request Object Reference object if request instanceof Method Entry Request Method Entry Request request add Instance Filter object else if request instanceof Method Exit Request Method Exit Request request add Instance Filter object else super add Instance Filter request object  JavaBreakpoint addInstanceFilter EventRequest ObjectReference addInstanceFilter EventRequest ObjectReference MethodEntryRequest MethodEntryRequest addInstanceFilter MethodExitRequest MethodExitRequest addInstanceFilter addInstanceFilter

Constructs a new unconfigured method breakpoint public Java Method Entry Breakpoint  JavaMethodEntryBreakpoint
I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker JAVA METHOD ENTRY BREAKPOINT add attributes add Line Breakpoint Attributes attributes get Model Identifier true line Number char Start char End add Method Name And Signature attributes method Name method Signature add Type Name And Hit Count attributes type Name hit Count set attributes ensure Marker set Attributes attributes register register  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker JAVA_METHOD_ENTRY_BREAKPOINT addLineBreakpointAttributes getModelIdentifier lineNumber charStart charEnd addMethodNameAndSignature methodName methodSignature addTypeNameAndHitCount typeName hitCount ensureMarker setAttributes
public Java Method Entry Breakpoint final I Resource resource final String type Name final String method Name final String method Signature final int line Number final int char Start final int char End final int hit Count final boolean register final Map attributes throws Core Exception I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker JAVA METHOD ENTRY BREAKPOINT add attributes add Line Breakpoint Attributes attributes get Model Identifier true line Number char Start char End add Method Name And Signature attributes method Name method Signature add Type Name And Hit Count attributes type Name hit Count set attributes ensure Marker set Attributes attributes register register run null wr  JavaMethodEntryBreakpoint IResource typeName methodName methodSignature lineNumber charStart charEnd hitCount CoreException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker JAVA_METHOD_ENTRY_BREAKPOINT addLineBreakpointAttributes getModelIdentifier lineNumber charStart charEnd addMethodNameAndSignature methodName methodSignature addTypeNameAndHitCount typeName hitCount ensureMarker setAttributes
Adds the method name and signature attributes to the given attribute map and intializes the local cache of method name and signature private void add Method Name And Signature Map attributes String method Name String method Signature if method Name null attributes put METHOD NAME method Name if method Signature null attributes put METHOD SIGNATURE method Signature f Method Name method Name f Method Signature method Signature  addMethodNameAndSignature methodName methodSignature methodName METHOD_NAME methodName methodSignature METHOD_SIGNATURE methodSignature fMethodName methodName fMethodSignature methodSignature
see I Java Method Entry Breakpoint get Method Name public String get Method Name return f Method Name  IJavaMethodEntryBreakpoint getMethodName getMethodName fMethodName
see I Java Method Entry Breakpoint get Method Signature public String get Method Signature return f Method Signature  IJavaMethodEntryBreakpoint getMethodSignature getMethodSignature fMethodSignature
Initialize cache of attributes see I Breakpoint set Marker I Marker public void set Marker I Marker marker throws Core Exception super set Marker marker f Method Name marker get Attribute METHOD NAME null f Method Signature marker get Attribute METHOD SIGNATURE null  IBreakpoint setMarker IMarker setMarker IMarker CoreException setMarker fMethodName getAttribute METHOD_NAME fMethodSignature getAttribute METHOD_SIGNATURE
see I Java Line Breakpoint supports Condition public boolean supports Condition return false  IJavaLineBreakpoint supportsCondition supportsCondition
see Java Breakpoint new Request JDI Debug Target Reference Type protected Event Request new Request JDI Debug Target target Reference Type type throws Core Exception try if type instanceof Class Type Class Type clazz Class Type type Method method clazz concrete Method By Name get Method Name get Method Signature if method null return null Location location method location if location null location code Index 1 return null Breakpoint Request req type virtual Machine event Request Manager create Breakpoint Request location configure Request req target return req else return null catch Runtime Exception e JDI Debug Plugin log e return null  JavaBreakpoint newRequest JDIDebugTarget ReferenceType EventRequest newRequest JDIDebugTarget ReferenceType CoreException ClassType ClassType ClassType concreteMethodByName getMethodName getMethodSignature codeIndex BreakpointRequest virtualMachine eventRequestManager createBreakpointRequest configureRequest RuntimeException JDIDebugPlugin

protected static final String PATTERN org eclipse jdt debug core pattern NON NLS 1 public Java Pattern Breakpoint  JavaPatternBreakpoint
see JDI Debug Model create Pattern Breakpoint I Resource String int int int int boolean Map public Java Pattern Breakpoint I Resource resource String source Name String pattern int line Number int char Start int char End int hit Count boolean add Map attributes throws Debug Exception this resource source Name pattern line Number char Start char End hit Count add attributes PATTERN BREAKPOINT  JDIDebugModel createPatternBreakpoint IResource JavaPatternBreakpoint IResource sourceName lineNumber charStart charEnd hitCount DebugException sourceName lineNumber charStart charEnd hitCount PATTERN_BREAKPOINT
I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker marker Type add attributes add Line Breakpoint Attributes attributes get Model Identifier true line Number char Start char End add Pattern And Hit Count attributes source Name pattern hit Count set attributes ensure Marker set Attributes attributes register add  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker markerType addLineBreakpointAttributes getModelIdentifier lineNumber charStart charEnd addPatternAndHitCount sourceName hitCount ensureMarker setAttributes
public Java Pattern Breakpoint final I Resource resource final String source Name final String pattern final int line Number final int char Start final int char End final int hit Count final boolean add final Map attributes final String marker Type throws Debug Exception I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker marker Type add attributes add Line Breakpoint Attributes attributes get Model Identifier true line Number char Start char End add Pattern And Hit Count attributes source Name pattern hit Count set attributes ensure Marker set Attributes attributes register add run null wr  JavaPatternBreakpoint IResource sourceName lineNumber charStart charEnd hitCount markerType DebugException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker markerType addLineBreakpointAttributes getModelIdentifier lineNumber charStart charEnd addPatternAndHitCount sourceName hitCount ensureMarker setAttributes
Creates the event requests to ul li Listen to class loads related to the breakpoint li li Respond to the breakpoint being hit li ul public void add To Target JDI Debug Target target throws Core Exception pre notification fire Adding target String reference Type Name get Reference Type Name if reference Type Name null return String class Prepare Type Name reference Type Name create request to listen to class loads name may only be partially resolved if reference Type Name ends With NON NLS 1 class Prepare Type Name class Prepare Type Name register Request target create Class Prepare Request class Prepare Type Name target create breakpoint requests for each class currently loaded Virtual Machine vm target getVM if vm null target request Failed JDI Debug Breakpoint Messages get String Java Pattern Breakpoint Unable to add breakpoint   VM disconnected  1 null NON NLS 1 List classes null try classes vm all Classes catch Runtime Exception e target target Request Failed JDI Debug Breakpoint Messages get String Java Pattern Breakpoint 0 e NON NLS 1 if classes null Iterator iter classes iterator String type Name null Reference Type type null while iter has Next type Reference Type iter next type Name type name if type Name null type Name starts With reference Type Name create Request target type  addToTarget JDIDebugTarget CoreException fireAdding referenceTypeName getReferenceTypeName referenceTypeName classPrepareTypeName referenceTypeName referenceTypeName endsWith classPrepareTypeName classPrepareTypeName registerRequest createClassPrepareRequest classPrepareTypeName VirtualMachine requestFailed JDIDebugBreakpointMessages getString JavaPatternBreakpoint Unable_to_add_breakpoint_ _VM_disconnected _1 allClasses RuntimeException targetRequestFailed JDIDebugBreakpointMessages getString JavaPatternBreakpoint typeName ReferenceType hasNext ReferenceType typeName typeName typeName startsWith referenceTypeName createRequest
see Java Breakpoint get Reference Type Name protected String get Reference Type Name String name NON NLS 1 try name get Pattern catch Core Exception ce JDI Debug Plugin log ce return name  JavaBreakpoint getReferenceTypeName getReferenceTypeName getPattern CoreException JDIDebugPlugin
see Java Breakpoint installable Reference Type Reference Type protected boolean installable Reference Type Reference Type type JDI Debug Target target throws Core Exception if the source name attribute is specified check for a match with the debug attribute if available if get Source Name null String source Name null try source Name type source Name catch Absent Information Exception e unable to compare catch Runtime Exception e target target Request Failed Message Format format JDI Debug Breakpoint Messages get String Java Pattern Breakpoint exception source name new String e to String type name e NON NLS 1 execution will not reach this line as target Request Failed will throw an exception return false if the debug attribute matches the source name attempt installion if source Name null if get Source Name equals Ignore Case source Name return false String pattern get Pattern String queried Type type name if pattern null queried Type null return false if queried Type starts With pattern query registered listeners to see if this pattern breakpoint should be installed in the given target return query Install Listeners target type return false  JavaBreakpoint installableReferenceType ReferenceType installableReferenceType ReferenceType JDIDebugTarget CoreException getSourceName sourceName sourceName sourceName AbsentInformationException RuntimeException targetRequestFailed MessageFormat JDIDebugBreakpointMessages getString JavaPatternBreakpoint exception_source_name toString targetRequestFailed sourceName getSourceName equalsIgnoreCase sourceName getPattern queriedType queriedType queriedType startsWith queryInstallListeners
Adds the class name pattern and hit count attributes to the given map protected void add Pattern And Hit Count Map attributes String source Name String pattern int hit Count attributes put PATTERN pattern if source Name null attributes put SOURCE NAME source Name if hit Count 0 attributes put HIT COUNT new Integer hit Count attributes put EXPIRED Boolean FALSE  addPatternAndHitCount sourceName hitCount sourceName SOURCE_NAME sourceName hitCount HIT_COUNT hitCount
see I Java Pattern Breakpoint get Pattern public String get Pattern throws Core Exception return String ensure Marker get Attribute PATTERN  IJavaPatternBreakpoint getPattern getPattern CoreException ensureMarker getAttribute
see I Java Pattern Breakpoint get Source Name public String get Source Name throws Core Exception return String ensure Marker get Attribute SOURCE NAME  IJavaPatternBreakpoint getSourceName getSourceName CoreException ensureMarker getAttribute SOURCE_NAME

private static final String STRATUM BREAKPOINT org eclipse jdt debug java Stratum Line Breakpoint Marker NON NLS 1 public Java Stratum Line Breakpoint  STRATUM_BREAKPOINT javaStratumLineBreakpointMarker JavaStratumLineBreakpoint
Creates and returns a line breakpoint identified by its source file name and or path and stratum that it is relative to param resource the resource on which to create the associated breakpoint marker param stratum the stratum in which the source name source path and line number are relative or code null code If code null code or if the specified stratum is not defined for a type the source name source path and line number are relative to the type s default stratum param source Name the simple name of the source file in which the breakpoint is set or code null code The breakpoint will install itself in classes that have a source file name debug attribute that matches this value in the specified stratum and satisfies the class name pattern and source path attribute When code null code the source file name debug attribute is not considered param source Path the qualified source file name in which the breakpoint is set or code null code The breakpoint will install itself in classes that have a source file path in the specified stratum that matches this value and satisfies the class name pattern and source name attribute When code null code the source path attribute is not considered param class Name Pattern the class name pattern to which the breakpoint should be restricted or code null code The breakpoint will install itself in each type that matches this class name pattern with a satisfying source name and source path Patterns may begin or end with which matches 0 or more characters A pattern that does not contain a is equivalent to a pattern ending in Specifying code null code or an empty string is the equivalent to param line Number the line Number on which the breakpoint is set line numbers are 1 based associated with the source file stratum in which the breakpoint is set param char Start the first character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param char End the last character index associated with the breakpoint or 1 if unspecified in the source file in which the breakpoint is set param hit Count the number of times the breakpoint will be hit before suspending execution 0 if it should always suspend param register whether to add this breakpoint to the breakpoint manager param attributes a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation or code null code if none return a stratum breakpoint exception Core Exception If this method fails Reasons include ul li Failure creating underlying marker The exception s status contains the underlying exception responsible for the failure li ul since 3 0 public Java Stratum Line Breakpoint I Resource resource String stratum String source Name String source Path String class Name Pattern int line Number int char Start int char End int hit Count boolean register Map attributes throws Debug Exception this resource stratum source Name source Path class Name Pattern line Number char Start char End hit Count register attributes STRATUM BREAKPOINT  sourceName sourcePath classNamePattern lineNumber lineNumber charStart charEnd hitCount CoreException JavaStratumLineBreakpoint IResource sourceName sourcePath classNamePattern lineNumber charStart charEnd hitCount DebugException sourceName sourcePath classNamePattern lineNumber charStart charEnd hitCount STRATUM_BREAKPOINT
I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker marker Type modify pattern String pattern class Name Pattern if pattern null pattern length 0 pattern null add attributes add Line Breakpoint Attributes attributes get Model Identifier true line Number char Start char End add Stratum Pattern And Hit Count attributes stratum source Name source Path pattern hit Count set attributes ensure Marker set Attributes attributes register register  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker markerType classNamePattern addLineBreakpointAttributes getModelIdentifier lineNumber charStart charEnd addStratumPatternAndHitCount sourceName sourcePath hitCount ensureMarker setAttributes
protected Java Stratum Line Breakpoint final I Resource resource final String stratum final String source Name final String source Path final String class Name Pattern final int line Number final int char Start final int char End final int hit Count final boolean register final Map attributes final String marker Type throws Debug Exception I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker marker Type modify pattern String pattern class Name Pattern if pattern null pattern length 0 pattern null add attributes add Line Breakpoint Attributes attributes get Model Identifier true line Number char Start char End add Stratum Pattern And Hit Count attributes stratum source Name source Path pattern hit Count set attributes ensure Marker set Attributes attributes register register run null wr  JavaStratumLineBreakpoint IResource sourceName sourcePath classNamePattern lineNumber charStart charEnd hitCount markerType DebugException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker markerType classNamePattern addLineBreakpointAttributes getModelIdentifier lineNumber charStart charEnd addStratumPatternAndHitCount sourceName sourcePath hitCount ensureMarker setAttributes
Adds the class name pattern and hit count attributes to the gvien map protected void add Stratum Pattern And Hit Count Map attributes String stratum String source Name String source Path String pattern int hit Count attributes put PATTERN pattern attributes put STRATUM stratum if source Name null attributes put SOURCE NAME source Name if source Path null attributes put SOURCE PATH source Path if hit Count 0 attributes put HIT COUNT new Integer hit Count attributes put EXPIRED Boolean FALSE  addStratumPatternAndHitCount sourceName sourcePath hitCount sourceName SOURCE_NAME sourceName sourcePath SOURCE_PATH sourcePath hitCount HIT_COUNT hitCount
Creates the event requests to ul li Listen to class loads related to the breakpoint li li Respond to the breakpoint being hit li ul see org eclipse jdt internal debug core breakpoints Java Breakpoint add To Target org eclipse jdt internal debug core model JDI Debug Target public void add To Target JDI Debug Target target throws Core Exception pre notification fire Adding target String reference Type Name try reference Type Name get Pattern catch Core Exception e JDI Debug Plugin log e return String class Prepare Type Name reference Type Name create request to listen to class loads name may only be partially resolved register Request target create Class Prepare Request class Prepare Type Name target create breakpoint requests for each class currently loaded Virtual Machine vm target getVM if vm null target request Failed JDI Debug Breakpoint Messages get String Java Pattern Breakpoint Unable to add breakpoint   VM disconnected  1 null NON NLS 1 List classes null try classes vm all Classes catch Runtime Exception e target target Request Failed JDI Debug Breakpoint Messages get String Java Pattern Breakpoint 0 e NON NLS 1 if classes null Iterator iter classes iterator while iter has Next Reference Type type Reference Type iter next if installable Reference Type type target create Request target type  JavaBreakpoint addToTarget JDIDebugTarget addToTarget JDIDebugTarget CoreException fireAdding referenceTypeName referenceTypeName getPattern CoreException JDIDebugPlugin classPrepareTypeName referenceTypeName registerRequest createClassPrepareRequest classPrepareTypeName VirtualMachine requestFailed JDIDebugBreakpointMessages getString JavaPatternBreakpoint Unable_to_add_breakpoint_ _VM_disconnected _1 allClasses RuntimeException targetRequestFailed JDIDebugBreakpointMessages getString JavaPatternBreakpoint hasNext ReferenceType ReferenceType installableReferenceType createRequest
protected boolean installable Reference Type Reference Type type JDI Debug Target target throws Core Exception check the type name String type Name type name if valid Type type Name return false String stratum get Stratum check the source name String bp Source Name get Source Name if bp Source Name null List source Names try source Names type source Names stratum catch Absent Information Exception e1 return false if contains Match source Names bp Source Name return false String bp Source Path get Source Path if bp Source Path null check that source paths match List source Paths try source Paths type source Paths stratum catch Absent Information Exception e1 return false if contains Match source Paths bp Source Path return false return query Install Listeners target type  installableReferenceType ReferenceType JDIDebugTarget CoreException typeName validType typeName getStratum bpSourceName getSourceName bpSourceName sourceNames sourceNames sourceNames AbsentInformationException containsMatch sourceNames bpSourceName bpSourcePath getSourcePath bpSourcePath sourcePaths sourcePaths sourcePaths AbsentInformationException containsMatch sourcePaths bpSourcePath queryInstallListeners
private boolean contains Match List strings String key for Iterator iter strings iterator iter has Next if String iter next equals key return true return false  containsMatch hasNext
param type Name return private boolean valid Type String type Name throws Core Exception String pattern get Pattern if pattern char At 0 if pattern length 1 return true else return type Name ends With pattern substring 1 else int length pattern length if pattern char At length 1 return type Name starts With pattern substring 0 length 1 else return type Name starts With pattern  typeName validType typeName CoreException getPattern charAt typeName endsWith charAt typeName startsWith typeName startsWith
Returns a location for the line number in the given type Returns code null code if a location cannot be determined protected Location determine Location int line Number Reference Type type List locations String source Path try locations type locations Of Line get Stratum get Source Name line Number source Path get Source Path catch Absent Information Exception aie I Status status new Status I Status ERROR JDI Debug Plugin get Unique Identifier NO LINE NUMBERS JDI Debug Breakpoint Messages get String Java Line Breakpoint Absent Line Number Information 1 null NON NLS 1 I Status Handler handler Debug Plugin get Default get Status Handler status if handler null try handler handle Status status type catch Core Exception e return null catch Native Method Exception e return null catch Invalid Line Number Exception e possibly in a nested type will be handled when that class is loaded return null catch VM Disconnected Exception e return null catch Class Not Prepared Exception e could be a nested type that is not yet loaded return null catch Runtime Exception e not able to retrieve line info JDI Debug Plugin log e return null catch Core Exception e not able to retrieve line info JDI Debug Plugin log e return null if source Path null if locations size 0 return Location locations get 0 else for Iterator iter locations iterator iter has Next Location location Location iter next try if source Path equals location source Path return location catch Absent Information Exception e1 nothing to do return null  determineLocation lineNumber ReferenceType sourcePath locationsOfLine getStratum getSourceName lineNumber sourcePath getSourcePath AbsentInformationException IStatus IStatus JDIDebugPlugin getUniqueIdentifier NO_LINE_NUMBERS JDIDebugBreakpointMessages getString JavaLineBreakpoint Absent_Line_Number_Information_1 IStatusHandler DebugPlugin getDefault getStatusHandler handleStatus CoreException NativeMethodException InvalidLineNumberException VMDisconnectedException ClassNotPreparedException RuntimeException JDIDebugPlugin CoreException JDIDebugPlugin sourcePath hasNext sourcePath sourcePath AbsentInformationException
see org eclipse jdt debug core I Java Stratum Line Breakpoint get Pattern public String get Pattern throws Core Exception return ensure Marker get Attribute PATTERN NON NLS 1  IJavaStratumLineBreakpoint getPattern getPattern CoreException ensureMarker getAttribute
see org eclipse jdt debug core I Java Stratum Line Breakpoint get Source Name public String get Source Name throws Core Exception return String ensure Marker get Attribute SOURCE NAME  IJavaStratumLineBreakpoint getSourceName getSourceName CoreException ensureMarker getAttribute SOURCE_NAME
see org eclipse jdt debug core I Java Stratum Line Breakpoint get Stratum public String get Stratum throws Core Exception return String ensure Marker get Attribute STRATUM  IJavaStratumLineBreakpoint getStratum getStratum CoreException ensureMarker getAttribute
see org eclipse jdt debug core I Java Stratum Line Breakpoint get Source Path public String get Source Path throws Core Exception return String ensure Marker get Attribute SOURCE PATH  IJavaStratumLineBreakpoint getSourcePath getSourcePath CoreException ensureMarker getAttribute SOURCE_PATH

private Hash Map f Patterns public Java Target Pattern Breakpoint  HashMap fPatterns JavaTargetPatternBreakpoint
see JDI Debug Model create Target Pattern Breakpoint I Resource String int int int int boolean Map public Java Target Pattern Breakpoint I Resource resource String source Name int line Number int char Start int char End int hit Count boolean add Map attributes throws Debug Exception this resource source Name line Number char Start char End hit Count add attributes TARGET PATTERN BREAKPOINT  JDIDebugModel createTargetPatternBreakpoint IResource JavaTargetPatternBreakpoint IResource sourceName lineNumber charStart charEnd hitCount DebugException sourceName lineNumber charStart charEnd hitCount TARGET_PATTERN_BREAKPOINT
I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker marker Type add attributes add Line Breakpoint Attributes attributes get Model Identifier true line Number char Start char End add Source Name And Hit Count attributes source Name hit Count set attributes ensure Marker set Attributes attributes register add  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker markerType addLineBreakpointAttributes getModelIdentifier lineNumber charStart charEnd addSourceNameAndHitCount sourceName hitCount ensureMarker setAttributes
public Java Target Pattern Breakpoint final I Resource resource final String source Name final int line Number final int char Start final int char End final int hit Count final boolean add final Map attributes final String marker Type throws Debug Exception I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception create the marker set Marker resource create Marker marker Type add attributes add Line Breakpoint Attributes attributes get Model Identifier true line Number char Start char End add Source Name And Hit Count attributes source Name hit Count set attributes ensure Marker set Attributes attributes register add run null wr  JavaTargetPatternBreakpoint IResource sourceName lineNumber charStart charEnd hitCount markerType DebugException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker markerType addLineBreakpointAttributes getModelIdentifier lineNumber charStart charEnd addSourceNameAndHitCount sourceName hitCount ensureMarker setAttributes
Creates the event requests to ul li Listen to class loads related to the breakpoint li li Respond to the breakpoint being hit li ul public void add To Target JDI Debug Target target throws Core Exception pre notification fire Adding target String reference Type Name get Pattern target if reference Type Name null return String class Prepare Type Name reference Type Name create request to listen to class loads name may only be partially resolved if reference Type Name ends With NON NLS 1 class Prepare Type Name class Prepare Type Name register Request target create Class Prepare Request class Prepare Type Name target create breakpoint requests for each class currently loaded Virtual Machine vm target getVM if vm null target request Failed JDI Debug Breakpoint Messages get String Java Target Pattern Breakpoint Unable to add breakpoint   VM disconnected  1 null NON NLS 1 List classes vm all Classes if classes null Iterator iter classes iterator String type Name null Reference Type type null while iter has Next type Reference Type iter next type Name type name if type Name null type Name starts With reference Type Name create Request target type  addToTarget JDIDebugTarget CoreException fireAdding referenceTypeName getPattern referenceTypeName classPrepareTypeName referenceTypeName referenceTypeName endsWith classPrepareTypeName classPrepareTypeName registerRequest createClassPrepareRequest classPrepareTypeName VirtualMachine requestFailed JDIDebugBreakpointMessages getString JavaTargetPatternBreakpoint Unable_to_add_breakpoint_ _VM_disconnected _1 allClasses typeName ReferenceType hasNext ReferenceType typeName typeName typeName startsWith referenceTypeName createRequest
see Java Breakpoint get Reference Type Name protected String get Reference Type Name String name NON NLS 1 try name get Source Name catch Core Exception ce JDI Debug Plugin log ce return name  JavaBreakpoint getReferenceTypeName getReferenceTypeName getSourceName CoreException JDIDebugPlugin
see Java Breakpoint installable Reference Type Reference Type protected boolean installable Reference Type Reference Type type JDI Debug Target target throws Core Exception if the source name attribute is specified check for a match with the debug attribute if available if get Source Name null String source Name null try source Name type source Name catch Absent Information Exception e unable to compare catch Runtime Exception e target target Request Failed Message Format format JDI Debug Breakpoint Messages get String Java Pattern Breakpoint exception source name new String e to String type name e NON NLS 1 execution will not reach this line as target Request Failed will throw an exception return false if the debug attribute matches the source name attempt installion if source Name null if get Source Name equals Ignore Case source Name return false String pattern get Pattern target String queried Type type name if pattern null queried Type null return false if queried Type starts With pattern query registered listeners to see if this pattern breakpoint should be installed in the given target return query Install Listeners target type return false  JavaBreakpoint installableReferenceType ReferenceType installableReferenceType ReferenceType JDIDebugTarget CoreException getSourceName sourceName sourceName sourceName AbsentInformationException RuntimeException targetRequestFailed MessageFormat JDIDebugBreakpointMessages getString JavaPatternBreakpoint exception_source_name toString targetRequestFailed sourceName getSourceName equalsIgnoreCase sourceName getPattern queriedType queriedType queriedType startsWith queryInstallListeners
Adds the source name and hit count attributes to the given map protected void add Source Name And Hit Count Map attributes String source Name int hit Count if source Name null attributes put SOURCE NAME source Name if hit Count 0 attributes put HIT COUNT new Integer hit Count attributes put EXPIRED Boolean FALSE  addSourceNameAndHitCount sourceName hitCount sourceName SOURCE_NAME sourceName hitCount HIT_COUNT hitCount
see I Java Target Pattern Breakpoint get Pattern I Java Debug Target public String get Pattern I Java Debug Target target if f Patterns null return String f Patterns get target return null  IJavaTargetPatternBreakpoint getPattern IJavaDebugTarget getPattern IJavaDebugTarget fPatterns fPatterns
see I Java Target Pattern Breakpoint set Pattern I Java Debug Target String public void set Pattern I Java Debug Target target String pattern throws Core Exception if f Patterns null f Patterns new Hash Map 2 if pattern is changing then remove and re add String old Pattern get Pattern target f Patterns put target pattern if old Pattern null old Pattern equals pattern recreate JDI Debug Target target fire Changed  IJavaTargetPatternBreakpoint setPattern IJavaDebugTarget setPattern IJavaDebugTarget CoreException fPatterns fPatterns HashMap oldPattern getPattern fPatterns oldPattern oldPattern JDIDebugTarget fireChanged
see I Java Target Pattern Breakpoint get Source Name public String get Source Name throws Core Exception return String ensure Marker get Attribute SOURCE NAME  IJavaTargetPatternBreakpoint getSourceName getSourceName CoreException ensureMarker getAttribute SOURCE_NAME
see org eclipse jdt internal debug core breakpoints Java Breakpoint remove From Target JDI Debug Target public void remove From Target JDI Debug Target target throws Core Exception f Patterns remove target super remove From Target target  JavaBreakpoint removeFromTarget JDIDebugTarget removeFromTarget JDIDebugTarget CoreException fPatterns removeFromTarget

private Hash Map f Last Event Types new Hash Map 10 NON NLS 1 public Java Watchpoint  HashMap fLastEventTypes HashMap JavaWatchpoint
I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception set Marker resource create Marker JAVA WATCHPOINT add attributes add Line Breakpoint Attributes attributes get Model Identifier true line Number char Start char End add Type Name And Hit Count attributes type Name hit Count configure the field handle add Field Name attributes field Name configure the access and modification flags to defaults add Default Access And Modification attributes set attributes ensure Marker set Attributes attributes register add  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker JAVA_WATCHPOINT addLineBreakpointAttributes getModelIdentifier lineNumber charStart charEnd addTypeNameAndHitCount typeName hitCount addFieldName fieldName addDefaultAccessAndModification ensureMarker setAttributes
see JDI Debug Model create Watchpoint I Resource String String int int int int boolean Map public Java Watchpoint final I Resource resource final String type Name final String field Name final int line Number final int char Start final int char End final int hit Count final boolean add final Map attributes throws Debug Exception I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception set Marker resource create Marker JAVA WATCHPOINT add attributes add Line Breakpoint Attributes attributes get Model Identifier true line Number char Start char End add Type Name And Hit Count attributes type Name hit Count configure the field handle add Field Name attributes field Name configure the access and modification flags to defaults add Default Access And Modification attributes set attributes ensure Marker set Attributes attributes register add run null wr  JDIDebugModel createWatchpoint IResource JavaWatchpoint IResource typeName fieldName lineNumber charStart charEnd hitCount DebugException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException setMarker createMarker JAVA_WATCHPOINT addLineBreakpointAttributes getModelIdentifier lineNumber charStart charEnd addTypeNameAndHitCount typeName hitCount addFieldName fieldName addDefaultAccessAndModification ensureMarker setAttributes
see Java Breakpoint create Request JDI Debug Target Reference Type Creates and installs an access and modification watchpoint request in the given reference type configuring the requests as appropriate for this watchpoint The requests are then enabled based on whether this watchpoint is an access watchpoint modification watchpoint or both Finally the requests are registered with the given target protected boolean create Request JDI Debug Target target Reference Type type throws Core Exception if should Skip Breakpoint return false Field field null field type field By Name get Field Name if field null error return false Access Watchpoint Request access Request null Modification Watchpoint Request modification Request null if target supports Access Watchpoints access Request create Access Watchpoint target field register Request access Request target else not Supported JDI Debug Breakpoint Messages get String Java Watchpoint no access watchpoints NON NLS 1 if target supports Modification Watchpoints modification Request create Modification Watchpoint target field if modification Request null return false register Request modification Request target return true else not Supported JDI Debug Breakpoint Messages get String Java Watchpoint no modification watchpoints NON NLS 1 return false  JavaBreakpoint createRequest JDIDebugTarget ReferenceType createRequest JDIDebugTarget ReferenceType CoreException shouldSkipBreakpoint fieldByName getFieldName AccessWatchpointRequest accessRequest ModificationWatchpointRequest modificationRequest supportsAccessWatchpoints accessRequest createAccessWatchpoint registerRequest accessRequest notSupported JDIDebugBreakpointMessages getString JavaWatchpoint no_access_watchpoints supportsModificationWatchpoints modificationRequest createModificationWatchpoint modificationRequest registerRequest modificationRequest notSupported JDIDebugBreakpointMessages getString JavaWatchpoint no_modification_watchpoints
see Java Breakpoint set Request Thread Filter Event Request protected void set Request Thread Filter Event Request request Thread Reference thread Watchpoint Request request add Thread Filter thread  JavaBreakpoint setRequestThreadFilter EventRequest setRequestThreadFilter EventRequest ThreadReference WatchpointRequest addThreadFilter
Either access or modification watchpoints are not supported Throw an appropriate exception param message the message that states that access or modification watchpoints are not supported protected void not Supported String message throws Debug Exception throw new Debug Exception new Status I Status ERROR Debug Plugin get Unique Identifier Debug Exception NOT SUPPORTED message null NON NLS 1  notSupported DebugException DebugException IStatus DebugPlugin getUniqueIdentifier DebugException NOT_SUPPORTED
Create an access watchpoint for the given breakpoint and associated field protected Access Watchpoint Request create Access Watchpoint JDI Debug Target target Field field throws Core Exception return Access Watchpoint Request create Watchpoint target field true  AccessWatchpointRequest createAccessWatchpoint JDIDebugTarget CoreException AccessWatchpointRequest createWatchpoint
Create a modification watchpoint for the given breakpoint and associated field protected Modification Watchpoint Request create Modification Watchpoint JDI Debug Target target Field field throws Core Exception return Modification Watchpoint Request create Watchpoint target field false  ModificationWatchpointRequest createModificationWatchpoint JDIDebugTarget CoreException ModificationWatchpointRequest createWatchpoint
Create a watchpoint for the given breakpoint and associated field param target the target in which the request will be installed param field the field on which the request will be set param access code true code if an access watchpoint will be created code false code if a modification watchpoint will be created return an Watchpoint Request Access Watchpoint Request if access is code true code Modification Watchpoint Request if access is code false code protected Watchpoint Request create Watchpoint JDI Debug Target target Field field boolean access throws Core Exception Watchpoint Request request null Event Request Manager manager target get Event Request Manager if manager null target request Failed JDI Debug Breakpoint Messages get String Java Watchpoint Unable to create breakpoint request   VM disconnected  1 null NON NLS 1 try if access request manager create Access Watchpoint Request field else request manager create Modification Watchpoint Request field configure Request request target catch VM Disconnected Exception e if target is Available return null target internal Error e return null catch Runtime Exception e target internal Error e return null return request  WatchpointRequest AccessWatchpointRequest ModificationWatchpointRequest WatchpointRequest createWatchpoint JDIDebugTarget CoreException WatchpointRequest EventRequestManager getEventRequestManager requestFailed JDIDebugBreakpointMessages getString JavaWatchpoint Unable_to_create_breakpoint_request_ _VM_disconnected _1 createAccessWatchpointRequest createModificationWatchpointRequest configureRequest VMDisconnectedException isAvailable internalError RuntimeException internalError
see Java Breakpoint recreate Request Event Request JDI Debug Target protected Event Request recreate Request Event Request request JDI Debug Target target throws Core Exception try Field field Watchpoint Request request field if request instanceof Access Watchpoint Request request create Access Watchpoint target field else if request instanceof Modification Watchpoint Request request create Modification Watchpoint target field catch VM Disconnected Exception e if target is Available return request target internal Error e return request catch Runtime Exception e JDI Debug Plugin log e return request  JavaBreakpoint recreateRequest EventRequest JDIDebugTarget EventRequest recreateRequest EventRequest JDIDebugTarget CoreException WatchpointRequest AccessWatchpointRequest createAccessWatchpoint ModificationWatchpointRequest createModificationWatchpoint VMDisconnectedException isAvailable internalError RuntimeException JDIDebugPlugin
see I Breakpoint set Enabled boolean If the watchpoint is not watching access or modification set the default values If this isn t done the resulting state enabled with access and modification both disabled is ambiguous public void set Enabled boolean enabled throws Core Exception if enabled if is Access is Modification set Default Access And Modification super set Enabled enabled  IBreakpoint setEnabled setEnabled CoreException isAccess isModification setDefaultAccessAndModification setEnabled
see I Java Watchpoint is Access public boolean is Access throws Core Exception return ensure Marker get Attribute ACCESS false  IJavaWatchpoint isAccess isAccess CoreException ensureMarker getAttribute
see I Java Watchpoint set Access boolean public void set Access boolean access throws Core Exception if access is Access return set Attribute ACCESS access if access is Enabled set Enabled true else if access is Modification set Enabled false recreate  IJavaWatchpoint setAccess setAccess CoreException isAccess setAttribute isEnabled setEnabled isModification setEnabled
see I Java Watchpoint is Modification public boolean is Modification throws Core Exception return ensure Marker get Attribute MODIFICATION false  IJavaWatchpoint isModification isModification CoreException ensureMarker getAttribute
see I Java Watchpoint set Modification boolean public void set Modification boolean modification throws Core Exception if modification is Modification return set Attribute MODIFICATION modification if modification is Enabled set Enabled true else if modification is Access set Enabled false recreate  IJavaWatchpoint setModification setModification CoreException isModification setAttribute isEnabled setEnabled isAccess setEnabled
Sets the default access and modification attributes of the watchpoint The default values are ul li access code false code li modification code true code ul protected void set Default Access And Modification throws Core Exception Object values new Object Boolean TRUE Boolean TRUE String attributes new String ACCESS MODIFICATION set Attributes attributes values  setDefaultAccessAndModification CoreException setAttributes
Adds the default access and modification attributes of the watchpoint to the given map ul li access true li modification true li auto disabled false ul protected void add Default Access And Modification Map attributes attributes put ACCESS Boolean TRUE attributes put MODIFICATION Boolean TRUE attributes put AUTO DISABLED Boolean FALSE  addDefaultAccessAndModification AUTO_DISABLED
Adds the field name to the given attribute map protected void add Field Name Map attributes String field Name attributes put FIELD NAME field Name  addFieldName fieldName FIELD_NAME fieldName
see I Java Watchpoint get Field Name public String get Field Name throws Core Exception return ensure Marker get Attribute FIELD NAME null  IJavaWatchpoint getFieldName getFieldName CoreException ensureMarker getAttribute FIELD_NAME
Store the type of the event then handle it as specified in the superclass This is useful for correctly generating the thread text when asked assumes thread text is requested after the event is passed to this breakpoint Also see Java Breakpoint handle Event Event JDI Debug Target public boolean handle Event Event event JDI Debug Target target if event instanceof Access Watchpoint Event f Last Event Types put target ACCESS EVENT else if event instanceof Modification Watchpoint Event f Last Event Types put target MODIFICATION EVENT return super handle Event event target  JavaBreakpoint handleEvent JDIDebugTarget handleEvent JDIDebugTarget AccessWatchpointEvent fLastEventTypes ACCESS_EVENT ModificationWatchpointEvent fLastEventTypes MODIFICATION_EVENT handleEvent
see Java Breakpoint update Enabled State Event Request protected void update Enabled State Event Request request throws Core Exception boolean enabled is Enabled if request instanceof Access Watchpoint Request if is Access if enabled request is Enabled internal Update Enabled State request enabled else if request is Enabled internal Update Enabled State request false if request instanceof Modification Watchpoint Request if is Modification if enabled request is Enabled internal Update Enabled State request enabled else if request is Enabled internal Update Enabled State request false  JavaBreakpoint updateEnabledState EventRequest updateEnabledState EventRequest CoreException isEnabled AccessWatchpointRequest isAccess isEnabled internalUpdateEnabledState isEnabled internalUpdateEnabledState ModificationWatchpointRequest isModification isEnabled internalUpdateEnabledState isEnabled internalUpdateEnabledState
see I Java Watchpoint is Access Suspend I Debug Target public boolean is Access Suspend I Debug Target target Integer last Event Type Integer f Last Event Types get target if last Event Type null return false return last Event Type equals ACCESS EVENT  IJavaWatchpoint isAccessSuspend IDebugTarget isAccessSuspend IDebugTarget lastEventType fLastEventTypes lastEventType lastEventType ACCESS_EVENT
see I Java Line Breakpoint supports Condition public boolean supports Condition return false  IJavaLineBreakpoint supportsCondition supportsCondition
see org eclipse jdt internal debug core breakpoints Java Breakpoint remove From Target JDI Debug Target public void remove From Target JDI Debug Target target throws Core Exception f Last Event Types remove target super remove From Target target  JavaBreakpoint removeFromTarget JDIDebugTarget removeFromTarget JDIDebugTarget CoreException fLastEventTypes removeFromTarget
see org eclipse jdt internal debug core breakpoints Java Breakpoint add Instance Filter Event Request Object Reference protected void add Instance Filter Event Request request Object Reference object if request instanceof Watchpoint Request Watchpoint Request request add Instance Filter object  JavaBreakpoint addInstanceFilter EventRequest ObjectReference addInstanceFilter EventRequest ObjectReference WatchpointRequest WatchpointRequest addInstanceFilter

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private JDI Debug Breakpoint Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE JDIDebugBreakpointMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

Constructs a new event dispatcher listening for events originating from the specified debug target s underlying VM param target the target this event dispatcher belongs to public Event Dispatcher JDI Debug Target target f Event Handlers new Hash Map 10 f Target target f Shutdown false  EventDispatcher JDIDebugTarget fEventHandlers HashMap fTarget fShutdown
Dispatch the given event set param event Set events to dispatch protected void dispatch Event Set event Set if is Shutdown return Event Iterator iter event Set event Iterator boolean vote false boolean resume true while iter has Next if is Shutdown return Event event iter next Event if event null continue Dispatch events to registered listeners if any IJDI Event Listener listener IJDI Event Listener f Event Handlers get event request if listener null if listener instanceof I Java Line Breakpoint Event dispatch to conditional breakpoints is deferred until after other listeners vote try if I Java Line Breakpoint listener is Condition Enabled defer event continue catch Core Exception exception JDI Debug Plugin log exception vote true resume listener handle Event event f Target resume continue Dispatch VM start end events if event instanceof VM Death Event f Target handleVM Death VM Death Event event shutdown stop listening for events else if event instanceof VM Disconnect Event f Target handleVM Disconnect VM Disconnect Event event shutdown stop listening for events else if event instanceof VM Start Event f Target handleVM Start VM Start Event event else Unhandled Event if resume process deferred events if event handlers have voted to resume the thread if get Deferred Events is Empty Iterator deferred Iter get Deferred Events iterator while deferred Iter has Next if is Shutdown return Event event Event deferred Iter next if event null continue Dispatch events to registered listeners if any IJDI Event Listener listener IJDI Event Listener f Event Handlers get event request if listener null vote true resume listener handle Event event f Target resume continue clear any deferred events processed or not get Deferred Events clear fire Events if vote resume try event Set resume catch VM Disconnected Exception e catch Runtime Exception e try f Target target Request Failed JDI Debug Messages get String Event Dispatcher 0 e NON NLS 1 catch Debug Exception de JDI Debug Plugin log de  eventSet EventSet eventSet isShutdown EventIterator eventSet eventIterator hasNext isShutdown nextEvent IJDIEventListener IJDIEventListener fEventHandlers IJavaLineBreakpoint IJavaLineBreakpoint isConditionEnabled CoreException JDIDebugPlugin handleEvent fTarget VMDeathEvent fTarget handleVMDeath VMDeathEvent VMDisconnectEvent fTarget handleVMDisconnect VMDisconnectEvent VMStartEvent fTarget handleVMStart VMStartEvent getDeferredEvents isEmpty deferredIter getDeferredEvents deferredIter hasNext isShutdown deferredIter IJDIEventListener IJDIEventListener fEventHandlers handleEvent fTarget getDeferredEvents fireEvents eventSet VMDisconnectedException RuntimeException fTarget targetRequestFailed JDIDebugMessages getString EventDispatcher DebugException JDIDebugPlugin
Continuously reads events that are coming from the event queue until this event dispatcher is shutdown A debug target starts a thread on this method on startup see shutdown public void run Virtual Machine vm f Target getVM if vm null Event Queue q vm event Queue Event Set event Set null while is Shutdown try try Get the next event set event Set q remove if event Set null break catch VM Disconnected Exception e break if is Shutdown dispatch event Set catch Interrupted Exception e break  VirtualMachine fTarget EventQueue eventQueue EventSet eventSet isShutdown eventSet eventSet VMDisconnectedException isShutdown eventSet InterruptedException
Shutdown this event dispatcher i e causes this event dispatcher to stop reading and dispatching events from the event queue The thread associated with this runnable will exit public void shutdown f Shutdown true  fShutdown
Returns whether this event dispatcher has been shutdown return whether this event dispatcher has been shutdown protected boolean is Shutdown return f Shutdown  isShutdown fShutdown
Registers the given listener for with the given event request When an event is received from the underlying VM that is assocaited with the given event request the listener will be notified param listener the listener to register param request the event request associated with events the listener is interested in public void addJDI Event Listener IJDI Event Listener listener Event Request request f Event Handlers put request listener  addJDIEventListener IJDIEventListener EventRequest fEventHandlers
Deregisters the given listener and event request The listener will no longer be notified of events associated with the request Listeners are responsible for deleting the assocaited event request if required param listener the listener to deregister param request the event request to deregister public void removeJDI Event Listener IJDI Event Listener listener Event Request request f Event Handlers remove request  removeJDIEventListener IJDIEventListener EventRequest fEventHandlers
Adds the given event to the queue of debug events to fire when done dispatching events from the current event set param event the event to queue public void queue Debug Event event f Debug Events add event  DebugEvent fDebugEvents
Fires debug events in the event queue and clears the queue protected void fire Events Debug Plugin plugin Debug Plugin get Default if plugin null check that not in the process of shutting down Debug Event events Debug Event f Debug Events to Array new Debug Event f Debug Events size f Debug Events clear plugin fire Debug Event Set events  fireEvents DebugPlugin DebugPlugin getDefault DebugEvent DebugEvent fDebugEvents toArray DebugEvent fDebugEvents fDebugEvents fireDebugEventSet
Defer the given event to be handled after all other events in an event set param event event to defer protected void defer Event event f Deferred Events add event  fDeferredEvents
Returns the events currently deferred return deferred events protected List get Deferred Events return f Deferred Events  getDeferredEvents fDeferredEvents

Simple Java Element Simple Java Element parent String name f Name name if parent null if parent f Children null parent f Children new Hash Map parent f Children put name this  SimpleJavaElement SimpleJavaElement fName fChildren fChildren HashMap fChildren
void dump int level for int i 0 i level i System out print NON NLS 1 System out println f Name if f Children null Iterator iter f Children values iterator while iter has Next Simple Java Element e Simple Java Element iter next e dump level 1  fName fChildren fChildren hasNext SimpleJavaElement SimpleJavaElement
boolean find String path int start if start path length return true String key path start if f Children null Simple Java Element child Simple Java Element f Children get key if child null return child find path start 1 return false  fChildren SimpleJavaElement SimpleJavaElement fChildren
public I Problem create Problem char originating File Name int problem Id String problem Arguments String message Arguments int severity int start Position int end Position int line Number if severity Problem Severities Error 0 throw new Parse Error return null  IProblem createProblem originatingFileName problemId problemArguments messageArguments startPosition endPosition lineNumber ProblemSeverities ParseError
public Locale get Locale return Locale get Default  getLocale getDefault
public String get Localized Message int problem Id String problem Arguments return problem Id NON NLS 1  getLocalizedMessage problemId problemArguments problemId
Differencer differencer new Differencer protected Object visit Object data int result Object ancestor Object left Object right String name null switch result case Differencer CHANGE name Java Node left get Id break case Differencer ADDITION name Java Node right get Id break case Differencer DELETION name Java Node left get Id member Deleted 0 true break default break if name null return new Simple Java Element Simple Java Element data name return null  JavaNode getId JavaNode getId JavaNode getId memberDeleted SimpleJavaElement SimpleJavaElement
protected boolean contents Equal Object o1 Object o2 String s1 Java Node o1 get Contents String s2 Java Node o2 get Contents return s1 equals s2  contentsEqual JavaNode getContents JavaNode getContents
protected Object get Children Object input if input instanceof Java Node return Java Node input get Children return null  getChildren JavaNode JavaNode getChildren
Creates a new code Compilation Unit Delta object that calculates and stores the changes of the given CU since some point in time public Compilation Unit Delta I Compilation Unit cu long timestamp throws Core Exception if cu is Working Copy cu cu get Primary find underlying file I File file I File cu get Underlying Resource get available editions I File State states file get History null if states null states length 0 return f Has History true I File State found null find edition just before the given time stamp for int i 0 i states length i I File State state states i long d state get Modification Time if d timestamp found state break if found null found states states length 1 Input Stream old Contents null Input Stream new Contents null try old Contents found get Contents new Contents file get Contents catch Core Exception ex return Java Node old Structure parse old Contents Java Node new Structure parse new Contents final boolean member Deleted new boolean 1 visitor returns result here Differencer differencer new Differencer protected Object visit Object data int result Object ancestor Object left Object right String name null switch result case Differencer CHANGE name Java Node left get Id break case Differencer ADDITION name Java Node right get Id break case Differencer DELETION name Java Node left get Id member Deleted 0 true break default break if name null return new Simple Java Element Simple Java Element data name return null protected boolean contents Equal Object o1 Object o2 String s1 Java Node o1 get Contents String s2 Java Node o2 get Contents return s1 equals s2 protected Object get Children Object input if input instanceof Java Node return Java Node input get Children return null f Root Simple Java Element differencer find Differences false null null null old Structure new Structure f Has History f Root null if no changes pretend that we had no history if DEBUG if f Root null f Root dump 0 if member Deleted 0 shape change because of deleted members f Root null throw diffs away since has Changed must always return true  CompilationUnitDelta CompilationUnitDelta ICompilationUnit CoreException isWorkingCopy getPrimary IFile IFile getUnderlyingResource IFileState getHistory fHasHistory IFileState IFileState getModificationTime InputStream oldContents InputStream newContents oldContents getContents newContents getContents CoreException JavaNode oldStructure oldContents JavaNode newStructure newContents memberDeleted JavaNode getId JavaNode getId JavaNode getId memberDeleted SimpleJavaElement SimpleJavaElement contentsEqual JavaNode getContents JavaNode getContents getChildren JavaNode JavaNode getChildren fRoot SimpleJavaElement findDifferences oldStructure newStructure fHasHistory fRoot fRoot fRoot memberDeleted fRoot hasChanged
Returns code true code ul li if the source of the given member has been changed or li if the element has been deleted or li if the element has been newly created ul after the initial timestamp exception Assertion Failed Exception if member is null or member is not a member of this CU public boolean has Changed I Member member Assert is Not Null member I Compilation Unit cu member get Compilation Unit if cu is Working Copy cu cu get Primary Assert is True cu equals f Compilation Unit if f Root null if f Has History return true pessimistic we have a history but we couldn t use it for some reason return false optimistic we have no history so assume that member hasn t changed String path create Path member if DEBUG for int i 0 i path length i System out print path i System out println return f Root find path 0  AssertionFailedException hasChanged IMember isNotNull ICompilationUnit getCompilationUnit isWorkingCopy getPrimary isTrue fCompilationUnit fRoot fHasHistory createPath fRoot
Parses the given input stream and returns a tree of Java Nodes or a null in case of failure private static Java Node parse Input Stream input char buffer read String input if buffer null Java Node root new Java Node buffer Java Parse Tree Builder builder new Java Parse Tree Builder root buffer Source Element Parser parser new Source Element Parser builder new Problem Factory new Compiler Options Java Core get Options try parser parse Compilation Unit builder false catch Parse Error ex parse error bail out return null return root return null  JavaNodes JavaNode InputStream readString JavaNode JavaNode JavaParseTreeBuilder JavaParseTreeBuilder SourceElementParser SourceElementParser ProblemFactory CompilerOptions JavaCore getOptions parseCompilationUnit ParseError
private static String create Path I Java Element je build a path starting at the given Java element and walk up the parent chain until we reach an I Compilation Unit List args new Array List while je null each path component has a name that uses the same conventions as a Java Node name String name get Java ElementID je if name null return null args add name if je instanceof I Compilation Unit break je je get Parent revert the path int n args size String path new String n for int i 0 i n i path i String args get n 1 i return path  createPath IJavaElement ICompilationUnit ArrayList JavaNode getJavaElementID ICompilationUnit getParent
Returns a name for the given Java element that uses the same conventions as the Java Node name of a corresponding element private static String get Java ElementID I Java Element je if je instanceof I Member I Member je is Binary return null String Buffer sb new String Buffer switch je get Element Type case I Java Element COMPILATION UNIT sb append Java Element JEM COMPILATIONUNIT break case I Java Element TYPE sb append Java Element JEM TYPE sb append je get Element Name break case I Java Element FIELD sb append Java Element JEM FIELD sb append je get Element Name break case I Java Element METHOD sb append Java Element JEM METHOD I Method method I Method je sb append method get Element Name parameters sb append String types method get Parameter Types int n Params types null types length 0 for int i 0 i n Params i if i 0 sb append NON NLS 1 if types null sb append unqualify Name Signature get Simple Name Signature to String types i sb append break case I Java Element INITIALIZER String id je get Handle Identifier int pos id last Index Of Java Element JEM INITIALIZER if pos 0 sb append id substring pos break case I Java Element PACKAGE DECLARATION sb append Java Element JEM PACKAGEDECLARATION break case I Java Element IMPORT CONTAINER sb append break case I Java Element IMPORT DECLARATION sb append Java Element JEM IMPORTDECLARATION sb append je get Element Name break default return null return sb to String  JavaNode getJavaElementID IJavaElement IMember IMember isBinary StringBuffer StringBuffer getElementType IJavaElement COMPILATION_UNIT JavaElement JEM_COMPILATIONUNIT IJavaElement JavaElement JEM_TYPE getElementName IJavaElement JavaElement JEM_FIELD getElementName IJavaElement JavaElement JEM_METHOD IMethod IMethod getElementName getParameterTypes nParams nParams unqualifyName getSimpleName toString IJavaElement getHandleIdentifier lastIndexOf JavaElement JEM_INITIALIZER IJavaElement PACKAGE_DECLARATION JavaElement JEM_PACKAGEDECLARATION IJavaElement IMPORT_CONTAINER IJavaElement IMPORT_DECLARATION JavaElement JEM_IMPORTDECLARATION getElementName toString
private static String unqualify Name String qualified Name int index qualified Name last Index Of if index 1 return qualified Name substring index 1 return qualified Name  unqualifyName qualifiedName qualifiedName lastIndexOf qualifiedName qualifiedName
Returns null if an error occurred private static char read String Input Stream is if is null return null Buffered Reader reader null try String Buffer buffer new String Buffer char part new char 2048 int read 0 reader new Buffered Reader new Input Stream Reader is Resources Plugin get Encoding while read reader read part 1 buffer append part 0 read char b new char buffer length buffer get Chars 0 b length b 0 return b catch IO Exception ex finally if reader null try reader close catch IO Exception ex return null  readString InputStream BufferedReader StringBuffer StringBuffer BufferedReader InputStreamReader ResourcesPlugin getEncoding getChars IOException IOException

Object f Right Node  fRight
Node Node parent Object ancestor Object left Object right parent add this f Ancestor ancestor f Left left f Right right  fAncestor fLeft fRight
void add Node child if f Children null f Children new Array List f Children add child  fChildren fChildren ArrayList fChildren
Object visit Differencer d Object parent int level if f Code NO CHANGE return null dump level Object data d visit parent f Code f Ancestor f Left f Right if f Children null Iterator i f Children iterator while i has Next Node n Node i next n visit d data level 1 return data  fCode NO_CHANGE fCode fAncestor fLeft fRight fChildren fChildren hasNext
Creates a new differencing engine public Differencer 
Starts the differencing engine on the three input objects If three Way is code true code a three way comparison is performed otherwise a two way compare in the latter case the ancestor argument is ignored The progress monitor is passed to the method code update Progress code which is called for every node or leaf compare The method returns the object that was returned from the top most call to method code visit code At most two of the ancestor left and right parameters are allowed to be code null code param three Way if code true code a three way comparison is performed otherwise a two way compare param pm a progress monitor which is passed to method code update Progress code param data a client data that is passed to the top level call to code visit code param ancestor the ancestor object of the compare may be code null code param left the left object of the compare param right the right object of the compare return the object returned from the top most call to method code visit code possibly code null code public Object find Differences boolean three Way I Progress Monitor pm Object data Object ancestor Object left Object right Node root new Node int code traverse three Way root pm three Way ancestor null left right if code NO CHANGE List l root f Children if l size 0 Node first Node l get 0 return first visit this data 0 return null  threeWay updateProgress threeWay updateProgress findDifferences threeWay IProgressMonitor threeWay threeWay NO_CHANGE fChildren
Traverse tree in postorder private int traverse boolean three Way Node parent I Progress Monitor pm Object ancestor Object left Object right Object ancestor Children get Children ancestor Object right Children get Children right Object left Children get Children left int code NO CHANGE Node node new Node parent ancestor left right boolean content true we reset this if we have at least one child if three Way ancestor Children null three Way right Children null left Children null we only recurse down if no leg is null a node Set all Set new Hash Set 20 Map ancestor Set null Map right Set null Map left Set null if ancestor Children null ancestor Set new Hash Map 10 for int i 0 i ancestor Children length i Object ancestor Child ancestor Children i ancestor Set put ancestor Child ancestor Child all Set add ancestor Child if right Children null right Set new Hash Map 10 for int i 0 i right Children length i Object right Child right Children i right Set put right Child right Child all Set add right Child if left Children null left Set new Hash Map 10 for int i 0 i left Children length i Object left Child left Children i left Set put left Child left Child all Set add left Child Iterator e all Set iterator while e has Next Object key Child e next content false if pm null if pm is Canceled throw new Operation Canceled Exception Object ancestor Child ancestor Set null ancestor Set get key Child null Object left Child left Set null left Set get key Child null Object right Child right Set null right Set get key Child null int c traverse three Way node pm ancestor Child left Child right Child if c CHANGE TYPE MASK NO CHANGE code CHANGE deletions and additions of child result in a change of the container code c DIRECTION MASK incoming outgoing are just ored if content a leaf code compare three Way ancestor left right node f Code code return code  threeWay IProgressMonitor ancestorChildren getChildren rightChildren getChildren leftChildren getChildren NO_CHANGE threeWay ancestorChildren threeWay rightChildren leftChildren allSet HashSet ancestorSet rightSet leftSet ancestorChildren ancestorSet HashMap ancestorChildren ancestorChild ancestorChildren ancestorSet ancestorChild ancestorChild allSet ancestorChild rightChildren rightSet HashMap rightChildren rightChild rightChildren rightSet rightChild rightChild allSet rightChild leftChildren leftSet HashMap leftChildren leftChild leftChildren leftSet leftChild leftChild allSet leftChild allSet hasNext keyChild isCanceled OperationCanceledException ancestorChild ancestorSet ancestorSet keyChild leftChild leftSet leftSet keyChild rightChild rightSet rightSet keyChild threeWay ancestorChild leftChild rightChild CHANGE_TYPE_MASK NO_CHANGE DIRECTION_MASK threeWay fCode
Called for every node or leaf comparison The differencing engine passes in the input objects of the compare and the result of the compare The data object is the value returned from a call to the code visit code method on the parent input It can be considered the parent reference and is useful when building a tree p The code Differencer code implementation returns a new code Diff Node code which is initialized with the corresponding values Subclasses may override param data object returned from parent call to code visit code possibly code null code param result the result of the compare operation performed on the three inputs param ancestor the compare ancestor of the left and right inputs param left the left input to the compare param right the right input to the compare return the result possibly code null code  DiffNode
Performs a 2 way or 3 way compare of the given leaf elements and returns an integer describing the kind of difference private int compare boolean threeway Object ancestor Object left Object right int description NO CHANGE if threeway if ancestor null if left null if right null Assert is True false shouldn t happen else description RIGHT ADDITION else if right null description LEFT ADDITION else description CONFLICTING ADDITION if contents Equal left right description PSEUDO CONFLICT else if left null if right null description CONFLICTING DELETION PSEUDO CONFLICT else if contents Equal ancestor right description LEFT DELETION else description CONFLICTING CHANGE else if right null if contents Equal ancestor left description RIGHT DELETION else description CONFLICTING CHANGE else boolean ay contents Equal ancestor left boolean am contents Equal ancestor right if ay am else if ay am description RIGHT CHANGE else if ay am description LEFT CHANGE else description CONFLICTING CHANGE if contents Equal left right description PSEUDO CONFLICT else two way compare ignores ancestor if left null if right null Assert is True false shouldn t happen else description ADDITION else if right null description DELETION else if contents Equal left right description CHANGE return description  NO_CHANGE isTrue contentsEqual PSEUDO_CONFLICT PSEUDO_CONFLICT contentsEqual contentsEqual contentsEqual contentsEqual contentsEqual PSEUDO_CONFLICT isTrue contentsEqual
Performs a content compare on the two given inputs p The code Differencer code implementation returns code true code if both inputs implement code I Stream Content Accessor code and their byte contents is identical Subclasses may override to implement a different content compare on the given inputs p param input1 first input to contents compare param input2 second input to contents compare return code true code if content is equal  IStreamContentAccessor
Returns the children of the given input or code null code if there are no children p The code Differencer code implementation checks whether the input implements the code I Structure Comparator code interface If yes it is used to return an array containing all children Otherwise code null code is returned Subclasses may override to implement a different strategy to enumerate children p param input the object for which to return children  IStructureComparator

private Date f Previous Date new Date public void set Current Build Date Date date f Previous Date f Current Date f Current Date date  fPreviousDate setCurrentBuildDate fPreviousDate fCurrentDate fCurrentDate
public void set Last Build Date Date date f Previous Date date if f Previous Date get Time f Current Date get Time If the previous date is set later than the current date move the current date up to the previous f Current Date f Previous Date  setLastBuildDate fPreviousDate fPreviousDate getTime fCurrentDate getTime fCurrentDate fPreviousDate
Returns the last build time public Date get Last Build Date return f Previous Date  getLastBuildDate fPreviousDate
Creates a new HCR manager private Java Hot Code Replace Manager  JavaHotCodeReplaceManager
Returns the singleton HCR manager public static synchronized Java Hot Code Replace Manager get Default if fg Instance null fg Instance new Java Hot Code Replace Manager return fg Instance  JavaHotCodeReplaceManager getDefault fgInstance fgInstance JavaHotCodeReplaceManager fgInstance
Registers this HCR manager as a resource change listener This method is called by the JDI debug model plugin on startup public void startup Debug Plugin get Default get Launch Manager add Launch Listener this Debug Plugin get Default add Debug Event Listener this  DebugPlugin getDefault getLaunchManager addLaunchListener DebugPlugin getDefault addDebugEventListener
Deregisters this HCR manager as a resource change listener Removes all hot code replace listeners This method is called by the JDI debug model plugin on shutdown public void shutdown Debug Plugin get Default get Launch Manager remove Launch Listener this Debug Plugin get Default remove Debug Event Listener this get Workspace remove Resource Change Listener this f Hot Code Replace Listeners remove All f Hot Swap Targets null f No Hot Swap Targets null  DebugPlugin getDefault getLaunchManager removeLaunchListener DebugPlugin getDefault removeDebugEventListener getWorkspace removeResourceChangeListener fHotCodeReplaceListeners removeAll fHotSwapTargets fNoHotSwapTargets
Returns the workspace protected I Workspace get Workspace return Resources Plugin get Workspace  IWorkspace getWorkspace ResourcesPlugin getWorkspace
Returns the launch manager protected I Launch Manager get Launch Manager return Debug Plugin get Default get Launch Manager  ILaunchManager getLaunchManager DebugPlugin getDefault getLaunchManager
see I Resource Change Listener resource Changed org eclipse core resources I Resource Change Event public void resource Changed I Resource Change Event event List projects get Built Projects event if projects is Empty update Project Build Time projects Changed Class Files Visitor visitor get Changed Class Files event if visitor null List resources visitor get Changed Class Files List names visitor get Qualified Names List if resources is Empty notify Targets resources names  IResourceChangeListener resourceChanged IResourceChangeEvent resourceChanged IResourceChangeEvent getBuiltProjects isEmpty updateProjectBuildTime ChangedClassFilesVisitor getChangedClassFiles getChangedClassFiles getQualifiedNamesList isEmpty notifyTargets
Returns all projects which this event says may have been built protected List get Built Projects I Resource Change Event event I Resource Delta delta event get Delta if event get Type I Resource Change Event POST BUILD delta null return Collections EMPTY LIST f Project Visitor reset try delta accept f Project Visitor catch Core Exception e JDI Debug Plugin log e return Collections EMPTY LIST return f Project Visitor get Built Projects  getBuiltProjects IResourceChangeEvent IResourceDelta getDelta getType IResourceChangeEvent POST_BUILD EMPTY_LIST fProjectVisitor fProjectVisitor CoreException JDIDebugPlugin EMPTY_LIST fProjectVisitor getBuiltProjects
If the given event contains a build notification update the last build time of the corresponding project private void update Project Build Time List projects Iterator iter projects iterator I Project project null Date current Date new Date Project Build Time build Time null while iter has Next project I Project iter next build Time Project Build Time f Project Build Times get project if build Time null build Time new Project Build Time f Project Build Times put project build Time build Time set Current Build Date current Date  updateProjectBuildTime IProject currentDate ProjectBuildTime buildTime hasNext IProject buildTime ProjectBuildTime fProjectBuildTimes buildTime buildTime ProjectBuildTime fProjectBuildTimes buildTime buildTime setCurrentBuildDate currentDate
Returns the last known build time for the given project If no build time is known for the given project the last known build time for the project is set to the hot code replace manager s startup time protected long get Last Project Build Time I Project project Project Build Time time Project Build Time f Project Build Times get project if time null time new Project Build Time time set Last Build Date f Startup Date f Project Build Times put project time return time get Last Build Date get Time  getLastProjectBuildTime IProject ProjectBuildTime ProjectBuildTime fProjectBuildTimes ProjectBuildTime setLastBuildDate fStartupDate fProjectBuildTimes getLastBuildDate getTime
if hot Swap Targets is Empty Runnable runnable new Runnable public void run do Hot Code Replace hot Swap Targets resources qualified Names  hotSwapTargets isEmpty doHotCodeReplace hotSwapTargets qualifiedNames
if no Hot Swap Targets is Empty Runnable runnable new Runnable public void run notify UnsupportedHCR no Hot Swap Targets qualified Names  noHotSwapTargets isEmpty notifyUnsupportedHCR noHotSwapTargets qualifiedNames
Notifies the targets of the changed types private void notify Targets final List resources final List qualified Names final List hot Swap Targets get Hot Swap Targets final List no Hot Swap Targets get No Hot Swap Targets if hot Swap Targets is Empty Runnable runnable new Runnable public void run do Hot Code Replace hot Swap Targets resources qualified Names Debug Plugin get Default async Exec runnable if no Hot Swap Targets is Empty Runnable runnable new Runnable public void run notify UnsupportedHCR no Hot Swap Targets qualified Names Debug Plugin get Default async Exec runnable  notifyTargets qualifiedNames hotSwapTargets getHotSwapTargets noHotSwapTargets getNoHotSwapTargets hotSwapTargets isEmpty doHotCodeReplace hotSwapTargets qualifiedNames DebugPlugin getDefault asyncExec noHotSwapTargets isEmpty notifyUnsupportedHCR noHotSwapTargets qualifiedNames DebugPlugin getDefault asyncExec
Notify the given targets that HCR failed for classes with the given fully qualified names protected void notify UnsupportedHCR List targets List qualified Names Iterator iter targets iterator JDI Debug Target target null while iter has Next target JDI Debug Target iter next fireHCR Failed target null notify FailedHCR target qualified Names  notifyUnsupportedHCR qualifiedNames JDIDebugTarget hasNext JDIDebugTarget fireHCRFailed notifyFailedHCR qualifiedNames
protected void notify FailedHCR JDI Debug Target target List qualified Names if target is Available target add Out Of Synch Types qualified Names target fire Change Event Debug Event STATE  notifyFailedHCR JDIDebugTarget qualifiedNames isAvailable addOutOfSynchTypes qualifiedNames fireChangeEvent DebugEvent
Returns the currently registered debug targets that support hot code replace protected List get Hot Swap Targets return List f Hot Swap Targets clone  getHotSwapTargets fHotSwapTargets
Returns the currently registered debug targets that do not support hot code replace protected List get No Hot Swap Targets return List f No Hot Swap Targets clone  getNoHotSwapTargets fNoHotSwapTargets
Perform a hot code replace with the given resources For a JDK 1 4 compliant VM this involves ol li Popping all frames from all thread stacks which will be affected by reloading the given resources li li Telling the Virtual Machine to redefine the affected classes li li Performing a step into operation on all threads which were affected by the class redefinition This returns execution to the first deepest affected method on the stack li ol For a J9 compliant VM this involves ol li Telling the Virtual Machine to redefine the affected classes li li Popping all frames from all thread stacks which were affected by reloading the given resources and then performing a step into operation on all threads which were affected by the class redefinition li ol param targets the targets in which to perform HCR param resources the resources which correspond to the changed classes private void do Hot Code Replace List targets List resources List qualified Names Multi Status ms new Multi Status JDI Debug Plugin get Unique Identifier Debug Exception TARGET REQUEST FAILED JDI DebugHCR Messages get String Java Hot Code Replace Manager drop to frame failed null NON NLS 1 Iterator iter targets iterator while iter has Next JDI Debug Target target JDI Debug Target iter next if target is Available continue List popped Threads new Array List target set Is Performing Hot Code Replace true try boolean frames Popped false if target can Pop Frames JDK 1 4 drop to frame support JDK 1 4 spec is faulty around methods that have been rendered obsolete after class redefinition Thus pop the frames that contain affected methods before the class redefinition to avoid problems try attempt Pop Frames target resources qualified Names popped Threads frames Popped true No exception occurred catch Debug Exception de ms merge de get Status target remove Out Of Synch Types qualified Names if target supportsJDK Hot Code Replace redefine TypesJDK target resources qualified Names else if target supportsJ9 Hot Code Replace redefine TypesJ9 target qualified Names if contains Obsolete Methods target fire Obsolete Methods target if target can Pop Frames frames Popped Second half of JDK 1 4 drop to frame support All affected frames have been popped and the classes have been reloaded Step into the first changed frame of each affected thread try must re set is doing HCR to be able to step target set Is Performing Hot Code Replace false attempt Step In popped Threads catch Debug Exception de ms merge de get Status else J9 drop to frame support After redefining classes drop to frame attempt Drop To Frame target resources qualified Names fireHCR Succeeded target catch Debug Exception de target update failed fireHCR Failed target de also re set is doing HCR here incase HCR failed target set Is Performing Hot Code Replace false target fire Change Event Debug Event CONTENT if ms isOK JDI Debug Plugin log ms  VirtualMachine VirtualMachine doHotCodeReplace qualifiedNames MultiStatus MultiStatus JDIDebugPlugin getUniqueIdentifier DebugException TARGET_REQUEST_FAILED JDIDebugHCRMessages getString JavaHotCodeReplaceManager drop_to_frame_failed hasNext JDIDebugTarget JDIDebugTarget isAvailable poppedThreads ArrayList setIsPerformingHotCodeReplace framesPopped canPopFrames attemptPopFrames qualifiedNames poppedThreads framesPopped DebugException getStatus removeOutOfSynchTypes qualifiedNames supportsJDKHotCodeReplace redefineTypesJDK qualifiedNames supportsJ9HotCodeReplace redefineTypesJ9 qualifiedNames containsObsoleteMethods fireObsoleteMethods canPopFrames framesPopped setIsPerformingHotCodeReplace attemptStepIn poppedThreads DebugException getStatus attemptDropToFrame qualifiedNames fireHCRSucceeded DebugException fireHCRFailed setIsPerformingHotCodeReplace fireChangeEvent DebugEvent JDIDebugPlugin
Replaces the given types in the given J9 debug target A fully qualified name of each type must be supplied Breakpoints are reinstalled automatically when the new types are loaded exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li The target VM was unable to reload a type due to a shape change li ul private void redefine TypesJ9 JDI Debug Target target List qualified Names throws Debug Exception String type Names String qualified Names to Array new String qualified Names size if target supportsJ9 Hot Code Replace target setHCR Occurred true org eclipse jdi hcr Virtual Machine vm org eclipse jdi hcr Virtual Machine target getVM if vm null target request Failed JDI DebugHCR Messages get String Java Hot Code Replace Manager Hot code replace failed   VM disconnected  1 null NON NLS 1 int result org eclipse jdi hcr Virtual Machine RELOAD FAILURE try result vm classes Have Changed type Names catch Runtime Exception e target target Request Failed Message Format format JDI DebugHCR Messages get String Java Hot Code Replace Manager exception replacing types new String e to String e NON NLS 1 switch result case org eclipse jdi hcr Virtual Machine RELOAD SUCCESS break case org eclipse jdi hcr Virtual Machine RELOAD IGNORED target target Request Failed JDI DebugHCR Messages get String Java Hot Code Replace Manager hcr ignored null NON NLS 1 break case org eclipse jdi hcr Virtual Machine RELOAD FAILURE target target Request Failed JDI DebugHCR Messages get String Java Hot Code Replace Manager hcr failed null NON NLS 1 target add Out Of Synch Types qualified Names break else target not Supported JDI DebugHCR Messages get String Java Hot Code Replace Manager does not support hcr NON NLS 1 target add Out Of Synch Types qualified Names  DebugException DebugException redefineTypesJ9 JDIDebugTarget qualifiedNames DebugException typeNames qualifiedNames toArray qualifiedNames supportsJ9HotCodeReplace setHCROccurred VirtualMachine VirtualMachine requestFailed JDIDebugHCRMessages getString JavaHotCodeReplaceManager Hot_code_replace_failed_ _VM_disconnected _1 VirtualMachine RELOAD_FAILURE classesHaveChanged typeNames RuntimeException targetRequestFailed MessageFormat JDIDebugHCRMessages getString JavaHotCodeReplaceManager exception_replacing_types toString VirtualMachine RELOAD_SUCCESS VirtualMachine RELOAD_IGNORED targetRequestFailed JDIDebugHCRMessages getString JavaHotCodeReplaceManager hcr_ignored VirtualMachine RELOAD_FAILURE targetRequestFailed JDIDebugHCRMessages getString JavaHotCodeReplaceManager hcr_failed addOutOfSynchTypes qualifiedNames notSupported JDIDebugHCRMessages getString JavaHotCodeReplaceManager does_not_support_hcr addOutOfSynchTypes qualifiedNames
Replaces the given types in the given JDK compliant debug target This method is to be used for JDK hot code replace private void redefine TypesJDK JDI Debug Target target List resources List qualified Names throws Debug Exception if target supportsJDK Hot Code Replace target setHCR Occurred true Map types To Bytes get Types To Bytes target resources qualified Names try Virtual Machine vm target getVM if vm null target request Failed JDI DebugHCR Messages get String Java Hot Code Replace Manager Hot code replace failed   VM disconnected  2 null NON NLS 1 vm redefine Classes types To Bytes catch Unsupported Operation Exception exception String detail exception get Message if detail null redefine Types FailedJDK target qualified Names Message Format format JDI DebugHCR Messages get String Java Hot Code Replace Manager hcr unsupported operation new String detail exception NON NLS 1 else redefine Types FailedJDK target qualified Names JDI DebugHCR Messages get String Java Hot Code Replace Manager hcr unsupported redefinition exception NON NLS 1 catch No Class Def Found Error exception redefine Types FailedJDK target qualified Names JDI DebugHCR Messages get String Java Hot Code Replace Manager hcr bad bytes exception NON NLS 1 catch Verify Error exception redefine Types FailedJDK target qualified Names JDI DebugHCR Messages get String Java Hot Code Replace Manager hcr verify error exception NON NLS 1 catch Unsupported Class Version Error exception redefine Types FailedJDK target qualified Names JDI DebugHCR Messages get String Java Hot Code Replace Manager hcr unsupported class version exception NON NLS 1 catch Class Format Error exception redefine Types FailedJDK target qualified Names JDI DebugHCR Messages get String Java Hot Code Replace Manager hcr class format error exception NON NLS 1 catch Class Circularity Error exception redefine Types FailedJDK target qualified Names JDI DebugHCR Messages get String Java Hot Code Replace Manager hcr class circularity error exception NON NLS 1 catch Runtime Exception exception redefine Types FailedJDK target qualified Names JDI DebugHCR Messages get String Java Hot Code Replace Manager hcr failed exception NON NLS 1 target reinstall Breakpoints In resources qualified Names else target not Supported JDI DebugHCR Messages get String Java Hot Code Replace Manager does not support hcr NON NLS 1  redefineTypesJDK JDIDebugTarget qualifiedNames DebugException supportsJDKHotCodeReplace setHCROccurred typesToBytes getTypesToBytes qualifiedNames VirtualMachine requestFailed JDIDebugHCRMessages getString JavaHotCodeReplaceManager Hot_code_replace_failed_ _VM_disconnected _2 redefineClasses typesToBytes UnsupportedOperationException getMessage redefineTypesFailedJDK qualifiedNames MessageFormat JDIDebugHCRMessages getString JavaHotCodeReplaceManager hcr_unsupported_operation redefineTypesFailedJDK qualifiedNames JDIDebugHCRMessages getString JavaHotCodeReplaceManager hcr_unsupported_redefinition NoClassDefFoundError redefineTypesFailedJDK qualifiedNames JDIDebugHCRMessages getString JavaHotCodeReplaceManager hcr_bad_bytes VerifyError redefineTypesFailedJDK qualifiedNames JDIDebugHCRMessages getString JavaHotCodeReplaceManager hcr_verify_error UnsupportedClassVersionError redefineTypesFailedJDK qualifiedNames JDIDebugHCRMessages getString JavaHotCodeReplaceManager hcr_unsupported_class_version ClassFormatError redefineTypesFailedJDK qualifiedNames JDIDebugHCRMessages getString JavaHotCodeReplaceManager hcr_class_format_error ClassCircularityError redefineTypesFailedJDK qualifiedNames JDIDebugHCRMessages getString JavaHotCodeReplaceManager hcr_class_circularity_error RuntimeException redefineTypesFailedJDK qualifiedNames JDIDebugHCRMessages getString JavaHotCodeReplaceManager hcr_failed reinstallBreakpointsIn qualifiedNames notSupported JDIDebugHCRMessages getString JavaHotCodeReplaceManager does_not_support_hcr
Error handling for JDK hot code replace The given exception occurred when redefinition was attempted for the given types private void redefine Types FailedJDK JDI Debug Target target List qualified Names String message Throwable exception throws Debug Exception target add Out Of Synch Types qualified Names target jdi Request Failed message exception  redefineTypesFailedJDK JDIDebugTarget qualifiedNames DebugException addOutOfSynchTypes qualifiedNames jdiRequestFailed
Returns a mapping of class files to the bytes that make up those class files param target the debug target to query param resources the classfiles param qualified Names the fully qualified type names corresponding to the classfiles The type Names correspond to the resources on a one to one basis return a mapping of class files to bytes key class file value the bytes which make up that classfile private Map get Types To Bytes JDI Debug Target target List resources List qualified Names Map types To Bytes new Hash Map resources size Iterator resource Iter resources iterator Iterator name Iter qualified Names iterator I Resource resource String name while resource Iter has Next resource I Resource resource Iter next name String name Iter next List classes target jdi Classes By Name name byte bytes null try bytes Util get Resource Contents As Byte Array I File resource catch Java Model Exception jme continue Iterator class Iter classes iterator while class Iter has Next Reference Type type Reference Type class Iter next types To Bytes put type bytes return types To Bytes  qualifiedNames typeNames getTypesToBytes JDIDebugTarget qualifiedNames typesToBytes HashMap resourceIter nameIter qualifiedNames IResource resourceIter hasNext IResource resourceIter nameIter jdiClassesByName getResourceContentsAsByteArray IFile JavaModelException classIter classIter hasNext ReferenceType ReferenceType classIter typesToBytes typesToBytes
Notifies listeners that a hot code replace attempt succeeded private void fireHCR Succeeded I Java Debug Target target Object listeners f Hot Code Replace Listeners get Listeners for int i 0 i listeners length i I Java Hot Code Replace Listener listeners i hot Code Replace Succeeded target  fireHCRSucceeded IJavaDebugTarget fHotCodeReplaceListeners getListeners IJavaHotCodeReplaceListener hotCodeReplaceSucceeded
Notifies listeners that a hot code replace attempt failed with the given exception private void fireHCR Failed JDI Debug Target target Debug Exception exception Object listeners f Hot Code Replace Listeners get Listeners for int i 0 i listeners length i I Java Hot Code Replace Listener listeners i hot Code Replace Failed target exception  fireHCRFailed JDIDebugTarget DebugException fHotCodeReplaceListeners getListeners IJavaHotCodeReplaceListener hotCodeReplaceFailed
Notifies listeners that obsolete methods remain on the stack private void fire Obsolete Methods JDI Debug Target target Object listeners f Hot Code Replace Listeners get Listeners for int i 0 i listeners length i I Java Hot Code Replace Listener listeners i obsolete Methods target  fireObsoleteMethods JDIDebugTarget fHotCodeReplaceListeners getListeners IJavaHotCodeReplaceListener obsoleteMethods
Looks for the deepest effected stack frame in the stack and forces a drop to frame Does this for all of the active stack frames in the target param target the debug target in which frames are to be dropped param replaced Class Names the classes that have been redefined protected void attempt Drop To Frame JDI Debug Target target List resources List replaced Class Names throws Debug Exception List drop Frames get Affected Frames target get Threads resources replaced Class Names All threads that want to drop to frame are able Proceed with the drop JDI Stack Frame drop Frame null Iterator iter drop Frames iterator while iter has Next try drop Frame JDI Stack Frame iter next drop Frame drop To Frame catch Debug Exception de notify Failed Drop JDI Thread drop Frame get Thread compute Stack Frames replaced Class Names  replacedClassNames attemptDropToFrame JDIDebugTarget replacedClassNames DebugException dropFrames getAffectedFrames getThreads replacedClassNames JDIStackFrame dropFrame dropFrames hasNext dropFrame JDIStackFrame dropFrame dropToFrame DebugException notifyFailedDrop JDIThread dropFrame getThread computeStackFrames replacedClassNames
Looks for the deepest effected stack frame in the stack and forces a drop to frame Does this for all of the active stack frames in the target param target the debug target in which frames are to be dropped param replaced Class Names the classes that have been redefined param popped Threads a list of the threads in which frames were popped This parameter may have entries added by this method protected void attempt Pop Frames JDI Debug Target target List resources List replaced Class Names List popped Threads throws Debug Exception List pop Frames get Affected Frames target get Threads resources replaced Class Names All threads that want to drop to frame are able Proceed with the drop JDI Stack Frame pop Frame null Iterator iter pop Frames iterator while iter has Next try pop Frame JDI Stack Frame iter next pop Frame pop Frame popped Threads add pop Frame get Thread catch Debug Exception de popped Threads remove pop Frame get Thread notify Failed Drop JDI Thread pop Frame get Thread compute Stack Frames replaced Class Names  replacedClassNames poppedThreads attemptPopFrames JDIDebugTarget replacedClassNames poppedThreads DebugException popFrames getAffectedFrames getThreads replacedClassNames JDIStackFrame popFrame popFrames hasNext popFrame JDIStackFrame popFrame popFrame poppedThreads popFrame getThread DebugException poppedThreads popFrame getThread notifyFailedDrop JDIThread popFrame getThread computeStackFrames replacedClassNames
Returns whether or not the given target contains stack frames with obsolete methods protected boolean contains Obsolete Methods JDI Debug Target target throws Debug Exception I Thread threads target get Threads List frames null Iterator iter null for int i 0 num Threads threads length i num Threads i frames JDI Thread threads i compute New Stack Frames iter frames iterator while iter has Next if JDI Stack Frame iter next is Obsolete return true return false  containsObsoleteMethods JDIDebugTarget DebugException IThread getThreads numThreads numThreads JDIThread computeNewStackFrames hasNext JDIStackFrame isObsolete
Returns a list of frames which should be popped in the given threads protected List get Affected Frames I Thread threads List resource List List replaced Class Names throws Debug Exception JDI Thread thread null JDI Stack Frame affected Frame null List pop Frames new Array List int num Threads threads length I Resource resources new I Resource resource List size resource List to Array resources for int i 0 i num Threads i thread JDI Thread threads i if thread is Suspended affected Frame get Affected Frame thread replaced Class Names if affected Frame null No frame to drop to in this thread continue if affected Frame supports Drop To Frame pop Frames add affected Frame else if any thread that should drop does not support the drop do not drop in any threads for int j 0 j num Threads j notify Failed Drop JDI Thread threads i compute Stack Frames replaced Class Names throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception NOT SUPPORTED JDI DebugHCR Messages get String Java Hot Code Replace Manager Drop to frame not supported null NON NLS 1 return pop Frames  getAffectedFrames IThread resourceList replacedClassNames DebugException JDIThread JDIStackFrame affectedFrame popFrames ArrayList numThreads IResource IResource resourceList resourceList toArray numThreads JDIThread isSuspended affectedFrame getAffectedFrame replacedClassNames affectedFrame affectedFrame supportsDropToFrame popFrames affectedFrame numThreads notifyFailedDrop JDIThread computeStackFrames replacedClassNames DebugException IStatus JDIDebugModel getPluginIdentifier DebugException NOT_SUPPORTED JDIDebugHCRMessages getString JavaHotCodeReplaceManager Drop_to_frame_not_supported popFrames
Returns the stack frame that should be dropped to in the given thread after a hot code replace This is calculated by determining if the threads contain stack frames that reside in one of the given replaced class names If possible only stack frames whose methods were directly affected and not simply all frames in affected types will be returned protected JDI Stack Frame get Affected Frame JDI Thread thread List replaced Class Names throws Debug Exception List frames thread compute Stack Frames JDI Stack Frame affected Frame null JDI Stack Frame frame null I Compilation Unit compilation Unit null I Method method null Compilation Unit Delta delta null I Project project null for int j frames size 1 j 0 j frame JDI Stack Frame frames get j if contains Changed Type frame replaced Class Names smart drop to frame support compilation Unit get Compilation Unit frame if compilation Unit null continue try project compilation Unit get Corresponding Resource get Project method get Method frame compilation Unit if method null delta new Compilation Unit Delta compilation Unit get Last Project Build Time project if delta has Changed method continue catch Core Exception exception If smart drop to frame fails just do type based drop if frame supports Drop To Frame affected Frame frame break else The frame we wanted to drop to cannot be popped Set the affected frame to the next lowest poppable frame on the stack while j 0 j frame JDI Stack Frame frames get j if frame supports Drop To Frame affected Frame frame break break return affected Frame  JDIStackFrame getAffectedFrame JDIThread replacedClassNames DebugException computeStackFrames JDIStackFrame affectedFrame JDIStackFrame ICompilationUnit compilationUnit IMethod CompilationUnitDelta IProject JDIStackFrame containsChangedType replacedClassNames compilationUnit getCompilationUnit compilationUnit compilationUnit getCorrespondingResource getProject getMethod compilationUnit CompilationUnitDelta compilationUnit getLastProjectBuildTime hasChanged CoreException supportsDropToFrame affectedFrame JDIStackFrame supportsDropToFrame affectedFrame affectedFrame
Returns whether the given frame s declaring type was changed based on the given list of changed class names protected boolean contains Changed Type JDI Stack Frame frame List replaced Class Names throws Debug Exception String declaring Type Name frame get Declaring Type Name Check if the frame s declaring type was changed if replaced Class Names contains declaring Type Name return true Check if one of the frame s declaring type s inner classes have changed Iterator iter replaced Class Names iterator int index String class Name null while iter has Next class Name String iter next index class Name index Of if index 1 declaring Type Name equals class Name substring 0 index return true return false  containsChangedType JDIStackFrame replacedClassNames DebugException declaringTypeName getDeclaringTypeName replacedClassNames declaringTypeName replacedClassNames className hasNext className className indexOf declaringTypeName className
Performs a step into operation on the given threads protected void attempt Step In List threads throws Debug Exception Iterator iter threads iterator while iter has Next JDI Thread iter next step Into  attemptStepIn DebugException hasNext JDIThread stepInto
Returns the compilation unit associated with this Java stack frame Returns code null code for a binary stack frame protected I Compilation Unit get Compilation Unit I Java Stack Frame frame I Launch launch frame get Launch if launch null return null I Source Locator locator launch get Source Locator if locator null return null Object source Element locator get Source Element frame if source Element instanceof I Java Element source Element instanceof I Adaptable source Element I Adaptable source Element get Adapter I Java Element class if source Element instanceof I Type return I Type source Element get Compilation Unit if source Element instanceof I Compilation Unit return I Compilation Unit source Element return null  ICompilationUnit getCompilationUnit IJavaStackFrame ILaunch getLaunch ISourceLocator getSourceLocator sourceElement getSourceElement sourceElement IJavaElement sourceElement IAdaptable sourceElement IAdaptable sourceElement getAdapter IJavaElement sourceElement IType IType sourceElement getCompilationUnit sourceElement ICompilationUnit ICompilationUnit sourceElement
Returns the method in which this stack frame is suspended or code null code if none can be found public I Method get Method JDI Stack Frame frame I Compilation Unit unit throws Core Exception String declaring Type Name frame get Declaring Type Name String method Name frame get Method Name String arguments null try arguments Signature get Parameter Types frame get Signature catch Illegal Argument Exception exception If Signature can t parse the signature we can t create the method return null String type Name get Unqualified Name declaring Type Name int index type Name index Of I Type type null if index 0 String remaining type Name substring index 1 type Name type Name substring 0 index type unit get Type type Name while remaining null index remaining index Of if index 0 type Name remaining substring 0 index remaining remaining substring index 1 else type Name remaining remaining null type type get Type type Name else type unit get Type type Name if type null return type get Method method Name arguments return null  IMethod getMethod JDIStackFrame ICompilationUnit CoreException declaringTypeName getDeclaringTypeName methodName getMethodName getParameterTypes getSignature IllegalArgumentException typeName getUnqualifiedName declaringTypeName typeName indexOf IType typeName typeName typeName getType typeName indexOf typeName typeName getType typeName getType typeName getMethod methodName
Given a fully qualified name return the unqualified name protected String get Unqualified Name String qualified Name int index qualified Name last Index Of return qualified Name substring index 1  getUnqualifiedName qualifiedName qualifiedName lastIndexOf qualifiedName
Notify the given frames that a drop to frame has failed after an HCR with the given class names private void notify Failed Drop List frames List replaced Class Names throws Debug Exception JDI Stack Frame frame Iterator iter frames iterator while iter has Next frame JDI Stack Frame iter next if replaced Class Names contains frame get Declaring Type Name frame set Out Of Synch true  notifyFailedDrop replacedClassNames DebugException JDIStackFrame hasNext JDIStackFrame replacedClassNames getDeclaringTypeName setOutOfSynch
Returns the class file visitor after visiting the resource change The visitor contains the changed class files and qualified type names Returns code null code if the visitor encounters an exception or the detlta is not a POST CHANGE protected Changed Class Files Visitor get Changed Class Files I Resource Change Event event I Resource Delta delta event get Delta if event get Type I Resource Change Event POST CHANGE delta null return null f Classfile Visitor reset try delta accept f Classfile Visitor catch Core Exception e JDI Debug Plugin log e return null quiet failure return f Classfile Visitor  POST_CHANGE ChangedClassFilesVisitor getChangedClassFiles IResourceChangeEvent IResourceDelta getDelta getType IResourceChangeEvent POST_CHANGE fClassfileVisitor fClassfileVisitor CoreException JDIDebugPlugin fClassfileVisitor
Answers whether children should be visited p If the associated resource is a class file which has been changed record it public boolean visit I Resource Delta delta if delta null 0 delta get Kind I Resource Delta CHANGED return false I Resource resource delta get Resource if resource null switch resource get Type case I Resource FILE if 0 delta get Flags I Resource Delta CONTENT return false if CLASS FILE EXTENSION equals resource get Full Path get File Extension I Path local Location resource get Location if local Location null String path local Location toOS String I Class File Reader reader Tool Factory create Default Class File Reader path I Class File Reader CLASSFILE ATTRIBUTES if reader null this name is slash delimited String qualified Name new String reader get Class Name boolean has Blocking Errors false try if JDI Debug Model get Preferences get Boolean JDI Debug Model PREF HCR WITH COMPILATION ERRORS If the user doesn t want to replace classfiles containing compilation errors get the source file associated with the class file and query it for compilation errors I Java Project pro Java Core create resource get Project I Source Attribute source Attribute reader get Source File Attribute String source Name null if source Attribute null source Name new String source Attribute get Source File Name I Resource source File get Source File pro qualified Name source Name if source File null I Marker problem Markers null problem Markers source File find Markers I Java Model Marker JAVA MODEL PROBLEM MARKER true I Resource DEPTH INFINITE for int i 0 i problem Markers length i if problem Markers i get Attribute I Marker SEVERITY 1 I Marker SEVERITY ERROR has Blocking Errors true break catch Core Exception e JDI Debug Plugin log e if has Blocking Errors f Files add resource dot delimit the name f Names add qualified Name replace return false default return true return true  IResourceDelta getKind IResourceDelta IResource getResource getType IResource getFlags IResourceDelta CLASS_FILE_EXTENSION getFullPath getFileExtension IPath localLocation getLocation localLocation localLocation toOSString IClassFileReader ToolFactory createDefaultClassFileReader IClassFileReader CLASSFILE_ATTRIBUTES qualifiedName getClassName hasBlockingErrors JDIDebugModel getPreferences getBoolean JDIDebugModel PREF_HCR_WITH_COMPILATION_ERRORS IJavaProject JavaCore getProject ISourceAttribute sourceAttribute getSourceFileAttribute sourceName sourceAttribute sourceName sourceAttribute getSourceFileName IResource sourceFile getSourceFile qualifiedName sourceName sourceFile IMarker problemMarkers problemMarkers sourceFile findMarkers IJavaModelMarker JAVA_MODEL_PROBLEM_MARKER IResource DEPTH_INFINITE problemMarkers problemMarkers getAttribute IMarker IMarker SEVERITY_ERROR hasBlockingErrors CoreException JDIDebugPlugin hasBlockingErrors fFiles fNames qualifiedName
Resets the file collection to empty public void reset f Files new Array List f Names new Array List  fFiles ArrayList fNames ArrayList
Answers a collection of changed class files or code null code public List get Changed Class Files return f Files  getChangedClassFiles fFiles
Returns a collection of qualified type names corresponding to the changed class files return List public List get Qualified Names List return f Names  getQualifiedNamesList fNames
Returns the source file associated with the given type or code null code if no source file could be found param project the java project containing the classfile param qualified Name fully qualified name of the type slash delimited param source Attribute debug source attribute or code null code if none private I Resource get Source File I Java Project project String qualified Name String source Attribute String name null if source Attribute null int nested Index qualified Name index Of if nested Index 1 Trim nested type suffix name qualified Name substring 0 nested Index name name java NON NLS 1 else int i qualified Name last Index Of if i 0 name qualified Name substring 0 i 1 name name source Attribute else name source Attribute I Compilation Unit unit null try unit I Compilation Unit project find Element new Path name if unit null try return unit get Corresponding Resource catch Java Model Exception e catch Java Model Exception exception return null  qualifiedName sourceAttribute IResource getSourceFile IJavaProject qualifiedName sourceAttribute sourceAttribute nestedIndex qualifiedName indexOf nestedIndex qualifiedName nestedIndex qualifiedName lastIndexOf qualifiedName sourceAttribute sourceAttribute ICompilationUnit ICompilationUnit findElement getCorrespondingResource JavaModelException JavaModelException
protected List f Projects new Array List Answers whether children should be visited p If the associated resource is a project which has been built record it public boolean visit I Resource Delta delta if delta null 0 delta get Kind I Resource Delta CHANGED return false I Resource resource delta get Resource if resource null resource get Type I Resource PROJECT f Projects add resource return false return true  fProjects ArrayList IResourceDelta getKind IResourceDelta IResource getResource getType IResource fProjects
Resets the project collection to empty public void reset f Projects new Array List  fProjects ArrayList
Returns the collection of built projects public List get Built Projects return f Projects  getBuiltProjects fProjects
Adds the given listener to the collection of hot code replace listeners Listeners are notified when hot code replace attempts succeed or fail public void add Hot Code Replace Listener I Java Hot Code Replace Listener listener f Hot Code Replace Listeners add listener  addHotCodeReplaceListener IJavaHotCodeReplaceListener fHotCodeReplaceListeners
Removes the given listener from the collection of hot code replace listeners Once a listener is removed it will no longer be notified of hot code replace attempt successes or failures public void remove Hot Code Replace Listener I Java Hot Code Replace Listener listener f Hot Code Replace Listeners remove listener  removeHotCodeReplaceListener IJavaHotCodeReplaceListener fHotCodeReplaceListeners
see I Launch Listener launch Removed I Launch public void launch Removed I Launch launch I Debug Target debug Targets launch get Debug Targets for int i 0 i debug Targets length i I Java Debug Target jt I Java Debug Target debug Targets i get Adapter I Java Debug Target class if jt null deregister Target JDI Debug Target jt  ILaunchListener launchRemoved ILaunch launchRemoved ILaunch IDebugTarget debugTargets getDebugTargets debugTargets IJavaDebugTarget IJavaDebugTarget debugTargets getAdapter IJavaDebugTarget deregisterTarget JDIDebugTarget
Begin listening for resource changes when a launch is registered with a hot swapable target see org eclipse debug core I Launch Listener launch Added org eclipse debug core I Launch public void launch Added I Launch launch I Debug Target debug Targets launch get Debug Targets for int i 0 i debug Targets length i I Java Debug Target jt I Java Debug Target debug Targets i get Adapter I Java Debug Target class if jt null JDI Debug Target target JDI Debug Target jt if target supports Hot Code Replace add Hot Swap Target target else add Non Hot Swap Target target if f Hot Swap Targets is Empty f No Hot Swap Targets is Empty get Workspace add Resource Change Listener this I Resource Change Event POST CHANGE I Resource Change Event POST BUILD  ILaunchListener launchAdded ILaunch launchAdded ILaunch IDebugTarget debugTargets getDebugTargets debugTargets IJavaDebugTarget IJavaDebugTarget debugTargets getAdapter IJavaDebugTarget JDIDebugTarget JDIDebugTarget supportsHotCodeReplace addHotSwapTarget addNonHotSwapTarget fHotSwapTargets isEmpty fNoHotSwapTargets isEmpty getWorkspace addResourceChangeListener IResourceChangeEvent POST_CHANGE IResourceChangeEvent POST_BUILD
Begin listening for resource changes when a launch is registered with a hot swapable target see I Launch Listener launch Changed I Launch public void launch Changed I Launch launch launch Added launch  ILaunchListener launchChanged ILaunch launchChanged ILaunch launchAdded
public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i if event get Kind Debug Event TERMINATE Object source event get Source if source instanceof I Adaptable I Java Debug Target jt I Java Debug Target I Adaptable source get Adapter I Java Debug Target class if jt null deregister Target JDI Debug Target jt  handleDebugEvents DebugEvent DebugEvent getKind DebugEvent getSource IAdaptable IJavaDebugTarget IJavaDebugTarget IAdaptable getAdapter IJavaDebugTarget deregisterTarget JDIDebugTarget
protected void deregister Target JDI Debug Target target Remove the target from its hot swap target cache if f Hot Swap Targets remove target f No Hot Swap Targets remove target I Launch launches Debug Plugin get Default get Launch Manager get Launches If there are no more active JDI Debug Targets stop listening to resource changes for int i 0 i launches length i I Debug Target targets launches i get Debug Targets for int j 0 j targets length j I Debug Target debug Target targets j I Java Debug Target jt I Java Debug Target debug Target get Adapter I Java Debug Target class if jt null if JDI Debug Target jt is Available return To get here there must be no running JDI Debug Targets get Workspace remove Resource Change Listener this  deregisterTarget JDIDebugTarget fHotSwapTargets fNoHotSwapTargets ILaunch DebugPlugin getDefault getLaunchManager getLaunches JDIDebugTargets IDebugTarget getDebugTargets IDebugTarget debugTarget IJavaDebugTarget IJavaDebugTarget debugTarget getAdapter IJavaDebugTarget JDIDebugTarget isAvailable JDIDebugTargets getWorkspace removeResourceChangeListener
Adds the given target to the list of hot swappable targets Has no effect if the target is already registered param target a target that supports hot swap protected void add Hot Swap Target JDI Debug Target target if f Hot Swap Targets contains target f Hot Swap Targets add target  addHotSwapTarget JDIDebugTarget fHotSwapTargets fHotSwapTargets
Adds the given target to the list of non hot swappable targets Has no effect if the target is already registered param target a target that does not support hot swap protected void add Non Hot Swap Target JDI Debug Target target if f No Hot Swap Targets contains target f No Hot Swap Targets add target  addNonHotSwapTarget JDIDebugTarget fNoHotSwapTargets fNoHotSwapTargets

Creates a new code Java Node code for the given range within the specified buffer The code type Code code is uninterpreted client data The ID is used when comparing two nodes with each other i e the differencing engine performs a content compare on two nodes if their I Ds are equal param type Code a type code for this node param id an identifier for this node param buffer buffer on which this node is based on param start start position of range within document param length length of range Java Node int type Code String id char buffer int start int length f Type Code type Code fID id f Buffer buffer f Start start f Length length  JavaNode typeCode IDs typeCode JavaNode typeCode fTypeCode typeCode fBuffer fStart fLength
Creates a Java Node under the given parent param type the Java elements type Legal values are from the range CU to METHOD of this class param name the name of the Java element param start the starting position of the java element in the underlying document param length the number of characters of the java element in the underlying document Java Node Java Node parent int type String name int start int length this type buildID type name parent f Buffer start length if parent null parent add Child this  JavaNode JavaNode JavaNode fBuffer addChild
Creates a Java Node for a CU It represents the root of a Java Node tree so its parent is null param document the document which contains the Java element Java Node char buffer this CU buildID CU root buffer 0 buffer length NON NLS 1  JavaNode JavaNode JavaNode
Returns a name which identifies the given typed name The type is encoded as a single character at the beginning of the string private static String buildID int type String name String Buffer sb new String Buffer switch type case Java Node CU sb append Java Element JEM COMPILATIONUNIT break case Java Node CLASS case Java Node INTERFACE sb append Java Element JEM TYPE sb append name break case Java Node FIELD sb append Java Element JEM FIELD sb append name break case Java Node CONSTRUCTOR case Java Node METHOD sb append Java Element JEM METHOD sb append name break case Java Node INIT sb append Java Element JEM INITIALIZER sb append name break case Java Node PACKAGE sb append Java Element JEM PACKAGEDECLARATION break case Java Node IMPORT sb append Java Element JEM IMPORTDECLARATION sb append name break case Java Node IMPORT CONTAINER sb append break default Assert is True false break return sb to String  StringBuffer StringBuffer JavaNode JavaElement JEM_COMPILATIONUNIT JavaNode JavaNode JavaElement JEM_TYPE JavaNode JavaElement JEM_FIELD JavaNode JavaNode JavaElement JEM_METHOD JavaNode JavaElement JEM_INITIALIZER JavaNode JavaElement JEM_PACKAGEDECLARATION JavaNode JavaElement JEM_IMPORTDECLARATION JavaNode IMPORT_CONTAINER isTrue toString
public String get Initializer Count return Integer to String f Initializer Count  getInitializerCount toString fInitializerCount
public int get Start return f Start  getStart fStart
Returns the type code of this node The type code is uninterpreted client data which can be set in the constructor return the type code of this node public int get Type Code return f Type Code  getTypeCode fTypeCode
Returns this node s id It is used in code equals code and code hashcode code return the node s id public String get Id return fID  getId
Sets this node s id It is used in code equals code and code hashcode code param id the new id for this node public void set Id String id fID id  setId
Adds the given node as a child param node the node to add as a child public void add Child Java Node node if f Children null f Children new Array List f Children add node  addChild JavaNode fChildren fChildren ArrayList fChildren
public Object get Children if f Children null return f Children to Array return null  getChildren fChildren fChildren toArray
Sets the length of the range of this node param length the length of the range public void set Length int length f Length length  setLength fLength
Implementation based on code getID code public boolean equals Object other if other null other get Class get Class Java Node tn Java Node other return f Type Code tn f Type Code fID equals tn fID return super equals other  getClass getClass JavaNode JavaNode fTypeCode fTypeCode
Implementation based on code getID code public int hash Code return fID hash Code  hashCode hashCode
public String get Contents char b new char f Length System arraycopy f Buffer f Start b 0 f Length boolean ignore White Space true if ignore White Space replace comments and whitespace by a single blank String Buffer buf new String Buffer to avoid the trouble when dealing with Unicode we use the Java scanner to extract non whitespace and non comment tokens I Scanner scanner Tool Factory create Scanner true true false false however we request Whitespace and Comments scanner set Source b try int token while token scanner get Next Token I Terminal Symbols Token NameEOF switch token case I Terminal Symbols Token NameWHITESPACE case I Terminal Symbols TokenNameCOMMENT BLOCK case I Terminal Symbols TokenNameCOMMENT JAVADOC case I Terminal Symbols TokenNameCOMMENT LINE int l buf length if l 0 buf char At l 1 buf append break default buf append b scanner get Current Token Start Position scanner get Current Token End Position 1 scanner get Current Token Start Position buf append break return buf to String success catch Invalid Input Exception ex return new String b return original source  getContents fLength fBuffer fStart fLength ignoreWhiteSpace ignoreWhiteSpace StringBuffer StringBuffer IScanner ToolFactory createScanner setSource getNextToken ITerminalSymbols TokenNameEOF ITerminalSymbols TokenNameWHITESPACE ITerminalSymbols TokenNameCOMMENT_BLOCK ITerminalSymbols TokenNameCOMMENT_JAVADOC ITerminalSymbols TokenNameCOMMENT_LINE charAt getCurrentTokenStartPosition getCurrentTokenEndPosition getCurrentTokenStartPosition toString InvalidInputException

Parsing is performed on the given buffer and the resulting tree if any hangs below the given root Java Parse Tree Builder Java Node root char buffer f Import Container null f Stack clear f Stack push root f Buffer buffer  JavaParseTreeBuilder JavaNode fImportContainer fStack fStack fBuffer
see I Compilation Unit get Contents public char get Contents return f Buffer  ICompilationUnit getContents getContents fBuffer
see I Compilation Unit get File Name public char get File Name return new char 0  ICompilationUnit getFileName getFileName
see I Compilation Unit get Main Type Name public char get Main Type Name return new char 0  ICompilationUnit getMainTypeName getMainTypeName
see I Compilation Unit get Main Type Name public char get Package Name return null  ICompilationUnit getMainTypeName getPackageName
I Source Element Requestor public void enter Compilation Unit if SHOW COMPILATIONUNIT push Java Node CU null 0  ISourceElementRequestor enterCompilationUnit SHOW_COMPILATIONUNIT JavaNode
public void exit Compilation Unit int declaration End if SHOW COMPILATIONUNIT pop declaration End  exitCompilationUnit declarationEnd SHOW_COMPILATIONUNIT declarationEnd
public void accept Package int declaration Start int declaration End char p3 push Java Node PACKAGE null declaration Start pop declaration End  acceptPackage declarationStart declarationEnd JavaNode declarationStart declarationEnd
public void accept Import int declaration Start int declaration End char name boolean on Demand int modifiers int length declaration End declaration Start 1 if f Import Container null f Import Container new Java Node get Current Container Java Node IMPORT CONTAINER null declaration Start length String nm new String name if on Demand nm NON NLS 1 new Java Node f Import Container Java Node IMPORT nm declaration Start length f Import Container set Length declaration End f Import Container get Start 1  acceptImport declarationStart declarationEnd onDemand declarationEnd declarationStart fImportContainer fImportContainer JavaNode getCurrentContainer JavaNode IMPORT_CONTAINER declarationStart onDemand JavaNode fImportContainer JavaNode declarationStart fImportContainer setLength declarationEnd fImportContainer getStart
public void enter Class int declaration Start int p2 char name int p4 int p5 char p6 char p7 push Java Node CLASS new String name declaration Start  enterClass declarationStart JavaNode declarationStart
public void exit Class int declaration End pop declaration End  exitClass declarationEnd declarationEnd
public void enter Interface int declaration Start int p2 char name int p4 int p5 char p6 push Java Node INTERFACE new String name declaration Start  enterInterface declarationStart JavaNode declarationStart
public void exit Interface int declaration End pop declaration End  exitInterface declarationEnd declarationEnd
public void enter Initializer int declaration Source Start int modifiers push Java Node INIT get Current Container get Initializer Count declaration Source Start  enterInitializer declarationSourceStart JavaNode getCurrentContainer getInitializerCount declarationSourceStart
public void enter Constructor int declaration Start int p2 char name int p4 int p5 char parameter Types char p7 char p8 push Java Node CONSTRUCTOR get Signature name parameter Types declaration Start  enterConstructor declarationStart parameterTypes JavaNode getSignature parameterTypes declarationStart
public void exit Constructor int declaration End pop declaration End  exitConstructor declarationEnd declarationEnd
public void enter Method int declaration Start int p2 char p3 char name int p5 int p6 char parameter Types char p8 char p9 push Java Node METHOD get Signature name parameter Types declaration Start  enterMethod declarationStart parameterTypes JavaNode getSignature parameterTypes declarationStart
public void exit Method int declaration End pop declaration End  exitMethod declarationEnd declarationEnd
public void enter Field int declaration Start int p2 char p3 char name int p5 int p6 push Java Node FIELD new String name declaration Start  enterField declarationStart JavaNode declarationStart
public void exit Field int initialization Start int declaration End int declaration Source End pop declaration End  exitField initializationStart declarationEnd declarationSourceEnd declarationEnd
private Java Node get Current Container return Java Node f Stack peek  JavaNode getCurrentContainer JavaNode fStack
Adds a new Java Node with the given type and name to the current container private void push int type String name int declaration Start while declaration Start 0 char c f Buffer declaration Start 1 if c c t break declaration Start f Stack push new Java Node get Current Container type name declaration Start 0  JavaNode declarationStart declarationStart fBuffer declarationStart declarationStart fStack JavaNode getCurrentContainer declarationStart
Closes the current Java node by setting its end position and pops it off the stack private void pop int declaration End Java Node current get Current Container current set Length declaration End current get Start 1 f Stack pop  declarationEnd JavaNode getCurrentContainer setLength declarationEnd getStart fStack
Builds a signature string from the given name and parameter types public String get Signature char name char parameter Types String Buffer buffer new String Buffer buffer append name buffer append if parameter Types null for int p 0 p parameter Types length p String parameter Type new String parameter Types p PR 1GF9WH7 ITPJUI WINNT Cannot replace main from local history we only use the last component of a type name int pos parameter Type last Index Of if pos 0 parameter Type parameter Type substring pos 1 end fix buffer append parameter Type if p parameter Types length 1 buffer append NON NLS 1 buffer append return buffer to String  getSignature parameterTypes StringBuffer StringBuffer parameterTypes parameterTypes parameterType parameterTypes parameterType lastIndexOf parameterType parameterType parameterType parameterTypes toString
see org eclipse jdt internal compiler I Source Element Requestor exit Initializer int public void exit Initializer int declaration End pop declaration End  ISourceElementRequestor exitInitializer exitInitializer declarationEnd declarationEnd

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private JDI DebugHCR Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE JDIDebugHCRMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

public interface IJDI Event Listener Handles the given event that this listener has registered for and returns whether the thread in which the event occurred should be resumed All event handlers for the events in an event set are given a chance to vote on whether the thread should be resumed If all agree the thread is resumed by the event dispatcher If any event handler returns code false code the thread in which the event originated is left in a suspended state param event the event to handle param target the debug target in which the event occurred return whether the thread in which the event occurred should be resumed  IJDIEventListener

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private JDI Debug Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME JDIDebugMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Returns whether the debug UI plug in is in trace mode return whether the debug UI plug in is in trace mode public boolean is Trace Mode return f Trace  isTraceMode fTrace
Logs the given message if in trace mode param String message to log public static void log Trace Message String message if get Default is Trace Mode I Status s new Status I Status WARNING JDI Debug Plugin get Unique Identifier INTERNAL ERROR message null get Default get Log log s  logTraceMessage getDefault isTraceMode IStatus IStatus JDIDebugPlugin getUniqueIdentifier INTERNAL_ERROR getDefault getLog
Return the singleton instance of the JDI Debug Model plug in return the singleton instance of JDI Debug Plugin public static JDI Debug Plugin get Default return fg Plugin  JDIDebugPlugin JDIDebugPlugin getDefault fgPlugin
Convenience method which returns the unique identifier of this plugin public static String get Unique Identifier TODO review this change Unclear how the plugin id could ever be different should likely just be a constant reference return org eclipse jdt debug NON NLS 1  getUniqueIdentifier
Returns the detected version of JDI support This is intended to distinguish between clients that support JDI 1 4 methods like hot code replace return an array of version numbers major followed by minor since 2 1 public static int getJDI Version if fJDI Version null fJDI Version new int 2 Virtual Machine Manager mgr Bootstrap virtual Machine Manager fJDI Version 0 mgr major Interface Version fJDI Version 1 mgr minor Interface Version return fJDI Version  getJDIVersion fJDIVersion fJDIVersion VirtualMachineManager virtualMachineManager fJDIVersion majorInterfaceVersion fJDIVersion minorInterfaceVersion fJDIVersion
Reutrns if the JDI version being used is greater than or equal to the given version major minor param version return boolean public static boolean is Jdi Version Greater Than Or Equal int version int running Version getJDI Version return running Version 0 version 0 running Version 0 version 0 running Version 1 version 1  isJdiVersionGreaterThanOrEqual runningVersion getJDIVersion runningVersion runningVersion runningVersion
public JDI Debug Plugin super fg Plugin this  JDIDebugPlugin fgPlugin
public void start Bundle Context context throws Exception super start context Java Hot Code Replace Manager get Default startup f Breakpoint Listeners new Listener List 5  BundleContext JavaHotCodeReplaceManager getDefault fBreakpointListeners ListenerList
Adds the given hot code replace listener to the collection of listeners that will be notified by the hot code replace manager in this plugin public void add Hot Code Replace Listener I Java Hot Code Replace Listener listener Java Hot Code Replace Manager get Default add Hot Code Replace Listener listener  addHotCodeReplaceListener IJavaHotCodeReplaceListener JavaHotCodeReplaceManager getDefault addHotCodeReplaceListener
Removes the given hot code replace listener from the collection of listeners that will be notified by the hot code replace manager in this plugin public void remove Hot Code Replace Listener I Java Hot Code Replace Listener listener Java Hot Code Replace Manager get Default remove Hot Code Replace Listener listener  removeHotCodeReplaceListener IJavaHotCodeReplaceListener JavaHotCodeReplaceManager getDefault removeHotCodeReplaceListener
Shutdown the HCR mgr and the Java debug targets see org osgi framework Bundle Activator stop org osgi framework Bundle Context see org eclipse core runtime Plugin shutdown public void stop Bundle Context context throws Exception try get Plugin Preferences remove Property Change Listener this save Plugin Preferences Java Hot Code Replace Manager get Default shutdown I Launch Manager launch Manager Debug Plugin get Default get Launch Manager I Debug Target targets launch Manager get Debug Targets for int i 0 i targets length i I Debug Target target targets i if target instanceof JDI Debug Target JDI Debug Target target shutdown f Breakpoint Listeners null finally fg Plugin null super stop context  BundleActivator BundleContext BundleContext getPluginPreferences removePropertyChangeListener savePluginPreferences JavaHotCodeReplaceManager getDefault ILaunchManager launchManager DebugPlugin getDefault getLaunchManager IDebugTarget launchManager getDebugTargets IDebugTarget JDIDebugTarget JDIDebugTarget fBreakpointListeners fgPlugin
Logs the specified throwable with this plug in s log param t throwable to log public static void log Throwable t Throwable top t if t instanceof Debug Exception Debug Exception de Debug Exception t I Status status de get Status if status get Exception null top status get Exception this message is intentionally not internationalized as an exception may be due to the resource bundle itself log new Status I Status ERROR get Unique Identifier INTERNAL ERROR Internal error logged from JDI Debug top NON NLS 1  DebugException DebugException DebugException IStatus getStatus getException getException IStatus getUniqueIdentifier INTERNAL_ERROR
Logs the given message if in debug mode param String message to log public static void log Debug Message String message if get Default is Debugging this message is intentionally not internationalized as an exception may be due to the resource bundle itself log new Status I Status ERROR get Unique Identifier INTERNAL ERROR Internal message logged from JDI Debug message null NON NLS 1  logDebugMessage getDefault isDebugging IStatus getUniqueIdentifier INTERNAL_ERROR
Logs the specified status with this plug in s log param status status to log public static void log I Status status get Default get Log log status  IStatus getDefault getLog
see I Java Breakpoint Listener breakpoint Has Runtime Exception I Java Line Breakpoint Debug Exception public void fire Breakpoint Has Compilation Errors I Java Line Breakpoint breakpoint Message errors get Breakpoint Notifier notify null breakpoint COMPILATION ERRORS errors null  IJavaBreakpointListener breakpointHasRuntimeException IJavaLineBreakpoint DebugException fireBreakpointHasCompilationErrors IJavaLineBreakpoint getBreakpointNotifier COMPILATION_ERRORS
see I Java Breakpoint Listener breakpoint Has Compilation Errors I Java Line Breakpoint Message public void fire Breakpoint Has Runtime Exception I Java Line Breakpoint breakpoint Debug Exception exception get Breakpoint Notifier notify null breakpoint RUNTIME EXCEPTION null exception  IJavaBreakpointListener breakpointHasCompilationErrors IJavaLineBreakpoint fireBreakpointHasRuntimeException IJavaLineBreakpoint DebugException getBreakpointNotifier RUNTIME_EXCEPTION
Adds the given breakpoint listener to the JDI debug model param listener breakpoint listener public void add Java Breakpoint Listener I Java Breakpoint Listener listener f Breakpoint Listeners add listener  addJavaBreakpointListener IJavaBreakpointListener fBreakpointListeners
Removes the given breakpoint listener from the JDI debug model param listener breakpoint listener public void remove Java Breakpoint Listener I Java Breakpoint Listener listener f Breakpoint Listeners remove listener  removeJavaBreakpointListener IJavaBreakpointListener fBreakpointListeners
Notifies listeners that the given breakpoint is about to be added param target Java debug target param breakpoint Java breakpoint public void fire Breakpoint Adding I Java Debug Target target I Java Breakpoint breakpoint get Breakpoint Notifier notify target breakpoint ADDING null null  fireBreakpointAdding IJavaDebugTarget IJavaBreakpoint getBreakpointNotifier
Notifies listeners that the given breakpoint has been installed param target Java debug target param breakpoint Java breakpoint public void fire Breakpoint Installed I Java Debug Target target I Java Breakpoint breakpoint get Breakpoint Notifier notify target breakpoint INSTALLED null null  fireBreakpointInstalled IJavaDebugTarget IJavaBreakpoint getBreakpointNotifier
Notifies listeners that the given breakpoint has been removed param target Java debug target param breakpoint Java breakpoint public void fire Breakpoint Removed I Java Debug Target target I Java Breakpoint breakpoint get Breakpoint Notifier notify target breakpoint REMOVED null null  fireBreakpointRemoved IJavaDebugTarget IJavaBreakpoint getBreakpointNotifier
Notifies listeners that the given breakpoint has been hit Returns whether the thread should suspend param target Java debug target param breakpoint Java breakpoint public boolean fire Breakpoint Hit I Java Thread thread I Java Breakpoint breakpoint return get Hit Notifier notify Hit thread breakpoint  fireBreakpointHit IJavaThread IJavaBreakpoint getHitNotifier notifyHit
Notifies listeners that the given breakpoint is about to be installed in the given type Returns whether the breakpoint should be installed param target Java debug target param breakpoint Java breakpoint param type the type the breakpoint is about to be installed in return whether the breakpoint should be installed public boolean fire Installing I Java Debug Target target I Java Breakpoint breakpoint I Java Type type return get Installing Notifier notify Installing target breakpoint type  fireInstalling IJavaDebugTarget IJavaBreakpoint IJavaType getInstallingNotifier notifyInstalling
Save preferences and update all debug targets when the timeout changes see I Property Change Listener property Change Property Change Event public void property Change Property Change Event event if event get Property equals JDI Debug Model PREF REQUEST TIMEOUT save Plugin Preferences int value get Plugin Preferences get Int JDI Debug Model PREF REQUEST TIMEOUT I Debug Target targets Debug Plugin get Default get Launch Manager get Debug Targets for int i 0 i targets length i if targets i instanceof I Java Debug Target I Java Debug Target targets i set Request Timeout value  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent getProperty JDIDebugModel PREF_REQUEST_TIMEOUT savePluginPreferences getPluginPreferences getInt JDIDebugModel PREF_REQUEST_TIMEOUT IDebugTarget DebugPlugin getDefault getLaunchManager getDebugTargets IJavaDebugTarget IJavaDebugTarget setRequestTimeout
private Breakpoint Notifier get Breakpoint Notifier return new Breakpoint Notifier  BreakpointNotifier getBreakpointNotifier BreakpointNotifier
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception  ISafeRunnable handleException handleException
see org eclipse core runtime I Safe Runnable run public void run throws Exception switch f Kind case ADDING f Listener adding Breakpoint f Target f Breakpoint break case INSTALLED f Listener breakpoint Installed f Target f Breakpoint break case REMOVED f Listener breakpoint Removed f Target f Breakpoint break case COMPILATION ERRORS f Listener breakpoint Has Compilation Errors I Java Line Breakpoint f Breakpoint f Errors break case RUNTIME EXCEPTION f Listener breakpoint Has Runtime Exception I Java Line Breakpoint f Breakpoint f Exception break  ISafeRunnable fKind fListener addingBreakpoint fTarget fBreakpoint fListener breakpointInstalled fTarget fBreakpoint fListener breakpointRemoved fTarget fBreakpoint COMPILATION_ERRORS fListener breakpointHasCompilationErrors IJavaLineBreakpoint fBreakpoint fErrors RUNTIME_EXCEPTION fListener breakpointHasRuntimeException IJavaLineBreakpoint fBreakpoint fException
Notifies listeners of the given addition install or remove param target debug target param breakpoint the associated breakpoint param kind one of ADDED REMOVED INSTALLED param errors associated errors or code null code if none param exception associated exception or code null code if none public void notify I Java Debug Target target I Java Breakpoint breakpoint int kind Message errors Debug Exception exception f Target target f Breakpoint breakpoint f Kind kind f Errors errors f Exception exception Object listeners f Breakpoint Listeners get Listeners for int i 0 i listeners length i f Listener I Java Breakpoint Listener listeners i Platform run this f Target null f Breakpoint null f Errors null f Exception null f Listener null  IJavaDebugTarget IJavaBreakpoint DebugException fTarget fBreakpoint fKind fErrors fException fBreakpointListeners getListeners fListener IJavaBreakpointListener fTarget fBreakpoint fErrors fException fListener
private Installing Notifier get Installing Notifier return new Installing Notifier  InstallingNotifier getInstallingNotifier InstallingNotifier
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception  ISafeRunnable handleException handleException
see org eclipse core runtime I Safe Runnable run public void run throws Exception f Install f Install f Listener installing Breakpoint f Target f Breakpoint f Type  ISafeRunnable fInstall fInstall fListener installingBreakpoint fTarget fBreakpoint fType
private void dispose f Target null f Breakpoint null f Type null f Listener null  fTarget fBreakpoint fType fListener
Notifies listeners that the given breakpoint is about to be installed in the given type Returns whether the breakpoint should be installed param target Java debug target param breakpoint Java breakpoint param type the type the breakpoint is about to be installed in return whether the breakpoint should be installed public boolean notify Installing I Java Debug Target target I Java Breakpoint breakpoint I Java Type type f Target target f Breakpoint breakpoint f Type type f Install I Java Breakpoint Listener DONT CARE Object listeners f Breakpoint Listeners get Listeners for int i 0 i listeners length i f Listener I Java Breakpoint Listener listeners i Platform run this dispose install if any listener voted to install or if no one voted to not install return f Install I Java Breakpoint Listener INSTALL 0 f Install I Java Breakpoint Listener DONT INSTALL 0  notifyInstalling IJavaDebugTarget IJavaBreakpoint IJavaType fTarget fBreakpoint fType fInstall IJavaBreakpointListener DONT_CARE fBreakpointListeners getListeners fListener IJavaBreakpointListener fInstall IJavaBreakpointListener fInstall IJavaBreakpointListener DONT_INSTALL
private Hit Notifier get Hit Notifier return new Hit Notifier  HitNotifier getHitNotifier HitNotifier
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception  ISafeRunnable handleException handleException
see org eclipse core runtime I Safe Runnable run public void run throws Exception f Suspend f Suspend f Listener breakpoint Hit f Thread f Breakpoint  ISafeRunnable fSuspend fSuspend fListener breakpointHit fThread fBreakpoint
Notifies listeners that the given breakpoint has been hit Returns whether the thread should suspend param thread thread in which the breakpoint was hit param breakpoint Java breakpoint return whether the thread should suspend public boolean notify Hit I Java Thread thread I Java Breakpoint breakpoint f Thread thread f Breakpoint breakpoint Object listeners f Breakpoint Listeners get Listeners f Suspend I Java Breakpoint Listener DONT CARE for int i 0 i listeners length i f Listener I Java Breakpoint Listener listeners i Platform run this f Thread null f Breakpoint null f Listener null Suspend if any listener voted to suspend or no one voted don t suspend return f Suspend I Java Breakpoint Listener SUSPEND 0 f Suspend I Java Breakpoint Listener DONT SUSPEND 0  notifyHit IJavaThread IJavaBreakpoint fThread fBreakpoint fBreakpointListeners getListeners fSuspend IJavaBreakpointListener DONT_CARE fListener IJavaBreakpointListener fThread fBreakpoint fListener fSuspend IJavaBreakpointListener fSuspend IJavaBreakpointListener DONT_SUSPEND
protected void initialize Default Plugin Preferences super initialize Default Plugin Preferences Preferences prefs get Plugin Preferences prefs set Default JDI Debug Model PREF REQUEST TIMEOUT JDI Debug Model DEF REQUEST TIMEOUT prefs set Default JDI Debug Model PREF HCR WITH COMPILATION ERRORS true prefs set Default JDI Debug Model PREF SUSPEND FOR BREAKPOINTS DURING EVALUATION true prefs add Property Change Listener this  initializeDefaultPluginPreferences initializeDefaultPluginPreferences getPluginPreferences setDefault JDIDebugModel PREF_REQUEST_TIMEOUT JDIDebugModel DEF_REQUEST_TIMEOUT setDefault JDIDebugModel PREF_HCR_WITH_COMPILATION_ERRORS setDefault JDIDebugModel PREF_SUSPEND_FOR_BREAKPOINTS_DURING_EVALUATION addPropertyChangeListener

see org eclipse jdt debug core I Evaluation Runnable run org eclipse jdt debug core I Java Thread org eclipse core runtime I Progress Monitor public void run I Java Thread thread I Progress Monitor monitor throws Debug Exception set Logical Structure get Object send Message to Array Ljava lang Object null thread false NON NLS 1 NON NLS 2  IEvaluationRunnable IJavaThread IProgressMonitor IJavaThread IProgressMonitor DebugException setLogicalStructure getObject sendMessage toArray
protected I Evaluation Runnable get Evaluation return new I Evaluation Runnable non Javadoc see org eclipse jdt debug core I Evaluation Runnable run org eclipse jdt debug core I Java Thread org eclipse core runtime I Progress Monitor public void run I Java Thread thread I Progress Monitor monitor throws Debug Exception set Logical Structure get Object send Message to Array Ljava lang Object null thread false NON NLS 1 NON NLS 2  IEvaluationRunnable getEvaluation IEvaluationRunnable IEvaluationRunnable IJavaThread IProgressMonitor IJavaThread IProgressMonitor DebugException setLogicalStructure getObject sendMessage toArray
see org eclipse jdt internal debug core logicalstructures Logical Object Structure Type get Target Interface Name protected String get Target Interface Name return java util Collection NON NLS 1  LogicalObjectStructureType getTargetInterfaceName getTargetInterfaceName

see org eclipse jdt debug core I Evaluation Runnable run org eclipse jdt debug core I Java Thread org eclipse core runtime I Progress Monitor public void run I Java Thread thread I Progress Monitor monitor throws Debug Exception set Logical Structure get Object send Message get Children Lorg eclipse swt widgets Control null thread false NON NLS 1 NON NLS 2  IEvaluationRunnable IJavaThread IProgressMonitor IJavaThread IProgressMonitor DebugException setLogicalStructure getObject sendMessage getChildren
protected I Evaluation Runnable get Evaluation return new I Evaluation Runnable non Javadoc see org eclipse jdt debug core I Evaluation Runnable run org eclipse jdt debug core I Java Thread org eclipse core runtime I Progress Monitor public void run I Java Thread thread I Progress Monitor monitor throws Debug Exception set Logical Structure get Object send Message get Children Lorg eclipse swt widgets Control null thread false NON NLS 1 NON NLS 2  IEvaluationRunnable getEvaluation IEvaluationRunnable IEvaluationRunnable IJavaThread IProgressMonitor IJavaThread IProgressMonitor DebugException setLogicalStructure getObject sendMessage getChildren
see org eclipse jdt internal debug core logicalstructures Logical Object Structure Class Type get Target Class Name protected String get Target Class Name return org eclipse swt widgets Composite NON NLS 1  LogicalObjectStructureClassType getTargetClassName getTargetClassName

private I Java Value f Value public JDI Placeholder Variable String name I Java Value value f Name name f Value value  IJavaValue fValue JDIPlaceholderVariable IJavaValue fName fValue
see org eclipse jdt debug core I Java Variable get Signature public String get Signature throws Debug Exception return I Java Value get Value get Signature  IJavaVariable getSignature getSignature DebugException IJavaValue getValue getSignature
see org eclipse jdt debug core I Java Variable get Java Type public I Java Type get Java Type throws Debug Exception return I Java Value get Value get Java Type  IJavaVariable getJavaType IJavaType getJavaType DebugException IJavaValue getValue getJavaType
see org eclipse jdt debug core I Java Variable is Local public boolean is Local return false  IJavaVariable isLocal isLocal
see org eclipse debug core model I Variable get Value public I Value get Value return f Value  IVariable getValue IValue getValue fValue
see org eclipse debug core model I Variable get Name public String get Name return f Name  IVariable getName getName fName
see org eclipse debug core model I Variable get Reference Type Name public String get Reference Type Name throws Debug Exception return I Java Value get Value get Reference Type Name  IVariable getReferenceTypeName getReferenceTypeName DebugException IJavaValue getValue getReferenceTypeName
see org eclipse debug core model I Variable has Value Changed public boolean has Value Changed return false  IVariable hasValueChanged hasValueChanged
see org eclipse jdt debug core I Java Modifiers is Public public boolean is Public return false  IJavaModifiers isPublic isPublic
see org eclipse jdt debug core I Java Modifiers is Private public boolean is Private return false  IJavaModifiers isPrivate isPrivate
see org eclipse jdt debug core I Java Modifiers is Protected public boolean is Protected return false  IJavaModifiers isProtected isProtected
see org eclipse jdt debug core I Java Modifiers is Package Private public boolean is Package Private return false  IJavaModifiers isPackagePrivate isPackagePrivate
see org eclipse jdt debug core I Java Modifiers is Final public boolean is Final return false  IJavaModifiers isFinal isFinal
see org eclipse jdt debug core I Java Modifiers is Static public boolean is Static return false  IJavaModifiers isStatic isStatic
see org eclipse jdt debug core I Java Modifiers is Synthetic public boolean is Synthetic return false  IJavaModifiers isSynthetic isSynthetic
see org eclipse debug core model I Debug Element get Model Identifier public String get Model Identifier return get Value get Model Identifier  IDebugElement getModelIdentifier getModelIdentifier getValue getModelIdentifier
see org eclipse debug core model I Debug Element get Debug Target public I Debug Target get Debug Target return I Java Value get Value get Debug Target  IDebugElement getDebugTarget IDebugTarget getDebugTarget IJavaValue getValue getDebugTarget
see org eclipse debug core model I Debug Element get Launch public I Launch get Launch return get Value get Launch  IDebugElement getLaunch ILaunch getLaunch getValue getLaunch
see org eclipse debug core model I Value Modification set Value java lang String public void set Value String expression  IValueModification setValue setValue
see org eclipse debug core model I Value Modification set Value org eclipse debug core model I Value public void set Value I Value value  IValueModification setValue IValue setValue IValue
see org eclipse debug core model I Value Modification supports Value Modification public boolean supports Value Modification return false  IValueModification supportsValueModification supportsValueModification
see org eclipse debug core model I Value Modification verify Value java lang String public boolean verify Value String expression return false  IValueModification verifyValue verifyValue
see org eclipse debug core model I Value Modification verify Value org eclipse debug core model I Value public boolean verify Value I Value value return false  IValueModification verifyValue IValue verifyValue IValue
public Object get Adapter Class adapter if I Java Variable class equals adapter I Java Modifiers class equals adapter return this return super get Adapter adapter  getAdapter IJavaVariable IJavaModifiers getAdapter
public boolean equals Object obj if obj instanceof JDI Placeholder Variable JDI Placeholder Variable var JDI Placeholder Variable obj return var get Name equals get Name var get Value equals get Value return false  JDIPlaceholderVariable JDIPlaceholderVariable JDIPlaceholderVariable getName getName getValue getValue
see java lang Object hash Code public int hash Code return f Name hash Code f Value hash Code  hashCode hashCode fName hashCode fValue hashCode

public boolean provides Logical Structure I Value value if value instanceof I Java Object I Java Object object I Java Object value try I Java Type type object get Java Type if type instanceof I Java Class Type I Java Class Type class Type I Java Class Type type String target Class get Target Class Name while class Type null if class Type get Name equals target Class return true else class Type class Type get Superclass catch Debug Exception e return false  providesLogicalStructure IValue IJavaObject IJavaObject IJavaObject IJavaType getJavaType IJavaClassType IJavaClassType classType IJavaClassType targetClass getTargetClassName classType classType getName targetClass classType classType getSuperclass DebugException
Returns the name of a class that an object must be an instance or subtype of for this structure type to be appropriate return the name of a class that an object must be an instance or subtype of for this structure type to be appropriate 
see org eclipse jdt internal debug core logicalstructures Logical Object Structure Interface Type get Target Interface Name protected String get Target Interface Name not used return null  LogicalObjectStructureInterfaceType getTargetInterfaceName getTargetInterfaceName

public boolean provides Logical Structure I Value value if value instanceof I Java Object I Java Object object I Java Object value try I Java Type type object get Java Type if type instanceof I Java Class Type I Java Class Type class Type I Java Class Type type I Java Interface Type interface Types class Type get All Interfaces String target Interface get Target Interface Name for int i 0 i interface Types length i I Java Interface Type inter interface Types i if inter get Name equals target Interface return true catch Debug Exception e return false  providesLogicalStructure IValue IJavaObject IJavaObject IJavaObject IJavaType getJavaType IJavaClassType IJavaClassType classType IJavaClassType IJavaInterfaceType interfaceTypes classType getAllInterfaces targetInterface getTargetInterfaceName interfaceTypes IJavaInterfaceType interfaceTypes getName targetInterface DebugException
Returns the name of an interface that an object must implement for this structure type to be appropriate return the name of an interface that an object must implement for this structure type to be appropriate 
Returns the evaluation that computes the logical object structure for this strucutre type return the evaluation that computes the logical object structure for this strucutre type 
thread queue Runnable new Runnable public void run try thread run Evaluation evaluation null Debug Event EVALUATION IMPLICIT false catch Debug Exception e ex 0 e synchronized lock f Done true lock notify All  queueRunnable runEvaluation DebugEvent EVALUATION_IMPLICIT DebugException fDone notifyAll
public synchronized I Value get Logical Structure I Value value throws Core Exception final I Java Thread thread get Thread value if thread null can t do it throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier JDI Debug Plugin INTERNAL ERROR Logical Structures Messages get String Logical Object Structure Type 1 null NON NLS 1 set Object I Java Object value final I Evaluation Runnable evaluation get Evaluation final Core Exception ex new Core Exception 1 final Object lock this f Done false if thread is Performing Evaluation thread is Suspended return value thread queue Runnable new Runnable public void run try thread run Evaluation evaluation null Debug Event EVALUATION IMPLICIT false catch Debug Exception e ex 0 e synchronized lock f Done true lock notify All try synchronized lock if f Done lock wait catch Interrupted Exception e if ex 0 null throw ex 0 return f Result  IValue getLogicalStructure IValue CoreException IJavaThread getThread CoreException IStatus JDIDebugPlugin getUniqueIdentifier JDIDebugPlugin INTERNAL_ERROR LogicalStructuresMessages getString LogicalObjectStructureType setObject IJavaObject IEvaluationRunnable getEvaluation CoreException CoreException fDone isPerformingEvaluation isSuspended queueRunnable runEvaluation DebugEvent EVALUATION_IMPLICIT DebugException fDone notifyAll fDone InterruptedException fResult
private I Java Thread get Thread I Value value throws Core Exception I Status Handler handler get Thread Provider if handler null I Java Thread thread I Java Thread handler handle Status fg Need Thread value if thread null return thread I Debug Target target value get Debug Target I Java Debug Target java Target I Java Debug Target target get Adapter I Java Debug Target class if java Target null I Thread threads java Target get Threads for int i 0 i threads length i I Thread thread threads i if thread is Suspended return I Java Thread thread return null  IJavaThread getThread IValue CoreException IStatusHandler getThreadProvider IJavaThread IJavaThread handleStatus fgNeedThread IDebugTarget getDebugTarget IJavaDebugTarget javaTarget IJavaDebugTarget getAdapter IJavaDebugTarget javaTarget IThread javaTarget getThreads IThread isSuspended IJavaThread
private static I Status Handler get Thread Provider if fg Thread Provider null fg Thread Provider Debug Plugin get Default get Status Handler fg Need Thread return fg Thread Provider  IStatusHandler getThreadProvider fgThreadProvider fgThreadProvider DebugPlugin getDefault getStatusHandler fgNeedThread fgThreadProvider
Sets the object for which a logical structure is to be provided param object the object for which a logical structure is to be provided private void set Object I Java Object object f Object object  setObject IJavaObject fObject
Returns the object for which a logical structure is to be provided return the object for which a logical structure is to be provided protected I Java Object get Object return f Object  IJavaObject getObject fObject
Sets the object representing the logical structure param result the object representing the logical structure protected void set Logical Structure I Value result f Result result  setLogicalStructure IValue fResult

Constructs a proxy to the given object with the given variables as children param object original object public Logical Object Structure Value I Java Object object I Java Variable variables f Object object f Variables variables  LogicalObjectStructureValue IJavaObject IJavaVariable fObject fVariables
see org eclipse jdt debug core I Java Object send Message java lang String java lang String org eclipse jdt debug core I Java Value org eclipse jdt debug core I Java Thread boolean public I Java Value send Message String selector String signature I Java Value args I Java Thread thread boolean super Send throws Debug Exception return f Object send Message selector signature args thread super Send  IJavaObject sendMessage IJavaValue IJavaThread IJavaValue sendMessage IJavaValue IJavaThread superSend DebugException fObject sendMessage superSend
see org eclipse jdt debug core I Java Object send Message java lang String java lang String org eclipse jdt debug core I Java Value org eclipse jdt debug core I Java Thread java lang String public I Java Value send Message String selector String signature I Java Value args I Java Thread thread String type Signature throws Debug Exception return f Object send Message selector signature args thread type Signature  IJavaObject sendMessage IJavaValue IJavaThread IJavaValue sendMessage IJavaValue IJavaThread typeSignature DebugException fObject sendMessage typeSignature
see org eclipse jdt debug core I Java Object get Field java lang String boolean public I Java Field Variable get Field String name boolean super Field throws Debug Exception return f Object get Field name super Field  IJavaObject getField IJavaFieldVariable getField superField DebugException fObject getField superField
see org eclipse jdt debug core I Java Object get Field java lang String java lang String public I Java Field Variable get Field String name String type Signature throws Debug Exception return f Object get Field name type Signature  IJavaObject getField IJavaFieldVariable getField typeSignature DebugException fObject getField typeSignature
see org eclipse jdt debug core I Java Value get Signature public String get Signature throws Debug Exception return f Object get Signature  IJavaValue getSignature getSignature DebugException fObject getSignature
see org eclipse jdt debug core I Java Value get Java Type public I Java Type get Java Type throws Debug Exception return f Object get Java Type  IJavaValue getJavaType IJavaType getJavaType DebugException fObject getJavaType
see org eclipse debug core model I Value get Reference Type Name public String get Reference Type Name throws Debug Exception return f Object get Reference Type Name  IValue getReferenceTypeName getReferenceTypeName DebugException fObject getReferenceTypeName
see org eclipse debug core model I Value get Value String public String get Value String throws Debug Exception return f Object get Value String  IValue getValueString getValueString DebugException fObject getValueString
see org eclipse debug core model I Value is Allocated public boolean is Allocated throws Debug Exception return f Object is Allocated  IValue isAllocated isAllocated DebugException fObject isAllocated
see org eclipse debug core model I Value get Variables public I Variable get Variables return f Variables  IValue getVariables IVariable getVariables fVariables
see org eclipse debug core model I Value has Variables public boolean has Variables return f Variables length 0  IValue hasVariables hasVariables fVariables
see org eclipse debug core model I Debug Element get Model Identifier public String get Model Identifier return f Object get Model Identifier  IDebugElement getModelIdentifier getModelIdentifier fObject getModelIdentifier
see org eclipse debug core model I Debug Element get Debug Target public I Debug Target get Debug Target return f Object get Debug Target  IDebugElement getDebugTarget IDebugTarget getDebugTarget fObject getDebugTarget
see org eclipse debug core model I Debug Element get Launch public I Launch get Launch return f Object get Launch  IDebugElement getLaunch ILaunch getLaunch fObject getLaunch
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return f Object get Adapter adapter  IAdaptable getAdapter getAdapter fObject getAdapter

Resource Bundle get Bundle BUNDLE NAME private Logical Structures Messages  ResourceBundle getBundle BUNDLE_NAME LogicalStructuresMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public void run I Java Thread thread I Progress Monitor monitor throws Debug Exception I Java Value key get Object send Message get Key Ljava lang Object null thread false NON NLS 1 NON NLS 2 I Java Value value get Object send Message get Value Ljava lang Object null thread false NON NLS 1 NON NLS 2 I Java Variable java Vars new I Java Variable 2 java Vars 0 new JDI Placeholder Variable key key NON NLS 1 java Vars 1 new JDI Placeholder Variable value value NON NLS 1 Logical Object Structure Value structure new Logical Object Structure Value get Object java Vars set Logical Structure structure  IJavaThread IProgressMonitor DebugException IJavaValue getObject sendMessage getKey IJavaValue getObject sendMessage getValue IJavaVariable javaVars IJavaVariable javaVars JDIPlaceholderVariable javaVars JDIPlaceholderVariable LogicalObjectStructureValue LogicalObjectStructureValue getObject javaVars setLogicalStructure
protected I Evaluation Runnable get Evaluation return new I Evaluation Runnable non Javadoc see org eclipse jdt debug core I Evaluation Runnable run org eclipse jdt debug core I Java Thread org eclipse core runtime I Progress Monitor public void run I Java Thread thread I Progress Monitor monitor throws Debug Exception I Java Value key get Object send Message get Key Ljava lang Object null thread false NON NLS 1 NON NLS 2 I Java Value value get Object send Message get Value Ljava lang Object null thread false NON NLS 1 NON NLS 2 I Java Variable java Vars new I Java Variable 2 java Vars 0 new JDI Placeholder Variable key key NON NLS 1 java Vars 1 new JDI Placeholder Variable value value NON NLS 1 Logical Object Structure Value structure new Logical Object Structure Value get Object java Vars set Logical Structure structure  IEvaluationRunnable getEvaluation IEvaluationRunnable IEvaluationRunnable IJavaThread IProgressMonitor IJavaThread IProgressMonitor DebugException IJavaValue getObject sendMessage getKey IJavaValue getObject sendMessage getValue IJavaVariable javaVars IJavaVariable javaVars JDIPlaceholderVariable javaVars JDIPlaceholderVariable LogicalObjectStructureValue LogicalObjectStructureValue getObject javaVars setLogicalStructure
see org eclipse jdt internal debug core logicalstructures Logical Object Structure Type get Target Interface Name protected String get Target Interface Name return java util Map Entry NON NLS 1  LogicalObjectStructureType getTargetInterfaceName getTargetInterfaceName

public void run I Java Thread thread I Progress Monitor monitor throws Debug Exception I Java Value value get Object send Message entry Set Ljava util Set null thread false NON NLS 1 NON NLS 2 if value instanceof I Java Object set Logical Structure I Java Object value send Message to Array Ljava lang Object null thread false NON NLS 1 NON NLS 2 else could be null see bug 63828 set Logical Structure value  IJavaThread IProgressMonitor DebugException IJavaValue getObject sendMessage entrySet IJavaObject setLogicalStructure IJavaObject sendMessage toArray setLogicalStructure
protected I Evaluation Runnable get Evaluation return new I Evaluation Runnable non Javadoc see org eclipse jdt debug core I Evaluation Runnable run org eclipse jdt debug core I Java Thread org eclipse core runtime I Progress Monitor public void run I Java Thread thread I Progress Monitor monitor throws Debug Exception I Java Value value get Object send Message entry Set Ljava util Set null thread false NON NLS 1 NON NLS 2 if value instanceof I Java Object set Logical Structure I Java Object value send Message to Array Ljava lang Object null thread false NON NLS 1 NON NLS 2 else could be null see bug 63828 set Logical Structure value  IEvaluationRunnable getEvaluation IEvaluationRunnable IEvaluationRunnable IJavaThread IProgressMonitor IJavaThread IProgressMonitor DebugException IJavaValue getObject sendMessage entrySet IJavaObject setLogicalStructure IJavaObject sendMessage toArray setLogicalStructure
see org eclipse jdt internal debug core logicalstructures Logical Object Structure Type get Target Interface Name protected String get Target Interface Name return java util Map NON NLS 1  LogicalObjectStructureType getTargetInterfaceName getTargetInterfaceName

public interface I Timeout Listener Notifies this listener that its timeout request has expired public void timeout  ITimeoutListener

Constructs an array entry at the given index in an array public JDI Array Entry Variable JDI Debug Target target Array Reference array int index super target f Array array f Index index  JDIArrayEntryVariable JDIDebugTarget ArrayReference fArray fIndex
Returns this variable s current underlying value protected Value retrieve Value Array Reference ar get Array Reference if ar null return ar get Value get Index return null  retrieveValue ArrayReference getArrayReference getValue getIndex
see I Variable get Name public String get Name return get Index NON NLS 2 NON NLS 1  IVariable getName getName getIndex
protected void set Value Value value throws Debug Exception Array Reference ar get Array Reference if ar null request Failed JDI Debug Model Messages get String JDI Array Entry Variable value modification failed null NON NLS 1 try ar set Value get Index value catch Class Not Loaded Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Entry Variable exception modifying variable value new String e to String e NON NLS 1 catch Invalid Type Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Entry Variable exception modifying variable value 2 new String e to String e NON NLS 1 catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Entry Variable exception modifying variable value 3 new String e to String e NON NLS 1  setValue DebugException ArrayReference getArrayReference requestFailed JDIDebugModelMessages getString JDIArrayEntryVariable value_modification_failed setValue getIndex ClassNotLoadedException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayEntryVariable exception_modifying_variable_value toString InvalidTypeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayEntryVariable exception_modifying_variable_value_2 toString RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayEntryVariable exception_modifying_variable_value_3 toString
protected Array Reference get Array Reference return f Array  ArrayReference getArrayReference fArray
protected int get Index return f Index  getIndex fIndex
see I Variable get Reference Type Name public String get Reference Type Name throws Debug Exception try if f Reference Type Name null f Reference Type Name strip Brackets get Array Reference reference Type name catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Entry Variable exception retrieving reference type new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null return f Reference Type Name  IVariable getReferenceTypeName getReferenceTypeName DebugException fReferenceTypeName fReferenceTypeName stripBrackets getArrayReference referenceType RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayEntryVariable exception_retrieving_reference_type toString targetRequestFailed fReferenceTypeName
Given a type name strip out one set of array brackets and return the result Example int becomes int protected String strip Brackets String type Name int last Left type Name last Index Of NON NLS 1 if last Left 0 return type Name String Buffer buffer new String Buffer type Name buffer replace last Left last Left 2 NON NLS 1 return buffer to String  stripBrackets typeName lastLeft typeName lastIndexOf lastLeft typeName StringBuffer StringBuffer typeName lastLeft lastLeft toString
see I Java Variable get Signature public String get Signature throws Debug Exception try return get Array Reference type signature catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Entry Variable exception retrieving type signature new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null  IJavaVariable getSignature getSignature DebugException getArrayReference RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayEntryVariable exception_retrieving_type_signature toString targetRequestFailed
see I Value Modification set Value I Value public void set Value I Value v throws Debug Exception if verify Value v JDI Value value JDI Value v try get Array Reference set Value get Index value get Underlying Value catch Invalid Type Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Entry Variable exception attempting to set value of field new String e to String e NON NLS 1 catch Class Not Loaded Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Entry Variable exception attempting to set value of field new String e to String e NON NLS 1 catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Entry Variable exception attempting to set value of field new String e to String e NON NLS 1  IValueModification setValue IValue setValue IValue DebugException verifyValue JDIValue JDIValue getArrayReference setValue getIndex getUnderlyingValue InvalidTypeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayEntryVariable exception_attempting_to_set_value_of_field toString ClassNotLoadedException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayEntryVariable exception_attempting_to_set_value_of_field toString RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayEntryVariable exception_attempting_to_set_value_of_field toString
see JDI Variable get Underlying Type protected Type get Underlying Type throws Debug Exception try return Array Type get Array Reference type component Type catch Class Not Loaded Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Entry Variable exception while retrieving type of array entry new String e to String e NON NLS 1 catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Entry Variable exception while retrieving type of array entry new String e to String e NON NLS 1 this line will not be exceucted as an exception will be throw in type retrieval fails return null  JDIVariable getUnderlyingType getUnderlyingType DebugException ArrayType getArrayReference componentType ClassNotLoadedException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayEntryVariable exception_while_retrieving_type_of_array_entry toString RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayEntryVariable exception_while_retrieving_type_of_array_entry toString
public boolean equals Object obj if obj instanceof JDI Array Entry Variable JDI Array Entry Variable entry JDI Array Entry Variable obj return entry get Array Reference equals get Array Reference entry get Index get Index return false  JDIArrayEntryVariable JDIArrayEntryVariable JDIArrayEntryVariable getArrayReference getArrayReference getIndex getIndex
see java lang Object hash Code public int hash Code return get Array Reference hash Code get Index  hashCode hashCode getArrayReference hashCode getIndex

Cosntructs a new array type on the given target referencing the specified array type public JDI Array Type JDI Debug Target target Array Type type super target type  JDIArrayType JDIDebugTarget ArrayType
see I Java Array Type new Instance int public I Java Array new Instance int size throws Debug Exception try Array Reference ar Array Type get Underlying Type new Instance size return I Java Array JDI Value create Value get Debug Target ar catch Runtime Exception e get Debug Target target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Type exception while creating new instance of array new String e to String e NON NLS 1 execution will not reach this line as an exception will be thrown return null  IJavaArrayType newInstance IJavaArray newInstance DebugException ArrayReference ArrayType getUnderlyingType newInstance IJavaArray JDIValue createValue getDebugTarget RuntimeException getDebugTarget targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayType exception_while_creating_new_instance_of_array toString
see I Java Array get Component Type public I Java Type get Component Type throws Debug Exception try Type type Array Type get Underlying Type component Type return JDI Type create Type get Debug Target type catch Class Not Loaded Exception e get Debug Target target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Type exception while retrieving component type of array new String e to String e NON NLS 1 catch Runtime Exception e get Debug Target target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Type exception while retrieving component type of array new String e to String e NON NLS 1 execution will not reach this line as an exception will be thrown return null  IJavaArray getComponentType IJavaType getComponentType DebugException ArrayType getUnderlyingType componentType JDIType createType getDebugTarget ClassNotLoadedException getDebugTarget targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayType exception_while_retrieving_component_type_of_array toString RuntimeException getDebugTarget targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayType exception_while_retrieving_component_type_of_array toString

Constructs a value which is a reference to an array param target debug target on which the array exists param value the reference to the array public JDI Array Value JDI Debug Target target Array Reference value super target value  JDIArrayValue JDIDebugTarget ArrayReference
see I Java Array get Values public I Java Value get Values throws Debug Exception List list get Underlying Values int count list size I Java Value values new I Java Value count JDI Debug Target target JDI Debug Target get Debug Target for int i 0 i count i Value value Value list get i values i JDI Value create Value target value return values  IJavaArray getValues IJavaValue getValues DebugException getUnderlyingValues IJavaValue IJavaValue JDIDebugTarget JDIDebugTarget getDebugTarget JDIValue createValue
see I Java Array get Value int public I Java Value get Value int index throws Debug Exception Value v get Underlying Value index return JDI Value create Value JDI Debug Target get Debug Target v  IJavaArray getValue IJavaValue getValue DebugException getUnderlyingValue JDIValue createValue JDIDebugTarget getDebugTarget
see I Java Array get Length public int get Length throws Debug Exception try return get Array Reference length catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Value exception while retrieving array length new String e to String e NON NLS 1 exectution will not reach this line as an exception will be thrown return 0  IJavaArray getLength getLength DebugException getArrayReference RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayValue exception_while_retrieving_array_length toString
see I Java Array set Value int I Java Value public void set Value int index I Java Value value throws Debug Exception try get Array Reference set Value index JDI Value value get Underlying Value catch Index Out Of Bounds Exception e throw e catch Invalid Type Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Value exception while setting value in array new String e to String e NON NLS 1 catch Class Not Loaded Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Value exception while setting value in array new String e to String e NON NLS 1 catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Value exception while setting value in array new String e to String e NON NLS 1  IJavaArray setValue IJavaValue setValue IJavaValue DebugException getArrayReference setValue JDIValue getUnderlyingValue IndexOutOfBoundsException InvalidTypeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayValue exception_while_setting_value_in_array toString ClassNotLoadedException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayValue exception_while_setting_value_in_array toString RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayValue exception_while_setting_value_in_array toString
Returns the underlying array reference for this array return underlying array reference protected Array Reference get Array Reference return Array Reference get Underlying Value  ArrayReference getArrayReference ArrayReference getUnderlyingValue
Returns the underlying value at the given index from the underlying array reference param index the index at which to retrieve a value return value exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected Value get Underlying Value int index throws Debug Exception try return get Array Reference get Value index catch Index Out Of Bounds Exception e throw e catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Value exception while retrieving value from array new String e to String e NON NLS 1 execution will not reach this line as an exception will be thrown return null  DebugException DebugException getUnderlyingValue DebugException getArrayReference getValue IndexOutOfBoundsException RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayValue exception_while_retrieving_value_from_array toString
Returns the underlying values from the underlying array reference return list of values exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected List get Underlying Values throws Debug Exception try return get Array Reference get Values catch Index Out Of Bounds Exception e return Collections EMPTY LIST catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Array Value exception while retrieving values from array new String e to String e NON NLS 1 execution will not reach this line as an exception will be thrown return null  DebugException DebugException getUnderlyingValues DebugException getArrayReference getValues IndexOutOfBoundsException EMPTY_LIST RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIArrayValue exception_while_retrieving_values_from_array toString
see org eclipse debug core model I Indexed Value get Size public int get Size throws Debug Exception return get Length  IIndexedValue getSize getSize DebugException getLength
public I Variable get Variable int offset throws Debug Exception if offset get Length request Failed JDI Debug Model Messages get String JDI Array Value 6 null NON NLS 1 return new JDI Array Entry Variable get Java Debug Target get Array Reference offset  IVariable getVariable DebugException getLength requestFailed JDIDebugModelMessages getString JDIArrayValue JDIArrayEntryVariable getJavaDebugTarget getArrayReference
public I Variable get Variables int offset int length throws Debug Exception if offset get Length request Failed JDI Debug Model Messages get String JDI Array Value 6 null NON NLS 1 if offset length 1 get Length request Failed JDI Debug Model Messages get String JDI Array Value 8 null NON NLS 1 I Variable variables new I Variable length int index offset for int i 0 i length i variables i new JDI Array Entry Variable get Java Debug Target get Array Reference index index return variables  IVariable getVariables DebugException getLength requestFailed JDIDebugModelMessages getString JDIArrayValue getLength requestFailed JDIDebugModelMessages getString JDIArrayValue IVariable IVariable JDIArrayEntryVariable getJavaDebugTarget getArrayReference
see org eclipse debug core model I Indexed Value get Initial Offset public int get Initial Offset return 0  IIndexedValue getInitialOffset getInitialOffset

Constructs a reference to a class object public JDI Class Object Value JDI Debug Target target Class Object Reference object super target object  JDIClassObjectValue JDIDebugTarget ClassObjectReference
see I Java Class Object get Instance Type public I Java Type get Instance Type return JDI Type create Type JDI Debug Target get Debug Target get Underlying Class Object reflected Type  IJavaClassObject getInstanceType IJavaType getInstanceType JDIType createType JDIDebugTarget getDebugTarget getUnderlyingClassObject reflectedType
Returns the underlying class object protected Class Object Reference get Underlying Class Object return Class Object Reference get Underlying Value  ClassObjectReference getUnderlyingClassObject ClassObjectReference getUnderlyingValue

Cosntructs a new class type on the given target referencing the specified class type public JDI Class Type JDI Debug Target target Class Type type super target type  JDIClassType JDIDebugTarget ClassType
see I Java Class Type new Instance String I Java Value I Java Thread public I Java Object new Instance String signature I Java Value args I Java Thread thread throws Debug Exception if get Underlying Type instanceof Class Type Class Type clazz Class Type get Underlying Type JDI Thread java Thread JDI Thread thread List arguments convert Arguments args Method method null try List methods clazz methods By Name init signature NON NLS 1 if methods is Empty get Debug Target request Failed Message Format format JDI Debug Model Messages get String JDI Class Type Type does not implement cosntructor new String signature null NON NLS 1 else method Method methods get 0 catch Runtime Exception e get Debug Target target Request Failed Message Format format JDI Debug Model Messages get String JDI Class Type exception while performing method lookup for constructor new String e to String signature e NON NLS 1 Object Reference result java Thread new Instance clazz method arguments return I Java Object JDI Value create Value get Debug Target result else get Debug Target request Failed JDI Debug Model Messages get String JDI Class Type Type is not a class type null NON NLS 1 execution will not fall through to here as request Failed will throw an exception return null  IJavaClassType newInstance IJavaValue IJavaThread IJavaObject newInstance IJavaValue IJavaThread DebugException getUnderlyingType ClassType ClassType ClassType getUnderlyingType JDIThread javaThread JDIThread convertArguments methodsByName isEmpty getDebugTarget requestFailed MessageFormat JDIDebugModelMessages getString JDIClassType Type_does_not_implement_cosntructor RuntimeException getDebugTarget targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIClassType exception_while_performing_method_lookup_for_constructor toString ObjectReference javaThread newInstance IJavaObject JDIValue createValue getDebugTarget getDebugTarget requestFailed JDIDebugModelMessages getString JDIClassType Type_is_not_a_class_type requestFailed
see I Java Type send Message String String I Java Value I Java Thread public I Java Value send Message String selector String signature I Java Value args I Java Thread thread throws Debug Exception if get Underlying Type instanceof Class Type Class Type clazz Class Type get Underlying Type JDI Thread java Thread JDI Thread thread List arguments convert Arguments args Method method null try List methods clazz methods By Name selector signature if methods is Empty get Debug Target request Failed Message Format format JDI Debug Model Messages get String JDI Class Type Type does not implement selector new String selector signature null NON NLS 1 else method Method methods get 0 catch Runtime Exception e get Debug Target target Request Failed Message Format format JDI Debug Model Messages get String JDI Class Type exception while performing method lookup for selector new String e to String selector signature e NON NLS 1 Value result java Thread invoke Method clazz null method arguments false return JDI Value create Value get Debug Target result else get Debug Target request Failed JDI Debug Model Messages get String JDI Class Type Type is not a class type null NON NLS 1 execution will not fall through to here as request Failed will throw an exception return null  IJavaType sendMessage IJavaValue IJavaThread IJavaValue sendMessage IJavaValue IJavaThread DebugException getUnderlyingType ClassType ClassType ClassType getUnderlyingType JDIThread javaThread JDIThread convertArguments methodsByName isEmpty getDebugTarget requestFailed MessageFormat JDIDebugModelMessages getString JDIClassType Type_does_not_implement_selector RuntimeException getDebugTarget targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIClassType exception_while_performing_method_lookup_for_selector toString javaThread invokeMethod JDIValue createValue getDebugTarget getDebugTarget requestFailed JDIDebugModelMessages getString JDIClassType Type_is_not_a_class_type requestFailed
Utility method to convert argument array to an argument list param args array of arguments as code I Java Value code s possibly code null code or empty return a list of underlying code Value code s protected List convert Arguments I Java Value args List arguments null if args null arguments Collections EMPTY LIST else arguments new Array List args length for int i 0 i args length i arguments add JDI Value args i get Underlying Value return arguments  IJavaValue convertArguments IJavaValue EMPTY_LIST ArrayList JDIValue getUnderlyingValue
see I Java Class Type get Superclass public I Java Class Type get Superclass throws Debug Exception try Class Type superclazz Class Type get Underlying Type superclass if superclazz null return I Java Class Type JDI Type create Type get Debug Target superclazz catch Runtime Exception e get Debug Target target Request Failed Message Format format JDI Debug Model Messages get String JDI Class Type exception while retrieving superclass new String e to String e NON NLS 1 it is possible to return null return null  IJavaClassType getSuperclass IJavaClassType getSuperclass DebugException ClassType ClassType getUnderlyingType IJavaClassType JDIType createType getDebugTarget RuntimeException getDebugTarget targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIClassType exception_while_retrieving_superclass toString
public I Java Interface Type get All Interfaces throws Debug Exception try List interface List Class Type get Underlying Type all Interfaces List java Interface Type List new Array List interface List size Iterator iterator interface List iterator while iterator has Next Interface Type interface Type Interface Type iterator next if interface Type null java Interface Type List add JDI Type create Type get Debug Target interface Type I Java Interface Type java Interface Type Array new I Java Interface Type java Interface Type List size java Interface Type Array I Java Interface Type java Interface Type List to Array java Interface Type Array return java Interface Type Array catch Runtime Exception re get Debug Target target Request Failed Message Format format JDI Debug Model Messages get String JDI Class Type exception while retrieving superclass new String re to String re NON NLS 1 return new I Java Interface Type 0  IJavaInterfaceType getAllInterfaces DebugException interfaceList ClassType getUnderlyingType allInterfaces javaInterfaceTypeList ArrayList interfaceList interfaceList hasNext InterfaceType interfaceType InterfaceType interfaceType javaInterfaceTypeList JDIType createType getDebugTarget interfaceType IJavaInterfaceType javaInterfaceTypeArray IJavaInterfaceType javaInterfaceTypeList javaInterfaceTypeArray IJavaInterfaceType javaInterfaceTypeList toArray javaInterfaceTypeArray javaInterfaceTypeArray RuntimeException getDebugTarget targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIClassType exception_while_retrieving_superclass toString IJavaInterfaceType
public I Java Interface Type get Interfaces throws Debug Exception try List interface List Class Type get Underlying Type interfaces List java Interface Type List new Array List interface List size Iterator iterator interface List iterator while iterator has Next Interface Type interface Type Interface Type iterator next if interface Type null java Interface Type List add JDI Type create Type get Debug Target interface Type I Java Interface Type java Interface Type Array new I Java Interface Type java Interface Type List size java Interface Type Array I Java Interface Type java Interface Type List to Array java Interface Type Array return java Interface Type Array catch Runtime Exception re get Debug Target target Request Failed Message Format format JDI Debug Model Messages get String JDI Class Type exception while retrieving superclass new String re to String re NON NLS 1 return new I Java Interface Type 0  IJavaInterfaceType getInterfaces DebugException interfaceList ClassType getUnderlyingType javaInterfaceTypeList ArrayList interfaceList interfaceList hasNext InterfaceType interfaceType InterfaceType interfaceType javaInterfaceTypeList JDIType createType getDebugTarget interfaceType IJavaInterfaceType javaInterfaceTypeArray IJavaInterfaceType javaInterfaceTypeList javaInterfaceTypeArray IJavaInterfaceType javaInterfaceTypeList toArray javaInterfaceTypeArray javaInterfaceTypeArray RuntimeException getDebugTarget targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIClassType exception_while_retrieving_superclass toString IJavaInterfaceType

Creates a JDI debug element associated with the specified debug target param target The associated debug target public JDI Debug Element JDI Debug Target target set Debug Target target  JDIDebugElement JDIDebugTarget setDebugTarget
Convenience method to log errors protected void log Error Exception e if JDI Debug Target get Debug Target is Available Don t log VM Disconnected Exceptions that occur when the VM is unavailable if e instanceof VM Disconnected Exception e instanceof Core Exception Core Exception e get Status get Exception instanceof VM Disconnected Exception return JDI Debug Plugin log e  logError JDIDebugTarget getDebugTarget isAvailable VMDisconnectedExceptions VMDisconnectedException CoreException CoreException getStatus getException VMDisconnectedException JDIDebugPlugin
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter if adapter I Debug Element class return this if adapter I Step Filters class return get Debug Target if adapter I Debug Target class return get Debug Target return super get Adapter adapter  IAdaptable getAdapter getAdapter IDebugElement IStepFilters getDebugTarget IDebugTarget getDebugTarget getAdapter
see org eclipse debug core model I Debug Element get Model Identifier public String get Model Identifier return JDI Debug Model get Plugin Identifier  IDebugElement getModelIdentifier getModelIdentifier JDIDebugModel getPluginIdentifier
Fires a debug event marking the creation of this element protected void fire Creation Event fire Event new Debug Event this Debug Event CREATE  fireCreationEvent fireEvent DebugEvent DebugEvent
Fires a debug event param event The debug event to be fired to the listeners see org eclipse debug core Debug Event protected void fire Event Debug Event event Debug Plugin get Default fire Debug Event Set new Debug Event event  DebugEvent fireEvent DebugEvent DebugPlugin getDefault fireDebugEventSet DebugEvent
Queues a debug event with the event dispatcher to be fired as an event set when all event processing is complete param event the event to queue public void queue Event Debug Event event Event Dispatcher dispatcher JDI Debug Target get Debug Target get Event Dispatcher if dispatcher null dispatcher queue event  queueEvent DebugEvent EventDispatcher JDIDebugTarget getDebugTarget getEventDispatcher
Fires a debug event marking the RESUME of this element with the associated detail param detail The int detail of the event see org eclipse debug core Debug Event public void fire Resume Event int detail fire Event new Debug Event this Debug Event RESUME detail  DebugEvent fireResumeEvent fireEvent DebugEvent DebugEvent
Fires a debug event marking the SUSPEND of this element with the associated detail param detail The int detail of the event see org eclipse debug core Debug Event public void fire Suspend Event int detail get Java Debug Target increment Suspend Count fire Event new Debug Event this Debug Event SUSPEND detail  DebugEvent fireSuspendEvent getJavaDebugTarget incrementSuspendCount fireEvent DebugEvent DebugEvent
Queues a debug event marking the SUSPEND of this element with the associated detail param detail The int detail of the event see org eclipse debug core Debug Event public void queue Suspend Event int detail get Java Debug Target increment Suspend Count queue Event new Debug Event this Debug Event SUSPEND detail  DebugEvent queueSuspendEvent getJavaDebugTarget incrementSuspendCount queueEvent DebugEvent DebugEvent
Fires a debug event marking the termination of this element protected void fire Terminate Event fire Event new Debug Event this Debug Event TERMINATE  fireTerminateEvent fireEvent DebugEvent DebugEvent
Fires a debug event marking the CHANGE of this element with the specifed detail code param detail one of code STATE code or code CONTENT code public void fire Change Event int detail fire Event new Debug Event this Debug Event CHANGE detail  fireChangeEvent fireEvent DebugEvent DebugEvent
Throws a new debug exception with a status code of code REQUEST FAILED code param message Failure message param e Exception that has occurred code can be null code throws Debug Exception The exception with a status code of code REQUEST FAILED code public void request Failed String message Exception e throws Debug Exception request Failed message e Debug Exception REQUEST FAILED  REQUEST_FAILED DebugException REQUEST_FAILED requestFailed DebugException requestFailed DebugException REQUEST_FAILED
Throws a new debug exception with a status code of code TARGET REQUEST FAILED code with the given underlying exception If the underlying exception is not a JDI exception the original exception is thrown param message Failure message param e underlying exception that has occurred throws Debug Exception The exception with a status code of code TARGET REQUEST FAILED code public void target Request Failed String message Runtime Exception e throws Debug Exception if e null fgJDI Exceptions contains e get Class request Failed message e Debug Exception TARGET REQUEST FAILED else throw e  TARGET_REQUEST_FAILED DebugException TARGET_REQUEST_FAILED targetRequestFailed RuntimeException DebugException fgJDIExceptions getClass requestFailed DebugException TARGET_REQUEST_FAILED
Throws a new debug exception with the given status code param message Failure message param e Exception that has occurred code can be null code param code status code throws Debug Exception a new exception with given status code public void request Failed String message Throwable e int code throws Debug Exception throw Debug Exception message code e  DebugException requestFailed DebugException throwDebugException
Throws a new debug exception with a status code of code TARGET REQUEST FAILED code param message Failure message param e Throwable that has occurred throws Debug Exception The exception with a status code of code TARGET REQUEST FAILED code public void target Request Failed String message Throwable e throws Debug Exception throw Debug Exception message Debug Exception TARGET REQUEST FAILED e  TARGET_REQUEST_FAILED DebugException TARGET_REQUEST_FAILED targetRequestFailed DebugException throwDebugException DebugException TARGET_REQUEST_FAILED
Throws a new debug exception with a status code of code TARGET REQUEST FAILED code with the given underlying exception The underlying exception is an exception thrown by a JDI request param message Failure message param e throwable exception that has occurred throws Debug Exception the exception with a status code of code TARGET REQUEST FAILED code public void jdi Request Failed String message Throwable e throws Debug Exception throw Debug Exception message Debug Exception TARGET REQUEST FAILED e  TARGET_REQUEST_FAILED DebugException TARGET_REQUEST_FAILED jdiRequestFailed DebugException throwDebugException DebugException TARGET_REQUEST_FAILED
Throws a new debug exception with a status code of code NOT SUPPORTED code param message Failure message throws Debug Exception The exception with a status code of code NOT SUPPORTED code public void not Supported String message throws Debug Exception throw Debug Exception message Debug Exception NOT SUPPORTED null  NOT_SUPPORTED DebugException NOT_SUPPORTED notSupported DebugException throwDebugException DebugException NOT_SUPPORTED
Throws a debug exception with the given message error code and underlying exception protected void throw Debug Exception String message int code Throwable exception throws Debug Exception throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier code message exception  throwDebugException DebugException DebugException IStatus JDIDebugModel getPluginIdentifier
Logs the given exception if it is a JDI exception otherwise throws the runtime exception param e The internal runtime exception public void internal Error Runtime Exception e if fgJDI Exceptions contains e get Class log Error e else throw e  internalError RuntimeException fgJDIExceptions getClass logError
Logs a debug exception with the given message with a status code of code INTERNAL ERROR code param message The internal error message protected void internal Error String message log Error new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception INTERNAL ERROR message null  INTERNAL_ERROR internalError logError DebugException IStatus JDIDebugModel getPluginIdentifier DebugException INTERNAL_ERROR
Returns the common unknown message return the unknown String protected String get Unknown Message return JDI Debug Model Messages get String JDI Debug Element unknown NON NLS 1  getUnknownMessage JDIDebugModelMessages getString JDIDebugElement
see org eclipse debug core model I Debug Element get Debug Target public I Debug Target get Debug Target return f Debug Target  IDebugElement getDebugTarget IDebugTarget getDebugTarget fDebugTarget
Returns this elements debug target as its implementation class return Java debug target protected JDI Debug Target get Java Debug Target return f Debug Target  JDIDebugTarget getJavaDebugTarget fDebugTarget
Returns the target VM associated with this element or code null code if none return target VM or code null code if none protected Virtual Machine getVM return JDI Debug Target get Debug Target getVM  VirtualMachine JDIDebugTarget getDebugTarget
Returns the underlying VM s event request manager or code null code if none disconnected terminated return event request manager or code null code public Event Request Manager get Event Request Manager Virtual Machine vm getVM if vm null return null else return vm event Request Manager  EventRequestManager getEventRequestManager VirtualMachine eventRequestManager
Adds the given listener to this target s event dispatcher s table of listeners for the specified event request The listener will be notified each time the event occurs param listener the listener to register param request the event request public void addJDI Event Listener IJDI Event Listener listener Event Request request Event Dispatcher dispatcher JDI Debug Target get Debug Target get Event Dispatcher if dispatcher null dispatcher addJDI Event Listener listener request  addJDIEventListener IJDIEventListener EventRequest EventDispatcher JDIDebugTarget getDebugTarget getEventDispatcher addJDIEventListener
Removes the given listener from this target s event dispatcher s table of listeners for the specifed event request The listener will no longer be notified when the event occurs Listeners are responsible for deleting the event request if desired param listener the listener to remove param request the event request public void removeJDI Event Listener IJDI Event Listener listener Event Request request Event Dispatcher dispatcher JDI Debug Target get Debug Target get Event Dispatcher if dispatcher null dispatcher removeJDI Event Listener listener request  removeJDIEventListener IJDIEventListener EventRequest EventDispatcher JDIDebugTarget getDebugTarget getEventDispatcher removeJDIEventListener
see I Debug Element get Launch public I Launch get Launch return get Debug Target get Launch  IDebugElement getLaunch ILaunch getLaunch getDebugTarget getLaunch
protected void set Debug Target JDI Debug Target debug Target f Debug Target debug Target  setDebugTarget JDIDebugTarget debugTarget fDebugTarget debugTarget
The VM has disconnected Notify the target protected void disconnected if f Debug Target null f Debug Target disconnected  fDebugTarget fDebugTarget
see I Java Debug Target set Request Timeout int public void set Request Timeout int timeout if supports Request Timeout Virtual Machine vm getVM if vm null org eclipse jdi Virtual Machine vm set Request Timeout timeout  IJavaDebugTarget setRequestTimeout setRequestTimeout supportsRequestTimeout VirtualMachine VirtualMachine setRequestTimeout
see I Java Debug Target get Request Timeout public int get Request Timeout if supports Request Timeout Virtual Machine vm getVM if vm null return org eclipse jdi Virtual Machine vm get Request Timeout return 1  IJavaDebugTarget getRequestTimeout getRequestTimeout supportsRequestTimeout VirtualMachine VirtualMachine getRequestTimeout
see I Java Debug Target supports Request Timeout public boolean supports Request Timeout return get Java Debug Target is Available getVM instanceof org eclipse jdi Virtual Machine  IJavaDebugTarget supportsRequestTimeout supportsRequestTimeout getJavaDebugTarget isAvailable VirtualMachine
see org eclipse debug core model I Disconnect can Disconnect public boolean can Disconnect return get Debug Target can Disconnect  IDisconnect canDisconnect canDisconnect getDebugTarget canDisconnect
see org eclipse debug core model I Disconnect disconnect public void disconnect throws Debug Exception get Debug Target disconnect  IDisconnect DebugException getDebugTarget
see org eclipse debug core model I Disconnect is Disconnected public boolean is Disconnected return get Debug Target is Disconnected  IDisconnect isDisconnected isDisconnected getDebugTarget isDisconnected
see org eclipse debug core model I Step Filters is Step Filters Enabled public boolean is Step Filters Enabled return get Java Debug Target is Step Filters Enabled  IStepFilters isStepFiltersEnabled isStepFiltersEnabled getJavaDebugTarget isStepFiltersEnabled

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private JDI Debug Model Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE JDIDebugModelMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

Creates a new JDI debug target for the given virtual machine param jvm the underlying VM param name the name to use for this VM or code null code if the name should be retrieved from the underlying VM param supports Terminate whether the terminate action is supported by this debug target param supports Disconnect whether the disconnect action is supported by this debug target param process the system process associated with the underlying VM or code null code if no system process is available for example a remote VM param resume whether the VM should be resumed on startup Has no effect if the VM is already resumed running when the connection is made public JDI Debug Target I Launch launch Virtual Machine jvm String name boolean support Terminate boolean support Disconnect I Process process boolean resume super null set Launch launch set Resume On Startup resume set Debug Target this set Supports Terminate support Terminate set Supports Disconnect support Disconnect setVM jvm jvm set Debug Trace Mode Virtual Machine TRACE NONE set Process process set Terminated false set Terminating false set Disconnected false set Name name set Breakpoints new Array List 5 set Thread List new Array List 5 set Out Of Synch Types new Array List 0 setHCR Occurred false initialize Debug Plugin get Default get Launch Manager add Launch Listener this Debug Plugin get Default get Breakpoint Manager add Breakpoint Manager Listener this  supportsTerminate supportsDisconnect JDIDebugTarget ILaunch VirtualMachine supportTerminate supportDisconnect IProcess setLaunch setResumeOnStartup setDebugTarget setSupportsTerminate supportTerminate setSupportsDisconnect supportDisconnect setDebugTraceMode VirtualMachine TRACE_NONE setProcess setTerminated setTerminating setDisconnected setName setBreakpoints ArrayList setThreadList ArrayList setOutOfSynchTypes ArrayList setHCROccurred DebugPlugin getDefault getLaunchManager addLaunchListener DebugPlugin getDefault getBreakpointManager addBreakpointManagerListener
Returns the event dispatcher for this debug target There is one event dispatcher per debug target return event dispatcher public Event Dispatcher get Event Dispatcher return f Event Dispatcher  EventDispatcher getEventDispatcher fEventDispatcher
Sets the event dispatcher for this debug target Set once at initialization param dispatcher event dispatcher see initialize private void set Event Dispatcher Event Dispatcher dispatcher f Event Dispatcher dispatcher  setEventDispatcher EventDispatcher fEventDispatcher
Returns the list of threads contained in this debug target return list of threads private Array List get Thread List return f Threads  ArrayList getThreadList fThreads
Returns an iterator over the collection of threads The returned iterator is made on a copy of the thread list so that it is thread safe This method should always be used instead of get Thread List iterator return an iterator over the collection of threads private Iterator get Thread Iterator List thread List synchronized f Threads thread List List get Thread List clone Iterator threads thread List iterator return threads  getThreadList getThreadIterator threadList fThreads threadList getThreadList threadList
Sets the list of threads contained in this debug target Set to an empty collection on creation Threads are added and removed as they start and end On termination this collection is set to the immutable singleton empty list param threads empty list private void set Thread List Array List threads f Threads threads  setThreadList ArrayList fThreads
Returns the collection of breakpoints installed in this debug target return list of installed breakpoints instances of code I Java Breakpoint code public List get Breakpoints return f Breakpoints  IJavaBreakpoint getBreakpoints fBreakpoints
Sets the list of breakpoints installed in this debug target Set to an empty list on creation param breakpoints empty list private void set Breakpoints List breakpoints f Breakpoints breakpoints  setBreakpoints fBreakpoints
Notifies this target that the underlying VM has started This is the first event received from the VM The VM is resumed This event is not generated when an attach is made to a VM that is already running has already started up The VM is resumed as specified on creation param event VM start event public void handleVM Start VM Start Event event if is Resume On Startup try set Suspended true resume catch Debug Exception e log Error e If any threads have resumed since thread collection was initialized update their status avoid concurrent modification use get Threads I Thread threads get Threads for int i 0 i threads length i JDI Thread thread JDI Thread threads i if thread is Suspended try boolean suspended thread get Underlying Thread is Suspended if suspended thread set Running true thread fire Resume Event Debug Event CLIENT REQUEST catch VM Disconnected Exception e catch Object Collected Exception e catch Runtime Exception e log Error e  handleVMStart VMStartEvent isResumeOnStartup setSuspended DebugException logError getThreads IThread getThreads JDIThread JDIThread isSuspended getUnderlyingThread isSuspended setRunning fireResumeEvent DebugEvent CLIENT_REQUEST VMDisconnectedException ObjectCollectedException RuntimeException logError
Initialize event requests and state from the underlying VM This method is synchronized to ensure that we do not start to process an events from the target until our state is initialized protected synchronized void initialize set Event Dispatcher new Event Dispatcher this set Request Timeout JDI Debug Model get Preferences get Int JDI Debug Model PREF REQUEST TIMEOUT initialize Requests initialize State initialize Breakpoints get Launch add Debug Target this fire Creation Event Event Dispatcher dispatcher JDI Debug Target get Debug Target get Event Dispatcher if dispatcher null new Thread dispatcher JDI Debug Model get Plugin Identifier JDI Debug Model Messages get String JDI Debug Target JDI Event Dispatcher start NON NLS 1  setEventDispatcher EventDispatcher setRequestTimeout JDIDebugModel getPreferences getInt JDIDebugModel PREF_REQUEST_TIMEOUT initializeRequests initializeState initializeBreakpoints getLaunch addDebugTarget fireCreationEvent EventDispatcher JDIDebugTarget getDebugTarget getEventDispatcher JDIDebugModel getPluginIdentifier JDIDebugModelMessages getString JDIDebugTarget JDI_Event_Dispatcher
Adds all of the pre existing threads to this debug target protected void initialize State List threads null Virtual Machine vm getVM if vm null try threads vm all Threads catch Runtime Exception e internal Error e if threads null Iterator initial Threads threads iterator while initial Threads has Next create Thread Thread Reference initial Threads next if is Resume On Startup set Suspended false  initializeState VirtualMachine allThreads RuntimeException internalError initialThreads initialThreads hasNext createThread ThreadReference initialThreads isResumeOnStartup setSuspended
Registers event handlers for thread creation thread termination protected void initialize Requests set Thread Start Handler new Thread Start Handler new Thread Death Handler  initializeRequests setThreadStartHandler ThreadStartHandler ThreadDeathHandler
Installs all Java breakpoints that currently exist in the breakpoint manager protected void initialize Breakpoints I Breakpoint Manager manager Debug Plugin get Default get Breakpoint Manager manager add Breakpoint Listener this I Breakpoint bps manager get Breakpoints JDI Debug Model get Plugin Identifier for int i 0 i bps length i if bps i instanceof I Java Breakpoint breakpoint Added bps i  initializeBreakpoints IBreakpointManager DebugPlugin getDefault getBreakpointManager addBreakpointListener IBreakpoint getBreakpoints JDIDebugModel getPluginIdentifier IJavaBreakpoint breakpointAdded
Creates adds and returns a thread for the given underlying thread reference A creation event is fired for the thread Returns code null code if during the creation of the thread this target is set to the disconnected state param thread underlying thread return model thread protected JDI Thread create Thread Thread Reference thread JDI Thread jdi Thread null try jdi Thread new JDI Thread this thread catch Object Collected Exception exception Object Collection Exception can be thrown if the thread has already completed exited in the VM return null if is Disconnected return null synchronized f Threads get Thread List add jdi Thread jdi Thread fire Creation Event return jdi Thread  JDIThread createThread ThreadReference JDIThread jdiThread jdiThread JDIThread ObjectCollectedException ObjectCollectionException isDisconnected fThreads getThreadList jdiThread jdiThread fireCreationEvent jdiThread
see I Debug Target get Threads public I Thread get Threads synchronized f Threads return I Thread get Thread List to Array new I Thread 0  IDebugTarget getThreads IThread getThreads fThreads IThread getThreadList toArray IThread
see I Suspend Resume can Resume public boolean can Resume return is Suspended is Available is Performing Hot Code Replace  ISuspendResume canResume canResume isSuspended isAvailable isPerformingHotCodeReplace
see I Suspend Resume can Suspend public boolean can Suspend if is Suspended is Available only allow suspend if no threads are currently suspended I Thread threads get Threads for int i 0 num Threads threads length i num Threads i if JDI Thread threads i is Suspended return false return true return false  ISuspendResume canSuspend canSuspend isSuspended isAvailable IThread getThreads numThreads numThreads JDIThread isSuspended
see I Terminate can Terminate public boolean can Terminate return supports Terminate is Available  ITerminate canTerminate canTerminate supportsTerminate isAvailable
see I Disconnect can Disconnect public boolean can Disconnect return supports Disconnect is Disconnected  IDisconnect canDisconnect canDisconnect supportsDisconnect isDisconnected
Returns whether this debug target supports disconnecting return whether this debug target supports disconnecting protected boolean supports Disconnect return f Supports Disconnect  supportsDisconnect fSupportsDisconnect
Sets whether this debug target supports disconnection Set on creation param supported code true code if this target supports disconnection otherwise code false code private void set Supports Disconnect boolean supported f Supports Disconnect supported  setSupportsDisconnect fSupportsDisconnect
Returns whether this debug target supports termination return whether this debug target supports termination protected boolean supports Terminate return f Supports Terminate  supportsTerminate fSupportsTerminate
Sets whether this debug target supports termination Set on creation param supported code true code if this target supports termination otherwise code false code private void set Supports Terminate boolean supported f Supports Terminate supported  setSupportsTerminate fSupportsTerminate
see I Java Debug Target supports Hot Code Replace public boolean supports Hot Code Replace return supportsJ9 Hot Code Replace supportsJDK Hot Code Replace  IJavaDebugTarget supportsHotCodeReplace supportsHotCodeReplace supportsJ9HotCodeReplace supportsJDKHotCodeReplace
see I Java Debug Target supports Instance Breakpoints public boolean supports Instance Breakpoints if is Available JDI Debug Plugin is Jdi Version Greater Than Or Equal new int 1 4 Virtual Machine vm getVM if vm null return vm can Use Instance Filters return false  IJavaDebugTarget supportsInstanceBreakpoints supportsInstanceBreakpoints isAvailable JDIDebugPlugin isJdiVersionGreaterThanOrEqual VirtualMachine canUseInstanceFilters
Returns whether this debug target supports hot code replace for the J9 VM return whether this debug target supports J9 hot code replace public boolean supportsJ9 Hot Code Replace Virtual Machine vm getVM if is Available vm instanceof org eclipse jdi hcr Virtual Machine try return org eclipse jdi hcr Virtual Machine vm can Reload Classes catch Unsupported Operation Exception e This is not an error condition Unsupported Operation Exception is thrown when a VM does not support HCR return false  supportsJ9HotCodeReplace VirtualMachine isAvailable VirtualMachine VirtualMachine canReloadClasses UnsupportedOperationException UnsupportedOperationException
Returns whether this debug target supports hot code replace for JDK V Ms return whether this debug target supports JDK hot code replace public boolean supportsJDK Hot Code Replace if is Available JDI Debug Plugin is Jdi Version Greater Than Or Equal new int 1 4 Virtual Machine vm getVM if vm null return vm can Redefine Classes return false  VMs supportsJDKHotCodeReplace isAvailable JDIDebugPlugin isJdiVersionGreaterThanOrEqual VirtualMachine canRedefineClasses
Returns whether this debug target supports popping stack frames return whether this debug target supports popping stack frames public boolean can Pop Frames if is Available JDI Debug Plugin is Jdi Version Greater Than Or Equal new int 1 4 Virtual Machine vm getVM if vm null return vm can Pop Frames return false  canPopFrames isAvailable JDIDebugPlugin isJdiVersionGreaterThanOrEqual VirtualMachine canPopFrames
see I Disconnect disconnect public void disconnect throws Debug Exception if is Available already done return if can Disconnect not Supported JDI Debug Model Messages get String JDI Debug Target does not support disconnect NON NLS 1 try dispose Thread Handler Virtual Machine vm getVM if vm null vm dispose catch VM Disconnected Exception e if the VM disconnects while disconnecting perform normal disconnect handling disconnected catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Debug Target exception disconnecting new String e to String e NON NLS 1  IDisconnect DebugException isAvailable canDisconnect notSupported JDIDebugModelMessages getString JDIDebugTarget does_not_support_disconnect disposeThreadHandler VirtualMachine VMDisconnectedException RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIDebugTarget exception_disconnecting toString
Allows for Thread Start Handler to do clean up disposal private void dispose Thread Handler Thread Start Handler handler get Thread Start Handler if handler null handler delete Request  ThreadStartHandler disposeThreadHandler ThreadStartHandler getThreadStartHandler deleteRequest
Returns the underlying virtual machine associated with this debug target or code null code if none disconnected terminated return the underlying VM or code null code public Virtual Machine getVM return f Virtual Machine  VirtualMachine fVirtualMachine
Sets the underlying VM associated with this debug target Set on creation param vm underlying VM private void setVM Virtual Machine vm f Virtual Machine vm  VirtualMachine fVirtualMachine
Sets whether this debug target has performed a hot code replace public void setHCR Occurred boolean occurred f HasHCR Occurred occurred  setHCROccurred fHasHCROccurred
public void remove Out Of Synch Types List qualified Names f Out Of Synch Types remove All qualified Names  removeOutOfSynchTypes qualifiedNames fOutOfSynchTypes removeAll qualifiedNames
Sets the list of out of synch types to the given list private void set Out Of Synch Types List qualified Names f Out Of Synch Types new Hash Set f Out Of Synch Types add All qualified Names  setOutOfSynchTypes qualifiedNames fOutOfSynchTypes HashSet fOutOfSynchTypes addAll qualifiedNames
The given types have failed to be reloaded by HCR Add them to the list of out of synch types public void add Out Of Synch Types List qualified Names f Out Of Synch Types add All qualified Names  addOutOfSynchTypes qualifiedNames fOutOfSynchTypes addAll qualifiedNames
Returns whether the given type is out of synch in this target public boolean is Out Of Synch String qualified Name if f Out Of Synch Types null f Out Of Synch Types is Empty return false return f Out Of Synch Types contains qualified Name  isOutOfSynch qualifiedName fOutOfSynchTypes fOutOfSynchTypes isEmpty fOutOfSynchTypes qualifiedName
see I Java Debug Target is Out Of Synch public boolean is Out Of Synch throws Debug Exception Iterator threads get Thread Iterator while threads has Next JDI Thread thread JDI Thread threads next if thread is Out Of Synch return true return false  IJavaDebugTarget isOutOfSynch isOutOfSynch DebugException getThreadIterator hasNext JDIThread JDIThread isOutOfSynch
see I Java Debug Target may Be Out Of Synch public boolean may Be Out Of Synch Iterator threads get Thread Iterator while threads has Next JDI Thread thread JDI Thread threads next if thread may Be Out Of Synch return true return false  IJavaDebugTarget mayBeOutOfSynch mayBeOutOfSynch getThreadIterator hasNext JDIThread JDIThread mayBeOutOfSynch
Returns whether a hot code replace attempt has failed HCR has failed if there are any out of synch types public boolean hasHCR Failed return f Out Of Synch Types null f Out Of Synch Types is Empty  hasHCRFailed fOutOfSynchTypes fOutOfSynchTypes isEmpty
Returns whether this debug target has performed a hot code replace public boolean hasHCR Occurred return f HasHCR Occurred  hasHCROccurred fHasHCROccurred
Reinstall all breakpoints installed in the given resources public void reinstall Breakpoints In List resources List class Names List breakpoints get Breakpoints I Java Breakpoint copy new I Java Breakpoint breakpoints size breakpoints to Array copy I Java Breakpoint breakpoint null String installed Type null for int i 0 i copy length i breakpoint copy i if breakpoint instanceof Java Line Breakpoint try installed Type breakpoint get Type Name if class Names contains installed Type breakpoint Removed breakpoint null breakpoint Added breakpoint catch Core Exception ce log Error ce continue  reinstallBreakpointsIn classNames getBreakpoints IJavaBreakpoint IJavaBreakpoint toArray IJavaBreakpoint installedType JavaLineBreakpoint installedType getTypeName classNames installedType breakpointRemoved breakpointAdded CoreException logError
Finds and returns the JDI thread for the associated thread reference or code null code if not found param the underlying thread reference return the associated model thread public JDI Thread find Thread Thread Reference tr Iterator iter get Thread Iterator while iter has Next JDI Thread thread JDI Thread iter next if thread get Underlying Thread equals tr return thread return null  JDIThread findThread ThreadReference getThreadIterator hasNext JDIThread JDIThread getUnderlyingThread
see I Debug Element get Name public String get Name throws Debug Exception if f Name null Virtual Machine vm getVM if vm null request Failed JDI Debug Model Messages get String JDI Debug Target Unable to retrieve name   VM disconnected  1 null NON NLS 1 try set Name vm name catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Debug Target exception retrieving name new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will throw an exception return null return f Name  IDebugElement getName getName DebugException fName VirtualMachine requestFailed JDIDebugModelMessages getString JDIDebugTarget Unable_to_retrieve_name_ _VM_disconnected _1 setName RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIDebugTarget exception_retrieving_name toString targetRequestFailed fName
Sets the name of this debug target Set on creation and if set to code null code the name will be retrieved lazily from the underlying VM param name the name of this VM or code null code if the name should be retrieved from the underlying VM protected void set Name String name f Name name  setName fName
Sets the process associated with this debug target possibly code null code Set on creation param process the system process associated with the underlying VM or code null code if no process is associated with this debug target for example a remote VM protected void set Process I Process process f Process process  setProcess IProcess fProcess
see I Debug Target get Process public I Process get Process return f Process  IDebugTarget getProcess IProcess getProcess fProcess
Notification the underlying VM has died Updates the state of this target to be terminated param event VM death event public void handleVM Death VM Death Event event terminated  handleVMDeath VMDeathEvent
Notification the underlying VM has disconnected Updates the state of this target to be terminated param event disconnect event public void handleVM Disconnect VM Disconnect Event event if is Terminating terminated else disconnected  handleVMDisconnect VMDisconnectEvent isTerminating
see I Suspend Resume is Suspended public boolean is Suspended return f Suspended  ISuspendResume isSuspended isSuspended fSuspended
Sets whether this VM is suspended param suspended whether this VM is suspended private void set Suspended boolean suspended f Suspended suspended  setSuspended fSuspended
Returns whether this target is available to handle VM requests public boolean is Available return is Terminated is Terminating is Disconnected  isAvailable isTerminated isTerminating isDisconnected
see I Terminate is Terminated public boolean is Terminated return f Terminated  ITerminate isTerminated isTerminated fTerminated
Sets whether this debug target is terminated param terminated code true code if this debug target is terminated otherwise code false code protected void set Terminated boolean terminated f Terminated terminated  setTerminated fTerminated
Sets whether this debug target is disconnected param disconnected code true code if this debug target is disconnected otherwise code false code protected void set Disconnected boolean disconnected f Disconnected disconnected  setDisconnected fDisconnected
see I Disconnect is Disconnected public boolean is Disconnected return f Disconnected  IDisconnect isDisconnected isDisconnected fDisconnected
Creates enables and returns a class prepare request for the specified class name in this target param class Pattern regular expression specifying the pattern of class names that will cause the event request to fire Regular expressions may begin with a end with a or be an exact match exception Core Exception if unable to create the request public Class Prepare Request create Class Prepare Request String class Pattern throws Core Exception return create Class Prepare Request class Pattern null  classPattern CoreException ClassPrepareRequest createClassPrepareRequest classPattern CoreException createClassPrepareRequest classPattern
Creates enables and returns a class prepare request for the specified class name in this target Can specify a class exclusion filter as well This is a utility method used by event requesters that need to create class prepare requests param class Pattern regular expression specifying the pattern of class names that will cause the event request to fire Regular expressions may begin with a end with a or be an exact match param class Exclusion Pattern regular expression specifying the pattern of class names that will not cause the event request to fire Regular expressions may begin with a end with a or be an exact match May be code null code exception Core Exception if unable to create the request public Class Prepare Request create Class Prepare Request String class Pattern String class Exclusion Pattern throws Core Exception return create Class Prepare Request class Pattern class Exclusion Pattern true  classPattern classExclusionPattern CoreException ClassPrepareRequest createClassPrepareRequest classPattern classExclusionPattern CoreException createClassPrepareRequest classPattern classExclusionPattern
Creates enables and returns a class prepare request for the specified class name in this target Can specify a class exclusion filter as well This is a utility method used by event requesters that need to create class prepare requests param class Pattern regular expression specifying the pattern of class names that will cause the event request to fire Regular expressions may begin with a end with a or be an exact match param class Exclusion Pattern regular expression specifying the pattern of class names that will not cause the event request to fire Regular expressions may begin with a end with a or be an exact match May be code null code param enabled whether to enable the event request exception Core Exception if unable to create the request public Class Prepare Request create Class Prepare Request String class Pattern String class Exclusion Pattern boolean enabled throws Core Exception Event Request Manager manager get Event Request Manager if is Available manager null request Failed JDI Debug Model Messages get String JDI Debug Target Unable to create class prepare request   VM disconnected  2 null NON NLS 1 Class Prepare Request req null try req manager create Class Prepare Request req add Class Filter class Pattern if class Exclusion Pattern null req add Class Exclusion Filter class Exclusion Pattern req set Suspend Policy Event Request SUSPEND EVENT THREAD if enabled req enable catch Runtime Exception e target Request Failed JDI Debug Model Messages get String JDI Debug Target Unable to create class prepare request  3 e NON NLS 1 execution will not reach here return null return req  classPattern classExclusionPattern CoreException ClassPrepareRequest createClassPrepareRequest classPattern classExclusionPattern CoreException EventRequestManager getEventRequestManager isAvailable requestFailed JDIDebugModelMessages getString JDIDebugTarget Unable_to_create_class_prepare_request_ _VM_disconnected _2 ClassPrepareRequest createClassPrepareRequest addClassFilter classPattern classExclusionPattern addClassExclusionFilter classExclusionPattern setSuspendPolicy EventRequest SUSPEND_EVENT_THREAD RuntimeException targetRequestFailed JDIDebugModelMessages getString JDIDebugTarget Unable_to_create_class_prepare_request _3
see I Suspend Resume resume public void resume throws Debug Exception if a client calls resume then we should resume on a VM Start event in case it has not yet been received and the target was created with the resume flag as false See bug 32372 set Resume On Startup true resume true  ISuspendResume DebugException VMStart setResumeOnStartup
see I Suspend Resume resume Updates the state of this debug target to resumed but does not fire notification of the resumption public void resume Quiet throws Debug Exception resume false  ISuspendResume resumeQuiet DebugException
see I Suspend Resume resume Updates the state of this debug target but only fires notification to listeners if code fire Notification code is code true code protected void resume boolean fire Notification throws Debug Exception if is Suspended is Available return try set Suspended false resume Threads Virtual Machine vm getVM if vm null vm resume if fire Notification fire Resume Event Debug Event CLIENT REQUEST catch VM Disconnected Exception e disconnected return catch Runtime Exception e set Suspended true fire Suspend Event Debug Event CLIENT REQUEST target Request Failed Message Format format JDI Debug Model Messages get String JDI Debug Target exception resume new String e to String e NON NLS 1  ISuspendResume fireNotification fireNotification DebugException isSuspended isAvailable setSuspended resumeThreads VirtualMachine fireNotification fireResumeEvent DebugEvent CLIENT_REQUEST VMDisconnectedException RuntimeException setSuspended fireSuspendEvent DebugEvent CLIENT_REQUEST targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIDebugTarget exception_resume toString
see org eclipse debug core model I Debug Target supports Breakpoint I Breakpoint public boolean supports Breakpoint I Breakpoint breakpoint return breakpoint instanceof I Java Breakpoint  IDebugTarget supportsBreakpoint IBreakpoint supportsBreakpoint IBreakpoint IJavaBreakpoint
Notification a breakpoint has been added to the breakpoint manager If the breakpoint is a Java breakpoint and this target is not terminated the breakpoint is installed param breakpoint the breakpoint added to the breakpoint manager public void breakpoint Added I Breakpoint breakpoint if is Available return if supports Breakpoint breakpoint try Java Breakpoint java Breakpoint Java Breakpoint breakpoint if get Breakpoints contains breakpoint if java Breakpoint should Skip Breakpoint If the breakpoint should be skipped don t add the breakpoint request to the VM Just add the breakpoint to the collection so we have it if the manager is later enabled java Breakpoint add To Target this get Breakpoints add breakpoint catch Core Exception e log Error e  breakpointAdded IBreakpoint isAvailable supportsBreakpoint JavaBreakpoint javaBreakpoint JavaBreakpoint getBreakpoints javaBreakpoint shouldSkipBreakpoint javaBreakpoint addToTarget getBreakpoints CoreException logError
Notification that one or more attributes of the given breakpoint has changed If the breakpoint is a Java breakpoint the associated event request in the underlying VM is updated to reflect the new state of the breakpoint param breakpoint the breakpoint that has changed public void breakpoint Changed I Breakpoint breakpoint I Marker Delta delta  breakpointChanged IBreakpoint IMarkerDelta
Notification that the given breakpoint has been removed from the breakpoint manager If this target is not terminated the breakpoint is removed from the underlying VM param breakpoint the breakpoint has been removed from the breakpoint manager public void breakpoint Removed I Breakpoint breakpoint I Marker Delta delta if is Available return if supports Breakpoint breakpoint try Java Breakpoint breakpoint remove From Target this get Breakpoints remove breakpoint Iterator threads get Thread Iterator while threads has Next JDI Thread threads next remove Current Breakpoint breakpoint catch Core Exception e log Error e  breakpointRemoved IBreakpoint IMarkerDelta isAvailable supportsBreakpoint JavaBreakpoint removeFromTarget getBreakpoints getThreadIterator hasNext JDIThread removeCurrentBreakpoint CoreException logError
see I Suspend Resume public void suspend throws Debug Exception if is Suspended return try Virtual Machine vm getVM if vm null vm suspend suspend Threads set Suspended true fire Suspend Event Debug Event CLIENT REQUEST catch Runtime Exception e set Suspended false fire Resume Event Debug Event CLIENT REQUEST target Request Failed Message Format format JDI Debug Model Messages get String JDI Debug Target exception suspend new String e to String e NON NLS 1  ISuspendResume DebugException isSuspended VirtualMachine suspendThreads setSuspended fireSuspendEvent DebugEvent CLIENT_REQUEST RuntimeException setSuspended fireResumeEvent DebugEvent CLIENT_REQUEST targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIDebugTarget exception_suspend toString
Notifies threads that they have been suspended protected void suspend Threads Iterator threads get Thread Iterator while threads has Next JDI Thread threads next suspended ByVM  suspendThreads getThreadIterator hasNext JDIThread suspendedByVM
Notifies threads that they have been resumed protected void resume Threads Iterator threads get Thread Iterator while threads has Next JDI Thread threads next resumed ByVM  resumeThreads getThreadIterator hasNext JDIThread resumedByVM
Notifies this VM to update its state in preparation for a suspend param breakpoint the breakpoint that caused the suspension public void prepare To Suspend By Breakpoint Java Breakpoint breakpoint set Suspended true suspend Threads  prepareToSuspendByBreakpoint JavaBreakpoint setSuspended suspendThreads
Notifies this VM it has been suspended by the given breakpoint param breakpoint the breakpoint that caused the suspension protected void suspended By Breakpoint Java Breakpoint breakpoint boolean queue Event if queue Event queue Suspend Event Debug Event BREAKPOINT else fire Suspend Event Debug Event BREAKPOINT  suspendedByBreakpoint JavaBreakpoint queueEvent queueEvent queueSuspendEvent DebugEvent fireSuspendEvent DebugEvent
Notifies this VM suspension has been cancelled param breakpoint the breakpoint that caused the suspension protected void cancel Suspend By Breakpoint Java Breakpoint breakpoint set Suspended false resume Threads  cancelSuspendByBreakpoint JavaBreakpoint setSuspended resumeThreads
see I Terminate terminate public void terminate throws Debug Exception if is Available return if supports Terminate not Supported JDI Debug Model Messages get String JDI Debug Target does not support termination NON NLS 1 try set Terminating true dispose Thread Handler Virtual Machine vm getVM if vm null vm exit 1 I Process process get Process if process null process terminate catch VM Disconnected Exception e if the VM disconnects while exiting perform normal termination processing terminated catch Timeout Exception exception if there is a timeout see if the associated process is terminated I Process process get Process if process null process is Terminated terminated else All we can do is disconnect disconnected catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Debug Target exception terminating new String e to String e NON NLS 1  ITerminate DebugException isAvailable supportsTerminate notSupported JDIDebugModelMessages getString JDIDebugTarget does_not_support_termination setTerminating disposeThreadHandler VirtualMachine IProcess getProcess VMDisconnectedException TimeoutException IProcess getProcess isTerminated RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIDebugTarget exception_terminating toString
Updates the state of this target to be terminated if not already terminated protected void terminated set Terminating false if is Terminated set Terminated true set Disconnected true cleanup fire Terminate Event  setTerminating isTerminated setTerminated setDisconnected fireTerminateEvent
Updates the state of this target for disconnection from the VM protected void disconnected if is Disconnected set Disconnected true cleanup fire Terminate Event  isDisconnected setDisconnected fireTerminateEvent
Cleans up the internal state of this debug target as a result of a session ending with a VM as a result of a disconnect or termination of the VM p All threads are removed from this target This target is removed as a breakpoint listener and all breakpoints are removed from this target p protected void cleanup remove All Threads Debug Plugin plugin Debug Plugin get Default plugin get Breakpoint Manager remove Breakpoint Listener this plugin get Launch Manager remove Launch Listener this plugin get Breakpoint Manager remove Breakpoint Manager Listener this remove All Breakpoints f Out Of Synch Types clear if f Engines null Iterator engines f Engines values iterator while engines has Next I Ast Evaluation Engine engine I Ast Evaluation Engine engines next engine dispose f Engines clear f Virtual Machine null set Thread Start Handler null set Event Dispatcher null set Step Filters new String 0  removeAllThreads DebugPlugin DebugPlugin getDefault getBreakpointManager removeBreakpointListener getLaunchManager removeLaunchListener getBreakpointManager removeBreakpointManagerListener removeAllBreakpoints fOutOfSynchTypes fEngines fEngines hasNext IAstEvaluationEngine IAstEvaluationEngine fEngines fVirtualMachine setThreadStartHandler setEventDispatcher setStepFilters
Removes all threads from this target s collection of threads firing a terminate event for each protected void remove All Threads Iterator itr get Thread Iterator while itr has Next JDI Thread child JDI Thread itr next child terminated get Thread List clear  removeAllThreads getThreadIterator hasNext JDIThread JDIThread getThreadList
Removes all breakpoints from this target such that each breakpoint can update its install count This target s collection of breakpoints is cleared protected void remove All Breakpoints Iterator breakpoints Array List Array List get Breakpoints clone iterator while breakpoints has Next Java Breakpoint breakpoint Java Breakpoint breakpoints next try breakpoint remove From Target this catch Core Exception e log Error e get Breakpoints clear  removeAllBreakpoints ArrayList ArrayList getBreakpoints hasNext JavaBreakpoint JavaBreakpoint removeFromTarget CoreException logError getBreakpoints
Adds all the breakpoints in this target s collection to this debug target protected void reinstall All Breakpoints Iterator breakpoints Array List Array List get Breakpoints clone iterator while breakpoints has Next Java Breakpoint breakpoint Java Breakpoint breakpoints next try breakpoint add To Target this catch Core Exception e log Error e  reinstallAllBreakpoints ArrayList ArrayList getBreakpoints hasNext JavaBreakpoint JavaBreakpoint addToTarget CoreException logError
Returns Virtual Machine classes By Name String logging any JDI exceptions see com sun jdi Virtual Machine public List jdi Classes By Name String class Name Virtual Machine vm getVM if vm null try return vm classes By Name class Name catch VM Disconnected Exception e if is Available return Collections EMPTY LIST log Error e catch Runtime Exception e internal Error e return Collections EMPTY LIST  VirtualMachine classesByName VirtualMachine jdiClassesByName className VirtualMachine classesByName className VMDisconnectedException isAvailable EMPTY_LIST logError RuntimeException internalError EMPTY_LIST
see I Java Debug Target find Variable String public I Java Variable find Variable String var Name throws Debug Exception I Thread threads get Threads for int i 0 i threads length i I Java Thread thread I Java Thread threads i I Java Variable var thread find Variable var Name if var null return var return null  IJavaDebugTarget findVariable IJavaVariable findVariable varName DebugException IThread getThreads IJavaThread IJavaThread IJavaVariable findVariable varName
see I Adaptable get Adapter Class public Object get Adapter Class adapter if adapter I Java Debug Target class return this return super get Adapter adapter  IAdaptable getAdapter getAdapter IJavaDebugTarget getAdapter
The JDI Debug Plugin is shutting down Shutdown the event dispatcher and do local cleaup public void shutdown Event Dispatcher dispatcher JDI Debug Target get Debug Target get Event Dispatcher if dispatcher null dispatcher shutdown try if supports Terminate terminate else if supports Disconnect disconnect catch Debug Exception e JDI Debug Plugin log e cleanup  JDIDebugPlugin EventDispatcher JDIDebugTarget getDebugTarget getEventDispatcher supportsTerminate supportsDisconnect DebugException JDIDebugPlugin
Returns the CRC 32 of the entire class file contents associated with given type on the target VM or code null code if the type is not loaded or a CRC for the type is not known param type Name fully qualified name of the type for which a CRC is required For example com example Example return 32 bit CRC or code null code exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected Integer getCRC String type Name throws Debug Exception if getVM instanceof org eclipse jdi hcr Virtual Machine List classes jdi Classes By Name type Name if classes is Empty Reference Type type Reference Type classes get 0 if type instanceof org eclipse jdi hcr Reference Type try org eclipse jdi hcr Reference Type rt org eclipse jdi hcr Reference Type type if rt is Version Known return new Integer rt get Class File Version catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Debug Target exception retrieving version information new String e to String type name e NON NLS 1 execution will never reach this line as target Request Failed will throw an exception return null return null  typeName DebugException DebugException typeName DebugException VirtualMachine jdiClassesByName typeName isEmpty ReferenceType ReferenceType ReferenceType ReferenceType ReferenceType isVersionKnown getClassFileVersion RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIDebugTarget exception_retrieving_version_information toString targetRequestFailed
see I Java Debug Target get Java Types String public I Java Type get Java Types String name throws Debug Exception try get java lang Class Virtual Machine vm getVM if vm null request Failed JDI Debug Model Messages get String JDI Debug Target Unable to retrieve types   VM disconnected  4 null NON NLS 1 List classes vm classes By Name name if classes size 0 switch name char At 0 case b if name equals boolean NON NLS 1 return new I Java Type new Value true get Java Type else if name equals byte NON NLS 1 return new I Java Type new Value byte 1 get Java Type break case i if name equals int NON NLS 1 return new I Java Type new Value 1 get Java Type break case l if name equals long NON NLS 1 return new I Java Type new Value 1l get Java Type break case c if name equals char NON NLS 1 return new I Java Type new Value get Java Type break case s if name equals short NON NLS 1 return new I Java Type new Value short 1 get Java Type break case f if name equals float NON NLS 1 return new I Java Type new Value 1f get Java Type break case d if name equals double NON NLS 1 return new I Java Type new Value 1d get Java Type break return null else I Java Type types new I Java Type classes size for int i 0 i types length i types i JDI Type create Type this Type classes get i return types catch Runtime Exception e target Request Failed Message Format format 0 occurred while retrieving class for name 1 new String e to String name e NON NLS 1 execution will not reach this line as target Request Failed will throw an exception return null  IJavaDebugTarget getJavaTypes IJavaType getJavaTypes DebugException VirtualMachine requestFailed JDIDebugModelMessages getString JDIDebugTarget Unable_to_retrieve_types_ _VM_disconnected _4 classesByName charAt IJavaType newValue getJavaType IJavaType newValue getJavaType IJavaType newValue getJavaType IJavaType newValue getJavaType IJavaType newValue getJavaType IJavaType newValue getJavaType IJavaType newValue getJavaType IJavaType newValue getJavaType IJavaType IJavaType JDIType createType RuntimeException targetRequestFailed MessageFormat toString targetRequestFailed
see I Java Debug Target new Value boolean public I Java Value new Value boolean value Virtual Machine vm getVM if vm null Value v vm mirror Of value return JDI Value create Value this v return null  IJavaDebugTarget newValue IJavaValue newValue VirtualMachine mirrorOf JDIValue createValue
see I Java Debug Target new Value byte public I Java Value new Value byte value Virtual Machine vm getVM if vm null Value v vm mirror Of value return JDI Value create Value this v return null  IJavaDebugTarget newValue IJavaValue newValue VirtualMachine mirrorOf JDIValue createValue
see I Java Debug Target new Value char public I Java Value new Value char value Virtual Machine vm getVM if vm null Value v vm mirror Of value return JDI Value create Value this v return null  IJavaDebugTarget newValue IJavaValue newValue VirtualMachine mirrorOf JDIValue createValue
see I Java Debug Target new Value double public I Java Value new Value double value Virtual Machine vm getVM if vm null Value v vm mirror Of value return JDI Value create Value this v return null  IJavaDebugTarget newValue IJavaValue newValue VirtualMachine mirrorOf JDIValue createValue
see I Java Debug Target new Value float public I Java Value new Value float value Virtual Machine vm getVM if vm null Value v vm mirror Of value return JDI Value create Value this v return null  IJavaDebugTarget newValue IJavaValue newValue VirtualMachine mirrorOf JDIValue createValue
see I Java Debug Target new Value int public I Java Value new Value int value Virtual Machine vm getVM if vm null Value v vm mirror Of value return JDI Value create Value this v return null  IJavaDebugTarget newValue IJavaValue newValue VirtualMachine mirrorOf JDIValue createValue
see I Java Debug Target new Value long public I Java Value new Value long value Virtual Machine vm getVM if vm null Value v vm mirror Of value return JDI Value create Value this v return null  IJavaDebugTarget newValue IJavaValue newValue VirtualMachine mirrorOf JDIValue createValue
see I Java Debug Target new Value short public I Java Value new Value short value Virtual Machine vm getVM if vm null Value v vm mirror Of value return JDI Value create Value this v return null  IJavaDebugTarget newValue IJavaValue newValue VirtualMachine mirrorOf JDIValue createValue
see I Java Debug Target new Value String public I Java Value new Value String value Virtual Machine vm getVM if vm null Value v vm mirror Of value return JDI Value create Value this v return null  IJavaDebugTarget newValue IJavaValue newValue VirtualMachine mirrorOf JDIValue createValue
see I Java Debug Target null Value public I Java Value null Value return JDI Value create Value this null  IJavaDebugTarget nullValue IJavaValue nullValue JDIValue createValue
see I Java Debug Target void Value public I Java Value void Value return new JDI Void Value this  IJavaDebugTarget voidValue IJavaValue voidValue JDIVoidValue
protected boolean is Terminating return f Terminating  isTerminating fTerminating
protected void set Terminating boolean terminating f Terminating terminating  setTerminating fTerminating
protected Event Request f Request protected Thread Start Handler create Request  EventRequest fRequest ThreadStartHandler createRequest
Creates and registers a request to handle all thread start events protected void create Request Event Request Manager manager get Event Request Manager if manager null try Event Request req manager create Thread Start Request req set Suspend Policy Event Request SUSPEND NONE req enable addJDI Event Listener this req set Request req catch Runtime Exception e log Error e  createRequest EventRequestManager getEventRequestManager EventRequest createThreadStartRequest setSuspendPolicy EventRequest SUSPEND_NONE addJDIEventListener setRequest RuntimeException logError
Creates a model thread for the underlying JDI thread and adds it to the collection of threads for this debug target As a side effect of creating the thread a create event is fired for the model thread The event is ignored if the underlying thread is already marked as collected param event a thread start event param target the target in which the thread started return code true code the thread should be resumed public boolean handle Event Event event JDI Debug Target target Thread Reference thread Thread Start Event event thread try if thread is Collected return false catch VM Disconnected Exception exception return false catch Object Collected Exception e return false catch Timeout Exception e continue attempt to create the thread JDI Thread jdi Thread find Thread thread if jdi Thread null jdi Thread create Thread thread if jdi Thread null return false else jdi Thread dispose Stack Frames jdi Thread fire Change Event Debug Event CONTENT return jdi Thread is Suspended  handleEvent JDIDebugTarget ThreadReference ThreadStartEvent isCollected VMDisconnectedException ObjectCollectedException TimeoutException JDIThread jdiThread findThread jdiThread jdiThread createThread jdiThread jdiThread disposeStackFrames jdiThread fireChangeEvent DebugEvent jdiThread isSuspended
Deregisters this event listener protected void delete Request if get Request null removeJDI Event Listener this get Request set Request null  deleteRequest getRequest removeJDIEventListener getRequest setRequest
protected Event Request get Request return f Request  EventRequest getRequest fRequest
protected void set Request Event Request request f Request request  setRequest EventRequest fRequest
class Thread Death Handler implements IJDI Event Listener protected Thread Death Handler create Request  ThreadDeathHandler IJDIEventListener ThreadDeathHandler createRequest
Creates and registers a request to listen to thread death events protected void create Request Event Request Manager manager get Event Request Manager if manager null try Event Request req manager create Thread Death Request req set Suspend Policy Event Request SUSPEND NONE req enable addJDI Event Listener this req catch Runtime Exception e log Error e  createRequest EventRequestManager getEventRequestManager EventRequest createThreadDeathRequest setSuspendPolicy EventRequest SUSPEND_NONE addJDIEventListener RuntimeException logError
Locates the model thread associated with the underlying JDI thread that has terminated and removes it from the collection of threads belonging to this debug target A terminate event is fired for the model thread param event a thread death event param target the target in which the thread died return code true code the thread should be resumed public boolean handle Event Event event JDI Debug Target target Thread Reference ref Thread Death Event event thread JDI Thread thread find Thread ref if thread null synchronized f Threads get Thread List remove thread thread terminated return true  handleEvent JDIDebugTarget ThreadReference ThreadDeathEvent JDIThread findThread fThreads getThreadList
protected Thread Start Handler get Thread Start Handler return f Thread Start Handler  ThreadStartHandler getThreadStartHandler fThreadStartHandler
protected void set Thread Start Handler Thread Start Handler thread Start Handler f Thread Start Handler thread Start Handler  setThreadStartHandler ThreadStartHandler threadStartHandler fThreadStartHandler threadStartHandler
Java debug targets do not support storage retrieval see I Memory Block Retrieval supports Storage Retrieval public boolean supports Storage Retrieval return false  IMemoryBlockRetrieval supportsStorageRetrieval supportsStorageRetrieval
see I Memory Block Retrieval get Memory Block long long public I Memory Block get Memory Block long start Address long length throws Debug Exception not Supported JDI Debug Model Messages get String JDI Debug Target does not support storage retrieval NON NLS 1 this line will not be excecuted as not Supported String will throw an exception return null  IMemoryBlockRetrieval getMemoryBlock IMemoryBlock getMemoryBlock startAddress DebugException notSupported JDIDebugModelMessages getString JDIDebugTarget does_not_support_storage_retrieval notSupported
see I Launch Listener launch Removed I Launch public void launch Removed I Launch launch if is Available return if launch equals get Launch This target has been deregistered but it hasn t successfully terminated Update internal state to reflect that it is disconnected disconnected  ILaunchListener launchRemoved ILaunch launchRemoved ILaunch isAvailable getLaunch
see I Launch Listener launch Added I Launch public void launch Added I Launch launch  ILaunchListener launchAdded ILaunch launchAdded ILaunch
see I Launch Listener launch Changed I Launch public void launch Changed I Launch launch  ILaunchListener launchChanged ILaunch launchChanged ILaunch
Sets whether the VM should be resumed on startup Has no effect if the VM is already running when this target is created param resume whether the VM should be resumed on startup private synchronized void set Resume On Startup boolean resume f Resume On Startup resume  setResumeOnStartup fResumeOnStartup
Returns whether this VM should be resumed on startup return whether this VM should be resumed on startup protected synchronized boolean is Resume On Startup return f Resume On Startup  isResumeOnStartup fResumeOnStartup
see I Java Debug Target get Step Filters public String get Step Filters return f Step Filters  IJavaDebugTarget getStepFilters getStepFilters fStepFilters
see I Java Debug Target is Filter Constructors public boolean is Filter Constructors return f Step Filter Mask FILTER CONSTRUCTORS 0  IJavaDebugTarget isFilterConstructors isFilterConstructors fStepFilterMask FILTER_CONSTRUCTORS
see I Java Debug Target is Filter Static Initializers public boolean is Filter Static Initializers return f Step Filter Mask FILTER STATIC INITIALIZERS 0  IJavaDebugTarget isFilterStaticInitializers isFilterStaticInitializers fStepFilterMask FILTER_STATIC_INITIALIZERS
see I Java Debug Target is Filter Synthetics public boolean is Filter Synthetics return f Step Filter Mask FILTER SYNTHETICS 0  IJavaDebugTarget isFilterSynthetics isFilterSynthetics fStepFilterMask FILTER_SYNTHETICS
see I Java Debug Target is Step Filters Enabled public boolean is Step Filters Enabled return f Step Filter Mask STEP FILTERS ENABLED 0  IJavaDebugTarget isStepFiltersEnabled isStepFiltersEnabled fStepFilterMask STEP_FILTERS_ENABLED
see I Java Debug Target set Filter Constructors boolean public void set Filter Constructors boolean filter if filter f Step Filter Mask f Step Filter Mask FILTER CONSTRUCTORS else f Step Filter Mask f Step Filter Mask FILTER CONSTRUCTORS XOR MASK  IJavaDebugTarget setFilterConstructors setFilterConstructors fStepFilterMask fStepFilterMask FILTER_CONSTRUCTORS fStepFilterMask fStepFilterMask FILTER_CONSTRUCTORS XOR_MASK
see I Java Debug Target set Filter Static Initializers boolean public void set Filter Static Initializers boolean filter if filter f Step Filter Mask f Step Filter Mask FILTER STATIC INITIALIZERS else f Step Filter Mask f Step Filter Mask FILTER STATIC INITIALIZERS XOR MASK  IJavaDebugTarget setFilterStaticInitializers setFilterStaticInitializers fStepFilterMask fStepFilterMask FILTER_STATIC_INITIALIZERS fStepFilterMask fStepFilterMask FILTER_STATIC_INITIALIZERS XOR_MASK
see I Java Debug Target set Filter Synthetics boolean public void set Filter Synthetics boolean filter if filter f Step Filter Mask f Step Filter Mask FILTER SYNTHETICS else f Step Filter Mask f Step Filter Mask FILTER SYNTHETICS XOR MASK  IJavaDebugTarget setFilterSynthetics setFilterSynthetics fStepFilterMask fStepFilterMask FILTER_SYNTHETICS fStepFilterMask fStepFilterMask FILTER_SYNTHETICS XOR_MASK
see I Java Debug Target set Step Filters String public void set Step Filters String list f Step Filters list  IJavaDebugTarget setStepFilters setStepFilters fStepFilters
see I Java Debug Target set Step Filters Enabled boolean public void set Step Filters Enabled boolean enabled if enabled f Step Filter Mask f Step Filter Mask STEP FILTERS ENABLED else f Step Filter Mask f Step Filter Mask STEP FILTERS ENABLED XOR MASK  IJavaDebugTarget setStepFiltersEnabled setStepFiltersEnabled fStepFilterMask fStepFilterMask STEP_FILTERS_ENABLED fStepFilterMask fStepFilterMask STEP_FILTERS_ENABLED XOR_MASK
see I Debug Target has Threads public boolean has Threads return get Thread List size 0  IDebugTarget hasThreads hasThreads getThreadList
see org eclipse debug core model I Debug Element get Launch public I Launch get Launch return f Launch  IDebugElement getLaunch ILaunch getLaunch fLaunch
Sets the launch this target is contained in param launch the launch this target is contained in private void set Launch I Launch launch f Launch launch  setLaunch ILaunch fLaunch
Returns the number of suspend events that have occurred in this target return the number of suspend events that have occurred in this target protected int get Suspend Count return f Suspend Count  getSuspendCount fSuspendCount
Increments the suspend counter for this target protected void increment Suspend Count f Suspend Count  incrementSuspendCount fSuspendCount
Returns an evaluation engine for the given project creating one if neccessary param project java project return evalaution engine public I Ast Evaluation Engine get Evaluation Engine I Java Project project if f Engines null f Engines new Hash Map 2 I Ast Evaluation Engine engine I Ast Evaluation Engine f Engines get project if engine null engine Evaluation Manager new Ast Evaluation Engine project this f Engines put project engine return engine  IAstEvaluationEngine getEvaluationEngine IJavaProject fEngines fEngines HashMap IAstEvaluationEngine IAstEvaluationEngine fEngines EvaluationManager newAstEvaluationEngine fEngines
see org eclipse jdt debug core I Java Debug Target supports Monitor Information public boolean supports Monitor Information if is Available return false Virtual Machine vm getVM if vm null return vm can Get Current Contended Monitor vm can Get Monitor Info vm can Get Owned Monitor Info return false  IJavaDebugTarget supportsMonitorInformation supportsMonitorInformation isAvailable VirtualMachine canGetCurrentContendedMonitor canGetMonitorInfo canGetOwnedMonitorInfo
Sets whether or not this debug target is currently performing a hot code replace public void set Is Performing Hot Code Replace boolean is Performing Hot Code Replace f Is Performing Hot Code Replace is Performing Hot Code Replace  setIsPerformingHotCodeReplace isPerformingHotCodeReplace fIsPerformingHotCodeReplace isPerformingHotCodeReplace
see I Java Debug Target is Performing Hot Code Replace public boolean is Performing Hot Code Replace return f Is Performing Hot Code Replace  IJavaDebugTarget isPerformingHotCodeReplace isPerformingHotCodeReplace fIsPerformingHotCodeReplace
public boolean supports Access Watchpoints Virtual Machine vm getVM if is Available vm null return vm can Watch Field Access return false  supportsAccessWatchpoints VirtualMachine isAvailable canWatchFieldAccess
public boolean supports Modification Watchpoints Virtual Machine vm getVM if is Available vm null return vm can Watch Field Modification return false  supportsModificationWatchpoints VirtualMachine isAvailable canWatchFieldModification
see org eclipse jdt debug core I Java Debug Target set Default Stratum public void set Default Stratum String stratum getVM set Default Stratum stratum  IJavaDebugTarget setDefaultStratum setDefaultStratum setDefaultStratum
public String get Default Stratum return getVM get Default Stratum  getDefaultStratum getDefaultStratum
see org eclipse debug core model I Step Filters supports Step Filters public boolean supports Step Filters return is Available  IStepFilters supportsStepFilters supportsStepFilters isAvailable
When the breakpoint manager disables remove all registered breakpoints requests from the VM When it enables reinstall them public void breakpoint Manager Enablement Changed boolean enabled Iterator breakpoints Array List Array List get Breakpoints clone iterator while breakpoints has Next Java Breakpoint breakpoint Java Breakpoint breakpoints next try if enabled breakpoint add To Target this else if breakpoint should Skip Breakpoint breakpoint remove From Target this catch Core Exception e log Error e  breakpointManagerEnablementChanged ArrayList ArrayList getBreakpoints hasNext JavaBreakpoint JavaBreakpoint addToTarget shouldSkipBreakpoint removeFromTarget CoreException logError

Constructs a field wrappering the given field public JDI Field Variable JDI Debug Target target Field field Object Reference object Ref super target f Field field f Object object Ref f Type Reference Type object Ref type  JDIFieldVariable JDIDebugTarget ObjectReference objectRef fField fObject objectRef fType ReferenceType objectRef
Constructs a field wrappering the given field public JDI Field Variable JDI Debug Target target Field field Reference Type ref Type super target f Field field f Type ref Type  JDIFieldVariable JDIDebugTarget ReferenceType refType fField fType refType
Returns this variable s current code Value code protected Value retrieve Value if get Field is Static return get Field declaring Type get Value get Field else return get Object Reference get Value get Field  retrieveValue getField isStatic getField declaringType getValue getField getObjectReference getValue getField
see I Java Field Variable get Declaring Type public I Java Type get Declaring Type return JDI Type create Type JDI Debug Target get Debug Target f Field declaring Type  IJavaFieldVariable getDeclaringType IJavaType getDeclaringType JDIType createType JDIDebugTarget getDebugTarget fField declaringType
see I Variable get Name public String get Name throws Debug Exception try return get Field name catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Field Variable exception retrieving field name new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null  IVariable getName getName DebugException getField RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIFieldVariable exception_retrieving_field_name toString targetRequestFailed
protected void set Value Value value throws Debug Exception try if is Static Class Type get Field declaring Type set Value get Field value else get Object Reference set Value get Field value catch Class Not Loaded Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Field Variable exception modifying value 1 new String e to String e NON NLS 1 catch Invalid Type Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Field Variable exception modifying value 2 new String e to String e NON NLS 1 catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Field Variable exception modifying value 3 new String e to String e NON NLS 1  setValue DebugException isStatic ClassType getField declaringType setValue getField getObjectReference setValue getField ClassNotLoadedException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIFieldVariable exception_modifying_value_1 toString InvalidTypeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIFieldVariable exception_modifying_value_2 toString RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIFieldVariable exception_modifying_value_3 toString
see I Java Variable is Volatile public boolean is Volatile return get Field is Volatile  IJavaVariable isVolatile isVolatile getField isVolatile
see I Java Variable is Transient public boolean is Transient return get Field is Transient  IJavaVariable isTransient isTransient getField isTransient
see I Java Modifiers is Synthetic public boolean is Synthetic return get Field is Synthetic  IJavaModifiers isSynthetic isSynthetic getField isSynthetic
see I Java Modifiers is Public public boolean is Public return get Field is Public  IJavaModifiers isPublic isPublic getField isPublic
see I Java Modifiers is Private public boolean is Private return get Field is Private  IJavaModifiers isPrivate isPrivate getField isPrivate
see I Java Modifiers is Protected public boolean is Protected return get Field is Protected  IJavaModifiers isProtected isProtected getField isProtected
see I Java Modifiers is Package Private public boolean is Package Private return get Field is Package Private  IJavaModifiers isPackagePrivate isPackagePrivate getField isPackagePrivate
see I Java Modifiers is Static public boolean is Static return get Field is Static  IJavaModifiers isStatic isStatic getField isStatic
see I Java Modifiers is Final public boolean is Final return get Field is Final  IJavaModifiers isFinal isFinal getField isFinal
see I Variable get Reference Type Name public String get Reference Type Name return get Field type Name  IVariable getReferenceTypeName getReferenceTypeName getField typeName
see I Java Variable get Signature public String get Signature throws Debug Exception try return get Field signature catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Field Variable exception retrieving field signature new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null  IJavaVariable getSignature getSignature DebugException getField RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIFieldVariable exception_retrieving_field_signature toString targetRequestFailed
public Field get Field return f Field  getField fField
public Object Reference get Object Reference return f Object  ObjectReference getObjectReference fObject
public Reference Type get Reference Type return f Type  ReferenceType getReferenceType fType
public boolean supports Value Modification if get Field declaring Type instanceof Interface Type return false return super supports Value Modification  supportsValueModification getField declaringType InterfaceType supportsValueModification
see java lang Object to String public String to String return get Field to String  toString toString getField toString
see I Value Modification set Value I Value public void set Value I Value v throws Debug Exception if verify Value v set Value JDI Value v get Underlying Value  IValueModification setValue IValue setValue IValue DebugException verifyValue setValue JDIValue getUnderlyingValue
see JDI Variable get Underlying Type protected Type get Underlying Type throws Debug Exception try return get Field type catch Class Not Loaded Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Field Variable exception while retrieving type of field new String e to String e NON NLS 1 catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Field Variable exception while retrieving type of field new String e to String e NON NLS 1 this line will not be exceucted as an exception will be throw in type retrieval fails return null  JDIVariable getUnderlyingType getUnderlyingType DebugException getField ClassNotLoadedException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIFieldVariable exception_while_retrieving_type_of_field toString RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIFieldVariable exception_while_retrieving_type_of_field toString
see java lang Object equals Object public boolean equals Object o if o instanceof JDI Field Variable JDI Field Variable f JDI Field Variable o if f Object null return f Object equals f f Object f f Field equals f Field return f f Field equals f Field return false  JDIFieldVariable JDIFieldVariable JDIFieldVariable fObject fObject fObject fField fField fField fField
see java lang Object hash Code public int hash Code if f Object null return f Field hash Code f Object hash Code return f Field hash Code  hashCode hashCode fObject fField hashCode fObject hashCode fField hashCode
public I Java Object get Receiver Object Reference object Reference get Object Reference if object Reference null return null return I Java Object JDI Value create Value get Java Debug Target object Reference  IJavaObject getReceiver ObjectReference objectReference getObjectReference objectReference IJavaObject JDIValue createValue getJavaDebugTarget objectReference
public I Java Reference Type get Receiving Type return I Java Reference Type JDI Type create Type get Java Debug Target get Reference Type  IJavaReferenceType getReceivingType IJavaReferenceType JDIType createType getJavaDebugTarget getReferenceType

Cosntructs a new interface type on the given target referencing the specified interface type public JDI Interface Type JDI Debug Target target Interface Type type super target type  JDIInterfaceType JDIDebugTarget InterfaceType
public I Java Class Type get Implementors throws Debug Exception try List implementor List Interface Type get Underlying Type implementors List java Class Type List new Array List implementor List size Iterator iterator implementor List iterator while iterator has Next Class Type class Type Class Type iterator next if class Type null java Class Type List add JDI Type create Type get Debug Target class Type I Java Class Type java Class Type Array new I Java Class Type java Class Type List size java Class Type Array I Java Class Type java Class Type List to Array java Class Type Array return java Class Type Array catch Runtime Exception re get Debug Target target Request Failed Message Format format JDI Debug Model Messages get String JDI Class Type exception while retrieving superclass new String re to String re NON NLS 1 return new I Java Class Type 0  IJavaClassType getImplementors DebugException implementorList InterfaceType getUnderlyingType javaClassTypeList ArrayList implementorList implementorList hasNext ClassType classType ClassType classType javaClassTypeList JDIType createType getDebugTarget classType IJavaClassType javaClassTypeArray IJavaClassType javaClassTypeList javaClassTypeArray IJavaClassType javaClassTypeList toArray javaClassTypeArray javaClassTypeArray RuntimeException getDebugTarget targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIClassType exception_while_retrieving_superclass toString IJavaClassType
public I Java Interface Type get Sub Interfaces throws Debug Exception try List sub List Interface Type get Underlying Type subinterfaces List java Interface Type List new Array List sub List size Iterator iterator sub List iterator while iterator has Next Interface Type interface Type Interface Type iterator next if interface Type null java Interface Type List add JDI Type create Type get Debug Target interface Type I Java Interface Type java Interface Type Array new I Java Interface Type java Interface Type List size java Interface Type Array I Java Interface Type java Interface Type List to Array java Interface Type Array return java Interface Type Array catch Runtime Exception re get Debug Target target Request Failed Message Format format JDI Debug Model Messages get String JDI Class Type exception while retrieving superclass new String re to String re NON NLS 1 return new I Java Interface Type 0  IJavaInterfaceType getSubInterfaces DebugException subList InterfaceType getUnderlyingType javaInterfaceTypeList ArrayList subList subList hasNext InterfaceType interfaceType InterfaceType interfaceType javaInterfaceTypeList JDIType createType getDebugTarget interfaceType IJavaInterfaceType javaInterfaceTypeArray IJavaInterfaceType javaInterfaceTypeList javaInterfaceTypeArray IJavaInterfaceType javaInterfaceTypeList toArray javaInterfaceTypeArray javaInterfaceTypeArray RuntimeException getDebugTarget targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIClassType exception_while_retrieving_superclass toString IJavaInterfaceType
public I Java Interface Type get Super Interfaces throws Debug Exception try List super List Interface Type get Underlying Type superinterfaces List java Interface Type List new Array List super List size Iterator iterator super List iterator while iterator has Next Interface Type interface Type Interface Type iterator next if interface Type null java Interface Type List add JDI Type create Type get Debug Target interface Type I Java Interface Type java Interface Type Array new I Java Interface Type java Interface Type List size java Interface Type Array I Java Interface Type java Interface Type List to Array java Interface Type Array return java Interface Type Array catch Runtime Exception re get Debug Target target Request Failed Message Format format JDI Debug Model Messages get String JDI Class Type exception while retrieving superclass new String re to String re NON NLS 1 return new I Java Interface Type 0  IJavaInterfaceType getSuperInterfaces DebugException superList InterfaceType getUnderlyingType javaInterfaceTypeList ArrayList superList superList hasNext InterfaceType interfaceType InterfaceType interfaceType javaInterfaceTypeList JDIType createType getDebugTarget interfaceType IJavaInterfaceType javaInterfaceTypeArray IJavaInterfaceType javaInterfaceTypeList javaInterfaceTypeArray IJavaInterfaceType javaInterfaceTypeList toArray javaInterfaceTypeArray javaInterfaceTypeArray RuntimeException getDebugTarget targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIClassType exception_while_retrieving_superclass toString IJavaInterfaceType

Constructs a local variable wrappering the given local from in a stack frame public JDI Local Variable JDI Stack Frame frame Local Variable local super JDI Debug Target frame get Debug Target f Stack Frame frame f Local local  JDILocalVariable JDIStackFrame LocalVariable JDIDebugTarget getDebugTarget fStackFrame fLocal
Returns this variable s current Value protected Value retrieve Value throws Debug Exception if get Stack Frame is Suspended return get Stack Frame get Underlying Stack Frame get Value f Local bug 6518 return get Last Known Value  retrieveValue DebugException getStackFrame isSuspended getStackFrame getUnderlyingStackFrame getValue fLocal getLastKnownValue
see I Variable get Name public String get Name throws Debug Exception try return get Local name catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Local Variable exception retrieving local variable name new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null  IVariable getName getName DebugException getLocal RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDILocalVariable exception_retrieving_local_variable_name toString targetRequestFailed
see JDI Modification Variable set Value Value protected void set Value Value value throws Debug Exception try get Stack Frame get Underlying Stack Frame set Value get Local value catch Class Not Loaded Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Local Variable exception modifying local variable value 1 new String e to String e NON NLS 1 catch Invalid Type Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Local Variable exception modifying local variable value 2 new String e to String e NON NLS 1 catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Local Variable exception modifying local variable value 3 new String e to String e NON NLS 1  JDIModificationVariable setValue setValue DebugException getStackFrame getUnderlyingStackFrame setValue getLocal ClassNotLoadedException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDILocalVariable exception_modifying_local_variable_value_1 toString InvalidTypeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDILocalVariable exception_modifying_local_variable_value_2 toString RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDILocalVariable exception_modifying_local_variable_value_3 toString
see I Variable get Reference Type Name public String get Reference Type Name throws Debug Exception try return get Local type Name catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Local Variable exception retrieving local variable type name new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null  IVariable getReferenceTypeName getReferenceTypeName DebugException getLocal typeName RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDILocalVariable exception_retrieving_local_variable_type_name toString targetRequestFailed
see I Java Variable get Signature public String get Signature throws Debug Exception try return get Local signature catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Local Variable exception retrieving local variable type signature new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null  IJavaVariable getSignature getSignature DebugException getLocal RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDILocalVariable exception_retrieving_local_variable_type_signature toString targetRequestFailed
Updates this local s underlying variable Called by enclosing stack frame when doing an incremental update protected void set Local Local Variable local f Local local  setLocal LocalVariable fLocal
protected Local Variable get Local return f Local  LocalVariable getLocal fLocal
protected JDI Stack Frame get Stack Frame return f Stack Frame  JDIStackFrame getStackFrame fStackFrame
see java lang Object to String public String to String return get Local to String  toString toString getLocal toString
see I Value Modification set Value I Value public void set Value I Value v throws Debug Exception if verify Value v JDI Value value JDI Value v try get Stack Frame get Underlying Stack Frame set Value get Local value get Underlying Value catch Invalid Type Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Local Variable exception while attempting to set value of local variable new String e to String e NON NLS 1 catch Class Not Loaded Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Local Variable exception while attempting to set value of local variable new String e to String e NON NLS 1 catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Local Variable exception while attempting to set value of local variable new String e to String e NON NLS 1  IValueModification setValue IValue setValue IValue DebugException verifyValue JDIValue JDIValue getStackFrame getUnderlyingStackFrame setValue getLocal getUnderlyingValue InvalidTypeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDILocalVariable exception_while_attempting_to_set_value_of_local_variable toString ClassNotLoadedException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDILocalVariable exception_while_attempting_to_set_value_of_local_variable toString RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDILocalVariable exception_while_attempting_to_set_value_of_local_variable toString
see JDI Variable get Underlying Type protected Type get Underlying Type throws Debug Exception try return get Local type catch Class Not Loaded Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Local Variable exception while retrieving type of local variable new String e to String e NON NLS 1 catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Local Variable exception while retrieving type of local variable new String e to String e NON NLS 1 this line will not be exceucted as an exception will be throw in type retrieval fails return null  JDIVariable getUnderlyingType getUnderlyingType DebugException getLocal ClassNotLoadedException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDILocalVariable exception_while_retrieving_type_of_local_variable toString RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDILocalVariable exception_while_retrieving_type_of_local_variable toString
see org eclipse jdt debug core I Java Variable is Local public boolean is Local return true  IJavaVariable isLocal isLocal

public JDI Modification Variable JDI Debug Target target super target  JDIModificationVariable JDIDebugTarget
public boolean supports Value Modification try if is Final Value current Value get Current Value if current Value null String signature current Value type signature return fg Valid Signatures contains signature String signature get Signature return fg Valid Signatures contains signature catch Debug Exception e log Error e catch VM Disconnected Exception e JDI Debug Target target JDI Debug Target get Debug Target if target is Available return false log Error e catch Runtime Exception e log Error e return false  supportsValueModification isFinal currentValue getCurrentValue currentValue currentValue fgValidSignatures getSignature fgValidSignatures DebugException logError VMDisconnectedException JDIDebugTarget JDIDebugTarget getDebugTarget isAvailable logError RuntimeException logError
protected Value generateVM Value String expression throws Debug Exception String signature null Value c Value get Current Value Virtual Machine vm getVM if vm null request Failed JDI Debug Model Messages get String JDI Modification Variable Unable to generate value   VM disconnected  1 null NON NLS 1 if c Value null String with null value signature jdi String Signature else signature c Value type signature if signature length 1 signature equals jdi String Signature return null Value vm Value null try switch signature char At 0 case Z String flse Boolean FALSE to String String tre Boolean TRUE to String if expression equals tre expression equals flse boolean boolean Value Boolean value Of expression boolean Value vm Value vm mirror Of boolean Value break case B byte byte Value Byte value Of expression byte Value vm Value vm mirror Of byte Value break case C if expression length 1 char char Value expression char At 0 vm Value vm mirror Of char Value else if expression length 2 char char Value if expression char At 0 return null switch expression char At 1 case b char Value b break case f char Value f break case n char Value n break case r char Value r break case t char Value t break case char Value break case char Value break case char Value break default return null vm Value vm mirror Of char Value break case S short short Value Short value Of expression short Value vm Value vm mirror Of short Value break case I int int Value Integer value Of expression int Value vm Value vm mirror Of int Value break case J long long Value Long value Of expression long Value vm Value vm mirror Of long Value break case F float float Value Float value Of expression float Value vm Value vm mirror Of float Value break case D double double Value Double value Of expression double Value vm Value vm mirror Of double Value break case L if expression equals null NON NLS 1 vm Value null else if expression equals null NON NLS 1 vm Value vm mirror Of null NON NLS 1 else vm Value vm mirror Of expression break catch Number Format Exception nfe return null return vm Value  generateVMValue DebugException cValue getCurrentValue VirtualMachine requestFailed JDIDebugModelMessages getString JDIModificationVariable Unable_to_generate_value_ _VM_disconnected _1 cValue jdiStringSignature cValue jdiStringSignature vmValue charAt toString toString booleanValue valueOf booleanValue vmValue mirrorOf booleanValue byteValue valueOf byteValue vmValue mirrorOf byteValue charValue charAt vmValue mirrorOf charValue charValue charAt charAt charValue charValue charValue charValue charValue charValue charValue charValue vmValue mirrorOf charValue shortValue valueOf shortValue vmValue mirrorOf shortValue intValue valueOf intValue vmValue mirrorOf intValue longValue valueOf longValue vmValue mirrorOf longValue floatValue valueOf floatValue vmValue mirrorOf floatValue doubleValue valueOf doubleValue vmValue mirrorOf doubleValue vmValue vmValue mirrorOf vmValue mirrorOf NumberFormatException vmValue
public boolean verify Value String expression try I Value value JDI Value create Value get Java Debug Target generateVM Value expression return verify Value value catch Debug Exception e return false  verifyValue IValue JDIValue createValue getJavaDebugTarget generateVMValue verifyValue DebugException
see org eclipse debug core model I Value Modification verify Value org eclipse debug core model I Value public boolean verify Value I Value value return value instanceof I Java Value value get Debug Target equals get Debug Target  IValueModification verifyValue IValue verifyValue IValue IJavaValue getDebugTarget getDebugTarget
public final void set Value String expression throws Debug Exception Value value generateVM Value expression set Value value fire Change Event Debug Event CONTENT  setValue DebugException generateVMValue setValue fireChangeEvent DebugEvent
Set this variable s value to the given value protected abstract void set Value Value value throws Debug Exception  setValue DebugException

public JDI Null Value JDI Debug Target target super target null  JDINullValue JDIDebugTarget
protected List get Variables List return Collections EMPTY LIST  getVariablesList EMPTY_LIST
see I Value get Reference Type Name public String get Reference Type Name return null NON NLS 1  IValue getReferenceTypeName getReferenceTypeName
see I Value get Value String public String get Value String return null NON NLS 1  IValue getValueString getValueString
see I Java Value get Signature public String get Signature return null  IJavaValue getSignature getSignature
see I Java Value get Array Length public int get Array Length return 1  IJavaValue getArrayLength getArrayLength
see I Java Value get Java Type public I Java Type get Java Type return null  IJavaValue getJavaType IJavaType getJavaType
see Object equals Object public boolean equals Object obj return obj instanceof JDI Null Value  JDINullValue
see Object hash Code public int hash Code return get Class hash Code  hashCode hashCode getClass hashCode
see java lang Object to String public String to String return null NON NLS 1  toString toString

Constructs a new target object on the given target with the specified object reference public JDI Object Value JDI Debug Target target Object Reference object super target object  JDIObjectValue JDIDebugTarget ObjectReference
see I Java Object send Message String String I Java Value I Java Thread public I Java Value send Message String selector String signature I Java Value args I Java Thread thread boolean super Send throws Debug Exception JDI Thread java Thread JDI Thread thread List arguments null if args null arguments Collections EMPTY LIST else arguments new Array List args length for int i 0 i args length i arguments add JDI Value args i get Underlying Value Object Reference object get Underlying Object Method method null Reference Type ref Type get Underlying Reference Type try if super Send begin lookup in superclass ref Type Class Type ref Type superclass method concrete Method By Name ref Type selector signature if method null target Request Failed Message Format format JDI Debug Model Messages get String JDI Object Value 11 new String selector signature null NON NLS 1 catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Object Value exception while performing method lookup for selector new String e to String selector signature e NON NLS 1 Value result java Thread invoke Method null object method arguments super Send return JDI Value create Value JDI Debug Target get Debug Target result  IJavaObject sendMessage IJavaValue IJavaThread IJavaValue sendMessage IJavaValue IJavaThread superSend DebugException JDIThread javaThread JDIThread EMPTY_LIST ArrayList JDIValue getUnderlyingValue ObjectReference getUnderlyingObject ReferenceType refType getUnderlyingReferenceType superSend refType ClassType refType concreteMethodByName refType targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIObjectValue RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIObjectValue exception_while_performing_method_lookup_for_selector toString javaThread invokeMethod superSend JDIValue createValue JDIDebugTarget getDebugTarget
see I Java Object send Message String String I Java Value I Java Thread String type Signature public I Java Value send Message String selector String signature I Java Value args I Java Thread thread String type Signature throws Debug Exception JDI Thread java Thread JDI Thread thread List arguments null if args null arguments Collections EMPTY LIST else arguments new Array List args length for int i 0 i args length i arguments add JDI Value args i get Underlying Value Object Reference object get Underlying Object Method method null Reference Type ref Type get Underlying Reference Type try while type Signature null ref Type signature equals type Signature lookup correct type through the hierarchy ref Type Class Type ref Type superclass if ref Type null target Request Failed JDI Debug Model Messages get String JDIObjectValueMethod declaring type not found 1 null NON NLS 1 method concrete Method By Name ref Type selector signature if method null target Request Failed Message Format format JDI Debug Model Messages get String JDI Object Value 11 new String selector signature null NON NLS 1 catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Object Value exception while performing method lookup for selector new String e to String selector signature e NON NLS 1 Value result java Thread invoke Method null object method arguments true return JDI Value create Value JDI Debug Target get Debug Target result  IJavaObject sendMessage IJavaValue IJavaThread typeSignature IJavaValue sendMessage IJavaValue IJavaThread typeSignature DebugException JDIThread javaThread JDIThread EMPTY_LIST ArrayList JDIValue getUnderlyingValue ObjectReference getUnderlyingObject ReferenceType refType getUnderlyingReferenceType typeSignature refType typeSignature refType ClassType refType refType targetRequestFailed JDIDebugModelMessages getString JDIObjectValueMethod_declaring_type_not_found_1 concreteMethodByName refType targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIObjectValue RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIObjectValue exception_while_performing_method_lookup_for_selector toString javaThread invokeMethod JDIValue createValue JDIDebugTarget getDebugTarget
private Method concrete Method By Name Reference Type ref Type String selector String signature throws Debug Exception if ref Type instanceof Class Type return Class Type ref Type concrete Method By Name selector signature if ref Type instanceof Array Type the jdi spec specifies that all methods on methods return an empty list for array types use a trick to get the right method from java lang Object return Class Type ref Type class Object reference Type superclass concrete Method By Name selector signature target Request Failed Message Format format JDI Debug Model Messages get String JDI Object Value method lookup failed for selector    0    with signature    1   1 new String selector signature null NON NLS 1 it is not possible to return null return null  concreteMethodByName ReferenceType refType DebugException refType ClassType ClassType refType concreteMethodByName refType ArrayType ClassType refType classObject referenceType concreteMethodByName targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIObjectValue method_lookup_failed_for_selector___ ___with_signature___ __1
Returns this object s the underlying object reference return underlying object reference public Object Reference get Underlying Object return Object Reference get Underlying Value  ObjectReference getUnderlyingObject ObjectReference getUnderlyingValue
see I Java Object get Field String boolean public I Java Field Variable get Field String name boolean super Field throws Debug Exception Reference Type ref get Underlying Reference Type try if super Field begin lookup in superclass ref Class Type ref superclass Field field ref field By Name name if field null return new JDI Field Variable JDI Debug Target get Debug Target field get Underlying Object else Field enclosing This null Iterator fields ref fields iterator while fields has Next Field field Tmp Field fields next if field Tmp name starts With this NON NLS 1 enclosing This field Tmp break return JDI Object Value new JDI Field Variable JDI Debug Target get Debug Target enclosing This get Underlying Object get Value get Field name false catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Object Value exception retrieving field new String e to String e NON NLS 1 it is possible to return null return null  IJavaObject getField IJavaFieldVariable getField superField DebugException ReferenceType getUnderlyingReferenceType superField ClassType fieldByName JDIFieldVariable JDIDebugTarget getDebugTarget getUnderlyingObject enclosingThis hasNext fieldTmp fieldTmp startsWith enclosingThis fieldTmp JDIObjectValue JDIFieldVariable JDIDebugTarget getDebugTarget enclosingThis getUnderlyingObject getValue getField RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIObjectValue exception_retrieving_field toString
see I Java Object get Field String String public I Java Field Variable get Field String name String declaring Type Signature throws Debug Exception Reference Type ref get Underlying Reference Type try Field field null Field field Tmp null Iterator fields ref all Fields iterator while fields has Next field Tmp Field fields next if name equals field Tmp name declaring Type Signature equals field Tmp declaring Type signature field field Tmp break if field null return new JDI Field Variable JDI Debug Target get Debug Target field get Underlying Object catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Object Value exception retrieving field new String e to String e NON NLS 1 it is possible to return null return null  IJavaObject getField IJavaFieldVariable getField declaringTypeSignature DebugException ReferenceType getUnderlyingReferenceType fieldTmp allFields hasNext fieldTmp fieldTmp declaringTypeSignature fieldTmp declaringType fieldTmp JDIFieldVariable JDIDebugTarget getDebugTarget getUnderlyingObject RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIObjectValue exception_retrieving_field toString
Returns a variable representing the field in this object with the given name or code null code if there is no field with the given name or the name is ambiguous param name field name param super Class Level the level of the desired field in the hierarchy Level 0 returns the field from the current type level 1 from the super type etc return the variable representing the field or code null code exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li public I Java Field Variable get Field String name int super Class Level throws Debug Exception Reference Type ref get Underlying Reference Type try for int i 0 i super Class Level i ref Class Type ref superclass Field field ref field By Name name if field null return new JDI Field Variable JDI Debug Target get Debug Target field get Underlying Object catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Object Value exception retrieving field new String e to String e NON NLS 1 it is possible to return null return null  superClassLevel DebugException DebugException IJavaFieldVariable getField superClassLevel DebugException ReferenceType getUnderlyingReferenceType superClassLevel ClassType fieldByName JDIFieldVariable JDIDebugTarget getDebugTarget getUnderlyingObject RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIObjectValue exception_retrieving_field toString
Returns the underlying reference type for this object exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li protected Reference Type get Underlying Reference Type throws Debug Exception try return get Underlying Object reference Type catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Object Value exception retrieving reference type new String e to String e NON NLS 1 execution will not reach this line as an exception will be thrown return null  DebugException DebugException ReferenceType getUnderlyingReferenceType DebugException getUnderlyingObject referenceType RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIObjectValue exception_retrieving_reference_type toString
Return the enclosing object of this object at the specified level Level 0 returns the object level 1 returns the enclosing object etc public I Java Object get Enclosing Object int enclosing Level throws Debug Exception JDI Object Value res this for int i 0 i enclosing Level i Reference Type ref res get Underlying Reference Type try Field enclosing This null field Tmp null Iterator fields ref fields iterator while fields has Next field Tmp Field fields next if field Tmp name starts With this NON NLS 1 enclosing This field Tmp if enclosing This null res JDI Object Value new JDI Field Variable JDI Debug Target get Debug Target enclosing This res get Underlying Object get Value else it is possible to return null return null catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Object Value exception retrieving field new String e to String e NON NLS 1 return res  IJavaObject getEnclosingObject enclosingLevel DebugException JDIObjectValue enclosingLevel ReferenceType getUnderlyingReferenceType enclosingThis fieldTmp hasNext fieldTmp fieldTmp startsWith enclosingThis fieldTmp enclosingThis JDIObjectValue JDIFieldVariable JDIDebugTarget getDebugTarget enclosingThis getUnderlyingObject getValue RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIObjectValue exception_retrieving_field toString

Constructs a new primitive value param target the Java debug target param value the underlying JDI primitive value public JDI Primitive Value JDI Debug Target target Value value super target value  JDIPrimitiveValue JDIDebugTarget
Returns this value s underlying primtive value return underlying primtive value protected Primitive Value get Underlying Primitive Value return Primitive Value get Underlying Value  PrimitiveValue getUnderlyingPrimitiveValue PrimitiveValue getUnderlyingValue
see I Java Primitive Value get Boolean Value public boolean get Boolean Value return get Underlying Primitive Value boolean Value  IJavaPrimitiveValue getBooleanValue getBooleanValue getUnderlyingPrimitiveValue booleanValue
see I Java Primitive Value get Byte Value public byte get Byte Value return get Underlying Primitive Value byte Value  IJavaPrimitiveValue getByteValue getByteValue getUnderlyingPrimitiveValue byteValue
see I Java Primitive Value get Char Value public char get Char Value return get Underlying Primitive Value char Value  IJavaPrimitiveValue getCharValue getCharValue getUnderlyingPrimitiveValue charValue
see I Java Primitive Value get Double Value public double get Double Value return get Underlying Primitive Value double Value  IJavaPrimitiveValue getDoubleValue getDoubleValue getUnderlyingPrimitiveValue doubleValue
see I Java Primitive Value get Float Value public float get Float Value return get Underlying Primitive Value float Value  IJavaPrimitiveValue getFloatValue getFloatValue getUnderlyingPrimitiveValue floatValue
see I Java Primitive Value get Int Value public int get Int Value return get Underlying Primitive Value int Value  IJavaPrimitiveValue getIntValue getIntValue getUnderlyingPrimitiveValue intValue
see I Java Primitive Value get Long Value public long get Long Value return get Underlying Primitive Value long Value  IJavaPrimitiveValue getLongValue getLongValue getUnderlyingPrimitiveValue longValue
see I Java Primitive Value get Short Value public short get Short Value return get Underlying Primitive Value short Value  IJavaPrimitiveValue getShortValue getShortValue getUnderlyingPrimitiveValue shortValue

Constructs a new reference type in the given target param target associated vm param type reference type public JDI Reference Type JDI Debug Target target Type type super target type  JDIReferenceType JDIDebugTarget
see org eclipse jdt debug core I Java Reference Type get Available Strata public String get Available Strata List strata get Reference Type available Strata return String strata to Array new String strata size  IJavaReferenceType getAvailableStrata getAvailableStrata getReferenceType availableStrata toArray
Returns the underlying reference type return the underlying reference type protected Reference Type get Reference Type return Reference Type get Underlying Type  ReferenceType getReferenceType ReferenceType getUnderlyingType
see org eclipse jdt debug core I Java Reference Type get Default Stratum public String get Default Stratum return get Reference Type default Stratum  IJavaReferenceType getDefaultStratum getDefaultStratum getReferenceType defaultStratum
public I Java Field Variable get Field String name throws Debug Exception try Reference Type type Reference Type get Underlying Type Field field type field By Name name if field null return new JDI Field Variable get Debug Target field type catch Runtime Exception e get Debug Target target Request Failed Message Format format JDI Debug Model Messages get String JDI Class Type exception while retrieving field new String e to String name e NON NLS 1 it is possible to return null return null  IJavaFieldVariable getField DebugException ReferenceType ReferenceType getUnderlyingType fieldByName JDIFieldVariable getDebugTarget RuntimeException getDebugTarget targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIClassType exception_while_retrieving_field toString
public I Java Class Object get Class Object throws Debug Exception try Reference Type type Reference Type get Underlying Type return I Java Class Object JDI Value create Value get Debug Target type class Object catch Runtime Exception e get Debug Target target Request Failed Message Format format JDI Debug Model Messages get String JDI Class Type exception while retrieving class object new String e to String e NON NLS 1 execution will not fall through to here as request Failed will throw an exception return null  IJavaClassObject getClassObject DebugException ReferenceType ReferenceType getUnderlyingType IJavaClassObject JDIValue createValue getDebugTarget classObject RuntimeException getDebugTarget targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIClassType exception_while_retrieving_class_object toString requestFailed
public String get All Field Names throws Debug Exception if f All Fields null try List fields Reference Type get Underlying Type all Fields f All Fields new String fields size Iterator iterator fields iterator int i 0 while iterator has Next Field field Field iterator next f All Fields i field name i catch Runtime Exception e get Debug Target target Request Failed JDI Debug Model Messages get String JDI Reference Type 2 e NON NLS 1 return f All Fields  getAllFieldNames DebugException fAllFields ReferenceType getUnderlyingType allFields fAllFields hasNext fAllFields RuntimeException getDebugTarget targetRequestFailed JDIDebugModelMessages getString JDIReferenceType fAllFields
public String get Declared Field Names throws Debug Exception if f Declared Fields null try List fields Reference Type get Underlying Type fields f Declared Fields new String fields size Iterator iterator fields iterator int i 0 while iterator has Next Field field Field iterator next f Declared Fields i field name i catch Runtime Exception e get Debug Target target Request Failed JDI Debug Model Messages get String JDI Reference Type 3 e NON NLS 1 return f Declared Fields  getDeclaredFieldNames DebugException fDeclaredFields ReferenceType getUnderlyingType fDeclaredFields hasNext fDeclaredFields RuntimeException getDebugTarget targetRequestFailed JDIDebugModelMessages getString JDIReferenceType fDeclaredFields
Return the source paths for the given stratum public String get Source Paths String stratum try List source Paths get Reference Type source Paths stratum return String source Paths to Array new String source Paths size catch Absent Information Exception e return new String 0  getSourcePaths sourcePaths getReferenceType sourcePaths sourcePaths toArray sourcePaths AbsentInformationException

Creates a new stack frame in the given thread param thread The parent JDI thread param stack Frame The underlying stack frame public JDI Stack Frame JDI Thread thread int depth super JDI Debug Target thread get Debug Target set Depth depth set Thread thread  stackFrame JDIStackFrame JDIThread JDIDebugTarget getDebugTarget setDepth setThread
Sets this frame s depth in the call stack param depth index in the call stack protected void set Depth int depth f Depth depth clear Cached Data f Refresh Variables true  setDepth fDepth clearCachedData fRefreshVariables
Returns this fame s depth in the call stack return this frame s depth in the call stack protected int get Depth return f Depth  getDepth fDepth
see I Stack Frame get Thread public I Thread get Thread return f Thread  IStackFrame getThread IThread getThread fThread
see I Suspend Resume can Resume public boolean can Resume return get Thread can Resume  ISuspendResume canResume canResume getThread canResume
see I Suspend Resume can Suspend public boolean can Suspend return get Thread can Suspend  ISuspendResume canSuspend canSuspend getThread canSuspend
see I Step can Step Into public boolean can Step Into try return exists is Top Stack Frame is Obsolete get Thread can Step Into catch Debug Exception e log Error e return false  IStep canStepInto canStepInto isTopStackFrame isObsolete getThread canStepInto DebugException logError
see I Step can Step Over public boolean can Step Over try return exists is Obsolete get Thread can Step Over catch Debug Exception e log Error e return false  IStep canStepOver canStepOver isObsolete getThread canStepOver DebugException logError
see I Step can Step Return public boolean can Step Return try if exists is Obsolete get Thread can Step Return return false List frames JDI Thread get Thread compute Stack Frames if frames null frames is Empty boolean bottom Frame this equals frames get frames size 1 boolean above Obsolete Frame false if bottom Frame int index frames index Of this if index frames size 1 JDI Stack Frame frames get index 1 is Obsolete above Obsolete Frame true return bottom Frame above Obsolete Frame catch Debug Exception e log Error e return false  IStep canStepReturn canStepReturn isObsolete getThread canStepReturn JDIThread getThread computeStackFrames isEmpty bottomFrame aboveObsoleteFrame bottomFrame indexOf JDIStackFrame isObsolete aboveObsoleteFrame bottomFrame aboveObsoleteFrame DebugException logError
Returns the underlying method associated with this stack frame retreiving the method is necessary public Method get Underlying Method throws Debug Exception synchronized f Thread if f Stack Frame null f Method null try f Method get Underlying Stack Frame location method f Last Method f Method catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving method new String e to String e NON NLS 1 return f Method  getUnderlyingMethod DebugException fThread fStackFrame fMethod fMethod getUnderlyingStackFrame fLastMethod fMethod RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_method toString fMethod
see I Stack Frame get Variables public I Variable get Variables throws Debug Exception List list get Variables0 return I Variable list to Array new I Variable list size  IStackFrame getVariables IVariable getVariables DebugException getVariables0 IVariable toArray IVariable
Collections sort f Variables new Comparator public int compare Object a Object b JDI Field Variable v1 JDI Field Variable a JDI Field Variable v2 JDI Field Variable b try return v1 get Name compare To Ignore Case v2 get Name catch Debug Exception de log Error de return 1  fVariables JDIFieldVariable JDIFieldVariable JDIFieldVariable JDIFieldVariable getName compareToIgnoreCase getName DebugException logError
protected List get Variables0 throws Debug Exception synchronized f Thread if f Variables null throw exception if native method so variable view will update with information message if is Native request Failed JDI Debug Model Messages get String JDI Stack Frame Variable information unavailable for native methods null NON NLS 1 Method method get Underlying Method f Variables new Array List is Static does not claim to throw any exceptions so it is not try catch coded if method is Static add statics List all Fields null Reference Type declaring Type method declaring Type try all Fields declaring Type all Fields catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving fields new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will throw an exception return Collections EMPTY LIST if all Fields null Iterator fields all Fields iterator while fields has Next Field field Field fields next if field is Static f Variables add new JDI Field Variable JDI Debug Target get Debug Target field declaring Type Collections sort f Variables new Comparator public int compare Object a Object b JDI Field Variable v1 JDI Field Variable a JDI Field Variable v2 JDI Field Variable b try return v1 get Name compare To Ignore Case v2 get Name catch Debug Exception de log Error de return 1 else add this Object Reference t get Underlying This Object if t null f Variables add new JDI This Variable JDI Debug Target get Debug Target t add locals Iterator variables get Underlying Visible Variables iterator while variables has Next Local Variable var Local Variable variables next f Variables add new JDI Local Variable this var else if f Refresh Variables update Variables f Refresh Variables false return f Variables  getVariables0 DebugException fThread fVariables isNative requestFailed JDIDebugModelMessages getString JDIStackFrame Variable_information_unavailable_for_native_methods getUnderlyingMethod fVariables ArrayList isStatic isStatic allFields ReferenceType declaringType declaringType allFields declaringType allFields RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_fields toString targetRequestFailed EMPTY_LIST allFields allFields hasNext isStatic fVariables JDIFieldVariable JDIDebugTarget getDebugTarget declaringType fVariables JDIFieldVariable JDIFieldVariable JDIFieldVariable JDIFieldVariable getName compareToIgnoreCase getName DebugException logError ObjectReference getUnderlyingThisObject fVariables JDIThisVariable JDIDebugTarget getDebugTarget getUnderlyingVisibleVariables hasNext LocalVariable LocalVariable fVariables JDILocalVariable fRefreshVariables updateVariables fRefreshVariables fVariables
see I Stack Frame get Name public String get Name throws Debug Exception return get Method Name  IStackFrame getName getName DebugException getMethodName
see I Java Stack Frame get Argument Type Names public List get Argument Type Names throws Debug Exception try return get Underlying Method argument Type Names catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving argument type names new String e to String e NON NLS 1 execution will never reach this line as target Request Failed will throw an exception return null  IJavaStackFrame getArgumentTypeNames getArgumentTypeNames DebugException getUnderlyingMethod argumentTypeNames RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_argument_type_names toString targetRequestFailed
see I Stack Frame get Line Number public int get Line Number throws Debug Exception if is Suspended try return get Underlying Stack Frame location line Number catch Runtime Exception e if get Thread is Suspended target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving line number new String e to String e NON NLS 1 return 1  IStackFrame getLineNumber getLineNumber DebugException isSuspended getUnderlyingStackFrame lineNumber RuntimeException getThread isSuspended targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_line_number toString
see I Step is Stepping public boolean is Stepping return get Thread is Stepping  IStep isStepping isStepping getThread isStepping
see I Suspend Resume is Suspended public boolean is Suspended return get Thread is Suspended  ISuspendResume isSuspended isSuspended getThread isSuspended
see I Suspend Resume resume public void resume throws Debug Exception get Thread resume  ISuspendResume DebugException getThread
see I Step step Into public void step Into throws Debug Exception if can Step Into return get Thread step Into  IStep stepInto stepInto DebugException canStepInto getThread stepInto
see I Step step Over public void step Over throws Debug Exception if can Step Over return if is Top Stack Frame get Thread step Over else JDI Thread get Thread step To Frame this  IStep stepOver stepOver DebugException canStepOver isTopStackFrame getThread stepOver JDIThread getThread stepToFrame
see I Step step Return public void step Return throws Debug Exception if can Step Return return if is Top Stack Frame get Thread step Return else List frames JDI Thread get Thread compute Stack Frames int index frames index Of this if index 0 index frames size 1 I Stack Frame next Frame I Stack Frame frames get index 1 JDI Thread get Thread step To Frame next Frame  IStep stepReturn stepReturn DebugException canStepReturn isTopStackFrame getThread stepReturn JDIThread getThread computeStackFrames indexOf IStackFrame nextFrame IStackFrame JDIThread getThread stepToFrame nextFrame
see I Suspend Resume suspend public void suspend throws Debug Exception get Thread suspend  ISuspendResume DebugException getThread
Incrementally updates this stack frames variables see JDI Debug Element target Request Failed String Runtime Exception protected void update Variables throws Debug Exception if f Variables null return Method method get Underlying Method int index 0 if method is Static update this Object Reference this Object try this Object get Underlying This Object catch Debug Exception exception if get Thread is Suspended this Object null else throw exception JDI This Variable old This Object null if f Variables is Empty f Variables get 0 instanceof JDI This Variable old This Object JDI This Variable f Variables get 0 if this Object null old This Object null removal of this f Variables remove 0 index 0 else if old This Object null this Object null creation of this old This Object new JDI This Variable JDI Debug Target get Debug Target this Object f Variables add 0 old This Object index 1 else if old This Object null this still exists replace with new this if a different receiver if old This Object retrieve Value equals this Object f Variables remove 0 f Variables add 0 new JDI This Variable JDI Debug Target get Debug Target this Object index 1 List locals null try locals get Underlying Stack Frame visible Variables catch Absent Information Exception e locals Collections EMPTY LIST catch Native Method Exception e locals Collections EMPTY LIST catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving visible variables new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will throw an exception return int local Index 1 while index f Variables size Object var f Variables get index if var instanceof JDI Local Variable JDI Local Variable local JDI Local Variable f Variables get index local Index locals index Of local get Local if local Index 0 update variable with new underling JDI Local Variable local set Local Local Variable locals get local Index locals remove local Index index else remove variable f Variables remove index else field variable of a static frame index add any new locals Iterator new Ones locals iterator while new Ones has Next JDI Local Variable local new JDI Local Variable this Local Variable new Ones next f Variables add local  JDIDebugElement targetRequestFailed RuntimeException updateVariables DebugException fVariables getUnderlyingMethod isStatic ObjectReference thisObject thisObject getUnderlyingThisObject DebugException getThread isSuspended thisObject JDIThisVariable oldThisObject fVariables isEmpty fVariables JDIThisVariable oldThisObject JDIThisVariable fVariables thisObject oldThisObject fVariables oldThisObject thisObject oldThisObject JDIThisVariable JDIDebugTarget getDebugTarget thisObject fVariables oldThisObject oldThisObject oldThisObject retrieveValue thisObject fVariables fVariables JDIThisVariable JDIDebugTarget getDebugTarget thisObject getUnderlyingStackFrame visibleVariables AbsentInformationException EMPTY_LIST NativeMethodException EMPTY_LIST RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_visible_variables toString targetRequestFailed localIndex fVariables fVariables JDILocalVariable JDILocalVariable JDILocalVariable fVariables localIndex indexOf getLocal localIndex LocalVariable setLocal LocalVariable localIndex localIndex fVariables newOnes newOnes hasNext JDILocalVariable JDILocalVariable LocalVariable newOnes fVariables
see I Java Stack Frame supports Drop To Frame public boolean supports Drop To Frame FIXME 1GH3XDA ITPDUI ALL Drop to frame hangs if after invoke JDI Thread thread JDI Thread get Thread JDI Debug Target target JDI Debug Target thread get Debug Target try if target is Available thread is Suspended thread is Terminated return false boolean j9 Support false boolean jdk Support target can Pop Frames Virtual Machine vm getVM if vm null return false try j9 Support thread get Underlying Thread instanceof org eclipse jdi hcr Thread Reference org eclipse jdi hcr Virtual Machine vm can Do Return catch Unsupported Operation Exception uoe j9 Support false if jdk Support j9 Support Also ensure that this frame and no frames above this frame are native Unable to pop native stack frames List frames thread compute Stack Frames if jdk Support JDK 1 4 V Ms are currently unable to pop the bottom stack frame if frames size 0 frames get frames size 1 this return false int index 0 JDI Stack Frame frame null while index frames size frame JDI Stack Frame frames get index index if frame is Native return false if frame equals this if jdk Support JDK 1 4 V Ms are currently unable to pop the frame directly above a native frame if index frames size JDI Stack Frame frames get index is Native return false return true return false catch Debug Exception e log Error e catch Unsupported Operation Exception e drop to frame not supported this is an expected exception for V Ms that do not support drop to frame return false catch Runtime Exception e internal Error e return false  IJavaStackFrame supportsDropToFrame supportsDropToFrame JDIThread JDIThread getThread JDIDebugTarget JDIDebugTarget getDebugTarget isAvailable isSuspended isTerminated j9Support jdkSupport canPopFrames VirtualMachine j9Support getUnderlyingThread ThreadReference VirtualMachine canDoReturn UnsupportedOperationException j9Support jdkSupport j9Support computeStackFrames jdkSupport VMs JDIStackFrame JDIStackFrame isNative jdkSupport VMs JDIStackFrame isNative DebugException logError UnsupportedOperationException VMs RuntimeException internalError
see I Java Stack Frame drop To Frame public void drop To Frame throws Debug Exception if supports Drop To Frame JDI Thread get Thread drop To Frame this else not Supported JDI Debug Model Messages get String JDI Stack Frame Drop to frame not supported NON NLS 1  IJavaStackFrame dropToFrame dropToFrame DebugException supportsDropToFrame JDIThread getThread dropToFrame notSupported JDIDebugModelMessages getString JDIStackFrame Drop_to_frame_not_supported
public void pop Frame throws Debug Exception if supports Drop To Frame JDI Thread get Thread pop Frame this else not Supported JDI Debug Model Messages get String JDI Stack Frame pop frame not supported NON NLS 1  popFrame DebugException supportsDropToFrame JDIThread getThread popFrame notSupported JDIDebugModelMessages getString JDIStackFrame pop_frame_not_supported
see I Java Stack Frame find Variable String public I Java Variable find Variable String var Name throws Debug Exception if is Native return null I Variable variables get Variables I Java Variable this Variable null for int i 0 i variables length i I Java Variable var I Java Variable variables i if var get Name equals var Name return var if var instanceof JDI This Variable save for later check for instance and static vars this Variable var if this Variable null I Variable this Children this Variable get Value get Variables for int i 0 i this Children length i I Java Variable var I Java Variable this Children i if var get Name equals var Name return var return null  IJavaStackFrame findVariable IJavaVariable findVariable varName DebugException isNative IVariable getVariables IJavaVariable thisVariable IJavaVariable IJavaVariable getName varName JDIThisVariable thisVariable thisVariable IVariable thisChildren thisVariable getValue getVariables thisChildren IJavaVariable IJavaVariable thisChildren getName varName
Retrieves visible variables in this stack frame handling any exceptions Returns an empty list if there are no variables see JDI Debug Element target Request Failed String Runtime Exception protected List get Underlying Visible Variables throws Debug Exception List variables Collections EMPTY LIST try variables get Underlying Stack Frame visible Variables catch Absent Information Exception e set Locals Available false catch Native Method Exception e set Locals Available false catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving visible variables 2 new String e to String e NON NLS 1 return variables  JDIDebugElement targetRequestFailed RuntimeException getUnderlyingVisibleVariables DebugException EMPTY_LIST getUnderlyingStackFrame visibleVariables AbsentInformationException setLocalsAvailable NativeMethodException setLocalsAvailable RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_visible_variables_2 toString
Retrieves this from the underlying stack frame Returns code null code for static stack frames see JDI Debug Element target Request Failed String Runtime Exception protected Object Reference get Underlying This Object throws Debug Exception if f Stack Frame null f This Object null is Static try f This Object get Underlying Stack Frame this Object catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving this new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will throw an exception return null return f This Object  JDIDebugElement targetRequestFailed RuntimeException ObjectReference getUnderlyingThisObject DebugException fStackFrame fThisObject isStatic fThisObject getUnderlyingStackFrame thisObject RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_this toString targetRequestFailed fThisObject
see I Adaptable get Adapter Class public Object get Adapter Class adapter if adapter I Java Stack Frame class adapter I Java Modifiers class return this return super get Adapter adapter  IAdaptable getAdapter getAdapter IJavaStackFrame IJavaModifiers getAdapter
see I Java Stack Frame get Signature public String get Signature throws Debug Exception try return get Underlying Method signature catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving method signature new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will throw an exception return null  IJavaStackFrame getSignature getSignature DebugException getUnderlyingMethod RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_method_signature toString targetRequestFailed
see I Java Stack Frame get Declaring Type Name public String get Declaring Type Name throws Debug Exception if f Stack Frame null f Declaring Type Name null try if is Obsolete f Declaring Type Name JDI Debug Model Messages get String JDI Stack Frame unknown declaring type  1 NON NLS 1 else f Declaring Type Name get Underlying Method declaring Type name catch Runtime Exception e if get Thread is Suspended target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving declaring type new String e to String e NON NLS 1 return JDI Debug Model Messages get String JDI Stack Frame unknown declaring type  1 NON NLS 1 return f Declaring Type Name  IJavaStackFrame getDeclaringTypeName getDeclaringTypeName DebugException fStackFrame fDeclaringTypeName isObsolete fDeclaringTypeName JDIDebugModelMessages getString JDIStackFrame unknown_declaring_type _1 fDeclaringTypeName getUnderlyingMethod declaringType RuntimeException getThread isSuspended targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_declaring_type toString JDIDebugModelMessages getString JDIStackFrame unknown_declaring_type _1 fDeclaringTypeName
see I Java Stack Frame get Receiving Type Name public String get Receiving Type Name throws Debug Exception if f Stack Frame null f Receiving Type Name null try if is Obsolete f Receiving Type Name JDI Debug Model Messages get String JDI Stack Frame unknown receiving type  2 NON NLS 1 else Object Reference this Object get Underlying This Object if this Object null f Receiving Type Name get Declaring Type Name else f Receiving Type Name this Object reference Type name catch Runtime Exception e if get Thread is Suspended target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving receiving type new String e to String e NON NLS 1 return JDI Debug Model Messages get String JDI Stack Frame unknown receiving type  2 NON NLS 1 return f Receiving Type Name  IJavaStackFrame getReceivingTypeName getReceivingTypeName DebugException fStackFrame fReceivingTypeName isObsolete fReceivingTypeName JDIDebugModelMessages getString JDIStackFrame unknown_receiving_type _2 ObjectReference thisObject getUnderlyingThisObject thisObject fReceivingTypeName getDeclaringTypeName fReceivingTypeName thisObject referenceType RuntimeException getThread isSuspended targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_receiving_type toString JDIDebugModelMessages getString JDIStackFrame unknown_receiving_type _2 fReceivingTypeName
see I Java Stack Frame get Method Name public String get Method Name throws Debug Exception try return get Underlying Method name catch Runtime Exception e if get Thread is Suspended target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving method name new String e to String e NON NLS 1 return JDI Debug Model Messages get String JDI Stack Frame unknown method  1 NON NLS 1  IJavaStackFrame getMethodName getMethodName DebugException getUnderlyingMethod RuntimeException getThread isSuspended targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_method_name toString JDIDebugModelMessages getString JDIStackFrame unknown_method _1
see I Java Stack Frame is Native public boolean is Native throws Debug Exception return get Underlying Method is Native  IJavaStackFrame isNative isNative DebugException getUnderlyingMethod isNative
see I Java Stack Frame is Constructor public boolean is Constructor throws Debug Exception return get Underlying Method is Constructor  IJavaStackFrame isConstructor isConstructor DebugException getUnderlyingMethod isConstructor
see I Java Stack Frame is Static Initializer public boolean is Static Initializer throws Debug Exception return get Underlying Method is Static Initializer  IJavaStackFrame isStaticInitializer isStaticInitializer DebugException getUnderlyingMethod isStaticInitializer
see I Java Modifiers is Final public boolean is Final throws Debug Exception return get Underlying Method is Final  IJavaModifiers isFinal isFinal DebugException getUnderlyingMethod isFinal
see I Java Stack Frame is Synchronized public boolean is Synchronized throws Debug Exception return get Underlying Method is Synchronized  IJavaStackFrame isSynchronized isSynchronized DebugException getUnderlyingMethod isSynchronized
see I Java Modifiers is Synthetic public boolean is Synthetic throws Debug Exception return get Underlying Method is Synthetic  IJavaModifiers isSynthetic isSynthetic DebugException getUnderlyingMethod isSynthetic
see I Java Modifiers is Public public boolean is Public throws Debug Exception return get Underlying Method is Public  IJavaModifiers isPublic isPublic DebugException getUnderlyingMethod isPublic
see I Java Modifiers is Private public boolean is Private throws Debug Exception return get Underlying Method is Private  IJavaModifiers isPrivate isPrivate DebugException getUnderlyingMethod isPrivate
see I Java Modifiers is Protected public boolean is Protected throws Debug Exception return get Underlying Method is Protected  IJavaModifiers isProtected isProtected DebugException getUnderlyingMethod isProtected
see I Java Modifiers is Package Private public boolean is Package Private throws Debug Exception return get Underlying Method is Package Private  IJavaModifiers isPackagePrivate isPackagePrivate DebugException getUnderlyingMethod isPackagePrivate
see I Java Modifiers is Static public boolean is Static throws Debug Exception return get Underlying Method is Static  IJavaModifiers isStatic isStatic DebugException getUnderlyingMethod isStatic
see I Java Stack Frame get Source Name public String get Source Name throws Debug Exception if f Stack Frame null f Source Name null try f Source Name get Underlying Stack Frame location source Name catch Absent Information Exception e f Source Name null catch Native Method Exception e f Source Name null catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving source name new String e to String e NON NLS 1 return f Source Name  IJavaStackFrame getSourceName getSourceName DebugException fStackFrame fSourceName fSourceName getUnderlyingStackFrame sourceName AbsentInformationException fSourceName NativeMethodException fSourceName RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_source_name toString fSourceName
protected boolean is Top Stack Frame throws Debug Exception I Stack Frame tos get Thread get Top Stack Frame return tos null tos equals this  isTopStackFrame DebugException IStackFrame getThread getTopStackFrame
Sets this stack frame to be out of synch Note that passing code true code to this method marks this stack frame as out of synch permanently statically public void set Out Of Synch boolean out Of Synch f Is Out Of Synch out Of Synch  setOutOfSynch outOfSynch fIsOutOfSynch outOfSynch
see I Java Stack Frame is Out Of Synch public boolean is Out Of Synch throws Debug Exception if f Is Out Of Synch return true if this frame s thread is not suspended the out of synch info cannot change until it suspends again if get Thread is Suspended JDI Debug Target target JDI Debug Target get Debug Target if target hasHCR Occurred target is Out Of Synch get Underlying Method declaring Type name return true return false  IJavaStackFrame isOutOfSynch isOutOfSynch DebugException fIsOutOfSynch getThread isSuspended JDIDebugTarget JDIDebugTarget getDebugTarget hasHCROccurred isOutOfSynch getUnderlyingMethod declaringType
see I Java Stack Frame is Obsolete public boolean is Obsolete throws Debug Exception if JDI Debug Plugin is Jdi Version Greater Than Or Equal new int 1 4 JDI Debug Target get Debug Target hasHCR Occurred If no hot code replace has occurred this frame cannot be obsolete return false if this frame s thread is not suspended the obsolete status cannot change until it suspends again if get Thread is Suspended try return get Underlying Method is Obsolete catch Runtime Exception re target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame Exception occurred determining if stack frame is obsolete 1 new String re to String re NON NLS 1 execution will not reach this line as target Request Failed will throw an exception return true return false  IJavaStackFrame isObsolete isObsolete DebugException JDIDebugPlugin isJdiVersionGreaterThanOrEqual JDIDebugTarget getDebugTarget hasHCROccurred getThread isSuspended getUnderlyingMethod isObsolete RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame Exception_occurred_determining_if_stack_frame_is_obsolete_1 toString targetRequestFailed
protected boolean exists throws Debug Exception return JDI Thread get Thread compute Stack Frames index Of this 1  DebugException JDIThread getThread computeStackFrames indexOf
see I Terminate can Terminate public boolean can Terminate boolean exists false try exists exists catch Debug Exception e log Error e return exists get Thread can Terminate get Debug Target can Terminate  ITerminate canTerminate canTerminate DebugException logError getThread canTerminate getDebugTarget canTerminate
see I Terminate is Terminated public boolean is Terminated return get Thread is Terminated  ITerminate isTerminated isTerminated getThread isTerminated
see I Terminate terminate public void terminate throws Debug Exception if get Thread can Terminate get Thread terminate else get Debug Target terminate  ITerminate DebugException getThread canTerminate getThread getDebugTarget
Returns this stack frame s underlying JDI frame exception Debug Exception if this stack frame does not currently have an underlying frame is in an interim state where this frame s thead has been resumed and is not yet suspended protected Stack Frame get Underlying Stack Frame throws Debug Exception synchronized f Thread if f Stack Frame null int depth get Depth if depth 1 if f Thread is Suspended re index stack frames See Bug 47198 f Thread compute Stack Frames depth get Depth if depth 1 If depth still 1 then this is an invalid frame throw new Debug Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status ERROR JDI Debug Model Messages get String JDI Stack Frame 25 null NON NLS 1 else throw new Debug Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Java Thread ERR THREAD NOT SUSPENDED JDI Debug Model Messages get String JDI Stack Frame 25 null NON NLS 1 set Underlying Stack Frame JDI Thread get Thread get Underlying Frame depth return f Stack Frame  DebugException StackFrame getUnderlyingStackFrame DebugException fThread fStackFrame getDepth fThread isSuspended fThread computeStackFrames getDepth DebugException IStatus JDIDebugPlugin getUniqueIdentifier IStatus JDIDebugModelMessages getString JDIStackFrame DebugException IStatus JDIDebugPlugin getUniqueIdentifier IJavaThread ERR_THREAD_NOT_SUSPENDED JDIDebugModelMessages getString JDIStackFrame setUnderlyingStackFrame JDIThread getThread getUnderlyingFrame fStackFrame
Sets the underlying JDI Stack Frame Called by a thread when incrementally updating after a step has completed param frame The underlying stack frame protected void set Underlying Stack Frame Stack Frame frame synchronized f Thread f Stack Frame frame if frame null f Depth 1 f Refresh Variables true  StackFrame setUnderlyingStackFrame StackFrame fThread fStackFrame fDepth fRefreshVariables
The underlying method that existed before the current underlying method Used only so that equality can be checked on stack frame after the new one has been set protected Method get Last Method return f Last Method  getLastMethod fLastMethod
protected void set Thread JDI Thread thread f Thread thread  setThread JDIThread fThread
protected void set Variables List variables f Variables variables  setVariables fVariables
see I Java Stack Frame get Local Variables public I Java Variable get Local Variables throws Debug Exception List list get Underlying Visible Variables I Java Variable locals new I Java Variable list size for int i 0 i list size i locals i new JDI Local Variable this Local Variable list get i return locals  IJavaStackFrame getLocalVariables IJavaVariable getLocalVariables DebugException getUnderlyingVisibleVariables IJavaVariable IJavaVariable JDILocalVariable LocalVariable
see I Java Stack Frame get This public I Java Object get This throws Debug Exception I Java Object receiver null if is Static Object Reference this Object get Underlying This Object if this Object null receiver I Java Object JDI Value create Value JDI Debug Target get Debug Target this Object return receiver  IJavaStackFrame getThis IJavaObject getThis DebugException IJavaObject isStatic ObjectReference thisObject getUnderlyingThisObject thisObject IJavaObject JDIValue createValue JDIDebugTarget getDebugTarget thisObject
Java stack frames do not support registers see I Stack Frame get Register Groups public I Register Group get Register Groups return new I Register Group 0  IStackFrame getRegisterGroups IRegisterGroup getRegisterGroups IRegisterGroup
see I Java Stack Frame get Declaring Type public I Java Class Type get Declaring Type throws Debug Exception Method method get Underlying Method try Type type method declaring Type return I Java Class Type JDI Type create Type JDI Debug Target get Debug Target type catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retreiving declaring type new String e to String e NON NLS 1 return null  IJavaStackFrame getDeclaringType IJavaClassType getDeclaringType DebugException getUnderlyingMethod declaringType IJavaClassType JDIType createType JDIDebugTarget getDebugTarget RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retreiving_declaring_type toString
Expression level stepping not supported see I Stack Frame get Char End public int get Char End return 1  IStackFrame getCharEnd getCharEnd
Expression level stepping not supported see I Stack Frame get Char Start public int get Char Start return 1  IStackFrame getCharStart getCharStart
Clears the cached data of this stack frame The underlying stack frame has changed in such a way that the cached data may not be valid private void clear Cached Data f Method null f This Object null f Declaring Type Name null f Receiving Type Name null f Source Name null  clearCachedData fMethod fThisObject fDeclaringTypeName fReceivingTypeName fSourceName
see I Java Stack Frame were Locals Available public boolean were Locals Available return f Locals Available  IJavaStackFrame wereLocalsAvailable wereLocalsAvailable fLocalsAvailable
Sets whether locals were available If the setting is not the same as the current value a change event is fired such that a UI client can update param available whether local variable information is available for this stack frame private void set Locals Available boolean available if available f Locals Available f Locals Available available fire Change Event Debug Event STATE  setLocalsAvailable fLocalsAvailable fLocalsAvailable fireChangeEvent DebugEvent
see I Stack Frame has Register Groups public boolean has Register Groups return false  IStackFrame hasRegisterGroups hasRegisterGroups
see I Stack Frame has Variables public boolean has Variables throws Debug Exception return get Variables0 size 0  IStackFrame hasVariables hasVariables DebugException getVariables0
see org eclipse debug core model I Filtered Step can Step With Filters public boolean can Step With Filters if can Step Into String filters get Java Debug Target get Step Filters return filters null filters length 0 return false  IFilteredStep canStepWithFilters canStepWithFilters canStepInto getJavaDebugTarget getStepFilters
see org eclipse debug core model I Filtered Step step With Filters public void step With Filters throws Debug Exception I Java Thread get Thread step With Filters  IFilteredStep stepWithFilters stepWithFilters DebugException IJavaThread getThread stepWithFilters
see org eclipse jdt debug core I Java Stack Frame get Source Path java lang String public String get Source Path String stratum throws Debug Exception try return get Underlying Stack Frame location source Path stratum catch Absent Information Exception e catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving source path new String e to String e NON NLS 1 return null  IJavaStackFrame getSourcePath getSourcePath DebugException getUnderlyingStackFrame sourcePath AbsentInformationException RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_source_path toString
see org eclipse jdt debug core I Java Stack Frame get Source Path public String get Source Path throws Debug Exception try return get Underlying Stack Frame location source Path catch Absent Information Exception e catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving source path new String e to String e NON NLS 1 return null  IJavaStackFrame getSourcePath getSourcePath DebugException getUnderlyingStackFrame sourcePath AbsentInformationException RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_source_path toString
public int get Line Number String stratum throws Debug Exception if is Suspended try return get Underlying Stack Frame location line Number stratum catch Runtime Exception e if get Thread is Suspended target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving line number new String e to String e NON NLS 1 return 1  getLineNumber DebugException isSuspended getUnderlyingStackFrame lineNumber RuntimeException getThread isSuspended targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_line_number toString
public String get Source Name String stratum throws Debug Exception try return get Underlying Stack Frame location source Name stratum catch Absent Information Exception e catch Native Method Exception e catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Stack Frame exception retrieving source name new String e to String e NON NLS 1 return null  getSourceName DebugException getUnderlyingStackFrame sourceName AbsentInformationException NativeMethodException RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIStackFrame exception_retrieving_source_name toString

Constructs a variable representing this in a stack frame public JDI This Variable JDI Debug Target target Object Reference object super target f Object object  JDIThisVariable JDIDebugTarget ObjectReference fObject
Returns this variable s current Value protected Value retrieve Value return f Object  retrieveValue fObject
see I Variable get Name public String get Name return this NON NLS 1  IVariable getName getName
see I Java Variable get Signature public String get Signature throws Debug Exception try return retrieve Value type signature catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDIThisVariableexception retrieving type signature new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null  IJavaVariable getSignature getSignature DebugException retrieveValue RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThisVariableexception_retrieving_type_signature toString targetRequestFailed
see I Variable get Reference Type Name public String get Reference Type Name throws Debug Exception try return get Value get Reference Type Name catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDIThisVariableexception retrieving reference type name new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null  IVariable getReferenceTypeName getReferenceTypeName DebugException getValue getReferenceTypeName RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThisVariableexception_retrieving_reference_type_name toString targetRequestFailed
see JDI Variable get Underlying Type protected Type get Underlying Type throws Debug Exception try return retrieve Value type catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI This Variable exception while retrieving type this new String e to String e NON NLS 1 this line will not be exceucted as an exception will be throw in type retrieval fails return null  JDIVariable getUnderlyingType getUnderlyingType DebugException retrieveValue RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThisVariable exception_while_retrieving_type_this toString
see org eclipse jdt debug core I Java Modifiers is Private public boolean is Private throws Debug Exception try return Reference Type get Underlying Type is Private catch Runtime Exception e target Request Failed JDI Debug Model Messages get String JDI This Variable Exception occurred while retrieving modifiers  1 e NON NLS 1 this line will not be exceucted as an exception will be throw return false  IJavaModifiers isPrivate isPrivate DebugException ReferenceType getUnderlyingType isPrivate RuntimeException targetRequestFailed JDIDebugModelMessages getString JDIThisVariable Exception_occurred_while_retrieving_modifiers _1
see org eclipse jdt debug core I Java Modifiers is Protected public boolean is Protected throws Debug Exception try return Reference Type get Underlying Type is Protected catch Runtime Exception e target Request Failed JDI Debug Model Messages get String JDI This Variable Exception occurred while retrieving modifiers  1 e NON NLS 1 this line will not be exceucted as an exception will be throw return false  IJavaModifiers isProtected isProtected DebugException ReferenceType getUnderlyingType isProtected RuntimeException targetRequestFailed JDIDebugModelMessages getString JDIThisVariable Exception_occurred_while_retrieving_modifiers _1
see org eclipse jdt debug core I Java Modifiers is Public public boolean is Public throws Debug Exception try return Reference Type get Underlying Type is Public catch Runtime Exception e target Request Failed JDI Debug Model Messages get String JDI This Variable Exception occurred while retrieving modifiers  1 e NON NLS 1 this line will not be exceucted as an exception will be throw return false  IJavaModifiers isPublic isPublic DebugException ReferenceType getUnderlyingType isPublic RuntimeException targetRequestFailed JDIDebugModelMessages getString JDIThisVariable Exception_occurred_while_retrieving_modifiers _1
see java lang Object equals Object public boolean equals Object o if o instanceof JDI This Variable return JDI This Variable o f Object equals f Object return false  JDIThisVariable JDIThisVariable fObject fObject
see java lang Object hash Code public int hash Code return f Object hash Code  hashCode hashCode fObject hashCode

Creates a new thread on the underlying thread reference in the given debug target param target the debug target in which this thread is contained param thread the underlying thread on the VM exception Object Collected Exception if the underlying thread has been garbage collected and cannot be properly initialized public JDI Thread JDI Debug Target target Thread Reference thread throws Object Collected Exception super target set Underlying Thread thread initialize  ObjectCollectedException JDIThread JDIDebugTarget ThreadReference ObjectCollectedException setUnderlyingThread
Thread initialization ul li Determines if this thread is a system thread li li Sets terminated state to code false code li li Determines suspended state from underlying thread li li Sets this threads stack frames to an empty collection li ul exception Object Collected Exception if the thread has been garbage collected and cannot be initialized protected void initialize throws Object Collected Exception f Stack Frames Collections EMPTY LIST system thread try determine If System Thread catch Debug Exception e Throwable underlying Exception e get Status get Exception if underlying Exception instanceof VM Disconnected Exception Threads may be created by the VM at shutdown as finalizers The VM may be disconnected by the time we hear about the thread creation disconnected return if underlying Exception instanceof Object Collected Exception throw Object Collected Exception underlying Exception log Error e state set Terminated false set Running false try see bug 30816 if get Underlying Thread status Thread Reference THREAD STATUS UNKNOWN set Running true return catch VM Disconnected Exception e disconnected return catch Object Collected Exception e throw e catch Runtime Exception e log Error e try set Running get Underlying Thread is Suspended catch VM Disconnected Exception e disconnected return catch Object Collected Exception e throw e catch Runtime Exception e log Error e  ObjectCollectedException ObjectCollectedException fStackFrames EMPTY_LIST determineIfSystemThread DebugException underlyingException getStatus getException underlyingException VMDisconnectedException underlyingException ObjectCollectedException ObjectCollectedException underlyingException logError setTerminated setRunning getUnderlyingThread ThreadReference THREAD_STATUS_UNKNOWN setRunning VMDisconnectedException ObjectCollectedException RuntimeException logError setRunning getUnderlyingThread isSuspended VMDisconnectedException ObjectCollectedException RuntimeException logError
Adds the given breakpoint to the list of breakpoints this thread is suspended at protected void add Current Breakpoint I Breakpoint bp f Current Breakpoints add bp  addCurrentBreakpoint IBreakpoint fCurrentBreakpoints
Removes the given breakpoint from the list of breakpoints this thread is suspended at called when a breakpoint is deleted in case we are suspended at that breakpoint protected void remove Current Breakpoint I Breakpoint bp f Current Breakpoints remove bp  removeCurrentBreakpoint IBreakpoint fCurrentBreakpoints
see org eclipse debug core model I Thread get Breakpoints public I Breakpoint get Breakpoints return I Breakpoint f Current Breakpoints to Array new I Breakpoint f Current Breakpoints size  IThread getBreakpoints IBreakpoint getBreakpoints IBreakpoint fCurrentBreakpoints toArray IBreakpoint fCurrentBreakpoints
see I Suspend Resume can Resume public boolean can Resume return is Suspended is Suspended Quiet is Performing Evaluation is Invoking Method  ISuspendResume canResume canResume isSuspended isSuspendedQuiet isPerformingEvaluation isInvokingMethod
see I Suspend Resume can Suspend public boolean can Suspend return is Suspended is Suspended Quiet is Performing Evaluation is Invoking Method  ISuspendResume canSuspend canSuspend isSuspended isSuspendedQuiet isPerformingEvaluation isInvokingMethod
see I Terminate can Terminate public boolean can Terminate return get Debug Target can Terminate  ITerminate canTerminate canTerminate getDebugTarget canTerminate
see I Step can Step Into public boolean can Step Into return can Step  IStep canStepInto canStepInto canStep
see I Step can Step Over public boolean can Step Over return can Step  IStep canStepOver canStepOver canStep
see I Step can Step Return public boolean can Step Return return can Step  IStep canStepReturn canStepReturn canStep
Returns whether this thread is in a valid state to step return whether this thread is in a valid state to step protected boolean can Step try return is Suspended is Suspended Quiet is Performing Evaluation is Invoking Method is Stepping get Top Stack Frame null get Java Debug Target is Performing Hot Code Replace catch Debug Exception e return false  canStep isSuspended isSuspendedQuiet isPerformingEvaluation isInvokingMethod isStepping getTopStackFrame getJavaDebugTarget isPerformingHotCodeReplace DebugException
Determines and sets whether this thread represents a system thread exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected void determine If System Thread throws Debug Exception f Is System Thread false Thread Group Reference tgr get Underlying Thread Group f Is System Thread tgr null while tgr null String tgn null try tgn tgr name tgr tgr parent catch Unsupported Operation Exception e f Is System Thread false break catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception determining if system thread new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will throw an exception return if tgn null tgn equals MAIN THREAD GROUP f Is System Thread false break  DebugException DebugException determineIfSystemThread DebugException fIsSystemThread ThreadGroupReference getUnderlyingThreadGroup fIsSystemThread UnsupportedOperationException fIsSystemThread RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_determining_if_system_thread toString targetRequestFailed MAIN_THREAD_GROUP fIsSystemThread
NOTE this method returns a copy of this thread s stack frames see I Thread get Stack Frames public I Stack Frame get Stack Frames throws Debug Exception if is Suspended Quiet return new I Stack Frame 0 List list compute Stack Frames return I Stack Frame list to Array new I Stack Frame list size  IThread getStackFrames IStackFrame getStackFrames DebugException isSuspendedQuiet IStackFrame computeStackFrames IStackFrame toArray IStackFrame
see compute Stack Frames param refresh Children whether or not this method should request new stack frames from the VM protected synchronized List compute Stack Frames boolean refresh Children throws Debug Exception if is Suspended if is Terminated f Stack Frames Collections EMPTY LIST else if refresh Children if f Stack Frames is Empty f Stack Frames create All Stack Frames if f Stack Frames is Empty leave f Refresh Children true bug 6393 return f Stack Frames int stack Size get Underlying Frame Count Determine whether to preserve frame objects If the stack is now deeper compare the old TOS with the frame in the equivalent position on the current stack If the stack is now shorter compare the current TOS with the frame in the equivalent position in the old stack boolean preserve false int curr Index 1 int old Index 1 if stack Size f Stack Frames size old Index 0 curr Index stack Size f Stack Frames size else if stack Size 0 is the TOS equal to a method futher down the stack in same position old Index f Stack Frames size stack Size curr Index 0 if curr Index 0 old Index 0 Method last Method JDI Stack Frame f Stack Frames get old Index get Last Method Method curr Method get Underlying Frame curr Index location method if last Method null curr Method equals last Method method still in same position preserve true if preserve compute new or removed stack frames int offset 0 length stack Size if length f Stack Frames size add new frames to the top of the stack preserve bottom up offset length f Stack Frames size for int i offset 1 i 0 i JDI Stack Frame new Stack Frame new JDI Stack Frame this 0 f Stack Frames add 0 new Stack Frame length f Stack Frames size offset else if length f Stack Frames size int removed f Stack Frames size length remove frames from the top of the stack preserve bottom up for int i 0 i removed i f Stack Frames remove 0 update frame indicies to update stack frames for int i 0 i stack Size i JDI Stack Frame f Stack Frames get i set Depth i else If we re not preserving stack frames set all old frame indices to 1 This allows obsolete stack frames to shortcut methods For example when a background label provider asks them for information after they re obsolete See Bug 47198 Iterator iter f Stack Frames iterator while iter has Next JDI Stack Frame frame JDI Stack Frame iter next frame set Depth 1 f Stack Frames create All Stack Frames f Refresh Children false else return Collections EMPTY LIST return f Stack Frames  computeStackFrames refreshChildren computeStackFrames refreshChildren DebugException isSuspended isTerminated fStackFrames EMPTY_LIST refreshChildren fStackFrames isEmpty fStackFrames createAllStackFrames fStackFrames isEmpty fRefreshChildren fStackFrames stackSize getUnderlyingFrameCount currIndex oldIndex stackSize fStackFrames oldIndex currIndex stackSize fStackFrames stackSize oldIndex fStackFrames stackSize currIndex currIndex oldIndex lastMethod JDIStackFrame fStackFrames oldIndex getLastMethod currMethod getUnderlyingFrame currIndex lastMethod currMethod lastMethod stackSize fStackFrames fStackFrames JDIStackFrame newStackFrame JDIStackFrame fStackFrames newStackFrame fStackFrames fStackFrames fStackFrames fStackFrames stackSize JDIStackFrame fStackFrames setDepth fStackFrames hasNext JDIStackFrame JDIStackFrame setDepth fStackFrames createAllStackFrames fRefreshChildren EMPTY_LIST fStackFrames
Returns this thread s current stack frames as a list computing them if required Returns an empty collection if this thread is not currently suspended or this thread is terminated This method should be used internally to get the current stack frames instead of calling code get Stack Frames code which makes a copy of the current list p Before a thread is resumed a call must be made to one of ul li code preserve Stack Frames code li li code dispose Stack Frames code li ul If stack frames are disposed before a thread is resumed stack frames are completely re computed on the next call to this method If stack frames are to be preserved this method will attempt to re use any stack frame objects which represent the same stack frame as on the previous suspend Stack frames are cached until a subsequent call to preserve or dispose stack frames p return list of code I Java Stack Frame code exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul public synchronized List compute Stack Frames throws Debug Exception return compute Stack Frames f Refresh Children  getStackFrames preserveStackFrames disposeStackFrames IJavaStackFrame DebugException DebugException computeStackFrames DebugException computeStackFrames fRefreshChildren
see JDI Thread compute Stack Frames This method differs from compute Stack Frames in that it always requests new stack frames from the VM As this is an expensive operation this method should only be used by clients who know for certain that the stack frames on the VM have changed public List compute New Stack Frames throws Debug Exception return compute Stack Frames true  JDIThread computeStackFrames computeStackFrames computeNewStackFrames DebugException computeStackFrames
Helper method for code compute Stack Frames code to create all underlying stack frames exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected List create All Stack Frames throws Debug Exception int stack Size get Underlying Frame Count List list new Array List stack Size for int i 0 i stack Size i JDI Stack Frame new Stack Frame new JDI Stack Frame this i list add new Stack Frame return list  computeStackFrames DebugException DebugException createAllStackFrames DebugException stackSize getUnderlyingFrameCount ArrayList stackSize stackSize JDIStackFrame newStackFrame JDIStackFrame newStackFrame
Retrieves and returns the underlying stack frame at the specified depth return stack frame exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected Stack Frame get Underlying Frame int depth throws Debug Exception if is Suspended Checking is Suspended here eliminates a race condition in resume between the time stack frames are preserved and the time the underlying thread is actually resumed request Failed JDI Debug Model Messages get String JDI Thread Unable to retrieve stack frame   thread not suspended  1 null I Java Thread ERR THREAD NOT SUSPENDED NON NLS 1 try return get Underlying Thread frame depth catch Incompatible Thread State Exception e request Failed JDI Debug Model Messages get String JDI Thread Unable to retrieve stack frame   thread not suspended  1 e I Java Thread ERR THREAD NOT SUSPENDED NON NLS 1 catch Index Out Of Bounds Exception e try compute New Stack Frames catch Debug Exception de fire Change Event Debug Event CONTENT request Failed JDI Debug Model Messages get String JDI Thread 41 e NON NLS 1 catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception retrieving stack frames 2 new String e to String e NON NLS 1 catch Internal Error e target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception retrieving stack frames 2 new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null  DebugException DebugException StackFrame getUnderlyingFrame DebugException isSuspended isSuspended requestFailed JDIDebugModelMessages getString JDIThread Unable_to_retrieve_stack_frame_ _thread_not_suspended _1 IJavaThread ERR_THREAD_NOT_SUSPENDED getUnderlyingThread IncompatibleThreadStateException requestFailed JDIDebugModelMessages getString JDIThread Unable_to_retrieve_stack_frame_ _thread_not_suspended _1 IJavaThread ERR_THREAD_NOT_SUSPENDED IndexOutOfBoundsException computeNewStackFrames DebugException fireChangeEvent DebugEvent requestFailed JDIDebugModelMessages getString JDIThread RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_retrieving_stack_frames_2 toString InternalError targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_retrieving_stack_frames_2 toString targetRequestFailed
Returns the underlying method for the given stack frame param frame an underlying JDI stack frame return underlying method exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected Method get Underlying Method Stack Frame frame throws Debug Exception try return frame location method catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception retrieving method new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null  DebugException DebugException getUnderlyingMethod StackFrame DebugException RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_retrieving_method toString targetRequestFailed
Returns the number of frames on the stack from the underlying thread return number of frames on the stack exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This thread is not suspended li ul protected int get Underlying Frame Count throws Debug Exception try return get Underlying Thread frame Count catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception retrieving frame count new String e to String e NON NLS 1 catch Incompatible Thread State Exception e request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception retrieving frame count new String e to String e I Java Thread ERR THREAD NOT SUSPENDED NON NLS 1 execution will not reach here try block will either return or exception will be thrown return 1  DebugException DebugException getUnderlyingFrameCount DebugException getUnderlyingThread frameCount RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_retrieving_frame_count toString IncompatibleThreadStateException requestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_retrieving_frame_count toString IJavaThread ERR_THREAD_NOT_SUSPENDED
see I Java Thread run Evaluation I Evaluation Runnable I Progress Monitor int boolean public void run Evaluation I Evaluation Runnable evaluation I Progress Monitor monitor int evaluation Detail boolean hit Breakpoints throws Debug Exception if is Performing Evaluation request Failed JDI Debug Model Messages get String JDI Thread Cannot perform nested evaluations null I Java Thread ERR NESTED METHOD INVOCATION NON NLS 1 if can Run Evaluation request Failed JDI Debug Model Messages get String JDI Thread Evaluation failed   thread not suspended null I Java Thread ERR THREAD NOT SUSPENDED NON NLS 1 f Is Performing Evaluation true f Evaluation Runnable evaluation f Honor Breakpoints hit Breakpoints fire Resume Event evaluation Detail save and restore current breakpoint information bug 30837 I Breakpoint breakpoints get Breakpoints try evaluation run this monitor catch Debug Exception e throw e finally f Is Performing Evaluation false f Evaluation Runnable null f Honor Breakpoints true if get Breakpoints length 0 breakpoints length 0 for int i 0 i breakpoints length i add Current Breakpoint breakpoints i fire Suspend Event evaluation Detail if f Evaluation Interrupted f Async Job null f Async Job is Empty f Running Async Job null f Running Async Job is Empty see bug 31585 When an evaluation was interrupted resumed the launch view does not update properly It cannot know when it is safe to display frames since it does not know about queued evaluations Thus when the queue is empty we fire a change event to force the view to update f Evaluation Interrupted false fire Change Event Debug Event CONTENT  IJavaThread runEvaluation IEvaluationRunnable IProgressMonitor runEvaluation IEvaluationRunnable IProgressMonitor evaluationDetail hitBreakpoints DebugException isPerformingEvaluation requestFailed JDIDebugModelMessages getString JDIThread Cannot_perform_nested_evaluations IJavaThread ERR_NESTED_METHOD_INVOCATION canRunEvaluation requestFailed JDIDebugModelMessages getString JDIThread Evaluation_failed_ _thread_not_suspended IJavaThread ERR_THREAD_NOT_SUSPENDED fIsPerformingEvaluation fEvaluationRunnable fHonorBreakpoints hitBreakpoints fireResumeEvent evaluationDetail IBreakpoint getBreakpoints DebugException fIsPerformingEvaluation fEvaluationRunnable fHonorBreakpoints getBreakpoints addCurrentBreakpoint fireSuspendEvent evaluationDetail fEvaluationInterrupted fAsyncJob fAsyncJob isEmpty fRunningAsyncJob fRunningAsyncJob isEmpty fEvaluationInterrupted fireChangeEvent DebugEvent
Returns whether this thread is in a valid state to run an evaluation return whether this thread is in a valid state to run an evaluation protected boolean can Run Evaluation NOTE similar to can Step except a quiet suspend state is OK try return is Suspended Quiet is Suspended is Performing Evaluation is Invoking Method is Stepping get Top Stack Frame null get Java Debug Target is Performing Hot Code Replace catch Debug Exception e return false  canRunEvaluation canStep isSuspendedQuiet isSuspended isPerformingEvaluation isInvokingMethod isStepping getTopStackFrame getJavaDebugTarget isPerformingHotCodeReplace DebugException
see org eclipse jdt debug core I Java Thread queue Runnable Runnable public void queue Runnable Runnable evaluation if f Async Job null f Async Job new Thread Job this f Async Job add Runnable evaluation  IJavaThread queueRunnable queueRunnable fAsyncJob fAsyncJob ThreadJob fAsyncJob addRunnable
see I Java Thread terminate Evaluation public void terminate Evaluation throws Debug Exception if can Terminate Evaluation I Terminate f Evaluation Runnable terminate  IJavaThread terminateEvaluation terminateEvaluation DebugException canTerminateEvaluation ITerminate fEvaluationRunnable
see I Java Thread can Terminate Evaluation public boolean can Terminate Evaluation return f Evaluation Runnable instanceof I Terminate  IJavaThread canTerminateEvaluation canTerminateEvaluation fEvaluationRunnable ITerminate
Invokes a method on the target in this thread and returns the result Only one receiver may be specified either a class or an object the other must be code null code This thread is left suspended after the invocation is complete unless a call is made to code abort Evaluation code while performing a method invocation In that case this thread is automatically resumed when if this invocation eventually completes p Method invocations cannot be nested That is this method must return before another call to this method can be made This method does not return until the invocation is complete Breakpoints can suspend a method invocation and it is possible that an invocation will not complete due to an infinite loop or deadlock p p Stack frames are preserved during method invocations unless a timeout occurs Although this thread s state is updated to running while performing an evaluation no debug events are fired unless this invocation is interrupted by a breakpoint or the invocation times out p p When performing an invocation the communication timeout with the target VM is set to infinite as the invocation may not complete in a timely fashion if at all The timeout value is reset to its original value when the invocation completes p param receiver Class the class in the target representing the receiver of a static message send or code null code param receiver Object the object in the target to be the receiver of the message send or code null code param method the underlying method to be invoked param args the arguments to invoke the method with an empty list if none return the result of the method as an underlying value exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li This thread is not suspended status code code I Java Thread ERR THREAD NOT SUSPENDED code li li This thread is already invoking a method status code code I Java Thread ERR NESTED METHOD INVOCATION code li li This thread is not suspended by a JDI request status code code I Java Thread ERR INCOMPATIBLE THREAD STATE code li ul protected Value invoke Method Class Type receiver Class Object Reference receiver Object Method method List args boolean invoke Nonvirtual throws Debug Exception if receiver Class null receiver Object null throw new Illegal Argument Exception JDI Debug Model Messages get String JDI Thread can only specify one receiver for a method invocation NON NLS 1 Value result null int timeout get Request Timeout try this is synchronized such that any other operation that might be resuming this thread has a chance to complete before we determine if it is safe to continue with a method invocation See bugs 6518 14069 synchronized this if is Suspended request Failed JDI Debug Model Messages get String JDI Thread Evaluation failed   thread not suspended null I Java Thread ERR THREAD NOT SUSPENDED NON NLS 1 if is Invoking Method request Failed JDI Debug Model Messages get String JDI Thread Cannot perform nested evaluations null I Java Thread ERR NESTED METHOD INVOCATION NON NLS 1 set the request timeout to be infinite set Request Timeout Integer MAX VALUE set Running true set Invoking Method true preserve Stack Frames int flags Class Type INVOKE SINGLE THREADED if invoke Nonvirtual Superclass method invocation must be performed nonvirtual flags Object Reference INVOKE NONVIRTUAL if receiver Class null result receiver Object invoke Method get Underlying Thread method args flags else result receiver Class invoke Method get Underlying Thread method args flags catch Invalid Type Exception e invoke Failed e timeout catch Class Not Loaded Exception e invoke Failed e timeout catch Incompatible Thread State Exception e invoke Failed JDI Debug Model Messages get String JDI Thread Thread must be suspended by step or breakpoint to perform method invocation 1 I Java Thread ERR INCOMPATIBLE THREAD STATE e timeout NON NLS 1 catch Invocation Exception e invoke Failed e timeout catch Runtime Exception e invoke Failed e timeout invoke Complete timeout return result  abortEvaluation receiverClass receiverObject DebugException DebugException IJavaThread ERR_THREAD_NOT_SUSPENDED IJavaThread ERR_NESTED_METHOD_INVOCATION IJavaThread ERR_INCOMPATIBLE_THREAD_STATE invokeMethod ClassType receiverClass ObjectReference receiverObject invokeNonvirtual DebugException receiverClass receiverObject IllegalArgumentException JDIDebugModelMessages getString JDIThread can_only_specify_one_receiver_for_a_method_invocation getRequestTimeout isSuspended requestFailed JDIDebugModelMessages getString JDIThread Evaluation_failed_ _thread_not_suspended IJavaThread ERR_THREAD_NOT_SUSPENDED isInvokingMethod requestFailed JDIDebugModelMessages getString JDIThread Cannot_perform_nested_evaluations IJavaThread ERR_NESTED_METHOD_INVOCATION setRequestTimeout MAX_VALUE setRunning setInvokingMethod preserveStackFrames ClassType INVOKE_SINGLE_THREADED invokeNonvirtual ObjectReference INVOKE_NONVIRTUAL receiverClass receiverObject invokeMethod getUnderlyingThread receiverClass invokeMethod getUnderlyingThread InvalidTypeException invokeFailed ClassNotLoadedException invokeFailed IncompatibleThreadStateException invokeFailed JDIDebugModelMessages getString JDIThread Thread_must_be_suspended_by_step_or_breakpoint_to_perform_method_invocation_1 IJavaThread ERR_INCOMPATIBLE_THREAD_STATE InvocationException invokeFailed RuntimeException invokeFailed invokeComplete
Invokes a constructor in this thread creating a new instance of the given class and returns the result as an object reference This thread is left suspended after the invocation is complete p Method invocations cannot be nested That is this method must return before another call to this method can be made This method does not return until the invocation is complete Breakpoints can suspend a method invocation and it is possible that an invocation will not complete due to an infinite loop or deadlock p p Stack frames are preserved during method invocations unless a timeout occurs Although this thread s state is updated to running while performing an evaluation no debug events are fired unless this invocation is interrupted by a breakpoint or the invocation times out p p When performing an invocation the communication timeout with the target VM is set to infinite as the invocation may not complete in a timely fashion if at all The timeout value is reset to its original value when the invocation completes p param receiver Class the class in the target representing the receiver of the new message send param constructor the underlying constructor to be invoked param args the arguments to invoke the constructor with an empty list if none return a new object reference exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected Object Reference new Instance Class Type receiver Class Method constructor List args throws Debug Exception if is Invoking Method request Failed JDI Debug Model Messages get String JDI Thread Cannot perform nested evaluations 2 null NON NLS 1 Object Reference result null int timeout get Request Timeout try set the request timeout to be infinite set Request Timeout Integer MAX VALUE set Running true set Invoking Method true preserve Stack Frames result receiver Class new Instance get Underlying Thread constructor args Class Type INVOKE SINGLE THREADED catch Invalid Type Exception e invoke Failed e timeout catch Class Not Loaded Exception e invoke Failed e timeout catch Incompatible Thread State Exception e invoke Failed e timeout catch Invocation Exception e invoke Failed e timeout catch Runtime Exception e invoke Failed e timeout invoke Complete timeout return result  receiverClass DebugException DebugException ObjectReference newInstance ClassType receiverClass DebugException isInvokingMethod requestFailed JDIDebugModelMessages getString JDIThread Cannot_perform_nested_evaluations_2 ObjectReference getRequestTimeout setRequestTimeout MAX_VALUE setRunning setInvokingMethod preserveStackFrames receiverClass newInstance getUnderlyingThread ClassType INVOKE_SINGLE_THREADED InvalidTypeException invokeFailed ClassNotLoadedException invokeFailed IncompatibleThreadStateException invokeFailed InvocationException invokeFailed RuntimeException invokeFailed invokeComplete
Called when an invocation fails Performs cleanup and throws an exception param e the exception that caused the failure param restore Timeout the communication timeout value in milliseconds that should be reset see invoke Complete int exception Debug Exception Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected void invoke Failed Throwable e int restore Timeout throws Debug Exception invoke Failed Message Format format JDI Debug Model Messages get String JDI Thread exception invoking method new String e to String Debug Exception TARGET REQUEST FAILED e restore Timeout NON NLS 1  restoreTimeout invokeComplete DebugException DebugException invokeFailed restoreTimeout DebugException invokeFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_invoking_method toString DebugException TARGET_REQUEST_FAILED restoreTimeout
Called when an invocation fails Performs cleanup and throws an exception param message error message param code status code param e the exception that caused the failure param restore Timeout the communication timeout value in milliseconds that should be reset see invoke Complete int exception Debug Exception Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected void invoke Failed String message int code Throwable e int restore Timeout throws Debug Exception invoke Complete restore Timeout request Failed message e code  restoreTimeout invokeComplete DebugException DebugException invokeFailed restoreTimeout DebugException invokeComplete restoreTimeout requestFailed
Called when a method invocation has returned successfully or not This method performs cleanup ul li Resets the state of this thread to suspended li li Restores the communication timeout value li li Computes the new set of stack frames for this thread code ul param restore Timeout the communication timeout value in milliseconds that should be reset see invoke Method Class Type Object Reference Method List see new Instance Class Type Method List protected void invoke Complete int restore Timeout abort Step set Invoking Method false set Running false set Request Timeout restore Timeout update preserved stack frames try compute Stack Frames catch Debug Exception e log Error e  restoreTimeout invokeMethod ClassType ObjectReference newInstance ClassType invokeComplete restoreTimeout abortStep setInvokingMethod setRunning setRequestTimeout restoreTimeout computeStackFrames DebugException logError
see I Thread get Name public String get Name throws Debug Exception try f Previous Name get Underlying Thread name catch Runtime Exception e Don t bother reporting the exception when retrieving the name bug 30785 bug 33276 if e instanceof Object Collected Exception if f Previous Name null f Previous Name JDI Debug Model Messages get String JDI Thread garbage collected 1 NON NLS 1 else if e instanceof VM Disconnected Exception if f Previous Name null f Previous Name JDI Debug Model Messages get String JDI Thread 42 NON NLS 1 else target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception retrieving thread name new String e to String e NON NLS 1 return f Previous Name  IThread getName getName DebugException fPreviousName getUnderlyingThread RuntimeException ObjectCollectedException fPreviousName fPreviousName JDIDebugModelMessages getString JDIThread garbage_collected_1 VMDisconnectedException fPreviousName fPreviousName JDIDebugModelMessages getString JDIThread targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_retrieving_thread_name toString fPreviousName
see I Thread get Priority public int get Priority throws Debug Exception to get the priority we must get the value from the priority field Field p null try p get Underlying Thread reference Type field By Name priority NON NLS 1 if p null request Failed JDI Debug Model Messages get String JDI Thread no priority field null NON NLS 1 Value v get Underlying Thread get Value p if v instanceof Integer Value return Integer Value v value else request Failed JDI Debug Model Messages get String JDI Thread priority not an integer null NON NLS 1 catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception retrieving thread priority new String e to String e NON NLS 1 execution will not fall through to this line as target Request Failed or request Failed will throw an exception return 1  IThread getPriority getPriority DebugException getUnderlyingThread referenceType fieldByName requestFailed JDIDebugModelMessages getString JDIThread no_priority_field getUnderlyingThread getValue IntegerValue IntegerValue requestFailed JDIDebugModelMessages getString JDIThread priority_not_an_integer RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_retrieving_thread_priority toString targetRequestFailed requestFailed
see I Thread get Top Stack Frame public I Stack Frame get Top Stack Frame throws Debug Exception List c compute Stack Frames if c is Empty return null else return I Stack Frame c get 0  IThread getTopStackFrame IStackFrame getTopStackFrame DebugException computeStackFrames isEmpty IStackFrame
A breakpoint has suspended execution of this thread Aborts any step currently in process and fires a suspend event param breakpoint the breakpoint that caused the suspend return whether this thread suspended public synchronized boolean handle Suspend For Breakpoint Java Breakpoint breakpoint boolean queue Event add Current Breakpoint breakpoint set Suspended Quiet false try update state to suspended but don t actually suspend unless a registered listener agrees if breakpoint get Suspend Policy I Java Breakpoint SUSPEND VM JDI Debug Target get Debug Target prepare To Suspend By Breakpoint breakpoint else set Running false poll listeners boolean suspend JDI Debug Plugin get Default fire Breakpoint Hit this breakpoint suspend or resume if suspend if breakpoint get Suspend Policy I Java Breakpoint SUSPEND VM JDI Debug Target get Debug Target suspended By Breakpoint breakpoint queue Event abort Step if queue Event queue Suspend Event Debug Event BREAKPOINT else fire Suspend Event Debug Event BREAKPOINT else if breakpoint get Suspend Policy I Java Breakpoint SUSPEND VM JDI Debug Target get Debug Target cancel Suspend By Breakpoint breakpoint else set Running true dispose cached stack frames so we re retrieve on the next breakpoint preserve Stack Frames return suspend catch Core Exception e log Error e return true  handleSuspendForBreakpoint JavaBreakpoint queueEvent addCurrentBreakpoint setSuspendedQuiet getSuspendPolicy IJavaBreakpoint SUSPEND_VM JDIDebugTarget getDebugTarget prepareToSuspendByBreakpoint setRunning JDIDebugPlugin getDefault fireBreakpointHit getSuspendPolicy IJavaBreakpoint SUSPEND_VM JDIDebugTarget getDebugTarget suspendedByBreakpoint queueEvent abortStep queueEvent queueSuspendEvent DebugEvent fireSuspendEvent DebugEvent getSuspendPolicy IJavaBreakpoint SUSPEND_VM JDIDebugTarget getDebugTarget cancelSuspendByBreakpoint setRunning preserveStackFrames CoreException logError
Updates the state of this thread to suspend for the given breakpoint but does not fire notification of the suspend Do no abort the current step as the program may be resumed quietly and the step may still finish public synchronized boolean handle Suspend For Breakpoint Quiet Java Breakpoint breakpoint add Current Breakpoint breakpoint set Suspended Quiet true set Running false return true  handleSuspendForBreakpointQuiet JavaBreakpoint addCurrentBreakpoint setSuspendedQuiet setRunning
see I Step is Stepping public boolean is Stepping return get Pending Step Handler null  IStep isStepping isStepping getPendingStepHandler
see I Suspend Resume is Suspended public boolean is Suspended return f Running f Terminated  ISuspendResume isSuspended isSuspended fRunning fTerminated
see I Suspend Resume is Suspended public boolean is Suspended Quiet return f Suspended Quiet  ISuspendResume isSuspended isSuspendedQuiet fSuspendedQuiet
see I Java Thread is System Thread public boolean is System Thread return f Is System Thread  IJavaThread isSystemThread isSystemThread fIsSystemThread
see I Java Thread get Thread Group Name public String get Thread Group Name throws Debug Exception if f Thread Group Name null Thread Group Reference tgr get Underlying Thread Group bug 20370 if tgr null return null try f Thread Group Name tgr name catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception retrieving thread group name new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null return f Thread Group Name  IJavaThread getThreadGroupName getThreadGroupName DebugException fThreadGroupName ThreadGroupReference getUnderlyingThreadGroup fThreadGroupName RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_retrieving_thread_group_name toString targetRequestFailed fThreadGroupName
see I Terminate is Terminated public boolean is Terminated return f Terminated  ITerminate isTerminated isTerminated fTerminated
public boolean is Out Of Synch throws Debug Exception if is Suspended JDI Debug Target get Debug Target hasHCR Failed List frames compute Stack Frames Iterator iter frames iterator while iter has Next if JDI Stack Frame iter next is Out Of Synch return true return false else If the thread is not suspended there s no way to say for certain that it is running out of synch code return false  isOutOfSynch DebugException isSuspended JDIDebugTarget getDebugTarget hasHCRFailed computeStackFrames hasNext JDIStackFrame isOutOfSynch
public boolean may Be Out Of Synch if is Suspended return JDI Debug Target get Debug Target hasHCR Failed return false  mayBeOutOfSynch isSuspended JDIDebugTarget getDebugTarget hasHCRFailed
Sets whether this thread is terminated param terminated whether this thread is terminated protected void set Terminated boolean terminated f Terminated terminated  setTerminated fTerminated
see I Suspend Resume resume public synchronized void resume throws Debug Exception if get Debug Target is Suspended get Debug Target resume else resume Thread true  ISuspendResume DebugException getDebugTarget isSuspended getDebugTarget resumeThread
see I Suspend Resume resume Updates the state of this thread to resumed but does not fire notification of the resumption public synchronized void resume Quiet throws Debug Exception if is Suspended Quiet resume Thread false  ISuspendResume resumeQuiet DebugException isSuspendedQuiet resumeThread
see I Suspend Resume resume Updates the state of this thread but only fires notification to listeners if code fire Notification code is code true code private synchronized void resume Thread boolean fire Notification throws Debug Exception if is Suspended is Performing Evaluation is Invoking Method return try set Running true set Suspended Quiet false if fire Notification fire Resume Event Debug Event CLIENT REQUEST preserve Stack Frames get Underlying Thread resume catch VM Disconnected Exception e disconnected catch Runtime Exception e set Running false fire Suspend Event Debug Event CLIENT REQUEST target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception resuming new String e to String e NON NLS 1  ISuspendResume fireNotification resumeThread fireNotification DebugException isSuspended isPerformingEvaluation isInvokingMethod setRunning setSuspendedQuiet fireNotification fireResumeEvent DebugEvent CLIENT_REQUEST preserveStackFrames getUnderlyingThread VMDisconnectedException RuntimeException setRunning fireSuspendEvent DebugEvent CLIENT_REQUEST targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_resuming toString
Sets whether this thread is currently executing When set to code true code this thread s current breakpoints are cleared param running whether this thread is executing protected void set Running boolean running f Running running if running f Current Breakpoints clear  setRunning fRunning fCurrentBreakpoints
protected void set Suspended Quiet boolean suspended Quiet f Suspended Quiet suspended Quiet  setSuspendedQuiet suspendedQuiet fSuspendedQuiet suspendedQuiet
Preserves stack frames to be used on the next suspend event Iterates through all current stack frames setting their state as invalid This method should be called before this thread is resumed when stack frames are to be re used when it later suspends see compute Stack Frames protected synchronized void preserve Stack Frames f Refresh Children true Iterator frames f Stack Frames iterator while frames has Next JDI Stack Frame frames next set Underlying Stack Frame null  computeStackFrames preserveStackFrames fRefreshChildren fStackFrames hasNext JDIStackFrame setUnderlyingStackFrame
Disposes stack frames to be completely re computed on the next suspend event This method should be called before this thread is resumed when stack frames are not to be re used on the next suspend see compute Stack Frames protected synchronized void dispose Stack Frames f Stack Frames Collections EMPTY LIST f Refresh Children true  computeStackFrames disposeStackFrames fStackFrames EMPTY_LIST fRefreshChildren
This method is synchronized such that the step request begins before a background evaluation can be performed see I Step step Into public synchronized void step Into throws Debug Exception if can Step Into return Step Handler handler new Step Into Handler handler step  IStep stepInto stepInto DebugException canStepInto StepHandler StepIntoHandler
This method is synchronized such that the step request begins before a background evaluation can be performed see I Step step Over public synchronized void step Over throws Debug Exception if can Step Over return Step Handler handler new Step Over Handler handler step  IStep stepOver stepOver DebugException canStepOver StepHandler StepOverHandler
This method is synchronized such that the step request begins before a background evaluation can be performed see I Step step Return public synchronized void step Return throws Debug Exception if can Step Return return Step Handler handler new Step Return Handler handler step  IStep stepReturn stepReturn DebugException canStepReturn StepHandler StepReturnHandler
protected void set Original Step Kind int step Kind f Original Step Kind step Kind  setOriginalStepKind stepKind fOriginalStepKind stepKind
protected int get Original Step Kind return f Original Step Kind  getOriginalStepKind fOriginalStepKind
protected void set Original Step Location Location location f Original Step Location location  setOriginalStepLocation fOriginalStepLocation
protected Location get Original Step Location return f Original Step Location  getOriginalStepLocation fOriginalStepLocation
protected void set Original Step Stack Depth int depth f Original Step Stack Depth depth  setOriginalStepStackDepth fOriginalStepStackDepth
protected int get Original Step Stack Depth return f Original Step Stack Depth  getOriginalStepStackDepth fOriginalStepStackDepth
In cases where a user requested step into encounters nothing but filtered code static initializers synthetic methods etc the default JDI behavior is to put the instruction pointer back where it was before the step into This requires a second step to move forward Since this is confusing to the user we do an extra step into in such situations This method determines when such an extra step into is necessary It compares the current Location to the original Location when the user step into was initiated It also makes sure the stack depth now is the same as when the step was initiated protected boolean should Do Extra Step Into Location location throws Debug Exception if get Original Step Kind Step Request STEP INTO return false if get Original Step Stack Depth get Underlying Frame Count return false Location orig Location get Original Step Location if orig Location null return false We cannot simply check if the two Locations are equal using the equals method since this checks the code index within the method Even if the code indices are different the line numbers may be the same in which case we need to do the extra step into Method orig Method orig Location method Method curr Method location method if orig Method equals curr Method return false if orig Location line Number location line Number return false return true  shouldDoExtraStepInto DebugException getOriginalStepKind StepRequest STEP_INTO getOriginalStepStackDepth getUnderlyingFrameCount origLocation getOriginalStepLocation origLocation origMethod origLocation currMethod origMethod currMethod origLocation lineNumber lineNumber
see I Suspend Resume suspend public synchronized void suspend throws Debug Exception try Abort any pending step request abort Step set Suspended Quiet false f Evaluation Interrupted is Performing Evaluation suspend Underlying Thread catch Runtime Exception e set Running true target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception suspending new String e to String e NON NLS 1  ISuspendResume DebugException abortStep setSuspendedQuiet fEvaluationInterrupted isPerformingEvaluation suspendUnderlyingThread RuntimeException setRunning targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_suspending toString
Thread thread new Thread new Runnable public void run try get Underlying Thread suspend int timeout JDI Debug Model get Preferences get Int JDI Debug Model PREF REQUEST TIMEOUT long stop System current Time Millis timeout boolean suspended is Underlying Thread Suspended while System current Time Millis stop suspended try Thread sleep 50 catch Interrupted Exception e suspended is Underlying Thread Suspended if suspended break if suspended I Status status new Status I Status ERROR JDI Debug Plugin get Unique Identifier SUSPEND TIMEOUT Message Format format JDI Debug Model Messages get String JDI Thread suspend timeout new String new Integer timeout to String null NON NLS 1 I Status Handler handler Debug Plugin get Default get Status Handler status if handler null try handler handle Status status JDI Thread this catch Core Exception e set Running false fire Suspend Event Debug Event CLIENT REQUEST catch Runtime Exception exception finally f Is Suspending false  getUnderlyingThread JDIDebugModel getPreferences getInt JDIDebugModel PREF_REQUEST_TIMEOUT currentTimeMillis isUnderlyingThreadSuspended currentTimeMillis InterruptedException isUnderlyingThreadSuspended IStatus IStatus JDIDebugPlugin getUniqueIdentifier SUSPEND_TIMEOUT MessageFormat JDIDebugModelMessages getString JDIThread suspend_timeout toString IStatusHandler DebugPlugin getDefault getStatusHandler handleStatus JDIThread CoreException setRunning fireSuspendEvent DebugEvent CLIENT_REQUEST RuntimeException fIsSuspending
Suspends the underlying thread asynchronously and fires notification when the underlying thread is suspended protected synchronized void suspend Underlying Thread if f Is Suspending return if is Suspended fire Suspend Event Debug Event CLIENT REQUEST return f Is Suspending true Thread thread new Thread new Runnable public void run try get Underlying Thread suspend int timeout JDI Debug Model get Preferences get Int JDI Debug Model PREF REQUEST TIMEOUT long stop System current Time Millis timeout boolean suspended is Underlying Thread Suspended while System current Time Millis stop suspended try Thread sleep 50 catch Interrupted Exception e suspended is Underlying Thread Suspended if suspended break if suspended I Status status new Status I Status ERROR JDI Debug Plugin get Unique Identifier SUSPEND TIMEOUT Message Format format JDI Debug Model Messages get String JDI Thread suspend timeout new String new Integer timeout to String null NON NLS 1 I Status Handler handler Debug Plugin get Default get Status Handler status if handler null try handler handle Status status JDI Thread this catch Core Exception e set Running false fire Suspend Event Debug Event CLIENT REQUEST catch Runtime Exception exception finally f Is Suspending false thread start  suspendUnderlyingThread fIsSuspending isSuspended fireSuspendEvent DebugEvent CLIENT_REQUEST fIsSuspending getUnderlyingThread JDIDebugModel getPreferences getInt JDIDebugModel PREF_REQUEST_TIMEOUT currentTimeMillis isUnderlyingThreadSuspended currentTimeMillis InterruptedException isUnderlyingThreadSuspended IStatus IStatus JDIDebugPlugin getUniqueIdentifier SUSPEND_TIMEOUT MessageFormat JDIDebugModelMessages getString JDIThread suspend_timeout toString IStatusHandler DebugPlugin getDefault getStatusHandler handleStatus JDIThread CoreException setRunning fireSuspendEvent DebugEvent CLIENT_REQUEST RuntimeException fIsSuspending
public boolean is Underlying Thread Suspended return get Underlying Thread is Suspended  isUnderlyingThreadSuspended getUnderlyingThread isSuspended
Notifies this thread that it has been suspended due to a VM suspend protected synchronized void suspended ByVM set Running false set Suspended Quiet false  suspendedByVM setRunning setSuspendedQuiet
Notifies this thread that is about to be resumed due to a VM resume protected synchronized void resumed ByVM set Running true preserve Stack Frames This method is called before the VM is actually resumed To ensure that all threads will fully resume when the VM is resumed make sure the suspend count of each thread is no greater than 1 see Bugs 23328 and 27622 Thread Reference thread get Underlying Thread while thread suspend Count 1 thread resume  resumedByVM setRunning preserveStackFrames ThreadReference getUnderlyingThread suspendCount
see I Terminate terminate public void terminate throws Debug Exception terminate Evaluation get Debug Target terminate  ITerminate DebugException terminateEvaluation getDebugTarget
Drops to the given stack frame exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected void drop To Frame I Stack Frame frame throws Debug Exception JDI Debug Target target JDI Debug Target get Debug Target if target can Pop Frames JDK 1 4 support try Pop the drop frame and all frames above it pop Frame frame step Into catch Runtime Exception exception target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception dropping to frame new String exception to String exception NON NLS 1 else J9 support This block is synchronized such that the step request begins before a background evaluation can be performed synchronized this Step Handler handler new Drop To Frame Handler frame handler step  DebugException DebugException dropToFrame IStackFrame DebugException JDIDebugTarget JDIDebugTarget getDebugTarget canPopFrames popFrame stepInto RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_dropping_to_frame toString StepHandler DropToFrameHandler
protected void pop Frame I Stack Frame frame throws Debug Exception JDI Debug Target target JDI Debug Target get Debug Target if target can Pop Frames JDK 1 4 support try Pop the frame and all frames above it Stack Frame jdi Frame null int desired Size f Stack Frames size f Stack Frames index Of frame 1 int last Size f Stack Frames size 1 Set up to pass the first test int size f Stack Frames size while size last Size size desired Size Keep popping frames until the stack stops getting smaller or pop Frame is gone see Bug 8054 jdi Frame JDI Stack Frame frame get Underlying Stack Frame preserve Stack Frames f Thread pop Frames jdi Frame last Size size size compute Stack Frames size catch Incompatible Thread State Exception exception target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception popping new String exception to String exception NON NLS 1 catch Invalid Stack Frame Exception exception Invalid Stack Frame Exception can be thrown when all but the deepest frame were popped Fire a changed notification in case this has occured fire Change Event Debug Event CONTENT target Request Failed exception to String exception NON NLS 1 catch Runtime Exception exception target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception popping new String exception to String exception NON NLS 1  popFrame IStackFrame DebugException JDIDebugTarget JDIDebugTarget getDebugTarget canPopFrames StackFrame jdiFrame desiredSize fStackFrames fStackFrames indexOf lastSize fStackFrames fStackFrames lastSize desiredSize popFrame jdiFrame JDIStackFrame getUnderlyingStackFrame preserveStackFrames fThread popFrames jdiFrame lastSize computeStackFrames IncompatibleThreadStateException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_popping toString InvalidStackFrameException InvalidStackFrameException fireChangeEvent DebugEvent targetRequestFailed toString RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_popping toString
Steps until the specified stack frame is the top frame Provides ability to step over return in the non top stack frame This method is synchronized such that the step request begins before a background evaluation can be performed exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected synchronized void step To Frame I Stack Frame frame throws Debug Exception if can Step Return return Step Handler handler new Step To Frame Handler frame handler step  DebugException DebugException stepToFrame IStackFrame DebugException canStepReturn StepHandler StepToFrameHandler
Aborts the current step if any protected void abort Step Step Handler handler get Pending Step Handler if handler null handler abort  abortStep StepHandler getPendingStepHandler
see I Java Thread find Variable String public I Java Variable find Variable String var Name throws Debug Exception if is Suspended try I Stack Frame stack Frames get Stack Frames for int i 0 i stack Frames length i I Java Stack Frame sf I Java Stack Frame stack Frames i I Java Variable var sf find Variable var Name if var null return var catch Debug Exception e if the thread has since reusmed return null no need to report error if e get Status get Code I Java Thread ERR THREAD NOT SUSPENDED throw e return null  IJavaThread findVariable IJavaVariable findVariable varName DebugException isSuspended IStackFrame stackFrames getStackFrames stackFrames IJavaStackFrame IJavaStackFrame stackFrames IJavaVariable findVariable varName DebugException getStatus getCode IJavaThread ERR_THREAD_NOT_SUSPENDED
Notification this thread has terminated update state and fire a terminate event protected void terminated set Terminated true set Running false fire Terminate Event  setTerminated setRunning fireTerminateEvent
Returns this thread on the underlying VM which this model thread is a proxy to return underlying thread public Thread Reference get Underlying Thread return f Thread  ThreadReference getUnderlyingThread fThread
Sets the underlying thread that this model object is a proxy to param thread underlying thread on target VM protected void set Underlying Thread Thread Reference thread f Thread thread  setUnderlyingThread ThreadReference fThread
Returns this thread s underlying thread group return thread group exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li Retrieving the underlying thread group is not supported on the underlying VM li ul protected Thread Group Reference get Underlying Thread Group throws Debug Exception if f Thread Group null try f Thread Group get Underlying Thread thread Group catch Unsupported Operation Exception e request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception retrieving thread group new String e to String e NON NLS 1 execution will not reach this line as request Failed will throw an exception return null catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception retrieving thread group new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will throw an exception return null return f Thread Group  DebugException DebugException ThreadGroupReference getUnderlyingThreadGroup DebugException fThreadGroup fThreadGroup getUnderlyingThread threadGroup UnsupportedOperationException requestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_retrieving_thread_group toString requestFailed RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_retrieving_thread_group toString targetRequestFailed fThreadGroup
see I Java Thread is Performing Evaluation public boolean is Performing Evaluation return f Is Performing Evaluation  IJavaThread isPerformingEvaluation isPerformingEvaluation fIsPerformingEvaluation
Returns whether this thread is currently performing a method invokation public boolean is Invoking Method return f Is Invoking Method  isInvokingMethod fIsInvokingMethod
Returns whether this thread is currently ignoring breakpoints public boolean is Ignoring Breakpoints return f Honor Breakpoints  isIgnoringBreakpoints fHonorBreakpoints
Sets whether this thread is currently invoking a method param evaluating whether this thread is currently invoking a method protected void set Invoking Method boolean invoking f Is Invoking Method invoking  setInvokingMethod fIsInvokingMethod
Sets the step handler currently handling a step request param handler the current step handler or code null code if none protected void set Pending Step Handler Step Handler handler f Step Handler handler  setPendingStepHandler StepHandler fStepHandler
Returns the step handler currently handling a step request or code null code if none return step handler or code null code if none protected Step Handler get Pending Step Handler return f Step Handler  StepHandler getPendingStepHandler fStepHandler
Initiates a step in the underlying VM by creating a step request of the appropriate kind over into return and resuming this thread When a step is initiated it is registered with its thread as a pending step A pending step could be cancelled if a breakpoint suspends execution during the step p This thread s state is set to running and stepping and stack frames are invalidated but preserved to be re used when the step completes A resume event with a step detail is fired for this thread p Note this method does nothing if this thread has no stack frames exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected void step throws Debug Exception JDI Stack Frame top JDI Stack Frame get Top Stack Frame if top null return set Original Step Kind get Step Kind Location location top get Underlying Stack Frame location set Original Step Location location set Original Step Stack Depth compute Stack Frames size set Step Request create Step Request set Pending Step Handler this addJDI Event Listener this get Step Request set Running true preserve Stack Frames fire Resume Event get Step Detail invoke Thread  DebugException DebugException DebugException JDIStackFrame JDIStackFrame getTopStackFrame setOriginalStepKind getStepKind getUnderlyingStackFrame setOriginalStepLocation setOriginalStepStackDepth computeStackFrames setStepRequest createStepRequest setPendingStepHandler addJDIEventListener getStepRequest setRunning preserveStackFrames fireResumeEvent getStepDetail invokeThread
Resumes the underlying thread to initiate the step By default the thread is resumed Step handlers that require other actions can override this method exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected void invoke Thread throws Debug Exception try get Underlying Thread resume catch Runtime Exception e step End target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception stepping new String e to String e NON NLS 1  DebugException DebugException invokeThread DebugException getUnderlyingThread RuntimeException stepEnd targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_stepping toString
Creates and returns a step request specific to this step handler Subclasses must override code get Step Kind code to return the kind of step it implements return step request exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected Step Request create Step Request throws Debug Exception Event Request Manager manager get Event Request Manager if manager null request Failed JDI Debug Model Messages get String JDI Thread Unable to create step request   VM disconnected  1 null NON NLS 1 try Step Request request manager create Step Request get Underlying Thread Step Request STEP LINE get Step Kind request set Suspend Policy Event Request SUSPEND EVENT THREAD request add Count Filter 1 attach Filters To Step Request request request enable return request catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception creating step request new String e to String e NON NLS 1 this line will never be executed as the try block will either return or the catch block will throw an exception return null  getStepKind DebugException DebugException StepRequest createStepRequest DebugException EventRequestManager getEventRequestManager requestFailed JDIDebugModelMessages getString JDIThread Unable_to_create_step_request_ _VM_disconnected _1 StepRequest createStepRequest getUnderlyingThread StepRequest STEP_LINE getStepKind setSuspendPolicy EventRequest SUSPEND_EVENT_THREAD addCountFilter attachFiltersToStepRequest RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_creating_step_request toString
Returns the kind of step this handler implements return one of code Step Request STEP INTO code code Step Request STEP OVER code code Step Request STEP OUT code  StepRequest STEP_INTO StepRequest STEP_OVER StepRequest STEP_OUT
Returns the detail for this step event return one of code Debug Event STEP INTO code code Debug Event STEP OVER code code Debug Event STEP RETURN code  DebugEvent STEP_INTO DebugEvent STEP_OVER DebugEvent STEP_RETURN
Sets the step request created by this handler in the underlying VM Set to code null code when this handler deletes its request param request step request protected void set Step Request Step Request request f Step Request request  setStepRequest StepRequest fStepRequest
Returns the step request created by this handler in the underlying VM return step request protected Step Request get Step Request return f Step Request  StepRequest getStepRequest fStepRequest
Deletes this handler s step request from the underlying VM and removes this handler as an event listener protected void delete Step Request removeJDI Event Listener this get Step Request try Event Request Manager manager get Event Request Manager if manager null manager delete Event Request get Step Request set Step Request null catch Runtime Exception e log Error e  deleteStepRequest removeJDIEventListener getStepRequest EventRequestManager getEventRequestManager deleteEventRequest getStepRequest setStepRequest RuntimeException logError
If step filters are currently switched on and the current location is not a filtered location set all active filters on the step request protected void attach Filters To Step Request Step Request request if apply Step Filters is Step Filters Enabled Location current Location get Original Step Location if current Location null return Removed the fix for bug 5587 to address bug 41510 check if the user has already stopped in a filtered location is so do not filter see bug 5587 Reference Type type current Location declaring Type String type Name type name String active Filters get Java Debug Target get Step Filters for int i 0 i active Filters length i String Matcher matcher new String Matcher active Filters i false false if matcher match type Name return for int i 0 i active Filters length i request add Class Exclusion Filter active Filters i  attachFiltersToStepRequest StepRequest applyStepFilters isStepFiltersEnabled currentLocation getOriginalStepLocation currentLocation ReferenceType currentLocation declaringType typeName activeFilters getJavaDebugTarget getStepFilters activeFilters StringMatcher StringMatcher activeFilters typeName activeFilters addClassExclusionFilter activeFilters
Returns whether this step handler should use step filters when creating its step request By default step filters can be used by any step request Subclasses must override if when required return whether this step handler should use step filters when creating its step request protected boolean apply Step Filters return true  applyStepFilters
Notification the step request has completed If the current location matches one of the user specified step filter criteria e g synthetic methods static initializers then continue stepping see IJDI Event Listener handle Event Event JDI Debug Target public boolean handle Event Event event JDI Debug Target target try Step Event step Event Step Event event Location current Location step Event location if the ending step location is filtered and we did not start from a filtered location or if we re back where we started on a step into do another step of the same kind if location Should Be Filtered current Location should Do Extra Step Into current Location set Running true delete Step Request create Secondary Step Request return true otherwise we re done stepping else step End return false catch Debug Exception e log Error e step End return false  IJDIEventListener handleEvent JDIDebugTarget handleEvent JDIDebugTarget StepEvent stepEvent StepEvent currentLocation stepEvent locationShouldBeFiltered currentLocation shouldDoExtraStepInto currentLocation setRunning deleteStepRequest createSecondaryStepRequest stepEnd DebugException logError stepEnd
Returns code true code if the Step Event s Location is a Method that the user has indicated via the step filter preferences should be filtered and the step was not initiated from a filtered location Returns code false code otherwise protected boolean location Should Be Filtered Location location throws Debug Exception if apply Step Filters Location orig Location get Original Step Location if orig Location null return location Is Filtered orig Location method location Is Filtered location method return false  StepEvent locationShouldBeFiltered DebugException applyStepFilters origLocation getOriginalStepLocation origLocation locationIsFiltered origLocation locationIsFiltered
Returns code true code if the Step Event s Location is a Method that the user has indicated via the step filter preferences should be filtered Returns code false code otherwise protected boolean location Is Filtered Method method if is Step Filters Enabled boolean filter Statics get Java Debug Target is Filter Static Initializers boolean filter Synthetics get Java Debug Target is Filter Synthetics boolean filter Constructors get Java Debug Target is Filter Constructors if filter Statics filter Synthetics filter Constructors return false if filter Statics method is Static Initializer filter Synthetics method is Synthetic filter Constructors method is Constructor return true return false  StepEvent locationIsFiltered isStepFiltersEnabled filterStatics getJavaDebugTarget isFilterStaticInitializers filterSynthetics getJavaDebugTarget isFilterSynthetics filterConstructors getJavaDebugTarget isFilterConstructors filterStatics filterSynthetics filterConstructors filterStatics isStaticInitializer filterSynthetics isSynthetic filterConstructors isConstructor
Cleans up when a step completes ul li Thread state is set to suspended li li Stepping state is set to false li li Stack frames and variables are incrementally updated li li The step request is deleted and removed as and event listener li li A suspend event is fired li ul protected void step End set Running false delete Step Request set Pending Step Handler null queue Suspend Event Debug Event STEP END  stepEnd setRunning deleteStepRequest setPendingStepHandler queueSuspendEvent DebugEvent STEP_END
Creates another step request in the underlying thread of the appropriate kind over into return This thread will be resumed by the event dispatcher as this event handler will vote to resume suspended threads When a step is initiated it is registered with its thread as a pending step A pending step could be cancelled if a breakpoint suspends execution during the step exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected void create Secondary Step Request throws Debug Exception set Step Request create Step Request set Pending Step Handler this addJDI Event Listener this get Step Request  DebugException DebugException createSecondaryStepRequest DebugException setStepRequest createStepRequest setPendingStepHandler addJDIEventListener getStepRequest
Aborts this step request if active The step event request is deleted from the underlying VM protected void abort if get Step Request null delete Step Request set Pending Step Handler null  getStepRequest deleteStepRequest setPendingStepHandler
class Step Over Handler extends Step Handler see Step Handler get Step Kind protected int get Step Kind return Step Request STEP OVER  StepOverHandler StepHandler StepHandler getStepKind getStepKind StepRequest STEP_OVER
see Step Handler get Step Detail protected int get Step Detail return Debug Event STEP OVER  StepHandler getStepDetail getStepDetail DebugEvent STEP_OVER
class Step Into Handler extends Step Handler see Step Handler get Step Kind protected int get Step Kind return Step Request STEP INTO  StepIntoHandler StepHandler StepHandler getStepKind getStepKind StepRequest STEP_INTO
see Step Handler get Step Detail protected int get Step Detail return Debug Event STEP INTO  StepHandler getStepDetail getStepDetail DebugEvent STEP_INTO
Returns code true code Step filters are applied for stepping into new frames see Step Handler apply Step Filters protected boolean apply Step Filters return true  StepHandler applyStepFilters applyStepFilters
protected boolean location Should Be Filtered Location location throws Debug Exception if still at the same depth do another step return see bug 38744 if get Original Step Stack Depth get Underlying Frame Count return true return super location Should Be Filtered location  locationShouldBeFiltered DebugException getOriginalStepStackDepth getUnderlyingFrameCount locationShouldBeFiltered
see Step Handler get Step Kind protected int get Step Kind return Step Request STEP OUT  StepHandler getStepKind getStepKind StepRequest STEP_OUT
see Step Handler get Step Detail protected int get Step Detail return Debug Event STEP RETURN  StepHandler getStepDetail getStepDetail DebugEvent STEP_RETURN
Constructs a step handler to step until the specified stack frame is reached param frame the stack frame to step to exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected Step To Frame Handler I Stack Frame frame throws Debug Exception List frames compute Stack Frames set Remaining Frames frames size frames index Of frame  DebugException DebugException StepToFrameHandler IStackFrame DebugException computeStackFrames setRemainingFrames indexOf
Sets the number of frames that should be remaining on the stack when done param num number of remaining frames protected void set Remaining Frames int num f Remaining Frames num  setRemainingFrames fRemainingFrames
Returns number of frames that should be remaining on the stack when done return number of frames that should be left protected int get Remaining Frames return f Remaining Frames  getRemainingFrames fRemainingFrames
Notification the step request has completed If in the desired frame complete the step request normally If not in the desired frame another step request is created and this thread is resumed see IJDI Event Listener handle Event Event JDI Debug Target public boolean handle Event Event event JDI Debug Target target try int num Frames get Underlying Frame Count tos should not be null if num Frames get Remaining Frames step End return false else reset running state and keep going set Running true delete Step Request create Secondary Step Request return true catch Debug Exception e log Error e step End return false  IJDIEventListener handleEvent JDIDebugTarget handleEvent JDIDebugTarget numFrames getUnderlyingFrameCount numFrames getRemainingFrames stepEnd setRunning deleteStepRequest createSecondaryStepRequest DebugException logError stepEnd
Constructs a handler to drop to the specified stack frame param frame the stack frame to drop to exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected Drop To Frame Handler I Stack Frame frame throws Debug Exception List frames compute Stack Frames set Frames To Drop frames index Of frame  DebugException DebugException DropToFrameHandler IStackFrame DebugException computeStackFrames setFramesToDrop indexOf
Sets the number of frames to pop off the stack param num number of frames to pop protected void set Frames To Drop int num f Frames To Drop num  setFramesToDrop fFramesToDrop
Returns the number of frames to pop off the stack return remaining number of frames to pop protected int get Frames To Drop return f Frames To Drop  getFramesToDrop fFramesToDrop
To drop a frame or re enter the underlying thread is instructed to do a return When the frame count is less than zero the step being performed is a step return so a regular invocation is performed see Step Handler invoke Thread protected void invoke Thread throws Debug Exception if get Frames To Drop 0 super invoke Thread else try org eclipse jdi hcr Thread Reference hcr Thread org eclipse jdi hcr Thread Reference get Underlying Thread hcr Thread do Return null true catch Runtime Exception e step End target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception while popping stack frame new String e to String e NON NLS 1  StepHandler invokeThread invokeThread DebugException getFramesToDrop invokeThread ThreadReference hcrThread ThreadReference getUnderlyingThread hcrThread doReturn RuntimeException stepEnd targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_while_popping_stack_frame toString
Notification that the pop has completed If there are more frames to pop keep going otherwise re enter the top frame Returns false as this handler will resume this thread with a special invocation code do Return code see IJDI Event Listener handle Event Event JDI Debug Target see invoke Thread public boolean handle Event Event event JDI Debug Target target pop is complete update number of frames to drop set Frames To Drop get Frames To Drop 1 try if get Frames To Drop 1 delete Step Request do Secondary Step else step End catch Debug Exception e step End log Error e return false  doReturn IJDIEventListener handleEvent JDIDebugTarget invokeThread handleEvent JDIDebugTarget setFramesToDrop getFramesToDrop getFramesToDrop deleteStepRequest doSecondaryStep stepEnd DebugException stepEnd logError
Pops a secondary frame off the stack does a re enter or a step into exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected void do Secondary Step throws Debug Exception set Step Request create Step Request set Pending Step Handler this addJDI Event Listener this get Step Request invoke Thread  DebugException DebugException doSecondaryStep DebugException setStepRequest createStepRequest setPendingStepHandler addJDIEventListener getStepRequest invokeThread
Creates and returns a step request If there are no more frames to drop a re enter request is made If the re enter is complete a step into request is created return step request exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li ul protected Step Request create Step Request throws Debug Exception Event Request Manager manager get Event Request Manager if manager null request Failed JDI Debug Model Messages get String JDI Thread Unable to create step request   VM disconnected  2 null NON NLS 1 int num get Frames To Drop if num 0 return super create Step Request else if num 0 try Step Request request org eclipse jdi hcr Event Request Manager manager create Reenter Step Request get Underlying Thread request set Suspend Policy Event Request SUSPEND EVENT THREAD request add Count Filter 1 request enable return request catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception creating step request new String e to String e NON NLS 1 else if num 1 try Step Request request manager create Step Request get Underlying Thread Step Request STEP LINE Step Request STEP INTO request set Suspend Policy Event Request SUSPEND EVENT THREAD request add Count Filter 1 request enable return request catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception creating step request new String e to String e NON NLS 1 this line will never be executed as the try block will either return or the catch block with throw an exception return null  DebugException DebugException StepRequest createStepRequest DebugException EventRequestManager getEventRequestManager requestFailed JDIDebugModelMessages getString JDIThread Unable_to_create_step_request_ _VM_disconnected _2 getFramesToDrop createStepRequest StepRequest EventRequestManager createReenterStepRequest getUnderlyingThread setSuspendPolicy EventRequest SUSPEND_EVENT_THREAD addCountFilter RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_creating_step_request toString StepRequest createStepRequest getUnderlyingThread StepRequest STEP_LINE StepRequest STEP_INTO setSuspendPolicy EventRequest SUSPEND_EVENT_THREAD addCountFilter RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_creating_step_request toString
see I Thread has Stack Frames public boolean has Stack Frames throws Debug Exception try return compute Stack Frames size 0 catch Debug Exception e do not throw an exception if the thread resumed while determining whether stack frames are present if e get Status get Code I Java Thread ERR THREAD NOT SUSPENDED throw e return false  IThread hasStackFrames hasStackFrames DebugException computeStackFrames DebugException getStatus getCode IJavaThread ERR_THREAD_NOT_SUSPENDED
see I Adaptable get Adapter Class public Object get Adapter Class adapter if adapter I Java Thread class return this if adapter I Java Stack Frame class try return I Java Stack Frame get Top Stack Frame catch Debug Exception e do nothing if not able to get frame return super get Adapter adapter  IAdaptable getAdapter getAdapter IJavaThread IJavaStackFrame IJavaStackFrame getTopStackFrame DebugException getAdapter
see org eclipse jdt debug core I Java Thread has Owned Monitors public boolean has Owned Monitors throws Debug Exception return is Suspended get Owned Monitors length 0  IJavaThread hasOwnedMonitors hasOwnedMonitors DebugException isSuspended getOwnedMonitors
see org eclipse jdt debug core I Java Thread get Owned Monitors public I Java Object get Owned Monitors throws Debug Exception try JDI Debug Target target JDI Debug Target get Debug Target List owned Monitors get Underlying Thread owned Monitors I Java Object java Owned Monitors new I Java Object owned Monitors size Iterator itr owned Monitors iterator int i 0 while itr has Next Object Reference element Object Reference itr next java Owned Monitors i new JDI Object Value target element i return java Owned Monitors catch Incompatible Thread State Exception e target Request Failed JDI Debug Model Messages get String JDI Thread 43 e NON NLS 1 catch Runtime Exception e target Request Failed JDI Debug Model Messages get String JDI Thread 44 e NON NLS 1 return null  IJavaThread getOwnedMonitors IJavaObject getOwnedMonitors DebugException JDIDebugTarget JDIDebugTarget getDebugTarget ownedMonitors getUnderlyingThread ownedMonitors IJavaObject javaOwnedMonitors IJavaObject ownedMonitors ownedMonitors hasNext ObjectReference ObjectReference javaOwnedMonitors JDIObjectValue javaOwnedMonitors IncompatibleThreadStateException targetRequestFailed JDIDebugModelMessages getString JDIThread RuntimeException targetRequestFailed JDIDebugModelMessages getString JDIThread
see org eclipse jdt debug core I Java Thread get Contended Monitor public I Java Object get Contended Monitor throws Debug Exception try Object Reference monitor get Underlying Thread current Contended Monitor if monitor null return new JDI Object Value JDI Debug Target get Debug Target monitor catch Incompatible Thread State Exception e target Request Failed JDI Debug Model Messages get String JDI Thread 45 e NON NLS 1 catch Runtime Exception e target Request Failed JDI Debug Model Messages get String JDI Thread 46 e NON NLS 1 return null  IJavaThread getContendedMonitor IJavaObject getContendedMonitor DebugException ObjectReference getUnderlyingThread currentContendedMonitor JDIObjectValue JDIDebugTarget getDebugTarget IncompatibleThreadStateException targetRequestFailed JDIDebugModelMessages getString JDIThread RuntimeException targetRequestFailed JDIDebugModelMessages getString JDIThread
see org eclipse debug core model I Filtered Step can Step With Filters public boolean can Step With Filters if can Step Into String filters get Java Debug Target get Step Filters return filters null filters length 0 return false  IFilteredStep canStepWithFilters canStepWithFilters canStepInto getJavaDebugTarget getStepFilters
see org eclipse debug core model I Filtered Step step With Filters public void step With Filters throws Debug Exception if can Step With Filters return step Into  IFilteredStep stepWithFilters stepWithFilters DebugException canStepWithFilters stepInto
public Thread Job JDI Thread thread super JDI Debug Model Messages get String JDI Thread 39 NON NLS 1 fJDI Thread thread f Runnables new Vector 5 set System true  ThreadJob JDIThread JDIDebugModelMessages getString JDIThread fJDIThread fRunnables setSystem
public void add Runnable Runnable runnable f Runnables add runnable schedule  addRunnable fRunnables
public boolean is Empty return f Runnables is Empty  isEmpty fRunnables isEmpty
public I Status run I Progress Monitor monitor fJDI Thread f Running Async Job this Vector runnables synchronized f Runnables runnables f Runnables f Runnables new Vector 5 Multi Status failed null monitor begin Task this get Name runnables size NON NLS 1 for Iterator iter runnables iterator iter has Next fJDI Thread is Terminated monitor is Canceled try Runnable iter next run catch Exception e if failed null failed new Multi Status JDI Debug Plugin get Unique Identifier JDI Debug Plugin INTERNAL ERROR JDI Debug Model Messages get String JDI Thread 0 null NON NLS 1 failed add new Status I Status ERROR JDI Debug Plugin get Unique Identifier JDI Debug Plugin INTERNAL ERROR JDI Debug Model Messages get String JDI Thread 0 e NON NLS 1 monitor worked 1 fJDI Thread f Running Async Job null monitor done if failed null return Status OK STATUS return failed  IStatus IProgressMonitor fJDIThread fRunningAsyncJob fRunnables fRunnables fRunnables MultiStatus beginTask getName hasNext fJDIThread isTerminated isCanceled MultiStatus JDIDebugPlugin getUniqueIdentifier JDIDebugPlugin INTERNAL_ERROR JDIDebugModelMessages getString JDIThread IStatus JDIDebugPlugin getUniqueIdentifier JDIDebugPlugin INTERNAL_ERROR JDIDebugModelMessages getString JDIThread fJDIThread fRunningAsyncJob OK_STATUS
see org eclipse core runtime jobs Job should Run public boolean should Run return fJDI Thread is Terminated f Runnables is Empty  shouldRun shouldRun fJDIThread isTerminated fRunnables isEmpty
see org eclipse jdt debug core I Java Thread stop org eclipse jdt debug core I Java Value public void stop I Java Object exception throws Debug Exception try get Underlying Thread stop JDI Object Value exception get Underlying Object catch Invalid Type Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Thread exception stoping thread new String e to String e NON NLS 1  IJavaThread IJavaValue IJavaObject DebugException getUnderlyingThread JDIObjectValue getUnderlyingObject InvalidTypeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIThread exception_stoping_thread toString

Constructs a new type based on the specified underlying type in the given debug target param target the debug target this type originated from param type underlying type on the target VM protected JDI Type JDI Debug Target target Type type set Debug Target target set Underlying Type type  JDIType JDIDebugTarget setDebugTarget setUnderlyingType
Creates the appropriate kind of type based on the specialized type public static JDI Type create Type JDI Debug Target target Type type if type instanceof Array Type return new JDI Array Type target Array Type type if type instanceof Class Type return new JDI Class Type target Class Type type if type instanceof Interface Type return new JDI Interface Type target Interface Type type return new JDI Type target type  JDIType createType JDIDebugTarget ArrayType JDIArrayType ArrayType ClassType JDIClassType ClassType InterfaceType JDIInterfaceType InterfaceType JDIType
see I Java Type get Signature public String get Signature throws Debug Exception try return get Underlying Type signature catch Runtime Exception e get Debug Target target Request Failed Message Format format JDI Debug Model Messages get String JDI Type exception while retrieving signature new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will throw an exception return null  IJavaType getSignature getSignature DebugException getUnderlyingType RuntimeException getDebugTarget targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIType exception_while_retrieving_signature toString targetRequestFailed
Returns the debug target this type originated from return the debug targe this type originated from protected JDI Debug Target get Debug Target return f Debug Target  JDIDebugTarget getDebugTarget fDebugTarget
Sets the debug target this type originated from param debug Target the debug targe this type originated from protected void set Debug Target JDI Debug Target debug Target f Debug Target debug Target  debugTarget setDebugTarget JDIDebugTarget debugTarget fDebugTarget debugTarget
Returns the underlying type on the VM return the underlying type on the VM public Type get Underlying Type return f Type  getUnderlyingType fType
Sets the underlying type on the VM param type the underlying type on the VM protected void set Underlying Type Type type f Type type  setUnderlyingType fType
see java lang Object to String public String to String return get Underlying Type to String  toString toString getUnderlyingType toString
see I Java Type get Name public String get Name throws Debug Exception try return get Underlying Type name catch Runtime Exception e get Debug Target target Request Failed Message Format format JDI Debug Model Messages get String JDI Type exception while retrieving type name new String e to String e NON NLS 1 execution will not fall through as an exception will be thrown by the catch block return null  IJavaType getName getName DebugException getUnderlyingType RuntimeException getDebugTarget targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIType exception_while_retrieving_type_name toString
see java lang Object equals Object public boolean equals Object object return object instanceof JDI Type f Type equals JDI Type object f Type  JDIType fType JDIType fType
see java lang Object hash Code public int hash Code return f Type hash Code  hashCode hashCode fType hashCode

private boolean f Allocated true public JDI Value JDI Debug Target target Value value super target f Value value  fAllocated JDIValue JDIDebugTarget fValue
public Object get Adapter Class adapter if adapter I Java Value class return this return super get Adapter adapter  getAdapter IJavaValue getAdapter
Creates the appropriate kind of value i e a primitive value object class object array or code null code public static JDI Value create Value JDI Debug Target target Value value if value null return new JDI Null Value target if value instanceof Array Reference return new JDI Array Value target Array Reference value if value instanceof Class Object Reference return new JDI Class Object Value target Class Object Reference value if value instanceof Object Reference return new JDI Object Value target Object Reference value if value instanceof Primitive Value return new JDI Primitive Value target value return new JDI Value target value  JDIValue createValue JDIDebugTarget JDINullValue ArrayReference JDIArrayValue ArrayReference ClassObjectReference JDIClassObjectValue ClassObjectReference ObjectReference JDIObjectValue ObjectReference PrimitiveValue JDIPrimitiveValue JDIValue
see I Value get Value String public String get Value String throws Debug Exception if is Allocated return JDI Debug Model Messages get String JDI Value deallocated NON NLS 1 if f Value null return JDI Debug Model Messages get String JDI Value null 4 NON NLS 1 if f Value instanceof String Reference try return String Reference f Value value catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Value exception retrieving value new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null if f Value instanceof Object Reference String Buffer name new String Buffer if f Value instanceof Class Object Reference name append NON NLS 1 name append Class Object Reference f Value reflected Type name append NON NLS 1 name append NON NLS 1 name append JDI Debug Model Messages get String JDI Value id 8 NON NLS 1 name append NON NLS 1 try name append Object Reference f Value uniqueID catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Value exception retrieving unique id new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null name append NON NLS 1 return name to String else see bug 43285 return String value Of f Value  IValue getValueString getValueString DebugException isAllocated JDIDebugModelMessages getString JDIValue fValue JDIDebugModelMessages getString JDIValue null_4 fValue StringReference StringReference fValue RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIValue exception_retrieving_value toString targetRequestFailed fValue ObjectReference StringBuffer StringBuffer fValue ClassObjectReference ClassObjectReference fValue reflectedType JDIDebugModelMessages getString JDIValue id_8 ObjectReference fValue RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIValue exception_retrieving_unique_id toString targetRequestFailed toString valueOf fValue
see I Value get Reference Type Name public String get Reference Type Name throws Debug Exception try if f Value null return JDI Debug Model Messages get String JDI Value null 4 NON NLS 1 return get Underlying Type name catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Value exception retrieving reference type name new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null  IValue getReferenceTypeName getReferenceTypeName DebugException fValue JDIDebugModelMessages getString JDIValue null_4 getUnderlyingType RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIValue exception_retrieving_reference_type_name toString targetRequestFailed
see Object hash Code public int hash Code if f Value null return get Class hash Code else return f Value hash Code  hashCode hashCode fValue getClass hashCode fValue hashCode
see Object equals Object public boolean equals Object o if this o return true if o instanceof JDI Value Value other JDI Value o get Underlying Value if f Value null return false if other null return false return f Value equals other else return false  JDIValue JDIValue getUnderlyingValue fValue fValue
see I Value get Variables public I Variable get Variables throws Debug Exception List list get Variables List return I Variable list to Array new I Variable list size  IValue getVariables IVariable getVariables DebugException getVariablesList IVariable toArray IVariable
Collections sort f Variables new Comparator public int compare Object a Object b return sort Children a b  fVariables sortChildren
protected List get Variables List throws Debug Exception if is Allocated return Collections EMPTY LIST if f Variables null return f Variables else if f Value instanceof Object Reference Object Reference object Object Reference f Value f Variables new Array List if is Array int length get Array Length Array List list new Array List length for int i 0 i length i list add new JDI Array Entry Variable get Java Debug Target get Array Reference i f Variables list else List fields null try Reference Type ref Type object reference Type fields ref Type all Fields catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Value exception retrieving fields new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null Iterator list fields iterator while list has Next Field field Field list next f Variables add new JDI Field Variable JDI Debug Target get Debug Target field object Collections sort f Variables new Comparator public int compare Object a Object b return sort Children a b return f Variables else return Collections EMPTY LIST  getVariablesList DebugException isAllocated EMPTY_LIST fVariables fVariables fValue ObjectReference ObjectReference ObjectReference fValue fVariables ArrayList isArray getArrayLength ArrayList ArrayList JDIArrayEntryVariable getJavaDebugTarget getArrayReference fVariables ReferenceType refType referenceType refType allFields RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIValue exception_retrieving_fields toString targetRequestFailed hasNext fVariables JDIFieldVariable JDIDebugTarget getDebugTarget fVariables sortChildren fVariables EMPTY_LIST
Group statics and instance variables sort alphabetically within each group protected int sort Children Object a Object b I Java Variable v1 I Java Variable a I Java Variable v2 I Java Variable b try boolean v1is Static v1 is Static boolean v2is Static v2 is Static if v1is Static v2is Static return 1 if v1is Static v2is Static return 1 return v1 get Name compare To Ignore Case v2 get Name catch Debug Exception de log Error de return 1  sortChildren IJavaVariable IJavaVariable IJavaVariable IJavaVariable v1isStatic isStatic v2isStatic isStatic v1isStatic v2isStatic v1isStatic v2isStatic getName compareToIgnoreCase getName DebugException logError
Returns whether this value is an array protected boolean is Array return f Value instanceof Array Reference  isArray fValue ArrayReference
Returns this value as an array reference or code null code protected Array Reference get Array Reference if is Array return Array Reference f Value else return null  ArrayReference getArrayReference isArray ArrayReference fValue
see I Value is Allocated public boolean is Allocated throws Debug Exception if f Allocated if f Value instanceof Object Reference try f Allocated Object Reference f Value is Collected catch VM Disconnected Exception e if the VM disconnects this value is not allocated f Allocated false catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Value exception is collected new String e to String e NON NLS 1 execution will fall through as target Request Failed will thrown an exception else JDI Debug Target dt JDI Debug Target get Debug Target f Allocated dt is Available return f Allocated  IValue isAllocated isAllocated DebugException fAllocated fValue ObjectReference fAllocated ObjectReference fValue isCollected VMDisconnectedException fAllocated RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIValue exception_is_collected toString targetRequestFailed JDIDebugTarget JDIDebugTarget getDebugTarget fAllocated isAvailable fAllocated
see I Java Value get Signature public String get Signature throws Debug Exception try if f Value null return f Value type signature else return null catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Value exception retrieving type signature new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will thrown an exception return null  IJavaValue getSignature getSignature DebugException fValue fValue RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIValue exception_retrieving_type_signature toString targetRequestFailed
see I Java Value get Array Length public int get Array Length throws Debug Exception if is Array try return get Array Reference length catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Value exception retrieving length of array new String e to String e NON NLS 1 return 1  IJavaValue getArrayLength getArrayLength DebugException isArray getArrayReference RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIValue exception_retrieving_length_of_array toString
Returns this value s underlying JDI value protected Value get Underlying Value return f Value  getUnderlyingValue fValue
see I Java Value get Java Type public I Java Type get Java Type throws Debug Exception return JDI Type create Type JDI Debug Target get Debug Target get Underlying Type  IJavaValue getJavaType IJavaType getJavaType DebugException JDIType createType JDIDebugTarget getDebugTarget getUnderlyingType
Retuns this value s underlying type return type exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li protected Type get Underlying Type throws Debug Exception try return get Underlying Value type catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Value exception retrieving type new String e to String e NON NLS 1 execution will not fall through to here as request Failed will throw an exception return null  DebugException DebugException getUnderlyingType DebugException getUnderlyingValue RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIValue exception_retrieving_type toString requestFailed
see java lang Object to String public String to String return get Underlying Value to String  toString toString getUnderlyingValue toString
see I Value has Variables public boolean has Variables throws Debug Exception return get Variables List size 0  IValue hasVariables hasVariables DebugException getVariablesList

protected final static String jdi String Signature Ljava lang String NON NLS 1 public JDI Variable JDI Debug Target target super target  jdiStringSignature JDIVariable JDIDebugTarget
see Platform Object get Adapter Class public Object get Adapter Class adapter if adapter I Java Variable class adapter I Java Modifiers class return this return super get Adapter adapter  PlatformObject getAdapter getAdapter IJavaVariable IJavaModifiers getAdapter
Returns this variable s current underlying jdi value Subclasses must implement retrieve Value and do not need to guard against JDI exceptions as this method handles them exception Debug Exception if unable to access the value protected final Value get Current Value throws Debug Exception try return retrieve Value catch Runtime Exception e target Request Failed Message Format format JDI Debug Model Messages get String JDI Variable exception retrieving new String e to String e NON NLS 1 execution will not reach this line as target Request Failed will throw an exception return null  retrieveValue DebugException getCurrentValue DebugException retrieveValue RuntimeException targetRequestFailed MessageFormat JDIDebugModelMessages getString JDIVariable exception_retrieving toString targetRequestFailed
Returns this variable s underlying jdi value protected abstract Value retrieve Value throws Debug Exception  retrieveValue DebugException
Returns the current value of this variable The value is cached but on each access we see if the value has changed and update if required see I Variable get Value public I Value get Value throws Debug Exception Value current Value get Current Value if f Value null f Value JDI Value create Value JDI Debug Target get Debug Target current Value else Value previous Value f Value get Underlying Value if current Value previous Value return f Value if previous Value null current Value null f Value JDI Value create Value JDI Debug Target get Debug Target current Value set Change Count get Java Debug Target get Suspend Count else if previous Value equals current Value f Value JDI Value create Value JDI Debug Target get Debug Target current Value set Change Count get Java Debug Target get Suspend Count return f Value  IVariable getValue IValue getValue DebugException currentValue getCurrentValue fValue fValue JDIValue createValue JDIDebugTarget getDebugTarget currentValue previousValue fValue getUnderlyingValue currentValue previousValue fValue previousValue currentValue fValue JDIValue createValue JDIDebugTarget getDebugTarget currentValue setChangeCount getJavaDebugTarget getSuspendCount previousValue currentValue fValue JDIValue createValue JDIDebugTarget getDebugTarget currentValue setChangeCount getJavaDebugTarget getSuspendCount fValue
see I Value Modification supports Value Modification public boolean supports Value Modification return false  IValueModification supportsValueModification supportsValueModification
see I Value Modification set Value String public void set Value String expression throws Debug Exception not Supported JDI Debug Model Messages get String JDI Variable does not support value modification NON NLS 1  IValueModification setValue setValue DebugException notSupported JDIDebugModelMessages getString JDIVariable does_not_support_value_modification
see I Value Modification set Value I Value public void set Value I Value value throws Debug Exception not Supported JDI Debug Model Messages get String JDI Variable does not support value modification NON NLS 1  IValueModification setValue IValue setValue IValue DebugException notSupported JDIDebugModelMessages getString JDIVariable does_not_support_value_modification
see I Value Modification verify Value String public boolean verify Value String expression return false  IValueModification verifyValue verifyValue
see I Value Modification verify Value I Value public boolean verify Value I Value value return false  IValueModification verifyValue IValue verifyValue IValue
see I Java Modifiers is Synthetic public boolean is Synthetic return false  IJavaModifiers isSynthetic isSynthetic
see I Java Modifiers is Public public boolean is Public throws Debug Exception return false  IJavaModifiers isPublic isPublic DebugException
see I Java Modifiers is Private public boolean is Private throws Debug Exception return false  IJavaModifiers isPrivate isPrivate DebugException
see I Java Modifiers is Protected public boolean is Protected throws Debug Exception return false  IJavaModifiers isProtected isProtected DebugException
see I Java Modifiers is Package Private public boolean is Package Private return false  IJavaModifiers isPackagePrivate isPackagePrivate
see I Java Modifiers is Static public boolean is Static return false  IJavaModifiers isStatic isStatic
see I Java Modifiers is Final public boolean is Final return false  IJavaModifiers isFinal isFinal
see org eclipse jdt debug core I Java Variable is Local public boolean is Local return false  IJavaVariable isLocal isLocal
see I Java Variable get Java Type public I Java Type get Java Type throws Debug Exception return JDI Type create Type JDI Debug Target get Debug Target get Underlying Type  IJavaVariable getJavaType IJavaType getJavaType DebugException JDIType createType JDIDebugTarget getDebugTarget getUnderlyingType
Returns the underlying type of this variable return the underlying type of this variable exception Debug Exception if this method fails Reasons include ul li Failure communicating with the VM The Debug Exception s status code contains the underlying exception responsible for the failure li li The type associated with this variable is not yet loaded li ul  DebugException DebugException
Returns the last known value for this variable protected Value get Last Known Value if f Value null return null else return f Value get Underlying Value  getLastKnownValue fValue fValue getUnderlyingValue
Sets this variable s change counter to the specified value param count new value protected void set Change Count int count f Last Change Index count  setChangeCount fLastChangeIndex
Returns this variable s change counter This corresponds to the last time this variable changed return this variable s change counter protected int get Change Count return f Last Change Index  getChangeCount fLastChangeIndex
see I Variable has Value Changed public boolean has Value Changed return get Change Count get Java Debug Target get Suspend Count  IVariable hasValueChanged hasValueChanged getChangeCount getJavaDebugTarget getSuspendCount

Constructs a new void type for the given VM protected JDI Void Type JDI Debug Target target super target null  JDIVoidType JDIDebugTarget
see I Java Type get Name public String get Name return void NON NLS 1  IJavaType getName getName
see I Java Type get Signature public String get Signature return V NON NLS 1  IJavaType getSignature getSignature
see java lang Object equals Object public boolean equals Object object return object instanceof JDI Void Type get Debug Target equals JDI Void Type object get Debug Target  JDIVoidType getDebugTarget JDIVoidType getDebugTarget
see java lang Object hash Code public int hash Code return super hash Code  hashCode hashCode hashCode

public JDI Void Value JDI Debug Target target super target null  JDIVoidValue JDIDebugTarget
protected List get Variables List return Collections EMPTY LIST  getVariablesList EMPTY_LIST
see I Value get Reference Type Name public String get Reference Type Name return void NON NLS 1  IValue getReferenceTypeName getReferenceTypeName
see I Value get Value String public String get Value String return null NON NLS 1  IValue getValueString getValueString
see I Java Value get Signature public String get Signature return V NON NLS 1  IJavaValue getSignature getSignature
see I Java Value get Array Length public int get Array Length return 1  IJavaValue getArrayLength getArrayLength
see I Java Value get Java Type public I Java Type get Java Type return new JDI Void Type JDI Debug Target get Debug Target  IJavaValue getJavaType IJavaType getJavaType JDIVoidType JDIDebugTarget getDebugTarget
see java lang Object to String public String to String return void NON NLS 1  toString toString

Runnable r new Runnable public void run while is Alive boolean interrupted false try Thread sleep get Timeout catch Interrupted Exception e interrupted true if interrupted if get Listener null set Started false set Timeout Integer MAX VALUE get Listener timeout set Listener null  isAlive getTimeout InterruptedException getListener setStarted setTimeout MAX_VALUE getListener setListener
Constructs a new timer public Timer set Timeout Integer MAX VALUE Runnable r new Runnable public void run while is Alive boolean interrupted false try Thread sleep get Timeout catch Interrupted Exception e interrupted true if interrupted if get Listener null set Started false set Timeout Integer MAX VALUE get Listener timeout set Listener null set Thread new Thread r Evaluation Timer NON NLS 1 get Thread set Daemon true get Thread start  setTimeout MAX_VALUE isAlive getTimeout InterruptedException getListener setStarted setTimeout MAX_VALUE getListener setListener setThread getThread setDaemon getThread
Starts this timer and notifies the given listener when the time has passed A call to code stop code before the time expires will cancel the the timer and timeout callback This method can only be called if this timer is idle i e code is Started false code param listener The timer listener param ms The number of milliseconds to wait before notifying the listener public void start I Timeout Listener listener int ms if is Started throw new Illegal State Exception JDI Debug Model Messages get String Timer Timer cannot be started more than once 1 NON NLS 1 set Listener listener set Timeout ms set Started true get Thread interrupt  isStarted ITimeoutListener isStarted IllegalStateException JDIDebugModelMessages getString Timer_cannot_be_started_more_than_once_1 setListener setTimeout setStarted getThread
Stops this timer cancelling any pending timeout notification public void stop if is Alive set Started false set Timeout Integer MAX VALUE get Thread interrupt  isAlive setStarted setTimeout MAX_VALUE getThread
Disposes this timer public void dispose if is Alive set Alive false get Thread interrupt set Thread null  isAlive setAlive getThread setThread
Returns whether this timer s thread is alive return whether this timer s thread is alive private boolean is Alive return f Alive  isAlive fAlive
Sets whether this timer s thread is alive When set to code false code this timer s thread will exit on its next iteration param alive whether this timer s thread should be alive see dispose private void set Alive boolean alive f Alive alive  setAlive fAlive
Returns the current timeout listener return timeout listener protected I Timeout Listener get Listener return f Listener  ITimeoutListener getListener fListener
Sets the listener to be notified if this timer times out param listener timeout listener private void set Listener I Timeout Listener listener f Listener listener  setListener ITimeoutListener fListener
Returns whether this timer has been started and has not yet timed out or been stopped return whether this timer has been started and has not yet timed out or been stopped public boolean is Started return f Started  isStarted fStarted
Sets whether this timer has been started and has not yet timed out or been stopped param started whether this timer has been started and has not yet timed out or been stopped private void set Started boolean started f Started started  setStarted fStarted
Returns this timer s thread return thread that waits for a timeout private Thread get Thread return f Thread  getThread fThread
Sets this timer s thread used to perform timeout processing param thread thread that waits for a timeout private void set Thread Thread thread f Thread thread  setThread fThread
Returns the amount of time in milliseconds that this timer is was waiting for return timeout value in milliseconds protected int get Timeout return f Timeout  getTimeout fTimeout
Sets the amount of time in milliseconds that this timer will wait for before timing out param timeout value in milliseconds private void set Timeout int timeout f Timeout timeout  setTimeout fTimeout

see org eclipse ltk core refactoring participants Refactoring Participant initialize java lang Object protected boolean initialize Object element f Project I Java Project element return true  RefactoringParticipant fProject IJavaProject
see org eclipse ltk core refactoring participants Refactoring Participant get Name public String get Name return Refactoring Messages get String Java BreakpointI Java Project Rename Participant 0 NON NLS 1  RefactoringParticipant getName getName RefactoringMessages getString JavaBreakpointIJavaProjectRenameParticipant
see org eclipse ltk core refactoring participants Refactoring Participant check Conditions org eclipse core runtime I Progress Monitor org eclipse ltk core refactoring participants Check Conditions Context public Refactoring Status check Conditions I Progress Monitor pm Check Conditions Context context throws Operation Canceled Exception return new Refactoring Status  RefactoringParticipant checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus checkConditions IProgressMonitor CheckConditionsContext OperationCanceledException RefactoringStatus
see org eclipse ltk core refactoring participants Refactoring Participant create Change org eclipse core runtime I Progress Monitor public Change create Change I Progress Monitor pm throws Core Exception Operation Canceled Exception return Java Breakpoint Type Change create Changes For Project Rename f Project get Arguments get New Name  RefactoringParticipant createChange IProgressMonitor createChange IProgressMonitor CoreException OperationCanceledException JavaBreakpointTypeChange createChangesForProjectRename fProject getArguments getNewName

protected boolean initialize Object element f Package I Package Fragment element Object destination get Arguments get Destination if destination instanceof I Package Fragment Root f Destination I Package Fragment Root destination return true return false  fPackage IPackageFragment getArguments getDestination IPackageFragmentRoot fDestination IPackageFragmentRoot
see org eclipse ltk core refactoring participants Refactoring Participant get Name public String get Name return Refactoring Messages get String Java BreakpointI Package Fragment Move Participant 0 NON NLS 1  RefactoringParticipant getName getName RefactoringMessages getString JavaBreakpointIPackageFragmentMoveParticipant
see org eclipse ltk core refactoring participants Refactoring Participant check Conditions org eclipse core runtime I Progress Monitor org eclipse ltk core refactoring participants Check Conditions Context public Refactoring Status check Conditions I Progress Monitor pm Check Conditions Context context throws Operation Canceled Exception return new Refactoring Status  RefactoringParticipant checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus checkConditions IProgressMonitor CheckConditionsContext OperationCanceledException RefactoringStatus
see org eclipse ltk core refactoring participants Refactoring Participant create Change org eclipse core runtime I Progress Monitor public Change create Change I Progress Monitor pm throws Core Exception Operation Canceled Exception return Java Breakpoint Type Change create Changes For Package Move f Package f Destination  RefactoringParticipant createChange IProgressMonitor createChange IProgressMonitor CoreException OperationCanceledException JavaBreakpointTypeChange createChangesForPackageMove fPackage fDestination

see org eclipse ltk core refactoring participants Refactoring Participant initialize java lang Object protected boolean initialize Object element f Package I Package Fragment element return true  RefactoringParticipant fPackage IPackageFragment
see org eclipse ltk core refactoring participants Refactoring Participant get Name public String get Name return Refactoring Messages get String Java BreakpointI Package Fragment Rename Participant 0 NON NLS 1  RefactoringParticipant getName getName RefactoringMessages getString JavaBreakpointIPackageFragmentRenameParticipant
see org eclipse ltk core refactoring participants Refactoring Participant check Conditions org eclipse core runtime I Progress Monitor org eclipse ltk core refactoring participants Check Conditions Context public Refactoring Status check Conditions I Progress Monitor pm Check Conditions Context context throws Operation Canceled Exception return new Refactoring Status  RefactoringParticipant checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus checkConditions IProgressMonitor CheckConditionsContext OperationCanceledException RefactoringStatus
see org eclipse ltk core refactoring participants Refactoring Participant create Change org eclipse core runtime I Progress Monitor public Change create Change I Progress Monitor pm throws Core Exception Operation Canceled Exception return Java Breakpoint Type Change create Changes For Package Rename f Package get Arguments get New Name  RefactoringParticipant createChange IProgressMonitor createChange IProgressMonitor CoreException OperationCanceledException JavaBreakpointTypeChange createChangesForPackageRename fPackage getArguments getNewName

protected boolean initialize Object element f Type I Type element f Destination get Arguments get Destination if f Destination instanceof I Package Fragment f Destination instanceof I Type return true return false  fType IType fDestination getArguments getDestination fDestination IPackageFragment fDestination IType
see org eclipse ltk core refactoring participants Refactoring Participant get Name public String get Name return Refactoring Messages get String Java BreakpointI Type Move Participant 0 NON NLS 1  RefactoringParticipant getName getName RefactoringMessages getString JavaBreakpointITypeMoveParticipant
see org eclipse ltk core refactoring participants Refactoring Participant check Conditions org eclipse core runtime I Progress Monitor org eclipse ltk core refactoring participants Check Conditions Context public Refactoring Status check Conditions I Progress Monitor pm Check Conditions Context context return new Refactoring Status  RefactoringParticipant checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus
see org eclipse ltk core refactoring participants Refactoring Participant create Change org eclipse core runtime I Progress Monitor public Change create Change I Progress Monitor pm throws Core Exception return Java Breakpoint Type Change create Changes For Type Move f Type f Destination  RefactoringParticipant createChange IProgressMonitor createChange IProgressMonitor CoreException JavaBreakpointTypeChange createChangesForTypeMove fType fDestination

java lang Object public boolean initialize Object element f Type I Type element return true  fType IType
org eclipse ltk core refactoring participants Check Conditions Context public Refactoring Status check Conditions I Progress Monitor pm Check Conditions Context context return new Refactoring Status  CheckConditionsContext RefactoringStatus checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus
see org eclipse ltk core refactoring participants Refactoring Participant create Change org eclipse core runtime I Progress Monitor public Change create Change I Progress Monitor pm throws Core Exception return Java Breakpoint Type Change create Changes For Type Rename f Type get Arguments get New Name  RefactoringParticipant createChange IProgressMonitor createChange IProgressMonitor CoreException JavaBreakpointTypeChange createChangesForTypeRename fType getArguments getNewName
see org eclipse ltk core refactoring participants Refactoring Participant get Name public String get Name return Refactoring Messages get String Java BreakpointI Type Rename Participant 0 NON NLS 1  RefactoringParticipant getName getName RefactoringMessages getString JavaBreakpointITypeRenameParticipant

Create changes for each breakpoint which needs to be updated for this I Type rename public static Change create Changes For Type Rename I Type type String new Name throws Core Exception return create Changes For Type Change type new Name TYPE RENAME  IType createChangesForTypeRename IType newName CoreException createChangesForTypeChange newName TYPE_RENAME
Create changes for each breakpoint which needs to be updated for this I Type move public static Change create Changes For Type Move I Type type Object destination throws Core Exception return create Changes For Type Change type destination TYPE MOVE  IType createChangesForTypeMove IType CoreException createChangesForTypeChange TYPE_MOVE
Create a change for each breakpoint which needs to be updated for this I Java Project rename public static Change create Changes For Project Rename I Java Project project String new Name throws Core Exception List changes new Array List I Breakpoint breakpoints Debug Plugin get Default get Breakpoint Manager get Breakpoints JDI Debug Model get Plugin Identifier for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if breakpoint instanceof I Java Breakpoint I Java Breakpoint java Breakpoint I Java Breakpoint breakpoint I Type breakpoint Type Breakpoint Utils get Type java Breakpoint if breakpoint Type null project equals breakpoint Type get Java Project changes add create Change java Breakpoint null new Name PROJECT RENAME return JDT Debug Refactoring Util create Change From List changes Refactoring Messages get String Java Breakpoint Type Change 0 NON NLS 1  IJavaProject createChangesForProjectRename IJavaProject newName CoreException ArrayList IBreakpoint DebugPlugin getDefault getBreakpointManager getBreakpoints JDIDebugModel getPluginIdentifier IBreakpoint IJavaBreakpoint IJavaBreakpoint javaBreakpoint IJavaBreakpoint IType breakpointType BreakpointUtils getType javaBreakpoint breakpointType breakpointType getJavaProject createChange javaBreakpoint newName PROJECT_RENAME JDTDebugRefactoringUtil createChangeFromList RefactoringMessages getString JavaBreakpointTypeChange
Create a change for each breakpoint which needs to be updated for this I Package Fragment rename public static Change create Changes For Package Rename I Package Fragment package Fragment String new Name throws Core Exception return create Changes For Package Change package Fragment new Name PACKAGE RENAME  IPackageFragment createChangesForPackageRename IPackageFragment packageFragment newName CoreException createChangesForPackageChange packageFragment newName PACKAGE_RENAME
Create a change for each breakponit which needs to be updated for this I Package Fragment move public static Change create Changes For Package Move I Package Fragment package Fragment I Package Fragment Root destination throws Core Exception return create Changes For Package Change package Fragment destination PACKAGE MOVE  IPackageFragment createChangesForPackageMove IPackageFragment packageFragment IPackageFragmentRoot CoreException createChangesForPackageChange packageFragment PACKAGE_MOVE
Create changes for each breakpoint which need to be updated for this I Type change private static Change create Changes For Type Change I Type changed Type Object argument int change Type throws Core Exception List changes new Array List I Breakpoint breakpoints Debug Plugin get Default get Breakpoint Manager get Breakpoints JDI Debug Model get Plugin Identifier String type Name changed Type get Fully Qualified Name for int i 0 i breakpoints length i for each breakpoint I Breakpoint breakpoint breakpoints i if breakpoint instanceof I Java Breakpoint I Java Breakpoint java Breakpoint I Java Breakpoint breakpoint I Type breakpoint Type Breakpoint Utils get Type java Breakpoint check the name of the type where the breakpoint is installed if breakpoint Type null java Breakpoint get Type Name starts With type Name if it matcheds check the type if changed Type equals breakpoint Type changes add create Change java Breakpoint changed Type argument change Type else if it s not the type check the inner types Change change create Changes For Outer Type Change java Breakpoint changed Type changed Type argument change Type if change null changes add change return JDT Debug Refactoring Util create Change From List changes Refactoring Messages get String Java Breakpoint Type Change 0 NON NLS 1  IType createChangesForTypeChange IType changedType changeType CoreException ArrayList IBreakpoint DebugPlugin getDefault getBreakpointManager getBreakpoints JDIDebugModel getPluginIdentifier typeName changedType getFullyQualifiedName IBreakpoint IJavaBreakpoint IJavaBreakpoint javaBreakpoint IJavaBreakpoint IType breakpointType BreakpointUtils getType javaBreakpoint breakpointType javaBreakpoint getTypeName startsWith typeName changedType breakpointType createChange javaBreakpoint changedType changeType createChangesForOuterTypeChange javaBreakpoint changedType changedType changeType JDTDebugRefactoringUtil createChangeFromList RefactoringMessages getString JavaBreakpointTypeChange
private static Change create Changes For Outer Type Change I Java Breakpoint java Breakpoint I Type type I Type changed Type Object argument int change Type throws Core Exception I Type inner Types type get Types String breakpoint Type Name java Breakpoint get Type Name I Type breakpoint Type Breakpoint Utils get Type java Breakpoint for int i 0 i inner Types length i I Type inner Type inner Types i check the name of the type where the breakpoint is installed if breakpoint Type Name starts With inner Type get Fully Qualified Name if it matcheds check the type if inner Type equals breakpoint Type return create Change java Breakpoint changed Type argument change Type if it s not the type check the inner types return create Changes For Outer Type Change java Breakpoint inner Type changed Type argument change Type return null  createChangesForOuterTypeChange IJavaBreakpoint javaBreakpoint IType IType changedType changeType CoreException IType innerTypes getTypes breakpointTypeName javaBreakpoint getTypeName IType breakpointType BreakpointUtils getType javaBreakpoint innerTypes IType innerType innerTypes breakpointTypeName startsWith innerType getFullyQualifiedName innerType breakpointType createChange javaBreakpoint changedType changeType createChangesForOuterTypeChange javaBreakpoint innerType changedType changeType
Create a change for each breakpoint which needs to be updated for this I Package Fragment change private static Change create Changes For Package Change I Package Fragment package Fragment Object argument int change Type throws Core Exception List changes new Array List I Breakpoint breakpoints Debug Plugin get Default get Breakpoint Manager get Breakpoints JDI Debug Model get Plugin Identifier for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if breakpoint instanceof I Java Breakpoint I Java Breakpoint java Breakpoint I Java Breakpoint breakpoint I Type breakpoint Type Breakpoint Utils get Type java Breakpoint if breakpoint Type null package Fragment equals breakpoint Type get Package Fragment changes add create Change java Breakpoint package Fragment argument change Type return JDT Debug Refactoring Util create Change From List changes Refactoring Messages get String Java Breakpoint Type Change 0 NON NLS 1  IPackageFragment createChangesForPackageChange IPackageFragment packageFragment changeType CoreException ArrayList IBreakpoint DebugPlugin getDefault getBreakpointManager getBreakpoints JDIDebugModel getPluginIdentifier IBreakpoint IJavaBreakpoint IJavaBreakpoint javaBreakpoint IJavaBreakpoint IType breakpointType BreakpointUtils getType javaBreakpoint breakpointType packageFragment breakpointType getPackageFragment createChange javaBreakpoint packageFragment changeType JDTDebugRefactoringUtil createChangeFromList RefactoringMessages getString JavaBreakpointTypeChange
Create a change according to type of the breakpoint private static Change create Change I Java Breakpoint java Breakpoint Object changed Element Object argument int change Type throws Core Exception if java Breakpoint instanceof I Java Class Prepare Breakpoint return new Java Class Prepare Breakpoint Type Change I Java Class Prepare Breakpoint java Breakpoint changed Element argument change Type else if java Breakpoint instanceof I Java Exception Breakpoint return new Java Exception Breakpoint Type Change I Java Exception Breakpoint java Breakpoint changed Element argument change Type else if java Breakpoint instanceof I Java Method Breakpoint return new Java Method Breakpoint Type Change I Java Method Breakpoint java Breakpoint changed Element argument change Type else if java Breakpoint instanceof I Java Watchpoint return new Java Watchpoint Type Change I Java Watchpoint java Breakpoint changed Element argument change Type else if java Breakpoint instanceof I Java Line Breakpoint return new Java Line Breakpoint Type Change I Java Line Breakpoint java Breakpoint changed Element argument change Type else return null  createChange IJavaBreakpoint javaBreakpoint changedElement changeType CoreException javaBreakpoint IJavaClassPrepareBreakpoint JavaClassPrepareBreakpointTypeChange IJavaClassPrepareBreakpoint javaBreakpoint changedElement changeType javaBreakpoint IJavaExceptionBreakpoint JavaExceptionBreakpointTypeChange IJavaExceptionBreakpoint javaBreakpoint changedElement changeType javaBreakpoint IJavaMethodBreakpoint JavaMethodBreakpointTypeChange IJavaMethodBreakpoint javaBreakpoint changedElement changeType javaBreakpoint IJavaWatchpoint JavaWatchpointTypeChange IJavaWatchpoint javaBreakpoint changedElement changeType javaBreakpoint IJavaLineBreakpoint JavaLineBreakpointTypeChange IJavaLineBreakpoint javaBreakpoint changedElement changeType
Java Breakpoint Type Change constructor protected Java Breakpoint Type Change I Java Breakpoint breakpoint Object changed Element Object argument int change Type throws Core Exception f Breakpoint breakpoint f Changed Element changed Element f Argument argument f Change Type change Type f Declaring Type Breakpoint Utils get Type breakpoint f Attributes breakpoint get Marker get Attributes f Is Enable breakpoint is Enabled f Hit Count breakpoint get Hit Count  JavaBreakpointTypeChange JavaBreakpointTypeChange IJavaBreakpoint changedElement changeType CoreException fBreakpoint fChangedElement changedElement fArgument fChangeType changeType fDeclaringType BreakpointUtils getType fAttributes getMarker getAttributes fIsEnable isEnabled fHitCount getHitCount
see org eclipse ltk core refactoring Change initialize Validation Data org eclipse core runtime I Progress Monitor public void initialize Validation Data I Progress Monitor pm  initializeValidationData IProgressMonitor initializeValidationData IProgressMonitor
public Refactoring Status is Valid I Progress Monitor pm throws Core Exception Refactoring Status status new Refactoring Status if f Breakpoint is Registered status add Fatal Error get Error Message No More Exists return status  RefactoringStatus isValid IProgressMonitor CoreException RefactoringStatus RefactoringStatus fBreakpoint isRegistered addFatalError getErrorMessageNoMoreExists
public Change perform I Progress Monitor pm throws Core Exception switch f Change Type case TYPE RENAME return perform Type Rename case TYPE MOVE return perform Type Move case PROJECT RENAME return perform Project Rename case PACKAGE RENAME return perform Package Rename case PACKAGE MOVE return perform Package Move return null  IProgressMonitor CoreException fChangeType TYPE_RENAME performTypeRename TYPE_MOVE performTypeMove PROJECT_RENAME performProjectRename PACKAGE_RENAME performPackageRename PACKAGE_MOVE performPackageMove
private Change perform Type Rename throws Core Exception Get the new type and the new changed type then call the code specific to this type of breakpoint I Type changed Type get Changed Type String old Changed Type Name changed Type get Fully Qualified Name String new Changed Type Name I Type parent changed Type get Declaring Type if parent null new Changed Type Name changed Type get Package Fragment get Element Name get New Name else new Changed Type Name parent get Fully Qualified Name get New Name I Type new Changed Type I Type new Type I Java Project project f Declaring Type get Java Project if changed Type f Declaring Type new Type project find Type new Changed Type Name new Changed Type new Type else String type Name Suffix f Declaring Type get Fully Qualified Name substring old Changed Type Name length String new Type Name new Changed Type Name type Name Suffix new Type project find Type new Type Name new Changed Type project find Type new Changed Type Name return perform Change new Type new Changed Type changed Type get Element Name TYPE RENAME return new Null Change  performTypeRename CoreException IType changedType getChangedType oldChangedTypeName changedType getFullyQualifiedName newChangedTypeName IType changedType getDeclaringType newChangedTypeName changedType getPackageFragment getElementName getNewName newChangedTypeName getFullyQualifiedName getNewName IType newChangedType IType newType IJavaProject fDeclaringType getJavaProject changedType fDeclaringType newType findType newChangedTypeName newChangedType newType typeNameSuffix fDeclaringType getFullyQualifiedName oldChangedTypeName newTypeName newChangedTypeName typeNameSuffix newType findType newTypeName newChangedType findType newChangedTypeName performChange newType newChangedType changedType getElementName TYPE_RENAME NullChange
private Change perform Type Move throws Core Exception Get the new type and the new changed type then call the code specific to this type of breakpoint I Type changed Type get Changed Type Object destination get Destination String new Changed Type Name if destination instanceof I Package Fragment I Package Fragment package Destination I Package Fragment destination if package Destination is Default Package new Changed Type Name changed Type get Element Name else new Changed Type Name I Package Fragment destination get Element Name changed Type get Element Name else new Changed Type Name I Type destination get Fully Qualified Name changed Type get Element Name I Type new Changed Type I Type new Type I Java Project project f Declaring Type get Java Project if changed Type f Declaring Type new Type project find Type new Changed Type Name new Changed Type new Type else String old Changed Type Name changed Type get Fully Qualified Name String type Name Suffix f Declaring Type get Fully Qualified Name substring old Changed Type Name length String new Type Name new Changed Type Name type Name Suffix new Type project find Type new Type Name new Changed Type project find Type new Changed Type Name Object old Destination changed Type get Declaring Type if old Destination null old Destination changed Type get Package Fragment return perform Change new Type new Changed Type old Destination TYPE MOVE return new Null Change  performTypeMove CoreException IType changedType getChangedType getDestination newChangedTypeName IPackageFragment IPackageFragment packageDestination IPackageFragment packageDestination isDefaultPackage newChangedTypeName changedType getElementName newChangedTypeName IPackageFragment getElementName changedType getElementName newChangedTypeName IType getFullyQualifiedName changedType getElementName IType newChangedType IType newType IJavaProject fDeclaringType getJavaProject changedType fDeclaringType newType findType newChangedTypeName newChangedType newType oldChangedTypeName changedType getFullyQualifiedName typeNameSuffix fDeclaringType getFullyQualifiedName oldChangedTypeName newTypeName newChangedTypeName typeNameSuffix newType findType newTypeName newChangedType findType newChangedTypeName oldDestination changedType getDeclaringType oldDestination oldDestination changedType getPackageFragment performChange newType newChangedType oldDestination TYPE_MOVE NullChange
private Change perform Project Rename throws Core Exception Get the new type then call the code specific to this type of breakpoint I Java Project project Java Core create Resources Plugin get Workspace get Root get Project get New Name I Type new Type project find Type f Declaring Type get Fully Qualified Name return perform Change new Type null f Declaring Type get Java Project get Element Name PROJECT RENAME return new Null Change  performProjectRename CoreException IJavaProject JavaCore ResourcesPlugin getWorkspace getRoot getProject getNewName IType newType findType fDeclaringType getFullyQualifiedName performChange newType fDeclaringType getJavaProject getElementName PROJECT_RENAME NullChange
private Change perform Package Rename throws Core Exception Get the new type and the new package fragment then call the code specific to this type of breakpoint I Package Fragment changed Package get Change Package I Java Project project f Declaring Type get Java Project String new Type Name get New Name f Declaring Type get Fully Qualified Name substring changed Package get Element Name length I Type new Type project find Type new Type Name return perform Change new Type new Type get Package Fragment changed Package get Element Name PACKAGE RENAME return new Null Change  performPackageRename CoreException IPackageFragment changedPackage getChangePackage IJavaProject fDeclaringType getJavaProject newTypeName getNewName fDeclaringType getFullyQualifiedName changedPackage getElementName IType newType findType newTypeName performChange newType newType getPackageFragment changedPackage getElementName PACKAGE_RENAME NullChange
private Change perform Package Move throws Core Exception I Package Fragment Root destination get Package Root Destination I Package Fragment changed Package get Change Package I Java Project project destination get Java Project I Type new Type project find Type f Declaring Type get Fully Qualified Name return perform Change new Type new Type get Package Fragment changed Package get Parent PROJECT RENAME return new Null Change  performPackageMove CoreException IPackageFragmentRoot getPackageRootDestination IPackageFragment changedPackage getChangePackage IJavaProject getJavaProject IType newType findType fDeclaringType getFullyQualifiedName performChange newType newType getPackageFragment changedPackage getParent PROJECT_RENAME NullChange
see org eclipse ltk core refactoring Change get Modified Element public Object get Modified Element return get Breakpoint  getModifiedElement getModifiedElement getBreakpoint
Return the breakpoint modified in this change public I Java Breakpoint get Breakpoint return f Breakpoint  IJavaBreakpoint getBreakpoint fBreakpoint
Return the new name of the changed type for a I Type I Java Project or I Package Fragment rename change public String get New Name if f Change Type TYPE RENAME f Change Type PROJECT RENAME f Change Type PACKAGE RENAME return String f Argument return null  IType IJavaProject IPackageFragment getNewName fChangeType TYPE_RENAME fChangeType PROJECT_RENAME fChangeType PACKAGE_RENAME fArgument
Return the destination for a I Type move change private Object get Destination if f Change Type TYPE MOVE return f Argument return null  IType getDestination fChangeType TYPE_MOVE fArgument
Return the destination for a I Package Fragment move change private I Package Fragment Root get Package Root Destination if f Change Type PACKAGE MOVE return I Package Fragment Root f Argument return null  IPackageFragment IPackageFragmentRoot getPackageRootDestination fChangeType PACKAGE_MOVE IPackageFragmentRoot fArgument
Return the original declaring type of the breakpoint public I Type get Declaring Type return f Declaring Type  IType getDeclaringType fDeclaringType
Return the type modified public I Type get Changed Type if f Change Type TYPE RENAME f Change Type TYPE MOVE return I Type f Changed Element return null  IType getChangedType fChangeType TYPE_RENAME fChangeType TYPE_MOVE IType fChangedElement
Return the package modified public I Package Fragment get Change Package if f Change Type PACKAGE RENAME f Change Type PACKAGE MOVE return I Package Fragment f Changed Element return null  IPackageFragment getChangePackage fChangeType PACKAGE_RENAME fChangeType PACKAGE_MOVE IPackageFragment fChangedElement
Return the enable state of the breakpoint public boolean get Enable return f Is Enable  getEnable fIsEnable
Return the attributes map of the breakpoint public Map get Attributes return f Attributes  getAttributes fAttributes
Return the hit count of the breakpoint public int get Hit Count return f Hit Count  getHitCount fHitCount
Return the message to use if the breakpoint no more exists used in is Valid public abstract String get Error Message No More Exists  isValid getErrorMessageNoMoreExists
Perform the real modifications return the undo change 

private int f Member Type public Java Class Prepare Breakpoint Type Change I Java Class Prepare Breakpoint class Prepare Breakpoint Object changed Element Object argument int change Type throws Core Exception super class Prepare Breakpoint changed Element argument change Type f Member Type class Prepare Breakpoint get Member Type  fMemberType JavaClassPrepareBreakpointTypeChange IJavaClassPrepareBreakpoint classPrepareBreakpoint changedElement changeType CoreException classPrepareBreakpoint changedElement changeType fMemberType classPrepareBreakpoint getMemberType
see org eclipse jdt internal debug core refactoring Java Breakpoint Type Name Change get Error Message No More Exists public String get Error Message No More Exists return Message Format format Refactoring Messages get String Java Class Prepare Breakpoint Type Change 0 new String get Declaring Type get Element Name NON NLS 1  JavaBreakpointTypeNameChange getErrorMessageNoMoreExists getErrorMessageNoMoreExists MessageFormat RefactoringMessages getString JavaClassPrepareBreakpointTypeChange getDeclaringType getElementName
see org eclipse ltk core refactoring Change get Name public String get Name return Message Format format Refactoring Messages get String Java Class Prepare Breakpoint Type Change 1 new String get Declaring Type get Element Name NON NLS 1  getName getName MessageFormat RefactoringMessages getString JavaClassPrepareBreakpointTypeChange getDeclaringType getElementName
public Change perform Change I Type new Type Object undo Changed Element Object undo Argument int change Type throws Core Exception Map attributes get Attributes Breakpoint Utils add Java Breakpoint Attributes attributes new Type I Source Range range new Type get Name Range int char Start 1 int char End 1 if range null char Start range get Offset char End char Start range get Length create the new breakpoint I Java Class Prepare Breakpoint new Class Prepare Breakpoint JDI Debug Model create Class Prepare Breakpoint new Type get Resource new Type get Fully Qualified Name f Member Type char Start char End true attributes delete the old one get Breakpoint delete return new Java Class Prepare Breakpoint Type Change new Class Prepare Breakpoint undo Changed Element undo Argument change Type  performChange IType newType undoChangedElement undoArgument changeType CoreException getAttributes BreakpointUtils addJavaBreakpointAttributes newType ISourceRange newType getNameRange charStart charEnd charStart getOffset charEnd charStart getLength IJavaClassPrepareBreakpoint newClassPrepareBreakpoint JDIDebugModel createClassPrepareBreakpoint newType getResource newType getFullyQualifiedName fMemberType charStart charEnd getBreakpoint JavaClassPrepareBreakpointTypeChange newClassPrepareBreakpoint undoChangedElement undoArgument changeType

public Java Exception Breakpoint Type Change I Java Exception Breakpoint class Prepare Breakpoint Object changed Element Object argument int change Type throws Core Exception super class Prepare Breakpoint changed Element argument change Type f Is Caught class Prepare Breakpoint is Caught f Is Uncaught class Prepare Breakpoint is Uncaught f Is Checked class Prepare Breakpoint is Checked  JavaExceptionBreakpointTypeChange IJavaExceptionBreakpoint classPrepareBreakpoint changedElement changeType CoreException classPrepareBreakpoint changedElement changeType fIsCaught classPrepareBreakpoint isCaught fIsUncaught classPrepareBreakpoint isUncaught fIsChecked classPrepareBreakpoint isChecked
see org eclipse jdt internal debug core refactoring Java Breakpoint Type Name Change get Error Message No More Exists public String get Error Message No More Exists return Message Format format Refactoring Messages get String Java Exception Breakpoint Type Change 0 new String get Declaring Type get Element Name NON NLS 1  JavaBreakpointTypeNameChange getErrorMessageNoMoreExists getErrorMessageNoMoreExists MessageFormat RefactoringMessages getString JavaExceptionBreakpointTypeChange getDeclaringType getElementName
see org eclipse ltk core refactoring Change get Name public String get Name return Message Format format Refactoring Messages get String Java Exception Breakpoint Type Change 1 new String get Declaring Type get Element Name NON NLS 1  getName getName MessageFormat RefactoringMessages getString JavaExceptionBreakpointTypeChange getDeclaringType getElementName
public Change perform Change I Type new Type Object undo Changed Element Object undo Argument int change Type throws Core Exception Map attributes get Attributes Breakpoint Utils add Java Breakpoint Attributes attributes new Type create the new breakpoint I Java Exception Breakpoint new Exception Breakpoint JDI Debug Model create Exception Breakpoint new Type get Resource new Type get Fully Qualified Name f Is Caught f Is Uncaught f Is Checked true attributes delete the old one get Breakpoint delete return new Java Exception Breakpoint Type Change new Exception Breakpoint undo Changed Element undo Argument change Type  performChange IType newType undoChangedElement undoArgument changeType CoreException getAttributes BreakpointUtils addJavaBreakpointAttributes newType IJavaExceptionBreakpoint newExceptionBreakpoint JDIDebugModel createExceptionBreakpoint newType getResource newType getFullyQualifiedName fIsCaught fIsUncaught fIsChecked getBreakpoint JavaExceptionBreakpointTypeChange newExceptionBreakpoint undoChangedElement undoArgument changeType

public Java Line Breakpoint Type Change I Java Line Breakpoint line Breakpoint Object changed Element Object argument int change Type throws Core Exception super line Breakpoint changed Element argument change Type f Line Number line Breakpoint get Line Number f Char Start line Breakpoint get Char Start f Char End line Breakpoint get Char End  JavaLineBreakpointTypeChange IJavaLineBreakpoint lineBreakpoint changedElement changeType CoreException lineBreakpoint changedElement changeType fLineNumber lineBreakpoint getLineNumber fCharStart lineBreakpoint getCharStart fCharEnd lineBreakpoint getCharEnd
see org eclipse jdt internal debug core refactoring Java Breakpoint Type Name Change get Error Message No More Exists public String get Error Message No More Exists return Message Format format Refactoring Messages get String Java Line Breakpoint Type Change 0 new String get Declaring Type get Element Name Integer to String f Line Number NON NLS 1  JavaBreakpointTypeNameChange getErrorMessageNoMoreExists getErrorMessageNoMoreExists MessageFormat RefactoringMessages getString JavaLineBreakpointTypeChange getDeclaringType getElementName toString fLineNumber
see org eclipse ltk core refactoring Change get Name public String get Name return Message Format format Refactoring Messages get String Java Line Breakpoint Type Change 1 new String get Declaring Type get Element Name Integer to String f Line Number NON NLS 1  getName getName MessageFormat RefactoringMessages getString JavaLineBreakpointTypeChange getDeclaringType getElementName toString fLineNumber
public Change perform Change I Type new Type Object undo Changed Element Object undo Argument int change Type throws Core Exception Map attributes get Attributes Breakpoint Utils add Java Breakpoint Attributes attributes new Type create the new breakpoint I Java Line Breakpoint new Line Breakpoint JDI Debug Model create Line Breakpoint new Type get Resource new Type get Fully Qualified Name f Line Number f Char Start f Char End get Hit Count true attributes delete the old one get Breakpoint delete return new Java Line Breakpoint Type Change new Line Breakpoint undo Changed Element undo Argument change Type  performChange IType newType undoChangedElement undoArgument changeType CoreException getAttributes BreakpointUtils addJavaBreakpointAttributes newType IJavaLineBreakpoint newLineBreakpoint JDIDebugModel createLineBreakpoint newType getResource newType getFullyQualifiedName fLineNumber fCharStart fCharEnd getHitCount getBreakpoint JavaLineBreakpointTypeChange newLineBreakpoint undoChangedElement undoArgument changeType
public int get Char End return f Char End  getCharEnd fCharEnd
public int get Char Start return f Char Start  getCharStart fCharStart
Return the number of the line where the breakpoint is set public int get Line Number return f Line Number  getLineNumber fLineNumber

public boolean initialize Object element f Method I Method element try return f Method get Declaring Type is Local catch Java Model Exception e return false  fMethod IMethod fMethod getDeclaringType isLocal JavaModelException
public String get Name return Refactoring Messages get String Java Method BreakpointI Method Rename Participant 0 NON NLS 1  getName RefactoringMessages getString JavaMethodBreakpointIMethodRenameParticipant
see org eclipse jdt internal corext refactoring participants I Refactoring Participant create Change org eclipse core runtime I Progress Monitor public Change create Change I Progress Monitor pm throws Core Exception return Java Method Breakpoint Method Name Change create Change f Method get Arguments get New Name  IRefactoringParticipant createChange IProgressMonitor createChange IProgressMonitor CoreException JavaMethodBreakpointMethodNameChange createChange fMethod getArguments getNewName
see org eclipse ltk core refactoring participants Refactoring Participant check Final Conditions org eclipse core runtime I Progress Monitor org eclipse ltk core refactoring participants Check Conditions Context public Refactoring Status check Conditions I Progress Monitor pm Check Conditions Context context return new Refactoring Status  RefactoringParticipant checkFinalConditions IProgressMonitor CheckConditionsContext RefactoringStatus checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus

Return the change object to used to update the corresponding java method breakpoint Return code null code if there is no breakpoint for this method public static Change create Change I Method method String new Name throws Core Exception I Type declaring Type method get Declaring Type String type Name declaring Type get Fully Qualified Name String method Name method get Element Name String method Signature Toggle Breakpoint Adapter resolve Method Signature declaring Type method get Signature I Breakpoint Manager breakpoint Manager Debug Plugin get Default get Breakpoint Manager I Breakpoint breakpoints breakpoint Manager get Breakpoints JDI Debug Model get Plugin Identifier for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if breakpoint instanceof I Java Method Breakpoint I Java Method Breakpoint method Breakpoint I Java Method Breakpoint breakpoint if type Name equals method Breakpoint get Type Name method Name equals method Breakpoint get Method Name method Signature equals method Breakpoint get Method Signature return new Java Method Breakpoint Method Name Change method Breakpoint new Name return null  createChange IMethod newName CoreException IType declaringType getDeclaringType typeName declaringType getFullyQualifiedName methodName getElementName methodSignature ToggleBreakpointAdapter resolveMethodSignature declaringType getSignature IBreakpointManager breakpointManager DebugPlugin getDefault getBreakpointManager IBreakpoint breakpointManager getBreakpoints JDIDebugModel getPluginIdentifier IBreakpoint IJavaMethodBreakpoint IJavaMethodBreakpoint methodBreakpoint IJavaMethodBreakpoint typeName methodBreakpoint getTypeName methodName methodBreakpoint getMethodName methodSignature methodBreakpoint getMethodSignature JavaMethodBreakpointMethodNameChange methodBreakpoint newName
protected Java Method Breakpoint Method Name Change I Java Method Breakpoint method Breakpoint String new Name throws Core Exception f Method Breakpoint method Breakpoint f New Method Name new Name f Old Method Name f Method Breakpoint get Method Name f Declaring Type Breakpoint Utils get Type method Breakpoint  JavaMethodBreakpointMethodNameChange IJavaMethodBreakpoint methodBreakpoint newName CoreException fMethodBreakpoint methodBreakpoint fNewMethodName newName fOldMethodName fMethodBreakpoint getMethodName fDeclaringType BreakpointUtils getType methodBreakpoint
see org eclipse jdt internal corext refactoring base Change get Name public String get Name return Message Format format Refactoring Messages get String Java Method Breakpoint Method Name Change 0 new String f Declaring Type get Element Name f Old Method Name NON NLS 1  getName getName MessageFormat RefactoringMessages getString JavaMethodBreakpointMethodNameChange fDeclaringType getElementName fOldMethodName
see org eclipse ltk core refactoring Change initialize Validation Data org eclipse core runtime I Progress Monitor public void initialize Validation Data I Progress Monitor pm  initializeValidationData IProgressMonitor initializeValidationData IProgressMonitor
public Refactoring Status is Valid I Progress Monitor pm throws Core Exception Refactoring Status status new Refactoring Status if f Method Breakpoint is Registered status add Fatal Error Message Format format Refactoring Messages get String Java Method Breakpoint Method Name Change 1 new String f Declaring Type get Element Name f Old Method Name NON NLS 1 return status  RefactoringStatus isValid IProgressMonitor CoreException RefactoringStatus RefactoringStatus fMethodBreakpoint isRegistered addFatalError MessageFormat RefactoringMessages getString JavaMethodBreakpointMethodNameChange fDeclaringType getElementName fOldMethodName
public Change perform I Progress Monitor pm throws Core Exception String method Signature f Method Breakpoint get Method Signature String parameter Types Signature get Parameter Types method Signature for int i 0 i parameter Types length i parameter Types i parameter Types i replace I Method method f Declaring Type get Method f New Method Name parameter Types Map attributes f Method Breakpoint get Marker get Attributes Breakpoint Utils add Java Breakpoint Attributes attributes method boolean is Enable f Method Breakpoint is Enabled I Java Method Breakpoint new Method Breakpoint JDI Debug Model create Method Breakpoint f Method Breakpoint get Marker get Resource f Method Breakpoint get Type Name f New Method Name method Signature f Method Breakpoint is Entry f Method Breakpoint is Exit f Method Breakpoint is Native Only f Method Breakpoint get Line Number f Method Breakpoint get Char Start f Method Breakpoint get Char End f Method Breakpoint get Hit Count true attributes new Method Breakpoint set Enabled is Enable f Method Breakpoint delete return new Java Method Breakpoint Method Name Change new Method Breakpoint f Old Method Name  IProgressMonitor CoreException methodSignature fMethodBreakpoint getMethodSignature parameterTypes getParameterTypes methodSignature parameterTypes parameterTypes parameterTypes IMethod fDeclaringType getMethod fNewMethodName parameterTypes fMethodBreakpoint getMarker getAttributes BreakpointUtils addJavaBreakpointAttributes isEnable fMethodBreakpoint isEnabled IJavaMethodBreakpoint newMethodBreakpoint JDIDebugModel createMethodBreakpoint fMethodBreakpoint getMarker getResource fMethodBreakpoint getTypeName fNewMethodName methodSignature fMethodBreakpoint isEntry fMethodBreakpoint isExit fMethodBreakpoint isNativeOnly fMethodBreakpoint getLineNumber fMethodBreakpoint getCharStart fMethodBreakpoint getCharEnd fMethodBreakpoint getHitCount newMethodBreakpoint setEnabled isEnable fMethodBreakpoint JavaMethodBreakpointMethodNameChange newMethodBreakpoint fOldMethodName
see org eclipse jdt internal corext refactoring base Change get Modified Element public Object get Modified Element return f Method Breakpoint  getModifiedElement getModifiedElement fMethodBreakpoint

public Java Method Breakpoint Type Change I Java Method Breakpoint method Breakpoint Object changed Element Object argument int change Type throws Core Exception super method Breakpoint changed Element argument change Type f Method Name method Breakpoint get Method Name f Method Signature method Breakpoint get Method Signature f Is Entry method Breakpoint is Entry f Is Exit method Breakpoint is Exit f Is Native Only method Breakpoint is Native Only f Is Enable method Breakpoint is Enabled  JavaMethodBreakpointTypeChange IJavaMethodBreakpoint methodBreakpoint changedElement changeType CoreException methodBreakpoint changedElement changeType fMethodName methodBreakpoint getMethodName fMethodSignature methodBreakpoint getMethodSignature fIsEntry methodBreakpoint isEntry fIsExit methodBreakpoint isExit fIsNativeOnly methodBreakpoint isNativeOnly fIsEnable methodBreakpoint isEnabled
see org eclipse jdt internal debug core refactoring Java Breakpoint Type Name Change get Error Message No More Exists public String get Error Message No More Exists return Message Format format Refactoring Messages get String Java Method Breakpoint Type Change 0 new String get Declaring Type get Element Name f Method Name NON NLS 1  JavaBreakpointTypeNameChange getErrorMessageNoMoreExists getErrorMessageNoMoreExists MessageFormat RefactoringMessages getString JavaMethodBreakpointTypeChange getDeclaringType getElementName fMethodName
see org eclipse ltk core refactoring Change get Name public String get Name return Message Format format Refactoring Messages get String Java Method Breakpoint Type Change 1 new String get Declaring Type get Element Name f Method Name NON NLS 1  getName getName MessageFormat RefactoringMessages getString JavaMethodBreakpointTypeChange getDeclaringType getElementName fMethodName
public Change perform Change I Type new Type Object undo Changed Element Object undo Argument int change Type throws Core Exception String parameter Types Signature get Parameter Types f Method Signature for int i 0 i parameter Types length i parameter Types i parameter Types i replace I Method method new Type get Method f Method Name parameter Types I Method methods new Type find Methods method int line Number get Line Number int start get Char Start int end get Char End if methods length 1 method methods 0 I Source Range range method get Name Range if range null start range get Offset end start range get Length line Number 1 Map attributes get Attributes Breakpoint Utils add Java Breakpoint Attributes attributes method I Java Method Breakpoint new Method Breakpoint JDI Debug Model create Method Breakpoint new Type get Resource new Type get Fully Qualified Name f Method Name f Method Signature f Is Entry f Is Exit f Is Native Only line Number start end get Hit Count true attributes new Method Breakpoint set Enabled f Is Enable get Breakpoint delete return new Java Method Breakpoint Type Change new Method Breakpoint undo Changed Element undo Argument change Type  performChange IType newType undoChangedElement undoArgument changeType CoreException parameterTypes getParameterTypes fMethodSignature parameterTypes parameterTypes parameterTypes IMethod newType getMethod fMethodName parameterTypes IMethod newType findMethods lineNumber getLineNumber getCharStart getCharEnd ISourceRange getNameRange getOffset getLength lineNumber getAttributes BreakpointUtils addJavaBreakpointAttributes IJavaMethodBreakpoint newMethodBreakpoint JDIDebugModel createMethodBreakpoint newType getResource newType getFullyQualifiedName fMethodName fMethodSignature fIsEntry fIsExit fIsNativeOnly lineNumber getHitCount newMethodBreakpoint setEnabled fIsEnable getBreakpoint JavaMethodBreakpointTypeChange newMethodBreakpoint undoChangedElement undoArgument changeType

public static Change create Change I Field field String new Name throws Core Exception String type Name field get Declaring Type get Fully Qualified Name String field Name field get Element Name I Breakpoint Manager breakpoint Manager Debug Plugin get Default get Breakpoint Manager I Breakpoint breakpoints breakpoint Manager get Breakpoints JDI Debug Model get Plugin Identifier for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if breakpoint instanceof I Java Watchpoint I Java Watchpoint watchpoint I Java Watchpoint breakpoint if type Name equals watchpoint get Type Name field Name equals watchpoint get Field Name return new Java Watchpoint Field Name Change watchpoint new Name return null  createChange IField newName CoreException typeName getDeclaringType getFullyQualifiedName fieldName getElementName IBreakpointManager breakpointManager DebugPlugin getDefault getBreakpointManager IBreakpoint breakpointManager getBreakpoints JDIDebugModel getPluginIdentifier IBreakpoint IJavaWatchpoint IJavaWatchpoint IJavaWatchpoint typeName getTypeName fieldName getFieldName JavaWatchpointFieldNameChange newName
public Java Watchpoint Field Name Change I Java Watchpoint watchpoint String new Name throws Core Exception f Watchpoint watchpoint f New Name new Name f Old Name f Watchpoint get Field Name f Declaring Type Breakpoint Utils get Type watchpoint  JavaWatchpointFieldNameChange IJavaWatchpoint newName CoreException fWatchpoint fNewName newName fOldName fWatchpoint getFieldName fDeclaringType BreakpointUtils getType
see org eclipse jdt internal corext refactoring base Change get Name public String get Name return Message Format format Refactoring Messages get String Java Watchpoint Field Name Change 1 new String f Declaring Type get Element Name f Old Name NON NLS 1  getName getName MessageFormat RefactoringMessages getString JavaWatchpointFieldNameChange fDeclaringType getElementName fOldName
see org eclipse jdt internal corext refactoring base Change initialize Validation Data org eclipse core runtime I Progress Monitor public void initialize Validation Data I Progress Monitor pm  initializeValidationData IProgressMonitor initializeValidationData IProgressMonitor
public Refactoring Status is Valid I Progress Monitor pm throws Core Exception Refactoring Status status new Refactoring Status if f Watchpoint is Registered status add Fatal Error Message Format format Refactoring Messages get String Java Watchpoint Field Name Change 2 new String f Declaring Type get Element Name f Old Name NON NLS 1 return status  RefactoringStatus isValid IProgressMonitor CoreException RefactoringStatus RefactoringStatus fWatchpoint isRegistered addFatalError MessageFormat RefactoringMessages getString JavaWatchpointFieldNameChange fDeclaringType getElementName fOldName
public Change perform I Progress Monitor pm throws Core Exception I Field new Field f Declaring Type get Field f New Name Map attributes f Watchpoint get Marker get Attributes boolean is Access f Watchpoint is Access boolean is Modification f Watchpoint is Modification boolean is Enable f Watchpoint is Enabled Breakpoint Utils add Java Breakpoint Attributes attributes new Field I Java Watchpoint new Watchpoint JDI Debug Model create Watchpoint f Watchpoint get Marker get Resource f Watchpoint get Type Name f New Name f Watchpoint get Line Number f Watchpoint get Char Start f Watchpoint get Char End f Watchpoint get Hit Count true attributes new Watchpoint set Access is Access new Watchpoint set Modification is Modification new Watchpoint set Enabled is Enable f Watchpoint delete return new Java Watchpoint Field Name Change new Watchpoint f Old Name  IProgressMonitor CoreException IField newField fDeclaringType getField fNewName fWatchpoint getMarker getAttributes isAccess fWatchpoint isAccess isModification fWatchpoint isModification isEnable fWatchpoint isEnabled BreakpointUtils addJavaBreakpointAttributes newField IJavaWatchpoint newWatchpoint JDIDebugModel createWatchpoint fWatchpoint getMarker getResource fWatchpoint getTypeName fNewName fWatchpoint getLineNumber fWatchpoint getCharStart fWatchpoint getCharEnd fWatchpoint getHitCount newWatchpoint setAccess isAccess newWatchpoint setModification isModification newWatchpoint setEnabled isEnable fWatchpoint JavaWatchpointFieldNameChange newWatchpoint fOldName
see org eclipse jdt internal corext refactoring base Change get Modified Element public Object get Modified Element return f Watchpoint  getModifiedElement getModifiedElement fWatchpoint

protected boolean initialize Object element f Field I Field element try return f Field get Declaring Type is Local catch Java Model Exception e return false  fField IField fField getDeclaringType isLocal JavaModelException
public String get Name return Refactoring Messages get String Java WatchpointI Field Rename Participant 0 NON NLS 1  getName RefactoringMessages getString JavaWatchpointIFieldRenameParticipant
public Refactoring Status check Conditions I Progress Monitor pm Check Conditions Context context return new Refactoring Status  RefactoringStatus checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus
see org eclipse jdt internal corext refactoring participants I Refactoring Participant create Change org eclipse core runtime I Progress Monitor public Change create Change I Progress Monitor pm throws Core Exception return Java Watchpoint Field Name Change create Change f Field get Arguments get New Name  IRefactoringParticipant createChange IProgressMonitor createChange IProgressMonitor CoreException JavaWatchpointFieldNameChange createChange fField getArguments getNewName

public Java Watchpoint Type Change I Java Watchpoint watchpoint Object changed Element Object argument int change Type throws Core Exception super watchpoint changed Element argument change Type f Field Name watchpoint get Field Name f Is Access watchpoint is Access f Is Modification watchpoint is Modification  JavaWatchpointTypeChange IJavaWatchpoint changedElement changeType CoreException changedElement changeType fFieldName getFieldName fIsAccess isAccess fIsModification isModification
see org eclipse jdt internal debug core refactoring Java Breakpoint Type Name Change get Error Message No More Exists public String get Error Message No More Exists return Message Format format Refactoring Messages get String Java Watchpoint Type Change 0 new String get Declaring Type get Element Name f Field Name NON NLS 1  JavaBreakpointTypeNameChange getErrorMessageNoMoreExists getErrorMessageNoMoreExists MessageFormat RefactoringMessages getString JavaWatchpointTypeChange getDeclaringType getElementName fFieldName
see org eclipse ltk core refactoring Change get Name public String get Name return Message Format format Refactoring Messages get String Java Watchpoint Type Change 1 new String get Declaring Type get Element Name f Field Name NON NLS 1  getName getName MessageFormat RefactoringMessages getString JavaWatchpointTypeChange getDeclaringType getElementName fFieldName
public Change perform Change I Type new Type Object undo Changed Element Object undo Argument int change Type throws Core Exception I Field new Field new Type get Field f Field Name int start 1 int end 1 I Source Range range new Field get Name Range if range null start range get Offset end start range get Length Map attributes get Attributes Breakpoint Utils add Java Breakpoint Attributes attributes new Field create the new breakpoint I Java Watchpoint new Watchpoint JDI Debug Model create Watchpoint new Type get Resource new Type get Fully Qualified Name f Field Name 1 start end get Hit Count true attributes new Watchpoint set Access f Is Access new Watchpoint set Modification f Is Modification new Watchpoint set Enabled get Enable delete the old one get Breakpoint delete return new Java Watchpoint Type Change new Watchpoint undo Changed Element undo Argument change Type  performChange IType newType undoChangedElement undoArgument changeType CoreException IField newField newType getField fFieldName ISourceRange newField getNameRange getOffset getLength getAttributes BreakpointUtils addJavaBreakpointAttributes newField IJavaWatchpoint newWatchpoint JDIDebugModel createWatchpoint newType getResource newType getFullyQualifiedName fFieldName getHitCount newWatchpoint setAccess fIsAccess newWatchpoint setModification fIsModification newWatchpoint setEnabled getEnable getBreakpoint JavaWatchpointTypeChange newWatchpoint undoChangedElement undoArgument changeType

Take a list of Changes and return a unique Change a Composite Change or null public static Change create Change From List List changes String change Label int nb Changes changes size if nb Changes 0 return null else if nb Changes 1 return Change changes get 0 else return new Composite Change change Label Change changes to Array new Change changes size  CompositeChange createChangeFromList changeLabel nbChanges nbChanges nbChanges CompositeChange changeLabel toArray

see org eclipse ltk core refactoring participants Refactoring Participant initialize java lang Object protected boolean initialize Object element f Java Project I Java Project element return true  RefactoringParticipant fJavaProject IJavaProject
see org eclipse ltk core refactoring participants Refactoring Participant get Name public String get Name return Refactoring Messages get String Launch ConfigurationI Java Project Rename Participant 0 NON NLS 1  RefactoringParticipant getName getName RefactoringMessages getString LaunchConfigurationIJavaProjectRenameParticipant
see org eclipse ltk core refactoring participants Refactoring Participant check Conditions org eclipse core runtime I Progress Monitor org eclipse ltk core refactoring participants Check Conditions Context public Refactoring Status check Conditions I Progress Monitor pm Check Conditions Context context return new Refactoring Status  RefactoringParticipant checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus
see org eclipse jdt internal corext refactoring participants I Refactoring Participant create Change org eclipse core runtime I Progress Monitor public Change create Change I Progress Monitor pm throws Core Exception return Launch Configuration Project Main Type Change create Changes For Project Rename f Java Project get Arguments get New Name  IRefactoringParticipant createChange IProgressMonitor createChange IProgressMonitor CoreException LaunchConfigurationProjectMainTypeChange createChangesForProjectRename fJavaProject getArguments getNewName

protected boolean initialize Object element f Package Fragment I Package Fragment element Object destination get Arguments get Destination if destination instanceof I Package Fragment Root f Destination I Package Fragment Root destination nothing to do if the project doesn t change if f Destination get Java Project equals f Package Fragment get Java Project return false return true return false  fPackageFragment IPackageFragment getArguments getDestination IPackageFragmentRoot fDestination IPackageFragmentRoot fDestination getJavaProject fPackageFragment getJavaProject
see org eclipse ltk core refactoring participants Refactoring Participant get Name public String get Name return Refactoring Messages get String Launch ConfigurationI Package Fragment Move Participant 0 NON NLS 1  RefactoringParticipant getName getName RefactoringMessages getString LaunchConfigurationIPackageFragmentMoveParticipant
see org eclipse ltk core refactoring participants Refactoring Participant check Conditions org eclipse core runtime I Progress Monitor org eclipse ltk core refactoring participants Check Conditions Context public Refactoring Status check Conditions I Progress Monitor pm Check Conditions Context context throws Operation Canceled Exception return new Refactoring Status  RefactoringParticipant checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus checkConditions IProgressMonitor CheckConditionsContext OperationCanceledException RefactoringStatus
see org eclipse ltk core refactoring participants Refactoring Participant create Change org eclipse core runtime I Progress Monitor public Change create Change I Progress Monitor pm throws Core Exception Operation Canceled Exception return Launch Configuration Project Main Type Change create Changes For Package Move f Package Fragment f Destination  RefactoringParticipant createChange IProgressMonitor createChange IProgressMonitor CoreException OperationCanceledException LaunchConfigurationProjectMainTypeChange createChangesForPackageMove fPackageFragment fDestination

see org eclipse ltk core refactoring participants Refactoring Participant initialize java lang Object protected boolean initialize Object element f Package Fragment I Package Fragment element return true  RefactoringParticipant fPackageFragment IPackageFragment
see org eclipse ltk core refactoring participants Refactoring Participant get Name public String get Name return Refactoring Messages get String Launch ConfigurationI Package Fragment Rename Participant 0 NON NLS 1  RefactoringParticipant getName getName RefactoringMessages getString LaunchConfigurationIPackageFragmentRenameParticipant
see org eclipse ltk core refactoring participants Refactoring Participant check Conditions org eclipse core runtime I Progress Monitor org eclipse ltk core refactoring participants Check Conditions Context public Refactoring Status check Conditions I Progress Monitor pm Check Conditions Context context return new Refactoring Status  RefactoringParticipant checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus
see org eclipse jdt internal corext refactoring participants I Refactoring Participant create Change org eclipse core runtime I Progress Monitor public Change create Change I Progress Monitor pm throws Core Exception return Launch Configuration Project Main Type Change create Changes For Package Rename f Package Fragment get Arguments get New Name  IRefactoringParticipant createChange IProgressMonitor createChange IProgressMonitor CoreException LaunchConfigurationProjectMainTypeChange createChangesForPackageRename fPackageFragment getArguments getNewName

protected boolean initialize Object element f Type I Type element try check that the type is no a local and is no declared in a local type I Type declaring Type f Type while declaring Type null if f Type is Local return false declaring Type declaring Type get Declaring Type catch Java Model Exception e JDI DebugUI Plugin log e Object destination get Arguments get Destination if destination instanceof I Package Fragment destination instanceof I Type f Destination I Java Element destination return true return false  fType IType IType declaringType fType declaringType fType isLocal declaringType declaringType getDeclaringType JavaModelException JDIDebugUIPlugin getArguments getDestination IPackageFragment IType fDestination IJavaElement
see org eclipse ltk core refactoring participants Refactoring Participant get Name public String get Name return Refactoring Messages get String Launch ConfigurationI Type Move Participant 0 NON NLS 1  RefactoringParticipant getName getName RefactoringMessages getString LaunchConfigurationITypeMoveParticipant
see org eclipse ltk core refactoring participants Refactoring Participant check Conditions org eclipse core runtime I Progress Monitor org eclipse ltk core refactoring participants Check Conditions Context public Refactoring Status check Conditions I Progress Monitor pm Check Conditions Context context return new Refactoring Status  RefactoringParticipant checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus
see org eclipse ltk core refactoring participants Refactoring Participant create Change org eclipse core runtime I Progress Monitor public Change create Change I Progress Monitor pm throws Core Exception return Launch Configuration Project Main Type Change create Changes For Type Move f Type f Destination  RefactoringParticipant createChange IProgressMonitor createChange IProgressMonitor CoreException LaunchConfigurationProjectMainTypeChange createChangesForTypeMove fType fDestination

see org eclipse ltk core refactoring participants Refactoring Participant initialize java lang Object protected boolean initialize Object element f Type I Type element return true  RefactoringParticipant fType IType
see org eclipse ltk core refactoring participants Refactoring Participant get Name public String get Name return Refactoring Messages get String Launch ConfigurationI Type Rename Participant 0 NON NLS 1  RefactoringParticipant getName getName RefactoringMessages getString LaunchConfigurationITypeRenameParticipant
see org eclipse ltk core refactoring participants Refactoring Participant check Conditions org eclipse core runtime I Progress Monitor org eclipse ltk core refactoring participants Check Conditions Context public Refactoring Status check Conditions I Progress Monitor pm Check Conditions Context context return new Refactoring Status  RefactoringParticipant checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus
see org eclipse ltk core refactoring participants Refactoring Participant create Change org eclipse core runtime I Progress Monitor public Change create Change I Progress Monitor pm throws Core Exception return Launch Configuration Project Main Type Change create Changes For Type Rename f Type get Arguments get New Name  RefactoringParticipant createChange IProgressMonitor createChange IProgressMonitor CoreException LaunchConfigurationProjectMainTypeChange createChangesForTypeRename fType getArguments getNewName

private I Launch Configuration Listener configuration Listener new I Launch Configuration Listener public void launch Configuration Added final I Launch Configuration launch Configuration I Launch Manager manager Debug Plugin get Default get Launch Manager final I Launch Configuration old Config manager get Moved From launch Configuration if old Config null old Config f Launch Configuration f New Launch Configuration launch Configuration  ILaunchConfigurationListener configurationListener ILaunchConfigurationListener launchConfigurationAdded ILaunchConfiguration launchConfiguration ILaunchManager DebugPlugin getDefault getLaunchManager ILaunchConfiguration oldConfig getMovedFrom launchConfiguration oldConfig oldConfig fLaunchConfiguration fNewLaunchConfiguration launchConfiguration
public void launch Configuration Changed I Launch Configuration configuration  launchConfigurationChanged ILaunchConfiguration
public void launch Configuration Removed I Launch Configuration configuration  launchConfigurationRemoved ILaunchConfiguration
Create a change for each launch configuration which needs to be updated for this I Type rename public static Change create Changes For Type Rename I Type type String new Name throws Core Exception I Type declaring Type type get Declaring Type String new Fully Qualified Name if declaring Type null new Fully Qualified Name type get Package Fragment get Element Name new Name else new Fully Qualified Name declaring Type get Fully Qualified Name new Name return create Changes For Type Change type new Fully Qualified Name null  IType createChangesForTypeRename IType newName CoreException IType declaringType getDeclaringType newFullyQualifiedName declaringType newFullyQualifiedName getPackageFragment getElementName newName newFullyQualifiedName declaringType getFullyQualifiedName newName createChangesForTypeChange newFullyQualifiedName
Create a change for each launch configuration which needs to be updated for this I Type move public static Change create Changes For Type Move I Type type I Java Element destination throws Core Exception I Java Project project Destination destination get Java Project String new Project Name if type get Java Project equals project Destination new Project Name null else new Project Name project Destination get Element Name String new Fully Qualified Name if destination instanceof I Type new Fully Qualified Name I Type destination get Fully Qualified Name type get Element Name else if destination instanceof I Package Fragment I Package Fragment destination Package I Package Fragment destination if destination Package is Default Package new Fully Qualified Name type get Element Name else new Fully Qualified Name destination get Element Name type get Element Name else return null return create Changes For Type Change type new Fully Qualified Name new Project Name  IType createChangesForTypeMove IType IJavaElement CoreException IJavaProject projectDestination getJavaProject newProjectName getJavaProject projectDestination newProjectName newProjectName projectDestination getElementName newFullyQualifiedName IType newFullyQualifiedName IType getFullyQualifiedName getElementName IPackageFragment IPackageFragment destinationPackage IPackageFragment destinationPackage isDefaultPackage newFullyQualifiedName getElementName newFullyQualifiedName getElementName getElementName createChangesForTypeChange newFullyQualifiedName newProjectName
Create a change for each launch configuration which needs to be updated for this I Java Project rename public static Change create Changes For Project Rename I Java Project java Project String new Project Name throws Core Exception String project Name java Project get Element Name I Launch Manager manager Debug Plugin get Default get Launch Manager Java application launch configurations I Launch Configuration Type configuration Type manager get Launch Configuration Type I Java Launch Configuration Constants ID JAVA APPLICATION I Launch Configuration configs manager get Launch Configurations configuration Type List changes create Changes For Project Rename configs project Name new Project Name Java applet launch configurations configuration Type manager get Launch Configuration Type I Java Launch Configuration Constants ID JAVA APPLET configs manager get Launch Configurations configuration Type changes add All create Changes For Project Rename configs project Name new Project Name return JDT Debug Refactoring Util create Change From List changes Refactoring Messages get String Launch Configuration Project Main Type Change 7 NON NLS 1  IJavaProject createChangesForProjectRename IJavaProject javaProject newProjectName CoreException projectName javaProject getElementName ILaunchManager DebugPlugin getDefault getLaunchManager ILaunchConfigurationType configurationType getLaunchConfigurationType IJavaLaunchConfigurationConstants ID_JAVA_APPLICATION ILaunchConfiguration getLaunchConfigurations configurationType createChangesForProjectRename projectName newProjectName configurationType getLaunchConfigurationType IJavaLaunchConfigurationConstants ID_JAVA_APPLET getLaunchConfigurations configurationType addAll createChangesForProjectRename projectName newProjectName JDTDebugRefactoringUtil createChangeFromList RefactoringMessages getString LaunchConfigurationProjectMainTypeChange
Create a change for each launch configuration which needs to be updated for this I Package Fragment rename public static Change create Changes For Package Rename I Package Fragment package Fragment String new Name throws Core Exception I Launch Manager manager Debug Plugin get Default get Launch Manager Java application launch configurations I Launch Configuration Type configuration Type manager get Launch Configuration Type I Java Launch Configuration Constants ID JAVA APPLICATION I Launch Configuration configs manager get Launch Configurations configuration Type List changes create Changes For Package Rename configs package Fragment new Name Java applet launch configurations configuration Type manager get Launch Configuration Type I Java Launch Configuration Constants ID JAVA APPLET configs manager get Launch Configurations configuration Type changes add All create Changes For Package Rename configs package Fragment new Name return JDT Debug Refactoring Util create Change From List changes Refactoring Messages get String Launch Configuration Project Main Type Change 7 NON NLS 1  IPackageFragment createChangesForPackageRename IPackageFragment packageFragment newName CoreException ILaunchManager DebugPlugin getDefault getLaunchManager ILaunchConfigurationType configurationType getLaunchConfigurationType IJavaLaunchConfigurationConstants ID_JAVA_APPLICATION ILaunchConfiguration getLaunchConfigurations configurationType createChangesForPackageRename packageFragment newName configurationType getLaunchConfigurationType IJavaLaunchConfigurationConstants ID_JAVA_APPLET getLaunchConfigurations configurationType addAll createChangesForPackageRename packageFragment newName JDTDebugRefactoringUtil createChangeFromList RefactoringMessages getString LaunchConfigurationProjectMainTypeChange
Create a change for each launch configuration which needs to be updated for this I Package Fragment move public static Change create Changes For Package Move I Package Fragment package Fragment I Package Fragment Root destination throws Core Exception I Launch Manager manager Debug Plugin get Default get Launch Manager Java application launch configurations I Launch Configuration Type configuration Type manager get Launch Configuration Type I Java Launch Configuration Constants ID JAVA APPLICATION I Launch Configuration configs manager get Launch Configurations configuration Type List changes create Changes For Package Move configs package Fragment destination Java applet launch configurations configuration Type manager get Launch Configuration Type I Java Launch Configuration Constants ID JAVA APPLET configs manager get Launch Configurations configuration Type changes add All create Changes For Package Move configs package Fragment destination return JDT Debug Refactoring Util create Change From List changes Refactoring Messages get String Launch Configuration Project Main Type Change 7 NON NLS 1  IPackageFragment createChangesForPackageMove IPackageFragment packageFragment IPackageFragmentRoot CoreException ILaunchManager DebugPlugin getDefault getLaunchManager ILaunchConfigurationType configurationType getLaunchConfigurationType IJavaLaunchConfigurationConstants ID_JAVA_APPLICATION ILaunchConfiguration getLaunchConfigurations configurationType createChangesForPackageMove packageFragment configurationType getLaunchConfigurationType IJavaLaunchConfigurationConstants ID_JAVA_APPLET getLaunchConfigurations configurationType addAll createChangesForPackageMove packageFragment JDTDebugRefactoringUtil createChangeFromList RefactoringMessages getString LaunchConfigurationProjectMainTypeChange
Create a change for each launch configuration which needs to be updated for this I Type change private static Change create Changes For Type Change I Type type String new Fully Qualified Name String new Project Name throws Core Exception I Launch Manager manager Debug Plugin get Default get Launch Manager Java application launch configurations I Launch Configuration Type configuration Type manager get Launch Configuration Type I Java Launch Configuration Constants ID JAVA APPLICATION I Launch Configuration configs manager get Launch Configurations configuration Type List changes create Changes For Type Change configs type new Fully Qualified Name new Project Name Java applet launch configurations configuration Type manager get Launch Configuration Type I Java Launch Configuration Constants ID JAVA APPLET configs manager get Launch Configurations configuration Type changes add All create Changes For Type Change configs type new Fully Qualified Name new Project Name return JDT Debug Refactoring Util create Change From List changes Refactoring Messages get String Launch Configuration Project Main Type Change 7 NON NLS 1  IType createChangesForTypeChange IType newFullyQualifiedName newProjectName CoreException ILaunchManager DebugPlugin getDefault getLaunchManager ILaunchConfigurationType configurationType getLaunchConfigurationType IJavaLaunchConfigurationConstants ID_JAVA_APPLICATION ILaunchConfiguration getLaunchConfigurations configurationType createChangesForTypeChange newFullyQualifiedName newProjectName configurationType getLaunchConfigurationType IJavaLaunchConfigurationConstants ID_JAVA_APPLET getLaunchConfigurations configurationType addAll createChangesForTypeChange newFullyQualifiedName newProjectName JDTDebugRefactoringUtil createChangeFromList RefactoringMessages getString LaunchConfigurationProjectMainTypeChange
Create a change for each launch configuration from the given list which needs to be updated for this I Type change private static List create Changes For Type Change I Launch Configuration configs I Type type String new Fully Qualified Name String new Project Name throws Core Exception List changes new Array List String type Name type get Fully Qualified Name String project Name type get Java Project get Element Name for int i 0 i configs length i I Launch Configuration launch Configuration configs i String lc Project Name launch Configuration get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME String null if project Name equals lc Project Name String main Type Name launch Configuration get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME String null if main Type Name starts With type Name if type Name equals main Type Name changes add new Launch Configuration Project Main Type Change launch Configuration new Fully Qualified Name new Project Name else Change change create Changes For Outer Type Change launch Configuration type new Fully Qualified Name new Project Name if change null changes add change return changes  IType createChangesForTypeChange ILaunchConfiguration IType newFullyQualifiedName newProjectName CoreException ArrayList typeName getFullyQualifiedName projectName getJavaProject getElementName ILaunchConfiguration launchConfiguration lcProjectName launchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME projectName lcProjectName mainTypeName launchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME mainTypeName startsWith typeName typeName mainTypeName LaunchConfigurationProjectMainTypeChange launchConfiguration newFullyQualifiedName newProjectName createChangesForOuterTypeChange launchConfiguration newFullyQualifiedName newProjectName
Return a change for the given launch configuration if the launch configuration needs to be updated for this I Type change It specificaly look if the main type of the launch configuration is an inner type of the given I Type private static Change create Changes For Outer Type Change I Launch Configuration launch Configuration I Type type String new Fully Qualified Name String new Project Name throws Core Exception I Type inner Types type get Types String main Type Name launch Configuration get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME String null for int i 0 i inner Types length i I Type inner Type inner Types i String inner Type Name inner Type get Fully Qualified Name if main Type Name starts With inner Type Name String new Type Name new Fully Qualified Name inner Type get Element Name if it matches check the type if inner Type Name equals main Type Name return new Launch Configuration Project Main Type Change launch Configuration new Type Name new Project Name if it s not the type check the inner types return create Changes For Outer Type Change launch Configuration inner Type new Type Name new Project Name return null  IType IType createChangesForOuterTypeChange ILaunchConfiguration launchConfiguration IType newFullyQualifiedName newProjectName CoreException IType innerTypes getTypes mainTypeName launchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME innerTypes IType innerType innerTypes innerTypeName innerType getFullyQualifiedName mainTypeName startsWith innerTypeName newTypeName newFullyQualifiedName innerType getElementName innerTypeName mainTypeName LaunchConfigurationProjectMainTypeChange launchConfiguration newTypeName newProjectName createChangesForOuterTypeChange launchConfiguration innerType newTypeName newProjectName
Create a change for each launch configuration from the given list which needs to be updated for this I Java Project rename private static List create Changes For Project Rename I Launch Configuration configs String project Name String new Project Name throws Core Exception List changes new Array List for int i 0 i configs length i I Launch Configuration launch Configuration configs i String launch Configuration Project Name launch Configuration get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME String null if project Name equals launch Configuration Project Name changes add new Launch Configuration Project Main Type Change launch Configuration null new Project Name return changes  IJavaProject createChangesForProjectRename ILaunchConfiguration projectName newProjectName CoreException ArrayList ILaunchConfiguration launchConfiguration launchConfigurationProjectName launchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME projectName launchConfigurationProjectName LaunchConfigurationProjectMainTypeChange launchConfiguration newProjectName
Create a change for each launch configuration from the given list which needs to be updated for this I Package Fragment rename private static List create Changes For Package Rename I Launch Configuration configs I Package Fragment package Fragment String new Name throws Core Exception List changes new Array List String package Fragment Name package Fragment get Element Name String project Name package Fragment get Java Project get Element Name for int i 0 i configs length i I Launch Configuration launch Configuration configs i String lc Project Name launch Configuration get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME String null if project Name equals lc Project Name String main Type Name launch Configuration get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME String null String package Name int index main Type Name last Index Of if index 0 package Name NON NLS 1 else package Name main Type Name substring 0 index if package Fragment Name equals package Name String new Type Name new Name main Type Name substring index 1 changes add new Launch Configuration Project Main Type Change launch Configuration new Type Name null return changes  IPackageFragment createChangesForPackageRename ILaunchConfiguration IPackageFragment packageFragment newName CoreException ArrayList packageFragmentName packageFragment getElementName projectName packageFragment getJavaProject getElementName ILaunchConfiguration launchConfiguration lcProjectName launchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME projectName lcProjectName mainTypeName launchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME packageName mainTypeName lastIndexOf packageName packageName mainTypeName packageFragmentName packageName newTypeName newName mainTypeName LaunchConfigurationProjectMainTypeChange launchConfiguration newTypeName
Create a change for each launch configuration from the given list which needs to be updated for this I Package Fragment move private static List create Changes For Package Move I Launch Configuration configs I Package Fragment package Fragment I Package Fragment Root destination throws Core Exception List changes new Array List String package Fragment Name package Fragment get Element Name String project Name package Fragment get Java Project get Element Name for int i 0 i configs length i I Launch Configuration launch Configuration configs i String lc Project Name launch Configuration get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME String null if project Name equals lc Project Name String main Type Name launch Configuration get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME String null String package Name int index main Type Name last Index Of if index 0 package Name NON NLS 1 else package Name main Type Name substring 0 index if package Fragment Name equals package Name changes add new Launch Configuration Project Main Type Change launch Configuration null destination get Java Project get Element Name return changes  IPackageFragment createChangesForPackageMove ILaunchConfiguration IPackageFragment packageFragment IPackageFragmentRoot CoreException ArrayList packageFragmentName packageFragment getElementName projectName packageFragment getJavaProject getElementName ILaunchConfiguration launchConfiguration lcProjectName launchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME projectName lcProjectName mainTypeName launchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME packageName mainTypeName lastIndexOf packageName packageName mainTypeName packageFragmentName packageName LaunchConfigurationProjectMainTypeChange launchConfiguration getJavaProject getElementName
Launch Configuration Project Main Type Change constructor param launch Configuration the launch configuration to modify param new Main Type Name the name of the new main type or code null code if not modified param new Project Name the name of the project or code null code if not modified private Launch Configuration Project Main Type Change I Launch Configuration launch Configuration String new Main Type Name String new Project Name throws Core Exception f Launch Configuration launch Configuration f New Launch Configuration launch Configuration f New Main Type Name new Main Type Name f New Project Name new Project Name f Old Main Type Name f Launch Configuration get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME String null f Old Project Name f Launch Configuration get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME String null if f New Main Type Name null generate the new configuration name String old Name Signature get Simple Name f Old Main Type Name String new Name Signature get Simple Name f New Main Type Name String launch Configuration Name f Launch Configuration get Name f New Launch Configuration Name launch Configuration Name replace All old Name new Name if launch Configuration Name equals f New Launch Configuration Name Debug Plugin get Default get Launch Manager is Existing Launch Configuration Name f New Launch Configuration Name f New Launch Configuration Name null  LaunchConfigurationProjectMainTypeChange launchConfiguration newMainTypeName newProjectName LaunchConfigurationProjectMainTypeChange ILaunchConfiguration launchConfiguration newMainTypeName newProjectName CoreException fLaunchConfiguration launchConfiguration fNewLaunchConfiguration launchConfiguration fNewMainTypeName newMainTypeName fNewProjectName newProjectName fOldMainTypeName fLaunchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME fOldProjectName fLaunchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME fNewMainTypeName oldName getSimpleName fOldMainTypeName newName getSimpleName fNewMainTypeName launchConfigurationName fLaunchConfiguration getName fNewLaunchConfigurationName launchConfigurationName replaceAll oldName newName launchConfigurationName fNewLaunchConfigurationName DebugPlugin getDefault getLaunchManager isExistingLaunchConfigurationName fNewLaunchConfigurationName fNewLaunchConfigurationName
public String get Name if f New Launch Configuration Name null return Message Format format Refactoring Messages get String Launch Configuration Project Main Type Change 0 new String f Launch Configuration get Name f New Launch Configuration Name NON NLS 1 if f New Project Name null return Message Format format Refactoring Messages get String Launch Configuration Project Main Type Change 1 new String f Launch Configuration get Name NON NLS 1 if f New Main Type Name null return Message Format format Refactoring Messages get String Launch Configuration Project Main Type Change 2 new String f Launch Configuration get Name NON NLS 1 return Message Format format Refactoring Messages get String Launch Configuration Project Main Type Change 3 new String f Launch Configuration get Name NON NLS 1  getName fNewLaunchConfigurationName MessageFormat RefactoringMessages getString LaunchConfigurationProjectMainTypeChange fLaunchConfiguration getName fNewLaunchConfigurationName fNewProjectName MessageFormat RefactoringMessages getString LaunchConfigurationProjectMainTypeChange fLaunchConfiguration getName fNewMainTypeName MessageFormat RefactoringMessages getString LaunchConfigurationProjectMainTypeChange fLaunchConfiguration getName MessageFormat RefactoringMessages getString LaunchConfigurationProjectMainTypeChange fLaunchConfiguration getName
see org eclipse ltk core refactoring Change initialize Validation Data org eclipse core runtime I Progress Monitor public void initialize Validation Data I Progress Monitor pm  initializeValidationData IProgressMonitor initializeValidationData IProgressMonitor
public Refactoring Status is Valid I Progress Monitor pm throws Core Exception Operation Canceled Exception if f Launch Configuration exists String type Name f Launch Configuration get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME String null if f Old Main Type Name equals type Name String project Name f Launch Configuration get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME String null if f Old Project Name equals project Name return new Refactoring Status return Refactoring Status create Warning Status Message Format format Refactoring Messages get String Launch Configuration Project Main Type Change 4 new String f Launch Configuration get Name f Old Project Name NON NLS 1 return Refactoring Status create Warning Status Message Format format Refactoring Messages get String Launch Configuration Project Main Type Change 5 new String f Launch Configuration get Name f Old Main Type Name NON NLS 1 return Refactoring Status create Fatal Error Status Message Format format Refactoring Messages get String Launch Configuration Project Main Type Change 6 new String f Launch Configuration get Name NON NLS 1  RefactoringStatus isValid IProgressMonitor CoreException OperationCanceledException fLaunchConfiguration typeName fLaunchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME fOldMainTypeName typeName projectName fLaunchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME fOldProjectName projectName RefactoringStatus RefactoringStatus createWarningStatus MessageFormat RefactoringMessages getString LaunchConfigurationProjectMainTypeChange fLaunchConfiguration getName fOldProjectName RefactoringStatus createWarningStatus MessageFormat RefactoringMessages getString LaunchConfigurationProjectMainTypeChange fLaunchConfiguration getName fOldMainTypeName RefactoringStatus createFatalErrorStatus MessageFormat RefactoringMessages getString LaunchConfigurationProjectMainTypeChange fLaunchConfiguration getName
public Change perform I Progress Monitor pm throws Core Exception I Launch Manager launch Manager Debug Plugin get Default get Launch Manager I Launch Configuration Working Copy copy f Launch Configuration get Working Copy String old Main Type Name String old Project Name if f New Main Type Name null old Main Type Name f Old Main Type Name copy set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME f New Main Type Name else old Main Type Name null if f New Project Name null old Project Name f Old Project Name copy set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME f New Project Name else old Project Name null if f New Launch Configuration Name null launch Manager add Launch Configuration Listener configuration Listener copy rename f New Launch Configuration Name copy do Save launch Manager remove Launch Configuration Listener configuration Listener create the undo change return new Launch Configuration Project Main Type Change f New Launch Configuration old Main Type Name old Project Name  IProgressMonitor CoreException ILaunchManager launchManager DebugPlugin getDefault getLaunchManager ILaunchConfigurationWorkingCopy fLaunchConfiguration getWorkingCopy oldMainTypeName oldProjectName fNewMainTypeName oldMainTypeName fOldMainTypeName setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME fNewMainTypeName oldMainTypeName fNewProjectName oldProjectName fOldProjectName setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME fNewProjectName oldProjectName fNewLaunchConfigurationName launchManager addLaunchConfigurationListener configurationListener fNewLaunchConfigurationName doSave launchManager removeLaunchConfigurationListener configurationListener LaunchConfigurationProjectMainTypeChange fNewLaunchConfiguration oldMainTypeName oldProjectName
see org eclipse ltk core refactoring Change get Modified Element public Object get Modified Element return f Launch Configuration  getModifiedElement getModifiedElement fLaunchConfiguration

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Refactoring Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME RefactoringMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

int start inclusive int end exclusive public Position int start int end this start start this end end 
this end end public int get Start return start  getStart
return start public int get End return end  getEnd
String Matcher constructor takes in a String object that is a simple pattern which may contain for 0 and many characters and for exactly one character Literal and characters must be escaped in the pattern e g means literal etc Escaping any other character including the escape character itself just results in that character in the pattern e g a means a and means If invoking the String Matcher with string literals in Java don t forget escape characters are represented by param pattern the pattern to match text against param ignore Case if true case is ignored param ignore Wild Cards if true wild cards and their escape sequences are ignored everything is taken literally public String Matcher String pattern boolean ignore Case boolean ignore Wild Cards if pattern null throw new Illegal Argument Exception f Ignore Case ignore Case f Ignore Wild Cards ignore Wild Cards f Pattern pattern f Length pattern length if f Ignore Wild Cards parse No Wild Cards else parse Wild Cards  StringMatcher StringMatcher ignoreCase ignoreWildCards StringMatcher ignoreCase ignoreWildCards IllegalArgumentException fIgnoreCase ignoreCase fIgnoreWildCards ignoreWildCards fPattern fLength fIgnoreWildCards parseNoWildCards parseWildCards
Find the first occurrence of the pattern between code start code inclusive and code end code exclusive param code text code the String object to search in param code start code the starting index of the search range inclusive param code end code the ending index of the search range exclusive return an code String Matcher Position code object that keeps the starting inclusive and ending positions exclusive of the first occurrence of the pattern in the specified range of the text return null if not found or subtext is empty start end A pair of zeros is returned if pattern is empty string Note that for pattern like abc with leading and trailing stars position of abc is returned For a pattern like in text abcdf 1 3 is returned public String Matcher Position find String text int start int end if text null throw new Illegal Argument Exception int tlen text length if start 0 start 0 if end tlen end tlen if end 0 start end return null if f Length 0 return new Position start start if f Ignore Wild Cards int x pos In text start end if x 0 return null return new Position x x f Length int seg Count f Segments length if seg Count 0 pattern contains only s return new Position start end int cur Pos start int match Start 1 int i for i 0 i seg Count cur Pos end i String current f Segments i int next Match reg Exp Pos In text cur Pos end current if next Match 0 return null if i 0 match Start next Match cur Pos next Match current length if i seg Count return null return new Position match Start cur Pos  StringMatcher StringMatcher IllegalArgumentException fLength fIgnoreWildCards posIn fLength segCount fSegments segCount curPos matchStart segCount curPos fSegments nextMatch regExpPosIn curPos nextMatch matchStart nextMatch curPos nextMatch segCount matchStart curPos
match the given code text code with the pattern return true if matched eitherwise false param code text code a String object public boolean match String text return match text 0 text length 
Given the starting inclusive and the ending exclusive positions in the code text code determine if the given substring matches with a Pattern return true if the specified portion of the text matches the pattern param String code text code a String object that contains the substring to match param int code start code marks the starting position inclusive of the substring param int code end code marks the ending index exclusive of the substring public boolean match String text int start int end if null text throw new Illegal Argument Exception if start end return false if f Ignore Wild Cards return end start f Length f Pattern region Matches f Ignore Case 0 text start f Length int seg Count f Segments length if seg Count 0 f Has Leading Star f Has Trailing Star pattern contains only s return true if start end return f Length 0 if f Length 0 return start end int tlen text length if start 0 start 0 if end tlen end tlen int t Cur Pos start int bound end f Bound if bound 0 return false int i 0 String current f Segments i int seg Length current length process first segment if f Has Leading Star if reg Exp Region Matches text start current 0 seg Length return false else i t Cur Pos t Cur Pos seg Length if f Segments length 1 f Has Leading Star f Has Trailing Star only one segment to match no wildcards specified return t Cur Pos end process middle segments while i seg Count current f Segments i int current Match int k current index Of f Single Wild Card if k 0 current Match text Pos In text t Cur Pos end current if current Match 0 return false else current Match reg Exp Pos In text t Cur Pos end current if current Match 0 return false t Cur Pos current Match current length i process final segment if f Has Trailing Star t Cur Pos end int clen current length return reg Exp Region Matches text end clen current 0 clen return i seg Count  aPattern IllegalArgumentException fIgnoreWildCards fLength fPattern regionMatches fIgnoreCase fLength segCount fSegments segCount fHasLeadingStar fHasTrailingStar fLength fLength tCurPos fBound fSegments segLength fHasLeadingStar regExpRegionMatches segLength tCurPos tCurPos segLength fSegments fHasLeadingStar fHasTrailingStar tCurPos segCount fSegments currentMatch indexOf fSingleWildCard currentMatch textPosIn tCurPos currentMatch currentMatch regExpPosIn tCurPos currentMatch tCurPos currentMatch fHasTrailingStar tCurPos regExpRegionMatches segCount
This method parses the given pattern into segments seperated by wildcard characters Since wildcards are not being used in this case the pattern consists of a single segment private void parse No Wild Cards f Segments new String 1 f Segments 0 f Pattern f Bound f Length  parseNoWildCards fSegments fSegments fPattern fBound fLength
Parses the given pattern into segments seperated by wildcard characters param p a String object that is a simple regular expression with and or private void parse Wild Cards if f Pattern starts With NON NLS 1 f Has Leading Star true if f Pattern ends With NON NLS 1 make sure it s not an escaped wildcard if f Length 1 f Pattern char At f Length 2 f Has Trailing Star true Vector temp new Vector int pos 0 String Buffer buf new String Buffer while pos f Length char c f Pattern char At pos switch c case if pos f Length buf append c else char next f Pattern char At pos if it s an escape sequence if next next next buf append next else not an escape sequence just insert literally buf append c buf append next break case if buf length 0 new segment temp add Element buf to String f Bound buf length buf set Length 0 break case append special character representing single match wildcard buf append f Single Wild Card break default buf append c add last buffer to segment list if buf length 0 temp add Element buf to String f Bound buf length f Segments new String temp size temp copy Into f Segments  parseWildCards fPattern startsWith fHasLeadingStar fPattern endsWith fLength fPattern charAt fLength fHasTrailingStar StringBuffer StringBuffer fLength fPattern charAt fLength fPattern charAt addElement toString fBound setLength fSingleWildCard addElement toString fBound fSegments copyInto fSegments
param code text code a string which contains no wildcard param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive return the starting index in the text of the pattern or 1 if not found protected int pos In String text int start int end no wild card in pattern int max end f Length if f Ignore Case int i text index Of f Pattern start if i 1 i max return 1 return i for int i start i max i if text region Matches true i f Pattern 0 f Length return i return 1  posIn fLength fIgnoreCase indexOf fPattern regionMatches fPattern fLength
param code text code a simple regular expression that may only contain s param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a simple regular expression that may contains param code case Ignored code wether the pattern is not casesensitive return the starting index in the text of the pattern or 1 if not found protected int reg Exp Pos In String text int start int end String p int plen p length int max end plen for int i start i max i if reg Exp Region Matches text i p 0 plen return i return 1  caseIgnored regExpPosIn regExpRegionMatches
return boolean param code text code a String to match param code start code int that indicates the starting index of match inclusive param code end code int that indicates the ending index of match exclusive param code p code String String a simple regular expression that may contain param code ignore Case code boolean indicating wether code p code is case sensitive protected boolean reg Exp Region Matches String text int t Start String p int p Start int plen while plen 0 char tchar text char At t Start char pchar p char At p Start process wild cards if f Ignore Wild Cards skip single wild cards if pchar f Single Wild Card continue if pchar tchar continue if f Ignore Case if Character to Upper Case tchar Character to Upper Case pchar continue comparing after converting to upper case doesn t handle all cases also compare after converting to lower case if Character to Lower Case tchar Character to Lower Case pchar continue return false return true  ignoreCase regExpRegionMatches tStart pStart charAt tStart charAt pStart fIgnoreWildCards fSingleWildCard fIgnoreCase toUpperCase toUpperCase toLowerCase toLowerCase
param code text code the string to match param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a string that has no wildcard param code ignore Case code boolean indicating wether code p code is case sensitive return the starting index in the text of the pattern or 1 if not found protected int text Pos In String text int start int end String p int plen p length int max end plen if f Ignore Case int i text index Of p start if i 1 i max return 1 return i for int i start i max i if text region Matches true i p 0 plen return i return 1  ignoreCase textPosIn fIgnoreCase indexOf regionMatches

private I Java Debug Target f Debug Target public AST Evaluation Engine I Java Project project I Java Debug Target debug Target set Java Project project set Debug Target debug Target  IJavaDebugTarget fDebugTarget ASTEvaluationEngine IJavaProject IJavaDebugTarget debugTarget setJavaProject setDebugTarget debugTarget
public void set Java Project I Java Project project f Project project  setJavaProject IJavaProject fProject
public void set Debug Target I Java Debug Target debug Target f Debug Target debug Target  setDebugTarget IJavaDebugTarget debugTarget fDebugTarget debugTarget
see I Evaluation Engine evaluate String I Java Stack Frame I Evaluation Listener int boolean public void evaluate String snippet I Java Stack Frame frame I Evaluation Listener listener int evaluation Detail boolean hit Breakpoints throws Debug Exception I Compiled Expression expression get Compiled Expression snippet frame evaluate Expression expression frame listener evaluation Detail hit Breakpoints  IEvaluationEngine IJavaStackFrame IEvaluationListener IJavaStackFrame IEvaluationListener evaluationDetail hitBreakpoints DebugException ICompiledExpression getCompiledExpression evaluateExpression evaluationDetail hitBreakpoints
see I Evaluation Engine evaluate String I Java Object I Java Thread I Evaluation Listener int boolean public void evaluate String snippet I Java Object this Context I Java Thread thread I Evaluation Listener listener int evaluation Detail boolean hit Breakpoints throws Debug Exception I Compiled Expression expression get Compiled Expression snippet this Context evaluate Expression expression this Context thread listener evaluation Detail hit Breakpoints  IEvaluationEngine IJavaObject IJavaThread IEvaluationListener IJavaObject thisContext IJavaThread IEvaluationListener evaluationDetail hitBreakpoints DebugException ICompiledExpression getCompiledExpression thisContext evaluateExpression thisContext evaluationDetail hitBreakpoints
see I Ast Evaluation Engine evaluate Expression I Compiled Expression I Java Stack Frame I Evaluation Listener int boolean public void evaluate Expression I Compiled Expression expression I Java Stack Frame frame I Evaluation Listener listener int evaluation Detail boolean hit Breakpoints throws Debug Exception Runtime Context context new Runtime Context get Java Project frame do Evaluation expression context I Java Thread frame get Thread listener evaluation Detail hit Breakpoints  IAstEvaluationEngine evaluateExpression ICompiledExpression IJavaStackFrame IEvaluationListener evaluateExpression ICompiledExpression IJavaStackFrame IEvaluationListener evaluationDetail hitBreakpoints DebugException RuntimeContext RuntimeContext getJavaProject doEvaluation IJavaThread getThread evaluationDetail hitBreakpoints
see I Ast Evaluation Engine evaluate Expression I Compiled Expression I Java Object I Java Thread I Evaluation Listener int boolean public void evaluate Expression I Compiled Expression expression I Java Object this Context I Java Thread thread I Evaluation Listener listener int evaluation Detail boolean hit Breakpoints throws Debug Exception I Runtime Context context new Java Object Runtime Context this Context get Java Project thread do Evaluation expression context thread listener evaluation Detail hit Breakpoints  IAstEvaluationEngine evaluateExpression ICompiledExpression IJavaObject IJavaThread IEvaluationListener evaluateExpression ICompiledExpression IJavaObject thisContext IJavaThread IEvaluationListener evaluationDetail hitBreakpoints DebugException IRuntimeContext JavaObjectRuntimeContext thisContext getJavaProject doEvaluation evaluationDetail hitBreakpoints
Evaluates the given expression in the given thread and the given runtime context private void do Evaluation I Compiled Expression expression I Runtime Context context I Java Thread thread I Evaluation Listener listener int evaluation Detail boolean hit Breakpoints throws Debug Exception if expression instanceof Instruction Sequence don t queue explicite evaluation if the thread is allready performing an evaluation if thread is Suspended JDI Thread thread is Invoking Method thread is Performing Evaluation evaluation Detail Debug Event EVALUATION Evaluation Result result new Evaluation Result this expression get Snippet thread result add Error Evaluation Engine Messages get String AST Evaluation Engine Cannot perform nested evaluations NON NLS 1 listener evaluation Complete result return thread queue Runnable new Eval Runnable Instruction Sequence expression thread context listener evaluation Detail hit Breakpoints else throw new Debug Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Evaluation Engine Messages get String AST Evaluation Engine AST evaluation engine cannot evaluate expression null NON NLS 1  doEvaluation ICompiledExpression IRuntimeContext IJavaThread IEvaluationListener evaluationDetail hitBreakpoints DebugException InstructionSequence isSuspended JDIThread isInvokingMethod isPerformingEvaluation evaluationDetail DebugEvent EvaluationResult EvaluationResult getSnippet addError EvaluationEngineMessages getString ASTEvaluationEngine Cannot_perform_nested_evaluations evaluationComplete queueRunnable EvalRunnable InstructionSequence evaluationDetail hitBreakpoints DebugException IStatus JDIDebugPlugin getUniqueIdentifier IStatus EvaluationEngineMessages getString ASTEvaluationEngine AST_evaluation_engine_cannot_evaluate_expression
see I Evaluation Engine get Compiled Expression String I Java Stack Frame public I Compiled Expression get Compiled Expression String snippet I Java Stack Frame frame I Java Project java Project get Java Project Runtime Context context new Runtime Context java Project frame Evaluation Source Generator mapper null Compilation Unit unit null try I Java Variable locals Var context get Locals int num Locals Var locals Var length to hide problems with local variable declare as instance of Local Types I Java Variable locals new I Java Variable num Locals Var int num Locals 0 for int i 0 i num Locals Var i if is Local Type locals Var i get Reference Type Name locals num Locals locals Var i to solve and remove String local Types Names new String num Locals String local Variables new String num Locals for int i 0 i num Locals i local Variables i locals i get Name local Types Names i locals i get Reference Type Name mapper new Evaluation Source Generator local Types Names local Variables snippet unit parse Compilation Unit mapper get Source frame to Char Array mapper get Compilation Unit Name java Project catch Core Exception e Instruction Sequence expression new Instruction Sequence snippet expression add Error e get Status get Message return expression return create Expression FromAST snippet mapper unit  IEvaluationEngine getCompiledExpression IJavaStackFrame ICompiledExpression getCompiledExpression IJavaStackFrame IJavaProject javaProject getJavaProject RuntimeContext RuntimeContext javaProject EvaluationSourceGenerator CompilationUnit IJavaVariable localsVar getLocals numLocalsVar localsVar IJavaVariable IJavaVariable numLocalsVar numLocals numLocalsVar isLocalType localsVar getReferenceTypeName numLocals localsVar localTypesNames numLocals localVariables numLocals numLocals localVariables getName localTypesNames getReferenceTypeName EvaluationSourceGenerator localTypesNames localVariables parseCompilationUnit getSource toCharArray getCompilationUnitName javaProject CoreException InstructionSequence InstructionSequence addError getStatus getMessage createExpressionFromAST
private Compilation Unit parse Compilation Unit char source String unit Name I Java Project project AST Parser parser AST Parser new Parser AST JLS2 parser set Source source parser set Unit Name unit Name parser set Project project parser set Resolve Bindings true return Compilation Unit parser createAST null  CompilationUnit parseCompilationUnit unitName IJavaProject ASTParser ASTParser newParser setSource setUnitName unitName setProject setResolveBindings CompilationUnit
to hide problems with local variable declare as instance of Local Types private boolean is Local Type String type Name String Tokenizer str Tok new String Tokenizer type Name NON NLS 1 str Tok next Token while str Tok has More Tokens char char0 str Tok next Token char At 0 if 0 char0 char0 9 return true return false  isLocalType typeName StringTokenizer strTok StringTokenizer typeName strTok nextToken strTok hasMoreTokens strTok nextToken charAt
see I Evaluation Engine get Compiled Expression String I Java Object I Java Thread public I Compiled Expression get Compiled Expression String snippet I Java Object this Context if this Context instanceof I Java Array Instruction Sequence error Expression new Instruction Sequence snippet error Expression add Error Evaluation Engine Messages get String AST Evaluation Engine Cannot perform an evaluation in the context of an array instance 1 NON NLS 1 I Java Project java Project get Java Project Evaluation Source Generator mapper null Compilation Unit unit null mapper new Evaluation Source Generator new String 0 new String 0 snippet try unit parse Compilation Unit mapper get Source this Context java Project to Char Array mapper get Compilation Unit Name java Project catch Core Exception e Instruction Sequence expression new Instruction Sequence snippet expression add Error e get Status get Message return expression return create Expression FromAST snippet mapper unit  IEvaluationEngine getCompiledExpression IJavaObject IJavaThread ICompiledExpression getCompiledExpression IJavaObject thisContext thisContext IJavaArray InstructionSequence errorExpression InstructionSequence errorExpression addError EvaluationEngineMessages getString ASTEvaluationEngine Cannot_perform_an_evaluation_in_the_context_of_an_array_instance_1 IJavaProject javaProject getJavaProject EvaluationSourceGenerator CompilationUnit EvaluationSourceGenerator parseCompilationUnit getSource thisContext javaProject toCharArray getCompilationUnitName javaProject CoreException InstructionSequence InstructionSequence addError getStatus getMessage createExpressionFromAST
Creates a compiled expression for the given snippet using the given mapper and compiliation unit AST param snippet the code snippet to be compiled param mapper the object which will be used to create the expression param unit the compilation unit AST generated for the snippet private I Compiled Expression create Expression FromAST String snippet Evaluation Source Generator mapper Compilation Unit unit I Problem problems unit get Problems if problems length 0 boolean snippet Error false boolean run Method Error false Instruction Sequence error Sequence new Instruction Sequence snippet int code Snippet Start mapper get Snippet Start int code Snippet End code Snippet Start mapper get Snippet length int run Method Start mapper get Run Method Start int run Method End run Method Start mapper get Run Method Length for int i 0 i problems length i I Problem problem problems i int error Offset problem get Source Start if problem getID I Problem Is Class Path Correct error Sequence add Error problem get Message snippet Error true if problem is Error problem getID I Problem Void Method Returns Value if code Snippet Start error Offset error Offset code Snippet End error Sequence add Error problem get Message snippet Error true else if run Method Start error Offset error Offset run Method End run Method Error true if snippet Error run Method Error if run Method Error error Sequence add Error Evaluation Engine Messages get String AST Evaluation Engine Evaluations must contain either an expression or a block of well formed statements 1 NON NLS 1 return error Sequence AST Instruction Compiler visitor new AST Instruction Compiler mapper get Snippet Start snippet unit accept visitor return visitor get Instructions  ICompiledExpression createExpressionFromAST EvaluationSourceGenerator CompilationUnit IProblem getProblems snippetError runMethodError InstructionSequence errorSequence InstructionSequence codeSnippetStart getSnippetStart codeSnippetEnd codeSnippetStart getSnippet runMethodStart getRunMethodStart runMethodEnd runMethodStart getRunMethodLength IProblem errorOffset getSourceStart IProblem IsClassPathCorrect errorSequence addError getMessage snippetError isError IProblem VoidMethodReturnsValue codeSnippetStart errorOffset errorOffset codeSnippetEnd errorSequence addError getMessage snippetError runMethodStart errorOffset errorOffset runMethodEnd runMethodError snippetError runMethodError runMethodError errorSequence addError EvaluationEngineMessages getString ASTEvaluationEngine Evaluations_must_contain_either_an_expression_or_a_block_of_well formed_statements_1 errorSequence ASTInstructionCompiler ASTInstructionCompiler getSnippetStart getInstructions
see I Evaluation Engine get Java Project public I Java Project get Java Project return f Project  IEvaluationEngine getJavaProject IJavaProject getJavaProject fProject
see I Evaluation Engine get Debug Target public I Java Debug Target get Debug Target return f Debug Target  IEvaluationEngine getDebugTarget IJavaDebugTarget getDebugTarget fDebugTarget
see I Evaluation Engine dispose public void dispose  IEvaluationEngine
public Eval Runnable Instruction Sequence expression I Java Thread thread I Runtime Context context I Evaluation Listener listener int evaluation Detail boolean hit Breakpoints f Expression expression f Thread thread f Context context f Listener listener f Evaluation Detail evaluation Detail f Hit Breakpoints hit Breakpoints  EvalRunnable InstructionSequence IJavaThread IRuntimeContext IEvaluationListener evaluationDetail hitBreakpoints fExpression fThread fContext fListener fEvaluationDetail evaluationDetail fHitBreakpoints hitBreakpoints
public void run I Java Thread jt I Progress Monitor pm try interpreter execute catch Core Exception exception f Exception exception if f Evaluation Detail Debug Event EVALUATION exception get Status get Exception instanceof Invocation Exception print the stack trace for the exception if an explicit evaluation Invocation Exception invocation Exception Invocation Exception exception get Status get Exception Object Reference ex Object invocation Exception exception I Java Object model Object I Java Object JDI Value create Value JDI Debug Target get Debug Target ex Object try model Object send Message print Stack Trace V null jt false NON NLS 1 NON NLS 2 catch Debug Exception e unable to print stack trace  IJavaThread IProgressMonitor CoreException fException fEvaluationDetail DebugEvent getStatus getException InvocationException InvocationException invocationException InvocationException getStatus getException ObjectReference exObject invocationException IJavaObject modelObject IJavaObject JDIValue createValue JDIDebugTarget getDebugTarget exObject modelObject sendMessage printStackTrace DebugException
public void terminate interpreter stop 
interpreter stop public boolean can Terminate return true  canTerminate
return true public boolean is Terminated return false  isTerminated
public Core Exception get Exception return f Exception  CoreException getException fException
public void run Evaluation Result result new Evaluation Result AST Evaluation Engine this f Expression get Snippet f Thread if f Expression has Errors String errors f Expression get Error Messages for int i 0 num Errors errors length i num Errors i result add Error errors i evaluation Finished result return final Interpreter interpreter new Interpreter f Expression f Context class Evaluation Runnable implements I Evaluation Runnable I Terminate Core Exception f Exception public void run I Java Thread jt I Progress Monitor pm try interpreter execute catch Core Exception exception f Exception exception if f Evaluation Detail Debug Event EVALUATION exception get Status get Exception instanceof Invocation Exception print the stack trace for the exception if an explicit evaluation Invocation Exception invocation Exception Invocation Exception exception get Status get Exception Object Reference ex Object invocation Exception exception I Java Object model Object I Java Object JDI Value create Value JDI Debug Target get Debug Target ex Object try model Object send Message print Stack Trace V null jt false NON NLS 1 NON NLS 2 catch Debug Exception e unable to print stack trace public void terminate interpreter stop public boolean can Terminate return true public boolean is Terminated return false public Core Exception get Exception return f Exception Evaluation Runnable er new Evaluation Runnable Core Exception exception null try f Thread run Evaluation er null f Evaluation Detail f Hit Breakpoints catch Debug Exception e exception e I Java Value value interpreter get Result if exception null exception er get Exception if value null result set Value value else result add Error Evaluation Engine Messages get String AST Evaluation Engine An unknown error occurred during evaluation NON NLS 1 if exception null if exception instanceof Debug Exception result set Exception Debug Exception exception else result set Exception new Debug Exception exception get Status evaluation Finished result  EvaluationResult EvaluationResult ASTEvaluationEngine fExpression getSnippet fThread fExpression hasErrors fExpression getErrorMessages numErrors numErrors addError evaluationFinished fExpression fContext EvaluationRunnable IEvaluationRunnable ITerminate CoreException fException IJavaThread IProgressMonitor CoreException fException fEvaluationDetail DebugEvent getStatus getException InvocationException InvocationException invocationException InvocationException getStatus getException ObjectReference exObject invocationException IJavaObject modelObject IJavaObject JDIValue createValue JDIDebugTarget getDebugTarget exObject modelObject sendMessage printStackTrace DebugException canTerminate isTerminated CoreException getException fException EvaluationRunnable EvaluationRunnable CoreException fThread runEvaluation fEvaluationDetail fHitBreakpoints DebugException IJavaValue getResult getException setValue addError EvaluationEngineMessages getString ASTEvaluationEngine An_unknown_error_occurred_during_evaluation DebugException setException DebugException setException DebugException getStatus evaluationFinished
private void evaluation Finished I Evaluation Result result only notify if plugin not yet shutdown bug 8693 if JDI Debug Plugin get Default null f Listener evaluation Complete result  evaluationFinished IEvaluationResult JDIDebugPlugin getDefault fListener evaluationComplete

public Complete Instruction Jump instruction String label boolean is Break f Instruction instruction f Label label f Is Break is Break  CompleteInstruction isBreak fInstruction fLabel fIsBreak isBreak
Create a new AST instruction compiler public AST Instruction Compiler int start Position String snippet f Start Position start Position f Instructions new Instruction Sequence snippet f Stack new Stack f Complete Instructions new Array List  ASTInstructionCompiler startPosition fStartPosition startPosition fInstructions InstructionSequence fStack fCompleteInstructions ArrayList
Returns the instruction sequence generated by this AST instruction compiler public Instruction Sequence get Instructions return f Instructions  InstructionSequence getInstructions fInstructions
Returns whether the generated instruction sequence has errors Errors include ol li AST contains unimplemented operations features which will be supported but aren t yet li li AST contains unsupported operations features which are not yet implemented and are likely NOT to be implemented li ol public boolean has Errors return f Has Errors  hasErrors fHasErrors
private void set Has Error boolean value f Has Errors value  setHasError fHasErrors
private void add Error Message String message f Instructions add Error message  addErrorMessage fInstructions addError
private boolean is Active return f Active  isActive fActive
private void set Active boolean active f Active active  setActive fActive
private void push Instruction i f Stack push i  fStack
private Instruction pop return Instruction f Stack pop  fStack
private void store Instruction Instruction instruction pop f Counter if instruction instanceof Compound Instruction Compound Instruction instruction set End f Counter f Instructions add instruction verbose Add instruction to String NON NLS 1  storeInstruction fCounter CompoundInstruction CompoundInstruction setEnd fCounter fInstructions toString
Prints the given message to the console if verbose mode is on param message the message to display private void verbose String message if VERBOSE System out println message 
private String get Type Name I Type Binding type Binding String Buffer name if type Binding is Array name new String Buffer get Type Name type Binding get Element Type int dimensions type Binding get Dimensions for int i 0 i dimensions i name append NON NLS 1 return name to String name new String Buffer type Binding get Name I Package Binding package Binding type Binding get Package type Binding type Binding get Declaring Class while type Binding null name insert 0 insert 0 type Binding get Name type Binding type Binding get Declaring Class if package Binding null package Binding is Unnamed name insert 0 insert 0 package Binding get Name return name to String  getTypeName ITypeBinding typeBinding StringBuffer typeBinding isArray StringBuffer getTypeName typeBinding getElementType typeBinding getDimensions toString StringBuffer typeBinding getName IPackageBinding packageBinding typeBinding getPackage typeBinding typeBinding getDeclaringClass typeBinding typeBinding getName typeBinding typeBinding getDeclaringClass packageBinding packageBinding isUnnamed packageBinding getName toString
private String get Type Signature I Type Binding type Binding return Signature create Type Signature get Type Name type Binding true replace  getTypeSignature ITypeBinding typeBinding createTypeSignature getTypeName typeBinding
private boolean isA Local Type I Type Binding type Binding while type Binding null if type Binding is Local return true type Binding type Binding get Declaring Class return false  isALocalType ITypeBinding typeBinding typeBinding typeBinding isLocal typeBinding typeBinding getDeclaringClass
private boolean containsA Local Type I Method Binding method Binding I Type Binding type Bindings method Binding get Parameter Types for int i 0 length type Bindings length i length i if isA Local Type type Bindings i return true return false  containsALocalType IMethodBinding methodBinding ITypeBinding typeBindings methodBinding getParameterTypes typeBindings isALocalType typeBindings
private int get Enclosing Level AST Node node I Type Binding reference Type Binding AST Node parent node do parent parent get Parent while parent instanceof Type Declaration parent instanceof Anonymous Class Declaration I Type Binding parent Binding if parent instanceof Type Declaration parent Binding Type Declaration parent resolve Binding else parent Binding Anonymous Class Declaration parent resolve Binding if is Instance Of parent Binding reference Type Binding return 0 return get Enclosing Level parent reference Type Binding 1  getEnclosingLevel ASTNode ITypeBinding referenceTypeBinding ASTNode getParent TypeDeclaration AnonymousClassDeclaration ITypeBinding parentBinding TypeDeclaration parentBinding TypeDeclaration resolveBinding parentBinding AnonymousClassDeclaration resolveBinding isInstanceOf parentBinding referenceTypeBinding getEnclosingLevel referenceTypeBinding
private int get Super Level I Type Binding current I Type Binding reference if current equals reference return 0 return get Super Level current get Superclass reference  getSuperLevel ITypeBinding ITypeBinding getSuperLevel getSuperclass
private boolean is Instance Of I Type Binding current I Type Binding reference if current equals reference return true I Type Binding interfaces current get Interfaces for int i 0 i interfaces length i if is Instance Of interfaces i reference return true I Type Binding super Class current get Superclass if super Class null return is Instance Of current get Superclass reference return false  isInstanceOf ITypeBinding ITypeBinding ITypeBinding getInterfaces isInstanceOf ITypeBinding superClass getSuperclass superClass isInstanceOf getSuperclass
Return the label associated with the given statement param statement the statement return the associated label or code null code if there is none private String get Label Statement statement AST Node parent statement get Parent if parent instanceof Labeled Statement return Labeled Statement parent get Label get Identifier return null  getLabel ASTNode getParent LabeledStatement LabeledStatement getLabel getIdentifier
Append a pop instruction in the instruction list if needed A pop instruction is added when the expression has a return value i e all expressions expect method invocation expressions which have code void code as return type and variable declaration expression param expression the expressien to test private void add Pop Instruction If Needed Expression expression boolean pop true if expression instanceof Method Invocation I Method Binding method Binding I Method Binding Method Invocation expression get Name resolve Binding if void equals method Binding get Return Type get Name NON NLS 1 pop false else if expression instanceof Super Method Invocation I Method Binding method Binding I Method Binding Super Method Invocation expression get Name resolve Binding if void equals method Binding get Return Type get Name NON NLS 1 pop false else if expression instanceof Variable Declaration Expression pop false if pop push new Pop store Instruction  addPopInstructionIfNeeded MethodInvocation IMethodBinding methodBinding IMethodBinding MethodInvocation getName resolveBinding methodBinding getReturnType getName SuperMethodInvocation IMethodBinding methodBinding IMethodBinding SuperMethodInvocation getName resolveBinding methodBinding getReturnType getName VariableDeclarationExpression storeInstruction
see AST Visitor end Visit Anonymous Class Declaration public void end Visit Anonymous Class Declaration node  ASTVisitor endVisit AnonymousClassDeclaration endVisit AnonymousClassDeclaration
see AST Visitor end Visit Array Access public void end Visit Array Access node if is Active has Errors return store Instruction  ASTVisitor endVisit ArrayAccess endVisit ArrayAccess isActive hasErrors storeInstruction
see AST Visitor end Visit Array Creation public void end Visit Array Creation node if is Active has Errors return store Instruction  ASTVisitor endVisit ArrayCreation endVisit ArrayCreation isActive hasErrors storeInstruction
see AST Visitor end Visit Array Initializer public void end Visit Array Initializer node if is Active has Errors return store Instruction  ASTVisitor endVisit ArrayInitializer endVisit ArrayInitializer isActive hasErrors storeInstruction
see AST Visitor end Visit Array Type public void end Visit Array Type node if is Active has Errors return store Instruction  ASTVisitor endVisit ArrayType endVisit ArrayType isActive hasErrors storeInstruction
see AST Visitor end Visit Assert Statement public void end Visit Assert Statement node  ASTVisitor endVisit AssertStatement endVisit AssertStatement
see AST Visitor end Visit Assignment public void end Visit Assignment node if is Active has Errors return store Instruction  ASTVisitor endVisit endVisit isActive hasErrors storeInstruction
see AST Visitor end Visit Block public void end Visit Block node if is Active has Errors return store Instruction  ASTVisitor endVisit endVisit isActive hasErrors storeInstruction
see AST Visitor end Visit Boolean Literal public void end Visit Boolean Literal node if is Active has Errors return store Instruction  ASTVisitor endVisit BooleanLiteral endVisit BooleanLiteral isActive hasErrors storeInstruction
see AST Visitor end Visit Break Statement public void end Visit Break Statement node if is Active has Errors return store Instruction  ASTVisitor endVisit BreakStatement endVisit BreakStatement isActive hasErrors storeInstruction
see AST Visitor end Visit Cast Expression public void end Visit Cast Expression node if is Active has Errors return store Instruction  ASTVisitor endVisit CastExpression endVisit CastExpression isActive hasErrors storeInstruction
see AST Visitor end Visit Catch Clause public void end Visit Catch Clause node  ASTVisitor endVisit CatchClause endVisit CatchClause
see AST Visitor end Visit Character Literal public void end Visit Character Literal node if is Active has Errors return store Instruction  ASTVisitor endVisit CharacterLiteral endVisit CharacterLiteral isActive hasErrors storeInstruction
see AST Visitor end Visit Class Instance Creation public void end Visit Class Instance Creation node if is Active has Errors return store Instruction  ASTVisitor endVisit ClassInstanceCreation endVisit ClassInstanceCreation isActive hasErrors storeInstruction
see AST Visitor end Visit Compilation Unit public void end Visit Compilation Unit node  ASTVisitor endVisit CompilationUnit endVisit CompilationUnit
see AST Visitor end Visit Conditional Expression public void end Visit Conditional Expression node if is Active has Errors return Get the instructions int if False Address f Instructions get End Instruction if False f Instructions get if False Address int if True Address if False Address if False get Size Instruction if True f Instructions get if True Address int conditional Address if True Address if True get Size Insert the conditional jump Conditional Jump conditional Jump new Conditional Jump false f Instructions insert conditional Jump conditional Address 1 Insert the jump int jump Address if True Address 2 Jump jump new Jump f Instructions insert jump jump Address Set the jump offsets conditional Jump set Offset if True get Size 1 jump set Offset if False get Size 1 f Counter 2 store Instruction  ASTVisitor endVisit ConditionalExpression endVisit ConditionalExpression isActive hasErrors ifFalseAddress fInstructions getEnd ifFalse fInstructions ifFalseAddress ifTrueAddress ifFalseAddress ifFalse getSize ifTrue fInstructions ifTrueAddress conditionalAddress ifTrueAddress ifTrue getSize ConditionalJump conditionalJump ConditionalJump fInstructions conditionalJump conditionalAddress jumpAddress ifTrueAddress fInstructions jumpAddress conditionalJump setOffset ifTrue getSize setOffset ifFalse getSize fCounter storeInstruction
see AST Visitor end Visit Constructor Invocation public void end Visit Constructor Invocation node  ASTVisitor endVisit ConstructorInvocation endVisit ConstructorInvocation
see AST Visitor end Visit Continue Statement public void end Visit Continue Statement node if is Active has Errors return store Instruction  ASTVisitor endVisit ContinueStatement endVisit ContinueStatement isActive hasErrors storeInstruction
see AST Visitor end Visit Do Statement public void end Visit Do Statement node if is Active has Errors return The structure of generated instructions is body condition jump to the first instruction of the body if the condition is true String label get Label node get adress of each part int condition Address f Instructions get End Instruction condition f Instructions get Instruction condition Address int body Address condition Address condition get Size Instruction body f Instructions get Instruction body Address add the conditionnal Jump Conditional Jump conditional Jump new Conditional Jump true f Instructions add conditional Jump f Counter set jump offsets conditional Jump set Offset condition get Size body get Size 1 for each pending break or continue instruction which are related to this loop set the offset of the corresponding jump for Iterator iter f Complete Instructions iterator iter has Next Complete Instruction instruction Complete Instruction iter next if instruction f Label null instruction f Label equals label iter remove Jump jump Instruction instruction f Instruction int instruction Address f Instructions index Of jump Instruction if instruction f Is Break jump to the instruction after the last jump jump Instruction set Offset condition Address instruction Address 1 else jump to the first instruction of the condition jump Instruction set Offset body Address instruction Address store Instruction  ASTVisitor endVisit DoStatement endVisit DoStatement isActive hasErrors getLabel conditionAddress fInstructions getEnd fInstructions getInstruction conditionAddress bodyAddress conditionAddress getSize fInstructions getInstruction bodyAddress conditionnalJump ConditionalJump conditionalJump ConditionalJump fInstructions conditionalJump fCounter conditionalJump setOffset getSize getSize fCompleteInstructions hasNext CompleteInstruction CompleteInstruction fLabel fLabel jumpInstruction fInstruction instructionAddress fInstructions indexOf jumpInstruction fIsBreak jumpInstruction setOffset conditionAddress instructionAddress jumpInstruction setOffset bodyAddress instructionAddress storeInstruction
see AST Visitor end Visit Empty Statement public void end Visit Empty Statement node if is Active has Errors return store Instruction  ASTVisitor endVisit EmptyStatement endVisit EmptyStatement isActive hasErrors storeInstruction
see AST Visitor end Visit Expression Statement public void end Visit Expression Statement node if is Active has Errors return add Pop Instruction If Needed node get Expression  ASTVisitor endVisit ExpressionStatement endVisit ExpressionStatement isActive hasErrors addPopInstructionIfNeeded getExpression
see AST Visitor end Visit Field Access public void end Visit Field Access node if is Active has Errors return store Instruction  ASTVisitor endVisit FieldAccess endVisit FieldAccess isActive hasErrors storeInstruction
see AST Visitor end Visit Field Declaration public void end Visit Field Declaration node  ASTVisitor endVisit FieldDeclaration endVisit FieldDeclaration
see AST Visitor end Visit For Statement public void end Visit For Statement node if is Active has Errors return The structure of generated instructions is initialization condition jump to the instruction after the last jump if the condition is false body updaters jump to the first instruction of the condition String label get Label node boolean has Condition node get Expression null get adress of each part int updaters Address f Instructions get End Instruction updaters f Instructions get Instruction updaters Address int body Address updaters Address updaters get Size Instruction body f Instructions get Instruction body Address int condition Address Instruction condition if has Condition condition Address body Address body get Size condition f Instructions get Instruction condition Address else condition Address 0 condition null add jump Jump jump new Jump f Instructions add jump f Counter if has Condition add conditionnal jump Conditional Jump cond Jump new Conditional Jump false f Instructions insert cond Jump condition Address 1 body Address updaters Address f Counter conditionnal set jump offset cond Jump set Offset body get Size updaters get Size 1 set jump offset jump set Offset has Condition condition get Size 0 body get Size updaters get Size 2 for each pending break or continue instruction which are related to this loop set the offset of the corresponding jump for Iterator iter f Complete Instructions iterator iter has Next Complete Instruction instruction Complete Instruction iter next if instruction f Label null instruction f Label equals label iter remove Jump jump Instruction instruction f Instruction int instruction Address f Instructions index Of jump Instruction if instruction f Is Break jump to the instruction after the last jump jump Instruction set Offset updaters Address instruction Address 1 else jump to the first instruction of the condition jump Instruction set Offset body Address instruction Address store Instruction  ASTVisitor endVisit ForStatement endVisit ForStatement isActive hasErrors getLabel hasCondition getExpression updatersAddress fInstructions getEnd fInstructions getInstruction updatersAddress bodyAddress updatersAddress getSize fInstructions getInstruction bodyAddress conditionAddress hasCondition conditionAddress bodyAddress getSize fInstructions getInstruction conditionAddress conditionAddress fInstructions fCounter hasCondition ConditionalJump condJump ConditionalJump fInstructions condJump conditionAddress bodyAddress updatersAddress fCounter condJump setOffset getSize getSize setOffset hasCondition getSize getSize getSize fCompleteInstructions hasNext CompleteInstruction CompleteInstruction fLabel fLabel jumpInstruction fInstruction instructionAddress fInstructions indexOf jumpInstruction fIsBreak jumpInstruction setOffset updatersAddress instructionAddress jumpInstruction setOffset bodyAddress instructionAddress storeInstruction
see AST Visitor end Visit If Statement public void end Visit If Statement node if is Active has Errors return boolean has Else Statement node get Else Statement null Get the instructions int if False Address 0 Instruction if False null int if True Address 0 Instruction if True null if has Else Statement if False Address f Instructions get End if False f Instructions get if False Address if True Address if False Address if False get Size if True f Instructions get if True Address else if True Address f Instructions get End if True f Instructions get if True Address int conditional Address if True Address if True get Size Insert the conditional jump Conditional Jump conditional Jump new Conditional Jump false f Instructions insert conditional Jump conditional Address 1 Set the jump offset conditional Jump set Offset if True get Size has Else Statement 1 0 f Counter if has Else Statement Insert the jump int jump Address if True Address 2 Jump jump new Jump f Instructions insert jump jump Address Set the jump offset jump set Offset if False get Size 1 f Counter store Instruction  ASTVisitor endVisit IfStatement endVisit IfStatement isActive hasErrors hasElseStatement getElseStatement ifFalseAddress ifFalse ifTrueAddress ifTrue hasElseStatement ifFalseAddress fInstructions getEnd ifFalse fInstructions ifFalseAddress ifTrueAddress ifFalseAddress ifFalse getSize ifTrue fInstructions ifTrueAddress ifTrueAddress fInstructions getEnd ifTrue fInstructions ifTrueAddress conditionalAddress ifTrueAddress ifTrue getSize ConditionalJump conditionalJump ConditionalJump fInstructions conditionalJump conditionalAddress conditionalJump setOffset ifTrue getSize hasElseStatement fCounter hasElseStatement jumpAddress ifTrueAddress fInstructions jumpAddress setOffset ifFalse getSize fCounter storeInstruction
see AST Visitor end Visit Import Declaration public void end Visit Import Declaration node  ASTVisitor endVisit ImportDeclaration endVisit ImportDeclaration
see AST Visitor end Visit Infix Expression public void end Visit Infix Expression node  ASTVisitor endVisit InfixExpression endVisit InfixExpression
see AST Visitor end Visit Initializer public void end Visit Initializer node  ASTVisitor endVisit endVisit
see AST Visitor end Visit Instanceof Expression public void end Visit Instanceof Expression node if is Active has Errors return store Instruction  ASTVisitor endVisit InstanceofExpression endVisit InstanceofExpression isActive hasErrors storeInstruction
see AST Visitor end Visit Javadoc public void end Visit Javadoc node  ASTVisitor endVisit endVisit
see AST Visitor end Visit Labeled Statement public void end Visit Labeled Statement node if is Active has Errors return String label node get Label get Identifier for each pending continue instruction which are related to this statement set the offset of the corresponding jump for Iterator iter f Complete Instructions iterator iter has Next Complete Instruction instruction Complete Instruction iter next if instruction f Label null instruction f Label equals label iter remove Jump jump Instruction instruction f Instruction int instruction Address f Instructions index Of jump Instruction if instruction f Is Break jump to the instruction after the statement jump Instruction set Offset f Instructions get End instruction Address  ASTVisitor endVisit LabeledStatement endVisit LabeledStatement isActive hasErrors getLabel getIdentifier fCompleteInstructions hasNext CompleteInstruction CompleteInstruction fLabel fLabel jumpInstruction fInstruction instructionAddress fInstructions indexOf jumpInstruction fIsBreak jumpInstruction setOffset fInstructions getEnd instructionAddress
see AST Visitor end Visit Method Declaration public void end Visit Method Declaration node set Active false  ASTVisitor endVisit MethodDeclaration endVisit MethodDeclaration setActive
see AST Visitor end Visit Method Invocation public void end Visit Method Invocation node if is Active has Errors return store Instruction  ASTVisitor endVisit MethodInvocation endVisit MethodInvocation isActive hasErrors storeInstruction
see AST Visitor end Visit Null Literal public void end Visit Null Literal node if is Active has Errors return store Instruction  ASTVisitor endVisit NullLiteral endVisit NullLiteral isActive hasErrors storeInstruction
see AST Visitor end Visit Number Literal public void end Visit Number Literal node if is Active has Errors return store Instruction  ASTVisitor endVisit NumberLiteral endVisit NumberLiteral isActive hasErrors storeInstruction
see AST Visitor end Visit Package Declaration public void end Visit Package Declaration node  ASTVisitor endVisit PackageDeclaration endVisit PackageDeclaration
see AST Visitor end Visit Parenthesized Expression public void end Visit Parenthesized Expression node  ASTVisitor endVisit ParenthesizedExpression endVisit ParenthesizedExpression
see AST Visitor end Visit Postfix Expression public void end Visit Postfix Expression node if is Active has Errors return store Instruction  ASTVisitor endVisit PostfixExpression endVisit PostfixExpression isActive hasErrors storeInstruction
see AST Visitor end Visit Prefix Expression public void end Visit Prefix Expression node if is Active has Errors return store Instruction  ASTVisitor endVisit PrefixExpression endVisit PrefixExpression isActive hasErrors storeInstruction
see AST Visitor end Visit Primitive Type public void end Visit Primitive Type node  ASTVisitor endVisit PrimitiveType endVisit PrimitiveType
see AST Visitor end Visit Qualified Name public void end Visit Qualified Name node  ASTVisitor endVisit QualifiedName endVisit QualifiedName
see AST Visitor end Visit Return Statement public void end Visit Return Statement node if is Active has Errors return store Instruction  ASTVisitor endVisit ReturnStatement endVisit ReturnStatement isActive hasErrors storeInstruction
see AST Visitor end Visit Simple Name public void end Visit Simple Name node if is Active has Errors return store Instruction  ASTVisitor endVisit SimpleName endVisit SimpleName isActive hasErrors storeInstruction
see AST Visitor end Visit Simple Type public void end Visit Simple Type node if is Active has Errors return store Instruction  ASTVisitor endVisit SimpleType endVisit SimpleType isActive hasErrors storeInstruction
see AST Visitor end Visit Single Variable Declaration public void end Visit Single Variable Declaration node if is Active has Errors return store Instruction  ASTVisitor endVisit SingleVariableDeclaration endVisit SingleVariableDeclaration isActive hasErrors storeInstruction
see AST Visitor end Visit String Literal public void end Visit String Literal node if is Active has Errors return store Instruction  ASTVisitor endVisit StringLiteral endVisit StringLiteral isActive hasErrors storeInstruction
see AST Visitor end Visit Super Constructor Invocation public void end Visit Super Constructor Invocation node  ASTVisitor endVisit SuperConstructorInvocation endVisit SuperConstructorInvocation
see AST Visitor end Visit Super Field Access public void end Visit Super Field Access node if is Active has Errors return store Instruction  ASTVisitor endVisit SuperFieldAccess endVisit SuperFieldAccess isActive hasErrors storeInstruction
see AST Visitor end Visit Super Method Invocation public void end Visit Super Method Invocation node if is Active has Errors return store Instruction  ASTVisitor endVisit SuperMethodInvocation endVisit SuperMethodInvocation isActive hasErrors storeInstruction
see AST Visitor end Visit Switch Case public void end Visit Switch Case node  ASTVisitor endVisit SwitchCase endVisit SwitchCase
see AST Visitor end Visit Switch Statement public void end Visit Switch Statement node  ASTVisitor endVisit SwitchStatement endVisit SwitchStatement
see AST Visitor end Visit Synchronized Statement public void end Visit Synchronized Statement node  ASTVisitor endVisit SynchronizedStatement endVisit SynchronizedStatement
see AST Visitor end Visit This Expression public void end Visit This Expression node if is Active has Errors return store Instruction  ASTVisitor endVisit ThisExpression endVisit ThisExpression isActive hasErrors storeInstruction
see AST Visitor end Visit Throw Statement public void end Visit Throw Statement node if is Active has Errors return store Instruction  ASTVisitor endVisit ThrowStatement endVisit ThrowStatement isActive hasErrors storeInstruction
see AST Visitor end Visit Try Statement public void end Visit Try Statement node  ASTVisitor endVisit TryStatement endVisit TryStatement
see AST Visitor end Visit Type Declaration public void end Visit Type Declaration node  ASTVisitor endVisit TypeDeclaration endVisit TypeDeclaration
see AST Visitor end Visit Type Declaration Statement public void end Visit Type Declaration Statement node  ASTVisitor endVisit TypeDeclarationStatement endVisit TypeDeclarationStatement
see AST Visitor end Visit Type Literal public void end Visit Type Literal node if is Active has Errors return store Instruction  ASTVisitor endVisit TypeLiteral endVisit TypeLiteral isActive hasErrors storeInstruction
see AST Visitor end Visit Variable Declaration Expression public void end Visit Variable Declaration Expression node  ASTVisitor endVisit VariableDeclarationExpression endVisit VariableDeclarationExpression
see AST Visitor end Visit Variable Declaration Fragment public void end Visit Variable Declaration Fragment node if is Active has Errors return store Instruction  ASTVisitor endVisit VariableDeclarationFragment endVisit VariableDeclarationFragment isActive hasErrors storeInstruction
see AST Visitor end Visit Variable Declaration Statement public void end Visit Variable Declaration Statement node  ASTVisitor endVisit VariableDeclarationStatement endVisit VariableDeclarationStatement
see AST Visitor end Visit While Statement public void end Visit While Statement node if is Active has Errors return The structure of generated instructions is condition jump to the instruction after the last jump if the condition is false body jump to the first instruction of the condition String label get Label node get adress of each part int body Address f Instructions get End Instruction body f Instructions get Instruction body Address int condition Address body Address body get Size Instruction condition f Instructions get Instruction condition Address add the conditionnal Jump Conditional Jump conditional Jump new Conditional Jump false f Instructions insert conditional Jump condition Address 1 add the jump Jump jump new Jump f Instructions add jump set jump offsets conditional Jump set Offset body get Size 1 jump set Offset condition get Size body get Size 2 for each pending break or continue instruction which are related to this loop set the offset of the corresponding jump for Iterator iter f Complete Instructions iterator iter has Next Complete Instruction instruction Complete Instruction iter next if instruction f Label null instruction f Label equals label iter remove Jump jump Instruction instruction f Instruction int instruction Address f Instructions index Of jump Instruction if instruction f Is Break jump to the instruction after the last jump jump Instruction set Offset body Address instruction Address 2 else jump to the first instruction of the condition jump Instruction set Offset condition Address condition get Size instruction Address f Counter 2 store Instruction  ASTVisitor endVisit WhileStatement endVisit WhileStatement isActive hasErrors getLabel bodyAddress fInstructions getEnd fInstructions getInstruction bodyAddress conditionAddress bodyAddress getSize fInstructions getInstruction conditionAddress conditionnalJump ConditionalJump conditionalJump ConditionalJump fInstructions conditionalJump conditionAddress fInstructions conditionalJump setOffset getSize setOffset getSize getSize fCompleteInstructions hasNext CompleteInstruction CompleteInstruction fLabel fLabel jumpInstruction fInstruction instructionAddress fInstructions indexOf jumpInstruction fIsBreak jumpInstruction setOffset bodyAddress instructionAddress jumpInstruction setOffset conditionAddress getSize instructionAddress fCounter storeInstruction
see AST Visitor visit Anonymous Class Declaration public boolean visit Anonymous Class Declaration node if is Active return true set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Anonymous type declaration cannot be used in an evaluation expression 2 NON NLS 1 return false  ASTVisitor AnonymousClassDeclaration AnonymousClassDeclaration isActive setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Anonymous_type_declaration_cannot_be_used_in_an_evaluation_expression_2
see AST Visitor visit Array Access public boolean visit Array Access node if is Active return false push new org eclipse jdt internal debug eval ast instructions Array Access f Counter return true  ASTVisitor ArrayAccess ArrayAccess isActive ArrayAccess fCounter
see AST Visitor visit Array Creation public boolean visit Array Creation node if is Active return false Array Type array Type node get Type if isA Local Type array Type resolve Binding get Element Type add Error Message Evaluation Engine Messages get String AST Instruction Compiler Local type array instance creation cannot be used in an evaluation expression 29 NON NLS 1 set Has Error true return true push new Array Allocation array Type get Dimensions node dimensions size node get Initializer null f Counter return true  ASTVisitor ArrayCreation ArrayCreation isActive ArrayType arrayType getType isALocalType arrayType resolveBinding getElementType addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Local_type_array_instance_creation_cannot_be_used_in_an_evaluation_expression_29 setHasError ArrayAllocation arrayType getDimensions getInitializer fCounter
see AST Visitor visit Array Initializer public boolean visit Array Initializer node if is Active return false I Type Binding type Binding node resolve Type Binding int dimension type Binding get Dimensions String signature get Type Signature type Binding get Element Type push new Array Initializer Instruction signature node expressions size dimension f Counter return true  ASTVisitor ArrayInitializer ArrayInitializer isActive ITypeBinding typeBinding resolveTypeBinding typeBinding getDimensions getTypeSignature typeBinding getElementType ArrayInitializerInstruction fCounter
see AST Visitor visit Array Type public boolean visit Array Type node if is Active return false I Type Binding array Type Binding node resolve Binding int dimension array Type Binding get Dimensions String signature get Type Signature array Type Binding get Element Type push new Push Array Type signature dimension f Counter return false  ASTVisitor ArrayType ArrayType isActive ITypeBinding arrayTypeBinding resolveBinding arrayTypeBinding getDimensions getTypeSignature arrayTypeBinding getElementType PushArrayType fCounter
see AST Visitor visit Assert Statement public boolean visit Assert Statement node if is Active return false set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Assert statement cannot be used in an evaluation expression 3 NON NLS 1 return true  ASTVisitor AssertStatement AssertStatement isActive setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Assert_statement_cannot_be_used_in_an_evaluation_expression_3
see AST Visitor visit Assignment public boolean visit Assignment node if is Active return false int variable Type Id get Type Id node get Left Hand Side int value Type Id get Type Id node get Right Hand Side String op Token node get Operator to String int op Token Length op Token length char char0 op Token char At 0 char char2 0 if op Token Length 2 char2 op Token char At 2 boolean unrecognized false switch char0 case equal push new Assignment Operator variable Type Id value Type Id f Counter break case plus equal push new Plus Assignment Operator variable Type Id value Type Id f Counter break case minus equal push new Minus Assignment Operator variable Type Id value Type Id f Counter break case multiply equal push new Multiply Assignment Operator variable Type Id value Type Id f Counter break case divide equal push new Divide Assignment Operator variable Type Id value Type Id f Counter break case remainder equal push new Remainder Assignment Operator variable Type Id value Type Id f Counter break case xor equal push new Xor Assignment Operator variable Type Id value Type Id f Counter break case or equal push new Or Assignment Operator variable Type Id value Type Id f Counter break case and equal push new And Assignment Operator variable Type Id value Type Id f Counter break case left shift equal push new Left Shift Assignment Operator variable Type Id value Type Id f Counter break case right shift equal or unsigned right shift equal switch char2 case right shift equal push new Right Shift Assignment Operator variable Type Id value Type Id f Counter break case unsigned right shift equal push new Unsigned Right Shift Assignment Operator variable Type Id value Type Id f Counter break default unrecognized true break break default unrecognized true break if unrecognized set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Unrecognized assignment operator    4 op Token NON NLS 1 return true  ASTVisitor isActive variableTypeId getTypeId getLeftHandSide valueTypeId getTypeId getRightHandSide opToken getOperator toString opTokenLength opToken opToken charAt opTokenLength opToken charAt AssignmentOperator variableTypeId valueTypeId fCounter PlusAssignmentOperator variableTypeId valueTypeId fCounter MinusAssignmentOperator variableTypeId valueTypeId fCounter MultiplyAssignmentOperator variableTypeId valueTypeId fCounter DivideAssignmentOperator variableTypeId valueTypeId fCounter RemainderAssignmentOperator variableTypeId valueTypeId fCounter XorAssignmentOperator variableTypeId valueTypeId fCounter OrAssignmentOperator variableTypeId valueTypeId fCounter AndAssignmentOperator variableTypeId valueTypeId fCounter LeftShiftAssignmentOperator variableTypeId valueTypeId fCounter RightShiftAssignmentOperator variableTypeId valueTypeId fCounter UnsignedRightShiftAssignmentOperator variableTypeId valueTypeId fCounter setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Unrecognized_assignment_operator____4 opToken
see AST Visitor visit Block public boolean visit Block node int start node get Start Position if start f Start Position start f Start Position 1 set Active true if is Active return true push new No Op f Counter return true  ASTVisitor getStartPosition fStartPosition fStartPosition setActive isActive NoOp fCounter
see AST Visitor visit Boolean Literal public boolean visit Boolean Literal node if is Active return false push new Push Boolean node boolean Value return true  ASTVisitor BooleanLiteral BooleanLiteral isActive PushBoolean booleanValue
see AST Visitor visit Break Statement public boolean visit Break Statement node if is Active return false create the equivalent jump instruction in the instruction and add an element in the list of pending break and continue instructions Jump instruction new Jump Simple Name label Name node get Label String label null if label Name null label label Name get Identifier push instruction f Complete Instructions add new Complete Instruction instruction label true return false  ASTVisitor BreakStatement BreakStatement isActive SimpleName labelName getLabel labelName labelName getIdentifier fCompleteInstructions CompleteInstruction
see AST Visitor visit Cast Expression public boolean visit Cast Expression node if is Active return false Type type node get Type int type Id get Type Id type I Type Binding type Binding type resolve Binding String base Type Signature int dimension type Binding get Dimensions if type Binding is Array type Binding type Binding get Element Type base Type Signature get Type Name type Binding push new Cast type Id base Type Signature dimension f Counter node get Expression accept this return false  ASTVisitor CastExpression CastExpression isActive getType typeId getTypeId ITypeBinding typeBinding resolveBinding baseTypeSignature typeBinding getDimensions typeBinding isArray typeBinding typeBinding getElementType baseTypeSignature getTypeName typeBinding typeId baseTypeSignature fCounter getExpression
see AST Visitor visit Catch Clause public boolean visit Catch Clause node if is Active return false set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Catch clause cannot be used in an evaluation expression 6 NON NLS 1 return true  ASTVisitor CatchClause CatchClause isActive setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Catch_clause_cannot_be_used_in_an_evaluation_expression_6
see AST Visitor visit Character Literal public boolean visit Character Literal node if is Active return false push new Push Char node char Value return true  ASTVisitor CharacterLiteral CharacterLiteral isActive PushChar charValue
return false visit expression type name arguments don t visit body declaration see AST Visitor visit Class Instance Creation public boolean visit Class Instance Creation node if is Active return true if node get Anonymous Class Declaration null set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Anonymous type declaration cannot be used in an evaluation expression 7 NON NLS 1 I Method Binding method Binding node resolve Constructor Binding I Type Binding type Binding method Binding get Declaring Class I Type Binding enclosing Type Binding type Binding get Declaring Class boolean is Instance Member Type type Binding is Member Modifier is Static type Binding get Modifiers if isA Local Type type Binding set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Constructor of a local type cannot be used in an evaluation expression 8 NON NLS 1 if containsA Local Type method Binding set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Constructor which contains a local type as parameter cannot be used in an evaluation expression 30 NON NLS 1 if has Errors return true int arg Count method Binding get Parameter Types length String enclosing Type Signature null if is Instance Member Type enclosing Type Signature get Type Signature enclosing Type Binding arg Count String signature get Method Signature method Binding enclosing Type Signature replace push new Constructor signature arg Count f Counter push new Push Type get Type Name type Binding store Instruction if is Instance Member Type Expression optional Expression node get Expression if optional Expression null optional Expression accept this else for a non static inner class check if we are not in a static context method AST Node parent node do parent parent get Parent while parent instanceof Method Declaration if Modifier is Static Method Declaration parent get Modifiers set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Must explicitly qualify the allocation with an instance of the enclosing type 33 NON NLS 1 return true push new Push This get Enclosing Level node enclosing Type Binding store Instruction Iterator iterator node arguments iterator while iterator has Next Expression iterator next accept this return false  ASTVisitor ClassInstanceCreation ClassInstanceCreation isActive getAnonymousClassDeclaration setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Anonymous_type_declaration_cannot_be_used_in_an_evaluation_expression_7 IMethodBinding methodBinding resolveConstructorBinding ITypeBinding typeBinding methodBinding getDeclaringClass ITypeBinding enclosingTypeBinding typeBinding getDeclaringClass isInstanceMemberType typeBinding isMember isStatic typeBinding getModifiers isALocalType typeBinding setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Constructor_of_a_local_type_cannot_be_used_in_an_evaluation_expression_8 containsALocalType methodBinding setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Constructor_which_contains_a_local_type_as_parameter_cannot_be_used_in_an_evaluation_expression_30 hasErrors argCount methodBinding getParameterTypes enclosingTypeSignature isInstanceMemberType enclosingTypeSignature getTypeSignature enclosingTypeBinding argCount getMethodSignature methodBinding enclosingTypeSignature argCount fCounter PushType getTypeName typeBinding storeInstruction isInstanceMemberType optionalExpression getExpression optionalExpression optionalExpression ASTNode getParent MethodDeclaration isStatic MethodDeclaration getModifiers setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Must_explicitly_qualify_the_allocation_with_an_instance_of_the_enclosing_type_33 PushThis getEnclosingLevel enclosingTypeBinding storeInstruction hasNext
see AST Visitor visit Compilation Unit public boolean visit Compilation Unit node return true  ASTVisitor CompilationUnit CompilationUnit
see AST Visitor visit Conditional Expression public boolean visit Conditional Expression node if is Active return true push new No Op f Counter return true  ASTVisitor ConditionalExpression ConditionalExpression isActive NoOp fCounter
see AST Visitor visit Constructor Invocation public boolean visit Constructor Invocation node if is Active return false set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler this constructor invocation cannot be used in an evaluation expression 9 NON NLS 1 return false  ASTVisitor ConstructorInvocation ConstructorInvocation isActive setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler this_constructor_invocation_cannot_be_used_in_an_evaluation_expression_9
see AST Visitor visit Continue Statement public boolean visit Continue Statement node if is Active return false create the equivalent jump instruction in the instruction and add an element in the list of pending break and continue instructions Jump instruction new Jump Simple Name label Name node get Label String label null if label Name null label label Name get Identifier push instruction f Complete Instructions add new Complete Instruction instruction label false return false  ASTVisitor ContinueStatement ContinueStatement isActive SimpleName labelName getLabel labelName labelName getIdentifier fCompleteInstructions CompleteInstruction
see AST Visitor visit Do Statement public boolean visit Do Statement node if is Active return false push new No Op f Counter return true  ASTVisitor DoStatement DoStatement isActive NoOp fCounter
see AST Visitor visit Empty Statement public boolean visit Empty Statement node if is Active return false push new No Op f Counter return true  ASTVisitor EmptyStatement EmptyStatement isActive NoOp fCounter
see AST Visitor visit Expression Statement public boolean visit Expression Statement node if is Active return true return true  ASTVisitor ExpressionStatement ExpressionStatement isActive
return false visit expression don t visit name see AST Visitor visit Field Access public boolean visit Field Access node if is Active return false Simple Name field Name node get Name I Variable Binding field Binding I Variable Binding field Name resolve Binding I Type Binding declaring Type Binding field Binding get Declaring Class Expression expression node get Expression String field Id field Name get Identifier if Modifier is Static field Binding get Modifiers push new Push Static Field Variable field Id get Type Name declaring Type Binding f Counter expression accept this push new Pop store Instruction else if declaring Type Binding null it is a field without declaring type it is the special length array field push new Push Array Length f Counter else if isA Local Type declaring Type Binding set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Qualified local type field access cannot be used in an evaluation expression 31 NON NLS 1 return false push new Push Field Variable field Id get Type Signature declaring Type Binding f Counter expression accept this return false  ASTVisitor FieldAccess FieldAccess isActive SimpleName fieldName getName IVariableBinding fieldBinding IVariableBinding fieldName resolveBinding ITypeBinding declaringTypeBinding fieldBinding getDeclaringClass getExpression fieldId fieldName getIdentifier isStatic fieldBinding getModifiers PushStaticFieldVariable fieldId getTypeName declaringTypeBinding fCounter storeInstruction declaringTypeBinding PushArrayLength fCounter isALocalType declaringTypeBinding setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Qualified_local_type_field_access_cannot_be_used_in_an_evaluation_expression_31 PushFieldVariable fieldId getTypeSignature declaringTypeBinding fCounter
see AST Visitor visit Field Declaration public boolean visit Field Declaration node return true  ASTVisitor FieldDeclaration FieldDeclaration
see AST Visitor visit For Statement return code false code don t use the standart accept order order used for visite children initializers condition body updaters public boolean visit For Statement node if is Active return false push new No Op f Counter push new No Op f Counter for Iterator iter node initializers iterator iter has Next Expression expr Expression iter next expr accept this add Pop Instruction If Needed expr store Instruction Expression condition node get Expression if condition null condition accept this node get Body accept this push new No Op f Counter for Iterator iter node updaters iterator iter has Next Expression expr Expression iter next expr accept this add Pop Instruction If Needed expr store Instruction return false  ASTVisitor ForStatement ForStatement isActive NoOp fCounter NoOp fCounter hasNext addPopInstructionIfNeeded storeInstruction getExpression getBody NoOp fCounter hasNext addPopInstructionIfNeeded storeInstruction
see AST Visitor visit If Statement public boolean visit If Statement node if is Active return false push new No Op f Counter return true  ASTVisitor IfStatement IfStatement isActive NoOp fCounter
see AST Visitor visit Import Declaration public boolean visit Import Declaration node return false  ASTVisitor ImportDeclaration ImportDeclaration
return code false code don t use the standart accept order see AST Visitor visit Infix Expression public boolean visit Infix Expression node if is Active return false String op Token node get Operator to String int op Token Length op Token length char char0 op Token char At 0 char char1 0 char char2 0 if op Token Length 1 char1 op Token char At 1 if op Token Length 2 char2 op Token char At 2 List extended Operands node extended Operands int operator Number extended Operands size 1 int types new int operator Number 3 Iterator iterator extended Operands iterator int left Type Id get Type Id node get Left Operand int right Type Id get Type Id node get Right Operand int result Type Id Instruction get Binary Promotion Type left Type Id right Type Id types 0 0 result Type Id types 0 1 left Type Id types 0 2 right Type Id for int i 1 i operator Number i Expression operand Expression iterator next left Type Id result Type Id right Type Id get Type Id operand result Type Id Instruction get Binary Promotion Type left Type Id right Type Id types i 0 result Type Id types i 1 left Type Id types i 2 right Type Id boolean unrecognized false switch char0 case multiply for int i operator Number 1 i 0 i push new Multiply Operator types i 0 types i 1 types i 2 f Counter break case divide for int i operator Number 1 i 0 i push new Divide Operator types i 0 types i 1 types i 2 f Counter break case remainder for int i operator Number 1 i 0 i push new Remainder Operator types i 0 types i 1 types i 2 f Counter break case plus for int i operator Number 1 i 0 i push new Plus Operator types i 0 types i 1 types i 2 f Counter break case minus for int i operator Number 1 i 0 i push new Minus Operator types i 0 types i 1 types i 2 f Counter break case left shift or less or less equal switch char1 case 0 less for int i operator Number 1 i 0 i push new Less Operator types i 1 types i 2 f Counter break case left shift for int i operator Number 1 i 0 i push new Left Shift Operator Instruction get Unary Promotion Type types i 1 types i 1 types i 2 f Counter break case less equal for int i operator Number 1 i 0 i push new Less Equal Operator types i 1 types i 2 f Counter break default unrecognized true break break case right shift or unsigned right shift or greater or greater equal switch char1 case 0 greater for int i operator Number 1 i 0 i push new Greater Operator types i 1 types i 2 f Counter break case right shift or unsigned right shift switch char2 case 0 right shift for int i operator Number 1 i 0 i push new Right Shift Operator Instruction get Unary Promotion Type types i 1 types i 1 types i 2 f Counter break case unsigned right shift for int i operator Number 1 i 0 i push new Unsigned Right Shift Operator Instruction get Unary Promotion Type types i 1 types i 1 types i 2 f Counter break break case greater equal for int i operator Number 1 i 0 i push new Greater Equal Operator types i 1 types i 2 f Counter break default unrecognized true break break case equal equal for int i operator Number 1 i 0 i push new Equal Equal Operator types i 1 types i 2 true f Counter break case not equal for int i operator Number 1 i 0 i push new Equal Equal Operator types i 1 types i 2 false f Counter break case xor for int i operator Number 1 i 0 i push new Xor Operator types i 0 types i 1 types i 2 f Counter break case or or or or switch char1 case 0 or for int i operator Number 1 i 0 i push new Or Operator types i 0 types i 1 types i 2 f Counter break case or or for int i operator Number 1 i 0 i push new No Op f Counter break default unrecognized true break break case and or and and switch char1 case 0 and for int i operator Number 1 i 0 i push new And Operator types i 0 types i 1 types i 2 f Counter break case and and for int i operator Number 1 i 0 i push new No Op f Counter break default unrecognized true break break default unrecognized true break if unrecognized set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Unrecognized infix operator    13 op Token NON NLS 1 if has Errors return true iterator extended Operands iterator if char0 char1 char0 char1 and and operator boolean is Or Or char0 Conditional Jump conditional Jumps new Conditional Jump operator Number int conditional Jump Addresses new int operator Number node get Left Operand accept this Conditional Jump conditional Jump new Conditional Jump is Or Or conditional Jumps 0 conditional Jump conditional Jump Addresses 0 f Counter push conditional Jump store Instruction node get Right Operand accept this for int i 1 i operator Number i conditional Jump new Conditional Jump is Or Or conditional Jumps i conditional Jump conditional Jump Addresses i f Counter push conditional Jump store Instruction Expression iterator next accept this Jump jump new Jump jump set Offset 1 push jump store Instruction for int i 0 i operator Number i conditional Jumps i set Offset f Counter conditional Jump Addresses i 1 push new Push Boolean is Or Or store Instruction store the noop store Instruction else other operatos node get Left Operand accept this node get Right Operand accept this store Instruction for int i 1 i operator Number i Expression iterator next accept this store Instruction return false  ASTVisitor InfixExpression InfixExpression isActive opToken getOperator toString opTokenLength opToken opToken charAt opTokenLength opToken charAt opTokenLength opToken charAt extendedOperands extendedOperands operatorNumber extendedOperands operatorNumber extendedOperands leftTypeId getTypeId getLeftOperand rightTypeId getTypeId getRightOperand resultTypeId getBinaryPromotionType leftTypeId rightTypeId resultTypeId leftTypeId rightTypeId operatorNumber leftTypeId resultTypeId rightTypeId getTypeId resultTypeId getBinaryPromotionType leftTypeId rightTypeId resultTypeId leftTypeId rightTypeId operatorNumber MultiplyOperator fCounter operatorNumber DivideOperator fCounter operatorNumber RemainderOperator fCounter operatorNumber PlusOperator fCounter operatorNumber MinusOperator fCounter operatorNumber LessOperator fCounter operatorNumber LeftShiftOperator getUnaryPromotionType fCounter operatorNumber LessEqualOperator fCounter operatorNumber GreaterOperator fCounter operatorNumber RightShiftOperator getUnaryPromotionType fCounter operatorNumber UnsignedRightShiftOperator getUnaryPromotionType fCounter operatorNumber GreaterEqualOperator fCounter operatorNumber EqualEqualOperator fCounter operatorNumber EqualEqualOperator fCounter operatorNumber XorOperator fCounter operatorNumber OrOperator fCounter operatorNumber NoOp fCounter operatorNumber AndOperator fCounter operatorNumber NoOp fCounter setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Unrecognized_infix_operator____13 opToken hasErrors extendedOperands isOrOr ConditionalJump conditionalJumps ConditionalJump operatorNumber conditionalJumpAddresses operatorNumber getLeftOperand ConditionalJump conditionalJump ConditionalJump isOrOr conditionalJumps conditionalJump conditionalJumpAddresses fCounter conditionalJump storeInstruction getRightOperand operatorNumber conditionalJump ConditionalJump isOrOr conditionalJumps conditionalJump conditionalJumpAddresses fCounter conditionalJump storeInstruction setOffset storeInstruction operatorNumber conditionalJumps setOffset fCounter conditionalJumpAddresses PushBoolean isOrOr storeInstruction storeInstruction getLeftOperand getRightOperand storeInstruction operatorNumber storeInstruction
see AST Visitor visit Initializer public boolean visit Initializer node return true  ASTVisitor
see AST Visitor visit Instanceof Expression public boolean visit Instanceof Expression node if is Active return false push new Instance Of Operator f Counter return true  ASTVisitor InstanceofExpression InstanceofExpression isActive InstanceOfOperator fCounter
see AST Visitor visit Javadoc public boolean visit Javadoc node return false  ASTVisitor
see AST Visitor visit Labeled Statement return code false code don t use the standart accept order public boolean visit Labeled Statement node node get Body accept this return false  ASTVisitor LabeledStatement LabeledStatement getBody
see AST Visitor visit Method Declaration public boolean visit Method Declaration node int start node get Start Position int end start node get Length if start f Start Position end f Start Position return true return false  ASTVisitor MethodDeclaration MethodDeclaration getStartPosition getLength fStartPosition fStartPosition
return false don t visit name visit expression arguments see AST Visitor visit Method Invocation public boolean visit Method Invocation node if is Active return false I Method Binding method Binding I Method Binding node get Name resolve Binding if containsA Local Type method Binding set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Method which contains a local type as parameter cannot be used in an evaluation expression 32 NON NLS 1 if has Errors return true int arg Count method Binding get Parameter Types length String selector method Binding get Name String signature get Method Signature method Binding null replace boolean is Static Flags is Static method Binding get Modifiers Expression expression node get Expression if is Static String type Name get Type Name method Binding get Declaring Class push new Send Static Message type Name selector signature arg Count f Counter if expression null node get Expression accept this push new Pop store Instruction else push new Send Message selector signature arg Count null f Counter if expression null push new Push This get Enclosing Level node method Binding get Declaring Class store Instruction else node get Expression accept this Iterator iterator node arguments iterator while iterator has Next Expression iterator next accept this return false  ASTVisitor MethodInvocation MethodInvocation isActive IMethodBinding methodBinding IMethodBinding getName resolveBinding containsALocalType methodBinding setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Method_which_contains_a_local_type_as_parameter_cannot_be_used_in_an_evaluation_expression_32 hasErrors argCount methodBinding getParameterTypes methodBinding getName getMethodSignature methodBinding isStatic isStatic methodBinding getModifiers getExpression isStatic typeName getTypeName methodBinding getDeclaringClass SendStaticMessage typeName argCount fCounter getExpression storeInstruction SendMessage argCount fCounter PushThis getEnclosingLevel methodBinding getDeclaringClass storeInstruction getExpression hasNext
see AST Visitor visit Null Literal public boolean visit Null Literal node if is Active return false push new Push Null return true  ASTVisitor NullLiteral NullLiteral isActive PushNull
see AST Visitor visit Number Literal public boolean visit Number Literal node if is Active return false int literal Type get Type Id node String token node get Token int token Last Char Offset token length 1 char last Char token char At token Last Char Offset String sub Token token substring 0 token Last Char Offset switch literal Type case Instruction T int push new Push Int parse Int Value token break case Instruction T long push new Push Long parse Long Value sub Token break case Instruction T float push new Push Float Float parse Float sub Token break case Instruction T double if last Char D last Char d push new Push Double Double parse Double sub Token else push new Push Double Double parse Double token break return true  ASTVisitor NumberLiteral NumberLiteral isActive literalType getTypeId getToken tokenLastCharOffset lastChar charAt tokenLastCharOffset subToken tokenLastCharOffset literalType T_int PushInt parseIntValue T_long PushLong parseLongValue subToken T_float PushFloat parseFloat subToken T_double lastChar lastChar PushDouble parseDouble subToken PushDouble parseDouble
Method parse Int Value param token private int parse Int Value String token int token Length token length if token Length 10 Integer decode can handle tokens with less than 18 digits return Integer decode token int Value else switch get Base token case 8 return Integer decode token substring 0 token Length 1 int Value 3 Integer decode 0 token char At token Length 1 int Value NON NLS 1 case 10 return Integer decode token int Value case 16 return Integer decode token substring 0 token Length 1 int Value 4 Integer decode 0x token char At token Length 1 int Value NON NLS 1 default get Base String only returns 8 10 or 16 This code is unreachable return 0  parseIntValue parseIntValue tokenLength tokenLength intValue getBase tokenLength intValue charAt tokenLength intValue intValue tokenLength intValue charAt tokenLength intValue getBase
Method parse Long Value param token private long parse Long Value String token int token Length token length if token Length 18 Long decode can handle tokens with less than 10 digits return Long decode token long Value else switch get Base token case 8 return Long decode token substring 0 token Length 1 long Value 3 Long decode 0 token char At token Length 1 long Value NON NLS 1 case 10 return Long decode token long Value case 16 return Long decode token substring 0 token Length 1 long Value 4 Long decode 0x token char At token Length 1 long Value NON NLS 1 default get Base String only returns 8 10 or 16 This code is unreachable return 0  parseLongValue parseLongValue tokenLength tokenLength longValue getBase tokenLength longValue charAt tokenLength longValue longValue tokenLength longValue charAt tokenLength longValue getBase
Returns the numeric base for the given token according to the Java specification Returns 8 10 or 16 private int get Base String token if token char At 0 0 if token char At 1 x return 16 0x prefix Hexadecimal else return 8 0 prefix Octal else return 10 No prefix Decimal  getBase charAt charAt
see AST Visitor visit Package Declaration public boolean visit Package Declaration node return false  ASTVisitor PackageDeclaration PackageDeclaration
see AST Visitor visit Parenthesized Expression public boolean visit Parenthesized Expression node if is Active return false return true  ASTVisitor ParenthesizedExpression ParenthesizedExpression isActive
see AST Visitor visit Postfix Expression public boolean visit Postfix Expression node if is Active return false int expression Type Id get Type Id node get Operand String op Token node get Operator to String char char0 op Token char At 0 switch char0 case plus plus or unary plus push new Postfix Plus Plus Operator expression Type Id f Counter break case minus minus or unary minus push new Postfix Minus Minus Operator expression Type Id f Counter break default set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler unrecognized postfix operator    15 op Token NON NLS 1 break return true  ASTVisitor PostfixExpression PostfixExpression isActive expressionTypeId getTypeId getOperand opToken getOperator toString opToken charAt PostfixPlusPlusOperator expressionTypeId fCounter PostfixMinusMinusOperator expressionTypeId fCounter setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler unrecognized_postfix_operator____15 opToken
see AST Visitor visit Prefix Expression public boolean visit Prefix Expression node if is Active return false int expression Type Id get Type Id node get Operand String op Token node get Operator to String int op Token Length op Token length char char0 op Token char At 0 char char1 0 if op Token Length 1 char1 op Token char At 1 boolean unrecognized false switch char0 case plus plus or unary plus switch char1 case 0 unary plus push new Unary Plus Operator expression Type Id f Counter break case plus plus push new Prefix Plus Plus Operator expression Type Id f Counter break default unrecognized true break break case minus minus or unary minus switch char1 case 0 unary minus push new Unary Minus Operator expression Type Id f Counter break case minus minus push new Prefix Minus Minus Operator expression Type Id f Counter break default unrecognized true break break case twiddle push new Twiddle Operator expression Type Id f Counter break case not push new Not Operator expression Type Id f Counter break default unrecognized true break if unrecognized set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler unrecognized prefix operator    16 op Token NON NLS 1 return true  ASTVisitor PrefixExpression PrefixExpression isActive expressionTypeId getTypeId getOperand opToken getOperator toString opTokenLength opToken opToken charAt opTokenLength opToken charAt UnaryPlusOperator expressionTypeId fCounter PrefixPlusPlusOperator expressionTypeId fCounter UnaryMinusOperator expressionTypeId fCounter PrefixMinusMinusOperator expressionTypeId fCounter TwiddleOperator expressionTypeId fCounter NotOperator expressionTypeId fCounter setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler unrecognized_prefix_operator____16 opToken
see AST Visitor visit Primitive Type public boolean visit Primitive Type node if is Active return false return true  ASTVisitor PrimitiveType PrimitiveType isActive
see AST Visitor visit Qualified Name public boolean visit Qualified Name node if is Active return false if has Errors return true I Binding binding node resolve Binding switch binding get Kind case I Binding TYPE node get Name accept this break case I Binding VARIABLE Simple Name field Name node get Name I Variable Binding field Binding I Variable Binding field Name resolve Binding I Type Binding declaring Type Binding field Binding get Declaring Class String field Id field Name get Identifier if Modifier is Static field Binding get Modifiers push new Push Static Field Variable field Id get Type Name declaring Type Binding f Counter else if declaring Type Binding null push new Push Array Length f Counter else push new Push Field Variable field Id get Type Signature declaring Type Binding f Counter node get Qualifier accept this store Instruction break return false  ASTVisitor QualifiedName QualifiedName isActive hasErrors IBinding resolveBinding getKind IBinding getName IBinding SimpleName fieldName getName IVariableBinding fieldBinding IVariableBinding fieldName resolveBinding ITypeBinding declaringTypeBinding fieldBinding getDeclaringClass fieldId fieldName getIdentifier isStatic fieldBinding getModifiers PushStaticFieldVariable fieldId getTypeName declaringTypeBinding fCounter declaringTypeBinding PushArrayLength fCounter PushFieldVariable fieldId getTypeSignature declaringTypeBinding fCounter getQualifier storeInstruction
see AST Visitor visit Return Statement public boolean visit Return Statement node if is Active return false push new Return Instruction f Counter return true  ASTVisitor ReturnStatement ReturnStatement isActive ReturnInstruction fCounter
see AST Visitor visit Simple Name public boolean visit Simple Name node if is Active return false if has Errors return true I Binding binding node resolve Binding String variable Id node get Identifier if binding null set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler binding null for  17 variable Id NON NLS 1 return true switch binding get Kind case I Binding TYPE I Type Binding type Binding I Type Binding binding push new Push Type get Type Name type Binding break case I Binding VARIABLE I Variable Binding variable Binding I Variable Binding binding I Type Binding declaring Type Binding variable Binding get Declaring Class if variable Binding is Field if Modifier is Static variable Binding get Modifiers push new Push Static Field Variable variable Id get Type Name declaring Type Binding f Counter else if isA Local Type declaring Type Binding set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler 36 NON NLS 1 return false push new Push Field Variable variable Id get Type Signature declaring Type Binding f Counter push new Push This get Enclosing Level node declaring Type Binding store Instruction else push new Push Local Variable variable Id break return true  ASTVisitor SimpleName SimpleName isActive hasErrors IBinding resolveBinding variableId getIdentifier setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler binding_null_for__17 variableId getKind IBinding ITypeBinding typeBinding ITypeBinding PushType getTypeName typeBinding IBinding IVariableBinding variableBinding IVariableBinding ITypeBinding declaringTypeBinding variableBinding getDeclaringClass variableBinding isField isStatic variableBinding getModifiers PushStaticFieldVariable variableId getTypeName declaringTypeBinding fCounter isALocalType declaringTypeBinding setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler PushFieldVariable variableId getTypeSignature declaringTypeBinding fCounter PushThis getEnclosingLevel declaringTypeBinding storeInstruction PushLocalVariable variableId
return false don t visit child see AST Visitor visit Simple Type public boolean visit Simple Type node if is Active return false I Type Binding type Binding node resolve Binding push new Push Type get Type Name type Binding return false  ASTVisitor SimpleType SimpleType isActive ITypeBinding typeBinding resolveBinding PushType getTypeName typeBinding
see AST Visitor visit Single Variable Declaration return code false code don t use the standart accept order public boolean visit Single Variable Declaration node if is Active return false Expression initializer node get Initializer boolean has Initializer initializer null I Type Binding type Binding node get Type resolve Binding int type Dimension type Binding get Dimensions if type Dimension 0 type Binding type Binding get Element Type push new Local Variable Creation node get Name get Identifier get Type Signature type Binding type Dimension type Binding is Primitive has Initializer f Counter if has Initializer initializer accept this return false  ASTVisitor SingleVariableDeclaration SingleVariableDeclaration isActive getInitializer hasInitializer ITypeBinding typeBinding getType resolveBinding typeDimension typeBinding getDimensions typeDimension typeBinding typeBinding getElementType LocalVariableCreation getName getIdentifier getTypeSignature typeBinding typeDimension typeBinding isPrimitive hasInitializer fCounter hasInitializer
see AST Visitor visit String Literal public boolean visit String Literal node if is Active return false push new Push String node get Literal Value return true  ASTVisitor StringLiteral StringLiteral isActive PushString getLiteralValue
see AST Visitor visit Super Constructor Invocation public boolean visit Super Constructor Invocation node if is Active return false set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler super constructor invocation cannot be used in an evaluation expression 19 NON NLS 1 return false  ASTVisitor SuperConstructorInvocation SuperConstructorInvocation isActive setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler super_constructor_invocation_cannot_be_used_in_an_evaluation_expression_19
see AST Visitor visit Super Field Access public boolean visit Super Field Access node if is Active return false Simple Name field Name node get Name I Variable Binding field Binding I Variable Binding field Name resolve Binding I Type Binding declaring Type Binding field Binding get Declaring Class String field Id field Name get Identifier if Modifier is Static field Binding get Modifiers push new Push Static Field Variable field Id get Type Name declaring Type Binding f Counter else Name qualifier node get Qualifier int super Level 1 int enclosing Level 0 if qualifier null super Level get Super Level qualifier resolve Type Binding declaring Type Binding enclosing Level get Enclosing Level node I Type Binding qualifier resolve Binding push new Push Field Variable field Id super Level f Counter push new Push This enclosing Level store Instruction return false  ASTVisitor SuperFieldAccess SuperFieldAccess isActive SimpleName fieldName getName IVariableBinding fieldBinding IVariableBinding fieldName resolveBinding ITypeBinding declaringTypeBinding fieldBinding getDeclaringClass fieldId fieldName getIdentifier isStatic fieldBinding getModifiers PushStaticFieldVariable fieldId getTypeName declaringTypeBinding fCounter getQualifier superLevel enclosingLevel superLevel getSuperLevel resolveTypeBinding declaringTypeBinding enclosingLevel getEnclosingLevel ITypeBinding resolveBinding PushFieldVariable fieldId superLevel fCounter PushThis enclosingLevel storeInstruction
return false don t visit name visit arguments see AST Visitor visit Super Method Invocation public boolean visit Super Method Invocation node if is Active return false I Method Binding method Binding I Method Binding node get Name resolve Binding if containsA Local Type method Binding set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Method which contains a local type as parameter cannot be used in an evaluation expression 32 NON NLS 1 if has Errors return true I Type Binding parameter Types method Binding get Parameter Types int arg Count parameter Types length String selector method Binding get Name String signature get Method Signature method Binding null Name qualifier node get Qualifier if Modifier is Static method Binding get Modifiers push new Send Static Message get Type Name method Binding get Declaring Class selector signature arg Count f Counter else push new Send Message selector signature arg Count get Type Signature method Binding get Declaring Class f Counter int enclosing Level 0 if qualifier null enclosing Level get Enclosing Level node I Type Binding qualifier resolve Binding push new Push This enclosing Level store Instruction Iterator iterator node arguments iterator while iterator has Next Expression iterator next accept this return false  ASTVisitor SuperMethodInvocation SuperMethodInvocation isActive IMethodBinding methodBinding IMethodBinding getName resolveBinding containsALocalType methodBinding setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Method_which_contains_a_local_type_as_parameter_cannot_be_used_in_an_evaluation_expression_32 hasErrors ITypeBinding parameterTypes methodBinding getParameterTypes argCount parameterTypes methodBinding getName getMethodSignature methodBinding getQualifier isStatic methodBinding getModifiers SendStaticMessage getTypeName methodBinding getDeclaringClass argCount fCounter SendMessage argCount getTypeSignature methodBinding getDeclaringClass fCounter enclosingLevel enclosingLevel getEnclosingLevel ITypeBinding resolveBinding PushThis enclosingLevel storeInstruction hasNext
see AST Visitor visit Switch Case public boolean visit Switch Case node if is Active return false set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Switch case cannot be used in an evaluation expression 20 NON NLS 1 return true  ASTVisitor SwitchCase SwitchCase isActive setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Switch_case_cannot_be_used_in_an_evaluation_expression_20
see AST Visitor visit Switch Statement public boolean visit Switch Statement node if is Active return false set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Switch statement cannot be used in an evaluation expression 21 NON NLS 1 return true  ASTVisitor SwitchStatement SwitchStatement isActive setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Switch_statement_cannot_be_used_in_an_evaluation_expression_21
see AST Visitor visit Synchronized Statement public boolean visit Synchronized Statement node if is Active return false return true  ASTVisitor SynchronizedStatement SynchronizedStatement isActive
see AST Visitor visit This Expression public boolean visit This Expression node if is Active return false Name qualifier node get Qualifier int enclosing Level 0 if qualifier null enclosing Level get Enclosing Level node I Type Binding qualifier resolve Binding push new Push This enclosing Level return false  ASTVisitor ThisExpression ThisExpression isActive getQualifier enclosingLevel enclosingLevel getEnclosingLevel ITypeBinding resolveBinding PushThis enclosingLevel
see AST Visitor visit Throw Statement public boolean visit Throw Statement node if is Active return false push new Throw Instruction f Counter return true  ASTVisitor ThrowStatement ThrowStatement isActive ThrowInstruction fCounter
see AST Visitor visit Try Statement public boolean visit Try Statement node if is Active return false set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Try statement cannot be used in an evaluation expression 23 NON NLS 1 return true  ASTVisitor TryStatement TryStatement isActive setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Try_statement_cannot_be_used_in_an_evaluation_expression_23
see AST Visitor visit Type Declaration public boolean visit Type Declaration node if is Active return true set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Type declaration cannot be used in an evaluation expression 24 NON NLS 1 return true  ASTVisitor TypeDeclaration TypeDeclaration isActive setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Type_declaration_cannot_be_used_in_an_evaluation_expression_24
see AST Visitor visit Type Declaration Statement public boolean visit Type Declaration Statement node if is Active return true set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Type declaration statement cannot be used in an evaluation expression 25 NON NLS 1 return false  ASTVisitor TypeDeclarationStatement TypeDeclarationStatement isActive setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Type_declaration_statement_cannot_be_used_in_an_evaluation_expression_25
see AST Visitor visit Type Literal public boolean visit Type Literal node if is Active return false push new Push Class Literal Value f Counter return true  ASTVisitor TypeLiteral TypeLiteral isActive PushClassLiteralValue fCounter
see AST Visitor visit Variable Declaration Expression return code false code don t use the standart accept order public boolean visit Variable Declaration Expression node if is Active return false for Iterator iter node fragments iterator iter has Next Variable Declaration Fragment iter next accept this return false  ASTVisitor VariableDeclarationExpression VariableDeclarationExpression isActive hasNext VariableDeclarationFragment
see AST Visitor visit Variable Declaration Fragment return code false code don t use the standart accept order public boolean visit Variable Declaration Fragment node if is Active return false get the type of the variable I Type Binding type Binding AST Node parent node get Parent switch parent get Node Type case AST Node VARIABLE DECLARATION EXPRESSION type Binding Variable Declaration Expression parent get Type resolve Binding break case AST Node VARIABLE DECLARATION STATEMENT type Binding Variable Declaration Statement parent get Type resolve Binding break default set Has Error true add Error Message Evaluation Engine Messages get String AST Instruction Compiler Error in type declaration statement NON NLS 1 return false int type Dimension type Binding get Dimensions if type Dimension 0 type Binding type Binding get Element Type Expression initializer node get Initializer boolean has Initializer initializer null push new Local Variable Creation node get Name get Identifier get Type Signature type Binding type Dimension type Binding is Primitive has Initializer f Counter if has Initializer initializer accept this return false  ASTVisitor VariableDeclarationFragment VariableDeclarationFragment isActive ITypeBinding typeBinding ASTNode getParent getNodeType ASTNode VARIABLE_DECLARATION_EXPRESSION typeBinding VariableDeclarationExpression getType resolveBinding ASTNode VARIABLE_DECLARATION_STATEMENT typeBinding VariableDeclarationStatement getType resolveBinding setHasError addErrorMessage EvaluationEngineMessages getString ASTInstructionCompiler Error_in_type_declaration_statement typeDimension typeBinding getDimensions typeDimension typeBinding typeBinding getElementType getInitializer hasInitializer LocalVariableCreation getName getIdentifier getTypeSignature typeBinding typeDimension typeBinding isPrimitive hasInitializer fCounter hasInitializer
see AST Visitor visit Variable Declaration Statement return code false code don t use the standart accept order public boolean visit Variable Declaration Statement node if is Active return false for Iterator iter node fragments iterator iter has Next Variable Declaration Fragment iter next accept this return false  ASTVisitor VariableDeclarationStatement VariableDeclarationStatement isActive hasNext VariableDeclarationFragment
see AST Visitor visit While Statement public boolean visit While Statement node if is Active return false push new No Op f Counter return true  ASTVisitor WhileStatement WhileStatement isActive NoOp fCounter
private int get Type Id Expression expression I Type Binding type Binding expression resolve Type Binding String type Name type Binding get Name if type Binding is Primitive return get Primitive Type Id type Name else if String equals type Name java lang equals type Binding get Package get Name NON NLS 1 NON NLS 2 return Instruction T String else return Instruction T Object  getTypeId ITypeBinding typeBinding resolveTypeBinding typeName typeBinding getName typeBinding isPrimitive getPrimitiveTypeId typeName typeName typeBinding getPackage getName T_String T_Object
private int get Type Id Type type if type is Primitive Type return get Primitive Type Id Primitive Type type get Primitive Type Code to String else if type is Simple Type Simple Type simple Type Simple Type type if java lang String equals simple Type get Name NON NLS 1 return Instruction T String else return Instruction T Object else if type is Array Type return Instruction T Object else return Instruction T undefined  getTypeId isPrimitiveType getPrimitiveTypeId PrimitiveType getPrimitiveTypeCode toString isSimpleType SimpleType simpleType SimpleType simpleType getName T_String T_Object isArrayType T_Object T_undefined
private String get Method Signature I Method Binding method Binding String enclosing Type Signature I Type Binding parameter Types method Binding get Parameter Types int i int arg Count String parameter Signatures if enclosing Type Signature null i 0 arg Count parameter Types length parameter Signatures new String arg Count else i 1 arg Count parameter Types length 1 parameter Signatures new String arg Count parameter Signatures 0 enclosing Type Signature for i arg Count i parameter Signatures i get Type Signature parameter Types i String signature Signature create Method Signature parameter Signatures get Type Signature method Binding get Return Type return signature  getMethodSignature IMethodBinding methodBinding enclosingTypeSignature ITypeBinding parameterTypes methodBinding getParameterTypes argCount parameterSignatures enclosingTypeSignature argCount parameterTypes parameterSignatures argCount argCount parameterTypes parameterSignatures argCount parameterSignatures enclosingTypeSignature argCount parameterSignatures getTypeSignature parameterTypes createMethodSignature parameterSignatures getTypeSignature methodBinding getReturnType
private int get Primitive Type Id String type Name switch type Name char At 0 case b byte or boolean switch type Name char At 1 case o boolean return Instruction T boolean case y byte return Instruction T byte break case c char return Instruction T char case d double return Instruction T double case f float return Instruction T float case i int return Instruction T int case l long return Instruction T long case n return Instruction T null case s short return Instruction T short case v void return Instruction T void return Instruction T undefined  getPrimitiveTypeId typeName typeName charAt typeName charAt T_boolean T_byte T_char T_double T_float T_int T_long T_null T_short T_void T_undefined

public Binary Based Source Generator String local Types Names String local Variables boolean is In Static Method f Local Variable Type Names local Types Names f Local Variable Names local Variables f Is In Static Method is In Static Method  BinaryBasedSourceGenerator localTypesNames localVariables isInStaticMethod fLocalVariableTypeNames localTypesNames fLocalVariableNames localVariables fIsInStaticMethod isInStaticMethod
Build source for an object value instance context public void build Source JDI Object Value object Object Reference reference object get Underlying Object f Source build Type Declaration reference build Run Method reference reference Type null  buildSource JDIObjectValue ObjectReference getUnderlyingObject fSource buildTypeDeclaration buildRunMethod referenceType
Build source for a class type static context public void build Source JDI Class Type type Type underlying Type type get Underlying Type if underlying Type instanceof Reference Type return Reference Type ref Type Reference Type underlying Type f Source build Type Declaration ref Type build Run Method ref Type null false String package Name get Package Name ref Type name if package Name null f Source insert 0 package package Name n NON NLS 1 NON NLS 2 f Code Snippet Position 10 package Name length f Compilation Unit Name get Simple Name ref Type name  buildSource JDIClassType underlyingType getUnderlyingType underlyingType ReferenceType ReferenceType refType ReferenceType underlyingType fSource buildTypeDeclaration refType buildRunMethod refType packageName getPackageName refType packageName fSource packageName fCodeSnippetPosition packageName fCompilationUnitName getSimpleName refType
protected String get Unique Method Name String method Name Reference Type type List methods type methods By Name method Name while methods is Empty method Name   methods type methods By Name method Name return method Name  getUniqueMethodName methodName ReferenceType methodsByName methodName isEmpty methodName _ methodsByName methodName methodName
private String Buffer build Run Method Reference Type type String Buffer source new String Buffer if is In Static Method source append static NON NLS 1 source append void NON NLS 1 source append get Unique Method Name RUN METHOD NAME type source append for int i 0 length f Local Variable Names length i length i source append get Dot Name f Local Variable Type Names i source append source append f Local Variable Names i if i 1 length source append NON NLS 1 source append throws Throwable NON NLS 1 source append n f Code Snippet Position source length f Run Method Start Offset f Code Snippet Position source append n source append append n f Run Method Length source length return source  StringBuffer buildRunMethod ReferenceType StringBuffer StringBuffer isInStaticMethod getUniqueMethodName RUN_METHOD_NAME fLocalVariableNames getDotName fLocalVariableTypeNames fLocalVariableNames fCodeSnippetPosition fRunMethodStartOffset fCodeSnippetPosition fRunMethodLength
private String Buffer build Type Declaration Object Reference object String Buffer buffer String nested Type Name Reference Type reference Type object reference Type Field this Field null List fields reference Type visible Fields for Iterator iterator fields iterator iterator has Next Field field Field iterator next if field name starts With this NON NLS 1 this Field field break String Buffer source build Type Declaration reference Type buffer nested Type Name this Field null if this Field null String package Name get Package Name reference Type name if package Name null source insert 0 package package Name n NON NLS 1 NON NLS 2 f Code Snippet Position 10 package Name length if is Anonymous Type Name reference Type name f Compilation Unit Name ANONYMOUS CLASS NAME else f Compilation Unit Name get Simple Name reference Type name else Object Reference this Object Object Reference object get Value this Field return build Type Declaration this Object source reference Type name return source  StringBuffer buildTypeDeclaration ObjectReference StringBuffer nestedTypeName ReferenceType referenceType referenceType thisField referenceType visibleFields hasNext startsWith thisField StringBuffer buildTypeDeclaration referenceType nestedTypeName thisField thisField packageName getPackageName referenceType packageName packageName fCodeSnippetPosition packageName isAnonymousTypeName referenceType fCompilationUnitName ANONYMOUS_CLASS_NAME fCompilationUnitName getSimpleName referenceType ObjectReference thisObject ObjectReference getValue thisField buildTypeDeclaration thisObject referenceType
private String Buffer build Type Declaration Reference Type reference Type String Buffer buffer String nested Type Name boolean has Enclosing Instance String Buffer source new String Buffer String type Name reference Type name boolean is Anonymous Type is Anonymous Type Name type Name if is Anonymous Type Class Type class Type Class Type reference Type List interface List class Type interfaces String super Class Name class Type superclass name if has Enclosing Instance source append void NON NLS 1 source append get Unique Method Name EVAL METHOD NAME reference Type source append nnew NON NLS 1 if interface List size 0 source append get Dot Name Interface Type interface List get 0 name else source append get Dot Name super Class Name source append NON NLS 1 else source append public class append ANONYMOUS CLASS NAME append NON NLS 1 NON NLS 2 if interface List size 0 source append implements append get Dot Name Interface Type interface List get 0 name NON NLS 1 else source append implements append get Dot Name super Class Name NON NLS 1 else if reference Type is Final source append final NON NLS 1 if reference Type is Static source append static NON NLS 1 if reference Type instanceof Class Type Class Type class Type Class Type reference Type if class Type is Abstract source append abstract NON NLS 1 source append class NON NLS 1 source append get Simple Name type Name append Class Type super Class class Type superclass if super Class null source append extends append get Dot Name super Class name append NON NLS 1 List interfaces try interfaces class Type interfaces catch Class Not Prepared Exception e return new String Buffer if interfaces size 0 source append implements NON NLS 1 Iterator iterator interfaces iterator Interface Type interface  Interface Type iterator next source append get Dot Name interface  name while iterator has Next source append append get Dot Name Interface Type iterator next name else if reference Type instanceof Interface Type Interface Type interface Type Interface Type reference Type source append interface NON NLS 1 source append get Simple Name type Name append List interfaces try interfaces interface Type superinterfaces catch Class Not Prepared Exception e return new String Buffer if interfaces size 0 source append extends NON NLS 1 Iterator iterator interfaces iterator Interface Type interface  Interface Type iterator next source append get Dot Name interface  name while iterator has Next source append append get Dot Name Interface Type iterator next name source append n NON NLS 1 if buffer null f Code Snippet Position source length source append buffer List fields reference Type fields for Iterator iterator fields iterator iterator has Next Field field Field iterator next if field name starts With this NON NLS 1 source append build Field Declaration field List methods reference Type methods for Iterator iterator methods iterator iterator has Next Method method Method iterator next if method is Constructor method is Static Initializer source append build Method Declaration method List nested Types reference Type nested Types if nested Type Name null for Iterator iterator nested Types iterator iterator has Next Reference Type nested Type Reference Type iterator next if isA Direct Inner Type type Name nested Type name source append build Type Declaration nested Type null null true else for Iterator iterator nested Types iterator iterator has Next Reference Type nested Type Reference Type iterator next if nested Type Name equals nested Type name isA Direct Inner Type type Name nested Type name source append build Type Declaration nested Type null null true if is Anonymous Type has Enclosing Instance source append n NON NLS 1 source append n NON NLS 1 return source  StringBuffer buildTypeDeclaration ReferenceType referenceType StringBuffer nestedTypeName hasEnclosingInstance StringBuffer StringBuffer typeName referenceType isAnonymousType isAnonymousTypeName typeName isAnonymousType ClassType classType ClassType referenceType interfaceList classType superClassName classType hasEnclosingInstance getUniqueMethodName EVAL_METHOD_NAME referenceType interfaceList getDotName InterfaceType interfaceList getDotName superClassName ANONYMOUS_CLASS_NAME interfaceList getDotName InterfaceType interfaceList getDotName superClassName referenceType isFinal referenceType isStatic referenceType ClassType ClassType classType ClassType referenceType classType isAbstract getSimpleName typeName ClassType superClass classType superClass getDotName superClass classType ClassNotPreparedException StringBuffer InterfaceType interface_ InterfaceType getDotName interface_ hasNext getDotName InterfaceType referenceType InterfaceType InterfaceType interfaceType InterfaceType referenceType getSimpleName typeName interfaceType ClassNotPreparedException StringBuffer InterfaceType interface_ InterfaceType getDotName interface_ hasNext getDotName InterfaceType fCodeSnippetPosition referenceType hasNext startsWith buildFieldDeclaration referenceType hasNext isConstructor isStaticInitializer buildMethodDeclaration nestedTypes referenceType nestedTypes nestedTypeName nestedTypes hasNext ReferenceType nestedType ReferenceType isADirectInnerType typeName nestedType buildTypeDeclaration nestedType nestedTypes hasNext ReferenceType nestedType ReferenceType nestedTypeName nestedType isADirectInnerType typeName nestedType buildTypeDeclaration nestedType isAnonymousType hasEnclosingInstance
private String Buffer build Field Declaration Field field String Buffer source new String Buffer if field is Final source append final NON NLS 1 if field is Static source append static NON NLS 1 if field is Public source append public NON NLS 1 else if field is Private source append private NON NLS 1 else if field is Protected source append protected NON NLS 1 source append get Dot Name field type Name append append field name append append n return source  StringBuffer buildFieldDeclaration StringBuffer StringBuffer isFinal isStatic isPublic isPrivate isProtected getDotName typeName
private String Buffer build Method Declaration Method method String Buffer source new String Buffer if method is Final source append final NON NLS 1 if method is Static source append static NON NLS 1 if method is Native source append native NON NLS 1 else if method is Abstract source append abstract NON NLS 1 if method is Public source append public NON NLS 1 else if method is Private source append private NON NLS 1 else if method is Protected source append protected NON NLS 1 source append get Dot Name method return Type Name append append method name append List arguments method argument Type Names int i 0 if arguments size 0 Iterator iterator arguments iterator source append get Dot Name String iterator next append arg append i NON NLS 1 while iterator has Next source append append get Dot Name String iterator next append arg append i NON NLS 1 source append if method is Abstract method is Native No body for abstract and native methods source append n NON NLS 1 else source append append n source append get Return Statement method return Type Name source append append n return source  StringBuffer buildMethodDeclaration StringBuffer StringBuffer isFinal isStatic isNative isAbstract isPublic isPrivate isProtected getDotName returnTypeName argumentTypeNames getDotName hasNext getDotName isAbstract isNative getReturnStatement returnTypeName
private String get Return Statement String return Type Name String type Name get Simple Name return Type Name if type Name char At type Name length 1 return return null n NON NLS 1 switch type Name char At 0 case v return NON NLS 1 case b if type Name char At 1 o return return false n NON NLS 1 case s case c case i case l case d case f return return 0 n NON NLS 1 default return return null n NON NLS 1  getReturnStatement returnTypeName typeName getSimpleName returnTypeName typeName charAt typeName typeName charAt typeName charAt
private String get Dot Name String type Name return type Name replace  getDotName typeName typeName
private boolean is Anonymous Type Name String type Name char char0 get Simple Name type Name char At 0 return 0 char0 char0 9  isAnonymousTypeName typeName getSimpleName typeName charAt
private String get Simple Name String qualified Name int pos qualified Name last Index Of if pos 1 pos qualified Name last Index Of return pos 1 qualified Name qualified Name substring pos 1  getSimpleName qualifiedName qualifiedName lastIndexOf qualifiedName lastIndexOf qualifiedName qualifiedName
private String get Package Name String qualified Name int pos qualified Name last Index Of return pos 1 null qualified Name substring 0 pos  getPackageName qualifiedName qualifiedName lastIndexOf qualifiedName
private boolean isA Direct Inner Type String type Name String nested Type Name String end nested Type Name substring type Name length 1 return end index Of 1  isADirectInnerType typeName nestedTypeName nestedTypeName typeName indexOf
private boolean is In Static Method return f Is In Static Method  isInStaticMethod fIsInStaticMethod
public String Buffer get Source return f Source  StringBuffer getSource fSource
public int get Code Snippet Position return f Code Snippet Position  getCodeSnippetPosition fCodeSnippetPosition
public String get Compilation Unit Name return f Compilation Unit Name  getCompilationUnitName fCompilationUnitName
public int get Snippet Start return f Code Snippet Position 2  getSnippetStart fCodeSnippetPosition
public int get Run Method Start return f Code Snippet Position f Run Method Start Offset  getRunMethodStart fCodeSnippetPosition fRunMethodStartOffset
public int get Run Method Length return f Run Method Length  getRunMethodLength fRunMethodLength

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Evaluation Engine Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME EvaluationEngineMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Rebuild source in presence of external local variables public Evaluation Source Generator String local Variable Types Names String local Variable Names String code Snippet f Local Variable Type Names local Variable Types Names f Local Variable Names local Variable Names f Code Snippet get Complete Snippet code Snippet  EvaluationSourceGenerator localVariableTypesNames localVariableNames codeSnippet fLocalVariableTypeNames localVariableTypesNames fLocalVariableNames localVariableNames fCodeSnippet getCompleteSnippet codeSnippet
public Evaluation Source Generator String code Snippet this new String 0 new String 0 code Snippet  EvaluationSourceGenerator codeSnippet codeSnippet
protected String get Complete Snippet String code Snippet if is Expression code Snippet code Snippet return code Snippet NON NLS 1 return code Snippet  getCompleteSnippet codeSnippet isExpression codeSnippet codeSnippet codeSnippet codeSnippet
Returns whether the given snippet represents an expression This is determined by examining the snippet for non quoted semicolons Returns code true code if the snippet is an expression or code false code if the expresssion contains a statement protected boolean is Expression String code Snippet boolean in String false byte chars code Snippet get Bytes for int i 0 num Chars chars length i num Chars i switch chars i case if in String skip the char after an escape char i break case case in String in String break case if in String return false break return true  isExpression codeSnippet inString codeSnippet getBytes numChars numChars inString inString inString inString
public String get Compilation Unit Name return f Compilation Unit Name  getCompilationUnitName fCompilationUnitName
public int get Snippet Start return f Snippet Start Position  getSnippetStart fSnippetStartPosition
return f Snippet Start Position public int get Run Method Start return f Run Method Start Position  fSnippetStartPosition getRunMethodStart fRunMethodStartPosition
return f Run Method Start Position public int get Run Method Length return f Run Method Length  fRunMethodStartPosition getRunMethodLength fRunMethodLength
return f Run Method Length protected void set Snippet Start int position f Snippet Start Position position  fRunMethodLength setSnippetStart fSnippetStartPosition
f Snippet Start Position position protected void set Run Method Start int position f Run Method Start Position position  fSnippetStartPosition setRunMethodStart fRunMethodStartPosition
f Run Method Start Position position protected void set Run Method Length int length f Run Method Length length  fRunMethodStartPosition setRunMethodLength fRunMethodLength
public String get Snippet return f Code Snippet  getSnippet fCodeSnippet
private void create Evaluation Source From Source String source int position boolean is Line Number boolean create InA Static Method throws Debug Exception AST Parser parser AST Parser new Parser AST JLS2 parser set Source source to Char Array Compilation Unit unit Compilation Unit parser createAST null Source Based Source Generator visitor new Source Based Source Generator unit position is Line Number create InA Static Method f Local Variable Type Names f Local Variable Names f Code Snippet unit accept visitor if visitor has Error throw new Debug Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK visitor get Error null String source Res visitor get Source if source Res null return set Source source Res set Compilation Unit Name visitor get Compilation Unit Name set Snippet Start visitor get Snippet Start set Run Method Start visitor get Run Method Start set Run Method Length visitor get Run Method Length  createEvaluationSourceFromSource isLineNumber createInAStaticMethod DebugException ASTParser ASTParser newParser setSource toCharArray CompilationUnit CompilationUnit SourceBasedSourceGenerator SourceBasedSourceGenerator isLineNumber createInAStaticMethod fLocalVariableTypeNames fLocalVariableNames fCodeSnippet hasError DebugException IStatus JDIDebugPlugin getUniqueIdentifier IStatus getError sourceRes getSource sourceRes setSource sourceRes setCompilationUnitName getCompilationUnitName setSnippetStart getSnippetStart setRunMethodStart getRunMethodStart setRunMethodLength getRunMethodLength
private void create Evaluation Source FromJDI Object Binary Based Source Generator object To Evaluation Source Mapper set Compilation Unit Name object To Evaluation Source Mapper get Compilation Unit Name set Snippet Start object To Evaluation Source Mapper get Snippet Start set Run Method Start object To Evaluation Source Mapper get Run Method Start set Run Method Length f Code Snippet length object To Evaluation Source Mapper get Run Method Length set Source object To Evaluation Source Mapper get Source insert object To Evaluation Source Mapper get Code Snippet Position f Code Snippet to String  createEvaluationSourceFromJDIObject BinaryBasedSourceGenerator objectToEvaluationSourceMapper setCompilationUnitName objectToEvaluationSourceMapper getCompilationUnitName setSnippetStart objectToEvaluationSourceMapper getSnippetStart setRunMethodStart objectToEvaluationSourceMapper getRunMethodStart setRunMethodLength fCodeSnippet objectToEvaluationSourceMapper getRunMethodLength setSource objectToEvaluationSourceMapper getSource objectToEvaluationSourceMapper getCodeSnippetPosition fCodeSnippet toString
private Binary Based Source Generator get Instance Source Mapper JDI Object Value object Value boolean is In Static Method Binary Based Source Generator object To Evaluation Source Mapper new Binary Based Source Generator f Local Variable Type Names f Local Variable Names is In Static Method object To Evaluation Source Mapper build Source object Value return object To Evaluation Source Mapper  BinaryBasedSourceGenerator getInstanceSourceMapper JDIObjectValue objectValue isInStaticMethod BinaryBasedSourceGenerator objectToEvaluationSourceMapper BinaryBasedSourceGenerator fLocalVariableTypeNames fLocalVariableNames isInStaticMethod objectToEvaluationSourceMapper buildSource objectValue objectToEvaluationSourceMapper
private Binary Based Source Generator get Static Source Mapper JDI Class Type class Type boolean is In Static Method Binary Based Source Generator object To Evaluation Source Mapper new Binary Based Source Generator f Local Variable Type Names f Local Variable Names is In Static Method object To Evaluation Source Mapper build Source class Type return object To Evaluation Source Mapper  BinaryBasedSourceGenerator getStaticSourceMapper JDIClassType classType isInStaticMethod BinaryBasedSourceGenerator objectToEvaluationSourceMapper BinaryBasedSourceGenerator fLocalVariableTypeNames fLocalVariableNames isInStaticMethod objectToEvaluationSourceMapper buildSource classType objectToEvaluationSourceMapper
public String get Source I Java Stack Frame frame throws Debug Exception if f Source null try String base Source get Source From Frame frame int line Number frame get Line Number if base Source null line Number 1 create Evaluation Source From Source base Source frame get Line Number true frame is Static if f Source null JDI Object Value object JDI Object Value frame get This Binary Based Source Generator mapper if object null Class instance context mapper get Instance Source Mapper object JDI Stack Frame frame get Underlying Method is Static else Static context mapper get Static Source Mapper JDI Class Type frame get Declaring Type JDI Stack Frame frame get Underlying Method is Static create Evaluation Source FromJDI Object mapper catch Java Model Exception e throw new Debug Exception e get Status return f Source  getSource IJavaStackFrame DebugException fSource baseSource getSourceFromFrame lineNumber getLineNumber baseSource lineNumber createEvaluationSourceFromSource baseSource getLineNumber isStatic fSource JDIObjectValue JDIObjectValue getThis BinaryBasedSourceGenerator getInstanceSourceMapper JDIStackFrame getUnderlyingMethod isStatic getStaticSourceMapper JDIClassType getDeclaringType JDIStackFrame getUnderlyingMethod isStatic createEvaluationSourceFromJDIObject JavaModelException DebugException getStatus fSource
public String get Source I Java Object this Object I Java Project java Project throws Debug Exception if f Source null String base Source get Type Source From Project this Object get Java Type get Name java Project int line Number get Line Number JDI Object Value this Object if base Source null line Number 1 create Evaluation Source From Source base Source line Number true false if f Source null Binary Based Source Generator mapper get Instance Source Mapper JDI Object Value this Object false create Evaluation Source FromJDI Object mapper return f Source  getSource IJavaObject thisObject IJavaProject javaProject DebugException fSource baseSource getTypeSourceFromProject thisObject getJavaType getName javaProject lineNumber getLineNumber JDIObjectValue thisObject baseSource lineNumber createEvaluationSourceFromSource baseSource lineNumber fSource BinaryBasedSourceGenerator getInstanceSourceMapper JDIObjectValue thisObject createEvaluationSourceFromJDIObject fSource
private int get Line Number JDI Object Value object Value Reference Type reference Type object Value get Underlying Object reference Type String reference Type Name reference Type name Location location Hashtable line Numbers new Hashtable try for Iterator iterator reference Type all Line Locations iterator iterator has Next line Numbers put new Integer Location iterator next line Number this for Iterator iterator reference Type all Line Locations iterator iterator has Next location Location iterator next if location declaring Type name equals reference Type Name line Numbers remove new Integer Location iterator next line Number if line Numbers size 0 return Integer line Numbers keys next Element int Value return 1 catch Absent Information Exception e return 1  getLineNumber JDIObjectValue objectValue ReferenceType referenceType objectValue getUnderlyingObject referenceType referenceTypeName referenceType lineNumbers referenceType allLineLocations hasNext lineNumbers lineNumber referenceType allLineLocations hasNext declaringType referenceTypeName lineNumbers lineNumber lineNumbers lineNumbers nextElement intValue AbsentInformationException
protected String get Source From Frame I Java Stack Frame frame throws Java Model Exception I Launch launch frame get Launch if launch null return null I Source Locator locator launch get Source Locator if locator null return null Object source Element locator get Source Element frame if source Element null return null if source Element instanceof I Java Element source Element instanceof I Adaptable source Element I Adaptable source Element get Adapter I Java Element class if source Element instanceof I Type return I Type source Element get Compilation Unit get Source if source Element instanceof I Compilation Unit return I Compilation Unit source Element get Source if source Element instanceof I Class File return I Class File source Element get Source return null  getSourceFromFrame IJavaStackFrame JavaModelException ILaunch getLaunch ISourceLocator getSourceLocator sourceElement getSourceElement sourceElement sourceElement IJavaElement sourceElement IAdaptable sourceElement IAdaptable sourceElement getAdapter IJavaElement sourceElement IType IType sourceElement getCompilationUnit getSource sourceElement ICompilationUnit ICompilationUnit sourceElement getSource sourceElement IClassFile IClassFile sourceElement getSource
protected void set Compilation Unit Name String name f Compilation Unit Name name  setCompilationUnitName fCompilationUnitName
protected void set Source String source f Source source  setSource fSource
private String get Type Source From Project String type Name I Java Project java Project throws Debug Exception String path type Name int pos path index Of if pos 1 path path substring 0 pos pos path path replace I Path SEPARATOR path java NON NLS 1 I Path source Path new Path path String source null try I Java Element result java Project find Element source Path if result null if result instanceof I Class File source I Class File result get Source else if result instanceof I Compilation Unit source I Compilation Unit result get Source catch Java Model Exception e throw new Debug Exception e get Status return source  getTypeSourceFromProject typeName IJavaProject javaProject DebugException typeName indexOf IPath IPath sourcePath IJavaElement javaProject findElement sourcePath IClassFile IClassFile getSource ICompilationUnit ICompilationUnit getSource JavaModelException DebugException getStatus

public Interpreter Instruction Sequence instructions I Runtime Context context f Instructions instructions get Instructions f Context context f Internal Variables new Hash Map  InstructionSequence IRuntimeContext fInstructions getInstructions fContext fInternalVariables HashMap
public void execute throws Core Exception reset while f Instruction Counter f Instructions length f Stopped Instruction instruction f Instructions f Instruction Counter instruction set Interpreter this instruction execute instruction set Interpreter null  CoreException fInstructionCounter fInstructions fStopped fInstructions fInstructionCounter setInterpreter setInterpreter
public void stop f Stopped true  fStopped
private void reset f Stack new Stack f Instruction Counter 0  fStack fInstructionCounter
Jumps to a given address public void jump int offset f Instruction Counter offset  fInstructionCounter
Pushes an object onto the stack public void push Object object f Stack push object  fStack
Peeks at the top object of the stack public Object peek return f Stack peek  fStack
Pops an object off of the stack public Object pop return f Stack pop  fStack
Answers the context for the interpreter public I Runtime Context get Context return f Context  IRuntimeContext getContext fContext
public I Java Value get Result if f Stack null f Stack is Empty if f Last Value null return get Context getVM void Value return f Last Value Object top f Stack peek if top instanceof I Java Variable try return I Java Value I Java Variable top get Value catch Core Exception exception return get Context getVM new Value exception get Status get Message if top instanceof I Java Value return I Java Value top XXX exception return null  IJavaValue getResult fStack fStack isEmpty fLastValue getContext voidValue fLastValue fStack IJavaVariable IJavaValue IJavaVariable getValue CoreException getContext newValue getStatus getMessage IJavaValue IJavaValue
public void set Last Value I Java Value value f Last Value value  setLastValue IJavaValue fLastValue
Create a new variable in the interpreter with the given name and the given type param name the name of the variable to create param type the type of the variable to create return the created variable public I Variable create Internal Variable String name I Java Type referenc Type I Variable var new Interpreter Variable name referenc Type f Context getVM f Internal Variables put name var return var  IVariable createInternalVariable IJavaType referencType IVariable InterpreterVariable referencType fContext fInternalVariables
Return the variable with the given name This method only looks in the list of internal variable i e created by Interpreter create Internal Variable String I Java Type param name the name of the variable to retrieve return the corresponding variable or code null code if there is none public I Variable get Internal Variable String name return I Variable f Internal Variables get name  createInternalVariable IJavaType IVariable getInternalVariable IVariable fInternalVariables

public Interpreter Variable String name I Java Type reference Type I Debug Target debug Target f Name name f Reference Type reference Type f Debug Target debug Target  InterpreterVariable IJavaType referenceType IDebugTarget debugTarget fName fReferenceType referenceType fDebugTarget debugTarget
see org eclipse debug core model I Variable get Value public I Value get Value return f Value  IVariable getValue IValue getValue fValue
see org eclipse debug core model I Variable get Name public String get Name return f Name  IVariable getName getName fName
see org eclipse debug core model I Variable get Reference Type Name public String get Reference Type Name throws Debug Exception return f Reference Type get Name  IVariable getReferenceTypeName getReferenceTypeName DebugException fReferenceType getName
see org eclipse debug core model I Variable has Value Changed public boolean has Value Changed return false  IVariable hasValueChanged hasValueChanged
see org eclipse debug core model I Debug Element get Model Identifier public String get Model Identifier return JDI Debug Model get Plugin Identifier  IDebugElement getModelIdentifier getModelIdentifier JDIDebugModel getPluginIdentifier
see org eclipse debug core model I Debug Element get Debug Target public I Debug Target get Debug Target return f Debug Target  IDebugElement getDebugTarget IDebugTarget getDebugTarget fDebugTarget
see org eclipse debug core model I Debug Element get Launch public I Launch get Launch return f Debug Target get Launch  IDebugElement getLaunch ILaunch getLaunch fDebugTarget getLaunch
see org eclipse debug core model I Value Modification set Value String public void set Value String expression throws Debug Exception throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception NOT SUPPORTED Evaluation Engine Messages get String Interpreter Variable set Value String  not supported for interpreter variable 1 null NON NLS 1  IValueModification setValue setValue DebugException DebugException IStatus JDIDebugModel getPluginIdentifier DebugException NOT_SUPPORTED EvaluationEngineMessages getString InterpreterVariable setValue _not_supported_for_interpreter_variable_1
see org eclipse debug core model I Value Modification set Value I Value public void set Value I Value value f Value value  IValueModification setValue IValue setValue IValue fValue
see org eclipse debug core model I Value Modification supports Value Modification public boolean supports Value Modification return false  IValueModification supportsValueModification supportsValueModification
see org eclipse debug core model I Value Modification verify Value I Value public boolean verify Value I Value value throws Debug Exception throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception NOT SUPPORTED Evaluation Engine Messages get String Interpreter Variable verify Value I Value  not supported for interpreter variable 2 null NON NLS 1  IValueModification verifyValue IValue verifyValue IValue DebugException DebugException IStatus JDIDebugModel getPluginIdentifier DebugException NOT_SUPPORTED EvaluationEngineMessages getString InterpreterVariable verifyValue IValue _not_supported_for_interpreter_variable_2
see org eclipse debug core model I Value Modification verify Value String public boolean verify Value String expression throws Debug Exception throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception NOT SUPPORTED Evaluation Engine Messages get String Interpreter Variable verify Value String  not supported for interpreter variable 3 null NON NLS 1  IValueModification verifyValue verifyValue DebugException DebugException IStatus JDIDebugModel getPluginIdentifier DebugException NOT_SUPPORTED EvaluationEngineMessages getString InterpreterVariable verifyValue _not_supported_for_interpreter_variable_3
see org eclipse core runtime I Adaptable get Adapter Class public Object get Adapter Class adapter return null  IAdaptable getAdapter getAdapter
see org eclipse jdt debug core I Java Variable get Java Type public I Java Type get Java Type return f Reference Type  IJavaVariable getJavaType IJavaType getJavaType fReferenceType
see org eclipse jdt debug core I Java Variable get Signature public String get Signature throws Debug Exception return f Reference Type get Signature  IJavaVariable getSignature getSignature DebugException fReferenceType getSignature
see org eclipse jdt debug core I Java Modifiers is Final public boolean is Final return false  IJavaModifiers isFinal isFinal
see org eclipse jdt debug core I Java Modifiers is Package Private public boolean is Package Private return false  IJavaModifiers isPackagePrivate isPackagePrivate
see org eclipse jdt debug core I Java Modifiers is Private public boolean is Private return false  IJavaModifiers isPrivate isPrivate
see org eclipse jdt debug core I Java Modifiers is Protected public boolean is Protected return false  IJavaModifiers isProtected isProtected
see org eclipse jdt debug core I Java Modifiers is Public public boolean is Public return true  IJavaModifiers isPublic isPublic
see org eclipse jdt debug core I Java Modifiers is Static public boolean is Static return false  IJavaModifiers isStatic isStatic
see org eclipse jdt debug core I Java Modifiers is Synthetic public boolean is Synthetic return true  IJavaModifiers isSynthetic isSynthetic
see org eclipse jdt debug core I Java Variable is Local public boolean is Local return false  IJavaVariable isLocal isLocal

Returns the virtual machine in which to perform the evaluation return virtual machine 
Returns the receiving object context in which to perform the evaluation equivalent to this Returns code null code if the context of an evaluation is in a class rather than an object return this or code null code exception Evaluation Exception if this method fails Reasons include ul li Failure communicating with the VM The exception s status code contains the underlying exception responsible for the failure li ul  EvaluationException
Returns the receiving type context in which to perform the evaluation The type of this or in the case of a static context the class in which the evaluation is being performed return receiving class exception Evaluation Exception if this method fails Reasons include ul li Failure communicating with the VM The exception s status code contains the underlying exception responsible for the failure li ul  EvaluationException
Returns the local variables visible for the evaluation This includes method arguments if any Does not return code null code returns an empty collection if there are no locals return local variables exception Evaluation Exception if this method fails Reasons include ul li Failure communicating with the VM The exception s status code contains the underlying exception responsible for the failure li ul  EvaluationException
Returns the Java project context in which this expression should be compiled return project 
Returns the thread in which message sends may be performed return thread 
Returns whether the context of this evaluation is within a constructor return whether the context of this evaluation is within a constructor exception Evaluation Exception if this method fails Reasons include ul li Failure communicating with the VM The exception s status code contains the underlying exception responsible for the failure li ul  EvaluationException

Object Value Runtime Context constructor param this Object code this code object of this context param java Project the project for this context param thread the thread for this context public Java Object Runtime Context I Java Object this Object I Java Project java Project I Java Thread thread f This Object this Object f Java Project java Project f Thread thread  ObjectValueRuntimeContext thisObject javaProject JavaObjectRuntimeContext IJavaObject thisObject IJavaProject javaProject IJavaThread fThisObject thisObject fJavaProject javaProject fThread
see I Runtime Context getVM public I Java Debug Target getVM return I Java Debug Target f This Object get Debug Target  IRuntimeContext IJavaDebugTarget IJavaDebugTarget fThisObject getDebugTarget
see I Runtime Context get This public I Java Object get This return f This Object  IRuntimeContext getThis IJavaObject getThis fThisObject
see I Runtime Context get Receiving Type public I Java Class Type get Receiving Type throws Core Exception return I Java Class Type get This get Java Type  IRuntimeContext getReceivingType IJavaClassType getReceivingType CoreException IJavaClassType getThis getJavaType
see I Runtime Context get Locals public I Java Variable get Locals return new I Java Variable 0  IRuntimeContext getLocals IJavaVariable getLocals IJavaVariable
see I Runtime Context get Project public I Java Project get Project return f Java Project  IRuntimeContext getProject IJavaProject getProject fJavaProject
see I Runtime Context get Thread public I Java Thread get Thread return f Thread  IRuntimeContext getThread IJavaThread getThread fThread
see I Runtime Context is Constructor public boolean is Constructor return false  IRuntimeContext isConstructor isConstructor

Creates a runtime context for the given java project and stack frame param project Java project context used to compile expressions in param frame stack frame used to define locals and receiving type context return a new runtime context public Runtime Context I Java Project project I Java Stack Frame frame set Project project set Frame frame  RuntimeContext IJavaProject IJavaStackFrame setProject setFrame
see I Runtime Context getVM public I Java Debug Target getVM return I Java Debug Target get Frame get Debug Target  IRuntimeContext IJavaDebugTarget IJavaDebugTarget getFrame getDebugTarget
see I Runtime Context get This public I Java Object get This throws Core Exception return get Frame get This  IRuntimeContext getThis IJavaObject getThis CoreException getFrame getThis
see I Runtime Context get Receiving Type public I Java Class Type get Receiving Type throws Core Exception I Java Object rec get This if rec null return I Java Class Type rec get Java Type return get Frame get Declaring Type  IRuntimeContext getReceivingType IJavaClassType getReceivingType CoreException IJavaObject getThis IJavaClassType getJavaType getFrame getDeclaringType
see I Runtime Context get Locals public I Java Variable get Locals throws Core Exception return get Frame get Local Variables  IRuntimeContext getLocals IJavaVariable getLocals CoreException getFrame getLocalVariables
see I Runtime Context get Project public I Java Project get Project return f Project  IRuntimeContext getProject IJavaProject getProject fProject
Sets the project context used to compile expressions param project the project context used to compile expressions private void set Project I Java Project project f Project project  setProject IJavaProject fProject
Sets the stack frame context used to compile run expressions param frame the stack frame context used to compile run expressions protected I Java Stack Frame get Frame return f Frame  IJavaStackFrame getFrame fFrame
Sets the stack frame context used to compile run expressions param frame the stack frame context used to compile run expressions private void set Frame I Java Stack Frame frame f Frame frame  setFrame IJavaStackFrame fFrame
see I Runtime Context get Thread public I Java Thread get Thread return I Java Thread get Frame get Thread  IRuntimeContext getThread IJavaThread getThread IJavaThread getFrame getThread
see I Runtime Context is Constructor public boolean is Constructor throws Core Exception return get Frame is Constructor  IRuntimeContext isConstructor isConstructor CoreException getFrame isConstructor

if the code create In An Instance Method code flag is set the method created which contains the code snippet is an no static method even if code position code is in a static method public Source Based Source Generator Compilation Unit unit int position boolean is Line Number boolean create InA Static Method String local Types Names String local Variables String code Snippet f Right Type Found false f Unit unit f Position position f Local Variable Type Names local Types Names f Local Variable Names local Variables f Code Snippet code Snippet f Is Line Number is Line Number f Create InA Static Method create InA Static Method  createInAnInstanceMethod SourceBasedSourceGenerator CompilationUnit isLineNumber createInAStaticMethod localTypesNames localVariables codeSnippet fRightTypeFound fUnit fPosition fLocalVariableTypeNames localTypesNames fLocalVariableNames localVariables fCodeSnippet codeSnippet fIsLineNumber isLineNumber fCreateInAStaticMethod createInAStaticMethod
Returns the generated source or code null code if no source can be generated public String get Source if f Source null return null return f Source to String  getSource fSource fSource toString
private Compilation Unit get Compilation Unit return f Unit  CompilationUnit getCompilationUnit fUnit
public String get Compilation Unit Name return f Compilation Unit Name  getCompilationUnitName fCompilationUnitName
public int get Snippet Start return f Snippet Start Position  getSnippetStart fSnippetStartPosition
return f Snippet Start Position public int get Run Method Start return f Snippet Start Position f Run Method Start Offset  fSnippetStartPosition getRunMethodStart fSnippetStartPosition fRunMethodStartOffset
return f Snippet Start Position f Run Method Start Offset public int get Run Method Length return f Run Method Length  fSnippetStartPosition fRunMethodStartOffset getRunMethodLength fRunMethodLength
private int get Position return f Position  getPosition fPosition
private int get Corresponding Line Number int char Offset return get Compilation Unit line Number char Offset  getCorrespondingLineNumber charOffset getCompilationUnit lineNumber charOffset
private boolean right Type Found return f Right Type Found  rightTypeFound fRightTypeFound
private void set Right Type Found boolean value f Right Type Found value  setRightTypeFound fRightTypeFound
public boolean has Error return f Error null  hasError fError
public void set Error String error Desc f Error error Desc  setError errorDesc fError errorDesc
public String get Error return f Error  getError fError
private String Buffer build Run Method List body Declarations String Buffer buffer new String Buffer if f Create InA Static Method buffer append static NON NLS 1 buffer append void NON NLS 1 buffer append get Unique Method Name RUN METHOD NAME body Declarations buffer append for int i 0 length f Local Variable Names length i length i buffer append get Dot Name f Local Variable Type Names i buffer append buffer append f Local Variable Names i if i 1 length buffer append NON NLS 1 buffer append throws Throwable NON NLS 1 buffer append n f Snippet Start Position buffer length 2 f Run Method Start Offset f Snippet Start Position String code Snippet new String f Code Snippet trim buffer append code Snippet buffer append n buffer append append n f Run Method Length buffer length return buffer  StringBuffer buildRunMethod bodyDeclarations StringBuffer StringBuffer fCreateInAStaticMethod getUniqueMethodName RUN_METHOD_NAME bodyDeclarations fLocalVariableNames getDotName fLocalVariableTypeNames fLocalVariableNames fSnippetStartPosition fRunMethodStartOffset fSnippetStartPosition codeSnippet fCodeSnippet codeSnippet fRunMethodLength
private String get Dot Name String type Name return type Name replace  getDotName typeName typeName
private boolean contains Line AST Node node int position get Position if f Is Line Number int start Line Number get Corresponding Line Number node get Start Position int end Line Number get Corresponding Line Number node get Start Position node get Length 1 return start Line Number position position end Line Number else int start Position node get Start Position return start Position position position start Position node get Length  containsLine ASTNode getPosition fIsLineNumber startLineNumber getCorrespondingLineNumber getStartPosition endLineNumber getCorrespondingLineNumber getStartPosition getLength startLineNumber endLineNumber startPosition getStartPosition startPosition startPosition getLength
private String Buffer build Type Body String Buffer buffer List list String Buffer source new String Buffer source append append n if buffer null f Snippet Start Position source length source append buffer to String for Iterator iterator list iterator iterator has Next Body Declaration body Declaration Body Declaration iterator next if body Declaration instanceof Field Declaration source append build Field Declaration Field Declaration body Declaration else if body Declaration instanceof Method Declaration source append build Method Declaration Method Declaration body Declaration else if body Declaration instanceof Type Declaration Type Declaration type Declaration Type Declaration body Declaration if type Declaration get Name get Identifier equals f Last Type Name source append build Type Declaration null Type Declaration body Declaration source append append n return source  StringBuffer buildTypeBody StringBuffer StringBuffer StringBuffer fSnippetStartPosition toString hasNext BodyDeclaration bodyDeclaration BodyDeclaration bodyDeclaration FieldDeclaration buildFieldDeclaration FieldDeclaration bodyDeclaration bodyDeclaration MethodDeclaration buildMethodDeclaration MethodDeclaration bodyDeclaration bodyDeclaration TypeDeclaration TypeDeclaration typeDeclaration TypeDeclaration bodyDeclaration typeDeclaration getName getIdentifier fLastTypeName buildTypeDeclaration TypeDeclaration bodyDeclaration
private String Buffer build Field Declaration Field Declaration field Declaration String Buffer source new String Buffer source append Flags to String field Declaration get Modifiers source append source append get Dot Name get Type Name field Declaration get Type source append boolean first true for Iterator iterator field Declaration fragments iterator iterator has Next Variable Declaration Fragment variable Declaration Fragment Variable Declaration Fragment iterator next if first first false else source append source append variable Declaration Fragment get Name get Identifier for int i 0 dim variable Declaration Fragment get Extra Dimensions i dim i source append append source append append n return source  StringBuffer buildFieldDeclaration FieldDeclaration fieldDeclaration StringBuffer StringBuffer toString fieldDeclaration getModifiers getDotName getTypeName fieldDeclaration getType fieldDeclaration hasNext VariableDeclarationFragment variableDeclarationFragment VariableDeclarationFragment variableDeclarationFragment getName getIdentifier variableDeclarationFragment getExtraDimensions
private String Buffer build Method Declaration Method Declaration method Declaration String Buffer source new String Buffer int modifiers method Declaration get Modifiers source append Flags to String modifiers source append boolean is Constructor method Declaration is Constructor if is Constructor source append get Dot Name get Type Name method Declaration get Return Type source append source append method Declaration get Name get Identifier source append append boolean first true for Iterator iterator method Declaration parameters iterator iterator has Next Single Variable Declaration single Variable Declaration Single Variable Declaration iterator next if first first false else source append source append get Dot Name get Type Name single Variable Declaration get Type source append source append single Variable Declaration get Name get Identifier append Extra Dimensions source single Variable Declaration get Extra Dimensions source append append Extra Dimensions source method Declaration get Extra Dimensions first true for Iterator iterator method Declaration thrown Exceptions iterator iterator has Next Name name Name iterator next if first first false source append throws NON NLS 1 else source append source append get Qualified Identifier name if Flags is Abstract modifiers Flags is Native modifiers No body for abstract and native methods source append n NON NLS 1 else source append append n source append get Return Expression method Declaration get Return Type source append append n return source  StringBuffer buildMethodDeclaration MethodDeclaration methodDeclaration StringBuffer StringBuffer methodDeclaration getModifiers toString isConstructor methodDeclaration isConstructor isConstructor getDotName getTypeName methodDeclaration getReturnType methodDeclaration getName getIdentifier methodDeclaration hasNext SingleVariableDeclaration singleVariableDeclaration SingleVariableDeclaration getDotName getTypeName singleVariableDeclaration getType singleVariableDeclaration getName getIdentifier appendExtraDimensions singleVariableDeclaration getExtraDimensions appendExtraDimensions methodDeclaration getExtraDimensions methodDeclaration thrownExceptions hasNext getQualifiedIdentifier isAbstract isNative getReturnExpression methodDeclaration getReturnType
private void append Extra Dimensions String Buffer source int extra Dimension if extra Dimension 0 source append for int i 0 i extra Dimension i source append NON NLS 1  appendExtraDimensions StringBuffer extraDimension extraDimension extraDimension
private String Buffer build Type Declaration String Buffer buffer Type Declaration type Declaration String Buffer source new String Buffer source append Flags to String type Declaration get Modifiers if type Declaration is Interface source append interface NON NLS 1 else source append class NON NLS 1 source append type Declaration get Name get Identifier Name super Class type Declaration get Superclass if super Class null source append extends NON NLS 1 source append get Qualified Identifier super Class boolean first true for Iterator iterator type Declaration super Interfaces iterator iterator has Next Name name Name iterator next if first first false source append implements NON NLS 1 else source append source append get Qualified Identifier name if buffer null f Snippet Start Position source length source append build Type Body buffer type Declaration body Declarations return source  StringBuffer buildTypeDeclaration StringBuffer TypeDeclaration typeDeclaration StringBuffer StringBuffer toString typeDeclaration getModifiers typeDeclaration isInterface typeDeclaration getName getIdentifier superClass typeDeclaration getSuperclass superClass getQualifiedIdentifier superClass typeDeclaration superInterfaces hasNext getQualifiedIdentifier fSnippetStartPosition buildTypeBody typeDeclaration bodyDeclarations
private String Buffer build Compilation Unit String Buffer buffer Compilation Unit compilation Unit String Buffer source new String Buffer Package Declaration package Declaration compilation Unit get Package if package Declaration null source append package NON NLS 1 source append get Qualified Identifier package Declaration get Name source append n NON NLS 1 for Iterator iterator compilation Unit imports iterator iterator has Next Import Declaration import Declaration Import Declaration iterator next source append import NON NLS 1 source append get Qualified Identifier import Declaration get Name if import Declaration is On Demand source append NON NLS 1 source append n NON NLS 1 f Snippet Start Position source length source append buffer for Iterator iterator compilation Unit types iterator iterator has Next Type Declaration type Declaration Type Declaration iterator next if Flags is Public type Declaration get Modifiers f Compilation Unit Name type Declaration get Name get Identifier if f Last Type Name equals type Declaration get Name get Identifier source append build Type Declaration null type Declaration if f Compilation Unit Name null If no public class was found the compilation unit name doesn t matter f Compilation Unit Name Eval NON NLS 1 return source  StringBuffer buildCompilationUnit StringBuffer CompilationUnit compilationUnit StringBuffer StringBuffer PackageDeclaration packageDeclaration compilationUnit getPackage packageDeclaration getQualifiedIdentifier packageDeclaration getName compilationUnit hasNext ImportDeclaration importDeclaration ImportDeclaration getQualifiedIdentifier importDeclaration getName importDeclaration isOnDemand fSnippetStartPosition compilationUnit hasNext TypeDeclaration typeDeclaration TypeDeclaration isPublic typeDeclaration getModifiers fCompilationUnitName typeDeclaration getName getIdentifier fLastTypeName typeDeclaration getName getIdentifier buildTypeDeclaration typeDeclaration fCompilationUnitName fCompilationUnitName
Returns a method name that will be unique in the generated source The generated name is base Name plus as many   characters as necessary to not duplicate an existing method name private String get Unique Method Name String method Name List body Declarations Iterator iter body Declarations iterator Body Declaration body Declaration Method Declaration method String found Name while iter has Next body Declaration Body Declaration iter next if body Declaration instanceof Method Declaration method Method Declaration body Declaration found Name method get Name get Identifier if found Name starts With method Name method Name found Name   return method Name  baseName _ getUniqueMethodName methodName bodyDeclarations bodyDeclarations BodyDeclaration bodyDeclaration MethodDeclaration foundName hasNext bodyDeclaration BodyDeclaration bodyDeclaration MethodDeclaration MethodDeclaration bodyDeclaration foundName getName getIdentifier foundName startsWith methodName methodName foundName _ methodName
Returns a field name that will be unique in the generated source The generated name is base Name plus as many   characters as necessary to not duplicate an existing method name private String get Unique Field Name String field Name List body Declarations Iterator iter body Declarations iterator Body Declaration body Declaration Field Declaration field Declaration String found Name while iter has Next body Declaration Body Declaration iter next if body Declaration instanceof Field Declaration field Declaration Field Declaration body Declaration for Iterator iterator field Declaration fragments iterator iterator has Next found Name Variable Declaration Fragment iterator next get Name get Identifier if found Name starts With field Name field Name found Name   return field Name  baseName _ getUniqueFieldName fieldName bodyDeclarations bodyDeclarations BodyDeclaration bodyDeclaration FieldDeclaration fieldDeclaration foundName hasNext bodyDeclaration BodyDeclaration bodyDeclaration FieldDeclaration fieldDeclaration FieldDeclaration bodyDeclaration fieldDeclaration hasNext foundName VariableDeclarationFragment getName getIdentifier foundName startsWith fieldName fieldName foundName _ fieldName
private String get Qualified Identifier Name name String type Name NON NLS 1 while name is Qualified Name Qualified Name qualified Name Qualified Name name type Name qualified Name get Name get Identifier type Name NON NLS 1 name qualified Name get Qualifier if name is Simple Name type Name Simple Name name get Identifier type Name else return null return type Name  getQualifiedIdentifier typeName isQualifiedName QualifiedName qualifiedName QualifiedName typeName qualifiedName getName getIdentifier typeName qualifiedName getQualifier isSimpleName typeName SimpleName getIdentifier typeName typeName
public String get Type Name Type type if type is Simple Type Simple Type simple Type Simple Type type return get Qualified Identifier simple Type get Name else if type is Array Type Array Type array Type Array Type type String res get Type Name array Type get Element Type for int i 0 dim array Type get Dimensions i dim i res NON NLS 1 return res else if type is Primitive Type Primitive Type primitive Type Primitive Type type return primitive Type get Primitive Type Code to String return null  getTypeName isSimpleType SimpleType simpleType SimpleType getQualifiedIdentifier simpleType getName isArrayType ArrayType arrayType ArrayType getTypeName arrayType getElementType arrayType getDimensions isPrimitiveType PrimitiveType primitiveType PrimitiveType primitiveType getPrimitiveTypeCode toString
public String get Return Expression Type type if type is Simple Type type is Array Type return return null NON NLS 1 else if type is Primitive Type String type Name Primitive Type type get Primitive Type Code to String char char0 type Name char At 0 if char0 v return NON NLS 1 else char char1 type Name char At 1 if char0 b char1 o return return false NON NLS 1 else return return 0 NON NLS 1 return null  getReturnExpression isSimpleType isArrayType isPrimitiveType typeName PrimitiveType getPrimitiveTypeCode toString typeName charAt typeName charAt
see AST Visitor end Visit Class Instance Creation public void end Visit Class Instance Creation node if has Error return Anonymous Class Declaration anonymous Class Declaration node get Anonymous Class Declaration if anonymous Class Declaration null if right Type Found contains Line node set Right Type Found true f Source build Run Method anonymous Class Declaration body Declarations f Evaluate Next End Type Declaration true if right Type Found if node arguments is Empty set Error Evaluation Engine Messages get String Source Based Source Generator Cannot evaluate an expression in the context of anonymous type with no default constructor  1 NON NLS 1 return List body Declarations anonymous Class Declaration body Declarations String Buffer source build Type Body f Source body Declarations AST Node parent node get Parent while parent instanceof Method Declaration parent instanceof Field Declaration parent parent get Parent f Source new String Buffer if parent instanceof Method Declaration Method Declaration enclosing Method Declaration Method Declaration parent if Flags is Static enclosing Method Declaration get Modifiers f Source append static NON NLS 1 f Source append void NON NLS 1 f Source append get Unique Method Name EVAL METHOD NAME body Declarations f Source append n NON NLS 1 f Source append new NON NLS 1 f Source append get Qualified Identifier node get Name f Source append NON NLS 1 f Snippet Start Position f Source length f Source append source f Source append n NON NLS 1 else if parent instanceof Field Declaration Field Declaration enclosing Field Declaration Field Declaration parent if Flags is Static enclosing Field Declaration get Modifiers f Source append static NON NLS 1 Type type enclosing Field Declaration get Type while type instanceof Array Type type Array Type type get Component Type f Source append get Qualified Identifier Simple Type type get Name f Source append f Source append get Unique Field Name EVAL FIELD NAME body Declarations f Source append new NON NLS 1 f Source append get Qualified Identifier node get Name f Source append NON NLS 1 f Snippet Start Position f Source length f Source append source f Source append n NON NLS 1 f Last Type Name NON NLS 1  ASTVisitor endVisit ClassInstanceCreation endVisit ClassInstanceCreation hasError AnonymousClassDeclaration anonymousClassDeclaration getAnonymousClassDeclaration anonymousClassDeclaration rightTypeFound containsLine setRightTypeFound fSource buildRunMethod anonymousClassDeclaration bodyDeclarations fEvaluateNextEndTypeDeclaration rightTypeFound isEmpty setError EvaluationEngineMessages getString SourceBasedSourceGenerator Cannot_evaluate_an_expression_in_the_context_of_anonymous_type_with_no_default_constructor _1 bodyDeclarations anonymousClassDeclaration bodyDeclarations StringBuffer buildTypeBody fSource bodyDeclarations ASTNode getParent MethodDeclaration FieldDeclaration getParent fSource StringBuffer MethodDeclaration MethodDeclaration enclosingMethodDeclaration MethodDeclaration isStatic enclosingMethodDeclaration getModifiers fSource fSource fSource getUniqueMethodName EVAL_METHOD_NAME bodyDeclarations fSource fSource fSource getQualifiedIdentifier getName fSource fSnippetStartPosition fSource fSource fSource FieldDeclaration FieldDeclaration enclosingFieldDeclaration FieldDeclaration isStatic enclosingFieldDeclaration getModifiers fSource enclosingFieldDeclaration getType ArrayType ArrayType getComponentType fSource getQualifiedIdentifier SimpleType getName fSource fSource getUniqueFieldName EVAL_FIELD_NAME bodyDeclarations fSource fSource getQualifiedIdentifier getName fSource fSnippetStartPosition fSource fSource fSource fLastTypeName
see AST Visitor end Visit Compilation Unit public void end Visit Compilation Unit node if has Error return if right Type Found if the right type hasn t been found f Source null return f Source build Compilation Unit f Source node  ASTVisitor endVisit CompilationUnit endVisit CompilationUnit hasError rightTypeFound fSource fSource buildCompilationUnit fSource
see AST Visitor end Visit Type Declaration public void end Visit Type Declaration node if has Error return if right Type Found contains Line node set Right Type Found true f Source build Run Method node body Declarations f Evaluate Next End Type Declaration true if f Evaluate Next End Type Declaration f Evaluate Next End Type Declaration true return if right Type Found String Buffer source build Type Declaration f Source node if node is Local Type Declaration enclose in a method if nessecary AST Node parent node get Parent while parent instanceof Method Declaration parent parent get Parent Method Declaration enclosing Method Declaration Method Declaration parent f Source new String Buffer if Flags is Static enclosing Method Declaration get Modifiers f Source append static NON NLS 1 f Source append void    eval n NON NLS 1 f Snippet Start Position f Source length f Source append source f Source append n NON NLS 1 f Last Type Name NON NLS 1 else f Source source f Last Type Name node get Name get Identifier  ASTVisitor endVisit TypeDeclaration endVisit TypeDeclaration hasError rightTypeFound containsLine setRightTypeFound fSource buildRunMethod bodyDeclarations fEvaluateNextEndTypeDeclaration fEvaluateNextEndTypeDeclaration fEvaluateNextEndTypeDeclaration rightTypeFound StringBuffer buildTypeDeclaration fSource isLocalTypeDeclaration ASTNode getParent MethodDeclaration getParent MethodDeclaration enclosingMethodDeclaration MethodDeclaration fSource StringBuffer isStatic enclosingMethodDeclaration getModifiers fSource fSource ___eval fSnippetStartPosition fSource fSource fSource fLastTypeName fSource fLastTypeName getName getIdentifier
see AST Visitor visit Anonymous Class Declaration public boolean visit Anonymous Class Declaration node if right Type Found return false return true  ASTVisitor AnonymousClassDeclaration AnonymousClassDeclaration rightTypeFound
see AST Visitor visit Array Access public boolean visit Array Access node if right Type Found return false return true  ASTVisitor ArrayAccess ArrayAccess rightTypeFound
see AST Visitor visit Array Creation public boolean visit Array Creation node if right Type Found return false return true  ASTVisitor ArrayCreation ArrayCreation rightTypeFound
see AST Visitor visit Array Initializer public boolean visit Array Initializer node if right Type Found return false return true  ASTVisitor ArrayInitializer ArrayInitializer rightTypeFound
see AST Visitor visit Array Type public boolean visit Array Type node if right Type Found return false return true  ASTVisitor ArrayType ArrayType rightTypeFound
see AST Visitor visit Assert Statement public boolean visit Assert Statement node if right Type Found return false return true  ASTVisitor AssertStatement AssertStatement rightTypeFound
see AST Visitor visit Assignment public boolean visit Assignment node if right Type Found return false return true  ASTVisitor rightTypeFound
see AST Visitor visit Block public boolean visit Block node if right Type Found return false return true  ASTVisitor rightTypeFound
see AST Visitor visit Boolean Literal public boolean visit Boolean Literal node if right Type Found return false return true  ASTVisitor BooleanLiteral BooleanLiteral rightTypeFound
see AST Visitor visit Break Statement public boolean visit Break Statement node if right Type Found return false return true  ASTVisitor BreakStatement BreakStatement rightTypeFound
see AST Visitor visit Cast Expression public boolean visit Cast Expression node if right Type Found return false return true  ASTVisitor CastExpression CastExpression rightTypeFound
see AST Visitor visit Catch Clause public boolean visit Catch Clause node if right Type Found return false return true  ASTVisitor CatchClause CatchClause rightTypeFound
see AST Visitor visit Character Literal public boolean visit Character Literal node if right Type Found return false return true  ASTVisitor CharacterLiteral CharacterLiteral rightTypeFound
see AST Visitor visit Class Instance Creation public boolean visit Class Instance Creation node if right Type Found return false return true  ASTVisitor ClassInstanceCreation ClassInstanceCreation rightTypeFound
see AST Visitor visit Compilation Unit public boolean visit Compilation Unit node if right Type Found return false return true  ASTVisitor CompilationUnit CompilationUnit rightTypeFound
see AST Visitor visit Conditional Expression public boolean visit Conditional Expression node if right Type Found return false return true  ASTVisitor ConditionalExpression ConditionalExpression rightTypeFound
see AST Visitor visit Constructor Invocation public boolean visit Constructor Invocation node if right Type Found return false return true  ASTVisitor ConstructorInvocation ConstructorInvocation rightTypeFound
see AST Visitor visit Continue Statement public boolean visit Continue Statement node if right Type Found return false return true  ASTVisitor ContinueStatement ContinueStatement rightTypeFound
see AST Visitor visit Do Statement public boolean visit Do Statement node if right Type Found return false return true  ASTVisitor DoStatement DoStatement rightTypeFound
see AST Visitor visit Empty Statement public boolean visit Empty Statement node if right Type Found return false return true  ASTVisitor EmptyStatement EmptyStatement rightTypeFound
see AST Visitor visit Expression Statement public boolean visit Expression Statement node if right Type Found return false return true  ASTVisitor ExpressionStatement ExpressionStatement rightTypeFound
see AST Visitor visit Field Access public boolean visit Field Access node if right Type Found return false return true  ASTVisitor FieldAccess FieldAccess rightTypeFound
see AST Visitor visit Field Declaration public boolean visit Field Declaration node if right Type Found return false return true  ASTVisitor FieldDeclaration FieldDeclaration rightTypeFound
see AST Visitor visit For Statement public boolean visit For Statement node if right Type Found return false return true  ASTVisitor ForStatement ForStatement rightTypeFound
see AST Visitor visit If Statement public boolean visit If Statement node if right Type Found return false return true  ASTVisitor IfStatement IfStatement rightTypeFound
see AST Visitor visit Import Declaration public boolean visit Import Declaration node if right Type Found return false return true  ASTVisitor ImportDeclaration ImportDeclaration rightTypeFound
see AST Visitor visit Infix Expression public boolean visit Infix Expression node if right Type Found return false return true  ASTVisitor InfixExpression InfixExpression rightTypeFound
see AST Visitor visit Initializer public boolean visit Initializer node if right Type Found return false return true  ASTVisitor rightTypeFound
see AST Visitor visit Javadoc public boolean visit Javadoc node if right Type Found return false return true  ASTVisitor rightTypeFound
see AST Visitor visit Labeled Statement public boolean visit Labeled Statement node if right Type Found return false return true  ASTVisitor LabeledStatement LabeledStatement rightTypeFound
see AST Visitor visit Method Declaration public boolean visit Method Declaration node if right Type Found return false return true  ASTVisitor MethodDeclaration MethodDeclaration rightTypeFound
see AST Visitor visit Method Invocation public boolean visit Method Invocation node if right Type Found return false return true  ASTVisitor MethodInvocation MethodInvocation rightTypeFound
see AST Visitor visit Null Literal public boolean visit Null Literal node if right Type Found return false return true  ASTVisitor NullLiteral NullLiteral rightTypeFound
see AST Visitor visit Number Literal public boolean visit Number Literal node if right Type Found return false return true  ASTVisitor NumberLiteral NumberLiteral rightTypeFound
see AST Visitor visit Package Declaration public boolean visit Package Declaration node if right Type Found return false return true  ASTVisitor PackageDeclaration PackageDeclaration rightTypeFound
see AST Visitor visit Parenthesized Expression public boolean visit Parenthesized Expression node if right Type Found return false return true  ASTVisitor ParenthesizedExpression ParenthesizedExpression rightTypeFound
see AST Visitor visit Postfix Expression public boolean visit Postfix Expression node if right Type Found return false return true  ASTVisitor PostfixExpression PostfixExpression rightTypeFound
see AST Visitor visit Prefix Expression public boolean visit Prefix Expression node if right Type Found return false return true  ASTVisitor PrefixExpression PrefixExpression rightTypeFound
see AST Visitor visit Primitive Type public boolean visit Primitive Type node if right Type Found return false return true  ASTVisitor PrimitiveType PrimitiveType rightTypeFound
see AST Visitor visit Qualified Name public boolean visit Qualified Name node if right Type Found return false return true  ASTVisitor QualifiedName QualifiedName rightTypeFound
see AST Visitor visit Return Statement public boolean visit Return Statement node if right Type Found return false return true  ASTVisitor ReturnStatement ReturnStatement rightTypeFound
see AST Visitor visit Simple Name public boolean visit Simple Name node if right Type Found return false return true  ASTVisitor SimpleName SimpleName rightTypeFound
see AST Visitor visit Simple Type public boolean visit Simple Type node if right Type Found return false return true  ASTVisitor SimpleType SimpleType rightTypeFound
see AST Visitor visit Single Variable Declaration public boolean visit Single Variable Declaration node if right Type Found return false return true  ASTVisitor SingleVariableDeclaration SingleVariableDeclaration rightTypeFound
see AST Visitor visit String Literal public boolean visit String Literal node if right Type Found return false return true  ASTVisitor StringLiteral StringLiteral rightTypeFound
see AST Visitor visit Super Constructor Invocation public boolean visit Super Constructor Invocation node if right Type Found return false return true  ASTVisitor SuperConstructorInvocation SuperConstructorInvocation rightTypeFound
see AST Visitor visit Super Field Access public boolean visit Super Field Access node if right Type Found return false return true  ASTVisitor SuperFieldAccess SuperFieldAccess rightTypeFound
see AST Visitor visit Super Method Invocation public boolean visit Super Method Invocation node if right Type Found return false return true  ASTVisitor SuperMethodInvocation SuperMethodInvocation rightTypeFound
see AST Visitor visit Switch Case public boolean visit Switch Case node if right Type Found return false return true  ASTVisitor SwitchCase SwitchCase rightTypeFound
see AST Visitor visit Switch Statement public boolean visit Switch Statement node if right Type Found return false return true  ASTVisitor SwitchStatement SwitchStatement rightTypeFound
see AST Visitor visit Synchronized Statement public boolean visit Synchronized Statement node if right Type Found return false return true  ASTVisitor SynchronizedStatement SynchronizedStatement rightTypeFound
see AST Visitor visit This Expression public boolean visit This Expression node if right Type Found return false return true  ASTVisitor ThisExpression ThisExpression rightTypeFound
see AST Visitor visit Throw Statement public boolean visit Throw Statement node if right Type Found return false return true  ASTVisitor ThrowStatement ThrowStatement rightTypeFound
see AST Visitor visit Try Statement public boolean visit Try Statement node if right Type Found return false return true  ASTVisitor TryStatement TryStatement rightTypeFound
see AST Visitor visit Type Declaration public boolean visit Type Declaration node if right Type Found f Evaluate Next End Type Declaration false return false return true  ASTVisitor TypeDeclaration TypeDeclaration rightTypeFound fEvaluateNextEndTypeDeclaration
see AST Visitor visit Type Declaration Statement public boolean visit Type Declaration Statement node if right Type Found return false return true  ASTVisitor TypeDeclarationStatement TypeDeclarationStatement rightTypeFound
see AST Visitor visit Type Literal public boolean visit Type Literal node if right Type Found return false return true  ASTVisitor TypeLiteral TypeLiteral rightTypeFound
see AST Visitor visit Variable Declaration Expression public boolean visit Variable Declaration Expression node if right Type Found return false return true  ASTVisitor VariableDeclarationExpression VariableDeclarationExpression rightTypeFound
see AST Visitor visit Variable Declaration Fragment public boolean visit Variable Declaration Fragment node if right Type Found return false return true  ASTVisitor VariableDeclarationFragment VariableDeclarationFragment rightTypeFound
see AST Visitor visit Variable Declaration Statement public boolean visit Variable Declaration Statement node if right Type Found return false return true  ASTVisitor VariableDeclarationStatement VariableDeclarationStatement rightTypeFound
see AST Visitor visit While Statement public boolean visit While Statement node if right Type Found return false return true  ASTVisitor WhileStatement WhileStatement rightTypeFound

public class And Assignment Operator extends And Operator public And Assignment Operator int variable Type Id int value Type Id int start super variable Type Id variable Type Id value Type Id true start  AndAssignmentOperator AndOperator AndAssignmentOperator variableTypeId valueTypeId variableTypeId variableTypeId valueTypeId
public String to String return Instructions Evaluation Messages get String And Assignment Operator operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString AndAssignmentOperator operator_1

public class And Operator extends Binary Operator public And Operator int result Id int left Type Id int right Type Id int start this result Id left Type Id right Type Id false start  AndOperator BinaryOperator AndOperator resultId leftTypeId rightTypeId resultId leftTypeId rightTypeId
protected And Operator int result Id int left Type Id int right Type Id boolean is Assignment Operateur int start super result Id left Type Id right Type Id is Assignment Operateur start  AndOperator resultId leftTypeId rightTypeId isAssignmentOperateur resultId leftTypeId rightTypeId isAssignmentOperateur
see Binary Operator get Boolean Result I Java Value I Java Value protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Boolean Value I Java Primitive Value right Operand get Boolean Value  BinaryOperator getBooleanResult IJavaValue IJavaValue getBooleanResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getBooleanValue IJavaPrimitiveValue rightOperand getBooleanValue
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Int Result I Java Value I Java Value protected int get Int Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Int Value  BinaryOperator getIntResult IJavaValue IJavaValue getIntResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getIntValue
see Binary Operator get Long Result I Java Value I Java Value protected long get Long Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Long Value  BinaryOperator getLongResult IJavaValue IJavaValue getLongResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getLongValue
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return null  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand
public String to String return Instructions Evaluation Messages get String AndOperator     operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString AndOperator_ ___operator_1

public class Array Access extends Array Instruction public Array Access int start super start  ArrayAccess ArrayInstruction ArrayAccess
public void execute throws Core Exception int index I Java Primitive Value pop Value get Int Value I Java Array array I Java Array pop Value if index array get Length index 0 throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Message Format format Instructions Evaluation Messages get String Array Access illegal index new Object new Integer index null NON NLS 1 push array get Variable index  CoreException IJavaPrimitiveValue popValue getIntValue IJavaArray IJavaArray popValue getLength CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus MessageFormat InstructionsEvaluationMessages getString ArrayAccess illegal_index getVariable
public String to String return Instructions Evaluation Messages get String Array Access array access 1 NON NLS 1  toString InstructionsEvaluationMessages getString ArrayAccess array_access_1

Constructor for Array Allocation param start public Array Allocation int dimension int expr Dimension boolean has Initializer int start super start f Dimension dimension f Expr Dimension expr Dimension f Has Initializer has Initializer  ArrayAllocation ArrayAllocation exprDimension hasInitializer fDimension fExprDimension exprDimension fHasInitializer hasInitializer
public void execute throws Core Exception if f Has Initializer I Java Array array I Java Array pop Value pop pop the type push array else int expr Dimensions new int f Expr Dimension for int i f Expr Dimension 1 i 0 i expr Dimensions i I Java Primitive Value pop Value get Int Value I Java Type type I Java Type pop f Cached Array Types new I Java Array Type f Dimension 1 for int i f Dimension lim f Dimension f Expr Dimension i lim i f Cached Array Types i I Java Array Type type type I Java Array Type type get Component Type I Java Array array create Array f Dimension expr Dimensions push array  CoreException fHasInitializer IJavaArray IJavaArray popValue exprDimensions fExprDimension fExprDimension exprDimensions IJavaPrimitiveValue popValue getIntValue IJavaType IJavaType fCachedArrayTypes IJavaArrayType fDimension fDimension fDimension fExprDimension fCachedArrayTypes IJavaArrayType IJavaArrayType getComponentType IJavaArray createArray fDimension exprDimensions
Create and populate an array private I Java Array create Array int dimension int expr Dimensions throws Core Exception I Java Array array f Cached Array Types dimension new Instance expr Dimensions 0 if expr Dimensions length 1 int new Expr Dimension new int expr Dimensions length 1 for int i 0 i new Expr Dimension length i new Expr Dimension i expr Dimensions i 1 for int i 0 i expr Dimensions 0 i array set Value i create Array dimension 1 new Expr Dimension return array  IJavaArray createArray exprDimensions CoreException IJavaArray fCachedArrayTypes newInstance exprDimensions exprDimensions newExprDimension exprDimensions newExprDimension newExprDimension exprDimensions exprDimensions setValue createArray newExprDimension
public String to String return Instructions Evaluation Messages get String Array Allocation array allocation 1 NON NLS 1  toString InstructionsEvaluationMessages getString ArrayAllocation array_allocation_1

Constructor for Array Initializer Instruction param start public Array Initializer Instruction String type Signature int length int dimensions int start super start f Type Signature type Signature f Dimensions dimensions f Length length  ArrayInitializerInstruction ArrayInitializerInstruction typeSignature fTypeSignature typeSignature fDimensions fLength
public void execute throws Core Exception I Java Array Type array Type get Array Type f Type Signature replace f Dimensions I Java Array array array Type new Instance f Length for int i f Length 1 i 0 i array set Value i pop Value push array  CoreException IJavaArrayType arrayType getArrayType fTypeSignature fDimensions IJavaArray arrayType newInstance fLength fLength setValue popValue
public String to String return Instructions Evaluation Messages get String Array Initializer Instruction array initializer 1 NON NLS 1  toString InstructionsEvaluationMessages getString ArrayInitializerInstruction array_initializer_1

public Array Instruction int start super start  ArrayInstruction

public Assignment Operator int variable Type Id int value Type Id int start super start f Variable Type Id variable Type Id f Value Type Id value Type Id  AssignmentOperator variableTypeId valueTypeId fVariableTypeId variableTypeId fValueTypeId valueTypeId
public void execute throws Core Exception I Java Value value pop Value I Java Variable variable I Java Variable pop if value instanceof I Java Primitive Value I Java Primitive Value primitive Value I Java Primitive Value value switch f Variable Type Id case T boolean variable set Value new Value primitive Value get Boolean Value break case T byte variable set Value new Value primitive Value get Byte Value break case T short variable set Value new Value primitive Value get Short Value break case T char variable set Value new Value primitive Value get Char Value break case T int variable set Value new Value primitive Value get Int Value break case T long variable set Value new Value primitive Value get Long Value break case T float variable set Value new Value primitive Value get Float Value break case T double variable set Value new Value primitive Value get Double Value break else variable set Value value push variable get Value  CoreException IJavaValue popValue IJavaVariable IJavaVariable IJavaPrimitiveValue IJavaPrimitiveValue primitiveValue IJavaPrimitiveValue fVariableTypeId T_boolean setValue newValue primitiveValue getBooleanValue T_byte setValue newValue primitiveValue getByteValue T_short setValue newValue primitiveValue getShortValue T_char setValue newValue primitiveValue getCharValue T_int setValue newValue primitiveValue getIntValue T_long setValue newValue primitiveValue getLongValue T_float setValue newValue primitiveValue getFloatValue T_double setValue newValue primitiveValue getDoubleValue setValue getValue
public String to String return Instructions Evaluation Messages get String Assignment Operator operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString AssignmentOperator operator_1

protected Binary Operator int result Id int left Type Id int right Type Id boolean is Assignement Operator int start super start f Result Type Id result Id f Left Type Id left Type Id f Right Type Id right Type Id f Is Assignment Operator is Assignement Operator  BinaryOperator resultId leftTypeId rightTypeId isAssignementOperator fResultTypeId resultId fLeftTypeId leftTypeId fRightTypeId rightTypeId fIsAssignmentOperator isAssignementOperator
final public void execute throws Core Exception if f Is Assignment Operator execute Assignment else execute Binary  CoreException fIsAssignmentOperator executeAssignment executeBinary
private void execute Assignment throws Core Exception I Java Value value pop Value I Java Variable variable I Java Variable pop I Java Value variable Value I Java Value variable get Value switch f Result Type Id case T byte variable Value get Byte Value Result variable Value value break case T short variable Value get Short Value Result variable Value value break case T char variable Value get Char Value Result variable Value value break case T int variable Value get Int Value Result variable Value value break case T long variable Value get Long Value Result variable Value value break case T float variable Value get Float Value Result variable Value value break case T double variable Value get Double Value Result variable Value value break case T boolean variable Value get Boolean Value Result variable Value value break case T String variable Value get String Value Result variable Value value break variable set Value variable Value push variable Value  executeAssignment CoreException IJavaValue popValue IJavaVariable IJavaVariable IJavaValue variableValue IJavaValue getValue fResultTypeId T_byte variableValue getByteValueResult variableValue T_short variableValue getShortValueResult variableValue T_char variableValue getCharValueResult variableValue T_int variableValue getIntValueResult variableValue T_long variableValue getLongValueResult variableValue T_float variableValue getFloatValueResult variableValue T_double variableValue getDoubleValueResult variableValue T_boolean variableValue getBooleanValueResult variableValue T_String variableValue getStringValueResult variableValue setValue variableValue variableValue
private void execute Binary throws Core Exception I Java Value right pop Value I Java Value left pop Value switch f Result Type Id case T String push New Value get String Result left right break case T double push New Value get Double Result left right break case T float push New Value get Float Result left right break case T long push New Value get Long Result left right break case T int push New Value get Int Result left right break case T boolean push New Value get Boolean Result left right break  executeBinary CoreException IJavaValue popValue IJavaValue popValue fResultTypeId T_String pushNewValue getStringResult T_double pushNewValue getDoubleResult T_float pushNewValue getFloatResult T_long pushNewValue getLongResult T_int pushNewValue getIntResult T_boolean pushNewValue getBooleanResult
private I Java Value get Byte Value Result I Java Value left Operand I Java Value right Operand throws Core Exception switch get Intern Result Type case T double return new Value byte get Double Result left Operand right Operand case T float return new Value byte get Float Result left Operand right Operand case T long return new Value byte get Long Result left Operand right Operand case T int return new Value byte get Int Result left Operand right Operand default return null  IJavaValue getByteValueResult IJavaValue leftOperand IJavaValue rightOperand CoreException getInternResultType T_double newValue getDoubleResult leftOperand rightOperand T_float newValue getFloatResult leftOperand rightOperand T_long newValue getLongResult leftOperand rightOperand T_int newValue getIntResult leftOperand rightOperand
private I Java Value get Short Value Result I Java Value left Operand I Java Value right Operand throws Core Exception switch get Intern Result Type case T double return new Value short get Double Result left Operand right Operand case T float return new Value short get Float Result left Operand right Operand case T long return new Value short get Long Result left Operand right Operand case T int return new Value short get Int Result left Operand right Operand default return null  IJavaValue getShortValueResult IJavaValue leftOperand IJavaValue rightOperand CoreException getInternResultType T_double newValue getDoubleResult leftOperand rightOperand T_float newValue getFloatResult leftOperand rightOperand T_long newValue getLongResult leftOperand rightOperand T_int newValue getIntResult leftOperand rightOperand
private I Java Value get Char Value Result I Java Value left Operand I Java Value right Operand throws Core Exception switch get Intern Result Type case T double return new Value char get Double Result left Operand right Operand case T float return new Value char get Float Result left Operand right Operand case T long return new Value char get Long Result left Operand right Operand case T int return new Value char get Int Result left Operand right Operand default return null  IJavaValue getCharValueResult IJavaValue leftOperand IJavaValue rightOperand CoreException getInternResultType T_double newValue getDoubleResult leftOperand rightOperand T_float newValue getFloatResult leftOperand rightOperand T_long newValue getLongResult leftOperand rightOperand T_int newValue getIntResult leftOperand rightOperand
private I Java Value get Int Value Result I Java Value left Operand I Java Value right Operand throws Core Exception switch get Intern Result Type case T double return new Value int get Double Result left Operand right Operand case T float return new Value int get Float Result left Operand right Operand case T long return new Value int get Long Result left Operand right Operand case T int return new Value get Int Result left Operand right Operand default return null  IJavaValue getIntValueResult IJavaValue leftOperand IJavaValue rightOperand CoreException getInternResultType T_double newValue getDoubleResult leftOperand rightOperand T_float newValue getFloatResult leftOperand rightOperand T_long newValue getLongResult leftOperand rightOperand T_int newValue getIntResult leftOperand rightOperand
private I Java Value get Long Value Result I Java Value left Operand I Java Value right Operand throws Core Exception switch get Intern Result Type case T double return new Value long get Double Result left Operand right Operand case T float return new Value long get Float Result left Operand right Operand case T long return new Value get Long Result left Operand right Operand case T int return new Value long get Int Result left Operand right Operand default return null  IJavaValue getLongValueResult IJavaValue leftOperand IJavaValue rightOperand CoreException getInternResultType T_double newValue getDoubleResult leftOperand rightOperand T_float newValue getFloatResult leftOperand rightOperand T_long newValue getLongResult leftOperand rightOperand T_int newValue getIntResult leftOperand rightOperand
private I Java Value get Float Value Result I Java Value left Operand I Java Value right Operand throws Core Exception switch get Intern Result Type case T double return new Value float get Double Result left Operand right Operand case T float return new Value get Float Result left Operand right Operand case T long return new Value float get Long Result left Operand right Operand case T int return new Value float get Int Result left Operand right Operand default return null  IJavaValue getFloatValueResult IJavaValue leftOperand IJavaValue rightOperand CoreException getInternResultType T_double newValue getDoubleResult leftOperand rightOperand T_float newValue getFloatResult leftOperand rightOperand T_long newValue getLongResult leftOperand rightOperand T_int newValue getIntResult leftOperand rightOperand
private I Java Value get Double Value Result I Java Value left Operand I Java Value right Operand throws Core Exception switch get Intern Result Type case T double return new Value get Double Result left Operand right Operand case T float return new Value double get Float Result left Operand right Operand case T long return new Value double get Long Result left Operand right Operand case T int return new Value double get Int Result left Operand right Operand default return null  IJavaValue getDoubleValueResult IJavaValue leftOperand IJavaValue rightOperand CoreException getInternResultType T_double newValue getDoubleResult leftOperand rightOperand T_float newValue getFloatResult leftOperand rightOperand T_long newValue getLongResult leftOperand rightOperand T_int newValue getIntResult leftOperand rightOperand
private I Java Value get Boolean Value Result I Java Value left Operand I Java Value right Operand return new Value get Boolean Result left Operand right Operand  IJavaValue getBooleanValueResult IJavaValue leftOperand IJavaValue rightOperand newValue getBooleanResult leftOperand rightOperand
private I Java Value get String Value Result I Java Value left Operand I Java Value right Operand return new Value get String Result left Operand right Operand  IJavaValue getStringValueResult IJavaValue leftOperand IJavaValue rightOperand newValue getStringResult leftOperand rightOperand
protected abstract int get Int Result I Java Value left Operand I Java Value right Operand throws Core Exception  getIntResult IJavaValue leftOperand IJavaValue rightOperand CoreException
protected abstract int get Int Result I Java Value left Operand I Java Value right Operand throws Core Exception protected abstract long get Long Result I Java Value left Operand I Java Value right Operand throws Core Exception  getIntResult IJavaValue leftOperand IJavaValue rightOperand CoreException getLongResult IJavaValue leftOperand IJavaValue rightOperand CoreException
protected abstract long get Long Result I Java Value left Operand I Java Value right Operand throws Core Exception protected abstract float get Float Result I Java Value left Operand I Java Value right Operand  getLongResult IJavaValue leftOperand IJavaValue rightOperand CoreException getFloatResult IJavaValue leftOperand IJavaValue rightOperand
protected abstract float get Float Result I Java Value left Operand I Java Value right Operand protected abstract double get Double Result I Java Value left Operand I Java Value right Operand  getFloatResult IJavaValue leftOperand IJavaValue rightOperand getDoubleResult IJavaValue leftOperand IJavaValue rightOperand
protected abstract double get Double Result I Java Value left Operand I Java Value right Operand protected abstract boolean get Boolean Result I Java Value left Operand I Java Value right Operand  getDoubleResult IJavaValue leftOperand IJavaValue rightOperand getBooleanResult IJavaValue leftOperand IJavaValue rightOperand
protected abstract boolean get Boolean Result I Java Value left Operand I Java Value right Operand protected abstract String get String Result I Java Value left Operand I Java Value right Operand  getBooleanResult IJavaValue leftOperand IJavaValue rightOperand getStringResult IJavaValue leftOperand IJavaValue rightOperand
protected abstract String get String Result I Java Value left Operand I Java Value right Operand protected int get Intern Result Type return get Binary Promotion Type f Left Type Id f Right Type Id  getStringResult IJavaValue leftOperand IJavaValue rightOperand getInternResultType getBinaryPromotionType fLeftTypeId fRightTypeId

Cast intruction constructor param type Type Id the id of the type to cast into param base Type Name the base type name of the type the type name if the type is not an array type param dimension the dimension of the array type 0 if the type is not an array type public Cast int type Type Id String base Type Name int dimension int start super start f Type Type Id type Type Id f Base Type Name base Type Name f Dimension dimension  typeTypeId baseTypeName typeTypeId baseTypeName fTypeTypeId typeTypeId fBaseTypeName baseTypeName fDimension
public void execute throws Core Exception I Java Value value pop Value if value instanceof I Java Primitive Value I Java Primitive Value primitive Value I Java Primitive Value value switch f Type Type Id case T double push new Value primitive Value get Double Value break case T float push new Value primitive Value get Float Value break case T long push new Value primitive Value get Long Value break case T int push new Value primitive Value get Int Value break case T short push new Value primitive Value get Short Value break case T byte push new Value primitive Value get Byte Value break case T char push new Value primitive Value get Char Value break else if value instanceof JDI Null Value null value can be cast to all non primitive types bug 31637 push value else I Java Object class Object if f Dimension 0 class Object get Class Object get Type f Base Type Name else class Object get Class Object get Array Type Signature create Type Signature f Base Type Name true f Dimension if class Object null throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Message Format format Instructions Evaluation Messages get String Cast No class object new String type Name null NON NLS 1 I Java Primitive Value result Value I Java Primitive Value class Object send Message IS INSTANCE IS INSTANCE SIGNATURE new I Java Value value get Context get Thread false if result Value get Boolean Value throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Message Format format Instructions Evaluation Messages get String Cast ClassCastException  Cannot cast  0  as  1   1 new String value to String type Name null NON NLS 1 push value  CoreException IJavaValue popValue IJavaPrimitiveValue IJavaPrimitiveValue primitiveValue IJavaPrimitiveValue fTypeTypeId T_double newValue primitiveValue getDoubleValue T_float newValue primitiveValue getFloatValue T_long newValue primitiveValue getLongValue T_int newValue primitiveValue getIntValue T_short newValue primitiveValue getShortValue T_byte newValue primitiveValue getByteValue T_char newValue primitiveValue getCharValue JDINullValue IJavaObject classObject fDimension classObject getClassObject getType fBaseTypeName classObject getClassObject getArrayType createTypeSignature fBaseTypeName fDimension classObject CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus MessageFormat InstructionsEvaluationMessages getString No_class_object typeName IJavaPrimitiveValue resultValue IJavaPrimitiveValue classObject sendMessage IS_INSTANCE IS_INSTANCE_SIGNATURE IJavaValue getContext getThread resultValue getBooleanValue CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus MessageFormat InstructionsEvaluationMessages getString ClassCastException__Cannot_cast_ _as_ __1 toString typeName
private String type Name String result f Base Type Name for int i 0 i f Dimension i result NON NLS 1 return result  typeName fBaseTypeName fDimension
see Object to String public String to String return Instructions Evaluation Messages get String Cast cast 3 NON NLS 1  toString toString InstructionsEvaluationMessages getString cast_3

Constructor for Compound Instruction param start protected Compound Instruction int start f Size start  CompoundInstruction CompoundInstruction fSize
public void set End int end f Size end  setEnd fSize
public int get Size return f Size  getSize fSize

private boolean f Jump On True public Conditional Jump boolean jump On True f Jump On True jump On True  fJumpOnTrue ConditionalJump jumpOnTrue fJumpOnTrue jumpOnTrue
public void execute throws Core Exception I Java Primitive Value condition I Java Primitive Value pop Value if f Jump On True condition get Boolean Value jump f Offset  CoreException IJavaPrimitiveValue IJavaPrimitiveValue popValue fJumpOnTrue getBooleanValue fOffset
see Object to String public String to String return Instructions Evaluation Messages get String Conditional Jump conditional jump 1 NON NLS 1  toString toString InstructionsEvaluationMessages getString ConditionalJump conditional_jump_1

public Constructor String signature int arg Count int start super start f Arg Count arg Count f Signature signature  argCount fArgCount argCount fSignature
public void execute throws Core Exception I Java Value args new I Java Value f Arg Count args are in reverse order for int i f Arg Count 1 i 0 i args i pop Value I Java Class Type clazz I Java Class Type pop I Java Value result clazz new Instance f Signature args get Context get Thread push result  CoreException IJavaValue IJavaValue fArgCount fArgCount popValue IJavaClassType IJavaClassType IJavaValue newInstance fSignature getContext getThread
public String to String return Instructions Evaluation Messages get String Constructor constructor  1 f Signature NON NLS 1  toString InstructionsEvaluationMessages getString constructor__1 fSignature

public class Divide Assignment Operator extends Divide Operator public Divide Assignment Operator int variable Type Id int value Type Id int start super variable Type Id variable Type Id value Type Id true start  DivideAssignmentOperator DivideOperator DivideAssignmentOperator variableTypeId valueTypeId variableTypeId variableTypeId valueTypeId
public String to String return Instructions Evaluation Messages get String Divide Assignment Operator operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString DivideAssignmentOperator operator_1

public class Divide Operator extends Binary Operator public Divide Operator int result Id int left Type Id int right Type Id int start this result Id left Type Id right Type Id false start  DivideOperator BinaryOperator DivideOperator resultId leftTypeId rightTypeId resultId leftTypeId rightTypeId
protected Divide Operator int result Id int left Type Id int right Type Id boolean is Assignment Operator int start super result Id left Type Id right Type Id is Assignment Operator start  DivideOperator resultId leftTypeId rightTypeId isAssignmentOperator resultId leftTypeId rightTypeId isAssignmentOperator
see Binary Operator get Boolean Result I Java Value I Java Value protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand return false  BinaryOperator getBooleanResult IJavaValue IJavaValue getBooleanResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Double Value I Java Primitive Value right Operand get Double Value  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getDoubleValue IJavaPrimitiveValue rightOperand getDoubleValue
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Float Value I Java Primitive Value right Operand get Float Value  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getFloatValue IJavaPrimitiveValue rightOperand getFloatValue
protected int get Int Result I Java Value left Operand I Java Value right Operand throws Core Exception int divisor I Java Primitive Value right Operand get Int Value if divisor 0 throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Instructions Evaluation Messages get String Divide Operator Divide by zero 1 null NON NLS 1 return I Java Primitive Value left Operand get Int Value divisor  getIntResult IJavaValue leftOperand IJavaValue rightOperand CoreException IJavaPrimitiveValue rightOperand getIntValue CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus InstructionsEvaluationMessages getString DivideOperator Divide_by_zero_1 IJavaPrimitiveValue leftOperand getIntValue
protected long get Long Result I Java Value left Operand I Java Value right Operand throws Core Exception long divisor I Java Primitive Value right Operand get Long Value if divisor 0 throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Instructions Evaluation Messages get String Divide Operator Divide by zero 2 null NON NLS 1 return I Java Primitive Value left Operand get Long Value divisor  getLongResult IJavaValue leftOperand IJavaValue rightOperand CoreException IJavaPrimitiveValue rightOperand getLongValue CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus InstructionsEvaluationMessages getString DivideOperator Divide_by_zero_2 IJavaPrimitiveValue leftOperand getLongValue
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return null  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand
public String to String return Instructions Evaluation Messages get String Divide Operator      operator 3 NON NLS 1  toString InstructionsEvaluationMessages getString DivideOperator _ ___operator_3

private boolean f Is Equals public Equal Equal Operator int left Type Id int right Type Id boolean is Equals int start super T boolean left Type Id right Type Id false start f Is Equals is Equals  fIsEquals EqualEqualOperator leftTypeId rightTypeId isEquals T_boolean leftTypeId rightTypeId fIsEquals isEquals
protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand boolean equals false switch get Intern Result Type case T double equals I Java Primitive Value left Operand get Double Value I Java Primitive Value right Operand get Double Value break case T float equals I Java Primitive Value left Operand get Float Value I Java Primitive Value right Operand get Float Value break case T long equals I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Long Value break case T int equals I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Int Value break case T boolean equals I Java Primitive Value left Operand get Boolean Value I Java Primitive Value right Operand get Boolean Value break default equals left Operand equals right Operand break return f Is Equals equals equals  getBooleanResult IJavaValue leftOperand IJavaValue rightOperand getInternResultType T_double IJavaPrimitiveValue leftOperand getDoubleValue IJavaPrimitiveValue rightOperand getDoubleValue T_float IJavaPrimitiveValue leftOperand getFloatValue IJavaPrimitiveValue rightOperand getFloatValue T_long IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getLongValue T_int IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getIntValue T_boolean IJavaPrimitiveValue leftOperand getBooleanValue IJavaPrimitiveValue rightOperand getBooleanValue leftOperand rightOperand fIsEquals
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Int Result I Java Value I Java Value protected int get Int Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getIntResult IJavaValue IJavaValue getIntResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Long Result I Java Value I Java Value protected long get Long Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getLongResult IJavaValue IJavaValue getLongResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return null  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand
public String to String return Instructions Evaluation Messages get String Equal Equal Operator operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString EqualEqualOperator operator_1

public class Greater Equal Operator extends Binary Operator public Greater Equal Operator int left Type Id int right Type Id int start super T boolean left Type Id right Type Id false start  GreaterEqualOperator BinaryOperator GreaterEqualOperator leftTypeId rightTypeId T_boolean leftTypeId rightTypeId
protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand switch get Intern Result Type case T double return I Java Primitive Value left Operand get Double Value I Java Primitive Value right Operand get Double Value case T float return I Java Primitive Value left Operand get Float Value I Java Primitive Value right Operand get Float Value case T long return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Long Value case T int return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Int Value default return false  getBooleanResult IJavaValue leftOperand IJavaValue rightOperand getInternResultType T_double IJavaPrimitiveValue leftOperand getDoubleValue IJavaPrimitiveValue rightOperand getDoubleValue T_float IJavaPrimitiveValue leftOperand getFloatValue IJavaPrimitiveValue rightOperand getFloatValue T_long IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getLongValue T_int IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getIntValue
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Int Result I Java Value I Java Value protected int get Int Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getIntResult IJavaValue IJavaValue getIntResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Long Result I Java Value I Java Value protected long get Long Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getLongResult IJavaValue IJavaValue getLongResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return null  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand
public String to String return Instructions Evaluation Messages get String Greater Equal Operator operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString GreaterEqualOperator operator_1

public class Greater Operator extends Binary Operator public Greater Operator int left Type Id int right Type Id int start super T boolean left Type Id right Type Id false start  GreaterOperator BinaryOperator GreaterOperator leftTypeId rightTypeId T_boolean leftTypeId rightTypeId
protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand switch get Intern Result Type case T double return I Java Primitive Value left Operand get Double Value I Java Primitive Value right Operand get Double Value case T float return I Java Primitive Value left Operand get Float Value I Java Primitive Value right Operand get Float Value case T long return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Long Value case T int return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Int Value default return false  getBooleanResult IJavaValue leftOperand IJavaValue rightOperand getInternResultType T_double IJavaPrimitiveValue leftOperand getDoubleValue IJavaPrimitiveValue rightOperand getDoubleValue T_float IJavaPrimitiveValue leftOperand getFloatValue IJavaPrimitiveValue rightOperand getFloatValue T_long IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getLongValue T_int IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getIntValue
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Int Result I Java Value I Java Value protected int get Int Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getIntResult IJavaValue IJavaValue getIntResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Long Result I Java Value I Java Value protected long get Long Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getLongResult IJavaValue IJavaValue getLongResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return null  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand
public String to String return Instructions Evaluation Messages get String Greater Operator      operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString GreaterOperator _ ___operator_1

public static final String IS INSTANCE SIGNATURE Ljava lang Object Z NON NLS 1 public Instance Of Operator int start super start  IS_INSTANCE_SIGNATURE InstanceOfOperator
public void execute throws Core Exception I Java Type type I Java Type pop I Java Value value pop Value if value instanceof JDI Null Value push New Value false return I Java Object object I Java Object value I Java Object class Object get Class Object type if class Object null throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Message Format format Instructions Evaluation Messages get String Instance Of Operator No class object new String type get Name null NON NLS 1 else push class Object send Message IS INSTANCE IS INSTANCE SIGNATURE new I Java Value object get Context get Thread false  CoreException IJavaType IJavaType IJavaValue popValue JDINullValue pushNewValue IJavaObject IJavaObject IJavaObject classObject getClassObject classObject CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus MessageFormat InstructionsEvaluationMessages getString InstanceOfOperator No_class_object getName classObject sendMessage IS_INSTANCE IS_INSTANCE_SIGNATURE IJavaValue getContext getThread
public String to String return Instructions Evaluation Messages get String Instance Of Operator  instanceof   operator 3 NON NLS 1  toString InstructionsEvaluationMessages getString InstanceOfOperator _instanceof___operator_3

private Interpreter f Interpreter public abstract int get Size  fInterpreter getSize
public abstract int get Size public void set Interpreter Interpreter interpreter f Interpreter interpreter  getSize setInterpreter fInterpreter
public void set Last Value I Java Value value f Interpreter set Last Value value  setLastValue IJavaValue fInterpreter setLastValue
public void stop f Interpreter stop  fInterpreter
public static int get Binary Promotion Type int left int right return f Type Table left right  getBinaryPromotionType fTypeTable
return f Type Table left right public abstract void execute throws Core Exception  fTypeTable CoreException
public abstract void execute throws Core Exception protected I Runtime Context get Context return f Interpreter get Context  CoreException IRuntimeContext getContext fInterpreter getContext
protected I Java Debug Target getVM return get Context getVM  IJavaDebugTarget getContext
Return the internal variable with the given name see Interpreter get Internal Variable String protected I Variable get Internal Variable String name return f Interpreter get Internal Variable name  getInternalVariable IVariable getInternalVariable fInterpreter getInternalVariable
Create and return a new internal variable with the given name and the given type see Interpreter create Internal Variable String String protected I Variable create Internal Variable String name I Java Type referenc Type return f Interpreter create Internal Variable name referenc Type  createInternalVariable IVariable createInternalVariable IJavaType referencType fInterpreter createInternalVariable referencType
Answers the instance of Class that the given type represents protected I Java Object get Class Object I Java Type type throws Core Exception if type instanceof I Java Reference Type return I Java Reference Type type get Class Object return null  IJavaObject getClassObject IJavaType CoreException IJavaReferenceType IJavaReferenceType getClassObject
protected void jump int offset f Interpreter jump offset  fInterpreter
protected void push Object object f Interpreter push object  fInterpreter
protected Object pop return f Interpreter pop  fInterpreter
protected I Java Value pop Value throws Core Exception Object element f Interpreter pop if element instanceof I Java Variable return I Java Value I Java Variable element get Value return I Java Value element  IJavaValue popValue CoreException fInterpreter IJavaVariable IJavaValue IJavaVariable getValue IJavaValue
protected void push New Value boolean value f Interpreter push new Value value  pushNewValue fInterpreter newValue
protected I Java Value new Value boolean value return getVM new Value value  IJavaValue newValue newValue
protected void push New Value byte value f Interpreter push new Value value  pushNewValue fInterpreter newValue
protected I Java Value new Value byte value return getVM new Value value  IJavaValue newValue newValue
protected void push New Value short value f Interpreter push new Value value  pushNewValue fInterpreter newValue
protected I Java Value new Value short value return getVM new Value value  IJavaValue newValue newValue
protected void push New Value int value f Interpreter push new Value value  pushNewValue fInterpreter newValue
protected I Java Value new Value int value return getVM new Value value  IJavaValue newValue newValue
protected void push New Value long value f Interpreter push new Value value  pushNewValue fInterpreter newValue
protected I Java Value new Value long value return getVM new Value value  IJavaValue newValue newValue
protected void push New Value char value f Interpreter push new Value value  pushNewValue fInterpreter newValue
protected I Java Value new Value char value return getVM new Value value  IJavaValue newValue newValue
protected void push New Value float value f Interpreter push new Value value  pushNewValue fInterpreter newValue
protected I Java Value new Value float value return getVM new Value value  IJavaValue newValue newValue
protected void push New Value double value f Interpreter push new Value value  pushNewValue fInterpreter newValue
protected I Java Value new Value double value return getVM new Value value  IJavaValue newValue newValue
protected void push New Value String value f Interpreter push new Value value  pushNewValue fInterpreter newValue
protected I Java Value new Value String value return getVM new Value value  IJavaValue newValue newValue
protected void push Null Value f Interpreter push null Value  pushNullValue fInterpreter nullValue
protected I Java Value null Value return getVM null Value  IJavaValue nullValue nullValue
public static int get Unary Promotion Type int type Id return f Type Table type Id T int  getUnaryPromotionType typeId fTypeTable typeId T_int
protected I Java Type get Type String qualified Name throws Core Exception Force the class to be loaded and record the class reference for later use if there are multiple classes with the same name I Java Object class Reference class For Name qualified Name I Java Type types getVM get Java Types qualified Name check Types types qualified Name if types length 1 Found only one class return types 0 else Found many classes look for the right one for this scope if class Reference null throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Message Format format Instructions Evaluation Messages get String Instruction No type new String qualified Name null NON NLS 1 for int i 0 length types length i length i I Java Type type types i if class Reference equals get Class Object type return type At this point a very strange thing has happened the VM was able to return multiple types in the classes By Name call but none of them were the class that was returned in the class For Name call throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Message Format format Instructions Evaluation Messages get String Instruction No type new String qualified Name null NON NLS 1  IJavaType getType qualifiedName CoreException IJavaObject classReference classForName qualifiedName IJavaType getJavaTypes qualifiedName checkTypes qualifiedName classReference CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus MessageFormat InstructionsEvaluationMessages getString No_type qualifiedName IJavaType classReference getClassObject classesByName classForName CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus MessageFormat InstructionsEvaluationMessages getString No_type qualifiedName
protected I Java Array Type get Array Type String type Signature int dimension throws Core Exception String qualified Name Runtime Signature to String type Signature String braces NON NLS 1 for int i 0 i dimension i qualified Name NON NLS 1 braces NON NLS 1 String signature braces type Signature Force the class to be loaded and record the class reference for later use if there are multiple classes with the same name I Java Object class Reference class For Name signature if class Reference null throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Message Format format Instructions Evaluation Messages get String Instruction No type new String qualified Name null NON NLS 1 I Java Type types getVM get Java Types qualified Name check Types types qualified Name if types length 1 Found only one class return I Java Array Type types 0 else Found many classes look for the right one for this scope for int i 0 length types length i length i I Java Type type types i if class Reference equals get Class Object type return I Java Array Type type At this point a very strange thing has happened the VM was able to return multiple types in the classes By Name call but none of them were the class that was returned in the class For Name call throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Message Format format Instructions Evaluation Messages get String Instruction No type new String qualified Name null NON NLS 1  IJavaArrayType getArrayType typeSignature CoreException qualifiedName RuntimeSignature toString typeSignature qualifiedName typeSignature IJavaObject classReference classForName classReference CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus MessageFormat InstructionsEvaluationMessages getString No_type qualifiedName IJavaType getJavaTypes qualifiedName checkTypes qualifiedName IJavaArrayType IJavaType classReference getClassObject IJavaArrayType classesByName classForName CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus MessageFormat InstructionsEvaluationMessages getString No_type qualifiedName
protected I Java Object class For Name String qualified Name throws Core Exception I Java Type types getVM get Java Types CLASS check Types types qualified Name if types length 1 throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Message Format format Instructions Evaluation Messages get String Instruction No type new String qualified Name null NON NLS 1 I Java Type receiver types 0 I Java Value args new I Java Value new Value qualified Name try return I Java Object I Java Class Type receiver send Message FOR NAME FOR NAME SIGNATURE args get Context get Thread catch Core Exception e if e get Status get Exception instanceof Invocation Exception Don t throw Class Not Found Exception if Invocation Exception e get Status get Exception exception reference Type name equals java lang Class Not Found Exception NON NLS 1 return null throw e  IJavaObject classForName qualifiedName CoreException IJavaType getJavaTypes checkTypes qualifiedName CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus MessageFormat InstructionsEvaluationMessages getString No_type qualifiedName IJavaType IJavaValue IJavaValue newValue qualifiedName IJavaObject IJavaClassType sendMessage FOR_NAME FOR_NAME_SIGNATURE getContext getThread CoreException getStatus getException InvocationException ClassNotFoundException InvocationException getStatus getException referenceType ClassNotFoundException
protected void check Types I Java Type types String qualified Name throws Core Exception if types null types length 0 throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Message Format format Instructions Evaluation Messages get String Instruction No type new String qualified Name null NON NLS 1  checkTypes IJavaType qualifiedName CoreException CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus MessageFormat InstructionsEvaluationMessages getString No_type qualifiedName

public Instruction Sequence String snippet f Instructions new Array List 10 f Errors new Array List f Snippet snippet  InstructionSequence fInstructions ArrayList fErrors ArrayList fSnippet
Returns the runtime exception that occurred while evaluating this expression or code null code if no exception occurred public Core Exception get Exception return f Exception  CoreException getException fException
see I Compiled Expression get Snippet public String get Snippet return f Snippet  ICompiledExpression getSnippet getSnippet fSnippet
Adds the given error to the list of errors that occurred while compiling this instruction sequence public void add Error String error f Errors add error  addError fErrors
see I Compiled Expression has Errors public boolean has Errors return f Errors is Empty  ICompiledExpression hasErrors hasErrors fErrors isEmpty
see I Compiled Expression get Errors deprecated public Message get Errors Message messages new Message f Errors size int i 0 for Iterator iter f Errors iterator iter has Next messages i new Message String iter next 1 return messages  ICompiledExpression getErrors getErrors fErrors fErrors hasNext
see org eclipse jdt debug eval I Compiled Expression get Error Messages public String get Error Messages return String f Errors to Array new String f Errors size  ICompiledExpression getErrorMessages getErrorMessages fErrors toArray fErrors
Answers the array of instructions or an empty array public Instruction get Instructions int size f Instructions size Instruction instructions new Instruction size if size 0 f Instructions to Array instructions return instructions  getInstructions fInstructions fInstructions toArray
Answer the instruction at the given address public Instruction get Instruction int address return Instruction f Instructions get address  getInstruction fInstructions
Add the given instruction to the end of the list public void add Instruction instruction f Instructions add instruction  fInstructions
public int index Of Instruction instruction return f Instructions index Of instruction  indexOf fInstructions indexOf
Answers true if there are no instructions in this sequence public boolean is Empty return f Instructions is Empty  isEmpty fInstructions isEmpty
Inserts the instruction at the given index If the index is less than 0 or greater than the current instruction count the instruction is added at the end of the sequence Instructs the instructions to update their program counters public void insert Instruction instruction int index f Instructions add index instruction  fInstructions
public Instruction get int address return Instruction f Instructions get address  fInstructions
public int get End return f Instructions size 1  getEnd fInstructions

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Instructions Evaluation Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME InstructionsEvaluationMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

protected int f Offset public void set Offset int offset f Offset offset  fOffset setOffset fOffset
see Instruction execute public void execute throws Core Exception jump f Offset  CoreException fOffset
see Object to String public String to String return Instructions Evaluation Messages get String Jump jump 1 NON NLS 1  toString toString InstructionsEvaluationMessages getString jump_1

public class Left Shift Assignment Operator extends Left Shift Operator public Left Shift Assignment Operator int variable Type Id int value Type Id int start super variable Type Id variable Type Id value Type Id true start  LeftShiftAssignmentOperator LeftShiftOperator LeftShiftAssignmentOperator variableTypeId valueTypeId variableTypeId variableTypeId valueTypeId
public String to String return Instructions Evaluation Messages get String Left Shift Assignment Operator operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString LeftShiftAssignmentOperator operator_1

public class Left Shift Operator extends Binary Operator public Left Shift Operator int result Id int left Type Id int right Type Id int start this result Id left Type Id right Type Id false start  LeftShiftOperator BinaryOperator LeftShiftOperator resultId leftTypeId rightTypeId resultId leftTypeId rightTypeId
protected Left Shift Operator int result Id int left Type Id int right Type Id boolean is Assignment Operator int start super result Id left Type Id right Type Id is Assignment Operator start  LeftShiftOperator resultId leftTypeId rightTypeId isAssignmentOperator resultId leftTypeId rightTypeId isAssignmentOperator
see Binary Operator get Boolean Result I Java Value I Java Value protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand return false  BinaryOperator getBooleanResult IJavaValue IJavaValue getBooleanResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand
protected int get Int Result I Java Value left Operand I Java Value right Operand unary type promotion on both operands see 5 6 1 and 15 18 switch f Right Type Id case T long return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Long Value case T int case T short case T byte case T char return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Int Value default return 0  getIntResult IJavaValue leftOperand IJavaValue rightOperand fRightTypeId T_long IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getLongValue T_int T_short T_byte T_char IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getIntValue
protected long get Long Result I Java Value left Operand I Java Value right Operand unary type promotion on both operands see 5 6 1 and 15 18 switch f Right Type Id case T long return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Long Value case T int case T short case T byte case T char return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Int Value default return 0  getLongResult IJavaValue leftOperand IJavaValue rightOperand fRightTypeId T_long IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getLongValue T_int T_short T_byte T_char IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getIntValue
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return null  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand
protected int get Intern Result Type unary type promotion on both operands see 5 6 1 and 15 18 return get Unary Promotion Type f Left Type Id  getInternResultType getUnaryPromotionType fLeftTypeId
public String to String return Instructions Evaluation Messages get String Left Shift Operator      operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString LeftShiftOperator _ ___operator_1

public class Less Equal Operator extends Binary Operator public Less Equal Operator int left Type Id int right Type Id int start super T boolean left Type Id right Type Id false start  LessEqualOperator BinaryOperator LessEqualOperator leftTypeId rightTypeId T_boolean leftTypeId rightTypeId
protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand switch get Intern Result Type case T double return I Java Primitive Value left Operand get Double Value I Java Primitive Value right Operand get Double Value case T float return I Java Primitive Value left Operand get Float Value I Java Primitive Value right Operand get Float Value case T long return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Long Value case T int return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Int Value default return false  getBooleanResult IJavaValue leftOperand IJavaValue rightOperand getInternResultType T_double IJavaPrimitiveValue leftOperand getDoubleValue IJavaPrimitiveValue rightOperand getDoubleValue T_float IJavaPrimitiveValue leftOperand getFloatValue IJavaPrimitiveValue rightOperand getFloatValue T_long IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getLongValue T_int IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getIntValue
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Int Result I Java Value I Java Value protected int get Int Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getIntResult IJavaValue IJavaValue getIntResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Long Result I Java Value I Java Value protected long get Long Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getLongResult IJavaValue IJavaValue getLongResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return null  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand
return null public String to String return Instructions Evaluation Messages get String Less Equal Operator operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString LessEqualOperator operator_1

public class Less Operator extends Binary Operator public Less Operator int left Type Id int right Type Id int start super T boolean left Type Id right Type Id false start  LessOperator BinaryOperator LessOperator leftTypeId rightTypeId T_boolean leftTypeId rightTypeId
protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand switch get Intern Result Type case T double return I Java Primitive Value left Operand get Double Value I Java Primitive Value right Operand get Double Value case T float return I Java Primitive Value left Operand get Float Value I Java Primitive Value right Operand get Float Value case T long return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Long Value case T int return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Int Value default return false  getBooleanResult IJavaValue leftOperand IJavaValue rightOperand getInternResultType T_double IJavaPrimitiveValue leftOperand getDoubleValue IJavaPrimitiveValue rightOperand getDoubleValue T_float IJavaPrimitiveValue leftOperand getFloatValue IJavaPrimitiveValue rightOperand getFloatValue T_long IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getLongValue T_int IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getIntValue
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Int Result I Java Value I Java Value protected int get Int Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getIntResult IJavaValue IJavaValue getIntResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Long Result I Java Value I Java Value protected long get Long Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getLongResult IJavaValue IJavaValue getLongResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return null  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand
public String to String return Instructions Evaluation Messages get String Less Operator      operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString LessOperator _ ___operator_1

Constructor for Local Variable Creation param name the name of the variable to create param type Signature the signature of the type or of the element type in case of an array type param dimension the dimension of the array type code 0 code if it s not an array type param is Primitive Type indicate if the type is a primitive type param has Initializer indicate if there is an initializer for this variable param start public Local Variable Creation String name String type Signature int dimension boolean is Primitive Type boolean has Initializer int start super start f Name name f Type Signature type Signature replace f Is Primitive Type is Primitive Type f Has Initializer has Initializer f Dimension dimension  LocalVariableCreation typeSignature isPrimitiveType hasInitializer LocalVariableCreation typeSignature isPrimitiveType hasInitializer fName fTypeSignature typeSignature fIsPrimitiveType isPrimitiveType fHasInitializer hasInitializer fDimension
see org eclipse jdt internal debug eval ast instructions Instruction execute public void execute throws Core Exception I Java Type type if f Is Primitive Type JDI Debug Target debug Target JDI Debug Target getVM Virtual Machine vm debug Target getVM if vm null debug Target request Failed Instructions Evaluation Messages get String Local Variable Creation Execution failed   VM disconnected  1 null NON NLS 1 type JDI Type create Type debug Target Primitive Type Impl create Virtual Machine Impl vm f Type Signature else if f Dimension 0 type get Type Runtime Signature to String f Type Signature See Bug 22165 else type get Array Type f Type Signature f Dimension I Variable var create Internal Variable f Name type if f Has Initializer var set Value pop Value  CoreException IJavaType fIsPrimitiveType JDIDebugTarget debugTarget JDIDebugTarget VirtualMachine debugTarget debugTarget requestFailed InstructionsEvaluationMessages getString LocalVariableCreation Execution_failed_ _VM_disconnected _1 JDIType createType debugTarget PrimitiveTypeImpl VirtualMachineImpl fTypeSignature fDimension getType RuntimeSignature toString fTypeSignature getArrayType fTypeSignature fDimension IVariable createInternalVariable fName fHasInitializer setValue popValue
public String to String return Message Format format Instructions Evaluation Messages get String Local Variable Creation create local variable  0   1   1 new String f Name f Type Signature NON NLS 1  toString MessageFormat InstructionsEvaluationMessages getString LocalVariableCreation create_local_variable_ _ __1 fName fTypeSignature

public class Minus Assignment Operator extends Minus Operator public Minus Assignment Operator int variable Type Id int value Type Id int start super variable Type Id variable Type Id value Type Id true start  MinusAssignmentOperator MinusOperator MinusAssignmentOperator variableTypeId valueTypeId variableTypeId variableTypeId valueTypeId
public String to String return Instructions Evaluation Messages get String Minus Assignment Operator operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString MinusAssignmentOperator operator_1

public class Minus Operator extends Binary Operator public Minus Operator int result Id int left Type Id int right Type Id int start this result Id left Type Id right Type Id false start  MinusOperator BinaryOperator MinusOperator resultId leftTypeId rightTypeId resultId leftTypeId rightTypeId
protected Minus Operator int result Id int left Type Id int right Type Id boolean is Assignment Operator int start super result Id left Type Id right Type Id is Assignment Operator start  MinusOperator resultId leftTypeId rightTypeId isAssignmentOperator resultId leftTypeId rightTypeId isAssignmentOperator
see Binary Operator get Boolean Result I Java Value I Java Value protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand return false  BinaryOperator getBooleanResult IJavaValue IJavaValue getBooleanResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Double Value I Java Primitive Value right Operand get Double Value  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getDoubleValue IJavaPrimitiveValue rightOperand getDoubleValue
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Float Value I Java Primitive Value right Operand get Float Value  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getFloatValue IJavaPrimitiveValue rightOperand getFloatValue
see Binary Operator get Int Result I Java Value I Java Value protected int get Int Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Int Value  BinaryOperator getIntResult IJavaValue IJavaValue getIntResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getIntValue
see Binary Operator get Long Result I Java Value I Java Value protected long get Long Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Long Value  BinaryOperator getLongResult IJavaValue IJavaValue getLongResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getLongValue
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return null  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand
public String to String return Instructions Evaluation Messages get String Minus Operator      operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString MinusOperator _ ___operator_1

public class Multiply Assignment Operator extends Multiply Operator public Multiply Assignment Operator int variable Type Id int value Type Id int start super variable Type Id variable Type Id value Type Id true start  MultiplyAssignmentOperator MultiplyOperator MultiplyAssignmentOperator variableTypeId valueTypeId variableTypeId variableTypeId valueTypeId
public String to String return Instructions Evaluation Messages get String Multiply Assignment Operator operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString MultiplyAssignmentOperator operator_1

public class Multiply Operator extends Binary Operator public Multiply Operator int result Id int left Type Id int right Type Id int start this result Id left Type Id right Type Id false start  MultiplyOperator BinaryOperator MultiplyOperator resultId leftTypeId rightTypeId resultId leftTypeId rightTypeId
protected Multiply Operator int result Id int left Type Id int right Type Id boolean is Assignment Operator int start super result Id left Type Id right Type Id is Assignment Operator start  MultiplyOperator resultId leftTypeId rightTypeId isAssignmentOperator resultId leftTypeId rightTypeId isAssignmentOperator
see Binary Operator get Boolean Result I Java Value I Java Value protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand return false  BinaryOperator getBooleanResult IJavaValue IJavaValue getBooleanResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Double Value I Java Primitive Value right Operand get Double Value  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getDoubleValue IJavaPrimitiveValue rightOperand getDoubleValue
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Float Value I Java Primitive Value right Operand get Float Value  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getFloatValue IJavaPrimitiveValue rightOperand getFloatValue
see Binary Operator get Int Result I Java Value I Java Value protected int get Int Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Int Value  BinaryOperator getIntResult IJavaValue IJavaValue getIntResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getIntValue
see Binary Operator get Long Result I Java Value I Java Value protected long get Long Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Long Value  BinaryOperator getLongResult IJavaValue IJavaValue getLongResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getLongValue
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return null  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand
public String to String return Instructions Evaluation Messages get String Multiply Operator      operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString MultiplyOperator _ ___operator_1

public class No Op extends Compound Instruction public No Op int start super start  NoOp CompoundInstruction NoOp
see Instruction execute public void execute 
see Object to String public String to String return Instructions Evaluation Messages get String No Op no op 1 NON NLS 1  toString toString InstructionsEvaluationMessages getString NoOp no_op_1

public class Not Operator extends Unary Operator public Not Operator int expression Type Id int start super expression Type Id start  NotOperator UnaryOperator NotOperator expressionTypeId expressionTypeId
see Instruction execute public void execute throws Core Exception I Java Primitive Value value I Java Primitive Value pop Value push New Value value get Boolean Value  CoreException IJavaPrimitiveValue IJavaPrimitiveValue popValue pushNewValue getBooleanValue
public String to String return Instructions Evaluation Messages get String Not Operator      operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString NotOperator _ ___operator_1

public class Or Assignment Operator extends Or Operator public Or Assignment Operator int variable Type Id int value Type Id int start super variable Type Id variable Type Id value Type Id true start  OrAssignmentOperator OrOperator OrAssignmentOperator variableTypeId valueTypeId variableTypeId variableTypeId valueTypeId
public String to String return Instructions Evaluation Messages get String Or Assignment Operator operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString OrAssignmentOperator operator_1

public class Or Operator extends Binary Operator public Or Operator int result Id int left Type Id int right Type Id int start this result Id left Type Id right Type Id false start  OrOperator BinaryOperator OrOperator resultId leftTypeId rightTypeId resultId leftTypeId rightTypeId
protected Or Operator int result Id int left Type Id int right Type Id boolean is Assignment Operator int start super result Id left Type Id right Type Id is Assignment Operator start  OrOperator resultId leftTypeId rightTypeId isAssignmentOperator resultId leftTypeId rightTypeId isAssignmentOperator
see Binary Operator get Boolean Result I Java Value I Java Value protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Boolean Value I Java Primitive Value right Operand get Boolean Value  BinaryOperator getBooleanResult IJavaValue IJavaValue getBooleanResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getBooleanValue IJavaPrimitiveValue rightOperand getBooleanValue
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Int Result I Java Value I Java Value protected int get Int Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Int Value  BinaryOperator getIntResult IJavaValue IJavaValue getIntResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getIntValue
see Binary Operator get Long Result I Java Value I Java Value protected long get Long Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Long Value  BinaryOperator getLongResult IJavaValue IJavaValue getLongResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getLongValue
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return null  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand
public String to String return Instructions Evaluation Messages get String Or Operator      operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString OrOperator _ ___operator_1

public class Plus Assignment Operator extends Plus Operator public Plus Assignment Operator int variable Type Id int value Type Id int start super variable Type Id variable Type Id value Type Id true start  PlusAssignmentOperator PlusOperator PlusAssignmentOperator variableTypeId valueTypeId variableTypeId variableTypeId valueTypeId
public String to String return Instructions Evaluation Messages get String Plus Assignment Operator operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString PlusAssignmentOperator operator_1

public static final String NULL null NON NLS 1 public Plus Operator int result Id int left Type Id int right Type Id int start this result Id left Type Id right Type Id false start  PlusOperator resultId leftTypeId rightTypeId resultId leftTypeId rightTypeId
protected Plus Operator int result Id int left Type Id int right Type Id boolean is Assignment Operator int start super result Id left Type Id right Type Id is Assignment Operator start  PlusOperator resultId leftTypeId rightTypeId isAssignmentOperator resultId leftTypeId rightTypeId isAssignmentOperator
private String get String I Java Value value int type Id test if value null if value instanceof JDI Null Value return NULL if value instanceof I Java Object try return value get Value String catch Core Exception e e print Stack Trace return null else I Java Primitive Value primitive Value I Java Primitive Value value switch type Id case T boolean return new Boolean primitive Value get Boolean Value to String case T byte return new Integer primitive Value get Byte Value to String case T char return new Character primitive Value get Char Value to String case T double return new Double primitive Value get Double Value to String case T float return new Float primitive Value get Float Value to String case T int return new Integer primitive Value get Int Value to String case T long return new Long primitive Value get Long Value to String case T short return new Integer primitive Value get Short Value to String return NULL  getString IJavaValue typeId JDINullValue IJavaObject getValueString CoreException printStackTrace IJavaPrimitiveValue primitiveValue IJavaPrimitiveValue typeId T_boolean primitiveValue getBooleanValue toString T_byte primitiveValue getByteValue toString T_char primitiveValue getCharValue toString T_double primitiveValue getDoubleValue toString T_float primitiveValue getFloatValue toString T_int primitiveValue getIntValue toString T_long primitiveValue getLongValue toString T_short primitiveValue getShortValue toString
see Binary Operator get Boolean Result I Java Value I Java Value protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand return false  BinaryOperator getBooleanResult IJavaValue IJavaValue getBooleanResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Double Value I Java Primitive Value right Operand get Double Value  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getDoubleValue IJavaPrimitiveValue rightOperand getDoubleValue
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Float Value I Java Primitive Value right Operand get Float Value  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getFloatValue IJavaPrimitiveValue rightOperand getFloatValue
see Binary Operator get Int Result I Java Value I Java Value protected int get Int Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Int Value  BinaryOperator getIntResult IJavaValue IJavaValue getIntResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getIntValue
see Binary Operator get Long Result I Java Value I Java Value protected long get Long Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Long Value  BinaryOperator getLongResult IJavaValue IJavaValue getLongResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getLongValue
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return get String left Operand f Left Type Id get String right Operand f Right Type Id  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand getString leftOperand fLeftTypeId getString rightOperand fRightTypeId
public String to String return Instructions Evaluation Messages get String Plus Operator      operator 2 NON NLS 1  toString InstructionsEvaluationMessages getString PlusOperator _ ___operator_2

see Instruction execute public void execute pop 
see Object to String public String to String return Instructions Evaluation Messages get String Pop pop 1 NON NLS 1  toString toString InstructionsEvaluationMessages getString pop_1

public class Postfix Minus Minus Operator extends Xfix Operator public Postfix Minus Minus Operator int variable Type Id int start super variable Type Id start  PostfixMinusMinusOperator XfixOperator PostfixMinusMinusOperator variableTypeId variableTypeId
public void execute throws Core Exception I Java Variable variable I Java Variable pop push variable get Value switch f Variable Type Id case T byte variable set Value new Value byte I Java Primitive Value variable get Value get Byte Value 1 break case T short variable set Value new Value short I Java Primitive Value variable get Value get Short Value 1 break case T char variable set Value new Value char I Java Primitive Value variable get Value get Char Value 1 break case T int variable set Value new Value I Java Primitive Value variable get Value get Int Value 1 break case T long variable set Value new Value I Java Primitive Value variable get Value get Long Value 1 break case T float variable set Value new Value I Java Primitive Value variable get Value get Float Value 1 break case T double variable set Value new Value I Java Primitive Value variable get Value get Double Value 1 break  CoreException IJavaVariable IJavaVariable getValue fVariableTypeId T_byte setValue newValue IJavaPrimitiveValue getValue getByteValue T_short setValue newValue IJavaPrimitiveValue getValue getShortValue T_char setValue newValue IJavaPrimitiveValue getValue getCharValue T_int setValue newValue IJavaPrimitiveValue getValue getIntValue T_long setValue newValue IJavaPrimitiveValue getValue getLongValue T_float setValue newValue IJavaPrimitiveValue getValue getFloatValue T_double setValue newValue IJavaPrimitiveValue getValue getDoubleValue
public String to String return Instructions Evaluation Messages get String Postfix Minus Minus Operator postfix       operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString PostfixMinusMinusOperator postfix___ ___operator_1

public class Postfix Plus Plus Operator extends Xfix Operator public Postfix Plus Plus Operator int variable Type Id int start super variable Type Id start  PostfixPlusPlusOperator XfixOperator PostfixPlusPlusOperator variableTypeId variableTypeId
public void execute throws Core Exception I Java Variable variable I Java Variable pop push variable get Value switch f Variable Type Id case T byte variable set Value new Value byte I Java Primitive Value variable get Value get Byte Value 1 break case T short variable set Value new Value short I Java Primitive Value variable get Value get Short Value 1 break case T char variable set Value new Value char I Java Primitive Value variable get Value get Char Value 1 break case T int variable set Value new Value I Java Primitive Value variable get Value get Int Value 1 break case T long variable set Value new Value I Java Primitive Value variable get Value get Long Value 1 break case T float variable set Value new Value I Java Primitive Value variable get Value get Float Value 1 break case T double variable set Value new Value I Java Primitive Value variable get Value get Double Value 1 break  CoreException IJavaVariable IJavaVariable getValue fVariableTypeId T_byte setValue newValue IJavaPrimitiveValue getValue getByteValue T_short setValue newValue IJavaPrimitiveValue getValue getShortValue T_char setValue newValue IJavaPrimitiveValue getValue getCharValue T_int setValue newValue IJavaPrimitiveValue getValue getIntValue T_long setValue newValue IJavaPrimitiveValue getValue getLongValue T_float setValue newValue IJavaPrimitiveValue getValue getFloatValue T_double setValue newValue IJavaPrimitiveValue getValue getDoubleValue
public String to String return Instructions Evaluation Messages get String Postfix Plus Plus Operator postfix       operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString PostfixPlusPlusOperator postfix___ ___operator_1

public class Prefix Minus Minus Operator extends Xfix Operator public Prefix Minus Minus Operator int variable Type Id int start super variable Type Id start  PrefixMinusMinusOperator XfixOperator PrefixMinusMinusOperator variableTypeId variableTypeId
public void execute throws Core Exception I Java Variable variable I Java Variable pop switch f Variable Type Id case T byte variable set Value new Value byte I Java Primitive Value variable get Value get Byte Value 1 break case T short variable set Value new Value short I Java Primitive Value variable get Value get Short Value 1 break case T char variable set Value new Value char I Java Primitive Value variable get Value get Char Value 1 break case T int variable set Value new Value I Java Primitive Value variable get Value get Int Value 1 break case T long variable set Value new Value I Java Primitive Value variable get Value get Long Value 1 break case T float variable set Value new Value I Java Primitive Value variable get Value get Float Value 1 break case T double variable set Value new Value I Java Primitive Value variable get Value get Double Value 1 break push variable get Value  CoreException IJavaVariable IJavaVariable fVariableTypeId T_byte setValue newValue IJavaPrimitiveValue getValue getByteValue T_short setValue newValue IJavaPrimitiveValue getValue getShortValue T_char setValue newValue IJavaPrimitiveValue getValue getCharValue T_int setValue newValue IJavaPrimitiveValue getValue getIntValue T_long setValue newValue IJavaPrimitiveValue getValue getLongValue T_float setValue newValue IJavaPrimitiveValue getValue getFloatValue T_double setValue newValue IJavaPrimitiveValue getValue getDoubleValue getValue
public String to String return Instructions Evaluation Messages get String Prefix Minus Minus Operator prefix       operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString PrefixMinusMinusOperator prefix___ ___operator_1

public class Prefix Plus Plus Operator extends Xfix Operator public Prefix Plus Plus Operator int variable Type Id int start super variable Type Id start  PrefixPlusPlusOperator XfixOperator PrefixPlusPlusOperator variableTypeId variableTypeId
public void execute throws Core Exception I Java Variable variable I Java Variable pop switch f Variable Type Id case T byte variable set Value new Value byte I Java Primitive Value variable get Value get Byte Value 1 break case T short variable set Value new Value short I Java Primitive Value variable get Value get Short Value 1 break case T char variable set Value new Value char I Java Primitive Value variable get Value get Char Value 1 break case T int variable set Value new Value I Java Primitive Value variable get Value get Int Value 1 break case T long variable set Value new Value I Java Primitive Value variable get Value get Long Value 1 break case T float variable set Value new Value I Java Primitive Value variable get Value get Float Value 1 break case T double variable set Value new Value I Java Primitive Value variable get Value get Double Value 1 break push variable get Value  CoreException IJavaVariable IJavaVariable fVariableTypeId T_byte setValue newValue IJavaPrimitiveValue getValue getByteValue T_short setValue newValue IJavaPrimitiveValue getValue getShortValue T_char setValue newValue IJavaPrimitiveValue getValue getCharValue T_int setValue newValue IJavaPrimitiveValue getValue getIntValue T_long setValue newValue IJavaPrimitiveValue getValue getLongValue T_float setValue newValue IJavaPrimitiveValue getValue getFloatValue T_double setValue newValue IJavaPrimitiveValue getValue getDoubleValue getValue
public String to String return Instructions Evaluation Messages get String Prefix Plus Plus Operator prefix       operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString PrefixPlusPlusOperator prefix___ ___operator_1

public class Push Array Length extends Compound Instruction public Push Array Length int start super start  PushArrayLength CompoundInstruction PushArrayLength
public void execute throws Core Exception I Java Array receiver I Java Array pop Value int length receiver get Length push New Value length  CoreException IJavaArray IJavaArray popValue getLength pushNewValue
public String to String return Instructions Evaluation Messages get String Push Array Length push array length  1 NON NLS 1  toString InstructionsEvaluationMessages getString PushArrayLength push_array_length__1

public Push Array Type String type Signature int dimension int start super start f Type Signature type Signature f Dimension dimension  PushArrayType typeSignature fTypeSignature typeSignature fDimension
see Instruction execute public void execute throws Core Exception push get Array Type f Type Signature replace f Dimension  CoreException getArrayType fTypeSignature fDimension

private boolean f Value public Push Boolean boolean value f Value value  fValue PushBoolean fValue
public void execute push New Value f Value  pushNewValue fValue
public String to String return Instructions Evaluation Messages get String Push Boolean push  1 f Value NON NLS 1  toString InstructionsEvaluationMessages getString PushBoolean push__1 fValue

private char f Value public Push Char char value f Value value  fValue PushChar fValue
public void execute push New Value f Value  pushNewValue fValue
public String to String return Instructions Evaluation Messages get String Push Char push  1 f Value NON NLS 1  toString InstructionsEvaluationMessages getString PushChar push__1 fValue

public class Push Class Literal Value extends Compound Instruction public Push Class Literal Value int start super start  PushClassLiteralValue CompoundInstruction PushClassLiteralValue
see Instruction execute public void execute throws Core Exception I Java Type type I Java Type pop push get Class Object type  CoreException IJavaType IJavaType getClassObject
see Object to String public String to String return Instructions Evaluation Messages get String Push Class Literal Value push class literal value 1 NON NLS 1  toString toString InstructionsEvaluationMessages getString PushClassLiteralValue push_class_literal_value_1

private double f Value public Push Double double value f Value value  fValue PushDouble fValue
public void execute push New Value f Value  pushNewValue fValue
public String to String return Instructions Evaluation Messages get String Push Double push  1 f Value NON NLS 1  toString InstructionsEvaluationMessages getString PushDouble push__1 fValue

public Push Field Variable String name int super Class Level int start super start f Name name f Super Class Level super Class Level  PushFieldVariable superClassLevel fName fSuperClassLevel superClassLevel
public Push Field Variable String name String declaring Type Signature int start super start f Name name f Declaring Type Signature declaring Type Signature  PushFieldVariable declaringTypeSignature fName fDeclaringTypeSignature declaringTypeSignature
public void execute throws Core Exception I Java Object receiver I Java Object pop Value I Java Variable field null if f Declaring Type Signature null field JDI Object Value receiver get Field f Name f Super Class Level else field receiver get Field f Name f Declaring Type Signature if field null throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Message Format format Instructions Evaluation Messages get String Push Field Variable Cannot find the field  0  for the object  1  1 new String f Name receiver to String null NON NLS 1 NON NLS 2 else push field  CoreException IJavaObject IJavaObject popValue IJavaVariable fDeclaringTypeSignature JDIObjectValue getField fName fSuperClassLevel getField fName fDeclaringTypeSignature CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus MessageFormat InstructionsEvaluationMessages getString PushFieldVariable Cannot_find_the_field_ _for_the_object_ _1 fName toString
public String to String return Message Format format Instructions Evaluation Messages get String Push Field Variable push field  0  2 new String f Name NON NLS 1  toString MessageFormat InstructionsEvaluationMessages getString PushFieldVariable push_field_ _2 fName

private float f Value public Push Float float value f Value value  fValue PushFloat fValue
public void execute push New Value f Value  pushNewValue fValue
public String to String return Instructions Evaluation Messages get String Push Float push  1 f Value NON NLS 1  toString InstructionsEvaluationMessages getString PushFloat push__1 fValue

private int f Value public Push Int int value f Value value  fValue PushInt fValue
public void execute push New Value f Value  pushNewValue fValue
public String to String return Instructions Evaluation Messages get String Push Int push  1 f Value NON NLS 1  toString InstructionsEvaluationMessages getString PushInt push__1 fValue

private String f Name public Push Local Variable String name f Name name  fName PushLocalVariable fName
public void execute throws Core Exception I Variable internal Variable get Internal Variable f Name if internal Variable null push internal Variable return I Runtime Context context get Context I Java Variable locals context get Locals for int i 0 i locals length i if locals i get Name equals get Name push locals i return throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Message Format format Instructions Evaluation Messages get String Push Local Variable Cannot find the variable    1 new String f Name null NON NLS 1  CoreException IVariable internalVariable getInternalVariable fName internalVariable internalVariable IRuntimeContext getContext IJavaVariable getLocals getName getName CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus MessageFormat InstructionsEvaluationMessages getString PushLocalVariable Cannot_find_the_variable____1 fName
Returns the name of the variable to push onto the stack return the name of the variable to push onto the stack protected String get Name return f Name  getName fName
public String to String return Message Format format Instructions Evaluation Messages get String Push Local Variable push    0   2 new String get Name NON NLS 1  toString MessageFormat InstructionsEvaluationMessages getString PushLocalVariable push___ __2 getName

private long f Value public Push Long long value f Value value  fValue PushLong fValue
public void execute push New Value f Value  pushNewValue fValue
public String to String return Instructions Evaluation Messages get String Push Long push  1 f Value NON NLS 1  toString InstructionsEvaluationMessages getString PushLong push__1 fValue

public class Push Null extends Simple Instruction public void execute push Null Value  PushNull SimpleInstruction pushNullValue
public String to String return Instructions Evaluation Messages get String Push Null push   null  1 NON NLS 1  toString InstructionsEvaluationMessages getString PushNull push___null__1

public Push Static Field Variable String field Name String qualified Type Name int start super start f Field Name field Name f Qualified Type Name qualified Type Name  PushStaticFieldVariable fieldName qualifiedTypeName fFieldName fieldName fQualifiedTypeName qualifiedTypeName
public void execute throws Core Exception I Java Type receiver get Type f Qualified Type Name I Java Variable field null if receiver instanceof I Java Interface Type field I Java Interface Type receiver get Field f Field Name else if receiver instanceof I Java Class Type field I Java Class Type receiver get Field f Field Name if field null String message Message Format format Instructions Evaluation Messages get String Push Static Field Variable Cannot find the field  0  in  1  1 new String f Field Name f Qualified Type Name NON NLS 1 throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK message null couldn t find the field push field  CoreException IJavaType getType fQualifiedTypeName IJavaVariable IJavaInterfaceType IJavaInterfaceType getField fFieldName IJavaClassType IJavaClassType getField fFieldName MessageFormat InstructionsEvaluationMessages getString PushStaticFieldVariable Cannot_find_the_field_ _in_ _1 fFieldName fQualifiedTypeName CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus
public String to String return Message Format format Instructions Evaluation Messages get String Push Static Field Variable push static field  0  2 new String f Field Name NON NLS 1  toString MessageFormat InstructionsEvaluationMessages getString PushStaticFieldVariable push_static_field_ _2 fFieldName

private String f Value public Push String String value f Value value  fValue PushString fValue
public void execute push New Value f Value  pushNewValue fValue
public String to String return Instructions Evaluation Messages get String Push String push  1 f Value NON NLS 1  toString InstructionsEvaluationMessages getString PushString push__1 fValue

private int f Enclosing Level public Push This int enclosing Level f Enclosing Level enclosing Level  fEnclosingLevel PushThis enclosingLevel fEnclosingLevel enclosingLevel
public void execute throws Core Exception I Runtime Context context get Context I Java Object this Instance context get This if this Instance null static context push context get Receiving Type else if f Enclosing Level 0 this Instance JDI Object Value this Instance get Enclosing Object f Enclosing Level if this Instance null throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Instructions Evaluation Messages get String Push This Unable to retrieve the correct enclosing instance of  this  2 null NON NLS 1 push this Instance  CoreException IRuntimeContext getContext IJavaObject thisInstance getThis thisInstance getReceivingType fEnclosingLevel thisInstance JDIObjectValue thisInstance getEnclosingObject fEnclosingLevel thisInstance CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus InstructionsEvaluationMessages getString PushThis Unable_to_retrieve_the_correct_enclosing_instance_of__this__2 thisInstance
public String to String return Instructions Evaluation Messages get String Push This push   this  1 NON NLS 1  toString InstructionsEvaluationMessages getString PushThis push___this__1

public Push Type String signature f Type Name signature  PushType fTypeName
public void execute throws Core Exception push get Type f Type Name  CoreException getType fTypeName
public String to String return Instructions Evaluation Messages get String Push Type push type  1 f Type Name NON NLS 1  toString InstructionsEvaluationMessages getString PushType push_type__1 fTypeName

public class Remainder Assignment Operator extends Remainder Operator public Remainder Assignment Operator int variable Type Id int value Type Id int start super variable Type Id variable Type Id value Type Id true start  RemainderAssignmentOperator RemainderOperator RemainderAssignmentOperator variableTypeId valueTypeId variableTypeId variableTypeId valueTypeId
public String to String return Instructions Evaluation Messages get String Remainder Assignment Operator operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString RemainderAssignmentOperator operator_1

public class Remainder Operator extends Binary Operator public Remainder Operator int result Id int left Type Id int right Type Id int start this result Id left Type Id right Type Id false start  RemainderOperator BinaryOperator RemainderOperator resultId leftTypeId rightTypeId resultId leftTypeId rightTypeId
protected Remainder Operator int result Id int left Type Id int right Type Id boolean is Assignment Operator int start super result Id left Type Id right Type Id is Assignment Operator start  RemainderOperator resultId leftTypeId rightTypeId isAssignmentOperator resultId leftTypeId rightTypeId isAssignmentOperator
see Binary Operator get Boolean Result I Java Value I Java Value protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand return false  BinaryOperator getBooleanResult IJavaValue IJavaValue getBooleanResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Double Value I Java Primitive Value right Operand get Double Value  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getDoubleValue IJavaPrimitiveValue rightOperand getDoubleValue
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Float Value I Java Primitive Value right Operand get Float Value  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getFloatValue IJavaPrimitiveValue rightOperand getFloatValue
protected int get Int Result I Java Value left Operand I Java Value right Operand throws Core Exception int divisor I Java Primitive Value right Operand get Int Value if divisor 0 throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Instructions Evaluation Messages get String Remainder Operator Divide by zero 1 null NON NLS 1 return I Java Primitive Value left Operand get Int Value divisor  getIntResult IJavaValue leftOperand IJavaValue rightOperand CoreException IJavaPrimitiveValue rightOperand getIntValue CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus InstructionsEvaluationMessages getString RemainderOperator Divide_by_zero_1 IJavaPrimitiveValue leftOperand getIntValue
protected long get Long Result I Java Value left Operand I Java Value right Operand throws Core Exception long divisor I Java Primitive Value right Operand get Long Value if divisor 0 throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Instructions Evaluation Messages get String Remainder Operator Divide by zero 2 null NON NLS 1 return I Java Primitive Value left Operand get Long Value divisor  getLongResult IJavaValue leftOperand IJavaValue rightOperand CoreException IJavaPrimitiveValue rightOperand getLongValue CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus InstructionsEvaluationMessages getString RemainderOperator Divide_by_zero_2 IJavaPrimitiveValue leftOperand getLongValue
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return null  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand
public String to String return Instructions Evaluation Messages get String Remainder Operator      operator 3 NON NLS 1  toString InstructionsEvaluationMessages getString RemainderOperator _ ___operator_3

Constructor for Return Instruction param start public Return Instruction int start super start  ReturnInstruction ReturnInstruction
see Instruction execute public void execute stop 
public String to String return Instructions Evaluation Messages get String Return Instruction return NON NLS 1  toString InstructionsEvaluationMessages getString ReturnInstruction

public class Right Shift Assignment Operator extends Right Shift Operator public Right Shift Assignment Operator int variable Type Id int value Type Id int start super variable Type Id variable Type Id value Type Id true start  RightShiftAssignmentOperator RightShiftOperator RightShiftAssignmentOperator variableTypeId valueTypeId variableTypeId variableTypeId valueTypeId
public String to String return Instructions Evaluation Messages get String Right Shift Assignment Operator operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString RightShiftAssignmentOperator operator_1

public class Right Shift Operator extends Binary Operator public Right Shift Operator int result Id int left Type Id int right Type Id int start this result Id left Type Id right Type Id false start  RightShiftOperator BinaryOperator RightShiftOperator resultId leftTypeId rightTypeId resultId leftTypeId rightTypeId
protected Right Shift Operator int result Id int left Type Id int right Type Id boolean is Assignment Operator int start super result Id left Type Id right Type Id is Assignment Operator start  RightShiftOperator resultId leftTypeId rightTypeId isAssignmentOperator resultId leftTypeId rightTypeId isAssignmentOperator
see Binary Operator get Boolean Result I Java Value I Java Value protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand return false  BinaryOperator getBooleanResult IJavaValue IJavaValue getBooleanResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand
protected int get Int Result I Java Value left Operand I Java Value right Operand unary type promotion on both operands see 5 6 1 and 15 18 switch f Right Type Id case T long return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Long Value case T int case T short case T byte case T char return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Int Value default return 0  getIntResult IJavaValue leftOperand IJavaValue rightOperand fRightTypeId T_long IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getLongValue T_int T_short T_byte T_char IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getIntValue
protected long get Long Result I Java Value left Operand I Java Value right Operand unary type promotion on both operands see 5 6 1 and 15 18 switch f Right Type Id case T long return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Long Value case T int case T short case T byte case T char return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Int Value default return 0  getLongResult IJavaValue leftOperand IJavaValue rightOperand fRightTypeId T_long IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getLongValue T_int T_short T_byte T_char IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getIntValue
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return null  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand
protected int get Intern Result Type unary type promotion on both operands see 5 6 1 and 15 18 return get Unary Promotion Type f Left Type Id  getInternResultType getUnaryPromotionType fLeftTypeId
public String to String return Instructions Evaluation Messages get String Right Shift Operator      operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString RightShiftOperator _ ___operator_1

private static final char VOID v o i d public static String to String String signature throws Illegal Argument Exception return new String to Char Array signature to Char Array  toString IllegalArgumentException toCharArray toCharArray
public static char to Char Array char signature throws Illegal Argument Exception try int sig Length signature length if sig Length 0 signature 0 C PARAM START return to Char Array signature NO CHAR null true true compute result length int result Length 0 int index 1 while signature index C ARRAY result Length 2 switch signature index case C BOOLEAN result Length BOOLEAN length break case C BYTE result Length BYTE length break case C CHAR result Length CHAR length break case C DOUBLE result Length DOUBLE length break case C FLOAT result Length FLOAT length break case C INT result Length INT length break case C LONG result Length LONG length break case C SHORT result Length SHORT length break case C VOID result Length VOID length break case C RESOLVED case C UNRESOLVED int end Char Operation index Of C SEMICOLON signature index if end 1 throw new Illegal Argument Exception int start index 1 result Length end start break default throw new Illegal Argument Exception char result new char result Length copy Type signature 0 result 0 true Converts separated type signatures into separated type signature NOTE This assumes that the type signature is an inner type signature This is true in most cases but someone can define a non inner type name containing a However to tell the difference we would have to resolve the signature which cannot be done at this point Char Operation replace result C DOLLAR C DOT return result catch Array Index Out Of Bounds Exception e throw new Illegal Argument Exception  toCharArray IllegalArgumentException sigLength sigLength C_PARAM_START toCharArray NO_CHAR resultLength C_ARRAY resultLength C_BOOLEAN resultLength C_BYTE resultLength C_CHAR resultLength C_DOUBLE resultLength C_FLOAT resultLength C_INT resultLength C_LONG resultLength C_SHORT resultLength C_VOID resultLength C_RESOLVED C_UNRESOLVED CharOperation indexOf C_SEMICOLON IllegalArgumentException resultLength IllegalArgumentException resultLength copyType CharOperation C_DOLLAR C_DOT ArrayIndexOutOfBoundsException IllegalArgumentException
public static char to Char Array char method Signature char method Name char parameter Names boolean fully Qualify Type Names boolean include Return Type try int first Paren Char Operation index Of C PARAM START method Signature if first Paren 1 throw new Illegal Argument Exception int sig Length method Signature length compute result length method signature int param Count 0 int last Paren 1 int result Length 0 signature for int i first Paren i sig Length i switch method Signature i case C ARRAY result Length 2 continue signature case C BOOLEAN result Length BOOLEAN length break case C BYTE result Length BYTE length break case C CHAR result Length CHAR length break case C DOUBLE result Length DOUBLE length break case C FLOAT result Length FLOAT length break case C INT result Length INT length break case C LONG result Length LONG length break case C SHORT result Length SHORT length break case C VOID result Length VOID length break case C RESOLVED case C UNRESOLVED int end Char Operation index Of C SEMICOLON method Signature i if end 1 throw new Illegal Argument Exception int start if fully Qualify Type Names start i 1 else start Char Operation last Index Of C DOT method Signature i end 1 if start 0 start i 1 result Length end start i end break case C PARAM START add space for result Length continue signature case C PARAM END last Paren i if include Return Type if param Count 0 remove space for that was added with last parameter and remove space that is going to be added for after return type and add space for result Length 2 else remove space that is going to be added for after return type and add space for noop decrement param count because it is going to be added for return type param Count continue signature else if param Count 0 remove space for that was added with last parameter and add space for result Length else add space for result Length break signature default throw new Illegal Argument Exception result Length 2 add space for param Count parameter names int parameter Names Length parameter Names null 0 parameter Names length for int i 0 i parameter Names Length i result Length parameter Names i length 1 parameter name space selector int selector Length method Name null 0 method Name length result Length selector Length create resulting char array char result new char result Length returned type int index 0 if include Return Type long pos copy Type method Signature last Paren 1 result index fully Qualify Type Names index int pos 32 result index selector if method Name null System arraycopy method Name 0 result index selector Length index selector Length parameters result index C PARAM START int sig Pos first Paren 1 for int i 0 i param Count i long pos copy Type method Signature sig Pos result index fully Qualify Type Names index int pos 32 sig Pos int pos if parameter Names null result index char parameter Name parameter Names i int param Length parameter Name length System arraycopy parameter Name 0 result index param Length index param Length if i param Count 1 result index result index if sig Pos sig Length throw new Illegal Argument Exception should be on last paren result index C PARAM END return result catch Array Index Out Of Bounds Exception e throw new Illegal Argument Exception  toCharArray methodSignature methodName parameterNames fullyQualifyTypeNames includeReturnType firstParen CharOperation indexOf C_PARAM_START methodSignature firstParen IllegalArgumentException sigLength methodSignature paramCount lastParen resultLength firstParen sigLength methodSignature C_ARRAY resultLength C_BOOLEAN resultLength C_BYTE resultLength C_CHAR resultLength C_DOUBLE resultLength C_FLOAT resultLength C_INT resultLength C_LONG resultLength C_SHORT resultLength C_VOID resultLength C_RESOLVED C_UNRESOLVED CharOperation indexOf C_SEMICOLON methodSignature IllegalArgumentException fullyQualifyTypeNames CharOperation lastIndexOf C_DOT methodSignature resultLength C_PARAM_START resultLength C_PARAM_END lastParen includeReturnType paramCount resultLength paramCount paramCount resultLength resultLength IllegalArgumentException resultLength paramCount parameterNamesLength parameterNames parameterNames parameterNamesLength resultLength parameterNames selectorLength methodName methodName resultLength selectorLength resultLength includeReturnType copyType methodSignature lastParen fullyQualifyTypeNames methodName methodName selectorLength selectorLength C_PARAM_START sigPos firstParen paramCount copyType methodSignature sigPos fullyQualifyTypeNames sigPos parameterNames parameterName parameterNames paramLength parameterName parameterName paramLength paramLength paramCount sigPos sigLength IllegalArgumentException C_PARAM_END ArrayIndexOutOfBoundsException IllegalArgumentException
private static long copy Type char signature int sig Pos char dest int index boolean fully Qualify Type Names int array Count 0 loop while true switch signature sig Pos case C ARRAY array Count break case C BOOLEAN int length BOOLEAN length System arraycopy BOOLEAN 0 dest index length index length break loop case C BYTE length BYTE length System arraycopy BYTE 0 dest index length index length break loop case C CHAR length CHAR length System arraycopy CHAR 0 dest index length index length break loop case C DOUBLE length DOUBLE length System arraycopy DOUBLE 0 dest index length index length break loop case C FLOAT length FLOAT length System arraycopy FLOAT 0 dest index length index length break loop case C INT length INT length System arraycopy INT 0 dest index length index length break loop case C LONG length LONG length System arraycopy LONG 0 dest index length index length break loop case C SHORT length SHORT length System arraycopy SHORT 0 dest index length index length break loop case C VOID length VOID length System arraycopy VOID 0 dest index length index length break loop case C RESOLVED case C UNRESOLVED int end Char Operation index Of C SEMICOLON signature sig Pos if end 1 throw new Illegal Argument Exception int start if fully Qualify Type Names start sig Pos else start Char Operation last Index Of C DOT signature sig Pos end 1 if start 0 start sig Pos length end start System arraycopy signature start dest index length sig Pos end 1 index length break loop while array Count 0 dest index dest index return long index 32 sig Pos  copyType sigPos fullyQualifyTypeNames arrayCount sigPos C_ARRAY arrayCount C_BOOLEAN C_BYTE C_CHAR C_DOUBLE C_FLOAT C_INT C_LONG C_SHORT C_VOID C_RESOLVED C_UNRESOLVED CharOperation indexOf C_SEMICOLON sigPos IllegalArgumentException fullyQualifyTypeNames sigPos CharOperation lastIndexOf C_DOT sigPos sigPos sigPos arrayCount sigPos

public Send Message String selector String signature int arg Count String declaring Type int start super start f Arg Count arg Count f Selector selector f Signature signature f Declaring Type declaring Type  SendMessage argCount declaringType fArgCount argCount fSelector fSignature fDeclaringType declaringType
public void execute throws Core Exception I Java Value args new I Java Value f Arg Count args are in reverse order for int i f Arg Count 1 i 0 i args i pop Value Object receiver pop I Java Value result null if receiver instanceof I Java Variable receiver I Java Variable receiver get Value if receiver instanceof I Java Object result I Java Object receiver send Message f Selector f Signature args get Context get Thread f Declaring Type else throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Instructions Evaluation Messages get String Send Message Attempt to send a message to a non object value 1 null NON NLS 1 set Last Value result if f Signature ends With V NON NLS 1 only push the result if not a void method push result  CoreException IJavaValue IJavaValue fArgCount fArgCount popValue IJavaValue IJavaVariable IJavaVariable getValue IJavaObject IJavaObject sendMessage fSelector fSignature getContext getThread fDeclaringType CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus InstructionsEvaluationMessages getString SendMessage Attempt_to_send_a_message_to_a_non_object_value_1 setLastValue fSignature endsWith
public String to String return Message Format format Instructions Evaluation Messages get String Send Message send message  0   1  2 new String f Selector f Signature NON NLS 1  toString MessageFormat InstructionsEvaluationMessages getString SendMessage send_message_ _ _2 fSelector fSignature

public Send Static Message String type Name String selector String signature int arg Count int start super start f Arg Count arg Count f Selector selector f Signature signature f Type Name type Name  SendStaticMessage typeName argCount fArgCount argCount fSelector fSignature fTypeName typeName
public void execute throws Core Exception I Java Value args new I Java Value f Arg Count args are in reverse order for int i f Arg Count 1 i 0 i args i pop Value I Java Type receiver get Type f Type Name I Java Value result if receiver instanceof I Java Class Type result I Java Class Type receiver send Message f Selector f Signature args get Context get Thread else throw new Core Exception new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Status OK Instructions Evaluation Messages get String Send Static Message Cannot send a static message to a non class type object 1 null NON NLS 1 set Last Value result if f Signature ends With V NON NLS 1 only push the result if not a void method push result  CoreException IJavaValue IJavaValue fArgCount fArgCount popValue IJavaType getType fTypeName IJavaValue IJavaClassType IJavaClassType sendMessage fSelector fSignature getContext getThread CoreException IStatus JDIDebugPlugin getUniqueIdentifier IStatus InstructionsEvaluationMessages getString SendStaticMessage Cannot_send_a_static_message_to_a_non_class_type_object_1 setLastValue fSignature endsWith
public String to String return Message Format format Instructions Evaluation Messages get String Send Static Message send static message  0   1  2 new String f Selector f Signature NON NLS 1  toString MessageFormat InstructionsEvaluationMessages getString SendStaticMessage send_static_message_ _ _2 fSelector fSignature

Constructor for Simple Instruction protected Simple Instruction super  SimpleInstruction SimpleInstruction
public int get Size return 1  getSize

param start public Throw Instruction int start super start  ThrowInstruction
java Thread queue Runnable new Runnable public void run try java Thread resume catch Debug Exception e e print Stack Trace  javaThread queueRunnable javaThread DebugException printStackTrace
see org eclipse jdt internal debug eval ast instructions Instruction execute public void execute throws Core Exception I Java Object exception I Java Object pop Value final I Java Thread java Thread get Context get Thread java Thread stop exception java Thread queue Runnable new Runnable public void run try java Thread resume catch Debug Exception e e print Stack Trace stop  CoreException IJavaObject IJavaObject popValue IJavaThread javaThread getContext getThread javaThread javaThread queueRunnable javaThread DebugException printStackTrace

public class Twiddle Operator extends Unary Operator public Twiddle Operator int expression Type Id int start super expression Type Id start  TwiddleOperator UnaryOperator TwiddleOperator expressionTypeId expressionTypeId
public void execute throws Core Exception I Java Primitive Value value I Java Primitive Value pop Value switch f Expression Type Id case T long push New Value value get Long Value break case T byte case T short case T int case T char push New Value value get Int Value break  CoreException IJavaPrimitiveValue IJavaPrimitiveValue popValue fExpressionTypeId T_long pushNewValue getLongValue T_byte T_short T_int T_char pushNewValue getIntValue
public String to String return Instructions Evaluation Messages get String Twiddle Operator      operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString TwiddleOperator _ ___operator_1

public class Unary Minus Operator extends Unary Operator public Unary Minus Operator int expression Type Id int start super expression Type Id start  UnaryMinusOperator UnaryOperator UnaryMinusOperator expressionTypeId expressionTypeId
public void execute throws Core Exception I Java Primitive Value value I Java Primitive Value pop Value switch f Expression Type Id case T double push New Value value get Double Value break case T float push New Value value get Float Value break case T long push New Value value get Long Value break case T byte case T short case T int case T char push New Value value get Int Value break  CoreException IJavaPrimitiveValue IJavaPrimitiveValue popValue fExpressionTypeId T_double pushNewValue getDoubleValue T_float pushNewValue getFloatValue T_long pushNewValue getLongValue T_byte T_short T_int T_char pushNewValue getIntValue
see Object to String public String to String return Instructions Evaluation Messages get String Unary Minus Operator unary minus operator 1 NON NLS 1  toString toString InstructionsEvaluationMessages getString UnaryMinusOperator unary_minus_operator_1

protected int f Expression Type Id public Unary Operator int expression Type Id int start super start f Expression Type Id expression Type Id  fExpressionTypeId UnaryOperator expressionTypeId fExpressionTypeId expressionTypeId

public class Unary Plus Operator extends Unary Operator public Unary Plus Operator int expression Type Id int start super expression Type Id start  UnaryPlusOperator UnaryOperator UnaryPlusOperator expressionTypeId expressionTypeId
public void execute throws Core Exception I Java Primitive Value value I Java Primitive Value pop Value switch f Expression Type Id case T double push New Value value get Double Value break case T float push New Value value get Float Value break case T long push New Value value get Long Value break case T byte case T short case T int case T char push New Value value get Int Value break  CoreException IJavaPrimitiveValue IJavaPrimitiveValue popValue fExpressionTypeId T_double pushNewValue getDoubleValue T_float pushNewValue getFloatValue T_long pushNewValue getLongValue T_byte T_short T_int T_char pushNewValue getIntValue
public String to String return Instructions Evaluation Messages get String Unary Plus Operator unary plus operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString UnaryPlusOperator unary_plus_operator_1

public class Unsigned Right Shift Assignment Operator extends Unsigned Right Shift Operator public Unsigned Right Shift Assignment Operator int variable Type Id int value Type Id int start super variable Type Id variable Type Id value Type Id true start  UnsignedRightShiftAssignmentOperator UnsignedRightShiftOperator UnsignedRightShiftAssignmentOperator variableTypeId valueTypeId variableTypeId variableTypeId valueTypeId
public String to String return Instructions Evaluation Messages get String Unsigned Right Shift Assignment Operator operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString UnsignedRightShiftAssignmentOperator operator_1

public class Unsigned Right Shift Operator extends Binary Operator public Unsigned Right Shift Operator int result Id int left Type Id int right Type Id int start this result Id left Type Id right Type Id false start  UnsignedRightShiftOperator BinaryOperator UnsignedRightShiftOperator resultId leftTypeId rightTypeId resultId leftTypeId rightTypeId
public Unsigned Right Shift Operator int result Id int left Type Id int right Type Id boolean is Assignment Operator int start super result Id left Type Id right Type Id is Assignment Operator start  UnsignedRightShiftOperator resultId leftTypeId rightTypeId isAssignmentOperator resultId leftTypeId rightTypeId isAssignmentOperator
see Binary Operator get Boolean Result I Java Value I Java Value protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand return false  BinaryOperator getBooleanResult IJavaValue IJavaValue getBooleanResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand
protected int get Int Result I Java Value left Operand I Java Value right Operand unary type promotion on both operands see 5 6 1 and 15 18 switch f Right Type Id case T long return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Long Value case T int case T short case T byte case T char return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Int Value default return 0  getIntResult IJavaValue leftOperand IJavaValue rightOperand fRightTypeId T_long IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getLongValue T_int T_short T_byte T_char IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getIntValue
protected long get Long Result I Java Value left Operand I Java Value right Operand unary type promotion on both operands see 5 6 1 and 15 18 switch f Right Type Id case T long return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Long Value case T int case T short case T byte case T char return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Int Value default return 0  getLongResult IJavaValue leftOperand IJavaValue rightOperand fRightTypeId T_long IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getLongValue T_int T_short T_byte T_char IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getIntValue
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return null  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand
protected int get Intern Result Type unary type promotion on both operands see 5 6 1 and 15 18 return get Unary Promotion Type f Left Type Id  getInternResultType getUnaryPromotionType fLeftTypeId
public String to String return Instructions Evaluation Messages get String Unsigned Right Shift Operator      operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString UnsignedRightShiftOperator _ ___operator_1

protected int f Variable Type Id public Xfix Operator int variable Type Id int start super start f Variable Type Id variable Type Id  fVariableTypeId XfixOperator variableTypeId fVariableTypeId variableTypeId

public class Xor Assignment Operator extends Xor Operator public Xor Assignment Operator int variable Type Id int value Type Id int start super variable Type Id variable Type Id value Type Id true start  XorAssignmentOperator XorOperator XorAssignmentOperator variableTypeId valueTypeId variableTypeId variableTypeId valueTypeId
public String to String return Instructions Evaluation Messages get String Xor Assignment Operator operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString XorAssignmentOperator operator_1

public class Xor Operator extends Binary Operator public Xor Operator int result Id int left Type Id int right Type Id int start this result Id left Type Id right Type Id false start  XorOperator BinaryOperator XorOperator resultId leftTypeId rightTypeId resultId leftTypeId rightTypeId
public Xor Operator int result Id int left Type Id int right Type Id boolean is Assignment Operator int start super result Id left Type Id right Type Id is Assignment Operator start  XorOperator resultId leftTypeId rightTypeId isAssignmentOperator resultId leftTypeId rightTypeId isAssignmentOperator
see Binary Operator get Boolean Result I Java Value I Java Value protected boolean get Boolean Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Boolean Value I Java Primitive Value right Operand get Boolean Value  BinaryOperator getBooleanResult IJavaValue IJavaValue getBooleanResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getBooleanValue IJavaPrimitiveValue rightOperand getBooleanValue
see Binary Operator get Double Result I Java Value I Java Value protected double get Double Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getDoubleResult IJavaValue IJavaValue getDoubleResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Float Result I Java Value I Java Value protected float get Float Result I Java Value left Operand I Java Value right Operand return 0  BinaryOperator getFloatResult IJavaValue IJavaValue getFloatResult IJavaValue leftOperand IJavaValue rightOperand
see Binary Operator get Int Result I Java Value I Java Value protected int get Int Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Int Value I Java Primitive Value right Operand get Int Value  BinaryOperator getIntResult IJavaValue IJavaValue getIntResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getIntValue IJavaPrimitiveValue rightOperand getIntValue
see Binary Operator get Long Result I Java Value I Java Value protected long get Long Result I Java Value left Operand I Java Value right Operand return I Java Primitive Value left Operand get Long Value I Java Primitive Value right Operand get Long Value  BinaryOperator getLongResult IJavaValue IJavaValue getLongResult IJavaValue leftOperand IJavaValue rightOperand IJavaPrimitiveValue leftOperand getLongValue IJavaPrimitiveValue rightOperand getLongValue
see Binary Operator get String Result I Java Value I Java Value protected String get String Result I Java Value left Operand I Java Value right Operand return null  BinaryOperator getStringResult IJavaValue IJavaValue getStringResult IJavaValue leftOperand IJavaValue rightOperand
public String to String return Instructions Evaluation Messages get String Xor Operator      operator 1 NON NLS 1  toString InstructionsEvaluationMessages getString XorOperator _ ___operator_1

Resource Bundle get Bundle BUNDLE NAME private Evaluation Messages  ResourceBundle getBundle BUNDLE_NAME EvaluationMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Constructs a new evaluation result for the given engine thread and code snippet public Evaluation Result I Evaluation Engine engine String snippet I Java Thread thread set Evaluation Engine engine set Thread thread set Snippet snippet f Errors new Array List  EvaluationResult IEvaluationEngine IJavaThread setEvaluationEngine setThread setSnippet fErrors ArrayList
see I Evaluation Result get Value public I Java Value get Value return f Value  IEvaluationResult getValue IJavaValue getValue fValue
Sets the result of an evaluation possibly code null code param value result of an evaluation possibly code null code public void set Value I Java Value value f Value value  setValue IJavaValue fValue
see I Evaluation Result has Problems public boolean has Errors return get Errors length 0 get Exception null  IEvaluationResult hasProblems hasErrors getErrors getException
see I Evaluation Result get Problems deprecated public Message get Errors Message messages new Message f Errors size int i 0 for Iterator iter f Errors iterator iter has Next messages i new Message String iter next 1 return messages  IEvaluationResult getProblems getErrors fErrors fErrors hasNext
see org eclipse jdt debug eval I Evaluation Result get Error Messages public String get Error Messages return String f Errors to Array new String f Errors size  IEvaluationResult getErrorMessages getErrorMessages fErrors toArray fErrors
see I Evaluation Result get Snippet public String get Snippet return f Snippet  IEvaluationResult getSnippet getSnippet fSnippet
Sets the code snippet that was evaluated param snippet the source code that was evaluated private void set Snippet String snippet f Snippet snippet  setSnippet fSnippet
see I Evaluation Result get Exception public Debug Exception get Exception return f Exception  IEvaluationResult getException DebugException getException fException
Sets an exception that occurred while attempting the associated evaluation param e exception public void set Exception Debug Exception e f Exception e  setException DebugException fException
see I Evaluation Result get Thread public I Java Thread get Thread return f Thread  IEvaluationResult getThread IJavaThread getThread fThread
Sets the thread this result was generated from param thread thread in which the associated evaluation was executed private void set Thread I Java Thread thread f Thread thread  setThread IJavaThread fThread
see I Evaluation Result get Evaluation Engine public I Evaluation Engine get Evaluation Engine return f Engine  IEvaluationResult getEvaluationEngine IEvaluationEngine getEvaluationEngine fEngine
Sets the evaluation that created this result param engine the evaluation that created this result private void set Evaluation Engine I Evaluation Engine engine f Engine engine  setEvaluationEngine IEvaluationEngine fEngine
Adds the given message to the list of error messages public void add Error String message f Errors add message  addError fErrors

Cosntructs a new evaluation engine for the given VM in the context of the specified project Class files required for the evaluation will be deployed to the specified directory which must be on the class path of the VM in order for evaluation to work param project context in which to compile snippets param vm debug target in which to evaluate snippets param directory location where snippet class files will be deployed for execution The directory must exist public Local Evaluation Engine I Java Project project I Java Debug Target vm File directory set Java Project project set Debug Target vm set Output Directory directory ENGINE COUNT  LocalEvaluationEngine IJavaProject IJavaDebugTarget setJavaProject setDebugTarget setOutputDirectory ENGINE_COUNT
see I Code Snippet Requestor accept Class Files byte String String public boolean accept Class Files byte class File Bytes String class File Compound Names String code Snippet Class Name try deploy class File Bytes class File Compound Names catch Debug Exception e get Result set Exception e return false if code Snippet Class Name null set Code Snippet Class Name code Snippet Class Name try get Thread run Evaluation this null Debug Event EVALUATION get Hit Breakpoints catch Debug Exception e exception handling is in evaluation runnable return true  ICodeSnippetRequestor acceptClassFiles acceptClassFiles classFileBytes classFileCompoundNames codeSnippetClassName classFileBytes classFileCompoundNames DebugException getResult setException codeSnippetClassName setCodeSnippetClassName codeSnippetClassName getThread runEvaluation DebugEvent getHitBreakpoints DebugException
public void run I Java Thread thread I Progress Monitor monitor I Java Object code Snippet Instance null try code Snippet Instance new Instance get Code Snippet Class Name initialize Locals code Snippet Instance code Snippet Instance send Message RUN METHOD V null get Thread false NON NLS 1 restore Locals code Snippet Instance now retrieve the description of the result I Variable fields code Snippet Instance get Variables I Java Variable result Value null I Java Variable result Type null for int i 0 i fields length i if fields i get Name equals RESULT TYPE FIELD result Type I Java Variable fields i if fields i get Name equals RESULT VALUE FIELD result Value I Java Variable fields i I Java Value result convert Result I Java Class Object result Type get Value I Java Value result Value get Value get Result set Value result catch Debug Exception e get Result set Exception e Throwable underlying Exception e get Status get Exception if underlying Exception instanceof Invocation Exception Object Reference the Exception Invocation Exception underlying Exception exception if the Exception null try try I Java Object v I Java Object JDI Value create Value JDI Debug Target get Debug Target the Exception v send Message print Stack Trace V null get Thread false NON NLS 2 NON NLS 1 catch Debug Exception de JDI Debug Plugin log de catch Runtime Exception re JDI Debug Plugin log re  IJavaThread IProgressMonitor IJavaObject codeSnippetInstance codeSnippetInstance newInstance getCodeSnippetClassName initializeLocals codeSnippetInstance codeSnippetInstance sendMessage RUN_METHOD getThread restoreLocals codeSnippetInstance IVariable codeSnippetInstance getVariables IJavaVariable resultValue IJavaVariable resultType getName RESULT_TYPE_FIELD resultType IJavaVariable getName RESULT_VALUE_FIELD resultValue IJavaVariable IJavaValue convertResult IJavaClassObject resultType getValue IJavaValue resultValue getValue getResult setValue DebugException getResult setException underlyingException getStatus getException underlyingException InvocationException ObjectReference theException InvocationException underlyingException theException IJavaObject IJavaObject JDIValue createValue JDIDebugTarget getDebugTarget theException sendMessage printStackTrace getThread DebugException JDIDebugPlugin RuntimeException JDIDebugPlugin
Initializes the value of instance variables in the code snippet object that are used as placeholders for locals and this in the current stack frame param object instance of code snippet class that will be run exception Debug Exception if an exception is thrown accessing the given object protected void initialize Locals I Java Object object throws Debug Exception I Java Variable locals null I Java Object this Object get This if get Stack Frame null locals get Stack Frame get Local Variables if locals null for int i 0 i locals length i I Java Variable local locals i I Java Variable field object get Field LOCAL VAR PREFIX local get Name false internal error if field is not found if field null throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED Evaluation Messages get String Local Evaluation Engine Evaluation failed   unable to initialize local variables  4 null NON NLS 1 else field set Value local get Value if this Object null I Java Variable field object get Field DELEGATE THIS false internal error if field is not found if field null throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED Evaluation Messages get String Local Evaluation Engine Evaluation failed   unable to initialize   this   context  5 null NON NLS 1 else field set Value this Object  DebugException initializeLocals IJavaObject DebugException IJavaVariable IJavaObject thisObject getThis getStackFrame getStackFrame getLocalVariables IJavaVariable IJavaVariable getField LOCAL_VAR_PREFIX getName DebugException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED EvaluationMessages getString LocalEvaluationEngine Evaluation_failed_ _unable_to_initialize_local_variables _4 setValue getValue thisObject IJavaVariable getField DELEGATE_THIS DebugException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED EvaluationMessages getString LocalEvaluationEngine Evaluation_failed_ _unable_to_initialize___this___context _5 setValue thisObject
Restores the value local variables from the instance variables in the code snippet object that are used as placeholders for locals in the current stack frame param object instance of code snippet class that was run exception Debug Exception if an exception is thrown accessing the given object protected void restore Locals I Java Object object throws Debug Exception I Java Variable locals null if get Stack Frame null locals get Stack Frame get Local Variables if locals null for int i 0 i locals length i I Java Variable local locals i I Java Variable field object get Field LOCAL VAR PREFIX local get Name false internal error if field is not found if field null throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED Evaluation Messages get String Local Evaluation Engine Evaluation failed   unable to initialize local variables  6 null NON NLS 1 else local set Value field get Value  DebugException restoreLocals IJavaObject DebugException IJavaVariable getStackFrame getStackFrame getLocalVariables IJavaVariable IJavaVariable getField LOCAL_VAR_PREFIX getName DebugException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED EvaluationMessages getString LocalEvaluationEngine Evaluation_failed_ _unable_to_initialize_local_variables _6 setValue getValue
see I Code Snippet Requestor accept Problem I Marker String int public void accept Problem I Marker problem Marker String fragment Source int fragment Kind if problem Marker get Attribute I Marker SEVERITY 1 I Marker SEVERITY ERROR return get Result add Error problem Marker get Attribute I Marker MESSAGE NON NLS 1  ICodeSnippetRequestor acceptProblem IMarker acceptProblem IMarker problemMarker fragmentSource fragmentKind problemMarker getAttribute IMarker IMarker SEVERITY_ERROR getResult addError problemMarker getAttribute IMarker
see I Evaluation Engine get Debug Target public I Java Debug Target get Debug Target return f Debug Target  IEvaluationEngine getDebugTarget IJavaDebugTarget getDebugTarget fDebugTarget
Sets the debug target in which snippets are executed param debug Target the debug target in which snippets are executed private void set Debug Target I Java Debug Target debug Target f Debug Target debug Target  debugTarget setDebugTarget IJavaDebugTarget debugTarget fDebugTarget debugTarget
see I Evaluation Engine get Java Project public I Java Project get Java Project return f Java Project  IEvaluationEngine getJavaProject IJavaProject getJavaProject fJavaProject
Sets the Java project in which snippets are compiled param java Project the Java project in which snippets are compiled private void set Java Project I Java Project java Project f Java Project java Project  javaProject setJavaProject IJavaProject javaProject fJavaProject javaProject
Returns the directory in which snippet class files are deployed return the directory in which snippet class files are deployed public File get Output Directory return f Output Directory  getOutputDirectory fOutputDirectory
Sets the directory in which snippet class files are deployed param output Directory location to deploy snippet class files private void set Output Directory File output Directory f Output Directory output Directory  outputDirectory setOutputDirectory outputDirectory fOutputDirectory outputDirectory
Runnable r new Runnable public void run try Local Evaluation Engine this get Evaluation Context evaluate Code Snippet Local Evaluation Engine this get Snippet Local Evaluation Engine this null catch Java Model Exception e Local Evaluation Engine this get Result set Exception new Debug Exception e get Status Local Evaluation Engine this evaluation Complete  LocalEvaluationEngine getEvaluationContext evaluateCodeSnippet LocalEvaluationEngine getSnippet LocalEvaluationEngine JavaModelException LocalEvaluationEngine getResult setException DebugException getStatus LocalEvaluationEngine evaluationComplete
see I Class File Evaluation Engine evaluate String I Java Thread I Evaluation Listener public void evaluate String snippet I Java Thread thread I Evaluation Listener listener boolean hit Breakpoints throws Debug Exception check Disposed check Evaluating try evaluation Started set Listener listener set Hit Breakpoints hit Breakpoints set Result new Evaluation Result this snippet thread check Thread no receiver stack frame context set This null set Local Variable Names EMPTY STRING ARRAY set Local Variable Type Names EMPTY STRING ARRAY set Local Variable Modifiers EMPTY INT ARRAY do the evaluation in a different thread Runnable r new Runnable public void run try Local Evaluation Engine this get Evaluation Context evaluate Code Snippet Local Evaluation Engine this get Snippet Local Evaluation Engine this null catch Java Model Exception e Local Evaluation Engine this get Result set Exception new Debug Exception e get Status Local Evaluation Engine this evaluation Complete Thread t new Thread r t start catch Debug Exception d evaluation Aborted throw d  IClassFileEvaluationEngine IJavaThread IEvaluationListener IJavaThread IEvaluationListener hitBreakpoints DebugException checkDisposed checkEvaluating evaluationStarted setListener setHitBreakpoints hitBreakpoints setResult EvaluationResult checkThread setThis setLocalVariableNames EMPTY_STRING_ARRAY setLocalVariableTypeNames EMPTY_STRING_ARRAY setLocalVariableModifiers EMPTY_INT_ARRAY LocalEvaluationEngine getEvaluationContext evaluateCodeSnippet LocalEvaluationEngine getSnippet LocalEvaluationEngine JavaModelException LocalEvaluationEngine getResult setException DebugException getStatus LocalEvaluationEngine evaluationComplete DebugException evaluationAborted
Runnable r new Runnable public void run try Local Evaluation Engine this get Evaluation Context evaluate Code Snippet Local Evaluation Engine this get Snippet Local Evaluation Engine this get Local Variable Type Names Local Evaluation Engine this get Local Variable Names Local Evaluation Engine this get Local Variable Modifiers receiving Type is Static is Constructor Local Evaluation Engine this null catch Java Model Exception e Local Evaluation Engine this get Result set Exception new Debug Exception e get Status Local Evaluation Engine this evaluation Complete  LocalEvaluationEngine getEvaluationContext evaluateCodeSnippet LocalEvaluationEngine getSnippet LocalEvaluationEngine getLocalVariableTypeNames LocalEvaluationEngine getLocalVariableNames LocalEvaluationEngine getLocalVariableModifiers receivingType isStatic isConstructor LocalEvaluationEngine JavaModelException LocalEvaluationEngine getResult setException DebugException getStatus LocalEvaluationEngine evaluationComplete
see I Evaluation Engine evaluate String I Java Stack Frame I Evaluation Listener int public void evaluate String snippet I Java Stack Frame frame I Evaluation Listener listener int evaluation Detail boolean hit Breakpoints throws Debug Exception check Disposed check Evaluating try evaluation Started set Listener listener set Stack Frame frame set Hit Breakpoints hit Breakpoints set Result new Evaluation Result this snippet I Java Thread frame get Thread check Thread set up local variables and this context for evaluation I Java Variable locals frame get Local Variables List type Names new Array List locals length List var Names new Array List locals length for int i 0 i locals length i I Java Variable var locals i String type Name get Translated Type Name var get Reference Type Name if type Name null type Names add type Name var Names add var get Name set Local Variable Type Names String type Names to Array new String type Names size set Local Variable Names String var Names to Array new String var Names size int modifiers new int type Names size cannot determine if local is final so specify as default Arrays fill modifiers 0 set Local Variable Modifiers modifiers set This frame get This final boolean is Static frame is Static final boolean is Constructor frame is Constructor final I Type receiving Type get Receiving Type frame do the evaluation in a different thread Runnable r new Runnable public void run try Local Evaluation Engine this get Evaluation Context evaluate Code Snippet Local Evaluation Engine this get Snippet Local Evaluation Engine this get Local Variable Type Names Local Evaluation Engine this get Local Variable Names Local Evaluation Engine this get Local Variable Modifiers receiving Type is Static is Constructor Local Evaluation Engine this null catch Java Model Exception e Local Evaluation Engine this get Result set Exception new Debug Exception e get Status Local Evaluation Engine this evaluation Complete Thread t new Thread r t start catch Debug Exception d evaluation Aborted throw d  IEvaluationEngine IJavaStackFrame IEvaluationListener IJavaStackFrame IEvaluationListener evaluationDetail hitBreakpoints DebugException checkDisposed checkEvaluating evaluationStarted setListener setStackFrame setHitBreakpoints hitBreakpoints setResult EvaluationResult IJavaThread getThread checkThread IJavaVariable getLocalVariables typeNames ArrayList varNames ArrayList IJavaVariable typeName getTranslatedTypeName getReferenceTypeName typeName typeNames typeName varNames getName setLocalVariableTypeNames typeNames toArray typeNames setLocalVariableNames varNames toArray varNames typeNames setLocalVariableModifiers setThis getThis isStatic isStatic isConstructor isConstructor IType receivingType getReceivingType LocalEvaluationEngine getEvaluationContext evaluateCodeSnippet LocalEvaluationEngine getSnippet LocalEvaluationEngine getLocalVariableTypeNames LocalEvaluationEngine getLocalVariableNames LocalEvaluationEngine getLocalVariableModifiers receivingType isStatic isConstructor LocalEvaluationEngine JavaModelException LocalEvaluationEngine getResult setException DebugException getStatus LocalEvaluationEngine evaluationComplete DebugException evaluationAborted
Runnable r new Runnable public void run try Local Evaluation Engine this get Evaluation Context evaluate Code Snippet Local Evaluation Engine this get Snippet Local Evaluation Engine this get Local Variable Type Names Local Evaluation Engine this get Local Variable Names Local Evaluation Engine this get Local Variable Modifiers receiving Type is Static is Constructor Local Evaluation Engine this null catch Java Model Exception e Local Evaluation Engine this get Result set Exception new Debug Exception e get Status Local Evaluation Engine this evaluation Complete  LocalEvaluationEngine getEvaluationContext evaluateCodeSnippet LocalEvaluationEngine getSnippet LocalEvaluationEngine getLocalVariableTypeNames LocalEvaluationEngine getLocalVariableNames LocalEvaluationEngine getLocalVariableModifiers receivingType isStatic isConstructor LocalEvaluationEngine JavaModelException LocalEvaluationEngine getResult setException DebugException getStatus LocalEvaluationEngine evaluationComplete
see I Evaluation Engine evaluate String I Java Object I Java Thread I Evaluation Listener int public void evaluate String snippet I Java Object this Context I Java Thread thread I Evaluation Listener listener int evaluation Detail boolean hit Breakpoints throws Debug Exception check Disposed check Evaluating try evaluation Started set Listener listener set Hit Breakpoints hit Breakpoints set Result new Evaluation Result this snippet thread check Thread no locals set Local Variable Type Names new String 0 set Local Variable Names new String 0 set Local Variable Modifiers new int 0 set This this Context final boolean is Static false final boolean is Constructor false final I Type receiving Type get Receiving Type this Context do the evaluation in a different thread Runnable r new Runnable public void run try Local Evaluation Engine this get Evaluation Context evaluate Code Snippet Local Evaluation Engine this get Snippet Local Evaluation Engine this get Local Variable Type Names Local Evaluation Engine this get Local Variable Names Local Evaluation Engine this get Local Variable Modifiers receiving Type is Static is Constructor Local Evaluation Engine this null catch Java Model Exception e Local Evaluation Engine this get Result set Exception new Debug Exception e get Status Local Evaluation Engine this evaluation Complete Thread t new Thread r t start catch Debug Exception d evaluation Aborted throw d  IEvaluationEngine IJavaObject IJavaThread IEvaluationListener IJavaObject thisContext IJavaThread IEvaluationListener evaluationDetail hitBreakpoints DebugException checkDisposed checkEvaluating evaluationStarted setListener setHitBreakpoints hitBreakpoints setResult EvaluationResult checkThread setLocalVariableTypeNames setLocalVariableNames setLocalVariableModifiers setThis thisContext isStatic isConstructor IType receivingType getReceivingType thisContext LocalEvaluationEngine getEvaluationContext evaluateCodeSnippet LocalEvaluationEngine getSnippet LocalEvaluationEngine getLocalVariableTypeNames LocalEvaluationEngine getLocalVariableNames LocalEvaluationEngine getLocalVariableModifiers receivingType isStatic isConstructor LocalEvaluationEngine JavaModelException LocalEvaluationEngine getResult setException DebugException getStatus LocalEvaluationEngine evaluationComplete DebugException evaluationAborted
Throws an exception if this engine has already been disposed exception Debug Exception if this engine has been disposed protected void check Disposed throws Debug Exception if is Disposed throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED Evaluation Messages get String Local Evaluation Engine Evaluation failed   evaluation context has been disposed  7 null NON NLS 1  DebugException checkDisposed DebugException isDisposed DebugException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED EvaluationMessages getString LocalEvaluationEngine Evaluation_failed_ _evaluation_context_has_been_disposed _7
Throws an exception if this engine is already in an evaluation exception Debug Exception if this engine is currently performing an evaluation protected void check Evaluating throws Debug Exception if is Evaluating throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED Cannot perform nested evaluations null NON NLS 1  DebugException checkEvaluating DebugException isEvaluating DebugException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED
Throws an exception if this engine s current evaluation thread is not suspended exception Debug Exception if this engine s current evaluation thread is not suspended protected void check Thread throws Debug Exception if get Thread is Suspended throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED Evaluation Messages get String Local Evaluation Engine Evaluation failed   evaluation thread must be suspended  8 null NON NLS 1  DebugException checkThread DebugException getThread isSuspended DebugException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED EvaluationMessages getString LocalEvaluationEngine Evaluation_failed_ _evaluation_thread_must_be_suspended _8
Deletes deployed class files and clears state see I Evaluation Engine dispose public void dispose f Disposed true ENGINE COUNT if is Evaluating cannot dispose if in an evaluation must wait for evaluation to complete return List snippet Files get Snippet Files Iterator iter snippet Files iterator while iter has Next File file File iter next if file exists if CODE SNIPPET NAME equals file get Name ENGINE COUNT 0 continue do not delete the common file for other engines if file delete JDI Debug Plugin log new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED Message Format format Evaluation Messages get String Local Evaluation Engine Unable to delete temporary evaluation class file  0  1 new String file get Absolute Path null NON NLS 1 List directories get Directories remove directories in bottom up order int i directories size 1 while i 0 File dir File directories get i String listing dir list if dir exists listing null listing length 0 dir delete JDI Debug Plugin log new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED Message Format format Evaluation Messages get String Local Evaluation Engine Unable to delete temporary evaluation directory  0  2 new String dir get Absolute Path null NON NLS 1 i reset set Java Project null set Debug Target null set Output Directory null set Result null set Evaluation Context null  IEvaluationEngine fDisposed ENGINE_COUNT isEvaluating snippetFiles getSnippetFiles snippetFiles hasNext CODE_SNIPPET_NAME getName ENGINE_COUNT JDIDebugPlugin IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED MessageFormat EvaluationMessages getString LocalEvaluationEngine Unable_to_delete_temporary_evaluation_class_file_ _1 getAbsolutePath getDirectories JDIDebugPlugin IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED MessageFormat EvaluationMessages getString LocalEvaluationEngine Unable_to_delete_temporary_evaluation_directory_ _2 getAbsolutePath setJavaProject setDebugTarget setOutputDirectory setResult setEvaluationContext
Resets this engine for another evaluation private void reset set This null set Stack Frame null set Listener null  setThis setStackFrame setListener
Returns the listener to notify when the current evaluation is complete return the listener to notify when the current evaluation is complete protected I Evaluation Listener get Listener return f Listener  IEvaluationListener getListener fListener
Sets the listener to notify when the current evaluation is complete param listener the listener to notify when the current evaluation is complete private void set Listener I Evaluation Listener listener f Listener listener  setListener IEvaluationListener fListener
Returns the stack frame context for the current evaluation or code null code if none return the stack frame context for the current evaluation or code null code if none protected I Java Stack Frame get Stack Frame return f Stack Frame  IJavaStackFrame getStackFrame fStackFrame
Sets the stack frame context for the current evaluation param stack Frame stack frame context or code null code if none private void set Stack Frame I Java Stack Frame stack Frame f Stack Frame stack Frame  stackFrame setStackFrame IJavaStackFrame stackFrame fStackFrame stackFrame
Returns the thread in which the current evaluation is to be executed return the thread in which the current evaluation is to be executed protected I Java Thread get Thread return get Result get Thread  IJavaThread getThread getResult getThread
Returns the code snippet being evaluated return the code snippet being evaluated protected String get Snippet return get Result get Snippet  getSnippet getResult getSnippet
Returns the current evaluation result return the current evaluation result protected Evaluation Result get Result return f Result  EvaluationResult getResult fResult
Sets the current evaluation result param result the current evaluation result private void set Result Evaluation Result result f Result result  setResult EvaluationResult fResult
Deploys the given class files to this engine s output location and adds the files to this engines list of temporary files to be deleted when disposed exception Debug Exception if this fails due to a lower level exception protected void deploy byte class Files String class File Names throws Debug Exception for int i 0 i class Files length i String compound Name class File Names i create required folders File dir Local Evaluation Engine this get Output Directory try String pkg Dir Name dir get Canonical Path for int j 0 j compound Name length 1 j pkg Dir Name File separator compound Name j File pkg Dir new File pkg Dir Name if pkg Dir exists pkg Dir mkdir add Directory pkg Dir String name compound Name compound Name length 1 class NON NLS 1 File class File new File pkg Dir Name File separator name if class File exists class File create New File File Output Stream stream new File Output Stream class File stream write class Files i stream close Local Evaluation Engine this add Snippet File class File catch IO Exception e throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED Message Format format Evaluation Messages get String Local Evaluation Engine 0  occurred deploying class file for evaluation 9 new String e to String e NON NLS 1  DebugException classFiles classFileNames DebugException classFiles compoundName classFileNames LocalEvaluationEngine getOutputDirectory pkgDirName getCanonicalPath compoundName pkgDirName compoundName pkgDir pkgDirName pkgDir pkgDir addDirectory pkgDir compoundName compoundName classFile pkgDirName classFile classFile createNewFile FileOutputStream FileOutputStream classFile classFiles LocalEvaluationEngine addSnippetFile classFile IOException DebugException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED MessageFormat EvaluationMessages getString LocalEvaluationEngine _occurred_deploying_class_file_for_evaluation_9 toString
Adds the given file to this engine s collection of deployed snippet class files which are to be deleted when this engine is diposed param File snippet class file private void add Snippet File File file if f Snippet Files null f Snippet Files new Array List f Snippet Files add file  addSnippetFile fSnippetFiles fSnippetFiles ArrayList fSnippetFiles
Adds the given file to this engine s collection of cerated directories which are to be deleted when this engine is diposed param file directory created for class file deployment private void add Directory File file if f Directories null f Directories new Array List f Directories add file  addDirectory fDirectories fDirectories ArrayList fDirectories
Returns an evaluation context for this evaluation engine An evaluation context is associted with a specific Java project The evaluation context is created lazily on the first access return evaluation context protected I Evaluation Context get Evaluation Context if f Evaluation Context null f Evaluation Context get Java Project new Evaluation Context return f Evaluation Context  IEvaluationContext getEvaluationContext fEvaluationContext fEvaluationContext getJavaProject newEvaluationContext fEvaluationContext
Sets the evaluation context for this evaluation engine param context evaluation context private void set Evaluation Context I Evaluation Context context f Evaluation Context context  setEvaluationContext IEvaluationContext fEvaluationContext
Returns a collection of snippet class file deployed by this evaluation engine possibly empty return deployed class files protected List get Snippet Files if f Snippet Files null return Collections EMPTY LIST else return f Snippet Files  getSnippetFiles fSnippetFiles EMPTY_LIST fSnippetFiles
Returns a collection of directories created by this evaluation engine possibly empty return directories created when deploying class files protected List get Directories if f Directories null return Collections EMPTY LIST else return f Directories  getDirectories fDirectories EMPTY_LIST fDirectories
Returns whether this evaluation engine has been disposed return whether this evaluation engine has been disposed protected boolean is Disposed return f Disposed  isDisposed fDisposed
The evaluation is complete Notify the current listener and reset for the next evaluation protected void evaluation Complete only notify if plug in not yet shutdown bug 8693 if JDI Debug Plugin get Default null get Listener evaluation Complete get Result evaluation Ended reset if is Disposed if the engine was disposed during an evaluation do the cleanup now dispose  evaluationComplete JDIDebugPlugin getDefault getListener evaluationComplete getResult evaluationEnded isDisposed
Increments the evaluation counter private void evaluation Started f Evaluation Count  evaluationStarted fEvaluationCount
Decrements the evaluation counter private void evaluation Ended if f Evaluation Count 0 f Evaluation Count  evaluationEnded fEvaluationCount fEvaluationCount
Returns whether this engine is currently in the midst of an evaluation protected boolean is Evaluating return f Evaluation Count 0  isEvaluating fEvaluationCount
Called when an evaluation is aborted due to an exception Decrements the evalution count and disposes this engine if the target VM disconnected or terminated during the evaluation attempt private void evaluation Aborted evaluation Ended if is Disposed if the engine was disposed during an evaluation do the cleanup now dispose  evaluationAborted evaluationEnded isDisposed
Constructs and returns a new instance of the specified class on the target VM param class Name fully qualified class name return a new instance on the target as an code I Java Value code exception Debug Exception if creation fails protected I Java Object new Instance String class Name throws Debug Exception I Java Object object null I Java Class Type clazz null I Java Type types get Debug Target get Java Types class Name if types null types length 0 clazz I Java Class Type types 0 if clazz null The class is not loaded on the target VM Force the load of the class types get Debug Target get Java Types java lang Class NON NLS 1 I Java Class Type class Class null if types null types length 0 class Class I Java Class Type types 0 if class Class null unable to load the class throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED Evaluation Messages get String Local Evaluation Engine Evaluation failed   unable to instantiate code snippet class  11 null NON NLS 1 I Java Value args new I Java Value get Debug Target new Value class Name I Java Object class Object I Java Object class Class send Message for Name Ljava lang String Ljava lang Class args get Thread NON NLS 2 NON NLS 1 object I Java Object class Object send Message new Instance Ljava lang Object null get Thread false NON NLS 2 NON NLS 1 else object clazz new Instance init null get Thread NON NLS 1 return object  className IJavaValue DebugException IJavaObject newInstance className DebugException IJavaObject IJavaClassType IJavaType getDebugTarget getJavaTypes className IJavaClassType getDebugTarget getJavaTypes IJavaClassType classClass classClass IJavaClassType classClass DebugException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED EvaluationMessages getString LocalEvaluationEngine Evaluation_failed_ _unable_to_instantiate_code_snippet_class _11 IJavaValue IJavaValue getDebugTarget newValue className IJavaObject classObject IJavaObject classClass sendMessage forName getThread IJavaObject classObject sendMessage newInstance getThread newInstance getThread
Interpretts and returns the result of the running the snippet class file The type of the result is described by an instance of code java lang Class code The value is interpretted based on the result type p Objects as well as primitve data types boolean int etc have class objects which are created by the VM If the class object represents a primitive data type then the associated value is stored in an instance of its object class For example when the result type is the class object for code int code the result object is an instance of code java lang Integer code and the actual code int code is stored in the code int Value code When the result type is the class object for code java lang Integer code the result object is an instance of code java lang Integer code to be interpretted as a ocde java lang Integer code p param result Type the class of the result param result Value the value of ther result to be interpretted based on result Type return the result of running the code snipped class file protected I Java Value convert Result I Java Class Object result Type I Java Value result throws Debug Exception if result Type null there was an exception or compilation problem no result return null check the type of the result if a primitive type convert it String sig result Type get Instance Type get Signature if sig equals V sig equals Lvoid NON NLS 2 NON NLS 1 void return get Debug Target void Value if result get Java Type null null result return result if sig length 1 primitive type find the instance variable with the signature of the result type we are looking for I Variable vars result get Variables I Java Variable var null for int i 0 i vars length i I Java Variable jv I Java Variable vars i if jv is Static jv get Signature equals sig var jv break if var null return I Java Value var get Value else an object return result throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED Evaluation Messages get String Local Evaluation Engine Evaluation failed   internal error retreiving result  17 null NON NLS 1  intValue resultType resultValue resultType IJavaValue convertResult IJavaClassObject resultType IJavaValue DebugException resultType resultType getInstanceType getSignature getDebugTarget voidValue getJavaType IVariable getVariables IJavaVariable IJavaVariable IJavaVariable isStatic getSignature IJavaValue getValue DebugException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED EvaluationMessages getString LocalEvaluationEngine Evaluation_failed_ _internal_error_retreiving_result _17
Returns the modifiers of the local variables visible in this evaluation possibly empty return array of modifiers private int get Local Variable Modifiers return f Local Variable Modifiers  getLocalVariableModifiers fLocalVariableModifiers
Sets the modifiers of the local variables visible in this evaluation possibly empty param local Variable Modifiers array of modifiers private void set Local Variable Modifiers int local Variable Modifiers f Local Variable Modifiers local Variable Modifiers  localVariableModifiers setLocalVariableModifiers localVariableModifiers fLocalVariableModifiers localVariableModifiers
Returns the names of the local variables visible in this evaluation possibly empty param array of names private String get Local Variable Names return f Local Variable Names  getLocalVariableNames fLocalVariableNames
Sets the names of the local variables visible in this evaluation possibly empty param local Variable Names array of names private void set Local Variable Names String local Variable Names f Local Variable Names local Variable Names  localVariableNames setLocalVariableNames localVariableNames fLocalVariableNames localVariableNames
Returns the type names of the local variables visible in this evaluation possibly empty param array of type names private String get Local Variable Type Names return f Local Variable Type Names  getLocalVariableTypeNames fLocalVariableTypeNames
Sets the type names of the local variables visible in this evaluation possibly empty param local Variable Type Names array of type names private void set Local Variable Type Names String local Variable Type Names f Local Variable Type Names local Variable Type Names  localVariableTypeNames setLocalVariableTypeNames localVariableTypeNames fLocalVariableTypeNames localVariableTypeNames
Sets the receiver context for the associated evaluation possibly code null code if the evaluation is in the context of a static method or there is no object context param this Object the receiver content of the associated evaluation or code null code private void set This I Java Object this Object f This this Object  thisObject setThis IJavaObject thisObject fThis thisObject
Returns the receiver context for the associated evaluation or code null code if the evaluation is in the context of a static method or there is no object context return the receiver context of the associated evaluation or code null code private I Java Object get This return f This  IJavaObject getThis fThis
Returns a copy of the type name with replaced by or returns code null code if the given type name refers to an anonymous inner class param type Name a fully qualified type name return a copy of the type name with replaced by or returns code null code if the given type name refers to an anonymous inner class protected String get Translated Type Name String type Name int index type Name last Index Of if index 1 return type Name if index 1 type Name length invalid name return type Name String last type Name substring index 1 try Integer parse Int last return null catch Number Format Exception e return type Name replace  typeName getTranslatedTypeName typeName typeName lastIndexOf typeName typeName typeName typeName parseInt NumberFormatException typeName
Returns the receiving type of the the given stack frame return receiving type exception Debug Exception if ul li A failure occurs while accessing attributes of the stack frame li li the resolved type is an inner type li li unable to resolve a type li ul private I Type get Receiving Type I Java Stack Frame frame throws Debug Exception String type Name frame get Receiving Type Name String source Name frame get Source Name if source Name null type Name equals frame get Declaring Type Name if there is no debug attribute or the declaring type is not the same as the receiving type we must guess at the receiver s source file int dollar Index type Name index Of if dollar Index 0 type Name type Name substring 0 dollar Index type Name type Name replace I Path SEPARATOR type Name java NON NLS 1 else int index type Name last Index Of if index 0 type Name type Name substring 0 index 1 type Name type Name replace I Path SEPARATOR else type Name NON NLS 1 type Name source Name I Path source Path new Path type Name I Type type null try I Java Element result get Java Project find Element source Path String type Names get Nested Type Names frame get Receiving Type Name if result null if result instanceof I Class File type I Class File result get Type else if result instanceof I Compilation Unit type I Compilation Unit result get Type type Names 0 for int i 1 i type Names length i type type get Type type Names i catch Java Model Exception e throw new Debug Exception e get Status if type null throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED Evaluation Messages get String Local Evaluation Engine Evaluation failed   unable to determine receiving type context  18 null NON NLS 1 if type get Declaring Type null throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED Evaluation Messages get String Local Evaluation Engine Evaluation in context of inner type not supported  19 null NON NLS 1 return type  DebugException IType getReceivingType IJavaStackFrame DebugException typeName getReceivingTypeName sourceName getSourceName sourceName typeName getDeclaringTypeName dollarIndex typeName indexOf dollarIndex typeName typeName dollarIndex typeName typeName IPath typeName typeName lastIndexOf typeName typeName typeName typeName IPath typeName typeName sourceName IPath sourcePath typeName IType IJavaElement getJavaProject findElement sourcePath typeNames getNestedTypeNames getReceivingTypeName IClassFile IClassFile getType ICompilationUnit ICompilationUnit getType typeNames typeNames getType typeNames JavaModelException DebugException getStatus DebugException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED EvaluationMessages getString LocalEvaluationEngine Evaluation_failed_ _unable_to_determine_receiving_type_context _18 getDeclaringType DebugException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED EvaluationMessages getString LocalEvaluationEngine Evaluation_in_context_of_inner_type_not_supported _19
Returns the type of the the given object return type exception Debug Exception if ul li A failure occurs while accessing attributes of the object li ul private I Type get Receiving Type I Java Object object throws Debug Exception String type Name object get Java Type get Name we must guess at the receiver s source file name int dollar Index type Name index Of if dollar Index 0 type Name type Name substring 0 dollar Index return get Type type Name  DebugException IType getReceivingType IJavaObject DebugException typeName getJavaType getName dollarIndex typeName indexOf dollarIndex typeName typeName dollarIndex getType typeName
Returns the type associated with the specified name in this evaluation engine s associated Java project param type Name fully qualified name of type for example code java lang String code return main type associated with source file exception Debug Exception if ul li the resolved type is an inner type li li unable to resolve a type li li a lower level Java exception occurs li ul private I Type get Type String type Name throws Debug Exception String path type Name replace I Path SEPARATOR path java NON NLS 1 I Path source Path new Path path I Type type null try I Java Element result get Java Project find Element source Path String type Names get Nested Type Names type Name if result null if result instanceof I Class File type I Class File result get Type else if result instanceof I Compilation Unit type I Compilation Unit result get Type type Names 0 for int i 1 i type Names length i type type get Type type Names i catch Java Model Exception e throw new Debug Exception e get Status if type null throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED Evaluation Messages get String Local Evaluation Engine Evaluation failed   unable to determine receiving type context  18 null NON NLS 1 if type get Parent instanceof I Type throw new Debug Exception new Status I Status ERROR JDI Debug Model get Plugin Identifier Debug Exception REQUEST FAILED Evaluation Messages get String Local Evaluation Engine Evaluation in context of inner type not supported  19 null NON NLS 1 return type  typeName DebugException IType getType typeName DebugException typeName IPath IPath sourcePath IType IJavaElement getJavaProject findElement sourcePath typeNames getNestedTypeNames typeName IClassFile IClassFile getType ICompilationUnit ICompilationUnit getType typeNames typeNames getType typeNames JavaModelException DebugException getStatus DebugException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED EvaluationMessages getString LocalEvaluationEngine Evaluation_failed_ _unable_to_determine_receiving_type_context _18 getParent IType DebugException IStatus JDIDebugModel getPluginIdentifier DebugException REQUEST_FAILED EvaluationMessages getString LocalEvaluationEngine Evaluation_in_context_of_inner_type_not_supported _19
Returns an array of simple type names that are part of the given type s qualified name For example if the given name is code x y A B code an array with code A B code is returned param type Name fully qualified type name return array of nested type names protected String get Nested Type Names String type Name int index type Name last Index Of if index 0 type Name type Name substring index 1 index type Name index Of Array List list new Array List 1 while index 0 list add type Name substring 0 index type Name type Name substring index 1 index type Name index Of list add type Name return String list to Array new String list size  typeName getNestedTypeNames typeName typeName lastIndexOf typeName typeName typeName indexOf ArrayList ArrayList typeName typeName typeName typeName indexOf typeName toArray
see I Class File Evaluation Engine get Imports public String get Imports return get Evaluation Context get Imports  IClassFileEvaluationEngine getImports getImports getEvaluationContext getImports
see I Class File Evaluation Engine set Imports String public void set Imports String imports get Evaluation Context set Imports imports  IClassFileEvaluationEngine setImports setImports getEvaluationContext setImports
Sets the name of the code snippet to instantiate to run the current evaluation param name the name of the deployed code snippet to instantiate and run private void set Code Snippet Class Name String name f Code Snippet Class Name name  setCodeSnippetClassName fCodeSnippetClassName
Returns the name of the code snippet to instantiate to run the current evaluation return the name of the deployed code snippet to instantiate and run protected String get Code Snippet Class Name return f Code Snippet Class Name  getCodeSnippetClassName fCodeSnippetClassName
see I Code Snippet Requestor is Requesting Class Files public boolean is Requesting Class Files return true  ICodeSnippetRequestor isRequestingClassFiles isRequestingClassFiles
Returns whether to hit breakpoints in the evaluation thread return whether to hit breakpoints in the evaluation thread protected boolean get Hit Breakpoints return f Hit Breakpoints  getHitBreakpoints fHitBreakpoints
Sets whether to hit breakpoints in the evaluation thread param hit whether to hit breakpoints in the evaluation thread private void set Hit Breakpoints boolean hit f Hit Breakpoints hit  setHitBreakpoints fHitBreakpoints

see I Adapter Factory get Adapter Object Class public Object get Adapter Object obj Class adapter Type if adapter Type is Instance obj return obj if adapter Type I Action Filter class if obj instanceof I Java Thread return new Java Thread Action Filter else if obj instanceof I Java Stack Frame return new Java Stack Frame Action Filter else if obj instanceof I Java Variable return new Java Variable Action Filter else if obj instanceof I Method return new Method Action Filter else if obj instanceof Java Inspect Expression return new Java Inspect Expression Action Filter return null  IAdapterFactory getAdapter getAdapter adapterType adapterType isInstance adapterType IActionFilter IJavaThread JavaThreadActionFilter IJavaStackFrame JavaStackFrameActionFilter IJavaVariable JavaVariableActionFilter IMethod MethodActionFilter JavaInspectExpression JavaInspectExpressionActionFilter
see I Adapter Factory get Adapter List public Class get Adapter List return new Class I Action Filter class  IAdapterFactory getAdapterList getAdapterList IActionFilter

see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action Make sure there is a current selection I Structured Selection selection get Current Selection if selection null return For each selected stack frame add a corresponding active step filter Iterator itr selection iterator while itr has Next I Java Stack Frame frame I Java Stack Frame itr next String pattern generate Step Filter Pattern frame if pattern null add Active Step Filter pattern  IActionDelegate IAction IAction IStructuredSelection getCurrentSelection hasNext IJavaStackFrame IJavaStackFrame generateStepFilterPattern addActiveStepFilter
Make the specified pattern an active step filter private void add Active Step Filter String pattern Get the active inactive filter preferences and convert them to Lists I Preference Store pref Store get Preference Store String active Array Java Debug Options Manager parse List pref Store get String IJDI Preferences Constants PREF ACTIVE FILTERS LIST String inactive Array Java Debug Options Manager parse List pref Store get String IJDI Preferences Constants PREF INACTIVE FILTERS LIST List active List new Array List Arrays as List active Array List inactive List new Array List Arrays as List inactive Array If the pattern is already in the active list there s nothing to do it can t shouldn t be in the inactive list if active List contains pattern return Add the pattern to the active list and update the preference store active List add pattern String active Pref Java Debug Options Manager serialize List String active List to Array new String active List size pref Store set Value IJDI Preferences Constants PREF ACTIVE FILTERS LIST active Pref If the pattern was present in the inactive list remove it since we just added it to the active list if inactive List contains pattern inactive List remove pattern String inactive Pref Java Debug Options Manager serialize List String inactive List to Array new String inactive List size pref Store set Value IJDI Preferences Constants PREF INACTIVE FILTERS LIST inactive Pref  addActiveStepFilter IPreferenceStore prefStore getPreferenceStore activeArray JavaDebugOptionsManager parseList prefStore getString IJDIPreferencesConstants PREF_ACTIVE_FILTERS_LIST inactiveArray JavaDebugOptionsManager parseList prefStore getString IJDIPreferencesConstants PREF_INACTIVE_FILTERS_LIST activeList ArrayList asList activeArray inactiveList ArrayList asList inactiveArray activeList activeList activePref JavaDebugOptionsManager serializeList activeList toArray activeList prefStore setValue IJDIPreferencesConstants PREF_ACTIVE_FILTERS_LIST activePref inactiveList inactiveList inactivePref JavaDebugOptionsManager serializeList inactiveList toArray inactiveList prefStore setValue IJDIPreferencesConstants PREF_INACTIVE_FILTERS_LIST inactivePref
Convenience method to get the preference store private I Preference Store get Preference Store return JDI DebugUI Plugin get Default get Preference Store  IPreferenceStore getPreferenceStore JDIDebugUIPlugin getDefault getPreferenceStore
Generate an appropriate String pattern for the specified Java stack frame or return null if generation failed For example the pattern for a type might look like com example My Type while the pattern for a package might look like com example param frame the Java stack frame used to generate a String pattern return String the pattern or code null code if one could not be generated  MyType

protected I Breakpoint determine Breakpoint I Breakpoint breakpoints Debug Plugin get Default get Breakpoint Manager get Breakpoints JDI Debug Plugin get Unique Identifier for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if breakpoint instanceof I Java Line Breakpoint I Java Line Breakpoint j Breakpoint I Java Line Breakpoint breakpoint try if breakpoint At Ruler Line j Breakpoint return j Breakpoint catch Core Exception ce JDI DebugUI Plugin log ce continue return null  IBreakpoint determineBreakpoint IBreakpoint DebugPlugin getDefault getBreakpointManager getBreakpoints JDIDebugPlugin getUniqueIdentifier IBreakpoint IJavaLineBreakpoint IJavaLineBreakpoint jBreakpoint IJavaLineBreakpoint breakpointAtRulerLine jBreakpoint jBreakpoint CoreException JDIDebugUIPlugin
protected I Vertical Ruler Info get Info return f Info  IVerticalRulerInfo getInfo fInfo
protected void set Info I Vertical Ruler Info info f Info info  setInfo IVerticalRulerInfo fInfo
protected I Text Editor get Text Editor return f Text Editor  ITextEditor getTextEditor fTextEditor
protected void set Text Editor I Text Editor text Editor f Text Editor text Editor  setTextEditor ITextEditor textEditor fTextEditor textEditor
Returns the resource for which to create the marker or code null code if there is no applicable resource return the resource for which to create the marker or code null code protected I Resource get Resource I Editor Input input f Text Editor get Editor Input I Resource resource I Resource input get Adapter I File class if resource null resource I Resource input get Adapter I Resource class return resource  IResource getResource IEditorInput fTextEditor getEditorInput IResource IResource getAdapter IFile IResource getAdapter IResource
protected boolean breakpoint At Ruler Line I Java Line Breakpoint j Breakpoint throws Core Exception Abstract Marker Annotation Model model get Annotation Model if model null Position position model get Marker Position j Breakpoint get Marker if position null I Document Provider provider get Text Editor get Document Provider I Document doc provider get Document get Text Editor get Editor Input try int marker Line Number doc get Line Of Offset position get Offset int ruler Line get Info get Line Of Last Mouse Button Activity if ruler Line marker Line Number if get Text Editor is Dirty return j Breakpoint get Line Number marker Line Number 1 return true catch Bad Location Exception x return false  breakpointAtRulerLine IJavaLineBreakpoint jBreakpoint CoreException AbstractMarkerAnnotationModel getAnnotationModel getMarkerPosition jBreakpoint getMarker IDocumentProvider getTextEditor getDocumentProvider IDocument getDocument getTextEditor getEditorInput markerLineNumber getLineOfOffset getOffset rulerLine getInfo getLineOfLastMouseButtonActivity rulerLine markerLineNumber getTextEditor isDirty jBreakpoint getLineNumber markerLineNumber BadLocationException
protected I Breakpoint get Breakpoint return f Breakpoint  IBreakpoint getBreakpoint fBreakpoint
protected void set Breakpoint I Breakpoint breakpoint f Breakpoint breakpoint  setBreakpoint IBreakpoint fBreakpoint
Returns the code Abstract Marker Annotation Model code of the editor s input return the marker annotation model protected Abstract Marker Annotation Model get Annotation Model I Document Provider provider f Text Editor get Document Provider I Annotation Model model provider get Annotation Model get Text Editor get Editor Input if model instanceof Abstract Marker Annotation Model return Abstract Marker Annotation Model model return null  AbstractMarkerAnnotationModel AbstractMarkerAnnotationModel getAnnotationModel IDocumentProvider fTextEditor getDocumentProvider IAnnotationModel getAnnotationModel getTextEditor getEditorInput AbstractMarkerAnnotationModel AbstractMarkerAnnotationModel

see Breakpoint Toggle Action get Toggle State I Java Breakpoint protected boolean get Toggle State I Java Breakpoint watchpoint throws Core Exception return I Java Watchpoint watchpoint is Access  BreakpointToggleAction getToggleState IJavaBreakpoint getToggleState IJavaBreakpoint CoreException IJavaWatchpoint isAccess
see Breakpoint Toggle Action do Action I Java Breakpoint public void do Action I Java Breakpoint watchpoint throws Core Exception I Java Watchpoint watchpoint set Access I Java Watchpoint watchpoint is Access  BreakpointToggleAction doAction IJavaBreakpoint doAction IJavaBreakpoint CoreException IJavaWatchpoint setAccess IJavaWatchpoint isAccess
see Breakpoint Toggle Action is Enabled For I Structured Selection public boolean is Enabled For I Structured Selection selection Iterator iter selection iterator while iter has Next Object element iter next if element instanceof I Java Watchpoint return false return true  BreakpointToggleAction isEnabledFor IStructuredSelection isEnabledFor IStructuredSelection hasNext IJavaWatchpoint

public static Action Delegate Helper get Default if fg Default null fg Default new Action Delegate Helper return fg Default  ActionDelegateHelper getDefault fgDefault fgDefault ActionDelegateHelper fgDefault
private Action Delegate Helper f Current Window JDI DebugUI Plugin get Active Workbench Window if f Current Window null f Current Window get Workbench add Window Listener this f Current Window get Part Service add Part Listener this I Workbench Page page f Current Window get Active Page if page null I Editor Part part page get Active Editor check To Set Text Editor part  ActionDelegateHelper fCurrentWindow JDIDebugUIPlugin getActiveWorkbenchWindow fCurrentWindow fCurrentWindow getWorkbench addWindowListener fCurrentWindow getPartService addPartListener IWorkbenchPage fCurrentWindow getActivePage IEditorPart getActiveEditor checkToSetTextEditor
see I Part Listener part Activated I Workbench Part public void part Activated I Workbench Part part check To Set Text Editor part  IPartListener partActivated IWorkbenchPart partActivated IWorkbenchPart checkToSetTextEditor
see I Part Listener part Brought To Top I Workbench Part public void part Brought To Top I Workbench Part part  IPartListener partBroughtToTop IWorkbenchPart partBroughtToTop IWorkbenchPart
see I Part Listener part Closed I Workbench Part public void part Closed I Workbench Part part if part get Text Editor cleanup  IPartListener partClosed IWorkbenchPart partClosed IWorkbenchPart getTextEditor
see I Part Listener part Deactivated I Workbench Part public void part Deactivated I Workbench Part part  IPartListener partDeactivated IWorkbenchPart partDeactivated IWorkbenchPart
see I Part Listener part Opened I Workbench Part public void part Opened I Workbench Part part  IPartListener partOpened IWorkbenchPart partOpened IWorkbenchPart
protected I Member get Member return f Member  IMember getMember fMember
protected void set Member I Member member f Member member  setMember IMember fMember
protected void check To Set Text Editor I Workbench Part part if part instanceof I Text Editor if part instanceof Java Snippet Editor cleanup else set Text Editor I Text Editor part  checkToSetTextEditor IWorkbenchPart ITextEditor JavaSnippetEditor setTextEditor ITextEditor
public I Member get Current Member I Text Selection current Selection if current Selection get Current Selection return get Member set Current Selection current Selection I Text Editor editor get Text Editor if editor null return null I Editor Input editor Input editor get Editor Input I Member m null try I Class File class File I Class File editor Input get Adapter I Class File class if class File null I Java Element e class File get Element At current Selection get Offset if e instanceof I Member m I Member e else I Working Copy Manager manager JavaUI get Working Copy Manager I Compilation Unit unit manager get Working Copy editor Input if unit null synchronized unit unit reconcile I Compilation Unit NO AST don t create ast false don t force problem detection null use primary owner null no progress monitor I Java Element e unit get Element At current Selection get Offset if e instanceof I Member m I Member e catch Java Model Exception jme JDI DebugUI Plugin log jme set Member m return m  IMember getCurrentMember ITextSelection currentSelection currentSelection getCurrentSelection getMember setCurrentSelection currentSelection ITextEditor getTextEditor IEditorInput editorInput getEditorInput IMember IClassFile classFile IClassFile editorInput getAdapter IClassFile classFile IJavaElement classFile getElementAt currentSelection getOffset IMember IMember IWorkingCopyManager getWorkingCopyManager ICompilationUnit getWorkingCopy editorInput ICompilationUnit NO_AST IJavaElement getElementAt currentSelection getOffset IMember IMember JavaModelException JDIDebugUIPlugin setMember
protected I Text Editor get Text Editor return f Text Editor  ITextEditor getTextEditor fTextEditor
protected void set Text Editor I Text Editor text Editor f Text Editor text Editor  setTextEditor ITextEditor textEditor fTextEditor textEditor
protected I Selection get Current Selection return f Current Selection  ISelection getCurrentSelection fCurrentSelection
protected void set Current Selection I Selection current Selection f Current Selection current Selection  setCurrentSelection ISelection currentSelection fCurrentSelection currentSelection
see I Window Listener window Activated I Workbench Window public void window Activated I Workbench Window window if f Current Window null f Current Window get Part Service remove Part Listener this cleanup f Current Window window f Current Window get Part Service add Part Listener this I Workbench Page page window get Active Page if page null check To Set Text Editor page get Active Editor  IWindowListener windowActivated IWorkbenchWindow windowActivated IWorkbenchWindow fCurrentWindow fCurrentWindow getPartService removePartListener fCurrentWindow fCurrentWindow getPartService addPartListener IWorkbenchPage getActivePage checkToSetTextEditor getActiveEditor
see I Window Listener window Closed I Workbench Window public void window Closed I Workbench Window window if f Current Window window f Current Window null cleanup  IWindowListener windowClosed IWorkbenchWindow windowClosed IWorkbenchWindow fCurrentWindow fCurrentWindow
see I Window Listener window Deactivated I Workbench Window public void window Deactivated I Workbench Window window  IWindowListener windowDeactivated IWorkbenchWindow windowDeactivated IWorkbenchWindow
see I Window Listener window Opened I Workbench Window public void window Opened I Workbench Window window  IWindowListener windowOpened IWorkbenchWindow windowOpened IWorkbenchWindow
protected void cleanup set Text Editor null set Current Selection null set Member null  setTextEditor setCurrentSelection setMember

Resource Bundle get Bundle BUNDLE NAME private Action Messages  ResourceBundle getBundle BUNDLE_NAME ActionMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException
public static Resource Bundle get Resource Bundle return RESOURCE BUNDLE  ResourceBundle getResourceBundle RESOURCE_BUNDLE

public Add Advanced Action I Classpath Viewer viewer I Action actions super Action Messages get String Add Advanced Action Ad vanced  1 viewer NON NLS 1 f Actions actions set Viewer viewer  AddAdvancedAction IClasspathViewer IAction ActionMessages getString AddAdvancedAction _1 fActions setViewer
Prompts for a project to add see I Action run public void run Dialog dialog new Runtime Classpath Advanced Dialog get Shell f Actions get Viewer dialog open  IAction RuntimeClasspathAdvancedDialog getShell fActions getViewer
see Runtime Classpath Action set Viewer Runtime Classpath Viewer public void set Viewer I Classpath Viewer viewer super set Viewer viewer if f Actions null for int i 0 i f Actions length i if f Actions i instanceof Runtime Classpath Action Runtime Classpath Action f Actions i set Viewer viewer  RuntimeClasspathAction setViewer RuntimeClasspathViewer setViewer IClasspathViewer setViewer fActions fActions fActions RuntimeClasspathAction RuntimeClasspathAction fActions setViewer
protected int get Action Type return ADD  getActionType

public class Add External Folder Action extends Open Dialog Action public Add External Folder Action I Classpath Viewer viewer String dialog Settings Prefix super Action Messages get String Add External Folder Action Add External Folder 1 viewer dialog Settings Prefix NON NLS 1  AddExternalFolderAction OpenDialogAction AddExternalFolderAction IClasspathViewer dialogSettingsPrefix ActionMessages getString AddExternalFolderAction Add_External_Folder_1 dialogSettingsPrefix
Prompts for a folder to add see I Action run public void run String last Used Path get Dialog Setting LAST PATH SETTING if last Used Path null last Used Path NON NLS 1 Directory Dialog dialog new Directory Dialog get Shell SWT MULTI dialog set Text Action Messages get String Add External Folder Action Folder Selection 3 NON NLS 1 dialog set Filter Path last Used Path String res dialog open if res null return I Path filter Path new Path dialog get Filter Path I Runtime Classpath Entry elems new I Runtime Classpath Entry 1 I Path path new Path res make Absolute elems 0 Java Runtime new Archive Runtime Classpath Entry path set Dialog Setting LAST PATH SETTING filter Path toOS String get Viewer add Entries elems  IAction lastUsedPath getDialogSetting LAST_PATH_SETTING lastUsedPath lastUsedPath DirectoryDialog DirectoryDialog getShell setText ActionMessages getString AddExternalFolderAction Folder_Selection_3 setFilterPath lastUsedPath IPath filterPath getFilterPath IRuntimeClasspathEntry IRuntimeClasspathEntry IPath makeAbsolute JavaRuntime newArchiveRuntimeClasspathEntry setDialogSetting LAST_PATH_SETTING filterPath toOSString getViewer addEntries

public class Add External Jar Action extends Open Dialog Action public Add External Jar Action I Classpath Viewer viewer String dialog Settings Prefix super Action Messages get String Add External Jar Add E xternal JARs 1 viewer dialog Settings Prefix NON NLS 1  AddExternalJarAction OpenDialogAction AddExternalJarAction IClasspathViewer dialogSettingsPrefix ActionMessages getString AddExternalJar Add_E xternal_JARs_1 dialogSettingsPrefix
Prompts for a project to add see I Action run public void run String last Used Path get Dialog Setting LAST PATH SETTING if last Used Path null last Used Path NON NLS 1 File Dialog dialog new File Dialog get Shell SWT MULTI dialog set Text Action Messages get String Add External Jar Jar Selection 3 NON NLS 1 dialog set Filter Extensions new String jar zip NON NLS 1 dialog set Filter Path last Used Path String res dialog open if res null return String file Names dialog get File Names int n Chosen file Names length I Path filter Path new Path dialog get Filter Path I Runtime Classpath Entry elems new I Runtime Classpath Entry n Chosen for int i 0 i n Chosen i I Path path filter Path append file Names i make Absolute elems i Java Runtime new Archive Runtime Classpath Entry path set Dialog Setting LAST PATH SETTING filter Path toOS String get Viewer add Entries elems  IAction lastUsedPath getDialogSetting LAST_PATH_SETTING lastUsedPath lastUsedPath FileDialog FileDialog getShell setText ActionMessages getString AddExternalJar Jar_Selection_3 setFilterExtensions setFilterPath lastUsedPath fileNames getFileNames nChosen fileNames IPath filterPath getFilterPath IRuntimeClasspathEntry IRuntimeClasspathEntry nChosen nChosen IPath filterPath fileNames makeAbsolute JavaRuntime newArchiveRuntimeClasspathEntry setDialogSetting LAST_PATH_SETTING filterPath toOSString getViewer addEntries

public class Add Folder Action extends Runtime Classpath Action public Add Folder Action I Classpath Viewer viewer super Action Messages get String Add Folder Action Add  Folders 1 viewer NON NLS 1  AddFolderAction RuntimeClasspathAction AddFolderAction IClasspathViewer ActionMessages getString AddFolderAction Add_ Folders_1
List f Already Selected get Selected Folders public I Status validate Object selection for int i 0 i selection length i if selection i instanceof I Container return new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Java DebugUI Constants INTERNAL ERROR Action Messages get String Add Folder Action Selection must be a folder 2 null NON NLS 1 else if f Already Selected contains selection i return new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Java DebugUI Constants INTERNAL ERROR Action Messages get String Add Folder Action Classpath already includes selected folder s  1 null NON NLS 1 return new Status I Status OK JDI Debug Plugin get Unique Identifier 0 null NON NLS 1  fAlreadySelected getSelectedFolders IStatus IContainer IStatus JDIDebugPlugin getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR ActionMessages getString AddFolderAction Selection_must_be_a_folder_2 fAlreadySelected IStatus JDIDebugPlugin getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR ActionMessages getString AddFolderAction Classpath_already_includes_selected_folder _1 IStatus JDIDebugPlugin getUniqueIdentifier
Prompts for folder s to add see I Action run public void run I Selection Status Validator validator new I Selection Status Validator List f Already Selected get Selected Folders public I Status validate Object selection for int i 0 i selection length i if selection i instanceof I Container return new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Java DebugUI Constants INTERNAL ERROR Action Messages get String Add Folder Action Selection must be a folder 2 null NON NLS 1 else if f Already Selected contains selection i return new Status I Status ERROR JDI Debug Plugin get Unique Identifier I Java DebugUI Constants INTERNAL ERROR Action Messages get String Add Folder Action Classpath already includes selected folder s  1 null NON NLS 1 return new Status I Status OK JDI Debug Plugin get Unique Identifier 0 null NON NLS 1 I Label Provider lp new Workbench Label Provider I Tree Content Provider cp new Workbench Content Provider Element Tree Selection Dialog dialog new Element Tree Selection Dialog get Shell lp cp dialog set Sorter new Resource Sorter Resource Sorter NAME dialog set Validator validator dialog set Title Action Messages get String Add Folder Action Folder Selection 4 NON NLS 1 dialog set Message Action Messages get String Add Folder Action Choose folders to add  5 NON NLS 1 dialog set Input Resources Plugin get Workspace get Root if dialog open Window OK Object elements dialog get Result I Runtime Classpath Entry res new I Runtime Classpath Entry elements length for int i 0 i res length i I Resource elem I Resource elements i res i Java Runtime new Archive Runtime Classpath Entry elem get Viewer add Entries res  IAction ISelectionStatusValidator ISelectionStatusValidator fAlreadySelected getSelectedFolders IStatus IContainer IStatus JDIDebugPlugin getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR ActionMessages getString AddFolderAction Selection_must_be_a_folder_2 fAlreadySelected IStatus JDIDebugPlugin getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR ActionMessages getString AddFolderAction Classpath_already_includes_selected_folder _1 IStatus JDIDebugPlugin getUniqueIdentifier ILabelProvider WorkbenchLabelProvider ITreeContentProvider WorkbenchContentProvider ElementTreeSelectionDialog ElementTreeSelectionDialog getShell setSorter ResourceSorter ResourceSorter setValidator setTitle ActionMessages getString AddFolderAction Folder_Selection_4 setMessage ActionMessages getString AddFolderAction Choose_folders_to_add__5 setInput ResourcesPlugin getWorkspace getRoot getResult IRuntimeClasspathEntry IRuntimeClasspathEntry IResource IResource JavaRuntime newArchiveRuntimeClasspathEntry getViewer addEntries
Returns a list of resources of currently selected folders protected List get Selected Folders List list get Entries As List List folders new Array List Iterator iter list iterator while iter has Next I Runtime Classpath Entry entry I Runtime Classpath Entry iter next if entry get Type I Runtime Classpath Entry ARCHIVE I Resource res entry get Resource if res null res instanceof I Container folders add res return folders  getSelectedFolders getEntriesAsList ArrayList hasNext IRuntimeClasspathEntry IRuntimeClasspathEntry getType IRuntimeClasspathEntry IResource getResource IContainer
protected int get Action Type return ADD  getActionType

private I Selection Status Validator validator new I Selection Status Validator public I Status validate Object selection if selection length 0 return new Status I Status ERROR JDI Debug Plugin get Unique Identifier 0 null NON NLS 1 for int i 0 i selection length i if selection i instanceof I File return new Status I Status ERROR JDI Debug Plugin get Unique Identifier 0 null NON NLS 1 return new Status I Status OK JDI Debug Plugin get Unique Identifier 0 null NON NLS 1  ISelectionStatusValidator ISelectionStatusValidator IStatus IStatus JDIDebugPlugin getUniqueIdentifier IFile IStatus JDIDebugPlugin getUniqueIdentifier IStatus JDIDebugPlugin getUniqueIdentifier
public Add Jar Action I Classpath Viewer viewer super Action Messages get String Add Jar Action Add  JARs 1 viewer NON NLS 1  AddJarAction IClasspathViewer ActionMessages getString AddJarAction Add_ JARs_1
Prompts for a jar to add see I Action run public void run Viewer Filter filter new Archive Filter get Selected Jars I Label Provider lp new Workbench Label Provider I Tree Content Provider cp new Workbench Content Provider Element Tree Selection Dialog dialog new Element Tree Selection Dialog get Shell lp cp dialog set Validator validator dialog set Title Action Messages get String Add Jar Action JAR Selection 7 NON NLS 1 dialog set Message Action Messages get String Add Jar Action Choose jars to add  8 NON NLS 1 dialog add Filter filter dialog set Input Resources Plugin get Workspace get Root dialog set Sorter new Resource Sorter Resource Sorter NAME if dialog open Window OK Object elements dialog get Result I Runtime Classpath Entry res new I Runtime Classpath Entry elements length for int i 0 i res length i I Resource elem I Resource elements i res i Java Runtime new Archive Runtime Classpath Entry elem get Viewer add Entries res  IAction ViewerFilter ArchiveFilter getSelectedJars ILabelProvider WorkbenchLabelProvider ITreeContentProvider WorkbenchContentProvider ElementTreeSelectionDialog ElementTreeSelectionDialog getShell setValidator setTitle ActionMessages getString AddJarAction JAR_Selection_7 setMessage ActionMessages getString AddJarAction Choose_jars_to_add__8 addFilter setInput ResourcesPlugin getWorkspace getRoot setSorter ResourceSorter ResourceSorter getResult IRuntimeClasspathEntry IRuntimeClasspathEntry IResource IResource JavaRuntime newArchiveRuntimeClasspathEntry getViewer addEntries
Returns a list of resources of currently selected jars protected List get Selected Jars List list get Entries As List List jars new Array List Iterator iter list iterator while iter has Next I Runtime Classpath Entry entry I Runtime Classpath Entry iter next if entry get Type I Runtime Classpath Entry ARCHIVE I Resource res entry get Resource if res null res instanceof I File jars add res return jars  getSelectedJars getEntriesAsList ArrayList hasNext IRuntimeClasspathEntry IRuntimeClasspathEntry getType IRuntimeClasspathEntry IResource getResource IFile
protected int get Action Type return ADD  getActionType

public class Add Library Action extends Runtime Classpath Action public Add Library Action I Classpath Viewer viewer super Action Messages get String Add Library Action 0 viewer NON NLS 1  AddLibraryAction RuntimeClasspathAction AddLibraryAction IClasspathViewer ActionMessages getString AddLibraryAction
Prompts for folder s to add see org eclipse jface action I Action run public void run I Classpath Entry new Entries Build Path Dialog Access choose Container Entries get Shell null new I Classpath Entry 0 if new Entries null I Runtime Classpath Entry res new I Runtime Classpath Entry new Entries length for int i 0 i new Entries length i I Classpath Entry entry new Entries i try res i Java Runtime new Runtime Container Classpath Entry entry get Path I Runtime Classpath Entry STANDARD CLASSES catch Core Exception e JDI DebugUI Plugin error Dialog Launcher Messages get String Runtime Classpath Advanced Dialog Unable to create new entry  3 e NON NLS 1 return get Viewer add Entries res  IAction IClasspathEntry newEntries BuildPathDialogAccess chooseContainerEntries getShell IClasspathEntry newEntries IRuntimeClasspathEntry IRuntimeClasspathEntry newEntries newEntries IClasspathEntry newEntries JavaRuntime newRuntimeContainerClasspathEntry getPath IRuntimeClasspathEntry STANDARD_CLASSES CoreException JDIDebugUIPlugin errorDialog LauncherMessages getString RuntimeClasspathAdvancedDialog Unable_to_create_new_entry _3 getViewer addEntries
protected int get Action Type return ADD  getActionType

see org eclipse jdt internal debug ui actions Abstract Add Step Filter Action generate Step Filter Pattern org eclipse jdt debug core I Java Stack Frame protected String generate Step Filter Pattern I Java Stack Frame frame String type Name try type Name frame get Receiving Type Name catch Debug Exception de return null Check for default package which is not supported by JDI int last Dot type Name last Index Of if last Dot 0 return null Append to the pattern to form a package name String package Name type Name substring 0 last Dot 1 package Name return package Name  AbstractAddStepFilterAction generateStepFilterPattern IJavaStackFrame generateStepFilterPattern IJavaStackFrame typeName typeName getReceivingTypeName DebugException lastDot typeName lastIndexOf lastDot packageName typeName lastDot packageName packageName

private List f Projects public Content Provider List projects f Projects projects  fProjects ContentProvider fProjects
see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return f Projects to Array  IStructuredContentProvider getElements getElements inputElement fProjects toArray
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
public Add Project Action I Classpath Viewer viewer super Action Messages get String Add Project Action Add Project 1 viewer NON NLS 1  AddProjectAction IClasspathViewer ActionMessages getString AddProjectAction Add_Project_1
Prompts for a project to add see I Action run public void run List projects get Possible Additions I Label Provider label Provider new Java Element Label Provider Java Element Label Provider SHOW DEFAULT I Structured Content Provider content new Content Provider projects Project Selection Dialog dialog new Project Selection Dialog get Shell projects content label Provider Action Messages get String Add Project Action Choose  project s  to add  3 NON NLS 1 dialog set Title Action Messages get String Add Project Action Project Selection 2 NON NLS 1 Multi Status status new Multi Status JDI DebugUI Plugin get Unique Identifier I Java DebugUI Constants INTERNAL ERROR Action Messages get String Add Project Action One or more exceptions occurred while adding projects  1 null NON NLS 1 if dialog open Window OK Object selections dialog get Result List additions new Array List selections length try for int i 0 i selections length i I Java Project jp I Java Project selections i if dialog is Add Required Projects collect Required Projects jp additions else additions add jp catch Java Model Exception e status add e get Status List runtime Entries new Array List additions size Iterator iter additions iterator while iter has Next I Java Project jp I Java Project iter next runtime Entries add Java Runtime new Project Runtime Classpath Entry jp if dialog is Add Exported Entries try collect Exported Entries jp runtime Entries catch Core Exception e status add e get Status I Runtime Classpath Entry entries I Runtime Classpath Entry runtime Entries to Array new I Runtime Classpath Entry runtime Entries size get Viewer add Entries entries content dispose label Provider dispose if status isOK JDI DebugUI Plugin error Dialog status get Message status  IAction getPossibleAdditions ILabelProvider labelProvider JavaElementLabelProvider JavaElementLabelProvider SHOW_DEFAULT IStructuredContentProvider ContentProvider ProjectSelectionDialog ProjectSelectionDialog getShell labelProvider ActionMessages getString AddProjectAction Choose_ _to_add__3 setTitle ActionMessages getString AddProjectAction Project_Selection_2 MultiStatus MultiStatus JDIDebugUIPlugin getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR ActionMessages getString AddProjectAction One_or_more_exceptions_occurred_while_adding_projects _1 getResult ArrayList IJavaProject IJavaProject isAddRequiredProjects collectRequiredProjects JavaModelException getStatus runtimeEntries ArrayList hasNext IJavaProject IJavaProject runtimeEntries JavaRuntime newProjectRuntimeClasspathEntry isAddExportedEntries collectExportedEntries runtimeEntries CoreException getStatus IRuntimeClasspathEntry IRuntimeClasspathEntry runtimeEntries toArray IRuntimeClasspathEntry runtimeEntries getViewer addEntries labelProvider JDIDebugUIPlugin errorDialog getMessage
see Selection Listener Action update Selection I Structured Selection protected boolean update Selection I Structured Selection selection return get Viewer update Selection get Action Type selection get Possible Additions is Empty  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection getViewer updateSelection getActionType getPossibleAdditions isEmpty
protected int get Action Type return ADD  getActionType
Returns the possible projects that can be added protected List get Possible Additions I Java Project projects I Workspace Root root Resources Plugin get Workspace get Root try projects Java Core create root get Java Projects catch Java Model Exception e JDI DebugUI Plugin log e projects new I Java Project 0 List remaining new Array List for int i 0 i projects length i remaining add projects i List already Selected new Array List I Runtime Classpath Entry entries get Viewer get Entries for int i 0 i entries length i if entries i get Type I Runtime Classpath Entry PROJECT I Resource res root find Member entries i get Path I Java Project jp I Java Project Java Core create res already Selected add jp remaining remove All already Selected return remaining  getPossibleAdditions IJavaProject IWorkspaceRoot ResourcesPlugin getWorkspace getRoot JavaCore getJavaProjects JavaModelException JDIDebugUIPlugin IJavaProject ArrayList alreadySelected ArrayList IRuntimeClasspathEntry getViewer getEntries getType IRuntimeClasspathEntry IResource findMember getPath IJavaProject IJavaProject JavaCore alreadySelected removeAll alreadySelected
Adds all projects required by code proj code to the list code res code param proj the project for which to compute required projects param res the list to add all required projects too protected void collect Required Projects I Java Project proj List res throws Java Model Exception if res contains proj res add proj I Java Model model proj get Java Model I Classpath Entry entries proj get Raw Classpath for int i 0 i entries length i I Classpath Entry curr entries i if curr get Entry Kind I Classpath Entry CPE PROJECT I Java Project ref model get Java Project curr get Path segment 0 if ref exists collect Required Projects ref res  collectRequiredProjects IJavaProject JavaModelException IJavaModel getJavaModel IClasspathEntry getRawClasspath IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT IJavaProject getJavaProject getPath collectRequiredProjects
Adds all exported entries defined by code proj code to the list code runtime Entries code param proj param runtime Entries throws Java Model Exception protected void collect Exported Entries I Java Project proj List runtime Entries throws Core Exception I Classpath Entry entries proj get Raw Classpath for int i 0 i entries length i I Classpath Entry entry entries i if entry is Exported I Runtime Classpath Entry rte null switch entry get Entry Kind case I Classpath Entry CPE CONTAINER I Classpath Container container Java Core get Classpath Container entry get Path proj int kind 0 switch container get Kind case I Classpath Container K APPLICATION kind I Runtime Classpath Entry USER CLASSES break case I Classpath Container K SYSTEM kind I Runtime Classpath Entry BOOTSTRAP CLASSES break case I Classpath Container K DEFAULT SYSTEM kind I Runtime Classpath Entry STANDARD CLASSES break rte Java Runtime new Runtime Container Classpath Entry entry get Path kind proj break case I Classpath Entry CPE LIBRARY rte Java Runtime new Archive Runtime Classpath Entry entry get Path rte set Source Attachment Path entry get Source Attachment Path rte set Source Attachment Root Path entry get Source Attachment Root Path break case I Classpath Entry CPE PROJECT String name entry get Path segment 0 I Project p Resources Plugin get Workspace get Root get Project name if p exists I Java Project jp Java Core create p if jp exists rte Java Runtime new Project Runtime Classpath Entry jp break case I Classpath Entry CPE VARIABLE rte Java Runtime new Variable Runtime Classpath Entry entry get Path break default break if rte null if runtime Entries contains rte runtime Entries add rte  runtimeEntries runtimeEntries JavaModelException collectExportedEntries IJavaProject runtimeEntries CoreException IClasspathEntry getRawClasspath IClasspathEntry isExported IRuntimeClasspathEntry getEntryKind IClasspathEntry CPE_CONTAINER IClasspathContainer JavaCore getClasspathContainer getPath getKind IClasspathContainer K_APPLICATION IRuntimeClasspathEntry USER_CLASSES IClasspathContainer K_SYSTEM IRuntimeClasspathEntry BOOTSTRAP_CLASSES IClasspathContainer K_DEFAULT_SYSTEM IRuntimeClasspathEntry STANDARD_CLASSES JavaRuntime newRuntimeContainerClasspathEntry getPath IClasspathEntry CPE_LIBRARY JavaRuntime newArchiveRuntimeClasspathEntry getPath setSourceAttachmentPath getSourceAttachmentPath setSourceAttachmentRootPath getSourceAttachmentRootPath IClasspathEntry CPE_PROJECT getPath IProject ResourcesPlugin getWorkspace getRoot getProject IJavaProject JavaCore JavaRuntime newProjectRuntimeClasspathEntry IClasspathEntry CPE_VARIABLE JavaRuntime newVariableRuntimeClasspathEntry getPath runtimeEntries runtimeEntries

see org eclipse jdt internal debug ui actions Abstract Add Step Filter Action generate Step Filter Pattern org eclipse jdt debug core I Java Stack Frame protected String generate Step Filter Pattern I Java Stack Frame frame try return frame get Receiving Type Name catch Debug Exception de return null  AbstractAddStepFilterAction generateStepFilterPattern IJavaStackFrame generateStepFilterPattern IJavaStackFrame getReceivingTypeName DebugException

public class Add Variable Action extends Runtime Classpath Action public Add Variable Action I Classpath Viewer viewer super Action Messages get String Add Variable Action Add Variables 1 viewer NON NLS 1  AddVariableAction RuntimeClasspathAction AddVariableAction IClasspathViewer ActionMessages getString AddVariableAction Add_Variables_1
Prompts for variables to add see org eclipse jface action I Action run public void run I Path paths Build Path Dialog Access choose Variable Entries get Shell new I Path 0 if paths null I Runtime Classpath Entry entries new I Runtime Classpath Entry paths length for int i 0 i paths length i entries i Java Runtime new Variable Runtime Classpath Entry paths i get Viewer add Entries entries  IAction IPath BuildPathDialogAccess chooseVariableEntries getShell IPath IRuntimeClasspathEntry IRuntimeClasspathEntry JavaRuntime newVariableRuntimeClasspathEntry getViewer addEntries
protected int get Action Type return ADD  getActionType

see org eclipse jface viewers Viewer Filter select org eclipse jface viewers Viewer java lang Object java lang Object public boolean select Viewer viewer Object parent Element Object element return f Archives contains element super select viewer parent Element element  ViewerFilter parentElement fArchives parentElement
Constructs a new filter to display archives and their containers excluding the resources in the given list param objects resources to exclude public Archive Filter List objects super objects init  ArchiveFilter
private void init Busy Indicator show While JDI DebugUI Plugin get Standard Display new Runnable public void run f Archives new Hash Set traverse Resources Plugin get Workspace get Root f Archives  BusyIndicator showWhile JDIDebugUIPlugin getStandardDisplay fArchives HashSet ResourcesPlugin getWorkspace getRoot fArchives
Search for all archives in the workspace private void init Busy Indicator show While JDI DebugUI Plugin get Standard Display new Runnable public void run f Archives new Hash Set traverse Resources Plugin get Workspace get Root f Archives  BusyIndicator showWhile JDIDebugUIPlugin getStandardDisplay fArchives HashSet ResourcesPlugin getWorkspace getRoot fArchives
Traverse the given container adding archives to the given set Returns whether any files were added param root private boolean traverse I Container container Set set boolean added false try I Resource resources container members for int i 0 i resources length i I Resource resource resources i if resource instanceof I File I File file I File resource String ext file get File Extension if ext null ext equals Ignore Case jar ext equals Ignore Case zip NON NLS 1 NON NLS 2 set add file added true else if resource instanceof I Container if traverse I Container resource set set add resource added true catch Core Exception e return added  IContainer IResource IResource IFile IFile IFile getFileExtension equalsIgnoreCase equalsIgnoreCase IContainer IContainer CoreException

Creates an action to open a source attachment dialog param viewer the viewer the action is associated with or code null code param style a button or radio button public Attach Source Action Runtime Classpath Viewer viewer int style super style SWT RADIO Action Messages get String Attach Source Action 2 Action Messages get String Attach Source Action 3 viewer NON NLS 1 NON NLS 2  AttachSourceAction RuntimeClasspathViewer ActionMessages getString AttachSourceAction ActionMessages getString AttachSourceAction
Prompts source attachment see org eclipse jface action I Action run public void run I Classpath Entry classpath Entry Build Path Dialog Access configure Source Attachment get Shell f Entries 0 get Classpath Entry if classpath Entry null for int i 0 i f Entries length i I Runtime Classpath Entry entry f Entries i entry set Source Attachment Path classpath Entry get Source Attachment Path entry set Source Attachment Root Path classpath Entry get Source Attachment Root Path get Viewer refresh entry get Viewer notify Changed  IAction IClasspathEntry classpathEntry BuildPathDialogAccess configureSourceAttachment getShell fEntries getClasspathEntry classpathEntry fEntries IRuntimeClasspathEntry fEntries setSourceAttachmentPath classpathEntry getSourceAttachmentPath setSourceAttachmentRootPath classpathEntry getSourceAttachmentRootPath getViewer getViewer notifyChanged
protected boolean update Selection I Structured Selection selection f Entries new I Runtime Classpath Entry selection size Iterator iterator selection iterator int i 0 while iterator has Next Object selected iterator next if selected instanceof I Runtime Classpath Entry I Runtime Classpath Entry entry I Runtime Classpath Entry selected int type entry get Type switch type case I Runtime Classpath Entry VARIABLE case I Runtime Classpath Entry ARCHIVE f Entries i entry i break default return false else return false return selection size 0  updateSelection IStructuredSelection fEntries IRuntimeClasspathEntry hasNext IRuntimeClasspathEntry IRuntimeClasspathEntry IRuntimeClasspathEntry getType IRuntimeClasspathEntry IRuntimeClasspathEntry fEntries

Constructor param position the position in the compilation unit public Breakpoint Field Locator int position f Position position f Found false  BreakpointFieldLocator fPosition fFound
Return the name of the field declared at the given position Return code null code if there is no field declaration at the given position public String get Field Name return f Field Name  getFieldName fFieldName
Return the name of type in which the field is declared Return code null code if there is no field declaration at the given position public String get Type Name return f Type Name  getTypeName fTypeName
private boolean contains Position AST Node node int start Position node get Start Position int end Position start Position node get Length return start Position f Position f Position end Position  containsPosition ASTNode startPosition getStartPosition endPosition startPosition getLength startPosition fPosition fPosition endPosition
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Compilation Unit public boolean visit Compilation Unit node visit only the type declarations List types node types for Iterator iter types iterator iter has Next f Found Type Declaration iter next accept this return false  ASTVisitor CompilationUnit CompilationUnit hasNext fFound TypeDeclaration
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Field Declaration public boolean visit Field Declaration node if contains Position node visit only the variable declaration fragments List fragments node fragments if fragments size 1 contains Position node f Field Name Variable Declaration Fragment fragments get 0 get Name get Identifier f Type Name Valid Breakpoint Location Locator compute Type Name node f Found true return false for Iterator iter fragments iterator iter has Next f Found Variable Declaration Fragment iter next accept this return false  ASTVisitor FieldDeclaration FieldDeclaration containsPosition containsPosition fFieldName VariableDeclarationFragment getName getIdentifier fTypeName ValidBreakpointLocationLocator computeTypeName fFound hasNext fFound VariableDeclarationFragment
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Type Declaration public boolean visit Type Declaration node if contains Position node visit the field declarations Field Declaration fields node get Fields for int i 0 length fields length i length f Found i fields i accept this if f Found visit inner types Type Declaration types node get Types for int i 0 length types length i length f Found i types i accept this return false  ASTVisitor TypeDeclaration TypeDeclaration containsPosition FieldDeclaration getFields fFound fFound TypeDeclaration getTypes fFound
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Variable Declaration Fragment public boolean visit Variable Declaration Fragment node if contains Position node f Field Name node get Name get Identifier f Type Name Valid Breakpoint Location Locator compute Type Name node f Found true return false  ASTVisitor VariableDeclarationFragment VariableDeclarationFragment containsPosition fFieldName getName getIdentifier fTypeName ValidBreakpointLocationLocator computeTypeName fFound

protected Hit Count Dialog Shell parent Shell String dialog Title String dialog Message String initial Value I Input Validator validator super parent Shell dialog Title dialog Message initial Value validator  HitCountDialog parentShell dialogTitle dialogMessage initialValue IInputValidator parentShell dialogTitle dialogMessage initialValue
checkbox add Selection Listener new Selection Listener public void widget Selected Selection Event e f Hit Count Enabled checkbox get Selection get Text set Enabled f Hit Count Enabled if f Hit Count Enabled validate Input else set Error Message null NON NLS 1  addSelectionListener SelectionListener widgetSelected SelectionEvent fHitCountEnabled getSelection getText setEnabled fHitCountEnabled fHitCountEnabled validateInput setErrorMessage
public void widget Default Selected Selection Event e  widgetDefaultSelected SelectionEvent
see Dialog create Dialog Area Composite protected Control create Dialog Area Composite parent Composite area Composite super create Dialog Area parent final Button checkbox new Button area SWT CHECK Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL data width Hint convert HorizontalDL Us To Pixels I Dialog Constants MINIMUM MESSAGE AREA WIDTH checkbox set Layout Data data checkbox set Font parent get Font checkbox set Text Action Messages get String Breakpoint Hit Count Action Enable Hit Count 1 NON NLS 1 checkbox set Selection true f Hit Count Enabled true checkbox add Selection Listener new Selection Listener public void widget Selected Selection Event e f Hit Count Enabled checkbox get Selection get Text set Enabled f Hit Count Enabled if f Hit Count Enabled validate Input else set Error Message null NON NLS 1 public void widget Default Selected Selection Event e return area  createDialogArea createDialogArea createDialogArea GridData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL widthHint convertHorizontalDLUsToPixels IDialogConstants MINIMUM_MESSAGE_AREA_WIDTH setLayoutData setFont getFont setText ActionMessages getString BreakpointHitCountAction Enable_Hit_Count_1 setSelection fHitCountEnabled addSelectionListener SelectionListener widgetSelected SelectionEvent fHitCountEnabled getSelection getText setEnabled fHitCountEnabled fHitCountEnabled validateInput setErrorMessage widgetDefaultSelected SelectionEvent
protected boolean is Hit Count Enabled return f Hit Count Enabled  isHitCountEnabled fHitCountEnabled
see I Action Delegate run I Action public void run I Action action I Structured Selection selection get Current Selection if selection null return Iterator itr selection iterator if itr has Next return while itr has Next I Java Breakpoint breakpoint I Java Breakpoint itr next try int old Hit Count breakpoint get Hit Count int new Hit Count hit Count Dialog breakpoint if new Hit Count 1 if old Hit Count new Hit Count new Hit Count 0 return breakpoint set Hit Count new Hit Count catch Core Exception ce JDI DebugUI Plugin error Dialog Action Messages get String Breakpoint Hit Count Action Exception occurred attempting to set hit count 1 ce NON NLS 1  IActionDelegate IAction IAction IStructuredSelection getCurrentSelection hasNext hasNext IJavaBreakpoint IJavaBreakpoint oldHitCount getHitCount newHitCount hitCountDialog newHitCount oldHitCount newHitCount newHitCount setHitCount newHitCount CoreException JDIDebugUIPlugin errorDialog ActionMessages getString BreakpointHitCountAction Exception_occurred_attempting_to_set_hit_count_1
int hit Count 1 public String is Valid String value try hit Count Integer value Of value trim int Value catch Number Format Exception nfe hit Count 1 if hit Count 1 return Action Messages get String Breakpoint Hit Count Action Value must be positive integer NON NLS 1 no error return null  hitCount isValid hitCount valueOf intValue NumberFormatException hitCount hitCount ActionMessages getString BreakpointHitCountAction Value_must_be_positive_integer
protected int hit Count Dialog I Java Breakpoint breakpoint String title Action Messages get String Breakpoint Hit Count Action Set Breakpoint Hit Count 2 NON NLS 1 String message Action Messages get String Breakpoint Hit Count Action Enter the new hit count for the breakpoint  3 NON NLS 1 I Input Validator validator new I Input Validator int hit Count 1 public String is Valid String value try hit Count Integer value Of value trim int Value catch Number Format Exception nfe hit Count 1 if hit Count 1 return Action Messages get String Breakpoint Hit Count Action Value must be positive integer NON NLS 1 no error return null int current Hit Count 0 try current Hit Count breakpoint get Hit Count catch Core Exception e JDI DebugUI Plugin log e String initial Value if current Hit Count 0 initial Value Integer to String current Hit Count else initial Value INITIAL VALUE Shell active Shell JDI DebugUI Plugin get Active Workbench Shell Hit Count Dialog dialog new Hit Count Dialog active Shell title message initial Value validator if dialog open Window OK return 1 if dialog is Hit Count Enabled return Integer parse Int dialog get Value trim return 0  hitCountDialog IJavaBreakpoint ActionMessages getString BreakpointHitCountAction Set_Breakpoint_Hit_Count_2 ActionMessages getString BreakpointHitCountAction Enter_the_new_hit_count_for_the_breakpoint__3 IInputValidator IInputValidator hitCount isValid hitCount valueOf intValue NumberFormatException hitCount hitCount ActionMessages getString BreakpointHitCountAction Value_must_be_positive_integer currentHitCount currentHitCount getHitCount CoreException JDIDebugUIPlugin initialValue currentHitCount initialValue toString currentHitCount initialValue INITIAL_VALUE activeShell JDIDebugUIPlugin getActiveWorkbenchShell HitCountDialog HitCountDialog activeShell initialValue isHitCountEnabled parseInt getValue

public Breakpoint Location Verifier Job I Document document I Java Line Breakpoint breakpoint int line Number String type Name I Type type I Resource resource I Editor Status Line status Line super Action Messages get String Breakpoint Location Verifier Job breakpoint location NON NLS 1 f Document document f Breakpoint breakpoint f Line Number line Number f Type Name type Name f Type type f Resource resource f Status Line status Line set System true  BreakpointLocationVerifierJob IDocument IJavaLineBreakpoint lineNumber typeName IType IResource IEditorStatusLine statusLine ActionMessages getString BreakpointLocationVerifierJob breakpoint_location fDocument fBreakpoint fLineNumber lineNumber fTypeName typeName fType fResource fStatusLine statusLine setSystem
public I Status run I Progress Monitor monitor I Java Project project Java Core create f Resource get Java Project int api Level if project null 1 5 equals project get Options true get Java Core COMPILER COMPLIANCE NON NLS 1 api Level AST JLS3 else api Level AST JLS2 AST Parser parser AST Parser new Parser api Level parser set Source f Document get to Char Array parser set Project project Compilation Unit compilation Unit Compilation Unit parser createAST null Valid Breakpoint Location Locator locator new Valid Breakpoint Location Locator compilation Unit f Line Number compilation Unit accept locator int line Number locator get Valid Location String type Name locator get Fully Qualified Type Name try if line Number 1 cannot found a valid line report Action Messages get String Breakpoint Location Verifier Job not valid location NON NLS 1 if f Breakpoint null Debug Plugin get Default get Breakpoint Manager remove Breakpoint f Breakpoint true return new Status I Status OK JDI DebugUI Plugin get Unique Identifier I Status ERROR Action Messages get String Breakpoint Location Verifier Job not valid location null NON NLS 1 boolean different Line Number line Number f Line Number I Java Line Breakpoint breakpoint JDI Debug Model line Breakpoint Exists type Name line Number boolean breakpoint Exist breakpoint null if f Breakpoint null if breakpoint Exist if different Line Number There is already a breakpoint on the valid line report Action Messages get String Breakpoint Location Verifier Job not valid location NON NLS 1 return new Status I Status OK JDI DebugUI Plugin get Unique Identifier I Status ERROR Action Messages get String Breakpoint Location Verifier Job not valid location null NON NLS 1 else There is already a breakpoint on the valid line but it s also the requested line Removing the existing breakpoint Debug Plugin get Default get Breakpoint Manager remove Breakpoint breakpoint true return new Status I Status OK JDI DebugUI Plugin get Unique Identifier I Status OK Action Messages get String Breakpoint Location Verifier Job breakpoint Removed null NON NLS 1 create New Breakpoint line Number type Name return new Status I Status OK JDI DebugUI Plugin get Unique Identifier I Status OK Action Messages get String Breakpoint Location Verifier Job breakpoint set null NON NLS 1 else if different Line Number if breakpoint Exist there is already a breakpoint on the valid line report Action Messages get String Breakpoint Location Verifier Job not valid location NON NLS 1 Debug Plugin get Default get Breakpoint Manager remove Breakpoint f Breakpoint true return new Status I Status OK JDI DebugUI Plugin get Unique Identifier I Status ERROR Action Messages get String Breakpoint Location Verifier Job not valid location null NON NLS 1 replace Breakpoint line Number type Name return new Status I Status OK JDI DebugUI Plugin get Unique Identifier I Status WARNING Action Messages get String Breakpoint Location Verifier Job breakpoint Moved To Valid Position null NON NLS 1 if type Name equals f Type Name replace Breakpoint line Number type Name return new Status I Status OK JDI DebugUI Plugin get Unique Identifier I Status WARNING Action Messages get String Breakpoint Location Verifier Job breakpoint Set To Right Type null NON NLS 1 catch Core Exception e JDI DebugUI Plugin log e return new Status I Status OK JDI DebugUI Plugin get Unique Identifier I Status OK Action Messages get String Breakpoint Location Verifier Job breakpoint set null NON NLS 1  IStatus IProgressMonitor IJavaProject JavaCore fResource getJavaProject apiLevel getOptions JavaCore COMPILER_COMPLIANCE apiLevel apiLevel ASTParser ASTParser newParser apiLevel setSource fDocument toCharArray setProject CompilationUnit compilationUnit CompilationUnit ValidBreakpointLocationLocator ValidBreakpointLocationLocator compilationUnit fLineNumber compilationUnit lineNumber getValidLocation typeName getFullyQualifiedTypeName lineNumber ActionMessages getString BreakpointLocationVerifierJob not_valid_location fBreakpoint DebugPlugin getDefault getBreakpointManager removeBreakpoint fBreakpoint IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus ActionMessages getString BreakpointLocationVerifierJob not_valid_location differentLineNumber lineNumber fLineNumber IJavaLineBreakpoint JDIDebugModel lineBreakpointExists typeName lineNumber breakpointExist fBreakpoint breakpointExist differentLineNumber ActionMessages getString BreakpointLocationVerifierJob not_valid_location IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus ActionMessages getString BreakpointLocationVerifierJob not_valid_location DebugPlugin getDefault getBreakpointManager removeBreakpoint IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus ActionMessages getString BreakpointLocationVerifierJob breakpointRemoved createNewBreakpoint lineNumber typeName IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus ActionMessages getString BreakpointLocationVerifierJob breakpoint_set differentLineNumber breakpointExist ActionMessages getString BreakpointLocationVerifierJob not_valid_location DebugPlugin getDefault getBreakpointManager removeBreakpoint fBreakpoint IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus ActionMessages getString BreakpointLocationVerifierJob not_valid_location replaceBreakpoint lineNumber typeName IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus ActionMessages getString BreakpointLocationVerifierJob breakpointMovedToValidPosition typeName fTypeName replaceBreakpoint lineNumber typeName IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus ActionMessages getString BreakpointLocationVerifierJob breakpointSetToRightType CoreException JDIDebugUIPlugin IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus ActionMessages getString BreakpointLocationVerifierJob breakpoint_set
Remove the temporary breakpoint and create a new breakpoint at the right position private void replace Breakpoint int line Number String type Name throws Core Exception create New Breakpoint line Number type Name Debug Plugin get Default get Breakpoint Manager remove Breakpoint f Breakpoint true  replaceBreakpoint lineNumber typeName CoreException createNewBreakpoint lineNumber typeName DebugPlugin getDefault getBreakpointManager removeBreakpoint fBreakpoint
Create a new breakpoint at the right position private void create New Breakpoint int line Number String type Name throws Core Exception Map new Attributes new Hash Map 10 if f Type null try I Region line f Document get Line Information line Number 1 int start line get Offset int end start line get Length 1 Breakpoint Utils add Java Breakpoint Attributes With Member Details new Attributes f Type start end catch Bad Location Exception ble JDI DebugUI Plugin log ble JDI Debug Model create Line Breakpoint f Resource type Name line Number 1 1 0 true new Attributes  createNewBreakpoint lineNumber typeName CoreException newAttributes HashMap fType IRegion fDocument getLineInformation lineNumber getOffset getLength BreakpointUtils addJavaBreakpointAttributesWithMemberDetails newAttributes fType BadLocationException JDIDebugUIPlugin JDIDebugModel createLineBreakpoint fResource typeName lineNumber newAttributes
JDI DebugUI Plugin get Standard Display async Exec new Runnable public void run if f Status Line null f Status Line set Message true message null if message null JDI DebugUI Plugin get Active Workbench Shell null Display get Current beep  JDIDebugUIPlugin getStandardDisplay asyncExec fStatusLine fStatusLine setMessage JDIDebugUIPlugin getActiveWorkbenchShell getCurrent
protected void report final String message JDI DebugUI Plugin get Standard Display async Exec new Runnable public void run if f Status Line null f Status Line set Message true message null if message null JDI DebugUI Plugin get Active Workbench Shell null Display get Current beep  JDIDebugUIPlugin getStandardDisplay asyncExec fStatusLine fStatusLine setMessage JDIDebugUIPlugin getActiveWorkbenchShell getCurrent

Constructor param position the position in the compilation unit public Breakpoint Method Locator int position f Position position f Found false  BreakpointMethodLocator fPosition fFound
Return the name of the method declared at the given position Return code null code if there is no method declaration at the given position public String get Method Name return f Method Name  getMethodName fMethodName
Return the name of the method declared at the given position Return code null code if there is no method declaration at the given position or if not possible to compute the signature of the method declared at the given position see Breakpoint Field Locator get Method Name public String get Method Signature return f Method Signature  BreakpointFieldLocator getMethodName getMethodSignature fMethodSignature
Return the name of type in which the method is declared Return code null code if there is no method declaration at the given position see Breakpoint Field Locator get Method Name public String get Type Name return f Type Name  BreakpointFieldLocator getMethodName getTypeName fTypeName
private boolean contains Position AST Node node int start Position node get Start Position int end Position start Position node get Length return start Position f Position f Position end Position  containsPosition ASTNode startPosition getStartPosition endPosition startPosition getLength startPosition fPosition fPosition endPosition
private String compute Method Signature Method Declaration node if node get Extra Dimensions 0 Modifier is Abstract node get Modifiers return null String Buffer signature new String Buffer signature append List parameters node parameters for Iterator iter parameters iterator iter has Next Type type Single Variable Declaration iter next get Type if type instanceof Primitive Type append Type Letter signature Primitive Type type else return null signature append Type return Type node get Return Type if return Type instanceof Primitive Type append Type Letter signature Primitive Type return Type else return null return signature to String  computeMethodSignature MethodDeclaration getExtraDimensions isAbstract getModifiers StringBuffer StringBuffer hasNext SingleVariableDeclaration getType PrimitiveType appendTypeLetter PrimitiveType returnType getReturnType returnType PrimitiveType appendTypeLetter PrimitiveType returnType toString
private void append Type Letter String Buffer signature Primitive Type type Primitive Type Code code type get Primitive Type Code if code Primitive Type BYTE signature append B else if code Primitive Type CHAR signature append C else if code Primitive Type DOUBLE signature append D else if code Primitive Type FLOAT signature append F else if code Primitive Type INT signature append I else if code Primitive Type LONG signature append J else if code Primitive Type SHORT signature append S else if code Primitive Type VOID signature append V else if code Primitive Type BOOLEAN signature append Z  appendTypeLetter StringBuffer PrimitiveType PrimitiveType getPrimitiveTypeCode PrimitiveType PrimitiveType PrimitiveType PrimitiveType PrimitiveType PrimitiveType PrimitiveType PrimitiveType PrimitiveType
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Compilation Unit public boolean visit Compilation Unit node visit only the type declarations List types node types for Iterator iter types iterator iter has Next f Found Type Declaration iter next accept this return false  ASTVisitor CompilationUnit CompilationUnit hasNext fFound TypeDeclaration
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Field Declaration public boolean visit Method Declaration node if contains Position node if node is Constructor f Method Name init NON NLS 1 else f Method Name node get Name get Identifier f Method Signature compute Method Signature node f Type Name Valid Breakpoint Location Locator compute Type Name node f Found true return false  ASTVisitor FieldDeclaration MethodDeclaration containsPosition isConstructor fMethodName fMethodName getName getIdentifier fMethodSignature computeMethodSignature fTypeName ValidBreakpointLocationLocator computeTypeName fFound
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Type Declaration public boolean visit Type Declaration node if contains Position node visit the methode declarations Method Declaration methods node get Methods for int i 0 length methods length i length f Found i methods i accept this if f Found visit inner types Type Declaration types node get Types for int i 0 length types length i length f Found i types i accept this return false  ASTVisitor TypeDeclaration TypeDeclaration containsPosition MethodDeclaration getMethods fFound fFound TypeDeclaration getTypes fFound

see Breakpoint Toggle Action do Action I Java Breakpoint public void do Action I Java Breakpoint breakpoint throws Core Exception if breakpoint get Suspend Policy I Java Breakpoint SUSPEND THREAD breakpoint set Suspend Policy I Java Breakpoint SUSPEND VM else breakpoint set Suspend Policy I Java Breakpoint SUSPEND THREAD  BreakpointToggleAction doAction IJavaBreakpoint doAction IJavaBreakpoint CoreException getSuspendPolicy IJavaBreakpoint SUSPEND_THREAD setSuspendPolicy IJavaBreakpoint SUSPEND_VM setSuspendPolicy IJavaBreakpoint SUSPEND_THREAD
see Breakpoint Toggle Action get Toggle State I Java Breakpoint protected boolean get Toggle State I Java Breakpoint breakpoint return false  BreakpointToggleAction getToggleState IJavaBreakpoint getToggleState IJavaBreakpoint
see Breakpoint Toggle Action is Enabled For I Structured Selection public boolean is Enabled For I Structured Selection selection Iterator iter selection iterator while iter has Next Object element iter next if element instanceof I Java Breakpoint return false return true  BreakpointToggleAction isEnabledFor IStructuredSelection isEnabledFor IStructuredSelection hasNext IJavaBreakpoint
see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection super selection Changed action selection if action is Enabled I Java Breakpoint bp I Java Breakpoint I Structured Selection selection get First Element update action bp  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection selectionChanged isEnabled IJavaBreakpoint IJavaBreakpoint IStructuredSelection getFirstElement
see I Action Delegate selection Changed I Action I Selection public void update I Action action I Java Breakpoint breakpoint try if breakpoint get Suspend Policy I Java Breakpoint SUSPEND THREAD action set Text Action Messages get String Breakpoint Suspend Policy Suspend  VM 1 NON NLS 1 else action set Text Action Messages get String Breakpoint Suspend Policy Suspend  Thread 2 NON NLS 1 catch Core Exception e JDI DebugUI Plugin log e  IActionDelegate selectionChanged IAction ISelection IAction IJavaBreakpoint getSuspendPolicy IJavaBreakpoint SUSPEND_THREAD setText ActionMessages getString BreakpointSuspendPolicy Suspend_ VM_1 setText ActionMessages getString BreakpointSuspendPolicy Suspend_ Thread_2 CoreException JDIDebugUIPlugin

see I Action Delegate run I Action public void run I Action action I Structured Selection selection get Structured Selection Iterator itr selection iterator while itr has Next try I Java Breakpoint breakpoint I Java Breakpoint itr next do Action breakpoint catch Core Exception e String title Action Messages get String Breakpoint Action Breakpoint configuration 1 NON NLS 1 String message Action Messages get String Breakpoint Action Exceptions occurred attempting to modify breakpoint  2 NON NLS 1 Exception Handler handle e title message  IActionDelegate IAction IAction IStructuredSelection getStructuredSelection hasNext IJavaBreakpoint IJavaBreakpoint doAction CoreException ActionMessages getString BreakpointAction Breakpoint_configuration_1 ActionMessages getString BreakpointAction Exceptions_occurred_attempting_to_modify_breakpoint _2 ExceptionHandler
see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection set Action action if selection is Empty set Structured Selection null return if selection instanceof I Structured Selection set Structured Selection I Structured Selection selection boolean enabled is Enabled For get Structured Selection action set Enabled enabled if enabled I Breakpoint breakpoint I Breakpoint get Structured Selection get First Element if breakpoint instanceof I Java Breakpoint try action set Checked get Toggle State I Java Breakpoint breakpoint catch Core Exception e JDI DebugUI Plugin log e  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection setAction isEmpty setStructuredSelection IStructuredSelection setStructuredSelection IStructuredSelection isEnabledFor getStructuredSelection setEnabled IBreakpoint IBreakpoint getStructuredSelection getFirstElement IJavaBreakpoint setChecked getToggleState IJavaBreakpoint CoreException JDIDebugUIPlugin
Toggle the state of this action public abstract void do Action I Java Breakpoint breakpoint throws Core Exception  doAction IJavaBreakpoint CoreException
public abstract void do Action I Java Breakpoint breakpoint throws Core Exception Returns whether this action is currently toggled on protected abstract boolean get Toggle State I Java Breakpoint breakpoint throws Core Exception  doAction IJavaBreakpoint CoreException getToggleState IJavaBreakpoint CoreException
Get the current selection protected I Structured Selection get Structured Selection return f Selection  IStructuredSelection getStructuredSelection fSelection
protected void set Structured Selection I Structured Selection selection f Selection selection  setStructuredSelection IStructuredSelection fSelection
public abstract boolean is Enabled For I Structured Selection selection  isEnabledFor IStructuredSelection
Get the breakpoint manager for the debug plugin protected I Breakpoint Manager get Breakpoint Manager return Debug Plugin get Default get Breakpoint Manager  IBreakpointManager getBreakpointManager DebugPlugin getDefault getBreakpointManager
Get the breakpoint associated with the given marker protected I Breakpoint get Breakpoint I Marker marker return get Breakpoint Manager get Breakpoint marker  IBreakpoint getBreakpoint IMarker getBreakpointManager getBreakpoint
protected I Action get Action return f Action  IAction getAction fAction
protected void set Action I Action action f Action action  setAction IAction fAction
see I Breakpoints Listener breakpoints Added I Breakpoint public void breakpoints Added I Breakpoint breakpoints  IBreakpointsListener breakpointsAdded IBreakpoint breakpointsAdded IBreakpoint
see I Breakpoints Listener breakpoints Changed I Breakpoint I Marker Delta public void breakpoints Changed I Breakpoint breakpoints I Marker Delta deltas if get Action null I Structured Selection selection get Structured Selection if selection null I Breakpoint selected Breakpoint I Breakpoint selection get First Element for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if selected Breakpoint equals breakpoint selection Changed get Action selection return  IBreakpointsListener breakpointsChanged IBreakpoint IMarkerDelta breakpointsChanged IBreakpoint IMarkerDelta getAction IStructuredSelection getStructuredSelection IBreakpoint selectedBreakpoint IBreakpoint getFirstElement IBreakpoint selectedBreakpoint selectionChanged getAction
see I Breakpoints Listener breakpoints Removed I Breakpoint I Marker Delta public void breakpoints Removed I Breakpoint breakpoints I Marker Delta deltas  IBreakpointsListener breakpointsRemoved IBreakpoint IMarkerDelta breakpointsRemoved IBreakpoint IMarkerDelta
protected I Workbench Part get Part return f Part  IWorkbenchPart getPart fPart
protected void set Part I Workbench Part part f Part part  setPart IWorkbenchPart fPart
see I Part Listener part Activated I Workbench Part public void part Activated I Workbench Part part  IPartListener partActivated IWorkbenchPart partActivated IWorkbenchPart
see I Part Listener part Brought To Top I Workbench Part public void part Brought To Top I Workbench Part part  IPartListener partBroughtToTop IWorkbenchPart partBroughtToTop IWorkbenchPart
see I Part Listener part Closed I Workbench Part public void part Closed I Workbench Part part if part get Part get Breakpoint Manager remove Breakpoint Listener this part get Site get Page remove Part Listener this  IPartListener partClosed IWorkbenchPart partClosed IWorkbenchPart getPart getBreakpointManager removeBreakpointListener getSite getPage removePartListener
see I Part Listener part Deactivated I Workbench Part public void part Deactivated I Workbench Part part  IPartListener partDeactivated IWorkbenchPart partDeactivated IWorkbenchPart
see I Part Listener part Opened I Workbench Part public void part Opened I Workbench Part part  IPartListener partOpened IWorkbenchPart partOpened IWorkbenchPart
see I Object Action Delegate set Active Part I Action I Workbench Part public void set Active Part I Action action I Workbench Part target Part I Workbench Part old Part get Part if old Part null get Part get Site get Page remove Part Listener this get Breakpoint Manager add Breakpoint Listener this set Part target Part target Part get Site get Page add Part Listener this  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart IWorkbenchPart oldPart getPart oldPart getPart getSite getPage removePartListener getBreakpointManager addBreakpointListener setPart targetPart targetPart getSite getPage addPartListener

private String control Name public Control Accessible Listener String name control Name name  controlName ControlAccessibleListener controlName
public void get Name Accessible Event e e result control Name  getName AccessibleEvent controlName
public static void add Listener Control comp String name strip mnemonic String strs name split NON NLS 1 String Buffer stripped new String Buffer for int i 0 i strs length i stripped append strs i comp get Accessible add Accessible Listener new Control Accessible Listener stripped to String  addListener StringBuffer StringBuffer getAccessible addAccessibleListener ControlAccessibleListener toString

display async Exec new Runnable public void run if display is Disposed return report Errors evaluation Result evaluation Cleanup  asyncExec isDisposed reportErrors evaluationResult evaluationCleanup
get Debug Model Presentation compute Detail result Value new I Value Detail Listener public void detail Computed I Value value String result display String Result snippet Message Format format Action Messages get String Display Action result pattern new Object result String result NON NLS 1  getDebugModelPresentation computeDetail resultValue IValueDetailListener detailComputed IValue displayStringResult MessageFormat ActionMessages getString DisplayAction result_pattern resultString
see Evaluate Action display Result I Evaluation Result protected void display Result final I Evaluation Result evaluation Result if evaluation Result has Errors final Display display JDI DebugUI Plugin get Standard Display display async Exec new Runnable public void run if display is Disposed return report Errors evaluation Result evaluation Cleanup return final String snippet evaluation Result get Snippet I Java Value result Value evaluation Result get Value try String sig null I Java Type type result Value get Java Type if type null sig type get Signature if V equals sig NON NLS 1 display String Result snippet Action Messages get String Display Action no result value NON NLS 1 else final String result String if sig null result String Message Format format Action Messages get String Display Action type name pattern new Object result Value get Reference Type Name NON NLS 1 else result String NON NLS 1 get Debug Model Presentation compute Detail result Value new I Value Detail Listener public void detail Computed I Value value String result display String Result snippet Message Format format Action Messages get String Display Action result pattern new Object result String result NON NLS 1 catch Debug Exception x display String Result snippet get Exception Message x  EvaluateAction displayResult IEvaluationResult displayResult IEvaluationResult evaluationResult evaluationResult hasErrors JDIDebugUIPlugin getStandardDisplay asyncExec isDisposed reportErrors evaluationResult evaluationCleanup evaluationResult getSnippet IJavaValue resultValue evaluationResult getValue IJavaType resultValue getJavaType getSignature displayStringResult ActionMessages getString DisplayAction no_result_value resultString resultString MessageFormat ActionMessages getString DisplayAction type_name_pattern resultValue getReferenceTypeName resultString getDebugModelPresentation computeDetail resultValue IValueDetailListener detailComputed IValue displayStringResult MessageFormat ActionMessages getString DisplayAction result_pattern resultString DebugException displayStringResult getExceptionMessage
display async Exec new Runnable public void run if display is Disposed I Data Display data Display get Data Display if data Display null if direct Display null data Display display Expression snippet data Display display Expression Value result String evaluation Cleanup  asyncExec isDisposed IDataDisplay dataDisplay getDataDisplay dataDisplay directDisplay dataDisplay displayExpression dataDisplay displayExpressionValue resultString evaluationCleanup
protected void display String Result final String snippet final String result String final I Data Display direct Display get Direct Data Display final Display display JDI DebugUI Plugin get Standard Display display async Exec new Runnable public void run if display is Disposed I Data Display data Display get Data Display if data Display null if direct Display null data Display display Expression snippet data Display display Expression Value result String evaluation Cleanup  displayStringResult resultString IDataDisplay directDisplay getDirectDataDisplay JDIDebugUIPlugin getStandardDisplay asyncExec isDisposed IDataDisplay dataDisplay getDataDisplay dataDisplay directDisplay dataDisplay displayExpression dataDisplay displayExpressionValue resultString evaluationCleanup
protected void run I Workbench Part part get Target Part if part instanceof Java Snippet Editor Java Snippet Editor part eval Selection Java Snippet Editor RESULT DISPLAY return super run  IWorkbenchPart getTargetPart JavaSnippetEditor JavaSnippetEditor evalSelection JavaSnippetEditor RESULT_DISPLAY

see I Action Delegate run I Action public void run I Action action I Structured Selection selection get Current Selection if selection null return Iterator itr selection iterator while itr has Next I Java Stack Frame frame I Java Stack Frame itr next try frame drop To Frame catch Debug Exception de String title Action Messages get String Drop To Frame Action Drop to Frame 1 NON NLS 1 String message Action Messages get String Drop To Frame Action Exceptions occurred attempting to drop to frame  2 NON NLS 1 Exception Handler handle de title message  IActionDelegate IAction IAction IStructuredSelection getCurrentSelection hasNext IJavaStackFrame IJavaStackFrame dropToFrame DebugException ActionMessages getString DropToFrameAction Drop_to_Frame_1 ActionMessages getString DropToFrameAction Exceptions_occurred_attempting_to_drop_to_frame _2 ExceptionHandler

see org eclipse ui I View Action Delegate init org eclipse ui I View Part public void init I View Part view  IViewActionDelegate IViewPart IViewPart
public void run I Action action try f Frame drop To Frame catch Debug Exception e String title Action Messages get String Drop To Frame Action Drop to Frame 1 NON NLS 1 String message Action Messages get String Drop To Frame Action Exceptions occurred attempting to drop to frame  2 NON NLS 1 Exception Handler handle e title message  IAction fFrame dropToFrame DebugException ActionMessages getString DropToFrameAction Drop_to_Frame_1 ActionMessages getString DropToFrameAction Exceptions_occurred_attempting_to_drop_to_frame _2 ExceptionHandler
public void selection Changed I Action action I Selection selection f Frame null if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection if ss size 1 Object object ss get First Element if object instanceof I Adaptable I Java Stack Frame frame I Java Stack Frame I Adaptable object get Adapter I Java Stack Frame class if frame null frame supports Drop To Frame action set Enabled true f Frame frame return action set Enabled false  selectionChanged IAction ISelection fFrame IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement IAdaptable IJavaStackFrame IJavaStackFrame IAdaptable getAdapter IJavaStackFrame supportsDropToFrame setEnabled fFrame setEnabled
see org eclipse ui I Action Delegate2 init org eclipse jface action I Action public void init I Action action  IActionDelegate2 IAction IAction
see org eclipse ui I Action Delegate2 dispose public void dispose f Frame null  IActionDelegate2 fFrame
see org eclipse ui I Action Delegate2 run With Event org eclipse jface action I Action org eclipse swt widgets Event public void run With Event I Action action Event event run action  IActionDelegate2 runWithEvent IAction runWithEvent IAction

see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action I Structured Selection selection get Current Selection if selection size 1 return Object element selection get First Element I Java Type type try I Java Value value if element instanceof I Java Variable value I Java Value I Java Variable element get Value else if element instanceof Java Inspect Expression value I Java Value Java Inspect Expression element get Value else return type value get Java Type catch Debug Exception e return Java Detail Formatters Manager detail Formatters Manager Java Detail Formatters Manager get Default Detail Formatter detail Formatter detail Formatters Manager get Associated Detail Formatter type if new Detail Formatter Dialog JDI DebugUI Plugin get Active Page get Workbench Window get Shell detail Formatter null false true open Window OK detail Formatters Manager set Associated Detail Formatter detail Formatter  IActionDelegate IAction IAction IStructuredSelection getCurrentSelection getFirstElement IJavaType IJavaValue IJavaVariable IJavaValue IJavaVariable getValue JavaInspectExpression IJavaValue JavaInspectExpression getValue getJavaType DebugException JavaDetailFormattersManager detailFormattersManager JavaDetailFormattersManager getDefault DetailFormatter detailFormatter detailFormattersManager getAssociatedDetailFormatter DetailFormatterDialog JDIDebugUIPlugin getActivePage getWorkbenchWindow getShell detailFormatter detailFormattersManager setAssociatedDetailFormatter detailFormatter

see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action I Preference Page page new Java Step Filter Preference Page show Preference Page org eclipse jdt debug ui Java Step Filter Preference Page page NON NLS 1  IActionDelegate IAction IAction IPreferencePage JavaStepFilterPreferencePage showPreferencePage JavaStepFilterPreferencePage
Busy Indicator show While JDI DebugUI Plugin get Standard Display new Runnable public void run dialog create dialog set Message target Node get Label Text result 0 dialog open Window OK  BusyIndicator showWhile JDIDebugUIPlugin getStandardDisplay setMessage targetNode getLabelText
protected void show Preference Page String id I Preference Page page final I Preference Node target Node new Preference Node id page Preference Manager manager new Preference Manager manager add To Root target Node final Preference Dialog dialog new Preference Dialog JDI DebugUI Plugin get Active Workbench Shell manager final boolean result new boolean false Busy Indicator show While JDI DebugUI Plugin get Standard Display new Runnable public void run dialog create dialog set Message target Node get Label Text result 0 dialog open Window OK  showPreferencePage IPreferencePage IPreferenceNode targetNode PreferenceNode PreferenceManager PreferenceManager addToRoot targetNode PreferenceDialog PreferenceDialog JDIDebugUIPlugin getActiveWorkbenchShell BusyIndicator showWhile JDIDebugUIPlugin getStandardDisplay setMessage targetNode getLabelText

Creates the action to enable disable breakpoints public Enable Disable Breakpoint Ruler Action I Text Editor editor I Vertical Ruler Info info set Info info set Text Editor editor set Text Action Messages get String Enable Disable Breakpoint Ruler Action Enable Breakpoint 1 NON NLS 1  EnableDisableBreakpointRulerAction ITextEditor IVerticalRulerInfo setInfo setTextEditor setText ActionMessages getString EnableDisableBreakpointRulerAction Enable_Breakpoint_1
see Action run public void run if get Breakpoint null try get Breakpoint set Enabled get Breakpoint is Enabled catch Core Exception e Error Dialog open Error get Text Editor get Editor Site get Shell Action Messages get String Enable Disable Breakpoint Ruler Action Enabling disabling breakpoints 2 Action Messages get String Enable Disable Breakpoint Ruler Action Exceptions occurred enabling disabling the breakpoint 3 e get Status NON NLS 1 NON NLS 2  getBreakpoint getBreakpoint setEnabled getBreakpoint isEnabled CoreException ErrorDialog openError getTextEditor getEditorSite getShell ActionMessages getString EnableDisableBreakpointRulerAction disabling_breakpoints_2 ActionMessages getString EnableDisableBreakpointRulerAction Exceptions_occurred_enabling_disabling_the_breakpoint_3 getStatus
see I Update update public void update set Breakpoint determine Breakpoint if get Breakpoint null set Enabled false return set Enabled true try boolean enabled get Breakpoint is Enabled set Text enabled Action Messages get String Enable Disable Breakpoint Ruler Action Disable Breakpoint 4 Action Messages get String Enable Disable Breakpoint Ruler Action Enable Breakpoint 5 NON NLS 1 NON NLS 2 catch Core Exception ce JDI DebugUI Plugin log ce  IUpdate setBreakpoint determineBreakpoint getBreakpoint setEnabled setEnabled getBreakpoint isEnabled setText ActionMessages getString EnableDisableBreakpointRulerAction Disable_Breakpoint_4 ActionMessages getString EnableDisableBreakpointRulerAction Enable_Breakpoint_5 CoreException JDIDebugUIPlugin

see Abstract Ruler Action Delegate create Action I Text Editor I Vertical Ruler Info protected I Action create Action I Text Editor editor I Vertical Ruler Info ruler Info return new Enable Disable Breakpoint Ruler Action editor ruler Info  AbstractRulerActionDelegate createAction ITextEditor IVerticalRulerInfo IAction createAction ITextEditor IVerticalRulerInfo rulerInfo EnableDisableBreakpointRulerAction rulerInfo

see Breakpoint Toggle Action get Toggle State I Java Breakpoint protected boolean get Toggle State I Java Breakpoint breakpoint throws Core Exception return I Java Method Breakpoint breakpoint is Entry  BreakpointToggleAction getToggleState IJavaBreakpoint getToggleState IJavaBreakpoint CoreException IJavaMethodBreakpoint isEntry
see Breakpoint Toggle Action do Action I Java Breakpoint public void do Action I Java Breakpoint breakpoint throws Core Exception I Java Method Breakpoint breakpoint set Entry I Java Method Breakpoint breakpoint is Entry  BreakpointToggleAction doAction IJavaBreakpoint doAction IJavaBreakpoint CoreException IJavaMethodBreakpoint setEntry IJavaMethodBreakpoint isEntry
see Breakpoint Toggle Action is Enabled For I Structured Selection public boolean is Enabled For I Structured Selection selection Iterator iter selection iterator while iter has Next Object element iter next if element instanceof I Java Method Breakpoint return false return true  BreakpointToggleAction isEnabledFor IStructuredSelection isEnabledFor IStructuredSelection hasNext IJavaMethodBreakpoint

private I Debug Model Presentation f Presentation public Evaluate Action super  IDebugModelPresentation fPresentation EvaluateAction
Returns the object context for this evaluation or code null code if none If the evaluation is being performed in the context of the variables view inspector Then perform the evaluation in the context of the selected value return Java object or code null code protected I Java Object get Object Context I Workbench Page page JDI DebugUI Plugin get Active Page if page null I Workbench Part active Part page get Active Part if active Part null I Debug View a I Debug View active Part get Adapter I Debug View class if a null if a get Viewer null I Selection s a get Viewer get Selection if s instanceof I Structured Selection I Structured Selection structured Selection I Structured Selection s if structured Selection size 1 Object selection structured Selection get First Element if selection instanceof I Java Variable I Java Variable var I Java Variable selection if this is selected use stack frame context try if var get Name equals this NON NLS 1 I Value value var get Value if value instanceof I Java Object value instanceof I Java Array return I Java Object value catch Debug Exception e JDI DebugUI Plugin log e else if selection instanceof Java Inspect Expression I Value value Java Inspect Expression selection get Value if value instanceof I Java Object value instanceof I Java Array return I Java Object value return null  IJavaObject getObjectContext IWorkbenchPage JDIDebugUIPlugin getActivePage IWorkbenchPart activePart getActivePart activePart IDebugView IDebugView activePart getAdapter IDebugView getViewer ISelection getViewer getSelection IStructuredSelection IStructuredSelection structuredSelection IStructuredSelection structuredSelection structuredSelection getFirstElement IJavaVariable IJavaVariable IJavaVariable getName IValue getValue IJavaObject IJavaArray IJavaObject DebugException JDIDebugUIPlugin JavaInspectExpression IValue JavaInspectExpression getValue IJavaObject IJavaArray IJavaObject
Finds the currently selected stack frame in the UI Stack frames from a scrapbook launch are ignored protected I Java Stack Frame get Stack Frame Context I Workbench Part part get Target Part I Java Stack Frame frame null if part null frame Evaluation Context Manager get Evaluation Context get Window else frame Evaluation Context Manager get Evaluation Context part return frame  IJavaStackFrame getStackFrameContext IWorkbenchPart getTargetPart IJavaStackFrame EvaluationContextManager getEvaluationContext getWindow EvaluationContextManager getEvaluationContext
see I Evaluation Listener evaluation Complete I Evaluation Result public void evaluation Complete final I Evaluation Result result if plug in has shutdown ignore see bug 8693 if JDI DebugUI Plugin get Default null return final I Java Value value result get Value if result has Errors value null final Display display JDI DebugUI Plugin get Standard Display if display is Disposed return display Result result  IEvaluationListener evaluationComplete IEvaluationResult evaluationComplete IEvaluationResult JDIDebugUIPlugin getDefault IJavaValue getValue hasErrors JDIDebugUIPlugin getStandardDisplay isDisposed displayResult
protected void evaluation Cleanup set Evaluating false set Target Part f New Target Part  evaluationCleanup setEvaluating setTargetPart fNewTargetPart
set Target Part f New Target Part Display the given evaluation result abstract protected void display Result I Evaluation Result result  setTargetPart fNewTargetPart displayResult IEvaluationResult
protected void run eval in context of object or stack frame I Java Object object get Object Context I Java Stack Frame stack Frame get Stack Frame Context if stack Frame null report Error Action Messages get String Evaluate error message stack frame context NON NLS 1 return check for nested evaluation I Java Thread thread I Java Thread stack Frame get Thread if thread is Performing Evaluation report Error Action Messages get String Evaluate Action Cannot perform nested evaluations  1 NON NLS 1 return set New Target Part get Target Part if stack Frame is Suspended I Java Element java Element get Java Element stack Frame if java Element null I Java Project project java Element get Java Project I Evaluation Engine engine null try Object selection get Selected Object if selection instanceof String return String expression String selection engine JDI DebugUI Plugin get Default get Evaluation Engine project I Java Debug Target stack Frame get Debug Target set Evaluating true boolean hit Breakpoints JDI Debug Model get Preferences get Boolean JDI Debug Model PREF SUSPEND FOR BREAKPOINTS DURING EVALUATION if object null engine evaluate expression stack Frame this Debug Event EVALUATION hit Breakpoints else engine evaluate expression object I Java Thread stack Frame get Thread this Debug Event EVALUATION hit Breakpoints return catch Core Exception e report Error get Exception Message e else report Error Action Messages get String Evaluate error message src context NON NLS 1 else thread not suspended report Error Action Messages get String Evaluate Action Thread not suspended   unable to perform evaluation  1 NON NLS 1 evaluation Cleanup  IJavaObject getObjectContext IJavaStackFrame stackFrame getStackFrameContext stackFrame reportError ActionMessages getString stack_frame_context IJavaThread IJavaThread stackFrame getThread isPerformingEvaluation reportError ActionMessages getString EvaluateAction Cannot_perform_nested_evaluations _1 setNewTargetPart getTargetPart stackFrame isSuspended IJavaElement javaElement getJavaElement stackFrame javaElement IJavaProject javaElement getJavaProject IEvaluationEngine getSelectedObject JDIDebugUIPlugin getDefault getEvaluationEngine IJavaDebugTarget stackFrame getDebugTarget setEvaluating hitBreakpoints JDIDebugModel getPreferences getBoolean JDIDebugModel PREF_SUSPEND_FOR_BREAKPOINTS_DURING_EVALUATION stackFrame DebugEvent hitBreakpoints IJavaThread stackFrame getThread DebugEvent hitBreakpoints CoreException reportError getExceptionMessage reportError ActionMessages getString src_context reportError ActionMessages getString EvaluateAction Thread_not_suspended_ _unable_to_perform_evaluation _1 evaluationCleanup
protected I Java Element get Java Element I Stack Frame stack Frame Get the corresponding element I Launch launch stack Frame get Launch if launch null return null I Source Locator locator launch get Source Locator if locator null return null Object source Element locator get Source Element stack Frame if source Element instanceof I Java Element return I Java Element source Element else if source Element instanceof I Resource I Java Project project Java Core create I Resource source Element get Project if project exists return project return null  IJavaElement getJavaElement IStackFrame stackFrame ILaunch stackFrame getLaunch ISourceLocator getSourceLocator sourceElement getSourceElement stackFrame sourceElement IJavaElement IJavaElement sourceElement sourceElement IResource IJavaProject JavaCore IResource sourceElement getProject
Updates the enabled state of the action that this is a delegate for protected void update I Action action get Action if action null resolve Selected Object  IAction getAction resolveSelectedObject
Resolves the selected object in the target part or code null code if there is no selection protected void resolve Selected Object Object selected Object null f Region null I Selection selection get Target Selection if selection instanceof I Text Selection I Text Selection ts I Text Selection selection String text ts get Text if text Has Content text selected Object text f Region new Region ts get Offset ts get Length else if get Target Part instanceof I Editor Part I Editor Part editor I Editor Part get Target Part if editor instanceof I Text Editor selected Object resolve Selected Object Using Token selected Object ts editor else if selection instanceof I Structured Selection if selection is Empty if get Target Part get Site get Id equals I DebugUI Constants ID DEBUG VIEW work on the editor selection I Editor Part editor get Target Part get Site get Page get Active Editor set Target Part editor selection get Target Selection if selection instanceof I Text Selection I Text Selection ts I Text Selection selection String text ts get Text if text Has Content text selected Object text else if editor instanceof I Text Editor selected Object resolve Selected Object Using Token selected Object ts editor else I Structured Selection ss I Structured Selection selection Iterator elements ss iterator while elements has Next if elements next instanceof I Java Variable set Selected Object null return selected Object ss set Selected Object selected Object  resolveSelectedObject selectedObject fRegion ISelection getTargetSelection ITextSelection ITextSelection ITextSelection getText textHasContent selectedObject fRegion getOffset getLength getTargetPart IEditorPart IEditorPart IEditorPart getTargetPart ITextEditor selectedObject resolveSelectedObjectUsingToken selectedObject IStructuredSelection isEmpty getTargetPart getSite getId IDebugUIConstants ID_DEBUG_VIEW IEditorPart getTargetPart getSite getPage getActiveEditor setTargetPart getTargetSelection ITextSelection ITextSelection ITextSelection getText textHasContent selectedObject ITextEditor selectedObject resolveSelectedObjectUsingToken selectedObject IStructuredSelection IStructuredSelection hasNext IJavaVariable setSelectedObject selectedObject setSelectedObject selectedObject
private Object resolve Selected Object Using Token Object selected Object I Text Selection ts I Editor Part editor I Text Editor text Editor I Text Editor editor I Document doc text Editor get Document Provider get Document editor get Editor Input f Region Java Word Finder find Word doc ts get Offset if f Region null try selected Object doc get f Region get Offset f Region get Length catch Bad Location Exception e return selected Object  resolveSelectedObjectUsingToken selectedObject ITextSelection IEditorPart ITextEditor textEditor ITextEditor IDocument textEditor getDocumentProvider getDocument getEditorInput fRegion JavaWordFinder findWord getOffset fRegion selectedObject fRegion getOffset fRegion getLength BadLocationException selectedObject
protected I Selection get Target Selection I Workbench Part part get Target Part if part null I Selection Provider provider part get Site get Selection Provider if provider null return provider get Selection return null  ISelection getTargetSelection IWorkbenchPart getTargetPart ISelectionProvider getSite getSelectionProvider getSelection
Resolve an editor input from the source element of the stack frame argument and return whether it s equal to the editor input for the editor that owns this action protected boolean compare To Editor Input I Stack Frame stack Frame I Launch launch stack Frame get Launch if launch null return false I Source Locator locator launch get Source Locator if locator null return false Object source Element locator get Source Element stack Frame if source Element null return false I Editor Input sf Editor Input get Debug Model Presentation get Editor Input source Element if get Target Part instanceof I Editor Part return I Editor Part get Target Part get Editor Input equals sf Editor Input return false  compareToEditorInput IStackFrame stackFrame ILaunch stackFrame getLaunch ISourceLocator getSourceLocator sourceElement getSourceElement stackFrame sourceElement IEditorInput sfEditorInput getDebugModelPresentation getEditorInput sourceElement getTargetPart IEditorPart IEditorPart getTargetPart getEditorInput sfEditorInput
protected Shell get Shell if get Target Part null return get Target Part get Site get Shell else return JDI DebugUI Plugin get Active Workbench Shell  getShell getTargetPart getTargetPart getSite getShell JDIDebugUIPlugin getActiveWorkbenchShell
protected I Data Display get Data Display I Data Display display get Direct Data Display if display null return display I Workbench Page page JDI DebugUI Plugin get Active Page if page null I Workbench Part active Part page get Active Part if active Part null I View Part view page find View I Java DebugUI Constants ID DISPLAY VIEW if view null try view page show View I Java DebugUI Constants ID DISPLAY VIEW catch Part Init Exception e JDI DebugUI Plugin error Dialog Action Messages get String Evaluate Action Cannot open Display view e NON NLS 1 finally page activate active Part if view null page bring To Top view return I Data Display view get Adapter I Data Display class return null  IDataDisplay getDataDisplay IDataDisplay getDirectDataDisplay IWorkbenchPage JDIDebugUIPlugin getActivePage IWorkbenchPart activePart getActivePart activePart IViewPart findView IJavaDebugUIConstants ID_DISPLAY_VIEW showView IJavaDebugUIConstants ID_DISPLAY_VIEW PartInitException JDIDebugUIPlugin errorDialog ActionMessages getString EvaluateAction Cannot_open_Display_view activePart bringToTop IDataDisplay getAdapter IDataDisplay
protected I Data Display get Direct Data Display I Workbench Part part get Target Part if part null I Data Display display I Data Display part get Adapter I Data Display class if display null I Workbench Page page JDI DebugUI Plugin get Active Page if page null I Workbench Part active Part page get Active Part if active Part null if active Part part page activate part return display I Workbench Page page JDI DebugUI Plugin get Active Page if page null I Workbench Part active Part page get Active Part if active Part null I Data Display display I Data Display active Part get Adapter I Data Display class if display null return display return null  IDataDisplay getDirectDataDisplay IWorkbenchPart getTargetPart IDataDisplay IDataDisplay getAdapter IDataDisplay IWorkbenchPage JDIDebugUIPlugin getActivePage IWorkbenchPart activePart getActivePart activePart activePart IWorkbenchPage JDIDebugUIPlugin getActivePage IWorkbenchPart activePart getActivePart activePart IDataDisplay IDataDisplay activePart getAdapter IDataDisplay
protected boolean text Has Content String text if text null int length text length if length 0 for int i 0 i length i if Character is Letter Or Digit text char At i return true return false  textHasContent isLetterOrDigit charAt
Displays a failed evaluation message in the data display protected void report Errors I Evaluation Result result String message get Error Message result report Error message  reportErrors IEvaluationResult getErrorMessage reportError
protected void report Error String message I Data Display data Display get Direct Data Display if data Display null if message length 0 data Display display Expression Value Message Format format Action Messages get String Evaluate Action evaluation failed  Reason new String format message NON NLS 1 else data Display display Expression Value Action Messages get String Evaluate Action evaluation failed  1 NON NLS 1 else Status status new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Status ERROR message null Error Dialog open Error get Shell Action Messages get String Evaluate error title eval problems null status NON NLS 1  reportError IDataDisplay dataDisplay getDirectDataDisplay dataDisplay dataDisplay displayExpressionValue MessageFormat ActionMessages getString EvaluateAction evaluation_failed _Reason dataDisplay displayExpressionValue ActionMessages getString EvaluateAction evaluation_failed _1 IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus ErrorDialog openError getShell ActionMessages getString eval_problems
private String format String message String Buffer result new String Buffer int index 0 pos while pos message index Of n index 1 result append t t append message substring index index pos 1 NON NLS 1 if index message length result append t t append message substring index NON NLS 1 return result to String  StringBuffer StringBuffer indexOf toString
protected String get Exception Message Throwable exception if exception instanceof Core Exception Core Exception ce Core Exception exception Throwable throwable ce get Status get Exception if throwable instanceof com sun jdi Invocation Exception return get Invocation Exception Message com sun jdi Invocation Exception throwable else if throwable instanceof Core Exception Traverse nested Core Exceptions return get Exception Message throwable return ce get Status get Message String message Message Format format Action Messages get String Evaluate error message direct exception new Object exception get Class NON NLS 1 if exception get Message null message Message Format format Action Messages get String Evaluate error message exception pattern new Object message exception get Message NON NLS 1 return message  getExceptionMessage CoreException CoreException CoreException getStatus getException InvocationException getInvocationExceptionMessage InvocationException CoreException CoreExceptions getExceptionMessage getStatus getMessage MessageFormat ActionMessages getString direct_exception getClass getMessage MessageFormat ActionMessages getString getMessage
Returns a message for the exception wrapped in an invocation exception protected String get Invocation Exception Message com sun jdi Invocation Exception exception Invocation Exception ie exception Object Reference ref ie exception return Message Format format Action Messages get String Evaluate error message wrapped exception new Object ref reference Type name NON NLS 1  getInvocationExceptionMessage InvocationException InvocationException ObjectReference MessageFormat ActionMessages getString wrapped_exception referenceType
protected String get Error Message I Evaluation Result result String errors result get Error Messages if errors length 0 return get Exception Message result get Exception else return get Error Message errors  getErrorMessage IEvaluationResult getErrorMessages getExceptionMessage getException getErrorMessage
protected String get Error Message String errors String message NON NLS 1 for int i 0 i errors length i String msg errors i if i 0 message msg else message Message Format format Action Messages get String Evaluate error problem append pattern new Object message msg NON NLS 1 return message  getErrorMessage MessageFormat ActionMessages getString problem_append_pattern
see org eclipse ui I Action Delegate run I Action public void run I Action action update run  IActionDelegate IAction IAction
see org eclipse ui I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection set Action action  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection setAction
see I Workbench Window Action Delegate dispose public void dispose dispose Debug Model Presentation I Workbench Window win get Window if win null win get Part Service remove Part Listener this  IWorkbenchWindowActionDelegate disposeDebugModelPresentation IWorkbenchWindow getWindow getPartService removePartListener
see I Workbench Window Action Delegate init I Workbench Window public void init I Workbench Window window set Window window I Workbench Page page window get Active Page if page null set Target Part page get Active Part window get Part Service add Part Listener this update  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow setWindow IWorkbenchPage getActivePage setTargetPart getActivePart getPartService addPartListener
protected I Action get Action return f Action  IAction getAction fAction
protected void set Action I Action action f Action action  setAction IAction fAction
Returns a debug model presentation creating one if necessary return debug model presentation protected I Debug Model Presentation get Debug Model Presentation if f Presentation null f Presentation DebugUI Tools new Debug Model Presentation JDI Debug Model get Plugin Identifier return f Presentation  IDebugModelPresentation getDebugModelPresentation fPresentation fPresentation DebugUITools newDebugModelPresentation JDIDebugModel getPluginIdentifier fPresentation
Disposes this action s debug model presentation if one was created protected void dispose Debug Model Presentation if f Presentation null f Presentation dispose  disposeDebugModelPresentation fPresentation fPresentation
see I Editor Action Delegate set Active Editor I Action I Editor Part public void set Active Editor I Action action I Editor Part target Editor set Action action set Target Part target Editor  IEditorActionDelegate setActiveEditor IAction IEditorPart setActiveEditor IAction IEditorPart targetEditor setAction setTargetPart targetEditor
see I Part Listener part Activated I Workbench Part public void part Activated I Workbench Part part set Target Part part  IPartListener partActivated IWorkbenchPart partActivated IWorkbenchPart setTargetPart
see I Part Listener part Brought To Top I Workbench Part public void part Brought To Top I Workbench Part part  IPartListener partBroughtToTop IWorkbenchPart partBroughtToTop IWorkbenchPart
see I Part Listener part Closed I Workbench Part public void part Closed I Workbench Part part if part get Target Part set Target Part null if part get New Target Part set New Target Part null  IPartListener partClosed IWorkbenchPart partClosed IWorkbenchPart getTargetPart setTargetPart getNewTargetPart setNewTargetPart
see I Part Listener part Deactivated I Workbench Part public void part Deactivated I Workbench Part part  IPartListener partDeactivated IWorkbenchPart partDeactivated IWorkbenchPart
see I Part Listener part Opened I Workbench Part public void part Opened I Workbench Part part  IPartListener partOpened IWorkbenchPart partOpened IWorkbenchPart
see I View Action Delegate init I View Part public void init I View Part view set Target Part view  IViewActionDelegate IViewPart IViewPart setTargetPart
protected I Workbench Part get Target Part return f Target Part  IWorkbenchPart getTargetPart fTargetPart
protected void set Target Part I Workbench Part part if is Evaluating do not want to change the target part while evaluating see bug 8334 set New Target Part part else if get Target Part instanceof Java Snippet Editor Java Snippet Editor get Target Part remove Snippet State Changed Listener this f Target Part part if part instanceof Java Snippet Editor Java Snippet Editor part add Snippet State Changed Listener this  setTargetPart IWorkbenchPart isEvaluating setNewTargetPart getTargetPart JavaSnippetEditor JavaSnippetEditor getTargetPart removeSnippetStateChangedListener fTargetPart JavaSnippetEditor JavaSnippetEditor addSnippetStateChangedListener
protected I Workbench Window get Window return f Window  IWorkbenchWindow getWindow fWindow
protected void set Window I Workbench Window window f Window window  setWindow IWorkbenchWindow fWindow
see I Object Action Delegate set Active Part I Action I Workbench Part public void set Active Part I Action action I Workbench Part target Part set Action action set Target Part target Part update  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart setAction setTargetPart targetPart
protected Object get Selected Object return f Selection  getSelectedObject fSelection
protected void set Selected Object Object selection f Selection selection  setSelectedObject fSelection
see I Snippet State Changed Listener snippet State Changed Java Snippet Editor public void snippet State Changed Java Snippet Editor editor if editor null editor is Evaluating editor get File null update else get Action set Enabled false  ISnippetStateChangedListener snippetStateChanged JavaSnippetEditor snippetStateChanged JavaSnippetEditor isEvaluating getFile getAction setEnabled
protected I Workbench Part get New Target Part return f New Target Part  IWorkbenchPart getNewTargetPart fNewTargetPart
protected void set New Target Part I Workbench Part new Target Part f New Target Part new Target Part  setNewTargetPart IWorkbenchPart newTargetPart fNewTargetPart newTargetPart
protected boolean is Evaluating return f Evaluating  isEvaluating fEvaluating
protected void set Evaluating boolean evaluating f Evaluating evaluating  setEvaluating fEvaluating
Returns the selected text region or code null code if none return protected I Region get Region return f Region  IRegion getRegion fRegion

see Breakpoint Toggle Action get Toggle State I Java Breakpoint protected boolean get Toggle State I Java Breakpoint breakpoint throws Core Exception will only be called after is Enabled For so cast is safe I Java Exception Breakpoint exception I Java Exception Breakpoint breakpoint return exception is Caught  BreakpointToggleAction getToggleState IJavaBreakpoint getToggleState IJavaBreakpoint CoreException isEnabledFor IJavaExceptionBreakpoint IJavaExceptionBreakpoint isCaught
see Breakpoint Toggle Action do Action I Java Breakpoint public void do Action I Java Breakpoint breakpoint throws Core Exception will only be called after is Enabled For so cast is safe I Java Exception Breakpoint exception I Java Exception Breakpoint breakpoint exception set Caught exception is Caught  BreakpointToggleAction doAction IJavaBreakpoint doAction IJavaBreakpoint CoreException isEnabledFor IJavaExceptionBreakpoint IJavaExceptionBreakpoint setCaught isCaught
see Breakpoint Toggle Action is Enabled For I Structured Selection public boolean is Enabled For I Structured Selection selection Iterator iter selection iterator while iter has Next Object element iter next if element instanceof I Java Exception Breakpoint return false return true  BreakpointToggleAction isEnabledFor IStructuredSelection isEnabledFor IStructuredSelection hasNext IJavaExceptionBreakpoint

see Breakpoint Toggle Action get Toggle State I Java Breakpoint protected boolean get Toggle State I Java Breakpoint breakpoint throws Core Exception will only be called after is Enabled For so cast is safe I Java Exception Breakpoint exception I Java Exception Breakpoint breakpoint return exception is Uncaught  BreakpointToggleAction getToggleState IJavaBreakpoint getToggleState IJavaBreakpoint CoreException isEnabledFor IJavaExceptionBreakpoint IJavaExceptionBreakpoint isUncaught
see Breakpoint Toggle Action do Action I Java Breakpoint public void do Action I Java Breakpoint breakpoint throws Core Exception will only be called after is Enabled For so cast is safe I Java Exception Breakpoint exception I Java Exception Breakpoint breakpoint exception set Uncaught exception is Uncaught  BreakpointToggleAction doAction IJavaBreakpoint doAction IJavaBreakpoint CoreException isEnabledFor IJavaExceptionBreakpoint IJavaExceptionBreakpoint setUncaught isUncaught
see Breakpoint Toggle Action is Enabled For I Structured Selection public boolean is Enabled For I Structured Selection selection Iterator iter selection iterator while iter has Next Object element iter next if element instanceof I Java Exception Breakpoint return false return true  BreakpointToggleAction isEnabledFor IStructuredSelection isEnabledFor IStructuredSelection hasNext IJavaExceptionBreakpoint

see I Action Delegate run I Action public void run I Action action I Structured Selection selection get Current Selection if selection null return Iterator itr selection iterator while itr has Next I Java Thread thread I Java Thread itr next try I Breakpoint breakpoints thread get Breakpoints I Java Stack Frame frame I Java Stack Frame thread get Top Stack Frame String new Filter frame get Declaring Type Name for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if breakpoint instanceof I Java Exception Breakpoint I Java Exception Breakpoint ex Breakpoint I Java Exception Breakpoint breakpoint String current ex Breakpoint get Exclusion Filters String new Filters new String current length 1 System arraycopy current 0 new Filters 0 current length new Filters current length new Filter ex Breakpoint set Exclusion Filters new Filters action set Enabled false catch Core Exception de JDI DebugUI Plugin log de  IActionDelegate IAction IAction IStructuredSelection getCurrentSelection hasNext IJavaThread IJavaThread IBreakpoint getBreakpoints IJavaStackFrame IJavaStackFrame getTopStackFrame newFilter getDeclaringTypeName IBreakpoint IJavaExceptionBreakpoint IJavaExceptionBreakpoint exBreakpoint IJavaExceptionBreakpoint exBreakpoint getExclusionFilters newFilters newFilters newFilters newFilter exBreakpoint setExclusionFilters newFilters setEnabled CoreException JDIDebugUIPlugin

display async Exec new Runnable public void run if display is Disposed return report Errors result evaluation Cleanup  asyncExec isDisposed reportErrors evaluationCleanup
see org eclipse jdt internal debug ui actions Evaluate Action display Result org eclipse jdt debug eval I Evaluation Result protected void display Result final I Evaluation Result result if result has Errors final Display display JDI DebugUI Plugin get Standard Display display async Exec new Runnable public void run if display is Disposed return report Errors result evaluation Cleanup else evaluation Cleanup  EvaluateAction displayResult IEvaluationResult displayResult IEvaluationResult hasErrors JDIDebugUIPlugin getStandardDisplay asyncExec isDisposed reportErrors evaluationCleanup evaluationCleanup
see org eclipse jdt internal debug ui actions Evaluate Action run protected void run I Workbench Part part get Target Part if part instanceof Java Snippet Editor Java Snippet Editor part eval Selection Java Snippet Editor RESULT RUN return super run  EvaluateAction IWorkbenchPart getTargetPart JavaSnippetEditor JavaSnippetEditor evalSelection JavaSnippetEditor RESULT_RUN
see org eclipse jdt internal debug ui actions Evaluate Action get Data Display protected I Data Display get Data Display return super get Direct Data Display  EvaluateAction getDataDisplay IDataDisplay getDataDisplay getDirectDataDisplay

see Breakpoint Toggle Action get Toggle State I Java Breakpoint protected boolean get Toggle State I Java Breakpoint breakpoint throws Core Exception return I Java Method Breakpoint breakpoint is Exit  BreakpointToggleAction getToggleState IJavaBreakpoint getToggleState IJavaBreakpoint CoreException IJavaMethodBreakpoint isExit
see Breakpoint Toggle Action do Action I Java Breakpoint public void do Action I Java Breakpoint breakpoint throws Core Exception I Java Method Breakpoint breakpoint set Exit I Java Method Breakpoint breakpoint is Exit  BreakpointToggleAction doAction IJavaBreakpoint doAction IJavaBreakpoint CoreException IJavaMethodBreakpoint setExit IJavaMethodBreakpoint isExit
see Breakpoint Toggle Action is Enabled For I Structured Selection public boolean is Enabled For I Structured Selection selection Iterator iter selection iterator while iter has Next Object element iter next if element instanceof I Java Method Breakpoint return false return true  BreakpointToggleAction isEnabledFor IStructuredSelection isEnabledFor IStructuredSelection hasNext IJavaMethodBreakpoint

display async Exec new Runnable public void run if display is Disposed show Expression View Java Inspect Expression exp new Java Inspect Expression result Debug Plugin get Default get Expression Manager add Expression exp evaluation Cleanup  asyncExec isDisposed showExpressionView JavaInspectExpression JavaInspectExpression DebugPlugin getDefault getExpressionManager addExpression evaluationCleanup
see Evaluate Action display Result I Evaluation Result protected void display Result final I Evaluation Result result final Display display JDI DebugUI Plugin get Standard Display display async Exec new Runnable public void run if display is Disposed show Expression View Java Inspect Expression exp new Java Inspect Expression result Debug Plugin get Default get Expression Manager add Expression exp evaluation Cleanup  EvaluateAction displayResult IEvaluationResult displayResult IEvaluationResult JDIDebugUIPlugin getStandardDisplay asyncExec isDisposed showExpressionView JavaInspectExpression JavaInspectExpression DebugPlugin getDefault getExpressionManager addExpression evaluationCleanup
Make the expression view visible or open one if required protected void show Expression View if get Target Part get Site get Id equals I DebugUI Constants ID EXPRESSION VIEW return I Workbench Page page JDI DebugUI Plugin get Active Page if page null I View Part part page find View I DebugUI Constants ID EXPRESSION VIEW if part null try page show View I DebugUI Constants ID EXPRESSION VIEW catch Part Init Exception e report Error e get Status get Message else page bring To Top part  showExpressionView getTargetPart getSite getId IDebugUIConstants ID_EXPRESSION_VIEW IWorkbenchPage JDIDebugUIPlugin getActivePage IViewPart findView IDebugUIConstants ID_EXPRESSION_VIEW showView IDebugUIConstants ID_EXPRESSION_VIEW PartInitException reportError getStatus getMessage bringToTop
protected void run I Workbench Part part get Target Part if part instanceof Java Snippet Editor Java Snippet Editor part eval Selection Java Snippet Editor RESULT INSPECT return Object selection get Selected Object if selection instanceof I Structured Selection super run return inspecting from the context of the variables view Iterator variables I Structured Selection selection iterator while variables has Next I Java Variable var I Java Variable variables next try Java Inspect Expression expr new Java Inspect Expression var get Name I Java Value var get Value Debug Plugin get Default get Expression Manager add Expression expr catch Debug Exception e JDI DebugUI Plugin error Dialog Action Messages get String Inspect Action Exception occurred inspecting variable e NON NLS 1 show Expression View  IWorkbenchPart getTargetPart JavaSnippetEditor JavaSnippetEditor evalSelection JavaSnippetEditor RESULT_INSPECT getSelectedObject IStructuredSelection IStructuredSelection hasNext IJavaVariable IJavaVariable JavaInspectExpression JavaInspectExpression getName IJavaValue getValue DebugPlugin getDefault getExpressionManager addExpression DebugException JDIDebugUIPlugin errorDialog ActionMessages getString InspectAction Exception_occurred_inspecting_variable showExpressionView
protected I Data Display get Data Display return get Direct Data Display  IDataDisplay getDataDisplay getDirectDataDisplay

public Instance Filter Dialog Shell parent Shell Object input I Structured Content Provider content Provider I Label Provider label Provider String message super parent Shell input content Provider label Provider message  InstanceFilterDialog parentShell IStructuredContentProvider contentProvider ILabelProvider labelProvider parentShell contentProvider labelProvider
protected Control create Dialog Area Composite parent Control control super create Dialog Area parent Workbench Help set Help parent I Java Debug Help Context Ids INSTANCE BREAKPOINT SELECTION DIALOG return control  createDialogArea createDialogArea WorkbenchHelp setHelp IJavaDebugHelpContextIds INSTANCE_BREAKPOINT_SELECTION_DIALOG
final List breakpoints get Applicable Breakpoints var object I Structured Content Provider content new I Structured Content Provider public void dispose  getApplicableBreakpoints IStructuredContentProvider IStructuredContentProvider
public void dispose public Object get Elements Object input return breakpoints to Array  getElements toArray
public void input Changed Viewer viewer Object a Object b  inputChanged
List Selection Dialog dialog new Instance Filter Dialog JDI DebugUI Plugin get Active Workbench Shell breakpoints content model Presentation Message Format format Action Messages get String Instance Filters Action 1 new String var get Name NON NLS 1 public void ok Pressed check if breakpoints have already been restricted to other objects Object check Breakpoint get Viewer get Checked Elements for int k 0 k check Breakpoint length k I Java Breakpoint breakpoint I Java Breakpoint check Breakpoint k try I Java Object instance Filters breakpoint get Instance Filters boolean same Target false for int i 0 i instance Filters length i I Java Object instance Filter instance Filters i if instance Filter get Debug Target equals object get Debug Target same Target true break if same Target Message Dialog message Dialog new Message Dialog JDI DebugUI Plugin get Active Workbench Shell Action Messages get String Instance Filters Action 2 NON NLS 1 null Message Format format Action Messages get String Instance Filters Action 3 new String model Presentation get Text breakpoint var get Name NON NLS 1 Message Dialog QUESTION new String Action Messages get String Instance Filters Action Yes 2 Action Messages get String Instance Filters Action Cancel 3 NON NLS 1 NON NLS 2 0 if message Dialog open Window OK for int i 0 i instance Filters length i breakpoint remove Instance Filter instance Filters i else if cancel do not close the instance filter dialog return catch Core Exception e JDI DebugUI Plugin log e super ok Pressed  ListSelectionDialog InstanceFilterDialog JDIDebugUIPlugin getActiveWorkbenchShell modelPresentation MessageFormat ActionMessages getString InstanceFiltersAction getName okPressed checkBreakpoint getViewer getCheckedElements checkBreakpoint IJavaBreakpoint IJavaBreakpoint checkBreakpoint IJavaObject instanceFilters getInstanceFilters sameTarget instanceFilters IJavaObject instanceFilter instanceFilters instanceFilter getDebugTarget getDebugTarget sameTarget sameTarget MessageDialog messageDialog MessageDialog JDIDebugUIPlugin getActiveWorkbenchShell ActionMessages getString InstanceFiltersAction MessageFormat ActionMessages getString InstanceFiltersAction modelPresentation getText getName MessageDialog ActionMessages getString InstanceFiltersAction Yes_2 ActionMessages getString InstanceFiltersAction Cancel_3 messageDialog instanceFilters removeInstanceFilter instanceFilters CoreException JDIDebugUIPlugin okPressed
see org eclipse ui I Action Delegate run I Action public void run I Action action I Structured Selection selection get Current Selection if selection null selection size 1 return Object o selection get First Element if o instanceof I Java Variable final I Java Variable var I Java Variable o try I Value value var get Value if value instanceof I Java Object final I Java Object object I Java Object value final List breakpoints get Applicable Breakpoints var object I Structured Content Provider content new I Structured Content Provider public void dispose public Object get Elements Object input return breakpoints to Array public void input Changed Viewer viewer Object a Object b final I Debug Model Presentation model Presentation DebugUI Tools new Debug Model Presentation List Selection Dialog dialog new Instance Filter Dialog JDI DebugUI Plugin get Active Workbench Shell breakpoints content model Presentation Message Format format Action Messages get String Instance Filters Action 1 new String var get Name NON NLS 1 public void ok Pressed check if breakpoints have already been restricted to other objects Object check Breakpoint get Viewer get Checked Elements for int k 0 k check Breakpoint length k I Java Breakpoint breakpoint I Java Breakpoint check Breakpoint k try I Java Object instance Filters breakpoint get Instance Filters boolean same Target false for int i 0 i instance Filters length i I Java Object instance Filter instance Filters i if instance Filter get Debug Target equals object get Debug Target same Target true break if same Target Message Dialog message Dialog new Message Dialog JDI DebugUI Plugin get Active Workbench Shell Action Messages get String Instance Filters Action 2 NON NLS 1 null Message Format format Action Messages get String Instance Filters Action 3 new String model Presentation get Text breakpoint var get Name NON NLS 1 Message Dialog QUESTION new String Action Messages get String Instance Filters Action Yes 2 Action Messages get String Instance Filters Action Cancel 3 NON NLS 1 NON NLS 2 0 if message Dialog open Window OK for int i 0 i instance Filters length i breakpoint remove Instance Filter instance Filters i else if cancel do not close the instance filter dialog return catch Core Exception e JDI DebugUI Plugin log e super ok Pressed dialog set Title Action Messages get String Instance Filters Action 2 NON NLS 1 determine initial selection List existing new Array List Iterator iter breakpoints iterator while iter has Next I Java Breakpoint bp I Java Breakpoint iter next I Java Object filters bp get Instance Filters for int i 0 i filters length i if filters i equals object existing add bp break dialog set Initial Selections existing to Array if dialog open Window OK Object selected Breakpoints dialog get Result if selected Breakpoints null add for int i 0 i selected Breakpoints length i I Java Breakpoint bp I Java Breakpoint selected Breakpoints i bp add Instance Filter object existing remove bp remove iter existing iterator while iter has Next I Java Breakpoint bp I Java Breakpoint iter next bp remove Instance Filter object else only allowed for objects catch Core Exception e JDI DebugUI Plugin log e  IActionDelegate IAction IAction IStructuredSelection getCurrentSelection getFirstElement IJavaVariable IJavaVariable IJavaVariable IValue getValue IJavaObject IJavaObject IJavaObject getApplicableBreakpoints IStructuredContentProvider IStructuredContentProvider getElements toArray inputChanged IDebugModelPresentation modelPresentation DebugUITools newDebugModelPresentation ListSelectionDialog InstanceFilterDialog JDIDebugUIPlugin getActiveWorkbenchShell modelPresentation MessageFormat ActionMessages getString InstanceFiltersAction getName okPressed checkBreakpoint getViewer getCheckedElements checkBreakpoint IJavaBreakpoint IJavaBreakpoint checkBreakpoint IJavaObject instanceFilters getInstanceFilters sameTarget instanceFilters IJavaObject instanceFilter instanceFilters instanceFilter getDebugTarget getDebugTarget sameTarget sameTarget MessageDialog messageDialog MessageDialog JDIDebugUIPlugin getActiveWorkbenchShell ActionMessages getString InstanceFiltersAction MessageFormat ActionMessages getString InstanceFiltersAction modelPresentation getText getName MessageDialog ActionMessages getString InstanceFiltersAction Yes_2 ActionMessages getString InstanceFiltersAction Cancel_3 messageDialog instanceFilters removeInstanceFilter instanceFilters CoreException JDIDebugUIPlugin okPressed setTitle ActionMessages getString InstanceFiltersAction ArrayList hasNext IJavaBreakpoint IJavaBreakpoint IJavaObject getInstanceFilters setInitialSelections toArray selectedBreakpoints getResult selectedBreakpoints selectedBreakpoints IJavaBreakpoint IJavaBreakpoint selectedBreakpoints addInstanceFilter hasNext IJavaBreakpoint IJavaBreakpoint removeInstanceFilter CoreException JDIDebugUIPlugin
protected List get Applicable Breakpoints I Java Variable variable I Java Object object List breakpoints new Array List try collect names in type hierarchy List super Type Names new Array List I Java Type type object get Java Type while type instanceof I Java Class Type super Type Names add type get Name type I Java Class Type type get Superclass I Breakpoint all Breakpoints Debug Plugin get Default get Breakpoint Manager get Breakpoints for int i 0 i all Breakpoints length i if all Breakpoints i instanceof I Java Breakpoint I Java Breakpoint jbp I Java Breakpoint all Breakpoints i I Java Breakpoint valid null if jbp instanceof I Java Watchpoint variable instanceof I Java Field Variable I Java Watchpoint wp I Java Watchpoint jbp I Java Field Variable fv I Java Field Variable variable if variable get Name equals wp get Field Name fv get Declaring Type get Name equals wp get Type Name valid wp else if super Type Names contains jbp get Type Name jbp instanceof I Java Exception Breakpoint valid jbp if valid null valid supports Instance Filters breakpoints add valid catch Core Exception e JDI DebugUI Plugin log e return breakpoints  getApplicableBreakpoints IJavaVariable IJavaObject ArrayList superTypeNames ArrayList IJavaType getJavaType IJavaClassType superTypeNames getName IJavaClassType getSuperclass IBreakpoint allBreakpoints DebugPlugin getDefault getBreakpointManager getBreakpoints allBreakpoints allBreakpoints IJavaBreakpoint IJavaBreakpoint IJavaBreakpoint allBreakpoints IJavaBreakpoint IJavaWatchpoint IJavaFieldVariable IJavaWatchpoint IJavaWatchpoint IJavaFieldVariable IJavaFieldVariable getName getFieldName getDeclaringType getName getTypeName superTypeNames getTypeName IJavaExceptionBreakpoint supportsInstanceFilters CoreException JDIDebugUIPlugin

Property Dialog Action property Action new Property Dialog Action JDI DebugUI Plugin get Active Workbench Shell new I Selection Provider public void add Selection Changed Listener I Selection Changed Listener listener  PropertyDialogAction propertyAction PropertyDialogAction JDIDebugUIPlugin getActiveWorkbenchShell ISelectionProvider addSelectionChangedListener ISelectionChangedListener
public void add Selection Changed Listener I Selection Changed Listener listener public I Selection get Selection return new Structured Selection get Breakpoint  addSelectionChangedListener ISelectionChangedListener ISelection getSelection StructuredSelection getBreakpoint
return new Structured Selection get Breakpoint public void remove Selection Changed Listener I Selection Changed Listener listener  StructuredSelection getBreakpoint removeSelectionChangedListener ISelectionChangedListener
public void remove Selection Changed Listener I Selection Changed Listener listener public void set Selection I Selection selection  removeSelectionChangedListener ISelectionChangedListener setSelection ISelection
see I Action Delegate run I Action public void run I Action action Property Dialog Action property Action new Property Dialog Action JDI DebugUI Plugin get Active Workbench Shell new I Selection Provider public void add Selection Changed Listener I Selection Changed Listener listener public I Selection get Selection return new Structured Selection get Breakpoint public void remove Selection Changed Listener I Selection Changed Listener listener public void set Selection I Selection selection property Action run  IActionDelegate IAction IAction PropertyDialogAction propertyAction PropertyDialogAction JDIDebugUIPlugin getActiveWorkbenchShell ISelectionProvider addSelectionChangedListener ISelectionChangedListener ISelection getSelection StructuredSelection getBreakpoint removeSelectionChangedListener ISelectionChangedListener setSelection ISelection propertyAction
see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection if ss is Empty ss size 1 return Object element ss get First Element if element instanceof I Java Breakpoint set Breakpoint I Java Breakpoint element  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection IStructuredSelection IStructuredSelection IStructuredSelection isEmpty getFirstElement IJavaBreakpoint setBreakpoint IJavaBreakpoint
protected I Workbench Part get Active Part return f Part  IWorkbenchPart getActivePart fPart
protected void set Active Part I Workbench Part part f Part part  setActivePart IWorkbenchPart fPart
protected I Java Breakpoint get Breakpoint return f Breakpoint  IJavaBreakpoint getBreakpoint fBreakpoint
public void set Breakpoint I Java Breakpoint breakpoint f Breakpoint breakpoint  setBreakpoint IJavaBreakpoint fBreakpoint
see I Object Action Delegate set Active Part I Action I Workbench Part public void set Active Part I Action action I Workbench Part target Part set Active Part target Part  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart setActivePart targetPart

Creates the action to enable disable breakpoints public Java Breakpoint Properties Ruler Action I Text Editor editor I Vertical Ruler Info info set Info info set Text Editor editor set Text Action Messages get String Java Breakpoint Properties Ruler Action Breakpoint  Properties 1 NON NLS 1  JavaBreakpointPropertiesRulerAction ITextEditor IVerticalRulerInfo setInfo setTextEditor setText ActionMessages getString JavaBreakpointPropertiesRulerAction Breakpoint_ Properties_1
Property Dialog Action action new Property Dialog Action get Text Editor get Editor Site get Shell new I Selection Provider public void add Selection Changed Listener I Selection Changed Listener listener  PropertyDialogAction PropertyDialogAction getTextEditor getEditorSite getShell ISelectionProvider addSelectionChangedListener ISelectionChangedListener
public void add Selection Changed Listener I Selection Changed Listener listener public I Selection get Selection return new Structured Selection get Breakpoint  addSelectionChangedListener ISelectionChangedListener ISelection getSelection StructuredSelection getBreakpoint
return new Structured Selection get Breakpoint public void remove Selection Changed Listener I Selection Changed Listener listener  StructuredSelection getBreakpoint removeSelectionChangedListener ISelectionChangedListener
public void remove Selection Changed Listener I Selection Changed Listener listener public void set Selection I Selection selection  removeSelectionChangedListener ISelectionChangedListener setSelection ISelection
see Action run public void run if get Breakpoint null Property Dialog Action action new Property Dialog Action get Text Editor get Editor Site get Shell new I Selection Provider public void add Selection Changed Listener I Selection Changed Listener listener public I Selection get Selection return new Structured Selection get Breakpoint public void remove Selection Changed Listener I Selection Changed Listener listener public void set Selection I Selection selection action run  getBreakpoint PropertyDialogAction PropertyDialogAction getTextEditor getEditorSite getShell ISelectionProvider addSelectionChangedListener ISelectionChangedListener ISelection getSelection StructuredSelection getBreakpoint removeSelectionChangedListener ISelectionChangedListener setSelection ISelection
see I Update update public void update set Breakpoint determine Breakpoint if get Breakpoint null get Breakpoint instanceof I Java Breakpoint set Breakpoint null set Enabled false return set Enabled true  IUpdate setBreakpoint determineBreakpoint getBreakpoint getBreakpoint IJavaBreakpoint setBreakpoint setEnabled setEnabled

see Abstract Ruler Action Delegate create Action I Text Editor I Vertical Ruler Info protected I Action create Action I Text Editor editor I Vertical Ruler Info ruler Info return new Java Breakpoint Properties Ruler Action editor ruler Info  AbstractRulerActionDelegate createAction ITextEditor IVerticalRulerInfo IAction createAction ITextEditor IVerticalRulerInfo rulerInfo JavaBreakpointPropertiesRulerAction rulerInfo

public Manage Breakpoint Ruler Action I Vertical Ruler Info ruler I Text Editor editor super Action Messages get String Manage Breakpoint Ruler Action label NON NLS 1 f Ruler ruler f Text Editor editor f Breakpoint Adapter new Toggle Breakpoint Adapter  ManageBreakpointRulerAction IVerticalRulerInfo ITextEditor ActionMessages getString ManageBreakpointRulerAction fRuler fTextEditor fBreakpointAdapter ToggleBreakpointAdapter
Disposes this action public void dispose f Text Editor null f Ruler null  fTextEditor fRuler
Returns this action s vertical ruler info return this action s vertical ruler protected I Vertical Ruler Info get Vertical Ruler Info return f Ruler  IVerticalRulerInfo getVerticalRulerInfo fRuler
Returns this action s editor return this action s editor protected I Text Editor get Text Editor return f Text Editor  ITextEditor getTextEditor fTextEditor
Returns the code I Document code of the editor s input return the document of the editor s input protected I Document get Document I Document Provider provider f Text Editor get Document Provider return provider get Document f Text Editor get Editor Input  IDocument IDocument getDocument IDocumentProvider fTextEditor getDocumentProvider getDocument fTextEditor getEditorInput
public void run try List list get Markers if list is Empty create new markers I Document document get Document int line Number get Vertical Ruler Info get Line Of Last Mouse Button Activity if line Number document get Number Of Lines return try I Region line document get Line Information line Number I Text Selection selection new Text Selection document line get Offset line get Length f Breakpoint Adapter toggle Line Breakpoints f Text Editor selection catch Bad Location Exception e likely document is folded so you cannot get the line information of the folded line else remove existing breakpoints of any type I Breakpoint Manager manager Debug Plugin get Default get Breakpoint Manager Iterator iterator list iterator while iterator has Next I Marker marker I Marker iterator next I Breakpoint breakpoint manager get Breakpoint marker if breakpoint null breakpoint delete catch Core Exception e JDI DebugUI Plugin error Dialog Action Messages get String Manage Breakpoint Ruler Action error adding message1 e NON NLS 1  getMarkers isEmpty IDocument getDocument lineNumber getVerticalRulerInfo getLineOfLastMouseButtonActivity lineNumber getNumberOfLines IRegion getLineInformation lineNumber ITextSelection TextSelection getOffset getLength fBreakpointAdapter toggleLineBreakpoints fTextEditor BadLocationException IBreakpointManager DebugPlugin getDefault getBreakpointManager hasNext IMarker IMarker IBreakpoint getBreakpoint CoreException JDIDebugUIPlugin errorDialog ActionMessages getString ManageBreakpointRulerAction
Returns a list of markers that exist at the current ruler location return a list of markers that exist at the current ruler location protected List get Markers List breakpoints new Array List I Resource resource Toggle Breakpoint Adapter get Resource f Text Editor I Document document get Document Abstract Marker Annotation Model model get Annotation Model if model null try I Marker markers null if resource instanceof I File markers resource find Markers I Breakpoint BREAKPOINT MARKER true I Resource DEPTH INFINITE else I Workspace Root root Resources Plugin get Workspace get Root markers root find Markers I Breakpoint BREAKPOINT MARKER true I Resource DEPTH INFINITE if markers null I Breakpoint Manager breakpoint Manager Debug Plugin get Default get Breakpoint Manager for int i 0 i markers length i I Breakpoint breakpoint breakpoint Manager get Breakpoint markers i if breakpoint null breakpoint Manager is Registered breakpoint includes Ruler Line model get Marker Position markers i document breakpoints add markers i catch Core Exception x JDI DebugUI Plugin log x get Status return breakpoints  getMarkers ArrayList IResource ToggleBreakpointAdapter getResource fTextEditor IDocument getDocument AbstractMarkerAnnotationModel getAnnotationModel IMarker IFile findMarkers IBreakpoint BREAKPOINT_MARKER IResource DEPTH_INFINITE IWorkspaceRoot ResourcesPlugin getWorkspace getRoot findMarkers IBreakpoint BREAKPOINT_MARKER IResource DEPTH_INFINITE IBreakpointManager breakpointManager DebugPlugin getDefault getBreakpointManager IBreakpoint breakpointManager getBreakpoint breakpointManager isRegistered includesRulerLine getMarkerPosition CoreException JDIDebugUIPlugin getStatus
Returns the code Abstract Marker Annotation Model code of the editor s input return the marker annotation model protected Abstract Marker Annotation Model get Annotation Model I Document Provider provider f Text Editor get Document Provider I Annotation Model model provider get Annotation Model f Text Editor get Editor Input if model instanceof Abstract Marker Annotation Model return Abstract Marker Annotation Model model return null  AbstractMarkerAnnotationModel AbstractMarkerAnnotationModel getAnnotationModel IDocumentProvider fTextEditor getDocumentProvider IAnnotationModel getAnnotationModel fTextEditor getEditorInput AbstractMarkerAnnotationModel AbstractMarkerAnnotationModel
Checks whether a position includes the ruler s line of activity param position the position to be checked param document the document the position refers to return code true code if the line is included by the given position protected boolean includes Ruler Line Position position I Document document if position null try int marker Line document get Line Of Offset position get Offset int line f Ruler get Line Of Last Mouse Button Activity if line marker Line return true catch Bad Location Exception x return false  includesRulerLine IDocument markerLine getLineOfOffset getOffset fRuler getLineOfLastMouseButtonActivity markerLine BadLocationException

see Abstract Ruler Action Delegate create Action protected I Action create Action I Text Editor editor I Vertical Ruler Info ruler Info target Action new Manage Breakpoint Ruler Action ruler Info editor return target Action  AbstractRulerActionDelegate createAction IAction createAction ITextEditor IVerticalRulerInfo rulerInfo targetAction ManageBreakpointRulerAction rulerInfo targetAction
public void set Active Editor I Action caller Action I Editor Part target Editor if active Editor null if target Action null target Action dispose target Action null active Editor target Editor super set Active Editor caller Action target Editor  setActiveEditor IAction callerAction IEditorPart targetEditor activeEditor targetAction targetAction targetAction activeEditor targetEditor setActiveEditor callerAction targetEditor

see Breakpoint Toggle Action get Toggle State I Java Breakpoint protected boolean get Toggle State I Java Breakpoint watchpoint throws Core Exception return I Java Watchpoint watchpoint is Modification  BreakpointToggleAction getToggleState IJavaBreakpoint getToggleState IJavaBreakpoint CoreException IJavaWatchpoint isModification
see Breakpoint Toggle Action do Action I Java Breakpoint public void do Action I Java Breakpoint watchpoint throws Core Exception I Java Watchpoint watchpoint set Modification I Java Watchpoint watchpoint is Modification  BreakpointToggleAction doAction IJavaBreakpoint doAction IJavaBreakpoint CoreException IJavaWatchpoint setModification IJavaWatchpoint isModification
see Breakpoint Toggle Action is Enabled For I Structured Selection public boolean is Enabled For I Structured Selection selection Iterator iter selection iterator while iter has Next Object element iter next if element instanceof I Java Watchpoint return false return true  BreakpointToggleAction isEnabledFor IStructuredSelection isEnabledFor IStructuredSelection hasNext IJavaWatchpoint

public class Move Down Action extends Runtime Classpath Action public Move Down Action I Classpath Viewer viewer super Action Messages get String Move Down Action M ove Down 1 viewer NON NLS 1  MoveDownAction RuntimeClasspathAction MoveDownAction IClasspathViewer ActionMessages getString MoveDownAction ove_Down_1
see I Action run public void run List targets get Ordered Selection if targets is Empty return List list get Entries As List int bottom list size 1 int index 0 for int i targets size 1 i 0 i Object target targets get i index list index Of target if index bottom bottom index 1 Object temp list get bottom list set bottom target list set index temp bottom index set Entries list  IAction getOrderedSelection isEmpty getEntriesAsList indexOf setEntries
see Selection Listener Action update Selection I Structured Selection protected boolean update Selection I Structured Selection selection if selection is Empty return false return get Viewer update Selection get Action Type selection is Index Selected selection get Entries As List size 1  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection isEmpty getViewer updateSelection getActionType isIndexSelected getEntriesAsList
protected int get Action Type return MOVE  getActionType

public class Move Up Action extends Runtime Classpath Action public Move Up Action I Classpath Viewer viewer super Action Messages get String Move Up Action Move U p 1 viewer NON NLS 1  MoveUpAction RuntimeClasspathAction MoveUpAction IClasspathViewer ActionMessages getString MoveUpAction Move_U p_1
Moves all selected entries up one position if possible see I Action run public void run List targets get Ordered Selection if targets is Empty return int top 0 int index 0 List list get Entries As List Iterator entries targets iterator while entries has Next Object target entries next index list index Of target if index top top index 1 Object temp list get top list set top target list set index temp top index set Entries list  IAction getOrderedSelection isEmpty getEntriesAsList hasNext indexOf setEntries
see Selection Listener Action update Selection I Structured Selection protected boolean update Selection I Structured Selection selection if selection is Empty return false return get Viewer update Selection get Action Type selection is Index Selected selection 0  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection isEmpty getViewer updateSelection getActionType isIndexSelected
protected int get Action Type return MOVE  getActionType

see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action I Structured Selection selection get Current Selection if selection size 1 return Object element selection get First Element String type Name try I Java Type type if element instanceof I Java Variable type I Java Value I Java Variable element get Value get Java Type else if element instanceof Java Inspect Expression type I Java Value Java Inspect Expression element get Value get Java Type else return if type null return type Name type get Name catch Debug Exception e return Java Detail Formatters Manager detail Formatters Manager Java Detail Formatters Manager get Default Detail Formatter detail Formatter new Detail Formatter type Name true NON NLS 1 if new Detail Formatter Dialog JDI DebugUI Plugin get Active Page get Workbench Window get Shell detail Formatter null false true open Window OK detail Formatters Manager set Associated Detail Formatter detail Formatter  IActionDelegate IAction IAction IStructuredSelection getCurrentSelection getFirstElement typeName IJavaType IJavaVariable IJavaValue IJavaVariable getValue getJavaType JavaInspectExpression IJavaValue JavaInspectExpression getValue getJavaType typeName getName DebugException JavaDetailFormattersManager detailFormattersManager JavaDetailFormattersManager getDefault DetailFormatter detailFormatter DetailFormatter typeName DetailFormatterDialog JDIDebugUIPlugin getActivePage getWorkbenchWindow getShell detailFormatter detailFormattersManager setAssociatedDetailFormatter detailFormatter

see I Object Action Delegate set Active Part I Action I Workbench Part public void set Active Part I Action action I Workbench Part target Part f Part target Part  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart fPart targetPart
see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection sel  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection
protected I Structured Selection get Current Selection I Workbench Page page JDI DebugUI Plugin get Active Page if page null I Selection selection page get Selection if selection instanceof I Structured Selection return I Structured Selection selection return null  IStructuredSelection getCurrentSelection IWorkbenchPage JDIDebugUIPlugin getActivePage ISelection getSelection IStructuredSelection IStructuredSelection
Displays the given error message in the status line param message protected void show Error Message String message if f Part instanceof I View Part I View Site view Site I View Part f Part get View Site I Status Line Manager manager view Site get Action Bars get Status Line Manager manager set Error Message message Display get Current beep  showErrorMessage fPart IViewPart IViewSite viewSite IViewPart fPart getViewSite IStatusLineManager viewSite getActionBars getStatusLineManager setErrorMessage getCurrent
see org eclipse ui I Action Delegate2 dispose public void dispose f Part null  IActionDelegate2 fPart
see org eclipse ui I Action Delegate2 init org eclipse jface action I Action public void init I Action action  IActionDelegate2 IAction IAction
see org eclipse ui I Action Delegate2 run With Event org eclipse jface action I Action org eclipse swt widgets Event public void run With Event I Action action Event event run action  IActionDelegate2 runWithEvent IAction runWithEvent IAction
protected void type Hierarchy Error show Error Message Action Messages get String Object Action Delegate Unable to display type hierarchy  The selected source element is not contained in the workspace  1 NON NLS 1  typeHierarchyError showErrorMessage ActionMessages getString ObjectActionDelegate Unable_to_display_type_hierarchy _The_selected_source_element_is_not_contained_in_the_workspace _1

Creates a new filter that filters the given objects public Object Filter List objects f Filter objects  ObjectFilter fFilter
see Viewer Filter select Viewer Object Object public boolean select Viewer viewer Object parent Element Object element return f Filter contains element  ViewerFilter parentElement fFilter

public class Open Declaring Type Action extends Open Stack Frame Action protected String get Type Name To Open I Debug Element frame throws Debug Exception return I Java Stack Frame frame get Declaring Type Name  OpenDeclaringTypeAction OpenStackFrameAction getTypeNameToOpen IDebugElement DebugException IJavaStackFrame getDeclaringTypeName
protected void do Action Object e Object source Element get Source Element e if source Element null open In Editor source Element  doAction sourceElement getSourceElement sourceElement openInEditor sourceElement

protected void do Action Object e Object source Element get Source Element e if source Element instanceof I Java Element Open Type Hierarchy Util open I Java Element source Element f Target Part get Site get Workbench Window else type Hierarchy Error  doAction sourceElement getSourceElement sourceElement IJavaElement OpenTypeHierarchyUtil IJavaElement sourceElement fTargetPart getSite getWorkbenchWindow typeHierarchyError
see I Object Action Delegate set Active Part I Action I Workbench Part public void set Active Part I Action action I Workbench Part target Part super set Active Part action target Part f Target Part target Part  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart setActivePart targetPart fTargetPart targetPart

Constructs an action that opens a dialog public Open Dialog Action String label I Classpath Viewer viewer String dialog Settings Prefix super label viewer f Prefix dialog Settings Prefix  OpenDialogAction IClasspathViewer dialogSettingsPrefix fPrefix dialogSettingsPrefix
Returns the prefix of the identifier used to store dialog settings for this action protected String get Dialog Settings Prefix return f Prefix  getDialogSettingsPrefix fPrefix
Returns the value of the dialog setting associated with the given setting Name resolved by the dialog setting prefix associated with this action param setting Name unqualified setting name return value or code null code if none protected String get Dialog Setting String setting Name return get Dialog Settings get get Dialog Settings Prefix setting Name NON NLS 1  settingName settingName getDialogSetting settingName getDialogSettings getDialogSettingsPrefix settingName
Sets the value of the dialog setting associated with the given setting Name resolved by the dialog setting prefix associated with this action param setting Name unqualified setting name return value or code null code if none protected void set Dialog Setting String setting Name String value get Dialog Settings put get Dialog Settings Prefix setting Name value NON NLS 1  settingName settingName setDialogSetting settingName getDialogSettings getDialogSettingsPrefix settingName
Returns this plug in s dialog settings return I Dialog Settings protected I Dialog Settings get Dialog Settings I Dialog Settings settings JDI DebugUI Plugin get Default get Dialog Settings return settings  IDialogSettings IDialogSettings getDialogSettings IDialogSettings JDIDebugUIPlugin getDefault getDialogSettings
protected int get Action Type return ADD  getActionType

public class Open Receiving Type Action extends Open Stack Frame Action protected String get Type Name To Open I Debug Element frame throws Debug Exception return I Java Stack Frame frame get Receiving Type Name  OpenReceivingTypeAction OpenStackFrameAction getTypeNameToOpen IDebugElement DebugException IJavaStackFrame getReceivingTypeName

protected void do Action Object e throws Debug Exception I Adaptable element I Adaptable e I Debug Element dbg Element get Debug Element element if dbg Element null String type Name get Type Name To Open dbg Element try I Type t find Type In Workspace type Name if t null Open Type Hierarchy Util open t f Target Part get Site get Workbench Window catch Core Exception x JDI DebugUI Plugin log x  doAction DebugException IAdaptable IAdaptable IDebugElement dbgElement getDebugElement dbgElement typeName getTypeNameToOpen dbgElement IType findTypeInWorkspace typeName OpenTypeHierarchyUtil fTargetPart getSite getWorkbenchWindow CoreException JDIDebugUIPlugin
see I Object Action Delegate set Active Part I Action I Workbench Part public void set Active Part I Action action I Workbench Part target Part super set Active Part action target Part f Target Part target Part  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart setActivePart targetPart fTargetPart targetPart

public abstract class Open Stack Frame Action extends Open Type Action protected I Debug Element get Debug Element I Adaptable element return I Debug Element element get Adapter I Java Stack Frame class  OpenStackFrameAction OpenTypeAction IDebugElement getDebugElement IAdaptable IDebugElement getAdapter IJavaStackFrame

public void run I Action action I Structured Selection selection get Current Selection if selection null return Iterator itr selection iterator try while itr has Next Object element itr next do Action element catch Debug Exception e JDI DebugUI Plugin log e  IAction IStructuredSelection getCurrentSelection hasNext doAction DebugException JDIDebugUIPlugin
protected abstract I Debug Element get Debug Element I Adaptable element  IDebugElement getDebugElement IAdaptable
protected abstract I Debug Element get Debug Element I Adaptable element protected abstract String get Type Name To Open I Debug Element element throws Debug Exception  IDebugElement getDebugElement IAdaptable getTypeNameToOpen IDebugElement DebugException
protected void do Action Object e throws Debug Exception I Adaptable element I Adaptable e I Debug Element dbg Element get Debug Element element if dbg Element null Object source Element get Source Element dbg Element if source Element null try resort to looking through the workspace projects for the type as the source locators failed String type Name get Type Name To Open dbg Element source Element find Type In Workspace type Name catch Core Exception x JDI DebugUI Plugin log x if source Element null open In Editor source Element  doAction DebugException IAdaptable IAdaptable IDebugElement dbgElement getDebugElement dbgElement sourceElement getSourceElement dbgElement sourceElement typeName getTypeNameToOpen dbgElement sourceElement findTypeInWorkspace typeName CoreException JDIDebugUIPlugin sourceElement openInEditor sourceElement
protected void open In Editor Object source Element try I Editor Part part Editor Utility open In Editor source Element if part null source Element instanceof I Java Element Editor Utility reveal In Editor part I Java Element source Element catch Core Exception ce JDI DebugUI Plugin log ce  openInEditor sourceElement IEditorPart EditorUtility openInEditor sourceElement sourceElement IJavaElement EditorUtility revealInEditor IJavaElement sourceElement CoreException JDIDebugUIPlugin
Searches for and returns a type with the given name in the workspace or code null code if none param type Name fully qualified type name return type or code null code throws Java Model Exception public static I Type find Type In Workspace String type Name throws Java Model Exception I Workspace Root root Resources Plugin get Workspace get Root I Java Project projects Java Core create root get Java Projects for int i 0 i projects length i I Type type find Type projects i type Name if type null return type return null  typeName JavaModelException IType findTypeInWorkspace typeName JavaModelException IWorkspaceRoot ResourcesPlugin getWorkspace getRoot IJavaProject JavaCore getJavaProjects IType findType typeName
Finds a type by its qualified type name dot separated param jproject The Java project to search in param fully Qualified Name The fully qualified name type name with enclosing type names and package all separated by dots return The type found or code null code if no type found The method does not find inner types Waiting for a Java Core solution private static I Type find Type I Java Project jproject String fully Qualified Name throws Java Model Exception String path Str fully Qualified Name replace java NON NLS 1 I Java Element jelement jproject find Element new Path path Str if jelement null try to find it as inner type String qualifier Signature get Qualifier fully Qualified Name if qualifier length 0 I Type type find Type jproject qualifier recursive if type null I Type res type get Type Signature get Simple Name fully Qualified Name if res exists return res else if jelement get Element Type I Java Element COMPILATION UNIT String simple Name Signature get Simple Name fully Qualified Name return I Compilation Unit jelement get Type simple Name else if jelement get Element Type I Java Element CLASS FILE return I Class File jelement get Type return null  fullyQualifiedName IType findType IJavaProject fullyQualifiedName JavaModelException pathStr fullyQualifiedName IJavaElement findElement pathStr getQualifier fullyQualifiedName IType findType IType getType getSimpleName fullyQualifiedName getElementType IJavaElement COMPILATION_UNIT simpleName getSimpleName fullyQualifiedName ICompilationUnit getType simpleName getElementType IJavaElement CLASS_FILE IClassFile getType
Use the source locator to determine the correct source element protected Object get Source Element Object e if e instanceof I Debug Element I Debug Element de I Debug Element e String type Name null try type Name get Type Name To Open de if type Name null List list Toggle Breakpoint Adapter search For Types type Name de get Launch if list is Empty return list get 0 catch Core Exception ex JDI DebugUI Plugin error Dialog Action Messages get String Open Type Action 2 ex get Status NON NLS 1 return null  getSourceElement IDebugElement IDebugElement IDebugElement typeName typeName getTypeNameToOpen typeName ToggleBreakpointAdapter searchForTypes typeName getLaunch isEmpty CoreException JDIDebugUIPlugin errorDialog ActionMessages getString OpenTypeAction getStatus
Returns the source element for the given type using the specified source locator or code null code if none param type Name fully qualified type name param locator source locator return the source element for the given type using the specified source locator or code null code if none public static Object find Source Element String type Name I Source Locator source Locator if source Locator instanceof I Source Lookup Director I Source Lookup Director director I Source Lookup Director source Locator String file Name type Name replace File separator Char file Name file Name java NON NLS 1 Object object director get Source Element file Name if object null return the java element adapter if it exists if object instanceof I Adaptable I Java Element element I Java Element I Adaptable object get Adapter I Java Element class if element null return element return object still support deprecated source locators for open type I Java Source Location locations null if source Locator instanceof JavaUI Source Locator JavaUI Source Locator java Source Locator JavaUI Source Locator source Locator locations java Source Locator get Source Locations else if source Locator instanceof Java Source Locator Java Source Locator java Source Locator Java Source Locator source Locator locations java Source Locator get Source Locations if locations null for int i 0 i locations length i I Java Source Location location locations i Object source Element null try source Element location find Source Element type Name catch Core Exception e if source Element null return source Element return null  typeName findSourceElement typeName ISourceLocator sourceLocator sourceLocator ISourceLookupDirector ISourceLookupDirector ISourceLookupDirector sourceLocator fileName typeName separatorChar fileName fileName getSourceElement fileName IAdaptable IJavaElement IJavaElement IAdaptable getAdapter IJavaElement IJavaSourceLocation sourceLocator JavaUISourceLocator JavaUISourceLocator javaSourceLocator JavaUISourceLocator sourceLocator javaSourceLocator getSourceLocations sourceLocator JavaSourceLocator JavaSourceLocator javaSourceLocator JavaSourceLocator sourceLocator javaSourceLocator getSourceLocations IJavaSourceLocation sourceElement sourceElement findSourceElement typeName CoreException sourceElement sourceElement

protected String get Type Name To Open I Debug Element element throws Debug Exception String ref Type I Java Variable element get Value get Reference Type Name ref Type remove Array ref Type return ref Type  getTypeNameToOpen IDebugElement DebugException refType IJavaVariable getValue getReferenceTypeName refType removeArray refType refType

protected void open In Editor Object source Element if source Element instanceof I Java Element Open Type Hierarchy Util open I Java Element source Element f Target Part get Site get Workbench Window else type Hierarchy Error  openInEditor sourceElement sourceElement IJavaElement OpenTypeHierarchyUtil IJavaElement sourceElement fTargetPart getSite getWorkbenchWindow typeHierarchyError
see I Object Action Delegate set Active Part I Action I Workbench Part public void set Active Part I Action action I Workbench Part target Part super set Active Part action target Part f Target Part target Part  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart setActivePart targetPart fTargetPart targetPart

protected String get Type Name To Open I Debug Element element throws Debug Exception String ref Type I Java Variable element get Reference Type Name ref Type remove Array ref Type return ref Type  getTypeNameToOpen IDebugElement DebugException refType IJavaVariable getReferenceTypeName refType removeArray refType refType

protected void open In Editor Object source Element if source Element instanceof I Java Element Open Type Hierarchy Util open I Java Element source Element f Target Part get Site get Workbench Window else type Hierarchy Error  openInEditor sourceElement sourceElement IJavaElement OpenTypeHierarchyUtil IJavaElement sourceElement fTargetPart getSite getWorkbenchWindow typeHierarchyError
see I Object Action Delegate set Active Part I Action I Workbench Part public void set Active Part I Action action I Workbench Part target Part super set Active Part action target Part f Target Part target Part  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart setActivePart targetPart fTargetPart targetPart

see org eclipse jdt internal debug ui actions Open Type Action get Debug Element I Adaptable protected I Debug Element get Debug Element I Adaptable element return I Debug Element element get Adapter I Java Variable class  OpenTypeAction getDebugElement IAdaptable IDebugElement getDebugElement IAdaptable IDebugElement getAdapter IJavaVariable
see org eclipse jdt internal debug ui actions Open Type Action get Type Name To Open I Debug Element protected String get Type Name To Open I Debug Element element throws Debug Exception return null  OpenTypeAction getTypeNameToOpen IDebugElement getTypeNameToOpen IDebugElement DebugException
public static String remove Array String type Name if type Name null return null int index type Name index Of if index 0 return type Name substring 0 index return type Name  removeArray typeName typeName typeName indexOf typeName typeName

private String result String public Popup Display Action super  resultString PopupDisplayAction
public String get Information I Text Viewer text Viewer I Region subject return result String  getInformation ITextViewer textViewer IRegion resultString
public I Region get Subject I Text Viewer text Viewer int offset return get Region  IRegion getSubject ITextViewer textViewer getRegion
private void show Popup final Information Presenter info Presenter new Information Presenter new I Information Control Creator public I Information Control create Information Control Shell parent return new Display Information Control parent Action Messages get String Popup Display Action 2 ACTION DEFINITION ID NON NLS 1  showPopup InformationPresenter infoPresenter InformationPresenter IInformationControlCreator IInformationControl createInformationControl DisplayInformationControl ActionMessages getString PopupDisplayAction ACTION_DEFINITION_ID
private void show Popup final Information Presenter info Presenter new Information Presenter new I Information Control Creator public I Information Control create Information Control Shell parent return new Display Information Control parent Action Messages get String Popup Display Action 2 ACTION DEFINITION ID NON NLS 1 Point p viewer get Selected Range I Document doc viewer get Document try String content Type doc get Content Type p x info Presenter set Information Provider Popup Display Action this content Type info Presenter install viewer info Presenter show Information catch Bad Location Exception e return finally viewer null evaluation Cleanup  showPopup InformationPresenter infoPresenter InformationPresenter IInformationControlCreator IInformationControl createInformationControl DisplayInformationControl ActionMessages getString PopupDisplayAction ACTION_DEFINITION_ID getSelectedRange IDocument getDocument contentType getContentType infoPresenter setInformationProvider PopupDisplayAction contentType infoPresenter infoPresenter showInformation BadLocationException evaluationCleanup
private Styled Text text Display Information Control Shell shell String label String action Definition Id super shell label action Definition Id  StyledText DisplayInformationControl actionDefinitionId actionDefinitionId
public Control create Control Composite parent Grid Data gd new Grid Data Grid Data FILL BOTH text new Styled Text parent SWT MULTI SWT READ ONLY SWT WRAP SWT H SCROLL SWT V SCROLL text set Layout Data gd text set Foreground parent get Display get System Color SWT COLOR INFO FOREGROUND text set Background parent get Display get System Color SWT COLOR INFO BACKGROUND return text  createControl GridData GridData GridData FILL_BOTH StyledText READ_ONLY H_SCROLL V_SCROLL setLayoutData setForeground getDisplay getSystemColor COLOR_INFO_FOREGROUND setBackground getDisplay getSystemColor COLOR_INFO_BACKGROUND
protected I Dialog Settings get Dialog Settings return JDI DebugUI Plugin get Default get Dialog Settings  IDialogSettings getDialogSettings JDIDebugUIPlugin getDefault getDialogSettings
protected void perform Command I Data Display direct Display get Direct Data Display Display display JDI DebugUI Plugin get Standard Display if display is Disposed I Data Display data Display get Data Display if data Display null if direct Display null data Display display Expression snippet data Display display Expression Value result String  performCommand IDataDisplay directDisplay getDirectDataDisplay JDIDebugUIPlugin getStandardDisplay isDisposed IDataDisplay dataDisplay getDataDisplay dataDisplay directDisplay dataDisplay displayExpression dataDisplay displayExpressionValue resultString
see org eclipse jface text I Information Control Extension has Contents public boolean has Contents return text null text get Char Count 0  IInformationControlExtension hasContents hasContents getCharCount
public void set Information String information if information null text set Font viewer get Text Widget get Font text set Text information  setInformation setFont getTextWidget getFont setText
result String current Result String Display get Default async Exec new Runnable public void run show Popup  resultString currentResultString getDefault asyncExec showPopup
protected void display String Result String current Snippet String current Result String I Workbench Part part get Target Part if part instanceof Display View super display String Result current Snippet current Result String return viewer I Text Viewer part get Adapter I Text Viewer class if viewer null if part instanceof Java Editor viewer Java Editor part get Viewer if viewer null super display String Result current Snippet current Result String else snippet current Snippet result String current Result String Display get Default async Exec new Runnable public void run show Popup  displayStringResult currentSnippet currentResultString IWorkbenchPart getTargetPart DisplayView displayStringResult currentSnippet currentResultString ITextViewer getAdapter ITextViewer JavaEditor JavaEditor getViewer displayStringResult currentSnippet currentResultString currentSnippet resultString currentResultString getDefault asyncExec showPopup

see Evaluate Action display Result I Evaluation Result protected void display Result final I Evaluation Result result I Workbench Part part get Target Part viewer I Text Viewer part get Adapter I Text Viewer class if viewer null if part instanceof Java Editor viewer Java Editor part get Viewer if viewer null super display Result result else show Popup result evaluation Cleanup  EvaluateAction displayResult IEvaluationResult displayResult IEvaluationResult IWorkbenchPart getTargetPart ITextViewer getAdapter ITextViewer JavaEditor JavaEditor getViewer displayResult showPopup evaluationCleanup
final Information Presenter info Presenter new Information Presenter new I Information Control Creator public I Information Control create Information Control Shell parent I Workbench Page page JDI DebugUI Plugin get Active Page expression new Java Inspect Expression result return new Expression Information Control page expression ACTION DEFININIITION ID  InformationPresenter infoPresenter InformationPresenter IInformationControlCreator IInformationControl createInformationControl IWorkbenchPage JDIDebugUIPlugin getActivePage JavaInspectExpression ExpressionInformationControl ACTION_DEFININIITION_ID
JDI DebugUI Plugin get Standard Display async Exec new Runnable public void run Point p viewer get Selected Range I Document doc viewer get Document try String content Type Text Utilities get Content Type doc info Presenter get Document Partitioning p x true info Presenter set Information Provider Popup Inspect Action this content Type info Presenter install viewer info Presenter show Information catch Bad Location Exception e return finally viewer null  JDIDebugUIPlugin getStandardDisplay asyncExec getSelectedRange IDocument getDocument contentType TextUtilities getContentType infoPresenter getDocumentPartitioning infoPresenter setInformationProvider PopupInspectAction contentType infoPresenter infoPresenter showInformation BadLocationException
protected void show Popup final I Evaluation Result result final Information Presenter info Presenter new Information Presenter new I Information Control Creator public I Information Control create Information Control Shell parent I Workbench Page page JDI DebugUI Plugin get Active Page expression new Java Inspect Expression result return new Expression Information Control page expression ACTION DEFININIITION ID JDI DebugUI Plugin get Standard Display async Exec new Runnable public void run Point p viewer get Selected Range I Document doc viewer get Document try String content Type Text Utilities get Content Type doc info Presenter get Document Partitioning p x true info Presenter set Information Provider Popup Inspect Action this content Type info Presenter install viewer info Presenter show Information catch Bad Location Exception e return finally viewer null  showPopup IEvaluationResult InformationPresenter infoPresenter InformationPresenter IInformationControlCreator IInformationControl createInformationControl IWorkbenchPage JDIDebugUIPlugin getActivePage JavaInspectExpression ExpressionInformationControl ACTION_DEFININIITION_ID JDIDebugUIPlugin getStandardDisplay asyncExec getSelectedRange IDocument getDocument contentType TextUtilities getContentType infoPresenter getDocumentPartitioning infoPresenter setInformationProvider PopupInspectAction contentType infoPresenter infoPresenter showInformation BadLocationException
public I Region get Subject I Text Viewer text Viewer int offset return get Region  IRegion getSubject ITextViewer textViewer getRegion
public String get Information I Text Viewer text Viewer I Region subject the Expression Information Control Adapter was constructed with everything that it needs returning null would result in popup not being displayed return not null NON NLS 1  getInformation ITextViewer textViewer IRegion ExpressionInformationControlAdapter

private I View Part f View public Primitive Options Action super  IViewPart fView PrimitiveOptionsAction
see org eclipse ui I View Action Delegate init org eclipse ui I View Part public void init I View Part view f View view apply Preferences  IViewActionDelegate IViewPart IViewPart fView applyPreferences
see org eclipse ui I Action Delegate2 init org eclipse jface action I Action public void init I Action action  IActionDelegate2 IAction IAction
see org eclipse ui I Action Delegate2 dispose public void dispose  IActionDelegate2
see org eclipse ui I Action Delegate2 run With Event org eclipse jface action I Action org eclipse swt widgets Event public void run With Event I Action action Event event run action  IActionDelegate2 runWithEvent IAction runWithEvent IAction
Busy Indicator show While viewer get Control get Display new Runnable public void run apply Preferences viewer refresh JDI DebugUI Plugin get Default save Plugin Preferences  BusyIndicator showWhile getControl getDisplay applyPreferences JDIDebugUIPlugin getDefault savePluginPreferences
public void run I Action action open dialog final Structured Viewer viewer get Structured Viewer Primitive Options Dialog dialog new Primitive Options Dialog viewer get Control get Shell get View get Site get Id int res dialog open if res Window OK Busy Indicator show While viewer get Control get Display new Runnable public void run apply Preferences viewer refresh JDI DebugUI Plugin get Default save Plugin Preferences  IAction StructuredViewer getStructuredViewer PrimitiveOptionsDialog PrimitiveOptionsDialog getControl getShell getView getSite getId BusyIndicator showWhile getControl getDisplay applyPreferences JDIDebugUIPlugin getDefault savePluginPreferences
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection
protected I Preference Store get Preference Store return JDI DebugUI Plugin get Default get Preference Store  IPreferenceStore getPreferenceStore JDIDebugUIPlugin getDefault getPreferenceStore
Returns the value of this filters preference on off for the given view param part return boolean public static boolean get Preference Value String id String preference String composite Key id preference NON NLS 1 I Preference Store store JDI DebugUI Plugin get Default get Preference Store boolean value false if store contains composite Key value store get Boolean composite Key else value store get Boolean preference return value  getPreferenceValue compositeKey IPreferenceStore JDIDebugUIPlugin getDefault getPreferenceStore compositeKey getBoolean compositeKey getBoolean
protected I View Part get View return f View  IViewPart getView fView
protected Structured Viewer get Structured Viewer I Debug View view I Debug View get View get Adapter I Debug View class if view null Viewer viewer view get Viewer if viewer instanceof Structured Viewer return Structured Viewer viewer return null  StructuredViewer getStructuredViewer IDebugView IDebugView getView getAdapter IDebugView getViewer StructuredViewer StructuredViewer
protected void apply Preferences I Debug View view I Debug View get View get Adapter I Debug View class if view null I Debug Model Presentation presentation view get Presentation JDI Debug Model get Plugin Identifier if presentation null apply Preference IJDI Preferences Constants PREF SHOW HEX JDI Model Presentation SHOW HEX VALUES presentation apply Preference IJDI Preferences Constants PREF SHOW CHAR JDI Model Presentation SHOW CHAR VALUES presentation apply Preference IJDI Preferences Constants PREF SHOW UNSIGNED JDI Model Presentation SHOW UNSIGNED VALUES presentation  applyPreferences IDebugView IDebugView getView getAdapter IDebugView IDebugModelPresentation getPresentation JDIDebugModel getPluginIdentifier applyPreference IJDIPreferencesConstants PREF_SHOW_HEX JDIModelPresentation SHOW_HEX_VALUES applyPreference IJDIPreferencesConstants PREF_SHOW_CHAR JDIModelPresentation SHOW_CHAR_VALUES applyPreference IJDIPreferencesConstants PREF_SHOW_UNSIGNED JDIModelPresentation SHOW_UNSIGNED_VALUES
Sets the display attribute associated with the given preference param preference preference key param attribute attribute key param presentation the model presentation to update protected void apply Preference String preference String attribute I Debug Model Presentation presentation boolean on get Preference Value get View get Site get Id preference presentation set Attribute attribute on Boolean TRUE Boolean FALSE  applyPreference IDebugModelPresentation getPreferenceValue getView getSite getId setAttribute

private String f Prefix public Primitive Options Dialog Shell parent Shell String prefix super parent Shell f Prefix prefix  fPrefix PrimitiveOptionsDialog parentShell parentShell fPrefix
protected Control create Dialog Area Composite parent Workbench Help set Help parent I Java Debug Help Context Ids PRIMITIVE DISPLAY OPTIONS DIALOG get Shell set Text Action Messages get String Primitive Options Dialog Primitive Type Display Options 1 NON NLS 1 Composite composite Composite super create Dialog Area parent Create the 3 primitive display checkboxes f Hex Button new Button composite SWT CHECK f Hex Button set Text DebugUI Messages get String Java Debug Preference Page Display  hexadecimal values  byte  short  char  int  long  3 NON NLS 1 f Hex Button set Selection Primitive Options Action get Preference Value f Prefix IJDI Preferences Constants PREF SHOW HEX f Char Button new Button composite SWT CHECK f Char Button set Text DebugUI Messages get String Java Debug Preference Page Display ASCII  character values  byte  short  int  long  4 NON NLS 1 f Char Button set Selection Primitive Options Action get Preference Value f Prefix IJDI Preferences Constants PREF SHOW CHAR f Unsigned Button new Button composite SWT CHECK f Unsigned Button set Text DebugUI Messages get String Java Debug Preference Page Display  unsigned values  byte  5 NON NLS 1 f Unsigned Button set Selection Primitive Options Action get Preference Value f Prefix IJDI Preferences Constants PREF SHOW UNSIGNED apply Dialog Font composite return composite  createDialogArea WorkbenchHelp setHelp IJavaDebugHelpContextIds PRIMITIVE_DISPLAY_OPTIONS_DIALOG getShell setText ActionMessages getString PrimitiveOptionsDialog Primitive_Type_Display_Options_1 createDialogArea fHexButton fHexButton setText DebugUIMessages getString JavaDebugPreferencePage Display_ hexadecimal_values_ _short _char _int _long _3 fHexButton setSelection PrimitiveOptionsAction getPreferenceValue fPrefix IJDIPreferencesConstants PREF_SHOW_HEX fCharButton fCharButton setText DebugUIMessages getString JavaDebugPreferencePage Display_ASCII_ character_values_ _short _int _long _4 fCharButton setSelection PrimitiveOptionsAction getPreferenceValue fPrefix IJDIPreferencesConstants PREF_SHOW_CHAR fUnsignedButton fUnsignedButton setText DebugUIMessages getString JavaDebugPreferencePage Display_ unsigned_values_ _5 fUnsignedButton setSelection PrimitiveOptionsAction getPreferenceValue fPrefix IJDIPreferencesConstants PREF_SHOW_UNSIGNED applyDialogFont
protected void ok Pressed I Preference Store store JDI DebugUI Plugin get Default get Preference Store store set Value f Prefix IJDI Preferences Constants PREF SHOW HEX f Hex Button get Selection NON NLS 1 store set Value f Prefix IJDI Preferences Constants PREF SHOW CHAR f Char Button get Selection NON NLS 1 store set Value f Prefix IJDI Preferences Constants PREF SHOW UNSIGNED f Unsigned Button get Selection NON NLS 1 super ok Pressed  okPressed IPreferenceStore JDIDebugUIPlugin getDefault getPreferenceStore setValue fPrefix IJDIPreferencesConstants PREF_SHOW_HEX fHexButton getSelection setValue fPrefix IJDIPreferencesConstants PREF_SHOW_CHAR fCharButton getSelection setValue fPrefix IJDIPreferencesConstants PREF_SHOW_UNSIGNED fUnsignedButton getSelection okPressed

see List Selection Dialog public Project Selection Dialog Shell parent Shell Object input I Structured Content Provider content Provider I Label Provider label Provider String message super parent Shell input content Provider label Provider message set Shell Style get Shell Style SWT RESIZE  ListSelectionDialog ProjectSelectionDialog parentShell IStructuredContentProvider contentProvider ILabelProvider labelProvider parentShell contentProvider labelProvider setShellStyle getShellStyle
see org eclipse jface dialogs Dialog create Dialog Area org eclipse swt widgets Composite protected Control create Dialog Area Composite parent Font font parent get Font Composite composite Composite super create Dialog Area parent final Button add Exported new Button composite SWT CHECK add Exported set Text Action Messages get String Project Selection Dialog Add exported entries of selected projects  1 NON NLS 1 add Exported add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Add Exported Entries add Exported get Selection add Exported set Selection f Add Exported Entries add Exported set Font font final Button add Required new Button composite SWT CHECK add Required set Text Action Messages get String Project Selection Dialog Add required projects of selected projects  2 NON NLS 1 add Required add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Add Required Projects add Required get Selection add Required set Selection f Add Required Projects add Required set Font font apply Dialog Font composite return composite  createDialogArea createDialogArea getFont createDialogArea addExported addExported setText ActionMessages getString ProjectSelectionDialog Add_exported_entries_of_selected_projects _1 addExported addSelectionListener SelectionAdapter widgetSelected SelectionEvent fAddExportedEntries addExported getSelection addExported setSelection fAddExportedEntries addExported setFont addRequired addRequired setText ActionMessages getString ProjectSelectionDialog Add_required_projects_of_selected_projects _2 addRequired addSelectionListener SelectionAdapter widgetSelected SelectionEvent fAddRequiredProjects addRequired getSelection addRequired setSelection fAddRequiredProjects addRequired setFont applyDialogFont
Returns whether the user has selected to add exported entries return whether the user has selected to add exported entries public boolean is Add Exported Entries return f Add Exported Entries  isAddExportedEntries fAddExportedEntries
Returns whether the user has selected to add required projects return whether the user has selected to add required projects public boolean is Add Required Projects return f Add Required Projects  isAddRequiredProjects fAddRequiredProjects
Returns the name of the section that this dialog stores its settings in return String protected String get Dialog Settings Section Name return I Java DebugUI Constants PLUGIN ID P ROJECT SELECTION DIALOG SECTION NON NLS 1  getDialogSettingsSectionName IJavaDebugUIConstants PLUGIN_ID ROJECT_SELECTION_DIALOG_SECTION
protected Point get Initial Location Point initial Size Point initial Location Dialog Settings Helper get Initial Location get Dialog Settings Section Name if initial Location null return initial Location return super get Initial Location initial Size  getInitialLocation initialSize initialLocation DialogSettingsHelper getInitialLocation getDialogSettingsSectionName initialLocation initialLocation getInitialLocation initialSize
see org eclipse jface window Window get Initial Size protected Point get Initial Size Point size super get Initial Size return Dialog Settings Helper get Initial Size get Dialog Settings Section Name size  getInitialSize getInitialSize getInitialSize DialogSettingsHelper getInitialSize getDialogSettingsSectionName
see org eclipse jface window Window close public boolean close Dialog Settings Helper persist Shell Geometry get Shell get Dialog Settings Section Name return super close  DialogSettingsHelper persistShellGeometry getShell getDialogSettingsSectionName

public class Remove Action extends Runtime Classpath Action public Remove Action I Classpath Viewer viewer super Action Messages get String Remove Action Remove 1 viewer NON NLS 1  RemoveAction RuntimeClasspathAction RemoveAction IClasspathViewer ActionMessages getString RemoveAction Remove_1
Removes all selected entries see I Action run public void run List targets get Ordered Selection List list get Entries As List list remove All targets set Entries list  IAction getOrderedSelection getEntriesAsList removeAll setEntries
see Selection Listener Action update Selection I Structured Selection protected boolean update Selection I Structured Selection selection if selection is Empty return false return get Viewer update Selection get Action Type selection  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection isEmpty getViewer updateSelection getActionType
protected int get Action Type return REMOVE  getActionType

see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action I Structured Selection selection get Current Selection if selection size 1 return Object element selection get First Element I Java Type type try I Java Value value if element instanceof I Java Variable value I Java Value I Java Variable element get Value else if element instanceof Java Inspect Expression value I Java Value Java Inspect Expression element get Value else return type value get Java Type catch Debug Exception e return Java Detail Formatters Manager detail Formatters Manager Java Detail Formatters Manager get Default Detail Formatter detail Formatter detail Formatters Manager get Associated Detail Formatter type detail Formatters Manager remove Associated Detail Formatter detail Formatter  IActionDelegate IAction IAction IStructuredSelection getCurrentSelection getFirstElement IJavaType IJavaValue IJavaVariable IJavaValue IJavaVariable getValue JavaInspectExpression IJavaValue JavaInspectExpression getValue getJavaType DebugException JavaDetailFormattersManager detailFormattersManager JavaDetailFormattersManager getDefault DetailFormatter detailFormatter detailFormattersManager getAssociatedDetailFormatter detailFormattersManager removeAssociatedDetailFormatter detailFormatter

private Java Classpath Tab f Tab public Restore Default Entries Action I Classpath Viewer viewer Java Classpath Tab tab super Action Messages get String Restore Default Entries Action 0 viewer NON NLS 1 f Tab tab  JavaClasspathTab fTab RestoreDefaultEntriesAction IClasspathViewer JavaClasspathTab ActionMessages getString RestoreDefaultEntriesAction fTab
Prompts for a project to add see I Action run public void run I Runtime Classpath Entry entries null try I Launch Configuration Working Copy copy I Launch Configuration Working Copy f Tab get Launch Configuration copy set Attribute I Java Launch Configuration Constants ATTR DEFAULT CLASSPATH true entries Java Runtime compute Unresolved Runtime Classpath copy catch Core Exception e TODO set error message return get Viewer set Entries entries  IAction IRuntimeClasspathEntry ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy fTab getLaunchConfiguration setAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_CLASSPATH JavaRuntime computeUnresolvedRuntimeClasspath CoreException getViewer setEntries
see Selection Listener Action update Selection I Structured Selection protected boolean update Selection I Structured Selection selection return true  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection

public Object get Adapter Object adaptable Object Class adapter Type if adapter Type I Run To Line Target class return new Run To Line Adapter if adapter Type I Toggle Breakpoints Target class return new Toggle Breakpoint Adapter return null  getAdapter adaptableObject adapterType adapterType IRunToLineTarget RunToLineAdapter adapterType IToggleBreakpointsTarget ToggleBreakpointAdapter
see org eclipse core runtime I Adapter Factory get Adapter List public Class get Adapter List return new Class I Run To Line Target class I Toggle Breakpoints Target class  IAdapterFactory getAdapterList getAdapterList IRunToLineTarget IToggleBreakpointsTarget

private Shell f Shell public Runtime Classpath Action String label I Classpath Viewer viewer super label set Viewer viewer  fShell RuntimeClasspathAction IClasspathViewer setViewer
Sets the viewer on which this action operates param viewer the viewer on which this action operates public void set Viewer I Classpath Viewer viewer if f Viewer null f Viewer remove Selection Changed Listener this f Viewer viewer if f Viewer null f Viewer add Selection Changed Listener this update  setViewer IClasspathViewer fViewer fViewer removeSelectionChangedListener fViewer fViewer fViewer addSelectionChangedListener
Returns the viewer on which this action operates return the viewer on which this action operates protected I Classpath Viewer get Viewer return f Viewer  IClasspathViewer getViewer fViewer
Returns the selected items in the list in the order they are displayed return targets for an action protected List get Ordered Selection List targets new Array List List selection I Structured Selection get Viewer get Selection to List I Runtime Classpath Entry entries get Viewer get Entries for int i 0 i entries length i I Runtime Classpath Entry target entries i if selection contains target targets add target return targets  getOrderedSelection ArrayList IStructuredSelection getViewer getSelection toList IRuntimeClasspathEntry getViewer getEntries IRuntimeClasspathEntry
Returns a list copy of the entries in the viewer protected List get Entries As List I Runtime Classpath Entry entries get Viewer get Entries List list new Array List entries length for int i 0 i entries length i list add entries i return list  getEntriesAsList IRuntimeClasspathEntry getViewer getEntries ArrayList
Updates the entries to the entries in the given list protected void set Entries List list get Viewer set Entries I Runtime Classpath Entry list to Array new I Runtime Classpath Entry list size update all selection listeners get Viewer set Selection get Viewer get Selection  setEntries getViewer setEntries IRuntimeClasspathEntry toArray IRuntimeClasspathEntry getViewer setSelection getViewer getSelection
Returns whether the item at the given index in the list visually is selected protected boolean is Index Selected I Structured Selection selection int index if selection is Empty return false Iterator entries selection iterator List list get Entries As List while entries has Next Object next entries next if list index Of next index return true return false  isIndexSelected IStructuredSelection isEmpty getEntriesAsList hasNext indexOf
Sets the button that invokes this action public void set Button Button button f Button button button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt run f Button set Enabled false  setButton fButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fButton setEnabled
see I Action set Enabled boolean public void set Enabled boolean enabled super set Enabled enabled if f Button null f Button set Enabled enabled  IAction setEnabled setEnabled setEnabled fButton fButton setEnabled
Updates the enabled state protected void update selection Changed I Structured Selection get Viewer get Selection  selectionChanged IStructuredSelection getViewer getSelection
Returns the shell used to realize this action s dialog if any protected Shell get Shell if f Shell null f Shell get Viewer get Shell return f Shell  getShell fShell fShell getViewer getShell fShell
Sets the shell used to realize this action s dialog if any public void set Shell Shell shell f Shell shell  setShell fShell
see org eclipse ui actions Selection Listener Action update Selection org eclipse jface viewers I Structured Selection protected boolean update Selection I Structured Selection selection return get Viewer update Selection get Action Type selection  SelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection getViewer updateSelection getActionType
protected int get Action Type return DEFAULT  getActionType

Runnable r new Runnable public void run line Number 0 text Selection get Start Line 1 AST Parser parser AST Parser new Parser AST JLS2 parser set Source document get to Char Array Compilation Unit compilation Unit Compilation Unit parser createAST null Valid Breakpoint Location Locator locator new Valid Breakpoint Location Locator compilation Unit line Number 0 compilation Unit accept locator valid Line 0 locator get Valid Location type Name 0 locator get Fully Qualified Type Name  lineNumber textSelection getStartLine ASTParser ASTParser newParser setSource toCharArray CompilationUnit compilationUnit CompilationUnit ValidBreakpointLocationLocator ValidBreakpointLocationLocator compilationUnit lineNumber compilationUnit validLine getValidLocation typeName getFullyQualifiedTypeName
public void run To Line I Workbench Part part I Selection selection I Suspend Resume target throws Core Exception I Editor Part editor Part I Editor Part part I Editor Input input editor Part get Editor Input String error Message null if input null error Message Action Messages get String Run To Line Adapter 0 NON NLS 1 else final I Text Editor text Editor I Text Editor editor Part final I Document document text Editor get Document Provider get Document input if document null error Message Action Messages get String Run To Line Adapter 1 NON NLS 1 else final int valid Line new int 1 final String type Name new String 1 final int line Number new int 1 final I Text Selection text Selection I Text Selection selection Runnable r new Runnable public void run line Number 0 text Selection get Start Line 1 AST Parser parser AST Parser new Parser AST JLS2 parser set Source document get to Char Array Compilation Unit compilation Unit Compilation Unit parser createAST null Valid Breakpoint Location Locator locator new Valid Breakpoint Location Locator compilation Unit line Number 0 compilation Unit accept locator valid Line 0 locator get Valid Location type Name 0 locator get Fully Qualified Type Name Busy Indicator show While JDI DebugUI Plugin get Standard Display r if valid Line 0 line Number 0 I Breakpoint breakpoint null Map attributes new Hash Map 4 Breakpoint Utils add Run To Line Attributes attributes breakpoint JDI Debug Model create Line Breakpoint Resources Plugin get Workspace get Root type Name 0 line Number 0 1 1 1 false attributes error Message Action Messages get String Run To Line Adapter 2 NON NLS 1 if target instanceof I Adaptable I Debug Target debug Target I Debug Target I Adaptable target get Adapter I Debug Target class if debug Target null prepare Skip Breakpoints debug Target breakpoint debug Target get Debug Target breakpoint Added breakpoint target resume return else invalid line if text Selection get Length 0 error Message Action Messages get String Run To Line Adapter 3 NON NLS 1 else error Message Action Messages get String Run To Line Adapter 4 NON NLS 1 throw new Core Exception new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Java DebugUI Constants INTERNAL ERROR error Message null  runToLine IWorkbenchPart ISelection ISuspendResume CoreException IEditorPart editorPart IEditorPart IEditorInput editorPart getEditorInput errorMessage errorMessage ActionMessages getString RunToLineAdapter ITextEditor textEditor ITextEditor editorPart IDocument textEditor getDocumentProvider getDocument errorMessage ActionMessages getString RunToLineAdapter validLine typeName lineNumber ITextSelection textSelection ITextSelection lineNumber textSelection getStartLine ASTParser ASTParser newParser setSource toCharArray CompilationUnit compilationUnit CompilationUnit ValidBreakpointLocationLocator ValidBreakpointLocationLocator compilationUnit lineNumber compilationUnit validLine getValidLocation typeName getFullyQualifiedTypeName BusyIndicator showWhile JDIDebugUIPlugin getStandardDisplay validLine lineNumber IBreakpoint HashMap BreakpointUtils addRunToLineAttributes JDIDebugModel createLineBreakpoint ResourcesPlugin getWorkspace getRoot typeName lineNumber errorMessage ActionMessages getString RunToLineAdapter IAdaptable IDebugTarget debugTarget IDebugTarget IAdaptable getAdapter IDebugTarget debugTarget prepareSkipBreakpoints debugTarget debugTarget getDebugTarget breakpointAdded textSelection getLength errorMessage ActionMessages getString RunToLineAdapter errorMessage ActionMessages getString RunToLineAdapter CoreException IStatus JDIDebugUIPlugin getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR errorMessage
final I Debug Event Set Listener debug Event Listener new I Debug Event Set Listener public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i Object source event get Source if source instanceof I Thread event get Kind Debug Event SUSPEND event get Detail Debug Event BREAKPOINT I Breakpoint breakpoints I Thread source get Breakpoints for int j 0 j breakpoints length j if breakpoints j breakpoint manager set Enabled true else if source instanceof I Debug Target event get Kind Debug Event TERMINATE Clean up if the debug target terminates without hitting the breakpoint manager set Enabled true  IDebugEventSetListener debugEventListener IDebugEventSetListener handleDebugEvents DebugEvent DebugEvent getSource IThread getKind DebugEvent getDetail DebugEvent IBreakpoint IThread getBreakpoints setEnabled IDebugTarget getKind DebugEvent setEnabled
debug event listener or by the user stop listening to debug events manager add Breakpoint Manager Listener new I Breakpoint Manager Listener public void breakpoint Manager Enablement Changed boolean enabled plugin remove Debug Event Listener debug Event Listener  addBreakpointManagerListener IBreakpointManagerListener breakpointManagerEnablementChanged removeDebugEventListener debugEventListener
Before resuming check if breakpoints should be skipped during this operation If so disable the breakpoint manager and register a listener to reenable the manager when the run to line breakpoint is hit param target the target that will be resumed for this action param breakpoint the run to line breakpoint protected void prepare Skip Breakpoints final I Debug Target target final I Breakpoint breakpoint final Debug Plugin plugin Debug Plugin get Default final I Breakpoint Manager manager plugin get Breakpoint Manager if manager is Enabled DebugUI Plugin get Default get Plugin Preferences get Boolean I DebugUI Constants PREF SKIP BREAKPOINTS DURING RUN TO LINE If the BP manager is already disabled do nothing return manager set Enabled false final I Debug Event Set Listener debug Event Listener new I Debug Event Set Listener public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i Object source event get Source if source instanceof I Thread event get Kind Debug Event SUSPEND event get Detail Debug Event BREAKPOINT I Breakpoint breakpoints I Thread source get Breakpoints for int j 0 j breakpoints length j if breakpoints j breakpoint manager set Enabled true else if source instanceof I Debug Target event get Kind Debug Event TERMINATE Clean up if the debug target terminates without hitting the breakpoint manager set Enabled true plugin add Debug Event Listener debug Event Listener When the breakpoint manager is enabled or disabled either by the debug event listener or by the user stop listening to debug events manager add Breakpoint Manager Listener new I Breakpoint Manager Listener public void breakpoint Manager Enablement Changed boolean enabled plugin remove Debug Event Listener debug Event Listener  prepareSkipBreakpoints IDebugTarget IBreakpoint DebugPlugin DebugPlugin getDefault IBreakpointManager getBreakpointManager isEnabled DebugUIPlugin getDefault getPluginPreferences getBoolean IDebugUIConstants PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE setEnabled IDebugEventSetListener debugEventListener IDebugEventSetListener handleDebugEvents DebugEvent DebugEvent getSource IThread getKind DebugEvent getDetail DebugEvent IBreakpoint IThread getBreakpoints setEnabled IDebugTarget getKind DebugEvent setEnabled addDebugEventListener debugEventListener addBreakpointManagerListener IBreakpointManagerListener breakpointManagerEnablementChanged removeDebugEventListener debugEventListener
see org eclipse debug ui actions I Run To Line Target can Run To Line org eclipse ui I Workbench Part org eclipse jface viewers I Selection org eclipse debug core model I Suspend Resume public boolean can Run To Line I Workbench Part part I Selection selection I Suspend Resume target return target instanceof I Debug Element I Debug Element target get Model Identifier equals JDI Debug Model get Plugin Identifier  IRunToLineTarget canRunToLine IWorkbenchPart ISelection ISuspendResume canRunToLine IWorkbenchPart ISelection ISuspendResume IDebugElement IDebugElement getModelIdentifier JDIDebugModel getPluginIdentifier

public class Show Constants Action extends View Filter Action public Show Constants Action super  ShowConstantsAction ViewFilterAction ShowConstantsAction
see View Filter Action get Preference Key protected String get Preference Key return IJDI Preferences Constants PREF SHOW CONSTANTS  ViewFilterAction getPreferenceKey getPreferenceKey IJDIPreferencesConstants PREF_SHOW_CONSTANTS
see org eclipse jface viewers Viewer Filter select org eclipse jface viewers Viewer java lang Object java lang Object public boolean select Viewer viewer Object parent Element Object element if element instanceof I Java Variable I Java Variable variable I Java Variable element try if get Value when not on filter static finals return variable is Static variable is Final catch Debug Exception e JDI DebugUI Plugin log e return true  ViewerFilter parentElement IJavaVariable IJavaVariable IJavaVariable getValue isStatic isFinal DebugException JDIDebugUIPlugin

public class Show Null Array Entries Action extends View Filter Action public Show Null Array Entries Action super  ShowNullArrayEntriesAction ViewFilterAction ShowNullArrayEntriesAction
see View Filter Action get Preference Key protected String get Preference Key return IJDI Preferences Constants PREF SHOW NULL ARRAY ENTRIES  ViewFilterAction getPreferenceKey getPreferenceKey IJDIPreferencesConstants PREF_SHOW_NULL_ARRAY_ENTRIES
see org eclipse jface viewers Viewer Filter select org eclipse jface viewers Viewer java lang Object java lang Object public boolean select Viewer viewer Object parent Element Object element if get Value when on filter nothing return true if element instanceof JDI Array Entry Variable JDI Array Entry Variable variable JDI Array Entry Variable element try return variable get Value equals I Java Debug Target variable get Debug Target null Value catch Debug Exception e JDI DebugUI Plugin log e return true  ViewerFilter parentElement getValue JDIArrayEntryVariable JDIArrayEntryVariable JDIArrayEntryVariable getValue IJavaDebugTarget getDebugTarget nullValue DebugException JDIDebugUIPlugin

see View Filter Action get Preference Key protected String get Preference Key return IJDI Preferences Constants PREF SHOW QUALIFIED NAMES  ViewFilterAction getPreferenceKey getPreferenceKey IJDIPreferencesConstants PREF_SHOW_QUALIFIED_NAMES
This method is not actually called this action is not a filter Instead it sets an attribute on the viewer s model presentation see org eclipse jface viewers Viewer Filter select org eclipse jface viewers Viewer java lang Object java lang Object public boolean select Viewer viewer Object parent Element Object element return true  ViewerFilter parentElement
Busy Indicator show While viewer get Control get Display new Runnable public void run viewer refresh I Preference Store store get Preference Store String key get View get Site get Id get Preference Key NON NLS 1 store set Value key get Value JDI DebugUI Plugin get Default save Plugin Preferences  BusyIndicator showWhile getControl getDisplay IPreferenceStore getPreferenceStore getView getSite getId getPreferenceKey setValue getValue JDIDebugUIPlugin getDefault savePluginPreferences
public void run I Action action final Structured Viewer viewer get Structured Viewer I Debug View view I Debug View get View get Adapter I Debug View class if view null I Debug Model Presentation pres view get Presentation JDI Debug Model get Plugin Identifier if pres null pres set Attribute JDI Model Presentation DISPLAY QUALIFIED NAMES get Value Boolean TRUE Boolean FALSE Busy Indicator show While viewer get Control get Display new Runnable public void run viewer refresh I Preference Store store get Preference Store String key get View get Site get Id get Preference Key NON NLS 1 store set Value key get Value JDI DebugUI Plugin get Default save Plugin Preferences  IAction StructuredViewer getStructuredViewer IDebugView IDebugView getView getAdapter IDebugView IDebugModelPresentation getPresentation JDIDebugModel getPluginIdentifier setAttribute JDIModelPresentation DISPLAY_QUALIFIED_NAMES getValue BusyIndicator showWhile getControl getDisplay IPreferenceStore getPreferenceStore getView getSite getId getPreferenceKey setValue getValue JDIDebugUIPlugin getDefault savePluginPreferences

public class Show Static Variables Action extends View Filter Action public Show Static Variables Action super  ShowStaticVariablesAction ViewFilterAction ShowStaticVariablesAction
see View Filter Action get Preference Key protected String get Preference Key return IJDI Preferences Constants PREF SHOW STATIC VARIALBES  ViewFilterAction getPreferenceKey getPreferenceKey IJDIPreferencesConstants PREF_SHOW_STATIC_VARIALBES
see org eclipse jface viewers Viewer Filter select org eclipse jface viewers Viewer java lang Object java lang Object public boolean select Viewer viewer Object parent Element Object element if element instanceof I Java Variable I Java Variable variable I Java Variable element try if get Value when not on filter non static finals return variable is Static variable is Final catch Debug Exception e JDI DebugUI Plugin log e return true  ViewerFilter parentElement IJavaVariable IJavaVariable IJavaVariable getValue isStatic isFinal DebugException JDIDebugUIPlugin

see org eclipse jdt internal debug ui actions Thread Filter Action get Preference Key protected String get Preference Key return IJDI Preferences Constants PREF SHOW SYSTEM THREADS  ThreadFilterAction getPreferenceKey getPreferenceKey IJDIPreferencesConstants PREF_SHOW_SYSTEM_THREADS
public boolean select Viewer viewer Object parent Element Object element if get Value element instanceof I Java Thread try I Java Thread thread I Java Thread element Show only non system threads and suspended threads return thread is System Thread thread is Suspended catch Debug Exception e return true  parentElement getValue IJavaThread IJavaThread IJavaThread isSystemThread isSuspended DebugException
see org eclipse ui I View Action Delegate init org eclipse ui I View Part public void init I View Part view super init view Debug Plugin get Default add Debug Event Listener this  IViewActionDelegate IViewPart IViewPart DebugPlugin getDefault addDebugEventListener
see org eclipse ui I Action Delegate2 dispose public void dispose super dispose Debug Plugin get Default remove Debug Event Listener this  IActionDelegate2 DebugPlugin getDefault removeDebugEventListener
public void handle Debug Events Debug Event events if get Value if showing system threads no need to worry about displaying hinding return for int i 0 i events length i Debug Event event events i switch event get Kind case Debug Event SUSPEND if event get Detail Debug Event BREAKPOINT refresh event get Source true break case Debug Event RESUME if event get Detail Debug Event CLIENT REQUEST refresh event get Source false break  handleDebugEvents DebugEvent getValue DebugEvent getKind DebugEvent getDetail DebugEvent getSource DebugEvent getDetail DebugEvent CLIENT_REQUEST getSource
Runnable r new Runnable public void run get Structured Viewer refresh if select Object tos try tos thread get Top Stack Frame get Structured Viewer set Selection new Structured Selection tos catch Debug Exception e  getStructuredViewer getTopStackFrame getStructuredViewer setSelection StructuredSelection DebugException
private void refresh Object source final boolean select if source instanceof I Java Thread final I Java Thread thread I Java Thread source try if thread is System Thread Runnable r new Runnable public void run get Structured Viewer refresh if select Object tos try tos thread get Top Stack Frame get Structured Viewer set Selection new Structured Selection tos catch Debug Exception e JDI DebugUI Plugin get Standard Display async Exec r return catch Debug Exception e  IJavaThread IJavaThread IJavaThread isSystemThread getStructuredViewer getTopStackFrame getStructuredViewer setSelection StructuredSelection DebugException JDIDebugUIPlugin getStandardDisplay asyncExec DebugException

see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action I Java Stack Frame frame get Stack Frame if frame null frame is Suspended no longer suspended unexpected return I Text Selection text Selection get Text Selection I Method method get Method I Type calling Type get Type if method null calling Type null return try int line Number frame get Line Number debug line numbers are 1 based document line numbers are 0 based if text Selection get Start Line line Number 1 calling Type get Fully Qualified Name equals frame get Receiving Type Name do Step In frame method else not on current line run To Line Before Step In text Selection frame get Thread method return catch Debug Exception e show Error Message e get Status get Message return  IActionDelegate IAction IAction IJavaStackFrame getStackFrame isSuspended ITextSelection textSelection getTextSelection IMethod getMethod IType callingType getType callingType lineNumber getLineNumber textSelection getStartLine lineNumber callingType getFullyQualifiedName getReceivingTypeName doStepIn runToLineBeforeStepIn textSelection getThread DebugException showErrorMessage getStatus getMessage
Steps into the given method in the given stack frame param frame the frame in which the step should begin param method the method to step into throws Debug Exception private void do Step In I Java Stack Frame frame I Method method throws Debug Exception ensure top stack frame I Stack Frame tos frame get Thread get Top Stack Frame if tos null return if tos equals frame show Error Message Action Messages get String Step Into Selection Action Delegate Step into selection only available in top stack frame  3 NON NLS 1 return Step Into Selection Handler handler new Step Into Selection Handler I Java Thread frame get Thread frame method handler step  DebugException doStepIn IJavaStackFrame IMethod DebugException IStackFrame getThread getTopStackFrame showErrorMessage ActionMessages getString StepIntoSelectionActionDelegate Step_into_selection_only_available_in_top_stack_frame _3 StepIntoSelectionHandler StepIntoSelectionHandler IJavaThread getThread
listener new I Debug Event Set Listener see I Debug Event Set Listener handle Debug Events Debug Event public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i switch event get Kind case Debug Event SUSPEND handle Suspend Event event break case Debug Event TERMINATE handle Terminate Event event break default break  IDebugEventSetListener IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent DebugEvent getKind DebugEvent handleSuspendEvent DebugEvent handleTerminateEvent
plugin async Exec new Runnable public void run try do Step In frame method catch Debug Exception e show Error Message e get Status get Message  asyncExec doStepIn DebugException showErrorMessage getStatus getMessage
Listen for the completion of the run to line When the thread suspends at the correct location perform a step into selection param event the debug event private void handle Suspend Event Debug Event event Object source event get Source if source instanceof I Java Thread try final I Java Stack Frame frame I Java Stack Frame I Java Thread source get Top Stack Frame if is Expected Frame frame Debug Plugin plugin Debug Plugin get Default plugin remove Debug Event Listener listener plugin async Exec new Runnable public void run try do Step In frame method catch Debug Exception e show Error Message e get Status get Message catch Debug Exception e return  handleSuspendEvent DebugEvent getSource IJavaThread IJavaStackFrame IJavaStackFrame IJavaThread getTopStackFrame isExpectedFrame DebugPlugin DebugPlugin getDefault removeDebugEventListener asyncExec doStepIn DebugException showErrorMessage getStatus getMessage DebugException
Returns whether the given frame is the frame that this action is expecting This frame is expecting a stack frame for the suspension of the run to line param frame the given stack frame or code null code return whether the given stack frame is the expected frame throws Debug Exception private boolean is Expected Frame I Java Stack Frame frame throws Debug Exception return frame null run To Line Line frame get Line Number frame get Receiving Type Name equals run To Line Type  DebugException isExpectedFrame IJavaStackFrame DebugException runToLineLine getLineNumber getReceivingTypeName runToLineType
When the debug target we re listening for terminates stop listening to debug events param event the debug event private void handle Terminate Event Debug Event event Object source event get Source if thread get Debug Target source Debug Plugin get Default remove Debug Event Listener listener  handleTerminateEvent DebugEvent getSource getDebugTarget DebugPlugin getDefault removeDebugEventListener
When the user chooses to step into selection on a line other than the currently executing one first perform a run to line to get to the desired location then perform a step into selection private void run To Line Before Step In I Text Selection text Selection final I Thread thread final I Method method run To Line Type get Type get Fully Qualified Name run To Line Line text Selection get Start Line 1 if run To Line Type null run To Line Line 1 return see bug 65489 get the run to line adapater from the editor I Run To Line Target run To Line Action null I Editor Part ed get Active Editor if ed null run To Line Action I Run To Line Target ed get Adapter I Run To Line Target class if run To Line Action null I Adapter Manager adapter Manager Platform get Adapter Manager if adapter Manager has Adapter ed I Run To Line Target class get Name run To Line Action I Run To Line Target adapter Manager load Adapter ed I Run To Line Target class get Name if no adapter exists use the Java adapter if run To Line Action null run To Line Action new Run To Line Adapter listener new I Debug Event Set Listener see I Debug Event Set Listener handle Debug Events Debug Event public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i switch event get Kind case Debug Event SUSPEND handle Suspend Event event break case Debug Event TERMINATE handle Terminate Event event break default break Listen for the completion of the run to line When the thread suspends at the correct location perform a step into selection param event the debug event private void handle Suspend Event Debug Event event Object source event get Source if source instanceof I Java Thread try final I Java Stack Frame frame I Java Stack Frame I Java Thread source get Top Stack Frame if is Expected Frame frame Debug Plugin plugin Debug Plugin get Default plugin remove Debug Event Listener listener plugin async Exec new Runnable public void run try do Step In frame method catch Debug Exception e show Error Message e get Status get Message catch Debug Exception e return Returns whether the given frame is the frame that this action is expecting This frame is expecting a stack frame for the suspension of the run to line param frame the given stack frame or code null code return whether the given stack frame is the expected frame throws Debug Exception private boolean is Expected Frame I Java Stack Frame frame throws Debug Exception return frame null run To Line Line frame get Line Number frame get Receiving Type Name equals run To Line Type When the debug target we re listening for terminates stop listening to debug events param event the debug event private void handle Terminate Event Debug Event event Object source event get Source if thread get Debug Target source Debug Plugin get Default remove Debug Event Listener listener Debug Plugin get Default add Debug Event Listener listener try run To Line Action run To Line get Active Editor text Selection thread catch Core Exception e Debug Plugin get Default remove Debug Event Listener listener show Error Message Action Messages get String Step Into Selection Action Delegate 4 NON NLS 1 JDI DebugUI Plugin log e get Status  runToLineBeforeStepIn ITextSelection textSelection IThread IMethod runToLineType getType getFullyQualifiedName runToLineLine textSelection getStartLine runToLineType runToLineLine IRunToLineTarget runToLineAction IEditorPart getActiveEditor runToLineAction IRunToLineTarget getAdapter IRunToLineTarget runToLineAction IAdapterManager adapterManager getAdapterManager adapterManager hasAdapter IRunToLineTarget getName runToLineAction IRunToLineTarget adapterManager loadAdapter IRunToLineTarget getName runToLineAction runToLineAction RunToLineAdapter IDebugEventSetListener IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent DebugEvent getKind DebugEvent handleSuspendEvent DebugEvent handleTerminateEvent handleSuspendEvent DebugEvent getSource IJavaThread IJavaStackFrame IJavaStackFrame IJavaThread getTopStackFrame isExpectedFrame DebugPlugin DebugPlugin getDefault removeDebugEventListener asyncExec doStepIn DebugException showErrorMessage getStatus getMessage DebugException DebugException isExpectedFrame IJavaStackFrame DebugException runToLineLine getLineNumber getReceivingTypeName runToLineType handleTerminateEvent DebugEvent getSource getDebugTarget DebugPlugin getDefault removeDebugEventListener DebugPlugin getDefault addDebugEventListener runToLineAction runToLine getActiveEditor textSelection CoreException DebugPlugin getDefault removeDebugEventListener showErrorMessage ActionMessages getString StepIntoSelectionActionDelegate JDIDebugUIPlugin getStatus
private I Text Selection get Text Selection I Editor Part part get Active Editor if part instanceof I Text Editor I Text Editor editor I Text Editor part return I Text Selection editor get Selection Provider get Selection else show Error Message Action Messages get String Step Into Selection Action Delegate Step into selection only available in Java editor  4 NON NLS 1 return null  ITextSelection getTextSelection IEditorPart getActiveEditor ITextEditor ITextEditor ITextEditor ITextSelection getSelectionProvider getSelection showErrorMessage ActionMessages getString StepIntoSelectionActionDelegate Step_into_selection_only_available_in_Java_editor _4
private I Method get Method I Text Selection text Selection get Text Selection I Editor Input input get Active Editor get Editor Input I Code Assist code Assist null Object element JavaUI get Working Copy Manager get Working Copy input if element null element input get Adapter I Class File class if element instanceof I Code Assist code Assist I Code Assist element else editor does not support code assist show Error Message Action Messages get String Step Into Selection Action Delegate Step into selection only available for types in Java projects  1 NON NLS 1 return null I Method method null try I Java Element resolve code Assist code Select text Selection get Offset 0 for int i 0 i resolve length i I Java Element java Element resolve i if java Element instanceof I Method method I Method java Element break catch Core Exception e JDI Debug Plugin log e if method null no resolved method show Error Message Action Messages get String Step Into Selection Action Delegate No Method NON NLS 1 return method  IMethod getMethod ITextSelection textSelection getTextSelection IEditorInput getActiveEditor getEditorInput ICodeAssist codeAssist getWorkingCopyManager getWorkingCopy getAdapter IClassFile ICodeAssist codeAssist ICodeAssist showErrorMessage ActionMessages getString StepIntoSelectionActionDelegate Step_into_selection_only_available_for_types_in_Java_projects _1 IMethod IJavaElement codeAssist codeSelect textSelection getOffset IJavaElement javaElement javaElement IMethod IMethod javaElement CoreException JDIDebugPlugin showErrorMessage ActionMessages getString StepIntoSelectionActionDelegate No_Method
Return the type containing the selected text or code null code if the selection is not in a type protected I Type get Type I Member member Action Delegate Helper get Default get Current Member get Text Selection I Type type null if member instanceof I Type type I Type member else if member null type member get Declaring Type return type  IType getType IMember ActionDelegateHelper getDefault getCurrentMember getTextSelection IType IType IType getDeclaringType
Displays an error message in the status area param message protected void show Error Message String message if get Active Editor null I Editor Status Line status Line I Editor Status Line get Active Editor get Adapter I Editor Status Line class if status Line null status Line set Message true message null JDI DebugUI Plugin get Standard Display beep  showErrorMessage getActiveEditor IEditorStatusLine statusLine IEditorStatusLine getActiveEditor getAdapter IEditorStatusLine statusLine statusLine setMessage JDIDebugUIPlugin getStandardDisplay
see org eclipse ui I Editor Action Delegate set Active Editor org eclipse jface action I Action org eclipse ui I Editor Part public void set Active Editor I Action action I Editor Part target Editor f Editor Part target Editor  IEditorActionDelegate setActiveEditor IAction IEditorPart setActiveEditor IAction IEditorPart targetEditor fEditorPart targetEditor
Returns the active editor or code null code return active editor or code null code protected I Editor Part get Active Editor if f Window null global action return f Window get Active Page get Active Editor else pop up action return f Editor Part  IEditorPart getActiveEditor fWindow fWindow getActivePage getActiveEditor fEditorPart
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection
Returns the current stack frame context or code null code if none return the current stack frame context or code null code if none protected I Java Stack Frame get Stack Frame return Evaluation Context Manager get Evaluation Context get Active Editor  IJavaStackFrame getStackFrame EvaluationContextManager getEvaluationContext getActiveEditor
see org eclipse ui I Workbench Window Action Delegate dispose public void dispose  IWorkbenchWindowActionDelegate
see org eclipse ui I Workbench Window Action Delegate init org eclipse ui I Workbench Window public void init I Workbench Window window f Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow fWindow

Constructs a step handler to step into the given method in the given thread starting from the given stack frame public Step Into Selection Handler I Java Thread thread I Java Stack Frame frame I Method method f Method method f Thread thread try f Original Name frame get Name f Original Signature frame get Signature f Original Type Name frame get Declaring Type Name if method is Binary f Resolved Signature method get Signature else f Resolved Signature Toggle Breakpoint Adapter resolve Method Signature method get Declaring Type method get Signature catch Core Exception e JDI DebugUI Plugin log e  StepIntoSelectionHandler IJavaThread IJavaStackFrame IMethod fMethod fThread fOriginalName getName fOriginalSignature getSignature fOriginalTypeName getDeclaringTypeName isBinary fResolvedSignature getSignature fResolvedSignature ToggleBreakpointAdapter resolveMethodSignature getDeclaringType getSignature CoreException JDIDebugUIPlugin
Returns the target thread for the step return the target thread for the step protected I Java Thread get Thread return f Thread  IJavaThread getThread fThread
protected I Java Debug Target get Debug Target return I Java Debug Target get Thread get Debug Target  IJavaDebugTarget getDebugTarget IJavaDebugTarget getThread getDebugTarget
Returns the method to step into return the method to step into protected I Method get Method return f Method  IMethod getMethod fMethod
Returns the resolved signature of the method to step into return the resolved signature of the method to step into protected String get Signature return f Resolved Signature  getSignature fResolvedSignature
r new Runnable public void run try set Expected Event Debug Event RESUME Debug Event STEP RETURN frame step Return catch Debug Exception e JDI DebugUI Plugin log e cleanup Debug Plugin get Default fire Debug Event Set new Debug Event new Debug Event get Debug Target Debug Event CHANGE  setExpectedEvent DebugEvent DebugEvent STEP_RETURN stepReturn DebugException JDIDebugUIPlugin DebugPlugin getDefault fireDebugEventSet DebugEvent DebugEvent getDebugTarget DebugEvent
r new Runnable public void run try set Expected Event Debug Event RESUME Debug Event STEP INTO frame step Into catch Debug Exception e JDI DebugUI Plugin log e cleanup Debug Plugin get Default fire Debug Event Set new Debug Event new Debug Event get Debug Target Debug Event CHANGE  setExpectedEvent DebugEvent DebugEvent STEP_INTO stepInto DebugException JDIDebugUIPlugin DebugPlugin getDefault fireDebugEventSet DebugEvent DebugEvent getDebugTarget DebugEvent
see org eclipse debug core I Debug Event Filter filter Debug Events org eclipse debug core Debug Event public Debug Event filter Debug Events Debug Event events we only expect one event from our thread find the event Debug Event event null int index 1 int thread Events 0 for int i 0 i events length i Debug Event e events i if is Expected Event e event e index i thread Events else if e get Source get Thread thread Events if event null nothing to process in this event set return events create filtered event set Debug Event filtered new Debug Event events length 1 if filtered length 0 int j 0 for int i 0 i events length i if i index filtered j events i j if more than one event in our thread abort filtering our event if thread Events 1 cleanup return filtered we have the one expected event process it switch event get Kind case Debug Event RESUME next we expect a step end set Expected Event Debug Event SUSPEND Debug Event STEP END if f First Step f First Step false return events include the first resume event else secondary step filter the event return filtered case Debug Event SUSPEND compare location to desired location try final I Java Stack Frame frame I Java Stack Frame get Thread get Top Stack Frame int stack Depth frame get Thread get Stack Frames length String name null if frame is Constructor name frame get Declaring Type Name index name last Index Of if index 0 name name substring index 1 else name frame get Name if name equals get Method get Element Name frame get Signature equals get Signature hit cleanup return events else step again Runnable r null if stack Depth f Original Stack Depth r new Runnable public void run try set Expected Event Debug Event RESUME Debug Event STEP RETURN frame step Return catch Debug Exception e JDI DebugUI Plugin log e cleanup Debug Plugin get Default fire Debug Event Set new Debug Event new Debug Event get Debug Target Debug Event CHANGE else if stack Depth f Original Stack Depth we should be back in the original stack frame if not abort if frame get Signature equals f Original Signature frame get Name equals f Original Name frame get Declaring Type Name equals f Original Type Name missed return events r new Runnable public void run try set Expected Event Debug Event RESUME Debug Event STEP INTO frame step Into catch Debug Exception e JDI DebugUI Plugin log e cleanup Debug Plugin get Default fire Debug Event Set new Debug Event new Debug Event get Debug Target Debug Event CHANGE else we returned from the original frame never hit the desired method missed return events Debug Plugin get Default async Exec r filter the events return filtered catch Core Exception e abort JDI DebugUI Plugin log e cleanup return events execution should not reach here return events  IDebugEventFilter filterDebugEvents DebugEvent DebugEvent filterDebugEvents DebugEvent DebugEvent threadEvents DebugEvent isExpectedEvent threadEvents getSource getThread threadEvents DebugEvent DebugEvent threadEvents getKind DebugEvent setExpectedEvent DebugEvent DebugEvent STEP_END fFirstStep fFirstStep DebugEvent IJavaStackFrame IJavaStackFrame getThread getTopStackFrame stackDepth getThread getStackFrames isConstructor getDeclaringTypeName lastIndexOf getName getMethod getElementName getSignature getSignature stackDepth fOriginalStackDepth setExpectedEvent DebugEvent DebugEvent STEP_RETURN stepReturn DebugException JDIDebugUIPlugin DebugPlugin getDefault fireDebugEventSet DebugEvent DebugEvent getDebugTarget DebugEvent stackDepth fOriginalStackDepth getSignature fOriginalSignature getName fOriginalName getDeclaringTypeName fOriginalTypeName setExpectedEvent DebugEvent DebugEvent STEP_INTO stepInto DebugException JDIDebugUIPlugin DebugPlugin getDefault fireDebugEventSet DebugEvent DebugEvent getDebugTarget DebugEvent DebugPlugin getDefault asyncExec CoreException JDIDebugUIPlugin
Runnable r new Runnable public void run String method Name null try method Name Signature to String get Method get Signature get Method get Element Name get Method get Parameter Names false false catch Java Model Exception e method Name get Method get Element Name new Message Dialog JDI DebugUI Plugin get Active Workbench Shell Action Messages get String Step Into Selection Handler 1 null Message Format format Action Messages get String Step Into Selection Handler Execution did not enter    0    before the current method returned  1 new String method Name Message Dialog INFORMATION new String Action Messages get String Step Into Selection Handler 2 0 open NON NLS 1 NON NLS 2 NON NLS 3  methodName methodName toString getMethod getSignature getMethod getElementName getMethod getParameterNames JavaModelException methodName getMethod getElementName MessageDialog JDIDebugUIPlugin getActiveWorkbenchShell ActionMessages getString StepIntoSelectionHandler MessageFormat ActionMessages getString StepIntoSelectionHandler Execution_did_not_enter___ ___before_the_current_method_returned _1 methodName MessageDialog ActionMessages getString StepIntoSelectionHandler
Called when stepping returned from the original frame without entering the desired method protected void missed cleanup Runnable r new Runnable public void run String method Name null try method Name Signature to String get Method get Signature get Method get Element Name get Method get Parameter Names false false catch Java Model Exception e method Name get Method get Element Name new Message Dialog JDI DebugUI Plugin get Active Workbench Shell Action Messages get String Step Into Selection Handler 1 null Message Format format Action Messages get String Step Into Selection Handler Execution did not enter    0    before the current method returned  1 new String method Name Message Dialog INFORMATION new String Action Messages get String Step Into Selection Handler 2 0 open NON NLS 1 NON NLS 2 NON NLS 3 JDI DebugUI Plugin get Standard Display async Exec r  methodName methodName toString getMethod getSignature getMethod getElementName getMethod getParameterNames JavaModelException methodName getMethod getElementName MessageDialog JDIDebugUIPlugin getActiveWorkbenchShell ActionMessages getString StepIntoSelectionHandler MessageFormat ActionMessages getString StepIntoSelectionHandler Execution_did_not_enter___ ___before_the_current_method_returned _1 methodName MessageDialog ActionMessages getString StepIntoSelectionHandler JDIDebugUIPlugin getStandardDisplay asyncExec
Performs the step public void step add event filter and turn off step filters Debug Plugin get Default add Debug Event Filter this f Step Filter Enabled State get Debug Target is Step Filters Enabled get Debug Target set Step Filters Enabled false try f Original Stack Depth get Thread get Stack Frames length set Expected Event Debug Event RESUME Debug Event STEP INTO get Thread step Into catch Debug Exception e JDI DebugUI Plugin log e cleanup Debug Plugin get Default fire Debug Event Set new Debug Event new Debug Event get Debug Target Debug Event CHANGE  DebugPlugin getDefault addDebugEventFilter fStepFilterEnabledState getDebugTarget isStepFiltersEnabled getDebugTarget setStepFiltersEnabled fOriginalStackDepth getThread getStackFrames setExpectedEvent DebugEvent DebugEvent STEP_INTO getThread stepInto DebugException JDIDebugUIPlugin DebugPlugin getDefault fireDebugEventSet DebugEvent DebugEvent getDebugTarget DebugEvent
Cleans up when the step is complete aborted protected void cleanup Debug Plugin get Default remove Debug Event Filter this restore step filter state get Debug Target set Step Filters Enabled f Step Filter Enabled State  DebugPlugin getDefault removeDebugEventFilter getDebugTarget setStepFiltersEnabled fStepFilterEnabledState
Sets the expected debug event kind and detail we are waiting for next param kind event kind param detail event detail private void set Expected Event int kind int detail f Expected Kind kind f Expected Detail detail  setExpectedEvent fExpectedKind fExpectedDetail
Returns whether the given event is what we expected param event fire event return whether the event is what we expected protected boolean is Expected Event Debug Event event return event get Source equals get Thread event get Kind f Expected Kind event get Detail f Expected Detail  isExpectedEvent DebugEvent getSource getThread getKind fExpectedKind getDetail fExpectedDetail

private boolean f Terminated public void set Active Part I Action action I Workbench Part target Part  fTerminated setActivePart IAction IWorkbenchPart targetPart
display async Exec new Runnable public void run Message Dialog dialog new Message Dialog display get Active Shell Action Messages get String TerminateEvaluationActionTerminate Evaluation 1 null NON NLS 1 Action Messages get String TerminateEvaluationActionAttempts to terminate an evaluation can only stop a series of statements  The currently executing statement  such as a method invocation  cannot be interrupted  2 Message Dialog INFORMATION new String I Dialog Constants OK LABEL 0 NON NLS 1 dialog set Block On Open false dialog open  asyncExec MessageDialog MessageDialog getActiveShell ActionMessages getString TerminateEvaluationActionTerminate_Evaluation_1 ActionMessages getString TerminateEvaluationActionAttempts_to_terminate_an_evaluation_can_only_stop_a_series_of_statements _The_currently_executing_statement_ such_as_a_method_invocation _cannot_be_interrupted _2 MessageDialog IDialogConstants OK_LABEL setBlockOnOpen
Thread timer Thread new Thread new Runnable public void run f Terminated false try Thread sleep 3000 catch Interrupted Exception e return if f Terminated f Terminated true final Display display JDI DebugUI Plugin get Standard Display display async Exec new Runnable public void run Message Dialog dialog new Message Dialog display get Active Shell Action Messages get String TerminateEvaluationActionTerminate Evaluation 1 null NON NLS 1 Action Messages get String TerminateEvaluationActionAttempts to terminate an evaluation can only stop a series of statements  The currently executing statement  such as a method invocation  cannot be interrupted  2 Message Dialog INFORMATION new String I Dialog Constants OK LABEL 0 NON NLS 1 dialog set Block On Open false dialog open  timerThread fTerminated InterruptedException fTerminated fTerminated JDIDebugUIPlugin getStandardDisplay asyncExec MessageDialog MessageDialog getActiveShell ActionMessages getString TerminateEvaluationActionTerminate_Evaluation_1 ActionMessages getString TerminateEvaluationActionAttempts_to_terminate_an_evaluation_can_only_stop_a_series_of_statements _The_currently_executing_statement_ such_as_a_method_invocation _cannot_be_interrupted _2 MessageDialog IDialogConstants OK_LABEL setBlockOnOpen
public void run I Action action if f Thread null return Debug Plugin get Default add Debug Event Listener this Thread timer Thread new Thread new Runnable public void run f Terminated false try Thread sleep 3000 catch Interrupted Exception e return if f Terminated f Terminated true final Display display JDI DebugUI Plugin get Standard Display display async Exec new Runnable public void run Message Dialog dialog new Message Dialog display get Active Shell Action Messages get String TerminateEvaluationActionTerminate Evaluation 1 null NON NLS 1 Action Messages get String TerminateEvaluationActionAttempts to terminate an evaluation can only stop a series of statements  The currently executing statement  such as a method invocation  cannot be interrupted  2 Message Dialog INFORMATION new String I Dialog Constants OK LABEL 0 NON NLS 1 dialog set Block On Open false dialog open timer Thread start try f Thread terminate Evaluation catch Debug Exception exception JDI DebugUI Plugin error Dialog Action Messages get String TerminateEvaluationActionAn exception occurred while terminating the evaluation 3 new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Status ERROR exception get Message exception NON NLS 1  IAction fThread DebugPlugin getDefault addDebugEventListener timerThread fTerminated InterruptedException fTerminated fTerminated JDIDebugUIPlugin getStandardDisplay asyncExec MessageDialog MessageDialog getActiveShell ActionMessages getString TerminateEvaluationActionTerminate_Evaluation_1 ActionMessages getString TerminateEvaluationActionAttempts_to_terminate_an_evaluation_can_only_stop_a_series_of_statements _The_currently_executing_statement_ such_as_a_method_invocation _cannot_be_interrupted _2 MessageDialog IDialogConstants OK_LABEL setBlockOnOpen timerThread fThread terminateEvaluation DebugException JDIDebugUIPlugin errorDialog ActionMessages getString TerminateEvaluationActionAn_exception_occurred_while_terminating_the_evaluation_3 IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus getMessage
public void selection Changed I Action action I Selection selection if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection if ss is Empty ss size 1 return Object element ss get First Element if element instanceof I Java Thread set Thread I Java Thread element  selectionChanged IAction ISelection IStructuredSelection IStructuredSelection IStructuredSelection isEmpty getFirstElement IJavaThread setThread IJavaThread
public void set Thread I Java Thread thread f Thread thread  setThread IJavaThread fThread
public void handle Debug Events Debug Event events Debug Event event for int i 0 num Events events length i num Events i event events i if event get Kind Debug Event SUSPEND 0 event get Source instanceof I Java Thread event is Evaluation f Terminated true Debug Plugin get Default remove Debug Event Listener this  handleDebugEvents DebugEvent DebugEvent numEvents numEvents getKind DebugEvent getSource IJavaThread isEvaluation fTerminated DebugPlugin getDefault removeDebugEventListener

protected void report String message I Workbench Part part I Editor Status Line status Line I Editor Status Line part get Adapter I Editor Status Line class if status Line null if message null status Line set Message true message null else status Line set Message true null null if message null JDI DebugUI Plugin get Active Workbench Shell null JDI DebugUI Plugin get Active Workbench Shell get Display beep  IWorkbenchPart IEditorStatusLine statusLine IEditorStatusLine getAdapter IEditorStatusLine statusLine statusLine setMessage statusLine setMessage JDIDebugUIPlugin getActiveWorkbenchShell JDIDebugUIPlugin getActiveWorkbenchShell getDisplay
protected I Type get Type I Text Selection selection I Member member Action Delegate Helper get Default get Current Member selection I Type type null if member instanceof I Type type I Type member else if member null type member get Declaring Type bug 52385 we don t want local and anonymous types from compilation unit we are getting not always correct names for them try while type null type is Binary type is Local type type get Declaring Type catch Java Model Exception e JDI DebugUI Plugin log e return type  IType getType ITextSelection IMember ActionDelegateHelper getDefault getCurrentMember IType IType IType getDeclaringType isBinary isLocal getDeclaringType JavaModelException JDIDebugUIPlugin
public void toggle Line Breakpoints I Workbench Part part I Selection selection throws Core Exception if selection instanceof I Text Selection report null part I Editor Part editor Part I Editor Part part I Text Selection text Selection I Text Selection selection I Type type get Type text Selection I Editor Input editor Input editor Part get Editor Input I Document document I Text Editor editor Part get Document Provider get Document editor Input int line Number text Selection get Start Line 1 int offset text Selection get Offset try if type null I Class File class File I Class File editor Input get Adapter I Class File class if class File null type class File get Type bug 34856 if this is an inner type ensure the breakpoint is not being added to the outer type if type get Declaring Type null I Source Range source Range type get Source Range int start source Range get Offset int end start source Range get Length if offset start offset end not in the inner type I Status Line Manager status Line editor Part get Editor Site get Action Bars get Status Line Manager status Line set Error Message Message Format format Action Messages get String Manage Breakpoint Ruler Action Breakpoints can only be created within the type associated with the editor   0  1 new String type get Type Qualified Name NON NLS 1 Display get Current beep return String type Name null I Resource resource I Java Line Breakpoint breakpoint null if type null if editor Input instanceof I File Editor Input resource I File Editor Input editor Input get File else resource Resources Plugin get Workspace get Root else type Name type get Fully Qualified Name I Java Line Breakpoint existing Breakpoint JDI Debug Model line Breakpoint Exists type Name line Number if existing Breakpoint null Debug Plugin get Default get Breakpoint Manager remove Breakpoint existing Breakpoint true return resource Breakpoint Utils get Breakpoint Resource type Map attributes new Hash Map 10 try I Region line document get Line Information line Number 1 int start line get Offset int end start line get Length 1 Breakpoint Utils add Java Breakpoint Attributes With Member Details attributes type start end catch Bad Location Exception ble JDI DebugUI Plugin log ble breakpoint JDI Debug Model create Line Breakpoint resource type Name line Number 1 1 0 true attributes new Breakpoint Location Verifier Job document breakpoint line Number type Name type resource I Editor Status Line editor Part get Adapter I Editor Status Line class schedule catch Core Exception ce Exception Handler handle ce Action Messages get String Manage Breakpoint Action Delegate error title1 Action Messages get String Manage Breakpoint Action Delegate error message1 NON NLS 1 NON NLS 2 return  toggleLineBreakpoints IWorkbenchPart ISelection CoreException ITextSelection IEditorPart editorPart IEditorPart ITextSelection textSelection ITextSelection IType getType textSelection IEditorInput editorInput editorPart getEditorInput IDocument ITextEditor editorPart getDocumentProvider getDocument editorInput lineNumber textSelection getStartLine textSelection getOffset IClassFile classFile IClassFile editorInput getAdapter IClassFile classFile classFile getType getDeclaringType ISourceRange sourceRange getSourceRange sourceRange getOffset sourceRange getLength IStatusLineManager statusLine editorPart getEditorSite getActionBars getStatusLineManager statusLine setErrorMessage MessageFormat ActionMessages getString ManageBreakpointRulerAction Breakpoints_can_only_be_created_within_the_type_associated_with_the_editor__ _1 getTypeQualifiedName getCurrent typeName IResource IJavaLineBreakpoint editorInput IFileEditorInput IFileEditorInput editorInput getFile ResourcesPlugin getWorkspace getRoot typeName getFullyQualifiedName IJavaLineBreakpoint existingBreakpoint JDIDebugModel lineBreakpointExists typeName lineNumber existingBreakpoint DebugPlugin getDefault getBreakpointManager removeBreakpoint existingBreakpoint BreakpointUtils getBreakpointResource HashMap IRegion getLineInformation lineNumber getOffset getLength BreakpointUtils addJavaBreakpointAttributesWithMemberDetails BadLocationException JDIDebugUIPlugin JDIDebugModel createLineBreakpoint typeName lineNumber BreakpointLocationVerifierJob lineNumber typeName IEditorStatusLine editorPart getAdapter IEditorStatusLine CoreException ExceptionHandler ActionMessages getString ManageBreakpointActionDelegate ActionMessages getString ManageBreakpointActionDelegate
see org eclipse debug ui actions I Toggle Breakpoints Target can Toggle Line Breakpoints I Workbench Part I Selection public boolean can Toggle Line Breakpoints I Workbench Part part I Selection selection return selection instanceof I Text Selection  IToggleBreakpointsTarget canToggleLineBreakpoints IWorkbenchPart ISelection canToggleLineBreakpoints IWorkbenchPart ISelection ITextSelection
public void toggle Method Breakpoints I Workbench Part part I Selection selection throws Core Exception report null part selection translate To Members part selection if selection instanceof I Text Selection I Text Selection text Selection I Text Selection selection if selection null Compilation Unit compilation Unit parse Compilation Unit I Text Editor part if compilation Unit null Breakpoint Method Locator locator new Breakpoint Method Locator text Selection get Offset compilation Unit accept locator String method Name locator get Method Name if method Name null report Action Messages get String Manage Method Breakpoint Action Delegate Cant Add part NON NLS 1 return String type Name locator get Type Name String method Signature locator get Method Signature if method Signature null report Action Messages get String Manage Method Breakpoint Action Delegate method Non Available part NON NLS 1 return check if this method breakpoint already exist If yes remove it I Breakpoint Manager breakpoint Manager Debug Plugin get Default get Breakpoint Manager I Breakpoint breakpoints breakpoint Manager get Breakpoints JDI Debug Model get Plugin Identifier for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if breakpoint instanceof I Java Method Breakpoint I Java Method Breakpoint method Breakpoint I Java Method Breakpoint breakpoint if type Name equals method Breakpoint get Type Name method Name equals method Breakpoint get Method Name method Signature equals method Breakpoint get Method Signature breakpoint Manager remove Breakpoint method Breakpoint true return add the breakpoint JDI Debug Model create Method Breakpoint get Resource I Editor Part part type Name method Name method Signature true false false 1 1 1 0 true new Hash Map 10 else if selection instanceof I Structured Selection I Method members get Methods I Structured Selection selection if members length 0 report Action Messages get String Toggle Breakpoint Adapter 9 part NON NLS 1 return add or remove the breakpoint I Breakpoint Manager breakpoint Manager Debug Plugin get Default get Breakpoint Manager for int i 0 length members length i length i I Method method members i I Java Breakpoint breakpoint get Breakpoint method if breakpoint null add breakpoint int start 1 int end 1 I Source Range range method get Name Range if range null start range get Offset end start range get Length Map attributes new Hash Map 10 Breakpoint Utils add Java Breakpoint Attributes attributes method String method Name method get Element Name if method is Constructor method Name init NON NLS 1 I Type type method get Declaring Type String method Signature method get Signature if type is Binary resolve the type names method Signature resolve Method Signature type method Signature if method Signature null I Status status new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Status ERROR Source method signature could not be resolved null NON NLS 1 throw new Core Exception status JDI Debug Model create Method Breakpoint Breakpoint Utils get Breakpoint Resource method type get Fully Qualified Name method Name method Signature true false false 1 start end 0 true attributes else remove breakpoint breakpoint Manager remove Breakpoint breakpoint true  toggleMethodBreakpoints IWorkbenchPart ISelection CoreException translateToMembers ITextSelection ITextSelection textSelection ITextSelection CompilationUnit compilationUnit parseCompilationUnit ITextEditor compilationUnit BreakpointMethodLocator BreakpointMethodLocator textSelection getOffset compilationUnit methodName getMethodName methodName ActionMessages getString ManageMethodBreakpointActionDelegate CantAdd typeName getTypeName methodSignature getMethodSignature methodSignature ActionMessages getString ManageMethodBreakpointActionDelegate methodNonAvailable IBreakpointManager breakpointManager DebugPlugin getDefault getBreakpointManager IBreakpoint breakpointManager getBreakpoints JDIDebugModel getPluginIdentifier IBreakpoint IJavaMethodBreakpoint IJavaMethodBreakpoint methodBreakpoint IJavaMethodBreakpoint typeName methodBreakpoint getTypeName methodName methodBreakpoint getMethodName methodSignature methodBreakpoint getMethodSignature breakpointManager removeBreakpoint methodBreakpoint JDIDebugModel createMethodBreakpoint getResource IEditorPart typeName methodName methodSignature HashMap IStructuredSelection IMethod getMethods IStructuredSelection ActionMessages getString ToggleBreakpointAdapter IBreakpointManager breakpointManager DebugPlugin getDefault getBreakpointManager IMethod IJavaBreakpoint getBreakpoint ISourceRange getNameRange getOffset getLength HashMap BreakpointUtils addJavaBreakpointAttributes methodName getElementName isConstructor methodName IType getDeclaringType methodSignature getSignature isBinary methodSignature resolveMethodSignature methodSignature methodSignature IStatus IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus CoreException JDIDebugModel createMethodBreakpoint BreakpointUtils getBreakpointResource getFullyQualifiedName methodName methodSignature breakpointManager removeBreakpoint
public boolean can Toggle Method Breakpoints I Workbench Part part I Selection selection if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection return get Methods ss length 0 else return selection instanceof I Text Selection  canToggleMethodBreakpoints IWorkbenchPart ISelection IStructuredSelection IStructuredSelection IStructuredSelection getMethods ITextSelection
protected I Method get Methods I Structured Selection selection if selection is Empty return new I Method 0 else List methods new Array List selection size Iterator iterator selection iterator while iterator has Next Object thing iterator next try if thing instanceof I Method Flags is Abstract I Method thing get Flags methods add thing catch Java Model Exception e return I Method methods to Array new I Method methods size  IMethod getMethods IStructuredSelection isEmpty IMethod ArrayList hasNext IMethod isAbstract IMethod getFlags JavaModelException IMethod toArray IMethod
protected I Field get Fields I Structured Selection selection if selection is Empty return new I Field 0 else List fields new Array List selection size Iterator iterator selection iterator while iterator has Next Object thing iterator next if thing instanceof I Field fields add thing else if thing instanceof I Java Field Variable I Field field get Field I Java Field Variable thing if field null fields add field return I Field fields to Array new I Field fields size  IField getFields IStructuredSelection isEmpty IField ArrayList hasNext IField IJavaFieldVariable IField getField IJavaFieldVariable IField toArray IField
private boolean is Fields I Structured Selection selection if selection is Empty Iterator iterator selection iterator while iterator has Next Object thing iterator next if thing instanceof I Field thing instanceof I Java Field Variable return false return true return false  isFields IStructuredSelection isEmpty hasNext IField IJavaFieldVariable
public void toggle Watchpoints I Workbench Part part I Selection selection throws Core Exception report null part selection translate To Members part selection if selection instanceof I Text Selection I Text Selection text Selection I Text Selection selection Compilation Unit compilation Unit parse Compilation Unit I Text Editor part if compilation Unit null Breakpoint Field Locator locator new Breakpoint Field Locator text Selection get Offset compilation Unit accept locator String field Name locator get Field Name if field Name null report Action Messages get String Manage Watchpoint Action Delegate Cant Add part NON NLS 1 return String type Name locator get Type Name check if the watchpoint already exists If yes remove it I Breakpoint Manager breakpoint Manager Debug Plugin get Default get Breakpoint Manager I Breakpoint breakpoints breakpoint Manager get Breakpoints JDI Debug Model get Plugin Identifier for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if breakpoint instanceof I Java Watchpoint I Java Watchpoint watchpoint I Java Watchpoint breakpoint if type Name equals watchpoint get Type Name field Name equals watchpoint get Field Name breakpoint Manager remove Breakpoint watchpoint true return add the watchpoint JDI Debug Model create Watchpoint get Resource I Editor Part part type Name field Name 1 1 1 0 true new Hash Map 10 else if selection instanceof I Structured Selection I Field members get Fields I Structured Selection selection if members length 0 report Action Messages get String Toggle Breakpoint Adapter 10 part NON NLS 1 return add or remove watchpoint I Breakpoint Manager breakpoint Manager Debug Plugin get Default get Breakpoint Manager for int i 0 length members length i length i I Field element members i I Java Breakpoint breakpoint get Breakpoint element if breakpoint null I Type type element get Declaring Type int start 1 int end 1 I Source Range range element get Name Range if range null start range get Offset end start range get Length Map attributes new Hash Map 10 Breakpoint Utils add Java Breakpoint Attributes attributes element JDI Debug Model create Watchpoint Breakpoint Utils get Breakpoint Resource type type get Fully Qualified Name element get Element Name 1 start end 0 true attributes else remove breakpoint breakpoint Manager remove Breakpoint breakpoint true  toggleWatchpoints IWorkbenchPart ISelection CoreException translateToMembers ITextSelection ITextSelection textSelection ITextSelection CompilationUnit compilationUnit parseCompilationUnit ITextEditor compilationUnit BreakpointFieldLocator BreakpointFieldLocator textSelection getOffset compilationUnit fieldName getFieldName fieldName ActionMessages getString ManageWatchpointActionDelegate CantAdd typeName getTypeName IBreakpointManager breakpointManager DebugPlugin getDefault getBreakpointManager IBreakpoint breakpointManager getBreakpoints JDIDebugModel getPluginIdentifier IBreakpoint IJavaWatchpoint IJavaWatchpoint IJavaWatchpoint typeName getTypeName fieldName getFieldName breakpointManager removeBreakpoint JDIDebugModel createWatchpoint getResource IEditorPart typeName fieldName HashMap IStructuredSelection IField getFields IStructuredSelection ActionMessages getString ToggleBreakpointAdapter IBreakpointManager breakpointManager DebugPlugin getDefault getBreakpointManager IField IJavaBreakpoint getBreakpoint IType getDeclaringType ISourceRange getNameRange getOffset getLength HashMap BreakpointUtils addJavaBreakpointAttributes JDIDebugModel createWatchpoint BreakpointUtils getBreakpointResource getFullyQualifiedName getElementName breakpointManager removeBreakpoint
public static String resolve Method Signature I Type type String method Signature throws Java Model Exception String parameter Types Signature get Parameter Types method Signature int length length parameter Types length String resolved Parameter Types new String length for int i 0 i length i resolved Parameter Types i resolve Type type parameter Types i if resolved Parameter Types i null return null String resolved Return Type resolve Type type Signature get Return Type method Signature if resolved Return Type null return null return Signature create Method Signature resolved Parameter Types resolved Return Type  resolveMethodSignature IType methodSignature JavaModelException parameterTypes getParameterTypes methodSignature parameterTypes resolvedParameterTypes resolvedParameterTypes resolveType parameterTypes resolvedParameterTypes resolvedReturnType resolveType getReturnType methodSignature resolvedReturnType createMethodSignature resolvedParameterTypes resolvedReturnType
private static String resolve Type I Type type String type Signature throws Java Model Exception int count Signature get Array Count type Signature String element Type Signature Signature get Element Type type Signature if element Type Signature length 1 no need to resolve primitive types return type Signature String element Type Name Signature to String element Type Signature String resolved Element Type Names type resolve Type element Type Name if resolved Element Type Names null resolved Element Type Names length 1 the type name cannot be resolved return null String resolved Element Type Name Signature to Qualified Name resolved Element Type Names 0 String resolved Element Type Signature Signature create Type Signature resolved Element Type Name true replace return Signature create Array Signature resolved Element Type Signature count  resolveType IType typeSignature JavaModelException getArrayCount typeSignature elementTypeSignature getElementType typeSignature elementTypeSignature typeSignature elementTypeName toString elementTypeSignature resolvedElementTypeNames resolveType elementTypeName resolvedElementTypeNames resolvedElementTypeNames resolvedElementTypeName toQualifiedName resolvedElementTypeNames resolvedElementTypeSignature createTypeSignature resolvedElementTypeName createArraySignature resolvedElementTypeSignature
protected static I Resource get Resource I Editor Part editor I Resource resource I Editor Input editor Input editor get Editor Input if editor Input instanceof I File Editor Input resource I File Editor Input editor Input get File else resource Resources Plugin get Workspace get Root return resource  IResource getResource IEditorPart IResource IEditorInput editorInput getEditorInput editorInput IFileEditorInput IFileEditorInput editorInput getFile ResourcesPlugin getWorkspace getRoot
Returns a handle to the specified method or code null code if none param editor Part the editor containing the method param type Name param method Name param signature return handle or code null code protected I Method get Method Handle I Editor Part editor Part String type Name String method Name String signature throws Core Exception I Java Element element I Java Element editor Part get Editor Input get Adapter I Java Element class I Type type null if element instanceof I Compilation Unit I Type types I Compilation Unit element get All Types for int i 0 i types length i if types i get Fully Qualified Name equals type Name type types i break else if element instanceof I Class File type I Class File element get Type if type null String sigs Signature get Parameter Types signature return type get Method method Name sigs return null  editorPart typeName methodName IMethod getMethodHandle IEditorPart editorPart typeName methodName CoreException IJavaElement IJavaElement editorPart getEditorInput getAdapter IJavaElement IType ICompilationUnit IType ICompilationUnit getAllTypes getFullyQualifiedName typeName IClassFile IClassFile getType getParameterTypes getMethod methodName
protected I Java Breakpoint get Breakpoint I Member element I Breakpoint Manager breakpoint Manager Debug Plugin get Default get Breakpoint Manager I Breakpoint breakpoints breakpoint Manager get Breakpoints JDI Debug Model get Plugin Identifier if element instanceof I Method I Method method I Method element for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if breakpoint instanceof I Java Method Breakpoint I Java Method Breakpoint method Breakpoint I Java Method Breakpoint breakpoint I Member container null try container Breakpoint Utils get Member method Breakpoint catch Core Exception e JDI DebugUI Plugin log e return null if container null try if method get Declaring Type get Fully Qualified Name equals method Breakpoint get Type Name method get Element Name equals method Breakpoint get Method Name method get Signature equals method Breakpoint get Method Signature return method Breakpoint catch Core Exception e JDI DebugUI Plugin log e else if container instanceof I Method if method get Declaring Type get Fully Qualified Name equals container get Declaring Type get Fully Qualified Name if method is Similar I Method container return method Breakpoint else if element instanceof I Field for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if breakpoint instanceof I Java Watchpoint try if equal Fields element I Java Watchpoint breakpoint return I Java Breakpoint breakpoint catch Core Exception e JDI DebugUI Plugin log e return null  IJavaBreakpoint getBreakpoint IMember IBreakpointManager breakpointManager DebugPlugin getDefault getBreakpointManager IBreakpoint breakpointManager getBreakpoints JDIDebugModel getPluginIdentifier IMethod IMethod IMethod IBreakpoint IJavaMethodBreakpoint IJavaMethodBreakpoint methodBreakpoint IJavaMethodBreakpoint IMember BreakpointUtils getMember methodBreakpoint CoreException JDIDebugUIPlugin getDeclaringType getFullyQualifiedName methodBreakpoint getTypeName getElementName methodBreakpoint getMethodName getSignature methodBreakpoint getMethodSignature methodBreakpoint CoreException JDIDebugUIPlugin IMethod getDeclaringType getFullyQualifiedName getDeclaringType getFullyQualifiedName isSimilar IMethod methodBreakpoint IField IBreakpoint IJavaWatchpoint equalFields IJavaWatchpoint IJavaBreakpoint CoreException JDIDebugUIPlugin
Compare two fields The default code equals code method for code I Field code doesn t give the comparison desired private boolean equal Fields I Member breakpoint Field I Java Watchpoint watchpoint throws Core Exception return breakpoint Field get Element Name equals watchpoint get Field Name breakpoint Field get Declaring Type get Fully Qualified Name equals watchpoint get Type Name  IField equalFields IMember breakpointField IJavaWatchpoint CoreException breakpointField getElementName getFieldName breakpointField getDeclaringType getFullyQualifiedName getTypeName
protected Compilation Unit parse Compilation Unit I Text Editor editor I Editor Input editor Input editor get Editor Input I Document document editor get Document Provider get Document editor Input AST Parser parser AST Parser new Parser AST JLS2 parser set Source document get to Char Array return Compilation Unit parser createAST null  CompilationUnit parseCompilationUnit ITextEditor IEditorInput editorInput getEditorInput IDocument getDocumentProvider getDocument editorInput ASTParser ASTParser newParser setSource toCharArray CompilationUnit
public boolean can Toggle Watchpoints I Workbench Part part I Selection selection if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection return is Fields ss else return selection instanceof I Text Selection  canToggleWatchpoints IWorkbenchPart ISelection IStructuredSelection IStructuredSelection IStructuredSelection isFields ITextSelection
Returns a selection of the member in the given text selection or the original selection if none param part param selection return a structured selection of the member in the given text selection or the original selection if none exception Core Exception if an exceptoin occurrs protected I Selection translate To Members I Workbench Part part I Selection selection throws Core Exception if selection instanceof I Text Selection part instanceof I Editor Part I Text Selection text Selection I Text Selection selection I Editor Part editor Part I Editor Part part I Editor Input editor Input editor Part get Editor Input I Member m null I Class File class File I Class File editor Input get Adapter I Class File class if class File null I Java Element e class File get Element At text Selection get Offset if e instanceof I Member m I Member e else I Working Copy Manager manager JavaUI get Working Copy Manager I Compilation Unit unit manager get Working Copy editor Input if unit null synchronized unit unit reconcile I Compilation Unit NO AST don t create ast false don t force problem detection null use primary owner null no progress monitor I Java Element e unit get Element At text Selection get Offset if e instanceof I Member m I Member e if m null return new Structured Selection m return selection  CoreException ISelection translateToMembers IWorkbenchPart ISelection CoreException ITextSelection IEditorPart ITextSelection textSelection ITextSelection IEditorPart editorPart IEditorPart IEditorInput editorInput editorPart getEditorInput IMember IClassFile classFile IClassFile editorInput getAdapter IClassFile classFile IJavaElement classFile getElementAt textSelection getOffset IMember IMember IWorkingCopyManager getWorkingCopyManager ICompilationUnit getWorkingCopy editorInput ICompilationUnit NO_AST IJavaElement getElementAt textSelection getOffset IMember IMember StructuredSelection
Returns a list of matching types I Type Java model that correspond to the given type name in the context of the given launch protected static List search For Types String type Name I Launch launch List types new Array List if launch null return types I Launch Configuration configuration launch get Launch Configuration I Java Project java Projects null I Workspace workspace Resources Plugin get Workspace if configuration null Launch configuration support try String project Name configuration get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME NON NLS 1 if project Name length 0 java Projects new I Java Project Java Core create workspace get Root get Project project Name else I Project projects Resources Plugin get Workspace get Root get Projects I Project project List project List new Array List for int i 0 num Projects projects length i num Projects i project projects i if project is Accessible project has Nature Java Core NATURE ID project List add Java Core create project java Projects new I Java Project project List size project List to Array java Projects catch Core Exception e JDI DebugUI Plugin log e if java Projects null return types Search Engine engine new Search Engine I Java Search Scope scope Search Engine create Java Search Scope java Projects true Array List type Refs Found new Array List 3 I Type Name Requestor requestor new Type Info Requestor type Refs Found try engine search All Type Names get Package type Name get Type Name type Name Search Pattern R EXACT MATCH Search Pattern R CASE SENSITIVE I Java Search Constants CLASS scope requestor I Java Search Constants WAIT UNTIL READY TO SEARCH null catch Java Model Exception x JDI DebugUI Plugin log x return types Iterator iter type Refs Found iterator Type Info type Info null while iter has Next type Info Type Info iter next try types add type Info resolve Type scope catch Java Model Exception jme JDI DebugUI Plugin log jme return types  IType searchForTypes typeName ILaunch ArrayList ILaunchConfiguration getLaunchConfiguration IJavaProject javaProjects IWorkspace ResourcesPlugin getWorkspace projectName getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME projectName javaProjects IJavaProject JavaCore getRoot getProject projectName IProject ResourcesPlugin getWorkspace getRoot getProjects IProject projectList ArrayList numProjects numProjects isAccessible hasNature JavaCore NATURE_ID projectList JavaCore javaProjects IJavaProject projectList projectList toArray javaProjects CoreException JDIDebugUIPlugin javaProjects SearchEngine SearchEngine IJavaSearchScope SearchEngine createJavaSearchScope javaProjects ArrayList typeRefsFound ArrayList ITypeNameRequestor TypeInfoRequestor typeRefsFound searchAllTypeNames getPackage typeName getTypeName typeName SearchPattern R_EXACT_MATCH SearchPattern R_CASE_SENSITIVE IJavaSearchConstants IJavaSearchConstants WAIT_UNTIL_READY_TO_SEARCH JavaModelException JDIDebugUIPlugin typeRefsFound TypeInfo typeInfo hasNext typeInfo TypeInfo typeInfo resolveType JavaModelException JDIDebugUIPlugin
Returns the package name of the given fully qualified type name The package name is assumed to be the dot separated prefix of the type name private static char get Package String fully Qualified Name int index fully Qualified Name last Index Of if index 1 return new char 0 return fully Qualified Name substring 0 index to Char Array  getPackage fullyQualifiedName fullyQualifiedName lastIndexOf fullyQualifiedName toCharArray
Returns a simple type name from the given fully qualified type name The type name is assumed to be the last contiguous segment of the fully Qualified Name not containing a or private static char get Type Name String fully Qualified Name int index fully Qualified Name last Index Of String type Name fully Qualified Name if index 0 type Name fully Qualified Name substring index 1 index type Name last Index Of if index 0 type Name type Name substring index 1 return type Name to Char Array  fullyQualifiedName getTypeName fullyQualifiedName fullyQualifiedName lastIndexOf typeName fullyQualifiedName typeName fullyQualifiedName typeName lastIndexOf typeName typeName typeName toCharArray
Return the associated I Field Java model for the given I Java Field Variable JDI model private I Field get Field I Java Field Variable variable String var Name null try var Name variable get Name catch Debug Exception x JDI DebugUI Plugin log x return null I Field field String declaring Type null try declaring Type variable get Declaring Type get Name catch Debug Exception x JDI DebugUI Plugin log x return null List types search For Types declaring Type variable get Launch Iterator iter types iterator while iter has Next I Type type I Type iter next field type get Field var Name if field exists return field return null  IField IJavaFieldVariable IField getField IJavaFieldVariable varName varName getName DebugException JDIDebugUIPlugin IField declaringType declaringType getDeclaringType getName DebugException JDIDebugUIPlugin searchForTypes declaringType getLaunch hasNext IType IType getField varName

param compilation Unit the JDOM Compilation Unit of the source code param line Number the line number in the source code where to put the breakpoint public Valid Breakpoint Location Locator Compilation Unit compilation Unit int line Number f Compilation Unit compilation Unit f Line Number line Number f Location Found false  compilationUnit CompilationUnit lineNumber ValidBreakpointLocationLocator CompilationUnit compilationUnit lineNumber fCompilationUnit compilationUnit fLineNumber lineNumber fLocationFound
Return the line number of the computed valid location or 1 if no valid location has been found public int get Valid Location if f Location Found return f Location else return 1  getValidLocation fLocationFound fLocation
Return of the type where the valid location is or null if no valid location has been found public String get Fully Qualified Type Name return f Type Name  getFullyQualifiedTypeName fTypeName
Compute the name of the type which contains this node Result will be the name of the type or the inner type which contains this node but not of the local or anonymous type static protected String compute Type Name AST Node node String type Name null while node instanceof Compilation Unit if node instanceof Type Declaration String identifier Type Declaration node get Name get Identifier if type Name null type Name identifier else type Name identifier type Name NON NLS 1 else type Name null node node get Parent Package Declaration package Decl Compilation Unit node get Package String package Identifier NON NLS 1 if package Decl null Name package Name package Decl get Name while package Name is Qualified Name Qualified Name qualified Name Qualified Name package Name package Identifier qualified Name get Name get Identifier package Identifier NON NLS 1 package Name qualified Name get Qualifier package Identifier Simple Name package Name get Identifier package Identifier NON NLS 1 return package Identifier type Name  computeTypeName ASTNode typeName CompilationUnit TypeDeclaration TypeDeclaration getName getIdentifier typeName typeName typeName typeName typeName getParent PackageDeclaration packageDecl CompilationUnit getPackage packageIdentifier packageDecl packageName packageDecl getName packageName isQualifiedName QualifiedName qualifiedName QualifiedName packageName packageIdentifier qualifiedName getName getIdentifier packageIdentifier packageName qualifiedName getQualifier packageIdentifier SimpleName packageName getIdentifier packageIdentifier packageIdentifier typeName
Return code true code if this node children may contain a valid location for the breakpoint param node the node param is Code true indicated that the first line of the given node always contains some executable code even if split in multiple lines private boolean visit AST Node node boolean is Code int start Position node get Start Position int start Line f Compilation Unit line Number start Position int end Line f Compilation Unit line Number start Position node get Length 1 if we already found a correct location or if the position is not in this part of the code no need to check the element inside if f Location Found end Line f Line Number return false if the first line of this node always represents some executable code and the breakpoint is requested on this line or on a previous line this is a valid location if is Code f Line Number start Line f Location start Line f Location Found true f Type Name compute Type Name node return false return true  isCode ASTNode isCode startPosition getStartPosition startLine fCompilationUnit lineNumber startPosition endLine fCompilationUnit lineNumber startPosition getLength fLocationFound endLine fLineNumber isCode fLineNumber startLine fLocation startLine fLocationFound fTypeName computeTypeName
private boolean is Replaced By Constant Value Expression node switch node get Node Type litterals are constant case AST Node BOOLEAN LITERAL case AST Node CHARACTER LITERAL case AST Node NUMBER LITERAL case AST Node STRING LITERAL return true case AST Node INFIX EXPRESSION return is Replaced By Constant Value Infix Expression node case AST Node PREFIX EXPRESSION return is Replaced By Constant Value Prefix Expression node default return false  isReplacedByConstantValue getNodeType ASTNode BOOLEAN_LITERAL ASTNode CHARACTER_LITERAL ASTNode NUMBER_LITERAL ASTNode STRING_LITERAL ASTNode INFIX_EXPRESSION isReplacedByConstantValue InfixExpression ASTNode PREFIX_EXPRESSION isReplacedByConstantValue PrefixExpression
private boolean is Replaced By Constant Value Infix Expression node if all operands are constant value the expression is replaced by a constant value if is Replaced By Constant Value node get Left Operand is Replaced By Constant Value node get Right Operand return false if node has Extended Operands for Iterator iter node extended Operands iterator iter has Next if is Replaced By Constant Value Expression iter next return false return true  isReplacedByConstantValue InfixExpression isReplacedByConstantValue getLeftOperand isReplacedByConstantValue getRightOperand hasExtendedOperands extendedOperands hasNext isReplacedByConstantValue
private boolean is Replaced By Constant Value Prefix Expression node for and if the operand is a constant value the expression is replaced by a constant value Operator operator node get Operator if operator Prefix Expression Operator INCREMENT operator Prefix Expression Operator DECREMENT return is Replaced By Constant Value node get Operand return false  isReplacedByConstantValue PrefixExpression getOperator PrefixExpression PrefixExpression isReplacedByConstantValue getOperand
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Anonymous Class Declaration public boolean visit Anonymous Class Declaration node return visit node false  ASTVisitor AnonymousClassDeclaration AnonymousClassDeclaration
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Array Access public boolean visit Array Access node return visit node true  ASTVisitor ArrayAccess ArrayAccess
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Array Creation public boolean visit Array Creation node return visit node node get Initializer null  ASTVisitor ArrayCreation ArrayCreation getInitializer
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Array Initializer public boolean visit Array Initializer node return visit node true  ASTVisitor ArrayInitializer ArrayInitializer
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Array Type public boolean visit Array Type node return false  ASTVisitor ArrayType ArrayType
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Assert Statement public boolean visit Assert Statement node return visit node true  ASTVisitor AssertStatement AssertStatement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Assignment public boolean visit Assignment node return visit node true  ASTVisitor
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Block public boolean visit Block node if visit node false if node statements is Empty node get Parent get Node Type AST Node METHOD DECLARATION in case of an empty method set the breakpoint on the last line of the empty block f Location f Compilation Unit line Number node get Start Position node get Length 1 f Location Found true f Type Name compute Type Name node return false return true return false  ASTVisitor isEmpty getParent getNodeType ASTNode METHOD_DECLARATION fLocation fCompilationUnit lineNumber getStartPosition getLength fLocationFound fTypeName computeTypeName
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Boolean Literal public boolean visit Boolean Literal node return visit node true  ASTVisitor BooleanLiteral BooleanLiteral
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Break Statement public boolean visit Break Statement node return visit node true  ASTVisitor BreakStatement BreakStatement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Cast Expression public boolean visit Cast Expression node return visit node true  ASTVisitor CastExpression CastExpression
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Catch Clause public boolean visit Catch Clause node return visit node false  ASTVisitor CatchClause CatchClause
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Character Literal public boolean visit Character Literal node return visit node true  ASTVisitor CharacterLiteral CharacterLiteral
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Class Instance Creation public boolean visit Class Instance Creation node return visit node true  ASTVisitor ClassInstanceCreation ClassInstanceCreation
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Compilation Unit public boolean visit Compilation Unit node return visit node false  ASTVisitor CompilationUnit CompilationUnit
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Conditional Expression public boolean visit Conditional Expression node return visit node true  ASTVisitor ConditionalExpression ConditionalExpression
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Constructor Invocation public boolean visit Constructor Invocation node return visit node true  ASTVisitor ConstructorInvocation ConstructorInvocation
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Continue Statement public boolean visit Continue Statement node return visit node true  ASTVisitor ContinueStatement ContinueStatement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Do Statement public boolean visit Do Statement node return visit node false  ASTVisitor DoStatement DoStatement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Empty Statement public boolean visit Empty Statement node return false  ASTVisitor EmptyStatement EmptyStatement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Expression Statement public boolean visit Expression Statement node return visit node false  ASTVisitor ExpressionStatement ExpressionStatement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Field Access public boolean visit Field Access node return visit node false  ASTVisitor FieldAccess FieldAccess
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Field Declaration public boolean visit Field Declaration node if visit node false visit only the variable declaration fragments no the variable names List fragments node fragments for Iterator iter fragments iterator iter has Next Variable Declaration Fragment iter next accept this return false  ASTVisitor FieldDeclaration FieldDeclaration hasNext VariableDeclarationFragment
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom For Statement public boolean visit For Statement node in case on a for the breakpoint can be set on the first token of the node return visit node node initializers is Empty node get Expression null node updaters is Empty  ASTVisitor ForStatement ForStatement isEmpty getExpression isEmpty
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom If Statement public boolean visit If Statement node return visit node false  ASTVisitor IfStatement IfStatement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Import Declaration public boolean visit Import Declaration node return false  ASTVisitor ImportDeclaration ImportDeclaration
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Infix Expression public boolean visit Infix Expression node if visit node false if is Replaced By Constant Value node f Location f Compilation Unit line Number node get Start Position f Location Found true f Type Name compute Type Name node return false return true return false  ASTVisitor InfixExpression InfixExpression isReplacedByConstantValue fLocation fCompilationUnit lineNumber getStartPosition fLocationFound fTypeName computeTypeName
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Initializer public boolean visit Initializer node return visit node false  ASTVisitor
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Instanceof Expression public boolean visit Instanceof Expression node return visit node true  ASTVisitor InstanceofExpression InstanceofExpression
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Javadoc public boolean visit Javadoc node return false  ASTVisitor
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Labeled Statement public boolean visit Labeled Statement node return visit node false  ASTVisitor LabeledStatement LabeledStatement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Method Declaration public boolean visit Method Declaration node if visit node false visit only the body Block body node get Body if body null body is null for abstract methods body accept this return false  ASTVisitor MethodDeclaration MethodDeclaration getBody
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Method Invocation public boolean visit Method Invocation node return visit node true  ASTVisitor MethodInvocation MethodInvocation
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Null Literal public boolean visit Null Literal node return visit node true  ASTVisitor NullLiteral NullLiteral
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Number Literal public boolean visit Number Literal node return visit node true  ASTVisitor NumberLiteral NumberLiteral
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Package Declaration public boolean visit Package Declaration node return false  ASTVisitor PackageDeclaration PackageDeclaration
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Parenthesized Expression public boolean visit Parenthesized Expression node return visit node false  ASTVisitor ParenthesizedExpression ParenthesizedExpression
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Postfix Expression public boolean visit Postfix Expression node return visit node true  ASTVisitor PostfixExpression PostfixExpression
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Prefix Expression public boolean visit Prefix Expression node if visit node false if is Replaced By Constant Value node f Location f Compilation Unit line Number node get Start Position f Location Found true f Type Name compute Type Name node return false return true return false  ASTVisitor PrefixExpression PrefixExpression isReplacedByConstantValue fLocation fCompilationUnit lineNumber getStartPosition fLocationFound fTypeName computeTypeName
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Primitive Type public boolean visit Primitive Type node return false  ASTVisitor PrimitiveType PrimitiveType
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Qualified Name public boolean visit Qualified Name node visit node true return false  ASTVisitor QualifiedName QualifiedName
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Return Statement public boolean visit Return Statement node return visit node true  ASTVisitor ReturnStatement ReturnStatement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Simple Name public boolean visit Simple Name node return visit node true  ASTVisitor SimpleName SimpleName
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Simple Type public boolean visit Simple Type node return false  ASTVisitor SimpleType SimpleType
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Single Variable Declaration public boolean visit Single Variable Declaration node return visit node false  ASTVisitor SingleVariableDeclaration SingleVariableDeclaration
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom String Literal public boolean visit String Literal node return visit node true  ASTVisitor StringLiteral StringLiteral
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Super Constructor Invocation public boolean visit Super Constructor Invocation node return visit node true  ASTVisitor SuperConstructorInvocation SuperConstructorInvocation
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Super Field Access public boolean visit Super Field Access node return visit node true  ASTVisitor SuperFieldAccess SuperFieldAccess
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Super Method Invocation public boolean visit Super Method Invocation node return visit node true  ASTVisitor SuperMethodInvocation SuperMethodInvocation
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Switch Case public boolean visit Switch Case node return false  ASTVisitor SwitchCase SwitchCase
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Switch Statement public boolean visit Switch Statement node return visit node false  ASTVisitor SwitchStatement SwitchStatement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Synchronized Statement public boolean visit Synchronized Statement node return visit node false  ASTVisitor SynchronizedStatement SynchronizedStatement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom This Expression public boolean visit This Expression node return visit node true  ASTVisitor ThisExpression ThisExpression
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Throw Statement public boolean visit Throw Statement node return visit node true  ASTVisitor ThrowStatement ThrowStatement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Try Statement public boolean visit Try Statement node return visit node false  ASTVisitor TryStatement TryStatement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Type Declaration public boolean visit Type Declaration node if visit node false visit only the elements of the type declaration List body Declaration node body Declarations for Iterator iter body Declaration iterator iter has Next Body Declaration iter next accept this return false  ASTVisitor TypeDeclaration TypeDeclaration bodyDeclaration bodyDeclarations bodyDeclaration hasNext BodyDeclaration
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Type Declaration Statement public boolean visit Type Declaration Statement node return visit node false  ASTVisitor TypeDeclarationStatement TypeDeclarationStatement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Type Literal public boolean visit Type Literal node return false  ASTVisitor TypeLiteral TypeLiteral
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Variable Declaration Expression public boolean visit Variable Declaration Expression node return visit node false  ASTVisitor VariableDeclarationExpression VariableDeclarationExpression
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Variable Declaration Fragment public boolean visit Variable Declaration Fragment node Expression initializer node get Initializer if visit node false initializer null visit node get Name true initializer accept this return false  ASTVisitor VariableDeclarationFragment VariableDeclarationFragment getInitializer getName
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom Variable Declaration Statement public boolean visit Variable Declaration Statement node return visit node false  ASTVisitor VariableDeclarationStatement VariableDeclarationStatement
see org eclipse jdt core dom AST Visitor visit org eclipse jdt core dom While Statement public boolean visit While Statement node return visit node false  ASTVisitor WhileStatement WhileStatement

private I Action f Action public View Filter Action super  IAction fAction ViewFilterAction
public void init I View Part view f View view f Action set Checked get Preference Value view run f Action  IViewPart fView fAction setChecked getPreferenceValue fAction
see org eclipse ui I Action Delegate2 init org eclipse jface action I Action public void init I Action action f Action action  IActionDelegate2 IAction IAction fAction
see org eclipse ui I Action Delegate2 dispose public void dispose  IActionDelegate2
see org eclipse ui I Action Delegate2 run With Event org eclipse jface action I Action org eclipse swt widgets Event public void run With Event I Action action Event event run action  IActionDelegate2 runWithEvent IAction runWithEvent IAction
public void run I Action action Structured Viewer viewer get Structured Viewer Viewer Filter filters viewer get Filters Viewer Filter filter null for int i 0 i filters length i if filters i this filter filters i break if filter null viewer add Filter this viewer refresh I Preference Store store get Preference Store String key get View get Site get Id get Preference Key NON NLS 1 store set Value key action is Checked JDI DebugUI Plugin get Default save Plugin Preferences  IAction StructuredViewer getStructuredViewer ViewerFilter getFilters ViewerFilter addFilter IPreferenceStore getPreferenceStore getView getSite getId getPreferenceKey setValue isChecked JDIDebugUIPlugin getDefault savePluginPreferences
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection
protected I Preference Store get Preference Store return JDI DebugUI Plugin get Default get Preference Store  IPreferenceStore getPreferenceStore JDIDebugUIPlugin getDefault getPreferenceStore
Returns the value of this filters preference on off for the given view param part return boolean protected boolean get Preference Value I View Part part String base Key get Preference Key String view Key part get Site get Id String composite Key view Key base Key NON NLS 1 I Preference Store store get Preference Store boolean value false if store contains composite Key value store get Boolean composite Key else value store get Boolean base Key return value  getPreferenceValue IViewPart baseKey getPreferenceKey viewKey getSite getId compositeKey viewKey baseKey IPreferenceStore getPreferenceStore compositeKey getBoolean compositeKey getBoolean baseKey
Returns the key for this action s preference return String 
protected abstract String get Preference Key protected I View Part get View return f View  getPreferenceKey IViewPart getView fView
protected Structured Viewer get Structured Viewer I Debug View view I Debug View get View get Adapter I Debug View class if view null Viewer viewer view get Viewer if viewer instanceof Structured Viewer return Structured Viewer viewer return null  StructuredViewer getStructuredViewer IDebugView IDebugView getView getAdapter IDebugView getViewer StructuredViewer StructuredViewer
Returns whether this action is seleted checked return whether this action is seleted checked protected boolean get Value return f Action is Checked  getValue fAction isChecked

public void run Object selected Object get Selected Object if selected Object instanceof I Structured Selection I Structured Selection selection I Structured Selection selected Object Iterator elements selection iterator while elements has Next try create Watch Expression I Java Variable elements next get Name catch Debug Exception e JDI DebugUI Plugin log e return show Expression View else if selected Object instanceof String create Watch Expression String selected Object show Expression View  selectedObject getSelectedObject selectedObject IStructuredSelection IStructuredSelection IStructuredSelection selectedObject hasNext createWatchExpression IJavaVariable getName DebugException JDIDebugUIPlugin showExpressionView selectedObject createWatchExpression selectedObject showExpressionView
private void create Watch Expression String snippet I Watch Expression expression Debug Plugin get Default get Expression Manager new Watch Expression snippet Debug Plugin get Default get Expression Manager add Expression expression I Adaptable object DebugUI Tools get Debug Context I Debug Element context null if object instanceof I Debug Element context I Debug Element object else if object instanceof I Launch context I Launch object get Debug Target expression set Expression Context context  createWatchExpression IWatchExpression DebugPlugin getDefault getExpressionManager newWatchExpression DebugPlugin getDefault getExpressionManager addExpression IAdaptable DebugUITools getDebugContext IDebugElement IDebugElement IDebugElement ILaunch ILaunch getDebugTarget setExpressionContext

private int f Position public Breakpoint Condition Completion Processor I Type type f Type type  fPosition BreakpointConditionCompletionProcessor IType fType
see org eclipse jface text contentassist I Content Assist Processor compute Completion Proposals I Text Viewer int public I Completion Proposal compute Completion Proposals I Text Viewer viewer int document Offset if f Type null return new I Completion Proposal 0 I Java Project project f Type get Java Project try Generate selections from the compilation unit I Text Selection text Selection I Text Selection viewer get Selection Provider get Selection configure Result Collector project text Selection f Type code Complete viewer get Document get to Char Array f Position document Offset new char 0 new char 0 new int 0 false get Collector I Java Completion Proposal results get Collector get Results Generate selections from the template engine Template Engine template Engine get Template Engine if template Engine null template Engine reset template Engine complete viewer document Offset null Template Proposal template Results template Engine get Results concatenate arrays I Java Completion Proposal total new I Java Completion Proposal results length template Results length System arraycopy template Results 0 total 0 template Results length System arraycopy results 0 total template Results length results length results total Order here and not in result collector to make sure that the order applies to all proposals and not just those of the compilation unit return order results catch Java Model Exception x handle viewer x return null  IContentAssistProcessor computeCompletionProposals ITextViewer ICompletionProposal computeCompletionProposals ITextViewer documentOffset fType ICompletionProposal IJavaProject fType getJavaProject ITextSelection textSelection ITextSelection getSelectionProvider getSelection configureResultCollector textSelection fType codeComplete getDocument toCharArray fPosition documentOffset getCollector IJavaCompletionProposal getCollector getResults TemplateEngine templateEngine getTemplateEngine templateEngine templateEngine templateEngine documentOffset TemplateProposal templateResults templateEngine getResults IJavaCompletionProposal IJavaCompletionProposal templateResults templateResults templateResults templateResults JavaModelException
Sets the type param type The type to set public void set Type I Type type f Type type  setType IType fType
Sets the line number param line Nb The line number to set public void set Position int position f Position position  lineNb setPosition fPosition

Runnable r new Runnable public void run I View Part part JDI DebugUI Plugin get Active Page find View I DebugUI Constants ID BREAKPOINT VIEW if part instanceof I Debug View Viewer viewer I Debug View part get Viewer if viewer instanceof Structured Viewer Structured Viewer sv Structured Viewer viewer sv set Selection new Structured Selection selection true  IViewPart JDIDebugUIPlugin getActivePage findView IDebugUIConstants ID_BREAKPOINT_VIEW IDebugView IDebugView getViewer StructuredViewer StructuredViewer StructuredViewer setSelection StructuredSelection
public void run I Action action Shell shell JDI DebugUI Plugin get Active Workbench Shell Selection Dialog dialog null try dialog JavaUI create Type Dialog shell workbench Window Search Engine create Workspace Scope I Java Element Search Constants CONSIDER TYPES true dialog set Title Breakpoint Messages get String Add Class Prepare Breakpoint Action 0 NON NLS 1 dialog set Message Breakpoint Messages get String Add Class Prepare Breakpoint Action 1 NON NLS 1 if dialog open Window OK final Object selection dialog get Result for int i 0 i selection length i I Type type I Type selection i I Resource resource Breakpoint Utils get Breakpoint Resource type Map map new Hash Map 10 Breakpoint Utils add Java Breakpoint Attributes map type int kind I Java Class Prepare Breakpoint TYPE CLASS if type is Class kind I Java Class Prepare Breakpoint TYPE INTERFACE I Breakpoint breakpoints Debug Plugin get Default get Breakpoint Manager get Breakpoints JDI Debug Model get Plugin Identifier boolean exists false for int j 0 j breakpoints length j I Java Breakpoint breakpoint I Java Breakpoint breakpoints j if breakpoint instanceof I Java Class Prepare Breakpoint if breakpoint get Type Name equals type get Fully Qualified Name exists true break if exists I Source Range range type get Name Range int start 1 int end 1 if range null start range get Offset end start range get Length JDI Debug Model create Class Prepare Breakpoint resource type get Fully Qualified Name kind start end true map Runnable r new Runnable public void run I View Part part JDI DebugUI Plugin get Active Page find View I DebugUI Constants ID BREAKPOINT VIEW if part instanceof I Debug View Viewer viewer I Debug View part get Viewer if viewer instanceof Structured Viewer Structured Viewer sv Structured Viewer viewer sv set Selection new Structured Selection selection true JDI DebugUI Plugin get Standard Display async Exec r catch Core Exception e TODO  IAction JDIDebugUIPlugin getActiveWorkbenchShell SelectionDialog createTypeDialog workbenchWindow SearchEngine createWorkspaceScope IJavaElementSearchConstants CONSIDER_TYPES setTitle BreakpointMessages getString AddClassPrepareBreakpointAction setMessage BreakpointMessages getString AddClassPrepareBreakpointAction getResult IType IType IResource BreakpointUtils getBreakpointResource HashMap BreakpointUtils addJavaBreakpointAttributes IJavaClassPrepareBreakpoint TYPE_CLASS isClass IJavaClassPrepareBreakpoint TYPE_INTERFACE IBreakpoint DebugPlugin getDefault getBreakpointManager getBreakpoints JDIDebugModel getPluginIdentifier IJavaBreakpoint IJavaBreakpoint IJavaClassPrepareBreakpoint getTypeName getFullyQualifiedName ISourceRange getNameRange getOffset getLength JDIDebugModel createClassPrepareBreakpoint getFullyQualifiedName IViewPart JDIDebugUIPlugin getActivePage findView IDebugUIConstants ID_BREAKPOINT_VIEW IDebugView IDebugView getViewer StructuredViewer StructuredViewer StructuredViewer setSelection StructuredSelection JDIDebugUIPlugin getStandardDisplay asyncExec CoreException
see org eclipse ui I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection
see org eclipse ui I Workbench Window Action Delegate dispose public void dispose workbench Window null  IWorkbenchWindowActionDelegate workbenchWindow
see org eclipse ui I Workbench Window Action Delegate init I Workbench Window public void init I Workbench Window window workbench Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow workbenchWindow

Runnable r new Runnable public void run I View Part part JDI DebugUI Plugin get Active Page find View I DebugUI Constants ID BREAKPOINT VIEW if part instanceof I Debug View Viewer viewer I Debug View part get Viewer if viewer instanceof Structured Viewer Structured Viewer sv Structured Viewer viewer sv set Selection new Structured Selection dialog get Result true  IViewPart JDIDebugUIPlugin getActivePage findView IDebugUIConstants ID_BREAKPOINT_VIEW IDebugView IDebugView getViewer StructuredViewer StructuredViewer StructuredViewer setSelection StructuredSelection getResult
public void run I Action action Shell shell JDI DebugUI Plugin get Active Workbench Shell final Add Exception Dialog dialog new Add Exception Dialog shell PlatformUI get Workbench get Progress Service dialog set Title Breakpoint Messages get String Add Exception Action 0 NON NLS 1 dialog set Message Breakpoint Messages get String Add Exception Action 1 NON NLS 1 if dialog open Window OK Runnable r new Runnable public void run I View Part part JDI DebugUI Plugin get Active Page find View I DebugUI Constants ID BREAKPOINT VIEW if part instanceof I Debug View Viewer viewer I Debug View part get Viewer if viewer instanceof Structured Viewer Structured Viewer sv Structured Viewer viewer sv set Selection new Structured Selection dialog get Result true JDI DebugUI Plugin get Standard Display async Exec r  IAction JDIDebugUIPlugin getActiveWorkbenchShell AddExceptionDialog AddExceptionDialog getWorkbench getProgressService setTitle BreakpointMessages getString AddExceptionAction setMessage BreakpointMessages getString AddExceptionAction IViewPart JDIDebugUIPlugin getActivePage findView IDebugUIConstants ID_BREAKPOINT_VIEW IDebugView IDebugView getViewer StructuredViewer StructuredViewer StructuredViewer setSelection StructuredSelection getResult JDIDebugUIPlugin getStandardDisplay asyncExec
see org eclipse ui I View Action Delegate init org eclipse ui I View Part public void init I View Part view  IViewActionDelegate IViewPart IViewPart
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection
see org eclipse ui I Workbench Window Action Delegate dispose public void dispose  IWorkbenchWindowActionDelegate
see org eclipse ui I Workbench Window Action Delegate init org eclipse ui I Workbench Window public void init I Workbench Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow

param parent param context param element Kinds param scope public Add Exception Dialog Shell parent I Runnable Context context super parent context I Java Search Constants CLASS Search Engine create Workspace Scope set Filter Breakpoint Messages get String Add Exception Dialog 14 NON NLS 1  elementKinds AddExceptionDialog IRunnableContext IJavaSearchConstants SearchEngine createWorkspaceScope setFilter BreakpointMessages getString AddExceptionDialog
see org eclipse jface window Window configure Shell Shell protected void configure Shell Shell new Shell super configure Shell new Shell Workbench Help set Help new Shell I Java Debug Help Context Ids ADD EXCEPTION DIALOG  configureShell configureShell newShell configureShell newShell WorkbenchHelp setHelp newShell IJavaDebugHelpContextIds ADD_EXCEPTION_DIALOG
public Control create Dialog Area Composite parent Composite contents Composite super create Dialog Area parent create Exception Area contents return contents  createDialogArea createDialogArea createExceptionArea
Create an area to mark as caught uncaught param contents area to create controls in private void create Exception Area Composite contents I Dialog Settings section get Dialog Settings boolean c section get Boolean SETTING CAUGHT CHECKED boolean u section get Boolean SETTING UNCAUGHT CHECKED f Caught Button new Button contents SWT CHECK f Caught Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Caught Button set Font contents get Font f Caught Button set Text Breakpoint Messages get String Add Exception Dialog 15 NON NLS 1 f Caught Button set Selection c f Uncaught Button new Button contents SWT CHECK f Uncaught Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Uncaught Button set Font contents get Font f Uncaught Button set Text Breakpoint Messages get String Add Exception Dialog 16 NON NLS 1 f Uncaught Button set Selection u  createExceptionArea IDialogSettings getDialogSettings getBoolean SETTING_CAUGHT_CHECKED getBoolean SETTING_UNCAUGHT_CHECKED fCaughtButton fCaughtButton setLayoutData GridData GridData FILL_HORIZONTAL fCaughtButton setFont getFont fCaughtButton setText BreakpointMessages getString AddExceptionDialog fCaughtButton setSelection fUncaughtButton fUncaughtButton setLayoutData GridData GridData FILL_HORIZONTAL fUncaughtButton setFont getFont fUncaughtButton setText BreakpointMessages getString AddExceptionDialog fUncaughtButton setSelection
see org eclipse ui dialogs Abstract Element List Selection Dialog create Filter Text org eclipse swt widgets Composite protected Text create Filter Text Composite parent f Text Widget super create Filter Text parent return f Text Widget  AbstractElementListSelectionDialog createFilterText createFilterText fTextWidget createFilterText fTextWidget
see org eclipse jface window Window create public void create super create f Text Widget set Selection 0 0  fTextWidget setSelection
protected boolean create Breakpoint Type Info type Ref Type Info get Lower Selected Element I Type type null try type type Ref resolve Type Search Engine create Workspace Scope catch Java Model Exception e update Status e get Status return false if type null update Status new Status Info I Status ERROR Breakpoint Messages get String Add Exception Dialog 17 NON NLS 1 return false int ex Type get Exception Type type if ex Type NO EXCEPTION update Status new Status Info I Status ERROR Breakpoint Messages get String Add Exception Dialog 17 NON NLS 1 return false Map attributes new Hash Map 10 Breakpoint Utils add Java Breakpoint Attributes attributes type try I Java Exception Breakpoint breakpoint JDI Debug Model create Exception Breakpoint Breakpoint Utils get Breakpoint Resource type type get Fully Qualified Name f Caught Button get Selection f Uncaught Button get Selection ex Type CHECKED EXCEPTION true attributes List list new Array List 1 list add breakpoint set Result list catch Core Exception e update Status e get Status return false return true  createBreakpoint TypeInfo typeRef TypeInfo getLowerSelectedElement IType typeRef resolveType SearchEngine createWorkspaceScope JavaModelException updateStatus getStatus updateStatus StatusInfo IStatus BreakpointMessages getString AddExceptionDialog exType getExceptionType exType NO_EXCEPTION updateStatus StatusInfo IStatus BreakpointMessages getString AddExceptionDialog HashMap BreakpointUtils addJavaBreakpointAttributes IJavaExceptionBreakpoint JDIDebugModel createExceptionBreakpoint BreakpointUtils getBreakpointResource getFullyQualifiedName fCaughtButton getSelection fUncaughtButton getSelection exType CHECKED_EXCEPTION ArrayList setResult CoreException updateStatus getStatus
protected boolean validate Breakpoint Type Info type Ref Type Info get Lower Selected Element if type Ref null return false I Type type null try type type Ref resolve Type Search Engine create Workspace Scope catch Java Model Exception e update Status e get Status return false if type null update Status new Status Info I Status ERROR Breakpoint Messages get String Add Exception Dialog 17 NON NLS 1 return false int ex Type get Exception Type type if ex Type NO EXCEPTION update Status new Status Info I Status ERROR Breakpoint Messages get String Add Exception Dialog 17 NON NLS 1 return false String name type get Fully Qualified Name I Java Exception Breakpoint breakpoints get Existing Breakpoints for int i 0 i breakpoints length i I Java Exception Breakpoint breakpoint breakpoints i try if breakpoint get Type Name equals name update Status new Status Info I Status INFO Breakpoint Messages get String Add Exception Dialog 21 NON NLS 1 return false catch Core Exception e update Status e get Status return false update Status new Status Info I Status OK null return true  validateBreakpoint TypeInfo typeRef TypeInfo getLowerSelectedElement typeRef IType typeRef resolveType SearchEngine createWorkspaceScope JavaModelException updateStatus getStatus updateStatus StatusInfo IStatus BreakpointMessages getString AddExceptionDialog exType getExceptionType exType NO_EXCEPTION updateStatus StatusInfo IStatus BreakpointMessages getString AddExceptionDialog getFullyQualifiedName IJavaExceptionBreakpoint getExistingBreakpoints IJavaExceptionBreakpoint getTypeName updateStatus StatusInfo IStatus BreakpointMessages getString AddExceptionDialog CoreException updateStatus getStatus updateStatus StatusInfo IStatus
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor pm try I Type Hierarchy hierarchy type new Supertype Hierarchy pm I Type curr type while curr null String name Java Model Util get Fully Qualified Name curr if java lang Throwable equals name NON NLS 1 exception Type 0 CHECKED EXCEPTION return if java lang Runtime Exception equals name java lang Error equals name NON NLS 2 NON NLS 1 exception Type 0 UNCHECKED EXCEPTION return curr hierarchy get Superclass curr catch Java Model Exception e JDI DebugUI Plugin log e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor ITypeHierarchy newSupertypeHierarchy IType JavaModelUtil getFullyQualifiedName exceptionType CHECKED_EXCEPTION RuntimeException exceptionType UNCHECKED_EXCEPTION getSuperclass JavaModelException JDIDebugUIPlugin
public static int get Exception Type final I Type type final int exception Type new int 1 exception Type 0 NO EXCEPTION Busy Indicator Runnable Context context new Busy Indicator Runnable Context I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor pm try I Type Hierarchy hierarchy type new Supertype Hierarchy pm I Type curr type while curr null String name Java Model Util get Fully Qualified Name curr if java lang Throwable equals name NON NLS 1 exception Type 0 CHECKED EXCEPTION return if java lang Runtime Exception equals name java lang Error equals name NON NLS 2 NON NLS 1 exception Type 0 UNCHECKED EXCEPTION return curr hierarchy get Superclass curr catch Java Model Exception e JDI DebugUI Plugin log e try context run false false runnable catch Interrupted Exception e catch Invocation Target Exception e JDI DebugUI Plugin log e return exception Type 0  getExceptionType IType exceptionType exceptionType NO_EXCEPTION BusyIndicatorRunnableContext BusyIndicatorRunnableContext IRunnableWithProgress IRunnableWithProgress IProgressMonitor ITypeHierarchy newSupertypeHierarchy IType JavaModelUtil getFullyQualifiedName exceptionType CHECKED_EXCEPTION RuntimeException exceptionType UNCHECKED_EXCEPTION getSuperclass JavaModelException JDIDebugUIPlugin InterruptedException InvocationTargetException JDIDebugUIPlugin exceptionType
protected void ok Pressed if create Breakpoint super ok Pressed  okPressed createBreakpoint okPressed
see org eclipse ui dialogs Abstract Element List Selection Dialog update Ok State protected void update Ok State get Button I Dialog Constants OK ID set Enabled validate Breakpoint  AbstractElementListSelectionDialog updateOkState updateOkState getButton IDialogConstants OK_ID setEnabled validateBreakpoint
Stores it current configuration in the dialog store private void write Settings I Dialog Settings s get Dialog Settings Point location get Shell get Location s put x location x NON NLS 1 s put y location y NON NLS 1 Point size get Shell get Size s put width size x NON NLS 1 s put height size y NON NLS 1 s put SETTING CAUGHT CHECKED f Caught Button get Selection s put SETTING UNCAUGHT CHECKED f Uncaught Button get Selection  writeSettings IDialogSettings getDialogSettings getShell getLocation getShell getSize SETTING_CAUGHT_CHECKED fCaughtButton getSelection SETTING_UNCAUGHT_CHECKED fUncaughtButton getSelection
Returns the dialog settings object used to share state between several find replace dialogs return the dialog settings to be used private I Dialog Settings get Dialog Settings I Dialog Settings all Setttings JDI DebugUI Plugin get Default get Dialog Settings I Dialog Settings section all Setttings get Section DIALOG SETTINGS if section null section all Setttings add New Section DIALOG SETTINGS section put SETTING CAUGHT CHECKED true section put SETTING UNCAUGHT CHECKED true return section  IDialogSettings getDialogSettings IDialogSettings allSetttings JDIDebugUIPlugin getDefault getDialogSettings IDialogSettings allSetttings getSection DIALOG_SETTINGS allSetttings addNewSection DIALOG_SETTINGS SETTING_CAUGHT_CHECKED SETTING_UNCAUGHT_CHECKED
Initializes itself from the dialog settings with the same state as at the previous invocation private void read Settings I Dialog Settings s get Dialog Settings try int x s get Int x NON NLS 1 int y s get Int y NON NLS 1 f Location new Point x y int width s get Int width NON NLS 1 int height s get Int height NON NLS 1 f Size new Point width height catch Number Format Exception e f Location null f Size null  readSettings IDialogSettings getDialogSettings getInt getInt fLocation getInt getInt fSize NumberFormatException fLocation fSize
protected Point get Initial Size Point result super get Initial Size if f Size null result x Math max result x f Size x result y Math max result y f Size y Rectangle display get Shell get Display get Client Area result x Math min result x display width result y Math min result y display height return result  getInitialSize getInitialSize fSize fSize fSize getShell getDisplay getClientArea
protected Point get Initial Location Point initial Size Point result super get Initial Location initial Size if f Location null result x f Location x result y f Location y Rectangle display get Shell get Display get Client Area int xe result x initial Size x if xe display width result x xe display width int ye result y initial Size y if ye display height result y ye display height return result  getInitialLocation initialSize getInitialLocation initialSize fLocation fLocation fLocation getShell getDisplay getClientArea initialSize initialSize
see Window close public boolean close write Settings return super close  writeSettings
protected Control create Contents Composite parent Control control super create Contents parent read Settings return control  createContents createContents readSettings
see org eclipse ui dialogs Selection Status Dialog compute Result protected void compute Result result is computed when OK is pressed in create Breakpoint  SelectionStatusDialog computeResult computeResult createBreakpoint
protected I Java Exception Breakpoint get Existing Breakpoints if f Existing null List list new Array List I Breakpoint breakpoints Debug Plugin get Default get Breakpoint Manager get Breakpoints JDI Debug Model get Plugin Identifier for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if breakpoint instanceof I Java Exception Breakpoint list add breakpoint f Existing I Java Exception Breakpoint list to Array new I Java Exception Breakpoint list size return f Existing  IJavaExceptionBreakpoint getExistingBreakpoints fExisting ArrayList IBreakpoint DebugPlugin getDefault getBreakpointManager getBreakpoints JDIDebugModel getPluginIdentifier IBreakpoint IJavaExceptionBreakpoint fExisting IJavaExceptionBreakpoint toArray IJavaExceptionBreakpoint fExisting
protected void handle Default Selected if get Button I Dialog Constants OK ID is Enabled super handle Default Selected  handleDefaultSelected getButton IDialogConstants OK_ID isEnabled handleDefaultSelected

Resource Bundle get Bundle BUNDLE NAME private Breakpoint Messages  ResourceBundle getBundle BUNDLE_NAME BreakpointMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

see org eclipse ui I Object Action Delegate set Active Part org eclipse jface action I Action org eclipse ui I Workbench Part public void set Active Part I Action action I Workbench Part target Part  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart
see org eclipse ui I Action Delegate2 init org eclipse jface action I Action public void init I Action action  IActionDelegate2 IAction IAction
see org eclipse ui I Action Delegate2 dispose public void dispose  IActionDelegate2
see org eclipse ui I Action Delegate2 run With Event org eclipse jface action I Action org eclipse swt widgets Event public void run With Event I Action action Event event run action  IActionDelegate2 runWithEvent IAction runWithEvent IAction
public void run I Action action I Structured Selection ss I Structured Selection selection Iterator iterator ss iterator I Breakpoint breakpoints Debug Plugin get Default get Breakpoint Manager get Breakpoints JDI Debug Model get Plugin Identifier while iterator has Next I Type type I Type iterator next I Breakpoint existing null try for int i 0 i breakpoints length i I Java Breakpoint breakpoint I Java Breakpoint breakpoints i if breakpoint instanceof I Java Class Prepare Breakpoint type get Fully Qualified Name equals breakpoint get Type Name existing breakpoint break if existing null existing delete else int kind I Java Class Prepare Breakpoint TYPE CLASS if type is Class kind I Java Class Prepare Breakpoint TYPE INTERFACE Hash Map map new Hash Map 10 Breakpoint Utils add Java Breakpoint Attributes map type I Source Range range type get Name Range int start 1 int end 1 if range null start range get Offset end start range get Length JDI Debug Model create Class Prepare Breakpoint Breakpoint Utils get Breakpoint Resource type type get Fully Qualified Name kind start end true map catch Core Exception e  IAction IStructuredSelection IStructuredSelection IBreakpoint DebugPlugin getDefault getBreakpointManager getBreakpoints JDIDebugModel getPluginIdentifier hasNext IType IType IBreakpoint IJavaBreakpoint IJavaBreakpoint IJavaClassPrepareBreakpoint getFullyQualifiedName getTypeName IJavaClassPrepareBreakpoint TYPE_CLASS isClass IJavaClassPrepareBreakpoint TYPE_INTERFACE HashMap HashMap BreakpointUtils addJavaBreakpointAttributes ISourceRange getNameRange getOffset getLength JDIDebugModel createClassPrepareBreakpoint BreakpointUtils getBreakpointResource getFullyQualifiedName CoreException
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection this selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection

Returns the resource on which a breakpoint marker should be created for the given member The resource returned is the associated file or project in the case of a class file in a jar param member member in which a breakpoint is being created return resource the resource on which a breakpoint marker should be created public static I Resource get Breakpoint Resource I Member member I Compilation Unit cu member get Compilation Unit if cu null cu is Working Copy member I Member member get Primary Element I Resource res member get Resource if res null res member get Java Project get Project return res  IResource getBreakpointResource IMember ICompilationUnit getCompilationUnit isWorkingCopy IMember getPrimaryElement IResource getResource getJavaProject getProject
Returns the type that the given Java breakpoint refers to param breakpoint Java breakpoint return the type the breakpoint is associated with public static I Type get Type I Java Breakpoint breakpoint String handle breakpoint get Marker get Attribute HANDLE ID null if handle null I Java Element je Java Core create handle if je null if je instanceof I Type return I Type je if je instanceof I Member return I Member je get Declaring Type return null  IType getType IJavaBreakpoint getMarker getAttribute HANDLE_ID IJavaElement JavaCore IType IType IMember IMember getDeclaringType
Returns the member associated with the line number of the given breakpoint param breakpoint Java line breakpoint return member at the given line number in the type associated with the breakpoint exception Core Exception if an exception occurs accessing the breakpoint public static I Member get Member I Java Line Breakpoint breakpoint throws Core Exception if breakpoint instanceof I Java Method Breakpoint return get Method I Java Method Breakpoint breakpoint if breakpoint instanceof I Java Watchpoint return get Field I Java Watchpoint breakpoint int start breakpoint get Char Start int end breakpoint get Char End I Type type get Type breakpoint if start 1 end 1 start breakpoint get Marker get Attribute MEMBER START 1 end breakpoint get Marker get Attribute MEMBER END 1 I Member member null if type null end start start 0 member bin Search type start end if member null member type return member  CoreException IMember getMember IJavaLineBreakpoint CoreException IJavaMethodBreakpoint getMethod IJavaMethodBreakpoint IJavaWatchpoint getField IJavaWatchpoint getCharStart getCharEnd IType getType getMarker getAttribute MEMBER_START getMarker getAttribute MEMBER_END IMember binSearch
Searches the given source range of the container for a member that is not the same as the given type protected static I Member bin Search I Type type int start int end throws Java Model Exception I Java Element je get Element At type start if je null je equals type return as Member je if end start je get Element At type end if je null je equals type return as Member je int mid end start 2 start if mid start je bin Search type start 1 mid if je null je bin Search type mid 1 end 1 return as Member je return null  IMember binSearch IType JavaModelException IJavaElement getElementAt asMember getElementAt asMember binSearch binSearch asMember
Returns the given Java element if it is an code I Member code otherwise code null code param element Java element return the given element if it is a type member otherwise code null code private static I Member as Member I Java Element element if element instanceof I Member return I Member element else return null  IMember IMember asMember IJavaElement IMember IMember
Returns the element at the given position in the given type protected static I Java Element get Element At I Type type int pos throws Java Model Exception if type is Binary return type get Class File get Element At pos else return type get Compilation Unit get Element At pos  IJavaElement getElementAt IType JavaModelException isBinary getClassFile getElementAt getCompilationUnit getElementAt
Adds attributes to the given attribute map ul li Java element handle id li li Attributes defined by code Java Core code li ul param attributes the attribute map to use param element the Java element associated with the breakpoint exception Core Exception if an exception occurs configuring the marker public static void add Java Breakpoint Attributes Map attributes I Java Element element String handle Id element get Handle Identifier attributes put HANDLE ID handle Id Java Core add Java Element Marker Attributes attributes element  JavaCore CoreException addJavaBreakpointAttributes IJavaElement handleId getHandleIdentifier HANDLE_ID handleId JavaCore addJavaElementMarkerAttributes
Adds attributes to the given attribute map ul li Java element handle id li li Member start position li li Member end position li li Attributes defined by code Java Core code li ul param attributes the attribute map to use param element the Java element associated with the breakpoint param member Start the start position of the Java member that the breakpoint is positioned within param member End the end position of the Java member that the breakpoint is positioned within exception Core Exception if an exception occurs configuring the marker public static void add Java Breakpoint Attributes With Member Details Map attributes I Java Element element int member Start int member End add Java Breakpoint Attributes attributes element attributes put MEMBER START new Integer member Start attributes put MEMBER END new Integer member End  JavaCore memberStart memberEnd CoreException addJavaBreakpointAttributesWithMemberDetails IJavaElement memberStart memberEnd addJavaBreakpointAttributes MEMBER_START memberStart MEMBER_END memberEnd
Adds attributes to the given attribute map to make the breakpoint a run to line breakpoint ul li PERSISTED false li li RUN TO LINE true li li I Marker SEVERITY I Marker SEVERITY WARNING li ul param attributes the attribute map to use param element the Java element associated with the breakpoint exception Core Exception if an exception occurs configuring the marker public static void add Run To Line Attributes Map attributes attributes put I Breakpoint PERSISTED Boolean FALSE attributes put RUN TO LINE Boolean TRUE Our annotation extension specifies a marker severity of SEVERITY INFO So we set the severity to anything other than SEVERITY INFO here so the marker won t be shown in the editor s annotation pane attributes put I Marker SEVERITY new Integer I Marker SEVERITY WARNING  RUN_TO_LINE IMarker IMarker SEVERITY_WARNING CoreException addRunToLineAttributes IBreakpoint RUN_TO_LINE SEVERITY_INFO SEVERITY_INFO IMarker IMarker SEVERITY_WARNING
Returns the method associated with the method entry breakpoint param breakpoint Java method entry breakpoint return method public static I Method get Method I Java Method Breakpoint breakpoint String handle breakpoint get Marker get Attribute HANDLE ID null if handle null I Java Element je Java Core create handle if je null if je instanceof I Method return I Method je return null  IMethod getMethod IJavaMethodBreakpoint getMarker getAttribute HANDLE_ID IJavaElement JavaCore IMethod IMethod
Returns the field associated with the watchpoint param breakpoint Java watchpoint return field public static I Field get Field I Java Watchpoint breakpoint String handle breakpoint get Marker get Attribute HANDLE ID null if handle null I Java Element je Java Core create handle if je null if je instanceof I Field return I Field je return null  IField getField IJavaWatchpoint getMarker getAttribute HANDLE_ID IJavaElement JavaCore IField IField
Returns whether the given breakpoint is a run to line breakpoint param breakpoint line breakpoint return whether the given breakpoint is a run to line breakpoint public static boolean is Run To Line Breakpoint I Java Line Breakpoint breakpoint return breakpoint get Marker get Attribute RUN TO LINE false  isRunToLineBreakpoint IJavaLineBreakpoint getMarker getAttribute RUN_TO_LINE
Returns whether the given breakpoint is a compilation problem breakpoint or uncaught exception breakpoint param breakpoint breakpoint return whether the given breakpoint is a compilation error breakpoint or uncaught exception breakpoint public static boolean is Problem Breakpoint I Breakpoint breakpoint return breakpoint Java Debug Options Manager get Default get Suspend On Compilation Error Breakpoint breakpoint Java Debug Options Manager get Default get Suspend On Uncaught Exception Breakpoint  isProblemBreakpoint IBreakpoint JavaDebugOptionsManager getDefault getSuspendOnCompilationErrorBreakpoint JavaDebugOptionsManager getDefault getSuspendOnUncaughtExceptionBreakpoint

public void move Child boolean up I Classpath Entry child int index child Entries index Of child int direction 1 if up direction 1 Object moved child Entries get index direction child Entries set index direction child child Entries set index moved  moveChild IClasspathEntry childEntries indexOf childEntries childEntries childEntries
see org eclipse ant internal ui preferences I Classpath Entry get Entries public I Classpath Entry get Entries return I Classpath Entry child Entries to Array new I Classpath Entry child Entries size  IClasspathEntry getEntries IClasspathEntry getEntries IClasspathEntry childEntries toArray IClasspathEntry childEntries
see org eclipse jdt debug ui launch Configurations I Classpath Entry has Entries public boolean has Entries return child Entries is Empty  launchConfigurations IClasspathEntry hasEntries hasEntries childEntries isEmpty
see org eclipse jdt debug ui launch Configurations I Classpath Entry get Parent public I Classpath Entry get Parent return parent  launchConfigurations IClasspathEntry getParent IClasspathEntry getParent
param parent The parent to set public void set Parent I Classpath Entry parent this parent parent  setParent IClasspathEntry

public boolean select Viewer viewer Object parent Element Object element if element instanceof Classpath Group Classpath Model model Classpath Model parent Element return model get Bootstrap Entry equals element return true  parentElement ClasspathGroup ClasspathModel ClasspathModel parentElement getBootstrapEntry

private Java Classpath Tab f Tab public Classpath Content Provider Java Classpath Tab tab f Tab tab  JavaClasspathTab fTab ClasspathContentProvider JavaClasspathTab fTab
public void add I Classpath Entry parent I Runtime Classpath Entry child Object new Entry null if parent null parent model new Entry model add Entry child parent model else if parent instanceof Classpath Group new Entry model create Entry child parent Classpath Group parent add Entry Classpath Entry new Entry if new Entry null tree Viewer add parent new Entry tree Viewer set Expanded State parent true tree Viewer reveal new Entry refresh  IClasspathEntry IRuntimeClasspathEntry newEntry newEntry addEntry ClasspathGroup newEntry createEntry ClasspathGroup addEntry ClasspathEntry newEntry newEntry treeViewer newEntry treeViewer setExpandedState treeViewer newEntry
public void add int entry Type I Runtime Classpath Entry child Object new Entry model add Entry entry Type child if new Entry null tree Viewer add get Parent new Entry new Entry refresh  entryType IRuntimeClasspathEntry newEntry addEntry entryType newEntry treeViewer getParent newEntry newEntry
public void remove All model remove All refresh  removeAll removeAll
private void refresh if refresh Enabled tree Viewer refresh refresh Requested false else refresh Requested true  refreshEnabled treeViewer refreshRequested refreshRequested
public void remove All I Classpath Entry parent if parent instanceof Classpath Group Classpath Group parent remove All refresh  removeAll IClasspathEntry ClasspathGroup ClasspathGroup removeAll
see I Tree Content Provider get Parent Object public Object get Parent Object element if element instanceof Classpath Entry return Classpath Entry element get Parent if element instanceof Classpath Group return model return null  ITreeContentProvider getParent getParent ClasspathEntry ClasspathEntry getParent ClasspathGroup
see I Tree Content Provider has Children Object public boolean has Children Object element if element instanceof Classpath Entry return Classpath Entry element has Children if element instanceof Classpath Group return Classpath Group element has Entries if element instanceof Classpath Model return Classpath Model element has Entries return false  ITreeContentProvider hasChildren hasChildren ClasspathEntry ClasspathEntry hasChildren ClasspathGroup ClasspathGroup hasEntries ClasspathModel ClasspathModel hasEntries
see I Structured Content Provider get Elements Object public Object get Elements Object input Element return get Children input Element  IStructuredContentProvider getElements getElements inputElement getChildren inputElement
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
public void input Changed Viewer viewer Object old Input Object new Input tree Viewer Tree Viewer viewer if new Input null model Classpath Model new Input else if model null model remove All model null  inputChanged oldInput newInput treeViewer TreeViewer newInput ClasspathModel newInput removeAll
public Object get Children Object parent Element if parent Element instanceof Classpath Group return Classpath Group parent Element get Entries if parent Element instanceof Classpath Model return Classpath Model parent Element get Entries if parent Element instanceof Classpath Entry return Classpath Entry parent Element get Children f Tab get Launch Configuration if parent Element null List all new Array List Object top Entries model get Entries for int i 0 i top Entries length i Object object top Entries i if object instanceof Classpath Entry all add object else if object instanceof Classpath Group all add All Arrays as List Classpath Group object get Entries return all to Array return null  getChildren parentElement parentElement ClasspathGroup ClasspathGroup parentElement getEntries parentElement ClasspathModel ClasspathModel parentElement getEntries parentElement ClasspathEntry ClasspathEntry parentElement getChildren fTab getLaunchConfiguration parentElement ArrayList topEntries getEntries topEntries topEntries ClasspathEntry ClasspathGroup addAll asList ClasspathGroup getEntries toArray
public void remove All List selection Object array selection to Array model remove All array tree Viewer remove array refresh  removeAll toArray removeAll treeViewer
public I Classpath Entry get User Classpath Entries return model get Entries Classpath Model USER  IClasspathEntry getUserClasspathEntries getEntries ClasspathModel
public I Classpath Entry get Bootstrap Classpath Entries return model get Entries Classpath Model BOOTSTRAP  IClasspathEntry getBootstrapClasspathEntries getEntries ClasspathModel
public void handle Move boolean direction I Classpath Entry entry I Classpath Entry parent I Classpath Entry get Parent entry parent move Child direction entry  handleMove IClasspathEntry IClasspathEntry IClasspathEntry getParent moveChild
public Classpath Model get Model return model  ClasspathModel getModel
public void set Refresh Enabled boolean refresh Enabled this refresh Enabled refresh Enabled tree Viewer get Tree set Redraw refresh Enabled if refresh Enabled refresh Requested refresh  setRefreshEnabled refreshEnabled refreshEnabled refreshEnabled treeViewer getTree setRedraw refreshEnabled refreshEnabled refreshRequested
public void set Entries I Runtime Classpath Entry entries model remove All I Runtime Classpath Entry entry for int i 0 i entries length i entry entries i switch entry get Classpath Property case I Runtime Classpath Entry USER CLASSES model add Entry Classpath Model USER entry break default model add Entry Classpath Model BOOTSTRAP entry break refresh  setEntries IRuntimeClasspathEntry removeAll IRuntimeClasspathEntry getClasspathProperty IRuntimeClasspathEntry USER_CLASSES addEntry ClasspathModel addEntry ClasspathModel

see org eclipse jdt launching I Runtime Classpath Entry get Java Project public I Java Project get Java Project return entry get Java Project  IRuntimeClasspathEntry getJavaProject IJavaProject getJavaProject getJavaProject
return entry get Java Project public Classpath Entry I Runtime Classpath Entry entry I Classpath Entry parent this parent parent this entry entry  getJavaProject ClasspathEntry IRuntimeClasspathEntry IClasspathEntry
public boolean equals Object obj if obj instanceof Classpath Entry Classpath Entry other Classpath Entry obj if entry null return entry equals other entry else if obj instanceof I Runtime Classpath Entry return entry equals obj return false  ClasspathEntry ClasspathEntry ClasspathEntry IRuntimeClasspathEntry
see java lang Object hash Code public int hash Code return entry hash Code  hashCode hashCode hashCode
see java lang Object to String public String to String return entry get Path toOS String  toString toString getPath toOSString
see org eclipse jdt launching I Runtime Classpath Entry get Type public int get Type return entry get Type  IRuntimeClasspathEntry getType getType getType
see org eclipse jdt launching I Runtime Classpath Entry get Memento public String get Memento throws Core Exception return entry get Memento  IRuntimeClasspathEntry getMemento getMemento CoreException getMemento
see org eclipse jdt launching I Runtime Classpath Entry get Path public I Path get Path return entry get Path  IRuntimeClasspathEntry getPath IPath getPath getPath
see org eclipse jdt launching I Runtime Classpath Entry get Resource public I Resource get Resource return entry get Resource  IRuntimeClasspathEntry getResource IResource getResource getResource
see org eclipse jdt launching I Runtime Classpath Entry get Source Attachment Path public I Path get Source Attachment Path return entry get Source Attachment Path  IRuntimeClasspathEntry getSourceAttachmentPath IPath getSourceAttachmentPath getSourceAttachmentPath
see org eclipse jdt launching I Runtime Classpath Entry set Source Attachment Path org eclipse core runtime I Path public void set Source Attachment Path I Path path entry set Source Attachment Path path  IRuntimeClasspathEntry setSourceAttachmentPath IPath setSourceAttachmentPath IPath setSourceAttachmentPath
see org eclipse jdt launching I Runtime Classpath Entry get Source Attachment Root Path public I Path get Source Attachment Root Path return entry get Source Attachment Root Path  IRuntimeClasspathEntry getSourceAttachmentRootPath IPath getSourceAttachmentRootPath getSourceAttachmentRootPath
see org eclipse jdt launching I Runtime Classpath Entry set Source Attachment Root Path org eclipse core runtime I Path public void set Source Attachment Root Path I Path path entry set Source Attachment Root Path path  IRuntimeClasspathEntry setSourceAttachmentRootPath IPath setSourceAttachmentRootPath IPath setSourceAttachmentRootPath
see org eclipse jdt launching I Runtime Classpath Entry get Classpath Property public int get Classpath Property return entry get Classpath Property  IRuntimeClasspathEntry getClasspathProperty getClasspathProperty getClasspathProperty
see org eclipse jdt launching I Runtime Classpath Entry set Classpath Property int public void set Classpath Property int location entry set Classpath Property location  IRuntimeClasspathEntry setClasspathProperty setClasspathProperty setClasspathProperty
see org eclipse jdt launching I Runtime Classpath Entry get Location public String get Location return entry get Location  IRuntimeClasspathEntry getLocation getLocation getLocation
see org eclipse jdt launching I Runtime Classpath Entry get Source Attachment Location public String get Source Attachment Location return entry get Source Attachment Location  IRuntimeClasspathEntry getSourceAttachmentLocation getSourceAttachmentLocation getSourceAttachmentLocation
see org eclipse jdt launching I Runtime Classpath Entry get Source Attachment Root Location public String get Source Attachment Root Location return entry get Source Attachment Root Location  IRuntimeClasspathEntry getSourceAttachmentRootLocation getSourceAttachmentRootLocation getSourceAttachmentRootLocation
see org eclipse jdt launching I Runtime Classpath Entry get Variable Name public String get Variable Name return entry get Variable Name  IRuntimeClasspathEntry getVariableName getVariableName getVariableName
see org eclipse jdt launching I Runtime Classpath Entry get Classpath Entry public org eclipse jdt core I Classpath Entry get Classpath Entry return entry get Classpath Entry  IRuntimeClasspathEntry getClasspathEntry IClasspathEntry getClasspathEntry getClasspathEntry
public I Runtime Classpath Entry get Delegate return entry  IRuntimeClasspathEntry getDelegate
public boolean has Children I Runtime Classpath Entry rpe get Delegate return rpe instanceof I Runtime Classpath Entry2 I Runtime Classpath Entry2 rpe is Composite  hasChildren IRuntimeClasspathEntry getDelegate IRuntimeClasspathEntry2 IRuntimeClasspathEntry2 isComposite
public I Classpath Entry get Children I Launch Configuration configuration I Runtime Classpath Entry rpe get Delegate if rpe instanceof I Runtime Classpath Entry2 I Runtime Classpath Entry2 r2 I Runtime Classpath Entry2 rpe try I Runtime Classpath Entry entries r2 get Runtime Classpath Entries configuration I Classpath Entry cps new I Classpath Entry entries length for int i 0 i entries length i I Runtime Classpath Entry child Entry entries i cps i new Classpath Entry child Entry this return cps catch Core Exception e return null  IClasspathEntry getChildren ILaunchConfiguration IRuntimeClasspathEntry getDelegate IRuntimeClasspathEntry2 IRuntimeClasspathEntry2 IRuntimeClasspathEntry2 IRuntimeClasspathEntry getRuntimeClasspathEntries IClasspathEntry IClasspathEntry IRuntimeClasspathEntry childEntry ClasspathEntry childEntry CoreException
see org eclipse jdt internal debug ui classpath I Classpath Entry is Editable public boolean is Editable return get Parent instanceof Classpath Group  IClasspathEntry isEditable isEditable getParent ClasspathGroup
public Object get Adapter Class adapter if get Delegate instanceof I Adaptable return I Adaptable get Delegate get Adapter adapter return null  getAdapter getDelegate IAdaptable IAdaptable getDelegate getAdapter

public Classpath Group String name I Classpath Entry parent boolean can Be Removed this parent parent this name name this can Be Removed can Be Removed  ClasspathGroup IClasspathEntry canBeRemoved canBeRemoved canBeRemoved
public void add Entry I Classpath Entry entry if child Entries contains entry child Entries add entry  addEntry IClasspathEntry childEntries childEntries
public void remove Entry I Classpath Entry entry child Entries remove entry  removeEntry IClasspathEntry childEntries
public boolean contains I Classpath Entry entry return child Entries contains entry  IClasspathEntry childEntries
public String to String return name  toString
public void remove All Iterator iter child Entries iterator while iter has Next Object entry iter next if entry instanceof Classpath Group Classpath Group entry remove All child Entries clear  removeAll childEntries hasNext ClasspathGroup ClasspathGroup removeAll childEntries
public boolean can Be Removed return can Be Removed  canBeRemoved canBeRemoved
see org eclipse jdt internal debug ui classpath I Classpath Entry is Editable public boolean is Editable return false  IClasspathEntry isEditable isEditable

public Image get Image Object element if element instanceof Classpath Entry Classpath Entry entry Classpath Entry element return runtime Classpath Label Provider get Image entry return Java Classpath Tab get Classpath Image  getImage ClasspathEntry ClasspathEntry ClasspathEntry runtimeClasspathLabelProvider getImage JavaClasspathTab getClasspathImage
public String get Text Object element if element instanceof Classpath Entry Classpath Entry entry Classpath Entry element return runtime Classpath Label Provider get Text entry get Delegate return element to String  getText ClasspathEntry ClasspathEntry ClasspathEntry runtimeClasspathLabelProvider getText getDelegate toString
public Color get Background Object element if element instanceof Classpath Group Display display Display get Current return display get System Color SWT COLOR INFO BACKGROUND else if element instanceof Classpath Entry return null  getBackground ClasspathGroup getCurrent getSystemColor COLOR_INFO_BACKGROUND ClasspathEntry
see org eclipse jface viewers I Color Provider get Foreground java lang Object public Color get Foreground Object element return null  IColorProvider getForeground getForeground
see org eclipse jface viewers I Base Label Provider add Listener org eclipse jface viewers I Label Provider Listener public void add Listener I Label Provider Listener listener  IBaseLabelProvider addListener ILabelProviderListener addListener ILabelProviderListener
see org eclipse jface viewers I Base Label Provider dispose public void dispose runtime Classpath Label Provider dispose  IBaseLabelProvider runtimeClasspathLabelProvider
see org eclipse jface viewers I Base Label Provider is Label Property java lang Object java lang String public boolean is Label Property Object element String property return false  IBaseLabelProvider isLabelProperty isLabelProperty
see org eclipse jface viewers I Base Label Provider remove Listener org eclipse jface viewers I Label Provider Listener public void remove Listener I Label Provider Listener listener  IBaseLabelProvider removeListener ILabelProviderListener removeListener ILabelProviderListener
param configuration public void set Launch Configuration I Launch Configuration configuration runtime Classpath Label Provider set Launch Configuration configuration  setLaunchConfiguration ILaunchConfiguration runtimeClasspathLabelProvider setLaunchConfiguration

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Classpath Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME ClasspathMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public Object add Entry Object entry if entry instanceof Classpath Group if child Entries contains entry child Entries add entry return entry return null else Classpath Entry new Entry create Entry I Runtime Classpath Entry entry null Iterator entries child Entries iterator while entries has Next Object element entries next if element instanceof Classpath Group if Classpath Group element contains new Entry return null else if element equals new Entry return null child Entries add new Entry return new Entry  addEntry ClasspathGroup childEntries childEntries ClasspathEntry newEntry createEntry IRuntimeClasspathEntry childEntries hasNext ClasspathGroup ClasspathGroup newEntry newEntry childEntries newEntry newEntry
public Object add Entry int entry Type I Runtime Classpath Entry entry I Classpath Entry entry Parent null switch entry Type case BOOTSTRAP entry Parent get Bootstrap Entry break case USER entry Parent get User Entry break default break Classpath Entry new Entry create Entry entry entry Parent Iterator entries child Entries iterator while entries has Next Object element entries next if element instanceof Classpath Group if Classpath Group element contains new Entry return null else if element equals new Entry return null if entry Parent null Classpath Group entry Parent add Entry new Entry else child Entries add new Entry return new Entry  addEntry entryType IRuntimeClasspathEntry IClasspathEntry entryParent entryType entryParent getBootstrapEntry entryParent getUserEntry ClasspathEntry newEntry createEntry entryParent childEntries hasNext ClasspathGroup ClasspathGroup newEntry newEntry entryParent ClasspathGroup entryParent addEntry newEntry childEntries newEntry newEntry
Returns the entries of the given type or an empty collection if none param entry Type return the entries of the given type or an empty collection if none public I Classpath Entry get Entries int entry Type switch entry Type case BOOTSTRAP if bootstrap Entries null return bootstrap Entries get Entries break case USER if user Entries null return user Entries get Entries break return new I Classpath Entry 0  entryType IClasspathEntry getEntries entryType entryType bootstrapEntries bootstrapEntries getEntries userEntries userEntries getEntries IClasspathEntry
public I Runtime Classpath Entry get All Entries I Classpath Entry boot get Entries BOOTSTRAP I Classpath Entry user get Entries USER I Runtime Classpath Entry all new I Runtime Classpath Entry boot length user length if boot length 0 System arraycopy boot 0 all 0 boot length if user length 0 System arraycopy user 0 all boot length user length return all  IRuntimeClasspathEntry getAllEntries IClasspathEntry getEntries IClasspathEntry getEntries IRuntimeClasspathEntry IRuntimeClasspathEntry
public void remove Object entry child Entries remove entry  childEntries
public Classpath Entry create Entry I Runtime Classpath Entry entry I Classpath Entry entry Parent if entry instanceof Classpath Entry entry Classpath Entry entry get Delegate if entry Parent null entry Parent this return new Classpath Entry entry entry Parent  ClasspathEntry createEntry IRuntimeClasspathEntry IClasspathEntry entryParent ClasspathEntry ClasspathEntry getDelegate entryParent entryParent ClasspathEntry entryParent
public void remove All if bootstrap Entries null bootstrap Entries remove All if user Entries null user Entries remove All  removeAll bootstrapEntries bootstrapEntries removeAll userEntries userEntries removeAll
public void remove All Object entries for int i 0 i entries length i Object object entries i if object instanceof Classpath Entry I Classpath Entry entry Parent Classpath Entry object get Parent if entry Parent instanceof Classpath Group Classpath Group entry Parent remove Entry Classpath Entry object else remove object else remove object  removeAll ClasspathEntry IClasspathEntry entryParent ClasspathEntry getParent entryParent ClasspathGroup ClasspathGroup entryParent removeEntry ClasspathEntry
public void set Bootstrap Entries I Runtime Classpath Entry entries if bootstrap Entries null get Bootstrap Entry bootstrap Entries remove All for int i 0 i entries length i bootstrap Entries add Entry new Classpath Entry entries i bootstrap Entries  setBootstrapEntries IRuntimeClasspathEntry bootstrapEntries getBootstrapEntry bootstrapEntries removeAll bootstrapEntries addEntry ClasspathEntry bootstrapEntries
private Classpath Group create Group Entry I Runtime Classpath Entry entries Classpath Group entry Parent String name boolean can Be Removed boolean add Entry Classpath Group group new Classpath Group name entry Parent can Be Removed for int i 0 i entries length i group add Entry new Classpath Entry entries i group if add Entry add Entry group return group  ClasspathGroup createGroupEntry IRuntimeClasspathEntry ClasspathGroup entryParent canBeRemoved addEntry ClasspathGroup ClasspathGroup entryParent canBeRemoved addEntry ClasspathEntry addEntry addEntry
public void set User Entries I Runtime Classpath Entry entries if user Entries null get User Entry user Entries remove All for int i 0 i entries length i user Entries add Entry new Classpath Entry entries i user Entries  setUserEntries IRuntimeClasspathEntry userEntries getUserEntry userEntries removeAll userEntries addEntry ClasspathEntry userEntries
public I Classpath Entry get Bootstrap Entry if bootstrap Entries null String name Classpath Messages get String Classpath Model 0 NON NLS 1 bootstrap Entries create Group Entry new I Runtime Classpath Entry 0 null name false true return bootstrap Entries  IClasspathEntry getBootstrapEntry bootstrapEntries ClasspathMessages getString ClasspathModel bootstrapEntries createGroupEntry IRuntimeClasspathEntry bootstrapEntries
public I Classpath Entry get User Entry if user Entries null String name Classpath Messages get String Classpath Model 1 NON NLS 1 user Entries create Group Entry new I Runtime Classpath Entry 0 null name false true return user Entries  IClasspathEntry getUserEntry userEntries ClasspathMessages getString ClasspathModel userEntries createGroupEntry IRuntimeClasspathEntry userEntries
Constructs a new classpath model with root entries public Classpath Model super get Bootstrap Entry get User Entry  ClasspathModel getBootstrapEntry getUserEntry
see org eclipse jdt internal debug ui classpath I Classpath Entry is Editable public boolean is Editable return false  IClasspathEntry isEditable isEditable

Returns the classpath entries that are the children of this classpath entry return the child classpath entries of this entry 
Returns whether this classpath entries has child entries return whether code true code if this classpath entry has childern code false code otherwise 
Returns the parent of this classpath entry return the parent of this classpath entry or code null code if none 
Move this entries child entry in the direction indicated param up if code true code move the child up one position in the order of the entries Otherwise move the child down one position param child the child entry to move 
Returns whether this entry is editable return whether this entry is editable 

Creates a runtime classpath viewer with the given parent param parent the parent control public Runtime Classpath Viewer Composite parent super parent Grid Data data new Grid Data Grid Data FILL BOTH data width Hint I Dialog Constants ENTRY FIELD WIDTH data height Hint get Tree get Item Height get Tree set Layout Data data get Tree add Key Listener new Key Adapter public void key Pressed Key Event event if update Selection Runtime Classpath Action REMOVE I Structured Selection get Selection event character SWT DEL event state Mask 0 List selection get Selection From Widget get Classpath Content Provider remove All selection notify Changed  RuntimeClasspathViewer GridData GridData GridData FILL_BOTH widthHint IDialogConstants ENTRY_FIELD_WIDTH heightHint getTree getItemHeight getTree setLayoutData getTree addKeyListener KeyAdapter keyPressed KeyEvent updateSelection RuntimeClasspathAction IStructuredSelection getSelection stateMask getSelectionFromWidget getClasspathContentProvider removeAll notifyChanged
public void set Entries I Runtime Classpath Entry entries get Classpath Content Provider set Refresh Enabled false resolve Current Parent get Selection get Classpath Content Provider remove All f Current Parent get Classpath Content Provider set Entries entries get Classpath Content Provider set Refresh Enabled true notify Changed  setEntries IRuntimeClasspathEntry getClasspathContentProvider setRefreshEnabled resolveCurrentParent getSelection getClasspathContentProvider removeAll fCurrentParent getClasspathContentProvider setEntries getClasspathContentProvider setRefreshEnabled notifyChanged
see org eclipse jdt internal debug ui launcher I Classpath Viewer get Entries public I Runtime Classpath Entry get Entries return get Classpath Content Provider get Model get All Entries  IClasspathViewer getEntries IRuntimeClasspathEntry getEntries getClasspathContentProvider getModel getAllEntries
public void add Entries I Runtime Classpath Entry entries get Classpath Content Provider set Refresh Enabled false resolve Current Parent get Selection List existing Entries Arrays as List f Current Parent get Entries for int i 0 i entries length i if existing Entries contains entries i get Classpath Content Provider add f Current Parent entries i get Classpath Content Provider set Refresh Enabled true notify Changed  addEntries IRuntimeClasspathEntry getClasspathContentProvider setRefreshEnabled resolveCurrentParent getSelection existingEntries asList fCurrentParent getEntries existingEntries getClasspathContentProvider fCurrentParent getClasspathContentProvider setRefreshEnabled notifyChanged
private boolean resolve Current Parent I Selection selection f Current Parent null Iterator selected I Structured Selection selection iterator while selected has Next Object element selected next if element instanceof Classpath Entry I Classpath Entry parent I Classpath Entry element get Parent if f Current Parent null if f Current Parent equals parent return false else f Current Parent parent else if f Current Parent null if f Current Parent equals element return false else f Current Parent I Classpath Entry element return true  resolveCurrentParent ISelection fCurrentParent IStructuredSelection hasNext ClasspathEntry IClasspathEntry IClasspathEntry getParent fCurrentParent fCurrentParent fCurrentParent fCurrentParent fCurrentParent fCurrentParent IClasspathEntry
see org eclipse jdt internal debug ui launcher I Classpath Viewer is Enabled public boolean is Enabled return true  IClasspathViewer isEnabled isEnabled
Sets the launch configuration context for this viewer if any public void set Launch Configuration I Launch Configuration configuration if get Label Provider null Classpath Label Provider get Label Provider set Launch Configuration configuration  setLaunchConfiguration ILaunchConfiguration getLabelProvider ClasspathLabelProvider getLabelProvider setLaunchConfiguration
public void add Entries Changed Listener I Entries Changed Listener listener f Listeners add listener  addEntriesChangedListener IEntriesChangedListener fListeners
public void remove Entries Changed Listener I Entries Changed Listener listener f Listeners remove listener  removeEntriesChangedListener IEntriesChangedListener fListeners
public void notify Changed Object listeners f Listeners get Listeners for int i 0 i listeners length i I Entries Changed Listener listeners i entries Changed this  notifyChanged fListeners getListeners IEntriesChangedListener entriesChanged
public int index Of I Runtime Classpath Entry entry I Classpath Entry entries get Classpath Content Provider get Bootstrap Classpath Entries for int i 0 i entries length i I Classpath Entry existing Entry entries i if existing Entry equals entry return 1 entries get Classpath Content Provider get User Classpath Entries for int i 0 i entries length i I Classpath Entry existing Entry entries i if existing Entry equals entry return 1 return 1  indexOf IRuntimeClasspathEntry IClasspathEntry getClasspathContentProvider getBootstrapClasspathEntries IClasspathEntry existingEntry existingEntry getClasspathContentProvider getUserClasspathEntries IClasspathEntry existingEntry existingEntry
see org eclipse jdt internal debug ui launcher I Classpath Viewer get Shell public Shell get Shell return get Control get Shell  IClasspathViewer getShell getShell getControl getShell
private Classpath Content Provider get Classpath Content Provider return Classpath Content Provider super get Content Provider  ClasspathContentProvider getClasspathContentProvider ClasspathContentProvider getContentProvider
public boolean update Selection int action Type I Structured Selection selection if selection is Empty return false switch action Type case Runtime Classpath Action ADD Iterator selected selection iterator while selected has Next I Classpath Entry entry I Classpath Entry selected next if entry is Editable entry instanceof Classpath Entry return false return selection size 0 case Runtime Classpath Action REMOVE case Runtime Classpath Action MOVE selected selection iterator while selected has Next I Classpath Entry entry I Classpath Entry selected next if entry is Editable return false return selection size 0 default break return true  updateSelection actionType IStructuredSelection isEmpty actionType RuntimeClasspathAction hasNext IClasspathEntry IClasspathEntry isEditable ClasspathEntry RuntimeClasspathAction RuntimeClasspathAction hasNext IClasspathEntry IClasspathEntry isEditable
public I Selection get Selected Entries I Structured Selection selection I Structured Selection get Selection List entries new Array List selection size 2 Iterator itr selection iterator while itr has Next I Classpath Entry element I Classpath Entry itr next if element has Entries entries add All Arrays as List element get Entries else entries add element return new Structured Selection entries  ISelection getSelectedEntries IStructuredSelection IStructuredSelection getSelection ArrayList hasNext IClasspathEntry IClasspathEntry hasEntries addAll asList getEntries StructuredSelection

public Object get Adapter Object adaptable Object Class adapter Type if adapter Type equals I Workbench Adapter class return new Variable Classpath Entry Workbench Adapter return null  getAdapter adaptableObject adapterType adapterType IWorkbenchAdapter VariableClasspathEntryWorkbenchAdapter
see org eclipse core runtime I Adapter Factory get Adapter List public Class get Adapter List return new Class I Workbench Adapter class  IAdapterFactory getAdapterList getAdapterList IWorkbenchAdapter

see org eclipse ui model I Workbench Adapter get Children java lang Object public Object get Children Object o return null  IWorkbenchAdapter getChildren getChildren
public Image Descriptor get Image Descriptor Object object if object instanceof Variable Classpath Entry TODO illegal reference return Java Plugin Images DESC OBJS JAR return null  ImageDescriptor getImageDescriptor VariableClasspathEntry JavaPluginImages DESC_OBJS_JAR
public String get Label Object o if o instanceof Variable Classpath Entry return Variable Classpath Entry o get Name return NON NLS 1  getLabel VariableClasspathEntry VariableClasspathEntry getName
see org eclipse ui model I Workbench Adapter get Parent java lang Object public Object get Parent Object o return null  IWorkbenchAdapter getParent getParent

public class Conditional Breakpoint Error Dialog extends Error Dialog public Conditional Breakpoint Error Dialog Shell parent Shell String message I Status status super parent Shell DebugUI Messages get String Conditional Breakpoint Error Dialog Conditional Breakpoint Error 1 message status I Status ERROR NON NLS 1  ConditionalBreakpointErrorDialog ErrorDialog ConditionalBreakpointErrorDialog parentShell IStatus parentShell DebugUIMessages getString ConditionalBreakpointErrorDialog Conditional_Breakpoint_Error_1 IStatus
see org eclipse jface dialogs Dialog create Buttons For Button Bar org eclipse swt widgets Composite protected void create Buttons For Button Bar Composite parent create Edit and Cancel buttons create Button parent I Dialog Constants OK ID DebugUI Messages get String Conditional Breakpoint Error Dialog Edit Condition 2 true NON NLS 1 create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButtonsForButtonBar createButton IDialogConstants OK_ID DebugUIMessages getString ConditionalBreakpointErrorDialog Edit_Condition_2 createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL

Resource Bundle get Bundle BUNDLE NAME private Console Messages  ResourceBundle getBundle BUNDLE_NAME ConsoleMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

see org eclipse debug ui console I Console Line Tracker init org eclipse debug ui console I Console public void init I Console console f Console console fJ9 Matcher new String Matcher false false NON NLS 1  IConsoleLineTracker IConsole IConsole fConsole fJ9Matcher StringMatcher
see org eclipse debug ui console I Console Line Tracker line Appended org eclipse jface text I Region public void line Appended I Region line try int offset line get Offset int length line get Length String text f Console get Document get offset length int index 1 if fJ9 Matcher match text find the last space in the line index text last Index Of if index 0 int link Offset offset index 1 int link Length length index 1 I Console Hyperlink link null link new J9 Stack Trace Hyperlink f Console f Console add Link link link Offset link Length catch Bad Location Exception e  IConsoleLineTracker lineAppended IRegion lineAppended IRegion getOffset getLength fConsole getDocument fJ9Matcher lastIndexOf linkOffset linkLength IConsoleHyperlink J9StackTraceHyperlink fConsole fConsole addLink linkOffset linkLength BadLocationException
see org eclipse debug ui console I Console Line Tracker dispose public void dispose f Console null fJ9 Matcher null  IConsoleLineTracker fConsole fJ9Matcher

see Java Stack Trace Hyperlink Java Stack Trace Hyperlink I Console int int public J9 Stack Trace Hyperlink I Console console super console  JavaStackTraceHyperlink JavaStackTraceHyperlink IConsole J9StackTraceHyperlink IConsole
see Java Stack Trace Hyperlink get Type Name protected String get Type Name throws Core Exception String link Text get Link Text int index link Text last Index Of if index 0 String type Name link Text substring 0 index remove the method name index type Name last Index Of if index 0 type Name type Name substring 0 index replace slashes with dots return type Name replace else I Status status new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier 0 Console Messages get String J9 Stack Trace Hyperlink Unable to parse type name from hyperlink  1 null NON NLS 1 throw new Core Exception status  JavaStackTraceHyperlink getTypeName getTypeName CoreException linkText getLinkText linkText lastIndexOf typeName linkText typeName lastIndexOf typeName typeName typeName IStatus IStatus JDIDebugUIPlugin getUniqueIdentifier ConsoleMessages getString J9StackTraceHyperlink Unable_to_parse_type_name_from_hyperlink _1 CoreException
see org eclipse jdt internal debug ui console Java Stack Trace Hyperlink get Line Number protected int get Line Number return 1  JavaStackTraceHyperlink getLineNumber getLineNumber

see org eclipse debug ui console I Console Line Tracker init org eclipse debug ui console I Console public void init I Console console f Console console f Java Matcher new String Matcher java false false NON NLS 1 f Native Matcher new String Matcher Native Method false false NON NLS 1 f Java Qualified Name Pattern Pattern compile  A Za z  A Za z0 9  A Za z  A Za z0 9 Exception NON NLS 1  IConsoleLineTracker IConsole IConsole fConsole fJavaMatcher StringMatcher fNativeMatcher StringMatcher fJavaQualifiedNamePattern _A _A _A _A
see org eclipse debug ui console I Console Line Tracker line Appended org eclipse jface text I Region public void line Appended I Region line try int offset line get Offset int length line get Length String text f Console get Document get offset length boolean standard Match false int index 1 if f Java Matcher match text standard Match true find the last space in the line index text last Index Of else if f Native Matcher match text find the second last space in the line index text last Index Of text length 15 if index 0 if f In Trace f In Trace true look for exception name if f Prev Text null Matcher m f Java Qualified Name Pattern matcher f Prev Text if m find int start m start int end m end int size end start I Console Hyperlink link new Java Exception Hyper Link f Console f Prev Text substring start end start f Prev Line get Offset f Console add Link link start size int link Offset offset index 1 int link Length length index 1 I Console Hyperlink link null if standard Match link new Java Stack Trace Hyperlink f Console else link new Java Native Stack Trace Hyperlink f Console f Console add Link link link Offset link Length else if f In Trace f In Trace false f Prev Text text f Prev Line line catch Bad Location Exception e  IConsoleLineTracker lineAppended IRegion lineAppended IRegion getOffset getLength fConsole getDocument standardMatch fJavaMatcher standardMatch lastIndexOf fNativeMatcher lastIndexOf fInTrace fInTrace fPrevText fJavaQualifiedNamePattern fPrevText IConsoleHyperlink JavaExceptionHyperLink fConsole fPrevText fPrevLine getOffset fConsole addLink linkOffset linkLength IConsoleHyperlink standardMatch JavaStackTraceHyperlink fConsole JavaNativeStackTraceHyperlink fConsole fConsole addLink linkOffset linkLength fInTrace fInTrace fPrevText fPrevLine BadLocationException
see org eclipse debug ui console I Console Line Tracker dispose public void dispose f Console null f Java Matcher null f Native Matcher null  IConsoleLineTracker fConsole fJavaMatcher fNativeMatcher

Constructs a new hyper link param console the console the link is contained in param exception Name fully qualified name of the exception public Java Exception Hyper Link I Console console String exception Name super console f Exception Name exception Name  exceptionName JavaExceptionHyperLink IConsole exceptionName fExceptionName exceptionName
see org eclipse debug ui console I Console Hyperlink link Activated public void link Activated try check for an existing breakpoint I Breakpoint breakpoints Debug Plugin get Default get Breakpoint Manager get Breakpoints JDI Debug Model get Plugin Identifier for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if breakpoint instanceof I Java Exception Breakpoint I Java Exception Breakpoint exception Breakpoint I Java Exception Breakpoint breakpoint if f Exception Name equals exception Breakpoint get Type Name show Properties exception Breakpoint return create a new exception breakpoint Object source Element get Source Element f Exception Name if source Element null I Resource res null I Type type null if source Element instanceof I Java Element I Java Element element I Java Element source Element res element get Resource if res null res element get Java Project get Resource if res null res Resources Plugin get Workspace get Root if source Element instanceof I Compilation Unit type I Compilation Unit source Element find Primary Type else if source Element instanceof I Class File type I Class File source Element get Type boolean checked false if type null checked Add Exception Dialog get Exception Type type Add Exception Dialog CHECKED EXCEPTION I Java Exception Breakpoint breakpoint JDI Debug Model create Exception Breakpoint res f Exception Name true true checked true null show Properties breakpoint catch Core Exception e JDI DebugUI Plugin error Dialog Console Messages get String Java Stack Trace Hyperlink An exception occurred while following link  3 e NON NLS 1 return  IConsoleHyperlink linkActivated linkActivated IBreakpoint DebugPlugin getDefault getBreakpointManager getBreakpoints JDIDebugModel getPluginIdentifier IBreakpoint IJavaExceptionBreakpoint IJavaExceptionBreakpoint exceptionBreakpoint IJavaExceptionBreakpoint fExceptionName exceptionBreakpoint getTypeName showProperties exceptionBreakpoint sourceElement getSourceElement fExceptionName sourceElement IResource IType sourceElement IJavaElement IJavaElement IJavaElement sourceElement getResource getJavaProject getResource ResourcesPlugin getWorkspace getRoot sourceElement ICompilationUnit ICompilationUnit sourceElement findPrimaryType sourceElement IClassFile IClassFile sourceElement getType AddExceptionDialog getExceptionType AddExceptionDialog CHECKED_EXCEPTION IJavaExceptionBreakpoint JDIDebugModel createExceptionBreakpoint fExceptionName showProperties CoreException JDIDebugUIPlugin errorDialog ConsoleMessages getString JavaStackTraceHyperlink An_exception_occurred_while_following_link _3
Show the properties dialog for the given breakpoint param exception Breakpoint private void show Properties I Java Exception Breakpoint breakpoint Java Breakpoint Properties Action action new Java Breakpoint Properties Action action selection Changed null new Structured Selection breakpoint action run null  exceptionBreakpoint showProperties IJavaExceptionBreakpoint JavaBreakpointPropertiesAction JavaBreakpointPropertiesAction selectionChanged StructuredSelection

see Java Stack Trace Hyperlink Java Stack Trace Hyperlink I Console int int public Java Native Stack Trace Hyperlink I Console console super console  JavaStackTraceHyperlink JavaStackTraceHyperlink IConsole JavaNativeStackTraceHyperlink IConsole
see org eclipse jdt internal debug ui console Java Stack Trace Hyperlink get Line Number protected int get Line Number return 1  JavaStackTraceHyperlink getLineNumber getLineNumber

Constructor for Java Stack Trace Hyperlink public Java Stack Trace Hyperlink I Console console f Console console  JavaStackTraceHyperlink JavaStackTraceHyperlink IConsole fConsole
see org eclipse debug ui console I Console Hyperlink link Entered public void link Entered  IConsoleHyperlink linkEntered linkEntered
see org eclipse debug ui console I Console Hyperlink link Exited public void link Exited  IConsoleHyperlink linkExited linkExited
see org eclipse debug ui console I Console Hyperlink link Activated public void link Activated try String type Name get Type Name int line Number get Line Number documents start at 0 if line Number 0 line Number Object source Element get Source Element type Name if source Element null I Debug Model Presentation presentation JDI DebugUI Plugin get Default get Model Presentation I Editor Input editor Input presentation get Editor Input source Element if editor Input null String editor Id presentation get Editor Id editor Input source Element if editor Id null I Editor Part editor Part JDI DebugUI Plugin get Active Page open Editor editor Input editor Id if editor Part instanceof I Text Editor line Number 0 I Text Editor text Editor I Text Editor editor Part I Document Provider provider text Editor get Document Provider provider connect editor Input I Document document provider get Document editor Input try I Region line document get Line Information line Number text Editor select And Reveal line get Offset line get Length catch Bad Location Exception e provider disconnect editor Input return did not find source Message Dialog open Information JDI DebugUI Plugin get Active Workbench Shell Console Messages get String Java Stack Trace Hyperlink Information 1 Message Format format Console Messages get String Java Stack Trace Hyperlink Source not found for  0  2 new String type Name NON NLS 1 NON NLS 2 catch Core Exception e JDI DebugUI Plugin error Dialog Console Messages get String Java Stack Trace Hyperlink An exception occurred while following link  3 e NON NLS 1 return  IConsoleHyperlink linkActivated linkActivated typeName getTypeName lineNumber getLineNumber lineNumber lineNumber sourceElement getSourceElement typeName sourceElement IDebugModelPresentation JDIDebugUIPlugin getDefault getModelPresentation IEditorInput editorInput getEditorInput sourceElement editorInput editorId getEditorId editorInput sourceElement editorId IEditorPart editorPart JDIDebugUIPlugin getActivePage openEditor editorInput editorId editorPart ITextEditor lineNumber ITextEditor textEditor ITextEditor editorPart IDocumentProvider textEditor getDocumentProvider editorInput IDocument getDocument editorInput IRegion getLineInformation lineNumber textEditor selectAndReveal getOffset getLength BadLocationException editorInput MessageDialog openInformation JDIDebugUIPlugin getActiveWorkbenchShell ConsoleMessages getString JavaStackTraceHyperlink Information_1 MessageFormat ConsoleMessages getString JavaStackTraceHyperlink Source_not_found_for_ _2 typeName CoreException JDIDebugUIPlugin errorDialog ConsoleMessages getString JavaStackTraceHyperlink An_exception_occurred_while_following_link _3
Returns the source element associated with the given type name or code null code if none param type Name type name to search for source element return the source element associated with the given type name or code null code if none protected Object get Source Element String type Name I Source Locator locator get Source Locator if locator null try search for the type in the workspace return Open Type Action find Type In Workspace type Name catch Java Model Exception e return null return Open Type Action find Source Element type Name locator  typeName getSourceElement typeName ISourceLocator getSourceLocator OpenTypeAction findTypeInWorkspace typeName JavaModelException OpenTypeAction findSourceElement typeName
Returns the source locator associated with this hyperlink or code null code if none return the source locator associated with this hyperlink or code null code if none private I Source Locator get Source Locator I Source Locator source Locator null I Launch launch get Console get Process get Launch if launch null source Locator launch get Source Locator return source Locator  ISourceLocator getSourceLocator ISourceLocator sourceLocator ILaunch getConsole getProcess getLaunch sourceLocator getSourceLocator sourceLocator
Returns the fully qualified name of the type to open return fully qualified type name exception Core Exception if unable to parse the type name protected String get Type Name throws Core Exception String link Text get Link Text int index link Text index Of if index 0 String type Name link Text substring 0 index remove the method name index type Name last Index Of int inner Class Index type Name last Index Of index if inner Class Index 1 index inner Class Index if index 0 type Name type Name substring 0 index return type Name else I Status status new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier 0 Console Messages get String Java Stack Trace Hyperlink Unable to parse type name from hyperlink  5 null NON NLS 1 throw new Core Exception status  CoreException getTypeName CoreException linkText getLinkText linkText indexOf typeName linkText typeName lastIndexOf innerClassIndex typeName lastIndexOf innerClassIndex innerClassIndex typeName typeName typeName IStatus IStatus JDIDebugUIPlugin getUniqueIdentifier ConsoleMessages getString JavaStackTraceHyperlink Unable_to_parse_type_name_from_hyperlink _5 CoreException
Returns the line number associated with the stack trace or 1 if none exception Core Exception if unable to parse the number protected int get Line Number throws Core Exception String link Text get Link Text int index link Text last Index Of if index 0 String num Text link Text substring index 1 link Text length 1 try return Integer parse Int num Text catch Number Format Exception e I Status status new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier 0 Console Messages get String Java Stack Trace Hyperlink Unable to parse line number from hyperlink  6 e NON NLS 1 throw new Core Exception status else I Status status new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier 0 Console Messages get String Java Stack Trace Hyperlink Unable to parse line number from hyperlink  7 null NON NLS 1 throw new Core Exception status  CoreException getLineNumber CoreException linkText getLinkText linkText lastIndexOf numText linkText linkText parseInt numText NumberFormatException IStatus IStatus JDIDebugUIPlugin getUniqueIdentifier ConsoleMessages getString JavaStackTraceHyperlink Unable_to_parse_line_number_from_hyperlink _6 CoreException IStatus IStatus JDIDebugUIPlugin getUniqueIdentifier ConsoleMessages getString JavaStackTraceHyperlink Unable_to_parse_line_number_from_hyperlink _7 CoreException
Returns the console this link is contained in return console protected I Console get Console return f Console  IConsole getConsole fConsole
Returns this link s text exception Core Exception if unable to retrieve the text protected String get Link Text throws Core Exception try I Region region get Console get Region this return get Console get Document get region get Offset region get Length catch Bad Location Exception e I Status status new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier 0 Console Messages get String Java Stack Trace Hyperlink Unable to retrieve hyperlink text  8 e NON NLS 1 throw new Core Exception status  CoreException getLinkText CoreException IRegion getConsole getRegion getConsole getDocument getOffset getLength BadLocationException IStatus IStatus JDIDebugUIPlugin getUniqueIdentifier ConsoleMessages getString JavaStackTraceHyperlink Unable_to_retrieve_hyperlink_text _8 CoreException

int start inclusive int end exclusive public Position int start int end this start start this end end 
this end end public int get Start return start  getStart
return start public int get End return end  getEnd
String Matcher constructor takes in a String object that is a simple pattern which may contain for 0 and many characters and for exactly one character Literal and characters must be escaped in the pattern e g means literal etc Escaping any other character including the escape character itself just results in that character in the pattern e g a means a and means If invoking the String Matcher with string literals in Java don t forget escape characters are represented by param pattern the pattern to match text against param ignore Case if true case is ignored param ignore Wild Cards if true wild cards and their escape sequences are ignored everything is taken literally public String Matcher String pattern boolean ignore Case boolean ignore Wild Cards if pattern null throw new Illegal Argument Exception f Ignore Case ignore Case f Ignore Wild Cards ignore Wild Cards f Pattern pattern f Length pattern length if f Ignore Wild Cards parse No Wild Cards else parse Wild Cards  StringMatcher StringMatcher ignoreCase ignoreWildCards StringMatcher ignoreCase ignoreWildCards IllegalArgumentException fIgnoreCase ignoreCase fIgnoreWildCards ignoreWildCards fPattern fLength fIgnoreWildCards parseNoWildCards parseWildCards
Find the first occurrence of the pattern between code start code inclusive and code end code exclusive param code text code the String object to search in param code start code the starting index of the search range inclusive param code end code the ending index of the search range exclusive return an code String Matcher Position code object that keeps the starting inclusive and ending positions exclusive of the first occurrence of the pattern in the specified range of the text return null if not found or subtext is empty start end A pair of zeros is returned if pattern is empty string Note that for pattern like abc with leading and trailing stars position of abc is returned For a pattern like in text abcdf 1 3 is returned public String Matcher Position find String text int start int end if text null throw new Illegal Argument Exception int tlen text length if start 0 start 0 if end tlen end tlen if end 0 start end return null if f Length 0 return new Position start start if f Ignore Wild Cards int x pos In text start end if x 0 return null return new Position x x f Length int seg Count f Segments length if seg Count 0 pattern contains only s return new Position start end int cur Pos start int match Start 1 int i for i 0 i seg Count cur Pos end i String current f Segments i int next Match reg Exp Pos In text cur Pos end current if next Match 0 return null if i 0 match Start next Match cur Pos next Match current length if i seg Count return null return new Position match Start cur Pos  StringMatcher StringMatcher IllegalArgumentException fLength fIgnoreWildCards posIn fLength segCount fSegments segCount curPos matchStart segCount curPos fSegments nextMatch regExpPosIn curPos nextMatch matchStart nextMatch curPos nextMatch segCount matchStart curPos
match the given code text code with the pattern return true if matched eitherwise false param code text code a String object public boolean match String text return match text 0 text length 
Given the starting inclusive and the ending exclusive positions in the code text code determine if the given substring matches with a Pattern return true if the specified portion of the text matches the pattern param String code text code a String object that contains the substring to match param int code start code marks the starting position inclusive of the substring param int code end code marks the ending index exclusive of the substring public boolean match String text int start int end if null text throw new Illegal Argument Exception if start end return false if f Ignore Wild Cards return end start f Length f Pattern region Matches f Ignore Case 0 text start f Length int seg Count f Segments length if seg Count 0 f Has Leading Star f Has Trailing Star pattern contains only s return true if start end return f Length 0 if f Length 0 return start end int tlen text length if start 0 start 0 if end tlen end tlen int t Cur Pos start int bound end f Bound if bound 0 return false int i 0 String current f Segments i int seg Length current length process first segment if f Has Leading Star if reg Exp Region Matches text start current 0 seg Length return false else i t Cur Pos t Cur Pos seg Length if f Segments length 1 f Has Leading Star f Has Trailing Star only one segment to match no wildcards specified return t Cur Pos end process middle segments while i seg Count current f Segments i int current Match int k current index Of f Single Wild Card if k 0 current Match text Pos In text t Cur Pos end current if current Match 0 return false else current Match reg Exp Pos In text t Cur Pos end current if current Match 0 return false t Cur Pos current Match current length i process final segment if f Has Trailing Star t Cur Pos end int clen current length return reg Exp Region Matches text end clen current 0 clen return i seg Count  aPattern IllegalArgumentException fIgnoreWildCards fLength fPattern regionMatches fIgnoreCase fLength segCount fSegments segCount fHasLeadingStar fHasTrailingStar fLength fLength tCurPos fBound fSegments segLength fHasLeadingStar regExpRegionMatches segLength tCurPos tCurPos segLength fSegments fHasLeadingStar fHasTrailingStar tCurPos segCount fSegments currentMatch indexOf fSingleWildCard currentMatch textPosIn tCurPos currentMatch currentMatch regExpPosIn tCurPos currentMatch tCurPos currentMatch fHasTrailingStar tCurPos regExpRegionMatches segCount
This method parses the given pattern into segments seperated by wildcard characters Since wildcards are not being used in this case the pattern consists of a single segment private void parse No Wild Cards f Segments new String 1 f Segments 0 f Pattern f Bound f Length  parseNoWildCards fSegments fSegments fPattern fBound fLength
Parses the given pattern into segments seperated by wildcard characters param p a String object that is a simple regular expression with and or private void parse Wild Cards if f Pattern starts With NON NLS 1 f Has Leading Star true if f Pattern ends With NON NLS 1 make sure it s not an escaped wildcard if f Length 1 f Pattern char At f Length 2 f Has Trailing Star true Vector temp new Vector int pos 0 String Buffer buf new String Buffer while pos f Length char c f Pattern char At pos switch c case if pos f Length buf append c else char next f Pattern char At pos if it s an escape sequence if next next next buf append next else not an escape sequence just insert literally buf append c buf append next break case if buf length 0 new segment temp add Element buf to String f Bound buf length buf set Length 0 break case append special character representing single match wildcard buf append f Single Wild Card break default buf append c add last buffer to segment list if buf length 0 temp add Element buf to String f Bound buf length f Segments new String temp size temp copy Into f Segments  parseWildCards fPattern startsWith fHasLeadingStar fPattern endsWith fLength fPattern charAt fLength fHasTrailingStar StringBuffer StringBuffer fLength fPattern charAt fLength fPattern charAt addElement toString fBound setLength fSingleWildCard addElement toString fBound fSegments copyInto fSegments
param code text code a string which contains no wildcard param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive return the starting index in the text of the pattern or 1 if not found protected int pos In String text int start int end no wild card in pattern int max end f Length if f Ignore Case int i text index Of f Pattern start if i 1 i max return 1 return i for int i start i max i if text region Matches true i f Pattern 0 f Length return i return 1  posIn fLength fIgnoreCase indexOf fPattern regionMatches fPattern fLength
param code text code a simple regular expression that may only contain s param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a simple regular expression that may contains param code case Ignored code wether the pattern is not casesensitive return the starting index in the text of the pattern or 1 if not found protected int reg Exp Pos In String text int start int end String p int plen p length int max end plen for int i start i max i if reg Exp Region Matches text i p 0 plen return i return 1  caseIgnored regExpPosIn regExpRegionMatches
return boolean param code text code a String to match param code start code int that indicates the starting index of match inclusive param code end code int that indicates the ending index of match exclusive param code p code String String a simple regular expression that may contain param code ignore Case code boolean indicating wether code p code is case sensitive protected boolean reg Exp Region Matches String text int t Start String p int p Start int plen while plen 0 char tchar text char At t Start char pchar p char At p Start process wild cards if f Ignore Wild Cards skip single wild cards if pchar f Single Wild Card continue if pchar tchar continue if f Ignore Case if Character to Upper Case tchar Character to Upper Case pchar continue comparing after converting to upper case doesn t handle all cases also compare after converting to lower case if Character to Lower Case tchar Character to Lower Case pchar continue return false return true  ignoreCase regExpRegionMatches tStart pStart charAt tStart charAt pStart fIgnoreWildCards fSingleWildCard fIgnoreCase toUpperCase toUpperCase toLowerCase toLowerCase
param code text code the string to match param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a string that has no wildcard param code ignore Case code boolean indicating wether code p code is case sensitive return the starting index in the text of the pattern or 1 if not found protected int text Pos In String text int start int end String p int plen p length int max end plen if f Ignore Case int i text index Of p start if i 1 i max return 1 return i for int i start i max i if text region Matches true i p 0 plen return i return 1  ignoreCase textPosIn fIgnoreCase indexOf regionMatches

private Create Step Filter Dialog Shell parent Filter filter Filter existing Filters super parent set Shell Style get Shell Style SWT RESIZE this filter filter this existing Filters existing Filters set Title DebugUI Messages get String Create Step Filter Dialog 2 NON NLS 1 set Status Line Above Buttons false  CreateStepFilterDialog existingFilters setShellStyle getShellStyle existingFilters existingFilters setTitle DebugUIMessages getString CreateStepFilterDialog setStatusLineAboveButtons
static Filter show Create Step Filter Dialog Shell parent Filter existing Filters Create Step Filter Dialog create Step Filter Dialog new Create Step Filter Dialog parent new Filter DEFAULT NEW FILTER TEXT true existing Filters create Step Filter Dialog create create Step Filter Dialog open return create Step Filter Dialog filter  showCreateStepFilterDialog existingFilters CreateStepFilterDialog createStepFilterDialog CreateStepFilterDialog DEFAULT_NEW_FILTER_TEXT existingFilters createStepFilterDialog createStepFilterDialog createStepFilterDialog
protected void create Buttons For Button Bar Composite parent ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true ok Button set Enabled false create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL okButton setEnabled createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
protected Control create Dialog Area Composite parent Composite container Composite super create Dialog Area parent Grid Layout grid Layout new Grid Layout grid Layout num Columns 2 grid Layout margin Height 15 grid Layout margin Width 15 container set Layout grid Layout int text Styles SWT SINGLE SWT LEFT Label label new Label container text Styles label set Text DebugUI Messages get String Create Step Filter Dialog 3 NON NLS 1 label set Font container get Font create configure Text widget for editor Fix for bug 1766 Border behavior on for text fields varies per platform On Motif you always get a border on other platforms you don t Specifying a border on Motif results in the characters getting pushed down so that only there very tops are visible Thus we have to specify different style constants for the different platforms if SWT get Platform equals motif NON NLS 1 text Styles SWT BORDER text new Text container text Styles Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL grid Data horizontal Span 1 grid Data width Hint 300 text set Layout Data grid Data text set Font container get Font text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Change if filter Valid update Status new Status Info I Status ERROR DebugUI Messages get String Create Step Filter Dialog 4 NON NLS 1 else if is Duplicate Filter text get Text trim update Status new Status Info I Status WARNING DebugUI Messages get String Create Step Filter Dialog 5 NON NLS 1 return else update Status new Status Info return container  createDialogArea createDialogArea GridLayout gridLayout GridLayout gridLayout numColumns gridLayout marginHeight gridLayout marginWidth setLayout gridLayout textStyles textStyles setText DebugUIMessages getString CreateStepFilterDialog setFont getFont getPlatform textStyles textStyles GridData gridData GridData GridData FILL_HORIZONTAL gridData horizontalSpan gridData widthHint setLayoutData gridData setFont getFont addModifyListener ModifyListener modifyText ModifyEvent validateChange filterValid updateStatus StatusInfo IStatus DebugUIMessages getString CreateStepFilterDialog isDuplicateFilter getText updateStatus StatusInfo IStatus DebugUIMessages getString CreateStepFilterDialog updateStatus StatusInfo
private void validate Change String trimmed Value text get Text trim if trimmed Value length 0 validate Input trimmed Value ok Button set Enabled true filter set Name text get Text filter Valid true else ok Button set Enabled false filter set Name DEFAULT NEW FILTER TEXT filter Valid false  validateChange trimmedValue getText trimmedValue validateInput trimmedValue okButton setEnabled setName getText filterValid okButton setEnabled setName DEFAULT_NEW_FILTER_TEXT filterValid
private boolean is Duplicate Filter String trimmed Value for int i 0 i existing Filters length i if existing Filters i get Name equals trimmed Value return true return false  isDuplicateFilter trimmedValue existingFilters existingFilters getName trimmedValue
A valid step filter is simply one that is a valid Java identifier and as defined in the JDI spec the regular expressions used for step filtering must be limited to exact matches or patterns that begin with or end with Beyond this a string cannot be validated as corresponding to an existing type or package and this is probably not even desirable private boolean validate Input String trimmed Value char first Char trimmed Value char At 0 if Character is Java Identifier Start first Char if first Char return false int length trimmed Value length for int i 1 i length i char c trimmed Value char At i if Character is Java Identifier Part c if c i length 1 continue if c i length 1 continue return false return true  validateInput trimmedValue firstChar trimmedValue charAt isJavaIdentifierStart firstChar firstChar trimmedValue trimmedValue charAt isJavaIdentifierPart
Returns the name of the section that this dialog stores its settings in return String protected String get Dialog Settings Section Name return I Java DebugUI Constants PLUGIN ID CREATE STEP FILTER DIALOG SECTION NON NLS 1  getDialogSettingsSectionName IJavaDebugUIConstants PLUGIN_ID CREATE_STEP_FILTER_DIALOG_SECTION
protected Point get Initial Location Point initial Size Point initial Location Dialog Settings Helper get Initial Location get Dialog Settings Section Name if initial Location null return initial Location return super get Initial Location initial Size  getInitialLocation initialSize initialLocation DialogSettingsHelper getInitialLocation getDialogSettingsSectionName initialLocation initialLocation getInitialLocation initialSize
see org eclipse jface window Window get Initial Size protected Point get Initial Size Point size super get Initial Size return Dialog Settings Helper get Initial Size get Dialog Settings Section Name size  getInitialSize getInitialSize getInitialSize DialogSettingsHelper getInitialSize getDialogSettingsSectionName
public boolean close if ok Clicked filter Valid false filter null Dialog Settings Helper persist Shell Geometry get Shell get Dialog Settings Section Name return super close  okClicked filterValid DialogSettingsHelper persistShellGeometry getShell getDialogSettingsSectionName
protected void ok Pressed ok Clicked true super ok Pressed  okPressed okClicked okPressed

Resource Bundle get Bundle BUNDLE NAME private DebugUI Messages  ResourceBundle getBundle BUNDLE_NAME DebugUIMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public Detail Formatter String type Name String snippet boolean enabled f Type Name type Name f Snippet snippet f Enabled enabled  DetailFormatter typeName fTypeName typeName fSnippet fEnabled
Indicate if this pretty should be used or not return boolean public boolean is Enabled return f Enabled  isEnabled fEnabled
Returns the code snippet return String public String get Snippet return f Snippet  getSnippet fSnippet
Returns the type name return String public String get Type Name return f Type Name  getTypeName fTypeName
Sets the enabled flag param enabled the new value of the flag public void set Enabled boolean enabled f Enabled enabled  setEnabled fEnabled
Sets the code snippet param snippet the snippet to set public void set Snippet String snippet f Snippet snippet  setSnippet fSnippet
Sets the type name param type Name the type name to set public void set Type Name String type Name f Type Name type Name  typeName setTypeName typeName fTypeName typeName
see java lang Comparable compare To java lang Object public int compare To Object another Detail Formatter detail Formatter Detail Formatter another if f Type Name null if detail Formatter f Type Name null return 0 else return detail Formatter f Type Name compare To f Type Name return f Type Name compare To detail Formatter f Type Name  compareTo compareTo DetailFormatter detailFormatter DetailFormatter fTypeName detailFormatter fTypeName detailFormatter fTypeName compareTo fTypeName fTypeName compareTo detailFormatter fTypeName

private Detail Formatter Dialog f Detail Format Dialog public Detail Formatter Completion Processor Detail Formatter Dialog detail Format Dialog f Detail Format Dialog detail Format Dialog  DetailFormatterDialog fDetailFormatDialog DetailFormatterCompletionProcessor DetailFormatterDialog detailFormatDialog fDetailFormatDialog detailFormatDialog
see org eclipse jface text contentassist I Content Assist Processor compute Completion Proposals I Text Viewer int public I Completion Proposal compute Completion Proposals I Text Viewer viewer int document Offset I Type receiving Type f Detail Format Dialog get Type if receiving Type null return new I Completion Proposal 0 I Java Project project receiving Type get Java Project try Generate selections from the compilation unit I Text Selection text Selection I Text Selection viewer get Selection Provider get Selection configure Result Collector project text Selection receiving Type code Complete viewer get Document get to Char Array 1 document Offset new char 0 new char 0 new int 0 false get Collector I Java Completion Proposal results get Collector get Results Generate selections from the template engine Template Engine template Engine get Template Engine if template Engine null template Engine reset template Engine complete viewer document Offset null Template Proposal template Results template Engine get Results concatenate arrays I Java Completion Proposal total new I Java Completion Proposal results length template Results length System arraycopy template Results 0 total 0 template Results length System arraycopy results 0 total template Results length results length results total Order here and not in result collector to make sure that the order applies to all proposals and not just those of the compilation unit return order results catch Java Model Exception x handle viewer x return null  IContentAssistProcessor computeCompletionProposals ITextViewer ICompletionProposal computeCompletionProposals ITextViewer documentOffset IType receivingType fDetailFormatDialog getType receivingType ICompletionProposal IJavaProject receivingType getJavaProject ITextSelection textSelection ITextSelection getSelectionProvider getSelection configureResultCollector textSelection receivingType codeComplete getDocument toCharArray documentOffset getCollector IJavaCompletionProposal getCollector getResults TemplateEngine templateEngine getTemplateEngine templateEngine templateEngine templateEngine documentOffset TemplateProposal templateResults templateEngine getResults IJavaCompletionProposal IJavaCompletionProposal templateResults templateResults templateResults templateResults JavaModelException

Detail Formatter Dialog constructor param detail Formatter the detail formatter to edit add param edit Dialog flag which indicates if the dialog is used for edit an existing formatter or for enter the info of a new one public Detail Formatter Dialog Shell parent Detail Formatter detail Formatter List defined Types boolean edit Dialog this parent detail Formatter defined Types true edit Dialog  DetailFormatterDialog detailFormatter editDialog DetailFormatterDialog DetailFormatter detailFormatter definedTypes editDialog detailFormatter definedTypes editDialog
public Detail Formatter Dialog Shell parent Detail Formatter detail Formatter List defined Types boolean edit Type Name boolean edit Dialog super parent f Detail Formatter detail Formatter f Type Searched false set Shell Style get Shell Style SWT MAX SWT RESIZE if edit Dialog set Title DebugUI Messages get String Detail Formatter Dialog Edit Detail Formatter 1 NON NLS 1 else set Title DebugUI Messages get String Detail Formatter Dialog Add Detail Formatter 2 NON NLS 1 f Edit Type Name edit Type Name f Defined Types defined Types  DetailFormatterDialog DetailFormatter detailFormatter definedTypes editTypeName editDialog fDetailFormatter detailFormatter fTypeSearched setShellStyle getShellStyle editDialog setTitle DebugUIMessages getString DetailFormatterDialog Edit_Detail_Formatter_1 setTitle DebugUIMessages getString DetailFormatterDialog Add_Detail_Formatter_2 fEditTypeName editTypeName fDefinedTypes definedTypes
Create the dialog area see org eclipse jface dialogs Dialog create Dialog Area Composite protected Control create Dialog Area Composite parent Workbench Help set Help parent I Java Debug Help Context Ids EDIT DETAIL FORMATTER DIALOG Font font parent get Font I Handler handler new Abstract Handler public Object execute Map parameter Values By Name throws Execution Exception find Corresponding Type f Snippet Viewer do Operation I Source Viewer CONTENTASSIST PROPOSALS return null I Workbench workbench PlatformUI get Workbench I Workbench Command Support command Support workbench get Command Support submission new Handler Submission null parent get Shell null I Text Editor Action Definition Ids CONTENT ASSIST PROPOSALS handler Priority MEDIUM NON NLS 1 command Support add Handler Submission submission Composite container Composite super create Dialog Area parent type name label Label label new Label container SWT NONE label set Text DebugUI Messages get String Detail Formatter Dialog Qualified type  name  2 NON NLS 1 Grid Data gd new Grid Data Grid Data BEGINNING label set Layout Data gd label set Font font Composite inner Container new Composite container SWT NONE Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 layout num Columns 2 inner Container set Layout layout gd new Grid Data Grid Data FILL HORIZONTAL inner Container set Layout Data gd type name text f Type Name Text new Text inner Container SWT SINGLE SWT BORDER f Type Name Text set Editable f Edit Type Name f Type Name Text set Text f Detail Formatter get Type Name gd new Grid Data Grid Data FILL HORIZONTAL f Type Name Text set Layout Data gd f Type Name Text set Font font f Type Name Text add Modify Listener new Modify Listener public void modify Text Modify Event e f Type Searched false check Values type search button Button type Search Button new Button inner Container SWT PUSH type Search Button set Text DebugUI Messages get String Detail Formatter Dialog Select  type 4 NON NLS 1 set Button Layout Data type Search Button gd Grid Data type Search Button get Layout Data gd horizontal Alignment Grid Data END type Search Button set Enabled f Edit Type Name type Search Button set Layout Data gd type Search Button set Font font type Search Button set Enabled f Edit Type Name type Search Button add Listener SWT Selection new Listener public void handle Event Event e select Type snippet label String label Text null I Command Manager command Manager PlatformUI get Workbench get Command Support get Command Manager I Command command command Manager get Command org eclipse ui edit text content Assist proposals NON NLS 1 if command null List key Bindings command get Key Sequence Bindings if key Bindings null key Bindings size 0 I Key Sequence Binding binding I Key Sequence Binding key Bindings get 0 label Text Message Format format DebugUI Messages get String Detail Formatter Dialog 17 new String binding get Key Sequence format NON NLS 1 if label Text null label Text DebugUI Messages get String Detail Formatter Dialog Detail formatter  code snippet  1 NON NLS 1 label new Label container SWT NONE label set Text label Text NON NLS 1 gd new Grid Data Grid Data BEGINNING label set Layout Data gd label set Font font snippet viewer f Snippet Viewer new JDI Source Viewer container null SWT BORDER SWT V SCROLL SWT H SCROLL f Snippet Viewer set Input this Java Text Tools tools Java Plugin get Default get Java Text Tools I Document document new Document I Document Partitioner partitioner tools create Document Partitioner document set Document Partitioner partitioner partitioner connect document f Snippet Viewer configure new Display Viewer Configuration public I Content Assist Processor get Content Assistant Processor return new Detail Formatter Completion Processor Detail Formatter Dialog this f Snippet Viewer set Editable true f Snippet Viewer set Document document Control control f Snippet Viewer get Control gd new Grid Data Grid Data FILL BOTH gd height Hint convert Height In Chars To Pixels 10 gd width Hint convert Width In Chars To Pixels 80 control set Layout Data gd document set f Detail Formatter get Snippet f Snippet Viewer get Document add Document Listener new I Document Listener public void document About To Be Changed Document Event event public void document Changed Document Event event check Values enable checkbox f Check Box new Button container SWT CHECK SWT LEFT f Check Box set Text DebugUI Messages get String Detail Formatter Dialog Enable 1 NON NLS 1 f Check Box set Selection f Detail Formatter is Enabled f Check Box set Font font check Values return container  createDialogArea createDialogArea WorkbenchHelp setHelp IJavaDebugHelpContextIds EDIT_DETAIL_FORMATTER_DIALOG getFont IHandler AbstractHandler parameterValuesByName ExecutionException findCorrespondingType fSnippetViewer doOperation ISourceViewer CONTENTASSIST_PROPOSALS IWorkbench getWorkbench IWorkbenchCommandSupport commandSupport getCommandSupport HandlerSubmission getShell ITextEditorActionDefinitionIds CONTENT_ASSIST_PROPOSALS commandSupport addHandlerSubmission createDialogArea setText DebugUIMessages getString DetailFormatterDialog Qualified_type_ name__2 GridData GridData GridData setLayoutData setFont innerContainer GridLayout GridLayout marginWidth marginHeight numColumns innerContainer setLayout GridData GridData FILL_HORIZONTAL innerContainer setLayoutData fTypeNameText innerContainer fTypeNameText setEditable fEditTypeName fTypeNameText setText fDetailFormatter getTypeName GridData GridData FILL_HORIZONTAL fTypeNameText setLayoutData fTypeNameText setFont fTypeNameText addModifyListener ModifyListener modifyText ModifyEvent fTypeSearched checkValues typeSearchButton innerContainer typeSearchButton setText DebugUIMessages getString DetailFormatterDialog Select_ type_4 setButtonLayoutData typeSearchButton GridData typeSearchButton getLayoutData horizontalAlignment GridData typeSearchButton setEnabled fEditTypeName typeSearchButton setLayoutData typeSearchButton setFont typeSearchButton setEnabled fEditTypeName typeSearchButton addListener handleEvent selectType labelText ICommandManager commandManager getWorkbench getCommandSupport getCommandManager ICommand commandManager getCommand contentAssist keyBindings getKeySequenceBindings keyBindings keyBindings IKeySequenceBinding IKeySequenceBinding keyBindings labelText MessageFormat DebugUIMessages getString DetailFormatterDialog getKeySequence labelText labelText DebugUIMessages getString DetailFormatterDialog Detail_formatter_ code_snippet__1 setText labelText GridData GridData setLayoutData setFont fSnippetViewer JDISourceViewer V_SCROLL H_SCROLL fSnippetViewer setInput JavaTextTools JavaPlugin getDefault getJavaTextTools IDocument IDocumentPartitioner createDocumentPartitioner setDocumentPartitioner fSnippetViewer DisplayViewerConfiguration IContentAssistProcessor getContentAssistantProcessor DetailFormatterCompletionProcessor DetailFormatterDialog fSnippetViewer setEditable fSnippetViewer setDocument fSnippetViewer getControl GridData GridData FILL_BOTH heightHint convertHeightInCharsToPixels widthHint convertWidthInCharsToPixels setLayoutData fDetailFormatter getSnippet fSnippetViewer getDocument addDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent documentChanged DocumentEvent checkValues fCheckBox fCheckBox setText DebugUIMessages getString DetailFormatterDialog Enable_1 fCheckBox setSelection fDetailFormatter isEnabled fCheckBox setFont checkValues
Check the field values and display a message in the status if needed private void check Values Status Info status new Status Info String type Name f Type Name Text get Text trim if type Name length 0 status set Error DebugUI Messages get String Detail Formatter Dialog Qualified type name must not be empty  3 NON NLS 1 else if f Defined Types null f Defined Types contains type Name status set Error DebugUI Messages get String Detail Formatter Dialog A detail formatter is already defined for this type 2 NON NLS 1 else if f Snippet Viewer get Document get trim length 0 status set Error DebugUI Messages get String Detail Formatter Dialog Associated code must not be empty 3 NON NLS 1 else if f Type null f Type Searched status set Warning DebugUI Messages get String No type with the given name found in the workspace  1 NON NLS 1 update Status status  checkValues StatusInfo StatusInfo typeName fTypeNameText getText typeName setError DebugUIMessages getString DetailFormatterDialog Qualified_type_name_must_not_be_empty _3 fDefinedTypes fDefinedTypes typeName setError DebugUIMessages getString DetailFormatterDialog A_detail_formatter_is_already_defined_for_this_type_2 fSnippetViewer getDocument setError DebugUIMessages getString DetailFormatterDialog Associated_code_must_not_be_empty_3 fType fTypeSearched setWarning DebugUIMessages getString No_type_with_the_given_name_found_in_the_workspace _1 updateStatus
see org eclipse jface dialogs Dialog ok Pressed protected void ok Pressed f Detail Formatter set Enabled f Check Box get Selection f Detail Formatter set Type Name f Type Name Text get Text trim f Detail Formatter set Snippet f Snippet Viewer get Document get super ok Pressed  okPressed okPressed fDetailFormatter setEnabled fCheckBox getSelection fDetailFormatter setTypeName fTypeNameText getText fDetailFormatter setSnippet fSnippetViewer getDocument okPressed
Open the select type dialog and set the user choice into the formatter private void select Type Shell shell get Shell Selection Dialog dialog null try dialog JavaUI create Type Dialog shell PlatformUI get Workbench get Progress Service Search Engine create Workspace Scope I Java Element Search Constants CONSIDER CLASSES false catch Java Model Exception jme String title DebugUI Messages get String Detail Formatter Dialog Select type 6 NON NLS 1 String message DebugUI Messages get String Detail Formatter Dialog Could not open type selection dialog for detail formatters 7 NON NLS 1 Exception Handler handle jme title message return dialog set Title DebugUI Messages get String Detail Formatter Dialog Select type 8 NON NLS 1 dialog set Message DebugUI Messages get String Detail Formatter Dialog Select a type to format when displaying its detail 9 NON NLS 1 if dialog open I Dialog Constants CANCEL ID return Object types dialog get Result if types null types length 0 f Type I Type types 0 f Type Name Text set Text f Type get Fully Qualified Name  selectType getShell SelectionDialog createTypeDialog getWorkbench getProgressService SearchEngine createWorkspaceScope IJavaElementSearchConstants CONSIDER_CLASSES JavaModelException DebugUIMessages getString DetailFormatterDialog Select_type_6 DebugUIMessages getString DetailFormatterDialog Could_not_open_type_selection_dialog_for_detail_formatters_7 ExceptionHandler setTitle DebugUIMessages getString DetailFormatterDialog Select_type_8 setMessage DebugUIMessages getString DetailFormatterDialog Select_a_type_to_format_when_displaying_its_detail_9 IDialogConstants CANCEL_ID getResult fType IType fTypeNameText setText fType getFullyQualifiedName
private boolean f First true public void end Reporting check Values  fFirst endReporting checkValues
public void accept Search Match Search Match match throws Core Exception Object enclosing Element match get Element if f First return f First false if enclosing Element instanceof I Type f Type I Type enclosing Element  acceptSearchMatch SearchMatch CoreException enclosingElement getElement fFirst fFirst enclosingElement IType fType IType enclosingElement
Use the Java search engine to find the type which corresponds to the given name private void find Corresponding Type if f Type Searched return f Type null f Type Searched true final String pattern f Type Name Text get Text trim replace if pattern null equals pattern NON NLS 1 return final Search Requestor collector new Search Requestor private boolean f First true public void end Reporting check Values public void accept Search Match Search Match match throws Core Exception Object enclosing Element match get Element if f First return f First false if enclosing Element instanceof I Type f Type I Type enclosing Element Search Engine engine new Search Engine Java Core get Working Copies null Search Pattern search Pattern Search Pattern create Pattern pattern I Java Search Constants TYPE I Java Search Constants DECLARATIONS Search Pattern R EXACT MATCH Search Pattern R CASE SENSITIVE I Java Search Scope scope Search Engine create Workspace Scope Search Participant participants new Search Participant Search Engine get Default Search Participant try engine search search Pattern participants scope collector null catch Core Exception e JDI DebugUI Plugin log e  findCorrespondingType fTypeSearched fType fTypeSearched fTypeNameText getText SearchRequestor SearchRequestor fFirst endReporting checkValues acceptSearchMatch SearchMatch CoreException enclosingElement getElement fFirst fFirst enclosingElement IType fType IType enclosingElement SearchEngine SearchEngine JavaCore getWorkingCopies SearchPattern searchPattern SearchPattern createPattern IJavaSearchConstants IJavaSearchConstants SearchPattern R_EXACT_MATCH SearchPattern R_CASE_SENSITIVE IJavaSearchScope SearchEngine createWorkspaceScope SearchParticipant SearchParticipant SearchEngine getDefaultSearchParticipant searchPattern CoreException JDIDebugUIPlugin
Return the type object which corresponds to the given name public I Type get Type if f Type Searched find Corresponding Type return f Type  IType getType fTypeSearched findCorrespondingType fType
public boolean close I Workbench workbench PlatformUI get Workbench I Workbench Command Support command Support workbench get Command Support command Support remove Handler Submission submission f Snippet Viewer dispose return super close  IWorkbench getWorkbench IWorkbenchCommandSupport commandSupport getCommandSupport commandSupport removeHandlerSubmission fSnippetViewer

Persists the location and dimensions of the shell in the Java Debug UI Plugin dialog settings under the provided dialog settings section name param shell The shell whose geometry is to be stored param dialog Settings Section Name The name of the dialog settings section public static void persist Shell Geometry Shell shell String dialog Settings Section Name Point shell Location shell get Location Point shell Size shell get Size I Dialog Settings settings get Dialog Settings dialog Settings Section Name settings put I Debug Preference Constants DIALOG ORIGIN X shell Location x settings put I Debug Preference Constants DIALOG ORIGIN Y shell Location y settings put I Debug Preference Constants DIALOG WIDTH shell Size x settings put I Debug Preference Constants DIALOG HEIGHT shell Size y  dialogSettingsSectionName persistShellGeometry dialogSettingsSectionName shellLocation getLocation shellSize getSize IDialogSettings getDialogSettings dialogSettingsSectionName IDebugPreferenceConstants DIALOG_ORIGIN_X shellLocation IDebugPreferenceConstants DIALOG_ORIGIN_Y shellLocation IDebugPreferenceConstants DIALOG_WIDTH shellSize IDebugPreferenceConstants DIALOG_HEIGHT shellSize
private static I Dialog Settings get Dialog Settings String dialog Settings Section Name I Dialog Settings settings JDI DebugUI Plugin get Default get Dialog Settings I Dialog Settings section settings get Section dialog Settings Section Name if section null section settings add New Section dialog Settings Section Name return section  IDialogSettings getDialogSettings dialogSettingsSectionName IDialogSettings JDIDebugUIPlugin getDefault getDialogSettings IDialogSettings getSection dialogSettingsSectionName addNewSection dialogSettingsSectionName
Returns the initial size which is the larger of the code initial Size code or the size persisted in the Java Debug UI Plugin dialog settings under the provided dialog setttings section name If no size is persisted in the settings the code initial Size code is returned param initial Size The initial Size to compare against param dialog Settings Section Name The name of the dialog settings section return the initial size public static Point get Initial Size String dialog Settings Section Name Point initial Size I Dialog Settings settings get Dialog Settings dialog Settings Section Name try int x y x settings get Int I Debug Preference Constants DIALOG WIDTH y settings get Int I Debug Preference Constants DIALOG HEIGHT return new Point Math max x initial Size x Math max y initial Size y catch Number Format Exception e return initial Size  initialSize initialSize initialSize initialSize dialogSettingsSectionName getInitialSize dialogSettingsSectionName initialSize IDialogSettings getDialogSettings dialogSettingsSectionName getInt IDebugPreferenceConstants DIALOG_WIDTH getInt IDebugPreferenceConstants DIALOG_HEIGHT initialSize initialSize NumberFormatException initialSize
Returns the initial location which is persisted in the Java Debug UI Plugin dialog settings under the provided dialog setttings section name If location is not persisted in the settings the code null code is returned param dialog Settings Section Name The name of the dialog settings section return The initial location or code null code public static Point get Initial Location String dialog Settings Section Name I Dialog Settings settings get Dialog Settings dialog Settings Section Name try int x settings get Int I Debug Preference Constants DIALOG ORIGIN X int y settings get Int I Debug Preference Constants DIALOG ORIGIN Y return new Point x y catch Number Format Exception e return null  dialogSettingsSectionName getInitialLocation dialogSettingsSectionName IDialogSettings getDialogSettings dialogSettingsSectionName getInt IDebugPreferenceConstants DIALOG_ORIGIN_X getInt IDebugPreferenceConstants DIALOG_ORIGIN_Y NumberFormatException

public Clear Display Action I Workbench Part workbench Part f Workbench Part workbench Part set Text Display Messages get String Clear Display label NON NLS 1 set Tool Tip Text Display Messages get String Clear Display tooltip NON NLS 1 set Description Display Messages get String Clear Display description NON NLS 1 Workbench Help set Help this I Java Debug Help Context Ids CLEAR DISPLAY VIEW ACTION Java Debug Images set Local Image Descriptors this clear co gif NON NLS 1  ClearDisplayAction IWorkbenchPart workbenchPart fWorkbenchPart workbenchPart setText DisplayMessages getString ClearDisplay setToolTipText DisplayMessages getString ClearDisplay setDescription DisplayMessages getString ClearDisplay WorkbenchHelp setHelp IJavaDebugHelpContextIds CLEAR_DISPLAY_VIEW_ACTION JavaDebugImages setLocalImageDescriptors clear_co
see Action run public void run Object value f Workbench Part get Adapter I Data Display class if value instanceof I Data Display I Data Display data Display I Data Display value data Display clear  fWorkbenchPart getAdapter IDataDisplay IDataDisplay IDataDisplay dataDisplay IDataDisplay dataDisplay

Constructs a data display for the given text viewer param viewer text viewer public Data Display I Text Viewer viewer set Text Viewer viewer  DataDisplay ITextViewer setTextViewer
see I Data Display clear public void clear I Document document get Text Viewer get Document if document null document set NON NLS 1  IDataDisplay IDocument getTextViewer getDocument
see I Data Display display Expression String public void display Expression String expression I Document document f Text Viewer get Document int offset document get Length try add a cariage return if needed if offset document get Line Information Of Offset offset get Offset expression System get Property line separator expression trim NON NLS 1 document replace offset 0 expression f Text Viewer set Selected Range offset expression length 0 f Text Viewer reveal Range offset expression length catch Bad Location Exception ble JDI DebugUI Plugin log ble  IDataDisplay displayExpression displayExpression IDocument fTextViewer getDocument getLength getLineInformationOfOffset getOffset getProperty fTextViewer setSelectedRange fTextViewer revealRange BadLocationException JDIDebugUIPlugin
see I Data Display display Expression Value String public void display Expression Value String value value System get Property line separator t value NON NLS 1 I Text Selection selection I Text Selection f Text Viewer get Selection Provider get Selection int offset selection get Offset selection get Length int length value length try f Text Viewer get Document replace offset 0 value catch Bad Location Exception ble JDI DebugUI Plugin log ble f Text Viewer set Selected Range offset length 0 f Text Viewer reveal Range offset length  IDataDisplay displayExpressionValue displayExpressionValue getProperty ITextSelection ITextSelection fTextViewer getSelectionProvider getSelection getOffset getLength fTextViewer getDocument BadLocationException JDIDebugUIPlugin fTextViewer setSelectedRange fTextViewer revealRange
Sets the text viewer for this data display param viewer text viewer private void set Text Viewer I Text Viewer viewer f Text Viewer viewer  setTextViewer ITextViewer fTextViewer
Returns the text viewer for this data display return text viewer protected I Text Viewer get Text Viewer return f Text Viewer  ITextViewer getTextViewer fTextViewer

see I Content Assist Processor compute Completion Proposals I Text Viewer int public I Completion Proposal compute Completion Proposals I Text Viewer viewer int document Offset I Adaptable context DebugUI Tools get Debug Context if context null return new I Completion Proposal 0 I Java Stack Frame stack Frame I Java Stack Frame context get Adapter I Java Stack Frame class if stack Frame null return new I Completion Proposal 0 I Workbench Window window JDI DebugUI Plugin get Active Workbench Window if window null return new I Completion Proposal 0 I Workbench Page page window get Active Page if page null return new I Completion Proposal 0 I Debug View view I Debug View page get Active Part if view null return new I Completion Proposal 0 I Selection selection view get Viewer get Selection if selection is Empty selection instanceof I Structured Selection return super compute Completion Proposals stack Frame viewer document Offset I Structured Selection viewer Selection I Structured Selection selection if viewer Selection size 1 return new I Completion Proposal 0 Object element viewer Selection get First Element I Java Project project get Java Project stack Frame if project null try I Text Selection text Selection I Text Selection viewer get Selection Provider get Selection I Type receiving Type get Receiving Type project element if receiving Type null return new I Completion Proposal 0 configure Result Collector project text Selection int insertion Position compute Insertion Position receiving Type stack Frame receiving Type code Complete viewer get Document get to Char Array insertion Position document Offset new char 0 new char 0 new int 0 false get Collector Order here and not in result collector to make sure that the order applies to all proposals and not just those of the compilation unit return order get Collector get Results catch Java Model Exception x handle viewer x catch Debug Exception de handle viewer de return null  IContentAssistProcessor computeCompletionProposals ITextViewer ICompletionProposal computeCompletionProposals ITextViewer documentOffset IAdaptable DebugUITools getDebugContext ICompletionProposal IJavaStackFrame stackFrame IJavaStackFrame getAdapter IJavaStackFrame stackFrame ICompletionProposal IWorkbenchWindow JDIDebugUIPlugin getActiveWorkbenchWindow ICompletionProposal IWorkbenchPage getActivePage ICompletionProposal IDebugView IDebugView getActivePart ICompletionProposal ISelection getViewer getSelection isEmpty IStructuredSelection computeCompletionProposals stackFrame documentOffset IStructuredSelection viewerSelection IStructuredSelection viewerSelection ICompletionProposal viewerSelection getFirstElement IJavaProject getJavaProject stackFrame ITextSelection textSelection ITextSelection getSelectionProvider getSelection IType receivingType getReceivingType receivingType ICompletionProposal configureResultCollector textSelection insertionPosition computeInsertionPosition receivingType stackFrame receivingType codeComplete getDocument toCharArray insertionPosition documentOffset getCollector getCollector getResults JavaModelException DebugException
private I Type get Receiving Type I Java Project project Object element throws Debug Exception String original Type Name get Receiving Type Name element if original Type Name null return null String type Name original Type Name int dollar Index type Name index Of if dollar Index 0 type Name type Name substring 0 dollar Index int index type Name last Index Of if index 0 type Name type Name replace I Path SEPARATOR type Name java NON NLS 1 return get Type project original Type Name type Name  IType getReceivingType IJavaProject DebugException originalTypeName getReceivingTypeName originalTypeName typeName originalTypeName dollarIndex typeName indexOf dollarIndex typeName typeName dollarIndex typeName lastIndexOf typeName typeName IPath typeName getType originalTypeName typeName
private String get Receiving Type Name Object element I Value value null try if element instanceof I Variable value I Variable element get Value if value instanceof I Java Array return null else if element instanceof I Expression value I Expression element get Value if value null return value get Reference Type Name catch Debug Exception de JDI DebugUI Plugin log de return null  getReceivingTypeName IValue IVariable IVariable getValue IJavaArray IExpression IExpression getValue getReferenceTypeName DebugException JDIDebugUIPlugin

see JDI Viewer Configuration get Content Assistant Processor public I Content Assist Processor get Content Assistant Processor return new Details Completion Processor  JDIViewerConfiguration getContentAssistantProcessor IContentAssistProcessor getContentAssistantProcessor DetailsCompletionProcessor

public Display Completion Processor f Collector new Result Collector Template Context Type context Type Java Plugin get Default get Template Context Registry get Context Type java NON NLS 1 if context Type null f Template Engine new Template Engine context Type f Comparator new Java Completion Proposal Comparator  DisplayCompletionProcessor fCollector ResultCollector TemplateContextType contextType JavaPlugin getDefault getTemplateContextRegistry getContextType contextType fTemplateEngine TemplateEngine contextType fComparator JavaCompletionProposalComparator
see I Content Assist Processor get Error Message public String get Error Message return f Collector get Error Message  IContentAssistProcessor getErrorMessage getErrorMessage fCollector getErrorMessage
see I Content Assist Processor get Context Information Validator public I Context Information Validator get Context Information Validator if f Validator null f Validator new Java Parameter List Validator return f Validator  IContentAssistProcessor getContextInformationValidator IContextInformationValidator getContextInformationValidator fValidator fValidator JavaParameterListValidator fValidator
see I Content Assist Processor get Context Information Auto Activation Characters public char get Context Information Auto Activation Characters return null  IContentAssistProcessor getContextInformationAutoActivationCharacters getContextInformationAutoActivationCharacters
see I Content Assist Processor compute Context Information I Text Viewer int public I Context Information compute Context Information I Text Viewer viewer int offset return null  IContentAssistProcessor computeContextInformation ITextViewer IContextInformation computeContextInformation ITextViewer
see I Content Assist Processor compute Proposals I Text Viewer int public I Completion Proposal compute Completion Proposals I Text Viewer viewer int document Offset I Adaptable context DebugUI Tools get Debug Context if context null return new I Completion Proposal 0 I Java Stack Frame stack Frame I Java Stack Frame context get Adapter I Java Stack Frame class if stack Frame null return new I Completion Proposal 0 return compute Completion Proposals stack Frame viewer document Offset  IContentAssistProcessor computeProposals ITextViewer ICompletionProposal computeCompletionProposals ITextViewer documentOffset IAdaptable DebugUITools getDebugContext ICompletionProposal IJavaStackFrame stackFrame IJavaStackFrame getAdapter IJavaStackFrame stackFrame ICompletionProposal computeCompletionProposals stackFrame documentOffset
protected I Completion Proposal compute Completion Proposals I Java Stack Frame stack Frame I Text Viewer viewer int document Offset try I Java Project project get Java Project stack Frame if project null I Type receiving Type get Receiving Type project stack Frame if receiving Type null return new I Completion Proposal 0 I Variable variables stack Frame get Local Variables char local Variable Names new char variables length char local Variable Type Names new char variables length resolve Local Variables variables local Variable Names local Variable Type Names I Text Selection selection I Text Selection viewer get Selection Provider get Selection configure Result Collector project selection int local Modifiers new int local Variable Names length Arrays fill local Modifiers 0 int insertion Position compute Insertion Position receiving Type stack Frame receiving Type code Complete viewer get Document get to Char Array insertion Position document Offset local Variable Type Names local Variable Names local Modifiers stack Frame is Static f Collector I Java Completion Proposal results f Collector get Results if f Template Engine null f Template Engine reset f Template Engine complete viewer document Offset null Template Proposal template Results f Template Engine get Results concatenate arrays I Java Completion Proposal total new I Java Completion Proposal results length template Results length System arraycopy template Results 0 total 0 template Results length System arraycopy results 0 total template Results length results length results total Order here and not in result collector to make sure that the order applies to all proposals and not just those of the compilation unit return order results catch Java Model Exception x handle viewer x catch Debug Exception de handle viewer de return null  ICompletionProposal computeCompletionProposals IJavaStackFrame stackFrame ITextViewer documentOffset IJavaProject getJavaProject stackFrame IType receivingType getReceivingType stackFrame receivingType ICompletionProposal IVariable stackFrame getLocalVariables localVariableNames localVariableTypeNames resolveLocalVariables localVariableNames localVariableTypeNames ITextSelection ITextSelection getSelectionProvider getSelection configureResultCollector localModifiers localVariableNames localModifiers insertionPosition computeInsertionPosition receivingType stackFrame receivingType codeComplete getDocument toCharArray insertionPosition documentOffset localVariableTypeNames localVariableNames localModifiers stackFrame isStatic fCollector IJavaCompletionProposal fCollector getResults fTemplateEngine fTemplateEngine fTemplateEngine documentOffset TemplateProposal templateResults fTemplateEngine getResults IJavaCompletionProposal IJavaCompletionProposal templateResults templateResults templateResults templateResults JavaModelException DebugException
protected int compute Insertion Position I Type receiving Type I Java Stack Frame stack Frame throws Java Model Exception Debug Exception int insertion 1 if receiving Type is Binary receiving Type get Declaring Type null I Compilation Unit stackCU get Compilation Unit stack Frame I Compilation Unit typeCU receiving Type get Compilation Unit if typeCU null typeCU equals stackCU if stackCU null I Document doc new Document stackCU get Source try insertion doc get Line Offset stack Frame get Line Number 1 catch Bad Location Exception e JDI DebugUI Plugin log e return insertion  computeInsertionPosition IType receivingType IJavaStackFrame stackFrame JavaModelException DebugException receivingType isBinary receivingType getDeclaringType ICompilationUnit getCompilationUnit stackFrame ICompilationUnit receivingType getCompilationUnit IDocument getSource getLineOffset stackFrame getLineNumber BadLocationException JDIDebugUIPlugin
Returns the compliation unit associated with this Java stack frame Returns code null code for a binary stack frame protected I Compilation Unit get Compilation Unit I Java Stack Frame stack Frame Get the corresponding element I Launch launch stack Frame get Launch if launch null return null I Source Locator locator launch get Source Locator if locator null return null Object source Element locator get Source Element stack Frame if source Element instanceof I Type return I Type source Element get Compilation Unit if source Element instanceof I Compilation Unit return I Compilation Unit source Element return null  ICompilationUnit getCompilationUnit IJavaStackFrame stackFrame ILaunch stackFrame getLaunch ISourceLocator getSourceLocator sourceElement getSourceElement stackFrame sourceElement IType IType sourceElement getCompilationUnit sourceElement ICompilationUnit ICompilationUnit sourceElement
protected void handle I Text Viewer viewer Core Exception x Shell shell viewer get Text Widget get Shell Error Dialog open Error shell Display Messages get String Display Completion Processor Problems during completion 1 NON NLS 1 Display Messages get String Display Completion Processor An exception occurred during code completion 2 NON NLS 1 x get Status JDI DebugUI Plugin log x  ITextViewer CoreException getTextWidget getShell ErrorDialog openError DisplayMessages getString DisplayCompletionProcessor Problems_during_completion_1 DisplayMessages getString DisplayCompletionProcessor An_exception_occurred_during_code_completion_2 getStatus JDIDebugUIPlugin
protected void resolve Local Variables I Variable variables char local Variable Names char local Variable Type Names throws Debug Exception for int i 0 i variables length i I Variable variable variables i local Variable Names i variable get Name to Char Array local Variable Type Names i get Translated Type Name variable get Reference Type Name to Char Array  resolveLocalVariables IVariable localVariableNames localVariableTypeNames DebugException IVariable localVariableNames getName toCharArray localVariableTypeNames getTranslatedTypeName getReferenceTypeName toCharArray
Returns the Java project associated with the given stack frame or code null code if none protected I Java Project get Java Project I Stack Frame stack Frame Get the corresponding element I Launch launch stack Frame get Launch if launch null return null I Source Locator locator launch get Source Locator if locator null return null Object source Element locator get Source Element stack Frame if source Element instanceof I Java Element return I Java Element source Element get Java Project if source Element instanceof I Resource I Java Project project Java Core create I Resource source Element get Project if project exists return project return null  IJavaProject getJavaProject IStackFrame stackFrame ILaunch stackFrame getLaunch ISourceLocator getSourceLocator sourceElement getSourceElement stackFrame sourceElement IJavaElement IJavaElement sourceElement getJavaProject sourceElement IResource IJavaProject JavaCore IResource sourceElement getProject
Order the given proposals protected I Java Completion Proposal order I Java Completion Proposal proposals Arrays sort proposals f Comparator return proposals  IJavaCompletionProposal IJavaCompletionProposal fComparator
Configures the display result collection for the current code assist session protected void configure Result Collector I Java Project project I Text Selection selection f Collector reset selection get Offset project null if selection get Length 0 f Collector set Replacement Length selection get Length  configureResultCollector IJavaProject ITextSelection fCollector getOffset getLength fCollector setReplacementLength getLength
Returns an array of simple type names that are part of the given type s qualified name For example if the given name is code x y A B code an array with code A B code is returned param type Name fully qualified type name return array of nested type names protected String get Nested Type Names String type Name int index type Name last Index Of if index 0 type Name type Name substring index 1 index type Name index Of List list new Array List 1 while index 0 list add type Name substring 0 index type Name type Name substring index 1 index type Name index Of list add type Name return String list to Array new String list size  typeName getNestedTypeNames typeName typeName lastIndexOf typeName typeName typeName indexOf ArrayList typeName typeName typeName typeName indexOf typeName toArray
Returns a copy of the type name with replaced by or returns code null code if the given type name refers to an anonymous inner class param type Name a fully qualified type name return a copy of the type name with replaced by or returns code null code if the given type name refers to an anonymous inner class protected String get Translated Type Name String type Name int index type Name last Index Of if index 1 return type Name if index 1 type Name length invalid name return type Name String last type Name substring index 1 try Integer parse Int last return null catch Number Format Exception e return type Name replace  typeName getTranslatedTypeName typeName typeName lastIndexOf typeName typeName typeName typeName parseInt NumberFormatException typeName
Returns the receiving type of the the given stack frame return receiving type exception Debug Exception if ul li A failure occurs while accessing attributes of the stack frame li li the resolved type is an inner type li li unable to resolve a type li ul private I Type get Receiving Type I Java Project project I Java Stack Frame frame throws Debug Exception String type Name frame get Receiving Type Name String source Name frame get Source Name if source Name null type Name equals frame get Declaring Type Name if there is no debug attribute or the declaring type is not the same as the receiving type we must guess at the receiver s source file int dollar Index type Name index Of if dollar Index 0 type Name type Name substring 0 dollar Index type Name type Name replace I Path SEPARATOR type Name java NON NLS 1 else int index type Name last Index Of if index 0 type Name type Name substring 0 index 1 type Name type Name replace I Path SEPARATOR else type Name NON NLS 1 type Name source Name return get Type project frame get Receiving Type Name type Name  DebugException IType getReceivingType IJavaProject IJavaStackFrame DebugException typeName getReceivingTypeName sourceName getSourceName sourceName typeName getDeclaringTypeName dollarIndex typeName indexOf dollarIndex typeName typeName dollarIndex typeName typeName IPath typeName typeName lastIndexOf typeName typeName typeName typeName IPath typeName typeName sourceName getType getReceivingTypeName typeName
Tells this processor to order the proposals alphabetically param order code true code if proposals should be ordered public void order Proposals Alphabetically boolean order f Comparator set Order Alphabetically order  orderProposalsAlphabetically fComparator setOrderAlphabetically
see I Content Assist Processor get Completion Proposal Auto Activation Characters public char get Completion Proposal Auto Activation Characters return f Proposal Auto Activation Set  IContentAssistProcessor getCompletionProposalAutoActivationCharacters getCompletionProposalAutoActivationCharacters fProposalAutoActivationSet
Sets this processor s set of characters triggering the activation of the completion proposal computation param activation Set the activation set public void set Completion Proposal Auto Activation Characters char activation Set f Proposal Auto Activation Set activation Set  activationSet setCompletionProposalAutoActivationCharacters activationSet fProposalAutoActivationSet activationSet
protected Result Collector get Collector return f Collector  ResultCollector getCollector fCollector
protected void set Collector Result Collector collector f Collector collector  setCollector ResultCollector fCollector
protected I Type get Type I Java Project project String original Type Name String type Name throws Debug Exception int dollar Index type Name index Of if dollar Index 0 type Name type Name substring 0 dollar Index I Path source Path new Path type Name I Type type null try I Java Element result project find Element source Path String type Names get Nested Type Names original Type Name if result null if result instanceof I Class File type I Class File result get Type else if result instanceof I Compilation Unit type I Compilation Unit result get Type type Names 0 else if result instanceof I Type type I Type result for int i 1 i type Names length i String inner Type Name type Names i try Integer parse Int inner Type Name return type catch Number Format Exception e type type get Type inner Type Name catch Java Model Exception e throw new Debug Exception e get Status return type  IType getType IJavaProject originalTypeName typeName DebugException dollarIndex typeName indexOf dollarIndex typeName typeName dollarIndex IPath sourcePath typeName IType IJavaElement findElement sourcePath typeNames getNestedTypeNames originalTypeName IClassFile IClassFile getType ICompilationUnit ICompilationUnit getType typeNames IType IType typeNames innerTypeName typeNames parseInt innerTypeName NumberFormatException getType innerTypeName JavaModelException DebugException getStatus
Returns the template Engine return Template Engine public Template Engine get Template Engine return f Template Engine  templateEngine TemplateEngine TemplateEngine getTemplateEngine fTemplateEngine

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Display Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE DisplayMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

class Data Display implements I Data Display see I Data Display clear public void clear I Document document f Source Viewer get Document if document null document set NON NLS 1  DataDisplay IDataDisplay IDataDisplay IDocument fSourceViewer getDocument
see I Data Display display Expression String public void display Expression String expression I Document document f Source Viewer get Document int offset document get Length try add a cariage return if needed if offset document get Line Information Of Offset offset get Offset expression System get Property line separator expression trim NON NLS 1 f Source Viewer get Document replace offset 0 expression f Source Viewer set Selected Range offset expression length 0 f Source Viewer reveal Range offset expression length catch Bad Location Exception ble JDI DebugUI Plugin log ble  IDataDisplay displayExpression displayExpression IDocument fSourceViewer getDocument getLength getLineInformationOfOffset getOffset getProperty fSourceViewer getDocument fSourceViewer setSelectedRange fSourceViewer revealRange BadLocationException JDIDebugUIPlugin
see I Data Display display Expression Value String public void display Expression Value String value value System get Property line separator t value NON NLS 1 I Text Selection selection I Text Selection f Source Viewer get Selection int offset selection get Offset selection get Length int length value length try f Source Viewer get Document replace offset 0 value catch Bad Location Exception ble JDI DebugUI Plugin log ble f Source Viewer set Selected Range offset length 0 f Source Viewer reveal Range offset length  IDataDisplay displayExpressionValue displayExpressionValue getProperty ITextSelection ITextSelection fSourceViewer getSelection getOffset getLength fSourceViewer getDocument BadLocationException JDIDebugUIPlugin fSourceViewer setSelectedRange fSourceViewer revealRange
menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr fill Context Menu mgr  menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu
see View Part create Child I Workbench Part Container public void create Part Control Composite parent int styles SWT V SCROLL SWT H SCROLL SWT MULTI SWT FULL SELECTION f Source Viewer new JDI Source Viewer parent null styles f Source Viewer configure new Display Viewer Configuration f Source Viewer get Selection Provider add Selection Changed Listener get Selection Changed Listener I Document doc get Restored Document f Source Viewer set Document doc f Source Viewer add Text Input Listener this f Restored Contents null create Actions initialize Tool Bar create context menu Menu Manager menu Mgr new Menu Manager Pop Up NON NLS 1 menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr fill Context Menu mgr Menu menu menu Mgr create Context Menu f Source Viewer get Text Widget f Source Viewer get Text Widget set Menu menu get Site register Context Menu menu Mgr f Source Viewer get Selection Provider get Site set Selection Provider f Source Viewer get Selection Provider Workbench Help set Help f Source Viewer get Text Widget I Java Debug Help Context Ids DISPLAY VIEW I Workbench Window window DebugUI Plugin get Active Workbench Window if window null I Workbench Page page window get Active Page if page null page add Part Listener this  ViewPart createChild IWorkbenchPartContainer createPartControl V_SCROLL H_SCROLL FULL_SELECTION fSourceViewer JDISourceViewer fSourceViewer DisplayViewerConfiguration fSourceViewer getSelectionProvider addSelectionChangedListener getSelectionChangedListener IDocument getRestoredDocument fSourceViewer setDocument fSourceViewer addTextInputListener fRestoredContents createActions initializeToolBar MenuManager menuMgr MenuManager PopUp menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu menuMgr createContextMenu fSourceViewer getTextWidget fSourceViewer getTextWidget setMenu getSite registerContextMenu menuMgr fSourceViewer getSelectionProvider getSite setSelectionProvider fSourceViewer getSelectionProvider WorkbenchHelp setHelp fSourceViewer getTextWidget IJavaDebugHelpContextIds DISPLAY_VIEW IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow IWorkbenchPage getActivePage addPartListener
f Document Listener new I Document Listener see I Document Listener document About To Be Changed Document Event public void document About To Be Changed Document Event event  fDocumentListener IDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent documentAboutToBeChanged DocumentEvent
see I Document Listener document Changed Document Event public void document Changed Document Event event update Action Action Factory FIND get Id  IDocumentListener documentChanged DocumentEvent documentChanged DocumentEvent updateAction ActionFactory getId
protected I Document get Restored Document I Document doc null if f Restored Contents null doc new Document f Restored Contents else doc new Document Java Text Tools tools Java Plugin get Default get Java Text Tools I Document Partitioner partitioner tools create Document Partitioner partitioner connect doc doc set Document Partitioner partitioner f Document Listener new I Document Listener see I Document Listener document About To Be Changed Document Event public void document About To Be Changed Document Event event see I Document Listener document Changed Document Event public void document Changed Document Event event update Action Action Factory FIND get Id doc add Document Listener f Document Listener return doc  IDocument getRestoredDocument IDocument fRestoredContents fRestoredContents JavaTextTools JavaPlugin getDefault getJavaTextTools IDocumentPartitioner createDocumentPartitioner setDocumentPartitioner fDocumentListener IDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent documentAboutToBeChanged DocumentEvent IDocumentListener documentChanged DocumentEvent documentChanged DocumentEvent updateAction ActionFactory getId addDocumentListener fDocumentListener
public void set Focus if f Source Viewer null f Source Viewer get Control set Focus  setFocus fSourceViewer fSourceViewer getControl setFocus
I Handler handler new Abstract Handler public Object execute Map parameter Values By Name throws Execution Exception f Content Assist Action run return null  IHandler AbstractHandler parameterValuesByName ExecutionException fContentAssistAction
Initialize the actions of this view protected void create Actions f Clear Display Action new Clear Display Action this I Action Bars action Bars get View Site get Action Bars I Action action new Display View Action this I Text Operation Target CUT action set Text Display Messages get String Display View Cut label NON NLS 1 action set Tool Tip Text Display Messages get String Display View Cut tooltip NON NLS 1 action set Description Display Messages get String Display View Cut description NON NLS 1 set Global Action action Bars Action Factory CUT get Id action action new Display View Action this I Text Operation Target COPY action set Text Display Messages get String Display View Copy label NON NLS 1 action set Tool Tip Text Display Messages get String Display View Copy tooltip NON NLS 1 action set Description Display Messages get String Display View Copy description NON NLS 1 set Global Action action Bars Action Factory COPY get Id action action new Display View Action this I Text Operation Target PASTE action set Text Display Messages get String Display View Paste label NON NLS 1 action set Tool Tip Text Display Messages get String Display View Paste tooltip NON NLS 1 action set Description Display Messages get String Display View Paste Description NON NLS 1 set Global Action action Bars Action Factory PASTE get Id action action new Display View Action this I Text Operation Target SELECT ALL action set Text Display Messages get String Display View Select All label NON NLS 1 action set Tool Tip Text Display Messages get String Display View Select All tooltip NON NLS 1 action set Description Display Messages get String Display View Select All description NON NLS 1 set Global Action action Bars Action Factory SELECT ALL get Id action XXX Still using old resource access Resource Bundle bundle Resource Bundle get Bundle org eclipse jdt internal debug ui display Display Messages NON NLS 1 set Global Action action Bars Action Factory FIND get Id new Find Replace Action bundle find replace action this NON NLS 1 f Selection Actions add Action Factory CUT get Id f Selection Actions add Action Factory COPY get Id f Selection Actions add Action Factory PASTE get Id f Content Assist Action new Display View Action this I Source Viewer CONTENTASSIST PROPOSALS f Content Assist Action set Action Definition Id I Text Editor Action Definition Ids CONTENT ASSIST PROPOSALS f Content Assist Action set Text Display Messages get String Display View Co ntent Assist Ctrl Space 1 NON NLS 1 f Content Assist Action set Description Display Messages get String Display View Content Assist 2 NON NLS 1 f Content Assist Action set Tool Tip Text Display Messages get String Display View Content Assist 2 NON NLS 1 f Content Assist Action set Image Descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG ELCL CONTENT ASSIST f Content Assist Action set Hover Image Descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG LCL CONTENT ASSIST f Content Assist Action set Disabled Image Descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG DLCL CONTENT ASSIST action Bars update Action Bars I Handler handler new Abstract Handler public Object execute Map parameter Values By Name throws Execution Exception f Content Assist Action run return null I Workbench workbench PlatformUI get Workbench I Workbench Command Support command Support workbench get Command Support submission new Handler Submission null null get Site I Text Editor Action Definition Ids CONTENT ASSIST PROPOSALS handler Priority MEDIUM NON NLS 1 command Support add Handler Submission submission  createActions fClearDisplayAction ClearDisplayAction IActionBars actionBars getViewSite getActionBars IAction DisplayViewAction ITextOperationTarget setText DisplayMessages getString DisplayView setToolTipText DisplayMessages getString DisplayView setDescription DisplayMessages getString DisplayView setGlobalAction actionBars ActionFactory getId DisplayViewAction ITextOperationTarget setText DisplayMessages getString DisplayView setToolTipText DisplayMessages getString DisplayView setDescription DisplayMessages getString DisplayView setGlobalAction actionBars ActionFactory getId DisplayViewAction ITextOperationTarget setText DisplayMessages getString DisplayView setToolTipText DisplayMessages getString DisplayView setDescription DisplayMessages getString DisplayView setGlobalAction actionBars ActionFactory getId DisplayViewAction ITextOperationTarget SELECT_ALL setText DisplayMessages getString DisplayView SelectAll setToolTipText DisplayMessages getString DisplayView SelectAll setDescription DisplayMessages getString DisplayView SelectAll setGlobalAction actionBars ActionFactory SELECT_ALL getId ResourceBundle ResourceBundle getBundle DisplayMessages setGlobalAction actionBars ActionFactory getId FindReplaceAction find_replace_action fSelectionActions ActionFactory getId fSelectionActions ActionFactory getId fSelectionActions ActionFactory getId fContentAssistAction DisplayViewAction ISourceViewer CONTENTASSIST_PROPOSALS fContentAssistAction setActionDefinitionId ITextEditorActionDefinitionIds CONTENT_ASSIST_PROPOSALS fContentAssistAction setText DisplayMessages getString DisplayView ntent_Assist Space_1 fContentAssistAction setDescription DisplayMessages getString DisplayView Content_Assist_2 fContentAssistAction setToolTipText DisplayMessages getString DisplayView Content_Assist_2 fContentAssistAction setImageDescriptor DebugUITools getImageDescriptor IDebugUIConstants IMG_ELCL_CONTENT_ASSIST fContentAssistAction setHoverImageDescriptor DebugUITools getImageDescriptor IDebugUIConstants IMG_LCL_CONTENT_ASSIST fContentAssistAction setDisabledImageDescriptor DebugUITools getImageDescriptor IDebugUIConstants IMG_DLCL_CONTENT_ASSIST actionBars updateActionBars IHandler AbstractHandler parameterValuesByName ExecutionException fContentAssistAction IWorkbench getWorkbench IWorkbenchCommandSupport commandSupport getCommandSupport HandlerSubmission getSite ITextEditorActionDefinitionIds CONTENT_ASSIST_PROPOSALS commandSupport addHandlerSubmission
protected void set Global Action I Action Bars action Bars String actionID I Action action f Global Actions put actionID action action Bars set Global Action Handler actionID action  setGlobalAction IActionBars actionBars IAction fGlobalActions actionBars setGlobalActionHandler
Configures the tool Bar protected void initialize Tool Bar I Tool Bar Manager tbm get View Site get Action Bars get Tool Bar Manager tbm add new Separator I Java DebugUI Constants EVALUATION GROUP tbm add f Clear Display Action get View Site get Action Bars update Action Bars  toolBar initializeToolBar IToolBarManager getViewSite getActionBars getToolBarManager IJavaDebugUIConstants EVALUATION_GROUP fClearDisplayAction getViewSite getActionBars updateActionBars
Adds the context menu actions for the display view protected void fill Context Menu I Menu Manager menu if f Source Viewer get Document null return menu add new Separator I Java DebugUI Constants EVALUATION GROUP if Evaluation Context Manager get Evaluation Context this null menu add f Content Assist Action menu add new Separator menu add I Action f Global Actions get Action Factory CUT get Id menu add I Action f Global Actions get Action Factory COPY get Id menu add I Action f Global Actions get Action Factory PASTE get Id menu add I Action f Global Actions get Action Factory SELECT ALL get Id menu add new Separator menu add I Action f Global Actions get Action Factory FIND get Id menu add f Clear Display Action menu add new Separator I Workbench Action Constants MB ADDITIONS  fillContextMenu IMenuManager fSourceViewer getDocument IJavaDebugUIConstants EVALUATION_GROUP EvaluationContextManager getEvaluationContext fContentAssistAction IAction fGlobalActions ActionFactory getId IAction fGlobalActions ActionFactory getId IAction fGlobalActions ActionFactory getId IAction fGlobalActions ActionFactory SELECT_ALL getId IAction fGlobalActions ActionFactory getId fClearDisplayAction IWorkbenchActionConstants MB_ADDITIONS
public Object get Adapter Class required if I Text Operation Target class equals required return f Source Viewer get Text Operation Target if I Find Replace Target class equals required return f Source Viewer get Find Replace Target if I Data Display class equals required return f Data Display if I Text Viewer class equals required return f Source Viewer return super get Adapter required  getAdapter ITextOperationTarget fSourceViewer getTextOperationTarget IFindReplaceTarget fSourceViewer getFindReplaceTarget IDataDisplay fDataDisplay ITextViewer fSourceViewer getAdapter
protected void update Actions Iterator iterator f Selection Actions iterator while iterator has Next I Action action I Action f Global Actions get iterator next if action instanceof I Update I Update action update  updateActions fSelectionActions hasNext IAction IAction fGlobalActions IUpdate IUpdate
Saves the contents of the display view and the formatting see org eclipse ui I View Part save State I Memento public void save State I Memento memento if f Source Viewer null I Document doc f Source Viewer get Document if doc null String contents doc get trim memento put Text Data contents else if f Restored Contents null memento put Text Data f Restored Contents  IViewPart saveState IMemento saveState IMemento fSourceViewer IDocument fSourceViewer getDocument putTextData fRestoredContents putTextData fRestoredContents
Restores the contents of the display view and the formatting see org eclipse ui I View Part init I View Site I Memento public void init I View Site site I Memento memento throws Part Init Exception init site if temp Memento null memento temp Memento if memento null f Restored Contents memento get Text Data  IViewPart IViewSite IMemento IViewSite IMemento PartInitException tempMemento tempMemento fRestoredContents getTextData
Returns the entire contents of the current document protected String get Contents return f Source Viewer get Document get  getContents fSourceViewer getDocument
protected final I Selection Changed Listener get Selection Changed Listener return new I Selection Changed Listener public void selection Changed Selection Changed Event event update Selection Dependent Actions  ISelectionChangedListener getSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateSelectionDependentActions
protected final I Selection Changed Listener get Selection Changed Listener return new I Selection Changed Listener public void selection Changed Selection Changed Event event update Selection Dependent Actions  ISelectionChangedListener getSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateSelectionDependentActions
protected void update Selection Dependent Actions Iterator iterator f Selection Actions iterator while iterator has Next update Action String iterator next  updateSelectionDependentActions fSelectionActions hasNext updateAction
protected void update Action String action Id I Action action I Action f Global Actions get action Id if action instanceof I Update I Update action update  updateAction actionId IAction IAction fGlobalActions actionId IUpdate IUpdate
see I Text Input Listener input Document About To Be Changed I Document I Document public void input Document About To Be Changed I Document old Input I Document new Input  ITextInputListener inputDocumentAboutToBeChanged IDocument IDocument inputDocumentAboutToBeChanged IDocument oldInput IDocument newInput
see I Text Input Listener input Document Changed I Document I Document public void input Document Changed I Document old Input I Document new Input old Input remove Document Listener f Document Listener  ITextInputListener inputDocumentChanged IDocument IDocument inputDocumentChanged IDocument oldInput IDocument newInput oldInput removeDocumentListener fDocumentListener
public void dispose I Workbench Window window DebugUI Plugin get Active Workbench Window if window null I Workbench Page page window get Active Page if page null page remove Part Listener this if f Source Viewer null f Source Viewer dispose I Workbench workbench PlatformUI get Workbench I Workbench Command Support command Support workbench get Command Support command Support remove Handler Submission submission super dispose  IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow IWorkbenchPage getActivePage removePartListener fSourceViewer fSourceViewer IWorkbench getWorkbench IWorkbenchCommandSupport commandSupport getCommandSupport commandSupport removeHandlerSubmission
public void part Hidden I Workbench Part Reference part Ref if part Ref instanceof I View Reference String id I View Reference part Ref get Id part Hidden is sent whenever the view is made not visible To tell that the view has been closed try to find it if id equals get View Site get Id TODO Uncomment when Bug 60039 is fixed I Workbench Window window DebugUI Plugin get Active Workbench Window if window null I Workbench Page active Page window get Active Page if active Page null active Page find View id null Display view closed temp Memento XML Memento create Write Root Display View Memento NON NLS 1 save State temp Memento  partHidden IWorkbenchPartReference partRef partRef IViewReference IViewReference partRef getId partHidden getViewSite getId IWorkbenchWindow DebugUIPlugin getActiveWorkbenchWindow IWorkbenchPage activePage getActivePage activePage activePage findView tempMemento XMLMemento createWriteRoot DisplayViewMemento saveState tempMemento
see org eclipse ui I Part Listener2 part Activated org eclipse ui I Workbench Part Reference public void part Activated I Workbench Part Reference part Ref  IPartListener2 partActivated IWorkbenchPartReference partActivated IWorkbenchPartReference partRef
see org eclipse ui I Part Listener2 part Brought To Top org eclipse ui I Workbench Part Reference public void part Brought To Top I Workbench Part Reference part Ref  IPartListener2 partBroughtToTop IWorkbenchPartReference partBroughtToTop IWorkbenchPartReference partRef
see org eclipse ui I Part Listener2 part Closed org eclipse ui I Workbench Part Reference public void part Closed I Workbench Part Reference part Ref  IPartListener2 partClosed IWorkbenchPartReference partClosed IWorkbenchPartReference partRef
see org eclipse ui I Part Listener2 part Deactivated org eclipse ui I Workbench Part Reference public void part Deactivated I Workbench Part Reference part Ref  IPartListener2 partDeactivated IWorkbenchPartReference partDeactivated IWorkbenchPartReference partRef
see org eclipse ui I Part Listener2 part Opened org eclipse ui I Workbench Part Reference public void part Opened I Workbench Part Reference part Ref  IPartListener2 partOpened IWorkbenchPartReference partOpened IWorkbenchPartReference partRef
see org eclipse ui I Part Listener2 part Visible org eclipse ui I Workbench Part Reference public void part Visible I Workbench Part Reference part Ref  IPartListener2 partVisible IWorkbenchPartReference partVisible IWorkbenchPartReference partRef
see org eclipse ui I Part Listener2 part Input Changed org eclipse ui I Workbench Part Reference public void part Input Changed I Workbench Part Reference part Ref  IPartListener2 partInputChanged IWorkbenchPartReference partInputChanged IWorkbenchPartReference partRef

public Display View Action I Text Operation Target target int operation Code super f Operation Target target f Operation Code operation Code update  DisplayViewAction ITextOperationTarget operationCode fOperationTarget fOperationCode operationCode
public Display View Action I Adaptable target Provider int operation Code super f Target Provider target Provider f Operation Code operation Code update  DisplayViewAction IAdaptable targetProvider operationCode fTargetProvider targetProvider fOperationCode operationCode
The code Text Operation Action code implementation of this code I Action code method runs the operation with the current operation code public void run if f Operation Code 1 f Operation Target null f Operation Target do Operation f Operation Code  TextOperationAction IAction fOperationCode fOperationTarget fOperationTarget doOperation fOperationCode
The code Text Operation Action code implementation of this code I Update code method discovers the operation through the current editor s code I Text Operation Target code adapter and sets the enabled state accordingly public void update if f Operation Target null f Target Provider null f Operation Code 1 f Operation Target I Text Operation Target f Target Provider get Adapter I Text Operation Target class boolean is Enabled f Operation Target null f Operation Target can Do Operation f Operation Code set Enabled is Enabled  TextOperationAction IUpdate ITextOperationTarget fOperationTarget fTargetProvider fOperationCode fOperationTarget ITextOperationTarget fTargetProvider getAdapter ITextOperationTarget isEnabled fOperationTarget fOperationTarget canDoOperation fOperationCode setEnabled isEnabled

public class Display Viewer Configuration extends Java Source Viewer Configuration public Display Viewer Configuration super Java Plugin get Default get Java Text Tools null  DisplayViewerConfiguration JavaSourceViewerConfiguration DisplayViewerConfiguration JavaPlugin getDefault getJavaTextTools
public I Content Assist Processor get Content Assistant Processor return new Display Completion Processor  IContentAssistProcessor getContentAssistantProcessor DisplayCompletionProcessor
public I Content Assistant get Content Assistant I Source Viewer source Viewer Content Assistant assistant new Content Assistant assistant set Content Assist Processor get Content Assistant Processor I Document DEFAULT CONTENT TYPE JDI Content Assist Preference configure assistant get Color Manager assistant set Context Information Popup Orientation I Content Assistant CONTEXT INFO ABOVE assistant set Information Control Creator get Information Control Creator source Viewer return assistant  IContentAssistant getContentAssistant ISourceViewer sourceViewer ContentAssistant ContentAssistant setContentAssistProcessor getContentAssistantProcessor IDocument DEFAULT_CONTENT_TYPE JDIContentAssistPreference getColorManager setContextInformationPopupOrientation IContentAssistant CONTEXT_INFO_ABOVE setInformationControlCreator getInformationControlCreator sourceViewer
Highlight the whole line when double clicked See Bug 45481 public void double Clicked I Text Viewer viewer try I Document doc viewer get Document int caret Offset viewer get Selected Range x int line Num doc get Line Of Offset caret Offset int start doc get Line Offset line Num int length doc get Line Length line Num viewer set Selected Range start length catch Bad Location Exception e DebugUI Plugin log e  doubleClicked ITextViewer IDocument getDocument caretOffset getSelectedRange lineNum getLineOfOffset caretOffset getLineOffset lineNum getLineLength lineNum setSelectedRange BadLocationException DebugUIPlugin
public I Text Double Click Strategy get Double Click Strategy I Source Viewer source Viewer String content Type I Text Double Click Strategy click Strat new I Text Double Click Strategy Highlight the whole line when double clicked See Bug 45481 public void double Clicked I Text Viewer viewer try I Document doc viewer get Document int caret Offset viewer get Selected Range x int line Num doc get Line Of Offset caret Offset int start doc get Line Offset line Num int length doc get Line Length line Num viewer set Selected Range start length catch Bad Location Exception e DebugUI Plugin log e return click Strat  ITextDoubleClickStrategy getDoubleClickStrategy ISourceViewer sourceViewer contentType ITextDoubleClickStrategy clickStrat ITextDoubleClickStrategy doubleClicked ITextViewer IDocument getDocument caretOffset getSelectedRange lineNum getLineOfOffset caretOffset getLineOffset lineNum getLineLength lineNum setSelectedRange BadLocationException DebugUIPlugin clickStrat

public interface I Data Display Clears the content of this data display public void clear  IDataDisplay
Displays the expression in the content of this data display 
Displays the expression valur in the content of this data display 

Constucts a new inspect result for the given expression and resulting value Starts listening to debug events such that this element will remove itself from the expression manager when its debug target terminates param expression code snippet param value value of the expression public Java Inspect Expression String expression I Java Value value f Value value f Expression expression Debug Plugin get Default add Debug Event Listener this  JavaInspectExpression IJavaValue fValue fExpression DebugPlugin getDefault addDebugEventListener
Constucts a new inspect result for the given evaluation result which provides a snippet value and error messages if any param result the evaluation result public Java Inspect Expression I Evaluation Result result this result get Snippet result get Value f Result result  JavaInspectExpression IEvaluationResult getSnippet getValue fResult
see I Expression get Expression Text public String get Expression Text return f Expression  IExpression getExpressionText getExpressionText fExpression
see I Expression get Value public I Value get Value return f Value  IExpression getValue IValue getValue fValue
see I Debug Element get Debug Target public I Debug Target get Debug Target I Value value get Value if value null return get Value get Debug Target if f Result null return f Result get Thread get Debug Target An expression should never be created with a null value and a null result return null  IDebugElement getDebugTarget IDebugTarget getDebugTarget IValue getValue getValue getDebugTarget fResult fResult getThread getDebugTarget
see I Debug Element get Model Identifier public String get Model Identifier return get Debug Target get Model Identifier  IDebugElement getModelIdentifier getModelIdentifier getDebugTarget getModelIdentifier
see I Debug Element get Launch public I Launch get Launch return get Debug Target get Launch  IDebugElement getLaunch ILaunch getLaunch getDebugTarget getLaunch
see I Debug Event Set Listener handle Debug Events Debug Event public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i if event get Kind Debug Event TERMINATE event get Source equals get Debug Target Debug Plugin get Default get Expression Manager remove Expression this  IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent DebugEvent getKind DebugEvent getSource getDebugTarget DebugPlugin getDefault getExpressionManager removeExpression
see I Expression dispose public void dispose Debug Plugin get Default remove Debug Event Listener this  IExpression DebugPlugin getDefault removeDebugEventListener
see org eclipse debug core model I Error Reporting Expression has Errors public boolean has Errors return f Result null f Result has Errors  IErrorReportingExpression hasErrors hasErrors fResult fResult hasErrors
see org eclipse debug core model I Error Reporting Expression get Error Messages public String get Error Messages return get Error Messages f Result  IErrorReportingExpression getErrorMessages getErrorMessages getErrorMessages fResult
public static String get Error Messages I Evaluation Result result if result null return new String 0 String messages result get Error Messages if messages length 0 return messages Debug Exception exception result get Exception if exception null Throwable cause exception get Status get Exception if cause instanceof Invocation Exception String nested Message Invocation Exception cause exception reference Type name return new String Message Format format Display Messages get String Java Inspect Expression 0 new String nested Message NON NLS 1 return new String exception get Message return new String 0  getErrorMessages IEvaluationResult getErrorMessages DebugException getException getStatus getException InvocationException nestedMessage InvocationException referenceType MessageFormat DisplayMessages getString JavaInspectExpression nestedMessage getMessage

public Error Dialog With Toggle Shell parent Shell String dialog Title String message I Status status String preference Key String toggle Message I Preference Store store super parent Shell dialog Title message status I Status WARNING I Status ERROR I Status INFO f Store store f Preference Key preference Key f Toggle Message toggle Message  ErrorDialogWithToggle parentShell dialogTitle IStatus preferenceKey toggleMessage IPreferenceStore parentShell dialogTitle IStatus IStatus IStatus fStore fPreferenceKey preferenceKey fToggleMessage toggleMessage
protected Control create Dialog Area Composite parent Composite dialog Composite Composite super create Dialog Area parent dialog Composite set Font parent get Font set Toggle Button create Check Button dialog Composite f Toggle Message get Toggle Button set Selection f Store get Boolean f Preference Key apply Dialog Font dialog Composite return dialog Composite  createDialogArea dialogComposite createDialogArea dialogComposite setFont getFont setToggleButton createCheckButton dialogComposite fToggleMessage getToggleButton setSelection fStore getBoolean fPreferenceKey applyDialogFont dialogComposite dialogComposite
Creates a button with the given label and sets the default configuration data private Button create Check Button Composite parent String label Button button new Button parent SWT CHECK SWT LEFT button set Text label Grid Data data new Grid Data SWT NONE data horizontal Span 2 data horizontal Alignment Grid Data CENTER button set Layout Data data button set Font parent get Font return button  createCheckButton setText GridData GridData horizontalSpan horizontalAlignment GridData setLayoutData setFont getFont
protected void button Pressed int id if id I Dialog Constants OK ID was the OK button pressed store Preference super button Pressed id  buttonPressed IDialogConstants OK_ID storePreference buttonPressed
private void store Preference f Store set Value f Preference Key get Toggle Button get Selection  storePreference fStore setValue fPreferenceKey getToggleButton getSelection
protected Button get Toggle Button return f Toggle Button  getToggleButton fToggleButton
protected void set Toggle Button Button button f Toggle Button button  setToggleButton fToggleButton
see org eclipse jface dialogs Dialog create Buttons For Button Bar org eclipse swt widgets Composite protected void create Buttons For Button Bar Composite parent super create Buttons For Button Bar parent get Button I Dialog Constants OK ID set Focus  createButtonsForButtonBar createButtonsForButtonBar createButtonsForButtonBar getButton IDialogConstants OK_ID setFocus

private I Workbench Window f Active Window private Evaluation Context Manager  IWorkbenchWindow fActiveWindow EvaluationContextManager
Runnable r new Runnable public void run if fg Manager null fg Manager new Evaluation Context Manager I Workbench workbench PlatformUI get Workbench I Workbench Window windows workbench get Workbench Windows for int i 0 i windows length i fg Manager window Opened windows i workbench add Window Listener fg Manager fg Manager f Active Window workbench get Active Workbench Window  fgManager fgManager EvaluationContextManager IWorkbench getWorkbench IWorkbenchWindow getWorkbenchWindows fgManager windowOpened addWindowListener fgManager fgManager fActiveWindow getActiveWorkbenchWindow
public static void startup Runnable r new Runnable public void run if fg Manager null fg Manager new Evaluation Context Manager I Workbench workbench PlatformUI get Workbench I Workbench Window windows workbench get Workbench Windows for int i 0 i windows length i fg Manager window Opened windows i workbench add Window Listener fg Manager fg Manager f Active Window workbench get Active Workbench Window JDI DebugUI Plugin get Standard Display async Exec r  fgManager fgManager EvaluationContextManager IWorkbench getWorkbench IWorkbenchWindow getWorkbenchWindows fgManager windowOpened addWindowListener fgManager fgManager fActiveWindow getActiveWorkbenchWindow JDIDebugUIPlugin getStandardDisplay asyncExec
see org eclipse ui I Window Listener window Activated org eclipse ui I Workbench Window public void window Activated I Workbench Window window f Active Window window window Opened window  IWindowListener windowActivated IWorkbenchWindow windowActivated IWorkbenchWindow fActiveWindow windowOpened
see org eclipse ui I Window Listener window Closed org eclipse ui I Workbench Window public void window Closed I Workbench Window window window remove Page Listener this  IWindowListener windowClosed IWorkbenchWindow windowClosed IWorkbenchWindow removePageListener
see org eclipse ui I Window Listener window Deactivated org eclipse ui I Workbench Window public void window Deactivated I Workbench Window window  IWindowListener windowDeactivated IWorkbenchWindow windowDeactivated IWorkbenchWindow
public void window Opened I Workbench Window window I Workbench Page pages window get Pages for int i 0 i pages length i window add Page Listener this page Opened pages i  windowOpened IWorkbenchWindow IWorkbenchPage getPages addPageListener pageOpened
see org eclipse ui I Page Listener page Activated org eclipse ui I Workbench Page public void page Activated I Workbench Page page page Opened page  IPageListener pageActivated IWorkbenchPage pageActivated IWorkbenchPage pageOpened
see org eclipse ui I Page Listener page Closed org eclipse ui I Workbench Page public void page Closed I Workbench Page page page remove Selection Listener I DebugUI Constants ID DEBUG VIEW this page remove Part Listener this  IPageListener pageClosed IWorkbenchPage pageClosed IWorkbenchPage removeSelectionListener IDebugUIConstants ID_DEBUG_VIEW removePartListener
public void page Opened I Workbench Page page page add Selection Listener I DebugUI Constants ID DEBUG VIEW this page add Part Listener this I Workbench Part Reference ref page get Active Part Reference if ref null part Activated ref  pageOpened IWorkbenchPage addSelectionListener IDebugUIConstants ID_DEBUG_VIEW addPartListener IWorkbenchPartReference getActivePartReference partActivated
public void selection Changed I Workbench Part part I Selection selection I Workbench Page page part get Site get Page if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection if ss size 1 Object element ss get First Element if element instanceof I Adaptable I Java Stack Frame frame I Java Stack Frame I Adaptable element get Adapter I Java Stack Frame class if frame null do not consider scrapbook frames if frame get Launch get Attribute Scrapbook Launcher SCRAPBOOK LAUNCH null set Context page frame return no context in the given view remove Context page  selectionChanged IWorkbenchPart ISelection IWorkbenchPage getSite getPage IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement IAdaptable IJavaStackFrame IJavaStackFrame IAdaptable getAdapter IJavaStackFrame getLaunch getAttribute ScrapbookLauncher SCRAPBOOK_LAUNCH setContext removeContext
Sets the evaluation context for the given page and notes that a valid execution context exists param page param frame private void set Context I Workbench Page page I Java Stack Frame frame if f Contexts By Page null f Contexts By Page new Hash Map f Contexts By Page put page frame System set Property JDI DebugUI Plugin get Unique Identifier debugger Active true NON NLS 1 NON NLS 2  setContext IWorkbenchPage IJavaStackFrame fContextsByPage fContextsByPage HashMap fContextsByPage setProperty JDIDebugUIPlugin getUniqueIdentifier debuggerActive
Removes an evaluation context for the given page and determines if any valid execution context remain param page private void remove Context I Workbench Page page if f Contexts By Page null f Contexts By Page remove page if f Contexts By Page is Empty System set Property JDI DebugUI Plugin get Unique Identifier debugger Active false NON NLS 1 NON NLS 2  removeContext IWorkbenchPage fContextsByPage fContextsByPage fContextsByPage isEmpty setProperty JDIDebugUIPlugin getUniqueIdentifier debuggerActive
private static I Java Stack Frame get Context I Workbench Page page if fg Manager null if fg Manager f Contexts By Page null return I Java Stack Frame fg Manager f Contexts By Page get page return null  IJavaStackFrame getContext IWorkbenchPage fgManager fgManager fContextsByPage IJavaStackFrame fgManager fContextsByPage
Returns the evaluation context for the given part or code null code if none The evaluation context corresponds to the selected stack frame in the following priority order ol li stack frame in the same page li li stack frame in the same window li li stack frame in active page of other window li li stack frame in page of other windows li ol param part the part that the evaluation action was invoked from return the stack frame that supplies an evaluation context or code null code if none public static I Java Stack Frame get Evaluation Context I Workbench Part part I Workbench Page page part get Site get Page I Java Stack Frame frame get Context page if frame null return get Evaluation Context page get Workbench Window else return frame  IJavaStackFrame getEvaluationContext IWorkbenchPart IWorkbenchPage getSite getPage IJavaStackFrame getContext getEvaluationContext getWorkbenchWindow
Returns the evaluation context for the given window or code null code if none The evaluation context corresponds to the selected stack frame in the following priority order ol li stack frame in active page of the window li li stack frame in another page of the window li li stack frame in active page of another window li li stack frame in a page of another window li ol param window the window that the evaluation action was invoked from or code null code if the current window should be consulted return the stack frame that supplies an evaluation context or code null code if none return I Java Stack Frame public static I Java Stack Frame get Evaluation Context I Workbench Window window List already Visited new Array List if window null window fg Manager f Active Window return get Evaluation Context window already Visited  IJavaStackFrame IJavaStackFrame getEvaluationContext IWorkbenchWindow alreadyVisited ArrayList fgManager fActiveWindow getEvaluationContext alreadyVisited
private static I Java Stack Frame get Evaluation Context I Workbench Window window List already Visited I Workbench Page active Page window get Active Page I Java Stack Frame frame null if active Page null frame get Context active Page if frame null I Workbench Page pages window get Pages for int i 0 i pages length i if active Page pages i frame get Context pages i if frame null return frame already Visited add window I Workbench Window windows PlatformUI get Workbench get Workbench Windows for int i 0 i windows length i if already Visited contains windows i frame get Evaluation Context windows i already Visited if frame null return frame return null else return frame  IJavaStackFrame getEvaluationContext IWorkbenchWindow alreadyVisited IWorkbenchPage activePage getActivePage IJavaStackFrame activePage getContext activePage IWorkbenchPage getPages activePage getContext alreadyVisited IWorkbenchWindow getWorkbench getWorkbenchWindows alreadyVisited getEvaluationContext alreadyVisited
see I Part Listener2 part Activated org eclipse ui I Workbench Part Reference public void part Activated I Workbench Part Reference ref if org eclipse jdt debug ui Snippet Editor equals ref get Id NON NLS 1 System set Property JDI DebugUI Plugin get Unique Identifier scrapbook Active true NON NLS 1 NON NLS 2 else System set Property JDI DebugUI Plugin get Unique Identifier scrapbook Active false NON NLS 1 NON NLS 2  IPartListener2 partActivated IWorkbenchPartReference partActivated IWorkbenchPartReference SnippetEditor getId setProperty JDIDebugUIPlugin getUniqueIdentifier scrapbookActive setProperty JDIDebugUIPlugin getUniqueIdentifier scrapbookActive
see I Part Listener2 part Brought To Top org eclipse ui I Workbench Part Reference public void part Brought To Top I Workbench Part Reference ref  IPartListener2 partBroughtToTop IWorkbenchPartReference partBroughtToTop IWorkbenchPartReference
see I Part Listener2 part Closed org eclipse ui I Workbench Part Reference public void part Closed I Workbench Part Reference ref if I DebugUI Constants ID DEBUG VIEW equals ref get Id remove Context ref get Page  IPartListener2 partClosed IWorkbenchPartReference partClosed IWorkbenchPartReference IDebugUIConstants ID_DEBUG_VIEW getId removeContext getPage
see I Part Listener2 part Deactivated org eclipse ui I Workbench Part Reference public void part Deactivated I Workbench Part Reference ref  IPartListener2 partDeactivated IWorkbenchPartReference partDeactivated IWorkbenchPartReference
see I Part Listener2 part Opened org eclipse ui I Workbench Part Reference public void part Opened I Workbench Part Reference ref  IPartListener2 partOpened IWorkbenchPartReference partOpened IWorkbenchPartReference
see I Part Listener2 part Hidden org eclipse ui I Workbench Part Reference public void part Hidden I Workbench Part Reference ref  IPartListener2 partHidden IWorkbenchPartReference partHidden IWorkbenchPartReference
see I Part Listener2 part Visible org eclipse ui I Workbench Part Reference public void part Visible I Workbench Part Reference ref  IPartListener2 partVisible IWorkbenchPartReference partVisible IWorkbenchPartReference
see I Part Listener2 part Input Changed org eclipse ui I Workbench Part Reference public void part Input Changed I Workbench Part Reference ref  IPartListener2 partInputChanged IWorkbenchPartReference partInputChanged IWorkbenchPartReference

public Object handle Status I Status status Object source if source instanceof I Debug Element I Debug Element element I Debug Element source I Java Debug Target target I Java Debug Target element get Debug Target get Adapter I Java Debug Target class if target null I Java Stack Frame frame Evaluation Context Manager get Evaluation Context I Workbench Window null if frame null frame get Debug Target equals target return frame get Thread return null  handleStatus IStatus IDebugElement IDebugElement IDebugElement IJavaDebugTarget IJavaDebugTarget getDebugTarget getAdapter IJavaDebugTarget IJavaStackFrame EvaluationContextManager getEvaluationContext IWorkbenchWindow getDebugTarget getThread

Handles the given code Core Exception code The workbench shell is used as a parent for the dialog window param e the code Core Exception code to be handled param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Core Exception e String title String message handle e JDI DebugUI Plugin get Active Workbench Shell title message  CoreException CoreException CoreException JDIDebugUIPlugin getActiveWorkbenchShell
Handles the given code Core Exception code param e the code Core Exception code to be handled param parent the dialog window s parent shell param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Core Exception e Shell parent String title String message fg Instance perform e parent title message  CoreException CoreException CoreException fgInstance
Handles the given code Invocation Target Exception code The workbench shell is used as a parent for the dialog window param e the code Invocation Target Exception code to be handled param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Invocation Target Exception e String title String message handle e JDI DebugUI Plugin get Active Workbench Shell title message  InvocationTargetException InvocationTargetException InvocationTargetException JDIDebugUIPlugin getActiveWorkbenchShell
Handles the given code Invocation Target Exception code param e the code Invocation Target Exception code to be handled param parent the dialog window s parent shell param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Invocation Target Exception e Shell parent String title String message fg Instance perform e parent title message  InvocationTargetException InvocationTargetException InvocationTargetException fgInstance
protected void perform Core Exception e Shell shell String title String message I Status status e get Status JDI DebugUI Plugin log e if status null Error Dialog open Error shell title message status else display Message Dialog e get Message shell title message  CoreException IStatus getStatus JDIDebugUIPlugin ErrorDialog openError displayMessageDialog getMessage
protected void perform Invocation Target Exception e Shell shell String title String message Throwable target e get Target Exception if target instanceof Core Exception perform Core Exception target shell title message else JDI DebugUI Plugin log e if e get Message null e get Message length 0 display Message Dialog e get Message shell title message else display Message Dialog target get Message shell title message  InvocationTargetException getTargetException CoreException CoreException JDIDebugUIPlugin getMessage getMessage displayMessageDialog getMessage displayMessageDialog getMessage
private void display Message Dialog String exception Message Shell shell String title String message String Writer msg new String Writer if message null msg write message msg write n n NON NLS 1 if exception Message null exception Message length 0 msg write DebugUI Messages get String Exception Handler see Error Log Message NON NLS 1 else msg write exception Message Message Dialog open Error shell title msg to String  displayMessageDialog exceptionMessage StringWriter StringWriter exceptionMessage exceptionMessage DebugUIMessages getString ExceptionHandler seeErrorLogMessage exceptionMessage MessageDialog openError toString

private boolean f Checked public Filter String name boolean checked set Name name set Checked checked  fChecked setName setChecked
public String get Name return f Name  getName fName
public void set Name String name f Name name  setName fName
public boolean is Checked return f Checked  isChecked fChecked
public void set Checked boolean checked f Checked checked  setChecked fChecked
public boolean equals Object o if o instanceof Filter Filter other Filter o if get Name equals other get Name return true return false  getName getName
public int hash Code return get Name hash Code  hashCode getName hashCode

see I Table Label Provider get Column Text Object int public String get Column Text Object object int column if column 0 return Filter object get Name return NON NLS 1  ITableLabelProvider getColumnText getColumnText getName
see I Label Provider get Text Object public String get Text Object element return Filter element get Name  ILabelProvider getText getText getName
see I Table Label Provider get Column Image Object int public Image get Column Image Object object int column String name Filter object get Name if name ends With name equals default package NON NLS 1 NON NLS 2 return IMG PKG else return IMG CUNIT  ITableLabelProvider getColumnImage getColumnImage getName endsWith IMG_PKG IMG_CUNIT

public class Filter Viewer Sorter extends Workbench Viewer Sorter public int compare Viewer viewer Object e1 Object e2 I Label Provider lprov I Label Provider Content Viewer viewer get Label Provider String name1 lprov get Text e1 String name2 lprov get Text e2 if name1 null name1 NON NLS 1 if name2 null name2 NON NLS 1 if name1 length 0 name2 length 0 char char1 name1 char At name1 length 1 char char2 name2 char At name2 length 1 if char1 char1 char2 return 1 if char2 char2 char1 return 1 return name1 compare To name2  FilterViewerSorter WorkbenchViewerSorter ILabelProvider ILabelProvider ContentViewer getLabelProvider getText getText charAt charAt compareTo

Creates a new dialog which can terminate disconnect or restart the given debug target param target the debug target see Error Dialog With Toggle Error Dialog With Toggle Shell String String I Status String String I Preference Store public Hot Code Replace Error Dialog Shell parent Shell String dialog Title String message I Status status String preference Key String toggle Message I Preference Store store I Debug Target target super parent Shell dialog Title message status preference Key toggle Message store this target target  ErrorDialogWithToggle ErrorDialogWithToggle IStatus IPreferenceStore HotCodeReplaceErrorDialog parentShell dialogTitle IStatus preferenceKey toggleMessage IPreferenceStore IDebugTarget parentShell dialogTitle preferenceKey toggleMessage
protected void create Buttons For Button Bar Composite parent super create Buttons For Button Bar parent get Button I Dialog Constants OK ID set Text DebugUI Messages get String Hot Code Replace Error Dialog 0 NON NLS 1 boolean can Terminate target can Terminate boolean can Disconnect target can Disconnect if can Terminate create Button parent TERMINATE ID DebugUI Messages get String Hot Code Replace Error Dialog 1 false NON NLS 1 if can Disconnect create Button parent DISCONNECT ID DebugUI Messages get String Hot Code Replace Error Dialog 3 false NON NLS 1 if can Terminate can Disconnect create Button parent RESTART ID DebugUI Messages get String Hot Code Replace Error Dialog 7 false NON NLS 1  createButtonsForButtonBar createButtonsForButtonBar getButton IDialogConstants OK_ID setText DebugUIMessages getString HotCodeReplaceErrorDialog canTerminate canTerminate canDisconnect canDisconnect canTerminate createButton TERMINATE_ID DebugUIMessages getString HotCodeReplaceErrorDialog canDisconnect createButton DISCONNECT_ID DebugUIMessages getString HotCodeReplaceErrorDialog canTerminate canDisconnect createButton RESTART_ID DebugUIMessages getString HotCodeReplaceErrorDialog
Runnable r new Runnable public void run try if id TERMINATE ID operation 0 DebugUI Messages get String Hot Code Replace Error Dialog 5 NON NLS 1 target terminate else if id DISCONNECT ID operation 0 DebugUI Messages get String Hot Code Replace Error Dialog 6 NON NLS 1 target disconnect else operation 0 DebugUI Messages get String Hot Code Replace Error Dialog 8 NON NLS 1 I Launch launch target get Launch launch terminate I Launch Configuration config launch get Launch Configuration if config null config exists DebugUI Tools launch config launch get Launch Mode catch Debug Exception e ex 0 e  TERMINATE_ID DebugUIMessages getString HotCodeReplaceErrorDialog DISCONNECT_ID DebugUIMessages getString HotCodeReplaceErrorDialog DebugUIMessages getString HotCodeReplaceErrorDialog ILaunch getLaunch ILaunchConfiguration getLaunchConfiguration DebugUITools getLaunchMode DebugException
protected void button Pressed final int id if id TERMINATE ID id DISCONNECT ID id RESTART ID final Debug Exception ex new Debug Exception 1 final String operation new String 1 ex 0 null Runnable r new Runnable public void run try if id TERMINATE ID operation 0 DebugUI Messages get String Hot Code Replace Error Dialog 5 NON NLS 1 target terminate else if id DISCONNECT ID operation 0 DebugUI Messages get String Hot Code Replace Error Dialog 6 NON NLS 1 target disconnect else operation 0 DebugUI Messages get String Hot Code Replace Error Dialog 8 NON NLS 1 I Launch launch target get Launch launch terminate I Launch Configuration config launch get Launch Configuration if config null config exists DebugUI Tools launch config launch get Launch Mode catch Debug Exception e ex 0 e Busy Indicator show While get Shell get Display r if ex 0 null JDI DebugUI Plugin error Dialog Message Format format DebugUI Messages get String Hot Code Replace Error Dialog 2 operation ex 0 get Status NON NLS 1 ok Pressed else super button Pressed id  buttonPressed TERMINATE_ID DISCONNECT_ID RESTART_ID DebugException DebugException TERMINATE_ID DebugUIMessages getString HotCodeReplaceErrorDialog DISCONNECT_ID DebugUIMessages getString HotCodeReplaceErrorDialog DebugUIMessages getString HotCodeReplaceErrorDialog ILaunch getLaunch ILaunchConfiguration getLaunchConfiguration DebugUITools getLaunchMode DebugException BusyIndicator showWhile getShell getDisplay JDIDebugUIPlugin errorDialog MessageFormat DebugUIMessages getString HotCodeReplaceErrorDialog getStatus okPressed buttonPressed

Creates a new image descriptor registry for the current or default display respectively public Image Descriptor Registry this JDI DebugUI Plugin get Standard Display  ImageDescriptorRegistry JDIDebugUIPlugin getStandardDisplay
Creates a new image descriptor registry for the given display All images managed by this registry will be disposed when the display gets disposed param display the display the images managed by this registry are allocated for public Image Descriptor Registry Display display f Display display Assert is Not Null f Display hook Display  ImageDescriptorRegistry fDisplay isNotNull fDisplay hookDisplay
Returns the image associated with the given image descriptor param descriptor the image descriptor for which the registry manages an image return the image associated with the image descriptor or code null code if the image descriptor can t create the requested image public Image get Image Descriptor descriptor if descriptor null descriptor Image Descriptor get Missing Image Descriptor Image result Image f Registry get descriptor if result null return result Assert is True f Display JDI DebugUI Plugin get Standard Display DebugUI Messages get String Image Descriptor Registry Allocating image for wrong display 1 NON NLS 1 result descriptor create Image if result null f Registry put descriptor result return result  ImageDescriptor ImageDescriptor getMissingImageDescriptor fRegistry isTrue fDisplay JDIDebugUIPlugin getStandardDisplay DebugUIMessages getString ImageDescriptorRegistry Allocating_image_for_wrong_display_1 createImage fRegistry
Disposes all images managed by this registry public void dispose for Iterator iter f Registry values iterator iter has Next Image image Image iter next image dispose f Registry clear  fRegistry hasNext fRegistry
private void hook Display f Display dispose Exec new Runnable public void run dispose  hookDisplay fDisplay disposeExec
private void hook Display f Display dispose Exec new Runnable public void run dispose  hookDisplay fDisplay disposeExec

private Java Element Label Provider f Java Label Provider public Object get Children Object o return null  JavaElementLabelProvider fJavaLabelProvider getChildren
public Image Descriptor get Image Descriptor Object object return null  ImageDescriptor getImageDescriptor
Returns a label for breakpoints that doesn t include information which the user can edit This assures that this label can be used in situations where the user is changing values like the title bar of the property dialog public String get Label Object o if o instanceof I Java Breakpoint return null I Java Breakpoint breakpoint I Java Breakpoint o String Buffer label new String Buffer try String type breakpoint get Type Name if type null label append type catch Core Exception e JDI DebugUI Plugin log e if breakpoint instanceof I Java Pattern Breakpoint try label append I Java Pattern Breakpoint breakpoint get Source Name catch Core Exception e JDI DebugUI Plugin log e else if breakpoint instanceof I Java Target Pattern Breakpoint try label append I Java Target Pattern Breakpoint breakpoint get Source Name catch Core Exception e JDI DebugUI Plugin log e else if breakpoint instanceof I Java Stratum Line Breakpoint try label append I Java Stratum Line Breakpoint breakpoint get Source Name catch Core Exception e JDI DebugUI Plugin log e if breakpoint instanceof I Java Line Breakpoint I Java Line Breakpoint line Breakpoint I Java Line Breakpoint breakpoint try int line Number line Breakpoint get Line Number if line Number 1 label append DebugUI Messages get String Java Breakpoint Workbench Adapter Factory 1 NON NLS 1 label append line Number label append catch Core Exception e JDI DebugUI Plugin log e try I Member member Breakpoint Utils get Member line Breakpoint if member null label append NON NLS 1 label append get Java Label Provider get Text member catch Core Exception e JDI DebugUI Plugin log e return label to String  getLabel IJavaBreakpoint IJavaBreakpoint IJavaBreakpoint StringBuffer StringBuffer getTypeName CoreException JDIDebugUIPlugin IJavaPatternBreakpoint IJavaPatternBreakpoint getSourceName CoreException JDIDebugUIPlugin IJavaTargetPatternBreakpoint IJavaTargetPatternBreakpoint getSourceName CoreException JDIDebugUIPlugin IJavaStratumLineBreakpoint IJavaStratumLineBreakpoint getSourceName CoreException JDIDebugUIPlugin IJavaLineBreakpoint IJavaLineBreakpoint lineBreakpoint IJavaLineBreakpoint lineNumber lineBreakpoint getLineNumber lineNumber DebugUIMessages getString JavaBreakpointWorkbenchAdapterFactory lineNumber CoreException JDIDebugUIPlugin IMember BreakpointUtils getMember lineBreakpoint getJavaLabelProvider getText CoreException JDIDebugUIPlugin toString
public Object get Parent Object o return null  getParent
protected Java Element Label Provider get Java Label Provider if f Java Label Provider null f Java Label Provider new Java Element Label Provider Java Element Label Provider SHOW DEFAULT return f Java Label Provider  JavaElementLabelProvider getJavaLabelProvider fJavaLabelProvider fJavaLabelProvider JavaElementLabelProvider JavaElementLabelProvider SHOW_DEFAULT fJavaLabelProvider
public class Java Breakpoint Workbench Adapter Factory implements I Adapter Factory public Object get Adapter Object adaptable Object Class adapter Type if adapter Type I Workbench Adapter class adaptable Object instanceof I Java Breakpoint return null return new I Workbench Adapter private Java Element Label Provider f Java Label Provider public Object get Children Object o return null public Image Descriptor get Image Descriptor Object object return null Returns a label for breakpoints that doesn t include information which the user can edit This assures that this label can be used in situations where the user is changing values like the title bar of the property dialog public String get Label Object o if o instanceof I Java Breakpoint return null I Java Breakpoint breakpoint I Java Breakpoint o String Buffer label new String Buffer try String type breakpoint get Type Name if type null label append type catch Core Exception e JDI DebugUI Plugin log e if breakpoint instanceof I Java Pattern Breakpoint try label append I Java Pattern Breakpoint breakpoint get Source Name catch Core Exception e JDI DebugUI Plugin log e else if breakpoint instanceof I Java Target Pattern Breakpoint try label append I Java Target Pattern Breakpoint breakpoint get Source Name catch Core Exception e JDI DebugUI Plugin log e else if breakpoint instanceof I Java Stratum Line Breakpoint try label append I Java Stratum Line Breakpoint breakpoint get Source Name catch Core Exception e JDI DebugUI Plugin log e if breakpoint instanceof I Java Line Breakpoint I Java Line Breakpoint line Breakpoint I Java Line Breakpoint breakpoint try int line Number line Breakpoint get Line Number if line Number 1 label append DebugUI Messages get String Java Breakpoint Workbench Adapter Factory 1 NON NLS 1 label append line Number label append catch Core Exception e JDI DebugUI Plugin log e try I Member member Breakpoint Utils get Member line Breakpoint if member null label append NON NLS 1 label append get Java Label Provider get Text member catch Core Exception e JDI DebugUI Plugin log e return label to String public Object get Parent Object o return null protected Java Element Label Provider get Java Label Provider if f Java Label Provider null f Java Label Provider new Java Element Label Provider Java Element Label Provider SHOW DEFAULT return f Java Label Provider  JavaBreakpointWorkbenchAdapterFactory IAdapterFactory getAdapter adaptableObject adapterType adapterType IWorkbenchAdapter adaptableObject IJavaBreakpoint IWorkbenchAdapter JavaElementLabelProvider fJavaLabelProvider getChildren ImageDescriptor getImageDescriptor getLabel IJavaBreakpoint IJavaBreakpoint IJavaBreakpoint StringBuffer StringBuffer getTypeName CoreException JDIDebugUIPlugin IJavaPatternBreakpoint IJavaPatternBreakpoint getSourceName CoreException JDIDebugUIPlugin IJavaTargetPatternBreakpoint IJavaTargetPatternBreakpoint getSourceName CoreException JDIDebugUIPlugin IJavaStratumLineBreakpoint IJavaStratumLineBreakpoint getSourceName CoreException JDIDebugUIPlugin IJavaLineBreakpoint IJavaLineBreakpoint lineBreakpoint IJavaLineBreakpoint lineNumber lineBreakpoint getLineNumber lineNumber DebugUIMessages getString JavaBreakpointWorkbenchAdapterFactory lineNumber CoreException JDIDebugUIPlugin IMember BreakpointUtils getMember lineBreakpoint getJavaLabelProvider getText CoreException JDIDebugUIPlugin toString getParent JavaElementLabelProvider getJavaLabelProvider fJavaLabelProvider fJavaLabelProvider JavaElementLabelProvider JavaElementLabelProvider SHOW_DEFAULT fJavaLabelProvider
public Class get Adapter List return new Class I Workbench Adapter class  getAdapterList IWorkbenchAdapter

see org eclipse ui I Part Listener part Activated org eclipse ui I Workbench Part public void part Activated I Workbench Part part  IPartListener partActivated IWorkbenchPart partActivated IWorkbenchPart
see org eclipse ui I Part Listener part Brought To Top org eclipse ui I Workbench Part public void part Brought To Top I Workbench Part part  IPartListener partBroughtToTop IWorkbenchPart partBroughtToTop IWorkbenchPart
public void part Closed I Workbench Part part if part equals f Editor I Workbench Page page f Editor get Site get Page page remove Selection Listener I DebugUI Constants ID DEBUG VIEW this page remove Part Listener this f Selection null f Editor null  partClosed IWorkbenchPart fEditor IWorkbenchPage fEditor getSite getPage removeSelectionListener IDebugUIConstants ID_DEBUG_VIEW removePartListener fSelection fEditor
see org eclipse ui I Part Listener part Deactivated org eclipse ui I Workbench Part public void part Deactivated I Workbench Part part  IPartListener partDeactivated IWorkbenchPart partDeactivated IWorkbenchPart
see org eclipse ui I Part Listener part Opened org eclipse ui I Workbench Part public void part Opened I Workbench Part part  IPartListener partOpened IWorkbenchPart partOpened IWorkbenchPart
see org eclipse ui I Selection Listener selection Changed org eclipse ui I Workbench Part org eclipse jface viewers I Selection public void selection Changed I Workbench Part part I Selection selection f Selection selection  ISelectionListener selectionChanged IWorkbenchPart ISelection selectionChanged IWorkbenchPart ISelection fSelection
public Java Debug Hover  JavaDebugHover
initialize selection Runnable r new Runnable public void run f Selection page get Selection I DebugUI Constants ID DEBUG VIEW  fSelection getSelection IDebugUIConstants ID_DEBUG_VIEW
public void set Editor I Editor Part editor if editor null f Editor editor final I Workbench Page page editor get Site get Page page add Selection Listener I DebugUI Constants ID DEBUG VIEW this page add Part Listener this initialize selection Runnable r new Runnable public void run f Selection page get Selection I DebugUI Constants ID DEBUG VIEW JDI DebugUI Plugin get Standard Display async Exec r  setEditor IEditorPart fEditor IWorkbenchPage getSite getPage addSelectionListener IDebugUIConstants ID_DEBUG_VIEW addPartListener fSelection getSelection IDebugUIConstants ID_DEBUG_VIEW JDIDebugUIPlugin getStandardDisplay asyncExec
see org eclipse jface text I Text Hover get Hover Region org eclipse jface text I Text Viewer int public I Region get Hover Region I Text Viewer text Viewer int offset return Java Word Finder find Word text Viewer get Document offset  ITextHover getHoverRegion ITextViewer IRegion getHoverRegion ITextViewer textViewer JavaWordFinder findWord textViewer getDocument
Returns the stack frame in which to search for variables or code null code if none return the stack frame in which to search for variables or code null code if none protected I Java Stack Frame get Frame if f Selection instanceof I Structured Selection I Structured Selection selection I Structured Selection f Selection if selection size 1 Object el selection get First Element if el instanceof I Adaptable return I Java Stack Frame I Adaptable el get Adapter I Java Stack Frame class return null  IJavaStackFrame getFrame fSelection IStructuredSelection IStructuredSelection IStructuredSelection fSelection getFirstElement IAdaptable IJavaStackFrame IAdaptable getAdapter IJavaStackFrame
public String get Hover Info I Text Viewer text Viewer I Region hover Region I Java Stack Frame frame get Frame if frame null try I Document document text Viewer get Document if document null return null String variable Name document get hover Region get Offset hover Region get Length String Buffer buffer new String Buffer try I Variable variable frame find Variable variable Name if variable null append Variable buffer variable catch Debug Exception x if x get Status get Code I Java Thread ERR THREAD NOT SUSPENDED JDI DebugUI Plugin log x if buffer length 0 return buffer to String catch Bad Location Exception x JDI DebugUI Plugin log x return null  getHoverInfo ITextViewer textViewer IRegion hoverRegion IJavaStackFrame getFrame IDocument textViewer getDocument variableName hoverRegion getOffset hoverRegion getLength StringBuffer StringBuffer IVariable findVariable variableName appendVariable DebugException getStatus getCode IJavaThread ERR_THREAD_NOT_SUSPENDED JDIDebugUIPlugin toString BadLocationException JDIDebugUIPlugin
Append HTML for the given variable to the given buffer private static void append Variable String Buffer buffer I Variable variable throws Debug Exception buffer append p NON NLS 1 buffer append pre append variable get Name append pre NON NLS 1 NON NLS 2 buffer append NON NLS 1 String type get Type Name variable String value b pre variable get Value get Value String pre b NON NLS 1 NON NLS 2 if type null buffer append null NON NLS 1 else if type equals java lang String NON NLS 1 buffer append NON NLS 1 buffer append value buffer append else if type equals boolean NON NLS 1 buffer append buffer append value else buffer append NON NLS 1 buffer append pre append type append pre NON NLS 1 NON NLS 2 buffer append NON NLS 1 buffer append value buffer append p NON NLS 1  appendVariable StringBuffer IVariable DebugException getName getTypeName getValue getValueString
private static String get Type Name I Variable variable throws Debug Exception I Value value variable get Value if value instanceof I Java Value I Java Type type I Java Value value get Java Type if type null return null return type get Name return value get Reference Type Name  getTypeName IVariable DebugException IValue getValue IJavaValue IJavaType IJavaValue getJavaType getName getReferenceTypeName
return new I Information Control Creator public I Information Control create Information Control Shell parent return new Default Information Control parent SWT NONE new HTML Text Presenter true DebugUI Messages get String Java Debug Hover 16 NON NLS 1  IInformationControlCreator IInformationControl createInformationControl DefaultInformationControl HTMLTextPresenter DebugUIMessages getString JavaDebugHover
public I Information Control Creator get Hover Control Creator if Preference Constants get Preference Store get Boolean Preference Constants EDITOR SHOW TEXT HOVER AFFORDANCE NON NLS 1 return new I Information Control Creator public I Information Control create Information Control Shell parent return new Default Information Control parent SWT NONE new HTML Text Presenter true DebugUI Messages get String Java Debug Hover 16 NON NLS 1 return null  IInformationControlCreator getHoverControlCreator PreferenceConstants getPreferenceStore getBoolean PreferenceConstants EDITOR_SHOW_TEXT_HOVER_AFFORDANCE IInformationControlCreator IInformationControl createInformationControl DefaultInformationControl HTMLTextPresenter DebugUIMessages getString JavaDebugHover

public static final Image Descriptor DESC CLASSPATH create Managed T OBJ IMG OBJS CLASSPATH Returns the image managed under the given key in this registry param key the image s key return the image managed under the given key public static Image get String key return get Image Registry get key  ImageDescriptor DESC_CLASSPATH createManaged T_OBJ IMG_OBJS_CLASSPATH getImageRegistry
Sets the two image descriptors for enabled disabled The actions are retrieved from the lcl16 folders public static void set Local Image Descriptors I Action action String rel Path String type lcl16 NON NLS 1 try Image Descriptor id Image Descriptor create FromURL make Icon FileURL d type rel Path NON NLS 1 if id null action set Disabled Image Descriptor id catch MalformedURL Exception e JDI DebugUI Plugin log e action set Image Descriptor create e type rel Path NON NLS 1  setLocalImageDescriptors IAction relPath ImageDescriptor ImageDescriptor createFromURL makeIconFileURL relPath setDisabledImageDescriptor MalformedURLException JDIDebugUIPlugin setImageDescriptor relPath
package static Image Registry get Image Registry if fg Image Registry null fg Image Registry new Image Registry for Iterator iter fg AvoidSWT Error Map key Set iterator iter has Next String key String iter next fg Image Registry put key Image Descriptor fg AvoidSWT Error Map get key fg AvoidSWT Error Map null return fg Image Registry  ImageRegistry getImageRegistry fgImageRegistry fgImageRegistry ImageRegistry fgAvoidSWTErrorMap keySet hasNext fgImageRegistry ImageDescriptor fgAvoidSWTErrorMap fgAvoidSWTErrorMap fgImageRegistry
private static Image Descriptor create Managed String prefix String name try Image Descriptor result Image Descriptor create FromURL make Icon FileURL prefix name substring NAME PREFIX LENGTH if fg AvoidSWT Error Map null fg AvoidSWT Error Map new Hash Map fg AvoidSWT Error Map put name result if fg Image Registry null JDI DebugUI Plugin log Error Message Internal Error Image registry already defined NON NLS 1 return result catch MalformedURL Exception e JDI DebugUI Plugin log e return Image Descriptor get Missing Image Descriptor  ImageDescriptor createManaged ImageDescriptor ImageDescriptor createFromURL makeIconFileURL NAME_PREFIX_LENGTH fgAvoidSWTErrorMap fgAvoidSWTErrorMap HashMap fgAvoidSWTErrorMap fgImageRegistry JDIDebugUIPlugin logErrorMessage MalformedURLException JDIDebugUIPlugin ImageDescriptor getMissingImageDescriptor
private static Image Descriptor create String prefix String name try return Image Descriptor create FromURL make Icon FileURL prefix name catch MalformedURL Exception e JDI DebugUI Plugin log e return Image Descriptor get Missing Image Descriptor  ImageDescriptor ImageDescriptor createFromURL makeIconFileURL MalformedURLException JDIDebugUIPlugin ImageDescriptor getMissingImageDescriptor
private static URL make Icon FileURL String prefix String name throws MalformedURL Exception if fg Icon BaseURL null throw new MalformedURL Exception String Buffer buffer new String Buffer prefix buffer append buffer append name return new URL fg Icon BaseURL buffer to String  makeIconFileURL MalformedURLException fgIconBaseURL MalformedURLException StringBuffer StringBuffer fgIconBaseURL toString

class Init Job extends Job public Init Job super DebugUI Messages get String Java Debug Options Manager 0 NON NLS 1  InitJob InitJob DebugUIMessages getString JavaDebugOptionsManager
protected I Status run I Progress Monitor monitor Multi Status status new Multi Status JDI DebugUI Plugin get Unique Identifier I Java DebugUI Constants INTERNAL ERROR DebugUI Messages get String Java Debug Options Manager 1 null NON NLS 1 compilation error breakpoint try I Java Exception Breakpoint bp JDI Debug Model create Exception Breakpoint Resources Plugin get Workspace get Root java lang Error true true false false null NON NLS 1 bp set Persisted false set Suspend On Compilation Errors Breakpoint bp catch Core Exception e status add e get Status uncaught exception breakpoint try I Java Exception Breakpoint bp JDI Debug Model create Exception Breakpoint Resources Plugin get Workspace get Root java lang Throwable false true false false null NON NLS 1 bp set Persisted false set Suspend On Uncaught Exception Breakpoint bp catch Core Exception e status add e get Status note existing compilation errors try I Marker problems Resources Plugin get Workspace get Root find Markers org eclipse jdt core problem true I Resource DEPTH INFINITE NON NLS 1 if problems null for int i 0 i problems length i problem Added problems i catch Core Exception e status add e get Status if status get Children length 0 return Status OK STATUS return status  IStatus IProgressMonitor MultiStatus MultiStatus JDIDebugUIPlugin getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR DebugUIMessages getString JavaDebugOptionsManager IJavaExceptionBreakpoint JDIDebugModel createExceptionBreakpoint ResourcesPlugin getWorkspace getRoot setPersisted setSuspendOnCompilationErrorsBreakpoint CoreException getStatus IJavaExceptionBreakpoint JDIDebugModel createExceptionBreakpoint ResourcesPlugin getWorkspace getRoot setPersisted setSuspendOnUncaughtExceptionBreakpoint CoreException getStatus IMarker ResourcesPlugin getWorkspace getRoot findMarkers IResource DEPTH_INFINITE problemAdded CoreException getStatus getChildren OK_STATUS
public Location String package Name String source Name int line Number f Package Name package Name f Source Name source Name f Line Number line Number  packageName sourceName lineNumber fPackageName packageName fSourceName sourceName fLineNumber lineNumber
public boolean equals Object o if o instanceof Location Location l Location o return l f Package Name equals f Package Name l f Source Name equals f Source Name l f Line Number f Line Number return false  fPackageName fPackageName fSourceName fSourceName fLineNumber fLineNumber
public int hash Code return f Package Name hash Code f Source Name hash Code f Line Number  hashCode fPackageName hashCode fSourceName hashCode fLineNumber
Update cache of problems as they are added removed see I Resource Change Listener resource Changed I Resource Change Event public void resource Changed I Resource Change Event event I Marker Delta deltas event find Marker Deltas org eclipse jdt core problem true NON NLS 1 if deltas null for int i 0 i deltas length i I Marker Delta delta deltas i switch delta get Kind case I Resource Delta ADDED problem Added delta get Marker break case I Resource Delta REMOVED problem Removed delta get Marker break  IResourceChangeListener resourceChanged IResourceChangeEvent resourceChanged IResourceChangeEvent IMarkerDelta findMarkerDeltas IMarkerDelta getKind IResourceDelta problemAdded getMarker IResourceDelta problemRemoved getMarker
Not to be instantiated see Java Debug Options Manager get Default private Java Debug Options Manager  JavaDebugOptionsManager getDefault JavaDebugOptionsManager
Return the default options manager public static Java Debug Options Manager get Default if fg Options Manager null fg Options Manager new Java Debug Options Manager return fg Options Manager  JavaDebugOptionsManager getDefault fgOptionsManager fgOptionsManager JavaDebugOptionsManager fgOptionsManager
Called at startup by the Java debug ui plug in public void startup lazy initialization will occur on the first launch Debug Plugin debug Plugin Debug Plugin get Default debug Plugin get Launch Manager add Launch Listener this debug Plugin get Breakpoint Manager add Breakpoint Listener this Evaluation Context Manager startup  DebugPlugin debugPlugin DebugPlugin getDefault debugPlugin getLaunchManager addLaunchListener debugPlugin getBreakpointManager addBreakpointListener EvaluationContextManager
Called at shutdown by the Java debug ui plug in public void shutdown Resources Plugin get Workspace remove Resource Change Listener this Debug Plugin debug Plugin Debug Plugin get Default debug Plugin remove Debug Event Listener this debug Plugin get Launch Manager remove Launch Listener this debug Plugin get Breakpoint Manager remove Breakpoint Listener this if JDI DebugUI Plugin get Default is Shutting Down avert restoring the preference store at shutdown JDI DebugUI Plugin get Default get Preference Store remove Property Change Listener this JDI Debug Model remove Java Breakpoint Listener this f Problem Map clear f Location Map clear System get Properties remove JDI DebugUI Plugin get Unique Identifier debugger Active NON NLS 1  ResourcesPlugin getWorkspace removeResourceChangeListener DebugPlugin debugPlugin DebugPlugin getDefault debugPlugin removeDebugEventListener debugPlugin getLaunchManager removeLaunchListener debugPlugin getBreakpointManager removeBreakpointListener JDIDebugUIPlugin getDefault isShuttingDown JDIDebugUIPlugin getDefault getPreferenceStore removePropertyChangeListener JDIDebugModel removeJavaBreakpointListener fProblemMap fLocationMap getProperties JDIDebugUIPlugin getUniqueIdentifier debuggerActive
Initializes compilation error handling and suspending on uncaught exceptions protected void initialize Problem Handling Init Job job new Init Job job set System true job schedule  initializeProblemHandling InitJob InitJob setSystem
The given problem has been added Cross reference the problem with its location Enable the error breakpoint if the suspend option is on and this is the first problem being added protected void problem Added I Marker problem if problem get Attribute I Marker SEVERITY I Marker SEVERITY INFO I Marker SEVERITY ERROR I Resource res problem get Resource I Java Element cu Java Core create res if cu null cu instanceof I Compilation Unit auto enable the exception breakpoint if this is the first problem added and the preference is turned on boolean auto Enable f Problem Map is Empty int line problem get Attribute I Marker LINE NUMBER 1 String name cu get Element Name Location l new Location cu get Parent get Element Name name line f Location Map put l problem f Problem Map put problem l if auto Enable try get Suspend On Compilation Error Breakpoint set Enabled is Suspend On Compilation Errors catch Core Exception e JDI DebugUI Plugin log e  problemAdded IMarker getAttribute IMarker IMarker SEVERITY_INFO IMarker SEVERITY_ERROR IResource getResource IJavaElement JavaCore ICompilationUnit autoEnable fProblemMap isEmpty getAttribute IMarker LINE_NUMBER getElementName getParent getElementName fLocationMap fProblemMap autoEnable getSuspendOnCompilationErrorBreakpoint setEnabled isSuspendOnCompilationErrors CoreException JDIDebugUIPlugin
The given problem has been removed Remove cross reference of problem and location Disable the breakpoint if there are no errors protected void problem Removed I Marker problem Object location f Problem Map remove problem if location null f Location Map remove location if f Problem Map is Empty try get Suspend On Compilation Error Breakpoint set Enabled false catch Core Exception e JDI DebugUI Plugin log e  problemRemoved IMarker fProblemMap fLocationMap fProblemMap isEmpty getSuspendOnCompilationErrorBreakpoint setEnabled CoreException JDIDebugUIPlugin
Notifies java debug targets of the given breakpoint addition or removal param breakpoint a breakpoint param kind ADDED REMOVED or CHANGED protected void notify Targets I Breakpoint breakpoint int kind I Debug Target targets Debug Plugin get Default get Launch Manager get Debug Targets for int i 0 i targets length i if targets i instanceof I Java Debug Target I Java Debug Target target I Java Debug Target targets i notify Target target breakpoint kind  notifyTargets IBreakpoint IDebugTarget DebugPlugin getDefault getLaunchManager getDebugTargets IJavaDebugTarget IJavaDebugTarget IJavaDebugTarget notifyTarget
Notifies the give debug target of filter specifications param target Java debug target protected void notify Target Of Filters I Java Debug Target target I Preference Store store JDI DebugUI Plugin get Default get Preference Store target set Filter Constructors store get Boolean IJDI Preferences Constants PREF FILTER CONSTRUCTORS target set Filter Static Initializers store get Boolean IJDI Preferences Constants PREF FILTER STATIC INITIALIZERS target set Filter Synthetics store get Boolean IJDI Preferences Constants PREF FILTER SYNTHETICS target set Step Filters get Active Step Filters  notifyTargetOfFilters IJavaDebugTarget IPreferenceStore JDIDebugUIPlugin getDefault getPreferenceStore setFilterConstructors getBoolean IJDIPreferencesConstants PREF_FILTER_CONSTRUCTORS setFilterStaticInitializers getBoolean IJDIPreferencesConstants PREF_FILTER_STATIC_INITIALIZERS setFilterSynthetics getBoolean IJDIPreferencesConstants PREF_FILTER_SYNTHETICS setStepFilters getActiveStepFilters
Notifies all targets of current filter specifications protected void notify Targets Of Filters I Debug Target targets Debug Plugin get Default get Launch Manager get Debug Targets for int i 0 i targets length i if targets i instanceof I Java Debug Target I Java Debug Target target I Java Debug Target targets i notify Target Of Filters target  notifyTargetsOfFilters IDebugTarget DebugPlugin getDefault getLaunchManager getDebugTargets IJavaDebugTarget IJavaDebugTarget IJavaDebugTarget notifyTargetOfFilters
Notifies the given target of the given breakpoint addition or removal param target Java debug target param breakpoint a breakpoint param kind ADDED REMOVED or CHANGED protected void notify Target I Java Debug Target target I Breakpoint breakpoint int kind switch kind case ADDED target breakpoint Added breakpoint break case REMOVED target breakpoint Removed breakpoint null break case CHANGED target breakpoint Changed breakpoint null break  notifyTarget IJavaDebugTarget IBreakpoint breakpointAdded breakpointRemoved breakpointChanged
see I Property Change Listener property Change Property Change Event public void property Change Property Change Event event if event get Property equals IJDI Preferences Constants PREF SUSPEND ON COMPILATION ERRORS I Breakpoint breakpoint get Suspend On Compilation Error Breakpoint if breakpoint null int kind REMOVED if is Suspend On Compilation Errors kind ADDED notify Targets breakpoint kind else if event get Property equals IJDI Preferences Constants PREF SUSPEND ON UNCAUGHT EXCEPTIONS I Breakpoint breakpoint get Suspend On Uncaught Exception Breakpoint if breakpoint null int kind REMOVED if is Suspend On Uncaught Exceptions kind ADDED notify Targets breakpoint kind else if is Use Filter Property event get Property notify Targets Of Filters else if is Filter List Property event get Property update Active Filters  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent getProperty IJDIPreferencesConstants PREF_SUSPEND_ON_COMPILATION_ERRORS IBreakpoint getSuspendOnCompilationErrorBreakpoint isSuspendOnCompilationErrors notifyTargets getProperty IJDIPreferencesConstants PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS IBreakpoint getSuspendOnUncaughtExceptionBreakpoint isSuspendOnUncaughtExceptions notifyTargets isUseFilterProperty getProperty notifyTargetsOfFilters isFilterListProperty getProperty updateActiveFilters
Returns whether the given property is a property that affects whether or not step filters are used private boolean is Use Filter Property String property return property equals IJDI Preferences Constants PREF FILTER CONSTRUCTORS property equals IJDI Preferences Constants PREF FILTER STATIC INITIALIZERS property equals IJDI Preferences Constants PREF FILTER SYNTHETICS  isUseFilterProperty IJDIPreferencesConstants PREF_FILTER_CONSTRUCTORS IJDIPreferencesConstants PREF_FILTER_STATIC_INITIALIZERS IJDIPreferencesConstants PREF_FILTER_SYNTHETICS
Returns whether the given property is a property that affects the list of active or inactive step filters private boolean is Filter List Property String property return property equals IJDI Preferences Constants PREF ACTIVE FILTERS LIST property equals IJDI Preferences Constants PREF INACTIVE FILTERS LIST  isFilterListProperty IJDIPreferencesConstants PREF_ACTIVE_FILTERS_LIST IJDIPreferencesConstants PREF_INACTIVE_FILTERS_LIST
Enable Disable the given breakpoint and notify targets of the change param breakpoint a breakpoint param enabled whether enabeld protected void set Enabled I Breakpoint breakpoint boolean enabled try breakpoint set Enabled enabled notify Targets breakpoint CHANGED catch Core Exception e JDI DebugUI Plugin log e  setEnabled IBreakpoint setEnabled notifyTargets CoreException JDIDebugUIPlugin
Returns whether suspend on compilation errors is enabled return whether suspend on compilation errors is enabled protected boolean is Suspend On Compilation Errors return JDI DebugUI Plugin get Default get Preference Store get Boolean IJDI Preferences Constants PREF SUSPEND ON COMPILATION ERRORS  isSuspendOnCompilationErrors JDIDebugUIPlugin getDefault getPreferenceStore getBoolean IJDIPreferencesConstants PREF_SUSPEND_ON_COMPILATION_ERRORS
Returns whether suspend on uncaught exception is enabled return whether suspend on uncaught exception is enabled protected boolean is Suspend On Uncaught Exceptions return JDI DebugUI Plugin get Default get Preference Store get Boolean IJDI Preferences Constants PREF SUSPEND ON UNCAUGHT EXCEPTIONS  isSuspendOnUncaughtExceptions JDIDebugUIPlugin getDefault getPreferenceStore getBoolean IJDIPreferencesConstants PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS
Sets the breakpoint used to suspend on uncaught exceptions param breakpoint exception breakpoint private void set Suspend On Uncaught Exception Breakpoint I Java Exception Breakpoint breakpoint f Suspend On Exception Breakpoint breakpoint  setSuspendOnUncaughtExceptionBreakpoint IJavaExceptionBreakpoint fSuspendOnExceptionBreakpoint
Returns the breakpoint used to suspend on uncaught exceptions return exception breakpoint protected I Java Exception Breakpoint get Suspend On Uncaught Exception Breakpoint return f Suspend On Exception Breakpoint  IJavaExceptionBreakpoint getSuspendOnUncaughtExceptionBreakpoint fSuspendOnExceptionBreakpoint
Sets the breakpoint used to suspend on compilation errors param breakpoint exception breakpoint private void set Suspend On Compilation Errors Breakpoint I Java Exception Breakpoint breakpoint f Suspend On Error Breakpoint breakpoint  setSuspendOnCompilationErrorsBreakpoint IJavaExceptionBreakpoint fSuspendOnErrorBreakpoint
Returns the breakpoint used to suspend on compilation errors return exception breakpoint protected I Java Exception Breakpoint get Suspend On Compilation Error Breakpoint return f Suspend On Error Breakpoint  IJavaExceptionBreakpoint getSuspendOnCompilationErrorBreakpoint fSuspendOnErrorBreakpoint
Parses the comma separated string into an array of strings return list public static String parse List String list String List list new Array List 10 String Tokenizer tokenizer new String Tokenizer list String NON NLS 1 while tokenizer has More Tokens String token tokenizer next Token list add token return String list to Array new String list size  parseList listString ArrayList StringTokenizer StringTokenizer listString hasMoreTokens nextToken toArray
Serializes the array of strings into one comma separated string param list array of strings return a single string composed of the given list public static String serialize List String list if list null return NON NLS 1 String Buffer buffer new String Buffer for int i 0 i list length i if i 0 buffer append buffer append list i return buffer to String  serializeList StringBuffer StringBuffer toString
Returns the current list of active step filters return current list of active step filters protected String get Active Step Filters if f Active Step Filters null f Active Step Filters parse List JDI DebugUI Plugin get Default get Preference Store get String IJDI Preferences Constants PREF ACTIVE FILTERS LIST After active filters are cached register to hear about future changes JDI DebugUI Plugin get Default get Preference Store add Property Change Listener this return f Active Step Filters  getActiveStepFilters fActiveStepFilters fActiveStepFilters parseList JDIDebugUIPlugin getDefault getPreferenceStore getString IJDIPreferencesConstants PREF_ACTIVE_FILTERS_LIST JDIDebugUIPlugin getDefault getPreferenceStore addPropertyChangeListener fActiveStepFilters
Updates local copy of active step filters and notifies targets protected void update Active Filters f Active Step Filters parse List JDI DebugUI Plugin get Default get Preference Store get String IJDI Preferences Constants PREF ACTIVE FILTERS LIST notify Targets Of Filters  updateActiveFilters fActiveStepFilters parseList JDIDebugUIPlugin getDefault getPreferenceStore getString IJDIPreferencesConstants PREF_ACTIVE_FILTERS_LIST notifyTargetsOfFilters
When a Java debug target is created install options in the target and set that the Java debugger is active When all Java debug targets are terminated set that that Java debugger is no longer active see I Debug Event Set Listener handle Debug Events Debug Event public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i if event get Kind Debug Event CREATE Object source event get Source if source instanceof I Java Debug Target I Java Debug Target java Target I Java Debug Target source compilation breakpoints if is Suspend On Compilation Errors notify Target java Target get Suspend On Compilation Error Breakpoint ADDED uncaught exception breakpoint if is Suspend On Uncaught Exceptions I Launch Configuration launch Configuration java Target get Launch get Launch Configuration boolean is Snippet Editor false try is Snippet Editor launch Configuration get Attribute Scrapbook Launcher SCRAPBOOK LAUNCH String null null catch Core Exception e if is Snippet Editor notify Target java Target get Suspend On Uncaught Exception Breakpoint ADDED step filters notify Target Of Filters java Target  IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent DebugEvent getKind DebugEvent getSource IJavaDebugTarget IJavaDebugTarget javaTarget IJavaDebugTarget isSuspendOnCompilationErrors notifyTarget javaTarget getSuspendOnCompilationErrorBreakpoint isSuspendOnUncaughtExceptions ILaunchConfiguration launchConfiguration javaTarget getLaunch getLaunchConfiguration isSnippetEditor isSnippetEditor launchConfiguration getAttribute ScrapbookLauncher SCRAPBOOK_LAUNCH CoreException isSnippetEditor notifyTarget javaTarget getSuspendOnUncaughtExceptionBreakpoint notifyTargetOfFilters javaTarget
see I Java Breakpoint Listener adding Breakpoint I Java Debug Target I Java Breakpoint public void adding Breakpoint I Java Debug Target target I Java Breakpoint breakpoint  IJavaBreakpointListener addingBreakpoint IJavaDebugTarget IJavaBreakpoint addingBreakpoint IJavaDebugTarget IJavaBreakpoint
see I Java Breakpoint Listener installing Breakpoint I Java Debug Target I Java Breakpoint I Java Type public int installing Breakpoint I Java Debug Target target I Java Breakpoint breakpoint I Java Type type return DONT CARE  IJavaBreakpointListener installingBreakpoint IJavaDebugTarget IJavaBreakpoint IJavaType installingBreakpoint IJavaDebugTarget IJavaBreakpoint IJavaType DONT_CARE
see I Java Breakpoint Listener breakpoint Hit I Java Thread I Java Breakpoint public int breakpoint Hit I Java Thread thread I Java Breakpoint breakpoint if breakpoint get Suspend On Compilation Error Breakpoint return get Problem thread null SUSPEND DONT SUSPEND if breakpoint get Suspend On Uncaught Exception Breakpoint the uncaught exceptions breakpoint subsumes the compilation error breakpoint since Throwable is a supertype of Error Thus if there is actually a compilation error here but the option to suspend on compilation errors is off we should resume i e do not suspend if is Suspend On Compilation Errors get Problem thread null return DONT SUSPEND return SUSPEND return DONT CARE  IJavaBreakpointListener breakpointHit IJavaThread IJavaBreakpoint breakpointHit IJavaThread IJavaBreakpoint getSuspendOnCompilationErrorBreakpoint getProblem DONT_SUSPEND getSuspendOnUncaughtExceptionBreakpoint isSuspendOnCompilationErrors getProblem DONT_SUSPEND DONT_CARE
private I Marker get Problem I Java Thread thread try I Java Stack Frame frame I Java Stack Frame thread get Top Stack Frame if frame null return get Problem frame catch Debug Exception e JDI DebugUI Plugin log e return null  IMarker getProblem IJavaThread IJavaStackFrame IJavaStackFrame getTopStackFrame getProblem DebugException JDIDebugUIPlugin
see I Java Breakpoint Listener breakpoint Installed I Java Debug Target I Java Breakpoint public void breakpoint Installed I Java Debug Target target I Java Breakpoint breakpoint  IJavaBreakpointListener breakpointInstalled IJavaDebugTarget IJavaBreakpoint breakpointInstalled IJavaDebugTarget IJavaBreakpoint
see I Java Breakpoint Listener breakpoint Removed I Java Debug Target I Java Breakpoint public void breakpoint Removed I Java Debug Target target I Java Breakpoint breakpoint  IJavaBreakpointListener breakpointRemoved IJavaDebugTarget IJavaBreakpoint breakpointRemoved IJavaDebugTarget IJavaBreakpoint
Returns any problem marker associated with the current location of the given stack frame or code null code if none param frame stack frame return marker representing compilation problem or code null code protected I Marker get Problem I Java Stack Frame frame try String name frame get Source Name String package Name frame get Declaring Type Name int index package Name last Index Of if index 1 if name null guess at source name if no debug attribute name package Name int dollar name index Of if dollar 0 name name substring 0 dollar name java NON NLS 1 package Name NON NLS 1 else if name null name package Name substring index 1 int dollar name index Of if dollar 0 name name substring 0 dollar name java NON NLS 1 package Name package Name substring 0 index int line frame get Line Number Location l new Location package Name name line return I Marker f Location Map get l catch Debug Exception e JDI DebugUI Plugin log e return null  IMarker getProblem IJavaStackFrame getSourceName packageName getDeclaringTypeName packageName lastIndexOf packageName indexOf packageName packageName indexOf packageName packageName getLineNumber packageName IMarker fLocationMap DebugException JDIDebugUIPlugin
public void breakpoint Has Runtime Exception final I Java Line Breakpoint breakpoint final Debug Exception exception I Status status Throwable wrapped Exception exception get Status get Exception if wrapped Exception instanceof Invocation Exception Invocation Exception ie Invocation Exception wrapped Exception Object Reference ref ie exception status new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Status ERROR ref reference Type name null else status exception get Status open Condition Error Dialog breakpoint DebugUI Messages get String Java Debug Options Manager Conditional breakpoint encountered runtime exception  1 status NON NLS 1  breakpointHasRuntimeException IJavaLineBreakpoint DebugException IStatus wrappedException getStatus getException wrappedException InvocationException InvocationException InvocationException wrappedException ObjectReference IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus referenceType getStatus openConditionErrorDialog DebugUIMessages getString JavaDebugOptionsManager Conditional_breakpoint_encountered_runtime_exception _1
public void breakpoint Has Compilation Errors final I Java Line Breakpoint breakpoint final Message errors String Buffer message new String Buffer Message error for int i 0 num Errors errors length i num Errors i error errors i message append error get Message message append n NON NLS 1 I Status status new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Status ERROR message to String null open Condition Error Dialog breakpoint DebugUI Messages get String Java Debug Options Manager Conditional breakpoint has compilation error s  2 status NON NLS 1  breakpointHasCompilationErrors IJavaLineBreakpoint StringBuffer StringBuffer numErrors numErrors getMessage IStatus IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus toString openConditionErrorDialog DebugUIMessages getString JavaDebugOptionsManager Conditional_breakpoint_has_compilation_error _2
display async Exec new Runnable public void run if display is Disposed return Shell shell JDI DebugUI Plugin get Active Workbench Shell Conditional Breakpoint Error Dialog dialog new Conditional Breakpoint Error Dialog shell message status int result dialog open if result Window OK Java Breakpoint Properties Action action new Java Breakpoint Properties Action action selection Changed null new Structured Selection breakpoint action run null  asyncExec isDisposed JDIDebugUIPlugin getActiveWorkbenchShell ConditionalBreakpointErrorDialog ConditionalBreakpointErrorDialog JavaBreakpointPropertiesAction JavaBreakpointPropertiesAction selectionChanged StructuredSelection
private void open Condition Error Dialog final I Java Line Breakpoint breakpoint final String error Message final I Status status final Display display JDI DebugUI Plugin get Standard Display if display is Disposed return final String message Message Format format error Message new String f Label Provider get Text breakpoint display async Exec new Runnable public void run if display is Disposed return Shell shell JDI DebugUI Plugin get Active Workbench Shell Conditional Breakpoint Error Dialog dialog new Conditional Breakpoint Error Dialog shell message status int result dialog open if result Window OK Java Breakpoint Properties Action action new Java Breakpoint Properties Action action selection Changed null new Structured Selection breakpoint action run null  openConditionErrorDialog IJavaLineBreakpoint errorMessage IStatus JDIDebugUIPlugin getStandardDisplay isDisposed MessageFormat errorMessage fLabelProvider getText asyncExec isDisposed JDIDebugUIPlugin getActiveWorkbenchShell ConditionalBreakpointErrorDialog ConditionalBreakpointErrorDialog JavaBreakpointPropertiesAction JavaBreakpointPropertiesAction selectionChanged StructuredSelection
Activates this debug options manager When active this manager becomes a listener to many notifications and updates running debug targets based on these notifications A debug options manager does not need to be activated until there is a running debug target private void activate if f Activated return f Activated true initialize Problem Handling notify Targets Of Filters Debug Plugin get Default add Debug Event Listener this Resources Plugin get Workspace add Resource Change Listener this I Resource Change Event POST BUILD JDI Debug Model add Java Breakpoint Listener this  fActivated fActivated initializeProblemHandling notifyTargetsOfFilters DebugPlugin getDefault addDebugEventListener ResourcesPlugin getWorkspace addResourceChangeListener IResourceChangeEvent POST_BUILD JDIDebugModel addJavaBreakpointListener
Startup problem handling on the first launch see I Launch Listener launch Added I Launch public void launch Added I Launch launch launch Changed launch  ILaunchListener launchAdded ILaunch launchAdded ILaunch launchChanged
see I Launch Listener launch Changed I Launch public void launch Changed I Launch launch activate Debug Plugin get Default get Launch Manager remove Launch Listener this  ILaunchListener launchChanged ILaunch launchChanged ILaunch DebugPlugin getDefault getLaunchManager removeLaunchListener
see I Launch Listener launch Removed I Launch public void launch Removed I Launch launch  ILaunchListener launchRemoved ILaunch launchRemoved ILaunch
Adds message attributes to java breakpoints see org eclipse debug core I Breakpoints Listener breakpoints Added org eclipse debug core model I Breakpoint public void breakpoints Added final I Breakpoint breakpoints if a breakpoint is added but already has a message do not update it List update new Array List for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i try if breakpoint instanceof I Java Breakpoint breakpoint get Marker get Attribute I Marker MESSAGE null update add breakpoint catch Core Exception e JDI DebugUI Plugin log e if update is Empty update Breakpoint Messages I Breakpoint update to Array new I Breakpoint update size  IBreakpointsListener breakpointsAdded IBreakpoint breakpointsAdded IBreakpoint ArrayList IBreakpoint IJavaBreakpoint getMarker getAttribute IMarker CoreException JDIDebugUIPlugin isEmpty updateBreakpointMessages IBreakpoint toArray IBreakpoint
I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if breakpoint instanceof I Java Breakpoint String info f Label Provider get Text breakpoint String type DebugUI Messages get String Java Debug Options Manager Breakpoint   1 NON NLS 1 if breakpoint instanceof I Java Method Breakpoint breakpoint instanceof I Java Method Entry Breakpoint type DebugUI Messages get String Java Debug Options Manager Method breakpoint   2 NON NLS 1 else if breakpoint instanceof I Java Watchpoint type DebugUI Messages get String Java Debug Options Manager Watchpoint   3 NON NLS 1 else if breakpoint instanceof I Java Line Breakpoint type DebugUI Messages get String Java Debug Options Manager Line breakpoint   4 NON NLS 1 breakpoint get Marker set Attribute I Marker MESSAGE type info  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException IBreakpoint IJavaBreakpoint fLabelProvider getText DebugUIMessages getString JavaDebugOptionsManager Breakpoint___1 IJavaMethodBreakpoint IJavaMethodEntryBreakpoint DebugUIMessages getString JavaDebugOptionsManager Method_breakpoint___2 IJavaWatchpoint DebugUIMessages getString JavaDebugOptionsManager Watchpoint___3 IJavaLineBreakpoint DebugUIMessages getString JavaDebugOptionsManager Line_breakpoint___4 getMarker setAttribute IMarker
Updates message attributes on the given java breakpoints see org eclipse debug core I Breakpoints Listener breakpoints Added org eclipse debug core model I Breakpoint private void update Breakpoint Messages final I Breakpoint breakpoints I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i if breakpoint instanceof I Java Breakpoint String info f Label Provider get Text breakpoint String type DebugUI Messages get String Java Debug Options Manager Breakpoint   1 NON NLS 1 if breakpoint instanceof I Java Method Breakpoint breakpoint instanceof I Java Method Entry Breakpoint type DebugUI Messages get String Java Debug Options Manager Method breakpoint   2 NON NLS 1 else if breakpoint instanceof I Java Watchpoint type DebugUI Messages get String Java Debug Options Manager Watchpoint   3 NON NLS 1 else if breakpoint instanceof I Java Line Breakpoint type DebugUI Messages get String Java Debug Options Manager Line breakpoint   4 NON NLS 1 breakpoint get Marker set Attribute I Marker MESSAGE type info try Resources Plugin get Workspace run runnable null 0 null catch Core Exception e JDI DebugUI Plugin log e  IBreakpointsListener breakpointsAdded IBreakpoint updateBreakpointMessages IBreakpoint IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException IBreakpoint IJavaBreakpoint fLabelProvider getText DebugUIMessages getString JavaDebugOptionsManager Breakpoint___1 IJavaMethodBreakpoint IJavaMethodEntryBreakpoint DebugUIMessages getString JavaDebugOptionsManager Method_breakpoint___2 IJavaWatchpoint DebugUIMessages getString JavaDebugOptionsManager Watchpoint___3 IJavaLineBreakpoint DebugUIMessages getString JavaDebugOptionsManager Line_breakpoint___4 getMarker setAttribute IMarker ResourcesPlugin getWorkspace CoreException JDIDebugUIPlugin
Updates message attributes on java breakpoints see org eclipse debug core I Breakpoints Listener breakpoints Changed org eclipse debug core model I Breakpoint org eclipse core resources I Marker Delta public void breakpoints Changed I Breakpoint breakpoints I Marker Delta deltas update Breakpoint Messages breakpoints  IBreakpointsListener breakpointsChanged IBreakpoint IMarkerDelta breakpointsChanged IBreakpoint IMarkerDelta updateBreakpointMessages
see org eclipse debug core I Breakpoints Listener breakpoints Removed org eclipse debug core model I Breakpoint org eclipse core resources I Marker Delta public void breakpoints Removed I Breakpoint breakpoints I Marker Delta deltas  IBreakpointsListener breakpointsRemoved IBreakpoint IMarkerDelta breakpointsRemoved IBreakpoint IMarkerDelta

protected class Java Debug Integer Field Editor extends Integer Field Editor public Java Debug Integer Field Editor String name String label Text Composite parent super name label Text parent  JavaDebugIntegerFieldEditor IntegerFieldEditor JavaDebugIntegerFieldEditor labelText labelText
see org eclipse jface preference Field Editor refresh Valid State protected void refresh Valid State super refresh Valid State  FieldEditor refreshValidState refreshValidState refreshValidState
Clears the error message from the message line if the error message is the error message from this field editor protected void clear Error Message if can Clear Error Message super clear Error Message  clearErrorMessage canClearErrorMessage clearErrorMessage
public Java Debug Preference Page super set Preference Store JDI DebugUI Plugin get Default get Preference Store set Description DebugUI Messages get String Java Debug Preference Page description NON NLS 1  JavaDebugPreferencePage setPreferenceStore JDIDebugUIPlugin getDefault getPreferenceStore setDescription DebugUIMessages getString JavaDebugPreferencePage
see Preference Page create Contents Composite protected Control create Contents Composite parent Workbench Help set Help get Control I Java Debug Help Context Ids JAVA DEBUG PREFERENCE PAGE Font font parent get Font The main composite Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 1 layout margin Height 0 layout margin Width 0 composite set Layout layout Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL composite set Layout Data data composite set Font font Composite comp create Group Composite composite 1 DebugUI Messages get String Java Debug Preference Page Suspend Execution 1 NON NLS 1 f Suspend Button create Check Button comp DebugUI Messages get String Java Debug Preference Page Suspend  execution on uncaught exceptions 1 NON NLS 1 f Suspend On Compilation Errors create Check Button comp DebugUI Messages get String Java Debug Preference Page Suspend execution on co mpilation errors 1 NON NLS 1 f Suspend During Evaluations create Check Button comp DebugUI Messages get String Java Debug Preference Page 14 NON NLS 1 create Spacer composite 1 comp create Group Composite composite 1 DebugUI Messages get String Java Debug Preference Page Hot Code Replace 2 NON NLS 1 f AlertHCR Button create Check Button comp DebugUI Messages get String Java Debug Preference Page Alert me when hot code replace fails 1 NON NLS 1 f AlertHCR Not Supported Button create Check Button comp DebugUI Messages get String Java Debug Preference Page Alert me when hot code replace is not supported 1 NON NLS 1 f Alert Obsolete Button create Check Button comp DebugUI Messages get String Java Debug Preference Page Alert me when obsolete methods remain 1 NON NLS 1 f PerformHCR With Compilation Errors create Check Button comp DebugUI Messages get String Java Debug Preference Page Replace classfiles containing compilation errors 1 NON NLS 1 create Spacer composite 1 f Prompt Unable To Install Breakpoint create Check Button composite DebugUI Messages get String Java Debug Preference Page 19 NON NLS 1 create Spacer composite 1 comp create Group Composite composite 1 DebugUI Messages get String Java Debug Preference Page Communication 1 NON NLS 1 Add in an intermediate composite to allow for spacing Composite spacing Composite new Composite comp SWT NONE layout new Grid Layout spacing Composite set Layout layout data new Grid Data Grid Data GRAB HORIZONTAL Grid Data FILL HORIZONTAL data horizontal Span 2 spacing Composite set Layout Data data spacing Composite set Font font I Preference Store store JDI DebugUI Plugin get Default get Preference Store int min Value f Timeout Text new Java Debug Integer Field Editor JDI Debug Model PREF REQUEST TIMEOUT DebugUI Messages get String Java Debug Preference Page Debugger  timeout  2 spacing Composite NON NLS 1 f Timeout Text set Preference Store store f Timeout Text set Preference Page this f Timeout Text set Validate Strategy String Field Editor VALIDATE ON KEY STROKE min Value store get Default Int JDI Debug Model PREF REQUEST TIMEOUT f Timeout Text set Valid Range min Value Integer MAX VALUE f Timeout Text set Error Message Message Format format DebugUI Messages get String Java Debug Preference Page Value must be a valid integer greater than  0  ms 1 new Object new Integer min Value NON NLS 1 f Timeout Text load f Timeout Text set Property Change Listener this f Connection Timeout Text new Java Debug Integer Field Editor Java Runtime PREF CONNECT TIMEOUT DebugUI Messages get String Java Debug Preference Page Launch timeout  ms   1 spacing Composite NON NLS 1 f Connection Timeout Text set Preference Store store f Connection Timeout Text set Preference Page this f Connection Timeout Text set Validate Strategy String Field Editor VALIDATE ON KEY STROKE min Value store get Default Int Java Runtime PREF CONNECT TIMEOUT f Connection Timeout Text set Valid Range min Value Integer MAX VALUE f Connection Timeout Text set Error Message Message Format format DebugUI Messages get String Java Debug Preference Page Value must be a valid integer greater than  0  ms 1 new Object new Integer min Value NON NLS 1 f Connection Timeout Text load f Connection Timeout Text set Property Change Listener this cannot set preference store as it is a core preference set Values apply Dialog Font composite return composite  PreferencePage createContents createContents WorkbenchHelp setHelp getControl IJavaDebugHelpContextIds JAVA_DEBUG_PREFERENCE_PAGE getFont GridLayout GridLayout numColumns marginHeight marginWidth setLayout GridData GridData verticalAlignment GridData horizontalAlignment GridData setLayoutData setFont createGroupComposite DebugUIMessages getString JavaDebugPreferencePage Suspend_Execution_1 fSuspendButton createCheckButton DebugUIMessages getString JavaDebugPreferencePage Suspend_ execution_on_uncaught_exceptions_1 fSuspendOnCompilationErrors createCheckButton DebugUIMessages getString JavaDebugPreferencePage Suspend_execution_on_co mpilation_errors_1 fSuspendDuringEvaluations createCheckButton DebugUIMessages getString JavaDebugPreferencePage createSpacer createGroupComposite DebugUIMessages getString JavaDebugPreferencePage Hot_Code_Replace_2 fAlertHCRButton createCheckButton DebugUIMessages getString JavaDebugPreferencePage Alert_me_when_hot_code_replace_fails_1 fAlertHCRNotSupportedButton createCheckButton DebugUIMessages getString JavaDebugPreferencePage Alert_me_when_hot_code_replace_is_not_supported_1 fAlertObsoleteButton createCheckButton DebugUIMessages getString JavaDebugPreferencePage Alert_me_when_obsolete_methods_remain_1 fPerformHCRWithCompilationErrors createCheckButton DebugUIMessages getString JavaDebugPreferencePage Replace_classfiles_containing_compilation_errors_1 createSpacer fPromptUnableToInstallBreakpoint createCheckButton DebugUIMessages getString JavaDebugPreferencePage createSpacer createGroupComposite DebugUIMessages getString JavaDebugPreferencePage Communication_1 spacingComposite GridLayout spacingComposite setLayout GridData GridData GRAB_HORIZONTAL GridData FILL_HORIZONTAL horizontalSpan spacingComposite setLayoutData spacingComposite setFont IPreferenceStore JDIDebugUIPlugin getDefault getPreferenceStore minValue fTimeoutText JavaDebugIntegerFieldEditor JDIDebugModel PREF_REQUEST_TIMEOUT DebugUIMessages getString JavaDebugPreferencePage Debugger_ timeout__2 spacingComposite fTimeoutText setPreferenceStore fTimeoutText setPreferencePage fTimeoutText setValidateStrategy StringFieldEditor VALIDATE_ON_KEY_STROKE minValue getDefaultInt JDIDebugModel PREF_REQUEST_TIMEOUT fTimeoutText setValidRange minValue MAX_VALUE fTimeoutText setErrorMessage MessageFormat DebugUIMessages getString JavaDebugPreferencePage Value_must_be_a_valid_integer_greater_than_ _ms_1 minValue fTimeoutText fTimeoutText setPropertyChangeListener fConnectionTimeoutText JavaDebugIntegerFieldEditor JavaRuntime PREF_CONNECT_TIMEOUT DebugUIMessages getString JavaDebugPreferencePage Launch_timeout_ __1 spacingComposite fConnectionTimeoutText setPreferenceStore fConnectionTimeoutText setPreferencePage fConnectionTimeoutText setValidateStrategy StringFieldEditor VALIDATE_ON_KEY_STROKE minValue getDefaultInt JavaRuntime PREF_CONNECT_TIMEOUT fConnectionTimeoutText setValidRange minValue MAX_VALUE fConnectionTimeoutText setErrorMessage MessageFormat DebugUIMessages getString JavaDebugPreferencePage Value_must_be_a_valid_integer_greater_than_ _ms_1 minValue fConnectionTimeoutText fConnectionTimeoutText setPropertyChangeListener setValues applyDialogFont
see I Workbench Preference Page init I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
see org eclipse jface preference I Preference Page perform Ok Also notifies interested listeners public boolean perform Ok store Values JDI DebugUI Plugin get Default save Plugin Preferences JDI Debug Model save Preferences Java Runtime save Preferences return true  IPreferencePage performOk performOk storeValues JDIDebugUIPlugin getDefault savePluginPreferences JDIDebugModel savePreferences JavaRuntime savePreferences
Sets the default preferences see Preference Page perform Defaults protected void perform Defaults set Default Values super perform Defaults  PreferencePage performDefaults performDefaults setDefaultValues performDefaults
private void set Default Values I Preference Store store get Preference Store Preferences core Store JDI Debug Model get Preferences Preferences runtime Store Java Runtime get Preferences f Suspend Button set Selection store get Default Boolean IJDI Preferences Constants PREF SUSPEND ON UNCAUGHT EXCEPTIONS f Suspend On Compilation Errors set Selection store get Default Boolean IJDI Preferences Constants PREF SUSPEND ON COMPILATION ERRORS f Suspend During Evaluations set Selection core Store get Default Boolean JDI Debug Model PREF SUSPEND FOR BREAKPOINTS DURING EVALUATION f AlertHCR Button set Selection store get Default Boolean IJDI Preferences Constants PREF ALERT HCR FAILED f AlertHCR Not Supported Button set Selection store get Default Boolean IJDI Preferences Constants PREF ALERT HCR NOT SUPPORTED f Alert Obsolete Button set Selection store get Default Boolean IJDI Preferences Constants PREF ALERT OBSOLETE METHODS f PerformHCR With Compilation Errors set Selection core Store get Default Boolean JDI Debug Model PREF HCR WITH COMPILATION ERRORS f Timeout Text set String Value new Integer core Store get Default Int JDI Debug Model PREF REQUEST TIMEOUT to String f Connection Timeout Text set String Value new Integer runtime Store get Default Int Java Runtime PREF CONNECT TIMEOUT to String f Prompt Unable To Install Breakpoint set Selection store get Default Boolean IJDI Preferences Constants PREF ALERT UNABLE TO INSTALL BREAKPOINT  setDefaultValues IPreferenceStore getPreferenceStore coreStore JDIDebugModel getPreferences runtimeStore JavaRuntime getPreferences fSuspendButton setSelection getDefaultBoolean IJDIPreferencesConstants PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS fSuspendOnCompilationErrors setSelection getDefaultBoolean IJDIPreferencesConstants PREF_SUSPEND_ON_COMPILATION_ERRORS fSuspendDuringEvaluations setSelection coreStore getDefaultBoolean JDIDebugModel PREF_SUSPEND_FOR_BREAKPOINTS_DURING_EVALUATION fAlertHCRButton setSelection getDefaultBoolean IJDIPreferencesConstants PREF_ALERT_HCR_FAILED fAlertHCRNotSupportedButton setSelection getDefaultBoolean IJDIPreferencesConstants PREF_ALERT_HCR_NOT_SUPPORTED fAlertObsoleteButton setSelection getDefaultBoolean IJDIPreferencesConstants PREF_ALERT_OBSOLETE_METHODS fPerformHCRWithCompilationErrors setSelection coreStore getDefaultBoolean JDIDebugModel PREF_HCR_WITH_COMPILATION_ERRORS fTimeoutText setStringValue coreStore getDefaultInt JDIDebugModel PREF_REQUEST_TIMEOUT toString fConnectionTimeoutText setStringValue runtimeStore getDefaultInt JavaRuntime PREF_CONNECT_TIMEOUT toString fPromptUnableToInstallBreakpoint setSelection getDefaultBoolean IJDIPreferencesConstants PREF_ALERT_UNABLE_TO_INSTALL_BREAKPOINT
Creates a button with the given label and sets the default configuration data private Button create Check Button Composite parent String label Button button new Button parent SWT CHECK SWT LEFT button set Text label Field Editor Grid Data Grid Data data new Grid Data button set Layout Data data button set Font parent get Font return button  createCheckButton setText FieldEditor GridData GridData GridData setLayoutData setFont getFont
Creates composite group and sets the default layout data param parent the parent of the new composite param num Columns the number of columns for the new composite param label Text the text label of the new composite return the newly created composite private Composite create Group Composite Composite parent int num Columns String label Text Group comp new Group parent SWT NONE Grid Layout Grid Layout layout new Grid Layout layout num Columns num Columns comp set Layout layout Grid Data Grid Data gd new Grid Data gd vertical Alignment Grid Data FILL gd horizontal Alignment Grid Data FILL comp set Layout Data gd comp set Text label Text comp set Font parent get Font return comp  numColumns labelText createGroupComposite numColumns labelText GridLayout GridLayout GridLayout numColumns numColumns setLayout GridData GridData GridData verticalAlignment GridData horizontalAlignment GridData setLayoutData setText labelText setFont getFont
Set the values of the component widgets based on the values in the preference store private void set Values I Preference Store store get Preference Store Preferences core Store JDI Debug Model get Preferences Preferences runtime Store Java Runtime get Preferences f Suspend Button set Selection store get Boolean IJDI Preferences Constants PREF SUSPEND ON UNCAUGHT EXCEPTIONS f Suspend On Compilation Errors set Selection store get Boolean IJDI Preferences Constants PREF SUSPEND ON COMPILATION ERRORS f Suspend During Evaluations set Selection core Store get Boolean JDI Debug Model PREF SUSPEND FOR BREAKPOINTS DURING EVALUATION f AlertHCR Button set Selection store get Boolean IJDI Preferences Constants PREF ALERT HCR FAILED f AlertHCR Not Supported Button set Selection store get Boolean IJDI Preferences Constants PREF ALERT HCR NOT SUPPORTED f Alert Obsolete Button set Selection store get Boolean IJDI Preferences Constants PREF ALERT OBSOLETE METHODS f PerformHCR With Compilation Errors set Selection core Store get Boolean JDI Debug Model PREF HCR WITH COMPILATION ERRORS f Timeout Text set String Value new Integer core Store get Int JDI Debug Model PREF REQUEST TIMEOUT to String f Connection Timeout Text set String Value new Integer runtime Store get Int Java Runtime PREF CONNECT TIMEOUT to String f Prompt Unable To Install Breakpoint set Selection store get Boolean IJDI Preferences Constants PREF ALERT UNABLE TO INSTALL BREAKPOINT  setValues IPreferenceStore getPreferenceStore coreStore JDIDebugModel getPreferences runtimeStore JavaRuntime getPreferences fSuspendButton setSelection getBoolean IJDIPreferencesConstants PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS fSuspendOnCompilationErrors setSelection getBoolean IJDIPreferencesConstants PREF_SUSPEND_ON_COMPILATION_ERRORS fSuspendDuringEvaluations setSelection coreStore getBoolean JDIDebugModel PREF_SUSPEND_FOR_BREAKPOINTS_DURING_EVALUATION fAlertHCRButton setSelection getBoolean IJDIPreferencesConstants PREF_ALERT_HCR_FAILED fAlertHCRNotSupportedButton setSelection getBoolean IJDIPreferencesConstants PREF_ALERT_HCR_NOT_SUPPORTED fAlertObsoleteButton setSelection getBoolean IJDIPreferencesConstants PREF_ALERT_OBSOLETE_METHODS fPerformHCRWithCompilationErrors setSelection coreStore getBoolean JDIDebugModel PREF_HCR_WITH_COMPILATION_ERRORS fTimeoutText setStringValue coreStore getInt JDIDebugModel PREF_REQUEST_TIMEOUT toString fConnectionTimeoutText setStringValue runtimeStore getInt JavaRuntime PREF_CONNECT_TIMEOUT toString fPromptUnableToInstallBreakpoint setSelection getBoolean IJDIPreferencesConstants PREF_ALERT_UNABLE_TO_INSTALL_BREAKPOINT
Store the preference values based on the state of the component widgets private void store Values I Preference Store store get Preference Store Preferences core Store JDI Debug Model get Preferences Preferences runtime Store Java Runtime get Preferences store set Value IJDI Preferences Constants PREF SUSPEND ON UNCAUGHT EXCEPTIONS f Suspend Button get Selection store set Value IJDI Preferences Constants PREF SUSPEND ON COMPILATION ERRORS f Suspend On Compilation Errors get Selection core Store set Value JDI Debug Model PREF SUSPEND FOR BREAKPOINTS DURING EVALUATION f Suspend During Evaluations get Selection store set Value IJDI Preferences Constants PREF ALERT HCR FAILED f AlertHCR Button get Selection store set Value IJDI Preferences Constants PREF ALERT HCR NOT SUPPORTED f AlertHCR Not Supported Button get Selection store set Value IJDI Preferences Constants PREF ALERT OBSOLETE METHODS f Alert Obsolete Button get Selection core Store set Value JDI Debug Model PREF HCR WITH COMPILATION ERRORS f PerformHCR With Compilation Errors get Selection core Store set Value JDI Debug Model PREF REQUEST TIMEOUT f Timeout Text get Int Value runtime Store set Value Java Runtime PREF CONNECT TIMEOUT f Connection Timeout Text get Int Value store set Value IJDI Preferences Constants PREF ALERT UNABLE TO INSTALL BREAKPOINT f Prompt Unable To Install Breakpoint get Selection  storeValues IPreferenceStore getPreferenceStore coreStore JDIDebugModel getPreferences runtimeStore JavaRuntime getPreferences setValue IJDIPreferencesConstants PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS fSuspendButton getSelection setValue IJDIPreferencesConstants PREF_SUSPEND_ON_COMPILATION_ERRORS fSuspendOnCompilationErrors getSelection coreStore setValue JDIDebugModel PREF_SUSPEND_FOR_BREAKPOINTS_DURING_EVALUATION fSuspendDuringEvaluations getSelection setValue IJDIPreferencesConstants PREF_ALERT_HCR_FAILED fAlertHCRButton getSelection setValue IJDIPreferencesConstants PREF_ALERT_HCR_NOT_SUPPORTED fAlertHCRNotSupportedButton getSelection setValue IJDIPreferencesConstants PREF_ALERT_OBSOLETE_METHODS fAlertObsoleteButton getSelection coreStore setValue JDIDebugModel PREF_HCR_WITH_COMPILATION_ERRORS fPerformHCRWithCompilationErrors getSelection coreStore setValue JDIDebugModel PREF_REQUEST_TIMEOUT fTimeoutText getIntValue runtimeStore setValue JavaRuntime PREF_CONNECT_TIMEOUT fConnectionTimeoutText getIntValue setValue IJDIPreferencesConstants PREF_ALERT_UNABLE_TO_INSTALL_BREAKPOINT fPromptUnableToInstallBreakpoint getSelection
protected void create Spacer Composite composite int column Span Label label new Label composite SWT NONE Grid Data gd new Grid Data gd horizontal Span column Span label set Layout Data gd  createSpacer columnSpan GridData GridData horizontalSpan columnSpan setLayoutData
see org eclipse jface util I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event if event get Property equals Field Editor IS VALID boolean new Value Boolean event get New Value boolean Value If the new value is true then we must check all field editors If it is false then the page is invalid in any case if new Value if f Timeout Text null event get Source f Timeout Text f Timeout Text refresh Valid State if f Connection Timeout Text null event get Source f Connection Timeout Text f Connection Timeout Text refresh Valid State set Valid f Timeout Text is Valid f Connection Timeout Text is Valid get Container update Buttons update Apply Button  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent getProperty FieldEditor IS_VALID newValue getNewValue booleanValue newValue fTimeoutText getSource fTimeoutText fTimeoutText refreshValidState fConnectionTimeoutText getSource fConnectionTimeoutText fConnectionTimeoutText refreshValidState setValid fTimeoutText isValid fConnectionTimeoutText isValid getContainer updateButtons updateApplyButton
protected boolean can Clear Error Message if f Timeout Text is Valid f Connection Timeout Text is Valid return true return false  canClearErrorMessage fTimeoutText isValid fConnectionTimeoutText isValid

Return the default detail formatters manager return default detail formatters manager static public Java Detail Formatters Manager get Default if fg Default null fg Default new Java Detail Formatters Manager return fg Default  JavaDetailFormattersManager getDefault fgDefault fgDefault JavaDetailFormattersManager fgDefault
Java Detail Formatters Manager constructor private Java Detail Formatters Manager populate Detail Formatters Map JDI DebugUI Plugin get Default get Preference Store add Property Change Listener this Debug Plugin get Default get Launch Manager add Launch Listener this Debug Plugin get Default add Debug Event Listener this f Cache Map new Hash Map  JavaDetailFormattersManager JavaDetailFormattersManager populateDetailFormattersMap JDIDebugUIPlugin getDefault getPreferenceStore addPropertyChangeListener DebugPlugin getDefault getLaunchManager addLaunchListener DebugPlugin getDefault addDebugEventListener fCacheMap HashMap
Populate the detail formatters map with data from preferences private void populate Detail Formatters Map String detail Formatters List Java Debug Options Manager parse List JDI DebugUI Plugin get Default get Preference Store get String IJDI Preferences Constants PREF DETAIL FORMATTERS LIST f Detail Formatters Map new Hash Map detail Formatters List length 3 for int i 0 length detail Formatters List length i length String type Name detail Formatters List i String snippet detail Formatters List i replace u0000 boolean enabled Java Detail Formatters Preference Page DETAIL FORMATTER IS DISABLED equals detail Formatters List i f Detail Formatters Map put type Name new Detail Formatter type Name snippet enabled  populateDetailFormattersMap detailFormattersList JavaDebugOptionsManager parseList JDIDebugUIPlugin getDefault getPreferenceStore getString IJDIPreferencesConstants PREF_DETAIL_FORMATTERS_LIST fDetailFormattersMap HashMap detailFormattersList detailFormattersList typeName detailFormattersList detailFormattersList JavaDetailFormattersPreferencePage DETAIL_FORMATTER_IS_DISABLED detailFormattersList fDetailFormattersMap typeName DetailFormatter typeName
else thread queue Runnable new Runnable public void run resolve Formatter object Value thread listener  queueRunnable resolveFormatter objectValue
Runnable post Event Process new Runnable public void run if thread is Performing Evaluation thread is Suspended listener detail Computed object Value DebugUI Messages get String Java Detail Formatters Manager 9 NON NLS 1 else thread queue Runnable new Runnable public void run resolve Formatter object Value thread listener  postEventProcess isPerformingEvaluation isSuspended detailComputed objectValue DebugUIMessages getString JavaDetailFormattersManager queueRunnable resolveFormatter objectValue
Runnable post Event Dispatch new Runnable public void run Runnable post Event Process new Runnable public void run if thread is Performing Evaluation thread is Suspended listener detail Computed object Value DebugUI Messages get String Java Detail Formatters Manager 9 NON NLS 1 else thread queue Runnable new Runnable public void run resolve Formatter object Value thread listener JDI DebugUI Plugin get Standard Display async Exec post Event Process  postEventDispatch postEventProcess isPerformingEvaluation isSuspended detailComputed objectValue DebugUIMessages getString JavaDetailFormattersManager queueRunnable resolveFormatter objectValue JDIDebugUIPlugin getStandardDisplay asyncExec postEventProcess
Compute asynchronously the to String of the given value If a formatter is associated to the type of the given value this formatter is used instead of the code to String code method The result is return through the listener param object Value the value to format param thread the thread to use to performed the evaluation param listener the listener public void compute Value Detail final I Java Value object Value final I Java Thread thread final I Value Detail Listener listener Runnable post Event Dispatch new Runnable public void run Runnable post Event Process new Runnable public void run if thread is Performing Evaluation thread is Suspended listener detail Computed object Value DebugUI Messages get String Java Detail Formatters Manager 9 NON NLS 1 else thread queue Runnable new Runnable public void run resolve Formatter object Value thread listener JDI DebugUI Plugin get Standard Display async Exec post Event Process Debug Plugin get Default async Exec post Event Dispatch  toString toString objectValue computeValueDetail IJavaValue objectValue IJavaThread IValueDetailListener postEventDispatch postEventProcess isPerformingEvaluation isSuspended detailComputed objectValue DebugUIMessages getString JavaDetailFormattersManager queueRunnable resolveFormatter objectValue JDIDebugUIPlugin getStandardDisplay asyncExec postEventProcess DebugPlugin getDefault asyncExec postEventDispatch
private void resolve Formatter final I Java Value value final I Java Thread thread final I Value Detail Listener listener I Compiled Expression compiled Expression null Evaluation Listener evaluation Listener new Evaluation Listener value thread listener if value instanceof I Java Object value instanceof I Java Array I Java Object object Value I Java Object value I Java Project project get Java Project thread if project null get the evaluation engine JDI Debug Target debug Target JDI Debug Target thread get Debug Target I Ast Evaluation Engine evaluation Engine JDI DebugUI Plugin get Default get Evaluation Engine project debug Target get the compiled expression to use try compiled Expression get Compiled Expression object Value debug Target evaluation Engine if compiled Expression null evaluation Engine evaluate Expression compiled Expression object Value thread evaluation Listener Debug Event EVALUATION IMPLICIT false return catch Debug Exception e DebugUI Plugin log e return try evaluation Listener value To String value catch Debug Exception e listener detail Computed value e get Status get Message  resolveFormatter IJavaValue IJavaThread IValueDetailListener ICompiledExpression compiledExpression EvaluationListener evaluationListener EvaluationListener IJavaObject IJavaArray IJavaObject objectValue IJavaObject IJavaProject getJavaProject JDIDebugTarget debugTarget JDIDebugTarget getDebugTarget IAstEvaluationEngine evaluationEngine JDIDebugUIPlugin getDefault getEvaluationEngine debugTarget compiledExpression getCompiledExpression objectValue debugTarget evaluationEngine compiledExpression evaluationEngine evaluateExpression compiledExpression objectValue evaluationListener DebugEvent EVALUATION_IMPLICIT DebugException DebugUIPlugin evaluationListener valueToString DebugException detailComputed getStatus getMessage
private I Java Project get Java Project I Java Thread thread I Launch launch thread get Launch if launch null return null I Source Locator locator launch get Source Locator if locator null return null Object source Element try I Stack Frame frame thread get Top Stack Frame if frame null return null source Element locator get Source Element frame catch Debug Exception e DebugUI Plugin log e return null if source Element instanceof I Java Element return I Java Element source Element get Java Project if source Element instanceof I Resource I Java Project project Java Core create I Resource source Element get Project if project exists return project if no source element try the project associated with the launch bug 27837 I Launch Configuration configuration launch get Launch Configuration if configuration null try return Java Runtime get Java Project configuration catch Core Exception e JDI DebugUI Plugin log e return null  IJavaProject getJavaProject IJavaThread ILaunch getLaunch ISourceLocator getSourceLocator sourceElement IStackFrame getTopStackFrame sourceElement getSourceElement DebugException DebugUIPlugin sourceElement IJavaElement IJavaElement sourceElement getJavaProject sourceElement IResource IJavaProject JavaCore IResource sourceElement getProject ILaunchConfiguration getLaunchConfiguration JavaRuntime getJavaProject CoreException JDIDebugUIPlugin
public boolean has Associated Detail Formatter I Java Type type return get Associated Detail Formatter type null  hasAssociatedDetailFormatter IJavaType getAssociatedDetailFormatter
public Detail Formatter get Associated Detail Formatter I Java Type type String type Name try while type instanceof I Java Array Type type I Java Array Type type get Component Type if type instanceof I Java Class Type type Name type get Name else return null catch Debug Exception e return null return Detail Formatter f Detail Formatters Map get type Name  DetailFormatter getAssociatedDetailFormatter IJavaType typeName IJavaArrayType IJavaArrayType getComponentType IJavaClassType typeName getName DebugException DetailFormatter fDetailFormattersMap typeName
public void set Associated Detail Formatter Detail Formatter detail Formatter f Detail Formatters Map put detail Formatter get Type Name detail Formatter save Preference  setAssociatedDetailFormatter DetailFormatter detailFormatter fDetailFormattersMap detailFormatter getTypeName detailFormatter savePreference
private void save Preference Collection values List f Detail Formatters Map values String values new String values List size 3 int i 0 for Iterator iter values List iterator iter has Next Detail Formatter detail Formatter Detail Formatter iter next values i detail Formatter get Type Name values i detail Formatter get Snippet replace u0000 values i detail Formatter is Enabled Java Detail Formatters Preference Page DETAIL FORMATTER IS ENABLED Java Detail Formatters Preference Page DETAIL FORMATTER IS DISABLED String pref Java Debug Options Manager serialize List values JDI DebugUI Plugin get Default get Preference Store set Value IJDI Preferences Constants PREF DETAIL FORMATTERS LIST pref JDI DebugUI Plugin get Default save Plugin Preferences  savePreference valuesList fDetailFormattersMap valuesList valuesList hasNext DetailFormatter detailFormatter DetailFormatter detailFormatter getTypeName detailFormatter getSnippet detailFormatter isEnabled JavaDetailFormattersPreferencePage DETAIL_FORMATTER_IS_ENABLED JavaDetailFormattersPreferencePage DETAIL_FORMATTER_IS_DISABLED JavaDebugOptionsManager serializeList JDIDebugUIPlugin getDefault getPreferenceStore setValue IJDIPreferencesConstants PREF_DETAIL_FORMATTERS_LIST JDIDebugUIPlugin getDefault savePluginPreferences
Return the detail formatter code snippet associate with the given type or one of its super type private String get Detail Formatter I Java Class Type type throws Debug Exception if type null return null String type Name type get Name if f Detail Formatters Map contains Key type Name Detail Formatter detail Formatter Detail Formatter f Detail Formatters Map get type Name if detail Formatter is Enabled return detail Formatter get Snippet return get Detail Formatter type get Superclass  getDetailFormatter IJavaClassType DebugException typeName getName fDetailFormattersMap containsKey typeName DetailFormatter detailFormatter DetailFormatter fDetailFormattersMap typeName detailFormatter isEnabled detailFormatter getSnippet getDetailFormatter getSuperclass
Return the compiled expression which corresponds to the code formatter associated with the type of the given object The code snippet is compiled in the context of the given object private I Compiled Expression get Compiled Expression I Java Object java Object JDI Debug Target debug Target I Ast Evaluation Engine evaluation Engine throws Debug Exception I Java Class Type type I Java Class Type java Object get Java Type String type Name type get Name Key key new Key type Name debug Target if f Cache Map contains Key key return I Compiled Expression f Cache Map get key else String snippet get Detail Formatter type if snippet null I Compiled Expression res evaluation Engine get Compiled Expression snippet java Object f Cache Map put key res return res return null  ICompiledExpression getCompiledExpression IJavaObject javaObject JDIDebugTarget debugTarget IAstEvaluationEngine evaluationEngine DebugException IJavaClassType IJavaClassType javaObject getJavaType typeName getName typeName debugTarget fCacheMap containsKey ICompiledExpression fCacheMap getDetailFormatter ICompiledExpression evaluationEngine getCompiledExpression javaObject fCacheMap
see org eclipse jface util I Property Change Listener property Change Property Change Event public void property Change Property Change Event event if event get Property equals IJDI Preferences Constants PREF DETAIL FORMATTERS LIST populate Detail Formatters Map f Cache Map clear  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent getProperty IJDIPreferencesConstants PREF_DETAIL_FORMATTERS_LIST populateDetailFormattersMap fCacheMap
see org eclipse debug core I Debug Event Set Listener handle Debug Events Debug Event public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i if event get Source instanceof JDI Debug Target event get Kind Debug Event TERMINATE delete Cache For Target JDI Debug Target event get Source  IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent DebugEvent getSource JDIDebugTarget getKind DebugEvent deleteCacheForTarget JDIDebugTarget getSource
see org eclipse debug core I Launches Listener launches Added I Launch public void launches Added I Launch launches  ILaunchesListener launchesAdded ILaunch launchesAdded ILaunch
see org eclipse debug core I Launches Listener launches Changed I Launch public void launches Changed I Launch launches  ILaunchesListener launchesChanged ILaunch launchesChanged ILaunch
see org eclipse debug core I Launches Listener launches Removed I Launch public void launches Removed I Launch launches for int i 0 i launches length i I Launch launch launches i I Debug Target debug Targets launch get Debug Targets for int j 0 j debug Targets length j if debug Targets j instanceof JDI Debug Target delete Cache For Target JDI Debug Target debug Targets j  ILaunchesListener launchesRemoved ILaunch launchesRemoved ILaunch ILaunch IDebugTarget debugTargets getDebugTargets debugTargets debugTargets JDIDebugTarget deleteCacheForTarget JDIDebugTarget debugTargets
Remove from the cache compiled expression associated with the given debug target param debug Target private synchronized void delete Cache For Target JDI Debug Target debug Target for Iterator iter f Cache Map key Set iterator iter has Next Key key Key iter next if key f Debug Target debug Target iter remove  debugTarget deleteCacheForTarget JDIDebugTarget debugTarget fCacheMap keySet hasNext fDebugTarget debugTarget
private JDI Debug Target f Debug Target Key String type Name JDI Debug Target debug Target f Type Name type Name f Debug Target debug Target  JDIDebugTarget fDebugTarget typeName JDIDebugTarget debugTarget fTypeName typeName fDebugTarget debugTarget
public boolean equals Object obj if obj instanceof Key Key key Key obj return f Type Name null f Debug Target null f Type Name equals key f Type Name f Debug Target equals key f Debug Target else return false  fTypeName fDebugTarget fTypeName fTypeName fDebugTarget fDebugTarget
public int hash Code return f Type Name hash Code 2 f Debug Target hash Code 2  hashCode fTypeName hashCode fDebugTarget hashCode
public Evaluation Listener I Java Value value I Java Thread thread I Value Detail Listener listener f Value value f Thread thread f Listener listener  EvaluationListener IJavaValue IJavaThread IValueDetailListener fValue fThread fListener
public void evaluation Complete I Evaluation Result result if result has Errors String Buffer error new String Buffer DebugUI Messages get String Java Detail Formatters Manager Detail formatter error   1 NON NLS 1 Debug Exception exception result get Exception if exception null Throwable throwable exception get Status get Exception error append n t t NON NLS 1 if throwable instanceof Invocation Exception error append Message Format format DebugUI Messages get String Java Detail Formatters Manager An exception occurred   0  3 new String Invocation Exception throwable exception reference Type name NON NLS 1 else error append exception get Status get Message else String errors result get Error Messages for int i 0 length errors length i length i error append n t t append errors i NON NLS 1 f Listener detail Computed f Value error to String else try value To String result get Value catch Debug Exception e f Listener detail Computed f Value e get Status get Message  evaluationComplete IEvaluationResult hasErrors StringBuffer StringBuffer DebugUIMessages getString JavaDetailFormattersManager Detail_formatter_error___1 DebugException getException getStatus getException InvocationException MessageFormat DebugUIMessages getString JavaDetailFormattersManager An_exception_occurred__ _3 InvocationException referenceType getStatus getMessage getErrorMessages fListener detailComputed fValue toString valueToString getValue DebugException fListener detailComputed fValue getStatus getMessage
I Evaluation Runnable eval new I Evaluation Runnable public void run I Java Thread thread I Progress Monitor monitor throws Debug Exception String Buffer result new String Buffer if object Value get Signature null no need to spawn a thread for a null f Value result append DebugUI Messages get String Java Detail Formatters Manager null NON NLS 1 else if object Value instanceof I Java Primitive Value no need to spawn a thread for a primitive value appendJDI Primitive Value String result object Value else if f Thread null f Thread is Suspended no thread available result append DebugUI Messages get String Java Detail Formatters Manager no suspended threads NON NLS 1 appendJDI Value String result object Value else if object Value instanceof I Java Array append Array Detail result I Java Array object Value else if object Value instanceof I Java Object append Object Detail result I Java Object object Value else appendJDI Value String result object Value f Listener detail Computed f Value result to String  IEvaluationRunnable IEvaluationRunnable IJavaThread IProgressMonitor DebugException StringBuffer StringBuffer objectValue getSignature fValue DebugUIMessages getString JavaDetailFormattersManager objectValue IJavaPrimitiveValue appendJDIPrimitiveValueString objectValue fThread fThread isSuspended DebugUIMessages getString JavaDetailFormattersManager no_suspended_threads appendJDIValueString objectValue objectValue IJavaArray appendArrayDetail IJavaArray objectValue objectValue IJavaObject appendObjectDetail IJavaObject objectValue appendJDIValueString objectValue fListener detailComputed fValue toString
public void value To String final I Java Value object Value throws Debug Exception I Evaluation Runnable eval new I Evaluation Runnable public void run I Java Thread thread I Progress Monitor monitor throws Debug Exception String Buffer result new String Buffer if object Value get Signature null no need to spawn a thread for a null f Value result append DebugUI Messages get String Java Detail Formatters Manager null NON NLS 1 else if object Value instanceof I Java Primitive Value no need to spawn a thread for a primitive value appendJDI Primitive Value String result object Value else if f Thread null f Thread is Suspended no thread available result append DebugUI Messages get String Java Detail Formatters Manager no suspended threads NON NLS 1 appendJDI Value String result object Value else if object Value instanceof I Java Array append Array Detail result I Java Array object Value else if object Value instanceof I Java Object append Object Detail result I Java Object object Value else appendJDI Value String result object Value f Listener detail Computed f Value result to String f Thread run Evaluation eval null Debug Event EVALUATION IMPLICIT false  valueToString IJavaValue objectValue DebugException IEvaluationRunnable IEvaluationRunnable IJavaThread IProgressMonitor DebugException StringBuffer StringBuffer objectValue getSignature fValue DebugUIMessages getString JavaDetailFormattersManager objectValue IJavaPrimitiveValue appendJDIPrimitiveValueString objectValue fThread fThread isSuspended DebugUIMessages getString JavaDetailFormattersManager no_suspended_threads appendJDIValueString objectValue objectValue IJavaArray appendArrayDetail IJavaArray objectValue objectValue IJavaObject appendObjectDetail IJavaObject objectValue appendJDIValueString objectValue fListener detailComputed fValue toString fThread runEvaluation DebugEvent EVALUATION_IMPLICIT
protected void append Array Detail String Buffer result I Java Array array Value throws Debug Exception I Java Type component Type null try I Java Array Type java Array Type I Java Array Type array Value get Java Type component Type java Array Type get Component Type catch Debug Exception de JDI DebugUI Plugin log de result append de get Status get Message return if component Type instanceof I Java Reference Type if it is an array of primatives cannot use Arrays as List append Array Detail Individually result array Value return I Java Debug Target target I Java Debug Target array Value get Debug Target Load java util Arrays I Java Type types try types target get Java Types java lang Class NON NLS 1 catch Debug Exception de types null if types null types length 0 try I Java Class Type type I Java Class Type types 0 I Java Value arg target new Value java util Arrays NON NLS 1 type send Message for Name Ljava lang String Ljava lang Class new I Java Value arg f Thread NON NLS 1 NON NLS 2 catch Debug Exception de java util Arrays didn t load properly Can t use Arrays as List append Array Detail Individually result array Value else didn t get java lang Class can t load java utils Arrays append Array Detail Individually result array Value types null types target get Java Types java util Arrays NON NLS 1 if types null types length 0 I Java Class Type type I Java Class Type types 0 I Java Object java Object try execute Arrays as List on target java Object I Java Object type send Message as List Ljava lang Object Ljava util List new I Java Value array Value f Thread NON NLS 1 NON NLS 2 catch Debug Exception de as List failed append Array Detail Individually result array Value return append Object Detail result java Object else didn t get java util Arrays Can t use as List append Array Detail Individually result array Value  appendArrayDetail StringBuffer IJavaArray arrayValue DebugException IJavaType componentType IJavaArrayType javaArrayType IJavaArrayType arrayValue getJavaType componentType javaArrayType getComponentType DebugException JDIDebugUIPlugin getStatus getMessage componentType IJavaReferenceType asList appendArrayDetailIndividually arrayValue IJavaDebugTarget IJavaDebugTarget arrayValue getDebugTarget IJavaType getJavaTypes DebugException IJavaClassType IJavaClassType IJavaValue newValue sendMessage forName IJavaValue fThread DebugException asList appendArrayDetailIndividually arrayValue appendArrayDetailIndividually arrayValue getJavaTypes IJavaClassType IJavaClassType IJavaObject javaObject asList javaObject IJavaObject sendMessage asList IJavaValue arrayValue fThread DebugException asList appendArrayDetailIndividually arrayValue appendObjectDetail javaObject asList appendArrayDetailIndividually arrayValue
private void append Array Detail Individually String Buffer result I Java Array array Value throws Debug Exception result append I Java Value array Values try array Values array Value get Values catch Debug Exception de JDI DebugUI Plugin log de result append de get Status get Message return for int i 0 i array Values length i I Java Value value array Values i if value instanceof I Java Array append Array Detail result I Java Array value else if value instanceof I Java Object append Object Detail result I Java Object value else appendJDI Value String result value if i array Values length 1 result append result append result append  appendArrayDetailIndividually StringBuffer IJavaArray arrayValue DebugException IJavaValue arrayValues arrayValues arrayValue getValues DebugException JDIDebugUIPlugin getStatus getMessage arrayValues IJavaValue arrayValues IJavaArray appendArrayDetail IJavaArray IJavaObject appendObjectDetail IJavaObject appendJDIValueString arrayValues
protected void appendJDI Primitive Value String String Buffer result I Java Value value throws Debug Exception result append value get Value String  appendJDIPrimitiveValueString StringBuffer IJavaValue DebugException getValueString
protected void appendJDI Value String String Buffer result I Java Value value throws Debug Exception result append value get Value String  appendJDIValueString StringBuffer IJavaValue DebugException getValueString
protected void append Object Detail String Buffer result I Java Object object Value throws Debug Exception I Java Value to String Value object Value send Message Evaluation Listener fg To String Evaluation Listener fg To String Signature null f Thread false if to String Value null result append DebugUI Messages get String Java Detail Formatters Manager unknown NON NLS 1 else appendJDI Value String result to String Value  appendObjectDetail StringBuffer IJavaObject objectValue DebugException IJavaValue toStringValue objectValue sendMessage EvaluationListener fgToString EvaluationListener fgToStringSignature fThread toStringValue DebugUIMessages getString JavaDetailFormattersManager appendJDIValueString toStringValue
non java doc Remove the provided code detail Formatter code from the map param detail Formatter public void remove Associated Detail Formatter Detail Formatter detail Formatter f Detail Formatters Map remove detail Formatter get Type Name save Preference  detailFormatter detailFormatter removeAssociatedDetailFormatter DetailFormatter detailFormatter fDetailFormattersMap detailFormatter getTypeName savePreference

public Java Detail Formatters Preference Page super set Preference Store JDI DebugUI Plugin get Default get Preference Store set Description DebugUI Messages get String Java Detail Formatters Preference Page Override default   toString    for Variables and Expressions view details  1 NON NLS 1  JavaDetailFormattersPreferencePage setPreferenceStore JDIDebugUIPlugin getDefault getPreferenceStore setDescription DebugUIMessages getString JavaDetailFormattersPreferencePage Override_default___toString ___for_Variables_and_Expressions_view_details _1
protected Control create Contents Composite parent no Default And Apply Button Workbench Help set Help get Control I Java Debug Help Context Ids JAVA DETAIL FORMATTER PREFERENCE PAGE return create Detail Formats Preferences parent  createContents noDefaultAndApplyButton WorkbenchHelp setHelp getControl IJavaDebugHelpContextIds JAVA_DETAIL_FORMATTER_PREFERENCE_PAGE createDetailFormatsPreferences
see I Workbench Preference Page init I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
f Formatter List Viewer set Label Provider new Label Provider public String get Text Object element if element instanceof Detail Formatter return Detail Formatter element get Type Name return null  fFormatterListViewer setLabelProvider LabelProvider getText DetailFormatter DetailFormatter getTypeName
f Formatter List Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Detail Formatter event get Element set Enabled event get Checked  fFormatterListViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent DetailFormatter getElement setEnabled getChecked
f Formatter List Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Page I Structured Selection event get Selection  fFormatterListViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updatePage IStructuredSelection getSelection
f Formatter List Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if event get Selection is Empty edit Type  fFormatterListViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getSelection isEmpty editType
table add Key Listener new Key Adapter public void key Pressed Key Event event if event character SWT DEL event state Mask 0 remove Types  addKeyListener KeyAdapter keyPressed KeyEvent stateMask removeTypes
Create a group to contain the detail formatters related widgetry private Control create Detail Formats Preferences Composite parent Font font parent get Font initialize Dialog Units parent top level container Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH container set Layout Data gd container set Font font table label f Table Label new Label container SWT NONE f Table Label set Text DebugUI Messages get String Java Detail Formatters Preference Page Types with detail formatters  2 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 f Table Label set Layout Data gd f Table Label set Font font f Formatter List Viewer Checkbox Table Viewer new Check List container SWT CHECK SWT BORDER SWT MULTI SWT FULL SELECTION Table table Table f Formatter List Viewer get Control gd new Grid Data Grid Data FILL BOTH gd height Hint convert Height In Chars To Pixels 10 gd width Hint convert Width In Chars To Pixels 10 table set Layout Data gd table set Font font f Format Viewer Content Provider new Formatter List Viewer Content Provider f Formatter List Viewer f Formatter List Viewer set Content Provider f Format Viewer Content Provider f Formatter List Viewer set Label Provider new Label Provider public String get Text Object element if element instanceof Detail Formatter return Detail Formatter element get Type Name return null f Formatter List Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Detail Formatter event get Element set Enabled event get Checked f Formatter List Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Page I Structured Selection event get Selection f Formatter List Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if event get Selection is Empty edit Type table add Key Listener new Key Adapter public void key Pressed Key Event event if event character SWT DEL event state Mask 0 remove Types f Formatter List Viewer set Input this create Detail Formats Buttons container Label label new Label container SWT NONE label set Text DebugUI Messages get String Java Detail Formatters Preference Page Detail formatter code snippet defined for selected type  3 NON NLS 1 label set Font font create Source Viewer container f Format Viewer Content Provider refresh Viewer return container  createDetailFormatsPreferences getFont initializeDialogUnits GridLayout GridLayout numColumns marginHeight marginWidth setLayout GridData GridData GridData FILL_BOTH setLayoutData setFont fTableLabel fTableLabel setText DebugUIMessages getString JavaDetailFormattersPreferencePage Types_with_detail_formatters__2 GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan fTableLabel setLayoutData fTableLabel setFont fFormatterListViewer CheckboxTableViewer newCheckList FULL_SELECTION fFormatterListViewer getControl GridData GridData FILL_BOTH heightHint convertHeightInCharsToPixels widthHint convertWidthInCharsToPixels setLayoutData setFont fFormatViewerContentProvider FormatterListViewerContentProvider fFormatterListViewer fFormatterListViewer setContentProvider fFormatViewerContentProvider fFormatterListViewer setLabelProvider LabelProvider getText DetailFormatter DetailFormatter getTypeName fFormatterListViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent DetailFormatter getElement setEnabled getChecked fFormatterListViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updatePage IStructuredSelection getSelection fFormatterListViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getSelection isEmpty editType addKeyListener KeyAdapter keyPressed KeyEvent stateMask removeTypes fFormatterListViewer setInput createDetailFormatsButtons setText DebugUIMessages getString JavaDetailFormattersPreferencePage Detail_formatter_code_snippet_defined_for_selected_type__3 setFont createSourceViewer fFormatViewerContentProvider refreshViewer
set Button Layout Data f Add Formatter Button f Add Formatter Button add Listener SWT Selection new Listener public void handle Event Event e add Type  setButtonLayoutData fAddFormatterButton fAddFormatterButton addListener handleEvent addType
set Button Layout Data f Edit Formatter Button f Edit Formatter Button add Listener SWT Selection new Listener public void handle Event Event e edit Type  setButtonLayoutData fEditFormatterButton fEditFormatterButton addListener handleEvent editType
set Button Layout Data f Remove Formatter Button f Remove Formatter Button add Listener SWT Selection new Listener public void handle Event Event e remove Types  setButtonLayoutData fRemoveFormatterButton fRemoveFormatterButton addListener handleEvent removeTypes
private void create Detail Formats Buttons Composite container Font font container get Font button container Composite button Container new Composite container SWT NONE Grid Data gd new Grid Data Grid Data FILL VERTICAL button Container set Layout Data gd Grid Layout button Layout new Grid Layout button Layout num Columns 1 button Layout margin Height 0 button Layout margin Width 0 button Container set Layout button Layout Add type button f Add Formatter Button new Button button Container SWT PUSH f Add Formatter Button set Text DebugUI Messages get String Java Detail Formatters Preference Page Add  Formatter  5 NON NLS 1 f Add Formatter Button set Tool Tip Text DebugUI Messages get String Java Detail Formatters Preference Page Allow you to create a new detail formatter 6 NON NLS 1 f Add Formatter Button set Layout Data gd f Add Formatter Button set Font font set Button Layout Data f Add Formatter Button f Add Formatter Button add Listener SWT Selection new Listener public void handle Event Event e add Type Edit button f Edit Formatter Button new Button button Container SWT PUSH f Edit Formatter Button set Text DebugUI Messages get String Java Detail Formatters Preference Page Edit  9 NON NLS 1 f Edit Formatter Button set Tool Tip Text DebugUI Messages get String Java Detail Formatters Preference Page Edit the selected detail formatter 10 NON NLS 1 f Edit Formatter Button set Font font set Button Layout Data f Edit Formatter Button f Edit Formatter Button add Listener SWT Selection new Listener public void handle Event Event e edit Type f Edit Formatter Button set Enabled false Remove button f Remove Formatter Button new Button button Container SWT PUSH f Remove Formatter Button set Text DebugUI Messages get String Java Detail Formatters Preference Page Remove 7 NON NLS 1 f Remove Formatter Button set Tool Tip Text DebugUI Messages get String Java Detail Formatters Preference Page Remove all selected detail formatters 8 NON NLS 1 f Remove Formatter Button set Font font set Button Layout Data f Remove Formatter Button f Remove Formatter Button add Listener SWT Selection new Listener public void handle Event Event e remove Types f Remove Formatter Button set Enabled false  createDetailFormatsButtons getFont buttonContainer GridData GridData GridData FILL_VERTICAL buttonContainer setLayoutData GridLayout buttonLayout GridLayout buttonLayout numColumns buttonLayout marginHeight buttonLayout marginWidth buttonContainer setLayout buttonLayout fAddFormatterButton buttonContainer fAddFormatterButton setText DebugUIMessages getString JavaDetailFormattersPreferencePage Add_ _5 fAddFormatterButton setToolTipText DebugUIMessages getString JavaDetailFormattersPreferencePage Allow_you_to_create_a_new_detail_formatter_6 fAddFormatterButton setLayoutData fAddFormatterButton setFont setButtonLayoutData fAddFormatterButton fAddFormatterButton addListener handleEvent addType fEditFormatterButton buttonContainer fEditFormatterButton setText DebugUIMessages getString JavaDetailFormattersPreferencePage _9 fEditFormatterButton setToolTipText DebugUIMessages getString JavaDetailFormattersPreferencePage Edit_the_selected_detail_formatter_10 fEditFormatterButton setFont setButtonLayoutData fEditFormatterButton fEditFormatterButton addListener handleEvent editType fEditFormatterButton setEnabled fRemoveFormatterButton buttonContainer fRemoveFormatterButton setText DebugUIMessages getString JavaDetailFormattersPreferencePage Remove_7 fRemoveFormatterButton setToolTipText DebugUIMessages getString JavaDetailFormattersPreferencePage Remove_all_selected_detail_formatters_8 fRemoveFormatterButton setFont setButtonLayoutData fRemoveFormatterButton fRemoveFormatterButton addListener handleEvent removeTypes fRemoveFormatterButton setEnabled
public void create Source Viewer Composite container f Code Viewer new Source Viewer container null SWT BORDER SWT V SCROLL SWT H SCROLL Java Text Tools tools Java Plugin get Default get Java Text Tools I Document document new Document I Document Partitioner partitioner tools create Document Partitioner document set Document Partitioner partitioner partitioner connect document f Code Viewer configure new Java Source Viewer Configuration tools null f Code Viewer set Editable false f Code Viewer set Document document f Code Viewer get Text Widget set Background get Shell get Display get System Color SWT COLOR WIDGET BACKGROUND f Code Viewer get Text Widget set Font J Face Resources get Text Font Control control f Code Viewer get Control Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 gd height Hint convert Height In Chars To Pixels 10 control set Layout Data gd  createSourceViewer fCodeViewer SourceViewer V_SCROLL H_SCROLL JavaTextTools JavaPlugin getDefault getJavaTextTools IDocument IDocumentPartitioner createDocumentPartitioner setDocumentPartitioner fCodeViewer JavaSourceViewerConfiguration fCodeViewer setEditable fCodeViewer setDocument fCodeViewer getTextWidget setBackground getShell getDisplay getSystemColor COLOR_WIDGET_BACKGROUND fCodeViewer getTextWidget setFont JFaceResources getTextFont fCodeViewer getControl GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan heightHint convertHeightInCharsToPixels setLayoutData
private void update Page I Structured Selection selection f Remove Formatter Button set Enabled selection is Empty f Edit Formatter Button set Enabled selection size 1 update Format Viewer selection  updatePage IStructuredSelection fRemoveFormatterButton setEnabled isEmpty fEditFormatterButton setEnabled updateFormatViewer
private void update Format Viewer I Structured Selection selection if selection size 1 f Code Viewer get Document set Detail Formatter selection get First Element get Snippet else f Code Viewer get Document set NON NLS 1  updateFormatViewer IStructuredSelection fCodeViewer getDocument DetailFormatter getFirstElement getSnippet fCodeViewer getDocument
public void add Type Detail Formatter detail Format new Detail Formatter true NON NLS 1 NON NLS 2 if new Detail Formatter Dialog get Shell detail Format f Format Viewer Content Provider get Defined Types false open Window OK f Format Viewer Content Provider add Detail Formatter detail Format  addType DetailFormatter detailFormat DetailFormatter DetailFormatterDialog getShell detailFormat fFormatViewerContentProvider getDefinedTypes fFormatViewerContentProvider addDetailFormatter detailFormat
public void remove Types Object all f Format Viewer Content Provider get Elements null I Structured Selection selection I Structured Selection f Formatter List Viewer get Selection Object first selection get First Element int index 1 for int i 0 i all length i Object object all i if object equals first index i break f Format Viewer Content Provider remove Detail Formatters selection to Array all f Format Viewer Content Provider get Elements null if index all length 1 index all length 1 if index 0 f Formatter List Viewer set Selection new Structured Selection all index  removeTypes fFormatViewerContentProvider getElements IStructuredSelection IStructuredSelection fFormatterListViewer getSelection getFirstElement fFormatViewerContentProvider removeDetailFormatters toArray fFormatViewerContentProvider getElements fFormatterListViewer setSelection StructuredSelection
public void edit Type I Structured Selection selection I Structured Selection f Formatter List Viewer get Selection if new Detail Formatter Dialog get Shell Detail Formatter selection get First Element null true true open Window OK f Formatter List Viewer refresh f Format Viewer Content Provider refresh Viewer update Page selection  editType IStructuredSelection IStructuredSelection fFormatterListViewer getSelection DetailFormatterDialog getShell DetailFormatter getFirstElement fFormatterListViewer fFormatViewerContentProvider refreshViewer updatePage
public boolean perform Ok f Format Viewer Content Provider save Detail Formatters JDI DebugUI Plugin get Default save Plugin Preferences return true  performOk fFormatViewerContentProvider saveDetailFormatters JDIDebugUIPlugin getDefault savePluginPreferences
Formatter List Viewer Content Provider constructor public Formatter List Viewer Content Provider Checkbox Table Viewer viewer f Viewer viewer load the current formatters String detail Formatters List Java Debug Options Manager parse List JDI DebugUI Plugin get Default get Preference Store get String IJDI Preferences Constants PREF DETAIL FORMATTERS LIST f Detail Formatters Set new Tree Set f Defined Types new Array List detail Formatters List length 3 for int i 0 length detail Formatters List length i length String type Name detail Formatters List i String snippet detail Formatters List i replace u0000 boolean enabled DETAIL FORMATTER IS DISABLED equals detail Formatters List i Detail Formatter detail Formatter new Detail Formatter type Name snippet enabled f Detail Formatters Set add detail Formatter f Defined Types add type Name  FormatterListViewerContentProvider FormatterListViewerContentProvider CheckboxTableViewer fViewer detailFormattersList JavaDebugOptionsManager parseList JDIDebugUIPlugin getDefault getPreferenceStore getString IJDIPreferencesConstants PREF_DETAIL_FORMATTERS_LIST fDetailFormattersSet TreeSet fDefinedTypes ArrayList detailFormattersList detailFormattersList typeName detailFormattersList detailFormattersList DETAIL_FORMATTER_IS_DISABLED detailFormattersList DetailFormatter detailFormatter DetailFormatter typeName fDetailFormattersSet detailFormatter fDefinedTypes typeName
Save the detail formatter list public void save Detail Formatters String values new String f Detail Formatters Set size 3 int i 0 for Iterator iter f Detail Formatters Set iterator iter has Next Detail Formatter detail Formatter Detail Formatter iter next values i detail Formatter get Type Name values i detail Formatter get Snippet replace u0000 values i detail Formatter is Enabled DETAIL FORMATTER IS ENABLED DETAIL FORMATTER IS DISABLED String pref Java Debug Options Manager serialize List values get Preference Store set Value IJDI Preferences Constants PREF DETAIL FORMATTERS LIST pref  saveDetailFormatters fDetailFormattersSet fDetailFormattersSet hasNext DetailFormatter detailFormatter DetailFormatter detailFormatter getTypeName detailFormatter getSnippet detailFormatter isEnabled DETAIL_FORMATTER_IS_ENABLED DETAIL_FORMATTER_IS_DISABLED JavaDebugOptionsManager serializeList getPreferenceStore setValue IJDIPreferencesConstants PREF_DETAIL_FORMATTERS_LIST
Add a detail formatter public void add Detail Formatter Detail Formatter detail Formatter f Detail Formatters Set add detail Formatter f Defined Types add detail Formatter get Type Name f Viewer refresh refresh Viewer I Structured Selection selection new Structured Selection detail Formatter f Viewer set Selection selection update Page selection  addDetailFormatter DetailFormatter detailFormatter fDetailFormattersSet detailFormatter fDefinedTypes detailFormatter getTypeName fViewer refreshViewer IStructuredSelection StructuredSelection detailFormatter fViewer setSelection updatePage
Remove a detail Formatter public void remove Detail Formatter Detail Formatter detail Formatter f Detail Formatters Set remove detail Formatter f Defined Types remove detail Formatter get Type Name f Viewer refresh I Structured Selection selection new Structured Selection f Viewer set Selection selection update Page selection  detailFormatter removeDetailFormatter DetailFormatter detailFormatter fDetailFormattersSet detailFormatter fDefinedTypes detailFormatter getTypeName fViewer IStructuredSelection StructuredSelection fViewer setSelection updatePage
Remove detail Formatters public void remove Detail Formatters Object detail Formatters for int i 0 length detail Formatters length i length i f Detail Formatters Set remove detail Formatters i f Defined Types remove Detail Formatter detail Formatters i get Type Name f Viewer refresh I Structured Selection selection new Structured Selection f Viewer set Selection selection update Page selection  detailFormatters removeDetailFormatters detailFormatters detailFormatters fDetailFormattersSet detailFormatters fDefinedTypes DetailFormatter detailFormatters getTypeName fViewer IStructuredSelection StructuredSelection fViewer setSelection updatePage
Refresh the formatter list viewer private void refresh Viewer Detail Formatter checked Elements Tmp new Detail Formatter f Detail Formatters Set size int i 0 for Iterator iter f Detail Formatters Set iterator iter has Next Detail Formatter detail Formatter Detail Formatter iter next if detail Formatter is Enabled checked Elements Tmp i detail Formatter Detail Formatter checked Elements new Detail Formatter i System arraycopy checked Elements Tmp 0 checked Elements 0 i f Viewer set All Checked false f Viewer set Checked Elements checked Elements  refreshViewer DetailFormatter checkedElementsTmp DetailFormatter fDetailFormattersSet fDetailFormattersSet hasNext DetailFormatter detailFormatter DetailFormatter detailFormatter isEnabled checkedElementsTmp detailFormatter DetailFormatter checkedElements DetailFormatter checkedElementsTmp checkedElements fViewer setAllChecked fViewer setCheckedElements checkedElements
see org eclipse jface viewers I Structured Content Provider get Elements Object public Object get Elements Object input Element return f Detail Formatters Set to Array  IStructuredContentProvider getElements getElements inputElement fDetailFormattersSet toArray
public List get Defined Types return f Defined Types  getDefinedTypes fDefinedTypes
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
see org eclipse jface viewers I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput

Hash Map f Target Map new Hash Map public Java Evaluation Engine Manager Debug Plugin get Default add Debug Event Listener this  HashMap fTargetMap HashMap JavaEvaluationEngineManager DebugPlugin getDefault addDebugEventListener
see I Debug Event Set Listener handle Debug Event Debug Event Removes debug targets from the engine map when they terminate and dispose of engines public void handle Debug Events Debug Event events Debug Event event for int i 0 num Events events length i num Events i event events i if event get Kind Debug Event TERMINATE event get Source instanceof I Java Debug Target Hash Map map Hash Map f Target Map remove event get Source if map null Iterator iter map values iterator while iter has Next I Ast Evaluation Engine iter next dispose map clear  IDebugEventSetListener handleDebugEvent DebugEvent handleDebugEvents DebugEvent DebugEvent numEvents numEvents getKind DebugEvent getSource IJavaDebugTarget HashMap HashMap fTargetMap getSource hasNext IAstEvaluationEngine
Returns an evaluation engine for the given project and debug target If an engine already exists for this project and target combination that same engine is returned Otherwise a new engine is created public I Ast Evaluation Engine get Evaluation Engine I Java Project project I Java Debug Target target I Ast Evaluation Engine engine null Hash Map map Hash Map f Target Map get target if map null map new Hash Map f Target Map put target map engine I Ast Evaluation Engine map get project if engine null engine Evaluation Manager new Ast Evaluation Engine project target map put project engine return engine  IAstEvaluationEngine getEvaluationEngine IJavaProject IJavaDebugTarget IAstEvaluationEngine HashMap HashMap fTargetMap HashMap fTargetMap IAstEvaluationEngine EvaluationManager newAstEvaluationEngine
Disposes this evaluation engine manager When disposed the manager disposes all engines it is currently managing After this evaluation engine manager has been disposed it must not be reused public void dispose Hash Map engines Iterator iter f Target Map values iterator while iter has Next engines Hash Map iter next Iterator engine Iter engines values iterator while engine Iter has Next I Ast Evaluation Engine engine I Ast Evaluation Engine engine Iter next engine dispose engines clear Debug Plugin get Default remove Debug Event Listener this  HashMap fTargetMap hasNext HashMap engineIter engineIter hasNext IAstEvaluationEngine IAstEvaluationEngine engineIter DebugPlugin getDefault removeDebugEventListener

see I Java Hot Code Replace Listener hot Code Replace Succeeded I Java Debug Target public void hot Code Replace Succeeded I Java Debug Target target  IJavaHotCodeReplaceListener hotCodeReplaceSucceeded IJavaDebugTarget hotCodeReplaceSucceeded IJavaDebugTarget
display async Exec new Runnable public void run if display is Disposed return Shell shell JDI DebugUI Plugin get Active Workbench Shell Hot Code Replace Error Dialog dialog new Hot Code Replace Error Dialog shell title message status preference alert Message JDI DebugUI Plugin get Default get Preference Store target dialog set Block On Open false dialog open  asyncExec isDisposed JDIDebugUIPlugin getActiveWorkbenchShell HotCodeReplaceErrorDialog HotCodeReplaceErrorDialog alertMessage JDIDebugUIPlugin getDefault getPreferenceStore setBlockOnOpen
see I Java Hot Code Replace Listener hot Code Replace Failed I Java Debug Target Debug Exception public void hot Code Replace Failed final I Java Debug Target target final Debug Exception exception if exception null JDI DebugUI Plugin get Default get Preference Store get Boolean IJDI Preferences Constants PREF ALERT HCR FAILED exception null JDI DebugUI Plugin get Default get Preference Store get Boolean IJDI Preferences Constants PREF ALERT HCR NOT SUPPORTED return do not report errors for snippet editor targets that do not support HCR HCR is simulated by using a new class loader for each evaluation I Launch launch target get Launch if launch get Attribute Scrapbook Launcher SCRAPBOOK LAUNCH null if target supports Hot Code Replace return final Display display JDI DebugUI Plugin get Standard Display if display is Disposed return final String vm Name f Label Provider get Text target final I Status status final String preference final String alert Message if exception null status new Status I Status WARNING JDI DebugUI Plugin get Unique Identifier I Status WARNING DebugUI Messages get String JDI DebugUI Plugin The target VM does not support hot code replace 1 null NON NLS 1 preference IJDI Preferences Constants PREF ALERT HCR NOT SUPPORTED alert Message DebugUI Messages get String JDI DebugUI Plugin 3 NON NLS 1 else status exception get Status preference IJDI Preferences Constants PREF ALERT HCR FAILED alert Message DebugUI Messages get String JDI DebugUI Plugin 1 NON NLS 1 final String title DebugUI Messages get String JDI DebugUI Plugin Hot code replace failed 1 NON NLS 1 final String message Message Format format DebugUI Messages get String JDI DebugUI Plugin 0  was unable to replace the running code with the code in the workspace  2 NON NLS 1 new Object vm Name display async Exec new Runnable public void run if display is Disposed return Shell shell JDI DebugUI Plugin get Active Workbench Shell Hot Code Replace Error Dialog dialog new Hot Code Replace Error Dialog shell title message status preference alert Message JDI DebugUI Plugin get Default get Preference Store target dialog set Block On Open false dialog open  IJavaHotCodeReplaceListener hotCodeReplaceFailed IJavaDebugTarget DebugException hotCodeReplaceFailed IJavaDebugTarget DebugException JDIDebugUIPlugin getDefault getPreferenceStore getBoolean IJDIPreferencesConstants PREF_ALERT_HCR_FAILED JDIDebugUIPlugin getDefault getPreferenceStore getBoolean IJDIPreferencesConstants PREF_ALERT_HCR_NOT_SUPPORTED ILaunch getLaunch getAttribute ScrapbookLauncher SCRAPBOOK_LAUNCH supportsHotCodeReplace JDIDebugUIPlugin getStandardDisplay isDisposed vmName fLabelProvider getText IStatus alertMessage IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus DebugUIMessages getString JDIDebugUIPlugin The_target_VM_does_not_support_hot_code_replace_1 IJDIPreferencesConstants PREF_ALERT_HCR_NOT_SUPPORTED alertMessage DebugUIMessages getString JDIDebugUIPlugin getStatus IJDIPreferencesConstants PREF_ALERT_HCR_FAILED alertMessage DebugUIMessages getString JDIDebugUIPlugin DebugUIMessages getString JDIDebugUIPlugin Hot_code_replace_failed_1 MessageFormat DebugUIMessages getString JDIDebugUIPlugin _was_unable_to_replace_the_running_code_with_the_code_in_the_workspace _2 vmName asyncExec isDisposed JDIDebugUIPlugin getActiveWorkbenchShell HotCodeReplaceErrorDialog HotCodeReplaceErrorDialog alertMessage JDIDebugUIPlugin getDefault getPreferenceStore setBlockOnOpen
display async Exec new Runnable public void run if display is Disposed return Shell shell JDI DebugUI Plugin get Active Workbench Shell Hot Code Replace Error Dialog dialog new Hot Code Replace Error Dialog shell dialog Title message status IJDI Preferences Constants PREF ALERT OBSOLETE METHODS toggle Message JDI DebugUI Plugin get Default get Preference Store target dialog set Block On Open false dialog open  asyncExec isDisposed JDIDebugUIPlugin getActiveWorkbenchShell HotCodeReplaceErrorDialog HotCodeReplaceErrorDialog dialogTitle IJDIPreferencesConstants PREF_ALERT_OBSOLETE_METHODS toggleMessage JDIDebugUIPlugin getDefault getPreferenceStore setBlockOnOpen
see I Java Hot Code Replace Listener obsolete Methods I Java Debug Target public void obsolete Methods final I Java Debug Target target if JDI DebugUI Plugin get Default get Preference Store get Boolean IJDI Preferences Constants PREF ALERT OBSOLETE METHODS return final Display display JDI DebugUI Plugin get Standard Display if display is Disposed return final String vm Name f Label Provider get Text target final String dialog Title DebugUI Messages get String JDI DebugUI Plugin Obsolete methods remain 1 NON NLS 1 final String message Message Format format DebugUI Messages get String JDI DebugUI Plugin 0  contains obsolete methods 1 new Object vm Name NON NLS 1 final I Status status new Status I Status WARNING JDI DebugUI Plugin get Unique Identifier I Status WARNING DebugUI Messages get String JDI DebugUI Plugin Stepping may be hazardous 1 null NON NLS 1 final String toggle Message DebugUI Messages get String JDI DebugUI Plugin 2 NON NLS 1 display async Exec new Runnable public void run if display is Disposed return Shell shell JDI DebugUI Plugin get Active Workbench Shell Hot Code Replace Error Dialog dialog new Hot Code Replace Error Dialog shell dialog Title message status IJDI Preferences Constants PREF ALERT OBSOLETE METHODS toggle Message JDI DebugUI Plugin get Default get Preference Store target dialog set Block On Open false dialog open  IJavaHotCodeReplaceListener obsoleteMethods IJavaDebugTarget obsoleteMethods IJavaDebugTarget JDIDebugUIPlugin getDefault getPreferenceStore getBoolean IJDIPreferencesConstants PREF_ALERT_OBSOLETE_METHODS JDIDebugUIPlugin getStandardDisplay isDisposed vmName fLabelProvider getText dialogTitle DebugUIMessages getString JDIDebugUIPlugin Obsolete_methods_remain_1 MessageFormat DebugUIMessages getString JDIDebugUIPlugin _contains_obsolete_methods_1 vmName IStatus IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus DebugUIMessages getString JDIDebugUIPlugin Stepping_may_be_hazardous_1 toggleMessage DebugUIMessages getString JDIDebugUIPlugin asyncExec isDisposed JDIDebugUIPlugin getActiveWorkbenchShell HotCodeReplaceErrorDialog HotCodeReplaceErrorDialog dialogTitle IJDIPreferencesConstants PREF_ALERT_OBSOLETE_METHODS toggleMessage JDIDebugUIPlugin getDefault getPreferenceStore setBlockOnOpen

private static Set init Primitive Types Hash Set set new Hash Set 8 set add short NON NLS 1 set add int NON NLS 1 set add long NON NLS 1 set add float NON NLS 1 set add double NON NLS 1 set add boolean NON NLS 1 set add byte NON NLS 1 set add char NON NLS 1 set add null NON NLS 1 return set  initPrimitiveTypes HashSet HashSet
see org eclipse ui I Action Filter test Attribute java lang Object java lang String java lang String public boolean test Attribute Object target String name String value if target instanceof Java Inspect Expression Java Inspect Expression exp Java Inspect Expression target if name equals Primitive Variable Action Filter value equals is Not Primitive NON NLS 1 NON NLS 2 return is Primitive Type exp else if name equals Detail Formatter Filter value equals is Defined NON NLS 1 NON NLS 2 try I Value var Value exp get Value return var Value instanceof I Java Object Java Detail Formatters Manager get Default has Associated Detail Formatter I Java Object var Value get Java Type catch Debug Exception exception JDI DebugUI Plugin log exception return false  IActionFilter testAttribute testAttribute JavaInspectExpression JavaInspectExpression JavaInspectExpression PrimitiveVariableActionFilter isNotPrimitive isPrimitiveType DetailFormatterFilter isDefined IValue varValue getValue varValue IJavaObject JavaDetailFormattersManager getDefault hasAssociatedDetailFormatter IJavaObject varValue getJavaType DebugException JDIDebugUIPlugin
private boolean is Primitive Type Java Inspect Expression exp if exp null return false try I Value value exp get Value if value null String ref Type Open Variable Type Action remove Array value get Reference Type Name return fg Primitive Types contains ref Type catch Debug Exception e return false  isPrimitiveType JavaInspectExpression IValue getValue refType OpenVariableTypeAction removeArray getReferenceTypeName fgPrimitiveTypes refType DebugException

see I Workbench Adapter get Children Object public Object get Children Object o return new Object 0  IWorkbenchAdapter getChildren getChildren
see I Workbench Adapter get Image Descriptor Object public Image Descriptor get Image Descriptor Object o if o instanceof Java Project Source Location return PlatformUI get Workbench get Shared Images get Image Descriptor IDE Shared Images IMG OBJ PROJECT else if o instanceof Directory Source Location return PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG OBJ FOLDER else if o instanceof Archive Source Location return JavaUI get Shared Images get Image Descriptor org eclipse jdt ui I Shared Images IMG OBJS JAR return null  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor JavaProjectSourceLocation getWorkbench getSharedImages getImageDescriptor SharedImages IMG_OBJ_PROJECT DirectorySourceLocation getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_OBJ_FOLDER ArchiveSourceLocation getSharedImages getImageDescriptor ISharedImages IMG_OBJS_JAR
see I Workbench Adapter get Label Object public String get Label Object o if o instanceof Java Project Source Location return f Java Element Label Provider get Text Java Project Source Location o get Java Project else if o instanceof Directory Source Location try return Directory Source Location o get Directory get Canonical Path catch IO Exception e JDI DebugUI Plugin log e return Directory Source Location o get Directory get Name else if o instanceof Archive Source Location return Archive Source Location o get Name return null  IWorkbenchAdapter getLabel getLabel JavaProjectSourceLocation fJavaElementLabelProvider getText JavaProjectSourceLocation getJavaProject DirectorySourceLocation DirectorySourceLocation getDirectory getCanonicalPath IOException JDIDebugUIPlugin DirectorySourceLocation getDirectory getName ArchiveSourceLocation ArchiveSourceLocation getName
see I Workbench Adapter get Parent Object public Object get Parent Object o return null  IWorkbenchAdapter getParent getParent
see I Adapter Factory get Adapter Object Class public Object get Adapter Object obj Class adapter Type if adapter Type is Instance obj return obj if adapter Type I Workbench Adapter class if obj instanceof I Java Source Location return new Source Location Properties Adapter return null  IAdapterFactory getAdapter getAdapter adapterType adapterType isInstance adapterType IWorkbenchAdapter IJavaSourceLocation SourceLocationPropertiesAdapter
see I Adapter Factory get Adapter List public Class get Adapter List return new Class I Workbench Adapter class  IAdapterFactory getAdapterList getAdapterList IWorkbenchAdapter

see org eclipse ui I Action Filter test Attribute Object String String public boolean test Attribute Object target String name String value if target instanceof I Java Stack Frame I Java Stack Frame frame I Java Stack Frame target if name equals Drop To Frame Action Filter NON NLS 1 value equals supports Drop To Frame NON NLS 1 return frame supports Drop To Frame else if name equals Receiving Stack Frame Action Filter NON NLS 1 value equals is Receiving Type NON NLS 1 try return frame get Receiving Type Name equals frame get Declaring Type Name catch Debug Exception de return false  IActionFilter testAttribute testAttribute IJavaStackFrame IJavaStackFrame IJavaStackFrame DropToFrameActionFilter supportsDropToFrame supportsDropToFrame ReceivingStackFrameActionFilter isReceivingType getReceivingTypeName getDeclaringTypeName DebugException

public Java Step Filter Preference Page super set Preference Store JDI DebugUI Plugin get Default get Preference Store only used when the page is used programatically edit step filters action set Title DebugUI Messages get String Java Step Filter Preference Page title NON NLS 1 set Description DebugUI Messages get String Java Step Filter Preference Page description NON NLS 1  JavaStepFilterPreferencePage setPreferenceStore JDIDebugUIPlugin getDefault getPreferenceStore setTitle DebugUIMessages getString JavaStepFilterPreferencePage setDescription DebugUIMessages getString JavaStepFilterPreferencePage
protected Control create Contents Composite parent Workbench Help set Help get Control I Java Debug Help Context Ids JAVA STEP FILTER PREFERENCE PAGE The main composite Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 1 layout margin Height 0 layout margin Width 0 composite set Layout layout Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL composite set Layout Data data composite set Font parent get Font create Step Filter Preferences composite return composite  createContents WorkbenchHelp setHelp getControl IJavaDebugHelpContextIds JAVA_STEP_FILTER_PREFERENCE_PAGE GridLayout GridLayout numColumns marginHeight marginWidth setLayout GridData GridData verticalAlignment GridData horizontalAlignment GridData setLayoutData setFont getFont createStepFilterPreferences
see I Workbench Preference Page init I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
private void handle Filter Viewer Key Press Key Event event if event character SWT DEL event state Mask 0 remove Filters  handleFilterViewerKeyPress KeyEvent stateMask removeFilters
f Filter Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Filter filter Filter event get Element f Step Filter Content Provider toggle Filter filter  fFilterViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getElement fStepFilterContentProvider toggleFilter
f Filter Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Selection selection event get Selection if selection is Empty f Remove Filter Button set Enabled false else f Remove Filter Button set Enabled true  fFilterViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection isEmpty fRemoveFilterButton setEnabled fRemoveFilterButton setEnabled
f Filter Viewer get Control add Key Listener new Key Adapter public void key Pressed Key Event event handle Filter Viewer Key Press event  fFilterViewer getControl addKeyListener KeyAdapter keyPressed KeyEvent handleFilterViewerKeyPress
Create a group to contain the step filter related widgetry private void create Step Filter Preferences Composite parent Font font parent get Font top level container Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH container set Layout Data gd container set Font font table label f Table Label new Label container SWT NONE f Table Label set Text DebugUI Messages get String Java Step Filter Preference Page Defined step fi lters  8 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 f Table Label set Layout Data gd f Table Label set Font font f Filter Viewer Checkbox Table Viewer new Check List container SWT H SCROLL SWT V SCROLL SWT BORDER SWT MULTI SWT FULL SELECTION f Filter Viewer set Label Provider new Filter Label Provider f Filter Viewer set Sorter new Filter Viewer Sorter f Step Filter Content Provider new Step Filter Content Provider f Filter Viewer f Filter Viewer set Content Provider f Step Filter Content Provider input just needs to be non null f Filter Viewer set Input this filter table f Filter Table f Filter Viewer get Table f Filter Table set Font font gd new Grid Data Grid Data FILL BOTH Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL gd width Hint 1 just set it to something small and let ig GRAB the rest f Filter Table set Layout Data gd Table Layout table Layout new Table Layout Column Weight Data column Layout Data new Column Weight Data 100 column Layout Data resizable true table Layout add Column Data column Layout Data f Filter Table set Layout table Layout f Filter Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Filter filter Filter event get Element f Step Filter Content Provider toggle Filter filter f Filter Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Selection selection event get Selection if selection is Empty f Remove Filter Button set Enabled false else f Remove Filter Button set Enabled true f Filter Viewer get Control add Key Listener new Key Adapter public void key Pressed Key Event event handle Filter Viewer Key Press event create Step Filter Buttons container create Step Filter Checkboxes container  createStepFilterPreferences getFont GridLayout GridLayout numColumns marginHeight marginWidth setLayout GridData GridData GridData FILL_BOTH setLayoutData setFont fTableLabel fTableLabel setText DebugUIMessages getString JavaStepFilterPreferencePage Defined_step_fi lters__8 GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan fTableLabel setLayoutData fTableLabel setFont fFilterViewer CheckboxTableViewer newCheckList H_SCROLL V_SCROLL FULL_SELECTION fFilterViewer setLabelProvider FilterLabelProvider fFilterViewer setSorter FilterViewerSorter fStepFilterContentProvider StepFilterContentProvider fFilterViewer fFilterViewer setContentProvider fStepFilterContentProvider fFilterViewer setInput fFilterTable fFilterViewer getTable fFilterTable setFont GridData GridData FILL_BOTH GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL widthHint fFilterTable setLayoutData TableLayout tableLayout TableLayout ColumnWeightData columnLayoutData ColumnWeightData columnLayoutData tableLayout addColumnData columnLayoutData fFilterTable setLayout tableLayout fFilterViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getElement fStepFilterContentProvider toggleFilter fFilterViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection isEmpty fRemoveFilterButton setEnabled fRemoveFilterButton setEnabled fFilterViewer getControl addKeyListener KeyAdapter keyPressed KeyEvent handleFilterViewerKeyPress createStepFilterButtons createStepFilterCheckboxes
private void create Step Filter Checkboxes Composite container Font font container get Font filter synthetic checkbox f Filter Synthetic Button new Button container SWT CHECK f Filter Synthetic Button set Text DebugUI Messages get String Java Step Filter Preference Page Filter s ynthetic methods  requires VM support  17 NON NLS 1 Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 f Filter Synthetic Button set Layout Data gd f Filter Synthetic Button set Font font filter static checkbox f Filter Static Button new Button container SWT CHECK f Filter Static Button set Text DebugUI Messages get String Java Step Filter Preference Page Filter static  initializers 18 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 f Filter Static Button set Layout Data gd f Filter Static Button set Font font filter constructor checkbox f Filter Constructor Button new Button container SWT CHECK f Filter Constructor Button set Text DebugUI Messages get String Java Step Filter Preference Page Filter co nstructors 19 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 f Filter Constructor Button set Layout Data gd f Filter Constructor Button set Font font f Filter Synthetic Button set Selection get Preference Store get Boolean IJDI Preferences Constants PREF FILTER SYNTHETICS f Filter Static Button set Selection get Preference Store get Boolean IJDI Preferences Constants PREF FILTER STATIC INITIALIZERS f Filter Constructor Button set Selection get Preference Store get Boolean IJDI Preferences Constants PREF FILTER CONSTRUCTORS  createStepFilterCheckboxes getFont fFilterSyntheticButton fFilterSyntheticButton setText DebugUIMessages getString JavaStepFilterPreferencePage Filter_s ynthetic_methods_ requires_VM_support _17 GridData GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan fFilterSyntheticButton setLayoutData fFilterSyntheticButton setFont fFilterStaticButton fFilterStaticButton setText DebugUIMessages getString JavaStepFilterPreferencePage Filter_static_ initializers_18 GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan fFilterStaticButton setLayoutData fFilterStaticButton setFont fFilterConstructorButton fFilterConstructorButton setText DebugUIMessages getString JavaStepFilterPreferencePage Filter_co nstructors_19 GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan fFilterConstructorButton setLayoutData fFilterConstructorButton setFont fFilterSyntheticButton setSelection getPreferenceStore getBoolean IJDIPreferencesConstants PREF_FILTER_SYNTHETICS fFilterStaticButton setSelection getPreferenceStore getBoolean IJDIPreferencesConstants PREF_FILTER_STATIC_INITIALIZERS fFilterConstructorButton setSelection getPreferenceStore getBoolean IJDIPreferencesConstants PREF_FILTER_CONSTRUCTORS
f Add Filter Button set Font font f Add Filter Button add Listener SWT Selection new Listener public void handle Event Event e add Filter  fAddFilterButton setFont fAddFilterButton addListener handleEvent addFilter
set Button Layout Data f Add Type Button f Add Type Button add Listener SWT Selection new Listener public void handle Event Event e add Type  setButtonLayoutData fAddTypeButton fAddTypeButton addListener handleEvent addType
set Button Layout Data f Add Package Button f Add Package Button add Listener SWT Selection new Listener public void handle Event Event e add Package  setButtonLayoutData fAddPackageButton fAddPackageButton addListener handleEvent addPackage
set Button Layout Data f Remove Filter Button f Remove Filter Button add Listener SWT Selection new Listener public void handle Event Event e remove Filters  setButtonLayoutData fRemoveFilterButton fRemoveFilterButton addListener handleEvent removeFilters
set Button Layout Data f Enable All Button f Enable All Button add Listener SWT Selection new Listener public void handle Event Event e check All Filters true  setButtonLayoutData fEnableAllButton fEnableAllButton addListener handleEvent checkAllFilters
set Button Layout Data f Disable All Button f Disable All Button add Listener SWT Selection new Listener public void handle Event Event e check All Filters false  setButtonLayoutData fDisableAllButton fDisableAllButton addListener handleEvent checkAllFilters
private void create Step Filter Buttons Composite container Font font container get Font initialize Dialog Units container button container Composite button Container new Composite container SWT NONE Grid Data gd new Grid Data Grid Data FILL VERTICAL button Container set Layout Data gd Grid Layout button Layout new Grid Layout button Layout num Columns 1 button Layout margin Height 0 button Layout margin Width 0 button Container set Layout button Layout Add filter button f Add Filter Button new Button button Container SWT PUSH f Add Filter Button set Text DebugUI Messages get String Java Step Filter Preference Page Add  Filter 9 NON NLS 1 f Add Filter Button set Tool Tip Text DebugUI Messages get String Java Step Filter Preference Page Key in the name of a new step filter 10 NON NLS 1 set Button Layout Data f Add Filter Button f Add Filter Button set Font font f Add Filter Button add Listener SWT Selection new Listener public void handle Event Event e add Filter Add type button f Add Type Button new Button button Container SWT PUSH f Add Type Button set Text DebugUI Messages get String Java Step Filter Preference Page Add  Type  11 NON NLS 1 f Add Type Button set Tool Tip Text DebugUI Messages get String Java Step Filter Preference Page Choose a Java type and add it to step filters 12 NON NLS 1 f Add Type Button set Font font set Button Layout Data f Add Type Button f Add Type Button add Listener SWT Selection new Listener public void handle Event Event e add Type Add package button f Add Package Button new Button button Container SWT PUSH f Add Package Button set Text DebugUI Messages get String Java Step Filter Preference Page Add  Package  13 NON NLS 1 f Add Package Button set Tool Tip Text DebugUI Messages get String Java Step Filter Preference Page Choose a package and add it to step filters 14 NON NLS 1 f Add Package Button set Font font set Button Layout Data f Add Package Button f Add Package Button add Listener SWT Selection new Listener public void handle Event Event e add Package Remove button f Remove Filter Button new Button button Container SWT PUSH f Remove Filter Button set Text DebugUI Messages get String Java Step Filter Preference Page Remove 15 NON NLS 1 f Remove Filter Button set Tool Tip Text DebugUI Messages get String Java Step Filter Preference Page Remove all selected step filters 16 NON NLS 1 f Remove Filter Button set Font font set Button Layout Data f Remove Filter Button f Remove Filter Button add Listener SWT Selection new Listener public void handle Event Event e remove Filters f Remove Filter Button set Enabled false copied from List Dialog Field Create Separator Label separator new Label button Container SWT NONE separator set Visible false gd new Grid Data gd horizontal Alignment Grid Data FILL gd vertical Alignment Grid Data BEGINNING gd height Hint 4 separator set Layout Data gd f Enable All Button new Button button Container SWT PUSH f Enable All Button set Text DebugUI Messages get String Java Step Filter Preference Page Enable All 1 NON NLS 1 f Enable All Button set Tool Tip Text DebugUI Messages get String Java Step Filter Preference Page Enables all step filters 2 NON NLS 1 f Enable All Button set Font font set Button Layout Data f Enable All Button f Enable All Button add Listener SWT Selection new Listener public void handle Event Event e check All Filters true f Disable All Button new Button button Container SWT PUSH f Disable All Button set Text DebugUI Messages get String Java Step Filter Preference Page Disa ble All 3 NON NLS 1 f Disable All Button set Tool Tip Text DebugUI Messages get String Java Step Filter Preference Page Disables all step filters 4 NON NLS 1 f Disable All Button set Font font set Button Layout Data f Disable All Button f Disable All Button add Listener SWT Selection new Listener public void handle Event Event e check All Filters false  createStepFilterButtons getFont initializeDialogUnits buttonContainer GridData GridData GridData FILL_VERTICAL buttonContainer setLayoutData GridLayout buttonLayout GridLayout buttonLayout numColumns buttonLayout marginHeight buttonLayout marginWidth buttonContainer setLayout buttonLayout fAddFilterButton buttonContainer fAddFilterButton setText DebugUIMessages getString JavaStepFilterPreferencePage Add_ Filter_9 fAddFilterButton setToolTipText DebugUIMessages getString JavaStepFilterPreferencePage Key_in_the_name_of_a_new_step_filter_10 setButtonLayoutData fAddFilterButton fAddFilterButton setFont fAddFilterButton addListener handleEvent addFilter fAddTypeButton buttonContainer fAddTypeButton setText DebugUIMessages getString JavaStepFilterPreferencePage Add_ _11 fAddTypeButton setToolTipText DebugUIMessages getString JavaStepFilterPreferencePage Choose_a_Java_type_and_add_it_to_step_filters_12 fAddTypeButton setFont setButtonLayoutData fAddTypeButton fAddTypeButton addListener handleEvent addType fAddPackageButton buttonContainer fAddPackageButton setText DebugUIMessages getString JavaStepFilterPreferencePage Add_ _13 fAddPackageButton setToolTipText DebugUIMessages getString JavaStepFilterPreferencePage Choose_a_package_and_add_it_to_step_filters_14 fAddPackageButton setFont setButtonLayoutData fAddPackageButton fAddPackageButton addListener handleEvent addPackage fRemoveFilterButton buttonContainer fRemoveFilterButton setText DebugUIMessages getString JavaStepFilterPreferencePage Remove_15 fRemoveFilterButton setToolTipText DebugUIMessages getString JavaStepFilterPreferencePage Remove_all_selected_step_filters_16 fRemoveFilterButton setFont setButtonLayoutData fRemoveFilterButton fRemoveFilterButton addListener handleEvent removeFilters fRemoveFilterButton setEnabled ListDialogField CreateSeparator buttonContainer setVisible GridData horizontalAlignment GridData verticalAlignment GridData heightHint setLayoutData fEnableAllButton buttonContainer fEnableAllButton setText DebugUIMessages getString JavaStepFilterPreferencePage Enable_All_1 fEnableAllButton setToolTipText DebugUIMessages getString JavaStepFilterPreferencePage Enables_all_step_filters_2 fEnableAllButton setFont setButtonLayoutData fEnableAllButton fEnableAllButton addListener handleEvent checkAllFilters fDisableAllButton buttonContainer fDisableAllButton setText DebugUIMessages getString JavaStepFilterPreferencePage ble_All_3 fDisableAllButton setToolTipText DebugUIMessages getString JavaStepFilterPreferencePage Disables_all_step_filters_4 fDisableAllButton setFont setButtonLayoutData fDisableAllButton fDisableAllButton addListener handleEvent checkAllFilters
private void check All Filters boolean check Object filters f Step Filter Content Provider get Elements null for int i 0 i filters length i Filter filters i set Checked check f Filter Viewer set All Checked check  checkAllFilters fStepFilterContentProvider getElements setChecked fFilterViewer setAllChecked
private void add Filter Shell shell get Shell Filter existing Filters Filter f Step Filter Content Provider get Elements null Filter new Filter Create Step Filter Dialog show Create Step Filter Dialog shell existing Filters if new Filter null commit New Filter new Filter  addFilter getShell existingFilters fStepFilterContentProvider getElements newFilter CreateStepFilterDialog showCreateStepFilterDialog existingFilters newFilter commitNewFilter newFilter
private void commit New Filter Filter new Filter String new Filter Name new Filter get Name if new Filter is a duplicate of existing just set state of existing to checked Object filters f Step Filter Content Provider get Elements null for int i 0 i filters length i Filter filter Filter filters i if filter get Name equals new Filter Name f Step Filter Content Provider set Checked filter true cleanup Editor return f Step Filter Content Provider add Filter new Filter Name true f New Table Item f Filter Table get Item 0 f New Table Item set Text new Filter Name f Filter Viewer refresh cleanup Editor  commitNewFilter newFilter newFilterName newFilter getName newFilter fStepFilterContentProvider getElements getName newFilterName fStepFilterContentProvider setChecked cleanupEditor fStepFilterContentProvider addFilter newFilterName fNewTableItem fFilterTable getItem fNewTableItem setText newFilterName fFilterViewer cleanupEditor
Cleanup all widgetry resources used by the in place editing private void cleanup Editor if f Editor Text null f New Table Item null f Table Editor set Editor null null 0 f Editor Text dispose f Editor Text null private void add Type Shell shell get Shell Selection Dialog dialog null try dialog JavaUI create Type Dialog shell PlatformUI get Workbench get Progress Service Search Engine create Workspace Scope I Java Element Search Constants CONSIDER CLASSES false catch Java Model Exception jme String title DebugUI Messages get String Java Step Filter Preference Page Add type to step filters 20 NON NLS 1 String message DebugUI Messages get String Java Step Filter Preference Page Could not open type selection dialog for step filters 21 NON NLS 1 Exception Handler handle jme title message return dialog set Title DebugUI Messages get String Java Step Filter Preference Page Add type to step filters 20 NON NLS 1 dialog set Message DebugUI Messages get String Java Step Filter Preference Page Select a type to filter when stepping 23 NON NLS 1 if dialog open I Dialog Constants CANCEL ID return Object types dialog get Result if types null types length 0 I Type type I Type types 0 f Step Filter Content Provider add Filter type get Fully Qualified Name true  cleanupEditor fEditorText fNewTableItem fTableEditor setEditor fEditorText fEditorText addType getShell SelectionDialog createTypeDialog getWorkbench getProgressService SearchEngine createWorkspaceScope IJavaElementSearchConstants CONSIDER_CLASSES JavaModelException DebugUIMessages getString JavaStepFilterPreferencePage Add_type_to_step_filters_20 DebugUIMessages getString JavaStepFilterPreferencePage Could_not_open_type_selection_dialog_for_step_filters_21 ExceptionHandler setTitle DebugUIMessages getString JavaStepFilterPreferencePage Add_type_to_step_filters_20 setMessage DebugUIMessages getString JavaStepFilterPreferencePage Select_a_type_to_filter_when_stepping_23 IDialogConstants CANCEL_ID getResult IType IType fStepFilterContentProvider addFilter getFullyQualifiedName
private void add Package Shell shell get Shell Element List Selection Dialog dialog null try dialog JDI DebugUI Plugin create All Packages Dialog shell null false catch Java Model Exception jme String title DebugUI Messages get String Java Step Filter Preference Page Add package to step filters 24 NON NLS 1 String message DebugUI Messages get String Java Step Filter Preference Page Could not open package selection dialog for step filters 25 NON NLS 1 Exception Handler handle jme title message return if dialog null return dialog set Title DebugUI Messages get String Java Step Filter Preference Page Add package to step filters 24 NON NLS 1 dialog set Message DebugUI Messages get String Java Step Filter Preference Page Select a package to filter when stepping 27 NON NLS 1 dialog set Multiple Selection true if dialog open I Dialog Constants CANCEL ID return Object packages dialog get Result if packages null for int i 0 i packages length i I Java Element pkg I Java Element packages i String filter pkg get Element Name NON NLS 1 f Step Filter Content Provider add Filter filter true  addPackage getShell ElementListSelectionDialog JDIDebugUIPlugin createAllPackagesDialog JavaModelException DebugUIMessages getString JavaStepFilterPreferencePage Add_package_to_step_filters_24 DebugUIMessages getString JavaStepFilterPreferencePage Could_not_open_package_selection_dialog_for_step_filters_25 ExceptionHandler setTitle DebugUIMessages getString JavaStepFilterPreferencePage Add_package_to_step_filters_24 setMessage DebugUIMessages getString JavaStepFilterPreferencePage Select_a_package_to_filter_when_stepping_27 setMultipleSelection IDialogConstants CANCEL_ID getResult IJavaElement IJavaElement getElementName fStepFilterContentProvider addFilter
Removes the selected filters private void remove Filters I Structured Selection selection I Structured Selection f Filter Viewer get Selection f Step Filter Content Provider remove Filters selection to Array  removeFilters IStructuredSelection IStructuredSelection fFilterViewer getSelection fStepFilterContentProvider removeFilters toArray
see I Preference Page perform Ok public boolean perform Ok f Step Filter Content Provider save Filters JDI DebugUI Plugin get Default save Plugin Preferences return true  IPreferencePage performOk performOk fStepFilterContentProvider saveFilters JDIDebugUIPlugin getDefault savePluginPreferences
Sets the default preferences see Preference Page perform Defaults protected void perform Defaults set Default Values super perform Defaults  PreferencePage performDefaults performDefaults setDefaultValues performDefaults
private void set Default Values f Step Filter Content Provider set Defaults  setDefaultValues fStepFilterContentProvider setDefaults
Returns a list of active step filters return list protected List create Active Step Filters List String strings Java Debug Options Manager parse List get Preference Store get String IJDI Preferences Constants PREF ACTIVE FILTERS LIST return Arrays as List strings  createActiveStepFiltersList JavaDebugOptionsManager parseList getPreferenceStore getString IJDIPreferencesConstants PREF_ACTIVE_FILTERS_LIST asList
Returns a list of active step filters return list protected List create Inactive Step Filters List String strings Java Debug Options Manager parse List get Preference Store get String IJDI Preferences Constants PREF INACTIVE FILTERS LIST return Arrays as List strings  createInactiveStepFiltersList JavaDebugOptionsManager parseList getPreferenceStore getString IJDIPreferencesConstants PREF_INACTIVE_FILTERS_LIST asList
Returns a list of the default active step filters return list protected List create Default Active Step Filters List String strings Java Debug Options Manager parse List get Preference Store get Default String IJDI Preferences Constants PREF ACTIVE FILTERS LIST return Arrays as List strings  createDefaultActiveStepFiltersList JavaDebugOptionsManager parseList getPreferenceStore getDefaultString IJDIPreferencesConstants PREF_ACTIVE_FILTERS_LIST asList
Returns a list of the default active step filters return list protected List create Default Inactive Step Filters List String strings Java Debug Options Manager parse List get Preference Store get Default String IJDI Preferences Constants PREF INACTIVE FILTERS LIST return Arrays as List strings  createDefaultInactiveStepFiltersList JavaDebugOptionsManager parseList getPreferenceStore getDefaultString IJDIPreferencesConstants PREF_INACTIVE_FILTERS_LIST asList
protected void update Actions if f Enable All Button null boolean enabled f Filter Viewer get Table get Item Count 0 f Enable All Button set Enabled enabled f Disable All Button set Enabled enabled  updateActions fEnableAllButton fFilterViewer getTable getItemCount fEnableAllButton setEnabled fDisableAllButton setEnabled
public Step Filter Content Provider Checkbox Table Viewer viewer f Viewer viewer List active create Active Step Filters List List inactive create Inactive Step Filters List populate Filters active inactive update Actions  StepFilterContentProvider CheckboxTableViewer fViewer createActiveStepFiltersList createInactiveStepFiltersList populateFilters updateActions
public void set Defaults f Viewer remove f Filters to Array List active create Default Active Step Filters List List inactive create Default Inactive Step Filters List populate Filters active inactive f Filter Synthetic Button set Selection get Preference Store get Default Boolean IJDI Preferences Constants PREF FILTER SYNTHETICS f Filter Static Button set Selection get Preference Store get Default Boolean IJDI Preferences Constants PREF FILTER STATIC INITIALIZERS f Filter Constructor Button set Selection get Preference Store get Default Boolean IJDI Preferences Constants PREF FILTER CONSTRUCTORS  setDefaults fViewer fFilters toArray createDefaultActiveStepFiltersList createDefaultInactiveStepFiltersList populateFilters fFilterSyntheticButton setSelection getPreferenceStore getDefaultBoolean IJDIPreferencesConstants PREF_FILTER_SYNTHETICS fFilterStaticButton setSelection getPreferenceStore getDefaultBoolean IJDIPreferencesConstants PREF_FILTER_STATIC_INITIALIZERS fFilterConstructorButton setSelection getPreferenceStore getDefaultBoolean IJDIPreferencesConstants PREF_FILTER_CONSTRUCTORS
protected void populate Filters List active List List inactive List f Filters new Array List active List size inactive List size populate List active List true populate List inactive List false  populateFilters activeList inactiveList fFilters ArrayList activeList inactiveList populateList activeList populateList inactiveList
protected void populate List List list boolean checked Iterator iterator list iterator while iterator has Next String name String iterator next add Filter name checked  populateList hasNext addFilter
public Filter add Filter String name boolean checked Filter filter new Filter name checked if f Filters contains filter f Filters add filter f Viewer add filter f Viewer set Checked filter checked update Actions return filter  addFilter fFilters fFilters fViewer fViewer setChecked updateActions
public void save Filters get Preference Store set Value IJDI Preferences Constants PREF FILTER CONSTRUCTORS f Filter Constructor Button get Selection get Preference Store set Value IJDI Preferences Constants PREF FILTER STATIC INITIALIZERS f Filter Static Button get Selection get Preference Store set Value IJDI Preferences Constants PREF FILTER SYNTHETICS f Filter Synthetic Button get Selection List active new Array List f Filters size List inactive new Array List f Filters size Iterator iterator f Filters iterator while iterator has Next Filter filter Filter iterator next String name filter get Name if filter is Checked active add name else inactive add name String pref Java Debug Options Manager serialize List String active to Array new String active size get Preference Store set Value IJDI Preferences Constants PREF ACTIVE FILTERS LIST pref pref Java Debug Options Manager serialize List String inactive to Array new String inactive size get Preference Store set Value IJDI Preferences Constants PREF INACTIVE FILTERS LIST pref  saveFilters getPreferenceStore setValue IJDIPreferencesConstants PREF_FILTER_CONSTRUCTORS fFilterConstructorButton getSelection getPreferenceStore setValue IJDIPreferencesConstants PREF_FILTER_STATIC_INITIALIZERS fFilterStaticButton getSelection getPreferenceStore setValue IJDIPreferencesConstants PREF_FILTER_SYNTHETICS fFilterSyntheticButton getSelection ArrayList fFilters ArrayList fFilters fFilters hasNext getName isChecked JavaDebugOptionsManager serializeList toArray getPreferenceStore setValue IJDIPreferencesConstants PREF_ACTIVE_FILTERS_LIST JavaDebugOptionsManager serializeList toArray getPreferenceStore setValue IJDIPreferencesConstants PREF_INACTIVE_FILTERS_LIST
public void remove Filters Object filters for int i 0 i filters length i Filter filter Filter filters i f Filters remove filter f Viewer remove filters update Actions  removeFilters fFilters fViewer updateActions
public void set Checked Filter filter boolean checked filter set Checked checked f Viewer set Checked filter checked  setChecked setChecked fViewer setChecked
public void toggle Filter Filter filter boolean new State filter is Checked filter set Checked new State f Viewer set Checked filter new State  toggleFilter newState isChecked setChecked newState fViewer setChecked newState
see I Structured Content Provider get Elements Object public Object get Elements Object input Element return f Filters to Array new Filter 0  IStructuredContentProvider getElements getElements inputElement fFilters toArray
see I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
see I Content Provider dispose public void dispose  IContentProvider

public boolean test Attribute Object target String name String value if target instanceof I Java Thread if name equals Terminate Evaluation Action Filter NON NLS 1 value equals supports Terminate Evaluation NON NLS 1 I Java Thread thread I Java Thread target return thread is Performing Evaluation else if name equals Exclude Exception Location Filter NON NLS 1 value equals suspended At Exception NON NLS 1 I Java Thread thread I Java Thread target I Breakpoint breakpoints thread get Breakpoints for int i 0 i breakpoints length i I Breakpoint breakpoint breakpoints i try if breakpoint is Registered breakpoint instanceof I Java Exception Breakpoint return true catch Core Exception e return false  testAttribute IJavaThread TerminateEvaluationActionFilter supportsTerminateEvaluation IJavaThread IJavaThread isPerformingEvaluation ExcludeExceptionLocationFilter suspendedAtException IJavaThread IJavaThread IBreakpoint getBreakpoints IBreakpoint isRegistered IJavaExceptionBreakpoint CoreException

private static Set init Primitive Types Hash Set set new Hash Set 8 set add short NON NLS 1 set add int NON NLS 1 set add long NON NLS 1 set add float NON NLS 1 set add double NON NLS 1 set add boolean NON NLS 1 set add byte NON NLS 1 set add char NON NLS 1 set add null NON NLS 1 return set  initPrimitiveTypes HashSet HashSet
see org eclipse ui I Action Filter test Attribute Object String String public boolean test Attribute Object target String name String value if target instanceof I Java Variable I Java Variable var I Java Variable target I Value var Value try var Value var get Value if name equals Primitive Variable Action Filter NON NLS 1 NON NLS 2 if value equals is Primitive NON NLS 1 return is Primitive Type var else if value equals is Value Primitive NON NLS 1 return is Value Primitive Type var else if name equals Concrete Variable Action Filter value equals is Concrete NON NLS 1 NON NLS 2 return is Declared Same As Concrete var else if name equals Java Variable Action Filter value equals instance Filter NON NLS 1 NON NLS 2 return var is Static var Value instanceof I Java Object I Java Object var Value get Java Type instanceof I Java Class Type I Java Debug Target var get Debug Target supports Instance Breakpoints else if name equals Detail Formatter Filter value equals is Defined NON NLS 1 NON NLS 2 return var Value instanceof I Java Object Java Detail Formatters Manager get Default has Associated Detail Formatter I Java Object var Value get Java Type catch Debug Exception e JDI DebugUI Plugin log e return false  IActionFilter testAttribute testAttribute IJavaVariable IJavaVariable IJavaVariable IValue varValue varValue getValue PrimitiveVariableActionFilter isPrimitive isPrimitiveType isValuePrimitive isValuePrimitiveType ConcreteVariableActionFilter isConcrete isDeclaredSameAsConcrete JavaVariableActionFilter instanceFilter isStatic varValue IJavaObject IJavaObject varValue getJavaType IJavaClassType IJavaDebugTarget getDebugTarget supportsInstanceBreakpoints DetailFormatterFilter isDefined varValue IJavaObject JavaDetailFormattersManager getDefault hasAssociatedDetailFormatter IJavaObject varValue getJavaType DebugException JDIDebugUIPlugin
protected boolean is Declared Same As Concrete I Java Variable var throws Debug Exception I Value value var get Value if value instanceof JDI Null Value return false return var get Reference Type Name equals value get Reference Type Name  isDeclaredSameAsConcrete IJavaVariable DebugException IValue getValue JDINullValue getReferenceTypeName getReferenceTypeName
protected String get Type Name To Open String ref Type ref Type Open Variable Type Action remove Array ref Type if fg Primitive Types contains ref Type return null return ref Type  getTypeNameToOpen refType refType OpenVariableTypeAction removeArray refType fgPrimitiveTypes refType refType
protected boolean is Primitive Type I Java Variable var try return get Type Name To Open var get Reference Type Name null catch Debug Exception e JDI DebugUI Plugin log e fall through return false  isPrimitiveType IJavaVariable getTypeNameToOpen getReferenceTypeName DebugException JDIDebugUIPlugin
protected boolean is Value Primitive Type I Java Variable var try return get Type Name To Open var get Value get Reference Type Name null catch Debug Exception e JDI DebugUI Plugin log e fall through return false  isValuePrimitiveType IJavaVariable getTypeNameToOpen getValue getReferenceTypeName DebugException JDIDebugUIPlugin

see org eclipse debug core model I Watch Expression Delegate get Value java lang String org eclipse debug core model I Debug Element public void evaluate Expression String expression I Debug Element context I Watch Expression Listener listener f Expression Text expression f Listener listener find a stack frame context if possible I Stack Frame frame null if context instanceof I Stack Frame frame I Stack Frame context else if context instanceof I Thread try frame I Thread context get Top Stack Frame catch Debug Exception e if frame null f Listener watch Evaluation Finished null else consult the adapter in case of a wrappered debug model final I Java Stack Frame java Stack Frame I Java Stack Frame I Adaptable frame get Adapter I Java Stack Frame class if java Stack Frame null do Evaluation java Stack Frame else f Listener watch Evaluation Finished null  IWatchExpressionDelegate getValue IDebugElement evaluateExpression IDebugElement IWatchExpressionListener fExpressionText fListener IStackFrame IStackFrame IStackFrame IThread IThread getTopStackFrame DebugException fListener watchEvaluationFinished IJavaStackFrame javaStackFrame IJavaStackFrame IAdaptable getAdapter IJavaStackFrame javaStackFrame doEvaluation javaStackFrame fListener watchEvaluationFinished
Ask to evaluate the expression in the context of the given stack frame The evaluation is performed asynchronously A change debug event with this as the source is fired when the evaluation is completed param java Stack Frame the stack frame in the context of which performed the evaluation protected void do Evaluation I Java Stack Frame java Stack Frame I Java Thread thread I Java Thread java Stack Frame get Thread if pre Evaluation Check thread thread queue Runnable new Evaluation Runnable java Stack Frame else f Listener watch Evaluation Finished null  javaStackFrame doEvaluation IJavaStackFrame javaStackFrame IJavaThread IJavaThread javaStackFrame getThread preEvaluationCheck queueRunnable EvaluationRunnable javaStackFrame fListener watchEvaluationFinished
private boolean pre Evaluation Check I Java Thread java Thread if java Thread null return false if java Thread is Suspended JDI Thread java Thread is Invoking Method return false return true  preEvaluationCheck IJavaThread javaThread javaThread javaThread isSuspended JDIThread javaThread isInvokingMethod
private final I Java Stack Frame f Stack Frame private Evaluation Runnable I Java Stack Frame frame f Stack Frame frame  IJavaStackFrame fStackFrame EvaluationRunnable IJavaStackFrame fStackFrame
public void evaluation Complete final I Evaluation Result result I Watch Expression Result watch Result new I Watch Expression Result public I Value get Value return result get Value  evaluationComplete IEvaluationResult IWatchExpressionResult watchResult IWatchExpressionResult IValue getValue getValue
return result get Value public boolean has Errors return result has Errors  getValue hasErrors hasErrors
return result has Errors public String get Error Messages return Java Inspect Expression get Error Messages result  hasErrors getErrorMessages JavaInspectExpression getErrorMessages
return Java Inspect Expression get Error Messages result public String get Expression Text return result get Snippet  JavaInspectExpression getErrorMessages getExpressionText getSnippet
return result get Snippet public Debug Exception get Exception return result get Exception  getSnippet DebugException getException getException
I Evaluation Listener listener new I Evaluation Listener public void evaluation Complete final I Evaluation Result result I Watch Expression Result watch Result new I Watch Expression Result public I Value get Value return result get Value public boolean has Errors return result has Errors public String get Error Messages return Java Inspect Expression get Error Messages result public String get Expression Text return result get Snippet public Debug Exception get Exception return result get Exception f Listener watch Evaluation Finished watch Result  IEvaluationListener IEvaluationListener evaluationComplete IEvaluationResult IWatchExpressionResult watchResult IWatchExpressionResult IValue getValue getValue hasErrors hasErrors getErrorMessages JavaInspectExpression getErrorMessages getExpressionText getSnippet DebugException getException getException fListener watchEvaluationFinished watchResult
public void run I Java Project project get Project f Stack Frame if project null f Listener watch Evaluation Finished null return I Ast Evaluation Engine evaluation Engine JDI DebugUI Plugin get Default get Evaluation Engine project I Java Debug Target f Stack Frame get Debug Target the evaluation listener I Evaluation Listener listener new I Evaluation Listener public void evaluation Complete final I Evaluation Result result I Watch Expression Result watch Result new I Watch Expression Result public I Value get Value return result get Value public boolean has Errors return result has Errors public String get Error Messages return Java Inspect Expression get Error Messages result public String get Expression Text return result get Snippet public Debug Exception get Exception return result get Exception f Listener watch Evaluation Finished watch Result try evaluation Engine evaluate f Expression Text f Stack Frame listener Debug Event EVALUATION IMPLICIT false catch Debug Exception e JDI Debug Plugin log e f Listener watch Evaluation Finished null  IJavaProject getProject fStackFrame fListener watchEvaluationFinished IAstEvaluationEngine evaluationEngine JDIDebugUIPlugin getDefault getEvaluationEngine IJavaDebugTarget fStackFrame getDebugTarget IEvaluationListener IEvaluationListener evaluationComplete IEvaluationResult IWatchExpressionResult watchResult IWatchExpressionResult IValue getValue getValue hasErrors hasErrors getErrorMessages JavaInspectExpression getErrorMessages getExpressionText getSnippet DebugException getException getException fListener watchEvaluationFinished watchResult evaluationEngine fExpressionText fStackFrame DebugEvent EVALUATION_IMPLICIT DebugException JDIDebugPlugin fListener watchEvaluationFinished
Return the project associated with the given stack frame private I Java Project get Project I Java Stack Frame java Stack Frame I Launch launch java Stack Frame get Launch if launch null return null I Source Locator locator launch get Source Locator if locator null return null Object source Element locator get Source Element java Stack Frame if source Element instanceof I Java Element source Element instanceof I Adaptable source Element I Adaptable source Element get Adapter I Java Element class if source Element instanceof I Java Element return I Java Element source Element get Java Project return null  IJavaProject getProject IJavaStackFrame javaStackFrame ILaunch javaStackFrame getLaunch ISourceLocator getSourceLocator sourceElement getSourceElement javaStackFrame sourceElement IJavaElement sourceElement IAdaptable sourceElement IAdaptable sourceElement getAdapter IJavaElement sourceElement IJavaElement IJavaElement sourceElement getJavaProject

public static I Region find Word I Document document int offset int start 1 int end 1 try int pos offset char c while pos 0 c document get Char pos if Character is Java Identifier Part c break pos start pos pos offset int length document get Length while pos length c document get Char pos if Character is Java Identifier Part c break pos end pos catch Bad Location Exception x if start 1 end 1 if start offset end offset return new Region offset 0 else if start offset return new Region start end start else return new Region start 1 end start 1 return null  IRegion findWord IDocument getChar isJavaIdentifierPart getLength getChar isJavaIdentifierPart BadLocationException

private final static String DISABLED disabled NON NLS 1 private static Color get Color I Preference Store store String key I Color Manager manager RGB rgb Preference Converter get Color store key return manager get Color rgb  getColor IPreferenceStore IColorManager PreferenceConverter getColor getColor
private static Color get Color I Preference Store store String key Java Text Tools text Tools Java Plugin get Default get Java Text Tools return get Color store key text Tools get Color Manager  getColor IPreferenceStore JavaTextTools textTools JavaPlugin getDefault getJavaTextTools getColor textTools getColorManager
private static Display Completion Processor get Display Processor Content Assistant assistant I Content Assist Processor p assistant get Content Assist Processor I Document DEFAULT CONTENT TYPE if p instanceof Display Completion Processor return Display Completion Processor p return null  DisplayCompletionProcessor getDisplayProcessor ContentAssistant IContentAssistProcessor getContentAssistProcessor IDocument DEFAULT_CONTENT_TYPE DisplayCompletionProcessor DisplayCompletionProcessor
private static Java Snippet Completion Processor get Java Snippet Processor Content Assistant assistant I Content Assist Processor p assistant get Content Assist Processor I Document DEFAULT CONTENT TYPE if p instanceof Java Snippet Completion Processor return Java Snippet Completion Processor p return null  JavaSnippetCompletionProcessor getJavaSnippetProcessor ContentAssistant IContentAssistProcessor getContentAssistProcessor IDocument DEFAULT_CONTENT_TYPE JavaSnippetCompletionProcessor JavaSnippetCompletionProcessor
private static void configure Display Processor Content Assistant assistant I Preference Store store Display Completion Processor dcp get Display Processor assistant if dcp null return String triggers store get String Preference Constants CODEASSIST AUTOACTIVATION TRIGGERS JAVA if triggers null dcp set Completion Proposal Auto Activation Characters triggers to Char Array boolean enabled store get Boolean Preference Constants CODEASSIST SHOW VISIBLE PROPOSALS restrict Proposals To Visibility enabled enabled store get Boolean Preference Constants CODEASSIST CASE SENSITIVITY restrict Proposals To Matching Cases enabled enabled store get Boolean Preference Constants CODEASSIST ORDER PROPOSALS dcp order Proposals Alphabetically enabled  configureDisplayProcessor ContentAssistant IPreferenceStore DisplayCompletionProcessor getDisplayProcessor getString PreferenceConstants CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA setCompletionProposalAutoActivationCharacters toCharArray getBoolean PreferenceConstants CODEASSIST_SHOW_VISIBLE_PROPOSALS restrictProposalsToVisibility getBoolean PreferenceConstants CODEASSIST_CASE_SENSITIVITY restrictProposalsToMatchingCases getBoolean PreferenceConstants CODEASSIST_ORDER_PROPOSALS orderProposalsAlphabetically
private static void configure Java Snippet Processor Content Assistant assistant I Preference Store store Java Snippet Completion Processor cp get Java Snippet Processor assistant if cp null return String triggers store get String Preference Constants CODEASSIST AUTOACTIVATION TRIGGERS JAVA if triggers null cp set Completion Proposal Auto Activation Characters triggers to Char Array boolean enabled store get Boolean Preference Constants CODEASSIST SHOW VISIBLE PROPOSALS restrict Proposals To Visibility enabled enabled store get Boolean Preference Constants CODEASSIST CASE SENSITIVITY restrict Proposals To Matching Cases enabled enabled store get Boolean Preference Constants CODEASSIST ORDER PROPOSALS cp order Proposals Alphabetically enabled  configureJavaSnippetProcessor ContentAssistant IPreferenceStore JavaSnippetCompletionProcessor getJavaSnippetProcessor getString PreferenceConstants CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA setCompletionProposalAutoActivationCharacters toCharArray getBoolean PreferenceConstants CODEASSIST_SHOW_VISIBLE_PROPOSALS restrictProposalsToVisibility getBoolean PreferenceConstants CODEASSIST_CASE_SENSITIVITY restrictProposalsToMatchingCases getBoolean PreferenceConstants CODEASSIST_ORDER_PROPOSALS orderProposalsAlphabetically
Configure the given content assistant from the preference store public static void configure Content Assistant assistant I Color Manager manager I Preference Store store get Preference Store boolean enabled store get Boolean Preference Constants CODEASSIST AUTOACTIVATION assistant enable Auto Activation enabled int delay store get Int Preference Constants CODEASSIST AUTOACTIVATION DELAY assistant set Auto Activation Delay delay Color c get Color store Preference Constants CODEASSIST PROPOSALS FOREGROUND manager assistant set Proposal Selector Foreground c c get Color store Preference Constants CODEASSIST PROPOSALS BACKGROUND manager assistant set Proposal Selector Background c c get Color store Preference Constants CODEASSIST PARAMETERS FOREGROUND manager assistant set Context Information Popup Foreground c assistant set Context Selector Foreground c c get Color store Preference Constants CODEASSIST PARAMETERS BACKGROUND manager assistant set Context Information Popup Background c assistant set Context Selector Background c enabled store get Boolean Preference Constants CODEASSIST AUTOINSERT assistant enable Auto Insert enabled configure Display Processor assistant store configure Java Snippet Processor assistant store  ContentAssistant IColorManager IPreferenceStore getPreferenceStore getBoolean PreferenceConstants CODEASSIST_AUTOACTIVATION enableAutoActivation getInt PreferenceConstants CODEASSIST_AUTOACTIVATION_DELAY setAutoActivationDelay getColor PreferenceConstants CODEASSIST_PROPOSALS_FOREGROUND setProposalSelectorForeground getColor PreferenceConstants CODEASSIST_PROPOSALS_BACKGROUND setProposalSelectorBackground getColor PreferenceConstants CODEASSIST_PARAMETERS_FOREGROUND setContextInformationPopupForeground setContextSelectorForeground getColor PreferenceConstants CODEASSIST_PARAMETERS_BACKGROUND setContextInformationPopupBackground setContextSelectorBackground getBoolean PreferenceConstants CODEASSIST_AUTOINSERT enableAutoInsert configureDisplayProcessor configureJavaSnippetProcessor
private static void change Display Processor Content Assistant assistant I Preference Store store String key Display Completion Processor dcp get Display Processor assistant if dcp null return if Preference Constants CODEASSIST AUTOACTIVATION TRIGGERS JAVA equals key String triggers store get String Preference Constants CODEASSIST AUTOACTIVATION TRIGGERS JAVA if triggers null dcp set Completion Proposal Auto Activation Characters triggers to Char Array else if Preference Constants CODEASSIST ORDER PROPOSALS equals key boolean enable store get Boolean Preference Constants CODEASSIST ORDER PROPOSALS dcp order Proposals Alphabetically enable  changeDisplayProcessor ContentAssistant IPreferenceStore DisplayCompletionProcessor getDisplayProcessor PreferenceConstants CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA getString PreferenceConstants CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA setCompletionProposalAutoActivationCharacters toCharArray PreferenceConstants CODEASSIST_ORDER_PROPOSALS getBoolean PreferenceConstants CODEASSIST_ORDER_PROPOSALS orderProposalsAlphabetically
private static void change Java Snippet Processor Content Assistant assistant I Preference Store store String key Java Snippet Completion Processor cp get Java Snippet Processor assistant if cp null return if Preference Constants CODEASSIST AUTOACTIVATION TRIGGERS JAVA equals key String triggers store get String Preference Constants CODEASSIST AUTOACTIVATION TRIGGERS JAVA if triggers null cp set Completion Proposal Auto Activation Characters triggers to Char Array else if Preference Constants CODEASSIST ORDER PROPOSALS equals key boolean enable store get Boolean Preference Constants CODEASSIST ORDER PROPOSALS cp order Proposals Alphabetically enable  changeJavaSnippetProcessor ContentAssistant IPreferenceStore JavaSnippetCompletionProcessor getJavaSnippetProcessor PreferenceConstants CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA getString PreferenceConstants CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA setCompletionProposalAutoActivationCharacters toCharArray PreferenceConstants CODEASSIST_ORDER_PROPOSALS getBoolean PreferenceConstants CODEASSIST_ORDER_PROPOSALS orderProposalsAlphabetically
Changes the configuration of the given content assistant according to the given property change event public static void change Configuration Content Assistant assistant Property Change Event event I Preference Store store get Preference Store String p event get Property if Preference Constants CODEASSIST AUTOACTIVATION equals p boolean enabled store get Boolean Preference Constants CODEASSIST AUTOACTIVATION assistant enable Auto Activation enabled else if Preference Constants CODEASSIST AUTOACTIVATION DELAY equals p int delay store get Int Preference Constants CODEASSIST AUTOACTIVATION DELAY assistant set Auto Activation Delay delay else if Preference Constants CODEASSIST PROPOSALS FOREGROUND equals p Color c get Color store Preference Constants CODEASSIST PROPOSALS FOREGROUND assistant set Proposal Selector Foreground c else if Preference Constants CODEASSIST PROPOSALS BACKGROUND equals p Color c get Color store Preference Constants CODEASSIST PROPOSALS BACKGROUND assistant set Proposal Selector Background c else if Preference Constants CODEASSIST PARAMETERS FOREGROUND equals p Color c get Color store Preference Constants CODEASSIST PARAMETERS FOREGROUND assistant set Context Information Popup Foreground c assistant set Context Selector Foreground c else if Preference Constants CODEASSIST PARAMETERS BACKGROUND equals p Color c get Color store Preference Constants CODEASSIST PARAMETERS BACKGROUND assistant set Context Information Popup Background c assistant set Context Selector Background c else if Preference Constants CODEASSIST AUTOINSERT equals p boolean enabled store get Boolean Preference Constants CODEASSIST AUTOINSERT assistant enable Auto Insert enabled change Display Processor assistant store p change Java Snippet Processor assistant store p  changeConfiguration ContentAssistant PropertyChangeEvent IPreferenceStore getPreferenceStore getProperty PreferenceConstants CODEASSIST_AUTOACTIVATION getBoolean PreferenceConstants CODEASSIST_AUTOACTIVATION enableAutoActivation PreferenceConstants CODEASSIST_AUTOACTIVATION_DELAY getInt PreferenceConstants CODEASSIST_AUTOACTIVATION_DELAY setAutoActivationDelay PreferenceConstants CODEASSIST_PROPOSALS_FOREGROUND getColor PreferenceConstants CODEASSIST_PROPOSALS_FOREGROUND setProposalSelectorForeground PreferenceConstants CODEASSIST_PROPOSALS_BACKGROUND getColor PreferenceConstants CODEASSIST_PROPOSALS_BACKGROUND setProposalSelectorBackground PreferenceConstants CODEASSIST_PARAMETERS_FOREGROUND getColor PreferenceConstants CODEASSIST_PARAMETERS_FOREGROUND setContextInformationPopupForeground setContextSelectorForeground PreferenceConstants CODEASSIST_PARAMETERS_BACKGROUND getColor PreferenceConstants CODEASSIST_PARAMETERS_BACKGROUND setContextInformationPopupBackground setContextSelectorBackground PreferenceConstants CODEASSIST_AUTOINSERT getBoolean PreferenceConstants CODEASSIST_AUTOINSERT enableAutoInsert changeDisplayProcessor changeJavaSnippetProcessor
Tells this processor to restrict its proposal to those element visible in the actual invocation context param restrict code true code if proposals should be restricted private static void restrict Proposals To Visibility boolean restrict Hashtable options Java Core get Options Object value options get VISIBILITY if value instanceof String String new Value restrict ENABLED DISABLED if new Value equals value options put VISIBILITY new Value Java Core set Options options  restrictProposalsToVisibility JavaCore getOptions newValue newValue newValue JavaCore setOptions
Tells this processor to restrict is proposals to those starting with matching cases param restrict code true code if proposals should be restricted private static void restrict Proposals To Matching Cases boolean restrict XXX not yet supported  restrictProposalsToMatchingCases
private static I Preference Store get Preference Store return Preference Constants get Preference Store  IPreferenceStore getPreferenceStore PreferenceConstants getPreferenceStore

see Plugin public JDI DebugUI Plugin super set Default this  JDIDebugUIPlugin setDefault
Sets the Java Debug UI plug in instance param plugin the plugin instance private static void set Default JDI DebugUI Plugin plugin fg Plugin plugin  setDefault JDIDebugUIPlugin fgPlugin
Returns the Java Debug UI plug in instance return the Java Debug UI plug in instance public static JDI DebugUI Plugin get Default return fg Plugin  JDIDebugUIPlugin getDefault fgPlugin
Convenience method which returns the unique identifier of this plugin public static String get Unique Identifier return PI JDI DEBUG  getUniqueIdentifier PI_JDI_DEBUG
Logs the specified status with this plug in s log param status status to log public static void log I Status status get Default get Log log status  IStatus getDefault getLog
Logs an internal error with the specified message param message the error message to log public static void log Error Message String message log new Status I Status ERROR get Unique Identifier I Java DebugUI Constants INTERNAL ERROR message null  logErrorMessage IStatus getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR
Logs an internal error with the specified throwable param e the exception to be logged public static void log Throwable e log new Status I Status ERROR get Unique Identifier I Java DebugUI Constants INTERNAL ERROR DebugUI Messages get String JDI DebugUI Plugin Internal Error 1 e NON NLS 1  IStatus getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR DebugUIMessages getString JDIDebugUIPlugin Internal_Error_1
Returns the active workbench window return the active workbench window public static I Workbench Window get Active Workbench Window return get Default get Workbench get Active Workbench Window  IWorkbenchWindow getActiveWorkbenchWindow getDefault getWorkbench getActiveWorkbenchWindow
public static I Workbench Page get Active Page I Workbench Window w get Active Workbench Window if w null return w get Active Page return null  IWorkbenchPage getActivePage IWorkbenchWindow getActiveWorkbenchWindow getActivePage
Returns the active workbench shell or code null code if none return the active workbench shell or code null code if none public static Shell get Active Workbench Shell I Workbench Window window get Active Workbench Window if window null return window get Shell return null  getActiveWorkbenchShell IWorkbenchWindow getActiveWorkbenchWindow getShell
see org eclipse ui plugin AbstractUI Plugin create Image Registry protected Image Registry create Image Registry return Java Debug Images get Image Registry  AbstractUIPlugin createImageRegistry ImageRegistry createImageRegistry JavaDebugImages getImageRegistry
public I Document Provider get Snippet Document Provider if f Snippet Document Provider null f Snippet Document Provider new Snippet File Document Provider return f Snippet Document Provider  IDocumentProvider getSnippetDocumentProvider fSnippetDocumentProvider fSnippetDocumentProvider SnippetFileDocumentProvider fSnippetDocumentProvider
Logs the given message if in debug mode param String message to log public static void log Debug Message String message if get Default is Debugging this message is intentionally not internationalized as an exception may be due to the resource bundle itself log new Status I Status ERROR get Unique Identifier I Java DebugUI Constants INTERNAL ERROR Internal message logged from JDT Debug UI message null NON NLS 1  logDebugMessage getDefault isDebugging IStatus getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR
public static void error Dialog String message I Status status log status Shell shell get Active Workbench Shell if shell null Error Dialog open Error shell DebugUI Messages get String JDI DebugUI Plugin Error 1 message status NON NLS 1  errorDialog IStatus getActiveWorkbenchShell ErrorDialog openError DebugUIMessages getString JDIDebugUIPlugin Error_1
Utility method with conventions public static void error Dialog String message Throwable t log t Shell shell get Active Workbench Shell if shell null I Status status new Status I Status ERROR get Unique Identifier I Java DebugUI Constants INTERNAL ERROR Error logged from JDT Debug UI t NON NLS 1 Error Dialog open Error shell DebugUI Messages get String JDI DebugUI Plugin Error 1 message status NON NLS 1  errorDialog getActiveWorkbenchShell IStatus IStatus getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR ErrorDialog openError DebugUIMessages getString JDIDebugUIPlugin Error_1
Busy Indicator show While null new Runnable public void run try ret 0 element create Executable Extension class Attribute catch Core Exception e exc 0 e  BusyIndicator showWhile createExecutableExtension classAttribute CoreException
Creates an extension If the extension plugin has not been loaded a busy cursor will be activated during the duration of the load param element the config element defining the extension param class Attribute the name of the attribute carrying the class return the extension object public static Object create Extension final I Configuration Element element final String class Attribute throws Core Exception If plugin has been loaded create extension Otherwise show busy cursor then create extension Bundle bundle Platform get Bundle element get Declaring Extension get Namespace if bundle get State Bundle ACTIVE return element create Executable Extension class Attribute else final Object ret new Object 1 final Core Exception exc new Core Exception 1 Busy Indicator show While null new Runnable public void run try ret 0 element create Executable Extension class Attribute catch Core Exception e exc 0 e if exc 0 null throw exc 0 else return ret 0  classAttribute createExtension IConfigurationElement classAttribute CoreException getBundle getDeclaringExtension getNamespace getState createExecutableExtension classAttribute CoreException CoreException BusyIndicator showWhile createExecutableExtension classAttribute CoreException
protected void initialize Default Preferences I Preference Store store if is Shutting Down return Java Debug Preference Page store set Default IJDI Preferences Constants PREF SUSPEND ON COMPILATION ERRORS true store set Default IJDI Preferences Constants PREF SUSPEND ON UNCAUGHT EXCEPTIONS true store set Default IJDI Preferences Constants PREF ALERT HCR FAILED true store set Default IJDI Preferences Constants PREF ALERT HCR NOT SUPPORTED true store set Default IJDI Preferences Constants PREF ALERT OBSOLETE METHODS true store set Default IJDI Preferences Constants PREF ALERT UNABLE TO INSTALL BREAKPOINT true store set Default IJDI Preferences Constants PREF SHOW QUALIFIED NAMES false Java Step Filter Preference Page store set Default IJDI Preferences Constants PREF ACTIVE FILTERS LIST java lang Class Loader NON NLS 1 store set Default IJDI Preferences Constants PREF INACTIVE FILTERS LIST com ibm com sun java javax org omg sun sunw NON NLS 1 store set Default IJDI Preferences Constants PREF SHOW CONSTANTS false store set Default IJDI Preferences Constants PREF SHOW STATIC VARIALBES false store set Default IJDI Preferences Constants PREF SHOW CHAR false store set Default IJDI Preferences Constants PREF SHOW HEX false store set Default IJDI Preferences Constants PREF SHOW UNSIGNED false store set Default IJDI Preferences Constants PREF SHOW NULL ARRAY ENTRIES true store set Default IJDI Preferences Constants PREF SHOW SYSTEM THREADS false  initializeDefaultPreferences IPreferenceStore isShuttingDown JavaDebugPreferencePage setDefault IJDIPreferencesConstants PREF_SUSPEND_ON_COMPILATION_ERRORS setDefault IJDIPreferencesConstants PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS setDefault IJDIPreferencesConstants PREF_ALERT_HCR_FAILED setDefault IJDIPreferencesConstants PREF_ALERT_HCR_NOT_SUPPORTED setDefault IJDIPreferencesConstants PREF_ALERT_OBSOLETE_METHODS setDefault IJDIPreferencesConstants PREF_ALERT_UNABLE_TO_INSTALL_BREAKPOINT setDefault IJDIPreferencesConstants PREF_SHOW_QUALIFIED_NAMES JavaStepFilterPreferencePage setDefault IJDIPreferencesConstants PREF_ACTIVE_FILTERS_LIST ClassLoader setDefault IJDIPreferencesConstants PREF_INACTIVE_FILTERS_LIST setDefault IJDIPreferencesConstants PREF_SHOW_CONSTANTS setDefault IJDIPreferencesConstants PREF_SHOW_STATIC_VARIALBES setDefault IJDIPreferencesConstants PREF_SHOW_CHAR setDefault IJDIPreferencesConstants PREF_SHOW_HEX setDefault IJDIPreferencesConstants PREF_SHOW_UNSIGNED setDefault IJDIPreferencesConstants PREF_SHOW_NULL_ARRAY_ENTRIES setDefault IJDIPreferencesConstants PREF_SHOW_SYSTEM_THREADS
public void start Bundle Context context throws Exception super start context Java Debug Options Manager get Default startup I Adapter Manager manager Platform get Adapter Manager f Action Filter Adapter Factory new Action Filter Adapter Factory manager register Adapters f Action Filter Adapter Factory I Method class manager register Adapters f Action Filter Adapter Factory I Java Variable class manager register Adapters f Action Filter Adapter Factory I Java Stack Frame class manager register Adapters f Action Filter Adapter Factory I Java Thread class manager register Adapters f Action Filter Adapter Factory Java Inspect Expression class f Source Location Adapter Factory new Java Source Location Workbench Adapter Factory manager register Adapters f Source Location Adapter Factory I Java Source Location class f Breakpoint Adapter Factory new Java Breakpoint Workbench Adapter Factory manager register Adapters f Breakpoint Adapter Factory I Java Breakpoint class f Evaluation Engine Manager new Java Evaluation Engine Manager fHCR Listener new Java Hot Code Replace Listener JDI Debug Model add Hot Code Replace Listener fHCR Listener  BundleContext JavaDebugOptionsManager getDefault IAdapterManager getAdapterManager fActionFilterAdapterFactory ActionFilterAdapterFactory registerAdapters fActionFilterAdapterFactory IMethod registerAdapters fActionFilterAdapterFactory IJavaVariable registerAdapters fActionFilterAdapterFactory IJavaStackFrame registerAdapters fActionFilterAdapterFactory IJavaThread registerAdapters fActionFilterAdapterFactory JavaInspectExpression fSourceLocationAdapterFactory JavaSourceLocationWorkbenchAdapterFactory registerAdapters fSourceLocationAdapterFactory IJavaSourceLocation fBreakpointAdapterFactory JavaBreakpointWorkbenchAdapterFactory registerAdapters fBreakpointAdapterFactory IJavaBreakpoint fEvaluationEngineManager JavaEvaluationEngineManager fHCRListener JavaHotCodeReplaceListener JDIDebugModel addHotCodeReplaceListener fHCRListener
public void stop Bundle Context context throws Exception try set Shutting Down true JDI Debug Model remove Hot Code Replace Listener fHCR Listener Java Debug Options Manager get Default shutdown if f Image Descriptor Registry null f Image Descriptor Registry dispose f Evaluation Engine Manager dispose I Adapter Manager manager Platform get Adapter Manager manager unregister Adapters f Action Filter Adapter Factory manager unregister Adapters f Source Location Adapter Factory manager unregister Adapters f Breakpoint Adapter Factory if f Util Presentation null f Util Presentation dispose finally super stop context  BundleContext setShuttingDown JDIDebugModel removeHotCodeReplaceListener fHCRListener JavaDebugOptionsManager getDefault fImageDescriptorRegistry fImageDescriptorRegistry fEvaluationEngineManager IAdapterManager getAdapterManager unregisterAdapters fActionFilterAdapterFactory unregisterAdapters fSourceLocationAdapterFactory unregisterAdapters fBreakpointAdapterFactory fUtilPresentation fUtilPresentation
Returns whether this plug in is in the process of being shutdown return whether this plug in is in the process of being shutdown protected boolean is Shutting Down return f Shutting Down  isShuttingDown fShuttingDown
Sets whether this plug in is in the process of being shutdown param value whether this plug in is in the process of being shutdown private void set Shutting Down boolean value f Shutting Down value  setShuttingDown fShuttingDown
Returns the image descriptor registry used for this plugin public static Image Descriptor Registry get Image Descriptor Registry if get Default f Image Descriptor Registry null get Default f Image Descriptor Registry new Image Descriptor Registry return get Default f Image Descriptor Registry  ImageDescriptorRegistry getImageDescriptorRegistry getDefault fImageDescriptorRegistry getDefault fImageDescriptorRegistry ImageDescriptorRegistry getDefault fImageDescriptorRegistry
Returns the standard display to be used The method first checks if the thread calling this method has an associated display If so this display is returned Otherwise the method returns the default display public static Display get Standard Display Display display display Display get Current if display null display Display get Default return display  getStandardDisplay getCurrent getDefault
Returns an evaluation engine for the given project in the given debug target see Java Evaluation Engine Manager get Evaluation Engine I Java Project I Java Debug Target param project java project param target the debug target return evalaution engine public I Ast Evaluation Engine get Evaluation Engine I Java Project project I Java Debug Target target return f Evaluation Engine Manager get Evaluation Engine project target  JavaEvaluationEngineManager getEvaluationEngine IJavaProject IJavaDebugTarget IAstEvaluationEngine getEvaluationEngine IJavaProject IJavaDebugTarget fEvaluationEngineManager getEvaluationEngine
Utility method to create and return a selection dialog that allows selection of a specific Java package Empty packages are not returned If Java Projects are provided only packages found within those projects are included If no Java projects are provided all Java projects in the workspace are considered public static Element List Selection Dialog create All Packages Dialog Shell shell I Java Project originals final boolean include Default Package throws Java Model Exception final List package List new Array List if originals null I Workspace Root wsroot Resources Plugin get Workspace get Root I Java Model model Java Core create wsroot originals model get Java Projects final I Java Project projects originals final Java Model Exception exception new Java Model Exception 1 final boolean monitor Canceled new boolean false I Runnable With Progress r new I Runnable With Progress public void run I Progress Monitor monitor try Set package Name Set new Hash Set monitor begin Task DebugUI Messages get String JDI DebugUI Plugin Searching 1 projects length NON NLS 1 for int i 0 i projects length i I Package Fragment pkgs projects i get Package Fragments for int j 0 j pkgs length j if monitor is Canceled monitor Canceled 0 true return I Package Fragment pkg pkgs j if pkg has Children pkg get Non Java Resources length 0 continue String pkg Name pkg get Element Name if include Default Package pkg Name length 0 continue if package Name Set add pkg Name package List add pkg monitor worked 1 monitor done catch Java Model Exception jme exception 0 jme try PlatformUI get Workbench get Progress Service busy Cursor While r catch Invocation Target Exception e JDI DebugUI Plugin log e catch Interrupted Exception e JDI DebugUI Plugin log e if exception 0 null throw exception 0 if monitor Canceled 0 return null int flags Java Element Label Provider SHOW DEFAULT Package Selection Dialog dialog new Package Selection Dialog shell new Java Element Label Provider flags dialog set Ignore Case false dialog set Elements package List to Array XXX inefficient return dialog  ElementListSelectionDialog createAllPackagesDialog IJavaProject includeDefaultPackage JavaModelException packageList ArrayList IWorkspaceRoot ResourcesPlugin getWorkspace getRoot IJavaModel JavaCore getJavaProjects IJavaProject JavaModelException JavaModelException monitorCanceled IRunnableWithProgress IRunnableWithProgress IProgressMonitor packageNameSet HashSet beginTask DebugUIMessages getString JDIDebugUIPlugin Searching_1 IPackageFragment getPackageFragments isCanceled monitorCanceled IPackageFragment hasChildren getNonJavaResources pkgName getElementName includeDefaultPackage pkgName packageNameSet pkgName packageList JavaModelException getWorkbench getProgressService busyCursorWhile InvocationTargetException JDIDebugUIPlugin InterruptedException JDIDebugUIPlugin monitorCanceled JavaElementLabelProvider SHOW_DEFAULT PackageSelectionDialog PackageSelectionDialog JavaElementLabelProvider setIgnoreCase setElements packageList toArray
Return an object that implements code I Launch Configuration Tab code for the specified vm install type ID public I Launch Configuration Tab getVM Install Type Page String vm Install TypeID if f Vm Install Type Page Map null initializeVM Install Type Page Map I Configuration Element config Element I Configuration Element f Vm Install Type Page Map get vm Install TypeID I Launch Configuration Tab tab null if config Element null try tab I Launch Configuration Tab config Element create Executable Extension class NON NLS 1 catch Core Exception ce log new Status I Status ERROR get Unique Identifier I Java DebugUI Constants INTERNAL ERROR DebugUI Messages get String JDI DebugUI Plugin An error occurred retrieving a VMInstallType page 1 ce NON NLS 1 return tab  ILaunchConfigurationTab ILaunchConfigurationTab getVMInstallTypePage vmInstallTypeID fVmInstallTypePageMap initializeVMInstallTypePageMap IConfigurationElement configElement IConfigurationElement fVmInstallTypePageMap vmInstallTypeID ILaunchConfigurationTab configElement ILaunchConfigurationTab configElement createExecutableExtension CoreException IStatus getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR DebugUIMessages getString JDIDebugUIPlugin An_error_occurred_retrieving_a_VMInstallType_page_1
protected void initializeVM Install Type Page Map f Vm Install Type Page Map new Hash Map 10 I Extension Point extension Point Platform get Extension Registry get Extension Point get Unique Identifier I Java DebugUI Constants EXTENSION POINT VM INSTALL TYPE PAGE I Configuration Element infos extension Point get Configuration Elements for int i 0 i infos length i String id infos i get Attribute vm Install TypeID NON NLS 1 f Vm Install Type Page Map put id infos i  initializeVMInstallTypePageMap fVmInstallTypePageMap HashMap IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint getUniqueIdentifier IJavaDebugUIConstants EXTENSION_POINT_VM_INSTALL_TYPE_PAGE IConfigurationElement extensionPoint getConfigurationElements getAttribute vmInstallTypeID fVmInstallTypePageMap
Returns a shared utility Java debug model presentation Clients should not dispose the presentation return a Java debug model presentation public I Debug Model Presentation get Model Presentation if f Util Presentation null f Util Presentation DebugUI Tools new Debug Model Presentation JDI Debug Model get Plugin Identifier return f Util Presentation  IDebugModelPresentation getModelPresentation fUtilPresentation fUtilPresentation DebugUITools newDebugModelPresentation JDIDebugModel getPluginIdentifier fUtilPresentation

Create a new JDI Image Descriptor param base Image an image descriptor used as the base image param flags flags indicating which adornments are to be rendered public JDI Image Descriptor Image Descriptor base Image int flags set Base Image base Image set Flags flags  JDIImageDescriptor baseImage JDIImageDescriptor ImageDescriptor baseImage setBaseImage baseImage setFlags
see Composite Image Descriptor get Size protected Point get Size if f Size null Image Data data get Base Image get Image Data set Size new Point data width data height return f Size  CompositeImageDescriptor getSize getSize fSize ImageData getBaseImage getImageData setSize fSize
see Object equals java lang Object public boolean equals Object object if object instanceof JDI Image Descriptor return false JDI Image Descriptor other JDI Image Descriptor object return get Base Image equals other get Base Image get Flags other get Flags  JDIImageDescriptor JDIImageDescriptor JDIImageDescriptor getBaseImage getBaseImage getFlags getFlags
see Object hash Code public int hash Code return get Base Image hash Code get Flags  hashCode hashCode getBaseImage hashCode getFlags
see Composite Image Descriptor draw Composite Image int int protected void draw Composite Image int width int height Image Data bg get Base Image get Image Data if bg null bg DEFAULT IMAGE DATA draw Image bg 0 0 draw Overlays  CompositeImageDescriptor drawCompositeImage drawCompositeImage ImageData getBaseImage getImageData DEFAULT_IMAGE_DATA drawImage drawOverlays
Add any overlays to the image as specified in the flags protected void draw Overlays int flags get Flags int x 0 int y 0 Image Data data null if flags IS OUT OF SYNCH 0 x get Size x y 0 data Java Debug Images DESC OVR IS OUT OF SYNCH get Image Data x data width draw Image data x y else if flags MAY BE OUT OF SYNCH 0 x get Size x y 0 data Java Debug Images DESC OVR MAY BE OUT OF SYNCH get Image Data x data width draw Image data x y else if flags OWNED MONITOR 0 x get Size x y get Size y data Java Debug Images DESC OVR OWNED get Image Data x data width y data height draw Image data x y else if flags CONTENTED MONITOR 0 x get Size x y get Size y data Java Debug Images DESC OVR IN CONTENTION get Image Data x data width y data height draw Image data x y else if flags OWNS MONITOR 0 x get Size x y 0 data Java Debug Images DESC OVR OWNS MONITOR get Image Data x data width draw Image data x y else if flags IN CONTENTION FOR MONITOR 0 x get Size x y 0 data Java Debug Images DESC OVR IN CONTENTION FOR MONITOR get Image Data x data width draw Image data x y else draw Breakpoint Overlays  drawOverlays getFlags ImageData IS_OUT_OF_SYNCH getSize JavaDebugImages DESC_OVR_IS_OUT_OF_SYNCH getImageData drawImage MAY_BE_OUT_OF_SYNCH getSize JavaDebugImages DESC_OVR_MAY_BE_OUT_OF_SYNCH getImageData drawImage OWNED_MONITOR getSize getSize JavaDebugImages DESC_OVR_OWNED getImageData drawImage CONTENTED_MONITOR getSize getSize JavaDebugImages DESC_OVR_IN_CONTENTION getImageData drawImage OWNS_MONITOR getSize JavaDebugImages DESC_OVR_OWNS_MONITOR getImageData drawImage IN_CONTENTION_FOR_MONITOR getSize JavaDebugImages DESC_OVR_IN_CONTENTION_FOR_MONITOR getImageData drawImage drawBreakpointOverlays
protected void draw Breakpoint Overlays int flags get Flags int x 0 int y 0 Image Data data null if flags INSTALLED 0 x 0 y get Size y if flags ENABLED 0 data Java Debug Images DESC OBJS BREAKPOINT INSTALLED get Image Data else data Java Debug Images DESC OBJS BREAKPOINT INSTALLED DISABLED get Image Data y data height draw Image data x y if flags CAUGHT 0 if flags ENABLED 0 data Java Debug Images DESC OBJS CAUGHT BREAKPOINT get Image Data else data Java Debug Images DESC OBJS CAUGHT BREAKPOINT DISABLED get Image Data x 0 y 0 draw Image data x y if flags UNCAUGHT 0 if flags ENABLED 0 data Java Debug Images DESC OBJS UNCAUGHT BREAKPOINT get Image Data else data Java Debug Images DESC OBJS UNCAUGHT BREAKPOINT DISABLED get Image Data x data width y data height draw Image data x y if flags SCOPED 0 if flags ENABLED 0 data Java Debug Images DESC OBJS SCOPED BREAKPOINT get Image Data else data Java Debug Images DESC OBJS SCOPED BREAKPOINT DISABLED get Image Data x 0 y get Size y y data height draw Image data x y if flags CONDITIONAL 0 if flags ENABLED 0 data Java Debug Images DESC OBJS CONDITIONAL BREAKPOINT get Image Data else data Java Debug Images DESC OBJS CONDITIONAL BREAKPOINT DISABLED get Image Data x 0 y 0 draw Image data x y if flags ENTRY 0 x get Size x y 0 if flags ENABLED 0 data Java Debug Images DESC OBJS METHOD BREAKPOINT ENTRY get Image Data else data Java Debug Images DESC OBJS METHOD BREAKPOINT ENTRY DISABLED get Image Data x data width draw Image data x y if flags EXIT 0 x get Size x y get Size y if flags ENABLED 0 data Java Debug Images DESC OBJS METHOD BREAKPOINT EXIT get Image Data else data Java Debug Images DESC OBJS METHOD BREAKPOINT EXIT DISABLED get Image Data x data width y data height draw Image data x y  drawBreakpointOverlays getFlags ImageData getSize JavaDebugImages DESC_OBJS_BREAKPOINT_INSTALLED getImageData JavaDebugImages DESC_OBJS_BREAKPOINT_INSTALLED_DISABLED getImageData drawImage JavaDebugImages DESC_OBJS_CAUGHT_BREAKPOINT getImageData JavaDebugImages DESC_OBJS_CAUGHT_BREAKPOINT_DISABLED getImageData drawImage JavaDebugImages DESC_OBJS_UNCAUGHT_BREAKPOINT getImageData JavaDebugImages DESC_OBJS_UNCAUGHT_BREAKPOINT_DISABLED getImageData drawImage JavaDebugImages DESC_OBJS_SCOPED_BREAKPOINT getImageData JavaDebugImages DESC_OBJS_SCOPED_BREAKPOINT_DISABLED getImageData getSize drawImage JavaDebugImages DESC_OBJS_CONDITIONAL_BREAKPOINT getImageData JavaDebugImages DESC_OBJS_CONDITIONAL_BREAKPOINT_DISABLED getImageData drawImage getSize JavaDebugImages DESC_OBJS_METHOD_BREAKPOINT_ENTRY getImageData JavaDebugImages DESC_OBJS_METHOD_BREAKPOINT_ENTRY_DISABLED getImageData drawImage getSize getSize JavaDebugImages DESC_OBJS_METHOD_BREAKPOINT_EXIT getImageData JavaDebugImages DESC_OBJS_METHOD_BREAKPOINT_EXIT_DISABLED getImageData drawImage
protected Image Descriptor get Base Image return f Base Image  ImageDescriptor getBaseImage fBaseImage
protected void set Base Image Image Descriptor base Image f Base Image base Image  setBaseImage ImageDescriptor baseImage fBaseImage baseImage
protected int get Flags return f Flags  getFlags fFlags
protected void set Flags int flags f Flags flags  setFlags fFlags
protected void set Size Point size f Size size  setSize fSize

private Java Element Label Provider f Java Label Provider public JDI Model Presentation super  JavaElementLabelProvider fJavaLabelProvider JDIModelPresentation
see I Debug Model Presentation compute Detail I Value I Value Detail Listener public void compute Detail I Value value I Value Detail Listener listener I Java Thread thread get Evaluation Thread I Java Debug Target value get Debug Target if thread null listener detail Computed value DebugUI Messages get String JDI Model Presentation no suspended threads NON NLS 1 else Java Detail Formatters Manager get Default compute Value Detail I Java Value value thread listener  IDebugModelPresentation computeDetail IValue IValueDetailListener computeDetail IValue IValueDetailListener IJavaThread getEvaluationThread IJavaDebugTarget getDebugTarget detailComputed DebugUIMessages getString JDIModelPresentation no_suspended_threads JavaDetailFormattersManager getDefault computeValueDetail IJavaValue
Returns a thread from the specified VM that can be used for an evaluation or code null code if none param debug target the target in which a thread is required return thread or code null code public static I Java Thread get Evaluation Thread I Java Debug Target target I Java Stack Frame frame Evaluation Context Manager get Evaluation Context I Workbench Window null I Java Thread thread null if frame null thread I Java Thread frame get Thread if thread null thread get Debug Target equals target thread is Suspended can only use suspended threads in the same target thread null if thread null try I Thread threads target get Threads for int i 0 i threads length i if threads i is Suspended thread I Java Thread threads i break catch Debug Exception e JDI DebugUI Plugin log e return thread  IJavaThread getEvaluationThread IJavaDebugTarget IJavaStackFrame EvaluationContextManager getEvaluationContext IWorkbenchWindow IJavaThread IJavaThread getThread getDebugTarget isSuspended IThread getThreads isSuspended IJavaThread DebugException JDIDebugUIPlugin
see I Debug Model Presentation get Text Object public String get Text Object item try boolean show Qualified is Show Qualified Names if item instanceof I Java Variable return get Variable Text I Java Variable item else if item instanceof I Stack Frame String Buffer label new String Buffer get Stack Frame Text I Stack Frame item if item instanceof I Java Stack Frame if I Java Stack Frame item is Out Of Synch label append DebugUI Messages get String JDI Model Presentation   out of synch  1 NON NLS 1 return label to String else if item instanceof I Marker I Breakpoint breakpoint get Breakpoint I Marker item if breakpoint null return get Breakpoint Text breakpoint return null else if item instanceof I Breakpoint return get Breakpoint Text I Breakpoint item else if item instanceof I Watch Expression return get Watch Expression Text I Watch Expression item else if item instanceof I Expression return get Expression Text I Expression item else String Buffer label new String Buffer if item instanceof I Java Thread label append get Thread Text I Java Thread item show Qualified if I Java Thread item is Out Of Synch label append DebugUI Messages get String JDI Model Presentation   out of synch  1 NON NLS 1 else if I Java Thread item may Be Out Of Synch label append DebugUI Messages get String JDI Model Presentation   may be out of synch  2 NON NLS 1 else if item instanceof I Java Debug Target label append get Debug Target Text I Java Debug Target item if I Java Debug Target item is Out Of Synch label append DebugUI Messages get String JDI Model Presentation   out of synch  1 NON NLS 1 else if I Java Debug Target item may Be Out Of Synch label append DebugUI Messages get String JDI Model Presentation   may be out of synch  2 NON NLS 1 else if item instanceof I Java Value label append get Value Text I Java Value item if item instanceof I Terminate if I Terminate item is Terminated label insert 0 DebugUI Messages get String JDI Model Presentation terminated  2 NON NLS 1 return label to String if item instanceof I Disconnect if I Disconnect item is Disconnected label insert 0 DebugUI Messages get String JDI Model Presentation disconnected  4 NON NLS 1 return label to String if label length 0 return label to String catch Core Exception e return DebugUI Messages get String JDI Model Presentation not responding  6 NON NLS 1 return null  IDebugModelPresentation getText getText showQualified isShowQualifiedNames IJavaVariable getVariableText IJavaVariable IStackFrame StringBuffer StringBuffer getStackFrameText IStackFrame IJavaStackFrame IJavaStackFrame isOutOfSynch DebugUIMessages getString JDIModelPresentation _ out_of_synch _1 toString IMarker IBreakpoint getBreakpoint IMarker getBreakpointText IBreakpoint getBreakpointText IBreakpoint IWatchExpression getWatchExpressionText IWatchExpression IExpression getExpressionText IExpression StringBuffer StringBuffer IJavaThread getThreadText IJavaThread showQualified IJavaThread isOutOfSynch DebugUIMessages getString JDIModelPresentation _ out_of_synch _1 IJavaThread mayBeOutOfSynch DebugUIMessages getString JDIModelPresentation _ may_be_out_of_synch _2 IJavaDebugTarget getDebugTargetText IJavaDebugTarget IJavaDebugTarget isOutOfSynch DebugUIMessages getString JDIModelPresentation _ out_of_synch _1 IJavaDebugTarget mayBeOutOfSynch DebugUIMessages getString JDIModelPresentation _ may_be_out_of_synch _2 IJavaValue getValueText IJavaValue ITerminate ITerminate isTerminated DebugUIMessages getString JDIModelPresentation _2 toString IDisconnect IDisconnect isDisconnected DebugUIMessages getString JDIModelPresentation _4 toString toString CoreException DebugUIMessages getString JDIModelPresentation not_responding _6
protected I Breakpoint get Breakpoint I Marker marker return Debug Plugin get Default get Breakpoint Manager get Breakpoint marker  IBreakpoint getBreakpoint IMarker DebugPlugin getDefault getBreakpointManager getBreakpoint
Build the text for an I Java Thread protected String get Thread Text I Java Thread thread boolean qualified throws Core Exception if thread is Terminated if thread is System Thread return get Formatted String DebugUI Messages get String JDI Model Presentation System Thread  0   Terminated  7 thread get Name NON NLS 1 else return get Formatted String DebugUI Messages get String JDI Model Presentation Thread  0   Terminated  8 thread get Name NON NLS 1 if thread is Stepping if thread is System Thread return get Formatted String DebugUI Messages get String JDI Model Presentation System Thread  0   Stepping  9 thread get Name NON NLS 1 else return get Formatted String DebugUI Messages get String JDI Model Presentation Thread  0   Stepping  10 thread get Name NON NLS 1 if thread is Performing Evaluation if thread is System Thread return get Formatted String DebugUI Messages get String JDI Model Presentation System Thread  0   Evaluating  9 thread get Name NON NLS 1 else return get Formatted String DebugUI Messages get String JDI Model Presentation Thread  0   Evaluating  10 thread get Name NON NLS 1 if thread is Suspended thread instanceof JDI Thread JDI Thread thread is Suspended Quiet if thread is System Thread return get Formatted String DebugUI Messages get String JDI Model Presentation System Thread  0   Running  11 thread get Name NON NLS 1 else return get Formatted String DebugUI Messages get String JDI Model Presentation Thread  0   Running  12 thread get Name NON NLS 1 I Breakpoint breakpoints thread get Breakpoints if breakpoints length 0 I Java Breakpoint breakpoint I Java Breakpoint breakpoints 0 for int i 0 num Breakpoints breakpoints length i num Breakpoints i if Breakpoint Utils is Problem Breakpoint breakpoints i If a compilation error breakpoint exists display it instead of the first breakpoint breakpoint I Java Breakpoint breakpoints i break String type Name get Marker Type Name breakpoint qualified if Breakpoint Utils is Problem Breakpoint breakpoint I Java Stack Frame frame I Java Stack Frame thread get Top Stack Frame I Marker problem null if frame null problem Java Debug Options Manager get Default get Problem frame if problem null String message problem get Attribute I Marker MESSAGE DebugUI Messages get String JDI Model Presentation Compilation error 1 NON NLS 1 if thread is System Thread return get Formatted String DebugUI Messages get String JDI Model Presentation System Thread  0   Suspended  1  2 new String thread get Name message NON NLS 1 else return get Formatted String DebugUI Messages get String JDI Model Presentation Thread  0   Suspended  1  3 new String thread get Name message NON NLS 1 if breakpoint instanceof I Java Exception Breakpoint String ex Name I Java Exception Breakpoint breakpoint get Exception Type Name if ex Name null ex Name type Name else if qualified int index ex Name last Index Of ex Name ex Name substring index 1 if thread is System Thread return get Formatted String DebugUI Messages get String JDI Model Presentation System Thread  0   Suspended  exception  1  13 new String thread get Name ex Name NON NLS 1 else return get Formatted String DebugUI Messages get String JDI Model Presentation Thread  0   Suspended  exception  1  14 new String thread get Name ex Name NON NLS 1 if breakpoint instanceof I Java Watchpoint I Java Watchpoint wp I Java Watchpoint breakpoint String field Name wp get Field Name NON NLS 1 if wp is Access Suspend thread get Debug Target if thread is System Thread return get Formatted String DebugUI Messages get String JDI Model Presentation System Thread  0   Suspended  access of field  1  in  2  16 new String thread get Name field Name type Name NON NLS 1 else return get Formatted String DebugUI Messages get String JDI Model Presentation Thread  0   Suspended  access of field  1  in  2  17 new String thread get Name field Name type Name NON NLS 1 else modification if thread is System Thread return get Formatted String DebugUI Messages get String JDI Model Presentation System Thread  0   Suspended  modification of field  1  in  2  18 new String thread get Name field Name type Name NON NLS 1 else return get Formatted String DebugUI Messages get String JDI Model Presentation Thread  0   Suspended  modification of field  1  in  2  19 new String thread get Name field Name type Name NON NLS 1 if breakpoint instanceof I Java Method Breakpoint I Java Method Breakpoint me I Java Method Breakpoint breakpoint String method Name me get Method Name if me is Entry Suspend thread get Debug Target if thread is System Thread return get Formatted String DebugUI Messages get String JDI Model Presentation System Thread  0   Suspended  entry into method  1  in  2  21 new String thread get Name method Name type Name NON NLS 1 else return get Formatted String DebugUI Messages get String JDI Model Presentation Thread  0   Suspended  entry into method  1  in  2  22 new String thread get Name method Name type Name NON NLS 1 else if thread is System Thread return get Formatted String DebugUI Messages get String JDI Model Presentation System Thread  0   Suspended  exit of method  1  in  2  21 new String thread get Name method Name type Name NON NLS 1 else return get Formatted String DebugUI Messages get String JDI Model Presentation Thread  0   Suspended  exit of method  1  in  2  22 new String thread get Name method Name type Name NON NLS 1 if breakpoint instanceof I Java Line Breakpoint I Java Line Breakpoint jlbp I Java Line Breakpoint breakpoint int line Number jlbp get Line Number if line Number 1 if thread is System Thread if Breakpoint Utils is Run To Line Breakpoint jlbp return get Formatted String DebugUI Messages get String JDI Model Presentation System Thread  0   Suspended  run to line  1  in  2  23 new String thread get Name String value Of line Number type Name NON NLS 1 else return get Formatted String DebugUI Messages get String JDI Model Presentation System Thread  0   Suspended  breakpoint at line  1  in  2  24 new String thread get Name String value Of line Number type Name NON NLS 1 else if Breakpoint Utils is Run To Line Breakpoint jlbp return get Formatted String DebugUI Messages get String JDI Model Presentation Thread  0   Suspended  run to line  1  in  2  25 new String thread get Name String value Of line Number type Name NON NLS 1 else return get Formatted String DebugUI Messages get String JDI Model Presentation Thread  0   Suspended  breakpoint at line  1  in  2  26 new String thread get Name String value Of line Number type Name NON NLS 1 if breakpoint instanceof I Java Class Prepare Breakpoint return get Formatted String DebugUI Messages get String JDI Model Presentation 115 new String thread get Name get Qualified Name breakpoint get Type Name NON NLS 1 Otherwise it s just suspended if thread is System Thread return get Formatted String DebugUI Messages get String JDI Model Presentation System Thread  0   Suspended  27 thread get Name NON NLS 1 else return get Formatted String DebugUI Messages get String JDI Model Presentation Thread  0   Suspended  28 thread get Name NON NLS 1  IJavaThread getThreadText IJavaThread CoreException isTerminated isSystemThread getFormattedString DebugUIMessages getString JDIModelPresentation System_Thread_ _ _7 getName getFormattedString DebugUIMessages getString JDIModelPresentation Thread_ _ _8 getName isStepping isSystemThread getFormattedString DebugUIMessages getString JDIModelPresentation System_Thread_ _ _9 getName getFormattedString DebugUIMessages getString JDIModelPresentation Thread_ _ _10 getName isPerformingEvaluation isSystemThread getFormattedString DebugUIMessages getString JDIModelPresentation System_Thread_ _ _9 getName getFormattedString DebugUIMessages getString JDIModelPresentation Thread_ _ _10 getName isSuspended JDIThread JDIThread isSuspendedQuiet isSystemThread getFormattedString DebugUIMessages getString JDIModelPresentation System_Thread_ _ _11 getName getFormattedString DebugUIMessages getString JDIModelPresentation Thread_ _ _12 getName IBreakpoint getBreakpoints IJavaBreakpoint IJavaBreakpoint numBreakpoints numBreakpoints BreakpointUtils isProblemBreakpoint IJavaBreakpoint typeName getMarkerTypeName BreakpointUtils isProblemBreakpoint IJavaStackFrame IJavaStackFrame getTopStackFrame IMarker JavaDebugOptionsManager getDefault getProblem getAttribute IMarker DebugUIMessages getString JDIModelPresentation Compilation_error_1 isSystemThread getFormattedString DebugUIMessages getString JDIModelPresentation System_Thread_ _ Suspended_ _2 getName getFormattedString DebugUIMessages getString JDIModelPresentation Thread_ _ Suspended_ _3 getName IJavaExceptionBreakpoint exName IJavaExceptionBreakpoint getExceptionTypeName exName exName typeName exName lastIndexOf exName exName isSystemThread getFormattedString DebugUIMessages getString JDIModelPresentation System_Thread_ _ Suspended_ exception_ _13 getName exName getFormattedString DebugUIMessages getString JDIModelPresentation Thread_ _ Suspended_ exception_ _14 getName exName IJavaWatchpoint IJavaWatchpoint IJavaWatchpoint fieldName getFieldName isAccessSuspend getDebugTarget isSystemThread getFormattedString DebugUIMessages getString JDIModelPresentation System_Thread_ _ Suspended_ access_of_field_ _in_ _16 getName fieldName typeName getFormattedString DebugUIMessages getString JDIModelPresentation Thread_ _ Suspended_ access_of_field_ _in_ _17 getName fieldName typeName isSystemThread getFormattedString DebugUIMessages getString JDIModelPresentation System_Thread_ _ Suspended_ modification_of_field_ _in_ _18 getName fieldName typeName getFormattedString DebugUIMessages getString JDIModelPresentation Thread_ _ Suspended_ modification_of_field_ _in_ _19 getName fieldName typeName IJavaMethodBreakpoint IJavaMethodBreakpoint IJavaMethodBreakpoint methodName getMethodName isEntrySuspend getDebugTarget isSystemThread getFormattedString DebugUIMessages getString JDIModelPresentation System_Thread_ _ Suspended_ entry_into_method_ _in_ _21 getName methodName typeName getFormattedString DebugUIMessages getString JDIModelPresentation Thread_ _ Suspended_ entry_into_method_ _in_ _22 getName methodName typeName isSystemThread getFormattedString DebugUIMessages getString JDIModelPresentation System_Thread_ _ Suspended_ exit_of_method_ _in_ _21 getName methodName typeName getFormattedString DebugUIMessages getString JDIModelPresentation Thread_ _ Suspended_ exit_of_method_ _in_ _22 getName methodName typeName IJavaLineBreakpoint IJavaLineBreakpoint IJavaLineBreakpoint lineNumber getLineNumber lineNumber isSystemThread BreakpointUtils isRunToLineBreakpoint getFormattedString DebugUIMessages getString JDIModelPresentation System_Thread_ _ Suspended_ run_to_line_ _in_ _23 getName valueOf lineNumber typeName getFormattedString DebugUIMessages getString JDIModelPresentation System_Thread_ _ Suspended_ breakpoint_at_line_ _in_ _24 getName valueOf lineNumber typeName BreakpointUtils isRunToLineBreakpoint getFormattedString DebugUIMessages getString JDIModelPresentation Thread_ _ Suspended_ run_to_line_ _in_ _25 getName valueOf lineNumber typeName getFormattedString DebugUIMessages getString JDIModelPresentation Thread_ _ Suspended_ breakpoint_at_line_ _in_ _26 getName valueOf lineNumber typeName IJavaClassPrepareBreakpoint getFormattedString DebugUIMessages getString JDIModelPresentation getName getQualifiedName getTypeName isSystemThread getFormattedString DebugUIMessages getString JDIModelPresentation System_Thread_ _ _27 getName getFormattedString DebugUIMessages getString JDIModelPresentation Thread_ _ _28 getName
Build the text for an I Java Debug Target protected String get Debug Target Text I Java Debug Target debug Target throws Debug Exception String label String debug Target get Name if debug Target is Suspended label String DebugUI Messages get String JDI Model Presentation target suspended NON NLS 1 return label String  IJavaDebugTarget getDebugTargetText IJavaDebugTarget debugTarget DebugException labelString debugTarget getName debugTarget isSuspended labelString DebugUIMessages getString JDIModelPresentation target_suspended labelString
Build the text for an I Java Value protected String get Value Text I Java Value value throws Debug Exception String ref Type Name value get Reference Type Name String value String value get Value String boolean is String ref Type Name equals fg String Name I Java Type type value get Java Type String signature null if type null signature type get Signature if V equals signature NON NLS 1 value String DebugUI Messages get String JDI Model Presentation No explicit return value  30 NON NLS 1 boolean is Object is Object Value signature boolean is Array value instanceof I Java Array String Buffer buffer new String Buffer Always show type name for objects arrays but not Strings if is Object is Array is String ref Type Name length 0 String qual Type Name get Qualified Name ref Type Name if is Array qual Type Name adjust Type Name For Array Index qual Type Name I Java Array value get Length buffer append qual Type Name buffer append Put double quotes around Strings if value String null is String value String length 0 if is String buffer append buffer append value String if is String buffer append show unsigned value second if applicable if is Show Unsigned Values buffer append Unsigned Text value buffer show hex value third if applicable if is Show Hex Values buffer append Hex Text value buffer show byte character value last if applicable if is Show Char Values buffer append Char Text value buffer return buffer to String  IJavaValue getValueText IJavaValue DebugException refTypeName getReferenceTypeName valueString getValueString isString refTypeName fgStringName IJavaType getJavaType getSignature valueString DebugUIMessages getString JDIModelPresentation No_explicit_return_value _30 isObject isObjectValue isArray IJavaArray StringBuffer StringBuffer isObject isArray isString refTypeName qualTypeName getQualifiedName refTypeName isArray qualTypeName adjustTypeNameForArrayIndex qualTypeName IJavaArray getLength qualTypeName valueString isString valueString isString valueString isString isShowUnsignedValues appendUnsignedText isShowHexValues appendHexText isShowCharValues appendCharText toString
private String Buffer append Unsigned Text I Java Value value String Buffer buffer throws Debug Exception String unsigned Text get Value Unsigned Text value if unsigned Text null buffer append NON NLS 1 buffer append unsigned Text buffer append NON NLS 1 return buffer  StringBuffer appendUnsignedText IJavaValue StringBuffer DebugException unsignedText getValueUnsignedText unsignedText unsignedText
protected String Buffer append Hex Text I Java Value value String Buffer buffer throws Debug Exception String hex Text get Value Hex Text value if hex Text null buffer append NON NLS 1 buffer append hex Text buffer append NON NLS 1 return buffer  StringBuffer appendHexText IJavaValue StringBuffer DebugException hexText getValueHexText hexText hexText
protected String Buffer append Char Text I Java Value value String Buffer buffer throws Debug Exception String char Text get Value Char Text value if char Text null buffer append NON NLS 1 buffer append char Text buffer append NON NLS 1 return buffer  StringBuffer appendCharText IJavaValue StringBuffer DebugException charText getValueCharText charText charText
Given a JNI style signature String for a I Java Value return true if the signature represents an Object or an array of Objects protected boolean is Object Value String signature if signature null return false char sig Char for int i 0 i signature length i sig Char signature char At i if sig Char continue break if sig Char L sig Char Q return true return false  IJavaValue isObjectValue sigChar sigChar charAt sigChar sigChar sigChar
Returns the type signature for this value if its type is primitive For non primitive types null is returned protected String get Primitive Value Type Signature I Java Value value throws Debug Exception I Java Type type value get Java Type if type null String sig type get Signature if sig null sig length 1 return sig return null  getPrimitiveValueTypeSignature IJavaValue DebugException IJavaType getJavaType getSignature
Returns the character string of a byte or code null code if the value can not be interpreted as a valid character protected String get Value Char Text I Java Value value throws Debug Exception String sig get Primitive Value Type Signature value if sig null return null String value String value get Value String long long Value try long Value Long parse Long value String catch Number Format Exception e return null switch sig char At 0 case B byte long Value long Value 0xFF Only lower 8 bits break case I int long Value long Value 0xFFFFFFFF Only lower 32 bits if long Value 0xFFFF long Value 0 return null break case S short long Value long Value 0xFFFF Only lower 16 bits break case J if long Value 0xFFFF long Value 0 Out of character range return null break default return null char char Value char long Value String Buffer char Text new String Buffer if Character get Type char Value Character CONTROL Character ctrl new Character char char Value 64 char Text append NON NLS 1 char Text append ctrl switch char Value common use case 0 char Text append NUL break NON NLS 1 case 8 char Text append BS break NON NLS 1 case 9 char Text append TAB break NON NLS 1 case 10 char Text append LF break NON NLS 1 case 13 char Text append CR break NON NLS 1 case 21 char Text append NL break NON NLS 1 case 27 char Text append ESC break NON NLS 1 case 127 char Text append DEL break NON NLS 1 else char Text append new Character char Value return char Text to String  getValueCharText IJavaValue DebugException getPrimitiveValueTypeSignature valueString getValueString longValue longValue parseLong valueString NumberFormatException charAt longValue longValue longValue longValue longValue longValue longValue longValue longValue longValue charValue longValue StringBuffer charText StringBuffer getType charValue charValue charText charText charValue charText charText charText charText charText charText charText charText charText charValue charText toString
protected String get Marker Type Name I Java Breakpoint breakpoint boolean qualified throws Core Exception String type Name null if breakpoint instanceof I Java Pattern Breakpoint type Name breakpoint get Marker get Resource get Name else type Name breakpoint get Type Name if qualified int index type Name last Index Of if index 1 type Name type Name substring index 1 return type Name  getMarkerTypeName IJavaBreakpoint CoreException typeName IJavaPatternBreakpoint typeName getMarker getResource getName typeName getTypeName typeName lastIndexOf typeName typeName typeName
Maps a Java element to an appropriate image see I Debug Model Presentation get Image Object public Image get Image Object item try if item instanceof I Java Variable return get Variable Image I Adaptable item if item instanceof I Marker I Breakpoint bp get Breakpoint I Marker item if bp null bp instanceof I Java Breakpoint return get Breakpoint Image I Java Breakpoint bp if item instanceof I Java Breakpoint return get Breakpoint Image I Java Breakpoint item if item instanceof I Java Stack Frame item instanceof I Java Thread item instanceof I Java Debug Target return get Debug Element Image item if item instanceof I Java Value return JavaUI get Shared Images get Image I Shared Images IMG OBJS PUBLIC if item instanceof I Expression return get Expression Image item catch Core Exception e if e get Status get Exception instanceof VM Disconnected Exception JDI DebugUI Plugin log e return null  IDebugModelPresentation getImage getImage IJavaVariable getVariableImage IAdaptable IMarker IBreakpoint getBreakpoint IMarker IJavaBreakpoint getBreakpointImage IJavaBreakpoint IJavaBreakpoint getBreakpointImage IJavaBreakpoint IJavaStackFrame IJavaThread IJavaDebugTarget getDebugElementImage IJavaValue getSharedImages getImage ISharedImages IMG_OBJS_PUBLIC IExpression getExpressionImage CoreException getStatus getException VMDisconnectedException JDIDebugUIPlugin
protected Image get Breakpoint Image I Java Breakpoint breakpoint throws Core Exception if breakpoint instanceof I Java Exception Breakpoint return get Exception Breakpoint Image I Java Exception Breakpoint breakpoint else if breakpoint instanceof I Java Class Prepare Breakpoint return get Class Prepare Breakpoint Image I Java Class Prepare Breakpoint breakpoint if breakpoint instanceof I Java Line Breakpoint Breakpoint Utils is Run To Line Breakpoint I Java Line Breakpoint breakpoint return null else return get Java Breakpoint Image breakpoint  getBreakpointImage IJavaBreakpoint CoreException IJavaExceptionBreakpoint getExceptionBreakpointImage IJavaExceptionBreakpoint IJavaClassPrepareBreakpoint getClassPrepareBreakpointImage IJavaClassPrepareBreakpoint IJavaLineBreakpoint BreakpointUtils isRunToLineBreakpoint IJavaLineBreakpoint getJavaBreakpointImage
protected Image get Exception Breakpoint Image I Java Exception Breakpoint exception throws Core Exception int flags compute Breakpoint Adornment Flags exception JDI Image Descriptor descriptor null if flags JDI Image Descriptor ENABLED 0 descriptor new JDI Image Descriptor Java Debug Images DESC OBJS EXCEPTION DISABLED flags else if exception is Checked descriptor new JDI Image Descriptor Java Debug Images DESC OBJS EXCEPTION flags else descriptor new JDI Image Descriptor Java Debug Images DESC OBJS ERROR flags return get Debug Image Registry get descriptor  getExceptionBreakpointImage IJavaExceptionBreakpoint CoreException computeBreakpointAdornmentFlags JDIImageDescriptor JDIImageDescriptor JDIImageDescriptor JavaDebugImages DESC_OBJS_EXCEPTION_DISABLED isChecked JDIImageDescriptor JavaDebugImages DESC_OBJS_EXCEPTION JDIImageDescriptor JavaDebugImages DESC_OBJS_ERROR getDebugImageRegistry
protected Image get Java Breakpoint Image I Java Breakpoint breakpoint throws Core Exception if breakpoint instanceof I Java Method Breakpoint I Java Method Breakpoint m Breakpoint I Java Method Breakpoint breakpoint return get Java Method Breakpoint Image m Breakpoint else if breakpoint instanceof I Java Watchpoint I Java Watchpoint watchpoint I Java Watchpoint breakpoint return get Java Watchpoint Image watchpoint else if breakpoint instanceof I Java Method Entry Breakpoint I Java Method Entry Breakpoint me Breakpoint I Java Method Entry Breakpoint breakpoint return get Java Method Entry Breakpoint Image me Breakpoint else int flags compute Breakpoint Adornment Flags breakpoint JDI Image Descriptor descriptor null if breakpoint is Enabled descriptor new JDI Image Descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS BREAKPOINT flags else descriptor new JDI Image Descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS BREAKPOINT DISABLED flags return get Debug Image Registry get descriptor  getJavaBreakpointImage IJavaBreakpoint CoreException IJavaMethodBreakpoint IJavaMethodBreakpoint mBreakpoint IJavaMethodBreakpoint getJavaMethodBreakpointImage mBreakpoint IJavaWatchpoint IJavaWatchpoint IJavaWatchpoint getJavaWatchpointImage IJavaMethodEntryBreakpoint IJavaMethodEntryBreakpoint meBreakpoint IJavaMethodEntryBreakpoint getJavaMethodEntryBreakpointImage meBreakpoint computeBreakpointAdornmentFlags JDIImageDescriptor isEnabled JDIImageDescriptor DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_BREAKPOINT JDIImageDescriptor DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_BREAKPOINT_DISABLED getDebugImageRegistry
protected Image get Java Method Breakpoint Image I Java Method Breakpoint m Breakpoint throws Core Exception int flags compute Breakpoint Adornment Flags m Breakpoint JDI Image Descriptor descriptor null if m Breakpoint is Enabled descriptor new JDI Image Descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS BREAKPOINT flags else descriptor new JDI Image Descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS BREAKPOINT DISABLED flags return get Debug Image Registry get descriptor  getJavaMethodBreakpointImage IJavaMethodBreakpoint mBreakpoint CoreException computeBreakpointAdornmentFlags mBreakpoint JDIImageDescriptor mBreakpoint isEnabled JDIImageDescriptor DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_BREAKPOINT JDIImageDescriptor DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_BREAKPOINT_DISABLED getDebugImageRegistry
protected Image get Java Method Entry Breakpoint Image I Java Method Entry Breakpoint m Breakpoint throws Core Exception int flags compute Breakpoint Adornment Flags m Breakpoint JDI Image Descriptor descriptor null if m Breakpoint is Enabled descriptor new JDI Image Descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS BREAKPOINT flags else descriptor new JDI Image Descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS BREAKPOINT DISABLED flags return get Debug Image Registry get descriptor  getJavaMethodEntryBreakpointImage IJavaMethodEntryBreakpoint mBreakpoint CoreException computeBreakpointAdornmentFlags mBreakpoint JDIImageDescriptor mBreakpoint isEnabled JDIImageDescriptor DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_BREAKPOINT JDIImageDescriptor DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_BREAKPOINT_DISABLED getDebugImageRegistry
protected Image get Class Prepare Breakpoint Image I Java Class Prepare Breakpoint breakpoint throws Core Exception int flags compute Breakpoint Adornment Flags breakpoint JDI Image Descriptor descriptor null if breakpoint get Member Type I Java Class Prepare Breakpoint TYPE CLASS descriptor new JDI Image Descriptor JavaUI get Shared Images get Image Descriptor I Shared Images IMG OBJS CLASS flags else descriptor new JDI Image Descriptor JavaUI get Shared Images get Image Descriptor I Shared Images IMG OBJS INTERFACE flags return get Debug Image Registry get descriptor  getClassPrepareBreakpointImage IJavaClassPrepareBreakpoint CoreException computeBreakpointAdornmentFlags JDIImageDescriptor getMemberType IJavaClassPrepareBreakpoint TYPE_CLASS JDIImageDescriptor getSharedImages getImageDescriptor ISharedImages IMG_OBJS_CLASS JDIImageDescriptor getSharedImages getImageDescriptor ISharedImages IMG_OBJS_INTERFACE getDebugImageRegistry
protected Image get Java Watchpoint Image I Java Watchpoint watchpoint throws Core Exception int flags compute Breakpoint Adornment Flags watchpoint JDI Image Descriptor descriptor null boolean enabled flags JDI Image Descriptor ENABLED 0 if watchpoint is Access if watchpoint is Modification access and modification if enabled descriptor new JDI Image Descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS WATCHPOINT flags else descriptor new JDI Image Descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS WATCHPOINT DISABLED flags else if enabled descriptor new JDI Image Descriptor Java Debug Images DESC OBJS ACCESS WATCHPOINT ENABLED flags else descriptor new JDI Image Descriptor Java Debug Images DESC OBJS ACCESS WATCHPOINT DISABLED flags else if watchpoint is Modification if enabled descriptor new JDI Image Descriptor Java Debug Images DESC OBJS MODIFICATION WATCHPOINT ENABLED flags else descriptor new JDI Image Descriptor Java Debug Images DESC OBJS MODIFICATION WATCHPOINT DISABLED flags else neither access nor modification descriptor new JDI Image Descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS WATCHPOINT DISABLED flags return get Debug Image Registry get descriptor  getJavaWatchpointImage IJavaWatchpoint CoreException computeBreakpointAdornmentFlags JDIImageDescriptor JDIImageDescriptor isAccess isModification JDIImageDescriptor DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_WATCHPOINT JDIImageDescriptor DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_WATCHPOINT_DISABLED JDIImageDescriptor JavaDebugImages DESC_OBJS_ACCESS_WATCHPOINT_ENABLED JDIImageDescriptor JavaDebugImages DESC_OBJS_ACCESS_WATCHPOINT_DISABLED isModification JDIImageDescriptor JavaDebugImages DESC_OBJS_MODIFICATION_WATCHPOINT_ENABLED JDIImageDescriptor JavaDebugImages DESC_OBJS_MODIFICATION_WATCHPOINT_DISABLED JDIImageDescriptor DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_WATCHPOINT_DISABLED getDebugImageRegistry
protected Image get Variable Image I Adaptable element Java Element Image Descriptor descriptor new Java Element Image Descriptor compute Base Image Descriptor element compute Adornment Flags element BIG SIZE return get Java Element Image Registry get descriptor  getVariableImage IAdaptable JavaElementImageDescriptor JavaElementImageDescriptor computeBaseImageDescriptor computeAdornmentFlags BIG_SIZE getJavaElementImageRegistry
Returns the image associated with the given element or code null code if none is defined protected Image get Debug Element Image Object element Image Descriptor image null if element instanceof I Java Thread I Java Thread thread I Java Thread element if thread is Suspended thread is Performing Evaluation image DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS THREAD SUSPENDED else if thread is Terminated image DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS THREAD TERMINATED else image DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS THREAD RUNNING else image DebugUI Tools get Default Image Descriptor element if image null return null int flags computeJDI Adornment Flags element JDI Image Descriptor descriptor new JDI Image Descriptor image flags return get Debug Image Registry get descriptor  getDebugElementImage ImageDescriptor IJavaThread IJavaThread IJavaThread isSuspended isPerformingEvaluation DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_THREAD_SUSPENDED isTerminated DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_THREAD_TERMINATED DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_THREAD_RUNNING DebugUITools getDefaultImageDescriptor computeJDIAdornmentFlags JDIImageDescriptor JDIImageDescriptor getDebugImageRegistry
Returns the image associated with the given element or code null code if none is defined protected Image get Expression Image Object expression Image Descriptor image null boolean big Size false if expression instanceof Java Inspect Expression image Java Debug Images DESC OBJ JAVA INSPECT EXPRESSION big Size true if image null return null JDI Image Descriptor descriptor new JDI Image Descriptor image 0 if big Size descriptor set Size BIG SIZE return get Debug Image Registry get descriptor  getExpressionImage ImageDescriptor bigSize JavaInspectExpression JavaDebugImages DESC_OBJ_JAVA_INSPECT_EXPRESSION bigSize JDIImageDescriptor JDIImageDescriptor bigSize setSize BIG_SIZE getDebugImageRegistry
Returns the adornment flags for the given element These flags are used to render appropriate overlay icons for the element private int computeJDI Adornment Flags Object element try if element instanceof I Java Stack Frame if I Java Stack Frame element is Out Of Synch return JDI Image Descriptor IS OUT OF SYNCH if element instanceof I Java Thread if I Java Thread element is Out Of Synch return JDI Image Descriptor IS OUT OF SYNCH if I Java Thread element may Be Out Of Synch return JDI Image Descriptor MAY BE OUT OF SYNCH if element instanceof I Java Debug Target if I Java Debug Target element is Out Of Synch return JDI Image Descriptor IS OUT OF SYNCH if I Java Debug Target element may Be Out Of Synch return JDI Image Descriptor MAY BE OUT OF SYNCH catch Debug Exception e if e get Status get Code I Java Thread ERR THREAD NOT SUSPENDED JDI DebugUI Plugin log e return 0  computeJDIAdornmentFlags IJavaStackFrame IJavaStackFrame isOutOfSynch JDIImageDescriptor IS_OUT_OF_SYNCH IJavaThread IJavaThread isOutOfSynch JDIImageDescriptor IS_OUT_OF_SYNCH IJavaThread mayBeOutOfSynch JDIImageDescriptor MAY_BE_OUT_OF_SYNCH IJavaDebugTarget IJavaDebugTarget isOutOfSynch JDIImageDescriptor IS_OUT_OF_SYNCH IJavaDebugTarget mayBeOutOfSynch JDIImageDescriptor MAY_BE_OUT_OF_SYNCH DebugException getStatus getCode IJavaThread ERR_THREAD_NOT_SUSPENDED JDIDebugUIPlugin
Returns the adornment flags for the given breakpoint These flags are used to render appropriate overlay icons for the breakpoint private int compute Breakpoint Adornment Flags I Java Breakpoint breakpoint int flags 0 try if breakpoint is Enabled flags JDI Image Descriptor ENABLED if breakpoint is Installed flags JDI Image Descriptor INSTALLED if breakpoint instanceof I Java Line Breakpoint if I Java Line Breakpoint breakpoint is Condition Enabled flags JDI Image Descriptor CONDITIONAL if breakpoint instanceof I Java Method Breakpoint I Java Method Breakpoint m Breakpoint I Java Method Breakpoint breakpoint if m Breakpoint is Entry flags JDI Image Descriptor ENTRY if m Breakpoint is Exit flags JDI Image Descriptor EXIT if breakpoint instanceof I Java Method Entry Breakpoint flags JDI Image Descriptor ENTRY else if breakpoint instanceof I Java Exception Breakpoint I Java Exception Breakpoint e Breakpoint I Java Exception Breakpoint breakpoint if e Breakpoint is Caught flags JDI Image Descriptor CAUGHT if e Breakpoint is Uncaught flags JDI Image Descriptor UNCAUGHT if e Breakpoint get Exclusion Filters length 0 e Breakpoint get Inclusion Filters length 0 flags JDI Image Descriptor SCOPED catch Core Exception e return flags  computeBreakpointAdornmentFlags IJavaBreakpoint isEnabled JDIImageDescriptor isInstalled JDIImageDescriptor IJavaLineBreakpoint IJavaLineBreakpoint isConditionEnabled JDIImageDescriptor IJavaMethodBreakpoint IJavaMethodBreakpoint mBreakpoint IJavaMethodBreakpoint mBreakpoint isEntry JDIImageDescriptor mBreakpoint isExit JDIImageDescriptor IJavaMethodEntryBreakpoint JDIImageDescriptor IJavaExceptionBreakpoint IJavaExceptionBreakpoint eBreakpoint IJavaExceptionBreakpoint eBreakpoint isCaught JDIImageDescriptor eBreakpoint isUncaught JDIImageDescriptor eBreakpoint getExclusionFilters eBreakpoint getInclusionFilters JDIImageDescriptor CoreException
private Image Descriptor compute Base Image Descriptor I Adaptable element I Java Variable java Variable I Java Variable element get Adapter I Java Variable class if java Variable null try if java Variable is Local return Java Debug Images DESC OBJS LOCAL VARIABLE if java Variable is Public return JavaUI get Shared Images get Image Descriptor I Shared Images IMG OBJS PUBLIC if java Variable is Protected return JavaUI get Shared Images get Image Descriptor I Shared Images IMG OBJS PROTECTED if java Variable is Private return JavaUI get Shared Images get Image Descriptor I Shared Images IMG OBJS PRIVATE catch Debug Exception e JDI DebugUI Plugin log e return JavaUI get Shared Images get Image Descriptor I Shared Images IMG OBJS DEFAULT  ImageDescriptor computeBaseImageDescriptor IAdaptable IJavaVariable javaVariable IJavaVariable getAdapter IJavaVariable javaVariable javaVariable isLocal JavaDebugImages DESC_OBJS_LOCAL_VARIABLE javaVariable isPublic getSharedImages getImageDescriptor ISharedImages IMG_OBJS_PUBLIC javaVariable isProtected getSharedImages getImageDescriptor ISharedImages IMG_OBJS_PROTECTED javaVariable isPrivate getSharedImages getImageDescriptor ISharedImages IMG_OBJS_PRIVATE DebugException JDIDebugUIPlugin getSharedImages getImageDescriptor ISharedImages IMG_OBJS_DEFAULT
private int compute Adornment Flags I Adaptable element int flags 0 I Java Modifiers java Properties I Java Modifiers element get Adapter I Java Modifiers class try if java Properties null if java Properties is Final flags Java Element Image Descriptor FINAL if java Properties is Static flags Java Element Image Descriptor STATIC catch Debug Exception e JDI DebugUI Plugin log e return flags  computeAdornmentFlags IAdaptable IJavaModifiers javaProperties IJavaModifiers getAdapter IJavaModifiers javaProperties javaProperties isFinal JavaElementImageDescriptor javaProperties isStatic JavaElementImageDescriptor DebugException JDIDebugUIPlugin
see I Debug Model Presentation get Editor Input Object public I Editor Input get Editor Input Object item try if item instanceof I Marker item get Breakpoint I Marker item if item instanceof I Java Breakpoint I Type type Breakpoint Utils get Type I Java Breakpoint item if type null if the breakpoint is not associated with a type use its resource item I Java Breakpoint item get Marker get Resource else item type if item instanceof Local File Storage return new Local File Storage Editor Input Local File Storage item if item instanceof Zip Entry Storage return new Zip Entry Storage Editor Input Zip Entry Storage item return Editor Utility get Editor Input item catch Core Exception e JDI DebugUI Plugin log e return null  IDebugModelPresentation getEditorInput IEditorInput getEditorInput IMarker getBreakpoint IMarker IJavaBreakpoint IType BreakpointUtils getType IJavaBreakpoint IJavaBreakpoint getMarker getResource LocalFileStorage LocalFileStorageEditorInput LocalFileStorage ZipEntryStorage ZipEntryStorageEditorInput ZipEntryStorage EditorUtility getEditorInput CoreException JDIDebugUIPlugin
see I Debug Model Presentation get Editor Id I Editor Input Object public String get Editor Id I Editor Input input Object input Object I Editor Registry registry PlatformUI get Workbench get Editor Registry I Editor Descriptor descriptor registry get Default Editor input get Name if descriptor null return descriptor get Id return null  IDebugModelPresentation getEditorId IEditorInput getEditorId IEditorInput inputObject IEditorRegistry getWorkbench getEditorRegistry IEditorDescriptor getDefaultEditor getName getId
see I Debug Model Presentation set Attribute String Object public void set Attribute String id Object value if value null return f Attributes put id value  IDebugModelPresentation setAttribute setAttribute fAttributes
protected boolean is Show Qualified Names Boolean show Qualified Boolean f Attributes get DISPLAY QUALIFIED NAMES show Qualified show Qualified null Boolean FALSE show Qualified return show Qualified boolean Value  isShowQualifiedNames showQualified fAttributes DISPLAY_QUALIFIED_NAMES showQualified showQualified showQualified showQualified booleanValue
protected boolean is Show Variable Type Names Boolean show Boolean f Attributes get DISPLAY VARIABLE TYPE NAMES show show null Boolean FALSE show return show boolean Value  isShowVariableTypeNames fAttributes DISPLAY_VARIABLE_TYPE_NAMES booleanValue
protected boolean is Show Hex Values Boolean show Boolean f Attributes get SHOW HEX VALUES show show null Boolean FALSE show return show boolean Value  isShowHexValues fAttributes SHOW_HEX_VALUES booleanValue
protected boolean is Show Char Values Boolean show Boolean f Attributes get SHOW CHAR VALUES show show null Boolean FALSE show return show boolean Value  isShowCharValues fAttributes SHOW_CHAR_VALUES booleanValue
protected boolean is Show Unsigned Values Boolean show Boolean f Attributes get SHOW UNSIGNED VALUES show show null Boolean FALSE show return show boolean Value  isShowUnsignedValues fAttributes SHOW_UNSIGNED_VALUES booleanValue
protected String get Variable Text I Java Variable var String var Label DebugUI Messages get String JDI Model Presentation unknown name  1 NON NLS 1 try var Label var get Name catch Debug Exception exception boolean show Types is Show Variable Type Names int space Index var Label last Index Of String Buffer buff new String Buffer String type Name DebugUI Messages get String JDI Model Presentation unknown type  2 NON NLS 1 try type Name var get Reference Type Name if show Types space Index 1 type Name get Qualified Name type Name catch Debug Exception exception if show Types buff append type Name buff append if space Index 1 show Types var Label var Label substring space Index 1 buff append var Label add declaring type name if required if var instanceof I Java Field Variable I Java Field Variable field I Java Field Variable var if is Duplicate Name field try String decl field get Declaring Type get Name buff append Message Format format 0 new String get Qualified Name decl NON NLS 1 catch Debug Exception e String value String DebugUI Messages get String JDI Model Presentation unknown value  3 NON NLS 1 try I Java Value java Value I Java Value var get Value value String get Value Text java Value catch Debug Exception exception do not put the equal sign for array partitions if value String length 0 buff append NON NLS 1 buff append value String return buff to String  getVariableText IJavaVariable varLabel DebugUIMessages getString JDIModelPresentation unknown_name _1 varLabel getName DebugException showTypes isShowVariableTypeNames spaceIndex varLabel lastIndexOf StringBuffer StringBuffer typeName DebugUIMessages getString JDIModelPresentation unknown_type _2 typeName getReferenceTypeName showTypes spaceIndex typeName getQualifiedName typeName DebugException showTypes typeName spaceIndex showTypes varLabel varLabel spaceIndex varLabel IJavaFieldVariable IJavaFieldVariable IJavaFieldVariable isDuplicateName getDeclaringType getName MessageFormat getQualifiedName DebugException valueString DebugUIMessages getString JDIModelPresentation unknown_value _3 IJavaValue javaValue IJavaValue getValue valueString getValueText javaValue DebugException valueString valueString toString
protected String get Expression Text I Expression expression throws Debug Exception boolean show Types is Show Variable Type Names String Buffer buff new String Buffer I Java Value java Value I Java Value expression get Value if java Value null String type Name null try type Name java Value get Reference Type Name catch Debug Exception exception Object Collected Exception is an expected exception which will occur if the inspected object has been garbage collected if exception get Status get Exception instanceof Object Collected Exception return DebugUI Messages get String JDI Model Presentation garbage collected object  6 NON NLS 1 else throw exception if show Types type Name get Qualified Name type Name if type Name length 0 buff append type Name buff append buff append expression get Expression Text if java Value null String value String get Value Text java Value if value String length 0 buff append NON NLS 1 buff append value String return buff to String  getExpressionText IExpression DebugException showTypes isShowVariableTypeNames StringBuffer StringBuffer IJavaValue javaValue IJavaValue getValue javaValue typeName typeName javaValue getReferenceTypeName DebugException ObjectCollectedException getStatus getException ObjectCollectedException DebugUIMessages getString JDIModelPresentation garbage_collected_object _6 showTypes typeName getQualifiedName typeName typeName typeName getExpressionText javaValue valueString getValueText javaValue valueString valueString toString
protected String get Watch Expression Text I Watch Expression expression throws Debug Exception return get Expression Text expression expression is Enabled DebugUI Messages get String JDI Model Presentation 116 NON NLS 1 NON NLS 2  getWatchExpressionText IWatchExpression DebugException getExpressionText isEnabled DebugUIMessages getString JDIModelPresentation
Given the reference type name of an array type insert the array length in between the for the first dimension and return the result protected String adjust Type Name For Array Index String type Name int array Index int first Bracket type Name index Of NON NLS 1 if first Bracket 0 return type Name String Buffer buffer new String Buffer type Name buffer insert first Bracket 1 Integer to String array Index return buffer to String  adjustTypeNameForArrayIndex typeName arrayIndex firstBracket typeName indexOf firstBracket typeName StringBuffer StringBuffer typeName firstBracket toString arrayIndex toString
protected String get Value Unsigned Text I Java Value value throws Debug Exception String sig get Primitive Value Type Signature value if sig null return null switch sig char At 0 case B byte int byte Val try byte Val Integer parse Int value get Value String catch Number Format Exception e return null if byte Val 0 byte Val byte Val 0xFF return Integer to String byte Val default return null  getValueUnsignedText IJavaValue DebugException getPrimitiveValueTypeSignature charAt byteVal byteVal parseInt getValueString NumberFormatException byteVal byteVal byteVal toString byteVal
protected String get Value Hex Text I Java Value value throws Debug Exception String sig get Primitive Value Type Signature value if sig null return null String Buffer buff new String Buffer long long Value char sig Value sig char At 0 try if sig Value C long Value value get Value String char At 0 else long Value Long parse Long value get Value String catch Number Format Exception e return null switch sig Value case B buff append 0x NON NLS 1 keep only the relevant bits for byte long Value 0xFF buff append Long to Hex String long Value break case I buff append 0x NON NLS 1 keep only the relevant bits for int long Value 0xFFFFFFF Fl buff append Long to Hex String long Value break case S buff append 0x NON NLS 1 keep only the relevant bits for short long Value long Value 0xFFFF buff append Long to Hex String long Value break case J buff append 0x NON NLS 1 buff append Long to Hex String long Value break case C buff append u NON NLS 1 String hex String Long to Hex String long Value int length hex String length while length 4 buff append 0 length buff append hex String break default return null return buff to String  getValueHexText IJavaValue DebugException getPrimitiveValueTypeSignature StringBuffer StringBuffer longValue sigValue charAt sigValue longValue getValueString charAt longValue parseLong getValueString NumberFormatException sigValue longValue toHexString longValue longValue 0xFFFFFFFFl toHexString longValue longValue longValue toHexString longValue toHexString longValue hexString toHexString longValue hexString hexString toString
protected String get Breakpoint Text I Breakpoint breakpoint throws Core Exception if breakpoint instanceof I Java Exception Breakpoint return get Exception Breakpoint Text I Java Exception Breakpoint breakpoint else if breakpoint instanceof I Java Watchpoint return get Watchpoint Text I Java Watchpoint breakpoint else if breakpoint instanceof I Java Method Breakpoint return get Method Breakpoint Text I Java Method Breakpoint breakpoint else if breakpoint instanceof I Java Pattern Breakpoint return get Java Pattern Breakpoint Text I Java Pattern Breakpoint breakpoint else if breakpoint instanceof I Java Target Pattern Breakpoint return get Java Target Pattern Breakpoint Text I Java Target Pattern Breakpoint breakpoint else if breakpoint instanceof I Java Stratum Line Breakpoint return get Java Stratum Line Breakpoint Text I Java Stratum Line Breakpoint breakpoint else if breakpoint instanceof I Java Line Breakpoint return get Line Breakpoint Text I Java Line Breakpoint breakpoint else if breakpoint instanceof I Java Class Prepare Breakpoint return get Class Prepare Breakpoint Text I Java Class Prepare Breakpoint breakpoint return NON NLS 1  getBreakpointText IBreakpoint CoreException IJavaExceptionBreakpoint getExceptionBreakpointText IJavaExceptionBreakpoint IJavaWatchpoint getWatchpointText IJavaWatchpoint IJavaMethodBreakpoint getMethodBreakpointText IJavaMethodBreakpoint IJavaPatternBreakpoint getJavaPatternBreakpointText IJavaPatternBreakpoint IJavaTargetPatternBreakpoint getJavaTargetPatternBreakpointText IJavaTargetPatternBreakpoint IJavaStratumLineBreakpoint getJavaStratumLineBreakpointText IJavaStratumLineBreakpoint IJavaLineBreakpoint getLineBreakpointText IJavaLineBreakpoint IJavaClassPrepareBreakpoint getClassPrepareBreakpointText IJavaClassPrepareBreakpoint
param breakpoint return private String get Java Stratum Line Breakpoint Text I Java Stratum Line Breakpoint breakpoint throws Core Exception TODO finish this method I Resource resource breakpoint get Marker get Resource I Member member Breakpoint Utils get Member breakpoint String Buffer label new String Buffer resource get Name append Line Number breakpoint label append Hit Count breakpoint label append Suspend Policy breakpoint label append Thread Filter breakpoint label if member null label append NON NLS 1 label append get Java Label Provider get Text member return label to String  getJavaStratumLineBreakpointText IJavaStratumLineBreakpoint CoreException IResource getMarker getResource IMember BreakpointUtils getMember StringBuffer StringBuffer getName appendLineNumber appendHitCount appendSuspendPolicy appendThreadFilter getJavaLabelProvider getText toString
protected String get Exception Breakpoint Text I Java Exception Breakpoint breakpoint throws Core Exception String Buffer buffer new String Buffer String type Name breakpoint get Type Name buffer append get Qualified Name type Name append Hit Count breakpoint buffer append Suspend Policy breakpoint buffer append Thread Filter breakpoint buffer if breakpoint get Exclusion Filters length 0 breakpoint get Inclusion Filters length 0 buffer append DebugUI Messages get String JDI Model Presentation   scoped  1 NON NLS 1 append Instance Filter breakpoint buffer String state null boolean c breakpoint is Caught boolean u breakpoint is Uncaught if c u state DebugUI Messages get String JDI Model Presentation caught and uncaught 60 NON NLS 1 else if c state DebugUI Messages get String JDI Model Presentation caught 61 NON NLS 1 else if u state DebugUI Messages get String JDI Model Presentation uncaught 62 NON NLS 1 String label null if state null label buffer to String else String format DebugUI Messages get String JDI Model Presentation 1    0  63 NON NLS 1 label Message Format format format new Object state buffer return label  getExceptionBreakpointText IJavaExceptionBreakpoint CoreException StringBuffer StringBuffer typeName getTypeName getQualifiedName typeName appendHitCount appendSuspendPolicy appendThreadFilter getExclusionFilters getInclusionFilters DebugUIMessages getString JDIModelPresentation _ _1 appendInstanceFilter isCaught isUncaught DebugUIMessages getString JDIModelPresentation caught_and_uncaught_60 DebugUIMessages getString JDIModelPresentation caught_61 DebugUIMessages getString JDIModelPresentation uncaught_62 toString DebugUIMessages getString JDIModelPresentation __ _63 MessageFormat
protected String get Line Breakpoint Text I Java Line Breakpoint breakpoint throws Core Exception String type Name breakpoint get Type Name I Member member Breakpoint Utils get Member breakpoint String Buffer label new String Buffer label append get Qualified Name type Name append Line Number breakpoint label append Hit Count breakpoint label append Suspend Policy breakpoint label append Thread Filter breakpoint label append Conditional breakpoint label append Instance Filter breakpoint label if member null label append NON NLS 1 label append get Java Label Provider get Text member return label to String  getLineBreakpointText IJavaLineBreakpoint CoreException typeName getTypeName IMember BreakpointUtils getMember StringBuffer StringBuffer getQualifiedName typeName appendLineNumber appendHitCount appendSuspendPolicy appendThreadFilter appendConditional appendInstanceFilter getJavaLabelProvider getText toString
protected String get Class Prepare Breakpoint Text I Java Class Prepare Breakpoint breakpoint throws Core Exception String type Name breakpoint get Type Name String Buffer label new String Buffer label append get Qualified Name type Name append Hit Count breakpoint label append Suspend Policy breakpoint label return label to String  getClassPrepareBreakpointText IJavaClassPrepareBreakpoint CoreException typeName getTypeName StringBuffer StringBuffer getQualifiedName typeName appendHitCount appendSuspendPolicy toString
protected String Buffer append Line Number I Java Line Breakpoint breakpoint String Buffer label throws Core Exception int line Number breakpoint get Line Number if line Number 0 label append NON NLS 1 label append DebugUI Messages get String JDI Model Presentation line  65 NON NLS 1 label append label append line Number label append return label  StringBuffer appendLineNumber IJavaLineBreakpoint StringBuffer CoreException lineNumber getLineNumber lineNumber DebugUIMessages getString JDIModelPresentation line__65 lineNumber
protected String Buffer append Hit Count I Java Breakpoint breakpoint String Buffer label throws Core Exception int hit Count breakpoint get Hit Count if hit Count 0 label append NON NLS 1 label append DebugUI Messages get String JDI Model Presentation hit count  67 NON NLS 1 label append label append hit Count label append return label  StringBuffer appendHitCount IJavaBreakpoint StringBuffer CoreException hitCount getHitCount hitCount DebugUIMessages getString JDIModelPresentation hit_count__67 hitCount
protected String get Java Pattern Breakpoint Text I Java Pattern Breakpoint breakpoint throws Core Exception I Resource resource breakpoint get Marker get Resource I Member member Breakpoint Utils get Member breakpoint String Buffer label new String Buffer resource get Name append Line Number breakpoint label append Hit Count breakpoint label append Suspend Policy breakpoint label append Thread Filter breakpoint label if member null label append NON NLS 1 label append get Java Label Provider get Text member return label to String  getJavaPatternBreakpointText IJavaPatternBreakpoint CoreException IResource getMarker getResource IMember BreakpointUtils getMember StringBuffer StringBuffer getName appendLineNumber appendHitCount appendSuspendPolicy appendThreadFilter getJavaLabelProvider getText toString
protected String get Java Target Pattern Breakpoint Text I Java Target Pattern Breakpoint breakpoint throws Core Exception I Member member Breakpoint Utils get Member breakpoint String Buffer label new String Buffer breakpoint get Source Name append Line Number breakpoint label append Hit Count breakpoint label append Suspend Policy breakpoint label append Thread Filter breakpoint label if member null label append NON NLS 1 label append get Java Label Provider get Text member return label to String  getJavaTargetPatternBreakpointText IJavaTargetPatternBreakpoint CoreException IMember BreakpointUtils getMember StringBuffer StringBuffer getSourceName appendLineNumber appendHitCount appendSuspendPolicy appendThreadFilter getJavaLabelProvider getText toString
protected String get Watchpoint Text I Java Watchpoint watchpoint throws Core Exception String type Name watchpoint get Type Name I Member member Breakpoint Utils get Member watchpoint String Buffer label new String Buffer label append get Qualified Name type Name append Hit Count watchpoint label append Suspend Policy watchpoint label append Thread Filter watchpoint label boolean access watchpoint is Access boolean modification watchpoint is Modification if access modification label append DebugUI Messages get String JDI Model Presentation access and modification 70 NON NLS 1 else if access label append DebugUI Messages get String JDI Model Presentation access 71 NON NLS 1 else if modification label append DebugUI Messages get String JDI Model Presentation modification 72 NON NLS 1 label append NON NLS 1 if member null label append get Java Label Provider get Text member else label append watchpoint get Field Name return label to String  getWatchpointText IJavaWatchpoint CoreException typeName getTypeName IMember BreakpointUtils getMember StringBuffer StringBuffer getQualifiedName typeName appendHitCount appendSuspendPolicy appendThreadFilter isAccess isModification DebugUIMessages getString JDIModelPresentation access_and_modification_70 DebugUIMessages getString JDIModelPresentation access_71 DebugUIMessages getString JDIModelPresentation modification_72 getJavaLabelProvider getText getFieldName toString
protected String get Method Breakpoint Text I Java Method Breakpoint method Breakpoint throws Core Exception String type Name method Breakpoint get Type Name I Member member Breakpoint Utils get Member method Breakpoint String Buffer label new String Buffer label append get Qualified Name type Name append Hit Count method Breakpoint label append Suspend Policy method Breakpoint label append Thread Filter method Breakpoint label boolean entry method Breakpoint is Entry boolean exit method Breakpoint is Exit if entry exit label append DebugUI Messages get String JDI Model Presentation entry and exit NON NLS 1 else if entry label append DebugUI Messages get String JDI Model Presentation entry NON NLS 1 else if exit label append DebugUI Messages get String JDI Model Presentation exit NON NLS 1 append Conditional method Breakpoint label if member null label append NON NLS 1 label append get Java Label Provider get Text member else String method Sig method Breakpoint get Method Signature String method Name method Breakpoint get Method Name if method Sig null label append NON NLS 1 label append Signature to String method Sig method Name null false false else if method Name null label append NON NLS 1 label append method Name return label to String  getMethodBreakpointText IJavaMethodBreakpoint methodBreakpoint CoreException typeName methodBreakpoint getTypeName IMember BreakpointUtils getMember methodBreakpoint StringBuffer StringBuffer getQualifiedName typeName appendHitCount methodBreakpoint appendSuspendPolicy methodBreakpoint appendThreadFilter methodBreakpoint methodBreakpoint isEntry methodBreakpoint isExit DebugUIMessages getString JDIModelPresentation entry_and_exit DebugUIMessages getString JDIModelPresentation DebugUIMessages getString JDIModelPresentation appendConditional methodBreakpoint getJavaLabelProvider getText methodSig methodBreakpoint getMethodSignature methodName methodBreakpoint getMethodName methodSig toString methodSig methodName methodName methodName toString
protected String get Stack Frame Text I Stack Frame stack Frame throws Debug Exception I Java Stack Frame frame I Java Stack Frame stack Frame get Adapter I Java Stack Frame class if frame null String Buffer label new String Buffer String dec DebugUI Messages get String JDI Model Presentation unknown declaring type  4 NON NLS 1 try dec frame get Declaring Type Name catch Debug Exception exception if frame is Obsolete label append DebugUI Messages get String JDI Model Presentation obsolete method in  1 NON NLS 1 label append dec label append return label to String receiver name String rec DebugUI Messages get String JDI Model Presentation unknown receiving type  5 NON NLS 1 try rec frame get Receiving Type Name catch Debug Exception exception label append get Qualified Name rec append declaring type name if different if dec equals rec label append label append get Qualified Name dec label append append a dot separator and method name label append try label append frame get Method Name catch Debug Exception exception label append DebugUI Messages get String JDI Model Presentation unknown method name  6 NON NLS 1 try List args frame get Argument Type Names if args is Empty label append NON NLS 1 else label append Iterator iter args iterator while iter has Next label append get Qualified Name String iter next if iter has Next label append NON NLS 1 label append catch Debug Exception exception label append DebugUI Messages get String JDI Model Presentation unknown arguements  7 NON NLS 1 try int line Number frame get Line Number label append label append DebugUI Messages get String JDI Model Presentation line  76 NON NLS 1 label append if line Number 0 label append line Number else label append DebugUI Messages get String JDI Model Presentation not available NON NLS 1 if frame is Native label append label append DebugUI Messages get String JDI Model Presentation native method NON NLS 1 catch Debug Exception exception label append DebugUI Messages get String JDIModelPresentation  unknown line number  8 NON NLS 1 if frame were Locals Available label append label append DebugUI Messages get String JDI Model Presentation local variables unavailable NON NLS 1 return label to String return null  getStackFrameText IStackFrame stackFrame DebugException IJavaStackFrame IJavaStackFrame stackFrame getAdapter IJavaStackFrame StringBuffer StringBuffer DebugUIMessages getString JDIModelPresentation unknown_declaring_type _4 getDeclaringTypeName DebugException isObsolete DebugUIMessages getString JDIModelPresentation obsolete_method_in__1 toString DebugUIMessages getString JDIModelPresentation unknown_receiving_type _5 getReceivingTypeName DebugException getQualifiedName getQualifiedName getMethodName DebugException DebugUIMessages getString JDIModelPresentation unknown_method_name _6 getArgumentTypeNames isEmpty hasNext getQualifiedName hasNext DebugException DebugUIMessages getString JDIModelPresentation unknown_arguements _7 lineNumber getLineNumber DebugUIMessages getString JDIModelPresentation line__76 lineNumber lineNumber DebugUIMessages getString JDIModelPresentation not_available isNative DebugUIMessages getString JDIModelPresentation native_method DebugException DebugUIMessages getString JDIModelPresentation_ unknown_line_number _8 wereLocalsAvailable DebugUIMessages getString JDIModelPresentation local_variables_unavailable toString
protected String get Qualified Name String qualified Name if is Show Qualified Names return remove Qualifier From Generic Name qualified Name return qualified Name  getQualifiedName qualifiedName isShowQualifiedNames removeQualifierFromGenericName qualifiedName qualifiedName
Return the simple generic name from a qualified generic name private String remove Qualifier From Generic Name String qualified Name if qualified Name ends With NON NLS 1 handle variable argument name return remove Qualifier From Generic Name qualified Name substring 0 qualified Name length 3 NON NLS 1 check if the type has parameters int parameter Start qualified Name index Of if parameter Start 1 return get Simple Name qualified Name else get the list of the parameters and generates their simple name List parameters get Name List qualified Name substring parameter Start 1 qualified Name length 1 String Buffer name new String Buffer get Simple Name qualified Name substring 0 parameter Start name append Iterator iterator parameters iterator if iterator has Next name append remove Qualifier From Generic Name String iterator next while iterator has Next name append append remove Qualifier From Generic Name String iterator next name append return name to String  removeQualifierFromGenericName qualifiedName qualifiedName endsWith removeQualifierFromGenericName qualifiedName qualifiedName parameterStart qualifiedName indexOf parameterStart getSimpleName qualifiedName getNameList qualifiedName parameterStart qualifiedName StringBuffer StringBuffer getSimpleName qualifiedName parameterStart hasNext removeQualifierFromGenericName hasNext removeQualifierFromGenericName toString
Return the simple name from a qualified name non generic private String get Simple Name String qualified Name int index qualified Name last Index Of if index 0 return qualified Name substring index 1 else return qualified Name  getSimpleName qualifiedName qualifiedName lastIndexOf qualifiedName qualifiedName
Decompose a commat separated list of generic names String to a list of generic names List private List get Name List String list Name List names new Array List String Tokenizer tokenizer new String Tokenizer list Name true NON NLS 1 int enclosing Level 0 int start Pos 0 int current Pos 0 while tokenizer has More Tokens String token tokenizer next Token switch token char At 0 case if enclosing Level 0 names add list Name substring start Pos current Pos start Pos current Pos 1 break case enclosing Level break case enclosing Level break current Pos token length names add list Name substring start Pos return names  getNameList listName ArrayList StringTokenizer StringTokenizer listName enclosingLevel startPos currentPos hasMoreTokens nextToken charAt enclosingLevel listName startPos currentPos startPos currentPos enclosingLevel enclosingLevel currentPos listName startPos
Plug in the single argument to the resource String for the key to get a formatted resource String public static String get Formatted String String key String arg return get Formatted String key new String arg  getFormattedString getFormattedString
Plug in the arguments to the resource String for the key to get a formatted resource String public static String get Formatted String String string String args return Message Format format string args  getFormattedString MessageFormat
interface I Value Detail Provider public void compute Detail I Value value I Java Thread thread I Value Detail Listener listener throws Debug Exception  IValueDetailProvider computeDetail IValue IJavaThread IValueDetailListener DebugException
protected void append Suspend Policy I Java Breakpoint breakpoint String Buffer buffer throws Core Exception if breakpoint get Suspend Policy I Java Breakpoint SUSPEND VM buffer append buffer append DebugUI Messages get String JDI Model Presentation Suspend VM NON NLS 1  appendSuspendPolicy IJavaBreakpoint StringBuffer CoreException getSuspendPolicy IJavaBreakpoint SUSPEND_VM DebugUIMessages getString JDIModelPresentation Suspend_VM
protected void append Thread Filter I Java Breakpoint breakpoint String Buffer buffer throws Core Exception if breakpoint get Thread Filters length 0 buffer append buffer append DebugUI Messages get String JDI Model Presentation thread filtered NON NLS 1  appendThreadFilter IJavaBreakpoint StringBuffer CoreException getThreadFilters DebugUIMessages getString JDIModelPresentation thread_filtered
protected void append Conditional I Java Line Breakpoint breakpoint String Buffer buffer throws Core Exception if breakpoint is Condition Enabled breakpoint get Condition null buffer append buffer append DebugUI Messages get String JDI Model Presentation conditional  2 NON NLS 1  appendConditional IJavaLineBreakpoint StringBuffer CoreException isConditionEnabled getCondition DebugUIMessages getString JDIModelPresentation _2
protected void append Instance Filter I Java Breakpoint breakpoint String Buffer buffer throws Core Exception I Java Object instances breakpoint get Instance Filters for int i 0 i instances length i String instance Text instances i get Value String if instance Text null buffer append buffer append Message Format format DebugUI Messages get String JDI Model Presentation instance 1 new String instance Text NON NLS 1  appendInstanceFilter IJavaBreakpoint StringBuffer CoreException IJavaObject getInstanceFilters instanceText getValueString instanceText MessageFormat DebugUIMessages getString JDIModelPresentation instance_1 instanceText
protected Image Descriptor Registry get Java Element Image Registry if f Java Element Image Registry null f Java Element Image Registry Java Plugin get Image Descriptor Registry return f Java Element Image Registry  ImageDescriptorRegistry getJavaElementImageRegistry fJavaElementImageRegistry fJavaElementImageRegistry JavaPlugin getImageDescriptorRegistry fJavaElementImageRegistry
protected org eclipse jdt internal debug ui Image Descriptor Registry get Debug Image Registry if f Debug Image Registry null f Debug Image Registry JDI DebugUI Plugin get Image Descriptor Registry return f Debug Image Registry  ImageDescriptorRegistry getDebugImageRegistry fDebugImageRegistry fDebugImageRegistry JDIDebugUIPlugin getImageDescriptorRegistry fDebugImageRegistry
protected Java Element Label Provider get Java Label Provider if f Java Label Provider null f Java Label Provider new Java Element Label Provider Java Element Label Provider SHOW DEFAULT return f Java Label Provider  JavaElementLabelProvider getJavaLabelProvider fJavaLabelProvider fJavaLabelProvider JavaElementLabelProvider JavaElementLabelProvider SHOW_DEFAULT fJavaLabelProvider
Returns whether the given field variable has the same name as any variables protected boolean is Duplicate Name I Java Field Variable variable I Java Reference Type java Type variable get Receiving Type try String names java Type get All Field Names boolean found false for int i 0 i names length i if variable get Name equals names i if found return true found true return false catch Debug Exception e return false  isDuplicateName IJavaFieldVariable IJavaReferenceType javaType getReceivingType javaType getAllFieldNames getName DebugException

public JDI Source Viewer Composite parent I Vertical Ruler ruler int styles super parent ruler styles Styled Text text this get Text Widget text add Bidi Segment Listener new Bidi Segment Listener public void line Get Segments Bidi Segment Event event try event segments get Bidi Line Segments event line Offset catch Bad Location Exception x ignore update Viewer Font update Viewer Colors get Preference Store add Property Change Listener this  JDISourceViewer IVerticalRuler StyledText getTextWidget addBidiSegmentListener BidiSegmentListener lineGetSegments BidiSegmentEvent getBidiLineSegments lineOffset BadLocationException updateViewerFont updateViewerColors getPreferenceStore addPropertyChangeListener
Updates the viewer s font to match the preferences private void update Viewer Font I Preference Store store get Preference Store if store null Font Data data null if store contains J Face Resources TEXT FONT store is Default J Face Resources TEXT FONT data Preference Converter get Font Data store J Face Resources TEXT FONT else data Preference Converter get Default Font Data store J Face Resources TEXT FONT if data null Font font new Font get Text Widget get Display data apply Font font if get Font null get Font dispose set Font font return if all the preferences failed apply Font J Face Resources get Text Font  updateViewerFont IPreferenceStore getPreferenceStore FontData JFaceResources TEXT_FONT isDefault JFaceResources TEXT_FONT PreferenceConverter getFontData JFaceResources TEXT_FONT PreferenceConverter getDefaultFontData JFaceResources TEXT_FONT getTextWidget getDisplay applyFont getFont getFont setFont applyFont JFaceResources getTextFont
Sets the current font param font the new font private void set Font Font font f Font font  setFont fFont
Returns the current font return the current font private Font get Font return f Font  getFont fFont
Sets the font for the given viewer sustaining selection and scroll position param font the font private void apply Font Font font I Document doc get Document if doc null doc get Length 0 Point selection get Selected Range int top Index get Top Index Styled Text styled Text get Text Widget styled Text set Redraw false styled Text set Font font set Selected Range selection x selection y set Top Index top Index styled Text set Redraw true else get Text Widget set Font font  applyFont IDocument getDocument getLength getSelectedRange topIndex getTopIndex StyledText styledText getTextWidget styledText setRedraw styledText setFont setSelectedRange setTopIndex topIndex styledText setRedraw getTextWidget setFont
Updates the given viewer s colors to match the preferences public void update Viewer Colors I Preference Store store get Preference Store if store null Styled Text styled Text get Text Widget Color color store get Boolean Abstract Text Editor PREFERENCE COLOR FOREGROUND SYSTEM DEFAULT null create Color store Abstract Text Editor PREFERENCE COLOR FOREGROUND styled Text get Display styled Text set Foreground color if get Foreground Color null get Foreground Color dispose set Foreground Color color color store get Boolean Abstract Text Editor PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT null create Color store Abstract Text Editor PREFERENCE COLOR BACKGROUND styled Text get Display styled Text set Background color if get Background Color null get Background Color dispose set Background Color color  updateViewerColors IPreferenceStore getPreferenceStore StyledText styledText getTextWidget getBoolean AbstractTextEditor PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT createColor AbstractTextEditor PREFERENCE_COLOR_FOREGROUND styledText getDisplay styledText setForeground getForegroundColor getForegroundColor setForegroundColor getBoolean AbstractTextEditor PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT createColor AbstractTextEditor PREFERENCE_COLOR_BACKGROUND styledText getDisplay styledText setBackground getBackgroundColor getBackgroundColor setBackgroundColor
Creates a color from the information stored in the given preference store Returns code null code if there is no such information available private Color create Color I Preference Store store String key Display display RGB rgb null if store contains key if store is Default key rgb Preference Converter get Default Color store key else rgb Preference Converter get Color store key if rgb null return new Color display rgb return null  createColor IPreferenceStore isDefault PreferenceConverter getDefaultColor PreferenceConverter getColor
Returns the current background color return the current background color protected Color get Background Color return f Background Color  getBackgroundColor fBackgroundColor
Sets the current background color param background Color the new background color protected void set Background Color Color background Color f Background Color background Color  backgroundColor setBackgroundColor backgroundColor fBackgroundColor backgroundColor
Returns the current foreground color return the current foreground color protected Color get Foreground Color return f Foreground Color  getForegroundColor fForegroundColor
Sets the current foreground color param foreground Color the new foreground color protected void set Foreground Color Color foreground Color f Foreground Color foreground Color  foregroundColor setForegroundColor foregroundColor fForegroundColor foregroundColor
Returns the preference store used to configure this source viewer The JDI Source Viewer uses the Java UI preferences return the Java UI preferences protected I Preference Store get Preference Store return Preference Constants get Preference Store  JDISourceViewer IPreferenceStore getPreferenceStore PreferenceConstants getPreferenceStore
see I Property Change Listener property Change Property Change Event public void property Change Property Change Event event I Content Assistant assistant get Content Assistant if assistant instanceof Content Assistant JDI Content Assist Preference change Configuration Content Assistant assistant event String property event get Property if J Face Resources TEXT FONT equals property update Viewer Font if Abstract Text Editor PREFERENCE COLOR FOREGROUND equals property Abstract Text Editor PREFERENCE COLOR FOREGROUND SYSTEM DEFAULT equals property Abstract Text Editor PREFERENCE COLOR BACKGROUND equals property Abstract Text Editor PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT equals property update Viewer Colors if affects Text Presentation event invalidate Text Presentation  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent IContentAssistant getContentAssistant ContentAssistant JDIContentAssistPreference changeConfiguration ContentAssistant getProperty JFaceResources TEXT_FONT updateViewerFont AbstractTextEditor PREFERENCE_COLOR_FOREGROUND AbstractTextEditor PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT AbstractTextEditor PREFERENCE_COLOR_BACKGROUND AbstractTextEditor PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT updateViewerColors affectsTextPresentation invalidateTextPresentation
see Abstract Text Editor affects Text Presentation Property Change Event protected boolean affects Text Presentation Property Change Event event Java Text Tools text Tools Java Plugin get Default get Java Text Tools return text Tools affects Behavior event  AbstractTextEditor affectsTextPresentation PropertyChangeEvent affectsTextPresentation PropertyChangeEvent JavaTextTools textTools JavaPlugin getDefault getJavaTextTools textTools affectsBehavior
Returns the current content assistant return the current content assistant public I Content Assistant get Content Assistant return f Content Assistant  IContentAssistant getContentAssistant fContentAssistant
Returns a segmentation of the line of the given document appropriate for bidi rendering The default implementation returns only the string literals of a Java code line as segments param document the document param line Offset the offset of the line return the line s bidi segmentation throws Bad Location Exception in case line Offset is not valid in document protected int get Bidi Line Segments int line Offset throws Bad Location Exception I Document document get Document if document null return null I Region line document get Line Information Of Offset line Offset I Typed Region line Partitioning document compute Partitioning line Offset line get Length List segmentation new Array List for int i 0 i line Partitioning length i if I Java Partitions JAVA STRING equals line Partitioning i get Type segmentation add line Partitioning i if segmentation size 0 return null int size segmentation size int segments new int size 2 1 int j 0 for int i 0 i size i I Typed Region segment I Typed Region segmentation get i if i 0 segments j 0 int offset segment get Offset line Offset if offset segments j 1 segments j offset if offset segment get Length line get Length break segments j offset segment get Length if j segments length int result new int j System arraycopy segments 0 result 0 j segments result return segments  lineOffset BadLocationException lineOffset getBidiLineSegments lineOffset BadLocationException IDocument getDocument IRegion getLineInformationOfOffset lineOffset ITypedRegion linePartitioning computePartitioning lineOffset getLength ArrayList linePartitioning IJavaPartitions JAVA_STRING linePartitioning getType linePartitioning ITypedRegion ITypedRegion getOffset lineOffset getLength getLength getLength
Disposes the system resources currently in use by this viewer public void dispose if get Font null get Font dispose set Font null if get Background Color null get Background Color dispose set Background Color null if get Foreground Color null get Foreground Color dispose set Foreground Color null get Preference Store remove Property Change Listener this  getFont getFont setFont getBackgroundColor getBackgroundColor setBackgroundColor getForegroundColor getForegroundColor setForegroundColor getPreferenceStore removePropertyChangeListener

public AddVM Dialog I AddVM Dialog Requestor requestor Shell shell IVM Install Type vm Install Types IVM Install editedVM super shell set Shell Style get Shell Style SWT RESIZE f Requestor requestor f Stati new I Status 5 for int i 0 i f Stati length i f Stati i new Status Info fVM Types vm Install Types f SelectedVM Type editedVM null editedVM getVM Install Type vm Install Types 0 f EditedVM editedVM only detect the javadoc location if not already set f Auto Detect Javadoc Location f EditedVM null f EditedVM get Javadoc Location null  AddVMDialog IAddVMDialogRequestor IVMInstallType vmInstallTypes IVMInstall setShellStyle getShellStyle fRequestor fStati IStatus fStati fStati StatusInfo fVMTypes vmInstallTypes fSelectedVMType getVMInstallType vmInstallTypes fEditedVM fAutoDetectJavadocLocation fEditedVM fEditedVM getJavadocLocation
see Windows configure Shell protected void configure Shell Shell new Shell super configure Shell new Shell Workbench Help set Help new Shell I Java Debug Help Context Ids EDIT JRE DIALOG  configureShell configureShell newShell configureShell newShell WorkbenchHelp setHelp newShell IJavaDebugHelpContextIds EDIT_JRE_DIALOG
fJRE Root new String Button Dialog Field new I String Button Adapter public void change Control Pressed Dialog Field field browse For Install Dir  fJRERoot StringButtonDialogField IStringButtonAdapter changeControlPressed DialogField browseForInstallDir
f JavadocURL new String Button Dialog Field new I String Button Adapter public void change Control Pressed Dialog Field field browse For JavadocURL  fJavadocURL StringButtonDialogField IStringButtonAdapter changeControlPressed DialogField browseForJavadocURL
protected void create Dialog Fields fVM Type Combo new Combo Dialog Field SWT READ ONLY fVM Type Combo set Label Text JRE Messages get String addVM Dialog jre Type NON NLS 1 fVM Type Combo set Items getVM Type Names fVM Name new String Dialog Field fVM Name set Label Text JRE Messages get String addVM Dialog jre Name NON NLS 1 fJRE Root new String Button Dialog Field new I String Button Adapter public void change Control Pressed Dialog Field field browse For Install Dir fJRE Root set Label Text JRE Messages get String addVM Dialog jre Home NON NLS 1 fJRE Root set Button Label JRE Messages get String addVM Dialog browse1 NON NLS 1 f JavadocURL new String Button Dialog Field new I String Button Adapter public void change Control Pressed Dialog Field field browse For JavadocURL f JavadocURL set Label Text JRE Messages get String AddVM Dialog Java doc URL  1 NON NLS 1 f JavadocURL set Button Label JRE Messages get String AddVM Dialog Bro wse  2 NON NLS 1 fVM Args new String Dialog Field fVM Args set Label Text JRE Messages get String AddVM Dialog 23 NON NLS 1  createDialogFields fVMTypeCombo ComboDialogField READ_ONLY fVMTypeCombo setLabelText JREMessages getString addVMDialog jreType fVMTypeCombo setItems getVMTypeNames fVMName StringDialogField fVMName setLabelText JREMessages getString addVMDialog jreName fJRERoot StringButtonDialogField IStringButtonAdapter changeControlPressed DialogField browseForInstallDir fJRERoot setLabelText JREMessages getString addVMDialog jreHome fJRERoot setButtonLabel JREMessages getString addVMDialog fJavadocURL StringButtonDialogField IStringButtonAdapter changeControlPressed DialogField browseForJavadocURL fJavadocURL setLabelText JREMessages getString AddVMDialog doc_URL__1 fJavadocURL setButtonLabel JREMessages getString AddVMDialog _2 fVMArgs StringDialogField fVMArgs setLabelText JREMessages getString AddVMDialog
protected void create Field Listeners fVM Type Combo set Dialog Field Listener new I Dialog Field Listener public void dialog Field Changed Dialog Field field updateVM Type  createFieldListeners fVMTypeCombo setDialogFieldListener IDialogFieldListener dialogFieldChanged DialogField updateVMType
fVM Name set Dialog Field Listener new I Dialog Field Listener public void dialog Field Changed Dialog Field field setVM Name Status validateVM Name update Status Line  fVMName setDialogFieldListener IDialogFieldListener dialogFieldChanged DialogField setVMNameStatus validateVMName updateStatusLine
fJRE Root set Dialog Field Listener new I Dialog Field Listener public void dialog Field Changed Dialog Field field setJRE Location Status validateJRE Location update Status Line  fJRERoot setDialogFieldListener IDialogFieldListener dialogFieldChanged DialogField setJRELocationStatus validateJRELocation updateStatusLine
f JavadocURL set Dialog Field Listener new I Dialog Field Listener public void dialog Field Changed Dialog Field field set JavadocURL Status validate JavadocURL update Status Line  fJavadocURL setDialogFieldListener IDialogFieldListener dialogFieldChanged DialogField setJavadocURLStatus validateJavadocURL updateStatusLine
protected void create Field Listeners fVM Type Combo set Dialog Field Listener new I Dialog Field Listener public void dialog Field Changed Dialog Field field updateVM Type fVM Name set Dialog Field Listener new I Dialog Field Listener public void dialog Field Changed Dialog Field field setVM Name Status validateVM Name update Status Line fJRE Root set Dialog Field Listener new I Dialog Field Listener public void dialog Field Changed Dialog Field field setJRE Location Status validateJRE Location update Status Line f JavadocURL set Dialog Field Listener new I Dialog Field Listener public void dialog Field Changed Dialog Field field set JavadocURL Status validate JavadocURL update Status Line  createFieldListeners fVMTypeCombo setDialogFieldListener IDialogFieldListener dialogFieldChanged DialogField updateVMType fVMName setDialogFieldListener IDialogFieldListener dialogFieldChanged DialogField setVMNameStatus validateVMName updateStatusLine fJRERoot setDialogFieldListener IDialogFieldListener dialogFieldChanged DialogField setJRELocationStatus validateJRELocation updateStatusLine fJavadocURL setDialogFieldListener IDialogFieldListener dialogFieldChanged DialogField setJavadocURLStatus validateJavadocURL updateStatusLine
protected String getVM Name return fVM Name get Text  getVMName fVMName getText
protected File get Install Location return new File fJRE Root get Text  getInstallLocation fJRERoot getText
protected Control create Dialog Area Composite ancestor create Dialog Fields Composite parent Composite super create Dialog Area ancestor Grid Layout parent get Layout num Columns 3 fVM Type Combo do Fill Into Grid parent 3 Grid Data fVM Type Combo get Combo Control null get Layout Data width Hint convert Width In Chars To Pixels 50 fVM Name do Fill Into Grid parent 3 fJRE Root do Fill Into Grid parent 3 f JavadocURL do Fill Into Grid parent 3 fVM Args do Fill Into Grid parent 3 Label l new Label parent SWT NONE l set Text JRE Messages get String AddVM Dialog JRE system libraries  1 NON NLS 1 Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 3 l set Layout Data gd f Library Block new VM Library Block this Control block f Library Block create Control parent gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 3 block set Layout Data gd Text t fJRE Root get Text Control parent gd Grid Data t get Layout Data gd grab Excess Horizontal Space true gd width Hint convert Width In Chars To Pixels 50 t f JavadocURL get Text Control parent gd Grid Data t get Layout Data gd grab Excess Horizontal Space true gd width Hint convert Width In Chars To Pixels 50 initialize Fields create Field Listeners apply Dialog Font parent return parent  createDialogArea createDialogFields createDialogArea GridLayout getLayout numColumns fVMTypeCombo doFillIntoGrid GridData fVMTypeCombo getComboControl getLayoutData widthHint convertWidthInCharsToPixels fVMName doFillIntoGrid fJRERoot doFillIntoGrid fJavadocURL doFillIntoGrid fVMArgs doFillIntoGrid setText JREMessages getString AddVMDialog JRE_system_libraries__1 GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData fLibraryBlock VMLibraryBlock fLibraryBlock createControl GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData fJRERoot getTextControl GridData getLayoutData grabExcessHorizontalSpace widthHint convertWidthInCharsToPixels fJavadocURL getTextControl GridData getLayoutData grabExcessHorizontalSpace widthHint convertWidthInCharsToPixels initializeFields createFieldListeners applyDialogFont
private void updateVM Type int sel Index fVM Type Combo get Selection Index if sel Index f Prev Index return f Prev Index sel Index if sel Index 0 sel Index fVM Types length f SelectedVM Type fVM Types sel Index setJRE Location Status validateJRE Location f Library Block initialize From f EditedVM f SelectedVM Type update Status Line  updateVMType selIndex fVMTypeCombo getSelectionIndex selIndex fPrevIndex fPrevIndex selIndex selIndex selIndex fVMTypes fSelectedVMType fVMTypes selIndex setJRELocationStatus validateJRELocation fLibraryBlock initializeFrom fEditedVM fSelectedVMType updateStatusLine
public void create super create fVM Name set Focus selectVM Type  fVMName setFocus selectVMType
private String getVM Type Names String names new String fVM Types length for int i 0 i fVM Types length i names i fVM Types i get Name return names  getVMTypeNames fVMTypes fVMTypes fVMTypes getName
private void selectVM Type for int i 0 i fVM Types length i if f SelectedVM Type fVM Types i fVM Type Combo select Item i return  selectVMType fVMTypes fSelectedVMType fVMTypes fVMTypeCombo selectItem
private void initialize Fields fVM Type Combo set Items getVM Type Names if f EditedVM null fVM Name set Text NON NLS 1 fJRE Root set Text NON NLS 1 f JavadocURL set Text NON NLS 1 f Library Block initialize From null f SelectedVM Type fVM Args set Text NON NLS 1 else fVM Type Combo set Enabled false fVM Name set Text f EditedVM get Name fJRE Root set Text f EditedVM get Install Location get Absolute Path URL url f EditedVM get Javadoc Location if url null f JavadocURL set Text NON NLS 1 else f JavadocURL set Text url to External Form String vm Args f EditedVM getVM Arguments if vm Args null String Buffer buffer new String Buffer int length vm Args length if length 0 buffer append vm Args 0 for int i 1 i length i buffer append append vm Args i fVM Args set Text buffer to String setVM Name Status validateVM Name update Status Line  initializeFields fVMTypeCombo setItems getVMTypeNames fEditedVM fVMName setText fJRERoot setText fJavadocURL setText fLibraryBlock initializeFrom fSelectedVMType fVMArgs setText fVMTypeCombo setEnabled fVMName setText fEditedVM getName fJRERoot setText fEditedVM getInstallLocation getAbsolutePath fEditedVM getJavadocLocation fJavadocURL setText fJavadocURL setText toExternalForm vmArgs fEditedVM getVMArguments vmArgs StringBuffer StringBuffer vmArgs vmArgs vmArgs fVMArgs setText toString setVMNameStatus validateVMName updateStatusLine
private IVM Install Type getVM Type return f SelectedVM Type  IVMInstallType getVMType fSelectedVMType
Runnable r new Runnable see java lang Runnable run public void run temp 0 getVM Type validate Install Location temp File  getVMType validateInstallLocation tempFile
private I Status validateJRE Location String location Name fJRE Root get Text I Status s null File file null if location Name length 0 NON NLS 1 s new Status Info I Status INFO JRE Messages get String addVM Dialog enter Location NON NLS 1 else file new File location Name if file exists s new Status Info I Status ERROR JRE Messages get String addVM Dialog location Not Exists NON NLS 1 else final I Status temp new I Status 1 final File temp File file Runnable r new Runnable see java lang Runnable run public void run temp 0 getVM Type validate Install Location temp File Busy Indicator show While get Shell get Display r s temp 0 if s isOK f Library Block set Home Directory file else f Library Block set Home Directory null f Library Block update detect Javadoc Location return s  IStatus validateJRELocation locationName fJRERoot getText IStatus locationName StatusInfo IStatus JREMessages getString addVMDialog enterLocation locationName StatusInfo IStatus JREMessages getString addVMDialog locationNotExists IStatus IStatus tempFile getVMType validateInstallLocation tempFile BusyIndicator showWhile getShell getDisplay fLibraryBlock setHomeDirectory fLibraryBlock setHomeDirectory fLibraryBlock detectJavadocLocation
private I Status validate JavadocURL String text f JavadocURL get Text if text null text length 0 try new URL text catch MalformedURL Exception e return new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Java DebugUI Constants INTERNAL ERROR JRE Messages get String AddVM Dialog Invalid URL syntax specified for Javadoc location  1 e NON NLS 1 return new Status Info  IStatus validateJavadocURL fJavadocURL getText MalformedURLException IStatus JDIDebugUIPlugin getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR JREMessages getString AddVMDialog Invalid_URL_syntax_specified_for_Javadoc_location _1 StatusInfo
Auto detects the default javadoc location private void detect Javadoc Location if f Auto Detect Javadoc Location if getVM Type instanceof AbstractVM Install Type AbstractVM Install Type type AbstractVM Install Type getVM Type URL url type get Default Javadoc Location get Install Location if url null f JavadocURL set Text NON NLS 1 else f JavadocURL set Text url to External Form  detectJavadocLocation fAutoDetectJavadocLocation getVMType AbstractVMInstallType AbstractVMInstallType AbstractVMInstallType getVMType getDefaultJavadocLocation getInstallLocation fJavadocURL setText fJavadocURL setText toExternalForm
private I Status validateVM Name Status Info status new Status Info String name fVM Name get Text if name null name trim length 0 status set Info JRE Messages get String addVM Dialog enter Name NON NLS 1 else if f Requestor is Duplicate Name name f EditedVM null name equals f EditedVM get Name status set Error JRE Messages get String addVM Dialog duplicate Name NON NLS 1 else I Status s Resources Plugin get Workspace validate Name name I Resource FILE if s isOK status set Error Message Format format JRE Messages get String AddVM Dialog JRE name must be a valid file name   0  1 new String s get Message NON NLS 1 return status  IStatus validateVMName StatusInfo StatusInfo fVMName getText setInfo JREMessages getString addVMDialog enterName fRequestor isDuplicateName fEditedVM fEditedVM getName setError JREMessages getString addVMDialog duplicateName IStatus ResourcesPlugin getWorkspace validateName IResource setError MessageFormat JREMessages getString AddVMDialog JRE_name_must_be_a_valid_file_name__ _1 getMessage
protected void update Status Line I Status max null for int i 0 i f Stati length i I Status curr f Stati i if curr matches I Status ERROR update Status curr return if max null curr get Severity max get Severity max curr update Status max  updateStatusLine IStatus fStati IStatus fStati IStatus updateStatus getSeverity getSeverity updateStatus
private void browse For Install Dir Directory Dialog dialog new Directory Dialog get Shell dialog set Filter Path fJRE Root get Text dialog set Message JRE Messages get String addVM Dialog pickJRE Root Dialog message NON NLS 1 String new Path dialog open if new Path null fJRE Root set Text new Path  browseForInstallDir DirectoryDialog DirectoryDialog getShell setFilterPath fJRERoot getText setMessage JREMessages getString addVMDialog pickJRERootDialog newPath newPath fJRERoot setText newPath
private void browse For JavadocURL Directory Dialog dialog new Directory Dialog get Shell String init Path NON NLS 1 URL url getURL if url null file equals url get Protocol NON NLS 1 init Path new File url get File get Path dialog set Filter Path init Path dialog set Message JRE Messages get String AddVM Dialog Select Javadoc location  3 NON NLS 1 String res dialog open if res null try url new File res toURL f JavadocURL set Text url to External Form catch MalformedURL Exception e should not happen JDI DebugUI Plugin log e  browseForJavadocURL DirectoryDialog DirectoryDialog getShell initPath getProtocol initPath getFile getPath setFilterPath initPath setMessage JREMessages getString AddVMDialog Select_Javadoc_location__3 fJavadocURL setText toExternalForm MalformedURLException JDIDebugUIPlugin
protected URL getURL try return new URL f JavadocURL get Text catch MalformedURL Exception e return null  fJavadocURL getText MalformedURLException
protected void ok Pressed do Ok Pressed super ok Pressed  okPressed doOkPressed okPressed
private void do Ok Pressed if f EditedVM null IVM Install vm new VM Standin f SelectedVM Type create Unique Id f SelectedVM Type set Field Values ToVM vm f Requestor vm Added vm else set Field Values ToVM f EditedVM  doOkPressed fEditedVM IVMInstall VMStandin fSelectedVMType createUniqueId fSelectedVMType setFieldValuesToVM fRequestor vmAdded setFieldValuesToVM fEditedVM
private String create Unique Id IVM Install Type vm Type String id null do id String value Of System current Time Millis while vm Type findVM Install id null return id  createUniqueId IVMInstallType vmType valueOf currentTimeMillis vmType findVMInstall
protected void set Field Values ToVM IVM Install vm vm set Install Location new File fJRE Root get Text get Absolute File vm set Name fVM Name get Text vm set Javadoc Location getURL String arg String fVM Args get Text if arg String null arg String length 0 Execution Arguments ex Args new Execution Arguments arg String NON NLS 1 vm setVM Arguments ex Args getVM Arguments Array else vm setVM Arguments null f Library Block perform Apply vm  setFieldValuesToVM IVMInstall setInstallLocation fJRERoot getText getAbsoluteFile setName fVMName getText setJavadocLocation argString fVMArgs getText argString argString ExecutionArguments exArgs ExecutionArguments argString setVMArguments exArgs getVMArgumentsArray setVMArguments fLibraryBlock performApply
protected File get Absolute File Or Empty String path if path null path length 0 return new File NON NLS 1 return new File path get Absolute File  getAbsoluteFileOrEmpty getAbsoluteFile
private void setVM Name Status I Status status f Stati 0 status  setVMNameStatus IStatus fStati
private void setJRE Location Status I Status status f Stati 1 status  setJRELocationStatus IStatus fStati
private void set JavadocURL Status I Status status f Stati 2 status  setJavadocURLStatus IStatus fStati
protected I Status get System Library Status return f Stati 3  IStatus getSystemLibraryStatus fStati
protected void set System Library Status I Status status f Stati 3 status  setSystemLibraryStatus IStatus fStati
Updates the status of the ok button to reflect the given status Subclasses may override this method to update additional buttons param status the status protected void update Buttons Enable State I Status status Button ok get Button I Dialog Constants OK ID if ok null ok is Disposed ok set Enabled status get Severity I Status OK  updateButtonsEnableState IStatus getButton IDialogConstants OK_ID isDisposed setEnabled getSeverity IStatus
see org eclipse jface dialogs Dialog set Button Layout Data org eclipse swt widgets Button protected void set Button Layout Data Button button super set Button Layout Data button  setButtonLayoutData setButtonLayoutData setButtonLayoutData
Returns the name of the section that this dialog stores its settings in return String protected String get Dialog Settings Section Name return ADD VM DIALOG SECTION NON NLS 1  getDialogSettingsSectionName ADD_VM_DIALOG_SECTION
see org eclipse jface window Window close public boolean close Dialog Settings Helper persist Shell Geometry get Shell get Dialog Settings Section Name return super close  DialogSettingsHelper persistShellGeometry getShell getDialogSettingsSectionName
protected Point get Initial Location Point initial Size Point initial Location Dialog Settings Helper get Initial Location get Dialog Settings Section Name if initial Location null return initial Location return super get Initial Location initial Size  getInitialLocation initialSize initialLocation DialogSettingsHelper getInitialLocation getDialogSettingsSectionName initialLocation initialLocation getInitialLocation initialSize
see org eclipse jface window Window get Initial Size protected Point get Initial Size Point size super get Initial Size return Dialog Settings Helper get Initial Size get Dialog Settings Section Name size  getInitialSize getInitialSize getInitialSize DialogSettingsHelper getInitialSize getDialogSettingsSectionName

see org eclipse jdt internal debug ui jres JRE Descriptor get Description public String get Description return Message Format format JRE Messages get String BuildJRE Descriptor 0 new String Java Runtime get DefaultVM Install get Name NON NLS 1  JREDescriptor getDescription getDescription MessageFormat JREMessages getString BuildJREDescriptor JavaRuntime getDefaultVMInstall getName

Reply whether or not a new VM of the specified name would constitute a duplicate param name the name of a potential new VM return whether a new VM with the specified name would be a duplicate VM 
Notification that a VM has been added from the code AddVM Dialog code param vm the added vm  AddVMDialog

class JR Es Content Provider implements I Structured Content Provider public Object get Elements Object input return fV Ms to Array  JREsContentProvider IStructuredContentProvider getElements fVMs toArray
public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
public void dispose 
see I Table Label Provider get Column Text Object int public String get Column Text Object element int column Index if element instanceof IVM Install IVM Install vm IVM Install element switch column Index case 0 return vm get Name case 1 return vm get Install Location get Absolute Path case 2 return vm getVM Install Type get Name return element to String  ITableLabelProvider getColumnText getColumnText columnIndex IVMInstall IVMInstall IVMInstall columnIndex getName getInstallLocation getAbsolutePath getVMInstallType getName toString
see I Table Label Provider get Column Image Object int public Image get Column Image Object element int column Index if column Index 0 return Java Plugin Images get Java Plugin Images IMG OBJS LIBRARY return null  ITableLabelProvider getColumnImage getColumnImage columnIndex columnIndex JavaPluginImages JavaPluginImages IMG_OBJS_LIBRARY
see org eclipse jface viewers I Selection Provider add Selection Changed Listener org eclipse jface viewers I Selection Changed Listener public void add Selection Changed Listener I Selection Changed Listener listener f Selection Listeners add listener  ISelectionProvider addSelectionChangedListener ISelectionChangedListener addSelectionChangedListener ISelectionChangedListener fSelectionListeners
see org eclipse jface viewers I Selection Provider get Selection public I Selection get Selection return new Structured Selection fVM List get Checked Elements  ISelectionProvider getSelection ISelection getSelection StructuredSelection fVMList getCheckedElements
see org eclipse jface viewers I Selection Provider remove Selection Changed Listener org eclipse jface viewers I Selection Changed Listener public void remove Selection Changed Listener I Selection Changed Listener listener f Selection Listeners remove listener  ISelectionProvider removeSelectionChangedListener ISelectionChangedListener removeSelectionChangedListener ISelectionChangedListener fSelectionListeners
public void set Selection I Selection selection if selection instanceof I Structured Selection if selection equals f Prev Selection f Prev Selection selection Object jre I Structured Selection selection get First Element if jre null fVM List set Checked Elements new Object 0 else fVM List set Checked Elements new Object jre fVM List reveal jre fire Selection Changed  setSelection ISelection IStructuredSelection fPrevSelection fPrevSelection IStructuredSelection getFirstElement fVMList setCheckedElements fVMList setCheckedElements fVMList fireSelectionChanged
Creates this block s control in the given control param ancestor containing control param use Manage Button whether to present a single manage button to the user that opens the installed JR Es pref page for JRE management or to provide add remove edit and search buttons public void create Control Composite ancestor Composite parent new Composite ancestor SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 parent set Layout layout Font font ancestor get Font parent set Font font f Control parent Grid Data data Label table Label new Label parent SWT NONE table Label set Text JRE Messages get String InstalledJR Es Block 15 NON NLS 1 data new Grid Data data horizontal Span 2 table Label set Layout Data data table Label set Font font Table table new Table parent SWT CHECK SWT BORDER SWT MULTI SWT FULL SELECTION data new Grid Data Grid Data FILL BOTH table set Layout Data data table set Font font table set Header Visible true table set Lines Visible true Table Layout table Layout new Table Layout table set Layout table Layout Table Column column1 new Table Column table SWT NULL column1 set Text JRE Messages get String InstalledJR Es Block 0 NON NLS 1 column1 add Selection Listener new Selection Adapter public void widget Selected Selection Event e sort By Name Table Column column2 new Table Column table SWT NULL column2 set Text JRE Messages get String InstalledJR Es Block 1 NON NLS 1 column2 add Selection Listener new Selection Adapter public void widget Selected Selection Event e sort By Location Table Column column3 new Table Column table SWT NULL column3 set Text JRE Messages get String InstalledJR Es Block 2 NON NLS 1 column3 add Selection Listener new Selection Adapter public void widget Selected Selection Event e sort By Type fVM List new Checkbox Table Viewer table fVM List set Label Provider new VM Label Provider fVM List set Content Provider new JR Es Content Provider by default sort by name sort By Name fVM List add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event evt enable Buttons fVM List add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event if event get Checked set CheckedJRE IVM Install event get Element else set CheckedJRE null fVM List add Double Click Listener new I Double Click Listener public void double Click Double Click Event e if fVM List get Selection is Empty editVM table add Key Listener new Key Adapter public void key Pressed Key Event event if event character SWT DEL event state Mask 0 removeV Ms Composite buttons new Composite parent SWT NULL buttons set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING layout new Grid Layout layout margin Height 0 layout margin Width 0 buttons set Layout layout buttons set Font font f Add Button create Push Button buttons JRE Messages get String InstalledJR Es Block 3 NON NLS 1 f Add Button add Listener SWT Selection new Listener public void handle Event Event evt addVM f Edit Button create Push Button buttons JRE Messages get String InstalledJR Es Block 4 NON NLS 1 f Edit Button add Listener SWT Selection new Listener public void handle Event Event evt editVM f Remove Button create Push Button buttons JRE Messages get String InstalledJR Es Block 5 NON NLS 1 f Remove Button add Listener SWT Selection new Listener public void handle Event Event evt removeV Ms copied from List Dialog Field Create Separator Label separator new Label buttons SWT NONE separator set Visible false Grid Data gd new Grid Data gd horizontal Alignment Grid Data FILL gd vertical Alignment Grid Data BEGINNING gd height Hint 4 separator set Layout Data gd f Search Button create Push Button buttons JRE Messages get String InstalledJR Es Block 6 NON NLS 1 f Search Button add Listener SWT Selection new Listener public void handle Event Event evt search configure Table Resizing parent buttons table column1 column2 column3 fill With WorkspaceJR Es enable Buttons f Add Button set Enabled Java Runtime getVM Install Types length 0  useManageButton JREs createControl GridLayout GridLayout numColumns marginHeight marginWidth setLayout getFont setFont fControl GridData tableLabel tableLabel setText JREMessages getString InstalledJREsBlock GridData horizontalSpan tableLabel setLayoutData tableLabel setFont FULL_SELECTION GridData GridData FILL_BOTH setLayoutData setFont setHeaderVisible setLinesVisible TableLayout tableLayout TableLayout setLayout tableLayout TableColumn TableColumn setText JREMessages getString InstalledJREsBlock addSelectionListener SelectionAdapter widgetSelected SelectionEvent sortByName TableColumn TableColumn setText JREMessages getString InstalledJREsBlock addSelectionListener SelectionAdapter widgetSelected SelectionEvent sortByLocation TableColumn TableColumn setText JREMessages getString InstalledJREsBlock addSelectionListener SelectionAdapter widgetSelected SelectionEvent sortByType fVMList CheckboxTableViewer fVMList setLabelProvider VMLabelProvider fVMList setContentProvider JREsContentProvider sortByName fVMList addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent enableButtons fVMList addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getChecked setCheckedJRE IVMInstall getElement setCheckedJRE fVMList addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent fVMList getSelection isEmpty addKeyListener KeyAdapter keyPressed KeyEvent stateMask removeVMs setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING GridLayout marginHeight marginWidth setLayout setFont fAddButton createPushButton JREMessages getString InstalledJREsBlock fAddButton addListener handleEvent fEditButton createPushButton JREMessages getString InstalledJREsBlock fEditButton addListener handleEvent fRemoveButton createPushButton JREMessages getString InstalledJREsBlock fRemoveButton addListener handleEvent removeVMs ListDialogField CreateSeparator setVisible GridData GridData horizontalAlignment GridData verticalAlignment GridData heightHint setLayoutData fSearchButton createPushButton JREMessages getString InstalledJREsBlock fSearchButton addListener handleEvent configureTableResizing fillWithWorkspaceJREs enableButtons fAddButton setEnabled JavaRuntime getVMInstallTypes
Fire current selection private void fire Selection Changed Selection Changed Event event new Selection Changed Event this get Selection Object listeners f Selection Listeners get Listeners for int i 0 i listeners length i I Selection Changed Listener listener I Selection Changed Listener listeners i listener selection Changed event  fireSelectionChanged SelectionChangedEvent SelectionChangedEvent getSelection fSelectionListeners getListeners ISelectionChangedListener ISelectionChangedListener selectionChanged
fVM List set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 if e1 instanceof IVM Install e2 instanceof IVM Install IVM Install left IVM Install e1 IVM Install right IVM Install e2 String left Type left getVM Install Type get Name String right Type right getVM Install Type get Name int res left Type compare To Ignore Case right Type if res 0 return res return left get Name compare To Ignore Case right get Name return super compare viewer e1 e2  fVMList setSorter ViewerSorter IVMInstall IVMInstall IVMInstall IVMInstall IVMInstall IVMInstall leftType getVMInstallType getName rightType getVMInstallType getName leftType compareToIgnoreCase rightType getName compareToIgnoreCase getName
public boolean is Sorter Property Object element String property return true  isSorterProperty
Sorts by VM type and name within type private void sort By Type fVM List set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 if e1 instanceof IVM Install e2 instanceof IVM Install IVM Install left IVM Install e1 IVM Install right IVM Install e2 String left Type left getVM Install Type get Name String right Type right getVM Install Type get Name int res left Type compare To Ignore Case right Type if res 0 return res return left get Name compare To Ignore Case right get Name return super compare viewer e1 e2 public boolean is Sorter Property Object element String property return true f Sort Column 3  sortByType fVMList setSorter ViewerSorter IVMInstall IVMInstall IVMInstall IVMInstall IVMInstall IVMInstall leftType getVMInstallType getName rightType getVMInstallType getName leftType compareToIgnoreCase rightType getName compareToIgnoreCase getName isSorterProperty fSortColumn
fVM List set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 if e1 instanceof IVM Install e2 instanceof IVM Install IVM Install left IVM Install e1 IVM Install right IVM Install e2 return left get Name compare To Ignore Case right get Name return super compare viewer e1 e2  fVMList setSorter ViewerSorter IVMInstall IVMInstall IVMInstall IVMInstall IVMInstall IVMInstall getName compareToIgnoreCase getName
public boolean is Sorter Property Object element String property return true  isSorterProperty
Sorts by VM name private void sort By Name fVM List set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 if e1 instanceof IVM Install e2 instanceof IVM Install IVM Install left IVM Install e1 IVM Install right IVM Install e2 return left get Name compare To Ignore Case right get Name return super compare viewer e1 e2 public boolean is Sorter Property Object element String property return true f Sort Column 1  sortByName fVMList setSorter ViewerSorter IVMInstall IVMInstall IVMInstall IVMInstall IVMInstall IVMInstall getName compareToIgnoreCase getName isSorterProperty fSortColumn
fVM List set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 if e1 instanceof IVM Install e2 instanceof IVM Install IVM Install left IVM Install e1 IVM Install right IVM Install e2 return left get Install Location get Absolute Path compare To Ignore Case right get Install Location get Absolute Path return super compare viewer e1 e2  fVMList setSorter ViewerSorter IVMInstall IVMInstall IVMInstall IVMInstall IVMInstall IVMInstall getInstallLocation getAbsolutePath compareToIgnoreCase getInstallLocation getAbsolutePath
public boolean is Sorter Property Object element String property return true  isSorterProperty
Sorts by VM location private void sort By Location fVM List set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 if e1 instanceof IVM Install e2 instanceof IVM Install IVM Install left IVM Install e1 IVM Install right IVM Install e2 return left get Install Location get Absolute Path compare To Ignore Case right get Install Location get Absolute Path return super compare viewer e1 e2 public boolean is Sorter Property Object element String property return true f Sort Column 2  sortByLocation fVMList setSorter ViewerSorter IVMInstall IVMInstall IVMInstall IVMInstall IVMInstall IVMInstall getInstallLocation getAbsolutePath compareToIgnoreCase getInstallLocation getAbsolutePath isSorterProperty fSortColumn
private void enable Buttons int selection Count I Structured Selection fVM List get Selection size f Edit Button set Enabled selection Count 1 f Remove Button set Enabled selection Count 0 selection Count fVM List get Table get Item Count  enableButtons selectionCount IStructuredSelection fVMList getSelection fEditButton setEnabled selectionCount fRemoveButton setEnabled selectionCount selectionCount fVMList getTable getItemCount
protected Button create Push Button Composite parent String label return SWT Util create Push Button parent label null  createPushButton SWTUtil createPushButton
Correctly resizes the table so no phantom columns appear protected void configure Table Resizing final Composite parent final Composite buttons final Table table final Table Column column1 final Table Column column2 final Table Column column3 parent add Control Listener new Control Adapter public void control Resized Control Event e resize Table parent buttons table column1 column2 column3 table add Listener SWT Paint new Listener public void handle Event Event event table remove Listener SWT Paint this resize Table parent buttons table column1 column2 column3 column1 add Control Listener new Control Adapter public void control Resized Control Event e if column1 get Width 0 f Resizing Table f Weight1 get Column Weight 0 column2 add Control Listener new Control Adapter public void control Resized Control Event e if column2 get Width 0 f Resizing Table f Weight2 get Column Weight 1  configureTableResizing TableColumn TableColumn TableColumn addControlListener ControlAdapter controlResized ControlEvent resizeTable addListener handleEvent removeListener resizeTable addControlListener ControlAdapter controlResized ControlEvent getWidth fResizingTable fWeight1 getColumnWeight addControlListener ControlAdapter controlResized ControlEvent getWidth fResizingTable fWeight2 getColumnWeight
private void resize Table Composite parent Composite buttons Table table Table Column column1 Table Column column2 Table Column column3 f Resizing Table true int parent Width 1 int parent Height 1 if parent is Visible Rectangle area parent get Client Area parent Width area width parent Height area height else Point parent Size parent compute Size SWT DEFAULT SWT DEFAULT parent Width parent Size x parent Height parent Size y Point preferred Size table compute Size SWT DEFAULT SWT DEFAULT int width parent Width 2 table get Border Width if preferred Size y parent Height Subtract the scrollbar width from the total column width if a vertical scrollbar will be required Point v Bar Size table get Vertical Bar get Size width v Bar Size x width buttons get Size x Point old Size table get Size if old Size x width table is getting smaller so make the columns smaller first and then resize the table to match the client area width column1 set Width Math round width f Weight1 column2 set Width Math round width f Weight2 column3 set Width width column1 get Width column2 get Width table set Size width parent Height else table is getting bigger so make the table bigger first and then make the columns wider to match the client area width table set Size width parent Height column1 set Width Math round width f Weight1 column2 set Width Math round width f Weight2 column3 set Width width column1 get Width column2 get Width f Resizing Table false  resizeTable TableColumn TableColumn TableColumn fResizingTable parentWidth parentHeight isVisible getClientArea parentWidth parentHeight parentSize computeSize parentWidth parentSize parentHeight parentSize preferredSize computeSize parentWidth getBorderWidth preferredSize parentHeight vBarSize getVerticalBar getSize vBarSize getSize oldSize getSize oldSize setWidth fWeight1 setWidth fWeight2 setWidth getWidth getWidth setSize parentHeight setSize parentHeight setWidth fWeight1 setWidth fWeight2 setWidth getWidth getWidth fResizingTable
Returns this block s control return control public Control get Control return f Control  getControl fControl
Sets the JR Es to be displayed in this block param vms JR Es to be displayed protected void setJR Es IVM Install vms fV Ms clear for int i 0 i vms length i fV Ms add vms i fVM List set Input fV Ms fVM List refresh  JREs JREs setJREs IVMInstall fVMs fVMs fVMList setInput fVMs fVMList
Returns the JR Es currently being displayed in this block return JR Es currently being displayed in this block public IVM Install getJR Es return IVM Install fV Ms to Array new IVM Install fV Ms size  JREs JREs IVMInstall getJREs IVMInstall fVMs toArray IVMInstall fVMs
Bring up a dialog that lets the user create a new VM definition private void addVM AddVM Dialog dialog new AddVM Dialog this get Shell Java Runtime getVM Install Types null dialog set Title JRE Messages get String InstalledJR Es Block 7 NON NLS 1 if dialog open Window OK return fVM List refresh  AddVMDialog AddVMDialog getShell JavaRuntime getVMInstallTypes setTitle JREMessages getString InstalledJREsBlock fVMList
see I AddVM Dialog Requestor vm Added IVM Install public void vm Added IVM Install vm fV Ms add vm fVM List refresh  IAddVMDialogRequestor vmAdded IVMInstall vmAdded IVMInstall fVMs fVMList
see I AddVM Dialog Requestor is Duplicate Name String public boolean is Duplicate Name String name for int i 0 i fV Ms size i IVM Install vm IVM Install fV Ms get i if vm get Name equals name return true return false  IAddVMDialogRequestor isDuplicateName isDuplicateName fVMs IVMInstall IVMInstall fVMs getName
private void editVM I Structured Selection selection I Structured Selection fVM List get Selection IVM Install vm IVM Install selection get First Element if vm null return AddVM Dialog dialog new AddVM Dialog this get Shell Java Runtime getVM Install Types vm dialog set Title JRE Messages get String InstalledJR Es Block 8 NON NLS 1 if dialog open Window OK return fVM List refresh vm  IStructuredSelection IStructuredSelection fVMList getSelection IVMInstall IVMInstall getFirstElement AddVMDialog AddVMDialog getShell JavaRuntime getVMInstallTypes setTitle JREMessages getString InstalledJREsBlock fVMList
private void removeV Ms I Structured Selection selection I Structured Selection fVM List get Selection IVM Install vms new IVM Install selection size Iterator iter selection iterator int i 0 while iter has Next vms i IVM Install iter next i removeJR Es vms  removeVMs IStructuredSelection IStructuredSelection fVMList getSelection IVMInstall IVMInstall hasNext IVMInstall removeJREs
Removes the given V Ms from the table param vms public void removeJR Es IVM Install vms I Structured Selection prev I Structured Selection get Selection for int i 0 i vms length i fV Ms remove vms i fVM List refresh I Structured Selection curr I Structured Selection get Selection if curr equals prev IVM Install installs getJR Es if curr size 0 installs length 1 pick a default VM automatically set Selection new Structured Selection installs 0 else fire Selection Changed  VMs removeJREs IVMInstall IStructuredSelection IStructuredSelection getSelection fVMs fVMList IStructuredSelection IStructuredSelection getSelection IVMInstall getJREs setSelection StructuredSelection fireSelectionChanged
I Runnable With Progress r new I Runnable With Progress public void run I Progress Monitor monitor monitor begin Task JRE Messages get String InstalledJR Es Block 11 I Progress Monitor UNKNOWN NON NLS 1 search root Dir locations types exsting Locations monitor monitor done  IRunnableWithProgress IRunnableWithProgress IProgressMonitor beginTask JREMessages getString InstalledJREsBlock IProgressMonitor rootDir exstingLocations
Search for installed V Ms in the file system protected void search choose a root directory for the search Directory Dialog dialog new Directory Dialog get Shell dialog set Message JRE Messages get String InstalledJR Es Block 9 NON NLS 1 dialog set Text JRE Messages get String InstalledJR Es Block 10 NON NLS 1 String path dialog open if path null return ignore installed locations final Set exsting Locations new Hash Set Iterator iter fV Ms iterator while iter has Next exsting Locations add IVM Install iter next get Install Location search final File root Dir new File path final List locations new Array List final List types new Array List I Runnable With Progress r new I Runnable With Progress public void run I Progress Monitor monitor monitor begin Task JRE Messages get String InstalledJR Es Block 11 I Progress Monitor UNKNOWN NON NLS 1 search root Dir locations types exsting Locations monitor monitor done try PlatformUI get Workbench get Progress Service busy Cursor While r catch Invocation Target Exception e JDI DebugUI Plugin log e catch Interrupted Exception e cancelled return if locations is Empty Message Dialog open Information get Shell JRE Messages get String InstalledJR Es Block 12 Message Format format JRE Messages get String InstalledJR Es Block 13 new String path NON NLS 1 NON NLS 2 else iter locations iterator Iterator iter2 types iterator while iter has Next File location File iter next IVM Install Type type IVM Install Type iter2 next IVM Install vm new VM Standin type create Unique Id type String name location get Name String name Copy new String name int i 1 while is Duplicate Name name Copy name Copy name i vm set Name name Copy vm set Install Location location if type instanceof AbstractVM Install Type set default java doc location AbstractVM Install Type abs AbstractVM Install Type type vm set Javadoc Location abs get Default Javadoc Location location vm Added vm  VMs DirectoryDialog DirectoryDialog getShell setMessage JREMessages getString InstalledJREsBlock setText JREMessages getString InstalledJREsBlock exstingLocations HashSet fVMs hasNext exstingLocations IVMInstall getInstallLocation rootDir ArrayList ArrayList IRunnableWithProgress IRunnableWithProgress IProgressMonitor beginTask JREMessages getString InstalledJREsBlock IProgressMonitor rootDir exstingLocations getWorkbench getProgressService busyCursorWhile InvocationTargetException JDIDebugUIPlugin InterruptedException isEmpty MessageDialog openInformation getShell JREMessages getString InstalledJREsBlock MessageFormat JREMessages getString InstalledJREsBlock hasNext IVMInstallType IVMInstallType IVMInstall VMStandin createUniqueId getName nameCopy isDuplicateName nameCopy nameCopy setName nameCopy setInstallLocation AbstractVMInstallType AbstractVMInstallType AbstractVMInstallType setJavadocLocation getDefaultJavadocLocation vmAdded
protected Shell get Shell return get Control get Shell  getShell getControl getShell
Find a unique VM id Check existing real V Ms as well as the last id used for a VM Standin private String create Unique Id IVM Install Type vm Type String id null do id String value Of System current Time Millis while vm Type findVM Install id null id equals fg Last UsedID fg Last UsedID id return id  VMs VMStandin createUniqueId IVMInstallType vmType valueOf currentTimeMillis vmType findVMInstall fgLastUsedID fgLastUsedID
Searches the specified directory recursively for installed V Ms adding each detected VM to the code found code list Any directories specified in the code ignore code are not traversed param directory param found param types param ignore protected void search File directory List found List types Set ignore I Progress Monitor monitor if monitor is Canceled return String names directory list if names null return 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 try monitor sub Task Message Format format JRE Messages get String InstalledJR Es Block 14 new String Integer to String found size file get Canonical Path NON NLS 1 catch IO Exception e IVM Install Type vm Types Java Runtime getVM Install Types if file is Directory if ignore contains file boolean valid Location false Take the first VM install type that claims the location as a valid VM install VM install types should be smart enough to not claim another type s VM but just in case for int j 0 j vm Types length j if monitor is Canceled return IVM Install Type type vm Types j I Status status type validate Install Location file if status isOK found add file types add type valid Location true break if valid Location sub Dirs add file while sub Dirs is Empty File sub Dir File sub Dirs remove 0 search sub Dir found types ignore monitor if monitor is Canceled return  VMs IProgressMonitor isCanceled subDirs ArrayList isCanceled subTask MessageFormat JREMessages getString InstalledJREsBlock toString getCanonicalPath IOException IVMInstallType vmTypes JavaRuntime getVMInstallTypes isDirectory validLocation vmTypes isCanceled IVMInstallType vmTypes IStatus validateInstallLocation validLocation validLocation subDirs subDirs isEmpty subDir subDirs subDir isCanceled
Sets the checked JRE possible code null code param vm JRE or code null code public void set CheckedJRE IVM Install vm if vm null set Selection new Structured Selection else set Selection new Structured Selection vm  setCheckedJRE IVMInstall setSelection StructuredSelection setSelection StructuredSelection
Returns the checked JRE or code null code if none return the checked JRE or code null code if none public IVM Install get CheckedJRE Object objects fVM List get Checked Elements if objects length 0 return null return IVM Install objects 0  IVMInstall getCheckedJRE fVMList getCheckedElements IVMInstall
Persist table settings into the give dialog store prefixed with the given key param settings dialog store param qualifier key qualifier public void save Column Settings I Dialog Settings settings String qualifier for int i 0 i 2 i persist the first 2 column weights settings put qualifier column i get Column Weight i NON NLS 1 settings put qualifier sort Column f Sort Column NON NLS 1  saveColumnSettings IDialogSettings getColumnWeight sortColumn fSortColumn
private float get Column Weight int col Table table fVM List get Table int table Width table get Size x int column Width table get Column col get Width if table Width column Width return float column Width table Width return 1 3F  getColumnWeight fVMList getTable tableWidth getSize columnWidth getColumn getWidth tableWidth columnWidth columnWidth tableWidth
Restore table settings from the given dialog store using the given key param settings dialog settings store param qualifier key to restore settings from public void restore Column Settings I Dialog Settings settings String qualifier f Weight1 restore Column Weight settings qualifier 0 f Weight2 restore Column Weight settings qualifier 1 fVM List get Table layout true try f Sort Column settings get Int qualifier sort Column NON NLS 1 catch Number Format Exception e f Sort Column 1 switch f Sort Column case 1 sort By Name break case 2 sort By Location break case 3 sort By Type break  restoreColumnSettings IDialogSettings fWeight1 restoreColumnWeight fWeight2 restoreColumnWeight fVMList getTable fSortColumn getInt sortColumn NumberFormatException fSortColumn fSortColumn sortByName sortByLocation sortByType
private float restore Column Weight I Dialog Settings settings String qualifier int col try return settings get Float qualifier column col NON NLS 1 catch Number Format Exception e return 1 3F  restoreColumnWeight IDialogSettings getFloat NumberFormatException
Populates the JRE table with existing JR Es defined in the workspace protected void fill With WorkspaceJR Es fill with JR Es List standins new Array List IVM Install Type types Java Runtime getVM Install Types for int i 0 i types length i IVM Install Type type types i IVM Install installs type getVM Installs for int j 0 j installs length j IVM Install install installs j standins add new VM Standin install setJR Es IVM Install standins to Array new IVM Install standins size  JREs fillWithWorkspaceJREs JREs ArrayList IVMInstallType JavaRuntime getVMInstallTypes IVMInstallType IVMInstall getVMInstalls IVMInstall VMStandin setJREs IVMInstall toArray IVMInstall

Constructs a new page public JRE Container Wizard Page super JRE Messages get String JRE Container Wizard Page JRE System Library 1 NON NLS 1  JREContainerWizardPage JREMessages getString JREContainerWizardPage JRE_System_Library_1
public boolean finish I Path path new Path Java Runtime JRE CONTAINER if fJRE Block is DefaultJRE IVM Install vm fJRE Block getJRE if vm null vm equals Java Runtime get DefaultVM Install path path append vm getVM Install Type get Id path path append vm get Name f Selection Java Core new Container Entry path return true  IPath JavaRuntime JRE_CONTAINER fJREBlock isDefaultJRE IVMInstall fJREBlock JavaRuntime getDefaultVMInstall getVMInstallType getId getName fSelection JavaCore newContainerEntry
see org eclipse jdt ui wizards I Classpath Container Page get Selection public I Classpath Entry get Selection return f Selection  IClasspathContainerPage getSelection IClasspathEntry getSelection fSelection
see org eclipse jdt ui wizards I Classpath Container Page set Selection org eclipse jdt core I Classpath Entry public void set Selection I Classpath Entry container Entry f Selection container Entry initialize From Selection  IClasspathContainerPage setSelection IClasspathEntry setSelection IClasspathEntry containerEntry fSelection containerEntry initializeFromSelection
Initlaizes the JRE selection protected void initialize From Selection if get Control null String type Id null String name null if f Selection null I Path path f Selection get Path if path segment Count 1 type Id path segment 1 name path segment 2 else fJRE Block set Use DefaultJRE return IVM Install Type types Java Runtime getVM Install Types for int i 0 i types length i IVM Install Type type types i if type get Id equals type Id IVM Install installs type getVM Installs for int j 0 j installs length j IVM Install install installs j if install get Name equals name fJRE Block setJRE install return fJRE Block setJRE null  initializeFromSelection getControl typeId fSelection IPath fSelection getPath segmentCount typeId fJREBlock setUseDefaultJRE IVMInstallType JavaRuntime getVMInstallTypes IVMInstallType getId typeId IVMInstall getVMInstalls IVMInstall getName fJREBlock fJREBlock
public void create Control Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout composite set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH composite set Layout Data gd composite set Font parent get Font fJRE Block new JR Es Combo Block fJRE Block set DefaultJRE Descriptor new BuildJRE Descriptor fJRE Block set Title JRE Messages get String JRE Container Wizard Page 3 NON NLS 1 fJRE Block create Control composite gd new Grid Data Grid Data FILL HORIZONTAL fJRE Block get Control set Layout Data gd set Control composite set Title JRE Messages get String JRE Container Wizard Page JRE System Library 1 NON NLS 1 set Message JRE Messages get String JRE Container Wizard Page Select the JRE used to build this project  4 NON NLS 1 initialize From Selection  createControl GridLayout GridLayout setLayout GridData GridData GridData FILL_BOTH setLayoutData setFont getFont fJREBlock JREsComboBlock fJREBlock setDefaultJREDescriptor BuildJREDescriptor fJREBlock setTitle JREMessages getString JREContainerWizardPage fJREBlock createControl GridData GridData FILL_HORIZONTAL fJREBlock getControl setLayoutData setControl setTitle JREMessages getString JREContainerWizardPage JRE_System_Library_1 setMessage JREMessages getString JREContainerWizardPage Select_the_JRE_used_to_build_this_project _4 initializeFromSelection
public Image get Image if f Image null f Image Java Debug Images DESC WIZBAN LIBRARY create Image return f Image  getImage fImage fImage JavaDebugImages DESC_WIZBAN_LIBRARY createImage fImage
public void dispose super dispose if f Image null f Image dispose  fImage fImage

Returns a description of the JRE setting return description of the JRE setting 

Resource Bundle get Bundle BUNDLE NAME private JRE Messages  ResourceBundle getBundle BUNDLE_NAME JREMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

see org eclipse jface viewers I Selection Provider add Selection Changed Listener org eclipse jface viewers I Selection Changed Listener public void add Selection Changed Listener I Selection Changed Listener listener f Selection Listeners add listener  ISelectionProvider addSelectionChangedListener ISelectionChangedListener addSelectionChangedListener ISelectionChangedListener fSelectionListeners
public I Selection get Selection IVM Install vm getJRE if vm null return new Structured Selection return new Structured Selection vm  ISelection getSelection IVMInstall StructuredSelection StructuredSelection
see org eclipse jface viewers I Selection Provider remove Selection Changed Listener org eclipse jface viewers I Selection Changed Listener public void remove Selection Changed Listener I Selection Changed Listener listener f Selection Listeners remove listener  ISelectionProvider removeSelectionChangedListener ISelectionChangedListener removeSelectionChangedListener ISelectionChangedListener fSelectionListeners
public void set Selection I Selection selection if selection instanceof I Structured Selection if selection equals f Prev Selection f Prev Selection selection if selection is Empty f Combo set Text NON NLS 1 f Combo select 1 need to do this to clear the old text f Combo set Items new String fill With WorkspaceJR Es else Object jre I Structured Selection selection get First Element int index fV Ms index Of jre if index 0 f Combo select index fire Selection Changed  setSelection ISelection IStructuredSelection fPrevSelection fPrevSelection isEmpty fCombo setText fCombo fCombo setItems fillWithWorkspaceJREs IStructuredSelection getFirstElement fVMs indexOf fCombo fireSelectionChanged
Creates this block s control in the given control param anscestor containing control public void create Control Composite ancestor Font font ancestor get Font Composite comp new Composite ancestor SWT NONE Grid Layout layout new Grid Layout comp set Layout new Grid Layout comp set Layout Data new Grid Data Grid Data FILL BOTH f Control comp comp set Font font Group group new Group comp SWT NULL layout new Grid Layout layout num Columns 3 group set Layout layout group set Layout Data new Grid Data Grid Data FILL HORIZONTAL group set Font font Grid Data data if f Title null f Title JRE Messages get String JR Es Combo Block 3 NON NLS 1 group set Text f Title display a use default JRE check box if f Default Descriptor null f Default Button new Button group SWT RADIO f Default Button set Text f Default Descriptor get Description f Default Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e if f Default Button get Selection set Use DefaultJRE data new Grid Data data horizontal Span 3 f Default Button set Layout Data data f Default Button set Font font f Specific Button new Button group SWT RADIO if f Specific Descriptor null f Specific Button set Text f Specific Descriptor get Description else f Specific Button set Text JRE Messages get String JR Es Combo Block 1 NON NLS 1 f Specific Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e if f Specific Button get Selection f Combo set Enabled true f Manage Button set Enabled true fire Selection Changed f Specific Button set Font font data new Grid Data Grid Data BEGINNING f Specific Button set Layout Data data f Combo new Combo group SWT DROP DOWN SWT READ ONLY f Combo set Font font data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 1 f Combo set Layout Data data Control Accessible Listener add Listener f Combo f Specific Button get Text f Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e setJRE getJRE f Manage Button create Push Button group JRE Messages get String JR Es Combo Block 2 NON NLS 1 f Manage Button add Listener SWT Selection new Listener public void handle Event Event event IVM Install old Selection getJRE int old Index 1 if old Selection null old Index fV Ms index Of old Selection Define System Library Quick Fix fix new Define System Library Quick Fix fix run null fill With WorkspaceJR Es int new Index 1 if old Selection null new Index fV Ms index Of old Selection if new Index old Index clear the old selection so that a selection changed is fired f Prev Selection null update text set DefaultJRE Descriptor f Default Descriptor if is DefaultJRE reset in case default has changed set Use DefaultJRE else restore selection if new Index 0 f Combo select new Index else select the first JRE f Combo select 0 setJRE getJRE fill With WorkspaceJR Es  createControl getFont GridLayout GridLayout setLayout GridLayout setLayoutData GridData GridData FILL_BOTH fControl setFont GridLayout numColumns setLayout setLayoutData GridData GridData FILL_HORIZONTAL setFont GridData fTitle fTitle JREMessages getString JREsComboBlock setText fTitle fDefaultDescriptor fDefaultButton fDefaultButton setText fDefaultDescriptor getDescription fDefaultButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fDefaultButton getSelection setUseDefaultJRE GridData horizontalSpan fDefaultButton setLayoutData fDefaultButton setFont fSpecificButton fSpecificDescriptor fSpecificButton setText fSpecificDescriptor getDescription fSpecificButton setText JREMessages getString JREsComboBlock fSpecificButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fSpecificButton getSelection fCombo setEnabled fManageButton setEnabled fireSelectionChanged fSpecificButton setFont GridData GridData fSpecificButton setLayoutData fCombo DROP_DOWN READ_ONLY fCombo setFont GridData GridData FILL_HORIZONTAL horizontalSpan fCombo setLayoutData ControlAccessibleListener addListener fCombo fSpecificButton getText fCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent fManageButton createPushButton JREMessages getString JREsComboBlock fManageButton addListener handleEvent IVMInstall oldSelection oldIndex oldSelection oldIndex fVMs indexOf oldSelection DefineSystemLibraryQuickFix DefineSystemLibraryQuickFix fillWithWorkspaceJREs newIndex oldSelection newIndex fVMs indexOf oldSelection newIndex oldIndex fPrevSelection setDefaultJREDescriptor fDefaultDescriptor isDefaultJRE setUseDefaultJRE newIndex fCombo newIndex fCombo fillWithWorkspaceJREs
Fire current selection private void fire Selection Changed Selection Changed Event event new Selection Changed Event this get Selection Object listeners f Selection Listeners get Listeners for int i 0 i listeners length i I Selection Changed Listener listener I Selection Changed Listener listeners i listener selection Changed event  fireSelectionChanged SelectionChangedEvent SelectionChangedEvent getSelection fSelectionListeners getListeners ISelectionChangedListener ISelectionChangedListener selectionChanged
protected Button create Push Button Composite parent String label return SWT Util create Push Button parent label null  createPushButton SWTUtil createPushButton
Returns this block s control return control public Control get Control return f Control  getControl fControl
Collections sort fV Ms new Comparator public int compare Object o1 Object o2 IVM Install left IVM Install o1 IVM Install right IVM Install o2 return left get Name compare To Ignore Case right get Name  fVMs IVMInstall IVMInstall IVMInstall IVMInstall getName compareToIgnoreCase getName
public boolean equals Object obj return obj this 
Sets the JR Es to be displayed in this block param vms JR Es to be displayed protected void setJR Es List jres fV Ms clear fV Ms add All jres sort by name Collections sort fV Ms new Comparator public int compare Object o1 Object o2 IVM Install left IVM Install o1 IVM Install right IVM Install o2 return left get Name compare To Ignore Case right get Name public boolean equals Object obj return obj this now make an array of names String names new String fV Ms size Iterator iter fV Ms iterator int i 0 while iter has Next IVM Install vm IVM Install iter next names i vm get Name i f Combo set Items names  JREs JREs setJREs fVMs fVMs addAll fVMs IVMInstall IVMInstall IVMInstall IVMInstall getName compareToIgnoreCase getName fVMs fVMs hasNext IVMInstall IVMInstall getName fCombo setItems
Returns the JR Es currently being displayed in this block return JR Es currently being displayed in this block public IVM Install getJR Es return IVM Install fV Ms to Array new IVM Install fV Ms size  JREs JREs IVMInstall getJREs IVMInstall fVMs toArray IVMInstall fVMs
protected Shell get Shell return get Control get Shell  getShell getControl getShell
Sets the selected JRE or code null code param vm JRE or code null code public void setJRE IVM Install vm f Specific Button set Selection true f Default Button set Selection false f Combo set Enabled true f Manage Button set Enabled true if vm null set Selection new Structured Selection else set Selection new Structured Selection vm  IVMInstall fSpecificButton setSelection fDefaultButton setSelection fCombo setEnabled fManageButton setEnabled setSelection StructuredSelection setSelection StructuredSelection
Returns the selected JRE or code null code if none return the selected JRE or code null code if none public IVM Install getJRE int index f Combo get Selection Index if index 0 return IVM Install fV Ms get index else return null  IVMInstall fCombo getSelectionIndex IVMInstall fVMs
Populates the JRE table with existing JR Es defined in the workspace protected void fill With WorkspaceJR Es fill with JR Es List standins new Array List IVM Install Type types Java Runtime getVM Install Types for int i 0 i types length i IVM Install Type type types i IVM Install installs type getVM Installs for int j 0 j installs length j IVM Install install installs j standins add new VM Standin install setJR Es standins  JREs fillWithWorkspaceJREs JREs ArrayList IVMInstallType JavaRuntime getVMInstallTypes IVMInstallType IVMInstall getVMInstalls IVMInstall VMStandin setJREs
Sets the Default JRE Descriptor for this block param descriptor default JRE descriptor public void set DefaultJRE Descriptor JRE Descriptor descriptor f Default Descriptor descriptor set Button Text From Descriptor f Default Button descriptor  setDefaultJREDescriptor JREDescriptor fDefaultDescriptor setButtonTextFromDescriptor fDefaultButton
private void set Button Text From Descriptor Button button JRE Descriptor descriptor if button null update the description JRE in case it has changed String current Text button get Text String new Text descriptor get Description if new Text equals current Text button set Text new Text f Control layout  setButtonTextFromDescriptor JREDescriptor currentText getText newText getDescription newText currentText setText newText fControl
Sets the specific JRE Descriptor for this block param descriptor specific JRE descriptor public void set SpecificJRE Descriptor JRE Descriptor descriptor f Specific Descriptor descriptor set Button Text From Descriptor f Specific Button descriptor  setSpecificJREDescriptor JREDescriptor fSpecificDescriptor setButtonTextFromDescriptor fSpecificButton
Returns whether the use default JRE button is checked return whether the use default JRE button is checked public boolean is DefaultJRE if f Default Button null return f Default Button get Selection return false  isDefaultJRE fDefaultButton fDefaultButton getSelection
Sets this control to use the default JRE public void set Use DefaultJRE if f Default Descriptor null f Default Button set Selection true f Specific Button set Selection false f Combo set Enabled false f Manage Button set Enabled false f Prev Selection null fire Selection Changed  setUseDefaultJRE fDefaultDescriptor fDefaultButton setSelection fSpecificButton setSelection fCombo setEnabled fManageButton setEnabled fPrevSelection fireSelectionChanged
Sets the title used for this JRE block param title title for this JRE block public void set Title String title f Title title  setTitle fTitle
Refresh the default JRE description public void refresh set DefaultJRE Descriptor f Default Descriptor  setDefaultJREDescriptor fDefaultDescriptor

public JR Es Preference Page super only used when page is shown programatically set Title JRE Messages get String JR Es Preference Page 1 NON NLS 1 set Description JRE Messages get String JR Es Preference Page 2 NON NLS 1  JREsPreferencePage setTitle JREMessages getString JREsPreferencePage setDescription JREMessages getString JREsPreferencePage
see org eclipse ui I Workbench Preference Page init org eclipse ui I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
Find verify the default VM private void init DefaultVM IVM Install real Default Java Runtime get DefaultVM Install if real Default null IVM Install vms fJRE Block getJR Es for int i 0 i vms length i IVM Install fakeVM vms i if fakeVM equals real Default verify DefaultVM fakeVM break  initDefaultVM IVMInstall realDefault JavaRuntime getDefaultVMInstall realDefault IVMInstall fJREBlock getJREs IVMInstall realDefault verifyDefaultVM
fJRE Block add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event IVM Install install get Current DefaultVM if install null set Valid false set Error Message JRE Messages get String JR Es Preference Page 13 NON NLS 1 else set Valid true set Error Message null  fJREBlock addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IVMInstall getCurrentDefaultVM setValid setErrorMessage JREMessages getString JREsPreferencePage setValid setErrorMessage
protected Control create Contents Composite ancestor initialize Dialog Units ancestor no Default And Apply Button Grid Layout layout new Grid Layout layout num Columns 1 layout margin Height 0 layout margin Width 0 ancestor set Layout layout fJRE Block new InstalledJR Es Block fJRE Block create Control ancestor Control control fJRE Block get Control Grid Data data new Grid Data Grid Data FILL BOTH data horizontal Span 1 control set Layout Data data fJRE Block restore Column Settings JDI DebugUI Plugin get Default get Dialog Settings I Java Debug Help Context Ids JRE PREFERENCE PAGE Workbench Help set Help ancestor I Java Debug Help Context Ids JRE PREFERENCE PAGE init DefaultVM fJRE Block add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event IVM Install install get Current DefaultVM if install null set Valid false set Error Message JRE Messages get String JR Es Preference Page 13 NON NLS 1 else set Valid true set Error Message null apply Dialog Font ancestor return ancestor  createContents initializeDialogUnits noDefaultAndApplyButton GridLayout GridLayout numColumns marginHeight marginWidth setLayout fJREBlock InstalledJREsBlock fJREBlock createControl fJREBlock getControl GridData GridData GridData FILL_BOTH horizontalSpan setLayoutData fJREBlock restoreColumnSettings JDIDebugUIPlugin getDefault getDialogSettings IJavaDebugHelpContextIds JRE_PREFERENCE_PAGE WorkbenchHelp setHelp IJavaDebugHelpContextIds JRE_PREFERENCE_PAGE initDefaultVM fJREBlock addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IVMInstall getCurrentDefaultVM setValid setErrorMessage JREMessages getString JREsPreferencePage setValid setErrorMessage applyDialogFont
Busy Indicator show While null new Runnable public void run IVM Install defaultVM get Current DefaultVM IVM Install vms fJRE Block getJR Es JR Es Updater updater new JR Es Updater get Shell if updater updateJRE Settings vms defaultVM canceled 0 true  BusyIndicator showWhile IVMInstall getCurrentDefaultVM IVMInstall fJREBlock getJREs JREsUpdater JREsUpdater getShell updateJRESettings
public boolean perform Ok final boolean canceled new boolean false Busy Indicator show While null new Runnable public void run IVM Install defaultVM get Current DefaultVM IVM Install vms fJRE Block getJR Es JR Es Updater updater new JR Es Updater get Shell if updater updateJRE Settings vms defaultVM canceled 0 true if canceled 0 return false save column widths I Dialog Settings settings JDI DebugUI Plugin get Default get Dialog Settings fJRE Block save Column Settings settings I Java Debug Help Context Ids JRE PREFERENCE PAGE return super perform Ok  performOk BusyIndicator showWhile IVMInstall getCurrentDefaultVM IVMInstall fJREBlock getJREs JREsUpdater JREsUpdater getShell updateJRESettings IDialogSettings JDIDebugUIPlugin getDefault getDialogSettings fJREBlock saveColumnSettings IJavaDebugHelpContextIds JRE_PREFERENCE_PAGE performOk
protected I Java Model get Java Model return Java Core create Resources Plugin get Workspace get Root  IJavaModel getJavaModel JavaCore ResourcesPlugin getWorkspace getRoot
Verify that the specified VM can be a valid default VM This amounts to verifying that all of the VM s library locations exist on the file system If this fails remove the VM from the table and try to set another default private void verify DefaultVM IVM Install vm if vm null Verify that all of the specified VM s library locations actually exist Library Location locations Java Runtime get Library Locations vm boolean exist true for int i 0 i locations length i exist exist new File locations i get System Library Path toOS String exists If all library locations exist check the corresponding entry in the list otherwise remove the VM if exist fJRE Block set CheckedJRE vm else fJRE Block removeJR Es new IVM Install vm IVM Install def Java Runtime get DefaultVM Install if def null fJRE Block set CheckedJRE null else fJRE Block set CheckedJRE def Error Dialog open Error get Control get Shell JRE Messages get String JR Es Preference Page 1 JRE Messages get String JR Es Preference Page 10 new Status I Status ERROR I Java DebugUI Constants PLUGIN ID I Java DebugUI Constants INTERNAL ERROR JRE Messages get String JR Es Preference Page 11 null NON NLS 1 NON NLS 2 NON NLS 3 return else fJRE Block set CheckedJRE null  verifyDefaultVM IVMInstall LibraryLocation JavaRuntime getLibraryLocations getSystemLibraryPath toOSString fJREBlock setCheckedJRE fJREBlock removeJREs IVMInstall IVMInstall JavaRuntime getDefaultVMInstall fJREBlock setCheckedJRE fJREBlock setCheckedJRE ErrorDialog openError getControl getShell JREMessages getString JREsPreferencePage JREMessages getString JREsPreferencePage IStatus IJavaDebugUIConstants PLUGIN_ID IJavaDebugUIConstants INTERNAL_ERROR JREMessages getString JREsPreferencePage fJREBlock setCheckedJRE
private IVM Install get Current DefaultVM return fJRE Block get CheckedJRE  IVMInstall getCurrentDefaultVM fJREBlock getCheckedJRE
public void set Visible boolean visible super set Visible visible if visible set Title JRE Messages get String JR Es Preference Page 12 NON NLS 1  setVisible setVisible setTitle JREMessages getString JREsPreferencePage

Contstructs a new VM updater to update VM install settings param shell a shell on which to display error dialogs if required or code null code if none public JR Es Updater Shell shell f OriginalV Ms new VM Definitions Container IVM Install def Java Runtime get DefaultVM Install if def null f OriginalV Ms set DefaultVM Install CompositeID Java Runtime get Composite Id FromVM def IVM Install Type types Java Runtime getVM Install Types for int i 0 i types length i IVM Install vms types i getVM Installs for int j 0 j vms length j f OriginalV Ms addVM vms j f Shell shell  JREsUpdater fOriginalVMs VMDefinitionsContainer IVMInstall JavaRuntime getDefaultVMInstall fOriginalVMs setDefaultVMInstallCompositeID JavaRuntime getCompositeIdFromVM IVMInstallType JavaRuntime getVMInstallTypes IVMInstall getVMInstalls fOriginalVMs fShell
Updates VM settings and returns whether the update was successful param jres new installed JR Es param defaultJRE new default VM return whether the update was successful public boolean updateJRE Settings IVM Install jres IVM Install defaultJRE Create a VM definition container VM Definitions Container vm Container new VM Definitions Container Set the default VM Id on the container String defaultVM Id Java Runtime get Composite Id FromVM defaultJRE vm Container set DefaultVM Install CompositeID defaultVM Id Set the V Ms on the container for int i 0 i jres length i vm Container addVM jres i Generate XML for the VM defs and save it as the new value of the VM preference saveVM Definitions vm Container return true  JREs updateJRESettings IVMInstall IVMInstall VMDefinitionsContainer vmContainer VMDefinitionsContainer defaultVMId JavaRuntime getCompositeIdFromVM vmContainer setDefaultVMInstallCompositeID defaultVMId VMs vmContainer saveVMDefinitions vmContainer
private boolean is Equal Object a Object b if a null return b null if b null return false return a equals b  isEqual
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try monitor begin Task JRE Messages get String JR Es Updater 0 100 NON NLS 1 String vm DefXML container get AsXML monitor worked 40 Java Runtime get Preferences set Value Java Runtime PREF VM XML vm DefXML monitor worked 30 Java Runtime save Preferences monitor worked 30 catch IO Exception ioe JDI DebugUI Plugin log ioe catch Parser Configuration Exception e JDI DebugUI Plugin log e catch Transformer Exception e JDI DebugUI Plugin log e finally monitor done  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask JREMessages getString JREsUpdater vmDefXML getAsXML JavaRuntime getPreferences setValue JavaRuntime PREF_VM_XML vmDefXML JavaRuntime savePreferences IOException JDIDebugUIPlugin ParserConfigurationException JDIDebugUIPlugin TransformerException JDIDebugUIPlugin
private void saveVM Definitions final VM Definitions Container container I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try monitor begin Task JRE Messages get String JR Es Updater 0 100 NON NLS 1 String vm DefXML container get AsXML monitor worked 40 Java Runtime get Preferences set Value Java Runtime PREF VM XML vm DefXML monitor worked 30 Java Runtime save Preferences monitor worked 30 catch IO Exception ioe JDI DebugUI Plugin log ioe catch Parser Configuration Exception e JDI DebugUI Plugin log e catch Transformer Exception e JDI DebugUI Plugin log e finally monitor done try JDI DebugUI Plugin get Default get Workbench get Progress Service busy Cursor While runnable catch Invocation Target Exception e JDI DebugUI Plugin log e catch Interrupted Exception e JDI DebugUI Plugin log e  saveVMDefinitions VMDefinitionsContainer IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask JREMessages getString JREsUpdater vmDefXML getAsXML JavaRuntime getPreferences setValue JavaRuntime PREF_VM_XML vmDefXML JavaRuntime savePreferences IOException JDIDebugUIPlugin ParserConfigurationException JDIDebugUIPlugin TransformerException JDIDebugUIPlugin JDIDebugUIPlugin getDefault getWorkbench getProgressService busyCursorWhile InvocationTargetException JDIDebugUIPlugin InterruptedException JDIDebugUIPlugin
private Shell get Shell if f Shell null return JDI DebugUI Plugin get Active Workbench Shell else return f Shell  getShell fShell JDIDebugUIPlugin getActiveWorkbenchShell fShell

f Default Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Selection  fDefaultButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSelection
f Specific Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Selection  fSpecificButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSelection
f Java Command Text set Font font f Java Command Text add Modify Listener new Modify Listener public void modify Text Modify Event evt update Launch Configuration Dialog  fJavaCommandText setFont fJavaCommandText addModifyListener ModifyListener modifyText ModifyEvent updateLaunchConfigurationDialog
see I Launch Configuration Tab create Control Composite public void create Control Composite parent Font font parent get Font Composite comp new Composite parent parent get Style Grid Layout layout new Grid Layout comp set Layout layout comp set Layout Data new Grid Data Grid Data FILL BOTH comp set Font font Group group new Group comp SWT NONE set Control group Grid Layout top Layout new Grid Layout group set Layout top Layout top Layout num Columns 2 Grid Data gd new Grid Data Grid Data FILL HORIZONTAL group set Layout Data gd group set Font font group set Text JRE Messages get String Abstract Java Command Tab 1 NON NLS 1 f Default Button new Button group SWT RADIO f Default Button set Font font gd new Grid Data Grid Data BEGINNING gd horizontal Span 2 f Default Button set Layout Data gd f Default Button set Text Message Format format JRE Messages get String Abstract Java Command Tab 2 new String get Default Command NON NLS 1 f Default Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Selection f Specific Button new Button group SWT RADIO f Specific Button set Font font gd new Grid Data Grid Data BEGINNING f Specific Button set Layout Data gd f Specific Button set Text JRE Messages get String Abstract Java Command Tab 4 NON NLS 1 f Specific Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Selection f Java Command Text new Text group SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL f Java Command Text set Layout Data gd f Java Command Text set Font font f Java Command Text add Modify Listener new Modify Listener public void modify Text Modify Event evt update Launch Configuration Dialog Control Accessible Listener add Listener f Java Command Text f Specific Button get Text set Control group  ILaunchConfigurationTab createControl createControl getFont getStyle GridLayout GridLayout setLayout setLayoutData GridData GridData FILL_BOTH setFont setControl GridLayout topLayout GridLayout setLayout topLayout topLayout numColumns GridData GridData GridData FILL_HORIZONTAL setLayoutData setFont setText JREMessages getString AbstractJavaCommandTab fDefaultButton fDefaultButton setFont GridData GridData horizontalSpan fDefaultButton setLayoutData fDefaultButton setText MessageFormat JREMessages getString AbstractJavaCommandTab getDefaultCommand fDefaultButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSelection fSpecificButton fSpecificButton setFont GridData GridData fSpecificButton setLayoutData fSpecificButton setText JREMessages getString AbstractJavaCommandTab fSpecificButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSelection fJavaCommandText GridData GridData FILL_HORIZONTAL fJavaCommandText setLayoutData fJavaCommandText setFont fJavaCommandText addModifyListener ModifyListener modifyText ModifyEvent updateLaunchConfigurationDialog ControlAccessibleListener addListener fJavaCommandText fSpecificButton getText setControl
protected void handle Selection boolean use Default f Default Button get Selection f Default Button set Selection use Default f Specific Button set Selection use Default f Java Command Text set Enabled use Default update Launch Configuration Dialog  handleSelection useDefault fDefaultButton getSelection fDefaultButton setSelection useDefault fSpecificButton setSelection useDefault fJavaCommandText setEnabled useDefault updateLaunchConfigurationDialog
protected String get Default Command return javaw NON NLS 1  getDefaultCommand
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return JRE Messages get String Abstract Java Command Tab 3 NON NLS 1  ILaunchConfigurationTab getName getName JREMessages getString AbstractJavaCommandTab
public void initialize From I Launch Configuration configuration String java Command null try Map attribute Map configuration get Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE SPECIFIC ATTRS MAP Map null if attribute Map null java Command String attribute Map get I Java Launch Configuration Constants ATTR JAVA COMMAND catch Core Exception ce JDI DebugUI Plugin log ce if java Command null java Command get Default Command f Java Command Text set Text java Command if java Command equals get Default Command using the default f Default Button set Selection true else f Default Button set Selection false handle Selection  initializeFrom ILaunchConfiguration javaCommand attributeMap getAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP attributeMap javaCommand attributeMap IJavaLaunchConfigurationConstants ATTR_JAVA_COMMAND CoreException JDIDebugUIPlugin javaCommand javaCommand getDefaultCommand fJavaCommandText setText javaCommand javaCommand getDefaultCommand fDefaultButton setSelection fDefaultButton setSelection handleSelection
public void perform Apply I Launch Configuration Working Copy configuration if f Default Button get Selection configuration set Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE SPECIFIC ATTRS MAP Map null else String java Command f Java Command Text get Text Map attribute Map new Hash Map 1 attribute Map put I Java Launch Configuration Constants ATTR JAVA COMMAND java Command configuration set Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE SPECIFIC ATTRS MAP attribute Map  performApply ILaunchConfigurationWorkingCopy fDefaultButton getSelection setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP javaCommand fJavaCommandText getText attributeMap HashMap attributeMap IJavaLaunchConfigurationConstants ATTR_JAVA_COMMAND javaCommand setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP attributeMap
see org eclipse debug ui I Launch Configuration Tab set Defaults org eclipse debug core I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration configuration set Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE SPECIFIC ATTRS MAP Map null  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP
public boolean is Valid I Launch Configuration launch Config boolean valid f Default Button get Selection f Java Command Text get Text length 0 if valid set Error Message null set Message null else set Error Message JRE Messages get String Abstract Java Command Tab Java executable must be specified 5 NON NLS 1 set Message null return valid  isValid ILaunchConfiguration launchConfig fDefaultButton getSelection fJavaCommandText getText setErrorMessage setMessage setErrorMessage JREMessages getString AbstractJavaCommandTab Java_executable_must_be_specified_5 setMessage

Constructor for VM Library Block public VM Library Block AddVM Dialog dialog f Dialog dialog  VMLibraryBlock VMLibraryBlock AddVMDialog fDialog
f Default Button set Font font f Default Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Default Button Selected  fDefaultButton setFont fDefaultButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleDefaultButtonSelected
Creates and returns the source lookup control param parent the parent widget of this control public Control create Control Composite parent Font font parent get Font Composite comp new Composite parent SWT NONE Grid Layout top Layout new Grid Layout top Layout num Columns 2 top Layout margin Height 0 top Layout margin Width 0 comp set Layout top Layout Grid Data gd new Grid Data Grid Data FILL BOTH comp set Layout Data gd f Default Button new Button comp SWT CHECK f Default Button set Text JRE Messages get String VM Library Block Use default system libraries 1 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 f Default Button set Layout Data gd f Default Button set Font font f Default Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Default Button Selected f Path Viewer new Runtime Classpath Viewer comp gd new Grid Data Grid Data FILL BOTH f Path Viewer get Control set Layout Data gd f Path Viewer get Control set Font font f Path Viewer add Entries Changed Listener this Composite path Button Comp new Composite comp SWT NONE Grid Layout path Button Layout new Grid Layout path Button Layout margin Height 0 path Button Layout margin Width 0 path Button Comp set Layout path Button Layout gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data HORIZONTAL ALIGN FILL path Button Comp set Layout Data gd path Button Comp set Font font Runtime Classpath Action action new Move Up Action f Path Viewer Button button create Push Button path Button Comp action get Text action set Button button action new Move Down Action f Path Viewer button create Push Button path Button Comp action get Text action set Button button action new Remove Action f Path Viewer button create Push Button path Button Comp action get Text action set Button button action new Add External Jar Action f Path Viewer DIALOG SETTINGS PREFIX button create Push Button path Button Comp action get Text action set Button button action new Attach Source Action f Path Viewer SWT PUSH button create Push Button path Button Comp action get Text action set Button button return comp  createControl getFont GridLayout topLayout GridLayout topLayout numColumns topLayout marginHeight topLayout marginWidth setLayout topLayout GridData GridData GridData FILL_BOTH setLayoutData fDefaultButton fDefaultButton setText JREMessages getString VMLibraryBlock Use_default_system_libraries_1 GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan fDefaultButton setLayoutData fDefaultButton setFont fDefaultButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleDefaultButtonSelected fPathViewer RuntimeClasspathViewer GridData GridData FILL_BOTH fPathViewer getControl setLayoutData fPathViewer getControl setFont fPathViewer addEntriesChangedListener pathButtonComp GridLayout pathButtonLayout GridLayout pathButtonLayout marginHeight pathButtonLayout marginWidth pathButtonComp setLayout pathButtonLayout GridData GridData VERTICAL_ALIGN_BEGINNING GridData HORIZONTAL_ALIGN_FILL pathButtonComp setLayoutData pathButtonComp setFont RuntimeClasspathAction MoveUpAction fPathViewer createPushButton pathButtonComp getText setButton MoveDownAction fPathViewer createPushButton pathButtonComp getText setButton RemoveAction fPathViewer createPushButton pathButtonComp getText setButton AddExternalJarAction fPathViewer DIALOG_SETTINGS_PREFIX createPushButton pathButtonComp getText setButton AttachSourceAction fPathViewer createPushButton pathButtonComp getText setButton
The default button has been toggled protected void handle Default Button Selected update  handleDefaultButtonSelected
Creates and returns a button param parent parent widget param label label return Button protected Button create Push Button Composite parent String label Button button new Button parent SWT PUSH button set Font parent get Font button set Text label f Dialog set Button Layout Data button return button  createPushButton setFont getFont setText fDialog setButtonLayoutData
Create some empty space protected void create Vertical Spacer Composite comp int col Span Label label new Label comp SWT NONE Grid Data gd new Grid Data gd horizontal Span col Span label set Layout Data gd  createVerticalSpacer colSpan GridData GridData horizontalSpan colSpan setLayoutData
Initializes this control based on the settings in the given vm install and type param vm vm or code null code if none param type type of vm install public void initialize From IVM Install vm IVM Install Type type setVM Install vm setVM Install Type type if vm null set Home Directory vm get Install Location f Default Button set Selection vm null vm get Library Locations null if is Default System Library update else Library Location libs vm get Library Locations I Runtime Classpath Entry entries new I Runtime Classpath Entry libs length for int i 0 i libs length i entries i Java Runtime new Archive Runtime Classpath Entry libs i get System Library Path entries i set Source Attachment Path libs i get System Library Source Path entries i set Source Attachment Root Path libs i get Package Root Path f Path Viewer set Entries entries f Path Viewer set Enabled true  initializeFrom IVMInstall IVMInstallType setVMInstall setVMInstallType setHomeDirectory getInstallLocation fDefaultButton setSelection getLibraryLocations isDefaultSystemLibrary LibraryLocation getLibraryLocations IRuntimeClasspathEntry IRuntimeClasspathEntry JavaRuntime newArchiveRuntimeClasspathEntry getSystemLibraryPath setSourceAttachmentPath getSystemLibrarySourcePath setSourceAttachmentRootPath getPackageRootPath fPathViewer setEntries fPathViewer setEnabled
Sets the home directory of the VM Install the user has chosen public void set Home Directory File file f Home file  setHomeDirectory fHome
Returns the home directory protected File get Home Directory return f Home  getHomeDirectory fHome
Updates libraries based on settings public void update boolean use Default f Default Button get Selection Library Location libs null I Status status null if use Default if get Home Directory null libs new Library Location 0 else libs getVM Install Type get Default Library Locations get Home Directory I Runtime Classpath Entry entries new I Runtime Classpath Entry libs length for int i 0 i libs length i I Path lib Path libs i get System Library Path entries i Java Runtime new Archive Runtime Classpath Entry lib Path entries i set Source Attachment Path libs i get System Library Source Path entries i set Source Attachment Root Path libs i get Package Root Path if lib Path to File exists status null status new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Java DebugUI Constants INTERNAL ERROR JRE Messages get String VM Library Block Default libraries do not exist  1 null NON NLS 1 avoid updating in response to own update f In Callback true f Path Viewer set Entries entries f In Callback false f Path Viewer set Enabled use Default if get Entries length 0 is Default System Library status new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Java DebugUI Constants INTERNAL ERROR JRE Messages get String VM Library Block Libraries cannot be empty  1 null NON NLS 1 else if status null status new Status Info f Dialog set System Library Status status f Dialog update Status Line  useDefault fDefaultButton getSelection LibraryLocation IStatus useDefault getHomeDirectory LibraryLocation getVMInstallType getDefaultLibraryLocations getHomeDirectory IRuntimeClasspathEntry IRuntimeClasspathEntry IPath libPath getSystemLibraryPath JavaRuntime newArchiveRuntimeClasspathEntry libPath setSourceAttachmentPath getSystemLibrarySourcePath setSourceAttachmentRootPath getPackageRootPath libPath toFile IStatus JDIDebugUIPlugin getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR JREMessages getString VMLibraryBlock Default_libraries_do_not_exist _1 fInCallback fPathViewer setEntries fInCallback fPathViewer setEnabled useDefault getEntries isDefaultSystemLibrary IStatus JDIDebugUIPlugin getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR JREMessages getString VMLibraryBlock Libraries_cannot_be_empty _1 StatusInfo fDialog setSystemLibraryStatus fDialog updateStatusLine
Saves settings in the given working copy public void perform Apply IVM Install vm boolean def f Default Button get Selection if def vm set Library Locations null else I Runtime Classpath Entry entries f Path Viewer get Entries Library Location libs new Library Location entries length for int i 0 i entries length i I Path lib entries i get Path I Path src entries i get Source Attachment Path if src null src Path ROOT I Path root entries i get Source Attachment Root Path if root null root Path EMPTY libs i new Library Location lib src root vm set Library Locations libs  performApply IVMInstall fDefaultButton getSelection setLibraryLocations IRuntimeClasspathEntry fPathViewer getEntries LibraryLocation LibraryLocation IPath getPath IPath getSourceAttachmentPath IPath getSourceAttachmentRootPath LibraryLocation setLibraryLocations
Returns the entries visible in the viewer public I Runtime Classpath Entry get Entries return f Path Viewer get Entries  IRuntimeClasspathEntry getEntries fPathViewer getEntries
Sets the vm install associated with this library block param vm vm install private void setVM Install IVM Install vm f Vm Install vm  setVMInstall IVMInstall fVmInstall
Returns the vm install associated with this library block return vm install protected IVM Install getVM Install return f Vm Install  IVMInstall getVMInstall fVmInstall
Returns whether the default system libraries are to be used public boolean is Default System Library return f Default Button get Selection  isDefaultSystemLibrary fDefaultButton getSelection
Sets the vm install type associated with this library block param type vm install type private void setVM Install Type IVM Install Type type f Vm Install Type type  setVMInstallType IVMInstallType fVmInstallType
Returns the vm install type associated with this library block return vm install protected IVM Install Type getVM Install Type return f Vm Install Type  IVMInstallType getVMInstallType fVmInstallType
see I Entries Changed Listener entries Changed I Classpath Viewer public void entries Changed I Classpath Viewer viewer if f In Callback f In Callback true update f In Callback false  IEntriesChangedListener entriesChanged IClasspathViewer entriesChanged IClasspathViewer fInCallback fInCallback fInCallback

Throws a core exception with an error status object built from the given message lower level exception and error code param message the status message param exception lower level exception associated with the error or code null code if none param code error code public static void abort String message Throwable exception int code throws Core Exception throw new Core Exception new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier code message exception  CoreException CoreException IStatus JDIDebugUIPlugin getUniqueIdentifier
Return the code I Type code referenced by the specified name and contained in the specified project or throw a code Core Exception code whose message explains why this couldn t be done public static I Type get Main Type String main Type Name I Java Project java Project throws Core Exception if main Type Name null main Type Name trim length 1 abort Launcher Messages get String appletlauncher utils error main type not specified null I Java Launch Configuration Constants ERR UNSPECIFIED MAIN TYPE NON NLS 1 I Type main Type null try main Type find Type java Project main Type Name catch Java Model Exception jme if main Type null abort Message Format format Launcher Messages get String appletlauncher utils error main type does not exist new String main Type Name java Project get Element Name null I Java Launch Configuration Constants ERR UNSPECIFIED MAIN TYPE NON NLS 1 return main Type  IType CoreException IType getMainType mainTypeName IJavaProject javaProject CoreException mainTypeName mainTypeName LauncherMessages getString main_type_not_specified IJavaLaunchConfigurationConstants ERR_UNSPECIFIED_MAIN_TYPE IType mainType mainType findType javaProject mainTypeName JavaModelException mainType MessageFormat LauncherMessages getString main_type_does_not_exist mainTypeName javaProject getElementName IJavaLaunchConfigurationConstants ERR_UNSPECIFIED_MAIN_TYPE mainType
Find the specified fully qualified type name in the specified java project public static I Type find Type I Java Project java Project String main Type Name throws Java Model Exception String path Str main Type Name replace java NON NLS 1 I Java Element java Element java Project find Element new Path path Str if java Element null return null else if java Element instanceof I Type return I Type java Element else if java Element get Element Type I Java Element COMPILATION UNIT String simple Name Signature get Simple Name main Type Name return I Compilation Unit java Element get Type simple Name else if java Element get Element Type I Java Element CLASS FILE return I Class File java Element get Type return null  IType findType IJavaProject javaProject mainTypeName JavaModelException pathStr mainTypeName IJavaElement javaElement javaProject findElement pathStr javaElement javaElement IType IType javaElement javaElement getElementType IJavaElement COMPILATION_UNIT simpleName getSimpleName mainTypeName ICompilationUnit javaElement getType simpleName javaElement getElementType IJavaElement CLASS_FILE IClassFile javaElement getType
public static Set collect Applet Types In Project I Progress Monitor monitor I Java Project project I Type types Hash Set result new Hash Set 5 try I Type java Lang Applet Applet Launch Configuration Utils get Main Type java applet Applet project NON NLS 1 I Type Hierarchy hierarchy java Lang Applet new Type Hierarchy project new Sub Progress Monitor monitor 1 types hierarchy get All Subtypes java Lang Applet int length types length if length 0 for int i 0 i length i if types i is Binary result add types i catch Java Model Exception jme catch Core Exception e monitor done return result  collectAppletTypesInProject IProgressMonitor IJavaProject IType HashSet HashSet IType javaLangApplet AppletLaunchConfigurationUtils getMainType ITypeHierarchy javaLangApplet newTypeHierarchy SubProgressMonitor getAllSubtypes javaLangApplet isBinary JavaModelException CoreException
public static void collect Types Object element I Progress Monitor monitor Set result throws Java Model Exception Invocation Target Exception element compute Scope element while element instanceof I Member if element instanceof I Type if is Subclass Of Applet monitor I Type element result add element monitor done return element I Java Element element get Parent if element instanceof I Compilation Unit I Compilation Unit cu I Compilation Unit element I Type types cu get All Types for int i 0 i types length i if is Subclass Of Applet monitor types i result add types i else if element instanceof I Class File I Type type I Class File element get Type if is Subclass Of Applet monitor type result add type else if element instanceof I Java Element I Java Element parent I Java Element element List found search Subclasses Of Applet monitor I Java Element element filter within the parent element Iterator iterator found iterator while iterator has Next I Java Element target I Java Element iterator next I Java Element child target while child null if child equals parent result add target break else child child get Parent monitor done  collectTypes IProgressMonitor JavaModelException InvocationTargetException computeScope IMember IType isSubclassOfApplet IType IJavaElement getParent ICompilationUnit ICompilationUnit ICompilationUnit IType getAllTypes isSubclassOfApplet IClassFile IType IClassFile getType isSubclassOfApplet IJavaElement IJavaElement IJavaElement searchSubclassesOfApplet IJavaElement hasNext IJavaElement IJavaElement IJavaElement getParent
private static List search Subclasses Of Applet I Progress Monitor pm I Java Element java Element return new Array List collect Applet Types In Project pm java Element get Java Project  searchSubclassesOfApplet IProgressMonitor IJavaElement javaElement ArrayList collectAppletTypesInProject javaElement getJavaProject
private static boolean is Subclass Of Applet I Progress Monitor pm I Type type return collect Applet Types In Project pm type get Java Project contains type  isSubclassOfApplet IProgressMonitor IType collectAppletTypesInProject getJavaProject
private static Object compute Scope Object element if element instanceof I File Editor Input element I File Editor Input element get File if element instanceof I Resource I Java Element java Element Java Core create I Resource element if java Element null java Element exists do not consider the resouce corresponding java element does not exist element null return element  computeScope IFileEditorInput IFileEditorInput getFile IResource IJavaElement javaElement JavaCore IResource javaElement javaElement
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor pm throws Interrupted Exception int n Elements elements length pm begin Task Launcher Messages get String appletlauncher search task inprogress n Elements NON NLS 1 try for int i 0 i n Elements i try collect Types elements i new Sub Progress Monitor pm 1 result catch Java Model Exception jme JDI DebugUI Plugin log jme get Status if pm is Canceled throw new Interrupted Exception finally pm done  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InterruptedException nElements beginTask LauncherMessages getString nElements nElements collectTypes SubProgressMonitor JavaModelException JDIDebugUIPlugin getStatus isCanceled InterruptedException
public static I Type find Applets I Runnable Context context final Object elements throws Invocation Target Exception Interrupted Exception final Set result new Hash Set if elements length 0 I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor pm throws Interrupted Exception int n Elements elements length pm begin Task Launcher Messages get String appletlauncher search task inprogress n Elements NON NLS 1 try for int i 0 i n Elements i try collect Types elements i new Sub Progress Monitor pm 1 result catch Java Model Exception jme JDI DebugUI Plugin log jme get Status if pm is Canceled throw new Interrupted Exception finally pm done context run true true runnable return I Type result to Array new I Type result size  IType findApplets IRunnableContext InvocationTargetException InterruptedException HashSet IRunnableWithProgress IRunnableWithProgress IProgressMonitor InterruptedException nElements beginTask LauncherMessages getString nElements nElements collectTypes SubProgressMonitor JavaModelException JDIDebugUIPlugin getStatus isCanceled InterruptedException IType toArray IType

private static class Package Renderer extends Java Element Label Provider public Package Renderer super Java Element Label Provider SHOW PARAMETERS Java Element Label Provider SHOW POST QUALIFIED Java Element Label Provider SHOW ROOT  PackageRenderer JavaElementLabelProvider PackageRenderer JavaElementLabelProvider SHOW_PARAMETERS JavaElementLabelProvider SHOW_POST_QUALIFIED JavaElementLabelProvider SHOW_ROOT
public Image get Image Object element return super get Image I Type element get Package Fragment  getImage getImage IType getPackageFragment
public String get Text Object element return super get Text I Type element get Package Fragment  getText getText IType getPackageFragment
public Applet Selection Dialog Shell shell I Runnable Context context I Java Project project super shell new Java Element Label Provider Java Element Label Provider SHOW BASICS Java Element Label Provider SHOW OVERLAY ICONS new Package Renderer Assert is Not Null context f Runnable Context context f Project project  AppletSelectionDialog IRunnableContext IJavaProject JavaElementLabelProvider JavaElementLabelProvider SHOW_BASICS JavaElementLabelProvider SHOW_OVERLAY_ICONS PackageRenderer isNotNull fRunnableContext fProject
see org eclipse jface window Window configure Shell org eclipse swt widgets Shell protected void configure Shell Shell new Shell super configure Shell new Shell  configureShell configureShell newShell configureShell newShell
see org eclipse jface window Window open public int open I Type types get Applet Types if types null return CANCEL set Elements types return super open  IType getAppletTypes setElements
f Runnable Context run true true new I Runnable With Progress public void run I Progress Monitor monitor monitor begin Task Launcher Messages get String Applet Selection Dialog Searching  1 project Count NON NLS 1 for int i 0 i project Count i I Java Project java Project java Projects i Sub Progress Monitor sub Monitor new Sub Progress Monitor monitor 1 results add All Applet Launch Configuration Utils collect Applet Types In Project sub Monitor java Project monitor worked 1 monitor done  fRunnableContext IRunnableWithProgress IProgressMonitor beginTask LauncherMessages getString AppletSelectionDialog _1 projectCount projectCount IJavaProject javaProject javaProjects SubProgressMonitor subMonitor SubProgressMonitor addAll AppletLaunchConfigurationUtils collectAppletTypesInProject subMonitor javaProject
Return all types extending code java lang Applet code in the project or all types extending Applet in the workspace if the project is code null code If the search is canceled return code null code private I Type get Applet Types Populate an array of java projects with either the project specified in the constructor or ALL projects in the workspace if no project was specified final I Java Project java Projects if f Project null try java Projects get Java Model get Java Projects catch Java Model Exception jme return EMPTY TYPE ARRAY else java Projects new I Java Project f Project For each java project calculate the Applet types it contains and add them to the results final int project Count java Projects length final Set results new Hash Set project Count boolean canceled false try f Runnable Context run true true new I Runnable With Progress public void run I Progress Monitor monitor monitor begin Task Launcher Messages get String Applet Selection Dialog Searching  1 project Count NON NLS 1 for int i 0 i project Count i I Java Project java Project java Projects i Sub Progress Monitor sub Monitor new Sub Progress Monitor monitor 1 results add All Applet Launch Configuration Utils collect Applet Types In Project sub Monitor java Project monitor worked 1 monitor done catch Invocation Target Exception ite catch Interrupted Exception ie canceled true Convert the results to an array and return it if canceled return null else I Type types null types I Type results to Array new I Type results size return types  IType getAppletTypes IJavaProject javaProjects fProject javaProjects getJavaModel getJavaProjects JavaModelException EMPTY_TYPE_ARRAY javaProjects IJavaProject fProject projectCount javaProjects HashSet projectCount fRunnableContext IRunnableWithProgress IProgressMonitor beginTask LauncherMessages getString AppletSelectionDialog _1 projectCount projectCount IJavaProject javaProject javaProjects SubProgressMonitor subMonitor SubProgressMonitor addAll AppletLaunchConfigurationUtils collectAppletTypesInProject subMonitor javaProject InvocationTargetException InterruptedException IType IType toArray IType
see org eclipse jface dialogs Dialog create Dialog Area org eclipse swt widgets Composite public Control create Dialog Area Composite parent Control control super create Dialog Area parent apply Dialog Font control return control  createDialogArea createDialogArea createDialogArea applyDialogFont
Convenience method to get access to the java model private I Java Model get Java Model return Java Core create get Workspace Root  IJavaModel getJavaModel JavaCore getWorkspaceRoot
Convenience method to get the workspace root private I Workspace Root get Workspace Root return Resources Plugin get Workspace get Root  IWorkspaceRoot getWorkspaceRoot ResourcesPlugin getWorkspace getRoot

see org eclipse jdt internal debug ui launcher Working Directory Block set Default Working Dir protected void set Default Working Dir String output Dir Java Runtime get Project Output Directory get Launch Configuration if output Dir null f Working Dir Text set Text output Dir else super set Default Working Dir  WorkingDirectoryBlock setDefaultWorkingDir setDefaultWorkingDir outputDir JavaRuntime getProjectOutputDirectory getLaunchConfiguration outputDir fWorkingDirText setText outputDir setDefaultWorkingDir

param excluded Files Excluded files will not pass the filter code null code is allowed if no files should be excluded public Archive File Filter I File excluded Files if excluded Files null f Excludes Arrays as List excluded Files else f Excludes null  excludedFiles ArchiveFileFilter IFile excludedFiles excludedFiles fExcludes asList excludedFiles fExcludes
public boolean select Viewer viewer Object parent Object element if element instanceof I File if f Excludes null f Excludes contains element return false return is Archive Path I File element get Full Path else if element instanceof I Container I Project I Folder try I Resource resources I Container element members for int i 0 i resources length i recursive Only show containers that contain an archive if select viewer parent resources i return true catch Core Exception e JDI DebugUI Plugin log e get Status return false  IFile fExcludes fExcludes isArchivePath IFile getFullPath IContainer IProject IFolder IResource IContainer CoreException JDIDebugUIPlugin getStatus
public static boolean is Archive Path I Path path String ext path get File Extension if ext null ext length 0 for int i 0 i fg Archive Extensions length i if ext equals Ignore Case fg Archive Extensions i return true return false  isArchivePath IPath getFileExtension fgArchiveExtensions equalsIgnoreCase fgArchiveExtensions

public Combo Field Editor String name String label Text String entry Names And Values Composite parent init name label Text Assert is True check Array entry Names And Values f Entry Names And Values entry Names And Values create Control parent  ComboFieldEditor labelText entryNamesAndValues labelText isTrue checkArray entryNamesAndValues fEntryNamesAndValues entryNamesAndValues createControl
Checks whether given code String code is of type code String 2 code return code true code if it is ok and code false code otherwise private boolean check Array String table if table null return false for int i 0 i table length i String array table i if array null array length 2 return false return true  checkArray
see Field Editor adjust For Num Columns int protected void adjust For Num Columns int num Columns if num Columns 1 Control control get Label Control int left num Columns if control null Grid Data control get Layout Data horizontal Span 1 left left 1 Grid Data f Combo get Layout Data horizontal Span left else Control control get Label Control if control null Grid Data control get Layout Data horizontal Span 1 Grid Data f Combo get Layout Data horizontal Span 1  FieldEditor adjustForNumColumns adjustForNumColumns numColumns numColumns getLabelControl numColumns GridData getLayoutData horizontalSpan GridData fCombo getLayoutData horizontalSpan getLabelControl GridData getLayoutData horizontalSpan GridData fCombo getLayoutData horizontalSpan
see Field Editor do Fill Into Grid Composite int protected void do Fill Into Grid Composite parent int num Columns int comboC 1 if num Columns 1 comboC num Columns 1 Control control get Label Control parent Grid Data gd new Grid Data gd horizontal Span 1 control set Layout Data gd control get Combo Box Control parent gd new Grid Data gd horizontal Span comboC gd horizontal Alignment Grid Data FILL control set Layout Data gd control set Font parent get Font  FieldEditor doFillIntoGrid doFillIntoGrid numColumns numColumns numColumns getLabelControl GridData GridData horizontalSpan setLayoutData getComboBoxControl GridData horizontalSpan horizontalAlignment GridData setLayoutData setFont getFont
see Field Editor do Load protected void do Load update Combo For Value get Preference Store get String get Preference Name  FieldEditor doLoad doLoad updateComboForValue getPreferenceStore getString getPreferenceName
see Field Editor do Load Default protected void do Load Default update Combo For Value get Preference Store get Default String get Preference Name  FieldEditor doLoadDefault doLoadDefault updateComboForValue getPreferenceStore getDefaultString getPreferenceName
see Field Editor do Store protected void do Store if f Value null get Preference Store set To Default get Preference Name return get Preference Store set Value get Preference Name f Value  FieldEditor doStore doStore fValue getPreferenceStore setToDefault getPreferenceName getPreferenceStore setValue getPreferenceName fValue
see Field Editor get Number Of Controls public int get Number Of Controls return 1  FieldEditor getNumberOfControls getNumberOfControls
f Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event evt String old Value f Value String name f Combo get Text f Value get Value For Name name set Presents Default Value false fire Value Changed VALUE old Value f Value  fCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent oldValue fValue fCombo getText fValue getValueForName setPresentsDefaultValue fireValueChanged oldValue fValue
Lazily create and return the Combo control public Combo get Combo Box Control Composite parent if f Combo null f Combo new Combo parent SWT READ ONLY f Combo set Font parent get Font for int i 0 i f Entry Names And Values length i f Combo add f Entry Names And Values i 0 i f Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event evt String old Value f Value String name f Combo get Text f Value get Value For Name name set Presents Default Value false fire Value Changed VALUE old Value f Value return f Combo  getComboBoxControl fCombo fCombo READ_ONLY fCombo setFont getFont fEntryNamesAndValues fCombo fEntryNamesAndValues fCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent oldValue fValue fCombo getText fValue getValueForName setPresentsDefaultValue fireValueChanged oldValue fValue fCombo
Given the name label of an entry return the corresponding value protected String get Value For Name String name for int i 0 i f Entry Names And Values length i String entry f Entry Names And Values i if name equals entry 0 return entry 1 return f Entry Names And Values 0 0  getValueForName fEntryNamesAndValues fEntryNamesAndValues fEntryNamesAndValues
Set the name in the combo widget to match the specified value protected void update Combo For Value String value f Value value for int i 0 i f Entry Names And Values length i if value equals f Entry Names And Values i 1 f Combo set Text f Entry Names And Values i 0 return if f Entry Names And Values length 0 f Value f Entry Names And Values 0 1  updateComboForValue fValue fEntryNamesAndValues fEntryNamesAndValues fCombo setText fEntryNamesAndValues fEntryNamesAndValues fValue fEntryNamesAndValues

public class Define System Library Quick Fix implements I Marker Resolution public Define System Library Quick Fix super  DefineSystemLibraryQuickFix IMarkerResolution DefineSystemLibraryQuickFix
see org eclipse ui I Marker Resolution run org eclipse core resources I Marker public void run I Marker marker I Preference Page page new JR Es Preference Page show Preference Page org eclipse jdt debug ui preferences VM Preference Page page NON NLS 1  IMarkerResolution IMarker IMarker IPreferencePage JREsPreferencePage showPreferencePage VMPreferencePage
see org eclipse ui I Marker Resolution get Label public String get Label return Launcher Messages get String Define System Library Quick Fix Create a system library definition 2 NON NLS 1  IMarkerResolution getLabel getLabel LauncherMessages getString DefineSystemLibraryQuickFix Create_a_system_library_definition_2
Busy Indicator show While JDI DebugUI Plugin get Standard Display new Runnable public void run dialog create dialog set Message target Node get Label Text result 0 dialog open Window OK  BusyIndicator showWhile JDIDebugUIPlugin getStandardDisplay setMessage targetNode getLabelText
protected void show Preference Page String id I Preference Page page final I Preference Node target Node new Preference Node id page Preference Manager manager new Preference Manager manager add To Root target Node final Preference Dialog dialog new Preference Dialog JDI DebugUI Plugin get Active Workbench Shell manager final boolean result new boolean false Busy Indicator show While JDI DebugUI Plugin get Standard Display new Runnable public void run dialog create dialog set Message target Node get Label Text result 0 dialog open Window OK  showPreferencePage IPreferencePage IPreferenceNode targetNode PreferenceNode PreferenceManager PreferenceManager addToRoot targetNode PreferenceDialog PreferenceDialog JDIDebugUIPlugin getActiveWorkbenchShell BusyIndicator showWhile JDIDebugUIPlugin getStandardDisplay setMessage targetNode getLabelText

Returns the entries in this viewer that are the children of the parent element associated with the selected item s return the entries in this viewer 
Sets the entries in this viewer to the given runtime classpath entries param entries runtime classpath entries 
Returns the shell associated with this viewer return a shell 
Returns whether this viewer is enabled return whether this viewer is enabled 
Adds the given entries to the list If there is no selection in the list the entries are added at the end of the list otherwise the new entries are added before the first selected entry The new entries are selected param entries additions 
Refreshes this entry in the viewer param entry the entry to be refreshed 
The entries in a runtime classpath entry viewer have changed in some way Calling this method allows the viewer to adapt to those changes if necessary 
Returns the index of an equivalent entry or 1 if none return the index of an equivalent entry or 1 if none 
Returns whether an action of the supplied action type should be enabled based on the supplied selection param action Type One of Runtime Classpath Action constants defining the action type param selection The selection to use for the update return Whether the action of this type should be enabled based on the selection  actionType RuntimeClasspathAction

public interface I Entries Changed Listener Notification entries have changed in the viewer public void entries Changed I Classpath Viewer viewer  IEntriesChangedListener entriesChanged IClasspathViewer

protected void search And Launch Object search String mode I Type types null if search null try types Applet Launch Configuration Utils find Applets new Workspace Operation Runner search catch Interrupted Exception e JDI DebugUI Plugin log e return catch Invocation Target Exception e JDI DebugUI Plugin log e return I Type type null if types length 0 Message Dialog open Information get Shell Launcher Messages get String appletlauncher search dialog title Launcher Messages get String appletlauncher search dialog error noapplets NON NLS 1 NON NLS 2 else if types length 1 type choose Type types mode else type types 0 if type null launch type mode  searchAndLaunch IType AppletLaunchConfigurationUtils findApplets WorkspaceOperationRunner InterruptedException JDIDebugUIPlugin InvocationTargetException JDIDebugUIPlugin IType MessageDialog openInformation getShell LauncherMessages getString LauncherMessages getString chooseType
see I Launch Shortcut launch I Editor Part String public void launch I Editor Part editor String mode I Editor Input input editor get Editor Input I Java Element java Element I Java Element input get Adapter I Java Element class if java Element null search And Launch new Object java Element mode else Message Dialog open Information get Shell Launcher Messages get String appletlauncher search dialog title Launcher Messages get String appletlauncher search dialog error noapplets NON NLS 1 NON NLS 2  ILaunchShortcut IEditorPart IEditorPart IEditorInput getEditorInput IJavaElement javaElement IJavaElement getAdapter IJavaElement javaElement searchAndLaunch javaElement MessageDialog openInformation getShell LauncherMessages getString LauncherMessages getString
see I Launch Shortcut launch I Selection String public void launch I Selection selection String mode if selection instanceof I Structured Selection search And Launch I Structured Selection selection to Array mode  ILaunchShortcut ISelection ISelection IStructuredSelection searchAndLaunch IStructuredSelection toArray
Prompts the user to select a type return the selected type or code null code if none protected I Type choose Type I Type types String mode Element List Selection Dialog dialog new Element List Selection Dialog get Shell new Java Element Label Provider dialog set Elements types dialog set Title Launcher Messages get String appletlauncher selection type dialog title NON NLS 1 if mode equals I Launch Manager DEBUG MODE dialog set Message Launcher Messages get String appletlauncher selection type dialog message debug NON NLS 1 else dialog set Message Launcher Messages get String appletlauncher selection type dialog message run NON NLS 1 dialog set Multiple Selection false if dialog open Window OK return I Type dialog get First Result return null  IType chooseType IType ElementListSelectionDialog ElementListSelectionDialog getShell JavaElementLabelProvider setElements setTitle LauncherMessages getString ILaunchManager DEBUG_MODE setMessage LauncherMessages getString setMessage LauncherMessages getString setMultipleSelection IType getFirstResult
Launches a configuration for the given type protected void launch I Type type String mode I Launch Configuration config find Launch Configuration type mode if config null DebugUI Tools launch config mode  IType ILaunchConfiguration findLaunchConfiguration DebugUITools
Locate a configuration to relaunch for the given type If one cannot be found create one return a re useable config or code null code if none protected I Launch Configuration find Launch Configuration I Type type String mode I Launch Configuration Type config Type get Applet Launch Config Type List candidate Configs Collections EMPTY LIST try I Launch Configuration configs Debug Plugin get Default get Launch Manager get Launch Configurations config Type candidate Configs new Array List configs length for int i 0 i configs length i I Launch Configuration config configs i if config get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME equals type get Fully Qualified Name NON NLS 1 if config get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME equals type get Java Project get Element Name NON NLS 1 candidate Configs add config catch Core Exception e JDI DebugUI Plugin log e If there are no existing configs associated with the I Type create one If there is exactly one config associated with the I Type return it Otherwise if there is more than one config associated with the I Type prompt the user to choose one int candidate Count candidate Configs size if candidate Count 1 return create Configuration type else if candidate Count 1 return I Launch Configuration candidate Configs get 0 else Prompt the user to choose a config A null result means the user cancelled the dialog in which case this method returns null since cancelling the dialog should also cancel launching anything I Launch Configuration config choose Configuration candidate Configs mode if config null return config return null  ILaunchConfiguration findLaunchConfiguration IType ILaunchConfigurationType configType getAppletLaunchConfigType candidateConfigs EMPTY_LIST ILaunchConfiguration DebugPlugin getDefault getLaunchManager getLaunchConfigurations configType candidateConfigs ArrayList ILaunchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME getFullyQualifiedName getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME getJavaProject getElementName candidateConfigs CoreException JDIDebugUIPlugin IType IType IType candidateCount candidateConfigs candidateCount createConfiguration candidateCount ILaunchConfiguration candidateConfigs ILaunchConfiguration chooseConfiguration candidateConfigs
Create return a new configuration based on the specified code I Type code protected I Launch Configuration create Configuration I Type type I Launch Configuration config null try I Launch Configuration Type config Type get Applet Launch Config Type I Launch Configuration Working Copy wc config Type new Instance null Debug Plugin get Default get Launch Manager generate Unique Launch Configuration Name From type get Element Name wc set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME type get Fully Qualified Name wc set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME type get Java Project get Element Name wc set Attribute I Java Launch Configuration Constants ATTR APPLET WIDTH Applet Parameters Tab DEFAULT APPLET WIDTH wc set Attribute I Java Launch Configuration Constants ATTR APPLET HEIGHT Applet Parameters Tab DEFAULT APPLET HEIGHT wc set Attribute I Java Launch Configuration Constants ATTR APPLET NAME EMPTY STRING config wc do Save catch Core Exception ce JDI DebugUI Plugin log ce return config  IType ILaunchConfiguration createConfiguration IType ILaunchConfiguration ILaunchConfigurationType configType getAppletLaunchConfigType ILaunchConfigurationWorkingCopy configType newInstance DebugPlugin getDefault getLaunchManager generateUniqueLaunchConfigurationNameFrom getElementName setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME getFullyQualifiedName setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME getJavaProject getElementName setAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_WIDTH AppletParametersTab DEFAULT_APPLET_WIDTH setAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_HEIGHT AppletParametersTab DEFAULT_APPLET_HEIGHT setAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_NAME EMPTY_STRING doSave CoreException JDIDebugUIPlugin
Show a selection dialog that allows the user to choose one of the specified launch configurations Return the chosen config or code null code if the user cancelled the dialog protected I Launch Configuration choose Configuration List config List String mode I Debug Model Presentation label Provider DebugUI Tools new Debug Model Presentation Element List Selection Dialog dialog new Element List Selection Dialog get Shell label Provider dialog set Elements config List to Array dialog set Title Launcher Messages get String appletlauncher selection configuration dialog title NON NLS 1 if mode equals I Launch Manager DEBUG MODE dialog set Message Launcher Messages get String appletlauncher selection configuration dialog message debug NON NLS 1 else dialog set Message Launcher Messages get String appletlauncher selection configuration dialog message run NON NLS 1 dialog set Multiple Selection false int result dialog open label Provider dispose if result Window OK return I Launch Configuration dialog get First Result return null  ILaunchConfiguration chooseConfiguration configList IDebugModelPresentation labelProvider DebugUITools newDebugModelPresentation ElementListSelectionDialog ElementListSelectionDialog getShell labelProvider setElements configList toArray setTitle LauncherMessages getString ILaunchManager DEBUG_MODE setMessage LauncherMessages getString setMessage LauncherMessages getString setMultipleSelection labelProvider ILaunchConfiguration getFirstResult
Returns the local java launch config type protected I Launch Configuration Type get Applet Launch Config Type I Launch Manager lm Debug Plugin get Default get Launch Manager return lm get Launch Configuration Type I Java Launch Configuration Constants ID JAVA APPLET  ILaunchConfigurationType getAppletLaunchConfigType ILaunchManager DebugPlugin getDefault getLaunchManager getLaunchConfigurationType IJavaLaunchConfigurationConstants ID_JAVA_APPLET
Convenience method to get the window that owns this action s Shell protected Shell get Shell return JDI DebugUI Plugin get Active Workbench Shell  getShell JDIDebugUIPlugin getActiveWorkbenchShell
Determines and returns the selection that provides context for the launch or code null code if there is no selection protected I Structured Selection resolve Selection I Workbench Window window if window null return null I Selection selection window get Selection Service get Selection if selection null selection is Empty selection instanceof I Structured Selection there is no obvious selection go fishing selection null I Workbench Page page window get Active Page if page null workspace is closed return null first see if there is an active editor and try its input element I Editor Part editor page get Active Editor Object element null if editor null element editor get Editor Input if selection null element null selection new Structured Selection element return I Structured Selection selection  IStructuredSelection resolveSelection IWorkbenchWindow ISelection getSelectionService getSelection isEmpty IStructuredSelection IWorkbenchPage getActivePage IEditorPart getActiveEditor getEditorInput StructuredSelection IStructuredSelection

Constructs a new Java applet tab group public Java Applet Tab Group  JavaAppletTabGroup
public void create Tabs I Launch Configuration Dialog dialog String mode I Launch Configuration Tab tabs new I Launch Configuration Tab new Applet Main Tab new Applet Parameters Tab new Applet Arguments Tab new JavaJRE Tab new Java Classpath Tab new Source Lookup Tab new Common Tab set Tabs tabs  createTabs ILaunchConfigurationDialog ILaunchConfigurationTab ILaunchConfigurationTab AppletMainTab AppletParametersTab AppletArgumentsTab JavaJRETab JavaClasspathTab SourceLookupTab CommonTab setTabs

param search the java elements to search for a main type param mode the mode to launch in param editor activated on an editor or from a selection in a viewer public void search And Launch Object search String mode boolean editor I Type types null if search null try I Java Element elements get Java Elements search Main Method Search Engine engine new Main Method Search Engine I Java Search Scope scope Search Engine create Java Search Scope elements false types engine search Main Methods PlatformUI get Workbench get Progress Service scope I Java Element Search Constants CONSIDER BINARIES I Java Element Search Constants CONSIDER EXTERNAL JARS true catch Interrupted Exception e return catch Invocation Target Exception e Message Dialog open Error get Shell Launcher Messages get String Java Application Action Launch failed 7 e get Message NON NLS 1 return I Type type null if types length 0 String message null if editor message Launcher Messages get String Java Application Launch Shortcut The active editor does not contain a main type  1 NON NLS 1 else message Launcher Messages get String Java Application Launch Shortcut The selection does not contain a main type  2 NON NLS 1 Message Dialog open Error get Shell Launcher Messages get String Java Application Action Launch failed 7 message NON NLS 1 else if types length 1 type choose Type types mode else type types 0 if type null launch type mode  searchAndLaunch IType IJavaElement getJavaElements MainMethodSearchEngine MainMethodSearchEngine IJavaSearchScope SearchEngine createJavaSearchScope searchMainMethods getWorkbench getProgressService IJavaElementSearchConstants CONSIDER_BINARIES IJavaElementSearchConstants CONSIDER_EXTERNAL_JARS InterruptedException InvocationTargetException MessageDialog openError getShell LauncherMessages getString JavaApplicationAction Launch_failed_7 getMessage IType LauncherMessages getString JavaApplicationLaunchShortcut The_active_editor_does_not_contain_a_main_type _1 LauncherMessages getString JavaApplicationLaunchShortcut The_selection_does_not_contain_a_main_type _2 MessageDialog openError getShell LauncherMessages getString JavaApplicationAction Launch_failed_7 chooseType
Returns the Java elements corresponding to the given objects param objects selected objects return corresponding Java elements private I Java Element get Java Elements Object objects List list new Array List objects length for int i 0 i objects length i Object object objects i if object instanceof I Adaptable I Java Element element I Java Element I Adaptable object get Adapter I Java Element class if element null if element instanceof I Member Use the declaring type if available I Java Element type I Member element get Declaring Type if type null element type list add element return I Java Element list to Array new I Java Element list size  IJavaElement getJavaElements ArrayList IAdaptable IJavaElement IJavaElement IAdaptable getAdapter IJavaElement IMember IJavaElement IMember getDeclaringType IJavaElement toArray IJavaElement
Prompts the user to select a type return the selected type or code null code if none protected I Type choose Type I Type types String mode Main Type Selection Dialog dialog new Main Type Selection Dialog get Shell types if mode equals I Launch Manager DEBUG MODE dialog set Title Launcher Messages get String Java Application Action Type Selection Debug NON NLS 1 else dialog set Title Launcher Messages get String Java Application Action Type Selection Run NON NLS 1 dialog set Multiple Selection false if dialog open Window OK return I Type dialog get First Result return null  IType chooseType IType MainTypeSelectionDialog MainTypeSelectionDialog getShell ILaunchManager DEBUG_MODE setTitle LauncherMessages getString JavaApplicationAction Type_Selection_Debug setTitle LauncherMessages getString JavaApplicationAction Type_Selection_Run setMultipleSelection IType getFirstResult
Launches a configuration for the given type protected void launch I Type type String mode I Launch Configuration config find Launch Configuration type mode if config null DebugUI Tools launch config mode  IType ILaunchConfiguration findLaunchConfiguration DebugUITools
Locate a configuration to relaunch for the given type If one cannot be found create one return a re useable config or code null code if none protected I Launch Configuration find Launch Configuration I Type type String mode I Launch Configuration Type config Type get Java Launch Config Type List candidate Configs Collections EMPTY LIST try I Launch Configuration configs Debug Plugin get Default get Launch Manager get Launch Configurations config Type candidate Configs new Array List configs length for int i 0 i configs length i I Launch Configuration config configs i if config get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME equals type get Fully Qualified Name NON NLS 1 if config get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME equals type get Java Project get Element Name NON NLS 1 candidate Configs add config catch Core Exception e JDI DebugUI Plugin log e If there are no existing configs associated with the I Type create one If there is exactly one config associated with the I Type return it Otherwise if there is more than one config associated with the I Type prompt the user to choose one int candidate Count candidate Configs size if candidate Count 1 return create Configuration type else if candidate Count 1 return I Launch Configuration candidate Configs get 0 else Prompt the user to choose a config A null result means the user cancelled the dialog in which case this method returns null since cancelling the dialog should also cancel launching anything I Launch Configuration config choose Configuration candidate Configs mode if config null return config return null  ILaunchConfiguration findLaunchConfiguration IType ILaunchConfigurationType configType getJavaLaunchConfigType candidateConfigs EMPTY_LIST ILaunchConfiguration DebugPlugin getDefault getLaunchManager getLaunchConfigurations configType candidateConfigs ArrayList ILaunchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME getFullyQualifiedName getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME getJavaProject getElementName candidateConfigs CoreException JDIDebugUIPlugin IType IType IType candidateCount candidateConfigs candidateCount createConfiguration candidateCount ILaunchConfiguration candidateConfigs ILaunchConfiguration chooseConfiguration candidateConfigs
Show a selection dialog that allows the user to choose one of the specified launch configurations Return the chosen config or code null code if the user cancelled the dialog protected I Launch Configuration choose Configuration List config List String mode I Debug Model Presentation label Provider DebugUI Tools new Debug Model Presentation Element List Selection Dialog dialog new Element List Selection Dialog get Shell label Provider dialog set Elements config List to Array dialog set Title Launcher Messages get String Java Application Action Launch Configuration Selection 1 NON NLS 1 if mode equals I Launch Manager DEBUG MODE dialog set Message Launcher Messages get String Java Application Action Choose a launch configuration to debug 2 NON NLS 1 else dialog set Message Launcher Messages get String Java Application Action Choose a launch configuration to run 3 NON NLS 1 dialog set Multiple Selection false int result dialog open label Provider dispose if result Window OK return I Launch Configuration dialog get First Result return null  ILaunchConfiguration chooseConfiguration configList IDebugModelPresentation labelProvider DebugUITools newDebugModelPresentation ElementListSelectionDialog ElementListSelectionDialog getShell labelProvider setElements configList toArray setTitle LauncherMessages getString JavaApplicationAction Launch_Configuration_Selection_1 ILaunchManager DEBUG_MODE setMessage LauncherMessages getString JavaApplicationAction Choose_a_launch_configuration_to_debug_2 setMessage LauncherMessages getString JavaApplicationAction Choose_a_launch_configuration_to_run_3 setMultipleSelection labelProvider ILaunchConfiguration getFirstResult
Create return a new configuration based on the specified code I Type code protected I Launch Configuration create Configuration I Type type I Launch Configuration config null I Launch Configuration Working Copy wc null try I Launch Configuration Type config Type get Java Launch Config Type wc config Type new Instance null get Launch Manager generate Unique Launch Configuration Name From type get Element Name catch Core Exception exception report Creating Configuration exception return null wc set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME type get Fully Qualified Name wc set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME type get Java Project get Element Name try config wc do Save catch Core Exception exception report Creating Configuration exception return config  IType ILaunchConfiguration createConfiguration IType ILaunchConfiguration ILaunchConfigurationWorkingCopy ILaunchConfigurationType configType getJavaLaunchConfigType configType newInstance getLaunchManager generateUniqueLaunchConfigurationNameFrom getElementName CoreException reportCreatingConfiguration setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME getFullyQualifiedName setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME getJavaProject getElementName doSave CoreException reportCreatingConfiguration
protected void report Creating Configuration final Core Exception exception Display get Default async Exec new Runnable public void run Error Dialog open Error get Shell Launcher Messages get String Java Application Launch Shortcut Error Launching 1 Launcher Messages get String Java Application Launch Shortcut Exception exception get Status new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Status ERROR exception get Message exception NON NLS 1 NON NLS 2  reportCreatingConfiguration CoreException getDefault asyncExec ErrorDialog openError getShell LauncherMessages getString JavaApplicationLaunchShortcut Error_Launching_1 LauncherMessages getString JavaApplicationLaunchShortcut getStatus IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus getMessage
protected void report Creating Configuration final Core Exception exception Display get Default async Exec new Runnable public void run Error Dialog open Error get Shell Launcher Messages get String Java Application Launch Shortcut Error Launching 1 Launcher Messages get String Java Application Launch Shortcut Exception exception get Status new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Status ERROR exception get Message exception NON NLS 1 NON NLS 2  reportCreatingConfiguration CoreException getDefault asyncExec ErrorDialog openError getShell LauncherMessages getString JavaApplicationLaunchShortcut Error_Launching_1 LauncherMessages getString JavaApplicationLaunchShortcut getStatus IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus getMessage
Returns the local java launch config type protected I Launch Configuration Type get Java Launch Config Type return get Launch Manager get Launch Configuration Type I Java Launch Configuration Constants ID JAVA APPLICATION  ILaunchConfigurationType getJavaLaunchConfigType getLaunchManager getLaunchConfigurationType IJavaLaunchConfigurationConstants ID_JAVA_APPLICATION
protected I Launch Manager get Launch Manager return Debug Plugin get Default get Launch Manager  ILaunchManager getLaunchManager DebugPlugin getDefault getLaunchManager
Convenience method to get the window that owns this action s Shell protected Shell get Shell return JDI DebugUI Plugin get Active Workbench Shell  getShell JDIDebugUIPlugin getActiveWorkbenchShell
see I Launch Shortcut launch I Editor Part String public void launch I Editor Part editor String mode I Editor Input input editor get Editor Input I Java Element je I Java Element input get Adapter I Java Element class if je null search And Launch new Object je mode true else Message Dialog open Error get Shell Launcher Messages get String Java Application Action Launch failed 7 Launcher Messages get String Java Application Launch Shortcut The active editor does not contain a main type  1 NON NLS 1 NON NLS 2  ILaunchShortcut IEditorPart IEditorPart IEditorInput getEditorInput IJavaElement IJavaElement getAdapter IJavaElement searchAndLaunch MessageDialog openError getShell LauncherMessages getString JavaApplicationAction Launch_failed_7 LauncherMessages getString JavaApplicationLaunchShortcut The_active_editor_does_not_contain_a_main_type _1
see I Launch Shortcut launch I Selection String public void launch I Selection selection String mode if selection instanceof I Structured Selection search And Launch I Structured Selection selection to Array mode false else Message Dialog open Error get Shell Launcher Messages get String Java Application Action Launch failed 7 Launcher Messages get String Java Application Launch Shortcut The selection does not contain a main type  2 NON NLS 1 NON NLS 2  ILaunchShortcut ISelection ISelection IStructuredSelection searchAndLaunch IStructuredSelection toArray MessageDialog openError getShell LauncherMessages getString JavaApplicationAction Launch_failed_7 LauncherMessages getString JavaApplicationLaunchShortcut The_selection_does_not_contain_a_main_type _2

public boolean test Object receiver String method Object args Object expected Value I Java Element java Element null if receiver instanceof I Adaptable java Element I Java Element I Adaptable receiver get Adapter I Java Element class if java Element null if java Element exists return false if java Element instanceof I Java Project java Element instanceof I Package Fragment Root java Element instanceof I Package Fragment optomistic return true if java Element null if PROPERTY IS APPLET equals method NON NLS 1 return is Applet java Element else if PROPERTY HAS MAIN TYPE equals method return has Main java Element return false  expectedValue IJavaElement javaElement IAdaptable javaElement IJavaElement IAdaptable getAdapter IJavaElement javaElement javaElement javaElement IJavaProject javaElement IPackageFragmentRoot javaElement IPackageFragment javaElement PROPERTY_IS_APPLET isApplet javaElement PROPERTY_HAS_MAIN_TYPE hasMain javaElement
Check if the specified resource is an Applet return code true code if the target resource is an Applet code false code otherwise private boolean is Applet I Java Element element try Set result new Hash Set Applet Launch Configuration Utils collect Types element new Null Progress Monitor result if result size 0 return true catch Java Model Exception e return false return false  isApplet IJavaElement HashSet AppletLaunchConfigurationUtils collectTypes NullProgressMonitor JavaModelException
Look for a Java main method in the specified resource return true if the target resource has a code main code method code false code otherwise private boolean has Main I Java Element element try I Type main Type null if element instanceof I Compilation Unit I Compilation Unit cu I Compilation Unit element main Type cu get Type Signature get Qualifier cu get Element Name else if element instanceof I Class File main Type I Class File element get Type else if element instanceof I Type main Type I Type element else if element instanceof I Member main Type I Member element get Declaring Type if main Type null main Type exists Java Model Util has Main Method main Type return true catch Java Model Exception e return false  hasMain IJavaElement IType mainType ICompilationUnit ICompilationUnit ICompilationUnit mainType getType getQualifier getElementName IClassFile mainType IClassFile getType IType mainType IType IMember mainType IMember getDeclaringType mainType mainType JavaModelUtil hasMainMethod mainType JavaModelException

Returns the current Java element context from which to initialize default settings or code null code if none return Java element context protected I Java Element get Context I Workbench Page page JDI DebugUI Plugin get Active Page if page null I Selection selection page get Selection if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection if ss is Empty Object obj ss get First Element if obj instanceof I Java Element return I Java Element obj if obj instanceof I Resource I Java Element je Java Core create I Resource obj if je null I Project pro I Resource obj get Project je Java Core create pro if je null return je I Editor Part part page get Active Editor if part null I Editor Input input part get Editor Input return I Java Element input get Adapter I Java Element class return null  IJavaElement getContext IWorkbenchPage JDIDebugUIPlugin getActivePage ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection isEmpty getFirstElement IJavaElement IJavaElement IResource IJavaElement JavaCore IResource IProject IResource getProject JavaCore IEditorPart getActiveEditor IEditorInput getEditorInput IJavaElement getAdapter IJavaElement
Set the java project attribute based on the I Java Element protected void initialize Java Project I Java Element java Element I Launch Configuration Working Copy config I Java Project java Project java Element get Java Project String name null if java Project null java Project exists name java Project get Element Name config set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME name  IJavaElement initializeJavaProject IJavaElement javaElement ILaunchConfigurationWorkingCopy IJavaProject javaProject javaElement getJavaProject javaProject javaProject javaProject getElementName setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME
see I Entries Changed Listener entries Changed Runtime Classpath Viewer public void entries Changed I Classpath Viewer viewer set Dirty true update Launch Configuration Dialog  IEntriesChangedListener entriesChanged RuntimeClasspathViewer entriesChanged IClasspathViewer setDirty updateLaunchConfigurationDialog

see org eclipse jface viewers I Label Provider get Image java lang Object public Image get Image Object element return Java Plugin Images get Java Plugin Images IMG OBJS LIBRARY  ILabelProvider getImage getImage JavaPluginImages JavaPluginImages IMG_OBJS_LIBRARY
see org eclipse jface viewers I Label Provider get Text java lang Object public String get Text Object element return IVM Install element get Name  ILabelProvider getText getText IVMInstall getName
Prompts the user to choose a JRE for the given project Returns the selected VM or code null code param title the title for the dialog param message the message for the dialog return selected VM or code null code protected IVM Install chooseVM Install String title String message Element List Selection Dialog dialog new Element List Selection Dialog JDI DebugUI Plugin get Active Workbench Shell new JRE Label Provider dialog set Elements get AllV Ms dialog set Title title dialog set Message message dialog set Multiple Selection false dialog open return IVM Install dialog get First Result  IVMInstall chooseVMInstall ElementListSelectionDialog ElementListSelectionDialog JDIDebugUIPlugin getActiveWorkbenchShell JRELabelProvider setElements getAllVMs setTitle setMessage setMultipleSelection IVMInstall getFirstResult
Returns all defined V Ms return IVM Install protected static IVM Install get AllV Ms IVM Install Type types Java Runtime getVM Install Types List vms new Array List for int i 0 i types length i IVM Install Type type types i IVM Install installs type getVM Installs for int j 0 j installs length j vms add installs j return IVM Install vms to Array new IVM Install vms size  VMs IVMInstall IVMInstall getAllVMs IVMInstallType JavaRuntime getVMInstallTypes ArrayList IVMInstallType IVMInstall getVMInstalls IVMInstall toArray IVMInstall

see org eclipse ui I Marker Resolution Generator get Resolutions org eclipse core resources I Marker public I Marker Resolution get Resolutions I Marker marker int id marker get Attribute I Java Model Marker ID 1 switch id unbound classpath container case I Java Model Status Constants CP CONTAINER PATH UNBOUND String arguments Correction Engine get Problem Arguments marker I Path path new Path arguments 0 if path segment 0 equals Java Runtime JRE CONTAINER unbound JRE CONTAINER if JRE Resolution get AllV Ms length 0 I Java Project project get Java Project marker return new I Marker Resolution new Select System Library Quick Fix path project else define a new JRE return new I Marker Resolution new Define System Library Quick Fix break unbound classpath variabe case I Java Model Status Constants CP VARIABLE PATH UNBOUND arguments Correction Engine get Problem Arguments marker path new Path arguments 0 if path segment 0 equals Java Runtime JRELIB VARIABLE unbound JRE LIB if JRE Resolution get AllV Ms length 0 return new I Marker Resolution new Select Default System Library Quick Fix else define a new default JRE return new I Marker Resolution new Define System Library Quick Fix break return NO RESOLUTION  IMarkerResolutionGenerator getResolutions IMarker IMarkerResolution getResolutions IMarker getAttribute IJavaModelMarker IJavaModelStatusConstants CP_CONTAINER_PATH_UNBOUND CorrectionEngine getProblemArguments IPath JavaRuntime JRE_CONTAINER JRE_CONTAINER JREResolution getAllVMs IJavaProject getJavaProject IMarkerResolution SelectSystemLibraryQuickFix IMarkerResolution DefineSystemLibraryQuickFix IJavaModelStatusConstants CP_VARIABLE_PATH_UNBOUND CorrectionEngine getProblemArguments JavaRuntime JRELIB_VARIABLE JRE_LIB JREResolution getAllVMs IMarkerResolution SelectDefaultSystemLibraryQuickFix IMarkerResolution DefineSystemLibraryQuickFix NO_RESOLUTION
protected I Java Project get Java Project I Marker marker return Java Core create marker get Resource get Project  IJavaProject getJavaProject IMarker JavaCore getResource getProject

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Launcher Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE LauncherMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key  getString fgResourceBundle getString MissingResourceException
Gets a string from the resource bundle and formats it with the argument param key the string used to get the bundle value must not be null public static String get Formatted String String key Object arg return Message Format format get String key new Object arg  getFormattedString MessageFormat getString
Gets a string from the resource bundle and formats it with arguments public static String get Formatted String String key Object args return Message Format format get String key args  getFormattedString MessageFormat getString

see I Launch Configuration Tab Group create Tabs I Launch Configuration Dialog String public void create Tabs I Launch Configuration Dialog dialog String mode I Launch Configuration Tab tabs new I Launch Configuration Tab new Java Main Tab new Java Arguments Tab new JavaJRE Tab new Java Classpath Tab new Source Lookup Tab new Environment Tab new Common Tab set Tabs tabs  ILaunchConfigurationTabGroup createTabs ILaunchConfigurationDialog createTabs ILaunchConfigurationDialog ILaunchConfigurationTab ILaunchConfigurationTab JavaMainTab JavaArgumentsTab JavaJRETab JavaClasspathTab SourceLookupTab EnvironmentTab CommonTab setTabs

private int f Style public Method Collector int style f Result new Array List 200 f Style style  fStyle MethodCollector fResult ArrayList fStyle
public List get Result return f Result  getResult fResult
private boolean consider External Jars return f Style I Java Element Search Constants CONSIDER EXTERNAL JARS 0  considerExternalJars fStyle IJavaElementSearchConstants CONSIDER_EXTERNAL_JARS
private boolean consider Binaries return f Style I Java Element Search Constants CONSIDER BINARIES 0  considerBinaries fStyle IJavaElementSearchConstants CONSIDER_BINARIES
public void accept Search Match Search Match match throws Core Exception Object enclosing Element match get Element if enclosing Element instanceof I Method defensive code try I Method curr I Method enclosing Element if curr is Main Method if consider External Jars I Package Fragment Root root get Package Fragment Root curr if root null root is Archive return if consider Binaries curr is Binary return I Type declaring Type curr get Declaring Type f Result add declaring Type catch Java Model Exception e JDI DebugUI Plugin log e get Status  acceptSearchMatch SearchMatch CoreException enclosingElement getElement enclosingElement IMethod IMethod IMethod enclosingElement isMainMethod considerExternalJars IPackageFragmentRoot getPackageFragmentRoot isArchive considerBinaries isBinary IType declaringType getDeclaringType fResult declaringType JavaModelException JDIDebugUIPlugin getStatus
Searches for all main methods in the given scope Valid styles are I Java Element Search Constants CONSIDER BINARIES and I Java Element Search Constants CONSIDER EXTERNAL JARS param pm progress monitor param scope search scope param style search style param include Subtypes whether to consider types that inherit a main method public I Type search Main Methods I Progress Monitor pm I Java Search Scope scope int style boolean include Subtypes throws Java Model Exception pm begin Task Launcher Messages get String Main Method Search Engine 1 100 NON NLS 1 int search Ticks 100 if include Subtypes search Ticks 25 Search Pattern pattern Search Pattern create Pattern main String void I Java Search Constants METHOD I Java Search Constants DECLARATIONS Search Pattern R EXACT MATCH Search Pattern R CASE SENSITIVE NON NLS 1 Search Participant participants new Search Participant Search Engine get Default Search Participant Method Collector collector new Method Collector style I Progress Monitor search Monitor new Sub Progress Monitor pm search Ticks try new Search Engine search pattern participants scope collector search Monitor catch Core Exception ce JDI DebugUI Plugin log ce List result collector get Result if include Subtypes I Progress Monitor subtypes Monitor new Sub Progress Monitor pm 75 subtypes Monitor begin Task Launcher Messages get String Main Method Search Engine 2 result size NON NLS 1 Set set add Subtypes result subtypes Monitor return I Type set to Array new I Type set size else return I Type result to Array new I Type result size  IJavaElementSearchConstants CONSIDER_BINARIES IJavaElementSearchConstants CONSIDER_EXTERNAL_JARS includeSubtypes IType searchMainMethods IProgressMonitor IJavaSearchScope includeSubtypes JavaModelException beginTask LauncherMessages getString MainMethodSearchEngine searchTicks includeSubtypes searchTicks SearchPattern SearchPattern createPattern IJavaSearchConstants IJavaSearchConstants SearchPattern R_EXACT_MATCH SearchPattern R_CASE_SENSITIVE SearchParticipant SearchParticipant SearchEngine getDefaultSearchParticipant MethodCollector MethodCollector IProgressMonitor searchMonitor SubProgressMonitor searchTicks SearchEngine searchMonitor CoreException JDIDebugUIPlugin getResult includeSubtypes IProgressMonitor subtypesMonitor SubProgressMonitor subtypesMonitor beginTask LauncherMessages getString MainMethodSearchEngine addSubtypes subtypesMonitor IType toArray IType IType toArray IType
private Set add Subtypes List types I Progress Monitor monitor Iterator iterator types iterator Set result new Hash Set types size while iterator has Next I Type type I Type iterator next if result add type I Type Hierarchy hierarchy null try hierarchy type new Type Hierarchy monitor I Type subtypes hierarchy get All Subtypes type for int i 0 i subtypes length i I Type t subtypes i result add t catch Java Model Exception e JDI DebugUI Plugin log e monitor worked 1 return result  addSubtypes IProgressMonitor HashSet hasNext IType IType ITypeHierarchy newTypeHierarchy IType getAllSubtypes IType JavaModelException JDIDebugUIPlugin
Returns the package fragment root of code I Java Element code If the given element is already a package fragment root the element itself is returned public static I Package Fragment Root get Package Fragment Root I Java Element element return I Package Fragment Root element get Ancestor I Java Element PACKAGE FRAGMENT ROOT  IJavaElement IPackageFragmentRoot getPackageFragmentRoot IJavaElement IPackageFragmentRoot getAncestor IJavaElement PACKAGE_FRAGMENT_ROOT
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor pm throws Invocation Target Exception try res 0 search Main Methods pm scope style include Subtypes catch Java Model Exception e throw new Invocation Target Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException searchMainMethods includeSubtypes JavaModelException InvocationTargetException
Searches for all main methods in the given scope Valid styles are I Java Element Search Constants CONSIDER BINARIES and I Java Element Search Constants CONSIDER EXTERNAL JARS param include Subtypes whether to consider types that inherit a main method public I Type search Main Methods I Runnable Context context final I Java Search Scope scope final int style final boolean include Subtypes throws Invocation Target Exception Interrupted Exception int all Flags I Java Element Search Constants CONSIDER EXTERNAL JARS I Java Element Search Constants CONSIDER BINARIES Assert is True style all Flags all Flags final I Type res new I Type 1 I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor pm throws Invocation Target Exception try res 0 search Main Methods pm scope style include Subtypes catch Java Model Exception e throw new Invocation Target Exception e context run true true runnable return res 0  IJavaElementSearchConstants CONSIDER_BINARIES IJavaElementSearchConstants CONSIDER_EXTERNAL_JARS includeSubtypes IType searchMainMethods IRunnableContext IJavaSearchScope includeSubtypes InvocationTargetException InterruptedException allFlags IJavaElementSearchConstants CONSIDER_EXTERNAL_JARS IJavaElementSearchConstants CONSIDER_BINARIES isTrue allFlags allFlags IType IType IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException searchMainMethods includeSubtypes JavaModelException InvocationTargetException

private static class Package Renderer extends Java Element Label Provider public Package Renderer super Java Element Label Provider SHOW PARAMETERS Java Element Label Provider SHOW POST QUALIFIED Java Element Label Provider SHOW ROOT  PackageRenderer JavaElementLabelProvider PackageRenderer JavaElementLabelProvider SHOW_PARAMETERS JavaElementLabelProvider SHOW_POST_QUALIFIED JavaElementLabelProvider SHOW_ROOT
public Image get Image Object element return super get Image I Type element get Package Fragment  getImage getImage IType getPackageFragment
public String get Text Object element return super get Text I Type element get Package Fragment  getText getText IType getPackageFragment
public Main Type Selection Dialog Shell shell I Type types super shell new Java Element Label Provider Java Element Label Provider SHOW BASICS Java Element Label Provider SHOW OVERLAY ICONS new Package Renderer Assert is Not Null types f Types types set Message Launcher Messages get String Main Type Selection Dialog Choose a type NON NLS 1 set Upper List Label Launcher Messages get String Main Type Selection Dialog Matching types NON NLS 1 set Lower List Label Launcher Messages get String Main Type Selection Dialog Qualifier NON NLS 1  MainTypeSelectionDialog IType JavaElementLabelProvider JavaElementLabelProvider SHOW_BASICS JavaElementLabelProvider SHOW_OVERLAY_ICONS PackageRenderer isNotNull fTypes setMessage LauncherMessages getString MainTypeSelectionDialog Choose_a_type setUpperListLabel LauncherMessages getString MainTypeSelectionDialog Matching_types setLowerListLabel LauncherMessages getString MainTypeSelectionDialog
Returns the main types public I Type get Types return f Types  IType getTypes fTypes
see Windows configure Shell protected void configure Shell Shell new Shell super configure Shell new Shell Workbench Help set Help new Shell I Java Debug Help Context Ids MAIN TYPE SELECTION DIALOG  configureShell configureShell newShell configureShell newShell WorkbenchHelp setHelp newShell IJavaDebugHelpContextIds MAIN_TYPE_SELECTION_DIALOG
public int open if f Types null return CANCEL set Elements f Types return super open  fTypes setElements fTypes
see org eclipse jface dialogs Dialog create Dialog Area org eclipse swt widgets Composite public Control create Dialog Area Composite parent Control control super create Dialog Area parent apply Dialog Font control return control  createDialogArea createDialogArea createDialogArea applyDialogFont

public Name Value Pair Dialog Shell shell String title String field Labels String initial Values super shell f Title title f Field Labels field Labels f Initial Values initial Values  NameValuePairDialog fieldLabels initialValues fTitle fFieldLabels fieldLabels fInitialValues initialValues
Modify Listener listener new Modify Listener public void modify Text Modify Event e update Buttons  ModifyListener ModifyListener modifyText ModifyEvent updateButtons
see Dialog create Dialog Area Composite protected Control create Dialog Area Composite parent Font font parent get Font Composite comp new Composite parent SWT NULL Grid Layout top Layout new Grid Layout top Layout num Columns 2 top Layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN top Layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN top Layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING top Layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING comp set Layout top Layout comp set Font font Grid Data gd f Name Label new Label comp SWT NONE f Name Label set Text f Field Labels 0 f Name Label set Font font Modify Listener listener new Modify Listener public void modify Text Modify Event e update Buttons f Name Text new Text comp SWT BORDER SWT SINGLE f Name Text set Text f Initial Values 0 gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 300 f Name Text set Layout Data gd f Name Text set Font font f Name Text add Modify Listener listener f Value Label new Label comp SWT NONE f Value Label set Text f Field Labels 1 f Value Label set Font font f Value Text new Text comp SWT BORDER SWT SINGLE f Value Text set Text f Initial Values 1 gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 300 f Value Text set Layout Data gd f Value Text set Font font f Value Text add Modify Listener listener apply Dialog Font comp return comp  createDialogArea createDialogArea getFont GridLayout topLayout GridLayout topLayout numColumns topLayout marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN topLayout marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN topLayout verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING topLayout horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING setLayout topLayout setFont GridData fNameLabel fNameLabel setText fFieldLabels fNameLabel setFont ModifyListener ModifyListener modifyText ModifyEvent updateButtons fNameText fNameText setText fInitialValues GridData GridData FILL_HORIZONTAL widthHint fNameText setLayoutData fNameText setFont fNameText addModifyListener fValueLabel fValueLabel setText fFieldLabels fValueLabel setFont fValueText fValueText setText fInitialValues GridData GridData FILL_HORIZONTAL widthHint fValueText setLayoutData fValueText setFont fValueText addModifyListener applyDialogFont
Return the name value pair entered in this dialog If the cancel button was hit both will be code null code public String get Name Value Pair return new String f Name f Value  getNameValuePair fName fValue
see Dialog button Pressed int protected void button Pressed int button Id if button Id I Dialog Constants OK ID f Name f Name Text get Text f Value f Value Text get Text else f Name null f Value null super button Pressed button Id  buttonPressed buttonPressed buttonId buttonId IDialogConstants OK_ID fName fNameText getText fValue fValueText getText fName fValue buttonPressed buttonId
see Window configure Shell Shell protected void configure Shell Shell shell super configure Shell shell if f Title null shell set Text f Title  configureShell configureShell configureShell fTitle setText fTitle
Enable the OK button if valid input protected void update Buttons String name f Name Text get Text trim String value f Value Text get Text trim get Button I Dialog Constants OK ID set Enabled name length 0 value length 0  updateButtons fNameText getText fValueText getText getButton IDialogConstants OK_ID setEnabled
Enable the buttons on creation public void create super create update Buttons  updateButtons

public void create Tabs I Launch Configuration Dialog dialog String mode I Launch Configuration Tab tabs new I Launch Configuration Tab new Java Connect Tab new Source Lookup Tab new Common Tab set Tabs tabs  createTabs ILaunchConfigurationDialog ILaunchConfigurationTab ILaunchConfigurationTab JavaConnectTab SourceLookupTab CommonTab setTabs

Constructs a new dialog on the given shell with the specified set of actions param parent Shell param actions advanced actions public Runtime Classpath Advanced Dialog Shell parent Shell I Action actions I Classpath Viewer viewer super parent Shell set Shell Style SWT RESIZE get Shell Style f Actions actions f Viewer viewer  parentShell RuntimeClasspathAdvancedDialog parentShell IAction IClasspathViewer parentShell setShellStyle getShellStyle fActions fViewer
see Dialog create Dialog Area Composite protected Control create Dialog Area Composite parent Composite inner new Composite parent SWT NONE Grid Layout layout new Grid Layout inner set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH inner set Layout Data gd Label l new Label inner SWT NONE l set Text Launcher Messages get String Runtime Classpath Advanced Dialog Select an advanced option  1 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL l set Layout Data gd f Buttons new Button f Actions length for int i 0 i f Actions length i I Action action f Actions i f Buttons i new Button inner SWT RADIO f Buttons i set Text action get Text f Buttons i set Data action f Buttons i set Enabled action is Enabled f Buttons i set Layout Data new Grid Data Grid Data FILL HORIZONTAL add Variable String Composite inner get Shell set Text Launcher Messages get String Runtime Classpath Advanced Dialog Advanced Options 1 NON NLS 1 Dialog apply Dialog Font parent return inner  createDialogArea createDialogArea GridLayout GridLayout setLayout GridData GridData GridData FILL_BOTH setLayoutData setText LauncherMessages getString RuntimeClasspathAdvancedDialog Select_an_advanced_option__1 GridData GridData FILL_HORIZONTAL setLayoutData fButtons fActions fActions IAction fActions fButtons fButtons setText getText fButtons setData fButtons setEnabled isEnabled fButtons setLayoutData GridData GridData FILL_HORIZONTAL addVariableStringComposite getShell setText LauncherMessages getString RuntimeClasspathAdvancedDialog Advanced_Options_1 applyDialogFont
private void add Variable String Composite Composite composite f Add Variable String Button new Button composite SWT RADIO f Add Variable String Button set Text Launcher Messages get String Runtime Classpath Advanced Dialog 6 NON NLS 1 Grid Data gd new Grid Data Grid Data FILL HORIZONTAL f Add Variable String Button set Layout Data gd final Composite inner new Composite composite SWT NONE inner set Layout new Grid Layout 2 false inner set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Variable String new Text inner SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL gd grab Excess Horizontal Space true f Variable String set Layout Data gd final Button f Variables Button create Button inner I Dialog Constants IGNORE ID Launcher Messages get String Runtime Classpath Advanced Dialog 7 false NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING f Variables Button set Layout Data gd f Variables Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e String Variable Selection Dialog dialog new String Variable Selection Dialog get Shell dialog open String variable dialog get Variable Expression if variable null f Variable String append variable f Add Variable String Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean enabled f Add Variable String Button get Selection f Variable String set Enabled enabled f Variables Button set Enabled enabled set initial state boolean enabled f Add Variable String Button get Selection f Variable String set Enabled enabled f Variables Button set Enabled enabled  addVariableStringComposite fAddVariableStringButton fAddVariableStringButton setText LauncherMessages getString RuntimeClasspathAdvancedDialog GridData GridData GridData FILL_HORIZONTAL fAddVariableStringButton setLayoutData setLayout GridLayout setLayoutData GridData GridData FILL_HORIZONTAL fVariableString GridData GridData FILL_HORIZONTAL grabExcessHorizontalSpace fVariableString setLayoutData fVariablesButton createButton IDialogConstants IGNORE_ID LauncherMessages getString RuntimeClasspathAdvancedDialog GridData GridData HORIZONTAL_ALIGN_BEGINNING fVariablesButton setLayoutData fVariablesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent StringVariableSelectionDialog StringVariableSelectionDialog getShell getVariableExpression fVariableString fAddVariableStringButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fAddVariableStringButton getSelection fVariableString setEnabled fVariablesButton setEnabled fAddVariableStringButton getSelection fVariableString setEnabled fVariablesButton setEnabled
see Dialog ok Pressed protected void ok Pressed if f Add Variable String Button get Selection String var String f Variable String get Text trim if var String length 0 I Runtime Classpath Entry entry Java Runtime new String Variable Classpath Entry var String f Viewer add Entries new I Runtime Classpath Entry entry else for int i 0 i f Buttons length i if f Buttons i get Selection I Action action I Action f Buttons i get Data if action instanceof Runtime Classpath Action Runtime Classpath Action action set Shell get Shell action run break super ok Pressed  okPressed okPressed fAddVariableStringButton getSelection varString fVariableString getText varString IRuntimeClasspathEntry JavaRuntime newStringVariableClasspathEntry varString fViewer addEntries IRuntimeClasspathEntry fButtons fButtons getSelection IAction IAction fButtons getData RuntimeClasspathAction RuntimeClasspathAction setShell getShell okPressed
protected String get Dialog Settings Section Name return I Java DebugUI Constants PLUGIN ID RUNTIME CLASSPATH ADVANCED DIALOG NON NLS 1  getDialogSettingsSectionName IJavaDebugUIConstants PLUGIN_ID RUNTIME_CLASSPATH_ADVANCED_DIALOG
see org eclipse jface window Window get Initial Size protected Point get Initial Size return Dialog Settings Helper get Initial Size get Dialog Settings Section Name super get Initial Size  getInitialSize getInitialSize DialogSettingsHelper getInitialSize getDialogSettingsSectionName getInitialSize
see org eclipse jface window Window get Initial Location org eclipse swt graphics Point protected Point get Initial Location Point initial Size Point point Dialog Settings Helper get Initial Location get Dialog Settings Section Name return point null point super get Initial Location initial Size  getInitialLocation getInitialLocation initialSize DialogSettingsHelper getInitialLocation getDialogSettingsSectionName getInitialLocation initialSize
see org eclipse jface window Window close public boolean close Dialog Settings Helper persist Shell Geometry get Shell get Dialog Settings Section Name return super close  DialogSettingsHelper persistShellGeometry getShell getDialogSettingsSectionName

public Image get Image Object element I Runtime Classpath Entry entry I Runtime Classpath Entry element I Resource resource entry get Resource switch entry get Type case I Runtime Classpath Entry PROJECT TODO what if project not loaded I Java Element proj Java Core create resource return lp get Image proj case I Runtime Classpath Entry ARCHIVE TODO illegal access to images if resource instanceof I Container return lp get Image resource boolean external resource null boolean source entry get Source Attachment Path null Path EMPTY equals entry get Source Attachment Path String key null if external if source key Java Plugin Images IMG OBJS EXTJAR WSRC else key Java Plugin Images IMG OBJS EXTJAR else if source key Java Plugin Images IMG OBJS JAR WSRC else key Java Plugin Images IMG OBJS JAR return Java Plugin Images get key case I Runtime Classpath Entry VARIABLE return DebugUI Tools get Image I DebugUI Constants IMG OBJS ENV VAR case I Runtime Classpath Entry CONTAINER TODO illegal internal access return Java Plugin Images get Java Plugin Images IMG OBJS LIBRARY case I Runtime Classpath Entry OTHER I Runtime Classpath Entry delegate entry if entry instanceof Classpath Entry delegate Classpath Entry entry get Delegate Image image lp get Image delegate if image null return image if resource null return Java Plugin Images get Java Plugin Images IMG OBJS LIBRARY else return lp get Image resource return null  getImage IRuntimeClasspathEntry IRuntimeClasspathEntry IResource getResource getType IRuntimeClasspathEntry IJavaElement JavaCore getImage IRuntimeClasspathEntry IContainer getImage getSourceAttachmentPath getSourceAttachmentPath JavaPluginImages IMG_OBJS_EXTJAR_WSRC JavaPluginImages IMG_OBJS_EXTJAR JavaPluginImages IMG_OBJS_JAR_WSRC JavaPluginImages IMG_OBJS_JAR JavaPluginImages IRuntimeClasspathEntry DebugUITools getImage IDebugUIConstants IMG_OBJS_ENV_VAR IRuntimeClasspathEntry JavaPluginImages JavaPluginImages IMG_OBJS_LIBRARY IRuntimeClasspathEntry IRuntimeClasspathEntry ClasspathEntry ClasspathEntry getDelegate getImage JavaPluginImages JavaPluginImages IMG_OBJS_LIBRARY getImage
public String get Text Object element I Runtime Classpath Entry entry I Runtime Classpath Entry element switch entry get Type case I Runtime Classpath Entry PROJECT I Resource res entry get Resource I Java Element proj Java Core create res return lp get Text proj case I Runtime Classpath Entry ARCHIVE I Path path entry get Path String segments path segments String Buffer display Path new String Buffer if segments length 0 display Path append segments segments length 1 display Path append NON NLS 1 String device path get Device if device null display Path append device display Path append File separator for int i 0 i segments length 1 i display Path append segments i append File separator return display Path to String case I Runtime Classpath Entry VARIABLE path entry get Path I Path src Path entry get Source Attachment Path String Buffer buf new String Buffer path to String if src Path null buf append NON NLS 1 buf append src Path to String I Path root Path entry get Source Attachment Root Path if root Path null buf append I Path SEPARATOR buf append root Path to String buf append NON NLS 1 append JRE name if we can compute it if path equals new Path Java Runtime JRELIB VARIABLE f Launch Configuration null try IVM Install vm Java Runtime computeVM Install f Launch Configuration buf append NON NLS 1 buf append vm get Name catch Core Exception e return buf to String case I Runtime Classpath Entry CONTAINER path entry get Path if f Launch Configuration null try if path equals new Path Java Runtime JRE CONTAINER default JRE resolve the name for the launch config rather than using the workspace default description IVM Install vm Java Runtime computeVM Install f Launch Configuration return Message Format format Launcher Messages get String Runtime Classpath Entry Label Provider JRE System Library  0  2 new String vm get Name NON NLS 1 I Java Project project null try project Java Runtime get Java Project f Launch Configuration catch Core Exception e if project null if path segment Count 0 path segment 0 equals Java Runtime JRE CONTAINER IVM Install vm JRE Container Initializer resolveVM path if vm null JRE Container container new JRE Container vm path return container get Description else I Classpath Container container Java Core get Classpath Container entry get Path project if container null return container get Description catch Core Exception e return entry get Path to String case I Runtime Classpath Entry OTHER I Runtime Classpath Entry delegate entry if entry instanceof Classpath Entry delegate Classpath Entry entry get Delegate String name lp get Text delegate if name null name length 0 return I Runtime Classpath Entry2 delegate get Name else return name return NON NLS 1  getText IRuntimeClasspathEntry IRuntimeClasspathEntry getType IRuntimeClasspathEntry IResource getResource IJavaElement JavaCore getText IRuntimeClasspathEntry IPath getPath StringBuffer displayPath StringBuffer displayPath displayPath getDevice displayPath displayPath displayPath displayPath toString IRuntimeClasspathEntry getPath IPath srcPath getSourceAttachmentPath StringBuffer StringBuffer toString srcPath srcPath toString IPath rootPath getSourceAttachmentRootPath rootPath IPath rootPath toString JavaRuntime JRELIB_VARIABLE fLaunchConfiguration IVMInstall JavaRuntime computeVMInstall fLaunchConfiguration getName CoreException toString IRuntimeClasspathEntry getPath fLaunchConfiguration JavaRuntime JRE_CONTAINER IVMInstall JavaRuntime computeVMInstall fLaunchConfiguration MessageFormat LauncherMessages getString RuntimeClasspathEntryLabelProvider JRE_System_Library_ _2 getName IJavaProject JavaRuntime getJavaProject fLaunchConfiguration CoreException segmentCount JavaRuntime JRE_CONTAINER IVMInstall JREContainerInitializer JREContainer JREContainer getDescription IClasspathContainer JavaCore getClasspathContainer getPath getDescription CoreException getPath toString IRuntimeClasspathEntry IRuntimeClasspathEntry ClasspathEntry ClasspathEntry getDelegate getText IRuntimeClasspathEntry2 getName
see org eclipse jface viewers I Base Label Provider dispose public void dispose super dispose lp dispose  IBaseLabelProvider
Sets the launch configuration context for this label provider public void set Launch Configuration I Launch Configuration configuration f Launch Configuration configuration fire Label Provider Changed new Label Provider Changed Event this  setLaunchConfiguration ILaunchConfiguration fLaunchConfiguration fireLabelProviderChanged LabelProviderChangedEvent

see I Structured Content Provider get Elements Object public Object get Elements Object input Element return get Entries  IStructuredContentProvider getElements getElements inputElement getEntries
see I Content Provider dispose public void dispose  IContentProvider
see I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
Creates a runtime classpath viewer with the given parent param parent the parent control public Runtime Classpath Viewer Composite parent super parent set Content Provider new Content Provider Runtime Classpath Entry Label Provider lp new Runtime Classpath Entry Label Provider set Label Provider lp set Input f Entries get Table add Key Listener new Key Adapter public void key Pressed Key Event event if is Enabled event character SWT DEL event state Mask 0 List selection get Selection From Widget f Entries remove All selection set Input f Entries notify Changed  RuntimeClasspathViewer setContentProvider ContentProvider RuntimeClasspathEntryLabelProvider RuntimeClasspathEntryLabelProvider setLabelProvider setInput fEntries getTable addKeyListener KeyAdapter keyPressed KeyEvent isEnabled stateMask getSelectionFromWidget fEntries removeAll setInput fEntries notifyChanged
public void set Entries I Runtime Classpath Entry entries f Entries clear for int i 0 i entries length i f Entries add entries i set Input f Entries notify Changed  setEntries IRuntimeClasspathEntry fEntries fEntries setInput fEntries notifyChanged
see org eclipse jdt internal debug ui launcher I Classpath Viewer get Entries public I Runtime Classpath Entry get Entries return I Runtime Classpath Entry f Entries to Array new I Runtime Classpath Entry f Entries size  IClasspathViewer getEntries IRuntimeClasspathEntry getEntries IRuntimeClasspathEntry fEntries toArray IRuntimeClasspathEntry fEntries
public void add Entries I Runtime Classpath Entry entries I Structured Selection sel I Structured Selection get Selection if sel is Empty for int i 0 i entries length i if f Entries contains entries i f Entries add entries i else int index f Entries index Of sel get First Element for int i 0 i entries length i if f Entries contains entries i f Entries add index entries i index set Selection new Structured Selection entries refresh notify Changed  addEntries IRuntimeClasspathEntry IStructuredSelection IStructuredSelection getSelection isEmpty fEntries fEntries fEntries indexOf getFirstElement fEntries fEntries setSelection StructuredSelection notifyChanged
Enables disables this viewer Note the control is not disabled since we still want the user to be able to scroll if required to see the existing entries Just actions should be disabled public void set Enabled boolean enabled f Enabled enabled fire selection change to update actions set Selection get Selection  setEnabled fEnabled setSelection getSelection
see org eclipse jdt internal debug ui launcher I Classpath Viewer is Enabled public boolean is Enabled return f Enabled  IClasspathViewer isEnabled isEnabled fEnabled
Sets the launch configuration context for this viewer if any public void set Launch Configuration I Launch Configuration configuration if get Label Provider null Runtime Classpath Entry Label Provider get Label Provider set Launch Configuration configuration  setLaunchConfiguration ILaunchConfiguration getLabelProvider RuntimeClasspathEntryLabelProvider getLabelProvider setLaunchConfiguration
public void add Entries Changed Listener I Entries Changed Listener listener f Listeners add listener  addEntriesChangedListener IEntriesChangedListener fListeners
public void remove Entries Changed Listener I Entries Changed Listener listener f Listeners remove listener  removeEntriesChangedListener IEntriesChangedListener fListeners
public void notify Changed Object listeners f Listeners get Listeners for int i 0 i listeners length i I Entries Changed Listener listeners i entries Changed this  notifyChanged fListeners getListeners IEntriesChangedListener entriesChanged
see org eclipse jdt internal debug ui launcher I Classpath Viewer index Of org eclipse jdt launching I Runtime Classpath Entry public int index Of I Runtime Classpath Entry entry return f Entries index Of entry  IClasspathViewer indexOf IRuntimeClasspathEntry indexOf IRuntimeClasspathEntry fEntries indexOf
see org eclipse jdt internal debug ui launcher I Classpath Viewer get Shell public Shell get Shell return get Control get Shell  IClasspathViewer getShell getShell getControl getShell
see org eclipse jdt internal debug ui launcher I Classpath Viewer update Selection int org eclipse jface viewers I Structured Selection public boolean update Selection int action Type I Structured Selection selection return is Enabled  IClasspathViewer updateSelection IStructuredSelection updateSelection actionType IStructuredSelection isEnabled

public class Select Default System Library Quick Fix extends JRE Resolution public Select Default System Library Quick Fix super  SelectDefaultSystemLibraryQuickFix JREResolution SelectDefaultSystemLibraryQuickFix
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try Java Runtime set DefaultVM Install vm monitor catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException JavaRuntime setDefaultVMInstall CoreException InvocationTargetException
see org eclipse ui I Marker Resolution run org eclipse core resources I Marker public void run I Marker marker try String title Launcher Messages get String Select Default System Library Quick Fix Select Default System Library 1 NON NLS 1 String message Launcher Messages get String Select Default System Library Quick Fix Select the system library to use by default for building and running Java projects  2 NON NLS 1 final IVM Install vm chooseVM Install title message if vm null return I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try Java Runtime set DefaultVM Install vm monitor catch Core Exception e throw new Invocation Target Exception e try PlatformUI get Workbench get Progress Service busy Cursor While runnable catch Invocation Target Exception e if e get Target Exception instanceof Core Exception throw Core Exception e get Target Exception throw new Core Exception new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Java DebugUI Constants INTERNAL ERROR Launcher Messages get String Select Default System Library Quick Fix An exception occurred while updating the default system library  3 e get Target Exception NON NLS 1 catch Interrupted Exception e cancelled catch Core Exception e JDI DebugUI Plugin error Dialog Launcher Messages get String Select Default System Library Quick Fix Unable to update the default system library  4 e get Status NON NLS 1  IMarkerResolution IMarker IMarker LauncherMessages getString SelectDefaultSystemLibraryQuickFix Select_Default_System_Library_1 LauncherMessages getString SelectDefaultSystemLibraryQuickFix Select_the_system_library_to_use_by_default_for_building_and_running_Java_projects _2 IVMInstall chooseVMInstall IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException JavaRuntime setDefaultVMInstall CoreException InvocationTargetException getWorkbench getProgressService busyCursorWhile InvocationTargetException getTargetException CoreException CoreException getTargetException CoreException IStatus JDIDebugUIPlugin getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR LauncherMessages getString SelectDefaultSystemLibraryQuickFix An_exception_occurred_while_updating_the_default_system_library _3 getTargetException InterruptedException CoreException JDIDebugUIPlugin errorDialog LauncherMessages getString SelectDefaultSystemLibraryQuickFix Unable_to_update_the_default_system_library _4 getStatus
see org eclipse ui I Marker Resolution get Label public String get Label return Launcher Messages get String Select Default System Library Quick Fix Select default system library 5 NON NLS 1  IMarkerResolution getLabel getLabel LauncherMessages getString SelectDefaultSystemLibraryQuickFix Select_default_system_library_5

private I Java Project f Project public Select System Library Quick Fix I Path unbound Path I Java Project project f Unbound Path unbound Path f Project project  IJavaProject fProject SelectSystemLibraryQuickFix IPath unboundPath IJavaProject fUnboundPath unboundPath fProject
see org eclipse ui I Marker Resolution run org eclipse core resources I Marker public void run I Marker marker try handle Container Resolution Error f Unbound Path f Project catch Core Exception e JDI DebugUI Plugin error Dialog Launcher Messages get String JRE Container Resolution Unable to update classpath 1 e get Status NON NLS 1  IMarkerResolution IMarker IMarker handleContainerResolutionError fUnboundPath fProject CoreException JDIDebugUIPlugin errorDialog LauncherMessages getString JREContainerResolution Unable_to_update_classpath_1 getStatus
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception String vm Type Id vm getVM Install Type get Id String vm Name vm get Name String prev Id JRE Container Initializer getVM Type Id unbound Path String prev Name JRE Container Initializer getVM Name unbound Path try I Path new Binding unbound Path if prev Id equals vm Type Id prev Name equals vm Name update classpath I Path new Path new Path Java Runtime JRE CONTAINER if vm Type Id null new Path new Path append vm Type Id append vm Name I Classpath Entry classpath project get Raw Classpath for int i 0 i classpath length i switch classpath i get Entry Kind case I Classpath Entry CPE CONTAINER if classpath i get Path equals unbound Path classpath i Java Core new Container Entry new Path classpath i is Exported break default break project set Raw Classpath classpath monitor new Binding new Path Java Core set Classpath Container unbound Path new I Java Project project new I Classpath Container new JRE Container vm new Binding monitor catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException vmTypeId getVMInstallType getId vmName getName prevId JREContainerInitializer getVMTypeId unboundPath prevName JREContainerInitializer getVMName unboundPath IPath newBinding unboundPath prevId vmTypeId prevName vmName IPath newPath JavaRuntime JRE_CONTAINER vmTypeId newPath newPath vmTypeId vmName IClasspathEntry getRawClasspath getEntryKind IClasspathEntry CPE_CONTAINER getPath unboundPath JavaCore newContainerEntry newPath isExported setRawClasspath newBinding newPath JavaCore setClasspathContainer unboundPath IJavaProject IClasspathContainer JREContainer newBinding CoreException InvocationTargetException
protected void handle Container Resolution Error final I Path unbound Path final I Java Project project throws Core Exception String title Launcher Messages get String JRE Resolution Select System Library 1 NON NLS 1 String message Message Format format Launcher Messages get String JRE Resolution Select a system library to use when building  0  2 new String project get Element Name NON NLS 1 final IVM Install vm chooseVM Install title message if vm null return I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception String vm Type Id vm getVM Install Type get Id String vm Name vm get Name String prev Id JRE Container Initializer getVM Type Id unbound Path String prev Name JRE Container Initializer getVM Name unbound Path try I Path new Binding unbound Path if prev Id equals vm Type Id prev Name equals vm Name update classpath I Path new Path new Path Java Runtime JRE CONTAINER if vm Type Id null new Path new Path append vm Type Id append vm Name I Classpath Entry classpath project get Raw Classpath for int i 0 i classpath length i switch classpath i get Entry Kind case I Classpath Entry CPE CONTAINER if classpath i get Path equals unbound Path classpath i Java Core new Container Entry new Path classpath i is Exported break default break project set Raw Classpath classpath monitor new Binding new Path Java Core set Classpath Container unbound Path new I Java Project project new I Classpath Container new JRE Container vm new Binding monitor catch Core Exception e throw new Invocation Target Exception e try PlatformUI get Workbench get Progress Service busy Cursor While runnable catch Invocation Target Exception e if e get Target Exception instanceof Core Exception throw Core Exception e get Target Exception throw new Core Exception new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Java DebugUI Constants INTERNAL ERROR Launcher Messages get String JRE Container Resolution An exception occurred while updating the classpath  1 e get Target Exception NON NLS 1 catch Interrupted Exception e cancelled  handleContainerResolutionError IPath unboundPath IJavaProject CoreException LauncherMessages getString JREResolution Select_System_Library_1 MessageFormat LauncherMessages getString JREResolution Select_a_system_library_to_use_when_building_ _2 getElementName IVMInstall chooseVMInstall IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException vmTypeId getVMInstallType getId vmName getName prevId JREContainerInitializer getVMTypeId unboundPath prevName JREContainerInitializer getVMName unboundPath IPath newBinding unboundPath prevId vmTypeId prevName vmName IPath newPath JavaRuntime JRE_CONTAINER vmTypeId newPath newPath vmTypeId vmName IClasspathEntry getRawClasspath getEntryKind IClasspathEntry CPE_CONTAINER getPath unboundPath JavaCore newContainerEntry newPath isExported setRawClasspath newBinding newPath JavaCore setClasspathContainer unboundPath IJavaProject IClasspathContainer JREContainer newBinding CoreException InvocationTargetException getWorkbench getProgressService busyCursorWhile InvocationTargetException getTargetException CoreException CoreException getTargetException CoreException IStatus JDIDebugUIPlugin getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR LauncherMessages getString JREContainerResolution An_exception_occurred_while_updating_the_classpath _1 getTargetException InterruptedException
see org eclipse ui I Marker Resolution get Label public String get Label return Message Format format Launcher Messages get String JRE Container Resolution Select a system library to use when building  0  2 new String f Project get Element Name NON NLS 1  IMarkerResolution getLabel getLabel MessageFormat LauncherMessages getString JREContainerResolution Select_a_system_library_to_use_when_building_ _2 fProject getElementName

see org eclipse jface viewers I Label Provider get Text java lang Object public String get Text Object element if element instanceof I Java Element return I Java Element element get Element Name else if element instanceof Zip Entry Storage Zip Entry Storage storage Zip Entry Storage element return storage get Zip Entry get Name else if element instanceof Local File Storage Local File Storage storage Local File Storage element return storage get Name return super get Text element  ILabelProvider getText getText IJavaElement IJavaElement getElementName ZipEntryStorage ZipEntryStorage ZipEntryStorage getZipEntry getName LocalFileStorage LocalFileStorage LocalFileStorage getName getText
see org eclipse jface viewers I Label Provider get Image java lang Object public Image get Image Object element if element instanceof I Compilation Unit return JavaUI get Shared Images get Image org eclipse jdt ui I Shared Images IMG OBJS CUNIT else if element instanceof I Class File return JavaUI get Shared Images get Image org eclipse jdt ui I Shared Images IMG OBJS CFILE else if element instanceof Zip Entry Storage return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJ FILE else if element instanceof Local File Storage return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJ FILE return super get Image element  ILabelProvider getImage getImage ICompilationUnit getSharedImages getImage ISharedImages IMG_OBJS_CUNIT IClassFile getSharedImages getImage ISharedImages IMG_OBJS_CFILE ZipEntryStorage getWorkbench getSharedImages getImage ISharedImages IMG_OBJ_FILE LocalFileStorage getWorkbench getSharedImages getImage ISharedImages IMG_OBJ_FILE getImage

public String get Text Object element if element instanceof I Java Element I Java Element parent I Java Element element get Parent return f Java Labels get Text parent else if element instanceof Zip Entry Storage Zip Entry Storage storage Zip Entry Storage element Zip File zip File storage get Archive I Path path new Path zip File get Name I Runtime Classpath Entry entry Java Runtime new Archive Runtime Classpath Entry path I Resource res entry get Resource if res null external return zip File get Name else internal return res get Name else if element instanceof Local File Storage Local File Storage storage Local File Storage element File ext File storage get File return ext File get Parent return super get Text element  getText IJavaElement IJavaElement IJavaElement getParent fJavaLabels getText ZipEntryStorage ZipEntryStorage ZipEntryStorage ZipFile zipFile getArchive IPath zipFile getName IRuntimeClasspathEntry JavaRuntime newArchiveRuntimeClasspathEntry IResource getResource zipFile getName getName LocalFileStorage LocalFileStorage LocalFileStorage extFile getFile extFile getParent getText
public Image get Image Object element if element instanceof I Java Element I Java Element parent I Java Element element get Parent return f Java Labels get Image parent else if element instanceof Zip Entry Storage return Java Plugin Images get Java Plugin Images IMG OBJS JAR WSRC else if element instanceof Local File Storage return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJ FOLDER return super get Image element  getImage IJavaElement IJavaElement IJavaElement getParent fJavaLabels getImage ZipEntryStorage JavaPluginImages JavaPluginImages IMG_OBJS_JAR_WSRC LocalFileStorage getWorkbench getSharedImages getImage ISharedImages IMG_OBJ_FOLDER getImage
Constructs a new label provider public Source Element Qualifier Provider super f Java Labels new Java Element Label Provider  SourceElementQualifierProvider fJavaLabels JavaElementLabelProvider
public void dispose super dispose f Java Labels dispose f Java Labels null  fJavaLabels fJavaLabels

f Default Button set Font font f Default Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Default Button Selected  fDefaultButton setFont fDefaultButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleDefaultButtonSelected
f Duplicates Button set Font font f Duplicates Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt set Dirty true update Launch Configuration Dialog  fDuplicatesButton setFont fDuplicatesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setDirty updateLaunchConfigurationDialog
Creates and returns the source lookup control param parent the parent widget of this control public void create Control Composite parent Font font parent get Font Composite comp new Composite parent SWT NONE Grid Layout top Layout new Grid Layout top Layout num Columns 2 comp set Layout top Layout Grid Data gd new Grid Data Grid Data FILL BOTH comp set Layout Data gd Label viewer Label new Label comp SWT LEFT viewer Label set Text Launcher Messages get String Source Lookup Block Source Lookup Path  1 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 viewer Label set Layout Data gd viewer Label set Font font f Path Viewer new Runtime Classpath Viewer comp f Path Viewer add Entries Changed Listener this gd new Grid Data Grid Data FILL BOTH f Path Viewer get Control set Layout Data gd f Path Viewer get Control set Font font Composite path Button Comp new Composite comp SWT NONE Grid Layout path Button Layout new Grid Layout path Button Layout margin Height 0 path Button Layout margin Width 0 path Button Comp set Layout path Button Layout gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data HORIZONTAL ALIGN FILL path Button Comp set Layout Data gd path Button Comp set Font font create Vertical Spacer comp 2 f Default Button new Button comp SWT CHECK f Default Button set Text Launcher Messages get String Source Lookup Block Use defau lt source lookup path 1 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 f Default Button set Layout Data gd f Default Button set Font font f Default Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Default Button Selected f Duplicates Button new Button comp SWT CHECK f Duplicates Button set Text Launcher Messages get String Source Lookup Block Search for duplicate source files on path 1 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 f Duplicates Button set Layout Data gd f Duplicates Button set Font font f Duplicates Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt set Dirty true update Launch Configuration Dialog List advanced Actions new Array List 5 GC gc new GC parent gc set Font parent get Font Font Metrics font Metrics gc get Font Metrics gc dispose Runtime Classpath Action action new Move Up Action f Path Viewer Button button create Push Button path Button Comp action get Text font Metrics action set Button button action new Move Down Action f Path Viewer button create Push Button path Button Comp action get Text font Metrics action set Button button action new Remove Action f Path Viewer button create Push Button path Button Comp action get Text font Metrics action set Button button action new Add Project Action f Path Viewer button create Push Button path Button Comp action get Text font Metrics action set Button button action new Add Jar Action f Path Viewer button create Push Button path Button Comp action get Text font Metrics action set Button button action new Add External Jar Action f Path Viewer DIALOG SETTINGS PREFIX button create Push Button path Button Comp action get Text font Metrics action set Button button action new Add Folder Action f Path Viewer advanced Actions add action action new Add External Folder Action f Path Viewer DIALOG SETTINGS PREFIX advanced Actions add action action new Add Variable Action f Path Viewer advanced Actions add action action new Add Library Action null advanced Actions add action action new Attach Source Action f Path Viewer SWT RADIO advanced Actions add action I Action adv I Action advanced Actions to Array new I Action advanced Actions size action new Add Advanced Action f Path Viewer adv button create Push Button path Button Comp action get Text font Metrics action set Button button set Control comp  createControl getFont GridLayout topLayout GridLayout topLayout numColumns setLayout topLayout GridData GridData GridData FILL_BOTH setLayoutData viewerLabel viewerLabel setText LauncherMessages getString SourceLookupBlock Source_Lookup_Path__1 GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan viewerLabel setLayoutData viewerLabel setFont fPathViewer RuntimeClasspathViewer fPathViewer addEntriesChangedListener GridData GridData FILL_BOTH fPathViewer getControl setLayoutData fPathViewer getControl setFont pathButtonComp GridLayout pathButtonLayout GridLayout pathButtonLayout marginHeight pathButtonLayout marginWidth pathButtonComp setLayout pathButtonLayout GridData GridData VERTICAL_ALIGN_BEGINNING GridData HORIZONTAL_ALIGN_FILL pathButtonComp setLayoutData pathButtonComp setFont createVerticalSpacer fDefaultButton fDefaultButton setText LauncherMessages getString SourceLookupBlock Use_defau lt_source_lookup_path_1 GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan fDefaultButton setLayoutData fDefaultButton setFont fDefaultButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleDefaultButtonSelected fDuplicatesButton fDuplicatesButton setText LauncherMessages getString SourceLookupBlock Search_for_duplicate_source_files_on_path_1 GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan fDuplicatesButton setLayoutData fDuplicatesButton setFont fDuplicatesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setDirty updateLaunchConfigurationDialog advancedActions ArrayList setFont getFont FontMetrics fontMetrics getFontMetrics RuntimeClasspathAction MoveUpAction fPathViewer createPushButton pathButtonComp getText fontMetrics setButton MoveDownAction fPathViewer createPushButton pathButtonComp getText fontMetrics setButton RemoveAction fPathViewer createPushButton pathButtonComp getText fontMetrics setButton AddProjectAction fPathViewer createPushButton pathButtonComp getText fontMetrics setButton AddJarAction fPathViewer createPushButton pathButtonComp getText fontMetrics setButton AddExternalJarAction fPathViewer DIALOG_SETTINGS_PREFIX createPushButton pathButtonComp getText fontMetrics setButton AddFolderAction fPathViewer advancedActions AddExternalFolderAction fPathViewer DIALOG_SETTINGS_PREFIX advancedActions AddVariableAction fPathViewer advancedActions AddLibraryAction advancedActions AttachSourceAction fPathViewer advancedActions IAction IAction advancedActions toArray IAction advancedActions AddAdvancedAction fPathViewer createPushButton pathButtonComp getText fontMetrics setButton setControl
The default button has been toggled protected void handle Default Button Selected set Dirty true boolean def f Default Button get Selection if def try I Launch Configuration config get Launch Configuration I Launch Configuration Working Copy wc null if config is Working Copy wc I Launch Configuration Working Copy config else wc config get Working Copy perform Apply wc I Runtime Classpath Entry defs Java Runtime compute Unresolved Source Lookup Path wc f Path Viewer set Entries defs catch Core Exception e JDI DebugUI Plugin log e f Path Viewer set Enabled def update Launch Configuration Dialog  handleDefaultButtonSelected setDirty fDefaultButton getSelection ILaunchConfiguration getLaunchConfiguration ILaunchConfigurationWorkingCopy isWorkingCopy ILaunchConfigurationWorkingCopy getWorkingCopy performApply IRuntimeClasspathEntry JavaRuntime computeUnresolvedSourceLookupPath fPathViewer setEntries CoreException JDIDebugUIPlugin fPathViewer setEnabled updateLaunchConfigurationDialog
Creates and returns a button param parent parent widget param label label return Button protected Button create Push Button Composite parent String label Font Metrics font Metrics Button button new Button parent SWT PUSH button set Font parent get Font button set Text label Grid Data gd get Button Grid Data button font Metrics button set Layout Data gd return button  createPushButton FontMetrics fontMetrics setFont getFont setText GridData getButtonGridData fontMetrics setLayoutData
private Grid Data get Button Grid Data Button button Font Metrics font Metrics Grid Data gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING int width Hint Dialog convert HorizontalDL Us To Pixels font Metrics I Dialog Constants BUTTON WIDTH gd width Hint Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x gd height Hint Dialog convert VerticalDL Us To Pixels font Metrics I Dialog Constants BUTTON HEIGHT return gd  GridData getButtonGridData FontMetrics fontMetrics GridData GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING widthHint convertHorizontalDLUsToPixels fontMetrics IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize heightHint convertVerticalDLUsToPixels fontMetrics IDialogConstants BUTTON_HEIGHT
public void initialize From I Launch Configuration config boolean use Default true set Error Message null try use Default config get Attribute I Java Launch Configuration Constants ATTR DEFAULT SOURCE PATH true catch Core Exception e JDI DebugUI Plugin log e if config get Launch Configuration same as previously viewed launch config if use Default f Default Button get Selection If an explicit classpath is being used it must be the same as before No need to refresh set Dirty false return set Launch Configuration config f Default Button set Selection use Default try I Runtime Classpath Entry entries Java Runtime compute Unresolved Source Lookup Path config f Path Viewer set Entries entries catch Core Exception e set Error Message e get Message f Path Viewer set Enabled use Default f Path Viewer set Launch Configuration config try f Duplicates Button set Selection config get Attribute JavaUI Source Locator ATTR FIND ALL SOURCE ELEMENTS false catch Core Exception e JDI DebugUI Plugin log e set Dirty false  initializeFrom ILaunchConfiguration useDefault setErrorMessage useDefault getAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_SOURCE_PATH CoreException JDIDebugUIPlugin getLaunchConfiguration useDefault fDefaultButton getSelection setDirty setLaunchConfiguration fDefaultButton setSelection useDefault IRuntimeClasspathEntry JavaRuntime computeUnresolvedSourceLookupPath fPathViewer setEntries CoreException setErrorMessage getMessage fPathViewer setEnabled useDefault fPathViewer setLaunchConfiguration fDuplicatesButton setSelection getAttribute JavaUISourceLocator ATTR_FIND_ALL_SOURCE_ELEMENTS CoreException JDIDebugUIPlugin setDirty
public void perform Apply I Launch Configuration Working Copy configuration if is Dirty boolean def f Default Button get Selection if def configuration set Attribute I Java Launch Configuration Constants ATTR DEFAULT SOURCE PATH String null configuration set Attribute I Java Launch Configuration Constants ATTR SOURCE PATH List null else configuration set Attribute I Java Launch Configuration Constants ATTR DEFAULT SOURCE PATH def try I Runtime Classpath Entry entries f Path Viewer get Entries List mementos new Array List entries length for int i 0 i entries length i mementos add entries i get Memento configuration set Attribute I Java Launch Configuration Constants ATTR SOURCE PATH mementos catch Core Exception e JDI DebugUI Plugin error Dialog Launcher Messages get String Source Lookup Block Unable to save source lookup path 1 e NON NLS 1 boolean dup f Duplicates Button get Selection if dup configuration set Attribute JavaUI Source Locator ATTR FIND ALL SOURCE ELEMENTS true else configuration set Attribute JavaUI Source Locator ATTR FIND ALL SOURCE ELEMENTS String null  performApply ILaunchConfigurationWorkingCopy isDirty fDefaultButton getSelection setAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_SOURCE_PATH setAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH setAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_SOURCE_PATH IRuntimeClasspathEntry fPathViewer getEntries ArrayList getMemento setAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH CoreException JDIDebugUIPlugin errorDialog LauncherMessages getString SourceLookupBlock Unable_to_save_source_lookup_path_1 fDuplicatesButton getSelection setAttribute JavaUISourceLocator ATTR_FIND_ALL_SOURCE_ELEMENTS setAttribute JavaUISourceLocator ATTR_FIND_ALL_SOURCE_ELEMENTS
Returns the entries visible in the viewer public I Runtime Classpath Entry get Entries return f Path Viewer get Entries  IRuntimeClasspathEntry getEntries fPathViewer getEntries
Sets the configuration associated with this source lookup block param configuration launch configuration private void set Launch Configuration I Launch Configuration configuration f Config configuration  setLaunchConfiguration ILaunchConfiguration fConfig
Sets the configuration associated with this source lookup block param configuration launch configuration protected I Launch Configuration get Launch Configuration return f Config  ILaunchConfiguration getLaunchConfiguration fConfig
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Launcher Messages get String Source Lookup Block Source 1 NON NLS 1  ILaunchConfigurationTab getName getName LauncherMessages getString SourceLookupBlock Source_1
public void set Defaults I Launch Configuration Working Copy configuration configuration set Attribute I Java Launch Configuration Constants ATTR DEFAULT SOURCE PATH String null configuration set Attribute I Java Launch Configuration Constants ATTR SOURCE PATH List null configuration set Attribute JavaUI Source Locator ATTR FIND ALL SOURCE ELEMENTS String null  setDefaults ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_SOURCE_PATH setAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH setAttribute JavaUISourceLocator ATTR_FIND_ALL_SOURCE_ELEMENTS
protected void update Launch Configuration Dialog if get Launch Configuration Dialog null super update Launch Configuration Dialog  updateLaunchConfigurationDialog getLaunchConfigurationDialog updateLaunchConfigurationDialog
see org eclipse debug ui I Launch Configuration Tab dispose public void dispose f Path Viewer remove Entries Changed Listener this super dispose  ILaunchConfigurationTab fPathViewer removeEntriesChangedListener

fVM Arguments Text set Font font fVM Arguments Text add Modify Listener new Modify Listener public void modify Text Modify Event evt update Launch Configuration Dialog  fVMArgumentsText setFont fVMArgumentsText addModifyListener ModifyListener modifyText ModifyEvent updateLaunchConfigurationDialog
pgrm Arg Variable Button add Selection Listener new Selection Listener public void widget Selected Selection Event e String Variable Selection Dialog dialog new String Variable Selection Dialog get Shell dialog open String variable dialog get Variable Expression if variable null fVM Arguments Text append variable  pgrmArgVariableButton addSelectionListener SelectionListener widgetSelected SelectionEvent StringVariableSelectionDialog StringVariableSelectionDialog getShell getVariableExpression fVMArgumentsText
public void widget Default Selected Selection Event e  widgetDefaultSelected SelectionEvent
see org eclipse debug ui I Launch Configuration Tab create Control Composite public void create Control Composite parent Font font parent get Font Group group new Group parent SWT NONE set Control group Grid Layout top Layout new Grid Layout group set Layout top Layout Grid Data gd new Grid Data Grid Data FILL BOTH group set Layout Data gd group set Font font group set Text Launcher Messages get String Java Arguments Tab VM ar guments  6 NON NLS 1 fVM Arguments Text new Text group SWT MULTI SWT WRAP SWT BORDER SWT V SCROLL gd new Grid Data Grid Data FILL BOTH gd height Hint 40 gd width Hint 100 fVM Arguments Text set Layout Data gd fVM Arguments Text set Font font fVM Arguments Text add Modify Listener new Modify Listener public void modify Text Modify Event evt update Launch Configuration Dialog Control Accessible Listener add Listener fVM Arguments Text group get Text Button pgrm Arg Variable Button create Push Button group Launcher Messages get String VM Arguments Block 4 null NON NLS 1 pgrm Arg Variable Button set Font font pgrm Arg Variable Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END pgrm Arg Variable Button add Selection Listener new Selection Listener public void widget Selected Selection Event e String Variable Selection Dialog dialog new String Variable Selection Dialog get Shell dialog open String variable dialog get Variable Expression if variable null fVM Arguments Text append variable public void widget Default Selected Selection Event e  ILaunchConfigurationTab createControl createControl getFont setControl GridLayout topLayout GridLayout setLayout topLayout GridData GridData GridData FILL_BOTH setLayoutData setFont setText LauncherMessages getString JavaArgumentsTab VM_ar guments__6 fVMArgumentsText V_SCROLL GridData GridData FILL_BOTH heightHint widthHint fVMArgumentsText setLayoutData fVMArgumentsText setFont fVMArgumentsText addModifyListener ModifyListener modifyText ModifyEvent updateLaunchConfigurationDialog ControlAccessibleListener addListener fVMArgumentsText getText pgrmArgVariableButton createPushButton LauncherMessages getString VMArgumentsBlock pgrmArgVariableButton setFont pgrmArgVariableButton setLayoutData GridData GridData HORIZONTAL_ALIGN_END pgrmArgVariableButton addSelectionListener SelectionListener widgetSelected SelectionEvent StringVariableSelectionDialog StringVariableSelectionDialog getShell getVariableExpression fVMArgumentsText widgetDefaultSelected SelectionEvent
see org eclipse debug ui I Launch Configuration Tab set Defaults I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration configuration set Attribute I Java Launch Configuration Constants ATTR VM ARGUMENTS String null  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_VM_ARGUMENTS
see org eclipse debug ui I Launch Configuration Tab initialize From I Launch Configuration public void initialize From I Launch Configuration configuration try fVM Arguments Text set Text configuration get Attribute I Java Launch Configuration Constants ATTR VM ARGUMENTS NON NLS 1 catch Core Exception e set Error Message Launcher Messages get String Java Arguments Tab Exception occurred reading configuration   15 e get Status get Message NON NLS 1 JDI DebugUI Plugin log e  ILaunchConfigurationTab initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration fVMArgumentsText setText getAttribute IJavaLaunchConfigurationConstants ATTR_VM_ARGUMENTS CoreException setErrorMessage LauncherMessages getString JavaArgumentsTab Exception_occurred_reading_configuration___15 getStatus getMessage JDIDebugUIPlugin
see org eclipse debug ui I Launch Configuration Tab perform Apply I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy configuration configuration set Attribute I Java Launch Configuration Constants ATTR VM ARGUMENTS get Attribute Value From fVM Arguments Text  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_VM_ARGUMENTS getAttributeValueFrom fVMArgumentsText
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Launcher Messages get String VM Arguments Block VM Arguments NON NLS 1  ILaunchConfigurationTab getName getName LauncherMessages getString VMArgumentsBlock VM_Arguments
Retuns the string in the text widget or code null code if empty return text or code null code protected String get Attribute Value From Text text String content text get Text trim if content length 0 return content return null  getAttributeValueFrom getText
public void set Enabled boolean enabled fVM Arguments Text set Enabled enabled  setEnabled fVMArgumentsText setEnabled

JDI DebugUI Plugin get Standard Display sync Exec new Runnable public void run String title Launcher Messages get String VM Connect Timeout Status Handler Java Application 1 NON NLS 1 String message Launcher Messages get String jdk Launcher error timeout NON NLS 1 result 0 Message Dialog open Question JDI DebugUI Plugin get Active Workbench Shell title message  JDIDebugUIPlugin getStandardDisplay syncExec LauncherMessages getString VMConnectTimeoutStatusHandler Java_Application_1 LauncherMessages getString jdkLauncher MessageDialog openQuestion JDIDebugUIPlugin getActiveWorkbenchShell
see I Status Handler handle Status I Status Object public Object handle Status I Status status Object source final boolean result new boolean 1 JDI DebugUI Plugin get Standard Display sync Exec new Runnable public void run String title Launcher Messages get String VM Connect Timeout Status Handler Java Application 1 NON NLS 1 String message Launcher Messages get String jdk Launcher error timeout NON NLS 1 result 0 Message Dialog open Question JDI DebugUI Plugin get Active Workbench Shell title message return new Boolean result 0  IStatusHandler handleStatus IStatus handleStatus IStatus JDIDebugUIPlugin getStandardDisplay syncExec LauncherMessages getString VMConnectTimeoutStatusHandler Java_Application_1 LauncherMessages getString jdkLauncher MessageDialog openQuestion JDIDebugUIPlugin getActiveWorkbenchShell

private class Widget Listener extends Selection Adapter implements Modify Listener public void modify Text Modify Event e update Launch Configuration Dialog  WidgetListener SelectionAdapter ModifyListener modifyText ModifyEvent updateLaunchConfigurationDialog
public void widget Selected Selection Event e Object source e get Source if source f Workspace Button handle Workspace Dir Browse Button Selected else if source f File System Button handle Working Dir Browse Button Selected else if source f Use Default Working Dir Button handle Use Default Working Dir Button Selected else if source f Variables Button handle Working Dir Variables Button Selected  widgetSelected SelectionEvent getSource fWorkspaceButton handleWorkspaceDirBrowseButtonSelected fFileSystemButton handleWorkingDirBrowseButtonSelected fUseDefaultWorkingDirButton handleUseDefaultWorkingDirButtonSelected fVariablesButton handleWorkingDirVariablesButtonSelected
public void create Control Composite parent Font font parent get Font Group group new Group parent SWT NONE Workbench Help set Help group I Java Debug Help Context Ids WORKING DIRECTORY BLOCK Grid Layout working Dir Layout new Grid Layout working Dir Layout num Columns 2 working Dir Layout make Columns Equal Width false group set Layout working Dir Layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL group set Layout Data gd group set Font font set Control group group set Text Launcher Messages get String Working Directory Block 12 NON NLS 1 f Working Dir Text new Text group SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 f Working Dir Text set Layout Data gd f Working Dir Text set Font font f Working Dir Text add Modify Listener f Listener f Use Default Working Dir Button new Button group SWT CHECK f Use Default Working Dir Button set Text Launcher Messages get String Java Arguments Tab Use de fault working directory 4 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL f Use Default Working Dir Button set Layout Data gd f Use Default Working Dir Button set Font font f Use Default Working Dir Button add Selection Listener f Listener Composite button Comp new Composite group SWT NONE Grid Layout layout new Grid Layout 3 false layout margin Height 0 layout margin Width 0 button Comp set Layout layout gd new Grid Data Grid Data HORIZONTAL ALIGN END button Comp set Layout Data gd button Comp set Font font f Workspace Button create Push Button button Comp Launcher Messages get String Working Directory Block 0 null NON NLS 1 f Workspace Button add Selection Listener f Listener f File System Button create Push Button button Comp Launcher Messages get String Working Directory Block 1 null NON NLS 1 f File System Button add Selection Listener f Listener f Variables Button create Push Button button Comp Launcher Messages get String Working Directory Block 17 null NON NLS 1 f Variables Button add Selection Listener f Listener  createControl getFont WorkbenchHelp setHelp IJavaDebugHelpContextIds WORKING_DIRECTORY_BLOCK GridLayout workingDirLayout GridLayout workingDirLayout numColumns workingDirLayout makeColumnsEqualWidth setLayout workingDirLayout GridData GridData GridData FILL_HORIZONTAL setLayoutData setFont setControl setText LauncherMessages getString WorkingDirectoryBlock fWorkingDirText GridData GridData FILL_HORIZONTAL horizontalSpan fWorkingDirText setLayoutData fWorkingDirText setFont fWorkingDirText addModifyListener fListener fUseDefaultWorkingDirButton fUseDefaultWorkingDirButton setText LauncherMessages getString JavaArgumentsTab Use_de fault_working_directory_4 GridData GridData FILL_HORIZONTAL fUseDefaultWorkingDirButton setLayoutData fUseDefaultWorkingDirButton setFont fUseDefaultWorkingDirButton addSelectionListener fListener buttonComp GridLayout GridLayout marginHeight marginWidth buttonComp setLayout GridData GridData HORIZONTAL_ALIGN_END buttonComp setLayoutData buttonComp setFont fWorkspaceButton createPushButton buttonComp LauncherMessages getString WorkingDirectoryBlock fWorkspaceButton addSelectionListener fListener fFileSystemButton createPushButton buttonComp LauncherMessages getString WorkingDirectoryBlock fFileSystemButton addSelectionListener fListener fVariablesButton createPushButton buttonComp LauncherMessages getString WorkingDirectoryBlock fVariablesButton addSelectionListener fListener
see org eclipse debug ui I Launch Configuration Tab dispose public void dispose  ILaunchConfigurationTab
Show a dialog that lets the user select a working directory protected void handle Working Dir Browse Button Selected Directory Dialog dialog new Directory Dialog get Shell dialog set Message Launcher Messages get String Working Directory Block 7 NON NLS 1 String current Working Dir f Working Dir Text get Text if current Working Dir trim equals NON NLS 1 File path new File current Working Dir if path exists dialog set Filter Path current Working Dir String selected Directory dialog open if selected Directory null f Working Dir Text set Text selected Directory  handleWorkingDirBrowseButtonSelected DirectoryDialog DirectoryDialog getShell setMessage LauncherMessages getString WorkingDirectoryBlock currentWorkingDir fWorkingDirText getText currentWorkingDir currentWorkingDir setFilterPath currentWorkingDir selectedDirectory selectedDirectory fWorkingDirText setText selectedDirectory
Show a dialog that lets the user select a working directory from the workspace protected void handle Workspace Dir Browse Button Selected Container Selection Dialog dialog new Container Selection Dialog get Shell Resources Plugin get Workspace get Root false Launcher Messages get String Working Directory Block 4 NON NLS 1 I Container current Container get Container if current Container null I Path path current Container get Full Path dialog set Initial Selections new Object path dialog show Closed Projects false dialog open Object results dialog get Result if results null results length 0 results 0 instanceof I Path I Path path I Path results 0 String container Name path make Relative to String f Working Dir Text set Text workspace loc container Name NON NLS 1 NON NLS 2  handleWorkspaceDirBrowseButtonSelected ContainerSelectionDialog ContainerSelectionDialog getShell ResourcesPlugin getWorkspace getRoot LauncherMessages getString WorkingDirectoryBlock IContainer currentContainer getContainer currentContainer IPath currentContainer getFullPath setInitialSelections showClosedProjects getResult IPath IPath IPath containerName makeRelative toString fWorkingDirText setText workspace_loc containerName
Returns the selected workspace container or code null code protected I Container get Container String path f Working Dir Text get Text trim if path length 0 I Workspace Root root Resources Plugin get Workspace get Root I Resource res root find Member path if res instanceof I Container return I Container res return null  IContainer getContainer fWorkingDirText getText IWorkspaceRoot ResourcesPlugin getWorkspace getRoot IResource findMember IContainer IContainer
The default working dir check box has been toggled protected void handle Use Default Working Dir Button Selected boolean def is Default Working Directory if def set Default Working Dir f Working Dir Text set Enabled def f Workspace Button set Enabled def f Variables Button set Enabled def f File System Button set Enabled def  handleUseDefaultWorkingDirButtonSelected isDefaultWorkingDirectory setDefaultWorkingDir fWorkingDirText setEnabled fWorkspaceButton setEnabled fVariablesButton setEnabled fFileSystemButton setEnabled
protected void handle Working Dir Variables Button Selected String variable Text get Variable if variable Text null f Working Dir Text append variable Text  handleWorkingDirVariablesButtonSelected variableText getVariable variableText fWorkingDirText variableText
private String get Variable String Variable Selection Dialog dialog new String Variable Selection Dialog get Shell dialog open return dialog get Variable Expression  getVariable StringVariableSelectionDialog StringVariableSelectionDialog getShell getVariableExpression
Sets the default working directory protected void set Default Working Dir try I Launch Configuration config get Launch Configuration if config null I Java Project java Project Java Runtime get Java Project config if java Project null f Working Dir Text set Text workspace loc java Project get Path make Relative toOS String NON NLS 1 NON NLS 2 return catch Core Exception ce f Working Dir Text set Text System get Property user dir NON NLS 1  setDefaultWorkingDir ILaunchConfiguration getLaunchConfiguration IJavaProject javaProject JavaRuntime getJavaProject javaProject fWorkingDirText setText workspace_loc javaProject getPath makeRelative toOSString CoreException fWorkingDirText setText getProperty
public boolean is Valid I Launch Configuration config set Error Message null set Message null if variables are present we cannot resolve the directory String working Dir Path f Working Dir Text get Text trim if working Dir Path index Of 0 NON NLS 1 I String Variable Manager manager Variables Plugin get Default get String Variable Manager try manager validate String Variables working Dir Path catch Core Exception e set Error Message e get Message return false else if working Dir Path length 0 I Container container get Container if container null File dir new File working Dir Path if dir is Directory return true set Error Message Launcher Messages get String Working Directory Block 10 NON NLS 1 return false return true  isValid ILaunchConfiguration setErrorMessage setMessage workingDirPath fWorkingDirText getText workingDirPath indexOf IStringVariableManager VariablesPlugin getDefault getStringVariableManager validateStringVariables workingDirPath CoreException setErrorMessage getMessage workingDirPath IContainer getContainer workingDirPath isDirectory setErrorMessage LauncherMessages getString WorkingDirectoryBlock
Defaults are empty see org eclipse debug ui I Launch Configuration Tab set Defaults org eclipse debug core I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy config config set Attribute I Java Launch Configuration Constants ATTR WORKING DIRECTORY String null  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_WORKING_DIRECTORY
public void initialize From I Launch Configuration configuration set Launch Configuration configuration try String wd configuration get Attribute I Java Launch Configuration Constants ATTR WORKING DIRECTORY String null NON NLS 1 f Working Dir Text set Text NON NLS 1 if wd null f Use Default Working Dir Button set Selection true else f Working Dir Text set Text wd f Use Default Working Dir Button set Selection false handle Use Default Working Dir Button Selected catch Core Exception e set Error Message Launcher Messages get String Java Arguments Tab Exception occurred reading configuration   15 e get Status get Message NON NLS 1 JDI DebugUI Plugin log e  initializeFrom ILaunchConfiguration setLaunchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_WORKING_DIRECTORY fWorkingDirText setText fUseDefaultWorkingDirButton setSelection fWorkingDirText setText fUseDefaultWorkingDirButton setSelection handleUseDefaultWorkingDirButtonSelected CoreException setErrorMessage LauncherMessages getString JavaArgumentsTab Exception_occurred_reading_configuration___15 getStatus getMessage JDIDebugUIPlugin
public void perform Apply I Launch Configuration Working Copy configuration String wd null if is Default Working Directory wd get Attribute Value From f Working Dir Text configuration set Attribute I Java Launch Configuration Constants ATTR WORKING DIRECTORY wd  performApply ILaunchConfigurationWorkingCopy isDefaultWorkingDirectory getAttributeValueFrom fWorkingDirText setAttribute IJavaLaunchConfigurationConstants ATTR_WORKING_DIRECTORY
Retuns the string in the text widget or code null code if empty return text or code null code protected String get Attribute Value From Text text String content text get Text trim if content length 0 return content return null  getAttributeValueFrom getText
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return Launcher Messages get String Working Directory Block Working Directory 8 NON NLS 1  ILaunchConfigurationTab getName getName LauncherMessages getString WorkingDirectoryBlock Working_Directory_8
Returns whether the default working directory is to be used protected boolean is Default Working Directory return f Use Default Working Dir Button get Selection  isDefaultWorkingDirectory fUseDefaultWorkingDirButton getSelection
Sets the java project currently specified by the given launch config if any protected void set Launch Configuration I Launch Configuration config f Launch Configuration config  setLaunchConfiguration ILaunchConfiguration fLaunchConfiguration
Returns the current java project context protected I Launch Configuration get Launch Configuration return f Launch Configuration  ILaunchConfiguration getLaunchConfiguration fLaunchConfiguration

private I Progress Monitor f Progress Monitor public Workspace Operation Runner  IProgressMonitor fProgressMonitor WorkspaceOperationRunner
Sets the progress monitor param progress Monitor the progress monitor to set public void set Progress Monitor I Progress Monitor progress Monitor f Progress Monitor progress Monitor  progressMonitor setProgressMonitor IProgressMonitor progressMonitor fProgressMonitor progressMonitor
Returns the progress monitor It there is no progress monitor the monitor is set to the code Null Progress Monitor code return the progress monitor public I Progress Monitor get Progress Monitor if f Progress Monitor null f Progress Monitor new Null Progress Monitor return f Progress Monitor  NullProgressMonitor IProgressMonitor getProgressMonitor fProgressMonitor fProgressMonitor NullProgressMonitor fProgressMonitor
public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception if runnable instanceof I Scheduling Rule Provider run fork cancelable runnable I Scheduling Rule Provider runnable get Scheduling Rule else run fork cancelable runnable Resources Plugin get Workspace get Root  IRunnableWithProgress InvocationTargetException InterruptedException ISchedulingRuleProvider ISchedulingRuleProvider getSchedulingRule ResourcesPlugin getWorkspace getRoot
see org eclipse jface operation I Runnable Context run boolean boolean org eclipse jface operation I Runnable With Progress public void run boolean fork boolean cancelable I Runnable With Progress runnable I Scheduling Rule scheduling Rule throws Invocation Target Exception Interrupted Exception Workspace Modify Delegating Operation operation new Workspace Modify Delegating Operation runnable scheduling Rule operation run get Progress Monitor  IRunnableContext IRunnableWithProgress IRunnableWithProgress ISchedulingRule schedulingRule InvocationTargetException InterruptedException WorkspaceModifyDelegatingOperation WorkspaceModifyDelegatingOperation schedulingRule getProgressMonitor

Constructs an editor input for the given storage public Local File Storage Editor Input Local File Storage storage super storage  LocalFileStorageEditorInput LocalFileStorage
see org eclipse ui I Editor Input exists public boolean exists return Local File Storage get Storage get File exists  IEditorInput LocalFileStorage getStorage getFile

Creates a new message line as a child of the given parent public Message Line Composite parent this parent SWT LEFT  MessageLine
Creates a new message line as a child of the parent and with the given SWT stylebits public Message Line Composite parent int style super parent style f Normal Msg Area Background get Background  MessageLine fNormalMsgAreaBackground getBackground
private Image find Image I Status status if status isOK return null else if status matches I Status ERROR return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJS ERROR TSK else if status matches I Status WARNING return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJS WARN TSK else if status matches I Status INFO return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJS INFO TSK return null  findImage IStatus IStatus getWorkbench getSharedImages getImage ISharedImages IMG_OBJS_ERROR_TSK IStatus getWorkbench getSharedImages getImage ISharedImages IMG_OBJS_WARN_TSK IStatus getWorkbench getSharedImages getImage ISharedImages IMG_OBJS_INFO_TSK
Sets the message and image to the given status code null code is a valid argument and will set the empty text and no image public void set Error Status I Status status if status null status isOK String message status get Message if message null message length 0 set Text message set Image find Image status set Background J Face Colors get Error Background get Display return set Text NON NLS 1 set Image null set Background f Normal Msg Area Background  setErrorStatus IStatus getMessage setText setImage findImage setBackground JFaceColors getErrorBackground getDisplay setText setImage setBackground fNormalMsgAreaBackground

see org eclipse ui I Action Filter test Attribute Object String String public boolean test Attribute Object target String name String value if name equals Method Action Filter NON NLS 1 value equals is Abstract NON NLS 1 if target instanceof I Method I Method method I Method target try return Flags is Abstract method get Flags catch Java Model Exception e JDI DebugUI Plugin log e return false  IActionFilter testAttribute testAttribute MethodActionFilter isAbstract IMethod IMethod IMethod isAbstract getFlags JavaModelException JDIDebugUIPlugin

public Object f Child null protected Content Thread Wrapper I Java Thread thread Object parent f Thread thread f Parent parent  fChild ContentThreadWrapper IJavaThread fThread fParent
see java lang Object equals java lang Object public boolean equals Object obj if obj instanceof Content Thread Wrapper return false Content Thread Wrapper other Content Thread Wrapper obj return other f Thread equals f Thread  ContentThreadWrapper ContentThreadWrapper ContentThreadWrapper fThread fThread
see java lang Object hash Code public int hash Code return f Thread hash Code  hashCode hashCode fThread hashCode
public Object f Child null protected Content Monitor Wrapper I Java Object monitor Object parent f Monitor monitor f Parent parent  fChild ContentMonitorWrapper IJavaObject fMonitor fParent
see java lang Object equals java lang Object public boolean equals Object obj if obj instanceof Content Monitor Wrapper return false Content Monitor Wrapper other Content Monitor Wrapper obj return other f Monitor equals f Monitor  ContentMonitorWrapper ContentMonitorWrapper ContentMonitorWrapper fMonitor fMonitor
see java lang Object hash Code public int hash Code return f Monitor hash Code  hashCode hashCode fMonitor hashCode
see org eclipse jface viewers I Tree Content Provider get Children Object public Object get Children Object parent Element Object object null if parent Element instanceof Content Thread Wrapper object Content Thread Wrapper parent Element f Child else if parent Element instanceof Content Monitor Wrapper object Content Monitor Wrapper parent Element f Child if object null return new Object object return null  ITreeContentProvider getChildren getChildren parentElement parentElement ContentThreadWrapper ContentThreadWrapper parentElement fChild parentElement ContentMonitorWrapper ContentMonitorWrapper parentElement fChild
see org eclipse jface viewers I Tree Content Provider get Parent Object public Object get Parent Object element if element instanceof Content Thread Wrapper return Content Thread Wrapper element f Parent else if element instanceof Content Monitor Wrapper return Content Monitor Wrapper element f Parent return null  ITreeContentProvider getParent getParent ContentThreadWrapper ContentThreadWrapper fParent ContentMonitorWrapper ContentMonitorWrapper fParent
see org eclipse jface viewers I Tree Content Provider has Children Object public boolean has Children Object element if element instanceof Content Thread Wrapper return Content Thread Wrapper element f Child null else if element instanceof Content Monitor Wrapper return Content Monitor Wrapper element f Child null return false  ITreeContentProvider hasChildren hasChildren ContentThreadWrapper ContentThreadWrapper fChild ContentMonitorWrapper ContentMonitorWrapper fChild
see org eclipse jface viewers I Structured Content Provider get Elements Object public Object get Elements Object input Element if f Roots null Monitor Manager manager Monitor Manager input Element int num Dead Locks manager get Number Of Deadlocks the list of roots elements f Roots new Object num Dead Locks for int i 0 i num Dead Locks i all the root elements are Content Thread Wrapper Content Thread Wrapper root Wrapper new Content Thread Wrapper manager get Start Thread i null List deadlock List manager get Deadlock List i Map tree new Hash Map deadlock List size tree put root Wrapper root Wrapper build Deadlock Tree root Wrapper tree root Wrapper deadlock List f Roots i root Wrapper return f Roots  IStructuredContentProvider getElements getElements inputElement fRoots MonitorManager MonitorManager inputElement numDeadLocks getNumberOfDeadlocks fRoots numDeadLocks numDeadLocks ContentThreadWrapper ContentThreadWrapper rootWrapper ContentThreadWrapper getStartThread deadlockList getDeadlockList HashMap deadlockList rootWrapper rootWrapper buildDeadlockTree rootWrapper rootWrapper deadlockList fRoots rootWrapper fRoots
protected void build Deadlock Tree Content Thread Wrapper ctw Map tree Object parent List deadlock List Object next Object object Object in Tree List child Finder new Array List deadlock List size for int j 1 j deadlock List size j next deadlock List get j if next instanceof I Java Object object new Content Monitor Wrapper I Java Object next parent else object new Content Thread Wrapper I Java Thread next parent if j 1 ctw f Child object in Tree tree get object if in Tree instanceof Content Thread Wrapper Content Thread Wrapper in Tree caught InA Dead Lock true Content Thread Wrapper object caught InA Dead Lock true else if in Tree null tree put object object parent object child Finder add object for int j 0 j child Finder size 1 j Object element child Finder get j if element instanceof Content Monitor Wrapper Content Monitor Wrapper element f Child child Finder get j 1 else Content Thread Wrapper element f Child child Finder get j 1  buildDeadlockTree ContentThreadWrapper deadlockList inTree childFinder ArrayList deadlockList deadlockList deadlockList IJavaObject ContentMonitorWrapper IJavaObject ContentThreadWrapper IJavaThread fChild inTree inTree ContentThreadWrapper ContentThreadWrapper inTree caughtInADeadLock ContentThreadWrapper caughtInADeadLock inTree childFinder childFinder childFinder ContentMonitorWrapper ContentMonitorWrapper fChild childFinder ContentThreadWrapper fChild childFinder
see org eclipse jface viewers I Content Provider dispose public void dispose Monitor Manager get Default remove Deadlock Update Listener  IContentProvider MonitorManager getDefault removeDeadlockUpdateListener
see org eclipse jface viewers I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input Monitor Manager get Default add Deadlock Update Listener this  IContentProvider inputChanged inputChanged oldInput newInput MonitorManager getDefault addDeadlockUpdateListener
protected void clear Deadlock Information f Roots null  clearDeadlockInformation fRoots

Returns the current selection in the debug view or code null code if there is no selection return I Structured Selection protected I Structured Selection get Debug View Selection if f View null I Selection s f View get View Site get Page get Selection I DebugUI Constants ID DEBUG VIEW if s instanceof I Structured Selection return I Structured Selection s return null  IStructuredSelection IStructuredSelection getDebugViewSelection fView ISelection fView getViewSite getPage getSelection IDebugUIConstants ID_DEBUG_VIEW IStructuredSelection IStructuredSelection
protected I Java Debug Target get Debug Target I Structured Selection ss get Debug View Selection if ss null ss is Empty ss size 1 return null Object element ss get First Element if element instanceof I Debug Element return I Java Debug Target I Debug Element element get Debug Target get Adapter I Java Debug Target class return null  IJavaDebugTarget getDebugTarget IStructuredSelection getDebugViewSelection isEmpty getFirstElement IDebugElement IJavaDebugTarget IDebugElement getDebugTarget getAdapter IJavaDebugTarget
see org eclipse ui I View Action Delegate init I View Part public void init I View Part view f View Monitors View view f View add this  IViewActionDelegate IViewPart IViewPart fView MonitorsView fView
see org eclipse ui I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection f Action action  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection fAction

Constructor private Monitor Manager see get Default f Thread To Owned Monitors new Hashtable 4 f Thread To Contended Monitor new Hashtable 4 f Monitor To Owning Thread new Hashtable f Monitor To Contending Threads new Hashtable f Dead Lock Lists new Array List  MonitorManager getDefault fThreadToOwnedMonitors fThreadToContendedMonitor fMonitorToOwningThread fMonitorToContendingThreads fDeadLockLists ArrayList
public static Monitor Manager get Default if fg Default null fg Default new Monitor Manager return fg Default  MonitorManager getDefault fgDefault fgDefault MonitorManager fgDefault
Adds the the monitors owned by the thread If the list is code null code remove the thread from the mappings param thread The thread param monitors The monitors owned by the thread protected void add Thread With Owned Monitors I Java Thread thread I Java Object monitors if monitors null f Thread To Owned Monitors remove thread else f Thread To Owned Monitors put thread monitors  addThreadWithOwnedMonitors IJavaThread IJavaObject fThreadToOwnedMonitors fThreadToOwnedMonitors
Adds the monitor contended by the thread If the list is code null code remove the thread from the mappings param thread The thread param monitor The monitor contended by the thread protected void add Thread With Contended Monitor I Java Thread thread I Java Object monitor if monitor null f Thread To Contended Monitor remove thread else f Thread To Contended Monitor put thread monitor  addThreadWithContendedMonitor IJavaThread IJavaObject fThreadToContendedMonitor fThreadToContendedMonitor
Adds the thread owning the monitor If the list is code null code remove the monitor from the mappings param monitor The monitor param thread The thread owning the monitor protected void add Monitor With Owning Thread I Java Object monitor I Java Thread thread if monitor null f Monitor To Owning Thread remove monitor else f Monitor To Owning Thread put monitor thread  addMonitorWithOwningThread IJavaObject IJavaThread fMonitorToOwningThread fMonitorToOwningThread
Adds a thread waiting for the monitor If the list is code null code remove the monitors from the mappings param monitor The monitor param thread The thread waiting for the monitor protected void add Monitor With Contended Thread I Java Object monitor I Java Thread thread if monitor null f Monitor To Contending Threads remove monitor else List threads List f Monitor To Contending Threads get monitor if threads null threads new Array List f Monitor To Contending Threads put monitor threads threads add thread  addMonitorWithContendedThread IJavaObject IJavaThread fMonitorToContendingThreads fMonitorToContendingThreads ArrayList fMonitorToContendingThreads
Returns the monitors owned by the given thread or code null code if the thread does not own any monitors param thread The thread owning the monitors return The monitors owned by the given thread public I Java Object get Owned Monitors I Java Thread thread return I Java Object f Thread To Owned Monitors get thread  IJavaObject getOwnedMonitors IJavaThread IJavaObject fThreadToOwnedMonitors
Returns the monitor contended by the given thread or code null code param thread The thread from to determine the contended monitor return The monitor contended by the given thread public I Java Object get Contended Monitor I Java Thread thread return I Java Object f Thread To Contended Monitor get thread  IJavaObject getContendedMonitor IJavaThread IJavaObject fThreadToContendedMonitor
Returns the thread owning the given monitor or code null code if no thread owns the specified monitor param monitor The monitor from to determine the owning thread return The thread owning the given monitor public I Java Thread get Owning Thread I Java Object monitor return I Java Thread f Monitor To Owning Thread get monitor  IJavaThread getOwningThread IJavaObject IJavaThread fMonitorToOwningThread
Returns the list of threads awaiting the given monitor or code null code param monitor The monitor from to determine the contending threads return List a list of the threads in contention for the monitor public List get Contending Threads I Java Object monitor Object obj f Monitor To Contending Threads get monitor return List obj  getContendingThreads IJavaObject fMonitorToContendingThreads
Returns all the threads owning or waiting on a monitor return All the threads owning or waiting on a monitor public I Java Thread get Threads Set all new Hash Set all add All f Thread To Contended Monitor key Set all add All f Thread To Owned Monitors key Set return I Java Thread all to Array new I Java Thread all size  IJavaThread getThreads HashSet addAll fThreadToContendedMonitor keySet addAll fThreadToOwnedMonitors keySet IJavaThread toArray IJavaThread
Returns all the monitors owned or in contention return All the monitors owned or in contention public I Java Object get Monitors Set all new Hash Set all add All f Monitor To Contending Threads key Set all add All f Monitor To Owning Thread key Set return I Java Object all to Array new I Java Object all size  IJavaObject getMonitors HashSet addAll fMonitorToContendingThreads keySet addAll fMonitorToOwningThread keySet IJavaObject toArray IJavaObject
Updates the data on threads monitors and deadlocks for the specified debug target param target The debug target public void update I Java Debug Target target remove Monitor Information target if target supports Monitor Information return if f Deadlock Update Listener null f Deadlock Update Listener clear Deadlock Information update target true  IJavaDebugTarget removeMonitorInformation supportsMonitorInformation fDeadlockUpdateListener fDeadlockUpdateListener clearDeadlockInformation
Updates the data on threads monitors and deadlocks for the suspended threads contained within the specified debug target param target The debug target see update I Java Debug Target target public void update Partial I Java Debug Target target remove Monitor Information target if target supports Monitor Information return if f Deadlock Update Listener null f Deadlock Update Listener clear Deadlock Information update target false  IJavaDebugTarget updatePartial IJavaDebugTarget removeMonitorInformation supportsMonitorInformation fDeadlockUpdateListener fDeadlockUpdateListener clearDeadlockInformation
Updates the data on threads monitors and deadlocks for the suspended threads contained within the specified debug target If code suspend Threads code all the non system threads are suspended param target The debug target param whether to suspend the threads private void update I Java Debug Target target boolean suspend Threads try construct the list of all the non system threads I Thread thread Result target get Threads List threads List new Array List thread Result length I Java Thread thread for int i 0 i thread Result length i thread I Java Thread thread Result i threads List add thread I Java Thread threads I Java Thread threads List to Array new I Java Thread threads List size if suspend Threads suspend all the non system threads suspend threads updating data on owning threads owned monitors and contending threads contended monitors for int i 0 i threads length i thread threads i update Monitors thread all of the monitor information is needed before the deadlock information can be calculated for int i 0 i threads length i thread threads i update Deadlock thread catch Debug Exception e  suspendThreads IJavaDebugTarget suspendThreads IThread threadResult getThreads threadsList ArrayList threadResult IJavaThread threadResult IJavaThread threadResult threadsList IJavaThread IJavaThread threadsList toArray IJavaThread threadsList suspendThreads updateMonitors updateDeadlock DebugException
private void update Deadlock I Java Thread thread updating data on deadlocks List l list To Deadlock thread new Array List 4 if thread is caught in a deadlock l will be the list showing this deadlock if l null Thread Wrapper tw new Thread Wrapper thread l adding this deadlock list f Dead Lock Lists add tw  updateDeadlock IJavaThread listToDeadlock ArrayList ThreadWrapper ThreadWrapper fDeadLockLists
private void update Monitors I Java Thread thread throws Debug Exception I Java Object owned Monitors I Java Object current Contended Monitor I Java Object monitor owned Monitors thread get Owned Monitors current Contended Monitor thread get Contended Monitor owning threads owned monitors if thread has Owned Monitors add Thread With Owned Monitors thread owned Monitors for int j 0 j owned Monitors length j monitor owned Monitors j add Monitor With Owning Thread monitor thread contending threads contended monitors if current Contended Monitor null add Thread With Contended Monitor thread current Contended Monitor add Monitor With Contended Thread current Contended Monitor thread  updateMonitors IJavaThread DebugException IJavaObject ownedMonitors IJavaObject currentContendedMonitor IJavaObject ownedMonitors getOwnedMonitors currentContendedMonitor getContendedMonitor hasOwnedMonitors addThreadWithOwnedMonitors ownedMonitors ownedMonitors ownedMonitors addMonitorWithOwningThread currentContendedMonitor addThreadWithContendedMonitor currentContendedMonitor addMonitorWithContendedThread currentContendedMonitor
Suspend all the given threads param The list of threads to suspend private void suspend I Java Thread threads try for int i 0 i threads length i I Java Thread thread threads i if thread is Suspended thread suspend while thread is Suspended Thread sleep 100 catch Debug Exception e JDI DebugUI Plugin log e catch Interrupted Exception e JDI DebugUI Plugin log e  IJavaThread IJavaThread isSuspended isSuspended DebugException JDIDebugUIPlugin InterruptedException JDIDebugUIPlugin
Clears all the cached monitor information for the specified target param target The target to remove the cached information for public void remove Monitor Information I Java Debug Target target f Thread To Owned Monitors clear f Thread To Contended Monitor clear f Monitor To Owning Thread clear f Monitor To Contending Threads clear f Dead Lock Lists clear if f Deadlock Update Listener null f Deadlock Update Listener clear Deadlock Information  removeMonitorInformation IJavaDebugTarget fThreadToOwnedMonitors fThreadToContendedMonitor fMonitorToOwningThread fMonitorToContendingThreads fDeadLockLists fDeadlockUpdateListener fDeadlockUpdateListener clearDeadlockInformation
If the thread is in a deadlock returns the list to the deadlock This list has the following structure ul li First element Thread in the deadlock or waiting on a monitor that is involved in a deadlock li li Second element Monitor contended by the first element li li Third element Thread owning the second element li li Fourth element Monitor contended by the third element li li li li Last element Same element as the first one proving that it is in a deadlock li ul param thread The thread we want to get the list of param thread Tree The list that records the element already used call with an empty list return The deadlock list private List list To Deadlock I Java Thread thread List used Threads List List res new Array List I Java Object contended Monitor I Java Object f Thread To Contended Monitor get thread if the thread is waiting for one monitor if contended Monitor null I Java Thread owning Thread I Java Thread f Monitor To Owning Thread get contended Monitor check if owning Thread has already been used and therefore is already in the given list if owning Thread has already been used returns the end of the list if used Threads List contains owning Thread res add thread res add contended Monitor res add owning Thread return res if owning Thread has not already been used else List new Used Threads List new Array List used Threads List adding current thread to the new used list new Used Threads List add thread if owning Thread null return null recursive call one level lower in the deadlock list List new Res list To Deadlock owning Thread new Used Threads List if new Res null res add thread res add contended Monitor res add All new Res return res else if the thread is not waiting for any monitor return null return null  threadTree listToDeadlock IJavaThread usedThreadsList ArrayList IJavaObject contendedMonitor IJavaObject fThreadToContendedMonitor contendedMonitor IJavaThread owningThread IJavaThread fMonitorToOwningThread contendedMonitor owningThread owningThread usedThreadsList owningThread contendedMonitor owningThread owningThread newUsedThreadsList ArrayList usedThreadsList newUsedThreadsList owningThread newRes listToDeadlock owningThread newUsedThreadsList newRes contendedMonitor addAll newRes
Returns the number of determined deadlocks return List a list of all of the listings of current deadlocks public int get Number Of Deadlocks return f Dead Lock Lists size  getNumberOfDeadlocks fDeadLockLists
Returns the deadlock list at the specified index or code null code if the index is greater than the number of detected deadlocks return List a list of all of the listings of current deadlocks see get Number Of Deadlocks public List get Deadlock List int index if index f Dead Lock Lists size return null return Thread Wrapper f Dead Lock Lists get index get Dead Lock List  getNumberOfDeadlocks getDeadlockList fDeadLockLists ThreadWrapper fDeadLockLists getDeadLockList
Returns the thread that is at the root of the deadlock at the specified index or code null code if the index is greater than the number of detected deadlocks return I Java Thread the thread at the root of the deadlock see get Number Of Deadlocks public I Java Thread get Start Thread int index if index f Dead Lock Lists size return null return Thread Wrapper f Dead Lock Lists get index get Start Thread  IJavaThread getNumberOfDeadlocks IJavaThread getStartThread fDeadLockLists ThreadWrapper fDeadLockLists getStartThread
Returns whether the given thread is caught in a deadlock param thread The thread to check if in deadlock return code true code if the thread is in a deadlock code false code otherwise public boolean is Caught In Deadlock I Java Thread thread for int i 0 i f Dead Lock Lists size i if Thread Wrapper f Dead Lock Lists get i get Start Thread equals thread return true return false  isCaughtInDeadlock IJavaThread fDeadLockLists ThreadWrapper fDeadLockLists getStartThread
protected void add Deadlock Update Listener Dead Locks View Content Provider provider f Deadlock Update Listener provider  addDeadlockUpdateListener DeadLocksViewContentProvider fDeadlockUpdateListener
protected void remove Deadlock Update Listener f Deadlock Update Listener null  removeDeadlockUpdateListener fDeadlockUpdateListener

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Monitor Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME MonitorMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

see I Debug Model Presentation compute Detail I Value I Value Detail Listener public void compute Detail I Value value I Value Detail Listener listener  IDebugModelPresentation computeDetail IValue IValueDetailListener computeDetail IValue IValueDetailListener
see I Debug Model Presentation get Text Object public String get Text Object item if item instanceof Dead Locks View Content Provider Content Thread Wrapper return get Thread Dead Lock Text Dead Locks View Content Provider Content Thread Wrapper item else if item instanceof Dead Locks View Content Provider Content Monitor Wrapper String Buffer res new String Buffer res append Dead Locks View Content Provider Content Monitor Wrapper item f Monitor to String res append Monitor Messages get String Monitor Model Presentation  owned by  1 NON NLS 1 return res to String else if item instanceof I Java Object return get Monitor Text I Java Object item else if item instanceof I Java Thread return get Thread Text I Java Thread item else if item instanceof Threads View Content Provider Monitor Wrapper return get Monitor Wrapper Text Threads View Content Provider Monitor Wrapper item else if item instanceof Monitors View Content Provider Thread Wrapper return get Thread Wrapper Monitor Text Monitors View Content Provider Thread Wrapper item else if item instanceof Threads View Content Provider Thread Wrapper return get Thread Wrapper Thread Text Threads View Content Provider Thread Wrapper item else return Monitor Messages get String Monitor Model Presentation unsuported type 1 NON NLS 1  IDebugModelPresentation getText getText DeadLocksViewContentProvider ContentThreadWrapper getThreadDeadLockText DeadLocksViewContentProvider ContentThreadWrapper DeadLocksViewContentProvider ContentMonitorWrapper StringBuffer StringBuffer DeadLocksViewContentProvider ContentMonitorWrapper fMonitor toString MonitorMessages getString MonitorModelPresentation _owned_by _1 toString IJavaObject getMonitorText IJavaObject IJavaThread getThreadText IJavaThread ThreadsViewContentProvider MonitorWrapper getMonitorWrapperText ThreadsViewContentProvider MonitorWrapper MonitorsViewContentProvider ThreadWrapper getThreadWrapperMonitorText MonitorsViewContentProvider ThreadWrapper ThreadsViewContentProvider ThreadWrapper getThreadWrapperThreadText ThreadsViewContentProvider ThreadWrapper MonitorMessages getString MonitorModelPresentation unsuported_type_1
Text for a Thread Wrapper in Dead Locks View Content Provider protected String get Thread Dead Lock Text Dead Locks View Content Provider Content Thread Wrapper thread String Buffer res new String Buffer try res append thread f Thread get Name catch Debug Exception e if thread caught InA Dead Lock res append Monitor Messages get String Monitor Model Presentation   caught in the deadlock  2 NON NLS 1 else res append Monitor Messages get String Monitor Model Presentation  waiting for  2 NON NLS 1 return res to String  ThreadWrapper DeadLocksViewContentProvider getThreadDeadLockText DeadLocksViewContentProvider ContentThreadWrapper StringBuffer StringBuffer fThread getName DebugException caughtInADeadLock MonitorMessages getString MonitorModelPresentation _ caught_in_the_deadlock _2 MonitorMessages getString MonitorModelPresentation _waiting_for _2 toString
Text for monitors protected String get Monitor Text I Java Object monitor return monitor to String  getMonitorText IJavaObject toString
Text for Monitor Wrapper in Threads View Content Provider protected String get Monitor Wrapper Text Threads View Content Provider Monitor Wrapper monitor String Buffer res new String Buffer monitor monitor to String if monitor state Threads View Content Provider Monitor Wrapper OWNED MONITOR res append Monitor Messages get String Monitor Model Presentation   owned  4 NON NLS 1 else if monitor state Threads View Content Provider Monitor Wrapper CONTENDED MONITOR res append Monitor Messages get String Monitor Model Presentation   contended  5 NON NLS 1 return res to String  MonitorWrapper ThreadsViewContentProvider getMonitorWrapperText ThreadsViewContentProvider MonitorWrapper StringBuffer StringBuffer toString ThreadsViewContentProvider MonitorWrapper OWNED_MONITOR MonitorMessages getString MonitorModelPresentation _ _4 ThreadsViewContentProvider MonitorWrapper CONTENDED_MONITOR MonitorMessages getString MonitorModelPresentation _ _5 toString
Text for Thread Wrapper in Threads View Content Provider protected String get Thread Wrapper Thread Text Threads View Content Provider Thread Wrapper thread String Buffer res new String Buffer try res append thread thread get Name catch Debug Exception e if thread is Caught In Deadlock res append Monitor Messages get String Monitor Model Presentation   caught in a deadlock  6 NON NLS 1 return res to String  ThreadWrapper ThreadsViewContentProvider getThreadWrapperThreadText ThreadsViewContentProvider ThreadWrapper StringBuffer StringBuffer getName DebugException isCaughtInDeadlock MonitorMessages getString MonitorModelPresentation _ caught_in_a_deadlock _6 toString
Text for Thread Wrapper in Monitors View Content Provider protected String get Thread Wrapper Monitor Text Monitors View Content Provider Thread Wrapper thread String Buffer res new String Buffer try res append thread thread get Name catch Debug Exception e if thread state Monitors View Content Provider Thread Wrapper OWNING THREAD res append Monitor Messages get String Monitor Model Presentation   owning  7 NON NLS 1 else if thread state Monitors View Content Provider Thread Wrapper IN CONTENTION FOR MONITOR res append Monitor Messages get String Monitor Model Presentation   contending  8 NON NLS 1 return res to String  ThreadWrapper MonitorsViewContentProvider getThreadWrapperMonitorText MonitorsViewContentProvider ThreadWrapper StringBuffer StringBuffer getName DebugException MonitorsViewContentProvider ThreadWrapper OWNING_THREAD MonitorMessages getString MonitorModelPresentation _ _7 MonitorsViewContentProvider ThreadWrapper IN_CONTENTION_FOR_MONITOR MonitorMessages getString MonitorModelPresentation _ _8 toString
Text for threads protected String get Thread Text I Java Thread thread String Buffer res new String Buffer try res append thread get Name catch Debug Exception e return res to String  getThreadText IJavaThread StringBuffer StringBuffer getName DebugException toString
Maps an element to an appropriate image see I Debug Model Presentation get Image Object public Image get Image Object item if item instanceof Threads View Content Provider Thread Wrapper return get Thread Wrapper Thread Image Threads View Content Provider Thread Wrapper item thread else if item instanceof Threads View Content Provider Monitor Wrapper Threads View Content Provider Monitor Wrapper monitor Wrapper Threads View Content Provider Monitor Wrapper item JDI Image Descriptor descriptor null int flags compute Monitor Adornment Flags monitor Wrapper descriptor new JDI Image Descriptor Java Debug Images DESC OBJ MONITOR flags return f Debug Image Registry get descriptor else if item instanceof Monitors View Content Provider Thread Wrapper Monitors View Content Provider Thread Wrapper thread Wrapper Monitors View Content Provider Thread Wrapper item JDI Image Descriptor descriptor null int flags compute Thread Adornment Flags thread Wrapper if thread Wrapper thread is Suspended descriptor new JDI Image Descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS THREAD SUSPENDED flags else descriptor new JDI Image Descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS THREAD RUNNING flags return f Debug Image Registry get descriptor else if item instanceof I Java Object return get Monitor Image else if item instanceof Dead Locks View Content Provider Content Monitor Wrapper return get Monitor Image else if item instanceof Dead Locks View Content Provider Content Thread Wrapper return get Thread Wrapper Thread Image Dead Locks View Content Provider Content Thread Wrapper item f Thread return null  IDebugModelPresentation getImage getImage ThreadsViewContentProvider ThreadWrapper getThreadWrapperThreadImage ThreadsViewContentProvider ThreadWrapper ThreadsViewContentProvider MonitorWrapper ThreadsViewContentProvider MonitorWrapper monitorWrapper ThreadsViewContentProvider MonitorWrapper JDIImageDescriptor computeMonitorAdornmentFlags monitorWrapper JDIImageDescriptor JavaDebugImages DESC_OBJ_MONITOR fDebugImageRegistry MonitorsViewContentProvider ThreadWrapper MonitorsViewContentProvider ThreadWrapper threadWrapper MonitorsViewContentProvider ThreadWrapper JDIImageDescriptor computeThreadAdornmentFlags threadWrapper threadWrapper isSuspended JDIImageDescriptor DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_THREAD_SUSPENDED JDIImageDescriptor DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_THREAD_RUNNING fDebugImageRegistry IJavaObject getMonitorImage DeadLocksViewContentProvider ContentMonitorWrapper getMonitorImage DeadLocksViewContentProvider ContentThreadWrapper getThreadWrapperThreadImage DeadLocksViewContentProvider ContentThreadWrapper fThread
Image for a Thread Wrapper in Threads View Content Provider private Image get Thread Wrapper Thread Image I Java Thread thread Image Descriptor descriptor null if thread is Suspended descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS THREAD SUSPENDED else descriptor DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS THREAD RUNNING return f Debug Image Registry get descriptor  ThreadWrapper ThreadsViewContentProvider getThreadWrapperThreadImage IJavaThread ImageDescriptor isSuspended DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_THREAD_SUSPENDED DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_THREAD_RUNNING fDebugImageRegistry
Image for monitors private Image get Monitor Image return f Debug Image Registry get Java Debug Images DESC OBJ MONITOR  getMonitorImage fDebugImageRegistry JavaDebugImages DESC_OBJ_MONITOR
see I Debug Model Presentation get Editor Input Object public I Editor Input get Editor Input Object item return null  IDebugModelPresentation getEditorInput IEditorInput getEditorInput
see I Debug Model Presentation get Editor Id I Editor Input Object public String get Editor Id I Editor Input input Object input Object return null  IDebugModelPresentation getEditorId IEditorInput getEditorId IEditorInput inputObject
see I Debug Model Presentation set Attribute String Object public void set Attribute String id Object value  IDebugModelPresentation setAttribute setAttribute
Returns the adornment flags for the monitor These flags are used to render appropriate overlay icons for the monitor private int compute Monitor Adornment Flags Threads View Content Provider Monitor Wrapper wrapper int flags 0 if wrapper state Threads View Content Provider Monitor Wrapper CONTENDED MONITOR flags JDI Image Descriptor CONTENTED MONITOR if wrapper state Threads View Content Provider Monitor Wrapper OWNED MONITOR flags JDI Image Descriptor OWNED MONITOR return flags  computeMonitorAdornmentFlags ThreadsViewContentProvider MonitorWrapper ThreadsViewContentProvider MonitorWrapper CONTENDED_MONITOR JDIImageDescriptor CONTENTED_MONITOR ThreadsViewContentProvider MonitorWrapper OWNED_MONITOR JDIImageDescriptor OWNED_MONITOR
Returns the adornment flags for the thread These flags are used to render appropriate overlay icons for the thread private int compute Thread Adornment Flags Monitors View Content Provider Thread Wrapper wrapper int flags 0 if wrapper state Monitors View Content Provider Thread Wrapper IN CONTENTION FOR MONITOR flags JDI Image Descriptor IN CONTENTION FOR MONITOR if wrapper state Monitors View Content Provider Thread Wrapper OWNING THREAD flags JDI Image Descriptor OWNS MONITOR return flags  computeThreadAdornmentFlags MonitorsViewContentProvider ThreadWrapper MonitorsViewContentProvider ThreadWrapper IN_CONTENTION_FOR_MONITOR JDIImageDescriptor IN_CONTENTION_FOR_MONITOR MonitorsViewContentProvider ThreadWrapper OWNING_THREAD JDIImageDescriptor OWNS_MONITOR

public void run I Action action I Java Debug Target target get Debug Target if target null return try I Thread threads target get Threads for int i 0 i threads length i I Thread thread threads i if thread is Suspended thread resume while thread is Suspended Thread sleep 100 catch Debug Exception e JDI DebugUI Plugin log e catch Interrupted Exception e JDI DebugUI Plugin log e  IAction IJavaDebugTarget getDebugTarget IThread getThreads IThread isSuspended isSuspended DebugException JDIDebugUIPlugin InterruptedException JDIDebugUIPlugin
public void update boolean enable false if f Action null I Java Debug Target target get Debug Target if target null if target supports Monitor Information try I Thread threads target get Threads for int i 0 i threads length i I Thread thread threads i if thread is Suspended enable true break catch Debug Exception e f Action set Enabled enable  fAction IJavaDebugTarget getDebugTarget supportsMonitorInformation IThread getThreads IThread isSuspended DebugException fAction setEnabled

public class Monitors Debug Event Handler extends Abstract Debug Event Handler public Monitors Debug Event Handler Monitors View view super view  MonitorsDebugEventHandler AbstractDebugEventHandler MonitorsDebugEventHandler MonitorsView
Monitor Manager get Default update Partial targets 0 Runnable r new Runnable public void run Monitors View get View refresh Current Viewer true false  MonitorManager getDefault updatePartial MonitorsView getView refreshCurrentViewer
Job job new Job Monitor Messages get String Monitors View 4 NON NLS 1 protected I Status run I Progress Monitor monitor Monitor Manager get Default update Partial targets 0 Runnable r new Runnable public void run Monitors View get View refresh Current Viewer true false get View async Exec r return Status OK STATUS  MonitorMessages getString MonitorsView IStatus IProgressMonitor MonitorManager getDefault updatePartial MonitorsView getView refreshCurrentViewer getView asyncExec OK_STATUS
see org eclipse debug internal ui views Abstract Debug Event Handler do Handle Debug Events Debug Event protected void do Handle Debug Events Debug Event events Debug Event event Object source boolean monitor Information Available true boolean update Needed false final I Java Debug Target targets new I Java Debug Target 1 for int i 0 i events length i event events i source event get Source if a thread is suspended in the debug view if event get Kind Debug Event SUSPEND if source instanceof I Java Debug Target I Java Debug Target target I Java Debug Target source monitor Information Available target supports Monitor Information if monitor Information Available targets 0 target update Needed true else if source instanceof I Java Thread I Java Debug Target target I Java Debug Target I Java Thread source get Debug Target monitor Information Available target supports Monitor Information if monitor Information Available targets 0 target update Needed true else if event get Kind Debug Event RESUME if source instanceof I Java Debug Target I Java Debug Target target I Java Debug Target source monitor Information Available target supports Monitor Information if monitor Information Available targets 0 target update Needed true else if source instanceof I Java Thread I Java Debug Target target I Java Debug Target I Java Thread source get Debug Target monitor Information Available target supports Monitor Information if monitor Information Available targets 0 target update Needed true else if event get Kind Debug Event TERMINATE source instanceof I Java Debug Target Monitor Manager get Default remove Monitor Information I Java Debug Target source Monitors View get View refresh Current Viewer monitor Information Available false if update Needed Job job new Job Monitor Messages get String Monitors View 4 NON NLS 1 protected I Status run I Progress Monitor monitor Monitor Manager get Default update Partial targets 0 Runnable r new Runnable public void run Monitors View get View refresh Current Viewer true false get View async Exec r return Status OK STATUS job set System true I Workbench Site Progress Service service I Workbench Site Progress Service get View get Adapter I Workbench Site Progress Service class if service null job schedule else service schedule job  AbstractDebugEventHandler doHandleDebugEvents DebugEvent doHandleDebugEvents DebugEvent DebugEvent monitorInformationAvailable updateNeeded IJavaDebugTarget IJavaDebugTarget getSource getKind DebugEvent IJavaDebugTarget IJavaDebugTarget IJavaDebugTarget monitorInformationAvailable supportsMonitorInformation monitorInformationAvailable updateNeeded IJavaThread IJavaDebugTarget IJavaDebugTarget IJavaThread getDebugTarget monitorInformationAvailable supportsMonitorInformation monitorInformationAvailable updateNeeded getKind DebugEvent IJavaDebugTarget IJavaDebugTarget IJavaDebugTarget monitorInformationAvailable supportsMonitorInformation monitorInformationAvailable updateNeeded IJavaThread IJavaDebugTarget IJavaDebugTarget IJavaThread getDebugTarget monitorInformationAvailable supportsMonitorInformation monitorInformationAvailable updateNeeded getKind DebugEvent IJavaDebugTarget MonitorManager getDefault removeMonitorInformation IJavaDebugTarget MonitorsView getView refreshCurrentViewer monitorInformationAvailable updateNeeded MonitorMessages getString MonitorsView IStatus IProgressMonitor MonitorManager getDefault updatePartial MonitorsView getView refreshCurrentViewer getView asyncExec OK_STATUS setSystem IWorkbenchSiteProgressService IWorkbenchSiteProgressService getView getAdapter IWorkbenchSiteProgressService
see org eclipse debug internal ui views Abstract Debug Event Handler refresh public void refresh Monitors View get View selection Changed null get View get Site get Page get Selection I DebugUI Constants ID DEBUG VIEW  AbstractDebugEventHandler MonitorsView getView selectionChanged getView getSite getPage getSelection IDebugUIConstants ID_DEBUG_VIEW

see org eclipse ui part I Page create Control org eclipse swt widgets Composite public void create Control Composite parent Viewer viewer create Monitors Viewer parent set Monitors Viewer viewer  IPage createControl createControl createMonitorsViewer setMonitorsViewer
see org eclipse ui part I Page get Control public Control get Control return get Monitors Viewer get Control  IPage getControl getControl getMonitorsViewer getControl
public void set Focus Viewer viewer get Monitors Viewer if viewer null Control c viewer get Control if c is Focus Control c set Focus  setFocus getMonitorsViewer getControl isFocusControl setFocus
see org eclipse ui part I Page create Control org eclipse swt widgets Composite public void create Control Composite parent Viewer viewer create Dead Locks Viewer parent set Dead Locks Viewer viewer  IPage createControl createControl createDeadLocksViewer setDeadLocksViewer
see org eclipse ui part I Page get Control public Control get Control return get Dead Locks Viewer get Control  IPage getControl getControl getDeadLocksViewer getControl
public void set Focus Viewer viewer get Dead Locks Viewer if viewer null Control c viewer get Control if c is Focus Control c set Focus  setFocus getDeadLocksViewer getControl isFocusControl setFocus
public Monitors View set Event Handler new Monitors Debug Event Handler this  MonitorsView setEventHandler MonitorsDebugEventHandler
Sets the current view Must be called after creation of the viewpart public void set View Id int viewer Index f View Id viewer Index refresh Current Viewer f Monitor Information Available true  setViewId viewerIndex fViewId viewerIndex refreshCurrentViewer fMonitorInformationAvailable
Returns the current view id public int get View Id return f View Id  getViewId fViewId
protected Viewer create Viewer Composite parent Structured Viewer thread Viewer new Tree Viewer parent SWT MULTI thread Viewer set Content Provider new Threads View Content Provider thread Viewer set Label Provider new Monitor Model Presentation thread Viewer set Input Monitor Manager get Default return thread Viewer  createViewer StructuredViewer threadViewer TreeViewer threadViewer setContentProvider ThreadsViewContentProvider threadViewer setLabelProvider MonitorModelPresentation threadViewer setInput MonitorManager getDefault threadViewer
protected Viewer create Monitors Viewer Composite parent Structured Viewer monitors Viewer new Tree Viewer parent SWT MULTI monitors Viewer set Content Provider new Monitors View Content Provider monitors Viewer set Label Provider new Monitor Model Presentation monitors Viewer set Input Monitor Manager get Default return monitors Viewer  createMonitorsViewer StructuredViewer monitorsViewer TreeViewer monitorsViewer setContentProvider MonitorsViewContentProvider monitorsViewer setLabelProvider MonitorModelPresentation monitorsViewer setInput MonitorManager getDefault monitorsViewer
when refreshing sets the color of the threads caught in a deadlock to red public void refresh get Control set Redraw false super refresh Item children get Children get Control if children null to be changed Color c DebugUI Plugin get Preference Color I Debug Preference Constants CHANGED VARIABLE COLOR for int i 0 i children length i update Color Tree Item children i c 0 get Control set Redraw true  getControl setRedraw getChildren getControl DebugUIPlugin getPreferenceColor IDebugPreferenceConstants CHANGED_VARIABLE_COLOR updateColor TreeItem getControl setRedraw
goes down the tree but only changes the color of the items caught in a deadlock public void update Color Tree Item item Color c int count Object data item get Data if data instanceof Dead Locks View Content Provider Content Thread Wrapper if Dead Locks View Content Provider Content Thread Wrapper data caught InA Dead Lock item set Foreground c Tree Item children item get Items for int i 0 i children length i update Color children i c count 1  updateColor TreeItem getData DeadLocksViewContentProvider ContentThreadWrapper DeadLocksViewContentProvider ContentThreadWrapper caughtInADeadLock setForeground TreeItem getItems updateColor
protected Viewer create Dead Locks Viewer Composite parent Structured Viewer dead Locks Viewer new Tree Viewer parent SWT MULTI when refreshing sets the color of the threads caught in a deadlock to red public void refresh get Control set Redraw false super refresh Item children get Children get Control if children null to be changed Color c DebugUI Plugin get Preference Color I Debug Preference Constants CHANGED VARIABLE COLOR for int i 0 i children length i update Color Tree Item children i c 0 get Control set Redraw true goes down the tree but only changes the color of the items caught in a deadlock public void update Color Tree Item item Color c int count Object data item get Data if data instanceof Dead Locks View Content Provider Content Thread Wrapper if Dead Locks View Content Provider Content Thread Wrapper data caught InA Dead Lock item set Foreground c Tree Item children item get Items for int i 0 i children length i update Color children i c count 1 dead Locks Viewer set Content Provider new Dead Locks View Content Provider dead Locks Viewer set Label Provider new Monitor Model Presentation dead Locks Viewer set Input Monitor Manager get Default return dead Locks Viewer  createDeadLocksViewer StructuredViewer deadLocksViewer TreeViewer getControl setRedraw getChildren getControl DebugUIPlugin getPreferenceColor IDebugPreferenceConstants CHANGED_VARIABLE_COLOR updateColor TreeItem getControl setRedraw updateColor TreeItem getData DeadLocksViewContentProvider ContentThreadWrapper DeadLocksViewContentProvider ContentThreadWrapper caughtInADeadLock setForeground TreeItem getItems updateColor deadLocksViewer setContentProvider DeadLocksViewContentProvider deadLocksViewer setLabelProvider MonitorModelPresentation deadLocksViewer setInput MonitorManager getDefault deadLocksViewer
public void create Part Control Composite parent super create Part Control parent create the message page Dead Locks Viewer Page dead Locks Page new Dead Locks Viewer Page dead Locks Page create Control get Page Book init Page dead Locks Page Monitors Viewer Page monitors Viewer Page new Monitors Viewer Page monitors Viewer Page create Control get Page Book init Page monitors Viewer Page create Context Menu get Dead Locks Viewer get Control create Context Menu get Monitors Viewer get Control set View Id VIEW ID MONITOR listen to selection in debug view get Site get Page add Selection Listener I DebugUI Constants ID DEBUG VIEW this  createPartControl createPartControl DeadLocksViewerPage deadLocksPage DeadLocksViewerPage deadLocksPage createControl getPageBook initPage deadLocksPage MonitorsViewerPage monitorsViewerPage MonitorsViewerPage monitorsViewerPage createControl getPageBook initPage monitorsViewerPage createContextMenu getDeadLocksViewer getControl createContextMenu getMonitorsViewer getControl setViewId VIEW_ID_MONITOR getSite getPage addSelectionListener IDebugUIConstants ID_DEBUG_VIEW
see org eclipse debug ui Abstract Debug View create Actions protected void create Actions  AbstractDebugView createActions createActions
see org eclipse debug ui Abstract Debug View get Help Context Id protected String get Help Context Id return I Java Debug Help Context Ids MONITORS VIEW  AbstractDebugView getHelpContextId getHelpContextId IJavaDebugHelpContextIds MONITORS_VIEW
see org eclipse debug ui Abstract Debug View fill Context Menu org eclipse jface action I Menu Manager protected void fill Context Menu I Menu Manager menu menu add new Separator vm Group NON NLS 1 menu add new Separator I Workbench Action Constants MB ADDITIONS  AbstractDebugView fillContextMenu IMenuManager fillContextMenu IMenuManager vmGroup IWorkbenchActionConstants MB_ADDITIONS
see org eclipse debug ui Abstract Debug View configure Tool Bar org eclipse jface action I Tool Bar Manager protected void configure Tool Bar I Tool Bar Manager tbm tbm add new Separator vm Group NON NLS 1 update Objects  AbstractDebugView configureToolBar IToolBarManager configureToolBar IToolBarManager vmGroup updateObjects
Returns the dead Locks Viewer return Dead Locks Viewer public Viewer get Dead Locks Viewer return f Dead Locks Viewer  deadLocksViewer DeadLocksViewer getDeadLocksViewer fDeadLocksViewer
Returns the monitors Viewer return Monitors Viewer public Viewer get Monitors Viewer return f Monitors Viewer  monitorsViewer MonitorsViewer getMonitorsViewer fMonitorsViewer
Sets the dead Locks Viewer param dead Locks Viewer The dead Locks Viewer to set public void set Dead Locks Viewer Viewer dead Locks Viewer f Dead Locks Viewer dead Locks Viewer  deadLocksViewer deadLocksViewer deadLocksViewer setDeadLocksViewer deadLocksViewer fDeadLocksViewer deadLocksViewer
Sets the monitors Viewer param monitors Viewer The monitors Viewer to set public void set Monitors Viewer Viewer monitors Viewer f Monitors Viewer monitors Viewer  monitorsViewer monitorsViewer monitorsViewer setMonitorsViewer monitorsViewer fMonitorsViewer monitorsViewer
protected void refresh Current Viewer boolean monitor Information Available boolean show Page if get Page Book is Disposed return if f Valid Selection show Message Monitor Messages get String Monitors View 2 NON NLS 1 update Objects return boolean change From Show Message Page monitor Information Available f Monitor Information Available f Monitor Information Available monitor Information Available if monitor Information Available show Message Monitor Messages get String Monitors View 1 NON NLS 1 update Objects return Control page null switch f View Id case VIEW ID THREAD page get Viewer get Control page set Redraw false get Viewer refresh Tree Viewer get Viewer expand All page set Redraw true break case VIEW ID DEADLOCK if Monitor Manager get Default get Number Of Deadlocks 0 Monitor Manager get Default get Threads length 0 show Message Monitor Messages get String Monitors View 3 NON NLS 1 show Page false break change From Show Message Page true page get Dead Locks Viewer get Control page set Redraw false get Dead Locks Viewer refresh Tree Viewer get Dead Locks Viewer expand All page set Redraw true break case VIEW ID MONITOR page get Monitors Viewer get Control page set Redraw false get Monitors Viewer refresh Tree Viewer get Monitors Viewer expand All page set Redraw true break if show Page change From Show Message Page page null get Page Book show Page page update Objects  refreshCurrentViewer monitorInformationAvailable showPage getPageBook isDisposed fValidSelection showMessage MonitorMessages getString MonitorsView updateObjects changeFromShowMessagePage monitorInformationAvailable fMonitorInformationAvailable fMonitorInformationAvailable monitorInformationAvailable monitorInformationAvailable showMessage MonitorMessages getString MonitorsView updateObjects fViewId VIEW_ID_THREAD getViewer getControl setRedraw getViewer TreeViewer getViewer expandAll setRedraw VIEW_ID_DEADLOCK MonitorManager getDefault getNumberOfDeadlocks MonitorManager getDefault getThreads showMessage MonitorMessages getString MonitorsView showPage changeFromShowMessagePage getDeadLocksViewer getControl setRedraw getDeadLocksViewer TreeViewer getDeadLocksViewer expandAll setRedraw VIEW_ID_MONITOR getMonitorsViewer getControl setRedraw getMonitorsViewer TreeViewer getMonitorsViewer expandAll setRedraw showPage changeFromShowMessagePage getPageBook showPage updateObjects
f Valid Selection true Display get Default async Exec new Runnable public void run refresh Current Viewer monitor Information Available true f Last Selected Target debug Target  fValidSelection getDefault asyncExec refreshCurrentViewer monitorInformationAvailable fLastSelectedTarget debugTarget
Job job new Job Monitor Messages get String Monitors View 4 NON NLS 1 protected I Status run I Progress Monitor monitor final boolean monitor Information Available debug Target supports Monitor Information if monitor Information Available Monitor Manager get Default update Partial debug Target f Valid Selection true Display get Default async Exec new Runnable public void run refresh Current Viewer monitor Information Available true f Last Selected Target debug Target return Status OK STATUS  MonitorMessages getString MonitorsView IStatus IProgressMonitor monitorInformationAvailable debugTarget supportsMonitorInformation monitorInformationAvailable MonitorManager getDefault updatePartial debugTarget fValidSelection getDefault asyncExec refreshCurrentViewer monitorInformationAvailable fLastSelectedTarget debugTarget OK_STATUS
if f Valid Selection Display get Default async Exec new Runnable public void run f Valid Selection false refresh Current Viewer false true  fValidSelection getDefault asyncExec fValidSelection refreshCurrentViewer
public void selection Changed I Workbench Part part I Selection selection if selection instanceof I Structured Selection I Structured Selection structured Selection I Structured Selection selection Set targets new Hash Set for Iterator iter structured Selection iterator iter has Next Object element iter next if element instanceof JDI Debug Element targets add JDI Debug Element element get Debug Target if targets size 1 final I Java Debug Target debug Target I Java Debug Target targets to Array 0 if debug Target f Last Selected Target f Valid Selection Job job new Job Monitor Messages get String Monitors View 4 NON NLS 1 protected I Status run I Progress Monitor monitor final boolean monitor Information Available debug Target supports Monitor Information if monitor Information Available Monitor Manager get Default update Partial debug Target f Valid Selection true Display get Default async Exec new Runnable public void run refresh Current Viewer monitor Information Available true f Last Selected Target debug Target return Status OK STATUS I Workbench Site Progress Service progress Service I Workbench Site Progress Service get Site get Adapter I Workbench Site Progress Service class job set System true if progress Service null job schedule else progress Service schedule job return if f Valid Selection Display get Default async Exec new Runnable public void run f Valid Selection false refresh Current Viewer false true  selectionChanged IWorkbenchPart ISelection IStructuredSelection IStructuredSelection structuredSelection IStructuredSelection HashSet structuredSelection hasNext JDIDebugElement JDIDebugElement getDebugTarget IJavaDebugTarget debugTarget IJavaDebugTarget toArray debugTarget fLastSelectedTarget fValidSelection MonitorMessages getString MonitorsView IStatus IProgressMonitor monitorInformationAvailable debugTarget supportsMonitorInformation monitorInformationAvailable MonitorManager getDefault updatePartial debugTarget fValidSelection getDefault asyncExec refreshCurrentViewer monitorInformationAvailable fLastSelectedTarget debugTarget OK_STATUS IWorkbenchSiteProgressService progressService IWorkbenchSiteProgressService getSite getAdapter IWorkbenchSiteProgressService setSystem progressService progressService fValidSelection getDefault asyncExec fValidSelection refreshCurrentViewer
see org eclipse debug internal ui views Abstract Debug Event Handler View dispose public void dispose get Site get Page remove Selection Listener I DebugUI Constants ID DEBUG VIEW this super dispose  AbstractDebugEventHandlerView getSite getPage removeSelectionListener IDebugUIConstants ID_DEBUG_VIEW

see org eclipse jface viewers I Tree Content Provider get Children Object public Object get Children Object parent Element the parents will be monitors if parent Element instanceof I Java Object I Java Object monitor I Java Object parent Element owning thread I Java Thread owning Thread Monitor Manager get Default get Owning Thread monitor contending threads List contending Threads Monitor Manager get Default get Contending Threads monitor if owning Thread null contending Threads null return null adding the threads to the result int size 0 if contending Threads null size contending Threads size if owning Thread null size size 1 transforming the result to Thread Wrapper setting the type Object children new Object size if contending Threads null List wrapped Threads new Array List for int i 0 i contending Threads size i Thread Wrapper tw new Thread Wrapper tw thread I Java Thread contending Threads get i tw state Thread Wrapper IN CONTENTION FOR MONITOR wrapped Threads add tw wrapped Threads to Array children wrapped Threads to Array children if owning Thread null Thread Wrapper tw new Thread Wrapper tw thread owning Thread tw state Thread Wrapper OWNING THREAD children children length 1 tw return children return null  ITreeContentProvider getChildren getChildren parentElement parentElement IJavaObject IJavaObject IJavaObject parentElement IJavaThread owningThread MonitorManager getDefault getOwningThread contendingThreads MonitorManager getDefault getContendingThreads owningThread contendingThreads contendingThreads contendingThreads owningThread ThreadWrapper contendingThreads wrappedThreads ArrayList contendingThreads ThreadWrapper ThreadWrapper IJavaThread contendingThreads ThreadWrapper IN_CONTENTION_FOR_MONITOR wrappedThreads wrappedThreads toArray wrappedThreads toArray owningThread ThreadWrapper ThreadWrapper owningThread ThreadWrapper OWNING_THREAD
see org eclipse jface viewers I Tree Content Provider get Parent Object public Object get Parent Object element if element instanceof I Java Thread return Monitor Manager get Default get Owned Monitors I Java Thread element else if element instanceof I Java Object return Monitor Manager get Default get Owning Thread I Java Object element return null  ITreeContentProvider getParent getParent IJavaThread MonitorManager getDefault getOwnedMonitors IJavaThread IJavaObject MonitorManager getDefault getOwningThread IJavaObject
see org eclipse jface viewers I Tree Content Provider has Children Object public boolean has Children Object element if element instanceof I Java Object I Java Object monitor I Java Object element I Java Thread owning Thread Monitor Manager get Default get Owning Thread monitor List contending Threads Monitor Manager get Default get Contending Threads monitor if owning Thread null contending Threads null return false else return true return false  ITreeContentProvider hasChildren hasChildren IJavaObject IJavaObject IJavaObject IJavaThread owningThread MonitorManager getDefault getOwningThread contendingThreads MonitorManager getDefault getContendingThreads owningThread contendingThreads
see org eclipse jface viewers I Structured Content Provider get Elements Object public Object get Elements Object input Element return Monitor Manager get Default get Monitors  IStructuredContentProvider getElements getElements inputElement MonitorManager getDefault getMonitors
see org eclipse jface viewers I Content Provider dispose public void dispose f Viewer null  IContentProvider fViewer
see org eclipse jface viewers I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input f Viewer Tree Viewer viewer  IContentProvider inputChanged inputChanged oldInput newInput fViewer TreeViewer

Monitor Manager get Default update target Runnable r new Runnable public void run f View refresh Current Viewer target supports Monitor Information false  MonitorManager getDefault fView refreshCurrentViewer supportsMonitorInformation
Job job new Job Monitor Messages get String Monitors View 4 NON NLS 1 protected I Status run I Progress Monitor monitor Monitor Manager get Default update target Runnable r new Runnable public void run f View refresh Current Viewer target supports Monitor Information false f View async Exec r return Status OK STATUS  MonitorMessages getString MonitorsView IStatus IProgressMonitor MonitorManager getDefault fView refreshCurrentViewer supportsMonitorInformation fView asyncExec OK_STATUS
see I Action Delegate run I Action public void run I Action action final I Java Debug Target target get Debug Target if target null return Job job new Job Monitor Messages get String Monitors View 4 NON NLS 1 protected I Status run I Progress Monitor monitor Monitor Manager get Default update target Runnable r new Runnable public void run f View refresh Current Viewer target supports Monitor Information false f View async Exec r return Status OK STATUS job set System true I Workbench Site Progress Service service I Workbench Site Progress Service f View get Adapter I Workbench Site Progress Service class if service null job schedule else service schedule job  IActionDelegate IAction IAction IJavaDebugTarget getDebugTarget MonitorMessages getString MonitorsView IStatus IProgressMonitor MonitorManager getDefault fView refreshCurrentViewer supportsMonitorInformation fView asyncExec OK_STATUS setSystem IWorkbenchSiteProgressService IWorkbenchSiteProgressService fView getAdapter IWorkbenchSiteProgressService
public void update boolean enable false if f Action null I Java Debug Target target get Debug Target if target null enable target supports Monitor Information f Action set Enabled enable  fAction IJavaDebugTarget getDebugTarget supportsMonitorInformation fAction setEnabled

see org eclipse jface viewers I Tree Content Provider get Children Object public Object get Children Object parent Element the parent will be Thread Wrapper if parent Element instanceof Thread Wrapper I Java Thread thread Thread Wrapper parent Element thread owned monitors I Java Object owned Monitors Monitor Manager get Default get Owned Monitors thread contended monitor I Java Object contended Monitor Monitor Manager get Default get Contended Monitor thread if owned Monitors null contended Monitor null return null adding the monitors to the result int size 0 if owned Monitors null size owned Monitors length if contended Monitor null size size 1 transforming the result to Monitor Wrapper setting the type Object children new Object size if owned Monitors null for int i 0 i owned Monitors length i Monitor Wrapper mw new Monitor Wrapper mw monitor owned Monitors i mw state Monitor Wrapper OWNED MONITOR children i mw if contended Monitor null Monitor Wrapper mw new Monitor Wrapper mw monitor contended Monitor mw state Monitor Wrapper CONTENDED MONITOR children children length 1 mw return children return null  ITreeContentProvider getChildren getChildren parentElement ThreadWrapper parentElement ThreadWrapper IJavaThread ThreadWrapper parentElement IJavaObject ownedMonitors MonitorManager getDefault getOwnedMonitors IJavaObject contendedMonitor MonitorManager getDefault getContendedMonitor ownedMonitors contendedMonitor ownedMonitors ownedMonitors contendedMonitor MonitorWrapper ownedMonitors ownedMonitors MonitorWrapper MonitorWrapper ownedMonitors MonitorWrapper OWNED_MONITOR contendedMonitor MonitorWrapper MonitorWrapper contendedMonitor MonitorWrapper CONTENDED_MONITOR
see org eclipse jface viewers I Tree Content Provider get Parent Object public Object get Parent Object element if element instanceof I Java Thread return Monitor Manager get Default get Owned Monitors I Java Thread element else if element instanceof I Java Object return Monitor Manager get Default get Owning Thread I Java Object element return null  ITreeContentProvider getParent getParent IJavaThread MonitorManager getDefault getOwnedMonitors IJavaThread IJavaObject MonitorManager getDefault getOwningThread IJavaObject
see org eclipse jface viewers I Tree Content Provider has Children Object public boolean has Children Object element if element instanceof I Java Thread I Java Thread thread I Java Thread element I Java Object owned Monitors Monitor Manager get Default get Owned Monitors thread I Java Object contended Monitor Monitor Manager get Default get Contended Monitor thread if owned Monitors null contended Monitor null return false else return true return false  ITreeContentProvider hasChildren hasChildren IJavaThread IJavaThread IJavaThread IJavaObject ownedMonitors MonitorManager getDefault getOwnedMonitors IJavaObject contendedMonitor MonitorManager getDefault getContendedMonitor ownedMonitors contendedMonitor
see org eclipse jface viewers I Structured Content Provider get Elements Object public Object get Elements Object input Element the root elements are Thread Wrapper I Java Thread all Threads Monitor Manager get Default get Threads Object res new Object all Threads length for int i 0 i all Threads length i Thread Wrapper tw new Thread Wrapper tw thread all Threads i if Monitor Manager get Default is Caught In Deadlock all Threads i tw is Caught In Deadlock true else tw is Caught In Deadlock false res i tw return res  IStructuredContentProvider getElements getElements inputElement ThreadWrapper IJavaThread allThreads MonitorManager getDefault getThreads allThreads allThreads ThreadWrapper ThreadWrapper allThreads MonitorManager getDefault isCaughtInDeadlock allThreads isCaughtInDeadlock isCaughtInDeadlock
see org eclipse jface viewers I Content Provider dispose public void dispose f Viewer null  IContentProvider fViewer
see org eclipse jface viewers I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input f Viewer Tree Viewer viewer  IContentProvider inputChanged inputChanged oldInput newInput fViewer TreeViewer

Constructor for the monitor thread wrapper param thread The thread param dead Lock List The deadlock list as described in Monitor Manager public Thread Wrapper I Java Thread thread List dead Lock List f Thread thread f Dead Lock List new Array List dead Lock List  deadLockList MonitorManager ThreadWrapper IJavaThread deadLockList fThread fDeadLockList ArrayList deadLockList
Returns the dead lock list return List public List get Dead Lock List return f Dead Lock List  getDeadLockList fDeadLockList
Returns the start thread return I Java Thread public I Java Thread get Start Thread return f Thread  IJavaThread IJavaThread getStartThread fThread

see org eclipse jdt internal debug ui monitors Toggle View Action get View Id protected int get View Id return Monitors View VIEW ID DEADLOCK  ToggleViewAction getViewId getViewId MonitorsView VIEW_ID_DEADLOCK

see org eclipse jdt internal debug ui monitors Toggle View Action get View Id protected int get View Id return Monitors View VIEW ID MONITOR  ToggleViewAction getViewId getViewId MonitorsView VIEW_ID_MONITOR

public class Toggle Threads View Action extends Toggle View Action protected int get View Id return Monitors View VIEW ID THREAD  ToggleThreadsViewAction ToggleViewAction getViewId MonitorsView VIEW_ID_THREAD

see org eclipse ui I View Action Delegate init I View Part public void init I View Part view if view instanceof Monitors View f Monitors View Monitors View view f Monitors View add this  IViewActionDelegate IViewPart IViewPart MonitorsView fMonitorsView MonitorsView fMonitorsView
see org eclipse ui I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection f Action action  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection fAction
see org eclipse ui texteditor I Update update public void update if f Monitors View get View Id get View Id f Action set Checked false  IUpdate fMonitorsView getViewId getViewId fAction setChecked
see org eclipse ui I Action Delegate run I Action public void run I Action action f Monitors View set View Id get View Id f Monitors View update Objects  IActionDelegate IAction IAction fMonitorsView setViewId getViewId fMonitorsView updateObjects
protected abstract int get View Id  getViewId

Display display JDI DebugUI Plugin get Standard Display display sync Exec new Runnable public void run dialog open  JDIDebugUIPlugin getStandardDisplay syncExec
see org eclipse debug core I Status Handler handle Status I Status Object public Object handle Status I Status status Object source Reference Type type Reference Type source I Preference Store preference Store JDI DebugUI Plugin get Default get Preference Store if preference Store get Boolean IJDI Preferences Constants PREF ALERT UNABLE TO INSTALL BREAKPOINT final Error Dialog With Toggle dialog new Error Dialog With Toggle JDI DebugUI Plugin get Active Workbench Shell DebugUI Messages get String No Line Number Attributes Status Handler Java Breakpoint 1 NON NLS 1 Message Format format DebugUI Messages get String No Line Number Attributes Status Handler 2 new String type name NON NLS 1 status IJDI Preferences Constants PREF ALERT UNABLE TO INSTALL BREAKPOINT DebugUI Messages get String No Line Number Attributes Status Handler 3 NON NLS 1 preference Store Display display JDI DebugUI Plugin get Standard Display display sync Exec new Runnable public void run dialog open return null  IStatusHandler handleStatus IStatus handleStatus IStatus ReferenceType ReferenceType IPreferenceStore preferenceStore JDIDebugUIPlugin getDefault getPreferenceStore preferenceStore getBoolean IJDIPreferencesConstants PREF_ALERT_UNABLE_TO_INSTALL_BREAKPOINT ErrorDialogWithToggle ErrorDialogWithToggle JDIDebugUIPlugin getActiveWorkbenchShell DebugUIMessages getString NoLineNumberAttributesStatusHandler Java_Breakpoint_1 MessageFormat DebugUIMessages getString NoLineNumberAttributesStatusHandler IJDIPreferencesConstants PREF_ALERT_UNABLE_TO_INSTALL_BREAKPOINT DebugUIMessages getString NoLineNumberAttributesStatusHandler preferenceStore JDIDebugUIPlugin getStandardDisplay syncExec

public class Package Selection Dialog extends Element List Selection Dialog public Package Selection Dialog Shell parent I Label Provider renderer super parent renderer  PackageSelectionDialog ElementListSelectionDialog PackageSelectionDialog ILabelProvider
see org eclipse jface window Window close public boolean close Dialog Settings Helper persist Shell Geometry get Shell get Dialog Settings Section Name return super close  DialogSettingsHelper persistShellGeometry getShell getDialogSettingsSectionName
Returns the name of the section that this dialog stores its settings in return String protected String get Dialog Settings Section Name return I Java DebugUI Constants PLUGIN ID PACKAGE SELECTION DIALOG SECTION NON NLS 1  getDialogSettingsSectionName IJavaDebugUIConstants PLUGIN_ID PACKAGE_SELECTION_DIALOG_SECTION
protected Point get Initial Location Point initial Size Point initial Location Dialog Settings Helper get Initial Location get Dialog Settings Section Name if initial Location null return initial Location return super get Initial Location initial Size  getInitialLocation initialSize initialLocation DialogSettingsHelper getInitialLocation getDialogSettingsSectionName initialLocation initialLocation getInitialLocation initialSize
see org eclipse jface window Window get Initial Size protected Point get Initial Size Point size super get Initial Size return Dialog Settings Helper get Initial Size get Dialog Settings Section Name size  getInitialSize getInitialSize getInitialSize DialogSettingsHelper getInitialSize getDialogSettingsSectionName

public Breakpoint Condition Editor Composite parent Java Line Breakpoint Page page f Page page f Breakpoint I Java Line Breakpoint f Page get Breakpoint String condition try condition f Breakpoint get Condition catch Core Exception exception JDI DebugUI Plugin log exception return f Error Message Property Page Messages get String Breakpoint Condition Editor 1 NON NLS 1 f Old Value NON NLS 1 the source viewer f Viewer new JDI Source Viewer parent null SWT BORDER SWT V SCROLL SWT H SCROLL f Viewer set Input parent Java Text Tools tools Java Plugin get Default get Java Text Tools I Document document new Document I Document Partitioner partitioner tools create Document Partitioner document set Document Partitioner partitioner partitioner connect document f Viewer configure new Display Viewer Configuration public I Content Assist Processor get Content Assistant Processor return get Completion Processor f Viewer set Editable true f Viewer set Document document final I Undo Manager undo Manager new Default Undo Manager 10 f Viewer set Undo Manager undo Manager undo Manager connect f Viewer f Viewer get Text Widget set Font J Face Resources get Text Font Control control f Viewer get Control Grid Data gd new Grid Data Grid Data FILL BOTH control set Layout Data gd listener for check the value f Viewer get Text Widget add Key Listener new Key Adapter public void key Released Key Event e value Changed we can only do code assist if there is an associated type I Type type Breakpoint Utils get Type f Breakpoint if type null try get Completion Processor set Type type String source null I Compilation Unit compilation Unit type get Compilation Unit if compilation Unit null source compilation Unit get Source else I Class File class File type get Class File if class File null source class File get Source int line Number f Breakpoint get Marker get Attribute I Marker LINE NUMBER 1 int position 1 if source null line Number 1 try position new Document source get Line Offset line Number 1 catch Bad Location Exception e get Completion Processor set Position position catch Core Exception e gd Grid Data f Viewer get Control get Layout Data gd height Hint f Page convert Height In Chars To Pixels 10 gd width Hint f Page convert Width In Chars To Pixels 40 document set condition value Changed I Workbench workbench PlatformUI get Workbench I Workbench Command Support command Support workbench get Command Support I Handler handler new Abstract Handler public Object execute Map parameter throws Execution Exception f Viewer do Operation I Source Viewer CONTENTASSIST PROPOSALS return null submission new Handler Submission null parent get Shell null I Text Editor Action Definition Ids CONTENT ASSIST PROPOSALS handler Priority MEDIUM NON NLS 1 command Support add Handler Submission submission  BreakpointConditionEditor JavaLineBreakpointPage fPage fBreakpoint IJavaLineBreakpoint fPage getBreakpoint fBreakpoint getCondition CoreException JDIDebugUIPlugin fErrorMessage PropertyPageMessages getString BreakpointConditionEditor fOldValue fViewer JDISourceViewer V_SCROLL H_SCROLL fViewer setInput JavaTextTools JavaPlugin getDefault getJavaTextTools IDocument IDocumentPartitioner createDocumentPartitioner setDocumentPartitioner fViewer DisplayViewerConfiguration IContentAssistProcessor getContentAssistantProcessor getCompletionProcessor fViewer setEditable fViewer setDocument IUndoManager undoManager DefaultUndoManager fViewer setUndoManager undoManager undoManager fViewer fViewer getTextWidget setFont JFaceResources getTextFont fViewer getControl GridData GridData GridData FILL_BOTH setLayoutData fViewer getTextWidget addKeyListener KeyAdapter keyReleased KeyEvent valueChanged IType BreakpointUtils getType fBreakpoint getCompletionProcessor setType ICompilationUnit compilationUnit getCompilationUnit compilationUnit compilationUnit getSource IClassFile classFile getClassFile classFile classFile getSource lineNumber fBreakpoint getMarker getAttribute IMarker LINE_NUMBER lineNumber getLineOffset lineNumber BadLocationException getCompletionProcessor setPosition CoreException GridData fViewer getControl getLayoutData heightHint fPage convertHeightInCharsToPixels widthHint fPage convertWidthInCharsToPixels valueChanged IWorkbench getWorkbench IWorkbenchCommandSupport commandSupport getCommandSupport IHandler AbstractHandler ExecutionException fViewer doOperation ISourceViewer CONTENTASSIST_PROPOSALS HandlerSubmission getShell ITextEditorActionDefinitionIds CONTENT_ASSIST_PROPOSALS commandSupport addHandlerSubmission
Returns the condition defined in the source viewer return the contents of this condition editor public String get Condition return f Viewer get Document get  getCondition fViewer getDocument
see org eclipse jface preference Field Editor refresh Valid State protected void refresh Valid State the value is valid if the field is not editable or if the value is not empty if f Viewer is Editable f Page remove Error Message f Error Message f Is Valid true else String text f Viewer get Document get f Is Valid text null text trim length 0 if f Is Valid f Page add Error Message f Error Message else f Page remove Error Message f Error Message  FieldEditor refreshValidState refreshValidState fViewer isEditable fPage removeErrorMessage fErrorMessage fIsValid fViewer getDocument fIsValid fIsValid fPage addErrorMessage fErrorMessage fPage removeErrorMessage fErrorMessage
see org eclipse jface preference Field Editor adjust For Num Columns int protected void adjust For Num Columns int num Columns Grid Data gd Grid Data f Viewer get Control get Layout Data gd horizontal Span num Columns 1 We only grab excess space if we have to If another field editor has more columns then we assume it is setting the width gd grab Excess Horizontal Space gd horizontal Span 1  FieldEditor adjustForNumColumns adjustForNumColumns numColumns GridData GridData fViewer getControl getLayoutData horizontalSpan numColumns grabExcessHorizontalSpace horizontalSpan
Return the completion processor associated with this viewer return Break Point Condition Completion Processor private Breakpoint Condition Completion Processor get Completion Processor if f Completion Processor null f Completion Processor new Breakpoint Condition Completion Processor null return f Completion Processor  BreakPointConditionCompletionProcessor BreakpointConditionCompletionProcessor getCompletionProcessor fCompletionProcessor fCompletionProcessor BreakpointConditionCompletionProcessor fCompletionProcessor
see org eclipse jface preference Field Editor set Enabled boolean org eclipse swt widgets Composite public void set Enabled boolean enabled f Viewer set Editable enabled if enabled f Viewer update Viewer Colors f Viewer get Text Widget set Focus else Color color f Viewer get Control get Display get System Color SWT COLOR WIDGET BACKGROUND f Viewer get Text Widget set Background color value Changed  FieldEditor setEnabled setEnabled fViewer setEditable fViewer updateViewerColors fViewer getTextWidget setFocus fViewer getControl getDisplay getSystemColor COLOR_WIDGET_BACKGROUND fViewer getTextWidget setBackground valueChanged
see org eclipse jface preference Field Editor is Valid public boolean is Valid return f Is Valid  FieldEditor isValid isValid fIsValid
public void value Changed refresh Valid State String new Value f Viewer get Document get if new Value equals f Old Value f Old Value new Value  valueChanged refreshValidState newValue fViewer getDocument newValue fOldValue fOldValue newValue
public void dispose I Workbench workbench PlatformUI get Workbench I Workbench Command Support command Support workbench get Command Support command Support remove Handler Submission submission f Viewer dispose  IWorkbench getWorkbench IWorkbenchCommandSupport commandSupport getCommandSupport commandSupport removeHandlerSubmission fViewer

f Filter Viewer get Table set Layout Data gd f Filter Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Filter filter Filter event get Element f Filter Content Provider toggle Filter filter  fFilterViewer getTable setLayoutData fFilterViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getElement fFilterContentProvider toggleFilter
f Filter Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Selection selection event get Selection if selection is Empty f Remove Filter Button set Enabled false else f Remove Filter Button set Enabled true  fFilterViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection isEmpty fRemoveFilterButton setEnabled fRemoveFilterButton setEnabled
f Filter Viewer get Table add Key Listener new Key Adapter public void key Pressed Key Event event if event character SWT DEL event state Mask 0 remove Filters  fFilterViewer getTable addKeyListener KeyAdapter keyPressed KeyEvent stateMask removeFilters
public Exception Filter Editor Composite parent Java Exception Breakpoint Advanced Page page f Breakpoint I Java Exception Breakpoint page get Breakpoint top level container Composite outer new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 outer set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH outer set Layout Data gd filter table Label label new Label outer SWT NONE label set Text Property Page Messages get String Exception Filter Editor 5 NON NLS 1 label set Font parent get Font gd new Grid Data gd horizontal Span 2 label set Layout Data gd f Filter Table new Table outer SWT CHECK SWT BORDER SWT MULTI SWT FULL SELECTION Table Layout table Layout new Table Layout Column Layout Data column Layout Data new Column Layout Data 1 column Layout Data 0 new Column Weight Data 100 table Layout add Column Data column Layout Data 0 f Filter Table set Layout table Layout new Table Column f Filter Table SWT NONE f Filter Viewer new Checkbox Table Viewer f Filter Table f Table Editor new Table Editor f Filter Table f Filter Viewer set Label Provider new Filter Label Provider f Filter Viewer set Sorter new Filter Viewer Sorter f Filter Content Provider new Filter Content Provider f Filter Viewer f Filter Viewer set Content Provider f Filter Content Provider input just needs to be non null f Filter Viewer set Input this gd new Grid Data Grid Data FILL BOTH Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL gd width Hint 100 f Filter Viewer get Table set Layout Data gd f Filter Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Filter filter Filter event get Element f Filter Content Provider toggle Filter filter f Filter Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Selection selection event get Selection if selection is Empty f Remove Filter Button set Enabled false else f Remove Filter Button set Enabled true f Filter Viewer get Table add Key Listener new Key Adapter public void key Pressed Key Event event if event character SWT DEL event state Mask 0 remove Filters create Filter Buttons outer  ExceptionFilterEditor JavaExceptionBreakpointAdvancedPage fBreakpoint IJavaExceptionBreakpoint getBreakpoint GridLayout GridLayout numColumns marginHeight marginWidth setLayout GridData GridData GridData FILL_BOTH setLayoutData setText PropertyPageMessages getString ExceptionFilterEditor setFont getFont GridData horizontalSpan setLayoutData fFilterTable FULL_SELECTION TableLayout tableLayout TableLayout ColumnLayoutData columnLayoutData ColumnLayoutData columnLayoutData ColumnWeightData tableLayout addColumnData columnLayoutData fFilterTable setLayout tableLayout TableColumn fFilterTable fFilterViewer CheckboxTableViewer fFilterTable fTableEditor TableEditor fFilterTable fFilterViewer setLabelProvider FilterLabelProvider fFilterViewer setSorter FilterViewerSorter fFilterContentProvider FilterContentProvider fFilterViewer fFilterViewer setContentProvider fFilterContentProvider fFilterViewer setInput GridData GridData FILL_BOTH GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL widthHint fFilterViewer getTable setLayoutData fFilterViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getElement fFilterContentProvider toggleFilter fFilterViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection isEmpty fRemoveFilterButton setEnabled fRemoveFilterButton setEnabled fFilterViewer getTable addKeyListener KeyAdapter keyPressed KeyEvent stateMask removeFilters createFilterButtons
protected void do Store Object filters f Filter Content Provider get Elements null List inclusion Filters new Array List filters length List exclusion Filters new Array List filters length for int i 0 i filters length i Filter filter Filter filters i String name filter get Name if name equals DEFAULT PACKAGE name NON NLS 1 if filter is Checked inclusion Filters add name else exclusion Filters add name try f Breakpoint set Inclusion Filters String inclusion Filters to Array new String inclusion Filters size f Breakpoint set Exclusion Filters String exclusion Filters to Array new String exclusion Filters size catch Core Exception ce JDI DebugUI Plugin log ce  doStore fFilterContentProvider getElements inclusionFilters ArrayList exclusionFilters ArrayList getName DEFAULT_PACKAGE isChecked inclusionFilters exclusionFilters fBreakpoint setInclusionFilters inclusionFilters toArray inclusionFilters fBreakpoint setExclusionFilters exclusionFilters toArray exclusionFilters CoreException JDIDebugUIPlugin
f Add Filter Button set Layout Data gd f Add Filter Button add Selection Listener new Selection Listener public void widget Selected Selection Event se edit Filter  fAddFilterButton setLayoutData fAddFilterButton addSelectionListener SelectionListener widgetSelected SelectionEvent editFilter
edit Filter public void widget Default Selected Selection Event se  editFilter widgetDefaultSelected SelectionEvent
f Add Type Button set Layout Data gd f Add Type Button add Selection Listener new Selection Listener public void widget Selected Selection Event se add Type  fAddTypeButton setLayoutData fAddTypeButton addSelectionListener SelectionListener widgetSelected SelectionEvent addType
add Type public void widget Default Selected Selection Event se  addType widgetDefaultSelected SelectionEvent
f Add Package Button set Layout Data gd f Add Package Button add Selection Listener new Selection Listener public void widget Selected Selection Event se add Package  fAddPackageButton setLayoutData fAddPackageButton addSelectionListener SelectionListener widgetSelected SelectionEvent addPackage
add Package public void widget Default Selected Selection Event se  addPackage widgetDefaultSelected SelectionEvent
f Remove Filter Button set Layout Data gd f Remove Filter Button add Selection Listener new Selection Listener public void widget Selected Selection Event se remove Filters  fRemoveFilterButton setLayoutData fRemoveFilterButton addSelectionListener SelectionListener widgetSelected SelectionEvent removeFilters
remove Filters public void widget Default Selected Selection Event se  removeFilters widgetDefaultSelected SelectionEvent
private void create Filter Buttons Composite container button container Composite button Container new Composite container SWT NONE Grid Data gd new Grid Data Grid Data FILL VERTICAL button Container set Layout Data gd Grid Layout button Layout new Grid Layout button Layout num Columns 1 button Layout margin Height 0 button Layout margin Width 0 button Container set Layout button Layout Add filter button f Add Filter Button new Button button Container SWT PUSH f Add Filter Button set Text Property Page Messages get String Exception Filter Editor 6 NON NLS 1 f Add Filter Button set Tool Tip Text Property Page Messages get String Exception Filter Editor 7 NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING f Add Filter Button set Layout Data gd f Add Filter Button add Selection Listener new Selection Listener public void widget Selected Selection Event se edit Filter public void widget Default Selected Selection Event se Add type button f Add Type Button new Button button Container SWT PUSH f Add Type Button set Text Property Page Messages get String Exception Filter Editor 8 NON NLS 1 f Add Type Button set Tool Tip Text Property Page Messages get String Exception Filter Editor 9 NON NLS 1 gd get Button Grid Data f Add Type Button f Add Type Button set Layout Data gd f Add Type Button add Selection Listener new Selection Listener public void widget Selected Selection Event se add Type public void widget Default Selected Selection Event se Add package button f Add Package Button new Button button Container SWT PUSH f Add Package Button set Text Property Page Messages get String Exception Filter Editor 10 NON NLS 1 f Add Package Button set Tool Tip Text Property Page Messages get String Exception Filter Editor 11 NON NLS 1 gd get Button Grid Data f Add Package Button f Add Package Button set Layout Data gd f Add Package Button add Selection Listener new Selection Listener public void widget Selected Selection Event se add Package public void widget Default Selected Selection Event se Remove button f Remove Filter Button new Button button Container SWT PUSH f Remove Filter Button set Text Property Page Messages get String Exception Filter Editor 12 NON NLS 1 f Remove Filter Button set Tool Tip Text Property Page Messages get String Exception Filter Editor 13 NON NLS 1 gd get Button Grid Data f Remove Filter Button f Remove Filter Button set Layout Data gd f Remove Filter Button add Selection Listener new Selection Listener public void widget Selected Selection Event se remove Filters public void widget Default Selected Selection Event se f Remove Filter Button set Enabled false  createFilterButtons buttonContainer GridData GridData GridData FILL_VERTICAL buttonContainer setLayoutData GridLayout buttonLayout GridLayout buttonLayout numColumns buttonLayout marginHeight buttonLayout marginWidth buttonContainer setLayout buttonLayout fAddFilterButton buttonContainer fAddFilterButton setText PropertyPageMessages getString ExceptionFilterEditor fAddFilterButton setToolTipText PropertyPageMessages getString ExceptionFilterEditor GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING fAddFilterButton setLayoutData fAddFilterButton addSelectionListener SelectionListener widgetSelected SelectionEvent editFilter widgetDefaultSelected SelectionEvent fAddTypeButton buttonContainer fAddTypeButton setText PropertyPageMessages getString ExceptionFilterEditor fAddTypeButton setToolTipText PropertyPageMessages getString ExceptionFilterEditor getButtonGridData fAddTypeButton fAddTypeButton setLayoutData fAddTypeButton addSelectionListener SelectionListener widgetSelected SelectionEvent addType widgetDefaultSelected SelectionEvent fAddPackageButton buttonContainer fAddPackageButton setText PropertyPageMessages getString ExceptionFilterEditor fAddPackageButton setToolTipText PropertyPageMessages getString ExceptionFilterEditor getButtonGridData fAddPackageButton fAddPackageButton setLayoutData fAddPackageButton addSelectionListener SelectionListener widgetSelected SelectionEvent addPackage widgetDefaultSelected SelectionEvent fRemoveFilterButton buttonContainer fRemoveFilterButton setText PropertyPageMessages getString ExceptionFilterEditor fRemoveFilterButton setToolTipText PropertyPageMessages getString ExceptionFilterEditor getButtonGridData fRemoveFilterButton fRemoveFilterButton setLayoutData fRemoveFilterButton addSelectionListener SelectionListener widgetSelected SelectionEvent removeFilters widgetDefaultSelected SelectionEvent fRemoveFilterButton setEnabled
private Grid Data get Button Grid Data Button button Grid Data gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING GC gc new GC button gc set Font button get Font Font Metrics font Metrics gc get Font Metrics gc dispose int width Hint Dialog convert HorizontalDL Us To Pixels font Metrics I Dialog Constants BUTTON WIDTH gd width Hint Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x gd height Hint Dialog convert VerticalDL Us To Pixels font Metrics I Dialog Constants BUTTON HEIGHT return gd  GridData getButtonGridData GridData GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING setFont getFont FontMetrics fontMetrics getFontMetrics widthHint convertHorizontalDLUsToPixels fontMetrics IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize heightHint convertVerticalDLUsToPixels fontMetrics IDialogConstants BUTTON_HEIGHT
Create a new filter in the table with the default new filter value then open up an in place editor on it private void edit Filter if a previous edit is still in progress finish it if f Editor Text null validate Change And Cleanup f New Filter f Filter Content Provider add Filter NON NLS 1 f New Table Item f Filter Table get Item 0 create configure Text widget for editor Fix for bug 1766 Border behavior on for text fields varies per platform On Motif you always get a border on other platforms you don t Specifying a border on Motif results in the characters getting pushed down so that only there very tops are visible Thus we have to specify different style constants for the different platforms int text Styles SWT SINGLE SWT LEFT if SWT get Platform equals motif NON NLS 1 text Styles SWT BORDER f Editor Text new Text f Filter Table text Styles Grid Data gd new Grid Data Grid Data FILL BOTH f Editor Text set Layout Data gd set the editor f Table Editor horizontal Alignment SWT LEFT f Table Editor grab Horizontal true f Table Editor set Editor f Editor Text f New Table Item 0 get the editor ready to use f Editor Text set Text f New Filter get Name f Editor Text select All set Editor Listeners f Editor Text f Editor Text set Focus  editFilter fEditorText validateChangeAndCleanup fNewFilter fFilterContentProvider addFilter fNewTableItem fFilterTable getItem textStyles getPlatform textStyles fEditorText fFilterTable textStyles GridData GridData GridData FILL_BOTH fEditorText setLayoutData fTableEditor horizontalAlignment fTableEditor grabHorizontal fTableEditor setEditor fEditorText fNewTableItem fEditorText setText fNewFilter getName fEditorText selectAll setEditorListeners fEditorText fEditorText setFocus
text add Key Listener new Key Adapter public void key Released Key Event event if event character SWT CR if f Invalid Editor Text null f Editor Text set Text f Invalid Editor Text f Invalid Editor Text null else validate Change And Cleanup else if event character SWT ESC remove New Filter cleanup Editor  addKeyListener KeyAdapter keyReleased KeyEvent fInvalidEditorText fEditorText setText fInvalidEditorText fInvalidEditorText validateChangeAndCleanup removeNewFilter cleanupEditor
text add Focus Listener new Focus Adapter public void focus Lost Focus Event event if f Invalid Editor Text null f Editor Text set Text f Invalid Editor Text f Invalid Editor Text null else validate Change And Cleanup  addFocusListener FocusAdapter focusLost FocusEvent fInvalidEditorText fEditorText setText fInvalidEditorText fInvalidEditorText validateChangeAndCleanup
CR in the text field closes the entire dialog text add Listener SWT Traverse new Listener public void handle Event Event event event doit false  addListener handleEvent
private void set Editor Listeners Text text CR means commit the changes ESC means abort and don t commit text add Key Listener new Key Adapter public void key Released Key Event event if event character SWT CR if f Invalid Editor Text null f Editor Text set Text f Invalid Editor Text f Invalid Editor Text null else validate Change And Cleanup else if event character SWT ESC remove New Filter cleanup Editor Consider loss of focus on the editor to mean the same as CR text add Focus Listener new Focus Adapter public void focus Lost Focus Event event if f Invalid Editor Text null f Editor Text set Text f Invalid Editor Text f Invalid Editor Text null else validate Change And Cleanup Consume traversal events from the text widget so that CR doesn t traverse away to dialog s default button Without this hitting CR in the text field closes the entire dialog text add Listener SWT Traverse new Listener public void handle Event Event event event doit false  setEditorListeners addKeyListener KeyAdapter keyReleased KeyEvent fInvalidEditorText fEditorText setText fInvalidEditorText fInvalidEditorText validateChangeAndCleanup removeNewFilter cleanupEditor addFocusListener FocusAdapter focusLost FocusEvent fInvalidEditorText fEditorText setText fInvalidEditorText fInvalidEditorText validateChangeAndCleanup addListener handleEvent
private void validate Change And Cleanup String trimmed Value f Editor Text get Text trim if the new value is blank remove the filter if trimmed Value length 1 remove New Filter if it s invalid beep and leave sitting in the editor else if validate Editor Input trimmed Value f Invalid Editor Text trimmed Value f Editor Text set Text Property Page Messages get String Exception Filter Editor 14 NON NLS 1 f Editor Text get Display beep return otherwise commit the new value if not a duplicate else Object filters f Filter Content Provider get Elements null for int i 0 i filters length i Filter filter Filter filters i if filter get Name equals trimmed Value remove New Filter cleanup Editor return f New Table Item set Text trimmed Value f New Filter set Name trimmed Value f Filter Viewer refresh cleanup Editor  validateChangeAndCleanup trimmedValue fEditorText getText trimmedValue removeNewFilter validateEditorInput trimmedValue fInvalidEditorText trimmedValue fEditorText setText PropertyPageMessages getString ExceptionFilterEditor fEditorText getDisplay fFilterContentProvider getElements getName trimmedValue removeNewFilter cleanupEditor fNewTableItem setText trimmedValue fNewFilter setName trimmedValue fFilterViewer cleanupEditor
A valid filter is simply one that is a valid Java identifier and as defined in the JDI spec the regular expressions used for scoping must be limited to exact matches or patterns that begin with or end with Beyond this a string cannot be validated as corresponding to an existing type or package and this is probably not even desirable private boolean validate Editor Input String trimmed Value char first Char trimmed Value char At 0 if Character is Java Identifier Start first Char if first Char return false int length trimmed Value length for int i 1 i length i char c trimmed Value char At i if Character is Java Identifier Part c if c i length 1 continue if c i length 1 continue return false return true  validateEditorInput trimmedValue firstChar trimmedValue charAt isJavaIdentifierStart firstChar firstChar trimmedValue trimmedValue charAt isJavaIdentifierPart
f Table Editor set Editor null null 0 f Editor Text get Display async Exec new Runnable public void run f Editor Text dispose f Editor Text null  fTableEditor setEditor fEditorText getDisplay asyncExec fEditorText fEditorText
Cleanup all widgetry resources used by the in place editing private void cleanup Editor if f Editor Text null f New Filter null f New Table Item null f Table Editor set Editor null null 0 f Editor Text get Display async Exec new Runnable public void run f Editor Text dispose f Editor Text null  cleanupEditor fEditorText fNewFilter fNewTableItem fTableEditor setEditor fEditorText getDisplay asyncExec fEditorText fEditorText
private void remove Filters I Structured Selection selection I Structured Selection f Filter Viewer get Selection f Filter Content Provider remove Filters selection to Array  removeFilters IStructuredSelection IStructuredSelection fFilterViewer getSelection fFilterContentProvider removeFilters toArray
private void remove New Filter f Filter Content Provider remove Filters new Object f New Filter  removeNewFilter fFilterContentProvider removeFilters fNewFilter
private void add Package Shell shell f Add Package Button get Display get Active Shell Element List Selection Dialog dialog null try dialog JDI DebugUI Plugin create All Packages Dialog shell null false catch Java Model Exception jme String title Property Page Messages get String Exception Filter Editor 15 NON NLS 1 String message Property Page Messages get String Exception Filter Editor 16 NON NLS 1 Exception Handler handle jme title message return if dialog null return dialog set Title Property Page Messages get String Exception Filter Editor 15 NON NLS 1 dialog set Message Property Page Messages get String Exception Filter Editor 18 NON NLS 1 dialog set Multiple Selection true if dialog open I Dialog Constants CANCEL ID return Object packages dialog get Result if packages null for int i 0 i packages length i I Java Element pkg I Java Element packages i String filter pkg get Element Name if filter length 1 filter DEFAULT PACKAGE else filter NON NLS 1 Filter f f Filter Content Provider add Filter filter f Filter Content Provider check Filter f true  addPackage fAddPackageButton getDisplay getActiveShell ElementListSelectionDialog JDIDebugUIPlugin createAllPackagesDialog JavaModelException PropertyPageMessages getString ExceptionFilterEditor PropertyPageMessages getString ExceptionFilterEditor ExceptionHandler setTitle PropertyPageMessages getString ExceptionFilterEditor setMessage PropertyPageMessages getString ExceptionFilterEditor setMultipleSelection IDialogConstants CANCEL_ID getResult IJavaElement IJavaElement getElementName DEFAULT_PACKAGE fFilterContentProvider addFilter fFilterContentProvider checkFilter
private void add Type Shell shell f Add Type Button get Display get Active Shell Selection Dialog dialog null try dialog JavaUI create Type Dialog shell PlatformUI get Workbench get Progress Service Search Engine create Workspace Scope I Java Element Search Constants CONSIDER CLASSES false catch Java Model Exception jme String title Property Page Messages get String Exception Filter Editor 19 NON NLS 1 String message Property Page Messages get String Exception Filter Editor 20 NON NLS 1 Exception Handler handle jme title message return dialog set Title Property Page Messages get String Exception Filter Editor 19 NON NLS 1 dialog set Message Property Page Messages get String Exception Filter Editor 22 NON NLS 1 if dialog open I Dialog Constants CANCEL ID return Object types dialog get Result I Type type if types null for int i 0 i types length i type I Type types i Filter f f Filter Content Provider add Filter type get Fully Qualified Name f Filter Content Provider check Filter f true  addType fAddTypeButton getDisplay getActiveShell SelectionDialog createTypeDialog getWorkbench getProgressService SearchEngine createWorkspaceScope IJavaElementSearchConstants CONSIDER_CLASSES JavaModelException PropertyPageMessages getString ExceptionFilterEditor PropertyPageMessages getString ExceptionFilterEditor ExceptionHandler setTitle PropertyPageMessages getString ExceptionFilterEditor setMessage PropertyPageMessages getString ExceptionFilterEditor IDialogConstants CANCEL_ID getResult IType IType fFilterContentProvider addFilter getFullyQualifiedName fFilterContentProvider checkFilter
private List f Filters public Filter Content Provider Checkbox Table Viewer viewer f Viewer viewer populate Filters  fFilters FilterContentProvider CheckboxTableViewer fViewer populateFilters
protected void populate Filters String i Filters null String e Filters null try i Filters f Breakpoint get Inclusion Filters e Filters f Breakpoint get Exclusion Filters catch Core Exception ce JDI DebugUI Plugin log ce i Filters new String e Filters new String f Filters new Array List populate Filters i Filters true populate Filters e Filters false  populateFilters iFilters eFilters iFilters fBreakpoint getInclusionFilters eFilters fBreakpoint getExclusionFilters CoreException JDIDebugUIPlugin iFilters eFilters fFilters ArrayList populateFilters iFilters populateFilters eFilters
protected void populate Filters String filters boolean checked for int i 0 i filters length i String name filters i if name length 0 name DEFAULT PACKAGE Filter filter add Filter name check Filter filter checked  populateFilters DEFAULT_PACKAGE addFilter checkFilter
public Filter add Filter String name Filter filter new Filter name false if f Filters contains filter f Filters add filter f Viewer add filter return filter  addFilter fFilters fFilters fViewer
public void remove Filters Object filters for int i 0 i filters length i Filter filter Filter filters i f Filters remove filter f Viewer remove filters  removeFilters fFilters fViewer
public void toggle Filter Filter filter boolean new State filter is Checked filter set Checked new State f Viewer set Checked filter new State  toggleFilter newState isChecked setChecked newState fViewer setChecked newState
public void check Filter Filter filter boolean checked filter set Checked checked f Viewer set Checked filter checked  checkFilter setChecked fViewer setChecked
see I Structured Content Provider get Elements Object public Object get Elements Object input Element return f Filters to Array  IStructuredContentProvider getElements getElements inputElement fFilters toArray
see I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
see I Content Provider dispose public void dispose  IContentProvider

public Instance Filter Editor Composite parent I Java Breakpoint breakpoint f Breakpoint breakpoint f Content Provider new Instance Filter Content Provider f Check Handler new Check Handler Label label new Label parent SWT NONE label set Font parent get Font label set Text Property Page Messages get String Instance Filter Editor 0 NON NLS 1 f Parent parent f Outer new Composite parent SWT NONE f Outer set Font parent get Font Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 layout num Columns 2 f Outer set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH f Outer set Layout Data data create Viewer  InstanceFilterEditor IJavaBreakpoint fBreakpoint fContentProvider InstanceFilterContentProvider fCheckHandler CheckHandler setFont getFont setText PropertyPageMessages getString InstanceFilterEditor fParent fOuter fOuter setFont getFont GridLayout GridLayout marginWidth marginHeight numColumns fOuter setLayout GridData GridData GridData FILL_BOTH fOuter setLayoutData createViewer
Create and initialize the thread filter tree viewer protected void create Viewer Grid Data data new Grid Data Grid Data FILL BOTH data height Hint 100 f Instance Viewer Checkbox Table Viewer new Check List f Parent SWT BORDER f Instance Viewer add Check State Listener f Check Handler f Instance Viewer get Table set Layout Data data f Instance Viewer set Content Provider f Content Provider I Debug Model Presentation pres DebugUI Tools new Debug Model Presentation pres set Attribute JDI Model Presentation DISPLAY QUALIFIED NAMES new Boolean true f Instance Viewer set Label Provider pres f Instance Viewer set Input f Breakpoint set Initial Checked State  createViewer GridData GridData GridData FILL_BOTH heightHint fInstanceViewer CheckboxTableViewer newCheckList fParent fInstanceViewer addCheckStateListener fCheckHandler fInstanceViewer getTable setLayoutData fInstanceViewer setContentProvider fContentProvider IDebugModelPresentation DebugUITools newDebugModelPresentation setAttribute JDIModelPresentation DISPLAY_QUALIFIED_NAMES fInstanceViewer setLabelProvider fInstanceViewer setInput fBreakpoint setInitialCheckedState
Sets the initial checked state of the tree viewer The initial state should reflect the current state of the breakpoint If the breakpoint has a thread filter in a given thread that thread should be checked protected void set Initial Checked State try I Java Object objects f Breakpoint get Instance Filters for int i 0 i objects length i f Check Handler check Object objects i true catch Core Exception e JDI DebugUI Plugin log e  setInitialCheckedState IJavaObject fBreakpoint getInstanceFilters fCheckHandler checkObject CoreException JDIDebugUIPlugin
protected void do Store try I Java Object objects f Breakpoint get Instance Filters for int i 0 i objects length i if f Instance Viewer get Checked objects i f Breakpoint remove Instance Filter objects i catch Core Exception e JDI DebugUI Plugin log e  doStore IJavaObject fBreakpoint getInstanceFilters fInstanceViewer getChecked fBreakpoint removeInstanceFilter CoreException JDIDebugUIPlugin
class Check Handler implements I Check State Listener public void check State Changed Check State Changed Event event f Instance Viewer set Checked event get Element event get Checked  CheckHandler ICheckStateListener checkStateChanged CheckStateChangedEvent fInstanceViewer setChecked getElement getChecked
public void check Object I Java Object object boolean checked f Instance Viewer set Checked object checked  checkObject IJavaObject fInstanceViewer setChecked
see I Tree Content Provider get Children Object public Object get Children Object parent if parent instanceof I Java Breakpoint try return I Java Breakpoint parent get Instance Filters catch Core Exception e JDI DebugUI Plugin log e return new Object 0  ITreeContentProvider getChildren getChildren IJavaBreakpoint IJavaBreakpoint getInstanceFilters CoreException JDIDebugUIPlugin
see I Tree Content Provider get Parent Object public Object get Parent Object element if element instanceof I Java Object return f Breakpoint return null  ITreeContentProvider getParent getParent IJavaObject fBreakpoint
see I Tree Content Provider has Children Object public boolean has Children Object element if element instanceof I Java Breakpoint return get Children element length 0 return false  ITreeContentProvider hasChildren hasChildren IJavaBreakpoint getChildren
see I Structured Content Provider get Elements Object public Object get Elements Object input Element return get Children input Element  IStructuredContentProvider getElements getElements inputElement getChildren inputElement
see I Content Provider dispose public void dispose  IContentProvider
see I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput

see org eclipse jface preference I Preference Page perform Ok public boolean perform Ok do Store return super perform Ok  IPreferencePage performOk performOk doStore performOk
Stores the values configured in this page protected void do Store f Thread Filter Editor do Store if f Instance Filter Editor null f Instance Filter Editor do Store  doStore fThreadFilterEditor doStore fInstanceFilterEditor fInstanceFilterEditor doStore
see org eclipse jface preference Preference Page create Contents org eclipse swt widgets Composite protected Control create Contents Composite parent no Default And Apply Button Composite main Composite new Composite parent SWT NONE main Composite set Font parent get Font main Composite set Layout new Grid Layout main Composite set Layout Data new Grid Data Grid Data FILL BOTH create Thread Filter Editor main Composite create Type Specific Editors main Composite create Instance Filter Editor main Composite set Valid true return main Composite  PreferencePage createContents createContents noDefaultAndApplyButton mainComposite mainComposite setFont getFont mainComposite setLayout GridLayout mainComposite setLayoutData GridData GridData FILL_BOTH createThreadFilterEditor mainComposite createTypeSpecificEditors mainComposite createInstanceFilterEditor mainComposite setValid mainComposite
public void create Instance Filter Editor Composite parent I Java Breakpoint breakpoint get Breakpoint try I Java Object instances breakpoint get Instance Filters if instances length 0 f Instance Filter Editor new Instance Filter Editor parent breakpoint catch Core Exception e JDI DebugUI Plugin log e  createInstanceFilterEditor IJavaBreakpoint getBreakpoint IJavaObject getInstanceFilters fInstanceFilterEditor InstanceFilterEditor CoreException JDIDebugUIPlugin
Allow subclasses to create type specific editors param parent protected void create Type Specific Editors Composite parent Do nothing  createTypeSpecificEditors
protected void create Thread Filter Editor Composite parent f Thread Filter Editor new Thread Filter Editor parent this  createThreadFilterEditor fThreadFilterEditor ThreadFilterEditor
public I Java Breakpoint get Breakpoint return I Java Breakpoint get Element  IJavaBreakpoint getBreakpoint IJavaBreakpoint getElement

public boolean perform Ok I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception do Store  performOk IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException doStore
Store the breakpoint properties see org eclipse jface preference I Preference Page perform Ok public boolean perform Ok I Workspace Runnable wr new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception do Store try Resources Plugin get Workspace run wr null 0 null catch Core Exception e JDI DebugUI Plugin error Dialog Property Page Messages get String Java Breakpoint Page 1 e NON NLS 1 JDI DebugUI Plugin log e return super perform Ok  IPreferencePage performOk performOk IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException doStore ResourcesPlugin getWorkspace CoreException JDIDebugUIPlugin errorDialog PropertyPageMessages getString JavaBreakpointPage JDIDebugUIPlugin performOk
Adds the given error message to the errors currently displayed on this page The page displays the most recently added error message Clients should retain messages that are passed into this method as the message should later be passed into remove Error Message String to clear the error This method should be used instead of set Error Message String param message the error message to display on this page public void add Error Message String message if message null return f Error Messages remove message f Error Messages add message set Error Message message set Valid false  removeErrorMessage setErrorMessage addErrorMessage fErrorMessages fErrorMessages setErrorMessage setValid
deprecated Call add Error Message String message instead see org eclipse jface dialogs Dialog Page set Error Message java lang String public void set Error Message String new Message super set Error Message new Message  addErrorMessage DialogPage setErrorMessage setErrorMessage newMessage setErrorMessage newMessage
Removes the given error message from the errors currently displayed on this page When an error message is removed the page displays the error that was added before the given message This is akin to popping the message from a stack Clients should call this method instead of set Error Message null param message the error message to clear public void remove Error Message String message f Error Messages remove message if f Error Messages is Empty set Error Message null set Valid true else set Error Message String f Error Messages get f Error Messages size 1  setErrorMessage removeErrorMessage fErrorMessages fErrorMessages isEmpty setErrorMessage setValid setErrorMessage fErrorMessages fErrorMessages
Stores the values configured in this page This method should be called from within a workspace runnable to reduce the number of resource deltas protected void do Store throws Core Exception I Java Breakpoint breakpoint get Breakpoint store Suspend Policy breakpoint store Hit Count breakpoint store Enabled breakpoint  doStore CoreException IJavaBreakpoint getBreakpoint storeSuspendPolicy storeHitCount storeEnabled
Stores the value of the enabled state in the breakpoint param breakpoint the breakpoint to update throws Core Exception if an exception occurs while setting the enabled state private void store Enabled I Java Breakpoint breakpoint throws Core Exception boolean enabled f Enabled Button get Selection breakpoint set Enabled enabled  CoreException storeEnabled IJavaBreakpoint CoreException fEnabledButton getSelection setEnabled
Stores the value of the hit count in the breakpoint param breakpoint the breakpoint to update throws Core Exception if an exception occurs while setting the hit count private void store Hit Count I Java Breakpoint breakpoint throws Core Exception boolean hit Count Enabled f Hit Count Button get Selection int hit Count 1 if hit Count Enabled try hit Count Integer parse Int f Hit Count Text get Text catch Number Format Exception e JDI DebugUI Plugin log new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Status ERROR Message Format format Property Page Messages get String Java Breakpoint Page 2 new String f Hit Count Text get Text e NON NLS 1 breakpoint set Hit Count hit Count  CoreException storeHitCount IJavaBreakpoint CoreException hitCountEnabled fHitCountButton getSelection hitCount hitCountEnabled hitCount parseInt fHitCountText getText NumberFormatException JDIDebugUIPlugin IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus MessageFormat PropertyPageMessages getString JavaBreakpointPage fHitCountText getText setHitCount hitCount
Stores the value of the suspend policy in the breakpoint param breakpoint the breakpoint to update throws Core Exception if an exception occurs while setting the suspend policy private void store Suspend Policy I Java Breakpoint breakpoint throws Core Exception int suspend Policy I Java Breakpoint SUSPEND VM if f Suspend Thread Button get Selection suspend Policy I Java Breakpoint SUSPEND THREAD breakpoint set Suspend Policy suspend Policy  CoreException storeSuspendPolicy IJavaBreakpoint CoreException suspendPolicy IJavaBreakpoint SUSPEND_VM fSuspendThreadButton getSelection suspendPolicy IJavaBreakpoint SUSPEND_THREAD setSuspendPolicy suspendPolicy
Creates the labels and editors displayed for the breakpoint see org eclipse jface preference Preference Page create Contents org eclipse swt widgets Composite protected Control create Contents Composite parent no Default And Apply Button Composite main Composite create Composite parent 1 create Labels main Composite try create Enabled Button main Composite create Hit Count Editor main Composite create Type Specific Editors main Composite create Suspend Policy Editor main Composite Suspend policy is considered uncommon Add it last catch Core Exception e JDI DebugUI Plugin log e set Valid true return main Composite  PreferencePage createContents createContents noDefaultAndApplyButton mainComposite createComposite createLabels mainComposite createEnabledButton mainComposite createHitCountEditor mainComposite createTypeSpecificEditors mainComposite createSuspendPolicyEditor mainComposite CoreException JDIDebugUIPlugin setValid mainComposite
Creates the labels displayed for the breakpoint param parent protected void create Labels Composite parent I Java Breakpoint breakpoint I Java Breakpoint get Element Composite label Composite create Composite parent 2 try String type Name breakpoint get Type Name if type Name null create Label label Composite Property Page Messages get String Java Breakpoint Page 3 NON NLS 1 create Label label Composite type Name create Type Specific Labels label Composite catch Core Exception ce JDI DebugUI Plugin log ce  createLabels IJavaBreakpoint IJavaBreakpoint getElement labelComposite createComposite typeName getTypeName typeName createLabel labelComposite PropertyPageMessages getString JavaBreakpointPage createLabel labelComposite typeName createTypeSpecificLabels labelComposite CoreException JDIDebugUIPlugin
Creates the editor for configuring the suspend policy suspend VM or suspend thread of the breakpoint param parent the composite in which the suspend policy editor will be created private void create Suspend Policy Editor Composite parent throws Core Exception I Java Breakpoint breakpoint get Breakpoint create Label parent Property Page Messages get String Java Breakpoint Page 6 NON NLS 1 boolean suspend Thread breakpoint get Suspend Policy I Java Breakpoint SUSPEND THREAD Composite radio Composite create Composite parent 2 f Suspend Thread Button create Radio Button radio Composite Property Page Messages get String Java Breakpoint Page 7 NON NLS 1 f Suspend Thread Button set Selection suspend Thread f SuspendVM Button create Radio Button radio Composite Property Page Messages get String Java Breakpoint Page 8 NON NLS 1 f SuspendVM Button set Selection suspend Thread  createSuspendPolicyEditor CoreException IJavaBreakpoint getBreakpoint createLabel PropertyPageMessages getString JavaBreakpointPage suspendThread getSuspendPolicy IJavaBreakpoint SUSPEND_THREAD radioComposite createComposite fSuspendThreadButton createRadioButton radioComposite PropertyPageMessages getString JavaBreakpointPage fSuspendThreadButton setSelection suspendThread fSuspendVMButton createRadioButton radioComposite PropertyPageMessages getString JavaBreakpointPage fSuspendVMButton setSelection suspendThread
param parent the composite in which the hit count editor will be created private void create Hit Count Editor Composite parent throws Core Exception I Java Breakpoint breakpoint get Breakpoint Composite hit Count Composite create Composite parent 2 f Hit Count Button create Check Button hit Count Composite Property Page Messages get String Java Breakpoint Page 4 NON NLS 1 f Hit Count Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event f Hit Count Text set Enabled f Hit Count Button get Selection hit Count Changed int hit Count breakpoint get Hit Count String hit Count String NON NLS 1 if hit Count 0 hit Count String new Integer hit Count to String f Hit Count Button set Selection true else f Hit Count Button set Selection false f Hit Count Text create Text hit Count Composite hit Count String NON NLS 1 if hit Count 0 f Hit Count Text set Enabled false f Hit Count Text add Modify Listener new Modify Listener public void modify Text Modify Event e hit Count Changed  createHitCountEditor CoreException IJavaBreakpoint getBreakpoint hitCountComposite createComposite fHitCountButton createCheckButton hitCountComposite PropertyPageMessages getString JavaBreakpointPage fHitCountButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fHitCountText setEnabled fHitCountButton getSelection hitCountChanged hitCount getHitCount hitCountString hitCount hitCountString hitCount toString fHitCountButton setSelection fHitCountButton setSelection fHitCountText createText hitCountComposite hitCountString hitCount fHitCountText setEnabled fHitCountText addModifyListener ModifyListener modifyText ModifyEvent hitCountChanged
Validates the current state of the hit count editor Hit count value must be a positive integer private void hit Count Changed if f Hit Count Button get Selection remove Error Message fg Hit Count Error Message return String hit Count Text f Hit Count Text get Text int hit Count 1 try hit Count Integer parse Int hit Count Text catch Number Format Exception e1 add Error Message fg Hit Count Error Message return if hit Count 1 add Error Message fg Hit Count Error Message else if fg Hit Count Error Message equals get Error Message remove Error Message fg Hit Count Error Message  hitCountChanged fHitCountButton getSelection removeErrorMessage fgHitCountErrorMessage hitCountText fHitCountText getText hitCount hitCount parseInt hitCountText NumberFormatException addErrorMessage fgHitCountErrorMessage hitCount addErrorMessage fgHitCountErrorMessage fgHitCountErrorMessage getErrorMessage removeErrorMessage fgHitCountErrorMessage
Creates the button to toggle enablement of the breakpoint param parent throws Core Exception protected void create Enabled Button Composite parent throws Core Exception f Enabled Button create Check Button parent Property Page Messages get String Java Breakpoint Page 5 NON NLS 1 f Enabled Button set Selection get Breakpoint is Enabled  CoreException createEnabledButton CoreException fEnabledButton createCheckButton PropertyPageMessages getString JavaBreakpointPage fEnabledButton setSelection getBreakpoint isEnabled
Returns the breakpoint that this preference page configures return the breakpoint this page configures protected I Java Breakpoint get Breakpoint return I Java Breakpoint get Element  IJavaBreakpoint getBreakpoint IJavaBreakpoint getElement
Allows subclasses to add type specific labels to the common Java breakpoint page param parent protected void create Type Specific Labels Composite parent Do nothing  createTypeSpecificLabels
Allows subclasses to add type specific editors to the common Java breakpoint page param parent protected void create Type Specific Editors Composite parent throws Core Exception Do nothing  createTypeSpecificEditors CoreException
Creates a fully configured text editor with the given initial value param parent param initial Value return the configured text editor protected Text create Text Composite parent String initial Value Composite text Composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 text Composite set Layout layout text Composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL text Composite set Font parent get Font Text text new Text text Composite SWT SINGLE SWT BORDER text set Text initial Value text set Font parent get Font text set Layout Data new Grid Data Grid Data FILL HORIZONTAL return text  initialValue createText initialValue textComposite GridLayout GridLayout numColumns marginHeight marginWidth textComposite setLayout textComposite setLayoutData GridData GridData FILL_HORIZONTAL textComposite setFont getFont textComposite setText initialValue setFont getFont setLayoutData GridData GridData FILL_HORIZONTAL
Creates a fully configured composite with the given number of columns param parent param num Columns return the configured composite protected Composite create Composite Composite parent int num Columns Composite composit new Composite parent SWT NONE composit set Font parent get Font Grid Layout layout new Grid Layout layout num Columns num Columns layout margin Width 0 layout margin Height 0 composit set Layout layout composit set Layout Data new Grid Data Grid Data FILL HORIZONTAL return composit  numColumns createComposite numColumns setFont getFont GridLayout GridLayout numColumns numColumns marginWidth marginHeight setLayout setLayoutData GridData GridData FILL_HORIZONTAL
Creates a fully configured check button with the given text param parent the parent composite param text the label of the returned check button return a fully configured check button protected Button create Check Button Composite parent String text Button button new Button parent SWT CHECK SWT LEFT button set Text text button set Font parent get Font button set Layout Data new Grid Data return button  createCheckButton setText setFont getFont setLayoutData GridData
Creates a fully configured label with the given text param parent the parent composite param text the test of the returned label return a fully configured label protected Label create Label Composite parent String text Label label new Label parent SWT NONE label set Text text label set Font parent get Font label set Layout Data new Grid Data return label  createLabel setText setFont getFont setLayoutData GridData
Creates a fully configured radio button with the given text param parent the parent composite param text the label of the returned radio button return a fully configured radio button protected Button create Radio Button Composite parent String text Button button new Button parent SWT RADIO SWT LEFT button set Text text button set Font parent get Font button set Layout Data new Grid Data return button  createRadioButton setText setFont getFont setLayoutData GridData

see org eclipse jdt internal debug ui propertypages Java Breakpoint Advanced Page do Store protected void do Store super do Store f Filter Editor do Store  JavaBreakpointAdvancedPage doStore doStore doStore fFilterEditor doStore
protected void create Type Specific Editors Composite parent f Filter Editor new Exception Filter Editor parent this  createTypeSpecificEditors fFilterEditor ExceptionFilterEditor
protected Button create Button Composite parent String text Button button new Button parent SWT CHECK SWT LEFT button set Text text button set Font parent get Font button set Layout Data new Grid Data return button  createButton setText setFont getFont setLayoutData GridData

private static final String fg Exception Breakpoint Error Property Page Messages get String Java Exception Breakpoint Page 2 NON NLS 1 see org eclipse jdt internal debug ui propertypages Java Breakpoint Page do Store protected void do Store throws Core Exception super do Store I Java Exception Breakpoint breakpoint I Java Exception Breakpoint get Breakpoint boolean caught f Caught Button get Selection if caught breakpoint is Caught breakpoint set Caught caught boolean uncaught f Uncaught Button get Selection if uncaught breakpoint is Uncaught breakpoint set Uncaught uncaught  fgExceptionBreakpointError PropertyPageMessages getString JavaExceptionBreakpointPage JavaBreakpointPage doStore doStore CoreException doStore IJavaExceptionBreakpoint IJavaExceptionBreakpoint getBreakpoint fCaughtButton getSelection isCaught setCaught fUncaughtButton getSelection isUncaught setUncaught
I Java Exception Breakpoint breakpoint I Java Exception Breakpoint get Breakpoint Selection Adapter exception Breakpoint Validator new Selection Adapter public void widget Selected Selection Event e validate Exception Breakpoint  IJavaExceptionBreakpoint IJavaExceptionBreakpoint getBreakpoint SelectionAdapter exceptionBreakpointValidator SelectionAdapter widgetSelected SelectionEvent validateExceptionBreakpoint
see org eclipse jdt internal debug ui propertypages Java Breakpoint Page create Type Specific Editors org eclipse swt widgets Composite protected void create Type Specific Editors Composite parent I Java Exception Breakpoint breakpoint I Java Exception Breakpoint get Breakpoint Selection Adapter exception Breakpoint Validator new Selection Adapter public void widget Selected Selection Event e validate Exception Breakpoint create Label parent Property Page Messages get String Java Exception Breakpoint Page 3 NON NLS 1 f Enabled Button add Selection Listener exception Breakpoint Validator f Caught Button create Check Button parent Property Page Messages get String Java Exception Breakpoint Page 0 NON NLS 1 try f Caught Button set Selection breakpoint is Caught catch Core Exception e JDI Debug Plugin log e f Caught Button add Selection Listener exception Breakpoint Validator f Uncaught Button create Check Button parent Property Page Messages get String Java Exception Breakpoint Page 1 NON NLS 1 try f Uncaught Button set Selection breakpoint is Uncaught catch Core Exception e JDI Debug Plugin log e f Uncaught Button add Selection Listener exception Breakpoint Validator  JavaBreakpointPage createTypeSpecificEditors createTypeSpecificEditors IJavaExceptionBreakpoint IJavaExceptionBreakpoint getBreakpoint SelectionAdapter exceptionBreakpointValidator SelectionAdapter widgetSelected SelectionEvent validateExceptionBreakpoint createLabel PropertyPageMessages getString JavaExceptionBreakpointPage fEnabledButton addSelectionListener exceptionBreakpointValidator fCaughtButton createCheckButton PropertyPageMessages getString JavaExceptionBreakpointPage fCaughtButton setSelection isCaught CoreException JDIDebugPlugin fCaughtButton addSelectionListener exceptionBreakpointValidator fUncaughtButton createCheckButton PropertyPageMessages getString JavaExceptionBreakpointPage fUncaughtButton setSelection isUncaught CoreException JDIDebugPlugin fUncaughtButton addSelectionListener exceptionBreakpointValidator
private void validate Exception Breakpoint if f Enabled Button get Selection f Caught Button get Selection f Uncaught Button get Selection add Error Message fg Exception Breakpoint Error else remove Error Message fg Exception Breakpoint Error  validateExceptionBreakpoint fEnabledButton getSelection fCaughtButton getSelection fUncaughtButton getSelection addErrorMessage fgExceptionBreakpointError removeErrorMessage fgExceptionBreakpointError

see org eclipse jdt internal debug ui propertypages Java Breakpoint Page do Store protected void do Store throws Core Exception I Java Line Breakpoint breakpoint I Java Line Breakpoint get Breakpoint super do Store if f Condition Editor null boolean enable Condition f Enable Condition Button get Selection String condition f Condition Editor get Condition boolean suspend On True f Condition Is True get Selection if breakpoint is Condition Enabled enable Condition breakpoint set Condition Enabled enable Condition if condition equals breakpoint get Condition breakpoint set Condition condition if breakpoint is Condition Suspend On True suspend On True breakpoint set Condition Suspend On True suspend On True if breakpoint instanceof I Java Watchpoint I Java Watchpoint watchpoint I Java Watchpoint get Breakpoint boolean access f Field Access get Selection boolean modification f Field Modification get Selection if access watchpoint is Access watchpoint set Access access if modification watchpoint is Modification watchpoint set Modification modification if breakpoint instanceof I Java Method Breakpoint I Java Method Breakpoint method Breakpoint I Java Method Breakpoint get Breakpoint boolean entry f Method Entry get Selection boolean exit f Method Exit get Selection if entry method Breakpoint is Entry method Breakpoint set Entry entry if exit method Breakpoint is Exit method Breakpoint set Exit exit  JavaBreakpointPage doStore doStore CoreException IJavaLineBreakpoint IJavaLineBreakpoint getBreakpoint doStore fConditionEditor enableCondition fEnableConditionButton getSelection fConditionEditor getCondition suspendOnTrue fConditionIsTrue getSelection isConditionEnabled enableCondition setConditionEnabled enableCondition getCondition setCondition isConditionSuspendOnTrue suspendOnTrue setConditionSuspendOnTrue suspendOnTrue IJavaWatchpoint IJavaWatchpoint IJavaWatchpoint getBreakpoint fFieldAccess getSelection fFieldModification getSelection isAccess setAccess isModification setModification IJavaMethodBreakpoint IJavaMethodBreakpoint methodBreakpoint IJavaMethodBreakpoint getBreakpoint fMethodEntry getSelection fMethodExit getSelection methodBreakpoint isEntry methodBreakpoint setEntry methodBreakpoint isExit methodBreakpoint setExit
see org eclipse jdt internal debug ui propertypages Java Breakpoint Page create Type Specific Labels org eclipse swt widgets Composite protected void create Type Specific Labels Composite parent Line number I Java Line Breakpoint breakpoint I Java Line Breakpoint get Breakpoint String Buffer line Number new String Buffer 4 try int l Number breakpoint get Line Number if l Number 0 line Number append l Number catch Core Exception ce JDI DebugUI Plugin log ce if line Number length 0 create Label parent Property Page Messages get String Java Line Breakpoint Page 2 NON NLS 1 create Label parent line Number to String Member try I Member member Breakpoint Utils get Member breakpoint if member null return String label Property Page Messages get String Java Line Breakpoint Page 3 NON NLS 1 String member Name f Java Label Provider get Text member if breakpoint instanceof I Java Method Breakpoint label Property Page Messages get String Java Line Breakpoint Page 4 NON NLS 1 else if breakpoint instanceof I Java Watchpoint label Property Page Messages get String Java Line Breakpoint Page 5 NON NLS 1 create Label parent label create Label parent member Name catch Core Exception exception JDI DebugUI Plugin log exception  JavaBreakpointPage createTypeSpecificLabels createTypeSpecificLabels IJavaLineBreakpoint IJavaLineBreakpoint getBreakpoint StringBuffer lineNumber StringBuffer lNumber getLineNumber lNumber lineNumber lNumber CoreException JDIDebugUIPlugin lineNumber createLabel PropertyPageMessages getString JavaLineBreakpointPage createLabel lineNumber toString IMember BreakpointUtils getMember PropertyPageMessages getString JavaLineBreakpointPage memberName fJavaLabelProvider getText IJavaMethodBreakpoint PropertyPageMessages getString JavaLineBreakpointPage IJavaWatchpoint PropertyPageMessages getString JavaLineBreakpointPage createLabel createLabel memberName CoreException JDIDebugUIPlugin
I Java Watchpoint watchpoint I Java Watchpoint get Breakpoint Selection Adapter watchpoint Validator new Selection Adapter public void widget Selected Selection Event e validate Watchpoint  IJavaWatchpoint IJavaWatchpoint getBreakpoint SelectionAdapter watchpointValidator SelectionAdapter widgetSelected SelectionEvent validateWatchpoint
I Java Method Breakpoint method Breakpoint I Java Method Breakpoint get Breakpoint Selection Adapter method Breakpoint Validator new Selection Adapter public void widget Selected Selection Event e validate Method Breakpoint  IJavaMethodBreakpoint methodBreakpoint IJavaMethodBreakpoint getBreakpoint SelectionAdapter methodBreakpointValidator SelectionAdapter widgetSelected SelectionEvent validateMethodBreakpoint
Create the condition editor and associated editors see org eclipse jdt internal debug ui propertypages Java Breakpoint Page create Type Specific Editors org eclipse swt widgets Composite protected void create Type Specific Editors Composite parent throws Core Exception I Java Line Breakpoint breakpoint I Java Line Breakpoint get Breakpoint if breakpoint supports Condition create Condition Editor parent if breakpoint instanceof I Java Watchpoint I Java Watchpoint watchpoint I Java Watchpoint get Breakpoint Selection Adapter watchpoint Validator new Selection Adapter public void widget Selected Selection Event e validate Watchpoint create Label parent Property Page Messages get String Java Line Breakpoint Page 6 NON NLS 1 f Enabled Button add Selection Listener watchpoint Validator f Field Access create Check Button parent Property Page Messages get String Java Line Breakpoint Page 7 NON NLS 1 f Field Access set Selection watchpoint is Access f Field Access add Selection Listener watchpoint Validator f Field Modification create Check Button parent Property Page Messages get String Java Line Breakpoint Page 8 NON NLS 1 f Field Modification set Selection watchpoint is Modification f Field Modification add Selection Listener watchpoint Validator if breakpoint instanceof I Java Method Breakpoint I Java Method Breakpoint method Breakpoint I Java Method Breakpoint get Breakpoint Selection Adapter method Breakpoint Validator new Selection Adapter public void widget Selected Selection Event e validate Method Breakpoint create Label parent Property Page Messages get String Java Line Breakpoint Page 9 NON NLS 1 f Enabled Button add Selection Listener method Breakpoint Validator f Method Entry create Check Button parent Property Page Messages get String Java Line Breakpoint Page 10 NON NLS 1 f Method Entry set Selection method Breakpoint is Entry f Method Entry add Selection Listener method Breakpoint Validator f Method Exit create Check Button parent Property Page Messages get String Java Line Breakpoint Page 11 NON NLS 1 f Method Exit set Selection method Breakpoint is Exit f Method Exit add Selection Listener method Breakpoint Validator  JavaBreakpointPage createTypeSpecificEditors createTypeSpecificEditors CoreException IJavaLineBreakpoint IJavaLineBreakpoint getBreakpoint supportsCondition createConditionEditor IJavaWatchpoint IJavaWatchpoint IJavaWatchpoint getBreakpoint SelectionAdapter watchpointValidator SelectionAdapter widgetSelected SelectionEvent validateWatchpoint createLabel PropertyPageMessages getString JavaLineBreakpointPage fEnabledButton addSelectionListener watchpointValidator fFieldAccess createCheckButton PropertyPageMessages getString JavaLineBreakpointPage fFieldAccess setSelection isAccess fFieldAccess addSelectionListener watchpointValidator fFieldModification createCheckButton PropertyPageMessages getString JavaLineBreakpointPage fFieldModification setSelection isModification fFieldModification addSelectionListener watchpointValidator IJavaMethodBreakpoint IJavaMethodBreakpoint methodBreakpoint IJavaMethodBreakpoint getBreakpoint SelectionAdapter methodBreakpointValidator SelectionAdapter widgetSelected SelectionEvent validateMethodBreakpoint createLabel PropertyPageMessages getString JavaLineBreakpointPage fEnabledButton addSelectionListener methodBreakpointValidator fMethodEntry createCheckButton PropertyPageMessages getString JavaLineBreakpointPage fMethodEntry setSelection methodBreakpoint isEntry fMethodEntry addSelectionListener methodBreakpointValidator fMethodExit createCheckButton PropertyPageMessages getString JavaLineBreakpointPage fMethodExit setSelection methodBreakpoint isExit fMethodExit addSelectionListener methodBreakpointValidator
private void validate Watchpoint if f Enabled Button get Selection f Field Access get Selection f Field Modification get Selection add Error Message fg Watchpoint Error else remove Error Message fg Watchpoint Error  validateWatchpoint fEnabledButton getSelection fFieldAccess getSelection fFieldModification getSelection addErrorMessage fgWatchpointError removeErrorMessage fgWatchpointError
private void validate Method Breakpoint if f Enabled Button get Selection f Method Entry get Selection f Method Exit get Selection add Error Message fg Method Breakpoint Error else remove Error Message fg Method Breakpoint Error  validateMethodBreakpoint fEnabledButton getSelection fMethodEntry getSelection fMethodExit getSelection addErrorMessage fgMethodBreakpointError removeErrorMessage fgMethodBreakpointError
f Enable Condition Button set Selection breakpoint is Condition Enabled f Enable Condition Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e set Condition Enabled f Enable Condition Button get Selection  fEnableConditionButton setSelection isConditionEnabled fEnableConditionButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setConditionEnabled fEnableConditionButton getSelection
Creates the controls that allow the user to specify the breakpoint s condition param parent the composite in which the condition editor should be created throws Core Exception if an exception occurs accessing the breakpoint private void create Condition Editor Composite parent throws Core Exception I Java Line Breakpoint breakpoint I Java Line Breakpoint get Breakpoint I Type type Breakpoint Utils get Type breakpoint String label null if type null I Command Manager command Manager PlatformUI get Workbench get Command Support get Command Manager I Command command command Manager get Command org eclipse ui edit text content Assist proposals NON NLS 1 if command null List key Bindings command get Key Sequence Bindings if key Bindings null key Bindings size 0 I Key Sequence Binding binding I Key Sequence Binding key Bindings get 0 label Message Format format Property Page Messages get String Java Line Breakpoint Page 12 new String binding get Key Sequence format NON NLS 1 if label null label Property Page Messages get String Java Line Breakpoint Page 13 NON NLS 1 Composite condition Composite new Group parent SWT NONE condition Composite set Font parent get Font condition Composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL condition Composite set Layout new Grid Layout f Enable Condition Button create Check Button condition Composite label f Enable Condition Button set Selection breakpoint is Condition Enabled f Enable Condition Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e set Condition Enabled f Enable Condition Button get Selection f Condition Editor new Breakpoint Condition Editor condition Composite this NON NLS 1 f Suspend When Label create Label condition Composite Property Page Messages get String Java Line Breakpoint Page 15 NON NLS 1 f Condition Is True create Radio Button condition Composite Property Page Messages get String Java Line Breakpoint Page 16 NON NLS 1 f Condition Has Changed create Radio Button condition Composite Property Page Messages get String Java Line Breakpoint Page 17 NON NLS 1 if breakpoint is Condition Suspend On True f Condition Is True set Selection true else f Condition Has Changed set Selection true set Condition Enabled f Enable Condition Button get Selection  CoreException createConditionEditor CoreException IJavaLineBreakpoint IJavaLineBreakpoint getBreakpoint IType BreakpointUtils getType ICommandManager commandManager getWorkbench getCommandSupport getCommandManager ICommand commandManager getCommand contentAssist keyBindings getKeySequenceBindings keyBindings keyBindings IKeySequenceBinding IKeySequenceBinding keyBindings MessageFormat PropertyPageMessages getString JavaLineBreakpointPage getKeySequence PropertyPageMessages getString JavaLineBreakpointPage conditionComposite conditionComposite setFont getFont conditionComposite setLayoutData GridData GridData FILL_HORIZONTAL conditionComposite setLayout GridLayout fEnableConditionButton createCheckButton conditionComposite fEnableConditionButton setSelection isConditionEnabled fEnableConditionButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setConditionEnabled fEnableConditionButton getSelection fConditionEditor BreakpointConditionEditor conditionComposite fSuspendWhenLabel createLabel conditionComposite PropertyPageMessages getString JavaLineBreakpointPage fConditionIsTrue createRadioButton conditionComposite PropertyPageMessages getString JavaLineBreakpointPage fConditionHasChanged createRadioButton conditionComposite PropertyPageMessages getString JavaLineBreakpointPage isConditionSuspendOnTrue fConditionIsTrue setSelection fConditionHasChanged setSelection setConditionEnabled fEnableConditionButton getSelection
Sets the enabled state of the condition editing controls param enabled private void set Condition Enabled boolean enabled f Condition Editor set Enabled enabled f Suspend When Label set Enabled enabled f Condition Is True set Enabled enabled f Condition Has Changed set Enabled enabled  setConditionEnabled fConditionEditor setEnabled fSuspendWhenLabel setEnabled fConditionIsTrue setEnabled fConditionHasChanged setEnabled
Overridden here to increase visibility see org eclipse jface dialogs Dialog Page convert Height In Chars To Pixels int public int convert Height In Chars To Pixels int chars return super convert Height In Chars To Pixels chars  DialogPage convertHeightInCharsToPixels convertHeightInCharsToPixels convertHeightInCharsToPixels
Overridden here to increase visibility see org eclipse jface dialogs Dialog Page convert Width In Chars To Pixels int public int convert Width In Chars To Pixels int chars return super convert Width In Chars To Pixels chars  DialogPage convertWidthInCharsToPixels convertWidthInCharsToPixels convertWidthInCharsToPixels
public void dispose if f Condition Editor null f Condition Editor dispose super dispose  fConditionEditor fConditionEditor

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Property Page Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME PropertyPageMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public Thread Filter Editor Composite parent Java Breakpoint Advanced Page page f Page page f Content Provider new Thread Filter Content Provider f Check Handler new Check Handler create Thread Viewer parent  ThreadFilterEditor JavaBreakpointAdvancedPage fPage fContentProvider ThreadFilterContentProvider fCheckHandler CheckHandler createThreadViewer
private void create Thread Viewer Composite parent Label label new Label parent SWT NONE label set Text Property Page Messages get String Thread Filter Editor 1 NON NLS 1 label set Font parent get Font label set Layout Data new Grid Data Grid Data data new Grid Data Grid Data FILL BOTH data height Hint 100 f Thread Viewer new Checkbox Tree Viewer parent SWT BORDER f Thread Viewer add Check State Listener f Check Handler f Thread Viewer get Tree set Layout Data data f Thread Viewer get Tree set Font parent get Font f Thread Viewer set Content Provider f Content Provider f Thread Viewer set Label Provider DebugUI Tools new Debug Model Presentation f Thread Viewer set Input Debug Plugin get Default get Launch Manager set Initial Checked State  createThreadViewer setText PropertyPageMessages getString ThreadFilterEditor setFont getFont setLayoutData GridData GridData GridData GridData FILL_BOTH heightHint fThreadViewer CheckboxTreeViewer fThreadViewer addCheckStateListener fCheckHandler fThreadViewer getTree setLayoutData fThreadViewer getTree setFont getFont fThreadViewer setContentProvider fContentProvider fThreadViewer setLabelProvider DebugUITools newDebugModelPresentation fThreadViewer setInput DebugPlugin getDefault getLaunchManager setInitialCheckedState
protected void do Store I Debug Target targets get Debug Targets I Java Debug Target target I Thread threads I Java Thread thread for int i 0 num Targets targets length i num Targets i target I Java Debug Target targets i get Adapter I Java Debug Target class if target null try if f Thread Viewer get Checked target threads target get Threads for int j 0 num Threads threads length j num Threads j thread I Java Thread threads j if f Thread Viewer get Checked thread thread selected for filtering f Page get Breakpoint set Thread Filter thread break Can only set one filtered thread else f Page get Breakpoint remove Thread Filter target catch Core Exception e JDI DebugUI Plugin log e  doStore IDebugTarget getDebugTargets IJavaDebugTarget IThread IJavaThread numTargets numTargets IJavaDebugTarget getAdapter IJavaDebugTarget fThreadViewer getChecked getThreads numThreads numThreads IJavaThread fThreadViewer getChecked fPage getBreakpoint setThreadFilter fPage getBreakpoint removeThreadFilter CoreException JDIDebugUIPlugin
Sets the initial checked state of the tree viewer The initial state should reflect the current state of the breakpoint If the breakpoint has a thread filter in a given thread that thread should be checked protected void set Initial Checked State try I Debug Target targets get Debug Targets for int i 0 num Targets targets length i num Targets i I Java Debug Target target I Java Debug Target targets i get Adapter I Java Debug Target class if target null I Java Thread filtered Thread f Page get Breakpoint get Thread Filter target if filtered Thread null f Check Handler check Thread filtered Thread true catch Core Exception e JDI DebugUI Plugin log e  setInitialCheckedState IDebugTarget getDebugTargets numTargets numTargets IJavaDebugTarget IJavaDebugTarget getAdapter IJavaDebugTarget IJavaThread filteredThread fPage getBreakpoint getThreadFilter filteredThread fCheckHandler checkThread filteredThread CoreException JDIDebugUIPlugin
Returns the debug targets that appear in the tree protected I Debug Target get Debug Targets Object input f Thread Viewer get Input if input instanceof I Launch Manager return new I Java Debug Target 0 I Launch Manager launch Manager I Launch Manager input return launch Manager get Debug Targets  IDebugTarget getDebugTargets fThreadViewer getInput ILaunchManager IJavaDebugTarget ILaunchManager launchManager ILaunchManager launchManager getDebugTargets
class Check Handler implements I Check State Listener public void check State Changed Check State Changed Event event Object element event get Element if element instanceof I Debug Target check Target I Debug Target element event get Checked else if element instanceof I Thread check Thread I Thread element event get Checked verify Checked State  CheckHandler ICheckStateListener checkStateChanged CheckStateChangedEvent getElement IDebugTarget checkTarget IDebugTarget getChecked IThread checkThread IThread getChecked verifyCheckedState
Check or uncheck a debug target in the tree viewer When a debug target is checked attempt to check one of the target s threads by default When a debug target is unchecked uncheck all its threads protected void check Target I Debug Target target boolean checked f Thread Viewer set Checked target checked if checked f Thread Viewer expand To Level target Abstract Tree Viewer ALL LEVELS I Thread threads try threads target get Threads catch Debug Exception exception JDI DebugUI Plugin log exception return I Thread thread boolean checked Thread false Try to check the main thread by default for int i 0 num Threads threads length i num Threads i thread threads i String name null try name thread get Name catch Debug Exception exception JDI DebugUI Plugin log exception if MAIN equals name checked Thread f Thread Viewer set Checked thread true If the main thread couldn t be checked check the first available thread if checked Thread for int i 0 num Threads threads length i num Threads i if f Thread Viewer set Checked threads i true break else Unchecked I Thread threads try threads target get Threads catch Debug Exception exception JDI DebugUI Plugin log exception return for int i 0 num Threads threads length i num Threads i f Thread Viewer set Checked threads i false  checkTarget IDebugTarget fThreadViewer setChecked fThreadViewer expandToLevel AbstractTreeViewer ALL_LEVELS IThread getThreads DebugException JDIDebugUIPlugin IThread checkedThread numThreads numThreads getName DebugException JDIDebugUIPlugin checkedThread fThreadViewer setChecked checkedThread numThreads numThreads fThreadViewer setChecked IThread getThreads DebugException JDIDebugUIPlugin numThreads numThreads fThreadViewer setChecked
Check or uncheck a thread When a thread is checked make sure its debug target is also checked When a thread is unchecked uncheck its debug target protected void check Thread I Thread thread boolean checked f Thread Viewer set Checked thread checked I Debug Target target thread get Debug Target if checked When a thread is checked make sure the target is checked and all other threads are unchecked simulate radio button behavior if f Thread Viewer get Checked target f Thread Viewer set Checked target true I Thread threads try threads target get Threads catch Debug Exception exception JDI DebugUI Plugin log exception return for int i 0 num Threads threads length i num Threads i if threads i thread Uncheck all threads other than the selected thread f Thread Viewer set Checked threads i false else When a thread is unchecked uncheck the target f Thread Viewer set Checked target false  checkThread IThread fThreadViewer setChecked IDebugTarget getDebugTarget fThreadViewer getChecked fThreadViewer setChecked IThread getThreads DebugException JDIDebugUIPlugin numThreads numThreads fThreadViewer setChecked fThreadViewer setChecked
Verify the state of the tree viewer If the user selects a debug target they must select a thread protected void verify Checked State I Debug Target targets get Debug Targets I Debug Target target I Thread threads boolean checked Thread for int i 0 num Targets targets length i num Targets i target targets i if f Thread Viewer get Checked target continue try threads target get Threads catch Debug Exception exception JDI DebugUI Plugin log exception continue checked Thread false for int j 0 num Threads threads length j num Threads j if f Thread Viewer get Checked threads j checked Thread true break if checked Thread f Page set Error Message null else f Page set Error Message Property Page Messages get String Thread Filter Editor 2 NON NLS 1  verifyCheckedState IDebugTarget getDebugTargets IDebugTarget IThread checkedThread numTargets numTargets fThreadViewer getChecked getThreads DebugException JDIDebugUIPlugin checkedThread numThreads numThreads fThreadViewer getChecked checkedThread checkedThread fPage setErrorMessage fPage setErrorMessage PropertyPageMessages getString ThreadFilterEditor
class Thread Filter Content Provider implements I Tree Content Provider see I Tree Content Provider get Children Object public Object get Children Object parent if parent instanceof I Debug Target I Java Debug Target target I Java Debug Target I Debug Target parent get Adapter I Java Debug Target class if target null try return I Java Debug Target parent get Threads catch Debug Exception e JDI DebugUI Plugin log e if parent instanceof I Launch Manager List children new Array List I Launch launches I Launch Manager parent get Launches I Debug Target targets I Java Debug Target target for int i 0 num Launches launches length i num Launches i targets launches i get Debug Targets for int j 0 num Targets targets length j num Targets j target I Java Debug Target targets j get Adapter I Java Debug Target class if target null target is Disconnected target is Terminated children add target return children to Array return new Object 0  ThreadFilterContentProvider ITreeContentProvider ITreeContentProvider getChildren getChildren IDebugTarget IJavaDebugTarget IJavaDebugTarget IDebugTarget getAdapter IJavaDebugTarget IJavaDebugTarget getThreads DebugException JDIDebugUIPlugin ILaunchManager ArrayList ILaunch ILaunchManager getLaunches IDebugTarget IJavaDebugTarget numLaunches numLaunches getDebugTargets numTargets numTargets IJavaDebugTarget getAdapter IJavaDebugTarget isDisconnected isTerminated toArray
see I Tree Content Provider get Parent Object public Object get Parent Object element if element instanceof I Thread return I Thread element get Debug Target if element instanceof I Debug Target return I Debug Element element get Launch if element instanceof I Launch return Debug Plugin get Default get Launch Manager return null  ITreeContentProvider getParent getParent IThread IThread getDebugTarget IDebugTarget IDebugElement getLaunch ILaunch DebugPlugin getDefault getLaunchManager
see I Tree Content Provider has Children Object public boolean has Children Object element if element instanceof I Stack Frame return false if element instanceof I Debug Element return get Children element length 0 if element instanceof I Launch return true if element instanceof I Launch Manager return I Launch Manager element get Launches length 0 return false  ITreeContentProvider hasChildren hasChildren IStackFrame IDebugElement getChildren ILaunch ILaunchManager ILaunchManager getLaunches
see I Structured Content Provider get Elements Object public Object get Elements Object input Element return get Children input Element  IStructuredContentProvider getElements getElements inputElement getChildren inputElement
see I Content Provider dispose public void dispose  IContentProvider
see I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput

public interface I Snippet State Changed Listener Informs about the changed snippet evaluation state void snippet State Changed Java Snippet Editor editor  ISnippetStateChangedListener snippetStateChanged JavaSnippetEditor

public Java Snippet Completion Processor Java Snippet Editor editor f Collector new Result Collector f Editor editor Template Context Type context Type Java Plugin get Default get Template Context Registry get Context Type java NON NLS 1 if context Type null f Template Engine new Template Engine context Type f Comparator new Java Completion Proposal Comparator  JavaSnippetCompletionProcessor JavaSnippetEditor fCollector ResultCollector fEditor TemplateContextType contextType JavaPlugin getDefault getTemplateContextRegistry getContextType contextType fTemplateEngine TemplateEngine contextType fComparator JavaCompletionProposalComparator
see I Content Assist Processor get Error Message public String get Error Message return f Collector get Error Message  IContentAssistProcessor getErrorMessage getErrorMessage fCollector getErrorMessage
see I Content Assist Processor get Context Information Validator public I Context Information Validator get Context Information Validator if f Validator null f Validator new Java Parameter List Validator return f Validator  IContentAssistProcessor getContextInformationValidator IContextInformationValidator getContextInformationValidator fValidator fValidator JavaParameterListValidator fValidator
see I Content Assist Processor get Context Information Auto Activation Characters public char get Context Information Auto Activation Characters return null  IContentAssistProcessor getContextInformationAutoActivationCharacters getContextInformationAutoActivationCharacters
see I Content Assist Processor compute Context Information I Text Viewer int public I Context Information compute Context Information I Text Viewer viewer int offset return null  IContentAssistProcessor computeContextInformation ITextViewer IContextInformation computeContextInformation ITextViewer
see I Content Assist Processor compute Proposals I Text Viewer int public I Completion Proposal compute Completion Proposals I Text Viewer viewer int position try f Collector reset position f Editor find Java Project null f Editor code Complete f Collector catch Java Model Exception x Shell shell viewer get Text Widget get Shell Error Dialog open Error shell Snippet Messages get String Completion Processor error Title Snippet Messages get String Completion Processor error Message x get Status NON NLS 2 NON NLS 1 JDI DebugUI Plugin log x I Java Completion Proposal results f Collector get Results if f Template Engine null f Template Engine reset f Template Engine complete viewer position null Template Proposal template Results f Template Engine get Results concatenate arrays I Java Completion Proposal total new I Java Completion Proposal results length template Results length System arraycopy template Results 0 total 0 template Results length System arraycopy results 0 total template Results length results length results total return order results  IContentAssistProcessor computeProposals ITextViewer ICompletionProposal computeCompletionProposals ITextViewer fCollector fEditor findJavaProject fEditor codeComplete fCollector JavaModelException getTextWidget getShell ErrorDialog openError SnippetMessages getString CompletionProcessor errorTitle SnippetMessages getString CompletionProcessor errorMessage getStatus JDIDebugUIPlugin IJavaCompletionProposal fCollector getResults fTemplateEngine fTemplateEngine fTemplateEngine TemplateProposal templateResults fTemplateEngine getResults IJavaCompletionProposal IJavaCompletionProposal templateResults templateResults templateResults templateResults
Order the given proposals private I Completion Proposal order I Java Completion Proposal proposals Arrays sort proposals f Comparator return proposals  ICompletionProposal IJavaCompletionProposal fComparator
see I Content Assist Processor get Completion Proposal Auto Activation Characters public char get Completion Proposal Auto Activation Characters return f Proposal Auto Activation Set  IContentAssistProcessor getCompletionProposalAutoActivationCharacters getCompletionProposalAutoActivationCharacters fProposalAutoActivationSet
Sets this processor s set of characters triggering the activation of the completion proposal computation param activation Set the activation set public void set Completion Proposal Auto Activation Characters char activation Set f Proposal Auto Activation Set activation Set  activationSet setCompletionProposalAutoActivationCharacters activationSet fProposalAutoActivationSet activationSet
Tells this processor to order the proposals alphabetically param order code true code if proposals should be ordered public void order Proposals Alphabetically boolean order f Comparator set Order Alphabetically order  orderProposalsAlphabetically fComparator setOrderAlphabetically

private Object f Lock Creates a wait thread param display the display to be used to read and dispatch events param lock the monitor to wait on private Wait Thread Display display Object lock super Snippet Wait Thread NON NLS 1 f Display display f Lock lock  fLock WaitThread fDisplay fLock
are dispatched f Display sync Exec new Runnable public void run do nothing  fDisplay syncExec
public void run try synchronized f Lock should be notified out of set Thread I Java Thread f Lock wait 10000 catch Interrupted Exception e finally Make sure that all events in the asynchronous event queue are dispatched f Display sync Exec new Runnable public void run do nothing Stop event dispatching f Continue Event Dispatching false Force the event loop to return from sleep so that it stops event dispatching f Display async Exec null  fLock setThread IJavaThread fLock InterruptedException fDisplay syncExec fContinueEventDispatching fDisplay asyncExec
Processes events protected void block if f Display Display get Current while f Continue Event Dispatching if f Display read And Dispatch f Display sleep  fDisplay getCurrent fContinueEventDispatching fDisplay readAndDispatch fDisplay
public Java Snippet Editor super set Document Provider JDI DebugUI Plugin get Default get Snippet Document Provider set Source Viewer Configuration new Java Snippet Viewer Configuration Java Plugin get Default get Java Text Tools this f Snippet State Listeners new Array List 4 set Preference Store Java Plugin get Default get Preference Store set Editor Context Menu Id Java Snippet Editor Context NON NLS 1 set Ruler Context Menu Id Java Snippet Ruler Context NON NLS 1  JavaSnippetEditor setDocumentProvider JDIDebugUIPlugin getDefault getSnippetDocumentProvider setSourceViewerConfiguration JavaSnippetViewerConfiguration JavaPlugin getDefault getJavaTextTools fSnippetStateListeners ArrayList setPreferenceStore JavaPlugin getDefault getPreferenceStore setEditorContextMenuId JavaSnippetEditorContext setRulerContextMenuId JavaSnippetRulerContext
protected void do Set Input I Editor Input input throws Core Exception super do Set Input input I File file get File if file null String property file get Persistent Property new Qualified Name JDI DebugUI Plugin get Unique Identifier IMPORTS CONTEXT if property null f Imports Java Debug Options Manager parse List property  doSetInput IEditorInput CoreException doSetInput IFile getFile getPersistentProperty QualifiedName JDIDebugUIPlugin getUniqueIdentifier IMPORTS_CONTEXT fImports JavaDebugOptionsManager parseList
public void dispose shut DownVM f Presentation dispose f Snippet State Listeners null JDI Source Viewer get Source Viewer dispose super dispose  shutDownVM fPresentation fSnippetStateListeners JDISourceViewer getSourceViewer
Actions for the editor popup menu see org eclipse ui texteditor Abstract Text Editor create Actions protected void create Actions super create Actions if get File null Action action new Text Operation Action Snippet Messages get Bundle Snippet Editor Content Assist Proposal this I Source Viewer CONTENTASSIST PROPOSALS NON NLS 1 action set Action Definition Id I Text Editor Action Definition Ids CONTENT ASSIST PROPOSALS set Action Content Assist Proposal action NON NLS 1 set Action Show In Package View new Show In Package View Action this NON NLS 1 set Action Stop new Stop Action this NON NLS 1 set Action Select Imports new Select Imports Action this NON NLS 1  AbstractTextEditor createActions createActions createActions getFile TextOperationAction SnippetMessages getBundle SnippetEditor ContentAssistProposal ISourceViewer CONTENTASSIST_PROPOSALS setActionDefinitionId ITextEditorActionDefinitionIds CONTENT_ASSIST_PROPOSALS setAction ContentAssistProposal setAction ShowInPackageView ShowInPackageViewAction setAction StopAction setAction SelectImports SelectImportsAction
protected void editor Context Menu About To Show I Menu Manager menu super editor Context Menu About To Show menu add Group menu I Text Editor Action Constants GROUP EDIT I Context Menu Constants GROUP GENERATE add Group menu I Text Editor Action Constants GROUP FIND I Context Menu Constants GROUP SEARCH add Group menu I Context Menu Constants GROUP SEARCH I Context Menu Constants GROUP SHOW if get File null add Action menu I Context Menu Constants GROUP SHOW Show In Package View NON NLS 1 add Action menu I Context Menu Constants GROUP ADDITIONS Run NON NLS 1 add Action menu I Context Menu Constants GROUP ADDITIONS Stop NON NLS 1 add Action menu I Context Menu Constants GROUP ADDITIONS Select Imports NON NLS 1  editorContextMenuAboutToShow IMenuManager editorContextMenuAboutToShow addGroup ITextEditorActionConstants GROUP_EDIT IContextMenuConstants GROUP_GENERATE addGroup ITextEditorActionConstants GROUP_FIND IContextMenuConstants GROUP_SEARCH addGroup IContextMenuConstants GROUP_SEARCH IContextMenuConstants GROUP_SHOW getFile addAction IContextMenuConstants GROUP_SHOW ShowInPackageView addAction IContextMenuConstants GROUP_ADDITIONS addAction IContextMenuConstants GROUP_ADDITIONS addAction IContextMenuConstants GROUP_ADDITIONS SelectImports
protected boolean isVM Launched return fVM null  isVMLaunched
public boolean is Evaluating return f Evaluating  isEvaluating fEvaluating
public void eval Selection int result Mode if is In Java Project report Not In Java Project Error return if is Evaluating return check Current Project evaluation Starts f Result Mode result Mode build And Launch if fVM null evaluation Ends return fire Eval State Changed I Text Selection selection I Text Selection get Selection Provider get Selection String snippet selection get Text f Snippet Start selection get Offset f Snippet End f Snippet Start selection get Length evaluate snippet  evalSelection resultMode isInJavaProject reportNotInJavaProjectError isEvaluating checkCurrentProject evaluationStarts fResultMode resultMode buildAndLaunch evaluationEnds fireEvalStateChanged ITextSelection ITextSelection getSelectionProvider getSelection getText fSnippetStart getOffset fSnippetEnd fSnippetStart getLength
Checks if the page has been copied moved to a different project or the project has been renamed Updates the launch configuration template if a copy move rename has occurred protected void check Current Project I File file get File if file null return try I Launch Configuration config Scrapbook Launcher get Launch Configuration Template file if config null String project Name config get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME String null I Java Project pro Java Core create file get Project if pro get Element Name equals project Name the page has been moved to a different project Scrapbook Launcher set Launch Config Memento file null catch Core Exception ce JDI DebugUI Plugin log ce Error Dialog open Error get Shell Snippet Messages get String Snippet Editor error evaluating null ce get Status NON NLS 1 evaluation Ends return  checkCurrentProject IFile getFile ILaunchConfiguration ScrapbookLauncher getLaunchConfigurationTemplate projectName getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME IJavaProject JavaCore getProject getElementName projectName ScrapbookLauncher setLaunchConfigMemento CoreException JDIDebugUIPlugin ErrorDialog openError getShell SnippetMessages getString SnippetEditor getStatus evaluationEnds
protected void build And Launch I Java Project java Project get Java Project if java Project null return boolean build java Project get Project get Workspace is Auto Building java Project has Build State if build if perform Incremental Build return boolean changed class Path Has Changed if changed changed working Dir Has Changed if changed changed vm Has Changed if changed changed vm Args Changed boolean launch fVM null changed if changed shut DownVM if fVM null check Multiple Editors if launch fVM null launchVM fVM Scrapbook Launcher get Default get Debug Target get File  buildAndLaunch IJavaProject javaProject getJavaProject javaProject javaProject getProject getWorkspace isAutoBuilding javaProject hasBuildState performIncrementalBuild classPathHasChanged workingDirHasChanged vmHasChanged vmArgsChanged shutDownVM checkMultipleEditors ScrapbookLauncher getDefault getDebugTarget getFile
I Runnable With Progress r new I Runnable With Progress public void run I Progress Monitor pm throws Invocation Target Exception try get Java Project get Project build Incremental Project Builder INCREMENTAL BUILD pm catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException getJavaProject getProject IncrementalProjectBuilder INCREMENTAL_BUILD CoreException InvocationTargetException
protected boolean perform Incremental Build I Runnable With Progress r new I Runnable With Progress public void run I Progress Monitor pm throws Invocation Target Exception try get Java Project get Project build Incremental Project Builder INCREMENTAL BUILD pm catch Core Exception e throw new Invocation Target Exception e try PlatformUI get Workbench get Progress Service run true false r catch Interrupted Exception e JDI DebugUI Plugin log e evaluation Ends return false catch Invocation Target Exception e JDI DebugUI Plugin log e evaluation Ends return false return true  performIncrementalBuild IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException getJavaProject getProject IncrementalProjectBuilder INCREMENTAL_BUILD CoreException InvocationTargetException getWorkbench getProgressService InterruptedException JDIDebugUIPlugin evaluationEnds InvocationTargetException JDIDebugUIPlugin evaluationEnds
protected void check Multiple Editors fVM Scrapbook Launcher get Default get Debug Target get File multiple editors are opened on the same page if fVM null Debug Plugin get Default add Debug Event Filter this try I Thread threads fVM get Threads for int i 0 i threads length i I Thread i Thread threads i if i Thread is Suspended i Thread resume catch Debug Exception de JDI DebugUI Plugin log de  checkMultipleEditors ScrapbookLauncher getDefault getDebugTarget getFile DebugPlugin getDefault addDebugEventFilter IThread getThreads IThread iThread iThread isSuspended iThread DebugException JDIDebugUIPlugin
protected void set Imports String imports f Imports imports I File file get File if file null return String serialized null if imports null serialized Java Debug Options Manager serialize List imports persist try file set Persistent Property new Qualified Name JDI DebugUI Plugin get Unique Identifier IMPORTS CONTEXT serialized catch Core Exception e JDI DebugUI Plugin log e Error Dialog open Error get Shell Snippet Messages get String Snippet Editor error imports null e get Status NON NLS 1  setImports fImports IFile getFile JavaDebugOptionsManager serializeList setPersistentProperty QualifiedName JDIDebugUIPlugin getUniqueIdentifier IMPORTS_CONTEXT CoreException JDIDebugUIPlugin ErrorDialog openError getShell SnippetMessages getString SnippetEditor getStatus
protected String get Imports return f Imports  getImports fImports
protected I Evaluation Context get Evaluation Context if f Evaluation Context null I Java Project project get Java Project if project null f Evaluation Context project new Evaluation Context if f Evaluation Context null if get Imports null f Evaluation Context set Imports get Imports else f Evaluation Context set Imports new String return f Evaluation Context  IEvaluationContext getEvaluationContext fEvaluationContext IJavaProject getJavaProject fEvaluationContext newEvaluationContext fEvaluationContext getImports fEvaluationContext setImports getImports fEvaluationContext setImports fEvaluationContext
protected I Java Project get Java Project if f Java Project null try f Java Project find Java Project catch Java Model Exception e JDI DebugUI Plugin log e show Error e get Status return f Java Project  IJavaProject getJavaProject fJavaProject fJavaProject findJavaProject JavaModelException JDIDebugUIPlugin showError getStatus fJavaProject
protected void shut DownVM Debug Plugin get Default remove Debug Event Filter this The real shut down I Debug Target target fVM if fVM null try I Breakpoint bp Scrapbook Launcher get Default get Magic Breakpoint fVM if bp null fVM breakpoint Removed bp null if get Thread null get Thread resume fVM terminate catch Debug Exception e JDI DebugUI Plugin log e Error Dialog open Error get Shell Snippet Messages get String Snippet Editor error shutdown null e get Status NON NLS 1 return vm Terminated Scrapbook Launcher get Default cleanup target  shutDownVM DebugPlugin getDefault removeDebugEventFilter IDebugTarget IBreakpoint ScrapbookLauncher getDefault getMagicBreakpoint breakpointRemoved getThread getThread DebugException JDIDebugUIPlugin ErrorDialog openError getShell SnippetMessages getString SnippetEditor getStatus vmTerminated ScrapbookLauncher getDefault
The VM has terminated update state protected void vm Terminated fVM null f Thread null f Evaluation Context null f Launched Class Path null if f Engine null f Engine dispose f Engine null fire Eval State Changed  vmTerminated fThread fEvaluationContext fLaunchedClassPath fEngine fEngine fEngine fireEvalStateChanged
public void add Snippet State Changed Listener I Snippet State Changed Listener listener if f Snippet State Listeners null f Snippet State Listeners contains listener f Snippet State Listeners add listener  addSnippetStateChangedListener ISnippetStateChangedListener fSnippetStateListeners fSnippetStateListeners fSnippetStateListeners
public void remove Snippet State Changed Listener I Snippet State Changed Listener listener if f Snippet State Listeners null f Snippet State Listeners remove listener  removeSnippetStateChangedListener ISnippetStateChangedListener fSnippetStateListeners fSnippetStateListeners
Runnable r new Runnable public void run Shell shell get Shell if f Snippet State Listeners null shell null shell is Disposed List v new Array List f Snippet State Listeners for int i 0 i v size i I Snippet State Changed Listener l I Snippet State Changed Listener v get i l snippet State Changed Java Snippet Editor this  getShell fSnippetStateListeners isDisposed ArrayList fSnippetStateListeners ISnippetStateChangedListener ISnippetStateChangedListener snippetStateChanged JavaSnippetEditor
protected void fire Eval State Changed Runnable r new Runnable public void run Shell shell get Shell if f Snippet State Listeners null shell null shell is Disposed List v new Array List f Snippet State Listeners for int i 0 i v size i I Snippet State Changed Listener l I Snippet State Changed Listener v get i l snippet State Changed Java Snippet Editor this Shell shell get Shell if shell null get Shell get Display async Exec r  fireEvalStateChanged getShell fSnippetStateListeners isDisposed ArrayList fSnippetStateListeners ISnippetStateChangedListener ISnippetStateChangedListener snippetStateChanged JavaSnippetEditor getShell getShell getDisplay asyncExec
protected void evaluate String snippet if get Thread null Wait Thread e Thread new Wait Thread Display get Current this e Thread start e Thread block if get Thread null I Status status new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Java DebugUI Constants INTERNAL ERROR Snippet Messages get String Snippet Editor error nocontext null NON NLS 1 Error Dialog open Error get Shell Snippet Messages get String Snippet Editor error evaluating null status NON NLS 1 evaluation Ends return boolean hit Breakpoints JDI Debug Model get Preferences get Boolean JDI Debug Model PREF SUSPEND FOR BREAKPOINTS DURING EVALUATION try get Evaluation Engine evaluate snippet get Thread this hit Breakpoints catch Debug Exception e JDI DebugUI Plugin log e Error Dialog open Error get Shell Snippet Messages get String Snippet Editor error evaluating null e get Status NON NLS 1 evaluation Ends  getThread WaitThread eThread WaitThread getCurrent eThread eThread getThread IStatus IStatus JDIDebugUIPlugin getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR SnippetMessages getString SnippetEditor ErrorDialog openError getShell SnippetMessages getString SnippetEditor evaluationEnds hitBreakpoints JDIDebugModel getPreferences getBoolean JDIDebugModel PREF_SUSPEND_FOR_BREAKPOINTS_DURING_EVALUATION getEvaluationEngine getThread hitBreakpoints DebugException JDIDebugUIPlugin ErrorDialog openError getShell SnippetMessages getString SnippetEditor getStatus evaluationEnds
public void evaluation Complete I Evaluation Result result boolean severe Errors false if result has Errors String errors result get Error Messages severe Errors errors length 0 if result get Exception null show Exception result get Exception show All Errors errors I Java Value value result get Value if value null severe Errors switch f Result Mode case RESULT DISPLAY display Result value break case RESULT INSPECT String snippet result get Snippet trim int snippet Length snippet length if snippet Length 30 snippet snippet substring 0 15 Snippet Messages get String Snippet Editor ellipsis snippet substring snippet Length 15 snippet Length NON NLS 1 snippet snippet replace n snippet snippet replace r snippet snippet replace t Java Inspect Expression exp new Java Inspect Expression snippet value show Expression exp break case RESULT RUN no action break evaluation Ends  evaluationComplete IEvaluationResult severeErrors hasErrors getErrorMessages severeErrors getException showException getException showAllErrors IJavaValue getValue severeErrors fResultMode RESULT_DISPLAY displayResult RESULT_INSPECT getSnippet snippetLength snippetLength SnippetMessages getString SnippetEditor snippetLength snippetLength JavaInspectExpression JavaInspectExpression showExpression RESULT_RUN evaluationEnds
Runnable r new Runnable public void run I Workbench Page page JDI DebugUI Plugin get Active Page if page null I View Part part page find View I DebugUI Constants ID EXPRESSION VIEW if part null try page show View I DebugUI Constants ID EXPRESSION VIEW catch Part Init Exception e JDI DebugUI Plugin log e show Error e get Status else page bring To Top part  IWorkbenchPage JDIDebugUIPlugin getActivePage IViewPart findView IDebugUIConstants ID_EXPRESSION_VIEW showView IDebugUIConstants ID_EXPRESSION_VIEW PartInitException JDIDebugUIPlugin showError getStatus bringToTop
Make the expression view visible or open one if required protected void show Expression View Runnable r new Runnable public void run I Workbench Page page JDI DebugUI Plugin get Active Page if page null I View Part part page find View I DebugUI Constants ID EXPRESSION VIEW if part null try page show View I DebugUI Constants ID EXPRESSION VIEW catch Part Init Exception e JDI DebugUI Plugin log e show Error e get Status else page bring To Top part async r  showExpressionView IWorkbenchPage JDIDebugUIPlugin getActivePage IViewPart findView IDebugUIConstants ID_EXPRESSION_VIEW showView IDebugUIConstants ID_EXPRESSION_VIEW PartInitException JDIDebugUIPlugin showError getStatus bringToTop
protected void code Complete I Completion Requestor requestor throws Java Model Exception I Text Selection selection I Text Selection get Selection Provider get Selection int start selection get Offset String snippet get Source Viewer get Document get I Evaluation Context e get Evaluation Context if e null e code Complete snippet start requestor  codeComplete ICompletionRequestor JavaModelException ITextSelection ITextSelection getSelectionProvider getSelection getOffset getSourceViewer getDocument IEvaluationContext getEvaluationContext codeComplete
protected I Java Element code Resolve throws Java Model Exception I Source Viewer viewer get Source Viewer if viewer null return null I Text Selection selection I Text Selection get Selection Provider get Selection int start selection get Offset int len selection get Length String snippet viewer get Document get I Evaluation Context e get Evaluation Context if e null return e code Select snippet start len return null  IJavaElement codeResolve JavaModelException ISourceViewer getSourceViewer ITextSelection ITextSelection getSelectionProvider getSelection getOffset getLength getDocument IEvaluationContext getEvaluationContext codeSelect
protected void show Error I Status status evaluation Ends if status isOK Error Dialog open Error get Shell Snippet Messages get String Snippet Editor error evaluating2 null status NON NLS 1  showError IStatus evaluationEnds ErrorDialog openError getShell SnippetMessages getString SnippetEditor
protected void show Error String message Status status new Status I Status ERROR JDI DebugUI Plugin get Unique Identifier I Status ERROR message null show Error status  showError IStatus JDIDebugUIPlugin getUniqueIdentifier IStatus showError
Runnable r new Runnable public void run try get Source Viewer get Document replace f Snippet End 0 message select And Reveal f Snippet End message length catch Bad Location Exception e  getSourceViewer getDocument fSnippetEnd selectAndReveal fSnippetEnd BadLocationException
protected void display Result I Java Value result String Buffer result String new String Buffer try I Java Type type result get Java Type if type null String sig type get Signature if V equals sig NON NLS 1 result String append Snippet Messages get String Snippet Editor noreturnvalue NON NLS 1 else if sig null result String append Snippet Messages get Formatted String Snippet Editor typename result get Reference Type Name NON NLS 1 else result String append NON NLS 1 result String append evaluate To String result else result String append result get Value String catch Debug Exception e JDI DebugUI Plugin log e Error Dialog open Error get Shell Snippet Messages get String Snippet Editor error to String null e get Status NON NLS 1 final String message result String to String Runnable r new Runnable public void run try get Source Viewer get Document replace f Snippet End 0 message select And Reveal f Snippet End message length catch Bad Location Exception e async r  displayResult IJavaValue StringBuffer resultString StringBuffer IJavaType getJavaType getSignature resultString SnippetMessages getString SnippetEditor resultString SnippetMessages getFormattedString SnippetEditor getReferenceTypeName resultString resultString evaluateToString resultString getValueString DebugException JDIDebugUIPlugin ErrorDialog openError getShell SnippetMessages getString SnippetEditor toString getStatus resultString toString getSourceViewer getDocument fSnippetEnd selectAndReveal fSnippetEnd BadLocationException
Returns the result of evaluating to String on the given value param value object or primitive data type the to String is required for return the result of evaluating to String exception Debug Exception if an exception occurs during the evaluation protected synchronized String evaluate To String I Java Value value f Result null f Presentation compute Detail value this if f Result null try wait 10000 catch Interrupted Exception e return Snippet Messages get String Snippet Editor error interrupted NON NLS 1 return f Result  toString toString toString DebugException evaluateToString IJavaValue fResult fPresentation computeDetail fResult InterruptedException SnippetMessages getString SnippetEditor fResult
see org eclipse debug ui I Value Detail Listener detail Computed org eclipse debug core model I Value java lang String public synchronized void detail Computed I Value value final String result f Result result this notify All  IValueDetailListener detailComputed IValue detailComputed IValue fResult notifyAll
Runnable r new Runnable public void run try get Source Viewer get Document replace f Snippet Start 0 error String to String select And Reveal f Snippet Start error String length catch Bad Location Exception e  getSourceViewer getDocument fSnippetStart errorString toString selectAndReveal fSnippetStart errorString BadLocationException
protected void show All Errors final String errors I Document document get Source Viewer get Document String delimiter document get Legal Line Delimiters 0 final String Buffer error String new String Buffer for int i 0 i errors length i error String append errors i delimiter Runnable r new Runnable public void run try get Source Viewer get Document replace f Snippet Start 0 error String to String select And Reveal f Snippet Start error String length catch Bad Location Exception e async r  showAllErrors IDocument getSourceViewer getDocument getLegalLineDelimiters StringBuffer errorString StringBuffer errorString getSourceViewer getDocument fSnippetStart errorString toString selectAndReveal fSnippetStart errorString BadLocationException
public void run Information Presenter info Presenter new Information Presenter new I Information Control Creator public I Information Control create Information Control Shell parent I Workbench Page page JDI DebugUI Plugin get Active Page return new Expression Information Control page expression Popup Inspect Action ACTION DEFININIITION ID  InformationPresenter infoPresenter InformationPresenter IInformationControlCreator IInformationControl createInformationControl IWorkbenchPage JDIDebugUIPlugin getActivePage ExpressionInformationControl PopupInspectAction ACTION_DEFININIITION_ID
I Information Provider provider new I Information Provider public I Region get Subject I Text Viewer text Viewer int offset return new Region f Snippet Start f Snippet End f Snippet Start  IInformationProvider IInformationProvider IRegion getSubject ITextViewer textViewer fSnippetStart fSnippetEnd fSnippetStart
return new Region f Snippet Start f Snippet End f Snippet Start public String get Information I Text Viewer text Viewer I Region subject return nothing NON NLS 1  fSnippetStart fSnippetEnd fSnippetStart getInformation ITextViewer textViewer IRegion
Runnable r new Runnable public void run Information Presenter info Presenter new Information Presenter new I Information Control Creator public I Information Control create Information Control Shell parent I Workbench Page page JDI DebugUI Plugin get Active Page return new Expression Information Control page expression Popup Inspect Action ACTION DEFININIITION ID I Information Provider provider new I Information Provider public I Region get Subject I Text Viewer text Viewer int offset return new Region f Snippet Start f Snippet End f Snippet Start public String get Information I Text Viewer text Viewer I Region subject return nothing NON NLS 1 try String content Type Text Utilities get Content Type get Source Viewer get Document info Presenter get Document Partitioning f Snippet Start true info Presenter set Information Provider provider content Type info Presenter install get Source Viewer info Presenter show Information catch Bad Location Exception e return  InformationPresenter infoPresenter InformationPresenter IInformationControlCreator IInformationControl createInformationControl IWorkbenchPage JDIDebugUIPlugin getActivePage ExpressionInformationControl PopupInspectAction ACTION_DEFININIITION_ID IInformationProvider IInformationProvider IRegion getSubject ITextViewer textViewer fSnippetStart fSnippetEnd fSnippetStart getInformation ITextViewer textViewer IRegion contentType TextUtilities getContentType getSourceViewer getDocument infoPresenter getDocumentPartitioning fSnippetStart infoPresenter setInformationProvider contentType infoPresenter getSourceViewer infoPresenter showInformation BadLocationException
private void show Expression final Java Inspect Expression expression Runnable r new Runnable public void run Information Presenter info Presenter new Information Presenter new I Information Control Creator public I Information Control create Information Control Shell parent I Workbench Page page JDI DebugUI Plugin get Active Page return new Expression Information Control page expression Popup Inspect Action ACTION DEFININIITION ID I Information Provider provider new I Information Provider public I Region get Subject I Text Viewer text Viewer int offset return new Region f Snippet Start f Snippet End f Snippet Start public String get Information I Text Viewer text Viewer I Region subject return nothing NON NLS 1 try String content Type Text Utilities get Content Type get Source Viewer get Document info Presenter get Document Partitioning f Snippet Start true info Presenter set Information Provider provider content Type info Presenter install get Source Viewer info Presenter show Information catch Bad Location Exception e return async r  showExpression JavaInspectExpression InformationPresenter infoPresenter InformationPresenter IInformationControlCreator IInformationControl createInformationControl IWorkbenchPage JDIDebugUIPlugin getActivePage ExpressionInformationControl PopupInspectAction ACTION_DEFININIITION_ID IInformationProvider IInformationProvider IRegion getSubject ITextViewer textViewer fSnippetStart fSnippetEnd fSnippetStart getInformation ITextViewer textViewer IRegion contentType TextUtilities getContentType getSourceViewer getDocument infoPresenter getDocumentPartitioning fSnippetStart infoPresenter setInformationProvider contentType infoPresenter getSourceViewer infoPresenter showInformation BadLocationException
Runnable r new Runnable public void run try get Source Viewer get Document replace f Snippet End 0 message select And Reveal f Snippet End message length catch Bad Location Exception e  getSourceViewer getDocument fSnippetEnd selectAndReveal fSnippetEnd BadLocationException
protected void show Exception Throwable exception if exception instanceof Debug Exception Debug Exception de Debug Exception exception Throwable t de get Status get Exception if t null show underlying exception show Underlying Exception t return Byte Array Output Stream bos new Byte Array Output Stream Print Stream ps new Print Stream bos true exception print Stack Trace ps final String message bos to String Runnable r new Runnable public void run try get Source Viewer get Document replace f Snippet End 0 message select And Reveal f Snippet End message length catch Bad Location Exception e async r  showException DebugException DebugException DebugException getStatus getException showUnderlyingException ByteArrayOutputStream ByteArrayOutputStream PrintStream PrintStream printStackTrace toString getSourceViewer getDocument fSnippetEnd selectAndReveal fSnippetEnd BadLocationException
Runnable r new Runnable public void run try get Source Viewer get Document replace f Snippet End 0 message select And Reveal f Snippet End message length catch Bad Location Exception e  getSourceViewer getDocument fSnippetEnd selectAndReveal fSnippetEnd BadLocationException
protected void show Underlying Exception Throwable t if t instanceof Invocation Exception Invocation Exception ie Invocation Exception t Object Reference ref ie exception String e Name ref reference Type name final String message Snippet Messages get Formatted String Snippet Editor exception e Name NON NLS 1 Runnable r new Runnable public void run try get Source Viewer get Document replace f Snippet End 0 message select And Reveal f Snippet End message length catch Bad Location Exception e async r else show Exception t  showUnderlyingException InvocationException InvocationException InvocationException ObjectReference eName referenceType SnippetMessages getFormattedString SnippetEditor eName getSourceViewer getDocument fSnippetEnd selectAndReveal fSnippetEnd BadLocationException showException
protected I Java Project find Java Project throws Java Model Exception Object input get Editor Input if input instanceof I File Editor Input I File Editor Input file I File Editor Input input I Project p file get File get Project try if p get Nature Java Core NATURE ID null return Java Core create p catch Core Exception ce throw new Java Model Exception ce return null  IJavaProject findJavaProject JavaModelException getEditorInput IFileEditorInput IFileEditorInput IFileEditorInput IProject getFile getProject getNature JavaCore NATURE_ID JavaCore CoreException JavaModelException
protected boolean class Path Has Changed String classpath get Class Path get Java Project if f Launched Class Path null class Paths Equal f Launched Class Path classpath Message Dialog open Warning get Shell Snippet Messages get String Snippet Editor warning Snippet Messages get String Snippet Editor warning cpchange NON NLS 2 NON NLS 1 return true return false  classPathHasChanged getClassPath getJavaProject fLaunchedClassPath classPathsEqual fLaunchedClassPath MessageDialog openWarning getShell SnippetMessages getString SnippetEditor SnippetMessages getString SnippetEditor
protected boolean working Dir Has Changed String wd get Working Directory Attribute boolean changed false if wd null f Launched Working Dir null if wd f Launched Working Dir changed true else if wd equals f Launched Working Dir changed true if changed fVM null Message Dialog open Warning get Shell Snippet Messages get String Snippet Editor Warning 1 Snippet Messages get String Snippet Editor The working directory has changed  Restarting the evaluation context  2 NON NLS 1 NON NLS 2 return changed  workingDirHasChanged getWorkingDirectoryAttribute fLaunchedWorkingDir fLaunchedWorkingDir fLaunchedWorkingDir MessageDialog openWarning getShell SnippetMessages getString SnippetEditor Warning_1 SnippetMessages getString SnippetEditor The_working_directory_has_changed _Restarting_the_evaluation_context _2
protected boolean vm Args Changed String args getVM Args Attribute boolean changed false if args null f LaunchedVM Args null if args f LaunchedVM Args changed true else if args equals f LaunchedVM Args changed true if changed fVM null Message Dialog open Warning get Shell Snippet Messages get String Snippet Editor Warning 1 Snippet Messages get String Snippet Editor 1 NON NLS 1 NON NLS 2 return changed  vmArgsChanged getVMArgsAttribute fLaunchedVMArgs fLaunchedVMArgs fLaunchedVMArgs MessageDialog openWarning getShell SnippetMessages getString SnippetEditor Warning_1 SnippetMessages getString SnippetEditor
protected boolean vm Has Changed IVM Install vm getVM Install boolean changed false if vm null f LaunchedVM null if vm f LaunchedVM changed true else if vm equals f LaunchedVM changed true if changed fVM null Message Dialog open Warning get Shell Snippet Messages get String Snippet Editor Warning 1 Snippet Messages get String Snippet Editor The JRE has changed  Restarting the evaluation context  2 NON NLS 1 NON NLS 2 return changed  vmHasChanged IVMInstall getVMInstall fLaunchedVM fLaunchedVM fLaunchedVM MessageDialog openWarning getShell SnippetMessages getString SnippetEditor Warning_1 SnippetMessages getString SnippetEditor The_JRE_has_changed _Restarting_the_evaluation_context _2
protected boolean class Paths Equal String path1 String path2 if path1 length path2 length return false for int i 0 i path1 length i if path1 i equals path2 i return false return true  classPathsEqual
protected synchronized void evaluation Starts if f Thread null try I Thread thread f Thread f Thread null thread resume catch Debug Exception e JDI DebugUI Plugin log e show Exception e return f Evaluating true set Title Image fire Eval State Changed show Status Snippet Messages get String Snippet Editor evaluating NON NLS 1 get Source Viewer set Editable false  evaluationStarts fThread IThread fThread fThread DebugException JDIDebugUIPlugin showException fEvaluating setTitleImage fireEvalStateChanged showStatus SnippetMessages getString SnippetEditor getSourceViewer setEditable
Sets the tab image to indicate whether in the process of evaluating or not protected void set Title Image Image image null if f Evaluating f Old Title Image get Title Image image Java Debug Images get Java Debug Images IMG OBJS SNIPPET EVALUATING else image f Old Title Image f Old Title Image null if image null set Title Image image  setTitleImage fEvaluating fOldTitleImage getTitleImage JavaDebugImages JavaDebugImages IMG_OBJS_SNIPPET_EVALUATING fOldTitleImage fOldTitleImage setTitleImage
Runnable r new Runnable public void run f Evaluating false set Title Image fire Eval State Changed show Status NON NLS 1 get Source Viewer set Editable true  fEvaluating setTitleImage fireEvalStateChanged showStatus getSourceViewer setEditable
protected void evaluation Ends Runnable r new Runnable public void run f Evaluating false set Title Image fire Eval State Changed show Status NON NLS 1 get Source Viewer set Editable true async r  evaluationEnds fEvaluating setTitleImage fireEvalStateChanged showStatus getSourceViewer setEditable
protected void show Status String message I Editor Site site I Editor Site get Site Editor Action Bar Contributor contributor Editor Action Bar Contributor site get Action Bar Contributor contributor get Action Bars get Status Line Manager set Message message  showStatus IEditorSite IEditorSite getSite EditorActionBarContributor EditorActionBarContributor getActionBarContributor getActionBars getStatusLineManager setMessage
protected String get Class Path I Java Project project try return Java Runtime compute Default Runtime Class Path project catch Core Exception e JDI DebugUI Plugin log e return new String 0  getClassPath IJavaProject JavaRuntime computeDefaultRuntimeClassPath CoreException JDIDebugUIPlugin
protected Shell get Shell return get Site get Shell  getShell getSite getShell
set Thread null Runnable r new Runnable public void run vm Terminated  setThread vmTerminated
see I Debug Event Filter filter Debug Events Debug Event public Debug Event filter Debug Events Debug Event events for int i 0 i events length i Debug Event e events i Object source e get Source if source instanceof I Debug Element I Debug Element de I Debug Element source if de instanceof I Debug Target if de get Debug Target equals fVM if e get Kind Debug Event TERMINATE set Thread null Runnable r new Runnable public void run vm Terminated get Shell get Display async Exec r else if de instanceof I Java Thread if e get Kind Debug Event SUSPEND I Java Thread jt I Java Thread de try if jt equals get Thread e get Detail Debug Event EVALUATION return null I Java Stack Frame f I Java Stack Frame jt get Top Stack Frame if f null I Breakpoint bps jt get Breakpoints last line of the eval method in Scrapbook Main1 int line Number f get Line Number if e get Detail Debug Event STEP END line Number 20 line Number 21 f get Declaring Type Name equals org eclipse jdt internal debug ui snippeteditor Scrapbook Main1 NON NLS 1 jt get Debug Target fVM set Thread jt return null else if e get Detail Debug Event BREAKPOINT bps length 0 bps 0 equals Scrapbook Launcher get Default get Magic Breakpoint jt get Debug Target locate the eval method and step over I Stack Frame frames jt get Stack Frames for int j 0 j frames length j I Java Stack Frame frame I Java Stack Frame frames j if frame get Receiving Type Name equals org eclipse jdt internal debug ui snippeteditor Scrapbook Main1 frame get Name equals eval NON NLS 1 NON NLS 2 frame step Over return null catch Debug Exception ex JDI DebugUI Plugin log ex return events  IDebugEventFilter filterDebugEvents DebugEvent DebugEvent filterDebugEvents DebugEvent DebugEvent getSource IDebugElement IDebugElement IDebugElement IDebugTarget getDebugTarget getKind DebugEvent setThread vmTerminated getShell getDisplay asyncExec IJavaThread getKind DebugEvent IJavaThread IJavaThread getThread getDetail DebugEvent IJavaStackFrame IJavaStackFrame getTopStackFrame IBreakpoint getBreakpoints ScrapbookMain1 lineNumber getLineNumber getDetail DebugEvent STEP_END lineNumber lineNumber getDeclaringTypeName ScrapbookMain1 getDebugTarget setThread getDetail DebugEvent ScrapbookLauncher getDefault getMagicBreakpoint getDebugTarget IStackFrame getStackFrames IJavaStackFrame IJavaStackFrame getReceivingTypeName ScrapbookMain1 getName stepOver DebugException JDIDebugUIPlugin
see org eclipse ui texteditor Abstract Text Editor affects Text Presentation org eclipse jface util Property Change Event protected boolean affects Text Presentation Property Change Event event Java Text Tools text Tools Java Plugin get Default get Java Text Tools return text Tools affects Behavior event  AbstractTextEditor affectsTextPresentation PropertyChangeEvent affectsTextPresentation PropertyChangeEvent JavaTextTools textTools JavaPlugin getDefault getJavaTextTools textTools affectsBehavior
protected void handle Preference Store Changed Property Change Event event JDI Source Viewer isv JDI Source Viewer get Source Viewer if isv null I Content Assistant assistant isv get Content Assistant if assistant instanceof Content Assistant JDI Content Assist Preference change Configuration Content Assistant assistant event super handle Preference Store Changed event  handlePreferenceStoreChanged PropertyChangeEvent JDISourceViewer JDISourceViewer getSourceViewer IContentAssistant getContentAssistant ContentAssistant JDIContentAssistPreference changeConfiguration ContentAssistant handlePreferenceStoreChanged
protected I Java Thread get Thread return f Thread  IJavaThread getThread fThread
Sets the thread to perform any evaluations in Notifies the Wait Thread waiting on getting an evaluation thread to perform an evaluation protected synchronized void set Thread I Java Thread thread f Thread thread notify All  WaitThread setThread IJavaThread fThread notifyAll
f LaunchedVM getVM Install Runnable r new Runnable public void run Scrapbook Launcher get Default launch get File  fLaunchedVM getVMInstall ScrapbookLauncher getDefault getFile
protected void launchVM Debug Plugin get Default add Debug Event Filter this f Launched Class Path get Class Path get Java Project f Launched Working Dir get Working Directory Attribute f LaunchedVM Args getVM Args Attribute f LaunchedVM getVM Install Runnable r new Runnable public void run Scrapbook Launcher get Default launch get File Busy Indicator show While get Shell get Display r  DebugPlugin getDefault addDebugEventFilter fLaunchedClassPath getClassPath getJavaProject fLaunchedWorkingDir getWorkingDirectoryAttribute fLaunchedVMArgs getVMArgsAttribute fLaunchedVM getVMInstall ScrapbookLauncher getDefault getFile BusyIndicator showWhile getShell getDisplay
Return the code I File code associated with the current editor input Will return code null code if the current editor input is for an external file public I File get File I Editor Input input get Editor Input if input instanceof I File Editor Input return I File Editor Input input get File return null  IFile IFile getFile IEditorInput getEditorInput IFileEditorInput IFileEditorInput getFile
see org eclipse ui texteditor Abstract Text Editor update Selection Dependent Actions protected void update Selection Dependent Actions super update Selection Dependent Actions fire Eval State Changed  AbstractTextEditor updateSelectionDependentActions updateSelectionDependentActions updateSelectionDependentActions fireEvalStateChanged
Terminates existing VM on a rename of the editor see org eclipse ui part Workbench Part set Title java lang String protected void set Title String title cleanup On Rename Or Move super set Title title  WorkbenchPart setTitle setTitle cleanupOnRenameOrMove setTitle
If the launch configuration has been copied moved or renamed shut down any running VM and clear the relevant cached information protected void cleanup On Rename Or Move if isVM Launched shut DownVM else f Thread null f Evaluation Context null f Launched Class Path null if f Engine null f Engine dispose f Engine null f Java Project null  cleanupOnRenameOrMove isVMLaunched shutDownVM fThread fEvaluationContext fLaunchedClassPath fEngine fEngine fEngine fJavaProject
Returns whether this editor has been opened on a resource that is in a Java project protected boolean is In Java Project try return find Java Project null catch Java Model Exception jme JDI DebugUI Plugin log jme return false  isInJavaProject findJavaProject JavaModelException JDIDebugUIPlugin
Displays an error dialog indicating that evaluation cannot occur outside of a Java Project protected void report Not In Java Project Error String project Name null Object input get Editor Input if input instanceof I File Editor Input I File Editor Input file I File Editor Input input I Project p file get File get Project project Name p get Name String message NON NLS 1 if project Name null message project Name Snippet Messages get String Java Snippet Editor  is not a Java Project  n 1 NON NLS 1 show Error message Snippet Messages get String Java Snippet Editor Unable to perform evaluation outside of a Java Project 2 NON NLS 1  reportNotInJavaProjectError projectName getEditorInput IFileEditorInput IFileEditorInput IFileEditorInput IProject getFile getProject projectName getName projectName projectName SnippetMessages getString JavaSnippetEditor _is_not_a_Java_Project _n_1 showError SnippetMessages getString JavaSnippetEditor Unable_to_perform_evaluation_outside_of_a_Java_Project_2
Workspace Modify Operation op new Workspace Modify Operation public void execute final I Progress Monitor monitor throws Core Exception I Document Provider dp get Document Provider dp save Document monitor new Input dp get Document get Editor Input true  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException IDocumentProvider getDocumentProvider saveDocument newInput getDocument getEditorInput
Asks the user for the workspace path of a file resource and saves the document there see org eclipse ui texteditor Abstract Text Editor perform Save As org eclipse core runtime I Progress Monitor protected void perform Save As I Progress Monitor progress Monitor Shell shell get Site get Shell Save As Dialog dialog new Save As Dialog shell dialog open I Path path dialog get Result if path null if progress Monitor null progress Monitor set Canceled true return I Workspace workspace Resources Plugin get Workspace I File file workspace get Root get File path final I Editor Input new Input new File Editor Input file Workspace Modify Operation op new Workspace Modify Operation public void execute final I Progress Monitor monitor throws Core Exception I Document Provider dp get Document Provider dp save Document monitor new Input dp get Document get Editor Input true boolean success false try get Document Provider about To Change new Input PlatformUI get Workbench get Progress Service busy Cursor While op success true catch Interrupted Exception x catch Invocation Target Exception x JDI DebugUI Plugin log x String title Snippet Messages get String Java Snippet Editor Problems During Save As  3 NON NLS 1 String msg Snippet Messages get String Java Snippet Editor Save could not be completed   4 x get Target Exception get Message NON NLS 1 Message Dialog open Error shell title msg finally get Document Provider changed new Input if success set Input new Input if progress Monitor null progress Monitor set Canceled success  AbstractTextEditor performSaveAs IProgressMonitor performSaveAs IProgressMonitor progressMonitor getSite getShell SaveAsDialog SaveAsDialog IPath getResult progressMonitor progressMonitor setCanceled IWorkspace ResourcesPlugin getWorkspace IFile getRoot getFile IEditorInput newInput FileEditorInput WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException IDocumentProvider getDocumentProvider saveDocument newInput getDocument getEditorInput getDocumentProvider aboutToChange newInput getWorkbench getProgressService busyCursorWhile InterruptedException InvocationTargetException JDIDebugUIPlugin SnippetMessages getString JavaSnippetEditor Problems_During_Save_As _3 SnippetMessages getString JavaSnippetEditor Save_could_not_be_completed __4 getTargetException getMessage MessageDialog openError getDocumentProvider newInput setInput newInput progressMonitor progressMonitor setCanceled
see org eclipse ui I Saveable Part is Save As Allowed public boolean is Save As Allowed return true  ISaveablePart isSaveAsAllowed isSaveAsAllowed
protected I Class File Evaluation Engine get Evaluation Engine if f Engine null I Path output Location get Java Project get Project get Working Location JDI DebugUI Plugin get Unique Identifier java io File f new java io File output Location toOS String f Engine Evaluation Manager new Class File Evaluation Engine get Java Project I Java Debug Target get Thread get Debug Target f if get Imports null f Engine set Imports get Imports else f Engine set Imports new String return f Engine  IClassFileEvaluationEngine getEvaluationEngine fEngine IPath outputLocation getJavaProject getProject getWorkingLocation JDIDebugUIPlugin getUniqueIdentifier outputLocation toOSString fEngine EvaluationManager newClassFileEvaluationEngine getJavaProject IJavaDebugTarget getThread getDebugTarget getImports fEngine setImports getImports fEngine setImports fEngine
see org eclipse ui texteditor Abstract Text Editor create Source Viewer org eclipse swt widgets Composite org eclipse jface text source I Vertical Ruler int protected I Source Viewer create Source Viewer Composite parent I Vertical Ruler ruler int styles return new JDI Source Viewer parent ruler styles  AbstractTextEditor createSourceViewer IVerticalRuler ISourceViewer createSourceViewer IVerticalRuler JDISourceViewer
Returns the working directory attribute for this scrapbook protected String get Working Directory Attribute I File file get File if file null try return Scrapbook Launcher get Working Directory Attribute file catch Core Exception e JDI DebugUI Plugin log e return null  getWorkingDirectoryAttribute IFile getFile ScrapbookLauncher getWorkingDirectoryAttribute CoreException JDIDebugUIPlugin
Returns the working directory attribute for this scrapbook protected String getVM Args Attribute I File file get File if file null try return Scrapbook Launcher getVM Args Attribute file catch Core Exception e JDI DebugUI Plugin log e return null  getVMArgsAttribute IFile getFile ScrapbookLauncher getVMArgsAttribute CoreException JDIDebugUIPlugin
Returns the vm install for this scrapbook protected IVM Install getVM Install I File file get File if file null try return Scrapbook Launcher getVM Install file catch Core Exception e JDI DebugUI Plugin log e return null  IVMInstall getVMInstall IFile getFile ScrapbookLauncher getVMInstall CoreException JDIDebugUIPlugin
Executes the given runnable in the Display thread protected void async Runnable r Control control get Vertical Ruler get Control if control is Disposed control get Display async Exec r  getVerticalRuler getControl isDisposed getDisplay asyncExec
Runnable r new Runnable public void run try get Source Viewer get Document replace offset 0 text catch Bad Location Exception e JDI DebugUI Plugin log e select And Reveal offset text length  getSourceViewer getDocument BadLocationException JDIDebugUIPlugin selectAndReveal
protected void show And Select final String text final int offset Runnable r new Runnable public void run try get Source Viewer get Document replace offset 0 text catch Bad Location Exception e JDI DebugUI Plugin log e select And Reveal offset text length async r  showAndSelect getSourceViewer getDocument BadLocationException JDIDebugUIPlugin selectAndReveal
if required I Show In Target List class return new I Show In Target List public String get Show In Target Ids return new String JavaUI ID PACKAGES I Page Layout ID RES NAV  IShowInTargetList IShowInTargetList getShowInTargetIds ID_PACKAGES IPageLayout ID_RES_NAV
public Object get Adapter Class required if required I Show In Target List class return new I Show In Target List public String get Show In Target Ids return new String JavaUI ID PACKAGES I Page Layout ID RES NAV return super get Adapter required  getAdapter IShowInTargetList IShowInTargetList getShowInTargetIds ID_PACKAGES IPageLayout ID_RES_NAV getAdapter

public class Java Snippet Viewer Configuration extends Java Source Viewer Configuration public Java Snippet Viewer Configuration Java Text Tools tools Java Snippet Editor editor super tools editor  JavaSnippetViewerConfiguration JavaSourceViewerConfiguration JavaSnippetViewerConfiguration JavaTextTools JavaSnippetEditor
see JDI Viewer Configuration get Content Assistant Processor public I Content Assist Processor get Content Assistant Processor return new Java Snippet Completion Processor Java Snippet Editor get Editor  JDIViewerConfiguration getContentAssistantProcessor IContentAssistProcessor getContentAssistantProcessor JavaSnippetCompletionProcessor JavaSnippetEditor getEditor
see Source Viewer Configuration get Content Assistant I Source Viewer public I Content Assistant get Content Assistant I Source Viewer source Viewer Content Assistant assistant new Content Assistant assistant set Content Assist Processor get Content Assistant Processor I Document DEFAULT CONTENT TYPE JDI Content Assist Preference configure assistant get Color Manager assistant set Context Information Popup Orientation I Content Assistant CONTEXT INFO ABOVE assistant set Information Control Creator get Information Control Creator source Viewer return assistant  SourceViewerConfiguration getContentAssistant ISourceViewer IContentAssistant getContentAssistant ISourceViewer sourceViewer ContentAssistant ContentAssistant setContentAssistProcessor getContentAssistantProcessor IDocument DEFAULT_CONTENT_TYPE JDIContentAssistPreference getColorManager setContextInformationPopupOrientation IContentAssistant CONTEXT_INFO_ABOVE setInformationControlCreator getInformationControlCreator sourceViewer
see org eclipse jface text source Source Viewer Configuration get Reconciler org eclipse jface text source I Source Viewer public I Reconciler get Reconciler I Source Viewer source Viewer return null  SourceViewerConfiguration getReconciler ISourceViewer IReconciler getReconciler ISourceViewer sourceViewer

private I Structured Selection f Selection public New Snippet File Creation Wizard set Needs Progress Monitor true set Window Title Snippet Messages get String New Snippet File Creation Wizard title NON NLS 1  IStructuredSelection fSelection NewSnippetFileCreationWizard setNeedsProgressMonitor setWindowTitle SnippetMessages getString NewSnippetFileCreationWizard
public void add Pages super add Pages if f Selection null I Java Element elem get Active Editor Java Input if elem null f Selection new Structured Selection elem else f Selection Structured Selection EMPTY f Page new New Snippet File Wizard Page f Selection add Page f Page  addPages addPages fSelection IJavaElement getActiveEditorJavaInput fSelection StructuredSelection fSelection StructuredSelection fPage NewSnippetFileWizardPage fSelection addPage fPage
see org eclipse jface wizard I Wizard perform Finish public boolean perform Finish return f Page finish  IWizard performFinish performFinish fPage
see org eclipse ui I Workbench Wizard init org eclipse ui I Workbench org eclipse jface viewers I Structured Selection public void init I Workbench workbench I Structured Selection selection f Selection selection set Default Page Image Descriptor Java Debug Images DESC WIZBAN NEWSCRAPPAGE  IWorkbenchWizard IWorkbench IStructuredSelection IWorkbench IStructuredSelection fSelection setDefaultPageImageDescriptor JavaDebugImages DESC_WIZBAN_NEWSCRAPPAGE
If the current active editor edits a Java element return it else return null private I Java Element get Active Editor Java Input I Workbench Page page JDI DebugUI Plugin get Active Page if page null I Editor Part part page get Active Editor if part null I Editor Input editor Input part get Editor Input if editor Input null return I Java Element editor Input get Adapter I Java Element class return null  IJavaElement getActiveEditorJavaInput IWorkbenchPage JDIDebugUIPlugin getActivePage IEditorPart getActiveEditor IEditorInput editorInput getEditorInput editorInput IJavaElement editorInput getAdapter IJavaElement

private static final String fg Default Extension jpage NON NLS 1 public New Snippet File Wizard Page I Structured Selection selection super create Scrap Book Page selection NON NLS 1 set Title Snippet Messages get String New Snippet File Wizard Page title NON NLS 1  fgDefaultExtension NewSnippetFileWizardPage IStructuredSelection createScrapBookPage setTitle SnippetMessages getString NewSnippetFileWizardPage
if focus Part instanceof I Set Selection Target shell get Display async Exec new Runnable public void run I Selection selection new Structured Selection file I Set Selection Target focus Part select Reveal selection  focusPart ISetSelectionTarget getDisplay asyncExec ISelection StructuredSelection ISetSelectionTarget focusPart selectReveal
public boolean finish add extension if non is provided String file Name get File Name if file Name null file Name ends With fg Default Extension set File Name file Name fg Default Extension boolean ret Value super validate Page final I File file create New File if ret Value file null Shell shell get Shell I Workbench Page page JDI DebugUI Plugin get Active Page if shell null page null return true final I Workbench Part focus Part page get Active Part if focus Part instanceof I Set Selection Target shell get Display async Exec new Runnable public void run I Selection selection new Structured Selection file I Set Selection Target focus Part select Reveal selection try IDE open Editor page file true return true catch Part Init Exception e Exception Handler handle e shell Snippet Messages get String New Snippet File Wizard Page open error message e get Message NON NLS 1 return false  fileName getFileName fileName fileName endsWith fgDefaultExtension setFileName fileName fgDefaultExtension retValue validatePage IFile createNewFile retValue getShell IWorkbenchPage JDIDebugUIPlugin getActivePage IWorkbenchPart focusPart getActivePart focusPart ISetSelectionTarget getDisplay asyncExec ISelection StructuredSelection ISetSelectionTarget focusPart selectReveal openEditor PartInitException ExceptionHandler SnippetMessages getString NewSnippetFileWizardPage open_error getMessage
protected boolean validate Page check whether file with extension doesn t exist boolean valid super validate Page if valid return false I Workspace Root workspace Root Resources Plugin get Workspace get Root I Path container Path get Container Full Path if container Path null container Path segment Count 0 I Project project workspace Root get Project container Path segment 0 try if project has Nature Java Core NATURE ID set Error Message Snippet Messages get String New Snippet File Wizard Page error Only In Java Project NON NLS 1 return false catch Core Exception e JDI DebugUI Plugin log e get Status String file Name get File Name if file Name null file Name ends With fg Default Extension file Name file Name fg Default Extension I Path path get Container Full Path if path null workspace Root exists path append file Name set Error Message Snippet Messages get String New Snippet File Wizard Page error Already Exists NON NLS 1 return false return true  validatePage validatePage IWorkspaceRoot workspaceRoot ResourcesPlugin getWorkspace getRoot IPath containerPath getContainerFullPath containerPath containerPath segmentCount IProject workspaceRoot getProject containerPath hasNature JavaCore NATURE_ID setErrorMessage SnippetMessages getString NewSnippetFileWizardPage OnlyInJavaProject CoreException JDIDebugUIPlugin getStatus fileName getFileName fileName fileName endsWith fgDefaultExtension fileName fileName fgDefaultExtension IPath getContainerFullPath workspaceRoot fileName setErrorMessage SnippetMessages getString NewSnippetFileWizardPage AlreadyExists
see org eclipse jface dialogs I Dialog Page create Control org eclipse swt widgets Composite public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Java Debug Help Context Ids NEW SNIPPET WIZARD PAGE  IDialogPage createControl createControl createControl WorkbenchHelp setHelp getControl IJavaDebugHelpContextIds NEW_SNIPPET_WIZARD_PAGE

private static Scrapbook Launcher fg Default null private Scrapbook Launcher see get Default  ScrapbookLauncher fgDefault ScrapbookLauncher getDefault
public static Scrapbook Launcher get Default if fg Default null fg Default new Scrapbook Launcher return fg Default  ScrapbookLauncher getDefault fgDefault fgDefault ScrapbookLauncher fgDefault
Launches a VM for the given srapbook page in debug mode Returns an existing launch if the page is already running param file scrapbook page file return resulting launch or code null code on failure protected I Launch launch I File page clean up orphaned launch cofigs cleanup Launch Configurations if page get File Extension equals jpage NON NLS 1 show No Page Dialog return null I Debug Target vm get Debug Target page if vm null already launched return vm get Launch I Java Project java Project Java Core create page get Project URL jarURL null try jarURL JDI DebugUI Plugin get Default get Bundle get Entry snippetsupport jar NON NLS 1 jarURL Platform as LocalURL jarURL catch MalformedURL Exception e JDI DebugUI Plugin error Dialog Snippet Messages get String Scrapbook Launcher Exception occurred launching scrapbook 1 e NON NLS 1 return null catch IO Exception e JDI DebugUI Plugin error Dialog Snippet Messages get String Scrapbook Launcher Exception occurred launching scrapbook 1 e NON NLS 1 return null List cp new Array List 3 I Runtime Classpath Entry support Entry Java Runtime new Archive Runtime Classpath Entry new Path jarURL get File cp add support Entry get bootpath entries try I Runtime Classpath Entry entries Java Runtime compute Unresolved Runtime Classpath java Project for int i 0 i entries length i if entries i get Classpath Property I Runtime Classpath Entry USER CLASSES cp add entries i I Runtime Classpath Entry class Path I Runtime Classpath Entry cp to Array new I Runtime Classpath Entry cp size return do Launch java Project page class Path catch Core Exception e JDI DebugUI Plugin error Dialog Snippet Messages get String Scrapbook Launcher Unable to launch scrapbook VM 6 e get Status NON NLS 1 return null  ILaunch IFile cleanupLaunchConfigurations getFileExtension showNoPageDialog IDebugTarget getDebugTarget getLaunch IJavaProject javaProject JavaCore getProject JDIDebugUIPlugin getDefault getBundle getEntry asLocalURL MalformedURLException JDIDebugUIPlugin errorDialog SnippetMessages getString ScrapbookLauncher Exception_occurred_launching_scrapbook_1 IOException JDIDebugUIPlugin errorDialog SnippetMessages getString ScrapbookLauncher Exception_occurred_launching_scrapbook_1 ArrayList IRuntimeClasspathEntry supportEntry JavaRuntime newArchiveRuntimeClasspathEntry getFile supportEntry IRuntimeClasspathEntry JavaRuntime computeUnresolvedRuntimeClasspath javaProject getClasspathProperty IRuntimeClasspathEntry USER_CLASSES IRuntimeClasspathEntry classPath IRuntimeClasspathEntry toArray IRuntimeClasspathEntry doLaunch javaProject classPath CoreException JDIDebugUIPlugin errorDialog SnippetMessages getString ScrapbookLauncher Unable_to_launch_scrapbook_VM_6 getStatus
private I Launch do Launch I Java Project p I File page I Runtime Classpath Entry class Path try if fV Ms To Scrapbooks is Empty register for debug events if a scrapbook is not currently running Debug Plugin get Default add Debug Event Listener this I Launch Configuration config null I Launch Configuration Working Copy wc null try config get Launch Configuration Template page if config null wc config get Working Copy catch Core Exception e config null wc null JDI DebugUI Plugin error Dialog Snippet Messages get String Scrapbook Launcher Unable to retrieve scrapbook runtime settings  Settings will revert to default  1 e NON NLS 1 if config null config create Launch Configuration Template page wc config get Working Copy I Path output Location p get Project get Working Location JDI DebugUI Plugin get Unique Identifier File f output Location to File URL u null try u get EncodedURL f catch MalformedURL Exception e JDI DebugUI Plugin error Dialog Snippet Messages get String Scrapbook Launcher Exception occurred launching scrapbook 1 e NON NLS 1 return null String default Classpath Java Runtime compute Default Runtime Class Path p String urls new String default Classpath length 1 urls 0 u to External Form for int i 0 i default Classpath length i f new File default Classpath i try urls i 1 get EncodedURL f to External Form catch MalformedURL Exception e JDI DebugUI Plugin error Dialog Snippet Messages get String Scrapbook Launcher Exception occurred launching scrapbook 1 e NON NLS 1 return null convert to mementos List classpath List new Array List class Path length for int i 0 i class Path length i classpath List add class Path i get Memento wc set Attribute I Java Launch Configuration Constants ATTR DEFAULT CLASSPATH false wc set Attribute I Java Launch Configuration Constants ATTR CLASSPATH classpath List wc set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME p get Element Name if wc get Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER String null null wc set Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER org eclipse jdt debug ui scrapbook Sourcepath Provider NON NLS 1 String Buffer urls String new String Buffer for int i 0 i urls length i urls String append urls String append urls i wc set Attribute I Java Launch Configuration Constants ATTR PROGRAM ARGUMENTS urls String to String wc set Attribute SCRAPBOOK LAUNCH SCRAPBOOK LAUNCH config wc do Save I Launch launch config launch I Launch Manager DEBUG MODE null if launch null I Debug Target dt launch get Debug Target I Breakpoint magic Breakpoint create Magic Breakpoint org eclipse jdt internal debug ui snippeteditor Scrapbook Main NON NLS 1 f Scrapbook ToV Ms put page dt fV Ms To Scrapbooks put dt page fV Ms To Breakpoints put dt magic Breakpoint dt breakpoint Added magic Breakpoint launch set Attribute SCRAPBOOK LAUNCH SCRAPBOOK LAUNCH return launch catch Core Exception e JDI DebugUI Plugin error Dialog Snippet Messages get String Scrapbook Launcher Unable to launch scrapbook VM 6 e get Status NON NLS 1 return null  ILaunch doLaunch IJavaProject IFile IRuntimeClasspathEntry classPath fVMsToScrapbooks isEmpty DebugPlugin getDefault addDebugEventListener ILaunchConfiguration ILaunchConfigurationWorkingCopy getLaunchConfigurationTemplate getWorkingCopy CoreException JDIDebugUIPlugin errorDialog SnippetMessages getString ScrapbookLauncher Unable_to_retrieve_scrapbook_runtime_settings _Settings_will_revert_to_default _1 createLaunchConfigurationTemplate getWorkingCopy IPath outputLocation getProject getWorkingLocation JDIDebugUIPlugin getUniqueIdentifier outputLocation toFile getEncodedURL MalformedURLException JDIDebugUIPlugin errorDialog SnippetMessages getString ScrapbookLauncher Exception_occurred_launching_scrapbook_1 defaultClasspath JavaRuntime computeDefaultRuntimeClassPath defaultClasspath toExternalForm defaultClasspath defaultClasspath getEncodedURL toExternalForm MalformedURLException JDIDebugUIPlugin errorDialog SnippetMessages getString ScrapbookLauncher Exception_occurred_launching_scrapbook_1 classpathList ArrayList classPath classPath classpathList classPath getMemento setAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_CLASSPATH setAttribute IJavaLaunchConfigurationConstants ATTR_CLASSPATH classpathList setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME getElementName getAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER setAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER scrapbookSourcepathProvider StringBuffer urlsString StringBuffer urlsString urlsString setAttribute IJavaLaunchConfigurationConstants ATTR_PROGRAM_ARGUMENTS urlsString toString setAttribute SCRAPBOOK_LAUNCH SCRAPBOOK_LAUNCH doSave ILaunch ILaunchManager DEBUG_MODE IDebugTarget getDebugTarget IBreakpoint magicBreakpoint createMagicBreakpoint ScrapbookMain fScrapbookToVMs fVMsToScrapbooks fVMsToBreakpoints magicBreakpoint breakpointAdded magicBreakpoint setAttribute SCRAPBOOK_LAUNCH SCRAPBOOK_LAUNCH CoreException JDIDebugUIPlugin errorDialog SnippetMessages getString ScrapbookLauncher Unable_to_launch_scrapbook_VM_6 getStatus
Creates an invisible line breakpoint I Breakpoint create Magic Breakpoint String type Name throws Core Exception set a breakpoint on the Thread sleep 100 line of the nop method of Scrapbook Main f Magic Breakpoint JDI Debug Model create Line Breakpoint Resources Plugin get Workspace get Root type Name 59 1 1 0 false null f Magic Breakpoint set Persisted false return f Magic Breakpoint  IBreakpoint createMagicBreakpoint typeName CoreException ScrapbookMain fMagicBreakpoint JDIDebugModel createLineBreakpoint ResourcesPlugin getWorkspace getRoot typeName fMagicBreakpoint setPersisted fMagicBreakpoint
see I Debug Event Set Listener handle Debug Events Debug Event public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i if event get Source instanceof I Debug Target event get Kind Debug Event TERMINATE cleanup I Debug Target event get Source  IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent DebugEvent getSource IDebugTarget getKind DebugEvent IDebugTarget getSource
Returns the debug target associated with the given scrapbook page or code null code if none param page file representing scrapbook page return associated debug target or code null code public I Debug Target get Debug Target I File page return I Debug Target f Scrapbook ToV Ms get page  IDebugTarget getDebugTarget IFile IDebugTarget fScrapbookToVMs
Returns the magic breakpoint associated with the given scrapbook VM The magic breakpoint is the location at which an evaluation begins param target a scrapbook debug target return the breakpoint at which an evaluation begins or code null code if none public I Breakpoint get Magic Breakpoint I Debug Target target return I Breakpoint fV Ms To Breakpoints get target  IBreakpoint getMagicBreakpoint IDebugTarget IBreakpoint fVMsToBreakpoints
protected void show No Page Dialog String title Snippet Messages get String Scrapbook Launcher error title NON NLS 1 String msg Snippet Messages get String Scrapbook Launcher error pagenotfound NON NLS 1 Message Dialog open Error JDI DebugUI Plugin get Active Workbench Shell title msg  showNoPageDialog SnippetMessages getString ScrapbookLauncher SnippetMessages getString ScrapbookLauncher MessageDialog openError JDIDebugUIPlugin getActiveWorkbenchShell
protected void cleanup I Debug Target target Object page fV Ms To Scrapbooks get target if page null fV Ms To Scrapbooks remove target f Scrapbook ToV Ms remove page fV Ms To Breakpoints remove target I Launch launch target get Launch if launch null get Launch Manager remove Launch launch if fV Ms To Scrapbooks is Empty no need to listen to events if no scrapbooks running Debug Plugin get Default remove Debug Event Listener this  IDebugTarget fVMsToScrapbooks fVMsToScrapbooks fScrapbookToVMs fVMsToBreakpoints ILaunch getLaunch getLaunchManager removeLaunch fVMsToScrapbooks isEmpty DebugPlugin getDefault removeDebugEventListener
protected URL get EncodedURL File file throws MalformedURL Exception looking at File toURL the delimiter is always NOT File separator Char String url Delimiter NON NLS 1 String unencoded file toURL to External Form String Buffer encoded new String Buffer String Tokenizer tokenizer new String Tokenizer unencoded url Delimiter encoded append tokenizer next Token file encoded append url Delimiter encoded append tokenizer next Token drive letter and while tokenizer has More Elements encoded append url Delimiter String token tokenizer next Token encoded append URL Encoder encode token if file is Directory encoded append url Delimiter return new URL encoded to String  getEncodedURL MalformedURLException separatorChar urlDelimiter toExternalForm StringBuffer StringBuffer StringTokenizer StringTokenizer urlDelimiter nextToken urlDelimiter nextToken hasMoreElements urlDelimiter nextToken URLEncoder isDirectory urlDelimiter toString
Returns the launch configuration used as a template for launching the given scrapbook file or code null code if none The template contains working directory and JRE settings to use when launching the scrapbook public static I Launch Configuration get Launch Configuration Template I File file throws Core Exception String memento get Launch Config Memento file if memento null return get Launch Manager get Launch Configuration memento return null  ILaunchConfiguration getLaunchConfigurationTemplate IFile CoreException getLaunchConfigMemento getLaunchManager getLaunchConfiguration
Creates and saves template launch configuration for the given scrapbook file public static I Launch Configuration create Launch Configuration Template I File page throws Core Exception I Launch Configuration Type lc Type get Launch Manager get Launch Configuration Type I Java Launch Configuration Constants ID JAVA APPLICATION String name Message Format format Snippet Messages get String Scrapbook Launcher 17 new String page get Name NON NLS 1 I Launch Configuration Working Copy wc lc Type new Instance null name wc set Attribute I DebugUI Constants ATTR PRIVATE true wc set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME org eclipse jdt internal debug ui snippeteditor Scrapbook Main NON NLS 1 wc set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME page get Project get Name wc set Attribute SCRAPBOOK LAUNCH SCRAPBOOK LAUNCH wc set Attribute SCRAPBOOK FILE PATH page get Full Path to String wc set Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER org eclipse jdt debug ui scrapbook Sourcepath Provider NON NLS 1 I Launch Configuration config wc do Save set Launch Config Memento page config get Memento return config  ILaunchConfiguration createLaunchConfigurationTemplate IFile CoreException ILaunchConfigurationType lcType getLaunchManager getLaunchConfigurationType IJavaLaunchConfigurationConstants ID_JAVA_APPLICATION MessageFormat SnippetMessages getString ScrapbookLauncher getName ILaunchConfigurationWorkingCopy lcType newInstance setAttribute IDebugUIConstants ATTR_PRIVATE setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME ScrapbookMain setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME getProject getName setAttribute SCRAPBOOK_LAUNCH SCRAPBOOK_LAUNCH setAttribute SCRAPBOOK_FILE_PATH getFullPath toString setAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER scrapbookSourcepathProvider ILaunchConfiguration doSave setLaunchConfigMemento getMemento
Returns the handle memento for the given scrapbook s launch configuration template or code null code if none private static String get Launch Config Memento I File file try return file get Persistent Property SNIPPET EDITOR LAUNCH CONFIG HANDLE MEMENTO catch Core Exception e JDI DebugUI Plugin log e return null  getLaunchConfigMemento IFile getPersistentProperty SNIPPET_EDITOR_LAUNCH_CONFIG_HANDLE_MEMENTO CoreException JDIDebugUIPlugin
Sets the handle memento for the given scrapbook s launch configuration template protected static void set Launch Config Memento I File file String memento try file set Persistent Property SNIPPET EDITOR LAUNCH CONFIG HANDLE MEMENTO memento catch Core Exception e JDI DebugUI Plugin log e  setLaunchConfigMemento IFile setPersistentProperty SNIPPET_EDITOR_LAUNCH_CONFIG_HANDLE_MEMENTO CoreException JDIDebugUIPlugin
Returns the launch manager protected static I Launch Manager get Launch Manager return Debug Plugin get Default get Launch Manager  ILaunchManager getLaunchManager DebugPlugin getDefault getLaunchManager
Returns the working directory attribute for the given snippet file possibly code null code exception Core Exception if unable to retrieve the attribute public static String get Working Directory Attribute I File file throws Core Exception I Launch Configuration config get Launch Configuration Template file if config null return config get Attribute I Java Launch Configuration Constants ATTR WORKING DIRECTORY String null return null  CoreException getWorkingDirectoryAttribute IFile CoreException ILaunchConfiguration getLaunchConfigurationTemplate getAttribute IJavaLaunchConfigurationConstants ATTR_WORKING_DIRECTORY
Returns the VM args attribute for the given snippet file possibly code null code exception Core Exception if unable to retrieve the attribute public static String getVM Args Attribute I File file throws Core Exception I Launch Configuration config get Launch Configuration Template file if config null return config get Attribute I Java Launch Configuration Constants ATTR VM ARGUMENTS String null return null  CoreException getVMArgsAttribute IFile CoreException ILaunchConfiguration getLaunchConfigurationTemplate getAttribute IJavaLaunchConfigurationConstants ATTR_VM_ARGUMENTS
Returns the VM install used to launch the given snippet file exception Core Exception if unable to retrieve the attribute public static IVM Install getVM Install I File file throws Core Exception I Launch Configuration config get Launch Configuration Template file if config null I Java Project pro Java Core create file get Project return Java Runtime getVM Install pro return Java Runtime computeVM Install config  CoreException IVMInstall getVMInstall IFile CoreException ILaunchConfiguration getLaunchConfigurationTemplate IJavaProject JavaCore getProject JavaRuntime getVMInstall JavaRuntime computeVMInstall
Deletes any scrapbook launch configurations for scrapbooks that have been deleted Rather than listening to all resource deltas configs are deleted each time a scrapbook is launched which is infrequent public void cleanup Launch Configurations try I Launch Configuration Type lc Type get Launch Manager get Launch Configuration Type I Java Launch Configuration Constants ID JAVA APPLICATION I Launch Configuration configs get Launch Manager get Launch Configurations lc Type I Workspace Root root Resources Plugin get Workspace get Root for int i 0 i configs length i String path configs i get Attribute SCRAPBOOK FILE PATH String null if path null I Path page Path new Path path I Resource res root find Member page Path if res null config without a page delete it configs i delete catch Core Exception e log quietly JDI DebugUI Plugin log e  cleanupLaunchConfigurations ILaunchConfigurationType lcType getLaunchManager getLaunchConfigurationType IJavaLaunchConfigurationConstants ID_JAVA_APPLICATION ILaunchConfiguration getLaunchManager getLaunchConfigurations lcType IWorkspaceRoot ResourcesPlugin getWorkspace getRoot getAttribute SCRAPBOOK_FILE_PATH IPath pagePath IResource findMember pagePath CoreException JDIDebugUIPlugin

public static void main String args URL urls get Classpath args if urls null return while true try eval Loop urls catch Class Not Found Exception e return catch No Such Method Exception e return catch Invocation Target Exception e return catch Illegal Access Exception e return  getClasspath evalLoop ClassNotFoundException NoSuchMethodException InvocationTargetException IllegalAccessException
static void eval Loop URL urls throws Class Not Found Exception No Such Method Exception Invocation Target Exception Illegal Access Exception Class Loader cl new URL Class Loader urls null Class clazz cl load Class org eclipse jdt internal debug ui snippeteditor Scrapbook Main1 NON NLS 1 Method method clazz get Declared Method eval new Class Class class NON NLS 1 method invoke null new Object Scrapbook Main class  evalLoop ClassNotFoundException NoSuchMethodException InvocationTargetException IllegalAccessException ClassLoader URLClassLoader loadClass ScrapbookMain1 getDeclaredMethod ScrapbookMain
public static void nop try Thread sleep 100 catch Interrupted Exception e  InterruptedException
static URL get Classpath String url Strings The URL Strings MUST be properly encoded using URL Encoder see Scrapbook Launcher for details URL urls new URL url Strings length 1 for int i 0 i url Strings length i try urls i 1 new URL URL Decoder decode url Strings i catch MalformedURL Exception e return null Protection Domain pd Scrapbook Main class get Protection Domain if pd null return null Code Source cs pd get Code Source if cs null return null urls 0 cs get Location return urls  getClasspath urlStrings URLEncoder ScrapbookLauncher urlStrings urlStrings URLDecoder urlStrings MalformedURLException ProtectionDomain ScrapbookMain getProtectionDomain CodeSource getCodeSource getLocation

public class Scrapbook Main1 public static void eval Class clazz throws Class Not Found Exception No Such Method Exception Invocation Target Exception Illegal Access Exception Method method clazz get Declared Method nop new Class 0 NON NLS 1 method invoke null new Object 0  ScrapbookMain1 ClassNotFoundException NoSuchMethodException InvocationTargetException IllegalAccessException getDeclaredMethod

public I Runtime Classpath Entry compute Unresolved Classpath I Launch Configuration configuration throws Core Exception boolean use Default configuration get Attribute I Java Launch Configuration Constants ATTR DEFAULT SOURCE PATH true I Runtime Classpath Entry entries null if use Default the default source lookup path is the classpath of the associated project I Java Project project Java Runtime get Java Project configuration entries Java Runtime compute Unresolved Runtime Classpath project else recover persisted source path entries recover Runtime Path configuration I Java Launch Configuration Constants ATTR SOURCE PATH return entries  IRuntimeClasspathEntry computeUnresolvedClasspath ILaunchConfiguration CoreException useDefault getAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_SOURCE_PATH IRuntimeClasspathEntry useDefault IJavaProject JavaRuntime getJavaProject JavaRuntime computeUnresolvedRuntimeClasspath recoverRuntimePath IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH

public Select Imports Action Java Snippet Editor editor super editor set Text Snippet Messages get String Select Imports label NON NLS 1 set Tool Tip Text Snippet Messages get String Select Imports tooltip NON NLS 1 set Description Snippet Messages get String Select Imports description NON NLS 1 I Shared Images shared Images JavaUI get Shared Images set Image Descriptor shared Images get Image Descriptor I Shared Images IMG OBJS IMPCONT Workbench Help set Help this I Java Debug Help Context Ids SCRAPBOOK IMPORTS ACTION  SelectImportsAction JavaSnippetEditor setText SnippetMessages getString SelectImports setToolTipText SnippetMessages getString SelectImports setDescription SnippetMessages getString SelectImports ISharedImages sharedImages getSharedImages setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_OBJS_IMPCONT WorkbenchHelp setHelp IJavaDebugHelpContextIds SCRAPBOOK_IMPORTS_ACTION
see I Action run public void run if get Editor is In Java Project get Editor report Not In Java Project Error return choose Imports  IAction getEditor isInJavaProject getEditor reportNotInJavaProjectError chooseImports
private void choose Imports String imports get Editor get Imports Dialog dialog new Select Imports Dialog get Editor imports dialog open  chooseImports getEditor getImports SelectImportsDialog getEditor
see I Snippet State Changed Listener snippet State Changed Java Snippet Editor public void snippet State Changed Java Snippet Editor editor set Enabled editor null editor is Evaluating  ISnippetStateChangedListener snippetStateChanged JavaSnippetEditor snippetStateChanged JavaSnippetEditor setEnabled isEvaluating

private List f Import Names public Imports Content Provider Table Viewer viewer f Viewer viewer populate Imports  fImportNames ImportsContentProvider TableViewer fViewer populateImports
protected void populate Imports f Import Names new Array List 1 if f Imports null for int i 0 i f Imports length i String name f Imports i add Import name  populateImports fImportNames ArrayList fImports fImports fImports addImport
protected void add Import String name Filter imprt new Filter name false if f Import Names contains imprt f Import Names add imprt f Viewer add imprt  addImport fImportNames fImportNames fViewer
protected void remove Imports Object imports for int i 0 i imports length i Filter imprt Filter imports i f Import Names remove imprt f Viewer remove imports  removeImports fImportNames fViewer
see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return f Import Names to Array  IStructuredContentProvider getElements getElements inputElement fImportNames toArray
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
public Select Imports Dialog Java Snippet Editor editor String imports super editor get Shell f Editor editor f Imports imports  SelectImportsDialog JavaSnippetEditor getShell fEditor fImports
f Add Type Button set Font font f Add Type Button add Selection Listener new Selection Listener public void widget Selected Selection Event se add Type  fAddTypeButton setFont fAddTypeButton addSelectionListener SelectionListener widgetSelected SelectionEvent addType
add Type public void widget Default Selected Selection Event se  addType widgetDefaultSelected SelectionEvent
f Add Package Button set Font font f Add Package Button add Selection Listener new Selection Listener public void widget Selected Selection Event se add Package  fAddPackageButton setFont fAddPackageButton addSelectionListener SelectionListener widgetSelected SelectionEvent addPackage
add Package public void widget Default Selected Selection Event se  addPackage widgetDefaultSelected SelectionEvent
f Remove Imports Button set Font font f Remove Imports Button add Selection Listener new Selection Listener public void widget Selected Selection Event se remove Imports  fRemoveImportsButton setFont fRemoveImportsButton addSelectionListener SelectionListener widgetSelected SelectionEvent removeImports
remove Imports public void widget Default Selected Selection Event se  removeImports widgetDefaultSelected SelectionEvent
private void create Import Buttons Composite container Workbench Help set Help container I Java Debug Help Context Ids SNIPPET IMPORTS DIALOG Font font container get Font button container Composite button Container new Composite container SWT NONE Grid Data gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data HORIZONTAL ALIGN FILL button Container set Layout Data gd Grid Layout button Layout new Grid Layout button Layout num Columns 1 button Layout margin Height 0 button Layout margin Width 0 button Container set Layout button Layout Add type button f Add Type Button new Button button Container SWT PUSH f Add Type Button set Text Snippet Messages get String Select Imports Dialog Add  Type 1 NON NLS 1 f Add Type Button set Tool Tip Text Snippet Messages get String Select Imports Dialog Choose a Type to Add as an Import 2 NON NLS 1 gd get Button Grid Data f Add Type Button f Add Type Button set Layout Data gd f Add Type Button set Font font f Add Type Button add Selection Listener new Selection Listener public void widget Selected Selection Event se add Type public void widget Default Selected Selection Event se Add package button f Add Package Button new Button button Container SWT PUSH f Add Package Button set Text Snippet Messages get String Select Imports Dialog Add  Package 3 NON NLS 1 f Add Package Button set Tool Tip Text Snippet Messages get String Select Imports Dialog Choose a Package to Add as an Import 4 NON NLS 1 gd get Button Grid Data f Add Package Button f Add Package Button set Layout Data gd f Add Package Button set Font font f Add Package Button add Selection Listener new Selection Listener public void widget Selected Selection Event se add Package public void widget Default Selected Selection Event se Remove button f Remove Imports Button new Button button Container SWT PUSH f Remove Imports Button set Text Snippet Messages get String Select Imports Dialog Remove 5 NON NLS 1 f Remove Imports Button set Tool Tip Text Snippet Messages get String Select Imports Dialog Remove All Selected Imports 6 NON NLS 1 gd get Button Grid Data f Remove Imports Button f Remove Imports Button set Layout Data gd f Remove Imports Button set Font font f Remove Imports Button add Selection Listener new Selection Listener public void widget Selected Selection Event se remove Imports public void widget Default Selected Selection Event se f Remove Imports Button set Enabled false  createImportButtons WorkbenchHelp setHelp IJavaDebugHelpContextIds SNIPPET_IMPORTS_DIALOG getFont buttonContainer GridData GridData GridData VERTICAL_ALIGN_BEGINNING GridData HORIZONTAL_ALIGN_FILL buttonContainer setLayoutData GridLayout buttonLayout GridLayout buttonLayout numColumns buttonLayout marginHeight buttonLayout marginWidth buttonContainer setLayout buttonLayout fAddTypeButton buttonContainer fAddTypeButton setText SnippetMessages getString SelectImportsDialog Add_ Type_1 fAddTypeButton setToolTipText SnippetMessages getString SelectImportsDialog Choose_a_Type_to_Add_as_an_Import_2 getButtonGridData fAddTypeButton fAddTypeButton setLayoutData fAddTypeButton setFont fAddTypeButton addSelectionListener SelectionListener widgetSelected SelectionEvent addType widgetDefaultSelected SelectionEvent fAddPackageButton buttonContainer fAddPackageButton setText SnippetMessages getString SelectImportsDialog Add_ Package_3 fAddPackageButton setToolTipText SnippetMessages getString SelectImportsDialog Choose_a_Package_to_Add_as_an_Import_4 getButtonGridData fAddPackageButton fAddPackageButton setLayoutData fAddPackageButton setFont fAddPackageButton addSelectionListener SelectionListener widgetSelected SelectionEvent addPackage widgetDefaultSelected SelectionEvent fRemoveImportsButton buttonContainer fRemoveImportsButton setText SnippetMessages getString SelectImportsDialog Remove_5 fRemoveImportsButton setToolTipText SnippetMessages getString SelectImportsDialog Remove_All_Selected_Imports_6 getButtonGridData fRemoveImportsButton fRemoveImportsButton setLayoutData fRemoveImportsButton setFont fRemoveImportsButton addSelectionListener SelectionListener widgetSelected SelectionEvent removeImports widgetDefaultSelected SelectionEvent fRemoveImportsButton setEnabled
private Grid Data get Button Grid Data Button button Grid Data gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING button set Layout Data gd SWT Util set Button Dimension Hint button return gd  GridData getButtonGridData GridData GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING setLayoutData SWTUtil setButtonDimensionHint
private void remove Imports I Structured Selection selection I Structured Selection f Imports Viewer get Selection f Import Content Provider remove Imports selection to Array  removeImports IStructuredSelection IStructuredSelection fImportsViewer getSelection fImportContentProvider removeImports toArray
private void add Package Shell shell f Add Package Button get Display get Active Shell Element List Selection Dialog dialog null try I Java Project project f Editor get Java Project List projects new Array List projects add project I Package Fragment Root roots project get All Package Fragment Roots for int i 0 i roots length i I Package Fragment Root root roots i projects add root get Parent dialog JDI DebugUI Plugin create All Packages Dialog shell I Java Project projects to Array new I Java Project projects size false catch Java Model Exception jme String title Snippet Messages get String Select Imports Dialog Add package as import 7 NON NLS 1 String message Snippet Messages get String Select Imports Dialog Could not open package selection dialog 8 NON NLS 1 Exception Handler handle jme title message return if dialog null return dialog set Title Snippet Messages get String Select Imports Dialog Add package as import 7 NON NLS 1 dialog set Message Snippet Messages get String Select Imports Dialog Select a package to add as an Import 10 NON NLS 1 dialog set Multiple Selection true if dialog open I Dialog Constants CANCEL ID return Object packages dialog get Result if packages null for int i 0 i packages length i I Java Element pkg I Java Element packages i String filter pkg get Element Name filter NON NLS 1 f Import Content Provider add Import filter  addPackage fAddPackageButton getDisplay getActiveShell ElementListSelectionDialog IJavaProject fEditor getJavaProject ArrayList IPackageFragmentRoot getAllPackageFragmentRoots IPackageFragmentRoot getParent JDIDebugUIPlugin createAllPackagesDialog IJavaProject toArray IJavaProject JavaModelException SnippetMessages getString SelectImportsDialog Add_package_as_import_7 SnippetMessages getString SelectImportsDialog Could_not_open_package_selection_dialog_8 ExceptionHandler setTitle SnippetMessages getString SelectImportsDialog Add_package_as_import_7 setMessage SnippetMessages getString SelectImportsDialog Select_a_package_to_add_as_an_Import_10 setMultipleSelection IDialogConstants CANCEL_ID getResult IJavaElement IJavaElement getElementName fImportContentProvider addImport
private void add Type Shell shell f Add Type Button get Display get Active Shell Selection Dialog dialog null try dialog JavaUI create Type Dialog shell PlatformUI get Workbench get Progress Service Search Engine create Java Search Scope new I Java Element f Editor get Java Project true I Java Element Search Constants CONSIDER TYPES false catch Java Model Exception jme String title Snippet Messages get String Select Imports Dialog Add Type as Import 12 NON NLS 1 String message Snippet Messages get String Select Imports Dialog Could not open class selection dialog 13 NON NLS 1 Exception Handler handle jme title message return dialog set Title Snippet Messages get String Select Imports Dialog Add Type as Import 12 NON NLS 1 dialog set Message Snippet Messages get String Select Imports Dialog Select a type to add to add as an import 15 NON NLS 1 if dialog open I Dialog Constants CANCEL ID return Object types dialog get Result if types null types length 0 I Type type I Type types 0 f Import Content Provider add Import type get Fully Qualified Name  addType fAddTypeButton getDisplay getActiveShell SelectionDialog createTypeDialog getWorkbench getProgressService SearchEngine createJavaSearchScope IJavaElement fEditor getJavaProject IJavaElementSearchConstants CONSIDER_TYPES JavaModelException SnippetMessages getString SelectImportsDialog Add_Type_as_Import_12 SnippetMessages getString SelectImportsDialog Could_not_open_class_selection_dialog_13 ExceptionHandler setTitle SnippetMessages getString SelectImportsDialog Add_Type_as_Import_12 setMessage SnippetMessages getString SelectImportsDialog Select_a_type_to_add_to_add_as_an_import_15 IDialogConstants CANCEL_ID getResult IType IType fImportContentProvider addImport getFullyQualifiedName
f Imports Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Selection selection event get Selection if selection is Empty f Remove Imports Button set Enabled false else f Remove Imports Button set Enabled true  fImportsViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection isEmpty fRemoveImportsButton setEnabled fRemoveImportsButton setEnabled
protected Control create Dialog Area Composite parent Font font parent get Font Composite dialog Comp Composite super create Dialog Area parent top level container Composite outer new Composite dialog Comp SWT NONE Grid Layout top Layout new Grid Layout top Layout num Columns 2 outer set Layout top Layout outer set Font font set Title Message Format format Snippet Messages get String Select Imports Dialog Manage the Java Snippet Editor Imports for    0   1 new String f Editor get Editor Input get Name NON NLS 1 Grid Data gd new Grid Data gd vertical Alignment Grid Data FILL gd horizontal Alignment Grid Data FILL outer set Layout Data gd filter table f Imports Table new Table outer SWT BORDER SWT MULTI SWT FULL SELECTION Table Layout table Layout new Table Layout Column Layout Data column Layout Data new Column Layout Data 1 column Layout Data 0 new Column Weight Data 100 table Layout add Column Data column Layout Data 0 f Imports Table set Layout table Layout f Imports Table set Font font new Table Column f Imports Table SWT NONE f Imports Viewer new Table Viewer f Imports Table f Imports Viewer set Label Provider new Filter Label Provider f Imports Viewer set Sorter new Filter Viewer Sorter f Import Content Provider new Imports Content Provider f Imports Viewer f Imports Viewer set Content Provider f Import Content Provider input just needs to be non null f Imports Viewer set Input this gd new Grid Data Grid Data FILL BOTH Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL gd width Hint 100 gd height Hint 300 f Imports Viewer get Table set Layout Data gd f Imports Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Selection selection event get Selection if selection is Empty f Remove Imports Button set Enabled false else f Remove Imports Button set Enabled true create Import Buttons outer apply Dialog Font outer return outer  createDialogArea getFont dialogComp createDialogArea dialogComp GridLayout topLayout GridLayout topLayout numColumns setLayout topLayout setFont setTitle MessageFormat SnippetMessages getString SelectImportsDialog Manage_the_Java_Snippet_Editor_Imports_for___ __1 fEditor getEditorInput getName GridData GridData verticalAlignment GridData horizontalAlignment GridData setLayoutData fImportsTable FULL_SELECTION TableLayout tableLayout TableLayout ColumnLayoutData columnLayoutData ColumnLayoutData columnLayoutData ColumnWeightData tableLayout addColumnData columnLayoutData fImportsTable setLayout tableLayout fImportsTable setFont TableColumn fImportsTable fImportsViewer TableViewer fImportsTable fImportsViewer setLabelProvider FilterLabelProvider fImportsViewer setSorter FilterViewerSorter fImportContentProvider ImportsContentProvider fImportsViewer fImportsViewer setContentProvider fImportContentProvider fImportsViewer setInput GridData GridData FILL_BOTH GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL widthHint heightHint fImportsViewer getTable setLayoutData fImportsViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection isEmpty fRemoveImportsButton setEnabled fRemoveImportsButton setEnabled createImportButtons applyDialogFont
protected void ok Pressed String imports null Object results f Import Content Provider get Elements null if results null results length 0 imports new String results length for int i 0 i results length i Filter imprt Filter results i imports i imprt get Name f Editor set Imports imports super ok Pressed  okPressed fImportContentProvider getElements getName fEditor setImports okPressed
Sets the title for the dialog and establishes the help context see org eclipse jface window Window configure Shell Shell protected void configure Shell Shell shell super configure Shell shell shell set Text Snippet Messages get String Select Imports Dialog Java Snippet Imports 18 NON NLS 1  configureShell configureShell configureShell setText SnippetMessages getString SelectImportsDialog Java_Snippet_Imports_18

Creates a new code Show In Package View Action code param site the site providing context information for this action public Show In Package View Action super Snippet Messages get String Show In Package View Action label NON NLS 1 set Description Snippet Messages get String Show In Package View Action description NON NLS 1 set Tool Tip Text Snippet Messages get String Show In Package View Action tooltip NON NLS 1 Workbench Help set Help this I Java Help Context Ids SHOW IN PACKAGEVIEW ACTION  ShowInPackageViewAction ShowInPackageViewAction SnippetMessages getString ShowInPackageViewAction setDescription SnippetMessages getString ShowInPackageViewAction setToolTipText SnippetMessages getString ShowInPackageViewAction WorkbenchHelp setHelp IJavaHelpContextIds SHOW_IN_PACKAGEVIEW_ACTION
Note This constructor is for internal use only Clients should not call this constructor public Show In Package View Action Java Snippet Editor editor this f Editor editor  ShowInPackageViewAction JavaSnippetEditor fEditor
public void run I File file f Editor get File if file null return Package Explorer Part view Package Explorer Part open In Active Perspective if reveal view file Message Dialog open Information f Editor get Shell get Dialog Title Snippet Messages get String Show In Package View Action not found NON NLS 1  IFile fEditor getFile PackageExplorerPart PackageExplorerPart openInActivePerspective MessageDialog openInformation fEditor getShell getDialogTitle SnippetMessages getString ShowInPackageViewAction not_found
private boolean reveal Package Explorer Part view Object element if view null return false view select Reveal new Structured Selection element I Element Comparer comparer view get Tree Viewer get Comparer Object selected get Selected Element view if comparer null comparer equals element selected element equals selected return true return false  PackageExplorerPart selectReveal StructuredSelection IElementComparer getTreeViewer getComparer getSelectedElement
private Object get Selected Element Package Explorer Part view return I Structured Selection view get Site get Selection Provider get Selection get First Element  getSelectedElement PackageExplorerPart IStructuredSelection getSite getSelectionProvider getSelection getFirstElement
private static String get Dialog Title return Snippet Messages get String Show In Package View Action dialog title NON NLS 1  getDialogTitle SnippetMessages getString ShowInPackageViewAction

private Java Snippet Editor f Editor public Snippet Action Java Snippet Editor editor set Editor editor  JavaSnippetEditor fEditor SnippetAction JavaSnippetEditor setEditor
public void set Editor Java Snippet Editor editor if f Editor null f Editor remove Snippet State Changed Listener this f Editor editor if f Editor null if f Editor get File null external file set Enabled false return f Editor add Snippet State Changed Listener this snippet State Changed f Editor  setEditor JavaSnippetEditor fEditor fEditor removeSnippetStateChangedListener fEditor fEditor fEditor getFile setEnabled fEditor addSnippetStateChangedListener snippetStateChanged fEditor
protected Java Snippet Editor get Editor return f Editor  JavaSnippetEditor getEditor fEditor

public class Snippet Document Factory implements I Document Factory public Snippet Document Factory  SnippetDocumentFactory IDocumentFactory SnippetDocumentFactory
see org eclipse core filebuffers I Document Factory create Document public I Document create Document return new Document  IDocumentFactory createDocument IDocument createDocument

public class Snippet Document Setup Participant implements I Document Setup Participant public Snippet Document Setup Participant  SnippetDocumentSetupParticipant IDocumentSetupParticipant SnippetDocumentSetupParticipant
public void setup I Document document if document null Java Text Tools tools Java Plugin get Default get Java Text Tools I Document Partitioner partitioner tools create Document Partitioner partitioner connect document document set Document Partitioner partitioner  IDocument JavaTextTools JavaPlugin getDefault getJavaTextTools IDocumentPartitioner createDocumentPartitioner setDocumentPartitioner

private Snippet Open Hierarchy On Selection Action f Open On Type Selection Action public Snippet Editor Action Contributor super  SnippetOpenHierarchyOnSelectionAction fOpenOnTypeSelectionAction SnippetEditorActionContributor
public void contribute To Tool Bar I Tool Bar Manager tool Bar Manager if f Stop Action null tool Bar Manager add new Separator I Java DebugUI Constants EVALUATION GROUP return tool Bar Manager add f Stop Action tool Bar Manager add f Select Imports Action tool Bar Manager update false  contributeToToolBar IToolBarManager toolBarManager fStopAction toolBarManager IJavaDebugUIConstants EVALUATION_GROUP toolBarManager fStopAction toolBarManager fSelectImportsAction toolBarManager
public void contribute To Menu I Menu Manager menu if f Open On Selection Action null return super contribute To Menu menu I Menu Manager navigate Menu menu find Menu Using Path I Workbench Action Constants M NAVIGATE if navigate Menu null navigate Menu append To Group I Workbench Action Constants OPEN EXT f Open On Selection Action navigate Menu append To Group I Workbench Action Constants OPEN EXT f Open On Type Selection Action navigate Menu set Visible true  contributeToMenu IMenuManager fOpenOnSelectionAction contributeToMenu IMenuManager navigateMenu findMenuUsingPath IWorkbenchActionConstants M_NAVIGATE navigateMenu navigateMenu appendToGroup IWorkbenchActionConstants OPEN_EXT fOpenOnSelectionAction navigateMenu appendToGroup IWorkbenchActionConstants OPEN_EXT fOpenOnTypeSelectionAction navigateMenu setVisible
public void set Active Editor I Editor Part part super set Active Editor part f Snippet Editor null if part instanceof Java Snippet Editor f Snippet Editor Java Snippet Editor part if f Open On Selection Action null initialize Actions contribute To Menu get Action Bars get Menu Manager contribute To Tool Bar get Action Bars get Tool Bar Manager if f Open On Selection Action null f Stop Action set Editor f Snippet Editor f Select Imports Action set Editor f Snippet Editor f Open On Selection Action set Editor f Snippet Editor f Open On Type Selection Action set Editor f Snippet Editor update Status f Snippet Editor  setActiveEditor IEditorPart setActiveEditor fSnippetEditor JavaSnippetEditor fSnippetEditor JavaSnippetEditor fOpenOnSelectionAction initializeActions contributeToMenu getActionBars getMenuManager contributeToToolBar getActionBars getToolBarManager fOpenOnSelectionAction fStopAction setEditor fSnippetEditor fSelectImportsAction setEditor fSnippetEditor fOpenOnSelectionAction setEditor fSnippetEditor fOpenOnTypeSelectionAction setEditor fSnippetEditor updateStatus fSnippetEditor
protected void initialize Actions f Open On Selection Action new Snippet Open On Selection Action f Snippet Editor f Open On Type Selection Action new Snippet Open Hierarchy On Selection Action f Snippet Editor f Stop Action new Stop Action f Snippet Editor f Select Imports Action new Select Imports Action f Snippet Editor if f Snippet Editor get File null f Select Imports Action set Enabled false  initializeActions fOpenOnSelectionAction SnippetOpenOnSelectionAction fSnippetEditor fOpenOnTypeSelectionAction SnippetOpenHierarchyOnSelectionAction fSnippetEditor fStopAction StopAction fSnippetEditor fSelectImportsAction SelectImportsAction fSnippetEditor fSnippetEditor getFile fSelectImportsAction setEnabled
protected void update Status Java Snippet Editor editor String message NON NLS 1 if editor null editor is Evaluating message Snippet Messages get String Snippet Action Contributor eval Msg NON NLS 1 get Action Bars get Status Line Manager set Message message  updateStatus JavaSnippetEditor isEvaluating SnippetMessages getString SnippetActionContributor evalMsg getActionBars getStatusLineManager setMessage

see org eclipse debug ui I Launch Configuration Dialog generate Name java lang String public String generate Name String name return null  ILaunchConfigurationDialog generateName generateName
see org eclipse debug ui I Launch Configuration Dialog get Mode public String get Mode return I Launch Manager DEBUG MODE  ILaunchConfigurationDialog getMode getMode ILaunchManager DEBUG_MODE
see org eclipse debug ui I Launch Configuration Dialog get Tabs public I Launch Configuration Tab get Tabs return new I Launch Configuration Tab f Working Dir Block  ILaunchConfigurationDialog getTabs ILaunchConfigurationTab getTabs ILaunchConfigurationTab fWorkingDirBlock
see org eclipse debug ui I Launch Configuration Dialog get Active Tab public I Launch Configuration Tab get Active Tab return f Working Dir Block  ILaunchConfigurationDialog getActiveTab ILaunchConfigurationTab getActiveTab fWorkingDirBlock
see org eclipse debug ui I Launch Configuration Dialog set Name java lang String public void set Name String name  ILaunchConfigurationDialog setName setName
see org eclipse debug ui I Launch Configuration Dialog update Buttons public void update Buttons  ILaunchConfigurationDialog updateButtons updateButtons
public void update Message set Valid is Valid set Message get Message set Error Message get Error Message  updateMessage setValid isValid setMessage getMessage setErrorMessage getErrorMessage
see org eclipse jface operation I Runnable Context run boolean boolean org eclipse jface operation I Runnable With Progress public void run boolean fork boolean cancelable I Runnable With Progress runnable  IRunnableContext IRunnableWithProgress IRunnableWithProgress
see org eclipse debug ui I Launch Configuration Dialog set Active Tab org eclipse debug ui I Launch Configuration Tab public void set Active Tab I Launch Configuration Tab tab  ILaunchConfigurationDialog setActiveTab ILaunchConfigurationTab setActiveTab ILaunchConfigurationTab
see org eclipse debug ui I Launch Configuration Dialog set Active Tab int public void set Active Tab int index  ILaunchConfigurationDialog setActiveTab setActiveTab
protected Control create Contents Composite parent Composite comp new Composite parent SWT NONE Grid Layout top Layout new Grid Layout top Layout num Columns 1 comp set Layout top Layout comp set Font parent get Font fake launch config dialog f Proxy new Proxy try f Config Scrapbook Launcher get Launch Configuration Template get File if f Config null f Working Copy f Config get Working Copy catch Core Exception e unable to retrieve launch config create a new one f Config null f Working Copy null JDI DebugUI Plugin error Dialog Snippet Messages get String Snippet Editor Property Page Unable to retrieve scrapbook runtime settings  Settings will revert to defaults  1 e NON NLS 1 if f Config null try f Config Scrapbook Launcher create Launch Configuration Template get File f Working Copy f Config get Working Copy catch Core Exception e JDI DebugUI Plugin error Dialog Snippet Messages get String Snippet Editor Property Page Unable to create launch configuration for scrapbook file 2 e NON NLS 1 f Working Dir Block set Launch Configuration Dialog f Proxy f Working Dir Block create Control comp f Working Dir Block initialize From f Config fVM Arguments Block set Launch Configuration Dialog f Proxy fVM Arguments Block create Control comp fVM Arguments Block initialize From f Config fJRE Tab set Launch Configuration Dialog f Proxy fJRE Tab setVM Specific Arguments Visible false fJRE Tab create Control comp fJRE Tab initialize From f Config return comp  createContents GridLayout topLayout GridLayout topLayout numColumns setLayout topLayout setFont getFont fProxy fConfig ScrapbookLauncher getLaunchConfigurationTemplate getFile fConfig fWorkingCopy fConfig getWorkingCopy CoreException fConfig fWorkingCopy JDIDebugUIPlugin errorDialog SnippetMessages getString SnippetEditorPropertyPage Unable_to_retrieve_scrapbook_runtime_settings _Settings_will_revert_to_defaults _1 fConfig fConfig ScrapbookLauncher createLaunchConfigurationTemplate getFile fWorkingCopy fConfig getWorkingCopy CoreException JDIDebugUIPlugin errorDialog SnippetMessages getString SnippetEditorPropertyPage Unable_to_create_launch_configuration_for_scrapbook_file_2 fWorkingDirBlock setLaunchConfigurationDialog fProxy fWorkingDirBlock createControl fWorkingDirBlock initializeFrom fConfig fVMArgumentsBlock setLaunchConfigurationDialog fProxy fVMArgumentsBlock createControl fVMArgumentsBlock initializeFrom fConfig fJRETab setLaunchConfigurationDialog fProxy fJRETab setVMSpecificArgumentsVisible fJRETab createControl fJRETab initializeFrom fConfig
Returns the snippet page file protected I File get File return I File get Element  IFile getFile IFile getElement
protected void perform Defaults super perform Defaults f Working Dir Block set Defaults f Working Copy fJRE Tab set Defaults f Working Copy fVM Arguments Block set Defaults f Working Copy f Working Dir Block initialize From f Working Copy fJRE Tab initialize From f Working Copy fVM Arguments Block initialize From f Working Copy  performDefaults performDefaults fWorkingDirBlock setDefaults fWorkingCopy fJRETab setDefaults fWorkingCopy fVMArgumentsBlock setDefaults fWorkingCopy fWorkingDirBlock initializeFrom fWorkingCopy fJRETab initializeFrom fWorkingCopy fVMArgumentsBlock initializeFrom fWorkingCopy
see org eclipse jface preference I Preference Page is Valid public boolean is Valid return f Working Dir Block is Valid f Config  IPreferencePage isValid isValid fWorkingDirBlock isValid fConfig
public String get Error Message String message f Working Dir Block get Error Message if message null return fJRE Tab get Error Message return message  getErrorMessage fWorkingDirBlock getErrorMessage fJRETab getErrorMessage
public String get Message String message f Working Dir Block get Message if message null return fJRE Tab get Message return message  getMessage fWorkingDirBlock getMessage fJRETab getMessage
public boolean perform Ok f Working Dir Block perform Apply f Working Copy fJRE Tab perform Apply f Working Copy fVM Arguments Block perform Apply f Working Copy try if f Working Copy contents Equal f Config f Config f Working Copy do Save f Working Copy f Config get Working Copy catch Core Exception e JDI DebugUI Plugin error Dialog Snippet Messages get String Snippet Editor Property Page Unable to save scrapbook settings  3 e NON NLS 1 return super perform Ok  performOk fWorkingDirBlock performApply fWorkingCopy fJRETab performApply fWorkingCopy fVMArgumentsBlock performApply fWorkingCopy fWorkingCopy contentsEqual fConfig fConfig fWorkingCopy doSave fWorkingCopy fConfig getWorkingCopy CoreException JDIDebugUIPlugin errorDialog SnippetMessages getString SnippetEditorPropertyPage Unable_to_save_scrapbook_settings _3 performOk

protected void setup Document Object element I Document document if document null Java Text Tools tools Java Plugin get Default get Java Text Tools I Document Partitioner partitioner tools create Document Partitioner partitioner connect document document set Document Partitioner partitioner  setupDocument IDocument JavaTextTools JavaPlugin getDefault getJavaTextTools IDocumentPartitioner createDocumentPartitioner setDocumentPartitioner

public class Snippet File Document Provider extends Text File Document Provider public Snippet File Document Provider super new Text File Document Provider new Snippet Editor Storage Document Provider  SnippetFileDocumentProvider TextFileDocumentProvider SnippetFileDocumentProvider TextFileDocumentProvider SnippetEditorStorageDocumentProvider

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Snippet Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE SnippetMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException
Gets a string from the resource bundle and formats it with the argument param key the string used to get the bundle value must not be null public static String get Formatted String String key Object arg String format null try format fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1 if arg null arg NON NLS 1 return Message Format format format new Object arg  getFormattedString fgResourceBundle getString MissingResourceException MessageFormat
static Resource Bundle get Bundle return fg Resource Bundle  ResourceBundle getBundle fgResourceBundle

public Snippet Open Hierarchy On Selection Action Java Snippet Editor editor super editor get Site f Editor editor set Resources set Action Definition Id I Java Editor Action Definition Ids OPEN TYPE HIERARCHY editor get Site get Key Binding Service register Action this  SnippetOpenHierarchyOnSelectionAction JavaSnippetEditor getSite fEditor setResources setActionDefinitionId IJavaEditorActionDefinitionIds OPEN_TYPE_HIERARCHY getSite getKeyBindingService registerAction
protected void set Resources set Text Snippet Messages get String Snippet Open Hierarchy On Selection Action label NON NLS 1 set Description Snippet Messages get String Snippet Open Hierarchy On Selection Action tooltip NON NLS 1 set Tool Tip Text Snippet Messages get String Snippet Open Hierarchy On Selection Action description NON NLS 1 set Dialog Title Snippet Messages get String Snippet Open Hierarchy On Selection Dialog title NON NLS 1 set Dialog Message Snippet Messages get String Snippet Open Hierarchy On Selection Dialog message NON NLS 1  setResources setText SnippetMessages getString SnippetOpenHierarchyOnSelectionAction setDescription SnippetMessages getString SnippetOpenHierarchyOnSelectionAction setToolTipText SnippetMessages getString SnippetOpenHierarchyOnSelectionAction setDialogTitle SnippetMessages getString SnippetOpenHierarchyOnSelectionDialog setDialogMessage SnippetMessages getString SnippetOpenHierarchyOnSelectionDialog
protected void set Dialog Title String title f Dialog Title title  setDialogTitle fDialogTitle
protected void set Dialog Message String message f Dialog Message message  setDialogMessage fDialogMessage
public void run if f Editor null return try I Java Element result f Editor code Resolve if result null result length 0 I Java Element chosen select Java Element filter Resolve Results result get Shell f Dialog Title f Dialog Message if chosen null run new Structured Selection chosen return catch Java Model Exception x JDI DebugUI Plugin log x get Shell get Display beep  fEditor IJavaElement fEditor codeResolve IJavaElement selectJavaElement filterResolveResults getShell fDialogTitle fDialogMessage StructuredSelection JavaModelException JDIDebugUIPlugin getShell getDisplay
protected void set Editor Java Snippet Editor content Editor f Editor content Editor  setEditor JavaSnippetEditor contentEditor fEditor contentEditor
Filters out source references from the given code resolve results A utility method that can be called by subclassers protected List filter Resolve Results I Java Element code Resolve Results int n Results code Resolve Results length List refs new Array List n Results for int i 0 i n Results i if code Resolve Results i instanceof I Source Reference refs add code Resolve Results i return refs  filterResolveResults IJavaElement codeResolveResults nResults codeResolveResults ArrayList nResults nResults codeResolveResults ISourceReference codeResolveResults
Shows a dialog for resolving an ambigous Java element Utility method that can be called by subclassers protected I Java Element select Java Element List elements Shell shell String title String message int n Results elements size if n Results 0 return null if n Results 1 return I Java Element elements get 0 int flags Java Element Label Provider SHOW DEFAULT Java Element Label Provider SHOW QUALIFIED Java Element Label Provider SHOW ROOT Element List Selection Dialog dialog new Element List Selection Dialog shell new Java Element Label Provider flags dialog set Title title dialog set Message message dialog set Elements elements to Array if dialog open Window OK Object selection dialog get Result if selection null selection length 0 n Results selection length for int i 0 i n Results i Object current selection i if current instanceof I Java Element return I Java Element current return null  IJavaElement selectJavaElement nResults nResults nResults IJavaElement JavaElementLabelProvider SHOW_DEFAULT JavaElementLabelProvider SHOW_QUALIFIED JavaElementLabelProvider SHOW_ROOT ElementListSelectionDialog ElementListSelectionDialog JavaElementLabelProvider setTitle setMessage setElements toArray getResult nResults nResults IJavaElement IJavaElement

public Snippet Open On Selection Action Java Snippet Editor editor super editor get Site f Editor editor set Resources set Action Definition Id I Java Editor Action Definition Ids OPEN EDITOR editor get Site get Key Binding Service register Action this  SnippetOpenOnSelectionAction JavaSnippetEditor getSite fEditor setResources setActionDefinitionId IJavaEditorActionDefinitionIds OPEN_EDITOR getSite getKeyBindingService registerAction
protected void set Resources set Text Snippet Messages get String Snippet Open On Selection Action label NON NLS 1 set Description Snippet Messages get String Snippet Open On Selection Action tooltip NON NLS 1 set Tool Tip Text Snippet Messages get String Snippet Open On Selection Action description NON NLS 1 set Dialog Title Snippet Messages get String Snippet Open On Selection Dialog title NON NLS 1 set Dialog Message Snippet Messages get String Snippet Open On Selection Dialog message NON NLS 1  setResources setText SnippetMessages getString SnippetOpenOnSelectionAction setDescription SnippetMessages getString SnippetOpenOnSelectionAction setToolTipText SnippetMessages getString SnippetOpenOnSelectionAction setDialogTitle SnippetMessages getString SnippetOpenOnSelectionDialog setDialogMessage SnippetMessages getString SnippetOpenOnSelectionDialog
protected void set Dialog Title String title f Dialog Title title  setDialogTitle fDialogTitle
protected void set Dialog Message String message f Dialog Message message  setDialogMessage fDialogMessage
protected void set Editor Java Snippet Editor content Editor f Editor content Editor  setEditor JavaSnippetEditor contentEditor fEditor contentEditor
Shows a dialog for resolving an ambigous java element Utility method that can be called by subclassers protected I Java Element select Java Element List elements Shell shell String title String message int n Results elements size if n Results 0 return null if n Results 1 return I Java Element elements get 0 int flags Java Element Label Provider SHOW DEFAULT Java Element Label Provider SHOW QUALIFIED Java Element Label Provider SHOW ROOT Element List Selection Dialog dialog new Element List Selection Dialog shell new Java Element Label Provider flags dialog set Title title dialog set Message message dialog set Elements elements to Array if dialog open Window OK Object selection dialog get Result if selection null selection length 0 n Results selection length for int i 0 i n Results i Object current selection i if current instanceof I Java Element return I Java Element current return null  IJavaElement selectJavaElement nResults nResults nResults IJavaElement JavaElementLabelProvider SHOW_DEFAULT JavaElementLabelProvider SHOW_QUALIFIED JavaElementLabelProvider SHOW_ROOT ElementListSelectionDialog ElementListSelectionDialog JavaElementLabelProvider setTitle setMessage setElements toArray getResult nResults nResults IJavaElement IJavaElement
Filters out source references from the given code resolve results A utility method that can be called by subclassers protected List filter Resolve Results I Java Element code Resolve Results int n Results code Resolve Results length List refs new Array List n Results for int i 0 i n Results i if code Resolve Results i instanceof I Source Reference refs add code Resolve Results i return refs  filterResolveResults IJavaElement codeResolveResults nResults codeResolveResults ArrayList nResults nResults codeResolveResults ISourceReference codeResolveResults
public void run if f Editor null return try I Java Element result f Editor code Resolve if result null result length 0 I Java Element chosen select Java Element filter Resolve Results result get Shell f Dialog Title f Dialog Message if chosen null run new Structured Selection chosen return catch Java Model Exception x JDI DebugUI Plugin log x get Shell get Display beep  fEditor IJavaElement fEditor codeResolve IJavaElement selectJavaElement filterResolveResults getShell fDialogTitle fDialogMessage StructuredSelection JavaModelException JDIDebugUIPlugin getShell getDisplay
see Selection Dispatch Action selection Changed I Text Selection public void selection Changed I Text Selection selection set Enabled f Editor null  SelectionDispatchAction selectionChanged ITextSelection selectionChanged ITextSelection setEnabled fEditor

public Stop Action Java Snippet Editor editor super editor set Text Snippet Messages get String Stop Action label NON NLS 1 set Tool Tip Text Snippet Messages get String Stop Action tooltip NON NLS 1 set Description Snippet Messages get String Stop Action description NON NLS 1 set Image Descriptor Java Debug Images DESC TOOL TERMSNIPPET set Disabled Image Descriptor Java Debug Images DESC TOOL TERMSNIPPET DISABLED set Hover Image Descriptor Java Debug Images DESC TOOL TERMSNIPPET HOVER Workbench Help set Help this I Java Debug Help Context Ids TERMINATE SCRAPBOOK VM ACTION  StopAction JavaSnippetEditor setText SnippetMessages getString StopAction setToolTipText SnippetMessages getString StopAction setDescription SnippetMessages getString StopAction setImageDescriptor JavaDebugImages DESC_TOOL_TERMSNIPPET setDisabledImageDescriptor JavaDebugImages DESC_TOOL_TERMSNIPPET_DISABLED setHoverImageDescriptor JavaDebugImages DESC_TOOL_TERMSNIPPET_HOVER WorkbenchHelp setHelp IJavaDebugHelpContextIds TERMINATE_SCRAPBOOK_VM_ACTION
see I Action run public void run get Editor shut DownVM  IAction getEditor shutDownVM
see I Snippet State Changed Listener snippet State Changed Java Snippet Editor public void snippet State Changed Java Snippet Editor editor set Enabled editor null editor isVM Launched  ISnippetStateChangedListener snippetStateChanged JavaSnippetEditor snippetStateChanged JavaSnippetEditor setEnabled isVMLaunched

see org eclipse debug internal ui sourcelookup I Source Container Browser create Source Containers org eclipse swt widgets Shell org eclipse debug core I Launch Configuration public I Source Container add Source Containers Shell shell I Source Lookup Director director return edit Libraries shell director null Source Lookup Messages get String Classpath Container Source Container Browser 0  ISourceContainerBrowser createSourceContainers ILaunchConfiguration ISourceContainer addSourceContainers ISourceLookupDirector editLibraries SourceLookupMessages getString ClasspathContainerSourceContainerBrowser
see org eclipse debug ui sourcelookup I Source Container Browser can Edit Source Containers org eclipse debug core sourcelookup I Source Lookup Director org eclipse debug core sourcelookup I Source Container public boolean can Edit Source Containers I Source Lookup Director director I Source Container containers return containers length 1  ISourceContainerBrowser canEditSourceContainers ISourceLookupDirector ISourceContainer canEditSourceContainers ISourceLookupDirector ISourceContainer
public I Source Container edit Source Containers Shell shell I Source Lookup Director director I Source Container containers Classpath Container Source Container source Container Classpath Container Source Container containers 0 I Path container Path source Container get Path I Classpath Entry classpath Entry Java Core new Container Entry container Path return edit Libraries shell director classpath Entry Source Lookup Messages get String Classpath Container Source Container Browser 1  ISourceContainer editSourceContainers ISourceLookupDirector ISourceContainer ClasspathContainerSourceContainer sourceContainer ClasspathContainerSourceContainer IPath containerPath sourceContainer getPath IClasspathEntry classpathEntry JavaCore newContainerEntry containerPath editLibraries classpathEntry SourceLookupMessages getString ClasspathContainerSourceContainerBrowser
Create or edit a container classpath entry param shell shell to open dialog on param director source lookup director param classpath Entry entry to edit or code null code if creating param title dialog title return new or replacement source containers private I Source Container edit Libraries Shell shell I Source Lookup Director director I Classpath Entry classpath Entry I Java Project project null I Launch Configuration configuration director get Launch Configuration if configuration null try project Java Runtime get Java Project configuration catch Core Exception e I Classpath Entry edits null I Classpath Entry created null if classpath Entry null edits new I Classpath Entry 0 created Build Path Dialog Access choose Container Entries shell project edits else edits new I Classpath Entry classpath Entry I Classpath Entry edit Build Path Dialog Access configure Container Entry shell classpath Entry project edits if edit null created new I Classpath Entry edit if created null I Source Container new Containers new I Source Container created length for int i 0 i created length i I Classpath Entry entry created i Classpath Container Source Container container new Classpath Container Source Container entry get Path container init director new Containers i container return new Containers return new I Source Container 0  classpathEntry ISourceContainer editLibraries ISourceLookupDirector IClasspathEntry classpathEntry IJavaProject ILaunchConfiguration getLaunchConfiguration JavaRuntime getJavaProject CoreException IClasspathEntry IClasspathEntry classpathEntry IClasspathEntry BuildPathDialogAccess chooseContainerEntries IClasspathEntry classpathEntry IClasspathEntry BuildPathDialogAccess configureContainerEntry classpathEntry IClasspathEntry ISourceContainer newContainers ISourceContainer IClasspathEntry ClasspathContainerSourceContainer ClasspathContainerSourceContainer getPath newContainers newContainers ISourceContainer

see org eclipse debug ui sourcelookup I Source Container Browser can Edit Source Containers org eclipse debug core sourcelookup I Source Lookup Director org eclipse debug core sourcelookup I Source Container public boolean can Edit Source Containers I Source Lookup Director director I Source Container containers return containers length 1  ISourceContainerBrowser canEditSourceContainers ISourceLookupDirector ISourceContainer canEditSourceContainers ISourceLookupDirector ISourceContainer
public I Source Container edit Source Containers Shell shell I Source Lookup Director director I Source Container containers Classpath Variable Source Container container Classpath Variable Source Container containers 0 I Path path Build Path Dialog Access configure Variable Entry shell container get Path new I Path container get Path if path null containers new I Source Container 1 containers 0 new Classpath Variable Source Container path return containers return new I Source Container 0  ISourceContainer editSourceContainers ISourceLookupDirector ISourceContainer ClasspathVariableSourceContainer ClasspathVariableSourceContainer IPath BuildPathDialogAccess configureVariableEntry getPath IPath getPath ISourceContainer ClasspathVariableSourceContainer ISourceContainer
public I Source Container add Source Containers Shell shell I Source Lookup Director director I Path paths Build Path Dialog Access choose Variable Entries shell new I Path 0 if paths null I Source Container containers new I Source Container paths length for int i 0 i containers length i containers i new Classpath Variable Source Container paths i return containers return new I Source Container 0  ISourceContainer addSourceContainers ISourceLookupDirector IPath BuildPathDialogAccess chooseVariableEntries IPath ISourceContainer ISourceContainer ClasspathVariableSourceContainer ISourceContainer

private List f Projects public Content Provider List projects f Projects projects  fProjects ContentProvider fProjects
see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return f Projects to Array  IStructuredContentProvider getElements getElements inputElement fProjects toArray
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
public I Source Container add Source Containers Shell shell I Source Lookup Director director List projects get Possible Additions director I Label Provider label Provider new Java Element Label Provider Java Element Label Provider SHOW DEFAULT I Structured Content Provider content new Content Provider projects Project Selection Dialog dialog new Project Selection Dialog shell projects content label Provider Source Lookup Messages get String Java Project Source Container Browser 0 NON NLS 1 dialog set Title Source Lookup Messages get String Java Project Source Container Browser 1 NON NLS 1 Multi Status status new Multi Status JDI DebugUI Plugin get Unique Identifier I Java DebugUI Constants INTERNAL ERROR Source Lookup Messages get String Java Project Source Container Browser 2 null NON NLS 1 List source Containers new Array List if dialog open Window OK Object selections dialog get Result List additions new Array List selections length try for int i 0 i selections length i I Java Project jp I Java Project selections i if dialog is Add Required Projects collect Required Projects jp additions else additions add jp catch Java Model Exception e status add e get Status Iterator iter additions iterator while iter has Next I Java Project jp I Java Project iter next source Containers add new Java Project Source Container jp if dialog is Add Exported Entries try collect Exported Entries jp source Containers catch Core Exception e status add e get Status content dispose label Provider dispose if status isOK JDI DebugUI Plugin error Dialog status get Message status return I Source Container source Containers to Array new I Source Container source Containers size  ISourceContainer addSourceContainers ISourceLookupDirector getPossibleAdditions ILabelProvider labelProvider JavaElementLabelProvider JavaElementLabelProvider SHOW_DEFAULT IStructuredContentProvider ContentProvider ProjectSelectionDialog ProjectSelectionDialog labelProvider SourceLookupMessages getString JavaProjectSourceContainerBrowser setTitle SourceLookupMessages getString JavaProjectSourceContainerBrowser MultiStatus MultiStatus JDIDebugUIPlugin getUniqueIdentifier IJavaDebugUIConstants INTERNAL_ERROR SourceLookupMessages getString JavaProjectSourceContainerBrowser sourceContainers ArrayList getResult ArrayList IJavaProject IJavaProject isAddRequiredProjects collectRequiredProjects JavaModelException getStatus hasNext IJavaProject IJavaProject sourceContainers JavaProjectSourceContainer isAddExportedEntries collectExportedEntries sourceContainers CoreException getStatus labelProvider JDIDebugUIPlugin errorDialog getMessage ISourceContainer sourceContainers toArray ISourceContainer sourceContainers
Returns the possible projects that can be added param director the source lookup director currently being edited protected List get Possible Additions I Source Lookup Director director I Java Project projects I Workspace Root root Resources Plugin get Workspace get Root try projects Java Core create root get Java Projects catch Java Model Exception e JDI DebugUI Plugin log e projects new I Java Project 0 List remaining new Array List for int i 0 i projects length i remaining add projects i List already Selected new Array List I Source Container containers director get Source Containers for int i 0 i containers length i I Source Container container containers i if container get Type get Id equals Java Project Source Container TYPE ID already Selected add Java Project Source Container container get Java Project remaining remove All already Selected return remaining  getPossibleAdditions ISourceLookupDirector IJavaProject IWorkspaceRoot ResourcesPlugin getWorkspace getRoot JavaCore getJavaProjects JavaModelException JDIDebugUIPlugin IJavaProject ArrayList alreadySelected ArrayList ISourceContainer getSourceContainers ISourceContainer getType getId JavaProjectSourceContainer TYPE_ID alreadySelected JavaProjectSourceContainer getJavaProject removeAll alreadySelected
Adds all projects required by code proj code to the list code res code param proj the project for which to compute required projects param res the list to add all required projects too protected void collect Required Projects I Java Project proj List res throws Java Model Exception if res contains proj res add proj I Java Model model proj get Java Model I Classpath Entry entries proj get Raw Classpath for int i 0 i entries length i I Classpath Entry curr entries i if curr get Entry Kind I Classpath Entry CPE PROJECT I Java Project ref model get Java Project curr get Path segment 0 if ref exists collect Required Projects ref res  collectRequiredProjects IJavaProject JavaModelException IJavaModel getJavaModel IClasspathEntry getRawClasspath IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT IJavaProject getJavaProject getPath collectRequiredProjects
Adds all exported entries defined by code proj code to the list code list code param proj param list throws Java Model Exception protected void collect Exported Entries I Java Project proj List list throws Core Exception I Classpath Entry entries proj get Raw Classpath for int i 0 i entries length i I Classpath Entry entry entries i I Source Container source Container null if entry is Exported switch entry get Entry Kind case I Classpath Entry CPE CONTAINER I Classpath Container container Java Core get Classpath Container entry get Path proj source Container new Classpath Container Source Container container get Path break case I Classpath Entry CPE LIBRARY I Package Fragment Root roots proj find Package Fragment Roots entry if roots null roots length 0 source Container new Package Fragment Root Source Container roots 0 break case I Classpath Entry CPE PROJECT String name entry get Path segment 0 I Project p Resources Plugin get Workspace get Root get Project name if p exists I Java Project jp Java Core create p if jp exists source Container new Java Project Source Container jp break case I Classpath Entry CPE VARIABLE source Container new Classpath Variable Source Container entry get Path break default break if source Container null if list contains source Container list add source Container  JavaModelException collectExportedEntries IJavaProject CoreException IClasspathEntry getRawClasspath IClasspathEntry ISourceContainer sourceContainer isExported getEntryKind IClasspathEntry CPE_CONTAINER IClasspathContainer JavaCore getClasspathContainer getPath sourceContainer ClasspathContainerSourceContainer getPath IClasspathEntry CPE_LIBRARY IPackageFragmentRoot findPackageFragmentRoots sourceContainer PackageFragmentRootSourceContainer IClasspathEntry CPE_PROJECT getPath IProject ResourcesPlugin getWorkspace getRoot getProject IJavaProject JavaCore sourceContainer JavaProjectSourceContainer IClasspathEntry CPE_VARIABLE sourceContainer ClasspathVariableSourceContainer getPath sourceContainer sourceContainer sourceContainer

get Bundle BUNDLE NAME private Source Lookup Messages  getBundle BUNDLE_NAME SourceLookupMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

see org eclipse ui model I Workbench Adapter get Children java lang Object public Object get Children Object o return null  IWorkbenchAdapter getChildren getChildren
public Image Descriptor get Image Descriptor Object object if object instanceof Package Fragment Root Source Container Package Fragment Root Source Container container Package Fragment Root Source Container object I Package Fragment Root fragment Root container get Package Fragment Root return get Image Descriptor fragment Root if object instanceof Java Project Source Container Java Project Source Container container Java Project Source Container object I Java Project java Project container get Java Project return get Image Descriptor java Project if object instanceof Classpath Variable Source Container return DebugUI Tools get Image Descriptor I DebugUI Constants IMG OBJS ENV VAR if object instanceof Classpath Container Source Container TODO illegal reference return Java Plugin Images DESC OBJS LIBRARY return null  ImageDescriptor getImageDescriptor PackageFragmentRootSourceContainer PackageFragmentRootSourceContainer PackageFragmentRootSourceContainer IPackageFragmentRoot fragmentRoot getPackageFragmentRoot getImageDescriptor fragmentRoot JavaProjectSourceContainer JavaProjectSourceContainer JavaProjectSourceContainer IJavaProject javaProject getJavaProject getImageDescriptor javaProject ClasspathVariableSourceContainer DebugUITools getImageDescriptor IDebugUIConstants IMG_OBJS_ENV_VAR ClasspathContainerSourceContainer JavaPluginImages DESC_OBJS_LIBRARY
Returns an image descriptor for a java element or code null code if none param element java element return an image descriptor for a java element or code null code if none protected Image Descriptor get Image Descriptor I Java Element element I Workbench Adapter adapter I Workbench Adapter element get Adapter I Workbench Adapter class if adapter null return adapter get Image Descriptor element return null  ImageDescriptor getImageDescriptor IJavaElement IWorkbenchAdapter IWorkbenchAdapter getAdapter IWorkbenchAdapter getImageDescriptor
public String get Label Object o if o instanceof Package Fragment Root Source Container Package Fragment Root Source Container container Package Fragment Root Source Container o I Package Fragment Root fragment Root container get Package Fragment Root I Path path fragment Root get Path if path segment Count 0 String Buffer buffer new String Buffer buffer append path last Segment if path segment Count 1 buffer append NON NLS 1 if path get Device null buffer append path get Device String segments path segments for int i 0 i segments length 1 i buffer append File separator Char buffer append segments i return buffer to String return NON NLS 1  getLabel PackageFragmentRootSourceContainer PackageFragmentRootSourceContainer PackageFragmentRootSourceContainer IPackageFragmentRoot fragmentRoot getPackageFragmentRoot IPath fragmentRoot getPath segmentCount StringBuffer StringBuffer lastSegment segmentCount getDevice getDevice separatorChar toString
see org eclipse ui model I Workbench Adapter get Parent java lang Object public Object get Parent Object o return null  IWorkbenchAdapter getParent getParent

public Object get Adapter Object adaptable Object Class adapter Type if adapter Type equals I Workbench Adapter class return new Workbench Adapter return null  getAdapter adaptableObject adapterType adapterType IWorkbenchAdapter WorkbenchAdapter
see org eclipse core runtime I Adapter Factory get Adapter List public Class get Adapter List return new Class I Workbench Adapter class  IAdapterFactory getAdapterList getAdapterList IWorkbenchAdapter

Creates an instane of a status dialog public Status Dialog Shell parent super parent f Last Status new Status Info  StatusDialog fLastStatus StatusInfo
Specifies whether status line appears to the left of the buttons default or above them param above Buttons if code true code status line is placed above buttons if code false code to the right public void set Status Line Above Buttons boolean above Buttons f Status Line Above Buttons above Buttons  aboveButtons setStatusLineAboveButtons aboveButtons fStatusLineAboveButtons aboveButtons
Update the dialog s status line to reflect the given status It is save to call this method before the dialog has been opened protected void update Status I Status status f Last Status status if f Status Line null f Status Line is Disposed update Buttons Enable State status f Status Line set Error Status status  updateStatus IStatus fLastStatus fStatusLine fStatusLine isDisposed updateButtonsEnableState fStatusLine setErrorStatus
Returns the last status public I Status get Status return f Last Status  IStatus getStatus fLastStatus
Updates the status of the ok button to reflect the given status Subclasses may override this method to update additional buttons param status the status protected void update Buttons Enable State I Status status if f Ok Button null f Ok Button is Disposed f Ok Button set Enabled status matches I Status ERROR  updateButtonsEnableState IStatus fOkButton fOkButton isDisposed fOkButton setEnabled IStatus
protected void configure Shell Shell shell super configure Shell shell if f Title null shell set Text f Title  configureShell configureShell fTitle setText fTitle
public void create super create if f Last Status null policy dialogs are not allowed to come up with an error message if f Last Status matches I Status ERROR Status Info status new Status Info status set Error NON NLS 1 f Last Status status update Status f Last Status  fLastStatus fLastStatus IStatus StatusInfo StatusInfo setError fLastStatus updateStatus fLastStatus
see Dialog create Buttons For Button Bar Composite protected void create Buttons For Button Bar Composite parent f Ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButtonsForButtonBar fOkButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
protected Control create Button Bar Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout if f Status Line Above Buttons layout num Columns 1 else layout num Columns 2 layout margin Height 0 layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Status Line new Message Line composite f Status Line set Alignment SWT LEFT f Status Line set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Status Line set Error Status null apply Dialog Font composite super create Button Bar composite return composite  createButtonBar GridLayout GridLayout fStatusLineAboveButtons numColumns numColumns marginHeight marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN setLayout setLayoutData GridData GridData FILL_HORIZONTAL fStatusLine MessageLine fStatusLine setAlignment fStatusLine setLayoutData GridData GridData FILL_HORIZONTAL fStatusLine setErrorStatus applyDialogFont createButtonBar
Sets the title for this dialog param title the title public void set Title String title f Title title null title NON NLS 1 Shell shell get Shell if shell null shell is Disposed shell set Text f Title  setTitle fTitle getShell isDisposed setText fTitle
Sets the image for this dialog param image the image public void set Image Image image f Image image Shell shell get Shell if shell null shell is Disposed shell set Image f Image  setImage fImage getShell isDisposed setImage fImage

Creates a status set to OK no message public Status Info this OK null  StatusInfo
Creates a status param severity The status severity ERROR WARNING INFO and OK param message The message of the status Applies only for ERROR WARNING and INFO public Status Info int severity String message f Status Message message f Severity severity  StatusInfo fStatusMessage fSeverity
Returns if the status severity is OK public boolean isOK return f Severity I Status OK  fSeverity IStatus
Returns if the status severity is WARNING public boolean is Warning return f Severity I Status WARNING  isWarning fSeverity IStatus
Returns if the status severity is INFO public boolean is Info return f Severity I Status INFO  isInfo fSeverity IStatus
Returns if the status severity is ERROR public boolean is Error return f Severity I Status ERROR  isError fSeverity IStatus
see I Status get Message public String get Message return f Status Message  IStatus getMessage getMessage fStatusMessage
Sets the status to ERROR param The error message can be empty but not null public void set Error String error Message Assert is Not Null error Message f Status Message error Message f Severity I Status ERROR  setError errorMessage isNotNull errorMessage fStatusMessage errorMessage fSeverity IStatus
Sets the status to WARNING param The warning message can be empty but not null public void set Warning String warning Message Assert is Not Null warning Message f Status Message warning Message f Severity I Status WARNING  setWarning warningMessage isNotNull warningMessage fStatusMessage warningMessage fSeverity IStatus
Sets the status to INFO param The info message can be empty but not null public void set Info String info Message Assert is Not Null info Message f Status Message info Message f Severity I Status INFO  setInfo infoMessage isNotNull infoMessage fStatusMessage infoMessage fSeverity IStatus
Sets the status to OK public void setOK f Status Message null f Severity I Status OK  fStatusMessage fSeverity IStatus
see I Status matches int public boolean matches int severity Mask return f Severity severity Mask 0  IStatus severityMask fSeverity severityMask
Returns always code false code see I Status is Multi Status public boolean is Multi Status return false  IStatus isMultiStatus isMultiStatus
see I Status get Severity public int get Severity return f Severity  IStatus getSeverity getSeverity fSeverity
see I Status get Plugin public String get Plugin return JavaUI ID PLUGIN  IStatus getPlugin getPlugin ID_PLUGIN
Returns always code null code see I Status get Exception public Throwable get Exception return null  IStatus getException getException
Returns always the error severity see I Status get Code public int get Code return f Severity  IStatus getCode getCode fSeverity
Returns always code null code see I Status get Children public I Status get Children return new I Status 0  IStatus getChildren IStatus getChildren IStatus

Constructs an editor input on the given storage public Storage Editor Input I Storage storage f Storage storage  StorageEditorInput IStorage fStorage
see I Storage Editor Input get Storage public I Storage get Storage return f Storage  IStorageEditorInput getStorage IStorage getStorage fStorage
see I Editor Input get Image Descriptor public Image Descriptor get Image Descriptor return JavaUI get Shared Images get Image Descriptor I Shared Images IMG OBJS CUNIT  IEditorInput getImageDescriptor ImageDescriptor getImageDescriptor getSharedImages getImageDescriptor ISharedImages IMG_OBJS_CUNIT
see I Editor Input get Name public String get Name return get Storage get Name  IEditorInput getName getName getStorage getName
see I Editor Input get Persistable public I Persistable Element get Persistable return null  IEditorInput getPersistable IPersistableElement getPersistable
see I Editor Input get Tool Tip Text public String get Tool Tip Text return get Storage get Full Path toOS String  IEditorInput getToolTipText getToolTipText getStorage getFullPath toOSString
see java lang Object equals java lang Object public boolean equals Object object return object instanceof Storage Editor Input get Storage equals Storage Editor Input object get Storage  StorageEditorInput getStorage StorageEditorInput getStorage
see java lang Object hash Code public int hash Code return get Storage hash Code  hashCode hashCode getStorage hashCode

Display display JDI DebugUI Plugin get Standard Display display sync Exec new Runnable public void run dialog open  JDIDebugUIPlugin getStandardDisplay syncExec
see I Status Handler handle Status I Status Object public Object handle Status I Status status Object source throws Core Exception I Java Thread thread I Java Thread source final Error Dialog dialog new Error Dialog JDI DebugUI Plugin get Active Workbench Shell DebugUI Messages get String Suspend Timeout Handler suspend Message Format format DebugUI Messages get String Suspend Timeout Handler timeout occurred new String thread get Name status I Status WARNING I Status ERROR I Status INFO NON NLS 1 NON NLS 2 Display display JDI DebugUI Plugin get Standard Display display sync Exec new Runnable public void run dialog open return null  IStatusHandler handleStatus IStatus handleStatus IStatus CoreException IJavaThread IJavaThread ErrorDialog ErrorDialog JDIDebugUIPlugin getActiveWorkbenchShell DebugUIMessages getString SuspendTimeoutHandler MessageFormat DebugUIMessages getString SuspendTimeoutHandler timeout_occurred getName IStatus IStatus IStatus JDIDebugUIPlugin getStandardDisplay syncExec

public String resolve Value I Dynamic Variable variable String argument throws Core Exception I Resource resource get Selected Resource variable I Java Element java Element Java Core create resource if java Element null I Type type get Type java Element if type null return type get Fully Qualified Name abort DebugUI Messages get String Type Name Resolver 0 null NON NLS 1 return null  resolveValue IDynamicVariable CoreException IResource getSelectedResource IJavaElement javaElement JavaCore javaElement IType getType javaElement getFullyQualifiedName DebugUIMessages getString TypeNameResolver
Returns the primary type in the given Java element or code null code if none param element the Java element return the primary type in the given Java element public static I Type get Type I Java Element element I Type type null int element Type element get Element Type switch element Type case I Java Element CLASS FILE try type I Class File element get Type catch Java Model Exception e Ignore break case I Java Element COMPILATION UNIT type I Compilation Unit element find Primary Type break return type  IType getType IJavaElement IType elementType getElementType elementType IJavaElement CLASS_FILE IClassFile getType JavaModelException IJavaElement COMPILATION_UNIT ICompilationUnit findPrimaryType

public class Zip Entry Storage Editor Input extends Storage Editor Input public Zip Entry Storage Editor Input Zip Entry Storage storage super storage  ZipEntryStorageEditorInput StorageEditorInput ZipEntryStorageEditorInput ZipEntryStorage
see org eclipse ui I Editor Input exists public boolean exists return true  IEditorInput

Field Binding delegate This Code Snippet Allocation Expression constructor comment public Code Snippet Allocation Expression Evaluation Context evaluation Context this evaluation Context evaluation Context  FieldBinding delegateThis CodeSnippetAllocationExpression CodeSnippetAllocationExpression EvaluationContext evaluationContext evaluationContext evaluationContext
public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position Reference Binding allocated Type this binding declaring Class if this binding can Be Seen By allocated Type this current Scope code Stream new  allocated Type if value Required code Stream dup better highlight for allocation display the type individually code Stream record Positions From pc this type source Start handling innerclass instance allocation enclosing instance arguments if allocated Type is Nested Type code Stream generate Synthetic Enclosing Instance Values current Scope allocated Type enclosing Instance this generate the arguments for constructor if this arguments null for int i 0 count this arguments length i count i this arguments i generate Code current Scope code Stream true handling innerclass instance allocation outer local arguments if allocated Type is Nested Type code Stream generate Synthetic Outer Argument Values current Scope allocated Type this invoke constructor code Stream invokespecial this binding else private emulation using reflect Code Snippet Code Stream code Stream generate Emulation For Constructor current Scope this binding generate arguments if this arguments null int args Length this arguments length code Stream generate Inlined Value args Length code Stream new Array current Scope new Array Binding current Scope get Type Type Constants JAVA LANG OBJECT 1 code Stream dup for int i 0 i args Length i code Stream generate Inlined Value i this arguments i generate Code current Scope code Stream true Type Binding parameter Binding this binding parameters i if parameter Binding is Base Type parameter Binding Null Binding Code Snippet Code Stream code Stream generate Object Wrapper For Type this binding parameters i code Stream aastore if i args Length 1 code Stream dup else code Stream generate Inlined Value 0 code Stream new Array current Scope new Array Binding current Scope get Type Type Constants JAVA LANG OBJECT 1 Code Snippet Code Stream code Stream invoke Java Lang Reflect Constructor New Instance code Stream checkcast allocated Type code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream ReferenceBinding allocatedType declaringClass canBeSeenBy allocatedType currentScope codeStream new_ allocatedType valueRequired codeStream codeStream recordPositionsFrom sourceStart allocatedType isNestedType codeStream generateSyntheticEnclosingInstanceValues currentScope allocatedType enclosingInstance generateCode currentScope codeStream allocatedType isNestedType codeStream generateSyntheticOuterArgumentValues currentScope allocatedType codeStream CodeSnippetCodeStream codeStream generateEmulationForConstructor currentScope argsLength codeStream generateInlinedValue argsLength codeStream newArray currentScope ArrayBinding currentScope getType TypeConstants JAVA_LANG_OBJECT codeStream argsLength codeStream generateInlinedValue generateCode currentScope codeStream TypeBinding parameterBinding parameterBinding isBaseType parameterBinding NullBinding CodeSnippetCodeStream codeStream generateObjectWrapperForType codeStream argsLength codeStream codeStream generateInlinedValue codeStream newArray currentScope ArrayBinding currentScope getType TypeConstants JAVA_LANG_OBJECT CodeSnippetCodeStream codeStream invokeJavaLangReflectConstructorNewInstance codeStream allocatedType codeStream recordPositionsFrom sourceStart
exact need public void manage Enclosing Instance Access If Necessary Block Scope current Scope Flow Info flow Info not supported yet  manageEnclosingInstanceAccessIfNecessary BlockScope currentScope FlowInfo flowInfo
not supported yet public void manage Synthetic Access If Necessary Block Scope current Scope Flow Info flow Info do nothing  manageSyntheticAccessIfNecessary BlockScope currentScope FlowInfo flowInfo
public Type Binding resolve Type Block Scope scope Propagate the type checking to the arguments and check if the constructor is defined this constant NotA Constant this resolved Type this type resolve Type scope will check for null after args are resolved buffering the arguments types Type Binding argument Types No Parameters if this arguments null boolean arg Has Error false int length this arguments length argument Types new Type Binding length for int i 0 i length i if argument Types i this arguments i resolve Type scope null arg Has Error true if arg Has Error return this resolved Type if this resolved Type null return null if this resolved Type can Be Instantiated scope problem Reporter cannot Instantiate this type this resolved Type return this resolved Type Reference Binding allocated Type Reference Binding this resolved Type if this binding scope get Constructor allocated Type argument Types this is Valid Binding if this binding instanceof Problem Method Binding Problem Method Binding this binding problem Id Not Visible if this evaluation Context declaring Type Name null this delegate This scope get Field scope enclosing Source Type DELEGATE THIS this if this delegate This null if this binding declaring Class null this binding declaring Class allocated Type scope problem Reporter invalid Constructor this this binding return this resolved Type else if this binding declaring Class null this binding declaring Class allocated Type scope problem Reporter invalid Constructor this this binding return this resolved Type Code Snippet Scope local Scope new Code Snippet Scope scope Method Binding private Binding local Scope get Constructor Reference Binding this delegate This type argument Types this if private Binding is Valid Binding if this binding declaring Class null this binding declaring Class allocated Type scope problem Reporter invalid Constructor this this binding return this resolved Type else this binding private Binding else if this binding declaring Class null this binding declaring Class allocated Type scope problem Reporter invalid Constructor this this binding return this resolved Type if is Method Use Deprecated this binding scope scope problem Reporter deprecated Method this binding this if this arguments null for int i 0 i this arguments length i this arguments i implicit Widening this binding parameters i argument Types i return allocated Type  TypeBinding resolveType BlockScope NotAConstant resolvedType resolveType TypeBinding argumentTypes NoParameters argHasError argumentTypes TypeBinding argumentTypes resolveType argHasError argHasError resolvedType resolvedType resolvedType canBeInstantiated problemReporter cannotInstantiate resolvedType resolvedType ReferenceBinding allocatedType ReferenceBinding resolvedType getConstructor allocatedType argumentTypes isValidBinding ProblemMethodBinding ProblemMethodBinding problemId NotVisible evaluationContext declaringTypeName delegateThis getField enclosingSourceType DELEGATE_THIS delegateThis declaringClass declaringClass allocatedType problemReporter invalidConstructor resolvedType declaringClass declaringClass allocatedType problemReporter invalidConstructor resolvedType CodeSnippetScope localScope CodeSnippetScope MethodBinding privateBinding localScope getConstructor ReferenceBinding delegateThis argumentTypes privateBinding isValidBinding declaringClass declaringClass allocatedType problemReporter invalidConstructor resolvedType privateBinding declaringClass declaringClass allocatedType problemReporter invalidConstructor resolvedType isMethodUseDeprecated problemReporter deprecatedMethod implicitWidening argumentTypes allocatedType

public class Code Snippet Class File extends Class File Code Snippet Class File constructor comment param a Type org eclipse jdt internal compiler lookup Source Type Binding param enclosing Class File org eclipse jdt internal compiler Class File param creating Problem Type boolean public Code Snippet Class File org eclipse jdt internal compiler lookup Source Type Binding a Type org eclipse jdt internal compiler Class File enclosing Class File boolean creating Problem Type INTERNAL USE ONLY This methods creates a new instance of the receiver param a Type org eclipse jdt internal compiler lookup Source Type Binding param enclosing Class File org eclipse jdt internal compiler codegen Class File param creating Problem Type CODE boolean CODE this reference Binding a Type init Byte Arrays generate the magic numbers inside the header this header this header Offset byte 0xCAFEBABEL 24 this header this header Offset byte 0xCAFEBABEL 16 this header this header Offset byte 0xCAFEBABEL 8 this header this header Offset byte 0xCAFEBABEL 0 this targetJDK this reference Binding scope environment options targetJDK this header this header Offset byte targetJDK 8 minor high this header this header Offset byte targetJDK 0 minor low this header this header Offset byte targetJDK 24 major high this header this header Offset byte targetJDK 16 major low this constant Pool Offset this header Offset this header Offset 2 this constant Pool new Code Snippet Constant Pool this int access Flags a Type get Access Flags if a Type is Class access Flags Acc Super if a Type is Nested Type if a Type is Static clear Acc Static access Flags Acc Static if a Type is Private clear Acc Private and Acc Public access Flags Acc Private Acc Public if a Type is Protected clear Acc Protected and set Acc Public access Flags Acc Protected access Flags Acc Public clear Acc Strictfp access Flags Acc Strictfp this enclosing Class File enclosing Class File now we continue to generate the bytes inside the contents array this contents this contents Offset byte access Flags 8 this contents this contents Offset byte access Flags int class Name Index this constant Pool literal Index a Type this contents this contents Offset byte class Name Index 8 this contents this contents Offset byte class Name Index int superclass Name Index if a Type is Interface superclass Name Index this constant Pool literal Index For Java Lang Object else superclass Name Index a Type superclass null 0 this constant Pool literal Index a Type superclass this contents this contents Offset byte superclass Name Index 8 this contents this contents Offset byte superclass Name Index Reference Binding super Interfaces Binding a Type super Interfaces int interfaces Count super Interfaces Binding length this contents this contents Offset byte interfaces Count 8 this contents this contents Offset byte interfaces Count if super Interfaces Binding null for int i 0 i interfaces Count i int interface Index this constant Pool literal Index super Interfaces Binding i this contents this contents Offset byte interface Index 8 this contents this contents Offset byte interface Index this produce Debug Attributes this reference Binding scope environment options produce Debug Attributes this inner Classes Bindings new Reference Binding INNER CLASSES SIZE this creating Problem Type creating Problem Type this code Stream new Code Snippet Code Stream this retrieve the enclosing one guaranteed to be the one matching the propagated flow info 1FF9ZBU LFCOM ALL Local variable attributes busted Sanity check Class File outermost Class File this outer Most Enclosing Class File if this outermost Class File this code Stream max Field Count a Type scope reference Type max Field Count else this code Stream max Field Count outermost Class File code Stream max Field Count  CodeSnippetClassFile ClassFile CodeSnippetClassFile aType SourceTypeBinding enclosingClassFile ClassFile creatingProblemType CodeSnippetClassFile SourceTypeBinding aType ClassFile enclosingClassFile creatingProblemType aType SourceTypeBinding enclosingClassFile ClassFile creatingProblemType referenceBinding aType initByteArrays headerOffset headerOffset headerOffset headerOffset referenceBinding headerOffset headerOffset headerOffset headerOffset constantPoolOffset headerOffset headerOffset constantPool CodeSnippetConstantPool accessFlags aType getAccessFlags aType isClass accessFlags AccSuper aType isNestedType aType isStatic Acc_Static accessFlags AccStatic aType isPrivate Acc_Private Acc_Public accessFlags AccPrivate AccPublic aType isProtected Acc_Protected Acc_Public accessFlags AccProtected accessFlags AccPublic Acc_Strictfp accessFlags AccStrictfp enclosingClassFile enclosingClassFile contentsOffset accessFlags contentsOffset accessFlags classNameIndex constantPool literalIndex aType contentsOffset classNameIndex contentsOffset classNameIndex superclassNameIndex aType isInterface superclassNameIndex constantPool literalIndexForJavaLangObject superclassNameIndex aType constantPool literalIndex aType contentsOffset superclassNameIndex contentsOffset superclassNameIndex ReferenceBinding superInterfacesBinding aType superInterfaces interfacesCount superInterfacesBinding contentsOffset interfacesCount contentsOffset interfacesCount superInterfacesBinding interfacesCount interfaceIndex constantPool literalIndex superInterfacesBinding contentsOffset interfaceIndex contentsOffset interfaceIndex produceDebugAttributes referenceBinding produceDebugAttributes innerClassesBindings ReferenceBinding INNER_CLASSES_SIZE creatingProblemType creatingProblemType codeStream CodeSnippetCodeStream ClassFile outermostClassFile outerMostEnclosingClassFile outermostClassFile codeStream maxFieldCount aType referenceType maxFieldCount codeStream maxFieldCount outermostClassFile codeStream maxFieldCount
INTERNAL USE ONLY Request the creation of a Class File compatible representation of a problematic type param type Declaration org eclipse jdt internal compiler ast Type Declaration param unit Result org eclipse jdt internal compiler Compilation Unit Result public static void create Problem Type Type Declaration type Declaration Compilation Result unit Result Source Type Binding type Binding type Declaration binding Class File class File new Code Snippet Class File type Binding null true inner attributes if type Binding is Member Type class File record Enclosing Type Attributes type Binding add its fields Field Binding fields type Binding fields if fields null fields No Fields for int i 0 max fields length i max i if fields i constant null Field Reference get Constant For fields i null false null class File add Field Infos else we have to set the number of fields to be equals to 0 class File contents class File contents Offset 0 class File contents class File contents Offset 0 leave some space for the method Count class File set For Method Infos add its user defined methods Method Binding methods type Binding methods Abstract Method Declaration method Declarations type Declaration methods int max Method Decl method Declarations null 0 method Declarations length int problems Length I Problem problems unit Result get Errors if problems null problems new I Problem 0 I Problem problems Copy new I Problem problems Length problems length System arraycopy problems 0 problems Copy 0 problems Length if methods null if type Binding is Interface we cannot create problem methods for an interface So we have to generate a clinit which should contain all the problem class File add Problem Clinit problems Copy for int i 0 max methods length i max i Method Binding method Binding if method Binding methods i null find the corresponding method declaration for int j 0 j max Method Decl j if method Declarations j null method Declarations j binding methods i if method Binding is Constructor class File add Abstract Method method Declarations j method Binding break else for int i 0 max methods length i max i Method Binding method Binding if method Binding methods i null find the corresponding method declaration for int j 0 j max Method Decl j if method Declarations j null method Declarations j binding methods i Abstract Method Declaration method Decl if method Decl method Declarations j is Constructor class File add Problem Constructor method Decl method Binding problems Copy else class File add Problem Method method Decl method Binding problems Copy break add abstract methods class File add Default Abstract Methods propagate generation of problem member types if type Declaration member Types null for int i 0 max type Declaration member Types length i max i Type Declaration member Type type Declaration member Types i if member Type binding null class File record Nested Member Attribute member Type binding Class File create Problem Type member Type unit Result class File add Attributes unit Result record type Binding constant Pool Name class File  ClassFile typeDeclaration TypeDeclaration unitResult CompilationUnitResult createProblemType TypeDeclaration typeDeclaration CompilationResult unitResult SourceTypeBinding typeBinding typeDeclaration ClassFile classFile CodeSnippetClassFile typeBinding typeBinding isMemberType classFile recordEnclosingTypeAttributes typeBinding FieldBinding typeBinding NoFields FieldReference getConstantFor classFile addFieldInfos classFile classFile contentsOffset classFile classFile contentsOffset methodCount classFile setForMethodInfos MethodBinding typeBinding AbstractMethodDeclaration methodDeclarations typeDeclaration maxMethodDecl methodDeclarations methodDeclarations problemsLength IProblem unitResult getErrors IProblem IProblem problemsCopy IProblem problemsLength problemsCopy problemsLength typeBinding isInterface classFile addProblemClinit problemsCopy MethodBinding methodBinding methodBinding maxMethodDecl methodDeclarations methodDeclarations methodBinding isConstructor classFile addAbstractMethod methodDeclarations methodBinding MethodBinding methodBinding methodBinding maxMethodDecl methodDeclarations methodDeclarations AbstractMethodDeclaration methodDecl methodDecl methodDeclarations isConstructor classFile addProblemConstructor methodDecl methodBinding problemsCopy classFile addProblemMethod methodDecl methodBinding problemsCopy classFile addDefaultAbstractMethods typeDeclaration memberTypes typeDeclaration memberTypes TypeDeclaration memberType typeDeclaration memberTypes memberType classFile recordNestedMemberAttribute memberType ClassFile createProblemType memberType unitResult classFile addAttributes unitResult typeBinding constantPoolName classFile

static Invocation Site NO INVOCATION SITE new Invocation Site public boolean is Super Access return false  InvocationSite NO_INVOCATION_SITE InvocationSite isSuperAccess
new Invocation Site public boolean is Super Access return false public boolean is Type Access return false  InvocationSite isSuperAccess isTypeAccess
public boolean is Super Access return false public boolean is Type Access return false public void set Actual Receiver Type Reference Binding receiver Type  isSuperAccess isTypeAccess setActualReceiverType ReferenceBinding receiverType
public boolean is Type Access return false public void set Actual Receiver Type Reference Binding receiver Type public void set Depth int depth  isTypeAccess setActualReceiverType ReferenceBinding receiverType setDepth
public void set Actual Receiver Type Reference Binding receiver Type public void set Depth int depth public void set Field Index int depth  setActualReceiverType ReferenceBinding receiverType setDepth setFieldIndex
public void set Depth int depth public void set Field Index int depth public int source Start return 0  setDepth setFieldIndex sourceStart
public void set Field Index int depth public int source Start return 0 public int source End return 0  setFieldIndex sourceStart sourceEnd
Code Snippet Code Stream constructor comment param class File org eclipse jdt internal compiler Class File public Code Snippet Code Stream org eclipse jdt internal compiler Class File class File super class File  CodeSnippetCodeStream classFile ClassFile CodeSnippetCodeStream ClassFile classFile classFile
protected void checkcast int base Id this count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array this position this b Code Stream this class File Offset OPC checkcast switch base Id case T byte write Unsigned Short this constant Pool literal Index For Java Lang Byte break case T short write Unsigned Short this constant Pool literal Index For Java Lang Short break case T char write Unsigned Short this constant Pool literal Index For Java Lang Character break case T int write Unsigned Short this constant Pool literal Index For Java Lang Integer break case T long write Unsigned Short this constant Pool literal Index For Java Lang Long break case T float write Unsigned Short this constant Pool literal Index For Java Lang Float break case T double write Unsigned Short this constant Pool literal Index For Java Lang Double break case T boolean write Unsigned Short this constant Pool literal Index For Java Lang Boolean  baseId countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_checkcast baseId T_byte writeUnsignedShort constantPool literalIndexForJavaLangByte T_short writeUnsignedShort constantPool literalIndexForJavaLangShort T_char writeUnsignedShort constantPool literalIndexForJavaLangCharacter T_int writeUnsignedShort constantPool literalIndexForJavaLangInteger T_long writeUnsignedShort constantPool literalIndexForJavaLangLong T_float writeUnsignedShort constantPool literalIndexForJavaLangFloat T_double writeUnsignedShort constantPool literalIndexForJavaLangDouble T_boolean writeUnsignedShort constantPool literalIndexForJavaLangBoolean
public void generate Emulated Access For Method Scope scope Method Binding method Binding Code Snippet Code Stream local Code Stream this local Code Stream generate Emulation For Method scope method Binding local Code Stream invoke Java Lang Reflect Method Invoke  generateEmulatedAccessForMethod MethodBinding methodBinding CodeSnippetCodeStream localCodeStream localCodeStream generateEmulationForMethod methodBinding localCodeStream invokeJavaLangReflectMethodInvoke
public void generate Emulated Read Access For Field Field Binding field Binding Code Snippet Code Stream local Code Stream this local Code Stream generate Emulation For Field field Binding swap the field with the receiver this swap local Code Stream invoke Java Lang Reflect Field Getter field Binding type id if field Binding type is Base Type this checkcast field Binding type  generateEmulatedReadAccessForField FieldBinding fieldBinding CodeSnippetCodeStream localCodeStream localCodeStream generateEmulationForField fieldBinding localCodeStream invokeJavaLangReflectFieldGetter fieldBinding fieldBinding isBaseType fieldBinding
public void generate Emulated Write Access For Field Field Binding field Binding Code Snippet Code Stream local Code Stream this local Code Stream invoke Java Lang Reflect Field Setter field Binding type id  generateEmulatedWriteAccessForField FieldBinding fieldBinding CodeSnippetCodeStream localCodeStream localCodeStream invokeJavaLangReflectFieldSetter fieldBinding
public void generate Emulation For Constructor Scope scope Method Binding method Binding leave a java lang reflect Field object on the stack Code Snippet Code Stream local Code Stream this this ldc String value Of method Binding declaring Class constant Pool Name replace this invoke Class For Name int param Length method Binding parameters length this generate Inlined Value param Length this new Array scope new Array Binding scope get Type Type Constants JAVA LANG CLASS 1 if param Length 0 this dup for int i 0 i param Length i this generate Inlined Value i Type Binding parameter method Binding parameters i if parameter is Base Type this getTYPE parameter id else if parameter is Array Type Array Binding array Array Binding parameter if array leaf Component Type is Base Type this getTYPE array leaf Component Type id else this ldc String value Of array leaf Component Type constant Pool Name replace this invoke Class For Name int dimensions array dimensions this generate Inlined Value dimensions this newarray T int this invoke Array New Instance this invoke Object Get Class else parameter is a reference binding this ldc String value Of method Binding declaring Class constant Pool Name replace this invoke Class For Name this aastore if i param Length 1 this dup local Code Stream invoke Class Get Declared Constructor this dup this iconst 1 local Code Stream invoke Accessible Object Set Accessible  generateEmulationForConstructor MethodBinding methodBinding CodeSnippetCodeStream localCodeStream valueOf methodBinding declaringClass constantPoolName invokeClassForName paramLength methodBinding generateInlinedValue paramLength newArray ArrayBinding getType TypeConstants JAVA_LANG_CLASS paramLength paramLength generateInlinedValue TypeBinding methodBinding isBaseType isArrayType ArrayBinding ArrayBinding leafComponentType isBaseType leafComponentType valueOf leafComponentType constantPoolName invokeClassForName generateInlinedValue T_int invokeArrayNewInstance invokeObjectGetClass valueOf methodBinding declaringClass constantPoolName invokeClassForName paramLength localCodeStream invokeClassGetDeclaredConstructor iconst_1 localCodeStream invokeAccessibleObjectSetAccessible
public void generate Emulation For Field Field Binding field Binding leave a java lang reflect Field object on the stack Code Snippet Code Stream local Code Stream this this ldc String value Of field Binding declaring Class constant Pool Name replace this invoke Class For Name this ldc String value Of field Binding name local Code Stream invoke Class Get Declared Field this dup this iconst 1 local Code Stream invoke Accessible Object Set Accessible  generateEmulationForField FieldBinding fieldBinding CodeSnippetCodeStream localCodeStream valueOf fieldBinding declaringClass constantPoolName invokeClassForName valueOf fieldBinding localCodeStream invokeClassGetDeclaredField iconst_1 localCodeStream invokeAccessibleObjectSetAccessible
public void generate Emulation For Method Scope scope Method Binding method Binding leave a java lang reflect Field object on the stack Code Snippet Code Stream local Code Stream this this ldc String value Of method Binding declaring Class constant Pool Name replace this invoke Class For Name this ldc String value Of method Binding selector int param Length method Binding parameters length this generate Inlined Value param Length this new Array scope new Array Binding scope get Type Type Constants JAVA LANG CLASS 1 if param Length 0 this dup for int i 0 i param Length i this generate Inlined Value i Type Binding parameter method Binding parameters i if parameter is Base Type this getTYPE parameter id else if parameter is Array Type Array Binding array Array Binding parameter if array leaf Component Type is Base Type this getTYPE array leaf Component Type id else this ldc String value Of array leaf Component Type constant Pool Name replace this invoke Class For Name int dimensions array dimensions this generate Inlined Value dimensions this newarray T int this invoke Array New Instance this invoke Object Get Class else parameter is a reference binding this ldc String value Of method Binding declaring Class constant Pool Name replace this invoke Class For Name this aastore if i param Length 1 this dup local Code Stream invoke Class Get Declared Method this dup this iconst 1 local Code Stream invoke Accessible Object Set Accessible  generateEmulationForMethod MethodBinding methodBinding CodeSnippetCodeStream localCodeStream valueOf methodBinding declaringClass constantPoolName invokeClassForName valueOf methodBinding paramLength methodBinding generateInlinedValue paramLength newArray ArrayBinding getType TypeConstants JAVA_LANG_CLASS paramLength paramLength generateInlinedValue TypeBinding methodBinding isBaseType isArrayType ArrayBinding ArrayBinding leafComponentType isBaseType leafComponentType valueOf leafComponentType constantPoolName invokeClassForName generateInlinedValue T_int invokeArrayNewInstance invokeObjectGetClass valueOf methodBinding declaringClass constantPoolName invokeClassForName paramLength localCodeStream invokeClassGetDeclaredMethod iconst_1 localCodeStream invokeAccessibleObjectSetAccessible
public void generate Object Wrapper For Type Type Binding value Type The top of stack must be encapsulated inside a wrapper object if it corresponds to a base type char wrapper Type Compound Name null switch value Type id case T int new java lang Integer wrapper Type Compound Name new char java to Char Array lang to Char Array Integer to Char Array NON NLS 2 NON NLS 1 NON NLS 3 break case T boolean new java lang Boolean wrapper Type Compound Name new char java to Char Array lang to Char Array Boolean to Char Array NON NLS 2 NON NLS 1 NON NLS 3 break case T byte new java lang Byte wrapper Type Compound Name new char java to Char Array lang to Char Array Byte to Char Array NON NLS 2 NON NLS 1 NON NLS 3 break case T char new java lang Character wrapper Type Compound Name new char java to Char Array lang to Char Array Character to Char Array NON NLS 2 NON NLS 1 NON NLS 3 break case T float new java lang Float wrapper Type Compound Name new char java to Char Array lang to Char Array Float to Char Array NON NLS 2 NON NLS 1 NON NLS 3 break case T double new java lang Double wrapper Type Compound Name new char java to Char Array lang to Char Array Double to Char Array NON NLS 2 NON NLS 1 NON NLS 3 break case T short new java lang Short wrapper Type Compound Name new char java to Char Array lang to Char Array Short to Char Array NON NLS 2 NON NLS 1 NON NLS 3 break case T long new java lang Long wrapper Type Compound Name new char java to Char Array lang to Char Array Long to Char Array NON NLS 2 NON NLS 1 NON NLS 3 break Type Binding wrapper Type this method Declaration scope get Type wrapper Type Compound Name new  wrapper Type if value Type id T long value Type id T double dup x2 dup x2 pop else dup x1 swap Method Binding method Binding this method Declaration scope get Method wrapper Type Qualified Names Constants Init new Type Binding value Type NO INVOCATION SITE invokespecial method Binding  generateObjectWrapperForType TypeBinding valueType wrapperTypeCompoundName valueType T_int wrapperTypeCompoundName toCharArray toCharArray toCharArray T_boolean wrapperTypeCompoundName toCharArray toCharArray toCharArray T_byte wrapperTypeCompoundName toCharArray toCharArray toCharArray T_char wrapperTypeCompoundName toCharArray toCharArray toCharArray T_float wrapperTypeCompoundName toCharArray toCharArray toCharArray T_double wrapperTypeCompoundName toCharArray toCharArray toCharArray T_short wrapperTypeCompoundName toCharArray toCharArray toCharArray T_long wrapperTypeCompoundName toCharArray toCharArray toCharArray TypeBinding wrapperType methodDeclaration getType wrapperTypeCompoundName new_ wrapperType valueType T_long valueType T_double dup_x2 dup_x2 dup_x1 MethodBinding methodBinding methodDeclaration getMethod wrapperType QualifiedNamesConstants TypeBinding valueType NO_INVOCATION_SITE methodBinding
public void get Base Type Value int base TypeID this count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array this position this b Code Stream this class File Offset OPC invokevirtual switch base TypeID case T byte invokevirtual byte Value write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index For Java Lang Byte Byte Value break case T short invokevirtual short Value write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index For Java Lang Short Short Value break case T char invokevirtual char Value write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index For Java Lang Character Char Value break case T int invokevirtual int Value write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index For Java Lang Integer Int Value break case T long invokevirtual long Value this stack Depth if this stack Depth this stack Max this stack Max this stack Depth write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index For Java Lang Long Long Value break case T float invokevirtual float Value write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index For Java Lang Float Float Value break case T double invokevirtual double Value this stack Depth if this stack Depth this stack Max this stack Max this stack Depth write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index For Java Lang Double Double Value break case T boolean invokevirtual boolean Value write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index For Java Lang Boolean Boolean Value  getBaseTypeValue baseTypeID countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual baseTypeID T_byte byteValue writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexForJavaLangByteByteValue T_short shortValue writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexForJavaLangShortShortValue T_char charValue writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexForJavaLangCharacterCharValue T_int intValue writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexForJavaLangIntegerIntValue T_long longValue stackDepth stackDepth stackMax stackMax stackDepth writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexForJavaLangLongLongValue T_float floatValue writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexForJavaLangFloatFloatValue T_double doubleValue stackDepth stackDepth stackMax stackMax stackDepth writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexForJavaLangDoubleDoubleValue T_boolean booleanValue writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexForJavaLangBooleanBooleanValue
protected void invoke Accessible Object Set Accessible invokevirtual java lang reflect Accessible Object set Accessible Z V this count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array this position this b Code Stream this class File Offset OPC invokevirtual write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index For Java Lang Reflect Accessible Object Set Accessible this stack Depth 2  invokeAccessibleObjectSetAccessible AccessibleObject setAccessible countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexForJavaLangReflectAccessibleObjectSetAccessible stackDepth
protected void invoke Array New Instance invokestatic java lang reflect Array new Instance Ljava lang Class int Ljava lang reflect Array this count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array this position this b Code Stream this class File Offset OPC invokestatic write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index For Java Lang Reflect Array New Instance this stack Depth  invokeArrayNewInstance newInstance countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokestatic writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexForJavaLangReflectArrayNewInstance stackDepth
protected void invoke Class Get Declared Constructor invokevirtual java lang Class get Declared Constructor Ljava lang Class Ljava lang reflect Constructor this count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array this position this b Code Stream this class File Offset OPC invokevirtual write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index For Java Lang Class Get Declared Constructor this stack Depth  invokeClassGetDeclaredConstructor getDeclaredConstructor countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexForJavaLangClassGetDeclaredConstructor stackDepth
protected void invoke Class Get Declared Field invokevirtual java lang Class get Declared Field Ljava lang String Ljava lang reflect Field this count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array this position this b Code Stream this class File Offset OPC invokevirtual write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index For Java Lang Class Get Declared Field this stack Depth  invokeClassGetDeclaredField getDeclaredField countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexForJavaLangClassGetDeclaredField stackDepth
protected void invoke Class Get Declared Method invokevirtual java lang Class get Declared Method Ljava lang String Ljava lang Class Ljava lang reflect Method this count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array this position this b Code Stream this class File Offset OPC invokevirtual write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index For Java Lang Class Get Declared Method this stack Depth 2  invokeClassGetDeclaredMethod getDeclaredMethod countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexForJavaLangClassGetDeclaredMethod stackDepth
protected void invoke Java Lang Reflect Constructor New Instance invokevirtual java lang reflect Constructor new Instance Ljava lang Object Ljava lang Object this count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array this position this b Code Stream this class File Offset OPC invokevirtual write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index For Java Lang Reflect Constructor New Instance this stack Depth  invokeJavaLangReflectConstructorNewInstance newInstance countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexForJavaLangReflectConstructorNewInstance stackDepth
protected void invoke Java Lang Reflect Field Getter int typeID this count Labels 0 int used TypeID if typeID T null used TypeID T Object else used TypeID typeID invokevirtual if class File Offset 2 b Code Stream length resize Byte Array this position this b Code Stream this class File Offset OPC invokevirtual write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index Java Lang Reflect Field Getter typeID if used TypeID T long used TypeID T double this stack Depth  invokeJavaLangReflectFieldGetter countLabels usedTypeID T_null usedTypeID T_Object usedTypeID classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexJavaLangReflectFieldGetter usedTypeID T_long usedTypeID T_double stackDepth
protected void invoke Java Lang Reflect Field Setter int typeID this count Labels 0 int used TypeID if typeID T null used TypeID T Object else used TypeID typeID invokevirtual if class File Offset 2 b Code Stream length resize Byte Array this position this b Code Stream this class File Offset OPC invokevirtual write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index Java Lang Reflect Field Setter typeID if used TypeID T long used TypeID T double this stack Depth 3 else this stack Depth 4  invokeJavaLangReflectFieldSetter countLabels usedTypeID T_null usedTypeID T_Object usedTypeID classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexJavaLangReflectFieldSetter usedTypeID T_long usedTypeID T_double stackDepth stackDepth
protected void invoke Java Lang Reflect Method Invoke invokevirtual java lang reflect Method invoke Ljava lang Object Ljava lang Object Ljava lang Object this count Labels 0 if class File Offset 2 b Code Stream length resize Byte Array this position this b Code Stream this class File Offset OPC invokevirtual write Unsigned Short Code Snippet Constant Pool this constant Pool literal Index For Java Lang Reflect Method Invoke this stack Depth 2  invokeJavaLangReflectMethodInvoke countLabels classFileOffset bCodeStream resizeByteArray bCodeStream classFileOffset OPC_invokevirtual writeUnsignedShort CodeSnippetConstantPool constantPool literalIndexForJavaLangReflectMethodInvoke stackDepth
private final void resize Byte Array int length b Code Stream length int required Size length length if class File Offset required Size must be sure to grow by enough required Size class File Offset length System arraycopy b Code Stream 0 b Code Stream new byte required Size 0 length  resizeByteArray bCodeStream requiredSize classFileOffset requiredSize requiredSize classFileOffset bCodeStream bCodeStream requiredSize

Creates a new code snippet compiler initialized with a code snippet parser public Code Snippet Compiler I Name Environment environment I Error Handling Policy policy Map settings I Compiler Requestor requestor I Problem Factory problem Factory Evaluation Context evaluation Context int code Snippet Start int code Snippet End super environment policy settings requestor problem Factory this parser new Code Snippet Parser this problem Reporter evaluation Context this options parse Literal Expressions As Constants code Snippet Start code Snippet End this parse Threshold 1 fully parse only the code snippet compilation unit  CodeSnippetCompiler INameEnvironment IErrorHandlingPolicy ICompilerRequestor IProblemFactory problemFactory EvaluationContext evaluationContext codeSnippetStart codeSnippetEnd problemFactory CodeSnippetParser problemReporter evaluationContext parseLiteralExpressionsAsConstants codeSnippetStart codeSnippetEnd parseThreshold
public void initialize Parser this parser new Code Snippet Parser this problem Reporter this evaluation Context this options parse Literal Expressions As Constants this code Snippet Start this code Snippet End  initializeParser CodeSnippetParser problemReporter evaluationContext parseLiteralExpressionsAsConstants codeSnippetStart codeSnippetEnd

int well Known Method Name And Types new int 32 Code Snippet Constant Pool constructor comment param class File org eclipse jdt internal compiler Class File public Code Snippet Constant Pool org eclipse jdt internal compiler Class File class File super class File  wellKnownMethodNameAndTypes CodeSnippetConstantPool classFile ClassFile CodeSnippetConstantPool ClassFile classFile classFile
Return the index of the method Binding Returns 1 if the method Binding is not a predefined method Binding the right index otherwise param method Binding org eclipse jdt internal compiler lookup Method Binding return CODE int CODE public int index Of Well Known Method Name And Type Method Binding method Binding int index super index Of Well Known Method Name And Type method Binding if index 1 char first Char method Binding selector 0 switch first Char case g if method Binding parameters length 1 method Binding parameters 0 id T JavaLangString Char Operation equals method Binding selector GETDECLAREDFIELD NAME method Binding return Type instanceof Reference Binding Char Operation equals Reference Binding method Binding return Type compound Name JAVA LANG REFLECT FIELD return GETDECLAREDFIELD CLASS METHOD NAME AND TYPE if method Binding parameters length 2 method Binding parameters 0 id T JavaLangString method Binding parameters 1 is Array Type Array Binding method Binding parameters 1 leaf Component Type id T JavaLangClass Char Operation equals method Binding selector GETDECLAREDMETHOD NAME method Binding return Type instanceof Reference Binding Char Operation equals Reference Binding method Binding return Type compound Name JAVA LANG REFLECT METHOD return GETDECLAREDMETHOD CLASS METHOD NAME AND TYPE if method Binding parameters length 1 method Binding parameters 0 is Array Type Array Binding method Binding parameters 0 leaf Component Type id T JavaLangClass Char Operation equals method Binding selector GETDECLAREDCONSTRUCTOR NAME method Binding return Type instanceof Reference Binding Char Operation equals Reference Binding method Binding return Type compound Name JAVA LANG REFLECT CONSTRUCTOR return GETDECLAREDCONSTRUCTOR CLASS METHOD NAME AND TYPE if method Binding parameters length 1 method Binding parameters 0 id T Object switch method Binding return Type id case T int if Char Operation equals method Binding selector GET INT METHOD NAME method Binding return Type id T int return GET INT METHOD NAME AND TYPE break case T byte if Char Operation equals method Binding selector GET BYTE METHOD NAME method Binding return Type id T byte return GET BYTE METHOD NAME AND TYPE break case T short if Char Operation equals method Binding selector GET SHORT METHOD NAME method Binding return Type id T short return GET SHORT METHOD NAME AND TYPE break case T char if Char Operation equals method Binding selector GET CHAR METHOD NAME method Binding return Type id T char return GET CHAR METHOD NAME AND TYPE break case T double if Char Operation equals method Binding selector GET DOUBLE METHOD NAME method Binding return Type id T double return GET DOUBLE METHOD NAME AND TYPE break case T float if Char Operation equals method Binding selector GET FLOAT METHOD NAME method Binding return Type id T float return GET FLOAT METHOD NAME AND TYPE break case T long if Char Operation equals method Binding selector GET LONG METHOD NAME method Binding return Type id T long return GET LONG METHOD NAME AND TYPE break case T boolean if Char Operation equals method Binding selector GET BOOLEAN METHOD NAME method Binding return Type id T boolean return GET BOOLEAN METHOD NAME AND TYPE break case T Object if Char Operation equals method Binding selector GET OBJECT METHOD NAME method Binding return Type id T JavaLangObject return GET OBJECT METHOD NAME AND TYPE break case i if method Binding parameters length 0 Char Operation equals method Binding selector INTVALUE INTEGER METHOD NAME method Binding return Type id T int return INTVALUE INTEGER METHOD NAME AND TYPE if method Binding parameters length 2 method Binding parameters 0 id T JavaLangObject method Binding parameters 1 is Array Type Array Binding method Binding parameters 1 leaf Component Type id T JavaLangObject Char Operation equals method Binding selector INVOKE METHOD METHOD NAME method Binding return Type id T JavaLangObject return INVOKE METHOD METHOD NAME AND TYPE break case s if method Binding parameters length 0 Char Operation equals method Binding selector SHORTVALUE SHORT METHOD NAME method Binding return Type id T short return SHORTVALUE SHORT METHOD NAME AND TYPE if method Binding parameters length 1 method Binding parameters 0 id T boolean method Binding selector length 13 Char Operation equals method Binding selector SETACCESSIBLE NAME method Binding return Type id T void return SETACCESSIBLE ACCESSIBLEOBJECT METHOD NAME AND TYPE if method Binding return Type id T void method Binding parameters length 2 method Binding parameters 0 id T Object switch method Binding return Type id case T int if method Binding parameters 1 id T int Char Operation equals method Binding selector SET INT METHOD NAME method Binding return Type id T void return SET INT METHOD NAME AND TYPE break case T byte if method Binding parameters 1 id T byte Char Operation equals method Binding selector SET BYTE METHOD NAME method Binding return Type id T void return SET BYTE METHOD NAME AND TYPE break case T short if method Binding parameters 1 id T short Char Operation equals method Binding selector SET SHORT METHOD NAME method Binding return Type id T void return SET SHORT METHOD NAME AND TYPE break case T char if method Binding parameters 1 id T char Char Operation equals method Binding selector SET CHAR METHOD NAME method Binding return Type id T void return SET CHAR METHOD NAME AND TYPE break case T double if method Binding parameters 1 id T double Char Operation equals method Binding selector SET DOUBLE METHOD NAME method Binding return Type id T void return SET DOUBLE METHOD NAME AND TYPE break case T float if method Binding parameters 1 id T float Char Operation equals method Binding selector SET FLOAT METHOD NAME method Binding return Type id T void return SET FLOAT METHOD NAME AND TYPE break case T long if method Binding parameters 1 id T long Char Operation equals method Binding selector SET LONG METHOD NAME method Binding return Type id T void return SET LONG METHOD NAME AND TYPE break case T boolean if method Binding parameters 1 id T boolean Char Operation equals method Binding selector SET BOOLEAN METHOD NAME method Binding return Type id T void return SET BOOLEAN METHOD NAME AND TYPE break case T Object if method Binding parameters 1 id T Object Char Operation equals method Binding selector SET OBJECT METHOD NAME method Binding return Type id T void return SET OBJECT METHOD NAME AND TYPE break case f if method Binding parameters length 0 Char Operation equals method Binding selector FLOATVALUE FLOAT METHOD NAME method Binding return Type id T float return FLOATVALUE FLOAT METHOD NAME AND TYPE break case d if method Binding parameters length 0 Char Operation equals method Binding selector DOUBLEVALUE DOUBLE METHOD NAME method Binding return Type id T double return DOUBLEVALUE DOUBLE METHOD NAME AND TYPE break case c if method Binding parameters length 0 Char Operation equals method Binding selector CHARVALUE CHARACTER METHOD NAME method Binding return Type id T char return CHARVALUE CHARACTER METHOD NAME AND TYPE break case b if method Binding parameters length 0 Char Operation equals method Binding selector BOOLEANVALUE BOOLEAN METHOD NAME method Binding return Type id T boolean return BOOLEANVALUE BOOLEAN METHOD NAME AND TYPE if method Binding parameters length 0 Char Operation equals method Binding selector BYTEVALUE BYTE METHOD NAME method Binding return Type id T byte return BYTEVALUE BYTE METHOD NAME AND TYPE break case l if method Binding parameters length 0 Char Operation equals method Binding selector LONGVALUE LONG METHOD NAME method Binding return Type id T long return LONGVALUE LONG METHOD NAME AND TYPE break case n if method Binding parameters length 2 method Binding parameters 0 id T JavaLangClass method Binding parameters 1 is Array Type Array Binding method Binding parameters 1 leaf Component Type id T int C methodBinding methodBinding methodBinding methodBinding MethodBinding indexOfWellKnownMethodNameAndType MethodBinding methodBinding indexOfWellKnownMethodNameAndType methodBinding firstChar methodBinding firstChar methodBinding methodBinding T_JavaLangString CharOperation methodBinding GETDECLAREDFIELD_NAME methodBinding returnType ReferenceBinding CharOperation ReferenceBinding methodBinding returnType compoundName JAVA_LANG_REFLECT_FIELD GETDECLAREDFIELD_CLASS_METHOD_NAME_AND_TYPE methodBinding methodBinding T_JavaLangString methodBinding isArrayType ArrayBinding methodBinding leafComponentType T_JavaLangClass CharOperation methodBinding GETDECLAREDMETHOD_NAME methodBinding returnType ReferenceBinding CharOperation ReferenceBinding methodBinding returnType compoundName JAVA_LANG_REFLECT_METHOD GETDECLAREDMETHOD_CLASS_METHOD_NAME_AND_TYPE methodBinding methodBinding isArrayType ArrayBinding methodBinding leafComponentType T_JavaLangClass CharOperation methodBinding GETDECLAREDCONSTRUCTOR_NAME methodBinding returnType ReferenceBinding CharOperation ReferenceBinding methodBinding returnType compoundName JAVA_LANG_REFLECT_CONSTRUCTOR GETDECLAREDCONSTRUCTOR_CLASS_METHOD_NAME_AND_TYPE methodBinding methodBinding T_Object methodBinding returnType T_int CharOperation methodBinding GET_INT_METHOD_NAME methodBinding returnType T_int GET_INT_METHOD_NAME_AND_TYPE T_byte CharOperation methodBinding GET_BYTE_METHOD_NAME methodBinding returnType T_byte GET_BYTE_METHOD_NAME_AND_TYPE T_short CharOperation methodBinding GET_SHORT_METHOD_NAME methodBinding returnType T_short GET_SHORT_METHOD_NAME_AND_TYPE T_char CharOperation methodBinding GET_CHAR_METHOD_NAME methodBinding returnType T_char GET_CHAR_METHOD_NAME_AND_TYPE T_double CharOperation methodBinding GET_DOUBLE_METHOD_NAME methodBinding returnType T_double GET_DOUBLE_METHOD_NAME_AND_TYPE T_float CharOperation methodBinding GET_FLOAT_METHOD_NAME methodBinding returnType T_float GET_FLOAT_METHOD_NAME_AND_TYPE T_long CharOperation methodBinding GET_LONG_METHOD_NAME methodBinding returnType T_long GET_LONG_METHOD_NAME_AND_TYPE T_boolean CharOperation methodBinding GET_BOOLEAN_METHOD_NAME methodBinding returnType T_boolean GET_BOOLEAN_METHOD_NAME_AND_TYPE T_Object CharOperation methodBinding GET_OBJECT_METHOD_NAME methodBinding returnType T_JavaLangObject GET_OBJECT_METHOD_NAME_AND_TYPE methodBinding CharOperation methodBinding INTVALUE_INTEGER_METHOD_NAME methodBinding returnType T_int INTVALUE_INTEGER_METHOD_NAME_AND_TYPE methodBinding methodBinding T_JavaLangObject methodBinding isArrayType ArrayBinding methodBinding leafComponentType T_JavaLangObject CharOperation methodBinding INVOKE_METHOD_METHOD_NAME methodBinding returnType T_JavaLangObject INVOKE_METHOD_METHOD_NAME_AND_TYPE methodBinding CharOperation methodBinding SHORTVALUE_SHORT_METHOD_NAME methodBinding returnType T_short SHORTVALUE_SHORT_METHOD_NAME_AND_TYPE methodBinding methodBinding T_boolean methodBinding CharOperation methodBinding SETACCESSIBLE_NAME methodBinding returnType T_void SETACCESSIBLE_ACCESSIBLEOBJECT_METHOD_NAME_AND_TYPE methodBinding returnType T_void methodBinding methodBinding T_Object methodBinding returnType T_int methodBinding T_int CharOperation methodBinding SET_INT_METHOD_NAME methodBinding returnType T_void SET_INT_METHOD_NAME_AND_TYPE T_byte methodBinding T_byte CharOperation methodBinding SET_BYTE_METHOD_NAME methodBinding returnType T_void SET_BYTE_METHOD_NAME_AND_TYPE T_short methodBinding T_short CharOperation methodBinding SET_SHORT_METHOD_NAME methodBinding returnType T_void SET_SHORT_METHOD_NAME_AND_TYPE T_char methodBinding T_char CharOperation methodBinding SET_CHAR_METHOD_NAME methodBinding returnType T_void SET_CHAR_METHOD_NAME_AND_TYPE T_double methodBinding T_double CharOperation methodBinding SET_DOUBLE_METHOD_NAME methodBinding returnType T_void SET_DOUBLE_METHOD_NAME_AND_TYPE T_float methodBinding T_float CharOperation methodBinding SET_FLOAT_METHOD_NAME methodBinding returnType T_void SET_FLOAT_METHOD_NAME_AND_TYPE T_long methodBinding T_long CharOperation methodBinding SET_LONG_METHOD_NAME methodBinding returnType T_void SET_LONG_METHOD_NAME_AND_TYPE T_boolean methodBinding T_boolean CharOperation methodBinding SET_BOOLEAN_METHOD_NAME methodBinding returnType T_void SET_BOOLEAN_METHOD_NAME_AND_TYPE T_Object methodBinding T_Object CharOperation methodBinding SET_OBJECT_METHOD_NAME methodBinding returnType T_void SET_OBJECT_METHOD_NAME_AND_TYPE methodBinding CharOperation methodBinding FLOATVALUE_FLOAT_METHOD_NAME methodBinding returnType T_float FLOATVALUE_FLOAT_METHOD_NAME_AND_TYPE methodBinding CharOperation methodBinding DOUBLEVALUE_DOUBLE_METHOD_NAME methodBinding returnType T_double DOUBLEVALUE_DOUBLE_METHOD_NAME_AND_TYPE methodBinding CharOperation methodBinding CHARVALUE_CHARACTER_METHOD_NAME methodBinding returnType T_char CHARVALUE_CHARACTER_METHOD_NAME_AND_TYPE methodBinding CharOperation methodBinding BOOLEANVALUE_BOOLEAN_METHOD_NAME methodBinding returnType T_boolean BOOLEANVALUE_BOOLEAN_METHOD_NAME_AND_TYPE methodBinding CharOperation methodBinding BYTEVALUE_BYTE_METHOD_NAME methodBinding returnType T_byte BYTEVALUE_BYTE_METHOD_NAME_AND_TYPE methodBinding CharOperation methodBinding LONGVALUE_LONG_METHOD_NAME methodBinding returnType T_long LONGVALUE_LONG_METHOD_NAME_AND_TYPE methodBinding methodBinding T_JavaLangClass methodBinding isArrayType ArrayBinding methodBinding leafComponentType T_int
Return the index of the method Binding Returns 1 if the method Binding is not a predefined method Binding the right index otherwise param method Binding org eclipse jdt internal compiler lookup Method Binding return CODE int CODE public int index Of Well Known Methods Method Binding method Binding int index super index Of Well Known Methods method Binding if index 1 char first Char method Binding selector 0 switch first Char case g if method Binding declaring Class id T JavaLangClass method Binding parameters length 1 method Binding parameters 0 id T JavaLangString Char Operation equals method Binding selector GETDECLAREDFIELD NAME return GETDECLAREDFIELD CLASS METHOD if method Binding declaring Class id T JavaLangClass method Binding parameters length 2 method Binding parameters 0 id T JavaLangString method Binding parameters 1 is Array Type Array Binding method Binding parameters 1 leaf Component Type id T JavaLangClass Char Operation equals method Binding selector GETDECLAREDMETHOD NAME return GETDECLAREDMETHOD CLASS METHOD if method Binding declaring Class id T JavaLangClass method Binding parameters length 1 method Binding parameters 0 is Array Type Array Binding method Binding parameters 0 leaf Component Type id T JavaLangClass Char Operation equals method Binding selector GETDECLAREDCONSTRUCTOR NAME return GETDECLAREDCONSTRUCTOR CLASS METHOD if Char Operation equals method Binding declaring Class compound Name JAVA LANG REFLECT FIELD method Binding parameters length 1 method Binding parameters 0 id T Object switch method Binding return Type id case T int if Char Operation equals method Binding selector GET INT METHOD NAME return GET INT METHOD break case T byte if Char Operation equals method Binding selector GET BYTE METHOD NAME return GET BYTE METHOD break case T short if Char Operation equals method Binding selector GET SHORT METHOD NAME return GET SHORT METHOD break case T char if Char Operation equals method Binding selector GET CHAR METHOD NAME return GET CHAR METHOD break case T double if Char Operation equals method Binding selector GET DOUBLE METHOD NAME return GET DOUBLE METHOD break case T float if Char Operation equals method Binding selector GET FLOAT METHOD NAME return GET FLOAT METHOD break case T long if Char Operation equals method Binding selector GET LONG METHOD NAME return GET LONG METHOD break case T boolean if Char Operation equals method Binding selector GET BOOLEAN METHOD NAME return GET BOOLEAN METHOD break case T Object if Char Operation equals method Binding selector GET OBJECT METHOD NAME return GET OBJECT METHOD break case i if method Binding declaring Class id T JavaLangInteger method Binding parameters length 0 Char Operation equals method Binding selector INTVALUE INTEGER METHOD NAME return INTVALUE INTEGER METHOD if Char Operation equals method Binding declaring Class compound Name JAVA LANG REFLECT METHOD method Binding parameters length 2 method Binding parameters 0 id T JavaLangObject method Binding parameters 1 is Array Type Array Binding method Binding parameters 1 leaf Component Type id T JavaLangObject Char Operation equals method Binding selector INVOKE METHOD METHOD NAME return INVOKE METHOD METHOD break case b if method Binding declaring Class id T JavaLangByte method Binding parameters length 0 Char Operation equals method Binding selector BYTEVALUE BYTE METHOD NAME return BYTEVALUE BYTE METHOD if method Binding declaring Class id T JavaLangBoolean method Binding parameters length 0 Char Operation equals method Binding selector BOOLEANVALUE BOOLEAN METHOD NAME return BOOLEANVALUE BOOLEAN METHOD break case s if method Binding declaring Class id T JavaLangShort method Binding parameters length 0 Char Operation equals method Binding selector SHORTVALUE SHORT METHOD NAME return SHORTVALUE SHORT METHOD if Char Operation equals method Binding declaring Class compound Name JAVA LANG REFLECT ACCESSIBLEOBJECT method Binding parameters length 1 method Binding parameters 0 id T boolean method Binding selector length 13 Char Operation equals method Binding selector SETACCESSIBLE NAME return SETACCESSIBLE ACCESSIBLEOBJECT METHOD if Char Operation equals method Binding declaring Class compound Name JAVA LANG REFLECT FIELD method Binding return Type id T void method Binding parameters length 2 method Binding parameters 0 id T Object switch method Binding return Type id case T int if method Binding parameters 1 id T int Char Operation equals method Binding selector SET INT METHOD NAME return SET INT METHOD break case T byte if method Binding parameters 1 id T byte Char Operation equals method Binding selector SET BYTE METHOD NAME return SET BYTE METHOD break case T short if method Binding parameters 1 id T short Char Operation equals method Binding selector SET SHORT METHOD NAME return SET SHORT METHOD break case T char if method Binding parameters 1 id T char Char Operation equals method Binding selector SET CHAR METHOD NAME return SET CHAR METHOD break case T double if method Binding parameters 1 id T double Char Operation equals method Binding selector SET DOUBLE METHOD NAME return SET DOUBLE METHOD break case T float if method Binding parameters 1 id T float Char Operation equals method Binding selector SET FLOAT METHOD NAME return SET FLOAT METHOD break case T long if method Binding parameters 1 id T long Char Operation equals method Binding selector SET LONG METHOD NAME return SET LONG METHOD break case T boolean if method Binding parameters 1 id T boolean Char Operation equals method Binding selector SET BOOLEAN METHOD NAME return SET BOOLEAN METHOD break case T Object if method Binding parameters 1 id T Object Char Operation equals method Binding selector SET OBJECT METHOD NAME return SET OBJECT METHOD break case f if method Binding declaring Class id T JavaLangFloat method Binding parameters length 0 Char Operation equals method Binding selector FLOATVALUE FLOAT METHOD NAME return FLOATVALUE FLOAT METHOD break case d if method Binding declaring Class id T JavaLangDouble method Binding parameters length 0 Char Operation equals method Binding selector DOUBLEVALUE DOUBLE METHOD NAME return DOUBLEVALUE DOUBLE METHOD break case c if method Binding declaring Class id T JavaLangCharacter method Binding parameters length 0 Char Operation equals method Binding selector CHARVALUE CHARACTER METHOD NAME return CHARVALUE CHARACTER METHOD break case l if method Binding declaring Class id T JavaLangLong method Binding parameters length 0 Char Operation equals method Binding selector LONGVALUE LONG METHOD NAME return LONGVALUE LONG METHOD break case n if Char Operation equals method Binding declaring Class compound Name JAVA LANG REFLECT ARRAY method Binding parameters length 2 method Binding parameters 0 id T JavaLangClass method Binding parameters 1 is Array Type Array Binding method Binding parameters 1 leaf Component Type id T int Char Operation equals method Binding selector ARRAY NEWINSTANCE NAME return NEWINSTANCE ARRAY METHOD break return index  methodBinding methodBinding methodBinding methodBinding MethodBinding indexOfWellKnownMethods MethodBinding methodBinding indexOfWellKnownMethods methodBinding firstChar methodBinding firstChar methodBinding declaringClass T_JavaLangClass methodBinding methodBinding T_JavaLangString CharOperation methodBinding GETDECLAREDFIELD_NAME GETDECLAREDFIELD_CLASS_METHOD methodBinding declaringClass T_JavaLangClass methodBinding methodBinding T_JavaLangString methodBinding isArrayType ArrayBinding methodBinding leafComponentType T_JavaLangClass CharOperation methodBinding GETDECLAREDMETHOD_NAME GETDECLAREDMETHOD_CLASS_METHOD methodBinding declaringClass T_JavaLangClass methodBinding methodBinding isArrayType ArrayBinding methodBinding leafComponentType T_JavaLangClass CharOperation methodBinding GETDECLAREDCONSTRUCTOR_NAME GETDECLAREDCONSTRUCTOR_CLASS_METHOD CharOperation methodBinding declaringClass compoundName JAVA_LANG_REFLECT_FIELD methodBinding methodBinding T_Object methodBinding returnType T_int CharOperation methodBinding GET_INT_METHOD_NAME GET_INT_METHOD T_byte CharOperation methodBinding GET_BYTE_METHOD_NAME GET_BYTE_METHOD T_short CharOperation methodBinding GET_SHORT_METHOD_NAME GET_SHORT_METHOD T_char CharOperation methodBinding GET_CHAR_METHOD_NAME GET_CHAR_METHOD T_double CharOperation methodBinding GET_DOUBLE_METHOD_NAME GET_DOUBLE_METHOD T_float CharOperation methodBinding GET_FLOAT_METHOD_NAME GET_FLOAT_METHOD T_long CharOperation methodBinding GET_LONG_METHOD_NAME GET_LONG_METHOD T_boolean CharOperation methodBinding GET_BOOLEAN_METHOD_NAME GET_BOOLEAN_METHOD T_Object CharOperation methodBinding GET_OBJECT_METHOD_NAME GET_OBJECT_METHOD methodBinding declaringClass T_JavaLangInteger methodBinding CharOperation methodBinding INTVALUE_INTEGER_METHOD_NAME INTVALUE_INTEGER_METHOD CharOperation methodBinding declaringClass compoundName JAVA_LANG_REFLECT_METHOD methodBinding methodBinding T_JavaLangObject methodBinding isArrayType ArrayBinding methodBinding leafComponentType T_JavaLangObject CharOperation methodBinding INVOKE_METHOD_METHOD_NAME INVOKE_METHOD_METHOD methodBinding declaringClass T_JavaLangByte methodBinding CharOperation methodBinding BYTEVALUE_BYTE_METHOD_NAME BYTEVALUE_BYTE_METHOD methodBinding declaringClass T_JavaLangBoolean methodBinding CharOperation methodBinding BOOLEANVALUE_BOOLEAN_METHOD_NAME BOOLEANVALUE_BOOLEAN_METHOD methodBinding declaringClass T_JavaLangShort methodBinding CharOperation methodBinding SHORTVALUE_SHORT_METHOD_NAME SHORTVALUE_SHORT_METHOD CharOperation methodBinding declaringClass compoundName JAVA_LANG_REFLECT_ACCESSIBLEOBJECT methodBinding methodBinding T_boolean methodBinding CharOperation methodBinding SETACCESSIBLE_NAME SETACCESSIBLE_ACCESSIBLEOBJECT_METHOD CharOperation methodBinding declaringClass compoundName JAVA_LANG_REFLECT_FIELD methodBinding returnType T_void methodBinding methodBinding T_Object methodBinding returnType T_int methodBinding T_int CharOperation methodBinding SET_INT_METHOD_NAME SET_INT_METHOD T_byte methodBinding T_byte CharOperation methodBinding SET_BYTE_METHOD_NAME SET_BYTE_METHOD T_short methodBinding T_short CharOperation methodBinding SET_SHORT_METHOD_NAME SET_SHORT_METHOD T_char methodBinding T_char CharOperation methodBinding SET_CHAR_METHOD_NAME SET_CHAR_METHOD T_double methodBinding T_double CharOperation methodBinding SET_DOUBLE_METHOD_NAME SET_DOUBLE_METHOD T_float methodBinding T_float CharOperation methodBinding SET_FLOAT_METHOD_NAME SET_FLOAT_METHOD T_long methodBinding T_long CharOperation methodBinding SET_LONG_METHOD_NAME SET_LONG_METHOD T_boolean methodBinding T_boolean CharOperation methodBinding SET_BOOLEAN_METHOD_NAME SET_BOOLEAN_METHOD T_Object methodBinding T_Object CharOperation methodBinding SET_OBJECT_METHOD_NAME SET_OBJECT_METHOD methodBinding declaringClass T_JavaLangFloat methodBinding CharOperation methodBinding FLOATVALUE_FLOAT_METHOD_NAME FLOATVALUE_FLOAT_METHOD methodBinding declaringClass T_JavaLangDouble methodBinding CharOperation methodBinding DOUBLEVALUE_DOUBLE_METHOD_NAME DOUBLEVALUE_DOUBLE_METHOD methodBinding declaringClass T_JavaLangCharacter methodBinding CharOperation methodBinding CHARVALUE_CHARACTER_METHOD_NAME CHARVALUE_CHARACTER_METHOD methodBinding declaringClass T_JavaLangLong methodBinding CharOperation methodBinding LONGVALUE_LONG_METHOD_NAME LONGVALUE_LONG_METHOD CharOperation methodBinding declaringClass compoundName JAVA_LANG_REFLECT_ARRAY methodBinding methodBinding T_JavaLangClass methodBinding isArrayType ArrayBinding methodBinding leafComponentType T_int CharOperation methodBinding ARRAY_NEWINSTANCE_NAME NEWINSTANCE_ARRAY_METHOD
Return the index of the type Binding Returns 1 if the type Binding is not a predefined binding the right index otherwise param type Binding org eclipse jdt internal compiler lookup Type Binding return CODE int CODE public int index Of Well Known Types Type Binding type Binding int index super index Of Well Known Types type Binding if index 1 if type Binding is Base Type type Binding is Array Type Reference Binding type Reference Binding type Binding if type compound Name length 4 if Char Operation equals JAVA LANG REFLECT FIELD type compound Name return JAVA LANG REFLECT FIELD TYPE if Char Operation equals JAVA LANG REFLECT METHOD type compound Name return JAVA LANG REFLECT METHOD TYPE if Char Operation equals JAVA LANG REFLECT ARRAY type compound Name return JAVA LANG REFLECT ARRAY TYPE if Char Operation equals JAVA LANG REFLECT ACCESSIBLEOBJECT type compound Name return JAVA LANG REFLECT ACCESSIBLEOBJECT TYPE return index  typeBinding typeBinding typeBinding TypeBinding indexOfWellKnownTypes TypeBinding typeBinding indexOfWellKnownTypes typeBinding typeBinding isBaseType typeBinding isArrayType ReferenceBinding ReferenceBinding typeBinding compoundName CharOperation JAVA_LANG_REFLECT_FIELD compoundName JAVA_LANG_REFLECT_FIELD_TYPE CharOperation JAVA_LANG_REFLECT_METHOD compoundName JAVA_LANG_REFLECT_METHOD_TYPE CharOperation JAVA_LANG_REFLECT_ARRAY compoundName JAVA_LANG_REFLECT_ARRAY_TYPE CharOperation JAVA_LANG_REFLECT_ACCESSIBLEOBJECT compoundName JAVA_LANG_REFLECT_ACCESSIBLEOBJECT_TYPE
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant param a Method Binding Method Binding return CODE int CODE public int literal Index Method Binding a Method Binding int index int name And Type Index int class Index int index Well Known Method if index Well Known Method super index Of Well Known Methods a Method Binding 1 if index Well Known Method index Of Well Known Methods a Method Binding 1 if a Method Binding declaring Class is Interface Lookinf into the interface method ref table if index this interface Method Cache get a Method Binding 0 class Index literal Index a Method Binding declaring Class name And Type Index literal Index For Methods literal Index a Method Binding constant Pool Name literal Index a Method Binding signature a Method Binding index this interface Method Cache put a Method Binding this current Index Write the interface method ref constant into the constant pool First add the tag writeU1 Interface Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index else Lookinf into the method ref table if index this method Cache get a Method Binding 0 class Index literal Index a Method Binding declaring Class name And Type Index literal Index For Methods literal Index a Method Binding constant Pool Name literal Index a Method Binding signature a Method Binding index this method Cache put a Method Binding this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index else This is a well known method if index this well Known Methods index Well Known Method 0 this methods was not inserted yet if a Method Binding declaring Class is Interface Lookinf into the interface method ref table class Index literal Index a Method Binding declaring Class name And Type Index literal Index For Methods literal Index a Method Binding constant Pool Name literal Index a Method Binding signature a Method Binding index this well Known Methods index Well Known Method this current Index Write the interface method ref constant into the constant pool First add the tag writeU1 Interface Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index else Lookinf into the method ref table class Index literal Index a Method Binding declaring Class name And Type Index literal Index For Methods literal Index a Method Binding constant Pool Name literal Index a Method Binding signature a Method Binding index this well Known Methods index Well Known Method this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index else index super literal Index a Method Binding return index  constantPool aMethodBinding MethodBinding literalIndex MethodBinding aMethodBinding nameAndTypeIndex classIndex indexWellKnownMethod indexWellKnownMethod indexOfWellKnownMethods aMethodBinding indexWellKnownMethod indexOfWellKnownMethods aMethodBinding aMethodBinding declaringClass isInterface interfaceMethodCache aMethodBinding classIndex literalIndex aMethodBinding declaringClass nameAndTypeIndex literalIndexForMethods literalIndex aMethodBinding constantPoolName literalIndex aMethodBinding aMethodBinding interfaceMethodCache aMethodBinding currentIndex InterfaceMethodRefTag classIndex nameAndType nameAndTypeIndex methodCache aMethodBinding classIndex literalIndex aMethodBinding declaringClass nameAndTypeIndex literalIndexForMethods literalIndex aMethodBinding constantPoolName literalIndex aMethodBinding aMethodBinding methodCache aMethodBinding currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex wellKnownMethods indexWellKnownMethod aMethodBinding declaringClass isInterface classIndex literalIndex aMethodBinding declaringClass nameAndTypeIndex literalIndexForMethods literalIndex aMethodBinding constantPoolName literalIndex aMethodBinding aMethodBinding wellKnownMethods indexWellKnownMethod currentIndex InterfaceMethodRefTag classIndex nameAndType nameAndTypeIndex classIndex literalIndex aMethodBinding declaringClass nameAndTypeIndex literalIndexForMethods literalIndex aMethodBinding constantPoolName literalIndex aMethodBinding aMethodBinding wellKnownMethods indexWellKnownMethod currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex literalIndex aMethodBinding
This method returns the index into the constant Pool corresponding to the type descriptor param a Type Binding Type Binding return CODE int CODE public int literal Index Type Binding a Type Binding int index int name Index int index Well Known Type if index Well Known Type super index Of Well Known Types a Type Binding 1 if index Well Known Type index Of Well Known Types a Type Binding 1 if index this class Cache get a Type Binding 0 The entry doesn t exit yet name Index literal Index a Type Binding constant Pool Name index this class Cache put a Type Binding this current Index writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index else if index this well Known Types index Well Known Type 0 Need to insert that binding name Index literal Index a Type Binding constant Pool Name index this well Known Types index Well Known Type this current Index writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index else index super literal Index a Type Binding return index  constantPool aTypeBinding TypeBinding literalIndex TypeBinding aTypeBinding nameIndex indexWellKnownType indexWellKnownType indexOfWellKnownTypes aTypeBinding indexWellKnownType indexOfWellKnownTypes aTypeBinding classCache aTypeBinding nameIndex literalIndex aTypeBinding constantPoolName classCache aTypeBinding currentIndex ClassTag nameIndex wellKnownTypes indexWellKnownType nameIndex literalIndex aTypeBinding constantPoolName wellKnownTypes indexWellKnownType currentIndex ClassTag nameIndex literalIndex aTypeBinding
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Boolean Boolean Value int index int name And Type Index int class Index Looking into the method ref table if index this well Known Methods BOOLEANVALUE BOOLEAN METHOD 0 class Index literal Index For Java Lang Boolean if name And Type Index this well Known Method Name And Types BOOLEANVALUE BOOLEAN METHOD NAME AND TYPE 0 int name Index literal Index BOOLEANVALUE BOOLEAN METHOD NAME int type Index literal Index BOOLEANVALUE BOOLEAN METHOD SIGNATURE name And Type Index this well Known Method Name And Types BOOLEANVALUE BOOLEAN METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods BOOLEANVALUE BOOLEAN METHOD NAME AND TYPE this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangBooleanBooleanValue nameAndTypeIndex classIndex wellKnownMethods BOOLEANVALUE_BOOLEAN_METHOD classIndex literalIndexForJavaLangBoolean nameAndTypeIndex wellKnownMethodNameAndTypes BOOLEANVALUE_BOOLEAN_METHOD_NAME_AND_TYPE nameIndex literalIndex BOOLEANVALUE_BOOLEAN_METHOD_NAME typeIndex literalIndex BOOLEANVALUE_BOOLEAN_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes BOOLEANVALUE_BOOLEAN_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods BOOLEANVALUE_BOOLEAN_METHOD_NAME_AND_TYPE currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Byte Byte Value int index int name And Type Index int class Index Looking into the method ref table if index this well Known Methods BYTEVALUE BYTE METHOD 0 class Index literal Index For Java Lang Byte if name And Type Index this well Known Method Name And Types BYTEVALUE BYTE METHOD NAME AND TYPE 0 int name Index literal Index BYTEVALUE BYTE METHOD NAME int type Index literal Index BYTEVALUE BYTE METHOD SIGNATURE name And Type Index this well Known Method Name And Types BYTEVALUE BYTE METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods BYTEVALUE BYTE METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangByteByteValue nameAndTypeIndex classIndex wellKnownMethods BYTEVALUE_BYTE_METHOD classIndex literalIndexForJavaLangByte nameAndTypeIndex wellKnownMethodNameAndTypes BYTEVALUE_BYTE_METHOD_NAME_AND_TYPE nameIndex literalIndex BYTEVALUE_BYTE_METHOD_NAME typeIndex literalIndex BYTEVALUE_BYTE_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes BYTEVALUE_BYTE_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods BYTEVALUE_BYTE_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Character Char Value int index int name And Type Index int class Index Looking into the method ref table if index this well Known Methods CHARVALUE CHARACTER METHOD 0 class Index literal Index For Java Lang Character if name And Type Index this well Known Method Name And Types CHARVALUE CHARACTER METHOD NAME AND TYPE 0 int name Index literal Index CHARVALUE CHARACTER METHOD NAME int type Index literal Index CHARVALUE CHARACTER METHOD SIGNATURE name And Type Index this well Known Method Name And Types CHARVALUE CHARACTER METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods CHARVALUE CHARACTER METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangCharacterCharValue nameAndTypeIndex classIndex wellKnownMethods CHARVALUE_CHARACTER_METHOD classIndex literalIndexForJavaLangCharacter nameAndTypeIndex wellKnownMethodNameAndTypes CHARVALUE_CHARACTER_METHOD_NAME_AND_TYPE nameIndex literalIndex CHARVALUE_CHARACTER_METHOD_NAME typeIndex literalIndex CHARVALUE_CHARACTER_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes CHARVALUE_CHARACTER_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods CHARVALUE_CHARACTER_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Class Get Declared Constructor int index int name And Type Index int class Index Looking into the method ref table if index this well Known Methods GETDECLAREDCONSTRUCTOR CLASS METHOD 0 class Index literal Index For Java Lang Class if name And Type Index this well Known Method Name And Types GETDECLAREDCONSTRUCTOR CLASS METHOD NAME AND TYPE 0 int name Index literal Index GETDECLAREDCONSTRUCTOR NAME int type Index literal Index GETDECLAREDCONSTRUCTOR SIGNATURE name And Type Index this well Known Method Name And Types GETDECLAREDCONSTRUCTOR CLASS METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods GETDECLAREDCONSTRUCTOR CLASS METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangClassGetDeclaredConstructor nameAndTypeIndex classIndex wellKnownMethods GETDECLAREDCONSTRUCTOR_CLASS_METHOD classIndex literalIndexForJavaLangClass nameAndTypeIndex wellKnownMethodNameAndTypes GETDECLAREDCONSTRUCTOR_CLASS_METHOD_NAME_AND_TYPE nameIndex literalIndex GETDECLAREDCONSTRUCTOR_NAME typeIndex literalIndex GETDECLAREDCONSTRUCTOR_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes GETDECLAREDCONSTRUCTOR_CLASS_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods GETDECLAREDCONSTRUCTOR_CLASS_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Class Get Declared Field int index int name And Type Index int class Index Looking into the method ref table if index this well Known Methods GETDECLAREDFIELD CLASS METHOD 0 class Index literal Index For Java Lang Class if name And Type Index this well Known Method Name And Types GETDECLAREDFIELD CLASS METHOD NAME AND TYPE 0 int name Index literal Index GETDECLAREDFIELD NAME int type Index literal Index GETDECLAREDFIELD SIGNATURE name And Type Index this well Known Method Name And Types GETDECLAREDFIELD CLASS METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods GETDECLAREDFIELD CLASS METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangClassGetDeclaredField nameAndTypeIndex classIndex wellKnownMethods GETDECLAREDFIELD_CLASS_METHOD classIndex literalIndexForJavaLangClass nameAndTypeIndex wellKnownMethodNameAndTypes GETDECLAREDFIELD_CLASS_METHOD_NAME_AND_TYPE nameIndex literalIndex GETDECLAREDFIELD_NAME typeIndex literalIndex GETDECLAREDFIELD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes GETDECLAREDFIELD_CLASS_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods GETDECLAREDFIELD_CLASS_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Class Get Declared Method int index int name And Type Index int class Index Looking into the method ref table if index this well Known Methods GETDECLAREDMETHOD CLASS METHOD 0 class Index literal Index For Java Lang Class if name And Type Index this well Known Method Name And Types GETDECLAREDMETHOD CLASS METHOD NAME AND TYPE 0 int name Index literal Index GETDECLAREDMETHOD NAME int type Index literal Index GETDECLAREDMETHOD SIGNATURE name And Type Index this well Known Method Name And Types GETDECLAREDMETHOD CLASS METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods GETDECLAREDMETHOD CLASS METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangClassGetDeclaredMethod nameAndTypeIndex classIndex wellKnownMethods GETDECLAREDMETHOD_CLASS_METHOD classIndex literalIndexForJavaLangClass nameAndTypeIndex wellKnownMethodNameAndTypes GETDECLAREDMETHOD_CLASS_METHOD_NAME_AND_TYPE nameIndex literalIndex GETDECLAREDMETHOD_NAME typeIndex literalIndex GETDECLAREDMETHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes GETDECLAREDMETHOD_CLASS_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods GETDECLAREDMETHOD_CLASS_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Double Double Value int index int name And Type Index int class Index Looking into the method ref table if index this well Known Methods DOUBLEVALUE DOUBLE METHOD 0 class Index literal Index For Java Lang Double if name And Type Index this well Known Method Name And Types DOUBLEVALUE DOUBLE METHOD NAME AND TYPE 0 int name Index literal Index DOUBLEVALUE DOUBLE METHOD NAME int type Index literal Index DOUBLEVALUE DOUBLE METHOD SIGNATURE name And Type Index this well Known Method Name And Types DOUBLEVALUE DOUBLE METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods DOUBLEVALUE DOUBLE METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangDoubleDoubleValue nameAndTypeIndex classIndex wellKnownMethods DOUBLEVALUE_DOUBLE_METHOD classIndex literalIndexForJavaLangDouble nameAndTypeIndex wellKnownMethodNameAndTypes DOUBLEVALUE_DOUBLE_METHOD_NAME_AND_TYPE nameIndex literalIndex DOUBLEVALUE_DOUBLE_METHOD_NAME typeIndex literalIndex DOUBLEVALUE_DOUBLE_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes DOUBLEVALUE_DOUBLE_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods DOUBLEVALUE_DOUBLE_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Float Float Value int index int name And Type Index int class Index Looking into the method ref table if index this well Known Methods FLOATVALUE FLOAT METHOD 0 class Index literal Index For Java Lang Float if name And Type Index this well Known Method Name And Types FLOATVALUE FLOAT METHOD NAME AND TYPE 0 int name Index literal Index FLOATVALUE FLOAT METHOD NAME int type Index literal Index FLOATVALUE FLOAT METHOD SIGNATURE name And Type Index this well Known Method Name And Types FLOATVALUE FLOAT METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods FLOATVALUE FLOAT METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangFloatFloatValue nameAndTypeIndex classIndex wellKnownMethods FLOATVALUE_FLOAT_METHOD classIndex literalIndexForJavaLangFloat nameAndTypeIndex wellKnownMethodNameAndTypes FLOATVALUE_FLOAT_METHOD_NAME_AND_TYPE nameIndex literalIndex FLOATVALUE_FLOAT_METHOD_NAME typeIndex literalIndex FLOATVALUE_FLOAT_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes FLOATVALUE_FLOAT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods FLOATVALUE_FLOAT_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Integer Int Value int index int name And Type Index int class Index Looking into the method ref table if index this well Known Methods INTVALUE INTEGER METHOD 0 class Index literal Index For Java Lang Integer if name And Type Index this well Known Method Name And Types INTVALUE INTEGER METHOD NAME AND TYPE 0 int name Index literal Index INTVALUE INTEGER METHOD NAME int type Index literal Index INTVALUE INTEGER METHOD SIGNATURE name And Type Index this well Known Method Name And Types INTVALUE INTEGER METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods INTVALUE INTEGER METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangIntegerIntValue nameAndTypeIndex classIndex wellKnownMethods INTVALUE_INTEGER_METHOD classIndex literalIndexForJavaLangInteger nameAndTypeIndex wellKnownMethodNameAndTypes INTVALUE_INTEGER_METHOD_NAME_AND_TYPE nameIndex literalIndex INTVALUE_INTEGER_METHOD_NAME typeIndex literalIndex INTVALUE_INTEGER_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes INTVALUE_INTEGER_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods INTVALUE_INTEGER_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Long Long Value int index int name And Type Index int class Index Looking into the method ref table if index this well Known Methods LONGVALUE LONG METHOD 0 class Index literal Index For Java Lang Long if name And Type Index this well Known Method Name And Types LONGVALUE LONG METHOD NAME AND TYPE 0 int name Index literal Index LONGVALUE LONG METHOD NAME int type Index literal Index LONGVALUE LONG METHOD SIGNATURE name And Type Index this well Known Method Name And Types LONGVALUE LONG METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods LONGVALUE LONG METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangLongLongValue nameAndTypeIndex classIndex wellKnownMethods LONGVALUE_LONG_METHOD classIndex literalIndexForJavaLangLong nameAndTypeIndex wellKnownMethodNameAndTypes LONGVALUE_LONG_METHOD_NAME_AND_TYPE nameIndex literalIndex LONGVALUE_LONG_METHOD_NAME typeIndex literalIndex LONGVALUE_LONG_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes LONGVALUE_LONG_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods LONGVALUE_LONG_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Reflect Accessible Object int index if index this well Known Types JAVA LANG REFLECT ACCESSIBLEOBJECT TYPE 0 int name Index The entry doesn t exit yet name Index literal Index JAVALANGREFLECTACCESSIBLEOBJECT CONSTANTPOOLNAME index this well Known Types JAVA LANG REFLECT ACCESSIBLEOBJECT TYPE this current Index writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangReflectAccessibleObject wellKnownTypes JAVA_LANG_REFLECT_ACCESSIBLEOBJECT_TYPE nameIndex nameIndex literalIndex JAVALANGREFLECTACCESSIBLEOBJECT_CONSTANTPOOLNAME wellKnownTypes JAVA_LANG_REFLECT_ACCESSIBLEOBJECT_TYPE currentIndex ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Reflect Accessible Object Set Accessible int index int name And Type Index int class Index Looking into the method ref table if index this well Known Methods SETACCESSIBLE ACCESSIBLEOBJECT METHOD 0 class Index literal Index For Java Lang Reflect Accessible Object if name And Type Index this well Known Method Name And Types SETACCESSIBLE ACCESSIBLEOBJECT METHOD NAME AND TYPE 0 int name Index literal Index SETACCESSIBLE NAME int type Index literal Index SETACCESSIBLE SIGNATURE name And Type Index this well Known Method Name And Types SETACCESSIBLE ACCESSIBLEOBJECT METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods SETACCESSIBLE ACCESSIBLEOBJECT METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangReflectAccessibleObjectSetAccessible nameAndTypeIndex classIndex wellKnownMethods SETACCESSIBLE_ACCESSIBLEOBJECT_METHOD classIndex literalIndexForJavaLangReflectAccessibleObject nameAndTypeIndex wellKnownMethodNameAndTypes SETACCESSIBLE_ACCESSIBLEOBJECT_METHOD_NAME_AND_TYPE nameIndex literalIndex SETACCESSIBLE_NAME typeIndex literalIndex SETACCESSIBLE_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes SETACCESSIBLE_ACCESSIBLEOBJECT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods SETACCESSIBLE_ACCESSIBLEOBJECT_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Reflect Array int index if index this well Known Types JAVA LANG REFLECT ARRAY TYPE 0 int name Index The entry doesn t exit yet name Index literal Index JAVALANGREFLECTARRAY CONSTANTPOOLNAME index this well Known Types JAVA LANG REFLECT ARRAY TYPE this current Index writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangReflectArray wellKnownTypes JAVA_LANG_REFLECT_ARRAY_TYPE nameIndex nameIndex literalIndex JAVALANGREFLECTARRAY_CONSTANTPOOLNAME wellKnownTypes JAVA_LANG_REFLECT_ARRAY_TYPE currentIndex ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Reflect Array New Instance int index int name And Type Index int class Index Looking into the method ref table if index this well Known Methods NEWINSTANCE ARRAY METHOD 0 class Index literal Index For Java Lang Reflect Array if name And Type Index this well Known Method Name And Types ARRAY NEWINSTANCE METHOD NAME AND TYPE 0 int name Index literal Index ARRAY NEWINSTANCE NAME int type Index literal Index ARRAY NEWINSTANCE SIGNATURE name And Type Index this well Known Method Name And Types ARRAY NEWINSTANCE METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods NEWINSTANCE ARRAY METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangReflectArrayNewInstance nameAndTypeIndex classIndex wellKnownMethods NEWINSTANCE_ARRAY_METHOD classIndex literalIndexForJavaLangReflectArray nameAndTypeIndex wellKnownMethodNameAndTypes ARRAY_NEWINSTANCE_METHOD_NAME_AND_TYPE nameIndex literalIndex ARRAY_NEWINSTANCE_NAME typeIndex literalIndex ARRAY_NEWINSTANCE_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes ARRAY_NEWINSTANCE_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods NEWINSTANCE_ARRAY_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Reflect Field int index if index this well Known Types JAVA LANG REFLECT FIELD TYPE 0 int name Index The entry doesn t exit yet name Index literal Index JAVALANGREFLECTFIELD CONSTANTPOOLNAME index this well Known Types JAVA LANG REFLECT FIELD TYPE this current Index writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangReflectField wellKnownTypes JAVA_LANG_REFLECT_FIELD_TYPE nameIndex nameIndex literalIndex JAVALANGREFLECTFIELD_CONSTANTPOOLNAME wellKnownTypes JAVA_LANG_REFLECT_FIELD_TYPE currentIndex ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Reflect Method int index if index this well Known Types JAVA LANG REFLECT METHOD TYPE 0 int name Index The entry doesn t exit yet name Index literal Index JAVALANGREFLECTMETHOD CONSTANTPOOLNAME index this well Known Types JAVA LANG REFLECT METHOD TYPE this current Index writeU1 Class Tag Then add the 8 bytes representing the long writeU2 name Index return index  constantPool literalIndexForJavaLangReflectMethod wellKnownTypes JAVA_LANG_REFLECT_METHOD_TYPE nameIndex nameIndex literalIndex JAVALANGREFLECTMETHOD_CONSTANTPOOLNAME wellKnownTypes JAVA_LANG_REFLECT_METHOD_TYPE currentIndex ClassTag nameIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Reflect Method Invoke int index int name And Type Index int class Index Looking into the method ref table if index this well Known Methods INVOKE METHOD METHOD 0 class Index literal Index For Java Lang Reflect Method if name And Type Index this well Known Method Name And Types INVOKE METHOD METHOD NAME AND TYPE 0 int name Index literal Index INVOKE METHOD METHOD NAME int type Index literal Index INVOKE METHOD METHOD SIGNATURE name And Type Index this well Known Method Name And Types INVOKE METHOD METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods INVOKE METHOD METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangReflectMethodInvoke nameAndTypeIndex classIndex wellKnownMethods INVOKE_METHOD_METHOD classIndex literalIndexForJavaLangReflectMethod nameAndTypeIndex wellKnownMethodNameAndTypes INVOKE_METHOD_METHOD_NAME_AND_TYPE nameIndex literalIndex INVOKE_METHOD_METHOD_NAME typeIndex literalIndex INVOKE_METHOD_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes INVOKE_METHOD_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods INVOKE_METHOD_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index For Java Lang Short Short Value int index int name And Type Index int class Index Looking into the method ref table if index this well Known Methods SHORTVALUE SHORT METHOD 0 class Index literal Index For Java Lang Short if name And Type Index this well Known Method Name And Types SHORTVALUE SHORT METHOD NAME AND TYPE 0 int name Index literal Index SHORTVALUE SHORT METHOD NAME int type Index literal Index SHORTVALUE SHORT METHOD SIGNATURE name And Type Index this well Known Method Name And Types SHORTVALUE SHORT METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods SHORTVALUE SHORT METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexForJavaLangShortShortValue nameAndTypeIndex classIndex wellKnownMethods SHORTVALUE_SHORT_METHOD classIndex literalIndexForJavaLangShort nameAndTypeIndex wellKnownMethodNameAndTypes SHORTVALUE_SHORT_METHOD_NAME_AND_TYPE nameIndex literalIndex SHORTVALUE_SHORT_METHOD_NAME typeIndex literalIndex SHORTVALUE_SHORT_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes SHORTVALUE_SHORT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods SHORTVALUE_SHORT_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding name And Type constant with name Index type Index param name Index int param type Index int param key org eclipse jdt internal compiler lookup Method Binding return CODE int CODE public int literal Index For Methods int name Index int type Index Method Binding key int index int index Of Well Known Method Name And Type if index Of Well Known Method Name And Type super index Of Well Known Method Name And Type key 1 if index Of Well Known Method Name And Type index Of Well Known Method Name And Type key 1 check if the entry exists if index this name And Type Cache For Methods get key 1 The entry doesn t exit yet index this name And Type Cache For Methods put key this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index else if index this well Known Method Name And Types index Of Well Known Method Name And Type 0 index this well Known Method Name And Types index Of Well Known Method Name And Type this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index else index super literal Index For Methods name Index type Index key return index  constantPool nameAndType nameIndex typeIndex nameIndex typeIndex MethodBinding literalIndexForMethods nameIndex typeIndex MethodBinding indexOfWellKnownMethodNameAndType indexOfWellKnownMethodNameAndType indexOfWellKnownMethodNameAndType indexOfWellKnownMethodNameAndType indexOfWellKnownMethodNameAndType nameAndTypeCacheForMethods nameAndTypeCacheForMethods currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethodNameAndTypes indexOfWellKnownMethodNameAndType wellKnownMethodNameAndTypes indexOfWellKnownMethodNameAndType currentIndex NameAndTypeTag nameIndex typeIndex literalIndexForMethods nameIndex typeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index Java Lang Reflect Field Getter int typeID int index 0 int name And Type Index 0 int class Index 0 switch typeID case T int if index this well Known Methods GET INT METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types GET INT METHOD NAME AND TYPE 0 int name Index literal Index GET INT METHOD NAME int type Index literal Index GET INT METHOD SIGNATURE name And Type Index this well Known Method Name And Types GET INT METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods GET INT METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T byte if index this well Known Methods GET BYTE METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types GET BYTE METHOD NAME AND TYPE 0 int name Index literal Index GET BYTE METHOD NAME int type Index literal Index GET BYTE METHOD SIGNATURE name And Type Index this well Known Method Name And Types GET BYTE METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods GET BYTE METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T short if index this well Known Methods GET SHORT METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types GET SHORT METHOD NAME AND TYPE 0 int name Index literal Index GET SHORT METHOD NAME int type Index literal Index GET SHORT METHOD SIGNATURE name And Type Index this well Known Method Name And Types GET SHORT METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods GET SHORT METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T long if index this well Known Methods GET LONG METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types GET LONG METHOD NAME AND TYPE 0 int name Index literal Index GET LONG METHOD NAME int type Index literal Index GET LONG METHOD SIGNATURE name And Type Index this well Known Method Name And Types GET LONG METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods GET LONG METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T float if index this well Known Methods GET FLOAT METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types GET FLOAT METHOD NAME AND TYPE 0 int name Index literal Index GET FLOAT METHOD NAME int type Index literal Index GET FLOAT METHOD SIGNATURE name And Type Index this well Known Method Name And Types GET FLOAT METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods GET FLOAT METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T double if index this well Known Methods GET DOUBLE METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types GET DOUBLE METHOD NAME AND TYPE 0 int name Index literal Index GET DOUBLE METHOD NAME int type Index literal Index GET DOUBLE METHOD SIGNATURE name And Type Index this well Known Method Name And Types GET DOUBLE METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods GET DOUBLE METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T char if index this well Known Methods GET CHAR METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types GET CHAR METHOD NAME AND TYPE 0 int name Index literal Index GET CHAR METHOD NAME int type Index literal Index GET CHAR METHOD SIGNATURE name And Type Index this well Known Method Name And Types GET CHAR METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods GET CHAR METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T boolean if index this well Known Methods GET BOOLEAN METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types GET BOOLEAN METHOD NAME AND TYPE 0 int name Index literal Index GET BOOLEAN METHOD NAME int type Index literal Index GET BOOLEAN METHOD SIGNATURE name And Type Index this well Known Method Name And Types GET BOOLEAN METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods GET BOOLEAN METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break default if index this well Known Methods GET OBJECT METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types GET OBJECT METHOD NAME AND TYPE 0 int name Index literal Index GET OBJECT METHOD NAME int type Index literal Index GET OBJECT METHOD SIGNATURE name And Type Index this well Known Method Name And Types GET OBJECT METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods GET OBJECT METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexJavaLangReflectFieldGetter nameAndTypeIndex classIndex T_int wellKnownMethods GET_INT_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes GET_INT_METHOD_NAME_AND_TYPE nameIndex literalIndex GET_INT_METHOD_NAME typeIndex literalIndex GET_INT_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes GET_INT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods GET_INT_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex T_byte wellKnownMethods GET_BYTE_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes GET_BYTE_METHOD_NAME_AND_TYPE nameIndex literalIndex GET_BYTE_METHOD_NAME typeIndex literalIndex GET_BYTE_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes GET_BYTE_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods GET_BYTE_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex T_short wellKnownMethods GET_SHORT_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes GET_SHORT_METHOD_NAME_AND_TYPE nameIndex literalIndex GET_SHORT_METHOD_NAME typeIndex literalIndex GET_SHORT_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes GET_SHORT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods GET_SHORT_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex T_long wellKnownMethods GET_LONG_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes GET_LONG_METHOD_NAME_AND_TYPE nameIndex literalIndex GET_LONG_METHOD_NAME typeIndex literalIndex GET_LONG_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes GET_LONG_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods GET_LONG_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex T_float wellKnownMethods GET_FLOAT_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes GET_FLOAT_METHOD_NAME_AND_TYPE nameIndex literalIndex GET_FLOAT_METHOD_NAME typeIndex literalIndex GET_FLOAT_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes GET_FLOAT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods GET_FLOAT_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex T_double wellKnownMethods GET_DOUBLE_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes GET_DOUBLE_METHOD_NAME_AND_TYPE nameIndex literalIndex GET_DOUBLE_METHOD_NAME typeIndex literalIndex GET_DOUBLE_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes GET_DOUBLE_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods GET_DOUBLE_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex T_char wellKnownMethods GET_CHAR_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes GET_CHAR_METHOD_NAME_AND_TYPE nameIndex literalIndex GET_CHAR_METHOD_NAME typeIndex literalIndex GET_CHAR_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes GET_CHAR_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods GET_CHAR_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex T_boolean wellKnownMethods GET_BOOLEAN_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes GET_BOOLEAN_METHOD_NAME_AND_TYPE nameIndex literalIndex GET_BOOLEAN_METHOD_NAME typeIndex literalIndex GET_BOOLEAN_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes GET_BOOLEAN_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods GET_BOOLEAN_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex wellKnownMethods GET_OBJECT_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes GET_OBJECT_METHOD_NAME_AND_TYPE nameIndex literalIndex GET_OBJECT_METHOD_NAME typeIndex literalIndex GET_OBJECT_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes GET_OBJECT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods GET_OBJECT_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex
This method returns the index into the constant Pool corresponding to the method descriptor It can be either an interface method reference constant or a method reference constant return CODE int CODE public int literal Index Java Lang Reflect Field Setter int typeID int index 0 int name And Type Index 0 int class Index 0 switch typeID case T int if index this well Known Methods SET INT METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types SET INT METHOD NAME AND TYPE 0 int name Index literal Index SET INT METHOD NAME int type Index literal Index SET INT METHOD SIGNATURE name And Type Index this well Known Method Name And Types SET INT METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods SET INT METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T byte if index this well Known Methods SET BYTE METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types SET BYTE METHOD NAME AND TYPE 0 int name Index literal Index SET BYTE METHOD NAME int type Index literal Index SET BYTE METHOD SIGNATURE name And Type Index this well Known Method Name And Types SET BYTE METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods SET BYTE METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T short if index this well Known Methods SET SHORT METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types SET SHORT METHOD NAME AND TYPE 0 int name Index literal Index SET SHORT METHOD NAME int type Index literal Index SET SHORT METHOD SIGNATURE name And Type Index this well Known Method Name And Types SET SHORT METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods SET SHORT METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T long if index this well Known Methods SET LONG METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types SET LONG METHOD NAME AND TYPE 0 int name Index literal Index SET LONG METHOD NAME int type Index literal Index SET LONG METHOD SIGNATURE name And Type Index this well Known Method Name And Types SET LONG METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods SET LONG METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T float if index this well Known Methods SET FLOAT METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types SET FLOAT METHOD NAME AND TYPE 0 int name Index literal Index SET FLOAT METHOD NAME int type Index literal Index SET FLOAT METHOD SIGNATURE name And Type Index this well Known Method Name And Types SET FLOAT METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods SET FLOAT METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T double if index this well Known Methods SET DOUBLE METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types SET DOUBLE METHOD NAME AND TYPE 0 int name Index literal Index SET DOUBLE METHOD NAME int type Index literal Index SET DOUBLE METHOD SIGNATURE name And Type Index this well Known Method Name And Types SET DOUBLE METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods SET DOUBLE METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T char if index this well Known Methods SET CHAR METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types SET CHAR METHOD NAME AND TYPE 0 int name Index literal Index SET CHAR METHOD NAME int type Index literal Index SET CHAR METHOD SIGNATURE name And Type Index this well Known Method Name And Types SET CHAR METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods SET CHAR METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break case T boolean if index this well Known Methods SET BOOLEAN METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types SET BOOLEAN METHOD NAME AND TYPE 0 int name Index literal Index SET BOOLEAN METHOD NAME int type Index literal Index SET BOOLEAN METHOD SIGNATURE name And Type Index this well Known Method Name And Types SET BOOLEAN METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods SET BOOLEAN METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index break default if index this well Known Methods SET OBJECT METHOD 0 class Index literal Index For Java Lang Reflect Field if name And Type Index this well Known Method Name And Types SET OBJECT METHOD NAME AND TYPE 0 int name Index literal Index SET OBJECT METHOD NAME int type Index literal Index SET OBJECT METHOD SIGNATURE name And Type Index this well Known Method Name And Types SET OBJECT METHOD NAME AND TYPE this current Index writeU1 Name And Type Tag writeU2 name Index writeU2 type Index index this well Known Methods SET OBJECT METHOD this current Index Write the method ref constant into the constant pool First add the tag writeU1 Method Ref Tag Then write the class index writeU2 class Index The write the name And Type index writeU2 name And Type Index return index  constantPool literalIndexJavaLangReflectFieldSetter nameAndTypeIndex classIndex T_int wellKnownMethods SET_INT_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes SET_INT_METHOD_NAME_AND_TYPE nameIndex literalIndex SET_INT_METHOD_NAME typeIndex literalIndex SET_INT_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes SET_INT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods SET_INT_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex T_byte wellKnownMethods SET_BYTE_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes SET_BYTE_METHOD_NAME_AND_TYPE nameIndex literalIndex SET_BYTE_METHOD_NAME typeIndex literalIndex SET_BYTE_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes SET_BYTE_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods SET_BYTE_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex T_short wellKnownMethods SET_SHORT_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes SET_SHORT_METHOD_NAME_AND_TYPE nameIndex literalIndex SET_SHORT_METHOD_NAME typeIndex literalIndex SET_SHORT_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes SET_SHORT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods SET_SHORT_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex T_long wellKnownMethods SET_LONG_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes SET_LONG_METHOD_NAME_AND_TYPE nameIndex literalIndex SET_LONG_METHOD_NAME typeIndex literalIndex SET_LONG_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes SET_LONG_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods SET_LONG_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex T_float wellKnownMethods SET_FLOAT_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes SET_FLOAT_METHOD_NAME_AND_TYPE nameIndex literalIndex SET_FLOAT_METHOD_NAME typeIndex literalIndex SET_FLOAT_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes SET_FLOAT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods SET_FLOAT_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex T_double wellKnownMethods SET_DOUBLE_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes SET_DOUBLE_METHOD_NAME_AND_TYPE nameIndex literalIndex SET_DOUBLE_METHOD_NAME typeIndex literalIndex SET_DOUBLE_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes SET_DOUBLE_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods SET_DOUBLE_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex T_char wellKnownMethods SET_CHAR_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes SET_CHAR_METHOD_NAME_AND_TYPE nameIndex literalIndex SET_CHAR_METHOD_NAME typeIndex literalIndex SET_CHAR_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes SET_CHAR_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods SET_CHAR_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex T_boolean wellKnownMethods SET_BOOLEAN_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes SET_BOOLEAN_METHOD_NAME_AND_TYPE nameIndex literalIndex SET_BOOLEAN_METHOD_NAME typeIndex literalIndex SET_BOOLEAN_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes SET_BOOLEAN_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods SET_BOOLEAN_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex wellKnownMethods SET_OBJECT_METHOD classIndex literalIndexForJavaLangReflectField nameAndTypeIndex wellKnownMethodNameAndTypes SET_OBJECT_METHOD_NAME_AND_TYPE nameIndex literalIndex SET_OBJECT_METHOD_NAME typeIndex literalIndex SET_OBJECT_METHOD_SIGNATURE nameAndTypeIndex wellKnownMethodNameAndTypes SET_OBJECT_METHOD_NAME_AND_TYPE currentIndex NameAndTypeTag nameIndex typeIndex wellKnownMethods SET_OBJECT_METHOD currentIndex MethodRefTag classIndex nameAndType nameAndTypeIndex

Evaluation Context context Creates a new wrapper for the given environment public Code Snippet Environment I Name Environment env Evaluation Context context this env env this context context  EvaluationContext CodeSnippetEnvironment INameEnvironment EvaluationContext
see I Name Environment find Type char public Name Environment Answer find Type char compound Type Name Name Environment Answer result this env find Type compound Type Name if result null return result if Char Operation equals compound Type Name ROOT COMPOUND NAME I Binary Type binary this context get Root Code Snippet Binary if binary null return null else return new Name Environment Answer binary Variables Info installed Vars this context installed Vars Class File class Files installed Vars class Files for int i 0 i class Files length i Class File class File class Files i if Char Operation equals compound Type Name class File get Compound Name Class File Reader binary null try binary new Class File Reader class File get Bytes null catch Class Format Exception e e print Stack Trace Should never happen since we compiled this type return null return new Name Environment Answer binary return null  INameEnvironment findType NameEnvironmentAnswer findType compoundTypeName NameEnvironmentAnswer findType compoundTypeName CharOperation compoundTypeName ROOT_COMPOUND_NAME IBinaryType getRootCodeSnippetBinary NameEnvironmentAnswer VariablesInfo installedVars installedVars ClassFile classFiles installedVars classFiles classFiles ClassFile classFile classFiles CharOperation compoundTypeName classFile getCompoundName ClassFileReader ClassFileReader classFile getBytes ClassFormatException printStackTrace NameEnvironmentAnswer
see I Name Environment find Type char char public Name Environment Answer find Type char type Name char package Name Name Environment Answer result this env find Type type Name package Name if result null return result return find Type Char Operation array Concat package Name type Name  INameEnvironment findType NameEnvironmentAnswer findType typeName packageName NameEnvironmentAnswer findType typeName packageName findType CharOperation arrayConcat packageName typeName
see I Name Environment is Package char char public boolean is Package char parent Package Name char package Name return this env is Package parent Package Name package Name  INameEnvironment isPackage isPackage parentPackageName packageName isPackage parentPackageName packageName
return this env is Package parent Package Name package Name public void cleanup this env cleanup  isPackage parentPackageName packageName

Code Snippet To Cu Mapper mapper Creates a new code snippet evaluator Code Snippet Evaluator char code Snippet Evaluation Context context I Name Environment environment Map options I Requestor requestor I Problem Factory problem Factory super context environment options requestor problem Factory this code Snippet code Snippet  CodeSnippetToCuMapper CodeSnippetEvaluator codeSnippet EvaluationContext INameEnvironment IRequestor IProblemFactory problemFactory problemFactory codeSnippet codeSnippet
see org eclipse jdt internal eval Evaluator protected void add Evaluation Result For Compilation Problem Map results ByI Ds I Problem problem char cu Source Code Snippet To Cu Mapper source Mapper get Mapper int pb Line Number problem get Source Line Number int evaluation Type source Mapper get Evaluation Type pb Line Number char evaluationID null switch evaluation Type case Evaluation Result T PACKAGE evaluationID this context package Name shift line number source start and source end problem set Source Line Number 1 problem set Source Start 0 problem set Source End evaluationID length 1 break case Evaluation Result T IMPORT evaluationID source Mapper get Import pb Line Number shift line number source start and source end problem set Source Line Number 1 problem set Source Start 0 problem set Source End evaluationID length 1 break case Evaluation Result T CODE SNIPPET evaluationID this code Snippet shift line number source start and source end problem set Source Line Number pb Line Number this mapper line Number Offset problem set Source Start problem get Source Start this mapper start Pos Offset problem set Source End problem get Source End this mapper start Pos Offset break case Evaluation Result T INTERNAL evaluationID cu Source break Evaluation Result result Evaluation Result results ByI Ds get evaluationID if result null results ByI Ds put evaluationID new Evaluation Result evaluationID evaluation Type new I Problem problem else result add Problem problem  addEvaluationResultForCompilationProblem resultsByIDs IProblem cuSource CodeSnippetToCuMapper sourceMapper getMapper pbLineNumber getSourceLineNumber evaluationType sourceMapper getEvaluationType pbLineNumber evaluationType EvaluationResult T_PACKAGE packageName setSourceLineNumber setSourceStart setSourceEnd EvaluationResult T_IMPORT sourceMapper getImport pbLineNumber setSourceLineNumber setSourceStart setSourceEnd EvaluationResult T_CODE_SNIPPET codeSnippet setSourceLineNumber pbLineNumber lineNumberOffset setSourceStart getSourceStart startPosOffset setSourceEnd getSourceEnd startPosOffset EvaluationResult T_INTERNAL cuSource EvaluationResult EvaluationResult resultsByIDs resultsByIDs EvaluationResult evaluationType IProblem addProblem
see org eclipse jdt internal eval Evaluator protected char get Class Name return Char Operation concat CODE SNIPPET CLASS NAME PREFIX Integer to String Evaluation Context CODE SNIPPET COUNTER 1 to Char Array  getClassName CharOperation CODE_SNIPPET_CLASS_NAME_PREFIX toString EvaluationContext CODE_SNIPPET_COUNTER toCharArray
see Evaluator Compiler get Compiler I Compiler Requestor compiler Requestor Compiler compiler null if DEVELOPMENT MODE If we are not developping the code snippet support classes use a regular compiler and feed its lookup environment with the code snippet support classes compiler new Code Snippet Compiler this environment Default Error Handling Policies exit After All Problems this options compiler Requestor this problem Factory this context get Mapper start Pos Offset get Mapper start Pos Offset this code Snippet length 1 Initialize the compiler s lookup environment with the already compiled super classes I Binary Type binary this context get Root Code Snippet Binary if binary null compiler lookup Environment cache Binary Type binary Variables Info installed Vars this context installed Vars if installed Vars null Class File global Class Files installed Vars class Files for int i 0 i global Class Files length i Class File Reader binary Type null try binary Type new Class File Reader global Class Files i get Bytes null catch Class Format Exception e e print Stack Trace Should never happen since we compiled this type compiler lookup Environment cache Binary Type binary Type else If we are developping the code snippet support classes use a wrapped environment so that if the code snippet classes are not found then a default implementation is provided compiler new Compiler get Wrapper Environment Default Error Handling Policies exit After All Problems this options compiler Requestor this problem Factory return compiler  getCompiler ICompilerRequestor compilerRequestor DEVELOPMENT_MODE CodeSnippetCompiler DefaultErrorHandlingPolicies exitAfterAllProblems compilerRequestor problemFactory getMapper startPosOffset getMapper startPosOffset codeSnippet IBinaryType getRootCodeSnippetBinary lookupEnvironment cacheBinaryType VariablesInfo installedVars installedVars installedVars ClassFile globalClassFiles installedVars classFiles globalClassFiles ClassFileReader binaryType binaryType ClassFileReader globalClassFiles getBytes ClassFormatException printStackTrace lookupEnvironment cacheBinaryType binaryType getWrapperEnvironment DefaultErrorHandlingPolicies exitAfterAllProblems compilerRequestor problemFactory
private Code Snippet To Cu Mapper get Mapper if this mapper null char var Class Name null Variables Info installed Vars this context installed Vars if installed Vars null char super Package Name installed Vars package Name if super Package Name null super Package Name length 0 var Class Name Char Operation concat super Package Name installed Vars class Name else var Class Name installed Vars class Name this mapper new Code Snippet To Cu Mapper this code Snippet this context package Name this context imports get Class Name var Class Name this context local Variable Names this context local Variable Type Names this context local Variable Modifiers this context declaring Type Name return this mapper  CodeSnippetToCuMapper getMapper varClassName VariablesInfo installedVars installedVars installedVars superPackageName installedVars packageName superPackageName superPackageName varClassName CharOperation superPackageName installedVars className varClassName installedVars className CodeSnippetToCuMapper codeSnippet packageName getClassName varClassName localVariableNames localVariableTypeNames localVariableModifiers declaringTypeName
see org eclipse jdt internal eval Evaluator protected char get Source return get Mapper cu Source  getSource getMapper cuSource
Returns an environment that wraps the client s name environment This wrapper always considers the wrapped environment then if the name is not found it search in the code snippet support This includes the superclass org eclipse jdt internal eval target Code Snippet as well as the global variable classes private I Name Environment get Wrapper Environment return new Code Snippet Environment this environment this context  CodeSnippet INameEnvironment getWrapperEnvironment CodeSnippetEnvironment

Field Binding delegate This Code Snippet Field Reference constructor comment param source char param pos long public Code Snippet Field Reference char source long pos Evaluation Context evaluation Context super source pos this evaluation Context evaluation Context  FieldBinding delegateThis CodeSnippetFieldReference CodeSnippetFieldReference EvaluationContext evaluationContext evaluationContext evaluationContext
public void generate Assignment Block Scope current Scope Code Stream code Stream Assignment assignment boolean value Required if this codegen Binding can Be Seen By this receiver Type this current Scope this receiver generate Code current Scope code Stream this codegen Binding is Static assignment expression generate Code current Scope code Stream true field Store code Stream this codegen Binding null value Required else Code Snippet Code Stream code Stream generate Emulation For Field this codegen Binding this receiver generate Code current Scope code Stream this codegen Binding is Static if this codegen Binding is Static need a receiver code Stream aconst null assignment expression generate Code current Scope code Stream true if value Required if this codegen Binding type Long Binding this codegen Binding type Double Binding code Stream dup2 x2 else code Stream dup x2 Code Snippet Code Stream code Stream generate Emulated Write Access For Field this codegen Binding if value Required code Stream generate Implicit Conversion assignment implicit Conversion  generateAssignment BlockScope currentScope CodeStream codeStream valueRequired codegenBinding canBeSeenBy receiverType currentScope generateCode currentScope codeStream codegenBinding isStatic generateCode currentScope codeStream fieldStore codeStream codegenBinding valueRequired CodeSnippetCodeStream codeStream generateEmulationForField codegenBinding generateCode currentScope codeStream codegenBinding isStatic codegenBinding isStatic codeStream aconst_null generateCode currentScope codeStream valueRequired codegenBinding LongBinding codegenBinding DoubleBinding codeStream dup2_x2 codeStream dup_x2 CodeSnippetCodeStream codeStream generateEmulatedWriteAccessForField codegenBinding valueRequired codeStream generateImplicitConversion implicitConversion
Field reference code generation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if this constant NotA Constant if value Required code Stream generate Constant this constant this implicit Conversion else boolean is Static this codegen Binding is Static this receiver generate Code current Scope code Stream is Static if value Required if this codegen Binding constant NotA Constant if this codegen Binding declaring Class null array length code Stream arraylength else if this codegen Binding can Be Seen By this receiver Type this current Scope if is Static code Stream getstatic this codegen Binding else code Stream getfield this codegen Binding else if is Static we need a null on the stack to use the reflect emulation code Stream aconst null Code Snippet Code Stream code Stream generate Emulated Read Access For Field this codegen Binding code Stream generate Implicit Conversion this implicit Conversion else if is Static code Stream invoke Object Get Class perform null check code Stream pop code Stream generate Constant this codegen Binding constant this implicit Conversion else if is Static code Stream invoke Object Get Class perform null check code Stream pop code Stream record Positions From pc this source Start  currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream NotAConstant valueRequired codeStream generateConstant implicitConversion isStatic codegenBinding isStatic generateCode currentScope codeStream isStatic valueRequired codegenBinding NotAConstant codegenBinding declaringClass codeStream codegenBinding canBeSeenBy receiverType currentScope isStatic codeStream codegenBinding codeStream codegenBinding isStatic codeStream aconst_null CodeSnippetCodeStream codeStream generateEmulatedReadAccessForField codegenBinding codeStream generateImplicitConversion implicitConversion isStatic codeStream invokeObjectGetClass codeStream codeStream generateConstant codegenBinding implicitConversion isStatic codeStream invokeObjectGetClass codeStream codeStream recordPositionsFrom sourceStart
public void generate Compound Assignment Block Scope current Scope Code Stream code Stream Expression expression int operator int assignment Implicit Conversion boolean value Required boolean is Static if this codegen Binding can Be Seen By this receiver Type this current Scope this receiver generate Code current Scope code Stream is Static this codegen Binding is Static if is Static code Stream getstatic this codegen Binding else code Stream dup code Stream getfield this codegen Binding int operation TypeID if operation TypeID this implicit Conversion 4 T String code Stream generate String Append current Scope null expression else promote the array reference to the suitable operation type code Stream generate Implicit Conversion this implicit Conversion generate the increment value will by itself be promoted to the operation value if expression Int Literal One prefix operation code Stream generate Constant expression constant this implicit Conversion else expression generate Code current Scope code Stream true perform the operation code Stream send Operator operator operation TypeID cast the value back to the array reference type code Stream generate Implicit Conversion assignment Implicit Conversion field Store code Stream this codegen Binding null value Required else this receiver generate Code current Scope code Stream is Static this codegen Binding is Static if is Static used to store the value Code Snippet Code Stream code Stream generate Emulation For Field this codegen Binding code Stream aconst null used to retrieve the actual value code Stream aconst null Code Snippet Code Stream code Stream generate Emulated Read Access For Field this codegen Binding else used to store the value Code Snippet Code Stream code Stream generate Emulation For Field this binding this receiver generate Code current Scope code Stream is Static this codegen Binding is Static used to retrieve the actual value code Stream dup Code Snippet Code Stream code Stream generate Emulated Read Access For Field this codegen Binding int operation TypeID if operation TypeID this implicit Conversion 4 T String code Stream generate String Append current Scope null expression else promote the array reference to the suitable operation type code Stream generate Implicit Conversion this implicit Conversion generate the increment value will by itself be promoted to the operation value if expression Int Literal One prefix operation code Stream generate Constant expression constant this implicit Conversion else expression generate Code current Scope code Stream true perform the operation code Stream send Operator operator operation TypeID cast the value back to the array reference type code Stream generate Implicit Conversion assignment Implicit Conversion current stack is field receiver value if value Required if this codegen Binding type Long Binding this codegen Binding type Double Binding code Stream dup2 x2 else code Stream dup x2 current stack is value field receiver value Code Snippet Code Stream code Stream generate Emulated Write Access For Field this codegen Binding  generateCompoundAssignment BlockScope currentScope CodeStream codeStream assignmentImplicitConversion valueRequired isStatic codegenBinding canBeSeenBy receiverType currentScope generateCode currentScope codeStream isStatic codegenBinding isStatic isStatic codeStream codegenBinding codeStream codeStream codegenBinding operationTypeID operationTypeID implicitConversion T_String codeStream generateStringAppend currentScope codeStream generateImplicitConversion implicitConversion IntLiteral codeStream generateConstant implicitConversion generateCode currentScope codeStream codeStream sendOperator operationTypeID codeStream generateImplicitConversion assignmentImplicitConversion fieldStore codeStream codegenBinding valueRequired generateCode currentScope codeStream isStatic codegenBinding isStatic isStatic CodeSnippetCodeStream codeStream generateEmulationForField codegenBinding codeStream aconst_null codeStream aconst_null CodeSnippetCodeStream codeStream generateEmulatedReadAccessForField codegenBinding CodeSnippetCodeStream codeStream generateEmulationForField generateCode currentScope codeStream isStatic codegenBinding isStatic codeStream CodeSnippetCodeStream codeStream generateEmulatedReadAccessForField codegenBinding operationTypeID operationTypeID implicitConversion T_String codeStream generateStringAppend currentScope codeStream generateImplicitConversion implicitConversion IntLiteral codeStream generateConstant implicitConversion generateCode currentScope codeStream codeStream sendOperator operationTypeID codeStream generateImplicitConversion assignmentImplicitConversion valueRequired codegenBinding LongBinding codegenBinding DoubleBinding codeStream dup2_x2 codeStream dup_x2 CodeSnippetCodeStream codeStream generateEmulatedWriteAccessForField codegenBinding
public void generate Post Increment Block Scope current Scope Code Stream code Stream Compound Assignment post Increment boolean value Required boolean is Static if this codegen Binding can Be Seen By this receiver Type this current Scope this receiver generate Code current Scope code Stream is Static this codegen Binding is Static if is Static code Stream getstatic this codegen Binding else code Stream dup code Stream getfield this codegen Binding if value Required if is Static if this codegen Binding type Long Binding this codegen Binding type Double Binding code Stream dup2 else code Stream dup else Stack owner old field value old field value owner old field value if this codegen Binding type Long Binding this codegen Binding type Double Binding code Stream dup2 x1 else code Stream dup x1 code Stream generate Constant post Increment expression constant this implicit Conversion code Stream send Operator post Increment operator this codegen Binding type id code Stream generate Implicit Conversion post Increment assignment Implicit Conversion field Store code Stream this codegen Binding null false else this receiver generate Code current Scope code Stream is Static this codegen Binding is Static if this codegen Binding is Static code Stream aconst null the actual stack is receiver code Stream dup the actual stack is receiver receiver Code Snippet Code Stream code Stream generate Emulated Read Access For Field this codegen Binding the actual stack is receiver value receiver value value receiver value dup x1 or dup2 x1 if value required value value receiver value dup x1 or dup2 x1 value value receiver pop or pop2 value value receiver field generate Emulation For Field value value field receiver swap value field receiver value field receiver dup2 x1 or dup2 x2 value field receiver value pop2 value field receiver newvalue generate constant op value store if value Required if this codegen Binding type Long Binding this codegen Binding type Double Binding code Stream dup2 x1 else code Stream dup x1 if this codegen Binding type Long Binding this codegen Binding type Double Binding code Stream dup2 x1 code Stream pop2 else code Stream dup x1 code Stream pop Code Snippet Code Stream code Stream generate Emulation For Field this codegen Binding code Stream swap if this codegen Binding type Long Binding this codegen Binding type Double Binding code Stream dup2 x2 else code Stream dup2 x1 code Stream pop2 code Stream generate Constant post Increment expression constant this implicit Conversion code Stream send Operator post Increment operator this codegen Binding type id code Stream generate Implicit Conversion post Increment assignment Implicit Conversion Code Snippet Code Stream code Stream generate Emulated Write Access For Field this codegen Binding  generatePostIncrement BlockScope currentScope CodeStream codeStream CompoundAssignment postIncrement valueRequired isStatic codegenBinding canBeSeenBy receiverType currentScope generateCode currentScope codeStream isStatic codegenBinding isStatic isStatic codeStream codegenBinding codeStream codeStream codegenBinding valueRequired isStatic codegenBinding LongBinding codegenBinding DoubleBinding codeStream codeStream codegenBinding LongBinding codegenBinding DoubleBinding codeStream dup2_x1 codeStream dup_x1 codeStream generateConstant postIncrement implicitConversion codeStream sendOperator postIncrement codegenBinding codeStream generateImplicitConversion postIncrement assignmentImplicitConversion fieldStore codeStream codegenBinding generateCode currentScope codeStream isStatic codegenBinding isStatic codegenBinding isStatic codeStream aconst_null codeStream CodeSnippetCodeStream codeStream generateEmulatedReadAccessForField codegenBinding dup_x1 dup2_x1 dup_x1 dup2_x1 generateEmulationForField dup2_x1 dup2_x2 valueRequired codegenBinding LongBinding codegenBinding DoubleBinding codeStream dup2_x1 codeStream dup_x1 codegenBinding LongBinding codegenBinding DoubleBinding codeStream dup2_x1 codeStream codeStream dup_x1 codeStream CodeSnippetCodeStream codeStream generateEmulationForField codegenBinding codeStream codegenBinding LongBinding codegenBinding DoubleBinding codeStream dup2_x2 codeStream dup2_x1 codeStream codeStream generateConstant postIncrement implicitConversion codeStream sendOperator postIncrement codegenBinding codeStream generateImplicitConversion postIncrement assignmentImplicitConversion CodeSnippetCodeStream codeStream generateEmulatedWriteAccessForField codegenBinding
public void manage Synthetic Read Access If Necessary Block Scope current Scope Flow Info flow Info The private access will be managed through the code generation if flow Info is Reachable return if the binding declaring class is not visible need special action for runtime compatibility on 1 2 V Ms change the declaring class of the binding NOTE from target 1 2 on field s declaring class is touched if any different from receiver type if this delegate This null if this binding declaring Class this delegate This type this binding declaring Class null this binding constant NotA Constant current Scope environment options targetJDK Class File Constants JDK1 2 this binding is Static this binding declaring Class id T Object no change for Object fields if there was any this binding declaring Class can Be Seen By current Scope this codegen Binding current Scope enclosing Source Type get Updated Field Binding this binding Reference Binding this delegate This type else if this binding declaring Class this receiver Type this receiver Type is Array Type this binding declaring Class null array length this binding constant NotA Constant current Scope environment options targetJDK Class File Constants JDK1 2 this binding declaring Class id T Object no change for Object fields in case there was this binding declaring Class can Be Seen By current Scope this codegen Binding current Scope enclosing Source Type get Updated Field Binding this binding Reference Binding this receiver Type  manageSyntheticReadAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable VMs delegateThis declaringClass delegateThis declaringClass NotAConstant currentScope ClassFileConstants JDK1_2 isStatic declaringClass T_Object declaringClass canBeSeenBy currentScope codegenBinding currentScope enclosingSourceType getUpdatedFieldBinding ReferenceBinding delegateThis declaringClass receiverType receiverType isArrayType declaringClass NotAConstant currentScope ClassFileConstants JDK1_2 declaringClass T_Object declaringClass canBeSeenBy currentScope codegenBinding currentScope enclosingSourceType getUpdatedFieldBinding ReferenceBinding receiverType
public void manage Synthetic Write Access If Necessary Block Scope current Scope Flow Info flow Info The private access will be managed through the code generation if flow Info is Reachable return if the binding declaring class is not visible need special action for runtime compatibility on 1 2 V Ms change the declaring class of the binding NOTE from target 1 2 on field s declaring class is touched if any different from receiver type if this delegate This null if this binding declaring Class this delegate This type this binding declaring Class null this binding constant NotA Constant current Scope environment options targetJDK Class File Constants JDK1 2 this binding is Static this binding declaring Class id T Object no change for Object fields if there was any this binding declaring Class can Be Seen By current Scope this codegen Binding current Scope enclosing Source Type get Updated Field Binding this binding Reference Binding this delegate This type else if this binding declaring Class this receiver Type this receiver Type is Array Type this binding declaring Class null array length this binding constant NotA Constant current Scope environment options targetJDK Class File Constants JDK1 2 this binding declaring Class id T Object no change for Object fields in case there was this binding declaring Class can Be Seen By current Scope this codegen Binding current Scope enclosing Source Type get Updated Field Binding this binding Reference Binding this receiver Type  manageSyntheticWriteAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable VMs delegateThis declaringClass delegateThis declaringClass NotAConstant currentScope ClassFileConstants JDK1_2 isStatic declaringClass T_Object declaringClass canBeSeenBy currentScope codegenBinding currentScope enclosingSourceType getUpdatedFieldBinding ReferenceBinding delegateThis declaringClass receiverType receiverType isArrayType declaringClass NotAConstant currentScope ClassFileConstants JDK1_2 declaringClass T_Object declaringClass canBeSeenBy currentScope codegenBinding currentScope enclosingSourceType getUpdatedFieldBinding ReferenceBinding receiverType
public Type Binding resolve Type Block Scope scope Answer the signature type of the field constants are propaged when the field is final and initialized with a compile time constant regular receiver reference this receiver Type this receiver resolve Type scope if this receiver Type null this constant NotA Constant return null the case receiver Type is Array Type and token length is handled by the scope API this codegen Binding this binding scope get Field this receiver Type this token this Field Binding first Attempt this binding boolean is Not Visible false if this binding is Valid Binding if this binding instanceof Problem Field Binding Problem Field Binding this binding problem Id Not Visible is Not Visible true if this evaluation Context declaring Type Name null this delegate This scope get Field scope enclosing Source Type DELEGATE THIS this if this delegate This null if not found then internal error field should have been found this constant NotA Constant scope problem Reporter invalid Field this this receiver Type return null else this constant NotA Constant scope problem Reporter invalid Field this this receiver Type return null Code Snippet Scope local Scope new Code Snippet Scope scope this codegen Binding this binding local Scope get Field For Code Snippet this delegate This type this token this if this binding is Valid Binding this constant NotA Constant if is Not Visible this codegen Binding this binding first Attempt scope problem Reporter invalid Field this this receiver Type return null if is Field Use Deprecated this binding scope this bits Is Strictly AssignedMASK 0 scope problem Reporter deprecated Field this binding this check for this x in static is done in the resolution of the receiver this constant Field Reference get Constant For this binding this this receiver is Implicit This scope if this receiver is This this constant NotA Constant return this resolved Type this binding type  TypeBinding resolveType BlockScope receiverType resolveType receiverType NotAConstant receiverType isArrayType codegenBinding getField receiverType FieldBinding firstAttempt isNotVisible isValidBinding ProblemFieldBinding ProblemFieldBinding problemId NotVisible isNotVisible evaluationContext declaringTypeName delegateThis getField enclosingSourceType DELEGATE_THIS delegateThis NotAConstant problemReporter invalidField receiverType NotAConstant problemReporter invalidField receiverType CodeSnippetScope localScope CodeSnippetScope codegenBinding localScope getFieldForCodeSnippet delegateThis isValidBinding NotAConstant isNotVisible codegenBinding firstAttempt problemReporter invalidField receiverType isFieldUseDeprecated IsStrictlyAssignedMASK problemReporter deprecatedField FieldReference getConstantFor isImplicitThis isThis NotAConstant resolvedType

Field Binding delegate This Code Snippet Message Send constructor comment public Code Snippet Message Send Evaluation Context evaluation Context this evaluation Context evaluation Context  FieldBinding delegateThis CodeSnippetMessageSend CodeSnippetMessageSend EvaluationContext evaluationContext evaluationContext evaluationContext
Message Send code generation param current Scope org eclipse jdt internal compiler lookup Block Scope param code Stream org eclipse jdt internal compiler codegen Code Stream param value Required boolean public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if this binding can Be Seen By this receiver Type this current Scope generate receiver enclosing instance access boolean is Static this binding is Static outer access if is Static this bits DepthMASK 0 outer method can be reached through emulation Reference Binding target Type current Scope enclosing Source Type enclosing Type At this bits DepthMASK DepthSHIFT Object path current Scope get Emulation Path target Type true only exact match false consider enclosing arg if path null emulation was not possible should not happen per construction current Scope problem Reporter need Implementation else code Stream generate Outer Access path this target Type current Scope else this receiver generate Code current Scope code Stream is Static generate arguments if this arguments null for int i 0 max this arguments length i max i this arguments i generate Code current Scope code Stream true actual message invocation if is Static code Stream invokestatic this binding else if this receiver is Super code Stream invokespecial this binding else if this binding declaring Class is Interface code Stream invokeinterface this binding else code Stream invokevirtual this binding else Code Snippet Code Stream code Stream generate Emulation For Method current Scope this binding generate receiver enclosing instance access boolean is Static this binding is Static outer access if is Static this bits DepthMASK 0 not supported yet current Scope problem Reporter need Implementation else this receiver generate Code current Scope code Stream is Static if is Static we need an object on the stack which is ignored for the method invocation code Stream aconst null generate arguments if this arguments null int args Length this arguments length code Stream generate Inlined Value args Length code Stream new Array current Scope new Array Binding current Scope get Type Type Constants JAVA LANG OBJECT 1 code Stream dup for int i 0 i args Length i code Stream generate Inlined Value i this arguments i generate Code current Scope code Stream true Type Binding parameter Binding this binding parameters i if parameter Binding is Base Type parameter Binding Null Binding Code Snippet Code Stream code Stream generate Object Wrapper For Type this binding parameters i code Stream aastore if i args Length 1 code Stream dup else code Stream generate Inlined Value 0 code Stream new Array current Scope new Array Binding current Scope get Type Type Constants JAVA LANG OBJECT 1 Code Snippet Code Stream code Stream invoke Java Lang Reflect Method Invoke convert the return value to the appropriate type for primitive types if this binding return Type is Base Type int typeID this binding return Type id if typeID T void remove the null from the stack code Stream pop Code Snippet Code Stream code Stream checkcast typeID Code Snippet Code Stream code Stream get Base Type Value typeID else code Stream checkcast this binding return Type operation on the returned value if value Required implicit conversion if necessary code Stream generate Implicit Conversion this implicit Conversion else pop return value if any switch this binding return Type id case T long case T double code Stream pop2 break case T void break default code Stream pop code Stream record Positions From pc this source Start  MessageSend currentScope BlockScope codeStream CodeStream valueRequired generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream canBeSeenBy receiverType currentScope isStatic isStatic isStatic ReferenceBinding targetType currentScope enclosingSourceType enclosingTypeAt currentScope getEmulationPath targetType currentScope problemReporter needImplementation codeStream generateOuterAccess targetType currentScope generateCode currentScope codeStream isStatic generateCode currentScope codeStream isStatic codeStream isSuper codeStream declaringClass isInterface codeStream codeStream CodeSnippetCodeStream codeStream generateEmulationForMethod currentScope isStatic isStatic isStatic currentScope problemReporter needImplementation generateCode currentScope codeStream isStatic isStatic codeStream aconst_null argsLength codeStream generateInlinedValue argsLength codeStream newArray currentScope ArrayBinding currentScope getType TypeConstants JAVA_LANG_OBJECT codeStream argsLength codeStream generateInlinedValue generateCode currentScope codeStream TypeBinding parameterBinding parameterBinding isBaseType parameterBinding NullBinding CodeSnippetCodeStream codeStream generateObjectWrapperForType codeStream argsLength codeStream codeStream generateInlinedValue codeStream newArray currentScope ArrayBinding currentScope getType TypeConstants JAVA_LANG_OBJECT CodeSnippetCodeStream codeStream invokeJavaLangReflectMethodInvoke returnType isBaseType returnType T_void codeStream CodeSnippetCodeStream codeStream CodeSnippetCodeStream codeStream getBaseTypeValue codeStream returnType valueRequired codeStream generateImplicitConversion implicitConversion returnType T_long T_double codeStream T_void codeStream codeStream recordPositionsFrom sourceStart
public void manage Synthetic Access If Necessary Block Scope current Scope Flow Info flow Info if flow Info is Reachable return if the binding declaring class is not visible need special action for runtime compatibility on 1 2 V Ms change the declaring class of the binding NOTE from target 1 2 on method s declaring class is touched if any different from receiver type and not from Object or implicit static method call if this binding declaring Class this qualifying Type this qualifying Type is Array Type current Scope environment options targetJDK Class File Constants JDK1 2 this receiver is Implicit This this binding is Static this binding declaring Class id T Object no change for Object methods this binding declaring Class can Be Seen By current Scope this codegen Binding current Scope enclosing Source Type get Updated Method Binding this binding Reference Binding this qualifying Type  manageSyntheticAccessIfNecessary BlockScope currentScope FlowInfo flowInfo flowInfo isReachable VMs declaringClass qualifyingType qualifyingType isArrayType currentScope ClassFileConstants JDK1_2 isImplicitThis isStatic declaringClass T_Object declaringClass canBeSeenBy currentScope codegenBinding currentScope enclosingSourceType getUpdatedMethodBinding ReferenceBinding qualifyingType
public Type Binding resolve Type Block Scope scope Answer the signature return type Base type promotion this constant NotA Constant this qualifying Type this receiver Type this receiver resolve Type scope will check for null after args are resolved Type Binding argument Types No Parameters if this arguments null boolean arg Has Error false type Checks all arguments int length this arguments length argument Types new Type Binding length for int i 0 i length i if argument Types i this arguments i resolve Type scope null arg Has Error true if arg Has Error return null if this receiver Type null return null base type cannot receive any message if this receiver Type is Base Type scope problem Reporter error No Method For this this receiver Type argument Types return null this binding this receiver is Implicit This scope get Implicit Method this selector argument Types this scope get Method this receiver Type this selector argument Types this if this binding is Valid Binding if this binding instanceof Problem Method Binding Problem Method Binding this binding problem Id Not Visible if this evaluation Context declaring Type Name null this delegate This scope get Field scope enclosing Source Type DELEGATE THIS this if this delegate This null if not found then internal error field should have been found this constant NotA Constant scope problem Reporter invalid Method this this binding return null else this constant NotA Constant scope problem Reporter invalid Method this this binding return null Code Snippet Scope local Scope new Code Snippet Scope scope Method Binding private Binding this receiver instanceof Code Snippet This Reference Code Snippet This Reference this receiver is Implicit local Scope get Implicit Method Reference Binding this delegate This type this selector argument Types this local Scope get Method this delegate This type this selector argument Types this if private Binding is Valid Binding if this binding declaring Class null if this receiver Type instanceof Reference Binding this binding declaring Class Reference Binding this receiver Type else really bad error scope problem Reporter error No Method For this this receiver Type argument Types return null scope problem Reporter invalid Method this this binding return null else this binding private Binding else if this binding declaring Class null if this receiver Type instanceof Reference Binding this binding declaring Class Reference Binding this receiver Type else really bad error scope problem Reporter error No Method For this this receiver Type argument Types return null scope problem Reporter invalid Method this this binding return null if this binding is Static the receiver must not be a type in other words a Name Reference that the TC has bound to a Type if this receiver instanceof Name Reference if Name Reference this receiver bits Binding Ids TYPE 0 scope problem Reporter must UseA Static Method this this binding return null if this arguments null for int i 0 i this arguments length i this arguments i implicit Widening this binding parameters i argument Types i message send that are known to fail at compile time if this binding is Abstract if this receiver is Super scope problem Reporter cannot Direcly Invoke Abstract Method this this binding return null abstract private methods cannot occur nor abstract static if is Method Use Deprecated this binding scope scope problem Reporter deprecated Method this binding this return this resolved Type this binding return Type  TypeBinding resolveType BlockScope NotAConstant qualifyingType receiverType resolveType TypeBinding argumentTypes NoParameters argHasError typeChecks argumentTypes TypeBinding argumentTypes resolveType argHasError argHasError receiverType receiverType isBaseType problemReporter errorNoMethodFor receiverType argumentTypes isImplicitThis getImplicitMethod argumentTypes getMethod receiverType argumentTypes isValidBinding ProblemMethodBinding ProblemMethodBinding problemId NotVisible evaluationContext declaringTypeName delegateThis getField enclosingSourceType DELEGATE_THIS delegateThis NotAConstant problemReporter invalidMethod NotAConstant problemReporter invalidMethod CodeSnippetScope localScope CodeSnippetScope MethodBinding privateBinding CodeSnippetThisReference CodeSnippetThisReference isImplicit localScope getImplicitMethod ReferenceBinding delegateThis argumentTypes localScope getMethod delegateThis argumentTypes privateBinding isValidBinding declaringClass receiverType ReferenceBinding declaringClass ReferenceBinding receiverType problemReporter errorNoMethodFor receiverType argumentTypes problemReporter invalidMethod privateBinding declaringClass receiverType ReferenceBinding declaringClass ReferenceBinding receiverType problemReporter errorNoMethodFor receiverType argumentTypes problemReporter invalidMethod isStatic NameReference NameReference NameReference BindingIds problemReporter mustUseAStaticMethod implicitWidening argumentTypes isAbstract isSuper problemReporter cannotDireclyInvokeAbstractMethod isMethodUseDeprecated problemReporter deprecatedMethod resolvedType returnType

Evaluation Context evaluation Context Creates a new code snippet parser public Code Snippet Parser Problem Reporter problem Reporter Evaluation Context evaluation Context boolean optimize String Literals int code Snippet Start int code Snippet End super problem Reporter optimize String Literals this code Snippet Start code Snippet Start this code Snippet End code Snippet End this evaluation Context evaluation Context this report Only One Syntax Error true this javadoc Parser check Doc Comment false  EvaluationContext evaluationContext CodeSnippetParser ProblemReporter problemReporter EvaluationContext evaluationContext optimizeStringLiterals codeSnippetStart codeSnippetEnd problemReporter optimizeStringLiterals codeSnippetStart codeSnippetStart codeSnippetEnd codeSnippetEnd evaluationContext evaluationContext reportOnlyOneSyntaxError javadocParser checkDocComment
protected void class Instance Creation boolean always Qualified Class Instance Creation Expression new Class Type Argument Listopt Class Bodyopt Class Bodyopt produces a null item on the ast Stak if it produces NO class body An empty class body produces a 0 on the length stack Allocation Expression alloc int length if length this ast Length Stack this ast Length Ptr 1 this ast Stack this ast Ptr null NO Class Body this ast Ptr if always Qualified alloc new Qualified Allocation Expression else alloc new Code Snippet Allocation Expression this evaluation Context alloc source End this end Position the position has been stored explicitly if length this expression Length Stack this expression Length Ptr 0 this expression Ptr length System arraycopy this expression Stack this expression Ptr 1 alloc arguments new Expression length 0 length alloc type get Type Reference 0 the default constructor with the correct number of argument will be created and added by the TC see creates Internal Constructor With Binding alloc source Start this int Stack this int Ptr push On Expression Stack alloc else dispatch Declaration Into length Type Declaration anonymous Type Declaration Type Declaration this ast Stack this ast Ptr anonymous Type Declaration declaration Source End this end Statement Position if anonymous Type Declaration allocation null anonymous Type Declaration allocation source End this end Statement Position this ast Ptr this ast Length Ptr mark initializers with local type mark if needed mark Initializers With Local Type anonymous Type Declaration  classInstanceCreation alwaysQualified ClassInstanceCreationExpression ClassType ArgumentListopt ClassBodyopt ClassBodyopt astStak AllocationExpression astLengthStack astLengthPtr astStack astPtr ClassBody astPtr alwaysQualified QualifiedAllocationExpression CodeSnippetAllocationExpression evaluationContext sourceEnd endPosition expressionLengthStack expressionLengthPtr expressionPtr expressionStack expressionPtr getTypeReference createsInternalConstructorWithBinding sourceStart intStack intPtr pushOnExpressionStack dispatchDeclarationInto TypeDeclaration anonymousTypeDeclaration TypeDeclaration astStack astPtr anonymousTypeDeclaration declarationSourceEnd endStatementPosition anonymousTypeDeclaration anonymousTypeDeclaration sourceEnd endStatementPosition astPtr astLengthPtr markInitializersWithLocalType anonymousTypeDeclaration
protected void consume Class Declaration super consume Class Declaration recovery record Last Statement If Needed  consumeClassDeclaration consumeClassDeclaration recordLastStatementIfNeeded
protected void consume Class Header Name Class Header Name Modifiersopt class Identifier Type Declaration type Decl if this nested Method this nested Type 0 if this nested Type 0 type Decl new Type Declaration this compilation Unit compilation Result type Decl bits AST Node Is Member TypeMASK else type Decl new Code Snippet Type Declaration this compilation Unit compilation Result else Record that the block has a declaration for local types type Decl new Type Declaration this compilation Unit compilation Result type Decl bits AST Node Is Local TypeMASK mark Enclosing Member With Local Type block Real highlight the name of the type long pos this identifier Position Stack this identifier Ptr type Decl source End int pos type Decl source Start int pos 32 type Decl name this identifier Stack this identifier Ptr this identifier Length Ptr compute the declaration source too type Decl declaration Source Start this int Stack this int Ptr this int Ptr class and interface push an int position type Decl modifiers Source Start this int Stack this int Ptr type Decl modifiers this int Stack this int Ptr if type Decl modifiers Source Start 0 type Decl declaration Source Start type Decl modifiers Source Start type Decl body Start type Decl source End 1 push On Ast Stack type Decl this list Length 0 will be updated when reading super interfaces recovery if this current Element null this last Check Point type Decl body Start this current Element this current Element add type Decl 0 this last Ignored Token 1 javadoc type Decl javadoc this javadoc this javadoc null  consumeClassHeaderName ClassHeaderName TypeDeclaration typeDecl nestedMethod nestedType nestedType typeDecl TypeDeclaration compilationUnit compilationResult typeDecl ASTNode IsMemberTypeMASK typeDecl CodeSnippetTypeDeclaration compilationUnit compilationResult typeDecl TypeDeclaration compilationUnit compilationResult typeDecl ASTNode IsLocalTypeMASK markEnclosingMemberWithLocalType blockReal identifierPositionStack identifierPtr typeDecl sourceEnd typeDecl sourceStart typeDecl identifierStack identifierPtr identifierLengthPtr typeDecl declarationSourceStart intStack intPtr intPtr typeDecl modifiersSourceStart intStack intPtr typeDecl intStack intPtr typeDecl modifiersSourceStart typeDecl declarationSourceStart typeDecl modifiersSourceStart typeDecl bodyStart typeDecl sourceEnd pushOnAstStack typeDecl listLength currentElement lastCheckPoint typeDecl bodyStart currentElement currentElement typeDecl lastIgnoredToken typeDecl
protected void consume Empty Statement super consume Empty Statement recovery record Last Statement If Needed  consumeEmptyStatement consumeEmptyStatement recordLastStatementIfNeeded
protected void consume Expression Statement super consume Expression Statement recovery record Last Statement If Needed  consumeExpressionStatement consumeExpressionStatement recordLastStatementIfNeeded
protected void consume Field Access boolean is Super Access Field Access Primary Identifier Field Access super Identifier Field Reference fr new Code Snippet Field Reference this identifier Stack this identifier Ptr this identifier Position Stack this identifier Ptr this evaluation Context this identifier Length Ptr if is Super Access considerates the field Reference beginning at the super fr source Start this int Stack this int Ptr problem Reporter code Snippet Missing Class null 0 0 fr receiver new Code Snippet Super Reference fr source Start this end Position this evaluation Context push On Expression Stack fr else optimize push pop if fr receiver this expression Stack this expression Ptr is This fieldreference begins at the this fr source Start fr receiver source Start this expression Stack this expression Ptr fr  consumeFieldAccess isSuperAccess FieldAccess FieldAccess FieldReference CodeSnippetFieldReference identifierStack identifierPtr identifierPositionStack identifierPtr evaluationContext identifierLengthPtr isSuperAccess fieldReference sourceStart intStack intPtr problemReporter codeSnippetMissingClass CodeSnippetSuperReference sourceStart endPosition evaluationContext pushOnExpressionStack expressionStack expressionPtr isThis sourceStart sourceStart expressionStack expressionPtr
protected void consume Interface Header Name Interface Header Name Modifiersopt interface Identifier Type Declaration type Decl if this nested Method this nested Type 0 if this nested Type 0 type Decl new Type Declaration this compilation Unit compilation Result type Decl bits AST Node Is Member TypeMASK else type Decl new Code Snippet Type Declaration this compilation Unit compilation Result else Record that the block has a declaration for local types type Decl new Type Declaration this compilation Unit compilation Result type Decl bits AST Node Is Local TypeMASK mark Enclosing Member With Local Type block Real highlight the name of the type long pos this identifier Position Stack this identifier Ptr type Decl source End int pos type Decl source Start int pos 32 type Decl name this identifier Stack this identifier Ptr this identifier Length Ptr compute the declaration source too type Decl declaration Source Start this int Stack this int Ptr this int Ptr class and interface push an int position type Decl modifiers Source Start this int Stack this int Ptr type Decl modifiers this int Stack this int Ptr if type Decl modifiers Source Start 0 type Decl declaration Source Start type Decl modifiers Source Start type Decl body Start type Decl source End 1 push On Ast Stack type Decl this list Length 0 will be updated when reading super interfaces recovery if this current Element null is recovering this last Check Point type Decl body Start this current Element this current Element add type Decl 0 this last Ignored Token 1 javadoc type Decl javadoc this javadoc this javadoc null  consumeInterfaceHeaderName InterfaceHeaderName TypeDeclaration typeDecl nestedMethod nestedType nestedType typeDecl TypeDeclaration compilationUnit compilationResult typeDecl ASTNode IsMemberTypeMASK typeDecl CodeSnippetTypeDeclaration compilationUnit compilationResult typeDecl TypeDeclaration compilationUnit compilationResult typeDecl ASTNode IsLocalTypeMASK markEnclosingMemberWithLocalType blockReal identifierPositionStack identifierPtr typeDecl sourceEnd typeDecl sourceStart typeDecl identifierStack identifierPtr identifierLengthPtr typeDecl declarationSourceStart intStack intPtr intPtr typeDecl modifiersSourceStart intStack intPtr typeDecl intStack intPtr typeDecl modifiersSourceStart typeDecl declarationSourceStart typeDecl modifiersSourceStart typeDecl bodyStart typeDecl sourceEnd pushOnAstStack typeDecl listLength currentElement lastCheckPoint typeDecl bodyStart currentElement currentElement typeDecl lastIgnoredToken typeDecl
protected void consume Local Variable Declaration Statement super consume Local Variable Declaration Statement recovery record Last Statement If Needed  consumeLocalVariableDeclarationStatement consumeLocalVariableDeclarationStatement recordLastStatementIfNeeded
In case emulating local variables wrap the recovered statements inside a try statement so as to achieve local state commiting copy local vars back to fields The CS To Cu Mapper could not be used since it could have interfered with the syntax recovery specific to code snippets protected void consume Method Declaration boolean is Not Abstract Method Declaration Method Header Method Body Abstract Method Declaration Method Header super consume Method Declaration is Not Abstract now we know that we have a method declaration at the top of the ast stack Method Declaration method Decl Method Declaration this ast Stack this ast Ptr automatically wrap the last statement inside a return statement if it is an expression support have to be defined at toplevel only if this is Top Level Type int last method Decl statements null 1 method Decl statements length 1 if last 0 method Decl statements last instanceof Expression Expression last Expression Expression method Decl statements last method Decl statements last new Code Snippet Return Statement last Expression last Expression source Start last Expression source End int start method Decl body Start 1 end start long position start 32 end long positions new long position if this evaluation Context local Variable Names null int var Count this evaluation Context local Variable Names length n local decls try statement generate n local variable declarations type name val name Statement new Statements new Statement var Count 1 for int i 0 i var Count i char trimmed Type Name this evaluation Context local Variable Type Names i int name End Char Operation index Of trimmed Type Name if name End 0 trimmed Type Name Char Operation subarray trimmed Type Name 0 name End name End Char Operation index Of trimmed Type Name if name End 0 trimmed Type Name Char Operation subarray trimmed Type Name 0 name End Type Reference type Reference new Qualified Type Reference Char Operation split On trimmed Type Name positions int dim Count Char Operation occurences Of this evaluation Context local Variable Type Names i if dim Count 0 type Reference this copy Dims type Reference dim Count Name Reference init new Single Name Reference Char Operation concat LOCAL VAR PREFIX this evaluation Context local Variable Names i position Local Declaration declaration new Local Declaration this evaluation Context local Variable Names i start end declaration initialization init declaration type type Reference declaration modifiers this evaluation Context local Variable Modifiers i new Statements i declaration generate try snippet finally save locals to fields try block Try Statement try Statement new Try Statement Block try Block new Block method Decl explicit Declarations try Block source Start start try Block source End end try Block statements method Decl statements snippet statements try Statement try Block try Block finally block Block finally Block new Block 0 finally Block source Start start finally Block source End end finally Block statements new Statement var Count for int i 0 i var Count i finally Block statements i new Assignment new Single Name Reference Char Operation concat LOCAL VAR PREFIX this evaluation Context local Variable Names i position new Single Name Reference this evaluation Context local Variable Names i position int position try Statement finally Block finally Block new Statements var Count try Statement method Decl statements new Statements  CSToCuMapper consumeMethodDeclaration isNotAbstract MethodDeclaration MethodHeader MethodBody AbstractMethodDeclaration MethodHeader consumeMethodDeclaration isNotAbstract MethodDeclaration methodDecl MethodDeclaration astStack astPtr isTopLevelType methodDecl methodDecl methodDecl lastExpression methodDecl methodDecl CodeSnippetReturnStatement lastExpression lastExpression sourceStart lastExpression sourceEnd methodDecl bodyStart evaluationContext localVariableNames varCount evaluationContext localVariableNames newStatements varCount varCount trimmedTypeName evaluationContext localVariableTypeNames nameEnd CharOperation indexOf trimmedTypeName nameEnd trimmedTypeName CharOperation trimmedTypeName nameEnd nameEnd CharOperation indexOf trimmedTypeName nameEnd trimmedTypeName CharOperation trimmedTypeName nameEnd TypeReference typeReference QualifiedTypeReference CharOperation splitOn trimmedTypeName dimCount CharOperation occurencesOf evaluationContext localVariableTypeNames dimCount typeReference copyDims typeReference dimCount NameReference SingleNameReference CharOperation LOCAL_VAR_PREFIX evaluationContext localVariableNames LocalDeclaration LocalDeclaration evaluationContext localVariableNames typeReference evaluationContext localVariableModifiers newStatements TryStatement tryStatement TryStatement tryBlock methodDecl explicitDeclarations tryBlock sourceStart tryBlock sourceEnd tryBlock methodDecl tryStatement tryBlock tryBlock finallyBlock finallyBlock sourceStart finallyBlock sourceEnd finallyBlock varCount varCount finallyBlock SingleNameReference CharOperation LOCAL_VAR_PREFIX evaluationContext localVariableNames SingleNameReference evaluationContext localVariableNames tryStatement finallyBlock finallyBlock newStatements varCount tryStatement methodDecl newStatements
protected void consume Method Invocation Name Method Invocation Name Argument Listopt if this scanner start Position this code Snippet Start this scanner start Position this code Snippet End 1 Util LINE SEPARATOR CHARS length 14838 is Top Level Type when the name is only an identifier we have a message send to this implicit Message Send m new Message Send m source End this r Paren Pos m source Start int m name Source Position this identifier Position Stack this identifier Ptr 32 m selector this identifier Stack this identifier Ptr if this identifier Length Stack this identifier Length Ptr 1 m receiver new Code Snippet This Reference 0 0 this evaluation Context true this identifier Length Ptr else this identifier Length Stack this identifier Length Ptr m receiver get Unspecified Reference m source Start m receiver source Start push On Expression Stack m else super consume Method Invocation Name  consumeMethodInvocationName MethodInvocation ArgumentListopt startPosition codeSnippetStart startPosition codeSnippetEnd LINE_SEPARATOR_CHARS isTopLevelType MessageSend newMessageSend sourceEnd rParenPos sourceStart nameSourcePosition identifierPositionStack identifierPtr identifierStack identifierPtr identifierLengthStack identifierLengthPtr CodeSnippetThisReference evaluationContext identifierLengthPtr identifierLengthStack identifierLengthPtr getUnspecifiedReference sourceStart sourceStart pushOnExpressionStack consumeMethodInvocationName
protected void consume Method Invocation Super Method Invocation super Identifier Argument Listopt Message Send m new Message Send m source Start this int Stack this int Ptr m source End this r Paren Pos m name Source Position this identifier Position Stack this identifier Ptr m selector this identifier Stack this identifier Ptr this identifier Length Ptr m receiver new Code Snippet Super Reference m source Start this end Position this evaluation Context push On Expression Stack m  consumeMethodInvocationSuper MethodInvocation ArgumentListopt MessageSend newMessageSend sourceStart intStack intPtr sourceEnd rParenPos nameSourcePosition identifierPositionStack identifierPtr identifierStack identifierPtr identifierLengthPtr CodeSnippetSuperReference sourceStart endPosition evaluationContext pushOnExpressionStack
protected void consume Primary No New Array This Primary No New Array this if this scanner start Position this code Snippet Start this scanner start Position this code Snippet End 1 Util LINE SEPARATOR CHARS length 14838 is Top Level Type push On Expression Stack new Code Snippet This Reference this int Stack this int Ptr this end Position this evaluation Context false else super consume Primary No New Array This  consumePrimaryNoNewArrayThis PrimaryNoNewArray startPosition codeSnippetStart startPosition codeSnippetEnd LINE_SEPARATOR_CHARS isTopLevelType pushOnExpressionStack CodeSnippetThisReference intStack intPtr endPosition evaluationContext consumePrimaryNoNewArrayThis
protected void consume Statement Break super consume Statement Break recovery record Last Statement If Needed  consumeStatementBreak consumeStatementBreak recordLastStatementIfNeeded
protected void consume Statement Break With Label super consume Statement Break With Label recovery record Last Statement If Needed  consumeStatementBreakWithLabel consumeStatementBreakWithLabel recordLastStatementIfNeeded
protected void consume Statement Catch super consume Statement Catch recovery record Last Statement If Needed  consumeStatementCatch consumeStatementCatch recordLastStatementIfNeeded
protected void consume Statement Continue super consume Statement Continue recovery record Last Statement If Needed  consumeStatementContinue consumeStatementContinue recordLastStatementIfNeeded
protected void consume Statement Continue With Label super consume Statement Continue With Label recovery record Last Statement If Needed  consumeStatementContinueWithLabel consumeStatementContinueWithLabel recordLastStatementIfNeeded
protected void consume Statement Do super consume Statement Do recovery record Last Statement If Needed  consumeStatementDo consumeStatementDo recordLastStatementIfNeeded
protected void consume Statement For super consume Statement For recovery record Last Statement If Needed  consumeStatementFor consumeStatementFor recordLastStatementIfNeeded
protected void consume Statement If No Else super consume Statement If No Else recovery record Last Statement If Needed  consumeStatementIfNoElse consumeStatementIfNoElse recordLastStatementIfNeeded
protected void consume Statement If With Else super consume Statement If With Else recovery record Last Statement If Needed  consumeStatementIfWithElse consumeStatementIfWithElse recordLastStatementIfNeeded
protected void consume Statement Label super consume Statement Label recovery record Last Statement If Needed  consumeStatementLabel consumeStatementLabel recordLastStatementIfNeeded
protected void consume Statement Return Return Statement return Expressionopt returned value intercepted by code snippet support have to be defined at toplevel only if this has Recovered On Expression this scanner start Position this code Snippet Start this scanner start Position this code Snippet End 1 Util LINE SEPARATOR CHARS length 14838 this expression Length Stack this expression Length Ptr 0 is Top Level Type this expression Length Ptr Expression expression this expression Stack this expression Ptr push On Ast Stack new Code Snippet Return Statement expression expression source Start expression source End else super consume Statement Return recovery record Last Statement If Needed  consumeStatementReturn ReturnStatement hasRecoveredOnExpression startPosition codeSnippetStart startPosition codeSnippetEnd LINE_SEPARATOR_CHARS expressionLengthStack expressionLengthPtr isTopLevelType expressionLengthPtr expressionStack expressionPtr pushOnAstStack CodeSnippetReturnStatement sourceStart sourceEnd consumeStatementReturn recordLastStatementIfNeeded
protected void consume Statement Switch super consume Statement Switch recovery record Last Statement If Needed  consumeStatementSwitch consumeStatementSwitch recordLastStatementIfNeeded
protected void consume Statement Synchronized super consume Statement Synchronized recovery record Last Statement If Needed  consumeStatementSynchronized consumeStatementSynchronized recordLastStatementIfNeeded
protected void consume Statement Throw super consume Statement Throw recovery record Last Statement If Needed  consumeStatementThrow consumeStatementThrow recordLastStatementIfNeeded
protected void consume Statement Try boolean arg 0 super consume Statement Try arg 0 recovery record Last Statement If Needed  consumeStatementTry arg_0 consumeStatementTry arg_0 recordLastStatementIfNeeded
protected void consume Statement While super consume Statement While recovery record Last Statement If Needed  consumeStatementWhile consumeStatementWhile recordLastStatementIfNeeded
protected Compilation Unit Declaration end Parse int act if this has Recovered On Expression Compilation Result unit Result this compilation Unit compilation Result if act ERROR ACTION expression recovery worked flush previously recorded problems for int i 0 i unit Result problem Count i unit Result problems i null discard problem unit Result problem Count 0 if this reference Context instanceof Abstract Method Declaration Abstract Method Declaration this reference Context ignore Further Investigation false if this reference Context instanceof Compilation Unit Declaration Compilation Unit Declaration this reference Context ignore Further Investigation false consume expresion as a return statement consume Statement Return int fields Count this evaluation Context local Variable Names null 0 this evaluation Context local Variable Names length this evaluation Context declaring Type Name null 0 1 if this ast Ptr this diet 0 2 fields Count in diet mode the ast stack was empty when we went for method body otherwise it contained the type the generated fields for local variables the generated field for this and the method consume Block Statements consume Method Body if this diet consume Method Declaration true if fields Count 0 consume Class Body Declarations consume Class Body Declarationsopt consume Class Declaration consume Type Declarationsopt consume Compilation Unit this last Act ACCEPT ACTION else might have more than one error recorded 1 during regular parse 2 during expression recovery must filter out one of them the earliest one is less accurate int max Regular Pos 0 problem Count unit Result problem Count for int i 0 i this problem Count Before Recovery i skip unmatched bracket problems if unit Result problems i getID I Problem Unmatched Bracket continue int start unit Result problems i get Source Start if start max Regular Pos start this code Snippet End max Regular Pos start int max Recovery Pos 0 for int i this problem Count Before Recovery i problem Count i skip unmatched bracket problems if unit Result problems i getID I Problem Unmatched Bracket continue int start unit Result problems i get Source Start if start max Recovery Pos start this code Snippet End max Recovery Pos start if max Recovery Pos max Regular Pos System arraycopy unit Result problems this problem Count Before Recovery unit Result problems 0 problem Count this problem Count Before Recovery unit Result problem Count this problem Count Before Recovery else unit Result problem Count problem Count this problem Count Before Recovery for int i unit Result problem Count i problem Count i unit Result problems i null discard problem return super end Parse act  CompilationUnitDeclaration endParse hasRecoveredOnExpression CompilationResult unitResult compilationUnit compilationResult ERROR_ACTION unitResult problemCount unitResult unitResult problemCount referenceContext AbstractMethodDeclaration AbstractMethodDeclaration referenceContext ignoreFurtherInvestigation referenceContext CompilationUnitDeclaration CompilationUnitDeclaration referenceContext ignoreFurtherInvestigation consumeStatementReturn fieldsCount evaluationContext localVariableNames evaluationContext localVariableNames evaluationContext declaringTypeName astPtr fieldsCount consumeBlockStatements consumeMethodBody consumeMethodDeclaration fieldsCount consumeClassBodyDeclarations consumeClassBodyDeclarationsopt consumeClassDeclaration consumeTypeDeclarationsopt consumeCompilationUnit lastAct ACCEPT_ACTION maxRegularPos problemCount unitResult problemCount problemCountBeforeRecovery unitResult IProblem UnmatchedBracket unitResult getSourceStart maxRegularPos codeSnippetEnd maxRegularPos maxRecoveryPos problemCountBeforeRecovery problemCount unitResult IProblem UnmatchedBracket unitResult getSourceStart maxRecoveryPos codeSnippetEnd maxRecoveryPos maxRecoveryPos maxRegularPos unitResult problemCountBeforeRecovery unitResult problemCount problemCountBeforeRecovery unitResult problemCount problemCountBeforeRecovery unitResult problemCount problemCount problemCountBeforeRecovery unitResult problemCount problemCount unitResult endParse
protected Name Reference get Unspecified Reference build a unspecified Name Reference which may be qualified if this scanner start Position this code Snippet Start this scanner start Position this code Snippet End 1 Util LINE SEPARATOR CHARS length 14838 int length Name Reference ref if length this identifier Length Stack this identifier Length Ptr 1 single variable reference ref new Code Snippet Single Name Reference this identifier Stack this identifier Ptr this identifier Position Stack this identifier Ptr this evaluation Context else Qualified variable reference char tokens new char length this identifier Ptr length System arraycopy this identifier Stack this identifier Ptr 1 tokens 0 length long positions new long length System arraycopy this identifier Position Stack this identifier Ptr 1 positions 0 length ref new Code Snippet Qualified Name Reference tokens positions int this identifier Position Stack this identifier Ptr 1 32 source Start int this identifier Position Stack this identifier Ptr length this evaluation Context source End return ref else return super get Unspecified Reference  NameReference getUnspecifiedReference NameReference startPosition codeSnippetStart startPosition codeSnippetEnd LINE_SEPARATOR_CHARS NameReference identifierLengthStack identifierLengthPtr CodeSnippetSingleNameReference identifierStack identifierPtr identifierPositionStack identifierPtr evaluationContext identifierPtr identifierStack identifierPtr identifierPositionStack identifierPtr CodeSnippetQualifiedNameReference identifierPositionStack identifierPtr sourceStart identifierPositionStack identifierPtr evaluationContext sourceEnd getUnspecifiedReference
protected Name Reference get Unspecified Reference Optimized build a unspecified Name Reference which may be qualified The optimization occurs for qualified reference while we are certain in this case the last item of the qualified name is a field access This optimization is IMPORTANT while it results that when a Name Reference is build the type checker should always look for that it is not a type reference if this scanner start Position this code Snippet Start this scanner start Position this code Snippet End 1 Util LINE SEPARATOR CHARS length 14838 int length Name Reference ref if length this identifier Length Stack this identifier Length Ptr 1 single variable reference ref new Code Snippet Single Name Reference this identifier Stack this identifier Ptr this identifier Position Stack this identifier Ptr this evaluation Context ref bits AST Node Restrictive FlagMASK ref bits LOCAL FIELD return ref Qualified variable reference In fact it is variable reference DOT field ref but it would result in a type conflict tha can be only reduce by making a superclass or inetrface between name Reference and Filed Reference or putting Field Reference under Name Reference or else This optimisation is not really relevant so just leave as it is char tokens new char length this identifier Ptr length System arraycopy this identifier Stack this identifier Ptr 1 tokens 0 length long positions new long length System arraycopy this identifier Position Stack this identifier Ptr 1 positions 0 length ref new Code Snippet Qualified Name Reference tokens positions int this identifier Position Stack this identifier Ptr 1 32 source Start int this identifier Position Stack this identifier Ptr length this evaluation Context source End ref bits AST Node Restrictive FlagMASK ref bits LOCAL FIELD return ref else return super get Unspecified Reference Optimized  NameReference getUnspecifiedReferenceOptimized NameReference NameReference startPosition codeSnippetStart startPosition codeSnippetEnd LINE_SEPARATOR_CHARS NameReference identifierLengthStack identifierLengthPtr CodeSnippetSingleNameReference identifierStack identifierPtr identifierPositionStack identifierPtr evaluationContext ASTNode RestrictiveFlagMASK nameReference FiledReference FieldReference NameReference identifierPtr identifierStack identifierPtr identifierPositionStack identifierPtr CodeSnippetQualifiedNameReference identifierPositionStack identifierPtr sourceStart identifierPositionStack identifierPtr evaluationContext sourceEnd ASTNode RestrictiveFlagMASK getUnspecifiedReferenceOptimized
protected void ignore Expression Assignment super ignore Expression Assignment recovery record Last Statement If Needed  ignoreExpressionAssignment ignoreExpressionAssignment recordLastStatementIfNeeded
Returns whether we are parsing a top level type or not private boolean is Top Level Type return this nested Type this diet 0 1  isTopLevelType nestedType
protected Message Send new Message Send Argument Listopt the arguments are on the expression stack Code Snippet Message Send m new Code Snippet Message Send this evaluation Context int length if length this expression Length Stack this expression Length Ptr 0 this expression Ptr length System arraycopy this expression Stack this expression Ptr 1 m arguments new Expression length 0 length return m  MessageSend newMessageSend ArgumentListopt CodeSnippetMessageSend CodeSnippetMessageSend evaluationContext expressionLengthStack expressionLengthPtr expressionPtr expressionStack expressionPtr
Records the scanner position if we re parsing a top level type private void record Last Statement If Needed if is Top Level Type this scanner start Position this code Snippet End Util LINE SEPARATOR CHARS length 14838 this last Statement this scanner start Position  recordLastStatementIfNeeded isTopLevelType startPosition codeSnippetEnd LINE_SEPARATOR_CHARS lastStatement startPosition
protected void report Syntax Errors boolean is Diet Parse int old First Token if is Diet Parse this scanner initial Position this last Statement this scanner eof Position this code Snippet End 1 stop after expression old First Token Token NameTWIDDLE Token NameREMAINDER first token of th expression parse super report Syntax Errors is Diet Parse old First Token  reportSyntaxErrors isDietParse oldFirstToken isDietParse initialPosition lastStatement eofPosition codeSnippetEnd oldFirstToken TokenNameTWIDDLE TokenNameREMAINDER reportSyntaxErrors isDietParse oldFirstToken
protected boolean resume On Syntax Error if this diet this has Recovered On Expression no reentering inside expression recovery return false record previous error in case more accurate than potential one in expression recovery e g return foo a a 1 3 this problem Count Before Recovery this compilation Unit compilation Result problem Count reposition for expression parsing if this last Statement 0 this last Statement this code Snippet Start no statement reduced prior to error point this scanner initial Position this last Statement this scanner start Position this last Statement this scanner current Position this last Statement this scanner eof Position this code Snippet End Integer MAX VALUE this code Snippet End 1 this code Snippet End stop after expression this scanner comment Ptr 1 reset stacks in consistent state this expression Ptr 1 this identifier Ptr 1 this identifier Length Ptr 1 go for the expression go For Expression this has Recovered On Expression true this has Reported Error false this has Error false return true  resumeOnSyntaxError hasRecoveredOnExpression problemCountBeforeRecovery compilationUnit compilationResult problemCount lastStatement lastStatement codeSnippetStart initialPosition lastStatement startPosition lastStatement currentPosition lastStatement eofPosition codeSnippetEnd MAX_VALUE codeSnippetEnd codeSnippetEnd commentPtr expressionPtr identifierPtr identifierLengthPtr goForExpression hasRecoveredOnExpression hasReportedError hasError

Field Binding delegate This Code Snippet Qualified Name Reference constructor comment param sources char param source Start int param source End int public Code Snippet Qualified Name Reference char sources long positions int source Start int source End Evaluation Context evaluation Context super sources positions source Start source End this evaluation Context evaluation Context  FieldBinding delegateThis CodeSnippetQualifiedNameReference sourceStart sourceEnd CodeSnippetQualifiedNameReference sourceStart sourceEnd EvaluationContext evaluationContext sourceStart sourceEnd evaluationContext evaluationContext
Check and or redirect the field access to the delegate receiver if any public Type Binding check Field Access Block Scope scope check for forward references this bits Restrictive FlagMASK clear bits this bits FIELD return get Other Field Bindings scope  TypeBinding checkFieldAccess BlockScope RestrictiveFlagMASK getOtherFieldBindings
public void generate Assignment Block Scope current Scope Code Stream code Stream Assignment assignment boolean value Required generate Read Sequence current Scope code Stream if this last Field Binding can Be Seen By get Receiver Type current Scope this current Scope the last field access is a write access assignment expression generate Code current Scope code Stream true field Store code Stream this last Field Binding null value Required else Code Snippet Code Stream code Stream generate Emulation For Field this last Field Binding code Stream swap assignment expression generate Code current Scope code Stream true if value Required if this last Field Binding type Long Binding this last Field Binding type Double Binding code Stream dup2 x2 else code Stream dup x2 Code Snippet Code Stream code Stream generate Emulated Write Access For Field this last Field Binding if value Required code Stream generate Implicit Conversion assignment implicit Conversion  generateAssignment BlockScope currentScope CodeStream codeStream valueRequired generateReadSequence currentScope codeStream lastFieldBinding canBeSeenBy getReceiverType currentScope currentScope generateCode currentScope codeStream fieldStore codeStream lastFieldBinding valueRequired CodeSnippetCodeStream codeStream generateEmulationForField lastFieldBinding codeStream generateCode currentScope codeStream valueRequired lastFieldBinding LongBinding lastFieldBinding DoubleBinding codeStream dup2_x2 codeStream dup_x2 CodeSnippetCodeStream codeStream generateEmulatedWriteAccessForField lastFieldBinding valueRequired codeStream generateImplicitConversion implicitConversion
public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if this constant NotA Constant if value Required code Stream generate Constant this constant this implicit Conversion else generate Read Sequence current Scope code Stream if value Required if this last Field Binding declaring Class null array length code Stream arraylength code Stream generate Implicit Conversion this implicit Conversion else if this last Field Binding constant NotA Constant if this last Field Binding is Static code Stream invoke Object Get Class code Stream pop inline the last field constant code Stream generate Constant this last Field Binding constant this implicit Conversion else if this last Field Binding can Be Seen By get Receiver Type current Scope this current Scope if this last Field Binding is Static code Stream getstatic this last Field Binding else code Stream getfield this last Field Binding else Code Snippet Code Stream code Stream generate Emulated Read Access For Field this last Field Binding code Stream generate Implicit Conversion this implicit Conversion else if this last Field Binding null this last Field Binding is Static code Stream invoke Object Get Class perform null check code Stream pop code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream NotAConstant valueRequired codeStream generateConstant implicitConversion generateReadSequence currentScope codeStream valueRequired lastFieldBinding declaringClass codeStream codeStream generateImplicitConversion implicitConversion lastFieldBinding NotAConstant lastFieldBinding isStatic codeStream invokeObjectGetClass codeStream codeStream generateConstant lastFieldBinding implicitConversion lastFieldBinding canBeSeenBy getReceiverType currentScope currentScope lastFieldBinding isStatic codeStream lastFieldBinding codeStream lastFieldBinding CodeSnippetCodeStream codeStream generateEmulatedReadAccessForField lastFieldBinding codeStream generateImplicitConversion implicitConversion lastFieldBinding lastFieldBinding isStatic codeStream invokeObjectGetClass codeStream codeStream recordPositionsFrom sourceStart
public void generate Compound Assignment Block Scope current Scope Code Stream code Stream Expression expression int operator int assignment Implicit Conversion boolean value Required generate Read Sequence current Scope code Stream if this last Field Binding can Be Seen By get Receiver Type current Scope this current Scope if this last Field Binding is Static code Stream getstatic this last Field Binding else code Stream dup code Stream getfield this last Field Binding the last field access is a write access perform the actual compound operation int operation TypeID if operation TypeID this implicit Conversion 4 T String code Stream generate String Append current Scope null expression else promote the array reference to the suitable operation type code Stream generate Implicit Conversion this implicit Conversion generate the increment value will by itself be promoted to the operation value if expression Int Literal One prefix operation code Stream generate Constant expression constant this implicit Conversion else expression generate Code current Scope code Stream true perform the operation code Stream send Operator operator operation TypeID cast the value back to the array reference type code Stream generate Implicit Conversion assignment Implicit Conversion actual assignment field Store code Stream this last Field Binding null value Required else if this last Field Binding is Static Code Snippet Code Stream code Stream generate Emulation For Field this last Field Binding code Stream swap code Stream aconst null code Stream swap Code Snippet Code Stream code Stream generate Emulated Read Access For Field this last Field Binding else Code Snippet Code Stream code Stream generate Emulation For Field this last Field Binding code Stream swap code Stream dup Code Snippet Code Stream code Stream generate Emulated Read Access For Field this last Field Binding the last field access is a write access perform the actual compound operation int operation TypeID if operation TypeID this implicit Conversion 4 T String code Stream generate String Append current Scope null expression else promote the array reference to the suitable operation type code Stream generate Implicit Conversion this implicit Conversion generate the increment value will by itself be promoted to the operation value if expression Int Literal One prefix operation code Stream generate Constant expression constant this implicit Conversion else expression generate Code current Scope code Stream true perform the operation code Stream send Operator operator operation TypeID cast the value back to the array reference type code Stream generate Implicit Conversion assignment Implicit Conversion actual assignment current stack is field receiver value if value Required if this last Field Binding type Long Binding this last Field Binding type Double Binding code Stream dup2 x2 else code Stream dup x2 current stack is value field receiver value Code Snippet Code Stream code Stream generate Emulated Write Access For Field this last Field Binding  generateCompoundAssignment BlockScope currentScope CodeStream codeStream assignmentImplicitConversion valueRequired generateReadSequence currentScope codeStream lastFieldBinding canBeSeenBy getReceiverType currentScope currentScope lastFieldBinding isStatic codeStream lastFieldBinding codeStream codeStream lastFieldBinding operationTypeID operationTypeID implicitConversion T_String codeStream generateStringAppend currentScope codeStream generateImplicitConversion implicitConversion IntLiteral codeStream generateConstant implicitConversion generateCode currentScope codeStream codeStream sendOperator operationTypeID codeStream generateImplicitConversion assignmentImplicitConversion fieldStore codeStream lastFieldBinding valueRequired lastFieldBinding isStatic CodeSnippetCodeStream codeStream generateEmulationForField lastFieldBinding codeStream codeStream aconst_null codeStream CodeSnippetCodeStream codeStream generateEmulatedReadAccessForField lastFieldBinding CodeSnippetCodeStream codeStream generateEmulationForField lastFieldBinding codeStream codeStream CodeSnippetCodeStream codeStream generateEmulatedReadAccessForField lastFieldBinding operationTypeID operationTypeID implicitConversion T_String codeStream generateStringAppend currentScope codeStream generateImplicitConversion implicitConversion IntLiteral codeStream generateConstant implicitConversion generateCode currentScope codeStream codeStream sendOperator operationTypeID codeStream generateImplicitConversion assignmentImplicitConversion valueRequired lastFieldBinding LongBinding lastFieldBinding DoubleBinding codeStream dup2_x2 codeStream dup_x2 CodeSnippetCodeStream codeStream generateEmulatedWriteAccessForField lastFieldBinding
public void generate Post Increment Block Scope current Scope Code Stream code Stream Compound Assignment post Increment boolean value Required generate Read Sequence current Scope code Stream if this last Field Binding can Be Seen By get Receiver Type current Scope this current Scope if this last Field Binding is Static code Stream getstatic this last Field Binding else code Stream dup code Stream getfield this last Field Binding duplicate the old field value if value Required if this last Field Binding is Static if this last Field Binding type Long Binding this last Field Binding type Double Binding code Stream dup2 else code Stream dup else Stack owner old field value old field value owner old field value if this last Field Binding type Long Binding this last Field Binding type Double Binding code Stream dup2 x1 else code Stream dup x1 code Stream generate Constant post Increment expression constant this implicit Conversion code Stream send Operator post Increment operator this last Field Binding type id code Stream generate Implicit Conversion post Increment assignment Implicit Conversion field Store code Stream this last Field Binding null false else Code Snippet Code Stream code Stream generate Emulated Read Access For Field this last Field Binding if value Required if this last Field Binding type Long Binding this last Field Binding type Double Binding code Stream dup2 else code Stream dup Code Snippet Code Stream code Stream generate Emulation For Field this last Field Binding if this last Field Binding type Long Binding this last Field Binding type Double Binding code Stream dup x2 code Stream pop if this last Field Binding is Static code Stream aconst null else generate Read Sequence current Scope code Stream code Stream dup x2 code Stream pop else code Stream dup x1 code Stream pop if this last Field Binding is Static code Stream aconst null else generate Read Sequence current Scope code Stream code Stream dup x1 code Stream pop code Stream generate Constant post Increment expression constant this implicit Conversion code Stream send Operator post Increment operator this last Field Binding type id code Stream generate Implicit Conversion post Increment assignment Implicit Conversion Code Snippet Code Stream code Stream generate Emulated Write Access For Field this last Field Binding  generatePostIncrement BlockScope currentScope CodeStream codeStream CompoundAssignment postIncrement valueRequired generateReadSequence currentScope codeStream lastFieldBinding canBeSeenBy getReceiverType currentScope currentScope lastFieldBinding isStatic codeStream lastFieldBinding codeStream codeStream lastFieldBinding valueRequired lastFieldBinding isStatic lastFieldBinding LongBinding lastFieldBinding DoubleBinding codeStream codeStream lastFieldBinding LongBinding lastFieldBinding DoubleBinding codeStream dup2_x1 codeStream dup_x1 codeStream generateConstant postIncrement implicitConversion codeStream sendOperator postIncrement lastFieldBinding codeStream generateImplicitConversion postIncrement assignmentImplicitConversion fieldStore codeStream lastFieldBinding CodeSnippetCodeStream codeStream generateEmulatedReadAccessForField lastFieldBinding valueRequired lastFieldBinding LongBinding lastFieldBinding DoubleBinding codeStream codeStream CodeSnippetCodeStream codeStream generateEmulationForField lastFieldBinding lastFieldBinding LongBinding lastFieldBinding DoubleBinding codeStream dup_x2 codeStream lastFieldBinding isStatic codeStream aconst_null generateReadSequence currentScope codeStream codeStream dup_x2 codeStream codeStream dup_x1 codeStream lastFieldBinding isStatic codeStream aconst_null generateReadSequence currentScope codeStream codeStream dup_x1 codeStream codeStream generateConstant postIncrement implicitConversion codeStream sendOperator postIncrement lastFieldBinding codeStream generateImplicitConversion postIncrement assignmentImplicitConversion CodeSnippetCodeStream codeStream generateEmulatedWriteAccessForField lastFieldBinding
public void generate Read Sequence Block Scope current Scope Code Stream code Stream determine the rank until which we now we do not need any actual value for the field access int other Bindings Count this other Codegen Bindings null 0 this other Codegen Bindings length boolean need Value other Bindings Count 0 this other Bindings 0 is Static switch this bits Restrictive FlagMASK case FIELD this last Field Binding Field Binding this codegen Binding if first field is actually constant we can inline it if this last Field Binding constant NotA Constant break if need Value if this last Field Binding can Be Seen By get Receiver Type current Scope this current Scope if this last Field Binding is Static if this bits DepthMASK 0 Reference Binding target Type current Scope enclosing Source Type enclosing Type At this bits DepthMASK DepthSHIFT Object emulation Path current Scope get Emulation Path target Type true only exact match false consider enclosing arg if emulation Path null internal error per construction we should have found it current Scope problem Reporter need Implementation else code Stream generate Outer Access emulation Path this target Type current Scope else generate Receiver code Stream else if this last Field Binding is Static if this bits DepthMASK 0 internal error per construction we should have found it not yet supported current Scope problem Reporter need Implementation else generate Receiver code Stream else code Stream aconst null break case LOCAL reading the first local variable if need Value break no value needed this last Field Binding null Local Variable Binding local Binding Local Variable Binding this codegen Binding regular local variable read if local Binding constant NotA Constant code Stream generate Constant local Binding constant 0 no implicit conversion else outer local if this bits DepthMASK 0 outer local can be reached either through a synthetic arg or a synthetic field Variable Binding path current Scope get Emulation Path local Binding if path null emulation was not possible should not happen per construction current Scope problem Reporter need Implementation else code Stream generate Outer Access path this local Binding current Scope else code Stream load local Binding all intermediate field accesses are read accesses only the last field binding is a write access if this other Codegen Bindings null for int i 0 i other Bindings Count i Field Binding next Field this other Codegen Bindings i if this last Field Binding null need Value next Field is Static if need Value if this last Field Binding can Be Seen By get Receiver Type current Scope this current Scope if this last Field Binding constant NotA Constant if this last Field Binding this codegen Binding this last Field Binding is Static code Stream invoke Object Get Class perform null check code Stream pop code Stream generate Constant this last Field Binding constant 0 else if this last Field Binding is Static code Stream getstatic this last Field Binding else code Stream getfield this last Field Binding else Code Snippet Code Stream code Stream generate Emulated Read Access For Field this last Field Binding else if this codegen Binding this last Field Binding this last Field Binding is Static code Stream invoke Object Get Class perform null check code Stream pop this last Field Binding next Field if this last Field Binding null this last Field Binding can Be Seen By get Receiver Type current Scope this current Scope if this last Field Binding is Static code Stream aconst null  generateReadSequence BlockScope currentScope CodeStream codeStream otherBindingsCount otherCodegenBindings otherCodegenBindings needValue otherBindingsCount otherBindings isStatic RestrictiveFlagMASK lastFieldBinding FieldBinding codegenBinding lastFieldBinding NotAConstant needValue lastFieldBinding canBeSeenBy getReceiverType currentScope currentScope lastFieldBinding isStatic ReferenceBinding targetType currentScope enclosingSourceType enclosingTypeAt emulationPath currentScope getEmulationPath targetType emulationPath currentScope problemReporter needImplementation codeStream generateOuterAccess emulationPath targetType currentScope generateReceiver codeStream lastFieldBinding isStatic currentScope problemReporter needImplementation generateReceiver codeStream codeStream aconst_null needValue lastFieldBinding LocalVariableBinding localBinding LocalVariableBinding codegenBinding localBinding NotAConstant codeStream generateConstant localBinding VariableBinding currentScope getEmulationPath localBinding currentScope problemReporter needImplementation codeStream generateOuterAccess localBinding currentScope codeStream localBinding otherCodegenBindings otherBindingsCount FieldBinding nextField otherCodegenBindings lastFieldBinding needValue nextField isStatic needValue lastFieldBinding canBeSeenBy getReceiverType currentScope currentScope lastFieldBinding NotAConstant lastFieldBinding codegenBinding lastFieldBinding isStatic codeStream invokeObjectGetClass codeStream codeStream generateConstant lastFieldBinding lastFieldBinding isStatic codeStream lastFieldBinding codeStream lastFieldBinding CodeSnippetCodeStream codeStream generateEmulatedReadAccessForField lastFieldBinding codegenBinding lastFieldBinding lastFieldBinding isStatic codeStream invokeObjectGetClass codeStream lastFieldBinding nextField lastFieldBinding lastFieldBinding canBeSeenBy getReceiverType currentScope currentScope lastFieldBinding isStatic codeStream aconst_null
public void generate Receiver Code Stream code Stream code Stream aload 0 if this delegate This null code Stream getfield this delegate This delegated field access  generateReceiver CodeStream codeStream codeStream aload_0 delegateThis codeStream delegateThis
public Type Binding get Other Field Bindings Block Scope scope At this point restrictive Flag may ONLY have two potential value FIELD LOCAL i e cast Variable Binding binding is valid int length this tokens length if this bits FIELD 0 if Field Binding this binding is Static must check for the static status if this index Of First Field Binding 1 the field is the first token of the qualified reference if scope method Scope is Static scope problem Reporter static Field Access To Non Static Variable this Field Binding this binding return null else accessing to a field using a type as receiver is allowed only with static field scope problem Reporter static Field Access To Non Static Variable this Field Binding this binding return null only last field is actually a write access if any if is Field Use Deprecated Field Binding this binding scope this bits Is Strictly AssignedMASK 0 this index Of First Field Binding length scope problem Reporter deprecated Field Field Binding this binding this Type Binding type Variable Binding this binding type int index this index Of First Field Binding if index length restrictive Flag FIELD this constant Field Reference get Constant For Field Binding this binding this false scope return type allocation of the field Bindings array and its respective constants int other Bindings Length length index this other Codegen Bindings this other Bindings new Field Binding other Bindings Length fill the first constant the one of the binding this constant this bits FIELD 0 Field Reference get Constant For Field Binding this binding this false scope Variable Binding this binding constant iteration on each field while index length char token this tokens index if type null return null could not resolve type prior to this point Field Binding field scope get Field type token this int place index this index Of First Field Binding this other Bindings place field if field is Valid Binding try to retrieve the field as private field Code Snippet Scope local Scope new Code Snippet Scope scope if this delegate This null if this evaluation Context declaring Type Name null this delegate This scope get Field scope enclosing Source Type DELEGATE THIS this if this delegate This null if not found then internal error field should have been found return super report Error scope else this constant NotA Constant don t fill other constants slots scope problem Reporter invalid Field this field index type return null field local Scope get Field For Code Snippet this delegate This type token this this other Bindings place field if field is Valid Binding only last field is actually a write access if any if is Field Use Deprecated field scope this bits Is Strictly AssignedMASK 0 index 1 length scope problem Reporter deprecated Field field this Constant some Constant Field Reference get Constant For field this false scope constant propagation can only be performed as long as the previous one is a constant too if this constant NotA Constant this constant some Constant type field type index else this constant NotA Constant don t fill other constants slots scope problem Reporter invalid Field this field index type return null return this other Bindings other Bindings Length 1 type  TypeBinding getOtherFieldBindings BlockScope restrictiveFlag VariableBinding FieldBinding isStatic indexOfFirstFieldBinding methodScope isStatic problemReporter staticFieldAccessToNonStaticVariable FieldBinding problemReporter staticFieldAccessToNonStaticVariable FieldBinding isFieldUseDeprecated FieldBinding IsStrictlyAssignedMASK indexOfFirstFieldBinding problemReporter deprecatedField FieldBinding TypeBinding VariableBinding indexOfFirstFieldBinding restrictiveFlag FieldReference getConstantFor FieldBinding fieldBindings otherBindingsLength otherCodegenBindings otherBindings FieldBinding otherBindingsLength FieldReference getConstantFor FieldBinding VariableBinding FieldBinding getField indexOfFirstFieldBinding otherBindings isValidBinding CodeSnippetScope localScope CodeSnippetScope delegateThis evaluationContext declaringTypeName delegateThis getField enclosingSourceType DELEGATE_THIS delegateThis reportError NotAConstant problemReporter invalidField localScope getFieldForCodeSnippet delegateThis otherBindings isValidBinding isFieldUseDeprecated IsStrictlyAssignedMASK problemReporter deprecatedField someConstant FieldReference getConstantFor NotAConstant someConstant NotAConstant problemReporter invalidField otherBindings otherBindingsLength
Check and or redirect the field access to the delegate receiver if any public Type Binding get Receiver Type Block Scope current Scope if this receiver Type null return this receiver Type Scope scope current Scope parent while true switch scope kind case Scope CLASS SCOPE return this receiver Type Class Scope scope reference Context binding default scope scope parent  TypeBinding getReceiverType BlockScope currentScope receiverType receiverType currentScope CLASS_SCOPE receiverType ClassScope referenceContext
public void manage Synthetic Read Access If Necessary Block Scope current Scope Field Binding field Binding Type Binding last Receiver Type int index Flow Info flow Info if flow Info is Reachable return if the binding declaring class is not visible need special action for runtime compatibility on 1 2 V Ms change the declaring class of the binding NOTE from target 1 2 on field s declaring class is touched if any different from receiver type boolean use Delegate index 0 this delegate This null if use Delegate last Receiver Type this delegate This type if field Binding declaring Class last Receiver Type last Receiver Type is Array Type field Binding declaring Class null field Binding constant NotA Constant current Scope environment options targetJDK Class File Constants JDK1 2 index 0 this index Of First Field Binding 1 field Binding is Static field Binding declaring Class id T Object use Delegate new Code Snippet Scope current Scope can Be Seen By For Code Snippet field Binding declaring Class Reference Binding this delegate This type field Binding declaring Class can Be Seen By current Scope if index 0 this codegen Binding current Scope enclosing Source Type get Updated Field Binding field Binding Reference Binding last Receiver Type else if this other Codegen Bindings this other Bindings int l this other Bindings length System arraycopy this other Bindings 0 this other Codegen Bindings new Field Binding l 0 l this other Codegen Bindings index 1 current Scope enclosing Source Type get Updated Field Binding field Binding Reference Binding last Receiver Type  manageSyntheticReadAccessIfNecessary BlockScope currentScope FieldBinding fieldBinding TypeBinding lastReceiverType FlowInfo flowInfo flowInfo isReachable VMs useDelegate delegateThis useDelegate lastReceiverType delegateThis fieldBinding declaringClass lastReceiverType lastReceiverType isArrayType fieldBinding declaringClass fieldBinding NotAConstant currentScope ClassFileConstants JDK1_2 indexOfFirstFieldBinding fieldBinding isStatic fieldBinding declaringClass T_Object useDelegate CodeSnippetScope currentScope canBeSeenByForCodeSnippet fieldBinding declaringClass ReferenceBinding delegateThis fieldBinding declaringClass canBeSeenBy currentScope codegenBinding currentScope enclosingSourceType getUpdatedFieldBinding fieldBinding ReferenceBinding lastReceiverType otherCodegenBindings otherBindings otherBindings otherBindings otherCodegenBindings FieldBinding otherCodegenBindings currentScope enclosingSourceType getUpdatedFieldBinding fieldBinding ReferenceBinding lastReceiverType
public void manage Synthetic Write Access If Necessary Block Scope current Scope Field Binding field Binding Type Binding last Receiver Type Flow Info flow Info if flow Info is Reachable return if the binding declaring class is not visible need special action for runtime compatibility on 1 2 V Ms change the declaring class of the binding NOTE from target 1 2 on field s declaring class is touched if any different from receiver type boolean use Delegate field Binding this binding this delegate This null if use Delegate last Receiver Type this delegate This type if field Binding declaring Class last Receiver Type last Receiver Type is Array Type field Binding declaring Class null field Binding constant NotA Constant current Scope environment options targetJDK Class File Constants JDK1 2 field Binding this binding this index Of First Field Binding 1 field Binding is Static field Binding declaring Class id T Object use Delegate new Code Snippet Scope current Scope can Be Seen By For Code Snippet field Binding declaring Class Reference Binding this delegate This type field Binding declaring Class can Be Seen By current Scope if field Binding this binding this codegen Binding current Scope enclosing Source Type get Updated Field Binding field Binding Reference Binding last Receiver Type else if this other Codegen Bindings this other Bindings int l this other Bindings length System arraycopy this other Bindings 0 this other Codegen Bindings new Field Binding l 0 l this other Codegen Bindings this other Codegen Bindings length 1 current Scope enclosing Source Type get Updated Field Binding field Binding Reference Binding last Receiver Type  manageSyntheticWriteAccessIfNecessary BlockScope currentScope FieldBinding fieldBinding TypeBinding lastReceiverType FlowInfo flowInfo flowInfo isReachable VMs useDelegate fieldBinding delegateThis useDelegate lastReceiverType delegateThis fieldBinding declaringClass lastReceiverType lastReceiverType isArrayType fieldBinding declaringClass fieldBinding NotAConstant currentScope ClassFileConstants JDK1_2 fieldBinding indexOfFirstFieldBinding fieldBinding isStatic fieldBinding declaringClass T_Object useDelegate CodeSnippetScope currentScope canBeSeenByForCodeSnippet fieldBinding declaringClass ReferenceBinding delegateThis fieldBinding declaringClass canBeSeenBy currentScope fieldBinding codegenBinding currentScope enclosingSourceType getUpdatedFieldBinding fieldBinding ReferenceBinding lastReceiverType otherCodegenBindings otherBindings otherBindings otherBindings otherCodegenBindings FieldBinding otherCodegenBindings otherCodegenBindings currentScope enclosingSourceType getUpdatedFieldBinding fieldBinding ReferenceBinding lastReceiverType
Normal field binding did not work try to bind to a field of the delegate receiver public Type Binding report Error Block Scope scope if this evaluation Context declaring Type Name null this delegate This scope get Field scope enclosing Source Type DELEGATE THIS this if this delegate This null if not found then internal error field should have been found return super report Error scope else return super report Error scope if this binding instanceof Problem Field Binding Problem Field Binding this binding problem Id Not Found this binding instanceof Problem Binding Problem Binding this binding problem Id Not Found will not support innerclass emulation inside delegate Field Binding field Binding scope get Field this delegate This type this tokens 0 this if field Binding is Valid Binding if Problem Field Binding field Binding problem Id Not Visible manage the access to a private field of the enclosing type Code Snippet Scope local Scope new Code Snippet Scope scope this codegen Binding this binding local Scope get Field For Code Snippet this delegate This type this tokens 0 this if this binding is Valid Binding return check Field Access scope else return super report Error scope else return super report Error scope this codegen Binding this binding field Binding return check Field Access scope Type Binding result if this binding instanceof Problem Field Binding Problem Field Binding this binding problem Id Not Visible result resolve Type Visibility scope if result null return super report Error scope if result is Valid Binding return result return super report Error scope  TypeBinding reportError BlockScope evaluationContext declaringTypeName delegateThis getField enclosingSourceType DELEGATE_THIS delegateThis reportError reportError ProblemFieldBinding ProblemFieldBinding problemId NotFound ProblemBinding ProblemBinding problemId NotFound FieldBinding fieldBinding getField delegateThis fieldBinding isValidBinding ProblemFieldBinding fieldBinding problemId NotVisible CodeSnippetScope localScope CodeSnippetScope codegenBinding localScope getFieldForCodeSnippet delegateThis isValidBinding checkFieldAccess reportError reportError codegenBinding fieldBinding checkFieldAccess TypeBinding ProblemFieldBinding ProblemFieldBinding problemId NotVisible resolveTypeVisibility reportError isValidBinding reportError
public Type Binding resolve Type Visibility Block Scope scope field and or local are done before type lookups the only available value for the restrictive Flag BEFORE the TC is Flag Type Flag LocalField and Flag TypeLocalField Code Snippet Scope local Scope new Code Snippet Scope scope if this codegen Binding this binding local Scope get Binding this tokens this bits Restrictive FlagMASK this Reference Binding this delegate This type is Valid Binding this bits Restrictive FlagMASK clear bits this bits FIELD return get Other Field Bindings scope error cases return super report Error scope  TypeBinding resolveTypeVisibility BlockScope restrictiveFlag Flag_Type Flag_LocalField Flag_TypeLocalField CodeSnippetScope localScope CodeSnippetScope codegenBinding localScope getBinding RestrictiveFlagMASK ReferenceBinding delegateThis isValidBinding RestrictiveFlagMASK getOtherFieldBindings reportError

public class Code Snippet Return Statement extends Return Statement implements Invocation Site Evaluation Constants Method Binding set Result Method public Code Snippet Return Statement Expression expr int s int e super expr s e  CodeSnippetReturnStatement ReturnStatement InvocationSite EvaluationConstants MethodBinding setResultMethod CodeSnippetReturnStatement
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info Flow Info info super analyse Code current Scope flow Context flow Info we need to remove this optimization in order to prevent the inlining of the return bytecode 1GH0AU7 ITPJCORE ALL Eval Verify Error in scrapbook page this expression bits Value For ReturnMASK return info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo FlowInfo analyseCode currentScope flowContext flowInfo VerifyError ValueForReturnMASK
Dump the suitable return bytecode for a return statement public void generate Return Bytecode Code Stream code Stream output the return bytecode code Stream return   generateReturnBytecode CodeStream codeStream codeStream return_
public void generate Store Save Value If Necessary Code Stream code Stream push receiver code Stream aload 0 push the 2 parameters of set Result Object Class if this expression null this expression Type Void Binding expression Type Void Binding if code snippet is the expression System out println push null code Stream aconst null void class code Stream generate Class Literal Access For Type Void Binding null else swap with expression int value TypeID this expression Type id if value TypeID T long value TypeID T double code Stream dup x2 code Stream pop else code Stream swap generate wrapper if needed if this expression Type is Base Type this expression Type Null Binding Code Snippet Code Stream code Stream generate Object Wrapper For Type this expression Type generate the expression type code Stream generate Class Literal Access For Type this expression Type null generate the invoke virtual to set Result Object Class code Stream invokevirtual this set Result Method  generateStoreSaveValueIfNecessary CodeStream codeStream codeStream aload_0 setResult expressionType VoidBinding expressionType VoidBinding codeStream aconst_null codeStream generateClassLiteralAccessForType VoidBinding valueTypeID expressionType valueTypeID T_long valueTypeID T_double codeStream dup_x2 codeStream codeStream expressionType isBaseType expressionType NullBinding CodeSnippetCodeStream codeStream generateObjectWrapperForType expressionType codeStream generateClassLiteralAccessForType expressionType setResult codeStream setResultMethod
code Stream invokevirtual this set Result Method public boolean is Super Access return false  codeStream setResultMethod isSuperAccess
return false public boolean is Type Access return false  isTypeAccess
return false public boolean need Value return true  needValue
return true public void prepare Save Value Location Try Statement target Try Statement do nothing no storage is necessary for snippets  prepareSaveValueLocation TryStatement targetTryStatement
public void resolve Block Scope scope if this expression null if this expression Type this expression resolve Type scope null Type Binding java Lang Class scope get Java Lang Class if java Lang Class is Valid Binding scope problem Reporter code Snippet Missing Class java lang Class this source Start this source End NON NLS 1 return Type Binding java Lang Object scope get Java Lang Object if java Lang Object is Valid Binding scope problem Reporter code Snippet Missing Class java lang Object this source Start this source End NON NLS 1 return Type Binding argument Types new Type Binding java Lang Object java Lang Class this set Result Method scope get Implicit Method SETRESULT SELECTOR argument Types this if this set Result Method is Valid Binding scope problem Reporter code Snippet Missing Method ROOT FULL CLASS NAME new String SETRESULT SELECTOR new String SETRESULT ARGUMENTS this source Start this source End return in constant case the implicit conversion cannot be left uninitialized if this expression constant NotA Constant fake no implicit conversion the return type is always void this expression implicit Conversion this expression constant typeID 4  BlockScope expressionType resolveType TypeBinding javaLangClass getJavaLangClass javaLangClass isValidBinding problemReporter codeSnippetMissingClass sourceStart sourceEnd TypeBinding javaLangObject getJavaLangObject javaLangObject isValidBinding problemReporter codeSnippetMissingClass sourceStart sourceEnd TypeBinding argumentTypes TypeBinding javaLangObject javaLangClass setResultMethod getImplicitMethod SETRESULT_SELECTOR argumentTypes setResultMethod isValidBinding problemReporter codeSnippetMissingMethod ROOT_FULL_CLASS_NAME SETRESULT_SELECTOR SETRESULT_ARGUMENTS sourceStart sourceEnd NotAConstant implicitConversion
public void set Actual Receiver Type Reference Binding receiver Type ignored  setActualReceiverType ReferenceBinding receiverType
ignored public void set Depth int depth ignored  setDepth
ignored public void set Field Index int depth ignored  setFieldIndex

public class Code Snippet Scope extends Block Scope Code Snippet Scope constructor comment param kind int param parent org eclipse jdt internal compiler lookup Scope protected Code Snippet Scope int kind Scope parent super kind parent  CodeSnippetScope BlockScope CodeSnippetScope CodeSnippetScope
Code Snippet Scope constructor comment param parent org eclipse jdt internal compiler lookup Block Scope public Code Snippet Scope Block Scope parent super parent  CodeSnippetScope BlockScope CodeSnippetScope BlockScope
Code Snippet Scope constructor comment param parent org eclipse jdt internal compiler lookup Block Scope param variable Count int public Code Snippet Scope Block Scope parent int variable Count super parent variable Count  CodeSnippetScope BlockScope variableCount CodeSnippetScope BlockScope variableCount variableCount
public final boolean can Be Seen By For Code Snippet Field Binding field Binding Type Binding receiver Type Invocation Site invocation Site Scope scope if field Binding is Public return true Reference Binding invocation Type Reference Binding receiver Type if invocation Type field Binding declaring Class return true if field Binding is Protected answer true if the invocation Type is the declaring Class or they are in the same package OR the invocation Type is a subclass of the declaring Class AND the receiver Type is the invocation Type or its subclass OR the field is a static field accessed directly through a type if invocation Type field Binding declaring Class return true if invocation Type f Package field Binding declaring Class f Package return true if field Binding declaring Class is Superclass Of invocation Type if invocation Site is Super Access return true receiver Type can be an array binding in one case see if you can change it if receiver Type instanceof Array Binding return false if invocation Type receiver Type invocation Type is Superclass Of Reference Binding receiver Type return true if field Binding is Static return true see 1FMEPDL return invocation Site is Type Access return false if field Binding is Private answer true if the receiver Type is the declaring Class AND the invocation Type and the declaring Class have a common enclosing Type if receiver Type field Binding declaring Class return false if invocation Type field Binding declaring Class Reference Binding outer Invocation Type invocation Type Reference Binding temp outer Invocation Type enclosing Type while temp null outer Invocation Type temp temp temp enclosing Type Reference Binding outer Declaring Class field Binding declaring Class temp outer Declaring Class enclosing Type while temp null outer Declaring Class temp temp temp enclosing Type if outer Invocation Type outer Declaring Class return false return true is Default if invocation Type f Package field Binding declaring Class f Package return false receiver Type can be an array binding in one case see if you can change it if receiver Type instanceof Array Binding return false Reference Binding type Reference Binding receiver Type Package Binding declaring Package field Binding declaring Class f Package do if field Binding declaring Class type return true if declaring Package type f Package return false while type type superclass null return false  canBeSeenByForCodeSnippet FieldBinding fieldBinding TypeBinding receiverType InvocationSite invocationSite fieldBinding isPublic ReferenceBinding invocationType ReferenceBinding receiverType invocationType fieldBinding declaringClass fieldBinding isProtected invocationType declaringClass invocationType declaringClass receiverType invocationType invocationType fieldBinding declaringClass invocationType fPackage fieldBinding declaringClass fPackage fieldBinding declaringClass isSuperclassOf invocationType invocationSite isSuperAccess receiverType receiverType ArrayBinding invocationType receiverType invocationType isSuperclassOf ReferenceBinding receiverType fieldBinding isStatic invocationSite isTypeAccess fieldBinding isPrivate receiverType declaringClass invocationType declaringClass enclosingType receiverType fieldBinding declaringClass invocationType fieldBinding declaringClass ReferenceBinding outerInvocationType invocationType ReferenceBinding outerInvocationType enclosingType outerInvocationType enclosingType ReferenceBinding outerDeclaringClass fieldBinding declaringClass outerDeclaringClass enclosingType outerDeclaringClass enclosingType outerInvocationType outerDeclaringClass isDefault invocationType fPackage fieldBinding declaringClass fPackage receiverType receiverType ArrayBinding ReferenceBinding ReferenceBinding receiverType PackageBinding declaringPackage fieldBinding declaringClass fPackage fieldBinding declaringClass declaringPackage fPackage
public final boolean can Be Seen By For Code Snippet Method Binding method Binding Type Binding receiver Type Invocation Site invocation Site Scope scope if method Binding is Public return true Reference Binding invocation Type Reference Binding receiver Type if invocation Type method Binding declaring Class invocation Type receiver Type return true if method Binding is Protected answer true if the invocation Type is the declaring Class or they are in the same package OR the invocation Type is a subclass of the declaring Class AND the receiver Type is the invocation Type or its subclass OR the method is a static method accessed directly through a type if invocation Type method Binding declaring Class return true if invocation Type f Package method Binding declaring Class f Package return true if method Binding declaring Class is Superclass Of invocation Type if invocation Site is Super Access return true receiver Type can be an array binding in one case see if you can change it if receiver Type instanceof Array Binding return false if invocation Type receiver Type invocation Type is Superclass Of Reference Binding receiver Type return true if method Binding is Static return true see 1FMEPDL return invocation Site is Type Access return false if method Binding is Private answer true if the receiver Type is the declaring Class AND the invocation Type and the declaring Class have a common enclosing Type if receiver Type method Binding declaring Class return false if invocation Type method Binding declaring Class Reference Binding outer Invocation Type invocation Type Reference Binding temp outer Invocation Type enclosing Type while temp null outer Invocation Type temp temp temp enclosing Type Reference Binding outer Declaring Class method Binding declaring Class temp outer Declaring Class enclosing Type while temp null outer Declaring Class temp temp temp enclosing Type if outer Invocation Type outer Declaring Class return false return true is Default if invocation Type f Package method Binding declaring Class f Package return false receiver Type can be an array binding in one case see if you can change it if receiver Type instanceof Array Binding return false Reference Binding type Reference Binding receiver Type Package Binding declaring Package method Binding declaring Class f Package do if method Binding declaring Class type return true if declaring Package type f Package return false while type type superclass null return false  canBeSeenByForCodeSnippet MethodBinding methodBinding TypeBinding receiverType InvocationSite invocationSite methodBinding isPublic ReferenceBinding invocationType ReferenceBinding receiverType invocationType methodBinding declaringClass invocationType receiverType methodBinding isProtected invocationType declaringClass invocationType declaringClass receiverType invocationType invocationType methodBinding declaringClass invocationType fPackage methodBinding declaringClass fPackage methodBinding declaringClass isSuperclassOf invocationType invocationSite isSuperAccess receiverType receiverType ArrayBinding invocationType receiverType invocationType isSuperclassOf ReferenceBinding receiverType methodBinding isStatic invocationSite isTypeAccess methodBinding isPrivate receiverType declaringClass invocationType declaringClass enclosingType receiverType methodBinding declaringClass invocationType methodBinding declaringClass ReferenceBinding outerInvocationType invocationType ReferenceBinding outerInvocationType enclosingType outerInvocationType enclosingType ReferenceBinding outerDeclaringClass methodBinding declaringClass outerDeclaringClass enclosingType outerDeclaringClass enclosingType outerInvocationType outerDeclaringClass isDefault invocationType fPackage methodBinding declaringClass fPackage receiverType receiverType ArrayBinding ReferenceBinding ReferenceBinding receiverType PackageBinding declaringPackage methodBinding declaringClass fPackage methodBinding declaringClass declaringPackage fPackage
public final boolean can Be Seen By For Code Snippet Reference Binding reference Binding Reference Binding receiver Type if reference Binding is Public return true if receiver Type reference Binding return true if reference Binding is Protected answer true if the receiver or its enclosing type is the superclass of the receiver Type or in the same package return receiver Type f Package reference Binding f Package reference Binding is Superclass Of receiver Type reference Binding enclosing Type is Superclass Of receiver Type protected types always have an enclosing one if reference Binding is Private answer true if the receiver and the receiver Type have a common enclosing Type already know they are not the identical type Reference Binding outer Invocation Type receiver Type Reference Binding temp outer Invocation Type enclosing Type while temp null outer Invocation Type temp temp temp enclosing Type Reference Binding outer Declaring Class reference Binding temp outer Declaring Class enclosing Type while temp null outer Declaring Class temp temp temp enclosing Type return outer Invocation Type outer Declaring Class is Default return receiver Type f Package reference Binding f Package  canBeSeenByForCodeSnippet ReferenceBinding referenceBinding ReferenceBinding receiverType referenceBinding isPublic receiverType referenceBinding referenceBinding isProtected receiverType receiverType fPackage referenceBinding fPackage referenceBinding isSuperclassOf receiverType referenceBinding enclosingType isSuperclassOf receiverType referenceBinding isPrivate receiverType enclosingType ReferenceBinding outerInvocationType receiverType ReferenceBinding outerInvocationType enclosingType outerInvocationType enclosingType ReferenceBinding outerDeclaringClass referenceBinding outerDeclaringClass enclosingType outerDeclaringClass enclosingType outerInvocationType outerDeclaringClass isDefault receiverType fPackage referenceBinding fPackage
Internal use only public Method Binding find Exact Method Reference Binding receiver Type char selector Type Binding argument Types Invocation Site invocation Site Method Binding exact Method receiver Type get Exact Method selector argument Types if exact Method null if receiver Type is Interface can Be Seen By For Code Snippet exact Method receiver Type invocation Site this return exact Method return null  MethodBinding findExactMethod ReferenceBinding receiverType TypeBinding argumentTypes InvocationSite invocationSite MethodBinding exactMethod receiverType getExactMethod argumentTypes exactMethod receiverType isInterface canBeSeenByForCodeSnippet exactMethod receiverType invocationSite exactMethod
public Field Binding find Field For Code Snippet Type Binding receiver Type char field Name Invocation Site invocation Site if receiver Type is Base Type return null if receiver Type is Array Type Type Binding leaf Type receiver Type leaf Component Type if leaf Type instanceof Reference Binding if Reference Binding leaf Type can Be Seen By this return new Problem Field Binding Reference Binding leaf Type field Name Receiver Type Not Visible if Char Operation equals field Name LENGTH return Array Binding Array Length return null Reference Binding current Type Reference Binding receiver Type if current Type can Be Seen By this return new Problem Field Binding current Type field Name Receiver Type Not Visible Field Binding field current Type get Field field Name true resolve if field null if can Be Seen By For Code Snippet field current Type invocation Site this return field else return new Problem Field Binding field closest match field declaring Class field Name Not Visible collect all superinterfaces of receiver Type until the field is found in a supertype Reference Binding interfaces To Visit null int last Position 1 Field Binding visible Field null boolean keep Looking true boolean not Visible false we could hold onto the not visible field for extra error reporting while keep Looking Reference Binding its Interfaces current Type super Interfaces if its Interfaces No Super Interfaces if interfaces To Visit null interfaces To Visit new Reference Binding 5 if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces if current Type current Type superclass null break if field current Type get Field field Name true resolve null keep Looking false if can Be Seen By For Code Snippet field receiver Type invocation Site this if visible Field null visible Field field else return new Problem Field Binding visible Field declaring Class field Name Ambiguous else not Visible true walk all visible interfaces to find ambiguous references if interfaces To Visit null Problem Field Binding ambiguous null done for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j Reference Binding an Interface interfaces j if an Interface tag Bits Interface Visited 0 if interface as not already been visited an Interface tag Bits Interface Visited if field an Interface get Field field Name true resolve null if visible Field null visible Field field else ambiguous new Problem Field Binding visible Field declaring Class field Name Ambiguous break done else Reference Binding its Interfaces an Interface super Interfaces if its Interfaces No Super Interfaces if last Position interfaces To Visit length System arraycopy interfaces To Visit 0 interfaces To Visit new Reference Binding last Position 2 0 last Position interfaces To Visit last Position its Interfaces bit reinitialization for int i 0 i last Position i Reference Binding interfaces interfaces To Visit i for int j 0 length interfaces length j length j interfaces j tag Bits Interface Visited if ambiguous null return ambiguous if visible Field null return visible Field if not Visible return new Problem Field Binding current Type field Name Not Visible return null  FieldBinding findFieldForCodeSnippet TypeBinding receiverType fieldName InvocationSite invocationSite receiverType isBaseType receiverType isArrayType TypeBinding leafType receiverType leafComponentType leafType ReferenceBinding ReferenceBinding leafType canBeSeenBy ProblemFieldBinding ReferenceBinding leafType fieldName ReceiverTypeNotVisible CharOperation fieldName ArrayBinding ArrayLength ReferenceBinding currentType ReferenceBinding receiverType currentType canBeSeenBy ProblemFieldBinding currentType fieldName ReceiverTypeNotVisible FieldBinding currentType getField fieldName canBeSeenByForCodeSnippet currentType invocationSite ProblemFieldBinding declaringClass fieldName NotVisible receiverType ReferenceBinding interfacesToVisit lastPosition FieldBinding visibleField keepLooking notVisible keepLooking ReferenceBinding itsInterfaces currentType superInterfaces itsInterfaces NoSuperInterfaces interfacesToVisit interfacesToVisit ReferenceBinding lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces currentType currentType currentType getField fieldName keepLooking canBeSeenByForCodeSnippet receiverType invocationSite visibleField visibleField ProblemFieldBinding visibleField declaringClass fieldName notVisible interfacesToVisit ProblemFieldBinding lastPosition ReferenceBinding interfacesToVisit ReferenceBinding anInterface anInterface tagBits InterfaceVisited anInterface tagBits InterfaceVisited anInterface getField fieldName visibleField visibleField ProblemFieldBinding visibleField declaringClass fieldName ReferenceBinding itsInterfaces anInterface superInterfaces itsInterfaces NoSuperInterfaces lastPosition interfacesToVisit interfacesToVisit interfacesToVisit ReferenceBinding lastPosition lastPosition interfacesToVisit lastPosition itsInterfaces lastPosition ReferenceBinding interfacesToVisit tagBits InterfaceVisited visibleField visibleField notVisible ProblemFieldBinding currentType fieldName NotVisible
Internal use only public Method Binding find Method Reference Binding receiver Type char selector Type Binding argument Types Invocation Site invocation Site Reference Binding current Type receiver Type Method Binding matching Method null Object Vector found new Object Vector compilation Unit Scope record Type Reference receiver Type compilation Unit Scope record Type References argument Types if current Type is Interface Method Binding current Methods current Type get Methods selector int current Length current Methods length if current Length 1 matching Method current Methods 0 else if current Length 1 for int f 0 f current Length f found add current Methods f matching Method find Method In Super Interfaces current Type selector found matching Method current Type get Java Lang Object superclass lookup Reference Binding class Hierarchy Start current Type while current Type null Method Binding current Methods current Type get Methods selector int current Length current Methods length if current Length 1 matching Method null found size 0 matching Method current Methods 0 else if current Length 0 if found size 0 matching Method null found add matching Method for int f 0 f current Length f found add current Methods f current Type current Type superclass int found Size found size if found Size 0 if matching Method null Method Binding interface Method find Default Abstract Method receiver Type selector argument Types invocation Site class Hierarchy Start matching Method found if interface Method null return interface Method return matching Method may be null have not checked arg types or visibility Method Binding candidates new Method Binding found Size int candidates Count 0 argument type compatibility check for int i 0 i found Size i Method Binding method Binding Method Binding found element At i if are Parameters Assignable method Binding parameters argument Types candidates candidates Count method Binding if candidates Count 1 compilation Unit Scope record Type References candidates 0 thrown Exceptions return candidates 0 have not checked visibility if candidates Count 0 try to find a close match when the parameter order is wrong or missing some parameters Method Binding interface Method find Default Abstract Method receiver Type selector argument Types invocation Site class Hierarchy Start matching Method found if interface Method null return interface Method int arg Length argument Types length found Size found size next Method for int i 0 i found Size i Method Binding method Binding Method Binding found element At i Type Binding params method Binding parameters int param Length params length next Arg for int a 0 a arg Length a Type Binding arg argument Types a for int p 0 p param Length p if params p arg continue next Arg continue next Method return method Binding return Method Binding found element At 0 no good match so just use the first one found visibility check int visibles Count 0 for int i 0 i candidates Count i Method Binding method Binding candidates i if can Be Seen By For Code Snippet method Binding receiver Type invocation Site this if visibles Count i candidates i null candidates visibles Count method Binding visibles Count if visibles Count 1 compilation Unit Scope record Type References candidates 0 thrown Exceptions return candidates 0 if visibles Count 0 Method Binding interface Method find Default Abstract Method receiver Type selector argument Types invocation Site class Hierarchy Start matching Method found if interface Method null return interface Method return new Problem Method Binding candidates 0 selector candidates 0 parameters candidates 0 declaring Class Not Visible if candidates 0 declaring Class is Class return most Specific Class Method Binding candidates visibles Count else return most Specific Interface Method Binding candidates visibles Count  MethodBinding findMethod ReferenceBinding receiverType TypeBinding argumentTypes InvocationSite invocationSite ReferenceBinding currentType receiverType MethodBinding matchingMethod ObjectVector ObjectVector compilationUnitScope recordTypeReference receiverType compilationUnitScope recordTypeReferences argumentTypes currentType isInterface MethodBinding currentMethods currentType getMethods currentLength currentMethods currentLength matchingMethod currentMethods currentLength currentLength currentMethods matchingMethod findMethodInSuperInterfaces currentType matchingMethod currentType getJavaLangObject ReferenceBinding classHierarchyStart currentType currentType MethodBinding currentMethods currentType getMethods currentLength currentMethods currentLength matchingMethod matchingMethod currentMethods currentLength matchingMethod matchingMethod currentLength currentMethods currentType currentType foundSize foundSize matchingMethod MethodBinding interfaceMethod findDefaultAbstractMethod receiverType argumentTypes invocationSite classHierarchyStart matchingMethod interfaceMethod interfaceMethod matchingMethod MethodBinding MethodBinding foundSize candidatesCount foundSize MethodBinding methodBinding MethodBinding elementAt areParametersAssignable methodBinding argumentTypes candidatesCount methodBinding candidatesCount compilationUnitScope recordTypeReferences thrownExceptions candidatesCount MethodBinding interfaceMethod findDefaultAbstractMethod receiverType argumentTypes invocationSite classHierarchyStart matchingMethod interfaceMethod interfaceMethod argLength argumentTypes foundSize nextMethod foundSize MethodBinding methodBinding MethodBinding elementAt TypeBinding methodBinding paramLength nextArg argLength TypeBinding argumentTypes paramLength nextArg nextMethod methodBinding MethodBinding elementAt visiblesCount candidatesCount MethodBinding methodBinding canBeSeenByForCodeSnippet methodBinding receiverType invocationSite visiblesCount visiblesCount methodBinding visiblesCount visiblesCount compilationUnitScope recordTypeReferences thrownExceptions visiblesCount MethodBinding interfaceMethod findDefaultAbstractMethod receiverType argumentTypes invocationSite classHierarchyStart matchingMethod interfaceMethod interfaceMethod ProblemMethodBinding declaringClass NotVisible declaringClass isClass mostSpecificClassMethodBinding visiblesCount mostSpecificInterfaceMethodBinding visiblesCount
Internal use only public Method Binding find Method For Array Array Binding receiver Type char selector Type Binding argument Types Invocation Site invocation Site Reference Binding object get Java Lang Object Method Binding method Binding object get Exact Method selector argument Types if method Binding null handle the method clone specially cannot be protected or throw exceptions if argument Types No Parameters Char Operation equals selector CLONE return new Method Binding method Binding modifiers Acc Protected Acc Public CLONE method Binding return Type argument Types null object if can Be Seen By For Code Snippet method Binding receiver Type invocation Site this return method Binding answers closest approximation may not check argument Types or visibility method Binding find Method object selector argument Types invocation Site if method Binding null return new Problem Method Binding selector argument Types Not Found if method Binding is Valid Binding if are Parameters Assignable method Binding parameters argument Types return new Problem Method Binding method Binding selector argument Types Not Found if can Be Seen By For Code Snippet method Binding receiver Type invocation Site this return new Problem Method Binding selector method Binding parameters method Binding declaring Class Not Visible return method Binding  MethodBinding findMethodForArray ArrayBinding receiverType TypeBinding argumentTypes InvocationSite invocationSite ReferenceBinding getJavaLangObject MethodBinding methodBinding getExactMethod argumentTypes methodBinding argumentTypes NoParameters CharOperation MethodBinding methodBinding AccProtected AccPublic methodBinding returnType argumentTypes canBeSeenByForCodeSnippet methodBinding receiverType invocationSite methodBinding argumentTypes methodBinding findMethod argumentTypes invocationSite methodBinding ProblemMethodBinding argumentTypes NotFound methodBinding isValidBinding areParametersAssignable methodBinding argumentTypes ProblemMethodBinding methodBinding argumentTypes NotFound canBeSeenByForCodeSnippet methodBinding receiverType invocationSite ProblemMethodBinding methodBinding methodBinding declaringClass NotVisible methodBinding
public Binding get Binding char compound Name int mask Invocation Site invocation Site Reference Binding receiver Type Binding binding get Binding compound Name 0 mask TYPE PACKAGE invocation Site true resolve invocation Site set Field Index 1 if binding is Valid Binding binding instanceof Variable Binding return binding int length compound Name length int current Index 1 found Type if binding instanceof Package Binding Package Binding package Binding Package Binding binding while current Index length binding package Binding get Type Or Package compound Name current Index invocation Site set Field Index current Index if binding null if current Index length must be a type if its the last name otherwise we have no idea if its a package or type return new Problem Reference Binding Char Operation subarray compound Name 0 current Index Not Found else return new Problem Binding Char Operation subarray compound Name 0 current Index Not Found if binding instanceof Reference Binding if binding is Valid Binding return new Problem Reference Binding Char Operation subarray compound Name 0 current Index binding problem Id if this can Be Seen By For Code Snippet Reference Binding binding receiver Type return new Problem Reference Binding Char Operation subarray compound Name 0 current Index Reference Binding binding Not Visible break found Type package Binding Package Binding binding It is illegal to request a PACKAGE from this method return new Problem Reference Binding Char Operation subarray compound Name 0 current Index Not Found know binding is now a Reference Binding while current Index length Reference Binding type Binding Reference Binding binding char next Name compound Name current Index invocation Site set Field Index current Index if binding find Field For Code Snippet type Binding next Name invocation Site null if binding is Valid Binding return new Problem Field Binding Field Binding binding declaring Class Char Operation subarray compound Name 0 current Index binding problem Id break binding is now a field if binding find Member Type next Name type Binding null return new Problem Binding Char Operation subarray compound Name 0 current Index type Binding Not Found if binding is Valid Binding return new Problem Reference Binding Char Operation subarray compound Name 0 current Index binding problem Id if mask FIELD 0 binding instanceof Field Binding was looking for a field and found a field Field Binding field Field Binding binding if field is Static return new Problem Field Binding field declaring Class Char Operation subarray compound Name 0 current Index Non Static Reference In Static Context return binding if mask TYPE 0 binding instanceof Reference Binding was looking for a type and found a type return binding handle the case when a field or type was asked for but we resolved the compound Name to a type or field return new Problem Binding Char Operation subarray compound Name 0 current Index Not Found  getBinding compoundName InvocationSite invocationSite ReferenceBinding receiverType getBinding compoundName invocationSite invocationSite setFieldIndex isValidBinding VariableBinding compoundName currentIndex foundType PackageBinding PackageBinding packageBinding PackageBinding currentIndex packageBinding getTypeOrPackage compoundName currentIndex invocationSite setFieldIndex currentIndex currentIndex ProblemReferenceBinding CharOperation compoundName currentIndex NotFound ProblemBinding CharOperation compoundName currentIndex NotFound ReferenceBinding isValidBinding ProblemReferenceBinding CharOperation compoundName currentIndex problemId canBeSeenByForCodeSnippet ReferenceBinding receiverType ProblemReferenceBinding CharOperation compoundName currentIndex ReferenceBinding NotVisible foundType packageBinding PackageBinding ProblemReferenceBinding CharOperation compoundName currentIndex NotFound ReferenceBinding currentIndex ReferenceBinding typeBinding ReferenceBinding nextName compoundName currentIndex invocationSite setFieldIndex currentIndex findFieldForCodeSnippet typeBinding nextName invocationSite isValidBinding ProblemFieldBinding FieldBinding declaringClass CharOperation compoundName currentIndex problemId findMemberType nextName typeBinding ProblemBinding CharOperation compoundName currentIndex typeBinding NotFound isValidBinding ProblemReferenceBinding CharOperation compoundName currentIndex problemId FieldBinding FieldBinding FieldBinding isStatic ProblemFieldBinding declaringClass CharOperation compoundName currentIndex NonStaticReferenceInStaticContext ReferenceBinding compoundName ProblemBinding CharOperation compoundName currentIndex NotFound
public Method Binding get Constructor Reference Binding receiver Type Type Binding argument Types Invocation Site invocation Site Method Binding method Binding receiver Type get Exact Constructor argument Types if method Binding null if can Be Seen By For Code Snippet method Binding receiver Type invocation Site this return method Binding Method Binding methods receiver Type get Methods Constructor Declaration Constant Pool Name if methods No Methods return new Problem Method Binding Constructor Declaration Constant Pool Name argument Types Not Found Method Binding compatible new Method Binding methods length int compatible Index 0 for int i 0 length methods length i length i if are Parameters Assignable methods i parameters argument Types compatible compatible Index methods i if compatible Index 0 return new Problem Method Binding Constructor Declaration Constant Pool Name argument Types Not Found need a more descriptive error cannot convert from X to Y Method Binding visible new Method Binding compatible Index int visible Index 0 for int i 0 i compatible Index i Method Binding method compatible i if can Be Seen By For Code Snippet method receiver Type invocation Site this visible visible Index method if visible Index 1 return visible 0 if visible Index 0 return new Problem Method Binding Constructor Declaration Constant Pool Name compatible 0 parameters Not Visible return most Specific Class Method Binding visible visible Index  MethodBinding getConstructor ReferenceBinding receiverType TypeBinding argumentTypes InvocationSite invocationSite MethodBinding methodBinding receiverType getExactConstructor argumentTypes methodBinding canBeSeenByForCodeSnippet methodBinding receiverType invocationSite methodBinding MethodBinding receiverType getMethods ConstructorDeclaration ConstantPoolName NoMethods ProblemMethodBinding ConstructorDeclaration ConstantPoolName argumentTypes NotFound MethodBinding MethodBinding compatibleIndex areParametersAssignable argumentTypes compatibleIndex compatibleIndex ProblemMethodBinding ConstructorDeclaration ConstantPoolName argumentTypes NotFound MethodBinding MethodBinding compatibleIndex visibleIndex compatibleIndex MethodBinding canBeSeenByForCodeSnippet receiverType invocationSite visibleIndex visibleIndex visibleIndex ProblemMethodBinding ConstructorDeclaration ConstantPoolName NotVisible mostSpecificClassMethodBinding visibleIndex
public Field Binding get Field For Code Snippet Type Binding receiver Type char field Name Invocation Site invocation Site Field Binding field find Field For Code Snippet receiver Type field Name invocation Site if field null return new Problem Field Binding receiver Type instanceof Reference Binding Reference Binding receiver Type null field Name Not Found else return field  FieldBinding getFieldForCodeSnippet TypeBinding receiverType fieldName InvocationSite invocationSite FieldBinding findFieldForCodeSnippet receiverType fieldName invocationSite ProblemFieldBinding receiverType ReferenceBinding ReferenceBinding receiverType fieldName NotFound
public Method Binding get Implicit Method Reference Binding receiver Type char selector Type Binding argument Types Invocation Site invocation Site boolean inside Static Context false boolean inside Constructor Call false Method Binding found Method null Problem Method Binding found Fuzzy Problem null the weird method lookup case matches method name in scope then arg types then visibility Problem Method Binding found Inside Problem null inside Constructor call or inside static context Scope scope this boolean is Exact Match true retrieve an exact visible match if possible Method Binding method Binding found Method null find Exact Method receiver Type selector argument Types invocation Site find Exact Method receiver Type found Method selector found Method parameters invocation Site find Exact Method receiver Type selector argument Types invocation Site find Exact Method receiver Type found Method selector found Method parameters invocation Site if method Binding null found Method null answers closest approximation may not check argument Types or visibility is Exact Match false method Binding find Method receiver Type selector argument Types invocation Site method Binding find Method receiver Type selector argument Types invocation Site if method Binding null skip it if we did not find anything if method Binding problem Id Ambiguous if found Method null found Method problem Id Not Visible supercedes any potential Inherited Name Hides Enclosing Name problem return method Binding else make the user qualify the method likely wants the first inherited method javac generates an ambiguous error instead return new Problem Method Binding selector method Binding parameters Inherited Name Hides Enclosing Name Problem Method Binding fuzzy Problem null Problem Method Binding inside Problem null if method Binding is Valid Binding if is Exact Match if are Parameters Assignable method Binding parameters argument Types fuzzy Problem new Problem Method Binding method Binding selector argument Types Not Found else if can Be Seen By For Code Snippet method Binding receiver Type invocation Site this using class Scope instead of this for visibility check does grant all access to innerclass fuzzy Problem new Problem Method Binding selector argument Types method Binding declaring Class Not Visible if fuzzy Problem null method Binding is Static if inside Constructor Call inside Problem new Problem Method Binding method Binding selector method Binding parameters Non Static Reference In Constructor Invocation else if inside Static Context inside Problem new Problem Method Binding method Binding selector method Binding parameters Non Static Reference In Static Context if receiver Type method Binding declaring Class receiver Type get Methods selector No Methods found a valid method in the immediate scope ie not inherited OR the receiver Type implemented a method with the correct name if found Method null return the method Binding if it is not declared in a superclass of the scope s binding it is inherited if fuzzy Problem null return fuzzy Problem if inside Problem null return inside Problem return method Binding if a method was found complain when another is found in an immediate enclosing type ie not inherited NOTE Unlike fields a non visible method hides a visible method if found Method declaring Class method Binding declaring Class ie have we found the same method do not trust field identity yet return new Problem Method Binding method Binding selector method Binding parameters Inherited Name Hides Enclosing Name if found Method null found Method problem Id Not Visible method Binding problem Id Not Visible only remember the method Binding if its the first one found or the previous one was not visible method Binding is remember that private methods are visible if defined directly by an enclosing class found Fuzzy Problem fuzzy Problem found Inside Problem inside Problem if fuzzy Problem null found Method method Binding only keep it if no error was found inside Static Context receiver Type is Static 1EX5I8Z accessing outer fields within a constructor call is permitted in order to do so we change the flag as we exit from the type not the method itself because the class scope is used to retrieve the fields Method Scope enclosing Method Scope scope method Scope inside Constructor Call enclosing Method Scope null false enclosing Method Scope is Constructor Call if found Fuzzy Problem null return found Fuzzy Problem if found Inside Problem null return found Inside Problem if found Method null return found Method return new Problem Method Binding selector argument Types Not Found  MethodBinding getImplicitMethod ReferenceBinding receiverType TypeBinding argumentTypes InvocationSite invocationSite insideStaticContext insideConstructorCall MethodBinding foundMethod ProblemMethodBinding foundFuzzyProblem ProblemMethodBinding foundInsideProblem isExactMatch MethodBinding methodBinding foundMethod findExactMethod receiverType argumentTypes invocationSite findExactMethod receiverType foundMethod foundMethod invocationSite findExactMethod receiverType argumentTypes invocationSite findExactMethod receiverType foundMethod foundMethod invocationSite methodBinding foundMethod argumentTypes isExactMatch methodBinding findMethod receiverType argumentTypes invocationSite methodBinding findMethod receiverType argumentTypes invocationSite methodBinding methodBinding problemId foundMethod foundMethod problemId NotVisible InheritedNameHidesEnclosingName methodBinding ProblemMethodBinding methodBinding InheritedNameHidesEnclosingName ProblemMethodBinding fuzzyProblem ProblemMethodBinding insideProblem methodBinding isValidBinding isExactMatch areParametersAssignable methodBinding argumentTypes fuzzyProblem ProblemMethodBinding methodBinding argumentTypes NotFound canBeSeenByForCodeSnippet methodBinding receiverType invocationSite classScope fuzzyProblem ProblemMethodBinding argumentTypes methodBinding declaringClass NotVisible fuzzyProblem methodBinding isStatic insideConstructorCall insideProblem ProblemMethodBinding methodBinding methodBinding NonStaticReferenceInConstructorInvocation insideStaticContext insideProblem ProblemMethodBinding methodBinding methodBinding NonStaticReferenceInStaticContext receiverType methodBinding declaringClass receiverType getMethods NoMethods receiverType foundMethod methodBinding fuzzyProblem fuzzyProblem insideProblem insideProblem methodBinding foundMethod declaringClass methodBinding declaringClass ProblemMethodBinding methodBinding methodBinding InheritedNameHidesEnclosingName foundMethod foundMethod problemId NotVisible methodBinding problemId NotVisible methodBinding methodBinding foundFuzzyProblem fuzzyProblem foundInsideProblem insideProblem fuzzyProblem foundMethod methodBinding insideStaticContext receiverType isStatic MethodScope enclosingMethodScope methodScope insideConstructorCall enclosingMethodScope enclosingMethodScope isConstructorCall foundFuzzyProblem foundFuzzyProblem foundInsideProblem foundInsideProblem foundMethod foundMethod ProblemMethodBinding argumentTypes NotFound

Field Binding delegate This public Code Snippet Single Name Reference char source long pos Evaluation Context evaluation Context super source pos this evaluation Context evaluation Context  FieldBinding delegateThis CodeSnippetSingleNameReference EvaluationContext evaluationContext evaluationContext evaluationContext
public Flow Info analyse Code Block Scope current Scope Flow Context flow Context Flow Info flow Info boolean value Required switch this bits Restrictive FlagMASK case FIELD reading a field check if reading a final blank field Field Binding field Binding if field Binding Field Binding this binding is Blank Final current Scope allow Blank Final Field Assignment field Binding if flow Info is Definitely Assigned field Binding current Scope problem Reporter uninitialized Blank Final Field field Binding this break case LOCAL reading a local variable Local Variable Binding local Binding if flow Info is Definitely Assigned local Binding Local Variable Binding this binding current Scope problem Reporter uninitialized Local Variable local Binding this if flow Info is Reachable local Binding use Flag Local Variable Binding USED else if local Binding use Flag Local Variable Binding UNUSED local Binding use Flag Local Variable Binding FAKE USED return flow Info  FlowInfo analyseCode BlockScope currentScope FlowContext flowContext FlowInfo flowInfo valueRequired RestrictiveFlagMASK FieldBinding fieldBinding fieldBinding FieldBinding isBlankFinal currentScope allowBlankFinalFieldAssignment fieldBinding flowInfo isDefinitelyAssigned fieldBinding currentScope problemReporter uninitializedBlankFinalField fieldBinding LocalVariableBinding localBinding flowInfo isDefinitelyAssigned localBinding LocalVariableBinding currentScope problemReporter uninitializedLocalVariable localBinding flowInfo isReachable localBinding useFlag LocalVariableBinding localBinding useFlag LocalVariableBinding localBinding useFlag LocalVariableBinding FAKE_USED flowInfo
Check and or redirect the field access to the delegate receiver if any public Type Binding check Field Access Block Scope scope if this delegate This null return super check Field Access scope Field Binding field Binding Field Binding this binding this bits Restrictive FlagMASK clear bits this bits FIELD if field Binding is Static must check for the static status if this evaluation Context is Static scope problem Reporter static Field Access To Non Static Variable this field Binding this constant NotA Constant return null this constant Field Reference get Constant For field Binding this true scope if is Field Use Deprecated field Binding scope this bits Is Strictly AssignedMASK 0 scope problem Reporter deprecated Field field Binding this return field Binding type  TypeBinding checkFieldAccess BlockScope delegateThis checkFieldAccess FieldBinding fieldBinding FieldBinding RestrictiveFlagMASK fieldBinding isStatic evaluationContext isStatic problemReporter staticFieldAccessToNonStaticVariable fieldBinding NotAConstant FieldReference getConstantFor fieldBinding isFieldUseDeprecated fieldBinding IsStrictlyAssignedMASK problemReporter deprecatedField fieldBinding fieldBinding
public void generate Assignment Block Scope current Scope Code Stream code Stream Assignment assignment boolean value Required optimizing assignment like i i 1 or i 1 i if assignment expression is Compactable Operation Binary Expression operation Binary Expression assignment expression Single Name Reference variable Reference if operation left instanceof Single Name Reference variable Reference Single Name Reference operation left binding this binding i i value then use the variable on the right hand side since it has the correct implicit conversion variable Reference generate Compound Assignment current Scope code Stream this synthetic Accessors null null this synthetic Accessors WRITE operation right operation bits OperatorMASK OperatorSHIFT operation left implicit Conversion should be equivalent to no conversion value Required return int operator operation bits OperatorMASK OperatorSHIFT if operation right instanceof Single Name Reference operator PLUS operator MULTIPLY only commutative operations variable Reference Single Name Reference operation right binding this binding operation left constant NotA Constant exclude non constant expressions since could have side effect operation left implicit Conversion 4 T String exclude string concatenation which would occur backwards operation right implicit Conversion 4 T String exclude string concatenation which would occur backwards i value i then use the variable on the right hand side since it has the correct implicit conversion variable Reference generate Compound Assignment current Scope code Stream this synthetic Accessors null null this synthetic Accessors WRITE operation left operator operation right implicit Conversion should be equivalent to no conversion value Required return switch this bits Restrictive FlagMASK case FIELD assigning to a field Field Binding field Binding Field Binding this codegen Binding if field Binding can Be Seen By get Receiver Type current Scope this current Scope if field Binding is Static need a receiver if this bits DepthMASK 0 Reference Binding target Type current Scope enclosing Source Type enclosing Type At this bits DepthMASK DepthSHIFT Object emulation Path current Scope get Emulation Path target Type true only exact match false consider enclosing arg code Stream generate Outer Access emulation Path this target Type current Scope else this generate Receiver code Stream assignment expression generate Code current Scope code Stream true field Store code Stream field Binding null value Required if value Required code Stream generate Implicit Conversion assignment implicit Conversion else Code Snippet Code Stream code Stream generate Emulation For Field field Binding if field Binding is Static need a receiver if this bits DepthMASK 0 internal error per construction we should have found it not yet supported current Scope problem Reporter need Implementation else this generate Receiver code Stream else code Stream aconst null assignment expression generate Code current Scope code Stream true if value Required if field Binding type Long Binding field Binding type Double Binding code Stream dup2 x2 else code Stream dup x2 Code Snippet Code Stream code Stream generate Emulated Write Access For Field field Binding if value Required code Stream generate Implicit Conversion assignment implicit Conversion return case LOCAL assigning to a local variable Local Variable Binding local Binding Local Variable Binding this codegen Binding if local Binding resolved Position 1 assignment expression generate Code current Scope code Stream true else if assignment expression constant NotA Constant assigning an unused local to a constant value no actual assignment is necessary if value Required code Stream generate Constant assignment expression constant assignment implicit Conversion else assignment expression generate Code current Scope code Stream true Even though the value may not be required we force it to be produced and discard it later on if it was actually not necessary so as to provide the same behavior as JDK1 2beta3 if value Required code Stream generate Implicit Conversion assignment implicit Conversion implicit conversion else if local Binding type Long Binding local Binding type Double Binding code Stream pop2 else code Stream pop return normal local assignment since cannot store in outer local which are final locations code Stream store local Binding value Required if this bits First Assignment To LocalMASK 0 for local variable debug attributes local Binding record Initialization StartPC code Stream position implicit conversion if value Required code Stream generate Implicit Conversion assignment implicit Conversion  generateAssignment BlockScope currentScope CodeStream codeStream valueRequired isCompactableOperation BinaryExpression BinaryExpression SingleNameReference variableReference SingleNameReference variableReference SingleNameReference variableReference generateCompoundAssignment currentScope codeStream syntheticAccessors syntheticAccessors implicitConversion valueRequired SingleNameReference variableReference SingleNameReference NotAConstant implicitConversion T_String implicitConversion T_String variableReference generateCompoundAssignment currentScope codeStream syntheticAccessors syntheticAccessors implicitConversion valueRequired RestrictiveFlagMASK FieldBinding fieldBinding FieldBinding codegenBinding fieldBinding canBeSeenBy getReceiverType currentScope currentScope fieldBinding isStatic ReferenceBinding targetType currentScope enclosingSourceType enclosingTypeAt emulationPath currentScope getEmulationPath targetType codeStream generateOuterAccess emulationPath targetType currentScope generateReceiver codeStream generateCode currentScope codeStream fieldStore codeStream fieldBinding valueRequired valueRequired codeStream generateImplicitConversion implicitConversion CodeSnippetCodeStream codeStream generateEmulationForField fieldBinding fieldBinding isStatic currentScope problemReporter needImplementation generateReceiver codeStream codeStream aconst_null generateCode currentScope codeStream valueRequired fieldBinding LongBinding fieldBinding DoubleBinding codeStream dup2_x2 codeStream dup_x2 CodeSnippetCodeStream codeStream generateEmulatedWriteAccessForField fieldBinding valueRequired codeStream generateImplicitConversion implicitConversion LocalVariableBinding localBinding LocalVariableBinding codegenBinding localBinding resolvedPosition generateCode currentScope codeStream NotAConstant valueRequired codeStream generateConstant implicitConversion generateCode currentScope codeStream valueRequired codeStream generateImplicitConversion implicitConversion localBinding LongBinding localBinding DoubleBinding codeStream codeStream codeStream localBinding valueRequired FirstAssignmentToLocalMASK localBinding recordInitializationStartPC codeStream valueRequired codeStream generateImplicitConversion implicitConversion
public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if this constant NotA Constant if value Required code Stream generate Constant this constant this implicit Conversion else switch this bits Restrictive FlagMASK case FIELD reading a field Field Binding field Binding if value Required if field Binding Field Binding this codegen Binding constant NotA Constant directly use inlined value for constant fields if field Binding can Be Seen By get Receiver Type current Scope this current Scope directly use inlined value for constant fields boolean is Static if is Static field Binding is Static if this bits DepthMASK 0 Reference Binding target Type current Scope enclosing Source Type enclosing Type At this bits DepthMASK DepthSHIFT Object emulation Path current Scope get Emulation Path target Type true only exact match false consider enclosing arg code Stream generate Outer Access emulation Path this target Type current Scope else generate Receiver code Stream managing private access if is Static code Stream getstatic field Binding else code Stream getfield field Binding else managing private access if field Binding is Static if this bits DepthMASK 0 internal error per construction we should have found it not yet supported current Scope problem Reporter need Implementation else generate Receiver code Stream else code Stream aconst null Code Snippet Code Stream code Stream generate Emulated Read Access For Field field Binding code Stream generate Implicit Conversion this implicit Conversion else directly use the inlined value code Stream generate Constant field Binding constant this implicit Conversion break case LOCAL reading a local Local Variable Binding local Binding Local Variable Binding this codegen Binding if value Required outer local if this bits DepthMASK 0 outer local can be reached either through a synthetic arg or a synthetic field Variable Binding path current Scope get Emulation Path local Binding code Stream generate Outer Access path this local Binding current Scope else regular local variable read code Stream load local Binding code Stream generate Implicit Conversion this implicit Conversion code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream NotAConstant valueRequired codeStream generateConstant implicitConversion RestrictiveFlagMASK FieldBinding fieldBinding valueRequired fieldBinding FieldBinding codegenBinding NotAConstant fieldBinding canBeSeenBy getReceiverType currentScope currentScope isStatic isStatic fieldBinding isStatic ReferenceBinding targetType currentScope enclosingSourceType enclosingTypeAt emulationPath currentScope getEmulationPath targetType codeStream generateOuterAccess emulationPath targetType currentScope generateReceiver codeStream isStatic codeStream fieldBinding codeStream fieldBinding fieldBinding isStatic currentScope problemReporter needImplementation generateReceiver codeStream codeStream aconst_null CodeSnippetCodeStream codeStream generateEmulatedReadAccessForField fieldBinding codeStream generateImplicitConversion implicitConversion codeStream generateConstant fieldBinding implicitConversion LocalVariableBinding localBinding LocalVariableBinding codegenBinding valueRequired VariableBinding currentScope getEmulationPath localBinding codeStream generateOuterAccess localBinding currentScope codeStream localBinding codeStream generateImplicitConversion implicitConversion codeStream recordPositionsFrom sourceStart
public void generate Compound Assignment Block Scope current Scope Code Stream code Stream Method Binding write Accessor Expression expression int operator int assignment Implicit Conversion boolean value Required switch this bits Restrictive FlagMASK case FIELD assigning to a field Field Binding field Binding Field Binding this codegen Binding if field Binding is Static if field Binding can Be Seen By get Receiver Type current Scope this current Scope code Stream getstatic field Binding else used to store the value Code Snippet Code Stream code Stream generate Emulation For Field field Binding code Stream aconst null used to retrieve the actual value code Stream aconst null Code Snippet Code Stream code Stream generate Emulated Read Access For Field field Binding else if field Binding can Be Seen By get Receiver Type current Scope this current Scope if this bits DepthMASK 0 Reference Binding target Type current Scope enclosing Source Type enclosing Type At this bits DepthMASK DepthSHIFT Object emulation Path current Scope get Emulation Path target Type true only exact match false consider enclosing arg code Stream generate Outer Access emulation Path this target Type current Scope else generate Receiver code Stream code Stream dup code Stream getfield field Binding else if this bits DepthMASK 0 internal error per construction we should have found it not yet supported current Scope problem Reporter need Implementation used to store the value Code Snippet Code Stream code Stream generate Emulation For Field field Binding generate Receiver code Stream used to retrieve the actual value code Stream dup Code Snippet Code Stream code Stream generate Emulated Read Access For Field field Binding break case LOCAL assigning to a local variable cannot assign to outer local Local Variable Binding local Binding Local Variable Binding this codegen Binding Constant assign Constant int increment using incr bytecode if possible switch local Binding type id case T String code Stream generate String Append current Scope this expression if value Required code Stream dup code Stream store local Binding false return case T int if assign Constant expression constant NotA Constant assign Constant typeID T float only for integral types assign Constant typeID T double increment assign Constant int Value short increment 16 bits value switch operator case PLUS code Stream iinc local Binding resolved Position increment if value Required code Stream load local Binding return case MINUS code Stream iinc local Binding resolved Position increment if value Required code Stream load local Binding return default code Stream load local Binding perform the actual compound operation int operation TypeID if operation TypeID this implicit Conversion 4 T String operation TypeID T Object code Stream generate String Append current Scope null expression else promote the array reference to the suitable operation type code Stream generate Implicit Conversion this implicit Conversion generate the increment value will by itself be promoted to the operation value if expression Int Literal One prefix operation code Stream generate Constant expression constant this implicit Conversion else expression generate Code current Scope code Stream true perform the operation code Stream send Operator operator operation TypeID cast the value back to the array reference type code Stream generate Implicit Conversion assignment Implicit Conversion store the result back into the variable switch this bits Restrictive FlagMASK case FIELD assigning to a field Field Binding field Binding Field Binding this codegen Binding if field Binding can Be Seen By get Receiver Type current Scope this current Scope field Store code Stream field Binding write Accessor value Required else current stack is field receiver value if value Required if field Binding type Long Binding field Binding type Double Binding code Stream dup2 x2 else code Stream dup x2 current stack is value field receiver value Code Snippet Code Stream code Stream generate Emulated Write Access For Field field Binding return case LOCAL assigning to a local variable Local Variable Binding local Binding Local Variable Binding this codegen Binding if value Required if local Binding type Long Binding local Binding type Double Binding code Stream dup2 else code Stream dup code Stream store local Binding false  generateCompoundAssignment BlockScope currentScope CodeStream codeStream MethodBinding writeAccessor assignmentImplicitConversion valueRequired RestrictiveFlagMASK FieldBinding fieldBinding FieldBinding codegenBinding fieldBinding isStatic fieldBinding canBeSeenBy getReceiverType currentScope currentScope codeStream fieldBinding CodeSnippetCodeStream codeStream generateEmulationForField fieldBinding codeStream aconst_null codeStream aconst_null CodeSnippetCodeStream codeStream generateEmulatedReadAccessForField fieldBinding fieldBinding canBeSeenBy getReceiverType currentScope currentScope ReferenceBinding targetType currentScope enclosingSourceType enclosingTypeAt emulationPath currentScope getEmulationPath targetType codeStream generateOuterAccess emulationPath targetType currentScope generateReceiver codeStream codeStream codeStream fieldBinding currentScope problemReporter needImplementation CodeSnippetCodeStream codeStream generateEmulationForField fieldBinding generateReceiver codeStream codeStream CodeSnippetCodeStream codeStream generateEmulatedReadAccessForField fieldBinding LocalVariableBinding localBinding LocalVariableBinding codegenBinding assignConstant localBinding T_String codeStream generateStringAppend currentScope valueRequired codeStream codeStream localBinding T_int assignConstant NotAConstant assignConstant T_float assignConstant T_double assignConstant intValue codeStream localBinding resolvedPosition valueRequired codeStream localBinding codeStream localBinding resolvedPosition valueRequired codeStream localBinding codeStream localBinding operationTypeID operationTypeID implicitConversion T_String operationTypeID T_Object codeStream generateStringAppend currentScope codeStream generateImplicitConversion implicitConversion IntLiteral codeStream generateConstant implicitConversion generateCode currentScope codeStream codeStream sendOperator operationTypeID codeStream generateImplicitConversion assignmentImplicitConversion RestrictiveFlagMASK FieldBinding fieldBinding FieldBinding codegenBinding fieldBinding canBeSeenBy getReceiverType currentScope currentScope fieldStore codeStream fieldBinding writeAccessor valueRequired valueRequired fieldBinding LongBinding fieldBinding DoubleBinding codeStream dup2_x2 codeStream dup_x2 CodeSnippetCodeStream codeStream generateEmulatedWriteAccessForField fieldBinding LocalVariableBinding localBinding LocalVariableBinding codegenBinding valueRequired localBinding LongBinding localBinding DoubleBinding codeStream codeStream codeStream localBinding
public void generate Post Increment Block Scope current Scope Code Stream code Stream Compound Assignment post Increment boolean value Required switch this bits Restrictive FlagMASK case FIELD assigning to a field Field Binding field Binding Field Binding this codegen Binding if field Binding can Be Seen By get Receiver Type current Scope this current Scope if field Binding is Static code Stream getstatic field Binding else if this bits DepthMASK 0 Reference Binding target Type current Scope enclosing Source Type enclosing Type At this bits DepthMASK DepthSHIFT Object emulation Path current Scope get Emulation Path target Type true only exact match false consider enclosing arg code Stream generate Outer Access emulation Path this target Type current Scope else generate Receiver code Stream code Stream dup code Stream getfield field Binding if value Required if field Binding is Static if field Binding type Long Binding field Binding type Double Binding code Stream dup2 else code Stream dup else Stack owner old field value old field value owner old field value if field Binding type Long Binding field Binding type Double Binding code Stream dup2 x1 else code Stream dup x1 code Stream generate Constant post Increment expression constant this implicit Conversion code Stream send Operator post Increment operator field Binding type id code Stream generate Implicit Conversion post Increment assignment Implicit Conversion field Store code Stream field Binding null false else if field Binding is Static code Stream aconst null else if this bits DepthMASK 0 internal error per construction we should have found it not yet supported current Scope problem Reporter need Implementation else generate Receiver code Stream Code Snippet Code Stream code Stream generate Emulated Read Access For Field field Binding if value Required if field Binding type Long Binding field Binding type Double Binding code Stream dup2 else code Stream dup Code Snippet Code Stream code Stream generate Emulation For Field field Binding if field Binding type Long Binding field Binding type Double Binding code Stream dup x2 code Stream pop if field Binding is Static code Stream aconst null else generate Receiver code Stream code Stream dup x2 code Stream pop else code Stream dup x1 code Stream pop if field Binding is Static code Stream aconst null else generate Receiver code Stream code Stream dup x1 code Stream pop code Stream generate Constant post Increment expression constant this implicit Conversion code Stream send Operator post Increment operator field Binding type id code Stream generate Implicit Conversion post Increment assignment Implicit Conversion Code Snippet Code Stream code Stream generate Emulated Write Access For Field field Binding return case LOCAL assigning to a local variable Local Variable Binding local Binding Local Variable Binding this codegen Binding using incr bytecode if possible if local Binding type Int Binding if value Required code Stream load local Binding if post Increment operator PLUS code Stream iinc local Binding resolved Position 1 else code Stream iinc local Binding resolved Position 1 else code Stream load local Binding if value Required if local Binding type Long Binding local Binding type Double Binding code Stream dup2 else code Stream dup code Stream generate Constant post Increment expression constant this implicit Conversion code Stream send Operator post Increment operator local Binding type id code Stream generate Implicit Conversion post Increment assignment Implicit Conversion code Stream store local Binding false  generatePostIncrement BlockScope currentScope CodeStream codeStream CompoundAssignment postIncrement valueRequired RestrictiveFlagMASK FieldBinding fieldBinding FieldBinding codegenBinding fieldBinding canBeSeenBy getReceiverType currentScope currentScope fieldBinding isStatic codeStream fieldBinding ReferenceBinding targetType currentScope enclosingSourceType enclosingTypeAt emulationPath currentScope getEmulationPath targetType codeStream generateOuterAccess emulationPath targetType currentScope generateReceiver codeStream codeStream codeStream fieldBinding valueRequired fieldBinding isStatic fieldBinding LongBinding fieldBinding DoubleBinding codeStream codeStream fieldBinding LongBinding fieldBinding DoubleBinding codeStream dup2_x1 codeStream dup_x1 codeStream generateConstant postIncrement implicitConversion codeStream sendOperator postIncrement fieldBinding codeStream generateImplicitConversion postIncrement assignmentImplicitConversion fieldStore codeStream fieldBinding fieldBinding isStatic codeStream aconst_null currentScope problemReporter needImplementation generateReceiver codeStream CodeSnippetCodeStream codeStream generateEmulatedReadAccessForField fieldBinding valueRequired fieldBinding LongBinding fieldBinding DoubleBinding codeStream codeStream CodeSnippetCodeStream codeStream generateEmulationForField fieldBinding fieldBinding LongBinding fieldBinding DoubleBinding codeStream dup_x2 codeStream fieldBinding isStatic codeStream aconst_null generateReceiver codeStream codeStream dup_x2 codeStream codeStream dup_x1 codeStream fieldBinding isStatic codeStream aconst_null generateReceiver codeStream codeStream dup_x1 codeStream codeStream generateConstant postIncrement implicitConversion codeStream sendOperator postIncrement fieldBinding codeStream generateImplicitConversion postIncrement assignmentImplicitConversion CodeSnippetCodeStream codeStream generateEmulatedWriteAccessForField fieldBinding LocalVariableBinding localBinding LocalVariableBinding codegenBinding localBinding IntBinding valueRequired codeStream localBinding postIncrement codeStream localBinding resolvedPosition codeStream localBinding resolvedPosition codeStream localBinding valueRequired localBinding LongBinding localBinding DoubleBinding codeStream codeStream codeStream generateConstant postIncrement implicitConversion codeStream sendOperator postIncrement localBinding codeStream generateImplicitConversion postIncrement assignmentImplicitConversion codeStream localBinding
public void generate Receiver Code Stream code Stream code Stream aload 0 if this delegate This null code Stream getfield this delegate This delegated field access  generateReceiver CodeStream codeStream codeStream aload_0 delegateThis codeStream delegateThis
Check and or redirect the field access to the delegate receiver if any public Type Binding get Receiver Type Block Scope current Scope if this receiver Type null return this receiver Type Scope scope current Scope parent while true switch scope kind case Scope CLASS SCOPE return this receiver Type Class Scope scope reference Context binding default scope scope parent  TypeBinding getReceiverType BlockScope currentScope receiverType receiverType currentScope CLASS_SCOPE receiverType ClassScope referenceContext
public void manage Synthetic Read Access If Necessary Block Scope current Scope Flow Info flow Info if this delegate This null super manage Synthetic Read Access If Necessary current Scope flow Info return if flow Info is Reachable return If inlinable field forget the access emulation the code gen will directly target it if this constant NotA Constant return if this bits FIELD 0 Field Binding field Binding Field Binding this binding if this bits DepthMASK 0 field Binding is Private private access field Binding is Protected implicit protected access field Binding declaring Class get Package this delegate This type get Package if this synthetic Accessors null this synthetic Accessors new Method Binding 2 this synthetic Accessors READ Source Type Binding current Scope enclosing Source Type enclosing Type At this bits DepthMASK DepthSHIFT add Synthetic Method field Binding true current Scope problem Reporter need To Emulate Field Read Access field Binding this return if the binding declaring class is not visible need special action for runtime compatibility on 1 2 V Ms change the declaring class of the binding NOTE from target 1 2 on field s declaring class is touched if any different from receiver type and not from Object or implicit static field access if field Binding declaring Class this delegate This type field Binding declaring Class null field Binding constant NotA Constant current Scope environment options targetJDK Class File Constants JDK1 2 field Binding is Static field Binding declaring Class id T Object no change for Object fields if there was any field Binding declaring Class can Be Seen By current Scope this codegen Binding current Scope enclosing Source Type get Updated Field Binding field Binding Reference Binding this delegate This type  manageSyntheticReadAccessIfNecessary BlockScope currentScope FlowInfo flowInfo delegateThis manageSyntheticReadAccessIfNecessary currentScope flowInfo flowInfo isReachable NotAConstant FieldBinding fieldBinding FieldBinding fieldBinding isPrivate fieldBinding isProtected fieldBinding declaringClass getPackage delegateThis getPackage syntheticAccessors syntheticAccessors MethodBinding syntheticAccessors SourceTypeBinding currentScope enclosingSourceType enclosingTypeAt addSyntheticMethod fieldBinding currentScope problemReporter needToEmulateFieldReadAccess fieldBinding VMs fieldBinding declaringClass delegateThis fieldBinding declaringClass fieldBinding NotAConstant currentScope ClassFileConstants JDK1_2 fieldBinding isStatic fieldBinding declaringClass T_Object fieldBinding declaringClass canBeSeenBy currentScope codegenBinding currentScope enclosingSourceType getUpdatedFieldBinding fieldBinding ReferenceBinding delegateThis
public void manage Synthetic Write Access If Necessary Block Scope current Scope Flow Info flow Info if this delegate This null super manage Synthetic Write Access If Necessary current Scope flow Info return if flow Info is Reachable return if this bits FIELD 0 Field Binding field Binding Field Binding this binding if this bits DepthMASK 0 field Binding is Private private access field Binding is Protected implicit protected access field Binding declaring Class get Package current Scope enclosing Source Type get Package if this synthetic Accessors null this synthetic Accessors new Method Binding 2 this synthetic Accessors WRITE Source Type Binding current Scope enclosing Source Type enclosing Type At this bits DepthMASK DepthSHIFT add Synthetic Method field Binding false current Scope problem Reporter need To Emulate Field Write Access field Binding this return if the binding declaring class is not visible need special action for runtime compatibility on 1 2 V Ms change the declaring class of the binding NOTE from target 1 2 on field s declaring class is touched if any different from receiver type and not from Object or implicit static field access if field Binding declaring Class this delegate This type field Binding declaring Class null field Binding constant NotA Constant current Scope environment options targetJDK Class File Constants JDK1 2 field Binding is Static field Binding declaring Class id T Object no change for Object fields if there was any field Binding declaring Class can Be Seen By current Scope this codegen Binding current Scope enclosing Source Type get Updated Field Binding field Binding Reference Binding this delegate This type  manageSyntheticWriteAccessIfNecessary BlockScope currentScope FlowInfo flowInfo delegateThis manageSyntheticWriteAccessIfNecessary currentScope flowInfo flowInfo isReachable FieldBinding fieldBinding FieldBinding fieldBinding isPrivate fieldBinding isProtected fieldBinding declaringClass getPackage currentScope enclosingSourceType getPackage syntheticAccessors syntheticAccessors MethodBinding syntheticAccessors SourceTypeBinding currentScope enclosingSourceType enclosingTypeAt addSyntheticMethod fieldBinding currentScope problemReporter needToEmulateFieldWriteAccess fieldBinding VMs fieldBinding declaringClass delegateThis fieldBinding declaringClass fieldBinding NotAConstant currentScope ClassFileConstants JDK1_2 fieldBinding isStatic fieldBinding declaringClass T_Object fieldBinding declaringClass canBeSeenBy currentScope codegenBinding currentScope enclosingSourceType getUpdatedFieldBinding fieldBinding ReferenceBinding delegateThis
Normal field binding did not work try to bind to a field of the delegate receiver public Type Binding report Error Block Scope scope this constant Constant NotA Constant if this binding instanceof Problem Field Binding Problem Field Binding this binding problem Id Not Found if this evaluation Context declaring Type Name null this delegate This scope get Field scope enclosing Source Type DELEGATE THIS this if this delegate This null if not found then internal error field should have been found will not support innerclass emulation inside delegate this codegen Binding this binding scope get Field this delegate This type this token this if this binding is Valid Binding return super report Error scope return check Field Access scope if this binding instanceof Problem Binding Problem Binding this binding problem Id Not Found if this evaluation Context declaring Type Name null this delegate This scope get Field scope enclosing Source Type DELEGATE THIS this if this delegate This null if not found then internal error field should have been found will not support innerclass emulation inside delegate Field Binding field Binding scope get Field this delegate This type this token this if field Binding is Valid Binding if Problem Field Binding field Binding problem Id Not Visible manage the access to a private field of the enclosing type Code Snippet Scope local Scope new Code Snippet Scope scope this codegen Binding this binding local Scope get Field For Code Snippet this delegate This type this token this return check Field Access scope else return super report Error scope this codegen Binding this binding field Binding return check Field Access scope return super report Error scope  TypeBinding reportError BlockScope NotAConstant ProblemFieldBinding ProblemFieldBinding problemId NotFound evaluationContext declaringTypeName delegateThis getField enclosingSourceType DELEGATE_THIS delegateThis codegenBinding getField delegateThis isValidBinding reportError checkFieldAccess ProblemBinding ProblemBinding problemId NotFound evaluationContext declaringTypeName delegateThis getField enclosingSourceType DELEGATE_THIS delegateThis FieldBinding fieldBinding getField delegateThis fieldBinding isValidBinding ProblemFieldBinding fieldBinding problemId NotVisible CodeSnippetScope localScope CodeSnippetScope codegenBinding localScope getFieldForCodeSnippet delegateThis checkFieldAccess reportError codegenBinding fieldBinding checkFieldAccess reportError

public Binary Method Skeleton char selector char method Descriptor char exception Type Names boolean is Constructor this selector selector this method Descriptor method Descriptor this exception Type Names exception Type Names this is Constructor is Constructor  BinaryMethodSkeleton methodDescriptor exceptionTypeNames isConstructor methodDescriptor methodDescriptor exceptionTypeNames exceptionTypeNames isConstructor isConstructor
public char get Exception Type Names return this exception Type Names  getExceptionTypeNames exceptionTypeNames
public char get Method Descriptor return this method Descriptor  getMethodDescriptor methodDescriptor
public int get Modifiers return I Constants Acc Public  getModifiers IConstants AccPublic
public char get Selector return this selector  getSelector
public boolean is Clinit return false  isClinit
public boolean is Constructor return this is Constructor  isConstructor isConstructor
see org eclipse jdt internal compiler env I Generic Method get Argument Names public char get Argument Names return null  IGenericMethod getArgumentNames getArgumentNames
Code Snippet Skeleton constructor comment public Code Snippet Skeleton super  CodeSnippetSkeleton CodeSnippetSkeleton
super public char get Enclosing Type Name return null  getEnclosingTypeName
return null public I Binary Field get Fields return null  IBinaryField getFields
return null public char get File Name return Char Operation concat CODE SNIPPET NAME Suffix Constants SUFFIX java NON NLS 1  getFileName CharOperation CODE_SNIPPET_NAME SuffixConstants SUFFIX_java
return Char Operation concat CODE SNIPPET NAME Suffix Constants SUFFIX java NON NLS 1 public char get Interface Names return null  CharOperation CODE_SNIPPET_NAME SuffixConstants SUFFIX_java getInterfaceNames
return null public I Binary Nested Type get Member Types return null  IBinaryNestedType getMemberTypes
return null public I Binary Method get Methods return this methods  IBinaryMethod getMethods
return this methods public int get Modifiers return I Constants Acc Public  getModifiers IConstants AccPublic
return I Constants Acc Public public char get Name return CODE SNIPPET NAME  IConstants AccPublic getName CODE_SNIPPET_NAME
return CODE SNIPPET NAME public char get Superclass Name return null  CODE_SNIPPET_NAME getSuperclassName
return null public boolean is Anonymous return false  isAnonymous
return false public boolean is Binary Type return true  isBinaryType
return true public boolean is Class return true  isClass
return true public boolean is Interface return false  isInterface
return false public boolean is Local return false  isLocal
return false public boolean is Member return false  isMember
return false public char source File Name return null  sourceFileName

Evaluation Context evaluation Context public Code Snippet Super Reference int pos int source End Evaluation Context evaluation Context super pos source End this evaluation Context evaluation Context  EvaluationContext evaluationContext CodeSnippetSuperReference sourceEnd EvaluationContext evaluationContext sourceEnd evaluationContext evaluationContext
public Type Binding resolve Type Block Scope scope scope problem Reporter cannot Use Super In Code Snippet this source Start this source End NON NLS 1 return null  TypeBinding resolveType BlockScope problemReporter cannotUseSuperInCodeSnippet sourceStart sourceEnd
return null public boolean is Super Access return false  isSuperAccess
return false public boolean is Type Access return false  isTypeAccess
return false public void set Actual Receiver Type Reference Binding receiver Type ignored  setActualReceiverType ReferenceBinding receiverType
ignored public void set Depth int depth ignored  setDepth
ignored public void set Field Index int index ignored  setFieldIndex

Code Snippet This Reference constructor comment param s int param source End int public Code Snippet This Reference int s int source End Evaluation Context evaluation Context boolean is Implicit super s source End this evaluation Context evaluation Context this is Implicit is Implicit  CodeSnippetThisReference sourceEnd CodeSnippetThisReference sourceEnd EvaluationContext evaluationContext isImplicit sourceEnd evaluationContext evaluationContext isImplicit isImplicit
public boolean check Access Method Scope method Scope this super cannot be used in constructor call if this evaluation Context is Constructor Call method Scope problem Reporter fields Or This Before Constructor Invocation this return false static may not refer to this super if this evaluation Context declaring Type Name null this evaluation Context is Static method Scope problem Reporter error This Super In Static this return false return true  checkAccess MethodScope methodScope evaluationContext isConstructorCall methodScope problemReporter fieldsOrThisBeforeConstructorInvocation evaluationContext declaringTypeName evaluationContext isStatic methodScope problemReporter errorThisSuperInStatic
public void generate Code Block Scope current Scope Code Stream code Stream boolean value Required int pc code Stream position if value Required code Stream aload 0 code Stream getfield this delegate This code Stream record Positions From pc this source Start  generateCode BlockScope currentScope CodeStream codeStream valueRequired codeStream valueRequired codeStream aload_0 codeStream delegateThis codeStream recordPositionsFrom sourceStart
code Stream record Positions From pc this source Start public boolean is Super Access return false  codeStream recordPositionsFrom sourceStart isSuperAccess
return false public boolean is Type Access return false  isTypeAccess
public String Buffer print Expression int indent String Buffer output char declaring Type this evaluation Context declaring Type Name output append if declaring Type null output append NO DECLARING TYPE NON NLS 1 else output append declaring Type return output append this NON NLS 1  StringBuffer printExpression StringBuffer declaringType evaluationContext declaringTypeName declaringType declaringType
public Type Binding resolve Type Block Scope scope implicit this this constant NotA Constant Type Binding snippet Type null if this is Implicit check Access scope method Scope snippet Type scope enclosing Source Type if snippet Type null return null this delegate This scope get Field snippet Type DELEGATE THIS this if this delegate This null return null internal error field should have been found if this delegate This is Valid Binding return this resolved Type this delegate This type return this resolved Type snippet Type  TypeBinding resolveType BlockScope NotAConstant TypeBinding snippetType isImplicit checkAccess methodScope snippetType enclosingSourceType snippetType delegateThis getField snippetType DELEGATE_THIS delegateThis delegateThis isValidBinding resolvedType delegateThis resolvedType snippetType
return this resolved Type snippet Type public void set Actual Receiver Type Reference Binding receiver Type ignored  resolvedType snippetType setActualReceiverType ReferenceBinding receiverType
ignored public void set Depth int depth ignored  setDepth
ignored public void set Field Index int index ignored  setFieldIndex

Rebuild source in presence of external local variables public Code Snippet To Cu Mapper char code Snippet char package Name char imports char class Name char var Class Name char local Var Names char local Var Type Names int local Var Modifiers char declaring Type Name this code Snippet code Snippet this snippet Package Name package Name this snippet Imports imports this snippet Class Name class Name this snippet Var Class Name var Class Name this local Var Names local Var Names this local Var Type Names local Var Type Names this local Var Modifiers local Var Modifiers this snippet Declaring Type Name declaring Type Name this buildCU Source  CodeSnippetToCuMapper codeSnippet packageName className varClassName localVarNames localVarTypeNames localVarModifiers declaringTypeName codeSnippet codeSnippet snippetPackageName packageName snippetImports snippetClassName className snippetVarClassName varClassName localVarNames localVarNames localVarTypeNames localVarTypeNames localVarModifiers localVarModifiers snippetDeclaringTypeName declaringTypeName buildCUSource
private void buildCU Source String Buffer buffer new String Buffer package declaration if this snippet Package Name null this snippet Package Name length 0 buffer append package NON NLS 1 buffer append this snippet Package Name buffer append append Util LINE SEPARATOR NON NLS 1 this line Number Offset import declarations char imports this snippet Imports for int i 0 i imports length i buffer append import NON NLS 1 buffer append imports i buffer append append Util LINE SEPARATOR this line Number Offset class declaration buffer append public class NON NLS 1 buffer append this snippet Class Name super class is either a global variable class or the Code Snippet class if this snippet Var Class Name null buffer append extends NON NLS 1 buffer append this snippet Var Class Name else buffer append extends NON NLS 1 buffer append PACKAGE NAME buffer append NON NLS 1 buffer append ROOT CLASS NAME buffer append append Util LINE SEPARATOR NON NLS 1 this line Number Offset if this snippet Declaring Type Name null buffer append NON NLS 1 buffer append this snippet Declaring Type Name buffer append NON NLS 1 buffer append DELEGATE THIS val this buffer append append Util LINE SEPARATOR this line Number Offset add some storage location for local variable persisted state if this local Var Names null for int i 0 max this local Var Names length i max i buffer append NON NLS 1 buffer append this local Var Type Names i buffer append NON NLS 1 buffer append LOCAL VAR PREFIX val buffer append this local Var Names i buffer append append Util LINE SEPARATOR this line Number Offset run method declaration buffer append public void run throws Throwable append Util LINE SEPARATOR NON NLS 1 this line Number Offset this start Pos Offset buffer length buffer append this code Snippet a line separator is required after the code snippet source code in case the code snippet source code ends with a line comment http dev eclipse org bugs show bug cgi id 14838 buffer append Util LINE SEPARATOR append append Util LINE SEPARATOR end of class declaration buffer append append Util LINE SEPARATOR store result int length buffer length this cu Source new char length buffer get Chars 0 length this cu Source 0  buildCUSource StringBuffer StringBuffer snippetPackageName snippetPackageName snippetPackageName LINE_SEPARATOR lineNumberOffset snippetImports LINE_SEPARATOR lineNumberOffset snippetClassName CodeSnippet snippetVarClassName snippetVarClassName PACKAGE_NAME ROOT_CLASS_NAME LINE_SEPARATOR lineNumberOffset snippetDeclaringTypeName snippetDeclaringTypeName DELEGATE_THIS LINE_SEPARATOR lineNumberOffset localVarNames localVarNames localVarTypeNames LOCAL_VAR_PREFIX localVarNames LINE_SEPARATOR lineNumberOffset LINE_SEPARATOR lineNumberOffset startPosOffset codeSnippet show_bug LINE_SEPARATOR LINE_SEPARATOR LINE_SEPARATOR cuSource getChars cuSource
public I Completion Requestor get Completion Requestor final I Completion Requestor original Requestor return new I Completion Requestor public void accept Anonymous Type char super Type Package Name char super Type Name char parameter Package Names char parameter Type Names char parameter Names char completion Name int modifiers int completion Start int completion End int relevance original Requestor accept Anonymous Type super Type Package Name super Type Name parameter Package Names parameter Type Names parameter Names completion Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance  ICompletionRequestor getCompletionRequestor ICompletionRequestor originalRequestor ICompletionRequestor acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart completionEnd originalRequestor acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset
public void accept Class char package Name char class Name char completion Name int modifiers int completion Start int completion End int relevance Remove completion on generated class name or generated global variable class name if Char Operation equals package Name Code Snippet To Cu Mapper this snippet Package Name Char Operation equals class Name Code Snippet To Cu Mapper this snippet Class Name Char Operation equals class Name Code Snippet To Cu Mapper this snippet Var Class Name return original Requestor accept Class package Name class Name completion Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance  acceptClass packageName className completionName completionStart completionEnd CharOperation packageName CodeSnippetToCuMapper snippetPackageName CharOperation className CodeSnippetToCuMapper snippetClassName CharOperation className CodeSnippetToCuMapper snippetVarClassName originalRequestor acceptClass packageName className completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset
public void accept Error I Problem error error set Source Start error get Source Start Code Snippet To Cu Mapper this start Pos Offset error set Source End error get Source End Code Snippet To Cu Mapper this start Pos Offset error set Source Line Number error get Source Line Number Code Snippet To Cu Mapper this line Number Offset original Requestor accept Error error  acceptError IProblem setSourceStart getSourceStart CodeSnippetToCuMapper startPosOffset setSourceEnd getSourceEnd CodeSnippetToCuMapper startPosOffset setSourceLineNumber getSourceLineNumber CodeSnippetToCuMapper lineNumberOffset originalRequestor acceptError
original Requestor accept Error error public void accept Field char declaring Type Package Name char declaring Type Name char name char type Package Name char type Name char completion Name int modifiers int completion Start int completion End int relevance original Requestor accept Field declaring Type Package Name declaring Type Name name type Package Name type Name completion Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance  originalRequestor acceptError acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart completionEnd originalRequestor acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset
original Requestor accept Field declaring Type Package Name declaring Type Name name type Package Name type Name completion Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Interface char package Name char interface Name char completion Name int modifiers int completion Start int completion End int relevance original Requestor accept Interface package Name interface Name completion Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance  originalRequestor acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptInterface packageName interfaceName completionName completionStart completionEnd originalRequestor acceptInterface packageName interfaceName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset
original Requestor accept Interface package Name interface Name completion Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Keyword char keyword Name int completion Start int completion End int relevance original Requestor accept Keyword keyword Name completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance  originalRequestor acceptInterface packageName interfaceName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptKeyword keywordName completionStart completionEnd originalRequestor acceptKeyword keywordName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset
original Requestor accept Keyword keyword Name completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Label char label Name int completion Start int completion End int relevance original Requestor accept Label label Name completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance  originalRequestor acceptKeyword keywordName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptLabel labelName completionStart completionEnd originalRequestor acceptLabel labelName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset
original Requestor accept Label label Name completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Local Variable char name char type Package Name char type Name int modifiers int completion Start int completion End int relevance original Requestor accept Local Variable name type Package Name type Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance  originalRequestor acceptLabel labelName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptLocalVariable typePackageName typeName completionStart completionEnd originalRequestor acceptLocalVariable typePackageName typeName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset
public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance Remove completion on generated method if Char Operation equals declaring Type Package Name Code Snippet To Cu Mapper this snippet Package Name Char Operation equals declaring Type Name Code Snippet To Cu Mapper this snippet Class Name Char Operation equals selector run to Char Array return NON NLS 1 original Requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names parameter Names return Type Package Name return Type Name completion Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance  acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd CharOperation declaringTypePackageName CodeSnippetToCuMapper snippetPackageName CharOperation declaringTypeName CodeSnippetToCuMapper snippetClassName CharOperation toCharArray originalRequestor acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset
public void accept Method Declaration char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance Remove completion on generated method if Char Operation equals declaring Type Package Name Code Snippet To Cu Mapper this snippet Package Name Char Operation equals declaring Type Name Code Snippet To Cu Mapper this snippet Class Name Char Operation equals selector run to Char Array return NON NLS 1 original Requestor accept Method Declaration declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names parameter Names return Type Package Name return Type Name completion Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance  acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd CharOperation declaringTypePackageName CodeSnippetToCuMapper snippetPackageName CharOperation declaringTypeName CodeSnippetToCuMapper snippetClassName CharOperation toCharArray originalRequestor acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset
original Requestor accept Method Declaration declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names parameter Names return Type Package Name return Type Name completion Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Modifier char modifier Name int completion Start int completion End int relevance original Requestor accept Modifier modifier Name completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance  originalRequestor acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptModifier modifierName completionStart completionEnd originalRequestor acceptModifier modifierName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset
original Requestor accept Modifier modifier Name completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Package char package Name char completion Name int completion Start int completion End int relevance original Requestor accept Package package Name completion Name completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance  originalRequestor acceptModifier modifierName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptPackage packageName completionName completionStart completionEnd originalRequestor acceptPackage packageName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset
public void accept Type char package Name char type Name char completion Name int completion Start int completion End int relevance Remove completion on generated class name or generated global variable class name if Char Operation equals package Name Code Snippet To Cu Mapper this snippet Package Name Char Operation equals Code Snippet To Cu Mapper this snippet Class Name Code Snippet To Cu Mapper this snippet Class Name Char Operation equals Code Snippet To Cu Mapper this snippet Class Name Code Snippet To Cu Mapper this snippet Var Class Name return original Requestor accept Type package Name type Name completion Name completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance  acceptType packageName typeName completionName completionStart completionEnd CharOperation packageName CodeSnippetToCuMapper snippetPackageName CharOperation CodeSnippetToCuMapper snippetClassName CodeSnippetToCuMapper snippetClassName CharOperation CodeSnippetToCuMapper snippetClassName CodeSnippetToCuMapper snippetVarClassName originalRequestor acceptType packageName typeName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset
original Requestor accept Type package Name type Name completion Name completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Variable Name char type Package Name char type Name char name char completion Name int completion Start int completion End int relevance original Requestor accept Variable Name type Package Name type Name name completion Name completion Start completion End relevance  originalRequestor acceptType packageName typeName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptVariableName typePackageName typeName completionName completionStart completionEnd originalRequestor acceptVariableName typePackageName typeName completionName completionStart completionEnd
Returns a completion requestor that wraps the given requestor and shift the results according to the start offset and line number offset of the code snippet in the generated compilation unit public I Completion Requestor get Completion Requestor final I Completion Requestor original Requestor return new I Completion Requestor public void accept Anonymous Type char super Type Package Name char super Type Name char parameter Package Names char parameter Type Names char parameter Names char completion Name int modifiers int completion Start int completion End int relevance original Requestor accept Anonymous Type super Type Package Name super Type Name parameter Package Names parameter Type Names parameter Names completion Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Class char package Name char class Name char completion Name int modifiers int completion Start int completion End int relevance Remove completion on generated class name or generated global variable class name if Char Operation equals package Name Code Snippet To Cu Mapper this snippet Package Name Char Operation equals class Name Code Snippet To Cu Mapper this snippet Class Name Char Operation equals class Name Code Snippet To Cu Mapper this snippet Var Class Name return original Requestor accept Class package Name class Name completion Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Error I Problem error error set Source Start error get Source Start Code Snippet To Cu Mapper this start Pos Offset error set Source End error get Source End Code Snippet To Cu Mapper this start Pos Offset error set Source Line Number error get Source Line Number Code Snippet To Cu Mapper this line Number Offset original Requestor accept Error error public void accept Field char declaring Type Package Name char declaring Type Name char name char type Package Name char type Name char completion Name int modifiers int completion Start int completion End int relevance original Requestor accept Field declaring Type Package Name declaring Type Name name type Package Name type Name completion Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Interface char package Name char interface Name char completion Name int modifiers int completion Start int completion End int relevance original Requestor accept Interface package Name interface Name completion Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Keyword char keyword Name int completion Start int completion End int relevance original Requestor accept Keyword keyword Name completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Label char label Name int completion Start int completion End int relevance original Requestor accept Label label Name completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Local Variable char name char type Package Name char type Name int modifiers int completion Start int completion End int relevance original Requestor accept Local Variable name type Package Name type Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance Remove completion on generated method if Char Operation equals declaring Type Package Name Code Snippet To Cu Mapper this snippet Package Name Char Operation equals declaring Type Name Code Snippet To Cu Mapper this snippet Class Name Char Operation equals selector run to Char Array return NON NLS 1 original Requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names parameter Names return Type Package Name return Type Name completion Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Method Declaration char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names char parameter Names char return Type Package Name char return Type Name char completion Name int modifiers int completion Start int completion End int relevance Remove completion on generated method if Char Operation equals declaring Type Package Name Code Snippet To Cu Mapper this snippet Package Name Char Operation equals declaring Type Name Code Snippet To Cu Mapper this snippet Class Name Char Operation equals selector run to Char Array return NON NLS 1 original Requestor accept Method Declaration declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names parameter Names return Type Package Name return Type Name completion Name modifiers completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Modifier char modifier Name int completion Start int completion End int relevance original Requestor accept Modifier modifier Name completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Package char package Name char completion Name int completion Start int completion End int relevance original Requestor accept Package package Name completion Name completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Type char package Name char type Name char completion Name int completion Start int completion End int relevance Remove completion on generated class name or generated global variable class name if Char Operation equals package Name Code Snippet To Cu Mapper this snippet Package Name Char Operation equals Code Snippet To Cu Mapper this snippet Class Name Code Snippet To Cu Mapper this snippet Class Name Char Operation equals Code Snippet To Cu Mapper this snippet Class Name Code Snippet To Cu Mapper this snippet Var Class Name return original Requestor accept Type package Name type Name completion Name completion Start Code Snippet To Cu Mapper this start Pos Offset completion End Code Snippet To Cu Mapper this start Pos Offset relevance public void accept Variable Name char type Package Name char type Name char name char completion Name int completion Start int completion End int relevance original Requestor accept Variable Name type Package Name type Name name completion Name completion Start completion End relevance  ICompletionRequestor getCompletionRequestor ICompletionRequestor originalRequestor ICompletionRequestor acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart completionEnd originalRequestor acceptAnonymousType superTypePackageName superTypeName parameterPackageNames parameterTypeNames parameterNames completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptClass packageName className completionName completionStart completionEnd CharOperation packageName CodeSnippetToCuMapper snippetPackageName CharOperation className CodeSnippetToCuMapper snippetClassName CharOperation className CodeSnippetToCuMapper snippetVarClassName originalRequestor acceptClass packageName className completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptError IProblem setSourceStart getSourceStart CodeSnippetToCuMapper startPosOffset setSourceEnd getSourceEnd CodeSnippetToCuMapper startPosOffset setSourceLineNumber getSourceLineNumber CodeSnippetToCuMapper lineNumberOffset originalRequestor acceptError acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart completionEnd originalRequestor acceptField declaringTypePackageName declaringTypeName typePackageName typeName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptInterface packageName interfaceName completionName completionStart completionEnd originalRequestor acceptInterface packageName interfaceName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptKeyword keywordName completionStart completionEnd originalRequestor acceptKeyword keywordName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptLabel labelName completionStart completionEnd originalRequestor acceptLabel labelName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptLocalVariable typePackageName typeName completionStart completionEnd originalRequestor acceptLocalVariable typePackageName typeName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd CharOperation declaringTypePackageName CodeSnippetToCuMapper snippetPackageName CharOperation declaringTypeName CodeSnippetToCuMapper snippetClassName CharOperation toCharArray originalRequestor acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart completionEnd CharOperation declaringTypePackageName CodeSnippetToCuMapper snippetPackageName CharOperation declaringTypeName CodeSnippetToCuMapper snippetClassName CharOperation toCharArray originalRequestor acceptMethodDeclaration declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames parameterNames returnTypePackageName returnTypeName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptModifier modifierName completionStart completionEnd originalRequestor acceptModifier modifierName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptPackage packageName completionName completionStart completionEnd originalRequestor acceptPackage packageName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptType packageName typeName completionName completionStart completionEnd CharOperation packageName CodeSnippetToCuMapper snippetPackageName CharOperation CodeSnippetToCuMapper snippetClassName CodeSnippetToCuMapper snippetClassName CharOperation CodeSnippetToCuMapper snippetClassName CodeSnippetToCuMapper snippetVarClassName originalRequestor acceptType packageName typeName completionName completionStart CodeSnippetToCuMapper startPosOffset completionEnd CodeSnippetToCuMapper startPosOffset acceptVariableName typePackageName typeName completionName completionStart completionEnd originalRequestor acceptVariableName typePackageName typeName completionName completionStart completionEnd
public char getCU Source if this cu Source null buildCU Source return this cu Source  getCUSource cuSource buildCUSource cuSource
Returns the type of evaluation that corresponds to the given line number in the generated compilation unit public int get Evaluation Type int line Number int current Line 1 check package declaration if this snippet Package Name null this snippet Package Name length 0 if line Number 1 return Evaluation Result T PACKAGE current Line check imports char imports this snippet Imports if current Line line Number line Number current Line imports length return Evaluation Result T IMPORT current Line imports length 1 1 to skip the class declaration line check generated fields current Line this snippet Declaring Type Name null 0 1 this local Var Names null 0 this local Var Names length if current Line line Number return Evaluation Result T INTERNAL current Line 1 to skip the method declaration line check code snippet if current Line this line Number Offset return Evaluation Result T CODE SNIPPET default return Evaluation Result T INTERNAL  getEvaluationType lineNumber currentLine snippetPackageName snippetPackageName lineNumber EvaluationResult T_PACKAGE currentLine snippetImports currentLine lineNumber lineNumber currentLine EvaluationResult T_IMPORT currentLine currentLine snippetDeclaringTypeName localVarNames localVarNames currentLine lineNumber EvaluationResult T_INTERNAL currentLine currentLine lineNumberOffset EvaluationResult T_CODE_SNIPPET EvaluationResult T_INTERNAL
Returns the import defined at the given line number public char get Import int line Number int import Start Line this line Number Offset 1 this snippet Imports length return this snippet Imports line Number import Start Line  getImport lineNumber importStartLine lineNumberOffset snippetImports snippetImports lineNumber importStartLine
public I Selection Requestor get Selection Requestor final I Selection Requestor original Requestor return new I Selection Requestor public void accept Class char package Name char class Name boolean need Qualification boolean is Declaration int start int end original Requestor accept Class package Name class Name need Qualification is Declaration start end  ISelectionRequestor getSelectionRequestor ISelectionRequestor originalRequestor ISelectionRequestor acceptClass packageName className needQualification isDeclaration originalRequestor acceptClass packageName className needQualification isDeclaration
public void accept Error I Problem error error set Source Line Number error get Source Line Number Code Snippet To Cu Mapper this line Number Offset error set Source Start error get Source Start Code Snippet To Cu Mapper this start Pos Offset error set Source End error get Source End Code Snippet To Cu Mapper this start Pos Offset original Requestor accept Error error  acceptError IProblem setSourceLineNumber getSourceLineNumber CodeSnippetToCuMapper lineNumberOffset setSourceStart getSourceStart CodeSnippetToCuMapper startPosOffset setSourceEnd getSourceEnd CodeSnippetToCuMapper startPosOffset originalRequestor acceptError
original Requestor accept Error error public void accept Field char declaring Type Package Name char declaring Type Name char name boolean is Declaration int start int end original Requestor accept Field declaring Type Package Name declaring Type Name name is Declaration start end  originalRequestor acceptError acceptField declaringTypePackageName declaringTypeName isDeclaration originalRequestor acceptField declaringTypePackageName declaringTypeName isDeclaration
original Requestor accept Field declaring Type Package Name declaring Type Name name is Declaration start end public void accept Interface char package Name char interface Name boolean need Qualification boolean is Declaration int start int end original Requestor accept Interface package Name interface Name need Qualification is Declaration start end  originalRequestor acceptField declaringTypePackageName declaringTypeName isDeclaration acceptInterface packageName interfaceName needQualification isDeclaration originalRequestor acceptInterface packageName interfaceName needQualification isDeclaration
original Requestor accept Interface package Name interface Name need Qualification is Declaration start end public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names boolean is Constructor boolean is Declaration int start int end original Requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names is Constructor is Declaration start end  originalRequestor acceptInterface packageName interfaceName needQualification isDeclaration acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames isConstructor isDeclaration originalRequestor acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames isConstructor isDeclaration
original Requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names is Constructor is Declaration start end public void accept Package char package Name original Requestor accept Package package Name  originalRequestor acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames isConstructor isDeclaration acceptPackage packageName originalRequestor acceptPackage packageName
Returns a selection requestor that wraps the given requestor and shift the problems according to the start offset and line number offset of the code snippet in the generated compilation unit public I Selection Requestor get Selection Requestor final I Selection Requestor original Requestor return new I Selection Requestor public void accept Class char package Name char class Name boolean need Qualification boolean is Declaration int start int end original Requestor accept Class package Name class Name need Qualification is Declaration start end public void accept Error I Problem error error set Source Line Number error get Source Line Number Code Snippet To Cu Mapper this line Number Offset error set Source Start error get Source Start Code Snippet To Cu Mapper this start Pos Offset error set Source End error get Source End Code Snippet To Cu Mapper this start Pos Offset original Requestor accept Error error public void accept Field char declaring Type Package Name char declaring Type Name char name boolean is Declaration int start int end original Requestor accept Field declaring Type Package Name declaring Type Name name is Declaration start end public void accept Interface char package Name char interface Name boolean need Qualification boolean is Declaration int start int end original Requestor accept Interface package Name interface Name need Qualification is Declaration start end public void accept Method char declaring Type Package Name char declaring Type Name char selector char parameter Package Names char parameter Type Names boolean is Constructor boolean is Declaration int start int end original Requestor accept Method declaring Type Package Name declaring Type Name selector parameter Package Names parameter Type Names is Constructor is Declaration start end public void accept Package char package Name original Requestor accept Package package Name  ISelectionRequestor getSelectionRequestor ISelectionRequestor originalRequestor ISelectionRequestor acceptClass packageName className needQualification isDeclaration originalRequestor acceptClass packageName className needQualification isDeclaration acceptError IProblem setSourceLineNumber getSourceLineNumber CodeSnippetToCuMapper lineNumberOffset setSourceStart getSourceStart CodeSnippetToCuMapper startPosOffset setSourceEnd getSourceEnd CodeSnippetToCuMapper startPosOffset originalRequestor acceptError acceptField declaringTypePackageName declaringTypeName isDeclaration originalRequestor acceptField declaringTypePackageName declaringTypeName isDeclaration acceptInterface packageName interfaceName needQualification isDeclaration originalRequestor acceptInterface packageName interfaceName needQualification isDeclaration acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames isConstructor isDeclaration originalRequestor acceptMethod declaringTypePackageName declaringTypeName parameterPackageNames parameterTypeNames isConstructor isDeclaration acceptPackage packageName originalRequestor acceptPackage packageName

public class Code Snippet Type Declaration extends Type Declaration public Code Snippet Type Declaration Compilation Result compilation Result super compilation Result  CodeSnippetTypeDeclaration TypeDeclaration CodeSnippetTypeDeclaration CompilationResult compilationResult compilationResult
Generic bytecode generation for type public void generate Code Class File enclosing Class File if this has Been Generated return this has Been Generated true if this ignore Further Investigation if this binding null return Code Snippet Class File create Problem Type this this scope reference Compilation Unit compilation Result return try create the result for a compiled type Class File class File new Code Snippet Class File this binding enclosing Class File false generate all fiels class File add Field Infos record the inner type inside its own class file to be able to generate inner classes attributes if this binding is Member Type class File record Enclosing Type Attributes this binding if this binding is Local Type enclosing Class File record Nested Local Attribute this binding class File record Nested Local Attribute this binding if this member Types null for int i 0 max this member Types length i max i record the inner type inside its own class file to be able to generate inner classes attributes class File record Nested Member Attribute this member Types i binding this member Types i generate Code this scope class File generate all methods class File set For Method Infos if this methods null for int i 0 max this methods length i max i this methods i generate Code this scope class File generate all methods class File add Special Methods if this ignore Further Investigation trigger problem type generation for code gen errors throw new Abort Type this scope reference Compilation Unit compilation Result null finalize the compiled type result class File add Attributes this scope reference Compilation Unit compilation Result record this binding constant Pool Name class File catch Abort Type e if this binding null return Code Snippet Class File create Problem Type this this scope reference Compilation Unit compilation Result  generateCode ClassFile enclosingClassFile hasBeenGenerated hasBeenGenerated ignoreFurtherInvestigation CodeSnippetClassFile createProblemType referenceCompilationUnit compilationResult ClassFile classFile CodeSnippetClassFile enclosingClassFile classFile addFieldInfos isMemberType classFile recordEnclosingTypeAttributes isLocalType enclosingClassFile recordNestedLocalAttribute classFile recordNestedLocalAttribute memberTypes memberTypes classFile recordNestedMemberAttribute memberTypes memberTypes generateCode classFile classFile setForMethodInfos generateCode classFile classFile addSpecialMethods ignoreFurtherInvestigation AbortType referenceCompilationUnit compilationResult classFile addAttributes referenceCompilationUnit compilationResult constantPoolName classFile AbortType CodeSnippetClassFile createProblemType referenceCompilationUnit compilationResult

boolean is Constructor Call Creates a new evaluation context public Evaluation Context this variables new Global Variable 5 this variable Count 0 this imports Char Operation NO CHAR CHAR this package Name Char Operation NO CHAR this vars Changed true this is Static true this is Constructor Call false  isConstructorCall EvaluationContext GlobalVariable variableCount CharOperation NO_CHAR_CHAR packageName CharOperation NO_CHAR varsChanged isStatic isConstructorCall
Returns the global variables of this evaluation context in the order they were created in public Global Variable all Variables Global Variable result new Global Variable this variable Count System arraycopy this variables 0 result 0 this variable Count return result  GlobalVariable allVariables GlobalVariable GlobalVariable variableCount variableCount
Computes a completion at the specified position of the given code snippet Note that this evaluation context s VM doesn t need to be running param environment used to resolve type package references and search for types packages based on partial names param requestor since the engine might produce answers of various forms the engine is associated with a requestor able to accept all possible completions param options set of options used to configure the code assist engine public void complete char code Snippet int completion Position I Searchable Name Environment environment Completion Requestor Wrapper requestor Map options I Java Project project final char class Name Code Snippet Completion to Char Array NON NLS 1 final Code Snippet To Cu Mapper mapper new Code Snippet To Cu Mapper code Snippet this package Name this imports class Name this installed Vars null null this installed Vars class Name this local Variable Names this local Variable Type Names this local Variable Modifiers this declaring Type Name I Compilation Unit source Unit new I Compilation Unit public char get File Name return Char Operation concat class Name SUFFIX java public char get Contents return mapper getCU Source public char get Main Type Name return class Name public char get Package Name return null Completion Engine engine new Completion Engine environment mapper get Completion Requestor requestor options project requestor completion Engine engine engine complete source Unit mapper start Pos Offset completion Position 0  codeSnippet completionPosition ISearchableNameEnvironment CompletionRequestorWrapper IJavaProject className CodeSnippetCompletion toCharArray CodeSnippetToCuMapper CodeSnippetToCuMapper codeSnippet packageName className installedVars installedVars className localVariableNames localVariableTypeNames localVariableModifiers declaringTypeName ICompilationUnit sourceUnit ICompilationUnit getFileName CharOperation className SUFFIX_java getContents getCUSource getMainTypeName className getPackageName CompletionEngine CompletionEngine getCompletionRequestor completionEngine sourceUnit startPosOffset completionPosition
Deletes the given variable from this evaluation context This will take effect in the target VM only the next time global variables are installed public void delete Variable Global Variable variable Global Variable vars this variables int index 1 for int i 0 i this variable Count i if vars i equals variable index i break if index 1 return int element Count this variable Count int j element Count index 1 if j 0 System arraycopy vars index 1 vars index j vars element Count 1 null this vars Changed true  deleteVariable GlobalVariable GlobalVariable variableCount elementCount variableCount elementCount elementCount varsChanged
new Class File new Class File public byte get Bytes return get Code Snippet Bytes  ClassFile ClassFile getBytes getCodeSnippetBytes
return get Code Snippet Bytes public char get Compound Name return Evaluation Constants ROOT COMPOUND NAME  getCodeSnippetBytes getCompoundName EvaluationConstants ROOT_COMPOUND_NAME
private void deploy Code Snippet Class If Needed I Requestor requestor if this code Snippet Binary null Deploy Code Snippet class only once requestor accept Class Files new Class File new Class File public byte get Bytes return get Code Snippet Bytes public char get Compound Name return Evaluation Constants ROOT COMPOUND NAME null  deployCodeSnippetClassIfNeeded IRequestor codeSnippetBinary CodeSnippet acceptClassFiles ClassFile ClassFile getBytes getCodeSnippetBytes getCompoundName EvaluationConstants ROOT_COMPOUND_NAME
see org eclipse jdt core eval I Evaluation Context exception org eclipse jdt internal eval Install Exception if the code snippet class files could not be deployed public void evaluate char code Snippet char context Local Variable Type Names char context Local Variable Names int context Local Variable Modifiers char context Declaring Type Name boolean context Is Static boolean context Is Constructor Call I Name Environment environment Map options final I Requestor requestor I Problem Factory problem Factory throws Install Exception Initialialize context this local Variable Type Names context Local Variable Type Names this local Variable Names context Local Variable Names this local Variable Modifiers context Local Variable Modifiers this declaring Type Name context Declaring Type Name this is Static context Is Static this is Constructor Call context Is Constructor Call this deploy Code Snippet Class If Needed requestor try Install new variables if needed class Forwarding Requestor implements I Requestor boolean has Errors false public boolean accept Class Files Class File class Files char code Snippet Class Name return requestor accept Class Files class Files code Snippet Class Name public void accept Problem I Problem problem char fragment Source int fragment Kind requestor accept Problem problem fragment Source fragment Kind if problem is Error this has Errors true Forwarding Requestor forwarding Requestor new Forwarding Requestor if this vars Changed evaluate Variables environment options forwarding Requestor problem Factory Compile code snippet if there was no errors while evaluating the variables if forwarding Requestor has Errors Evaluator evaluator new Code Snippet Evaluator code Snippet this environment options requestor problem Factory Class File classes null if TIMING long start System current Time Millis classes evaluator get Classes System out println Time to compile new String code Snippet was System current Time Millis start ms NON NLS 3 NON NLS 2 NON NLS 1 else classes evaluator get Classes Send code snippet on target if classes null classes length 0 char simple Class Name evaluator get Class Name char pkg Name this get Package Name char qualified Class Name pkg Name length 0 simple Class Name Char Operation concat pkg Name simple Class Name CODE SNIPPET COUNTER requestor accept Class Files classes qualified Class Name finally Reinitialize context to default values this local Variable Type Names null this local Variable Names null this local Variable Modifiers null this declaring Type Name null this is Static true this is Constructor Call false  IEvaluationContext InstallException codeSnippet contextLocalVariableTypeNames contextLocalVariableNames contextLocalVariableModifiers contextDeclaringTypeName contextIsStatic contextIsConstructorCall INameEnvironment IRequestor IProblemFactory problemFactory InstallException localVariableTypeNames contextLocalVariableTypeNames localVariableNames contextLocalVariableNames localVariableModifiers contextLocalVariableModifiers declaringTypeName contextDeclaringTypeName isStatic contextIsStatic isConstructorCall contextIsConstructorCall deployCodeSnippetClassIfNeeded ForwardingRequestor IRequestor hasErrors acceptClassFiles ClassFile classFiles codeSnippetClassName acceptClassFiles classFiles codeSnippetClassName acceptProblem IProblem fragmentSource fragmentKind acceptProblem fragmentSource fragmentKind isError hasErrors ForwardingRequestor forwardingRequestor ForwardingRequestor varsChanged evaluateVariables forwardingRequestor problemFactory forwardingRequestor hasErrors CodeSnippetEvaluator codeSnippet problemFactory ClassFile currentTimeMillis getClasses codeSnippet currentTimeMillis getClasses simpleClassName getClassName pkgName getPackageName qualifiedClassName pkgName simpleClassName CharOperation pkgName simpleClassName CODE_SNIPPET_COUNTER acceptClassFiles qualifiedClassName localVariableTypeNames localVariableNames localVariableModifiers declaringTypeName isStatic isConstructorCall
see org eclipse jdt core eval I Evaluation Context exception org eclipse jdt internal eval Install Exception if the code snippet class files could not be deployed public void evaluate char code Snippet I Name Environment environment Map options final I Requestor requestor I Problem Factory problem Factory throws Install Exception this evaluate code Snippet null null null null true false environment options requestor problem Factory  IEvaluationContext InstallException codeSnippet INameEnvironment IRequestor IProblemFactory problemFactory InstallException codeSnippet problemFactory
see org eclipse jdt core eval I Evaluation Context public void evaluate Imports I Name Environment environment I Requestor requestor I Problem Factory problem Factory for int i 0 i this imports length i I Problem problems new I Problem null char import Declaration this imports i char split Declaration Char Operation split On import Declaration int split Length split Declaration length if split Length 0 char pkg Name split Declaration split Length 1 if pkg Name length 1 pkg Name 0 char parent Name switch split Length case 1 parent Name null break case 2 parent Name null pkg Name split Declaration split Length 2 break default parent Name Char Operation subarray split Declaration 0 split Length 2 pkg Name split Declaration split Length 2 if environment is Package parent Name pkg Name String arguments new String new String import Declaration problems 0 problem Factory create Problem import Declaration I Problem Import Not Found arguments arguments Problem Severities Warning 0 import Declaration length 1 i else if environment find Type split Declaration null String arguments new String new String import Declaration problems 0 problem Factory create Problem import Declaration I Problem Import Not Found arguments arguments Problem Severities Warning 0 import Declaration length 1 i else String arguments new String new String import Declaration problems 0 problem Factory create Problem import Declaration I Problem Import Not Found arguments arguments Problem Severities Warning 0 import Declaration length 1 i if problems 0 null requestor accept Problem problems 0 import Declaration Evaluation Result T IMPORT  IEvaluationContext evaluateImports INameEnvironment IRequestor IProblemFactory problemFactory IProblem IProblem importDeclaration splitDeclaration CharOperation splitOn importDeclaration splitLength splitDeclaration splitLength pkgName splitDeclaration splitLength pkgName pkgName parentName splitLength parentName parentName pkgName splitDeclaration splitLength parentName CharOperation splitDeclaration splitLength pkgName splitDeclaration splitLength isPackage parentName pkgName importDeclaration problemFactory createProblem importDeclaration IProblem ImportNotFound ProblemSeverities importDeclaration findType splitDeclaration importDeclaration problemFactory createProblem importDeclaration IProblem ImportNotFound ProblemSeverities importDeclaration importDeclaration problemFactory createProblem importDeclaration IProblem ImportNotFound ProblemSeverities importDeclaration acceptProblem importDeclaration EvaluationResult T_IMPORT
see org eclipse jdt core eval I Evaluation Context exception org eclipse jdt internal eval Install Exception if the code snippet class files could not be deployed exception java lang Illegal Argument Exception if the global has not been installed yet public void evaluate Variable Global Variable variable I Name Environment environment Map options I Requestor requestor I Problem Factory problem Factory throws Install Exception this evaluate variable get Name environment options requestor problem Factory  IEvaluationContext InstallException IllegalArgumentException evaluateVariable GlobalVariable INameEnvironment IRequestor IProblemFactory problemFactory InstallException getName problemFactory
see org eclipse jdt core eval I Evaluation Context exception org eclipse jdt internal eval Install Exception if the code snippet class files could not be deployed public void evaluate Variables I Name Environment environment Map options I Requestor requestor I Problem Factory problem Factory throws Install Exception this deploy Code Snippet Class If Needed requestor Variables Evaluator evaluator new Variables Evaluator this environment options requestor problem Factory Class File classes evaluator get Classes if classes null if classes length 0 Send classes if requestor accept Class Files classes null throw new Install Exception Remember that the variables have been installed int count this variable Count Global Variable variables Copy new Global Variable count System arraycopy this variables 0 variables Copy 0 count this installed Vars new Variables Info evaluator get Package Name evaluator get Class Name classes variables Copy count VAR CLASS COUNTER this vars Changed false  IEvaluationContext InstallException evaluateVariables INameEnvironment IRequestor IProblemFactory problemFactory InstallException deployCodeSnippetClassIfNeeded VariablesEvaluator VariablesEvaluator problemFactory ClassFile getClasses acceptClassFiles InstallException variableCount GlobalVariable variablesCopy GlobalVariable variablesCopy installedVars VariablesInfo getPackageName getClassName variablesCopy VAR_CLASS_COUNTER varsChanged
Returns the bytes of the Code Snippet class Generated using the following code snippet java io Buffered Writer writer new java io Buffered Writer new java io File Writer d temp Code Snippet java writer write org eclipse jdt internal eval Evaluation Context get Code Snippet Source writer close org eclipse jdt internal compiler batch Main compile d temp Code Snippet java d d temp classpath d jdk1 2 2 jre lib rt jar verbose java io File Input Stream reader new java io File Input Stream d temp org eclipse jdt internal eval target Code Snippet class byte bytes org eclipse jdt internal core Util read Contents As Bytes reader reader close String Buffer buffer new String Buffer buffer append private byte get Code Snippet Bytes n buffer append return new byte n buffer append for int i 0 i bytes length i buffer append bytes i if i bytes length 1 buffer append n else buffer append buffer append n buffer append buffer to String byte get Code Snippet Bytes return new byte 54 2 70 66 0 3 0 45 0 35 1 0 48 111 114 103 47 101 99 108 105 112 115 101 47 106 100 116 47 105 110 116 101 114 110 97 108 47 101 118 97 108 47 116 97 114 103 101 116 47 67 111 100 101 83 110 105 112 112 101 116 7 0 1 1 0 16 106 97 118 97 47 108 97 110 103 47 79 98 106 101 99 116 7 0 3 1 0 10 114 101 115 117 108 116 84 121 112 101 1 0 17 76 106 97 118 97 47 108 97 110 103 47 67 108 97 115 115 59 1 0 11 114 101 115 117 108 116 86 97 108 117 101 1 0 18 76 106 97 118 97 47 108 97 110 103 47 79 98 106 101 99 116 59 1 0 7 99 108 97 115 115 36 48 1 0 9 83 121 110 116 104 101 116 105 99 1 0 6 60 105 110 105 116 62 1 0 3 40 41 86 1 0 4 67 111 100 101 12 0 11 0 12 10 0 4 0 14 1 0 14 106 97 118 97 47 108 97 110 103 47 86 111 105 100 7 0 16 1 0 4 84 89 80 69 12 0 18 0 6 9 0 17 0 19 12 0 5 0 6 9 0 2 0 21 12 0 7 0 8 9 0 2 0 23 1 0 15 76 105 110 101 78 117 109 98 101 114 84 97 98 108 101 1 0 13 103 101 116 82 101 115 117 108 116 84 121 112 101 1 0 19 40 41 76 106 97 118 97 47 108 97 110 103 47 67 108 97 115 115 59 1 0 14 103 101 116 82 101 115 117 108 116 86 97 108 117 101 1 0 20 40 41 76 106 97 118 97 47 108 97 110 103 47 79 98 106 101 99 116 59 1 0 3 114 117 110 1 0 9 115 101 116 82 101 115 117 108 116 1 0 38 40 76 106 97 118 97 47 108 97 110 103 47 79 98 106 101 99 116 59 76 106 97 118 97 47 108 97 110 103 47 67 108 97 115 115 59 41 86 1 0 10 83 111 117 114 99 101 70 105 108 101 1 0 16 67 111 100 101 83 110 105 112 112 101 116 46 106 97 118 97 0 33 0 2 0 4 0 0 0 3 0 2 0 5 0 6 0 0 0 2 0 7 0 8 0 0 0 8 0 9 0 6 0 1 0 10 0 0 0 0 0 5 0 1 0 11 0 12 0 1 0 13 0 0 0 53 0 2 0 1 0 0 0 17 42 73 0 15 42 78 0 20 75 0 22 42 1 75 0 24 79 0 0 0 1 0 25 0 0 0 18 0 4 0 0 0 17 0 4 0 18 0 11 0 19 0 16 0 17 0 1 0 26 0 27 0 1 0 13 0 0 0 29 0 1 0 1 0 0 0 5 42 76 0 22 80 0 0 0 1 0 25 0 0 0 6 0 1 0 0 0 24 0 1 0 28 0 29 0 1 0 13 0 0 0 29 0 1 0 1 0 0 0 5 42 76 0 24 80 0 0 0 1 0 25 0 0 0 6 0 1 0 0 0 30 0 1 0 30 0 12 0 1 0 13 0 0 0 25 0 0 0 1 0 0 0 1 79 0 0 0 1 0 25 0 0 0 6 0 1 0 0 0 36 0 1 0 31 0 32 0 1 0 13 0 0 0 43 0 2 0 3 0 0 0 11 42 43 75 0 24 42 44 75 0 22 79 0 0 0 1 0 25 0 0 0 14 0 3 0 0 0 42 0 5 0 43 0 10 0 41 0 1 0 33 0 0 0 2 0 34  CodeSnippet BufferedWriter BufferedWriter FileWriter CodeSnippet EvaluationContext getCodeSnippetSource CodeSnippet FileInputStream FileInputStream CodeSnippet readContentsAsBytes StringBuffer StringBuffer getCodeSnippetBytes toString getCodeSnippetBytes
Returns the source of the Code Snippet class This is used to generate the binary of the Code Snippet Class public static String get Code Snippet Source return package org eclipse jdt internal eval target n NON NLS 1 n NON NLS 1 n NON NLS 1 c Copyright IBM Corp 2000 2001 n NON NLS 1 All Rights Reserved n NON NLS 1 n NON NLS 1 n NON NLS 1 The root of all code snippet classes Code snippet classes n NON NLS 1 are supposed to overide the run method n NON NLS 1 p n NON NLS 1 IMPORTANT NOTE n NON NLS 1 All methods in this class must be public since this class is going to be loaded by the n NON NLS 1 bootstrap class loader and the other code snippet support classes might be loaded by n NON NLS 1 another class loader so their runtime packages are going to be different n NON NLS 1 n NON NLS 1 public class Code Snippet n NON NLS 1 private Class result Type void class n NON NLS 1 private Object result Value null n NON NLS 1 n NON NLS 1 Returns the result type of the code snippet evaluation n NON NLS 1 n NON NLS 1 public Class get Result Type n NON NLS 1 return this result Type n NON NLS 1 n NON NLS 1 n NON NLS 1 Returns the result value of the code snippet evaluation n NON NLS 1 n NON NLS 1 public Object get Result Value n NON NLS 1 return this result Value n NON NLS 1 n NON NLS 1 n NON NLS 1 The code snippet Subclasses must override this method with a transformed code snippet n NON NLS 1 that stores the result using set Result Class Object n NON NLS 1 n NON NLS 1 public void run n NON NLS 1 n NON NLS 1 n NON NLS 1 Stores the result type and value of the code snippet evaluation n NON NLS 1 n NON NLS 1 public void set Result Object some Result Value Class some Result Type n NON NLS 1 this result Value some Result Value n NON NLS 1 this result Type some Result Type n NON NLS 1 n NON NLS 1 n NON NLS 1  CodeSnippet CodeSnippetClass getCodeSnippetSource CodeSnippet resultType resultValue getResultType resultType getResultValue resultValue setResult setResult someResultValue someResultType resultValue someResultValue resultType someResultType
Returns the imports of this evaluation context An import is the name of a package or the fully qualified name of a type as defined in the import statement of a compilation unit public char get Imports return this imports  getImports
Returns the dot separated name of the package code snippets are run into Returns an empty array for the default package This is the default if the package name has never been set public char get Package Name return this package Name  getPackageName packageName
Return the binary for the root code snippet class ie org eclipse jdt internal eval target Code Snippet I Binary Type get Root Code Snippet Binary if this code Snippet Binary null this code Snippet Binary new Code Snippet Skeleton return this code Snippet Binary  CodeSnippet IBinaryType getRootCodeSnippetBinary codeSnippetBinary codeSnippetBinary CodeSnippetSkeleton codeSnippetBinary
Creates a new global variable with the given name type and initializer If the variable is not initialized the initializer can be null Note that this doesn t install it to this evaluation context s VM see Global Variable public Global Variable new Variable char type Name char name char initializer Global Variable var new Global Variable type Name name initializer if this variable Count this variables length assume variables is never empty System arraycopy this variables 0 this variables new Global Variable this variable Count 2 0 this variable Count this variables this variable Count var this vars Changed true return var  GlobalVariable GlobalVariable newVariable typeName GlobalVariable GlobalVariable typeName variableCount GlobalVariable variableCount variableCount variableCount varsChanged
Computes the selection at the specified positions of the given code snippet Note that this evaluation context s VM doesn t need to be running param code Snippet char The code snipper source param selection Source Start int param selection Source End int param environment org eclipse jdt internal codeassist I Searchable Name Environment used to resolve type package references and search for types packages based on partial names param requestor org eclipse jdt internal codeassist I Selection Requestor since the engine might produce answers of various forms the engine is associated with a requestor able to accept all possible selections param options java util Map set of options used to configure the code assist engine public void select char code Snippet int selection Source Start int selection Source End I Searchable Name Environment environment I Selection Requestor requestor Map options final char class Name Code Snippet Selection to Char Array NON NLS 1 final Code Snippet To Cu Mapper mapper new Code Snippet To Cu Mapper code Snippet this package Name this imports class Name this installed Vars null null this installed Vars class Name this local Variable Names this local Variable Type Names this local Variable Modifiers this declaring Type Name I Compilation Unit source Unit new I Compilation Unit public char get File Name return Char Operation concat class Name SUFFIX java public char get Contents return mapper getCU Source public char get Main Type Name return class Name public char get Package Name return null Selection Engine engine new Selection Engine environment mapper get Selection Requestor requestor options engine select source Unit mapper start Pos Offset selection Source Start mapper start Pos Offset selection Source End  codeSnippet selectionSourceStart selectionSourceEnd ISearchableNameEnvironment ISelectionRequestor codeSnippet selectionSourceStart selectionSourceEnd ISearchableNameEnvironment ISelectionRequestor className CodeSnippetSelection toCharArray CodeSnippetToCuMapper CodeSnippetToCuMapper codeSnippet packageName className installedVars installedVars className localVariableNames localVariableTypeNames localVariableModifiers declaringTypeName ICompilationUnit sourceUnit ICompilationUnit getFileName CharOperation className SUFFIX_java getContents getCUSource getMainTypeName className getPackageName SelectionEngine SelectionEngine getSelectionRequestor sourceUnit startPosOffset selectionSourceStart startPosOffset selectionSourceEnd
Sets the imports of this evaluation context An import is the name of a package or the fully qualified name of a type as defined in the import statement of a compilation unit see the Java Language Specifications for more details public void set Imports char imports this imports imports this vars Changed true this may change the visibility of the variable s types  setImports varsChanged
Sets the dot separated name of the package code snippets are ran into The default package name is an empty array public void set Package Name char package Name this package Name package Name this vars Changed true this may change the visibility of the variable s types  setPackageName packageName packageName packageName varsChanged

public Evaluation Result char evaluationID int evaluation Type char display String char type Name this evaluationID evaluationID this evaluation Type evaluation Type this display String display String this type Name type Name this problems NO PROBLEMS  EvaluationResult evaluationType displayString typeName evaluationType evaluationType displayString displayString typeName typeName NO_PROBLEMS
public Evaluation Result char evaluationID int evaluation Type I Problem problems this evaluationID evaluationID this evaluation Type evaluation Type this problems problems  EvaluationResult evaluationType IProblem evaluationType evaluationType
Adds the given problem to the list of problems of this evaluation result void add Problem I Problem problem I Problem existing Problems this problems int existing Length existing Problems length this problems new I Problem existing Length 1 System arraycopy existing Problems 0 this problems 0 existing Length this problems existing Length problem  addProblem IProblem IProblem existingProblems existingLength existingProblems IProblem existingLength existingProblems existingLength existingLength
Returns the ID of the evaluation If the result is about a global variable returns the name of the variable If the result is about a code snippet returns the code snippet If the result is about an import returns the import If the result is about a package declaration returns the package declaration public char get EvaluationID return this evaluationID  getEvaluationID
Returns the type of evaluation this result is about This indicates if the result is about a global variable a code snippet an import or a package declaration Use get EvaluationID to get the object itself public int get Evaluation Type return this evaluation Type  getEvaluationID getEvaluationType evaluationType
Returns an array of problems errors and warnings encountered during the compilation of a code snippet or a global variable definition or during the analysis of a package name or an import Returns an empty array if there are no problems public I Problem get Problems return this problems  IProblem getProblems
Returns a proxy object on this result s value Returns null if the result s value is null The returned value is undefined if there is no result The proxy object is expected to answer questions like What is the proxy type for this object What is the to String representation for this object What are the field names of this object What is the value for a given field name Special proxy objects are expected if the value is a primitive type public Object get Value return null Not yet implemented  toString getValue
Returns the displayable representation of this result s value This is obtained by sending to String to the result object on the target side if it is not a primitive value If it is a primitive value the corresponding static to String is used eg Integer to String int n if it is an int Returns null if there is no value public char get Value Display String return this display String  toString toString toString getValueDisplayString displayString
Returns the dot separated fully qualified name of this result s value type If the value is a primitive value returns the to String representation of its type eg int boolean etc Returns null if there is no value public char get Value Type Name return this type Name  toString getValueTypeName typeName
Returns whether there are errors in the code snippet or the global variable definition public boolean has Errors if this problems null return false else for int i 0 i this problems length i if this problems i is Error return true return false  hasErrors isError
Returns whether there are problems in the code snippet or the global variable definition public boolean has Problems return this problems null this problems length 0  hasProblems
Returns whether this result has a value public boolean has Value return this display String null  hasValue displayString
Returns whether there are warnings in the code snippet or the global variable definition public boolean has Warnings if this problems null return false else for int i 0 i this problems length i if this problems i is Warning return true return false  hasWarnings isWarning
Returns a readable representation of this result This is for debugging purpose only public String to String String Buffer buffer new String Buffer switch this evaluation Type case T CODE SNIPPET buffer append Code snippet NON NLS 1 break case T IMPORT buffer append Import NON NLS 1 break case T INTERNAL buffer append Internal problem NON NLS 1 break case T PACKAGE buffer append Package NON NLS 1 break case T VARIABLE buffer append Global variable NON NLS 1 break buffer append NON NLS 1 buffer append this evaluationID null unknown to Char Array this evaluationID NON NLS 1 buffer append n NON NLS 1 if has Problems buffer append Problems n NON NLS 1 for int i 0 i this problems length i buffer append this problems i to String else if has Value buffer append NON NLS 1 buffer append this type Name buffer append NON NLS 1 buffer append this display String else buffer append No explicit return value NON NLS 1 return buffer to String  toString StringBuffer StringBuffer evaluationType T_CODE_SNIPPET T_IMPORT T_INTERNAL T_PACKAGE T_VARIABLE toCharArray hasProblems toString hasValue typeName displayString toString

I Problem Factory problem Factory Creates a new evaluator Evaluator Evaluation Context context I Name Environment environment Map options I Requestor requestor I Problem Factory problem Factory this context context this environment environment this options options this requestor requestor this problem Factory problem Factory  IProblemFactory problemFactory EvaluationContext INameEnvironment IRequestor IProblemFactory problemFactory problemFactory problemFactory
Adds the given problem to the corresponding evaluation result in the given table If the evaluation result doesn t exist yet adds it in the table Its evaluation id and evaluation type are computed so that they correspond to the given problem If it is found to be an internal problem then the evaluation id of the result is the given compilation unit source 
protected abstract void add Evaluation Result For Compilation Problem Map results ByI Ds I Problem problem char cu Source Returns the evaluation results that converts the given compilation result that has problems If the compilation result has more than one problem then the problems are broken down so that each evaluation result has the same evaluation id protected Evaluation Result evaluation Results For Compilation Problems Compilation Result result char cu Source Break down the problems and group them by ids in evaluation results I Problem problems result get All Problems Hash Map results ByI Ds new Hash Map 5 for int i 0 i problems length i add Evaluation Result For Compilation Problem results ByI Ds problems i cu Source Copy results int size results ByI Ds size Evaluation Result eval Results new Evaluation Result size Iterator results results ByI Ds values iterator for int i 0 i size i eval Results i Evaluation Result results next return eval Results  addEvaluationResultForCompilationProblem resultsByIDs IProblem cuSource EvaluationResult evaluationResultsForCompilationProblems CompilationResult cuSource IProblem getAllProblems HashMap resultsByIDs HashMap addEvaluationResultForCompilationProblem resultsByIDs cuSource resultsByIDs EvaluationResult evalResults EvaluationResult resultsByIDs evalResults EvaluationResult evalResults
Compiles and returns the class definitions for the current compilation unit Returns null if there are any errors Class File get Classes final char source get Source final Array List class Definitions new Array List The requestor collects the class definitions and problems class Compiler Requestor implements I Compiler Requestor boolean has Errors false public void accept Result Compilation Result result if result has Problems Evaluation Result eval Results evaluation Results For Compilation Problems result source for int i 0 i eval Results length i Evaluation Result eval Result eval Results i I Problem problems eval Result get Problems for int j 0 j problems length j Evaluator this requestor accept Problem problems j eval Result get EvaluationID eval Result get Evaluation Type if result has Errors this has Errors true else Class File class Files result get Class Files for int i 0 i class Files length i Class File class File class Files i char filename class File file Name int length filename length char relative Name new char length 6 System arraycopy filename 0 relative Name 0 length System arraycopy class to Char Array 0 relative Name length 6 Char Operation replace relative Name java io File separator Char Class File write To Disk d test snippet new String relative Name class File get Bytes String str d test snippet new String relative Name System out println org eclipse jdt core tools classfmt disassembler Class File Disassembler disassemble str class Definitions add class File Compile compilation unit Compiler Requestor compiler Requestor new Compiler Requestor Compiler compiler get Compiler compiler Requestor compiler compile new I Compilation Unit new I Compilation Unit public char get File Name Name of class is name of CU return Char Operation concat Evaluator this get Class Name Suffix Constants SUFFIX java NON NLS 1 public char get Contents return source public char get Main Type Name return Evaluator this get Class Name public char get Package Name return null if compiler Requestor has Errors return null else Class File result new Class File class Definitions size class Definitions to Array result return result  ClassFile getClasses getSource ArrayList classDefinitions ArrayList CompilerRequestor ICompilerRequestor hasErrors acceptResult CompilationResult hasProblems EvaluationResult evalResults evaluationResultsForCompilationProblems evalResults EvaluationResult evalResult evalResults IProblem evalResult getProblems acceptProblem evalResult getEvaluationID evalResult getEvaluationType hasErrors hasErrors ClassFile classFiles getClassFiles classFiles ClassFile classFile classFiles classFile fileName relativeName relativeName toCharArray relativeName CharOperation relativeName separatorChar ClassFile writeToDisk relativeName classFile getBytes relativeName ClassFileDisassembler classDefinitions classFile CompilerRequestor compilerRequestor CompilerRequestor getCompiler compilerRequestor ICompilationUnit ICompilationUnit getFileName CharOperation getClassName SuffixConstants SUFFIX_java getContents getMainTypeName getClassName getPackageName compilerRequestor hasErrors ClassFile ClassFile classDefinitions classDefinitions toArray
Returns the name of the current class This is the simple name of the class This doesn t include the extension java nor the name of the package 
protected abstract char get Class Name Creates and returns a compiler for this evaluator Compiler get Compiler I Compiler Requestor compiler Requestor return new Compiler this environment Default Error Handling Policies exit After All Problems this options compiler Requestor this problem Factory  getClassName getCompiler ICompilerRequestor compilerRequestor DefaultErrorHandlingPolicies exitAfterAllProblems compilerRequestor problemFactory
this problem Factory Builds and returns the source for the current compilation unit protected abstract char get Source  problemFactory getSource

int initializer Line Start 1 line in the global variable class definition Creates a new global variable with the given type name name and initializer initializer can be null if there is none public Global Variable char type Name char name char initializer this type Name type Name this name name this initializer initializer  initializerLineStart GlobalVariable typeName typeName typeName
Returns the initializer of this global variable The initializer is a variable initializer ie an expression or an array initializer as defined in the Java Language Specifications public char get Initializer return this initializer  getInitializer
Returns the name of this global variable public char get Name return this name  getName
Returns the dot separated fully qualified name of the type of this global variable or its simple representation if it is a primitive type eg int boolean etc public char get Type Name return this type Name  getTypeName typeName
Returns a readable representation of the receiver This is for debugging purpose only public String to String String Buffer buffer new String Buffer buffer append this type Name buffer append NON NLS 1 buffer append this name if this initializer null buffer append NON NLS 1 buffer append this initializer buffer append NON NLS 1 return buffer to String  toString StringBuffer StringBuffer typeName toString

public class Install Exception extends Exception Constructs a code Install Exception code with no detail message public Install Exception super  InstallException InstallException InstallException
Constructs a code Install Exception code with the specified detail message param s the detail message public Install Exception String s super s  InstallException InstallException

public interface I Requestor see org eclipse jdt core eval I Code Snippet Requestor boolean accept Class Files Class File class Files char code Snippet Class Name  IRequestor ICodeSnippetRequestor acceptClassFiles ClassFile classFiles codeSnippetClassName
boolean accept Class Files Class File class Files char code Snippet Class Name see org eclipse jdt core eval I Code Snippet Requestor void accept Problem I Problem problem char fragment Source int fragment Kind  acceptClassFiles ClassFile classFiles codeSnippetClassName ICodeSnippetRequestor acceptProblem IProblem fragmentSource fragmentKind

int start Pos Offset 0 Creates a new global variables evaluator Variables Evaluator Evaluation Context context I Name Environment environment Map options I Requestor requestor I Problem Factory problem Factory super context environment options requestor problem Factory  startPosOffset VariablesEvaluator EvaluationContext INameEnvironment IRequestor IProblemFactory problemFactory problemFactory
see org eclipse jdt internal eval Evaluator protected void add Evaluation Result For Compilation Problem Map results ByI Ds I Problem problem char cu Source set evaluation id and type to an internal problem by default char evaluationID cu Source int evaluation Type Evaluation Result T INTERNAL int pb Line problem get Source Line Number int current Line 1 check package declaration char package Name get Package Name if package Name length 0 if pb Line 1 set evaluation id and type evaluationID package Name evaluation Type Evaluation Result T PACKAGE shift line number source start and source end problem set Source Line Number 1 problem set Source Start 0 problem set Source End evaluationID length 1 current Line check imports char imports this context imports if current Line pb Line pb Line current Line imports length set evaluation id and type evaluationID imports pb Line current Line evaluation Type Evaluation Result T IMPORT shift line number source start and source end problem set Source Line Number 1 problem set Source Start 0 problem set Source End evaluationID length 1 current Line imports length 1 1 to skip the class declaration line check variable declarations int var Count this context variable Count if current Line pb Line pb Line current Line var Count Global Variable var this context variables pb Line current Line set evaluation id and type evaluationID var get Name evaluation Type Evaluation Result T VARIABLE shift line number source start and source end int pb Start problem get Source Start var declaration Start int pb End problem get Source End var declaration Start int type Length var get Type Name length if 0 pb Start pb End type Length problem on the type of the variable problem set Source Line Number 1 else problem on the name of the variable pb Start type Length 1 type length space pb End type Length 1 type length space problem set Source Line Number 0 problem set Source Start pb Start problem set Source End pb End current Line 1 not needed any longer check variable initializers for int i 0 i var Count i Global Variable var this context variables i char initializer var get Initializer int initializer Length initializer null 0 initializer length if var initializer Start problem get Source Start problem get Source End var initializer Start var name length Problem with the variable name Ignore because it must have already been reported when checking the declaration return else if var init Expression Start problem get Source Start problem get Source End var init Expression Start initializer Length set evaluation id and type evaluationID var name evaluation Type Evaluation Result T VARIABLE shift line number source start and source end problem set Source Line Number pb Line var initializer Line Start 1 problem set Source Start problem get Source Start var init Expression Start problem set Source End problem get Source End var init Expression Start break Evaluation Result result Evaluation Result results ByI Ds get evaluationID if result null results ByI Ds put evaluationID new Evaluation Result evaluationID evaluation Type new I Problem problem else result add Problem problem  addEvaluationResultForCompilationProblem resultsByIDs IProblem cuSource cuSource evaluationType EvaluationResult T_INTERNAL pbLine getSourceLineNumber currentLine packageName getPackageName packageName pbLine packageName evaluationType EvaluationResult T_PACKAGE setSourceLineNumber setSourceStart setSourceEnd currentLine currentLine pbLine pbLine currentLine pbLine currentLine evaluationType EvaluationResult T_IMPORT setSourceLineNumber setSourceStart setSourceEnd currentLine varCount variableCount currentLine pbLine pbLine currentLine varCount GlobalVariable pbLine currentLine getName evaluationType EvaluationResult T_VARIABLE pbStart getSourceStart declarationStart pbEnd getSourceEnd declarationStart typeLength getTypeName pbStart pbEnd typeLength setSourceLineNumber pbStart typeLength pbEnd typeLength setSourceLineNumber setSourceStart pbStart setSourceEnd pbEnd currentLine varCount GlobalVariable getInitializer initializerLength initializerStart getSourceStart getSourceEnd initializerStart initExpressionStart getSourceStart getSourceEnd initExpressionStart initializerLength evaluationType EvaluationResult T_VARIABLE setSourceLineNumber pbLine initializerLineStart setSourceStart getSourceStart initExpressionStart setSourceEnd getSourceEnd initExpressionStart EvaluationResult EvaluationResult resultsByIDs resultsByIDs EvaluationResult evaluationType IProblem addProblem
see org eclipse jdt internal eval Evaluator protected char get Class Name return Char Operation concat Evaluation Constants GLOBAL VARS CLASS NAME PREFIX Integer to String Evaluation Context VAR CLASS COUNTER 1 to Char Array  getClassName CharOperation EvaluationConstants GLOBAL_VARS_CLASS_NAME_PREFIX toString EvaluationContext VAR_CLASS_COUNTER toCharArray
Creates and returns a compiler for this evaluator Compiler get Compiler I Compiler Requestor compiler Requestor Compiler compiler super get Compiler compiler Requestor Initialize the compiler s lookup environment with the already compiled super class I Binary Type binary Type this context get Root Code Snippet Binary if binary Type null compiler lookup Environment cache Binary Type binary Type and the installed global variable classes Variables Info installed Vars this context installed Vars if installed Vars null Class File class Files installed Vars class Files for int i 0 i class Files length i Class File class File class Files i I Binary Type binary null try binary new Class File Reader class File get Bytes null catch Class Format Exception e e print Stack Trace Should never happen since we compiled this type compiler lookup Environment cache Binary Type binary return compiler  getCompiler ICompilerRequestor compilerRequestor getCompiler compilerRequestor IBinaryType binaryType getRootCodeSnippetBinary binaryType lookupEnvironment cacheBinaryType binaryType VariablesInfo installedVars installedVars installedVars ClassFile classFiles installedVars classFiles classFiles ClassFile classFile classFiles IBinaryType ClassFileReader classFile getBytes ClassFormatException printStackTrace lookupEnvironment cacheBinaryType
Returns the name of package of the current compilation unit protected char get Package Name return this context package Name  getPackageName packageName
see org eclipse jdt internal eval Evaluator protected char get Source String Buffer buffer new String Buffer int line Number Offset 1 package declaration char package Name get Package Name if package Name length 0 buffer append package NON NLS 1 buffer append package Name buffer append append Util LINE SEPARATOR line Number Offset import declarations char imports this context imports for int i 0 i imports length i buffer append import NON NLS 1 buffer append imports i buffer append append Util LINE SEPARATOR line Number Offset class declaration buffer append public class NON NLS 1 buffer append get Class Name buffer append extends NON NLS 1 buffer append PACKAGE NAME buffer append NON NLS 1 buffer append ROOT CLASS NAME buffer append append Util LINE SEPARATOR NON NLS 1 line Number Offset this start Pos Offset buffer length field declarations Global Variable vars this context variables Variables Info installed Vars this context installed Vars for int i 0 i this context variable Count i Global Variable var vars i buffer append tpublic static NON NLS 1 var declaration Start buffer length buffer append var type Name buffer append NON NLS 1 char var Name var name buffer append var Name buffer append append Util LINE SEPARATOR line Number Offset field initializations buffer append tstatic append Util LINE SEPARATOR NON NLS 1 line Number Offset for int i 0 i this context variable Count i Global Variable var vars i char var Name var name Global Variable installed Var installed Vars null null installed Vars var Named var Name if installed Var null Char Operation equals installed Var type Name var type Name Initialize with initializer if there was no previous value char initializer var initializer if initializer null buffer append t ttry append Util LINE SEPARATOR NON NLS 1 line Number Offset var initializer Line Start line Number Offset buffer append t t t NON NLS 1 var initializer Start buffer length buffer append var Name buffer append NON NLS 1 var init Expression Start buffer length buffer append initializer line Number Offset number OfC Rs initializer buffer append append Util LINE SEPARATOR buffer append t t catch Throwable e append Util LINE SEPARATOR NON NLS 1 buffer append t t te print Stack Trace append Util LINE SEPARATOR NON NLS 1 buffer append t t append Util LINE SEPARATOR NON NLS 1 line Number Offset 4 4 C Rs else Initialize with previous value if name and type are the same buffer append t t NON NLS 1 buffer append var Name buffer append NON NLS 1 char installed Package Name installed Vars package Name if installed Package Name null installed Package Name length 0 buffer append installed Package Name buffer append NON NLS 1 buffer append installed Vars class Name buffer append NON NLS 1 buffer append var Name buffer append append Util LINE SEPARATOR line Number Offset buffer append t append Util LINE SEPARATOR NON NLS 1 end of class declaration buffer append append Util LINE SEPARATOR return result int length buffer length char result new char length buffer get Chars 0 length result 0 return result  getSource StringBuffer StringBuffer lineNumberOffset packageName getPackageName packageName packageName LINE_SEPARATOR lineNumberOffset LINE_SEPARATOR lineNumberOffset getClassName PACKAGE_NAME ROOT_CLASS_NAME LINE_SEPARATOR lineNumberOffset startPosOffset GlobalVariable VariablesInfo installedVars installedVars variableCount GlobalVariable declarationStart typeName varName varName LINE_SEPARATOR lineNumberOffset LINE_SEPARATOR lineNumberOffset variableCount GlobalVariable varName GlobalVariable installedVar installedVars installedVars varNamed varName installedVar CharOperation installedVar typeName typeName LINE_SEPARATOR lineNumberOffset initializerLineStart lineNumberOffset initializerStart varName initExpressionStart lineNumberOffset numberOfCRs LINE_SEPARATOR LINE_SEPARATOR printStackTrace LINE_SEPARATOR LINE_SEPARATOR lineNumberOffset CRs varName installedPackageName installedVars packageName installedPackageName installedPackageName installedPackageName installedVars className varName LINE_SEPARATOR lineNumberOffset LINE_SEPARATOR LINE_SEPARATOR getChars
Returns the number of cariage returns included in the given source private int number OfC Rs char source int number OfC Rs 0 boolean last WasCR false for int i 0 i source length i char current Char source i switch current Char case r last WasCR true number OfC Rs break case n if last WasCR number OfC Rs merge CR LF last WasCR false break default last WasCR false return number OfC Rs  numberOfCRs numberOfCRs lastWasCR currentChar currentChar lastWasCR numberOfCRs lastWasCR numberOfCRs lastWasCR lastWasCR numberOfCRs

Class File class Files Creates a new variables info The name of the global variable class is the simple name of this class The package name can be null if the variables have been defined in the default package public Variables Info char package Name char class Name Class File class Files Global Variable variables int variable Count this package Name package Name this class Name class Name this class Files class Files this variables variables this variable Count variable Count  ClassFile classFiles VariablesInfo packageName className ClassFile classFiles GlobalVariable variableCount packageName packageName className className classFiles classFiles variableCount variableCount
Returns the index of the given variable Returns 1 if not found int index Of Global Variable var for int i 0 i this variable Count i if var equals this variables i return i return 1  indexOf GlobalVariable variableCount
Returns the variable with the given name Returns null if not found Global Variable var Named char name Global Variable vars this variables for int i 0 i this variable Count i Global Variable var vars i if Char Operation equals name var name return var return null  GlobalVariable varNamed GlobalVariable variableCount GlobalVariable CharOperation

Throwable nested Exception public Abort Formatting String message super message  nestedException AbortFormatting
super message public Abort Formatting Throwable nested Exception super nested Exception get Message this nested Exception nested Exception  AbortFormatting nestedException nestedException getMessage nestedException nestedException

location to align and break on public Alignment String name int mode int tie Break Rule Scribe scribe int fragment Count int source Restart int continuation Indent this name name this location new Location scribe source Restart this mode mode this tie Break Rule tie Break Rule this fragment Count fragment Count this scribe scribe this original Indentation Level this scribe indentation Level this was Split false initialize the break indentation level using modes and continuation Indentation Level preference final int indent Size this scribe use Tab 1 this scribe tab Size int current Column this location output Column if current Column 1 current Column this location output Indentation Level indent Size 1 if mode M INDENT ON COLUMN 0 indent broken fragments at next indentation level based on current column this break Indentation Level this scribe get Next Indentation Level current Column if this break Indentation Level this location output Indentation Level this break Indentation Level continuation Indent indent Size else if mode M INDENT BY ONE 0 indent broken fragments exactly one level deeper than current indentation this break Indentation Level this location output Indentation Level indent Size else indent broken fragments by one continuation indentation deeper than current indentation this break Indentation Level this location output Indentation Level continuation Indent indent Size this shift Break Indentation Level this break Indentation Level indent Size this fragment Indentations new int this fragment Count this fragment Breaks new int this fragment Count check for forced alignments if this mode M FORCE 0 could Break  tieBreakRule fragmentCount sourceRestart continuationIndent sourceRestart tieBreakRule tieBreakRule fragmentCount fragmentCount originalIndentationLevel indentationLevel wasSplit continuationIndentationLevel indentSize useTab tabSize currentColumn outputColumn currentColumn currentColumn outputIndentationLevel indentSize M_INDENT_ON_COLUMN breakIndentationLevel getNextIndentationLevel currentColumn breakIndentationLevel outputIndentationLevel breakIndentationLevel continuationIndent indentSize M_INDENT_BY_ONE breakIndentationLevel outputIndentationLevel indentSize breakIndentationLevel outputIndentationLevel continuationIndent indentSize shiftBreakIndentationLevel breakIndentationLevel indentSize fragmentIndentations fragmentCount fragmentBreaks fragmentCount M_FORCE couldBreak
public boolean check Chunk Start int kind int start Index int source Restart if this chunk Kind kind this chunk Kind kind when redoing same chunk alignment must not reset if start Index this chunk Start Index this chunk Start Index start Index this location update this scribe source Restart reset return true return false  checkChunkStart startIndex sourceRestart chunkKind chunkKind startIndex chunkStartIndex chunkStartIndex startIndex sourceRestart
public void check Column if this mode M MULTICOLUMN 0 int current Indentation this scribe get Next Indentation Level this scribe column this scribe need Space 1 0 int fragment Indentation this fragment Indentations this fragment Index if current Indentation fragment Indentation this fragment Indentations this fragment Index current Indentation if fragment Indentation 0 for int i this fragment Index 1 i this fragment Count i this fragment Indentations i 0 this need Redo Column Alignment true backtrack only once all fragments got checked if this need Redo Column Alignment this fragment Index this fragment Count 1 alignment too small if Code Formatter Visitor DEBUG System out println ALIGNMENT TOO SMALL System out println this this need Redo Column Alignment false int relative Depth 0 Alignment target Alignment this scribe member Alignment while target Alignment null if target Alignment this throw new Alignment Exception Alignment Exception ALIGN TOO SMALL relative Depth target Alignment target Alignment enclosing relative Depth  checkColumn M_MULTICOLUMN currentIndentation getNextIndentationLevel needSpace fragmentIndentation fragmentIndentations fragmentIndex currentIndentation fragmentIndentation fragmentIndentations fragmentIndex currentIndentation fragmentIndentation fragmentIndex fragmentCount fragmentIndentations needRedoColumnAlignment needRedoColumnAlignment fragmentIndex fragmentCount CodeFormatterVisitor needRedoColumnAlignment relativeDepth targetAlignment memberAlignment targetAlignment targetAlignment AlignmentException AlignmentException ALIGN_TOO_SMALL relativeDepth targetAlignment targetAlignment relativeDepth
public boolean could Break int i switch mode SPLIT MASK aligned fragment foo AAAAA BBBBB CCCC case M COMPACT FIRST BREAK SPLIT if this fragment Breaks 0 NONE this fragment Breaks 0 BREAK this fragment Indentations 0 this break Indentation Level return was Split true i this fragment Index do if this fragment Breaks i NONE this fragment Breaks i BREAK this fragment Indentations i this break Indentation Level return was Split true while i 0 break aligned fragment foo AAAAA BBBBB CCCC case M COMPACT SPLIT i this fragment Index do if this fragment Breaks i NONE this fragment Breaks i BREAK this fragment Indentations i this break Indentation Level return was Split true while i 0 break aligned fragment foo AAAAA BBBBB CCCC case M NEXT SHIFTED SPLIT if this fragment Breaks 0 NONE this fragment Breaks 0 BREAK this fragment Indentations 0 this break Indentation Level for i 1 i this fragment Count i this fragment Breaks i BREAK this fragment Indentations i this shift Break Indentation Level return was Split true break aligned fragment foo AAAAA BBBBB CCCC case M ONE PER LINE SPLIT if this fragment Breaks 0 NONE for i 0 i this fragment Count i this fragment Breaks i BREAK this fragment Indentations i this break Indentation Level return was Split true aligned fragment foo AAAAA BBBBB CCCC case M NEXT PER LINE SPLIT if this fragment Breaks 0 NONE if this fragment Count 1 this fragment Breaks 1 NONE if this mode M INDENT ON COLUMN 0 this fragment Indentations 0 this break Indentation Level for i 1 i this fragment Count i this fragment Breaks i BREAK this fragment Indentations i this break Indentation Level return was Split true break return false cannot split better  couldBreak SPLIT_MASK M_COMPACT_FIRST_BREAK_SPLIT fragmentBreaks fragmentBreaks fragmentIndentations breakIndentationLevel wasSplit fragmentIndex fragmentBreaks fragmentBreaks fragmentIndentations breakIndentationLevel wasSplit M_COMPACT_SPLIT fragmentIndex fragmentBreaks fragmentBreaks fragmentIndentations breakIndentationLevel wasSplit M_NEXT_SHIFTED_SPLIT fragmentBreaks fragmentBreaks fragmentIndentations breakIndentationLevel fragmentCount fragmentBreaks fragmentIndentations shiftBreakIndentationLevel wasSplit M_ONE_PER_LINE_SPLIT fragmentBreaks fragmentCount fragmentBreaks fragmentIndentations breakIndentationLevel wasSplit M_NEXT_PER_LINE_SPLIT fragmentBreaks fragmentCount fragmentBreaks M_INDENT_ON_COLUMN fragmentIndentations breakIndentationLevel fragmentCount fragmentBreaks fragmentIndentations breakIndentationLevel wasSplit
public Alignment get Alignment String target Name if target Name equals this name return this if this enclosing null return null return this enclosing get Alignment target Name  getAlignment targetName targetName getAlignment targetName
perform alignment effect for current fragment public void perform Fragment Effect if this mode M MULTICOLUMN 0 switch this mode SPLIT MASK case Alignment M COMPACT SPLIT case Alignment M COMPACT FIRST BREAK SPLIT case Alignment M NEXT PER LINE SPLIT case Alignment M NEXT SHIFTED SPLIT case Alignment M ONE PER LINE SPLIT break default return if this fragment Breaks this fragment Index BREAK this scribe print New Line if this fragment Indentations this fragment Index 0 this scribe indentation Level this fragment Indentations this fragment Index  performFragmentEffect M_MULTICOLUMN SPLIT_MASK M_COMPACT_SPLIT M_COMPACT_FIRST_BREAK_SPLIT M_NEXT_PER_LINE_SPLIT M_NEXT_SHIFTED_SPLIT M_ONE_PER_LINE_SPLIT fragmentBreaks fragmentIndex printNewLine fragmentIndentations fragmentIndex indentationLevel fragmentIndentations fragmentIndex
reset fragment indentation break status public void reset if fragment Count 0 this fragment Indentations new int this fragment Count this fragment Breaks new int this fragment Count check for forced alignments if mode M FORCE 0 could Break  fragmentCount fragmentIndentations fragmentCount fragmentBreaks fragmentCount M_FORCE couldBreak
public void to Fragments String String Buffer buffer default implementation  toFragmentsString StringBuffer
public String to String String Buffer buffer new String Buffer 10 buffer append get Class get Name append append name NON NLS 1 append this name append NON NLS 1 if this enclosing null buffer append enclosing Name NON NLS 1 append this enclosing name append buffer append n for int i 0 i this fragment Count i buffer append fragment NON NLS 1 append i append NON NLS 1 append break NON NLS 1 append this fragment Breaks i 0 YES NO NON NLS 1 NON NLS 2 append NON NLS 1 append indent NON NLS 1 append this fragment Indentations i append n NON NLS 1 buffer append n return buffer to String  toString StringBuffer StringBuffer getClass getName enclosingName fragmentCount fragmentBreaks fragmentIndentations toString
public void update for int i 1 i this fragment Count i if this fragment Breaks i BREAK this fragment Indentations i this break Indentation Level  fragmentCount fragmentBreaks fragmentIndentations breakIndentationLevel

public int relative Depth public Alignment Exception int reason int relative Depth this reason 0 relative Depth  relativeDepth AlignmentException relativeDepth relativeDepth
public Alignment Exception int reason int value int relative Depth this reason reason this value value this relative Depth relative Depth  AlignmentException relativeDepth relativeDepth relativeDepth
public String to String String Buffer buffer new String Buffer 10 switch this reason case LINE TOO LONG buffer append LINE TOO LONG NON NLS 1 break case ALIGN TOO SMALL buffer append ALIGN TOO SMALL NON NLS 1 break buffer append relative Depth NON NLS 1 append this relative Depth append n NON NLS 1 return buffer to String  toString StringBuffer StringBuffer LINE_TOO_LONG LINE_TOO_LONG ALIGN_TOO_SMALL ALIGN_TOO_SMALL relativeDepth relativeDepth toString

Binary Expression Fragment Builder this fragments List new Array List this operators List new Array List this real Fragments Size 0  BinaryExpressionFragmentBuilder fragmentsList ArrayList operatorsList ArrayList realFragmentsSize
private final void add Real Fragment AST Node node this fragments List add node this real Fragments Size  addRealFragment ASTNode fragmentsList realFragmentsSize
private final void add Small Fragment AST Node node this fragments List add node  addSmallFragment ASTNode fragmentsList
private boolean build Fragments Expression expression if expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT 0 add Real Fragment expression return false else return true  buildFragments ASTNode ASTNode addRealFragment
public AST Node fragments AST Node fragments new AST Node this fragments List size this fragments List to Array fragments return fragments  ASTNode ASTNode ASTNode fragmentsList fragmentsList toArray
public int operators int length operators List size int tab new int length for int i 0 i length i tab i Integer operators List get i int Value return tab  operatorsList operatorsList intValue
public int real Fragments Size return this real Fragments Size  realFragmentsSize realFragmentsSize
public boolean visit Allocation Expression allocation Expression Block Scope scope this add Real Fragment allocation Expression return false  AllocationExpression allocationExpression BlockScope addRealFragment allocationExpression
public boolean visit AND AND Expression and and Expression Block Scope scope if and and Expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT 0 add Real Fragment and and Expression else and and Expression left traverse this scope this operators List add new Integer Terminal Tokens TokenNameAND AND and and Expression right traverse this scope return false  AND_AND_Expression and_and_Expression BlockScope and_and_Expression ASTNode ASTNode addRealFragment and_and_Expression and_and_Expression operatorsList TerminalTokens TokenNameAND_AND and_and_Expression
public boolean visit Array Allocation Expression array Allocation Expression Block Scope scope this add Real Fragment array Allocation Expression return false  ArrayAllocationExpression arrayAllocationExpression BlockScope addRealFragment arrayAllocationExpression
public boolean visit Array Initializer array Initializer Block Scope scope this add Real Fragment array Initializer return false  ArrayInitializer arrayInitializer BlockScope addRealFragment arrayInitializer
public boolean visit Array Qualified Type Reference array Qualified Type Reference Block Scope scope this add Real Fragment array Qualified Type Reference return false  ArrayQualifiedTypeReference arrayQualifiedTypeReference BlockScope addRealFragment arrayQualifiedTypeReference
public boolean visit Array Qualified Type Reference array Qualified Type Reference Class Scope scope this add Real Fragment array Qualified Type Reference return false  ArrayQualifiedTypeReference arrayQualifiedTypeReference ClassScope addRealFragment arrayQualifiedTypeReference
public boolean visit Array Reference array Reference Block Scope scope this add Real Fragment array Reference return false  ArrayReference arrayReference BlockScope addRealFragment arrayReference
public boolean visit Array Type Reference array Type Reference Block Scope scope this add Real Fragment array Type Reference return false  ArrayTypeReference arrayTypeReference BlockScope addRealFragment arrayTypeReference
public boolean visit Array Type Reference array Type Reference Class Scope scope this add Real Fragment array Type Reference return false  ArrayTypeReference arrayTypeReference ClassScope addRealFragment arrayTypeReference
public boolean visit Assignment assignment Block Scope scope this add Real Fragment assignment return false  BlockScope addRealFragment
public boolean visit Binary Expression binary Expression Block Scope scope final int number Of Parens binary Expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 this add Real Fragment binary Expression else switch binary Expression bits AST Node OperatorMASK AST Node OperatorSHIFT case Operator Ids PLUS if build Fragments binary Expression binary Expression left traverse this scope this operators List add new Integer Terminal Tokens Token NamePLUS binary Expression right traverse this scope return false case Operator Ids MINUS if build Fragments binary Expression binary Expression left traverse this scope this operators List add new Integer Terminal Tokens Token NameMINUS binary Expression right traverse this scope return false case Operator Ids MULTIPLY if build Fragments binary Expression binary Expression left traverse this scope this operators List add new Integer Terminal Tokens Token NameMULTIPLY binary Expression right traverse this scope return false case Operator Ids REMAINDER if build Fragments binary Expression binary Expression left traverse this scope this operators List add new Integer Terminal Tokens Token NameREMAINDER binary Expression right traverse this scope return false case Operator Ids XOR if build Fragments binary Expression binary Expression left traverse this scope this operators List add new Integer Terminal Tokens Token NameXOR binary Expression right traverse this scope return false case Operator Ids DIVIDE if build Fragments binary Expression binary Expression left traverse this scope this operators List add new Integer Terminal Tokens Token NameDIVIDE binary Expression right traverse this scope return false case Operator Ids OR if build Fragments binary Expression binary Expression left traverse this scope this operators List add new Integer Terminal Tokens Token NameOR binary Expression right traverse this scope return false case Operator Ids AND if build Fragments binary Expression binary Expression left traverse this scope this operators List add new Integer Terminal Tokens Token NameAND binary Expression right traverse this scope return false default this add Real Fragment binary Expression return false  BinaryExpression binaryExpression BlockScope numberOfParens binaryExpression ASTNode ASTNode numberOfParens addRealFragment binaryExpression binaryExpression ASTNode ASTNode OperatorIds buildFragments binaryExpression binaryExpression operatorsList TerminalTokens TokenNamePLUS binaryExpression OperatorIds buildFragments binaryExpression binaryExpression operatorsList TerminalTokens TokenNameMINUS binaryExpression OperatorIds buildFragments binaryExpression binaryExpression operatorsList TerminalTokens TokenNameMULTIPLY binaryExpression OperatorIds buildFragments binaryExpression binaryExpression operatorsList TerminalTokens TokenNameREMAINDER binaryExpression OperatorIds buildFragments binaryExpression binaryExpression operatorsList TerminalTokens TokenNameXOR binaryExpression OperatorIds buildFragments binaryExpression binaryExpression operatorsList TerminalTokens TokenNameDIVIDE binaryExpression OperatorIds buildFragments binaryExpression binaryExpression operatorsList TerminalTokens TokenNameOR binaryExpression OperatorIds buildFragments binaryExpression binaryExpression operatorsList TerminalTokens TokenNameAND binaryExpression addRealFragment binaryExpression
public boolean visit Cast Expression cast Expression Block Scope scope this add Real Fragment cast Expression return false  CastExpression castExpression BlockScope addRealFragment castExpression
public boolean visit Char Literal char Literal Block Scope scope this add Small Fragment char Literal return false  CharLiteral charLiteral BlockScope addSmallFragment charLiteral
public boolean visit Compound Assignment compound Assignment Block Scope scope this add Real Fragment compound Assignment return false  CompoundAssignment compoundAssignment BlockScope addRealFragment compoundAssignment
public boolean visit Conditional Expression conditional Expression Block Scope scope this add Real Fragment conditional Expression return false  ConditionalExpression conditionalExpression BlockScope addRealFragment conditionalExpression
public boolean visit Double Literal double Literal Block Scope scope this add Small Fragment double Literal return false  DoubleLiteral doubleLiteral BlockScope addSmallFragment doubleLiteral
public boolean visit Equal Expression equal Expression Block Scope scope this add Real Fragment equal Expression return false  EqualExpression equalExpression BlockScope addRealFragment equalExpression
public boolean visit Extended String Literal extended String Literal Block Scope scope this add Real Fragment extended String Literal return false  ExtendedStringLiteral extendedStringLiteral BlockScope addRealFragment extendedStringLiteral
public boolean visit False Literal false Literal Block Scope scope this add Small Fragment false Literal return false  FalseLiteral falseLiteral BlockScope addSmallFragment falseLiteral
public boolean visit Field Reference field Reference Block Scope scope this add Real Fragment field Reference return false  FieldReference fieldReference BlockScope addRealFragment fieldReference
public boolean visit Float Literal float Literal Block Scope scope this add Small Fragment float Literal return false  FloatLiteral floatLiteral BlockScope addSmallFragment floatLiteral
public boolean visit Instance Of Expression instance Of Expression Block Scope scope this add Real Fragment instance Of Expression return false  InstanceOfExpression instanceOfExpression BlockScope addRealFragment instanceOfExpression
public boolean visit Int Literal int Literal Block Scope scope this add Small Fragment int Literal return false  IntLiteral intLiteral BlockScope addSmallFragment intLiteral
public boolean visit Long Literal long Literal Block Scope scope this add Small Fragment long Literal return false  LongLiteral longLiteral BlockScope addSmallFragment longLiteral
public boolean visit Message Send message Send Block Scope scope this add Real Fragment message Send return false  MessageSend messageSend BlockScope addRealFragment messageSend
public boolean visit String Literal Concatenation string Literal Block Scope scope for int i 0 max string Literal counter i max i this add Real Fragment string Literal literals i if i max 1 this operators List add new Integer Terminal Tokens Token NamePLUS return false  StringLiteralConcatenation stringLiteral BlockScope stringLiteral addRealFragment stringLiteral operatorsList TerminalTokens TokenNamePLUS
public boolean visit Null Literal null Literal Block Scope scope this add Real Fragment null Literal return false  NullLiteral nullLiteral BlockScope addRealFragment nullLiteral
public boolean visit OR OR Expression or or Expression Block Scope scope if or or Expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT 0 add Real Fragment or or Expression else or or Expression left traverse this scope this operators List add new Integer Terminal Tokens TokenNameOR OR or or Expression right traverse this scope return false  OR_OR_Expression or_or_Expression BlockScope or_or_Expression ASTNode ASTNode addRealFragment or_or_Expression or_or_Expression operatorsList TerminalTokens TokenNameOR_OR or_or_Expression
public boolean visit Postfix Expression postfix Expression Block Scope scope this add Real Fragment postfix Expression return false  PostfixExpression postfixExpression BlockScope addRealFragment postfixExpression
public boolean visit Prefix Expression prefix Expression Block Scope scope this add Real Fragment prefix Expression return false  PrefixExpression prefixExpression BlockScope addRealFragment prefixExpression
public boolean visit Qualified Allocation Expression qualified Allocation Expression Block Scope scope this add Real Fragment qualified Allocation Expression return false  QualifiedAllocationExpression qualifiedAllocationExpression BlockScope addRealFragment qualifiedAllocationExpression
public boolean visit Qualified Name Reference qualified Name Reference Block Scope scope this add Real Fragment qualified Name Reference return false  QualifiedNameReference qualifiedNameReference BlockScope addRealFragment qualifiedNameReference
public boolean visit Qualified Super Reference qualified Super Reference Block Scope scope this add Real Fragment qualified Super Reference return false  QualifiedSuperReference qualifiedSuperReference BlockScope addRealFragment qualifiedSuperReference
public boolean visit Qualified This Reference qualified This Reference Block Scope scope this add Real Fragment qualified This Reference return false  QualifiedThisReference qualifiedThisReference BlockScope addRealFragment qualifiedThisReference
public boolean visit Single Name Reference single Name Reference Block Scope scope this add Real Fragment single Name Reference return false  SingleNameReference singleNameReference BlockScope addRealFragment singleNameReference
public boolean visit String Literal string Literal Block Scope scope this add Real Fragment string Literal return false  StringLiteral stringLiteral BlockScope addRealFragment stringLiteral
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Super Reference org eclipse jdt internal compiler lookup Block Scope public boolean visit Super Reference super Reference Block Scope scope this add Real Fragment super Reference return false  ASTVisitor SuperReference BlockScope SuperReference superReference BlockScope addRealFragment superReference
public boolean visit This Reference this Reference Block Scope scope this add Real Fragment this Reference return false  ThisReference thisReference BlockScope addRealFragment thisReference
public boolean visit True Literal true Literal Block Scope scope this add Small Fragment true Literal return false  TrueLiteral trueLiteral BlockScope addSmallFragment trueLiteral
public boolean visit Unary Expression unary Expression Block Scope scope this add Real Fragment unary Expression return false  UnaryExpression unaryExpression BlockScope addRealFragment unaryExpression
public int size return this fragments List size  fragmentsList

Array List fragments List Cascading Method Invocation Fragment Builder this fragments List new Array List  ArrayList fragmentsList CascadingMethodInvocationFragmentBuilder fragmentsList ArrayList
public Message Send fragments Message Send fragments new Message Send this fragments List size this fragments List to Array fragments return fragments  MessageSend MessageSend MessageSend fragmentsList fragmentsList toArray
public int size return this fragments List size  fragmentsList
public boolean visit Message Send message Send Block Scope scope if message Send receiver bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT 0 if message Send receiver instanceof Message Send this fragments List add 0 message Send message Send receiver traverse this scope return false this fragments List add 0 message Send this fragments List add 1 message Send else this fragments List add 0 message Send this fragments List add 1 message Send return false  MessageSend messageSend BlockScope messageSend ASTNode ASTNode messageSend MessageSend fragmentsList messageSend messageSend fragmentsList messageSend fragmentsList messageSend fragmentsList messageSend fragmentsList messageSend

Field Declaration declarations Multi Field Declaration Field Declaration declarations this declarations declarations this modifiers declarations 0 modifiers  FieldDeclaration MultiFieldDeclaration FieldDeclaration
public Code Formatter Visitor Default Code Formatter Options preferences Map settings int offset int length Code Snippet Parsing Util code Snippet Parsing Util if settings null Object assert Mode Setting settings get Java Core COMPILER SOURCE if assert Mode Setting null this local Scanner new Scanner true false false nls Java Core VERSION 1 4 equals assert Mode Setting Class File Constants JDK1 4 Class File Constants JDK1 3 source Level null task Tags null task Priorities true task Case Sensitive else this local Scanner new Scanner true false false nls Class File Constants JDK1 3 source Level null task Tags null task Priorities true task Case Sensitive else this local Scanner new Scanner true false false nls Class File Constants JDK1 3 source Level null task Tags null task Priorities true task Case Sensitive this preferences preferences this scribe new Scribe this settings offset length code Snippet Parsing Util  CodeFormatterVisitor DefaultCodeFormatterOptions CodeSnippetParsingUtil codeSnippetParsingUtil assertModeSetting JavaCore COMPILER_SOURCE assertModeSetting localScanner JavaCore VERSION_1_4 assertModeSetting ClassFileConstants JDK1_4 ClassFileConstants JDK1_3 sourceLevel taskTags taskPriorities taskCaseSensitive localScanner ClassFileConstants JDK1_3 sourceLevel taskTags taskPriorities taskCaseSensitive localScanner ClassFileConstants JDK1_3 sourceLevel taskTags taskPriorities taskCaseSensitive codeSnippetParsingUtil
see org eclipse jdt internal compiler AST Visitor accept Problem org eclipse jdt core compiler I Problem public void accept Problem I Problem problem super accept Problem problem  ASTVisitor acceptProblem IProblem acceptProblem IProblem acceptProblem
private Binary Expression Fragment Builder build Fragments Binary Expression binary Expression Block Scope scope Binary Expression Fragment Builder builder new Binary Expression Fragment Builder switch binary Expression bits AST Node OperatorMASK AST Node OperatorSHIFT case Operator Ids MULTIPLY binary Expression left traverse builder scope builder operators List add new Integer Terminal Tokens Token NameMULTIPLY binary Expression right traverse builder scope break case Operator Ids PLUS binary Expression left traverse builder scope builder operators List add new Integer Terminal Tokens Token NamePLUS binary Expression right traverse builder scope break case Operator Ids DIVIDE binary Expression left traverse builder scope builder operators List add new Integer Terminal Tokens Token NameDIVIDE binary Expression right traverse builder scope break case Operator Ids REMAINDER binary Expression left traverse builder scope builder operators List add new Integer Terminal Tokens Token NameREMAINDER binary Expression right traverse builder scope break case Operator Ids XOR binary Expression left traverse builder scope builder operators List add new Integer Terminal Tokens Token NameXOR binary Expression right traverse builder scope break case Operator Ids MINUS binary Expression left traverse builder scope builder operators List add new Integer Terminal Tokens Token NameMINUS binary Expression right traverse builder scope break case Operator Ids OR binary Expression left traverse builder scope builder operators List add new Integer Terminal Tokens Token NameOR binary Expression right traverse builder scope break case Operator Ids AND binary Expression left traverse builder scope builder operators List add new Integer Terminal Tokens Token NameAND binary Expression right traverse builder scope break case Operator Ids AND AND binary Expression left traverse builder scope builder operators List add new Integer Terminal Tokens TokenNameAND AND binary Expression right traverse builder scope break case Operator Ids OR OR binary Expression left traverse builder scope builder operators List add new Integer Terminal Tokens TokenNameOR OR binary Expression right traverse builder scope break return builder  BinaryExpressionFragmentBuilder buildFragments BinaryExpression binaryExpression BlockScope BinaryExpressionFragmentBuilder BinaryExpressionFragmentBuilder binaryExpression ASTNode ASTNode OperatorIds binaryExpression operatorsList TerminalTokens TokenNameMULTIPLY binaryExpression OperatorIds binaryExpression operatorsList TerminalTokens TokenNamePLUS binaryExpression OperatorIds binaryExpression operatorsList TerminalTokens TokenNameDIVIDE binaryExpression OperatorIds binaryExpression operatorsList TerminalTokens TokenNameREMAINDER binaryExpression OperatorIds binaryExpression operatorsList TerminalTokens TokenNameXOR binaryExpression OperatorIds binaryExpression operatorsList TerminalTokens TokenNameMINUS binaryExpression OperatorIds binaryExpression operatorsList TerminalTokens TokenNameOR binaryExpression OperatorIds binaryExpression operatorsList TerminalTokens TokenNameAND binaryExpression OperatorIds AND_AND binaryExpression operatorsList TerminalTokens TokenNameAND_AND binaryExpression OperatorIds OR_OR binaryExpression operatorsList TerminalTokens TokenNameOR_OR binaryExpression
private Cascading Method Invocation Fragment Builder build Fragments Message Send message Send Block Scope scope Cascading Method Invocation Fragment Builder builder new Cascading Method Invocation Fragment Builder message Send traverse builder scope return builder  CascadingMethodInvocationFragmentBuilder buildFragments MessageSend messageSend BlockScope CascadingMethodInvocationFragmentBuilder CascadingMethodInvocationFragmentBuilder messageSend
public boolean check Chunk Start int kind if this chunk Kind kind this chunk Kind kind return true return false  checkChunkStart chunkKind chunkKind
private boolean comment Starts Block int start int end this local Scanner reset To start end try if this local Scanner get Next Token Terminal Tokens Token NameLBRACE switch this local Scanner get Next Token case Terminal Tokens TokenNameCOMMENT BLOCK case Terminal Tokens TokenNameCOMMENT JAVADOC case Terminal Tokens TokenNameCOMMENT LINE return true catch Invalid Input Exception e ignore return false  commentStartsBlock localScanner resetTo localScanner getNextToken TerminalTokens TokenNameLBRACE localScanner getNextToken TerminalTokens TokenNameCOMMENT_BLOCK TerminalTokens TokenNameCOMMENT_JAVADOC TerminalTokens TokenNameCOMMENT_LINE InvalidInputException
private AST Node compute Merged Member Declarations Type Declaration type Declaration int field Index 0 field Count type Declaration fields null 0 type Declaration fields length Field Declaration field field Count 0 null type Declaration fields field Index int field Start field null Integer MAX VALUE field declaration Source Start int method Index 0 method Count type Declaration methods null 0 type Declaration methods length Abstract Method Declaration method method Count 0 null type Declaration methods method Index int method Start method null Integer MAX VALUE method declaration Source Start int type Index 0 type Count type Declaration member Types null 0 type Declaration member Types length Type Declaration type type Count 0 null type Declaration member Types type Index int type Start type null Integer MAX VALUE type declaration Source Start final int member Length field Count method Count type Count AST Node members new AST Node member Length if member Length 0 int index 0 int previous Field Start 1 do if field Start method Start field Start type Start next member is a field if field Start previous Field Start AST Node previous Member members index 1 if previous Member instanceof Multi Field Declaration Multi Field Declaration multi Field Multi Field Declaration previous Member int length multi Field declarations length System arraycopy multi Field declarations 0 multi Field declarations new Field Declaration length 1 0 length multi Field declarations length field else members index 1 new Multi Field Declaration new Field Declaration Field Declaration previous Member field else members index field previous Field Start field Start if field Index field Count find next field if any field Start field type Declaration fields field Index declaration Source Start else field Start Integer MAX VALUE else if method Start field Start method Start type Start next member is a method if method is Default Constructor method is Clinit members index method if method Index method Count find next method if any method Start method type Declaration methods method Index declaration Source Start else method Start Integer MAX VALUE else next member is a type members index type if type Index type Count find next type if any type Start type type Declaration member Types type Index declaration Source Start else type Start Integer MAX VALUE while field Index field Count type Index type Count method Index method Count if members length index System arraycopy members 0 members new AST Node index 0 index return members  ASTNode computeMergedMemberDeclarations TypeDeclaration typeDeclaration fieldIndex fieldCount typeDeclaration typeDeclaration FieldDeclaration fieldCount typeDeclaration fieldIndex fieldStart MAX_VALUE declarationSourceStart methodIndex methodCount typeDeclaration typeDeclaration AbstractMethodDeclaration methodCount typeDeclaration methodIndex methodStart MAX_VALUE declarationSourceStart typeIndex typeCount typeDeclaration memberTypes typeDeclaration memberTypes TypeDeclaration typeCount typeDeclaration memberTypes typeIndex typeStart MAX_VALUE declarationSourceStart memberLength fieldCount methodCount typeCount ASTNode ASTNode memberLength memberLength previousFieldStart fieldStart methodStart fieldStart typeStart fieldStart previousFieldStart ASTNode previousMember previousMember MultiFieldDeclaration MultiFieldDeclaration multiField MultiFieldDeclaration previousMember multiField multiField multiField FieldDeclaration multiField MultiFieldDeclaration FieldDeclaration FieldDeclaration previousMember previousFieldStart fieldStart fieldIndex fieldCount fieldStart typeDeclaration fieldIndex declarationSourceStart fieldStart MAX_VALUE methodStart fieldStart methodStart typeStart isDefaultConstructor isClinit methodIndex methodCount methodStart typeDeclaration methodIndex declarationSourceStart methodStart MAX_VALUE typeIndex typeCount typeStart typeDeclaration memberTypes typeIndex declarationSourceStart typeStart MAX_VALUE fieldIndex fieldCount typeIndex typeCount methodIndex methodCount ASTNode
private AST Node compute Merged Member Declarations AST Node nodes Array List merged Nodes new Array List for int i 0 max nodes length i max i AST Node current Node nodes i if current Node instanceof Field Declaration Field Declaration current Field Field Declaration current Node if merged Nodes size 0 first node merged Nodes add current Node else we need to check if the previous merged node is a field declaration AST Node previous Merged Node AST Node merged Nodes get merged Nodes size 1 if previous Merged Node instanceof Multi Field Declaration we merge the current node Multi Field Declaration multi Field Declaration Multi Field Declaration previous Merged Node int length multi Field Declaration declarations length System arraycopy multi Field Declaration declarations 0 multi Field Declaration declarations new Field Declaration length 1 0 length multi Field Declaration declarations length current Field else if previous Merged Node instanceof Field Declaration need to check we need to create a multiple field declaration if current Field declaration Source Start Field Declaration previous Merged Node declaration Source Start we create a multi field declaration merged Nodes set merged Nodes size 1 new Multi Field Declaration new Field Declaration Field Declaration previous Merged Node current Field else merged Nodes add current Node else merged Nodes add current Node if merged Nodes size nodes length AST Node result new AST Node merged Nodes size merged Nodes to Array result return result else return nodes  ASTNode computeMergedMemberDeclarations ASTNode ArrayList mergedNodes ArrayList ASTNode currentNode currentNode FieldDeclaration FieldDeclaration currentField FieldDeclaration currentNode mergedNodes mergedNodes currentNode ASTNode previousMergedNode ASTNode mergedNodes mergedNodes previousMergedNode MultiFieldDeclaration MultiFieldDeclaration multiFieldDeclaration MultiFieldDeclaration previousMergedNode multiFieldDeclaration multiFieldDeclaration multiFieldDeclaration FieldDeclaration multiFieldDeclaration currentField previousMergedNode FieldDeclaration currentField declarationSourceStart FieldDeclaration previousMergedNode declarationSourceStart mergedNodes mergedNodes MultiFieldDeclaration FieldDeclaration FieldDeclaration previousMergedNode currentField mergedNodes currentNode mergedNodes currentNode mergedNodes ASTNode ASTNode mergedNodes mergedNodes toArray
private boolean dump Binary Expression Binary Expression binary Expression int operator Block Scope scope final int number Of Parens binary Expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression binary Expression number Of Parens Binary Expression Fragment Builder builder build Fragments binary Expression scope final int fragments Size builder size if builder real Fragments Size 1 builder size 4 number Of Parens 0 this scribe print Comment Alignment binary Expression Alignment this scribe create Alignment binary Expression Alignment this preferences alignment for binary expression Alignment R OUTERMOST fragments Size this scribe scanner current Position NON NLS 1 this scribe enter Alignment binary Expression Alignment boolean ok false AST Node fragments builder fragments int operators builder operators do try for int i 0 i fragments Size 1 i AST Node fragment fragments i fragment traverse this scope this scribe print Trailing Comment if this scribe last Number Of New Lines 1 a new line has been inserted by print Trailing Comment this scribe indentation Level binary Expression Alignment break Indentation Level this scribe align Fragment binary Expression Alignment i this scribe print Next Token operators i this preferences insert space before binary operator if operators i Terminal Tokens Token NameMINUS is Minus the next character is a minus unary operator this scribe space if this preferences insert space after binary operator this scribe space fragments fragments Size 1 traverse this scope this scribe print Trailing Comment ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment binary Expression Alignment true else binary Expression left traverse this scope this scribe print Next Token operator this preferences insert space before binary operator if operator Terminal Tokens Token NameMINUS is Minus the next character is a minus unary operator this scribe space if this preferences insert space after binary operator this scribe space binary Expression right traverse this scope if number Of Parens 0 manage Closing Parenthesized Expression binary Expression number Of Parens return false  dumpBinaryExpression BinaryExpression binaryExpression BlockScope numberOfParens binaryExpression ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression binaryExpression numberOfParens BinaryExpressionFragmentBuilder buildFragments binaryExpression fragmentsSize realFragmentsSize numberOfParens printComment binaryExpressionAlignment createAlignment binaryExpressionAlignment alignment_for_binary_expression R_OUTERMOST fragmentsSize currentPosition enterAlignment binaryExpressionAlignment ASTNode fragmentsSize ASTNode printTrailingComment lastNumberOfNewLines printTrailingComment indentationLevel binaryExpressionAlignment breakIndentationLevel alignFragment binaryExpressionAlignment printNextToken insert_space_before_binary_operator TerminalTokens TokenNameMINUS isMinus insert_space_after_binary_operator fragmentsSize printTrailingComment AlignmentException redoAlignment exitAlignment binaryExpressionAlignment binaryExpression printNextToken insert_space_before_binary_operator TerminalTokens TokenNameMINUS isMinus insert_space_after_binary_operator binaryExpression numberOfParens manageClosingParenthesizedExpression binaryExpression numberOfParens
private boolean dump Equality Expression Binary Expression binary Expression int operator Block Scope scope final int number Of Parens binary Expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression binary Expression number Of Parens binary Expression left traverse this scope this scribe print Next Token operator this preferences insert space before binary operator if this preferences insert space after binary operator this scribe space binary Expression right traverse this scope if number Of Parens 0 manage Closing Parenthesized Expression binary Expression number Of Parens return false  dumpEqualityExpression BinaryExpression binaryExpression BlockScope numberOfParens binaryExpression ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression binaryExpression numberOfParens binaryExpression printNextToken insert_space_before_binary_operator insert_space_after_binary_operator binaryExpression numberOfParens manageClosingParenthesizedExpression binaryExpression numberOfParens
private final Text Edit failed To Format if DEBUG System out println COULD NOT FORMAT n this scribe scanner NON NLS 1 System out println this scribe return null  TextEdit failedToFormat
private void format Abstract Method Declaration method Declaration Class Scope scope boolean is Chunk Start boolean is First Class Body Declaration if is First Class Body Declaration int new Lines Before First Class Body Declaration this preferences blank lines before first class body declaration if new Lines Before First Class Body Declaration 0 this scribe print Empty Lines new Lines Before First Class Body Declaration else final int new Line Before Chunk is Chunk Start this preferences blank lines before new chunk 0 if new Line Before Chunk 0 this scribe print Empty Lines new Line Before Chunk final int new Lines Before Method this preferences blank lines before method if new Lines Before Method 0 is First Class Body Declaration this scribe print Empty Lines new Lines Before Method else if this scribe line 0 this scribe column 1 this scribe print New Line method Declaration traverse this scope  AbstractMethodDeclaration methodDeclaration ClassScope isChunkStart isFirstClassBodyDeclaration isFirstClassBodyDeclaration newLinesBeforeFirstClassBodyDeclaration blank_lines_before_first_class_body_declaration newLinesBeforeFirstClassBodyDeclaration printEmptyLines newLinesBeforeFirstClassBodyDeclaration newLineBeforeChunk isChunkStart blank_lines_before_new_chunk newLineBeforeChunk printEmptyLines newLineBeforeChunk newLinesBeforeMethod blank_lines_before_method newLinesBeforeMethod isFirstClassBodyDeclaration printEmptyLines newLinesBeforeMethod printNewLine methodDeclaration
param block param scope param block brace position private void format Block Block block Block Scope scope String block brace position boolean insert Space Before Opening Brace format Opening Brace block brace position insert Space Before Opening Brace final Statement statements block statements if statements null this scribe print New Line if this preferences indent statements compare to block this scribe indent format Statements scope statements true this scribe print Comment if this preferences indent statements compare to block this scribe un Indent else if this preferences insert new line in empty block this scribe print New Line if this preferences indent statements compare to block this scribe indent this scribe print Comment if this preferences indent statements compare to block this scribe un Indent else if this preferences indent statements compare to block this scribe indent this scribe print Comment if this preferences indent statements compare to block this scribe un Indent this scribe print Next Token Terminal Tokens Token NameRBRACE this scribe print Trailing Comment if Default Code Formatter Constants NEXT LINE SHIFTED equals block brace position this scribe un Indent  block_brace_position formatBlock BlockScope block_brace_position insertSpaceBeforeOpeningBrace formatOpeningBrace block_brace_position insertSpaceBeforeOpeningBrace printNewLine indent_statements_compare_to_block formatStatements printComment indent_statements_compare_to_block unIndent insert_new_line_in_empty_block printNewLine indent_statements_compare_to_block printComment indent_statements_compare_to_block unIndent indent_statements_compare_to_block printComment indent_statements_compare_to_block unIndent printNextToken TerminalTokens TokenNameRBRACE printTrailingComment DefaultCodeFormatterConstants NEXT_LINE_SHIFTED block_brace_position unIndent
private void format Field Declaration field Declaration AST Visitor visitor Method Scope scope boolean is Chunk Start boolean is First Class Body Declaration if is First Class Body Declaration int new Lines Before First Class Body Declaration this preferences blank lines before first class body declaration if new Lines Before First Class Body Declaration 0 this scribe print Empty Lines new Lines Before First Class Body Declaration else int new Line Before Chunk is Chunk Start this preferences blank lines before new chunk 0 if new Line Before Chunk 0 this scribe print Empty Lines new Line Before Chunk final int new Lines Before Field this preferences blank lines before field if new Lines Before Field 0 this scribe print Empty Lines new Lines Before Field Alignment member Alignment this scribe get Member Alignment NON NLS 1 this scribe print Comment this scribe print Modifiers this scribe space Field type field Declaration type traverse this scope Field name this scribe align Fragment member Alignment 0 this scribe print Next Token Terminal Tokens Token Name Identifier true Check for extra dimensions int extra Dimensions get Extra Dimension if extra Dimensions 0 for int i 0 i extra Dimensions i this scribe print Next Token Terminal Tokens Token NameLBRACKET this scribe print Next Token Terminal Tokens Token NameRBRACKET Field initialization final Expression initialization field Declaration initialization if initialization null this scribe align Fragment member Alignment 1 this scribe print Next Token Terminal Tokens Token NameEQUAL this preferences insert space before assignment operator if this preferences insert space after assignment operator this scribe space initialization traverse this scope this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon if member Alignment null this scribe align Fragment member Alignment 2 this scribe print Trailing Comment else this scribe space this scribe print Trailing Comment  FieldDeclaration fieldDeclaration ASTVisitor MethodScope isChunkStart isFirstClassBodyDeclaration isFirstClassBodyDeclaration newLinesBeforeFirstClassBodyDeclaration blank_lines_before_first_class_body_declaration newLinesBeforeFirstClassBodyDeclaration printEmptyLines newLinesBeforeFirstClassBodyDeclaration newLineBeforeChunk isChunkStart blank_lines_before_new_chunk newLineBeforeChunk printEmptyLines newLineBeforeChunk newLinesBeforeField blank_lines_before_field newLinesBeforeField printEmptyLines newLinesBeforeField memberAlignment getMemberAlignment printComment printModifiers fieldDeclaration alignFragment memberAlignment printNextToken TerminalTokens TokenNameIdentifier extraDimensions getExtraDimension extraDimensions extraDimensions printNextToken TerminalTokens TokenNameLBRACKET printNextToken TerminalTokens TokenNameRBRACKET fieldDeclaration alignFragment memberAlignment printNextToken TerminalTokens TokenNameEQUAL insert_space_before_assignment_operator insert_space_after_assignment_operator printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon memberAlignment alignFragment memberAlignment printTrailingComment printTrailingComment
private void format Type Declaration member Type Declaration Class Scope scope boolean is Chunk Start boolean is First Class Body Declaration if is First Class Body Declaration int new Lines Before First Class Body Declaration this preferences blank lines before first class body declaration if new Lines Before First Class Body Declaration 0 this scribe print Empty Lines new Lines Before First Class Body Declaration else int new Line Before Chunk is Chunk Start this preferences blank lines before new chunk 0 if new Line Before Chunk 0 this scribe print Empty Lines new Line Before Chunk final int new Lines Before Member this preferences blank lines before member type if new Lines Before Member 0 this scribe print Empty Lines new Lines Before Member member Type Declaration traverse this scope  TypeDeclaration memberTypeDeclaration ClassScope isChunkStart isFirstClassBodyDeclaration isFirstClassBodyDeclaration newLinesBeforeFirstClassBodyDeclaration blank_lines_before_first_class_body_declaration newLinesBeforeFirstClassBodyDeclaration printEmptyLines newLinesBeforeFirstClassBodyDeclaration newLineBeforeChunk isChunkStart blank_lines_before_new_chunk newLineBeforeChunk printEmptyLines newLineBeforeChunk newLinesBeforeMember blank_lines_before_member_type newLinesBeforeMember printEmptyLines newLinesBeforeMember memberTypeDeclaration
private void format Multi Field Declaration multi Field Declaration AST Visitor visitor Method Scope scope boolean is Chunk Start boolean is First Class Body Declaration if is First Class Body Declaration int new Lines Before First Class Body Declaration this preferences blank lines before first class body declaration if new Lines Before First Class Body Declaration 0 this scribe print Empty Lines new Lines Before First Class Body Declaration else int new Line Before Chunk is Chunk Start this preferences blank lines before new chunk 0 if new Line Before Chunk 0 this scribe print Empty Lines new Line Before Chunk final int new Lines Before Field this preferences blank lines before field if new Lines Before Field 0 this scribe print Empty Lines new Lines Before Field Alignment field Alignment this scribe get Member Alignment NON NLS 1 this scribe print Comment this scribe print Modifiers this scribe space multi Field Declaration declarations 0 type traverse this scope final int multiple Field Declarations Length multi Field Declaration declarations length Alignment multi Field Declarations Alignment this scribe create Alignment multiple field NON NLS 1 this preferences alignment for multiple fields multiple Field Declarations Length 1 this scribe scanner current Position this scribe enter Alignment multi Field Declarations Alignment boolean ok false do try for int i 0 length multiple Field Declarations Length i length i Field Declaration field Declaration multi Field Declaration declarations i Field name if i 0 this scribe align Fragment field Alignment 0 this scribe print Next Token Terminal Tokens Token Name Identifier true else this scribe print Next Token Terminal Tokens Token Name Identifier false Check for extra dimensions int extra Dimensions get Extra Dimension if extra Dimensions 0 for int index 0 index extra Dimensions index this scribe print Next Token Terminal Tokens Token NameLBRACKET this scribe print Next Token Terminal Tokens Token NameRBRACKET Field initialization final Expression initialization field Declaration initialization if initialization null if i 0 this scribe align Fragment field Alignment 1 this scribe print Next Token Terminal Tokens Token NameEQUAL this preferences insert space before assignment operator if this preferences insert space after assignment operator this scribe space initialization traverse this scope if i length 1 this scribe print Next Token Terminal Tokens Token NameCOMMA this preferences insert space before comma in multiple field declarations this scribe print Trailing Comment this scribe align Fragment multi Field Declarations Alignment i if this preferences insert space after comma in multiple field declarations this scribe space else this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe align Fragment field Alignment 2 this scribe print Trailing Comment ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment multi Field Declarations Alignment true  MultiFieldDeclaration multiFieldDeclaration ASTVisitor MethodScope isChunkStart isFirstClassBodyDeclaration isFirstClassBodyDeclaration newLinesBeforeFirstClassBodyDeclaration blank_lines_before_first_class_body_declaration newLinesBeforeFirstClassBodyDeclaration printEmptyLines newLinesBeforeFirstClassBodyDeclaration newLineBeforeChunk isChunkStart blank_lines_before_new_chunk newLineBeforeChunk printEmptyLines newLineBeforeChunk newLinesBeforeField blank_lines_before_field newLinesBeforeField printEmptyLines newLinesBeforeField fieldAlignment getMemberAlignment printComment printModifiers multiFieldDeclaration multipleFieldDeclarationsLength multiFieldDeclaration multiFieldDeclarationsAlignment createAlignment multiple_field alignment_for_multiple_fields multipleFieldDeclarationsLength currentPosition enterAlignment multiFieldDeclarationsAlignment multipleFieldDeclarationsLength FieldDeclaration fieldDeclaration multiFieldDeclaration alignFragment fieldAlignment printNextToken TerminalTokens TokenNameIdentifier printNextToken TerminalTokens TokenNameIdentifier extraDimensions getExtraDimension extraDimensions extraDimensions printNextToken TerminalTokens TokenNameLBRACKET printNextToken TerminalTokens TokenNameRBRACKET fieldDeclaration alignFragment fieldAlignment printNextToken TerminalTokens TokenNameEQUAL insert_space_before_assignment_operator insert_space_after_assignment_operator printNextToken TerminalTokens TokenNameCOMMA insert_space_before_comma_in_multiple_field_declarations printTrailingComment alignFragment multiFieldDeclarationsAlignment insert_space_after_comma_in_multiple_field_declarations printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon alignFragment fieldAlignment printTrailingComment AlignmentException redoAlignment exitAlignment multiFieldDeclarationsAlignment
see org eclipse jdt core formatter Code Formatter format int String int int int String public Text Edit format String string AST Node nodes reset the scribe this scribe reset long start Time System current Time Millis final char compilation Unit Source string to Char Array this local Scanner set Source compilation Unit Source this scribe initialize Scanner compilation Unit Source if nodes null return null this last Local Declaration Source Start 1 try format Class Body Declarations nodes catch Abort Formatting e return failed To Format if DEBUG System out println Formatting time System current Time Millis start Time NON NLS 1 return this scribe get Root Edit  CodeFormatter TextEdit ASTNode startTime currentTimeMillis compilationUnitSource toCharArray localScanner setSource compilationUnitSource initializeScanner compilationUnitSource lastLocalDeclarationSourceStart formatClassBodyDeclarations AbortFormatting failedToFormat currentTimeMillis startTime getRootEdit
see org eclipse jdt core formatter Code Formatter format int String int int int String public Text Edit format String string Compilation Unit Declaration compilation Unit Declaration reset the scribe this scribe reset if compilation Unit Declaration null compilation Unit Declaration ignore Further Investigation return failed To Format long start Time System current Time Millis final char compilation Unit Source string to Char Array this local Scanner set Source compilation Unit Source this scribe initialize Scanner compilation Unit Source this last Local Declaration Source Start 1 try compilation Unit Declaration traverse this compilation Unit Declaration scope catch Abort Formatting e return failed To Format if DEBUG System out println Formatting time System current Time Millis start Time NON NLS 1 return this scribe get Root Edit  CodeFormatter TextEdit CompilationUnitDeclaration compilationUnitDeclaration compilationUnitDeclaration compilationUnitDeclaration ignoreFurtherInvestigation failedToFormat startTime currentTimeMillis compilationUnitSource toCharArray localScanner setSource compilationUnitSource initializeScanner compilationUnitSource lastLocalDeclarationSourceStart compilationUnitDeclaration compilationUnitDeclaration AbortFormatting failedToFormat currentTimeMillis startTime getRootEdit
see org eclipse jdt core formatter Code Formatter format int String int int int String public Text Edit format String string Constructor Declaration constructor Declaration reset the scribe this scribe reset long start Time System current Time Millis final char compilation Unit Source string to Char Array this local Scanner set Source compilation Unit Source this scribe initialize Scanner compilation Unit Source if constructor Declaration null return null this last Local Declaration Source Start 1 try Explicit Constructor Call explicit Constructor Call constructor Declaration constructor Call if explicit Constructor Call null explicit Constructor Call is Implicit Super explicit Constructor Call traverse this null Statement statements constructor Declaration statements if statements null format Statements null statements false if has Comments this scribe print New Line this scribe print Comment catch Abort Formatting e return failed To Format if DEBUG System out println Formatting time System current Time Millis start Time NON NLS 1 return this scribe get Root Edit  CodeFormatter TextEdit ConstructorDeclaration constructorDeclaration startTime currentTimeMillis compilationUnitSource toCharArray localScanner setSource compilationUnitSource initializeScanner compilationUnitSource constructorDeclaration lastLocalDeclarationSourceStart ExplicitConstructorCall explicitConstructorCall constructorDeclaration constructorCall explicitConstructorCall explicitConstructorCall isImplicitSuper explicitConstructorCall constructorDeclaration formatStatements hasComments printNewLine printComment AbortFormatting failedToFormat currentTimeMillis startTime getRootEdit
see org eclipse jdt core formatter Code Formatter format int String int int int String public Text Edit format String string Expression expression reset the scribe this scribe reset long start Time System current Time Millis final char compilation Unit Source string to Char Array this local Scanner set Source compilation Unit Source this scribe initialize Scanner compilation Unit Source if expression null return null this last Local Declaration Source Start 1 try expression traverse this null this scribe print Comment catch Abort Formatting e return failed To Format if DEBUG System out println Formatting time System current Time Millis start Time NON NLS 1 return this scribe get Root Edit  CodeFormatter TextEdit startTime currentTimeMillis compilationUnitSource toCharArray localScanner setSource compilationUnitSource initializeScanner compilationUnitSource lastLocalDeclarationSourceStart printComment AbortFormatting failedToFormat currentTimeMillis startTime getRootEdit
private void format Type Declaration type Declaration Print comments to get proper line number this scribe print Comment final int line this scribe line this scribe print Modifiers Type name if type Declaration is Interface this scribe print Next Token Terminal Tokens Token Nameinterface true else this scribe print Next Token Terminal Tokens Token Nameclass true this scribe print Next Token Terminal Tokens Token Name Identifier true Superclass final Type Reference superclass type Declaration superclass if superclass null Alignment superclass Alignment this scribe create Alignment superclass NON NLS 1 this preferences alignment for superclass in type declaration 2 this scribe scanner current Position this scribe enter Alignment superclass Alignment boolean ok false do try this scribe align Fragment superclass Alignment 0 this scribe print Next Token Terminal Tokens Token Nameextends true this scribe align Fragment superclass Alignment 1 this scribe space superclass traverse this type Declaration scope ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment superclass Alignment true Super Interfaces final Type Reference super Interfaces type Declaration super Interfaces if super Interfaces null int super Interface Length super Interfaces length Alignment interface Alignment this scribe create Alignment super Interfaces NON NLS 1 this preferences alignment for superinterfaces in type declaration super Interface Length 1 implements token is first fragment this scribe scanner current Position this scribe enter Alignment interface Alignment boolean ok false do try this scribe align Fragment interface Alignment 0 if type Declaration is Interface this scribe print Next Token Terminal Tokens Token Nameextends true else this scribe print Next Token Terminal Tokens Token Nameimplements true for int i 0 i super Interface Length i if i 0 this scribe print Next Token Terminal Tokens Token NameCOMMA this preferences insert space before comma in superinterfaces this scribe print Trailing Comment this scribe align Fragment interface Alignment i 1 if this preferences insert space after comma in superinterfaces this scribe space super Interfaces i traverse this type Declaration scope else this scribe align Fragment interface Alignment i 1 this scribe space super Interfaces i traverse this type Declaration scope ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment interface Alignment true Type body String class declaration brace this preferences brace position for type declaration format Left Curly Brace line class declaration brace format Type Opening Brace class declaration brace this preferences insert space before opening brace in type declaration type Declaration if this preferences indent body declarations compare to type header this scribe indent format Type Members type Declaration this scribe print Comment if this preferences indent body declarations compare to type header this scribe un Indent if this preferences insert new line in empty type declaration this scribe print New Line this scribe print Next Token Terminal Tokens Token NameRBRACE this scribe print Trailing Comment if class declaration brace equals Default Code Formatter Constants NEXT LINE SHIFTED this scribe un Indent if has Comments this scribe print New Line  TypeDeclaration typeDeclaration printComment printModifiers typeDeclaration isInterface printNextToken TerminalTokens TokenNameinterface printNextToken TerminalTokens TokenNameclass printNextToken TerminalTokens TokenNameIdentifier TypeReference typeDeclaration superclassAlignment createAlignment alignment_for_superclass_in_type_declaration currentPosition enterAlignment superclassAlignment alignFragment superclassAlignment printNextToken TerminalTokens TokenNameextends alignFragment superclassAlignment typeDeclaration AlignmentException redoAlignment exitAlignment superclassAlignment TypeReference superInterfaces typeDeclaration superInterfaces superInterfaces superInterfaceLength superInterfaces interfaceAlignment createAlignment superInterfaces alignment_for_superinterfaces_in_type_declaration superInterfaceLength currentPosition enterAlignment interfaceAlignment alignFragment interfaceAlignment typeDeclaration isInterface printNextToken TerminalTokens TokenNameextends printNextToken TerminalTokens TokenNameimplements superInterfaceLength printNextToken TerminalTokens TokenNameCOMMA insert_space_before_comma_in_superinterfaces printTrailingComment alignFragment interfaceAlignment insert_space_after_comma_in_superinterfaces superInterfaces typeDeclaration alignFragment interfaceAlignment superInterfaces typeDeclaration AlignmentException redoAlignment exitAlignment interfaceAlignment class_declaration_brace brace_position_for_type_declaration formatLeftCurlyBrace class_declaration_brace formatTypeOpeningBrace class_declaration_brace insert_space_before_opening_brace_in_type_declaration typeDeclaration indent_body_declarations_compare_to_type_header formatTypeMembers typeDeclaration printComment indent_body_declarations_compare_to_type_header unIndent insert_new_line_in_empty_type_declaration printNewLine printNextToken TerminalTokens TokenNameRBRACE printTrailingComment class_declaration_brace DefaultCodeFormatterConstants NEXT_LINE_SHIFTED unIndent hasComments printNewLine
private void format Anonymous Type Declaration Type Declaration type Declaration Type body String anonymous type declaration brace position this preferences brace position for anonymous type declaration format Type Opening Brace anonymous type declaration brace position this preferences insert space before opening brace in anonymous type declaration type Declaration this scribe indent format Type Members type Declaration this scribe print Comment this scribe un Indent if this preferences insert new line in empty anonymous type declaration this scribe print New Line this scribe print Next Token Terminal Tokens Token NameRBRACE if anonymous type declaration brace position equals Default Code Formatter Constants NEXT LINE SHIFTED this scribe un Indent  formatAnonymousTypeDeclaration TypeDeclaration typeDeclaration anonymous_type_declaration_brace_position brace_position_for_anonymous_type_declaration formatTypeOpeningBrace anonymous_type_declaration_brace_position insert_space_before_opening_brace_in_anonymous_type_declaration typeDeclaration formatTypeMembers typeDeclaration printComment unIndent insert_new_line_in_empty_anonymous_type_declaration printNewLine printNextToken TerminalTokens TokenNameRBRACE anonymous_type_declaration_brace_position DefaultCodeFormatterConstants NEXT_LINE_SHIFTED unIndent
private void format Cascading Message Sends Cascading Method Invocation Fragment Builder builder Block Scope scope int size builder size Message Send fragments builder fragments Expression fragment fragments 0 receiver int starting Position In Cascade 1 if fragment is Implicit This fragment traverse this scope else Message Send current Message Send fragments 1 final int number Of Parens current Message Send bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression current Message Send number Of Parens AST Node arguments current Message Send arguments this scribe print Next Token Terminal Tokens Token Name Identifier selector this scribe print Next Token Terminal Tokens Token NameLPAREN this preferences insert space before opening paren in method invocation if arguments null if this preferences insert space after opening paren in method invocation this scribe space int argument Length arguments length Alignment arguments Alignment this scribe create Alignment message Arguments NON NLS 1 this preferences alignment for arguments in method invocation Alignment R OUTERMOST argument Length this scribe scanner current Position this scribe enter Alignment arguments Alignment boolean ok For Arguments false do try for int j 0 j argument Length j if j 0 this scribe print Next Token Terminal Tokens Token NameCOMMA this preferences insert space before comma in method invocation arguments this scribe print Trailing Comment this scribe align Fragment arguments Alignment j if j 0 this preferences insert space after comma in method invocation arguments this scribe space arguments j traverse this scope ok For Arguments true catch Alignment Exception e this scribe redo Alignment e while ok For Arguments this scribe exit Alignment arguments Alignment true this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space before closing paren in method invocation else this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space between empty parens in method invocation if number Of Parens 0 manage Closing Parenthesized Expression current Message Send number Of Parens starting Position In Cascade 2 Alignment cascading Message Send Alignment this scribe create Alignment cascading Message Send Alignment NON NLS 1 this preferences alignment for selector in method invocation Alignment R INNERMOST size this scribe scanner current Position this scribe enter Alignment cascading Message Send Alignment boolean ok false do try this scribe align Fragment cascading Message Send Alignment 0 this scribe print Next Token Terminal Tokens Token NameDOT for int i starting Position In Cascade i size i Message Send current Message Send fragments i final int number Of Parens current Message Send bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression current Message Send number Of Parens AST Node arguments current Message Send arguments this scribe print Next Token Terminal Tokens Token Name Identifier selector this scribe print Next Token Terminal Tokens Token NameLPAREN this preferences insert space before opening paren in method invocation if arguments null if this preferences insert space after opening paren in method invocation this scribe space int argument Length arguments length Alignment arguments Alignment this scribe create Alignment message Arguments NON NLS 1 this preferences alignment for arguments in method invocation Alignment R OUTERMOST argument Length this scribe scanner current Position this scribe enter Alignment arguments Alignment boolean ok For Arguments false do try for int j 0 j argument Length j if j 0 this scribe print Next Token Terminal Tokens Token NameCOMMA this preferences insert space before comma in method invocation arguments this scribe print Trailing Comment this scribe align Fragment arguments Alignment j if j 0 this preferences insert space after comma in method invocation arguments this scribe space arguments j traverse this scope ok For Arguments true catch Alignment Exception e this scribe redo Alignment e while ok For Arguments this scribe exit Alignment arguments Alignment true this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space before closing paren in method invocation else this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space between empty parens in method invocation if number Of Parens 0 manage Closing Parenthesized Expression current Message Send number Of Parens if i size 1 this scribe align Fragment cascading Message Send Alignment i this scribe print Next Token Terminal Tokens Token NameDOT ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment cascading Message Send Alignment true  formatCascadingMessageSends CascadingMethodInvocationFragmentBuilder BlockScope MessageSend startingPositionInCascade isImplicitThis MessageSend currentMessageSend numberOfParens currentMessageSend ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression currentMessageSend numberOfParens ASTNode currentMessageSend printNextToken TerminalTokens TokenNameIdentifier printNextToken TerminalTokens TokenNameLPAREN insert_space_before_opening_paren_in_method_invocation insert_space_after_opening_paren_in_method_invocation argumentLength argumentsAlignment createAlignment messageArguments alignment_for_arguments_in_method_invocation R_OUTERMOST argumentLength currentPosition enterAlignment argumentsAlignment okForArguments argumentLength printNextToken TerminalTokens TokenNameCOMMA insert_space_before_comma_in_method_invocation_arguments printTrailingComment alignFragment argumentsAlignment insert_space_after_comma_in_method_invocation_arguments okForArguments AlignmentException redoAlignment okForArguments exitAlignment argumentsAlignment printNextToken TerminalTokens TokenNameRPAREN insert_space_before_closing_paren_in_method_invocation printNextToken TerminalTokens TokenNameRPAREN insert_space_between_empty_parens_in_method_invocation numberOfParens manageClosingParenthesizedExpression currentMessageSend numberOfParens startingPositionInCascade cascadingMessageSendAlignment createAlignment cascadingMessageSendAlignment alignment_for_selector_in_method_invocation R_INNERMOST currentPosition enterAlignment cascadingMessageSendAlignment alignFragment cascadingMessageSendAlignment printNextToken TerminalTokens TokenNameDOT startingPositionInCascade MessageSend currentMessageSend numberOfParens currentMessageSend ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression currentMessageSend numberOfParens ASTNode currentMessageSend printNextToken TerminalTokens TokenNameIdentifier printNextToken TerminalTokens TokenNameLPAREN insert_space_before_opening_paren_in_method_invocation insert_space_after_opening_paren_in_method_invocation argumentLength argumentsAlignment createAlignment messageArguments alignment_for_arguments_in_method_invocation R_OUTERMOST argumentLength currentPosition enterAlignment argumentsAlignment okForArguments argumentLength printNextToken TerminalTokens TokenNameCOMMA insert_space_before_comma_in_method_invocation_arguments printTrailingComment alignFragment argumentsAlignment insert_space_after_comma_in_method_invocation_arguments okForArguments AlignmentException redoAlignment okForArguments exitAlignment argumentsAlignment printNextToken TerminalTokens TokenNameRPAREN insert_space_before_closing_paren_in_method_invocation printNextToken TerminalTokens TokenNameRPAREN insert_space_between_empty_parens_in_method_invocation numberOfParens manageClosingParenthesizedExpression currentMessageSend numberOfParens alignFragment cascadingMessageSendAlignment printNextToken TerminalTokens TokenNameDOT AlignmentException redoAlignment exitAlignment cascadingMessageSendAlignment
private void format Class Body Declarations AST Node nodes final int FIELD 1 METHOD 2 TYPE 3 this scribe last Number Of New Lines 1 AST Node merged Nodes compute Merged Member Declarations nodes Alignment member Alignment this scribe create Member Alignment type Members this preferences align type members on columns Alignment M MULTICOLUMN Alignment M NO ALIGNMENT 4 this scribe scanner current Position NON NLS 1 this scribe enter Member Alignment member Alignment boolean is Chunk Start false boolean ok false int start Index 0 do try for int i start Index max merged Nodes length i max i AST Node member merged Nodes i if member instanceof Field Declaration is Chunk Start member Alignment check Chunk Start FIELD i this scribe scanner current Position if member instanceof Multi Field Declaration Multi Field Declaration multi Field Multi Field Declaration member format multi Field this null is Chunk Start i 0 else if member instanceof Initializer int new Line Before Chunk is Chunk Start this preferences blank lines before new chunk 0 if new Line Before Chunk 0 i 0 this scribe print Empty Lines new Line Before Chunk else if i 0 int new Lines Before First Class Body Declaration this preferences blank lines before first class body declaration if new Lines Before First Class Body Declaration 0 this scribe print Empty Lines new Lines Before First Class Body Declaration Initializer initializer Initializer member initializer traverse this null else Field Declaration field Field Declaration member format field this null is Chunk Start i 0 else if member instanceof Abstract Method Declaration is Chunk Start member Alignment check Chunk Start METHOD i this scribe scanner current Position format Abstract Method Declaration member null is Chunk Start i 0 else is Chunk Start member Alignment check Chunk Start TYPE i this scribe scanner current Position format Type Declaration member null is Chunk Start i 0 if is Semi Colon this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment if i max 1 this scribe print New Line ok true catch Alignment Exception e start Index member Alignment chunk Start Index this scribe redo Member Alignment e while ok this scribe exit Member Alignment member Alignment if has Comments this scribe print New Line this scribe print Comment  formatClassBodyDeclarations ASTNode lastNumberOfNewLines ASTNode mergedNodes computeMergedMemberDeclarations memberAlignment createMemberAlignment typeMembers align_type_members_on_columns M_MULTICOLUMN M_NO_ALIGNMENT currentPosition enterMemberAlignment memberAlignment isChunkStart startIndex startIndex mergedNodes ASTNode mergedNodes FieldDeclaration isChunkStart memberAlignment checkChunkStart currentPosition MultiFieldDeclaration MultiFieldDeclaration multiField MultiFieldDeclaration multiField isChunkStart newLineBeforeChunk isChunkStart blank_lines_before_new_chunk newLineBeforeChunk printEmptyLines newLineBeforeChunk newLinesBeforeFirstClassBodyDeclaration blank_lines_before_first_class_body_declaration newLinesBeforeFirstClassBodyDeclaration printEmptyLines newLinesBeforeFirstClassBodyDeclaration FieldDeclaration FieldDeclaration isChunkStart AbstractMethodDeclaration isChunkStart memberAlignment checkChunkStart currentPosition AbstractMethodDeclaration isChunkStart isChunkStart memberAlignment checkChunkStart currentPosition TypeDeclaration isChunkStart isSemiColon printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment printNewLine AlignmentException startIndex memberAlignment chunkStartIndex redoMemberAlignment exitMemberAlignment memberAlignment hasComments printNewLine printComment
private void format Empty Statement if this preferences put empty statement on new line this scribe print New Line this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment  formatEmptyStatement put_empty_statement_on_new_line printNewLine printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment
private void format Empty Type Declaration boolean is First boolean has Semi Colon is Semi Colon while is Semi Colon this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment if has Semi Colon is First this scribe print New Line  formatEmptyTypeDeclaration isFirst hasSemiColon isSemiColon isSemiColon printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment hasSemiColon isFirst printNewLine
private void format Guard Clause Block Block block Block Scope scope this scribe print Next Token Terminal Tokens Token NameLBRACE this preferences insert space before opening brace in block this scribe space final Statement statements block statements statements 0 traverse this scope this scribe print Next Token Terminal Tokens Token NameRBRACE true this scribe print Trailing Comment  formatGuardClauseBlock BlockScope printNextToken TerminalTokens TokenNameLBRACE insert_space_before_opening_brace_in_block printNextToken TerminalTokens TokenNameRBRACE printTrailingComment
private void format Left Curly Brace final int line final String brace Position deal with quite unexpected comments right before lcurly this scribe print Comment if Default Code Formatter Constants NEXT LINE ON WRAP equals brace Position this scribe line line this scribe column this preferences page width this scribe print New Line  formatLeftCurlyBrace bracePosition printComment DefaultCodeFormatterConstants NEXT_LINE_ON_WRAP bracePosition page_width printNewLine
private void format Local Declaration Local Declaration local Declaration Block Scope scope boolean insert Space Before Comma boolean insert Space After Comma if is Multiple Local Declaration local Declaration if local Declaration modifiers NO MODIFIERS this scribe print Comment this scribe print Modifiers this scribe space Argument type if local Declaration type null local Declaration type traverse this scope Print the argument name this scribe print Next Token Terminal Tokens Token Name Identifier true else Print the argument name this scribe print Next Token Terminal Tokens Token Name Identifier false Check for extra dimensions int extra Dimensions get Extra Dimension if extra Dimensions 0 for int index 0 index extra Dimensions index this scribe print Next Token Terminal Tokens Token NameLBRACKET this scribe print Next Token Terminal Tokens Token NameRBRACKET final Expression initialization local Declaration initialization if initialization null Print the method name this scribe print Next Token Terminal Tokens Token NameEQUAL this preferences insert space before assignment operator if this preferences insert space after assignment operator this scribe space initialization traverse this scope if is Part Of Multiple Local Declaration this scribe print Next Token Terminal Tokens Token NameCOMMA insert Space Before Comma if insert Space After Comma this scribe space this scribe print Trailing Comment  formatLocalDeclaration LocalDeclaration localDeclaration BlockScope insertSpaceBeforeComma insertSpaceAfterComma isMultipleLocalDeclaration localDeclaration localDeclaration NO_MODIFIERS printComment printModifiers localDeclaration localDeclaration printNextToken TerminalTokens TokenNameIdentifier printNextToken TerminalTokens TokenNameIdentifier extraDimensions getExtraDimension extraDimensions extraDimensions printNextToken TerminalTokens TokenNameLBRACKET printNextToken TerminalTokens TokenNameRBRACKET localDeclaration printNextToken TerminalTokens TokenNameEQUAL insert_space_before_assignment_operator insert_space_after_assignment_operator isPartOfMultipleLocalDeclaration printNextToken TerminalTokens TokenNameCOMMA insertSpaceBeforeComma insertSpaceAfterComma printTrailingComment
private void format Message Send Message Send message Send Block Scope scope Alignment message Alignment if message Alignment null this scribe align Fragment message Alignment 0 this scribe print Next Token Terminal Tokens Token NameDOT this scribe print Next Token Terminal Tokens Token Name Identifier selector this scribe print Next Token Terminal Tokens Token NameLPAREN this preferences insert space before opening paren in method invocation final Expression arguments message Send arguments if arguments null if this preferences insert space after opening paren in method invocation this scribe space int arguments Length arguments length if arguments Length 1 Alignment arguments Alignment this scribe create Alignment message Arguments NON NLS 1 this preferences alignment for arguments in method invocation arguments Length this scribe scanner current Position this scribe enter Alignment arguments Alignment boolean ok false do try for int i 0 i arguments Length i if i 0 this scribe print Next Token Terminal Tokens Token NameCOMMA this preferences insert space before comma in method invocation arguments this scribe print Trailing Comment this scribe align Fragment arguments Alignment i if i 0 this preferences insert space after comma in method invocation arguments this scribe space arguments i traverse this scope ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment arguments Alignment true else for int i 0 i arguments Length i if i 0 this scribe print Next Token Terminal Tokens Token NameCOMMA this preferences insert space before comma in method invocation arguments this scribe print Trailing Comment if i 0 this preferences insert space after comma in method invocation arguments this scribe space arguments i traverse this scope this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space before closing paren in method invocation else this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space between empty parens in method invocation  formatMessageSend MessageSend messageSend BlockScope messageAlignment messageAlignment alignFragment messageAlignment printNextToken TerminalTokens TokenNameDOT printNextToken TerminalTokens TokenNameIdentifier printNextToken TerminalTokens TokenNameLPAREN insert_space_before_opening_paren_in_method_invocation messageSend insert_space_after_opening_paren_in_method_invocation argumentsLength argumentsLength argumentsAlignment createAlignment messageArguments alignment_for_arguments_in_method_invocation argumentsLength currentPosition enterAlignment argumentsAlignment argumentsLength printNextToken TerminalTokens TokenNameCOMMA insert_space_before_comma_in_method_invocation_arguments printTrailingComment alignFragment argumentsAlignment insert_space_after_comma_in_method_invocation_arguments AlignmentException redoAlignment exitAlignment argumentsAlignment argumentsLength printNextToken TerminalTokens TokenNameCOMMA insert_space_before_comma_in_method_invocation_arguments printTrailingComment insert_space_after_comma_in_method_invocation_arguments printNextToken TerminalTokens TokenNameRPAREN insert_space_before_closing_paren_in_method_invocation printNextToken TerminalTokens TokenNameRPAREN insert_space_between_empty_parens_in_method_invocation
private void format Method Arguments Abstract Method Declaration method Declaration boolean space Before Open Paren boolean space Between Empty Parameters boolean space Before Closing Paren boolean space Before First Parameter boolean space Before Comma boolean space After Comma int method Declaration Parameters Alignment this scribe print Next Token Terminal Tokens Token NameLPAREN space Before Open Paren final Argument arguments method Declaration arguments if arguments null int argument Length arguments length Alignment arguments Alignment this scribe create Alignment method Arguments NON NLS 1 method Declaration Parameters Alignment argument Length this scribe scanner current Position this scribe enter Alignment arguments Alignment boolean ok false do try if space Before First Parameter this scribe space for int i 0 i argument Length i if i 0 this scribe print Next Token Terminal Tokens Token NameCOMMA space Before Comma this scribe print Trailing Comment this scribe align Fragment arguments Alignment i if i 0 space After Comma this scribe space arguments i traverse this method Declaration scope ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment arguments Alignment true this scribe print Next Token Terminal Tokens Token NameRPAREN space Before Closing Paren else this scribe print Next Token Terminal Tokens Token NameRPAREN space Between Empty Parameters  formatMethodArguments AbstractMethodDeclaration methodDeclaration spaceBeforeOpenParen spaceBetweenEmptyParameters spaceBeforeClosingParen spaceBeforeFirstParameter spaceBeforeComma spaceAfterComma methodDeclarationParametersAlignment printNextToken TerminalTokens TokenNameLPAREN spaceBeforeOpenParen methodDeclaration argumentLength argumentsAlignment createAlignment methodArguments methodDeclarationParametersAlignment argumentLength currentPosition enterAlignment argumentsAlignment spaceBeforeFirstParameter argumentLength printNextToken TerminalTokens TokenNameCOMMA spaceBeforeComma printTrailingComment alignFragment argumentsAlignment spaceAfterComma methodDeclaration AlignmentException redoAlignment exitAlignment argumentsAlignment printNextToken TerminalTokens TokenNameRPAREN spaceBeforeClosingParen printNextToken TerminalTokens TokenNameRPAREN spaceBetweenEmptyParameters
private void format Necessary Empty Statement if this preferences put empty statement on new line this scribe print New Line this scribe indent this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment this scribe un Indent else this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment  formatNecessaryEmptyStatement put_empty_statement_on_new_line printNewLine printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment unIndent printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment
private void format Opening Brace String brace Position boolean insert Space Before Brace if Default Code Formatter Constants NEXT LINE equals brace Position this scribe print New Line else if Default Code Formatter Constants NEXT LINE SHIFTED equals brace Position this scribe print New Line this scribe indent this scribe print Next Token Terminal Tokens Token NameLBRACE insert Space Before Brace this scribe print Trailing Comment  formatOpeningBrace bracePosition insertSpaceBeforeBrace DefaultCodeFormatterConstants NEXT_LINE bracePosition printNewLine DefaultCodeFormatterConstants NEXT_LINE_SHIFTED bracePosition printNewLine printNextToken TerminalTokens TokenNameLBRACE insertSpaceBeforeBrace printTrailingComment
private void format Statements Block Scope scope final Statement statements boolean insert New Line After Last Statement int statements Length statements length for int i 0 i statements Length i final Statement statement statements i if i 0 statements i 1 instanceof Empty Statement statement instanceof Empty Statement this scribe print New Line statement traverse this scope if statement instanceof Expression this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment if i statements Length 1 i statements Length 1 insert New Line After Last Statement this scribe print New Line else if statement instanceof Local Declaration Local Declaration current Local Local Declaration statement if i statements Length 1 We need to check that the next statement is a local declaration if statements i 1 instanceof Local Declaration Local Declaration next Local Local Declaration statements i 1 if current Local declaration Source Start next Local declaration Source Start this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment if i statements Length 1 i statements Length 1 insert New Line After Last Statement this scribe print New Line else this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment if i statements Length 1 i statements Length 1 insert New Line After Last Statement this scribe print New Line else this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment if i statements Length 1 i statements Length 1 insert New Line After Last Statement this scribe print New Line else if i statements Length 1 if statement instanceof Empty Statement statements i 1 instanceof Empty Statement this scribe print New Line else if i statements Length 1 insert New Line After Last Statement this scribe print New Line  formatStatements BlockScope insertNewLineAfterLastStatement statementsLength statementsLength EmptyStatement EmptyStatement printNewLine printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment statementsLength statementsLength insertNewLineAfterLastStatement printNewLine LocalDeclaration LocalDeclaration currentLocal LocalDeclaration statementsLength LocalDeclaration LocalDeclaration nextLocal LocalDeclaration currentLocal declarationSourceStart nextLocal declarationSourceStart printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment statementsLength statementsLength insertNewLineAfterLastStatement printNewLine printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment statementsLength statementsLength insertNewLineAfterLastStatement printNewLine printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment statementsLength statementsLength insertNewLineAfterLastStatement printNewLine statementsLength EmptyStatement EmptyStatement printNewLine statementsLength insertNewLineAfterLastStatement printNewLine
private void format Throws Clause Abstract Method Declaration method Declaration boolean space Before Comma boolean space After Comma int alignment For Throws Clause final Type Reference thrown Exceptions method Declaration thrown Exceptions if thrown Exceptions null int thrown Exceptions Length thrown Exceptions length Alignment throws Alignment this scribe create Alignment throws NON NLS 1 alignment For Throws Clause thrown Exceptions Length throws is the first token this scribe scanner current Position this scribe enter Alignment throws Alignment boolean ok false do try this scribe align Fragment throws Alignment 0 this scribe print Next Token Terminal Tokens Token Namethrows true for int i 0 i thrown Exceptions Length i if i 0 this scribe print Next Token Terminal Tokens Token NameCOMMA space Before Comma this scribe print Trailing Comment this scribe align Fragment throws Alignment i if space After Comma this scribe space else this scribe space thrown Exceptions i traverse this method Declaration scope ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment throws Alignment true  formatThrowsClause AbstractMethodDeclaration methodDeclaration spaceBeforeComma spaceAfterComma alignmentForThrowsClause TypeReference thrownExceptions methodDeclaration thrownExceptions thrownExceptions thrownExceptionsLength thrownExceptions throwsAlignment createAlignment alignmentForThrowsClause thrownExceptionsLength currentPosition enterAlignment throwsAlignment alignFragment throwsAlignment printNextToken TerminalTokens TokenNamethrows thrownExceptionsLength printNextToken TerminalTokens TokenNameCOMMA spaceBeforeComma printTrailingComment alignFragment throwsAlignment spaceAfterComma thrownExceptions methodDeclaration AlignmentException redoAlignment exitAlignment throwsAlignment
private void format Type Members Type Declaration type Declaration Alignment member Alignment this scribe create Member Alignment type Members this preferences align type members on columns Alignment M MULTICOLUMN Alignment M NO ALIGNMENT 3 this scribe scanner current Position NON NLS 1 this scribe enter Member Alignment member Alignment AST Node members compute Merged Member Declarations type Declaration boolean is Chunk Start false boolean ok false int start Index 0 do try for int i start Index max members length i max i AST Node member members i if member instanceof Field Declaration is Chunk Start member Alignment check Chunk Start Alignment CHUNK FIELD i this scribe scanner current Position if member instanceof Multi Field Declaration Multi Field Declaration multi Field Multi Field Declaration member if multi Field is Static format multi Field this type Declaration static Initializer Scope is Chunk Start i 0 else format multi Field this type Declaration initializer Scope is Chunk Start i 0 else if member instanceof Initializer int new Line Before Chunk is Chunk Start this preferences blank lines before new chunk 0 if new Line Before Chunk 0 i 0 this scribe print Empty Lines new Line Before Chunk else if i 0 int new Lines Before First Class Body Declaration this preferences blank lines before first class body declaration if new Lines Before First Class Body Declaration 0 this scribe print Empty Lines new Lines Before First Class Body Declaration Initializer initializer Initializer member if initializer is Static initializer traverse this type Declaration static Initializer Scope else initializer traverse this type Declaration initializer Scope else Field Declaration field Field Declaration member if field is Static format field this type Declaration static Initializer Scope is Chunk Start i 0 else format field this type Declaration initializer Scope is Chunk Start i 0 else if member instanceof Abstract Method Declaration is Chunk Start member Alignment check Chunk Start Alignment CHUNK METHOD i this scribe scanner current Position format Abstract Method Declaration member type Declaration scope is Chunk Start i 0 else is Chunk Start member Alignment check Chunk Start Alignment CHUNK TYPE i this scribe scanner current Position format Type Declaration member type Declaration scope is Chunk Start i 0 if is Semi Colon this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment this scribe print New Line realign to the proper value if this scribe member Alignment null select the last alignment this scribe indentation Level this scribe member Alignment original Indentation Level ok true catch Alignment Exception e start Index member Alignment chunk Start Index this scribe redo Member Alignment e while ok this scribe exit Member Alignment member Alignment  formatTypeMembers TypeDeclaration typeDeclaration memberAlignment createMemberAlignment typeMembers align_type_members_on_columns M_MULTICOLUMN M_NO_ALIGNMENT currentPosition enterMemberAlignment memberAlignment ASTNode computeMergedMemberDeclarations typeDeclaration isChunkStart startIndex startIndex ASTNode FieldDeclaration isChunkStart memberAlignment checkChunkStart CHUNK_FIELD currentPosition MultiFieldDeclaration MultiFieldDeclaration multiField MultiFieldDeclaration multiField isStatic multiField typeDeclaration staticInitializerScope isChunkStart multiField typeDeclaration initializerScope isChunkStart newLineBeforeChunk isChunkStart blank_lines_before_new_chunk newLineBeforeChunk printEmptyLines newLineBeforeChunk newLinesBeforeFirstClassBodyDeclaration blank_lines_before_first_class_body_declaration newLinesBeforeFirstClassBodyDeclaration printEmptyLines newLinesBeforeFirstClassBodyDeclaration isStatic typeDeclaration staticInitializerScope typeDeclaration initializerScope FieldDeclaration FieldDeclaration isStatic typeDeclaration staticInitializerScope isChunkStart typeDeclaration initializerScope isChunkStart AbstractMethodDeclaration isChunkStart memberAlignment checkChunkStart CHUNK_METHOD currentPosition AbstractMethodDeclaration typeDeclaration isChunkStart isChunkStart memberAlignment checkChunkStart CHUNK_TYPE currentPosition TypeDeclaration typeDeclaration isChunkStart isSemiColon printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment printNewLine memberAlignment indentationLevel memberAlignment originalIndentationLevel AlignmentException startIndex memberAlignment chunkStartIndex redoMemberAlignment exitMemberAlignment memberAlignment
private void format Type Opening Brace String brace Position boolean insert Space Before Brace Type Declaration type Declaration int field Count type Declaration fields null 0 type Declaration fields length int method Count type Declaration methods null 0 type Declaration methods length int type Count type Declaration member Types null 0 type Declaration member Types length if method Count 1 type Declaration methods 0 is Default Constructor method Count 0 final int member Length field Count method Count type Count boolean insert New Line member Length 0 if insert New Line if type Declaration bits AST Node Is Anonymous TypeMASK 0 insert New Line this preferences insert new line in empty anonymous type declaration else insert New Line this preferences insert new line in empty type declaration format Opening Brace brace Position insert Space Before Brace if insert New Line this scribe print New Line  formatTypeOpeningBrace bracePosition insertSpaceBeforeBrace TypeDeclaration typeDeclaration fieldCount typeDeclaration typeDeclaration methodCount typeDeclaration typeDeclaration typeCount typeDeclaration memberTypes typeDeclaration memberTypes methodCount typeDeclaration isDefaultConstructor methodCount memberLength fieldCount methodCount typeCount insertNewLine memberLength insertNewLine typeDeclaration ASTNode IsAnonymousTypeMASK insertNewLine insert_new_line_in_empty_anonymous_type_declaration insertNewLine insert_new_line_in_empty_type_declaration formatOpeningBrace bracePosition insertSpaceBeforeBrace insertNewLine printNewLine
private int get Extra Dimension this local Scanner reset To this scribe scanner current Position this scribe scanner End Position 1 int dimensions 0 try int token while token this local Scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameRBRACKET 166 dimensions break case Terminal Tokens Token Name Identifier 90 case Terminal Tokens Token NameLBRACE 90 case Terminal Tokens Token NameLPAREN case Terminal Tokens Token NameCOMMA 90 case Terminal Tokens Token NameEQUAL 167 case Terminal Tokens Token NameSEMICOLON 64 case Terminal Tokens Token NameRPAREN 86 return dimensions catch Invalid Input Exception e ignore return dimensions  getExtraDimension localScanner resetTo currentPosition scannerEndPosition localScanner getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameRBRACKET TerminalTokens TokenNameIdentifier TerminalTokens TokenNameLBRACE TerminalTokens TokenNameLPAREN TerminalTokens TokenNameCOMMA TerminalTokens TokenNameEQUAL TerminalTokens TokenNameSEMICOLON TerminalTokens TokenNameRPAREN InvalidInputException
private boolean is Comma this local Scanner reset To this scribe scanner current Position this scribe scanner End Position 1 try int token this local Scanner get Next Token loop while true switch token case Terminal Tokens TokenNameCOMMENT BLOCK case Terminal Tokens TokenNameCOMMENT JAVADOC case Terminal Tokens TokenNameCOMMENT LINE token this local Scanner get Next Token continue loop default break loop return token Terminal Tokens Token NameCOMMA catch Invalid Input Exception e ignore return false  isComma localScanner resetTo currentPosition scannerEndPosition localScanner getNextToken TerminalTokens TokenNameCOMMENT_BLOCK TerminalTokens TokenNameCOMMENT_JAVADOC TerminalTokens TokenNameCOMMENT_LINE localScanner getNextToken TerminalTokens TokenNameCOMMA InvalidInputException
private boolean is Guard Clause Block block return comment Starts Block block source Start block source End block statements null block statements length 1 block statements 0 instanceof Return Statement block statements 0 instanceof Throw Statement  isGuardClause commentStartsBlock sourceStart sourceEnd ReturnStatement ThrowStatement
private boolean is Minus this local Scanner reset To this scribe scanner current Position this scribe scanner End Position 1 try int token this local Scanner get Next Token loop while true switch token case Terminal Tokens TokenNameCOMMENT BLOCK case Terminal Tokens TokenNameCOMMENT JAVADOC case Terminal Tokens TokenNameCOMMENT LINE token this local Scanner get Next Token continue loop default break loop return token Terminal Tokens Token NameMINUS catch Invalid Input Exception e ignore return false  isMinus localScanner resetTo currentPosition scannerEndPosition localScanner getNextToken TerminalTokens TokenNameCOMMENT_BLOCK TerminalTokens TokenNameCOMMENT_JAVADOC TerminalTokens TokenNameCOMMENT_LINE localScanner getNextToken TerminalTokens TokenNameMINUS InvalidInputException
private boolean is Multiple Local Declaration Local Declaration local Declaration if local Declaration declaration Source Start this last Local Declaration Source Start return true this last Local Declaration Source Start local Declaration declaration Source Start return false  isMultipleLocalDeclaration LocalDeclaration localDeclaration localDeclaration declarationSourceStart lastLocalDeclarationSourceStart lastLocalDeclarationSourceStart localDeclaration declarationSourceStart
private boolean is Part Of Multiple Local Declaration this local Scanner reset To this scribe scanner current Position this scribe scanner End Position 1 try int token while token this local Scanner get Next Token Terminal Tokens Token NameEOF switch token case Terminal Tokens Token NameCOMMA 90 return true case Terminal Tokens TokenNameCOMMENT BLOCK case Terminal Tokens TokenNameCOMMENT JAVADOC case Terminal Tokens TokenNameCOMMENT LINE break default return false catch Invalid Input Exception e ignore return false  isPartOfMultipleLocalDeclaration localScanner resetTo currentPosition scannerEndPosition localScanner getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameCOMMA TerminalTokens TokenNameCOMMENT_BLOCK TerminalTokens TokenNameCOMMENT_JAVADOC TerminalTokens TokenNameCOMMENT_LINE InvalidInputException
private boolean is Semi Colon this local Scanner reset To this scribe scanner current Position this scribe scanner End Position 1 try int token this local Scanner get Next Token loop while true switch token case Terminal Tokens TokenNameCOMMENT BLOCK case Terminal Tokens TokenNameCOMMENT JAVADOC case Terminal Tokens TokenNameCOMMENT LINE token this local Scanner get Next Token continue loop default break loop return token Terminal Tokens Token NameSEMICOLON catch Invalid Input Exception e ignore return false  isSemiColon localScanner resetTo currentPosition scannerEndPosition localScanner getNextToken TerminalTokens TokenNameCOMMENT_BLOCK TerminalTokens TokenNameCOMMENT_JAVADOC TerminalTokens TokenNameCOMMENT_LINE localScanner getNextToken TerminalTokens TokenNameSEMICOLON InvalidInputException
private boolean has Comments this local Scanner reset To this scribe scanner start Position this scribe scanner End Position 1 try switch this local Scanner get Next Token case Terminal Tokens TokenNameCOMMENT BLOCK case Terminal Tokens TokenNameCOMMENT JAVADOC case Terminal Tokens TokenNameCOMMENT LINE return true catch Invalid Input Exception e ignore return false  hasComments localScanner resetTo startPosition scannerEndPosition localScanner getNextToken TerminalTokens TokenNameCOMMENT_BLOCK TerminalTokens TokenNameCOMMENT_JAVADOC TerminalTokens TokenNameCOMMENT_LINE InvalidInputException
private void manage Closing Parenthesized Expression Expression expression int number Of Parens for int i 0 i number Of Parens i this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space before closing paren in parenthesized expression  manageClosingParenthesizedExpression numberOfParens numberOfParens printNextToken TerminalTokens TokenNameRPAREN insert_space_before_closing_paren_in_parenthesized_expression
private void manage Opening Parenthesized Expression Expression expression int number Of Parens for int i 0 i number Of Parens i this scribe print Next Token Terminal Tokens Token NameLPAREN this preferences insert space before opening paren in parenthesized expression if this preferences insert space after opening paren in parenthesized expression this scribe space  manageOpeningParenthesizedExpression numberOfParens numberOfParens printNextToken TerminalTokens TokenNameLPAREN insert_space_before_opening_paren_in_parenthesized_expression insert_space_after_opening_paren_in_parenthesized_expression
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Allocation Expression org eclipse jdt internal compiler lookup Block Scope public boolean visit Allocation Expression allocation Expression Block Scope scope new Class Type Argument Listopt Class Bodyopt final int number Of Parens allocation Expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression allocation Expression number Of Parens this scribe print Next Token Terminal Tokens Token Namenew this scribe space allocation Expression type traverse this scope this scribe print Next Token Terminal Tokens Token NameLPAREN this preferences insert space before opening paren in method invocation final Expression arguments allocation Expression arguments if arguments null if this preferences insert space after opening paren in method invocation this scribe space int argument Length arguments length Alignment arguments Alignment this scribe create Alignment allocation NON NLS 1 this preferences alignment for arguments in allocation expression argument Length this scribe scanner current Position this scribe enter Alignment arguments Alignment boolean ok false do try for int i 0 i argument Length i if i 0 this scribe print Next Token Terminal Tokens Token NameCOMMA this preferences insert space before comma in allocation expression this scribe print Trailing Comment this scribe align Fragment arguments Alignment i if i 0 this preferences insert space after comma in allocation expression this scribe space arguments i traverse this scope ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment arguments Alignment true this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space before closing paren in method invocation else this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space between empty parens in method invocation if number Of Parens 0 manage Closing Parenthesized Expression allocation Expression number Of Parens return false  ASTVisitor AllocationExpression BlockScope AllocationExpression allocationExpression BlockScope ClassType ArgumentListopt ClassBodyopt numberOfParens allocationExpression ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression allocationExpression numberOfParens printNextToken TerminalTokens TokenNamenew allocationExpression printNextToken TerminalTokens TokenNameLPAREN insert_space_before_opening_paren_in_method_invocation allocationExpression insert_space_after_opening_paren_in_method_invocation argumentLength argumentsAlignment createAlignment alignment_for_arguments_in_allocation_expression argumentLength currentPosition enterAlignment argumentsAlignment argumentLength printNextToken TerminalTokens TokenNameCOMMA insert_space_before_comma_in_allocation_expression printTrailingComment alignFragment argumentsAlignment insert_space_after_comma_in_allocation_expression AlignmentException redoAlignment exitAlignment argumentsAlignment printNextToken TerminalTokens TokenNameRPAREN insert_space_before_closing_paren_in_method_invocation printNextToken TerminalTokens TokenNameRPAREN insert_space_between_empty_parens_in_method_invocation numberOfParens manageClosingParenthesizedExpression allocationExpression numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast AND AND Expression org eclipse jdt internal compiler lookup Block Scope public boolean visit AND AND Expression and and Expression Block Scope scope return dump Binary Expression and and Expression Terminal Tokens TokenNameAND AND scope  ASTVisitor AND_AND_Expression BlockScope AND_AND_Expression and_and_Expression BlockScope dumpBinaryExpression and_and_Expression TerminalTokens TokenNameAND_AND
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Argument org eclipse jdt internal compiler lookup Block Scope public boolean visit Argument argument Block Scope scope if argument modifiers NO MODIFIERS this scribe print Comment this scribe print Modifiers this scribe space Argument type if argument type null argument type traverse this scope Print the argument name this scribe print Next Token Terminal Tokens Token Name Identifier true Check for extra dimensions int extra Dimensions get Extra Dimension if extra Dimensions 0 for int i 0 i extra Dimensions i this scribe print Next Token Terminal Tokens Token NameLBRACKET this scribe print Next Token Terminal Tokens Token NameRBRACKET return false  ASTVisitor BlockScope BlockScope NO_MODIFIERS printComment printModifiers printNextToken TerminalTokens TokenNameIdentifier extraDimensions getExtraDimension extraDimensions extraDimensions printNextToken TerminalTokens TokenNameLBRACKET printNextToken TerminalTokens TokenNameRBRACKET
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Array Allocation Expression org eclipse jdt internal compiler lookup Block Scope public boolean visit Array Allocation Expression array Allocation Expression Block Scope scope final int number Of Parens array Allocation Expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression array Allocation Expression number Of Parens this scribe print Next Token Terminal Tokens Token Namenew this scribe space array Allocation Expression type traverse this scope final Expression dimensions array Allocation Expression dimensions int dimensions Length dimensions length for int i 0 i dimensions Length i if this preferences insert space before opening bracket in array allocation expression this scribe space this scribe print Next Token Terminal Tokens Token NameLBRACKET false if dimensions i null if this preferences insert space after opening bracket in array allocation expression this scribe space dimensions i traverse this scope this scribe print Next Token Terminal Tokens Token NameRBRACKET this preferences insert space before closing bracket in array allocation expression else this scribe print Next Token Terminal Tokens Token NameRBRACKET this preferences insert space between empty brackets in array allocation expression final Array Initializer initializer array Allocation Expression initializer if initializer null initializer traverse this scope if number Of Parens 0 manage Closing Parenthesized Expression array Allocation Expression number Of Parens return false  ASTVisitor ArrayAllocationExpression BlockScope ArrayAllocationExpression arrayAllocationExpression BlockScope numberOfParens arrayAllocationExpression ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression arrayAllocationExpression numberOfParens printNextToken TerminalTokens TokenNamenew arrayAllocationExpression arrayAllocationExpression dimensionsLength dimensionsLength insert_space_before_opening_bracket_in_array_allocation_expression printNextToken TerminalTokens TokenNameLBRACKET insert_space_after_opening_bracket_in_array_allocation_expression printNextToken TerminalTokens TokenNameRBRACKET insert_space_before_closing_bracket_in_array_allocation_expression printNextToken TerminalTokens TokenNameRBRACKET insert_space_between_empty_brackets_in_array_allocation_expression ArrayInitializer arrayAllocationExpression numberOfParens manageClosingParenthesizedExpression arrayAllocationExpression numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Array Initializer org eclipse jdt internal compiler lookup Block Scope public boolean visit Array Initializer array Initializer Block Scope scope final int number Of Parens array Initializer bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression array Initializer number Of Parens final Expression expressions array Initializer expressions if expressions null String array initializer brace position this preferences brace position for array initializer format Opening Brace array initializer brace position this preferences insert space before opening brace in array initializer int expressions Length expressions length final boolean insert new line after opening brace this preferences insert new line after opening brace in array initializer if expressions Length 1 if insert new line after opening brace this scribe print New Line Alignment array Initializer Alignment this scribe create Alignment array initializer NON NLS 1 this preferences alignment for expressions in array initializer Alignment R OUTERMOST expressions Length this scribe scanner current Position this preferences continuation indentation for array initializer true if insert new line after opening brace array Initializer Alignment fragment Indentations 0 array Initializer Alignment break Indentation Level this scribe enter Alignment array Initializer Alignment boolean ok false do try this scribe align Fragment array Initializer Alignment 0 if this preferences insert space after opening brace in array initializer this scribe space expressions 0 traverse this scope for int i 1 i expressions Length i this scribe print Next Token Terminal Tokens Token NameCOMMA this preferences insert space before comma in array initializer this scribe print Trailing Comment this scribe align Fragment array Initializer Alignment i if this preferences insert space after comma in array initializer this scribe space expressions i traverse this scope if i expressions Length 1 if is Comma this scribe print Next Token Terminal Tokens Token NameCOMMA this preferences insert space before comma in array initializer this scribe print Trailing Comment ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment array Initializer Alignment true else if insert new line after opening brace this scribe print New Line this scribe indent we don t need to use an alignment if this preferences insert space after opening brace in array initializer this scribe space expressions 0 traverse this scope if is Comma this scribe print Next Token Terminal Tokens Token NameCOMMA this preferences insert space before comma in array initializer this scribe print Trailing Comment if insert new line after opening brace this scribe un Indent if this preferences insert new line before closing brace in array initializer this scribe print New Line else if this preferences insert space before closing brace in array initializer this scribe space this scribe print Next Token Terminal Tokens Token NameRBRACE false if array initializer brace position equals Default Code Formatter Constants NEXT LINE SHIFTED this scribe un Indent else boolean keep Empty Array Initializer On The Same Line this preferences keep empty array initializer on one line String array initializer brace position this preferences brace position for array initializer if keep Empty Array Initializer On The Same Line this scribe print Next Token Terminal Tokens Token NameLBRACE this preferences insert space before opening brace in array initializer else format Opening Brace array initializer brace position this preferences insert space before opening brace in array initializer if this preferences insert space between empty braces in array initializer this scribe space this scribe print Next Token Terminal Tokens Token NameRBRACE false if keep Empty Array Initializer On The Same Line array initializer brace position equals Default Code Formatter Constants NEXT LINE SHIFTED this scribe un Indent if number Of Parens 0 manage Closing Parenthesized Expression array Initializer number Of Parens return false  ASTVisitor ArrayInitializer BlockScope ArrayInitializer arrayInitializer BlockScope numberOfParens arrayInitializer ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression arrayInitializer numberOfParens arrayInitializer array_initializer_brace_position brace_position_for_array_initializer formatOpeningBrace array_initializer_brace_position insert_space_before_opening_brace_in_array_initializer expressionsLength insert_new_line_after_opening_brace insert_new_line_after_opening_brace_in_array_initializer expressionsLength insert_new_line_after_opening_brace printNewLine arrayInitializerAlignment createAlignment array_initializer alignment_for_expressions_in_array_initializer R_OUTERMOST expressionsLength currentPosition continuation_indentation_for_array_initializer insert_new_line_after_opening_brace arrayInitializerAlignment fragmentIndentations arrayInitializerAlignment breakIndentationLevel enterAlignment arrayInitializerAlignment alignFragment arrayInitializerAlignment insert_space_after_opening_brace_in_array_initializer expressionsLength printNextToken TerminalTokens TokenNameCOMMA insert_space_before_comma_in_array_initializer printTrailingComment alignFragment arrayInitializerAlignment insert_space_after_comma_in_array_initializer expressionsLength isComma printNextToken TerminalTokens TokenNameCOMMA insert_space_before_comma_in_array_initializer printTrailingComment AlignmentException redoAlignment exitAlignment arrayInitializerAlignment insert_new_line_after_opening_brace printNewLine insert_space_after_opening_brace_in_array_initializer isComma printNextToken TerminalTokens TokenNameCOMMA insert_space_before_comma_in_array_initializer printTrailingComment insert_new_line_after_opening_brace unIndent insert_new_line_before_closing_brace_in_array_initializer printNewLine insert_space_before_closing_brace_in_array_initializer printNextToken TerminalTokens TokenNameRBRACE array_initializer_brace_position DefaultCodeFormatterConstants NEXT_LINE_SHIFTED unIndent keepEmptyArrayInitializerOnTheSameLine keep_empty_array_initializer_on_one_line array_initializer_brace_position brace_position_for_array_initializer keepEmptyArrayInitializerOnTheSameLine printNextToken TerminalTokens TokenNameLBRACE insert_space_before_opening_brace_in_array_initializer formatOpeningBrace array_initializer_brace_position insert_space_before_opening_brace_in_array_initializer insert_space_between_empty_braces_in_array_initializer printNextToken TerminalTokens TokenNameRBRACE keepEmptyArrayInitializerOnTheSameLine array_initializer_brace_position DefaultCodeFormatterConstants NEXT_LINE_SHIFTED unIndent numberOfParens manageClosingParenthesizedExpression arrayInitializer numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Array Qualified Type Reference org eclipse jdt internal compiler lookup Block Scope public boolean visit Array Qualified Type Reference array Qualified Type Reference Block Scope scope final int number Of Parens array Qualified Type Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression array Qualified Type Reference number Of Parens this scribe print Qualified Reference array Qualified Type Reference source End int dimensions get Extra Dimension if dimensions 0 for int i 0 i dimensions i this scribe print Next Token Terminal Tokens Token NameLBRACKET this scribe print Next Token Terminal Tokens Token NameRBRACKET if number Of Parens 0 manage Closing Parenthesized Expression array Qualified Type Reference number Of Parens return false  ASTVisitor ArrayQualifiedTypeReference BlockScope ArrayQualifiedTypeReference arrayQualifiedTypeReference BlockScope numberOfParens arrayQualifiedTypeReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression arrayQualifiedTypeReference numberOfParens printQualifiedReference arrayQualifiedTypeReference sourceEnd getExtraDimension printNextToken TerminalTokens TokenNameLBRACKET printNextToken TerminalTokens TokenNameRBRACKET numberOfParens manageClosingParenthesizedExpression arrayQualifiedTypeReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Array Qualified Type Reference org eclipse jdt internal compiler lookup Class Scope public boolean visit Array Qualified Type Reference array Qualified Type Reference Class Scope scope final int number Of Parens array Qualified Type Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression array Qualified Type Reference number Of Parens this scribe print Qualified Reference array Qualified Type Reference source End int dimensions get Extra Dimension if dimensions 0 for int i 0 i dimensions i this scribe print Next Token Terminal Tokens Token NameLBRACKET this scribe print Next Token Terminal Tokens Token NameRBRACKET if number Of Parens 0 manage Closing Parenthesized Expression array Qualified Type Reference number Of Parens return false  ASTVisitor ArrayQualifiedTypeReference ClassScope ArrayQualifiedTypeReference arrayQualifiedTypeReference ClassScope numberOfParens arrayQualifiedTypeReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression arrayQualifiedTypeReference numberOfParens printQualifiedReference arrayQualifiedTypeReference sourceEnd getExtraDimension printNextToken TerminalTokens TokenNameLBRACKET printNextToken TerminalTokens TokenNameRBRACKET numberOfParens manageClosingParenthesizedExpression arrayQualifiedTypeReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Array Reference org eclipse jdt internal compiler lookup Block Scope public boolean visit Array Reference array Reference Block Scope scope final int number Of Parens array Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression array Reference number Of Parens array Reference receiver traverse this scope this scribe print Next Token Terminal Tokens Token NameLBRACKET this preferences insert space before opening bracket in array reference if this preferences insert space after opening bracket in array reference this scribe space array Reference position traverse this scope this scribe print Next Token Terminal Tokens Token NameRBRACKET this preferences insert space before closing bracket in array reference if number Of Parens 0 manage Closing Parenthesized Expression array Reference number Of Parens return false  ASTVisitor ArrayReference BlockScope ArrayReference arrayReference BlockScope numberOfParens arrayReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression arrayReference numberOfParens arrayReference printNextToken TerminalTokens TokenNameLBRACKET insert_space_before_opening_bracket_in_array_reference insert_space_after_opening_bracket_in_array_reference arrayReference printNextToken TerminalTokens TokenNameRBRACKET insert_space_before_closing_bracket_in_array_reference numberOfParens manageClosingParenthesizedExpression arrayReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Array Type Reference org eclipse jdt internal compiler lookup Block Scope public boolean visit Array Type Reference array Type Reference Block Scope scope final int number Of Parens array Type Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression array Type Reference number Of Parens this scribe print Next Token SINGLETYPEREFERENCE EXPECTEDTOKENS int dimensions get Extra Dimension if dimensions 0 if this preferences insert space before opening bracket in array type reference this scribe space for int i 0 i dimensions i this scribe print Next Token Terminal Tokens Token NameLBRACKET if this preferences insert space between brackets in array type reference this scribe space this scribe print Next Token Terminal Tokens Token NameRBRACKET if number Of Parens 0 manage Closing Parenthesized Expression array Type Reference number Of Parens return false  ASTVisitor ArrayTypeReference BlockScope ArrayTypeReference arrayTypeReference BlockScope numberOfParens arrayTypeReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression arrayTypeReference numberOfParens printNextToken SINGLETYPEREFERENCE_EXPECTEDTOKENS getExtraDimension insert_space_before_opening_bracket_in_array_type_reference printNextToken TerminalTokens TokenNameLBRACKET insert_space_between_brackets_in_array_type_reference printNextToken TerminalTokens TokenNameRBRACKET numberOfParens manageClosingParenthesizedExpression arrayTypeReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Array Type Reference org eclipse jdt internal compiler lookup Class Scope public boolean visit Array Type Reference array Type Reference Class Scope scope final int number Of Parens array Type Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression array Type Reference number Of Parens this scribe print Next Token SINGLETYPEREFERENCE EXPECTEDTOKENS int dimensions get Extra Dimension if dimensions 0 if this preferences insert space before opening bracket in array type reference this scribe space for int i 0 i dimensions i this scribe print Next Token Terminal Tokens Token NameLBRACKET if this preferences insert space between brackets in array type reference this scribe space this scribe print Next Token Terminal Tokens Token NameRBRACKET if number Of Parens 0 manage Closing Parenthesized Expression array Type Reference number Of Parens return false  ASTVisitor ArrayTypeReference ClassScope ArrayTypeReference arrayTypeReference ClassScope numberOfParens arrayTypeReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression arrayTypeReference numberOfParens printNextToken SINGLETYPEREFERENCE_EXPECTEDTOKENS getExtraDimension insert_space_before_opening_bracket_in_array_type_reference printNextToken TerminalTokens TokenNameLBRACKET insert_space_between_brackets_in_array_type_reference printNextToken TerminalTokens TokenNameRBRACKET numberOfParens manageClosingParenthesizedExpression arrayTypeReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Assert Statement org eclipse jdt internal compiler lookup Block Scope public boolean visit Assert Statement assert Statement Block Scope scope this scribe print Next Token Terminal Tokens Token Nameassert this scribe space assert Statement assert Expression traverse this scope if assert Statement exception Argument null this scribe print Next Token Terminal Tokens Token NameCOLON this preferences insert space before colon in assert if this preferences insert space after colon in assert this scribe space assert Statement exception Argument traverse this scope this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment return false  ASTVisitor AssertStatement BlockScope AssertStatement assertStatement BlockScope printNextToken TerminalTokens TokenNameassert assertStatement assertExpression assertStatement exceptionArgument printNextToken TerminalTokens TokenNameCOLON insert_space_before_colon_in_assert insert_space_after_colon_in_assert assertStatement exceptionArgument printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Assignment org eclipse jdt internal compiler lookup Block Scope public boolean visit Assignment assignment Block Scope scope final int number Of Parens assignment bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression assignment number Of Parens assignment lhs traverse this scope this scribe print Next Token Terminal Tokens Token NameEQUAL this preferences insert space before assignment operator if this preferences insert space after assignment operator this scribe space assignment expression traverse this scope if number Of Parens 0 manage Closing Parenthesized Expression assignment number Of Parens return false  ASTVisitor BlockScope BlockScope numberOfParens ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression numberOfParens printNextToken TerminalTokens TokenNameEQUAL insert_space_before_assignment_operator insert_space_after_assignment_operator numberOfParens manageClosingParenthesizedExpression numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Binary Expression org eclipse jdt internal compiler lookup Block Scope public boolean visit Binary Expression binary Expression Block Scope scope switch binary Expression bits AST Node OperatorMASK AST Node OperatorSHIFT case Operator Ids AND return dump Binary Expression binary Expression Terminal Tokens Token NameAND scope case Operator Ids DIVIDE return dump Binary Expression binary Expression Terminal Tokens Token NameDIVIDE scope case Operator Ids GREATER return dump Binary Expression binary Expression Terminal Tokens Token NameGREATER scope case Operator Ids GREATER EQUAL return dump Binary Expression binary Expression Terminal Tokens TokenNameGREATER EQUAL scope case Operator Ids LEFT SHIFT return dump Binary Expression binary Expression Terminal Tokens TokenNameLEFT SHIFT scope case Operator Ids LESS return dump Binary Expression binary Expression Terminal Tokens Token NameLESS scope case Operator Ids LESS EQUAL return dump Binary Expression binary Expression Terminal Tokens TokenNameLESS EQUAL scope case Operator Ids MINUS return dump Binary Expression binary Expression Terminal Tokens Token NameMINUS scope case Operator Ids MULTIPLY return dump Binary Expression binary Expression Terminal Tokens Token NameMULTIPLY scope case Operator Ids OR return dump Binary Expression binary Expression Terminal Tokens Token NameOR scope case Operator Ids PLUS return dump Binary Expression binary Expression Terminal Tokens Token NamePLUS scope case Operator Ids REMAINDER return dump Binary Expression binary Expression Terminal Tokens Token NameREMAINDER scope case Operator Ids RIGHT SHIFT return dump Binary Expression binary Expression Terminal Tokens TokenNameRIGHT SHIFT scope case Operator Ids UNSIGNED RIGHT SHIFT return dump Binary Expression binary Expression Terminal Tokens TokenNameUNSIGNED RIGHT SHIFT scope case Operator Ids XOR return dump Binary Expression binary Expression Terminal Tokens Token NameXOR scope default throw new Illegal State Exception  ASTVisitor BinaryExpression BlockScope BinaryExpression binaryExpression BlockScope binaryExpression ASTNode ASTNode OperatorIds dumpBinaryExpression binaryExpression TerminalTokens TokenNameAND OperatorIds dumpBinaryExpression binaryExpression TerminalTokens TokenNameDIVIDE OperatorIds dumpBinaryExpression binaryExpression TerminalTokens TokenNameGREATER OperatorIds GREATER_EQUAL dumpBinaryExpression binaryExpression TerminalTokens TokenNameGREATER_EQUAL OperatorIds LEFT_SHIFT dumpBinaryExpression binaryExpression TerminalTokens TokenNameLEFT_SHIFT OperatorIds dumpBinaryExpression binaryExpression TerminalTokens TokenNameLESS OperatorIds LESS_EQUAL dumpBinaryExpression binaryExpression TerminalTokens TokenNameLESS_EQUAL OperatorIds dumpBinaryExpression binaryExpression TerminalTokens TokenNameMINUS OperatorIds dumpBinaryExpression binaryExpression TerminalTokens TokenNameMULTIPLY OperatorIds dumpBinaryExpression binaryExpression TerminalTokens TokenNameOR OperatorIds dumpBinaryExpression binaryExpression TerminalTokens TokenNamePLUS OperatorIds dumpBinaryExpression binaryExpression TerminalTokens TokenNameREMAINDER OperatorIds RIGHT_SHIFT dumpBinaryExpression binaryExpression TerminalTokens TokenNameRIGHT_SHIFT OperatorIds UNSIGNED_RIGHT_SHIFT dumpBinaryExpression binaryExpression TerminalTokens TokenNameUNSIGNED_RIGHT_SHIFT OperatorIds dumpBinaryExpression binaryExpression TerminalTokens TokenNameXOR IllegalStateException
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Block org eclipse jdt internal compiler lookup Block Scope public boolean visit Block block Block Scope scope format Block block scope this preferences brace position for block this preferences insert space before opening brace in block return false  ASTVisitor BlockScope BlockScope formatBlock brace_position_for_block insert_space_before_opening_brace_in_block
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Break Statement org eclipse jdt internal compiler lookup Block Scope public boolean visit Break Statement break Statement Block Scope scope this scribe print Next Token Terminal Tokens Token Namebreak if break Statement label null this scribe print Next Token Terminal Tokens Token Name Identifier true this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment return false  ASTVisitor BreakStatement BlockScope BreakStatement breakStatement BlockScope printNextToken TerminalTokens TokenNamebreak breakStatement printNextToken TerminalTokens TokenNameIdentifier printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Case Statement org eclipse jdt internal compiler lookup Block Scope public boolean visit Case Statement case Statement Block Scope scope if case Statement constant Expression null this scribe print Next Token Terminal Tokens Token Namedefault this scribe print Next Token Terminal Tokens Token NameCOLON this preferences insert space before colon in default else this scribe print Next Token Terminal Tokens Token Namecase this scribe space case Statement constant Expression traverse this scope this scribe print Next Token Terminal Tokens Token NameCOLON this preferences insert space before colon in case return false  ASTVisitor CaseStatement BlockScope CaseStatement caseStatement BlockScope caseStatement constantExpression printNextToken TerminalTokens TokenNamedefault printNextToken TerminalTokens TokenNameCOLON insert_space_before_colon_in_default printNextToken TerminalTokens TokenNamecase caseStatement constantExpression printNextToken TerminalTokens TokenNameCOLON insert_space_before_colon_in_case
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Cast Expression org eclipse jdt internal compiler lookup Block Scope public boolean visit Cast Expression cast Expression Block Scope scope final int number Of Parens cast Expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression cast Expression number Of Parens this scribe print Next Token Terminal Tokens Token NameLPAREN if this preferences insert space after opening paren in cast this scribe space cast Expression type traverse this scope this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space before closing paren in cast if this preferences insert space after closing paren in cast this scribe space cast Expression expression traverse this scope if number Of Parens 0 manage Closing Parenthesized Expression cast Expression number Of Parens return false  ASTVisitor CastExpression BlockScope CastExpression castExpression BlockScope numberOfParens castExpression ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression castExpression numberOfParens printNextToken TerminalTokens TokenNameLPAREN insert_space_after_opening_paren_in_cast castExpression printNextToken TerminalTokens TokenNameRPAREN insert_space_before_closing_paren_in_cast insert_space_after_closing_paren_in_cast castExpression numberOfParens manageClosingParenthesizedExpression castExpression numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Char Literal org eclipse jdt internal compiler lookup Block Scope public boolean visit Char Literal char Literal Block Scope scope final int number Of Parens char Literal bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression char Literal number Of Parens this scribe print Next Token Terminal Tokens Token Name Character Literal if number Of Parens 0 manage Closing Parenthesized Expression char Literal number Of Parens return false  ASTVisitor CharLiteral BlockScope CharLiteral charLiteral BlockScope numberOfParens charLiteral ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression charLiteral numberOfParens printNextToken TerminalTokens TokenNameCharacterLiteral numberOfParens manageClosingParenthesizedExpression charLiteral numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Class Literal Access org eclipse jdt internal compiler lookup Block Scope public boolean visit Class Literal Access class Literal Block Scope scope final int number Of Parens class Literal bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression class Literal number Of Parens class Literal type traverse this scope this scribe print Next Token Terminal Tokens Token NameDOT this scribe print Next Token Terminal Tokens Token Nameclass if number Of Parens 0 manage Closing Parenthesized Expression class Literal number Of Parens return false  ASTVisitor ClassLiteralAccess BlockScope ClassLiteralAccess classLiteral BlockScope numberOfParens classLiteral ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression classLiteral numberOfParens classLiteral printNextToken TerminalTokens TokenNameDOT printNextToken TerminalTokens TokenNameclass numberOfParens manageClosingParenthesizedExpression classLiteral numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Clinit org eclipse jdt internal compiler lookup Class Scope public boolean visit Clinit clinit Class Scope scope return false  ASTVisitor ClassScope ClassScope
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Compilation Unit Declaration org eclipse jdt internal compiler lookup Compilation Unit Scope public boolean visit Compilation Unit Declaration compilation Unit Declaration Compilation Unit Scope scope fake new line to handle empty lines before package declaration or import declarations this scribe last Number Of New Lines 1 Package declaration if compilation Unit Declaration current Package null if has Comments this scribe print Comment int blank Lines Before Package this preferences blank lines before package if blank Lines Before Package 0 this scribe print Empty Lines blank Lines Before Package dump the package keyword this scribe print Next Token Terminal Tokens Token Namepackage this scribe space this scribe print Qualified Reference compilation Unit Declaration current Package source End this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment int blank Lines After Package this preferences blank lines after package if blank Lines After Package 0 this scribe print Empty Lines blank Lines After Package else this scribe print New Line else this scribe print Comment Import statements final Import Reference imports compilation Unit Declaration imports if imports null int blank Lines Before Imports this preferences blank lines before imports if blank Lines Before Imports 0 this scribe print Empty Lines blank Lines Before Imports int import Length imports length for int i 0 i import Length i imports i traverse this scope int blank Lines After Imports this preferences blank lines after imports if blank Lines After Imports 0 this scribe print Empty Lines blank Lines After Imports format Empty Type Declaration true int blank Line Between Type Declarations this preferences blank lines between type declarations Type declarations final Type Declaration types compilation Unit Declaration types if types null int types Length types length for int i 0 i types Length 1 i types i traverse this scope this scribe print Comment format Empty Type Declaration false if blank Line Between Type Declarations 0 this scribe print Empty Lines blank Line Between Type Declarations else this scribe print New Line format types types Length 1 this scribe print Comment format Empty Type Declaration false return false  ASTVisitor CompilationUnitDeclaration CompilationUnitScope CompilationUnitDeclaration compilationUnitDeclaration CompilationUnitScope lastNumberOfNewLines compilationUnitDeclaration currentPackage hasComments printComment blankLinesBeforePackage blank_lines_before_package blankLinesBeforePackage printEmptyLines blankLinesBeforePackage printNextToken TerminalTokens TokenNamepackage printQualifiedReference compilationUnitDeclaration currentPackage sourceEnd printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment blankLinesAfterPackage blank_lines_after_package blankLinesAfterPackage printEmptyLines blankLinesAfterPackage printNewLine printComment ImportReference compilationUnitDeclaration blankLinesBeforeImports blank_lines_before_imports blankLinesBeforeImports printEmptyLines blankLinesBeforeImports importLength importLength blankLinesAfterImports blank_lines_after_imports blankLinesAfterImports printEmptyLines blankLinesAfterImports formatEmptyTypeDeclaration blankLineBetweenTypeDeclarations blank_lines_between_type_declarations TypeDeclaration compilationUnitDeclaration typesLength typesLength printComment formatEmptyTypeDeclaration blankLineBetweenTypeDeclarations printEmptyLines blankLineBetweenTypeDeclarations printNewLine typesLength printComment formatEmptyTypeDeclaration
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Compound Assignment org eclipse jdt internal compiler lookup Block Scope public boolean visit Compound Assignment compound Assignment Block Scope scope final int number Of Parens compound Assignment bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression compound Assignment number Of Parens compound Assignment lhs traverse this scope Print the operator int operator switch compound Assignment operator case Operator Ids PLUS operator Terminal Tokens TokenNamePLUS EQUAL break case Operator Ids MINUS operator Terminal Tokens TokenNameMINUS EQUAL break case Operator Ids MULTIPLY operator Terminal Tokens TokenNameMULTIPLY EQUAL break case Operator Ids DIVIDE operator Terminal Tokens TokenNameDIVIDE EQUAL break case Operator Ids AND operator Terminal Tokens TokenNameAND EQUAL break case Operator Ids OR operator Terminal Tokens TokenNameOR EQUAL break case Operator Ids XOR operator Terminal Tokens TokenNameXOR EQUAL break case Operator Ids REMAINDER operator Terminal Tokens TokenNameREMAINDER EQUAL break case Operator Ids LEFT SHIFT operator Terminal Tokens TokenNameLEFT SHIFT EQUAL break case Operator Ids RIGHT SHIFT operator Terminal Tokens TokenNameRIGHT SHIFT EQUAL break default Operator Ids UNSIGNED RIGHT SHIFT operator Terminal Tokens TokenNameUNSIGNED RIGHT SHIFT EQUAL this scribe print Next Token operator this preferences insert space before assignment operator if this preferences insert space after assignment operator this scribe space compound Assignment expression traverse this scope if number Of Parens 0 manage Closing Parenthesized Expression compound Assignment number Of Parens return false  ASTVisitor CompoundAssignment BlockScope CompoundAssignment compoundAssignment BlockScope numberOfParens compoundAssignment ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression compoundAssignment numberOfParens compoundAssignment compoundAssignment OperatorIds TerminalTokens TokenNamePLUS_EQUAL OperatorIds TerminalTokens TokenNameMINUS_EQUAL OperatorIds TerminalTokens TokenNameMULTIPLY_EQUAL OperatorIds TerminalTokens TokenNameDIVIDE_EQUAL OperatorIds TerminalTokens TokenNameAND_EQUAL OperatorIds TerminalTokens TokenNameOR_EQUAL OperatorIds TerminalTokens TokenNameXOR_EQUAL OperatorIds TerminalTokens TokenNameREMAINDER_EQUAL OperatorIds LEFT_SHIFT TerminalTokens TokenNameLEFT_SHIFT_EQUAL OperatorIds RIGHT_SHIFT TerminalTokens TokenNameRIGHT_SHIFT_EQUAL OperatorIds UNSIGNED_RIGHT_SHIFT TerminalTokens TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL printNextToken insert_space_before_assignment_operator insert_space_after_assignment_operator compoundAssignment numberOfParens manageClosingParenthesizedExpression compoundAssignment numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Conditional Expression org eclipse jdt internal compiler lookup Block Scope public boolean visit Conditional Expression conditional Expression Block Scope scope final int number Of Parens conditional Expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression conditional Expression number Of Parens conditional Expression condition traverse this scope Alignment conditional Expression Alignment this scribe create Alignment conditional Expression NON NLS 1 this preferences alignment for conditional expression 2 this scribe scanner current Position this scribe enter Alignment conditional Expression Alignment boolean ok false do try this scribe align Fragment conditional Expression Alignment 0 this scribe print Next Token Terminal Tokens Token NameQUESTION this preferences insert space before question in conditional if this preferences insert space after question in conditional this scribe space conditional Expression value If True traverse this scope this scribe print Trailing Comment this scribe align Fragment conditional Expression Alignment 1 this scribe print Next Token Terminal Tokens Token NameCOLON this preferences insert space before colon in conditional if this preferences insert space after colon in conditional this scribe space conditional Expression value If False traverse this scope ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment conditional Expression Alignment true if number Of Parens 0 manage Closing Parenthesized Expression conditional Expression number Of Parens return false  ASTVisitor ConditionalExpression BlockScope ConditionalExpression conditionalExpression BlockScope numberOfParens conditionalExpression ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression conditionalExpression numberOfParens conditionalExpression conditionalExpressionAlignment createAlignment conditionalExpression alignment_for_conditional_expression currentPosition enterAlignment conditionalExpressionAlignment alignFragment conditionalExpressionAlignment printNextToken TerminalTokens TokenNameQUESTION insert_space_before_question_in_conditional insert_space_after_question_in_conditional conditionalExpression valueIfTrue printTrailingComment alignFragment conditionalExpressionAlignment printNextToken TerminalTokens TokenNameCOLON insert_space_before_colon_in_conditional insert_space_after_colon_in_conditional conditionalExpression valueIfFalse AlignmentException redoAlignment exitAlignment conditionalExpressionAlignment numberOfParens manageClosingParenthesizedExpression conditionalExpression numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Constructor Declaration org eclipse jdt internal compiler lookup Class Scope public boolean visit Constructor Declaration constructor Declaration Class Scope scope if constructor Declaration ignore Further Investigation this scribe print Comment this scribe scanner reset To constructor Declaration declaration Source End 1 this scribe scanner End Position this scribe print Trailing Comment return false Print comments to get proper line number this scribe print Comment final int line this scribe line this scribe print Modifiers this scribe space Print the method name this scribe print Next Token Terminal Tokens Token Name Identifier true format Method Arguments constructor Declaration this preferences insert space before opening paren in constructor declaration this preferences insert space between empty parens in constructor declaration this preferences insert space before closing paren in constructor declaration this preferences insert space after opening paren in constructor declaration this preferences insert space before comma in constructor declaration parameters this preferences insert space after comma in constructor declaration parameters this preferences alignment for parameters in constructor declaration format Throws Clause constructor Declaration this preferences insert space before comma in constructor declaration throws this preferences insert space after comma in constructor declaration throws this preferences alignment for throws clause in constructor declaration if constructor Declaration is Native constructor Declaration is Abstract Method body String constructor declaration brace this preferences brace position for constructor declaration format Left Curly Brace line constructor declaration brace format Opening Brace constructor declaration brace this preferences insert space before opening brace in constructor declaration final int number Of Blank Lines At Beginning Of Method Body this preferences blank lines at beginning of method body if number Of Blank Lines At Beginning Of Method Body 0 this scribe print Empty Lines number Of Blank Lines At Beginning Of Method Body if constructor Declaration constructor Call null constructor Declaration constructor Call is Implicit Super this scribe print New Line if this preferences indent statements compare to body this scribe indent constructor Declaration constructor Call traverse this constructor Declaration scope if this preferences indent statements compare to body this scribe un Indent final Statement statements constructor Declaration statements if statements null this scribe print New Line if this preferences indent statements compare to body this scribe indent format Statements constructor Declaration scope statements true this scribe print Comment if this preferences indent statements compare to body this scribe un Indent else if this preferences insert new line in empty method body this scribe print New Line if this preferences indent statements compare to body this scribe indent this scribe print Comment if this preferences indent statements compare to body this scribe un Indent this scribe print Next Token Terminal Tokens Token NameRBRACE this scribe print Trailing Comment if constructor declaration brace equals Default Code Formatter Constants NEXT LINE SHIFTED this scribe un Indent else no method body this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment return false  ASTVisitor ConstructorDeclaration ClassScope ConstructorDeclaration constructorDeclaration ClassScope constructorDeclaration ignoreFurtherInvestigation printComment resetTo constructorDeclaration declarationSourceEnd scannerEndPosition printTrailingComment printComment printModifiers printNextToken TerminalTokens TokenNameIdentifier formatMethodArguments constructorDeclaration insert_space_before_opening_paren_in_constructor_declaration insert_space_between_empty_parens_in_constructor_declaration insert_space_before_closing_paren_in_constructor_declaration insert_space_after_opening_paren_in_constructor_declaration insert_space_before_comma_in_constructor_declaration_parameters insert_space_after_comma_in_constructor_declaration_parameters alignment_for_parameters_in_constructor_declaration formatThrowsClause constructorDeclaration insert_space_before_comma_in_constructor_declaration_throws insert_space_after_comma_in_constructor_declaration_throws alignment_for_throws_clause_in_constructor_declaration constructorDeclaration isNative constructorDeclaration isAbstract constructor_declaration_brace brace_position_for_constructor_declaration formatLeftCurlyBrace constructor_declaration_brace formatOpeningBrace constructor_declaration_brace insert_space_before_opening_brace_in_constructor_declaration numberOfBlankLinesAtBeginningOfMethodBody blank_lines_at_beginning_of_method_body numberOfBlankLinesAtBeginningOfMethodBody printEmptyLines numberOfBlankLinesAtBeginningOfMethodBody constructorDeclaration constructorCall constructorDeclaration constructorCall isImplicitSuper printNewLine indent_statements_compare_to_body constructorDeclaration constructorCall constructorDeclaration indent_statements_compare_to_body unIndent constructorDeclaration printNewLine indent_statements_compare_to_body formatStatements constructorDeclaration printComment indent_statements_compare_to_body unIndent insert_new_line_in_empty_method_body printNewLine indent_statements_compare_to_body printComment indent_statements_compare_to_body unIndent printNextToken TerminalTokens TokenNameRBRACE printTrailingComment constructor_declaration_brace DefaultCodeFormatterConstants NEXT_LINE_SHIFTED unIndent printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Continue Statement org eclipse jdt internal compiler lookup Block Scope public boolean visit Continue Statement continue Statement Block Scope scope this scribe print Next Token Terminal Tokens Token Namecontinue if continue Statement label null this scribe print Next Token Terminal Tokens Token Name Identifier true this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment return false  ASTVisitor ContinueStatement BlockScope ContinueStatement continueStatement BlockScope printNextToken TerminalTokens TokenNamecontinue continueStatement printNextToken TerminalTokens TokenNameIdentifier printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Do Statement org eclipse jdt internal compiler lookup Block Scope public boolean visit Do Statement do Statement Block Scope scope this scribe print Next Token Terminal Tokens Token Namedo final int line this scribe line final Statement action do Statement action if action null if action instanceof Block format Left Curly Brace line this preferences brace position for block action traverse this scope else if action instanceof Empty Statement This is an empty statement format Necessary Empty Statement else this scribe print New Line this scribe indent action traverse this scope if action instanceof Expression this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment this scribe print New Line this scribe un Indent else This is an empty statement format Necessary Empty Statement if this preferences insert new line before while in do statement this scribe print New Line this scribe print Next Token Terminal Tokens Token Namewhile this preferences insert space after closing brace in block this scribe print Next Token Terminal Tokens Token NameLPAREN this preferences insert space before opening paren in while if this preferences insert space after opening paren in while this scribe space do Statement condition traverse this scope this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space before closing paren in while this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment return false  ASTVisitor DoStatement BlockScope DoStatement doStatement BlockScope printNextToken TerminalTokens TokenNamedo doStatement formatLeftCurlyBrace brace_position_for_block EmptyStatement formatNecessaryEmptyStatement printNewLine printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment printNewLine unIndent formatNecessaryEmptyStatement insert_new_line_before_while_in_do_statement printNewLine printNextToken TerminalTokens TokenNamewhile insert_space_after_closing_brace_in_block printNextToken TerminalTokens TokenNameLPAREN insert_space_before_opening_paren_in_while insert_space_after_opening_paren_in_while doStatement printNextToken TerminalTokens TokenNameRPAREN insert_space_before_closing_paren_in_while printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Double Literal org eclipse jdt internal compiler lookup Block Scope public boolean visit Double Literal double Literal Block Scope scope final int number Of Parens double Literal bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression double Literal number Of Parens Constant constant double Literal constant if constant null constant double Value 0 this scribe print Next Token Terminal Tokens Token NameMINUS this scribe print Next Token Terminal Tokens Token Name Double Literal if number Of Parens 0 manage Closing Parenthesized Expression double Literal number Of Parens return false  ASTVisitor DoubleLiteral BlockScope DoubleLiteral doubleLiteral BlockScope numberOfParens doubleLiteral ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression doubleLiteral numberOfParens doubleLiteral doubleValue printNextToken TerminalTokens TokenNameMINUS printNextToken TerminalTokens TokenNameDoubleLiteral numberOfParens manageClosingParenthesizedExpression doubleLiteral numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Empty Statement org eclipse jdt internal compiler lookup Block Scope public boolean visit Empty Statement statement Block Scope scope format Empty Statement return false  ASTVisitor EmptyStatement BlockScope EmptyStatement BlockScope formatEmptyStatement
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Equal Expression org eclipse jdt internal compiler lookup Block Scope public boolean visit Equal Expression equal Expression Block Scope scope if equal Expression bits AST Node OperatorMASK AST Node OperatorSHIFT Operator Ids EQUAL EQUAL return dump Equality Expression equal Expression Terminal Tokens TokenNameEQUAL EQUAL scope else return dump Equality Expression equal Expression Terminal Tokens TokenNameNOT EQUAL scope  ASTVisitor EqualExpression BlockScope EqualExpression equalExpression BlockScope equalExpression ASTNode ASTNode OperatorIds EQUAL_EQUAL dumpEqualityExpression equalExpression TerminalTokens TokenNameEQUAL_EQUAL dumpEqualityExpression equalExpression TerminalTokens TokenNameNOT_EQUAL
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Explicit Constructor Call org eclipse jdt internal compiler lookup Block Scope public boolean visit Explicit Constructor Call explicit Constructor Block Scope scope if explicit Constructor is Implicit Super return false final Expression qualification explicit Constructor qualification if qualification null qualification traverse this scope this scribe print Next Token Terminal Tokens Token NameDOT if explicit Constructor is Super Access this scribe print Next Token Terminal Tokens Token Namesuper else this scribe print Next Token Terminal Tokens Token Namethis this scribe print Next Token Terminal Tokens Token NameLPAREN this preferences insert space before opening paren in method invocation final Expression arguments explicit Constructor arguments if arguments null if this preferences insert space after opening paren in method invocation this scribe space int argument Length arguments length Alignment arguments Alignment this scribe create Alignment explicit constructor call NON NLS 1 this preferences alignment for arguments in explicit constructor call argument Length this scribe scanner current Position this scribe enter Alignment arguments Alignment boolean ok false do try for int i 0 i argument Length i if i 0 this scribe print Next Token Terminal Tokens Token NameCOMMA this preferences insert space before comma in explicit constructor call arguments this scribe print Trailing Comment this scribe align Fragment arguments Alignment i if i 0 this preferences insert space after comma in explicit constructor call arguments this scribe space arguments i traverse this scope ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment arguments Alignment true this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space before closing paren in method invocation else this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space between empty parens in method invocation this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment return false  ASTVisitor ExplicitConstructorCall BlockScope ExplicitConstructorCall explicitConstructor BlockScope explicitConstructor isImplicitSuper explicitConstructor printNextToken TerminalTokens TokenNameDOT explicitConstructor isSuperAccess printNextToken TerminalTokens TokenNamesuper printNextToken TerminalTokens TokenNamethis printNextToken TerminalTokens TokenNameLPAREN insert_space_before_opening_paren_in_method_invocation explicitConstructor insert_space_after_opening_paren_in_method_invocation argumentLength argumentsAlignment createAlignment explicit_constructor_call alignment_for_arguments_in_explicit_constructor_call argumentLength currentPosition enterAlignment argumentsAlignment argumentLength printNextToken TerminalTokens TokenNameCOMMA insert_space_before_comma_in_explicit_constructor_call_arguments printTrailingComment alignFragment argumentsAlignment insert_space_after_comma_in_explicit_constructor_call_arguments AlignmentException redoAlignment exitAlignment argumentsAlignment printNextToken TerminalTokens TokenNameRPAREN insert_space_before_closing_paren_in_method_invocation printNextToken TerminalTokens TokenNameRPAREN insert_space_between_empty_parens_in_method_invocation printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast False Literal org eclipse jdt internal compiler lookup Block Scope public boolean visit False Literal false Literal Block Scope scope final int number Of Parens false Literal bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression false Literal number Of Parens this scribe print Next Token Terminal Tokens Token Namefalse if number Of Parens 0 manage Closing Parenthesized Expression false Literal number Of Parens return false  ASTVisitor FalseLiteral BlockScope FalseLiteral falseLiteral BlockScope numberOfParens falseLiteral ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression falseLiteral numberOfParens printNextToken TerminalTokens TokenNamefalse numberOfParens manageClosingParenthesizedExpression falseLiteral numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Field Reference org eclipse jdt internal compiler lookup Block Scope public boolean visit Field Reference field Reference Block Scope scope final int number Of Parens field Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression field Reference number Of Parens field Reference receiver traverse this scope this scribe print Next Token Terminal Tokens Token NameDOT this scribe print Next Token Terminal Tokens Token Name Identifier if number Of Parens 0 manage Closing Parenthesized Expression field Reference number Of Parens return false  ASTVisitor FieldReference BlockScope FieldReference fieldReference BlockScope numberOfParens fieldReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression fieldReference numberOfParens fieldReference printNextToken TerminalTokens TokenNameDOT printNextToken TerminalTokens TokenNameIdentifier numberOfParens manageClosingParenthesizedExpression fieldReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Float Literal org eclipse jdt internal compiler lookup Block Scope public boolean visit Float Literal float Literal Block Scope scope final int number Of Parens float Literal bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression float Literal number Of Parens Constant constant float Literal constant if constant null float Literal constant float Value 0 this scribe print Next Token Terminal Tokens Token NameMINUS this scribe print Next Token Terminal Tokens Token Name Floating Point Literal if number Of Parens 0 manage Closing Parenthesized Expression float Literal number Of Parens return false  ASTVisitor FloatLiteral BlockScope FloatLiteral floatLiteral BlockScope numberOfParens floatLiteral ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression floatLiteral numberOfParens floatLiteral floatLiteral floatValue printNextToken TerminalTokens TokenNameMINUS printNextToken TerminalTokens TokenNameFloatingPointLiteral numberOfParens manageClosingParenthesizedExpression floatLiteral numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast For Statement org eclipse jdt internal compiler lookup Block Scope public boolean visit For Statement for Statement Block Scope scope this scribe print Next Token Terminal Tokens Token Namefor final int line this scribe line this scribe print Next Token Terminal Tokens Token NameLPAREN this preferences insert space before opening paren in for if this preferences insert space after opening paren in for this scribe space final Statement initializations for Statement initializations if initializations null int length initializations length for int i 0 i length i if initializations i instanceof Local Declaration format Local Declaration Local Declaration initializations i scope this preferences insert space before comma in for inits this preferences insert space after comma in for inits else initializations i traverse this scope if i 0 i length 1 this scribe print Next Token Terminal Tokens Token NameCOMMA this preferences insert space before comma in for inits if this preferences insert space after comma in for inits this scribe space this scribe print Trailing Comment this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon in for final Expression condition for Statement condition if condition null if this preferences insert space after semicolon in for this scribe space condition traverse this scope this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon in for final Statement increments for Statement increments if increments null if this preferences insert space after semicolon in for this scribe space for int i 0 length increments length i length i increments i traverse this scope if i length 1 this scribe print Next Token Terminal Tokens Token NameCOMMA this preferences insert space before comma in for increments if this preferences insert space after comma in for increments this scribe space this scribe print Trailing Comment this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space before closing paren in for final Statement action for Statement action if action null if action instanceof Block format Left Curly Brace line this preferences brace position for block action traverse this scope else if action instanceof Empty Statement This is an empty statement format Necessary Empty Statement else this scribe indent this scribe print New Line action traverse this scope this scribe un Indent if action instanceof Expression this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment else This is an empty statement format Necessary Empty Statement return false  ASTVisitor ForStatement BlockScope ForStatement forStatement BlockScope printNextToken TerminalTokens TokenNamefor printNextToken TerminalTokens TokenNameLPAREN insert_space_before_opening_paren_in_for insert_space_after_opening_paren_in_for forStatement LocalDeclaration formatLocalDeclaration LocalDeclaration insert_space_before_comma_in_for_inits insert_space_after_comma_in_for_inits printNextToken TerminalTokens TokenNameCOMMA insert_space_before_comma_in_for_inits insert_space_after_comma_in_for_inits printTrailingComment printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon_in_for forStatement insert_space_after_semicolon_in_for printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon_in_for forStatement insert_space_after_semicolon_in_for printNextToken TerminalTokens TokenNameCOMMA insert_space_before_comma_in_for_increments insert_space_after_comma_in_for_increments printTrailingComment printNextToken TerminalTokens TokenNameRPAREN insert_space_before_closing_paren_in_for forStatement formatLeftCurlyBrace brace_position_for_block EmptyStatement formatNecessaryEmptyStatement printNewLine unIndent printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment formatNecessaryEmptyStatement
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast If Statement org eclipse jdt internal compiler lookup Block Scope public boolean visit If Statement if Statement Block Scope scope this scribe print Next Token Terminal Tokens Token Nameif final int line this scribe line this scribe print Next Token Terminal Tokens Token NameLPAREN this preferences insert space before opening paren in if if this preferences insert space after opening paren in if this scribe space if Statement condition traverse this scope this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space before closing paren in if final Statement then Statement if Statement then Statement final Statement else Statement if Statement else Statement boolean then Statement Is Block false if then Statement null if then Statement instanceof Block then Statement Is Block true if is Guard Clause Block then Statement else Statement null this preferences keep guardian clause on one line Need a specific formatting for guard clauses guard clauses are block with a single return or throw statement format Guard Clause Block Block then Statement scope else format Left Curly Brace line this preferences brace position for block then Statement traverse this scope if else Statement null this preferences insert new line before else in if statement this scribe print New Line else if else Statement null this preferences keep simple if on one line Alignment compact If Alignment this scribe create Alignment compact If NON NLS 1 this preferences alignment for compact if Alignment R OUTERMOST 1 this scribe scanner current Position this scribe enter Alignment compact If Alignment boolean ok false do try this scribe align Fragment compact If Alignment 0 this scribe space then Statement traverse this scope if then Statement instanceof Expression this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment compact If Alignment true else if this preferences keep then statement on same line this scribe space then Statement traverse this scope if then Statement instanceof Expression this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment if else Statement null this scribe print New Line else this scribe print Trailing Comment this scribe print New Line this scribe indent then Statement traverse this scope if then Statement instanceof Expression this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment if else Statement null this scribe print New Line this scribe un Indent if else Statement null if then Statement Is Block this scribe print Next Token Terminal Tokens Token Nameelse this preferences insert space after closing brace in block else this scribe print Next Token Terminal Tokens Token Nameelse true if else Statement instanceof Block else Statement traverse this scope else if else Statement instanceof If Statement if this preferences compact else if this scribe print New Line this scribe indent this scribe space else Statement traverse this scope if this preferences compact else if this scribe un Indent else if this preferences keep else statement on same line this scribe space else Statement traverse this scope if else Statement instanceof Expression this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment else this scribe print New Line this scribe indent else Statement traverse this scope if else Statement instanceof Expression this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment this scribe un Indent return false  ASTVisitor IfStatement BlockScope IfStatement ifStatement BlockScope printNextToken TerminalTokens TokenNameif printNextToken TerminalTokens TokenNameLPAREN insert_space_before_opening_paren_in_if insert_space_after_opening_paren_in_if ifStatement printNextToken TerminalTokens TokenNameRPAREN insert_space_before_closing_paren_in_if thenStatement ifStatement thenStatement elseStatement ifStatement elseStatement thenStatementIsBlock thenStatement thenStatement thenStatementIsBlock isGuardClause thenStatement elseStatement keep_guardian_clause_on_one_line formatGuardClauseBlock thenStatement formatLeftCurlyBrace brace_position_for_block thenStatement elseStatement insert_new_line_before_else_in_if_statement printNewLine elseStatement keep_simple_if_on_one_line compactIfAlignment createAlignment compactIf alignment_for_compact_if R_OUTERMOST currentPosition enterAlignment compactIfAlignment alignFragment compactIfAlignment thenStatement thenStatement printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment AlignmentException redoAlignment exitAlignment compactIfAlignment keep_then_statement_on_same_line thenStatement thenStatement printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment elseStatement printNewLine printTrailingComment printNewLine thenStatement thenStatement printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment elseStatement printNewLine unIndent elseStatement thenStatementIsBlock printNextToken TerminalTokens TokenNameelse insert_space_after_closing_brace_in_block printNextToken TerminalTokens TokenNameelse elseStatement elseStatement elseStatement IfStatement compact_else_if printNewLine elseStatement compact_else_if unIndent keep_else_statement_on_same_line elseStatement elseStatement printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment printNewLine elseStatement elseStatement printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment unIndent
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Import Reference org eclipse jdt internal compiler lookup Compilation Unit Scope public boolean visit Import Reference import Ref Compilation Unit Scope scope this scribe print Next Token Terminal Tokens Token Nameimport this scribe space if import Ref on Demand this scribe print Qualified Reference import Ref source End this scribe print Next Token Terminal Tokens Token NameDOT this scribe print Next Token Terminal Tokens Token NameMULTIPLY this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon else this scribe print Qualified Reference import Ref source End this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment this scribe print New Line return false  ASTVisitor ImportReference CompilationUnitScope ImportReference importRef CompilationUnitScope printNextToken TerminalTokens TokenNameimport importRef onDemand printQualifiedReference importRef sourceEnd printNextToken TerminalTokens TokenNameDOT printNextToken TerminalTokens TokenNameMULTIPLY printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printQualifiedReference importRef sourceEnd printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment printNewLine
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Initializer org eclipse jdt internal compiler lookup Method Scope public boolean visit Initializer initializer Method Scope scope if initializer is Static this scribe print Next Token Terminal Tokens Token Namestatic initializer block traverse this scope return false  ASTVisitor MethodScope MethodScope isStatic printNextToken TerminalTokens TokenNamestatic
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Instance Of Expression org eclipse jdt internal compiler lookup Block Scope public boolean visit Instance Of Expression instance Of Expression Block Scope scope final int number Of Parens instance Of Expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression instance Of Expression number Of Parens instance Of Expression expression traverse this scope this scribe print Next Token Terminal Tokens Token Nameinstanceof true this scribe space instance Of Expression type traverse this scope if number Of Parens 0 manage Closing Parenthesized Expression instance Of Expression number Of Parens return false  ASTVisitor InstanceOfExpression BlockScope InstanceOfExpression instanceOfExpression BlockScope numberOfParens instanceOfExpression ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression instanceOfExpression numberOfParens instanceOfExpression printNextToken TerminalTokens TokenNameinstanceof instanceOfExpression numberOfParens manageClosingParenthesizedExpression instanceOfExpression numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Int Literal org eclipse jdt internal compiler lookup Block Scope public boolean visit Int Literal int Literal Block Scope scope final int number Of Parens int Literal bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression int Literal number Of Parens Constant constant int Literal constant if constant null constant int Value 0 this scribe print Next Token Terminal Tokens Token NameMINUS this scribe print Next Token Terminal Tokens Token Name Integer Literal if number Of Parens 0 manage Closing Parenthesized Expression int Literal number Of Parens return false  ASTVisitor IntLiteral BlockScope IntLiteral intLiteral BlockScope numberOfParens intLiteral ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression intLiteral numberOfParens intLiteral intValue printNextToken TerminalTokens TokenNameMINUS printNextToken TerminalTokens TokenNameIntegerLiteral numberOfParens manageClosingParenthesizedExpression intLiteral numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Labeled Statement org eclipse jdt internal compiler lookup Block Scope public boolean visit Labeled Statement labeled Statement Block Scope scope this scribe print Next Token Terminal Tokens Token Name Identifier this scribe print Next Token Terminal Tokens Token NameCOLON this preferences insert space before colon in labeled statement if this preferences insert space after colon in labeled statement this scribe space labeled Statement statement traverse this scope return false  ASTVisitor LabeledStatement BlockScope LabeledStatement labeledStatement BlockScope printNextToken TerminalTokens TokenNameIdentifier printNextToken TerminalTokens TokenNameCOLON insert_space_before_colon_in_labeled_statement insert_space_after_colon_in_labeled_statement labeledStatement
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Local Declaration org eclipse jdt internal compiler lookup Block Scope public boolean visit Local Declaration local Declaration Block Scope scope format Local Declaration local Declaration scope this preferences insert space before comma in multiple local declarations this preferences insert space after comma in multiple local declarations return false  ASTVisitor LocalDeclaration BlockScope LocalDeclaration localDeclaration BlockScope formatLocalDeclaration localDeclaration insert_space_before_comma_in_multiple_local_declarations insert_space_after_comma_in_multiple_local_declarations
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Long Literal org eclipse jdt internal compiler lookup Block Scope public boolean visit Long Literal long Literal Block Scope scope final int number Of Parens long Literal bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression long Literal number Of Parens Constant constant long Literal constant if constant null constant long Value 0 this scribe print Next Token Terminal Tokens Token NameMINUS this scribe print Next Token Terminal Tokens Token Name Long Literal if number Of Parens 0 manage Closing Parenthesized Expression long Literal number Of Parens return false  ASTVisitor LongLiteral BlockScope LongLiteral longLiteral BlockScope numberOfParens longLiteral ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression longLiteral numberOfParens longLiteral longValue printNextToken TerminalTokens TokenNameMINUS printNextToken TerminalTokens TokenNameLongLiteral numberOfParens manageClosingParenthesizedExpression longLiteral numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Type Declaration org eclipse jdt internal compiler lookup Class Scope public boolean visit Type Declaration member Type Declaration Class Scope scope format member Type Declaration return false  ASTVisitor TypeDeclaration ClassScope TypeDeclaration memberTypeDeclaration ClassScope memberTypeDeclaration
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Message Send org eclipse jdt internal compiler lookup Block Scope public boolean visit Message Send message Send Block Scope scope final int number Of Parens message Send bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression message Send number Of Parens Cascading Method Invocation Fragment Builder builder build Fragments message Send scope if builder size 3 number Of Parens 0 format Cascading Message Sends builder scope else Alignment message Alignment null if message Send receiver is Implicit This message Send receiver traverse this scope message Alignment this scribe create Alignment message Alignment NON NLS 1 this preferences alignment for selector in method invocation 1 this scribe scanner current Position this scribe enter Alignment message Alignment boolean ok false do try format Message Send message Send scope message Alignment ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment message Alignment true else format Message Send message Send scope null if number Of Parens 0 manage Closing Parenthesized Expression message Send number Of Parens return false  ASTVisitor MessageSend BlockScope MessageSend messageSend BlockScope numberOfParens messageSend ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression messageSend numberOfParens CascadingMethodInvocationFragmentBuilder buildFragments messageSend numberOfParens formatCascadingMessageSends messageAlignment messageSend isImplicitThis messageSend messageAlignment createAlignment messageAlignment alignment_for_selector_in_method_invocation currentPosition enterAlignment messageAlignment formatMessageSend messageSend messageAlignment AlignmentException redoAlignment exitAlignment messageAlignment formatMessageSend messageSend numberOfParens manageClosingParenthesizedExpression messageSend numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Method Declaration org eclipse jdt internal compiler lookup Class Scope public boolean visit Method Declaration method Declaration Class Scope scope if method Declaration ignore Further Investigation this scribe print Comment this scribe scanner reset To method Declaration declaration Source End 1 this scribe scanner End Position this scribe print Trailing Comment return false Print comments to get proper line number this scribe print Comment final int line this scribe line this scribe print Modifiers this scribe space Print the method return type final Type Reference return Type method Declaration return Type final Method Scope method Declaration Scope method Declaration scope if return Type null return Type traverse this method Declaration Scope Print the method name this scribe print Next Token Terminal Tokens Token Name Identifier true format Method Arguments method Declaration this preferences insert space before opening paren in method declaration this preferences insert space between empty parens in method declaration this preferences insert space before closing paren in method declaration this preferences insert space after opening paren in method declaration this preferences insert space before comma in method declaration parameters this preferences insert space after comma in method declaration parameters this preferences alignment for parameters in method declaration Check for extra dimensions int extra Dimensions get Extra Dimension if extra Dimensions 0 for int i 0 i extra Dimensions i this scribe print Next Token Terminal Tokens Token NameLBRACKET this scribe print Next Token Terminal Tokens Token NameRBRACKET format Throws Clause method Declaration this preferences insert space before comma in method declaration throws this preferences insert space after comma in method declaration throws this preferences alignment for throws clause in method declaration if method Declaration is Native method Declaration is Abstract method Declaration modifiers Compiler Modifiers Acc Semicolon Body 0 Method body String method declaration brace this preferences brace position for method declaration format Left Curly Brace line method declaration brace format Opening Brace method declaration brace this preferences insert space before opening brace in method declaration final int number Of Blank Lines At Beginning Of Method Body this preferences blank lines at beginning of method body if number Of Blank Lines At Beginning Of Method Body 0 this scribe print Empty Lines number Of Blank Lines At Beginning Of Method Body final Statement statements method Declaration statements if statements null this scribe print New Line if this preferences indent statements compare to body this scribe indent format Statements method Declaration Scope statements true this scribe print Comment if this preferences indent statements compare to body this scribe un Indent else if this preferences insert new line in empty method body this scribe print New Line if this preferences indent statements compare to body this scribe indent this scribe print Comment if this preferences indent statements compare to body this scribe un Indent this scribe print Next Token Terminal Tokens Token NameRBRACE this scribe print Trailing Comment if method declaration brace equals Default Code Formatter Constants NEXT LINE SHIFTED this scribe un Indent else no method body this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment return false  ASTVisitor MethodDeclaration ClassScope MethodDeclaration methodDeclaration ClassScope methodDeclaration ignoreFurtherInvestigation printComment resetTo methodDeclaration declarationSourceEnd scannerEndPosition printTrailingComment printComment printModifiers TypeReference returnType methodDeclaration returnType MethodScope methodDeclarationScope methodDeclaration returnType returnType methodDeclarationScope printNextToken TerminalTokens TokenNameIdentifier formatMethodArguments methodDeclaration insert_space_before_opening_paren_in_method_declaration insert_space_between_empty_parens_in_method_declaration insert_space_before_closing_paren_in_method_declaration insert_space_after_opening_paren_in_method_declaration insert_space_before_comma_in_method_declaration_parameters insert_space_after_comma_in_method_declaration_parameters alignment_for_parameters_in_method_declaration extraDimensions getExtraDimension extraDimensions extraDimensions printNextToken TerminalTokens TokenNameLBRACKET printNextToken TerminalTokens TokenNameRBRACKET formatThrowsClause methodDeclaration insert_space_before_comma_in_method_declaration_throws insert_space_after_comma_in_method_declaration_throws alignment_for_throws_clause_in_method_declaration methodDeclaration isNative methodDeclaration isAbstract methodDeclaration CompilerModifiers AccSemicolonBody method_declaration_brace brace_position_for_method_declaration formatLeftCurlyBrace method_declaration_brace formatOpeningBrace method_declaration_brace insert_space_before_opening_brace_in_method_declaration numberOfBlankLinesAtBeginningOfMethodBody blank_lines_at_beginning_of_method_body numberOfBlankLinesAtBeginningOfMethodBody printEmptyLines numberOfBlankLinesAtBeginningOfMethodBody methodDeclaration printNewLine indent_statements_compare_to_body formatStatements methodDeclarationScope printComment indent_statements_compare_to_body unIndent insert_new_line_in_empty_method_body printNewLine indent_statements_compare_to_body printComment indent_statements_compare_to_body unIndent printNextToken TerminalTokens TokenNameRBRACE printTrailingComment method_declaration_brace DefaultCodeFormatterConstants NEXT_LINE_SHIFTED unIndent printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Null Literal org eclipse jdt internal compiler lookup Block Scope public boolean visit String Literal Concatenation string Literal Block Scope scope final int number Of Parens string Literal bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression string Literal number Of Parens this scribe print Comment AST Node fragments string Literal literals int fragments Size string Literal counter Alignment binary Expression Alignment this scribe create Alignment binary Expression Alignment this preferences alignment for binary expression Alignment R OUTERMOST fragments Size this scribe scanner current Position NON NLS 1 this scribe enter Alignment binary Expression Alignment boolean ok false do try for int i 0 i fragments Size 1 i AST Node fragment fragments i fragment traverse this scope this scribe print Trailing Comment if this scribe last Number Of New Lines 1 a new line has been inserted by print Trailing Comment this scribe indentation Level binary Expression Alignment break Indentation Level this scribe align Fragment binary Expression Alignment i this scribe print Next Token Terminal Tokens Token NamePLUS this preferences insert space before binary operator if this preferences insert space after binary operator this scribe space fragments fragments Size 1 traverse this scope this scribe print Trailing Comment ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment binary Expression Alignment true if number Of Parens 0 manage Closing Parenthesized Expression string Literal number Of Parens return false  ASTVisitor NullLiteral BlockScope StringLiteralConcatenation stringLiteral BlockScope numberOfParens stringLiteral ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression stringLiteral numberOfParens printComment ASTNode stringLiteral fragmentsSize stringLiteral binaryExpressionAlignment createAlignment binaryExpressionAlignment alignment_for_binary_expression R_OUTERMOST fragmentsSize currentPosition enterAlignment binaryExpressionAlignment fragmentsSize ASTNode printTrailingComment lastNumberOfNewLines printTrailingComment indentationLevel binaryExpressionAlignment breakIndentationLevel alignFragment binaryExpressionAlignment printNextToken TerminalTokens TokenNamePLUS insert_space_before_binary_operator insert_space_after_binary_operator fragmentsSize printTrailingComment AlignmentException redoAlignment exitAlignment binaryExpressionAlignment numberOfParens manageClosingParenthesizedExpression stringLiteral numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Null Literal org eclipse jdt internal compiler lookup Block Scope public boolean visit Null Literal null Literal Block Scope scope final int number Of Parens null Literal bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression null Literal number Of Parens this scribe print Next Token Terminal Tokens Token Namenull if number Of Parens 0 manage Closing Parenthesized Expression null Literal number Of Parens return false  ASTVisitor NullLiteral BlockScope NullLiteral nullLiteral BlockScope numberOfParens nullLiteral ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression nullLiteral numberOfParens printNextToken TerminalTokens TokenNamenull numberOfParens manageClosingParenthesizedExpression nullLiteral numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast OR OR Expression org eclipse jdt internal compiler lookup Block Scope public boolean visit OR OR Expression or or Expression Block Scope scope return dump Binary Expression or or Expression Terminal Tokens TokenNameOR OR scope  ASTVisitor OR_OR_Expression BlockScope OR_OR_Expression or_or_Expression BlockScope dumpBinaryExpression or_or_Expression TerminalTokens TokenNameOR_OR
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Postfix Expression org eclipse jdt internal compiler lookup Block Scope public boolean visit Postfix Expression postfix Expression Block Scope scope final int number Of Parens postfix Expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression postfix Expression number Of Parens postfix Expression lhs traverse this scope int operator postfix Expression operator Operator Ids PLUS Terminal Tokens TokenNamePLUS PLUS Terminal Tokens TokenNameMINUS MINUS this scribe print Next Token operator this preferences insert space before postfix operator if this preferences insert space after postfix operator this scribe space if number Of Parens 0 manage Closing Parenthesized Expression postfix Expression number Of Parens return false  ASTVisitor PostfixExpression BlockScope PostfixExpression postfixExpression BlockScope numberOfParens postfixExpression ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression postfixExpression numberOfParens postfixExpression postfixExpression OperatorIds TerminalTokens TokenNamePLUS_PLUS TerminalTokens TokenNameMINUS_MINUS printNextToken insert_space_before_postfix_operator insert_space_after_postfix_operator numberOfParens manageClosingParenthesizedExpression postfixExpression numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Prefix Expression org eclipse jdt internal compiler lookup Block Scope public boolean visit Prefix Expression prefix Expression Block Scope scope final int number Of Parens prefix Expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression prefix Expression number Of Parens int operator prefix Expression operator Operator Ids PLUS Terminal Tokens TokenNamePLUS PLUS Terminal Tokens TokenNameMINUS MINUS this scribe print Next Token operator this preferences insert space before prefix operator if this preferences insert space after prefix operator this scribe space prefix Expression lhs traverse this scope if number Of Parens 0 manage Closing Parenthesized Expression prefix Expression number Of Parens return false  ASTVisitor PrefixExpression BlockScope PrefixExpression prefixExpression BlockScope numberOfParens prefixExpression ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression prefixExpression numberOfParens prefixExpression OperatorIds TerminalTokens TokenNamePLUS_PLUS TerminalTokens TokenNameMINUS_MINUS printNextToken insert_space_before_prefix_operator insert_space_after_prefix_operator prefixExpression numberOfParens manageClosingParenthesizedExpression prefixExpression numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Qualified Allocation Expression org eclipse jdt internal compiler lookup Block Scope public boolean visit Qualified Allocation Expression qualified Allocation Expression Block Scope scope final int number Of Parens qualified Allocation Expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression qualified Allocation Expression number Of Parens final Expression enclosing Instance qualified Allocation Expression enclosing Instance if enclosing Instance null enclosing Instance traverse this scope this scribe print Next Token Terminal Tokens Token NameDOT this scribe print Next Token Terminal Tokens Token Namenew used for the new line on wrap style of formatting final int line this scribe line this scribe space qualified Allocation Expression type traverse this scope this scribe print Next Token Terminal Tokens Token NameLPAREN this preferences insert space before opening paren in method invocation final Expression arguments qualified Allocation Expression arguments if arguments null if this preferences insert space after opening paren in method invocation this scribe space int argument Length arguments length Alignment arguments Alignment this scribe create Alignment allocation NON NLS 1 this preferences alignment for arguments in qualified allocation expression argument Length this scribe scanner current Position this scribe enter Alignment arguments Alignment boolean ok false do try for int i 0 i argument Length i if i 0 this scribe print Next Token Terminal Tokens Token NameCOMMA this preferences insert space before comma in allocation expression this scribe print Trailing Comment this scribe align Fragment arguments Alignment i if i 0 this preferences insert space after comma in allocation expression this scribe space arguments i traverse this scope ok true catch Alignment Exception e this scribe redo Alignment e while ok this scribe exit Alignment arguments Alignment true this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space before closing paren in method invocation else this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space between empty parens in method invocation final Type Declaration anonymous Type qualified Allocation Expression anonymous Type if anonymous Type null format Left Curly Brace line this preferences brace position for anonymous type declaration format Anonymous Type Declaration anonymous Type if number Of Parens 0 manage Closing Parenthesized Expression qualified Allocation Expression number Of Parens return false  ASTVisitor QualifiedAllocationExpression BlockScope QualifiedAllocationExpression qualifiedAllocationExpression BlockScope numberOfParens qualifiedAllocationExpression ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression qualifiedAllocationExpression numberOfParens enclosingInstance qualifiedAllocationExpression enclosingInstance enclosingInstance enclosingInstance printNextToken TerminalTokens TokenNameDOT printNextToken TerminalTokens TokenNamenew qualifiedAllocationExpression printNextToken TerminalTokens TokenNameLPAREN insert_space_before_opening_paren_in_method_invocation qualifiedAllocationExpression insert_space_after_opening_paren_in_method_invocation argumentLength argumentsAlignment createAlignment alignment_for_arguments_in_qualified_allocation_expression argumentLength currentPosition enterAlignment argumentsAlignment argumentLength printNextToken TerminalTokens TokenNameCOMMA insert_space_before_comma_in_allocation_expression printTrailingComment alignFragment argumentsAlignment insert_space_after_comma_in_allocation_expression AlignmentException redoAlignment exitAlignment argumentsAlignment printNextToken TerminalTokens TokenNameRPAREN insert_space_before_closing_paren_in_method_invocation printNextToken TerminalTokens TokenNameRPAREN insert_space_between_empty_parens_in_method_invocation TypeDeclaration anonymousType qualifiedAllocationExpression anonymousType anonymousType formatLeftCurlyBrace brace_position_for_anonymous_type_declaration formatAnonymousTypeDeclaration anonymousType numberOfParens manageClosingParenthesizedExpression qualifiedAllocationExpression numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Qualified Name Reference org eclipse jdt internal compiler lookup Block Scope public boolean visit Qualified Name Reference qualified Name Reference Block Scope scope final int number Of Parens qualified Name Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression qualified Name Reference number Of Parens this scribe print Qualified Reference qualified Name Reference source End if number Of Parens 0 manage Closing Parenthesized Expression qualified Name Reference number Of Parens return false  ASTVisitor QualifiedNameReference BlockScope QualifiedNameReference qualifiedNameReference BlockScope numberOfParens qualifiedNameReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression qualifiedNameReference numberOfParens printQualifiedReference qualifiedNameReference sourceEnd numberOfParens manageClosingParenthesizedExpression qualifiedNameReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Qualified Super Reference org eclipse jdt internal compiler lookup Block Scope public boolean visit Qualified Super Reference qualified Super Reference Block Scope scope final int number Of Parens qualified Super Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression qualified Super Reference number Of Parens qualified Super Reference qualification traverse this scope this scribe print Next Token Terminal Tokens Token NameDOT this scribe print Next Token Terminal Tokens Token Namesuper if number Of Parens 0 manage Closing Parenthesized Expression qualified Super Reference number Of Parens return false  ASTVisitor QualifiedSuperReference BlockScope QualifiedSuperReference qualifiedSuperReference BlockScope numberOfParens qualifiedSuperReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression qualifiedSuperReference numberOfParens qualifiedSuperReference printNextToken TerminalTokens TokenNameDOT printNextToken TerminalTokens TokenNamesuper numberOfParens manageClosingParenthesizedExpression qualifiedSuperReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Qualified This Reference org eclipse jdt internal compiler lookup Block Scope public boolean visit Qualified This Reference qualified This Reference Block Scope scope final int number Of Parens qualified This Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression qualified This Reference number Of Parens qualified This Reference qualification traverse this scope this scribe print Next Token Terminal Tokens Token NameDOT this scribe print Next Token Terminal Tokens Token Namethis if number Of Parens 0 manage Closing Parenthesized Expression qualified This Reference number Of Parens return false  ASTVisitor QualifiedThisReference BlockScope QualifiedThisReference qualifiedThisReference BlockScope numberOfParens qualifiedThisReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression qualifiedThisReference numberOfParens qualifiedThisReference printNextToken TerminalTokens TokenNameDOT printNextToken TerminalTokens TokenNamethis numberOfParens manageClosingParenthesizedExpression qualifiedThisReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Qualified Type Reference org eclipse jdt internal compiler lookup Block Scope public boolean visit Qualified Type Reference qualified Type Reference Block Scope scope final int number Of Parens qualified Type Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression qualified Type Reference number Of Parens this scribe print Qualified Reference qualified Type Reference source End if number Of Parens 0 manage Closing Parenthesized Expression qualified Type Reference number Of Parens return false  ASTVisitor QualifiedTypeReference BlockScope QualifiedTypeReference qualifiedTypeReference BlockScope numberOfParens qualifiedTypeReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression qualifiedTypeReference numberOfParens printQualifiedReference qualifiedTypeReference sourceEnd numberOfParens manageClosingParenthesizedExpression qualifiedTypeReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Qualified Type Reference org eclipse jdt internal compiler lookup Class Scope public boolean visit Qualified Type Reference qualified Type Reference Class Scope scope final int number Of Parens qualified Type Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression qualified Type Reference number Of Parens this scribe print Qualified Reference qualified Type Reference source End if number Of Parens 0 manage Closing Parenthesized Expression qualified Type Reference number Of Parens return false  ASTVisitor QualifiedTypeReference ClassScope QualifiedTypeReference qualifiedTypeReference ClassScope numberOfParens qualifiedTypeReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression qualifiedTypeReference numberOfParens printQualifiedReference qualifiedTypeReference sourceEnd numberOfParens manageClosingParenthesizedExpression qualifiedTypeReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Return Statement org eclipse jdt internal compiler lookup Block Scope public boolean visit Return Statement return Statement Block Scope scope this scribe print Next Token Terminal Tokens Token Namereturn final Expression expression return Statement expression if expression null this scribe space expression traverse this scope Print the semi colon this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment return false  ASTVisitor ReturnStatement BlockScope ReturnStatement returnStatement BlockScope printNextToken TerminalTokens TokenNamereturn returnStatement printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Single Name Reference org eclipse jdt internal compiler lookup Block Scope public boolean visit Single Name Reference single Name Reference Block Scope scope final int number Of Parens single Name Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression single Name Reference number Of Parens this scribe print Next Token SINGLETYPEREFERENCE EXPECTEDTOKENS if number Of Parens 0 manage Closing Parenthesized Expression single Name Reference number Of Parens return false  ASTVisitor SingleNameReference BlockScope SingleNameReference singleNameReference BlockScope numberOfParens singleNameReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression singleNameReference numberOfParens printNextToken SINGLETYPEREFERENCE_EXPECTEDTOKENS numberOfParens manageClosingParenthesizedExpression singleNameReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Single Type Reference org eclipse jdt internal compiler lookup Block Scope public boolean visit Single Type Reference single Type Reference Block Scope scope final int number Of Parens single Type Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression single Type Reference number Of Parens this scribe print Next Token SINGLETYPEREFERENCE EXPECTEDTOKENS if number Of Parens 0 manage Closing Parenthesized Expression single Type Reference number Of Parens return false  ASTVisitor SingleTypeReference BlockScope SingleTypeReference singleTypeReference BlockScope numberOfParens singleTypeReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression singleTypeReference numberOfParens printNextToken SINGLETYPEREFERENCE_EXPECTEDTOKENS numberOfParens manageClosingParenthesizedExpression singleTypeReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Single Type Reference org eclipse jdt internal compiler lookup Class Scope public boolean visit Single Type Reference single Type Reference Class Scope scope final int number Of Parens single Type Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression single Type Reference number Of Parens this scribe print Next Token SINGLETYPEREFERENCE EXPECTEDTOKENS if number Of Parens 0 manage Closing Parenthesized Expression single Type Reference number Of Parens return false  ASTVisitor SingleTypeReference ClassScope SingleTypeReference singleTypeReference ClassScope numberOfParens singleTypeReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression singleTypeReference numberOfParens printNextToken SINGLETYPEREFERENCE_EXPECTEDTOKENS numberOfParens manageClosingParenthesizedExpression singleTypeReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast String Literal org eclipse jdt internal compiler lookup Block Scope public boolean visit String Literal string Literal Block Scope scope final int number Of Parens string Literal bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression string Literal number Of Parens this scribe checkNLS Tag string Literal source Start this scribe print Next Token Terminal Tokens Token Name String Literal this scribe print Trailing Comment if number Of Parens 0 manage Closing Parenthesized Expression string Literal number Of Parens return false  ASTVisitor StringLiteral BlockScope StringLiteral stringLiteral BlockScope numberOfParens stringLiteral ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression stringLiteral numberOfParens checkNLSTag stringLiteral sourceStart printNextToken TerminalTokens TokenNameStringLiteral printTrailingComment numberOfParens manageClosingParenthesizedExpression stringLiteral numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Super Reference org eclipse jdt internal compiler lookup Block Scope public boolean visit Super Reference super Reference Block Scope scope final int number Of Parens super Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression super Reference number Of Parens this scribe print Next Token Terminal Tokens Token Namesuper if number Of Parens 0 manage Closing Parenthesized Expression super Reference number Of Parens return false  ASTVisitor SuperReference BlockScope SuperReference superReference BlockScope numberOfParens superReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression superReference numberOfParens printNextToken TerminalTokens TokenNamesuper numberOfParens manageClosingParenthesizedExpression superReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Switch Statement org eclipse jdt internal compiler lookup Block Scope public boolean visit Switch Statement switch Statement Block Scope scope this scribe print Next Token Terminal Tokens Token Nameswitch this scribe print Next Token Terminal Tokens Token NameLPAREN this preferences insert space before opening paren in switch if this preferences insert space after opening paren in switch this scribe space switch Statement expression traverse this scope this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space before closing paren in switch Type body String switch brace this preferences brace position for switch format Opening Brace switch brace this preferences insert space before opening brace in switch this scribe print New Line if this preferences indent switchstatements compare to switch this scribe indent final Statement statements switch Statement statements boolean wasA Case false boolean wasA Statement false if statements null int statements Length statements length for int i 0 i statements Length i final Statement statement statements i if statement instanceof Case Statement if wasA Case this scribe print New Line if wasA Case this preferences indent switchstatements compare to cases wasA Statement this preferences indent switchstatements compare to cases this scribe un Indent statement traverse this scope this scribe print Trailing Comment wasA Case true wasA Statement false if this preferences indent switchstatements compare to cases this scribe indent else if statement instanceof Break Statement if this preferences indent breaks compare to cases if wasA Statement this preferences indent switchstatements compare to cases this scribe indent else if wasA Statement if this preferences indent switchstatements compare to cases this scribe un Indent if wasA Case this preferences indent switchstatements compare to cases this scribe un Indent if wasA Case this scribe print New Line statement traverse this scope if this preferences indent breaks compare to cases this scribe un Indent wasA Case false wasA Statement false else if statement instanceof Block String brace Position if wasA Case if this preferences indent switchstatements compare to cases this scribe un Indent brace Position this preferences brace position for block in case format Block Block statement scope brace Position this preferences insert space after colon in case if this preferences indent switchstatements compare to cases this scribe indent else brace Position this preferences brace position for block format Block Block statement scope brace Position this preferences insert space before opening brace in block wasA Statement true wasA Case false else this scribe print New Line statement traverse this scope wasA Statement true wasA Case false if statement instanceof Expression Print the semi colon this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment this scribe print New Line else if statement instanceof Local Declaration Local Declaration current Local Local Declaration statement if i statements Length 1 We need to check that the next statement is a local declaration if statements i 1 instanceof Local Declaration Local Declaration next Local Local Declaration statements i 1 if current Local declaration Source Start next Local declaration Source Start Print the semi colon this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment this scribe print New Line else Print the semi colon this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment this scribe print New Line else Print the semi colon this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment this scribe print New Line else if wasA Case this scribe print New Line if wasA Case wasA Statement this preferences indent switchstatements compare to cases this scribe un Indent if this preferences indent switchstatements compare to switch this scribe un Indent this scribe print New Line this scribe print Next Token Terminal Tokens Token NameRBRACE this scribe print Trailing Comment if switch brace equals Default Code Formatter Constants NEXT LINE SHIFTED this scribe un Indent return false  ASTVisitor SwitchStatement BlockScope SwitchStatement switchStatement BlockScope printNextToken TerminalTokens TokenNameswitch printNextToken TerminalTokens TokenNameLPAREN insert_space_before_opening_paren_in_switch insert_space_after_opening_paren_in_switch switchStatement printNextToken TerminalTokens TokenNameRPAREN insert_space_before_closing_paren_in_switch switch_brace brace_position_for_switch formatOpeningBrace switch_brace insert_space_before_opening_brace_in_switch printNewLine indent_switchstatements_compare_to_switch switchStatement wasACase wasAStatement statementsLength statementsLength CaseStatement wasACase printNewLine wasACase indent_switchstatements_compare_to_cases wasAStatement indent_switchstatements_compare_to_cases unIndent printTrailingComment wasACase wasAStatement indent_switchstatements_compare_to_cases BreakStatement indent_breaks_compare_to_cases wasAStatement indent_switchstatements_compare_to_cases wasAStatement indent_switchstatements_compare_to_cases unIndent wasACase indent_switchstatements_compare_to_cases unIndent wasACase printNewLine indent_breaks_compare_to_cases unIndent wasACase wasAStatement bracePosition wasACase indent_switchstatements_compare_to_cases unIndent bracePosition brace_position_for_block_in_case formatBlock bracePosition insert_space_after_colon_in_case indent_switchstatements_compare_to_cases bracePosition brace_position_for_block formatBlock bracePosition insert_space_before_opening_brace_in_block wasAStatement wasACase printNewLine wasAStatement wasACase printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment printNewLine LocalDeclaration LocalDeclaration currentLocal LocalDeclaration statementsLength LocalDeclaration LocalDeclaration nextLocal LocalDeclaration currentLocal declarationSourceStart nextLocal declarationSourceStart printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment printNewLine printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment printNewLine printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment printNewLine wasACase printNewLine wasACase wasAStatement indent_switchstatements_compare_to_cases unIndent indent_switchstatements_compare_to_switch unIndent printNewLine printNextToken TerminalTokens TokenNameRBRACE printTrailingComment switch_brace DefaultCodeFormatterConstants NEXT_LINE_SHIFTED unIndent
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Synchronized Statement org eclipse jdt internal compiler lookup Block Scope public boolean visit Synchronized Statement synchronized Statement Block Scope scope this scribe print Next Token Terminal Tokens Token Namesynchronized final int line this scribe line this scribe print Next Token Terminal Tokens Token NameLPAREN this preferences insert space before opening paren in synchronized if this preferences insert space after opening paren in synchronized this scribe space synchronized Statement expression traverse this scope this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space before closing paren in synchronized format Left Curly Brace line this preferences brace position for block synchronized Statement block traverse this scope return false  ASTVisitor SynchronizedStatement BlockScope SynchronizedStatement synchronizedStatement BlockScope printNextToken TerminalTokens TokenNamesynchronized printNextToken TerminalTokens TokenNameLPAREN insert_space_before_opening_paren_in_synchronized insert_space_after_opening_paren_in_synchronized synchronizedStatement printNextToken TerminalTokens TokenNameRPAREN insert_space_before_closing_paren_in_synchronized formatLeftCurlyBrace brace_position_for_block synchronizedStatement
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast This Reference org eclipse jdt internal compiler lookup Block Scope public boolean visit This Reference this Reference Block Scope scope if this Reference is Implicit This final int number Of Parens this Reference bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression this Reference number Of Parens this scribe print Next Token Terminal Tokens Token Namethis if number Of Parens 0 manage Closing Parenthesized Expression this Reference number Of Parens return false  ASTVisitor ThisReference BlockScope ThisReference thisReference BlockScope thisReference isImplicitThis numberOfParens thisReference ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression thisReference numberOfParens printNextToken TerminalTokens TokenNamethis numberOfParens manageClosingParenthesizedExpression thisReference numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Throw Statement org eclipse jdt internal compiler lookup Block Scope public boolean visit Throw Statement throw Statement Block Scope scope this scribe print Next Token Terminal Tokens Token Namethrow this scribe space throw Statement exception traverse this scope Print the semi colon this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment return false  ASTVisitor ThrowStatement BlockScope ThrowStatement throwStatement BlockScope printNextToken TerminalTokens TokenNamethrow throwStatement printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast True Literal org eclipse jdt internal compiler lookup Block Scope public boolean visit True Literal true Literal Block Scope scope final int number Of Parens true Literal bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression true Literal number Of Parens this scribe print Next Token Terminal Tokens Token Nametrue if number Of Parens 0 manage Closing Parenthesized Expression true Literal number Of Parens return false  ASTVisitor TrueLiteral BlockScope TrueLiteral trueLiteral BlockScope numberOfParens trueLiteral ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression trueLiteral numberOfParens printNextToken TerminalTokens TokenNametrue numberOfParens manageClosingParenthesizedExpression trueLiteral numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Try Statement org eclipse jdt internal compiler lookup Block Scope public boolean visit Try Statement try Statement Block Scope scope this scribe print Next Token Terminal Tokens Token Nametry try Statement try Block traverse this scope if try Statement catch Arguments null for int i 0 max try Statement catch Blocks length i max i if this preferences insert new line before catch in try statement this scribe print New Line this scribe print Next Token Terminal Tokens Token Namecatch this preferences insert space after closing brace in block final int line this scribe line this scribe print Next Token Terminal Tokens Token NameLPAREN this preferences insert space before opening paren in catch if this preferences insert space after opening paren in catch this scribe space try Statement catch Arguments i traverse this scope this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space before closing paren in catch format Left Curly Brace line this preferences brace position for block try Statement catch Blocks i traverse this scope if try Statement finally Block null if this preferences insert new line before finally in try statement this scribe print New Line this scribe print Next Token Terminal Tokens Token Namefinally this preferences insert space after closing brace in block try Statement finally Block traverse this scope return false  ASTVisitor TryStatement BlockScope TryStatement tryStatement BlockScope printNextToken TerminalTokens TokenNametry tryStatement tryBlock tryStatement catchArguments tryStatement catchBlocks insert_new_line_before_catch_in_try_statement printNewLine printNextToken TerminalTokens TokenNamecatch insert_space_after_closing_brace_in_block printNextToken TerminalTokens TokenNameLPAREN insert_space_before_opening_paren_in_catch insert_space_after_opening_paren_in_catch tryStatement catchArguments printNextToken TerminalTokens TokenNameRPAREN insert_space_before_closing_paren_in_catch formatLeftCurlyBrace brace_position_for_block tryStatement catchBlocks tryStatement finallyBlock insert_new_line_before_finally_in_try_statement printNewLine printNextToken TerminalTokens TokenNamefinally insert_space_after_closing_brace_in_block tryStatement finallyBlock
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Type Declaration org eclipse jdt internal compiler lookup Block Scope public boolean visit Type Declaration local Type Declaration Block Scope scope format local Type Declaration return false  ASTVisitor TypeDeclaration BlockScope TypeDeclaration localTypeDeclaration BlockScope localTypeDeclaration
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Type Declaration org eclipse jdt internal compiler lookup Compilation Unit Scope public boolean visit Type Declaration type Declaration Compilation Unit Scope scope format type Declaration return false  ASTVisitor TypeDeclaration CompilationUnitScope TypeDeclaration typeDeclaration CompilationUnitScope typeDeclaration
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast Unary Expression org eclipse jdt internal compiler lookup Block Scope public boolean visit Unary Expression unary Expression Block Scope scope final int number Of Parens unary Expression bits AST Node ParenthesizedMASK AST Node ParenthesizedSHIFT if number Of Parens 0 manage Opening Parenthesized Expression unary Expression number Of Parens Print the operator int operator switch unary Expression bits AST Node OperatorMASK AST Node OperatorSHIFT case Operator Ids PLUS operator Terminal Tokens Token NamePLUS break case Operator Ids MINUS operator Terminal Tokens Token NameMINUS break case Operator Ids TWIDDLE operator Terminal Tokens Token NameTWIDDLE break default operator Terminal Tokens Token NameNOT this scribe print Next Token operator this preferences insert space before unary operator if this preferences insert space after unary operator this scribe space unary Expression expression traverse this scope if number Of Parens 0 manage Closing Parenthesized Expression unary Expression number Of Parens return false  ASTVisitor UnaryExpression BlockScope UnaryExpression unaryExpression BlockScope numberOfParens unaryExpression ASTNode ASTNode numberOfParens manageOpeningParenthesizedExpression unaryExpression numberOfParens unaryExpression ASTNode ASTNode OperatorIds TerminalTokens TokenNamePLUS OperatorIds TerminalTokens TokenNameMINUS OperatorIds TerminalTokens TokenNameTWIDDLE TerminalTokens TokenNameNOT printNextToken insert_space_before_unary_operator insert_space_after_unary_operator unaryExpression numberOfParens manageClosingParenthesizedExpression unaryExpression numberOfParens
see org eclipse jdt internal compiler AST Visitor visit org eclipse jdt internal compiler ast While Statement org eclipse jdt internal compiler lookup Block Scope public boolean visit While Statement while Statement Block Scope scope this scribe print Next Token Terminal Tokens Token Namewhile final int line this scribe line this scribe print Next Token Terminal Tokens Token NameLPAREN this preferences insert space before opening paren in while if this preferences insert space after opening paren in while this scribe space while Statement condition traverse this scope this scribe print Next Token Terminal Tokens Token NameRPAREN this preferences insert space before closing paren in while final Statement action while Statement action if action null if action instanceof Block format Left Curly Brace line this preferences brace position for block action traverse this scope else if action instanceof Empty Statement This is an empty statement format Necessary Empty Statement else this scribe print New Line this scribe indent action traverse this scope if action instanceof Expression this scribe print Next Token Terminal Tokens Token NameSEMICOLON this preferences insert space before semicolon this scribe print Trailing Comment this scribe un Indent else This is an empty statement format Necessary Empty Statement return false  ASTVisitor WhileStatement BlockScope WhileStatement whileStatement BlockScope printNextToken TerminalTokens TokenNamewhile printNextToken TerminalTokens TokenNameLPAREN insert_space_before_opening_paren_in_while insert_space_after_opening_paren_in_while whileStatement printNextToken TerminalTokens TokenNameRPAREN insert_space_before_closing_paren_in_while whileStatement formatLeftCurlyBrace brace_position_for_block EmptyStatement formatNecessaryEmptyStatement printNewLine printNextToken TerminalTokens TokenNameSEMICOLON insert_space_before_semicolon printTrailingComment unIndent formatNecessaryEmptyStatement

private Code Snippet Parsing Util code Snippet Parsing Util public Default Code Formatter this new Default Code Formatter Options Default Code Formatter Constants get Java Conventions Settings null  CodeSnippetParsingUtil codeSnippetParsingUtil DefaultCodeFormatter DefaultCodeFormatterOptions DefaultCodeFormatterConstants getJavaConventionsSettings
public Default Code Formatter Default Code Formatter Options preferences this preferences null  DefaultCodeFormatter DefaultCodeFormatterOptions
public Default Code Formatter Default Code Formatter Options default Code Formatter Options Map options if options null this options options this preferences new Default Code Formatter Options options else this options Java Core get Options this preferences new Default Code Formatter Options Default Code Formatter Constants get Java Conventions Settings this default Compiler Options get Default Compiler Options if default Code Formatter Options null this preferences set default Code Formatter Options get Map  DefaultCodeFormatter DefaultCodeFormatterOptions defaultCodeFormatterOptions DefaultCodeFormatterOptions JavaCore getOptions DefaultCodeFormatterOptions DefaultCodeFormatterConstants getJavaConventionsSettings defaultCompilerOptions getDefaultCompilerOptions defaultCodeFormatterOptions defaultCodeFormatterOptions getMap
public Default Code Formatter Map options this null options  DefaultCodeFormatter
see org eclipse jdt core formatter Code Formatter format int java lang String int int int java lang String public Text Edit format int kind String source int offset int length int indentation Level String line Separator if offset 0 length 0 length source length throw new Illegal Argument Exception this code Snippet Parsing Util new Code Snippet Parsing Util switch kind case K CLASS BODY DECLARATIONS return format Class Body Declarations source indentation Level line Separator offset length case K COMPILATION UNIT return format Compilation Unit source indentation Level line Separator offset length case K EXPRESSION return format Expression source indentation Level line Separator offset length case K STATEMENTS return format Statements source indentation Level line Separator offset length case K UNKNOWN return probe Formatting source indentation Level line Separator offset length return null  CodeFormatter TextEdit indentationLevel lineSeparator IllegalArgumentException codeSnippetParsingUtil CodeSnippetParsingUtil K_CLASS_BODY_DECLARATIONS formatClassBodyDeclarations indentationLevel lineSeparator K_COMPILATION_UNIT formatCompilationUnit indentationLevel lineSeparator K_EXPRESSION formatExpression indentationLevel lineSeparator K_STATEMENTS formatStatements indentationLevel lineSeparator K_UNKNOWN probeFormatting indentationLevel lineSeparator
private Text Edit format Class Body Declarations String source int indentation Level String line Separator int offset int length AST Node body Declarations this code Snippet Parsing Util parse Class Body Declarations source to Char Array get Default Compiler Options true if body Declarations null a problem occured while parsing the source return null return internal Format Class Body Declarations source indentation Level line Separator body Declarations offset length  TextEdit formatClassBodyDeclarations indentationLevel lineSeparator ASTNode bodyDeclarations codeSnippetParsingUtil parseClassBodyDeclarations toCharArray getDefaultCompilerOptions bodyDeclarations internalFormatClassBodyDeclarations indentationLevel lineSeparator bodyDeclarations
private Text Edit format Compilation Unit String source int indentation Level String line Separator int offset int length Compilation Unit Declaration compilation Unit Declaration this code Snippet Parsing Util parse Compilation Unit source to Char Array get Default Compiler Options true if line Separator null this preferences line separator line Separator else this preferences line separator System get Property line separator NON NLS 1 this preferences initial indentation level indentation Level this new Code Formatter new Code Formatter Visitor this preferences this options offset length this code Snippet Parsing Util return this new Code Formatter format source compilation Unit Declaration  TextEdit formatCompilationUnit indentationLevel lineSeparator CompilationUnitDeclaration compilationUnitDeclaration codeSnippetParsingUtil parseCompilationUnit toCharArray getDefaultCompilerOptions lineSeparator line_separator lineSeparator line_separator getProperty initial_indentation_level indentationLevel newCodeFormatter CodeFormatterVisitor codeSnippetParsingUtil newCodeFormatter compilationUnitDeclaration
private Text Edit format Expression String source int indentation Level String line Separator int offset int length Expression expression this code Snippet Parsing Util parse Expression source to Char Array get Default Compiler Options true if expression null a problem occured while parsing the source return null return internal Format Expression source indentation Level line Separator expression offset length  TextEdit formatExpression indentationLevel lineSeparator codeSnippetParsingUtil parseExpression toCharArray getDefaultCompilerOptions internalFormatExpression indentationLevel lineSeparator
private Text Edit format Statements String source int indentation Level String line Separator int offset int length Constructor Declaration constructor Declaration this code Snippet Parsing Util parse Statements source to Char Array get Default Compiler Options true if constructor Declaration statements null a problem occured while parsing the source return null return internal Format Statements source indentation Level line Separator constructor Declaration offset length  TextEdit formatStatements indentationLevel lineSeparator ConstructorDeclaration constructorDeclaration codeSnippetParsingUtil parseStatements toCharArray getDefaultCompilerOptions constructorDeclaration internalFormatStatements indentationLevel lineSeparator constructorDeclaration
public String get Debug Output return this new Code Formatter scribe to String  getDebugOutput newCodeFormatter toString
private Map get Default Compiler Options if this default Compiler Options null Map options Map new Hash Map 30 options Map put Compiler Options OPTION LocalVariableAttribute Compiler Options DO NOT GENERATE options Map put Compiler Options OPTION LineNumberAttribute Compiler Options DO NOT GENERATE options Map put Compiler Options OPTION SourceFileAttribute Compiler Options DO NOT GENERATE options Map put Compiler Options OPTION PreserveUnusedLocal Compiler Options PRESERVE options Map put Compiler Options OPTION DocCommentSupport Compiler Options DISABLED options Map put Compiler Options OPTION ReportMethodWithConstructorName Compiler Options IGNORE options Map put Compiler Options OPTION ReportOverridingPackageDefaultMethod Compiler Options IGNORE options Map put Compiler Options OPTION ReportDeprecation Compiler Options IGNORE options Map put Compiler Options OPTION ReportDeprecationInDeprecatedCode Compiler Options DISABLED options Map put Compiler Options OPTION ReportDeprecationWhenOverridingDeprecatedMethod Compiler Options DISABLED options Map put Compiler Options OPTION ReportHiddenCatchBlock Compiler Options IGNORE options Map put Compiler Options OPTION ReportUnusedLocal Compiler Options IGNORE options Map put Compiler Options OPTION ReportUnusedParameter Compiler Options IGNORE options Map put Compiler Options OPTION ReportUnusedImport Compiler Options IGNORE options Map put Compiler Options OPTION ReportSyntheticAccessEmulation Compiler Options IGNORE options Map put Compiler Options OPTION ReportNoEffectAssignment Compiler Options IGNORE options Map put Compiler Options OPTION ReportNonExternalizedStringLiteral Compiler Options IGNORE options Map put Compiler Options OPTION ReportNoImplicitStringConversion Compiler Options IGNORE options Map put Compiler Options OPTION ReportNonStaticAccessToStatic Compiler Options IGNORE options Map put Compiler Options OPTION ReportIndirectStaticAccess Compiler Options IGNORE options Map put Compiler Options OPTION ReportIncompatibleNonInheritedInterfaceMethod Compiler Options IGNORE options Map put Compiler Options OPTION ReportUnusedPrivateMember Compiler Options IGNORE options Map put Compiler Options OPTION ReportLocalVariableHiding Compiler Options IGNORE options Map put Compiler Options OPTION ReportFieldHiding Compiler Options IGNORE options Map put Compiler Options OPTION ReportPossibleAccidentalBooleanAssignment Compiler Options IGNORE options Map put Compiler Options OPTION ReportEmptyStatement Compiler Options IGNORE options Map put Compiler Options OPTION ReportAssertIdentifier Compiler Options IGNORE options Map put Compiler Options OPTION ReportUndocumentedEmptyBlock Compiler Options IGNORE options Map put Compiler Options OPTION ReportUnnecessaryTypeCheck Compiler Options IGNORE options Map put Compiler Options OPTION ReportInvalidJavadoc Compiler Options IGNORE options Map put Compiler Options OPTION ReportInvalidJavadocTagsVisibility Compiler Options PUBLIC options Map put Compiler Options OPTION ReportInvalidJavadocTags Compiler Options DISABLED options Map put Compiler Options OPTION ReportMissingJavadocTags Compiler Options IGNORE options Map put Compiler Options OPTION ReportMissingJavadocTagsVisibility Compiler Options PUBLIC options Map put Compiler Options OPTION ReportMissingJavadocTagsOverriding Compiler Options DISABLED options Map put Compiler Options OPTION ReportMissingJavadocComments Compiler Options IGNORE options Map put Compiler Options OPTION ReportMissingJavadocCommentsVisibility Compiler Options IGNORE options Map put Compiler Options OPTION ReportMissingJavadocCommentsOverriding Compiler Options DISABLED options Map put Compiler Options OPTION ReportFinallyBlockNotCompletingNormally Compiler Options IGNORE options Map put Compiler Options OPTION ReportUnusedDeclaredThrownException Compiler Options IGNORE options Map put Compiler Options OPTION ReportUnusedDeclaredThrownExceptionWhenOverriding Compiler Options DISABLED options Map put Compiler Options OPTION ReportUnqualifiedFieldAccess Compiler Options IGNORE options Map put Compiler Options OPTION Compliance Compiler Options VERSION 1 4 options Map put Compiler Options OPTION TargetPlatform Compiler Options VERSION 1 2 options Map put Compiler Options OPTION TaskTags NON NLS 1 options Map put Compiler Options OPTION TaskPriorities NON NLS 1 options Map put Compiler Options OPTION TaskCaseSensitive Compiler Options DISABLED options Map put Compiler Options OPTION ReportUnusedParameterWhenImplementingAbstract Compiler Options DISABLED options Map put Compiler Options OPTION ReportUnusedParameterWhenOverridingConcrete Compiler Options DISABLED options Map put Compiler Options OPTION ReportSpecialParameterHidingField Compiler Options DISABLED options Map put Compiler Options OPTION MaxProblemPerUnit String value Of 100 options Map put Compiler Options OPTION InlineJsr Compiler Options DISABLED this default Compiler Options options Map Object source Option this options get Compiler Options OPTION Source if source Option null this default Compiler Options put Compiler Options OPTION Source source Option else this default Compiler Options put Compiler Options OPTION Source Compiler Options VERSION 1 3 return this default Compiler Options  getDefaultCompilerOptions defaultCompilerOptions optionsMap HashMap optionsMap CompilerOptions OPTION_LocalVariableAttribute CompilerOptions DO_NOT_GENERATE optionsMap CompilerOptions OPTION_LineNumberAttribute CompilerOptions DO_NOT_GENERATE optionsMap CompilerOptions OPTION_SourceFileAttribute CompilerOptions DO_NOT_GENERATE optionsMap CompilerOptions OPTION_PreserveUnusedLocal CompilerOptions optionsMap CompilerOptions OPTION_DocCommentSupport CompilerOptions optionsMap CompilerOptions OPTION_ReportMethodWithConstructorName CompilerOptions optionsMap CompilerOptions OPTION_ReportOverridingPackageDefaultMethod CompilerOptions optionsMap CompilerOptions OPTION_ReportDeprecation CompilerOptions optionsMap CompilerOptions OPTION_ReportDeprecationInDeprecatedCode CompilerOptions optionsMap CompilerOptions OPTION_ReportDeprecationWhenOverridingDeprecatedMethod CompilerOptions optionsMap CompilerOptions OPTION_ReportHiddenCatchBlock CompilerOptions optionsMap CompilerOptions OPTION_ReportUnusedLocal CompilerOptions optionsMap CompilerOptions OPTION_ReportUnusedParameter CompilerOptions optionsMap CompilerOptions OPTION_ReportUnusedImport CompilerOptions optionsMap CompilerOptions OPTION_ReportSyntheticAccessEmulation CompilerOptions optionsMap CompilerOptions OPTION_ReportNoEffectAssignment CompilerOptions optionsMap CompilerOptions OPTION_ReportNonExternalizedStringLiteral CompilerOptions optionsMap CompilerOptions OPTION_ReportNoImplicitStringConversion CompilerOptions optionsMap CompilerOptions OPTION_ReportNonStaticAccessToStatic CompilerOptions optionsMap CompilerOptions OPTION_ReportIndirectStaticAccess CompilerOptions optionsMap CompilerOptions OPTION_ReportIncompatibleNonInheritedInterfaceMethod CompilerOptions optionsMap CompilerOptions OPTION_ReportUnusedPrivateMember CompilerOptions optionsMap CompilerOptions OPTION_ReportLocalVariableHiding CompilerOptions optionsMap CompilerOptions OPTION_ReportFieldHiding CompilerOptions optionsMap CompilerOptions OPTION_ReportPossibleAccidentalBooleanAssignment CompilerOptions optionsMap CompilerOptions OPTION_ReportEmptyStatement CompilerOptions optionsMap CompilerOptions OPTION_ReportAssertIdentifier CompilerOptions optionsMap CompilerOptions OPTION_ReportUndocumentedEmptyBlock CompilerOptions optionsMap CompilerOptions OPTION_ReportUnnecessaryTypeCheck CompilerOptions optionsMap CompilerOptions OPTION_ReportInvalidJavadoc CompilerOptions optionsMap CompilerOptions OPTION_ReportInvalidJavadocTagsVisibility CompilerOptions optionsMap CompilerOptions OPTION_ReportInvalidJavadocTags CompilerOptions optionsMap CompilerOptions OPTION_ReportMissingJavadocTags CompilerOptions optionsMap CompilerOptions OPTION_ReportMissingJavadocTagsVisibility CompilerOptions optionsMap CompilerOptions OPTION_ReportMissingJavadocTagsOverriding CompilerOptions optionsMap CompilerOptions OPTION_ReportMissingJavadocComments CompilerOptions optionsMap CompilerOptions OPTION_ReportMissingJavadocCommentsVisibility CompilerOptions optionsMap CompilerOptions OPTION_ReportMissingJavadocCommentsOverriding CompilerOptions optionsMap CompilerOptions OPTION_ReportFinallyBlockNotCompletingNormally CompilerOptions optionsMap CompilerOptions OPTION_ReportUnusedDeclaredThrownException CompilerOptions optionsMap CompilerOptions OPTION_ReportUnusedDeclaredThrownExceptionWhenOverriding CompilerOptions optionsMap CompilerOptions OPTION_ReportUnqualifiedFieldAccess CompilerOptions optionsMap CompilerOptions OPTION_Compliance CompilerOptions VERSION_1_4 optionsMap CompilerOptions OPTION_TargetPlatform CompilerOptions VERSION_1_2 optionsMap CompilerOptions OPTION_TaskTags optionsMap CompilerOptions OPTION_TaskPriorities optionsMap CompilerOptions OPTION_TaskCaseSensitive CompilerOptions optionsMap CompilerOptions OPTION_ReportUnusedParameterWhenImplementingAbstract CompilerOptions optionsMap CompilerOptions OPTION_ReportUnusedParameterWhenOverridingConcrete CompilerOptions optionsMap CompilerOptions OPTION_ReportSpecialParameterHidingField CompilerOptions optionsMap CompilerOptions OPTION_MaxProblemPerUnit valueOf optionsMap CompilerOptions OPTION_InlineJsr CompilerOptions defaultCompilerOptions optionsMap sourceOption CompilerOptions OPTION_Source sourceOption defaultCompilerOptions CompilerOptions OPTION_Source sourceOption defaultCompilerOptions CompilerOptions OPTION_Source CompilerOptions VERSION_1_3 defaultCompilerOptions
private Text Edit internal Format Class Body Declarations String source int indentation Level String line Separator AST Node body Declarations int offset int length if line Separator null this preferences line separator line Separator else this preferences line separator System get Property line separator NON NLS 1 this preferences initial indentation level indentation Level this new Code Formatter new Code Formatter Visitor this preferences this options offset length this code Snippet Parsing Util return this new Code Formatter format source body Declarations  TextEdit internalFormatClassBodyDeclarations indentationLevel lineSeparator ASTNode bodyDeclarations lineSeparator line_separator lineSeparator line_separator getProperty initial_indentation_level indentationLevel newCodeFormatter CodeFormatterVisitor codeSnippetParsingUtil newCodeFormatter bodyDeclarations
private Text Edit internal Format Expression String source int indentation Level String line Separator Expression expression int offset int length if line Separator null this preferences line separator line Separator else this preferences line separator System get Property line separator NON NLS 1 this preferences initial indentation level indentation Level this new Code Formatter new Code Formatter Visitor this preferences this options offset length this code Snippet Parsing Util Text Edit text Edit this new Code Formatter format source expression return text Edit  TextEdit internalFormatExpression indentationLevel lineSeparator lineSeparator line_separator lineSeparator line_separator getProperty initial_indentation_level indentationLevel newCodeFormatter CodeFormatterVisitor codeSnippetParsingUtil TextEdit textEdit newCodeFormatter textEdit
private Text Edit internal Format Statements String source int indentation Level String line Separator Constructor Declaration constructor Declaration int offset int length if line Separator null this preferences line separator line Separator else this preferences line separator System get Property line separator NON NLS 1 this preferences initial indentation level indentation Level this new Code Formatter new Code Formatter Visitor this preferences this options offset length this code Snippet Parsing Util return this new Code Formatter format source constructor Declaration  TextEdit internalFormatStatements indentationLevel lineSeparator ConstructorDeclaration constructorDeclaration lineSeparator line_separator lineSeparator line_separator getProperty initial_indentation_level indentationLevel newCodeFormatter CodeFormatterVisitor codeSnippetParsingUtil newCodeFormatter constructorDeclaration
private Text Edit probe Formatting String source int indentation Level String line Separator int offset int length Expression expression this code Snippet Parsing Util parse Expression source to Char Array get Default Compiler Options true if expression null return internal Format Expression source indentation Level line Separator expression offset length AST Node body Declarations this code Snippet Parsing Util parse Class Body Declarations source to Char Array get Default Compiler Options true if body Declarations null return internal Format Class Body Declarations source indentation Level line Separator body Declarations offset length Constructor Declaration constructor Declaration this code Snippet Parsing Util parse Statements source to Char Array get Default Compiler Options true if constructor Declaration statements null return internal Format Statements source indentation Level line Separator constructor Declaration offset length return format Compilation Unit source indentation Level line Separator offset length  TextEdit probeFormatting indentationLevel lineSeparator codeSnippetParsingUtil parseExpression toCharArray getDefaultCompilerOptions internalFormatExpression indentationLevel lineSeparator ASTNode bodyDeclarations codeSnippetParsingUtil parseClassBodyDeclarations toCharArray getDefaultCompilerOptions bodyDeclarations internalFormatClassBodyDeclarations indentationLevel lineSeparator bodyDeclarations ConstructorDeclaration constructorDeclaration codeSnippetParsingUtil parseStatements toCharArray getDefaultCompilerOptions constructorDeclaration internalFormatStatements indentationLevel lineSeparator constructorDeclaration formatCompilationUnit indentationLevel lineSeparator

public class Default Code Formatter Options public static Default Code Formatter Options get Default Settings Default Code Formatter Options options new Default Code Formatter Options options set Default Settings return options  DefaultCodeFormatterOptions DefaultCodeFormatterOptions getDefaultSettings DefaultCodeFormatterOptions DefaultCodeFormatterOptions setDefaultSettings
public static Default Code Formatter Options get Java Conventions Settings Default Code Formatter Options options new Default Code Formatter Options options set Java Conventions Settings return options  DefaultCodeFormatterOptions getJavaConventionsSettings DefaultCodeFormatterOptions DefaultCodeFormatterOptions setJavaConventionsSettings
public String line separator private Default Code Formatter Options cannot be instantiated  line_separator DefaultCodeFormatterOptions
public Default Code Formatter Options Map settings set Default Settings if settings null return set settings  DefaultCodeFormatterOptions setDefaultSettings
private String get Alignment int alignment return Integer to String alignment  getAlignment toString
public Map get Map Map options new Hash Map options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR ARGUMENTS IN ALLOCATION EXPRESSION get Alignment this alignment for arguments in allocation expression options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR ARGUMENTS IN EXPLICIT CONSTRUCTOR CALL get Alignment this alignment for arguments in explicit constructor call options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR ARGUMENTS IN METHOD INVOCATION get Alignment this alignment for arguments in method invocation options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR ARGUMENTS IN QUALIFIED ALLOCATION EXPRESSION get Alignment this alignment for arguments in qualified allocation expression options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR BINARY EXPRESSION get Alignment this alignment for binary expression options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR COMPACT IF get Alignment this alignment for compact if options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR CONDITIONAL EXPRESSION get Alignment this alignment for conditional expression options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR EXPRESSIONS IN ARRAY INITIALIZER get Alignment this alignment for expressions in array initializer options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR MULTIPLE FIELDS get Alignment this alignment for multiple fields options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR PARAMETERS IN CONSTRUCTOR DECLARATION get Alignment this alignment for parameters in constructor declaration options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR PARAMETERS IN METHOD DECLARATION get Alignment this alignment for parameters in method declaration options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR SELECTOR IN METHOD INVOCATION get Alignment this alignment for selector in method invocation options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR SUPERCLASS IN TYPE DECLARATION get Alignment this alignment for superclass in type declaration options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR SUPERINTERFACES IN TYPE DECLARATION get Alignment this alignment for superinterfaces in type declaration options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR THROWS CLAUSE IN CONSTRUCTOR DECLARATION get Alignment this alignment for throws clause in constructor declaration options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR THROWS CLAUSE IN METHOD DECLARATION get Alignment this alignment for throws clause in method declaration options put Default Code Formatter Constants FORMATTER ALIGN TYPE MEMBERS ON COLUMNS this align type members on columns Default Code Formatter Constants TRUE Default Code Formatter Constants FALSE options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR ANONYMOUS TYPE DECLARATION this brace position for anonymous type declaration options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR ARRAY INITIALIZER this brace position for array initializer options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR BLOCK this brace position for block options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR BLOCK IN CASE this brace position for block in case options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR CONSTRUCTOR DECLARATION this brace position for constructor declaration options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR METHOD DECLARATION this brace position for method declaration options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR TYPE DECLARATION this brace position for type declaration options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR SWITCH this brace position for switch options put Default Code Formatter Constants FORMATTER CONTINUATION INDENTATION Integer to String this continuation indentation options put Default Code Formatter Constants FORMATTER CONTINUATION INDENTATION FOR ARRAY INITIALIZER Integer to String this continuation indentation for array initializer options put Default Code Formatter Constants FORMATTER BLANK LINES AFTER IMPORTS Integer to String this blank lines after imports options put Default Code Formatter Constants FORMATTER BLANK LINES AFTER PACKAGE Integer to String this blank lines after package options put Default Code Formatter Constants FORMATTER BLANK LINES BEFORE FIELD Integer to String this blank lines before field options put Default Code Formatter Constants FORMATTER BLANK LINES BEFORE FIRST CLASS BODY DECLARATION Integer to String this blank lines before first class body declaration options put Default Code Formatter Constants FORMATTER BLANK LINES BEFORE IMPORTS Integer to String this blank lines before imports options put Default Code Formatter Constants FORMATTER BLANK LINES BEFORE MEMBER TYPE Integer to String this blank lines before member type options put Default Code Formatter Constants FORMATTER BLANK LINES BEFORE METHOD Integer to String this blank lines before method options put Default Code Formatter Constants FORMATTER BLANK LINES BEFORE NEW CHUNK Integer to String this blank lines before new chunk options put Default Code Formatter Constants FORMATTER BLANK LINES BEFORE PACKAGE Integer to String this blank lines before package options put Default Code Formatter Constants FORMATTER BLANK LINES BETWEEN TYPE DECLARATIONS Integer to String this blank lines between type declarations options put Default Code Formatter Constants FORMATTER BLANK LINES AT BEGINNING OF METHOD BODY Integer to String this blank lines at beginning of method body options put Default Code Formatter Constants FORMATTER INDENT STATEMENTS COMPARE TO BLOCK this indent statements compare to block Default Code Formatter Constants TRUE Default Code Formatter Constants FALSE options put Default Code Formatter Constants FORMATTER INDENT STATEMENTS COMPARE TO BODY this indent statements compare to body Default Code Formatter Constants TRUE Default Code Formatter Constants FALSE options put Default Code Formatter Constants FORMATTER INDENT BODY DECLARATIONS COMPARE TO TYPE HEADER this indent body declarations compare to type header Default Code Formatter Constants TRUE Default Code Formatter Constants FALSE options put Default Code Formatter Constants FORMATTER INDENT BREAKS COMPARE TO CASES this indent breaks compare to cases Default Code Formatter Constants TRUE Default Code Formatter Constants FALSE options put Default Code Formatter Constants FORMATTER INDENT SWITCHSTATEMENTS COMPARE TO CASES this indent switchstatements compare to cases Default Code Formatter Constants TRUE Default Code Formatter Constants FALSE options put Default Code Formatter Constants FORMATTER INDENT SWITCHSTATEMENTS COMPARE TO SWITCH this indent switchstatements compare to switch Default Code Formatter Constants TRUE Default Code Formatter Constants FALSE options put Default Code Formatter Constants FORMATTER INSERT NEW LINE AFTER OPENING BRACE IN ARRAY INITIALIZER this insert new line after opening brace in array initializer Java Core INSERT Java Core DO NOT INSERT options put Default Code Formatter Constants FORMATTER INSERT NEW LINE BEFORE CATCH IN TRY STATEMENT this insert new line before catch in try statement Java Core INSERT Java Core DO NOT INSERT options put Default Code Formatter Constants FORMATTER INSERT NEW LINE BEFORE CLOSING BRACE IN ARRAY INITIALIZER this insert new line before closing brace in array initializer Java Core INSERT Java Core DO NOT INSERT options put Default Code Formatter Constants FORMATTER INSERT NEW LINE BEFORE ELSE IN IF STATEMENT this insert new line before else in if statement Java Core INSERT Java Core DO NOT INSERT options put Default Code Formatter Constants FORMATTER INSERT NEW LINE BEFORE FINALLY IN TRY STATEMENT this insert new line before finally in try statement Java Core INSERT Java Core DO NOT INSERT options put Default Code Formatter Constants FORMATTER INSERT NEW LINE BEFORE WHILE IN DO STATEMENT this insert new line before while in do statement Java Core INSERT Java Core DO NOT INSERT options put Default Code Formatter Constants FORMATTER INSERT NEW LINE IN EMPTY ANONYMOUS TYPE DECLARATION this insert new line in empty anonymous type declaration Java Core INSERT Java Core DO NOT INSERT options put Default Code Formatter Constants FORMATTER INSERT NEW LINE IN EMPTY BLOCK this insert new line in empty block Java Core INSERT Java Core DO NOT INSERT options put Default Code Formatter Constants FORMATTER INSERT NEW LINE IN EMPTY METHOD BODY this insert new line in empty method body Java Core INSERT Java Core DO NOT INSERT options put Default Code Formatter Constants FORMATTER INSERT NEW LINE IN EMPTY TYPE DECLARATION this insert new line in empty type declaration Java Core INSERT Java Core DO NOT INSERT options put Default Code Formatter Constants FORMATTER INSERT SPACE AFTER ASSIGNMENT OPERATOR this insert space after assignment operator Java Core INSERT Java Core DO NOT INSERT options put Default Code Formatter Constants FORMATTER INSERT SPACE AFTER BINARY OPERATOR this insert space after binary operator Java Core INSERT Java Core DO NOT INSERT options put Default Code Formatter Constants FORMATTER INSERT SPACE AFTER CLOSING PAREN IN CAST this insert space after closing paren in cast Java Core INSERT Java Core DO NOT INSERT options put Default Code Formatter Constants FORMATTER INSERT SPACE AFTER CLOSING BRACE IN BLOCK this insert space after closing brace in block Java Core INSERT Java Core DO NOT INSERT options put Default Code Formatter Constants FORMATTER INSERT SPACE AFTER COLON IN ASSERT this insert space after colon in assert Java Core INSERT Java Core DO NOT INSERT options put Default Code Formatter Constants FORMATTER INSERT SPACE AFTER COLON IN CASE this insert space after colon in case JavaC getMap HashMap DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ALLOCATION_EXPRESSION getAlignment alignment_for_arguments_in_allocation_expression DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_EXPLICIT_CONSTRUCTOR_CALL getAlignment alignment_for_arguments_in_explicit_constructor_call DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION getAlignment alignment_for_arguments_in_method_invocation DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_QUALIFIED_ALLOCATION_EXPRESSION getAlignment alignment_for_arguments_in_qualified_allocation_expression DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION getAlignment alignment_for_binary_expression DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_COMPACT_IF getAlignment alignment_for_compact_if DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_CONDITIONAL_EXPRESSION getAlignment alignment_for_conditional_expression DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_EXPRESSIONS_IN_ARRAY_INITIALIZER getAlignment alignment_for_expressions_in_array_initializer DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_MULTIPLE_FIELDS getAlignment alignment_for_multiple_fields DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_CONSTRUCTOR_DECLARATION getAlignment alignment_for_parameters_in_constructor_declaration DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION getAlignment alignment_for_parameters_in_method_declaration DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_SELECTOR_IN_METHOD_INVOCATION getAlignment alignment_for_selector_in_method_invocation DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_SUPERCLASS_IN_TYPE_DECLARATION getAlignment alignment_for_superclass_in_type_declaration DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_SUPERINTERFACES_IN_TYPE_DECLARATION getAlignment alignment_for_superinterfaces_in_type_declaration DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_THROWS_CLAUSE_IN_CONSTRUCTOR_DECLARATION getAlignment alignment_for_throws_clause_in_constructor_declaration DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_THROWS_CLAUSE_IN_METHOD_DECLARATION getAlignment alignment_for_throws_clause_in_method_declaration DefaultCodeFormatterConstants FORMATTER_ALIGN_TYPE_MEMBERS_ON_COLUMNS align_type_members_on_columns DefaultCodeFormatterConstants DefaultCodeFormatterConstants DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_ANONYMOUS_TYPE_DECLARATION brace_position_for_anonymous_type_declaration DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_ARRAY_INITIALIZER brace_position_for_array_initializer DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_BLOCK brace_position_for_block DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_BLOCK_IN_CASE brace_position_for_block_in_case DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_CONSTRUCTOR_DECLARATION brace_position_for_constructor_declaration DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION brace_position_for_method_declaration DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION brace_position_for_type_declaration DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_SWITCH brace_position_for_switch DefaultCodeFormatterConstants FORMATTER_CONTINUATION_INDENTATION toString continuation_indentation DefaultCodeFormatterConstants FORMATTER_CONTINUATION_INDENTATION_FOR_ARRAY_INITIALIZER toString continuation_indentation_for_array_initializer DefaultCodeFormatterConstants FORMATTER_BLANK_LINES_AFTER_IMPORTS toString blank_lines_after_imports DefaultCodeFormatterConstants FORMATTER_BLANK_LINES_AFTER_PACKAGE toString blank_lines_after_package DefaultCodeFormatterConstants FORMATTER_BLANK_LINES_BEFORE_FIELD toString blank_lines_before_field DefaultCodeFormatterConstants FORMATTER_BLANK_LINES_BEFORE_FIRST_CLASS_BODY_DECLARATION toString blank_lines_before_first_class_body_declaration DefaultCodeFormatterConstants FORMATTER_BLANK_LINES_BEFORE_IMPORTS toString blank_lines_before_imports DefaultCodeFormatterConstants FORMATTER_BLANK_LINES_BEFORE_MEMBER_TYPE toString blank_lines_before_member_type DefaultCodeFormatterConstants FORMATTER_BLANK_LINES_BEFORE_METHOD toString blank_lines_before_method DefaultCodeFormatterConstants FORMATTER_BLANK_LINES_BEFORE_NEW_CHUNK toString blank_lines_before_new_chunk DefaultCodeFormatterConstants FORMATTER_BLANK_LINES_BEFORE_PACKAGE toString blank_lines_before_package DefaultCodeFormatterConstants FORMATTER_BLANK_LINES_BETWEEN_TYPE_DECLARATIONS toString blank_lines_between_type_declarations DefaultCodeFormatterConstants FORMATTER_BLANK_LINES_AT_BEGINNING_OF_METHOD_BODY toString blank_lines_at_beginning_of_method_body DefaultCodeFormatterConstants FORMATTER_INDENT_STATEMENTS_COMPARE_TO_BLOCK indent_statements_compare_to_block DefaultCodeFormatterConstants DefaultCodeFormatterConstants DefaultCodeFormatterConstants FORMATTER_INDENT_STATEMENTS_COMPARE_TO_BODY indent_statements_compare_to_body DefaultCodeFormatterConstants DefaultCodeFormatterConstants DefaultCodeFormatterConstants FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_TYPE_HEADER indent_body_declarations_compare_to_type_header DefaultCodeFormatterConstants DefaultCodeFormatterConstants DefaultCodeFormatterConstants FORMATTER_INDENT_BREAKS_COMPARE_TO_CASES indent_breaks_compare_to_cases DefaultCodeFormatterConstants DefaultCodeFormatterConstants DefaultCodeFormatterConstants FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_CASES indent_switchstatements_compare_to_cases DefaultCodeFormatterConstants DefaultCodeFormatterConstants DefaultCodeFormatterConstants FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_SWITCH indent_switchstatements_compare_to_switch DefaultCodeFormatterConstants DefaultCodeFormatterConstants DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER insert_new_line_after_opening_brace_in_array_initializer JavaCore JavaCore DO_NOT_INSERT DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_BEFORE_CATCH_IN_TRY_STATEMENT insert_new_line_before_catch_in_try_statement JavaCore JavaCore DO_NOT_INSERT DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_BEFORE_CLOSING_BRACE_IN_ARRAY_INITIALIZER insert_new_line_before_closing_brace_in_array_initializer JavaCore JavaCore DO_NOT_INSERT DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_BEFORE_ELSE_IN_IF_STATEMENT insert_new_line_before_else_in_if_statement JavaCore JavaCore DO_NOT_INSERT DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_BEFORE_FINALLY_IN_TRY_STATEMENT insert_new_line_before_finally_in_try_statement JavaCore JavaCore DO_NOT_INSERT DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_BEFORE_WHILE_IN_DO_STATEMENT insert_new_line_before_while_in_do_statement JavaCore JavaCore DO_NOT_INSERT DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ANONYMOUS_TYPE_DECLARATION insert_new_line_in_empty_anonymous_type_declaration JavaCore JavaCore DO_NOT_INSERT DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_IN_EMPTY_BLOCK insert_new_line_in_empty_block JavaCore JavaCore DO_NOT_INSERT DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_IN_EMPTY_METHOD_BODY insert_new_line_in_empty_method_body JavaCore JavaCore DO_NOT_INSERT DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_IN_EMPTY_TYPE_DECLARATION insert_new_line_in_empty_type_declaration JavaCore JavaCore DO_NOT_INSERT DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_AFTER_ASSIGNMENT_OPERATOR insert_space_after_assignment_operator JavaCore JavaCore DO_NOT_INSERT DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_AFTER_BINARY_OPERATOR insert_space_after_binary_operator JavaCore JavaCore DO_NOT_INSERT DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_AFTER_CLOSING_PAREN_IN_CAST insert_space_after_closing_paren_in_cast JavaCore JavaCore DO_NOT_INSERT DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_AFTER_CLOSING_BRACE_IN_BLOCK insert_space_after_closing_brace_in_block JavaCore JavaCore DO_NOT_INSERT DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_AFTER_COLON_IN_ASSERT insert_space_after_colon_in_assert JavaCore JavaCore DO_NOT_INSERT DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_AFTER_COLON_IN_CASE insert_space_after_colon_in_case
public void set Map settings final Object alignment For Arguments In Allocation Expression Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR ARGUMENTS IN ALLOCATION EXPRESSION if alignment For Arguments In Allocation Expression Option null try this alignment for arguments in allocation expression Integer parse Int String alignment For Arguments In Allocation Expression Option catch Number Format Exception e this alignment for arguments in allocation expression Alignment M COMPACT SPLIT catch Class Cast Exception e this alignment for arguments in allocation expression Alignment M COMPACT SPLIT final Object alignment For Arguments In Explicit Constructor Call Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR ARGUMENTS IN EXPLICIT CONSTRUCTOR CALL if alignment For Arguments In Explicit Constructor Call Option null try this alignment for arguments in explicit constructor call Integer parse Int String alignment For Arguments In Explicit Constructor Call Option catch Number Format Exception e this alignment for arguments in explicit constructor call Alignment M COMPACT SPLIT catch Class Cast Exception e this alignment for arguments in explicit constructor call Alignment M COMPACT SPLIT final Object alignment For Arguments In Method Invocation Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR ARGUMENTS IN METHOD INVOCATION if alignment For Arguments In Method Invocation Option null try this alignment for arguments in method invocation Integer parse Int String alignment For Arguments In Method Invocation Option catch Number Format Exception e this alignment for arguments in method invocation Alignment M COMPACT SPLIT catch Class Cast Exception e this alignment for arguments in method invocation Alignment M COMPACT SPLIT final Object alignment For Arguments In Qualified Allocation Expression Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR ARGUMENTS IN QUALIFIED ALLOCATION EXPRESSION if alignment For Arguments In Qualified Allocation Expression Option null try this alignment for arguments in qualified allocation expression Integer parse Int String alignment For Arguments In Qualified Allocation Expression Option catch Number Format Exception e this alignment for arguments in qualified allocation expression Alignment M COMPACT SPLIT catch Class Cast Exception e this alignment for arguments in qualified allocation expression Alignment M COMPACT SPLIT final Object alignment For Binary Expression Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR BINARY EXPRESSION if alignment For Binary Expression Option null try this alignment for binary expression Integer parse Int String alignment For Binary Expression Option catch Number Format Exception e this alignment for binary expression Alignment M COMPACT SPLIT catch Class Cast Exception e this alignment for binary expression Alignment M COMPACT SPLIT final Object alignment For Compact If Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR COMPACT IF if alignment For Compact If Option null try this alignment for compact if Integer parse Int String alignment For Compact If Option catch Number Format Exception e this alignment for compact if Alignment M ONE PER LINE SPLIT Alignment M INDENT BY ONE catch Class Cast Exception e this alignment for compact if Alignment M ONE PER LINE SPLIT Alignment M INDENT BY ONE final Object alignment For Conditional Expression Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR CONDITIONAL EXPRESSION if alignment For Conditional Expression Option null try this alignment for conditional expression Integer parse Int String alignment For Conditional Expression Option catch Number Format Exception e this alignment for conditional expression Alignment M ONE PER LINE SPLIT catch Class Cast Exception e this alignment for conditional expression Alignment M ONE PER LINE SPLIT final Object alignment For Expressions In Array Initializer Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR EXPRESSIONS IN ARRAY INITIALIZER if alignment For Expressions In Array Initializer Option null try this alignment for expressions in array initializer Integer parse Int String alignment For Expressions In Array Initializer Option catch Number Format Exception e this alignment for expressions in array initializer Alignment M COMPACT SPLIT catch Class Cast Exception e this alignment for expressions in array initializer Alignment M COMPACT SPLIT final Object alignment For Multiple Fields Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR MULTIPLE FIELDS if alignment For Multiple Fields Option null try this alignment for multiple fields Integer parse Int String alignment For Multiple Fields Option catch Number Format Exception e this alignment for multiple fields Alignment M COMPACT SPLIT catch Class Cast Exception e this alignment for multiple fields Alignment M COMPACT SPLIT final Object alignment For Parameters In Constructor Declaration Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR PARAMETERS IN CONSTRUCTOR DECLARATION if alignment For Parameters In Constructor Declaration Option null try this alignment for parameters in constructor declaration Integer parse Int String alignment For Parameters In Constructor Declaration Option catch Number Format Exception e this alignment for parameters in constructor declaration Alignment M COMPACT SPLIT catch Class Cast Exception e this alignment for parameters in constructor declaration Alignment M COMPACT SPLIT final Object alignment For Parameters In Method Declaration Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR PARAMETERS IN METHOD DECLARATION if alignment For Parameters In Method Declaration Option null try this alignment for parameters in method declaration Integer parse Int String alignment For Parameters In Method Declaration Option catch Number Format Exception e this alignment for parameters in method declaration Alignment M COMPACT SPLIT catch Class Cast Exception e this alignment for parameters in method declaration Alignment M COMPACT SPLIT final Object alignment For Selector In Method Invocation Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR SELECTOR IN METHOD INVOCATION if alignment For Selector In Method Invocation Option null try this alignment for selector in method invocation Integer parse Int String alignment For Selector In Method Invocation Option catch Number Format Exception e this alignment for selector in method invocation Alignment M COMPACT SPLIT catch Class Cast Exception e this alignment for selector in method invocation Alignment M COMPACT SPLIT final Object alignment For Superclass In Type Declaration Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR SUPERCLASS IN TYPE DECLARATION if alignment For Superclass In Type Declaration Option null try this alignment for superclass in type declaration Integer parse Int String alignment For Superclass In Type Declaration Option catch Number Format Exception e this alignment for superclass in type declaration Alignment M NEXT SHIFTED SPLIT catch Class Cast Exception e this alignment for superclass in type declaration Alignment M NEXT SHIFTED SPLIT final Object alignment For Superinterfaces In Type Declaration Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR SUPERINTERFACES IN TYPE DECLARATION if alignment For Superinterfaces In Type Declaration Option null try this alignment for superinterfaces in type declaration Integer parse Int String alignment For Superinterfaces In Type Declaration Option catch Number Format Exception e this alignment for superinterfaces in type declaration Alignment M NEXT SHIFTED SPLIT catch Class Cast Exception e this alignment for superinterfaces in type declaration Alignment M NEXT SHIFTED SPLIT final Object alignment For Throws Clause In Constructor Declaration Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR THROWS CLAUSE IN CONSTRUCTOR DECLARATION if alignment For Throws Clause In Constructor Declaration Option null try this alignment for throws clause in constructor declaration Integer parse Int String alignment For Throws Clause In Constructor Declaration Option catch Number Format Exception e this alignment for throws clause in constructor declaration Alignment M COMPACT SPLIT catch Class Cast Exception e this alignment for throws clause in constructor declaration Alignment M COMPACT SPLIT final Object alignment For Throws Clause In Method Declaration Option settings get Default Code Formatter Constants FORMATTER ALIGNMENT FOR THROWS CLAUSE IN METHOD DECLARATION if alignment For Throws Clause In Method Declaration Option null try this alignment for throws clause in method declaration Integer parse Int String alignment For Throws Clause In Method Declaration Option catch Number Format Exception e this alignment for throws clause in method declaration Alignment M COMPACT SPLIT catch Class Cast Exception e this alignment for throws clause in method declaration Alignment M COMPACT SPLIT final Object align Type Members On Columns Option settings get Default Code Formatter Constants FORMATTER ALIGN TYPE MEMBERS ON COLUMNS if align Type Members On Columns Option null this align type members on columns Default Code Formatter Constants TRUE equals align Type Members On Columns Option final Object brace Position For Anonymous Type Declaration Option settings get Default Code Formatter Constants FORMATTER BRACE POSITION FOR ANONYMOUS TYPE DECLARATION if brace Position For Anonymous Type DeclarationO alignmentForArgumentsInAllocationExpressionOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ALLOCATION_EXPRESSION alignmentForArgumentsInAllocationExpressionOption alignment_for_arguments_in_allocation_expression parseInt alignmentForArgumentsInAllocationExpressionOption NumberFormatException alignment_for_arguments_in_allocation_expression M_COMPACT_SPLIT ClassCastException alignment_for_arguments_in_allocation_expression M_COMPACT_SPLIT alignmentForArgumentsInExplicitConstructorCallOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_EXPLICIT_CONSTRUCTOR_CALL alignmentForArgumentsInExplicitConstructorCallOption alignment_for_arguments_in_explicit_constructor_call parseInt alignmentForArgumentsInExplicitConstructorCallOption NumberFormatException alignment_for_arguments_in_explicit_constructor_call M_COMPACT_SPLIT ClassCastException alignment_for_arguments_in_explicit_constructor_call M_COMPACT_SPLIT alignmentForArgumentsInMethodInvocationOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION alignmentForArgumentsInMethodInvocationOption alignment_for_arguments_in_method_invocation parseInt alignmentForArgumentsInMethodInvocationOption NumberFormatException alignment_for_arguments_in_method_invocation M_COMPACT_SPLIT ClassCastException alignment_for_arguments_in_method_invocation M_COMPACT_SPLIT alignmentForArgumentsInQualifiedAllocationExpressionOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_QUALIFIED_ALLOCATION_EXPRESSION alignmentForArgumentsInQualifiedAllocationExpressionOption alignment_for_arguments_in_qualified_allocation_expression parseInt alignmentForArgumentsInQualifiedAllocationExpressionOption NumberFormatException alignment_for_arguments_in_qualified_allocation_expression M_COMPACT_SPLIT ClassCastException alignment_for_arguments_in_qualified_allocation_expression M_COMPACT_SPLIT alignmentForBinaryExpressionOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION alignmentForBinaryExpressionOption alignment_for_binary_expression parseInt alignmentForBinaryExpressionOption NumberFormatException alignment_for_binary_expression M_COMPACT_SPLIT ClassCastException alignment_for_binary_expression M_COMPACT_SPLIT alignmentForCompactIfOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_COMPACT_IF alignmentForCompactIfOption alignment_for_compact_if parseInt alignmentForCompactIfOption NumberFormatException alignment_for_compact_if M_ONE_PER_LINE_SPLIT M_INDENT_BY_ONE ClassCastException alignment_for_compact_if M_ONE_PER_LINE_SPLIT M_INDENT_BY_ONE alignmentForConditionalExpressionOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_CONDITIONAL_EXPRESSION alignmentForConditionalExpressionOption alignment_for_conditional_expression parseInt alignmentForConditionalExpressionOption NumberFormatException alignment_for_conditional_expression M_ONE_PER_LINE_SPLIT ClassCastException alignment_for_conditional_expression M_ONE_PER_LINE_SPLIT alignmentForExpressionsInArrayInitializerOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_EXPRESSIONS_IN_ARRAY_INITIALIZER alignmentForExpressionsInArrayInitializerOption alignment_for_expressions_in_array_initializer parseInt alignmentForExpressionsInArrayInitializerOption NumberFormatException alignment_for_expressions_in_array_initializer M_COMPACT_SPLIT ClassCastException alignment_for_expressions_in_array_initializer M_COMPACT_SPLIT alignmentForMultipleFieldsOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_MULTIPLE_FIELDS alignmentForMultipleFieldsOption alignment_for_multiple_fields parseInt alignmentForMultipleFieldsOption NumberFormatException alignment_for_multiple_fields M_COMPACT_SPLIT ClassCastException alignment_for_multiple_fields M_COMPACT_SPLIT alignmentForParametersInConstructorDeclarationOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_CONSTRUCTOR_DECLARATION alignmentForParametersInConstructorDeclarationOption alignment_for_parameters_in_constructor_declaration parseInt alignmentForParametersInConstructorDeclarationOption NumberFormatException alignment_for_parameters_in_constructor_declaration M_COMPACT_SPLIT ClassCastException alignment_for_parameters_in_constructor_declaration M_COMPACT_SPLIT alignmentForParametersInMethodDeclarationOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION alignmentForParametersInMethodDeclarationOption alignment_for_parameters_in_method_declaration parseInt alignmentForParametersInMethodDeclarationOption NumberFormatException alignment_for_parameters_in_method_declaration M_COMPACT_SPLIT ClassCastException alignment_for_parameters_in_method_declaration M_COMPACT_SPLIT alignmentForSelectorInMethodInvocationOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_SELECTOR_IN_METHOD_INVOCATION alignmentForSelectorInMethodInvocationOption alignment_for_selector_in_method_invocation parseInt alignmentForSelectorInMethodInvocationOption NumberFormatException alignment_for_selector_in_method_invocation M_COMPACT_SPLIT ClassCastException alignment_for_selector_in_method_invocation M_COMPACT_SPLIT alignmentForSuperclassInTypeDeclarationOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_SUPERCLASS_IN_TYPE_DECLARATION alignmentForSuperclassInTypeDeclarationOption alignment_for_superclass_in_type_declaration parseInt alignmentForSuperclassInTypeDeclarationOption NumberFormatException alignment_for_superclass_in_type_declaration M_NEXT_SHIFTED_SPLIT ClassCastException alignment_for_superclass_in_type_declaration M_NEXT_SHIFTED_SPLIT alignmentForSuperinterfacesInTypeDeclarationOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_SUPERINTERFACES_IN_TYPE_DECLARATION alignmentForSuperinterfacesInTypeDeclarationOption alignment_for_superinterfaces_in_type_declaration parseInt alignmentForSuperinterfacesInTypeDeclarationOption NumberFormatException alignment_for_superinterfaces_in_type_declaration M_NEXT_SHIFTED_SPLIT ClassCastException alignment_for_superinterfaces_in_type_declaration M_NEXT_SHIFTED_SPLIT alignmentForThrowsClauseInConstructorDeclarationOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_THROWS_CLAUSE_IN_CONSTRUCTOR_DECLARATION alignmentForThrowsClauseInConstructorDeclarationOption alignment_for_throws_clause_in_constructor_declaration parseInt alignmentForThrowsClauseInConstructorDeclarationOption NumberFormatException alignment_for_throws_clause_in_constructor_declaration M_COMPACT_SPLIT ClassCastException alignment_for_throws_clause_in_constructor_declaration M_COMPACT_SPLIT alignmentForThrowsClauseInMethodDeclarationOption DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_THROWS_CLAUSE_IN_METHOD_DECLARATION alignmentForThrowsClauseInMethodDeclarationOption alignment_for_throws_clause_in_method_declaration parseInt alignmentForThrowsClauseInMethodDeclarationOption NumberFormatException alignment_for_throws_clause_in_method_declaration M_COMPACT_SPLIT ClassCastException alignment_for_throws_clause_in_method_declaration M_COMPACT_SPLIT alignTypeMembersOnColumnsOption DefaultCodeFormatterConstants FORMATTER_ALIGN_TYPE_MEMBERS_ON_COLUMNS alignTypeMembersOnColumnsOption align_type_members_on_columns DefaultCodeFormatterConstants alignTypeMembersOnColumnsOption bracePositionForAnonymousTypeDeclarationOption DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_ANONYMOUS_TYPE_DECLARATION bracePositionForAnonymousTypeDeclarationO
RT SPACE BEFORE COMMA IN MULTIPLE FIELD DECLARATIONS if insert Space Before Comma In Multiple Field Declarations Option null this insert space before comma in multiple field declarations Java Core INSERT equals insert Space Before Comma In Multiple Field Declarations Option final Object insert Space Before Comma In Multiple Local Declarations Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE COMMA IN MULTIPLE LOCAL DECLARATIONS if insert Space Before Comma In Multiple Local Declarations Option null this insert space before comma in multiple local declarations Java Core INSERT equals insert Space Before Comma In Multiple Local Declarations Option final Object insert Space Before Comma In Superinterfaces Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE COMMA IN SUPERINTERFACES if insert Space Before Comma In Superinterfaces Option null this insert space before comma in superinterfaces Java Core INSERT equals insert Space Before Comma In Superinterfaces Option final Object insert Space Before Opening Brace In Anonymous Type Declaration Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING BRACE IN ANONYMOUS TYPE DECLARATION if insert Space Before Opening Brace In Anonymous Type Declaration Option null this insert space before opening brace in anonymous type declaration Java Core INSERT equals insert Space Before Opening Brace In Anonymous Type Declaration Option final Object insert Space Before Opening Brace In Array Initializer Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING BRACE IN ARRAY INITIALIZER if insert Space Before Opening Brace In Array Initializer Option null this insert space before opening brace in array initializer Java Core INSERT equals insert Space Before Opening Brace In Array Initializer Option final Object insert Space Before Opening Brace In Block Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING BRACE IN BLOCK if insert Space Before Opening Brace In Block Option null this insert space before opening brace in block Java Core INSERT equals insert Space Before Opening Brace In Block Option final Object insert Space Before Opening Brace In Constructor Declaration Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING BRACE IN CONSTRUCTOR DECLARATION if insert Space Before Opening Brace In Constructor Declaration Option null this insert space before opening brace in constructor declaration Java Core INSERT equals insert Space Before Opening Brace In Constructor Declaration Option final Object insert Space Before Opening Brace In Method Declaration Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING BRACE IN METHOD DECLARATION if insert Space Before Opening Brace In Method Declaration Option null this insert space before opening brace in method declaration Java Core INSERT equals insert Space Before Opening Brace In Method Declaration Option final Object insert Space Before Opening Brace In Type Declaration Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING BRACE IN TYPE DECLARATION if insert Space Before Opening Brace In Type Declaration Option null this insert space before opening brace in type declaration Java Core INSERT equals insert Space Before Opening Brace In Type Declaration Option final Object insert Space Before Opening Bracket In Array Allocation Expression Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING BRACKET IN ARRAY ALLOCATION EXPRESSION if insert Space Before Opening Bracket In Array Allocation Expression Option null this insert space before opening bracket in array allocation expression Java Core INSERT equals insert Space Before Opening Bracket In Array Allocation Expression Option final Object insert Space Before Opening Bracket In Array Reference Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING BRACKET IN ARRAY REFERENCE if insert Space Before Opening Bracket In Array Reference Option null this insert space before opening bracket in array reference Java Core INSERT equals insert Space Before Opening Bracket In Array Reference Option final Object insert Space Before Opening Bracket In Array Type Reference Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING BRACKET IN ARRAY TYPE REFERENCE if insert Space Before Opening Bracket In Array Type Reference Option null this insert space before opening bracket in array type reference Java Core INSERT equals insert Space Before Opening Bracket In Array Type Reference Option final Object insert Space Before Opening Paren In Catch Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING PAREN IN CATCH if insert Space Before Opening Paren In Catch Option null this insert space before opening paren in catch Java Core INSERT equals insert Space Before Opening Paren In Catch Option final Object insert Space Before Opening Paren In Constructor Declaration Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING PAREN IN CONSTRUCTOR DECLARATION if insert Space Before Opening Paren In Constructor Declaration Option null this insert space before opening paren in constructor declaration Java Core INSERT equals insert Space Before Opening Paren In Constructor Declaration Option final Object insert Space Before Opening Paren In For Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING PAREN IN FOR if insert Space Before Opening Paren In For Option null this insert space before opening paren in for Java Core INSERT equals insert Space Before Opening Paren In For Option final Object insert Space Before Opening Paren In If Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING PAREN IN IF if insert Space Before Opening Paren In If Option null this insert space before opening paren in if Java Core INSERT equals insert Space Before Opening Paren In If Option final Object insert Space Before Opening Paren In Method Invocation Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING PAREN IN METHOD INVOCATION if insert Space Before Opening Paren In Method Invocation Option null this insert space before opening paren in method invocation Java Core INSERT equals insert Space Before Opening Paren In Method Invocation Option final Object insert Space Before Opening Paren In Method Declaration Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING PAREN IN METHOD DECLARATION if insert Space Before Opening Paren In Method Declaration Option null this insert space before opening paren in method declaration Java Core INSERT equals insert Space Before Opening Paren In Method Declaration Option final Object insert Space Before Opening Paren In Switch Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING PAREN IN SWITCH if insert Space Before Opening Paren In Switch Option null this insert space before opening paren in switch Java Core INSERT equals insert Space Before Opening Paren In Switch Option final Object insert Space Before Opening Brace In Switch Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING BRACE IN SWITCH if insert Space Before Opening Brace In Switch Option null this insert space before opening brace in switch Java Core INSERT equals insert Space Before Opening Brace In Switch Option final Object insert Space Before Opening Paren In Synchronized Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING PAREN IN SYNCHRONIZED if insert Space Before Opening Paren In Synchronized Option null this insert space before opening paren in synchronized Java Core INSERT equals insert Space Before Opening Paren In Synchronized Option final Object insert Space Before Opening Paren In Parenthesized Expression Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING PAREN IN PARENTHESIZED EXPRESSION if insert Space Before Opening Paren In Parenthesized Expression Option null this insert space before opening paren in parenthesized expression Java Core INSERT equals insert Space Before Opening Paren In Parenthesized Expression Option final Object insert Space Before Opening Paren In While Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING PAREN IN WHILE if insert Space Before Opening Paren In While Option null this insert space before opening paren in while Java Core INSERT equals insert Space Before Opening Paren In While Option final Object insert Space Before Postfix Operator Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE POSTFIX OPERATOR if insert Space Before Postfix Operator Option null this insert space before postfix operator Java Core INSERT equals insert Space Before Postfix Operator Option final Object insert Space Before Prefix Operator Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE PREFIX OPERATOR if insert Space Before Prefix Operator Option null this insert space before prefix operator Java Core INSERT equals insert Space Before Prefix Operator Option final Object insert Space Before Question In Conditional Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE QUESTION IN CONDITIONAL if insert Space Before Question In Conditional Option null this insert space before question in conditional Java Core INSERT equals insert Space Before Question In Conditional Option final Object insert Space Before Semicolon Option settings get Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE SEMICOLON if insert Space Before Semicolon Option null thi RT_SPACE_BEFORE_COMMA_IN_MULTIPLE_FIELD_DECLARATIONS insertSpaceBeforeCommaInMultipleFieldDeclarationsOption insert_space_before_comma_in_multiple_field_declarations JavaCore insertSpaceBeforeCommaInMultipleFieldDeclarationsOption insertSpaceBeforeCommaInMultipleLocalDeclarationsOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_MULTIPLE_LOCAL_DECLARATIONS insertSpaceBeforeCommaInMultipleLocalDeclarationsOption insert_space_before_comma_in_multiple_local_declarations JavaCore insertSpaceBeforeCommaInMultipleLocalDeclarationsOption insertSpaceBeforeCommaInSuperinterfacesOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_SUPERINTERFACES insertSpaceBeforeCommaInSuperinterfacesOption insert_space_before_comma_in_superinterfaces JavaCore insertSpaceBeforeCommaInSuperinterfacesOption insertSpaceBeforeOpeningBraceInAnonymousTypeDeclarationOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_ANONYMOUS_TYPE_DECLARATION insertSpaceBeforeOpeningBraceInAnonymousTypeDeclarationOption insert_space_before_opening_brace_in_anonymous_type_declaration JavaCore insertSpaceBeforeOpeningBraceInAnonymousTypeDeclarationOption insertSpaceBeforeOpeningBraceInArrayInitializerOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_ARRAY_INITIALIZER insertSpaceBeforeOpeningBraceInArrayInitializerOption insert_space_before_opening_brace_in_array_initializer JavaCore insertSpaceBeforeOpeningBraceInArrayInitializerOption insertSpaceBeforeOpeningBraceInBlockOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_BLOCK insertSpaceBeforeOpeningBraceInBlockOption insert_space_before_opening_brace_in_block JavaCore insertSpaceBeforeOpeningBraceInBlockOption insertSpaceBeforeOpeningBraceInConstructorDeclarationOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_CONSTRUCTOR_DECLARATION insertSpaceBeforeOpeningBraceInConstructorDeclarationOption insert_space_before_opening_brace_in_constructor_declaration JavaCore insertSpaceBeforeOpeningBraceInConstructorDeclarationOption insertSpaceBeforeOpeningBraceInMethodDeclarationOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_METHOD_DECLARATION insertSpaceBeforeOpeningBraceInMethodDeclarationOption insert_space_before_opening_brace_in_method_declaration JavaCore insertSpaceBeforeOpeningBraceInMethodDeclarationOption insertSpaceBeforeOpeningBraceInTypeDeclarationOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_TYPE_DECLARATION insertSpaceBeforeOpeningBraceInTypeDeclarationOption insert_space_before_opening_brace_in_type_declaration JavaCore insertSpaceBeforeOpeningBraceInTypeDeclarationOption insertSpaceBeforeOpeningBracketInArrayAllocationExpressionOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACKET_IN_ARRAY_ALLOCATION_EXPRESSION insertSpaceBeforeOpeningBracketInArrayAllocationExpressionOption insert_space_before_opening_bracket_in_array_allocation_expression JavaCore insertSpaceBeforeOpeningBracketInArrayAllocationExpressionOption insertSpaceBeforeOpeningBracketInArrayReferenceOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACKET_IN_ARRAY_REFERENCE insertSpaceBeforeOpeningBracketInArrayReferenceOption insert_space_before_opening_bracket_in_array_reference JavaCore insertSpaceBeforeOpeningBracketInArrayReferenceOption insertSpaceBeforeOpeningBracketInArrayTypeReferenceOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACKET_IN_ARRAY_TYPE_REFERENCE insertSpaceBeforeOpeningBracketInArrayTypeReferenceOption insert_space_before_opening_bracket_in_array_type_reference JavaCore insertSpaceBeforeOpeningBracketInArrayTypeReferenceOption insertSpaceBeforeOpeningParenInCatchOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_CATCH insertSpaceBeforeOpeningParenInCatchOption insert_space_before_opening_paren_in_catch JavaCore insertSpaceBeforeOpeningParenInCatchOption insertSpaceBeforeOpeningParenInConstructorDeclarationOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_CONSTRUCTOR_DECLARATION insertSpaceBeforeOpeningParenInConstructorDeclarationOption insert_space_before_opening_paren_in_constructor_declaration JavaCore insertSpaceBeforeOpeningParenInConstructorDeclarationOption insertSpaceBeforeOpeningParenInForOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_FOR insertSpaceBeforeOpeningParenInForOption insert_space_before_opening_paren_in_for JavaCore insertSpaceBeforeOpeningParenInForOption insertSpaceBeforeOpeningParenInIfOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_IF insertSpaceBeforeOpeningParenInIfOption insert_space_before_opening_paren_in_if JavaCore insertSpaceBeforeOpeningParenInIfOption insertSpaceBeforeOpeningParenInMethodInvocationOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_METHOD_INVOCATION insertSpaceBeforeOpeningParenInMethodInvocationOption insert_space_before_opening_paren_in_method_invocation JavaCore insertSpaceBeforeOpeningParenInMethodInvocationOption insertSpaceBeforeOpeningParenInMethodDeclarationOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_METHOD_DECLARATION insertSpaceBeforeOpeningParenInMethodDeclarationOption insert_space_before_opening_paren_in_method_declaration JavaCore insertSpaceBeforeOpeningParenInMethodDeclarationOption insertSpaceBeforeOpeningParenInSwitchOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_SWITCH insertSpaceBeforeOpeningParenInSwitchOption insert_space_before_opening_paren_in_switch JavaCore insertSpaceBeforeOpeningParenInSwitchOption insertSpaceBeforeOpeningBraceInSwitchOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_SWITCH insertSpaceBeforeOpeningBraceInSwitchOption insert_space_before_opening_brace_in_switch JavaCore insertSpaceBeforeOpeningBraceInSwitchOption insertSpaceBeforeOpeningParenInSynchronizedOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_SYNCHRONIZED insertSpaceBeforeOpeningParenInSynchronizedOption insert_space_before_opening_paren_in_synchronized JavaCore insertSpaceBeforeOpeningParenInSynchronizedOption insertSpaceBeforeOpeningParenInParenthesizedExpressionOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_PARENTHESIZED_EXPRESSION insertSpaceBeforeOpeningParenInParenthesizedExpressionOption insert_space_before_opening_paren_in_parenthesized_expression JavaCore insertSpaceBeforeOpeningParenInParenthesizedExpressionOption insertSpaceBeforeOpeningParenInWhileOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_WHILE insertSpaceBeforeOpeningParenInWhileOption insert_space_before_opening_paren_in_while JavaCore insertSpaceBeforeOpeningParenInWhileOption insertSpaceBeforePostfixOperatorOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_POSTFIX_OPERATOR insertSpaceBeforePostfixOperatorOption insert_space_before_postfix_operator JavaCore insertSpaceBeforePostfixOperatorOption insertSpaceBeforePrefixOperatorOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_PREFIX_OPERATOR insertSpaceBeforePrefixOperatorOption insert_space_before_prefix_operator JavaCore insertSpaceBeforePrefixOperatorOption insertSpaceBeforeQuestionInConditionalOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_QUESTION_IN_CONDITIONAL insertSpaceBeforeQuestionInConditionalOption insert_space_before_question_in_conditional JavaCore insertSpaceBeforeQuestionInConditionalOption insertSpaceBeforeSemicolonOption DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_SEMICOLON insertSpaceBeforeSemicolonOption
public void set Default Settings this alignment for arguments in allocation expression Alignment M COMPACT SPLIT this alignment for arguments in explicit constructor call Alignment M COMPACT SPLIT this alignment for arguments in method invocation Alignment M COMPACT SPLIT this alignment for arguments in qualified allocation expression Alignment M COMPACT SPLIT this alignment for binary expression Alignment M COMPACT SPLIT this alignment for compact if Alignment M ONE PER LINE SPLIT Alignment M INDENT BY ONE this alignment for conditional expression Alignment M ONE PER LINE SPLIT this alignment for expressions in array initializer Alignment M COMPACT SPLIT this alignment for multiple fields Alignment M COMPACT SPLIT this alignment for parameters in constructor declaration Alignment M COMPACT SPLIT this alignment for parameters in method declaration Alignment M COMPACT SPLIT this alignment for selector in method invocation Alignment M COMPACT SPLIT this alignment for superclass in type declaration Alignment M NEXT SHIFTED SPLIT this alignment for superinterfaces in type declaration Alignment M NEXT SHIFTED SPLIT this alignment for throws clause in constructor declaration Alignment M COMPACT SPLIT this alignment for throws clause in method declaration Alignment M COMPACT SPLIT this align type members on columns false this brace position for anonymous type declaration Default Code Formatter Constants END OF LINE this brace position for array initializer Default Code Formatter Constants END OF LINE this brace position for block Default Code Formatter Constants END OF LINE this brace position for block in case Default Code Formatter Constants END OF LINE this brace position for constructor declaration Default Code Formatter Constants END OF LINE this brace position for method declaration Default Code Formatter Constants END OF LINE this brace position for type declaration Default Code Formatter Constants END OF LINE this brace position for switch Default Code Formatter Constants END OF LINE this continuation indentation 2 this continuation indentation for array initializer 2 this blank lines after imports 0 this blank lines after package 0 this blank lines before field 0 this blank lines before first class body declaration 0 this blank lines before imports 0 this blank lines before member type 0 this blank lines before method 0 this blank lines before new chunk 0 this blank lines before package 0 this blank lines between type declarations 0 this blank lines at beginning of method body 0 this indent statements compare to block true this indent statements compare to body true this indent body declarations compare to type header true this indent breaks compare to cases true this indent switchstatements compare to cases true this indent switchstatements compare to switch true this insert new line after opening brace in array initializer false this insert new line before catch in try statement false this insert new line before closing brace in array initializer false this insert new line before else in if statement false this insert new line before finally in try statement false this insert new line before while in do statement false this insert new line in empty anonymous type declaration true this insert new line in empty block true this insert new line in empty method body true this insert new line in empty type declaration true this insert space after assignment operator true this insert space after binary operator true this insert space after closing paren in cast true this insert space after closing brace in block true this insert space after colon in assert true this insert space after colon in case true this insert space after colon in conditional true this insert space after colon in labeled statement true this insert space after comma in allocation expression true this insert space after comma in array initializer true this insert space after comma in constructor declaration parameters true this insert space after comma in constructor declaration throws true this insert space after comma in explicit constructor call arguments true this insert space after comma in for increments true this insert space after comma in for inits true this insert space after comma in method invocation arguments true this insert space after comma in method declaration parameters true this insert space after comma in method declaration throws true this insert space after comma in multiple field declarations true this insert space after comma in multiple local declarations true this insert space after comma in superinterfaces true this insert space after opening bracket in array allocation expression false this insert space after opening bracket in array reference false this insert space after opening brace in array initializer false this insert space after opening paren in cast false this insert space after opening paren in catch false this insert space after opening paren in constructor declaration false this insert space after opening paren in for false this insert space after opening paren in if false this insert space after opening paren in method declaration false this insert space after opening paren in method invocation false this insert space after opening paren in parenthesized expression false this insert space after opening paren in switch false this insert space after opening paren in synchronized false this insert space after opening paren in while false this insert space after postfix operator false this insert space after prefix operator false this insert space after question in conditional true this insert space after semicolon in for true this insert space after unary operator false this insert space before assignment operator true this insert space before binary operator true this insert space before closing brace in array initializer false this insert space before closing bracket in array allocation expression false this insert space before closing bracket in array reference false this insert space before closing paren in cast false this insert space before closing paren in catch false this insert space before closing paren in constructor declaration false this insert space before closing paren in for false this insert space before closing paren in if false this insert space before closing paren in method declaration false this insert space before closing paren in method invocation false this insert space before closing paren in parenthesized expression false this insert space before closing paren in switch false this insert space before closing paren in synchronized false this insert space before closing paren in while false this insert space before colon in assert true this insert space before colon in case true this insert space before colon in conditional true this insert space before colon in default true this insert space before colon in labeled statement true this insert space before comma in allocation expression false this insert space before comma in array initializer false this insert space before comma in constructor declaration parameters false this insert space before comma in constructor declaration throws false this insert space before comma in explicit constructor call arguments false this insert space before comma in for increments false this insert space before comma in for inits false this insert space before comma in method invocation arguments false this insert space before comma in method declaration parameters false this insert space before comma in method declaration throws false this insert space before comma in multiple field declarations false this insert space before comma in multiple local declarations false this insert space before comma in superinterfaces false this insert space before opening brace in anonymous type declaration true this insert space before opening brace in array initializer false this insert space before opening brace in block true this insert space before opening brace in constructor declaration true this insert space before opening brace in method declaration true this insert space before opening brace in switch true this insert space before opening brace in type declaration true this insert space before opening bracket in array allocation expression false this insert space before opening bracket in array reference false this insert space before opening bracket in array type reference false this insert space before opening paren in catch true this insert space before opening paren in constructor declaration false this insert space before opening paren in for true this insert space before opening paren in if true this insert space before opening paren in method invocation false this insert space before opening paren in method declaration false this insert space before opening paren in switch true this insert space before opening paren in synchronized true this insert space before opening paren in parenthesized expression false this insert space before opening paren in while true this insert space before postfix operator false this insert space before prefix operator false this insert space before question in conditional true this insert space before semicolon false this insert space before semicolon in for false this insert space before unary operator false this insert space between brackets in array type reference false this insert space between empty braces in array initializer false this insert space between empty brackets in array allocation expression false this insert space between empty parens in constructor decl setDefaultSettings alignment_for_arguments_in_allocation_expression M_COMPACT_SPLIT alignment_for_arguments_in_explicit_constructor_call M_COMPACT_SPLIT alignment_for_arguments_in_method_invocation M_COMPACT_SPLIT alignment_for_arguments_in_qualified_allocation_expression M_COMPACT_SPLIT alignment_for_binary_expression M_COMPACT_SPLIT alignment_for_compact_if M_ONE_PER_LINE_SPLIT M_INDENT_BY_ONE alignment_for_conditional_expression M_ONE_PER_LINE_SPLIT alignment_for_expressions_in_array_initializer M_COMPACT_SPLIT alignment_for_multiple_fields M_COMPACT_SPLIT alignment_for_parameters_in_constructor_declaration M_COMPACT_SPLIT alignment_for_parameters_in_method_declaration M_COMPACT_SPLIT alignment_for_selector_in_method_invocation M_COMPACT_SPLIT alignment_for_superclass_in_type_declaration M_NEXT_SHIFTED_SPLIT alignment_for_superinterfaces_in_type_declaration M_NEXT_SHIFTED_SPLIT alignment_for_throws_clause_in_constructor_declaration M_COMPACT_SPLIT alignment_for_throws_clause_in_method_declaration M_COMPACT_SPLIT align_type_members_on_columns brace_position_for_anonymous_type_declaration DefaultCodeFormatterConstants END_OF_LINE brace_position_for_array_initializer DefaultCodeFormatterConstants END_OF_LINE brace_position_for_block DefaultCodeFormatterConstants END_OF_LINE brace_position_for_block_in_case DefaultCodeFormatterConstants END_OF_LINE brace_position_for_constructor_declaration DefaultCodeFormatterConstants END_OF_LINE brace_position_for_method_declaration DefaultCodeFormatterConstants END_OF_LINE brace_position_for_type_declaration DefaultCodeFormatterConstants END_OF_LINE brace_position_for_switch DefaultCodeFormatterConstants END_OF_LINE continuation_indentation continuation_indentation_for_array_initializer blank_lines_after_imports blank_lines_after_package blank_lines_before_field blank_lines_before_first_class_body_declaration blank_lines_before_imports blank_lines_before_member_type blank_lines_before_method blank_lines_before_new_chunk blank_lines_before_package blank_lines_between_type_declarations blank_lines_at_beginning_of_method_body indent_statements_compare_to_block indent_statements_compare_to_body indent_body_declarations_compare_to_type_header indent_breaks_compare_to_cases indent_switchstatements_compare_to_cases indent_switchstatements_compare_to_switch insert_new_line_after_opening_brace_in_array_initializer insert_new_line_before_catch_in_try_statement insert_new_line_before_closing_brace_in_array_initializer insert_new_line_before_else_in_if_statement insert_new_line_before_finally_in_try_statement insert_new_line_before_while_in_do_statement insert_new_line_in_empty_anonymous_type_declaration insert_new_line_in_empty_block insert_new_line_in_empty_method_body insert_new_line_in_empty_type_declaration insert_space_after_assignment_operator insert_space_after_binary_operator insert_space_after_closing_paren_in_cast insert_space_after_closing_brace_in_block insert_space_after_colon_in_assert insert_space_after_colon_in_case insert_space_after_colon_in_conditional insert_space_after_colon_in_labeled_statement insert_space_after_comma_in_allocation_expression insert_space_after_comma_in_array_initializer insert_space_after_comma_in_constructor_declaration_parameters insert_space_after_comma_in_constructor_declaration_throws insert_space_after_comma_in_explicit_constructor_call_arguments insert_space_after_comma_in_for_increments insert_space_after_comma_in_for_inits insert_space_after_comma_in_method_invocation_arguments insert_space_after_comma_in_method_declaration_parameters insert_space_after_comma_in_method_declaration_throws insert_space_after_comma_in_multiple_field_declarations insert_space_after_comma_in_multiple_local_declarations insert_space_after_comma_in_superinterfaces insert_space_after_opening_bracket_in_array_allocation_expression insert_space_after_opening_bracket_in_array_reference insert_space_after_opening_brace_in_array_initializer insert_space_after_opening_paren_in_cast insert_space_after_opening_paren_in_catch insert_space_after_opening_paren_in_constructor_declaration insert_space_after_opening_paren_in_for insert_space_after_opening_paren_in_if insert_space_after_opening_paren_in_method_declaration insert_space_after_opening_paren_in_method_invocation insert_space_after_opening_paren_in_parenthesized_expression insert_space_after_opening_paren_in_switch insert_space_after_opening_paren_in_synchronized insert_space_after_opening_paren_in_while insert_space_after_postfix_operator insert_space_after_prefix_operator insert_space_after_question_in_conditional insert_space_after_semicolon_in_for insert_space_after_unary_operator insert_space_before_assignment_operator insert_space_before_binary_operator insert_space_before_closing_brace_in_array_initializer insert_space_before_closing_bracket_in_array_allocation_expression insert_space_before_closing_bracket_in_array_reference insert_space_before_closing_paren_in_cast insert_space_before_closing_paren_in_catch insert_space_before_closing_paren_in_constructor_declaration insert_space_before_closing_paren_in_for insert_space_before_closing_paren_in_if insert_space_before_closing_paren_in_method_declaration insert_space_before_closing_paren_in_method_invocation insert_space_before_closing_paren_in_parenthesized_expression insert_space_before_closing_paren_in_switch insert_space_before_closing_paren_in_synchronized insert_space_before_closing_paren_in_while insert_space_before_colon_in_assert insert_space_before_colon_in_case insert_space_before_colon_in_conditional insert_space_before_colon_in_default insert_space_before_colon_in_labeled_statement insert_space_before_comma_in_allocation_expression insert_space_before_comma_in_array_initializer insert_space_before_comma_in_constructor_declaration_parameters insert_space_before_comma_in_constructor_declaration_throws insert_space_before_comma_in_explicit_constructor_call_arguments insert_space_before_comma_in_for_increments insert_space_before_comma_in_for_inits insert_space_before_comma_in_method_invocation_arguments insert_space_before_comma_in_method_declaration_parameters insert_space_before_comma_in_method_declaration_throws insert_space_before_comma_in_multiple_field_declarations insert_space_before_comma_in_multiple_local_declarations insert_space_before_comma_in_superinterfaces insert_space_before_opening_brace_in_anonymous_type_declaration insert_space_before_opening_brace_in_array_initializer insert_space_before_opening_brace_in_block insert_space_before_opening_brace_in_constructor_declaration insert_space_before_opening_brace_in_method_declaration insert_space_before_opening_brace_in_switch insert_space_before_opening_brace_in_type_declaration insert_space_before_opening_bracket_in_array_allocation_expression insert_space_before_opening_bracket_in_array_reference insert_space_before_opening_bracket_in_array_type_reference insert_space_before_opening_paren_in_catch insert_space_before_opening_paren_in_constructor_declaration insert_space_before_opening_paren_in_for insert_space_before_opening_paren_in_if insert_space_before_opening_paren_in_method_invocation insert_space_before_opening_paren_in_method_declaration insert_space_before_opening_paren_in_switch insert_space_before_opening_paren_in_synchronized insert_space_before_opening_paren_in_parenthesized_expression insert_space_before_opening_paren_in_while insert_space_before_postfix_operator insert_space_before_prefix_operator insert_space_before_question_in_conditional insert_space_before_semicolon insert_space_before_semicolon_in_for insert_space_before_unary_operator insert_space_between_brackets_in_array_type_reference insert_space_between_empty_braces_in_array_initializer insert_space_between_empty_brackets_in_array_allocation_expression insert_space_between_empty_parens_in_constructor_decl
public void set Java Conventions Settings this alignment for arguments in allocation expression Alignment M COMPACT SPLIT this alignment for arguments in explicit constructor call Alignment M COMPACT SPLIT this alignment for arguments in method invocation Alignment M COMPACT SPLIT this alignment for arguments in qualified allocation expression Alignment M COMPACT SPLIT this alignment for binary expression Alignment M COMPACT SPLIT this alignment for compact if Alignment M COMPACT SPLIT this alignment for conditional expression Alignment M NEXT PER LINE SPLIT this alignment for expressions in array initializer Alignment M COMPACT SPLIT this alignment for multiple fields Alignment M COMPACT SPLIT this alignment for parameters in constructor declaration Alignment M COMPACT SPLIT this alignment for parameters in method declaration Alignment M COMPACT SPLIT this alignment for selector in method invocation Alignment M COMPACT SPLIT this alignment for superclass in type declaration Alignment M COMPACT SPLIT this alignment for superinterfaces in type declaration Alignment M COMPACT SPLIT this alignment for throws clause in constructor declaration Alignment M COMPACT SPLIT this alignment for throws clause in method declaration Alignment M COMPACT SPLIT this align type members on columns false this brace position for anonymous type declaration Default Code Formatter Constants END OF LINE this brace position for array initializer Default Code Formatter Constants END OF LINE this brace position for block Default Code Formatter Constants END OF LINE this brace position for block in case Default Code Formatter Constants END OF LINE this brace position for constructor declaration Default Code Formatter Constants END OF LINE this brace position for method declaration Default Code Formatter Constants END OF LINE this brace position for type declaration Default Code Formatter Constants END OF LINE this brace position for switch Default Code Formatter Constants END OF LINE this continuation indentation 2 this continuation indentation for array initializer 2 this blank lines after imports 1 this blank lines after package 1 this blank lines before field 1 this blank lines before first class body declaration 0 this blank lines before imports 1 this blank lines before member type 1 this blank lines before method 1 this blank lines before new chunk 1 this blank lines before package 0 this blank lines between type declarations 1 this blank lines at beginning of method body 0 this indent statements compare to block true this indent statements compare to body true this indent body declarations compare to type header true this indent breaks compare to cases true this indent switchstatements compare to cases true this indent switchstatements compare to switch false this insert new line after opening brace in array initializer false this insert new line before catch in try statement false this insert new line before closing brace in array initializer false this insert new line before else in if statement false this insert new line before finally in try statement false this insert new line before while in do statement false this insert new line in empty anonymous type declaration true this insert new line in empty block true this insert new line in empty method body true this insert new line in empty type declaration true this insert space after assignment operator true this insert space after binary operator true this insert space after closing paren in cast true this insert space after closing brace in block true this insert space after colon in assert true this insert space after colon in case true this insert space after colon in conditional true this insert space after colon in labeled statement true this insert space after comma in allocation expression true this insert space after comma in array initializer true this insert space after comma in constructor declaration parameters true this insert space after comma in constructor declaration throws true this insert space after comma in explicit constructor call arguments true this insert space after comma in for increments true this insert space after comma in for inits true this insert space after comma in method invocation arguments true this insert space after comma in method declaration parameters true this insert space after comma in method declaration throws true this insert space after comma in multiple field declarations true this insert space after comma in multiple local declarations true this insert space after comma in superinterfaces true this insert space after opening bracket in array allocation expression false this insert space after opening bracket in array reference false this insert space after opening brace in array initializer true this insert space after opening paren in cast false this insert space after opening paren in catch false this insert space after opening paren in constructor declaration false this insert space after opening paren in for false this insert space after opening paren in if false this insert space after opening paren in method declaration false this insert space after opening paren in method invocation false this insert space after opening paren in parenthesized expression false this insert space after opening paren in switch false this insert space after opening paren in synchronized false this insert space after opening paren in while false this insert space after postfix operator false this insert space after prefix operator false this insert space after question in conditional true this insert space after semicolon in for true this insert space after unary operator false this insert space before assignment operator true this insert space before binary operator true this insert space before closing brace in array initializer true this insert space before closing bracket in array allocation expression false this insert space before closing bracket in array reference false this insert space before closing paren in cast false this insert space before closing paren in catch false this insert space before closing paren in constructor declaration false this insert space before closing paren in for false this insert space before closing paren in if false this insert space before closing paren in method declaration false this insert space before closing paren in method invocation false this insert space before closing paren in parenthesized expression false this insert space before closing paren in switch false this insert space before closing paren in synchronized false this insert space before closing paren in while false this insert space before colon in assert true this insert space before colon in case false this insert space before colon in conditional true this insert space before colon in default false this insert space before colon in labeled statement false this insert space before comma in allocation expression false this insert space before comma in array initializer false this insert space before comma in constructor declaration parameters false this insert space before comma in constructor declaration throws false this insert space before comma in explicit constructor call arguments false this insert space before comma in for increments false this insert space before comma in for inits false this insert space before comma in method invocation arguments false this insert space before comma in method declaration parameters false this insert space before comma in method declaration throws false this insert space before comma in multiple field declarations false this insert space before comma in multiple local declarations false this insert space before comma in superinterfaces false this insert space before opening brace in anonymous type declaration true this insert space before opening brace in array initializer true this insert space before opening brace in block true this insert space before opening brace in constructor declaration true this insert space before opening brace in method declaration true this insert space before opening brace in switch true this insert space before opening brace in type declaration true this insert space before opening bracket in array allocation expression false this insert space before opening bracket in array reference false this insert space before opening bracket in array type reference false this insert space before opening paren in catch true this insert space before opening paren in constructor declaration false this insert space before opening paren in for true this insert space before opening paren in if true this insert space before opening paren in method invocation false this insert space before opening paren in method declaration false this insert space before opening paren in switch true this insert space before opening paren in synchronized true this insert space before opening paren in parenthesized expression false this insert space before opening paren in while true this insert space before postfix operator false this insert space before prefix operator false this insert space before question in conditional true this insert space before semicolon false this insert space before semicolon in for false this insert space before unary operator false this insert space between brackets in array type reference false this insert space between empty braces in array initializer false this insert space between empty brackets in array allocation expression false this insert space between empty parens in constructor declaration false this insert spac setJavaConventionsSettings alignment_for_arguments_in_allocation_expression M_COMPACT_SPLIT alignment_for_arguments_in_explicit_constructor_call M_COMPACT_SPLIT alignment_for_arguments_in_method_invocation M_COMPACT_SPLIT alignment_for_arguments_in_qualified_allocation_expression M_COMPACT_SPLIT alignment_for_binary_expression M_COMPACT_SPLIT alignment_for_compact_if M_COMPACT_SPLIT alignment_for_conditional_expression M_NEXT_PER_LINE_SPLIT alignment_for_expressions_in_array_initializer M_COMPACT_SPLIT alignment_for_multiple_fields M_COMPACT_SPLIT alignment_for_parameters_in_constructor_declaration M_COMPACT_SPLIT alignment_for_parameters_in_method_declaration M_COMPACT_SPLIT alignment_for_selector_in_method_invocation M_COMPACT_SPLIT alignment_for_superclass_in_type_declaration M_COMPACT_SPLIT alignment_for_superinterfaces_in_type_declaration M_COMPACT_SPLIT alignment_for_throws_clause_in_constructor_declaration M_COMPACT_SPLIT alignment_for_throws_clause_in_method_declaration M_COMPACT_SPLIT align_type_members_on_columns brace_position_for_anonymous_type_declaration DefaultCodeFormatterConstants END_OF_LINE brace_position_for_array_initializer DefaultCodeFormatterConstants END_OF_LINE brace_position_for_block DefaultCodeFormatterConstants END_OF_LINE brace_position_for_block_in_case DefaultCodeFormatterConstants END_OF_LINE brace_position_for_constructor_declaration DefaultCodeFormatterConstants END_OF_LINE brace_position_for_method_declaration DefaultCodeFormatterConstants END_OF_LINE brace_position_for_type_declaration DefaultCodeFormatterConstants END_OF_LINE brace_position_for_switch DefaultCodeFormatterConstants END_OF_LINE continuation_indentation continuation_indentation_for_array_initializer blank_lines_after_imports blank_lines_after_package blank_lines_before_field blank_lines_before_first_class_body_declaration blank_lines_before_imports blank_lines_before_member_type blank_lines_before_method blank_lines_before_new_chunk blank_lines_before_package blank_lines_between_type_declarations blank_lines_at_beginning_of_method_body indent_statements_compare_to_block indent_statements_compare_to_body indent_body_declarations_compare_to_type_header indent_breaks_compare_to_cases indent_switchstatements_compare_to_cases indent_switchstatements_compare_to_switch insert_new_line_after_opening_brace_in_array_initializer insert_new_line_before_catch_in_try_statement insert_new_line_before_closing_brace_in_array_initializer insert_new_line_before_else_in_if_statement insert_new_line_before_finally_in_try_statement insert_new_line_before_while_in_do_statement insert_new_line_in_empty_anonymous_type_declaration insert_new_line_in_empty_block insert_new_line_in_empty_method_body insert_new_line_in_empty_type_declaration insert_space_after_assignment_operator insert_space_after_binary_operator insert_space_after_closing_paren_in_cast insert_space_after_closing_brace_in_block insert_space_after_colon_in_assert insert_space_after_colon_in_case insert_space_after_colon_in_conditional insert_space_after_colon_in_labeled_statement insert_space_after_comma_in_allocation_expression insert_space_after_comma_in_array_initializer insert_space_after_comma_in_constructor_declaration_parameters insert_space_after_comma_in_constructor_declaration_throws insert_space_after_comma_in_explicit_constructor_call_arguments insert_space_after_comma_in_for_increments insert_space_after_comma_in_for_inits insert_space_after_comma_in_method_invocation_arguments insert_space_after_comma_in_method_declaration_parameters insert_space_after_comma_in_method_declaration_throws insert_space_after_comma_in_multiple_field_declarations insert_space_after_comma_in_multiple_local_declarations insert_space_after_comma_in_superinterfaces insert_space_after_opening_bracket_in_array_allocation_expression insert_space_after_opening_bracket_in_array_reference insert_space_after_opening_brace_in_array_initializer insert_space_after_opening_paren_in_cast insert_space_after_opening_paren_in_catch insert_space_after_opening_paren_in_constructor_declaration insert_space_after_opening_paren_in_for insert_space_after_opening_paren_in_if insert_space_after_opening_paren_in_method_declaration insert_space_after_opening_paren_in_method_invocation insert_space_after_opening_paren_in_parenthesized_expression insert_space_after_opening_paren_in_switch insert_space_after_opening_paren_in_synchronized insert_space_after_opening_paren_in_while insert_space_after_postfix_operator insert_space_after_prefix_operator insert_space_after_question_in_conditional insert_space_after_semicolon_in_for insert_space_after_unary_operator insert_space_before_assignment_operator insert_space_before_binary_operator insert_space_before_closing_brace_in_array_initializer insert_space_before_closing_bracket_in_array_allocation_expression insert_space_before_closing_bracket_in_array_reference insert_space_before_closing_paren_in_cast insert_space_before_closing_paren_in_catch insert_space_before_closing_paren_in_constructor_declaration insert_space_before_closing_paren_in_for insert_space_before_closing_paren_in_if insert_space_before_closing_paren_in_method_declaration insert_space_before_closing_paren_in_method_invocation insert_space_before_closing_paren_in_parenthesized_expression insert_space_before_closing_paren_in_switch insert_space_before_closing_paren_in_synchronized insert_space_before_closing_paren_in_while insert_space_before_colon_in_assert insert_space_before_colon_in_case insert_space_before_colon_in_conditional insert_space_before_colon_in_default insert_space_before_colon_in_labeled_statement insert_space_before_comma_in_allocation_expression insert_space_before_comma_in_array_initializer insert_space_before_comma_in_constructor_declaration_parameters insert_space_before_comma_in_constructor_declaration_throws insert_space_before_comma_in_explicit_constructor_call_arguments insert_space_before_comma_in_for_increments insert_space_before_comma_in_for_inits insert_space_before_comma_in_method_invocation_arguments insert_space_before_comma_in_method_declaration_parameters insert_space_before_comma_in_method_declaration_throws insert_space_before_comma_in_multiple_field_declarations insert_space_before_comma_in_multiple_local_declarations insert_space_before_comma_in_superinterfaces insert_space_before_opening_brace_in_anonymous_type_declaration insert_space_before_opening_brace_in_array_initializer insert_space_before_opening_brace_in_block insert_space_before_opening_brace_in_constructor_declaration insert_space_before_opening_brace_in_method_declaration insert_space_before_opening_brace_in_switch insert_space_before_opening_brace_in_type_declaration insert_space_before_opening_bracket_in_array_allocation_expression insert_space_before_opening_bracket_in_array_reference insert_space_before_opening_bracket_in_array_type_reference insert_space_before_opening_paren_in_catch insert_space_before_opening_paren_in_constructor_declaration insert_space_before_opening_paren_in_for insert_space_before_opening_paren_in_if insert_space_before_opening_paren_in_method_invocation insert_space_before_opening_paren_in_method_declaration insert_space_before_opening_paren_in_switch insert_space_before_opening_paren_in_synchronized insert_space_before_opening_paren_in_parenthesized_expression insert_space_before_opening_paren_in_while insert_space_before_postfix_operator insert_space_before_prefix_operator insert_space_before_question_in_conditional insert_space_before_semicolon insert_space_before_semicolon_in_for insert_space_before_unary_operator insert_space_between_brackets_in_array_type_reference insert_space_between_empty_braces_in_array_initializer insert_space_between_empty_brackets_in_array_allocation_expression insert_space_between_empty_parens_in_constructor_declaration insert_spac

Optimized Replace Edit text Edit public Location Scribe scribe int source Restart update scribe source Restart  OptimizedReplaceEdit textEdit sourceRestart sourceRestart
public void update Scribe scribe int source Restart this output Column scribe column this output Line scribe line this input Offset source Restart this output Indentation Level scribe indentation Level this last Number Of New Lines scribe last Number Of New Lines this need Space scribe need Space this pending Space scribe pending Space this edits Index scribe edits Index this nls Tag Counter scribe nls Tag Counter text Edit scribe get Last Edit  sourceRestart outputColumn outputLine inputOffset sourceRestart outputIndentationLevel indentationLevel lastNumberOfNewLines lastNumberOfNewLines needSpace needSpace pendingSpace pendingSpace editsIndex editsIndex nlsTagCounter nlsTagCounter textEdit getLastEdit

public Code Formatter Map options if options null this options Java Core get Options else this options options  CodeFormatter JavaCore getOptions
public String format String string int indent Level int positions String line Separator initialize the new formatter with old options Map new Options Default Code Formatter Constants get Eclipse21 Settings Object formatter New Line Opening Brace this options get Java Core FORMATTER NEWLINE OPENING BRACE if formatter New Line Opening Brace null if Java Core INSERT equals formatter New Line Opening Brace new Options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR ANONYMOUS TYPE DECLARATION Default Code Formatter Constants NEXT LINE new Options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR BLOCK Default Code Formatter Constants NEXT LINE new Options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR CONSTRUCTOR DECLARATION Default Code Formatter Constants NEXT LINE new Options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR METHOD DECLARATION Default Code Formatter Constants NEXT LINE new Options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR SWITCH Default Code Formatter Constants NEXT LINE new Options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR TYPE DECLARATION Default Code Formatter Constants NEXT LINE else new Options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR ANONYMOUS TYPE DECLARATION Default Code Formatter Constants END OF LINE new Options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR BLOCK Default Code Formatter Constants END OF LINE new Options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR CONSTRUCTOR DECLARATION Default Code Formatter Constants END OF LINE new Options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR METHOD DECLARATION Default Code Formatter Constants END OF LINE new Options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR SWITCH Default Code Formatter Constants END OF LINE new Options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR TYPE DECLARATION Default Code Formatter Constants END OF LINE Object formatter New Line Control this options get Java Core FORMATTER NEWLINE CONTROL if formatter New Line Control null if Java Core INSERT equals formatter New Line Control new Options put Default Code Formatter Constants FORMATTER INSERT NEW LINE BEFORE CATCH IN TRY STATEMENT Java Core INSERT new Options put Default Code Formatter Constants FORMATTER INSERT NEW LINE BEFORE ELSE IN IF STATEMENT Java Core INSERT new Options put Default Code Formatter Constants FORMATTER INSERT NEW LINE BEFORE FINALLY IN TRY STATEMENT Java Core INSERT new Options put Default Code Formatter Constants FORMATTER INSERT NEW LINE BEFORE WHILE IN DO STATEMENT Java Core INSERT else new Options put Default Code Formatter Constants FORMATTER INSERT NEW LINE BEFORE CATCH IN TRY STATEMENT Java Core DO NOT INSERT new Options put Default Code Formatter Constants FORMATTER INSERT NEW LINE BEFORE ELSE IN IF STATEMENT Java Core DO NOT INSERT new Options put Default Code Formatter Constants FORMATTER INSERT NEW LINE BEFORE FINALLY IN TRY STATEMENT Java Core DO NOT INSERT new Options put Default Code Formatter Constants FORMATTER INSERT NEW LINE BEFORE WHILE IN DO STATEMENT Java Core DO NOT INSERT Object formatter Clear Blank Lines this options get Java Core FORMATTER CLEAR BLANK LINES if formatter Clear Blank Lines null if Java Core PRESERVE ONE equals formatter Clear Blank Lines new Options put Default Code Formatter Constants FORMATTER NUMBER OF EMPTY LINES TO PRESERVE 1 NON NLS 1 else new Options put Default Code Formatter Constants FORMATTER NUMBER OF EMPTY LINES TO PRESERVE 0 NON NLS 1 Object formatter New Line Else If this options get Java Core FORMATTER NEWLINE ELSE IF if formatter New Line Else If null if Java Core INSERT equals formatter New Line Else If new Options put Default Code Formatter Constants FORMATTER COMPACT ELSE IF Default Code Formatter Constants FALSE else new Options put Default Code Formatter Constants FORMATTER COMPACT ELSE IF Default Code Formatter Constants TRUE Object formatter New Line Empty Block this options get Java Core FORMATTER NEWLINE EMPTY BLOCK if formatter New Line Empty Block null if Java Core INSERT equals formatter New Line Empty Block new Options put Default Code Formatter Constants FORMATTER INSERT NEW LINE IN EMPTY BLOCK Java Core INSERT else new Options put Default Code Formatter Constants FORMATTER INSERT NEW LINE IN EMPTY BLOCK Java Core DO NOT INSERT Object formatter Compact Assignment this options get Java Core FORMATTER COMPACT ASSIGNMENT if formatter Compact Assignment null if Java Core COMPACT equals formatter Compact Assignment new Options put Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE ASSIGNMENT OPERATOR Java Core DO NOT INSERT else new Options put Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE ASSIGNMENT OPERATOR Java Core INSERT if this options get Java Core FORMATTER SPACE CASTEXPRESSION null if Java Core INSERT equals this options get Java Core FORMATTER SPACE CASTEXPRESSION new Options put Default Code Formatter Constants FORMATTER INSERT SPACE AFTER CLOSING PAREN IN CAST Java Core INSERT else new Options put Default Code Formatter Constants FORMATTER INSERT SPACE AFTER CLOSING PAREN IN CAST Java Core DO NOT INSERT new Options put Default Code Formatter Constants FORMATTER TAB CHAR this options get Java Core FORMATTER TAB CHAR new Options put Default Code Formatter Constants FORMATTER TAB SIZE this options get Java Core FORMATTER TAB SIZE new Options put Default Code Formatter Constants FORMATTER LINE SPLIT this options get Java Core FORMATTER LINE SPLIT new Options put Default Code Formatter Constants FORMATTER BRACE POSITION FOR ARRAY INITIALIZER Default Code Formatter Constants END OF LINE new Options put Default Code Formatter Constants FORMATTER CONTINUATION INDENTATION 1 NON NLS 1 new Options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR PARAMETERS IN METHOD DECLARATION Default Code Formatter Constants create Alignment Value false Default Code Formatter Constants WRAP ONE PER LINE Default Code Formatter Constants INDENT BY ONE NON NLS 1 new Options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR PARAMETERS IN CONSTRUCTOR DECLARATION Default Code Formatter Constants create Alignment Value false Default Code Formatter Constants WRAP ONE PER LINE Default Code Formatter Constants INDENT BY ONE NON NLS 1 new Options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR ARGUMENTS IN ALLOCATION EXPRESSION Default Code Formatter Constants create Alignment Value false Default Code Formatter Constants WRAP ONE PER LINE Default Code Formatter Constants INDENT BY ONE NON NLS 1 new Options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR ARGUMENTS IN EXPLICIT CONSTRUCTOR CALL Default Code Formatter Constants create Alignment Value false Default Code Formatter Constants WRAP ONE PER LINE Default Code Formatter Constants INDENT BY ONE NON NLS 1 new Options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR ARGUMENTS IN METHOD INVOCATION Default Code Formatter Constants create Alignment Value false Default Code Formatter Constants WRAP ONE PER LINE Default Code Formatter Constants INDENT BY ONE NON NLS 1 new Options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR ARGUMENTS IN QUALIFIED ALLOCATION EXPRESSION Default Code Formatter Constants create Alignment Value false Default Code Formatter Constants WRAP ONE PER LINE Default Code Formatter Constants INDENT BY ONE NON NLS 1 new Options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR THROWS CLAUSE IN METHOD DECLARATION Default Code Formatter Constants create Alignment Value false Default Code Formatter Constants WRAP ONE PER LINE Default Code Formatter Constants INDENT BY ONE NON NLS 1 new Options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR MULTIPLE FIELDS Default Code Formatter Constants create Alignment Value false Default Code Formatter Constants WRAP ONE PER LINE Default Code Formatter Constants INDENT BY ONE NON NLS 1 new Options put Default Code Formatter Constants FORMATTER ALIGNMENT FOR BINARY EXPRESSION Default Code Formatter Constants create Alignment Value false Default Code Formatter Constants WRAP ONE PER LINE Default Code Formatter Constants INDENT BY ONE NON NLS 1 new Options put Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE OPENING BRACE IN ARRAY INITIALIZER Java Core INSERT new Options put Default Code Formatter Constants FORMATTER INSERT SPACE AFTER OPENING BRACE IN ARRAY INITIALIZER Java Core INSERT new Options put Default Code Formatter Constants FORMATTER INSERT SPACE BEFORE CLOSING BRACE IN ARRAY INITIALIZER Java Core INSERT Default Code Formatter default Code Formatter new Default Code Formatter new Options Text Edit text Edit default Code Formatter format org eclipse jdt core formatter Code Formatter K UNKNOWN string 0 string length indent Level line Separator if positions null text Edit null update positions Text Edit edits text Edit get Children int text Edit Size edits length int edits Index 0 int delta 0 int original Source Length string length 1 if text Edit Size 0 for int i 0 max positions length i max i int current Position positions i if current Position original Source Length current Position original Source Length Replace Edit current Edit Replace Edit edits edits Index while current Edit get Offset current Position delta current Edit get Text length current Edit get Length edits Index if edits Index text Edit Size current Edit Replace Edit edits edits Index else break positions i current Position delta return org eclipse jdt internal core util Util edited String string text Edit  indentLevel lineSeparator newOptions DefaultCodeFormatterConstants getEclipse21Settings formatterNewLineOpeningBrace JavaCore FORMATTER_NEWLINE_OPENING_BRACE formatterNewLineOpeningBrace JavaCore formatterNewLineOpeningBrace newOptions DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_ANONYMOUS_TYPE_DECLARATION DefaultCodeFormatterConstants NEXT_LINE newOptions DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_BLOCK DefaultCodeFormatterConstants NEXT_LINE newOptions DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_CONSTRUCTOR_DECLARATION DefaultCodeFormatterConstants NEXT_LINE newOptions DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION DefaultCodeFormatterConstants NEXT_LINE newOptions DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_SWITCH DefaultCodeFormatterConstants NEXT_LINE newOptions DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION DefaultCodeFormatterConstants NEXT_LINE newOptions DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_ANONYMOUS_TYPE_DECLARATION DefaultCodeFormatterConstants END_OF_LINE newOptions DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_BLOCK DefaultCodeFormatterConstants END_OF_LINE newOptions DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_CONSTRUCTOR_DECLARATION DefaultCodeFormatterConstants END_OF_LINE newOptions DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION DefaultCodeFormatterConstants END_OF_LINE newOptions DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_SWITCH DefaultCodeFormatterConstants END_OF_LINE newOptions DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION DefaultCodeFormatterConstants END_OF_LINE formatterNewLineControl JavaCore FORMATTER_NEWLINE_CONTROL formatterNewLineControl JavaCore formatterNewLineControl newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_BEFORE_CATCH_IN_TRY_STATEMENT JavaCore newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_BEFORE_ELSE_IN_IF_STATEMENT JavaCore newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_BEFORE_FINALLY_IN_TRY_STATEMENT JavaCore newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_BEFORE_WHILE_IN_DO_STATEMENT JavaCore newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_BEFORE_CATCH_IN_TRY_STATEMENT JavaCore DO_NOT_INSERT newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_BEFORE_ELSE_IN_IF_STATEMENT JavaCore DO_NOT_INSERT newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_BEFORE_FINALLY_IN_TRY_STATEMENT JavaCore DO_NOT_INSERT newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_BEFORE_WHILE_IN_DO_STATEMENT JavaCore DO_NOT_INSERT formatterClearBlankLines JavaCore FORMATTER_CLEAR_BLANK_LINES formatterClearBlankLines JavaCore PRESERVE_ONE formatterClearBlankLines newOptions DefaultCodeFormatterConstants FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE newOptions DefaultCodeFormatterConstants FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE formatterNewLineElseIf JavaCore FORMATTER_NEWLINE_ELSE_IF formatterNewLineElseIf JavaCore formatterNewLineElseIf newOptions DefaultCodeFormatterConstants FORMATTER_COMPACT_ELSE_IF DefaultCodeFormatterConstants newOptions DefaultCodeFormatterConstants FORMATTER_COMPACT_ELSE_IF DefaultCodeFormatterConstants formatterNewLineEmptyBlock JavaCore FORMATTER_NEWLINE_EMPTY_BLOCK formatterNewLineEmptyBlock JavaCore formatterNewLineEmptyBlock newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_IN_EMPTY_BLOCK JavaCore newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_NEW_LINE_IN_EMPTY_BLOCK JavaCore DO_NOT_INSERT formatterCompactAssignment JavaCore FORMATTER_COMPACT_ASSIGNMENT formatterCompactAssignment JavaCore formatterCompactAssignment newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_ASSIGNMENT_OPERATOR JavaCore DO_NOT_INSERT newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_ASSIGNMENT_OPERATOR JavaCore JavaCore FORMATTER_SPACE_CASTEXPRESSION JavaCore JavaCore FORMATTER_SPACE_CASTEXPRESSION newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_AFTER_CLOSING_PAREN_IN_CAST JavaCore newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_AFTER_CLOSING_PAREN_IN_CAST JavaCore DO_NOT_INSERT newOptions DefaultCodeFormatterConstants FORMATTER_TAB_CHAR JavaCore FORMATTER_TAB_CHAR newOptions DefaultCodeFormatterConstants FORMATTER_TAB_SIZE JavaCore FORMATTER_TAB_SIZE newOptions DefaultCodeFormatterConstants FORMATTER_LINE_SPLIT JavaCore FORMATTER_LINE_SPLIT newOptions DefaultCodeFormatterConstants FORMATTER_BRACE_POSITION_FOR_ARRAY_INITIALIZER DefaultCodeFormatterConstants END_OF_LINE newOptions DefaultCodeFormatterConstants FORMATTER_CONTINUATION_INDENTATION newOptions DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION DefaultCodeFormatterConstants createAlignmentValue DefaultCodeFormatterConstants WRAP_ONE_PER_LINE DefaultCodeFormatterConstants INDENT_BY_ONE newOptions DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_CONSTRUCTOR_DECLARATION DefaultCodeFormatterConstants createAlignmentValue DefaultCodeFormatterConstants WRAP_ONE_PER_LINE DefaultCodeFormatterConstants INDENT_BY_ONE newOptions DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ALLOCATION_EXPRESSION DefaultCodeFormatterConstants createAlignmentValue DefaultCodeFormatterConstants WRAP_ONE_PER_LINE DefaultCodeFormatterConstants INDENT_BY_ONE newOptions DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_EXPLICIT_CONSTRUCTOR_CALL DefaultCodeFormatterConstants createAlignmentValue DefaultCodeFormatterConstants WRAP_ONE_PER_LINE DefaultCodeFormatterConstants INDENT_BY_ONE newOptions DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION DefaultCodeFormatterConstants createAlignmentValue DefaultCodeFormatterConstants WRAP_ONE_PER_LINE DefaultCodeFormatterConstants INDENT_BY_ONE newOptions DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_QUALIFIED_ALLOCATION_EXPRESSION DefaultCodeFormatterConstants createAlignmentValue DefaultCodeFormatterConstants WRAP_ONE_PER_LINE DefaultCodeFormatterConstants INDENT_BY_ONE newOptions DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_THROWS_CLAUSE_IN_METHOD_DECLARATION DefaultCodeFormatterConstants createAlignmentValue DefaultCodeFormatterConstants WRAP_ONE_PER_LINE DefaultCodeFormatterConstants INDENT_BY_ONE newOptions DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_MULTIPLE_FIELDS DefaultCodeFormatterConstants createAlignmentValue DefaultCodeFormatterConstants WRAP_ONE_PER_LINE DefaultCodeFormatterConstants INDENT_BY_ONE newOptions DefaultCodeFormatterConstants FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION DefaultCodeFormatterConstants createAlignmentValue DefaultCodeFormatterConstants WRAP_ONE_PER_LINE DefaultCodeFormatterConstants INDENT_BY_ONE newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_ARRAY_INITIALIZER JavaCore newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER JavaCore newOptions DefaultCodeFormatterConstants FORMATTER_INSERT_SPACE_BEFORE_CLOSING_BRACE_IN_ARRAY_INITIALIZER JavaCore DefaultCodeFormatter defaultCodeFormatter DefaultCodeFormatter newOptions TextEdit textEdit defaultCodeFormatter CodeFormatter K_UNKNOWN indentLevel lineSeparator textEdit TextEdit textEdit getChildren textEditSize editsIndex originalSourceLength textEditSize currentPosition currentPosition originalSourceLength currentPosition originalSourceLength ReplaceEdit currentEdit ReplaceEdit editsIndex currentEdit getOffset currentPosition currentEdit getText currentEdit getLength editsIndex editsIndex textEditSize currentEdit ReplaceEdit editsIndex currentPosition editedString textEdit

Optimized Replace Edit int offset int length String replacement this offset offset this length length this replacement replacement  OptimizedReplaceEdit
public String to String return this offset length this length this replacement NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4  toString

Scribe Code Formatter Visitor formatter Map settings int offset int length Code Snippet Parsing Util code Snippet Parsing Util if settings null Object assert Mode Setting settings get Java Core COMPILER SOURCE if assert Mode Setting null this scanner new Scanner true true false nls Java Core VERSION 1 4 equals assert Mode Setting Class File Constants JDK1 4 Class File Constants JDK1 3 source Level null task Tags null task Priorities true task Case Sensitive else this scanner new Scanner true true false nls Class File Constants JDK1 3 source Level null task Tags null task Priorities true task Case Sensitive else this scanner new Scanner true true false nls Class File Constants JDK1 3 source Level null task Tags null task Priorities true task Case Sensitive this formatter formatter this page Width formatter preferences page width this tab Size formatter preferences tab size this use Tab formatter preferences use tab this filling Space formatter preferences filling space set Line Separator And Identation Level formatter preferences this text Region Start offset this text Region End offset length 1 if code Snippet Parsing Util null final Recorded Parsing Information information code Snippet Parsing Util recorded Parsing Information if information null this line Ends information line Ends this comment Positions information comment Positions reset  CodeFormatterVisitor CodeSnippetParsingUtil codeSnippetParsingUtil assertModeSetting JavaCore COMPILER_SOURCE assertModeSetting JavaCore VERSION_1_4 assertModeSetting ClassFileConstants JDK1_4 ClassFileConstants JDK1_3 sourceLevel taskTags taskPriorities taskCaseSensitive ClassFileConstants JDK1_3 sourceLevel taskTags taskPriorities taskCaseSensitive ClassFileConstants JDK1_3 sourceLevel taskTags taskPriorities taskCaseSensitive pageWidth page_width tabSize tab_size useTab use_tab fillingSpace filling_space setLineSeparatorAndIdentationLevel textRegionStart textRegionEnd codeSnippetParsingUtil RecordedParsingInformation codeSnippetParsingUtil recordedParsingInformation lineEnds lineEnds commentPositions commentPositions
private final void add Delete Edit int start int end if this edits length this edits Index resize resize add Optimized Replace Edit start end start 1 EMPTY STRING NON NLS 1  addDeleteEdit editsIndex addOptimizedReplaceEdit EMPTY_STRING
private final void add Insert Edit int insert Position String inserted String if this edits length this edits Index resize resize add Optimized Replace Edit insert Position 0 inserted String  addInsertEdit insertPosition insertedString editsIndex addOptimizedReplaceEdit insertPosition insertedString
private final void add Optimized Replace Edit int offset int length String replacement if this edits Index 0 try to merge last two edits final Optimized Replace Edit previous this edits this edits Index 1 final int previous Offset previous offset final int previous Length previous length final int end Offset Of Previous Edit previous Offset previous Length final int replacement Length replacement length final String previous Replacement previous replacement final int previous Replacement Length previous Replacement length if previous Offset offset previous Length length replacement Length 0 previous Replacement Length 0 if this current Alignment null final Location location this current Alignment location if location edits Index this edits Index location edits Index location text Edit previous this edits Index return if end Offset Of Previous Edit offset if length 0 if replacement Length 0 this edits this edits Index 1 new Optimized Replace Edit previous Offset previous Length length previous Replacement replacement else if previous Length length previous Replacement Length check the characters If they are identical we can get rid of the previous edit boolean can Be Removed true loop for int i previous Offset i previous Offset previous Replacement Length i if scanner source i previous Replacement char At i previous Offset this edits this edits Index 1 new Optimized Replace Edit previous Offset previous Replacement Length previous Replacement can Be Removed false break loop if can Be Removed if this current Alignment null final Location location this current Alignment location if location edits Index this edits Index location edits Index location text Edit previous this edits Index else this edits this edits Index 1 new Optimized Replace Edit previous Offset previous Length length previous Replacement else if replacement Length 0 this edits this edits Index 1 new Optimized Replace Edit previous Offset previous Length previous Replacement replacement else this edits this edits Index new Optimized Replace Edit offset length replacement else this edits this edits Index new Optimized Replace Edit offset length replacement  addOptimizedReplaceEdit editsIndex OptimizedReplaceEdit editsIndex previousOffset previousLength endOffsetOfPreviousEdit previousOffset previousLength replacementLength previousReplacement previousReplacementLength previousReplacement previousOffset previousLength replacementLength previousReplacementLength currentAlignment currentAlignment editsIndex editsIndex editsIndex textEdit editsIndex endOffsetOfPreviousEdit replacementLength editsIndex OptimizedReplaceEdit previousOffset previousLength previousReplacement previousLength previousReplacementLength canBeRemoved previousOffset previousOffset previousReplacementLength previousReplacement charAt previousOffset editsIndex OptimizedReplaceEdit previousOffset previousReplacementLength previousReplacement canBeRemoved canBeRemoved currentAlignment currentAlignment editsIndex editsIndex editsIndex textEdit editsIndex editsIndex OptimizedReplaceEdit previousOffset previousLength previousReplacement replacementLength editsIndex OptimizedReplaceEdit previousOffset previousLength previousReplacement editsIndex OptimizedReplaceEdit editsIndex OptimizedReplaceEdit
private final void add Replace Edit int start int end String replacement if this edits length this edits Index resize resize add Optimized Replace Edit start end start 1 replacement  addReplaceEdit editsIndex addOptimizedReplaceEdit
public void align Fragment Alignment alignment int fragment Index alignment fragment Index fragment Index alignment check Column alignment perform Fragment Effect  alignFragment fragmentIndex fragmentIndex fragmentIndex checkColumn performFragmentEffect
public void checkNLS Tag int source Start if hasNLS Tag source Start this nls Tag Counter  checkNLSTag sourceStart hasNLSTag sourceStart nlsTagCounter
public void consume Next Token print Comment try this current Token this scanner get Next Token add Delete Edit this scanner get Current Token Start Position this scanner get Current Token End Position catch Invalid Input Exception e throw new Abort Formatting e  consumeNextToken printComment currentToken getNextToken addDeleteEdit getCurrentTokenStartPosition getCurrentTokenEndPosition InvalidInputException AbortFormatting
public Alignment create Alignment String name int mode int count int source Restart return create Alignment name mode Alignment R INNERMOST count source Restart  createAlignment sourceRestart createAlignment R_INNERMOST sourceRestart
public Alignment create Alignment String name int mode int count int source Restart boolean adjust return create Alignment name mode Alignment R INNERMOST count source Restart adjust  createAlignment sourceRestart createAlignment R_INNERMOST sourceRestart
public Alignment create Alignment String name int mode int tie Break Rule int count int source Restart return create Alignment name mode tie Break Rule count source Restart this formatter preferences continuation indentation false  createAlignment tieBreakRule sourceRestart createAlignment tieBreakRule sourceRestart continuation_indentation
public Alignment create Alignment String name int mode int count int source Restart int continuation Indent boolean adjust return create Alignment name mode Alignment R INNERMOST count source Restart continuation Indent adjust  createAlignment sourceRestart continuationIndent createAlignment R_INNERMOST sourceRestart continuationIndent
public Alignment create Alignment String name int mode int tie Break Rule int count int source Restart int continuation Indent boolean adjust Alignment alignment new Alignment name mode tie Break Rule this count source Restart continuation Indent adjust break indentation if adjust this member Alignment null Alignment current this member Alignment while current enclosing null current current enclosing if current mode Alignment M MULTICOLUMN 0 final int indent Size this use Tab 1 this tab Size switch current chunk Kind case Alignment CHUNK METHOD case Alignment CHUNK TYPE if mode Alignment M INDENT BY ONE 0 alignment break Indentation Level this indentation Level indent Size else alignment break Indentation Level this indentation Level continuation Indent indent Size alignment update break case Alignment CHUNK FIELD if mode Alignment M INDENT BY ONE 0 alignment break Indentation Level current original Indentation Level indent Size else alignment break Indentation Level current original Indentation Level continuation Indent indent Size alignment update break else switch current mode Alignment SPLIT MASK case Alignment M COMPACT SPLIT case Alignment M COMPACT FIRST BREAK SPLIT case Alignment M NEXT PER LINE SPLIT case Alignment M NEXT SHIFTED SPLIT case Alignment M ONE PER LINE SPLIT final int indent Size this use Tab 1 this tab Size switch current chunk Kind case Alignment CHUNK METHOD case Alignment CHUNK TYPE if mode Alignment M INDENT BY ONE 0 alignment break Indentation Level this indentation Level indent Size else alignment break Indentation Level this indentation Level continuation Indent indent Size alignment update break case Alignment CHUNK FIELD if mode Alignment M INDENT BY ONE 0 alignment break Indentation Level current original Indentation Level indent Size else alignment break Indentation Level current original Indentation Level continuation Indent indent Size alignment update break break return alignment  createAlignment tieBreakRule sourceRestart continuationIndent tieBreakRule sourceRestart continuationIndent memberAlignment memberAlignment M_MULTICOLUMN indentSize useTab tabSize chunkKind CHUNK_METHOD CHUNK_TYPE M_INDENT_BY_ONE breakIndentationLevel indentationLevel indentSize breakIndentationLevel indentationLevel continuationIndent indentSize CHUNK_FIELD M_INDENT_BY_ONE breakIndentationLevel originalIndentationLevel indentSize breakIndentationLevel originalIndentationLevel continuationIndent indentSize SPLIT_MASK M_COMPACT_SPLIT M_COMPACT_FIRST_BREAK_SPLIT M_NEXT_PER_LINE_SPLIT M_NEXT_SHIFTED_SPLIT M_ONE_PER_LINE_SPLIT indentSize useTab tabSize chunkKind CHUNK_METHOD CHUNK_TYPE M_INDENT_BY_ONE breakIndentationLevel indentationLevel indentSize breakIndentationLevel indentationLevel continuationIndent indentSize CHUNK_FIELD M_INDENT_BY_ONE breakIndentationLevel originalIndentationLevel indentSize breakIndentationLevel originalIndentationLevel continuationIndent indentSize
public Alignment create Member Alignment String name int mode int count int source Restart Alignment m Alignment create Alignment name mode Alignment R INNERMOST count source Restart m Alignment break Indentation Level this indentation Level return m Alignment  createMemberAlignment sourceRestart mAlignment createAlignment R_INNERMOST sourceRestart mAlignment breakIndentationLevel indentationLevel mAlignment
public void enter Alignment Alignment alignment alignment enclosing this current Alignment alignment location last Local Declaration Source Start this formatter last Local Declaration Source Start this current Alignment alignment  enterAlignment currentAlignment lastLocalDeclarationSourceStart lastLocalDeclarationSourceStart currentAlignment
public void enter Member Alignment Alignment alignment alignment enclosing this member Alignment alignment location last Local Declaration Source Start this formatter last Local Declaration Source Start this member Alignment alignment  enterMemberAlignment memberAlignment lastLocalDeclarationSourceStart lastLocalDeclarationSourceStart memberAlignment
public void exit Alignment Alignment alignment boolean discard Alignment Alignment current this current Alignment while current null if current alignment break current current enclosing if current null throw new Abort Formatting could not find matching alignment alignment NON NLS 1 this indentation Level alignment location output Indentation Level this formatter last Local Declaration Source Start alignment location last Local Declaration Source Start if discard Alignment this current Alignment alignment enclosing  exitAlignment discardAlignment currentAlignment AbortFormatting indentationLevel outputIndentationLevel lastLocalDeclarationSourceStart lastLocalDeclarationSourceStart discardAlignment currentAlignment
public void exit Member Alignment Alignment alignment Alignment current this member Alignment while current null if current alignment break current current enclosing if current null throw new Abort Formatting could not find matching alignment alignment NON NLS 1 this indentation Level current location output Indentation Level this formatter last Local Declaration Source Start alignment location last Local Declaration Source Start this member Alignment current enclosing  exitMemberAlignment memberAlignment AbortFormatting indentationLevel outputIndentationLevel lastLocalDeclarationSourceStart lastLocalDeclarationSourceStart memberAlignment
public Alignment get Alignment String name if this current Alignment null return this current Alignment get Alignment name return null  getAlignment currentAlignment currentAlignment getAlignment
Answer actual indentation level based on true column position return int public int get Column Indentation Level if this use Tab return this column 1 this tab Size else return this column 1  getColumnIndentationLevel useTab tabSize
public final int get Comment Index int position if this comment Positions null return 1 int length this comment Positions length if length 0 return 1 int g 0 d length 1 int m 0 while g d m g d 2 int bound this comment Positions m 1 if bound 0 bound bound if bound position g m 1 else if bound position d m 1 else return m return g 1  getCommentIndex commentPositions commentPositions commentPositions
public String get Empty Lines int lines Number if this nls Tag Counter 0 return EMPTY STRING String Buffer buffer new String Buffer if last Number Of New Lines 0 lines Number add an extra line breaks for int i 0 i lines Number i buffer append this line Separator last Number Of New Lines lines Number line lines Number column 1 need Space false else if last Number Of New Lines 1 for int i 0 i lines Number i buffer append this line Separator last Number Of New Lines lines Number line lines Number column 1 need Space false else if last Number Of New Lines 1 lines Number there is no need to add new lines return EMPTY STRING final int real New Line Number lines Number last Number Of New Lines 1 for int i 0 i real New Line Number i buffer append this line Separator last Number Of New Lines real New Line Number line real New Line Number column 1 need Space false return String value Of buffer  getEmptyLines linesNumber nlsTagCounter EMPTY_STRING StringBuffer StringBuffer lastNumberOfNewLines linesNumber linesNumber lineSeparator lastNumberOfNewLines linesNumber linesNumber needSpace lastNumberOfNewLines linesNumber lineSeparator lastNumberOfNewLines linesNumber linesNumber needSpace lastNumberOfNewLines linesNumber EMPTY_STRING realNewLineNumber linesNumber lastNumberOfNewLines realNewLineNumber lineSeparator lastNumberOfNewLines realNewLineNumber realNewLineNumber needSpace valueOf
Answer indentation level based on column estimated position if column is not indented then use indentation Level public int get Indentation Level int some Column if some Column 1 return this indentation Level if this use Tab return some Column 1 this tab Size else return some Column 1  indentationLevel getIndentationLevel someColumn someColumn indentationLevel useTab someColumn tabSize someColumn
public Optimized Replace Edit get Last Edit if this edits Index 0 return this edits this edits Index 1 return null  OptimizedReplaceEdit getLastEdit editsIndex editsIndex
public final int get Line End int line Number if this line Ends null return 1 if line Number this line Ends length 1 return this scanner End Position if line Number 0 return 1 return this line Ends line Number 1 next line start one character behind the line End of the previous line  getLineEnd lineNumber lineEnds lineNumber lineEnds scannerEndPosition lineNumber lineEnds lineNumber lineEnd
Alignment get Member Alignment return this member Alignment  getMemberAlignment memberAlignment
public String get New Line if this nls Tag Counter 0 return EMPTY STRING if last Number Of New Lines 1 column 1 ensure that the scribe is at the beginning of a new line return EMPTY STRING line last Number Of New Lines 1 column 1 need Space false return this line Separator  getNewLine nlsTagCounter EMPTY_STRING lastNumberOfNewLines EMPTY_STRING lastNumberOfNewLines needSpace lineSeparator
Answer next indentation level based on column estimated position if column is not indented then use indentation Level public int get Next Indentation Level int some Column if some Column 1 return this indentation Level if this use Tab int rem some Column 1 this tab Size round to superior return rem 0 some Column 1 this tab Size some Column 1 this tab Size 1 else return some Column 1  indentationLevel getNextIndentationLevel someColumn someColumn indentationLevel useTab someColumn tabSize someColumn tabSize someColumn tabSize someColumn
private String get Preserve Empty Lines int count if count 0 if this formatter preferences number of empty lines to preserve 0 int lines To Preserve Math min count this formatter preferences number of empty lines to preserve return this get Empty Lines lines To Preserve else return get New Line return EMPTY STRING  getPreserveEmptyLines number_of_empty_lines_to_preserve linesToPreserve number_of_empty_lines_to_preserve getEmptyLines linesToPreserve getNewLine EMPTY_STRING
public Text Edit get Root Edit Multi Text Edit edit null int length this text Region End this text Region Start 1 if this text Region Start 0 if length 0 edit new Multi Text Edit 0 0 else edit new Multi Text Edit 0 this text Region End 1 else edit new Multi Text Edit this text Region Start this text Region End this text Region Start 1 for int i 0 max this edits Index i max i Optimized Replace Edit current Edit edits i if is Valid Edit current Edit edit add Child new Replace Edit current Edit offset current Edit length current Edit replacement this edits null return edit  TextEdit getRootEdit MultiTextEdit textRegionEnd textRegionStart textRegionStart MultiTextEdit MultiTextEdit textRegionEnd MultiTextEdit textRegionStart textRegionEnd textRegionStart editsIndex OptimizedReplaceEdit currentEdit isValidEdit currentEdit addChild ReplaceEdit currentEdit currentEdit currentEdit
public void handle Line Too Long search for closest breakable alignment using tiebreak rules look for outermost breakable one int relative Depth 0 outer Most Depth 1 Alignment target Alignment this current Alignment while target Alignment null if target Alignment tie Break Rule Alignment R OUTERMOST target Alignment could Break outer Most Depth relative Depth target Alignment target Alignment enclosing relative Depth if outer Most Depth 0 throw new Alignment Exception Alignment Exception LINE TOO LONG outer Most Depth look for innermost breakable one relative Depth 0 target Alignment this current Alignment while target Alignment null if target Alignment could Break throw new Alignment Exception Alignment Exception LINE TOO LONG relative Depth target Alignment target Alignment enclosing relative Depth did not find any breakable location proceed  handleLineTooLong relativeDepth outerMostDepth targetAlignment currentAlignment targetAlignment targetAlignment tieBreakRule R_OUTERMOST targetAlignment couldBreak outerMostDepth relativeDepth targetAlignment targetAlignment relativeDepth outerMostDepth AlignmentException AlignmentException LINE_TOO_LONG outerMostDepth relativeDepth targetAlignment currentAlignment targetAlignment targetAlignment couldBreak AlignmentException AlignmentException LINE_TOO_LONG relativeDepth targetAlignment targetAlignment relativeDepth
private boolean hasNLS Tag int source Start search the last comment where comment End current line End int index Arrays binary Search this line Ends source Start int current Line End this get Line End index if current Line End 1 int comment Index get Comment Index current Line End if comment Index 0 comment Index comment Index 2 if comment Index 0 comment Index this comment Positions length int start this comment Positions comment Index 0 if start 0 start start check that we are on the same line int line Index For Comment Arrays binary Search this line Ends start if line Index For Comment index return index Of Scanner TAG PREFIX to Char Array this scanner source start current Line End 1 return false  hasNLSTag sourceStart commentEnd lineEnd binarySearch lineEnds sourceStart currentLineEnd getLineEnd currentLineEnd commentIndex getCommentIndex currentLineEnd commentIndex commentIndex commentIndex commentIndex commentIndex commentPositions commentPositions commentIndex lineIndexForComment binarySearch lineEnds lineIndexForComment indexOf TAG_PREFIX toCharArray currentLineEnd
public void indent if this use Tab this indentation Level else this indentation Level tab Size  useTab indentationLevel indentationLevel tabSize
private int index Of char to Be Found char source int start int end if to Be Found null source null throw new Illegal Argument Exception int to Be Found Length to Be Found length if end start end start 1 to Be Found Length return 1 int index In Source 0 for int i start i end i if source i to Be Found index In Source int j i 1 index In Source loop for j end index In Source to Be Found Length j if to Be Found index In Source source j break loop index In Source if j i to Be Found Length return i index In Source 0 return 1  indexOf toBeFound toBeFound IllegalArgumentException toBeFoundLength toBeFound toBeFoundLength indexInSource toBeFound indexInSource indexInSource indexInSource toBeFoundLength toBeFound indexInSource indexInSource toBeFoundLength indexInSource
param compilation Unit Source public void initialize Scanner char compilation Unit Source this scanner set Source compilation Unit Source this scanner End Position compilation Unit Source length this scanner reset To 0 this scanner End Position this edits new Optimized Replace Edit INITIAL SIZE  compilationUnitSource initializeScanner compilationUnitSource setSource compilationUnitSource scannerEndPosition compilationUnitSource resetTo scannerEndPosition OptimizedReplaceEdit INITIAL_SIZE
private boolean is Valid Edit Optimized Replace Edit edit final int edit Length edit length final int edit Replacement Length edit replacement length final int edit Offset edit offset if edit Length 0 if this text Region Start edit Offset edit Offset edit Length 1 this text Region End if edit Replacement Length 0 edit Length edit Replacement Length for int i edit Offset max edit Offset edit Length i max i if scanner source i edit replacement char At i edit Offset return true return false else return true else if edit Offset edit Length this text Region Start int i edit Offset for int max edit Offset edit Length i max i int replacement String Index i edit Offset if replacement String Index edit Replacement Length scanner source i edit replacement char At replacement String Index break if i edit Offset edit Replacement Length i edit Offset edit Length 1 edit offset text Region Start edit length 0 edit replacement edit replacement substring i edit Offset return true else if this text Region Start edit Offset edit Offset this text Region End return true return false  isValidEdit OptimizedReplaceEdit editLength editReplacementLength editOffset editLength textRegionStart editOffset editOffset editLength textRegionEnd editReplacementLength editLength editReplacementLength editOffset editOffset editLength charAt editOffset editOffset editLength textRegionStart editOffset editOffset editLength replacementStringIndex editOffset replacementStringIndex editReplacementLength charAt replacementStringIndex editOffset editReplacementLength editOffset editLength textRegionStart editOffset textRegionStart editOffset editOffset textRegionEnd
private void preserve Empty Lines int count int insert Position if count 0 if this formatter preferences number of empty lines to preserve 0 int lines To Preserve Math min count this formatter preferences number of empty lines to preserve this print Empty Lines lines To Preserve insert Position else print New Line insert Position  preserveEmptyLines insertPosition number_of_empty_lines_to_preserve linesToPreserve number_of_empty_lines_to_preserve printEmptyLines linesToPreserve insertPosition printNewLine insertPosition
private void print char s boolean consider Space If Any if check Line Wrapping s length column this page Width handle Line Too Long this last Number Of New Lines 0 print Indentation If Necessary if consider Space If Any this space if this pending Space this add Insert Edit this scanner get Current Token Start Position NON NLS 1 this pending Space false this need Space false column s length need Space true  considerSpaceIfAny checkLineWrapping pageWidth handleLineTooLong lastNumberOfNewLines printIndentationIfNecessary considerSpaceIfAny pendingSpace addInsertEdit getCurrentTokenStartPosition pendingSpace needSpace needSpace
private void print Block Comment char s boolean is Javadoc int current Token Start Position this scanner get Current Token Start Position int current Token End Position this scanner get Current Token End Position 1 this scanner reset To current Token Start Position current Token End Position 1 int current Character boolean is New Line false int start current Token Start Position int next Character Start current Token Start Position print Indentation If Necessary if this pending Space this add Insert Edit current Token Start Position NON NLS 1 this need Space false this pending Space false int previous Start current Token Start Position while next Character Start current Token End Position current Character this scanner get Next Char 1 next Character Start this scanner current Position switch current Character case r start previous Start is New Line true if this scanner get Next Char n current Character n next Character Start this scanner current Position break case n start previous Start is New Line true break default if is New Line if Character is Whitespace char current Character int previous Start Position this scanner current Position while current Character 1 current Character r current Character n Character is Whitespace char current Character previous Start next Character Start previous Start Position this scanner current Position current Character this scanner get Next Char next Character Start this scanner current Position if current Character r current Character n next Character Start previous Start Position this column 1 this line String Buffer buffer new String Buffer buffer append this line Separator print Indentation If Necessary buffer buffer append this filling Space add Replace Edit start previous Start 1 String value Of buffer else this column next Character Start previous Start is New Line false previous Start next Character Start this scanner current Position next Character Start this last Number Of New Lines 0 need Space false this scanner reset To current Token End Position this scanner End Position 1 if is Javadoc print New Line  printBlockComment isJavadoc currentTokenStartPosition getCurrentTokenStartPosition currentTokenEndPosition getCurrentTokenEndPosition resetTo currentTokenStartPosition currentTokenEndPosition currentCharacter isNewLine currentTokenStartPosition nextCharacterStart currentTokenStartPosition printIndentationIfNecessary pendingSpace addInsertEdit currentTokenStartPosition needSpace pendingSpace previousStart currentTokenStartPosition nextCharacterStart currentTokenEndPosition currentCharacter getNextChar nextCharacterStart currentPosition currentCharacter previousStart isNewLine getNextChar currentCharacter nextCharacterStart currentPosition previousStart isNewLine isNewLine isWhitespace currentCharacter previousStartPosition currentPosition currentCharacter currentCharacter currentCharacter isWhitespace currentCharacter previousStart nextCharacterStart previousStartPosition currentPosition currentCharacter getNextChar nextCharacterStart currentPosition currentCharacter currentCharacter nextCharacterStart previousStartPosition StringBuffer StringBuffer lineSeparator printIndentationIfNecessary fillingSpace addReplaceEdit previousStart valueOf nextCharacterStart previousStart isNewLine previousStart nextCharacterStart currentPosition nextCharacterStart lastNumberOfNewLines needSpace resetTo currentTokenEndPosition scannerEndPosition isJavadoc printNewLine
public void print Comment try if we have a space between two tokens we ensure it will be dumped in the formatted string int current Token Start Position this scanner current Position boolean has Comment false boolean has Line Comment false boolean has Whitespace false int count 0 while this current Token this scanner get Next Token Terminal Tokens Token NameEOF switch this current Token case Terminal Tokens Token NameWHITESPACE char white Spaces this scanner get Current Token Source count 0 for int i 0 max white Spaces length i max i switch white Spaces i case r if i 1 max if white Spaces i 1 n i count break case n count if count 0 has Whitespace true add Delete Edit this scanner get Current Token Start Position this scanner get Current Token End Position else if has Comment if count 1 this print New Line this scanner get Current Token Start Position else preserve Empty Lines count 1 this scanner get Current Token Start Position add Delete Edit this scanner get Current Token Start Position this scanner get Current Token End Position else if has Line Comment this preserve Empty Lines count this scanner get Current Token Start Position add Delete Edit this scanner get Current Token Start Position this scanner get Current Token End Position else if count 0 this formatter preferences number of empty lines to preserve 0 add Replace Edit this scanner get Current Token Start Position this scanner get Current Token End Position this get Preserve Empty Lines count 1 else add Delete Edit this scanner get Current Token Start Position this scanner get Current Token End Position current Token Start Position this scanner current Position break case Terminal Tokens TokenNameCOMMENT LINE if count 1 if count 1 preserve Empty Lines count 1 this scanner get Current Token Start Position else if count 1 print New Line this scanner get Current Token Start Position else if has Whitespace space has Whitespace false this print Comment Line this scanner get Raw Token Source current Token Start Position this scanner current Position has Line Comment true count 0 break case Terminal Tokens TokenNameCOMMENT BLOCK if count 1 if count 1 preserve Empty Lines count 1 this scanner get Current Token Start Position else if count 1 print New Line this scanner get Current Token Start Position else if has Whitespace space has Whitespace false this print Block Comment this scanner get Raw Token Source false current Token Start Position this scanner current Position has Line Comment false has Comment true count 0 break case Terminal Tokens TokenNameCOMMENT JAVADOC if count 1 if count 1 preserve Empty Lines count 1 this scanner get Current Token Start Position else if count 1 print New Line this scanner get Current Token Start Position else if has Whitespace space has Whitespace false this print Block Comment this scanner get Raw Token Source true current Token Start Position this scanner current Position has Line Comment false has Comment true count 0 break default step back one token this scanner reset To current Token Start Position this scanner End Position 1 return catch Invalid Input Exception e throw new Abort Formatting e  printComment currentTokenStartPosition currentPosition hasComment hasLineComment hasWhitespace currentToken getNextToken TerminalTokens TokenNameEOF currentToken TerminalTokens TokenNameWHITESPACE whiteSpaces getCurrentTokenSource whiteSpaces whiteSpaces whiteSpaces hasWhitespace addDeleteEdit getCurrentTokenStartPosition getCurrentTokenEndPosition hasComment printNewLine getCurrentTokenStartPosition preserveEmptyLines getCurrentTokenStartPosition addDeleteEdit getCurrentTokenStartPosition getCurrentTokenEndPosition hasLineComment preserveEmptyLines getCurrentTokenStartPosition addDeleteEdit getCurrentTokenStartPosition getCurrentTokenEndPosition number_of_empty_lines_to_preserve addReplaceEdit getCurrentTokenStartPosition getCurrentTokenEndPosition getPreserveEmptyLines addDeleteEdit getCurrentTokenStartPosition getCurrentTokenEndPosition currentTokenStartPosition currentPosition TerminalTokens TokenNameCOMMENT_LINE preserveEmptyLines getCurrentTokenStartPosition printNewLine getCurrentTokenStartPosition hasWhitespace hasWhitespace printCommentLine getRawTokenSource currentTokenStartPosition currentPosition hasLineComment TerminalTokens TokenNameCOMMENT_BLOCK preserveEmptyLines getCurrentTokenStartPosition printNewLine getCurrentTokenStartPosition hasWhitespace hasWhitespace printBlockComment getRawTokenSource currentTokenStartPosition currentPosition hasLineComment hasComment TerminalTokens TokenNameCOMMENT_JAVADOC preserveEmptyLines getCurrentTokenStartPosition printNewLine getCurrentTokenStartPosition hasWhitespace hasWhitespace printBlockComment getRawTokenSource currentTokenStartPosition currentPosition hasLineComment hasComment resetTo currentTokenStartPosition scannerEndPosition InvalidInputException AbortFormatting
private void print Comment Line char s int current Token Start Position this scanner get Current Token Start Position int current Token End Position this scanner get Current Token End Position 1 if index Of Scanner TAG PREFIX to Char Array this scanner source current Token Start Position current Token End Position 1 this nls Tag Counter 0 this scanner reset To current Token Start Position current Token End Position 1 int current Character int start current Token Start Position int next Character Start current Token Start Position print Indentation If Necessary if this pending Space this add Insert Edit current Token Start Position NON NLS 1 this need Space false this pending Space false int previous Start current Token Start Position loop while next Character Start current Token End Position current Character this scanner get Next Char 1 next Character Start this scanner current Position switch current Character case r start previous Start break loop case n start previous Start break loop previous Start next Character Start if start current Token Start Position add Replace Edit start current Token End Position 1 line Separator line column 1 need Space false last Number Of New Lines 1 realign to the proper value if this current Alignment null if this member Alignment null select the last alignment if this current Alignment location input Offset this member Alignment location input Offset this indentation Level Math max this indentation Level this current Alignment break Indentation Level else this indentation Level Math max this indentation Level this member Alignment break Indentation Level else this indentation Level Math max this indentation Level this current Alignment break Indentation Level this scanner reset To current Token End Position this scanner End Position 1  printCommentLine currentTokenStartPosition getCurrentTokenStartPosition currentTokenEndPosition getCurrentTokenEndPosition indexOf TAG_PREFIX toCharArray currentTokenStartPosition currentTokenEndPosition nlsTagCounter resetTo currentTokenStartPosition currentTokenEndPosition currentCharacter currentTokenStartPosition nextCharacterStart currentTokenStartPosition printIndentationIfNecessary pendingSpace addInsertEdit currentTokenStartPosition needSpace pendingSpace previousStart currentTokenStartPosition nextCharacterStart currentTokenEndPosition currentCharacter getNextChar nextCharacterStart currentPosition currentCharacter previousStart previousStart previousStart nextCharacterStart currentTokenStartPosition addReplaceEdit currentTokenEndPosition lineSeparator needSpace lastNumberOfNewLines currentAlignment memberAlignment currentAlignment inputOffset memberAlignment inputOffset indentationLevel indentationLevel currentAlignment breakIndentationLevel indentationLevel indentationLevel memberAlignment breakIndentationLevel indentationLevel indentationLevel currentAlignment breakIndentationLevel resetTo currentTokenEndPosition scannerEndPosition
this scanner reset To current Token End Position this scanner End Position 1 public void print Empty Lines int lines Number this print Empty Lines lines Number this scanner get Current Token End Position 1  resetTo currentTokenEndPosition scannerEndPosition printEmptyLines linesNumber printEmptyLines linesNumber getCurrentTokenEndPosition
private void print Empty Lines int lines Number int insert Position if this nls Tag Counter 0 return String Buffer buffer new String Buffer if last Number Of New Lines 0 lines Number add an extra line breaks for int i 0 i lines Number i buffer append this line Separator last Number Of New Lines lines Number line lines Number column 1 need Space false else if last Number Of New Lines 1 for int i 0 i lines Number i buffer append this line Separator last Number Of New Lines lines Number line lines Number column 1 need Space false else if last Number Of New Lines 1 lines Number there is no need to add new lines return final int real New Line Number lines Number last Number Of New Lines 1 for int i 0 i real New Line Number i buffer append this line Separator last Number Of New Lines real New Line Number line real New Line Number column 1 need Space false add Insert Edit insert Position buffer to String  printEmptyLines linesNumber insertPosition nlsTagCounter StringBuffer StringBuffer lastNumberOfNewLines linesNumber linesNumber lineSeparator lastNumberOfNewLines linesNumber linesNumber needSpace lastNumberOfNewLines linesNumber lineSeparator lastNumberOfNewLines linesNumber linesNumber needSpace lastNumberOfNewLines linesNumber realNewLineNumber linesNumber lastNumberOfNewLines realNewLineNumber lineSeparator lastNumberOfNewLines realNewLineNumber realNewLineNumber needSpace addInsertEdit insertPosition toString
private void print Indentation If Necessary int indentation Column this use Tab this indentation Level this tab Size this indentation Level 1 if this column indentation Column String Buffer buffer new String Buffer for int i get Column Indentation Level max this indentation Level i max i if this use Tab this tab buffer else this column buffer append this filling Space this need Space false add Insert Edit this scanner get Current Token Start Position buffer to String this pending Space false  printIndentationIfNecessary indentationColumn useTab indentationLevel tabSize indentationLevel indentationColumn StringBuffer StringBuffer getColumnIndentationLevel indentationLevel useTab fillingSpace needSpace addInsertEdit getCurrentTokenStartPosition toString pendingSpace
private void print Indentation If Necessary String Buffer buffer int indentation Column this use Tab this indentation Level this tab Size this indentation Level 1 if this column indentation Column for int i get Column Indentation Level max this indentation Level i max i if this use Tab this tab buffer else this column buffer append this filling Space this need Space false  printIndentationIfNecessary StringBuffer indentationColumn useTab indentationLevel tabSize indentationLevel indentationColumn getColumnIndentationLevel indentationLevel useTab fillingSpace needSpace
public void print Modifiers try boolean is First Modifier true int current Token Start Position this scanner current Position boolean has Comment false while this current Token this scanner get Next Token Terminal Tokens Token NameEOF switch this current Token case Terminal Tokens Token Namepublic case Terminal Tokens Token Nameprotected case Terminal Tokens Token Nameprivate case Terminal Tokens Token Namestatic case Terminal Tokens Token Nameabstract case Terminal Tokens Token Namefinal case Terminal Tokens Token Namenative case Terminal Tokens Token Namesynchronized case Terminal Tokens Token Nametransient case Terminal Tokens Token Namevolatile this print this scanner get Raw Token Source is First Modifier is First Modifier false current Token Start Position this scanner get Current Token Start Position break case Terminal Tokens TokenNameCOMMENT BLOCK this print Block Comment this scanner get Raw Token Source false current Token Start Position this scanner current Position has Comment true break case Terminal Tokens TokenNameCOMMENT JAVADOC this print Block Comment this scanner get Raw Token Source true current Token Start Position this scanner current Position has Comment true break case Terminal Tokens TokenNameCOMMENT LINE this print Comment Line this scanner get Raw Token Source current Token Start Position this scanner current Position break case Terminal Tokens Token NameWHITESPACE add Delete Edit this scanner get Current Token Start Position this scanner get Current Token End Position int count 0 char white Spaces this scanner get Current Token Source for int i 0 max white Spaces length i max i switch white Spaces i case r if i 1 max if white Spaces i 1 n i count break case n count if count 1 has Comment print New Line current Token Start Position this scanner current Position has Comment false break default step back one token this scanner reset To current Token Start Position this scanner End Position 1 return catch Invalid Input Exception e throw new Abort Formatting e  printModifiers isFirstModifier currentTokenStartPosition currentPosition hasComment currentToken getNextToken TerminalTokens TokenNameEOF currentToken TerminalTokens TokenNamepublic TerminalTokens TokenNameprotected TerminalTokens TokenNameprivate TerminalTokens TokenNamestatic TerminalTokens TokenNameabstract TerminalTokens TokenNamefinal TerminalTokens TokenNamenative TerminalTokens TokenNamesynchronized TerminalTokens TokenNametransient TerminalTokens TokenNamevolatile getRawTokenSource isFirstModifier isFirstModifier currentTokenStartPosition getCurrentTokenStartPosition TerminalTokens TokenNameCOMMENT_BLOCK printBlockComment getRawTokenSource currentTokenStartPosition currentPosition hasComment TerminalTokens TokenNameCOMMENT_JAVADOC printBlockComment getRawTokenSource currentTokenStartPosition currentPosition hasComment TerminalTokens TokenNameCOMMENT_LINE printCommentLine getRawTokenSource currentTokenStartPosition currentPosition TerminalTokens TokenNameWHITESPACE addDeleteEdit getCurrentTokenStartPosition getCurrentTokenEndPosition whiteSpaces getCurrentTokenSource whiteSpaces whiteSpaces whiteSpaces hasComment printNewLine currentTokenStartPosition currentPosition hasComment resetTo currentTokenStartPosition scannerEndPosition InvalidInputException AbortFormatting
public void print New Line if this nls Tag Counter 0 return if last Number Of New Lines 1 column 1 ensure that the scribe is at the beginning of a new line return add Insert Edit this scanner get Current Token End Position 1 this line Separator line last Number Of New Lines 1 column 1 need Space false  printNewLine nlsTagCounter lastNumberOfNewLines addInsertEdit getCurrentTokenEndPosition lineSeparator lastNumberOfNewLines needSpace
public void print New Line int insert Position if this nls Tag Counter 0 return if last Number Of New Lines 1 column 1 ensure that the scribe is at the beginning of a new line return add Insert Edit insert Position this line Separator line last Number Of New Lines 1 column 1 need Space false  printNewLine insertPosition nlsTagCounter lastNumberOfNewLines addInsertEdit insertPosition lineSeparator lastNumberOfNewLines needSpace
public void print Next Token int expected Token Type print Next Token expected Token Type false  printNextToken expectedTokenType printNextToken expectedTokenType
public void print Next Token int expected Token Type boolean consider Space If Any print Comment try this current Token this scanner get Next Token char current Token Source this scanner get Raw Token Source if expected Token Type this current Token throw new Abort Formatting unexpected token type expecting expected Token Type actual this current Token NON NLS 1 NON NLS 2 this print current Token Source consider Space If Any catch Invalid Input Exception e throw new Abort Formatting e  printNextToken expectedTokenType considerSpaceIfAny printComment currentToken getNextToken currentTokenSource getRawTokenSource expectedTokenType currentToken AbortFormatting expectedTokenType currentToken currentTokenSource considerSpaceIfAny InvalidInputException AbortFormatting
public void print Next Token int expected Token Types print Comment try this current Token this scanner get Next Token char current Token Source this scanner get Raw Token Source if Arrays binary Search expected Token Types this current Token 0 String Buffer expectations new String Buffer 5 for int i 0 i expected Token Types length i if i 0 expectations append expectations append expected Token Types i throw new Abort Formatting unexpected token type expecting expectations to String actual this current Token NON NLS 1 NON NLS 2 this print current Token Source false catch Invalid Input Exception e throw new Abort Formatting e  printNextToken expectedTokenTypes printComment currentToken getNextToken currentTokenSource getRawTokenSource binarySearch expectedTokenTypes currentToken StringBuffer StringBuffer expectedTokenTypes expectedTokenTypes AbortFormatting toString currentToken currentTokenSource InvalidInputException AbortFormatting
public void print Qualified Reference int source End int current Token Start Position this scanner current Position try do this print Comment switch this current Token this scanner get Next Token case Terminal Tokens Token NameEOF return case Terminal Tokens Token NameWHITESPACE add Delete Edit this scanner get Current Token Start Position this scanner get Current Token End Position current Token Start Position this scanner current Position break case Terminal Tokens TokenNameCOMMENT BLOCK case Terminal Tokens TokenNameCOMMENT JAVADOC this print Block Comment this scanner get Raw Token Source false current Token Start Position this scanner current Position break case Terminal Tokens TokenNameCOMMENT LINE this print Comment Line this scanner get Raw Token Source current Token Start Position this scanner current Position break case Terminal Tokens Token Name Identifier case Terminal Tokens Token NameDOT this print this scanner get Raw Token Source false current Token Start Position this scanner current Position break default this scanner reset To current Token Start Position this scanner End Position 1 return while this scanner current Position source End catch Invalid Input Exception e throw new Abort Formatting e  printQualifiedReference sourceEnd currentTokenStartPosition currentPosition printComment currentToken getNextToken TerminalTokens TokenNameEOF TerminalTokens TokenNameWHITESPACE addDeleteEdit getCurrentTokenStartPosition getCurrentTokenEndPosition currentTokenStartPosition currentPosition TerminalTokens TokenNameCOMMENT_BLOCK TerminalTokens TokenNameCOMMENT_JAVADOC printBlockComment getRawTokenSource currentTokenStartPosition currentPosition TerminalTokens TokenNameCOMMENT_LINE printCommentLine getRawTokenSource currentTokenStartPosition currentPosition TerminalTokens TokenNameIdentifier TerminalTokens TokenNameDOT getRawTokenSource currentTokenStartPosition currentPosition resetTo currentTokenStartPosition scannerEndPosition currentPosition sourceEnd InvalidInputException AbortFormatting
private void print Rule String Buffer string Buffer for int i 0 i this page Width i if i this tab Size 0 string Buffer append else string Buffer append string Buffer append this line Separator for int i 0 i page Width tab Size i string Buffer append i string Buffer append t  printRule StringBuffer stringBuffer pageWidth tabSize stringBuffer stringBuffer stringBuffer lineSeparator pageWidth tabSize stringBuffer stringBuffer
public void print Trailing Comment try if we have a space between two tokens we ensure it will be dumped in the formatted string int current Token Start Position this scanner current Position boolean has Whitespaces false boolean has Comment false boolean has Line Comment false while this current Token this scanner get Next Token Terminal Tokens Token NameEOF switch this current Token case Terminal Tokens Token NameWHITESPACE int count 0 char white Spaces this scanner get Current Token Source for int i 0 max white Spaces length i max i switch white Spaces i case r if i 1 max if white Spaces i 1 n i count break case n count if has Line Comment if count 1 current Token Start Position this scanner get Current Token Start Position this preserve Empty Lines count current Token Start Position add Delete Edit current Token Start Position this scanner get Current Token End Position this scanner reset To this scanner current Position this scanner End Position 1 return else this scanner reset To current Token Start Position this scanner End Position 1 return else if count 1 if has Comment this print New Line this scanner get Current Token Start Position this scanner reset To current Token Start Position this scanner End Position 1 return else has Whitespaces true current Token Start Position this scanner current Position add Delete Edit this scanner get Current Token Start Position this scanner get Current Token End Position break case Terminal Tokens TokenNameCOMMENT LINE if has Whitespaces space this print Comment Line this scanner get Raw Token Source current Token Start Position this scanner current Position has Line Comment true break case Terminal Tokens TokenNameCOMMENT BLOCK if has Whitespaces space this print Block Comment this scanner get Raw Token Source false current Token Start Position this scanner current Position has Comment true break default step back one token this scanner reset To current Token Start Position this scanner End Position 1 return catch Invalid Input Exception e throw new Abort Formatting e  printTrailingComment currentTokenStartPosition currentPosition hasWhitespaces hasComment hasLineComment currentToken getNextToken TerminalTokens TokenNameEOF currentToken TerminalTokens TokenNameWHITESPACE whiteSpaces getCurrentTokenSource whiteSpaces whiteSpaces whiteSpaces hasLineComment currentTokenStartPosition getCurrentTokenStartPosition preserveEmptyLines currentTokenStartPosition addDeleteEdit currentTokenStartPosition getCurrentTokenEndPosition resetTo currentPosition scannerEndPosition resetTo currentTokenStartPosition scannerEndPosition hasComment printNewLine getCurrentTokenStartPosition resetTo currentTokenStartPosition scannerEndPosition hasWhitespaces currentTokenStartPosition currentPosition addDeleteEdit getCurrentTokenStartPosition getCurrentTokenEndPosition TerminalTokens TokenNameCOMMENT_LINE hasWhitespaces printCommentLine getRawTokenSource currentTokenStartPosition currentPosition hasLineComment TerminalTokens TokenNameCOMMENT_BLOCK hasWhitespaces printBlockComment getRawTokenSource currentTokenStartPosition currentPosition hasComment resetTo currentTokenStartPosition scannerEndPosition InvalidInputException AbortFormatting
void redo Alignment Alignment Exception e if e relative Depth 0 if exception targets a distinct context e relative Depth record fact that current context got traversed this current Alignment this current Alignment enclosing pop current Location throw e rethrow reset scribe scanner to restart at this given location this reset At this current Alignment location this scanner reset To this current Alignment location input Offset this scanner eof Position clean alignment chunk Kind so it will think it is a new chunk again this current Alignment chunk Kind 0  redoAlignment AlignmentException relativeDepth relativeDepth currentAlignment currentAlignment currentLocation resetAt currentAlignment resetTo currentAlignment inputOffset eofPosition chunkKind currentAlignment chunkKind
void redo Member Alignment Alignment Exception e reset scribe scanner to restart at this given location this reset At this member Alignment location this scanner reset To this member Alignment location input Offset this scanner eof Position clean alignment chunk Kind so it will think it is a new chunk again this member Alignment chunk Kind 0  redoMemberAlignment AlignmentException resetAt memberAlignment resetTo memberAlignment inputOffset eofPosition chunkKind memberAlignment chunkKind
public void reset this check Line Wrapping true this line 0 this column 1 this edits Index 0 this nls Tag Counter 0  checkLineWrapping editsIndex nlsTagCounter
private void reset At Location location this line location output Line this column location output Column this indentation Level location output Indentation Level this last Number Of New Lines location last Number Of New Lines this need Space location need Space this pending Space location pending Space this edits Index location edits Index this nls Tag Counter location nls Tag Counter if this edits Index 0 this edits this edits Index 1 location text Edit this formatter last Local Declaration Source Start location last Local Declaration Source Start  resetAt outputLine outputColumn indentationLevel outputIndentationLevel lastNumberOfNewLines lastNumberOfNewLines needSpace needSpace pendingSpace pendingSpace editsIndex editsIndex nlsTagCounter nlsTagCounter editsIndex editsIndex textEdit lastLocalDeclarationSourceStart lastLocalDeclarationSourceStart
private void resize System arraycopy this edits 0 this edits new Optimized Replace Edit this edits Index 2 0 this edits Index  OptimizedReplaceEdit editsIndex editsIndex
public void set Line Separator And Identation Level Default Code Formatter Options preferences this line Separator preferences line separator if this use Tab this indentation Level preferences initial indentation level else this indentation Level preferences initial indentation level this tab Size  setLineSeparatorAndIdentationLevel DefaultCodeFormatterOptions lineSeparator line_separator useTab indentationLevel initial_indentation_level indentationLevel initial_indentation_level tabSize
public void space if this need Space return this last Number Of New Lines 0 this pending Space true this column this need Space false  needSpace lastNumberOfNewLines pendingSpace needSpace
private void tab String Buffer buffer this last Number Of New Lines 0 int complement this tab Size this column 1 this tab Size amount of space if this use Tab buffer append t else for int i 0 i complement i buffer append this filling Space this column complement this need Space false  StringBuffer lastNumberOfNewLines tabSize tabSize useTab fillingSpace needSpace
public String to String String Buffer string Buffer new String Buffer string Buffer append page witdh this page Width use Tab this use Tab tab Size this tab Size NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 append this line Separator append line this line column this column identation Level this indentation Level NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 append this line Separator append need Space this need Space last Number Of New Lines this last Number Of New Lines check Line Wrapping this check Line Wrapping NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 append this line Separator append NON NLS 1 append this line Separator print Rule string Buffer return string Buffer to String  toString StringBuffer stringBuffer StringBuffer stringBuffer pageWidth useTab useTab tabSize tabSize lineSeparator identationLevel indentationLevel lineSeparator needSpace needSpace lastNumberOfNewLines lastNumberOfNewLines checkLineWrapping checkLineWrapping lineSeparator lineSeparator printRule stringBuffer stringBuffer toString
public void un Indent if this use Tab this indentation Level else this indentation Level tab Size  unIndent useTab indentationLevel indentationLevel tabSize

public int compare Object o1 Object o2 String container1 String o1 String container2 String o2 if container1 null container1 NON NLS 1 if container2 null container2 NON NLS 1 return container1 compare To container2  compareTo

public void launch I Launch Configuration configuration String mode I Launch launch I Progress Monitor pm throws Core Exception I Java Project java Project get Java Project configuration if java Project null java Project exists abort J Unit Messages get String J Unit Base Launch Configuration error invalidproject null I Java Launch Configuration Constants ERR NOT A JAVA PROJECT NON NLS 1 NON NLS 2 I Type test Types get Test Types configuration java Project pm if test Types length 0 abort J Unit Messages get String J Unit Base Launch Configuration error notests null I Java Launch Configuration Constants ERR UNSPECIFIED MAIN TYPE NON NLS 1 IVM Install install getVM Install configuration IVM Runner runner install getVM Runner mode if runner null abort Message Format format J Unit Messages get String J Unit Base Launch Configuration error novmrunner new String install get Id null I Java Launch Configuration Constants ERR VM RUNNER DOES NOT EXIST NON NLS 1 int port Socket Util find Free Port VM Runner Configuration run Config launch Types configuration mode test Types port set Default Source Locator launch configuration launch set Attribute PORT ATTR Integer to String port launch set Attribute TESTTYPE ATTR test Types 0 get Handle Identifier runner run run Config launch pm  ILaunchConfiguration ILaunch IProgressMonitor CoreException IJavaProject javaProject getJavaProject javaProject javaProject JUnitMessages getString JUnitBaseLaunchConfiguration IJavaLaunchConfigurationConstants ERR_NOT_A_JAVA_PROJECT IType testTypes getTestTypes javaProject testTypes JUnitMessages getString JUnitBaseLaunchConfiguration IJavaLaunchConfigurationConstants ERR_UNSPECIFIED_MAIN_TYPE IVMInstall getVMInstall IVMRunner getVMRunner MessageFormat JUnitMessages getString JUnitBaseLaunchConfiguration getId IJavaLaunchConfigurationConstants ERR_VM_RUNNER_DOES_NOT_EXIST SocketUtil findFreePort VMRunnerConfiguration runConfig launchTypes testTypes setDefaultSourceLocator setAttribute PORT_ATTR toString setAttribute TESTTYPE_ATTR testTypes getHandleIdentifier runConfig
protected VM Runner Configuration launch Types I Launch Configuration configuration String mode I Type tests int port throws Core Exception File working Dir verify Working Directory configuration String working Dir Name null if working Dir null working Dir Name working Dir get Absolute Path Program VM args String vm Args getVM Arguments configuration Execution Arguments exec Args new Execution Arguments vm Args NON NLS 1 String envp Debug Plugin get Default get Launch Manager get Environment configuration VM Runner Configuration run Config createVM Runner configuration tests port mode run Config setVM Arguments exec Args getVM Arguments Array run Config set Working Directory working Dir Name run Config set Environment envp Map vm Attributes Map getVM Specific Attributes Map configuration run Config setVM Specific Attributes Map vm Attributes Map String bootpath get Bootpath configuration run Config set Boot Class Path bootpath return run Config  VMRunnerConfiguration launchTypes ILaunchConfiguration IType CoreException workingDir verifyWorkingDirectory workingDirName workingDir workingDirName workingDir getAbsolutePath vmArgs getVMArguments ExecutionArguments execArgs ExecutionArguments vmArgs DebugPlugin getDefault getLaunchManager getEnvironment VMRunnerConfiguration runConfig createVMRunner runConfig setVMArguments execArgs getVMArgumentsArray runConfig setWorkingDirectory workingDirName runConfig setEnvironment vmAttributesMap getVMSpecificAttributesMap runConfig setVMSpecificAttributesMap vmAttributesMap getBootpath runConfig setBootClassPath runConfig
public I Type get Test Types I Launch Configuration configuration I Java Project java Project I Progress Monitor pm throws Core Exception String test Type Name configuration get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME String null if pm null pm new Null Progress Monitor String container Handle configuration get Attribute LAUNCH CONTAINER ATTR NON NLS 1 if container Handle length 0 return find Single Test java Project test Type Name else return find Tests In Container container Handle pm  IType getTestTypes ILaunchConfiguration IJavaProject javaProject IProgressMonitor CoreException testTypeName getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME NullProgressMonitor containerHandle getAttribute LAUNCH_CONTAINER_ATTR containerHandle findSingleTest javaProject testTypeName findTestsInContainer containerHandle
inheritdoc param container Handle param pm return private I Type find Tests In Container String container Handle I Progress Monitor pm I Java Element container Java Core create container Handle Set result new Hash Set try Test Search Engine do Find Tests new Object container result pm catch Interrupted Exception e return I Type result to Array new I Type result size  containerHandle IType findTestsInContainer containerHandle IProgressMonitor IJavaElement JavaCore containerHandle HashSet TestSearchEngine doFindTests InterruptedException IType toArray IType
public I Type find Single Test I Java Project java Project String test Name throws Core Exception I Type type null try type find Type java Project test Name catch Java Model Exception jme abort Test type does not exist null I Java Launch Configuration Constants ERR UNSPECIFIED MAIN TYPE NON NLS 1 if type null abort Test type does not exist null I Java Launch Configuration Constants ERR UNSPECIFIED MAIN TYPE NON NLS 1 return new I Type type  IType findSingleTest IJavaProject javaProject testName CoreException IType findType javaProject testName JavaModelException IJavaLaunchConfigurationConstants ERR_UNSPECIFIED_MAIN_TYPE IJavaLaunchConfigurationConstants ERR_UNSPECIFIED_MAIN_TYPE IType
Throws a core exception with the given message and optional exception The exception s status code will indicate an error param message error message param exception cause of the error or code null code exception Core Exception with the given message and underlying exception protected void abort String message Throwable exception int code throws Core Exception throw new Core Exception new Status I Status ERROR J Unit Plugin PLUGIN ID code message exception  CoreException CoreException CoreException IStatus JUnitPlugin PLUGIN_ID
Find the specified fully qualified type name in the specified java project private I Type find Type I Java Project java Project String main Type Name throws Java Model Exception return java Project find Type main Type Name  IType findType IJavaProject javaProject mainTypeName JavaModelException javaProject findType mainTypeName
Override to create a custom VM Runner Configuration for a launch configuration protected abstract VM Runner Configuration createVM Runner I Launch Configuration configuration I Type test Types int port String run Mode throws Core Exception  VMRunnerConfiguration VMRunnerConfiguration createVMRunner ILaunchConfiguration IType testTypes runMode CoreException
protected boolean keep Alive I Launch Configuration config try return config get Attribute ATTR KEEPRUNNING false catch Core Exception e return false  keepAlive ILaunchConfiguration getAttribute ATTR_KEEPRUNNING CoreException

public static final String ID JUNIT APPLICATION org eclipse jdt junit launchconfig NON NLS 1 Add a VM Runner with a class path that includes org eclipse jdt junit plugin In addition it adds the port for the Remote Test Runner as an argument protected VM Runner Configuration createVM Runner I Launch Configuration configuration I Type test Types int port String run Mode throws Core Exception String class Path create Class Path configuration String prog Args get Program Arguments configuration VM Runner Configuration vm Config new VM Runner Configuration org eclipse jdt internal junit runner Remote Test Runner class Path NON NLS 1 String test Name configuration get Attribute J Unit Base Launch Configuration TESTNAME ATTR NON NLS 1 insert the program arguments Vector argv new Vector 10 Execution Arguments exec Args new Execution Arguments prog Args NON NLS 1 String pa exec Args get Program Arguments Array for int i 0 i pa length i argv add pa i argv add version NON NLS 1 argv add 3 NON NLS 1 argv add port NON NLS 1 argv add Integer to String port argv debugging if keep Alive configuration run Mode equals I Launch Manager DEBUG MODE argv add 0 keepalive NON NLS 1 a testname was specified just run the single test if test Name length 0 argv add test NON NLS 1 argv add test Types 0 get Fully Qualified Name test Name NON NLS 1 else if test Types length 1 String file Name create Test Names File test Types argv add test Name File NON NLS 1 argv add file Name else argv add class Names NON NLS 1 for int i 0 i test Types length i argv add test Types i get Fully Qualified Name String args new String argv size argv copy Into args vm Config set Program Arguments args return vm Config  ID_JUNIT_APPLICATION VMRunner RemoteTestRunner VMRunnerConfiguration createVMRunner ILaunchConfiguration IType testTypes runMode CoreException classPath createClassPath progArgs getProgramArguments VMRunnerConfiguration vmConfig VMRunnerConfiguration RemoteTestRunner classPath testName getAttribute JUnitBaseLaunchConfiguration TESTNAME_ATTR ExecutionArguments execArgs ExecutionArguments progArgs execArgs getProgramArgumentsArray toString keepAlive runMode ILaunchManager DEBUG_MODE testName testTypes getFullyQualifiedName testName testTypes fileName createTestNamesFile testTypes testNameFile fileName classNames testTypes testTypes getFullyQualifiedName copyInto vmConfig setProgramArguments vmConfig
private String create Test Names File I Type test Types throws Core Exception try File file File create Temp File test Names txt NON NLS 1 NON NLS 2 file delete On Exit Buffered Writer bw null try bw new Buffered Writer new File Writer file for int i 0 i test Types length i String test Name test Types i get Fully Qualified Name bw write test Name bw new Line finally if bw null bw close return file get Absolute Path catch IO Exception e throw new Core Exception new Status I Status ERROR J Unit Plugin PLUGIN ID I Status ERROR e NON NLS 1  createTestNamesFile IType testTypes CoreException createTempFile testNames deleteOnExit BufferedWriter BufferedWriter FileWriter testTypes testName testTypes getFullyQualifiedName testName newLine getAbsolutePath IOException CoreException IStatus JUnitPlugin PLUGIN_ID IStatus
private String create Class Path I Launch Configuration configuration throws Core Exception URL runtimeURL Platform get Bundle org eclipse jdt junit runtime get Entry NON NLS 1 NON NLS 2 URL url Platform get Bundle J Unit Plugin PLUGIN ID get Entry NON NLS 1 String cp get Classpath configuration String class Path null try if Boot Loader in Development Mode we first try the bin output folder List junit Entries new Array List try junit Entries add Platform as LocalURL new URL url bin get File NON NLS 1 catch IO Exception e3 try junit Entries add Platform as LocalURL new URL url junitsupport jar get File NON NLS 1 catch IO Exception e4 fall through try junit Entries add Platform as LocalURL new URL runtimeURL bin get File NON NLS 1 catch IO Exception e1 try junit Entries add Platform as LocalURL new URL runtimeURL junitruntime jar get File NON NLS 1 catch IO Exception e4 fall through Assert is True junit Entries size 2 Required JA Rs available NON NLS 1 class Path new String cp length junit Entries size Object jea junit Entries to Array System arraycopy cp 0 class Path 0 cp length System arraycopy jea 0 class Path cp length jea length else class Path new String cp length 2 System arraycopy cp 0 class Path 2 cp length class Path 0 Platform as LocalURL new URL url junitsupport jar get File NON NLS 1 class Path 1 Platform as LocalURL new URL runtimeURL junitruntime jar get File NON NLS 1 catch IO Exception e J Unit Plugin log e TODO abort run and inform user return class Path  createClassPath ILaunchConfiguration CoreException getBundle getEntry getBundle JUnitPlugin PLUGIN_ID getEntry getClasspath classPath BootLoader inDevelopmentMode junitEntries ArrayList junitEntries asLocalURL getFile IOException junitEntries asLocalURL getFile IOException junitEntries asLocalURL getFile IOException junitEntries asLocalURL getFile IOException isTrue junitEntries JARs classPath junitEntries junitEntries toArray classPath classPath classPath classPath classPath asLocalURL getFile classPath asLocalURL getFile IOException JUnitPlugin classPath

Returns the current Java element context from which to initialize default settings or code null code if none return Java element context protected I Java Element get Context I Workbench Page page JDI DebugUI Plugin get Active Page if page null I Selection selection page get Selection if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection if ss is Empty Object obj ss get First Element if obj instanceof I Java Element return I Java Element obj if obj instanceof I Resource I Java Element je Java Core create I Resource obj if je null I Project pro I Resource obj get Project je Java Core create pro if je null return je I Editor Part part page get Active Editor if part null I Editor Input input part get Editor Input return I Java Element input get Adapter I Java Element class return null  IJavaElement getContext IWorkbenchPage JDIDebugUIPlugin getActivePage ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection isEmpty getFirstElement IJavaElement IJavaElement IResource IJavaElement JavaCore IResource IProject IResource getProject JavaCore IEditorPart getActiveEditor IEditorInput getEditorInput IJavaElement getAdapter IJavaElement
Set the java project attribute based on the I Java Element protected void initialize Java Project I Java Element java Element I Launch Configuration Working Copy config I Java Project java Project java Element get Java Project String name null if java Project null java Project exists name java Project get Element Name config set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME name  IJavaElement initializeJavaProject IJavaElement javaElement ILaunchConfigurationWorkingCopy IJavaProject javaProject javaElement getJavaProject javaProject javaProject javaProject getElementName setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME
protected void set Button Grid Data Button button Grid Data grid Data new Grid Data button set Layout Data grid Data SWT Util set Button Dimension Hint button  setButtonGridData GridData gridData GridData setLayoutData gridData SWTUtil setButtonDimensionHint

see I Launch Shortcut launch I Editor Part String public void launch I Editor Part editor String mode I Java Element element null I Editor Input input editor get Editor Input element I Java Element input get Adapter I Java Element class if element null search And Launch new Object element mode  ILaunchShortcut IEditorPart IEditorPart IJavaElement IEditorInput getEditorInput IJavaElement getAdapter IJavaElement searchAndLaunch
see I Launch Shortcut launch I Selection String public void launch I Selection selection String mode if selection instanceof I Structured Selection search And Launch I Structured Selection selection to Array mode  ILaunchShortcut ISelection ISelection IStructuredSelection searchAndLaunch IStructuredSelection toArray
protected void search And Launch Object search String mode if search null if search length 0 Message Dialog open Information get Shell J Unit Messages get String Launch Test Action dialog title J Unit Messages get String Launch Test Action message notests NON NLS 1 NON NLS 2 return if search 0 instanceof I Java Element I Java Element element I Java Element search 0 if element get Element Type I Java Element COMPILATION UNIT launch Container element mode return if element get Element Type I Java Element METHOD launch Method I Method element mode return launch a CU or type launch Type search mode  searchAndLaunch MessageDialog openInformation getShell JUnitMessages getString LaunchTestAction JUnitMessages getString LaunchTestAction IJavaElement IJavaElement IJavaElement getElementType IJavaElement COMPILATION_UNIT launchContainer getElementType IJavaElement launchMethod IMethod launchType
protected void launch Type Object search String mode I Type types null try types Test Search Engine find Tests search catch Interrupted Exception e J Unit Plugin log e return catch Invocation Target Exception e J Unit Plugin log e return I Type type null if types length 0 Message Dialog open Information get Shell J Unit Messages get String Launch Test Action dialog title J Unit Messages get String Launch Test Action message notests NON NLS 1 NON NLS 2 else if types length 1 type choose Type types mode else type types 0 if type null launch type mode  launchType IType TestSearchEngine findTests InterruptedException JUnitPlugin InvocationTargetException JUnitPlugin IType MessageDialog openInformation getShell JUnitMessages getString LaunchTestAction JUnitMessages getString LaunchTestAction chooseType
private void launch Container I Java Element container String mode String handle Identifier container get Handle Identifier I Launch Configuration config find Launch Configuration mode container handle Identifier NON NLS 1 NON NLS 1 if config null config create Configuration container get Java Project container get Element Name NON NLS 1 handle Identifier NON NLS 1 launch Configuration mode config  launchContainer IJavaElement handleIdentifier getHandleIdentifier ILaunchConfiguration findLaunchConfiguration handleIdentifier createConfiguration getJavaProject getElementName handleIdentifier launchConfiguration
private void launch I Type type String mode String fully Qualified Name type get Fully Qualified Name I Launch Configuration config find Launch Configuration mode type NON NLS 1 fully Qualified Name NON NLS 1 if config null config create Configuration type get Java Project type get Element Name fully Qualified Name NON NLS 1 NON NLS 1 launch Configuration mode config  IType fullyQualifiedName getFullyQualifiedName ILaunchConfiguration findLaunchConfiguration fullyQualifiedName createConfiguration getJavaProject getElementName fullyQualifiedName launchConfiguration
private void launch Method I Method method String mode I Type declaring Type method get Declaring Type String fully Qualified Name declaring Type get Fully Qualified Name I Launch Configuration config find Launch Configuration mode method NON NLS 1 fully Qualified Name method get Element Name if config null config create Configuration method get Java Project declaring Type get Element Name method get Element Name NON NLS 1 fully Qualified Name NON NLS 1 method get Element Name launch Configuration mode config  launchMethod IMethod IType declaringType getDeclaringType fullyQualifiedName declaringType getFullyQualifiedName ILaunchConfiguration findLaunchConfiguration fullyQualifiedName getElementName createConfiguration getJavaProject declaringType getElementName getElementName fullyQualifiedName getElementName launchConfiguration
protected void launch Configuration String mode I Launch Configuration config if config null DebugUI Tools launch config mode  launchConfiguration ILaunchConfiguration DebugUITools
Prompts the user to select a type return the selected type or code null code if none protected I Type choose Type I Type types String mode Element List Selection Dialog dialog new Element List Selection Dialog get Shell new Java Element Label Provider Java Element Label Provider SHOW POST QUALIFIED dialog set Elements types dialog set Title J Unit Messages get String Launch Test Action dialog title2 NON NLS 1 if mode equals I Launch Manager DEBUG MODE dialog set Message J Unit Messages get String Launch Test Action message select Test To Run NON NLS 1 else dialog set Message J Unit Messages get String Launch Test Action message select Test To Debug NON NLS 1 dialog set Multiple Selection false if dialog open Window OK return I Type dialog get First Result return null  IType chooseType IType ElementListSelectionDialog ElementListSelectionDialog getShell JavaElementLabelProvider JavaElementLabelProvider SHOW_POST_QUALIFIED setElements setTitle JUnitMessages getString LaunchTestAction ILaunchManager DEBUG_MODE setMessage JUnitMessages getString LaunchTestAction selectTestToRun setMessage JUnitMessages getString LaunchTestAction selectTestToDebug setMultipleSelection IType getFirstResult
private I Launch Configuration find Launch Configuration String mode I Java Element element String container String test Class String test Name I Launch Configuration Type config Type getJ Unit Launch Config Type List candidate Configs Collections EMPTY LIST try I Launch Configuration configs get Launch Manager get Launch Configurations config Type candidate Configs new Array List configs length for int i 0 i configs length i I Launch Configuration config configs i if config get Attribute J Unit Base Launch Configuration LAUNCH CONTAINER ATTR equals container NON NLS 1 config get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME equals test Class NON NLS 1 config get Attribute J Unit Base Launch Configuration TESTNAME ATTR equals test Name NON NLS 1 config get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME equals element get Java Project get Element Name NON NLS 1 candidate Configs add config catch Core Exception e J Unit Plugin log e If there are no existing configs associated with the I Type create one If there is exactly one config associated with the I Type return it Otherwise if there is more than one config associated with the I Type prompt the user to choose one int candidate Count candidate Configs size if candidate Count 1 return null else if candidate Count 1 return I Launch Configuration candidate Configs get 0 else Prompt the user to choose a config A null result means the user cancelled the dialog in which case this method returns null since cancelling the dialog should also cancel launching anything I Launch Configuration config choose Configuration candidate Configs mode if config null return config return null  ILaunchConfiguration findLaunchConfiguration IJavaElement testClass testName ILaunchConfigurationType configType getJUnitLaunchConfigType candidateConfigs EMPTY_LIST ILaunchConfiguration getLaunchManager getLaunchConfigurations configType candidateConfigs ArrayList ILaunchConfiguration getAttribute JUnitBaseLaunchConfiguration LAUNCH_CONTAINER_ATTR getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME testClass getAttribute JUnitBaseLaunchConfiguration TESTNAME_ATTR testName getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME getJavaProject getElementName candidateConfigs CoreException JUnitPlugin IType IType IType candidateCount candidateConfigs candidateCount candidateCount ILaunchConfiguration candidateConfigs ILaunchConfiguration chooseConfiguration candidateConfigs
Show a selection dialog that allows the user to choose one of the specified launch configurations Return the chosen config or code null code if the user cancelled the dialog protected I Launch Configuration choose Configuration List config List String mode I Debug Model Presentation label Provider DebugUI Tools new Debug Model Presentation Element List Selection Dialog dialog new Element List Selection Dialog get Shell label Provider dialog set Elements config List to Array dialog set Title J Unit Messages get String Launch Test Action message select Configuration NON NLS 1 if mode equals I Launch Manager DEBUG MODE dialog set Message J Unit Messages get String Launch Test Action message select Debug Configuration NON NLS 1 else dialog set Message J Unit Messages get String Launch Test Action message select Run Configuration NON NLS 1 dialog set Multiple Selection false int result dialog open label Provider dispose if result Window OK return I Launch Configuration dialog get First Result return null  ILaunchConfiguration chooseConfiguration configList IDebugModelPresentation labelProvider DebugUITools newDebugModelPresentation ElementListSelectionDialog ElementListSelectionDialog getShell labelProvider setElements configList toArray setTitle JUnitMessages getString LaunchTestAction selectConfiguration ILaunchManager DEBUG_MODE setMessage JUnitMessages getString LaunchTestAction selectDebugConfiguration setMessage JUnitMessages getString LaunchTestAction selectRunConfiguration setMultipleSelection labelProvider ILaunchConfiguration getFirstResult
protected I Launch Configuration create Configuration I Java Project project String name String main Type String container String test Name I Launch Configuration config null try I Launch Configuration Type config Type getJ Unit Launch Config Type I Launch Configuration Working Copy wc config Type new Instance null get Launch Manager generate Unique Launch Configuration Name From name wc set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME main Type wc set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME project get Element Name wc set Attribute J Unit Base Launch Configuration ATTR KEEPRUNNING false wc set Attribute J Unit Base Launch Configuration LAUNCH CONTAINER ATTR container if test Name length 0 wc set Attribute J Unit Base Launch Configuration TESTNAME ATTR test Name config wc do Save catch Core Exception ce J Unit Plugin log ce return config  ILaunchConfiguration createConfiguration IJavaProject mainType testName ILaunchConfiguration ILaunchConfigurationType configType getJUnitLaunchConfigType ILaunchConfigurationWorkingCopy configType newInstance getLaunchManager generateUniqueLaunchConfigurationNameFrom setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME mainType setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME getElementName setAttribute JUnitBaseLaunchConfiguration ATTR_KEEPRUNNING setAttribute JUnitBaseLaunchConfiguration LAUNCH_CONTAINER_ATTR testName setAttribute JUnitBaseLaunchConfiguration TESTNAME_ATTR testName doSave CoreException JUnitPlugin
Returns the local java launch config type protected I Launch Configuration Type getJ Unit Launch Config Type I Launch Manager lm Debug Plugin get Default get Launch Manager return lm get Launch Configuration Type J Unit Launch Configuration ID JUNIT APPLICATION  ILaunchConfigurationType getJUnitLaunchConfigType ILaunchManager DebugPlugin getDefault getLaunchManager getLaunchConfigurationType JUnitLaunchConfiguration ID_JUNIT_APPLICATION
protected I Launch Manager get Launch Manager return Debug Plugin get Default get Launch Manager  ILaunchManager getLaunchManager DebugPlugin getDefault getLaunchManager
Convenience method to get the window that owns this action s Shell protected Shell get Shell return J Unit Plugin get Active Workbench Shell  getShell JUnitPlugin getActiveWorkbenchShell

see I Launch Configuration Tab create Control org eclipse swt widgets Composite public void create Control Composite parent Composite comp new Composite parent SWT NONE set Control comp Grid Layout top Layout new Grid Layout top Layout num Columns 3 comp set Layout top Layout Label label new Label comp SWT NONE Grid Data gd new Grid Data gd horizontal Span 3 label set Layout Data gd create Single Test Section comp create Test Container Selection Group comp label new Label comp SWT NONE gd new Grid Data gd horizontal Span 3 label set Layout Data gd create Keep Alive Group comp Dialog apply Dialog Font comp validate Page  ILaunchConfigurationTab createControl createControl setControl GridLayout topLayout GridLayout topLayout numColumns setLayout topLayout GridData GridData horizontalSpan setLayoutData createSingleTestSection createTestContainerSelectionGroup GridData horizontalSpan setLayoutData createKeepAliveGroup applyDialogFont validatePage
f Test Radio Button set Layout Data gd f Test Radio Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e if f Test Radio Button get Selection test Mode Changed  fTestRadioButton setLayoutData fTestRadioButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fTestRadioButton getSelection testModeChanged
f Proj Text add Modify Listener new Modify Listener public void modify Text Modify Event evt validate Page update Launch Configuration Dialog f Search Button set Enabled f Test Radio Button get Selection f Proj Text get Text length 0  fProjText addModifyListener ModifyListener modifyText ModifyEvent validatePage updateLaunchConfigurationDialog fSearchButton setEnabled fTestRadioButton getSelection fProjText getText
f Proj Button set Text J Unit Messages get String J Unit Main Tab label browse NON NLS 1 f Proj Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Project Button Selected  fProjButton setText JUnitMessages getString JUnitMainTab fProjButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleProjectButtonSelected
f Test Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Test Text add Modify Listener new Modify Listener public void modify Text Modify Event evt validate Page update Launch Configuration Dialog  fTestText setLayoutData GridData GridData FILL_HORIZONTAL fTestText addModifyListener ModifyListener modifyText ModifyEvent validatePage updateLaunchConfigurationDialog
f Search Button set Text J Unit Messages get String J Unit Main Tab label search NON NLS 1 f Search Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Search Button Selected  fSearchButton setText JUnitMessages getString JUnitMainTab fSearchButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSearchButtonSelected
protected void create Single Test Section Composite comp f Test Radio Button new Button comp SWT RADIO f Test Radio Button set Text J Unit Messages get String J Unit Main Tab label one Test NON NLS 1 Grid Data gd new Grid Data gd horizontal Span 3 f Test Radio Button set Layout Data gd f Test Radio Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e if f Test Radio Button get Selection test Mode Changed f Proj Label new Label comp SWT NONE f Proj Label set Text J Unit Messages get String J Unit Main Tab label project NON NLS 1 gd new Grid Data gd horizontal Indent 25 f Proj Label set Layout Data gd f Proj Text new Text comp SWT SINGLE SWT BORDER f Proj Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Proj Text add Modify Listener new Modify Listener public void modify Text Modify Event evt validate Page update Launch Configuration Dialog f Search Button set Enabled f Test Radio Button get Selection f Proj Text get Text length 0 f Proj Button new Button comp SWT PUSH f Proj Button set Text J Unit Messages get String J Unit Main Tab label browse NON NLS 1 f Proj Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Project Button Selected set Button Grid Data f Proj Button f Test Label new Label comp SWT NONE gd new Grid Data gd horizontal Indent 25 f Test Label set Layout Data gd f Test Label set Text J Unit Messages get String J Unit Main Tab label test NON NLS 1 f Test Text new Text comp SWT SINGLE SWT BORDER f Test Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Test Text add Modify Listener new Modify Listener public void modify Text Modify Event evt validate Page update Launch Configuration Dialog f Search Button new Button comp SWT PUSH f Search Button set Enabled f Proj Text get Text length 0 f Search Button set Text J Unit Messages get String J Unit Main Tab label search NON NLS 1 f Search Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Search Button Selected set Button Grid Data f Search Button new Label comp SWT NONE f Test Method Label new Label comp SWT NONE f Test Method Label set Text NON NLS 1 gd new Grid Data gd horizontal Span 2 f Test Method Label set Layout Data gd  createSingleTestSection fTestRadioButton fTestRadioButton setText JUnitMessages getString JUnitMainTab oneTest GridData GridData horizontalSpan fTestRadioButton setLayoutData fTestRadioButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fTestRadioButton getSelection testModeChanged fProjLabel fProjLabel setText JUnitMessages getString JUnitMainTab GridData horizontalIndent fProjLabel setLayoutData fProjText fProjText setLayoutData GridData GridData FILL_HORIZONTAL fProjText addModifyListener ModifyListener modifyText ModifyEvent validatePage updateLaunchConfigurationDialog fSearchButton setEnabled fTestRadioButton getSelection fProjText getText fProjButton fProjButton setText JUnitMessages getString JUnitMainTab fProjButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleProjectButtonSelected setButtonGridData fProjButton fTestLabel GridData horizontalIndent fTestLabel setLayoutData fTestLabel setText JUnitMessages getString JUnitMainTab fTestText fTestText setLayoutData GridData GridData FILL_HORIZONTAL fTestText addModifyListener ModifyListener modifyText ModifyEvent validatePage updateLaunchConfigurationDialog fSearchButton fSearchButton setEnabled fProjText getText fSearchButton setText JUnitMessages getString JUnitMainTab fSearchButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSearchButtonSelected setButtonGridData fSearchButton fTestMethodLabel fTestMethodLabel setText GridData horizontalSpan fTestMethodLabel setLayoutData
f Test Container Radio Button set Layout Data gd f Test Container Radio Button add Selection Listener new Selection Listener public void widget Selected Selection Event e if f Test Container Radio Button get Selection test Mode Changed  fTestContainerRadioButton setLayoutData fTestContainerRadioButton addSelectionListener SelectionListener widgetSelected SelectionEvent fTestContainerRadioButton getSelection testModeChanged
test Mode Changed public void widget Default Selected Selection Event e  testModeChanged widgetDefaultSelected SelectionEvent
f Container Text set Layout Data gd f Container Text add Modify Listener new Modify Listener public void modify Text Modify Event evt update Launch Configuration Dialog  fContainerText setLayoutData fContainerText addModifyListener ModifyListener modifyText ModifyEvent updateLaunchConfigurationDialog
f Container Search Button set Text J Unit Messages get String J Unit Main Tab label search NON NLS 1 f Container Search Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Container Search Button Selected  fContainerSearchButton setText JUnitMessages getString JUnitMainTab fContainerSearchButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleContainerSearchButtonSelected
protected void create Test Container Selection Group Composite comp f Test Container Radio Button new Button comp SWT RADIO f Test Container Radio Button set Text J Unit Messages get String J Unit Main Tab label container Test NON NLS 1 Grid Data gd new Grid Data gd horizontal Span 3 f Test Container Radio Button set Layout Data gd f Test Container Radio Button add Selection Listener new Selection Listener public void widget Selected Selection Event e if f Test Container Radio Button get Selection test Mode Changed public void widget Default Selected Selection Event e f Container Text new Text comp SWT SINGLE SWT BORDER SWT READ ONLY gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Indent 25 gd horizontal Span 2 f Container Text set Layout Data gd f Container Text add Modify Listener new Modify Listener public void modify Text Modify Event evt update Launch Configuration Dialog f Container Search Button new Button comp SWT PUSH f Container Search Button set Text J Unit Messages get String J Unit Main Tab label search NON NLS 1 f Container Search Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt handle Container Search Button Selected set Button Grid Data f Container Search Button  createTestContainerSelectionGroup fTestContainerRadioButton fTestContainerRadioButton setText JUnitMessages getString JUnitMainTab containerTest GridData GridData horizontalSpan fTestContainerRadioButton setLayoutData fTestContainerRadioButton addSelectionListener SelectionListener widgetSelected SelectionEvent fTestContainerRadioButton getSelection testModeChanged widgetDefaultSelected SelectionEvent fContainerText READ_ONLY GridData GridData FILL_HORIZONTAL horizontalIndent horizontalSpan fContainerText setLayoutData fContainerText addModifyListener ModifyListener modifyText ModifyEvent updateLaunchConfigurationDialog fContainerSearchButton fContainerSearchButton setText JUnitMessages getString JUnitMainTab fContainerSearchButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleContainerSearchButtonSelected setButtonGridData fContainerSearchButton
private void handle Container Search Button Selected I Java Element java Element choose Container f Container Element if java Element null set Container Element java Element  handleContainerSearchButtonSelected IJavaElement javaElement chooseContainer fContainerElement javaElement setContainerElement javaElement
private void set Container Element I Java Element java Element f Container Element java Element f Container Text set Text get Presentation Name java Element validate Page update Launch Configuration Dialog  setContainerElement IJavaElement javaElement fContainerElement javaElement fContainerText setText getPresentationName javaElement validatePage updateLaunchConfigurationDialog
f Keep Running new Button comp SWT CHECK f Keep Running add Selection Listener new Selection Listener public void widget Selected Selection Event e update Launch Configuration Dialog  fKeepRunning fKeepRunning addSelectionListener SelectionListener widgetSelected SelectionEvent updateLaunchConfigurationDialog
update Launch Configuration Dialog public void widget Default Selected Selection Event e  updateLaunchConfigurationDialog widgetDefaultSelected SelectionEvent
public void create Keep Alive Group Composite comp Grid Data gd f Keep Running new Button comp SWT CHECK f Keep Running add Selection Listener new Selection Listener public void widget Selected Selection Event e update Launch Configuration Dialog public void widget Default Selected Selection Event e f Keep Running set Text J Unit Messages get String J Unit Main Tab label keeprunning NON NLS 1 gd new Grid Data gd horizontal Alignment Grid Data FILL gd horizontal Span 2 f Keep Running set Layout Data gd  createKeepAliveGroup GridData fKeepRunning fKeepRunning addSelectionListener SelectionListener widgetSelected SelectionEvent updateLaunchConfigurationDialog widgetDefaultSelected SelectionEvent fKeepRunning setText JUnitMessages getString JUnitMainTab GridData horizontalAlignment GridData horizontalSpan fKeepRunning setLayoutData
protected static Image create Image String path try Image Descriptor id Image Descriptor create FromURL J Unit Plugin make Icon FileURL path return id create Image catch MalformedURL Exception e fall through return null  createImage ImageDescriptor ImageDescriptor createFromURL JUnitPlugin makeIconFileURL createImage MalformedURLException
see I Launch Configuration Tab initialize From I Launch Configuration public void initialize From I Launch Configuration config update Project From Config config String container Handle NON NLS 1 try container Handle config get Attribute J Unit Base Launch Configuration LAUNCH CONTAINER ATTR NON NLS 1 catch Core Exception ce if container Handle length 0 update Test Container From Config config else update Test Type From Config config update Keep Running config  ILaunchConfigurationTab initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration updateProjectFromConfig containerHandle containerHandle getAttribute JUnitBaseLaunchConfiguration LAUNCH_CONTAINER_ATTR CoreException containerHandle updateTestContainerFromConfig updateTestTypeFromConfig updateKeepRunning
private void update Keep Running I Launch Configuration config boolean running false try running config get Attribute J Unit Base Launch Configuration ATTR KEEPRUNNING false catch Core Exception ce f Keep Running set Selection running  updateKeepRunning ILaunchConfiguration getAttribute JUnitBaseLaunchConfiguration ATTR_KEEPRUNNING CoreException fKeepRunning setSelection
protected void update Project From Config I Launch Configuration config String project Name NON NLS 1 try project Name config get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME NON NLS 1 catch Core Exception ce f Proj Text set Text project Name  updateProjectFromConfig ILaunchConfiguration projectName projectName getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME CoreException fProjText setText projectName
protected void update Test Type From Config I Launch Configuration config String test Type Name NON NLS 1 f Original Test Method Name NON NLS 1 try test Type Name config get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME NON NLS 1 f Original Test Method Name config get Attribute J Unit Base Launch Configuration TESTNAME ATTR NON NLS 1 catch Core Exception ce f Test Radio Button set Selection true set Enable Single Test Group true set Enable Container Test Group false f Test Container Radio Button set Selection false f Test Text set Text test Type Name f Container Text set Text NON NLS 1 set Test Method Label f Original Test Method Name  updateTestTypeFromConfig ILaunchConfiguration testTypeName fOriginalTestMethodName testTypeName getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME fOriginalTestMethodName getAttribute JUnitBaseLaunchConfiguration TESTNAME_ATTR CoreException fTestRadioButton setSelection setEnableSingleTestGroup setEnableContainerTestGroup fTestContainerRadioButton setSelection fTestText setText testTypeName fContainerText setText setTestMethodLabel fOriginalTestMethodName
private void set Test Method Label String test Method Name if equals test Method Name NON NLS 1 f Test Method Label set Text J Unit Messages get String J Unit Main Tab label method f Original Test Method Name NON NLS 1 else f Test Method Label set Text NON NLS 1  setTestMethodLabel testMethodName testMethodName fTestMethodLabel setText JUnitMessages getString JUnitMainTab fOriginalTestMethodName fTestMethodLabel setText
protected void update Test Container From Config I Launch Configuration config String container Handle NON NLS 1 try container Handle config get Attribute J Unit Base Launch Configuration LAUNCH CONTAINER ATTR NON NLS 1 if container Handle length 0 f Container Element Java Core create container Handle catch Core Exception ce f Test Container Radio Button set Selection true set Enable Single Test Group false set Enable Container Test Group true f Test Radio Button set Selection false if f Container Element null f Container Text set Text get Presentation Name f Container Element f Test Text set Text NON NLS 1  updateTestContainerFromConfig ILaunchConfiguration containerHandle containerHandle getAttribute JUnitBaseLaunchConfiguration LAUNCH_CONTAINER_ATTR containerHandle fContainerElement JavaCore containerHandle CoreException fTestContainerRadioButton setSelection setEnableSingleTestGroup setEnableContainerTestGroup fTestRadioButton setSelection fContainerElement fContainerText setText getPresentationName fContainerElement fTestText setText
see I Launch Configuration Tab perform Apply I Launch Configuration Working Copy public void perform Apply I Launch Configuration Working Copy config if f Test Container Radio Button get Selection f Container Element null config set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME f Container Element get Java Project get Element Name config set Attribute J Unit Base Launch Configuration LAUNCH CONTAINER ATTR f Container Element get Handle Identifier config set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME NON NLS 1 else config set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME f Proj Text get Text config set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME f Test Text get Text config set Attribute J Unit Base Launch Configuration LAUNCH CONTAINER ATTR NON NLS 1 config set Attribute J Unit Base Launch Configuration ATTR KEEPRUNNING f Keep Running get Selection config set Attribute J Unit Base Launch Configuration TESTNAME ATTR f Original Test Method Name String test Method config contents Equal config get Original workaround for bug 65399 f Original Test Method Name NON NLS 1 config set Attribute J Unit Base Launch Configuration TESTNAME ATTR test Method set Test Method Label test Method  ILaunchConfigurationTab performApply ILaunchConfigurationWorkingCopy performApply ILaunchConfigurationWorkingCopy fTestContainerRadioButton getSelection fContainerElement setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME fContainerElement getJavaProject getElementName setAttribute JUnitBaseLaunchConfiguration LAUNCH_CONTAINER_ATTR fContainerElement getHandleIdentifier setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME fProjText getText setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME fTestText getText setAttribute JUnitBaseLaunchConfiguration LAUNCH_CONTAINER_ATTR setAttribute JUnitBaseLaunchConfiguration ATTR_KEEPRUNNING fKeepRunning getSelection setAttribute JUnitBaseLaunchConfiguration TESTNAME_ATTR fOriginalTestMethodName testMethod contentsEqual getOriginal fOriginalTestMethodName setAttribute JUnitBaseLaunchConfiguration TESTNAME_ATTR testMethod setTestMethodLabel testMethod
see I Launch Configuration Tab dispose public void dispose super dispose f Test Icon dispose f Java Element Label Provider dispose  ILaunchConfigurationTab fTestIcon fJavaElementLabelProvider
see Abstract Launch Configuration Tab get Image public Image get Image return f Test Icon  AbstractLaunchConfigurationTab getImage getImage fTestIcon
Show a dialog that lists all main types protected void handle Search Button Selected Shell shell get Shell I Java Project java Project get Java Project I Type types new I Type 0 try fix for 66922 Wrong radio behaviour when switching types Test Search Engine find Tests PlatformUI get Workbench get Progress Service new Object java Project catch Interrupted Exception e set Error Message e get Message return catch Invocation Target Exception e J Unit Plugin log e get Target Exception return Selection Dialog dialog new Test Selection Dialog shell types dialog set Title J Unit Messages get String J Unit Main Tab testdialog title NON NLS 1 dialog set Message J Unit Messages get String J Unit Main Tab testdialog message NON NLS 1 if dialog open Window CANCEL return Object results dialog get Result if results null results length 1 return I Type type I Type results 0 if type null f Test Text set Text type get Fully Qualified Name java Project type get Java Project f Proj Text set Text java Project get Element Name  handleSearchButtonSelected getShell IJavaProject javaProject getJavaProject IType IType TestSearchEngine findTests getWorkbench getProgressService javaProject InterruptedException setErrorMessage getMessage InvocationTargetException JUnitPlugin getTargetException SelectionDialog TestSelectionDialog setTitle JUnitMessages getString JUnitMainTab setMessage JUnitMessages getString JUnitMainTab getResult IType IType fTestText setText getFullyQualifiedName javaProject getJavaProject fProjText setText javaProject getElementName
Show a dialog that lets the user select a project This in turn provides context for the main type allowing the user to key a main type name or constraining the search for main types to the specified project protected void handle Project Button Selected I Java Project project choose Java Project if project null return String project Name project get Element Name f Proj Text set Text project Name  handleProjectButtonSelected IJavaProject chooseJavaProject projectName getElementName fProjText setText projectName
Realize a Java Project selection dialog and return the first selected project or null if there was none protected I Java Project choose Java Project I Java Project projects try projects Java Core create get Workspace Root get Java Projects catch Java Model Exception e J Unit Plugin log e get Status projects new I Java Project 0 I Label Provider label Provider new Java Element Label Provider Java Element Label Provider SHOW DEFAULT Element List Selection Dialog dialog new Element List Selection Dialog get Shell label Provider dialog set Title J Unit Messages get String J Unit Main Tab projectdialog title NON NLS 1 dialog set Message J Unit Messages get String J Unit Main Tab projectdialog message NON NLS 1 dialog set Elements projects I Java Project java Project get Java Project if java Project null dialog set Initial Selections new Object java Project if dialog open Window OK return I Java Project dialog get First Result return null  IJavaProject chooseJavaProject IJavaProject JavaCore getWorkspaceRoot getJavaProjects JavaModelException JUnitPlugin getStatus IJavaProject ILabelProvider labelProvider JavaElementLabelProvider JavaElementLabelProvider SHOW_DEFAULT ElementListSelectionDialog ElementListSelectionDialog getShell labelProvider setTitle JUnitMessages getString JUnitMainTab setMessage JUnitMessages getString JUnitMainTab setElements IJavaProject javaProject getJavaProject javaProject setInitialSelections javaProject IJavaProject getFirstResult
Return the I Java Project corresponding to the project name in the project name text field or null if the text does not match a project name protected I Java Project get Java Project String project Name f Proj Text get Text trim if project Name length 1 return null return get Java Model get Java Project project Name  IJavaProject IJavaProject getJavaProject projectName fProjText getText projectName getJavaModel getJavaProject projectName
Convenience method to get the workspace root private I Workspace Root get Workspace Root return Resources Plugin get Workspace get Root  IWorkspaceRoot getWorkspaceRoot ResourcesPlugin getWorkspace getRoot
Convenience method to get access to the java model private I Java Model get Java Model return Java Core create get Workspace Root  IJavaModel getJavaModel JavaCore getWorkspaceRoot
see I Launch Configuration Tab is Valid I Launch Configuration public boolean is Valid I Launch Configuration config return get Error Message null  ILaunchConfigurationTab isValid ILaunchConfiguration isValid ILaunchConfiguration getErrorMessage
private void test Mode Changed boolean is Single Test Mode f Test Radio Button get Selection set Enable Single Test Group is Single Test Mode set Enable Container Test Group is Single Test Mode if is Single Test Mode f Container Text get Text length 0 I Java Project java Project get Java Model get Java Project f Proj Text get Text if java Project null java Project exists set Container Element java Project validate Page update Launch Configuration Dialog  testModeChanged isSingleTestMode fTestRadioButton getSelection setEnableSingleTestGroup isSingleTestMode setEnableContainerTestGroup isSingleTestMode isSingleTestMode fContainerText getText IJavaProject javaProject getJavaModel getJavaProject fProjText getText javaProject javaProject setContainerElement javaProject validatePage updateLaunchConfigurationDialog
private void validate Page set Error Message null set Message null if f Test Container Radio Button get Selection if f Container Element null set Error Message J Unit Messages get String J Unit Main Tab error no Container NON NLS 1 return String project Name f Proj Text get Text trim if project Name length 0 set Error Message J Unit Messages get String J Unit Main Tab error projectnotdefined NON NLS 1 return I Project project get Workspace Root get Project project Name if project exists set Error Message J Unit Messages get String J Unit Main Tab error projectnotexists NON NLS 1 return try if project has Nature Java Core NATURE ID set Error Message J Unit Messages get String J Unit Main Tab error not Java Project NON NLS 1 return I Java Project j Project get Java Project String class Name f Test Text get Text trim if class Name length 0 set Error Message J Unit Messages get String J Unit Main Tab error testnotdefined NON NLS 1 return I Type type j Project find Type class Name if type null set Error Message J Unit Messages get String J Unit Main Tab error testnotexists NON NLS 1 else if Test Search Engine is Test Or Test Suite type set Error Message J Unit Messages get String J Unit Main Tab error invalid Test NON NLS 1 catch Exception e  validatePage setErrorMessage setMessage fTestContainerRadioButton getSelection fContainerElement setErrorMessage JUnitMessages getString JUnitMainTab noContainer projectName fProjText getText projectName setErrorMessage JUnitMessages getString JUnitMainTab IProject getWorkspaceRoot getProject projectName setErrorMessage JUnitMessages getString JUnitMainTab hasNature JavaCore NATURE_ID setErrorMessage JUnitMessages getString JUnitMainTab notJavaProject IJavaProject jProject getJavaProject className fTestText getText className setErrorMessage JUnitMessages getString JUnitMainTab IType jProject findType className setErrorMessage JUnitMessages getString JUnitMainTab TestSearchEngine isTestOrTestSuite setErrorMessage JUnitMessages getString JUnitMainTab invalidTest
private void set Enable Container Test Group boolean enabled f Container Search Button set Enabled enabled f Container Text set Enabled enabled  setEnableContainerTestGroup fContainerSearchButton setEnabled fContainerText setEnabled
private void set Enable Single Test Group boolean enabled f Proj Label set Enabled enabled f Proj Text set Enabled enabled f Proj Button set Enabled enabled f Test Label set Enabled enabled f Test Text set Enabled enabled f Search Button set Enabled enabled f Proj Text get Text length 0 f Test Method Label set Enabled enabled  setEnableSingleTestGroup fProjLabel setEnabled fProjText setEnabled fProjButton setEnabled fTestLabel setEnabled fTestText setEnabled fSearchButton setEnabled fProjText getText fTestMethodLabel setEnabled
see I Launch Configuration Tab set Defaults I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy config I Java Element java Element get Context if java Element null initialize Java Project java Element config else We set empty attributes for project main type so that when one config is compared to another the existence of empty attributes doesn t cause an incorrect result the perform Apply method can result in empty values for these attributes being set on a config if there is nothing in the corresponding text boxes config set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME NON NLS 1 config set Attribute J Unit Base Launch Configuration LAUNCH CONTAINER ATTR NON NLS 1 initialize Test Attributes java Element config  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy IJavaElement javaElement getContext javaElement initializeJavaProject javaElement performApply setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME setAttribute JUnitBaseLaunchConfiguration LAUNCH_CONTAINER_ATTR initializeTestAttributes javaElement
private void initialize Test Attributes I Java Element java Element I Launch Configuration Working Copy config if java Element null java Element get Element Type I Java Element COMPILATION UNIT initialize Test Container java Element config else initialize Test Type java Element config  initializeTestAttributes IJavaElement javaElement ILaunchConfigurationWorkingCopy javaElement javaElement getElementType IJavaElement COMPILATION_UNIT initializeTestContainer javaElement initializeTestType javaElement
private void initialize Test Container I Java Element java Element I Launch Configuration Working Copy config config set Attribute J Unit Base Launch Configuration LAUNCH CONTAINER ATTR java Element get Handle Identifier initialize Name config java Element get Element Name  initializeTestContainer IJavaElement javaElement ILaunchConfigurationWorkingCopy setAttribute JUnitBaseLaunchConfiguration LAUNCH_CONTAINER_ATTR javaElement getHandleIdentifier initializeName javaElement getElementName
private void initialize Name I Launch Configuration Working Copy config String name if name null name NON NLS 1 if name length 0 int index name last Index Of if index 0 name name substring index 1 name get Launch Configuration Dialog generate Name name config rename name  initializeName ILaunchConfigurationWorkingCopy lastIndexOf getLaunchConfigurationDialog generateName
Set the main type name attributes on the working copy based on the I Java Element protected void initialize Test Type I Java Element java Element I Launch Configuration Working Copy config String name NON NLS 1 try we only do a search for compilation units or class files or or source references if java Element instanceof I Compilation Unit java Element instanceof I Source Reference java Element instanceof I Class File I Type types Test Search Engine find Tests new Object java Element if types null types length 1 return Simply grab the first main type found in the searched element name types 0 get Fully Qualified Name catch Interrupted Exception ie catch Invocation Target Exception ite if name null name NON NLS 1 config set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME name initialize Name config name  IJavaElement initializeTestType IJavaElement javaElement ILaunchConfigurationWorkingCopy javaElement ICompilationUnit javaElement ISourceReference javaElement IClassFile IType TestSearchEngine findTests javaElement getFullyQualifiedName InterruptedException InvocationTargetException setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME initializeName
see I Launch Configuration Tab get Name public String get Name return J Unit Messages get String J Unit Main Tab tab label NON NLS 1  ILaunchConfigurationTab getName getName JUnitMessages getString JUnitMainTab
Class accepted Classes new Class I Package Fragment Root class I Java Project class I Package Fragment class Typed Element Selection Validator validator new Typed Element Selection Validator accepted Classes false public boolean is Selected Valid Object element return true  acceptedClasses IPackageFragmentRoot IJavaProject IPackageFragment TypedElementSelectionValidator TypedElementSelectionValidator acceptedClasses isSelectedValid
accepted Classes new Class I Java Model class I Package Fragment Root class I Java Project class I Package Fragment class Viewer Filter filter new Typed Viewer Filter accepted Classes public boolean select Viewer viewer Object parent Object element return super select viewer parent element  acceptedClasses IJavaModel IPackageFragmentRoot IJavaProject IPackageFragment ViewerFilter TypedViewerFilter acceptedClasses
private I Java Element choose Container I Java Element init Element Class accepted Classes new Class I Package Fragment Root class I Java Project class I Package Fragment class Typed Element Selection Validator validator new Typed Element Selection Validator accepted Classes false public boolean is Selected Valid Object element return true accepted Classes new Class I Java Model class I Package Fragment Root class I Java Project class I Package Fragment class Viewer Filter filter new Typed Viewer Filter accepted Classes public boolean select Viewer viewer Object parent Object element return super select viewer parent element Standard Java Element Content Provider provider new Standard Java Element Content Provider I Label Provider label Provider new Java Element Label Provider Java Element Label Provider SHOW DEFAULT Element Tree Selection Dialog dialog new Element Tree Selection Dialog get Shell label Provider provider dialog set Validator validator dialog set Sorter new Java Element Sorter dialog set Title J Unit Messages get String J Unit Main Tab folderdialog title NON NLS 1 dialog set Message J Unit Messages get String J Unit Main Tab folderdialog message NON NLS 1 dialog add Filter filter dialog set Input Java Core create get Workspace Root dialog set Initial Selection init Element dialog set Allow Multiple false if dialog open Window OK Object element dialog get First Result return I Java Element element return null  IJavaElement chooseContainer IJavaElement initElement acceptedClasses IPackageFragmentRoot IJavaProject IPackageFragment TypedElementSelectionValidator TypedElementSelectionValidator acceptedClasses isSelectedValid acceptedClasses IJavaModel IPackageFragmentRoot IJavaProject IPackageFragment ViewerFilter TypedViewerFilter acceptedClasses StandardJavaElementContentProvider StandardJavaElementContentProvider ILabelProvider labelProvider JavaElementLabelProvider JavaElementLabelProvider SHOW_DEFAULT ElementTreeSelectionDialog ElementTreeSelectionDialog getShell labelProvider setValidator setSorter JavaElementSorter setTitle JUnitMessages getString JUnitMainTab setMessage JUnitMessages getString JUnitMainTab addFilter setInput JavaCore getWorkspaceRoot setInitialSelection initElement setAllowMultiple getFirstResult IJavaElement
private String get Presentation Name I Java Element element return f Java Element Label Provider get Text element  getPresentationName IJavaElement fJavaElementLabelProvider getText

public class J Unit Tab Group extends Abstract Launch Configuration Tab Group see I Launch Configuration Tab Group create Tabs I Launch Configuration Dialog String public void create Tabs I Launch Configuration Dialog dialog String mode I Launch Configuration Tab tabs new I Launch Configuration Tab new J Unit Main Tab new Java Arguments Tab new Java Classpath Tab new JavaJRE Tab new Source Lookup Tab new Environment Tab new Common Tab set Tabs tabs  JUnitTabGroup AbstractLaunchConfigurationTabGroup ILaunchConfigurationTabGroup createTabs ILaunchConfigurationDialog createTabs ILaunchConfigurationDialog ILaunchConfigurationTab ILaunchConfigurationTab JUnitMainTab JavaArgumentsTab JavaClasspathTab JavaJRETab SourceLookupTab EnvironmentTab CommonTab setTabs
see I Launch Configuration Tab Group set Defaults I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy config super set Defaults config  ILaunchConfigurationTabGroup setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy setDefaults

public boolean test Object receiver String method Object args Object expected Value I Resource resource I Resource receiver if PROPERTY IS TEST equals method NON NLS 1 return isJ Unit Test resource Assert is True false return false  expectedValue IResource IResource PROPERTY_IS_TEST isJUnitTest isTrue
private boolean isJ Unit Test I Resource target if target null I Java Element element Java Core create target if element instanceof I Compilation Unit I Compilation Unit cu I Compilation Unit element I Type main Type cu get Type Signature get Qualifier cu get Element Name try return Test Search Engine is Test Or Test Suite main Type catch Java Model Exception e return false return false  isJUnitTest IResource IJavaElement JavaCore ICompilationUnit ICompilationUnit ICompilationUnit IType mainType getType getQualifier getElementName TestSearchEngine isTestOrTestSuite mainType JavaModelException

private static class Package Renderer extends Java Element Label Provider public Package Renderer super Java Element Label Provider SHOW PARAMETERS Java Element Label Provider SHOW POST QUALIFIED Java Element Label Provider SHOW ROOT  PackageRenderer JavaElementLabelProvider PackageRenderer JavaElementLabelProvider SHOW_PARAMETERS JavaElementLabelProvider SHOW_POST_QUALIFIED JavaElementLabelProvider SHOW_ROOT
public Image get Image Object element return super get Image I Type element get Package Fragment  getImage getImage IType getPackageFragment
public String get Text Object element return super get Text I Type element get Package Fragment  getText getText IType getPackageFragment
Constructor public Test Selection Dialog Shell shell I Java Project project super shell new Java Element Label Provider Java Element Label Provider SHOW BASICS Java Element Label Provider SHOW OVERLAY ICONS new Package Renderer f Project project  TestSelectionDialog IJavaProject JavaElementLabelProvider JavaElementLabelProvider SHOW_BASICS JavaElementLabelProvider SHOW_OVERLAY_ICONS PackageRenderer fProject
public Test Selection Dialog Shell shell I Type types super shell new Java Element Label Provider Java Element Label Provider SHOW BASICS Java Element Label Provider SHOW OVERLAY ICONS new Package Renderer f Types types  TestSelectionDialog IType JavaElementLabelProvider JavaElementLabelProvider SHOW_BASICS JavaElementLabelProvider SHOW_OVERLAY_ICONS PackageRenderer fTypes
see org eclipse jface window Window configure Shell Shell protected void configure Shell Shell new Shell super configure Shell new Shell Workbench Help set Help new Shell new Object I Java Help Context Ids MAINTYPE SELECTION DIALOG  configureShell configureShell newShell configureShell newShell WorkbenchHelp setHelp newShell IJavaHelpContextIds MAINTYPE_SELECTION_DIALOG
public int open if f Types null f Types new I Type 0 try f Types Test Search Engine find Tests new Object f Project catch Interrupted Exception e return CANCEL catch Invocation Target Exception e J Unit Plugin log e get Target Exception return CANCEL set Elements f Types return super open  fTypes fTypes IType fTypes TestSearchEngine findTests fProject InterruptedException InvocationTargetException JUnitPlugin getTargetException setElements fTypes

public abstract class J Unit Rename Participant extends Rename Participant public Refactoring Status check Conditions I Progress Monitor pm Check Conditions Context context return new Refactoring Status  JUnitRenameParticipant RenameParticipant RefactoringStatus checkConditions IProgressMonitor CheckConditionsContext RefactoringStatus
public Change create Change I Progress Monitor pm throws Core Exception if get Arguments get Update References return null I Launch Manager manager Debug Plugin get Default get Launch Manager List launch Config Types J Unit Plugin get Default getJ Unit Launch Config TypeI Ds List changes new Array List for Iterator types launch Config Types iterator types has Next String type Id String types next I Launch Configuration Type type manager get Launch Configuration Type type Id I Launch Configuration configs manager get Launch Configurations type create Change For Configs changes configs if pm is Canceled throw new Operation Canceled Exception if changes size 0 return new Composite Change get Change Name Change changes to Array new Change changes size NON NLS 1 return null  createChange IProgressMonitor CoreException getArguments getUpdateReferences ILaunchManager DebugPlugin getDefault getLaunchManager launchConfigTypes JUnitPlugin getDefault getJUnitLaunchConfigTypeIDs ArrayList launchConfigTypes hasNext typeId ILaunchConfigurationType getLaunchConfigurationType typeId ILaunchConfiguration getLaunchConfigurations createChangeForConfigs isCanceled OperationCanceledException CompositeChange getChangeName toArray
protected String get Change Name return J Unit Messages get String Type Rename Participant change name NON NLS 1  getChangeName JUnitMessages getString TypeRenameParticipant
protected abstract void create Change For Configs List changes I Launch Configuration configs throws Core Exception  createChangeForConfigs ILaunchConfiguration CoreException

private String f New Name public Launch Config Project Change I Launch Configuration config String new Name f Config config f New Name new Name  fNewName LaunchConfigProjectChange ILaunchConfiguration newName fConfig fNewName newName
inherit Doc public String get Name return f Config get Name  inheritDoc getName fConfig getName
inherit Doc public void initialize Validation Data I Progress Monitor pm must be implemented to decide correct value of is Valid  inheritDoc initializeValidationData IProgressMonitor isValid
public Refactoring Status is Valid I Progress Monitor pm throws Core Exception return new Refactoring Status  RefactoringStatus isValid IProgressMonitor CoreException RefactoringStatus
public Change perform I Progress Monitor pm throws Core Exception pm begin Task 1 NON NLS 1 String old Project Name f Config get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME String null I Launch Configuration Working Copy copy f Config get Working Copy copy set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME f New Name copy do Save pm worked 1 return new Launch Config Project Change f Config old Project Name  IProgressMonitor CoreException beginTask oldProjectName fConfig getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME ILaunchConfigurationWorkingCopy fConfig getWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME fNewName doSave LaunchConfigProjectChange fConfig oldProjectName
see org eclipse jdt internal corext refactoring base I Change get Modified Language Element public Object get Modified Element return f Config  IChange getModifiedLanguageElement getModifiedElement fConfig

public Launch Config Type Change I Type type I Launch Configuration config String new Name f Type type f Config config f New Name new Name  LaunchConfigTypeChange IType ILaunchConfiguration newName fType fConfig fNewName newName
inherit Doc public String get Name return f Config get Name  inheritDoc getName fConfig getName
inherit Doc public void initialize Validation Data I Progress Monitor pm must be implemented to decide correct value of is Valid  inheritDoc initializeValidationData IProgressMonitor isValid
public Refactoring Status is Valid I Progress Monitor pm throws Core Exception return new Refactoring Status  RefactoringStatus isValid IProgressMonitor CoreException RefactoringStatus
public Change perform I Progress Monitor pm throws Core Exception pm begin Task 1 NON NLS 1 String current f Config get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME String null int index current last Index Of String new Type Name if index 1 new Type Name f New Name else new Type Name current substring 0 index 1 f New Name I Launch Configuration Working Copy copy f Config get Working Copy copy set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME new Type Name generate the new configuration name String launch Configuration Name f Config get Name if launch Configuration Name equals current if Debug Plugin get Default get Launch Manager is Existing Launch Configuration Name f New Name copy rename f New Name copy do Save pm worked 1 return new Launch Config Type Change f Type f Config index 1 current current substring index 1  IProgressMonitor CoreException beginTask fConfig getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME lastIndexOf newTypeName newTypeName fNewName newTypeName fNewName ILaunchConfigurationWorkingCopy fConfig getWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME newTypeName launchConfigurationName fConfig getName launchConfigurationName DebugPlugin getDefault getLaunchManager isExistingLaunchConfigurationName fNewName fNewName doSave LaunchConfigTypeChange fType fConfig
see org eclipse jdt internal corext refactoring base I Change get Modified Language Element public Object get Modified Element return f Config  IChange getModifiedLanguageElement getModifiedElement fConfig

private I Java Project f Project protected boolean initialize Object element f Project I Java Project element return true  IJavaProject fProject fProject IJavaProject
inherit Doc public String get Name return J Unit Messages get String Type Rename Participant name NON NLS 1  inheritDoc getName JUnitMessages getString TypeRenameParticipant
protected void create Change For Configs List changes I Launch Configuration configs throws Core Exception for int i 0 i configs length i String project Name configs i get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME String null if f Project get Element Name equals project Name changes add new Launch Config Project Change configs i get Arguments get New Name  createChangeForConfigs ILaunchConfiguration CoreException projectName getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME fProject getElementName projectName LaunchConfigProjectChange getArguments getNewName

protected boolean initialize Object element f Type I Type element try return Test Search Engine is Test Or Test Suite f Type catch Java Model Exception e return false  fType IType TestSearchEngine isTestOrTestSuite fType JavaModelException
inherit Doc public String get Name return J Unit Messages get String Type Rename Participant name NON NLS 1  inheritDoc getName JUnitMessages getString TypeRenameParticipant
protected void create Change For Configs List changes I Launch Configuration configs throws Core Exception String type Name f Type get Fully Qualified Name for int i 0 i configs length i String main Type configs i get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME String null if type Name equals main Type changes add new Launch Config Type Change f Type configs i get Arguments get New Name  createChangeForConfigs ILaunchConfiguration CoreException typeName fType getFullyQualifiedName mainType getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME typeName mainType LaunchConfigTypeChange fType getArguments getNewName

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private J Unit Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME JUnitMessages
Gets a string from the resource bundle and formats it with the argument param keythe string used to get the bundle value must not be null public static String get Formatted String String key Object arg return Message Format format get String key new Object arg  getFormattedString MessageFormat getString
Gets a string from the resource bundle and formats it with arguments public static String get Formatted String String key Object args return Message Format format get String key args  getFormattedString MessageFormat getString
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public Rerun Request int test Id String class Name String test Name f Rerun Test Id test Id f Rerun Class Name class Name f Rerun Test Name test Name  RerunRequest testId className testName fRerunTestId testId fRerunClassName className fRerunTestName testName
private class Reader Thread extends Thread public Reader Thread super Reader Thread NON NLS 1  ReaderThread ReaderThread ReaderThread
public void run try String message null while true if message f Reader read Line null if message starts With Message Ids TEST STOP f Stopped true Remote Test Runner this stop synchronized Remote Test Runner this Remote Test Runner this notify All break else if message starts With Message Ids TEST RERUN String arg message substring Message Ids MSG HEADER LENGTH format test Id class Name test Name int c0 arg index Of NON NLS 1 int c1 arg index Of c0 1 String s arg substring 0 c0 int test Id Integer parse Int s String class Name arg substring c0 1 c1 String test Name arg substring c1 1 arg length synchronized Remote Test Runner this f Rerun Requests add new Rerun Request test Id class Name test Name Remote Test Runner this notify All catch Exception e Remote Test Runner this stop  fReader readLine startsWith MessageIds TEST_STOP fStopped RemoteTestRunner RemoteTestRunner RemoteTestRunner notifyAll startsWith MessageIds TEST_RERUN MessageIds MSG_HEADER_LENGTH testId className testName indexOf indexOf testId parseInt className testName RemoteTestRunner fRerunRequests RerunRequest testId className testName RemoteTestRunner notifyAll RemoteTestRunner
The main entry point Parameters pre classnames the name of the test suite class testfilename the name of a file containing classnames of test suites test the test method name format classname testname host the host to connect to default local host port the port to connect to mandatory argument keepalive keep the process alive after a test run pre public static void main String args Remote Test Runner test Run Server new Remote Test Runner test Run Server init args test Run Server run fix for 14434 System exit 0  RemoteTestRunner testRunServer RemoteTestRunner testRunServer testRunServer
Parse command line arguments Hook for subclasses to process additional arguments protected void init String args default Init args  defaultInit
The class loader to be used for loading tests Subclasses may override to use another class loader protected Class Loader get Class Loader return get Class get Class Loader  ClassLoader getClassLoader getClass getClassLoader
Process the default arguments protected final void default Init String args for int i 0 i args length i if args i to Lower Case equals classnames args i to Lower Case equals classname NON NLS 1 NON NLS 2 Vector list new Vector for int j i 1 j args length j if args j starts With NON NLS 1 break list add args j f Test Class Names String list to Array new String list size else if args i to Lower Case equals test NON NLS 1 String test Name args i 1 int p test Name index Of if p 1 throw new Illegal Argument Exception Testname not separated by NON NLS 1 f Test Name test Name substring p 1 f Test Class Names new String test Name substring 0 p i else if args i to Lower Case equals testnamefile NON NLS 1 String test Name File args i 1 try read Test Names test Name File catch IO Exception e throw new Illegal Argument Exception Cannot read testname file NON NLS 1 i else if args i to Lower Case equals port NON NLS 1 f Port Integer parse Int args i 1 i else if args i to Lower Case equals host NON NLS 1 f Host args i 1 i else if args i to Lower Case equals rerun NON NLS 1 f Rerun Test args i 1 i else if args i to Lower Case equals keepalive NON NLS 1 f Keep Alive true else if args i to Lower Case equals debugging args i to Lower Case equals debug NON NLS 1 NON NLS 2 f Debug Mode true else if args i to Lower Case equals version NON NLS 1 f Version args i 1 i if f Test Class Names null f Test Class Names length 0 throw new Illegal Argument Exception J Unit Messages get String Remote Test Runner error classnamemissing NON NLS 1 if f Port 1 throw new Illegal Argument Exception J Unit Messages get String Remote Test Runner error portmissing NON NLS 1 if f Debug Mode System out println keepalive f Keep Alive NON NLS 1  defaultInit toLowerCase toLowerCase startsWith fTestClassNames toArray toLowerCase testName testName indexOf IllegalArgumentException fTestName testName fTestClassNames testName toLowerCase testNameFile readTestNames testNameFile IOException IllegalArgumentException toLowerCase fPort parseInt toLowerCase fHost toLowerCase fRerunTest toLowerCase fKeepAlive toLowerCase toLowerCase fDebugMode toLowerCase fVersion fTestClassNames fTestClassNames IllegalArgumentException JUnitMessages getString RemoteTestRunner fPort IllegalArgumentException JUnitMessages getString RemoteTestRunner fDebugMode fKeepAlive
private void read Test Names String test Name File throws IO Exception Buffered Reader br new Buffered Reader new File Reader new File test Name File try String line Vector list new Vector while line br read Line null list add line f Test Class Names String list to Array new String list size finally br close if f Debug Mode System out println Tests NON NLS 1 for int i 0 i f Test Class Names length i System out println f Test Class Names i NON NLS 1  readTestNames testNameFile IOException BufferedReader BufferedReader FileReader testNameFile readLine fTestClassNames toArray fDebugMode fTestClassNames fTestClassNames
Connects to the remote ports and runs the tests protected void run if connect return if f Rerun Test null rerun Test Integer parse Int f Rerun Test f Test Class Names 0 f Test Name return f Test Result new Test Result f Test Result add Listener this run Tests f Test Class Names f Test Name f Test Result remove Listener this if f Test Result null f Test Result stop f Test Result null if f Keep Alive wait For Reruns shut Down  fRerunTest rerunTest parseInt fRerunTest fTestClassNames fTestName fTestResult TestResult fTestResult addListener runTests fTestClassNames fTestName fTestResult removeListener fTestResult fTestResult fTestResult fKeepAlive waitForReruns shutDown
Waits for rerun requests until an explicit stop request private synchronized void wait For Reruns while f Stopped try wait if f Stopped f Rerun Requests size 0 Rerun Request r Rerun Request f Rerun Requests remove 0 rerun Test r f Rerun Test Id r f Rerun Class Name r f Rerun Test Name catch Interrupted Exception e  waitForReruns fStopped fStopped fRerunRequests RerunRequest RerunRequest fRerunRequests rerunTest fRerunTestId fRerunClassName fRerunTestName InterruptedException
Returns the Test corresponding to the given suite private Test get Test String suite Class Name String test Name Class test Class null try test Class load Suite Class suite Class Name catch Class Not Found Exception e String clazz e get Message if clazz null clazz suite Class Name run Failed J Unit Messages get Formatted String Remote Test Runner error classnotfound clazz NON NLS 1 return null catch Exception e run Failed J Unit Messages get Formatted String Remote Test Runner error exception e NON NLS 1 return null if test Name null return setup Test test Class create Test test Name test Class Method suite Method null try suite Method test Class get Method SUITE METHODNAME new Class 0 catch Exception e try to extract a test suite automatically return new Test Suite test Class Test test null try test Test suite Method invoke null new Class 0 static method catch Invocation Target Exception e run Failed J Unit Messages get Formatted String Remote Test Runner error invoke e get Target Exception to String NON NLS 1 return null catch Illegal Access Exception e run Failed J Unit Messages get Formatted String Remote Test Runner error invoke e to String NON NLS 1 return null return test  getTest suiteClassName testName testClass testClass loadSuiteClass suiteClassName ClassNotFoundException getMessage suiteClassName runFailed JUnitMessages getFormattedString RemoteTestRunner runFailed JUnitMessages getFormattedString RemoteTestRunner testName setupTest testClass createTest testName testClass suiteMethod suiteMethod testClass getMethod SUITE_METHODNAME TestSuite testClass suiteMethod InvocationTargetException runFailed JUnitMessages getFormattedString RemoteTestRunner getTargetException toString IllegalAccessException runFailed JUnitMessages getFormattedString RemoteTestRunner toString
protected void run Failed String message System err println message  runFailed
Loads the test suite class private Class load Suite Class String class Name throws Class Not Found Exception if class Name null return null return get Class Loader load Class class Name  loadSuiteClass className ClassNotFoundException className getClassLoader loadClass className
Runs a set of tests private void run Tests String test Class Names String test Name instantiate all tests Test suites new Test test Class Names length for int i 0 i suites length i suites i get Test test Class Names i test Name count all test Methods and inform I Test Run Listeners int count count Tests suites notify Test Run Started count if count 0 notify Test Run Ended 0 return long start Time System current Time Millis if f Debug Mode System out print start send tree NON NLS 1 for int i 0 i suites length i send Tree suites i if f Debug Mode System out println done send tree time ms System current Time Millis start Time NON NLS 1 long test Start Time System current Time Millis for int i 0 i suites length i suites i run f Test Result inform I Test Run Listeners of test end if f Test Result null f Test Result should Stop notify Test Run Stopped System current Time Millis test Start Time else notify Test Run Ended System current Time Millis test Start Time  runTests testClassNames testName testClassNames getTest testClassNames testName testMethods ITestRunListeners countTests notifyTestRunStarted notifyTestRunEnded startTime currentTimeMillis fDebugMode sendTree fDebugMode currentTimeMillis startTime testStartTime currentTimeMillis fTestResult ITestRunListeners fTestResult fTestResult shouldStop notifyTestRunStopped currentTimeMillis testStartTime notifyTestRunEnded currentTimeMillis testStartTime
private int count Tests Test tests int count 0 for int i 0 i tests length i if tests i null count count tests i count Test Cases return count  countTests countTestCases
Reruns a test as defined by the fully qualified class name and the name of the test public void rerun Test int test Id String class Name String test Name Test reloaded Test null Class reloaded Test Class null try reloaded Test Class get Class Loader load Class class Name reloaded Test create Test test Name reloaded Test Class catch Exception e reloaded Test warning J Unit Messages get Formatted String Remote Test Runner error couldnotcreate test Name NON NLS 1 Test rerun Test setup Test reloaded Test Class reloaded Test Test Result result new Test Result rerun Test run result notify Test Reran result Integer to String test Id class Name test Name  rerunTest testId className testName reloadedTest reloadedTestClass reloadedTestClass getClassLoader loadClass className reloadedTest createTest testName reloadedTestClass reloadedTest JUnitMessages getFormattedString RemoteTestRunner testName rerunTest setupTest reloadedTestClass reloadedTest TestResult TestResult rerunTest notifyTestReran toString testId className testName
Prepare a single test to be run standalone If the test case class provides a static method Test set Up Test Test test then this method will be invoked Instead of calling the test method directly the decorated test returned from set Up Test will be called The purpose of this mechanism is to enable tests which requires a set up to be run individually private Test setup Test Class reloaded Test Class Test reloaded Test Method setup null try setup reloaded Test Class get Method SET UP TEST METHOD NAME new Class Test class catch Security Exception e1 return reloaded Test catch No Such Method Exception e return reloaded Test if setup get Return Type Test class return warning J Unit Messages get String Remote Test Runner error notestreturn NON NLS 1 if Modifier is Public setup get Modifiers return warning J Unit Messages get String Remote Test Runner error shouldbepublic NON NLS 1 if Modifier is Static setup get Modifiers return warning J Unit Messages get String Remote Test Runner error shouldbestatic NON NLS 1 try Test test Test setup invoke null new Object reloaded Test if test null return warning J Unit Messages get String Remote Test Runner error nullreturn NON NLS 1 return test catch Illegal Argument Exception e return warning J Unit Messages get Formatted String Remote Test Runner error couldnotinvoke e NON NLS 1 catch Illegal Access Exception e return warning J Unit Messages get Formatted String Remote Test Runner error couldnotinvoke e NON NLS 1 catch Invocation Target Exception e return warning J Unit Messages get Formatted String Remote Test Runner error invocationexception e get Target Exception NON NLS 1  setUpTest setUpTest setupTest reloadedTestClass reloadedTest reloadedTestClass getMethod SET_UP_TEST_METHOD_NAME SecurityException reloadedTest NoSuchMethodException reloadedTest getReturnType JUnitMessages getString RemoteTestRunner isPublic getModifiers JUnitMessages getString RemoteTestRunner isStatic getModifiers JUnitMessages getString RemoteTestRunner reloadedTest JUnitMessages getString RemoteTestRunner IllegalArgumentException JUnitMessages getFormattedString RemoteTestRunner IllegalAccessException JUnitMessages getFormattedString RemoteTestRunner InvocationTargetException JUnitMessages getFormattedString RemoteTestRunner getTargetException
private Test warning final String message return new Test Case warning NON NLS 1 protected void run Test fail message  TestCase runTest
Returns a test which will fail and log a warning message private Test warning final String message return new Test Case warning NON NLS 1 protected void run Test fail message  TestCase runTest
private Test create Test String test Name Class test Class Class class Args String class Test test Constructor constructor null try try constructor test Class get Constructor class Args test Test constructor new Instance new Object test Name catch No Such Method Exception e try the no arg constructor supported in 3 8 1 constructor test Class get Constructor new Class 0 test Test constructor new Instance new Object 0 if test instanceof Test Case Test Case test set Name test Name if test null return test catch Instantiation Exception e catch Illegal Access Exception e catch Invocation Target Exception e catch No Such Method Exception e catch Class Cast Exception e return warning Could not create test test Name NON NLS 1 NON NLS 2  createTest testName testClass classArgs testClass getConstructor classArgs newInstance testName NoSuchMethodException testClass getConstructor newInstance TestCase TestCase setName testName InstantiationException IllegalAccessException InvocationTargetException NoSuchMethodException ClassCastException testName
see Test Listener add Error Test Throwable public final void add Error Test test Throwable throwable notify Test Failed test Message Ids TEST ERROR get Trace throwable  TestListener addError addError notifyTestFailed MessageIds TEST_ERROR getTrace
public final void add Failure Test test Assertion Failed Error assertion Failed Error if 3 equals f Version NON NLS 1 if is Comparison Failure assertion Failed Error transmit the expected and the actual string String expected get Field assertion Failed Error f Expected NON NLS 1 String actual get Field assertion Failed Error f Actual NON NLS 1 if expected null actual null notify Test Failed2 test Message Ids TEST FAILED get Trace assertion Failed Error expected actual return notify Test Failed test Message Ids TEST FAILED get Trace assertion Failed Error  addFailure AssertionFailedError assertionFailedError fVersion isComparisonFailure assertionFailedError getField assertionFailedError fExpected getField assertionFailedError fActual notifyTestFailed2 MessageIds TEST_FAILED getTrace assertionFailedError notifyTestFailed MessageIds TEST_FAILED getTrace assertionFailedError
private boolean is Comparison Failure Throwable throwable avoid reference to comparison failure to avoid a dependency on 3 8 1 return throwable get Class get Name equals junit framework Comparison Failure NON NLS 1  isComparisonFailure getClass getName ComparisonFailure
see Test Listener end Test Test public void end Test Test test notify Test Ended test  TestListener endTest endTest notifyTestEnded
see Test Listener start Test Test public void start Test Test test notify Test Started test  TestListener startTest startTest notifyTestStarted
private void send Tree Test test if test instanceof Test Decorator Test Decorator decorator Test Decorator test send Tree decorator get Test else if test instanceof Test Suite Test Suite suite Test Suite test notify Test Tree Entry get Test Id test escape Comma suite to String trim true suite test Count for int i 0 i suite test Count i send Tree suite test At i else notify Test Tree Entry get Test Id test escape Comma get Test Name test trim false test count Test Cases  sendTree TestDecorator TestDecorator TestDecorator sendTree getTest TestSuite TestSuite TestSuite notifyTestTreeEntry getTestId escapeComma toString testCount testCount sendTree testAt notifyTestTreeEntry getTestId escapeComma getTestName countTestCases
private String escape Comma String s if s index Of 0 s index Of 0 return s String Buffer sb new String Buffer s length 10 for int i 0 i s length i char c s char At i if c sb append NON NLS 1 else if c sb append NON NLS 1 else sb append c return sb to String  escapeComma indexOf indexOf StringBuffer StringBuffer charAt toString
private String get Test Id Test test return Integer to String System identity Hash Code test  getTestId toString identityHashCode
private String get Test Name Test test if test instanceof Test Case Test Case test Case Test Case test return J Unit Messages get Formatted String Remote Test Runner test Name new String test Case get Name test get Class get Name NON NLS 1 if test instanceof Test Suite Test Suite suite Test Suite test if suite get Name null return suite get Name return get Class get Name return test to String  getTestName TestCase TestCase testCase TestCase JUnitMessages getFormattedString RemoteTestRunner testName testCase getName getClass getName TestSuite TestSuite TestSuite getName getName getClass getName toString
Returns the stack trace for the given throwable private String get Trace Throwable t String Writer string Writer new String Writer Print Writer writer new Print Writer string Writer t print Stack Trace writer String Buffer buffer string Writer get Buffer return buffer to String  getTrace StringWriter stringWriter StringWriter PrintWriter PrintWriter stringWriter printStackTrace StringBuffer stringWriter getBuffer toString
Stop the current test run protected void stop if f Test Result null f Test Result stop  fTestResult fTestResult
Connect to the remote test listener private boolean connect if f Debug Mode System out println Remote Test Runner trying to connect f Host f Port NON NLS 1 NON NLS 2 Exception exception null for int i 1 i 20 i try f Client Socket new Socket f Host f Port try f Writer new Print Writer new Buffered Writer new Output Stream Writer f Client Socket get Output Stream UTF 8 false true NON NLS 1 catch Unsupported Encoding Exception e1 f Writer new Print Writer new Buffered Writer new Output Stream Writer f Client Socket get Output Stream false true try f Reader new Buffered Reader new Input Stream Reader f Client Socket get Input Stream UTF 8 NON NLS 1 catch Unsupported Encoding Exception e1 f Reader new Buffered Reader new Input Stream Reader f Client Socket get Input Stream f Reader Thread new Reader Thread f Reader Thread start return true catch IO Exception e exception e try Thread sleep 2000 catch Interrupted Exception e run Failed J Unit Messages get Formatted String Remote Test Runner error connect new String f Host Integer to String f Port NON NLS 1 exception print Stack Trace return false  fDebugMode RemoteTestRunner fHost fPort fClientSocket fHost fPort fWriter PrintWriter BufferedWriter OutputStreamWriter fClientSocket getOutputStream UnsupportedEncodingException fWriter PrintWriter BufferedWriter OutputStreamWriter fClientSocket getOutputStream fReader BufferedReader InputStreamReader fClientSocket getInputStream UnsupportedEncodingException fReader BufferedReader InputStreamReader fClientSocket getInputStream fReaderThread ReaderThread fReaderThread IOException InterruptedException runFailed JUnitMessages getFormattedString RemoteTestRunner fHost toString fPort printStackTrace
Shutsdown the connection to the remote test listener private void shut Down if f Writer null f Writer close f Writer null try if f Reader Thread null interrupt reader thread so that we don t block on close on a lock held by the Buffered Reader fix for bug 38955 f Reader Thread interrupt if f Reader null f Reader close f Reader null catch IO Exception e if f Debug Mode e print Stack Trace try if f Client Socket null f Client Socket close f Client Socket null catch IO Exception e if f Debug Mode e print Stack Trace  shutDown fWriter fWriter fWriter fReaderThread BufferedReader fReaderThread fReader fReader fReader IOException fDebugMode printStackTrace fClientSocket fClientSocket fClientSocket IOException fDebugMode printStackTrace
private void send Message String msg if f Writer null return f Writer println msg  sendMessage fWriter fWriter
private void notify Test Run Started int test Count send Message Message Ids TEST RUN START test Count v2 NON NLS 1 NON NLS 2  notifyTestRunStarted testCount sendMessage MessageIds TEST_RUN_START testCount
private void notify Test Run Ended long elapsed Time send Message Message Ids TEST RUN END elapsed Time f Writer flush shut Down  notifyTestRunEnded elapsedTime sendMessage MessageIds TEST_RUN_END elapsedTime fWriter shutDown
private void notify Test Run Stopped long elapsed Time send Message Message Ids TEST STOPPED elapsed Time f Writer flush shut Down  notifyTestRunStopped elapsedTime sendMessage MessageIds TEST_STOPPED elapsedTime fWriter shutDown
private void notify Test Started Test test send Message Message Ids TEST START get Test Id test test to String f Writer flush  notifyTestStarted sendMessage MessageIds TEST_START getTestId toString fWriter
private void notify Test Ended Test test send Message Message Ids TEST END get Test Id test get Test Name test  notifyTestEnded sendMessage MessageIds TEST_END getTestId getTestName
private void notify Test Failed Test test String status String trace send Message status get Test Id test get Test Name test send Message Message Ids TRACE START send Message trace send Message Message Ids TRACE END f Writer flush  notifyTestFailed sendMessage getTestId getTestName sendMessage MessageIds TRACE_START sendMessage sendMessage MessageIds TRACE_END fWriter
private void notify Test Failed2 Test test String status String trace String expected String actual send Message status get Test Id test get Test Name test send Message Message Ids EXPECTED START send Message expected send Message Message Ids EXPECTED END send Message Message Ids ACTUAL START send Message actual send Message Message Ids ACTUAL END send Message Message Ids TRACE START send Message trace send Message Message Ids TRACE END f Writer flush  notifyTestFailed2 sendMessage getTestId getTestName sendMessage MessageIds EXPECTED_START sendMessage sendMessage MessageIds EXPECTED_END sendMessage MessageIds ACTUAL_START sendMessage sendMessage MessageIds ACTUAL_END sendMessage MessageIds TRACE_START sendMessage sendMessage MessageIds TRACE_END fWriter
private void notify Test Tree Entry String tree Entry send Message Message Ids TEST TREE tree Entry  notifyTestTreeEntry treeEntry sendMessage MessageIds TEST_TREE treeEntry
private void notify Test Reran Test Result result String test Id String test Class String test Name Test Failure failure null if result error Count 0 failure Test Failure result errors next Element if result failure Count 0 failure Test Failure result failures next Element if failure null Throwable t failure thrown Exception if 3 equals f Version NON NLS 1 if is Comparison Failure t transmit the expected and the actual string String expected get Field t f Expected NON NLS 1 String actual get Field t f Actual NON NLS 1 if expected null actual null send Message Message Ids EXPECTED START send Message expected send Message Message Ids EXPECTED END send Message Message Ids ACTUAL START send Message actual send Message Message Ids ACTUAL END String trace get Trace t send Message Message Ids RTRACE START send Message trace send Message Message Ids RTRACE END f Writer flush String status OK NON NLS 1 if result error Count 0 status ERROR NON NLS 1 else if result failure Count 0 status FAILURE NON NLS 1 if f Port 1 send Message Message Ids TEST RERAN test Id test Class test Name status NON NLS 1 NON NLS 2 NON NLS 3 f Writer flush  notifyTestReran TestResult testId testClass testName TestFailure errorCount TestFailure nextElement failureCount TestFailure nextElement thrownException fVersion isComparisonFailure getField fExpected getField fActual sendMessage MessageIds EXPECTED_START sendMessage sendMessage MessageIds EXPECTED_END sendMessage MessageIds ACTUAL_START sendMessage sendMessage MessageIds ACTUAL_END getTrace sendMessage MessageIds RTRACE_START sendMessage sendMessage MessageIds RTRACE_END fWriter errorCount failureCount fPort sendMessage MessageIds TEST_RERAN testId testClass testName fWriter
private String get Field Object object String field Name Class clazz object get Class try Field field clazz get Declared Field field Name field set Accessible true Object result field get object return result to String catch Exception e fall through return null  getField fieldName getClass getDeclaredField fieldName setAccessible toString

public class Compare Result Dialog extends Dialog private static class Compare Result Merge Viewer extends Text Merge Viewer private Compare Result Merge Viewer Composite parent int style Compare Configuration configuration super parent style configuration  CompareResultDialog CompareResultMergeViewer TextMergeViewer CompareResultMergeViewer CompareConfiguration
protected void configure Text Viewer Text Viewer text Viewer if text Viewer instanceof Source Viewer Source Viewer text Viewer configure new Compare Result Viewer Configuration  configureTextViewer TextViewer textViewer textViewer SourceViewer SourceViewer textViewer CompareResultViewerConfiguration
private I Document f Document public void set Document I Document document f Document document  IDocument fDocument setDocument IDocument fDocument
public I Region get Damage Region I Typed Region partition Document Event event boolean changed return new Region 0 f Document get Length  IRegion getDamageRegion ITypedRegion DocumentEvent fDocument getLength
public void create Presentation Text Presentation presentation I Typed Region damage int suffix Compare Result Dialog fg This f Suffix int prefix Compare Result Dialog fg This f Prefix Text Attribute attr new Text Attribute Display get Default get System Color SWT COLOR RED null SWT BOLD presentation add Style Range new Style Range prefix f Document get Length suffix prefix attr get Foreground attr get Background attr get Style  createPresentation TextPresentation ITypedRegion CompareResultDialog fgThis fSuffix CompareResultDialog fgThis fPrefix TextAttribute TextAttribute getDefault getSystemColor COLOR_RED addStyleRange StyleRange fDocument getLength getForeground getBackground getStyle
public I Presentation Reconciler get Presentation Reconciler I Source Viewer source Viewer Presentation Reconciler reconciler new Presentation Reconciler Simple Damager Repairer dr new Simple Damager Repairer reconciler set Damager dr I Document DEFAULT CONTENT TYPE reconciler set Repairer dr I Document DEFAULT CONTENT TYPE return reconciler  IPresentationReconciler getPresentationReconciler ISourceViewer sourceViewer PresentationReconciler PresentationReconciler SimpleDamagerRepairer SimpleDamagerRepairer setDamager IDocument DEFAULT_CONTENT_TYPE setRepairer IDocument DEFAULT_CONTENT_TYPE
private String f Content public Compare Element String content f Content content  fContent CompareElement fContent
f Content content public String get Name return no name NON NLS 1  fContent getName
return no name NON NLS 1 public Image get Image return null  getImage
return null public String get Type return txt NON NLS 1  getType
public Input Stream get Contents try return new Byte Array Input Stream f Content get Bytes UTF 8 NON NLS 1 catch Unsupported Encoding Exception e return new Byte Array Input Stream f Content get Bytes  InputStream getContents ByteArrayInputStream fContent getBytes UnsupportedEncodingException ByteArrayInputStream fContent getBytes
public String get Charset throws Core Exception return UTF 8 NON NLS 1  getCharset CoreException
public Compare Result Dialog Shell parent Shell Test Run Info failure super parent Shell fg This this set Shell Style get Shell Style SWT RESIZE SWT MAX f Test Name failure get Test Name f Expected failure get Expected f Actual failure get Actual compute Prefix Suffix f Settings J Unit Plugin get Default get Dialog Settings  CompareResultDialog parentShell TestRunInfo parentShell fgThis setShellStyle getShellStyle fTestName getTestName fExpected getExpected fActual getActual computePrefixSuffix fSettings JUnitPlugin getDefault getDialogSettings
s add Control Listener new Control Listener public void control Moved Control Event arg f New Bounds s get Bounds  addControlListener ControlListener controlMoved ControlEvent fNewBounds getBounds
f New Bounds s get Bounds public void control Resized Control Event arg f New Bounds s get Bounds  fNewBounds getBounds controlResized ControlEvent fNewBounds getBounds
protected Point get Initial Size int width 0 int height 0 final Shell s get Shell if s null s add Control Listener new Control Listener public void control Moved Control Event arg f New Bounds s get Bounds public void control Resized Control Event arg f New Bounds s get Bounds I Dialog Settings bounds f Settings get Section DIALOG BOUNDS KEY if bounds null return super get Initial Size else try width bounds get Int WIDTH catch Number Format Exception e width 400 try height bounds get Int HEIGHT catch Number Format Exception e height 300 return new Point width height  getInitialSize getShell addControlListener ControlListener controlMoved ControlEvent fNewBounds getBounds controlResized ControlEvent fNewBounds getBounds IDialogSettings fSettings getSection DIALOG_BOUNDS_KEY getInitialSize getInt NumberFormatException getInt NumberFormatException
protected Point get Initial Location Point initial Size Point loc super get Initial Location initial Size I Dialog Settings bounds f Settings get Section DIALOG BOUNDS KEY if bounds null try loc x bounds get Int X catch Number Format Exception e try loc y bounds get Int Y catch Number Format Exception e return loc  getInitialLocation initialSize getInitialLocation initialSize IDialogSettings fSettings getSection DIALOG_BOUNDS_KEY getInt NumberFormatException getInt NumberFormatException
public boolean close boolean closed super close if closed f New Bounds null save Bounds f New Bounds return closed  fNewBounds saveBounds fNewBounds
private void save Bounds Rectangle bounds I Dialog Settings dialog Bounds f Settings get Section DIALOG BOUNDS KEY if dialog Bounds null dialog Bounds new Dialog Settings DIALOG BOUNDS KEY f Settings add Section dialog Bounds dialog Bounds put X bounds x dialog Bounds put Y bounds y dialog Bounds put WIDTH bounds width dialog Bounds put HEIGHT bounds height  saveBounds IDialogSettings dialogBounds fSettings getSection DIALOG_BOUNDS_KEY dialogBounds dialogBounds DialogSettings DIALOG_BOUNDS_KEY fSettings addSection dialogBounds dialogBounds dialogBounds dialogBounds dialogBounds
private void compute Prefix Suffix int end Math min f Expected length f Actual length int i 0 for i end i if f Expected char At i f Actual char At i break f Prefix i int j f Expected length 1 int k f Actual length 1 int l 0 for k f Prefix j f Prefix k j if f Expected char At j f Actual char At k break l f Suffix l  computePrefixSuffix fExpected fActual fExpected charAt fActual charAt fPrefix fExpected fActual fPrefix fPrefix fExpected charAt fActual charAt fSuffix
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text J Unit Messages get String Compare Result Dialog title NON NLS 1  configureShell newShell configureShell newShell newShell setText JUnitMessages getString CompareResultDialog
protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants OK ID J Unit Messages get String Compare Result Dialog labelOK true NON NLS 1  createButtonsForButtonBar createButton IDialogConstants OK_ID JUnitMessages getString CompareResultDialog
protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent Grid Layout layout new Grid Layout layout num Columns 1 composite set Layout layout Compare Viewer Pane pane new Compare Viewer Pane composite SWT BORDER SWT FLAT pane set Text f Test Name Grid Data data new Grid Data Grid Data FILL HORIZONTAL Grid Data FILL VERTICAL data width Hint convert Width In Chars To Pixels 120 data height Hint convert Height In Chars To Pixels 13 pane set Layout Data data Control previewer create Previewer pane pane set Content previewer Grid Data gd new Grid Data Grid Data FILL BOTH previewer set Layout Data gd apply Dialog Font parent return composite  createDialogArea createDialogArea GridLayout GridLayout numColumns setLayout CompareViewerPane CompareViewerPane setText fTestName GridData GridData GridData FILL_HORIZONTAL GridData FILL_VERTICAL widthHint convertWidthInCharsToPixels heightHint convertHeightInCharsToPixels setLayoutData createPreviewer setContent GridData GridData GridData FILL_BOTH setLayoutData applyDialogFont
Control control f Viewer get Control control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if compare Configuration null compare Configuration dispose  fViewer getControl addDisposeListener DisposeListener widgetDisposed DisposeEvent compareConfiguration compareConfiguration
private Control create Previewer Composite parent final Compare Configuration compare Configuration new Compare Configuration compare Configuration set Left Label J Unit Messages get String Compare Result Dialog expected Label NON NLS 1 compare Configuration set Left Editable false compare Configuration set Right Label J Unit Messages get String Compare Result Dialog actual Label NON NLS 1 compare Configuration set Right Editable false compare Configuration set Property Compare Configuration IGNORE WHITESPACE new Boolean false f Viewer new Compare Result Merge Viewer parent SWT NONE compare Configuration f Viewer set Input new Diff Node new Compare Element f Expected new Compare Element f Actual Control control f Viewer get Control control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if compare Configuration null compare Configuration dispose return control  createPreviewer CompareConfiguration compareConfiguration CompareConfiguration compareConfiguration setLeftLabel JUnitMessages getString CompareResultDialog expectedLabel compareConfiguration setLeftEditable compareConfiguration setRightLabel JUnitMessages getString CompareResultDialog actualLabel compareConfiguration setRightEditable compareConfiguration setProperty CompareConfiguration IGNORE_WHITESPACE fViewer CompareResultMergeViewer compareConfiguration fViewer setInput DiffNode CompareElement fExpected CompareElement fActual fViewer getControl addDisposeListener DisposeListener widgetDisposed DisposeEvent compareConfiguration compareConfiguration

public Compare Results Action Failure Trace view super J Unit Messages get String Compare Results Action label NON NLS 1 set Description J Unit Messages get String Compare Results Action description NON NLS 1 set Tool Tip Text J Unit Messages get String Compare Results Action tooltip NON NLS 1 set Disabled Image Descriptor J Unit Plugin get Image Descriptor dlcl16 compare gif NON NLS 1 set Hover Image Descriptor J Unit Plugin get Image Descriptor elcl16 compare gif NON NLS 1 set Image Descriptor J Unit Plugin get Image Descriptor elcl16 compare gif NON NLS 1 Workbench Help set Help this IJ Unit Help Context Ids ENABLEFILTER ACTION f View view  CompareResultsAction FailureTrace JUnitMessages getString CompareResultsAction setDescription JUnitMessages getString CompareResultsAction setToolTipText JUnitMessages getString CompareResultsAction setDisabledImageDescriptor JUnitPlugin getImageDescriptor setHoverImageDescriptor JUnitPlugin getImageDescriptor setImageDescriptor JUnitPlugin getImageDescriptor WorkbenchHelp setHelp IJUnitHelpContextIds ENABLEFILTER_ACTION fView
public void run Compare Result Dialog dialog new Compare Result Dialog f View get Shell f View get Failed Test dialog create dialog open  CompareResultDialog CompareResultDialog fView getShell fView getFailedTest

Constructor for Copy Failure List Action public Copy Failure List Action Test Runner View Part runner Failure Tab view Clipboard clipboard super J Unit Messages get String Copy Failure List action label NON NLS 1 Workbench Help set Help this IJ Unit Help Context Ids COPYFAILURELIST ACTION f View view f Clipboard clipboard  CopyFailureListAction CopyFailureListAction TestRunnerViewPart FailureTab JUnitMessages getString CopyFailureList WorkbenchHelp setHelp IJUnitHelpContextIds COPYFAILURELIST_ACTION fView fClipboard
public void run Text Transfer plain Text Transfer Text Transfer get Instance try f Clipboard set Contents new String f View get All Failed Test Names new Transfer plain Text Transfer catch SWT Error e if e code DND ERROR CANNOT SET CLIPBOARD throw e if Message Dialog open Question Java Plugin get Active Workbench Shell J Unit Messages get String Copy Failure List problem J Unit Messages get String Copy Failure List clipboard busy NON NLS 1 NON NLS 2 run  TextTransfer plainTextTransfer TextTransfer getInstance fClipboard setContents fView getAllFailedTestNames plainTextTransfer SWTError ERROR_CANNOT_SET_CLIPBOARD MessageDialog openQuestion JavaPlugin getActiveWorkbenchShell JUnitMessages getString CopyFailureList JUnitMessages getString CopyFailureList clipboard_busy

Constructor for Copy Trace Action public Copy Trace Action Failure Trace view Clipboard clipboard super J Unit Messages get String Copy Trace action label NON NLS 1 Assert is Not Null clipboard Workbench Help set Help this IJ Unit Help Context Ids COPYTRACE ACTION f View view f Clipboard clipboard  CopyTraceAction CopyTraceAction FailureTrace JUnitMessages getString CopyTrace isNotNull WorkbenchHelp setHelp IJUnitHelpContextIds COPYTRACE_ACTION fView fClipboard
public void run String trace f View get Trace if trace null trace NON NLS 1 Text Transfer plain Text Transfer Text Transfer get Instance try f Clipboard set Contents new String convert Line Terminators trace new Transfer plain Text Transfer catch SWT Error e if e code DND ERROR CANNOT SET CLIPBOARD throw e if Message Dialog open Question f View get Composite get Shell J Unit Messages get String Copy Trace Action problem J Unit Messages get String Copy Trace Action clipboard busy NON NLS 1 NON NLS 2 run  fView getTrace TextTransfer plainTextTransfer TextTransfer getInstance fClipboard setContents convertLineTerminators plainTextTransfer SWTError ERROR_CANNOT_SET_CLIPBOARD MessageDialog openQuestion fView getComposite getShell JUnitMessages getString CopyTraceAction JUnitMessages getString CopyTraceAction clipboard_busy
private String convert Line Terminators String in String Writer string Writer new String Writer Print Writer print Writer new Print Writer string Writer String Reader string Reader new String Reader in Buffered Reader buffered Reader new Buffered Reader string Reader String line try while line buffered Reader read Line null print Writer println line catch IO Exception e return in return the trace unfiltered return string Writer to String  convertLineTerminators StringWriter stringWriter StringWriter PrintWriter printWriter PrintWriter stringWriter StringReader stringReader StringReader BufferedReader bufferedReader BufferedReader stringReader bufferedReader readLine printWriter IOException stringWriter toString

add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dispose Icons  addDisposeListener DisposeListener widgetDisposed DisposeEvent disposeIcons
public Counter Panel Composite parent super parent SWT WRAP Grid Layout grid Layout new Grid Layout grid Layout num Columns 9 grid Layout make Columns Equal Width false grid Layout margin Width 0 set Layout grid Layout f Number Of Runs create Label J Unit Messages get String Counter Panel label runs null 0 0 NON NLS 1 NON NLS 2 f Number Of Errors create Label J Unit Messages get String Counter Panel label errors f Error Icon 0 NON NLS 1 NON NLS 2 f Number Of Failures create Label J Unit Messages get String Counter Panel label failures f Failure Icon 0 NON NLS 1 NON NLS 2 add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dispose Icons  CounterPanel GridLayout gridLayout GridLayout gridLayout numColumns gridLayout makeColumnsEqualWidth gridLayout marginWidth setLayout gridLayout fNumberOfRuns createLabel JUnitMessages getString CounterPanel fNumberOfErrors createLabel JUnitMessages getString CounterPanel fErrorIcon fNumberOfFailures createLabel JUnitMessages getString CounterPanel fFailureIcon addDisposeListener DisposeListener widgetDisposed DisposeEvent disposeIcons
private void dispose Icons f Error Icon dispose f Failure Icon dispose  disposeIcons fErrorIcon fFailureIcon
private Text create Label String name Image image String init Label label new Label this SWT NONE if image null image set Background label get Background label set Image image label set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING label new Label this SWT NONE label set Text name label set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING label set Font J Face Resources get Banner Font Text value new Text this SWT READ ONLY value set Text init bug 39661 Junit test counters do not repaint correctly J Unit value set Background get Display get System Color SWT COLOR WIDGET BACKGROUND value set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Data HORIZONTAL ALIGN BEGINNING return value  createLabel setBackground getBackground setImage setLayoutData GridData GridData HORIZONTAL_ALIGN_BEGINNING setText setLayoutData GridData GridData HORIZONTAL_ALIGN_BEGINNING setFont JFaceResources getBannerFont READ_ONLY setText JUnit setBackground getDisplay getSystemColor COLOR_WIDGET_BACKGROUND setLayoutData GridData GridData FILL_HORIZONTAL GridData HORIZONTAL_ALIGN_BEGINNING
public void reset set Error Value 0 set Failure Value 0 set Run Value 0 f Total 0  setErrorValue setFailureValue setRunValue fTotal
public void set Total int value f Total value  setTotal fTotal
public int get Total return f Total  getTotal fTotal
public void set Run Value int value String run String J Unit Messages get Formatted String Counter Panel runcount new String Integer to String value Integer to String f Total NON NLS 1 f Number Of Runs set Text run String f Number Of Runs redraw redraw  setRunValue runString JUnitMessages getFormattedString CounterPanel toString toString fTotal fNumberOfRuns setText runString fNumberOfRuns
public void set Error Value int value f Number Of Errors set Text Integer to String value redraw  setErrorValue fNumberOfErrors setText toString
public void set Failure Value int value f Number Of Failures set Text Integer to String value redraw  setFailureValue fNumberOfFailures setText toString

public Enable Stack Filter Action Failure Trace view super J Unit Messages get String Enable Stack Filter Action action label NON NLS 1 set Description J Unit Messages get String Enable Stack Filter Action action description NON NLS 1 set Tool Tip Text J Unit Messages get String Enable Stack Filter Action action tooltip NON NLS 1 set Disabled Image Descriptor J Unit Plugin get Image Descriptor dlcl16 cfilter gif NON NLS 1 set Hover Image Descriptor J Unit Plugin get Image Descriptor elcl16 cfilter gif NON NLS 1 set Image Descriptor J Unit Plugin get Image Descriptor elcl16 cfilter gif NON NLS 1 Workbench Help set Help this IJ Unit Help Context Ids ENABLEFILTER ACTION f View view set Checked J Unit Preference Page get Filter Stack  EnableStackFilterAction FailureTrace JUnitMessages getString EnableStackFilterAction setDescription JUnitMessages getString EnableStackFilterAction setToolTipText JUnitMessages getString EnableStackFilterAction setDisabledImageDescriptor JUnitPlugin getImageDescriptor setHoverImageDescriptor JUnitPlugin getImageDescriptor setImageDescriptor JUnitPlugin getImageDescriptor WorkbenchHelp setHelp IJUnitHelpContextIds ENABLEFILTER_ACTION fView setChecked JUnitPreferencePage getFilterStack
see Action action Performed public void run J Unit Preference Page set Filter Stack is Checked f View refresh  actionPerformed JUnitPreferencePage setFilterStack isChecked fView

private final Image f Failure Tab Icon Test Runner View Part create Image obj16 failures gif NON NLS 1 public Failure Tab  fFailureTabIcon TestRunnerViewPart createImage FailureTab
public void create Tab Control C Tab Folder tab Folder Clipboard clipboard Test Runner View Part runner f Runner View Part runner f Clipboard clipboard C Tab Item failure Tab new C Tab Item tab Folder SWT NONE failure Tab set Text get Name failure Tab set Image f Failure Tab Icon Composite composite new Composite tab Folder SWT NONE Grid Layout grid Layout new Grid Layout grid Layout margin Height 0 grid Layout margin Width 0 composite set Layout grid Layout Grid Data grid Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN FILL Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL composite set Layout Data grid Data f Table new Table composite SWT NONE grid Layout new Grid Layout grid Layout margin Height 0 grid Layout margin Width 0 f Table set Layout grid Layout grid Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN FILL Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL f Table set Layout Data grid Data failure Tab set Control composite failure Tab set Tool Tip Text J Unit Messages get String Failure Run View tab tooltip NON NLS 1 init Menu add Listeners  createTabControl CTabFolder tabFolder TestRunnerViewPart fRunnerViewPart fClipboard CTabItem failureTab CTabItem tabFolder failureTab setText getName failureTab setImage fFailureTabIcon tabFolder GridLayout gridLayout GridLayout gridLayout marginHeight gridLayout marginWidth setLayout gridLayout GridData gridData GridData GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL setLayoutData gridData fTable gridLayout GridLayout gridLayout marginHeight gridLayout marginWidth fTable setLayout gridLayout gridData GridData GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL fTable setLayoutData gridData failureTab setControl failureTab setToolTipText JUnitMessages getString FailureRunView initMenu addListeners
private void dispose Icons f Error Icon dispose f Failure Icon dispose f Failure Tab Icon dispose  disposeIcons fErrorIcon fFailureIcon fFailureTabIcon
private void init Menu Menu Manager menu Mgr new Menu Manager menu Mgr set Remove All When Shown true menu Mgr add Menu Listener this Menu menu menu Mgr create Context Menu f Table f Table set Menu menu  initMenu MenuManager menuMgr MenuManager menuMgr setRemoveAllWhenShown menuMgr addMenuListener menuMgr createContextMenu fTable fTable setMenu
public String get Name return J Unit Messages get String Failure Run View tab title NON NLS 1  getName JUnitMessages getString FailureRunView
public String get Selected Test Id int index f Table get Selection Index if index 1 return null return get Test Info f Table get Item index get Test Id  getSelectedTestId fTable getSelectionIndex getTestInfo fTable getItem getTestId
public String get All Failed Test Names String Buffer trace new String Buffer String line Delim System get Property line separator n NON NLS 1 NON NLS 2 for int i 0 i f Table get Item Count i Test Run Info test Info get Test Info f Table get Item i trace append test Info get Test Name append line Delim String failure Trace test Info get Trace if failure Trace null String Reader string Reader new String Reader failure Trace Buffered Reader buffered Reader new Buffered Reader string Reader String line try while line buffered Reader read Line null trace append line line Delim catch IO Exception e trace append line Delim return trace to String  getAllFailedTestNames StringBuffer StringBuffer lineDelim getProperty fTable getItemCount TestRunInfo testInfo getTestInfo fTable getItem testInfo getTestName lineDelim failureTrace testInfo getTrace failureTrace StringReader stringReader StringReader failureTrace BufferedReader bufferedReader BufferedReader stringReader bufferedReader readLine lineDelim IOException lineDelim toString
private String get Class Name Table Item item get Selected Item Test Run Info info get Test Info item return info get Class Name  getClassName TableItem getSelectedItem TestRunInfo getTestInfo getClassName
private String get Method Name Table Item item get Selected Item Test Run Info info get Test Info item return info get Test Method Name  getMethodName TableItem getSelectedItem TestRunInfo getTestInfo getTestMethodName
public void menu About To Show I Menu Manager manager if f Table get Selection Count 0 String class Name get Class Name String method Name get Method Name if class Name null manager add new Open Test Action f Runner View Part class Name method Name manager add new Separator manager add new Rerun Action f Runner View Part get Selected Test Id class Name method Name I Launch Manager RUN MODE if f Runner View Part last Launch Is Kept Alive manager add new Rerun Action f Runner View Part get Selected Test Id class Name method Name I Launch Manager DEBUG MODE manager add new Separator manager add new Copy Failure List Action f Runner View Part Failure Tab this f Clipboard  menuAboutToShow IMenuManager fTable getSelectionCount className getClassName methodName getMethodName className OpenTestAction fRunnerViewPart className methodName RerunAction fRunnerViewPart getSelectedTestId className methodName ILaunchManager RUN_MODE fRunnerViewPart lastLaunchIsKeptAlive RerunAction fRunnerViewPart getSelectedTestId className methodName ILaunchManager DEBUG_MODE CopyFailureListAction fRunnerViewPart FailureTab fClipboard
private Table Item get Selected Item int index f Table get Selection Index if index 1 return null return f Table get Item index  TableItem getSelectedItem fTable getSelectionIndex fTable getItem
public void set Selected Test String test Id Table Item items f Table get Items for int i 0 i items length i Table Item table Item items i Test Run Info info get Test Info table Item if info get Test Id equals test Id f Table set Selection new Table Item table Item f Table show Item table Item return  setSelectedTest testId TableItem fTable getItems TableItem tableItem TestRunInfo getTestInfo tableItem getTestId testId fTable setSelection TableItem tableItem fTable showItem tableItem
private Test Run Info get Test Info Table Item item return Test Run Info item get Data  TestRunInfo getTestInfo TableItem TestRunInfo getData
public void set Focus f Table set Focus  setFocus fTable setFocus
public void end Test String test Id Test Run Info test Info f Runner View Part get Test Info test Id if test Info null test Info get Status I Test Run Listener STATUS OK return Table Item table Item new Table Item f Table SWT NONE update Table Item test Info table Item f Table show Item table Item  endTest testId TestRunInfo testInfo fRunnerViewPart getTestInfo testId testInfo testInfo getStatus ITestRunListener STATUS_OK TableItem tableItem TableItem fTable updateTableItem testInfo tableItem fTable showItem tableItem
private void update Table Item Test Run Info test Info Table Item table Item String label J Unit Messages get Formatted String Failure Run View labelfmt new String test Info get Test Method Name test Info get Class Name NON NLS 1 table Item set Text label if test Info get Status I Test Run Listener STATUS FAILURE table Item set Image f Failure Icon else table Item set Image f Error Icon table Item set Data test Info  updateTableItem TestRunInfo testInfo TableItem tableItem JUnitMessages getFormattedString FailureRunView testInfo getTestMethodName testInfo getClassName tableItem setText testInfo getStatus ITestRunListener STATUS_FAILURE tableItem setImage fFailureIcon tableItem setImage fErrorIcon tableItem setData testInfo
private Table Item find Item String test Id Table Item items f Table get Items for int i 0 i items length i Test Run Info info get Test Info items i if info get Test Id equals test Id return items i return null  TableItem findItem testId TableItem fTable getItems TestRunInfo getTestInfo getTestId testId
public void activate f Move Selection false test Selected  fMoveSelection testSelected
public void about To Start f Move Selection false f Table remove All  aboutToStart fMoveSelection fTable removeAll
private void test Selected f Runner View Part handle Test Selected get Selected Test Id  testSelected fRunnerViewPart handleTestSelected getSelectedTestId
private void add Listeners f Table add Selection Listener new Selection Listener public void widget Selected Selection Event e activate  addListeners fTable addSelectionListener SelectionListener widgetSelected SelectionEvent
activate public void widget Default Selected Selection Event e activate  widgetDefaultSelected SelectionEvent
f Table add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dispose Icons  fTable addDisposeListener DisposeListener widgetDisposed DisposeEvent disposeIcons
f Table add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e handle Double Click e  fTable addMouseListener MouseAdapter mouseDoubleClick MouseEvent handleDoubleClick
handle Double Click e public void mouse Down Mouse Event e activate  handleDoubleClick mouseDown MouseEvent
activate public void mouse Up Mouse Event e activate  mouseUp MouseEvent
private void add Listeners f Table add Selection Listener new Selection Listener public void widget Selected Selection Event e activate public void widget Default Selected Selection Event e activate f Table add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dispose Icons f Table add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e handle Double Click e public void mouse Down Mouse Event e activate public void mouse Up Mouse Event e activate  addListeners fTable addSelectionListener SelectionListener widgetSelected SelectionEvent widgetDefaultSelected SelectionEvent fTable addDisposeListener DisposeListener widgetDisposed DisposeEvent disposeIcons fTable addMouseListener MouseAdapter mouseDoubleClick MouseEvent handleDoubleClick mouseDown MouseEvent mouseUp MouseEvent
void handle Double Click Mouse Event e if f Table get Selection Count 0 new Open Test Action f Runner View Part get Class Name get Method Name run  handleDoubleClick MouseEvent fTable getSelectionCount OpenTestAction fRunnerViewPart getClassName getMethodName
public void test Status Changed Test Run Info info Table Item item find Item info get Test Id if item null if info get Status I Test Run Listener STATUS OK item dispose return update Table Item info item if item null info get Status I Test Run Listener STATUS OK item new Table Item f Table SWT NONE update Table Item info item if item null f Table show Item item  testStatusChanged TestRunInfo TableItem findItem getTestId getStatus ITestRunListener STATUS_OK updateTableItem getStatus ITestRunListener STATUS_OK TableItem fTable updateTableItem fTable showItem
public void select Next if f Table get Item Count 0 return int index f Table get Selection Index if index 1 index 0 if f Move Selection index Math min f Table get Item Count 1 index 1 else f Move Selection true select Test index  selectNext fTable getItemCount fTable getSelectionIndex fMoveSelection fTable getItemCount fMoveSelection selectTest
public void select Previous if f Table get Item Count 0 return int index f Table get Selection Index if index 1 index f Table get Item Count 1 if f Move Selection index Math max 0 index 1 else f Move Selection true select Test index  selectPrevious fTable getItemCount fTable getSelectionIndex fTable getItemCount fMoveSelection fMoveSelection selectTest
private void select Test int index Table Item item f Table get Item index Test Run Info info get Test Info item f Runner View Part show Test info  selectTest TableItem fTable getItem TestRunInfo getTestInfo fRunnerViewPart showTest

handler add Open Listener new I Open Event Listener public void handle Open Selection Event e if f Table get Selection Index 0 f Failure is Comparison Failure new Compare Results Action Failure Trace this run if f Table get Selection length 0 Action a create Open Editor Action get Selected Text if a null a run  addOpenListener IOpenEventListener handleOpen SelectionEvent fTable getSelectionIndex fFailure isComparisonFailure CompareResultsAction FailureTrace fTable getSelection createOpenEditorAction getSelectedText
parent add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dispose Icons  addDisposeListener DisposeListener widgetDisposed DisposeEvent disposeIcons
public Failure Trace Composite parent Clipboard clipboard Test Runner View Part test Runner Tool Bar tool Bar Assert is Not Null clipboard fill the failure trace viewer toolbar Tool Bar Manager failure Tool Barmanager new Tool Bar Manager tool Bar failure Tool Barmanager add new Enable Stack Filter Action this f Compare Action new Compare Results Action this f Compare Action set Enabled false failure Tool Barmanager add f Compare Action failure Tool Barmanager update true f Table new Table parent SWT SINGLE SWT V SCROLL SWT H SCROLL f Test Runner test Runner f Clipboard clipboard Open Strategy handler new Open Strategy f Table handler add Open Listener new I Open Event Listener public void handle Open Selection Event e if f Table get Selection Index 0 f Failure is Comparison Failure new Compare Results Action Failure Trace this run if f Table get Selection length 0 Action a create Open Editor Action get Selected Text if a null a run init Menu parent add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dispose Icons  FailureTrace TestRunnerViewPart testRunner ToolBar toolBar isNotNull ToolBarManager failureToolBarmanager ToolBarManager toolBar failureToolBarmanager EnableStackFilterAction fCompareAction CompareResultsAction fCompareAction setEnabled failureToolBarmanager fCompareAction failureToolBarmanager fTable V_SCROLL H_SCROLL fTestRunner testRunner fClipboard OpenStrategy OpenStrategy fTable addOpenListener IOpenEventListener handleOpen SelectionEvent fTable getSelectionIndex fFailure isComparisonFailure CompareResultsAction FailureTrace fTable getSelection createOpenEditorAction getSelectedText initMenu addDisposeListener DisposeListener widgetDisposed DisposeEvent disposeIcons
private void init Menu Menu Manager menu Mgr new Menu Manager menu Mgr set Remove All When Shown true menu Mgr add Menu Listener this Menu menu menu Mgr create Context Menu f Table f Table set Menu menu  initMenu MenuManager menuMgr MenuManager menuMgr setRemoveAllWhenShown menuMgr addMenuListener menuMgr createContextMenu fTable fTable setMenu
public void menu About To Show I Menu Manager manager if f Table get Selection Count 0 Action a create Open Editor Action get Selected Text if a null manager add a manager add new Copy Trace Action Failure Trace this f Clipboard if f Failure is Comparison Failure manager add new Compare Results Action Failure Trace this  menuAboutToShow IMenuManager fTable getSelectionCount createOpenEditorAction getSelectedText CopyTraceAction FailureTrace fClipboard fFailure isComparisonFailure CompareResultsAction FailureTrace
public String get Trace return f Input Trace  getTrace fInputTrace
private String get Selected Text return f Table get Selection 0 get Text  getSelectedText fTable getSelection getText
private Action create Open Editor Action String trace Line try TODO works for JDK stack trace only String test Name trace Line test Name test Name substring test Name index Of FRAME PREFIX NON NLS 1 test Name test Name substring FRAME PREFIX length test Name index Of trim test Name test Name substring 0 test Name last Index Of int inner Separator Index test Name index Of if inner Separator Index 1 test Name test Name substring 0 inner Separator Index String line Number trace Line line Number line Number substring line Number index Of 1 line Number index Of int line Integer value Of line Number int Value fix for bug 37333 String cu Name trace Line substring trace Line index Of 1 trace Line index Of return new Open Editor At Line Action f Test Runner cu Name test Name line catch Number Format Exception e catch Index Out Of Bounds Exception e return null  createOpenEditorAction traceLine testName traceLine testName testName testName indexOf FRAME_PREFIX testName testName FRAME_PREFIX testName indexOf testName testName testName lastIndexOf innerSeparatorIndex testName indexOf innerSeparatorIndex testName testName innerSeparatorIndex lineNumber traceLine lineNumber lineNumber lineNumber indexOf lineNumber indexOf valueOf lineNumber intValue cuName traceLine traceLine indexOf traceLine indexOf OpenEditorAtLineAction fTestRunner cuName testName NumberFormatException IndexOutOfBoundsException
private void dispose Icons if f Exception Icon null f Exception Icon is Disposed f Exception Icon dispose if f Stack Icon null f Stack Icon is Disposed f Stack Icon dispose  disposeIcons fExceptionIcon fExceptionIcon isDisposed fExceptionIcon fStackIcon fStackIcon isDisposed fStackIcon
Returns the composite used to present the trace Composite get Composite return f Table  getComposite fTable
Refresh the table from the the trace public void refresh update Table f Input Trace  updateTable fInputTrace
Shows a Test Failure param failure the failed test public void show Failure Test Run Info failure f Failure failure String trace NON NLS 1 update Enablement failure if failure null trace failure get Trace if f Input Trace trace return f Input Trace trace update Table trace  TestFailure showFailure TestRunInfo fFailure updateEnablement getTrace fInputTrace fInputTrace updateTable
public void update Enablement Test Run Info failure f Compare Action set Enabled failure null failure is Comparison Failure  updateEnablement TestRunInfo fCompareAction setEnabled isComparisonFailure
private void update Table String trace if trace null trace trim equals NON NLS 1 clear return trace trace trim f Table set Redraw false f Table remove All fill Table filter Stack trace f Table set Redraw true  updateTable fTable setRedraw fTable removeAll fillTable filterStack fTable setRedraw
private void fill Table String trace String Reader string Reader new String Reader trace Buffered Reader buffered Reader new Buffered Reader string Reader String line try first line contains the thrown exception line buffered Reader read Line if line null return Table Item table Item new Table Item f Table SWT NONE String item Label line replace t table Item set Text item Label table Item set Image f Exception Icon the stack frames of the trace while line buffered Reader read Line null item Label line replace t table Item new Table Item f Table SWT NONE heuristic for detecting a stack frame works for JDK if item Label index Of at 0 NON NLS 1 table Item set Image f Stack Icon table Item set Text item Label catch IO Exception e Table Item table Item new Table Item f Table SWT NONE table Item set Text trace  fillTable StringReader stringReader StringReader BufferedReader bufferedReader BufferedReader stringReader bufferedReader readLine TableItem tableItem TableItem fTable itemLabel tableItem setText itemLabel tableItem setImage fExceptionIcon bufferedReader readLine itemLabel tableItem TableItem fTable itemLabel indexOf tableItem setImage fStackIcon tableItem setText itemLabel IOException TableItem tableItem TableItem fTable tableItem setText
Shows other information than a stack trace param text the informational message to be shown public void set Information String text clear Table Item table Item new Table Item f Table SWT NONE table Item set Text text  setInformation TableItem tableItem TableItem fTable tableItem setText
Clears the non stack trace info public void clear f Table remove All f Input Trace null  fTable removeAll fInputTrace
private String filter Stack String stack Trace if J Unit Preference Page get Filter Stack stack Trace null return stack Trace String Writer string Writer new String Writer Print Writer print Writer new Print Writer string Writer String Reader string Reader new String Reader stack Trace Buffered Reader buffered Reader new Buffered Reader string Reader String line String patterns J Unit Preference Page get Filter Patterns try while line buffered Reader read Line null if filter Line patterns line print Writer println line catch IO Exception e return stack Trace return the stack unfiltered return string Writer to String  filterStack stackTrace JUnitPreferencePage getFilterStack stackTrace stackTrace StringWriter stringWriter StringWriter PrintWriter printWriter PrintWriter stringWriter StringReader stringReader StringReader stackTrace BufferedReader bufferedReader BufferedReader stringReader JUnitPreferencePage getFilterPatterns bufferedReader readLine filterLine printWriter IOException stackTrace stringWriter toString
private boolean filter Line String patterns String line String pattern int len for int i patterns length 1 i 0 i pattern patterns i len pattern length 1 if pattern char At len strip trailing from a package filter pattern pattern substring 0 len else if Character is Upper Case pattern char At 0 class in the default package pattern FRAME PREFIX pattern else class names start w an uppercase letter after the final int last Dot Index pattern last Index Of if last Dot Index 1 last Dot Index len Character is Upper Case pattern char At last Dot Index 1 pattern append to a class filter if line index Of pattern 0 return true return false  filterLine charAt isUpperCase charAt FRAME_PREFIX lastDotIndex lastIndexOf lastDotIndex lastDotIndex isUpperCase charAt lastDotIndex indexOf
public Test Run Info get Failed Test return f Failure  TestRunInfo getFailedTest fFailure
public Shell get Shell return f Table get Shell  getShell fTable getShell

private void run I Structured Selection selection I Java Element elements get Selected Elements selection if elements null elements length 0 Message Dialog open Information get Shell J Unit Messages get String Goto Referenced Test Action dialog title J Unit Messages get String Goto Referenced Test Action dialog message NON NLS 1 NON NLS 2 return try run elements catch Core Exception e Error Dialog open Error get Shell J Unit Messages get String Goto Referenced Test Action dialog title J Unit Messages get String Goto Referenced Test Action dialog error e get Status NON NLS 1 NON NLS 2  IStructuredSelection IJavaElement getSelectedElements MessageDialog openInformation getShell JUnitMessages getString GotoReferencedTestAction JUnitMessages getString GotoReferencedTestAction CoreException ErrorDialog openError getShell JUnitMessages getString GotoReferencedTestAction JUnitMessages getString GotoReferencedTestAction getStatus
private void run I Text Selection I Text Selection try Java Editor editor get Active Editor if editor null return I Java Element element Selection Converter get Element At Offset editor int type element null element get Element Type 1 if type I Java Element METHOD type I Java Element TYPE element Selection Converter get Type At Offset editor if element null Message Dialog open Information get Shell J Unit Messages get String Goto Referenced Test Action dialog title J Unit Messages get String Goto Referenced Test Action dialog error nomethod NON NLS 1 NON NLS 2 return run new I Member I Member element catch Core Exception e Error Dialog open Error get Shell J Unit Messages get String Goto Referenced Test Action dialog title J Unit Messages get String Goto Referenced Test Action dialog error e get Status NON NLS 1 NON NLS 2  ITextSelection ITextSelection JavaEditor getActiveEditor IJavaElement SelectionConverter getElementAtOffset getElementType IJavaElement IJavaElement SelectionConverter getTypeAtOffset MessageDialog openInformation getShell JUnitMessages getString GotoReferencedTestAction JUnitMessages getString GotoReferencedTestAction IMember IMember CoreException ErrorDialog openError getShell JUnitMessages getString GotoReferencedTestAction JUnitMessages getString GotoReferencedTestAction getStatus
private void run I Java Element elements throws Part Init Exception Java Model Exception I Java Element element elements 0 Selection Status Dialog dialog new Test Method Selection Dialog get Shell element dialog set Title J Unit Messages get String Goto Referenced Test Action selectdialog title NON NLS 1 String msg J Unit Messages get Formatted String Goto Referenced Test Action dialog select message element get Element Name NON NLS 1 dialog set Message msg if dialog open Window CANCEL return Object result dialog get First Result if result null return open Element I Java Element result  IJavaElement PartInitException JavaModelException IJavaElement SelectionStatusDialog TestMethodSelectionDialog getShell setTitle JUnitMessages getString GotoReferencedTestAction JUnitMessages getFormattedString GotoReferencedTestAction select_message getElementName setMessage getFirstResult openElement IJavaElement
private void open Element I Java Element result throws Java Model Exception Part Init Exception I Editor Part part JavaUI open In Editor result JavaUI reveal In Editor part result  openElement IJavaElement JavaModelException PartInitException IEditorPart openInEditor revealInEditor
private I Java Element get Selected Elements I Structured Selection selection List elements selection to List int size elements size if size 0 return null Array List result new Array List size for int i 0 i size i Object e elements get i if e instanceof I Compilation Unit I Compilation Unit unit I Compilation Unit e I Type types new I Type 0 try types unit get Types catch Java Model Exception ex for int j 0 j types length j result add types j else if e instanceof I Method e instanceof I Type e instanceof I Field result add e else return null return I Java Element result to Array new I Java Element result size  IJavaElement getSelectedElements IStructuredSelection toList ArrayList ArrayList ICompilationUnit ICompilationUnit ICompilationUnit IType IType getTypes JavaModelException IMethod IType IField IJavaElement toArray IJavaElement
public void run I Action action if f Selection instanceof I Structured Selection run I Structured Selection f Selection else if f Selection instanceof I Text Selection run I Text Selection f Selection  IAction fSelection IStructuredSelection IStructuredSelection fSelection fSelection ITextSelection ITextSelection fSelection
public void selection Changed I Action action I Selection selection f Selection selection  selectionChanged IAction ISelection fSelection
private Shell get Shell if f Workbench null return f Workbench get Shell return J Unit Plugin get Active Workbench Shell  getShell fWorkbench fWorkbench getShell JUnitPlugin getActiveWorkbenchShell
public void dispose 
public void init I Workbench Window window f Workbench window  IWorkbenchWindow fWorkbench
private Java Editor get Active Editor I Editor Part editor f Workbench get Active Page get Active Editor if editor instanceof Java Editor return Java Editor editor return null  JavaEditor getActiveEditor IEditorPart fWorkbench getActivePage getActiveEditor JavaEditor JavaEditor

Information about a member of the test suite that is about to be run The format of the string is pre test Id test Name is Suite testcount test Id a unique id for the test test Name the name of the test is Suite true or false depending on whether the test is a suite test Count an integer indicating the number of tests Example 324968 test Pass junit tests My Test false 1 pre param description a string describing a tree entry  testId testName isSuite testId testName isSuite testCount testPass MyTest

public interface I Test Run Listener3 extends I Test Run Listener2 public void test Failed int status String test Id String test Name String trace String expected String actual  ITestRunListener3 ITestRunListener2 testFailed testId testName
public void test Failed int status String test Id String test Name String trace String expected String actual public void test Reran String test Id String class Name String test Name int status Code String trace String expected Result String actual Result  testFailed testId testName testReran testId className testName statusCode expectedResult actualResult

private static final String PROPERTY IS Test is Test NON NLS 1 inherit Doc public boolean test Object receiver String method Object args Object expected Value I Java Element java Element null if receiver instanceof I Adaptable java Element I Java Element I Adaptable receiver get Adapter I Java Element class if java Element null if java Element exists return false if java Element instanceof I Java Project java Element instanceof I Package Fragment Root java Element instanceof I Package Fragment return true if java Element null if PROPERTY IS Test equals method NON NLS 1 return is Test java Element return false  PROPERTY_IS_Test isTest inheritDoc expectedValue IJavaElement javaElement IAdaptable javaElement IJavaElement IAdaptable getAdapter IJavaElement javaElement javaElement javaElement IJavaProject javaElement IPackageFragmentRoot javaElement IPackageFragment javaElement PROPERTY_IS_Test isTest javaElement
private boolean is Test I Java Element element try I Type test Type null if element instanceof I Compilation Unit I Compilation Unit cu I Compilation Unit element test Type cu get Type Signature get Qualifier cu get Element Name else if element instanceof I Class File test Type I Class File element get Type else if element instanceof I Type test Type I Type element else if element instanceof I Member test Type I Member element get Declaring Type if test Type null test Type exists Test Search Engine is Test Or Test Suite test Type return true catch Java Model Exception e return false  isTest IJavaElement IType testType ICompilationUnit ICompilationUnit ICompilationUnit testType getType getQualifier getElementName IClassFile testType IClassFile getType IType testType IType IMember testType IMember getDeclaringType testType testType TestSearchEngine isTestOrTestSuite testType JavaModelException

private final I Invocation Context f Context public J Unit Add Library Proposal I Invocation Context context f Context context  IInvocationContext fContext JUnitAddLibraryProposal IInvocationContext fContext
see org eclipse jdt ui text java I Java Completion Proposal get Relevance public int get Relevance return 0  IJavaCompletionProposal getRelevance getRelevance
public void apply I Document document I Java Project project f Context get Compilation Unit get Java Project try New Test Case Creation Wizard Page addJ Unit To Build Path J Unit Plugin get Active Workbench Shell project force a reconcile int offset f Context get Selection Offset int length f Context get Selection Length String s document get offset length document replace offset length s catch Java Model Exception e Error Dialog open Error J Unit Plugin get Active Workbench Shell J Unit Messages get String J Unit Add Library Proposal title J Unit Messages get String J Unit Add Library Proposal cannot Add e get Status NON NLS 1 NON NLS 2 catch Bad Location Exception e ignore  IDocument IJavaProject fContext getCompilationUnit getJavaProject NewTestCaseCreationWizardPage addJUnitToBuildPath JUnitPlugin getActiveWorkbenchShell fContext getSelectionOffset fContext getSelectionLength JavaModelException ErrorDialog openError JUnitPlugin getActiveWorkbenchShell JUnitMessages getString JUnitAddLibraryProposal JUnitMessages getString JUnitAddLibraryProposal cannotAdd getStatus BadLocationException
see org eclipse jface text contentassist I Completion Proposal get Selection org eclipse jface text I Document public Point get Selection I Document document return new Point f Context get Selection Offset f Context get Selection Length  ICompletionProposal getSelection IDocument getSelection IDocument fContext getSelectionOffset fContext getSelectionLength
see org eclipse jface text contentassist I Completion Proposal get Additional Proposal Info public String get Additional Proposal Info return J Unit Messages get String J Unit Add Library Proposal info NON NLS 1  ICompletionProposal getAdditionalProposalInfo getAdditionalProposalInfo JUnitMessages getString JUnitAddLibraryProposal
see org eclipse jface text contentassist I Completion Proposal get Display String public String get Display String return J Unit Messages get String J Unit Add Library Proposal label NON NLS 1  ICompletionProposal getDisplayString getDisplayString JUnitMessages getString JUnitAddLibraryProposal
see org eclipse jface text contentassist I Completion Proposal get Image public Image get Image TODO Auto generated method stub return null  ICompletionProposal getImage getImage
see org eclipse jface text contentassist I Completion Proposal get Context Information public I Context Information get Context Information return null  ICompletionProposal getContextInformation IContextInformation getContextInformation

public class J Unit Home Initializer extends Classpath Variable Initializer see Classpath Variable Initializer initialize String public void initialize String variable Bundle bundle Platform get Bundle org junit NON NLS 1 if bundle null Java Core remove Classpath Variable J Unit Plugin JUNIT HOME null return URL install Location bundle get Entry NON NLS 1 URL local null try local Platform as LocalURL install Location catch IO Exception e Java Core remove Classpath Variable J Unit Plugin JUNIT HOME null return try String full Path new File local get Path get Absolute Path Java Core set Classpath Variable J Unit Plugin JUNIT HOME new Path full Path null catch Java Model Exception e1 Java Core remove Classpath Variable J Unit Plugin JUNIT HOME null  JUnitHomeInitializer ClasspathVariableInitializer ClasspathVariableInitializer getBundle JavaCore removeClasspathVariable JUnitPlugin JUNIT_HOME installLocation getEntry asLocalURL installLocation IOException JavaCore removeClasspathVariable JUnitPlugin JUNIT_HOME fullPath getPath getAbsolutePath JavaCore setClasspathVariable JUnitPlugin JUNIT_HOME fullPath JavaModelException JavaCore removeClasspathVariable JUnitPlugin JUNIT_HOME

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private J Unit Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME JUnitMessages
Gets a string from the resource bundle and formats it with the argument param keythe string used to get the bundle value must not be null public static String get Formatted String String key Object arg return Message Format format get String key new Object arg  getFormattedString MessageFormat getString
Gets a string from the resource bundle and formats it with arguments public static String get Formatted String String key Object args return Message Format format get String key args  getFormattedString MessageFormat getString
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public J Unit Plugin I Plugin Descriptor descriptor super descriptor fg Plugin this String path Suffix icons full NON NLS 1 try fg Icon BaseURL new URL Platform get Bundle PLUGIN ID get Entry path Suffix NON NLS 1 catch MalformedURL Exception e do nothing  JUnitPlugin IPluginDescriptor fgPlugin pathSuffix fgIconBaseURL getBundle PLUGIN_ID getEntry pathSuffix MalformedURLException
public static J Unit Plugin get Default return fg Plugin  JUnitPlugin getDefault fgPlugin
public static Shell get Active Workbench Shell I Workbench Window work Bench Window get Active Workbench Window if work Bench Window null return null return work Bench Window get Shell  getActiveWorkbenchShell IWorkbenchWindow workBenchWindow getActiveWorkbenchWindow workBenchWindow workBenchWindow getShell
Returns the active workbench window return the active workbench window public static I Workbench Window get Active Workbench Window if fg Plugin null return null I Workbench work Bench fg Plugin get Workbench if work Bench null return null return work Bench get Active Workbench Window  IWorkbenchWindow getActiveWorkbenchWindow fgPlugin IWorkbench workBench fgPlugin getWorkbench workBench workBench getActiveWorkbenchWindow
public static I Workbench Page get Active Page I Workbench Window active Workbench Window get Active Workbench Window if active Workbench Window null return null return active Workbench Window get Active Page  IWorkbenchPage getActivePage IWorkbenchWindow activeWorkbenchWindow getActiveWorkbenchWindow activeWorkbenchWindow activeWorkbenchWindow getActivePage
public static String get Plugin Id return PLUGIN ID  getPluginId PLUGIN_ID
see AbstractUI Plugin initialize Default Preferences protected void initialize Default Preferences I Preference Store store super initialize Default Preferences store J Unit Preference Page initialize Defaults store  AbstractUIPlugin initializeDefaultPreferences initializeDefaultPreferences IPreferenceStore initializeDefaultPreferences JUnitPreferencePage initializeDefaults
public static void log Throwable e log new Status I Status ERROR get Plugin Id I Status ERROR Error e NON NLS 1  IStatus getPluginId IStatus
public static void log I Status status get Default get Log log status  IStatus getDefault getLog
public static URL make Icon FileURL String name throws MalformedURL Exception if J Unit Plugin fg Icon BaseURL null throw new MalformedURL Exception return new URL J Unit Plugin fg Icon BaseURL name  makeIconFileURL MalformedURLException JUnitPlugin fgIconBaseURL MalformedURLException JUnitPlugin fgIconBaseURL
static Image Descriptor get Image Descriptor String relative Path try return Image Descriptor create FromURL make Icon FileURL relative Path catch MalformedURL Exception e should not happen return Image Descriptor get Missing Image Descriptor  ImageDescriptor getImageDescriptor relativePath ImageDescriptor createFromURL makeIconFileURL relativePath MalformedURLException ImageDescriptor getMissingImageDescriptor
get Display async Exec new Runnable public void run Test Runner View Part test Runner View Part find Test Runner View Part In Active Page if test Runner View Part null test Runner View Part is Created launch equals test Runner View Part get Last Launch test Runner View Part reset  getDisplay asyncExec TestRunnerViewPart testRunnerViewPart findTestRunnerViewPartInActivePage testRunnerViewPart testRunnerViewPart isCreated testRunnerViewPart getLastLaunch testRunnerViewPart
public void launch Removed final I Launch launch f Tracked Launches remove launch get Display async Exec new Runnable public void run Test Runner View Part test Runner View Part find Test Runner View Part In Active Page if test Runner View Part null test Runner View Part is Created launch equals test Runner View Part get Last Launch test Runner View Part reset  launchRemoved ILaunch fTrackedLaunches getDisplay asyncExec TestRunnerViewPart testRunnerViewPart findTestRunnerViewPartInActivePage testRunnerViewPart testRunnerViewPart isCreated testRunnerViewPart getLastLaunch testRunnerViewPart
see I Launch Listener launch Added I Launch public void launch Added I Launch launch f Tracked Launches add launch  ILaunchListener launchAdded ILaunch launchAdded ILaunch fTrackedLaunches
public void connect Test Runner I Launch launch I Type launched Type int port Test Runner View Part test Runner View Part show Test Runner View Part In Active Page find Test Runner View Part In Active Page if test Runner View Part null test Runner View Part start Test Run Listening launched Type port launch  connectTestRunner ILaunch IType launchedType TestRunnerViewPart testRunnerViewPart showTestRunnerViewPartInActivePage findTestRunnerViewPartInActivePage testRunnerViewPart testRunnerViewPart startTestRunListening launchedType
private Test Runner View Part show Test Runner View Part In Active Page Test Runner View Part test Runner I Workbench Part active Part null I Workbench Page page null try TODO have to force the creation of view part contents otherwise the UI will not be updated if test Runner null test Runner is Created return test Runner page get Active Page if page null return null active Part page get Active Part show the result view if it isn t shown yet return Test Runner View Part page show View Test Runner View Part NAME catch Part Init Exception pie log pie return null finally restore focus stolen by the creation of the result view if page null active Part null page activate active Part  TestRunnerViewPart showTestRunnerViewPartInActivePage TestRunnerViewPart testRunner IWorkbenchPart activePart IWorkbenchPage testRunner testRunner isCreated testRunner getActivePage activePart getActivePart TestRunnerViewPart showView TestRunnerViewPart PartInitException activePart activePart
private Test Runner View Part find Test Runner View Part In Active Page I Workbench Page page get Active Page if page null return null return Test Runner View Part page find View Test Runner View Part NAME  TestRunnerViewPart findTestRunnerViewPartInActivePage IWorkbenchPage getActivePage TestRunnerViewPart findView TestRunnerViewPart
final I Type final Type launched Type get Display async Exec new Runnable public void run connect Test Runner launch final Type final Port  IType finalType launchedType getDisplay asyncExec connectTestRunner finalType finalPort
public void launch Changed final I Launch launch if f Tracked Launches contains launch return I Launch Configuration config launch get Launch Configuration I Type launched Type null int port 1 if config null test whether the launch defines the J Unit attributes String port Str launch get Attribute J Unit Base Launch Configuration PORT ATTR String type Str launch get Attribute J Unit Base Launch Configuration TESTTYPE ATTR if port Str null type Str null port Integer parse Int port Str I Java Element element Java Core create type Str if element instanceof I Type launched Type I Type element if launched Type null f Tracked Launches remove launch final int final Port port final I Type final Type launched Type get Display async Exec new Runnable public void run connect Test Runner launch final Type final Port  launchChanged ILaunch fTrackedLaunches ILaunchConfiguration getLaunchConfiguration IType launchedType JUnit portStr getAttribute JUnitBaseLaunchConfiguration PORT_ATTR typeStr getAttribute JUnitBaseLaunchConfiguration TESTTYPE_ATTR portStr typeStr parseInt portStr IJavaElement JavaCore typeStr IType launchedType IType launchedType fTrackedLaunches finalPort IType finalType launchedType getDisplay asyncExec connectTestRunner finalType finalPort
see AbstractUI Plugin start Bundle Context public void start Bundle Context context throws Exception super start context I Launch Manager launch Manager Debug Plugin get Default get Launch Manager launch Manager add Launch Listener this  AbstractUIPlugin BundleContext BundleContext ILaunchManager launchManager DebugPlugin getDefault getLaunchManager launchManager addLaunchListener
see AbstractUI Plugin stop Bundle Context public void stop Bundle Context context throws Exception try I Launch Manager launch Manager Debug Plugin get Default get Launch Manager launch Manager remove Launch Listener this finally super stop context  AbstractUIPlugin BundleContext BundleContext ILaunchManager launchManager DebugPlugin getDefault getLaunchManager launchManager removeLaunchListener
public static Display get Display Shell shell get Active Workbench Shell if shell null return shell get Display Display display Display get Current if display null display Display get Default return display  getDisplay getActiveWorkbenchShell getDisplay getCurrent getDefault
Utility method to create and return a selection dialog that allows selection of a specific Java package Empty packages are not returned If Java Projects are provided only packages found within those projects are included If no Java projects are provided all Java projects in the workspace are considered public static Element List Selection Dialog create All Packages Dialog Shell shell I Java Project originals final boolean include Default Package throws Java Model Exception final List package List new Array List if originals null I Workspace Root wsroot Resources Plugin get Workspace get Root I Java Model model Java Core create wsroot originals model get Java Projects final I Java Project projects originals final Java Model Exception exception new Java Model Exception 1 I Runnable With Progress r new I Runnable With Progress public void run I Progress Monitor pm try Set package Name Set new Hash Set pm begin Task J Unit Messages get String J Unit Plugin searching projects length NON NLS 1 for int i 0 i projects length i I Package Fragment pkgs projects i get Package Fragments for int j 0 j pkgs length j I Package Fragment pkg pkgs j if pkg has Children pkg get Non Java Resources length 0 continue String pkg Name pkg get Element Name if include Default Package pkg Name length 0 continue if package Name Set add pkg Name package List add pkg pm worked 1 pm done catch Java Model Exception jme exception 0 jme try PlatformUI get Workbench get Progress Service busy Cursor While r catch Invocation Target Exception e J Unit Plugin log e catch Interrupted Exception e J Unit Plugin log e if exception 0 null throw exception 0 int flags Java Element Label Provider SHOW DEFAULT Element List Selection Dialog dialog new Element List Selection Dialog shell new Java Element Label Provider flags dialog set Ignore Case false dialog set Elements package List to Array XXX inefficient return dialog  ElementListSelectionDialog createAllPackagesDialog IJavaProject includeDefaultPackage JavaModelException packageList ArrayList IWorkspaceRoot ResourcesPlugin getWorkspace getRoot IJavaModel JavaCore getJavaProjects IJavaProject JavaModelException JavaModelException IRunnableWithProgress IRunnableWithProgress IProgressMonitor packageNameSet HashSet beginTask JUnitMessages getString JUnitPlugin IPackageFragment getPackageFragments IPackageFragment hasChildren getNonJavaResources pkgName getElementName includeDefaultPackage pkgName packageNameSet pkgName packageList JavaModelException getWorkbench getProgressService busyCursorWhile InvocationTargetException JUnitPlugin InterruptedException JUnitPlugin JavaElementLabelProvider SHOW_DEFAULT ElementListSelectionDialog ElementListSelectionDialog JavaElementLabelProvider setIgnoreCase setElements packageList toArray
Initializes Test Run Listener extensions private void load Test Run Listeners f Test Run Listeners new Array List I Extension Point extension Point Platform get Extension Registry get Extension Point ID EXTENSION POINT TESTRUN LISTENERS if extension Point null return I Configuration Element configs extension Point get Configuration Elements Multi Status status new Multi Status PLUGIN ID I Status OK Could not load some test Runner extension points null NON NLS 1 for int i 0 i configs length i try I Test Run Listener test Run Listener I Test Run Listener configs i create Executable Extension class NON NLS 1 f Test Run Listeners add test Run Listener catch Core Exception e status add e get Status if status isOK J Unit Plugin log status  TestRun loadTestRunListeners fTestRunListeners ArrayList IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint ID_EXTENSION_POINT_TESTRUN_LISTENERS extensionPoint IConfigurationElement extensionPoint getConfigurationElements MultiStatus MultiStatus PLUGIN_ID IStatus testRunner ITestRunListener testRunListener ITestRunListener createExecutableExtension fTestRunListeners testRunListener CoreException getStatus JUnitPlugin
Loads the registered J Unit launch configurations private void load Launch Config TypeI Ds fJ Unit Launch Config TypeI Ds new Array List I Extension Point extension Point Platform get Extension Registry get Extension Point ID EXTENSION POINT JUNIT LAUNCHCONFIGS if extension Point null return I Configuration Element configs extension Point get Configuration Elements for int i 0 i configs length i String config TypeID configs i get Attribute config TypeID NON NLS 1 fJ Unit Launch Config TypeI Ds add config TypeID  JUnit loadLaunchConfigTypeIDs fJUnitLaunchConfigTypeIDs ArrayList IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint ID_EXTENSION_POINT_JUNIT_LAUNCHCONFIGS extensionPoint IConfigurationElement extensionPoint getConfigurationElements configTypeID getAttribute configTypeID fJUnitLaunchConfigTypeIDs configTypeID
Returns an array of all Test Run listeners public List get Test Run Listeners if f Test Run Listeners null load Test Run Listeners return f Test Run Listeners  TestRun getTestRunListeners fTestRunListeners loadTestRunListeners fTestRunListeners
Returns an array of all J Unit launch config types public List getJ Unit Launch Config TypeI Ds if fJ Unit Launch Config TypeI Ds null load Launch Config TypeI Ds return fJ Unit Launch Config TypeI Ds  JUnit getJUnitLaunchConfigTypeIDs fJUnitLaunchConfigTypeIDs loadLaunchConfigTypeIDs fJUnitLaunchConfigTypeIDs
Adds a Test Run listener to the collection of listeners public void add Test Run Listener I Test Run Listener new Listener if f Test Run Listeners null load Test Run Listeners for Iterator iter f Test Run Listeners iterator iter has Next Object o iter next if o new Listener return f Test Run Listeners add new Listener  TestRun addTestRunListener ITestRunListener newListener fTestRunListeners loadTestRunListeners fTestRunListeners hasNext newListener fTestRunListeners newListener
Removes a Test Run listener to the collection of listeners public void remove Test Run Listener I Test Run Listener new Listener if f Test Run Listeners null f Test Run Listeners remove new Listener  TestRun removeTestRunListener ITestRunListener newListener fTestRunListeners fTestRunListeners newListener

private boolean f Checked public Filter String name boolean checked set Name name set Checked checked  fChecked setName setChecked
public String get Name return f Name  getName fName
public void set Name String name f Name name  setName fName
public boolean is Checked return f Checked  isChecked fChecked
public void set Checked boolean checked f Checked checked  setChecked fChecked
public boolean equals Object o if o instanceof Filter return false Filter other Filter o return get Name equals other get Name  getName getName
public int hash Code return f Name hash Code  hashCode fName hashCode
private class Filter Viewer Sorter extends Workbench Viewer Sorter public int compare Viewer viewer Object e1 Object e2 I Label Provider lprov I Label Provider Content Viewer viewer get Label Provider String name1 lprov get Text e1 String name2 lprov get Text e2 if name1 null name1 NON NLS 1 if name2 null name2 NON NLS 1 if name1 length 0 name2 length 0 char char1 name1 char At name1 length 1 char char2 name2 char At name2 length 1 if char1 char1 char2 return 1 if char2 char2 char1 return 1 return name1 compare To name2  FilterViewerSorter WorkbenchViewerSorter ILabelProvider ILabelProvider ContentViewer getLabelProvider getText getText charAt charAt compareTo
private class Filter Label Provider extends Label Provider implements I Table Label Provider public String get Column Text Object object int column return column 0 Filter object get Name NON NLS 1  FilterLabelProvider LabelProvider ITableLabelProvider getColumnText getName
public String get Text Object element return Filter element get Name  getText getName
public Image get Column Image Object object int column String name Filter object get Name if name ends With name equals J Unit Messages get String J Unit Main Tab label defaultpackage NON NLS 1 NON NLS 2 package return IMG PKG else if equals name NON NLS 1 needed for the in place editor return null else if Character is Upper Case name char At 0 name index Of 0 class in default package return IMG CUNIT else fully qualified class or other filter final int last Dot Index name last Index Of if 1 last Dot Index name length 1 last Dot Index Character is Upper Case name char At last Dot Index 1 return IMG CUNIT other filter return null  getColumnImage getName endsWith JUnitMessages getString JUnitMainTab IMG_PKG isUpperCase charAt indexOf IMG_CUNIT lastDotIndex lastIndexOf lastDotIndex lastDotIndex isUpperCase charAt lastDotIndex IMG_CUNIT
public Stack Filter Content Provider List active create Active Stack Filters List List inactive create Inactive Stack Filters List populate Filters active inactive  StackFilterContentProvider createActiveStackFiltersList createInactiveStackFiltersList populateFilters
public void set Defaults f Filter Viewer remove f Filters to Array List active create Default Stack Filters List List inactive new Array List populate Filters active inactive  setDefaults fFilterViewer fFilters toArray createDefaultStackFiltersList ArrayList populateFilters
protected void populate Filters List active List List inactive List f Filters new Array List active List size inactive List size populate List active List true if inactive List size 0 populate List inactive List false  populateFilters activeList inactiveList fFilters ArrayList activeList inactiveList populateList activeList inactiveList populateList inactiveList
protected void populate List List list boolean checked Iterator iterator list iterator while iterator has Next String name String iterator next add Filter name checked  populateList hasNext addFilter
public Filter add Filter String name boolean checked Filter filter new Filter name checked if f Filters contains filter f Filters add filter f Filter Viewer add filter f Filter Viewer set Checked filter checked update Actions return filter  addFilter fFilters fFilters fFilterViewer fFilterViewer setChecked updateActions
public void save Filters List active new Array List f Filters size List inactive new Array List f Filters size Iterator iterator f Filters iterator while iterator has Next Filter filter Filter iterator next String name filter get Name if filter is Checked active add name else inactive add name String pref J Unit Preference Page serialize List String active to Array new String active size get Preference Store set Value IJ Unit Preferences Constants PREF ACTIVE FILTERS LIST pref pref J Unit Preference Page serialize List String inactive to Array new String inactive size get Preference Store set Value IJ Unit Preferences Constants PREF INACTIVE FILTERS LIST pref  saveFilters ArrayList fFilters ArrayList fFilters fFilters hasNext getName isChecked JUnitPreferencePage serializeList toArray getPreferenceStore setValue IJUnitPreferencesConstants PREF_ACTIVE_FILTERS_LIST JUnitPreferencePage serializeList toArray getPreferenceStore setValue IJUnitPreferencesConstants PREF_INACTIVE_FILTERS_LIST
public void remove Filters Object filters for int i filters length 1 i 0 i Filter filter Filter filters i f Filters remove filter f Filter Viewer remove filters update Actions  removeFilters fFilters fFilterViewer updateActions
public void toggle Filter Filter filter boolean new State filter is Checked filter set Checked new State f Filter Viewer set Checked filter new State  toggleFilter newState isChecked setChecked newState fFilterViewer setChecked newState
public Object get Elements Object input Element return f Filters to Array  getElements inputElement fFilters toArray
public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
public void input Changed Viewer viewer Object old Input Object new Input public void dispose  inputChanged oldInput newInput
public J Unit Preference Page super set Description J Unit Messages get String J Unit Preference Page description NON NLS 1 set Preference Store J Unit Plugin get Default get Preference Store  JUnitPreferencePage setDescription JUnitMessages getString JUnitPreferencePage setPreferenceStore JUnitPlugin getDefault getPreferenceStore
protected Control create Contents Composite parent Workbench Help set Help parent IJ Unit Help Context Ids JUNIT PREFERENCE PAGE Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 1 layout margin Height 0 layout margin Width 0 composite set Layout layout Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL composite set Layout Data data create Stack Filter Preferences composite Dialog apply Dialog Font composite return composite  createContents WorkbenchHelp setHelp IJUnitHelpContextIds JUNIT_PREFERENCE_PAGE GridLayout GridLayout numColumns marginHeight marginWidth setLayout GridData GridData verticalAlignment GridData horizontalAlignment GridData setLayoutData createStackFilterPreferences applyDialogFont
Create a group to contain the step filter related widgetry private void create Stack Filter Preferences Composite composite Composite container new Composite composite SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH container set Layout Data gd create Show Check container create Filter Table container create Step Filter Buttons container  createStackFilterPreferences GridLayout GridLayout numColumns marginHeight marginWidth setLayout GridData GridData GridData FILL_BOTH setLayoutData createShowCheck createFilterTable createStepFilterButtons
private void create Show Check Composite composite Grid Data data f Show On Error Check new Button composite SWT CHECK f Show On Error Check set Text J Unit Messages get String J Unit Preference Page showcheck label NON NLS 1 data new Grid Data data horizontal Alignment Grid Data FILL data horizontal Span 2 f Show On Error Check set Layout Data data f Show On Error Check set Selection get Show On Error Only  createShowCheck GridData fShowOnErrorCheck fShowOnErrorCheck setText JUnitMessages getString JUnitPreferencePage GridData horizontalAlignment GridData horizontalSpan fShowOnErrorCheck setLayoutData fShowOnErrorCheck setSelection getShowOnErrorOnly
f Filter Viewer get Table set Layout Data gd f Filter Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Filter filter Filter event get Element f Stack Filter Content Provider toggle Filter filter  fFilterViewer getTable setLayoutData fFilterViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getElement fStackFilterContentProvider toggleFilter
f Filter Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Selection selection event get Selection f Remove Filter Button set Enabled selection is Empty  fFilterViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection fRemoveFilterButton setEnabled isEmpty
private void create Filter Table Composite container f Table Label new Label container SWT NONE f Table Label set Text J Unit Messages get String J Unit Preference Page filter label NON NLS 1 Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 f Table Label set Layout Data gd f Filter Table new Table container SWT CHECK SWT BORDER SWT MULTI SWT FULL SELECTION gd new Grid Data Grid Data FILL HORIZONTAL f Filter Table set Layout Data gd Table Layout table Layout new Table Layout Column Layout Data column Layout Data new Column Layout Data 1 column Layout Data 0 new Column Weight Data 100 table Layout add Column Data column Layout Data 0 f Filter Table set Layout table Layout new Table Column f Filter Table SWT NONE f Filter Viewer new Checkbox Table Viewer f Filter Table f Table Editor new Table Editor f Filter Table f Filter Viewer set Label Provider new Filter Label Provider f Filter Viewer set Sorter new Filter Viewer Sorter f Stack Filter Content Provider new Stack Filter Content Provider f Filter Viewer set Content Provider f Stack Filter Content Provider input just needs to be non null f Filter Viewer set Input this gd new Grid Data Grid Data FILL BOTH Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL f Filter Viewer get Table set Layout Data gd f Filter Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Filter filter Filter event get Element f Stack Filter Content Provider toggle Filter filter f Filter Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Selection selection event get Selection f Remove Filter Button set Enabled selection is Empty  createFilterTable fTableLabel fTableLabel setText JUnitMessages getString JUnitPreferencePage GridData GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan fTableLabel setLayoutData fFilterTable FULL_SELECTION GridData GridData FILL_HORIZONTAL fFilterTable setLayoutData TableLayout tableLayout TableLayout ColumnLayoutData columnLayoutData ColumnLayoutData columnLayoutData ColumnWeightData tableLayout addColumnData columnLayoutData fFilterTable setLayout tableLayout TableColumn fFilterTable fFilterViewer CheckboxTableViewer fFilterTable fTableEditor TableEditor fFilterTable fFilterViewer setLabelProvider FilterLabelProvider fFilterViewer setSorter FilterViewerSorter fStackFilterContentProvider StackFilterContentProvider fFilterViewer setContentProvider fStackFilterContentProvider fFilterViewer setInput GridData GridData FILL_BOTH GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL fFilterViewer getTable setLayoutData fFilterViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getElement fStackFilterContentProvider toggleFilter fFilterViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection fRemoveFilterButton setEnabled isEmpty
SWT Util set Button Dimension Hint f Add Filter Button f Add Filter Button add Listener SWT Selection new Listener public void handle Event Event e edit Filter  SWTUtil setButtonDimensionHint fAddFilterButton fAddFilterButton addListener handleEvent editFilter
SWT Util set Button Dimension Hint f Add Type Button f Add Type Button add Listener SWT Selection new Listener public void handle Event Event e add Type  SWTUtil setButtonDimensionHint fAddTypeButton fAddTypeButton addListener handleEvent addType
SWT Util set Button Dimension Hint f Add Package Button f Add Package Button add Listener SWT Selection new Listener public void handle Event Event e add Package  SWTUtil setButtonDimensionHint fAddPackageButton fAddPackageButton addListener handleEvent addPackage
SWT Util set Button Dimension Hint f Remove Filter Button f Remove Filter Button add Listener SWT Selection new Listener public void handle Event Event e remove Filters  SWTUtil setButtonDimensionHint fRemoveFilterButton fRemoveFilterButton addListener handleEvent removeFilters
SWT Util set Button Dimension Hint f Enable All Button f Enable All Button add Listener SWT Selection new Listener public void handle Event Event e check All Filters true  SWTUtil setButtonDimensionHint fEnableAllButton fEnableAllButton addListener handleEvent checkAllFilters
SWT Util set Button Dimension Hint f Disable All Button f Disable All Button add Listener SWT Selection new Listener public void handle Event Event e check All Filters false  SWTUtil setButtonDimensionHint fDisableAllButton fDisableAllButton addListener handleEvent checkAllFilters
private void create Step Filter Buttons Composite container Composite button Container new Composite container SWT NONE Grid Data gd new Grid Data Grid Data FILL VERTICAL button Container set Layout Data gd Grid Layout button Layout new Grid Layout button Layout num Columns 1 button Layout margin Height 0 button Layout margin Width 0 button Container set Layout button Layout f Add Filter Button new Button button Container SWT PUSH f Add Filter Button set Text J Unit Messages get String J Unit Preference Page addfilterbutton label NON NLS 1 f Add Filter Button set Tool Tip Text J Unit Messages get String J Unit Preference Page addfilterbutton tooltip NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING f Add Filter Button set Layout Data gd SWT Util set Button Dimension Hint f Add Filter Button f Add Filter Button add Listener SWT Selection new Listener public void handle Event Event e edit Filter f Add Type Button new Button button Container SWT PUSH f Add Type Button set Text J Unit Messages get String J Unit Preference Page addtypebutton label NON NLS 1 f Add Type Button set Tool Tip Text J Unit Messages get String J Unit Preference Page addtypebutton tooltip NON NLS 1 gd get Button Grid Data f Add Type Button f Add Type Button set Layout Data gd SWT Util set Button Dimension Hint f Add Type Button f Add Type Button add Listener SWT Selection new Listener public void handle Event Event e add Type f Add Package Button new Button button Container SWT PUSH f Add Package Button set Text J Unit Messages get String J Unit Preference Page addpackagebutton label NON NLS 1 f Add Package Button set Tool Tip Text J Unit Messages get String J Unit Preference Page addpackagebutton tooltip NON NLS 1 gd get Button Grid Data f Add Package Button f Add Package Button set Layout Data gd SWT Util set Button Dimension Hint f Add Package Button f Add Package Button add Listener SWT Selection new Listener public void handle Event Event e add Package f Remove Filter Button new Button button Container SWT PUSH f Remove Filter Button set Text J Unit Messages get String J Unit Preference Page removefilterbutton label NON NLS 1 f Remove Filter Button set Tool Tip Text J Unit Messages get String J Unit Preference Page removefilterbutton tooltip NON NLS 1 gd get Button Grid Data f Remove Filter Button f Remove Filter Button set Layout Data gd SWT Util set Button Dimension Hint f Remove Filter Button f Remove Filter Button add Listener SWT Selection new Listener public void handle Event Event e remove Filters f Remove Filter Button set Enabled false f Enable All Button new Button button Container SWT PUSH f Enable All Button set Text J Unit Messages get String J Unit Preference Page enableallbutton label NON NLS 1 f Enable All Button set Tool Tip Text J Unit Messages get String J Unit Preference Page enableallbutton tooltip NON NLS 1 gd get Button Grid Data f Enable All Button f Enable All Button set Layout Data gd SWT Util set Button Dimension Hint f Enable All Button f Enable All Button add Listener SWT Selection new Listener public void handle Event Event e check All Filters true f Disable All Button new Button button Container SWT PUSH f Disable All Button set Text J Unit Messages get String J Unit Preference Page disableallbutton label NON NLS 1 f Disable All Button set Tool Tip Text J Unit Messages get String J Unit Preference Page disableallbutton tooltip NON NLS 1 gd get Button Grid Data f Disable All Button f Disable All Button set Layout Data gd SWT Util set Button Dimension Hint f Disable All Button f Disable All Button add Listener SWT Selection new Listener public void handle Event Event e check All Filters false  createStepFilterButtons buttonContainer GridData GridData GridData FILL_VERTICAL buttonContainer setLayoutData GridLayout buttonLayout GridLayout buttonLayout numColumns buttonLayout marginHeight buttonLayout marginWidth buttonContainer setLayout buttonLayout fAddFilterButton buttonContainer fAddFilterButton setText JUnitMessages getString JUnitPreferencePage fAddFilterButton setToolTipText JUnitMessages getString JUnitPreferencePage GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING fAddFilterButton setLayoutData SWTUtil setButtonDimensionHint fAddFilterButton fAddFilterButton addListener handleEvent editFilter fAddTypeButton buttonContainer fAddTypeButton setText JUnitMessages getString JUnitPreferencePage fAddTypeButton setToolTipText JUnitMessages getString JUnitPreferencePage getButtonGridData fAddTypeButton fAddTypeButton setLayoutData SWTUtil setButtonDimensionHint fAddTypeButton fAddTypeButton addListener handleEvent addType fAddPackageButton buttonContainer fAddPackageButton setText JUnitMessages getString JUnitPreferencePage fAddPackageButton setToolTipText JUnitMessages getString JUnitPreferencePage getButtonGridData fAddPackageButton fAddPackageButton setLayoutData SWTUtil setButtonDimensionHint fAddPackageButton fAddPackageButton addListener handleEvent addPackage fRemoveFilterButton buttonContainer fRemoveFilterButton setText JUnitMessages getString JUnitPreferencePage fRemoveFilterButton setToolTipText JUnitMessages getString JUnitPreferencePage getButtonGridData fRemoveFilterButton fRemoveFilterButton setLayoutData SWTUtil setButtonDimensionHint fRemoveFilterButton fRemoveFilterButton addListener handleEvent removeFilters fRemoveFilterButton setEnabled fEnableAllButton buttonContainer fEnableAllButton setText JUnitMessages getString JUnitPreferencePage fEnableAllButton setToolTipText JUnitMessages getString JUnitPreferencePage getButtonGridData fEnableAllButton fEnableAllButton setLayoutData SWTUtil setButtonDimensionHint fEnableAllButton fEnableAllButton addListener handleEvent checkAllFilters fDisableAllButton buttonContainer fDisableAllButton setText JUnitMessages getString JUnitPreferencePage fDisableAllButton setToolTipText JUnitMessages getString JUnitPreferencePage getButtonGridData fDisableAllButton fDisableAllButton setLayoutData SWTUtil setButtonDimensionHint fDisableAllButton fDisableAllButton addListener handleEvent checkAllFilters
private Grid Data get Button Grid Data Button button Grid Data gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH gd width Hint Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x gd height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT return gd  GridData getButtonGridData GridData GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT
public void init I Workbench workbench  IWorkbench
Create a new filter in the table with the default new filter value then open up an in place editor on it private void edit Filter if a previous edit is still in progress finish it if f Editor Text null validate Change And Cleanup f New Stack Filter f Stack Filter Content Provider add Filter DEFAULT NEW FILTER TEXT true f New Table Item f Filter Table get Item 0 create configure Text widget for editor Fix for bug 1766 Border behavior on for text fields varies per platform On Motif you always get a border on other platforms you don t Specifying a border on Motif results in the characters getting pushed down so that only there very tops are visible Thus we have to specify different style constants for the different platforms int text Styles SWT SINGLE SWT LEFT if SWT get Platform equals motif NON NLS 1 text Styles SWT BORDER f Editor Text new Text f Filter Table text Styles Grid Data gd new Grid Data Grid Data FILL BOTH f Editor Text set Layout Data gd set the editor f Table Editor horizontal Alignment SWT LEFT f Table Editor grab Horizontal true f Table Editor set Editor f Editor Text f New Table Item 0 get the editor ready to use f Editor Text set Text f New Stack Filter get Name f Editor Text select All set Editor Listeners f Editor Text f Editor Text set Focus  editFilter fEditorText validateChangeAndCleanup fNewStackFilter fStackFilterContentProvider addFilter DEFAULT_NEW_FILTER_TEXT fNewTableItem fFilterTable getItem textStyles getPlatform textStyles fEditorText fFilterTable textStyles GridData GridData GridData FILL_BOTH fEditorText setLayoutData fTableEditor horizontalAlignment fTableEditor grabHorizontal fTableEditor setEditor fEditorText fNewTableItem fEditorText setText fNewStackFilter getName fEditorText selectAll setEditorListeners fEditorText fEditorText setFocus
text add Key Listener new Key Adapter public void key Released Key Event event if event character SWT CR if f Invalid Editor Text null f Editor Text set Text f Invalid Editor Text f Invalid Editor Text null else validate Change And Cleanup else if event character SWT ESC remove New Filter cleanup Editor  addKeyListener KeyAdapter keyReleased KeyEvent fInvalidEditorText fEditorText setText fInvalidEditorText fInvalidEditorText validateChangeAndCleanup removeNewFilter cleanupEditor
text add Focus Listener new Focus Adapter public void focus Lost Focus Event event if f Invalid Editor Text null f Editor Text set Text f Invalid Editor Text f Invalid Editor Text null else validate Change And Cleanup  addFocusListener FocusAdapter focusLost FocusEvent fInvalidEditorText fEditorText setText fInvalidEditorText fInvalidEditorText validateChangeAndCleanup
CR in the text field closes the entire dialog text add Listener SWT Traverse new Listener public void handle Event Event event event doit false  addListener handleEvent
private void set Editor Listeners Text text CR means commit the changes ESC means abort and don t commit text add Key Listener new Key Adapter public void key Released Key Event event if event character SWT CR if f Invalid Editor Text null f Editor Text set Text f Invalid Editor Text f Invalid Editor Text null else validate Change And Cleanup else if event character SWT ESC remove New Filter cleanup Editor Consider loss of focus on the editor to mean the same as CR text add Focus Listener new Focus Adapter public void focus Lost Focus Event event if f Invalid Editor Text null f Editor Text set Text f Invalid Editor Text f Invalid Editor Text null else validate Change And Cleanup Consume traversal events from the text widget so that CR doesn t traverse away to dialog s default button Without this hitting CR in the text field closes the entire dialog text add Listener SWT Traverse new Listener public void handle Event Event event event doit false  setEditorListeners addKeyListener KeyAdapter keyReleased KeyEvent fInvalidEditorText fEditorText setText fInvalidEditorText fInvalidEditorText validateChangeAndCleanup removeNewFilter cleanupEditor addFocusListener FocusAdapter focusLost FocusEvent fInvalidEditorText fEditorText setText fInvalidEditorText fInvalidEditorText validateChangeAndCleanup addListener handleEvent
private void validate Change And Cleanup String trimmed Value f Editor Text get Text trim if the new value is blank remove the filter if trimmed Value length 1 remove New Filter if it s invalid beep and leave sitting in the editor else if validate Editor Input trimmed Value f Invalid Editor Text trimmed Value f Editor Text set Text J Unit Messages get String J Unit Preference Page invalidstepfilterreturnescape NON NLS 1 get Shell get Display beep return otherwise commit the new value if not a duplicate else Object filters f Stack Filter Content Provider get Elements null for int i 0 i filters length i Filter filter Filter filters i if filter get Name equals trimmed Value remove New Filter cleanup Editor return f New Table Item set Text trimmed Value f New Stack Filter set Name trimmed Value f Filter Viewer refresh cleanup Editor  validateChangeAndCleanup trimmedValue fEditorText getText trimmedValue removeNewFilter validateEditorInput trimmedValue fInvalidEditorText trimmedValue fEditorText setText JUnitMessages getString JUnitPreferencePage getShell getDisplay fStackFilterContentProvider getElements getName trimmedValue removeNewFilter cleanupEditor fNewTableItem setText trimmedValue fNewStackFilter setName trimmedValue fFilterViewer cleanupEditor
Cleanup all widgetry resources used by the in place editing private void cleanup Editor if f Editor Text null return f New Stack Filter null f New Table Item null f Table Editor set Editor null null 0 f Editor Text dispose f Editor Text null  cleanupEditor fEditorText fNewStackFilter fNewTableItem fTableEditor setEditor fEditorText fEditorText
private void remove New Filter f Stack Filter Content Provider remove Filters new Object f New Stack Filter  removeNewFilter fStackFilterContentProvider removeFilters fNewStackFilter
A valid step filter is simply one that is a valid Java identifier and as defined in the JDI spec the regular expressions used for step filtering must be limited to exact matches or patterns that begin with or end with Beyond this a string cannot be validated as corresponding to an existing type or package and this is probably not even desirable private boolean validate Editor Input String trimmed Value char first Char trimmed Value char At 0 if Character is Java Identifier Start first Char first Char return false int length trimmed Value length for int i 1 i length i char c trimmed Value char At i if Character is Java Identifier Part c if c i length 1 continue if c i length 1 continue return false return true  validateEditorInput trimmedValue firstChar trimmedValue charAt isJavaIdentifierStart firstChar firstChar trimmedValue trimmedValue charAt isJavaIdentifierPart
private void add Type Shell shell get Shell Selection Dialog dialog null try dialog JavaUI create Type Dialog shell PlatformUI get Workbench get Progress Service Search Engine create Workspace Scope I Java Element Search Constants CONSIDER CLASSES false catch Java Model Exception jme String title J Unit Messages get String J Unit Preference Page addtypedialog title NON NLS 1 String message J Unit Messages get String J Unit Preference Page addtypedialog error message NON NLS 1 Exception Handler handle jme shell title message return dialog set Title J Unit Messages get String J Unit Preference Page addtypedialog title NON NLS 1 dialog set Message J Unit Messages get String J Unit Preference Page addtypedialog message NON NLS 1 if dialog open I Dialog Constants CANCEL ID return Object types dialog get Result if types null types length 0 I Type type I Type types 0 f Stack Filter Content Provider add Filter type get Fully Qualified Name true  addType getShell SelectionDialog createTypeDialog getWorkbench getProgressService SearchEngine createWorkspaceScope IJavaElementSearchConstants CONSIDER_CLASSES JavaModelException JUnitMessages getString JUnitPreferencePage JUnitMessages getString JUnitPreferencePage ExceptionHandler setTitle JUnitMessages getString JUnitPreferencePage setMessage JUnitMessages getString JUnitPreferencePage IDialogConstants CANCEL_ID getResult IType IType fStackFilterContentProvider addFilter getFullyQualifiedName
private void add Package Shell shell get Shell Element List Selection Dialog dialog null try dialog J Unit Plugin create All Packages Dialog shell null true catch Java Model Exception jme String title J Unit Messages get String J Unit Preference Page addpackagedialog title NON NLS 1 String message J Unit Messages get String J Unit Preference Page addpackagedialog error message NON NLS 1 Exception Handler handle jme shell title message return dialog set Title J Unit Messages get String J Unit Preference Page addpackagedialog title NON NLS 1 dialog set Message J Unit Messages get String J Unit Preference Page addpackagedialog message NON NLS 1 dialog set Multiple Selection true if dialog open I Dialog Constants CANCEL ID return Object packages dialog get Result if packages null return for int i 0 i packages length i I Java Element pkg I Java Element packages i String filter pkg get Element Name if filter length 1 filter J Unit Messages get String J Unit Main Tab label defaultpackage NON NLS 1 else filter NON NLS 1 f Stack Filter Content Provider add Filter filter true  addPackage getShell ElementListSelectionDialog JUnitPlugin createAllPackagesDialog JavaModelException JUnitMessages getString JUnitPreferencePage JUnitMessages getString JUnitPreferencePage ExceptionHandler setTitle JUnitMessages getString JUnitPreferencePage setMessage JUnitMessages getString JUnitPreferencePage setMultipleSelection IDialogConstants CANCEL_ID getResult IJavaElement IJavaElement getElementName JUnitMessages getString JUnitMainTab fStackFilterContentProvider addFilter
private void remove Filters I Structured Selection selection I Structured Selection f Filter Viewer get Selection f Stack Filter Content Provider remove Filters selection to Array  removeFilters IStructuredSelection IStructuredSelection fFilterViewer getSelection fStackFilterContentProvider removeFilters toArray
private void check All Filters boolean check Object filters f Stack Filter Content Provider get Elements null for int i filters length 1 i 0 i Filter filters i set Checked check f Filter Viewer set All Checked check  checkAllFilters fStackFilterContentProvider getElements setChecked fFilterViewer setAllChecked
public boolean perform Ok I Preference Store store get Preference Store store set Value IJ Unit Preferences Constants SHOW ON ERROR ONLY f Show On Error Check get Selection f Stack Filter Content Provider save Filters return true  performOk IPreferenceStore getPreferenceStore setValue IJUnitPreferencesConstants SHOW_ON_ERROR_ONLY fShowOnErrorCheck getSelection fStackFilterContentProvider saveFilters
protected void perform Defaults set Default Values super perform Defaults  performDefaults setDefaultValues performDefaults
private void set Default Values f Stack Filter Content Provider set Defaults  setDefaultValues fStackFilterContentProvider setDefaults
Returns the default list of active stack filters return list protected List create Default Stack Filters List return Arrays as List fg Default Filter Patterns  createDefaultStackFiltersList asList fgDefaultFilterPatterns
Returns a list of active stack filters return list protected List create Active Stack Filters List return Arrays as List get Filter Patterns  createActiveStackFiltersList asList getFilterPatterns
Returns a list of active stack filters return list protected List create Inactive Stack Filters List String strings J Unit Preference Page parse List get Preference Store get String IJ Unit Preferences Constants PREF INACTIVE FILTERS LIST return Arrays as List strings  createInactiveStackFiltersList JUnitPreferencePage parseList getPreferenceStore getString IJUnitPreferencesConstants PREF_INACTIVE_FILTERS_LIST asList
protected void update Actions if f Enable All Button null return boolean enabled f Filter Viewer get Table get Item Count 0 f Enable All Button set Enabled enabled f Disable All Button set Enabled enabled  updateActions fEnableAllButton fFilterViewer getTable getItemCount fEnableAllButton setEnabled fDisableAllButton setEnabled
public static String get Filter Patterns I Preference Store store J Unit Plugin get Default get Preference Store return J Unit Preference Page parse List store get String IJ Unit Preferences Constants PREF ACTIVE FILTERS LIST  getFilterPatterns IPreferenceStore JUnitPlugin getDefault getPreferenceStore JUnitPreferencePage parseList getString IJUnitPreferencesConstants PREF_ACTIVE_FILTERS_LIST
public static boolean get Filter Stack I Preference Store store J Unit Plugin get Default get Preference Store return store get Boolean IJ Unit Preferences Constants DO FILTER STACK  getFilterStack IPreferenceStore JUnitPlugin getDefault getPreferenceStore getBoolean IJUnitPreferencesConstants DO_FILTER_STACK
public static void set Filter Stack boolean filter I Preference Store store J Unit Plugin get Default get Preference Store store set Value IJ Unit Preferences Constants DO FILTER STACK filter  setFilterStack IPreferenceStore JUnitPlugin getDefault getPreferenceStore setValue IJUnitPreferencesConstants DO_FILTER_STACK
public static void initialize Defaults I Preference Store store store set Default IJ Unit Preferences Constants DO FILTER STACK true store set Default IJ Unit Preferences Constants SHOW ON ERROR ONLY true String list store get String IJ Unit Preferences Constants PREF ACTIVE FILTERS LIST if equals list NON NLS 1 String pref J Unit Preference Page serialize List fg Default Filter Patterns store set Value IJ Unit Preferences Constants PREF ACTIVE FILTERS LIST pref store set Value IJ Unit Preferences Constants PREF INACTIVE FILTERS LIST NON NLS 1  initializeDefaults IPreferenceStore setDefault IJUnitPreferencesConstants DO_FILTER_STACK setDefault IJUnitPreferencesConstants SHOW_ON_ERROR_ONLY getString IJUnitPreferencesConstants PREF_ACTIVE_FILTERS_LIST JUnitPreferencePage serializeList fgDefaultFilterPatterns setValue IJUnitPreferencesConstants PREF_ACTIVE_FILTERS_LIST setValue IJUnitPreferencesConstants PREF_INACTIVE_FILTERS_LIST
public static boolean get Show On Error Only I Preference Store store J Unit Plugin get Default get Preference Store return store get Boolean IJ Unit Preferences Constants SHOW ON ERROR ONLY  getShowOnErrorOnly IPreferenceStore JUnitPlugin getDefault getPreferenceStore getBoolean IJUnitPreferencesConstants SHOW_ON_ERROR_ONLY
Parses the comma separated string into an array of strings return list private static String parse List String list String List list new Array List 10 String Tokenizer tokenizer new String Tokenizer list String NON NLS 1 while tokenizer has More Tokens list add tokenizer next Token return String list to Array new String list size  parseList listString ArrayList StringTokenizer StringTokenizer listString hasMoreTokens nextToken toArray
Serializes the array of strings into one comma separated string param list array of strings return a single string composed of the given list private static String serialize List String list if list null return NON NLS 1 String Buffer buffer new String Buffer for int i 0 i list length i if i 0 buffer append buffer append list i return buffer to String  serializeList StringBuffer StringBuffer toString

add Control Listener new Control Adapter public void control Resized Control Event e f Color Bar Width scale f Current Tick Count redraw  addControlListener ControlAdapter controlResized ControlEvent fColorBarWidth fCurrentTickCount
add Paint Listener new Paint Listener public void paint Control Paint Event e paint e  addPaintListener PaintListener paintControl PaintEvent
add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e f Failure Color dispose fOK Color dispose f Stopped Color dispose  addDisposeListener DisposeListener widgetDisposed DisposeEvent fFailureColor fOKColor fStoppedColor
public J Unit Progress Bar Composite parent super parent SWT NONE add Control Listener new Control Adapter public void control Resized Control Event e f Color Bar Width scale f Current Tick Count redraw add Paint Listener new Paint Listener public void paint Control Paint Event e paint e add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e f Failure Color dispose fOK Color dispose f Stopped Color dispose Display display parent get Display f Failure Color new Color display 159 63 63 fOK Color new Color display 95 191 95 f Stopped Color new Color display 120 120 120  JUnitProgressBar addControlListener ControlAdapter controlResized ControlEvent fColorBarWidth fCurrentTickCount addPaintListener PaintListener paintControl PaintEvent addDisposeListener DisposeListener widgetDisposed DisposeEvent fFailureColor fOKColor fStoppedColor getDisplay fFailureColor fOKColor fStoppedColor
public void set Maximum int max f Max Tick Count max  setMaximum fMaxTickCount
public void reset f Error false f Stopped false f Current Tick Count 0 f Color Bar Width 0 f Max Tick Count 0 redraw  fError fStopped fCurrentTickCount fColorBarWidth fMaxTickCount
private void paint Step int startX int endX GC gc new GC this set Status Color gc Rectangle rect get Client Area startX Math max 1 startX gc fill Rectangle startX 1 endX startX rect height 2 gc dispose  paintStep setStatusColor getClientArea fillRectangle
private void set Status Color GC gc if f Stopped gc set Background f Stopped Color else if f Error gc set Background f Failure Color else if f Stopped gc set Background f Stopped Color else gc set Background fOK Color  setStatusColor fStopped setBackground fStoppedColor fError setBackground fFailureColor fStopped setBackground fStoppedColor setBackground fOKColor
public void stopped f Stopped true redraw  fStopped
private int scale int value if f Max Tick Count 0 Rectangle r get Client Area if r width 0 return Math max 0 value r width 2 f Max Tick Count return value  fMaxTickCount getClientArea fMaxTickCount
private void draw Bevel Rect GC gc int x int y int w int h Color topleft Color bottomright gc set Foreground topleft gc draw Line x y x w 1 y gc draw Line x y x y h 1 gc set Foreground bottomright gc draw Line x w y x w y h gc draw Line x y h x w y h  drawBevelRect setForeground drawLine drawLine setForeground drawLine drawLine
private void paint Paint Event event GC gc event gc Display disp get Display Rectangle rect get Client Area gc fill Rectangle rect draw Bevel Rect gc rect x rect y rect width 1 rect height 1 disp get System Color SWT COLOR WIDGET NORMAL SHADOW disp get System Color SWT COLOR WIDGET HIGHLIGHT SHADOW set Status Color gc f Color Bar Width Math min rect width 2 f Color Bar Width gc fill Rectangle 1 1 f Color Bar Width rect height 2  PaintEvent getDisplay getClientArea fillRectangle drawBevelRect getSystemColor COLOR_WIDGET_NORMAL_SHADOW getSystemColor COLOR_WIDGET_HIGHLIGHT_SHADOW setStatusColor fColorBarWidth fColorBarWidth fillRectangle fColorBarWidth
public Point compute Size int w Hint int h Hint boolean changed check Widget Point size new Point DEFAULT WIDTH DEFAULT HEIGHT if w Hint SWT DEFAULT size x w Hint if h Hint SWT DEFAULT size y h Hint return size  computeSize wHint hHint checkWidget DEFAULT_WIDTH DEFAULT_HEIGHT wHint wHint hHint hHint
public void step int failures f Current Tick Count int x f Color Bar Width f Color Bar Width scale f Current Tick Count if f Error failures 0 f Error true x 1 if f Current Tick Count f Max Tick Count f Color Bar Width get Client Area width 1 paint Step x f Color Bar Width  fCurrentTickCount fColorBarWidth fColorBarWidth fCurrentTickCount fError fError fCurrentTickCount fMaxTickCount fColorBarWidth getClientArea paintStep fColorBarWidth
public void refresh boolean has Errors f Error has Errors redraw  hasErrors fError hasErrors

see org eclipse jdt ui text java I Quick Fix Processor has Corrections org eclipse jdt core I Compilation Unit int public boolean has Corrections I Compilation Unit unit int problem Id return I Problem Superclass Not Found problem Id I Problem Import Not Found problem Id  IQuickFixProcessor hasCorrections ICompilationUnit hasCorrections ICompilationUnit problemId IProblem SuperclassNotFound problemId IProblem ImportNotFound problemId
public I Java Completion Proposal get Corrections final I Invocation Context context I Problem Location locations if isJ Unit Problem context locations return new I Java Completion Proposal new J Unit Add Library Proposal context return new I Java Completion Proposal  IJavaCompletionProposal getCorrections IInvocationContext IProblemLocation isJUnitProblem IJavaCompletionProposal JUnitAddLibraryProposal IJavaCompletionProposal
private boolean isJ Unit Problem I Invocation Context context I Problem Location locations I Compilation Unit unit context get Compilation Unit for int i 0 i locations length i I Problem Location location locations i try String s unit get Buffer get Text location get Offset location get Length if s equals Test Case NON NLS 1 s equals junit NON NLS 1 s equals Test Suite NON NLS 1 s equals Test NON NLS 1 return true NON NLS 1 catch Java Model Exception e J Unit Plugin log e get Status return false  isJUnitProblem IInvocationContext IProblemLocation ICompilationUnit getCompilationUnit IProblemLocation getBuffer getText getOffset getLength TestCase TestSuite JavaModelException JUnitPlugin getStatus

Constructor for Open Editor Action protected Open Editor Action Test Runner View Part test Runner String test Class Name super J Unit Messages get String Open Editor Action action label NON NLS 1 f Class Name test Class Name f Test Runner test Runner  OpenEditorAction OpenEditorAction TestRunnerViewPart testRunner testClassName JUnitMessages getString OpenEditorAction fClassName testClassName fTestRunner testRunner
public void run I Text Editor text Editor null try I Java Element element find Element get Launched Project f Class Name if element null Message Dialog open Error get Shell J Unit Messages get String Open Editor Action error cannotopen title J Unit Messages get String Open Editor Action error cannotopen message NON NLS 1 NON NLS 2 return text Editor I Text Editor Editor Utility open In Editor element false catch Core Exception e Error Dialog open Error get Shell J Unit Messages get String Open Editor Action error dialog title J Unit Messages get String Open Editor Action error dialog message e get Status NON NLS 1 NON NLS 2 return if text Editor null f Test Runner set Info Message J Unit Messages get String Open Editor Action message cannotopen NON NLS 1 return reveal text Editor  ITextEditor textEditor IJavaElement findElement getLaunchedProject fClassName MessageDialog openError getShell JUnitMessages getString OpenEditorAction JUnitMessages getString OpenEditorAction textEditor ITextEditor EditorUtility openInEditor CoreException ErrorDialog openError getShell JUnitMessages getString OpenEditorAction JUnitMessages getString OpenEditorAction getStatus textEditor fTestRunner setInfoMessage JUnitMessages getString OpenEditorAction textEditor
protected Shell get Shell return f Test Runner get Site get Shell  getShell fTestRunner getSite getShell
protected I Java Project get Launched Project return f Test Runner get Launched Project  IJavaProject getLaunchedProject fTestRunner getLaunchedProject
protected String get Class Name return f Class Name  getClassName fClassName
protected abstract I Java Element find Element I Java Project project String class Name throws Core Exception  IJavaElement findElement IJavaProject className CoreException
protected abstract I Java Element find Element I Java Project project String class Name throws Core Exception protected abstract void reveal I Text Editor editor  IJavaElement findElement IJavaProject className CoreException ITextEditor

public void accept Search Match Search Match match throws Core Exception I Java Element enclosing Element I Java Element match get Element String resource Name match get Resource get Name if enclosing Element instanceof I Type resource Name equals fCU Name f Found enclosing Element  acceptSearchMatch SearchMatch CoreException IJavaElement enclosingElement IJavaElement getElement resourceName getResource getName enclosingElement IType resourceName fCUName fFound enclosingElement
Constructor for Open Editor At Line Action public Open Editor At Line Action Test Runner View Part test Runner String cu Name String class Name int line super test Runner class Name Workbench Help set Help this IJ Unit Help Context Ids OPENEDITORATLINE ACTION f Line Number line fCU Name cu Name  OpenEditorAtLineAction OpenEditorAtLineAction TestRunnerViewPart testRunner cuName className testRunner className WorkbenchHelp setHelp IJUnitHelpContextIds OPENEDITORATLINE_ACTION fLineNumber fCUName cuName
protected void reveal I Text Editor text Editor if f Line Number 0 try I Document document text Editor get Document Provider get Document text Editor get Editor Input text Editor select And Reveal document get Line Offset f Line Number 1 document get Line Length f Line Number 1 catch Bad Location Exception x marker refers to invalid text position do nothing  ITextEditor textEditor fLineNumber IDocument textEditor getDocumentProvider getDocument textEditor getEditorInput textEditor selectAndReveal getLineOffset fLineNumber getLineLength fLineNumber BadLocationException
protected I Java Element find Element I Java Project project String class Name throws Core Exception I Java Element element project find Type class Name fix for bug 37333 if element null Search Pattern pattern Search Pattern create Pattern class Name I Java Search Constants TYPE I Java Search Constants DECLARATIONS Search Pattern R EXACT MATCH Search Pattern R CASE SENSITIVE I Java Search Scope scope Search Engine create Java Search Scope new I Java Element project false Non Public Class InCU Collector requestor new Non Public Class InCU Collector Search Engine search Engine new Search Engine search Engine search pattern new Search Participant Search Engine get Default Search Participant scope requestor new Null Progress Monitor element requestor f Found return element  IJavaElement findElement IJavaProject className CoreException IJavaElement findType className SearchPattern SearchPattern createPattern className IJavaSearchConstants IJavaSearchConstants SearchPattern R_EXACT_MATCH SearchPattern R_CASE_SENSITIVE IJavaSearchScope SearchEngine createJavaSearchScope IJavaElement NonPublicClassInCUCollector NonPublicClassInCUCollector SearchEngine searchEngine SearchEngine searchEngine SearchParticipant SearchEngine getDefaultSearchParticipant NullProgressMonitor fFound
public boolean is Enabled try return get Launched Project find Type get Class Name null catch Java Model Exception e return false  isEnabled getLaunchedProject findType getClassName JavaModelException

Constructor for Open Test Action public Open Test Action Test Runner View Part test Runner String class Name String method super test Runner class Name Workbench Help set Help this IJ Unit Help Context Ids OPENTEST ACTION f Method Name method  OpenTestAction OpenTestAction TestRunnerViewPart testRunner className testRunner className WorkbenchHelp setHelp IJUnitHelpContextIds OPENTEST_ACTION fMethodName
public Open Test Action Test Runner View Part test Runner String class Name this test Runner class Name null  OpenTestAction TestRunnerViewPart testRunner className testRunner className
protected I Java Element find Element I Java Project project String class Name throws Java Model Exception I Type type project find Type class Name if type null return null if f Method Name null return type I Method method find Method type if method null I Type Hierarchy type Hierarchy type new Supertype Hierarchy null I Type types type Hierarchy get All Superclasses type for int i 0 i types length i method find Method types i if method null break if method null String title J Unit Messages get String Open Test Action error title NON NLS 1 String message J Unit Messages get Formatted String Open Test Action error method No Found f Method Name NON NLS 1 Message Dialog open Information get Shell title message return type f Range method get Name Range return method  IJavaElement findElement IJavaProject className JavaModelException IType findType className fMethodName IMethod findMethod ITypeHierarchy typeHierarchy newSupertypeHierarchy IType typeHierarchy getAllSuperclasses findMethod JUnitMessages getString OpenTestAction JUnitMessages getFormattedString OpenTestAction methodNoFound fMethodName MessageDialog openInformation getShell fRange getNameRange
I Method find Method I Type type I Method method type get Method f Method Name new String 0 if method null method exists return method return null  IMethod findMethod IType IMethod getMethod fMethodName
protected void reveal I Text Editor text Editor if f Range null text Editor select And Reveal f Range get Offset f Range get Length  ITextEditor textEditor fRange textEditor selectAndReveal fRange getOffset fRange getLength
public boolean is Enabled try return get Launched Project find Type get Class Name null catch Java Model Exception e return false  isEnabled getLaunchedProject findType getClassName JavaModelException

void load if is Loaded return for int i 0 i PROGRESS STEPS i String okname BASE OK Integer to String i 1 gif NON NLS 1 fOK Images i create Image okname String failurename BASE FAILURE Integer to String i 1 gif NON NLS 1 f Failure Images i create Image failurename  isLoaded PROGRESS_STEPS toString fOKImages createImage toString fFailureImages createImage
Image create Image String name try Image Descriptor id Image Descriptor create FromURL J Unit Plugin make Icon FileURL name return id create Image catch MalformedURL Exception e fall through if f Missing Image null f Missing Image Image Descriptor get Missing Image Descriptor create Image return f Missing Image  createImage ImageDescriptor ImageDescriptor createFromURL JUnitPlugin makeIconFileURL createImage MalformedURLException fMissingImage fMissingImage ImageDescriptor getMissingImageDescriptor createImage fMissingImage
public void dispose if is Loaded return if f Missing Image null f Missing Image dispose for int i 0 i PROGRESS STEPS i fOK Images i dispose fOK Images i null f Failure Images i dispose f Failure Images i null  isLoaded fMissingImage fMissingImage PROGRESS_STEPS fOKImages fOKImages fFailureImages fFailureImages
public Image get Image int current int total int errors int failures if is Loaded load if total 0 return fOK Images 0 int index current PROGRESS STEPS total 1 index Math min Math max 0 index PROGRESS STEPS 1 if errors failures 0 return fOK Images index return f Failure Images index  getImage isLoaded fOKImages PROGRESS_STEPS PROGRESS_STEPS fOKImages fFailureImages
boolean is Loaded return fOK Images 0 null  isLoaded fOKImages

public class Remote Test Runner Client public abstract class Listener Safe Runnable implements I Safe Runnable public void handle Exception Throwable exception J Unit Plugin log exception  RemoteTestRunnerClient ListenerSafeRunnable ISafeRunnable handleException JUnitPlugin
abstract class Processing State abstract Processing State read Message String message  ProcessingState ProcessingState readMessage
class Default Processing State extends Processing State Processing State read Message String message if message starts With Message Ids TRACE START f Failed Trace NON NLS 1 return f Trace State if message starts With Message Ids EXPECTED START f Expected Result null return f Expected State if message starts With Message Ids ACTUAL START f Actual Result null return f Actual State if message starts With Message Ids RTRACE START f Failed Rerun Trace NON NLS 1 return f Rerun State String arg message substring Message Ids MSG HEADER LENGTH if message starts With Message Ids TEST RUN START version 2 format count version 2 format count version int count 0 int v arg index Of if v 1 f Version v1 NON NLS 1 count Integer parse Int arg else f Version arg substring v 1 String sc arg substring 0 v count Integer parse Int sc notify Test Run Started count return this if message starts With Message Ids TEST START notify Test Started arg return this if message starts With Message Ids TEST END notify Test Ended arg return this if message starts With Message Ids TEST ERROR extract Failure arg I Test Run Listener STATUS ERROR return this if message starts With Message Ids TEST FAILED extract Failure arg I Test Run Listener STATUS FAILURE return this if message starts With Message Ids TEST RUN END long elapsed Time Long parse Long arg test Run Ended elapsed Time return this if message starts With Message Ids TEST STOPPED long elapsed Time Long parse Long arg notify Test Run Stopped elapsed Time shut Down return this if message starts With Message Ids TEST TREE notify Test Tree Entry arg return this if message starts With Message Ids TEST RERAN if has Test Id scan Reran Message arg else scan Old Reran Message arg return this return this  DefaultProcessingState ProcessingState ProcessingState readMessage startsWith MessageIds TRACE_START fFailedTrace fTraceState startsWith MessageIds EXPECTED_START fExpectedResult fExpectedState startsWith MessageIds ACTUAL_START fActualResult fActualState startsWith MessageIds RTRACE_START fFailedRerunTrace fRerunState MessageIds MSG_HEADER_LENGTH startsWith MessageIds TEST_RUN_START indexOf fVersion parseInt fVersion parseInt notifyTestRunStarted startsWith MessageIds TEST_START notifyTestStarted startsWith MessageIds TEST_END notifyTestEnded startsWith MessageIds TEST_ERROR extractFailure ITestRunListener STATUS_ERROR startsWith MessageIds TEST_FAILED extractFailure ITestRunListener STATUS_FAILURE startsWith MessageIds TEST_RUN_END elapsedTime parseLong testRunEnded elapsedTime startsWith MessageIds TEST_STOPPED elapsedTime parseLong notifyTestRunStopped elapsedTime shutDown startsWith MessageIds TEST_TREE notifyTestTreeEntry startsWith MessageIds TEST_RERAN hasTestId scanReranMessage scanOldReranMessage
class Trace Processing State extends Processing State Processing State read Message String message if message starts With Message Ids TRACE END notify Test Failed f Failed Trace NON NLS 1 f Expected Result null f Actual Result null return f Default State f Failed Trace message n return this  TraceProcessingState ProcessingState ProcessingState readMessage startsWith MessageIds TRACE_END notifyTestFailed fFailedTrace fExpectedResult fActualResult fDefaultState fFailedTrace
class Expected Processing State extends Processing State Processing State read Message String message if message starts With Message Ids EXPECTED END return f Default State if f Expected Result null f Expected Result message n else f Expected Result message n return this  ExpectedProcessingState ProcessingState ProcessingState readMessage startsWith MessageIds EXPECTED_END fDefaultState fExpectedResult fExpectedResult fExpectedResult
class Actual Processing State extends Processing State Processing State read Message String message if message starts With Message Ids ACTUAL END return f Default State if f Actual Result null f Actual Result message n else f Actual Result message n return this  ActualProcessingState ProcessingState ProcessingState readMessage startsWith MessageIds ACTUAL_END fDefaultState fActualResult fActualResult fActualResult
class Rerun Trace Processing State extends Processing State Processing State read Message String message if message starts With Message Ids RTRACE END return f Default State f Failed Rerun Trace message n return this  RerunTraceProcessingState ProcessingState ProcessingState readMessage startsWith MessageIds RTRACE_END fDefaultState fFailedRerunTrace
int f Server Port public Server Connection int port super Server Connection NON NLS 1 f Server Port port  fServerPort ServerConnection ServerConnection fServerPort
public void run try if f Debug System out println Creating server socket f Server Port NON NLS 1 f Server Socket new Server Socket f Server Port f Socket f Server Socket accept try f Buffered Reader new Buffered Reader new Input Stream Reader f Socket get Input Stream UTF 8 NON NLS 1 catch Unsupported Encoding Exception e f Buffered Reader new Buffered Reader new Input Stream Reader f Socket get Input Stream try f Writer new Print Writer new Output Stream Writer f Socket get Output Stream UTF 8 true NON NLS 1 catch Unsupported Encoding Exception e1 f Writer new Print Writer new Output Stream Writer f Socket get Output Stream true String message while f Buffered Reader null message read Message f Buffered Reader null receive Message message catch Socket Exception e notify Test Run Terminated catch IO Exception e System out println e fall through shut Down  fDebug fServerPort fServerSocket ServerSocket fServerPort fSocket fServerSocket fBufferedReader BufferedReader InputStreamReader fSocket getInputStream UnsupportedEncodingException fBufferedReader BufferedReader InputStreamReader fSocket getInputStream fWriter PrintWriter OutputStreamWriter fSocket getOutputStream UnsupportedEncodingException fWriter PrintWriter OutputStreamWriter fSocket getOutputStream fBufferedReader readMessage fBufferedReader receiveMessage SocketException notifyTestRunTerminated IOException shutDown
Start listening to a test run Start a server connection that the Remote Test Runner can connect to public synchronized void start Listening I Test Run Listener listeners int port f Listeners listeners f Port port Server Connection connection new Server Connection port connection start  RemoteTestRunner startListening ITestRunListener fListeners fPort ServerConnection ServerConnection
Requests to stop the remote test run public synchronized void stop Test if is Running f Writer println Message Ids TEST STOP f Writer flush  stopTest isRunning fWriter MessageIds TEST_STOP fWriter
private synchronized void shut Down if f Debug System out println shutdown f Port NON NLS 1 if f Writer null f Writer close f Writer null try if f Buffered Reader null f Buffered Reader close f Buffered Reader null catch IO Exception e try if f Socket null f Socket close f Socket null catch IO Exception e try if f Server Socket null f Server Socket close f Server Socket null catch IO Exception e  shutDown fDebug fPort fWriter fWriter fWriter fBufferedReader fBufferedReader fBufferedReader IOException fSocket fSocket fSocket IOException fServerSocket fServerSocket fServerSocket IOException
public boolean is Running return f Socket null  isRunning fSocket
private String read Message Buffered Reader in throws IO Exception return in read Line  readMessage BufferedReader IOException readLine
private void receive Message String message f Current State f Current State read Message message  receiveMessage fCurrentState fCurrentState readMessage
private void scan Old Reran Message String arg OLD V1 format format class Name test Name status status FAILURE ERROR OK int c arg index Of NON NLS 1 int t arg index Of c 1 NON NLS 1 String class Name arg substring 0 c String test Name arg substring c 1 t String status arg substring t 1 int status Code I Test Run Listener STATUS OK if status equals FAILURE NON NLS 1 status Code I Test Run Listener STATUS FAILURE else if status equals ERROR NON NLS 1 status Code I Test Run Listener STATUS ERROR String trace NON NLS 1 if status Code I Test Run Listener STATUS OK trace f Failed Rerun Trace assumption a rerun trace was sent before notify Test Reran class Name test Name class Name test Name status Code trace  scanOldReranMessage className testName indexOf indexOf className testName statusCode ITestRunListener STATUS_OK statusCode ITestRunListener STATUS_FAILURE statusCode ITestRunListener STATUS_ERROR statusCode ITestRunListener STATUS_OK fFailedRerunTrace notifyTestReran className testName className testName statusCode
private void scan Reran Message String arg format test Id class Name test Name status status FAILURE ERROR OK int i arg index Of int c arg index Of i 1 NON NLS 1 int t arg index Of c 1 NON NLS 1 String test Id arg substring 0 i String class Name arg substring i 1 c String test Name arg substring c 1 t String status arg substring t 1 int status Code I Test Run Listener STATUS OK if status equals FAILURE NON NLS 1 status Code I Test Run Listener STATUS FAILURE else if status equals ERROR NON NLS 1 status Code I Test Run Listener STATUS ERROR String trace NON NLS 1 if status Code I Test Run Listener STATUS OK trace f Failed Rerun Trace assumption a rerun trace was sent before notify Test Reran test Id class Name test Name status Code trace  scanReranMessage testId className testName indexOf indexOf indexOf testId className testName statusCode ITestRunListener STATUS_OK statusCode ITestRunListener STATUS_FAILURE statusCode ITestRunListener STATUS_ERROR statusCode ITestRunListener STATUS_OK fFailedRerunTrace notifyTestReran testId className testName statusCode
private void extract Failure String arg int status String s extract Test Id arg f Failed Test Id s 0 f Failed Test s 1 f Failure Kind status  extractFailure extractTestId fFailedTestId fFailedTest fFailureKind
Returns an array with two elements The first one is the test Id the second one the test Name String extract Test Id String arg String result new String 2 if has Test Id result 0 arg use the test name as the test Id result 1 arg return result int i arg index Of result 0 arg substring 0 i result 1 arg substring i 1 arg length return result  testId testName extractTestId hasTestId indexOf
private boolean has Test Id if f Version null TODO fix me return true return f Version equals v2 NON NLS 1  hasTestId fVersion fVersion
Platform run new Listener Safe Runnable public void run if listener instanceof I Test Run Listener3 I Test Run Listener3 listener test Reran test Id class Name test Name status Code trace f Expected Result f Actual Result else listener test Reran test Id class Name test Name status Code trace  ListenerSafeRunnable ITestRunListener3 ITestRunListener3 testReran testId className testName statusCode fExpectedResult fActualResult testReran testId className testName statusCode
private void notify Test Reran final String test Id final String class Name final String test Name final int status Code final String trace for int i 0 i f Listeners length i final I Test Run Listener listener f Listeners i Platform run new Listener Safe Runnable public void run if listener instanceof I Test Run Listener3 I Test Run Listener3 listener test Reran test Id class Name test Name status Code trace f Expected Result f Actual Result else listener test Reran test Id class Name test Name status Code trace  notifyTestReran testId className testName statusCode fListeners ITestRunListener fListeners ListenerSafeRunnable ITestRunListener3 ITestRunListener3 testReran testId className testName statusCode fExpectedResult fActualResult testReran testId className testName statusCode
private void notify Test Tree Entry final String tree Entry for int i 0 i f Listeners length i if f Listeners i instanceof I Test Run Listener2 I Test Run Listener2 listener I Test Run Listener2 f Listeners i if has Test Id listener test Tree Entry fake Test Id tree Entry else listener test Tree Entry tree Entry  notifyTestTreeEntry treeEntry fListeners fListeners ITestRunListener2 ITestRunListener2 ITestRunListener2 fListeners hasTestId testTreeEntry fakeTestId treeEntry testTreeEntry treeEntry
private String fake Test Id String tree Entry extract the test name and add it as the test Id int index0 tree Entry index Of String test Name tree Entry substring 0 index0 trim return test Name tree Entry NON NLS 1  fakeTestId treeEntry testId treeEntry indexOf testName treeEntry testName treeEntry
final I Test Run Listener listener f Listeners i Platform run new Listener Safe Runnable public void run listener test Run Stopped elapsed Time  ITestRunListener fListeners ListenerSafeRunnable testRunStopped elapsedTime
private void notify Test Run Stopped final long elapsed Time for int i 0 i f Listeners length i final I Test Run Listener listener f Listeners i Platform run new Listener Safe Runnable public void run listener test Run Stopped elapsed Time  notifyTestRunStopped elapsedTime fListeners ITestRunListener fListeners ListenerSafeRunnable testRunStopped elapsedTime
final I Test Run Listener listener f Listeners i Platform run new Listener Safe Runnable public void run listener test Run Ended elapsed Time  ITestRunListener fListeners ListenerSafeRunnable testRunEnded elapsedTime
private void test Run Ended final long elapsed Time for int i 0 i f Listeners length i final I Test Run Listener listener f Listeners i Platform run new Listener Safe Runnable public void run listener test Run Ended elapsed Time  testRunEnded elapsedTime fListeners ITestRunListener fListeners ListenerSafeRunnable testRunEnded elapsedTime
final I Test Run Listener listener f Listeners i Platform run new Listener Safe Runnable public void run String s extract Test Id test listener test Ended s 0 s 1  ITestRunListener fListeners ListenerSafeRunnable extractTestId testEnded
private void notify Test Ended final String test for int i 0 i f Listeners length i final I Test Run Listener listener f Listeners i Platform run new Listener Safe Runnable public void run String s extract Test Id test listener test Ended s 0 s 1  notifyTestEnded fListeners ITestRunListener fListeners ListenerSafeRunnable extractTestId testEnded
final I Test Run Listener listener f Listeners i Platform run new Listener Safe Runnable public void run String s extract Test Id test listener test Started s 0 s 1  ITestRunListener fListeners ListenerSafeRunnable extractTestId testStarted
private void notify Test Started final String test for int i 0 i f Listeners length i final I Test Run Listener listener f Listeners i Platform run new Listener Safe Runnable public void run String s extract Test Id test listener test Started s 0 s 1  notifyTestStarted fListeners ITestRunListener fListeners ListenerSafeRunnable extractTestId testStarted
final I Test Run Listener listener f Listeners i Platform run new Listener Safe Runnable public void run listener test Run Started count  ITestRunListener fListeners ListenerSafeRunnable testRunStarted
private void notify Test Run Started final int count for int i 0 i f Listeners length i final I Test Run Listener listener f Listeners i Platform run new Listener Safe Runnable public void run listener test Run Started count  notifyTestRunStarted fListeners ITestRunListener fListeners ListenerSafeRunnable testRunStarted
Platform run new Listener Safe Runnable public void run if listener instanceof I Test Run Listener3 I Test Run Listener3 listener test Failed f Failure Kind f Failed Test Id f Failed Test f Failed Trace f Expected Result f Actual Result else listener test Failed f Failure Kind f Failed Test Id f Failed Test f Failed Trace  ListenerSafeRunnable ITestRunListener3 ITestRunListener3 testFailed fFailureKind fFailedTestId fFailedTest fFailedTrace fExpectedResult fActualResult testFailed fFailureKind fFailedTestId fFailedTest fFailedTrace
private void notify Test Failed for int i 0 i f Listeners length i final I Test Run Listener listener f Listeners i Platform run new Listener Safe Runnable public void run if listener instanceof I Test Run Listener3 I Test Run Listener3 listener test Failed f Failure Kind f Failed Test Id f Failed Test f Failed Trace f Expected Result f Actual Result else listener test Failed f Failure Kind f Failed Test Id f Failed Test f Failed Trace  notifyTestFailed fListeners ITestRunListener fListeners ListenerSafeRunnable ITestRunListener3 ITestRunListener3 testFailed fFailureKind fFailedTestId fFailedTest fFailedTrace fExpectedResult fActualResult testFailed fFailureKind fFailedTestId fFailedTest fFailedTrace
final I Test Run Listener listener f Listeners i Platform run new Listener Safe Runnable public void run listener test Run Terminated  ITestRunListener fListeners ListenerSafeRunnable testRunTerminated
private void notify Test Run Terminated for int i 0 i f Listeners length i final I Test Run Listener listener f Listeners i Platform run new Listener Safe Runnable public void run listener test Run Terminated  notifyTestRunTerminated fListeners ITestRunListener fListeners ListenerSafeRunnable testRunTerminated
public void rerun Test String test Id String class Name String test Name if is Running f Writer println Message Ids TEST RERUN test Id class Name test Name NON NLS 1 NON NLS 2 f Writer flush  rerunTest testId className testName isRunning fWriter MessageIds TEST_RERUN testId className testName fWriter

Constructor for Rerun Action public Rerun Action Test Runner View Part runner String test Id String class Name String test Name String launch Mode super if launch Mode equals I Launch Manager RUN MODE set Text J Unit Messages get String Rerun Action label run NON NLS 1 else if launch Mode equals I Launch Manager DEBUG MODE set Text J Unit Messages get String Rerun Action label debug NON NLS 1 Workbench Help set Help this IJ Unit Help Context Ids RERUN ACTION f Test Runner runner f Test Id test Id f Class Name class Name f Test Name test Name f Launch Mode launch Mode  RerunAction RerunAction TestRunnerViewPart testId className testName launchMode launchMode ILaunchManager RUN_MODE setText JUnitMessages getString RerunAction launchMode ILaunchManager DEBUG_MODE setText JUnitMessages getString RerunAction WorkbenchHelp setHelp IJUnitHelpContextIds RERUN_ACTION fTestRunner fTestId testId fClassName className fTestName testName fLaunchMode launchMode
see I Action run public void run f Test Runner rerun Test f Test Id f Class Name f Test Name f Launch Mode  IAction fTestRunner rerunTest fTestId fClassName fTestName fLaunchMode

public Scroll Lock Action Test Runner View Part viewer super J Unit Messages get String Scroll Lock Action action label NON NLS 1 f Runner View Part viewer set Tool Tip Text J Unit Messages get String Scroll Lock Action action tooltip NON NLS 1 set Disabled Image Descriptor J Unit Plugin get Image Descriptor dlcl16 lock gif NON NLS 1 set Hover Image Descriptor J Unit Plugin get Image Descriptor elcl16 lock gif NON NLS 1 set Image Descriptor J Unit Plugin get Image Descriptor elcl16 lock gif NON NLS 1 Workbench Help set Help this IJ Unit Help Context Ids OUTPUT SCROLL LOCK ACTION set Checked false  ScrollLockAction TestRunnerViewPart JUnitMessages getString ScrollLockAction fRunnerViewPart setToolTipText JUnitMessages getString ScrollLockAction setDisabledImageDescriptor JUnitPlugin getImageDescriptor setHoverImageDescriptor JUnitPlugin getImageDescriptor setImageDescriptor JUnitPlugin getImageDescriptor WorkbenchHelp setHelp IJUnitHelpContextIds OUTPUT_SCROLL_LOCK_ACTION setChecked
see org eclipse jface action I Action run public void run f Runner View Part set Auto Scroll is Checked  IAction fRunnerViewPart setAutoScroll isChecked

public Show Next Failure Action Test Runner View Part part super J Unit Messages get String Show Next Failure Action label NON NLS 1 set Disabled Image Descriptor J Unit Plugin get Image Descriptor dlcl16 select next gif NON NLS 1 set Hover Image Descriptor J Unit Plugin get Image Descriptor elcl16 select next gif NON NLS 1 set Image Descriptor J Unit Plugin get Image Descriptor elcl16 select next gif NON NLS 1 set Tool Tip Text J Unit Messages get String Show Next Failure Action tooltip NON NLS 1 f Part part  ShowNextFailureAction TestRunnerViewPart JUnitMessages getString ShowNextFailureAction setDisabledImageDescriptor JUnitPlugin getImageDescriptor select_next setHoverImageDescriptor JUnitPlugin getImageDescriptor select_next setImageDescriptor JUnitPlugin getImageDescriptor select_next setToolTipText JUnitMessages getString ShowNextFailureAction fPart
public void run f Part select Next Failure  fPart selectNextFailure

public Show Previous Failure Action Test Runner View Part part super J Unit Messages get String Show Previous Failure Action label NON NLS 1 set Disabled Image Descriptor J Unit Plugin get Image Descriptor dlcl16 select prev gif NON NLS 1 set Hover Image Descriptor J Unit Plugin get Image Descriptor elcl16 select prev gif NON NLS 1 set Image Descriptor J Unit Plugin get Image Descriptor elcl16 select prev gif NON NLS 1 set Tool Tip Text J Unit Messages get String Show Previous Failure Action tooltip NON NLS 1 f Part part  ShowPreviousFailureAction TestRunnerViewPart JUnitMessages getString ShowPreviousFailureAction setDisabledImageDescriptor JUnitPlugin getImageDescriptor select_prev setHoverImageDescriptor JUnitPlugin getImageDescriptor select_prev setImageDescriptor JUnitPlugin getImageDescriptor select_prev setToolTipText JUnitMessages getString ShowPreviousFailureAction fPart
public void run f Part select Previous Failure  fPart selectPreviousFailure

protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache if w Hint SWT DEFAULT h Hint SWT DEFAULT return new Point w Hint h Hint Control children composite get Children int count children length int max Width 0 max Height 0 for int i 0 i count i Control child children i Point pt child compute Size SWT DEFAULT SWT DEFAULT flush Cache max Width Math max max Width pt x max Height Math max max Height pt y if w Hint SWT DEFAULT max Width w Hint if h Hint SWT DEFAULT max Height h Hint return new Point max Width max Height  computeSize wHint hHint flushCache wHint hHint wHint hHint getChildren maxWidth maxHeight computeSize flushCache maxWidth maxWidth maxHeight maxHeight wHint maxWidth wHint hHint maxHeight hHint maxWidth maxHeight
protected void layout Composite composite boolean flush Cache Rectangle rect composite get Client Area Control children composite get Children for int i 0 i children length i children i set Bounds rect  flushCache getClientArea getChildren setBounds

public Tree Item f Tree Item public Suite Info Tree Item tree Item int test Count f Tree Item tree Item f Test Count test Count  TreeItem fTreeItem SuiteInfo TreeItem treeItem testCount fTreeItem treeItem fTestCount testCount
private class Expand All Action extends Action public Expand All Action set Text J Unit Messages get String Expand All Action text NON NLS 1 set Tool Tip Text J Unit Messages get String Expand All Action tooltip NON NLS 1  ExpandAllAction ExpandAllAction setText JUnitMessages getString ExpandAllAction setToolTipText JUnitMessages getString ExpandAllAction
public void run expand All  expandAll
public Test Hierarchy Tab  TestHierarchyTab
public void create Tab Control C Tab Folder tab Folder Clipboard clipboard Test Runner View Part runner f Test Runner Part runner C Tab Item hierarchy Tab new C Tab Item tab Folder SWT NONE hierarchy Tab set Text get Name hierarchy Tab set Image f Hierarchy Icon Composite test Tree Panel new Composite tab Folder SWT NONE Grid Layout grid Layout new Grid Layout grid Layout margin Height 0 grid Layout margin Width 0 test Tree Panel set Layout grid Layout Grid Data grid Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL test Tree Panel set Layout Data grid Data hierarchy Tab set Control test Tree Panel hierarchy Tab set Tool Tip Text J Unit Messages get String Hierarchy Run View tab tooltip NON NLS 1 f Tree new Tree test Tree Panel SWT V SCROLL SWT SINGLE grid Data new Grid Data Grid Data FILL BOTH Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL f Tree set Layout Data grid Data init Menu add Listeners  createTabControl CTabFolder tabFolder TestRunnerViewPart fTestRunnerPart CTabItem hierarchyTab CTabItem tabFolder hierarchyTab setText getName hierarchyTab setImage fHierarchyIcon testTreePanel tabFolder GridLayout gridLayout GridLayout gridLayout marginHeight gridLayout marginWidth testTreePanel setLayout gridLayout GridData gridData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL testTreePanel setLayoutData gridData hierarchyTab setControl testTreePanel hierarchyTab setToolTipText JUnitMessages getString HierarchyRunView fTree testTreePanel V_SCROLL gridData GridData GridData FILL_BOTH GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL fTree setLayoutData gridData initMenu addListeners
void dispose Icons f Error Icon dispose f Failure Icon dispose f Ok Icon dispose f Hierarchy Icon dispose f Test Icon dispose f Test Running Icon dispose f Suite Running Icon dispose f Suite Icon dispose f Suite Error Icon dispose f Suite Fail Icon dispose  disposeIcons fErrorIcon fFailureIcon fOkIcon fHierarchyIcon fTestIcon fTestRunningIcon fSuiteRunningIcon fSuiteIcon fSuiteErrorIcon fSuiteFailIcon
private void init Menu Menu Manager menu Mgr new Menu Manager menu Mgr set Remove All When Shown true menu Mgr add Menu Listener this Menu menu menu Mgr create Context Menu f Tree f Tree set Menu menu  initMenu MenuManager menuMgr MenuManager menuMgr setRemoveAllWhenShown menuMgr addMenuListener menuMgr createContextMenu fTree fTree setMenu
private String get Test Method return get Test Info get Test Method Name  getTestMethod getTestInfo getTestMethodName
private Test Run Info get Test Info Tree Item tree Items f Tree get Selection if tree Items length 0 return null return Test Run Info tree Items 0 get Data  TestRunInfo getTestInfo TreeItem treeItems fTree getSelection treeItems TestRunInfo treeItems getData
private boolean is Suite Selected Tree Item tree Items f Tree get Selection if tree Items length 1 return false return tree Items 0 get Item Count 0  isSuiteSelected TreeItem treeItems fTree getSelection treeItems treeItems getItemCount
private String get Class Name return get Test Info get Class Name  getClassName getTestInfo getClassName
public String get Selected Test Id Test Run Info test Info get Test Info if test Info null return null return test Info get Test Id  getSelectedTestId TestRunInfo testInfo getTestInfo testInfo testInfo getTestId
public String get Name return J Unit Messages get String Hierarchy Run View tab title NON NLS 1  getName JUnitMessages getString HierarchyRunView
public void set Selected Test String test Id Tree Item tree Item find Tree Item test Id if tree Item null f Tree set Selection new Tree Item tree Item  setSelectedTest testId TreeItem treeItem findTreeItem testId treeItem fTree setSelection TreeItem treeItem
public void start Test String test Id Tree Item tree Item find Tree Item test Id if tree Item null return Tree Item parent tree Item get Parent Item if f Last Parent parent update Path parent f Last Parent parent set Current Item tree Item  startTest testId TreeItem treeItem findTreeItem testId treeItem TreeItem treeItem getParentItem fLastParent updatePath fLastParent setCurrentItem treeItem
private void update Path Tree Item parent List new Path new Array List while parent null new Path add parent parent parent get Parent Item Collections reverse new Path common path List Iterator old f Execution Path list Iterator List Iterator np new Path list Iterator int c 0 while old has Next np has Next if old next np next break c clear old path for List Iterator iter f Execution Path list Iterator c iter has Next refresh Item Tree Item iter next false update new path for List Iterator iter new Path list Iterator c iter has Next refresh Item Tree Item iter next true f Execution Path new Path  updatePath TreeItem newPath ArrayList newPath getParentItem newPath ListIterator fExecutionPath listIterator ListIterator newPath listIterator hasNext hasNext ListIterator fExecutionPath listIterator hasNext refreshItem TreeItem ListIterator newPath listIterator hasNext refreshItem TreeItem fExecutionPath newPath
private void refresh Item Tree Item item boolean on Path if on Path item set Image f Suite Running Icon else Test Run Info info get Test Run Info item switch info get Status case I Test Run Listener STATUS ERROR item set Image f Suite Error Icon break case I Test Run Listener STATUS FAILURE item set Image f Suite Fail Icon break default item set Image f Suite Icon  refreshItem TreeItem onPath onPath setImage fSuiteRunningIcon TestRunInfo getTestRunInfo getStatus ITestRunListener STATUS_ERROR setImage fSuiteErrorIcon ITestRunListener STATUS_FAILURE setImage fSuiteFailIcon setImage fSuiteIcon
private void set Current Item Tree Item tree Item tree Item set Image f Test Running Icon Tree Item parent tree Item get Parent Item if f Test Runner Part is Auto Scroll f Tree show Item tree Item while parent null if parent get Expanded break parent set Expanded true parent parent get Parent Item  setCurrentItem TreeItem treeItem treeItem setImage fTestRunningIcon TreeItem treeItem getParentItem fTestRunnerPart isAutoScroll fTree showItem treeItem getExpanded setExpanded getParentItem
public void end Test String test Id Tree Item tree Item find Tree Item test Id if tree Item null return Test Run Info test Info f Test Runner Part get Test Info test Id fix for 61709 NPE in J Unit view plus strange behavior the test Info map can already be destroyed at this point if test Info null return update Item tree Item test Info if f Test Runner Part is Auto Scroll f Tree show Item tree Item cache Items tree Item collapse Passed Tests tree Item  endTest testId TreeItem treeItem findTreeItem testId treeItem TestRunInfo testInfo fTestRunnerPart getTestInfo testId JUnit testInfo testInfo updateItem treeItem testInfo fTestRunnerPart isAutoScroll fTree showItem treeItem cacheItems treeItem collapsePassedTests treeItem
private void cache Items Tree Item tree Item Tree Item parent tree Item get Parent Item if parent f Cached Parent return f Cached Items parent get Items f Cached Parent parent  cacheItems TreeItem treeItem TreeItem treeItem getParentItem fCachedParent fCachedItems getItems fCachedParent
private void collapse Passed Tests Tree Item tree Item Tree Item parent tree Item get Parent Item if parent null Tree Item items null if parent f Cached Parent items f Cached Items else items parent get Items if is Last tree Item items boolean ok true for int i 0 i items length i if is Failure items i ok false break if ok parent set Expanded false collapse Passed Tests parent  collapsePassedTests TreeItem treeItem TreeItem treeItem getParentItem TreeItem fCachedParent fCachedItems getItems isLast treeItem isFailure setExpanded collapsePassedTests
private boolean is Last Tree Item tree Item Tree Item items return items items length 1 tree Item  isLast TreeItem treeItem TreeItem treeItem
private void update Item Tree Item tree Item Test Run Info test Info tree Item set Data test Info if test Info get Status I Test Run Listener STATUS OK tree Item set Image f Ok Icon return if test Info get Status I Test Run Listener STATUS FAILURE tree Item set Image f Failure Icon else if test Info get Status I Test Run Listener STATUS ERROR tree Item set Image f Error Icon propagate Status tree Item test Info get Status  updateItem TreeItem treeItem TestRunInfo testInfo treeItem setData testInfo testInfo getStatus ITestRunListener STATUS_OK treeItem setImage fOkIcon testInfo getStatus ITestRunListener STATUS_FAILURE treeItem setImage fFailureIcon testInfo getStatus ITestRunListener STATUS_ERROR treeItem setImage fErrorIcon propagateStatus treeItem testInfo getStatus
private void propagate Status Tree Item item int status Tree Item parent item get Parent Item Test Run Info test Run Info get Test Run Info item if parent null return Test Run Info parent Info get Test Run Info parent int parent Status parent Info get Status if status I Test Run Listener STATUS FAILURE if parent Status I Test Run Listener STATUS ERROR parent Status I Test Run Listener STATUS FAILURE return parent Info set Status I Test Run Listener STATUS FAILURE test Run Info set Status I Test Run Listener STATUS FAILURE else if parent Status I Test Run Listener STATUS ERROR return parent Info set Status I Test Run Listener STATUS ERROR test Run Info set Status I Test Run Listener STATUS ERROR propagate Status parent status  propagateStatus TreeItem TreeItem getParentItem TestRunInfo testRunInfo getTestRunInfo TestRunInfo parentInfo getTestRunInfo parentStatus parentInfo getStatus ITestRunListener STATUS_FAILURE parentStatus ITestRunListener STATUS_ERROR parentStatus ITestRunListener STATUS_FAILURE parentInfo setStatus ITestRunListener STATUS_FAILURE testRunInfo setStatus ITestRunListener STATUS_FAILURE parentStatus ITestRunListener STATUS_ERROR parentInfo setStatus ITestRunListener STATUS_ERROR testRunInfo setStatus ITestRunListener STATUS_ERROR propagateStatus
private Test Run Info get Test Run Info Tree Item item return Test Run Info item get Data  TestRunInfo getTestRunInfo TreeItem TestRunInfo getData
public void activate f Move Selection false test Selected  fMoveSelection testSelected
public void set Focus f Tree set Focus  setFocus fTree setFocus
public void about To Start f Tree remove All f Suite Infos remove All Elements f Tree Item Map new Hash Map f Cached Parent null f Cached Items null f Move Selection false f Execution Path new Array List  aboutToStart fTree removeAll fSuiteInfos removeAllElements fTreeItemMap HashMap fCachedParent fCachedItems fMoveSelection fExecutionPath ArrayList
private void test Selected f Test Runner Part handle Test Selected get Selected Test Id  testSelected fTestRunnerPart handleTestSelected getSelectedTestId
private void add Listeners f Tree add Selection Listener new Selection Listener public void widget Selected Selection Event e activate  addListeners fTree addSelectionListener SelectionListener widgetSelected SelectionEvent
activate public void widget Default Selected Selection Event e activate  widgetDefaultSelected SelectionEvent
f Tree add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dispose Icons  fTree addDisposeListener DisposeListener widgetDisposed DisposeEvent disposeIcons
f Tree add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e handle Double Click e  fTree addMouseListener MouseAdapter mouseDoubleClick MouseEvent handleDoubleClick
private void add Listeners f Tree add Selection Listener new Selection Listener public void widget Selected Selection Event e activate public void widget Default Selected Selection Event e activate f Tree add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dispose Icons f Tree add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e handle Double Click e  addListeners fTree addSelectionListener SelectionListener widgetSelected SelectionEvent widgetDefaultSelected SelectionEvent fTree addDisposeListener DisposeListener widgetDisposed DisposeEvent disposeIcons fTree addMouseListener MouseAdapter mouseDoubleClick MouseEvent handleDoubleClick
void handle Double Click Mouse Event e Test Run Info test Info get Test Info if test Info null return String test Label test Info get Test Name Open Test Action action null if is Suite Selected action new Open Test Action f Test Runner Part test Label else action new Open Test Action f Test Runner Part get Class Name get Test Method if action null action is Enabled action run  handleDoubleClick MouseEvent TestRunInfo testInfo getTestInfo testInfo testLabel testInfo getTestName OpenTestAction isSuiteSelected OpenTestAction fTestRunnerPart testLabel OpenTestAction fTestRunnerPart getClassName getTestMethod isEnabled
public void menu About To Show I Menu Manager manager if f Tree get Selection Count 0 Tree Item tree Item f Tree get Selection 0 Test Run Info test Info Test Run Info tree Item get Data String test Label test Info get Test Name if is Suite Selected manager add new Open Test Action f Test Runner Part test Label manager add new Separator if test Class Exists get Class Name f Test Runner Part last Launch Is Kept Alive manager add new Rerun Action f Test Runner Part get Selected Test Id get Class Name null I Launch Manager RUN MODE manager add new Rerun Action f Test Runner Part get Selected Test Id get Class Name null I Launch Manager DEBUG MODE else manager add new Open Test Action f Test Runner Part get Class Name get Test Method manager add new Separator if f Test Runner Part last Launch Is Kept Alive manager add new Rerun Action f Test Runner Part get Selected Test Id get Class Name get Test Method I Launch Manager RUN MODE else manager add new Rerun Action f Test Runner Part get Selected Test Id get Class Name get Test Method I Launch Manager RUN MODE manager add new Rerun Action f Test Runner Part get Selected Test Id get Class Name get Test Method I Launch Manager DEBUG MODE manager add new Separator manager add new Expand All Action  menuAboutToShow IMenuManager fTree getSelectionCount TreeItem treeItem fTree getSelection TestRunInfo testInfo TestRunInfo treeItem getData testLabel testInfo getTestName isSuiteSelected OpenTestAction fTestRunnerPart testLabel testClassExists getClassName fTestRunnerPart lastLaunchIsKeptAlive RerunAction fTestRunnerPart getSelectedTestId getClassName ILaunchManager RUN_MODE RerunAction fTestRunnerPart getSelectedTestId getClassName ILaunchManager DEBUG_MODE OpenTestAction fTestRunnerPart getClassName getTestMethod fTestRunnerPart lastLaunchIsKeptAlive RerunAction fTestRunnerPart getSelectedTestId getClassName getTestMethod ILaunchManager RUN_MODE RerunAction fTestRunnerPart getSelectedTestId getClassName getTestMethod ILaunchManager RUN_MODE RerunAction fTestRunnerPart getSelectedTestId getClassName getTestMethod ILaunchManager DEBUG_MODE ExpandAllAction
private boolean test Class Exists String class Name I Java Project project f Test Runner Part get Launched Project try I Type type project find Type class Name return type null catch Java Model Exception e fall through return false  testClassExists className IJavaProject fTestRunnerPart getLaunchedProject IType findType className JavaModelException
public void new Tree Entry String tree Entry format test Id test Name is Suite testcount int index0 tree Entry index Of String Buffer test String Buffer new String Buffer 100 int index1 scan Test Name tree Entry index0 1 test String Buffer int index2 tree Entry index Of index1 1 String test String test String Buffer to String trim String id tree Entry substring 0 index0 Test Run Info test Info new Test Run Info id test String String is Suite tree Entry substring index1 1 index2 int test Count Integer parse Int tree Entry substring index2 1 Tree Item tree Item while f Suite Infos size 0 Suite Info f Suite Infos last Element f Test Count 0 f Suite Infos remove Element At f Suite Infos size 1 if f Suite Infos size 0 tree Item new Tree Item f Tree SWT NONE tree Item set Image f Suite Icon f Suite Infos add Element new Suite Info tree Item test Count else if is Suite equals true NON NLS 1 tree Item new Tree Item Suite Info f Suite Infos last Element f Tree Item SWT NONE tree Item set Image f Suite Icon Suite Info f Suite Infos last Element f Test Count 1 f Suite Infos add Element new Suite Info tree Item test Count else tree Item new Tree Item Suite Info f Suite Infos last Element f Tree Item SWT NONE tree Item set Image f Test Icon Suite Info f Suite Infos last Element f Test Count 1 map Test test Info tree Item tree Item set Text test Info get Test Method Name tree Item set Data test Info  newTreeEntry treeEntry testId testName isSuite treeEntry indexOf StringBuffer testStringBuffer StringBuffer scanTestName treeEntry testStringBuffer treeEntry indexOf testString testStringBuffer toString treeEntry TestRunInfo testInfo TestRunInfo testString isSuite treeEntry testCount parseInt treeEntry TreeItem treeItem fSuiteInfos SuiteInfo fSuiteInfos lastElement fTestCount fSuiteInfos removeElementAt fSuiteInfos fSuiteInfos treeItem TreeItem fTree treeItem setImage fSuiteIcon fSuiteInfos addElement SuiteInfo treeItem testCount isSuite treeItem TreeItem SuiteInfo fSuiteInfos lastElement fTreeItem treeItem setImage fSuiteIcon SuiteInfo fSuiteInfos lastElement fTestCount fSuiteInfos addElement SuiteInfo treeItem testCount treeItem TreeItem SuiteInfo fSuiteInfos lastElement fTreeItem treeItem setImage fTestIcon SuiteInfo fSuiteInfos lastElement fTestCount mapTest testInfo treeItem treeItem setText testInfo getTestMethodName treeItem setData testInfo
private int scan Test Name String s int start String Buffer test Name boolean in Quote false int i start for i s length i char c s char At i if c in Quote in Quote true continue else if in Quote in Quote false test Name append c else if c break else test Name append c return i  scanTestName StringBuffer testName inQuote charAt inQuote inQuote inQuote inQuote testName testName
private void map Test Test Run Info info Tree Item item f Tree Item Map put info get Test Id item  mapTest TestRunInfo TreeItem fTreeItemMap getTestId
private Tree Item find Tree Item String test Id Object o f Tree Item Map get test Id if o instanceof Tree Item return Tree Item o return null  TreeItem findTreeItem testId fTreeItemMap testId TreeItem TreeItem
public void test Status Changed Test Run Info new Info Object o f Tree Item Map get new Info get Test Id if o instanceof Tree Item update Item Tree Item o new Info return  testStatusChanged TestRunInfo newInfo fTreeItemMap newInfo getTestId TreeItem updateItem TreeItem newInfo
public void select Next Tree Item selection get Initial Search Selection if move Selection selection return Tree Item failure find Failure selection true is Leaf Failure selection if failure null select Test failure  selectNext TreeItem getInitialSearchSelection moveSelection TreeItem findFailure isLeafFailure selectTest
public void select Previous Tree Item selection get Initial Search Selection if move Selection selection return Tree Item failure find Failure selection false is Leaf Failure selection if failure null select Test failure  selectPrevious TreeItem getInitialSearchSelection moveSelection TreeItem findFailure isLeafFailure selectTest
private boolean move Selection Tree Item selection if f Move Selection f Move Selection true if is Leaf Failure selection select Test selection return false return true  moveSelection TreeItem fMoveSelection fMoveSelection isLeafFailure selectTest
private Tree Item get Initial Search Selection Tree Item tree Items f Tree get Selection Tree Item selection null if tree Items length 0 selection f Tree get Items 0 else selection tree Items 0 return selection  TreeItem getInitialSearchSelection TreeItem treeItems fTree getSelection TreeItem treeItems fTree getItems treeItems
private boolean is Failure Tree Item selection return get Test Run Info selection get Status I Test Run Listener STATUS OK  isFailure TreeItem getTestRunInfo getStatus ITestRunListener STATUS_OK
private boolean is Leaf Failure Tree Item selection boolean is Leaf selection get Item Count 0 return is Leaf is Failure selection  isLeafFailure TreeItem isLeaf getItemCount isLeaf isFailure
private void select Test Tree Item selection f Test Runner Part show Test get Test Run Info selection  selectTest TreeItem fTestRunnerPart showTest getTestRunInfo
private Tree Item find Failure Tree Item start boolean next boolean include Node Tree Item sib find Siblings start next include Node if next for int i 0 i sib length i Tree Item failure find Failure In Tree sib i if failure null return failure else for int i sib length 1 i 0 i Tree Item failure find Failure In Tree sib i if failure null return failure Tree Item parent start get Parent Item if parent null return null return find Failure parent next false  TreeItem findFailure TreeItem includeNode TreeItem findSiblings includeNode TreeItem findFailureInTree TreeItem findFailureInTree TreeItem getParentItem findFailure
private Tree Item find Siblings Tree Item item boolean next boolean include Node Tree Item parent item get Parent Item Tree Item children null if parent null children item get Parent get Items else children parent get Items for int i 0 i children length i Tree Item item2 children i if item2 item Tree Item result null if next if include Node result new Tree Item children length i 1 System arraycopy children i 1 result 0 children length i 1 else result new Tree Item children length i System arraycopy children i result 0 children length i else if include Node result new Tree Item i System arraycopy children 0 result 0 i else result new Tree Item i 1 System arraycopy children 0 result 0 i 1 return result return new Tree Item 0  TreeItem findSiblings TreeItem includeNode TreeItem getParentItem TreeItem getParent getItems getItems TreeItem TreeItem includeNode TreeItem TreeItem includeNode TreeItem TreeItem TreeItem
private Tree Item find Failure In Tree Tree Item item if item get Item Count 0 if is Failure item return item Tree Item children item get Items for int i 0 i children length i Tree Item item2 find Failure In Tree children i if item2 null return item2 return null  TreeItem findFailureInTree TreeItem getItemCount isFailure TreeItem getItems TreeItem findFailureInTree
protected void expand All Tree Item tree Items f Tree get Selection f Tree set Redraw false for int i 0 i tree Items length i expand All tree Items i f Tree set Redraw true  expandAll TreeItem treeItems fTree getSelection fTree setRedraw treeItems expandAll treeItems fTree setRedraw
private void expand All Tree Item item item set Expanded true Tree Item items item get Items for int i 0 i items length i expand All items i  expandAll TreeItem setExpanded TreeItem getItems expandAll
public void about To End for int i 0 i f Execution Path size i refresh Item Tree Item f Execution Path get i false  aboutToEnd fExecutionPath refreshItem TreeItem fExecutionPath

public void accept Search Match Search Match match throws Core Exception I Java Element enclosing Element I Java Element match get Element if enclosing Element get Element Name starts With test NON NLS 1 f Result add enclosing Element  acceptSearchMatch SearchMatch CoreException IJavaElement enclosingElement IJavaElement getElement enclosingElement getElementName startsWith fResult enclosingElement
public Object get Result return f Result to Array  getResult fResult toArray
public Test Method Selection Dialog Shell shell I Java Element element super shell new Java Element Label Provider Java Element Label Provider SHOW PARAMETERS Java Element Label Provider SHOW POST QUALIFIED f Element element  TestMethodSelectionDialog IJavaElement JavaElementLabelProvider JavaElementLabelProvider SHOW_PARAMETERS JavaElementLabelProvider SHOW_POST_QUALIFIED fElement
see Windows configure Shell protected void configure Shell Shell new Shell super configure Shell new Shell Workbench Help set Help new Shell IJ Unit Help Context Ids TEST SELECTION DIALOG  configureShell configureShell newShell configureShell newShell WorkbenchHelp setHelp newShell IJUnitHelpContextIds TEST_SELECTION_DIALOG
public int open Object elements I Type test Type find Test Type if test Type null return CANCEL try elements search Test Methods f Element test Type catch Interrupted Exception e return CANCEL catch Invocation Target Exception e Message Dialog open Error get Parent Shell J Unit Messages get String Test Method Selection Dialog error title e get Target Exception get Message NON NLS 1 return CANCEL if elements length 0 String msg J Unit Messages get Formatted String Test Method Selection Dialog notfound message f Element get Element Name NON NLS 1 Message Dialog open Information get Parent Shell J Unit Messages get String Test Method Selection Dialog no tests title msg NON NLS 1 return CANCEL set Elements elements return super open  IType testType findTestType testType searchTestMethods fElement testType InterruptedException InvocationTargetException MessageDialog openError getParentShell JUnitMessages getString TestMethodSelectionDialog getTargetException getMessage JUnitMessages getFormattedString TestMethodSelectionDialog notfound_message fElement getElementName MessageDialog openInformation getParentShell JUnitMessages getString TestMethodSelectionDialog no_tests setElements
private I Type find Test Type String qualified Name J Unit Plugin TEST INTERFACE NAME I Java Project projects Set result new Hash Set try projects Java Core create Resources Plugin get Workspace get Root get Java Projects for int i 0 i projects length i I Java Project project projects i I Type type project find Type qualified Name if type null result add type catch Java Model Exception e Error Dialog open Error get Parent Shell J Unit Messages get String Test Method Selection Dialog error notfound title J Unit Messages get String Test Method Selection Dialog error notfound message e get Status NON NLS 1 NON NLS 2 return null if result size 0 String msg J Unit Messages get Formatted String Test Method Selection Dialog test not found J Unit Plugin TEST INTERFACE NAME NON NLS 1 Message Dialog open Error get Parent Shell J Unit Messages get String Test Method Selection Dialog select dialog title msg NON NLS 1 return null if result size 1 return I Type result to Array 0 return select Test Type result  IType findTestType qualifiedName JUnitPlugin TEST_INTERFACE_NAME IJavaProject HashSet JavaCore ResourcesPlugin getWorkspace getRoot getJavaProjects IJavaProject IType findType qualifiedName JavaModelException ErrorDialog openError getParentShell JUnitMessages getString TestMethodSelectionDialog JUnitMessages getString TestMethodSelectionDialog getStatus JUnitMessages getFormattedString TestMethodSelectionDialog test_not_found JUnitPlugin TEST_INTERFACE_NAME MessageDialog openError getParentShell JUnitMessages getString TestMethodSelectionDialog select_dialog IType toArray selectTestType
private I Type select Test Type Set result I Label Provider label Provider new Java Element Label Provider Java Element Label Provider SHOW PARAMETERS Java Element Label Provider SHOW ROOT Element List Selection Dialog dialog new Element List Selection Dialog get Parent Shell label Provider dialog set Title J Unit Messages get String Test Method Selection Dialog dialog title NON NLS 1 String msg J Unit Messages get Formatted String Test Method Selection Dialog testproject junit framework Test NON NLS 1 NON NLS 2 dialog set Message msg I Java Project projects new I Java Project result size I Type test Types I Type result to Array new I Type result size for int i 0 i projects length i projects i test Types i get Java Project dialog set Elements projects if dialog open Window CANCEL return null I Java Project project I Java Project dialog get First Result for int i 0 i test Types length i if test Types i get Java Project equals project return test Types i return null  IType selectTestType ILabelProvider labelProvider JavaElementLabelProvider JavaElementLabelProvider SHOW_PARAMETERS JavaElementLabelProvider SHOW_ROOT ElementListSelectionDialog ElementListSelectionDialog getParentShell labelProvider setTitle JUnitMessages getString TestMethodSelectionDialog JUnitMessages getFormattedString TestMethodSelectionDialog setMessage IJavaProject IJavaProject IType testTypes IType toArray IType testTypes getJavaProject setElements IJavaProject IJavaProject getFirstResult testTypes testTypes getJavaProject testTypes
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor pm throws Invocation Target Exception try col 0 do Search Test Methods element test Type pm catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException doSearchTestMethods testType CoreException InvocationTargetException
public Object search Test Methods final I Java Element element final I Type test Type throws Invocation Target Exception Interrupted Exception final Test Reference Collector col new Test Reference Collector 1 I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor pm throws Invocation Target Exception try col 0 do Search Test Methods element test Type pm catch Core Exception e throw new Invocation Target Exception e PlatformUI get Workbench get Progress Service busy Cursor While runnable return col 0 get Result  searchTestMethods IJavaElement IType testType InvocationTargetException InterruptedException TestReferenceCollector TestReferenceCollector IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException doSearchTestMethods testType CoreException InvocationTargetException getWorkbench getProgressService busyCursorWhile getResult
private Test Reference Collector do Search Test Methods I Java Element element I Type test Type I Progress Monitor pm throws Core Exception Search Pattern pattern Search Pattern create Pattern element I Java Search Constants REFERENCES Search Participant participants new Search Participant Search Engine get Default Search Participant I Java Search Scope scope Search Engine create Hierarchy Scope test Type Test Reference Collector requestor new Test Reference Collector new Search Engine search pattern participants scope requestor pm return requestor  TestReferenceCollector doSearchTestMethods IJavaElement IType testType IProgressMonitor CoreException SearchPattern SearchPattern createPattern IJavaSearchConstants SearchParticipant SearchParticipant SearchEngine getDefaultSearchParticipant IJavaSearchScope SearchEngine createHierarchyScope testType TestReferenceCollector TestReferenceCollector SearchEngine

private int f Status public Test Run Info String test Id String test Name f Test Name test Name f Test Id test Id  fStatus TestRunInfo testId testName fTestName testName fTestId testId
see Object hash Code public int hash Code return get Test Id hash Code  hashCode hashCode getTestId hashCode
see Object equals Object public boolean equals Object obj return get Test Id equals obj  getTestId
public String get Test Id return f Test Id  getTestId fTestId
public String get Test Name return f Test Name  getTestName fTestName
public String get Class Name return extract Class Name get Test Name  getClassName extractClassName getTestName
public String get Test Method Name int index f Test Name index Of if index 0 return f Test Name substring 0 index index f Test Name index Of if index 0 return f Test Name substring 0 index return f Test Name  getTestMethodName fTestName indexOf fTestName fTestName indexOf fTestName fTestName
private String extract Class Name String test Name String if test Name String null return null int index test Name String index Of if index 0 return test Name String test Name String test Name String substring index 1 return test Name String substring 0 test Name String index Of  extractClassName testNameString testNameString testNameString indexOf testNameString testNameString testNameString testNameString testNameString indexOf
public void set Trace String trace f Trace trace  setTrace fTrace
public String get Trace return f Trace  getTrace fTrace
public void set Status int status f Status status  setStatus fStatus
public int get Status return f Status  getStatus fStatus
public String get Actual return f Actual  getActual fActual
public void set Actual String actual f Actual actual  setActual fActual
public String get Expected return f Expected  getExpected fExpected
public void set Expected String expected f Expected expected  setExpected fExpected
public boolean is Comparison Failure return f Expected null f Actual null  isComparisonFailure fExpected fActual

private class Stop Action extends Action public Stop Action set Text J Unit Messages get String Test Runner View Part stopaction text NON NLS 1 set Tool Tip Text J Unit Messages get String Test Runner View Part stopaction tooltip NON NLS 1 set Disabled Image Descriptor J Unit Plugin get Image Descriptor dlcl16 stop gif NON NLS 1 set Hover Image Descriptor J Unit Plugin get Image Descriptor elcl16 stop gif NON NLS 1 set Image Descriptor J Unit Plugin get Image Descriptor elcl16 stop gif NON NLS 1  StopAction StopAction setText JUnitMessages getString TestRunnerViewPart setToolTipText JUnitMessages getString TestRunnerViewPart setDisabledImageDescriptor JUnitPlugin getImageDescriptor setHoverImageDescriptor JUnitPlugin getImageDescriptor setImageDescriptor JUnitPlugin getImageDescriptor
public void run stop Test set Enabled false  stopTest setEnabled
private class Rerun Last Action extends Action public Rerun Last Action set Text J Unit Messages get String Test Runner View Part rerunaction label NON NLS 1 set Tool Tip Text J Unit Messages get String Test Runner View Part rerunaction tooltip NON NLS 1 set Disabled Image Descriptor J Unit Plugin get Image Descriptor dlcl16 relaunch gif NON NLS 1 set Hover Image Descriptor J Unit Plugin get Image Descriptor elcl16 relaunch gif NON NLS 1 set Image Descriptor J Unit Plugin get Image Descriptor elcl16 relaunch gif NON NLS 1  RerunLastAction RerunLastAction setText JUnitMessages getString TestRunnerViewPart setToolTipText JUnitMessages getString TestRunnerViewPart setDisabledImageDescriptor JUnitPlugin getImageDescriptor setHoverImageDescriptor JUnitPlugin getImageDescriptor setImageDescriptor JUnitPlugin getImageDescriptor
public void run rerun Test Run  rerunTestRun
public Toggle Orientation Action Test Runner View Part v int orientation super AS RADIO BUTTON NON NLS 1 if orientation Test Runner View Part VIEW ORIENTATION HORIZONTAL set Text J Unit Messages get String Test Runner View Part toggle horizontal label NON NLS 1 set Image Descriptor J Unit Plugin get Image Descriptor elcl16 th horizontal gif NON NLS 1 else if orientation Test Runner View Part VIEW ORIENTATION VERTICAL set Text J Unit Messages get String Test Runner View Part toggle vertical label NON NLS 1 set Image Descriptor J Unit Plugin get Image Descriptor elcl16 th vertical gif NON NLS 1 else if orientation Test Runner View Part VIEW ORIENTATION AUTOMATIC set Text J Unit Messages get String Test Runner View Part toggle automatic label NON NLS 1 set Image Descriptor J Unit Plugin get Image Descriptor elcl16 th automatic gif NON NLS 1 f Action Orientation orientation Workbench Help set Help this IJ Unit Help Context Ids RESULTS VIEW TOGGLE ORIENTATION ACTION  ToggleOrientationAction TestRunnerViewPart AS_RADIO_BUTTON TestRunnerViewPart VIEW_ORIENTATION_HORIZONTAL setText JUnitMessages getString TestRunnerViewPart setImageDescriptor JUnitPlugin getImageDescriptor th_horizontal TestRunnerViewPart VIEW_ORIENTATION_VERTICAL setText JUnitMessages getString TestRunnerViewPart setImageDescriptor JUnitPlugin getImageDescriptor th_vertical TestRunnerViewPart VIEW_ORIENTATION_AUTOMATIC setText JUnitMessages getString TestRunnerViewPart setImageDescriptor JUnitPlugin getImageDescriptor th_automatic fActionOrientation WorkbenchHelp setHelp IJUnitHelpContextIds RESULTS_VIEW_TOGGLE_ORIENTATION_ACTION
public int get Orientation return f Action Orientation  getOrientation fActionOrientation
public void run if is Checked f Orientation f Action Orientation compute Orientation  isChecked fOrientation fActionOrientation computeOrientation
private class Dirty Listener implements I Element Changed Listener public void element Changed Element Changed Event event process Delta event get Delta  DirtyListener IElementChangedListener elementChanged ElementChangedEvent processDelta getDelta
private boolean process Delta I Java Element Delta delta int kind delta get Kind int details delta get Flags int type delta get Element get Element Type switch type Consider containers for class files case I Java Element JAVA MODEL case I Java Element JAVA PROJECT case I Java Element PACKAGE FRAGMENT ROOT case I Java Element PACKAGE FRAGMENT If we did some different than changing a child we flush the the undo redo stack if kind I Java Element Delta CHANGED details I Java Element Delta F CHILDREN code Has Changed return false break case I Java Element COMPILATION UNIT if we have changed a primary working copy e g created removed then we do nothing if details I Java Element Delta F PRIMARY WORKING COPY 0 return true code Has Changed return false case I Java Element CLASS FILE Don t examine children of a class file but keep on examining siblings return true default code Has Changed return false I Java Element Delta affected Children delta get Affected Children if affected Children null return true for int i 0 i affected Children length i if process Delta affected Children i return false return true  processDelta IJavaElementDelta getKind getFlags getElement getElementType IJavaElement JAVA_MODEL IJavaElement JAVA_PROJECT IJavaElement PACKAGE_FRAGMENT_ROOT IJavaElement PACKAGE_FRAGMENT IJavaElementDelta IJavaElementDelta F_CHILDREN codeHasChanged IJavaElement COMPILATION_UNIT IJavaElementDelta F_PRIMARY_WORKING_COPY codeHasChanged IJavaElement CLASS_FILE codeHasChanged IJavaElementDelta affectedChildren getAffectedChildren affectedChildren affectedChildren processDelta affectedChildren
public void init I View Site site I Memento memento throws Part Init Exception super init site memento f Memento memento  IViewSite IMemento PartInitException fMemento
private void restore Layout State I Memento memento Integer page memento get Integer TAG PAGE if page null int p page int Value f Tab Folder set Selection p f Active Run Tab Test Run Tab f Test Run Tabs get p Integer ratio memento get Integer TAG RATIO if ratio null f Sash Form set Weights new int ratio int Value 1000 ratio int Value Integer orientation memento get Integer TAG ORIENTATION if orientation null f Orientation orientation int Value compute Orientation String scroll Lock memento get String TAG SCROLL if scroll Lock null f Scroll Lock Action set Checked scroll Lock equals true NON NLS 1 set Auto Scroll f Scroll Lock Action is Checked  restoreLayoutState IMemento getInteger TAG_PAGE intValue fTabFolder setSelection fActiveRunTab TestRunTab fTestRunTabs getInteger TAG_RATIO fSashForm setWeights intValue intValue getInteger TAG_ORIENTATION fOrientation intValue computeOrientation scrollLock getString TAG_SCROLL scrollLock fScrollLockAction setChecked scrollLock setAutoScroll fScrollLockAction isChecked
Stops the currently running test and shuts down the Remote Test Runner public void stop Test if f Test Runner Client null f Test Runner Client stop Test stop Update Job  RemoteTestRunner stopTest fTestRunnerClient fTestRunnerClient stopTest stopUpdateJob
Stops the currently running test and shuts down the Remote Test Runner public void rerun Test Run if last Launch Is Kept Alive prompt for terminating the existing run if Message Dialog open Question get Site get Shell J Unit Messages get String Test Runner View Part terminate title J Unit Messages get String Test Runner View Part terminate message NON NLS 1 NON NLS 2 if f Test Runner Client null f Test Runner Client stop Test if f Last Launch null f Last Launch get Launch Configuration null DebugUI Tools launch f Last Launch get Launch Configuration f Last Launch get Launch Mode  RemoteTestRunner rerunTestRun lastLaunchIsKeptAlive MessageDialog openQuestion getSite getShell JUnitMessages getString TestRunnerViewPart JUnitMessages getString TestRunnerViewPart fTestRunnerClient fTestRunnerClient stopTest fLastLaunch fLastLaunch getLaunchConfiguration DebugUITools fLastLaunch getLaunchConfiguration fLastLaunch getLaunchMode
public void set Auto Scroll boolean scroll f Auto Scroll scroll  setAutoScroll fAutoScroll
public boolean is Auto Scroll return f Auto Scroll  isAutoScroll fAutoScroll
public void test Run Started final int test Count reset test Count f Show On Error Only J Unit Preference Page get Show On Error Only f Executed Tests stop Update Job f Update Job new UpdateUI Job J Unit Messages get String Test Runner View Part job Name NON NLS 1 f Update Job schedule REFRESH INTERVAL  testRunStarted testCount testCount fShowOnErrorOnly JUnitPreferencePage getShowOnErrorOnly fExecutedTests stopUpdateJob fUpdateJob UpdateUIJob JUnitMessages getString TestRunnerViewPart jobName fUpdateJob REFRESH_INTERVAL
public void select Next Failure f Active Run Tab select Next  selectNextFailure fActiveRunTab selectNext
public void select Previous Failure f Active Run Tab select Previous  selectPreviousFailure fActiveRunTab selectPrevious
public void show Test Test Run Info test f Active Run Tab set Selected Test test get Test Id handle Test Selected test get Test Id new Open Test Action this test get Class Name test get Test Method Name run  showTest TestRunInfo fActiveRunTab setSelectedTest getTestId handleTestSelected getTestId OpenTestAction getClassName getTestMethodName
public void reset reset 0 set View Part Title null clear Status reset View Icon  setViewPartTitle clearStatus resetViewIcon
post Sync Runnable new Runnable public void run if is Disposed return f Stop Action set Enabled last Launch Is Kept Alive if f Failures size 0 select First Failure update View Icon if f Dirty Listener null f Dirty Listener new Dirty Listener Java Core add Element Changed Listener f Dirty Listener for Enumeration e f Test Run Tabs elements e has More Elements Test Run Tab v Test Run Tab e next Element v about To End  postSyncRunnable isDisposed fStopAction setEnabled lastLaunchIsKeptAlive fFailures selectFirstFailure updateViewIcon fDirtyListener fDirtyListener DirtyListener JavaCore addElementChangedListener fDirtyListener fTestRunTabs hasMoreElements TestRunTab TestRunTab nextElement aboutToEnd
public void test Run Ended long elapsed Time f Executed Tests String keys elapsed Time As String elapsed Time String msg J Unit Messages get Formatted String Test Runner View Part message finish keys NON NLS 1 if has Errors Or Failures post Error msg else set Info Message msg post Sync Runnable new Runnable public void run if is Disposed return f Stop Action set Enabled last Launch Is Kept Alive if f Failures size 0 select First Failure update View Icon if f Dirty Listener null f Dirty Listener new Dirty Listener Java Core add Element Changed Listener f Dirty Listener for Enumeration e f Test Run Tabs elements e has More Elements Test Run Tab v Test Run Tab e next Element v about To End stop Update Job  testRunEnded elapsedTime fExecutedTests elapsedTimeAsString elapsedTime JUnitMessages getFormattedString TestRunnerViewPart hasErrorsOrFailures postError setInfoMessage postSyncRunnable isDisposed fStopAction setEnabled lastLaunchIsKeptAlive fFailures selectFirstFailure updateViewIcon fDirtyListener fDirtyListener DirtyListener JavaCore addElementChangedListener fDirtyListener fTestRunTabs hasMoreElements TestRunTab TestRunTab nextElement aboutToEnd stopUpdateJob
private void stop Update Job if f Update Job null f Update Job stop f Update Job null  stopUpdateJob fUpdateJob fUpdateJob fUpdateJob
protected void select First Failure Test Run Info first Failure Test Run Info f Failures get 0 if first Failure null f Auto Scroll f Active Run Tab set Selected Test first Failure get Test Id handle Test Selected first Failure get Test Id  selectFirstFailure TestRunInfo firstFailure TestRunInfo fFailures firstFailure fAutoScroll fActiveRunTab setSelectedTest firstFailure getTestId handleTestSelected firstFailure getTestId
private void update View Icon if has Errors Or Failures f View Image f Test Run Fail Icon else f View Image f Test RunOK Icon fire Property Change I Workbench Part PROP TITLE  updateViewIcon hasErrorsOrFailures fViewImage fTestRunFailIcon fViewImage fTestRunOKIcon firePropertyChange IWorkbenchPart PROP_TITLE
private boolean has Errors Or Failures return f Error Count f Failure Count 0  hasErrorsOrFailures fErrorCount fFailureCount
private String elapsed Time As String long run Time return Number Format get Instance format double run Time 1000  elapsedTimeAsString runTime NumberFormat getInstance runTime
public void test Run Stopped final long elapsed Time String msg J Unit Messages get String Test Runner View Part message stopped NON NLS 1 set Info Message msg handle Stopped  testRunStopped elapsedTime JUnitMessages getString TestRunnerViewPart setInfoMessage handleStopped
post Sync Runnable new Runnable public void run if is Disposed return reset View Icon f Stop Action set Enabled false f Progress Bar stopped  postSyncRunnable isDisposed resetViewIcon fStopAction setEnabled fProgressBar
private void handle Stopped post Sync Runnable new Runnable public void run if is Disposed return reset View Icon f Stop Action set Enabled false f Progress Bar stopped stop Update Job  handleStopped postSyncRunnable isDisposed resetViewIcon fStopAction setEnabled fProgressBar stopUpdateJob
private void reset View Icon f View Image f Original View Image fire Property Change I Workbench Part PROP TITLE  resetViewIcon fViewImage fOriginalViewImage firePropertyChange IWorkbenchPart PROP_TITLE
public void test Run Terminated String msg J Unit Messages get String Test Runner View Part message terminated NON NLS 1 show Message msg handle Stopped  testRunTerminated JUnitMessages getString TestRunnerViewPart showMessage handleStopped
private void show Message String msg show Information msg post Error msg  showMessage showInformation postError
public void test Started String test Id String test Name post Start Test test Id test Name reveal the part when the first test starts if f Show On Error Only f Executed Tests 1 post Show Test Results View Test Run Info test Info get Test Info test Id if test Info null test Info new Test Run Info test Id test Name f Test Infos put test Id test Info String class Name test Info get Class Name String method test Info get Test Method Name String status J Unit Messages get Formatted String Test Runner View Part message started new String class Name method NON NLS 1 set Info Message status  testStarted testId testName postStartTest testId testName fShowOnErrorOnly fExecutedTests postShowTestResultsView TestRunInfo testInfo getTestInfo testId testInfo testInfo TestRunInfo testId testName fTestInfos testId testInfo className testInfo getClassName testInfo getTestMethodName JUnitMessages getFormattedString TestRunnerViewPart className setInfoMessage
see I Test Run Listener test Ended public void test Ended String test Id String test Name post End Test test Id test Name f Executed Tests  ITestRunListener testEnded testEnded testId testName postEndTest testId testName fExecutedTests
see I Test Run Listener test Failed public void test Failed int status String test Id String test Name String trace test Failed status test Id test Name trace null null  ITestRunListener testFailed testFailed testId testName testFailed testId testName
public void test Failed int status String test Id String test Name String trace String expected String actual Test Run Info test Info get Test Info test Id if test Info null test Info new Test Run Info test Id test Name f Test Infos put test Name test Info test Info set Trace trace test Info set Status status if expected null test Info set Expected expected substring 0 expected length 1 if actual null test Info set Actual actual substring 0 actual length 1 if status I Test Run Listener STATUS ERROR f Error Count else f Failure Count f Failures add test Info show the view on the first error only if f Show On Error Only f Error Count f Failure Count 1 post Show Test Results View  testFailed testId testName TestRunInfo testInfo getTestInfo testId testInfo testInfo TestRunInfo testId testName fTestInfos testName testInfo testInfo setTrace testInfo setStatus testInfo setExpected testInfo setActual ITestRunListener STATUS_ERROR fErrorCount fFailureCount fFailures testInfo fShowOnErrorOnly fErrorCount fFailureCount postShowTestResultsView
public void test Reran String test Id String class Name String test Name int status String trace if status I Test Run Listener STATUS ERROR String msg J Unit Messages get Formatted String Test Runner View Part message error new String test Name class Name NON NLS 1 post Error msg else if status I Test Run Listener STATUS FAILURE String msg J Unit Messages get Formatted String Test Runner View Part message failure new String test Name class Name NON NLS 1 post Error msg else String msg J Unit Messages get Formatted String Test Runner View Part message success new String test Name class Name NON NLS 1 set Info Message msg Test Run Info info get Test Info test Id update Test info status if info get Trace null info get Trace equals trace info set Trace trace show Failure info  testReran testId className testName ITestRunListener STATUS_ERROR JUnitMessages getFormattedString TestRunnerViewPart testName className postError ITestRunListener STATUS_FAILURE JUnitMessages getFormattedString TestRunnerViewPart testName className postError JUnitMessages getFormattedString TestRunnerViewPart testName className setInfoMessage TestRunInfo getTestInfo testId updateTest getTrace getTrace setTrace showFailure
public void test Reran String test Id String class Name String test Name int status Code String trace String expected Result String actual Result test Reran test Id class Name test Name status Code trace Test Run Info info get Test Info test Id info set Actual actual Result info set Expected expected Result f Failure Trace update Enablement info  testReran testId className testName statusCode expectedResult actualResult testReran testId className testName statusCode TestRunInfo getTestInfo testId setActual actualResult setExpected expectedResult fFailureTrace updateEnablement
post Sync Runnable new Runnable public void run refresh Counters for Enumeration e f Test Run Tabs elements e has More Elements Test Run Tab v Test Run Tab e next Element v test Status Changed final Info  postSyncRunnable refreshCounters fTestRunTabs hasMoreElements TestRunTab TestRunTab nextElement testStatusChanged finalInfo
private void update Test Test Run Info info final int status if status info get Status return if info get Status I Test Run Listener STATUS OK if status I Test Run Listener STATUS FAILURE f Failure Count else if status I Test Run Listener STATUS ERROR f Error Count else if info get Status I Test Run Listener STATUS ERROR if status I Test Run Listener STATUS OK f Error Count else if status I Test Run Listener STATUS FAILURE f Error Count f Failure Count else if info get Status I Test Run Listener STATUS FAILURE if status I Test Run Listener STATUS OK f Failure Count else if status I Test Run Listener STATUS ERROR f Failure Count f Error Count info set Status status final Test Run Info final Info info post Sync Runnable new Runnable public void run refresh Counters for Enumeration e f Test Run Tabs elements e has More Elements Test Run Tab v Test Run Tab e next Element v test Status Changed final Info  updateTest TestRunInfo getStatus getStatus ITestRunListener STATUS_OK ITestRunListener STATUS_FAILURE fFailureCount ITestRunListener STATUS_ERROR fErrorCount getStatus ITestRunListener STATUS_ERROR ITestRunListener STATUS_OK fErrorCount ITestRunListener STATUS_FAILURE fErrorCount fFailureCount getStatus ITestRunListener STATUS_FAILURE ITestRunListener STATUS_OK fFailureCount ITestRunListener STATUS_ERROR fFailureCount fErrorCount setStatus TestRunInfo finalInfo postSyncRunnable refreshCounters fTestRunTabs hasMoreElements TestRunTab TestRunTab nextElement testStatusChanged finalInfo
post Sync Runnable new Runnable public void run if is Disposed return for Enumeration e f Test Run Tabs elements e has More Elements Test Run Tab v Test Run Tab e next Element v new Tree Entry tree Entry  postSyncRunnable isDisposed fTestRunTabs hasMoreElements TestRunTab TestRunTab nextElement newTreeEntry treeEntry
public void test Tree Entry final String tree Entry post Sync Runnable new Runnable public void run if is Disposed return for Enumeration e f Test Run Tabs elements e has More Elements Test Run Tab v Test Run Tab e next Element v new Tree Entry tree Entry  testTreeEntry treeEntry postSyncRunnable isDisposed fTestRunTabs hasMoreElements TestRunTab TestRunTab nextElement newTreeEntry treeEntry
public void start Test Run Listening I Java Element type int port I Launch launch f Test Project type get Java Project f Launch Mode launch get Launch Mode about To Launch if f Test Runner Client null stop Test f Test Runner Client new Remote Test Runner Client add the Test Runner View Part to the list of registered listeners List listeners J Unit Plugin get Default get Test Run Listeners I Test Run Listener listener Array new I Test Run Listener listeners size 1 listeners to Array listener Array System arraycopy listener Array 0 listener Array 1 listener Array length 1 listener Array 0 this f Test Runner Client start Listening listener Array port f Last Launch launch set View Part Title type if type instanceof I Type set Title Tool Tip I Type type get Fully Qualified Name else set Title Tool Tip type get Element Name  startTestRunListening IJavaElement ILaunch fTestProject getJavaProject fLaunchMode getLaunchMode aboutToLaunch fTestRunnerClient stopTest fTestRunnerClient RemoteTestRunnerClient TestRunnerViewPart JUnitPlugin getDefault getTestRunListeners ITestRunListener listenerArray ITestRunListener toArray listenerArray listenerArray listenerArray listenerArray listenerArray fTestRunnerClient startListening listenerArray fLastLaunch setViewPartTitle IType setTitleToolTip IType getFullyQualifiedName setTitleToolTip getElementName
private void set View Part Title I Java Element type String title if type null title NON NLS 1 else title type get Element Name set Content Description title  setViewPartTitle IJavaElement getElementName setContentDescription
protected void about To Launch String msg J Unit Messages get String Test Runner View Part message launching NON NLS 1 show Information msg set Info Message msg f View Image f Original View Image fire Property Change I Workbench Part PROP TITLE  aboutToLaunch JUnitMessages getString TestRunnerViewPart showInformation setInfoMessage fViewImage fOriginalViewImage firePropertyChange IWorkbenchPart PROP_TITLE
public synchronized void dispose f Is Disposed true stop Test if f Progress Images null f Progress Images dispose J Unit Plugin get Default get Preference Store remove Property Change Listener this f Test RunOK Icon dispose f Test Run Fail Icon dispose f Stack View Icon dispose f Test RunOK Dirty Icon dispose f Test Run Fail Dirty Icon dispose if f Clipboard null f Clipboard dispose  fIsDisposed stopTest fProgressImages fProgressImages JUnitPlugin getDefault getPreferenceStore removePropertyChangeListener fTestRunOKIcon fTestRunFailIcon fStackViewIcon fTestRunOKDirtyIcon fTestRunFailDirtyIcon fClipboard fClipboard
protected void start final int total reset Progress Bar total f Counter Panel set Total total f Counter Panel set Run Value 0  resetProgressBar fCounterPanel setTotal fCounterPanel setRunValue
private void reset Progress Bar final int total f Progress Bar reset f Progress Bar set Maximum total  resetProgressBar fProgressBar fProgressBar setMaximum
private void post Sync Runnable Runnable r if is Disposed get Display sync Exec r  postSyncRunnable isDisposed getDisplay syncExec
post Sync Runnable new Runnable public void run if is Disposed for Enumeration e f Test Run Tabs elements e has More Elements Test Run Tab v Test Run Tab e next Element v about To Start f Next Action set Enabled false f Previous Action set Enabled false  postSyncRunnable isDisposed fTestRunTabs hasMoreElements TestRunTab TestRunTab nextElement aboutToStart fNextAction setEnabled fPreviousAction setEnabled
private void about To Start post Sync Runnable new Runnable public void run if is Disposed for Enumeration e f Test Run Tabs elements e has More Elements Test Run Tab v Test Run Tab e next Element v about To Start f Next Action set Enabled false f Previous Action set Enabled false  aboutToStart postSyncRunnable isDisposed fTestRunTabs hasMoreElements TestRunTab TestRunTab nextElement aboutToStart fNextAction setEnabled fPreviousAction setEnabled
post Sync Runnable new Runnable public void run if is Disposed return handle End Test for Enumeration e f Test Run Tabs elements e has More Elements Test Run Tab v Test Run Tab e next Element v end Test test Id if f Failure Count f Error Count 0 f Next Action set Enabled true f Previous Action set Enabled true  postSyncRunnable isDisposed handleEndTest fTestRunTabs hasMoreElements TestRunTab TestRunTab nextElement endTest testId fFailureCount fErrorCount fNextAction setEnabled fPreviousAction setEnabled
private void post End Test final String test Id final String test Name post Sync Runnable new Runnable public void run if is Disposed return handle End Test for Enumeration e f Test Run Tabs elements e has More Elements Test Run Tab v Test Run Tab e next Element v end Test test Id if f Failure Count f Error Count 0 f Next Action set Enabled true f Previous Action set Enabled true  postEndTest testId testName postSyncRunnable isDisposed handleEndTest fTestRunTabs hasMoreElements TestRunTab TestRunTab nextElement endTest testId fFailureCount fErrorCount fNextAction setEnabled fPreviousAction setEnabled
post Sync Runnable new Runnable public void run if is Disposed return for Enumeration e f Test Run Tabs elements e has More Elements Test Run Tab v Test Run Tab e next Element v start Test test Id  postSyncRunnable isDisposed fTestRunTabs hasMoreElements TestRunTab TestRunTab nextElement startTest testId
private void post Start Test final String test Id final String test Name post Sync Runnable new Runnable public void run if is Disposed return for Enumeration e f Test Run Tabs elements e has More Elements Test Run Tab v Test Run Tab e next Element v start Test test Id  postStartTest testId testName postSyncRunnable isDisposed fTestRunTabs hasMoreElements TestRunTab TestRunTab nextElement startTest testId
private void handle End Test refresh Counters f Progress Bar step f Failure Count f Error Count if f Show On Error Only Image progress f Progress Images get Image f Executed Tests f Test Count f Error Count f Failure Count if progress f View Image f View Image progress fire Property Change I Workbench Part PROP TITLE  handleEndTest refreshCounters fProgressBar fFailureCount fErrorCount fShowOnErrorOnly fProgressImages getImage fExecutedTests fTestCount fErrorCount fFailureCount fViewImage fViewImage firePropertyChange IWorkbenchPart PROP_TITLE
private void refresh Counters f Counter Panel set Error Value f Error Count f Counter Panel set Failure Value f Failure Count f Counter Panel set Run Value f Executed Tests f Progress Bar refresh f Error Count f Failure Count 0  refreshCounters fCounterPanel setErrorValue fErrorCount fCounterPanel setFailureValue fFailureCount fCounterPanel setRunValue fExecutedTests fProgressBar fErrorCount fFailureCount
post Sync Runnable new Runnable public void run if is Disposed return show Test Results View  postSyncRunnable isDisposed showTestResultsView
protected void post Show Test Results View post Sync Runnable new Runnable public void run if is Disposed return show Test Results View  postShowTestResultsView postSyncRunnable isDisposed showTestResultsView
public void show Test Results View I Workbench Window window get Site get Workbench Window I Workbench Page page window get Active Page Test Runner View Part test Runner null if page null try show the result view test Runner Test Runner View Part page find View Test Runner View Part NAME if test Runner null I Workbench Part active Part page get Active Part test Runner Test Runner View Part page show View Test Runner View Part NAME restore focus stolen by the creation of the console page activate active Part else page bring To Top test Runner catch Part Init Exception pie J Unit Plugin log pie  showTestResultsView IWorkbenchWindow getSite getWorkbenchWindow IWorkbenchPage getActivePage TestRunnerViewPart testRunner testRunner TestRunnerViewPart findView TestRunnerViewPart testRunner IWorkbenchPart activePart getActivePart testRunner TestRunnerViewPart showView TestRunnerViewPart activePart bringToTop testRunner PartInitException JUnitPlugin
private boolean f Running true public UpdateUI Job String name super name set System true  fRunning UpdateUIJob setSystem
public I Status run InUI Thread I Progress Monitor monitor if is Disposed do Show Status refresh Counters schedule REFRESH INTERVAL return Status OK STATUS  IStatus runInUIThread IProgressMonitor isDisposed doShowStatus refreshCounters REFRESH_INTERVAL OK_STATUS
public void stop f Running false  fRunning
f Running false public boolean should Schedule return f Running  fRunning shouldSchedule fRunning
protected void do Show Status set Content Description f Status  doShowStatus setContentDescription fStatus
protected void set Info Message final String message f Status message  setInfoMessage fStatus
protected void post Error final String message f Status message  postError fStatus
protected void show Information final String info post Sync Runnable new Runnable public void run if is Disposed f Failure Trace set Information info  showInformation postSyncRunnable isDisposed fFailureTrace setInformation
protected void show Information final String info post Sync Runnable new Runnable public void run if is Disposed f Failure Trace set Information info  showInformation postSyncRunnable isDisposed fFailureTrace setInformation
protected C Tab Folder create Test Run Tabs Composite parent C Tab Folder tab Folder new C Tab Folder parent SWT TOP tab Folder set Layout Data new Grid Data Grid Data FILL BOTH Grid Data GRAB VERTICAL load Test Run Tabs tab Folder tab Folder set Selection 0 f Active Run Tab Test Run Tab f Test Run Tabs first Element tab Folder add Selection Listener new Selection Adapter public void widget Selected Selection Event event test Tab Changed event return tab Folder  CTabFolder createTestRunTabs CTabFolder tabFolder CTabFolder tabFolder setLayoutData GridData GridData FILL_BOTH GridData GRAB_VERTICAL loadTestRunTabs tabFolder tabFolder setSelection fActiveRunTab TestRunTab fTestRunTabs firstElement tabFolder addSelectionListener SelectionAdapter widgetSelected SelectionEvent testTabChanged tabFolder
private void load Test Run Tabs C Tab Folder tab Folder I Extension Point extension Point Platform get Extension Registry get Extension Point ID EXTENSION POINT TESTRUN TABS if extension Point null return I Configuration Element configs extension Point get Configuration Elements Multi Status status new Multi Status J Unit Plugin PLUGIN ID I Status OK Could not load some test Run Tabs extension points null NON NLS 1 for int i 0 i configs length i try Test Run Tab test Run Tab Test Run Tab configs i create Executable Extension class NON NLS 1 test Run Tab create Tab Control tab Folder f Clipboard this f Test Run Tabs add Element test Run Tab catch Core Exception e status add e get Status if status isOK J Unit Plugin log status  loadTestRunTabs CTabFolder tabFolder IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint ID_EXTENSION_POINT_TESTRUN_TABS extensionPoint IConfigurationElement extensionPoint getConfigurationElements MultiStatus MultiStatus JUnitPlugin PLUGIN_ID IStatus testRunTabs TestRunTab testRunTab TestRunTab createExecutableExtension testRunTab createTabControl tabFolder fClipboard fTestRunTabs addElement testRunTab CoreException getStatus JUnitPlugin
private void test Tab Changed Selection Event event for Enumeration e f Test Run Tabs elements e has More Elements Test Run Tab v Test Run Tab e next Element if C Tab Folder event widget get Selection get Text v get Name v set Selected Test f Active Run Tab get Selected Test Id f Active Run Tab v f Active Run Tab activate  testTabChanged SelectionEvent fTestRunTabs hasMoreElements TestRunTab TestRunTab nextElement CTabFolder getSelection getText getName setSelectedTest fActiveRunTab getSelectedTestId fActiveRunTab fActiveRunTab
private Sash Form create Sash Form Composite parent f Sash Form new Sash Form parent SWT VERTICAL View Form top new View Form f Sash Form SWT NONE f Tab Folder create Test Run Tabs top f Tab Folder set Layout Data new Tab Folder Layout top set Content f Tab Folder View Form bottom new View Form f Sash Form SWT NONE C Label label new C Label bottom SWT NONE label set Text J Unit Messages get String Test Runner View Part label failure NON NLS 1 label set Image f Stack View Icon bottom set Top Left label Tool Bar failure Tool Bar new Tool Bar bottom SWT FLAT SWT WRAP bottom set Top Center failure Tool Bar f Failure Trace new Failure Trace bottom f Clipboard this failure Tool Bar bottom set Content f Failure Trace get Composite f Sash Form set Weights new int 50 50 return f Sash Form  SashForm createSashForm fSashForm SashForm ViewForm ViewForm fSashForm fTabFolder createTestRunTabs fTabFolder setLayoutData TabFolderLayout setContent fTabFolder ViewForm ViewForm fSashForm CLabel CLabel setText JUnitMessages getString TestRunnerViewPart setImage fStackViewIcon setTopLeft ToolBar failureToolBar ToolBar setTopCenter failureToolBar fFailureTrace FailureTrace fClipboard failureToolBar setContent fFailureTrace getComposite fSashForm setWeights fSashForm
post Sync Runnable new Runnable public void run if is Disposed return f Counter Panel reset f Failure Trace clear f Progress Bar reset f Stop Action set Enabled true clear Status start test Count  postSyncRunnable isDisposed fCounterPanel fFailureTrace fProgressBar fStopAction setEnabled clearStatus testCount
private void reset final int test Count post Sync Runnable new Runnable public void run if is Disposed return f Counter Panel reset f Failure Trace clear f Progress Bar reset f Stop Action set Enabled true clear Status start test Count f Executed Tests 0 f Failure Count 0 f Error Count 0 f Test Count test Count about To Start f Test Infos clear f Failures new Array List  testCount postSyncRunnable isDisposed fCounterPanel fFailureTrace fProgressBar fStopAction setEnabled clearStatus testCount fExecutedTests fFailureCount fErrorCount fTestCount testCount aboutToStart fTestInfos fFailures ArrayList
private void clear Status get Status Line set Message null get Status Line set Error Message null  clearStatus getStatusLine setMessage getStatusLine setErrorMessage
public void set Focus if f Active Run Tab null f Active Run Tab set Focus  setFocus fActiveRunTab fActiveRunTab setFocus
public void create Part Control Composite parent f Parent parent add Resize Listener parent f Clipboard new Clipboard parent get Display Grid Layout grid Layout new Grid Layout grid Layout margin Width 0 grid Layout margin Height 0 parent set Layout grid Layout configure Tool Bar f Counter Composite create Progress Count Panel parent f Counter Composite set Layout Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL Sash Form sash Form create Sash Form parent sash Form set Layout Data new Grid Data Grid Data FILL BOTH I Action Bars action Bars get View Site get Action Bars action Bars set Global Action Handler Action Factory COPY get Id new Copy Trace Action f Failure Trace f Clipboard J Unit Plugin get Default get Preference Store add Property Change Listener this f Original View Image get Title Image f Progress Images new Progress Images Workbench Help set Help parent IJ Unit Help Context Ids RESULTS VIEW if f Memento null restore Layout State f Memento f Memento null  createPartControl fParent addResizeListener fClipboard getDisplay GridLayout gridLayout GridLayout gridLayout marginWidth gridLayout marginHeight setLayout gridLayout configureToolBar fCounterComposite createProgressCountPanel fCounterComposite setLayoutData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL SashForm sashForm createSashForm sashForm setLayoutData GridData GridData FILL_BOTH IActionBars actionBars getViewSite getActionBars actionBars setGlobalActionHandler ActionFactory getId CopyTraceAction fFailureTrace fClipboard JUnitPlugin getDefault getPreferenceStore addPropertyChangeListener fOriginalViewImage getTitleImage fProgressImages ProgressImages WorkbenchHelp setHelp IJUnitHelpContextIds RESULTS_VIEW fMemento restoreLayoutState fMemento fMemento
private void add Resize Listener Composite parent parent add Control Listener new Control Listener public void control Moved Control Event e public void control Resized Control Event e compute Orientation  addResizeListener addControlListener ControlListener controlMoved ControlEvent controlResized ControlEvent computeOrientation
void compute Orientation if f Orientation VIEW ORIENTATION AUTOMATIC f Current Orientation f Orientation set Orientation f Current Orientation else Point size f Parent get Size if size x 0 size y 0 if size x size y set Orientation VIEW ORIENTATION HORIZONTAL else set Orientation VIEW ORIENTATION VERTICAL  computeOrientation fOrientation VIEW_ORIENTATION_AUTOMATIC fCurrentOrientation fOrientation setOrientation fCurrentOrientation fParent getSize setOrientation VIEW_ORIENTATION_HORIZONTAL setOrientation VIEW_ORIENTATION_VERTICAL
public void save State I Memento memento if f Sash Form null part has not been created if f Memento null Keep the old state memento put Memento f Memento return int active Page f Tab Folder get Selection Index memento put Integer TAG PAGE active Page memento put String TAG SCROLL f Scroll Lock Action is Checked true false NON NLS 1 NON NLS 2 int weigths f Sash Form get Weights int ratio weigths 0 1000 weigths 0 weigths 1 memento put Integer TAG RATIO ratio memento put Integer TAG ORIENTATION f Orientation  saveState IMemento fSashForm fMemento putMemento fMemento activePage fTabFolder getSelectionIndex putInteger TAG_PAGE activePage putString TAG_SCROLL fScrollLockAction isChecked fSashForm getWeights putInteger TAG_RATIO putInteger TAG_ORIENTATION fOrientation
private void configure Tool Bar I Action Bars action Bars get View Site get Action Bars I Tool Bar Manager tool Bar action Bars get Tool Bar Manager I Menu Manager view Menu action Bars get Menu Manager f Rerun Last Test Action new Rerun Last Action f Scroll Lock Action new Scroll Lock Action this f Toggle Orientation Actions new Toggle Orientation Action new Toggle Orientation Action this VIEW ORIENTATION VERTICAL new Toggle Orientation Action this VIEW ORIENTATION HORIZONTAL new Toggle Orientation Action this VIEW ORIENTATION AUTOMATIC f Next Action new Show Next Failure Action this f Previous Action new Show Previous Failure Action this f Stop Action new Stop Action f Next Action set Enabled false f Previous Action set Enabled false f Stop Action set Enabled false action Bars set Global Action Handler Action Factory NEXT get Id f Next Action action Bars set Global Action Handler Action Factory PREVIOUS get Id f Previous Action tool Bar add f Next Action tool Bar add f Previous Action tool Bar add f Stop Action tool Bar add new Separator tool Bar add f Rerun Last Test Action tool Bar add f Scroll Lock Action for int i 0 i f Toggle Orientation Actions length i view Menu add f Toggle Orientation Actions i f Scroll Lock Action set Checked f Auto Scroll action Bars update Action Bars  configureToolBar IActionBars actionBars getViewSite getActionBars IToolBarManager toolBar actionBars getToolBarManager IMenuManager viewMenu actionBars getMenuManager fRerunLastTestAction RerunLastAction fScrollLockAction ScrollLockAction fToggleOrientationActions ToggleOrientationAction ToggleOrientationAction VIEW_ORIENTATION_VERTICAL ToggleOrientationAction VIEW_ORIENTATION_HORIZONTAL ToggleOrientationAction VIEW_ORIENTATION_AUTOMATIC fNextAction ShowNextFailureAction fPreviousAction ShowPreviousFailureAction fStopAction StopAction fNextAction setEnabled fPreviousAction setEnabled fStopAction setEnabled actionBars setGlobalActionHandler ActionFactory getId fNextAction actionBars setGlobalActionHandler ActionFactory getId fPreviousAction toolBar fNextAction toolBar fPreviousAction toolBar fStopAction toolBar toolBar fRerunLastTestAction toolBar fScrollLockAction fToggleOrientationActions viewMenu fToggleOrientationActions fScrollLockAction setChecked fAutoScroll actionBars updateActionBars
private I Status Line Manager get Status Line we want to show messages globally hence we have to go through the active part I View Site site get View Site I Workbench Page page site get Page I Workbench Part active Part page get Active Part if active Part instanceof I View Part I View Part active View Part I View Part active Part I View Site active View Site active View Part get View Site return active View Site get Action Bars get Status Line Manager if active Part instanceof I Editor Part I Editor Part active Editor Part I Editor Part active Part I Editor Action Bar Contributor contributor active Editor Part get Editor Site get Action Bar Contributor if contributor instanceof Editor Action Bar Contributor return Editor Action Bar Contributor contributor get Action Bars get Status Line Manager no active part return get View Site get Action Bars get Status Line Manager  IStatusLineManager getStatusLine IViewSite getViewSite IWorkbenchPage getPage IWorkbenchPart activePart getActivePart activePart IViewPart IViewPart activeViewPart IViewPart activePart IViewSite activeViewSite activeViewPart getViewSite activeViewSite getActionBars getStatusLineManager activePart IEditorPart IEditorPart activeEditorPart IEditorPart activePart IEditorActionBarContributor activeEditorPart getEditorSite getActionBarContributor EditorActionBarContributor EditorActionBarContributor getActionBars getStatusLineManager getViewSite getActionBars getStatusLineManager
protected Composite create Progress Count Panel Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout composite set Layout layout set Counter Columns layout f Counter Panel new Counter Panel composite f Counter Panel set Layout Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL f Progress Bar new J Unit Progress Bar composite f Progress Bar set Layout Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL return composite  createProgressCountPanel GridLayout GridLayout setLayout setCounterColumns fCounterPanel CounterPanel fCounterPanel setLayoutData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL fProgressBar JUnitProgressBar fProgressBar setLayoutData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL
public Test Run Info get Test Info String test Id if test Id null return null return Test Run Info f Test Infos get test Id  TestRunInfo getTestInfo testId testId TestRunInfo fTestInfos testId
public void handle Test Selected String test Id Test Run Info test Info get Test Info test Id if test Info null show Failure null NON NLS 1 else show Failure test Info  handleTestSelected testId TestRunInfo testInfo getTestInfo testId testInfo showFailure showFailure testInfo
private void show Failure final Test Run Info failure post Sync Runnable new Runnable public void run if is Disposed f Failure Trace show Failure failure  showFailure TestRunInfo postSyncRunnable isDisposed fFailureTrace showFailure
private void show Failure final Test Run Info failure post Sync Runnable new Runnable public void run if is Disposed f Failure Trace show Failure failure  showFailure TestRunInfo postSyncRunnable isDisposed fFailureTrace showFailure
public I Java Project get Launched Project return f Test Project  IJavaProject getLaunchedProject fTestProject
public I Launch get Last Launch return f Last Launch  ILaunch getLastLaunch fLastLaunch
public static Image create Image String path try Image Descriptor id Image Descriptor create FromURL J Unit Plugin make Icon FileURL path return id create Image catch MalformedURL Exception e fall through return null  createImage ImageDescriptor ImageDescriptor createFromURL JUnitPlugin makeIconFileURL createImage MalformedURLException
private boolean is Disposed return f Is Disposed f Counter Panel is Disposed  isDisposed fIsDisposed fCounterPanel isDisposed
private Display get Display return get View Site get Shell get Display  getDisplay getViewSite getShell getDisplay
see I Workbench Part get Title Image public Image get Title Image if f Original View Image null f Original View Image super get Title Image if f View Image null return super get Title Image return f View Image  IWorkbenchPart getTitleImage getTitleImage fOriginalViewImage fOriginalViewImage getTitleImage fViewImage getTitleImage fViewImage
public void property Change Property Change Event event if is Disposed return if IJ Unit Preferences Constants SHOW ON ERROR ONLY equals event get Property if J Unit Preference Page get Show On Error Only f View Image f Original View Image fire Property Change I Workbench Part PROP TITLE  propertyChange PropertyChangeEvent isDisposed IJUnitPreferencesConstants SHOW_ON_ERROR_ONLY getProperty JUnitPreferencePage getShowOnErrorOnly fViewImage fOriginalViewImage firePropertyChange IWorkbenchPart PROP_TITLE
Runnable r new Runnable public void run if is Disposed return fire Property Change I Workbench Part PROP TITLE  isDisposed firePropertyChange IWorkbenchPart PROP_TITLE
void code Has Changed if f Dirty Listener null Java Core remove Element Changed Listener f Dirty Listener f Dirty Listener null if f View Image f Test RunOK Icon f View Image f Test RunOK Dirty Icon else if f View Image f Test Run Fail Icon f View Image f Test Run Fail Dirty Icon Runnable r new Runnable public void run if is Disposed return fire Property Change I Workbench Part PROP TITLE if is Disposed get Display async Exec r  codeHasChanged fDirtyListener JavaCore removeElementChangedListener fDirtyListener fDirtyListener fViewImage fTestRunOKIcon fViewImage fTestRunOKDirtyIcon fViewImage fTestRunFailIcon fViewImage fTestRunFailDirtyIcon isDisposed firePropertyChange IWorkbenchPart PROP_TITLE isDisposed getDisplay asyncExec
boolean is Created return f Counter Panel null  isCreated fCounterPanel
public void rerun Test String test Id String class Name String test Name String launch Mode DebugUI Tools save And Build Before Launch if last Launch Is Kept Alive f Test Runner Client rerun Test test Id class Name test Name else if f Last Launch null run the selected test using the previous launch configuration I Launch Configuration launch Configuration f Last Launch get Launch Configuration if launch Configuration null try String name class Name if test Name null name test Name NON NLS 1 String config Name J Unit Messages get Formatted String Test Runner View Part config Name name NON NLS 1 I Launch Configuration Working Copy tmp launch Configuration copy config Name fix for bug 64838 junit view run single test does not use correct class J Unit tmp set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME class Name reset the container tmp set Attribute J Unit Base Launch Configuration LAUNCH CONTAINER ATTR NON NLS 1 if test Name null tmp set Attribute J Unit Base Launch Configuration TESTNAME ATTR test Name String args rerun test Id tmp set Attribute I Java Launch Configuration Constants ATTR PROGRAM ARGUMENTS args tmp launch launch Mode null return catch Core Exception e Error Dialog open Error get Site get Shell J Unit Messages get String Test Runner View Part error cannotrerun e get Message e get Status NON NLS 1 Message Dialog open Information get Site get Shell J Unit Messages get String Test Runner View Part cannotrerun title NON NLS 1 J Unit Messages get String Test Runner View Part cannotrerurn message NON NLS 1  rerunTest testId className testName launchMode DebugUITools saveAndBuildBeforeLaunch lastLaunchIsKeptAlive fTestRunnerClient rerunTest testId className testName fLastLaunch ILaunchConfiguration launchConfiguration fLastLaunch getLaunchConfiguration launchConfiguration className testName testName configName JUnitMessages getFormattedString TestRunnerViewPart configName ILaunchConfigurationWorkingCopy launchConfiguration configName JUnit setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME className setAttribute JUnitBaseLaunchConfiguration LAUNCH_CONTAINER_ATTR testName setAttribute JUnitBaseLaunchConfiguration TESTNAME_ATTR testName testId setAttribute IJavaLaunchConfigurationConstants ATTR_PROGRAM_ARGUMENTS launchMode CoreException ErrorDialog openError getSite getShell JUnitMessages getString TestRunnerViewPart getMessage getStatus MessageDialog openInformation getSite getShell JUnitMessages getString TestRunnerViewPart JUnitMessages getString TestRunnerViewPart
public boolean last Launch Is Kept Alive return f Test Runner Client null f Test Runner Client is Running I Launch Manager DEBUG MODE equals f Launch Mode  lastLaunchIsKeptAlive fTestRunnerClient fTestRunnerClient isRunning ILaunchManager DEBUG_MODE fLaunchMode
private void set Orientation int orientation if f Sash Form null f Sash Form is Disposed return boolean horizontal orientation VIEW ORIENTATION HORIZONTAL f Sash Form set Orientation horizontal SWT HORIZONTAL SWT VERTICAL for int i 0 i f Toggle Orientation Actions length i f Toggle Orientation Actions i set Checked f Orientation f Toggle Orientation Actions i get Orientation f Current Orientation orientation Grid Layout layout Grid Layout f Counter Composite get Layout set Counter Columns layout f Parent layout  setOrientation fSashForm fSashForm isDisposed VIEW_ORIENTATION_HORIZONTAL fSashForm setOrientation fToggleOrientationActions fToggleOrientationActions setChecked fOrientation fToggleOrientationActions getOrientation fCurrentOrientation GridLayout GridLayout fCounterComposite getLayout setCounterColumns fParent
private void set Counter Columns Grid Layout layout if f Current Orientation VIEW ORIENTATION HORIZONTAL layout num Columns 2 else layout num Columns 1  setCounterColumns GridLayout fCurrentOrientation VIEW_ORIENTATION_HORIZONTAL numColumns numColumns

Create the tab control param tab Folder the containing tab folder param clipboard the clipboard to be used by the tab param runner the test Runner View Part containing the tab folder  tabFolder testRunnerViewPart
public abstract void create Tab Control C Tab Folder tab Folder Clipboard clipboard Test Runner View Part runner Returns the name of the currently selected Test in the View public abstract String get Selected Test Id  createTabControl CTabFolder tabFolder TestRunnerViewPart getSelectedTestId
Activates the Test Run View public void activate  TestRunView
Sets the focus in the Test Run View public void set Focus  TestRunView setFocus
Informs that the suite is about to start public void about To Start  aboutToStart
Informs that the suite is about to start public void about To End  aboutToEnd
Returns the name of the Run View public abstract String get Name  RunView getName
Sets the current Test in the View public void set Selected Test String test Id  setSelectedTest testId
A test has started public void start Test String test Id  startTest testId
A test has ended public void end Test String test Id  endTest testId
The status of a test has changed public void test Status Changed Test Run Info new Info  testStatusChanged TestRunInfo newInfo
A new tree entry got posted public void new Tree Entry String tree Entry  newTreeEntry treeEntry
Select next test failure public void select Next  selectNext
Select previous test failure public void select Previous  selectPrevious

Constructs an instance of code Element Tree Selection Dialog code param label Provider the label provider to render the entries param content Provider the content provider to evaluate the tree structure public Checked Table Selection Dialog Shell parent I Label Provider label Provider I Structured Content Provider content Provider super parent f Label Provider label Provider f Content Provider content Provider set Result new Array List 0 set Status Line Above Buttons true  ElementTreeSelectionDialog labelProvider contentProvider CheckedTableSelectionDialog ILabelProvider labelProvider IStructuredContentProvider contentProvider fLabelProvider labelProvider fContentProvider contentProvider setResult ArrayList setStatusLineAboveButtons
Sets the initial selection Convenience method param selection the initial selection public void set Initial Selection Object selection set Initial Selections new Object selection  setInitialSelection setInitialSelections
Sets the message to be displayed if the list is empty param message the message to be displayed public void set Empty List Message String message f Empty List Message message  setEmptyListMessage fEmptyListMessage
Sets the sorter used by the tree viewer public void set Sorter Viewer Sorter sorter f Sorter sorter  setSorter ViewerSorter fSorter
Adds a filter to the tree viewer param filter a filter public void add Filter Viewer Filter filter if f Filters null f Filters new Array List 4 f Filters add filter  addFilter ViewerFilter fFilters fFilters ArrayList fFilters
Sets an optional validator to check if the selection is valid The validator is invoked whenever the selection changes param validator the validator to validate the selection public void set Validator I Selection Status Validator validator f Validator validator  setValidator ISelectionStatusValidator fValidator
Sets the tree input param input the tree input public void set Input Object input f Input input  setInput fInput
Sets the size of the tree in unit of characters param width the width of the tree param height the height of the tree public void set Size int width int height f Width width f Height height  setSize fWidth fHeight
protected void updateOK Status if f Is Empty if f Validator null f Curr Status f Validator validate f Viewer get Checked Elements update Status f Curr Status else if f Curr Status isOK f Curr Status new J Unit Status else f Curr Status new J Unit Status I Status ERROR f Empty List Message update Status f Curr Status  updateOKStatus fIsEmpty fValidator fCurrStatus fValidator fViewer getCheckedElements updateStatus fCurrStatus fCurrStatus fCurrStatus JUnitStatus fCurrStatus JUnitStatus IStatus fEmptyListMessage updateStatus fCurrStatus
f Is Empty evaluate If Table Empty f Input Busy Indicator show While null new Runnable public void run access super Open  fIsEmpty evaluateIfTableEmpty fInput BusyIndicator showWhile superOpen
public int open f Is Empty evaluate If Table Empty f Input Busy Indicator show While null new Runnable public void run access super Open return get Return Code  fIsEmpty evaluateIfTableEmpty fInput BusyIndicator showWhile superOpen getReturnCode
private void access super Open super open  superOpen
Handles cancel button pressed event protected void cancel Pressed set Result null super cancel Pressed  cancelPressed setResult cancelPressed
see Selection Status Dialog compute Result protected void compute Result set Result Arrays as List f Viewer get Checked Elements  SelectionStatusDialog computeResult computeResult setResult asList fViewer getCheckedElements
public void create super create List initial Selections get Initial Element Selections if initial Selections size 0 f Viewer set Checked Elements initial Selections to Array updateOK Status  initialSelections getInitialElementSelections initialSelections fViewer setCheckedElements initialSelections toArray updateOKStatus
protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent Label message Label create Message Area composite Control tree Widget create Table Viewer composite Control button Composite create Selection Buttons composite Grid Data data new Grid Data Grid Data FILL BOTH data width Hint convert Width In Chars To Pixels f Width data height Hint convert Height In Chars To Pixels f Height tree Widget set Layout Data data if f Is Empty message Label set Enabled false tree Widget set Enabled false button Composite set Enabled false apply Dialog Font composite return composite  createDialogArea createDialogArea messageLabel createMessageArea treeWidget createTableViewer buttonComposite createSelectionButtons GridData GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels fWidth heightHint convertHeightInCharsToPixels fHeight treeWidget setLayoutData fIsEmpty messageLabel setEnabled treeWidget setEnabled buttonComposite setEnabled applyDialogFont
f Viewer set Label Provider f Label Provider f Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event updateOK Status  fViewer setLabelProvider fLabelProvider fViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent updateOKStatus
private Table create Table Viewer Composite parent f Viewer Checkbox Table Viewer new Check List parent SWT BORDER f Viewer set Content Provider f Content Provider f Viewer set Label Provider f Label Provider f Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event updateOK Status f Viewer set Sorter f Sorter if f Filters null for int i 0 i f Filters size i f Viewer add Filter Viewer Filter f Filters get i f Viewer set Input f Input return f Viewer get Table  createTableViewer fViewer CheckboxTableViewer newCheckList fViewer setContentProvider fContentProvider fViewer setLabelProvider fLabelProvider fViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent updateOKStatus fViewer setSorter fSorter fFilters fFilters fViewer addFilter ViewerFilter fFilters fViewer setInput fInput fViewer getTable
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e f Viewer set Checked Elements f Content Provider get Elements f Input updateOK Status  SelectionListener SelectionAdapter widgetSelected SelectionEvent fViewer setCheckedElements fContentProvider getElements fInput updateOKStatus
listener new Selection Adapter public void widget Selected Selection Event e f Viewer set Checked Elements new Object 0 updateOK Status  SelectionAdapter widgetSelected SelectionEvent fViewer setCheckedElements updateOKStatus
Add the selection and deselection buttons to the dialog param composite org eclipse swt widgets Composite private Composite create Selection Buttons Composite composite Composite button Composite new Composite composite SWT RIGHT Grid Layout layout new Grid Layout layout num Columns 2 button Composite set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data GRAB HORIZONTAL data grab Excess Horizontal Space true composite set Data data Button select Button create Button button Composite I Dialog Constants SELECT ALL ID Wizard Messages get String Checked Table Selection Dialog select All false NON NLS 1 Selection Listener listener new Selection Adapter public void widget Selected Selection Event e f Viewer set Checked Elements f Content Provider get Elements f Input updateOK Status select Button add Selection Listener listener Button deselect Button create Button button Composite I Dialog Constants DESELECT ALL ID Wizard Messages get String Checked Table Selection Dialog deselect All false NON NLS 1 listener new Selection Adapter public void widget Selected Selection Event e f Viewer set Checked Elements new Object 0 updateOK Status deselect Button add Selection Listener listener return button Composite  createSelectionButtons buttonComposite GridLayout GridLayout numColumns buttonComposite setLayout GridData GridData GridData HORIZONTAL_ALIGN_END GridData GRAB_HORIZONTAL grabExcessHorizontalSpace setData selectButton createButton buttonComposite IDialogConstants SELECT_ALL_ID WizardMessages getString CheckedTableSelectionDialog selectAll SelectionListener SelectionAdapter widgetSelected SelectionEvent fViewer setCheckedElements fContentProvider getElements fInput updateOKStatus selectButton addSelectionListener deselectButton createButton buttonComposite IDialogConstants DESELECT_ALL_ID WizardMessages getString CheckedTableSelectionDialog deselectAll SelectionAdapter widgetSelected SelectionEvent fViewer setCheckedElements updateOKStatus deselectButton addSelectionListener buttonComposite
private boolean evaluate If Table Empty Object input Object elements f Content Provider get Elements input if elements length 0 if f Filters null for int i 0 i f Filters size i Viewer Filter curr Viewer Filter f Filters get i elements curr filter f Viewer input elements return elements length 0  evaluateIfTableEmpty fContentProvider getElements fFilters fFilters ViewerFilter ViewerFilter fFilters fViewer

Handles the given code Core Exception code param e the code Core Exception code to be handled param parent the dialog window s parent shell param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Core Exception e Shell parent String title String message fg Instance perform e parent title message  CoreException CoreException CoreException fgInstance
Handles the given code Invocation Target Exception code param e the code Invocation Target Exception code to be handled param parent the dialog window s parent shell param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Invocation Target Exception e Shell parent String title String message fg Instance perform e parent title message  InvocationTargetException InvocationTargetException InvocationTargetException fgInstance
protected void perform Core Exception e Shell shell String title String message J Unit Plugin log e I Status status e get Status if status null Error Dialog open Error shell title message status else display Message Dialog e e get Message shell title message  CoreException JUnitPlugin IStatus getStatus ErrorDialog openError displayMessageDialog getMessage
protected void perform Invocation Target Exception e Shell shell String title String message Throwable target e get Target Exception if target instanceof Core Exception perform Core Exception target shell title message else J Unit Plugin log e if e get Message null e get Message length 0 display Message Dialog e e get Message shell title message else display Message Dialog e target get Message shell title message  InvocationTargetException getTargetException CoreException CoreException JUnitPlugin getMessage getMessage displayMessageDialog getMessage displayMessageDialog getMessage
private void display Message Dialog Throwable t String exception Message Shell shell String title String message String Writer msg new String Writer if message null msg write message msg write n n NON NLS 1 if exception Message null exception Message length 0 msg write Wizard Messages get String Exception Dialog see Error Log Message NON NLS 1 else msg write exception Message Message Dialog open Error shell title msg to String  displayMessageDialog exceptionMessage StringWriter StringWriter exceptionMessage exceptionMessage WizardMessages getString ExceptionDialog seeErrorLogMessage exceptionMessage MessageDialog openError toString

Creates a status set to OK no message public J Unit Status this OK null  JUnitStatus
Creates a status param severity The status severity ERROR WARNING INFO and OK param message The message of the status Applies only for ERROR WARNING and INFO public J Unit Status int severity String message f Status Message message f Severity severity  JUnitStatus fStatusMessage fSeverity
public static I Status create Error String message return new J Unit Status I Status ERROR message  IStatus createError JUnitStatus IStatus
public static I Status create Warning String message return new J Unit Status I Status WARNING message  IStatus createWarning JUnitStatus IStatus
public static I Status create Info String message return new J Unit Status I Status INFO message  IStatus createInfo JUnitStatus IStatus
Returns if the status severity is OK public boolean isOK return f Severity I Status OK  fSeverity IStatus
Returns if the status severity is WARNING public boolean is Warning return f Severity I Status WARNING  isWarning fSeverity IStatus
Returns if the status severity is INFO public boolean is Info return f Severity I Status INFO  isInfo fSeverity IStatus
Returns if the status severity is ERROR public boolean is Error return f Severity I Status ERROR  isError fSeverity IStatus
see I Status get Message public String get Message return f Status Message  IStatus getMessage getMessage fStatusMessage
Sets the status to ERROR param error Message the error message can be empty but not null public void set Error String error Message Assert is Not Null error Message f Status Message error Message f Severity I Status ERROR  errorMessage setError errorMessage isNotNull errorMessage fStatusMessage errorMessage fSeverity IStatus
Sets the status to WARNING param warning Message the warning message can be empty but not null public void set Warning String warning Message Assert is Not Null warning Message f Status Message warning Message f Severity I Status WARNING  warningMessage setWarning warningMessage isNotNull warningMessage fStatusMessage warningMessage fSeverity IStatus
Sets the status to INFO param info Message the info message can be empty but not null public void set Info String info Message Assert is Not Null info Message f Status Message info Message f Severity I Status INFO  infoMessage setInfo infoMessage isNotNull infoMessage fStatusMessage infoMessage fSeverity IStatus
Sets the status to OK public void setOK f Status Message null f Severity I Status OK  fStatusMessage fSeverity IStatus
see I Status matches int public boolean matches int severity Mask return f Severity severity Mask 0  IStatus severityMask fSeverity severityMask
Returns always code false code see I Status is Multi Status public boolean is Multi Status return false  IStatus isMultiStatus isMultiStatus
see I Status get Severity public int get Severity return f Severity  IStatus getSeverity getSeverity fSeverity
see I Status get Plugin public String get Plugin return J Unit Plugin PLUGIN ID  IStatus getPlugin getPlugin JUnitPlugin PLUGIN_ID
Returns always code null code see I Status get Exception public Throwable get Exception return null  IStatus getException getException
Returns always the error severity see I Status get Code public int get Code return f Severity  IStatus getCode getCode fSeverity
Returns always code null code see I Status get Children public I Status get Children return new I Status 0  IStatus getChildren IStatus getChildren IStatus

public boolean f No Body public Gen Stub Settings Code Generation Settings settings this create Comments settings create Comments  fNoBody GenStubSettings CodeGenerationSettings createComments createComments
Examines a string and returns the first line delimiter found public static String get Line Delimiter Used I Java Element elem try I Compilation Unit cu I Compilation Unit elem get Ancestor I Java Element COMPILATION UNIT if cu null cu exists I Buffer buf cu get Buffer int length buf get Length for int i 0 i length i char ch buf get Char i if ch SWT CR if i 1 length if buf get Char i 1 SWT LF return r n NON NLS 1 return r NON NLS 1 else if ch SWT LF return n NON NLS 1 return System get Property line separator n NON NLS 1 NON NLS 2 catch Java Model Exception e return System get Property line separator n NON NLS 1 NON NLS 2  getLineDelimiterUsed IJavaElement ICompilationUnit ICompilationUnit getAncestor IJavaElement COMPILATION_UNIT IBuffer getBuffer getLength getChar getChar getProperty JavaModelException getProperty
public static String code Format String source String int initial Indentation Level String line Delim I Code Formatter formatter Tool Factory create Default Code Formatter null return formatter format source String initial Indentation Level null line Delim  codeFormat sourceString initialIndentationLevel lineDelim ICodeFormatter ToolFactory createDefaultCodeFormatter sourceString initialIndentationLevel lineDelim
Generates a stub Given a template method a stub with the same signature will be constructed so it can be added to a type param dest Type Name The name of the type to which the method will be added to Used for the constructor param method A method template method belongs to different type than the parent param settings Options as defined above GENSTUB  param imports Imports required by the sub are added to the imports structure throws Java Model Exception public static String gen Stub String dest Type Name I Method method Gen Stub Settings settings Imports Manager imports throws Java Model Exception I Type declaringtype method get Declaring Type String Buffer buf new String Buffer String param Types method get Parameter Types String param Names method get Parameter Names String exc Types method get Exception Types String ret Type Sig method get Return Type int last Param param Types length 1 if settings create Comments if method is Constructor String desc Constructor for dest Type Name NON NLS 1 gen Java Doc Stub desc param Names Signature SIG VOID exc Types buf else java doc if settings f Method Overwrites boolean is Deprecated Flags is Deprecated method get Flags gen Java Doc See Tag declaringtype get Element Name method get Element Name param Types settings create Non Javadoc Comments is Deprecated buf else generate a default java doc comment String desc Method method get Element Name NON NLS 1 gen Java Doc Stub desc param Names ret Type Sig exc Types buf int flags method get Flags if Flags is Public flags declaringtype is Interface settings f No Body buf append public NON NLS 1 else if Flags is Protected flags buf append protected NON NLS 1 else if Flags is Private flags buf append private NON NLS 1 if Flags is Synchronized flags buf append synchronized NON NLS 1 if Flags is Volatile flags buf append volatile NON NLS 1 if Flags is Strictfp flags buf append strictfp NON NLS 1 if Flags is Static flags buf append static NON NLS 1 if method is Constructor buf append dest Type Name else String ret Type Frm Signature to String ret Type Sig if is Built In Type ret Type Sig resolve And Add ret Type Sig declaringtype imports buf append Signature get Simple Name ret Type Frm buf append buf append method get Element Name buf append for int i 0 i last Param i String param Type Sig param Types i String param Type Frm Signature to String param Type Sig if is Built In Type param Type Sig resolve And Add param Type Sig declaringtype imports buf append Signature get Simple Name param Type Frm buf append buf append param Names i if i last Param buf append NON NLS 1 buf append int last Exc exc Types length 1 if last Exc 0 buf append throws NON NLS 1 for int i 0 i last Exc i String exc Type Sig exc Types i String exc Type Frm Signature to String exc Type Sig resolve And Add exc Type Sig declaringtype imports buf append Signature get Simple Name exc Type Frm if i last Exc buf append NON NLS 1 if settings f No Body buf append n n NON NLS 1 else buf append n t NON NLS 1 if settings f Call Super if ret Type Sig null ret Type Sig equals Signature SIG VOID buf append t if is Built In Type ret Type Sig Signature get Array Count ret Type Sig 0 buf append return null n t NON NLS 1 else if ret Type Sig equals Signature SIG BOOLEAN buf append return false n t NON NLS 1 else buf append return 0 n t NON NLS 1 else buf append t if method is Constructor if Signature SIG VOID equals ret Type Sig buf append return NON NLS 1 buf append super NON NLS 1 buf append method get Element Name else buf append super NON NLS 1 buf append for int i 0 i last Param i buf append param Names i if i last Param buf append NON NLS 1 buf append n t NON NLS 1 buf append n n NON NLS 1 return buf to String  destTypeName GENSTUB_ JavaModelException genStub destTypeName IMethod GenStubSettings ImportsManager JavaModelException IType getDeclaringType StringBuffer StringBuffer paramTypes getParameterTypes paramNames getParameterNames excTypes getExceptionTypes retTypeSig getReturnType lastParam paramTypes createComments isConstructor destTypeName genJavaDocStub paramNames SIG_VOID excTypes fMethodOverwrites isDeprecated isDeprecated getFlags genJavaDocSeeTag getElementName getElementName paramTypes createNonJavadocComments isDeprecated getElementName genJavaDocStub paramNames retTypeSig excTypes getFlags isPublic isInterface fNoBody isProtected isPrivate isSynchronized isVolatile isStrictfp isStatic isConstructor destTypeName retTypeFrm toString retTypeSig isBuiltInType retTypeSig resolveAndAdd retTypeSig getSimpleName retTypeFrm getElementName lastParam paramTypeSig paramTypes paramTypeFrm toString paramTypeSig isBuiltInType paramTypeSig resolveAndAdd paramTypeSig getSimpleName paramTypeFrm paramNames lastParam lastExc excTypes lastExc lastExc excTypeSig excTypes excTypeFrm toString excTypeSig resolveAndAdd excTypeSig getSimpleName excTypeFrm lastExc fNoBody fCallSuper retTypeSig retTypeSig SIG_VOID isBuiltInType retTypeSig getArrayCount retTypeSig retTypeSig SIG_BOOLEAN isConstructor SIG_VOID retTypeSig getElementName lastParam paramNames lastParam toString
Generates a default Java Doc comment stub for a method private static void gen Java Doc Stub String descr String param Names String ret Type Sig String exc Type Sigs String Buffer buf buf append n NON NLS 1 buf append buf append descr buf append n NON NLS 2 NON NLS 1 for int i 0 i param Names length i buf append param buf append param Names i buf append n NON NLS 1 if ret Type Sig null ret Type Sig equals Signature SIG VOID String simple Name Signature get Simple Name Signature to String ret Type Sig buf append return buf append simple Name buf append n NON NLS 1 for int i 0 i exc Type Sigs length i String simple Name Signature get Simple Name Signature to String exc Type Sigs i buf append throws buf append simple Name buf append n NON NLS 1 buf append n NON NLS 1  JavaDoc genJavaDocStub paramNames retTypeSig excTypeSigs StringBuffer paramNames paramNames retTypeSig retTypeSig SIG_VOID simpleName getSimpleName toString retTypeSig simpleName excTypeSigs simpleName getSimpleName toString excTypeSigs simpleName
Generates a see tag to the defined method public static void gen Java Doc See Tag String declaring Type Name String method Name String param Types boolean non Java Doc Comment boolean is Deprecated String Buffer buf create a see link buf append NON NLS 1 if non Java Doc Comment buf append buf append n see NON NLS 1 buf append declaring Type Name buf append buf append method Name buf append for int i 0 i param Types length i if i 0 buf append NON NLS 1 buf append Signature get Simple Name Signature to String param Types i buf append n NON NLS 1 if is Deprecated buf append deprecated n NON NLS 1 buf append n NON NLS 1  genJavaDocSeeTag declaringTypeName methodName paramTypes nonJavaDocComment isDeprecated StringBuffer nonJavaDocComment declaringTypeName methodName paramTypes getSimpleName toString paramTypes isDeprecated
private static boolean is Built In Type String type Name char first Signature get Element Type type Name char At 0 return first Signature C RESOLVED first Signature C UNRESOLVED  isBuiltInType typeName getElementType typeName charAt C_RESOLVED C_UNRESOLVED
private static void resolve And Add String ref Type Sig I Type declaring Type Imports Manager imports throws Java Model Exception String resolved Type Name Java Model Util get Resolved Type Name ref Type Sig declaring Type if resolved Type Name null imports add Import resolved Type Name  resolveAndAdd refTypeSig IType declaringType ImportsManager JavaModelException resolvedTypeName JavaModelUtil getResolvedTypeName refTypeSig declaringType resolvedTypeName addImport resolvedTypeName
public static String get Todo Task Tag I Java Project project String markers null if project null markers Java Core get Option Java Core COMPILER TASK TAGS else markers project get Option Java Core COMPILER TASK TAGS true if markers null markers length 0 int idx markers index Of if idx 1 return markers else return markers substring 0 idx return null  getTodoTaskTag IJavaProject JavaCore getOption JavaCore COMPILER_TASK_TAGS getOption JavaCore COMPILER_TASK_TAGS indexOf

Calculates the number of columns needed by field editors public static int get Number Of Columns Method Stubs Selection Button Group editors int column Count 0 for int i 0 i editors length i column Count Math max editors i get Number Of Controls column Count return column Count  getNumberOfColumns MethodStubsSelectionButtonGroup columnCount columnCount getNumberOfControls columnCount columnCount
Creates a composite and fills in the given editors param label On Top Defines if the label of all fields should be on top of the fields public static void do Default Layout Composite parent Method Stubs Selection Button Group editors boolean label On Top do Default Layout parent editors label On Top 0 0 0 0  labelOnTop doDefaultLayout MethodStubsSelectionButtonGroup labelOnTop doDefaultLayout labelOnTop
Creates a composite and fills in the given editors param label On Top Defines if the label of all fields should be on top of the fields param min Width The minimal width of the composite param min Height The minimal height of the composite public static void do Default Layout Composite parent Method Stubs Selection Button Group editors boolean label On Top int min Width int min Height do Default Layout parent editors label On Top min Width min Height 0 0  labelOnTop minWidth minHeight doDefaultLayout MethodStubsSelectionButtonGroup labelOnTop minWidth minHeight doDefaultLayout labelOnTop minWidth minHeight
Creates a composite and fills in the given editors param label On Top Defines if the label of all fields should be on top of the fields param min Width The minimal width of the composite param min Height The minimal height of the composite param margin Width The margin width to be used by the composite param margin Height The margin height to be used by the composite public static void do Default Layout Composite parent Method Stubs Selection Button Group editors boolean label On Top int min Width int min Height int margin Width int margin Height int n Culumns get Number Of Columns editors Control controls new Control editors length for int i 0 i editors length i controls i editors i do Fill Into Grid parent n Culumns if label On Top n Culumns modify Label Spans controls n Culumns Grid Layout layout new Grid Layout if margin Width SWT DEFAULT layout margin Width margin Width if margin Height SWT DEFAULT layout margin Height margin Height layout minimum Width min Width layout minimum Height min Height layout num Columns n Culumns parent set Layout layout  labelOnTop minWidth minHeight marginWidth marginHeight doDefaultLayout MethodStubsSelectionButtonGroup labelOnTop minWidth minHeight marginWidth marginHeight nCulumns getNumberOfColumns doFillIntoGrid nCulumns labelOnTop nCulumns modifyLabelSpans nCulumns GridLayout GridLayout marginWidth marginWidth marginWidth marginHeight marginHeight marginHeight minimumWidth minWidth minimumHeight minHeight numColumns nCulumns setLayout
private static void modify Label Spans Control controls int n Culumns for int i 0 i controls length i set Horizontal Span controls i 0 n Culumns  modifyLabelSpans nCulumns setHorizontalSpan nCulumns
Sets the span of a control Assumes that M Grid Data is used public static void set Horizontal Span Control control int span Object ld control get Layout Data if ld instanceof Grid Data Grid Data ld horizontal Span span else if span 1 Grid Data gd new Grid Data gd horizontal Span span control set Layout Data gd  MGridData setHorizontalSpan getLayoutData GridData GridData horizontalSpan GridData GridData horizontalSpan setLayoutData
Sets the width hint of a control Assumes that M Grid Data is used public static void set Width Hint Control control int width Hint Object ld control get Layout Data if ld instanceof Grid Data Grid Data ld width Hint width Hint  MGridData setWidthHint widthHint getLayoutData GridData GridData widthHint widthHint
Sets the horizontal indent of a control Assumes that M Grid Data is used public static void set Horizontal Indent Control control int horizontal Indent Object ld control get Layout Data if ld instanceof Grid Data Grid Data ld horizontal Indent horizontal Indent  MGridData setHorizontalIndent horizontalIndent getLayoutData GridData GridData horizontalIndent horizontalIndent
Creates a spacer control with the given span The composite is assumed to have code M Grid Layout code as layout param parent The parent composite public static Control create Empty Space Composite parent int span Label label new Label parent SWT LEFT Grid Data gd new Grid Data gd horizontal Alignment Grid Data BEGINNING gd grab Excess Horizontal Space false gd horizontal Span span gd horizontal Indent 0 gd width Hint 0 gd height Hint 0 label set Layout Data gd return label  MGridLayout createEmptySpace GridData GridData horizontalAlignment GridData grabExcessHorizontalSpace horizontalSpan horizontalIndent widthHint heightHint setLayoutData

public Pixel Converter Control control GC gc new GC control gc set Font control get Font f Font Metrics gc get Font Metrics gc dispose  PixelConverter setFont getFont fFontMetrics getFontMetrics
see org eclipse jface dialogs Dialog Page convert Height In Chars To Pixels int public int convert Height In Chars To Pixels int chars return Dialog convert Height In Chars To Pixels f Font Metrics chars  DialogPage convertHeightInCharsToPixels convertHeightInCharsToPixels convertHeightInCharsToPixels fFontMetrics
see org eclipse jface dialogs Dialog Page convert HorizontalDL Us To Pixels int public int convert HorizontalDL Us To Pixels int dlus return Dialog convert HorizontalDL Us To Pixels f Font Metrics dlus  DialogPage convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels fFontMetrics
see org eclipse jface dialogs Dialog Page convert VerticalDL Us To Pixels int public int convert VerticalDL Us To Pixels int dlus return Dialog convert VerticalDL Us To Pixels f Font Metrics dlus  DialogPage convertVerticalDLUsToPixels convertVerticalDLUsToPixels convertVerticalDLUsToPixels fFontMetrics
see org eclipse jface dialogs Dialog Page convert Width In Chars To Pixels int public int convert Width In Chars To Pixels int chars return Dialog convert Width In Chars To Pixels f Font Metrics chars  DialogPage convertWidthInCharsToPixels convertWidthInCharsToPixels convertWidthInCharsToPixels fFontMetrics

public class Resources private Resources 
Checks if the given resource is in sync with the underlying file system param resource the resource to be checked return I Status status describing the check s result If code status isOK code returns code true code then the resource is in sync public static I Status check In Sync I Resource resource return check In Sync new I Resource resource  IStatus IStatus checkInSync IResource checkInSync IResource
Checks if the given resources are in sync with the underlying file system param resources the resources to be checked return I Status status describing the check s result If code status isOK code returns code true code then the resources are in sync public static I Status check In Sync I Resource resources I Status result null for int i 0 i resources length i I Resource resource resources i if resource is Synchronized I Resource DEPTH INFINITE result add Out Of Sync result resource if result null return result return new Status I Status OK J Unit Plugin get Plugin Id I Status OK null NON NLS 1  IStatus IStatus checkInSync IResource IStatus IResource isSynchronized IResource DEPTH_INFINITE addOutOfSync IStatus JUnitPlugin getPluginId IStatus
Makes the given resource committable Committable means that it is writeable and that its content hasn t changed by calling code validate Edit code for the given resource on tt I Workspace tt param resource the resource to be checked param context the context passed to code validate Edit code return I Status status describing the method s result If code status isOK code returns code true code then the resource are committable see org eclipse core resources I Workspace validate Edit org eclipse core resources I File java lang Object public static I Status make Committable I Resource resource Object context return make Committable new I Resource resource context  validateEdit IWorkspace validateEdit IStatus IWorkspace validateEdit IFile IStatus makeCommittable IResource makeCommittable IResource
Makes the given resources committable Committable means that all resources are writeable and that the content of the resources hasn t changed by calling code validate Edit code for a given file on tt I Workspace tt param resources the resources to be checked param context the context passed to code validate Edit code return I Status status describing the method s result If code status isOK code returns code true code then the add resources are committable see org eclipse core resources I Workspace validate Edit org eclipse core resources I File java lang Object public static I Status make Committable I Resource resources Object context List read Only Files new Array List for int i 0 i resources length i I Resource resource resources i if resource get Type I Resource FILE resource is Read Only read Only Files add resource if read Only Files size 0 return new Status I Status OK J Unit Plugin get Plugin Id I Status OK null NON NLS 1 Map old Time Stamps create Modification Stamp Map read Only Files I Status status Resources Plugin get Workspace validate Edit I File read Only Files to Array new I File read Only Files size context if status isOK return status I Status modified null Map new Time Stamps create Modification Stamp Map read Only Files for Iterator iter old Time Stamps key Set iterator iter has Next I File file I File iter next if old Time Stamps get file equals new Time Stamps get file modified add Modified modified file if modified null return modified return new Status I Status OK J Unit Plugin get Plugin Id I Status OK null NON NLS 1  validateEdit IWorkspace validateEdit IStatus IWorkspace validateEdit IFile IStatus makeCommittable IResource readOnlyFiles ArrayList IResource getType IResource isReadOnly readOnlyFiles readOnlyFiles IStatus JUnitPlugin getPluginId IStatus oldTimeStamps createModificationStampMap readOnlyFiles IStatus ResourcesPlugin getWorkspace validateEdit IFile readOnlyFiles toArray IFile readOnlyFiles IStatus newTimeStamps createModificationStampMap readOnlyFiles oldTimeStamps keySet hasNext IFile IFile oldTimeStamps newTimeStamps addModified IStatus JUnitPlugin getPluginId IStatus
private static Map create Modification Stamp Map List files Map map new Hash Map for Iterator iter files iterator iter has Next I File file I File iter next map put file new Long file get Modification Stamp return map  createModificationStampMap HashMap hasNext IFile IFile getModificationStamp
private static I Status add Modified I Status status I File file I Status entry J Unit Status create Error J Unit Messages get Formatted String Resources file Modified file get Full Path to String NON NLS 1 if status null return entry else if status is Multi Status Multi Status status add entry return status else Multi Status result new Multi Status J Unit Plugin get Plugin Id IJ Unit Status Constants VALIDATE EDIT CHANGED CONTENT J Unit Messages get String Resources modified Resources null NON NLS 1 result add status result add entry return result  IStatus addModified IStatus IFile IStatus JUnitStatus createError JUnitMessages getFormattedString fileModified getFullPath toString isMultiStatus MultiStatus MultiStatus MultiStatus JUnitPlugin getPluginId IJUnitStatusConstants VALIDATE_EDIT_CHANGED_CONTENT JUnitMessages getString modifiedResources
private static I Status add Out Of Sync I Status status I Resource resource I Status entry new Status I Status ERROR Resources Plugin PI RESOURCES I Resource Status OUT OF SYNC LOCAL J Unit Messages get Formatted String Resources out Of Sync resource get Full Path to String NON NLS 1 null if status null return entry else if status is Multi Status Multi Status status add entry return status else Multi Status result new Multi Status Resources Plugin PI RESOURCES I Resource Status OUT OF SYNC LOCAL J Unit Messages get String Resources out Of Sync Resources null NON NLS 1 result add status result add entry return result  IStatus addOutOfSync IStatus IResource IStatus IStatus ResourcesPlugin PI_RESOURCES IResourceStatus OUT_OF_SYNC_LOCAL JUnitMessages getFormattedString outOfSync getFullPath toString isMultiStatus MultiStatus MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus OUT_OF_SYNC_LOCAL JUnitMessages getString outOfSyncResources
public static String get LocationOS Strings I Resource resources List result new Array List resources length for int i 0 i resources length i I Path location resources i get Location if location null result add location toOS String return String result to Array new String result size  getLocationOSStrings IResource ArrayList IPath getLocation toOSString toArray

public class SWT Util private SWT Util  SWTUtil SWTUtil
private SWT Util Returns the standard display to be used The method first checks if the thread calling this method has an associated disaply If so this display is returned Otherwise the method returns the default display public static Display get Standard Display Display display display Display get Current if display null display Display get Default return display  SWTUtil getStandardDisplay getCurrent getDefault
Returns the shell for the given widget If the widget doesn t represent a SWT object that manage a shell code null code is returned return the shell for the given widget public static Shell get Shell Widget widget if widget instanceof Control return Control widget get Shell if widget instanceof Caret return Caret widget get Parent get Shell if widget instanceof Drag Source return Drag Source widget get Control get Shell if widget instanceof Drop Target return Drop Target widget get Control get Shell if widget instanceof Menu return Menu widget get Parent get Shell if widget instanceof Scroll Bar return Scroll Bar widget get Parent get Shell return null  getShell getShell getParent getShell DragSource DragSource getControl getShell DropTarget DropTarget getControl getShell getParent getShell ScrollBar ScrollBar getParent getShell
Returns a width hint for a button control public static int get Button Width Hint Button button button set Font J Face Resources get Dialog Font Pixel Converter converter new Pixel Converter button int width Hint converter convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH return Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x  getButtonWidthHint setFont JFaceResources getDialogFont PixelConverter PixelConverter widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint computeSize
Returns a height hint for a button control public static int get Button Heigth Hint Button button button set Font J Face Resources get Dialog Font Pixel Converter converter new Pixel Converter button return converter convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT  getButtonHeigthHint setFont JFaceResources getDialogFont PixelConverter PixelConverter convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT
Sets width and height hint for the button control b Note b This is a NOP if the button s layout data is not an instance of code Grid Data code param button the button for which to set the dimension hint public static void set Button Dimension Hint Button button Assert is Not Null button Object gd button get Layout Data if gd instanceof Grid Data Grid Data gd height Hint get Button Heigth Hint button Grid Data gd width Hint get Button Width Hint button  GridData setButtonDimensionHint isNotNull getLayoutData GridData GridData heightHint getButtonHeigthHint GridData widthHint getButtonWidthHint

Set f Matches new Hash Set public J Unit Search Result Collector List list f List list  fMatches HashSet JUnitSearchResultCollector fList
public void accept Search Match Search Match match throws Core Exception Object enclosing Element match get Element if enclosing Element instanceof I Method return I Method method I Method enclosing Element I Type declaring Type method get Declaring Type if f Matches contains declaring Type f Failed contains declaring Type return if has Suite Method declaring Type is Test Type declaring Type f Failed add declaring Type return f Matches add declaring Type  acceptSearchMatch SearchMatch CoreException enclosingElement getElement enclosingElement IMethod IMethod IMethod enclosingElement IType declaringType getDeclaringType fMatches declaringType fFailed declaringType hasSuiteMethod declaringType isTestType declaringType fFailed declaringType fMatches declaringType
public void end Reporting f List add All f Matches  endReporting fList addAll fMatches
private List search Method I Progress Monitor pm final I Java Search Scope scope throws Core Exception final List types Found new Array List 200 search Method types Found scope pm return types Found  searchMethod IProgressMonitor IJavaSearchScope CoreException typesFound ArrayList searchMethod typesFound typesFound
private List search Method final List v I Java Search Scope scope final I Progress Monitor progress Monitor throws Core Exception Search Requestor requestor new J Unit Search Result Collector v Search Pattern suite Pattern Search Pattern create Pattern suite Test I Java Search Constants METHOD I Java Search Constants DECLARATIONS Search Pattern R EXACT MATCH Search Pattern R CASE SENSITIVE NON NLS 1 Search Pattern test Pattern Search Pattern create Pattern test void I Java Search Constants METHOD I Java Search Constants DECLARATIONS Search Pattern R PATTERN MATCH Search Pattern R CASE SENSITIVE NON NLS 1 Search Pattern pattern Search Pattern create Or Pattern suite Pattern test Pattern Search Participant participants new Search Participant Search Engine get Default Search Participant new Search Engine search pattern participants scope requestor progress Monitor return v  searchMethod IJavaSearchScope IProgressMonitor progressMonitor CoreException SearchRequestor JUnitSearchResultCollector SearchPattern suitePattern SearchPattern createPattern IJavaSearchConstants IJavaSearchConstants SearchPattern R_EXACT_MATCH SearchPattern R_CASE_SENSITIVE SearchPattern testPattern SearchPattern createPattern IJavaSearchConstants IJavaSearchConstants SearchPattern R_PATTERN_MATCH SearchPattern R_CASE_SENSITIVE SearchPattern SearchPattern createOrPattern suitePattern testPattern SearchParticipant SearchParticipant SearchEngine getDefaultSearchParticipant SearchEngine progressMonitor
if elements length 0 I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor pm throws Interrupted Exception do Find Tests elements result pm  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InterruptedException doFindTests
public static I Type find Tests I Runnable Context context final Object elements throws Invocation Target Exception Interrupted Exception final Set result new Hash Set if elements length 0 I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor pm throws Interrupted Exception do Find Tests elements result pm context run true true runnable return I Type result to Array new I Type result size  IType findTests IRunnableContext InvocationTargetException InterruptedException HashSet IRunnableWithProgress IRunnableWithProgress IProgressMonitor InterruptedException doFindTests IType toArray IType
if elements length 0 I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor pm throws Interrupted Exception do Find Tests elements result pm  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InterruptedException doFindTests
public static I Type find Tests final Object elements throws Invocation Target Exception Interrupted Exception final Set result new Hash Set if elements length 0 I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor pm throws Interrupted Exception do Find Tests elements result pm PlatformUI get Workbench get Progress Service busy Cursor While runnable return I Type result to Array new I Type result size  IType findTests InvocationTargetException InterruptedException HashSet IRunnableWithProgress IRunnableWithProgress IProgressMonitor InterruptedException doFindTests getWorkbench getProgressService busyCursorWhile IType toArray IType
public static void do Find Tests Object elements Set result I Progress Monitor pm throws Interrupted Exception int n Elements elements length pm begin Task J Unit Messages get String Test Search Engine message searching n Elements NON NLS 1 try for int i 0 i n Elements i try collect Types elements i new Sub Progress Monitor pm 1 result catch Core Exception e J Unit Plugin log e get Status if pm is Canceled throw new Interrupted Exception finally pm done  doFindTests IProgressMonitor InterruptedException nElements beginTask JUnitMessages getString TestSearchEngine nElements nElements collectTypes SubProgressMonitor CoreException JUnitPlugin getStatus isCanceled InterruptedException
private static void collect Types Object element I Progress Monitor pm Set result throws Core Exception Invocation Target Exception element compute Scope element while element instanceof I Java Element element instanceof I Compilation Unit element instanceof I Source Reference if element instanceof I Type if has Suite Method I Type element is Test Type I Type element result add element return element I Java Element element get Parent if element instanceof I Compilation Unit I Compilation Unit cu I Compilation Unit element I Type types cu get All Types for int i 0 i types length i if has Suite Method types i is Test Type types i result add types i else if element instanceof I Java Element List found search Suite Methods pm I Java Element element result add All found  collectTypes IProgressMonitor CoreException InvocationTargetException computeScope IJavaElement ICompilationUnit ISourceReference IType hasSuiteMethod IType isTestType IType IJavaElement getParent ICompilationUnit ICompilationUnit ICompilationUnit IType getAllTypes hasSuiteMethod isTestType IJavaElement searchSuiteMethods IJavaElement addAll
private static Object compute Scope Object element throws Java Model Exception if element instanceof I File Editor Input element I File Editor Input element get File if element instanceof I Resource element Java Core create I Resource element if element instanceof I Class File I Class File cf I Class File element element cf get Type return element  computeScope JavaModelException IFileEditorInput IFileEditorInput getFile IResource JavaCore IResource IClassFile IClassFile IClassFile getType
private static List search Suite Methods I Progress Monitor pm I Java Element element throws Core Exception fix for bug 36449 J Unit should constrain tests to selected project J Unit I Java Search Scope scope Search Engine create Java Search Scope new I Java Element element I Java Search Scope SOURCES I Java Search Scope APPLICATION LIBRARIES Test Search Engine search Engine new Test Search Engine return search Engine search Method pm scope  searchSuiteMethods IProgressMonitor IJavaElement CoreException JUnit JUnit IJavaSearchScope SearchEngine createJavaSearchScope IJavaElement IJavaSearchScope IJavaSearchScope APPLICATION_LIBRARIES TestSearchEngine searchEngine TestSearchEngine searchEngine searchMethod
public static boolean has Suite Method I Type type throws Java Model Exception I Method method type get Method suite new String 0 NON NLS 1 if method null method exists return false if Flags is Static method get Flags Flags is Public method get Flags Flags is Public method get Declaring Type get Flags return false return true  hasSuiteMethod IType JavaModelException IMethod getMethod isStatic getFlags isPublic getFlags isPublic getDeclaringType getFlags
private static boolean is Test Type I Type type throws Java Model Exception if Flags is Abstract type get Flags return false if Flags is Public type get Flags return false I Type interfaces type new Supertype Hierarchy null get All Super Interfaces type for int i 0 i interfaces length i if interfaces i get Fully Qualified Name equals J Unit Plugin TEST INTERFACE NAME return true return false  isTestType IType JavaModelException isAbstract getFlags isPublic getFlags IType newSupertypeHierarchy getAllSuperInterfaces getFullyQualifiedName JUnitPlugin TEST_INTERFACE_NAME
public static boolean is Test Implementor I Type type throws Java Model Exception I Type Hierarchy type Hier type new Supertype Hierarchy null I Type super Interfaces type Hier get All Interfaces for int i 0 i super Interfaces length i if super Interfaces i get Fully Qualified Name equals J Unit Plugin TEST INTERFACE NAME return true return false  isTestImplementor IType JavaModelException ITypeHierarchy typeHier newSupertypeHierarchy IType superInterfaces typeHier getAllInterfaces superInterfaces superInterfaces getFullyQualifiedName JUnitPlugin TEST_INTERFACE_NAME
public static boolean is Test Or Test Suite I Type type throws Java Model Exception return has Suite Method type is Test Type type  isTestOrTestSuite IType JavaModelException hasSuiteMethod isTestType

public interface I About To Run Operation void about To Run Operation  IAboutToRunOperation aboutToRunOperation

private I Structured Selection f Selection public J Unit Wizard set Needs Progress Monitor true initialize Default Page Image Descriptor  IStructuredSelection fSelection JUnitWizard setNeedsProgressMonitor initializeDefaultPageImageDescriptor
see I Wizard perform Finish public abstract boolean perform Finish  IWizard performFinish performFinish
Run a runnable protected boolean finish Page I Runnable With Progress runnable I Runnable With Progress op new Workspace Modify Delegating Operation runnable try I Wizard Page pages get Pages for int i 0 i pages length i I Wizard Page page pages i if page instanceof I About To Run Operation I About To Run Operation page about To Run Operation PlatformUI get Workbench get Progress Service run InUI get Container op Resources Plugin get Workspace get Root catch Invocation Target Exception e Shell shell get Shell String title Wizard Messages get String NewJ Unit Wizard op error title NON NLS 1 String message Wizard Messages get String NewJ Unit Wizard op error message NON NLS 1 Exception Handler handle e shell title message return false catch Interrupted Exception e return false return true  finishPage IRunnableWithProgress IRunnableWithProgress WorkspaceModifyDelegatingOperation IWizardPage getPages IWizardPage IAboutToRunOperation IAboutToRunOperation aboutToRunOperation getWorkbench getProgressService runInUI getContainer ResourcesPlugin getWorkspace getRoot InvocationTargetException getShell WizardMessages getString NewJUnitWizard op_error WizardMessages getString NewJUnitWizard op_error ExceptionHandler InterruptedException
display async Exec new Runnable public void run try IDE open Editor active Page I File resource true catch Part Init Exception e J Unit Plugin log e  asyncExec openEditor activePage IFile PartInitException JUnitPlugin
protected void open Resource final I Resource resource if resource get Type I Resource FILE final I Workbench Page active Page J Unit Plugin get Active Page if active Page null final Display display Display get Default if display null display async Exec new Runnable public void run try IDE open Editor active Page I File resource true catch Part Init Exception e J Unit Plugin log e  openResource IResource getType IResource IWorkbenchPage activePage JUnitPlugin getActivePage activePage getDefault asyncExec openEditor activePage IFile PartInitException JUnitPlugin
see org eclipse ui I Workbench Wizard init org eclipse ui I Workbench org eclipse jface viewers I Structured Selection public void init I Workbench workbench I Structured Selection current Selection f Workbench workbench f Selection current Selection  IWorkbenchWizard IWorkbench IStructuredSelection IWorkbench IStructuredSelection currentSelection fWorkbench fSelection currentSelection
public I Structured Selection get Selection return f Selection  IStructuredSelection getSelection fSelection
protected void select And Reveal I Resource new Resource Basic New Resource Wizard select And Reveal new Resource f Workbench get Active Workbench Window  selectAndReveal IResource newResource BasicNewResourceWizard selectAndReveal newResource fWorkbench getActiveWorkbenchWindow
protected void init Dialog Settings I Dialog Settings plugin Settings J Unit Plugin get Default get Dialog Settings I Dialog Settings wizard Settings plugin Settings get Section DIALOG SETTINGS KEY if wizard Settings null wizard Settings new Dialog Settings DIALOG SETTINGS KEY plugin Settings add Section wizard Settings set Dialog Settings wizard Settings  initDialogSettings IDialogSettings pluginSettings JUnitPlugin getDefault getDialogSettings IDialogSettings wizardSettings pluginSettings getSection DIALOG_SETTINGS_KEY wizardSettings wizardSettings DialogSettings DIALOG_SETTINGS_KEY pluginSettings addSection wizardSettings setDialogSettings wizardSettings
protected abstract void initialize Default Page Image Descriptor  initializeDefaultPageImageDescriptor

public interface Selection Button Group Listener The dialog field has changed void group Changed Method Stubs Selection Button Group field  SelectionButtonGroupListener groupChanged MethodStubsSelectionButtonGroup
Creates a group without border public Method Stubs Selection Button Group int buttons Style String button Names int n Columns this buttons Style button Names n Columns SWT NONE  MethodStubsSelectionButtonGroup buttonsStyle buttonNames nColumns buttonsStyle buttonNames nColumns
Creates a group with border label in border Accepted button styles are SWT RADIO SWT CHECK SWT TOGGLE For border styles see code Group code public Method Stubs Selection Button Group int buttons Style String button Names int n Columns int border Style f Enabled true f Label null f Label Text NON NLS 1 Assert is True buttons Style SWT RADIO buttons Style SWT CHECK buttons Style SWT TOGGLE f Button Names button Names int n Buttons button Names length f Buttons Selected new boolean n Buttons f Buttons Enabled new boolean n Buttons for int i 0 i n Buttons i f Buttons Selected i false f Buttons Enabled i true f Main Combo Enabled true if f Buttons Style SWT RADIO f Buttons Selected 0 true f Group Border Style border Style f Group Number Of Columns n Columns 0 n Buttons n Columns f Buttons Style buttons Style  MethodStubsSelectionButtonGroup buttonsStyle buttonNames nColumns borderStyle fEnabled fLabel fLabelText isTrue buttonsStyle buttonsStyle buttonsStyle fButtonNames buttonNames nButtons buttonNames fButtonsSelected nButtons fButtonsEnabled nButtons nButtons fButtonsSelected fButtonsEnabled fMainComboEnabled fButtonsStyle fButtonsSelected fGroupBorderStyle borderStyle fGroupNumberOfColumns nColumns nButtons nColumns fButtonsStyle buttonsStyle
public void set Use Suite In Main For Text Runner boolean use Suite In Main f Use Suite In Main For Text Runner use Suite In Main  setUseSuiteInMainForTextRunner useSuiteInMain fUseSuiteInMainForTextRunner useSuiteInMain
public Control do Fill Into Grid Composite parent int n Columns assert Enough Columns n Columns if f Group Border Style SWT NONE Label label get Label Control parent label set Layout Data grid Data For Label 1 Composite buttonsgroup get Selection Buttons Group parent Grid Data gd new Grid Data gd horizontal Span n Columns 1 buttonsgroup set Layout Data gd return new Control label buttonsgroup else Composite buttonsgroup get Selection Buttons Group parent Grid Data gd new Grid Data gd horizontal Span n Columns buttonsgroup set Layout Data gd return new Control buttonsgroup  doFillIntoGrid nColumns assertEnoughColumns nColumns fGroupBorderStyle getLabelControl setLayoutData gridDataForLabel getSelectionButtonsGroup GridData GridData horizontalSpan nColumns setLayoutData getSelectionButtonsGroup GridData GridData horizontalSpan nColumns setLayoutData
see Dialog Field do Fill Into Grid public int get Number Of Controls return f Group Border Style SWT NONE 2 1  DialogField doFillIntoGrid getNumberOfControls fGroupBorderStyle
private Button create Selection Button int index Composite group Selection Listener listener Button button new Button group f Buttons Style SWT LEFT button set Font group get Font button set Text f Button Names index button set Enabled is Enabled f Buttons Enabled index button set Selection f Buttons Selected index button add Selection Listener listener button set Layout Data new Grid Data return button  createSelectionButton SelectionListener fButtonsStyle setFont getFont setText fButtonNames setEnabled isEnabled fButtonsEnabled setSelection fButtonsSelected addSelectionListener setLayoutData GridData
private Button create Main Combo int index Composite group Selection Listener listener Composite button Combo Group new Composite group 0 Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 20 layout num Columns 2 button Combo Group set Layout layout Button button new Button button Combo Group f Buttons Style SWT LEFT button set Font group get Font button set Text f Button Names index button set Enabled is Enabled f Buttons Enabled index button set Selection f Buttons Selected index button add Selection Listener listener button set Layout Data new Grid Data f Main Combo new Combo button Combo Group SWT READ ONLY f Main Combo set Items new String text ui swing ui awt ui NON NLS 1 NON NLS 2 NON NLS 3 f Main Combo select 0 f Main Combo set Enabled is Enabled f Main Combo Enabled f Main Combo set Font group get Font f Main Combo set Layout Data new Grid Data return button  createMainCombo SelectionListener buttonComboGroup GridLayout GridLayout marginHeight marginWidth numColumns buttonComboGroup setLayout buttonComboGroup fButtonsStyle setFont getFont setText fButtonNames setEnabled isEnabled fButtonsEnabled setSelection fButtonsSelected addSelectionListener setLayoutData GridData fMainCombo buttonComboGroup READ_ONLY fMainCombo setItems fMainCombo fMainCombo setEnabled isEnabled fMainComboEnabled fMainCombo setFont getFont fMainCombo setLayoutData GridData
public String get Main Method String type Name String Buffer main new String Buffer public static void main String args NON NLS 1 if is Selected 1 main append junit NON NLS 1 switch get Combo Selection case 0 main append textui NON NLS 1 break case 1 main append swingui NON NLS 1 break case 2 main append awtui NON NLS 1 break default main append textui NON NLS 1 break fix for 53352 Test case wizard generates wrong code if f Use Suite In Main For Text Runner get Combo Selection 0 main append Test Runner run type Name suite NON NLS 1 NON NLS 2 else main append Test Runner run type Name class NON NLS 1 NON NLS 2 main append n n NON NLS 1 return main to String  getMainMethod typeName StringBuffer StringBuffer isSelected getComboSelection fUseSuiteInMainForTextRunner getComboSelection TestRunner typeName TestRunner typeName toString
Returns the group widget When called the first time the widget will be created param parent composite when called the first time or code null code after public Composite get Selection Buttons Group Composite parent if f Button Composite null assert Composite Not Null parent Grid Layout layout new Grid Layout layout make Columns Equal Width true layout num Columns f Group Number Of Columns if f Group Border Style SWT NONE Group group new Group parent f Group Border Style if f Label Text null f Label Text length 0 group set Text f Label Text f Button Composite group else f Button Composite new Composite parent SWT NULL layout margin Height 0 layout margin Width 0 f Button Composite set Layout layout Selection Listener listener new Selection Listener public void widget Default Selected Selection Event e do Widget Selected e public void widget Selected Selection Event e do Widget Selected e int n Buttons f Button Names length f Buttons new Button n Buttons f Buttons 0 create Selection Button 0 f Button Composite listener f Buttons 1 create Main Combo 1 f Button Composite listener for int i 2 i n Buttons i f Buttons i create Selection Button i f Button Composite listener int n Rows n Buttons f Group Number Of Columns int n Fill Elements n Rows f Group Number Of Columns n Buttons for int i 0 i n Fill Elements i create Empty Space f Button Composite set Selection Group Listener new Selection Button Group Listener public void group Changed Method Stubs Selection Button Group field field set Enabled 1 is Enabled field is Selected 0 return f Button Composite  getSelectionButtonsGroup fButtonComposite assertCompositeNotNull GridLayout GridLayout makeColumnsEqualWidth numColumns fGroupNumberOfColumns fGroupBorderStyle fGroupBorderStyle fLabelText fLabelText setText fLabelText fButtonComposite fButtonComposite marginHeight marginWidth fButtonComposite setLayout SelectionListener SelectionListener widgetDefaultSelected SelectionEvent doWidgetSelected widgetSelected SelectionEvent doWidgetSelected nButtons fButtonNames fButtons nButtons fButtons createSelectionButton fButtonComposite fButtons createMainCombo fButtonComposite nButtons fButtons createSelectionButton fButtonComposite nRows nButtons fGroupNumberOfColumns nFillElements nRows fGroupNumberOfColumns nButtons nFillElements createEmptySpace fButtonComposite setSelectionGroupListener SelectionButtonGroupListener groupChanged MethodStubsSelectionButtonGroup setEnabled isEnabled isSelected fButtonComposite
Returns a button from the group or code null code if not yet created public Button get Selection Button int index if index 0 index f Buttons length return f Buttons index return null  getSelectionButton fButtons fButtons
private void do Widget Selected Selection Event e Button button Button e widget for int i 0 i f Buttons length i if f Buttons i button f Buttons Selected i button get Selection dialog Field Changed return  doWidgetSelected SelectionEvent fButtons fButtons fButtonsSelected getSelection dialogFieldChanged
Returns the selection state of a button contained in the group param index of the button public boolean is Selected int index if index 0 index f Buttons Selected length return f Buttons Selected index return false  isSelected fButtonsSelected fButtonsSelected
Sets the selection state of a button contained in the group public void set Selection int index boolean selected if index 0 index f Buttons Selected length if f Buttons Selected index selected f Buttons Selected index selected if f Buttons null Button button f Buttons index if is Ok To Use button button set Selection selected  setSelection fButtonsSelected fButtonsSelected fButtonsSelected fButtons fButtons isOkToUse setSelection
Returns the enabled state of a button contained in the group param index of the button public boolean is Enabled int index if index 0 index f Buttons Enabled length return f Buttons Enabled index return false  isEnabled fButtonsEnabled fButtonsEnabled
Sets the selection state of a button contained in the group public void set Enabled int index boolean enabled if index 0 index f Buttons Enabled length if f Buttons Enabled index enabled f Buttons Enabled index enabled if index 1 f Main Combo Enabled enabled if f Buttons null Button button f Buttons index if is Ok To Use button button set Enabled enabled if index 1 f Main Combo set Enabled is Enabled enabled  setEnabled fButtonsEnabled fButtonsEnabled fButtonsEnabled fMainComboEnabled fButtons fButtons isOkToUse setEnabled fMainCombo setEnabled isEnabled
protected void update Enable State if f Label null f Label set Enabled f Enabled if f Buttons null boolean enabled is Enabled for int i 0 i f Buttons length i Button button f Buttons i if is Ok To Use button button set Enabled enabled f Buttons Enabled i f Main Combo set Enabled enabled f Main Combo Enabled  updateEnableState fLabel fLabel setEnabled fEnabled fButtons isEnabled fButtons fButtons isOkToUse setEnabled fButtonsEnabled fMainCombo setEnabled fMainComboEnabled
public int get Combo Selection return f Main Combo get Selection Index  getComboSelection fMainCombo getSelectionIndex
public void set Combo Selection int index f Main Combo select index  setComboSelection fMainCombo
Sets the label of the dialog field public void set Label Text String labeltext f Label Text labeltext  setLabelText fLabelText
Defines the listener for this dialog field public final void set Selection Group Listener Selection Button Group Listener listener f Group Listener listener  setSelectionGroupListener SelectionButtonGroupListener fGroupListener
A dialog field has changed public void dialog Field Changed if f Group Listener null f Group Listener group Changed this  dialogFieldChanged fGroupListener fGroupListener groupChanged
Tries to set the focus to the dialog field Returns code true code if the dialog field can take focus To be re implemented by dialog field implementors public boolean set Focus return false  setFocus
Posts code set Focus code to the display event queue public void post Set Focus On Dialog Field Display display if display null display async Exec new Runnable public void run set Focus  setFocus postSetFocusOnDialogField asyncExec setFocus
protected static Grid Data grid Data For Label int span Grid Data gd new Grid Data gd horizontal Span span return gd  GridData gridDataForLabel GridData GridData horizontalSpan
Creates or returns the created label widget param parent The parent composite or code null code if the widget has already been created public Label get Label Control Composite parent if f Label null assert Composite Not Null parent f Label new Label parent SWT LEFT SWT WRAP f Label set Font parent get Font f Label set Enabled f Enabled if f Label Text null equals f Label Text NON NLS 1 f Label set Text f Label Text else XXX to avoid a 16 pixel wide empty label revisit f Label set Text NON NLS 1 f Label set Visible false return f Label  getLabelControl fLabel assertCompositeNotNull fLabel fLabel setFont getFont fLabel setEnabled fEnabled fLabelText fLabelText fLabel setText fLabelText fLabel setText fLabel setVisible fLabel
Creates a spacer control param parent The parent composite public static Control create Empty Space Composite parent return create Empty Space parent 1  createEmptySpace createEmptySpace
Creates a spacer control with the given span The composite is assumed to have code M Grid Layout code as layout param parent The parent composite public static Control create Empty Space Composite parent int span return Layout Util create Empty Space parent span  MGridLayout createEmptySpace LayoutUtil createEmptySpace
Tests is the control is not code null code and not disposed protected final boolean is Ok To Use Control control return control null control is Disposed  isOkToUse isDisposed
Sets the enable state of the dialog field public final void set Enabled boolean enabled if enabled f Enabled f Enabled enabled update Enable State  setEnabled fEnabled fEnabled updateEnableState
Gets the enable state of the dialog field public final boolean is Enabled return f Enabled  isEnabled fEnabled
protected final void assert Composite Not Null Composite comp Assert is Not Null comp uncreated control requested with composite null NON NLS 1  assertCompositeNotNull isNotNull
protected final void assert Enough Columns int n Columns Assert is True n Columns get Number Of Controls given number of columns is too small NON NLS 1  assertEnoughColumns nColumns isTrue nColumns getNumberOfControls

public New Test Case Creation Wizard super set Window Title Wizard Messages get String Wizard title new testcase NON NLS 1 init Dialog Settings  NewTestCaseCreationWizard setWindowTitle WizardMessages getString initDialogSettings
protected void initialize Default Page Image Descriptor try Image Descriptor id Image Descriptor create FromURL J Unit Plugin make Icon FileURL wizban newtest wiz gif NON NLS 1 set Default Page Image Descriptor id catch MalformedURL Exception e Should not happen Ignore  initializeDefaultPageImageDescriptor ImageDescriptor ImageDescriptor createFromURL JUnitPlugin makeIconFileURL newtest_wiz setDefaultPageImageDescriptor MalformedURLException
public void add Pages super add Pages f Page new New Test Case Creation Wizard Page f Page2 new New Test Case Creation Wizard Page2 f Page add Page f Page f Page init get Selection f Page2 add Page f Page2  addPages addPages fPage NewTestCaseCreationWizardPage fPage2 NewTestCaseCreationWizardPage2 fPage addPage fPage fPage getSelection fPage2 addPage fPage2
public boolean perform Finish if finish Page f Page get Runnable I Type new Class f Page get Created Type I Compilation Unit cu new Class get Compilation Unit if cu is Working Copy cu I Compilation Unit cu get Original Element I Resource resource cu get Resource if resource null select And Reveal resource open Resource resource f Page save Widget Values f Page2 save Widget Values return true return false  performFinish finishPage fPage getRunnable IType newClass fPage getCreatedType ICompilationUnit newClass getCompilationUnit isWorkingCopy ICompilationUnit getOriginalElement IResource getResource selectAndReveal openResource fPage saveWidgetValues fPage2 saveWidgetValues

public New Test Case Creation Wizard Page super true PAGE NAME f First Time true set Title Wizard Messages get String New Test Class Wiz Page title NON NLS 1 set Description Wizard Messages get String New Test Class Wiz Page description NON NLS 1 String button Names new String public static void main Strin g args NON NLS 1 Add testrunner statement to main Method Wizard Messages get String New Test Class Wiz Page method Stub test Runner NON NLS 1 Wizard Messages get String New Test Class Wiz Page method Stub set Up NON NLS 1 Wizard Messages get String New Test Class Wiz Page method Stub tear Down NON NLS 1 Wizard Messages get String New Test Class Wiz Page method Stub constructor NON NLS 1 f Method Stubs Buttons new Method Stubs Selection Button Group SWT CHECK button Names 1 f Method Stubs Buttons set Label Text Wizard Messages get String New Test Class Wiz Page method Stub label NON NLS 1 f Class To Test Completion Processor new Java Type Completion Processor false false NON NLS 1 f Class To Test Status new J Unit Status f Test Class Status new J Unit Status f Default Class To Test NON NLS 1  NewTestCaseCreationWizardPage PAGE_NAME fFirstTime setTitle WizardMessages getString NewTestClassWizPage setDescription WizardMessages getString NewTestClassWizPage buttonNames WizardMessages getString NewTestClassWizPage methodStub testRunner WizardMessages getString NewTestClassWizPage methodStub setUp WizardMessages getString NewTestClassWizPage methodStub tearDown WizardMessages getString NewTestClassWizPage methodStub fMethodStubsButtons MethodStubsSelectionButtonGroup buttonNames fMethodStubsButtons setLabelText WizardMessages getString NewTestClassWizPage fClassToTestCompletionProcessor JavaTypeCompletionProcessor fClassToTestStatus JUnitStatus fTestClassStatus JUnitStatus fDefaultClassToTest
Should be called from the wizard with the initial selection and the 2nd page of the wizard public void init I Structured Selection selection New Test Case Creation Wizard Page2 page2 f Page2 page2 I Java Element element get Initial Java Element selection init Container Page element init Type Page element do Status Update put default class to test if element null I Type class To Test null evaluate the enclosing type I Type type In Comp Unit I Type element get Ancestor I Java Element TYPE if type In Comp Unit null if type In Comp Unit get Compilation Unit null class To Test type In Comp Unit else I Compilation Unit cu I Compilation Unit element get Ancestor I Java Element COMPILATION UNIT if cu null class To Test cu find Primary Type else if element instanceof I Class File try I Class File cf I Class File element if cf is Structure Known class To Test cf get Type catch Java Model Exception e J Unit Plugin log e if class To Test null try if Test Search Engine is Test Implementor class To Test f Default Class To Test class To Test get Fully Qualified Name catch Java Model Exception e J Unit Plugin log e f Method Stubs Buttons set Selection 0 false main f Method Stubs Buttons set Selection 1 false add textrunner f Method Stubs Buttons set Enabled 1 false add text f Method Stubs Buttons set Selection 2 false set Up f Method Stubs Buttons set Selection 3 false tear Down f Method Stubs Buttons set Selection 4 false constructor  IStructuredSelection NewTestCaseCreationWizardPage2 fPage2 IJavaElement getInitialJavaElement initContainerPage initTypePage doStatusUpdate IType classToTest IType typeInCompUnit IType getAncestor IJavaElement typeInCompUnit typeInCompUnit getCompilationUnit classToTest typeInCompUnit ICompilationUnit ICompilationUnit getAncestor IJavaElement COMPILATION_UNIT classToTest findPrimaryType IClassFile IClassFile IClassFile isStructureKnown classToTest getType JavaModelException JUnitPlugin classToTest TestSearchEngine isTestImplementor classToTest fDefaultClassToTest classToTest getFullyQualifiedName JavaModelException JUnitPlugin fMethodStubsButtons setSelection fMethodStubsButtons setSelection fMethodStubsButtons setEnabled fMethodStubsButtons setSelection setUp fMethodStubsButtons setSelection tearDown fMethodStubsButtons setSelection
see org eclipse jdt ui wizards New Container Wizard Page handle Field Changed String protected void handle Field Changed String field Name super handle Field Changed field Name if field Name equals CLASS TO TEST f Class To Test Status class To Test Class Changed else if field Name equals SUPER validate Super Class if f First Time f Test Class Status type Name Changed else if field Name equals TYPENAME f Test Class Status type Name Changed else if field Name equals PACKAGE field Name equals CONTAINER field Name equals SUPER if field Name equals PACKAGE f Package Status package Changed if f First Time validate Super Class f Class To Test Status class To Test Class Changed f Test Class Status type Name Changed if field Name equals CONTAINER validateJ Unit On Build Path do Status Update  NewContainerWizardPage handleFieldChanged handleFieldChanged fieldName handleFieldChanged fieldName fieldName CLASS_TO_TEST fClassToTestStatus classToTestClassChanged fieldName validateSuperClass fFirstTime fTestClassStatus typeNameChanged fieldName fTestClassStatus typeNameChanged fieldName fieldName fieldName fieldName fPackageStatus packageChanged fFirstTime validateSuperClass fClassToTestStatus classToTestClassChanged fTestClassStatus typeNameChanged fieldName validateJUnitOnBuildPath doStatusUpdate
validation private void do Status Update status of all used components I Status status new I Status f Container Status f Package Status f Test Class Status f Class To Test Status f Modifier Status f Super Class Status the mode severe status will be displayed and the ok button enabled disabled update Status status  doStatusUpdate IStatus IStatus fContainerStatus fPackageStatus fTestClassStatus fClassToTestStatus fModifierStatus fSuperClassStatus updateStatus
public void create Control Composite parent initialize Dialog Units parent Composite composite new Composite parent SWT NONE int n Columns 4 Grid Layout layout new Grid Layout layout num Columns n Columns composite set Layout layout create Container Controls composite n Columns create Package Controls composite n Columns create Separator composite n Columns create Type Name Controls composite n Columns create Super Class Controls composite n Columns create Method Stub Selection Controls composite n Columns set Super Class J Unit Plugin TEST SUPERCLASS NAME true create Separator composite n Columns create Class To Test Controls composite n Columns set Control composite set default and focus if f Default Class To Test length 0 f Class To Test Text set Text f Default Class To Test set Type Name Signature get Simple Name f Default Class To Test TEST SUFFIX true restore Widget Values Dialog apply Dialog Font composite Workbench Help set Help composite IJ Unit Help Context Ids NEW TESTCASE WIZARD PAGE  createControl initializeDialogUnits nColumns GridLayout GridLayout numColumns nColumns setLayout createContainerControls nColumns createPackageControls nColumns createSeparator nColumns createTypeNameControls nColumns createSuperClassControls nColumns createMethodStubSelectionControls nColumns setSuperClass JUnitPlugin TEST_SUPERCLASS_NAME createSeparator nColumns createClassToTestControls nColumns setControl fDefaultClassToTest fClassToTestText setText fDefaultClassToTest setTypeName getSimpleName fDefaultClassToTest TEST_SUFFIX restoreWidgetValues applyDialogFont WorkbenchHelp setHelp IJUnitHelpContextIds NEW_TESTCASE_WIZARD_PAGE
private void create Method Stub Selection Controls Composite composite int n Columns Layout Util set Horizontal Span f Method Stubs Buttons get Label Control composite n Columns Layout Util create Empty Space composite 1 Layout Util set Horizontal Span f Method Stubs Buttons get Selection Buttons Group composite n Columns 1  createMethodStubSelectionControls nColumns LayoutUtil setHorizontalSpan fMethodStubsButtons getLabelControl nColumns LayoutUtil createEmptySpace LayoutUtil setHorizontalSpan fMethodStubsButtons getSelectionButtonsGroup nColumns
private void create Class To Test Controls Composite composite int n Columns f Class To Test Label new Label composite SWT LEFT SWT WRAP f Class To Test Label set Font composite get Font f Class To Test Label set Text Wizard Messages get String New Test Class Wiz Page class to test label NON NLS 1 Grid Data gd new Grid Data gd horizontal Span 1 f Class To Test Label set Layout Data gd f Class To Test Text new Text composite SWT SINGLE SWT BORDER f Class To Test Text set Enabled true f Class To Test Text set Font composite get Font f Class To Test Text add Modify Listener new Modify Listener public void modify Text Modify Event e handle Field Changed CLASS TO TEST gd new Grid Data gd horizontal Alignment Grid Data FILL gd grab Excess Horizontal Space true gd horizontal Span n Columns 2 f Class To Test Text set Layout Data gd f Class To Test Button new Button composite SWT PUSH f Class To Test Button set Text Wizard Messages get String New Test Class Wiz Page class to test browse NON NLS 1 f Class To Test Button set Enabled true f Class To Test Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e class To Test Button Pressed public void widget Selected Selection Event e class To Test Button Pressed gd new Grid Data gd horizontal Alignment Grid Data FILL gd grab Excess Horizontal Space false gd horizontal Span 1 gd height Hint SWT Util get Button Height Hint f Class To Test Button gd width Hint SWT Util get Button Width Hint f Class To Test Button f Class To Test Button set Layout Data gd Control Content Assist Helper create Text Content Assistant f Class To Test Text f Class To Test Completion Processor  createClassToTestControls nColumns fClassToTestLabel fClassToTestLabel setFont getFont fClassToTestLabel setText WizardMessages getString NewTestClassWizPage class_to_test GridData GridData horizontalSpan fClassToTestLabel setLayoutData fClassToTestText fClassToTestText setEnabled fClassToTestText setFont getFont fClassToTestText addModifyListener ModifyListener modifyText ModifyEvent handleFieldChanged CLASS_TO_TEST GridData horizontalAlignment GridData grabExcessHorizontalSpace horizontalSpan nColumns fClassToTestText setLayoutData fClassToTestButton fClassToTestButton setText WizardMessages getString NewTestClassWizPage class_to_test fClassToTestButton setEnabled fClassToTestButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent classToTestButtonPressed widgetSelected SelectionEvent classToTestButtonPressed GridData horizontalAlignment GridData grabExcessHorizontalSpace horizontalSpan heightHint SWTUtil getButtonHeightHint fClassToTestButton widthHint SWTUtil getButtonWidthHint fClassToTestButton fClassToTestButton setLayoutData ControlContentAssistHelper createTextContentAssistant fClassToTestText fClassToTestCompletionProcessor
private void class To Test Button Pressed I Type type choose Class To Test Type if type null f Class To Test Text set Text Java Model Util get Fully Qualified Name type handle Field Changed CLASS TO TEST  classToTestButtonPressed IType chooseClassToTestType fClassToTestText setText JavaModelUtil getFullyQualifiedName handleFieldChanged CLASS_TO_TEST
private I Type choose Class To Test Type I Package Fragment Root root get Package Fragment Root if root null return null I Java Element elements new I Java Element root get Java Project I Java Search Scope scope Search Engine create Java Search Scope elements I Type type null try Selection Dialog dialog JavaUI create Type Dialog get Shell get Wizard get Container scope I Java Element Search Constants CONSIDER CLASSES false get Class To Test Text dialog set Title Wizard Messages get String New Test Class Wiz Page class to test dialog title NON NLS 1 dialog set Message Wizard Messages get String New Test Class Wiz Page class to test dialog message NON NLS 1 dialog open if dialog get Return Code Window OK return type else Object result Array dialog get Result if result Array null result Array length 0 type I Type result Array 0 catch Java Model Exception e J Unit Plugin log e return type  IType chooseClassToTestType IPackageFragmentRoot getPackageFragmentRoot IJavaElement IJavaElement getJavaProject IJavaSearchScope SearchEngine createJavaSearchScope IType SelectionDialog createTypeDialog getShell getWizard getContainer IJavaElementSearchConstants CONSIDER_CLASSES getClassToTestText setTitle WizardMessages getString NewTestClassWizPage class_to_test setMessage WizardMessages getString NewTestClassWizPage class_to_test getReturnCode resultArray getResult resultArray resultArray IType resultArray JavaModelException JUnitPlugin
protected I Status package Changed I Status status super package Changed f Class To Test Completion Processor set Package Fragment get Package Fragment return status  IStatus packageChanged IStatus packageChanged fClassToTestCompletionProcessor setPackageFragment getPackageFragment
private I Status class To Test Class Changed f Class To Test Button set Enabled get Package Fragment Root null sets the test class field I Status status validate Class To Test return status  IStatus classToTestClassChanged fClassToTestButton setEnabled getPackageFragmentRoot IStatus validateClassToTest
Returns the content of the class to test text field public String get Class To Test Text return f Class To Test Text get Text  getClassToTestText fClassToTestText getText
Returns the class to be tested public I Type get Class To Test return f Class To Test  IType getClassToTest fClassToTest
Sets the name of the class to test public void set Class To Test String name f Class To Test Text set Text name  setClassToTest fClassToTestText setText
see New Type Wizard Page create Type Members I Type Imports Manager I Progress Monitor protected void create Type Members I Type type Imports Manager imports I Progress Monitor monitor throws Core Exception f Index Of First Test Method 0 if f Method Stubs Buttons is Selected 0 create Main type if f Method Stubs Buttons is Selected 2 create Set Up type imports if f Method Stubs Buttons is Selected 3 create Tear Down type imports if f Method Stubs Buttons is Selected 4 create Constructor type imports if f Class To Test null create Test Method Stubs type  NewTypeWizardPage createTypeMembers IType ImportsManager IProgressMonitor createTypeMembers IType ImportsManager IProgressMonitor CoreException fIndexOfFirstTestMethod fMethodStubsButtons isSelected createMain fMethodStubsButtons isSelected createSetUp fMethodStubsButtons isSelected createTearDown fMethodStubsButtons isSelected createConstructor fClassToTest createTestMethodStubs
private void create Constructor I Type type Imports Manager imports throws Java Model Exception I Type Hierarchy type Hierarchy null I Type super Types null String constr NON NLS 1 I Method method Template null if type exists type Hierarchy type new Supertype Hierarchy null super Types type Hierarchy get All Superclasses type for int i 0 i super Types length i if super Types i exists I Method constr Method super Types i get Method super Types i get Element Name new String Ljava lang String NON NLS 1 if constr Method exists constr Method is Constructor method Template constr Method break Code Generation Settings settings Java Preferences Settings get Code Generation Settings if method Template null Gen Stub Settings gen Stub Settings new Gen Stub Settings settings gen Stub Settings f Call Super true gen Stub Settings f Method Overwrites true constr J Unit Stub Utility gen Stub get Type Name method Template gen Stub Settings imports else constr public get Type Name String name NON NLS 1 NON NLS 2 get Line Delimiter super name NON NLS 1 get Line Delimiter NON NLS 1 get Line Delimiter get Line Delimiter type create Method constr null true null f Index Of First Test Method  createConstructor IType ImportsManager JavaModelException ITypeHierarchy typeHierarchy IType superTypes IMethod methodTemplate typeHierarchy newSupertypeHierarchy superTypes typeHierarchy getAllSuperclasses superTypes superTypes IMethod constrMethod superTypes getMethod superTypes getElementName constrMethod constrMethod isConstructor methodTemplate constrMethod CodeGenerationSettings JavaPreferencesSettings getCodeGenerationSettings methodTemplate GenStubSettings genStubSettings GenStubSettings genStubSettings fCallSuper genStubSettings fMethodOverwrites JUnitStubUtility genStub getTypeName methodTemplate genStubSettings getTypeName getLineDelimiter getLineDelimiter getLineDelimiter getLineDelimiter createMethod fIndexOfFirstTestMethod
private void create Main I Type type throws Java Model Exception type create Method f Main Method null false null f Index Of First Test Method  createMain IType JavaModelException createMethod fMainMethod fIndexOfFirstTestMethod
private void create Set Up I Type type Imports Manager imports throws Java Model Exception I Type Hierarchy type Hierarchy null I Type super Types null String set Up NON NLS 1 I Method method Template null if type exists type Hierarchy type new Supertype Hierarchy null super Types type Hierarchy get All Superclasses type for int i 0 i super Types length i if super Types i exists I Method test Method super Types i get Method SETUP new String if test Method exists method Template test Method break Code Generation Settings settings Java Preferences Settings get Code Generation Settings if method Template null Gen Stub Settings gen Stub Settings new Gen Stub Settings settings gen Stub Settings f Call Super true gen Stub Settings f Method Overwrites true set Up J Unit Stub Utility gen Stub get Type Name method Template gen Stub Settings imports else if settings create Comments set Up NON NLS 1 get Line Delimiter Sets up the fixture for example open a network connection NON NLS 1 get Line Delimiter This method is called before a test is executed NON NLS 1 get Line Delimiter throws Exception NON NLS 1 get Line Delimiter NON NLS 1 get Line Delimiter set Up protected void SETUP throws Exception NON NLS 1 NON NLS 2 get Line Delimiter get Line Delimiter type create Method set Up null false null f Index Of First Test Method  createSetUp IType ImportsManager JavaModelException ITypeHierarchy typeHierarchy IType superTypes setUp IMethod methodTemplate typeHierarchy newSupertypeHierarchy superTypes typeHierarchy getAllSuperclasses superTypes superTypes IMethod testMethod superTypes getMethod testMethod methodTemplate testMethod CodeGenerationSettings JavaPreferencesSettings getCodeGenerationSettings methodTemplate GenStubSettings genStubSettings GenStubSettings genStubSettings fCallSuper genStubSettings fMethodOverwrites setUp JUnitStubUtility genStub getTypeName methodTemplate genStubSettings createComments setUp getLineDelimiter getLineDelimiter getLineDelimiter getLineDelimiter getLineDelimiter setUp getLineDelimiter getLineDelimiter createMethod setUp fIndexOfFirstTestMethod
private void create Tear Down I Type type Imports Manager imports throws Java Model Exception I Type Hierarchy type Hierarchy null I Type super Types null String tear Down NON NLS 1 I Method method Template null if type exists if type Hierarchy null type Hierarchy type new Supertype Hierarchy null super Types type Hierarchy get All Superclasses type for int i 0 i super Types length i if super Types i exists I Method testM super Types i get Method TEARDOWN new String if testM exists method Template testM break Code Generation Settings settings Java Preferences Settings get Code Generation Settings if method Template null Gen Stub Settings gen Stub Settings new Gen Stub Settings settings gen Stub Settings f Call Super true gen Stub Settings f Method Overwrites true tear Down J Unit Stub Utility gen Stub get Type Name method Template gen Stub Settings imports type create Method tear Down null false null f Index Of First Test Method  createTearDown IType ImportsManager JavaModelException ITypeHierarchy typeHierarchy IType superTypes tearDown IMethod methodTemplate typeHierarchy typeHierarchy newSupertypeHierarchy superTypes typeHierarchy getAllSuperclasses superTypes superTypes IMethod superTypes getMethod methodTemplate CodeGenerationSettings JavaPreferencesSettings getCodeGenerationSettings methodTemplate GenStubSettings genStubSettings GenStubSettings genStubSettings fCallSuper genStubSettings fMethodOverwrites tearDown JUnitStubUtility genStub getTypeName methodTemplate genStubSettings createMethod tearDown fIndexOfFirstTestMethod
private void create Test Method Stubs I Type type throws Java Model Exception I Method methods f Page2 get Checked Methods if methods length 0 return find overloaded methods I Method all Methods Array f Page2 get All Methods List all Methods new Array List all Methods add All Arrays as List all Methods Array List overloaded Methods get Oveloaded Methods all Methods used when for example both sum and Sum methods are present Then sum test Sum Sum test Sum1 List new Methods Names new Array List for int i 0 i methods length i I Method tested Method methods i String element Name tested Method get Element Name String Buffer method Name new String Buffer New Test Case Creation Wizard Page2 PREFIX Character to Upper Case element Name char At 0 element Name substring 1 String Buffer new Method new String Buffer if overloaded Methods contains tested Method append Method Comment new Method tested Method String params tested Method get Parameter Types append Parameter Names To Method Name method Name params Should I for examples have methods void foo java lang String Buffer sb void foo mypackage1 String Buffer sb void foo mypackage2 String Buffer sb I will get in the test class test Foo String Buffer test Foo String Buffer1 test Foo String Buffer2 if new Methods Names contains method Name to String int suffix 1 while new Methods Names contains method Name to String Integer to String suffix suffix method Name append Integer to String suffix new Methods Names add method Name to String new Method append public NON NLS 1 if f Page2 get Create Final Method Stubs Button Selection new Method append final NON NLS 1 new Method append void NON NLS 1 new Method append method Name to String new Method append NON NLS 1 append Test Method Body new Method tested Method type create Method new Method to String null false null  createTestMethodStubs IType JavaModelException IMethod fPage2 getCheckedMethods IMethod allMethodsArray fPage2 getAllMethods allMethods ArrayList allMethods addAll asList allMethodsArray overloadedMethods getOveloadedMethods allMethods testSum testSum1 newMethodsNames ArrayList IMethod testedMethod elementName testedMethod getElementName StringBuffer methodName StringBuffer NewTestCaseCreationWizardPage2 toUpperCase elementName charAt elementName StringBuffer newMethod StringBuffer overloadedMethods testedMethod appendMethodComment newMethod testedMethod testedMethod getParameterTypes appendParameterNamesToMethodName methodName StringBuffer StringBuffer StringBuffer testFooStringBuffer testFooStringBuffer1 testFooStringBuffer2 newMethodsNames methodName toString newMethodsNames methodName toString toString methodName toString newMethodsNames methodName toString newMethod fPage2 getCreateFinalMethodStubsButtonSelection newMethod newMethod newMethod methodName toString newMethod appendTestMethodBody newMethod testedMethod createMethod newMethod toString
private String get Line Delimiter I Type class To Test get Class To Test if class To Test null class To Test exists return J Unit Stub Utility get Line Delimiter Used class To Test else return J Unit Stub Utility get Line Delimiter Used get Package Fragment  getLineDelimiter IType classToTest getClassToTest classToTest classToTest JUnitStubUtility getLineDelimiterUsed classToTest JUnitStubUtility getLineDelimiterUsed getPackageFragment
private void append Test Method Body String Buffer new Method I Method tested Method new Method append NON NLS 1 if create Tasks new Method append get Line Delimiter new Method append NON NLS 1 new Method append J Unit Stub Utility get Todo Task Tag get Package Fragment get Java Project new Method append Wizard Messages get Formatted String New Test Class Wiz Page marker message tested Method get Element Name NON NLS 1 new Method append get Line Delimiter new Method append append get Line Delimiter append get Line Delimiter NON NLS 1  appendTestMethodBody StringBuffer newMethod IMethod testedMethod newMethod createTasks newMethod getLineDelimiter newMethod newMethod JUnitStubUtility getTodoTaskTag getPackageFragment getJavaProject newMethod WizardMessages getFormattedString NewTestClassWizPage testedMethod getElementName newMethod getLineDelimiter newMethod getLineDelimiter getLineDelimiter
public void append Parameter Names To Method Name String Buffer method Name String params for int i 0 i params length i String param params i method Name append Signature get Simple Name Signature to String Signature get Element Type param for int j 0 array Count Signature get Array Count param j array Count j method Name append Array NON NLS 1  appendParameterNamesToMethodName StringBuffer methodName methodName getSimpleName toString getElementType arrayCount getArrayCount arrayCount methodName
private void append Method Comment String Buffer new Method I Method method throws Java Model Exception String return Type Signature to String method get Return Type String body Wizard Messages get Formatted String New Test Class Wiz Page comment class to test new String return Type method get Element Name NON NLS 1 new Method append NON NLS 1 new Method append get Line Delimiter new Method append NON NLS 1 new Method append body new Method append NON NLS 1 String param Types method get Parameter Types if param Types length 0 if param Types length 1 for int j 0 j param Types length 1 j new Method append Signature to String param Types j NON NLS 1 new Method append Signature to String param Types param Types length 1 new Method append NON NLS 1 new Method append get Line Delimiter new Method append NON NLS 1 new Method append get Line Delimiter  appendMethodComment StringBuffer newMethod IMethod JavaModelException returnType toString getReturnType WizardMessages getFormattedString NewTestClassWizPage class_to_test returnType getElementName newMethod newMethod getLineDelimiter newMethod newMethod newMethod paramTypes getParameterTypes paramTypes paramTypes paramTypes newMethod toString paramTypes newMethod toString paramTypes paramTypes newMethod newMethod getLineDelimiter newMethod newMethod getLineDelimiter
private List get Oveloaded Methods List all Methods List overloaded Methods new Array List for int i 0 i all Methods size i I Method current I Method all Methods get i String current Name current get Element Name boolean current Added false for List Iterator iter all Methods list Iterator i 1 iter has Next I Method iter Method I Method iter next if iter Method get Element Name equals current Name method is overloaded if current Added overloaded Methods add current current Added true overloaded Methods add iter Method iter remove return overloaded Methods  getOveloadedMethods allMethods overloadedMethods ArrayList allMethods IMethod IMethod allMethods currentName getElementName currentAdded ListIterator allMethods listIterator hasNext IMethod iterMethod IMethod iterMethod getElementName currentName currentAdded overloadedMethods currentAdded overloadedMethods iterMethod overloadedMethods
see org eclipse jface dialogs Dialog Page set Visible boolean public void set Visible boolean visible super set Visible visible if visible f First Time if get Class To Test Text equals NON NLS 1 set Page Complete false else handle Field Changed CLASS TO TEST creates error message when wizard is opened if Test Case already exists f First Time false if visible set Focus  DialogPage setVisible setVisible setVisible fFirstTime getClassToTestText setPageComplete handleFieldChanged CLASS_TO_TEST TestCase fFirstTime setFocus
private void validateJ Unit On Build Path I Package Fragment Root root get Package Fragment Root if root null return I Java Project jp root get Java Project try if jp find Type J Unit Plugin TEST SUPERCLASS NAME null return catch Java Model Exception e if Message Dialog open Question get Shell Wizard Messages get String New Test Class Wiz Page not on buildpath title Wizard Messages get String New Test Class Wiz Page not on buildpath message NON NLS 1 NON NLS 2 try addJ Unit To Build Path get Shell jp return catch Java Model Exception e Error Dialog open Error get Shell Wizard Messages get String New Test Class Wiz Page cannot add title Wizard Messages get String New Test Class Wiz Page cannot add message e get Status NON NLS 1 NON NLS 2 J Unit Status status new J Unit Status status set Warning Wizard Messages get String New Test Class Wiz Page error junit Not Onbuildpath NON NLS 1 f Container Status status  validateJUnitOnBuildPath IPackageFragmentRoot getPackageFragmentRoot IJavaProject getJavaProject findType JUnitPlugin TEST_SUPERCLASS_NAME JavaModelException MessageDialog openQuestion getShell WizardMessages getString NewTestClassWizPage not_on_buildpath WizardMessages getString NewTestClassWizPage not_on_buildpath addJUnitToBuildPath getShell JavaModelException ErrorDialog openError getShell WizardMessages getString NewTestClassWizPage cannot_add WizardMessages getString NewTestClassWizPage cannot_add getStatus JUnitStatus JUnitStatus setWarning WizardMessages getString NewTestClassWizPage junitNotOnbuildpath fContainerStatus
public static void addJ Unit To Build Path Shell shell I Java Project project throws Java Model Exception I Project junit Project Resources Plugin get Workspace get Root get Project org junit NON NLS 1 I Classpath Entry entry if junit Project exists entry Java Core new Project Entry junit Project get Full Path else I Path junit Home new Path J Unit Plugin JUNIT HOME I Path source Home new Path ECLIPSE HOME NON NLS 1 entry Java Core new Variable Entry junit Home append junit jar NON NLS 1 TODO find a better solution than declaring a classpath variable source Home append plugins org eclipse jdt source 3 0 0 src org junit 3 8 1 junitsrc zip NON NLS 1 null add To Classpath shell project entry  addJUnitToBuildPath IJavaProject JavaModelException IProject junitProject ResourcesPlugin getWorkspace getRoot getProject IClasspathEntry junitProject JavaCore newProjectEntry junitProject getFullPath IPath junitHome JUnitPlugin JUNIT_HOME IPath sourceHome ECLIPSE_HOME JavaCore newVariableEntry junitHome sourceHome source_3 junit_3 addToClasspath
private static void add To Classpath Shell shell final I Java Project project I Classpath Entry entry throws Java Model Exception I Classpath Entry old Entries project get Raw Classpath for int i 0 i old Entries length i if old Entries i equals entry return int n Entries old Entries length final I Classpath Entry new Entries new I Classpath Entry n Entries 1 System arraycopy old Entries 0 new Entries 0 n Entries new Entries n Entries entry fix for 64974 OCE in New J Unit Test Case wizard while workspace is locked J Unit try PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try project set Raw Classpath new Entries monitor catch Java Model Exception e throw new Invocation Target Exception e catch Invocation Target Exception e Throwable t e get Target Exception if t instanceof Core Exception Error Dialog open Error shell Wizard Messages get String New Test Class Wiz Page cannot add title Wizard Messages get String New Test Class Wiz Page cannot add message Core Exception t get Status NON NLS 1 NON NLS 2 catch Interrupted Exception e return  addToClasspath IJavaProject IClasspathEntry JavaModelException IClasspathEntry oldEntries getRawClasspath oldEntries oldEntries nEntries oldEntries IClasspathEntry newEntries IClasspathEntry nEntries oldEntries newEntries nEntries newEntries nEntries JUnit JUnit getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException setRawClasspath newEntries JavaModelException InvocationTargetException InvocationTargetException getTargetException CoreException ErrorDialog openError WizardMessages getString NewTestClassWizPage cannot_add WizardMessages getString NewTestClassWizPage cannot_add CoreException getStatus InterruptedException
Returns the index of the first method that is a test method i e excluding main set Up and tear Down If none of the aforementioned method stubs is created then 0 is returned As such method stubs are created this counter is incremented public int get Index Of First Method return f Index Of First Test Method  setUp tearDown getIndexOfFirstMethod fIndexOfFirstTestMethod
private boolean create Tasks return f Page2 get Create Tasks Button Selection  createTasks fPage2 getCreateTasksButtonSelection
private void validate Super Class f Method Stubs Buttons set Enabled 2 true enable set Up checkbox f Method Stubs Buttons set Enabled 3 true enable tear Down checkbox String super Class Name get Super Class if super Class Name null super Class Name trim equals NON NLS 1 f Super Class Status new J Unit Status J Unit Status f Super Class Status set Error Wizard Messages get String New Test Class Wiz Page error superclass empty NON NLS 1 return if get Package Fragment Root null NON NLS 1 try I Type type resolve Class Name To Type get Package Fragment Root get Java Project get Package Fragment super Class Name J Unit Status status new J Unit Status if type null TODO is this a warning or error status set Warning Wizard Messages get String New Test Class Wiz Page error superclass not exist NON NLS 1 f Super Class Status status else if type is Interface status set Error Wizard Messages get String New Test Class Wiz Page error superclass is interface NON NLS 1 f Super Class Status status if Test Search Engine is Test Implementor type status set Error Wizard Messages get Formatted String New Test Class Wiz Page error superclass not implementing test interface J Unit Plugin TEST INTERFACE NAME NON NLS 1 f Super Class Status status else I Method setup Method type get Method SETUP new String I Method teardown Method type get Method TEARDOWN new String if setup Method exists f Method Stubs Buttons set Enabled 2 Flags is Final setup Method get Flags if teardown Method exists f Method Stubs Buttons set Enabled 3 Flags is Final teardown Method get Flags catch Java Model Exception e J Unit Plugin log e  validateSuperClass fMethodStubsButtons setEnabled setUp fMethodStubsButtons setEnabled tearDown superClassName getSuperClass superClassName superClassName fSuperClassStatus JUnitStatus JUnitStatus fSuperClassStatus setError WizardMessages getString NewTestClassWizPage getPackageFragmentRoot IType resolveClassNameToType getPackageFragmentRoot getJavaProject getPackageFragment superClassName JUnitStatus JUnitStatus setWarning WizardMessages getString NewTestClassWizPage not_exist fSuperClassStatus isInterface setError WizardMessages getString NewTestClassWizPage is_interface fSuperClassStatus TestSearchEngine isTestImplementor setError WizardMessages getFormattedString NewTestClassWizPage not_implementing_test_interface JUnitPlugin TEST_INTERFACE_NAME fSuperClassStatus IMethod setupMethod getMethod IMethod teardownMethod getMethod setupMethod fMethodStubsButtons setEnabled isFinal setupMethod getFlags teardownMethod fMethodStubsButtons setEnabled isFinal teardownMethod getFlags JavaModelException JUnitPlugin
see org eclipse jface wizard I Wizard Page can Flip To Next Page public boolean can Flip To Next Page return is Page Complete get Next Page null is Next Page Valid  IWizardPage canFlipToNextPage canFlipToNextPage isPageComplete getNextPage isNextPageValid
protected boolean is Next Page Valid return get Class To Test Text equals NON NLS 1  isNextPageValid getClassToTestText
private J Unit Status validate Class To Test I Package Fragment Root root get Package Fragment Root I Package Fragment pack get Package Fragment String class To Test Name get Class To Test Text J Unit Status status new J Unit Status f Class To Test null if class To Test Name length 0 return status I Status val Java Conventions validate Java Type Name class To Test Name if val isOK if val get Severity I Status ERROR status set Error Wizard Messages get String New Test Class Wiz Page error class to test not valid NON NLS 1 return status if root null try I Type type resolve Class Name To Type root get Java Project pack class To Test Name if type null status set Warning Warning type Label does not exist in current project status set Error Wizard Messages get String New Test Class Wiz Page error class to test not exist NON NLS 1 return status else if type is Interface status set Warning Wizard Messages get Formatted String New Test Class Wiz Page warning class to test is interface class To Test Name NON NLS 1 if pack null Java Model Util is Visible type pack status set Warning Wizard Messages get Formatted String New Test Class Wiz Page warning class to test not visible new String type is Interface Wizard Messages get String Interface Wizard Messages get String Class class To Test Name NON NLS 1 NON NLS 2 NON NLS 3 f Class To Test type catch Java Model Exception e status set Error Wizard Messages get String New Test Class Wiz Page error class to test not valid NON NLS 1 else status set Error NON NLS 1 return status  JUnitStatus validateClassToTest IPackageFragmentRoot getPackageFragmentRoot IPackageFragment getPackageFragment classToTestName getClassToTestText JUnitStatus JUnitStatus fClassToTest classToTestName IStatus JavaConventions validateJavaTypeName classToTestName getSeverity IStatus setError WizardMessages getString NewTestClassWizPage class_to_test not_valid IType resolveClassNameToType getJavaProject classToTestName setWarning typeLabel setError WizardMessages getString NewTestClassWizPage class_to_test not_exist isInterface setWarning WizardMessages getFormattedString NewTestClassWizPage class_to_test is_interface classToTestName JavaModelUtil isVisible setWarning WizardMessages getFormattedString NewTestClassWizPage class_to_test not_visible isInterface WizardMessages getString WizardMessages getString classToTestName fClassToTest JavaModelException setError WizardMessages getString NewTestClassWizPage class_to_test not_valid setError
private I Type resolve Class Name To Type I Java Project jproject I Package Fragment pack String class To Test Name throws Java Model Exception I Type type null if type null pack null String pack Name pack get Element Name search in own package if pack is Default Package type jproject find Type pack Name class To Test Name search in java lang if type null java lang equals pack Name NON NLS 1 type jproject find Type java lang class To Test Name NON NLS 1 search fully qualified if type null type jproject find Type class To Test Name return type  IType resolveClassNameToType IJavaProject IPackageFragment classToTestName JavaModelException IType packName getElementName isDefaultPackage findType packName classToTestName packName findType classToTestName findType classToTestName
Use the dialog store to restore widget values to the values that they held last time this wizard was used to completion private void restore Widget Values I Dialog Settings settings get Dialog Settings if settings null boolean generate Main settings get Boolean STORE GENERATE MAIN f Method Stubs Buttons set Selection 0 generate Main f Method Stubs Buttons set Enabled 1 generate Main f Method Stubs Buttons set Selection 1 settings get Boolean STORE USE TESTRUNNER try f Method Stubs Buttons set Combo Selection settings get Int STORE TESTRUNNER TYPE catch Number Format Exception e  restoreWidgetValues IDialogSettings getDialogSettings generateMain getBoolean STORE_GENERATE_MAIN fMethodStubsButtons setSelection generateMain fMethodStubsButtons setEnabled generateMain fMethodStubsButtons setSelection getBoolean STORE_USE_TESTRUNNER fMethodStubsButtons setComboSelection getInt STORE_TESTRUNNER_TYPE NumberFormatException
Since Finish was pressed write widget values to the dialog store so that they will persist into the next invocation of this wizard page void save Widget Values I Dialog Settings settings get Dialog Settings if settings null settings put STORE GENERATE MAIN f Method Stubs Buttons is Selected 0 settings put STORE USE TESTRUNNER f Method Stubs Buttons is Selected 1 settings put STORE TESTRUNNER TYPE f Method Stubs Buttons get Combo Selection  saveWidgetValues IDialogSettings getDialogSettings STORE_GENERATE_MAIN fMethodStubsButtons isSelected STORE_USE_TESTRUNNER fMethodStubsButtons isSelected STORE_TESTRUNNER_TYPE fMethodStubsButtons getComboSelection
public void about To Run Operation f Main Method f Method Stubs Buttons get Main Method get Type Name  aboutToRunOperation fMainMethod fMethodStubsButtons getMainMethod getTypeName

Constructor for New Test Case Creation Wizard Page2 protected New Test Case Creation Wizard Page2 New Test Case Creation Wizard Page first Page super PAGE NAME f First Page first Page set Title Wizard Messages get String New Test Class Wiz Page2 title NON NLS 1 set Description Wizard Messages get String New Test Class Wiz Page2 description NON NLS 1  NewTestCaseCreationWizardPage2 NewTestCaseCreationWizardPage2 NewTestCaseCreationWizardPage firstPage PAGE_NAME fFirstPage firstPage setTitle WizardMessages getString NewTestClassWizPage2 setDescription WizardMessages getString NewTestClassWizPage2
see org eclipse jface dialogs I Dialog Page create Control Composite public void create Control Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 container set Layout layout create Methods Tree Controls container create Spacer container create Button Choices container set Control container restore Widget Values Dialog apply Dialog Font container Workbench Help set Help container IJ Unit Help Context Ids NEW TESTCASE WIZARD PAGE2  IDialogPage createControl createControl GridLayout GridLayout numColumns setLayout createMethodsTreeControls createSpacer createButtonChoices setControl restoreWidgetValues applyDialogFont WorkbenchHelp setHelp IJUnitHelpContextIds NEW_TESTCASE_WIZARD_PAGE2
protected void create Button Choices Composite container Grid Layout layout Grid Data gd Composite prefix Container new Composite container SWT NONE gd new Grid Data gd horizontal Alignment Grid Data FILL gd horizontal Span 1 prefix Container set Layout Data gd layout new Grid Layout layout num Columns 1 layout margin Width 0 layout margin Height 0 prefix Container set Layout layout Button buttons null null String button Names Wizard Messages get String New Test Class Wiz Page2 create final method stubs text NON NLS 1 Wizard Messages get String New Test Class Wiz Page2 create tasks text NON NLS 1 for int i 0 i buttons length i buttons i new Button prefix Container SWT CHECK SWT LEFT buttons i set Text button Names i NON NLS 1 buttons i set Enabled true buttons i set Selection true gd new Grid Data gd horizontal Alignment Grid Data FILL gd horizontal Span 1 buttons i set Layout Data gd f Create Final Method Stubs Button buttons 0 f Create Tasks Button buttons 1  createButtonChoices GridLayout GridData prefixContainer GridData horizontalAlignment GridData horizontalSpan prefixContainer setLayoutData GridLayout numColumns marginWidth marginHeight prefixContainer setLayout buttonNames WizardMessages getString NewTestClassWizPage2 create_final_method_stubs WizardMessages getString NewTestClassWizPage2 create_tasks prefixContainer setText buttonNames setEnabled setSelection GridData horizontalAlignment GridData horizontalSpan setLayoutData fCreateFinalMethodStubsButton fCreateTasksButton
f Methods Tree set Auto Expand Level 2 f Methods Tree add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event update Selected Methods Label  fMethodsTree setAutoExpandLevel fMethodsTree addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent updateSelectedMethodsLabel
f Methods Tree add Filter new Viewer Filter public boolean select Viewer viewer Object parent Element Object element if element instanceof I Method I Method method I Method element return method get Element Name equals clinit NON NLS 1 return true  fMethodsTree addFilter ViewerFilter parentElement IMethod IMethod IMethod getElementName
f Select All Button set Layout Data gd f Select All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Methods Tree set Checked Elements Object f Methods Tree get Input update Selected Methods Label  fSelectAllButton setLayoutData fSelectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fMethodsTree setCheckedElements fMethodsTree getInput updateSelectedMethodsLabel
f Deselect All Button set Layout Data gd f Deselect All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Methods Tree set Checked Elements new Object 0 update Selected Methods Label  fDeselectAllButton setLayoutData fDeselectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fMethodsTree setCheckedElements updateSelectedMethodsLabel
protected void create Methods Tree Controls Composite container Label label new Label container SWT LEFT SWT WRAP label set Font container get Font label set Text Wizard Messages get String New Test Class Wiz Page2 methods tree label NON NLS 1 Grid Data gd new Grid Data gd horizontal Span 2 label set Layout Data gd f Methods Tree new Container Checked Tree Viewer container SWT BORDER gd new Grid Data Grid Data FILL BOTH Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL gd height Hint 180 f Methods Tree get Tree set Layout Data gd f Methods Tree set Label Provider new Appearance Aware Label Provider f Methods Tree set Auto Expand Level 2 f Methods Tree add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event update Selected Methods Label f Methods Tree add Filter new Viewer Filter public boolean select Viewer viewer Object parent Element Object element if element instanceof I Method I Method method I Method element return method get Element Name equals clinit NON NLS 1 return true Composite button Container new Composite container SWT NONE gd new Grid Data Grid Data FILL VERTICAL button Container set Layout Data gd Grid Layout button Layout new Grid Layout button Layout margin Width 0 button Layout margin Height 0 button Container set Layout button Layout f Select All Button new Button button Container SWT PUSH f Select All Button set Text Wizard Messages get String New Test Class Wiz Page2 select All NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING f Select All Button set Layout Data gd f Select All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Methods Tree set Checked Elements Object f Methods Tree get Input update Selected Methods Label f Deselect All Button new Button button Container SWT PUSH f Deselect All Button set Text Wizard Messages get String New Test Class Wiz Page2 deselect All NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING f Deselect All Button set Layout Data gd f Deselect All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Methods Tree set Checked Elements new Object 0 update Selected Methods Label No of selected methods label f Selected Methods Label new Label container SWT LEFT f Selected Methods Label set Font container get Font update Selected Methods Label gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 1 f Selected Methods Label set Layout Data gd Label empty Label new Label container SWT LEFT gd new Grid Data gd horizontal Span 1 empty Label set Layout Data gd  createMethodsTreeControls setFont getFont setText WizardMessages getString NewTestClassWizPage2 methods_tree GridData GridData horizontalSpan setLayoutData fMethodsTree ContainerCheckedTreeViewer GridData GridData FILL_BOTH GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL heightHint fMethodsTree getTree setLayoutData fMethodsTree setLabelProvider AppearanceAwareLabelProvider fMethodsTree setAutoExpandLevel fMethodsTree addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent updateSelectedMethodsLabel fMethodsTree addFilter ViewerFilter parentElement IMethod IMethod IMethod getElementName buttonContainer GridData GridData FILL_VERTICAL buttonContainer setLayoutData GridLayout buttonLayout GridLayout buttonLayout marginWidth buttonLayout marginHeight buttonContainer setLayout buttonLayout fSelectAllButton buttonContainer fSelectAllButton setText WizardMessages getString NewTestClassWizPage2 selectAll GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING fSelectAllButton setLayoutData fSelectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fMethodsTree setCheckedElements fMethodsTree getInput updateSelectedMethodsLabel fDeselectAllButton buttonContainer fDeselectAllButton setText WizardMessages getString NewTestClassWizPage2 deselectAll GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING fDeselectAllButton setLayoutData fDeselectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fMethodsTree setCheckedElements updateSelectedMethodsLabel fSelectedMethodsLabel fSelectedMethodsLabel setFont getFont updateSelectedMethodsLabel GridData GridData FILL_HORIZONTAL horizontalSpan fSelectedMethodsLabel setLayoutData emptyLabel GridData horizontalSpan emptyLabel setLayoutData
protected void create Spacer Composite container Label spacer new Label container SWT NONE Grid Data data new Grid Data data horizontal Span 2 data horizontal Alignment Grid Data FILL data vertical Alignment Grid Data BEGINNING data height Hint 4 spacer set Layout Data data  createSpacer GridData GridData horizontalSpan horizontalAlignment GridData verticalAlignment GridData heightHint setLayoutData
see org eclipse jface dialogs Dialog Page set Visible boolean public void set Visible boolean visible super set Visible visible if visible f Class To Test f First Page get Class To Test I Type curr Type f Class To Test Array List types null try I Type Hierarchy hierarchy curr Type new Supertype Hierarchy null I Type super Types if curr Type is Class super Types hierarchy get All Superclasses curr Type else if curr Type is Interface super Types hierarchy get All Super Interfaces curr Type else super Types new I Type 0 types new Array List super Types length 1 types add curr Type types add All Arrays as List super Types catch Java Model Exception e J Unit Plugin log e f Methods Tree set Content Provider new Methods Tree Content Provider types to Array if types null types new Array List f Methods Tree set Input types to Array f Methods Tree set Selection new Structured Selection curr Type true update Selected Methods Label set Focus  DialogPage setVisible setVisible setVisible fClassToTest fFirstPage getClassToTest IType currType fClassToTest ArrayList ITypeHierarchy currType newSupertypeHierarchy IType superTypes currType isClass superTypes getAllSuperclasses currType currType isInterface superTypes getAllSuperInterfaces currType superTypes IType ArrayList superTypes currType addAll asList superTypes JavaModelException JUnitPlugin fMethodsTree setContentProvider MethodsTreeContentProvider toArray ArrayList fMethodsTree setInput toArray fMethodsTree setSelection StructuredSelection currType updateSelectedMethodsLabel setFocus
Returns all checked methods in the Methods tree public I Method get Checked Methods int method Count 0 for int i 0 i f Checked Objects length i if f Checked Objects i instanceof I Method method Count I Method checked Methods new I Method method Count int j 0 for int i 0 i f Checked Objects length i if f Checked Objects i instanceof I Method checked Methods j I Method f Checked Objects i j return checked Methods  IMethod getCheckedMethods methodCount fCheckedObjects fCheckedObjects IMethod methodCount IMethod checkedMethods IMethod methodCount fCheckedObjects fCheckedObjects IMethod checkedMethods IMethod fCheckedObjects checkedMethods
public Methods Tree Content Provider Object types f Types types Vector methods new Vector for int i types length 1 i 1 i Object object types i if object instanceof I Type I Type type I Type object try I Method curr Methods type get Methods for currMethods for int j 0 j curr Methods length j I Method curr Method curr Methods j int flags curr Method get Flags if Flags is Private flags for int k 0 k methods size k I Method m I Method methods get k if m get Element Name equals curr Method get Element Name m get Signature equals curr Method get Signature methods set k curr Method continue for currMethods methods add curr Method catch Java Model Exception e J Unit Plugin log e f Methods new I Method methods size methods copy Into f Methods  MethodsTreeContentProvider fTypes IType IType IType IMethod currMethods getMethods for_currMethods currMethods IMethod currMethod currMethods currMethod getFlags isPrivate IMethod IMethod getElementName currMethod getElementName getSignature currMethod getSignature currMethod for_currMethods currMethod JavaModelException JUnitPlugin fMethods IMethod copyInto fMethods
public Object get Children Object parent Element if parent Element instanceof I Type I Type parent Type I Type parent Element Array List result new Array List f Methods length for int i 0 i f Methods length i if f Methods i get Declaring Type equals parent Type result add f Methods i return result to Array return f Empty  getChildren parentElement parentElement IType IType parentType IType parentElement ArrayList ArrayList fMethods fMethods fMethods getDeclaringType parentType fMethods toArray fEmpty
public Object get Parent Object element if element instanceof I Method return I Method element get Declaring Type return null  getParent IMethod IMethod getDeclaringType
see I Tree Content Provider has Children Object public boolean has Children Object element return get Children element length 0  ITreeContentProvider hasChildren hasChildren getChildren
see I Structured Content Provider get Elements Object public Object get Elements Object input Element return f Types  IStructuredContentProvider getElements getElements inputElement fTypes
see I Content Provider dispose public void dispose  IContentProvider
see I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
public I Method get All Methods return f Methods  IMethod getAllMethods fMethods
Returns true if the checkbox for creating tasks is checked public boolean get Create Tasks Button Selection return f Create Tasks  getCreateTasksButtonSelection fCreateTasks
Returns true if the checkbox for final method stubs is checked public boolean get Create Final Method Stubs Button Selection return f Create Final Stubs  getCreateFinalMethodStubsButtonSelection fCreateFinalStubs
private void update Selected Methods Label Object checked f Methods Tree get Checked Elements int checked Method Count 0 for int i 0 i checked length i if checked i instanceof I Method checked Method Count String label NON NLS 1 if checked Method Count 1 label Wizard Messages get Formatted String New Test Class Wiz Page2 selected methods label one new Integer checked Method Count NON NLS 1 else label Wizard Messages get Formatted String New Test Class Wiz Page2 selected methods label many new Integer checked Method Count NON NLS 1 f Selected Methods Label set Text label  updateSelectedMethodsLabel fMethodsTree getCheckedElements checkedMethodCount IMethod checkedMethodCount checkedMethodCount WizardMessages getFormattedString NewTestClassWizPage2 selected_methods label_one checkedMethodCount WizardMessages getFormattedString NewTestClassWizPage2 selected_methods label_many checkedMethodCount fSelectedMethodsLabel setText
Returns all the methods in the Methods tree public I Method get All Methods return Methods Tree Content Provider f Methods Tree get Content Provider get All Methods  IMethod getAllMethods MethodsTreeContentProvider fMethodsTree getContentProvider getAllMethods
Sets the focus on the type name protected void set Focus f Methods Tree get Control set Focus  setFocus fMethodsTree getControl setFocus
Use the dialog store to restore widget values to the values that they held last time this wizard was used to completion private void restore Widget Values I Dialog Settings settings get Dialog Settings if settings null f Create Tasks Button set Selection settings get Boolean STORE USE TASKMARKER f Create Final Method Stubs Button set Selection settings get Boolean STORE CREATE FINAL METHOD STUBS  restoreWidgetValues IDialogSettings getDialogSettings fCreateTasksButton setSelection getBoolean STORE_USE_TASKMARKER fCreateFinalMethodStubsButton setSelection getBoolean STORE_CREATE_FINAL_METHOD_STUBS
Since Finish was pressed write widget values to the dialog store so that they will persist into the next invocation of this wizard page void save Widget Values I Dialog Settings settings get Dialog Settings if settings null settings put STORE USE TASKMARKER f Create Tasks Button get Selection settings put STORE CREATE FINAL METHOD STUBS f Create Final Method Stubs Button get Selection  saveWidgetValues IDialogSettings getDialogSettings STORE_USE_TASKMARKER fCreateTasksButton getSelection STORE_CREATE_FINAL_METHOD_STUBS fCreateFinalMethodStubsButton getSelection
public void about To Run Operation f Checked Objects f Methods Tree get Checked Elements f Create Final Stubs f Create Final Method Stubs Button get Selection f Create Tasks f Create Tasks Button get Selection  aboutToRunOperation fCheckedObjects fMethodsTree getCheckedElements fCreateFinalStubs fCreateFinalMethodStubsButton getSelection fCreateTasks fCreateTasksButton getSelection

public New Test Suite Creation Wizard super set Window Title Wizard Messages get String Wizard title new testsuite NON NLS 1 init Dialog Settings  NewTestSuiteCreationWizard setWindowTitle WizardMessages getString initDialogSettings
public void add Pages super add Pages f Page new New Test Suite Creation Wizard Page add Page f Page f Page init get Selection  addPages addPages fPage NewTestSuiteCreationWizardPage addPage fPage fPage getSelection
public boolean perform Finish I Package Fragment pack f Page get Package Fragment String filename f Page get Type Name java NON NLS 1 I Compilation Unit cu pack get Compilation Unit filename if cu exists I Editor Part cu ep Editor Utility is Open In Editor cu if cu ep null cu ep is Dirty boolean save Unsaved Changes Message Dialog open Question f Page get Shell Wizard Messages get String New Test Suite Wiz unsavedchanges Dialog title NON NLS 1 Wizard Messages get Formatted String New Test Suite Wiz unsavedchanges Dialog message NON NLS 1 filename if save Unsaved Changes try PlatformUI get Workbench get Progress Service busy Cursor While get Runnable Save cu ep catch Exception e J Unit Plugin log e I Type suite Type cu get Type f Page get Type Name I Method suite Method suite Type get Method suite new String NON NLS 1 if suite Method exists try I Source Range range suite Method get Source Range I Buffer buf cu get Buffer String original Content buf get Text range get Offset range get Length int start original Content index Of New Test Suite Creation Wizard Page START MARKER if start 1 int end original Content index Of New Test Suite Creation Wizard Page END MARKER start if end 0 f Page cannot Update Suite Error return false else f Page cannot Update Suite Error return false catch Java Model Exception e J Unit Plugin log e return false if finish Page f Page get Runnable if f Page has Updated Existing Class post Creating Type f Page save Widget Values return true return false  performFinish IPackageFragment fPage getPackageFragment fPage getTypeName ICompilationUnit getCompilationUnit IEditorPart cu_ep EditorUtility isOpenInEditor cu_ep cu_ep isDirty saveUnsavedChanges MessageDialog openQuestion fPage getShell WizardMessages getString NewTestSuiteWiz unsavedchangesDialog WizardMessages getFormattedString NewTestSuiteWiz unsavedchangesDialog saveUnsavedChanges getWorkbench getProgressService busyCursorWhile getRunnableSave cu_ep JUnitPlugin IType suiteType getType fPage getTypeName IMethod suiteMethod suiteType getMethod suiteMethod ISourceRange suiteMethod getSourceRange IBuffer getBuffer originalContent getText getOffset getLength originalContent indexOf NewTestSuiteCreationWizardPage START_MARKER originalContent indexOf NewTestSuiteCreationWizardPage END_MARKER fPage cannotUpdateSuiteError fPage cannotUpdateSuiteError JavaModelException JUnitPlugin finishPage fPage getRunnable fPage hasUpdatedExistingClass postCreatingType fPage saveWidgetValues
protected void post Creating Type I Type new Class f Page get Created Type if new Class null return I Compilation Unit cu new Class get Compilation Unit if cu is Working Copy cu I Compilation Unit cu get Original Element added here I Resource resource cu get Resource if resource null select And Reveal resource open Resource resource  postCreatingType IType newClass fPage getCreatedType newClass ICompilationUnit newClass getCompilationUnit isWorkingCopy ICompilationUnit getOriginalElement IResource getResource selectAndReveal openResource
public New Test Suite Creation Wizard Page get Page return f Page  NewTestSuiteCreationWizardPage getPage fPage
protected void initialize Default Page Image Descriptor try Image Descriptor id Image Descriptor create FromURL J Unit Plugin make Icon FileURL wizban newtest wiz gif NON NLS 1 set Default Page Image Descriptor id catch MalformedURL Exception e Should not happen Ignore  initializeDefaultPageImageDescriptor ImageDescriptor ImageDescriptor createFromURL JUnitPlugin makeIconFileURL newtest_wiz setDefaultPageImageDescriptor MalformedURLException
return new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception if monitor null monitor new Null Progress Monitor cu ep do Save monitor  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException NullProgressMonitor cu_ep doSave
public I Runnable With Progress get Runnable Save final I Editor Part cu ep return new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception if monitor null monitor new Null Progress Monitor cu ep do Save monitor  IRunnableWithProgress getRunnableSave IEditorPart cu_ep IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException NullProgressMonitor cu_ep doSave

public New Test Suite Creation Wizard Page super true PAGE NAME f Suite Name Status new J Unit Status f Suite Name Text Initial Value NON NLS 1 set Title Wizard Messages get String New Test Suite Wiz Page title NON NLS 1 set Description Wizard Messages get String New Test Suite Wiz Page description NON NLS 1 String button Names new String public static void main Strin g args NON NLS 1 Add testrunner statement to main Method Wizard Messages get String New Test Class Wiz Page method Stub test Runner NON NLS 1 f Method Stubs Buttons new Method Stubs Selection Button Group SWT CHECK button Names 1 f Method Stubs Buttons set Label Text Wizard Messages get String New Test Class Wiz Page2 method Stub label NON NLS 1 f Method Stubs Buttons set Use Suite In Main For Text Runner true f Classes In Suite Status new J Unit Status  NewTestSuiteCreationWizardPage PAGE_NAME fSuiteNameStatus JUnitStatus fSuiteNameTextInitialValue setTitle WizardMessages getString NewTestSuiteWizPage setDescription WizardMessages getString NewTestSuiteWizPage buttonNames WizardMessages getString NewTestClassWizPage methodStub testRunner fMethodStubsButtons MethodStubsSelectionButtonGroup buttonNames fMethodStubsButtons setLabelText WizardMessages getString NewTestClassWizPage2 fMethodStubsButtons setUseSuiteInMainForTextRunner fClassesInSuiteStatus JUnitStatus
see org eclipse jface dialogs I Dialog Page create Control Composite public void create Control Composite parent initialize Dialog Units parent Composite composite new Composite parent SWT NONE int n Columns 4 Grid Layout layout new Grid Layout layout num Columns n Columns composite set Layout layout create Container Controls composite n Columns create Package Controls composite n Columns create Separator composite n Columns create Suite Name Control composite n Columns set Type Name All Tests true NON NLS 1 create Separator composite n Columns create Classes In Suite Control composite n Columns create Method Stub Selection Controls composite n Columns set Control composite restore Widget Values Dialog apply Dialog Font composite Workbench Help set Help composite IJ Unit Help Context Ids NEW TESTSUITE WIZARD PAGE  IDialogPage createControl createControl initializeDialogUnits nColumns GridLayout GridLayout numColumns nColumns setLayout createContainerControls nColumns createPackageControls nColumns createSeparator nColumns createSuiteNameControl nColumns setTypeName AllTests createSeparator nColumns createClassesInSuiteControl nColumns createMethodStubSelectionControls nColumns setControl restoreWidgetValues applyDialogFont WorkbenchHelp setHelp IJUnitHelpContextIds NEW_TESTSUITE_WIZARD_PAGE
protected void create Method Stub Selection Controls Composite composite int n Columns Layout Util set Horizontal Span f Method Stubs Buttons get Label Control composite n Columns Layout Util create Empty Space composite 1 Layout Util set Horizontal Span f Method Stubs Buttons get Selection Buttons Group composite n Columns 1  createMethodStubSelectionControls nColumns LayoutUtil setHorizontalSpan fMethodStubsButtons getLabelControl nColumns LayoutUtil createEmptySpace LayoutUtil setHorizontalSpan fMethodStubsButtons getSelectionButtonsGroup nColumns
Should be called from the wizard with the initial selection public void init I Structured Selection selection I Java Element jelem get Initial Java Element selection init Container Page jelem init Type Page jelem do Status Update f Method Stubs Buttons set Selection 0 false main f Method Stubs Buttons set Selection 1 false add textrunner f Method Stubs Buttons set Enabled 1 false add text  IStructuredSelection IJavaElement getInitialJavaElement initContainerPage initTypePage doStatusUpdate fMethodStubsButtons setSelection fMethodStubsButtons setSelection fMethodStubsButtons setEnabled
see org eclipse jdt ui wizards New Container Wizard Page handle Field Changed String protected void handle Field Changed String field Name super handle Field Changed field Name if field Name equals PACKAGE field Name equals CONTAINER if field Name equals PACKAGE f Package Status package Changed update Classes In Suite Table else if field Name equals CLASSES IN SUITE f Classes In Suite Status classes In Suite Changed f Suite Name Status test Suite Changed must check this one too update Selected Classes Label else if field Name equals SUITE NAME f Suite Name Status test Suite Changed do Status Update  NewContainerWizardPage handleFieldChanged handleFieldChanged fieldName handleFieldChanged fieldName fieldName fieldName fieldName fPackageStatus packageChanged updateClassesInSuiteTable fieldName CLASSES_IN_SUITE fClassesInSuiteStatus classesInSuiteChanged fSuiteNameStatus testSuiteChanged updateSelectedClassesLabel fieldName SUITE_NAME fSuiteNameStatus testSuiteChanged doStatusUpdate
validation private void do Status Update status of all used components I Status status new I Status f Container Status f Package Status f Suite Name Status f Classes In Suite Status the most severe status will be displayed and the ok button enabled disabled update Status status  doStatusUpdate IStatus IStatus fContainerStatus fPackageStatus fSuiteNameStatus fClassesInSuiteStatus updateStatus
see org eclipse jface dialogs Dialog Page set Visible boolean public void set Visible boolean visible super set Visible visible if visible set Focus update Classes In Suite Table handle All Fields Changed  DialogPage setVisible setVisible setVisible setFocus updateClassesInSuiteTable handleAllFieldsChanged
private void handle All Fields Changed handle Field Changed PACKAGE handle Field Changed CONTAINER handle Field Changed CLASSES IN SUITE handle Field Changed SUITE NAME  handleAllFieldsChanged handleFieldChanged handleFieldChanged handleFieldChanged CLASSES_IN_SUITE handleFieldChanged SUITE_NAME
protected void update Classes In Suite Table if f Classes In Suite Table null I Package Fragment pack get Package Fragment if pack null I Package Fragment Root root get Package Fragment Root if root null pack root get Package Fragment NON NLS 1 else return f Classes In Suite Table set Input pack f Classes In Suite Table set All Checked true update Selected Classes Label  updateClassesInSuiteTable fClassesInSuiteTable IPackageFragment getPackageFragment IPackageFragmentRoot getPackageFragmentRoot getPackageFragment fClassesInSuiteTable setInput fClassesInSuiteTable setAllChecked updateSelectedClassesLabel
f Classes In Suite Table set Label Provider new Java Element Label Provider f Classes In Suite Table add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event handle Field Changed CLASSES IN SUITE  fClassesInSuiteTable setLabelProvider JavaElementLabelProvider fClassesInSuiteTable addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent handleFieldChanged CLASSES_IN_SUITE
f Select All Button set Layout Data bgd f Select All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Classes In Suite Table set All Checked true handle Field Changed CLASSES IN SUITE  fSelectAllButton setLayoutData fSelectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fClassesInSuiteTable setAllChecked handleFieldChanged CLASSES_IN_SUITE
f Deselect All Button set Layout Data bgd f Deselect All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Classes In Suite Table set All Checked false handle Field Changed CLASSES IN SUITE  fDeselectAllButton setLayoutData fDeselectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fClassesInSuiteTable setAllChecked handleFieldChanged CLASSES_IN_SUITE
protected void create Classes In Suite Control Composite parent int n Columns if f Classes In Suite Table null Label label new Label parent SWT LEFT label set Text Wizard Messages get String New Test Suite Wiz Page classes in suite label NON NLS 1 Grid Data gd new Grid Data gd horizontal Alignment Grid Data FILL gd horizontal Span n Columns label set Layout Data gd f Classes In Suite Table Checkbox Table Viewer new Check List parent SWT BORDER gd new Grid Data Grid Data FILL BOTH gd height Hint 80 gd horizontal Span n Columns 1 f Classes In Suite Table get Table set Layout Data gd f Classes In Suite Table set Content Provider new Classes In Suit Content Provider f Classes In Suite Table set Label Provider new Java Element Label Provider f Classes In Suite Table add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event handle Field Changed CLASSES IN SUITE Composite button Container new Composite parent SWT NONE gd new Grid Data Grid Data FILL VERTICAL button Container set Layout Data gd Grid Layout button Layout new Grid Layout button Layout margin Width 0 button Layout margin Height 0 button Container set Layout button Layout f Select All Button new Button button Container SWT PUSH f Select All Button set Text Wizard Messages get String New Test Suite Wiz Page select All NON NLS 1 Grid Data bgd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING bgd height Hint SWT Util get Button Heigth Hint f Select All Button bgd width Hint SWT Util get Button Width Hint f Select All Button f Select All Button set Layout Data bgd f Select All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Classes In Suite Table set All Checked true handle Field Changed CLASSES IN SUITE f Deselect All Button new Button button Container SWT PUSH f Deselect All Button set Text Wizard Messages get String New Test Suite Wiz Page deselect All NON NLS 1 bgd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING bgd height Hint SWT Util get Button Heigth Hint f Deselect All Button bgd width Hint SWT Util get Button Width Hint f Deselect All Button f Deselect All Button set Layout Data bgd f Deselect All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Classes In Suite Table set All Checked false handle Field Changed CLASSES IN SUITE No of selected classes label f Selected Classes Label new Label parent SWT LEFT SWT WRAP f Selected Classes Label set Font parent get Font update Selected Classes Label gd new Grid Data gd horizontal Span 2 f Selected Classes Label set Layout Data gd  createClassesInSuiteControl nColumns fClassesInSuiteTable setText WizardMessages getString NewTestSuiteWizPage classes_in_suite GridData GridData horizontalAlignment GridData horizontalSpan nColumns setLayoutData fClassesInSuiteTable CheckboxTableViewer newCheckList GridData GridData FILL_BOTH heightHint horizontalSpan nColumns fClassesInSuiteTable getTable setLayoutData fClassesInSuiteTable setContentProvider ClassesInSuitContentProvider fClassesInSuiteTable setLabelProvider JavaElementLabelProvider fClassesInSuiteTable addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent handleFieldChanged CLASSES_IN_SUITE buttonContainer GridData GridData FILL_VERTICAL buttonContainer setLayoutData GridLayout buttonLayout GridLayout buttonLayout marginWidth buttonLayout marginHeight buttonContainer setLayout buttonLayout fSelectAllButton buttonContainer fSelectAllButton setText WizardMessages getString NewTestSuiteWizPage selectAll GridData GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING heightHint SWTUtil getButtonHeigthHint fSelectAllButton widthHint SWTUtil getButtonWidthHint fSelectAllButton fSelectAllButton setLayoutData fSelectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fClassesInSuiteTable setAllChecked handleFieldChanged CLASSES_IN_SUITE fDeselectAllButton buttonContainer fDeselectAllButton setText WizardMessages getString NewTestSuiteWizPage deselectAll GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING heightHint SWTUtil getButtonHeigthHint fDeselectAllButton widthHint SWTUtil getButtonWidthHint fDeselectAllButton fDeselectAllButton setLayoutData fDeselectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fClassesInSuiteTable setAllChecked handleFieldChanged CLASSES_IN_SUITE fSelectedClassesLabel fSelectedClassesLabel setFont getFont updateSelectedClassesLabel GridData horizontalSpan fSelectedClassesLabel setLayoutData
public Object get Elements Object parent if parent instanceof I Package Fragment return new Object 0 I Package Fragment pack I Package Fragment parent if pack exists return new Object 0 try I Compilation Unit cu Array pack get Compilation Units List types Array List new Array List for int i 0 i cu Array length i I Compilation Unit cu cu Array i I Type types cu get Types for int j 0 j types length j I Type type types j if type is Class Flags is Abstract type get Flags Test Search Engine is Test Implementor type types Array List add types j return types Array List to Array catch Java Model Exception e J Unit Plugin log e return new Object 0  getElements IPackageFragment IPackageFragment IPackageFragment ICompilationUnit cuArray getCompilationUnits typesArrayList ArrayList cuArray ICompilationUnit cuArray IType getTypes IType isClass isAbstract getFlags TestSearchEngine isTestImplementor typesArrayList typesArrayList toArray JavaModelException JUnitPlugin
public void dispose 
public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
protected void create Type Members I Type type Imports Manager imports I Progress Monitor monitor throws Core Exception write Imports imports if f Method Stubs Buttons is Enabled f Method Stubs Buttons is Selected 0 create Main type type create Method get Suite Method String null false null  createTypeMembers IType ImportsManager IProgressMonitor CoreException writeImports fMethodStubsButtons isEnabled fMethodStubsButtons isSelected createMain createMethod getSuiteMethodString
protected void create Main I Type type throws Java Model Exception type create Method f Method Stubs Buttons get Main Method get Type Name null false null  createMain IType JavaModelException createMethod fMethodStubsButtons getMainMethod getTypeName
Returns the string content for creating a new suite method public String get Suite Method String I Package Fragment pack get Package Fragment String pack Name pack get Element Name String Buffer suite new String Buffer public static Test suite Test Suite suite new Test Suite Test for pack Name equals default package pack Name n NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 suite append get Updatable String suite append nreturn suite NON NLS 1 return suite to String  getSuiteMethodString IPackageFragment getPackageFragment packName getElementName StringBuffer StringBuffer TestSuite TestSuite packName packName getUpdatableString toString
Returns the new code to be included in a new suite or which replaces old code in an existing suite public static String get Updatable String Object selected Classes String Buffer suite new String Buffer suite append START MARKER n NON NLS 1 for int i 0 i selected Classes length i if selected Classes i instanceof I Type I Type test Type I Type selected Classes i I Method suite Method test Type get Method suite new String NON NLS 1 if suite Method exists suite append suite add Test Suite test Type get Element Name class NON NLS 1 NON NLS 2 else suite append suite add Test test Type get Element Name suite NON NLS 1 NON NLS 2 suite append n END MARKER NON NLS 1 return suite to String  getUpdatableString selectedClasses StringBuffer StringBuffer START_MARKER selectedClasses selectedClasses IType IType testType IType selectedClasses IMethod suiteMethod testType getMethod suiteMethod addTestSuite testType getElementName addTest testType getElementName END_MARKER toString
private String get Updatable String return get Updatable String f Classes In Suite Table get Checked Elements  getUpdatableString getUpdatableString fClassesInSuiteTable getCheckedElements
return new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try if monitor null monitor new Null Progress Monitor update Existing Class monitor catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException NullProgressMonitor updateExistingClass CoreException InvocationTargetException
Runnable for replacing an existing suite method public I Runnable With Progress get Runnable return new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try if monitor null monitor new Null Progress Monitor update Existing Class monitor catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress getRunnable IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException NullProgressMonitor updateExistingClass CoreException InvocationTargetException
protected void update Existing Class I Progress Monitor monitor throws Core Exception Interrupted Exception I Package Fragment pack get Package Fragment I Compilation Unit cu pack get Compilation Unit get Type Name java NON NLS 1 if cu exists create Type monitor f Updated Existing Class Button false return if Update Test Suite check Validate Edit Status cu get Shell return I Type suite Type cu get Type get Type Name monitor begin Task Wizard Messages get String New Test Suite Wiz Page create Type begin Task 10 NON NLS 1 I Method suite Method suite Type get Method suite new String NON NLS 1 monitor worked 1 String line Delimiter J Unit Stub Utility get Line Delimiter Used cu if suite Method exists I Source Range range suite Method get Source Range if range null I Buffer buf cu get Buffer String original Content buf get Text range get Offset range get Length String Buffer source new String Buffer original Content using JDK 1 4 int start source to String index Of START MARKER int start source index Of START MARKER int start source to String index Of START MARKER if start 1 using JDK 1 4 int end source to String index Of END MARKER start int end source index Of END MARKER start int end source to String index Of END MARKER start if end 1 monitor sub Task Wizard Messages get String New Test Suite Wiz Page create Type updating suite method NON NLS 1 monitor worked 1 end END MARKER length source replace start end get Updatable String buf replace range get Offset range get Length source to String cu reconcile original Content buf get Text 0 buf get Length monitor worked 1 String formatted Content J Unit Stub Utility code Format original Content 0 line Delimiter buf replace 0 buf get Length formatted Content monitor worked 1 cu save new Sub Progress Monitor monitor 1 false else cannot Update Suite Error else cannot Update Suite Error else Message Dialog open Error get Shell Wizard Messages get String New Test Suite Wiz Page create Type update Error Dialog title Wizard Messages get String New Test Suite Wiz Page create Type update Error Dialog message NON NLS 1 NON NLS 2 else suite Type create Method get Suite Method String null true monitor I Source Range range cu get Source Range I Buffer buf cu get Buffer String original Content buf get Text range get Offset range get Length monitor worked 2 String formatted Content J Unit Stub Utility code Format original Content 0 line Delimiter buf replace range get Offset range get Length formatted Content monitor worked 1 cu save new Sub Progress Monitor monitor 1 false monitor done f Updated Existing Class Button true  updateExistingClass IProgressMonitor CoreException InterruptedException IPackageFragment getPackageFragment ICompilationUnit getCompilationUnit getTypeName createType fUpdatedExistingClassButton UpdateTestSuite checkValidateEditStatus getShell IType suiteType getType getTypeName beginTask WizardMessages getString NewTestSuiteWizPage createType beginTask IMethod suiteMethod suiteType getMethod lineDelimiter JUnitStubUtility getLineDelimiterUsed suiteMethod ISourceRange suiteMethod getSourceRange IBuffer getBuffer originalContent getText getOffset getLength StringBuffer StringBuffer originalContent toString indexOf START_MARKER indexOf START_MARKER toString indexOf START_MARKER toString indexOf END_MARKER indexOf END_MARKER toString indexOf END_MARKER subTask WizardMessages getString NewTestSuiteWizPage createType suite_method END_MARKER getUpdatableString getOffset getLength toString originalContent getText getLength formattedContent JUnitStubUtility codeFormat originalContent lineDelimiter getLength formattedContent SubProgressMonitor cannotUpdateSuiteError cannotUpdateSuiteError MessageDialog openError getShell WizardMessages getString NewTestSuiteWizPage createType updateErrorDialog WizardMessages getString NewTestSuiteWizPage createType updateErrorDialog suiteType createMethod getSuiteMethodString ISourceRange getSourceRange IBuffer getBuffer originalContent getText getOffset getLength formattedContent JUnitStubUtility codeFormat originalContent lineDelimiter getOffset getLength formattedContent SubProgressMonitor fUpdatedExistingClassButton
Returns true iff an existing suite method has been replaced public boolean has Updated Existing Class return f Updated Existing Class Button  hasUpdatedExistingClass fUpdatedExistingClassButton
private I Status classes In Suite Changed J Unit Status status new J Unit Status if f Classes In Suite Table get Checked Elements length 0 status set Warning Wizard Messages get String New Test Suite Wiz Page classes in suite error no testclasses selected NON NLS 1 return status  IStatus classesInSuiteChanged JUnitStatus JUnitStatus fClassesInSuiteTable getCheckedElements setWarning WizardMessages getString NewTestSuiteWizPage classes_in_suite no_testclasses_selected
private void update Selected Classes Label int no Of Classes Checked f Classes In Suite Table get Checked Elements length String key no Of Classes Checked 1 New Test Class Wiz Page tree Caption class Selected New Test Class Wiz Page tree Caption classes Selected NON NLS 1 NON NLS 2 f Selected Classes Label set Text Wizard Messages get Formatted String key new Integer no Of Classes Checked  updateSelectedClassesLabel noOfClassesChecked fClassesInSuiteTable getCheckedElements noOfClassesChecked NewTestClassWizPage treeCaption classSelected NewTestClassWizPage treeCaption classesSelected fSelectedClassesLabel setText WizardMessages getFormattedString noOfClassesChecked
f Suite Name Text set Font composite get Font f Suite Name Text add Modify Listener new Modify Listener public void modify Text Modify Event e handle Field Changed SUITE NAME  fSuiteNameText setFont getFont fSuiteNameText addModifyListener ModifyListener modifyText ModifyEvent handleFieldChanged SUITE_NAME
protected void create Suite Name Control Composite composite int n Columns f Suite Name Label new Label composite SWT LEFT SWT WRAP f Suite Name Label set Font composite get Font f Suite Name Label set Text Wizard Messages get String New Test Suite Wiz Page suite Name text NON NLS 1 Grid Data gd new Grid Data gd horizontal Span 1 f Suite Name Label set Layout Data gd f Suite Name Text new Text composite SWT SINGLE SWT BORDER moved up due to 1GEUNW2 f Suite Name Text set Enabled true f Suite Name Text set Font composite get Font f Suite Name Text add Modify Listener new Modify Listener public void modify Text Modify Event e handle Field Changed SUITE NAME gd new Grid Data gd horizontal Alignment Grid Data FILL gd grab Excess Horizontal Space true gd horizontal Span n Columns 2 f Suite Name Text set Layout Data gd Label space new Label composite SWT LEFT space set Text NON NLS 1 gd new Grid Data gd horizontal Span 1 space set Layout Data gd  createSuiteNameControl nColumns fSuiteNameLabel fSuiteNameLabel setFont getFont fSuiteNameLabel setText WizardMessages getString NewTestSuiteWizPage suiteName GridData GridData horizontalSpan fSuiteNameLabel setLayoutData fSuiteNameText fSuiteNameText setEnabled fSuiteNameText setFont getFont fSuiteNameText addModifyListener ModifyListener modifyText ModifyEvent handleFieldChanged SUITE_NAME GridData horizontalAlignment GridData grabExcessHorizontalSpace horizontalSpan nColumns fSuiteNameText setLayoutData setText GridData horizontalSpan setLayoutData
Gets the type name public String get Type Name return f Suite Name Text null f Suite Name Text Initial Value f Suite Name Text get Text  getTypeName fSuiteNameText fSuiteNameTextInitialValue fSuiteNameText getText
Sets the type name param can Be Modified Selects if the type name can be changed by the user public void set Type Name String name boolean can Be Modified if f Suite Name Text null f Suite Name Text Initial Value name else f Suite Name Text set Text name f Suite Name Text set Enabled can Be Modified  canBeModified setTypeName canBeModified fSuiteNameText fSuiteNameTextInitialValue fSuiteNameText setText fSuiteNameText setEnabled canBeModified
Called when the type name has changed The method validates the type name and returns the status of the validation Can be extended to add more validation protected I Status test Suite Changed J Unit Status status new J Unit Status String type Name get Type Name must not be empty if type Name length 0 status set Error Wizard Messages get String New Test Suite Wiz Page type Name error name empty NON NLS 1 return status if type Name index Of 1 status set Error Wizard Messages get String New Test Suite Wiz Page type Name error name qualified NON NLS 1 return status I Status val Java Conventions validate Java Type Name type Name if val get Severity I Status ERROR status set Error Wizard Messages get String New Test Suite Wiz Page type Name error name not valid val get Message NON NLS 1 return status else if val get Severity I Status WARNING status set Warning Wizard Messages get String New Test Suite Wiz Page type Name error name name discouraged val get Message NON NLS 1 continue checking J Unit Status recursive Suite Inclusion Status check Recursive Test Suite Inclusion if recursive Suite Inclusion Status isOK return recursive Suite Inclusion Status I Package Fragment pack get Package Fragment if pack null I Compilation Unit cu pack get Compilation Unit type Name java NON NLS 1 if cu exists status set Warning Wizard Messages get String New Test Suite Wiz Page type Name warning already exists NON NLS 1 f Method Stubs Buttons set Enabled false return status f Method Stubs Buttons set Enabled true return status  IStatus testSuiteChanged JUnitStatus JUnitStatus typeName getTypeName typeName setError WizardMessages getString NewTestSuiteWizPage typeName name_empty typeName indexOf setError WizardMessages getString NewTestSuiteWizPage typeName name_qualified IStatus JavaConventions validateJavaTypeName typeName getSeverity IStatus setError WizardMessages getString NewTestSuiteWizPage typeName name_not_valid getMessage getSeverity IStatus setWarning WizardMessages getString NewTestSuiteWizPage typeName name_discouraged getMessage JUnitStatus recursiveSuiteInclusionStatus checkRecursiveTestSuiteInclusion recursiveSuiteInclusionStatus recursiveSuiteInclusionStatus IPackageFragment getPackageFragment ICompilationUnit getCompilationUnit typeName setWarning WizardMessages getString NewTestSuiteWizPage typeName already_exists fMethodStubsButtons setEnabled fMethodStubsButtons setEnabled
private J Unit Status check Recursive Test Suite Inclusion if f Classes In Suite Table null return new J Unit Status String type Name get Type Name J Unit Status status new J Unit Status Object checked Classes f Classes In Suite Table get Checked Elements for int i 0 i checked Classes length i I Type checked Class I Type checked Classes i if checked Class get Element Name equals type Name status set Warning Wizard Messages get String New Test Suite Creation Wizard Page infinite recursion NON NLS 1 return status return new J Unit Status  JUnitStatus checkRecursiveTestSuiteInclusion fClassesInSuiteTable JUnitStatus typeName getTypeName JUnitStatus JUnitStatus checkedClasses fClassesInSuiteTable getCheckedElements checkedClasses IType checkedClass IType checkedClasses checkedClass getElementName typeName setWarning WizardMessages getString NewTestSuiteCreationWizardPage infinite_recursion JUnitStatus
Sets the focus protected void set Focus f Suite Name Text set Focus  setFocus fSuiteNameText setFocus
Sets the classes in code elements code as checked public void set Checked Elements Object elements f Classes In Suite Table set Checked Elements elements  setCheckedElements fClassesInSuiteTable setCheckedElements
protected void cannot Update Suite Error Message Dialog open Error get Shell Wizard Messages get String New Test Suite Wiz Page cannot Update Dialog title NON NLS 1 Wizard Messages get Formatted String New Test Suite Wiz Page cannot Update Dialog message new String START MARKER END MARKER NON NLS 1  cannotUpdateSuiteError MessageDialog openError getShell WizardMessages getString NewTestSuiteWizPage cannotUpdateDialog WizardMessages getFormattedString NewTestSuiteWizPage cannotUpdateDialog START_MARKER END_MARKER
private void write Imports Imports Manager imports imports add Import junit framework Test NON NLS 1 imports add Import junit framework Test Suite NON NLS 1  writeImports ImportsManager addImport addImport TestSuite
Use the dialog store to restore widget values to the values that they held last time this wizard was used to completion private void restore Widget Values I Dialog Settings settings get Dialog Settings if settings null boolean generate Main settings get Boolean STORE GENERATE MAIN f Method Stubs Buttons set Selection 0 generate Main f Method Stubs Buttons set Enabled 1 generate Main f Method Stubs Buttons set Selection 1 settings get Boolean STORE USE TESTRUNNER The next 2 lines are necessary Otherwise if f Methods Stubs Buttons is disabled and USE TESTRUNNER gets enabled then the checkbox for USE TESTRUNNER will be the only enabled component of f Methods Stubs Button f Method Stubs Buttons set Enabled f Method Stubs Buttons is Enabled f Method Stubs Buttons set Enabled f Method Stubs Buttons is Enabled try f Method Stubs Buttons set Combo Selection settings get Int STORE TESTRUNNER TYPE catch Number Format Exception e  restoreWidgetValues IDialogSettings getDialogSettings generateMain getBoolean STORE_GENERATE_MAIN fMethodStubsButtons setSelection generateMain fMethodStubsButtons setEnabled generateMain fMethodStubsButtons setSelection getBoolean STORE_USE_TESTRUNNER fMethodsStubsButtons USE_TESTRUNNER USE_TESTRUNNER fMethodsStubsButton fMethodStubsButtons setEnabled fMethodStubsButtons isEnabled fMethodStubsButtons setEnabled fMethodStubsButtons isEnabled fMethodStubsButtons setComboSelection getInt STORE_TESTRUNNER_TYPE NumberFormatException
Since Finish was pressed write widget values to the dialog store so that they will persist into the next invocation of this wizard page void save Widget Values I Dialog Settings settings get Dialog Settings if settings null settings put STORE GENERATE MAIN f Method Stubs Buttons is Selected 0 settings put STORE USE TESTRUNNER f Method Stubs Buttons is Selected 1 settings put STORE TESTRUNNER TYPE f Method Stubs Buttons get Combo Selection  saveWidgetValues IDialogSettings getDialogSettings STORE_GENERATE_MAIN fMethodStubsButtons isSelected STORE_USE_TESTRUNNER fMethodStubsButtons isSelected STORE_TESTRUNNER_TYPE fMethodStubsButtons getComboSelection

public I Status validate Object selection int count 0 for int i 0 i selection length i if selection i instanceof I Type count if count 0 f Empty Selection Allowed return new J Unit Status I Status ERROR NON NLS 1 I Status recursive Inclusion Status check Recursive Suite Inclusion selection if recursive Inclusion Status null recursive Inclusion Status isOK return recursive Inclusion Status String message if count 1 message Wizard Messages get Formatted String Update All Tests selected methods label one new Integer count NON NLS 1 else message Wizard Messages get Formatted String Update All Tests selected methods label many new Integer count NON NLS 1 return new J Unit Status I Status INFO message  IStatus IType fEmptySelectionAllowed JUnitStatus IStatus IStatus recursiveInclusionStatus checkRecursiveSuiteInclusion recursiveInclusionStatus recursiveInclusionStatus recursiveInclusionStatus WizardMessages getFormattedString UpdateAllTests selected_methods label_one WizardMessages getFormattedString UpdateAllTests selected_methods label_many JUnitStatus IStatus
private I Status check Recursive Suite Inclusion Object selection I Type suite Class f Suite Method get Declaring Type for int i 0 i selection length i if selection i instanceof I Type if I Type selection i equals suite Class return new J Unit Status I Status WARNING Wizard Messages get String Update Test Suite infinite recursion NON NLS 1 return null  IStatus checkRecursiveSuiteInclusion IType suiteClass fSuiteMethod getDeclaringType IType IType suiteClass JUnitStatus IStatus WizardMessages getString UpdateTestSuite infinite_recursion
public Update Test Suite super  UpdateTestSuite
see I Object Action Delegate set Active Part I Action I Workbench Part public void set Active Part I Action action I Workbench Part target Part  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart
public void run I Action action I Label Provider lprovider new Java Element Label Provider Java Element Label Provider SHOW DEFAULT I Structured Content Provider cprovider new New Test Suite Creation Wizard Page Classes In Suit Content Provider find Test Classes already in Test Suite I Type test Suite Type f Test Suite find Primary Type f Suite Method test Suite Type get Method suite new String NON NLS 1 if f Suite Method exists try I Source Range range f Suite Method get Source Range I Buffer buf f Test Suite get Buffer String original Content buf get Text range get Offset range get Length buf close int start original Content index Of New Test Suite Creation Wizard Page START MARKER if start 1 if original Content index Of New Test Suite Creation Wizard Page END MARKER start 1 Checked Table Selection Dialog dialog new Checked Table Selection Dialog f Shell lprovider cprovider dialog set Validator new Update All Tests Validator dialog set Title Wizard Messages get String Update All Tests title NON NLS 1 dialog set Message Wizard Messages get String Update All Tests message NON NLS 1 dialog set Initial Selections cprovider get Elements f Pack dialog set Size 60 25 dialog set Input f Pack if dialog open Window OK f Selected Test Cases dialog get Result try PlatformUI get Workbench get Progress Service busy Cursor While get Runnable catch Exception e J Unit Plugin log e else cannot Update Suite Error else cannot Update Suite Error catch Java Model Exception e J Unit Plugin log e else no Suite Error  IAction ILabelProvider JavaElementLabelProvider JavaElementLabelProvider SHOW_DEFAULT IStructuredContentProvider NewTestSuiteCreationWizardPage ClassesInSuitContentProvider TestClasses IType testSuiteType fTestSuite findPrimaryType fSuiteMethod testSuiteType getMethod fSuiteMethod ISourceRange fSuiteMethod getSourceRange IBuffer fTestSuite getBuffer originalContent getText getOffset getLength originalContent indexOf NewTestSuiteCreationWizardPage START_MARKER originalContent indexOf NewTestSuiteCreationWizardPage END_MARKER CheckedTableSelectionDialog CheckedTableSelectionDialog fShell setValidator UpdateAllTestsValidator setTitle WizardMessages getString UpdateAllTests setMessage WizardMessages getString UpdateAllTests setInitialSelections getElements fPack setSize setInput fPack fSelectedTestCases getResult getWorkbench getProgressService busyCursorWhile getRunnable JUnitPlugin cannotUpdateSuiteError cannotUpdateSuiteError JavaModelException JUnitPlugin noSuiteError
public void selection Changed I Action action I Selection selection f Shell J Unit Plugin get Active Workbench Shell if selection instanceof I Structured Selection Object test Suite Obj I Structured Selection selection get First Element if test Suite Obj null test Suite Obj instanceof I Compilation Unit f Test Suite I Compilation Unit test Suite Obj I Java Element packIJE f Test Suite get Parent if packIJE instanceof I Package Fragment f Pack I Package Fragment packIJE  selectionChanged IAction ISelection fShell JUnitPlugin getActiveWorkbenchShell IStructuredSelection testSuiteObj IStructuredSelection getFirstElement testSuiteObj testSuiteObj ICompilationUnit fTestSuite ICompilationUnit testSuiteObj IJavaElement fTestSuite getParent IPackageFragment fPack IPackageFragment
private void update Test Cases In Suite I Progress Monitor monitor try monitor begin Task Wizard Messages get String Update All Tests begin Task 5 NON NLS 1 if check Validate Edit Status f Test Suite f Shell return I Source Range range f Suite Method get Source Range I Buffer buf f Test Suite get Buffer String original Content buf get Text range get Offset range get Length String Buffer source new String Buffer original Content using JDK 1 4 int start source to String index Of New Test Suite Creation Wizard Page start Marker int start source index Of New Test Suite Creation Wizard Page start Marker int start source to String index Of New Test Suite Creation Wizard Page START MARKER if start 1 using JDK 1 4 int end source to String index Of New Test Suite Creation Wizard Page end Marker start int end source index Of New Test Suite Creation Wizard Page end Marker start int end source to String index Of New Test Suite Creation Wizard Page END MARKER start if end 1 monitor worked 1 end New Test Suite Creation Wizard Page END MARKER length String updatable Code source substring start end New Test Suite Creation Wizard Page end Marker length source replace start end New Test Suite Creation Wizard Page get Updatable String f Selected Test Cases buf replace range get Offset range get Length source to String monitor worked 1 f Test Suite reconcile original Content buf get Text 0 buf get Length monitor worked 1 String formatted Content J Unit Stub Utility code Format original Content 0 J Unit Stub Utility get Line Delimiter Used f Test Suite buf replace range get Offset range get Length formatted Content buf replace 0 buf get Length formatted Content monitor worked 1 f Test Suite save new Sub Progress Monitor monitor 1 true catch Java Model Exception e Exception Handler handle e f Shell Wizard Messages get String Update Test Suite update Wizard Messages get String Update Test Suite error NON NLS 1 NON NLS 2 finally monitor done  updateTestCasesInSuite IProgressMonitor beginTask WizardMessages getString UpdateAllTests beginTask checkValidateEditStatus fTestSuite fShell ISourceRange fSuiteMethod getSourceRange IBuffer fTestSuite getBuffer originalContent getText getOffset getLength StringBuffer StringBuffer originalContent toString indexOf NewTestSuiteCreationWizardPage startMarker indexOf NewTestSuiteCreationWizardPage startMarker toString indexOf NewTestSuiteCreationWizardPage START_MARKER toString indexOf NewTestSuiteCreationWizardPage endMarker indexOf NewTestSuiteCreationWizardPage endMarker toString indexOf NewTestSuiteCreationWizardPage END_MARKER NewTestSuiteCreationWizardPage END_MARKER updatableCode NewTestSuiteCreationWizardPage endMarker NewTestSuiteCreationWizardPage getUpdatableString fSelectedTestCases getOffset getLength toString fTestSuite originalContent getText getLength formattedContent JUnitStubUtility codeFormat originalContent JUnitStubUtility getLineDelimiterUsed fTestSuite getOffset getLength formattedContent getLength formattedContent fTestSuite SubProgressMonitor JavaModelException ExceptionHandler fShell WizardMessages getString UpdateTestSuite WizardMessages getString UpdateTestSuite
static boolean check Validate Edit Status I Compilation Unit test Suite Cu Shell shell I Status status validate Modifies Files get Test Suite File test Suite Cu if status isOK return true Error Dialog open Error shell Wizard Messages get String Update Test Suite update Wizard Messages get String Update Test Suite could not update status NON NLS 1 NON NLS 2 return false  checkValidateEditStatus ICompilationUnit testSuiteCu IStatus validateModifiesFiles getTestSuiteFile testSuiteCu ErrorDialog openError WizardMessages getString UpdateTestSuite WizardMessages getString UpdateTestSuite could_not_update
private static I File get Test Suite File I Compilation Unit test Suite Cu if test Suite Cu is Working Copy return I File test Suite Cu get Original Element get Resource else return I File test Suite Cu get Resource  IFile getTestSuiteFile ICompilationUnit testSuiteCu testSuiteCu isWorkingCopy IFile testSuiteCu getOriginalElement getResource IFile testSuiteCu getResource
private static I Status validate Modifies Files I File file To Modify I File files To Modify file To Modify I Status status Resources check In Sync files To Modify if status isOK return status status Resources make Committable files To Modify null if status isOK return status return new J Unit Status  IStatus validateModifiesFiles IFile fileToModify IFile filesToModify fileToModify IStatus checkInSync filesToModify makeCommittable filesToModify JUnitStatus
return new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception if monitor null monitor new Null Progress Monitor update Test Cases In Suite monitor  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException NullProgressMonitor updateTestCasesInSuite
public I Runnable With Progress get Runnable return new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception if monitor null monitor new Null Progress Monitor update Test Cases In Suite monitor  IRunnableWithProgress getRunnable IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException NullProgressMonitor updateTestCasesInSuite
private void cannot Update Suite Error Message Dialog open Error f Shell Wizard Messages get String Update All Tests cannot Update error Dialog title NON NLS 1 Wizard Messages get Formatted String Update All Tests cannot Update error Dialog message new String New Test Suite Creation Wizard Page START MARKER New Test Suite Creation Wizard Page END MARKER NON NLS 1  cannotUpdateSuiteError MessageDialog openError fShell WizardMessages getString UpdateAllTests cannotUpdate errorDialog WizardMessages getFormattedString UpdateAllTests cannotUpdate errorDialog NewTestSuiteCreationWizardPage START_MARKER NewTestSuiteCreationWizardPage END_MARKER
private void no Suite Error Message Dialog open Error f Shell Wizard Messages get String Update All Tests cannot Find error Dialog title Wizard Messages get String Update All Tests cannot Find error Dialog message NON NLS 1 NON NLS 2  noSuiteError MessageDialog openError fShell WizardMessages getString UpdateAllTests cannotFind errorDialog WizardMessages getString UpdateAllTests cannotFind errorDialog

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Wizard Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME WizardMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException
Gets a string from the resource bundle and formats it with the argument param keythe string used to get the bundle value must not be null public static String get Formatted String String key Object arg return Message Format format get String key new Object arg  getFormattedString MessageFormat getString
Gets a string from the resource bundle and formats it with arguments public static String get Formatted String String key Object args return Message Format format get String key args  getFormattedString MessageFormat getString

see org eclipse jdt internal launching I Runtime Classpath Entry2 is Composite public boolean is Composite return false  IRuntimeClasspathEntry2 isComposite isComposite
see org eclipse jdt internal launching I Runtime Classpath Entry2 get Runtime Classpath Entries public I Runtime Classpath Entry get Runtime Classpath Entries throws Core Exception return new I Runtime Classpath Entry 0  IRuntimeClasspathEntry2 getRuntimeClasspathEntries IRuntimeClasspathEntry getRuntimeClasspathEntries CoreException IRuntimeClasspathEntry
Throws an exception with the given message and underlying exception param message error message param exception underlying exception or code null code if none throws Core Exception protected void abort String message Throwable exception throws Core Exception I Status status new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR INTERNAL ERROR message exception throw new Core Exception status  CoreException CoreException IStatus IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR CoreException
public String get Memento throws Core Exception Document doc Debug Plugin new Document Element root doc create Element runtime Classpath Entry NON NLS 1 doc append Child root root set Attribute id get Type Id NON NLS 1 Element memento doc create Element memento NON NLS 1 root append Child memento build Memento doc memento return Debug Plugin serialize Document doc  getMemento CoreException DebugPlugin newDocument createElement runtimeClasspathEntry appendChild setAttribute getTypeId createElement appendChild buildMemento DebugPlugin serializeDocument
Constructs a memento for this classpath entry in the given document and element The memento element has already been appended to the document param document XML document param memento element node for client specific attributes throws Core Exception if unable to create a memento  CoreException
see org eclipse jdt launching I Runtime Classpath Entry get Path public I Path get Path return null  IRuntimeClasspathEntry getPath IPath getPath
see org eclipse jdt launching I Runtime Classpath Entry get Resource public I Resource get Resource return null  IRuntimeClasspathEntry getResource IResource getResource
see org eclipse jdt launching I Runtime Classpath Entry get Source Attachment Path public I Path get Source Attachment Path return source Attachment Path  IRuntimeClasspathEntry getSourceAttachmentPath IPath getSourceAttachmentPath sourceAttachmentPath
see org eclipse jdt launching I Runtime Classpath Entry set Source Attachment Path org eclipse core runtime I Path public void set Source Attachment Path I Path path source Attachment Path path  IRuntimeClasspathEntry setSourceAttachmentPath IPath setSourceAttachmentPath IPath sourceAttachmentPath
see org eclipse jdt launching I Runtime Classpath Entry get Source Attachment Root Path public I Path get Source Attachment Root Path return root Source Path  IRuntimeClasspathEntry getSourceAttachmentRootPath IPath getSourceAttachmentRootPath rootSourcePath
see org eclipse jdt launching I Runtime Classpath Entry set Source Attachment Root Path org eclipse core runtime I Path public void set Source Attachment Root Path I Path path root Source Path path  IRuntimeClasspathEntry setSourceAttachmentRootPath IPath setSourceAttachmentRootPath IPath rootSourcePath
see org eclipse jdt launching I Runtime Classpath Entry get Classpath Property public int get Classpath Property return classpath Property  IRuntimeClasspathEntry getClasspathProperty getClasspathProperty classpathProperty
see org eclipse jdt launching I Runtime Classpath Entry set Classpath Property int public void set Classpath Property int property classpath Property property  IRuntimeClasspathEntry setClasspathProperty setClasspathProperty classpathProperty
see org eclipse jdt launching I Runtime Classpath Entry get Location public String get Location return null  IRuntimeClasspathEntry getLocation getLocation
see org eclipse jdt launching I Runtime Classpath Entry get Source Attachment Location public String get Source Attachment Location return null  IRuntimeClasspathEntry getSourceAttachmentLocation getSourceAttachmentLocation
see org eclipse jdt launching I Runtime Classpath Entry get Source Attachment Root Location public String get Source Attachment Root Location return null  IRuntimeClasspathEntry getSourceAttachmentRootLocation getSourceAttachmentRootLocation
see org eclipse jdt launching I Runtime Classpath Entry get Variable Name public String get Variable Name return null  IRuntimeClasspathEntry getVariableName getVariableName
see org eclipse jdt launching I Runtime Classpath Entry get Classpath Entry public I Classpath Entry get Classpath Entry return null  IRuntimeClasspathEntry getClasspathEntry IClasspathEntry getClasspathEntry
see org eclipse jdt launching I Runtime Classpath Entry get Java Project public I Java Project get Java Project return f Java Project  IRuntimeClasspathEntry getJavaProject IJavaProject getJavaProject fJavaProject
Sets the Java project associated with this entry param java Project protected void set Java Project I Java Project java Project f Java Project java Project  javaProject setJavaProject IJavaProject javaProject fJavaProject javaProject

public I Source Container create Source Container String memento throws Core Exception Node node parse Document memento if node get Node Type Node ELEMENT NODE Element element Element node if classpath Container equals element get Node Name NON NLS 1 String string element get Attribute path NON NLS 1 if string null string length 0 abort Launching Messages get String Classpath Container Source Container Type Delegate 5 null NON NLS 1 return new Classpath Container Source Container new Path string abort Launching Messages get String Classpath Container Source Container Type Delegate 6 null NON NLS 1 abort Launching Messages get String Classpath Container Source Container Type Delegate 7 null NON NLS 1 return null  ISourceContainer createSourceContainer CoreException parseDocument getNodeType ELEMENT_NODE classpathContainer getNodeName getAttribute LaunchingMessages getString ClasspathContainerSourceContainerTypeDelegate ClasspathContainerSourceContainer LaunchingMessages getString ClasspathContainerSourceContainerTypeDelegate LaunchingMessages getString ClasspathContainerSourceContainerTypeDelegate
public String get Memento I Source Container container throws Core Exception Classpath Container Source Container var Classpath Container Source Container container Document document new Document Element element document create Element classpath Container NON NLS 1 element set Attribute path var get Path to String NON NLS 1 document append Child element return serialize Document document  getMemento ISourceContainer CoreException ClasspathContainerSourceContainer ClasspathContainerSourceContainer newDocument createElement classpathContainer setAttribute getPath toString appendChild serializeDocument

public I Source Container create Source Container String memento throws Core Exception Node node parse Document memento if node get Node Type Node ELEMENT NODE Element element Element node if classpath Variable equals element get Node Name NON NLS 1 String string element get Attribute path NON NLS 1 if string null string length 0 abort Launching Messages get String Classpath Variable Source Container Type Delegate 5 null NON NLS 1 return new Classpath Variable Source Container new Path string abort Launching Messages get String Classpath Variable Source Container Type Delegate 6 null NON NLS 1 abort Launching Messages get String Classpath Variable Source Container Type Delegate 7 null NON NLS 1 return null  ISourceContainer createSourceContainer CoreException parseDocument getNodeType ELEMENT_NODE classpathVariable getNodeName getAttribute LaunchingMessages getString ClasspathVariableSourceContainerTypeDelegate ClasspathVariableSourceContainer LaunchingMessages getString ClasspathVariableSourceContainerTypeDelegate LaunchingMessages getString ClasspathVariableSourceContainerTypeDelegate
public String get Memento I Source Container container throws Core Exception Classpath Variable Source Container var Classpath Variable Source Container container Document document new Document Element element document create Element classpath Variable NON NLS 1 element set Attribute path var get Path to String NON NLS 1 document append Child element return serialize Document document  getMemento ISourceContainer CoreException ClasspathVariableSourceContainer ClasspathVariableSourceContainer newDocument createElement classpathVariable setAttribute getPath toString appendChild serializeDocument

private String f Parts public Composite Id String parts f Parts parts  fParts CompositeId fParts
public static Composite Id from String String id String Array List parts new Array List int comma Index id String index Of while comma Index 0 int length Integer value Of id String substring 0 comma Index int Value String part id String substring comma Index 1 comma Index 1 length parts add part id String id String substring comma Index 1 length comma Index id String index Of String result String parts to Array new String parts size return new Composite Id result  CompositeId fromString idString ArrayList ArrayList commaIndex idString indexOf commaIndex valueOf idString commaIndex intValue idString commaIndex commaIndex idString idString commaIndex commaIndex idString indexOf toArray CompositeId
public String to String String Buffer buf new String Buffer for int i 0 i f Parts length i buf append f Parts i length buf append buf append f Parts i return buf to String  toString StringBuffer StringBuffer fParts fParts fParts toString
public String get int index return f Parts index  fParts
public int get Part Count return f Parts length  getPartCount fParts

public I Runtime Classpath Entry resolve Runtime Classpath Entry I Runtime Classpath Entry entry I Launch Configuration configuration throws Core Exception I Runtime Classpath Entry2 entry2 I Runtime Classpath Entry2 entry I Runtime Classpath Entry entries entry2 get Runtime Classpath Entries configuration List resolved new Array List for int i 0 i entries length i I Runtime Classpath Entry temp Java Runtime resolve Runtime Classpath Entry entries i configuration for int j 0 j temp length j resolved add temp j return I Runtime Classpath Entry resolved to Array new I Runtime Classpath Entry resolved size  IRuntimeClasspathEntry resolveRuntimeClasspathEntry IRuntimeClasspathEntry ILaunchConfiguration CoreException IRuntimeClasspathEntry2 IRuntimeClasspathEntry2 IRuntimeClasspathEntry getRuntimeClasspathEntries ArrayList IRuntimeClasspathEntry JavaRuntime resolveRuntimeClasspathEntry IRuntimeClasspathEntry toArray IRuntimeClasspathEntry
public I Runtime Classpath Entry resolve Runtime Classpath Entry I Runtime Classpath Entry entry I Java Project project throws Core Exception I Runtime Classpath Entry2 entry2 I Runtime Classpath Entry2 entry I Runtime Classpath Entry entries entry2 get Runtime Classpath Entries null List resolved new Array List for int i 0 i entries length i I Runtime Classpath Entry temp Java Runtime resolve Runtime Classpath Entry entries i project for int j 0 j temp length j resolved add temp j return I Runtime Classpath Entry resolved to Array new I Runtime Classpath Entry resolved size  IRuntimeClasspathEntry resolveRuntimeClasspathEntry IRuntimeClasspathEntry IJavaProject CoreException IRuntimeClasspathEntry2 IRuntimeClasspathEntry2 IRuntimeClasspathEntry getRuntimeClasspathEntries ArrayList IRuntimeClasspathEntry JavaRuntime resolveRuntimeClasspathEntry IRuntimeClasspathEntry toArray IRuntimeClasspathEntry
see org eclipse jdt launching I Runtime Classpath Entry Resolver resolveVM Install org eclipse jdt core I Classpath Entry public IVM Install resolveVM Install I Classpath Entry entry throws Core Exception return null  IRuntimeClasspathEntryResolver resolveVMInstall IClasspathEntry IVMInstall resolveVMInstall IClasspathEntry CoreException

Default constructor need to instantiate extensions public Default Project Classpath Entry  DefaultProjectClasspathEntry
Constructs a new classpath entry for the given project param project Java project public Default Project Classpath Entry I Java Project project set Java Project project  DefaultProjectClasspathEntry IJavaProject setJavaProject
see org eclipse jdt internal launching Abstract Runtime Classpath Entry build Memento org w3c dom Document org w3c dom Element protected void build Memento Document document Element memento throws Core Exception memento set Attribute project get Java Project get Element Name NON NLS 1  AbstractRuntimeClasspathEntry buildMemento buildMemento CoreException setAttribute getJavaProject getElementName
public void initialize From Element memento throws Core Exception String name memento get Attribute project NON NLS 1 if name null abort Launching Messages get String Default Project Classpath Entry 3 null NON NLS 1 I Java Project project Java Core create Resources Plugin get Workspace get Root get Project name set Java Project project  initializeFrom CoreException getAttribute LaunchingMessages getString DefaultProjectClasspathEntry IJavaProject JavaCore ResourcesPlugin getWorkspace getRoot getProject setJavaProject
see org eclipse jdt launching I Runtime Classpath Entry2 get Type Id public String get Type Id return TYPE ID  IRuntimeClasspathEntry2 getTypeId getTypeId TYPE_ID
see org eclipse jdt launching I Runtime Classpath Entry get Type public int get Type return OTHER  IRuntimeClasspathEntry getType getType
protected I Project get Project return get Java Project get Project  IProject getProject getJavaProject getProject
see org eclipse jdt launching I Runtime Classpath Entry get Location public String get Location return get Project get Location toOS String  IRuntimeClasspathEntry getLocation getLocation getProject getLocation toOSString
see org eclipse jdt launching I Runtime Classpath Entry get Path public I Path get Path return get Project get Full Path  IRuntimeClasspathEntry getPath IPath getPath getProject getFullPath
see org eclipse jdt launching I Runtime Classpath Entry get Resource public I Resource get Resource return get Project  IRuntimeClasspathEntry getResource IResource getResource getProject
public I Runtime Classpath Entry get Runtime Classpath Entries I Launch Configuration configuration throws Core Exception I Classpath Entry entry Java Core new Project Entry get Java Project get Project get Full Path List classpath Entries new Array List 5 List expanding new Array List 5 expand Project entry classpath Entries expanding I Runtime Classpath Entry runtime Entries new I Runtime Classpath Entry classpath Entries null 0 classpath Entries size for int i 0 i runtime Entries length i Object e classpath Entries get i if e instanceof I Classpath Entry I Classpath Entry cpe I Classpath Entry e runtime Entries i new Runtime Classpath Entry cpe else runtime Entries i I Runtime Classpath Entry e remove bootpath entries this is a default user classpath List ordered new Array List runtime Entries length for int i 0 i runtime Entries length i if runtime Entries i get Classpath Property I Runtime Classpath Entry USER CLASSES ordered add runtime Entries i return I Runtime Classpath Entry ordered to Array new I Runtime Classpath Entry ordered size  IRuntimeClasspathEntry getRuntimeClasspathEntries ILaunchConfiguration CoreException IClasspathEntry JavaCore newProjectEntry getJavaProject getProject getFullPath classpathEntries ArrayList ArrayList expandProject classpathEntries IRuntimeClasspathEntry runtimeEntries IRuntimeClasspathEntry classpathEntries classpathEntries runtimeEntries classpathEntries IClasspathEntry IClasspathEntry IClasspathEntry runtimeEntries RuntimeClasspathEntry runtimeEntries IRuntimeClasspathEntry ArrayList runtimeEntries runtimeEntries runtimeEntries getClasspathProperty IRuntimeClasspathEntry USER_CLASSES runtimeEntries IRuntimeClasspathEntry toArray IRuntimeClasspathEntry
Returns the transitive closure of classpath entries for the given project entry param project Entry project classpath entry param expanded Path a list of entries already expanded should be empty to begin and contains the result param expanding a list of projects that have been or are currently being expanded to detect cycles exception Core Exception if unable to expand the classpath private static void expand Project I Classpath Entry project Entry List expanded Path List expanding throws Core Exception expanding add project Entry 1 Get the raw classpath 2 Replace source folder entries with a project entry I Path project Path project Entry get Path I Resource res Resources Plugin get Workspace get Root find Member project Path last Segment if res null add project entry and return expanded Path add project Entry return I Java Project project I Java Project Java Core create res if project null project get Project is Open project exists add project entry and return expanded Path add project Entry return I Classpath Entry build Path project get Raw Classpath List unexpanded Path new Array List build Path length boolean project Added false for int i 0 i build Path length i if build Path i get Entry Kind I Classpath Entry CPE SOURCE if project Added project Added true unexpanded Path add project Entry else unexpanded Path add build Path i 3 expand each project entry except for the root project 4 replace each container entry with a runtime entry associated with the project Iterator iter unexpanded Path iterator while iter has Next I Classpath Entry entry I Classpath Entry iter next if entry project Entry expanded Path add entry else switch entry get Entry Kind case I Classpath Entry CPE PROJECT if expanding contains entry expand Project entry expanded Path expanding break case I Classpath Entry CPE CONTAINER I Classpath Container container Java Core get Classpath Container entry get Path project int property 1 if container null switch container get Kind case I Classpath Container K APPLICATION property I Runtime Classpath Entry USER CLASSES break case I Classpath Container K DEFAULT SYSTEM property I Runtime Classpath Entry STANDARD CLASSES break case I Classpath Container K SYSTEM property I Runtime Classpath Entry BOOTSTRAP CLASSES break I Runtime Classpath Entry r Java Runtime new Runtime Container Classpath Entry entry get Path property project check for duplicate redundant entries boolean duplicate false Classpath Container Initializer initializer Java Core get Classpath Container Initializer r get Path segment 0 for int i 0 i expanded Path size i Object o expanded Path get i if o instanceof I Runtime Classpath Entry I Runtime Classpath Entry re I Runtime Classpath Entry o if re get Type I Runtime Classpath Entry CONTAINER if container instanceof I Runtime Container Comparator duplicate I Runtime Container Comparator container is Duplicate re get Path else Classpath Container Initializer initializer2 Java Core get Classpath Container Initializer re get Path segment 0 Object id1 initializer get ComparisonID r get Path project Object id2 initializer2 get ComparisonID re get Path project if id1 null duplicate id2 null else duplicate id1 equals id2 if duplicate break if duplicate expanded Path add r break case I Classpath Entry CPE VARIABLE if entry get Path segment 0 equals Java Runtime JRELIB VARIABLE I Runtime Classpath Entry r Java Runtime new Variable Runtime Classpath Entry entry get Path r set Source Attachment Path entry get Source Attachment Path r set Source Attachment Root Path entry get Source Attachment Root Path r set Classpath Property I Runtime Classpath Entry STANDARD CLASSES if expanded Path contains r expanded Path add r break fall through if not the special JRELIB variable default if expanded Path contains entry expanded Path add entry break return  projectEntry expandedPath CoreException expandProject IClasspathEntry projectEntry expandedPath CoreException projectEntry IPath projectPath projectEntry getPath IResource ResourcesPlugin getWorkspace getRoot findMember projectPath lastSegment expandedPath projectEntry IJavaProject IJavaProject JavaCore getProject isOpen expandedPath projectEntry IClasspathEntry buildPath getRawClasspath unexpandedPath ArrayList buildPath projectAdded buildPath buildPath getEntryKind IClasspathEntry CPE_SOURCE projectAdded projectAdded unexpandedPath projectEntry unexpandedPath buildPath unexpandedPath hasNext IClasspathEntry IClasspathEntry projectEntry expandedPath getEntryKind IClasspathEntry CPE_PROJECT expandProject expandedPath IClasspathEntry CPE_CONTAINER IClasspathContainer JavaCore getClasspathContainer getPath getKind IClasspathContainer K_APPLICATION IRuntimeClasspathEntry USER_CLASSES IClasspathContainer K_DEFAULT_SYSTEM IRuntimeClasspathEntry STANDARD_CLASSES IClasspathContainer K_SYSTEM IRuntimeClasspathEntry BOOTSTRAP_CLASSES IRuntimeClasspathEntry JavaRuntime newRuntimeContainerClasspathEntry getPath ClasspathContainerInitializer JavaCore getClasspathContainerInitializer getPath expandedPath expandedPath IRuntimeClasspathEntry IRuntimeClasspathEntry IRuntimeClasspathEntry getType IRuntimeClasspathEntry IRuntimeContainerComparator IRuntimeContainerComparator isDuplicate getPath ClasspathContainerInitializer JavaCore getClasspathContainerInitializer getPath getComparisonID getPath getComparisonID getPath expandedPath IClasspathEntry CPE_VARIABLE getPath JavaRuntime JRELIB_VARIABLE IRuntimeClasspathEntry JavaRuntime newVariableRuntimeClasspathEntry getPath setSourceAttachmentPath getSourceAttachmentPath setSourceAttachmentRootPath getSourceAttachmentRootPath setClasspathProperty IRuntimeClasspathEntry STANDARD_CLASSES expandedPath expandedPath expandedPath expandedPath
see org eclipse jdt launching I Runtime Classpath Entry2 is Composite public boolean is Composite return true  IRuntimeClasspathEntry2 isComposite isComposite
see org eclipse jdt launching I Runtime Classpath Entry2 get Name public String get Name return Message Format format Launching Messages get String Default Project Classpath Entry 4 new String get Java Project get Element Name NON NLS 1  IRuntimeClasspathEntry2 getName getName MessageFormat LaunchingMessages getString DefaultProjectClasspathEntry getJavaProject getElementName
see java lang Object equals java lang Object public boolean equals Object obj return obj instanceof Default Project Classpath Entry Default Project Classpath Entry obj get Java Project equals get Java Project  DefaultProjectClasspathEntry DefaultProjectClasspathEntry getJavaProject getJavaProject
see java lang Object hash Code public int hash Code return get Java Project hash Code  hashCode hashCode getJavaProject hashCode

public void launch I Launch Configuration configuration String mode I Launch launch I Progress Monitor monitor throws Core Exception if configuration null abort Launching Messages get String Java Applet Launch Configuration Delegate No launch configuration specified 1 null I Java Launch Configuration Constants ERR UNSPECIFIED LAUNCH CONFIG NON NLS 1 monitor begin Task Message Format format Launching Messages get String Java Applet Launch Configuration Delegate Starting Applet  0  1 new String configuration get Name 3 NON NLS 1 monitor sub Task Launching Messages get String Java Applet Launch Configuration Delegate Verifying launch attributes  1 NON NLS 1 verify Main Type Name configuration IVM Install vm verifyVM Install configuration IVM Runner runner vm getVM Runner mode if runner null if mode I Launch Manager DEBUG MODE abort Message Format format Launching Messages get String Java Local Application Launch Configuration Delegate 0 new String vm get Name null I Java Launch Configuration Constants ERR VM RUNNER DOES NOT EXIST NON NLS 1 else abort Message Format format Launching Messages get String Java Local Application Launch Configuration Delegate 1 new String vm get Name null I Java Launch Configuration Constants ERR VM RUNNER DOES NOT EXIST NON NLS 1 File working Dir verify Working Directory configuration String working Dir Name working Dir get Absolute Path Program VM args String java Policy get Java Policy File working Dir Execution Arguments exec Args new Execution Arguments getVM Arguments configuration NON NLS 1 Classpath String classpath get Classpath configuration Create VM config String applet Viewer Class Name configuration get Attribute I Java Launch Configuration Constants ATTR APPLET APPLETVIEWER CLASS I Java Launch Configuration Constants DEFAULT APPLETVIEWER CLASS VM Runner Configuration run Config new VM Runner Configuration applet Viewer Class Name classpath Construct the HTML file and set its name as a program argument File html File buildHTML File configuration working Dir if html File null abort Launching Messages get String Java Applet Launch Configuration Delegate Could not build HTML file for applet launch 1 null I Java Launch Configuration Constants ERR COULD NOT BUILD HTML NON NLS 1 run Config set Program Arguments new String html File get Name Retrieve set the VM arguments String vm Args exec Args getVM Arguments Array String real Args new String vm Args length 1 System arraycopy vm Args 0 real Args 1 vm Args length real Args 0 java Policy run Config setVM Arguments real Args run Config set Working Directory working Dir Name Bootpath run Config set Boot Class Path get Bootpath configuration VM specific attributes Map vm Attributes Map getVM Specific Attributes Map configuration run Config setVM Specific Attributes Map vm Attributes Map monitor worked 1 Add a debug listener if necessary if fg Launch To File Map is Empty Debug Plugin get Default add Debug Event Listener this Add a mapping of the launch to the html file fg Launch To File Map put launch html File monitor sub Task Launching Messages get String Java Applet Launch Configuration Delegate Creating source locator  2 NON NLS 1 Set default source locator if none specified set Default Source Locator launch configuration monitor worked 1 Launch the configuration try runner run run Config launch monitor catch Core Exception ce html File delete throw ce monitor done  ILaunchConfiguration ILaunch IProgressMonitor CoreException LaunchingMessages getString JavaAppletLaunchConfigurationDelegate No_launch_configuration_specified_1 IJavaLaunchConfigurationConstants ERR_UNSPECIFIED_LAUNCH_CONFIG beginTask MessageFormat LaunchingMessages getString JavaAppletLaunchConfigurationDelegate Starting_Applet_ _1 getName subTask LaunchingMessages getString JavaAppletLaunchConfigurationDelegate Verifying_launch_attributes _1 verifyMainTypeName IVMInstall verifyVMInstall IVMRunner getVMRunner ILaunchManager DEBUG_MODE MessageFormat LaunchingMessages getString JavaLocalApplicationLaunchConfigurationDelegate getName IJavaLaunchConfigurationConstants ERR_VM_RUNNER_DOES_NOT_EXIST MessageFormat LaunchingMessages getString JavaLocalApplicationLaunchConfigurationDelegate getName IJavaLaunchConfigurationConstants ERR_VM_RUNNER_DOES_NOT_EXIST workingDir verifyWorkingDirectory workingDirName workingDir getAbsolutePath javaPolicy getJavaPolicyFile workingDir ExecutionArguments execArgs ExecutionArguments getVMArguments getClasspath appletViewerClassName getAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_APPLETVIEWER_CLASS IJavaLaunchConfigurationConstants DEFAULT_APPLETVIEWER_CLASS VMRunnerConfiguration runConfig VMRunnerConfiguration appletViewerClassName htmlFile buildHTMLFile workingDir htmlFile LaunchingMessages getString JavaAppletLaunchConfigurationDelegate Could_not_build_HTML_file_for_applet_launch_1 IJavaLaunchConfigurationConstants ERR_COULD_NOT_BUILD_HTML runConfig setProgramArguments htmlFile getName vmArgs execArgs getVMArgumentsArray realArgs vmArgs vmArgs realArgs vmArgs realArgs javaPolicy runConfig setVMArguments realArgs runConfig setWorkingDirectory workingDirName runConfig setBootClassPath getBootpath vmAttributesMap getVMSpecificAttributesMap runConfig setVMSpecificAttributesMap vmAttributesMap fgLaunchToFileMap isEmpty DebugPlugin getDefault addDebugEventListener fgLaunchToFileMap htmlFile subTask LaunchingMessages getString JavaAppletLaunchConfigurationDelegate Creating_source_locator _2 setDefaultSourceLocator runConfig CoreException htmlFile
Returns the system property string for the policy file param working Dir the working directory return system property for the policy file public String get Java Policy File File working Dir File file new File working Dir java policy applet NON NLS 1 if file exists copy it to the working directory File test Launching Plugin get File In Plugin new Path java policy applet NON NLS 1 try byte bytes get File Byte Content test Buffered Output Stream output Stream new Buffered Output Stream new File Output Stream file output Stream write bytes output Stream close catch IO Exception e return NON NLS 1 return Djava security policy java policy applet NON NLS 1  workingDir getJavaPolicyFile workingDir workingDir LaunchingPlugin getFileInPlugin getFileByteContent BufferedOutputStream outputStream BufferedOutputStream FileOutputStream outputStream outputStream IOException
Using the specified launch configuration build an HTML file that specifies the applet to launch Return the name of the HTML file param dir the directoru in which to make the file private File buildHTML File I Launch Configuration configuration File dir File Writer writer null File temp File null try String name get Main Type Name configuration temp File new File dir name System current Time Millis html NON NLS 1 NON NLS 2 writer new File Writer temp File writer write html n NON NLS 1 writer write body n NON NLS 1 writer write applet code NON NLS 1 writer write name writer write class NON NLS 1 String applet Name configuration get Attribute I Java Launch Configuration Constants ATTR APPLET NAME NON NLS 1 if applet Name length 0 writer write NAME applet Name NON NLS 1 NON NLS 2 writer write width NON NLS 1 writer write Integer to String configuration get Attribute I Java Launch Configuration Constants ATTR APPLET WIDTH 200 NON NLS 1 writer write height NON NLS 1 writer write Integer to String configuration get Attribute I Java Launch Configuration Constants ATTR APPLET HEIGHT 200 NON NLS 1 writer write n NON NLS 1 Map parameters configuration get Attribute I Java Launch Configuration Constants ATTR APPLET PARAMETERS new Hash Map if parameters size 0 Iterator iterator parameters entry Set iterator while iterator has Next Map Entry next Map Entry iterator next writer write param name NON NLS 1 writer write get Quoted String String next get Key writer write value NON NLS 1 writer write get Quoted String String next get Value writer write n NON NLS 1 writer write applet n NON NLS 1 writer write body n NON NLS 1 writer write html n NON NLS 1 catch IO Exception e catch Core Exception e finally if writer null try writer close catch IO Exception e if temp File null return null return temp File  buildHTMLFile ILaunchConfiguration FileWriter tempFile getMainTypeName tempFile currentTimeMillis FileWriter tempFile appletName getAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_NAME appletName appletName toString getAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_WIDTH toString getAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_HEIGHT getAttribute IJavaLaunchConfigurationConstants ATTR_APPLET_PARAMETERS HashMap entrySet hasNext getQuotedString getKey getQuotedString getValue IOException CoreException IOException tempFile tempFile
private String get Quoted String String string if string index Of 1 return string return string  getQuotedString indexOf
public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i Object event Source event get Source switch event get Kind Delete the HTML file used for the launch case Debug Event TERMINATE if event Source null I Launch launch null if event Source instanceof I Process I Process process I Process event Source launch process get Launch else if event Source instanceof I Debug Target I Debug Target debug Target I Debug Target event Source launch debug Target get Launch File temp File fg Launch To File Map get launch if temp null try fg Launch To File Map remove launch temp delete finally if fg Launch To File Map is Empty Debug Plugin get Default remove Debug Event Listener this break  handleDebugEvents DebugEvent DebugEvent eventSource getSource getKind DebugEvent eventSource ILaunch eventSource IProcess IProcess IProcess eventSource getLaunch eventSource IDebugTarget IDebugTarget debugTarget IDebugTarget eventSource debugTarget getLaunch fgLaunchToFileMap fgLaunchToFileMap fgLaunchToFileMap isEmpty DebugPlugin getDefault removeDebugEventListener
Returns the contents of the given file as a byte array throws IO Exception if a problem occured reading the file protected static byte get File Byte Content File file throws IO Exception Input Stream stream null try stream new Buffered Input Stream new File Input Stream file return get Input Stream As Byte Array stream int file length finally if stream null try stream close catch IO Exception e  IOException getFileByteContent IOException InputStream BufferedInputStream FileInputStream getInputStreamAsByteArray IOException
Returns the given input stream s contents as a byte array If a length is specified ie if length 1 only length bytes are returned Otherwise all bytes in the stream are returned Note this doesn t close the stream throws IO Exception if a problem occured reading the stream protected static byte get Input Stream As Byte Array Input Stream stream int length throws IO Exception byte contents if length 1 contents new byte 0 int contents Length 0 int bytes Read 1 do int available stream available resize contents if needed if contents Length available contents length System arraycopy contents 0 contents new byte contents Length available 0 contents Length read as many bytes as possible bytes Read stream read contents contents Length available if bytes Read 0 remember length of contents contents Length bytes Read while bytes Read 0 resize contents if necessary if contents Length contents length System arraycopy contents 0 contents new byte contents Length 0 contents Length else contents new byte length int len 0 int read Size 0 while read Size 1 len length See PR 1FMS89U We record first the read size In this case len is the actual read size len read Size read Size stream read contents len length len return contents  IOException getInputStreamAsByteArray InputStream IOException contentsLength bytesRead contentsLength contentsLength contentsLength bytesRead contentsLength bytesRead contentsLength bytesRead bytesRead contentsLength contentsLength contentsLength readSize readSize readSize readSize
public File verify Working Directory I Launch Configuration configuration throws Core Exception I Path path get Working Directory Path configuration if path null default working dir for applets is the project s output directory String output Dir Java Runtime get Project Output Directory configuration if output Dir null if no project attribute default to eclipse directory return new File System get Property user dir NON NLS 1 I Resource resource Resources Plugin get Workspace get Root find Member output Dir if resource null resource exists default to eclipse directory return new File System get Property user dir NON NLS 1 return resource get Location to File if path is Absolute File dir new File path toOS String if dir is Directory return dir abort Message Format format Launching Messages get String Abstract Java Launch Configuration Delegate Working directory does not exist   0  12 new String path to String null I Java Launch Configuration Constants ERR WORKING DIRECTORY DOES NOT EXIST NON NLS 1 else I Resource res Resources Plugin get Workspace get Root find Member path if res instanceof I Container res exists return res get Location to File abort Message Format format Launching Messages get String Abstract Java Launch Configuration Delegate Working directory does not exist   0  12 new String path to String null I Java Launch Configuration Constants ERR WORKING DIRECTORY DOES NOT EXIST NON NLS 1 cannot return null an exception will be thrown return null  verifyWorkingDirectory ILaunchConfiguration CoreException IPath getWorkingDirectoryPath outputDir JavaRuntime getProjectOutputDirectory outputDir getProperty IResource ResourcesPlugin getWorkspace getRoot findMember outputDir getProperty getLocation toFile isAbsolute toOSString isDirectory MessageFormat LaunchingMessages getString AbstractJavaLaunchConfigurationDelegate Working_directory_does_not_exist__ _12 toString IJavaLaunchConfigurationConstants ERR_WORKING_DIRECTORY_DOES_NOT_EXIST IResource ResourcesPlugin getWorkspace getRoot findMember IContainer getLocation toFile MessageFormat LaunchingMessages getString AbstractJavaLaunchConfigurationDelegate Working_directory_does_not_exist__ _12 toString IJavaLaunchConfigurationConstants ERR_WORKING_DIRECTORY_DOES_NOT_EXIST

see Classpath Variable Initializer initialize String public void initialize String variable IVM Install vm Install Java Runtime get DefaultVM Install if vm Install null I Path new Path null Library Location locations Java Runtime get Library Locations vm Install look for rt jar or classes zip both may exist so do exhaustive search Library Location rtjar null Library Location classeszip null for int i 0 i locations length i Library Location location locations i String name location get System Library Path last Segment if name equals Ignore Case rt jar NON NLS 1 rtjar location else if name equals Ignore Case classes zip NON NLS 1 classeszip location rt jar if present then classes zip else the first library Library Location system Lib rtjar if system Lib null system Lib classeszip if system Lib null locations length 0 system Lib locations 0 if system Lib null if variable equals Java Runtime JRELIB VARIABLE new Path system Lib get System Library Path else if variable equals Java Runtime JRESRC VARIABLE new Path system Lib get System Library Source Path else if variable equals Java Runtime JRESRCROOT VARIABLE new Path system Lib get Package Root Path if new Path null return I Workspace workspace Resources Plugin get Workspace I Workspace Description ws Description workspace get Description boolean was Autobuild ws Description is Auto Building try set Autobuild workspace false setJRE Variable new Path variable catch Core Exception ce Launching Plugin log ce return finally try set Autobuild workspace was Autobuild catch Core Exception ce Launching Plugin log ce  ClasspathVariableInitializer IVMInstall vmInstall JavaRuntime getDefaultVMInstall vmInstall IPath newPath LibraryLocation JavaRuntime getLibraryLocations vmInstall LibraryLocation LibraryLocation LibraryLocation getSystemLibraryPath lastSegment equalsIgnoreCase equalsIgnoreCase LibraryLocation systemLib systemLib systemLib systemLib systemLib systemLib JavaRuntime JRELIB_VARIABLE newPath systemLib getSystemLibraryPath JavaRuntime JRESRC_VARIABLE newPath systemLib getSystemLibrarySourcePath JavaRuntime JRESRCROOT_VARIABLE newPath systemLib getPackageRootPath newPath IWorkspace ResourcesPlugin getWorkspace IWorkspaceDescription wsDescription getDescription wasAutobuild wsDescription isAutoBuilding setAutobuild setJREVariable newPath CoreException LaunchingPlugin setAutobuild wasAutobuild CoreException LaunchingPlugin
private void setJRE Variable I Path new Path String var throws Core Exception Java Core set Classpath Variable var new Path get Monitor  setJREVariable IPath newPath CoreException JavaCore setClasspathVariable newPath getMonitor
private boolean set Autobuild I Workspace ws boolean new State throws Core Exception I Workspace Description ws Description ws get Description boolean old State ws Description is Auto Building if old State new State ws Description set Auto Building new State ws set Description ws Description return old State  setAutobuild IWorkspace newState CoreException IWorkspaceDescription wsDescription getDescription oldState wsDescription isAutoBuilding oldState newState wsDescription setAutoBuilding newState setDescription wsDescription oldState
protected I Progress Monitor get Monitor if f Monitor null return new Null Progress Monitor return f Monitor  IProgressMonitor getMonitor fMonitor NullProgressMonitor fMonitor

Return the code I Type code referenced in the specified configuration and contained in the specified project or throw a code Core Exception code whose message explains why this couldn t be done public static I Type get Main Type I Launch Configuration configuration I Java Project java Project throws Core Exception String main Type Name configuration get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME String null return get Main Type main Type Name java Project  IType CoreException IType getMainType ILaunchConfiguration IJavaProject javaProject CoreException mainTypeName getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME getMainType mainTypeName javaProject
Return the code I Type code referenced by the specified name and contained in the specified project or throw a code Core Exception code whose message explains why this couldn t be done public static I Type get Main Type String main Type Name I Java Project java Project throws Core Exception if main Type Name null main Type Name trim length 1 abort Launching Messages get String Java Launch Configuration Utils Main type not specified 3 null I Java Launch Configuration Constants ERR UNSPECIFIED MAIN TYPE NON NLS 1 I Type main Type null try main Type find Type java Project main Type Name catch Java Model Exception jme if main Type null abort Launching Messages get String Java Launch Configuration Utils Main type does not exist 4 null I Java Launch Configuration Constants ERR UNSPECIFIED MAIN TYPE NON NLS 1 return main Type  IType CoreException IType getMainType mainTypeName IJavaProject javaProject CoreException mainTypeName mainTypeName LaunchingMessages getString JavaLaunchConfigurationUtils Main_type_not_specified_3 IJavaLaunchConfigurationConstants ERR_UNSPECIFIED_MAIN_TYPE IType mainType mainType findType javaProject mainTypeName JavaModelException mainType LaunchingMessages getString JavaLaunchConfigurationUtils Main_type_does_not_exist_4 IJavaLaunchConfigurationConstants ERR_UNSPECIFIED_MAIN_TYPE mainType
Find the specified fully qualified type name in the specified java project public static I Type find Type I Java Project java Project String main Type Name throws Java Model Exception String path Str main Type Name replace java NON NLS 1 I Java Element java Element java Project find Element new Path path Str if java Element null return null else if java Element instanceof I Type return I Type java Element else if java Element get Element Type I Java Element COMPILATION UNIT String simple Name Signature get Simple Name main Type Name return I Compilation Unit java Element get Type simple Name else if java Element get Element Type I Java Element CLASS FILE return I Class File java Element get Type return null  IType findType IJavaProject javaProject mainTypeName JavaModelException pathStr mainTypeName IJavaElement javaElement javaProject findElement pathStr javaElement javaElement IType IType javaElement javaElement getElementType IJavaElement COMPILATION_UNIT simpleName getSimpleName mainTypeName ICompilationUnit javaElement getType simpleName javaElement getElementType IJavaElement CLASS_FILE IClassFile javaElement getType
Throws a core exception with the given message and optional exception The exception s status code will indicate an error param message error message param exception cause of the error or code null code exception Core Exception with the given message and underlying exception protected static void abort String message Throwable exception int code throws Core Exception throw new Core Exception new Status I Status ERROR Launching Plugin get Unique Identifier code message exception  CoreException CoreException CoreException IStatus LaunchingPlugin getUniqueIdentifier
Serializes a XML document into a string encoded in UTF8 format with platform line separators param doc document to serialize return the document as a string public static String serialize Document Document doc throws IO Exception Transformer Exception Byte Array Output Stream s new Byte Array Output Stream Transformer Factory factory Transformer Factory new Instance Transformer transformer factory new Transformer transformer set Output Property Output Keys METHOD xml NON NLS 1 transformer set Output Property Output Keys INDENT yes NON NLS 1 DOM Source source new DOM Source doc Stream Result output Target new Stream Result s transformer transform source output Target return s to String UTF8 NON NLS 1  serializeDocument IOException TransformerException ByteArrayOutputStream ByteArrayOutputStream TransformerFactory TransformerFactory newInstance newTransformer setOutputProperty OutputKeys setOutputProperty OutputKeys DOMSource DOMSource StreamResult outputTarget StreamResult outputTarget toString

public void launch I Launch Configuration configuration String mode I Launch launch I Progress Monitor monitor throws Core Exception if monitor null monitor new Null Progress Monitor monitor begin Task Message Format format 0 new String configuration get Name 3 NON NLS 1 check for cancellation if monitor is Canceled return monitor sub Task Launching Messages get String Java Local Application Launch Configuration Delegate Verifying launch attributes  1 NON NLS 1 String main Type Name verify Main Type Name configuration IVM Install vm verifyVM Install configuration IVM Runner runner vm getVM Runner mode if runner null abort Message Format format Launching Messages get String Java Local Application Launch Configuration Delegate 0 new String vm get Name mode null I Java Launch Configuration Constants ERR VM RUNNER DOES NOT EXIST NON NLS 1 File working Dir verify Working Directory configuration String working Dir Name null if working Dir null working Dir Name working Dir get Absolute Path Environment variables String envp Debug Plugin get Default get Launch Manager get Environment configuration Program VM args String pgm Args get Program Arguments configuration String vm Args getVM Arguments configuration Execution Arguments exec Args new Execution Arguments vm Args pgm Args VM specific attributes Map vm Attributes Map getVM Specific Attributes Map configuration Classpath String classpath get Classpath configuration Create VM config VM Runner Configuration run Config new VM Runner Configuration main Type Name classpath run Config set Program Arguments exec Args get Program Arguments Array run Config set Environment envp run Config setVM Arguments exec Args getVM Arguments Array run Config set Working Directory working Dir Name run Config setVM Specific Attributes Map vm Attributes Map Bootpath run Config set Boot Class Path get Bootpath configuration check for cancellation if monitor is Canceled return stop in main prepare Stop In Main configuration done the verification phase monitor worked 1 monitor sub Task Launching Messages get String Java Local Application Launch Configuration Delegate Creating source locator  2 NON NLS 1 set the default source locator if required set Default Source Locator launch configuration monitor worked 1 Launch the configuration 1 unit of work runner run run Config launch monitor check for cancellation if monitor is Canceled return monitor done  ILaunchConfiguration ILaunch IProgressMonitor CoreException NullProgressMonitor beginTask MessageFormat getName isCanceled subTask LaunchingMessages getString JavaLocalApplicationLaunchConfigurationDelegate Verifying_launch_attributes _1 mainTypeName verifyMainTypeName IVMInstall verifyVMInstall IVMRunner getVMRunner MessageFormat LaunchingMessages getString JavaLocalApplicationLaunchConfigurationDelegate getName IJavaLaunchConfigurationConstants ERR_VM_RUNNER_DOES_NOT_EXIST workingDir verifyWorkingDirectory workingDirName workingDir workingDirName workingDir getAbsolutePath DebugPlugin getDefault getLaunchManager getEnvironment pgmArgs getProgramArguments vmArgs getVMArguments ExecutionArguments execArgs ExecutionArguments vmArgs pgmArgs vmAttributesMap getVMSpecificAttributesMap getClasspath VMRunnerConfiguration runConfig VMRunnerConfiguration mainTypeName runConfig setProgramArguments execArgs getProgramArgumentsArray runConfig setEnvironment runConfig setVMArguments execArgs getVMArgumentsArray runConfig setWorkingDirectory workingDirName runConfig setVMSpecificAttributesMap vmAttributesMap runConfig setBootClassPath getBootpath isCanceled prepareStopInMain subTask LaunchingMessages getString JavaLocalApplicationLaunchConfigurationDelegate Creating_source_locator _2 setDefaultSourceLocator runConfig isCanceled

public I Source Container create Source Container String memento throws Core Exception Node node parse Document memento if node get Node Type Node ELEMENT NODE Element element Element node if java Project equals element get Node Name NON NLS 1 String string element get Attribute name NON NLS 1 if string null string length 0 abort Launching Messages get String Java Project Source Container Type Delegate 5 null NON NLS 1 I Workspace workspace Resources Plugin get Workspace I Project project workspace get Root get Project string I Java Project java Project Java Core create project return new Java Project Source Container java Project abort Launching Messages get String Java Project Source Container Type Delegate 6 null NON NLS 1 abort Launching Messages get String Java Project Source Container Type Delegate 7 null NON NLS 1 return null  ISourceContainer createSourceContainer CoreException parseDocument getNodeType ELEMENT_NODE javaProject getNodeName getAttribute LaunchingMessages getString JavaProjectSourceContainerTypeDelegate IWorkspace ResourcesPlugin getWorkspace IProject getRoot getProject IJavaProject javaProject JavaCore JavaProjectSourceContainer javaProject LaunchingMessages getString JavaProjectSourceContainerTypeDelegate LaunchingMessages getString JavaProjectSourceContainerTypeDelegate
public String get Memento I Source Container container throws Core Exception Java Project Source Container project Java Project Source Container container Document document new Document Element element document create Element java Project NON NLS 1 element set Attribute name project get Name NON NLS 1 document append Child element return serialize Document document  getMemento ISourceContainer CoreException JavaProjectSourceContainer JavaProjectSourceContainer newDocument createElement javaProject setAttribute getName appendChild serializeDocument

public void launch I Launch Configuration configuration String mode I Launch launch I Progress Monitor monitor throws Core Exception if monitor null monitor new Null Progress Monitor monitor begin Task Message Format format Launching Messages get String Java Remote Application Launch Configuration Delegate Attaching to  0  1 new String configuration get Name 3 NON NLS 1 check for cancellation if monitor is Canceled return monitor sub Task Launching Messages get String Java Remote Application Launch Configuration Delegate Verifying launch attributes  1 NON NLS 1 String connector Id getVM Connector Id configuration IVM Connector connector null if connector Id null connector Java Runtime get DefaultVM Connector else connector Java Runtime getVM Connector connector Id if connector null abort Launching Messages get String Java Remote Application Launch Configuration Delegate Connector not specified 2 null I Java Launch Configuration Constants ERR CONNECTOR NOT AVAILABLE NON NLS 1 Map arg Map configuration get Attribute I Java Launch Configuration Constants ATTR CONNECT MAP Map null check for cancellation if monitor is Canceled return monitor worked 1 monitor sub Task Launching Messages get String Java Remote Application Launch Configuration Delegate Creating source locator  2 NON NLS 1 set the default source locator if required set Default Source Locator launch configuration monitor worked 1 connect to remote VM connector connect arg Map monitor launch check for cancellation if monitor is Canceled return monitor done  ILaunchConfiguration ILaunch IProgressMonitor CoreException NullProgressMonitor beginTask MessageFormat LaunchingMessages getString JavaRemoteApplicationLaunchConfigurationDelegate Attaching_to_ _1 getName isCanceled subTask LaunchingMessages getString JavaRemoteApplicationLaunchConfigurationDelegate Verifying_launch_attributes _1 connectorId getVMConnectorId IVMConnector connectorId JavaRuntime getDefaultVMConnector JavaRuntime getVMConnector connectorId LaunchingMessages getString JavaRemoteApplicationLaunchConfigurationDelegate Connector_not_specified_2 IJavaLaunchConfigurationConstants ERR_CONNECTOR_NOT_AVAILABLE argMap getAttribute IJavaLaunchConfigurationConstants ATTR_CONNECT_MAP isCanceled subTask LaunchingMessages getString JavaRemoteApplicationLaunchConfigurationDelegate Creating_source_locator _2 setDefaultSourceLocator argMap isCanceled

see org eclipse debug internal core sourcelookup I Source Lookup Director initialize Participants public void initialize Participants add Participants new I Source Lookup Participant new Java Source Lookup Participant  ISourceLookupDirector initializeParticipants initializeParticipants addParticipants ISourceLookupParticipant JavaSourceLookupParticipant
see org eclipse debug internal core sourcelookup I Source Lookup Director supports Source Container Type org eclipse debug internal core sourcelookup I Source Container Type public boolean supports Source Container Type I Source Container Type type return f Filtered Types contains type get Id  ISourceLookupDirector supportsSourceContainerType ISourceContainerType supportsSourceContainerType ISourceContainerType fFilteredTypes getId

Translates the given runtime classpath entries into associated source containers param entries entries to translate param consider Source Attachments whether to consider source attachments when comparing against existing packagr fragment roots exception Core Exception if unable to expand the path public static I Source Container translate I Runtime Classpath Entry entries boolean consider Source Attachments throws Core Exception List containers new Array List entries length for int i 0 i entries length i I Runtime Classpath Entry entry entries i switch entry get Type case I Runtime Classpath Entry ARCHIVE I Package Fragment Root root get Package Fragment Root entry consider Source Attachments String path entry get Source Attachment Location if root null path null consider Source Attachments use the pkg frag root it there is no source attachment root get Package Fragment Root entry false if root null I Source Container container null if path null use the archive itself container new External Archive Source Container entry get Location true else container new External Archive Source Container path true if containers contains container containers add container else I Source Container container new Package Fragment Root Source Container root if containers contains container containers add container break case I Runtime Classpath Entry PROJECT I Resource resource entry get Resource if resource null resource get Type I Resource PROJECT I Source Container container new Java Project Source Container Java Core create I Project resource if containers contains container containers add container break default no other classpath types are valid in a resolved path break return I Source Container containers to Array new I Source Container containers size  considerSourceAttachments CoreException ISourceContainer IRuntimeClasspathEntry considerSourceAttachments CoreException ArrayList IRuntimeClasspathEntry getType IRuntimeClasspathEntry IPackageFragmentRoot getPackageFragmentRoot considerSourceAttachments getSourceAttachmentLocation considerSourceAttachments getPackageFragmentRoot ISourceContainer ExternalArchiveSourceContainer getLocation ExternalArchiveSourceContainer ISourceContainer PackageFragmentRootSourceContainer IRuntimeClasspathEntry IResource getResource getType IResource ISourceContainer JavaProjectSourceContainer JavaCore IProject ISourceContainer toArray ISourceContainer
Returns whether the given objects are equal allowing for code null code param a param b return whether the given objects are equal allowing for code null code private static boolean equal Or Null Object a Object b if a null return b null if b null return false return a equals b  equalOrNull
Returns whether the source attachments of the given package fragment root and runtime classpath entry are equal param root package fragment root param entry runtime classpath entry return whether the source attachments of the given package fragment root and runtime classpath entry are equal throws Java Model Exception private static boolean is Source Attachment Equal I Package Fragment Root root I Runtime Classpath Entry entry throws Java Model Exception return equal Or Null root get Source Attachment Path entry get Source Attachment Path  JavaModelException isSourceAttachmentEqual IPackageFragmentRoot IRuntimeClasspathEntry JavaModelException equalOrNull getSourceAttachmentPath getSourceAttachmentPath
Determines if the given archive runtime classpath entry exists in the workspace as a package fragment root Returns the associated package fragment root possible otherwise code null code param entry archive runtime classpath entry param consider Source Attachment whether the source attachments should be considered comparing against package fragment roots return package fragment root or code null code private static I Package Fragment Root get Package Fragment Root I Runtime Classpath Entry entry boolean consider Source Attachment I Resource resource entry get Resource if resource null Check all package fragment roots for case of external archive External jars are shared so it does not matter which project it originates from I Java Model model Java Core create Resources Plugin get Workspace get Root try I Java Project jps model get Java Projects for int i 0 i jps length i I Java Project jp jps i I Project p jp get Project if p is Open I Package Fragment Root all Roots jp get Package Fragment Roots for int j 0 j all Roots length j I Package Fragment Root root all Roots j if root is External root get Path equals new Path entry get Location if consider Source Attachment is Source Attachment Equal root entry use package fragment root return root catch Java Model Exception e Launching Plugin log e else check if the archive is a package fragment root I Project project resource get Project I Java Project jp Java Core create project try if project is Open jp exists I Package Fragment Root root jp get Package Fragment Root resource I Package Fragment Root all Roots jp get Package Fragment Roots for int j 0 j all Roots length j if all Roots j equals root ensure source attachment paths match if consider Source Attachment is Source Attachment Equal root entry use package fragment root return root check all other java projects to see if another project references the archive I Java Model model Java Core create Resources Plugin get Workspace get Root I Java Project jps model get Java Projects for int i 0 i jps length i I Java Project jp1 jps i I Project p jp1 get Project if p is Open I Package Fragment Root all Roots jp1 get Package Fragment Roots for int j 0 j all Roots length j I Package Fragment Root root all Roots j if root is External root get Path equals entry get Path if consider Source Attachment is Source Attachment Equal root entry use package fragment root return root catch Java Model Exception e Launching Plugin log e return null  considerSourceAttachment IPackageFragmentRoot getPackageFragmentRoot IRuntimeClasspathEntry considerSourceAttachment IResource getResource IJavaModel JavaCore ResourcesPlugin getWorkspace getRoot IJavaProject getJavaProjects IJavaProject IProject getProject isOpen IPackageFragmentRoot allRoots getPackageFragmentRoots allRoots IPackageFragmentRoot allRoots isExternal getPath getLocation considerSourceAttachment isSourceAttachmentEqual JavaModelException LaunchingPlugin IProject getProject IJavaProject JavaCore isOpen IPackageFragmentRoot getPackageFragmentRoot IPackageFragmentRoot allRoots getPackageFragmentRoots allRoots allRoots considerSourceAttachment isSourceAttachmentEqual IJavaModel JavaCore ResourcesPlugin getWorkspace getRoot IJavaProject getJavaProjects IJavaProject IProject getProject isOpen IPackageFragmentRoot allRoots getPackageFragmentRoots allRoots IPackageFragmentRoot allRoots isExternal getPath getPath considerSourceAttachment isSourceAttachmentEqual JavaModelException LaunchingPlugin

add a listener to clear cached value when a VM changes or is removed IVM Install Changed Listener listener new IVM Install Changed Listener public void defaultVM Install Changed IVM Install previous IVM Install current  IVMInstallChangedListener IVMInstallChangedListener defaultVMInstallChanged IVMInstall IVMInstall
public void vm Changed Property Change Event event if event get Source null fg Classpath Entries remove event get Source  vmChanged PropertyChangeEvent getSource fgClasspathEntries getSource
public void vm Added IVM Install new Vm  vmAdded IVMInstall newVm
public void vm Removed IVM Install removed Vm fg Classpath Entries remove removed Vm  vmRemoved IVMInstall removedVm fgClasspathEntries removedVm
Returns the classpath entries associated with the given VM param vm return classpath entries private static I Classpath Entry get Classpath Entries IVM Install vm if fg Classpath Entries null fg Classpath Entries new Hash Map 10 add a listener to clear cached value when a VM changes or is removed IVM Install Changed Listener listener new IVM Install Changed Listener public void defaultVM Install Changed IVM Install previous IVM Install current public void vm Changed Property Change Event event if event get Source null fg Classpath Entries remove event get Source public void vm Added IVM Install new Vm public void vm Removed IVM Install removed Vm fg Classpath Entries remove removed Vm Java Runtime addVM Install Changed Listener listener I Classpath Entry entries I Classpath Entry fg Classpath Entries get vm if entries null entries compute Classpath Entries vm fg Classpath Entries put vm entries return entries  IClasspathEntry getClasspathEntries IVMInstall fgClasspathEntries fgClasspathEntries HashMap IVMInstallChangedListener IVMInstallChangedListener defaultVMInstallChanged IVMInstall IVMInstall vmChanged PropertyChangeEvent getSource fgClasspathEntries getSource vmAdded IVMInstall newVm vmRemoved IVMInstall removedVm fgClasspathEntries removedVm JavaRuntime addVMInstallChangedListener IClasspathEntry IClasspathEntry fgClasspathEntries computeClasspathEntries fgClasspathEntries
Computes the classpath entries associated with a VM one entry per library param vm return classpath entries private static I Classpath Entry compute Classpath Entries IVM Install vm Library Location libs Java Runtime get Library Locations vm List entries new Array List libs length for int i 0 i libs length i if libs i get System Library Path is Empty I Path source Path libs i get System Library Source Path if source Path is Empty source Path null I Path root Path libs i get Package Root Path if root Path is Empty root Path null entries add Java Core new Library Entry libs i get System Library Path source Path root Path return I Classpath Entry entries to Array new I Classpath Entry entries size  IClasspathEntry computeClasspathEntries IVMInstall LibraryLocation JavaRuntime getLibraryLocations ArrayList getSystemLibraryPath isEmpty IPath sourcePath getSystemLibrarySourcePath sourcePath isEmpty sourcePath IPath rootPath getPackageRootPath rootPath isEmpty rootPath JavaCore newLibraryEntry getSystemLibraryPath sourcePath rootPath IClasspathEntry toArray IClasspathEntry
Constructs a JRE classpath conatiner on the given VM install param vm vm install cannot be code null code param path container path used to resolve this JRE public JRE Container IVM Install vm I Path path fVM Install vm f Path path  JREContainer IVMInstall IPath fVMInstall fPath
see I Classpath Container get Classpath Entries public I Classpath Entry get Classpath Entries return get Classpath Entries fVM Install  IClasspathContainer getClasspathEntries IClasspathEntry getClasspathEntries getClasspathEntries fVMInstall
see I Classpath Container get Description public String get Description String Buffer desc new String Buffer Launching Messages get String JRE Container JRE System Library 1 NON NLS 1 desc append NON NLS 1 desc append fVM Install get Name desc append NON NLS 1 return desc to String  IClasspathContainer getDescription getDescription StringBuffer StringBuffer LaunchingMessages getString JREContainer JRE_System_Library_1 fVMInstall getName toString
see I Classpath Container get Kind public int get Kind return I Classpath Container K DEFAULT SYSTEM  IClasspathContainer getKind getKind IClasspathContainer K_DEFAULT_SYSTEM
see I Classpath Container get Path public I Path get Path return f Path  IClasspathContainer getPath IPath getPath fPath

see Classpath Container Initializer initialize I Path I Java Project public void initialize I Path container Path I Java Project project throws Core Exception int size container Path segment Count if size 0 if container Path segment 0 equals Java Runtime JRE CONTAINER IVM Install vm resolveVM container Path JRE Container container null if vm null container new JRE Container vm container Path Java Core set Classpath Container container Path new I Java Project project new I Classpath Container container null  ClasspathContainerInitializer IPath IJavaProject IPath containerPath IJavaProject CoreException containerPath segmentCount containerPath JavaRuntime JRE_CONTAINER IVMInstall containerPath JREContainer JREContainer containerPath JavaCore setClasspathContainer containerPath IJavaProject IClasspathContainer
Returns the VM install associated with the container path or code null code if it does not exist public static IVM Install resolveVM I Path container Path IVM Install vm null if container Path segment Count 1 specific JRE String vm Type Id getVM Type Id container Path String vm Name getVM Name container Path IVM Install Type vm Type Java Runtime getVM Install Type vm Type Id if vm Type null vm vm Type findVM Install By Name vm Name else workspace default JRE vm Java Runtime get DefaultVM Install return vm  IVMInstall IPath containerPath IVMInstall containerPath segmentCount vmTypeId getVMTypeId containerPath vmName getVMName containerPath IVMInstallType vmType JavaRuntime getVMInstallType vmTypeId vmType vmType findVMInstallByName vmName JavaRuntime getDefaultVMInstall
Returns the VM type identifier from the given container ID path return the VM type identifier from the given container ID path public static String getVM Type Id I Path path return path segment 1  getVMTypeId IPath
Returns the VM name from the given container ID path return the VM name from the given container ID path public static String getVM Name I Path path return path remove First Segments 2 to String  getVMName IPath removeFirstSegments toString
The container can be updated if it refers to an existing VM see org eclipse jdt core Classpath Container Initializer can Update Classpath Container org eclipse core runtime I Path org eclipse jdt core I Java Project public boolean can Update Classpath Container I Path container Path I Java Project project if container Path null container Path segment Count 0 if Java Runtime JRE CONTAINER equals container Path segment 0 return resolveVM container Path null return false  ClasspathContainerInitializer canUpdateClasspathContainer IPath IJavaProject canUpdateClasspathContainer IPath containerPath IJavaProject containerPath containerPath segmentCount JavaRuntime JRE_CONTAINER containerPath containerPath
see org eclipse jdt core Classpath Container Initializer request Classpath Container Update org eclipse core runtime I Path org eclipse jdt core I Java Project org eclipse jdt core I Classpath Container public void request Classpath Container Update I Path container Path I Java Project project I Classpath Container container Suggestion throws Core Exception IVM Install vm resolveVM container Path if vm null I Status status new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR VM INSTALL DOES NOT EXIST Message Format format Launching Messages get String JRE Container Initializer JRE referenced by classpath container  0  does not exist  1 new String container Path to String null NON NLS 1 throw new Core Exception status update of the vm with new library locations I Classpath Entry entries container Suggestion get Classpath Entries Library Location libs new Library Location entries length for int i 0 i entries length i I Classpath Entry entry entries i if entry get Entry Kind I Classpath Entry CPE LIBRARY I Path path entry get Path File lib path to File if lib exists lib is File I Path src Path entry get Source Attachment Path if src Path null src Path Path EMPTY I Path root Path entry get Source Attachment Root Path if root Path null root Path Path EMPTY libs i new Library Location path src Path root Path else I Status status new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR INTERNAL ERROR Message Format format Launching Messages get String JRE Container Initializer Classpath entry  0  does not refer to an existing library  2 new String entry get Path to String null NON NLS 1 throw new Core Exception status else I Status status new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR INTERNAL ERROR Message Format format Launching Messages get String JRE Container Initializer Classpath entry  0  does not refer to a library  3 new String entry get Path to String null NON NLS 1 throw new Core Exception status VM Standin standin new VM Standin vm standin set Library Locations libs standin convert To RealVM Java Runtime saveVM Configuration  ClasspathContainerInitializer requestClasspathContainerUpdate IPath IJavaProject IClasspathContainer requestClasspathContainerUpdate IPath containerPath IJavaProject IClasspathContainer containerSuggestion CoreException IVMInstall containerPath IStatus IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_VM_INSTALL_DOES_NOT_EXIST MessageFormat LaunchingMessages getString JREContainerInitializer JRE_referenced_by_classpath_container_ _does_not_exist _1 containerPath toString CoreException IClasspathEntry containerSuggestion getClasspathEntries LibraryLocation LibraryLocation IClasspathEntry getEntryKind IClasspathEntry CPE_LIBRARY IPath getPath toFile isFile IPath srcPath getSourceAttachmentPath srcPath srcPath IPath rootPath getSourceAttachmentRootPath rootPath rootPath LibraryLocation srcPath rootPath IStatus IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR MessageFormat LaunchingMessages getString JREContainerInitializer Classpath_entry_ _does_not_refer_to_an_existing_library _2 getPath toString CoreException IStatus IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR MessageFormat LaunchingMessages getString JREContainerInitializer Classpath_entry_ _does_not_refer_to_a_library _3 getPath toString CoreException VMStandin VMStandin setLibraryLocations convertToRealVM JavaRuntime saveVMConfiguration
see org eclipse jdt core Classpath Container Initializer get Description org eclipse core runtime I Path org eclipse jdt core I Java Project public String get Description I Path container Path I Java Project project if container Path segment Count 3 String Buffer desc new String Buffer Launching Messages get String JRE Container JRE System Library 1 NON NLS 1 desc append NON NLS 1 desc append container Path segment 2 desc append NON NLS 1 return desc to String return Launching Messages get String JRE Container Initializer Default System Library 1 NON NLS 1  ClasspathContainerInitializer getDescription IPath IJavaProject getDescription IPath containerPath IJavaProject containerPath segmentCount StringBuffer StringBuffer LaunchingMessages getString JREContainer JRE_System_Library_1 containerPath toString LaunchingMessages getString JREContainerInitializer Default_System_Library_1

see I Runtime Classpath Entry Resolver resolve Runtime Classpath Entry I Runtime Classpath Entry I Launch Configuration public I Runtime Classpath Entry resolve Runtime Classpath Entry I Runtime Classpath Entry entry I Launch Configuration configuration throws Core Exception IVM Install jre null if entry get Type I Runtime Classpath Entry CONTAINER entry get Path segment Count 1 a specific VM jre JRE Container Initializer resolveVM entry get Path else default VM for config jre Java Runtime computeVM Install configuration if jre null cannot resolve JRE return new I Runtime Classpath Entry 0 return resolve Library Locations jre entry get Classpath Property  IRuntimeClasspathEntryResolver resolveRuntimeClasspathEntry IRuntimeClasspathEntry ILaunchConfiguration IRuntimeClasspathEntry resolveRuntimeClasspathEntry IRuntimeClasspathEntry ILaunchConfiguration CoreException IVMInstall getType IRuntimeClasspathEntry getPath segmentCount JREContainerInitializer getPath JavaRuntime computeVMInstall IRuntimeClasspathEntry resolveLibraryLocations getClasspathProperty
see I Runtime Classpath Entry Resolver resolve Runtime Classpath Entry I Runtime Classpath Entry I Java Project public I Runtime Classpath Entry resolve Runtime Classpath Entry I Runtime Classpath Entry entry I Java Project project throws Core Exception IVM Install jre null if entry get Type I Runtime Classpath Entry CONTAINER entry get Path segment Count 1 a specific VM jre JRE Container Initializer resolveVM entry get Path else default VM for project jre Java Runtime getVM Install project if jre null cannot resolve JRE return new I Runtime Classpath Entry 0 return resolve Library Locations jre entry get Classpath Property  IRuntimeClasspathEntryResolver resolveRuntimeClasspathEntry IRuntimeClasspathEntry IJavaProject IRuntimeClasspathEntry resolveRuntimeClasspathEntry IRuntimeClasspathEntry IJavaProject CoreException IVMInstall getType IRuntimeClasspathEntry getPath segmentCount JREContainerInitializer getPath JavaRuntime getVMInstall IRuntimeClasspathEntry resolveLibraryLocations getClasspathProperty
Resolves libray locations for the given VM install protected I Runtime Classpath Entry resolve Library Locations IVM Install vm int kind if kind I Runtime Classpath Entry BOOTSTRAP CLASSES File vm Install Location vm get Install Location if vm Install Location null Library Info library Info Launching Plugin get Library Info vm Install Location get Absolute Path if library Info null only return bootstrap classpath entries if we have the info String bootpath library Info get Bootpath int length bootpath length use libs to set source attachment properly Library Location libs Java Runtime get Library Locations vm List resolved Entries new Array List length for int i 0 i length i I Path lib Path new Path bootpath i if lib Path to File exists I Runtime Classpath Entry resolved Java Runtime new Archive Runtime Classpath Entry lib Path resolved set Classpath Property I Runtime Classpath Entry BOOTSTRAP CLASSES for int j 0 j libs length j String resolved Path resolved get Path to String if libs j get System Library Path to String equals Ignore Case resolved Path I Path path libs j get System Library Source Path if path null path is Empty resolved set Source Attachment Path path resolved set Source Attachment Root Path libs j get Package Root Path break resolved Entries add resolved return I Runtime Classpath Entry resolved Entries to Array new I Runtime Classpath Entry resolved Entries size Library Location libs vm get Library Locations if libs null default system libs libs vm getVM Install Type get Default Library Locations vm get Install Location else custom system libs place on bootpath explicitly kind I Runtime Classpath Entry BOOTSTRAP CLASSES List resolved Entries new Array List libs length for int i 0 i libs length i I Path system Library Path libs i get System Library Path if system Library Path to File exists I Runtime Classpath Entry resolved Java Runtime new Archive Runtime Classpath Entry system Library Path I Path path libs i get System Library Source Path if path null path is Empty resolved set Source Attachment Path path resolved set Source Attachment Root Path libs i get Package Root Path resolved set Classpath Property kind resolved Entries add resolved return I Runtime Classpath Entry resolved Entries to Array new I Runtime Classpath Entry resolved Entries size  IRuntimeClasspathEntry resolveLibraryLocations IVMInstall IRuntimeClasspathEntry BOOTSTRAP_CLASSES vmInstallLocation getInstallLocation vmInstallLocation LibraryInfo libraryInfo LaunchingPlugin getLibraryInfo vmInstallLocation getAbsolutePath libraryInfo libraryInfo getBootpath LibraryLocation JavaRuntime getLibraryLocations resolvedEntries ArrayList IPath libPath libPath toFile IRuntimeClasspathEntry JavaRuntime newArchiveRuntimeClasspathEntry libPath setClasspathProperty IRuntimeClasspathEntry BOOTSTRAP_CLASSES resolvedPath getPath toString getSystemLibraryPath toString equalsIgnoreCase resolvedPath IPath getSystemLibrarySourcePath isEmpty setSourceAttachmentPath setSourceAttachmentRootPath getPackageRootPath resolvedEntries IRuntimeClasspathEntry resolvedEntries toArray IRuntimeClasspathEntry resolvedEntries LibraryLocation getLibraryLocations getVMInstallType getDefaultLibraryLocations getInstallLocation IRuntimeClasspathEntry BOOTSTRAP_CLASSES resolvedEntries ArrayList IPath systemLibraryPath getSystemLibraryPath systemLibraryPath toFile IRuntimeClasspathEntry JavaRuntime newArchiveRuntimeClasspathEntry systemLibraryPath IPath getSystemLibrarySourcePath isEmpty setSourceAttachmentPath setSourceAttachmentRootPath getPackageRootPath setClasspathProperty resolvedEntries IRuntimeClasspathEntry resolvedEntries toArray IRuntimeClasspathEntry resolvedEntries
see I Runtime Classpath Entry Resolver resolveVM Install I Classpath Entry public IVM Install resolveVM Install I Classpath Entry entry switch entry get Entry Kind case I Classpath Entry CPE VARIABLE if entry get Path segment 0 equals Java Runtime JRELIB VARIABLE return Java Runtime get DefaultVM Install break case I Classpath Entry CPE CONTAINER if entry get Path segment 0 equals Java Runtime JRE CONTAINER return JRE Container Initializer resolveVM entry get Path break default break return null  IRuntimeClasspathEntryResolver resolveVMInstall IClasspathEntry IVMInstall resolveVMInstall IClasspathEntry getEntryKind IClasspathEntry CPE_VARIABLE getPath JavaRuntime JRELIB_VARIABLE JavaRuntime getDefaultVMInstall IClasspathEntry CPE_CONTAINER getPath JavaRuntime JRE_CONTAINER JREContainerInitializer getPath

public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

Returns the JRE container id that the given VM would map to or code null code if none param vm return container id or code null code private I Path get Container Id IVM Install vm if vm null String name vm get Name if name null I Path path new Path Java Runtime JRE CONTAINER path path append new Path vm getVM Install Type get Id path path append new Path name return path return null  IPath getContainerId IVMInstall getName IPath JavaRuntime JRE_CONTAINER getVMInstallType getId
see org eclipse jdt launching IVM Install Changed Listener defaultVM Install Changed org eclipse jdt launching IVM Install org eclipse jdt launching IVM Install public void defaultVM Install Changed IVM Install previous IVM Install current f Default Changed true  IVMInstallChangedListener defaultVMInstallChanged IVMInstall IVMInstall defaultVMInstallChanged IVMInstall IVMInstall fDefaultChanged
see org eclipse jdt launching IVM Install Changed Listener vm Added org eclipse jdt launching IVM Install public void vm Added IVM Install vm  IVMInstallChangedListener vmAdded IVMInstall vmAdded IVMInstall
see org eclipse jdt launching IVM Install Changed Listener vm Changed org eclipse jdt launching Property Change Event public void vm Changed org eclipse jdt launching Property Change Event event String property event get Property IVM Install vm IVM Install event get Source if property equals IVM Install Changed Listener PROPERTY NAME I Path new Id get Container Id vm I Path old Id new Path Java Runtime JRE CONTAINER old Id old Id append vm getVM Install Type get Id String old Name String event get Old Value bug 33746 if there is no old name then this is not a re name if old Name null old Id old Id append old Name f Renamed Container Ids put old Id new Id  IVMInstallChangedListener vmChanged PropertyChangeEvent vmChanged PropertyChangeEvent getProperty IVMInstall IVMInstall getSource IVMInstallChangedListener PROPERTY_NAME IPath newId getContainerId IPath oldId JavaRuntime JRE_CONTAINER oldId oldId getVMInstallType getId oldName getOldValue oldName oldId oldId oldName fRenamedContainerIds oldId newId
see org eclipse jdt launching IVM Install Changed Listener vm Removed org eclipse jdt launching IVM Install public void vm Removed IVM Install vm  IVMInstallChangedListener vmRemoved IVMInstall vmRemoved IVMInstall
Re bind classpath variables and containers affected by the JRE changes public void process throws Core Exception JRE Update Job job new JRE Update Job this job schedule  CoreException JREUpdateJob JREUpdateJob
I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception I Java Project projects Java Core create Resources Plugin get Workspace get Root get Java Projects monitor begin Task Launching Messages get String Launching Plugin 0 projects length 1 NON NLS 1 rebind monitor projects monitor done  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException IJavaProject JavaCore ResourcesPlugin getWorkspace getRoot getJavaProjects beginTask LaunchingMessages getString LaunchingPlugin
protected void doit I Progress Monitor monitor throws Core Exception I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception I Java Project projects Java Core create Resources Plugin get Workspace get Root get Java Projects monitor begin Task Launching Messages get String Launching Plugin 0 projects length 1 NON NLS 1 rebind monitor projects monitor done Java Core run runnable null monitor  IProgressMonitor CoreException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException IJavaProject JavaCore ResourcesPlugin getWorkspace getRoot getJavaProjects beginTask LaunchingMessages getString LaunchingPlugin JavaCore
Re bind classpath variables and containers affected by the JRE changes param monitor private void rebind I Progress Monitor monitor I Java Project projects throws Core Exception if f Default Changed re bind JRELIB if the default VM changed Java Classpath Variables Initializer initializer new Java Classpath Variables Initializer initializer initialize Java Runtime JRELIB VARIABLE initializer initialize Java Runtime JRESRC VARIABLE initializer initialize Java Runtime JRESRCROOT VARIABLE monitor worked 1 re bind all container entries for int i 0 i projects length i I Java Project project projects i I Classpath Entry entries project get Raw Classpath boolean replace false for int j 0 j entries length j I Classpath Entry entry entries j switch entry get Entry Kind case I Classpath Entry CPE CONTAINER I Path reference entry get Path I Path new Binding null String first Segment reference segment 0 if Java Runtime JRE CONTAINER equals first Segment if reference segment Count 1 I Path renamed I Path f Renamed Container Ids get reference if renamed null The JRE was re named This changes the identifier of the container entry new Binding renamed JRE Container Initializer initializer new JRE Container Initializer if new Binding null rebind old path initializer initialize reference project else replace old cp entry with a new one I Classpath Entry new Entry Java Core new Container Entry new Binding entry is Exported entries j new Entry replace true break default break if replace project set Raw Classpath entries null monitor worked 1  IProgressMonitor IJavaProject CoreException fDefaultChanged JavaClasspathVariablesInitializer JavaClasspathVariablesInitializer JavaRuntime JRELIB_VARIABLE JavaRuntime JRESRC_VARIABLE JavaRuntime JRESRCROOT_VARIABLE IJavaProject IClasspathEntry getRawClasspath IClasspathEntry getEntryKind IClasspathEntry CPE_CONTAINER IPath getPath IPath newBinding firstSegment JavaRuntime JRE_CONTAINER firstSegment segmentCount IPath IPath fRenamedContainerIds newBinding JREContainerInitializer JREContainerInitializer newBinding IClasspathEntry newEntry JavaCore newContainerEntry newBinding isExported newEntry setRawClasspath
public JRE Update Job VM Changes changes super Launching Messages get String Launching Plugin 1 NON NLS 1 f Changes changes set System true  JREUpdateJob VMChanges LaunchingMessages getString LaunchingPlugin fChanges setSystem
protected I Status run I Progress Monitor monitor try f Changes doit monitor catch Core Exception e return e get Status return Status OK STATUS  IStatus IProgressMonitor fChanges CoreException getStatus OK_STATUS
public Launching Plugin super fg Launching Plugin this  LaunchingPlugin fgLaunchingPlugin
Returns the library info that corresponds to the specified JRE install path or code null code if none return the library info that corresponds to the specified JRE install path or code null code if none public static Library Info get Library Info String java Install Path if fg Library Info Map null restore Library Info return Library Info fg Library Info Map get java Install Path  LibraryInfo getLibraryInfo javaInstallPath fgLibraryInfoMap restoreLibraryInfo LibraryInfo fgLibraryInfoMap javaInstallPath
Sets the library info that corresponds to the specified JRE install path param java Install Path home location for a JRE param info the libary information or code null code to remove public static void set Library Info String java Install Path Library Info info if fg Library Info Map null restore Library Info if info null fg Library Info Map remove java Install Path else fg Library Info Map put java Install Path info save Library Info  javaInstallPath setLibraryInfo javaInstallPath LibraryInfo fgLibraryInfoMap restoreLibraryInfo fgLibraryInfoMap javaInstallPath fgLibraryInfoMap javaInstallPath saveLibraryInfo
Return a code java io File code object that corresponds to the specified code I Path code in the plugin directory public static File get File In Plugin I Path path try URL installURL new URL get Default get Bundle get Entry path to String NON NLS 1 URL localURL Platform as LocalURL installURL return new File localURL get File catch IO Exception ioe return null  IPath getFileInPlugin IPath getDefault getBundle getEntry toString asLocalURL getFile IOException
Convenience method which returns the unique identifier of this plugin public static String get Unique Identifier return ID PLUGIN  getUniqueIdentifier ID_PLUGIN
public static Launching Plugin get Default return fg Launching Plugin  LaunchingPlugin getDefault fgLaunchingPlugin
public static void log I Status status get Default get Log log status  IStatus getDefault getLog
public static void log String message log new Status I Status ERROR get Unique Identifier I Status ERROR message null  IStatus getUniqueIdentifier IStatus
public static void log Throwable e log new Status I Status ERROR get Unique Identifier I Status ERROR e get Message e  IStatus getUniqueIdentifier IStatus getMessage
Clears zip file cache Shutdown the launch config helper see Plugin stop Bundle Context public void stop Bundle Context context throws Exception try Debug Plugin get Default get Launch Manager remove Launch Listener this Debug Plugin get Default remove Debug Event Listener this Resources Plugin get Workspace remove Resource Change Listener this Archive Source Location close Archives get Plugin Preferences remove Property Change Listener this Java Runtime removeVM Install Changed Listener this Java Runtime saveVM Configuration save Plugin Preferences fgXML Parser null finally super stop context  BundleContext BundleContext DebugPlugin getDefault getLaunchManager removeLaunchListener DebugPlugin getDefault removeDebugEventListener ResourcesPlugin getWorkspace removeResourceChangeListener ArchiveSourceLocation closeArchives getPluginPreferences removePropertyChangeListener JavaRuntime removeVMInstallChangedListener JavaRuntime saveVMConfiguration savePluginPreferences fgXMLParser
see Plugin start Bundle Context public void start Bundle Context context throws Exception super start context Exclude launch configurations from being copied to the output directory String launch Filter I Launch Configuration LAUNCH CONFIGURATION FILE EXTENSION NON NLS 1 Hashtable options Map Java Core get Options String filters String options Map get org eclipse jdt core builder resource Copy Exclusion Filter NON NLS 1 boolean modified false if filters null filters length 0 filters launch Filter modified true else if filters index Of launch Filter 1 filters filters launch Filter NON NLS 1 modified true if modified options Map put org eclipse jdt core builder resource Copy Exclusion Filter filters NON NLS 1 Java Core set Options options Map set default preference values get Plugin Preferences set Default Java Runtime PREF CONNECT TIMEOUT Java Runtime DEF CONNECT TIMEOUT get Plugin Preferences add Property Change Listener this Java Runtime addVM Install Changed Listener this Resources Plugin get Workspace add Resource Change Listener this I Resource Change Event PRE DELETE I Resource Change Event PRE CLOSE Debug Plugin get Default get Launch Manager add Launch Listener this Debug Plugin get Default add Debug Event Listener this  BundleContext BundleContext launchFilter ILaunchConfiguration LAUNCH_CONFIGURATION_FILE_EXTENSION optionsMap JavaCore getOptions optionsMap resourceCopyExclusionFilter launchFilter indexOf launchFilter launchFilter optionsMap resourceCopyExclusionFilter JavaCore setOptions optionsMap getPluginPreferences setDefault JavaRuntime PREF_CONNECT_TIMEOUT JavaRuntime DEF_CONNECT_TIMEOUT getPluginPreferences addPropertyChangeListener JavaRuntime addVMInstallChangedListener ResourcesPlugin getWorkspace addResourceChangeListener IResourceChangeEvent PRE_DELETE IResourceChangeEvent PRE_CLOSE DebugPlugin getDefault getLaunchManager addLaunchListener DebugPlugin getDefault addDebugEventListener
Returns the VM connector with the specified id or code null code if none param id connector identifier return VM connector public IVM Connector getVM Connector String id if fVM Connectors null initializeVM Connectors return IVM Connector fVM Connectors get id  IVMConnector getVMConnector fVMConnectors initializeVMConnectors IVMConnector fVMConnectors
Returns all VM connector extensions return VM connectors public IVM Connector getVM Connectors if fVM Connectors null initializeVM Connectors return IVM Connector fVM Connectors values to Array new IVM Connector fVM Connectors size  IVMConnector getVMConnectors fVMConnectors initializeVMConnectors IVMConnector fVMConnectors toArray IVMConnector fVMConnectors
Loads VM connector extensions private void initializeVM Connectors I Extension Point extension Point Platform get Extension Registry get Extension Point ID PLUGIN ID EXTENSION POINT VM CONNECTORS I Configuration Element configs extension Point get Configuration Elements Multi Status status new Multi Status get Unique Identifier I Status OK Launching Messages get String Launching Plugin Exception occurred reading vmConnectors extensions 1 null NON NLS 1 fVM Connectors new Hash Map configs length for int i 0 i configs length i try IVM Connector vm Connector IVM Connector configs i create Executable Extension class NON NLS 1 fVM Connectors put vm Connector get Identifier vm Connector catch Core Exception e status add e get Status if status isOK Launching Plugin log status  initializeVMConnectors IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint ID_PLUGIN ID_EXTENSION_POINT_VM_CONNECTORS IConfigurationElement extensionPoint getConfigurationElements MultiStatus MultiStatus getUniqueIdentifier IStatus LaunchingMessages getString LaunchingPlugin Exception_occurred_reading_vmConnectors_extensions_1 fVMConnectors HashMap IVMConnector vmConnector IVMConnector createExecutableExtension fVMConnectors vmConnector getIdentifier vmConnector CoreException getStatus LaunchingPlugin
Returns a new runtime classpath entry of the specified type param id extension type id return new uninitialized runtime classpath entry throws Core Exception if unable to create an entry public I Runtime Classpath Entry2 new Runtime Classpath Entry String id throws Core Exception if f Classpath Entry Extensions null initialize Runtime Classpath Extensions I Configuration Element config I Configuration Element f Classpath Entry Extensions get id if config null abort Message Format format Launching Messages get String Launching Plugin 32 new String id null NON NLS 1 return I Runtime Classpath Entry2 config create Executable Extension class NON NLS 1  CoreException IRuntimeClasspathEntry2 newRuntimeClasspathEntry CoreException fClasspathEntryExtensions initializeRuntimeClasspathExtensions IConfigurationElement IConfigurationElement fClasspathEntryExtensions MessageFormat LaunchingMessages getString LaunchingPlugin IRuntimeClasspathEntry2 createExecutableExtension
Loads runtime classpath extensions private void initialize Runtime Classpath Extensions I Extension Point extension Point Platform get Extension Registry get Extension Point Launching Plugin ID PLUGIN ID EXTENSION POINT RUNTIME CLASSPATH ENTRIES I Configuration Element configs extension Point get Configuration Elements f Classpath Entry Extensions new Hash Map configs length for int i 0 i configs length i f Classpath Entry Extensions put configs i get Attribute id configs i NON NLS 1  initializeRuntimeClasspathExtensions IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint LaunchingPlugin ID_PLUGIN ID_EXTENSION_POINT_RUNTIME_CLASSPATH_ENTRIES IConfigurationElement extensionPoint getConfigurationElements fClasspathEntryExtensions HashMap fClasspathEntryExtensions getAttribute
Save preferences whenever the connect timeout changes Process changes to the list of installed JR Es see org eclipse core runtime Preferences I Property Change Listener property Change Property Change Event public void property Change Property Change Event event String property event get Property if property equals Java Runtime PREF CONNECT TIMEOUT save Plugin Preferences else if property equals Java Runtime PREF VM XML if is IgnoreVM Def Property Change Events processVM Prefs Changed String event get Old Value String event get New Value  JREs IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent getProperty JavaRuntime PREF_CONNECT_TIMEOUT savePluginPreferences JavaRuntime PREF_VM_XML isIgnoreVMDefPropertyChangeEvents processVMPrefsChanged getOldValue getNewValue
Check for differences between the old new sets of installed JR Es Differences may include additions deletions and changes Take appropriate action for each type of difference When importing preferences TWO property Change events are fired The first has an old value but an empty new value The second has a new value but an empty old value Normal user changes to the preferences result in a single property Change event with both old and new values populated This method handles both types of notification protected void processVM Prefs Changed String old Value String new Value batch changes f Batching Changes true VM Changes vm Changes null try String old Pref String String new Pref String If empty new value save the old value and wait for 2nd property Change notification if new Value null new Value equals EMPTY STRING f OldVM Pref String old Value return An empty old value signals the second notification in the import preferences sequence Now that we have both old new prefs we can parse and compare them else if old Value null old Value equals EMPTY STRING old Pref String f OldVM Pref String new Pref String new Value If both old new values are present this is a normal user change else old Pref String old Value new Pref String new Value vm Changes new VM Changes Java Runtime addVM Install Changed Listener vm Changes Generate the previous V Ms VM Definitions Container old Results getVM Definitions old Pref String Generate the current VM Definitions Container new Results getVM Definitions new Pref String Determine the deteled V Ms List deleted old Results getVM List List current new Results get ValidVM List deleted remove All current Dispose deleted V Ms The disposeVM Install method fires notification of the deletion Iterator deleted Iterator deleted iterator while deleted Iterator has Next VM Standin deletedVM Standin VM Standin deleted Iterator next deletedVM Standin getVM Install Type disposeVM Install deletedVM Standin get Id Fire change notification for added and changed V Ms The convert To RealVM fires the appropriate notification Iterator iter current iterator while iter has Next VM Standin standin VM Standin iter next standin convert To RealVM set the new default VM install This will fire a defaultVM Changed if it in fact changed String new Default Id new Results get DefaultVM Install CompositeID if new Default Id null IVM Install new DefaultVM Java Runtime getVM From Composite Id new Default Id if new DefaultVM null try Java Runtime set DefaultVM Install new DefaultVM null false catch Core Exception ce log ce finally stop batch changes f Batching Changes false if vm Changes null Java Runtime removeVM Install Changed Listener vm Changes try vm Changes process catch Core Exception e log e  JREs propertyChange propertyChange processVMPrefsChanged oldValue newValue fBatchingChanges VMChanges vmChanges oldPrefString newPrefString propertyChange newValue newValue EMPTY_STRING fOldVMPrefString oldValue oldValue oldValue EMPTY_STRING oldPrefString fOldVMPrefString newPrefString newValue oldPrefString oldValue newPrefString newValue vmChanges VMChanges JavaRuntime addVMInstallChangedListener vmChanges VMs VMDefinitionsContainer oldResults getVMDefinitions oldPrefString VMDefinitionsContainer newResults getVMDefinitions newPrefString VMs oldResults getVMList newResults getValidVMList removeAll VMs disposeVMInstall deletedIterator deletedIterator hasNext VMStandin deletedVMStandin VMStandin deletedIterator deletedVMStandin getVMInstallType disposeVMInstall deletedVMStandin getId VMs convertToRealVM hasNext VMStandin VMStandin convertToRealVM defaultVMChanged newDefaultId newResults getDefaultVMInstallCompositeID newDefaultId IVMInstall newDefaultVM JavaRuntime getVMFromCompositeId newDefaultId newDefaultVM JavaRuntime setDefaultVMInstall newDefaultVM CoreException fBatchingChanges vmChanges JavaRuntime removeVMInstallChangedListener vmChanges vmChanges CoreException
Parse the given xml into a VM definitions container returning an empty container if an exception occurs param xml return VM Definitions Container private VM Definitions Container getVM Definitions String xml byte bytes xml get Bytes if bytes length 0 Byte Array Input Stream stream new Byte Array Input Stream bytes try return VM Definitions Container parseXML Into Container stream catch IO Exception e Launching Plugin log e return new VM Definitions Container  VMDefinitionsContainer VMDefinitionsContainer getVMDefinitions getBytes ByteArrayInputStream ByteArrayInputStream VMDefinitionsContainer parseXMLIntoContainer IOException LaunchingPlugin VMDefinitionsContainer
see IVM Install Changed Listener defaultVM Install Changed IVM Install IVM Install public void defaultVM Install Changed IVM Install previous IVM Install current if f Batching Changes try VM Changes changes new VM Changes changes defaultVM Install Changed previous current changes process catch Core Exception e log e  IVMInstallChangedListener defaultVMInstallChanged IVMInstall IVMInstall defaultVMInstallChanged IVMInstall IVMInstall fBatchingChanges VMChanges VMChanges defaultVMInstallChanged CoreException
see org eclipse jdt launching IVM Install Changed Listener vm Added org eclipse jdt launching IVM Install public void vm Added IVM Install vm  IVMInstallChangedListener vmAdded IVMInstall vmAdded IVMInstall
public void vm Changed org eclipse jdt launching Property Change Event event if f Batching Changes try VM Changes changes new VM Changes changes vm Changed event changes process catch Core Exception e log e  vmChanged PropertyChangeEvent fBatchingChanges VMChanges VMChanges vmChanged CoreException
public void vm Removed IVM Install vm if f Batching Changes try VM Changes changes new VM Changes changes vm Removed vm changes process catch Core Exception e log e  vmRemoved IVMInstall fBatchingChanges VMChanges VMChanges vmRemoved CoreException
Clear the archive cache when a project is about to be deleted see I Resource Change Listener resource Changed I Resource Change Event public void resource Changed I Resource Change Event event Archive Source Location close Archives  IResourceChangeListener resourceChanged IResourceChangeEvent resourceChanged IResourceChangeEvent ArchiveSourceLocation closeArchives
public void set IgnoreVM Def Property Change Events boolean ignore f IgnoreVM Def Property Change Events ignore  setIgnoreVMDefPropertyChangeEvents fIgnoreVMDefPropertyChangeEvents
public boolean is IgnoreVM Def Property Change Events return f IgnoreVM Def Property Change Events  isIgnoreVMDefPropertyChangeEvents fIgnoreVMDefPropertyChangeEvents
Return the VM definitions contained in this object as a String of XML The String is suitable for storing in the workbench preferences p The resulting XML is compatible with the static method code parseXML Into Container code p return String the results of flattening this object into XML throws IO Exception if this method fails Reasons include ul li serialization of the XML document failed li ul private static String get Library Info AsXML throws Parser Configuration Exception IO Exception Transformer Exception Document doc get Document Element config doc create Element library Infos NON NLS 1 doc append Child config Create a node for each info in the table Iterator locations fg Library Info Map key Set iterator while locations has Next String home String locations next Library Info info Library Info fg Library Info Map get home Element location Elemnet info As Element doc info location Elemnet set Attribute home home NON NLS 1 config append Child location Elemnet Serialize the Document and return the resulting String return Java Launch Configuration Utils serialize Document doc  parseXMLIntoContainer IOException getLibraryInfoAsXML ParserConfigurationException IOException TransformerException getDocument createElement libraryInfos appendChild fgLibraryInfoMap keySet hasNext LibraryInfo LibraryInfo fgLibraryInfoMap locationElemnet infoAsElement locationElemnet setAttribute appendChild locationElemnet JavaLaunchConfigurationUtils serializeDocument
Returns a Document that can be used to build a DOM tree return the Document throws Parser Configuration Exception if an exception occurs creating the document builder public static Document get Document throws Parser Configuration Exception Document Builder Factory dfactory Document Builder Factory new Instance Document Builder doc Builder dfactory new Document Builder Document doc doc Builder new Document return doc  ParserConfigurationException getDocument ParserConfigurationException DocumentBuilderFactory DocumentBuilderFactory newInstance DocumentBuilder docBuilder newDocumentBuilder docBuilder newDocument
Creates an XML element for the given info param doc param info return Element private static Element info As Element Document doc Library Info info Element library Element doc create Element library Info NON NLS 1 library Element set Attribute version info get Version NON NLS 1 append Path Elements doc bootpath library Element info get Bootpath NON NLS 1 append Path Elements doc extension Dirs library Element info get Extension Dirs NON NLS 1 append Path Elements doc endorsed Dirs library Element info get Endorsed Dirs NON NLS 1 return library Element  infoAsElement LibraryInfo libraryElement createElement libraryInfo libraryElement setAttribute getVersion appendPathElements libraryElement getBootpath appendPathElements extensionDirs libraryElement getExtensionDirs appendPathElements endorsedDirs libraryElement getEndorsedDirs libraryElement
Appends path elements to the given library element rooted by an element of the given type param doc param element Type param library Element param paths private static void append Path Elements Document doc String element Type Element library Element String paths if paths length 0 Element child doc create Element element Type library Element append Child child for int i 0 i paths length i String path paths i Element entry doc create Element entry NON NLS 1 child append Child entry entry set Attribute path path NON NLS 1  elementType libraryElement appendPathElements elementType libraryElement createElement elementType libraryElement appendChild createElement appendChild setAttribute
Saves the library info in a local workspace state location private static void save Library Info try String xml get Library Info AsXML I Path lib Path get Default get State Location lib Path lib Path append library Infos xml NON NLS 1 File file lib Path to File if file exists file create New File File Output Stream stream new File Output Stream file stream write xml get Bytes UTF8 NON NLS 1 stream close catch IO Exception e log e catch Parser Configuration Exception e log e catch Transformer Exception e log e  saveLibraryInfo getLibraryInfoAsXML IPath libPath getDefault getStateLocation libPath libPath libraryInfos libPath toFile createNewFile FileOutputStream FileOutputStream getBytes IOException ParserConfigurationException TransformerException
Restores library information for V Ms private static void restore Library Info fg Library Info Map new Hash Map 10 I Path lib Path get Default get State Location lib Path lib Path append library Infos xml NON NLS 1 File file lib Path to File if file exists try Input Stream stream new File Input Stream file Document Builder parser Document Builder Factory new Instance new Document Builder Element root parser parse new Input Source stream get Document Element if root get Node Name equals library Infos NON NLS 1 return Node List list root get Child Nodes int length list get Length for int i 0 i length i Node node list item i short type node get Node Type if type Node ELEMENT NODE Element element Element node String node Name element get Node Name if node Name equals Ignore Case library Info NON NLS 1 String version element get Attribute version NON NLS 1 String location element get Attribute home NON NLS 1 String bootpath get Paths FromXML element bootpath NON NLS 1 String ext Dirs get Paths FromXML element extension Dirs NON NLS 1 String end Dirs get Paths FromXML element endorsed Dirs NON NLS 1 if location null Library Info info new Library Info version bootpath ext Dirs end Dirs fg Library Info Map put location info catch IO Exception e log e catch Parser Configuration Exception e log e catch SAX Exception e log e  VMs restoreLibraryInfo fgLibraryInfoMap HashMap IPath libPath getDefault getStateLocation libPath libPath libraryInfos libPath toFile InputStream FileInputStream DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder InputSource getDocumentElement getNodeName libraryInfos NodeList getChildNodes getLength getNodeType ELEMENT_NODE nodeName getNodeName nodeName equalsIgnoreCase libraryInfo getAttribute getAttribute getPathsFromXML extDirs getPathsFromXML extensionDirs endDirs getPathsFromXML endorsedDirs LibraryInfo LibraryInfo extDirs endDirs fgLibraryInfoMap IOException ParserConfigurationException SAXException
private static String get Paths FromXML Element lib String path Type List paths new Array List Node List list lib get Child Nodes int length list get Length for int i 0 i length i Node node list item i short type node get Node Type if type Node ELEMENT NODE Element element Element node String node Name element get Node Name if node Name equals Ignore Case path Type Node List entries element get Child Nodes int num Entries entries get Length for int j 0 j num Entries j Node n entries item j short t n get Node Type if t Node ELEMENT NODE Element entry Element Element n String name entry Element get Node Name if name equals entry NON NLS 1 String path entry Element get Attribute path NON NLS 1 if path null path length 0 paths add path return String paths to Array new String paths size  getPathsFromXML pathType ArrayList NodeList getChildNodes getLength getNodeType ELEMENT_NODE nodeName getNodeName nodeName equalsIgnoreCase pathType NodeList getChildNodes numEntries getLength numEntries getNodeType ELEMENT_NODE entryElement entryElement getNodeName entryElement getAttribute toArray
When a launch is removed close all source archives Prevents file sharing violations see I Launches Listener launches Removed I Launch public void launches Removed I Launch launches Archive Source Location close Archives  ILaunchesListener launchesRemoved ILaunch launchesRemoved ILaunch ArchiveSourceLocation closeArchives
see I Launches Listener launches Added I Launch public void launches Added I Launch launches  ILaunchesListener launchesAdded ILaunch launchesAdded ILaunch
see I Launches Listener launches Changed I Launch public void launches Changed I Launch launches  ILaunchesListener launchesChanged ILaunch launchesChanged ILaunch
When a debug target or process terminates close source arhives Prevents file sharing violations see I Debug Event Set Listener handle Debug Events Debug Event public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i if event get Kind Debug Event TERMINATE Object source event get Source if source instanceof I Debug Target source instanceof I Process Archive Source Location close Archives  IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent DebugEvent getKind DebugEvent getSource IDebugTarget IProcess ArchiveSourceLocation closeArchives
Returns a shared XML parser return an XML parser throws Core Exception if unable to create a parser since 3 0 public static Document Builder get Parser throws Core Exception if fgXML Parser null try fgXML Parser Document Builder Factory new Instance new Document Builder catch Parser Configuration Exception e abort Launching Messages get String Launching Plugin 33 e NON NLS 1 catch Factory Configuration Error e abort Launching Messages get String Launching Plugin 34 e NON NLS 1 return fgXML Parser  CoreException DocumentBuilder getParser CoreException fgXMLParser fgXMLParser DocumentBuilderFactory newInstance newDocumentBuilder ParserConfigurationException LaunchingMessages getString LaunchingPlugin FactoryConfigurationError LaunchingMessages getString LaunchingPlugin fgXMLParser
Throws an exception with the given message and underlying exception param message error message param exception underlying exception or code null code if none throws Core Exception protected static void abort String message Throwable exception throws Core Exception I Status status new Status I Status ERROR Launching Plugin get Unique Identifier 0 message exception throw new Core Exception status  CoreException CoreException IStatus IStatus LaunchingPlugin getUniqueIdentifier CoreException

public Library Info String version String bootpath String ext Dirs String end Dirs f Version version f Bootpath bootpath f Extension Dirs ext Dirs f Endorsed Dirs end Dirs  LibraryInfo extDirs endDirs fVersion fBootpath fExtensionDirs extDirs fEndorsedDirs endDirs
Returns the version of this VM install return version public String get Version return f Version  getVersion fVersion
Returns a collection of extension directory paths for this VM install return a collection of absolute paths public String get Extension Dirs return f Extension Dirs  getExtensionDirs fExtensionDirs
Returns a collection of bootpath entries for this VM install return a collection of absolute paths public String get Bootpath return f Bootpath  getBootpath fBootpath
Returns a collection of endorsed directory paths for this VM install return a collection of absolute paths public String get Endorsed Dirs return f Endorsed Dirs  getEndorsedDirs fEndorsedDirs

Creates a listener list with the given initial capacity param capacity the number of listeners which this list can initially accept without growing its internal representation must be at least 1 public Listener List int capacity if capacity 1 throw new Illegal Argument Exception f Listeners new Object capacity f Size 0  ListenerList IllegalArgumentException fListeners fSize
Adds a listener to the list Has no effect if an identical listener is already registered param listener a listener public synchronized void add Object listener if listener null throw new Illegal Argument Exception check for duplicates using identity for int i 0 i f Size i if f Listeners i listener return grow array if necessary if f Size f Listeners length Object temp new Object f Size 2 1 System arraycopy f Listeners 0 temp 0 f Size f Listeners temp f Listeners f Size listener  IllegalArgumentException fSize fListeners fSize fListeners fSize fListeners fSize fListeners fListeners fSize
Returns an array containing all the registered listeners The resulting array is unaffected by subsequent adds or removes If there are no listeners registered the result is an empty array singleton instance no garbage is created Use this method when notifying listeners so that any modifications to the listener list during the notification will have no effect on the notification itself public synchronized Object get Listeners if f Size 0 return Empty Array Object result new Object f Size System arraycopy f Listeners 0 result 0 f Size return result  getListeners fSize EmptyArray fSize fListeners fSize
Removes a listener from the list Has no effect if an identical listener was not already registered param listener a listener public synchronized void remove Object listener if listener null throw new Illegal Argument Exception for int i 0 i f Size i if f Listeners i listener if f Size 0 f Listeners new Object 1 else if i f Size f Listeners i f Listeners f Size f Listeners f Size null return  IllegalArgumentException fSize fListeners fSize fListeners fSize fListeners fListeners fSize fListeners fSize
Removes all the listeners from the list public void remove All f Listeners new Object 0 f Size 0  removeAll fListeners fSize
Returns the number of registered listeners return the number of registered listeners public int size return f Size  fSize

public class MacOSX DebugVM Runner extends StandardVM Debugger public MacOSX DebugVM Runner IVM Install vm Instance super vm Instance  MacOSXDebugVMRunner StandardVMDebugger MacOSXDebugVMRunner IVMInstall vmInstance vmInstance
protected Process exec String cmd Line File working Directory throws Core Exception return super exec MacOSX Launching Plugin wrap get Class cmd Line working Directory  cmdLine workingDirectory CoreException MacOSXLaunchingPlugin getClass cmdLine workingDirectory
protected Process exec String cmd Line File working Directory String envp throws Core Exception return super exec MacOSX Launching Plugin wrap get Class cmd Line working Directory envp  cmdLine workingDirectory CoreException MacOSXLaunchingPlugin getClass cmdLine workingDirectory

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE public MacOSX Launching Plugin I Plugin Descriptor descriptor super descriptor fg Plugin this  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE MacOSXLaunchingPlugin IPluginDescriptor fgPlugin
public static MacOSX Launching Plugin get Default return fg Plugin  MacOSXLaunchingPlugin getDefault fgPlugin
static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException
Convenience method which returns the unique identifier of this plugin static String get Unique Identifier if get Default null If the default instance is not yet initialized return a static identifier This identifier must match the plugin id defined in plugin xml return org eclipse jdt launching macosx NON NLS 1 return get Default get Descriptor get Unique Identifier  getUniqueIdentifier getDefault getDefault getDescriptor getUniqueIdentifier
static String wrap Class clazz String cmd Line for int i 0 i cmd Line length i test whether we depend on SWT if useSWT cmd Line i return createSW Tlauncher clazz cmd Line cmd Line 0 return cmd Line  cmdLine cmdLine cmdLine createSWTlauncher cmdLine cmdLine cmdLine
private static boolean useSWT String arg return arg index Of swt jar 0 NON NLS 1 arg index Of org eclipse swt 0 NON NLS 1 ws equals arg NON NLS 1  indexOf indexOf
Returns path to executable static String createSW Tlauncher Class clazz String cmd Line String vm Version the following property is defined if Eclipse is started via java swt String java swt System get Property org eclipse swtlauncher NON NLS 1 if java swt null if not defined try to guess URL url Boot Loader get InstallURL java swt url get Path Eclipse app Contents MacOS java swt NON NLS 1 if java swt null return cmd Line give up try copy java swt to tmp in order to get the app name right Process process Runtime get Runtime exec new String bin cp java swt tmp NON NLS 1 NON NLS 2 process wait For java swt tmp java swt NON NLS 1 catch IO Exception e ignore and run java swt in place catch Interrupted Exception e ignore and run java swt in place String new Cmd Line new String cmd Line length 1 int arg Count 0 new Cmd Line arg Count java swt new Cmd Line arg Count X Xvm vm Version NON NLS 1 for int i 1 i cmd Line length i new Cmd Line arg Count cmd Line i return new Cmd Line  createSWTlauncher cmdLine vmVersion java_swt java_swt getProperty java_swt BootLoader getInstallURL java_swt getPath java_swt java_swt cmdLine java_swt getRuntime java_swt waitFor java_swt java_swt IOException java_swt InterruptedException java_swt newCmdLine cmdLine argCount newCmdLine argCount java_swt newCmdLine argCount XXvm vmVersion cmdLine newCmdLine argCount cmdLine newCmdLine

public class MacOSXVM Install extends AbstractVM Install MacOSXVM Install IVM Install Type type String id super type id  MacOSXVMInstall AbstractVMInstall MacOSXVMInstall IVMInstallType
public IVM Runner getVM Runner String mode if I Launch Manager RUN MODE equals mode return new MacOSXVM Runner this if I Launch Manager DEBUG MODE equals mode return new MacOSX DebugVM Runner this return null  IVMRunner getVMRunner ILaunchManager RUN_MODE MacOSXVMRunner ILaunchManager DEBUG_MODE MacOSXDebugVMRunner

public String get Name return MacOSX Launching Plugin get String MacOSXVM Type name NON NLS 1  getName MacOSXLaunchingPlugin getString MacOSXVMType
public IVM Install do CreateVM Install String id return new MacOSXVM Install this id  IVMInstall doCreateVMInstall MacOSXVMInstall
see IVM Install Type detect Install Location public File detect Install Location String javaVM Name System get Property java vm name NON NLS 1 if javaVM Name null JAVA VM NAME equals javaVM Name return null find all installed V Ms File default Location null File version Dir new File JVM VERSION LOC if version Dir exists version Dir is Directory File currentJDK new File version Dir CURRENT JVM try currentJDK currentJDK get Canonical File catch IO Exception ex Need Work File versions version Dir list Files for int i 0 i versions length i String version versions i get Name File home new File versions i JVM ROOT if home exists findVM Install version null CURRENT JVM equals version boolean is Default currentJDK equals versions i VM Standin vm new VM Standin this version vm set Install Location home String format MacOSX Launching Plugin get String is Default MacOSXVM Type jvm Default Name NON NLS 1 MacOSXVM Type jvm Name NON NLS 1 vm set Name Message Format format format new Object version vm set Library Locations get Default Library Locations home URL doc get Default Javadoc Location home if doc null vm set Javadoc Location doc IVM Install rvm vm convert To RealVM if is Default default Location home try Java Runtime set DefaultVM Install rvm null catch Core Exception e Need Work return default Location  IVMInstallType detectInstallLocation detectInstallLocation javaVMName getProperty javaVMName JAVA_VM_NAME javaVMName VMs defaultLocation versionDir JVM_VERSION_LOC versionDir versionDir isDirectory versionDir CURRENT_JVM getCanonicalFile IOException NeedWork versionDir listFiles getName JVM_ROOT findVMInstall CURRENT_JVM isDefault VMStandin VMStandin setInstallLocation MacOSXLaunchingPlugin getString isDefault MacOSXVMType jvmDefaultName MacOSXVMType jvmName setName MessageFormat setLibraryLocations getDefaultLibraryLocations getDefaultJavadocLocation setJavadocLocation IVMInstall convertToRealVM isDefault defaultLocation JavaRuntime setDefaultVMInstall CoreException NeedWork defaultLocation
Returns default library info for the given install location param install Location return Library Info protected Library Info get Default Library Info File install Location File classes new File install Location Classes NON NLS 1 File lib1 new File classes classes jar NON NLS 1 File lib2 new File classes ui jar NON NLS 1 String libs new String lib1 to String lib2 to String File lib new File install Location lib NON NLS 1 File ext Dir new File lib ext NON NLS 1 String dirs null if ext Dir null dirs new String 0 else dirs new String ext Dir get Absolute Path File end Dir new File lib endorsed NON NLS 1 String end Dirs null if end Dir null end Dirs new String 0 else end Dirs new String end Dir get Absolute Path return new Library Info libs dirs end Dirs NON NLS 1  installLocation LibraryInfo LibraryInfo getDefaultLibraryInfo installLocation installLocation toString toString installLocation extDir extDir extDir getAbsolutePath endDir endDirs endDir endDirs endDirs endDir getAbsolutePath LibraryInfo endDirs
protected I Path get Default System Library Source File lib Location File parent lib Location get Parent File while parent null File home new File parent JVM ROOT File parentsrc new File home src jar NON NLS 1 if parentsrc is File set Default Root Path src NON NLS 1 return new Path parentsrc get Path parentsrc new File home src zip NON NLS 1 if parentsrc is File set Default Root Path NON NLS 1 return new Path parentsrc get Path parent parent get Parent File set Default Root Path NON NLS 1 return Path EMPTY NON NLS 1  IPath getDefaultSystemLibrarySource libLocation libLocation getParentFile JVM_ROOT isFile setDefaultRootPath getPath isFile setDefaultRootPath getPath getParentFile setDefaultRootPath
see org eclipse jdt launching IVM Install Type validate Install Location java io File public I Status validate Install Location File java Home String id MacOSX Launching Plugin get Unique Identifier File java new File java Home bin File separator java NON NLS 2 NON NLS 1 if java is File return new Status I Status OK id 0 ok null NON NLS 1 return new Status I Status ERROR id 0 MacOSX Launching Plugin get String MacOSXVM Type error not Root null NON NLS 1  IVMInstallType validateInstallLocation IStatus validateInstallLocation javaHome MacOSXLaunchingPlugin getUniqueIdentifier javaHome isFile IStatus IStatus MacOSXLaunchingPlugin getString MacOSXVMType notRoot
see org eclipse jdt launching AbstractVM Install Type get Default Javadoc Location java io File public URL get Default Javadoc Location File install Location try in local filesystem String id null try String post File separator JVM ROOT String path install Location get Canonical Path if path starts With JVM VERSION LOC path ends With post id path substring JVM VERSION LOC length path length post length catch IO Exception ex we use the fall back from below if id null String s JAVADOC LOC id JAVADOC SUBDIR NON NLS 1 File doc Location new File s if doc Location exists s JAVADOC LOC id doc Location new File s if doc Location exists s null if s null try return new URL file s NON NLS 1 NON NLS 2 catch MalformedURL Exception ex we use the fall back from below fall back return super get Default Javadoc Location install Location  AbstractVMInstallType getDefaultJavadocLocation getDefaultJavadocLocation installLocation JVM_ROOT installLocation getCanonicalPath startsWith JVM_VERSION_LOC endsWith JVM_VERSION_LOC IOException JAVADOC_LOC JAVADOC_SUBDIR docLocation docLocation JAVADOC_LOC docLocation docLocation MalformedURLException getDefaultJavadocLocation installLocation

public class MacOSXVM Runner extends StandardVM Runner public MacOSXVM Runner IVM Install vm Instance super vm Instance  MacOSXVMRunner StandardVMRunner MacOSXVMRunner IVMInstall vmInstance vmInstance
protected Process exec String cmd Line File working Directory throws Core Exception return super exec MacOSX Launching Plugin wrap get Class cmd Line working Directory  cmdLine workingDirectory CoreException MacOSXLaunchingPlugin getClass cmdLine workingDirectory
protected Process exec String cmd Line File working Directory String envp throws Core Exception return super exec MacOSX Launching Plugin wrap get Class cmd Line working Directory envp  cmdLine workingDirectory CoreException MacOSXLaunchingPlugin getClass cmdLine workingDirectory

public I Source Container create Source Container String memento throws Core Exception Node node parse Document memento if node get Node Type Node ELEMENT NODE Element element Element node if package Fragment Root equals element get Node Name NON NLS 1 String string element get Attribute handle NON NLS 1 if string null string length 0 abort Launching Messages get String Package Fragment Root Source Container Type Delegate 6 null NON NLS 1 I Java Element root Java Core create string if root null root instanceof I Package Fragment Root return new Package Fragment Root Source Container I Package Fragment Root root abort Launching Messages get String Package Fragment Root Source Container Type Delegate 7 null NON NLS 1 else abort Launching Messages get String Package Fragment Root Source Container Type Delegate 8 null NON NLS 1 abort Launching Messages get String Java Project Source Container Type Delegate 7 null NON NLS 1 return null  ISourceContainer createSourceContainer CoreException parseDocument getNodeType ELEMENT_NODE packageFragmentRoot getNodeName getAttribute LaunchingMessages getString PackageFragmentRootSourceContainerTypeDelegate IJavaElement JavaCore IPackageFragmentRoot PackageFragmentRootSourceContainer IPackageFragmentRoot LaunchingMessages getString PackageFragmentRootSourceContainerTypeDelegate LaunchingMessages getString PackageFragmentRootSourceContainerTypeDelegate LaunchingMessages getString JavaProjectSourceContainerTypeDelegate
public String get Memento I Source Container container throws Core Exception Package Fragment Root Source Container root Package Fragment Root Source Container container Document document new Document Element element document create Element package Fragment Root NON NLS 1 element set Attribute handle root get Package Fragment Root get Handle Identifier NON NLS 1 document append Child element return serialize Document document  getMemento ISourceContainer CoreException PackageFragmentRootSourceContainer PackageFragmentRootSourceContainer newDocument createElement packageFragmentRoot setAttribute getPackageFragmentRoot getHandleIdentifier appendChild serializeDocument

Constructs a new runtime classpath entry based on the build classpath entry param entry the associated classpath entry public Runtime Classpath Entry I Classpath Entry entry switch entry get Entry Kind case I Classpath Entry CPE PROJECT set Type PROJECT break case I Classpath Entry CPE LIBRARY set Type ARCHIVE break case I Classpath Entry CPE VARIABLE set Type VARIABLE break default throw new Illegal Argument Exception Message Format format Launching Messages get String Runtime Classpath Entry Illegal classpath entry  0  1 new String entry to String NON NLS 1 set Classpath Entry entry initialize Classpath Property  RuntimeClasspathEntry IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT setType IClasspathEntry CPE_LIBRARY setType IClasspathEntry CPE_VARIABLE setType IllegalArgumentException MessageFormat LaunchingMessages getString RuntimeClasspathEntry Illegal_classpath_entry_ _1 toString setClasspathEntry initializeClasspathProperty
Constructs a new container entry in the context of the given project param entry classpath entry param classpath Property this entry s classpath property public Runtime Classpath Entry I Classpath Entry entry int classpath Property switch entry get Entry Kind case I Classpath Entry CPE CONTAINER set Type CONTAINER break default throw new Illegal Argument Exception Message Format format Launching Messages get String Runtime Classpath Entry Illegal classpath entry  0  1 new String entry to String NON NLS 1 set Classpath Entry entry set Classpath Property classpath Property  classpathProperty RuntimeClasspathEntry IClasspathEntry classpathProperty getEntryKind IClasspathEntry CPE_CONTAINER setType IllegalArgumentException MessageFormat LaunchingMessages getString RuntimeClasspathEntry Illegal_classpath_entry_ _1 toString setClasspathEntry setClasspathProperty classpathProperty
Reconstructs a runtime classpath entry from the given XML document root not param root a memento root doc element created by this class exception Core Exception if unable to restore from the given memento public Runtime Classpath Entry Element root throws Core Exception try set Type Integer parse Int root get Attribute type NON NLS 1 catch Number Format Exception e abort Launching Messages get String Runtime Classpath Entry Unable to recover runtime class path entry type 2 e NON NLS 1 try set Classpath Property Integer parse Int root get Attribute path NON NLS 1 catch Number Format Exception e abort Launching Messages get String Runtime Classpath Entry Unable to recover runtime class path entry location 3 e NON NLS 1 source attachment I Path source Path null I Path root Path null String path root get Attribute source Attachment Path NON NLS 1 if path null path length 0 source Path new Path path path root get Attribute source Root Path NON NLS 1 if path null path length 0 root Path new Path path switch get Type case PROJECT String name root get Attribute project Name NON NLS 1 if is Empty name abort Launching Messages get String Runtime Classpath Entry Unable to recover runtime class path entry   missing project name 4 null NON NLS 1 else I Project proj Resources Plugin get Workspace get Root get Project name set Classpath Entry Java Core new Project Entry proj get Full Path break case ARCHIVE path root get Attribute external Archive NON NLS 1 if is Empty path internal path root get Attribute internal Archive NON NLS 1 if is Empty path abort Launching Messages get String Runtime Classpath Entry Unable to recover runtime class path entry   missing archive path 5 null NON NLS 1 else set Classpath Entry Java Core new Library Entry new Path path source Path root Path else external set Classpath Entry Java Core new Library Entry new Path path source Path root Path break case VARIABLE String var root get Attribute container Path NON NLS 1 if is Empty var abort Launching Messages get String Runtime Classpath Entry Unable to recover runtime class path entry   missing variable name 6 null NON NLS 1 else set Classpath Entry Java Core new Variable Entry new Path var source Path root Path break case CONTAINER var root get Attribute container Path NON NLS 1 if is Empty var abort Launching Messages get String Runtime Classpath Entry Unable to recover runtime class path entry   missing variable name 6 null NON NLS 1 else set Classpath Entry Java Core new Container Entry new Path var break String name root get Attribute java Project NON NLS 1 if is Empty name f Java Project null else I Project project2 Resources Plugin get Workspace get Root get Project name f Java Project Java Core create project2  CoreException RuntimeClasspathEntry CoreException setType parseInt getAttribute NumberFormatException LaunchingMessages getString RuntimeClasspathEntry Unable_to_recover_runtime_class_path_entry_type_2 setClasspathProperty parseInt getAttribute NumberFormatException LaunchingMessages getString RuntimeClasspathEntry Unable_to_recover_runtime_class_path_entry_location_3 IPath sourcePath IPath rootPath getAttribute sourceAttachmentPath sourcePath getAttribute sourceRootPath rootPath getType getAttribute projectName isEmpty LaunchingMessages getString RuntimeClasspathEntry Unable_to_recover_runtime_class_path_entry_ _missing_project_name_4 IProject ResourcesPlugin getWorkspace getRoot getProject setClasspathEntry JavaCore newProjectEntry getFullPath getAttribute externalArchive isEmpty getAttribute internalArchive isEmpty LaunchingMessages getString RuntimeClasspathEntry Unable_to_recover_runtime_class_path_entry_ _missing_archive_path_5 setClasspathEntry JavaCore newLibraryEntry sourcePath rootPath setClasspathEntry JavaCore newLibraryEntry sourcePath rootPath getAttribute containerPath isEmpty LaunchingMessages getString RuntimeClasspathEntry Unable_to_recover_runtime_class_path_entry_ _missing_variable_name_6 setClasspathEntry JavaCore newVariableEntry sourcePath rootPath getAttribute containerPath isEmpty LaunchingMessages getString RuntimeClasspathEntry Unable_to_recover_runtime_class_path_entry_ _missing_variable_name_6 setClasspathEntry JavaCore newContainerEntry getAttribute javaProject isEmpty fJavaProject IProject ResourcesPlugin getWorkspace getRoot getProject fJavaProject JavaCore
Throws an internal error exception protected void abort String message Throwable e throws Core Exception I Status s new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR INTERNAL ERROR message e throw new Core Exception s  CoreException IStatus IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR CoreException
see I Runtime Classpath Entry get Type public int get Type return f Type  IRuntimeClasspathEntry getType getType fType
Sets this entry s type param type this entry s type private void set Type int type f Type type  setType fType
Sets the classpath entry associated with this runtime classpath entry Clears the cache of the resolved entry param entry the classpath entry associated with this runtime classpath entry private void set Classpath Entry I Classpath Entry entry f Classpath Entry entry f Resolved Entry null  setClasspathEntry IClasspathEntry fClasspathEntry fResolvedEntry
see I Runtime Classpath Entry get Classpath Entry public I Classpath Entry get Classpath Entry return f Classpath Entry  IRuntimeClasspathEntry getClasspathEntry IClasspathEntry getClasspathEntry fClasspathEntry
see I Runtime Classpath Entry get Memento public String get Memento throws Core Exception Document doc try doc Launching Plugin get Document catch Parser Configuration Exception e I Status status new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR INTERNAL ERROR Launching Messages get String Runtime Classpath Entry An exception occurred generating runtime classpath memento 8 e NON NLS 1 throw new Core Exception status Element node doc create Element runtime Classpath Entry NON NLS 1 doc append Child node node set Attribute type new Integer get Type to String NON NLS 1 node set Attribute path new Integer get Classpath Property to String NON NLS 1 switch get Type case PROJECT node set Attribute project Name get Path last Segment NON NLS 1 break case ARCHIVE I Resource res get Resource if res null node set Attribute external Archive get Path to String NON NLS 1 else node set Attribute internal Archive res get Full Path to String NON NLS 1 break case VARIABLE case CONTAINER node set Attribute container Path get Path to String NON NLS 1 break if get Source Attachment Path null node set Attribute source Attachment Path get Source Attachment Path to String NON NLS 1 if get Source Attachment Root Path null node set Attribute source Root Path get Source Attachment Root Path to String NON NLS 1 if get Java Project null node set Attribute java Project get Java Project get Element Name NON NLS 1 try return Java Launch Configuration Utils serialize Document doc catch IO Exception e I Status status new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR INTERNAL ERROR Launching Messages get String Runtime Classpath Entry An exception occurred generating runtime classpath memento 8 e NON NLS 1 throw new Core Exception status catch Transformer Exception e I Status status new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR INTERNAL ERROR Launching Messages get String Runtime Classpath Entry An exception occurred generating runtime classpath memento 8 e NON NLS 1 throw new Core Exception status  IRuntimeClasspathEntry getMemento getMemento CoreException LaunchingPlugin getDocument ParserConfigurationException IStatus IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR LaunchingMessages getString RuntimeClasspathEntry An_exception_occurred_generating_runtime_classpath_memento_8 CoreException createElement runtimeClasspathEntry appendChild setAttribute getType toString setAttribute getClasspathProperty toString getType setAttribute projectName getPath lastSegment IResource getResource setAttribute externalArchive getPath toString setAttribute internalArchive getFullPath toString setAttribute containerPath getPath toString getSourceAttachmentPath setAttribute sourceAttachmentPath getSourceAttachmentPath toString getSourceAttachmentRootPath setAttribute sourceRootPath getSourceAttachmentRootPath toString getJavaProject setAttribute javaProject getJavaProject getElementName JavaLaunchConfigurationUtils serializeDocument IOException IStatus IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR LaunchingMessages getString RuntimeClasspathEntry An_exception_occurred_generating_runtime_classpath_memento_8 CoreException TransformerException IStatus IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR LaunchingMessages getString RuntimeClasspathEntry An_exception_occurred_generating_runtime_classpath_memento_8 CoreException
see I Runtime Classpath Entry get Path public I Path get Path return get Classpath Entry get Path  IRuntimeClasspathEntry getPath IPath getPath getClasspathEntry getPath
see I Runtime Classpath Entry get Resource public I Resource get Resource switch get Type case CONTAINER case VARIABLE return null default return get Resource get Path  IRuntimeClasspathEntry getResource IResource getResource getType getResource getPath
Returns the resource in the workspace assciated with the given absolute path or code null code if none The path may have a device param path absolute path or code null code return resource or code null code protected I Resource get Resource I Path path if path null I Workspace Root root Resources Plugin get Workspace get Root if path get Device null search relative to the workspace if no device present return root find Member path look for files or folders with the given path I File files root find Files For Location path if files length 0 return files 0 I Container containers root find Containers For Location path if containers length 0 return containers 0 return null  IResource getResource IPath IWorkspaceRoot ResourcesPlugin getWorkspace getRoot getDevice findMember IFile findFilesForLocation IContainer findContainersForLocation
see I Runtime Classpath Entry get Source Attachment Path public I Path get Source Attachment Path return get Classpath Entry get Source Attachment Path  IRuntimeClasspathEntry getSourceAttachmentPath IPath getSourceAttachmentPath getClasspathEntry getSourceAttachmentPath
see I Runtime Classpath Entry set Source Attachment Path I Path public void set Source Attachment Path I Path path if path null path is Empty path null update Classpath Entry get Path path get Source Attachment Root Path  IRuntimeClasspathEntry setSourceAttachmentPath IPath setSourceAttachmentPath IPath isEmpty updateClasspathEntry getPath getSourceAttachmentRootPath
see I Runtime Classpath Entry get Source Attachment Root Path public I Path get Source Attachment Root Path I Path path get Classpath Entry get Source Attachment Root Path if path null get Source Attachment Path null return Path EMPTY return path  IRuntimeClasspathEntry getSourceAttachmentRootPath IPath getSourceAttachmentRootPath IPath getClasspathEntry getSourceAttachmentRootPath getSourceAttachmentPath
see I Runtime Classpath Entry set Source Attachment Path I Path public void set Source Attachment Root Path I Path path if path null path is Empty path null update Classpath Entry get Path get Source Attachment Path path  IRuntimeClasspathEntry setSourceAttachmentPath IPath setSourceAttachmentRootPath IPath isEmpty updateClasspathEntry getPath getSourceAttachmentPath
Initlaizes the classpath property based on this entry s type private void initialize Classpath Property switch get Type case VARIABLE if get Variable Name equals Java Runtime JRELIB VARIABLE set Classpath Property STANDARD CLASSES else set Classpath Property USER CLASSES break case PROJECT case ARCHIVE set Classpath Property USER CLASSES break default break  initializeClasspathProperty getType getVariableName JavaRuntime JRELIB_VARIABLE setClasspathProperty STANDARD_CLASSES setClasspathProperty USER_CLASSES setClasspathProperty USER_CLASSES
see I Runtime Classpath Entry set Classpath Property int public void set Classpath Property int location f Classpath Property location  IRuntimeClasspathEntry setClasspathProperty setClasspathProperty fClasspathProperty
see I Runtime Classpath Entry set Classpath Property int public int get Classpath Property return f Classpath Property  IRuntimeClasspathEntry setClasspathProperty getClasspathProperty fClasspathProperty
see I Runtime Classpath Entry get Location public String get Location I Path path null switch get Type case PROJECT I Java Project pro I Java Project Java Core create get Resource if pro null try path pro get Output Location catch Java Model Exception e Launching Plugin log e break case ARCHIVE path get Path break case VARIABLE I Classpath Entry resolved get Resolved Classpath Entry if resolved null path resolved get Path break case CONTAINER break return resolve ToOS Path path  IRuntimeClasspathEntry getLocation getLocation IPath getType IJavaProject IJavaProject JavaCore getResource getOutputLocation JavaModelException LaunchingPlugin getPath IClasspathEntry getResolvedClasspathEntry getPath resolveToOSPath
Returns the OS path for the given aboslute or workspace relative path protected String resolve ToOS Path I Path path if path null I Resource res null if path get Device null if there is no device specified find the resource res get Resource path if res null return path toOS String I Path location res get Location if location null return location toOS String return null  resolveToOSPath IPath IResource getDevice getResource toOSString IPath getLocation toOSString
see I Runtime Classpath Entry get Variable Name public String get Variable Name if get Type I Runtime Classpath Entry VARIABLE get Type I Runtime Classpath Entry CONTAINER return get Path segment 0 return null  IRuntimeClasspathEntry getVariableName getVariableName getType IRuntimeClasspathEntry getType IRuntimeClasspathEntry getPath
see Object equals Object public boolean equals Object obj if obj instanceof I Runtime Classpath Entry I Runtime Classpath Entry r I Runtime Classpath Entry obj if get Type r get Type get Classpath Property r get Classpath Property if get Type I Runtime Classpath Entry CONTAINER containers are equal if their ID is equal return get Path equals r get Path else if get Path equals r get Path I Path sa1 get Source Attachment Path I Path root1 get Source Attachment Root Path I Path sa2 r get Source Attachment Path I Path root2 r get Source Attachment Root Path return equal sa1 sa2 equal root1 root2 return false  IRuntimeClasspathEntry IRuntimeClasspathEntry IRuntimeClasspathEntry getType getType getClasspathProperty getClasspathProperty getType IRuntimeClasspathEntry getPath getPath getPath getPath IPath getSourceAttachmentPath IPath getSourceAttachmentRootPath IPath getSourceAttachmentPath IPath getSourceAttachmentRootPath
Returns whether the given objects are equal accounting for null protected boolean equal Object one Object two if one null return two null return one equals two 
see Object hash Code public int hash Code if get Type CONTAINER return get Path segment 0 hash Code get Type return get Path hash Code get Type  hashCode hashCode getType getPath hashCode getType getPath hashCode getType
see I Runtime Classpath Entry get Source Attachment Location public String get Source Attachment Location I Path path null switch get Type case VARIABLE case ARCHIVE I Classpath Entry resolved get Resolved Classpath Entry if resolved null path resolved get Source Attachment Path break default break return resolve ToOS Path path  IRuntimeClasspathEntry getSourceAttachmentLocation getSourceAttachmentLocation IPath getType IClasspathEntry getResolvedClasspathEntry getSourceAttachmentPath resolveToOSPath
see I Runtime Classpath Entry get Source Attachment Root Location public String get Source Attachment Root Location I Path path null switch get Type case VARIABLE case ARCHIVE I Classpath Entry resolved get Resolved Classpath Entry if resolved null path resolved get Source Attachment Root Path break default break if path null return path toOS String return null  IRuntimeClasspathEntry getSourceAttachmentRootLocation getSourceAttachmentRootLocation IPath getType IClasspathEntry getResolvedClasspathEntry getSourceAttachmentRootPath toOSString
Creates a new underlying classpath entry for this runtime classpath entry with the given paths due to a change in source attachment protected void update Classpath Entry I Path path I Path source Path I Path root Path I Classpath Entry entry null switch get Type case ARCHIVE entry Java Core new Library Entry path source Path root Path break case VARIABLE entry Java Core new Variable Entry path source Path root Path break default return set Classpath Entry entry  updateClasspathEntry IPath IPath sourcePath IPath rootPath IClasspathEntry getType JavaCore newLibraryEntry sourcePath rootPath JavaCore newVariableEntry sourcePath rootPath setClasspathEntry
Returns the resolved classpath entry associated with this runtime entry resolving if required protected I Classpath Entry get Resolved Classpath Entry if f Resolved Entry null f Resolved Entry Java Core get Resolved Classpath Entry get Classpath Entry return f Resolved Entry  IClasspathEntry getResolvedClasspathEntry fResolvedEntry fResolvedEntry JavaCore getResolvedClasspathEntry getClasspathEntry fResolvedEntry
protected boolean is Empty String string return string null string length 0  isEmpty
public String to String if f Classpath Entry null return f Classpath Entry to String return super to String  toString fClasspathEntry fClasspathEntry toString toString
see org eclipse jdt launching I Runtime Classpath Entry get Java Project public I Java Project get Java Project return f Java Project  IRuntimeClasspathEntry getJavaProject IJavaProject getJavaProject fJavaProject
Sets the Java project associated with this classpath entry param project Java project public void set Java Project I Java Project project f Java Project project  setJavaProject IJavaProject fJavaProject

see Comparator compare Object Object public int compare Object o1 Object o2 List list1 List o1 List list2 List o2 if list1 size list2 size for int i 0 i list1 size i String memento1 String list1 get i String memento2 String list2 get i if equals Ignore Whitespace memento1 memento2 return 1 return 0 return 1  equalsIgnoreWhitespace
protected boolean equals Ignore Whitespace String one String two int i1 0 int i2 0 int l1 one length int l2 two length char ch1 char ch2 while i1 l1 i2 l2 while i1 l1 Character is Whitespace ch1 one char At i1 i1 while i2 l2 Character is Whitespace ch2 two char At i2 i2 if i1 l1 i2 l2 return true if ch1 ch2 return false i1 i2 return true  equalsIgnoreWhitespace isWhitespace charAt isWhitespace charAt

Constructs a new resolver on the given configuration element public Runtime Classpath Entry Resolver I Configuration Element element f Configuration Element element  RuntimeClasspathEntryResolver IConfigurationElement fConfigurationElement
see I Runtime Classpath Entry Resolver resolve Runtime Classpath Entry I Runtime Classpath Entry I Launch Configuration public I Runtime Classpath Entry resolve Runtime Classpath Entry I Runtime Classpath Entry entry I Launch Configuration configuration throws Core Exception return get Resolver resolve Runtime Classpath Entry entry configuration  IRuntimeClasspathEntryResolver resolveRuntimeClasspathEntry IRuntimeClasspathEntry ILaunchConfiguration IRuntimeClasspathEntry resolveRuntimeClasspathEntry IRuntimeClasspathEntry ILaunchConfiguration CoreException getResolver resolveRuntimeClasspathEntry
Returns the resolver delegate and creates if required protected I Runtime Classpath Entry Resolver get Resolver throws Core Exception if f Delegate null f Delegate I Runtime Classpath Entry Resolver f Configuration Element create Executable Extension class NON NLS 1 return f Delegate  IRuntimeClasspathEntryResolver getResolver CoreException fDelegate fDelegate IRuntimeClasspathEntryResolver fConfigurationElement createExecutableExtension fDelegate
Returns the variable name this resolver is registered for or code null code public String get Variable Name return f Configuration Element get Attribute variable NON NLS 1  getVariableName fConfigurationElement getAttribute
Returns the container id this resolver is registered for or code null code public String get Container Id return f Configuration Element get Attribute container NON NLS 1  getContainerId fConfigurationElement getAttribute
Returns the runtime classpath entry id this resolver is registered for or code null code if none public String get Runtime Classpath Entry Id return f Configuration Element get Attribute runtime Classpath Entry Id NON NLS 1  getRuntimeClasspathEntryId fConfigurationElement getAttribute runtimeClasspathEntryId
see I Runtime Classpath Entry Resolver resolveVM Install I Classpath Entry public IVM Install resolveVM Install I Classpath Entry entry throws Core Exception return get Resolver resolveVM Install entry  IRuntimeClasspathEntryResolver resolveVMInstall IClasspathEntry IVMInstall resolveVMInstall IClasspathEntry CoreException getResolver resolveVMInstall
see I Runtime Classpath Entry Resolver resolve Runtime Classpath Entry I Runtime Classpath Entry I Java Project public I Runtime Classpath Entry resolve Runtime Classpath Entry I Runtime Classpath Entry entry I Java Project project throws Core Exception return get Resolver resolve Runtime Classpath Entry entry project  IRuntimeClasspathEntryResolver resolveRuntimeClasspathEntry IRuntimeClasspathEntry IJavaProject IRuntimeClasspathEntry resolveRuntimeClasspathEntry IRuntimeClasspathEntry IJavaProject CoreException getResolver resolveRuntimeClasspathEntry

Constructs a new resolver on the given configuration element public Runtime Classpath Provider I Configuration Element element f Configuration Element element  RuntimeClasspathProvider IConfigurationElement fConfigurationElement
Returns the resolver delegate and creates if required protected I Runtime Classpath Provider get Provider throws Core Exception if f Delegate null f Delegate I Runtime Classpath Provider f Configuration Element create Executable Extension class NON NLS 1 return f Delegate  IRuntimeClasspathProvider getProvider CoreException fDelegate fDelegate IRuntimeClasspathProvider fConfigurationElement createExecutableExtension fDelegate
public String get Identifier return f Configuration Element get Attribute id NON NLS 1  getIdentifier fConfigurationElement getAttribute
see I Runtime Classpath Provider compute Unresolved Classpath I Launch Configuration public I Runtime Classpath Entry compute Unresolved Classpath I Launch Configuration configuration throws Core Exception return get Provider compute Unresolved Classpath configuration  IRuntimeClasspathProvider computeUnresolvedClasspath ILaunchConfiguration IRuntimeClasspathEntry computeUnresolvedClasspath ILaunchConfiguration CoreException getProvider computeUnresolvedClasspath
see I Runtime Classpath Provider resolve Classpath I Runtime Classpath Entry I Launch Configuration public I Runtime Classpath Entry resolve Classpath I Runtime Classpath Entry entries I Launch Configuration configuration throws Core Exception return get Provider resolve Classpath entries configuration  IRuntimeClasspathProvider resolveClasspath IRuntimeClasspathEntry ILaunchConfiguration IRuntimeClasspathEntry resolveClasspath IRuntimeClasspathEntry ILaunchConfiguration CoreException getProvider resolveClasspath

Return the socket transport attaching connector exception Core Exception if unable to locate the connector protected static Attaching Connector get Attaching Connector throws Core Exception Attaching Connector connector null Iterator iter Bootstrap virtual Machine Manager attaching Connectors iterator while iter has Next Attaching Connector lc Attaching Connector iter next if lc name equals com sun jdi Socket Attach NON NLS 1 connector lc break if connector null abort Launching Messages get String Socket Attach Connector Socket attaching connector not available 3 null I Java Launch Configuration Constants ERR SHARED MEMORY CONNECTOR UNAVAILABLE NON NLS 1 return connector  CoreException AttachingConnector getAttachingConnector CoreException AttachingConnector virtualMachineManager attachingConnectors hasNext AttachingConnector AttachingConnector SocketAttach LaunchingMessages getString SocketAttachConnector Socket_attaching_connector_not_available_3 IJavaLaunchConfigurationConstants ERR_SHARED_MEMORY_CONNECTOR_UNAVAILABLE
see IVM Connector get Identifier public String get Identifier return I Java Launch Configuration Constants ID SOCKET ATTACH VM CONNECTOR  IVMConnector getIdentifier getIdentifier IJavaLaunchConfigurationConstants ID_SOCKET_ATTACH_VM_CONNECTOR
see IVM Connector get Name public String get Name return Launching Messages get String Socket Attach Connector Standard  Socket Attach  4 NON NLS 1  IVMConnector getName getName LaunchingMessages getString SocketAttachConnector Standard_ Socket_Attach _4
Throws a core exception with an error status object built from the given message lower level exception and error code param message the status message param exception lower level exception associated with the error or code null code if none param code error code protected static void abort String message Throwable exception int code throws Core Exception throw new Core Exception new Status I Status ERROR Launching Plugin get Unique Identifier code message exception  CoreException CoreException IStatus LaunchingPlugin getUniqueIdentifier
public void connect Map arguments I Progress Monitor monitor I Launch launch throws Core Exception if monitor null monitor new Null Progress Monitor I Progress Monitor sub Monitor new Sub Progress Monitor monitor 1 sub Monitor begin Task Launching Messages get String Socket Attach Connector Connecting  1 2 NON NLS 1 sub Monitor sub Task Launching Messages get String Socket Attach Connector Configuring connection  1 NON NLS 1 Attaching Connector connector get Attaching Connector String port Number String String arguments get port NON NLS 1 if port Number String null abort Launching Messages get String Socket Attach Connector Port unspecified for remote connection  2 null I Java Launch Configuration Constants ERR UNSPECIFIED PORT NON NLS 1 String host String arguments get hostname NON NLS 1 if host null abort Launching Messages get String Socket Attach Connector Hostname unspecified for remote connection  4 null I Java Launch Configuration Constants ERR UNSPECIFIED HOSTNAME NON NLS 1 Map map connector default Arguments Connector Argument param Connector Argument map get hostname NON NLS 1 param set Value host param Connector Argument map get port NON NLS 1 param set Value port Number String I Launch Configuration configuration launch get Launch Configuration boolean allow Terminate false if configuration null allow Terminate configuration get Attribute I Java Launch Configuration Constants ATTR ALLOW TERMINATE false sub Monitor worked 1 sub Monitor sub Task Launching Messages get String Socket Attach Connector Establishing connection  2 NON NLS 1 try Virtual Machine vm connector attach map String vm Label constructVM Label vm host port Number String configuration I Debug Target debug Target JDI Debug Model new Debug Target launch vm vm Label null allow Terminate true launch add Debug Target debug Target sub Monitor worked 1 sub Monitor done catch Unknown Host Exception e abort Message Format format Launching Messages get String Socket Attach Connector Failed to connect to remote VM because of unknown host    0   1 new String host e I Java Launch Configuration Constants ERR REMOTE VM CONNECTION FAILED NON NLS 1 catch Connect Exception e abort Launching Messages get String Socket Attach Connector Failed to connect to remote VM as connection was refused 2 e I Java Launch Configuration Constants ERR REMOTE VM CONNECTION FAILED NON NLS 1 catch IO Exception e abort Launching Messages get String Socket Attach Connector Failed to connect to remote VM 1 e I Java Launch Configuration Constants ERR REMOTE VM CONNECTION FAILED NON NLS 1 catch Illegal Connector Arguments Exception e abort Launching Messages get String Socket Attach Connector Failed to connect to remote VM 1 e I Java Launch Configuration Constants ERR REMOTE VM CONNECTION FAILED NON NLS 1  IProgressMonitor ILaunch CoreException NullProgressMonitor IProgressMonitor subMonitor SubProgressMonitor subMonitor beginTask LaunchingMessages getString SocketAttachConnector _1 subMonitor subTask LaunchingMessages getString SocketAttachConnector Configuring_connection _1 AttachingConnector getAttachingConnector portNumberString portNumberString LaunchingMessages getString SocketAttachConnector Port_unspecified_for_remote_connection _2 IJavaLaunchConfigurationConstants ERR_UNSPECIFIED_PORT LaunchingMessages getString SocketAttachConnector Hostname_unspecified_for_remote_connection _4 IJavaLaunchConfigurationConstants ERR_UNSPECIFIED_HOSTNAME defaultArguments setValue setValue portNumberString ILaunchConfiguration getLaunchConfiguration allowTerminate allowTerminate getAttribute IJavaLaunchConfigurationConstants ATTR_ALLOW_TERMINATE subMonitor subMonitor subTask LaunchingMessages getString SocketAttachConnector Establishing_connection _2 VirtualMachine vmLabel constructVMLabel portNumberString IDebugTarget debugTarget JDIDebugModel newDebugTarget vmLabel allowTerminate addDebugTarget debugTarget subMonitor subMonitor UnknownHostException MessageFormat LaunchingMessages getString SocketAttachConnector Failed_to_connect_to_remote_VM_because_of_unknown_host___ __1 IJavaLaunchConfigurationConstants ERR_REMOTE_VM_CONNECTION_FAILED ConnectException LaunchingMessages getString SocketAttachConnector Failed_to_connect_to_remote_VM_as_connection_was_refused_2 IJavaLaunchConfigurationConstants ERR_REMOTE_VM_CONNECTION_FAILED IOException LaunchingMessages getString SocketAttachConnector Failed_to_connect_to_remote_VM_1 IJavaLaunchConfigurationConstants ERR_REMOTE_VM_CONNECTION_FAILED IllegalConnectorArgumentsException LaunchingMessages getString SocketAttachConnector Failed_to_connect_to_remote_VM_1 IJavaLaunchConfigurationConstants ERR_REMOTE_VM_CONNECTION_FAILED
Helper method that constructs a human readable label for a remote VM protected String constructVM Label Virtual Machine vm String host String port I Launch Configuration configuration String name null try name vm name catch Timeout Exception e do nothing catch VM Disconnected Exception e do nothing if name null if configuration null name NON NLS 1 else name configuration get Name String Buffer buffer new String Buffer name buffer append NON NLS 1 buffer append host buffer append NON NLS 1 buffer append port buffer append NON NLS 1 return buffer to String  constructVMLabel VirtualMachine ILaunchConfiguration TimeoutException VMDisconnectedException getName StringBuffer StringBuffer toString
see IVM Connector get Default Arguments public Map get Default Arguments throws Core Exception Map def get Attaching Connector default Arguments Connector Integer Argument arg Connector Integer Argument def get port NON NLS 1 arg set Value 8000 return def  IVMConnector getDefaultArguments getDefaultArguments CoreException getAttachingConnector defaultArguments IntegerArgument IntegerArgument setValue
see IVM Connector get Argument Order public List get Argument Order List list new Array List 2 list add hostname NON NLS 1 list add port NON NLS 1 return list  IVMConnector getArgumentOrder getArgumentOrder ArrayList

public class Standard11xVM extends StandardVM public Standard11xVM IVM Install Type type String id super type id  IVMInstallType
see org eclipse jdt launching IVM Install getVM Runner String public IVM Runner getVM Runner String mode if I Launch Manager RUN MODE equals mode return new Standard11xVM Runner this return null  IVMInstall getVMRunner IVMRunner getVMRunner ILaunchManager RUN_MODE Standard11xVMRunner

public class Standard11xVM Runner extends StandardVM Runner public Standard11xVM Runner IVM Install vm Instance super vm Instance  Standard11xVMRunner StandardVMRunner Standard11xVMRunner IVMInstall vmInstance vmInstance
public void run VM Runner Configuration config I Launch launch I Progress Monitor monitor throws Core Exception if monitor null monitor new Null Progress Monitor I Progress Monitor sub Monitor new Sub Progress Monitor monitor 1 sub Monitor begin Task Launching Messages get String StandardVM Runner Launching VM  1 2 NON NLS 1 sub Monitor sub Task Launching Messages get String StandardVM Runner Constructing command line  2 NON NLS 1 String program construct Program String config List arguments new Array List arguments add program VM args are the first thing after the java program so that users can specify options like client server which are required to be the first option String vm Args combine Vm Args config fVM Instance add Arguments vm Args arguments String bootCP config get Boot Class Path String class Path config get Class Path String combined Path null if bootCP null Library Location locs Java Runtime get Library Locations fVM Instance bootCP new String locs length for int i 0 i locs length i bootCP i locs i get System Library Path toOS String combined Path new String bootCP length class Path length int offset 0 for int i 0 i bootCP length i combined Path offset bootCP i offset for int i 0 i class Path length i combined Path offset class Path i offset if combined Path length 0 arguments add classpath NON NLS 1 arguments add convert Class Path combined Path arguments add config get Class To Launch String program Args config get Program Arguments add Arguments program Args arguments String cmd Line new String arguments size arguments to Array cmd Line check for cancellation if monitor is Canceled return sub Monitor worked 1 sub Monitor sub Task Launching Messages get String StandardVM Runner Starting virtual machine  3 NON NLS 1 Process p null File working Dir get Working Dir config p exec cmd Line working Dir if p null return check for cancellation if monitor is Canceled p destroy return I Process process Debug Plugin new Process launch p render Process Label cmd Line process set Attribute I Process ATTR CMDLINE render Command Line cmd Line sub Monitor worked 1  VMRunnerConfiguration ILaunch IProgressMonitor CoreException NullProgressMonitor IProgressMonitor subMonitor SubProgressMonitor subMonitor beginTask LaunchingMessages getString StandardVMRunner Launching_VM _1 subMonitor subTask LaunchingMessages getString StandardVMRunner Constructing_command_line _2 constructProgramString ArrayList vmArgs combineVmArgs fVMInstance addArguments vmArgs getBootClassPath classPath getClassPath combinedPath LibraryLocation JavaRuntime getLibraryLocations fVMInstance getSystemLibraryPath toOSString combinedPath classPath combinedPath classPath combinedPath classPath combinedPath convertClassPath combinedPath getClassToLaunch programArgs getProgramArguments addArguments programArgs cmdLine toArray cmdLine isCanceled subMonitor subMonitor subTask LaunchingMessages getString StandardVMRunner Starting_virtual_machine _3 workingDir getWorkingDir cmdLine workingDir isCanceled IProcess DebugPlugin newProcess renderProcessLabel cmdLine setAttribute IProcess ATTR_CMDLINE renderCommandLine cmdLine subMonitor

see org eclipse jdt internal launching StandardVM Type get Default System Library java io File protected I Path get Default System Library File install Location return new Path install Location get Path append lib append classes zip NON NLS 2 NON NLS 1  StandardVMType getDefaultSystemLibrary IPath getDefaultSystemLibrary installLocation installLocation getPath
see org eclipse jdt launching AbstractVM Install Type do CreateVM Install java lang String protected IVM Install do CreateVM Install String id return new Standard11xVM this id  AbstractVMInstallType doCreateVMInstall IVMInstall doCreateVMInstall
see org eclipse jdt internal launching StandardVM Type get Default System Library Source java io File protected I Path get Default System Library Source File lib Location set Default Root Path NON NLS 1 return Path EMPTY  StandardVMType getDefaultSystemLibrarySource IPath getDefaultSystemLibrarySource libLocation setDefaultRootPath
see org eclipse jdt launching IVM Install Type get Name public String get Name return Launching Messages get String Standard11xVM Type Standard 1 1 x VM 1 NON NLS 1  IVMInstallType getName getName LaunchingMessages getString Standard11xVMType Standard_1 x_VM_1
Returns code null code not supported see StandardVM Type get Default Extension Directory File protected File get Default Extension Directory File install Location return null  StandardVMType getDefaultExtensionDirectory getDefaultExtensionDirectory installLocation
see org eclipse jdt internal launching StandardVM Type get Default Endorsed Directory java io File protected File get Default Endorsed Directory File install Location return null  StandardVMType getDefaultEndorsedDirectory getDefaultEndorsedDirectory installLocation
see org eclipse jdt launching IVM Install Type get Default Library Locations java io File public Library Location get Default Library Locations File install Location I Path lib Path get Default System Library install Location File lib lib Path to File if lib exists return new Library Location new Library Location lib Path get Default System Library Source lib get Default Package Root Path return new Library Location 0  IVMInstallType getDefaultLibraryLocations LibraryLocation getDefaultLibraryLocations installLocation IPath libPath getDefaultSystemLibrary installLocation libPath toFile LibraryLocation LibraryLocation libPath getDefaultSystemLibrarySource getDefaultPackageRootPath LibraryLocation
Return code true code if the appropriate system libraries can be found for the specified java executable code false code otherwise protected boolean can Detect Default System Libraries File java Home File java Executable Library Location locations get Default Library Locations java Home String version getVM Version java Home java Executable return locations length 0 version starts With 1 1 NON NLS 1  canDetectDefaultSystemLibraries javaHome javaExecutable LibraryLocation getDefaultLibraryLocations javaHome getVMVersion javaHome javaExecutable startsWith

public class StandardVM extends AbstractVM Install StandardVM IVM Install Type type String id super type id  AbstractVMInstall IVMInstallType
public IVM Runner getVM Runner String mode if I Launch Manager RUN MODE equals mode return new StandardVM Runner this else if I Launch Manager DEBUG MODE equals mode return new StandardVM Debugger this return null  IVMRunner getVMRunner ILaunchManager RUN_MODE StandardVMRunner ILaunchManager DEBUG_MODE StandardVMDebugger

Constructs a runnable to connect to a VM via the given connector with the given connection arguments param connector param map public Connect Runnable Listening Connector connector Map map f Connector connector f Connection Map map  ConnectRunnable ListeningConnector fConnector fConnectionMap
public void run try f Virtual Machine f Connector accept f Connection Map catch IO Exception e f Exception e catch Illegal Connector Arguments Exception e f Exception e  fVirtualMachine fConnector fConnectionMap IOException fException IllegalConnectorArgumentsException fException
Returns the VM that was attached to or code null code if none return the VM that was attached to or code null code if none public Virtual Machine get Virtual Machine return f Virtual Machine  VirtualMachine getVirtualMachine fVirtualMachine
Returns any exception that occurred while attaching or code null code return IO Exception or Illegal Connector Arguments Exception public Exception get Exception return f Exception  IOException IllegalConnectorArgumentsException getException fException
Creates a new launcher public StandardVM Debugger IVM Install vm Instance super vm Instance  StandardVMDebugger IVMInstall vmInstance vmInstance
public void run VM Runner Configuration config I Launch launch I Progress Monitor monitor throws Core Exception if monitor null monitor new Null Progress Monitor I Progress Monitor sub Monitor new Sub Progress Monitor monitor 1 sub Monitor begin Task Launching Messages get String StandardVM Debugger Launching VM  1 4 NON NLS 1 sub Monitor sub Task Launching Messages get String StandardVM Debugger Finding free socket  2 NON NLS 1 int port Socket Util find Free Port if port 1 abort Launching Messages get String StandardVM Debugger Could not find a free socket for the debugger 1 null I Java Launch Configuration Constants ERR NO SOCKET AVAILABLE NON NLS 1 sub Monitor worked 1 check for cancellation if monitor is Canceled return sub Monitor sub Task Launching Messages get String StandardVM Debugger Constructing command line  3 NON NLS 1 String program construct Program String config List arguments new Array List 12 arguments add program VM args are the first thing after the java program so that users can specify options like client server which are required to be the first options String allVM Args combine Vm Args config fVM Instance add Arguments allVM Args arguments add Boot Class Path Arguments arguments config String cp config get Class Path if cp length 0 arguments add classpath NON NLS 1 arguments add convert Class Path cp arguments add Xdebug NON NLS 1 arguments add Xnoagent NON NLS 1 double version get Java Version check if java 1 4 or greater if version 1 4 arguments add Djava compiler NONE NON NLS 1 arguments add Xrunjdwp transport dt socket suspend y address localhost port NON NLS 1 arguments add config get Class To Launch add Arguments config get Program Arguments arguments String cmd Line new String arguments size arguments to Array cmd Line String envp config get Environment check for cancellation if monitor is Canceled return sub Monitor worked 1 sub Monitor sub Task Launching Messages get String StandardVM Debugger Starting virtual machine  4 NON NLS 1 Listening Connector connector get Connector if connector null abort Launching Messages get String StandardVM Debugger Couldn  t find an appropriate debug connector 2 null I Java Launch Configuration Constants ERR CONNECTOR NOT AVAILABLE NON NLS 1 Map map connector default Arguments specify Arguments map port Process p null try try check for cancellation if monitor is Canceled return connector start Listening map File working Dir get Working Dir config p exec cmd Line working Dir envp if p null return check for cancellation if monitor is Canceled p destroy return I Process process new Process launch p render Process Label cmd Line get Default Process Map process set Attribute I Process ATTR CMDLINE render Command Line cmd Line sub Monitor worked 1 sub Monitor sub Task Launching Messages get String StandardVM Debugger Establishing debug connection  5 NON NLS 1 boolean retry false do try Connect Runnable runnable new Connect Runnable connector map Thread connect Thread new Thread runnable Listening Connector NON NLS 1 connect Thread start while connect Thread is Alive if monitor is Canceled connector stop Listening map p destroy return try p exit Value process has terminated stop waiting for a connection try connector stop Listening map catch IO Exception e expected check Error Message process catch Illegal Thread State Exception e expected while process is alive try Thread sleep 100 catch Interrupted Exception e Exception ex runnable get Exception if ex instanceof Illegal Connector Arguments Exception throw Illegal Connector Arguments Exception ex if ex instanceof InterruptedIO Exception throw InterruptedIO Exception ex if ex instanceof IO Exception throw IO Exception ex Virtual Machine vm runnable get Virtual Machine if vm null JDI Debug Model new Debug Target launch vm render Debug Target config get Class To Launch port process true false config is Resume On Startup sub Monitor worked 1 sub Monitor done return catch InterruptedIO Exception e check Error Message process timeout consult status handler if there is one I Status status new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR VM CONNECT TIMEOUT e NON NLS 1 I Status Handler handler Debug Plugin get Default get Status Handler status retry false if handler null if there is no handler throw the exception throw new Core Exception status Object result handler handle Status status this if result instanceof Boolean retry Boolean result boolean Value while retry finally connector stop Listening map catch IO Exception e abort Launching Messages get String StandardVM Debugger Couldn  t connect to VM 4 e I Java Launch Configuration Constants ERR CONNECTION FAILED NON NLS 1 catch Illegal Connector Arguments Exception e abort Launching Messages get String StandardVM Debugger Couldn  t connect to VM 5 e I Java Launch Configuration Constants ERR CONNECTION FAILED NON NLS 1 if p null p destroy  VMRunnerConfiguration ILaunch IProgressMonitor CoreException NullProgressMonitor IProgressMonitor subMonitor SubProgressMonitor subMonitor beginTask LaunchingMessages getString StandardVMDebugger Launching_VM _1 subMonitor subTask LaunchingMessages getString StandardVMDebugger Finding_free_socket _2 SocketUtil findFreePort LaunchingMessages getString StandardVMDebugger Could_not_find_a_free_socket_for_the_debugger_1 IJavaLaunchConfigurationConstants ERR_NO_SOCKET_AVAILABLE subMonitor isCanceled subMonitor subTask LaunchingMessages getString StandardVMDebugger Constructing_command_line _3 constructProgramString ArrayList allVMArgs combineVmArgs fVMInstance addArguments allVMArgs addBootClassPathArguments getClassPath convertClassPath getJavaVersion dt_socket getClassToLaunch addArguments getProgramArguments cmdLine toArray cmdLine getEnvironment isCanceled subMonitor subMonitor subTask LaunchingMessages getString StandardVMDebugger Starting_virtual_machine _4 ListeningConnector getConnector LaunchingMessages getString StandardVMDebugger Couldn__t_find_an_appropriate_debug_connector_2 IJavaLaunchConfigurationConstants ERR_CONNECTOR_NOT_AVAILABLE defaultArguments specifyArguments isCanceled startListening workingDir getWorkingDir cmdLine workingDir isCanceled IProcess newProcess renderProcessLabel cmdLine getDefaultProcessMap setAttribute IProcess ATTR_CMDLINE renderCommandLine cmdLine subMonitor subMonitor subTask LaunchingMessages getString StandardVMDebugger Establishing_debug_connection _5 ConnectRunnable ConnectRunnable connectThread connectThread connectThread isAlive isCanceled stopListening exitValue stopListening IOException checkErrorMessage IllegalThreadStateException InterruptedException getException IllegalConnectorArgumentsException IllegalConnectorArgumentsException InterruptedIOException InterruptedIOException IOException IOException VirtualMachine getVirtualMachine JDIDebugModel newDebugTarget renderDebugTarget getClassToLaunch isResumeOnStartup subMonitor subMonitor InterruptedIOException checkErrorMessage IStatus IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_VM_CONNECT_TIMEOUT IStatusHandler DebugPlugin getDefault getStatusHandler CoreException handleStatus booleanValue stopListening IOException LaunchingMessages getString StandardVMDebugger Couldn__t_connect_to_VM_4 IJavaLaunchConfigurationConstants ERR_CONNECTION_FAILED IllegalConnectorArgumentsException LaunchingMessages getString StandardVMDebugger Couldn__t_connect_to_VM_5 IJavaLaunchConfigurationConstants ERR_CONNECTION_FAILED
private double get Java Version Library Info lib Info Launching Plugin get Library Info fVM Instance get Install Location get Absolute Path String version lib Info get Version int index version index Of NON NLS 1 int next Index version index Of index 1 NON NLS 1 try if index 0 next Index index return Double parse Double version substring 0 next Index return Double parse Double version catch Number Format Exception e return 0D  getJavaVersion LibraryInfo libInfo LaunchingPlugin getLibraryInfo fVMInstance getInstallLocation getAbsolutePath libInfo getVersion indexOf nextIndex indexOf nextIndex parseDouble nextIndex parseDouble NumberFormatException
protected void check Error Message I Process process throws Core Exception I Streams Proxy streams Proxy process get Streams Proxy if streams Proxy null String error Message streams Proxy get Error Stream Monitor get Contents if error Message length 0 error Message streams Proxy get Output Stream Monitor get Contents if error Message length 0 abort error Message null I Java Launch Configuration Constants ERR VM LAUNCH ERROR  checkErrorMessage IProcess CoreException IStreamsProxy streamsProxy getStreamsProxy streamsProxy errorMessage streamsProxy getErrorStreamMonitor getContents errorMessage errorMessage streamsProxy getOutputStreamMonitor getContents errorMessage errorMessage IJavaLaunchConfigurationConstants ERR_VM_LAUNCH_ERROR
protected void specify Arguments Map map int port Number XXX Revisit allows us to put a quote around the classpath Connector Integer Argument port Connector Integer Argument map get port NON NLS 1 port set Value port Number Connector Integer Argument timeout Arg Connector Integer Argument map get timeout NON NLS 1 if timeout Arg null int timeout Java Runtime get Preferences get Int Java Runtime PREF CONNECT TIMEOUT timeout Arg set Value timeout  specifyArguments portNumber IntegerArgument IntegerArgument setValue portNumber IntegerArgument timeoutArg IntegerArgument timeoutArg JavaRuntime getPreferences getInt JavaRuntime PREF_CONNECT_TIMEOUT timeoutArg setValue
protected Listening Connector get Connector List connectors Bootstrap virtual Machine Manager listening Connectors for int i 0 i connectors size i Listening Connector c Listening Connector connectors get i if com sun jdi Socket Listen equals c name NON NLS 1 return c return null  ListeningConnector getConnector virtualMachineManager listeningConnectors ListeningConnector ListeningConnector SocketListen

protected IVM Install fVM Instance public StandardVM Runner IVM Install vm Instance fVM Instance vm Instance  IVMInstall fVMInstance StandardVMRunner IVMInstall vmInstance fVMInstance vmInstance
protected String render Debug Target String class To Run int host String format Launching Messages get String StandardVM Runner 0  at localhost  1  1 NON NLS 1 return Message Format format format new String class To Run String value Of host  renderDebugTarget classToRun LaunchingMessages getString StandardVMRunner _at_localhost_ _1 MessageFormat classToRun valueOf
public static String render Process Label String command Line String format Launching Messages get String StandardVM Runner 0   1  2 NON NLS 1 String timestamp Date Format get Date Time Instance Date Format MEDIUM Date Format MEDIUM format new Date System current Time Millis return Message Format format format new String command Line 0 timestamp  renderProcessLabel commandLine LaunchingMessages getString StandardVMRunner _ _2 DateFormat getDateTimeInstance DateFormat DateFormat currentTimeMillis MessageFormat commandLine
protected static String render Command Line String command Line if command Line length 1 return NON NLS 1 String Buffer buf new String Buffer for int i 0 i command Line length i buf append char characters command Line i to Char Array String Buffer command new String Buffer boolean contains Space false for int j 0 j characters length j char character characters j if character command append else if character contains Space true command append character if contains Space buf append buf append command to String buf append else buf append command to String return buf to String  renderCommandLine commandLine commandLine StringBuffer StringBuffer commandLine commandLine toCharArray StringBuffer StringBuffer containsSpace containsSpace containsSpace toString toString toString
protected void add Arguments String args List v if args null return for int i 0 i args length i v add args i  addArguments
Returns the working directory to use for the launched VM or code null code if the working directory is to be inherited from the current process return the working directory to use exception Core Exception if the working directory specified by the configuration does not exist or is not a directory protected File get Working Dir VM Runner Configuration config throws Core Exception String path config get Working Directory if path null return null File dir new File path if dir is Directory abort Message Format format Launching Messages get String StandardVM Runner Specified working directory does not exist or is not a directory   0  3 new String path null I Java Launch Configuration Constants ERR WORKING DIRECTORY DOES NOT EXIST NON NLS 1 return dir  CoreException getWorkingDir VMRunnerConfiguration CoreException getWorkingDirectory isDirectory MessageFormat LaunchingMessages getString StandardVMRunner Specified_working_directory_does_not_exist_or_is_not_a_directory__ _3 IJavaLaunchConfigurationConstants ERR_WORKING_DIRECTORY_DOES_NOT_EXIST
see VM Runner get Plugin Identifier protected String get Plugin Identifier return Launching Plugin get Unique Identifier  VMRunner getPluginIdentifier getPluginIdentifier LaunchingPlugin getUniqueIdentifier
Construct and return a String containing the full path of a java executable command such as java or javaw exe If the configuration specifies an explicit executable that is used return full path to java executable exception Core Exception if unable to locate an executeable protected String construct Program String VM Runner Configuration config throws Core Exception Look for the user specified java executable command String command null Map map config getVM Specific Attributes Map if map null command String map get I Java Launch Configuration Constants ATTR JAVA COMMAND If no java command was specified use default executable if command null File exe StandardVM Type find Java Executable fVM Instance get Install Location if exe null abort Message Format format Launching Messages get String StandardVM Runner Unable to locate executable for  0  1 new String fVM Instance get Name null I Java Launch Configuration Constants ERR INTERNAL ERROR NON NLS 1 return exe get Absolute Path Build the path to the java executable First try bin and if that doesn t exist try jre bin String install Location fVM Instance get Install Location get Absolute Path File separator Char File exe new File install Location bin File separator Char command NON NLS 1 NON NLS 2 if file Exists exe return exe get Absolute Path exe new File exe get Absolute Path exe NON NLS 1 if file Exists exe return exe get Absolute Path exe new File install Location jre File separator Char bin File separator Char command NON NLS 1 NON NLS 2 if file Exists exe return exe get Absolute Path exe new File exe get Absolute Path exe NON NLS 1 if file Exists exe return exe get Absolute Path not found abort Message Format format Launching Messages get String StandardVM Runner Specified executable  0  does not exist for  1  4 new String command fVM Instance get Name null I Java Launch Configuration Constants ERR INTERNAL ERROR NON NLS 1 NOTE an exception will be thrown null cannot be returned return null  CoreException constructProgramString VMRunnerConfiguration CoreException getVMSpecificAttributesMap IJavaLaunchConfigurationConstants ATTR_JAVA_COMMAND StandardVMType findJavaExecutable fVMInstance getInstallLocation MessageFormat LaunchingMessages getString StandardVMRunner Unable_to_locate_executable_for_ _1 fVMInstance getName IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR getAbsolutePath installLocation fVMInstance getInstallLocation getAbsolutePath separatorChar installLocation separatorChar fileExists getAbsolutePath getAbsolutePath fileExists getAbsolutePath installLocation separatorChar separatorChar fileExists getAbsolutePath getAbsolutePath fileExists getAbsolutePath MessageFormat LaunchingMessages getString StandardVMRunner Specified_executable_ _does_not_exist_for_ _4 fVMInstance getName IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR
protected boolean file Exists File file return file exists file is File  fileExists isFile
protected String convert Class Path String cp int path Count 0 String Buffer buf new String Buffer if cp length 0 return NON NLS 1 for int i 0 i cp length i if path Count 0 buf append File path Separator buf append cp i path Count return buf to String  convertClassPath pathCount StringBuffer StringBuffer pathCount pathSeparator pathCount toString
public void run VM Runner Configuration config I Launch launch I Progress Monitor monitor throws Core Exception if monitor null monitor new Null Progress Monitor I Progress Monitor sub Monitor new Sub Progress Monitor monitor 1 sub Monitor begin Task Launching Messages get String StandardVM Runner Launching VM  1 2 NON NLS 1 sub Monitor sub Task Launching Messages get String StandardVM Runner Constructing command line  2 NON NLS 1 String program construct Program String config List arguments new Array List arguments add program VM args are the first thing after the java program so that users can specify options like client server which are required to be the first option String allVM Args combine Vm Args config fVM Instance add Arguments allVM Args arguments add Boot Class Path Arguments arguments config String cp config get Class Path if cp length 0 arguments add classpath NON NLS 1 arguments add convert Class Path cp arguments add config get Class To Launch String program Args config get Program Arguments add Arguments program Args arguments String cmd Line new String arguments size arguments to Array cmd Line String envp config get Environment sub Monitor worked 1 check for cancellation if monitor is Canceled return sub Monitor sub Task Launching Messages get String StandardVM Runner Starting virtual machine  3 NON NLS 1 Process p null File working Dir get Working Dir config p exec cmd Line working Dir envp if p null return check for cancellation if monitor is Canceled p destroy return I Process process new Process launch p render Process Label cmd Line get Default Process Map process set Attribute I Process ATTR CMDLINE render Command Line cmd Line sub Monitor worked 1 sub Monitor done  VMRunnerConfiguration ILaunch IProgressMonitor CoreException NullProgressMonitor IProgressMonitor subMonitor SubProgressMonitor subMonitor beginTask LaunchingMessages getString StandardVMRunner Launching_VM _1 subMonitor subTask LaunchingMessages getString StandardVMRunner Constructing_command_line _2 constructProgramString ArrayList allVMArgs combineVmArgs fVMInstance addArguments allVMArgs addBootClassPathArguments getClassPath convertClassPath getClassToLaunch programArgs getProgramArguments addArguments programArgs cmdLine toArray cmdLine getEnvironment subMonitor isCanceled subMonitor subTask LaunchingMessages getString StandardVMRunner Starting_virtual_machine _3 workingDir getWorkingDir cmdLine workingDir isCanceled IProcess newProcess renderProcessLabel cmdLine getDefaultProcessMap setAttribute IProcess ATTR_CMDLINE renderCommandLine cmdLine subMonitor subMonitor
protected void add Boot Class Path Arguments List arguments VM Runner Configuration config String prepend BootCP null String bootCP null String append BootCP null Map map config getVM Specific Attributes Map if map null prepend BootCP String map get I Java Launch Configuration Constants ATTR BOOTPATH PREPEND bootCP String map get I Java Launch Configuration Constants ATTR BOOTPATH append BootCP String map get I Java Launch Configuration Constants ATTR BOOTPATH APPEND if prepend BootCP null bootCP null append BootCP null use old single attribute instead of new attributes if not specified bootCP config get Boot Class Path if prepend BootCP null arguments add Xbootclasspath p convert Class Path prepend BootCP NON NLS 1 if bootCP null if bootCP length 0 arguments add Xbootclasspath convert Class Path bootCP NON NLS 1 else empty arguments add Xbootclasspath NON NLS 1 if append BootCP null arguments add Xbootclasspath a convert Class Path append BootCP NON NLS 1  addBootClassPathArguments VMRunnerConfiguration prependBootCP appendBootCP getVMSpecificAttributesMap prependBootCP IJavaLaunchConfigurationConstants ATTR_BOOTPATH_PREPEND IJavaLaunchConfigurationConstants ATTR_BOOTPATH appendBootCP IJavaLaunchConfigurationConstants ATTR_BOOTPATH_APPEND prependBootCP appendBootCP getBootClassPath prependBootCP convertClassPath prependBootCP convertClassPath appendBootCP convertClassPath appendBootCP

Starting in the specified VM install location attempt to find the java executable file If found return the corresponding code File code object otherwise return code null code public static File find Java Executable File vm Install Location Try each candidate in order The first one found wins Thus the order of fg Candidate Java Locations is significant for int i 0 i fg Candidate Java Locations length i File java File new File vm Install Location fg Candidate Java Locations i if java File is File return java File return null  findJavaExecutable vmInstallLocation fgCandidateJavaLocations fgCandidateJavaLocations javaFile vmInstallLocation fgCandidateJavaLocations javaFile isFile javaFile
see org eclipse jdt launching IVM Install Type get Name public String get Name return Launching Messages get String StandardVM Type Standard VM 3 NON NLS 1  IVMInstallType getName getName LaunchingMessages getString StandardVMType Standard_VM_3
protected IVM Install do CreateVM Install String id return new StandardVM this id  IVMInstall doCreateVMInstall
Return library information corresponding to the specified install location If the info does not exist create it using the given Java executable protected Library Info get Library Info File java Home File java Executable See if we already know the info for the requested VM If not generate it String install Path java Home get Absolute Path Library Info info Launching Plugin get Library Info install Path if info null info generate Library Info java Home java Executable Launching Plugin set Library Info install Path info return info  LibraryInfo getLibraryInfo javaHome javaExecutable installPath javaHome getAbsolutePath LibraryInfo LaunchingPlugin getLibraryInfo installPath generateLibraryInfo javaHome javaExecutable LaunchingPlugin setLibraryInfo installPath
Return code true code if the appropriate system libraries can be found for the specified java executable code false code otherwise protected boolean can Detect Default System Libraries File java Home File java Executable Library Location locations get Default Library Locations java Home String version getVM Version java Home java Executable return locations length 0 version starts With 1 1 NON NLS 1  canDetectDefaultSystemLibraries javaHome javaExecutable LibraryLocation getDefaultLibraryLocations javaHome getVMVersion javaHome javaExecutable startsWith
Returns the version of the VM at the given location with the given executable param java Home param java Executable return String protected String getVM Version File java Home File java Executable Library Info info get Library Info java Home java Executable return info get Version  javaHome javaExecutable getVMVersion javaHome javaExecutable LibraryInfo getLibraryInfo javaHome javaExecutable getVersion
public File detect Install Location do not detect on the Mac OS if Platform getOS equals Constants OS MACOSX return null Retrieve the java home system property If that directory doesn t exist return null File java Home NON NLS 1 try java Home new File System get Property java home get Canonical File NON NLS 1 catch IO Exception e Launching Plugin log e return null if java Home exists return null Find the java executable file under the java home directory If it can t be found return null File java Executable find Java Executable java Home if java Executable null return null If the reported java home directory terminates with jre first see if the parent directory contains the required libraries boolean found Libraries false if java Home get Name equals Ignore Case jre NON NLS 1 File parent new File java Home get Parent if can Detect Default System Libraries parent java Executable java Home parent found Libraries true If we haven t already found the libraries look in the reported java home dir if found Libraries if can Detect Default System Libraries java Home java Executable return null return java Home  detectInstallLocation OS_MACOSX javaHome javaHome getProperty getCanonicalFile IOException LaunchingPlugin javaHome javaExecutable findJavaExecutable javaHome javaExecutable foundLibraries javaHome getName equalsIgnoreCase javaHome getParent canDetectDefaultSystemLibraries javaExecutable javaHome foundLibraries foundLibraries canDetectDefaultSystemLibraries javaHome javaExecutable javaHome
Return an code I Path code corresponding to the single library file containing the standard Java classes for most V Ms version 1 2 and above protected I Path get Default System Library File java Home I Path jre Lib Path new Path java Home get Path append lib append rt jar NON NLS 2 NON NLS 1 if jre Lib Path to File is File return jre Lib Path return new Path java Home get Path append jre append lib append rt jar NON NLS 3 NON NLS 2 NON NLS 1  IPath VMs IPath getDefaultSystemLibrary javaHome IPath jreLibPath javaHome getPath jreLibPath toFile isFile jreLibPath javaHome getPath
Returns a path to the source attachment for the given libaray or an empty path if none param lib Location return a path to the source attachment for the given library or an empty path if none protected I Path get Default System Library Source File lib Location File parent lib Location get Parent File while parent null File parentsrc new File parent src jar NON NLS 1 if parentsrc is File set Default Root Path src NON NLS 1 return new Path parentsrc get Path parentsrc new File parent src zip NON NLS 1 if parentsrc is File set Default Root Path NON NLS 1 return new Path parentsrc get Path parent parent get Parent File set Default Root Path NON NLS 1 return Path EMPTY NON NLS 1  libLocation IPath getDefaultSystemLibrarySource libLocation libLocation getParentFile isFile setDefaultRootPath getPath isFile setDefaultRootPath getPath getParentFile setDefaultRootPath
protected I Path get Default Package Root Path return new Path get Default Root Path  IPath getDefaultPackageRootPath getDefaultRootPath
NOTE We do not add libraries from the endorsed directory explicitly as the bootpath contains these entries already if they exist see org eclipse jdt launching IVM Install Type get Default Library Locations File public Library Location get Default Library Locations File install Location Determine the java executable that corresponds to the specified install location and use this to generate library info If no java executable was found the standard libraries will be returned File java Executable find Java Executable install Location Library Info lib Info if java Executable null lib Info get Default Library Info install Location else lib Info get Library Info install Location java Executable String bootpath lib Info get Bootpath List extensions gather All Libraries lib Info get Extension Dirs List all Libs new Array List bootpath length extensions size for int i 0 i bootpath length i I Path path new Path bootpath i File lib path to File if lib exists lib is File all Libs add new Library Location path get Default System Library Source lib get Default Package Root Path Add all extension directories Iterator iter extensions iterator while iter has Next Library Location lib Library Location iter next check for dups in case bootpath contains an ext dir entry see bug 50201 if is Duplicate Library all Libs lib all Libs add lib return Library Location all Libs to Array new Library Location all Libs size  IVMInstallType getDefaultLibraryLocations LibraryLocation getDefaultLibraryLocations installLocation javaExecutable findJavaExecutable installLocation LibraryInfo libInfo javaExecutable libInfo getDefaultLibraryInfo installLocation libInfo getLibraryInfo installLocation javaExecutable libInfo getBootpath gatherAllLibraries libInfo getExtensionDirs allLibs ArrayList IPath toFile isFile allLibs LibraryLocation getDefaultSystemLibrarySource getDefaultPackageRootPath hasNext LibraryLocation LibraryLocation isDuplicateLibrary allLibs allLibs LibraryLocation allLibs toArray LibraryLocation allLibs
Returns whether the given library is already contained in the given list Rather than checking the library for equality which considers source attachments we check the actual OS path to the library for equality param libs list of library locations param dup possible dup return whether dup is contained in list of libraries private boolean is Duplicate Library List libs Library Location dup String os Path dup get System Library Path toOS String for int i 0 i libs size i Library Location location Library Location libs get i if location get System Library Path toOS String equals Ignore Case os Path return true return false  isDuplicateLibrary LibraryLocation osPath getSystemLibraryPath toOSString LibraryLocation LibraryLocation getSystemLibraryPath toOSString equalsIgnoreCase osPath
Returns default library info for the given install location param install Location return Library Info protected Library Info get Default Library Info File install Location I Path rtjar get Default System Library install Location File ext Dir get Default Extension Directory install Location File end Dir get Default Endorsed Directory install Location String dirs null if ext Dir null dirs new String 0 else dirs new String ext Dir get Absolute Path String end Dirs null if end Dir null end Dirs new String 0 else end Dirs new String end Dir get Absolute Path return new Library Info new String rtjar toOS String dirs end Dirs NON NLS 1  installLocation LibraryInfo LibraryInfo getDefaultLibraryInfo installLocation IPath getDefaultSystemLibrary installLocation extDir getDefaultExtensionDirectory installLocation endDir getDefaultEndorsedDirectory installLocation extDir extDir getAbsolutePath endDirs endDir endDirs endDirs endDir getAbsolutePath LibraryInfo toOSString endDirs
Returns a list of all zips and jars contained in the given directories param dir Paths a list of absolute paths of directories to search return List of all zips and jars protected List gather All Libraries String dir Paths List libraries new Array List for int i 0 i dir Paths length i File ext Dir new File dir Paths i if ext Dir null ext Dir exists ext Dir is Directory String names ext Dir list for int j 0 j names length j String name names j File jar new File ext Dir name if jar is File int length name length if length 4 String suffix name substring length 4 if suffix equals Ignore Case zip suffix equals Ignore Case jar NON NLS 1 NON NLS 2 try I Path lib Path new Path jar get Canonical Path Library Location library new Library Location lib Path Path EMPTY Path EMPTY libraries add library catch IO Exception e Launching Plugin log e return libraries  dirPaths gatherAllLibraries dirPaths ArrayList dirPaths extDir dirPaths extDir extDir extDir isDirectory extDir extDir isFile equalsIgnoreCase equalsIgnoreCase IPath libPath getCanonicalPath LibraryLocation LibraryLocation libPath IOException LaunchingPlugin
Returns the default location of the extension directory based on the given install location The resulting file may not exist or be code null code if an extension directory is not supported param install Location return default extension directory or code null code protected File get Default Extension Directory File install Location File jre null if install Location get Name equals Ignore Case jre NON NLS 1 jre install Location else jre new File install Location jre NON NLS 1 File lib new File jre lib NON NLS 1 File ext new File lib ext NON NLS 1 return ext  installLocation getDefaultExtensionDirectory installLocation installLocation getName equalsIgnoreCase installLocation installLocation
Returns the default location of the endorsed directory based on the given install location The resulting file may not exist or be code null code if an endorsed directory is not supported param install Location return default endorsed directory or code null code protected File get Default Endorsed Directory File install Location File lib new File install Location lib NON NLS 1 File ext new File lib endorsed NON NLS 1 return ext  installLocation getDefaultEndorsedDirectory installLocation installLocation
protected String get Default Root Path return f Default Root Path  getDefaultRootPath fDefaultRootPath
protected void set Default Root Path String default Root Path f Default Root Path default Root Path  setDefaultRootPath defaultRootPath fDefaultRootPath defaultRootPath
public I Status validate Install Location File java Home I Status status null if Platform getOS equals Constants OS MACOSX status new Status I Status ERROR Launching Plugin get Unique Identifier 0 Launching Messages get String StandardVM Type Standard VM not supported on MacOS  1 null NON NLS 1 else File java Executable find Java Executable java Home if java Executable null status new Status I Status ERROR Launching Plugin get Unique Identifier 0 Launching Messages get String StandardVM Type Not a JDK Root  Java executable was not found 1 null NON NLS 1 else if can Detect Default System Libraries java Home java Executable status new Status I Status OK Launching Plugin get Unique Identifier 0 Launching Messages get String StandardVM Type ok 2 null NON NLS 1 else status new Status I Status ERROR Launching Plugin get Unique Identifier 0 Launching Messages get String StandardVM Type Not a JDK root  System library was not found  1 null NON NLS 1 return status  IStatus validateInstallLocation javaHome IStatus OS_MACOSX IStatus LaunchingPlugin getUniqueIdentifier LaunchingMessages getString StandardVMType Standard_VM_not_supported_on_MacOS _1 javaExecutable findJavaExecutable javaHome javaExecutable IStatus LaunchingPlugin getUniqueIdentifier LaunchingMessages getString StandardVMType Not_a_JDK_Root _Java_executable_was_not_found_1 canDetectDefaultSystemLibraries javaHome javaExecutable IStatus LaunchingPlugin getUniqueIdentifier LaunchingMessages getString StandardVMType ok_2 IStatus LaunchingPlugin getUniqueIdentifier LaunchingMessages getString StandardVMType Not_a_JDK_root _System_library_was_not_found _1
Generates library information for the given java executable A main program is run code org eclipse jdt internal launching support Library Detector code that dumps the system properties for bootpath and extension directories This output is then parsed and cached for future reference protected Library Info generate Library Info File java Home File java Executable Library Info info null if this is 1 1 X the properties will not exist I Path classes Zip new Path java Home get Absolute Path append lib append classes zip NON NLS 1 NON NLS 2 if classes Zip to File exists return new Library Info 1 1 x new String classes Zip toOS String new String 0 new String 0 NON NLS 1 locate the launching support jar it contains the main program to run File file Launching Plugin get File In Plugin new Path lib launchingsupport jar NON NLS 1 if file exists String java Executable Path java Executable get Absolute Path String cmd Line new String java Executable Path classpath file get Absolute Path org eclipse jdt internal launching support Library Detector NON NLS 1 NON NLS 2 Process p null try p Runtime get Runtime exec cmd Line I Process process Debug Plugin new Process new Launch null I Launch Manager RUN MODE null p Library Detection NON NLS 1 for int i 0 i 200 i Wait no more than 10 seconds 200 50 mils if process is Terminated break try Thread sleep 50 catch Interrupted Exception e info parse Library Info process catch IO Exception ioe Launching Plugin log ioe finally if p null p destroy if info null info get Default Library Info java Home return info  LibraryDetector LibraryInfo generateLibraryInfo javaHome javaExecutable LibraryInfo IPath classesZip javaHome getAbsolutePath classesZip toFile LibraryInfo classesZip toOSString LaunchingPlugin getFileInPlugin javaExecutablePath javaExecutable getAbsolutePath cmdLine javaExecutablePath getAbsolutePath LibraryDetector getRuntime cmdLine IProcess DebugPlugin newProcess ILaunchManager RUN_MODE isTerminated InterruptedException parseLibraryInfo IOException LaunchingPlugin getDefaultLibraryInfo javaHome
Parses the output from Library Detector protected Library Info parse Library Info I Process process I Streams Proxy streams Proxy process get Streams Proxy String text null if streams Proxy null text streams Proxy get Output Stream Monitor get Contents if text null text length 0 int index text index Of NON NLS 1 if index 0 String version text substring 0 index text text substring index 1 index text index Of NON NLS 1 if index 0 String boot Paths text substring 0 index String boot Path parse Paths boot Paths text text substring index 1 index text index Of NON NLS 1 if index 0 String ext Dir Paths text substring 0 index String endorsed Dirs Path text substring index 1 String ext Dirs parse Paths ext Dir Paths String end Dirs parse Paths endorsed Dirs Path return new Library Info version boot Path ext Dirs end Dirs return null  LibraryDetector LibraryInfo parseLibraryInfo IProcess IStreamsProxy streamsProxy getStreamsProxy streamsProxy streamsProxy getOutputStreamMonitor getContents indexOf indexOf bootPaths bootPath parsePaths bootPaths indexOf extDirPaths endorsedDirsPath extDirs parsePaths extDirPaths endDirs parsePaths endorsedDirsPath LibraryInfo bootPath extDirs endDirs
protected String parse Paths String paths List list new Array List int pos 0 int index paths index Of File path Separator Char pos while index 0 String path paths substring pos index list add path pos index 1 index paths index Of File path Separator Char pos String path paths substring pos if path equals null NON NLS 1 list add path return String list to Array new String list size  parsePaths ArrayList indexOf pathSeparatorChar indexOf pathSeparatorChar toArray
public void disposeVM Install String id IVM Install vm findVM Install id if vm null Launching Plugin set Library Info vm get Install Location get Absolute Path null super disposeVM Install id  disposeVMInstall IVMInstall findVMInstall LaunchingPlugin setLibraryInfo getInstallLocation getAbsolutePath disposeVMInstall
public URL get Default Javadoc Location File install Location File java Executable find Java Executable install Location if java Executable null Library Info lib Info get Library Info install Location java Executable if lib Info null String version lib Info get Version if version null try if version starts With 1 4 2 NON NLS 1 return new URL http java sun com j2se 1 4 2 docs api NON NLS 1 else if version starts With 1 4 1 NON NLS 1 return new URL http java sun com j2se 1 4 1 docs api NON NLS 1 else if version starts With 1 4 0 NON NLS 1 return new URL http java sun com j2se 1 4 docs api NON NLS 1 else if version starts With 1 3 NON NLS 1 return new URL http java sun com j2se 1 3 docs api NON NLS 1 else if version starts With 1 2 NON NLS 1 return new URL http java sun com products jdk 1 2 docs api NON NLS 1 catch MalformedURL Exception e return null  getDefaultJavadocLocation installLocation javaExecutable findJavaExecutable installLocation javaExecutable LibraryInfo libInfo getLibraryInfo installLocation javaExecutable libInfo libInfo getVersion startsWith startsWith startsWith startsWith startsWith MalformedURLException

Prints system properties to standard out ul li java vm version li li sun boot class path li li java ext dirs li li java endorsed dirs li ul param args public static void main String args System out print System get Property java vm version NON NLS 1 System out print NON NLS 1 System out print System get Property sun boot class path NON NLS 1 System out print NON NLS 1 System out print System get Property java ext dirs NON NLS 1 System out print NON NLS 1 System out print System get Property java endorsed dirs NON NLS 1  getProperty getProperty getProperty getProperty

private String variable String public Variable Classpath Entry  variableString VariableClasspathEntry
public Variable Classpath Entry String variable String this variable String variable String  VariableClasspathEntry variableString variableString variableString
see org eclipse jdt internal launching Abstract Runtime Classpath Entry build Memento org w3c dom Document org w3c dom Element protected void build Memento Document document Element memento throws Core Exception memento set Attribute variable String variable String NON NLS 1  AbstractRuntimeClasspathEntry buildMemento buildMemento CoreException setAttribute variableString variableString
see org eclipse jdt launching I Runtime Classpath Entry2 initialize From org w3c dom Element public void initialize From Element memento throws Core Exception variable String memento get Attribute variable String NON NLS 1  IRuntimeClasspathEntry2 initializeFrom initializeFrom CoreException variableString getAttribute variableString
see org eclipse jdt launching I Runtime Classpath Entry2 get Type Id public String get Type Id return TYPE ID  IRuntimeClasspathEntry2 getTypeId getTypeId TYPE_ID
see org eclipse jdt launching I Runtime Classpath Entry2 get Runtime Classpath Entries org eclipse debug core I Launch Configuration public I Runtime Classpath Entry get Runtime Classpath Entries I Launch Configuration configuration throws Core Exception return new I Runtime Classpath Entry 0  IRuntimeClasspathEntry2 getRuntimeClasspathEntries ILaunchConfiguration IRuntimeClasspathEntry getRuntimeClasspathEntries ILaunchConfiguration CoreException IRuntimeClasspathEntry
see org eclipse jdt launching I Runtime Classpath Entry2 get Name public String get Name return variable String  IRuntimeClasspathEntry2 getName getName variableString
see org eclipse jdt launching I Runtime Classpath Entry get Type public int get Type return OTHER  IRuntimeClasspathEntry getType getType
return Returns the variable String public String get Variable String return variable String  variableString getVariableString variableString
param variable String The variable String to set public void set Variable String String variable String this variable String variable String  variableString variableString setVariableString variableString variableString variableString

see org eclipse jdt launching I Runtime Classpath Entry Resolver resolve Runtime Classpath Entry org eclipse jdt launching I Runtime Classpath Entry org eclipse debug core I Launch Configuration public I Runtime Classpath Entry resolve Runtime Classpath Entry I Runtime Classpath Entry entry I Launch Configuration configuration throws Core Exception return resolve Runtime Classpath Entry entry  IRuntimeClasspathEntryResolver resolveRuntimeClasspathEntry IRuntimeClasspathEntry ILaunchConfiguration IRuntimeClasspathEntry resolveRuntimeClasspathEntry IRuntimeClasspathEntry ILaunchConfiguration CoreException resolveRuntimeClasspathEntry
see org eclipse jdt launching I Runtime Classpath Entry Resolver resolve Runtime Classpath Entry org eclipse jdt launching I Runtime Classpath Entry org eclipse jdt core I Java Project public I Runtime Classpath Entry resolve Runtime Classpath Entry I Runtime Classpath Entry entry I Java Project project throws Core Exception return resolve Runtime Classpath Entry entry  IRuntimeClasspathEntryResolver resolveRuntimeClasspathEntry IRuntimeClasspathEntry IJavaProject IRuntimeClasspathEntry resolveRuntimeClasspathEntry IRuntimeClasspathEntry IJavaProject CoreException resolveRuntimeClasspathEntry
private I Runtime Classpath Entry resolve Runtime Classpath Entry I Runtime Classpath Entry entry throws Core Exception String variable String Variable Classpath Entry entry get Variable String String strpath Variables Plugin get Default get String Variable Manager perform String Substitution variable String I Path path new Path strpath I Runtime Classpath Entry archive Entry Java Runtime new Archive Runtime Classpath Entry path return new I Runtime Classpath Entry archive Entry  IRuntimeClasspathEntry resolveRuntimeClasspathEntry IRuntimeClasspathEntry CoreException variableString VariableClasspathEntry getVariableString VariablesPlugin getDefault getStringVariableManager performStringSubstitution variableString IPath IRuntimeClasspathEntry archiveEntry JavaRuntime newArchiveRuntimeClasspathEntry IRuntimeClasspathEntry archiveEntry
see org eclipse jdt launching I Runtime Classpath Entry Resolver resolveVM Install org eclipse jdt core I Classpath Entry public IVM Install resolveVM Install I Classpath Entry entry throws Core Exception return null  IRuntimeClasspathEntryResolver resolveVMInstall IClasspathEntry IVMInstall resolveVMInstall IClasspathEntry CoreException

Constructs an empty VM container public VM Definitions Container fVM Type ToVM Map new Hash Map 10 f InvalidVM List new Array List 10 fVM List new Array List 10  VMDefinitionsContainer fVMTypeToVMMap HashMap fInvalidVMList ArrayList fVMList ArrayList
Add the specified VM to the VM definitions managed by this container p If distinguishing valid from invalid V Ms is important the specified VM must have already had its install location set An invalid VM is one whose install location doesn t exist p param vm the VM to be added to this container public void addVM IVM Install vm if fVM List contains vm IVM Install Type vm Install Type vm getVM Install Type List vm List List fVM Type ToVM Map get vm Install Type if vm List null vm List new Array List 3 fVM Type ToVM Map put vm Install Type vm List vm List add vm File install Location vm get Install Location if install Location null vm Install Type validate Install Location install Location isOK f InvalidVM List add vm fVM List add vm  VMs IVMInstall fVMList IVMInstallType vmInstallType getVMInstallType vmList fVMTypeToVMMap vmInstallType vmList vmList ArrayList fVMTypeToVMMap vmInstallType vmList vmList installLocation getInstallLocation installLocation vmInstallType validateInstallLocation installLocation fInvalidVMList fVMList
Add all VM s in the specified list to the VM definitions managed by this container p If distinguishing valid from invalid V Ms is important the specified V Ms must have already had their install locations set An invalid VM is one whose install location doesn t exist p param vm List a list of V Ms to be added to this container public void addVM List List vm List Iterator iterator vm List iterator while iterator has Next IVM Install vm IVM Install iterator next addVM vm  VMs VMs vmList VMs addVMList vmList vmList hasNext IVMInstall IVMInstall
Return a mapping of VM install types to lists of V Ms The keys of this map are instances of code IVM Install Type code The values are instances of code java util List code which contain instances of code IVM Install code return Map the mapping of VM install types to lists of V Ms public Map getVM Type ToVM Map return fVM Type ToVM Map  VMs IVMInstallType IVMInstall VMs getVMTypeToVMMap fVMTypeToVMMap
Return a list of all V Ms in this container including any invalid V Ms An invalid VM is one whose install location does not exist on the file system The order of the list is not specified return List the data structure containing all V Ms managed by this container public List getVM List return fVM List  VMs VMs VMs getVMList fVMList
Return a list of all valid V Ms in this container A valid VM is one whose install location exists on the file system The order of the list is not specified return List public List get ValidVM List List result List getVM List result List remove All f InvalidVM List return result List  VMs getValidVMList resultList getVMList resultList removeAll fInvalidVMList resultList
Returns the composite ID for the default VM The composite ID consists of an ID for the VM install type together with an ID for VM This is necessary because VM ids by themselves are not necessarily unique across VM install types return String returns the composite ID of the current default VM public String get DefaultVM Install CompositeID return f DefaultVM Install CompositeID  getDefaultVMInstallCompositeID fDefaultVMInstallCompositeID
Sets the composite ID for the default VM The composite ID consists of an ID for the VM install type together with an ID for VM This is necessary because VM ids by themselves are not necessarily unique across VM install types param id identifies the new default VM using a composite ID public void set DefaultVM Install CompositeID String id f DefaultVM Install CompositeID id  setDefaultVMInstallCompositeID fDefaultVMInstallCompositeID
Return the default VM s connector type ID return String the current value of the default VM s connector type ID public String get DefaultVM Install Connector TypeID return f DefaultVM Install Connector TypeID  getDefaultVMInstallConnectorTypeID fDefaultVMInstallConnectorTypeID
Set the default VM s connector type ID param id the new value of the default VM s connector type ID public void set DefaultVM Install Connector TypeID String id f DefaultVM Install Connector TypeID id  setDefaultVMInstallConnectorTypeID fDefaultVMInstallConnectorTypeID
Return the VM definitions contained in this object as a String of XML The String is suitable for storing in the workbench preferences p The resulting XML is compatible with the static method code parseXML Into Container code p return String the results of flattening this object into XML throws IO Exception if this method fails Reasons include ul li serialization of the XML document failed li ul throws Parser Configuration Exception if creation of the XML document failed throws Transformer Exception if serialization of the XML document failed public String get AsXML throws Parser Configuration Exception IO Exception Transformer Exception Create the Document and the top level node Document doc Launching Plugin get Document Element config doc create Element vm Settings NON NLS 1 doc append Child config Set the defaultVM attribute on the top level node if get DefaultVM Install CompositeID null config set Attribute defaultVM get DefaultVM Install CompositeID NON NLS 1 Set the defaultVM Connector attribute on the top level node if get DefaultVM Install Connector TypeID null config set Attribute defaultVM Connector get DefaultVM Install Connector TypeID NON NLS 1 Create a node for each install type represented in this container Set vm Install Type Set getVM Type ToVM Map key Set Iterator key Iterator vm Install Type Set iterator while key Iterator has Next IVM Install Type vm Install Type IVM Install Type key Iterator next Element vm Type Element vm Type As Element doc vm Install Type config append Child vm Type Element Serialize the Document and return the resulting String return Java Launch Configuration Utils serialize Document doc  parseXMLIntoContainer IOException ParserConfigurationException TransformerException getAsXML ParserConfigurationException IOException TransformerException LaunchingPlugin getDocument createElement vmSettings appendChild getDefaultVMInstallCompositeID setAttribute getDefaultVMInstallCompositeID defaultVMConnector getDefaultVMInstallConnectorTypeID setAttribute defaultVMConnector getDefaultVMInstallConnectorTypeID vmInstallTypeSet getVMTypeToVMMap keySet keyIterator vmInstallTypeSet keyIterator hasNext IVMInstallType vmInstallType IVMInstallType keyIterator vmTypeElement vmTypeAsElement vmInstallType appendChild vmTypeElement JavaLaunchConfigurationUtils serializeDocument
Create and return a node for the specified VM install type in the specified Document private Element vm Type As Element Document doc IVM Install Type vm Type Create a node for the vm type and set its id attribute Element element doc create Element vm Type NON NLS 1 element set Attribute id vm Type get Id NON NLS 1 For each vm of the specified type create a subordinate node for it List vm List List getVM Type ToVM Map get vm Type Iterator vm Iterator vm List iterator while vm Iterator has Next IVM Install vm IVM Install vm Iterator next Element vm Element vm As Element doc vm element append Child vm Element return element  vmTypeAsElement IVMInstallType vmType createElement vmType setAttribute vmType getId vmList getVMTypeToVMMap vmType vmIterator vmList vmIterator hasNext IVMInstall IVMInstall vmIterator vmElement vmAsElement appendChild vmElement
Create and return a node for the specified VM in the specified Document private Element vm As Element Document doc IVM Install vm Create the node for the VM and set its id name attributes Element element doc create Element vm NON NLS 1 element set Attribute id vm get Id NON NLS 1 element set Attribute name vm get Name NON NLS 1 Determine and set the path attribute for the VM String install Path NON NLS 1 File install Location vm get Install Location if install Location null install Path install Location get Absolute Path element set Attribute path install Path NON NLS 1 If the library Locations attribute is specified create a node for it Library Location library Locations vm get Library Locations if library Locations null Element lib Location Element library Locations As Element doc library Locations element append Child lib Location Element Java doc location URL url vm get Javadoc Location if url null element set Attribute javadocURL url to External Form NON NLS 1 String vm Args vm getVM Arguments if vm Args null vm Args length 0 String Buffer buffer new String Buffer for int i 0 i vm Args length i buffer append vm Args i NON NLS 1 element set Attribute vmargs buffer to String NON NLS 1 return element  vmAsElement IVMInstall createElement setAttribute getId setAttribute getName installPath installLocation getInstallLocation installLocation installPath installLocation getAbsolutePath setAttribute installPath libraryLocations LibraryLocation libraryLocations getLibraryLocations libraryLocations libLocationElement libraryLocationsAsElement libraryLocations appendChild libLocationElement getJavadocLocation setAttribute toExternalForm vmArgs getVMArguments vmArgs vmArgs StringBuffer StringBuffer vmArgs vmArgs setAttribute toString
Create and return a library Locations node This node owns subordinate nodes that list individual library locations private static Element library Locations As Element Document doc Library Location locations Element root doc create Element library Locations NON NLS 1 for int i 0 i locations length i Element element doc create Element library Location NON NLS 1 element set Attribute jre Jar locations i get System Library Path to String NON NLS 1 element set Attribute jre Src locations i get System Library Source Path to String NON NLS 1 element set Attribute pkg Root locations i get Package Root Path to String NON NLS 1 root append Child element return root  libraryLocations libraryLocationsAsElement LibraryLocation createElement libraryLocations createElement libraryLocation setAttribute jreJar getSystemLibraryPath toString setAttribute jreSrc getSystemLibrarySourcePath toString setAttribute pkgRoot getPackageRootPath toString appendChild
Parse the VM definitions contained in the specified Input Stream and return an instance of code VM Definitions Container code p The V Ms in the returned container are instances of code VM Standin code p p This method has no side effects That is no notifications are sent for VM adds changes deletes and the workbench preferences are not affected p p If the code get AsXML code method is called on the returned container object the resulting XML will be sematically equivalent though not necessarily syntactically equivalent as the XML contained in code input Stream code p param input Stream the code Input Stream code containing XML that declares a set of V Ms and a default VM return VM Definitions Container a container for the VM objects declared in code input Stream code throws IO Exception if this method fails Reasons include ul li the XML in code input Stream code was badly formatted li li the top level node was not vm Settings li ul public static VM Definitions Container parseXML Into Container Input Stream input Stream throws IO Exception Create the container to populate VM Definitions Container container new VM Definitions Container Wrapper the stream for efficient parsing Input Stream stream new Buffered Input Stream input Stream Reader reader new Input Stream Reader stream Do the parsing and obtain the top level node Element config null try Document Builder parser Document Builder Factory new Instance new Document Builder config parser parse new Input Source reader get Document Element catch SAX Exception e throw new IO Exception Launching Messages get String Java Runtime bad Format NON NLS 1 catch Parser Configuration Exception e reader close throw new IO Exception Launching Messages get String Java Runtime bad Format NON NLS 1 finally reader close If the top level node wasn t what we expected bail out if config get Node Name equals Ignore Case vm Settings NON NLS 1 throw new IO Exception Launching Messages get String Java Runtime bad Format NON NLS 1 Populate the default VM related fields container set DefaultVM Install CompositeID config get Attribute defaultVM NON NLS 1 container set DefaultVM Install Connector TypeID config get Attribute defaultVM Connector NON NLS 1 Traverse the parsed structure and populate the VM Type to VM Map Node List list config get Child Nodes int length list get Length for int i 0 i length i Node node list item i short type node get Node Type if type Node ELEMENT NODE Element vm Type Element Element node if vm Type Element get Node Name equals Ignore Case vm Type NON NLS 1 populateVM Types vm Type Element container return container  InputStream VMDefinitionsContainer VMs VMStandin getAsXML inputStream inputStream InputStream VMs VMDefinitionsContainer inputStream IOException inputStream vmSettings VMDefinitionsContainer parseXMLIntoContainer InputStream inputStream IOException VMDefinitionsContainer VMDefinitionsContainer InputStream BufferedInputStream inputStream InputStreamReader DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder InputSource getDocumentElement SAXException IOException LaunchingMessages getString JavaRuntime badFormat ParserConfigurationException IOException LaunchingMessages getString JavaRuntime badFormat getNodeName equalsIgnoreCase vmSettings IOException LaunchingMessages getString JavaRuntime badFormat setDefaultVMInstallCompositeID getAttribute setDefaultVMInstallConnectorTypeID getAttribute defaultVMConnector VMType NodeList getChildNodes getLength getNodeType ELEMENT_NODE vmTypeElement vmTypeElement getNodeName equalsIgnoreCase vmType populateVMTypes vmTypeElement
For the specified vm type node parse all subordinate VM definitions and add them to the specified container private static void populateVM Types Element vm Type Element VM Definitions Container container Retrieve the id attribute and the corresponding VM type object String id vm Type Element get Attribute id NON NLS 1 IVM Install Type vm Type Java Runtime getVM Install Type id if vm Type null For each VM child node populate the container with a subordinate node Node List vm Node List vm Type Element get Child Nodes for int i 0 i vm Node List get Length i Node vm Node vm Node List item i short type vm Node get Node Type if type Node ELEMENT NODE Element vm Element Element vm Node if vm Element get Node Name equals Ignore Case vm NON NLS 1 populateVM For Type vm Type vm Element container else Launching Plugin log Launching Messages get String Java Runtime VM type element with unknown id 1 NON NLS 1  populateVMTypes vmTypeElement VMDefinitionsContainer vmTypeElement getAttribute IVMInstallType vmType JavaRuntime getVMInstallType vmType NodeList vmNodeList vmTypeElement getChildNodes vmNodeList getLength vmNode vmNodeList vmNode getNodeType ELEMENT_NODE vmElement vmNode vmElement getNodeName equalsIgnoreCase populateVMForType vmType vmElement LaunchingPlugin LaunchingMessages getString JavaRuntime VM_type_element_with_unknown_id_1
Parse the specified VM node create a VM Standin for it and add this to the specified container private static void populateVM For Type IVM Install Type vm Type Element vm Element VM Definitions Container container String id vm Element get Attribute id NON NLS 1 if id null Retrieve the path attribute If none skip this node String install Path vm Element get Attribute path NON NLS 1 if install Path null return Create a VM Standin for the node and set its name install Location attributes VM Standin vm Standin new VM Standin vm Type id vm Standin set Name vm Element get Attribute name NON NLS 1 File install Location new File install Path vm Standin set Install Location install Location container addVM vm Standin Look for subordinate nodes These may be library Location library Locations or version Info Node List list vm Element get Child Nodes int length list get Length for int i 0 i length i Node node list item i short type node get Node Type if type Node ELEMENT NODE Element sub Element Element node String sub Element Name sub Element get Node Name if sub Element Name equals library Location NON NLS 1 Library Location loc get Library Location sub Element vm Standin set Library Locations new Library Location loc break else if sub Element Name equals library Locations NON NLS 1 set Library Locations vm Standin sub Element break javadoc URL String external Form vm Element get Attribute javadocURL NON NLS 1 if external Form null external Form length 0 try vm Standin set Javadoc Location new URL external Form catch MalformedURL Exception e Launching Plugin log e vm Arguments String vm Args vm Element get Attribute vmargs NON NLS 1 if vm Args null vm Args length 0 Execution Arguments ex Args new Execution Arguments vm Args NON NLS 1 vm Standin setVM Arguments ex Args getVM Arguments Array else Launching Plugin log Launching Messages get String Java Runtime VM element specified with no id attribute 2 NON NLS 1  VMStandin populateVMForType IVMInstallType vmType vmElement VMDefinitionsContainer vmElement getAttribute installPath vmElement getAttribute installPath VMStandin installLocation VMStandin vmStandin VMStandin vmType vmStandin setName vmElement getAttribute installLocation installPath vmStandin setInstallLocation installLocation vmStandin libraryLocation libraryLocations versionInfo NodeList vmElement getChildNodes getLength getNodeType ELEMENT_NODE subElement subElementName subElement getNodeName subElementName libraryLocation LibraryLocation getLibraryLocation subElement vmStandin setLibraryLocations LibraryLocation subElementName libraryLocations setLibraryLocations vmStandin subElement externalForm vmElement getAttribute externalForm externalForm vmStandin setJavadocLocation externalForm MalformedURLException LaunchingPlugin vmArgs vmElement getAttribute vmArgs vmArgs ExecutionArguments exArgs ExecutionArguments vmArgs vmStandin setVMArguments exArgs getVMArgumentsArray LaunchingPlugin LaunchingMessages getString JavaRuntime VM_element_specified_with_no_id_attribute_2
Create return a Library Location object populated from the attribute values in the specified node private static Library Location get Library Location Element lib Location Element String jre Jar lib Location Element get Attribute jre Jar NON NLS 1 String jre Src lib Location Element get Attribute jre Src NON NLS 1 String pkg Root lib Location Element get Attribute pkg Root NON NLS 1 if jre Jar null jre Src null pkg Root null return new Library Location new Path jre Jar new Path jre Src new Path pkg Root Launching Plugin log Launching Messages get String Java Runtime Library location element incorrectly specified 3 NON NLS 1 return null  LibraryLocation LibraryLocation getLibraryLocation libLocationElement jreJar libLocationElement getAttribute jreJar jreSrc libLocationElement getAttribute jreSrc pkgRoot libLocationElement getAttribute pkgRoot jreJar jreSrc pkgRoot LibraryLocation jreJar jreSrc pkgRoot LaunchingPlugin LaunchingMessages getString JavaRuntime Library_location_element_incorrectly_specified_3
Set the Library Locations on the specified VM by extracting the subordinate nodes from the specified lirbary Locations node private static void set Library Locations IVM Install vm Element lib Locations Element Node List list lib Locations Element get Child Nodes int length list get Length List locations new Array List length for int i 0 i length i Node node list item i short type node get Node Type if type Node ELEMENT NODE Element library Location Element Element node if library Location Element get Node Name equals library Location NON NLS 1 locations add get Library Location library Location Element vm set Library Locations Library Location locations to Array new Library Location locations size  LibraryLocations lirbaryLocations setLibraryLocations IVMInstall libLocationsElement NodeList libLocationsElement getChildNodes getLength ArrayList getNodeType ELEMENT_NODE libraryLocationElement libraryLocationElement getNodeName libraryLocation getLibraryLocation libraryLocationElement setLibraryLocations LibraryLocation toArray LibraryLocation

private static final I Java Element EMPTY RESULT new I Java Element 0 private Selection Converter no instance  IJavaElement EMPTY_RESULT IJavaElement SelectionConverter
Converts the selection provided by the given part into a structured selection The following conversion rules are used ul li code part instanceof Java Editor code returns a structured selection using code resolve to convert the editor s text selection li li code part instanceof I Workbench Part code returns the part s selection if it is a structured selection li li code default code returns an empty structured selection li ul public static I Structured Selection get Structured Selection I Workbench Part part throws Java Model Exception if part instanceof Java Editor return new Structured Selection code Resolve Java Editor part I Selection Provider provider part get Site get Selection Provider if provider null I Selection selection provider get Selection if selection instanceof I Structured Selection return I Structured Selection selection return Structured Selection EMPTY  JavaEditor IWorkbenchPart IStructuredSelection getStructuredSelection IWorkbenchPart JavaModelException JavaEditor StructuredSelection codeResolve JavaEditor ISelectionProvider getSite getSelectionProvider ISelection getSelection IStructuredSelection IStructuredSelection StructuredSelection
Converts the given structured selection into an array of Java elements An empty array is returned if one of the elements stored in the structured selection is not of tupe code I Java Element code public static I Java Element get Elements I Structured Selection selection if selection is Empty I Java Element result new I Java Element selection size int i 0 for Iterator iter selection iterator iter has Next i Object element iter next if element instanceof I Java Element return EMPTY RESULT result i I Java Element element return result return EMPTY RESULT  IJavaElement IJavaElement getElements IStructuredSelection isEmpty IJavaElement IJavaElement hasNext IJavaElement EMPTY_RESULT IJavaElement EMPTY_RESULT
public static boolean can Operate On Java Editor editor if editor null return false return get Input editor null  canOperateOn JavaEditor getInput
Converts the text selection provided by the given editor into an array of Java elements If the selection doesn t cover a Java element and the selection s length is greater than 0 the methods returns the editor s input element public static I Java Element code Resolve Or Input Java Editor editor throws Java Model Exception I Java Element input get Input editor I Text Selection selection I Text Selection editor get Selection Provider get Selection I Java Element result code Resolve input selection if result length 0 result new I Java Element input return result  IJavaElement codeResolveOrInput JavaEditor JavaModelException IJavaElement getInput ITextSelection ITextSelection getSelectionProvider getSelection IJavaElement codeResolve IJavaElement
public static I Java Element code Resolve Or Input Handled Java Editor editor Shell shell String title try return code Resolve Or Input editor catch Java Model Exception e Exception Handler handle e shell title Action Messages get String Selection Converter codeResolve failed NON NLS 1 return null  IJavaElement codeResolveOrInputHandled JavaEditor codeResolveOrInput JavaModelException ExceptionHandler ActionMessages getString SelectionConverter codeResolve_failed
Converts the text selection provided by the given editor a Java element by asking the user if code reolve returned more than one result If the selection doesn t cover a Java element and the selection s length is greater than 0 the methods returns the editor s input element public static I Java Element code Resolve Or Input Java Editor editor Shell shell String title String message throws Java Model Exception I Java Element elements code Resolve Or Input editor if elements null elements length 0 return null I Java Element candidate elements 0 if elements length 1 candidate Open Action Util select Java Element elements shell title message return candidate  IJavaElement codeResolveOrInput JavaEditor JavaModelException IJavaElement codeResolveOrInput IJavaElement OpenActionUtil selectJavaElement
public static I Java Element code Resolve Or Input Handled Java Editor editor Shell shell String title String message try return code Resolve Or Input editor shell title message catch Java Model Exception e Exception Handler handle e shell title Action Messages get String Selection Converter codeResolveOrInput failed NON NLS 1 return null  IJavaElement codeResolveOrInputHandled JavaEditor codeResolveOrInput JavaModelException ExceptionHandler ActionMessages getString SelectionConverter codeResolveOrInput_failed
public static I Java Element code Resolve Java Editor editor throws Java Model Exception return code Resolve get Input editor I Text Selection editor get Selection Provider get Selection  IJavaElement codeResolve JavaEditor JavaModelException codeResolve getInput ITextSelection getSelectionProvider getSelection
Converts the text selection provided by the given editor a Java element by asking the user if code reolve returned more than one result If the selection doesn t cover a Java element code null code is returned public static I Java Element code Resolve Java Editor editor Shell shell String title String message throws Java Model Exception I Java Element elements code Resolve editor if elements null elements length 0 return null I Java Element candidate elements 0 if elements length 1 candidate Open Action Util select Java Element elements shell title message return candidate  IJavaElement codeResolve JavaEditor JavaModelException IJavaElement codeResolve IJavaElement OpenActionUtil selectJavaElement
public static I Java Element code Resolve Handled Java Editor editor Shell shell String title try return code Resolve editor catch Java Model Exception e Exception Handler handle e shell title Action Messages get String Selection Converter codeResolve failed NON NLS 1 return null  IJavaElement codeResolveHandled JavaEditor codeResolve JavaModelException ExceptionHandler ActionMessages getString SelectionConverter codeResolve_failed
public static I Java Element get Element At Offset Java Editor editor throws Java Model Exception return get Element At Offset get Input editor I Text Selection editor get Selection Provider get Selection  IJavaElement getElementAtOffset JavaEditor JavaModelException getElementAtOffset getInput ITextSelection getSelectionProvider getSelection
public static I Type get Type At Offset Java Editor editor throws Java Model Exception I Java Element element Selection Converter get Element At Offset editor I Type type I Type element get Ancestor I Java Element TYPE if type null I Compilation Unit unit Selection Converter get Input As Compilation Unit editor if unit null type unit find Primary Type return type  IType getTypeAtOffset JavaEditor JavaModelException IJavaElement SelectionConverter getElementAtOffset IType IType getAncestor IJavaElement ICompilationUnit SelectionConverter getInputAsCompilationUnit findPrimaryType
public static I Java Element get Input Java Editor editor if editor null return null I Editor Input input editor get Editor Input if input instanceof I Class File Editor Input return I Class File Editor Input input get Class File I Working Copy Manager manager Java Plugin get Default get Working Copy Manager return manager get Working Copy input  IJavaElement getInput JavaEditor IEditorInput getEditorInput IClassFileEditorInput IClassFileEditorInput getClassFile IWorkingCopyManager JavaPlugin getDefault getWorkingCopyManager getWorkingCopy
public static I Compilation Unit get Input As Compilation Unit Java Editor editor Object editor Input Selection Converter get Input editor if editor Input instanceof I Compilation Unit return I Compilation Unit editor Input else return null  ICompilationUnit getInputAsCompilationUnit JavaEditor editorInput SelectionConverter getInput editorInput ICompilationUnit ICompilationUnit editorInput
public static I Java Element code Resolve I Java Element input I Text Selection selection throws Java Model Exception if input instanceof I Code Assist if input instanceof I Compilation Unit Java Model Util reconcile I Compilation Unit input I Java Element elements I Code Assist input code Select selection get Offset selection get Length if elements null elements length 0 return elements return EMPTY RESULT  IJavaElement codeResolve IJavaElement ITextSelection JavaModelException ICodeAssist ICompilationUnit JavaModelUtil ICompilationUnit IJavaElement ICodeAssist codeSelect getOffset getLength EMPTY_RESULT
public static I Java Element get Element At Offset I Java Element input I Text Selection selection throws Java Model Exception if input instanceof I Compilation Unit I Compilation Unit cunit I Compilation Unit input Java Model Util reconcile cunit I Java Element ref cunit get Element At selection get Offset if ref null return input else return ref else if input instanceof I Class File I Java Element ref I Class File input get Element At selection get Offset if ref null return input else return ref return null  IJavaElement getElementAtOffset IJavaElement ITextSelection JavaModelException ICompilationUnit ICompilationUnit ICompilationUnit JavaModelUtil IJavaElement getElementAt getOffset IClassFile IJavaElement IClassFile getElementAt getOffset
public static I Java Element resolve Enclosing Element Java Editor editor I Text Selection selection throws Java Model Exception return resolve Enclosing Element get Input editor selection  IJavaElement resolveEnclosingElement JavaEditor ITextSelection JavaModelException resolveEnclosingElement getInput
public static I Java Element resolve Enclosing Element I Java Element input I Text Selection selection throws Java Model Exception I Java Element at Offset null if input instanceof I Compilation Unit I Compilation Unit cunit I Compilation Unit input Java Model Util reconcile cunit at Offset cunit get Element At selection get Offset else if input instanceof I Class File I Class File cfile I Class File input at Offset cfile get Element At selection get Offset else return null if at Offset null return input else int selection End selection get Offset selection get Length I Java Element result at Offset if at Offset instanceof I Source Reference I Source Range range I Source Reference at Offset get Source Range while range get Offset range get Length selection End result result get Parent if result instanceof I Source Reference result input break range I Source Reference result get Source Range return result  IJavaElement resolveEnclosingElement IJavaElement ITextSelection JavaModelException IJavaElement atOffset ICompilationUnit ICompilationUnit ICompilationUnit JavaModelUtil atOffset getElementAt getOffset IClassFile IClassFile IClassFile atOffset getElementAt getOffset atOffset selectionEnd getOffset getLength IJavaElement atOffset atOffset ISourceReference ISourceRange ISourceReference atOffset getSourceRange getOffset getLength selectionEnd getParent ISourceReference ISourceReference getSourceRange

Creates an instance of a status dialog public Status Dialog Shell parent super parent f Last Status new Status Info  StatusDialog fLastStatus StatusInfo
Specifies whether status line appears to the left of the buttons default or above them param above Buttons if code true code status line is placed above buttons if code false code to the right public void set Status Line Above Buttons boolean above Buttons f Status Line Above Buttons above Buttons  aboveButtons setStatusLineAboveButtons aboveButtons fStatusLineAboveButtons aboveButtons
Update the dialog s status line to reflect the given status It is save to call this method before the dialog has been opened protected void update Status I Status status f Last Status status if f Status Line null f Status Line is Disposed update Buttons Enable State status f Status Line set Error Status status  updateStatus IStatus fLastStatus fStatusLine fStatusLine isDisposed updateButtonsEnableState fStatusLine setErrorStatus
Returns the last status public I Status get Status return f Last Status  IStatus getStatus fLastStatus
Updates the status of the ok button to reflect the given status Subclasses may override this method to update additional buttons param status the status protected void update Buttons Enable State I Status status if f Ok Button null f Ok Button is Disposed f Ok Button set Enabled status matches I Status ERROR  updateButtonsEnableState IStatus fOkButton fOkButton isDisposed fOkButton setEnabled IStatus
protected void configure Shell Shell shell super configure Shell shell if f Title null shell set Text f Title  configureShell configureShell fTitle setText fTitle
public void create super create if f Last Status null policy dialogs are not allowed to come up with an error message if f Last Status matches I Status ERROR remove the message f Last Status new Status I Status ERROR f Last Status get Plugin f Last Status get Code f Last Status get Exception NON NLS 1 update Status f Last Status  fLastStatus fLastStatus IStatus fLastStatus IStatus fLastStatus getPlugin fLastStatus getCode fLastStatus getException updateStatus fLastStatus
see Dialog create Buttons For Button Bar Composite protected void create Buttons For Button Bar Composite parent f Ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButtonsForButtonBar fOkButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
protected Control create Button Bar Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout if f Status Line Above Buttons layout num Columns 1 else layout num Columns 2 layout margin Height 0 layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Status Line new Message Line composite f Status Line set Alignment SWT LEFT f Status Line set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Status Line set Error Status null apply Dialog Font composite super create Button Bar composite return composite  createButtonBar GridLayout GridLayout fStatusLineAboveButtons numColumns numColumns marginHeight marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN setLayout setLayoutData GridData GridData FILL_HORIZONTAL fStatusLine MessageLine fStatusLine setAlignment fStatusLine setLayoutData GridData GridData FILL_HORIZONTAL fStatusLine setErrorStatus applyDialogFont createButtonBar
Sets the title for this dialog param title the title public void set Title String title f Title title null title NON NLS 1 Shell shell get Shell if shell null shell is Disposed shell set Text f Title  setTitle fTitle getShell isDisposed setText fTitle
Sets the image for this dialog param image the image public void set Image Image image f Image image Shell shell get Shell if shell null shell is Disposed shell set Image f Image  setImage fImage getShell isDisposed setImage fImage

public void set Filter String pattern boolean ignore Case boolean igore Wild Cards int qualifier Index pattern last Index Of NON NLS 1 type if qualifier Index 1 f Qualifier Matcher null f Matcher new String Matcher adjust Pattern pattern ignore Case igore Wild Cards qualified type else f Qualifier Matcher new String Matcher pattern substring 0 qualifier Index ignore Case igore Wild Cards f Matcher new String Matcher adjust Pattern pattern substring qualifier Index 1 ignore Case igore Wild Cards  setFilter ignoreCase igoreWildCards qualifierIndex lastIndexOf qualifierIndex fQualifierMatcher fMatcher StringMatcher adjustPattern ignoreCase igoreWildCards fQualifierMatcher StringMatcher qualifierIndex ignoreCase igoreWildCards fMatcher StringMatcher adjustPattern qualifierIndex ignoreCase igoreWildCards
public boolean match Object element if element instanceof Type Info return false Type Info type Type Info element if f Matcher match type get Type Name return false if f Qualifier Matcher null return true return f Qualifier Matcher match type get Type Container Name  TypeInfo TypeInfo TypeInfo fMatcher getTypeName fQualifierMatcher fQualifierMatcher getTypeContainerName
private String adjust Pattern String pattern int length pattern length if length 0 switch pattern char At length 1 case END SYMBOL pattern pattern substring 0 length 1 break case ANY STRING break default pattern pattern ANY STRING return pattern  adjustPattern charAt END_SYMBOL ANY_STRING ANY_STRING
private static class String Comparator implements Comparator public int compare Object left Object right String left String String left String right String String right if Strings is Lower Case left String char At 0 Strings is Lower Case right String char At 0 return 1 if Strings is Lower Case right String char At 0 Strings is Lower Case left String char At 0 return 1 int result left String compare To Ignore Case right String if result 0 result left String compare To right String return result  StringComparator leftString rightString isLowerCase leftString charAt isLowerCase rightString charAt isLowerCase rightString charAt isLowerCase leftString charAt leftString compareToIgnoreCase rightString leftString compareTo rightString
Constructs a type selection dialog param parent the parent shell param context the runnable context param element Kinds code I Java Search Constants CLASS code code I Java Search Constants INTERFACE code or code I Java Search Constants TYPE code param scope the java search scope public Type Selection Dialog Shell parent I Runnable Context context int element Kinds I Java Search Scope scope super parent new Type Info Label Provider Type Info Label Provider SHOW TYPE ONLY new Type Info Label Provider Type Info Label Provider SHOW TYPE CONTAINER ONLY Type Info Label Provider SHOW ROOT POSTFIX Assert is Not Null context Assert is Not Null scope f Runnable Context context f Scope scope f Element Kinds element Kinds set Upper List Label JavaUI Messages get String Type Selection Dialog upper Label NON NLS 1 set Lower List Label JavaUI Messages get String Type Selection Dialog lower Label NON NLS 1  elementKinds IJavaSearchConstants IJavaSearchConstants IJavaSearchConstants TypeSelectionDialog IRunnableContext elementKinds IJavaSearchScope TypeInfoLabelProvider TypeInfoLabelProvider SHOW_TYPE_ONLY TypeInfoLabelProvider TypeInfoLabelProvider SHOW_TYPE_CONTAINER_ONLY TypeInfoLabelProvider SHOW_ROOT_POSTFIX isNotNull isNotNull fRunnableContext fScope fElementKinds elementKinds setUpperListLabel JavaUIMessages getString TypeSelectionDialog upperLabel setLowerListLabel JavaUIMessages getString TypeSelectionDialog lowerLabel
protected Filtered List create Filtered List Composite parent Filtered List list super create Filtered List parent f Filtered List set Filter Matcher new Type Filter Matcher f Filtered List set Comparator new String Comparator return list  FilteredList createFilteredList FilteredList createFilteredList fFilteredList setFilterMatcher TypeFilterMatcher fFilteredList setComparator StringComparator
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception All Types Cache get Types f Scope f Element Kinds monitor type List if monitor is Canceled throw new Interrupted Exception  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException AllTypesCache getTypes fScope fElementKinds typeList isCanceled InterruptedException
public int open final Array List type List new Array List try if is Cache Up To Date run without progress monitor All Types Cache get Types f Scope f Element Kinds null type List else I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception All Types Cache get Types f Scope f Element Kinds monitor type List if monitor is Canceled throw new Interrupted Exception f Runnable Context run true true runnable catch Invocation Target Exception e Exception Handler handle e JavaUI Messages get String Type Selection Dialog error3 Title JavaUI Messages get String Type Selection Dialog error3 Message NON NLS 1 NON NLS 2 return CANCEL catch Interrupted Exception e cancelled by user return CANCEL if type List is Empty String title JavaUI Messages get String Type Selection Dialog notypes title NON NLS 1 String message JavaUI Messages get String Type Selection Dialog notypes message NON NLS 1 Message Dialog open Information get Shell title message return CANCEL Type Info type Refs Type Info type List to Array new Type Info type List size set Elements type Refs return super open  ArrayList typeList ArrayList isCacheUpToDate AllTypesCache getTypes fScope fElementKinds typeList IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException AllTypesCache getTypes fScope fElementKinds typeList isCanceled InterruptedException fRunnableContext InvocationTargetException ExceptionHandler JavaUIMessages getString TypeSelectionDialog error3Title JavaUIMessages getString TypeSelectionDialog error3Message InterruptedException typeList isEmpty JavaUIMessages getString TypeSelectionDialog JavaUIMessages getString TypeSelectionDialog MessageDialog openInformation getShell TypeInfo typeRefs TypeInfo typeList toArray TypeInfo typeList setElements typeRefs
protected void compute Result Type Info ref Type Info get Lower Selected Element if ref null return try I Type type ref resolve Type f Scope if type null not a class file or compilation unit String title JavaUI Messages get String Type Selection Dialog error Title NON NLS 1 String message JavaUI Messages get Formatted String Type Selection Dialog dialog Message ref get Path NON NLS 1 Message Dialog open Error get Shell title message set Result null else List result new Array List 1 result add type set Result result catch Java Model Exception e String title JavaUI Messages get String Type Selection Dialog error Title NON NLS 1 String message JavaUI Messages get String Type Selection Dialog error Message NON NLS 1 Error Dialog open Error get Shell title message e get Status set Result null  computeResult TypeInfo TypeInfo getLowerSelectedElement IType resolveType fScope JavaUIMessages getString TypeSelectionDialog errorTitle JavaUIMessages getFormattedString TypeSelectionDialog dialogMessage getPath MessageDialog openError getShell setResult ArrayList setResult JavaModelException JavaUIMessages getString TypeSelectionDialog errorTitle JavaUIMessages getString TypeSelectionDialog errorMessage ErrorDialog openError getShell getStatus setResult
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try result 0 All Types Cache is Cache Up To Date monitor catch Operation Canceled Exception e throw new Interrupted Exception e get Message  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException AllTypesCache isCacheUpToDate OperationCanceledException InterruptedException getMessage
private boolean is Cache Up To Date throws Invocation Target Exception Interrupted Exception final boolean result new boolean 1 I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try result 0 All Types Cache is Cache Up To Date monitor catch Operation Canceled Exception e throw new Interrupted Exception e get Message PlatformUI get Workbench get Progress Service run true true runnable return result 0  isCacheUpToDate InvocationTargetException InterruptedException IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException AllTypesCache isCacheUpToDate OperationCanceledException InterruptedException getMessage getWorkbench getProgressService

public Basic Editor Action Contributor f Retarget Content Assist new Retarget Action Jdt Action Constants CONTENT ASSIST Java Editor Messages get String Content Assist Proposal label NON NLS 1 f Retarget Content Assist set Action Definition Id I Java Editor Action Definition Ids CONTENT ASSIST PROPOSALS mark As Part Listener f Retarget Content Assist f Content Assist new Retarget Text Editor Action Java Editor Messages get Resource Bundle Content Assist Proposal NON NLS 1 f Content Assist set Action Definition Id I Java Editor Action Definition Ids CONTENT ASSIST PROPOSALS f Content Assist set Image Descriptor Java Plugin Images DESC ELCL CODE ASSIST f Content Assist set Disabled Image Descriptor Java Plugin Images DESC DLCL CODE ASSIST f Context Information new Retarget Text Editor Action Java Editor Messages get Resource Bundle Content Assist Context Information NON NLS 1 f Context Information set Action Definition Id I Java Editor Action Definition Ids CONTENT ASSIST CONTEXT INFORMATION f Correction Assist new Retarget Text Editor Action Java Editor Messages get Resource Bundle Correction Assist Proposal NON NLS 1 f Correction Assist set Action Definition Id I Java Editor Action Definition Ids CORRECTION ASSIST PROPOSALS character encoding f Encoding Action Group new Encoding Action Group  BasicEditorActionContributor fRetargetContentAssist RetargetAction JdtActionConstants CONTENT_ASSIST JavaEditorMessages getString ContentAssistProposal fRetargetContentAssist setActionDefinitionId IJavaEditorActionDefinitionIds CONTENT_ASSIST_PROPOSALS markAsPartListener fRetargetContentAssist fContentAssist RetargetTextEditorAction JavaEditorMessages getResourceBundle ContentAssistProposal fContentAssist setActionDefinitionId IJavaEditorActionDefinitionIds CONTENT_ASSIST_PROPOSALS fContentAssist setImageDescriptor JavaPluginImages DESC_ELCL_CODE_ASSIST fContentAssist setDisabledImageDescriptor JavaPluginImages DESC_DLCL_CODE_ASSIST fContextInformation RetargetTextEditorAction JavaEditorMessages getResourceBundle ContentAssistContextInformation fContextInformation setActionDefinitionId IJavaEditorActionDefinitionIds CONTENT_ASSIST_CONTEXT_INFORMATION fCorrectionAssist RetargetTextEditorAction JavaEditorMessages getResourceBundle CorrectionAssistProposal fCorrectionAssist setActionDefinitionId IJavaEditorActionDefinitionIds CORRECTION_ASSIST_PROPOSALS fEncodingActionGroup EncodingActionGroup
public void contribute To Menu I Menu Manager menu super contribute To Menu menu I Menu Manager edit Menu menu find Menu Using Path I Workbench Action Constants M EDIT if edit Menu null edit Menu append To Group I Context Menu Constants GROUP GENERATE f Retarget Content Assist edit Menu append To Group I Context Menu Constants GROUP GENERATE f Correction Assist edit Menu append To Group I Context Menu Constants GROUP GENERATE f Context Information  contributeToMenu IMenuManager contributeToMenu IMenuManager editMenu findMenuUsingPath IWorkbenchActionConstants M_EDIT editMenu editMenu appendToGroup IContextMenuConstants GROUP_GENERATE fRetargetContentAssist editMenu appendToGroup IContextMenuConstants GROUP_GENERATE fCorrectionAssist editMenu appendToGroup IContextMenuConstants GROUP_GENERATE fContextInformation
public void set Active Editor I Editor Part part super set Active Editor part I Text Editor text Editor null if part instanceof I Text Editor text Editor I Text Editor part f Content Assist set Action get Action text Editor Content Assist Proposal NON NLS 1 f Context Information set Action get Action text Editor Content Assist Context Information NON NLS 1 f Correction Assist set Action get Action text Editor Correction Assist Proposal NON NLS 1 I Action Bars action Bars get Action Bars action Bars set Global Action Handler Jdt Action Constants SHIFT RIGHT get Action text Editor Shift Right NON NLS 1 action Bars set Global Action Handler Jdt Action Constants SHIFT LEFT get Action text Editor Shift Left NON NLS 1 action Bars set Global Action Handler IDE Action Factory ADD TASK get Id get Action text Editor IDE Action Factory ADD TASK get Id NON NLS 1 action Bars set Global Action Handler IDE Action Factory BOOKMARK get Id get Action text Editor IDE Action Factory BOOKMARK get Id NON NLS 1 character encoding f Encoding Action Group retarget text Editor  setActiveEditor IEditorPart setActiveEditor ITextEditor textEditor ITextEditor textEditor ITextEditor fContentAssist setAction getAction textEditor ContentAssistProposal fContextInformation setAction getAction textEditor ContentAssistContextInformation fCorrectionAssist setAction getAction textEditor CorrectionAssistProposal IActionBars actionBars getActionBars actionBars setGlobalActionHandler JdtActionConstants SHIFT_RIGHT getAction textEditor ShiftRight actionBars setGlobalActionHandler JdtActionConstants SHIFT_LEFT getAction textEditor ShiftLeft actionBars setGlobalActionHandler IDEActionFactory ADD_TASK getId getAction textEditor IDEActionFactory ADD_TASK getId actionBars setGlobalActionHandler IDEActionFactory getId getAction textEditor IDEActionFactory getId fEncodingActionGroup textEditor
public void init I Action Bars bars I Workbench Page page super init bars page register actions that have a dynamic editor bars set Global Action Handler Jdt Action Constants CONTENT ASSIST f Content Assist character encoding f Encoding Action Group fill Action Bars bars  IActionBars IWorkbenchPage setGlobalActionHandler JdtActionConstants CONTENT_ASSIST fContentAssist fEncodingActionGroup fillActionBars

public Basic Java Editor Action Contributor super Resource Bundle b Java Editor Messages get Resource Bundle f Retarget Show Java Doc new Retarget Action Jdt Action Constants SHOW JAVA DOC Java Editor Messages get String Show Java Doc label NON NLS 1 f Retarget Show Java Doc set Action Definition Id I Java Editor Action Definition Ids SHOW JAVADOC mark As Part Listener f Retarget Show Java Doc actions that are contributed to editors they are considered belonging to the active editor f Toggle Presentation new Toggle Presentation Action f Toggle Mark Occurrences Action new Toggle Mark Occurrences Action f Previous Annotation new Goto Annotation Action Previous Annotation false NON NLS 1 f Next Annotation new Goto Annotation Action Next Annotation true NON NLS 1 f Goto Matching Bracket new Retarget Text Editor Action b Goto Matching Bracket NON NLS 1 f Goto Matching Bracket set Action Definition Id I Java Editor Action Definition Ids GOTO MATCHING BRACKET f Show Java Doc new Retarget Text Editor Action b Show Java Doc NON NLS 1 f Show Java Doc set Action Definition Id I Java Editor Action Definition Ids SHOW JAVADOC f Show Outline new Retarget Text Editor Action Java Editor Messages get Resource Bundle Show Outline NON NLS 1 f Show Outline set Action Definition Id I Java Editor Action Definition Ids SHOW OUTLINE f Open Hierarchy new Retarget Text Editor Action Java Editor Messages get Resource Bundle Open Hierarchy NON NLS 1 f Open Hierarchy set Action Definition Id I Java Editor Action Definition Ids OPEN HIERARCHY f Open Structure new Retarget Text Editor Action Java Editor Messages get Resource Bundle Open Structure NON NLS 1 f Open Structure set Action Definition Id I Java Editor Action Definition Ids OPEN STRUCTURE f Structure Select Enclosing Action new Retarget Text Editor Action b Structure Select Enclosing NON NLS 1 f Structure Select Enclosing Action set Action Definition Id I Java Editor Action Definition Ids SELECT ENCLOSING f Structure Select Next Action new Retarget Text Editor Action b Structure Select Next NON NLS 1 f Structure Select Next Action set Action Definition Id I Java Editor Action Definition Ids SELECT NEXT f Structure Select Previous Action new Retarget Text Editor Action b Structure Select Previous NON NLS 1 f Structure Select Previous Action set Action Definition Id I Java Editor Action Definition Ids SELECT PREVIOUS f Structure Select History Action new Retarget Text Editor Action b Structure Select History NON NLS 1 f Structure Select History Action set Action Definition Id I Java Editor Action Definition Ids SELECT LAST f Goto Next Member Action new Retarget Text Editor Action b Goto Next Member NON NLS 1 f Goto Next Member Action set Action Definition Id I Java Editor Action Definition Ids GOTO NEXT MEMBER f Goto Previous Member Action new Retarget Text Editor Action b Goto Previous Member NON NLS 1 f Goto Previous Member Action set Action Definition Id I Java Editor Action Definition Ids GOTO PREVIOUS MEMBER f Remove Occurrence Annotations Action new Retarget Text Editor Action b Remove Occurrence Annotations NON NLS 1 f Remove Occurrence Annotations Action set Action Definition Id I Java Editor Action Definition Ids REMOVE OCCURRENCE ANNOTATIONS  BasicJavaEditorActionContributor ResourceBundle JavaEditorMessages getResourceBundle fRetargetShowJavaDoc RetargetAction JdtActionConstants SHOW_JAVA_DOC JavaEditorMessages getString ShowJavaDoc fRetargetShowJavaDoc setActionDefinitionId IJavaEditorActionDefinitionIds SHOW_JAVADOC markAsPartListener fRetargetShowJavaDoc fTogglePresentation TogglePresentationAction fToggleMarkOccurrencesAction ToggleMarkOccurrencesAction fPreviousAnnotation GotoAnnotationAction PreviousAnnotation fNextAnnotation GotoAnnotationAction NextAnnotation fGotoMatchingBracket RetargetTextEditorAction GotoMatchingBracket fGotoMatchingBracket setActionDefinitionId IJavaEditorActionDefinitionIds GOTO_MATCHING_BRACKET fShowJavaDoc RetargetTextEditorAction ShowJavaDoc fShowJavaDoc setActionDefinitionId IJavaEditorActionDefinitionIds SHOW_JAVADOC fShowOutline RetargetTextEditorAction JavaEditorMessages getResourceBundle ShowOutline fShowOutline setActionDefinitionId IJavaEditorActionDefinitionIds SHOW_OUTLINE fOpenHierarchy RetargetTextEditorAction JavaEditorMessages getResourceBundle OpenHierarchy fOpenHierarchy setActionDefinitionId IJavaEditorActionDefinitionIds OPEN_HIERARCHY fOpenStructure RetargetTextEditorAction JavaEditorMessages getResourceBundle OpenStructure fOpenStructure setActionDefinitionId IJavaEditorActionDefinitionIds OPEN_STRUCTURE fStructureSelectEnclosingAction RetargetTextEditorAction StructureSelectEnclosing fStructureSelectEnclosingAction setActionDefinitionId IJavaEditorActionDefinitionIds SELECT_ENCLOSING fStructureSelectNextAction RetargetTextEditorAction StructureSelectNext fStructureSelectNextAction setActionDefinitionId IJavaEditorActionDefinitionIds SELECT_NEXT fStructureSelectPreviousAction RetargetTextEditorAction StructureSelectPrevious fStructureSelectPreviousAction setActionDefinitionId IJavaEditorActionDefinitionIds SELECT_PREVIOUS fStructureSelectHistoryAction RetargetTextEditorAction StructureSelectHistory fStructureSelectHistoryAction setActionDefinitionId IJavaEditorActionDefinitionIds SELECT_LAST fGotoNextMemberAction RetargetTextEditorAction GotoNextMember fGotoNextMemberAction setActionDefinitionId IJavaEditorActionDefinitionIds GOTO_NEXT_MEMBER fGotoPreviousMemberAction RetargetTextEditorAction GotoPreviousMember fGotoPreviousMemberAction setActionDefinitionId IJavaEditorActionDefinitionIds GOTO_PREVIOUS_MEMBER fRemoveOccurrenceAnnotationsAction RetargetTextEditorAction RemoveOccurrenceAnnotations fRemoveOccurrenceAnnotationsAction setActionDefinitionId IJavaEditorActionDefinitionIds REMOVE_OCCURRENCE_ANNOTATIONS
protected final void mark As Part Listener Retarget Action action f Part Listeners add action  markAsPartListener RetargetAction fPartListeners
public void init I Action Bars bars I Workbench Page page Iterator e f Part Listeners iterator while e has Next page add Part Listener Retarget Action e next super init bars page register actions that have a dynamic editor bars set Global Action Handler I Text Editor Action Definition Ids GOTO NEXT ANNOTATION f Next Annotation bars set Global Action Handler I Text Editor Action Definition Ids GOTO PREVIOUS ANNOTATION f Previous Annotation bars set Global Action Handler I Text Editor Action Constants NEXT f Next Annotation bars set Global Action Handler I Text Editor Action Constants PREVIOUS f Previous Annotation bars set Global Action Handler I Text Editor Action Definition Ids TOGGLE SHOW SELECTED ELEMENT ONLY f Toggle Presentation bars set Global Action Handler I Java Editor Action Definition Ids TOGGLE MARK OCCURRENCES f Toggle Mark Occurrences Action bars set Global Action Handler Jdt Action Constants SHOW JAVA DOC f Show Java Doc  IActionBars IWorkbenchPage fPartListeners hasNext addPartListener RetargetAction setGlobalActionHandler ITextEditorActionDefinitionIds GOTO_NEXT_ANNOTATION fNextAnnotation setGlobalActionHandler ITextEditorActionDefinitionIds GOTO_PREVIOUS_ANNOTATION fPreviousAnnotation setGlobalActionHandler ITextEditorActionConstants fNextAnnotation setGlobalActionHandler ITextEditorActionConstants fPreviousAnnotation setGlobalActionHandler ITextEditorActionDefinitionIds TOGGLE_SHOW_SELECTED_ELEMENT_ONLY fTogglePresentation setGlobalActionHandler IJavaEditorActionDefinitionIds TOGGLE_MARK_OCCURRENCES fToggleMarkOccurrencesAction setGlobalActionHandler JdtActionConstants SHOW_JAVA_DOC fShowJavaDoc
public void contribute To Menu I Menu Manager menu super contribute To Menu menu I Menu Manager edit Menu menu find Menu Using Path I Workbench Action Constants M EDIT if edit Menu null edit Menu add new Separator I Context Menu Constants GROUP OPEN edit Menu add new Separator I Context Menu Constants GROUP GENERATE edit Menu add new Separator I Context Menu Constants GROUP ADDITIONS Menu Manager structure Selection new Menu Manager Java Editor Messages get String Expand Selection Menu label expand Selection NON NLS 1 NON NLS 2 structure Selection add f Structure Select Enclosing Action structure Selection add f Structure Select Next Action structure Selection add f Structure Select Previous Action structure Selection add f Structure Select History Action edit Menu append To Group I Context Menu Constants GROUP OPEN structure Selection edit Menu append To Group I Context Menu Constants GROUP GENERATE f Retarget Show Java Doc I Menu Manager navigate Menu menu find Menu Using Path I Workbench Action Constants M NAVIGATE if navigate Menu null navigate Menu append To Group I Workbench Action Constants SHOW EXT f Show Outline navigate Menu append To Group I Workbench Action Constants SHOW EXT f Open Hierarchy I Menu Manager goto Menu menu find Menu Using Path navigate go To NON NLS 1 if goto Menu null goto Menu add new Separator additions2 NON NLS 1 goto Menu append To Group additions2 f Goto Previous Member Action NON NLS 1 goto Menu append To Group additions2 f Goto Next Member Action NON NLS 1 goto Menu append To Group additions2 f Goto Matching Bracket NON NLS 1  contributeToMenu IMenuManager contributeToMenu IMenuManager editMenu findMenuUsingPath IWorkbenchActionConstants M_EDIT editMenu editMenu IContextMenuConstants GROUP_OPEN editMenu IContextMenuConstants GROUP_GENERATE editMenu IContextMenuConstants GROUP_ADDITIONS MenuManager structureSelection MenuManager JavaEditorMessages getString ExpandSelectionMenu expandSelection structureSelection fStructureSelectEnclosingAction structureSelection fStructureSelectNextAction structureSelection fStructureSelectPreviousAction structureSelection fStructureSelectHistoryAction editMenu appendToGroup IContextMenuConstants GROUP_OPEN structureSelection editMenu appendToGroup IContextMenuConstants GROUP_GENERATE fRetargetShowJavaDoc IMenuManager navigateMenu findMenuUsingPath IWorkbenchActionConstants M_NAVIGATE navigateMenu navigateMenu appendToGroup IWorkbenchActionConstants SHOW_EXT fShowOutline navigateMenu appendToGroup IWorkbenchActionConstants SHOW_EXT fOpenHierarchy IMenuManager gotoMenu findMenuUsingPath goTo gotoMenu gotoMenu gotoMenu appendToGroup fGotoPreviousMemberAction gotoMenu appendToGroup fGotoNextMemberAction gotoMenu appendToGroup fGotoMatchingBracket
public void set Active Editor I Editor Part part super set Active Editor part I Action Bars action Bars get Action Bars I Status Line Manager manager action Bars get Status Line Manager manager set Message null manager set Error Message null I Text Editor text Editor null if part instanceof I Text Editor text Editor I Text Editor part f Toggle Presentation set Editor text Editor f Toggle Mark Occurrences Action set Editor text Editor f Previous Annotation set Editor text Editor f Next Annotation set Editor text Editor f Goto Matching Bracket set Action get Action text Editor Goto Matching Bracket Action GOTO MATCHING BRACKET f Show Java Doc set Action get Action text Editor Show Java Doc NON NLS 1 f Show Outline set Action get Action text Editor I Java Editor Action Definition Ids SHOW OUTLINE f Open Hierarchy set Action get Action text Editor I Java Editor Action Definition Ids OPEN HIERARCHY f Open Structure set Action get Action text Editor I Java Editor Action Definition Ids OPEN STRUCTURE f Structure Select Enclosing Action set Action get Action text Editor Structure Selection Action ENCLOSING f Structure Select Next Action set Action get Action text Editor Structure Selection Action NEXT f Structure Select Previous Action set Action get Action text Editor Structure Selection Action PREVIOUS f Structure Select History Action set Action get Action text Editor Structure Selection Action HISTORY f Goto Next Member Action set Action get Action text Editor Go To Next Previous Member Action NEXT MEMBER f Goto Previous Member Action set Action get Action text Editor Go To Next Previous Member Action PREVIOUS MEMBER f Remove Occurrence Annotations Action set Action get Action text Editor Remove Occurrence Annotations NON NLS 1 if part instanceof Java Editor Java Editor java Editor Java Editor part java Editor get Action Group fill Action Bars get Action Bars Folding Action Group folding Actions java Editor get Folding Action Group if folding Actions null folding Actions update Action Bars  setActiveEditor IEditorPart setActiveEditor IActionBars actionBars getActionBars IStatusLineManager actionBars getStatusLineManager setMessage setErrorMessage ITextEditor textEditor ITextEditor textEditor ITextEditor fTogglePresentation setEditor textEditor fToggleMarkOccurrencesAction setEditor textEditor fPreviousAnnotation setEditor textEditor fNextAnnotation setEditor textEditor fGotoMatchingBracket setAction getAction textEditor GotoMatchingBracketAction GOTO_MATCHING_BRACKET fShowJavaDoc setAction getAction textEditor ShowJavaDoc fShowOutline setAction getAction textEditor IJavaEditorActionDefinitionIds SHOW_OUTLINE fOpenHierarchy setAction getAction textEditor IJavaEditorActionDefinitionIds OPEN_HIERARCHY fOpenStructure setAction getAction textEditor IJavaEditorActionDefinitionIds OPEN_STRUCTURE fStructureSelectEnclosingAction setAction getAction textEditor StructureSelectionAction fStructureSelectNextAction setAction getAction textEditor StructureSelectionAction fStructureSelectPreviousAction setAction getAction textEditor StructureSelectionAction fStructureSelectHistoryAction setAction getAction textEditor StructureSelectionAction fGotoNextMemberAction setAction getAction textEditor GoToNextPreviousMemberAction NEXT_MEMBER fGotoPreviousMemberAction setAction getAction textEditor GoToNextPreviousMemberAction PREVIOUS_MEMBER fRemoveOccurrenceAnnotationsAction setAction getAction textEditor RemoveOccurrenceAnnotations JavaEditor JavaEditor javaEditor JavaEditor javaEditor getActionGroup fillActionBars getActionBars FoldingActionGroup foldingActions javaEditor getFoldingActionGroup foldingActions foldingActions updateActionBars
public void dispose Iterator e f Part Listeners iterator while e has Next get Page remove Part Listener Retarget Action e next f Part Listeners clear set Active Editor null super dispose  fPartListeners hasNext getPage removePartListener RetargetAction fPartListeners setActiveEditor

public static boolean is Editor Input Object element I Editor Part editor if editor null try return editor get Editor Input equals get Editor Input element catch Java Model Exception x Java Plugin log x get Status return false  isEditorInput IEditorPart getEditorInput getEditorInput JavaModelException JavaPlugin getStatus
Tests if a cu is currently shown in an editor return the I Editor Part if shown null if element is not open in an editor public static I Editor Part is Open In Editor Object input Element I Editor Input input null try input get Editor Input input Element catch Java Model Exception x Java Plugin log x get Status if input null I Workbench Page p Java Plugin get Active Page if p null return p find Editor input return null  IEditorPart IEditorPart isOpenInEditor inputElement IEditorInput getEditorInput inputElement JavaModelException JavaPlugin getStatus IWorkbenchPage JavaPlugin getActivePage findEditor
Opens a Java editor for an element such as code I Java Element code code I File code or code I Storage code The editor is activated by default return the I Editor Part or null if wrong element type or opening failed public static I Editor Part open In Editor Object input Element throws Java Model Exception Part Init Exception return open In Editor input Element true  IJavaElement IFile IStorage IEditorPart IEditorPart openInEditor inputElement JavaModelException PartInitException openInEditor inputElement
Opens a Java editor for an element I Java Element I File I Storage return the I Editor Part or null if wrong element type or opening failed public static I Editor Part open In Editor Object input Element boolean activate throws Java Model Exception Part Init Exception if input Element instanceof I File return open In Editor I File input Element activate I Editor Input input get Editor Input input Element if input instanceof I File Editor Input I File Editor Input file Input I File Editor Input input return open In Editor file Input get File activate if input null return open In Editor input get EditorID input input Element activate return null  IJavaElement IFile IStorage IEditorPart IEditorPart openInEditor inputElement JavaModelException PartInitException inputElement IFile openInEditor IFile inputElement IEditorInput getEditorInput inputElement IFileEditorInput IFileEditorInput fileInput IFileEditorInput openInEditor fileInput getFile openInEditor getEditorID inputElement
Selects a Java Element in an editor public static void reveal In Editor I Editor Part part I Java Element element if element null part instanceof Java Editor Java Editor part set Selection element  revealInEditor IEditorPart IJavaElement JavaEditor JavaEditor setSelection
private static I Editor Part open In Editor I File file boolean activate throws Part Init Exception if file null I Workbench Page p Java Plugin get Active Page if p null I Editor Part editor Part IDE open Editor p file activate initialize Highlight Range editor Part return editor Part return null  IEditorPart openInEditor IFile PartInitException IWorkbenchPage JavaPlugin getActivePage IEditorPart editorPart openEditor initializeHighlightRange editorPart editorPart
private static I Editor Part open In Editor I Editor Input input String editorID boolean activate throws Part Init Exception if input null I Workbench Page p Java Plugin get Active Page if p null I Editor Part editor Part p open Editor input editorID activate initialize Highlight Range editor Part return editor Part return null  IEditorPart openInEditor IEditorInput PartInitException IWorkbenchPage JavaPlugin getActivePage IEditorPart editorPart openEditor initializeHighlightRange editorPart editorPart
private static void initialize Highlight Range I Editor Part editor Part if editor Part instanceof I Text Editor I Action toggle Action editor Part get Editor Site get Action Bars get Global Action Handler I Text Editor Action Definition Ids TOGGLE SHOW SELECTED ELEMENT ONLY if toggle Action null toggle Action is Enabled toggle Action is Checked if toggle Action instanceof Text Editor Action Reset the action Text Editor Action toggle Action set Editor null Restore the action Text Editor Action toggle Action set Editor I Text Editor editor Part else Uncheck toggle Action run Check toggle Action run  initializeHighlightRange IEditorPart editorPart editorPart ITextEditor IAction toggleAction editorPart getEditorSite getActionBars getGlobalActionHandler ITextEditorActionDefinitionIds TOGGLE_SHOW_SELECTED_ELEMENT_ONLY toggleAction toggleAction isEnabled toggleAction isChecked toggleAction TextEditorAction TextEditorAction toggleAction setEditor TextEditorAction toggleAction setEditor ITextEditor editorPart toggleAction toggleAction
deprecated Made it public again for java debugger UI public static String get EditorID I Editor Input input Object input Object I Editor Registry registry PlatformUI get Workbench get Editor Registry String input Name input get Name XXX This is code copied from IDE open Editor Filed bug 50285 requesting API for getting the descriptor check for a default editor I Editor Descriptor editor Descriptor registry get Default Editor input Name next check the OS for in place editor OLE on Win32 if editor Descriptor null registry is System In Place Editor Available input Name editor Descriptor registry find Editor I Editor Registry SYSTEM INPLACE EDITOR ID next check with the OS for an external editor if editor Descriptor null registry is System External Editor Available input Name editor Descriptor registry find Editor I Editor Registry SYSTEM EXTERNAL EDITOR ID next lookup the default text editor if editor Descriptor null editor Descriptor registry find Editor org eclipse ui Default Text Editor NON NLS 1 if no valid editor found bail out if editor Descriptor null return null return editor Descriptor get Id  deprecatedMade getEditorID IEditorInput inputObject IEditorRegistry getWorkbench getEditorRegistry inputName getName openEditor IEditorDescriptor editorDescriptor getDefaultEditor inputName editorDescriptor isSystemInPlaceEditorAvailable inputName editorDescriptor findEditor IEditorRegistry SYSTEM_INPLACE_EDITOR_ID editorDescriptor isSystemExternalEditorAvailable inputName editorDescriptor findEditor IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID editorDescriptor editorDescriptor findEditor DefaultTextEditor editorDescriptor editorDescriptor getId
private static I Editor Input get Editor Input I Java Element element throws Java Model Exception while element null if element instanceof I Compilation Unit I Compilation Unit unit Java Model Util to Original I Compilation Unit element I Resource resource unit get Resource if resource instanceof I File return new File Editor Input I File resource if element instanceof I Class File return new Internal Class File Editor Input I Class File element element element get Parent return null  IEditorInput getEditorInput IJavaElement JavaModelException ICompilationUnit ICompilationUnit JavaModelUtil toOriginal ICompilationUnit IResource getResource IFile FileEditorInput IFile IClassFile InternalClassFileEditorInput IClassFile getParent
public static I Editor Input get Editor Input Object input throws Java Model Exception if input instanceof I Java Element return get Editor Input I Java Element input if input instanceof I File return new File Editor Input I File input if input instanceof I Storage return new Jar Entry Editor Input I Storage input return null  IEditorInput getEditorInput JavaModelException IJavaElement getEditorInput IJavaElement IFile FileEditorInput IFile IStorage JarEntryEditorInput IStorage
If the current active editor edits a java element return it else return null public static I Java Element get Active Editor Java Input I Workbench Page page Java Plugin get Active Page if page null I Editor Part part page get Active Editor if part null I Editor Input editor Input part get Editor Input if editor Input null return I Java Element editor Input get Adapter I Java Element class return null  IJavaElement getActiveEditorJavaInput IWorkbenchPage JavaPlugin getActivePage IEditorPart getActiveEditor IEditorInput editorInput getEditorInput editorInput IJavaElement editorInput getAdapter IJavaElement
Maps the localized modifier name to a code in the same manner as find Modifier return the SWT modifier bit or code 0 code if no match was found since 2 1 1 public static int find Localized Modifier String token if token null return 0 if token equals Ignore Case Action find Modifier String SWT CTRL return SWT CTRL if token equals Ignore Case Action find Modifier String SWT SHIFT return SWT SHIFT if token equals Ignore Case Action find Modifier String SWT ALT return SWT ALT if token equals Ignore Case Action find Modifier String SWT COMMAND return SWT COMMAND return 0  findModifier findLocalizedModifier equalsIgnoreCase findModifierString equalsIgnoreCase findModifierString equalsIgnoreCase findModifierString equalsIgnoreCase findModifierString
Returns the modifier string for the given SWT modifier modifier bits param state Maskthe SWT modifier bits return the modifier string since 2 1 1 public static String get Modifier String int state Mask String modifier String NON NLS 1 if state Mask SWT CTRL SWT CTRL modifier String append Modifier String modifier String SWT CTRL if state Mask SWT ALT SWT ALT modifier String append Modifier String modifier String SWT ALT if state Mask SWT SHIFT SWT SHIFT modifier String append Modifier String modifier String SWT SHIFT if state Mask SWT COMMAND SWT COMMAND modifier String append Modifier String modifier String SWT COMMAND return modifier String  stateMaskthe getModifierString stateMask modifierString stateMask modifierString appendModifierString modifierString stateMask modifierString appendModifierString modifierString stateMask modifierString appendModifierString modifierString stateMask modifierString appendModifierString modifierString modifierString
Appends to modifier string of the given SWT modifier bit to the given modifier String param modifier Stringthe modifier string param modifieran int with SWT modifier bit return the concatenated modifier string since 2 1 1 private static String append Modifier String String modifier String int modifier if modifier String null modifier String NON NLS 1 String new Modifier String Action find Modifier String modifier if modifier String length 0 return new Modifier String return Java Editor Messages get Formatted String Editor Utility concat Modifier Strings new String modifier String new Modifier String NON NLS 1  modifierString modifierStringthe appendModifierString modifierString modifierString modifierString newModifierString findModifierString modifierString newModifierString JavaEditorMessages getFormattedString EditorUtility concatModifierStrings modifierString newModifierString
Returns the Java project for a given editor input or code null code if no corresponding Java project exists param input the editor input return the corresponding Java project since 3 0 public static I Java Project get Java Project I Editor Input input I Java Project j Project null if input instanceof I File Editor Input I Project project I File Editor Input input get File get Project if project null j Project Java Core create project if j Project exists j Project null else if input instanceof I Class File Editor Input j Project I Class File Editor Input input get Class File get Java Project return j Project  IJavaProject getJavaProject IEditorInput IJavaProject jProject IFileEditorInput IProject IFileEditorInput getFile getProject jProject JavaCore jProject jProject IClassFileEditorInput jProject IClassFileEditorInput getClassFile getJavaProject jProject

Returns the image managed under the given key in this registry param key the image s key return the image managed under the given key public static Image get String key return get Image Registry get key  getImageRegistry
Sets the three image descriptors for enabled disabled and hovered to an action The actions are retrieved from the tool16 folders param actionthe action param icon Namethe icon name public static void set Tool Image Descriptors I Action action String icon Name set Image Descriptors action tool16 icon Name NON NLS 1  iconNamethe setToolImageDescriptors IAction iconName setImageDescriptors iconName
Sets the three image descriptors for enabled disabled and hovered to an action The actions are retrieved from the lcl16 folders param actionthe action param icon Namethe icon name public static void set Local Image Descriptors I Action action String icon Name set Image Descriptors action lcl16 icon Name NON NLS 1  iconNamethe setLocalImageDescriptors IAction iconName setImageDescriptors iconName
package static Image Registry get Image Registry if fg Image Registry null fg Image Registry new Image Registry for Iterator iter fg AvoidSWT Error Map key Set iterator iter has Next String key String iter next fg Image Registry put key Image Descriptor fg AvoidSWT Error Map get key fg AvoidSWT Error Map null return fg Image Registry  ImageRegistry getImageRegistry fgImageRegistry fgImageRegistry ImageRegistry fgAvoidSWTErrorMap keySet hasNext fgImageRegistry ImageDescriptor fgAvoidSWTErrorMap fgAvoidSWTErrorMap fgImageRegistry
private static void set Image Descriptors I Action action String type String rel Path try Image Descriptor id Image Descriptor create FromURL make Icon FileURL d type rel Path NON NLS 1 if id null action set Disabled Image Descriptor id catch MalformedURL Exception e try Image Descriptor id Image Descriptor create FromURL make Icon FileURL c type rel Path NON NLS 1 if id null action set Hover Image Descriptor id catch MalformedURL Exception e Image Descriptor descriptor create e type rel Path NON NLS 1 action set Hover Image Descriptor descriptor action set Image Descriptor descriptor  setImageDescriptors IAction relPath ImageDescriptor ImageDescriptor createFromURL makeIconFileURL relPath setDisabledImageDescriptor MalformedURLException ImageDescriptor ImageDescriptor createFromURL makeIconFileURL relPath setHoverImageDescriptor MalformedURLException ImageDescriptor relPath setHoverImageDescriptor setImageDescriptor
private static Image Descriptor create Managed String prefix String name try Image Descriptor result Image Descriptor create FromURL make Icon FileURL prefix name substring NAME PREFIX LENGTH if fg AvoidSWT Error Map null fg AvoidSWT Error Map new Hash Map fg AvoidSWT Error Map put name result if fg Image Registry null Java Plugin log Error Message Image registry already defined NON NLS 1 return result catch MalformedURL Exception e return Image Descriptor get Missing Image Descriptor  ImageDescriptor createManaged ImageDescriptor ImageDescriptor createFromURL makeIconFileURL NAME_PREFIX_LENGTH fgAvoidSWTErrorMap fgAvoidSWTErrorMap HashMap fgAvoidSWTErrorMap fgImageRegistry JavaPlugin logErrorMessage MalformedURLException ImageDescriptor getMissingImageDescriptor
private static Image Descriptor create Managed String prefix String name String key try Image Descriptor result Image Descriptor create FromURL make Icon FileURL prefix name substring NAME PREFIX LENGTH if fg AvoidSWT Error Map null fg AvoidSWT Error Map new Hash Map fg AvoidSWT Error Map put key result if fg Image Registry null Java Plugin log Error Message Image registry already defined NON NLS 1 return result catch MalformedURL Exception e return Image Descriptor get Missing Image Descriptor  ImageDescriptor createManaged ImageDescriptor ImageDescriptor createFromURL makeIconFileURL NAME_PREFIX_LENGTH fgAvoidSWTErrorMap fgAvoidSWTErrorMap HashMap fgAvoidSWTErrorMap fgImageRegistry JavaPlugin logErrorMessage MalformedURLException ImageDescriptor getMissingImageDescriptor
private static Image Descriptor create String prefix String name try return Image Descriptor create FromURL make Icon FileURL prefix name catch MalformedURL Exception e return Image Descriptor get Missing Image Descriptor  ImageDescriptor ImageDescriptor createFromURL makeIconFileURL MalformedURLException ImageDescriptor getMissingImageDescriptor
private static URL make Icon FileURL String prefix String name throws MalformedURL Exception if fg Icon BaseURL null throw new MalformedURL Exception String Buffer buffer new String Buffer prefix buffer append buffer append name return new URL fg Icon BaseURL buffer to String  makeIconFileURL MalformedURLException fgIconBaseURL MalformedURLException StringBuffer StringBuffer fgIconBaseURL toString

public void create Bundle Bundle Description bd I Progress Monitor pm throws IO Exception f Bundle Description bd File tmp dir new File bd get DESTINATIONDIRECTORY String app dir name bd get APPNAME app NON NLS 1 File app dir new File tmp dir app dir name if app dir exists delete Dir app dir app dir create Dir tmp dir app dir name false NON NLS 1 File contents dir create Dir app dir Contents false NON NLS 1 create Pkg Info contents dir File macos dir create Dir contents dir MacOS false NON NLS 1 String launcher path bd get LAUNCHER if launcher path null throw new IO Exception String launcher copy File macos dir launcher path null File resources dir create Dir contents dir Resources false NON NLS 1 File java dir create Dir resources dir Java false NON NLS 1 create InfoP List contents dir resources dir java dir launcher Iterator iter f Processes iterator while iter has Next Process p Process iter next try p wait For catch Interrupted Exception e silently ignore  createBundle BundleDescription IProgressMonitor IOException fBundleDescription tmp_dir app_dir_name app_dir tmp_dir app_dir_name app_dir deleteDir app_dir app_dir createDir tmp_dir app_dir_name contents_dir createDir app_dir createPkgInfo contents_dir macos_dir createDir contents_dir launcher_path launcher_path IOException copyFile macos_dir launcher_path resources_dir createDir contents_dir java_dir createDir resources_dir createInfoPList contents_dir resources_dir java_dir fProcesses hasNext waitFor InterruptedException
private void create InfoP List File contents dir File resources dir File java dir String launcher throws IO Exception File info new File contents dir Info plist NON NLS 1 File Output Stream fos new File Output Stream info Buffered Output Stream f Output Stream new Buffered Output Stream fos Document Builder doc Builder null Document Builder Factory factory Document Builder Factory new Instance factory set Validating false try doc Builder factory new Document Builder catch Parser Configuration Exception ex System err println create InfoP List could not get XML builder NON NLS 1 Document doc doc Builder new Document Element plist doc create Element plist NON NLS 1 doc append Child plist plist set Attribute version 1 0 NON NLS 1 NON NLS 2 Element dict doc create Element dict NON NLS 1 plist append Child dict pair dict CF Bundle Executable null launcher NON NLS 1 pair dict CF Bundle Get Info String GETINFO null NON NLS 1 pair dict CF Bundle Info Dictionary Version null 6 0 NON NLS 1 NON NLS 2 String icon Name null String app Name f Bundle Description get APPNAME null if app Name null icon Name app Name icns NON NLS 1 String fname copy File resources dir f Bundle Description get ICONFILE null icon Name if fname null pair dict CF Bundle Icon File null fname NON NLS 1 pair dict CF Bundle Identifier IDENTIFIER null NON NLS 1 pair dict CF Bundle Name APPNAME null NON NLS 1 pair dict CF Bundle Package Type null APPL NON NLS 1 NON NLS 2 pair dict CF Bundle Short Version String VERSION null NON NLS 1 pair dict CF Bundle Signature SIGNATURE NON NLS 1 NON NLS 2 pair dict CF Bundle Version null 1 0 1 NON NLS 1 NON NLS 2 Element jdict doc create Element dict NON NLS 1 add dict Java jdict NON NLS 1 pair jdict JVM Version JVMVERSION null NON NLS 1 pair jdict Main Class MAINCLASS null NON NLS 1 pair jdict Working Directory WORKINGDIR null NON NLS 1 String arguments f Bundle Description get ARGUMENTS null if arguments null Element arg Array doc create Element array NON NLS 1 add jdict Arguments arg Array NON NLS 1 String Tokenizer st new String Tokenizer arguments while st has More Tokens String arg st next Token Element type doc create Element string NON NLS 1 arg Array append Child type type append Child doc create Text Node arg pair jdict VM Options VMOPTIONS null NON NLS 1 int id new int 0 Resource Info ris f Bundle Description get Resources true if ris length 0 String Buffer cp new String Buffer for int i 0 i ris length i Resource Info ri ris i String e process Classpath Entry java dir ri f Path id if cp length 0 cp append cp append e add jdict Class Path cp to String NON NLS 1 ris f Bundle Description get Resources false if ris length 0 for int i 0 i ris length i Resource Info ri ris i process Classpath Entry java dir ri f Path id try Write the document to the stream Transformer transformer Transformer Factory new Instance new Transformer transformer set Output Property Output Keys DOCTYPE PUBLIC Apple Computer DTD PLIST 1 0 EN NON NLS 1 transformer set Output Property Output Keys DOCTYPE SYSTEM http www apple com DT Ds Property List 1 0 dtd NON NLS 1 transformer set Output Property Output Keys METHOD xml NON NLS 1 transformer set Output Property Output Keys ENCODING UTF 8 NON NLS 1 transformer set Output Property Output Keys INDENT yes NON NLS 1 transformer set Output Property http xml apache org xslt indent amount 4 NON NLS 1 NON NLS 2 DOM Source source new DOM Source doc Stream Result result new Stream Result f Output Stream transformer transform source result catch Transformer Exception e System err println create InfoP List could not transform to XML NON NLS 1  createInfoPList contents_dir resources_dir java_dir IOException contents_dir FileOutputStream FileOutputStream BufferedOutputStream fOutputStream BufferedOutputStream DocumentBuilder docBuilder DocumentBuilderFactory DocumentBuilderFactory newInstance setValidating docBuilder newDocumentBuilder ParserConfigurationException createInfoPList docBuilder newDocument createElement appendChild setAttribute createElement appendChild CFBundleExecutable CFBundleGetInfoString CFBundleInfoDictionaryVersion iconName appName fBundleDescription appName iconName appName copyFile resources_dir fBundleDescription iconName CFBundleIconFile CFBundleIdentifier CFBundleName CFBundlePackageType CFBundleShortVersionString CFBundleSignature CFBundleVersion createElement JVMVersion MainClass WorkingDirectory fBundleDescription argArray createElement argArray StringTokenizer StringTokenizer hasMoreTokens nextToken createElement argArray appendChild appendChild createTextNode VMOptions ResourceInfo fBundleDescription getResources StringBuffer StringBuffer ResourceInfo processClasspathEntry java_dir fPath ClassPath toString fBundleDescription getResources ResourceInfo processClasspathEntry java_dir fPath TransformerFactory newInstance newTransformer setOutputProperty OutputKeys DOCTYPE_PUBLIC setOutputProperty OutputKeys DOCTYPE_SYSTEM DTDs PropertyList setOutputProperty OutputKeys setOutputProperty OutputKeys setOutputProperty OutputKeys setOutputProperty DOMSource DOMSource StreamResult StreamResult fOutputStream TransformerException createInfoPList
private void add Element dict String key Element value Document document dict get Owner Document Element k document create Element key NON NLS 1 dict append Child k k append Child document create Text Node key dict append Child value  getOwnerDocument createElement appendChild appendChild createTextNode appendChild
private void create Element parent String s Document document parent get Owner Document Element type document create Element string NON NLS 1 parent append Child type type append Child document create Text Node s  getOwnerDocument createElement appendChild appendChild createTextNode
private void add Element dict String key String value Document document dict get Owner Document Element k document create Element key NON NLS 1 dict append Child k k append Child document create Text Node key create dict value  getOwnerDocument createElement appendChild appendChild createTextNode
private void pair Element dict String outkey String inkey String dflt String value null if inkey null value f Bundle Description get inkey dflt else value dflt if value null value trim length 0 add dict outkey value  fBundleDescription
private String process Classpath Entry File java dir String name int id ref throws IO Exception File f new File name if f is Directory int id id ref 0 String archivename jar  id jar NON NLS 1 NON NLS 2 File to new File java dir archivename zip name to get Absolute Path name archivename else name copy File java dir name null return JAVAROOT name NON NLS 1  processClasspathEntry java_dir id_ref IOException isDirectory id_ref jar_ java_dir getAbsolutePath copyFile java_dir
private void create Pkg Info File contents dir throws IO Exception File pkg Info new File contents dir Pkg Info NON NLS 1 File Output Stream os new File Output Stream pkg Info os write APPL f Bundle Description get SIGNATURE get Bytes NON NLS 1 NON NLS 2 os close  createPkgInfo contents_dir IOException pkgInfo contents_dir PkgInfo FileOutputStream FileOutputStream pkgInfo fBundleDescription getBytes
private static void delete Dir File dir File files dir list Files if files null for int i 0 i files length i delete Dir files i dir delete  deleteDir listFiles deleteDir
private File create Dir File parent dir String dir name boolean remove throws IO Exception File dir new File parent dir dir name if dir exists if remove return dir delete Dir dir if dir mkdir throw new IO Exception cannot create dir dir name NON NLS 1 return dir  createDir parent_dir dir_name IOException parent_dir dir_name deleteDir IOException dir_name
private String copy File File todir String from Path String toname throws IO Exception if toname null int pos from Path last Index Of if pos 0 toname from Path substring pos 1 else toname from Path File to new File todir toname f Processes add Runtime get Runtime exec new String bin cp from Path to get Absolute Path NON NLS 1 return toname  copyFile fromPath IOException fromPath lastIndexOf fromPath fromPath fProcesses getRuntime fromPath getAbsolutePath
private void zip String dir String dest throws IO Exception f Processes add Runtime get Runtime exec new String usr bin jar cf dest C dir NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4  IOException fProcesses getRuntime

Bundle Description clear  BundleDescription
void clear f Properties clear f Class Path clear f Resources clear f Properties2 clear f Properties put SIGNATURE NON NLS 1 f Properties put ICONFILE System Library Frameworks JavaVM framework Versions CurrentJDK Resources Generic App icns NON NLS 1  fProperties fClassPath fResources fProperties2 fProperties fProperties GenericApp
void add Resource Resource Info ri boolean on Classpath if on Classpath f Class Path add ri else f Resources add ri  addResource ResourceInfo onClasspath onClasspath fClassPath fResources
boolean remove Resource Resource Info ri boolean on Classpath if on Classpath return f Class Path remove ri return f Resources remove ri  removeResource ResourceInfo onClasspath onClasspath fClassPath fResources
Resource Info get Resources boolean on Classpath if on Classpath return Resource Info f Class Path to Array new Resource Info f Class Path size return Resource Info f Resources to Array new Resource Info f Resources size  ResourceInfo getResources onClasspath onClasspath ResourceInfo fClassPath toArray ResourceInfo fClassPath ResourceInfo fResources toArray ResourceInfo fResources
void add Listener I Property Change Listener listener f Listeners add listener  addListener IPropertyChangeListener fListeners
void remove Listener I Property Change Listener listener f Listeners remove listener  removeListener IPropertyChangeListener fListeners
String get String key return f Properties get Property key  fProperties getProperty
public String get String key String dflt return f Properties get Property key dflt  fProperties getProperty
public boolean get String key boolean dflt Boolean v Boolean f Properties get key if v null return dflt return v boolean Value  fProperties booleanValue
void set Value String key Object value f Properties put key value  setValue fProperties
void inititialize I Launch Configuration lc Abstract Java Launch Configuration Delegate lcd try lcd Abstract Java Launch Configuration Delegate lc get Type get Delegate I Launch Manager RUN MODE catch Core Exception e return String app Name lc get Name f Properties put APPNAME app Name f Properties put GETINFO app Name Util get String Bundle Description copyright format NON NLS 1 try f Properties put MAINCLASS lcd get Main Type Name lc catch Core Exception e f Properties put MAINCLASS NON NLS 1 try f Properties put ARGUMENTS lcd get Program Arguments lc catch Core Exception e f Properties put ARGUMENTS NON NLS 1 String wd null try wd lcd get Working Directory lc get Absolute Path f Properties put WORKINGDIR wd NON NLS 1 catch Core Exception e f Properties put WORKINGDIR NON NLS 1 try f Properties put MAINCLASS lcd get Main Type Name lc catch Core Exception e f Properties put MAINCLASS NON NLS 1 try String classpath lcd get Classpath lc for int i 0 i classpath length i add Resource new Resource Info classpath i true NON NLS 1 catch Core Exception e String vm Options2 NON NLS 1 String vm Options null try vm Options lcd getVM Arguments lc catch Core Exception e if vm Options null String Tokenizer st new String Tokenizer vm Options while st has More Tokens String token st next Token int pos token index Of if pos 2 token starts With D NON NLS 1 String key token substring 2 pos trim String value token substring pos 1 trim int l value length if l 2 value char At 0 value char At l 1 value value substring 1 l 1 if java library path equals key NON NLS 1 add Dll Dir wd value else f Properties2 put key value else vm Options2 vm Options2 token f Properties put VMOPTIONS vm Options2 boolean isSWT false Iterator iter f Resources iterator while iter has Next Resource Info ri Resource Info iter next if ri f Path index Of libswt carbon 0 NON NLS 1 isSWT true break f Properties put USES SWT new Boolean isSWT String launcher null if isSWT launcher System get Property org eclipse swtlauncher NON NLS 1 else set Value JVMVERSION 1 4 NON NLS 1 launcher System Library Frameworks JavaVM framework Versions A Resources MacOS Java Application Stub NON NLS 1 set Value LAUNCHER launcher I Java Project p null try p lcd get Java Project lc catch Core Exception e ignore if p null f Properties put IDENTIFIER p get Element Name else f Properties put IDENTIFIER NON NLS 1 fire Change  ILaunchConfiguration AbstractJavaLaunchConfigurationDelegate AbstractJavaLaunchConfigurationDelegate getType getDelegate ILaunchManager RUN_MODE CoreException appName getName fProperties appName fProperties appName getString BundleDescription fProperties getMainTypeName CoreException fProperties fProperties getProgramArguments CoreException fProperties getWorkingDirectory getAbsolutePath fProperties CoreException fProperties fProperties getMainTypeName CoreException fProperties getClasspath addResource ResourceInfo CoreException vmOptions2 vmOptions vmOptions getVMArguments CoreException vmOptions StringTokenizer StringTokenizer vmOptions hasMoreTokens nextToken indexOf startsWith charAt charAt addDllDir fProperties2 vmOptions2 vmOptions2 fProperties vmOptions2 fResources hasNext ResourceInfo ResourceInfo fPath indexOf fProperties USES_SWT getProperty setValue JavaApplicationStub setValue IJavaProject getJavaProject CoreException fProperties getElementName fProperties fireChange
void fire Change Property Change Event e new Property Change Event this ALL null null Object listeners f Listeners get Listeners for int i 0 i listeners length i I Property Change Listener listeners i property Change e  fireChange PropertyChangeEvent PropertyChangeEvent fListeners getListeners IPropertyChangeListener propertyChange
private void add Dll Dir String wd String path File lib dir if path starts With NON NLS 1 lib dir new File wd path else lib dir new File path if lib dir is Directory File dlls lib dir list Files for int j 0 j dlls length j try String name dlls j get Canonical Path if name ends With jnilib NON NLS 1 add Resource new Resource Info name false NON NLS 1 catch IO Exception e Need Work Auto generated catch block e print Stack Trace  addDllDir lib_dir startsWith lib_dir lib_dir lib_dir isDirectory lib_dir listFiles getCanonicalPath endsWith addResource ResourceInfo IOException NeedWork printStackTrace
static boolean verify I Launch Configuration lc String name lc get Name if name index Of jpage 0 NON NLS 1 return false Abstract Java Launch Configuration Delegate lcd try lcd Abstract Java Launch Configuration Delegate lc get Type get Delegate I Launch Manager RUN MODE if lcd get Main Type Name lc null return false return true catch Core Exception e return false  ILaunchConfiguration getName indexOf AbstractJavaLaunchConfigurationDelegate AbstractJavaLaunchConfigurationDelegate getType getDelegate ILaunchManager RUN_MODE getMainTypeName CoreException
static boolean matches I Launch Configuration lc I Java Project project Abstract Java Launch Configuration Delegate lcd try lcd Abstract Java Launch Configuration Delegate lc get Type get Delegate I Launch Manager RUN MODE catch Core Exception e return false I Java Project p null try p lcd get Java Project lc catch Core Exception e return false return project null project equals p  ILaunchConfiguration IJavaProject AbstractJavaLaunchConfigurationDelegate AbstractJavaLaunchConfigurationDelegate getType getDelegate ILaunchManager RUN_MODE CoreException IJavaProject getJavaProject CoreException

Bundle Wizard Base Page String key Bundle Description bd super Util get String key title NON NLS 1 f Key key f Bundle Description bd set Message Util get String f Key message NON NLS 1 set Description Util get String f Key description NON NLS 1 bd add Listener this  BundleWizardBasePage BundleDescription getString fKey fBundleDescription setMessage getString fKey setDescription getString fKey addListener
public void set Visible boolean visible if visible enter Page else leave Page super set Visible visible  setVisible enterPage leavePage setVisible
void enter Page System out println enter Page get Name  enterPage enterPage getName
void leave Page System out println leave Page get Name  leavePage leavePage getName
final public void create Control Composite parent Composite c new Composite parent SWT NULL c set Layout new Grid Layout 1 false set Control c create Contents c check If Page Complete  createControl setLayout GridLayout setControl createContents checkIfPageComplete
abstract public void create Contents Composite parent  createContents
static void set Height Hint Control control int height Grid Data gd1 new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING gd1 height Hint height control set Layout Data gd1  setHeightHint GridData GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING heightHint setLayoutData
static Label create Label Composite parent String text int align Label l new Label parent SWT NONE l set Text text l set Layout Data new Grid Data align return l  createLabel setText setLayoutData GridData
static Composite create Composite Composite parent int columns Composite c new Composite parent SWT NONE c set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout gl new Grid Layout columns false gl margin Width 0 c set Layout gl return c  createComposite setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout marginWidth setLayout
Text create Text Composite parent String key int lines Text t new Text parent SWT BORDER Grid Data gd new Grid Data Grid Data FILL HORIZONTAL if lines 2 gd height Hint 30 t set Layout Data gd hook Field t key return t  createText GridData GridData GridData FILL_HORIZONTAL heightHint setLayoutData hookField
Combo create Combo Composite parent String key Combo c new Combo parent SWT BORDER c set Layout Data new Grid Data Grid Data FILL HORIZONTAL hook Field c key return c  createCombo setLayoutData GridData GridData FILL_HORIZONTAL hookField
static Group create Group Composite parent String text int columns Group g new Group parent SWT NONE g set Text text g set Layout Data new Grid Data Grid Data FILL HORIZONTAL g set Layout new Grid Layout columns false return g  createGroup setText setLayoutData GridData GridData FILL_HORIZONTAL setLayout GridLayout
Button create Button Composite parent int flags String text Button b new Button parent flags if text null b set Text text return b  createButton setText
static Composite createH Box Composite parent Composite c new Composite parent SWT NONE c set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout gl new Grid Layout 2 false gl margin Width gl margin Height 0 c set Layout gl return c  createHBox setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout marginWidth marginHeight setLayout
void hook Field final Text tf final String key tf add Modify Listener new Modify Listener public void modify Text Modify Event e f Bundle Description set Value key tf get Text check If Page Complete  hookField addModifyListener ModifyListener modifyText ModifyEvent fBundleDescription setValue getText checkIfPageComplete
void hook Field final Combo tf final String key tf add Modify Listener new Modify Listener public void modify Text Modify Event e f Bundle Description set Value key tf get Text check If Page Complete  hookField addModifyListener ModifyListener modifyText ModifyEvent fBundleDescription setValue getText checkIfPageComplete
void hook Button final Button b final String key b add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Bundle Description set Value key new Boolean b get Selection check If Page Complete  hookButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fBundleDescription setValue getSelection checkIfPageComplete
final void check If Page Complete I Wizard Container c f Wizard null f Wizard get Container null if c null this c get Current Page c update Buttons  checkIfPageComplete IWizardContainer fWizard fWizard getContainer getCurrentPage updateButtons
see org eclipse jface wizard I Wizard Page can Flip To Next Page public boolean can Flip To Next Page return is Page Complete get Next Page null  IWizardPage canFlipToNextPage canFlipToNextPage isPageComplete getNextPage
see org eclipse jface wizard I Wizard Page get Name public String get Name return Util get String f Key title NON NLS 1  IWizardPage getName getName getString fKey
public I Wizard Page get Next Page if f Wizard null return null return f Wizard get Next Page this  IWizardPage getNextPage fWizard fWizard getNextPage
public I Wizard Page get Previous Page if f Previous Page null return f Previous Page if f Wizard null return f Wizard get Previous Page this return null  IWizardPage getPreviousPage fPreviousPage fPreviousPage fWizard fWizard getPreviousPage
see org eclipse jface wizard I Wizard Page get Wizard public I Wizard get Wizard return f Wizard  IWizardPage getWizard IWizard getWizard fWizard
see org eclipse jface wizard I Wizard Page set Previous Page org eclipse jface wizard I Wizard Page public void set Previous Page I Wizard Page page f Previous Page page  IWizardPage setPreviousPage IWizardPage setPreviousPage IWizardPage fPreviousPage
see org eclipse jface wizard I Wizard Page set Wizard org eclipse jface wizard I Wizard public void set Wizard I Wizard new Wizard f Wizard new Wizard  IWizardPage setWizard IWizard setWizard IWizard newWizard fWizard newWizard

public Bundle Wizard Page1 Bundle Description bd super page1 bd NON NLS 1  BundleWizardPage1 BundleDescription
new Selection Adapter public void widget Selected Selection Event e int ix f Launch Configs get Selection Index if ix 0 ix f Configurations length f Bundle Description clear f Bundle Description inititialize f Configurations ix  SelectionAdapter widgetSelected SelectionEvent fLaunchConfigs getSelectionIndex fConfigurations fBundleDescription fBundleDescription fConfigurations
b1 add Selection Listener new Selection Adapter public void widget Selected Selection Event e Message Box mb new Message Box shell SWT ICON INFORMATION SWT OK mb set Message Util get String page1 main Class dialog message NON NLS 1 mb set Text Util get String page1 main Class dialog title NON NLS 1 mb open  addSelectionListener SelectionAdapter widgetSelected SelectionEvent MessageBox MessageBox ICON_INFORMATION setMessage getString mainClass setText getString mainClass
browse add Selection Listener new Selection Adapter public void widget Selected Selection Event e Directory Dialog dd new Directory Dialog browse get Shell SWT SAVE dd set Message Util get String page1 app Folder browse Dialog message NON NLS 1 dd set Text Util get String page1 app Folder browse Dialog title NON NLS 1 String name dd open if name null f Location set Text name  addSelectionListener SelectionAdapter widgetSelected SelectionEvent DirectoryDialog DirectoryDialog getShell setMessage getString appFolder browseDialog setText getString appFolder browseDialog fLocation setText
b add Selection Listener new Selection Adapter public void widget Selected Selection Event e File Dialog fd new File Dialog b get Shell SWT OPEN fd set Text Util get String page1 app Icon choose Dialog title NON NLS 1 fd set Filter Extensions new String icns NON NLS 1 String name fd open if name null f Icon File Name set Text name  addSelectionListener SelectionAdapter widgetSelected SelectionEvent FileDialog FileDialog getShell setText getString appIcon chooseDialog setFilterExtensions fIconFileName setText
public void create Contents Composite c final Shell shell c get Shell Composite c1 create Composite c 2 create Label c1 Util get String page1 launch Config label Grid Data VERTICAL ALIGN CENTER NON NLS 1 f Launch Configs new Combo c1 SWT READ ONLY fill Combo f Launch Configs f Launch Configs add Selection Listener new Selection Adapter public void widget Selected Selection Event e int ix f Launch Configs get Selection Index if ix 0 ix f Configurations length f Bundle Description clear f Bundle Description inititialize f Configurations ix Group c2 create Group c Main 2 NON NLS 1 create Label c2 Util get String page1 main Class label Grid Data VERTICAL ALIGN CENTER NON NLS 1 Composite c7a createH Box c2 f Main Class create Text c7a MAINCLASS 1 Button b1 create Button c7a SWT NONE Util get String page1 main Class choose Button label NON NLS 1 b1 add Selection Listener new Selection Adapter public void widget Selected Selection Event e Message Box mb new Message Box shell SWT ICON INFORMATION SWT OK mb set Message Util get String page1 main Class dialog message NON NLS 1 mb set Text Util get String page1 main Class dialog title NON NLS 1 mb open create Label c2 Util get String page1 arguments label Grid Data VERTICAL ALIGN BEGINNING NON NLS 1 f Arguments create Text c2 ARGUMENTS 2 Group c5 create Group c Destination 2 NON NLS 1 create Label c5 Util get String page1 app Name label Grid Data VERTICAL ALIGN CENTER NON NLS 1 f App Name create Text c5 APPNAME 1 create Label c5 Util get String page1 app Folder label Grid Data VERTICAL ALIGN CENTER NON NLS 1 Composite c3a createH Box c5 f Location create Combo c3a DESTINATIONDIRECTORY final Button browse create Button c3a SWT NONE Util get String page1 app Folder browse Button label NON NLS 1 browse add Selection Listener new Selection Adapter public void widget Selected Selection Event e Directory Dialog dd new Directory Dialog browse get Shell SWT SAVE dd set Message Util get String page1 app Folder browse Dialog message NON NLS 1 dd set Text Util get String page1 app Folder browse Dialog title NON NLS 1 String name dd open if name null f Location set Text name Group g6 create Group c Options 2 NON NLS 1 create Label g6 Util get String page1 jvm label Grid Data VERTICAL ALIGN CENTER NON NLS 1 Composite c8 create Composite g6 4 fJVM Version new Combo c8 SWT READ ONLY for int i 0 i JVMS length i fJVM Version add JVMS i fJVM Version set Text JVMS 4 hook Field fJVM Version JVMVERSION create Label c8 Grid Data VERTICAL ALIGN CENTER NON NLS 1 create Label c8 Util get String page1 useSWT label Grid Data VERTICAL ALIGN CENTER NON NLS 1 f UseSWT create Button c8 SWT CHECK null NON NLS 1 hook Button f UseSWT USES SWT create Label g6 Util get String page1 app Icon label Grid Data VERTICAL ALIGN CENTER NON NLS 1 Composite c7 create Composite g6 2 f Icon File Name create Text c7 ICONFILE 1 final Button b create Button c7 SWT NONE Util get String page1 app Icon choose Button label NON NLS 1 b add Selection Listener new Selection Adapter public void widget Selected Selection Event e File Dialog fd new File Dialog b get Shell SWT OPEN fd set Text Util get String page1 app Icon choose Dialog title NON NLS 1 fd set Filter Extensions new String icns NON NLS 1 String name fd open if name null f Icon File Name set Text name  createContents getShell createComposite createLabel getString launchConfig GridData VERTICAL_ALIGN_CENTER fLaunchConfigs READ_ONLY fillCombo fLaunchConfigs fLaunchConfigs addSelectionListener SelectionAdapter widgetSelected SelectionEvent fLaunchConfigs getSelectionIndex fConfigurations fBundleDescription fBundleDescription fConfigurations createGroup createLabel getString mainClass GridData VERTICAL_ALIGN_CENTER createHBox fMainClass createText createButton getString mainClass chooseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent MessageBox MessageBox ICON_INFORMATION setMessage getString mainClass setText getString mainClass createLabel getString GridData VERTICAL_ALIGN_BEGINNING fArguments createText createGroup createLabel getString appName GridData VERTICAL_ALIGN_CENTER fAppName createText createLabel getString appFolder GridData VERTICAL_ALIGN_CENTER createHBox fLocation createCombo createButton getString appFolder browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent DirectoryDialog DirectoryDialog getShell setMessage getString appFolder browseDialog setText getString appFolder browseDialog fLocation setText createGroup createLabel getString GridData VERTICAL_ALIGN_CENTER createComposite fJVMVersion READ_ONLY fJVMVersion fJVMVersion setText hookField fJVMVersion createLabel GridData VERTICAL_ALIGN_CENTER createLabel getString GridData VERTICAL_ALIGN_CENTER fUseSWT createButton hookButton fUseSWT USES_SWT createLabel getString appIcon GridData VERTICAL_ALIGN_CENTER createComposite fIconFileName createText createButton getString appIcon chooseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent FileDialog FileDialog getShell setText getString appIcon chooseDialog setFilterExtensions fIconFileName setText
void enter Page super enter Page init Combo f Launch Configs  enterPage enterPage initCombo fLaunchConfigs
public void property Change Property Change Event event if f App Name null f App Name set Text f Bundle Description get APPNAME NON NLS 1 if f Main Class null f Main Class set Text f Bundle Description get MAINCLASS NON NLS 1 if fJVM Version null fJVM Version set Text f Bundle Description get JVMVERSION NON NLS 1 if f UseSWT null f UseSWT set Selection f Bundle Description get USES SWT false NON NLS 1  propertyChange PropertyChangeEvent fAppName fAppName setText fBundleDescription fMainClass fMainClass setText fBundleDescription fJVMVersion fJVMVersion setText fBundleDescription fUseSWT fUseSWT setSelection fBundleDescription USES_SWT
public boolean is Page Complete return f App Name null f App Name get Text length 0 f Location get Text length 0  isPageComplete fAppName fAppName getText fLocation getText
Arrays sort f Configurations new Comparator public int compare Object o1 Object o2 I Launch Configuration lc1 I Launch Configuration o1 I Launch Configuration lc2 I Launch Configuration o2 return lc1 get Name compare To lc2 get Name  fConfigurations ILaunchConfiguration ILaunchConfiguration ILaunchConfiguration ILaunchConfiguration getName compareTo getName
public boolean equals Object obj return false 
private void collect Launch Configs Array List configs new Array List I Launch Manager manager Debug Plugin get Default get Launch Manager I Launch Configuration Type type manager get Launch Configuration Type I Java Launch Configuration Constants ID JAVA APPLICATION try I Launch Configuration configurations manager get Launch Configurations type for int i 0 i configurations length i I Launch Configuration configuration configurations i if Bundle Description verify configuration configs add configuration catch Core Exception e f Configurations I Launch Configuration configs to Array new I Launch Configuration configs size Arrays sort f Configurations new Comparator public int compare Object o1 Object o2 I Launch Configuration lc1 I Launch Configuration o1 I Launch Configuration lc2 I Launch Configuration o2 return lc1 get Name compare To lc2 get Name public boolean equals Object obj return false  collectLaunchConfigs ArrayList ArrayList ILaunchManager DebugPlugin getDefault getLaunchManager ILaunchConfigurationType getLaunchConfigurationType IJavaLaunchConfigurationConstants ID_JAVA_APPLICATION ILaunchConfiguration getLaunchConfigurations ILaunchConfiguration BundleDescription CoreException fConfigurations ILaunchConfiguration toArray ILaunchConfiguration fConfigurations ILaunchConfiguration ILaunchConfiguration ILaunchConfiguration ILaunchConfiguration getName compareTo getName
private void fill Combo Combo c collect Launch Configs for int i 0 i f Configurations length i I Launch Configuration configuration f Configurations i c add configuration get Name  fillCombo collectLaunchConfigs fConfigurations ILaunchConfiguration fConfigurations getName
private void init Combo Combo c I Structured Selection sel Mac Bundle Wizard get Wizard get Selection Object o sel get First Element if o instanceof I Java Element I Java Project project I Java Element o get Java Project if project null for int i 0 i f Configurations length i I Launch Configuration configuration f Configurations i if Bundle Description matches configuration project c set Text configuration get Name f Bundle Description inititialize configuration return  initCombo IStructuredSelection MacBundleWizard getWizard getSelection getFirstElement IJavaElement IJavaProject IJavaElement getJavaProject fConfigurations ILaunchConfiguration fConfigurations BundleDescription setText getName fBundleDescription

protected Bundle Wizard Page2 Bundle Description bd super page2 bd NON NLS 1  BundleWizardPage2 BundleDescription
public void create Contents Composite parent Composite c create Composite parent 2 create Label c Util get String page2 working Directory label Grid Data VERTICAL ALIGN CENTER NON NLS 1 f Working Dir create Text c WORKINGDIR 1 f Class Path create Table Group parent Util get String page2 add To Classpath group label true NON NLS 1 f Resources create Table Group parent Util get String page2 add To Bundle group label false NON NLS 1  createContents createComposite createLabel getString workingDirectory GridData VERTICAL_ALIGN_CENTER fWorkingDir createText fClassPath createTableGroup getString addToClasspath fResources createTableGroup getString addToBundle
add Button1 add Selection Listener new Selection Adapter public void widget Selected Selection Event e File Dialog fd new File Dialog add Button1 get Shell SWT OPEN fd set Text Util get String page2 choose File Dialog title NON NLS 1 String path fd open if path null Resource Info ri new Resource Info path f Bundle Description add Resource ri on Classpath add table ri  addButton1 addSelectionListener SelectionAdapter widgetSelected SelectionEvent FileDialog FileDialog addButton1 getShell setText getString chooseFileDialog ResourceInfo ResourceInfo fBundleDescription addResource onClasspath
add Button1 add Selection Listener new Selection Adapter public void widget Selected Selection Event e Directory Dialog fd new Directory Dialog add Button2 get Shell SWT OPEN fd set Text Util get String page2 choose Folder dialog title NON NLS 1 String path fd open if path null Resource Info ri new Resource Info path f Bundle Description add Resource ri on Classpath add table ri  addButton1 addSelectionListener SelectionAdapter widgetSelected SelectionEvent DirectoryDialog DirectoryDialog addButton2 getShell setText getString chooseFolder ResourceInfo ResourceInfo fBundleDescription addResource onClasspath
remove Button set Enabled false remove Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e remove table on Classpath remove Button  removeButton setEnabled removeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent onClasspath removeButton
table add Selection Listener new Selection Adapter public void widget Selected Selection Event e remove Button set Enabled table get Selection Count 0  addSelectionListener SelectionAdapter widgetSelected SelectionEvent removeButton setEnabled getSelectionCount
Table create Table Group Composite parent String group Name final boolean on Classpath Group g1 create Group parent group Name 1 final Table table new Table g1 SWT H SCROLL SWT V SCROLL SWT MULTI SWT FULL SELECTION set Height Hint table 80 Composite c1 create Composite g1 3 final Button add Button1 create Button c1 SWT NONE Util get String page2 add File button label NON NLS 1 add Button1 add Selection Listener new Selection Adapter public void widget Selected Selection Event e File Dialog fd new File Dialog add Button1 get Shell SWT OPEN fd set Text Util get String page2 choose File Dialog title NON NLS 1 String path fd open if path null Resource Info ri new Resource Info path f Bundle Description add Resource ri on Classpath add table ri final Button add Button2 create Button c1 SWT NONE Util get String page2 add Folder button label NON NLS 1 add Button1 add Selection Listener new Selection Adapter public void widget Selected Selection Event e Directory Dialog fd new Directory Dialog add Button2 get Shell SWT OPEN fd set Text Util get String page2 choose Folder dialog title NON NLS 1 String path fd open if path null Resource Info ri new Resource Info path f Bundle Description add Resource ri on Classpath add table ri final Button remove Button create Button c1 SWT NONE Util get String page2 remove button label NON NLS 1 remove Button set Enabled false remove Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e remove table on Classpath remove Button table add Selection Listener new Selection Adapter public void widget Selected Selection Event e remove Button set Enabled table get Selection Count 0 return table  createTableGroup groupName onClasspath createGroup groupName H_SCROLL V_SCROLL FULL_SELECTION setHeightHint createComposite addButton1 createButton getString addFile addButton1 addSelectionListener SelectionAdapter widgetSelected SelectionEvent FileDialog FileDialog addButton1 getShell setText getString chooseFileDialog ResourceInfo ResourceInfo fBundleDescription addResource onClasspath addButton2 createButton getString addFolder addButton1 addSelectionListener SelectionAdapter widgetSelected SelectionEvent DirectoryDialog DirectoryDialog addButton2 getShell setText getString chooseFolder ResourceInfo ResourceInfo fBundleDescription addResource onClasspath removeButton createButton getString removeButton setEnabled removeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent onClasspath removeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent removeButton setEnabled getSelectionCount
private void add Table t Resource Info ri Table Item ti new Table Item t SWT NONE ti set Data ri ti set Text ri f Path  ResourceInfo TableItem TableItem setData setText fPath
private void remove Table table boolean b Button remove Button Table Item selection table get Selection for int i 0 i selection length i Table Item ti selection i Resource Info ri Resource Info ti get Data if f Bundle Description remove Resource ri b int ix table index Of ti if ix 0 table remove ix remove Button set Enabled table get Selection Count 0  removeButton TableItem getSelection TableItem ResourceInfo ResourceInfo getData fBundleDescription removeResource indexOf removeButton setEnabled getSelectionCount
public void property Change Property Change Event event if f Working Dir null f Working Dir set Text f Bundle Description get WORKINGDIR NON NLS 1 if f Class Path null f Class Path remove All Resource Info ris f Bundle Description get Resources true for int i 0 i ris length i add f Class Path ris i if f Resources null f Resources remove All Resource Info ris f Bundle Description get Resources false for int i 0 i ris length i add f Resources ris i  propertyChange PropertyChangeEvent fWorkingDir fWorkingDir setText fBundleDescription fClassPath fClassPath removeAll ResourceInfo fBundleDescription getResources fClassPath fResources fResources removeAll ResourceInfo fBundleDescription getResources fResources
public boolean is Page Complete return true  isPageComplete

Table f Properties protected Bundle Wizard Page3 Bundle Description bd super page3 bd NON NLS 1  fProperties BundleWizardPage3 BundleDescription
f Properties set Lines Visible true f Properties add Selection Listener new Selection Adapter public void widget Selected Selection Event e  fProperties setLinesVisible fProperties addSelectionListener SelectionAdapter widgetSelected SelectionEvent
public void create Contents Composite c Composite c1 create Composite c 4 create Label c1 Util get String page3 identifier label Grid Data VERTICAL ALIGN CENTER NON NLS 1 f Identifier create Text c1 IDENTIFIER 1 create Label c1 Util get String page3 signature label Grid Data VERTICAL ALIGN CENTER NON NLS 1 f Signature create Text c1 SIGNATURE 1 create Label c Util get String page3 vm Options label Grid Data VERTICAL ALIGN CENTER NON NLS 1 fVM Options create Text c VMOPTIONS 2 Group g create Group c Util get String page3 properties Group label 1 NON NLS 1 f Properties new Table g SWT H SCROLL SWT V SCROLL SWT MULTI f Properties set Header Visible true f Properties set Lines Visible true f Properties add Selection Listener new Selection Adapter public void widget Selected Selection Event e set Height Hint f Properties 60 Table Column col0 new Table Column f Properties SWT NONE col0 set Text Util get String page3 keys column label NON NLS 1 col0 set Width 150 Table Column col1 new Table Column f Properties SWT NONE col1 set Text Util get String page3 values column label NON NLS 1 col1 set Width 150  createContents createComposite createLabel getString GridData VERTICAL_ALIGN_CENTER fIdentifier createText createLabel getString GridData VERTICAL_ALIGN_CENTER fSignature createText createLabel getString vmOptions GridData VERTICAL_ALIGN_CENTER fVMOptions createText createGroup getString propertiesGroup fProperties H_SCROLL V_SCROLL fProperties setHeaderVisible fProperties setLinesVisible fProperties addSelectionListener SelectionAdapter widgetSelected SelectionEvent setHeightHint fProperties TableColumn TableColumn fProperties setText getString setWidth TableColumn TableColumn fProperties setText getString setWidth
public void property Change Property Change Event event if f Properties null return f Identifier set Text f Bundle Description get IDENTIFIER NON NLS 1 f Signature set Text f Bundle Description get SIGNATURE NON NLS 1 fVM Options set Text f Bundle Description get VMOPTIONS NON NLS 1 f Properties remove All if f Bundle Description f Properties2 null f Bundle Description f Properties2 size 0 Enumeration iter f Bundle Description f Properties2 keys for int i 0 iter has More Elements i String key String iter next Element String value String f Bundle Description f Properties2 get key Table Item ti new Table Item f Properties SWT NONE ti set Text 0 key ti set Text 1 value  propertyChange PropertyChangeEvent fProperties fIdentifier setText fBundleDescription fSignature setText fBundleDescription fVMOptions setText fBundleDescription fProperties removeAll fBundleDescription fProperties2 fBundleDescription fProperties2 fBundleDescription fProperties2 hasMoreElements nextElement fBundleDescription fProperties2 TableItem TableItem fProperties setText setText
public boolean is Page Complete return true  isPageComplete

public Mac Bundle Wizard set Default Page Image Descriptor CompareUI Plugin get Image Descriptor wizban applypatch wizban gif NON NLS 1 set Window Title Util get String Mac Bundle Wizard title NON NLS 1  MacBundleWizard setDefaultPageImageDescriptor CompareUIPlugin getImageDescriptor applypatch_wizban setWindowTitle getString MacBundleWizard
see org eclipse ui I Workbench Wizard init org eclipse ui I Workbench org eclipse jface viewers I Structured Selection public void init I Workbench workbench I Structured Selection selection f Workbench workbench f Selection selection  IWorkbenchWizard IWorkbench IStructuredSelection IWorkbench IStructuredSelection fWorkbench fSelection
I Structured Selection get Selection return f Selection  IStructuredSelection getSelection fSelection
public void add Pages super add Pages add Page new Bundle Wizard Page1 f Bundle Description add Page new Bundle Wizard Page2 f Bundle Description add Page new Bundle Wizard Page3 f Bundle Description  addPages addPages addPage BundleWizardPage1 fBundleDescription addPage BundleWizardPage2 fBundleDescription addPage BundleWizardPage3 fBundleDescription
public boolean perform Finish try Bundle Builder bb new Bundle Builder bb create Bundle f Bundle Description null catch IO Exception e Need Work Auto generated catch block e print Stack Trace return true  performFinish BundleBuilder BundleBuilder createBundle fBundleDescription IOException NeedWork printStackTrace

String f Path Resource Info String path f Path path  fPath ResourceInfo fPath

static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

public static Code Generation Settings get Code Generation Settings I Preference Store store Preference Constants get Preference Store Code Generation Settings res new Code Generation Settings res create Comments store get Boolean Preference Constants CODEGEN ADD COMMENTS res use Keyword This store get Boolean Preference Constants CODEGEN KEYWORD THIS res import Order get Import Order Preference store res import Threshold get Import Number Threshold store res tab Width Code Formatter Util get Tab Width return res  CodeGenerationSettings getCodeGenerationSettings IPreferenceStore PreferenceConstants getPreferenceStore CodeGenerationSettings CodeGenerationSettings createComments getBoolean PreferenceConstants CODEGEN_ADD_COMMENTS useKeywordThis getBoolean PreferenceConstants CODEGEN_KEYWORD_THIS importOrder getImportOrderPreference importThreshold getImportNumberThreshold tabWidth CodeFormatterUtil getTabWidth
public static int get Import Number Threshold I Preference Store prefs int threshold prefs get Int Preference Constants ORGIMPORTS ONDEMANDTHRESHOLD if threshold 0 threshold Integer MAX VALUE return threshold  getImportNumberThreshold IPreferenceStore getInt PreferenceConstants ORGIMPORTS_ONDEMANDTHRESHOLD MAX_VALUE
public static String get Import Order Preference I Preference Store prefs String str prefs get String Preference Constants ORGIMPORTS IMPORTORDER if str null return unpack List str NON NLS 1 return new String 0  getImportOrderPreference IPreferenceStore getString PreferenceConstants ORGIMPORTS_IMPORTORDER unpackList
private static String unpack List String str String separator String Tokenizer tok new String Tokenizer str separator NON NLS 1 int n Tokens tok count Tokens String res new String n Tokens for int i 0 i n Tokens i res i tok next Token trim return res  unpackList StringTokenizer StringTokenizer nTokens countTokens nTokens nTokens nextToken

param text the text field to install Content Assist param processor the code I Content Assist Processor code public static void create Text Content Assistant final Text text I Content Assist Processor processor Content Assist Handler create Handler For Text text create Java Content Assistant processor  ContentAssist IContentAssistProcessor createTextContentAssistant IContentAssistProcessor ContentAssistHandler createHandlerForText createJavaContentAssistant
param combo the text field to install Content Assist param processor the code I Content Assist Processor code public static void create Combo Content Assistant final Combo combo I Content Assist Processor processor Content Assist Handler create Handler For Combo combo create Java Content Assistant processor  ContentAssist IContentAssistProcessor createComboContentAssistant IContentAssistProcessor ContentAssistHandler createHandlerForCombo createJavaContentAssistant
content Assistant set Context Information Popup Orientation I Content Assistant CONTEXT INFO ABOVE content Assistant set Information Control Creator new I Information Control Creator public I Information Control create Information Control Shell parent return new Default Information Control parent SWT NONE new HTML Text Presenter true  contentAssistant setContextInformationPopupOrientation IContentAssistant CONTEXT_INFO_ABOVE contentAssistant setInformationControlCreator IInformationControlCreator IInformationControl createInformationControl DefaultInformationControl HTMLTextPresenter
public static Subject Control Content Assistant create Java Content Assistant I Content Assist Processor processor final Subject Control Content Assistant content Assistant new Subject Control Content Assistant content Assistant set Content Assist Processor processor I Document DEFAULT CONTENT TYPE Content Assist Preference configure content Assistant Java Plugin get Default get Preference Store content Assistant set Context Information Popup Orientation I Content Assistant CONTEXT INFO ABOVE content Assistant set Information Control Creator new I Information Control Creator public I Information Control create Information Control Shell parent return new Default Information Control parent SWT NONE new HTML Text Presenter true return content Assistant  SubjectControlContentAssistant createJavaContentAssistant IContentAssistProcessor SubjectControlContentAssistant contentAssistant SubjectControlContentAssistant contentAssistant setContentAssistProcessor IDocument DEFAULT_CONTENT_TYPE ContentAssistPreference contentAssistant JavaPlugin getDefault getPreferenceStore contentAssistant setContextInformationPopupOrientation IContentAssistant CONTEXT_INFO_ABOVE contentAssistant setInformationControlCreator IInformationControlCreator IInformationControl createInformationControl DefaultInformationControl HTMLTextPresenter contentAssistant

see java lang Runnable run public void run BG COLOR RGB display get System Color SWT COLOR INFO BACKGROUND getRGB  BG_COLOR_RGB getSystemColor COLOR_INFO_BACKGROUND
private HTML Printer  HTMLPrinter
private static String replace String text char c String s int previous 0 int current text index Of c previous if current 1 return text String Buffer buffer new String Buffer while current 1 buffer append text substring previous current buffer append s previous current 1 current text index Of c previous buffer append text substring previous return buffer to String  indexOf StringBuffer StringBuffer indexOf toString
public static String convert ToHTML Content String content content replace content lt NON NLS 1 return replace content gt NON NLS 1  convertToHTMLContent
public static String read Reader rd String Buffer buffer new String Buffer char read Buffer new char 2048 try int n rd read read Buffer while n 0 buffer append read Buffer 0 n n rd read read Buffer return buffer to String catch IO Exception x return null  StringBuffer StringBuffer readBuffer readBuffer readBuffer readBuffer toString IOException
public static void insert Page Prolog String Buffer buffer int position RGB bgRGB URL style SheetURL if bgRGB null insert Page Prolog buffer position style SheetURL else String Buffer page Prolog new String Buffer 300 page Prolog append html NON NLS 1 append Style Sheet Link page Prolog style SheetURL page Prolog append body text 000000 bgcolor NON NLS 1 append Color page Prolog bgRGB page Prolog append font size 1 NON NLS 1 buffer insert position page Prolog to String  insertPageProlog StringBuffer styleSheetURL insertPageProlog styleSheetURL StringBuffer pageProlog StringBuffer pageProlog appendStyleSheetLink pageProlog styleSheetURL pageProlog appendColor pageProlog pageProlog pageProlog toString
public static void insert Page Prolog String Buffer buffer int position RGB bgRGB if bgRGB null insert Page Prolog buffer position else String Buffer page Prolog new String Buffer 60 page Prolog append html body text 000000 bgcolor NON NLS 1 append Color page Prolog bgRGB page Prolog append font size 1 NON NLS 1 buffer insert position page Prolog to String  insertPageProlog StringBuffer insertPageProlog StringBuffer pageProlog StringBuffer pageProlog appendColor pageProlog pageProlog pageProlog toString
private static void append Style Sheet Link String Buffer buffer URL style SheetURL if style SheetURL null return buffer append head NON NLS 1 buffer append LINK REL stylesheet HREF NON NLS 1 buffer append style SheetURL buffer append CHARSET ISO 8859 1 TYPE text css NON NLS 1 buffer append head NON NLS 1  appendStyleSheetLink StringBuffer styleSheetURL styleSheetURL styleSheetURL
private static void append Color String Buffer buffer RGB rgb buffer append buffer append Integer to Hex String rgb red buffer append Integer to Hex String rgb green buffer append Integer to Hex String rgb blue  appendColor StringBuffer toHexString toHexString toHexString
public static void insert Page Prolog String Buffer buffer int position insert Page Prolog buffer position get Bg Color NON NLS 1  insertPageProlog StringBuffer insertPageProlog getBgColor
public static void insert Page Prolog String Buffer buffer int position URL style SheetURL insert Page Prolog buffer position get Bg Color style SheetURL NON NLS 1  insertPageProlog StringBuffer styleSheetURL insertPageProlog getBgColor styleSheetURL
private static RGB get Bg Color if BG COLOR RGB null return BG COLOR RGB else return new RGB 255 255 225 RGB value of info bg color on WindowsXP  getBgColor BG_COLOR_RGB BG_COLOR_RGB
public static void add Page Prolog String Buffer buffer insert Page Prolog buffer buffer length  addPageProlog StringBuffer insertPageProlog
public static void add Page Epilog String Buffer buffer buffer append font body html NON NLS 1  addPageEpilog StringBuffer
public static void start Bullet List String Buffer buffer buffer append ul NON NLS 1  startBulletList StringBuffer
public static void end Bullet List String Buffer buffer buffer append ul NON NLS 1  endBulletList StringBuffer
public static void add Bullet String Buffer buffer String bullet if bullet null buffer append li NON NLS 1 buffer append bullet buffer append li NON NLS 1  addBullet StringBuffer
public static void add Small Header String Buffer buffer String header if header null buffer append h5 NON NLS 1 buffer append header buffer append h5 NON NLS 1  addSmallHeader StringBuffer
public static void add Paragraph String Buffer buffer String paragraph if paragraph null buffer append p NON NLS 1 buffer append paragraph  addParagraph StringBuffer
public static void add Paragraph String Buffer buffer Reader paragraph Reader if paragraph Reader null add Paragraph buffer read paragraph Reader  addParagraph StringBuffer paragraphReader paragraphReader addParagraph paragraphReader

Creates a reader that breaks an input text to fit in a given width param reader Reader of the input text param gc The graphic context that defines the currently used font sizes param max Line Width The max width pixes where the text has to fit in public Line Breaking Reader Reader reader GC gc int max Line Width f Reader new Buffered Reader reader fGC gc f Max Width max Line Width f Offset 0 f Line null f Line Break Iterator Break Iterator get Line Instance  maxLineWidth LineBreakingReader maxLineWidth fReader BufferedReader fMaxWidth maxLineWidth fOffset fLine fLineBreakIterator BreakIterator getLineInstance
public boolean is Formatted Line return f Line null  isFormattedLine fLine
Reads the next line The lengths of the line will not exceed the gived maximum width public String read Line throws IO Exception if f Line null String line f Reader read Line if line null return null int line Len fGC text Extent line x if line Len f Max Width return line f Line line f Line Break Iterator set Text line f Offset 0 int break Offset find Next Break Offset f Offset String res if break Offset Break Iterator DONE res f Line substring f Offset break Offset f Offset find Word Begin break Offset if f Offset f Line length f Line null else res f Line substring f Offset f Line null return res  readLine IOException fLine fReader readLine lineLen textExtent lineLen fMaxWidth fLine fLineBreakIterator setText fOffset breakOffset findNextBreakOffset fOffset breakOffset BreakIterator fLine fOffset breakOffset fOffset findWordBegin breakOffset fOffset fLine fLine fLine fOffset fLine
private int find Next Break Offset int curr Offset int curr Width 0 int next Offset f Line Break Iterator following curr Offset while next Offset Break Iterator DONE String word f Line substring curr Offset next Offset int word Width fGC text Extent word x int next Width word Width curr Width if next Width f Max Width if curr Width 0 return curr Offset else return next Offset curr Width next Width curr Offset next Offset next Offset f Line Break Iterator next return next Offset  findNextBreakOffset currOffset currWidth nextOffset fLineBreakIterator currOffset nextOffset BreakIterator fLine currOffset nextOffset wordWidth textExtent nextWidth wordWidth currWidth nextWidth fMaxWidth currWidth currOffset nextOffset currWidth nextWidth currOffset nextOffset nextOffset fLineBreakIterator nextOffset
private int find Word Begin int idx while idx f Line length Character is Whitespace f Line char At idx idx return idx  findWordBegin fLine isWhitespace fLine charAt

Creates the template engine for a particular context type See code Template Context code for supported context types public Template Engine Template Context Type context Type Assert is Not Null context Type f Context Type context Type  TemplateContext TemplateEngine TemplateContextType contextType isNotNull contextType fContextType contextType
Empties the collector public void reset f Proposals clear  fProposals
Returns the array of matching templates public Template Proposal get Results return Template Proposal f Proposals to Array new Template Proposal f Proposals size  TemplateProposal getResults TemplateProposal fProposals toArray TemplateProposal fProposals
Inspects the context of the compilation unit around code completion Position code and feeds the collector with proposals param viewer the text viewer param completion Position the context position in the document of the text viewer param compilation Unit the compilation unit may be code null code public void complete I Text Viewer viewer int completion Position I Compilation Unit compilation Unit I Document document viewer get Document if f Context Type instanceof Compilation Unit Context Type return Point selection viewer get Selected Range remember selected text String selected Text null if selection y 0 try selected Text document get selection x selection y catch Bad Location Exception e Compilation Unit Context context Compilation Unit Context Type f Context Type create Context document completion Position selection y compilation Unit context set Variable selection selected Text NON NLS 1 int start context get Start int end context get End I Region region new Region start end start Template templates Java Plugin get Default get Template Store get Templates if selection y 0 for int i 0 i templates length i if context can Evaluate templates i f Proposals add new Template Proposal templates i context region Java Plugin Images get Java Plugin Images IMG OBJS TEMPLATE else if context get Key length 0 context set Force Evaluation true boolean multiple Lines Selected are Multiple Lines Selected viewer for int i 0 i templates length i Template template templates i if context can Evaluate template template get Context Type Id equals context get Context Type get Id multiple Lines Selected template get Pattern index Of  WORD SELECTION 1 multiple Lines Selected template get Pattern index Of  LINE SELECTION 1 f Proposals add new Template Proposal templates i context region Java Plugin Images get Java Plugin Images IMG OBJS TEMPLATE  completionPosition completionPosition compilationUnit ITextViewer completionPosition ICompilationUnit compilationUnit IDocument getDocument fContextType CompilationUnitContextType getSelectedRange selectedText selectedText BadLocationException CompilationUnitContext CompilationUnitContextType fContextType createContext completionPosition compilationUnit setVariable selectedText getStart getEnd IRegion JavaPlugin getDefault getTemplateStore getTemplates canEvaluate fProposals TemplateProposal JavaPluginImages JavaPluginImages IMG_OBJS_TEMPLATE getKey setForceEvaluation multipleLinesSelected areMultipleLinesSelected canEvaluate getContextTypeId getContextType getId multipleLinesSelected getPattern indexOf _WORD_SELECTION multipleLinesSelected getPattern indexOf _LINE_SELECTION fProposals TemplateProposal JavaPluginImages JavaPluginImages IMG_OBJS_TEMPLATE
Returns code true code if one line is completely selected or if multiple lines are selected Being completely selected means that all characters except the new line characters are selected return code true code if one or multiple lines are selected since 2 1 private boolean are Multiple Lines Selected I Text Viewer viewer if viewer null return false Point s viewer get Selected Range if s y 0 return false try I Document document viewer get Document int start Line document get Line Of Offset s x int end Line document get Line Of Offset s x s y I Region line document get Line Information start Line return start Line end Line s x line get Offset s y line get Length catch Bad Location Exception x return false  areMultipleLinesSelected ITextViewer getSelectedRange IDocument getDocument startLine getLineOfOffset endLine getLineOfOffset IRegion getLineInformation startLine startLine endLine getOffset getLength BadLocationException

public class Open Type Hierarchy Util private Open Type Hierarchy Util  OpenTypeHierarchyUtil OpenTypeHierarchyUtil
public static Type Hierarchy View Part open I Java Element element I Workbench Window window I Java Element candidates get Candidates element if candidates null return open candidates window return null  TypeHierarchyViewPart IJavaElement IWorkbenchWindow IJavaElement getCandidates
public static Type Hierarchy View Part open I Java Element candidates I Workbench Window window Assert is True candidates null candidates length 0 I Java Element input null if candidates length 1 String title JavaUI Messages get String Open Type Hierarchy Util selection Dialog title NON NLS 1 String message JavaUI Messages get String Open Type Hierarchy Util selection Dialog message NON NLS 1 input Open Action Util select Java Element candidates window get Shell title message else input candidates 0 if input null return null try if Preference Constants OPEN TYPE HIERARCHY IN PERSPECTIVE equals Preference Constants get Preference Store get String Preference Constants OPEN TYPE HIERARCHY return open In Perspective window input else return open In View Part window input catch Workbench Exception e Exception Handler handle e window get Shell JavaUI Messages get String Open Type Hierarchy Util error open perspective NON NLS 1 e get Message catch Java Model Exception e Exception Handler handle e window get Shell JavaUI Messages get String Open Type Hierarchy Util error open editor NON NLS 1 e get Message return null  TypeHierarchyViewPart IJavaElement IWorkbenchWindow isTrue IJavaElement JavaUIMessages getString OpenTypeHierarchyUtil selectionDialog JavaUIMessages getString OpenTypeHierarchyUtil selectionDialog OpenActionUtil selectJavaElement getShell PreferenceConstants OPEN_TYPE_HIERARCHY_IN_PERSPECTIVE PreferenceConstants getPreferenceStore getString PreferenceConstants OPEN_TYPE_HIERARCHY openInPerspective openInViewPart WorkbenchException ExceptionHandler getShell JavaUIMessages getString OpenTypeHierarchyUtil open_perspective getMessage JavaModelException ExceptionHandler getShell JavaUIMessages getString OpenTypeHierarchyUtil open_editor getMessage
private static Type Hierarchy View Part open In View Part I Workbench Window window I Java Element input I Workbench Page page window get Active Page try Type Hierarchy View Part result Type Hierarchy View Part page find View JavaUI ID TYPE HIERARCHY if result null result clear Needed Refresh avoid refresh of old hierarchy on becomes visible result Type Hierarchy View Part page show View JavaUI ID TYPE HIERARCHY result set Input Element input if input instanceof I Member result select Member I Member input return result catch Core Exception e Exception Handler handle e window get Shell JavaUI Messages get String Open Type Hierarchy Util error open view e get Message NON NLS 1 return null  TypeHierarchyViewPart openInViewPart IWorkbenchWindow IJavaElement IWorkbenchPage getActivePage TypeHierarchyViewPart TypeHierarchyViewPart findView ID_TYPE_HIERARCHY clearNeededRefresh TypeHierarchyViewPart showView ID_TYPE_HIERARCHY setInputElement IMember selectMember IMember CoreException ExceptionHandler getShell JavaUIMessages getString OpenTypeHierarchyUtil open_view getMessage
private static Type Hierarchy View Part open In Perspective I Workbench Window window I Java Element input throws Workbench Exception Java Model Exception I Workbench workbench Java Plugin get Default get Workbench The problem is that the input element can be a working copy So we first convert it to the original element if it exists I Java Element perspective Input input if input instanceof I Member if input get Element Type I Java Element TYPE perspective Input I Member input get Declaring Type else perspective Input input I Workbench Page page workbench show Perspective JavaUI ID HIERARCHYPERSPECTIVE window perspective Input Type Hierarchy View Part part Type Hierarchy View Part page find View JavaUI ID TYPE HIERARCHY if part null part clear Needed Refresh avoid refresh of old hierarchy on becomes visible part Type Hierarchy View Part page show View JavaUI ID TYPE HIERARCHY part set Input Element perspective Input if input instanceof I Member part select Member I Member input if page get Editor References length 0 open Editor input false only open when the perspecive has been created return part  TypeHierarchyViewPart openInPerspective IWorkbenchWindow IJavaElement WorkbenchException JavaModelException IWorkbench JavaPlugin getDefault getWorkbench IJavaElement perspectiveInput IMember getElementType IJavaElement perspectiveInput IMember getDeclaringType perspectiveInput IWorkbenchPage showPerspective ID_HIERARCHYPERSPECTIVE perspectiveInput TypeHierarchyViewPart TypeHierarchyViewPart findView ID_TYPE_HIERARCHY clearNeededRefresh TypeHierarchyViewPart showView ID_TYPE_HIERARCHY setInputElement perspectiveInput IMember selectMember IMember getEditorReferences openEditor
private static void open Editor Object input boolean activate throws Part Init Exception Java Model Exception I Editor Part part Editor Utility open In Editor input activate if input instanceof I Java Element Editor Utility reveal In Editor part I Java Element input  openEditor PartInitException JavaModelException IEditorPart EditorUtility openInEditor IJavaElement EditorUtility revealInEditor IJavaElement
Converts the input to a possible input candidates public static I Java Element get Candidates Object input if input instanceof I Java Element return null try I Java Element elem I Java Element input switch elem get Element Type case I Java Element INITIALIZER case I Java Element METHOD case I Java Element FIELD case I Java Element TYPE case I Java Element PACKAGE FRAGMENT ROOT case I Java Element JAVA PROJECT return new I Java Element elem case I Java Element PACKAGE FRAGMENT if I Package Fragment elem contains Java Resources return new I Java Element elem break case I Java Element PACKAGE DECLARATION return new I Java Element elem get Ancestor I Java Element PACKAGE FRAGMENT case I Java Element IMPORT DECLARATION I Import Declaration decl I Import Declaration elem if decl is On Demand elem Java Model Util find Type Container elem get Java Project Signature get Qualifier elem get Element Name else elem elem get Java Project find Type elem get Element Name if elem null return null return new I Java Element elem case I Java Element CLASS FILE return new I Java Element I Class File input get Type case I Java Element COMPILATION UNIT I Compilation Unit cu I Compilation Unit elem get Ancestor I Java Element COMPILATION UNIT if cu null I Type types cu get Types if types length 0 return types break default catch Java Model Exception e Java Plugin log e return null  IJavaElement getCandidates IJavaElement IJavaElement IJavaElement getElementType IJavaElement IJavaElement IJavaElement IJavaElement IJavaElement PACKAGE_FRAGMENT_ROOT IJavaElement JAVA_PROJECT IJavaElement IJavaElement PACKAGE_FRAGMENT IPackageFragment containsJavaResources IJavaElement IJavaElement PACKAGE_DECLARATION IJavaElement getAncestor IJavaElement PACKAGE_FRAGMENT IJavaElement IMPORT_DECLARATION IImportDeclaration IImportDeclaration isOnDemand JavaModelUtil findTypeContainer getJavaProject getQualifier getElementName getJavaProject findType getElementName IJavaElement IJavaElement CLASS_FILE IJavaElement IClassFile getType IJavaElement COMPILATION_UNIT ICompilationUnit ICompilationUnit getAncestor IJavaElement COMPILATION_UNIT IType getTypes JavaModelException JavaPlugin

Returns the standard display to be used The method first checks if the thread calling this method has an associated disaply If so this display is returned Otherwise the method returns the default display public static Display get Standard Display Display display display Display get Current if display null display Display get Default return display  getStandardDisplay getCurrent getDefault
Returns the shell for the given widget If the widget doesn t represent a SWT object that manage a shell code null code is returned return the shell for the given widget public static Shell get Shell Widget widget if widget instanceof Control return Control widget get Shell if widget instanceof Caret return Caret widget get Parent get Shell if widget instanceof Drag Source return Drag Source widget get Control get Shell if widget instanceof Drop Target return Drop Target widget get Control get Shell if widget instanceof Menu return Menu widget get Parent get Shell if widget instanceof Scroll Bar return Scroll Bar widget get Parent get Shell return null  getShell getShell getParent getShell DragSource DragSource getControl getShell DropTarget DropTarget getControl getShell getParent getShell ScrollBar ScrollBar getParent getShell
Returns a width hint for a button control public static int get Button Width Hint Button button button set Font J Face Resources get Dialog Font Pixel Converter converter new Pixel Converter button int width Hint converter convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH return Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x  getButtonWidthHint setFont JFaceResources getDialogFont PixelConverter PixelConverter widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint computeSize
Returns a height hint for a button control public static int get Button Height Hint Button button button set Font J Face Resources get Dialog Font Pixel Converter converter new Pixel Converter button return converter convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT  getButtonHeightHint setFont JFaceResources getDialogFont PixelConverter PixelConverter convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT
Sets width and height hint for the button control b Note b This is a NOP if the button s layout data is not an instance of code Grid Data code param buttonthe button for which to set the dimension hint public static void set Button Dimension Hint Button button Assert is Not Null button Object gd button get Layout Data if gd instanceof Grid Data Grid Data gd height Hint get Button Height Hint button Grid Data gd width Hint get Button Width Hint button Grid Data gd horizontal Alignment Grid Data FILL  GridData setButtonDimensionHint isNotNull getLayoutData GridData GridData heightHint getButtonHeightHint GridData widthHint getButtonWidthHint GridData horizontalAlignment GridData
public static int get Table Height Hint Table table int rows if table get Font equals J Face Resources get Default Font table set Font J Face Resources get Dialog Font int result table get Item Height rows table get Header Height if table get Lines Visible result table get Grid Line Width rows 1 return result  getTableHeightHint getFont JFaceResources getDefaultFont setFont JFaceResources getDialogFont getItemHeight getHeaderHeight getLinesVisible getGridLineWidth

Creates a new image descriptor registry for the current or default display respectively public Image Descriptor Registry this SWT Util get Standard Display  ImageDescriptorRegistry SWTUtil getStandardDisplay
Creates a new image descriptor registry for the given display All images managed by this registry will be disposed when the display gets disposed param display the display the images managed by this registry are allocated for public Image Descriptor Registry Display display f Display display Assert is Not Null f Display hook Display  ImageDescriptorRegistry fDisplay isNotNull fDisplay hookDisplay
Returns the image assiciated with the given image descriptor param descriptor the image descriptor for which the registry manages an image return the image associated with the image descriptor or code null code if the image descriptor can t create the requested image public Image get Image Descriptor descriptor if descriptor null descriptor Image Descriptor get Missing Image Descriptor Image result Image f Registry get descriptor if result null return result Assert is True f Display SWT Util get Standard Display Allocating image for wrong display NON NLS 1 result descriptor create Image if result null f Registry put descriptor result return result  ImageDescriptor ImageDescriptor getMissingImageDescriptor fRegistry isTrue fDisplay SWTUtil getStandardDisplay createImage fRegistry
Disposes all images managed by this registry public void dispose for Iterator iter f Registry values iterator iter has Next Image image Image iter next image dispose f Registry clear  fRegistry hasNext fRegistry
private void hook Display f Display dispose Exec new Runnable public void run dispose  hookDisplay fDisplay disposeExec
private void hook Display f Display dispose Exec new Runnable public void run dispose  hookDisplay fDisplay disposeExec

public Combo Dialog Field int flags super f Text NON NLS 1 f Items new String 0 f Flags flags f Selection Index 1  ComboDialogField fText fItems fFlags fSelectionIndex
public Control do Fill Into Grid Composite parent int n Columns assert Enough Columns n Columns Label label get Label Control parent label set Layout Data grid Data For Label 1 Combo combo get Combo Control parent combo set Layout Data grid Data For Combo n Columns 1 return new Control label combo  doFillIntoGrid nColumns assertEnoughColumns nColumns getLabelControl setLayoutData gridDataForLabel getComboControl setLayoutData gridDataForCombo nColumns
see Dialog Field get Number Of Controls public int get Number Of Controls return 2  DialogField getNumberOfControls getNumberOfControls
protected static Grid Data grid Data For Combo int span Grid Data gd new Grid Data gd horizontal Alignment Grid Data FILL gd grab Excess Horizontal Space false gd horizontal Span span return gd  GridData gridDataForCombo GridData GridData horizontalAlignment GridData grabExcessHorizontalSpace horizontalSpan
public boolean set Focus if is Ok To Use f Combo Control f Combo Control set Focus return true  setFocus isOkToUse fComboControl fComboControl setFocus
assert Composite Not Null parent f Modify Listener new Modify Listener public void modify Text Modify Event e do Modify Text e  assertCompositeNotNull fModifyListener ModifyListener modifyText ModifyEvent doModifyText
Selection Listener selection Listener new Selection Listener public void widget Selected Selection Event e do Selection Changed e  SelectionListener selectionListener SelectionListener widgetSelected SelectionEvent doSelectionChanged
public void widget Default Selected Selection Event e  widgetDefaultSelected SelectionEvent
Creates or returns the created combo control param parent The parent composite or code null code when the widget has already been created public Combo get Combo Control Composite parent if f Combo Control null assert Composite Not Null parent f Modify Listener new Modify Listener public void modify Text Modify Event e do Modify Text e Selection Listener selection Listener new Selection Listener public void widget Selected Selection Event e do Selection Changed e public void widget Default Selected Selection Event e f Combo Control new Combo parent f Flags moved up due to 1GEUNW2 f Combo Control set Items f Items if f Selection Index 1 f Combo Control select f Selection Index else f Combo Control set Text f Text f Combo Control set Font parent get Font f Combo Control add Modify Listener f Modify Listener f Combo Control add Selection Listener selection Listener f Combo Control set Enabled is Enabled return f Combo Control  getComboControl fComboControl assertCompositeNotNull fModifyListener ModifyListener modifyText ModifyEvent doModifyText SelectionListener selectionListener SelectionListener widgetSelected SelectionEvent doSelectionChanged widgetDefaultSelected SelectionEvent fComboControl fFlags fComboControl setItems fItems fSelectionIndex fComboControl fSelectionIndex fComboControl setText fText fComboControl setFont getFont fComboControl addModifyListener fModifyListener fComboControl addSelectionListener selectionListener fComboControl setEnabled isEnabled fComboControl
private void do Modify Text Modify Event e if is Ok To Use f Combo Control f Text f Combo Control get Text f Selection Index f Combo Control get Selection Index dialog Field Changed  doModifyText ModifyEvent isOkToUse fComboControl fText fComboControl getText fSelectionIndex fComboControl getSelectionIndex dialogFieldChanged
private void do Selection Changed Selection Event e if is Ok To Use f Combo Control f Items f Combo Control get Items f Text f Combo Control get Text f Selection Index f Combo Control get Selection Index dialog Field Changed  doSelectionChanged SelectionEvent isOkToUse fComboControl fItems fComboControl getItems fText fComboControl getText fSelectionIndex fComboControl getSelectionIndex dialogFieldChanged
protected void update Enable State super update Enable State if is Ok To Use f Combo Control f Combo Control set Enabled is Enabled  updateEnableState updateEnableState isOkToUse fComboControl fComboControl setEnabled isEnabled
Gets the combo items public String get Items return f Items  getItems fItems
Sets the combo items Triggers a dialog changed event public void set Items String items f Items items if is Ok To Use f Combo Control f Combo Control set Items items dialog Field Changed  setItems fItems isOkToUse fComboControl fComboControl setItems dialogFieldChanged
Gets the text public String get Text return f Text  getText fText
Sets the text Triggers a dialog changed event public void set Text String text f Text text if is Ok To Use f Combo Control f Combo Control set Text text else dialog Field Changed  setText fText isOkToUse fComboControl fComboControl setText dialogFieldChanged
Selects an item public boolean select Item int index boolean success false if is Ok To Use f Combo Control f Combo Control select index success f Combo Control get Selection Index index else if index 0 index f Items length f Text f Items index f Selection Index index success true if success dialog Field Changed return success  selectItem isOkToUse fComboControl fComboControl fComboControl getSelectionIndex fItems fText fItems fSelectionIndex dialogFieldChanged
Selects an item public boolean select Item String name for int i 0 i f Items length i if f Items i equals name return select Item i return false  selectItem fItems fItems selectItem
public int get Selection Index return f Selection Index  getSelectionIndex fSelectionIndex
Sets the text without triggering a dialog changed event public void set Text Without Update String text f Text text if is Ok To Use f Combo Control f Combo Control remove Modify Listener f Modify Listener f Combo Control set Text text f Combo Control add Modify Listener f Modify Listener  setTextWithoutUpdate fText isOkToUse fComboControl fComboControl removeModifyListener fModifyListener fComboControl setText fComboControl addModifyListener fModifyListener
see org eclipse jdt internal ui wizards dialogfields Dialog Field refresh public void refresh super refresh set Text Without Update f Text  DialogField setTextWithoutUpdate fText

public Dialog Field f Enabled true f Label null f Label Text NON NLS 1  DialogField fEnabled fLabel fLabelText
Sets the label of the dialog field public void set Label Text String labeltext f Label Text labeltext if is Ok To Use f Label f Label set Text labeltext  setLabelText fLabelText isOkToUse fLabel fLabel setText
Defines the listener for this dialog field public final void set Dialog Field Listener I Dialog Field Listener listener f Dialog Field Listener listener  setDialogFieldListener IDialogFieldListener fDialogFieldListener
Programatical invocation of a dialog field change public void dialog Field Changed if f Dialog Field Listener null f Dialog Field Listener dialog Field Changed this  dialogFieldChanged fDialogFieldListener fDialogFieldListener dialogFieldChanged
Tries to set the focus to the dialog field Returns code true code if the dialog field can take focus To be reimplemented by dialog field implementors public boolean set Focus return false  setFocus
Posts code set Focus code to the display event queue public void post Set Focus On Dialog Field Display display if display null display async Exec new Runnable public void run set Focus  setFocus postSetFocusOnDialogField asyncExec setFocus
Creates all controls of the dialog field and fills it to a composite The composite is assumed to have code M Grid Layout code as layout The dialog field will adjust its controls spans to the number of columns given To be reimplemented by dialog field implementors public Control do Fill Into Grid Composite parent int n Columns assert Enough Columns n Columns Label label get Label Control parent label set Layout Data grid Data For Label n Columns return new Control label  MGridLayout doFillIntoGrid nColumns assertEnoughColumns nColumns getLabelControl setLayoutData gridDataForLabel nColumns
Returns the number of columns of the dialog field To be reimplemented by dialog field implementors public int get Number Of Controls return 1  getNumberOfControls
protected static Grid Data grid Data For Label int span Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span span return gd  GridData gridDataForLabel GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan
Creates or returns the created label widget param parent The parent composite or code null code if the widget has already been created public Label get Label Control Composite parent if f Label null assert Composite Not Null parent f Label new Label parent SWT LEFT SWT WRAP f Label set Font parent get Font f Label set Enabled f Enabled if f Label Text null equals f Label Text NON NLS 1 f Label set Text f Label Text else XXX to avoid a 16 pixel wide empty label revisit f Label set Text NON NLS 1 f Label set Visible false return f Label  getLabelControl fLabel assertCompositeNotNull fLabel fLabel setFont getFont fLabel setEnabled fEnabled fLabelText fLabelText fLabel setText fLabelText fLabel setText fLabel setVisible fLabel
Creates a spacer control param parent The parent composite public static Control create Empty Space Composite parent return create Empty Space parent 1  createEmptySpace createEmptySpace
Creates a spacer control with the given span The composite is assumed to have code M Grid Layout code as layout param parent The parent composite public static Control create Empty Space Composite parent int span Label label new Label parent SWT LEFT Grid Data gd new Grid Data gd horizontal Alignment Grid Data BEGINNING gd grab Excess Horizontal Space false gd horizontal Span span gd horizontal Indent 0 gd width Hint 0 gd height Hint 0 label set Layout Data gd return label  MGridLayout createEmptySpace GridData GridData horizontalAlignment GridData grabExcessHorizontalSpace horizontalSpan horizontalIndent widthHint heightHint setLayoutData
Tests is the control is not code null code and not disposed protected final boolean is Ok To Use Control control return control null Display get Current null control is Disposed  isOkToUse getCurrent isDisposed
Sets the enable state of the dialog field public final void set Enabled boolean enabled if enabled f Enabled f Enabled enabled update Enable State  setEnabled fEnabled fEnabled updateEnableState
Called when the enable state changed To be extended by dialog field implementors protected void update Enable State if f Label null f Label set Enabled f Enabled  updateEnableState fLabel fLabel setEnabled fEnabled
Brings the UI in sync with the model Only needed when model was changed in different thread whil UI was lready created public void refresh update Enable State  updateEnableState
Gets the enable state of the dialog field public final boolean is Enabled return f Enabled  isEnabled fEnabled
protected final void assert Composite Not Null Composite comp Assert is Not Null comp uncreated control requested with composite null NON NLS 1  assertCompositeNotNull isNotNull
protected final void assert Enough Columns int n Columns Assert is True n Columns get Number Of Controls given number of columns is too small NON NLS 1  assertEnoughColumns nColumns isTrue nColumns getNumberOfControls

public interface I Dialog Field Listener The dialog field has changed void dialog Field Changed Dialog Field field  IDialogFieldListener dialogFieldChanged DialogField

public interface I String Button Adapter void change Control Pressed Dialog Field field  IStringButtonAdapter changeControlPressed DialogField

public String Button Dialog Field I String Button Adapter adapter super f String Button Adapter adapter f Browse Button Label Browse NON NLS 1 f Button Enabled true  StringButtonDialogField IStringButtonAdapter fStringButtonAdapter fBrowseButtonLabel fButtonEnabled
Sets the label of the button public void set Button Label String label f Browse Button Label label  setButtonLabel fBrowseButtonLabel
Programmatical pressing of the button public void change Control Pressed f String Button Adapter change Control Pressed this  changeControlPressed fStringButtonAdapter changeControlPressed
public Control do Fill Into Grid Composite parent int n Columns assert Enough Columns n Columns Label label get Label Control parent label set Layout Data grid Data For Label 1 Text text get Text Control parent text set Layout Data grid Data For Text n Columns 2 Button button get Change Control parent button set Layout Data grid Data For Button button 1 return new Control label text button  doFillIntoGrid nColumns assertEnoughColumns nColumns getLabelControl setLayoutData gridDataForLabel getTextControl setLayoutData gridDataForText nColumns getChangeControl setLayoutData gridDataForButton
see Dialog Field get Number Of Controls public int get Number Of Controls return 3  DialogField getNumberOfControls getNumberOfControls
protected static Grid Data grid Data For Button Button button int span Grid Data gd new Grid Data gd horizontal Alignment Grid Data FILL gd grab Excess Horizontal Space false gd horizontal Span span gd height Hint SWT Util get Button Height Hint button gd width Hint SWT Util get Button Width Hint button return gd  GridData gridDataForButton GridData GridData horizontalAlignment GridData grabExcessHorizontalSpace horizontalSpan heightHint SWTUtil getButtonHeightHint widthHint SWTUtil getButtonWidthHint
f Browse Button set Enabled is Enabled f Button Enabled f Browse Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e change Control Pressed  fBrowseButton setEnabled isEnabled fButtonEnabled fBrowseButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent changeControlPressed
change Control Pressed public void widget Selected Selection Event e change Control Pressed  changeControlPressed widgetSelected SelectionEvent changeControlPressed
Creates or returns the created buttom widget param parent The parent composite or code null code if the widget has already been created public Button get Change Control Composite parent if f Browse Button null assert Composite Not Null parent f Browse Button new Button parent SWT PUSH f Browse Button set Text f Browse Button Label f Browse Button set Enabled is Enabled f Button Enabled f Browse Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e change Control Pressed public void widget Selected Selection Event e change Control Pressed return f Browse Button  getChangeControl fBrowseButton assertCompositeNotNull fBrowseButton fBrowseButton setText fBrowseButtonLabel fBrowseButton setEnabled isEnabled fButtonEnabled fBrowseButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent changeControlPressed widgetSelected SelectionEvent changeControlPressed fBrowseButton
Sets the enable state of the button public void enable Button boolean enable if is Ok To Use f Browse Button f Browse Button set Enabled is Enabled enable f Button Enabled enable  enableButton isOkToUse fBrowseButton fBrowseButton setEnabled isEnabled fButtonEnabled
protected void update Enable State super update Enable State if is Ok To Use f Browse Button f Browse Button set Enabled is Enabled f Button Enabled  updateEnableState updateEnableState isOkToUse fBrowseButton fBrowseButton setEnabled isEnabled fButtonEnabled

private I Content Assist Processor f Content Assist Processor public String Dialog Field super f Text NON NLS 1  IContentAssistProcessor fContentAssistProcessor StringDialogField fText
public void set Content Assist Processor I Content Assist Processor processor f Content Assist Processor processor if f Content Assist Processor null is Ok To Use f Text Control Control Content Assist Helper create Text Content Assistant f Text Control f Content Assist Processor  setContentAssistProcessor IContentAssistProcessor fContentAssistProcessor fContentAssistProcessor isOkToUse fTextControl ControlContentAssistHelper createTextContentAssistant fTextControl fContentAssistProcessor
public I Content Assist Processor get Content Assist Processor return f Content Assist Processor  IContentAssistProcessor getContentAssistProcessor fContentAssistProcessor
public Control do Fill Into Grid Composite parent int n Columns assert Enough Columns n Columns Label label get Label Control parent label set Layout Data grid Data For Label 1 Text text get Text Control parent text set Layout Data grid Data For Text n Columns 1 return new Control label text  doFillIntoGrid nColumns assertEnoughColumns nColumns getLabelControl setLayoutData gridDataForLabel getTextControl setLayoutData gridDataForText nColumns
see Dialog Field get Number Of Controls public int get Number Of Controls return 2  DialogField getNumberOfControls getNumberOfControls
protected static Grid Data grid Data For Text int span Grid Data gd new Grid Data gd horizontal Alignment Grid Data FILL gd grab Excess Horizontal Space false gd horizontal Span span return gd  GridData gridDataForText GridData GridData horizontalAlignment GridData grabExcessHorizontalSpace horizontalSpan
public boolean set Focus if is Ok To Use f Text Control f Text Control set Focus f Text Control set Selection 0 f Text Control get Text length return true  setFocus isOkToUse fTextControl fTextControl setFocus fTextControl setSelection fTextControl getText
assert Composite Not Null parent f Modify Listener new Modify Listener public void modify Text Modify Event e do Modify Text e  assertCompositeNotNull fModifyListener ModifyListener modifyText ModifyEvent doModifyText
Creates or returns the created text control param parent The parent composite or code null code when the widget has already been created public Text get Text Control Composite parent if f Text Control null assert Composite Not Null parent f Modify Listener new Modify Listener public void modify Text Modify Event e do Modify Text e f Text Control new Text parent SWT SINGLE SWT BORDER moved up due to 1GEUNW2 f Text Control set Text f Text f Text Control set Font parent get Font f Text Control add Modify Listener f Modify Listener f Text Control set Enabled is Enabled if f Content Assist Processor null Control Content Assist Helper create Text Content Assistant f Text Control f Content Assist Processor return f Text Control  getTextControl fTextControl assertCompositeNotNull fModifyListener ModifyListener modifyText ModifyEvent doModifyText fTextControl fTextControl setText fText fTextControl setFont getFont fTextControl addModifyListener fModifyListener fTextControl setEnabled isEnabled fContentAssistProcessor ControlContentAssistHelper createTextContentAssistant fTextControl fContentAssistProcessor fTextControl
private void do Modify Text Modify Event e if is Ok To Use f Text Control f Text f Text Control get Text dialog Field Changed  doModifyText ModifyEvent isOkToUse fTextControl fText fTextControl getText dialogFieldChanged
protected void update Enable State super update Enable State if is Ok To Use f Text Control f Text Control set Enabled is Enabled  updateEnableState updateEnableState isOkToUse fTextControl fTextControl setEnabled isEnabled
Gets the text Can not be code null code public String get Text return f Text  getText fText
Sets the text Triggers a dialog changed event public void set Text String text f Text text if is Ok To Use f Text Control f Text Control set Text text else dialog Field Changed  setText fText isOkToUse fTextControl fTextControl setText dialogFieldChanged
Sets the text without triggering a dialog changed event public void set Text Without Update String text f Text text if is Ok To Use f Text Control f Text Control remove Modify Listener f Modify Listener f Text Control set Text text f Text Control add Modify Listener f Modify Listener  setTextWithoutUpdate fText isOkToUse fTextControl fTextControl removeModifyListener fModifyListener fTextControl setText fTextControl addModifyListener fModifyListener
public void refresh super refresh if is Ok To Use f Text Control set Text Without Update f Text  isOkToUse fTextControl setTextWithoutUpdate fText

param accepted Types The types accepted by the validator param allow Multiple Selection If set to code true code the validator allows multiple selection public Typed Element Selection Validator Class accepted Types boolean allow Multiple Selection this accepted Types allow Multiple Selection null  acceptedTypes allowMultipleSelection TypedElementSelectionValidator acceptedTypes allowMultipleSelection acceptedTypes allowMultipleSelection
param accepted Types The types accepted by the validator param allow Multiple Selection If set to code true code the validator allows multiple selection param rejected Elements A list of elements that are not accepted public Typed Element Selection Validator Class accepted Types boolean allow Multiple Selection Collection rejected Elements Assert is Not Null accepted Types f Accepted Types accepted Types f Allow Multiple Selection allow Multiple Selection f Rejected Elements rejected Elements  acceptedTypes allowMultipleSelection rejectedElements TypedElementSelectionValidator acceptedTypes allowMultipleSelection rejectedElements isNotNull acceptedTypes fAcceptedTypes acceptedTypes fAllowMultipleSelection allowMultipleSelection fRejectedElements rejectedElements
public I Status validate Object elements if is Valid elements return fgOK Status return fg Error Status  IStatus isValid fgOKStatus fgErrorStatus
private boolean is Of Accepted Type Object o for int i 0 i f Accepted Types length i if f Accepted Types i is Instance o return true return false  isOfAcceptedType fAcceptedTypes fAcceptedTypes isInstance
private boolean is Rejected Element Object elem return f Rejected Elements null f Rejected Elements contains elem  isRejectedElement fRejectedElements fRejectedElements
private boolean is Valid Object selection if selection length 0 return false if f Allow Multiple Selection selection length 1 return false for int i 0 i selection length i Object o selection i if is Of Accepted Type o is Rejected Element o return false return true  isValid fAllowMultipleSelection isOfAcceptedType isRejectedElement

Creates a filter that only allows elements of gives types param accepted Types The types of accepted elements public Typed Viewer Filter Class accepted Types this accepted Types null  acceptedTypes TypedViewerFilter acceptedTypes acceptedTypes
Creates a filter that only allows elements of gives types but not from a list of rejected elements param accepted Types Accepted elements must be of this types param rejected Elements Element equals to the rejected elements are filtered out public Typed Viewer Filter Class accepted Types Object rejected Elements Assert is Not Null accepted Types f Accepted Types accepted Types f Rejected Elements rejected Elements  acceptedTypes rejectedElements TypedViewerFilter acceptedTypes rejectedElements isNotNull acceptedTypes fAcceptedTypes acceptedTypes fRejectedElements rejectedElements
see Viewer Filter select org eclipse jface viewers Viewer java lang Object java lang Object public boolean select Viewer viewer Object parent Element Object element if f Rejected Elements null for int i 0 i f Rejected Elements length i if element equals f Rejected Elements i return false for int i 0 i f Accepted Types length i if f Accepted Types i is Instance element return true return false  ViewerFilter parentElement fRejectedElements fRejectedElements fRejectedElements fAcceptedTypes fAcceptedTypes isInstance

public static final int STATUS FAILURE 2 A test run has started param test Count the number of individual tests that will be run  STATUS_FAILURE testCount
public void test Run Started int test Count A test run has ended param elapsed Time the total elapsed time of the test run  testRunStarted testCount elapsedTime
public void test Run Ended long elapsed Time A test run has been stopped prematurely param elapsed Time the time elapsed before the test run was stopped  testRunEnded elapsedTime elapsedTime
public void test Run Stopped long elapsed Time An individual test has started param test Id a unique Id identifying the test param test Name the name of the test that started  testRunStopped elapsedTime testId testName
public void test Started String test Id String test Name An individual test has ended param test Id a unique Id identifying the test param test Name the name of the test that ended  testStarted testId testName testId testName
public void test Ended String test Id String test Name An individual test has failed with a stack trace param test Id a unique Id identifying the test param test Name the name of the test that failed param status the outcome of the test one of link STATUS ERROR STATUS ERROR or link STATUS FAILURE STATUS FAILURE param trace the stack trace  testEnded testId testName testId testName STATUS_ERROR STATUS_ERROR STATUS_FAILURE STATUS_FAILURE
public void test Failed int status String test Id String test Name String trace The VM instance performing the tests has terminated public void test Run Terminated  testFailed testId testName testRunTerminated
An individual test has been rerun param test Id a unique Id identifying the test param test Class the name of the test class that was rerun param test Name the name of the test that was rerun param status the outcome of the test that was rerun one of link STATUS OK STATUS OK link STATUS ERROR STATUS ERROR or link STATUS FAILURE STATUS FAILURE param trace the stack trace in the case of abnormal termination or the empty string if none  testId testClass testName STATUS_OK STATUS_OK STATUS_ERROR STATUS_ERROR STATUS_FAILURE STATUS_FAILURE

Adds a listener for test runs param listener listener to be added public static void add Test Run Listener I Test Run Listener listener J Unit Plugin get Default add Test Run Listener listener  addTestRunListener ITestRunListener JUnitPlugin getDefault addTestRunListener
Removes a listener for test runs param listener listener to be removed public static void remove Test Run Listener I Test Run Listener listener J Unit Plugin get Default remove Test Run Listener listener  removeTestRunListener ITestRunListener JUnitPlugin getDefault removeTestRunListener

private I Project ordered Projects Convenience method to get the launch manager return the launch manager protected I Launch Manager get Launch Manager return Debug Plugin get Default get Launch Manager  IProject orderedProjects ILaunchManager getLaunchManager DebugPlugin getDefault getLaunchManager
Throws a core exception with an error status object built from the given message lower level exception and error code param message the status message param exception lower level exception associated with the error or code null code if none param code error code throws Core Exception the abort core exception protected void abort String message Throwable exception int code throws Core Exception throw new Core Exception new Status I Status ERROR Launching Plugin get Unique Identifier code message exception  CoreException CoreException CoreException IStatus LaunchingPlugin getUniqueIdentifier
Returns the VM install specified by the given launch configuration or code null code if none param configuration launch configuration return the VM install specified by the given launch configuration or code null code if none exception Core Exception if unable to retrieve the attribute public IVM Install getVM Install I Launch Configuration configuration throws Core Exception return Java Runtime computeVM Install configuration  CoreException IVMInstall getVMInstall ILaunchConfiguration CoreException JavaRuntime computeVMInstall
Returns the VM install name specified by the given launch configuration or code null code if none param configuration launch configuration return the VM install name specified by the given launch configuration or code null code if none exception Core Exception if unable to retrieve the attribute public String getVM Install Name I Launch Configuration configuration throws Core Exception return configuration get Attribute I Java Launch Configuration Constants ATTR VM INSTALL NAME String null  CoreException getVMInstallName ILaunchConfiguration CoreException getAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_NAME
Returns the VM install type specified by the given launch configuration or code null code if none param configuration launch configuration return the VM install type specified by the given launch configuration or code null code if none exception Core Exception if unable to retrieve the attribute public IVM Install Type getVM Install Type I Launch Configuration configuration throws Core Exception String id getVM Install Type Id configuration if id null IVM Install Type type Java Runtime getVM Install Type id if type null return type return null  CoreException IVMInstallType getVMInstallType ILaunchConfiguration CoreException getVMInstallTypeId IVMInstallType JavaRuntime getVMInstallType
Returns the VM install type identifier specified by the given launch configuration or code null code if none param configuration launch configuration return the VM install type identifier specified by the given launch configuration or code null code if none exception Core Exception if unable to retrieve the attribute public String getVM Install Type Id I Launch Configuration configuration throws Core Exception return configuration get Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE String null  CoreException getVMInstallTypeId ILaunchConfiguration CoreException getAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE
Verifies the VM install specified by the given launch configuration exists and returns the VM install param configuration launch configuration return the VM install specified by the given launch configuration exception Core Exception if unable to retrieve the attribute the attribute is unspecified or if the home location is unspecified or does not exist public IVM Install verifyVM Install I Launch Configuration configuration throws Core Exception IVM Install vm getVM Install configuration if vm null abort Launching Messages get String Abstract Java Launch Configuration Delegate The specified JRE installation does not exist 4 NON NLS 1 null I Java Launch Configuration Constants ERR VM INSTALL DOES NOT EXIST NON NLS 1 File location vm get Install Location if location null abort Message Format format Launching Messages get String Abstract Java Launch Configuration Delegate JRE home directory not specified for  0  5 NON NLS 1 new String vm get Name null I Java Launch Configuration Constants ERR VM INSTALL DOES NOT EXIST NON NLS 1 if location exists abort Message Format format Launching Messages get String Abstract Java Launch Configuration Delegate JRE home directory for  0  does not exist   1  6 NON NLS 1 new String vm get Name location get Absolute Path null I Java Launch Configuration Constants ERR VM INSTALL DOES NOT EXIST NON NLS 1 return vm  CoreException IVMInstall verifyVMInstall ILaunchConfiguration CoreException IVMInstall getVMInstall LaunchingMessages getString AbstractJavaLaunchConfigurationDelegate The_specified_JRE_installation_does_not_exist_4 IJavaLaunchConfigurationConstants ERR_VM_INSTALL_DOES_NOT_EXIST getInstallLocation MessageFormat LaunchingMessages getString AbstractJavaLaunchConfigurationDelegate JRE_home_directory_not_specified_for_ _5 getName IJavaLaunchConfigurationConstants ERR_VM_INSTALL_DOES_NOT_EXIST MessageFormat LaunchingMessages getString AbstractJavaLaunchConfigurationDelegate JRE_home_directory_for_ _does_not_exist__ _6 getName getAbsolutePath IJavaLaunchConfigurationConstants ERR_VM_INSTALL_DOES_NOT_EXIST
Returns the VM connector identifier specified by the given launch configuration or code null code if none param configuration launch configuration return the VM connector identifier specified by the given launch configuration or code null code if none exception Core Exception if unable to retrieve the attribute public String getVM Connector Id I Launch Configuration configuration throws Core Exception return configuration get Attribute I Java Launch Configuration Constants ATTR VM CONNECTOR String null  CoreException getVMConnectorId ILaunchConfiguration CoreException getAttribute IJavaLaunchConfigurationConstants ATTR_VM_CONNECTOR
Returns entries that should appear on the bootstrap portion of the classpath as specified by the given launch configuration as an array of resolved strings The returned array is code null code if all entries are standard i e appear by default or empty to represent an empty bootpath param configuration launch configuration return the bootpath specified by the given launch configuration An empty bootpath is specfied by an empty array and code null code represents a default boothpath exception Core Exception if unable to retrieve the attribute public String get Bootpath I Launch Configuration configuration throws Core Exception String paths get Bootpath Ext configuration String pre paths 0 String main paths 1 String app paths 2 if pre null main null app null default return null I Runtime Classpath Entry entries Java Runtime compute Unresolved Runtime Classpath configuration entries Java Runtime resolve Runtime Classpath entries configuration List boot Entries new Array List entries length boolean empty true boolean all Standard true for int i 0 i entries length i if entries i get Classpath Property I Runtime Classpath Entry USER CLASSES String location entries i get Location if location null empty false boot Entries add location all Standard all Standard entries i get Classpath Property I Runtime Classpath Entry STANDARD CLASSES if empty return new String 0 else if all Standard return null else return String boot Entries to Array new String boot Entries size  CoreException getBootpath ILaunchConfiguration CoreException getBootpathExt IRuntimeClasspathEntry JavaRuntime computeUnresolvedRuntimeClasspath JavaRuntime resolveRuntimeClasspath bootEntries ArrayList allStandard getClasspathProperty IRuntimeClasspathEntry USER_CLASSES getLocation bootEntries allStandard allStandard getClasspathProperty IRuntimeClasspathEntry STANDARD_CLASSES allStandard bootEntries toArray bootEntries
Returns three sets of entries which represent the boot classpath specified in the launch configuration as an array of three arrays of resolved strings The first array represents the classpath that should be prepended to the boot classpath The second array represents the main part of the boot classpath code null code represents the default bootclasspath The third array represents the classpath that should be appended to the boot classpath param configuration launch configuration return a description of the boot classpath specified by the given launch configuration exception Core Exception if unable to retrieve the attribute since 3 0 public String get Bootpath Ext I Launch Configuration configuration throws Core Exception String bootpath Info new String 3 I Runtime Classpath Entry entries Java Runtime compute Unresolved Runtime Classpath configuration List boot Entries Prepend new Array List int index 0 boolean jre Container Found false while jre Container Found index entries length I Runtime Classpath Entry entry entries index if entry get Classpath Property I Runtime Classpath Entry BOOTSTRAP CLASSES entry get Classpath Property I Runtime Classpath Entry STANDARD CLASSES int entry Kind entry get Classpath Entry get Entry Kind String segment0 entry get Path segment 0 if entry Kind I Classpath Entry CPE CONTAINER Java Runtime JRE CONTAINER equals segment0 entry Kind I Classpath Entry CPE VARIABLE Java Runtime JRELIB VARIABLE equals segment0 jre Container Found true else boot Entries Prepend add entry I Runtime Classpath Entry boot Entries Prep Java Runtime resolve Runtime Classpath I Runtime Classpath Entry boot Entries Prepend to Array new I Runtime Classpath Entry boot Entries Prepend size configuration String entries Prep null if boot Entries Prep length 0 entries Prep new String boot Entries Prep length for int i 0 i boot Entries Prep length i entries Prep i boot Entries Prep i get Location if jre Container Found List boot Entries Append new Array List for index entries length index I Runtime Classpath Entry entry entries index if entry get Classpath Property I Runtime Classpath Entry BOOTSTRAP CLASSES boot Entries Append add entry bootpath Info 0 entries Prep I Runtime Classpath Entry boot Entries App Java Runtime resolve Runtime Classpath I Runtime Classpath Entry boot Entries Append to Array new I Runtime Classpath Entry boot Entries Append size configuration if boot Entries App length 0 bootpath Info 2 new String boot Entries App length for int i 0 i boot Entries App length i bootpath Info 2 i boot Entries App i get Location IVM Install install getVM Install configuration Library Location library Locations install get Library Locations if library Locations null non default JRE libaries use explicit bootpath only String bootpath new String boot Entries Prep length library Locations length boot Entries App length if boot Entries Prep length 0 System arraycopy bootpath Info 0 0 bootpath 0 boot Entries Prep length int dest boot Entries Prep length for int i 0 i library Locations length i bootpath dest library Locations i get System Library Path toOS String dest if boot Entries App length 0 System arraycopy bootpath Info 2 0 bootpath dest boot Entries App length bootpath Info 0 null bootpath Info 1 bootpath bootpath Info 2 null else if entries Prep null bootpath Info 1 new String 0 else bootpath Info 1 entries Prep return bootpath Info  CoreException getBootpathExt ILaunchConfiguration CoreException bootpathInfo IRuntimeClasspathEntry JavaRuntime computeUnresolvedRuntimeClasspath bootEntriesPrepend ArrayList jreContainerFound jreContainerFound IRuntimeClasspathEntry getClasspathProperty IRuntimeClasspathEntry BOOTSTRAP_CLASSES getClasspathProperty IRuntimeClasspathEntry STANDARD_CLASSES entryKind getClasspathEntry getEntryKind getPath entryKind IClasspathEntry CPE_CONTAINER JavaRuntime JRE_CONTAINER entryKind IClasspathEntry CPE_VARIABLE JavaRuntime JRELIB_VARIABLE jreContainerFound bootEntriesPrepend IRuntimeClasspathEntry bootEntriesPrep JavaRuntime resolveRuntimeClasspath IRuntimeClasspathEntry bootEntriesPrepend toArray IRuntimeClasspathEntry bootEntriesPrepend entriesPrep bootEntriesPrep entriesPrep bootEntriesPrep bootEntriesPrep entriesPrep bootEntriesPrep getLocation jreContainerFound bootEntriesAppend ArrayList IRuntimeClasspathEntry getClasspathProperty IRuntimeClasspathEntry BOOTSTRAP_CLASSES bootEntriesAppend bootpathInfo entriesPrep IRuntimeClasspathEntry bootEntriesApp JavaRuntime resolveRuntimeClasspath IRuntimeClasspathEntry bootEntriesAppend toArray IRuntimeClasspathEntry bootEntriesAppend bootEntriesApp bootpathInfo bootEntriesApp bootEntriesApp bootpathInfo bootEntriesApp getLocation IVMInstall getVMInstall LibraryLocation libraryLocations getLibraryLocations libraryLocations bootEntriesPrep libraryLocations bootEntriesApp bootEntriesPrep bootpathInfo bootEntriesPrep bootEntriesPrep libraryLocations libraryLocations getSystemLibraryPath toOSString bootEntriesApp bootpathInfo bootEntriesApp bootpathInfo bootpathInfo bootpathInfo entriesPrep bootpathInfo bootpathInfo entriesPrep bootpathInfo
Returns the entries that should appear on the user portion of the classpath as specified by the given launch configuration as an array of resolved strings The returned array is empty if no classpath is specified param configuration launch configuration return the classpath specified by the given launch configuration possibly an empty array exception Core Exception if unable to retrieve the attribute public String get Classpath I Launch Configuration configuration throws Core Exception I Runtime Classpath Entry entries Java Runtime compute Unresolved Runtime Classpath configuration entries Java Runtime resolve Runtime Classpath entries configuration List user Entries new Array List entries length for int i 0 i entries length i if entries i get Classpath Property I Runtime Classpath Entry USER CLASSES String location entries i get Location if location null user Entries add location return String user Entries to Array new String user Entries size  CoreException getClasspath ILaunchConfiguration CoreException IRuntimeClasspathEntry JavaRuntime computeUnresolvedRuntimeClasspath JavaRuntime resolveRuntimeClasspath userEntries ArrayList getClasspathProperty IRuntimeClasspathEntry USER_CLASSES getLocation userEntries userEntries toArray userEntries
Returns the Java project specified by the given launch configuration or code null code if none param configuration launch configuration return the Java project specified by the given launch configuration or code null code if none exception Core Exception if unable to retrieve the attribute public I Java Project get Java Project I Launch Configuration configuration throws Core Exception String project Name get Java Project Name configuration if project Name null project Name project Name trim if project Name length 0 I Project project Resources Plugin get Workspace get Root get Project project Name I Java Project java Project Java Core create project if java Project null java Project exists return java Project return null  CoreException IJavaProject getJavaProject ILaunchConfiguration CoreException projectName getJavaProjectName projectName projectName projectName projectName IProject ResourcesPlugin getWorkspace getRoot getProject projectName IJavaProject javaProject JavaCore javaProject javaProject javaProject
Returns the Java project name specified by the given launch configuration or code null code if none param configuration launch configuration return the Java project name specified by the given launch configuration or code null code if none exception Core Exception if unable to retrieve the attribute public String get Java Project Name I Launch Configuration configuration throws Core Exception return configuration get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME String null  CoreException getJavaProjectName ILaunchConfiguration CoreException getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME
Returns the main type name specified by the given launch configuration or code null code if none param configuration launch configuration return the main type name specified by the given launch configuration or code null code if none exception Core Exception if unable to retrieve the attribute public String get Main Type Name I Launch Configuration configuration throws Core Exception String main Type configuration get Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME String null if main Type null return null return Variables Plugin get Default get String Variable Manager perform String Substitution main Type  CoreException getMainTypeName ILaunchConfiguration CoreException mainType getAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME mainType VariablesPlugin getDefault getStringVariableManager performStringSubstitution mainType
Returns the program arguments specified by the given launch configuration as a string The returned string is empty if no program arguments are specified param configuration launch configuration return the program arguments specified by the given launch configuration possibly an empty string exception Core Exception if unable to retrieve the attribute public String get Program Arguments I Launch Configuration configuration throws Core Exception String arguments configuration get Attribute I Java Launch Configuration Constants ATTR PROGRAM ARGUMENTS NON NLS 1 return Variables Plugin get Default get String Variable Manager perform String Substitution arguments  CoreException getProgramArguments ILaunchConfiguration CoreException getAttribute IJavaLaunchConfigurationConstants ATTR_PROGRAM_ARGUMENTS VariablesPlugin getDefault getStringVariableManager performStringSubstitution
Returns the VM arguments specified by the given launch configuration as a string The returned string is empty if no VM arguments are specified param configuration launch configuration return the VM arguments specified by the given launch configuration possibly an empty string exception Core Exception if unable to retrieve the attribute public String getVM Arguments I Launch Configuration configuration throws Core Exception String arguments configuration get Attribute I Java Launch Configuration Constants ATTR VM ARGUMENTS NON NLS 1 return Variables Plugin get Default get String Variable Manager perform String Substitution arguments  CoreException getVMArguments ILaunchConfiguration CoreException getAttribute IJavaLaunchConfigurationConstants ATTR_VM_ARGUMENTS VariablesPlugin getDefault getStringVariableManager performStringSubstitution
Returns the Map of VM specific attributes specified by the given launch configuration or code null code if none param configuration launch configuration return the code Map code of VM specific attributes exception Core Exception if unable to retrieve the attribute public Map getVM Specific Attributes Map I Launch Configuration configuration throws Core Exception Map map configuration get Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE SPECIFIC ATTRS MAP Map null String paths get Bootpath Ext configuration String pre paths 0 String boot paths 1 String app paths 2 if pre null app null boot null if map null map new Hash Map 3 if pre null map put I Java Launch Configuration Constants ATTR BOOTPATH PREPEND pre if app null map put I Java Launch Configuration Constants ATTR BOOTPATH APPEND app if boot null map put I Java Launch Configuration Constants ATTR BOOTPATH boot return map  CoreException getVMSpecificAttributesMap ILaunchConfiguration CoreException getAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP getBootpathExt HashMap IJavaLaunchConfigurationConstants ATTR_BOOTPATH_PREPEND IJavaLaunchConfigurationConstants ATTR_BOOTPATH_APPEND IJavaLaunchConfigurationConstants ATTR_BOOTPATH
Returns the working directory specified by the given launch configuration or code null code if none param configuration launch configuration return the working directory specified by the given launch configuration or code null code if none exception Core Exception if unable to retrieve the attribute public File get Working Directory I Launch Configuration configuration throws Core Exception return verify Working Directory configuration  CoreException getWorkingDirectory ILaunchConfiguration CoreException verifyWorkingDirectory
Returns the working directory path specified by the given launch configuration or code null code if none param configuration launch configuration return the working directory path specified by the given launch configuration or code null code if none exception Core Exception if unable to retrieve the attribute public I Path get Working Directory Path I Launch Configuration configuration throws Core Exception String path configuration get Attribute I Java Launch Configuration Constants ATTR WORKING DIRECTORY String null if path null path Variables Plugin get Default get String Variable Manager perform String Substitution path return new Path path return null  CoreException IPath getWorkingDirectoryPath ILaunchConfiguration CoreException getAttribute IJavaLaunchConfigurationConstants ATTR_WORKING_DIRECTORY VariablesPlugin getDefault getStringVariableManager performStringSubstitution
Verifies a Java project is specified by the given launch configuration and returns the Java project param configuration launch configuration return the Java project specified by the given launch configuration exception Core Exception if unable to retrieve the attribute or the attribute is unspecified public I Java Project verify Java Project I Launch Configuration configuration throws Core Exception String name get Java Project Name configuration if name null abort Launching Messages get String Abstract Java Launch Configuration Delegate Java project not specified 9 NON NLS 1 null I Java Launch Configuration Constants ERR UNSPECIFIED PROJECT NON NLS 1 I Java Project project get Java Project configuration if project null abort Launching Messages get String Abstract Java Launch Configuration Delegate Project does not exist or is not a Java project 10 NON NLS 1 null I Java Launch Configuration Constants ERR NOT A JAVA PROJECT NON NLS 1 return project  CoreException IJavaProject verifyJavaProject ILaunchConfiguration CoreException getJavaProjectName LaunchingMessages getString AbstractJavaLaunchConfigurationDelegate Java_project_not_specified_9 IJavaLaunchConfigurationConstants ERR_UNSPECIFIED_PROJECT IJavaProject getJavaProject LaunchingMessages getString AbstractJavaLaunchConfigurationDelegate Project_does_not_exist_or_is_not_a_Java_project_10 IJavaLaunchConfigurationConstants ERR_NOT_A_JAVA_PROJECT
Verifies a main type name is specified by the given launch configuration and returns the main type name param configuration launch configuration return the main type name specified by the given launch configuration exception Core Exception if unable to retrieve the attribute or the attribute is unspecified public String verify Main Type Name I Launch Configuration configuration throws Core Exception String name get Main Type Name configuration if name null abort Launching Messages get String Abstract Java Launch Configuration Delegate Main type not specified 11 NON NLS 1 null I Java Launch Configuration Constants ERR UNSPECIFIED MAIN TYPE NON NLS 1 return name  CoreException verifyMainTypeName ILaunchConfiguration CoreException getMainTypeName LaunchingMessages getString AbstractJavaLaunchConfigurationDelegate Main_type_not_specified_11 IJavaLaunchConfigurationConstants ERR_UNSPECIFIED_MAIN_TYPE
Verifies the working directory specified by the given launch configuration exists and returns the working directory or code null code if none is specified param configuration launch configuration return the working directory specified by the given launch configuration or code null code if none exception Core Exception if unable to retrieve the attribute public File verify Working Directory I Launch Configuration configuration throws Core Exception I Path path get Working Directory Path configuration if path null default working dir is the project if this config has a project I Java Project jp get Java Project configuration if jp null I Project p jp get Project return p get Location to File else if path is Absolute File dir new File path toOS String if dir is Directory return dir This may be a workspace relative path returned by a variable However variable paths start with a slash and thus are thought to be absolute I Resource res Resources Plugin get Workspace get Root find Member path if res instanceof I Container res exists return res get Location to File abort Message Format format Launching Messages get String Abstract Java Launch Configuration Delegate Working directory does not exist   0  12 NON NLS 1 new String path to String null I Java Launch Configuration Constants ERR WORKING DIRECTORY DOES NOT EXIST NON NLS 1 else I Resource res Resources Plugin get Workspace get Root find Member path if res instanceof I Container res exists return res get Location to File abort Message Format format Launching Messages get String Abstract Java Launch Configuration Delegate Working directory does not exist   0  12 NON NLS 1 new String path to String null I Java Launch Configuration Constants ERR WORKING DIRECTORY DOES NOT EXIST NON NLS 1 return null  CoreException verifyWorkingDirectory ILaunchConfiguration CoreException IPath getWorkingDirectoryPath IJavaProject getJavaProject IProject getProject getLocation toFile isAbsolute toOSString isDirectory IResource ResourcesPlugin getWorkspace getRoot findMember IContainer getLocation toFile MessageFormat LaunchingMessages getString AbstractJavaLaunchConfigurationDelegate Working_directory_does_not_exist__ _12 toString IJavaLaunchConfigurationConstants ERR_WORKING_DIRECTORY_DOES_NOT_EXIST IResource ResourcesPlugin getWorkspace getRoot findMember IContainer getLocation toFile MessageFormat LaunchingMessages getString AbstractJavaLaunchConfigurationDelegate Working_directory_does_not_exist__ _12 toString IJavaLaunchConfigurationConstants ERR_WORKING_DIRECTORY_DOES_NOT_EXIST
Returns whether the given launch configuration specifies that termination is allowed param configuration launch configuration return whether termination is allowed exception Core Exception if unable to retrieve the attribute public boolean is Allow Terminate I Launch Configuration configuration throws Core Exception return configuration get Attribute I Java Launch Configuration Constants ATTR ALLOW TERMINATE false  CoreException isAllowTerminate ILaunchConfiguration CoreException getAttribute IJavaLaunchConfigurationConstants ATTR_ALLOW_TERMINATE
Returns whether the given launch configuration specifies that execution should suspend on entry of the main method param configuration launch configuration return whether execution should suspend in main exception Core Exception if unable to retrieve the attribute since 2 1 public boolean is Stop In Main I Launch Configuration configuration throws Core Exception return configuration get Attribute I Java Launch Configuration Constants ATTR STOP IN MAIN false  CoreException isStopInMain ILaunchConfiguration CoreException getAttribute IJavaLaunchConfigurationConstants ATTR_STOP_IN_MAIN
Assigns a default source locator to the given launch if a source locator has not yet been assigned to it and the associated launch configuration does not specify a source locator param launch launch object param configuration configuration being launched exception Core Exception if unable to set the source locator protected void set Default Source Locator I Launch launch I Launch Configuration configuration throws Core Exception set default source locator if none specified if launch get Source Locator null I Source Lookup Director source Locator new Java Source Lookup Director source Locator set Source Path Computer get Launch Manager get Source Path Computer org eclipse jdt launching source Lookup java Source Path Computer NON NLS 1 source Locator initialize Defaults configuration launch set Source Locator source Locator  CoreException setDefaultSourceLocator ILaunch ILaunchConfiguration CoreException getSourceLocator ISourceLookupDirector sourceLocator JavaSourceLookupDirector sourceLocator setSourcePathComputer getLaunchManager getSourcePathComputer sourceLookup javaSourcePathComputer sourceLocator initializeDefaults setSourceLocator sourceLocator
Determines if the given launch configuration specifies the stop in main attribute and sets up an event listener to handle the option if required param configuration configuration being launched exception Core Exception if unable to access the attribute since 2 1 protected void prepare Stop In Main I Launch Configuration configuration throws Core Exception if is Stop In Main configuration This listener does not remove itself from the debug plug in as an event listener there is no dispose notification for launch delegates However since there is only one delegate instantiated per config type this is tolerable Debug Plugin get Default add Debug Event Listener this  CoreException prepareStopInMain ILaunchConfiguration CoreException isStopInMain DebugPlugin getDefault addDebugEventListener
Handles the stop in main option param events the debug events see org eclipse debug core I Debug Event Set Listener handle Debug Events Debug Event public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i if event get Kind Debug Event CREATE event get Source instanceof I Java Debug Target I Java Debug Target target I Java Debug Target event get Source I Launch launch target get Launch if launch null I Launch Configuration configuration launch get Launch Configuration if configuration null try if is Stop In Main configuration String main Type get Main Type Name configuration if main Type null Map map new Hash Map map put I Java Launch Configuration Constants ATTR STOP IN MAIN I Java Launch Configuration Constants ATTR STOP IN MAIN I Java Method Breakpoint bp JDI Debug Model create Method Breakpoint Resources Plugin get Workspace get Root main Type main NON NLS 1 Ljava lang String V NON NLS 1 true false false 1 1 1 1 false map NON NLS 1 bp set Persisted false target breakpoint Added bp Debug Plugin get Default remove Debug Event Listener this catch Core Exception e Launching Plugin log e  IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent DebugEvent getKind DebugEvent getSource IJavaDebugTarget IJavaDebugTarget IJavaDebugTarget getSource ILaunch getLaunch ILaunchConfiguration getLaunchConfiguration isStopInMain mainType getMainTypeName mainType HashMap IJavaLaunchConfigurationConstants ATTR_STOP_IN_MAIN IJavaLaunchConfigurationConstants ATTR_STOP_IN_MAIN IJavaMethodBreakpoint JDIDebugModel createMethodBreakpoint ResourcesPlugin getWorkspace getRoot mainType setPersisted breakpointAdded DebugPlugin getDefault removeDebugEventListener CoreException LaunchingPlugin
java lang String protected I Project get Build Order I Launch Configuration configuration String mode throws Core Exception return ordered Projects  IProject getBuildOrder ILaunchConfiguration CoreException orderedProjects
protected I Project get Projects For Problem Search I Launch Configuration configuration String mode throws Core Exception return ordered Projects  IProject getProjectsForProblemSearch ILaunchConfiguration CoreException orderedProjects
see org eclipse debug core model Launch Configuration Delegate is Launch Problem org eclipse core resources I Marker protected boolean is Launch Problem I Marker problem Marker throws Core Exception return super is Launch Problem problem Marker problem Marker get Type equals I Java Model Marker JAVA MODEL PROBLEM MARKER  LaunchConfigurationDelegate isLaunchProblem IMarker isLaunchProblem IMarker problemMarker CoreException isLaunchProblem problemMarker problemMarker getType IJavaModelMarker JAVA_MODEL_PROBLEM_MARKER
public boolean pre Launch Check I Launch Configuration configuration String mode I Progress Monitor monitor throws Core Exception build project list if monitor null monitor sub Task Launching Messages get String Abstract Java Launch Configuration Delegate 20 NON NLS 1 ordered Projects null I Java Project java Project Java Runtime get Java Project configuration if java Project null ordered Projects compute Referenced Build Order new I Project java Project get Project do generic launch checks return super pre Launch Check configuration mode monitor  preLaunchCheck ILaunchConfiguration IProgressMonitor CoreException subTask LaunchingMessages getString AbstractJavaLaunchConfigurationDelegate orderedProjects IJavaProject javaProject JavaRuntime getJavaProject javaProject orderedProjects computeReferencedBuildOrder IProject javaProject getProject preLaunchCheck

Constructs a new VM install paramtype The type of this VM install Must not be code null code paramid The unique identifier of this VM instance Must not be code null code throws Illegal Argument Exceptionif any of the required parameters are code null code public AbstractVM Install IVM Install Type type String id if type null throw new Illegal Argument Exception Launching Messages get String vm Install assert type Not Null NON NLS 1 if id null throw new Illegal Argument Exception Launching Messages get String vm Install assert id Not Null NON NLS 1 f Type type f Id id  paramtypeThe paramidThe throwsIllegalArgumentExceptionif AbstractVMInstall IVMInstallType IllegalArgumentException LaunchingMessages getString vmInstall typeNotNull IllegalArgumentException LaunchingMessages getString vmInstall idNotNull fType fId
see IVM Install get Id public String get Id return f Id  IVMInstall getId getId fId
see IVM Install get Name public String get Name return f Name  IVMInstall getName getName fName
public void set Name String name if name equals f Name Property Change Event event new Property Change Event this IVM Install Changed Listener PROPERTY NAME f Name name f Name name if f Notify Java Runtime fireVM Changed event  setName fName PropertyChangeEvent PropertyChangeEvent IVMInstallChangedListener PROPERTY_NAME fName fName fNotify JavaRuntime fireVMChanged
see IVM Install get Install Location public File get Install Location return f Install Location  IVMInstall getInstallLocation getInstallLocation fInstallLocation
public void set Install Location File install Location if install Location equals f Install Location Property Change Event event new Property Change Event this IVM Install Changed Listener PROPERTY INSTALL LOCATION f Install Location install Location f Install Location install Location if f Notify Java Runtime fireVM Changed event  setInstallLocation installLocation installLocation fInstallLocation PropertyChangeEvent PropertyChangeEvent IVMInstallChangedListener PROPERTY_INSTALL_LOCATION fInstallLocation installLocation fInstallLocation installLocation fNotify JavaRuntime fireVMChanged
see IVM Install getVM Install Type public IVM Install Type getVM Install Type return f Type  IVMInstall getVMInstallType IVMInstallType getVMInstallType fType
see IVM Install getVM Runner String public IVM Runner getVM Runner String mode return null  IVMInstall getVMRunner IVMRunner getVMRunner
see org eclipse jdt launching IVM Install get Library Locations public Library Location get Library Locations return f System Library Descriptions  IVMInstall getLibraryLocations LibraryLocation getLibraryLocations fSystemLibraryDescriptions
public void set Library Locations Library Location locations if locations f System Library Descriptions return Library Location new Locations locations if new Locations null new Locations getVM Install Type get Default Library Locations get Install Location Library Location prev Locations f System Library Descriptions if prev Locations null prev Locations getVM Install Type get Default Library Locations get Install Location if new Locations length prev Locations length int i 0 boolean equal true while i new Locations length equal equal new Locations i equals prev Locations i i if equal no change return Property Change Event event new Property Change Event this IVM Install Changed Listener PROPERTY LIBRARY LOCATIONS prev Locations new Locations f System Library Descriptions locations if f Notify Java Runtime fireVM Changed event  setLibraryLocations LibraryLocation fSystemLibraryDescriptions LibraryLocation newLocations newLocations newLocations getVMInstallType getDefaultLibraryLocations getInstallLocation LibraryLocation prevLocations fSystemLibraryDescriptions prevLocations prevLocations getVMInstallType getDefaultLibraryLocations getInstallLocation newLocations prevLocations newLocations newLocations prevLocations PropertyChangeEvent PropertyChangeEvent IVMInstallChangedListener PROPERTY_LIBRARY_LOCATIONS prevLocations newLocations fSystemLibraryDescriptions fNotify JavaRuntime fireVMChanged
see org eclipse jdt launching IVM Install get Javadoc Location public URL get Javadoc Location return f Javadoc Location  IVMInstall getJavadocLocation getJavadocLocation fJavadocLocation
public void set Javadoc Location URL url if url f Javadoc Location return if url null f Javadoc Location null if url equals f Javadoc Location no change return Property Change Event event new Property Change Event this IVM Install Changed Listener PROPERTY JAVADOC LOCATION f Javadoc Location url f Javadoc Location url if f Notify Java Runtime fireVM Changed event  setJavadocLocation fJavadocLocation fJavadocLocation fJavadocLocation PropertyChangeEvent PropertyChangeEvent IVMInstallChangedListener PROPERTY_JAVADOC_LOCATION fJavadocLocation fJavadocLocation fNotify JavaRuntime fireVMChanged
Whether this VM should fire property change notifications param notify since 2 1 protected void set Notify boolean notify f Notify notify  setNotify fNotify
public boolean equals Object object if object instanceof IVM Install IVM Install vm IVM Install object return getVM Install Type equals vm getVM Install Type get Id equals vm get Id return false  IVMInstall IVMInstall IVMInstall getVMInstallType getVMInstallType getId getId
since 2 1 public int hash Code return getVM Install Type hash Code get Id hash Code  hashCode getVMInstallType hashCode getId hashCode
since 3 0 public String getVM Arguments return fVM Args  getVMArguments fVMArgs
since 3 0 public void setVM Arguments String vm Args fVM Args vm Args  setVMArguments vmArgs fVMArgs vmArgs

Constructs a new VM install type protected AbstractVM Install Type fV Ms new Array List 10  AbstractVMInstallType fVMs ArrayList
see IVM Type getV Ms public IVM Install getVM Installs IVM Install vms new IVM Install fV Ms size return IVM Install fV Ms to Array vms  IVMType getVMs IVMInstall getVMInstalls IVMInstall IVMInstall fVMs IVMInstall fVMs toArray
public void disposeVM Install String id for int i 0 i fV Ms size i IVM Install vm IVM Install fV Ms get i if vm get Id equals id fV Ms remove i Java Runtime fireVM Removed vm return  disposeVMInstall fVMs IVMInstall IVMInstall fVMs getId fVMs JavaRuntime fireVMRemoved
public IVM Install findVM Install String id for int i 0 i fV Ms size i IVM Install vm IVM Install fV Ms get i if vm get Id equals id return vm return null  IVMInstall findVMInstall fVMs IVMInstall IVMInstall fVMs getId
public IVM Install createVM Install String id throws Illegal Argument Exception if findVM Install id null String format Launching Messages get String vm Install Type duplicateVM NON NLS 1 throw new Illegal Argument Exception Message Format format format new String id IVM Install vm do CreateVM Install id fV Ms add vm return vm  IVMInstall createVMInstall IllegalArgumentException findVMInstall LaunchingMessages getString vmInstallType IllegalArgumentException MessageFormat IVMInstall doCreateVMInstall fVMs
Subclasses should return a new instance of the appropriate code IVM Install code subclass from this method paramid The vm s id The code IVM Install code instance that is created must return code id code from its code get Id code method Must not be code null code returnthe newly created IVM Install instance Must not return code null code  IVMInstall paramidThe IVMInstall getId IVMInstall
Initializes the id parameter from the id attribute in the configuration markup Subclasses should not override this method param config the configuration element used to trigger this execution It can be queried by the executable extension for specific configuration properties param property Name the name of an attribute of the configuration element used on the code create Executable Extension String code call This argument can be used in the cases where a single configuration element is used to define multiple executable extensions param data adapter data in the form of a code String code a code Hashtable code or code null code see org eclipse core runtime I Executable Extension set Initialization Data org eclipse core runtime I Configuration Element java lang String java lang Object public void set Initialization Data I Configuration Element config String property Name Object data f Id config get Attribute id NON NLS 1  propertyName createExecutableExtension IExecutableExtension setInitializationData IConfigurationElement setInitializationData IConfigurationElement propertyName fId getAttribute
see IVM Type get Id public String get Id return f Id  IVMType getId getId fId
public IVM Install findVM Install By Name String name for int i 0 i fV Ms size i IVM Install vm IVM Install fV Ms get i if vm get Name equals name return vm return null  IVMInstall findVMInstallByName fVMs IVMInstall IVMInstall fVMs getName
Returns a URL for the default javadoc location of a VM installed at the given home location or code null code if none The default implementation returns code null code subclasses must override as appropriate p Note this method would ideally be added to code IVM Install Type code but it would have been a breaking API change between 2 0 and 2 1 Thus it has been added to the abstract base class that VM install types should subclass p param install Location home location return default javadoc location or code null code since 2 1 public URL get Default Javadoc Location File install Location return null  IVMInstallType installLocation getDefaultJavadocLocation installLocation

Throws a core exception with an error status object built from the given message lower level exception and error code param message the status message param exception lower level exception associated with the error or code null code if none param code error code throws Core Exception The exception encapsulating the reason for the abort protected void abort String message Throwable exception int code throws Core Exception throw new Core Exception new Status I Status ERROR get Plugin Identifier code message exception  CoreException CoreException CoreException IStatus getPluginIdentifier
Returns the identifier of the plug in this VM runner originated from return plug in identifier 
see Debug Plugin exec String File protected Process exec String cmd Line File working Directory throws Core Exception return Debug Plugin exec cmd Line working Directory  DebugPlugin cmdLine workingDirectory CoreException DebugPlugin cmdLine workingDirectory
since 3 0 see Debug Plugin exec String File String protected Process exec String cmd Line File working Directory String envp throws Core Exception return Debug Plugin exec cmd Line working Directory envp  DebugPlugin cmdLine workingDirectory CoreException DebugPlugin cmdLine workingDirectory
Returns the given array of strings as a single space delimited string param cmd Line array of strings return a single space delimited string protected String get Cmd Line As String String cmd Line String Buffer buff new String Buffer for int i 0 num Strings cmd Line length i num Strings i buff append cmd Line i buff append return buff to String trim  cmdLine getCmdLineAsString cmdLine StringBuffer StringBuffer numStrings cmdLine numStrings cmdLine toString
Returns the default process attribute map for Java processes return default process attribute map for Java processes protected Map get Default Process Map Map map new Hash Map map put I Process ATTR PROCESS TYPE I Java Launch Configuration Constants ID JAVA PROCESS TYPE return map  getDefaultProcessMap HashMap IProcess ATTR_PROCESS_TYPE IJavaLaunchConfigurationConstants ID_JAVA_PROCESS_TYPE
Returns a new process aborting if the process could not be created param launch the launch the process is contained in param p the system process to wrap param label the label assigned to the process param attributes values for the attribute map return the new process throws Core Exception problems occurred creating the process since 3 0 protected I Process new Process I Launch launch Process p String label Map attributes throws Core Exception I Process process Debug Plugin new Process launch p label attributes if process null p destroy abort Launching Messages get String AbstractVM Runner 0 null I Java Launch Configuration Constants ERR INTERNAL ERROR NON NLS 1 return process  CoreException IProcess newProcess ILaunch CoreException IProcess DebugPlugin newProcess LaunchingMessages getString AbstractVMRunner IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR
Combines and returns VM arguments specified by the runner configuration with those specified by the VM install if any param configuration runner configuration param vm Install vm install return combined VM arguments specified by the runner confiugration and VM install since 3 0 protected String combine Vm Args VM Runner Configuration configuration IVM Install vm Install String launchVM Args configuration getVM Arguments String vmVM Args vm Install getVM Arguments if vmVM Args null vmVM Args length 0 return launchVM Args String allVM Args new String launchVM Args length vmVM Args length System arraycopy launchVM Args 0 allVM Args 0 launchVM Args length System arraycopy vmVM Args 0 allVM Args launchVM Args length vmVM Args length return allVM Args  vmInstall combineVmArgs VMRunnerConfiguration IVMInstall vmInstall launchVMArgs getVMArguments vmVMArgs vmInstall getVMArguments vmVMArgs vmVMArgs launchVMArgs allVMArgs launchVMArgs vmVMArgs launchVMArgs allVMArgs launchVMArgs vmVMArgs allVMArgs launchVMArgs vmVMArgs allVMArgs

Creates a new execution arguments object param vm Args command line argument string passed to the VM param program Args command line argument string passed to the program public Execution Arguments String vm Args String program Args if vm Args null program Args null throw new Illegal Argument Exception fVM Args vm Args f Program Args program Args  vmArgs programArgs ExecutionArguments vmArgs programArgs vmArgs programArgs IllegalArgumentException fVMArgs vmArgs fProgramArgs programArgs
Returns the VM arguments as one string return the VM arguments as one string public String getVM Arguments return fVM Args  getVMArguments fVMArgs
Returns the program arguments as one string return the program arguments as one string public String get Program Arguments return f Program Args  getProgramArguments fProgramArgs
Returns the VM arguments as an array of individual arguments return the VM arguments as an array of individual arguments public String getVM Arguments Array return parse Arguments fVM Args  getVMArgumentsArray parseArguments fVMArgs
Returns the program arguments as an array of individual arguments return the program arguments as an array of individual arguments public String get Program Arguments Array return parse Arguments f Program Args  getProgramArgumentsArray parseArguments fProgramArgs
private int ch 1 public Argument Parser String args f Args args  ArgumentParser fArgs
public String parse Arguments List v new Array List ch get Next while ch 0 if Character is Whitespace char ch ch get Next else if ch v add parse String else v add parse Token String result new String v size v to Array result return result  parseArguments ArrayList getNext isWhitespace getNext parseString parseToken toArray
private int get Next if f Index f Args length return f Args char At f Index return 1  getNext fIndex fArgs fArgs charAt fIndex
private String parse String String Buffer buf new String Buffer ch get Next while ch 0 ch if ch ch get Next if ch Only escape double quotes buf append else if Platform getOS equals Constants OS WIN32 see Bug 26870 Windows requires an extra escape for embedded strings buf append if ch 0 buf append char ch ch get Next ch get Next return buf to String  parseString StringBuffer StringBuffer getNext getNext OS_WIN32 getNext getNext toString
private String parse Token String Buffer buf new String Buffer while ch 0 Character is Whitespace char ch if ch ch get Next if Character is Whitespace char ch end of token don t lose trailing backslash buf append return buf to String if ch 0 if ch Only escape double quotes buf append else if Platform getOS equals Constants OS WIN32 see Bug 26870 Windows requires an extra escape for embedded strings buf append buf append char ch ch get Next else if ch 1 Don t lose a trailing backslash buf append else if ch buf append parse String else buf append char ch ch get Next return buf to String  parseToken StringBuffer StringBuffer isWhitespace getNext isWhitespace toString OS_WIN32 getNext parseString getNext toString
private static String parse Arguments String args if args null return new String 0 Argument Parser parser new Argument Parser args String res parser parse Arguments return res  parseArguments ArgumentParser ArgumentParser parseArguments

Returns this classpath entry s type The type of a runtime classpath entry is identified by one of the following constants ul li code PROJECT code li li code ARCHIVE code li li code VARIABLE code li li code CONTAINER code li li code OTHER code li ul p Since 3 0 a type of code OTHER code may be returned p return this classpath entry s type 
Returns a memento for this classpath entry p Since 3 0 the memento for a contributed classpath entry i e of type code OTHER code must be in the form of an XML document with the following element structure pre runtime Classpath Entry id example Id memento key1 value1 memento runtime Classpath Entry pre The code id code attribute is the unique identifier of the extension that contributed this runtime classpath entry type via the extension point code org eclipse jdt launching runtime Classpath Entries code The code memento code element will be used to initialize a restored runtime classpath entry via the method code I Runtime Classpath Entry2 initialize From Element memento code The attributes of the code memento code element are client defined p return a memento for this classpath entry exception Core Exception if an exception occurs generating a memento  runtimeClasspathEntry exampleId runtimeClasspathEntry runtimeClasspathEntries IRuntimeClasspathEntry2 initializeFrom CoreException
Returns the path associated with this entry or code null code if none The format of the path returned depends on this entry s type ul li code PROJECT code a workspace relative path to the associated project li li code ARCHIVE code the absolute path of the assoicated archive which may or may not be in the workspace li li code VARIABLE code the path corresponding to the associated classpath variable entry li li code CONTAINER code the path corresponding to the associated classpath container variable entry li li code OTHER code the path returned is client defined li ul p Since 3 0 this method may return code null code p return the path associated with this entry or code null code see org eclipse jdt core I Classpath Entry get Path  IClasspathEntry getPath
Returns the resource associated with this entry or code null code if none A project archive or folder entry may be associated with a resource return the resource associated with this entry or code null code 
Returns the path to the source archive associated with this entry or code null code if this classpath entry has no source attachment p Only archive and variable entries may have source attachments For archive entries the path if present locates a source archive For variable entries the path if present has an analogous form and meaning as the variable path namely the first segment is the name of a classpath variable p return the path to the source archive or code null code if none 
Sets the path to the source archive associated with this entry or code null code if this classpath entry has no source attachment p Only archive and variable entries may have source attachments For archive entries the path refers to a source archive For variable entries the path has an analogous form and meaning as the variable path namely the first segment is the name of a classpath variable p p Note that an empty path code Path EMPTY code is considered code null code p param path the path to the source archive or code null code if none 
Returns the path within the source archive where package fragments are located An empty path indicates that packages are located at the root of the source archive Returns a non code null code value if and only if code get Source Attachment Path code returns a non code null code value return root path within the source archive or code null code if not applicable  getSourceAttachmentPath
Sets the path within the source archive where package fragments are located A root path indicates that packages are located at the root of the source archive Only valid if a source attachment path is also specified p Note that an empty path code Path EMPTY code is considered code null code p param path root path within the source archive or code null code 
Returns a constant indicating where this entry should appear on the runtime classpath by default The value returned is one of the following ul li code STANDARD CLASSES code a standard entry does not need to appear on the runtime classpath li li code BOOTSTRAP CLASSES code a bootstrap entry should appear on the boot path li li code USER CLASSES code a user entry should appear on the path containing user or application classes li ul return where this entry should appear on the runtime classpath  STANDARD_CLASSES BOOTSTRAP_CLASSES USER_CLASSES
Sets whether this entry should appear on the bootstrap classpath the user classpath or whether this entry is a standard bootstrap entry that does not need to appear on the classpath The location is one of ul li code STANDARD CLASSES code a standard entry does not need to appear on the runtime classpath li li code BOOTSTRAP CLASSES code a bootstrap entry should appear on the boot path li li code USER CLASSES code a user entry should appear on the path conatining user or application classes li ul param location a classpat property constant  STANDARD_CLASSES BOOTSTRAP_CLASSES USER_CLASSES
Returns an absolute path in the local file system for this entry or code null code if none or if this entry is of type code CONTAINER code return an absolute path in the local file system for this entry or code null code if none 
Returns an absolute path in the local file system for the source attachment associated with this entry entry or code null code if none return an absolute path in the local file system for the source attachment associated with this entry entry or code null code if none 
Returns a path relative to this entry s source attachment path for the root location containing source or code null code if none return a path relative to this entry s source attachment path for the root location containing source or code null code if none 
Returns the first segment of the path associated with this entry or code null code if this entry is not of type code VARIABLE code or code CONTAINER code return the first segment of the path associated with this entry or code null code if this entry is not of type code VARIABLE code or code CONTAINER code 
Returns a classpath entry equivalent to this runtime classpath entry or code null code if none p Since 3 0 this method may return code null code p return a classpath entry equivalent to this runtime classpath entry or code null code since 2 1 
Returns the Java project associated with this runtime classpath entry or code null code if none Runtime classpath entries of type code CONTAINER code may be associated with a project for the purposes of resolving the entries in a container return the Java project associated with this runtime classpath entry or code null code if none since 3 0 

Initializes this runtime classpath entry from the given memento param memento memento created by a classpath entry of the same type throws Core Exception if unable to initialize from the given memento  CoreException
Returns the unique identifier of the extension that contributed this classpath entry type or code null code if this classpath entry type was not contributed return the unique identifier of the extension that contributed this classpath entry type or code null code if this classpath entry type was not contributed 
Returns whether this classpath entry is composed of other entries return whether this classpath entry is composed of other entries 
Returns the classpath entries this entry is composed of or an empty collection if this entry is not a composite entry param configuration the context launch configuration in which this runtime classpath entry is being queried for contained entries possibly code null code return the classpath entries this entry is composed of or an empty collection if this entry is not a composite entry throws Core Exception if unable to retrieve contained entries  CoreException
Returns a human readable name for this classpath entry return a human readable name for this classpath entry 

Returns resolved runtime classpath entries for the given runtime classpath entry in the context of the given launch configuration param entry runtime classpath entry to resolve of type code VARIABLE code or code CONTAINTER code param configuration the context in which the runtime classpath entry needs to be resolved return resolved entries zero or more exception Core Exception if unable to resolve the entry  CoreException
Returns resolved runtime classpath entries for the given runtime classpath entry in the context of the given Java project param entry runtime classpath entry to resolve of type code VARIABLE code or code CONTAINTER code param project context in which the runtime classpath entry needs to be resolved return resolved entries zero or more exception Core Exception if unable to resolve the entry  CoreException
Returns a VM install associated with the given classpath entry or code null code if none param entry classpath entry return vm install associated with entry or code null code if none exception Core Exception if unable to resolve a VM  CoreException

Computes and returns an unresolved classpath for the given launch configuration Variable and container entries are not resolved param configuration launch configuration return unresolved path exception Core Exception if unable to compute a path  CoreException
Returns the resolved path corresponding to the given path in the context of the given launch configuration Variable and container entries are resolved The returned resolved path need not have the same number of entries as the given unresolved path param entries entries to resolve param configuration launch configuration context to resolve in return resolved path exception Core Exception if unable to resolve a path  CoreException

Returns whether this container is a duplicate of the conatiner identified by the given path param container Path the container to compare against return whether this container is a duplicate of the conatiner identified by the given path  containerPath

Establishes a JDI connection with a debuggable VM using the arguments specified in the given map contributing results debug targets and processes to the given launch param arguments Argument map to use in establishing a connection The keys of the map are strings corresponding to the names of arguments returned by this connector s code get Default Agruments code method The values of the map are strings corresponding to the String values of the asscoiated code com sun jdi connect Connector Argument code s to use param monitor progress monitor param launch launch to contribute debug target s and or process es to exception Core Exception if unable to establish a connection with the target VM  getDefaultAgruments CoreException
Returns the name of this connector return the name of this connector 
Returns a unique indentifier for this kind of connector return a unique indentifier for this kind of connector 
Returns a map of default arguments used by this connector The keys of the map are names of arguments used by this connector and the values are of type code com sun jdi connect Connector Argument code return argument map with default values exception Core Exception if unable to retrieve a default argument map  CoreException
Returns a list of argument names found in this connector s default argument map defining the order in which arguments should be presented to the user Since a map is not ordered this provides control on how arguments will be presented to the user return list of argument names 

public interface IVM Install Returns a VM runner that runs this installed VM in the given mode param mode the mode the VM should be launched in one of the constants declared in code org eclipse debug core I Launch Manager code return a VM Runner for a given mode May return code null code if the given mode is not supported by this VM see org eclipse debug core I Launch Manager  IVMInstall ILaunchManager VMRunner ILaunchManager
IVM Runner getVM Runner String mode Returns the id for this VM VM ids are unique within the V Ms of a given VM type The VM id is not intended to be presented to users return the VM identifier Must not return code null code  IVMRunner getVMRunner VMs
String get Id Returns the display name of this VM The VM name is intended to be presented to users return the display name of this VM May return code null code  getId
String get Name Sets the display name of this VM The VM name is intended to be presented to users param name the display name of this VM  getName
void set Name String name Returns the root directory of the install location of this VM return the root directory of this VM installation May return code null code  setName
File get Install Location Sets the root directory of the install location of this VM param install Location the root directory of this VM installation  getInstallLocation installLocation
Returns the VM type of this VM return the VM type that created this IVM Install instance  IVMInstall
Returns the library locations of this IVM Install Generally clients should use code Java Runtime get Library Locations IVM Install code to determine the libraries associated with this VM install see IVM Install set Library Locations Library Location return The library locations of this IVM Install Returns code null code to indicate that this VM install uses the default library locations associated with this VM s install type since 2 0  IVMInstall JavaRuntime getLibraryLocations IVMInstall IVMInstall setLibraryLocations LibraryLocation IVMInstall
Sets the library locations of this IVM Install paramlocations The code Library Location code s to associate with this IVM Install May be code null code to indicate that this VM install uses the default library locations associated with this VM s install type since 2 0  IVMInstall LibraryLocation IVMInstall
Sets the Javadoc location associated with this VM install param url a url pointing to the Javadoc location associated with this VM install since 2 0 
Returns the Javadoc location associated with this VM install return a url pointing to the Javadoc location associated with this VM install or code null code if none since 2 0 
Returns VM arguments to be used with this vm install whenever this VM is launched or code null code if none return VM arguments to be used with this vm install whenever this VM is launched or code null code if none since 3 0 
Sets VM arguments to be used with this vm install whenever this VM is launched possibly code null code param vm Args VM arguments to be used with this vm install whenever this VM is launched possibly code null code since 3 0  vmArgs

Notification that the workspace default VM install has changed param previous the VM install that was previously assigned to the workspace possibly code null code param current the VM install that is currently assigned to the workspace possibly code null code 
Notification that a property of a VM install has changed param event event describing the change The VM that has changed is the source object associated with the event 
Notification that a VM has been created param vm the vm that has been created 
Notification that a VM has been disposed param vm the vm that has been disposed 

public interface IVM Install Type Creates a new instance of this VM Install type The newly created IVM Install is managed by this IVM Install Type paramid An id String that must be unique within this IVM Install Type return the newly created VM instance throws Illegal Argument Exception If the id exists already  IVMInstallType IVMInstall IVMInstallType paramidAn IVMInstallType throwsIllegalArgumentExceptionIf
IVM Install createVM Install String id Finds the VM with the given id param id the VM id return a VM instance or code null code if not found  IVMInstall createVMInstall
IVM Install findVM Install String id Finds the VM with the given name param name the VM name return a VM instance or code null code if not found since 2 0  IVMInstall findVMInstall
Remove the VM associated with the given id from the set of V Ms managed by this VM type Has no effect if a VM with the given id is not currently managed by this type A VM install that is disposed may not be used anymore param id the id of the VM to be disposed  VMs
void disposeVM Install String id Returns all VM instances managed by this VM type return the list of VM instances managed by this VM type  disposeVMInstall
IVM Install getVM Installs Returns the display name of this VM type return the name of this IVM Install Type  IVMInstall getVMInstalls IVMInstallType
Returns the globally unique id of this VM type Clients are reponsible for providing a unique id return the id of this IVM Install Type  IVMInstallType
String get Id Validates the given location of a VM installation p For example an implementation might check whether the VM executeable is present p param install Location the root directory of a potential installation for this type of VM return a status object describing whether the install location is valid  getId installLocation
Tries to detect an installed VM that matches this VM install type Typically this method will detect the VM installation the Eclipse platform runs on Implementers should return code null code if they can t assure that a given vm install matches this IVM Install Type return The location of an VM installation that can be used with this VM install type or code null code if unable to locate an installed VM  IVMInstallType
Returns a collection of code Library Location code s that represent the default system libraries of this VM install type if a VM was installed at the given code install Location code The returned code Library Location code s may not exist if the code install Location code is not a valid install location param install Location home location see Library Location see IVM Install Type validate Install Location File return default library locations based on the given code install Location code since 2 0  LibraryLocation installLocation LibraryLocation installLocation installLocation LibraryLocation IVMInstallType validateInstallLocation installLocation

Launches a Java VM as specified in the given configuration contributing results debug targets and processes to the given launch param configuration the configuration settings for this run param launch the launch to contribute to param monitor progress monitor or code null code exception Core Exception if an exception occurs while launching  CoreException

This class contains only static methods and is not intended to be instantiated private Java Runtime  JavaRuntime
private static synchronized void initializeVM Types I Extension Point extension Point Platform get Extension Registry get Extension Point Launching Plugin ID PLUGIN vm Install Types NON NLS 1 I Configuration Element configs extension Point get Configuration Elements Multi Status status new Multi Status Launching Plugin get Unique Identifier I Status OK Launching Messages get String Java Runtime exception Occurred null NON NLS 1 fgVM Types new IVM Install Type configs length for int i 0 i configs length i try IVM Install Type vm Type IVM Install Type configs i create Executable Extension class NON NLS 1 fgVM Types i vm Type catch Core Exception e status add e get Status if status isOK only happens on a Core Exception Launching Plugin log status cleanup null entries in fgVM Types List temp new Array List fgVM Types length for int i 0 i fgVM Types length i if fgVM Types i null temp add fgVM Types i fgVM Types new IVM Install Type temp size fgVM Types IVM Install Type temp to Array fgVM Types try initializeVM Configuration catch IO Exception e Launching Plugin log e catch Parser Configuration Exception e Launching Plugin log e catch Transformer Exception e Launching Plugin log e  initializeVMTypes IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint LaunchingPlugin ID_PLUGIN vmInstallTypes IConfigurationElement extensionPoint getConfigurationElements MultiStatus MultiStatus LaunchingPlugin getUniqueIdentifier IStatus LaunchingMessages getString JavaRuntime exceptionOccurred fgVMTypes IVMInstallType IVMInstallType vmType IVMInstallType createExecutableExtension fgVMTypes vmType CoreException getStatus CoreException LaunchingPlugin fgVMTypes ArrayList fgVMTypes fgVMTypes fgVMTypes fgVMTypes fgVMTypes IVMInstallType fgVMTypes IVMInstallType toArray fgVMTypes initializeVMConfiguration IOException LaunchingPlugin ParserConfigurationException LaunchingPlugin TransformerException LaunchingPlugin
Returns the VM assigned to build the given Java project The project must exist The VM assigned to a project is determined from its build path param project the project to retrieve the VM from return the VM instance that is assigned to build the given Java project Returns code null code if no VM is referenced on the project s build path throws Core Exception if unable to determine the project s VM install public static IVM Install getVM Install I Java Project project throws Core Exception check the classpath IVM Install vm null I Classpath Entry classpath project get Raw Classpath I Runtime Classpath Entry Resolver resolver null for int i 0 i classpath length i I Classpath Entry entry classpath i switch entry get Entry Kind case I Classpath Entry CPE VARIABLE resolver get Variable Resolver entry get Path segment 0 if resolver null vm resolver resolveVM Install entry break case I Classpath Entry CPE CONTAINER resolver get Container Resolver entry get Path segment 0 if resolver null vm resolver resolveVM Install entry break if vm null return vm return null  CoreException IVMInstall getVMInstall IJavaProject CoreException IVMInstall IClasspathEntry getRawClasspath IRuntimeClasspathEntryResolver IClasspathEntry getEntryKind IClasspathEntry CPE_VARIABLE getVariableResolver getPath resolveVMInstall IClasspathEntry CPE_CONTAINER getContainerResolver getPath resolveVMInstall
Returns the VM install type with the given unique id param id the VM install type unique id return The VM install type for the given id or code null code if no VM install type with the given id is registered public static IVM Install Type getVM Install Type String id IVM Install Type vm Types getVM Install Types for int i 0 i vm Types length i if vm Types i get Id equals id return vm Types i return null  returnThe IVMInstallType getVMInstallType IVMInstallType vmTypes getVMInstallTypes vmTypes vmTypes getId vmTypes
Sets a VM as the system wide default VM and notifies registered VM install change listeners of the change param vm The vm to make the default May be code null code to clear the default param monitor progress monitor or code null code public static void set DefaultVM Install IVM Install vm I Progress Monitor monitor throws Core Exception set DefaultVM Install vm monitor true  vmThe setDefaultVMInstall IVMInstall IProgressMonitor CoreException setDefaultVMInstall
Sets a VM as the system wide default VM and notifies registered VM install change listeners of the change param vm The vm to make the default May be code null code to clear the default param monitor progress monitor or code null code param save Preference If code true code update workbench preferences to reflect the new default VM since 2 1 public static void set DefaultVM Install IVM Install vm I Progress Monitor monitor boolean save Preference throws Core Exception IVM Install previous null if fg DefaultVM Id null previous getVM From Composite Id fg DefaultVM Id fg DefaultVM Id get Composite Id FromVM vm if save Preference saveVM Configuration IVM Install current null if fg DefaultVM Id null current getVM From Composite Id fg DefaultVM Id if previous current notify DefaultVM Changed previous current  vmThe savePreference setDefaultVMInstall IVMInstall IProgressMonitor savePreference CoreException IVMInstall fgDefaultVMId getVMFromCompositeId fgDefaultVMId fgDefaultVMId getCompositeIdFromVM savePreference saveVMConfiguration IVMInstall fgDefaultVMId getVMFromCompositeId fgDefaultVMId notifyDefaultVMChanged
Sets a VM connector as the system wide default VM This setting is persisted when saveVM Configuration is called paramconnector The connector to make the default May be code null code to clear the default param monitor The progress monitor to use since 2 0 throws Core Exception Thrown if saving the new default setting fails public static void set DefaultVM Connector IVM Connector connector I Progress Monitor monitor throws Core Exception fg DefaultVM Connector Id connector get Identifier saveVM Configuration  saveVMConfiguration CoreException setDefaultVMConnector IVMConnector IProgressMonitor CoreException fgDefaultVMConnectorId getIdentifier saveVMConfiguration
Return the default VM set with code set DefaultVM code return Returns the default VM May return code null code when no default VM was set or when the default VM has been disposed public static IVM Install get DefaultVM Install IVM Install install getVM From Composite Id get DefaultVM Id if install null install get Install Location exists return install if the default JRE goes missing re detect if install null install getVM Install Type disposeVM Install install get Id fg DefaultVM Id null re detect detect DefaultVM update VM prefs try saveVM Configuration catch Core Exception e Launching Plugin log e return getVM From Composite Id get DefaultVM Id  setDefaultVM returnReturns IVMInstall getDefaultVMInstall IVMInstall getVMFromCompositeId getDefaultVMId getInstallLocation getVMInstallType disposeVMInstall getId fgDefaultVMId detectDefaultVM saveVMConfiguration CoreException LaunchingPlugin getVMFromCompositeId getDefaultVMId
Return the default VM connector return Returns the default VM connector since 2 0 public static IVM Connector get DefaultVM Connector String id get DefaultVM Connector Id IVM Connector connector null if id null connector getVM Connector id if connector null connector new Socket Attach Connector return connector  returnReturns IVMConnector getDefaultVMConnector getDefaultVMConnectorId IVMConnector getVMConnector SocketAttachConnector
Returns the list of registered VM types VM types are registered via code org eclipse jdt launching vm Types code extension point Returns an empty list if there are no registered VM types return the list of registered VM types public static synchronized IVM Install Type getVM Install Types if fgVM Types null initializeVM Types return fgVM Types  vmTypes IVMInstallType getVMInstallTypes fgVMTypes initializeVMTypes fgVMTypes
private static synchronized String get DefaultVM Id if fgVM Types null initializeVM Types return fg DefaultVM Id  getDefaultVMId fgVMTypes initializeVMTypes fgDefaultVMId
private static synchronized String get DefaultVM Connector Id if fgVM Types null initializeVM Types return fg DefaultVM Connector Id  getDefaultVMConnectorId fgVMTypes initializeVMTypes fgDefaultVMConnectorId
Returns a String that uniquely identifies the specified VM across all VM types param vm the instance of IVM Install Type to be indentified since 2 1 public static String get Composite Id FromVM IVM Install vm if vm null return null IVM Install Type vm Type vm getVM Install Type String typeID vm Type get Id Composite Id id new Composite Id new String typeID vm get Id return id to String  IVMInstallType getCompositeIdFromVM IVMInstall IVMInstallType vmType getVMInstallType vmType getId CompositeId CompositeId getId toString
Return the VM corrseponding to the specified composite Id The id uniquely identifies a VM across all vm types param id String the composite id that specifies an instance of IVM Install since 2 1 public static IVM Install getVM From Composite Id String id String if id String null id String length 0 return null Composite Id id Composite Id from String id String if id get Part Count 2 IVM Install Type vm Type getVM Install Type id get 0 if vm Type null return vm Type findVM Install id get 1 return null  idString IVMInstall IVMInstall getVMFromCompositeId idString idString idString CompositeId CompositeId fromString idString getPartCount IVMInstallType vmType getVMInstallType vmType vmType findVMInstall
Returns a new runtime classpath entry for the given expression that may contain string substitution variable references The resulting expression refers to an archive jar or directory containing class files param expression an expression that resolves to the location of an archive return runtime classpath entry since 3 0 public static I Runtime Classpath Entry new String Variable Classpath Entry String expression return new Variable Classpath Entry expression  IRuntimeClasspathEntry newStringVariableClasspathEntry VariableClasspathEntry
Returns a new runtime classpath entry containing the default classpath for the specified Java project param project Java project return runtime classpath entry since 3 0 public static I Runtime Classpath Entry new Default Project Classpath Entry I Java Project project return new Default Project Classpath Entry project  IRuntimeClasspathEntry newDefaultProjectClasspathEntry IJavaProject DefaultProjectClasspathEntry
Returns a new runtime classpath entry for the given project param project Java project return runtime classpath entry since 2 0 public static I Runtime Classpath Entry new Project Runtime Classpath Entry I Java Project project I Classpath Entry cpe Java Core new Project Entry project get Project get Full Path return new Runtime Classpath Entry cpe  IRuntimeClasspathEntry newProjectRuntimeClasspathEntry IJavaProject IClasspathEntry JavaCore newProjectEntry getProject getFullPath newRuntimeClasspathEntry
Returns a new runtime classpath entry for the given archive param resource archive resource return runtime classpath entry since 2 0 public static I Runtime Classpath Entry new Archive Runtime Classpath Entry I Resource resource I Classpath Entry cpe Java Core new Library Entry resource get Full Path null null return new Runtime Classpath Entry cpe  IRuntimeClasspathEntry newArchiveRuntimeClasspathEntry IResource IClasspathEntry JavaCore newLibraryEntry getFullPath newRuntimeClasspathEntry
Returns a new runtime classpath entry for the given archive possibly external param path absolute path to an archive return runtime classpath entry since 2 0 public static I Runtime Classpath Entry new Archive Runtime Classpath Entry I Path path I Classpath Entry cpe Java Core new Library Entry path null null return new Runtime Classpath Entry cpe  IRuntimeClasspathEntry newArchiveRuntimeClasspathEntry IPath IClasspathEntry JavaCore newLibraryEntry newRuntimeClasspathEntry
Returns a new runtime classpath entry for the classpath variable with the given path param path variable path first segment is the name of the variable trailing segments are appended to the resolved variable value return runtime classpath entry since 2 0 public static I Runtime Classpath Entry new Variable Runtime Classpath Entry I Path path I Classpath Entry cpe Java Core new Variable Entry path null null return new Runtime Classpath Entry cpe  IRuntimeClasspathEntry newVariableRuntimeClasspathEntry IPath IClasspathEntry JavaCore newVariableEntry newRuntimeClasspathEntry
Returns a runtime classpath entry for the given container path with the given classpath property param path container path param classpath Property the type of entry one of code USER CLASSES code code BOOTSTRAP CLASSES code or code STANDARD CLASSES code return runtime classpath entry exception Core Exception if unable to construct a runtime classpath entry since 2 0 public static I Runtime Classpath Entry new Runtime Container Classpath Entry I Path path int classpath Property throws Core Exception return new Runtime Container Classpath Entry path classpath Property null  classpathProperty USER_CLASSES BOOTSTRAP_CLASSES STANDARD_CLASSES CoreException IRuntimeClasspathEntry newRuntimeContainerClasspathEntry IPath classpathProperty CoreException newRuntimeContainerClasspathEntry classpathProperty
Returns a runtime classpath entry for the given container path with the given classpath property to be resolved in the context of the given Java project param path container path param classpath Property the type of entry one of code USER CLASSES code code BOOTSTRAP CLASSES code or code STANDARD CLASSES code param project Java project context used for resolution or code null code if to be resolved in the context of the launch configuration this entry is referenced in return runtime classpath entry exception Core Exception if unable to construct a runtime classpath entry since 3 0 public static I Runtime Classpath Entry new Runtime Container Classpath Entry I Path path int classpath Property I Java Project project throws Core Exception I Classpath Entry cpe Java Core new Container Entry path Runtime Classpath Entry entry new Runtime Classpath Entry cpe classpath Property entry set Java Project project return entry  classpathProperty USER_CLASSES BOOTSTRAP_CLASSES STANDARD_CLASSES CoreException IRuntimeClasspathEntry newRuntimeContainerClasspathEntry IPath classpathProperty IJavaProject CoreException IClasspathEntry JavaCore newContainerEntry RuntimeClasspathEntry RuntimeClasspathEntry classpathProperty setJavaProject
Returns a runtime classpath entry constructed from the given memento param memento a memento for a runtime classpath entry return runtime classpath entry exception Core Exception if unable to construct a runtime classpath entry since 2 0 public static I Runtime Classpath Entry new Runtime Classpath Entry String memento throws Core Exception try Element root null Document Builder parser Launching Plugin get Parser String Reader reader new String Reader memento Input Source source new Input Source reader root parser parse source get Document Element String id root get Attribute id NON NLS 1 if id null id length 0 assume an old format return new Runtime Classpath Entry root get the extension create a new one I Runtime Classpath Entry2 entry Launching Plugin get Default new Runtime Classpath Entry id Node List list root get Child Nodes for int i 0 i list get Length i Node node list item i if node get Node Type Node ELEMENT NODE Element element Element node if memento equals element get Node Name NON NLS 1 entry initialize From element return entry catch SAX Exception e abort Launching Messages get String Java Runtime 31 e NON NLS 1 catch IO Exception e abort Launching Messages get String Java Runtime 32 e NON NLS 1 return null  CoreException IRuntimeClasspathEntry newRuntimeClasspathEntry CoreException DocumentBuilder LaunchingPlugin getParser StringReader StringReader InputSource InputSource getDocumentElement getAttribute RuntimeClasspathEntry IRuntimeClasspathEntry2 LaunchingPlugin getDefault newRuntimeClasspathEntry NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName initializeFrom SAXException LaunchingMessages getString JavaRuntime IOException LaunchingMessages getString JavaRuntime
Returns a runtime classpath entry that corresponds to the given classpath entry The classpath entry may not be of type code CPE SOURCE code or code CPE CONTAINER code param entry a classpath entry return runtime classpath entry since 2 0 private static I Runtime Classpath Entry new Runtime Classpath Entry I Classpath Entry entry return new Runtime Classpath Entry entry  CPE_SOURCE CPE_CONTAINER IRuntimeClasspathEntry newRuntimeClasspathEntry IClasspathEntry RuntimeClasspathEntry
Computes and returns the default unresolved runtime claspath for the given project return runtime classpath entries exception Core Exception if unable to compute the runtime classpath see I Runtime Classpath Entry since 2 0 public static I Runtime Classpath Entry compute Unresolved Runtime Classpath I Java Project project throws Core Exception I Classpath Entry entries project get Raw Classpath List classpath Entries new Array List 3 for int i 0 i entries length i I Classpath Entry entry entries i switch entry get Entry Kind case I Classpath Entry CPE CONTAINER I Classpath Container container Java Core get Classpath Container entry get Path project if container null switch container get Kind case I Classpath Container K APPLICATION don t look at application entries break case I Classpath Container K DEFAULT SYSTEM classpath Entries add new Runtime Container Classpath Entry container get Path I Runtime Classpath Entry STANDARD CLASSES project break case I Classpath Container K SYSTEM classpath Entries add new Runtime Container Classpath Entry container get Path I Runtime Classpath Entry BOOTSTRAP CLASSES project break break case I Classpath Entry CPE VARIABLE if JRELIB VARIABLE equals entry get Path segment 0 I Runtime Classpath Entry jre new Variable Runtime Classpath Entry entry get Path jre set Classpath Property I Runtime Classpath Entry STANDARD CLASSES classpath Entries add jre break default break classpath Entries add new Default Project Classpath Entry project return I Runtime Classpath Entry classpath Entries to Array new I Runtime Classpath Entry classpath Entries size  CoreException IRuntimeClasspathEntry IRuntimeClasspathEntry computeUnresolvedRuntimeClasspath IJavaProject CoreException IClasspathEntry getRawClasspath classpathEntries ArrayList IClasspathEntry getEntryKind IClasspathEntry CPE_CONTAINER IClasspathContainer JavaCore getClasspathContainer getPath getKind IClasspathContainer K_APPLICATION IClasspathContainer K_DEFAULT_SYSTEM classpathEntries newRuntimeContainerClasspathEntry getPath IRuntimeClasspathEntry STANDARD_CLASSES IClasspathContainer K_SYSTEM classpathEntries newRuntimeContainerClasspathEntry getPath IRuntimeClasspathEntry BOOTSTRAP_CLASSES IClasspathEntry CPE_VARIABLE JRELIB_VARIABLE getPath IRuntimeClasspathEntry newVariableRuntimeClasspathEntry getPath setClasspathProperty IRuntimeClasspathEntry STANDARD_CLASSES classpathEntries classpathEntries newDefaultProjectClasspathEntry IRuntimeClasspathEntry classpathEntries toArray IRuntimeClasspathEntry classpathEntries
Computes and returns the unresolved source lookup path for the given launch configuration param configuration launch configuration return runtime classpath entries exception Core Exception if unable to compute the source lookup path since 2 0 public static I Runtime Classpath Entry compute Unresolved Source Lookup Path I Launch Configuration configuration throws Core Exception return get Source Lookup Path Provider configuration compute Unresolved Classpath configuration  CoreException IRuntimeClasspathEntry computeUnresolvedSourceLookupPath ILaunchConfiguration CoreException getSourceLookupPathProvider computeUnresolvedClasspath
Resolves the given source lookup path returning the resolved source lookup path in the context of the given launch configuration param entries unresolved entries param configuration launch configuration return resolved entries exception Core Exception if unable to resolve the source lookup path since 2 0 public static I Runtime Classpath Entry resolve Source Lookup Path I Runtime Classpath Entry entries I Launch Configuration configuration throws Core Exception return get Source Lookup Path Provider configuration resolve Classpath entries configuration  CoreException IRuntimeClasspathEntry resolveSourceLookupPath IRuntimeClasspathEntry ILaunchConfiguration CoreException getSourceLookupPathProvider resolveClasspath
Returns the classpath provider for the given launch configuration param configuration launch configuration return classpath provider exception Core Exception if unable to resolve the path provider since 2 0 public static I Runtime Classpath Provider get Classpath Provider I Launch Configuration configuration throws Core Exception String provider Id configuration get Attribute I Java Launch Configuration Constants ATTR CLASSPATH PROVIDER String null I Runtime Classpath Provider provider null if provider Id null provider fg Default Classpath Provider else provider I Runtime Classpath Provider get Classpath Providers get provider Id if provider null abort Message Format format Launching Messages get String Java Runtime 26 new String provider Id null NON NLS 1 return provider  CoreException IRuntimeClasspathProvider getClasspathProvider ILaunchConfiguration CoreException providerId getAttribute IJavaLaunchConfigurationConstants ATTR_CLASSPATH_PROVIDER IRuntimeClasspathProvider providerId fgDefaultClasspathProvider IRuntimeClasspathProvider getClasspathProviders providerId MessageFormat LaunchingMessages getString JavaRuntime providerId
Returns the source lookup path provider for the given launch configuration param configuration launch configuration return source lookup path provider exception Core Exception if unable to resolve the path provider since 2 0 public static I Runtime Classpath Provider get Source Lookup Path Provider I Launch Configuration configuration throws Core Exception String provider Id configuration get Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER String null I Runtime Classpath Provider provider null if provider Id null provider fg Default Source Path Provider else provider I Runtime Classpath Provider get Classpath Providers get provider Id if provider null abort Message Format format Launching Messages get String Java Runtime 27 new String provider Id null NON NLS 1 return provider  CoreException IRuntimeClasspathProvider getSourceLookupPathProvider ILaunchConfiguration CoreException providerId getAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER IRuntimeClasspathProvider providerId fgDefaultSourcePathProvider IRuntimeClasspathProvider getClasspathProviders providerId MessageFormat LaunchingMessages getString JavaRuntime providerId
Returns resolved entries for the given entry in the context of the given launch configuration If the entry is of kind code VARIABLE code or code CONTAINER code variable and contanier resolvers are consulted If the entry is of kind code PROJECT code and the associated Java project specifies non default output locations the corresponding output locations are returned Otherwise the given entry is returned p If the given entry is a variable entry and a resolver is not registered the entry itself is returned If the given entry is a container and a resolver is not registered resolved runtime classpath entries are calculated from the associated container classpath entries in the context of the project associated with the given launch configuration p param entry runtime classpath entry param configuration launch configuration return resolved runtime classpath entry exception Core Exception if unable to resolve see I Runtime Classpath Entry Resolver since 2 0 public static I Runtime Classpath Entry resolve Runtime Classpath Entry I Runtime Classpath Entry entry I Launch Configuration configuration throws Core Exception switch entry get Type case I Runtime Classpath Entry PROJECT if the project has multiple output locations they must be returned I Resource resource entry get Resource if resource instanceof I Project I Project p I Project resource I Java Project project Java Core create p if project null p is Open project exists return new I Runtime Classpath Entry 0 I Runtime Classpath Entry entries resolve Output Locations project entry get Classpath Property if entries null return entries else could not resolve project abort Message Format format Launching Messages get String Java Runtime Classpath references non existant project   0  3 new String entry get Path last Segment null NON NLS 1 break case I Runtime Classpath Entry VARIABLE I Runtime Classpath Entry Resolver resolver get Variable Resolver entry get Variable Name if resolver null I Runtime Classpath Entry resolved resolve Variable Entry entry null configuration if resolved null return resolved break return resolver resolve Runtime Classpath Entry entry configuration case I Runtime Classpath Entry CONTAINER resolver get Container Resolver entry get Variable Name if resolver null return compute Default Container Entries entry configuration return resolver resolve Runtime Classpath Entry entry configuration case I Runtime Classpath Entry ARCHIVE verify the archive exists String location entry get Location if location null abort Message Format format Launching Messages get String Java Runtime Classpath references non existant archive   0  4 new String entry get Path to String null NON NLS 1 File file new File location if file exists abort Message Format format Launching Messages get String Java Runtime Classpath references non existant archive   0  4 new String entry get Path to String null NON NLS 1 break case I Runtime Classpath Entry OTHER resolver get Contributed Resolver I Runtime Classpath Entry2 entry get Type Id return resolver resolve Runtime Classpath Entry entry configuration default break return new I Runtime Classpath Entry entry  CoreException IRuntimeClasspathEntryResolver IRuntimeClasspathEntry resolveRuntimeClasspathEntry IRuntimeClasspathEntry ILaunchConfiguration CoreException getType IRuntimeClasspathEntry IResource getResource IProject IProject IProject IJavaProject JavaCore isOpen IRuntimeClasspathEntry IRuntimeClasspathEntry resolveOutputLocations getClasspathProperty MessageFormat LaunchingMessages getString JavaRuntime Classpath_references_non existant_project__ _3 getPath lastSegment IRuntimeClasspathEntry IRuntimeClasspathEntryResolver getVariableResolver getVariableName IRuntimeClasspathEntry resolveVariableEntry resolveRuntimeClasspathEntry IRuntimeClasspathEntry getContainerResolver getVariableName computeDefaultContainerEntries resolveRuntimeClasspathEntry IRuntimeClasspathEntry getLocation MessageFormat LaunchingMessages getString JavaRuntime Classpath_references_non existant_archive__ _4 getPath toString MessageFormat LaunchingMessages getString JavaRuntime Classpath_references_non existant_archive__ _4 getPath toString IRuntimeClasspathEntry getContributedResolver IRuntimeClasspathEntry2 getTypeId resolveRuntimeClasspathEntry IRuntimeClasspathEntry
Default resolution for a classpath variable resolve to an archive Only one of project configuration can be non null param entry param project the project context or code null code param configuration configuration context or code null code return I Runtime Classpath Entry throws Core Exception private static I Runtime Classpath Entry resolve Variable Entry I Runtime Classpath Entry entry I Java Project project I Launch Configuration configuration throws Core Exception default resolution an archive I Path arch Path Java Core get Classpath Variable entry get Variable Name if arch Path null if entry get Path segment Count 1 arch Path arch Path append entry get Path remove First Segments 1 I Path src Path null I Path src Var entry get Source Attachment Path I Path src Root Path null I Path src Root Var entry get Source Attachment Root Path if arch Path null arch Path is Empty if src Var null src Var is Empty src Path Java Core get Classpath Variable src Var segment 0 if src Path null if src Var segment Count 1 src Path src Path append src Var remove First Segments 1 if src Root Var null src Root Var is Empty src Root Path Java Core get Classpath Variable src Root Var segment 0 if src Root Path null if src Root Var segment Count 1 src Root Path src Root Path append src Root Var remove First Segments 1 now resolve the archive recursively I Classpath Entry arch Entry Java Core new Library Entry arch Path src Path src Root Path entry get Classpath Entry is Exported I Runtime Classpath Entry runtime Arch Entry new Runtime Classpath Entry arch Entry runtime Arch Entry set Classpath Property entry get Classpath Property if configuration null return resolve Runtime Classpath Entry runtime Arch Entry project return resolve Runtime Classpath Entry runtime Arch Entry configuration return null  IRuntimeClasspathEntry CoreException IRuntimeClasspathEntry resolveVariableEntry IRuntimeClasspathEntry IJavaProject ILaunchConfiguration CoreException IPath archPath JavaCore getClasspathVariable getVariableName archPath getPath segmentCount archPath archPath getPath removeFirstSegments IPath srcPath IPath srcVar getSourceAttachmentPath IPath srcRootPath IPath srcRootVar getSourceAttachmentRootPath archPath archPath isEmpty srcVar srcVar isEmpty srcPath JavaCore getClasspathVariable srcVar srcPath srcVar segmentCount srcPath srcPath srcVar removeFirstSegments srcRootVar srcRootVar isEmpty srcRootPath JavaCore getClasspathVariable srcRootVar srcRootPath srcRootVar segmentCount srcRootPath srcRootPath srcRootVar removeFirstSegments IClasspathEntry archEntry JavaCore newLibraryEntry archPath srcPath srcRootPath getClasspathEntry isExported IRuntimeClasspathEntry runtimeArchEntry newRuntimeClasspathEntry archEntry runtimeArchEntry setClasspathProperty getClasspathProperty resolveRuntimeClasspathEntry runtimeArchEntry resolveRuntimeClasspathEntry runtimeArchEntry
Returns runtime classpath entries corresponding to the output locations of the given project or null if the project only uses the default output location param project param classpath Property the type of classpath entries to create return I Runtime Classpath Entry or code null code throws Core Exception private static I Runtime Classpath Entry resolve Output Locations I Java Project project int classpath Property throws Core Exception List non Default new Array List if project exists project get Project is Open I Classpath Entry entries project get Raw Classpath for int i 0 i entries length i I Classpath Entry classpath Entry entries i if classpath Entry get Entry Kind I Classpath Entry CPE SOURCE I Path path classpath Entry get Output Location if path null non Default add path if non Default is Empty return null add the default location if not already included I Path def project get Output Location if non Default contains def non Default add def I Runtime Classpath Entry locations new I Runtime Classpath Entry non Default size for int i 0 i locations length i I Classpath Entry new Entry Java Core new Library Entry I Path non Default get i null null locations i new Runtime Classpath Entry new Entry locations i set Classpath Property classpath Property return locations  classpathProperty IRuntimeClasspathEntry CoreException IRuntimeClasspathEntry resolveOutputLocations IJavaProject classpathProperty CoreException nonDefault ArrayList getProject isOpen IClasspathEntry getRawClasspath IClasspathEntry classpathEntry classpathEntry getEntryKind IClasspathEntry CPE_SOURCE IPath classpathEntry getOutputLocation nonDefault nonDefault isEmpty IPath getOutputLocation nonDefault nonDefault IRuntimeClasspathEntry IRuntimeClasspathEntry nonDefault IClasspathEntry newEntry JavaCore newLibraryEntry IPath nonDefault RuntimeClasspathEntry newEntry setClasspathProperty classpathProperty
Returns resolved entries for the given entry in the context of the given Java project If the entry is of kind code VARIABLE code or code CONTAINER code variable and contanier resolvers are consulted If the entry is of kind code PROJECT code and the associated Java project specifies non default output locations the corresponding output locations are returned Otherwise the given entry is returned p If the given entry is a variable entry and a resolver is not registered the entry itself is returned If the given entry is a container and a resolver is not registered resolved runtime classpath entries are calculated from the associated container classpath entries in the context of the given project p param entry runtime classpath entry param project Java project context return resolved runtime classpath entry exception Core Exception if unable to resolve see I Runtime Classpath Entry Resolver since 2 0 public static I Runtime Classpath Entry resolve Runtime Classpath Entry I Runtime Classpath Entry entry I Java Project project throws Core Exception switch entry get Type case I Runtime Classpath Entry PROJECT if the project has multiple output locations they must be returned I Resource resource entry get Resource if resource instanceof I Project I Project p I Project resource I Java Project jp Java Core create p if jp null p is Open jp exists I Runtime Classpath Entry entries resolve Output Locations jp entry get Classpath Property if entries null return entries else return new I Runtime Classpath Entry 0 break case I Runtime Classpath Entry VARIABLE I Runtime Classpath Entry Resolver resolver get Variable Resolver entry get Variable Name if resolver null I Runtime Classpath Entry resolved resolve Variable Entry entry project null if resolved null return resolved break return resolver resolve Runtime Classpath Entry entry project case I Runtime Classpath Entry CONTAINER resolver get Container Resolver entry get Variable Name if resolver null return compute Default Container Entries entry project return resolver resolve Runtime Classpath Entry entry project case I Runtime Classpath Entry OTHER resolver get Contributed Resolver I Runtime Classpath Entry2 entry get Type Id return resolver resolve Runtime Classpath Entry entry project default break return new I Runtime Classpath Entry entry  CoreException IRuntimeClasspathEntryResolver IRuntimeClasspathEntry resolveRuntimeClasspathEntry IRuntimeClasspathEntry IJavaProject CoreException getType IRuntimeClasspathEntry IResource getResource IProject IProject IProject IJavaProject JavaCore isOpen IRuntimeClasspathEntry resolveOutputLocations getClasspathProperty IRuntimeClasspathEntry IRuntimeClasspathEntry IRuntimeClasspathEntryResolver getVariableResolver getVariableName IRuntimeClasspathEntry resolveVariableEntry resolveRuntimeClasspathEntry IRuntimeClasspathEntry getContainerResolver getVariableName computeDefaultContainerEntries resolveRuntimeClasspathEntry IRuntimeClasspathEntry getContributedResolver IRuntimeClasspathEntry2 getTypeId resolveRuntimeClasspathEntry IRuntimeClasspathEntry
Performs default resolution for a container entry Delegates to the Java model private static I Runtime Classpath Entry compute Default Container Entries I Runtime Classpath Entry entry I Launch Configuration config throws Core Exception I Java Project project entry get Java Project if project null project get Java Project config return compute Default Container Entries entry project  IRuntimeClasspathEntry computeDefaultContainerEntries IRuntimeClasspathEntry ILaunchConfiguration CoreException IJavaProject getJavaProject getJavaProject computeDefaultContainerEntries
Performs default resolution for a container entry Delegates to the Java model private static I Runtime Classpath Entry compute Default Container Entries I Runtime Classpath Entry entry I Java Project project throws Core Exception if project null entry null cannot resolve without entry or project context return new I Runtime Classpath Entry 0 I Classpath Container container Java Core get Classpath Container entry get Path project if container null abort Message Format format Launching Messages get String Java Runtime Could not resolve classpath container   0  1 new String entry get Path to String null NON NLS 1 execution will not reach here exception will be thrown return null I Classpath Entry cpes container get Classpath Entries int property 1 switch container get Kind case I Classpath Container K APPLICATION property I Runtime Classpath Entry USER CLASSES break case I Classpath Container K DEFAULT SYSTEM property I Runtime Classpath Entry STANDARD CLASSES break case I Classpath Container K SYSTEM property I Runtime Classpath Entry BOOTSTRAP CLASSES break List resolved new Array List cpes length for int i 0 i cpes length i I Classpath Entry cpe cpes i if cpe get Entry Kind I Classpath Entry CPE PROJECT I Project p Resources Plugin get Workspace get Root get Project cpe get Path segment 0 I Java Project jp Java Core create p I Runtime Classpath Entry classpath new Default Project Classpath Entry jp I Runtime Classpath Entry entries resolve Runtime Classpath Entry classpath jp for int j 0 j entries length j I Runtime Classpath Entry e entries j if resolved contains e resolved add entries j else I Runtime Classpath Entry e new Runtime Classpath Entry cpe if resolved contains e resolved add e set classpath property I Runtime Classpath Entry result new I Runtime Classpath Entry resolved size for int i 0 i result length i result i I Runtime Classpath Entry resolved get i result i set Classpath Property property return result  IRuntimeClasspathEntry computeDefaultContainerEntries IRuntimeClasspathEntry IJavaProject CoreException IRuntimeClasspathEntry IClasspathContainer JavaCore getClasspathContainer getPath MessageFormat LaunchingMessages getString JavaRuntime Could_not_resolve_classpath_container__ _1 getPath toString IClasspathEntry getClasspathEntries getKind IClasspathContainer K_APPLICATION IRuntimeClasspathEntry USER_CLASSES IClasspathContainer K_DEFAULT_SYSTEM IRuntimeClasspathEntry STANDARD_CLASSES IClasspathContainer K_SYSTEM IRuntimeClasspathEntry BOOTSTRAP_CLASSES ArrayList IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT IProject ResourcesPlugin getWorkspace getRoot getProject getPath IJavaProject JavaCore IRuntimeClasspathEntry newDefaultProjectClasspathEntry IRuntimeClasspathEntry resolveRuntimeClasspathEntry IRuntimeClasspathEntry IRuntimeClasspathEntry newRuntimeClasspathEntry IRuntimeClasspathEntry IRuntimeClasspathEntry IRuntimeClasspathEntry setClasspathProperty
Computes and returns the unresolved class path for the given launch configuration Variable and container entries are unresolved param configuration launch configuration return unresolved runtime classpath entries exception Core Exception if unable to compute the classpath since 2 0 public static I Runtime Classpath Entry compute Unresolved Runtime Classpath I Launch Configuration configuration throws Core Exception return get Classpath Provider configuration compute Unresolved Classpath configuration  CoreException IRuntimeClasspathEntry computeUnresolvedRuntimeClasspath ILaunchConfiguration CoreException getClasspathProvider computeUnresolvedClasspath
Resolves the given classpath returning the resolved classpath in the context of the given launch configuration param entries unresolved classpath param configuration launch configuration return resolved runtime classpath entries exception Core Exception if unable to compute the classpath since 2 0 public static I Runtime Classpath Entry resolve Runtime Classpath I Runtime Classpath Entry entries I Launch Configuration configuration throws Core Exception return get Classpath Provider configuration resolve Classpath entries configuration  CoreException IRuntimeClasspathEntry resolveRuntimeClasspath IRuntimeClasspathEntry ILaunchConfiguration CoreException getClasspathProvider resolveClasspath
Return the code I Java Project code referenced in the specified configuration or code null code if none exception Core Exception if the referenced Java project does not exist since 2 0 public static I Java Project get Java Project I Launch Configuration configuration throws Core Exception String project Name configuration get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME String null if project Name null project Name trim length 1 return null I Java Project java Project get Java Model get Java Project project Name if java Project null java Project get Project exists java Project get Project is Open abort Message Format format Launching Messages get String Java Runtime 28 new String configuration get Name project Name I Java Launch Configuration Constants ERR PROJECT CLOSED null NON NLS 1 if java Project null java Project exists abort Message Format format Launching Messages get String Java Runtime Launch configuration  0  references non existing project  1  1 new String configuration get Name project Name I Java Launch Configuration Constants ERR NOT A JAVA PROJECT null NON NLS 1 return java Project  IJavaProject CoreException IJavaProject getJavaProject ILaunchConfiguration CoreException projectName getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME projectName projectName IJavaProject javaProject getJavaModel getJavaProject projectName javaProject javaProject getProject javaProject getProject isOpen MessageFormat LaunchingMessages getString JavaRuntime getName projectName IJavaLaunchConfigurationConstants ERR_PROJECT_CLOSED javaProject javaProject MessageFormat LaunchingMessages getString JavaRuntime Launch_configuration_ _references_non existing_project_ _1 getName projectName IJavaLaunchConfigurationConstants ERR_NOT_A_JAVA_PROJECT javaProject
Convenience method to get the java model private static I Java Model get Java Model return Java Core create Resources Plugin get Workspace get Root  IJavaModel getJavaModel JavaCore ResourcesPlugin getWorkspace getRoot
Returns the VM install for the given launch configuration The VM install is determined in the following prioritized way ol li The VM install is explicitly specified on the launch configuration via the code ATTR VM INSTALL TYPE code and code ATTR VM INSTALL ID code attributes li li If no explicit VM install is specified the VM install associated with the launch confiugration s project is returned li li If no project is specified or the project does not specify a custom VM install the workspace default VM install is returned li ol param configuration launch configuration return vm install exception Core Exception if unable to compute a vm install since 2 0 public static IVM Install computeVM Install I Launch Configuration configuration throws Core Exception String type configuration get Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE String null if type null I Java Project proj get Java Project configuration if proj null IVM Install vm getVM Install proj if vm null return vm else IVM Install Type vt getVM Install Type type if vt null error type does not exist abort Message Format format Launching Messages get String Java Runtime Specified VM install type does not exist   0  2 new String type null NON NLS 1 IVM Install vm null look for a name String name configuration get Attribute I Java Launch Configuration Constants ATTR VM INSTALL NAME String null if name null error type specified without a specific install could be an old config that specified a VM ID log the error but choose the default VM I Status status new Status I Status WARNING Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR UNSPECIFIED VM INSTALL Message Format format Launching Messages get String Java Runtime VM not fully specified in launch configuration  0    missing VM name  Reverting to default VM  1 new String configuration get Name null NON NLS 1 Launching Plugin log status return get DefaultVM Install vm vt findVM Install By Name name if vm null error install not found abort Message Format format Launching Messages get String Java Runtime Specified VM install not found  type  0  name  1  2 new String vt get Name name null NON NLS 1 else return vm return get DefaultVM Install  ATTR_VM_INSTALL_TYPE ATTR_VM_INSTALL_ID CoreException IVMInstall computeVMInstall ILaunchConfiguration CoreException getAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE IJavaProject getJavaProject IVMInstall getVMInstall IVMInstallType getVMInstallType MessageFormat LaunchingMessages getString JavaRuntime Specified_VM_install_type_does_not_exist__ _2 IVMInstall getAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_NAME IStatus IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_UNSPECIFIED_VM_INSTALL MessageFormat LaunchingMessages getString JavaRuntime VM_not_fully_specified_in_launch_configuration_ _ _missing_VM_name _Reverting_to_default_VM _1 getName LaunchingPlugin getDefaultVMInstall findVMInstallByName MessageFormat LaunchingMessages getString JavaRuntime Specified_VM_install_not_found__type_ _name_ _2 getName getDefaultVMInstall
Throws a core exception with an internal error status param message the status message param exception lower level exception associated with the error or code null code if none private static void abort String message Throwable exception throws Core Exception abort message I Java Launch Configuration Constants ERR INTERNAL ERROR exception  CoreException IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR
Throws a core exception with an internal error status param message the status message param code status code param exception lower level exception associated with the error or code null code if none private static void abort String message int code Throwable exception throws Core Exception throw new Core Exception new Status I Status ERROR Launching Plugin get Unique Identifier code message exception  CoreException CoreException IStatus LaunchingPlugin getUniqueIdentifier
Computes the default application classpath entries for the given project paramjproject The project to compute the classpath for return The computed classpath May be empty but not null throws Core Exception if unable to compute the default classpath public static String compute Default Runtime Class Path I Java Project jproject throws Core Exception I Runtime Classpath Entry unresolved compute Unresolved Runtime Classpath jproject 1 remove bootpath entries 2 resolve translate to local file system paths List resolved new Array List unresolved length for int i 0 i unresolved length i I Runtime Classpath Entry entry unresolved i if entry get Classpath Property I Runtime Classpath Entry USER CLASSES I Runtime Classpath Entry entries resolve Runtime Classpath Entry entry jproject for int j 0 j entries length j String location entries j get Location if location null resolved add location return String resolved to Array new String resolved size  returnThe throwsCoreException computeDefaultRuntimeClassPath IJavaProject CoreException IRuntimeClasspathEntry computeUnresolvedRuntimeClasspath ArrayList IRuntimeClasspathEntry getClasspathProperty IRuntimeClasspathEntry USER_CLASSES IRuntimeClasspathEntry resolveRuntimeClasspathEntry getLocation toArray
Saves the VM configuration information to the preferences This includes the following information ul li The list of all defined IVM Install instances li li The default VM li ul This state will be read again upon first access to VM configuration information public static void saveVM Configuration throws Core Exception if fgVM Types null if the VM types have not been instantiated there can be no changes return try String xml getV Ms AsXML get Preferences set Value PREF VM XML xml save Preferences catch IO Exception e throw new Core Exception new Status I Status ERROR Launching Plugin get Unique Identifier I Status ERROR Launching Messages get String Java Runtime exceptions Occurred e NON NLS 1 catch Parser Configuration Exception e throw new Core Exception new Status I Status ERROR Launching Plugin get Unique Identifier I Status ERROR Launching Messages get String Java Runtime exceptions Occurred e NON NLS 1 catch Transformer Exception e throw new Core Exception new Status I Status ERROR Launching Plugin get Unique Identifier I Status ERROR Launching Messages get String Java Runtime exceptions Occurred e NON NLS 1  IVMInstall saveVMConfiguration CoreException fgVMTypes getVMsAsXML getPreferences setValue PREF_VM_XML savePreferences IOException CoreException IStatus LaunchingPlugin getUniqueIdentifier IStatus LaunchingMessages getString JavaRuntime exceptionsOccurred ParserConfigurationException CoreException IStatus LaunchingPlugin getUniqueIdentifier IStatus LaunchingMessages getString JavaRuntime exceptionsOccurred TransformerException CoreException IStatus LaunchingPlugin getUniqueIdentifier IStatus LaunchingMessages getString JavaRuntime exceptionsOccurred
Job pref Job new Job Launching Messages get String Java Runtime 0 NON NLS 1 protected I Status run I Progress Monitor monitor Launching Plugin get Default get Plugin Preferences set Value PREF VM XML vm DefXML Launching Plugin get Default save Plugin Preferences return Status OK STATUS  prefJob LaunchingMessages getString JavaRuntime IStatus IProgressMonitor LaunchingPlugin getDefault getPluginPreferences setValue PREF_VM_XML vmDefXML LaunchingPlugin getDefault savePluginPreferences OK_STATUS
Write out the specified String as the new value of the VM definitions preference and save all preferences private static void saveVM Definitions final String vm DefXML Job pref Job new Job Launching Messages get String Java Runtime 0 NON NLS 1 protected I Status run I Progress Monitor monitor Launching Plugin get Default get Plugin Preferences set Value PREF VM XML vm DefXML Launching Plugin get Default save Plugin Preferences return Status OK STATUS pref Job set System true pref Job schedule  saveVMDefinitions vmDefXML prefJob LaunchingMessages getString JavaRuntime IStatus IProgressMonitor LaunchingPlugin getDefault getPluginPreferences setValue PREF_VM_XML vmDefXML LaunchingPlugin getDefault savePluginPreferences OK_STATUS prefJob setSystem prefJob
private static String getV Ms AsXML throws IO Exception Parser Configuration Exception Transformer Exception VM Definitions Container container new VM Definitions Container container set DefaultVM Install CompositeID get DefaultVM Id container set DefaultVM Install Connector TypeID get DefaultVM Connector Id IVM Install Type vm Types getVM Install Types for int i 0 i vm Types length i IVM Install vms vm Types i getVM Installs for int j 0 j vms length j IVM Install install vms j container addVM install return container get AsXML  getVMsAsXML IOException ParserConfigurationException TransformerException VMDefinitionsContainer VMDefinitionsContainer setDefaultVMInstallCompositeID getDefaultVMId setDefaultVMInstallConnectorTypeID getDefaultVMConnectorId IVMInstallType vmTypes getVMInstallTypes vmTypes IVMInstall vmTypes getVMInstalls IVMInstall getAsXML
This method loads the set of installed JR Es This definition is stored in the workbench preferences however older workspaces may store this information in a meta data file In both cases the V Ms are described as an XML document If neither the preference nor the meta data file is found the file system is searched for V Ms private static void initializeVM Configuration throws Parser Configuration Exception IO Exception Transformer Exception Try retrieving the VM preferences from the preference store String vmXML String get Preferences get String PREF VM XML If the preference was found load V Ms from it into memory if vmXML String length 0 try Byte Array Input Stream input Stream new Byte Array Input Stream vmXML String get Bytes VM Definitions Container vm Defs VM Definitions Container parseXML Into Container input Stream loadVM Defs Into Memory vm Defs catch IO Exception ioe Launching Plugin log ioe else Otherwise look for the old file that previously held the VM defs I Path state Location Launching Plugin get Default get State Location I Path state File state Location append vm Configuration xml NON NLS 1 File file new File state File toOS String VM Definitions Container vm Defs null if file exists If file exists load VM defs from it into memory and write the defs to the preference store WITHOUT triggering any processing of the new value File Input Stream file Input Stream new File Input Stream file vm Defs VM Definitions Container parseXML Into Container file Input Stream loadVM Defs Into Memory vm Defs Launching Plugin get Default set IgnoreVM Def Property Change Events true saveVM Definitions vm Defs get AsXML Launching Plugin get Default set IgnoreVM Def Property Change Events false else Otherwise go looking for V Ms in the file system Write the results to the preference store This will be treated just like a user change to the VM prefs with full notification to all VM listeners detect And SaveVM Definitions  JREs VMs VMs initializeVMConfiguration ParserConfigurationException IOException TransformerException vmXMLString getPreferences getString PREF_VM_XML VMs vmXMLString ByteArrayInputStream inputStream ByteArrayInputStream vmXMLString getBytes VMDefinitionsContainer vmDefs VMDefinitionsContainer parseXMLIntoContainer inputStream loadVMDefsIntoMemory vmDefs IOException LaunchingPlugin IPath stateLocation LaunchingPlugin getDefault getStateLocation IPath stateFile stateLocation vmConfiguration stateFile toOSString VMDefinitionsContainer vmDefs FileInputStream fileInputStream FileInputStream vmDefs VMDefinitionsContainer parseXMLIntoContainer fileInputStream loadVMDefsIntoMemory vmDefs LaunchingPlugin getDefault setIgnoreVMDefPropertyChangeEvents saveVMDefinitions vmDefs getAsXML LaunchingPlugin getDefault setIgnoreVMDefPropertyChangeEvents VMs detectAndSaveVMDefinitions
For each VM Standin object in the specified VM container convert it into a real VM private static void loadVM Defs Into Memory VM Definitions Container vm Container fg DefaultVM Id vm Container get DefaultVM Install CompositeID fg DefaultVM Connector Id vm Container get DefaultVM Install Connector TypeID Create the underlying V Ms for each VM Standin List vm List vm Container get ValidVM List Iterator vm List Iterator vm List iterator while vm List Iterator has Next VM Standin vm Standin VM Standin vm List Iterator next vm Standin convert To RealVM  VMStandin loadVMDefsIntoMemory VMDefinitionsContainer vmContainer fgDefaultVMId vmContainer getDefaultVMInstallCompositeID fgDefaultVMConnectorId vmContainer getDefaultVMInstallConnectorTypeID VMs VMStandin vmList vmContainer getValidVMList vmListIterator vmList vmListIterator hasNext VMStandin vmStandin VMStandin vmListIterator vmStandin convertToRealVM
Evaluates library locations for a IVM Install If no library locations are set on the install a default location is evaluated and checked if it exists return library locations with paths that exist or are empty since 2 0 public static Library Location get Library Locations IVM Install vm I Path library Paths I Path source Paths I Path source Root Paths Library Location locations vm get Library Locations if locations null Library Location dflts vm getVM Install Type get Default Library Locations vm get Install Location library Paths new I Path dflts length source Paths new I Path dflts length source Root Paths new I Path dflts length for int i 0 i dflts length i library Paths i dflts i get System Library Path if library Paths i to File is File library Paths i Path EMPTY source Paths i dflts i get System Library Source Path if source Paths i to File is File source Root Paths i dflts i get Package Root Path else source Paths i Path EMPTY source Root Paths i Path EMPTY else library Paths new I Path locations length source Paths new I Path locations length source Root Paths new I Path locations length for int i 0 i locations length i library Paths i locations i get System Library Path source Paths i locations i get System Library Source Path source Root Paths i locations i get Package Root Path locations new Library Location source Paths length for int i 0 i source Paths length i locations i new Library Location library Paths i source Paths i source Root Paths i return locations  IVMInstall LibraryLocation getLibraryLocations IVMInstall IPath libraryPaths IPath sourcePaths IPath sourceRootPaths LibraryLocation getLibraryLocations LibraryLocation getVMInstallType getDefaultLibraryLocations getInstallLocation libraryPaths IPath sourcePaths IPath sourceRootPaths IPath libraryPaths getSystemLibraryPath libraryPaths toFile isFile libraryPaths sourcePaths getSystemLibrarySourcePath sourcePaths toFile isFile sourceRootPaths getPackageRootPath sourcePaths sourceRootPaths libraryPaths IPath sourcePaths IPath sourceRootPaths IPath libraryPaths getSystemLibraryPath sourcePaths getSystemLibrarySourcePath sourceRootPaths getPackageRootPath LibraryLocation sourcePaths sourcePaths LibraryLocation libraryPaths sourcePaths sourceRootPaths
Detect the VM that Eclipse is running on return a VM standin representing the VM that Eclipse is running on or code null code if unable to detect the runtime VM private static VM Standin detect Eclipse Runtime VM Standin detectedVM Standin null Try to detect a VM for each declared VM type IVM Install Type vm Types getVM Install Types for int i 0 i vm Types length i File detected Location vm Types i detect Install Location if detected Location null detectedVM Standin null Make sure the VM id is unique int unique i IVM Install Type vm Type vm Types i while vm Type findVM Install String value Of unique null unique Create a standin for the detected VM and add it to the result collector String vmID String value Of unique detectedVM Standin new VM Standin vm Type vmID if detectedVM Standin null detectedVM Standin set Install Location detected Location detectedVM Standin set Name generate DetectedVM Name detectedVM Standin if vm Type instanceof AbstractVM Install Type AbstractVM Install Type abs AbstractVM Install Type vm Type URL url abs get Default Javadoc Location detected Location detectedVM Standin set Javadoc Location url return detectedVM Standin  VMStandin detectEclipseRuntime VMStandin detectedVMStandin IVMInstallType vmTypes getVMInstallTypes vmTypes detectedLocation vmTypes detectInstallLocation detectedLocation detectedVMStandin IVMInstallType vmType vmTypes vmType findVMInstall valueOf valueOf detectedVMStandin VMStandin vmType detectedVMStandin detectedVMStandin setInstallLocation detectedLocation detectedVMStandin setName generateDetectedVMName detectedVMStandin vmType AbstractVMInstallType AbstractVMInstallType AbstractVMInstallType vmType getDefaultJavadocLocation detectedLocation detectedVMStandin setJavadocLocation detectedVMStandin
Tries to locate a default VM if one is not currently set Sets the default VM to be the Eclipse runtime or the first VM found Log an error with the workspace if a no V Ms can be located private static void detect DefaultVM if get DefaultVM Id null VM Standin eclipse Runtime detect Eclipse Runtime IVM Install defaultVM null IVM Install Type vm Types getVM Install Types if eclipse Runtime null No default VM or Eclipse runtime Set the first VM as the default if any for int i 0 i vm Types length i IVM Install Type type vm Types i IVM Install vms type getVM Installs for int j 0 j vms length j defaultVM vms j break if defaultVM null break else if there is no default VM set the Eclipse runtime to be the default VM First search for an existing VM install with the same install location as the detected runtime IVM Install Type type eclipse Runtime getVM Install Type IVM Install vms type getVM Installs for int j 0 j vms length j IVM Install install vms j if install get Install Location equals eclipse Runtime get Install Location defaultVM install break if defaultVM null There is no VM install that corresponds to the Eclipse runtime Create a VM install for the Eclipse runtime defaultVM eclipse Runtime convert To RealVM if defaultVM null fg DefaultVM Id get Composite Id FromVM defaultVM  VMs detectDefaultVM getDefaultVMId VMStandin eclipseRuntime detectEclipseRuntime IVMInstall IVMInstallType vmTypes getVMInstallTypes eclipseRuntime vmTypes IVMInstallType vmTypes IVMInstall getVMInstalls IVMInstallType eclipseRuntime getVMInstallType IVMInstall getVMInstalls IVMInstall getInstallLocation eclipseRuntime getInstallLocation eclipseRuntime convertToRealVM fgDefaultVMId getCompositeIdFromVM
Detects VM installations and a default VM if required Saves the results private static void detect And SaveVM Definitions detect DefaultVM try String vm DefXML getV Ms AsXML saveVM Definitions vm DefXML catch IO Exception ioe Launching Plugin log ioe catch Parser Configuration Exception e Launching Plugin log e catch Transformer Exception e Launching Plugin log e  detectAndSaveVMDefinitions detectDefaultVM vmDefXML getVMsAsXML saveVMDefinitions vmDefXML IOException LaunchingPlugin ParserConfigurationException LaunchingPlugin TransformerException LaunchingPlugin
Make the name of a detected VM stand out private static String generate DetectedVM Name IVM Install vm return vm get Install Location get Name  generateDetectedVMName IVMInstall getInstallLocation getName
Creates and returns a classpath entry describing the JRE LIB classpath variable return a new I Classpath Entry that describes the JRE LIB classpath variable public static I Classpath Entry getJRE Variable Entry return Java Core new Variable Entry new Path JRELIB VARIABLE new Path JRESRC VARIABLE new Path JRESRCROOT VARIABLE  JRE_LIB IClasspathEntry JRE_LIB IClasspathEntry getJREVariableEntry JavaCore newVariableEntry JRELIB_VARIABLE JRESRC_VARIABLE JRESRCROOT_VARIABLE
Creates and returns a classpath entry describing the default JRE container entry return a new I Classpath Entry that describes the default JRE container entry since 2 0 public static I Classpath Entry get DefaultJRE Container Entry return Java Core new Container Entry new Path JRE CONTAINER  IClasspathEntry IClasspathEntry getDefaultJREContainerEntry JavaCore newContainerEntry JRE_CONTAINER
Returns the VM connector defined with the specified identifier or code null code if none param id VM connector identifier return VM connector or code null code if none since 2 0 public static IVM Connector getVM Connector String id return Launching Plugin get Default getVM Connector id  IVMConnector getVMConnector LaunchingPlugin getDefault getVMConnector
Returns all VM connector extensions return VM connectors since 2 0 public static IVM Connector getVM Connectors return Launching Plugin get Default getVM Connectors  IVMConnector getVMConnectors LaunchingPlugin getDefault getVMConnectors
Returns the preference store for the launching plug in return the preference store for the launching plug in since 2 0 public static Preferences get Preferences return Launching Plugin get Default get Plugin Preferences  getPreferences LaunchingPlugin getDefault getPluginPreferences
Saves the preferences for the launching plug in since 2 0 public static void save Preferences Launching Plugin get Default save Plugin Preferences  savePreferences LaunchingPlugin getDefault savePluginPreferences
Registers the given resolver for the specified variable param resolver runtime classpathe entry resolver param variable Name variable name to register for since 2 0 public static void add Variable Resolver I Runtime Classpath Entry Resolver resolver String variable Name Map map get Variable Resolvers map put variable Name resolver  variableName addVariableResolver IRuntimeClasspathEntryResolver variableName getVariableResolvers variableName
Registers the given resolver for the specified container param resolver runtime classpathe entry resolver param container Identifier identifier of the classpath container to register for since 2 0 public static void add Container Resolver I Runtime Classpath Entry Resolver resolver String container Identifier Map map get Container Resolvers map put container Identifier resolver  containerIdentifier addContainerResolver IRuntimeClasspathEntryResolver containerIdentifier getContainerResolvers containerIdentifier
Returns all registered variable resolvers private static Map get Variable Resolvers if fg Variable Resolvers null initialize Resolvers return fg Variable Resolvers  getVariableResolvers fgVariableResolvers initializeResolvers fgVariableResolvers
Returns all registered container resolvers private static Map get Container Resolvers if fg Container Resolvers null initialize Resolvers return fg Container Resolvers  getContainerResolvers fgContainerResolvers initializeResolvers fgContainerResolvers
Returns all registered runtime classpath entry resolvers private static Map get Entry Resolvers if fg Runtime Classpath Entry Resolvers null initialize Resolvers return fg Runtime Classpath Entry Resolvers  getEntryResolvers fgRuntimeClasspathEntryResolvers initializeResolvers fgRuntimeClasspathEntryResolvers
private static void initialize Resolvers I Extension Point point Platform get Extension Registry get Extension Point Launching Plugin ID PLUGIN EXTENSION POINT RUNTIME CLASSPATH ENTRY RESOLVERS I Configuration Element extensions point get Configuration Elements fg Variable Resolvers new Hash Map extensions length fg Container Resolvers new Hash Map extensions length fg Runtime Classpath Entry Resolvers new Hash Map extensions length for int i 0 i extensions length i Runtime Classpath Entry Resolver res new Runtime Classpath Entry Resolver extensions i String variable res get Variable Name String container res get Container Id String entry Id res get Runtime Classpath Entry Id if variable null fg Variable Resolvers put variable res if container null fg Container Resolvers put container res if entry Id null fg Runtime Classpath Entry Resolvers put entry Id res  initializeResolvers IExtensionPoint getExtensionRegistry getExtensionPoint LaunchingPlugin ID_PLUGIN EXTENSION_POINT_RUNTIME_CLASSPATH_ENTRY_RESOLVERS IConfigurationElement getConfigurationElements fgVariableResolvers HashMap fgContainerResolvers HashMap fgRuntimeClasspathEntryResolvers HashMap RuntimeClasspathEntryResolver RuntimeClasspathEntryResolver getVariableName getContainerId entryId getRuntimeClasspathEntryId fgVariableResolvers fgContainerResolvers entryId fgRuntimeClasspathEntryResolvers entryId
Returns all registered classpath providers private static Map get Classpath Providers if fg Path Providers null initialize Providers return fg Path Providers  getClasspathProviders fgPathProviders initializeProviders fgPathProviders
private static void initialize Providers I Extension Point point Platform get Extension Registry get Extension Point Launching Plugin ID PLUGIN EXTENSION POINT RUNTIME CLASSPATH PROVIDERS I Configuration Element extensions point get Configuration Elements fg Path Providers new Hash Map extensions length for int i 0 i extensions length i Runtime Classpath Provider res new Runtime Classpath Provider extensions i fg Path Providers put res get Identifier res  initializeProviders IExtensionPoint getExtensionRegistry getExtensionPoint LaunchingPlugin ID_PLUGIN EXTENSION_POINT_RUNTIME_CLASSPATH_PROVIDERS IConfigurationElement getConfigurationElements fgPathProviders HashMap RuntimeClasspathProvider RuntimeClasspathProvider fgPathProviders getIdentifier
Returns the resolver registered for the given variable or code null code if none param variable Name the variable to determine the resolver for return the resolver registered for the given variable or code null code if none private static I Runtime Classpath Entry Resolver get Variable Resolver String variable Name return I Runtime Classpath Entry Resolver get Variable Resolvers get variable Name  variableName IRuntimeClasspathEntryResolver getVariableResolver variableName IRuntimeClasspathEntryResolver getVariableResolvers variableName
Returns the resolver registered for the given container id or code null code if none param container Id the container to determine the resolver for return the resolver registered for the given container id or code null code if none private static I Runtime Classpath Entry Resolver get Container Resolver String container Id return I Runtime Classpath Entry Resolver get Container Resolvers get container Id  containerId IRuntimeClasspathEntryResolver getContainerResolver containerId IRuntimeClasspathEntryResolver getContainerResolvers containerId
Returns the resolver registered for the given contributed classpath entry type param type Id the id of the contributed classpath entry return the resolver registered for the given clsspath entry private static I Runtime Classpath Entry Resolver get Contributed Resolver String type Id I Runtime Classpath Entry Resolver resolver I Runtime Classpath Entry Resolver get Entry Resolvers get type Id if resolver null return new Default Entry Resolver return resolver  typeId IRuntimeClasspathEntryResolver getContributedResolver typeId IRuntimeClasspathEntryResolver IRuntimeClasspathEntryResolver getEntryResolvers typeId DefaultEntryResolver
Adds the given listener to the list of registered VM install changed listeners Has no effect if an identical listener is already registered param listener the listener to add since 2 0 public static void addVM Install Changed Listener IVM Install Changed Listener listener fgVM Listeners add listener  addVMInstallChangedListener IVMInstallChangedListener fgVMListeners
Removes the given listener from the list of registered VM install changed listeners Has no effect if an identical listener is not already registered param listener the listener to remove since 2 0 public static void removeVM Install Changed Listener IVM Install Changed Listener listener fgVM Listeners remove listener  removeVMInstallChangedListener IVMInstallChangedListener fgVMListeners
private static void notify DefaultVM Changed IVM Install previous IVM Install current Object listeners fgVM Listeners get Listeners for int i 0 i listeners length i IVM Install Changed Listener listener IVM Install Changed Listener listeners i listener defaultVM Install Changed previous current  notifyDefaultVMChanged IVMInstall IVMInstall fgVMListeners getListeners IVMInstallChangedListener IVMInstallChangedListener defaultVMInstallChanged
Notifies all VM install changed listeners of the given property change param event event describing the change since 2 0 public static void fireVM Changed Property Change Event event Object listeners fgVM Listeners get Listeners for int i 0 i listeners length i IVM Install Changed Listener listener IVM Install Changed Listener listeners i listener vm Changed event  fireVMChanged PropertyChangeEvent fgVMListeners getListeners IVMInstallChangedListener IVMInstallChangedListener vmChanged
Notifies all VM install changed listeners of the VM addition param vm the VM that has been added since 2 0 public static void fireVM Added IVM Install vm Object listeners fgVM Listeners get Listeners for int i 0 i listeners length i IVM Install Changed Listener listener IVM Install Changed Listener listeners i listener vm Added vm  fireVMAdded IVMInstall fgVMListeners getListeners IVMInstallChangedListener IVMInstallChangedListener vmAdded
Notifies all VM install changed listeners of the VM removal param vm the VM that has been removed since 2 0 public static void fireVM Removed IVM Install vm Object listeners fgVM Listeners get Listeners for int i 0 i listeners length i IVM Install Changed Listener listener IVM Install Changed Listener listeners i listener vm Removed vm  fireVMRemoved IVMInstall fgVMListeners getListeners IVMInstallChangedListener IVMInstallChangedListener vmRemoved
Return the String representation of the default output directory of the launch config s project or code null code if there is no config no project or some sort of problem return the default output directory for the specified launch configuration s project since 2 1 public static String get Project Output Directory I Launch Configuration config try if config null I Java Project java Project Java Runtime get Java Project config if java Project null I Workspace Root root Resources Plugin get Workspace get Root I Path output Location java Project get Output Location I Resource resource root find Member output Location if resource null I Path path resource get Full Path if path null return path make Relative to String catch Core Exception ce return null  getProjectOutputDirectory ILaunchConfiguration IJavaProject javaProject JavaRuntime getJavaProject javaProject IWorkspaceRoot ResourcesPlugin getWorkspace getRoot IPath outputLocation javaProject getOutputLocation IResource findMember outputLocation IPath getFullPath makeRelative toString CoreException

Creates a new library location param library Path The location of the JAR containing java lang Object Must not be code null code param source Path The location of the zip file containing the sources for code library code Must not be code null code Use Path EMPTY instead param package Root The path inside the code source code zip file where packages names begin If the source for java lang Object source is found at src java lang Object java in the zip file the package Root should be src Must not be code null code Use Path EMPTY or I Path ROOT throws Illegal Argument Exception If the library path is code null code public Library Location I Path library Path I Path source Path I Path package Root if library Path null throw new Illegal Argument Exception Launching Messages get String library Location assert library Not Null NON NLS 1 f System Library library Path f System Library Source source Path f Package Root Path package Root  libraryPathThe sourcePathThe packageRoot packageRoot IPath throwsIllegalArgumentExceptionIf LibraryLocation IPath libraryPath IPath sourcePath IPath packageRoot libraryPath IllegalArgumentException LaunchingMessages getString libraryLocation libraryNotNull fSystemLibrary libraryPath fSystemLibrarySource sourcePath fPackageRootPath packageRoot
Returns the JRE library jar location return The JRE library jar location public I Path get System Library Path return f System Library  IPath getSystemLibraryPath fSystemLibrary
Returns the JRE library source zip location return The JRE library source zip location public I Path get System Library Source Path return f System Library Source  IPath getSystemLibrarySourcePath fSystemLibrarySource
Returns the path to the default package in the sources zip file return The path to the default package in the sources zip file public I Path get Package Root Path return f Package Root Path  IPath getPackageRootPath fPackageRootPath
public boolean equals Object obj if obj instanceof Library Location Library Location lib Library Location obj return get System Library Path equals lib get System Library Path equals get System Library Source Path lib get System Library Source Path equals get Package Root Path lib get Package Root Path return false  LibraryLocation LibraryLocation LibraryLocation getSystemLibraryPath getSystemLibraryPath getSystemLibrarySourcePath getSystemLibrarySourcePath getPackageRootPath getPackageRootPath
see java lang Object hash Code public int hash Code return get System Library Path hash Code  hashCode hashCode getSystemLibraryPath hashCode
Returns whether the given paths are equal either may be code null code param path1 path to be compared param path2 path to be compared return whether the given paths are equal protected boolean equals I Path path1 I Path path2 if path1 null return path2 null if path2 null return false return path1 equals path2  IPath IPath

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 public 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 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

Returns a free port number on the specified host within the given range or 1 if none found param host name or IP addres of host on which to find a free port param search From the port number from which to start searching param search To the port number at which to stop searching return a free port in the specified range or 1 of none found deprecated Use code find Free Port code instead It is possible that this method can return a port that is already in use since the implementation does not bind to the given port to ensure that it is free public static int find Unused Local Port String host int search From int search To for int i 0 i 10 i Socket s null int port get Random Port search From search To try s new Socket host port catch Connect Exception e return port catch IO Exception e finally if s null try s close catch IO Exception ioe return 1  searchFrom searchTo findFreePort findUnusedLocalPort searchFrom searchTo getRandomPort searchFrom searchTo ConnectException IOException IOException
private static int get Random Port int low int high return int fg Random next Float high low low  getRandomPort fgRandom nextFloat
Returns a free port number on localhost or 1 if unable to find a free port return a free port number on localhost or 1 if unable to find a free port since 3 0 public static int find Free Port Server Socket socket null try socket new Server Socket 0 return socket get Local Port catch IO Exception e finally if socket null try socket close catch IO Exception e return 1  findFreePort ServerSocket ServerSocket getLocalPort IOException IOException

Returns a zip file with the given name param name zip file name return The zip file with the given name exception IO Exception if unable to create the specified zip file private static Zip File get Zip File String name throws IO Exception synchronized f Zip File Cache Zip File zip Zip File f Zip File Cache get name if zip null zip new Zip File name f Zip File Cache put name zip return zip  IOException ZipFile getZipFile IOException fZipFileCache ZipFile ZipFile fZipFileCache ZipFile fZipFileCache
Closes all zip files that have been opened and removes them from the zip file cache This method is only to be called by the launching plug in public static void close Archives synchronized f Zip File Cache Iterator iter f Zip File Cache values iterator while iter has Next Zip File file Zip File iter next synchronized file try file close catch IO Exception e Launching Plugin log e f Zip File Cache clear  closeArchives fZipFileCache fZipFileCache hasNext ZipFile ZipFile IOException LaunchingPlugin fZipFileCache
Constructs a new empty source location to be initialized with a memento public Archive Source Location  ArchiveSourceLocation
Constructs a new source location that will retrieve source elements from the zip file with the given name param archive Name zip file param source Root a path to the root source folder in the specified archive or code null code if the root source folder is the root of the archive public Archive Source Location String archive Name String source Root super set Name archive Name set Root Path source Root  archiveName sourceRoot ArchiveSourceLocation archiveName sourceRoot setName archiveName setRootPath sourceRoot
public Object find Source Element String name throws Core Exception try if get Archive null return null boolean possible Inner Type false String path Str name replace int last Slash path Str last Index Of String type Name path Str do I Path entry Path new Path type Name java NON NLS 1 auto Detect Root entry Path if get Root Path null entry Path get Root Path append entry Path Zip Entry entry get Archive get Entry entry Path to String if entry null return new Zip Entry Storage get Archive entry int index type Name last Index Of if index last Slash type Name type Name substring 0 index possible Inner Type true else possible Inner Type false while possible Inner Type return null catch IO Exception e throw new Core Exception new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR INTERNAL ERROR Message Format format Launching Messages get String Archive Source Location Unable to locate source element in archive  0  1 new String get Name e NON NLS 1  findSourceElement CoreException getArchive possibleInnerType pathStr lastSlash pathStr lastIndexOf typeName pathStr IPath entryPath typeName autoDetectRoot entryPath getRootPath entryPath getRootPath entryPath ZipEntry getArchive getEntry entryPath toString ZipEntryStorage getArchive typeName lastIndexOf lastSlash typeName typeName possibleInnerType possibleInnerType possibleInnerType IOException CoreException IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR MessageFormat LaunchingMessages getString ArchiveSourceLocation Unable_to_locate_source_element_in_archive_ _1 getName
Automatically detect the root path if required param path source file name excluding root path throws Core Exception if unable to detect the root path for this source archive private void auto Detect Root I Path path throws Core Exception if f Root Detected Zip File zip null try zip get Archive catch IO Exception e throw new Core Exception new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR INTERNAL ERROR Message Format format Launching Messages get String Archive Source Location Exception occurred while detecting root source directory in archive  0  1 new String get Name e NON NLS 1 synchronized zip Enumeration entries zip entries String file Name path to String try while entries has More Elements Zip Entry entry Zip Entry entries next Element String entry Name entry get Name if entry Name ends With file Name int root Length entry Name length file Name length if root Length 0 String root entry Name substring 0 root Length set Root Path root f Root Detected true return catch Illegal State Exception e throw new Core Exception new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR INTERNAL ERROR Message Format format Launching Messages get String Archive Source Location Exception occurred while detecting root source directory in archive  0  2 new String get Name e NON NLS 1  CoreException autoDetectRoot IPath CoreException fRootDetected ZipFile getArchive IOException CoreException IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR MessageFormat LaunchingMessages getString ArchiveSourceLocation Exception_occurred_while_detecting_root_source_directory_in_archive_ _1 getName fileName toString hasMoreElements ZipEntry ZipEntry nextElement entryName getName entryName endsWith fileName rootLength entryName fileName rootLength entryName rootLength setRootPath fRootDetected IllegalStateException CoreException IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR MessageFormat LaunchingMessages getString ArchiveSourceLocation Exception_occurred_while_detecting_root_source_directory_in_archive_ _2 getName
Returns the archive associated with this source location return zip file throws IO Exception if unable to create the zip file associated with this location protected Zip File get Archive throws IO Exception return get Zip File get Name  IOException ZipFile getArchive IOException getZipFile getName
Sets the location of the root source folder within the archive or code null code if the root source folder is the root of the archive param path the location of the root source folder within the archive or code null code if the root source folder is the root of the archive private void set Root Path String path if path null path trim length 0 f Root Path null else f Root Path new Path path f Root Detected true  setRootPath fRootPath fRootPath fRootDetected
Returns the location of the root source folder within the archive or code null code if the root source folder is the root of the arhcive return the location of the root source folder within the archive or code null code if the root source folder is the root of the arhcive public I Path get Root Path return f Root Path  IPath getRootPath fRootPath
Returns the name of the archive associated with this source location return the name of the archive associated with this source location public String get Name return f Name  getName fName
Sets the name of the archive associated with this source location param name the name of the archive associated with this source location private void set Name String name f Name name  setName fName
see java lang Object equals java lang Object public boolean equals Object object return object instanceof Archive Source Location get Name equals Archive Source Location object get Name  ArchiveSourceLocation getName ArchiveSourceLocation getName
see java lang Object hash Code public int hash Code return get Name hash Code  hashCode hashCode getName hashCode
public String get Memento throws Core Exception try Document doc Launching Plugin get Document Element node doc create Element archive Source Location NON NLS 1 doc append Child node node set Attribute archive Path get Name NON NLS 1 if get Root Path null node set Attribute root Path get Root Path to String NON NLS 1 return Java Launch Configuration Utils serialize Document doc catch IO Exception e abort Message Format format Launching Messages get String Archive Source Location Unable to create memento for archive source location  0  1 new String get Name e NON NLS 1 catch Parser Configuration Exception e abort Message Format format Launching Messages get String Archive Source Location Unable to create memento for archive source location  0  1 new String get Name e NON NLS 1 catch Transformer Exception e abort Message Format format Launching Messages get String Archive Source Location Unable to create memento for archive source location  0  1 new String get Name e NON NLS 1 execution will not reach here return null  getMemento CoreException LaunchingPlugin getDocument createElement archiveSourceLocation appendChild setAttribute archivePath getName getRootPath setAttribute rootPath getRootPath toString JavaLaunchConfigurationUtils serializeDocument IOException MessageFormat LaunchingMessages getString ArchiveSourceLocation Unable_to_create_memento_for_archive_source_location_ _1 getName ParserConfigurationException MessageFormat LaunchingMessages getString ArchiveSourceLocation Unable_to_create_memento_for_archive_source_location_ _1 getName TransformerException MessageFormat LaunchingMessages getString ArchiveSourceLocation Unable_to_create_memento_for_archive_source_location_ _1 getName
public void initialize From String memento throws Core Exception Exception ex null try Element root null Document Builder parser Document Builder Factory new Instance new Document Builder String Reader reader new String Reader memento Input Source source new Input Source reader root parser parse source get Document Element String path root get Attribute archive Path NON NLS 1 if is Empty path abort Launching Messages get String Archive Source Location Unable to initialize source location   missing archive path  3 null NON NLS 1 String root Path root get Attribute root Path NON NLS 1 set Name path set Root Path root Path return catch Parser Configuration Exception e ex e catch SAX Exception e ex e catch IO Exception e ex e abort Launching Messages get String Archive Source Location Exception occurred initializing source location  5 ex NON NLS 1  initializeFrom CoreException DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder StringReader StringReader InputSource InputSource getDocumentElement getAttribute archivePath isEmpty LaunchingMessages getString ArchiveSourceLocation Unable_to_initialize_source_location_ _missing_archive_path _3 rootPath getAttribute rootPath setName setRootPath rootPath ParserConfigurationException SAXException IOException LaunchingMessages getString ArchiveSourceLocation Exception_occurred_initializing_source_location _5
private boolean is Empty String string return string null string length 0  isEmpty
Throws an internal error exception private void abort String message Throwable e throws Core Exception I Status s new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR INTERNAL ERROR message e throw new Core Exception s  CoreException IStatus IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR CoreException

Constructs a new source container for the given classpath container param container Path classpath container path public Classpath Container Source Container I Path container Path f Container Path container Path  containerPath ClasspathContainerSourceContainer IPath containerPath fContainerPath containerPath
public String get Name I Classpath Container container null try container get Classpath Container catch Core Exception e if container null return get Path last Segment to String return container get Description  getName IClasspathContainer getClasspathContainer CoreException getPath lastSegment toString getDescription
see org eclipse debug internal core sourcelookup I Source Container get Type public I Source Container Type get Type return get Source Container Type TYPE ID  ISourceContainer getType ISourceContainerType getType getSourceContainerType TYPE_ID
protected I Source Container create Source Containers throws Core Exception I Runtime Classpath Entry entry Java Runtime new Runtime Container Classpath Entry get Path I Runtime Classpath Entry USER CLASSES I Runtime Classpath Entry entries Java Runtime resolve Source Lookup Path new I Runtime Classpath Entry entry get Director get Launch Configuration return Java Source Lookup Util translate entries true  ISourceContainer createSourceContainers CoreException IRuntimeClasspathEntry JavaRuntime newRuntimeContainerClasspathEntry getPath IRuntimeClasspathEntry USER_CLASSES IRuntimeClasspathEntry JavaRuntime resolveSourceLookupPath IRuntimeClasspathEntry getDirector getLaunchConfiguration JavaSourceLookupUtil
Returns the classpath container s path return classpath container s path public I Path get Path return f Container Path  IPath getPath fContainerPath
public boolean equals Object obj if obj instanceof Classpath Container Source Container return get Path equals Classpath Container Source Container obj get Path return false  ClasspathContainerSourceContainer getPath ClasspathContainerSourceContainer getPath
see java lang Object hash Code public int hash Code return get Path hash Code  hashCode hashCode getPath hashCode
Returns the associated container or code null code if unavailable return classpath container or code null code throws Core Exception if unable to retrieve container public I Classpath Container get Classpath Container throws Core Exception I Source Lookup Director director get Director if director null I Launch Configuration configuration director get Launch Configuration if configuration null I Java Project project Java Runtime get Java Project configuration if project null return Java Core get Classpath Container get Path project return null  CoreException IClasspathContainer getClasspathContainer CoreException ISourceLookupDirector getDirector ILaunchConfiguration getLaunchConfiguration IJavaProject JavaRuntime getJavaProject JavaCore getClasspathContainer getPath

Constructs a new source container on the given variable and suffix param variable Path path representing a Java classpath variable The first segment is the variable name and the following segments if any are appended to the variable public Classpath Variable Source Container I Path variable Path f Variable variable Path  variablePath ClasspathVariableSourceContainer IPath variablePath fVariable variablePath
protected I Source Container create Source Containers throws Core Exception I Path path Java Core get Classpath Variable f Variable segment 0 if path null return new I Source Container 0 if f Variable segment Count 1 path path append f Variable remove First Segments 1 I Runtime Classpath Entry entry Java Runtime new Archive Runtime Classpath Entry path return Java Source Lookup Util translate new I Runtime Classpath Entry entry false  ISourceContainer createSourceContainers CoreException IPath JavaCore getClasspathVariable fVariable ISourceContainer fVariable segmentCount fVariable removeFirstSegments IRuntimeClasspathEntry JavaRuntime newArchiveRuntimeClasspathEntry JavaSourceLookupUtil IRuntimeClasspathEntry
see org eclipse debug internal core sourcelookup I Source Container get Name public String get Name return f Variable toOS String  ISourceContainer getName getName fVariable toOSString
Returns the variable this container references as a path The first segment is the variable name and the following segments are appended to the variable s value return path representing the variable and suffix public I Path get Path return f Variable  IPath getPath fVariable
see org eclipse debug internal core sourcelookup I Source Container get Type public I Source Container Type get Type return get Source Container Type TYPE ID  ISourceContainer getType ISourceContainerType getType getSourceContainerType TYPE_ID

Constructs a source container on the given Java project param project project to look for source in public Java Project Source Container I Java Project project f Project project  JavaProjectSourceContainer IJavaProject fProject
see org eclipse debug internal core sourcelookup I Source Container get Name public String get Name return f Project get Element Name  ISourceContainer getName getName fProject getElementName
see org eclipse debug internal core sourcelookup I Source Container get Type public I Source Container Type get Type return get Source Container Type TYPE ID  ISourceContainer getType ISourceContainerType getType getSourceContainerType TYPE_ID
Returns the Java project associated with this source container return Java project public I Java Project get Java Project return f Project  IJavaProject getJavaProject fProject
protected I Source Container create Source Containers throws Core Exception List containers new Array List I Workspace Root root Resources Plugin get Workspace get Root if f Project get Project is Open I Classpath Entry entries f Project get Raw Classpath for int i 0 i entries length i I Classpath Entry entry entries i switch entry get Entry Kind case I Classpath Entry CPE SOURCE I Path path entry get Path I Resource resource root find Member path if resource instanceof I Container containers add new Folder Source Container I Container resource false break cache the Java source folders to search for java files in f Source Folders I Source Container containers to Array new I Source Container containers size I Source Container the Project new Project Source Container f Project get Project false f Others new I Source Container the Project containers add the Project return I Source Container containers to Array new I Source Container containers size  ISourceContainer createSourceContainers CoreException ArrayList IWorkspaceRoot ResourcesPlugin getWorkspace getRoot fProject getProject isOpen IClasspathEntry fProject getRawClasspath IClasspathEntry getEntryKind IClasspathEntry CPE_SOURCE IPath getPath IResource findMember IContainer FolderSourceContainer IContainer fSourceFolders ISourceContainer toArray ISourceContainer ISourceContainer theProject ProjectSourceContainer fProject getProject fOthers ISourceContainer theProject theProject ISourceContainer toArray ISourceContainer
public boolean equals Object obj if obj instanceof Java Project Source Container return get Java Project equals Java Project Source Container obj get Java Project return super equals obj  JavaProjectSourceContainer getJavaProject JavaProjectSourceContainer getJavaProject
see java lang Object hash Code public int hash Code return get Java Project hash Code  hashCode hashCode getJavaProject hashCode
public Object find Source Elements String name throws Core Exception force container initialzation get Source Containers if name ends With java NON NLS 1 only look in source folders Object objects find Source Elements name f Source Folders List filtered null for int i 0 i objects length i Object object objects i if object instanceof I Resource if get Java Project is On Classpath I Resource object if filtered null filtered new Array List objects length for int j 0 j objects length j filtered add objects j filtered remove object if filtered null return objects return filtered to Array else look elsewhere if non a java file return find Source Elements name f Others  findSourceElements CoreException getSourceContainers endsWith findSourceElements fSourceFolders IResource getJavaProject isOnClasspath IResource ArrayList toArray findSourceElements fOthers
public void dispose f Source Folders null f Others null super dispose  fSourceFolders fOthers

Returns the source name associated with the given object or code null code if none param object a Java stack frame return the source name associated with the given object or code null code if none exception Core Exception if unable to retrieve the source name public String get Source Name Object object throws Core Exception if object instanceof I Adaptable I Java Stack Frame frame I Java Stack Frame I Adaptable object get Adapter I Java Stack Frame class try if frame null if frame is Obsolete return null String source Name frame get Source Path TODO this may break fix to bug 21518 if source Name null no debug attributes guess at source name source Name frame get Declaring Type Name int index source Name last Index Of if index 0 index 0 source Name source Name replace File separator Char index source Name index Of if index 0 source Name source Name substring 0 index if source Name length 0 likely a proxy class see bug 40815 source Name null else source Name source Name java NON NLS 1 return source Name catch Debug Exception e if e get Status get Code I Java Thread ERR THREAD NOT SUSPENDED return null else throw e if object instanceof String assume it s a file name return String object return null  CoreException getSourceName CoreException IAdaptable IJavaStackFrame IJavaStackFrame IAdaptable getAdapter IJavaStackFrame isObsolete sourceName getSourcePath sourceName sourceName getDeclaringTypeName sourceName lastIndexOf sourceName sourceName separatorChar sourceName indexOf sourceName sourceName sourceName sourceName sourceName sourceName sourceName DebugException getStatus getCode IJavaThread ERR_THREAD_NOT_SUSPENDED
public void dispose Iterator iterator f Delegate Containers values iterator while iterator has Next I Source Container container I Source Container iterator next container dispose f Delegate Containers null super dispose  fDelegateContainers hasNext ISourceContainer ISourceContainer fDelegateContainers
protected I Source Container get Delegate Container I Source Container container I Source Container delegate I Source Container f Delegate Containers get container if delegate null return container return delegate  ISourceContainer getDelegateContainer ISourceContainer ISourceContainer ISourceContainer fDelegateContainers
see org eclipse debug internal core sourcelookup I Source Lookup Participant init org eclipse debug internal core sourcelookup I Source Lookup Director public void init I Source Lookup Director director super init director f Delegate Containers new Hash Map  ISourceLookupParticipant ISourceLookupDirector ISourceLookupDirector fDelegateContainers HashMap
public void source Containers Changed I Source Lookup Director director use package fragment roots in place of local archives where they exist f Delegate Containers clear I Source Container containers director get Source Containers for int i 0 i containers length i I Source Container container containers i if container get Type get Id equals Archive Source Container TYPE ID I File file Archive Source Container container get File I Project project file get Project I Java Project java Project Java Core create project if java Project exists try I Package Fragment Root roots java Project get Package Fragment Roots for int j 0 j roots length j I Package Fragment Root root roots j if file equals root get Underlying Resource the root was specified f Delegate Containers put container new Package Fragment Root Source Container root else I Path path root get Source Attachment Path if path null if file get Full Path equals path a source attachment to a root was specified f Delegate Containers put container new Package Fragment Root Source Container root catch Java Model Exception e  sourceContainersChanged ISourceLookupDirector fDelegateContainers ISourceContainer getSourceContainers ISourceContainer getType getId ArchiveSourceContainer TYPE_ID IFile ArchiveSourceContainer getFile IProject getProject IJavaProject javaProject JavaCore javaProject IPackageFragmentRoot javaProject getPackageFragmentRoots IPackageFragmentRoot getUnderlyingResource fDelegateContainers PackageFragmentRootSourceContainer IPath getSourceAttachmentPath getFullPath fDelegateContainers PackageFragmentRootSourceContainer JavaModelException

see org eclipse debug internal core sourcelookup I Source Path Computer get Id public String get Id return ID  ISourcePathComputer getId getId
public I Source Container compute Source Containers I Launch Configuration configuration I Progress Monitor monitor throws Core Exception I Runtime Classpath Entry entries Java Runtime compute Unresolved Source Lookup Path configuration I Runtime Classpath Entry resolved Java Runtime resolve Source Lookup Path entries configuration return Java Source Lookup Util translate resolved true  ISourceContainer computeSourceContainers ILaunchConfiguration IProgressMonitor CoreException IRuntimeClasspathEntry JavaRuntime computeUnresolvedSourceLookupPath IRuntimeClasspathEntry JavaRuntime resolveSourceLookupPath JavaSourceLookupUtil

Constructs a new package fragment root source container on the given root The root must be of kind code K BINARY code param root package fragment root public Package Fragment Root Source Container I Package Fragment Root root f Root root  K_BINARY PackageFragmentRootSourceContainer IPackageFragmentRoot fRoot
public Object find Source Elements String name throws Core Exception look for a class file int index name last Index Of String type Name name if index 0 remove file type suffix type Name type Name substring 0 index type Name type Name replace type Name type Name replace index type Name last Index Of String package Name NON NLS 1 if index 0 package Name type Name substring 0 index type Name type Name substring index 1 I Package Fragment fragment f Root get Package Fragment package Name if fragment exists I Class File file fragment get Class File type Name class NON NLS 1 if file exists return new Object file return EMPTY  findSourceElements CoreException lastIndexOf typeName typeName typeName typeName typeName typeName typeName typeName lastIndexOf packageName packageName typeName typeName typeName IPackageFragment fRoot getPackageFragment packageName IClassFile getClassFile typeName
see org eclipse debug internal core sourcelookup I Source Container get Name public String get Name return f Root get Element Name  ISourceContainer getName getName fRoot getElementName
see org eclipse debug internal core sourcelookup I Source Container get Type public I Source Container Type get Type return get Source Container Type TYPE ID  ISourceContainer getType ISourceContainerType getType getSourceContainerType TYPE_ID
see java lang Object equals java lang Object public boolean equals Object obj return obj instanceof Package Fragment Root Source Container Package Fragment Root Source Container obj get Package Fragment Root equals get Package Fragment Root  PackageFragmentRootSourceContainer PackageFragmentRootSourceContainer getPackageFragmentRoot getPackageFragmentRoot
Returns the package fragment root this container searches for source return the package fragment root this container searches for source public I Package Fragment Root get Package Fragment Root return f Root  IPackageFragmentRoot getPackageFragmentRoot fRoot
see java lang Object hash Code public int hash Code return f Root hash Code  hashCode hashCode fRoot hashCode
see org eclipse debug internal core sourcelookup I Source Container get Path public I Path get Path return get Package Fragment Root get Path  ISourceContainer getPath IPath getPath getPackageFragmentRoot getPath

Constructs a new empty source location to be initialized from a memento public Directory Source Location  DirectorySourceLocation
Constructs a new source location that will retrieve source elements from the given directory param directory a directory public Directory Source Location File directory set Directory directory  DirectorySourceLocation setDirectory
public Object find Source Element String name throws Core Exception if get Directory null return null String path Str name replace int last Slash path Str last Index Of try I Path root new Path get Directory get Canonical Path boolean possible Inner Type false String type Name path Str do I Path file Path root append new Path type Name java NON NLS 1 File file file Path to File if file exists return new Local File Storage file int index type Name last Index Of if index last Slash type Name type Name substring 0 index possible Inner Type true else possible Inner Type false while possible Inner Type catch IO Exception e throw new Java Model Exception e I Java Model Status Constants IO EXCEPTION return null  findSourceElement CoreException getDirectory pathStr lastSlash pathStr lastIndexOf IPath getDirectory getCanonicalPath possibleInnerType typeName pathStr IPath filePath typeName filePath toFile LocalFileStorage typeName lastIndexOf lastSlash typeName typeName possibleInnerType possibleInnerType possibleInnerType IOException JavaModelException IJavaModelStatusConstants IO_EXCEPTION
Sets the directory in which source elements will be searched for param directory a directory private void set Directory File directory f Directory directory  setDirectory fDirectory
Returns the directory associated with this source location return directory public File get Directory return f Directory  getDirectory fDirectory
see java lang Object equals java lang Object public boolean equals Object object return object instanceof Directory Source Location get Directory equals Directory Source Location object get Directory  DirectorySourceLocation getDirectory DirectorySourceLocation getDirectory
see java lang Object hash Code public int hash Code return get Directory hash Code  hashCode hashCode getDirectory hashCode
public String get Memento throws Core Exception try Document doc Launching Plugin get Document Element node doc create Element directory Source Location NON NLS 1 doc append Child node node set Attribute path get Directory get Absolute Path NON NLS 1 return Java Launch Configuration Utils serialize Document doc catch IO Exception e abort Message Format format Launching Messages get String Directory Source Location Unable to create memento for directory source location  0  1 new String get Directory get Absolute Path e NON NLS 1 catch Parser Configuration Exception e abort Message Format format Launching Messages get String Directory Source Location Unable to create memento for directory source location  0  1 new String get Directory get Absolute Path e NON NLS 1 catch Transformer Exception e abort Message Format format Launching Messages get String Directory Source Location Unable to create memento for directory source location  0  1 new String get Directory get Absolute Path e NON NLS 1 execution will not reach here return null  getMemento CoreException LaunchingPlugin getDocument createElement directorySourceLocation appendChild setAttribute getDirectory getAbsolutePath JavaLaunchConfigurationUtils serializeDocument IOException MessageFormat LaunchingMessages getString DirectorySourceLocation Unable_to_create_memento_for_directory_source_location_ _1 getDirectory getAbsolutePath ParserConfigurationException MessageFormat LaunchingMessages getString DirectorySourceLocation Unable_to_create_memento_for_directory_source_location_ _1 getDirectory getAbsolutePath TransformerException MessageFormat LaunchingMessages getString DirectorySourceLocation Unable_to_create_memento_for_directory_source_location_ _1 getDirectory getAbsolutePath
public void initialize From String memento throws Core Exception Exception ex null try Element root null Document Builder parser Document Builder Factory new Instance new Document Builder String Reader reader new String Reader memento Input Source source new Input Source reader root parser parse source get Document Element String path root get Attribute path NON NLS 1 if is Empty path abort Launching Messages get String Directory Source Location Unable to initialize source location   missing directory path 3 null NON NLS 1 else File dir new File path if dir exists dir is Directory set Directory dir else abort Message Format format Launching Messages get String Directory Source Location Unable to initialize source location   directory does not exist   0  4 new String path null NON NLS 1 return catch Parser Configuration Exception e ex e catch SAX Exception e ex e catch IO Exception e ex e abort Launching Messages get String Directory Source Location Exception occurred initializing source location  5 ex NON NLS 1  initializeFrom CoreException DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder StringReader StringReader InputSource InputSource getDocumentElement getAttribute isEmpty LaunchingMessages getString DirectorySourceLocation Unable_to_initialize_source_location_ _missing_directory_path_3 isDirectory setDirectory MessageFormat LaunchingMessages getString DirectorySourceLocation Unable_to_initialize_source_location_ _directory_does_not_exist__ _4 ParserConfigurationException SAXException IOException LaunchingMessages getString DirectorySourceLocation Exception_occurred_initializing_source_location _5
private boolean is Empty String string return string null string length 0  isEmpty
Throws an internal error exception private void abort String message Throwable e throws Core Exception I Status s new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR INTERNAL ERROR message e throw new Core Exception s  CoreException IStatus IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR CoreException

Returns an object representing the source code for a type with the specified name or code null code if none could be found The name is a fully qualified type name and may contain the character when referring to inner types For example code java lang String code The source element returned is implementation specific for example a resource a local file a zip file entry etc param name fully qualified name of the type for which source is being searched for return source element exception Core Exception if an exception occurs while searching for the specified source element  CoreException
Returns a memento for this source location from which this source location can be reconstructed return a memento for this source location exception Core Exception if unable to create a memento  CoreException
Initializes this source location from the given memento param memento a memento generated by this source location exception Core Exception if unable to initialize this source location  CoreException

Constructs a new empty source location to be initialized by a memento public Java Project Source Location  JavaProjectSourceLocation
Constructs a new source location that will retrieve source elements from the given Java project param project Java project public Java Project Source Location I Java Project project set Java Project project  JavaProjectSourceLocation IJavaProject setJavaProject
public Object find Source Element String name throws Core Exception if f Root Locations null for int i 0 i f Root Locations length i Object element f Root Locations i find Source Element name if element null return element return null  findSourceElement CoreException fRootLocations fRootLocations fRootLocations findSourceElement
Sets the Java project in which source elements will be searched for param project Java project private void set Java Project I Java Project project f Project project f Root Locations null if f Project null try I Package Fragment Root roots project get Package Fragment Roots Array List list new Array List roots length for int i 0 i roots length i if roots i get Kind I Package Fragment Root K SOURCE list add new Package Fragment Root Source Location roots i f Root Locations I Java Source Location list to Array new I Java Source Location list size catch Java Model Exception e Launching Plugin log e  setJavaProject IJavaProject fProject fRootLocations fProject IPackageFragmentRoot getPackageFragmentRoots ArrayList ArrayList getKind IPackageFragmentRoot K_SOURCE PackageFragmentRootSourceLocation fRootLocations IJavaSourceLocation toArray IJavaSourceLocation JavaModelException LaunchingPlugin
Returns the Java project associated with this source location return Java project public I Java Project get Java Project return f Project  IJavaProject getJavaProject fProject
see java lang Object equals java lang Object public boolean equals Object object return object instanceof Java Project Source Location get Java Project equals Java Project Source Location object get Java Project  JavaProjectSourceLocation getJavaProject JavaProjectSourceLocation getJavaProject
see java lang Object hash Code public int hash Code return get Java Project hash Code  hashCode hashCode getJavaProject hashCode
public String get Memento throws Core Exception try Document doc Launching Plugin get Document Element node doc create Element java Project Source Location NON NLS 1 doc append Child node node set Attribute name get Java Project get Element Name NON NLS 1 return Java Launch Configuration Utils serialize Document doc catch IO Exception e abort Message Format format Launching Messages get String Java Project Source Location Unable to create memento for Java project source location  0  1 new String get Java Project get Element Name e NON NLS 1 catch Parser Configuration Exception e abort Message Format format Launching Messages get String Java Project Source Location Unable to create memento for Java project source location  0  1 new String get Java Project get Element Name e NON NLS 1 catch Transformer Exception e abort Message Format format Launching Messages get String Java Project Source Location Unable to create memento for Java project source location  0  1 new String get Java Project get Element Name e NON NLS 1 execution will not reach here return null  getMemento CoreException LaunchingPlugin getDocument createElement javaProjectSourceLocation appendChild setAttribute getJavaProject getElementName JavaLaunchConfigurationUtils serializeDocument IOException MessageFormat LaunchingMessages getString JavaProjectSourceLocation Unable_to_create_memento_for_Java_project_source_location_ _1 getJavaProject getElementName ParserConfigurationException MessageFormat LaunchingMessages getString JavaProjectSourceLocation Unable_to_create_memento_for_Java_project_source_location_ _1 getJavaProject getElementName TransformerException MessageFormat LaunchingMessages getString JavaProjectSourceLocation Unable_to_create_memento_for_Java_project_source_location_ _1 getJavaProject getElementName
public void initialize From String memento throws Core Exception Exception ex null try Element root null Document Builder parser Document Builder Factory new Instance new Document Builder String Reader reader new String Reader memento Input Source source new Input Source reader root parser parse source get Document Element String name root get Attribute name NON NLS 1 if is Empty name abort Launching Messages get String Java Project Source Location Unable to initialize source location   missing project name 3 null NON NLS 1 else I Project proj Resources Plugin get Workspace get Root get Project name set Java Project Java Core create proj return catch Parser Configuration Exception e ex e catch SAX Exception e ex e catch IO Exception e ex e abort Launching Messages get String Java Project Source Location Exception occurred initializing source location  4 ex NON NLS 1  initializeFrom CoreException DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder StringReader StringReader InputSource InputSource getDocumentElement getAttribute isEmpty LaunchingMessages getString JavaProjectSourceLocation Unable_to_initialize_source_location_ _missing_project_name_3 IProject ResourcesPlugin getWorkspace getRoot getProject setJavaProject JavaCore ParserConfigurationException SAXException IOException LaunchingMessages getString JavaProjectSourceLocation Exception_occurred_initializing_source_location _4
private boolean is Empty String string return string null string length 0  isEmpty
Throws an internal error exception private void abort String message Throwable e throws Core Exception I Status s new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR INTERNAL ERROR message e throw new Core Exception s  CoreException IStatus IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR CoreException

Constructs a new empty Java Source Locator public Java Source Locator set Source Locations new I Java Source Location 0  JavaSourceLocator JavaSourceLocator setSourceLocations IJavaSourceLocation
Constructs a new Java source locator that looks in the specified project for source and required projects if code include Required code is code true code param projects the projects in which to look for source param include Required whether to look in required projects as well public Java Source Locator I Java Project projects boolean include Required throws Java Model Exception Array List required Projects new Array List for int i 0 i projects length i if include Required collect Required Projects projects i required Projects else if required Projects contains projects i required Projects add projects i only add external entires with the same location once Hash Map external new Hash Map Array List list new Array List compute the default locations for each project and add unique ones Iterator iter required Projects iterator while iter has Next I Java Project p I Java Project iter next try I Package Fragment Root roots p get Package Fragment Roots for int i 0 i roots length i if roots i is External I Path location roots i get Path if external get location null external put location location list add new Package Fragment Root Source Location roots i else list add new Package Fragment Root Source Location roots i catch Core Exception e if e instanceof Java Model Exception throw Java Model Exception e throw new Java Model Exception e I Java Source Location locations I Java Source Location list to Array new I Java Source Location list size set Source Locations locations  includeRequired includeRequired JavaSourceLocator IJavaProject includeRequired JavaModelException ArrayList requiredProjects ArrayList includeRequired collectRequiredProjects requiredProjects requiredProjects requiredProjects HashMap HashMap ArrayList ArrayList requiredProjects hasNext IJavaProject IJavaProject IPackageFragmentRoot getPackageFragmentRoots isExternal IPath getPath PackageFragmentRootSourceLocation PackageFragmentRootSourceLocation CoreException JavaModelException JavaModelException JavaModelException IJavaSourceLocation IJavaSourceLocation toArray IJavaSourceLocation setSourceLocations
Constructs a new Java Source Locator that searches the specified set of source locations for source elements param locations the source locations to search for source in the order they should be searched public Java Source Locator I Java Source Location locations set Source Locations locations  JavaSourceLocator JavaSourceLocator IJavaSourceLocation setSourceLocations
Constructs a new Java Source Locator that searches the default set of source locations for the given Java project param project Java project exception Core Exception if an exception occurs reading the classpath of the given or any required project public Java Source Locator I Java Project project throws Core Exception set Source Locations get Default Source Locations project  JavaSourceLocator CoreException JavaSourceLocator IJavaProject CoreException setSourceLocations getDefaultSourceLocations
Sets the locations that will be searched in the order to be searched param locations the locations that will be searched in the order to be searched public void set Source Locations I Java Source Location locations f Locations locations  setSourceLocations IJavaSourceLocation fLocations
Returns the locations that this source locator is currently searching in the order that they are searched return the locations that this source locator is currently searching in the order that they are searched public I Java Source Location get Source Locations return f Locations  IJavaSourceLocation getSourceLocations fLocations
Returns all source elements that correspond to the type associated with the given stack frame or code null code if none param stack Frame stack frame return all source elements that correspond to the type associated with the given stack frame or code null code if none since 2 1 public Object get Source Elements I Stack Frame stack Frame if stack Frame instanceof I Java Stack Frame I Java Stack Frame frame I Java Stack Frame stack Frame String name null try name get Fully Qualfied Name frame if name null return null catch Core Exception e if the thread has since resumed return null if e get Status get Code I Java Thread ERR THREAD NOT SUSPENDED Launching Plugin log e return null List list new Array List I Java Source Location locations get Source Locations for int i 0 i locations length i try Object source Element locations i find Source Element name if source Element null list add source Element catch Core Exception e log the error and try the next source location Launching Plugin log e return list to Array return null  stackFrame getSourceElements IStackFrame stackFrame stackFrame IJavaStackFrame IJavaStackFrame IJavaStackFrame stackFrame getFullyQualfiedName CoreException getStatus getCode IJavaThread ERR_THREAD_NOT_SUSPENDED LaunchingPlugin ArrayList IJavaSourceLocation getSourceLocations sourceElement findSourceElement sourceElement sourceElement CoreException LaunchingPlugin toArray
public Object get Source Element I Stack Frame stack Frame if stack Frame instanceof I Java Stack Frame I Java Stack Frame frame I Java Stack Frame stack Frame String name null try name get Fully Qualfied Name frame if name null return null catch Core Exception e if the thread has since resumed return null if e get Status get Code I Java Thread ERR THREAD NOT SUSPENDED Launching Plugin log e return null I Java Source Location locations get Source Locations for int i 0 i locations length i try Object source Element locations i find Source Element name if source Element null return source Element catch Core Exception e log the error and try the next source location Launching Plugin log e return null  getSourceElement IStackFrame stackFrame stackFrame IJavaStackFrame IJavaStackFrame IJavaStackFrame stackFrame getFullyQualfiedName CoreException getStatus getCode IJavaThread ERR_THREAD_NOT_SUSPENDED LaunchingPlugin IJavaSourceLocation getSourceLocations sourceElement findSourceElement sourceElement sourceElement CoreException LaunchingPlugin
private String get Fully Qualfied Name I Java Stack Frame frame throws Core Exception String name null if frame is Obsolete return null String source Name frame get Source Name if source Name null no debug attributes guess at source name name frame get Declaring Type Name else build source name from debug attributes using the source file name and the package of the declaring type see bug 21518 remove absolute path prefix int index source Name last Index Of if index 1 index source Name last Index Of if index 0 source Name source Name substring index 1 String decl Name frame get Declaring Type Name index decl Name last Index Of if index 0 name decl Name substring 0 index 1 else name NON NLS 1 index source Name last Index Of if index 0 name source Name substring 0 index return name  getFullyQualfiedName IJavaStackFrame CoreException isObsolete sourceName getSourceName sourceName getDeclaringTypeName sourceName lastIndexOf sourceName lastIndexOf sourceName sourceName declName getDeclaringTypeName declName lastIndexOf declName sourceName lastIndexOf sourceName
Adds all projects required by code proj code to the list code res code param proj the project for which to compute required projects param res the list to add all required projects too protected static void collect Required Projects I Java Project proj Array List res throws Java Model Exception if res contains proj res add proj I Java Model model proj get Java Model I Classpath Entry entries proj get Raw Classpath for int i 0 i entries length i I Classpath Entry curr entries i if curr get Entry Kind I Classpath Entry CPE PROJECT I Java Project ref model get Java Project curr get Path segment 0 if ref exists collect Required Projects ref res  collectRequiredProjects IJavaProject ArrayList JavaModelException IJavaModel getJavaModel IClasspathEntry getRawClasspath IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT IJavaProject getJavaProject getPath collectRequiredProjects
Returns a default collection of source locations for the given Java project Default source locations consist of the given project and all of its required projects param project Java project return a collection of source locations for all required projects exception Core Exception if an exception occurs reading computing the default locations public static I Java Source Location get Default Source Locations I Java Project project throws Core Exception create a temporary launch config I Launch Configuration Type type Debug Plugin get Default get Launch Manager get Launch Configuration Type I Java Launch Configuration Constants ID JAVA APPLICATION I Launch Configuration Working Copy config type new Instance null project get Element Name config set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME project get Element Name Java Source Locator locator new Java Source Locator locator initialize Defaults config return locator get Source Locations  CoreException IJavaSourceLocation getDefaultSourceLocations IJavaProject CoreException ILaunchConfigurationType DebugPlugin getDefault getLaunchManager getLaunchConfigurationType IJavaLaunchConfigurationConstants ID_JAVA_APPLICATION ILaunchConfigurationWorkingCopy newInstance getElementName setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME getElementName JavaSourceLocator JavaSourceLocator initializeDefaults getSourceLocations
public String get Memento throws Core Exception try Document doc Launching Plugin get Document Element node doc create Element java Source Locator NON NLS 1 doc append Child node I Java Source Location locations get Source Locations for int i 0 i locations length i Element child doc create Element java Source Location NON NLS 1 child set Attribute class locations i get Class get Name NON NLS 1 child set Attribute memento locations i get Memento NON NLS 1 node append Child child return Java Launch Configuration Utils serialize Document doc catch IO Exception e abort Launching Messages get String Java Source Locator Unable to create memento for Java source locator  4 e NON NLS 1 catch Parser Configuration Exception e abort Launching Messages get String Java Source Locator Unable to create memento for Java source locator  4 e NON NLS 1 catch Transformer Exception e abort Launching Messages get String Java Source Locator Unable to create memento for Java source locator  4 e NON NLS 1 execution will not reach here return null  getMemento CoreException LaunchingPlugin getDocument createElement javaSourceLocator appendChild IJavaSourceLocation getSourceLocations createElement javaSourceLocation setAttribute getClass getName setAttribute getMemento appendChild JavaLaunchConfigurationUtils serializeDocument IOException LaunchingMessages getString JavaSourceLocator Unable_to_create_memento_for_Java_source_locator _4 ParserConfigurationException LaunchingMessages getString JavaSourceLocator Unable_to_create_memento_for_Java_source_locator _4 TransformerException LaunchingMessages getString JavaSourceLocator Unable_to_create_memento_for_Java_source_locator _4
public void initialize Defaults I Launch Configuration configuration throws Core Exception I Runtime Classpath Entry entries Java Runtime compute Unresolved Source Lookup Path configuration I Runtime Classpath Entry resolved Java Runtime resolve Source Lookup Path entries configuration set Source Locations get Source Locations resolved  initializeDefaults ILaunchConfiguration CoreException IRuntimeClasspathEntry JavaRuntime computeUnresolvedSourceLookupPath IRuntimeClasspathEntry JavaRuntime resolveSourceLookupPath setSourceLocations getSourceLocations
public void initialize From Memento String memento throws Core Exception Exception ex null try Element root null Document Builder parser Document Builder Factory new Instance new Document Builder String Reader reader new String Reader memento Input Source source new Input Source reader root parser parse source get Document Element if root get Node Name equals Ignore Case java Source Locator NON NLS 1 abort Launching Messages get String Java Source Locator Unable to restore Java source locator   invalid format  6 null NON NLS 1 List source Locations new Array List Class Loader class Loader Launching Plugin get Default get Descriptor get Plugin Class Loader Node List list root get Child Nodes int length list get Length for int i 0 i length i Node node list item i short type node get Node Type if type Node ELEMENT NODE Element entry Element node if entry get Node Name equals Ignore Case java Source Location NON NLS 1 String class Name entry get Attribute class NON NLS 1 String data entry get Attribute memento NON NLS 1 if is Empty class Name abort Launching Messages get String Java Source Locator Unable to restore Java source locator   invalid format  10 null NON NLS 1 Class clazz null try clazz class Loader load Class class Name catch Class Not Found Exception e abort Message Format format Launching Messages get String Java Source Locator Unable to restore source location   class not found   0  11 new String class Name e NON NLS 1 I Java Source Location location null try location I Java Source Location clazz new Instance catch Illegal Access Exception e abort Launching Messages get String Java Source Locator Unable to restore source location  12 e NON NLS 1 catch Instantiation Exception e abort Launching Messages get String Java Source Locator Unable to restore source location  12 e NON NLS 1 location initialize From data source Locations add location else abort Launching Messages get String Java Source Locator Unable to restore Java source locator   invalid format  14 null NON NLS 1 set Source Locations I Java Source Location source Locations to Array new I Java Source Location source Locations size return catch Parser Configuration Exception e ex e catch SAX Exception e ex e catch IO Exception e ex e abort Launching Messages get String Java Source Locator Exception occurred initializing source locator  15 ex NON NLS 1  initializeFromMemento CoreException DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder StringReader StringReader InputSource InputSource getDocumentElement getNodeName equalsIgnoreCase javaSourceLocator LaunchingMessages getString JavaSourceLocator Unable_to_restore_Java_source_locator_ _invalid_format _6 sourceLocations ArrayList ClassLoader classLoader LaunchingPlugin getDefault getDescriptor getPluginClassLoader NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName equalsIgnoreCase javaSourceLocation className getAttribute getAttribute isEmpty className LaunchingMessages getString JavaSourceLocator Unable_to_restore_Java_source_locator_ _invalid_format _10 classLoader loadClass className ClassNotFoundException MessageFormat LaunchingMessages getString JavaSourceLocator Unable_to_restore_source_location_ _class_not_found__ _11 className IJavaSourceLocation IJavaSourceLocation newInstance IllegalAccessException LaunchingMessages getString JavaSourceLocator Unable_to_restore_source_location _12 InstantiationException LaunchingMessages getString JavaSourceLocator Unable_to_restore_source_location _12 initializeFrom sourceLocations LaunchingMessages getString JavaSourceLocator Unable_to_restore_Java_source_locator_ _invalid_format _14 setSourceLocations IJavaSourceLocation sourceLocations toArray IJavaSourceLocation sourceLocations ParserConfigurationException SAXException IOException LaunchingMessages getString JavaSourceLocator Exception_occurred_initializing_source_locator _15
Returns source locations that are associted with the given runtime classpath entries private static I Java Source Location get Source Locations I Runtime Classpath Entry entries List locations new Array List entries length for int i 0 i entries length i I Runtime Classpath Entry entry entries i I Java Source Location location null switch entry get Type case I Runtime Classpath Entry PROJECT I Project project I Project entry get Resource if project null project exists project is Open location new Java Project Source Location Java Core create project break case I Runtime Classpath Entry ARCHIVE check if the archive is in the workspace as a package fragment root location get Archive Source Location entry if location null String path entry get Source Attachment Location if path null if there is no source attachment look in the archive itself path entry get Location if path null File file new File path if file exists if file is Directory location new Directory Source Location file else location new Archive Source Location path entry get Source Attachment Root Location break case I Runtime Classpath Entry VARIABLE String source entry get Source Attachment Location if source null location new Archive Source Location source entry get Source Attachment Root Location break case I Runtime Classpath Entry CONTAINER throw new Illegal Argument Exception Launching Messages get String Java Source Locator Illegal to have a container resolved to a container 1 NON NLS 1 if location null locations add location return I Java Source Location locations to Array new I Java Source Location locations size  IJavaSourceLocation getSourceLocations IRuntimeClasspathEntry ArrayList IRuntimeClasspathEntry IJavaSourceLocation getType IRuntimeClasspathEntry IProject IProject getResource isOpen JavaProjectSourceLocation JavaCore IRuntimeClasspathEntry getArchiveSourceLocation getSourceAttachmentLocation getLocation isDirectory DirectorySourceLocation ArchiveSourceLocation getSourceAttachmentRootLocation IRuntimeClasspathEntry getSourceAttachmentLocation ArchiveSourceLocation getSourceAttachmentRootLocation IRuntimeClasspathEntry IllegalArgumentException LaunchingMessages getString JavaSourceLocator Illegal_to_have_a_container_resolved_to_a_container_1 IJavaSourceLocation toArray IJavaSourceLocation
private boolean is Empty String string return string null string length 0  isEmpty
Throws an internal error exception private void abort String message Throwable e throws Core Exception I Status s new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR INTERNAL ERROR message e throw new Core Exception s  CoreException IStatus IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR CoreException
Returns whether the given objects are equal allowing for code null code param a param b return whether the given objects are equal allowing for code null code private static boolean equal Or Null Object a Object b if a null return b null if b null return false return a equals b  equalOrNull
Returns whether the source attachments of the given package fragment root and runtime classpath entry are equal param root package fragment root param entry runtime classpath entry return whether the source attachments of the given package fragment root and runtime classpath entry are equal throws Java Model Exception private static boolean is Source Attachment Equal I Package Fragment Root root I Runtime Classpath Entry entry throws Java Model Exception return equal Or Null root get Source Attachment Path entry get Source Attachment Path  JavaModelException isSourceAttachmentEqual IPackageFragmentRoot IRuntimeClasspathEntry JavaModelException equalOrNull getSourceAttachmentPath getSourceAttachmentPath
Determines if the given archive runtime classpath entry exists in the workspace as a package fragment root Returns the associated package fragment root source location if possible otherwise code null code param entry archive runtime classpath entry return I Java Source Location or code null code private static I Java Source Location get Archive Source Location I Runtime Classpath Entry entry I Resource resource entry get Resource if resource null Check all package fragment roots for case of external archive External jars are shared so it does not matter which project it originates from I Java Model model Java Core create Resources Plugin get Workspace get Root try I Java Project jps model get Java Projects for int i 0 i jps length i I Package Fragment Root all Roots jps i get Package Fragment Roots for int j 0 j all Roots length j I Package Fragment Root root all Roots j if root is External root get Path equals new Path entry get Location if is Source Attachment Equal root entry use package fragment root return new Package Fragment Root Source Location root catch Java Model Exception e Launching Plugin log e else check if the archive is a package fragment root I Project project resource get Project I Java Project jp Java Core create project try if jp null jp exists I Package Fragment Root root jp get Package Fragment Root resource I Package Fragment Root all Roots jp get Package Fragment Roots for int j 0 j all Roots length j if all Roots j equals root ensure source attachment paths match if is Source Attachment Equal root entry use package fragment root return new Package Fragment Root Source Location root check all other java projects to see if another project references the archive I Java Model model Java Core create Resources Plugin get Workspace get Root I Java Project jps model get Java Projects for int i 0 i jps length i I Package Fragment Root all Roots jps i get Package Fragment Roots for int j 0 j all Roots length j I Package Fragment Root root all Roots j if root is External root get Path equals entry get Path if is Source Attachment Equal root entry use package fragment root return new Package Fragment Root Source Location root catch Java Model Exception e Launching Plugin log e return null  IJavaSourceLocation IJavaSourceLocation getArchiveSourceLocation IRuntimeClasspathEntry IResource getResource IJavaModel JavaCore ResourcesPlugin getWorkspace getRoot IJavaProject getJavaProjects IPackageFragmentRoot allRoots getPackageFragmentRoots allRoots IPackageFragmentRoot allRoots isExternal getPath getLocation isSourceAttachmentEqual PackageFragmentRootSourceLocation JavaModelException LaunchingPlugin IProject getProject IJavaProject JavaCore IPackageFragmentRoot getPackageFragmentRoot IPackageFragmentRoot allRoots getPackageFragmentRoots allRoots allRoots isSourceAttachmentEqual PackageFragmentRootSourceLocation IJavaModel JavaCore ResourcesPlugin getWorkspace getRoot IJavaProject getJavaProjects IPackageFragmentRoot allRoots getPackageFragmentRoots allRoots IPackageFragmentRoot allRoots isExternal getPath getPath isSourceAttachmentEqual PackageFragmentRootSourceLocation JavaModelException LaunchingPlugin

Constructs and returns storage for the given file param file a local file public Local File Storage File file super file  LocalFileStorage

Creates an empty source location public Package Fragment Root Source Location  PackageFragmentRootSourceLocation
Creates a source location on the given package fragment root param root package fragment root public Package Fragment Root Source Location I Package Fragment Root root set Package Fragment Root root  PackageFragmentRootSourceLocation IPackageFragmentRoot setPackageFragmentRoot
public Object find Source Element String name throws Core Exception if name null get Package Fragment Root null I Package Fragment pkg null int index name last Index Of if index 0 String fragment name substring 0 index pkg get Package Fragment Root get Package Fragment fragment name name substring index 1 else pkg get Package Fragment Root get Package Fragment NON NLS 1 if pkg exists boolean possible Inner Type false String type Name name do I Compilation Unit cu pkg get Compilation Unit type Name java NON NLS 1 if cu exists return cu I Class File cf pkg get Class File type Name class NON NLS 1 if cf exists return cf index type Name last Index Of if index 0 type Name type Name substring 0 index possible Inner Type true else possible Inner Type false while possible Inner Type return null  findSourceElement CoreException getPackageFragmentRoot IPackageFragment lastIndexOf getPackageFragmentRoot getPackageFragment getPackageFragmentRoot getPackageFragment possibleInnerType typeName ICompilationUnit getCompilationUnit typeName IClassFile getClassFile typeName typeName lastIndexOf typeName typeName possibleInnerType possibleInnerType possibleInnerType
public String get Memento throws Core Exception try Document doc Launching Plugin get Document Element node doc create Element java Package Fragment Root Source Location NON NLS 1 doc append Child node String handle NON NLS 1 if get Package Fragment Root null handle get Package Fragment Root get Handle Identifier node set Attribute handle Id handle NON NLS 1 return Java Launch Configuration Utils serialize Document doc catch IO Exception e abort Message Format format Launching Messages get String Package Fragment Root Source Location Unable to create memento for package fragment root source location  0  5 new String get Package Fragment Root get Element Name e NON NLS 1 catch Parser Configuration Exception e abort Message Format format Launching Messages get String Package Fragment Root Source Location Unable to create memento for package fragment root source location  0  5 new String get Package Fragment Root get Element Name e NON NLS 1 catch Transformer Exception e abort Message Format format Launching Messages get String Package Fragment Root Source Location Unable to create memento for package fragment root source location  0  5 new String get Package Fragment Root get Element Name e NON NLS 1 execution will not reach here return null  getMemento CoreException LaunchingPlugin getDocument createElement javaPackageFragmentRootSourceLocation appendChild getPackageFragmentRoot getPackageFragmentRoot getHandleIdentifier setAttribute handleId JavaLaunchConfigurationUtils serializeDocument IOException MessageFormat LaunchingMessages getString PackageFragmentRootSourceLocation Unable_to_create_memento_for_package_fragment_root_source_location_ _5 getPackageFragmentRoot getElementName ParserConfigurationException MessageFormat LaunchingMessages getString PackageFragmentRootSourceLocation Unable_to_create_memento_for_package_fragment_root_source_location_ _5 getPackageFragmentRoot getElementName TransformerException MessageFormat LaunchingMessages getString PackageFragmentRootSourceLocation Unable_to_create_memento_for_package_fragment_root_source_location_ _5 getPackageFragmentRoot getElementName
public void initialize From String memento throws Core Exception Exception ex null try Element root null Document Builder parser Document Builder Factory new Instance new Document Builder String Reader reader new String Reader memento Input Source source new Input Source reader root parser parse source get Document Element String handle root get Attribute handle Id NON NLS 1 if handle null abort Launching Messages get String Package Fragment Root Source Location Unable to initialize source location   missing handle identifier for package fragment root  6 null NON NLS 1 else if handle length 0 empty package fragment set Package Fragment Root null else I Java Element element Java Core create handle if element instanceof I Package Fragment Root set Package Fragment Root I Package Fragment Root element else abort Launching Messages get String Package Fragment Root Source Location Unable to initialize source location   package fragment root does not exist  7 null NON NLS 1 return catch Parser Configuration Exception e ex e catch SAX Exception e ex e catch IO Exception e ex e abort Launching Messages get String Package Fragment Root Source Location Exception occurred initializing source location  8 ex NON NLS 1  initializeFrom CoreException DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder StringReader StringReader InputSource InputSource getDocumentElement getAttribute handleId LaunchingMessages getString PackageFragmentRootSourceLocation Unable_to_initialize_source_location_ _missing_handle_identifier_for_package_fragment_root _6 setPackageFragmentRoot IJavaElement JavaCore IPackageFragmentRoot setPackageFragmentRoot IPackageFragmentRoot LaunchingMessages getString PackageFragmentRootSourceLocation Unable_to_initialize_source_location_ _package_fragment_root_does_not_exist _7 ParserConfigurationException SAXException IOException LaunchingMessages getString PackageFragmentRootSourceLocation Exception_occurred_initializing_source_location _8
Returns the package fragment root associated with this source location or code null code if none return the package fragment root associated with this source location or code null code if none public I Package Fragment Root get Package Fragment Root return f Root  IPackageFragmentRoot getPackageFragmentRoot fRoot
Sets the package fragment root associated with this source location param root package fragment root private void set Package Fragment Root I Package Fragment Root root f Root root  setPackageFragmentRoot IPackageFragmentRoot fRoot
Throws an internal error exception private void abort String message Throwable e throws Core Exception I Status s new Status I Status ERROR Launching Plugin get Unique Identifier I Java Launch Configuration Constants ERR INTERNAL ERROR message e throw new Core Exception s  CoreException IStatus IStatus LaunchingPlugin getUniqueIdentifier IJavaLaunchConfigurationConstants ERR_INTERNAL_ERROR CoreException
public boolean equals Object object if object instanceof Package Fragment Root Source Location Package Fragment Root Source Location root Package Fragment Root Source Location object if get Package Fragment Root null return root get Package Fragment Root null return get Package Fragment Root equals root get Package Fragment Root return false  PackageFragmentRootSourceLocation PackageFragmentRootSourceLocation PackageFragmentRootSourceLocation getPackageFragmentRoot getPackageFragmentRoot getPackageFragmentRoot getPackageFragmentRoot
public int hash Code if get Package Fragment Root null return get Class hash Code return get Package Fragment Root hash Code  hashCode getPackageFragmentRoot getClass hashCode getPackageFragmentRoot hashCode

Constructs a new storage implementation for the given zip entry in the specified zip file param archive zip file param entry zip entry public Zip Entry Storage Zip File archive Zip Entry entry super archive entry  ZipEntryStorage ZipFile ZipEntry

public I Runtime Classpath Entry compute Unresolved Classpath I Launch Configuration configuration throws Core Exception boolean use Default configuration get Attribute I Java Launch Configuration Constants ATTR DEFAULT CLASSPATH true if use Default I Java Project proj Java Runtime get Java Project configuration if proj null no project use JRE s default libraries return computeJRE Libraries configuration return Java Runtime compute Unresolved Runtime Classpath proj recover persisted classpath return recover Runtime Path configuration I Java Launch Configuration Constants ATTR CLASSPATH  IRuntimeClasspathEntry computeUnresolvedClasspath ILaunchConfiguration CoreException useDefault getAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_CLASSPATH useDefault IJavaProject JavaRuntime getJavaProject computeJRELibraries JavaRuntime computeUnresolvedRuntimeClasspath recoverRuntimePath IJavaLaunchConfigurationConstants ATTR_CLASSPATH
private I Runtime Classpath Entry computeJRE Libraries I Launch Configuration configuration throws Core Exception IVM Install vm Java Runtime computeVM Install configuration I Path path new Path Java Runtime JRE CONTAINER path path append vm getVM Install Type get Id append vm get Name I Runtime Classpath Entry entry Java Runtime new Runtime Container Classpath Entry path I Runtime Classpath Entry STANDARD CLASSES return new I Runtime Classpath Entry entry  IRuntimeClasspathEntry computeJRELibraries ILaunchConfiguration CoreException IVMInstall JavaRuntime computeVMInstall IPath JavaRuntime JRE_CONTAINER getVMInstallType getId getName IRuntimeClasspathEntry JavaRuntime newRuntimeContainerClasspathEntry IRuntimeClasspathEntry STANDARD_CLASSES IRuntimeClasspathEntry
public I Runtime Classpath Entry resolve Classpath I Runtime Classpath Entry entries I Launch Configuration configuration throws Core Exception List all new Array List entries length for int i 0 i entries length i I Runtime Classpath Entry resolved Java Runtime resolve Runtime Classpath Entry entries i configuration for int j 0 j resolved length j all add resolved j return I Runtime Classpath Entry all to Array new I Runtime Classpath Entry all size  IRuntimeClasspathEntry resolveClasspath IRuntimeClasspathEntry ILaunchConfiguration CoreException ArrayList IRuntimeClasspathEntry JavaRuntime resolveRuntimeClasspathEntry IRuntimeClasspathEntry toArray IRuntimeClasspathEntry
Returns a collection of runtime classpath entries that are defined in the specified attribute of the given launch configuration When present the attribute must contain a list of runtime classpath entry mementos param configuration launch configuration param attribute attribute name containing the list of entries return collection of runtime classpath entries that are defined in the specified attribute of the given launch configuration exception Core Exception if unable to retrieve the list protected I Runtime Classpath Entry recover Runtime Path I Launch Configuration configuration String attribute throws Core Exception List entries configuration get Attribute attribute Collections EMPTY LIST I Runtime Classpath Entry rtes new I Runtime Classpath Entry entries size Iterator iter entries iterator int i 0 while iter has Next rtes i Java Runtime new Runtime Classpath Entry String iter next i return rtes  CoreException IRuntimeClasspathEntry recoverRuntimePath ILaunchConfiguration CoreException getAttribute EMPTY_LIST IRuntimeClasspathEntry IRuntimeClasspathEntry hasNext JavaRuntime newRuntimeClasspathEntry

public I Runtime Classpath Entry compute Unresolved Classpath I Launch Configuration configuration throws Core Exception boolean use Default configuration get Attribute I Java Launch Configuration Constants ATTR DEFAULT SOURCE PATH true I Runtime Classpath Entry entries null if use Default the default source lookup path is the same as the classpath entries super compute Unresolved Classpath configuration else recover persisted source path entries recover Runtime Path configuration I Java Launch Configuration Constants ATTR SOURCE PATH return entries  IRuntimeClasspathEntry computeUnresolvedClasspath ILaunchConfiguration CoreException useDefault getAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_SOURCE_PATH IRuntimeClasspathEntry useDefault computeUnresolvedClasspath recoverRuntimePath IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH
public I Runtime Classpath Entry resolve Classpath I Runtime Classpath Entry entries I Launch Configuration configuration throws Core Exception List all new Array List entries length for int i 0 i entries length i switch entries i get Type case I Runtime Classpath Entry PROJECT a project resolves to itself for source lookup rather than the class file output locations all add entries i break case I Runtime Classpath Entry OTHER I Runtime Classpath Entry2 entry I Runtime Classpath Entry2 entries i String type Id entry get Type Id I Runtime Classpath Entry res null if type Id equals Default Project Classpath Entry TYPE ID add the resolved children of the project I Runtime Classpath Entry children entry get Runtime Classpath Entries configuration res Java Runtime resolve Source Lookup Path children configuration else if type Id equals Variable Classpath Entry TYPE ID add the archive itself we currently do not allow a source attachment res Java Runtime resolve Runtime Classpath Entry entry configuration if res null for int j 0 j res length j all add res j break default I Runtime Classpath Entry resolved Java Runtime resolve Runtime Classpath Entry entries i configuration for int j 0 j resolved length j all add resolved j break return I Runtime Classpath Entry all to Array new I Runtime Classpath Entry all size  IRuntimeClasspathEntry resolveClasspath IRuntimeClasspathEntry ILaunchConfiguration CoreException ArrayList getType IRuntimeClasspathEntry IRuntimeClasspathEntry IRuntimeClasspathEntry2 IRuntimeClasspathEntry2 typeId getTypeId IRuntimeClasspathEntry typeId DefaultProjectClasspathEntry TYPE_ID IRuntimeClasspathEntry getRuntimeClasspathEntries JavaRuntime resolveSourceLookupPath typeId VariableClasspathEntry TYPE_ID JavaRuntime resolveRuntimeClasspathEntry IRuntimeClasspathEntry JavaRuntime resolveRuntimeClasspathEntry IRuntimeClasspathEntry toArray IRuntimeClasspathEntry

Creates a new configuration for launching a VM to run the given main class using the given class path param class To Launch The fully qualified name of the class to launch May not be null param class Path The classpath May not be null public VM Runner Configuration String class To Launch String class Path if class To Launch null throw new Illegal Argument Exception Launching Messages get String vm Runner Config assert class Not Null NON NLS 1 if class Path null throw new Illegal Argument Exception Launching Messages get String vm Runner Config assert class Path Not Null NON NLS 1 f Class To Launch class To Launch f Class Path class Path  classToLaunch classPath VMRunnerConfiguration classToLaunch classPath classToLaunch IllegalArgumentException LaunchingMessages getString vmRunnerConfig classNotNull classPath IllegalArgumentException LaunchingMessages getString vmRunnerConfig classPathNotNull fClassToLaunch classToLaunch fClassPath classPath
Sets the code Map code that contains String name value pairs that represent VM specific attributes param map the code Map code of VM specific attributes since 2 0 public void setVM Specific Attributes Map Map map fVM Specific Attributes Map map  setVMSpecificAttributesMap fVMSpecificAttributesMap
Sets the custom VM arguments These arguments will be appended to the list of VM arguments that a VM runner uses when launching a VM Typically these VM arguments are set by the user These arguments will not be interpreted by a VM runner the client is responsible for passing arguments compatible with a particular VM runner param args the list of VM arguments public void setVM Arguments String args if args null throw new Illegal Argument Exception Launching Messages get String vm Runner Config assert vm Args Not Null NON NLS 1 fVM Args args  setVMArguments IllegalArgumentException LaunchingMessages getString vmRunnerConfig vmArgsNotNull fVMArgs
Sets the custom program arguments These arguments will be appended to the list of program arguments that a VM runner uses when launching a VM in general none Typically these VM arguments are set by the user These arguments will not be interpreted by a VM runner the client is responsible for passing arguments compatible with a particular VM runner param args the list of arguments public void set Program Arguments String args if args null throw new Illegal Argument Exception Launching Messages get String vm Runner Config assert program Args Not Null NON NLS 1 f Program Args args  setProgramArguments IllegalArgumentException LaunchingMessages getString vmRunnerConfig programArgsNotNull fProgramArgs
Sets the environment for the Java program The Java VM will be launched in the given environment param environment the environment for the Java program specified as an array of strings each element specifying an environment variable setting in the format i name i i value i since 3 0 public void set Environment String environment f Environment environment  setEnvironment fEnvironment
Sets the boot classpath Note that the boot classpath will be passed to the VM as is This means it has to be complete Interpretation of the boot class path is up to the VM runner this object is passed to p In release 3 0 support has been added for appending and prepending the boot classpath Generally an code IVM Runner code should use the prepend main and append boot classpaths provided However in the case that an code IVM Runner code does not support these options a complete boothpath should also be specified p param boot Class Path The boot classpath An emptry array indicates an empty bootpath and code null code indicates a default bootpath public void set Boot Class Path String boot Class Path f Boot Class Path boot Class Path  IVMRunner IVMRunner bootClassPath setBootClassPath bootClassPath fBootClassPath bootClassPath
Returns the code Map code that contains String name value pairs that represent VM specific attributes return The code Map code of VM specific attributes or code null code since 2 0 public Map getVM Specific Attributes Map return fVM Specific Attributes Map  getVMSpecificAttributesMap fVMSpecificAttributesMap
Returns the name of the class to launch return The fully qualified name of the class to launch Will not be code null code public String get Class To Launch return f Class To Launch  getClassToLaunch fClassToLaunch
Returns the classpath return the classpath public String get Class Path return f Class Path  getClassPath fClassPath
Returns the boot classpath An empty array indicates an empty bootpath and code null code indicates a default bootpah p In 3 0 support has been added for prepending and appending to the boot classpath The new attributes are stored in the VM specific attributes map using the following keys defined in code I Java Launch Configuration Constants code ul li ATTR BOOTPATH PREPEND li li ATTR BOOTPATH APPEND li li ATTR BOOTPATH li ul p return The boot classpath An emptry array indicates an empty bootpath and code null code indicates a default bootpah see set Boot Class Path String see I Java Launch Configuration Constants public String get Boot Class Path return f Boot Class Path  IJavaLaunchConfigurationConstants ATTR_BOOTPATH_PREPEND ATTR_BOOTPATH_APPEND ATTR_BOOTPATH setBootClassPath IJavaLaunchConfigurationConstants getBootClassPath fBootClassPath
Returns the arguments to the VM itself return The VM arguments Default is an empty array Will not be code null code see setVM Arguments String public String getVM Arguments if fVM Args null return fg Empty return fVM Args  setVMArguments getVMArguments fVMArgs fgEmpty fVMArgs
Returns the arguments to the Java program return The Java program arguments Default is an empty array Will not be code null code see set Program Arguments String public String get Program Arguments if f Program Args null return fg Empty return f Program Args  setProgramArguments getProgramArguments fProgramArgs fgEmpty fProgramArgs
Returns the environment for the Java program or code null code return The Java program environment Default is code null code since 3 0 public String get Environment return f Environment  getEnvironment fEnvironment
Sets the working directory for a launched VM param path the absolute path to the working directory to be used by a launched VM or code null code if the default working directory is to be inherited from the current process since 2 0 public void set Working Directory String path f Working Directory path  setWorkingDirectory fWorkingDirectory
Returns the working directory of a launched VM return the absolute path to the working directory of a launched VM or code null code if the working directory is inherited from the current process since 2 0 public String get Working Directory return f Working Directory  getWorkingDirectory fWorkingDirectory
Sets whether the VM is resumed on startup when launched in debug mode Has no effect when not in debug mode param resume whehter to resume the VM on startup since 3 0 public void set Resume On Startup boolean resume f Resume resume  setResumeOnStartup fResume
Returns whether the VM is resumed on startup when lanched in debug mode Has no effect when no in debug mode Default value is code true code for backwards compatibility return whether to resume the VM on startup since 3 0 public boolean is Resume On Startup return f Resume  isResumeOnStartup fResume

see org eclipse jdt launching AbstractVM Install AbstractVM Install org eclipse jdt launching IVM Install Type java lang String public VM Standin IVM Install Type type String id super type id set Notify false  AbstractVMInstall AbstractVMInstall IVMInstallType VMStandin IVMInstallType setNotify
Construct a code VM Standin code instance based on the specified code IVM Install code Changes to this standin will not be reflected in the real VM until code convert To RealVM code is called param realVM the real VM from which to construct this standin VM public VM Standin IVM Install realVM this realVM getVM Install Type realVM get Id set Name realVM get Name set Install Location realVM get Install Location set Library Locations realVM get Library Locations set Javadoc Location realVM get Javadoc Location setVM Arguments realVM getVM Arguments  VMStandin IVMInstall convertToRealVM VMStandin IVMInstall getVMInstallType getId setName getName setInstallLocation getInstallLocation setLibraryLocations getLibraryLocations setJavadocLocation getJavadocLocation setVMArguments getVMArguments
If no corresponding real VM exists create one and populate it from this standin instance If a corresponding VM exists update its attributes from this standin instance return IVM Install the real corresponding to this standin VM public IVM Install convert To RealVM IVM Install Type vm Type getVM Install Type IVM Install realVM vm Type findVM Install get Id boolean notify true if realVM null realVM vm Type createVM Install get Id notify false do not notify of property changes on new V Ms if realVM instanceof AbstractVM Install AbstractVM Install realVM set Notify notify realVM set Name get Name realVM set Install Location get Install Location realVM set Library Locations get Library Locations realVM set Javadoc Location get Javadoc Location realVM setVM Arguments getVM Arguments if realVM instanceof AbstractVM Install AbstractVM Install realVM set Notify true if notify Java Runtime fireVM Added realVM return realVM  IVMInstall IVMInstall convertToRealVM IVMInstallType vmType getVMInstallType IVMInstall vmType findVMInstall getId vmType createVMInstall getId VMs AbstractVMInstall AbstractVMInstall setNotify setName getName setInstallLocation getInstallLocation setLibraryLocations getLibraryLocations setJavadocLocation getJavadocLocation setVMArguments getVMArguments AbstractVMInstall AbstractVMInstall setNotify JavaRuntime fireVMAdded

Creates a new code Open Action code The action requires that the selection provided by the site s selection provider is of type code org eclipse jface viewers I Structured Selection code param site the site providing context information for this action public Open Action I Workbench Site site super site set Text Action Messages get String Open Action label NON NLS 1 set Tool Tip Text Action Messages get String Open Action tooltip NON NLS 1 set Description Action Messages get String Open Action description NON NLS 1 Workbench Help set Help this I Java Help Context Ids OPEN ACTION  OpenAction IStructuredSelection OpenAction IWorkbenchSite setText ActionMessages getString OpenAction setToolTipText ActionMessages getString OpenAction setDescription ActionMessages getString OpenAction WorkbenchHelp setHelp IJavaHelpContextIds OPEN_ACTION
Note This constructor is for internal use only Clients should not call this constructor public Open Action Java Editor editor this editor get Editor Site f Editor editor set Text Action Messages get String Open Action declaration label NON NLS 1 set Enabled Selection Converter can Operate On f Editor  OpenAction JavaEditor getEditorSite fEditor setText ActionMessages getString OpenAction setEnabled SelectionConverter canOperateOn fEditor
Method declared on Selection Dispatch Action public void selection Changed I Text Selection selection  SelectionDispatchAction selectionChanged ITextSelection
Method declared on Selection Dispatch Action public void selection Changed I Structured Selection selection set Enabled check Enabled selection  SelectionDispatchAction selectionChanged IStructuredSelection setEnabled checkEnabled
private boolean check Enabled I Structured Selection selection if selection is Empty return false for Iterator iter selection iterator iter has Next Object element iter next if element instanceof I Source Reference continue if element instanceof I File continue if element instanceof I Storage continue return false return true  checkEnabled IStructuredSelection isEmpty hasNext ISourceReference IFile IStorage
public void run I Text Selection selection if Action Util is Processable get Shell f Editor return try I Java Element element Selection Converter code Resolve f Editor get Shell get Dialog Title Action Messages get String Open Action select element NON NLS 1 if element null I Editor Status Line status Line I Editor Status Line f Editor get Adapter I Editor Status Line class if status Line null status Line set Message true Action Messages get String Open Action error message Bad Selection null NON NLS 1 get Shell get Display beep return I Java Element input Selection Converter get Input f Editor int type element get Element Type if type I Java Element JAVA PROJECT type I Java Element PACKAGE FRAGMENT ROOT type I Java Element PACKAGE FRAGMENT element input run new Object element catch Java Model Exception e show Error e  ITextSelection ActionUtil isProcessable getShell fEditor IJavaElement SelectionConverter codeResolve fEditor getShell getDialogTitle ActionMessages getString OpenAction select_element IEditorStatusLine statusLine IEditorStatusLine fEditor getAdapter IEditorStatusLine statusLine statusLine setMessage ActionMessages getString OpenAction messageBadSelection getShell getDisplay IJavaElement SelectionConverter getInput fEditor getElementType IJavaElement JAVA_PROJECT IJavaElement PACKAGE_FRAGMENT_ROOT IJavaElement PACKAGE_FRAGMENT JavaModelException showError
public void run I Structured Selection selection if check Enabled selection return run selection to Array  IStructuredSelection checkEnabled toArray
Note this method is for internal use only Clients should not call this method public void run Object elements if elements null return for int i 0 i elements length i Object element elements i try element get Element To Open element boolean activate On Open f Editor null true Open Strategy activate On Open Open Action Util open element activate On Open catch Java Model Exception e Java Plugin log new Status I Status ERROR Java Plugin get Plugin Id I Java Status Constants INTERNAL ERROR Action Messages get String Open Action error message e NON NLS 1 Error Dialog open Error get Shell get Dialog Title Action Messages get String Open Action error message Problems NON NLS 1 e get Status catch Part Init Exception x String name null if element instanceof I Java Element name I Java Element element get Element Name else if element instanceof I Storage name I Storage element get Name else if element instanceof I Resource name I Resource element get Name if name null Message Dialog open Error get Shell Action Messages get String Open Action error message Problems NON NLS 1 Action Messages get Formatted String Open Action error message Args NON NLS 1 new String name x get Message  getElementToOpen activateOnOpen fEditor OpenStrategy activateOnOpen OpenActionUtil activateOnOpen JavaModelException JavaPlugin IStatus JavaPlugin getPluginId IJavaStatusConstants INTERNAL_ERROR ActionMessages getString OpenAction ErrorDialog openError getShell getDialogTitle ActionMessages getString OpenAction messageProblems getStatus PartInitException IJavaElement IJavaElement getElementName IStorage IStorage getName IResource IResource getName MessageDialog openError getShell ActionMessages getString OpenAction messageProblems ActionMessages getFormattedString OpenAction messageArgs getMessage
Note this method is for internal use only Clients should not call this method public Object get Element To Open Object object throws Java Model Exception return object  getElementToOpen JavaModelException
private String get Dialog Title return Action Messages get String Open Action error title NON NLS 1  getDialogTitle ActionMessages getString OpenAction
private void show Error Core Exception e Exception Handler handle e get Shell get Dialog Title Action Messages get String Open Action error message NON NLS 1  showError CoreException ExceptionHandler getShell getDialogTitle ActionMessages getString OpenAction

Creates a new code Open Type Hierarchy Action code The action requires that the selection provided by the site s selection provider is of type code org eclipse jface viewers I Structured Selection code param site the site providing context information for this action public Open Type Hierarchy Action I Workbench Site site super site set Text Action Messages get String Open Type Hierarchy Action label NON NLS 1 set Tool Tip Text Action Messages get String Open Type Hierarchy Action tooltip NON NLS 1 set Description Action Messages get String Open Type Hierarchy Action description NON NLS 1 Workbench Help set Help this I Java Help Context Ids OPEN TYPE HIERARCHY ACTION  OpenTypeHierarchyAction IStructuredSelection OpenTypeHierarchyAction IWorkbenchSite setText ActionMessages getString OpenTypeHierarchyAction setToolTipText ActionMessages getString OpenTypeHierarchyAction setDescription ActionMessages getString OpenTypeHierarchyAction WorkbenchHelp setHelp IJavaHelpContextIds OPEN_TYPE_HIERARCHY_ACTION
Note This constructor is for internal use only Clients should not call this constructor public Open Type Hierarchy Action Java Editor editor this editor get Editor Site f Editor editor set Enabled Selection Converter can Operate On f Editor  OpenTypeHierarchyAction JavaEditor getEditorSite fEditor setEnabled SelectionConverter canOperateOn fEditor
Method declared on Selection Dispatch Action public void selection Changed I Text Selection selection  SelectionDispatchAction selectionChanged ITextSelection
Method declared on Selection Dispatch Action public void selection Changed I Structured Selection selection set Enabled is Enabled selection  SelectionDispatchAction selectionChanged IStructuredSelection setEnabled isEnabled
private boolean is Enabled I Structured Selection selection if selection size 1 return false Object input selection get First Element if input instanceof I Java Element return false switch I Java Element input get Element Type case I Java Element INITIALIZER case I Java Element METHOD case I Java Element FIELD case I Java Element TYPE return true case I Java Element PACKAGE FRAGMENT ROOT case I Java Element JAVA PROJECT case I Java Element PACKAGE FRAGMENT case I Java Element PACKAGE DECLARATION case I Java Element IMPORT DECLARATION case I Java Element CLASS FILE case I Java Element COMPILATION UNIT return true case I Java Element LOCAL VARIABLE default return false  isEnabled IStructuredSelection getFirstElement IJavaElement IJavaElement getElementType IJavaElement IJavaElement IJavaElement IJavaElement IJavaElement PACKAGE_FRAGMENT_ROOT IJavaElement JAVA_PROJECT IJavaElement PACKAGE_FRAGMENT IJavaElement PACKAGE_DECLARATION IJavaElement IMPORT_DECLARATION IJavaElement CLASS_FILE IJavaElement COMPILATION_UNIT IJavaElement LOCAL_VARIABLE
public void run I Text Selection selection I Java Element input Selection Converter get Input f Editor if Action Util is Processable get Shell input return I Java Element elements Selection Converter code Resolve Or Input Handled f Editor get Shell get Dialog Title if elements null return List candidates new Array List elements length for int i 0 i elements length i I Java Element resolved Elements Open Type Hierarchy Util get Candidates elements i if resolved Elements null candidates add All Arrays as List resolved Elements run I Java Element candidates to Array new I Java Element candidates size  ITextSelection IJavaElement SelectionConverter getInput fEditor ActionUtil isProcessable getShell IJavaElement SelectionConverter codeResolveOrInputHandled fEditor getShell getDialogTitle ArrayList IJavaElement resolvedElements OpenTypeHierarchyUtil getCandidates resolvedElements addAll asList resolvedElements IJavaElement toArray IJavaElement
public void run I Structured Selection selection if selection size 1 return Object input selection get First Element if input instanceof I Java Element I Status status create Status Action Messages get String Open Type Hierarchy Action messages no java element NON NLS 1 Error Dialog open Error get Shell get Dialog Title Action Messages get String Open Type Hierarchy Action messages title status NON NLS 1 return I Java Element element I Java Element input if Action Util is Processable get Shell element return List result new Array List 1 I Status status compile Candidates result element if status isOK run I Java Element result to Array new I Java Element result size else Error Dialog open Error get Shell get Dialog Title Action Messages get String Open Type Hierarchy Action messages title status NON NLS 1  IStructuredSelection getFirstElement IJavaElement IStatus createStatus ActionMessages getString OpenTypeHierarchyAction no_java_element ErrorDialog openError getShell getDialogTitle ActionMessages getString OpenTypeHierarchyAction IJavaElement IJavaElement ActionUtil isProcessable getShell ArrayList IStatus compileCandidates IJavaElement toArray IJavaElement ErrorDialog openError getShell getDialogTitle ActionMessages getString OpenTypeHierarchyAction
public void run I Java Element elements if elements length 0 get Shell get Display beep return Open Type Hierarchy Util open elements get Site get Workbench Window  IJavaElement getShell getDisplay OpenTypeHierarchyUtil getSite getWorkbenchWindow
private static String get Dialog Title return Action Messages get String Open Type Hierarchy Action dialog title NON NLS 1  getDialogTitle ActionMessages getString OpenTypeHierarchyAction
private static I Status compile Candidates List result I Java Element elem I Status ok new Status I Status OK Java Plugin get Plugin Id 0 null NON NLS 1 try switch elem get Element Type case I Java Element INITIALIZER case I Java Element METHOD case I Java Element FIELD case I Java Element TYPE case I Java Element PACKAGE FRAGMENT ROOT case I Java Element JAVA PROJECT result add elem return ok case I Java Element PACKAGE FRAGMENT if I Package Fragment elem contains Java Resources result add elem return ok return create Status Action Messages get String Open Type Hierarchy Action messages no java resources NON NLS 1 case I Java Element PACKAGE DECLARATION result add elem get Ancestor I Java Element PACKAGE FRAGMENT return ok case I Java Element IMPORT DECLARATION I Import Declaration decl I Import Declaration elem if decl is On Demand elem Java Model Util find Type Container elem get Java Project Signature get Qualifier elem get Element Name else elem elem get Java Project find Type elem get Element Name if elem null result add elem return ok elem elem get Ancestor I Java Element COMPILATION UNIT case I Java Element CLASS FILE result add I Class File elem get Type return ok case I Java Element COMPILATION UNIT I Compilation Unit cu I Compilation Unit elem I Type types cu get Types if types length 0 result add All Arrays as List types return ok return create Status Action Messages get String Open Type Hierarchy Action messages no types NON NLS 1 catch Java Model Exception e return e get Status return create Status Action Messages get String Open Type Hierarchy Action messages no valid java element NON NLS 1  IStatus compileCandidates IJavaElement IStatus IStatus JavaPlugin getPluginId getElementType IJavaElement IJavaElement IJavaElement IJavaElement IJavaElement PACKAGE_FRAGMENT_ROOT IJavaElement JAVA_PROJECT IJavaElement PACKAGE_FRAGMENT IPackageFragment containsJavaResources createStatus ActionMessages getString OpenTypeHierarchyAction no_java_resources IJavaElement PACKAGE_DECLARATION getAncestor IJavaElement PACKAGE_FRAGMENT IJavaElement IMPORT_DECLARATION IImportDeclaration IImportDeclaration isOnDemand JavaModelUtil findTypeContainer getJavaProject getQualifier getElementName getJavaProject findType getElementName getAncestor IJavaElement COMPILATION_UNIT IJavaElement CLASS_FILE IClassFile getType IJavaElement COMPILATION_UNIT ICompilationUnit ICompilationUnit IType getTypes addAll asList createStatus ActionMessages getString OpenTypeHierarchyAction no_types JavaModelException getStatus createStatus ActionMessages getString OpenTypeHierarchyAction no_valid_java_element
private static I Status create Status String message return new Status I Status INFO Java Plugin get Plugin Id I Java Status Constants INTERNAL ERROR message null  IStatus createStatus IStatus JavaPlugin getPluginId IJavaStatusConstants INTERNAL_ERROR

Creates a new action with no text and no image p Configure the action later using the set methods p param site the site this action is working on protected Selection Dispatch Action I Workbench Site site Assert is Not Null site f Site site  SelectionDispatchAction IWorkbenchSite isNotNull fSite
Returns the site owning this action return the site owning this action public I Workbench Site get Site return f Site  IWorkbenchSite getSite fSite
Returns the selection provided by the site owning this action return the site s selection public I Selection get Selection if get Selection Provider null return get Selection Provider get Selection else return null  ISelection getSelection getSelectionProvider getSelectionProvider getSelection
Returns the shell provided by the site owning this action return the site s shell public Shell get Shell return f Site get Shell  getShell fSite getShell
Returns the selection provider managed by the site owning this action return the site s selection provider public I Selection Provider get Selection Provider return f Site get Selection Provider  ISelectionProvider getSelectionProvider fSite getSelectionProvider
Updates the action s enablement state according to the given selection This default implementation calls one of the code selection Changed code methods depending on the type of the passed selection param selection the selection this action is working on public void update I Selection selection dispatch Selection Changed selection  selectionChanged ISelection dispatchSelectionChanged
Notifies this action that the given structured selection has changed This default implementation calls code selection Changed I Selection selection code param selection the new selection public void selection Changed I Structured Selection selection selection Changed I Selection selection  selectionChanged ISelection selectionChanged IStructuredSelection selectionChanged ISelection
Executes this actions with the given structured selection This default implementation calls code run I Selection selection code public void run I Structured Selection selection run I Selection selection  ISelection IStructuredSelection ISelection
Note This method is for internal use only Clients should not call this method public void selection Changed Java Text Selection selection selection Changed I Text Selection selection  selectionChanged JavaTextSelection selectionChanged ITextSelection
Note This method is for internal use only Clients should not call this method public void run Java Text Selection selection run I Text Selection selection  JavaTextSelection ITextSelection
Notifies this action that the given text selection has changed This default implementation calls code selection Changed I Selection selection code param selection the new selection public void selection Changed I Text Selection selection selection Changed I Selection selection  selectionChanged ISelection selectionChanged ITextSelection selectionChanged ISelection
Executes this actions with the given text selection This default implementation calls code run I Selection selection code public void run I Text Selection selection run I Selection selection  ISelection ITextSelection ISelection
Notifies this action that the given selection has changed This default implementation sets the action s enablement state to code false code param selection the new selection public void selection Changed I Selection selection set Enabled false  selectionChanged ISelection setEnabled
Executes this actions with the given selection This default implementation does nothing public void run I Selection selection  ISelection
Method declared on I Action public void run dispatch Run get Selection  IAction dispatchRun getSelection
Method declared on I Selection Changed Listener public void selection Changed Selection Changed Event event dispatch Selection Changed event get Selection  ISelectionChangedListener selectionChanged SelectionChangedEvent dispatchSelectionChanged getSelection
private void dispatch Selection Changed I Selection selection if selection instanceof I Structured Selection selection Changed I Structured Selection selection else if selection instanceof Java Text Selection selection Changed Java Text Selection selection else if selection instanceof I Text Selection selection Changed I Text Selection selection else selection Changed selection  dispatchSelectionChanged ISelection IStructuredSelection selectionChanged IStructuredSelection JavaTextSelection selectionChanged JavaTextSelection ITextSelection selectionChanged ITextSelection selectionChanged
private void dispatch Run I Selection selection if selection instanceof I Structured Selection run I Structured Selection selection else if selection instanceof Java Text Selection run Java Text Selection selection else if selection instanceof I Text Selection run I Text Selection selection else run selection  dispatchRun ISelection IStructuredSelection IStructuredSelection JavaTextSelection JavaTextSelection ITextSelection ITextSelection

Creates a new Java Element Image Descriptor param base Image an image descriptor used as the base image param flags flags indicating which adornments are to be rendered See code set Adornments code for valid values param size the size of the resulting image see set Adornments int public Java Element Image Descriptor Image Descriptor base Image int flags Point size f Base Image base Image Assert is Not Null f Base Image f Flags flags Assert is True f Flags 0 f Size size Assert is Not Null f Size  JavaElementImageDescriptor baseImage setAdornments setAdornments JavaElementImageDescriptor ImageDescriptor baseImage fBaseImage baseImage isNotNull fBaseImage fFlags isTrue fFlags fSize isNotNull fSize
Sets the descriptors adornments Valid values are code ABSTRACT code code FINAL code code SYNCHRONIZED code code STATIC code code RUNNABLE code code WARNING code code ERROR code code OVERRIDDES code code IMPLEMENTS code code CONSTRUCTOR code code DEPRECATED code or any combination of those param adornments the image descriptors adornments public void set Adornments int adornments Assert is True adornments 0 f Flags adornments  setAdornments isTrue fFlags
Returns the current adornments return the current adornments public int get Adronments return f Flags  getAdronments fFlags
Sets the size of the image created by calling code create Image code param size the size of the image returned from calling code create Image code see Image Descriptor create Image public void set Image Size Point size Assert is Not Null size Assert is True size x 0 size y 0 f Size size  createImage createImage ImageDescriptor createImage setImageSize isNotNull isTrue fSize
Returns the size of the image created by calling code create Image code return the size of the image created by calling code create Image code see Image Descriptor create Image public Point get Image Size return new Point f Size x f Size y  createImage createImage ImageDescriptor createImage getImageSize fSize fSize
Method declared in Composite Image Descriptor protected Point get Size return f Size  CompositeImageDescriptor getSize fSize
public boolean equals Object object if object null Java Element Image Descriptor class equals object get Class return false Java Element Image Descriptor other Java Element Image Descriptor object return f Base Image equals other f Base Image f Flags other f Flags f Size equals other f Size  JavaElementImageDescriptor getClass JavaElementImageDescriptor JavaElementImageDescriptor fBaseImage fBaseImage fFlags fFlags fSize fSize
Method declared on Object public int hash Code return f Base Image hash Code f Flags f Size hash Code  hashCode fBaseImage hashCode fFlags fSize hashCode
protected void draw Composite Image int width int height Image Data bg get Image Data f Base Image if f Flags DEPRECATED 0 over the full image Point size get Size Image Data data get Image Data Java Plugin Images DESC OVR DEPRECATED draw Image data 0 size y data height draw Image bg 0 0 draw Top Right draw Bottom Right draw Bottom Left  drawCompositeImage ImageData getImageData fBaseImage fFlags getSize ImageData getImageData JavaPluginImages DESC_OVR_DEPRECATED drawImage drawImage drawTopRight drawBottomRight drawBottomLeft
private Image Data get Image Data Image Descriptor descriptor Image Data data descriptor get Image Data see bug 51965 get Image Data can return null if data null data DEFAULT IMAGE DATA Java Plugin log Error Message Image data not available descriptor to String NON NLS 1 return data  ImageData getImageData ImageDescriptor ImageData getImageData getImageData DEFAULT_IMAGE_DATA JavaPlugin logErrorMessage toString
private void draw Top Right int x get Size x if f Flags ABSTRACT 0 Image Data data get Image Data Java Plugin Images DESC OVR ABSTRACT x data width draw Image data x 0 if f Flags CONSTRUCTOR 0 Image Data data get Image Data Java Plugin Images DESC OVR CONSTRUCTOR x data width draw Image data x 0 if f Flags FINAL 0 Image Data data get Image Data Java Plugin Images DESC OVR FINAL x data width draw Image data x 0 if f Flags STATIC 0 Image Data data get Image Data Java Plugin Images DESC OVR STATIC x data width draw Image data x 0  drawTopRight getSize fFlags ImageData getImageData JavaPluginImages DESC_OVR_ABSTRACT drawImage fFlags ImageData getImageData JavaPluginImages DESC_OVR_CONSTRUCTOR drawImage fFlags ImageData getImageData JavaPluginImages DESC_OVR_FINAL drawImage fFlags ImageData getImageData JavaPluginImages DESC_OVR_STATIC drawImage
private void draw Bottom Right Point size get Size int x size x int flags f Flags int sync And Over SYNCHRONIZED OVERRIDES int sync And Impl SYNCHRONIZED IMPLEMENTS if flags sync And Over sync And Over both flags set merged overlay image Image Data data get Image Data Java Plugin Images DESC OVR SYNCH AND OVERRIDES x data width draw Image data x size y data height flags sync And Over clear to not render again else if flags sync And Impl sync And Impl both flags set merged overlay image Image Data data get Image Data Java Plugin Images DESC OVR SYNCH AND IMPLEMENTS x data width draw Image data x size y data height flags sync And Impl clear to not render again if flags OVERRIDES 0 Image Data data get Image Data Java Plugin Images DESC OVR OVERRIDES x data width draw Image data x size y data height if flags IMPLEMENTS 0 Image Data data get Image Data Java Plugin Images DESC OVR IMPLEMENTS x data width draw Image data x size y data height if flags SYNCHRONIZED 0 Image Data data get Image Data Java Plugin Images DESC OVR SYNCH x data width draw Image data x size y data height if flags RUNNABLE 0 Image Data data get Image Data Java Plugin Images DESC OVR RUN x data width draw Image data x size y data height  drawBottomRight getSize fFlags syncAndOver syncAndImpl syncAndOver syncAndOver ImageData getImageData JavaPluginImages DESC_OVR_SYNCH_AND_OVERRIDES drawImage syncAndOver syncAndImpl syncAndImpl ImageData getImageData JavaPluginImages DESC_OVR_SYNCH_AND_IMPLEMENTS drawImage syncAndImpl ImageData getImageData JavaPluginImages DESC_OVR_OVERRIDES drawImage ImageData getImageData JavaPluginImages DESC_OVR_IMPLEMENTS drawImage ImageData getImageData JavaPluginImages DESC_OVR_SYNCH drawImage ImageData getImageData JavaPluginImages DESC_OVR_RUN drawImage
private void draw Bottom Left Point size get Size int x 0 if f Flags ERROR 0 Image Data data get Image Data Java Plugin Images DESC OVR ERROR draw Image data x size y data height x data width if f Flags WARNING 0 Image Data data get Image Data Java Plugin Images DESC OVR WARNING draw Image data x size y data height x data width  drawBottomLeft getSize fFlags ImageData getImageData JavaPluginImages DESC_OVR_ERROR drawImage fFlags ImageData getImageData JavaPluginImages DESC_OVR_WARNING drawImage

Creates a new label provider with code SHOW DEFAULT code flag see SHOW DEFAULT since 2 0 public Java Element Label Provider this SHOW DEFAULT  SHOW_DEFAULT SHOW_DEFAULT JavaElementLabelProvider SHOW_DEFAULT
Creates a new label provider param flags the initial options a bitwise OR of code SHOW  code constants public Java Element Label Provider int flags f Image Label Provider new Java Element Image Provider f Storage Label Provider new Storage Label Provider f Flags flags update Image Provider Flags update Text Provider Flags  SHOW_ JavaElementLabelProvider fImageLabelProvider JavaElementImageProvider fStorageLabelProvider StorageLabelProvider fFlags updateImageProviderFlags updateTextProviderFlags
private boolean get Flag int flag return f Flags flag 0  getFlag fFlags
Turns on the rendering options specified in the given flags param flags the options a bitwise OR of code SHOW  code constants public void turn On int flags f Flags flags update Image Provider Flags update Text Provider Flags  SHOW_ turnOn fFlags updateImageProviderFlags updateTextProviderFlags
Turns off the rendering options specified in the given flags param flags the initial options a bitwise OR of code SHOW  code constants public void turn Off int flags f Flags flags update Image Provider Flags update Text Provider Flags  SHOW_ turnOff fFlags updateImageProviderFlags updateTextProviderFlags
private void update Image Provider Flags f Image Flags 0 if get Flag SHOW OVERLAY ICONS f Image Flags Java Element Image Provider OVERLAY ICONS if get Flag SHOW SMALL ICONS f Image Flags Java Element Image Provider SMALL ICONS  updateImageProviderFlags fImageFlags getFlag SHOW_OVERLAY_ICONS fImageFlags JavaElementImageProvider OVERLAY_ICONS getFlag SHOW_SMALL_ICONS fImageFlags JavaElementImageProvider SMALL_ICONS
private void update Text Provider Flags f Text Flags 0 if get Flag SHOW RETURN TYPE f Text Flags Java Element Labels M APP RETURNTYPE if get Flag SHOW PARAMETERS f Text Flags Java Element Labels M PARAMETER TYPES if get Flag SHOW CONTAINER f Text Flags Java Element Labels P POST QUALIFIED Java Element Labels T POST QUALIFIED Java Element Labels CF POST QUALIFIED Java Element Labels CU POST QUALIFIED Java Element Labels M POST QUALIFIED Java Element Labels F POST QUALIFIED if get Flag SHOW POSTIFIX QUALIFICATION f Text Flags Java Element Labels T POST QUALIFIED Java Element Labels CF POST QUALIFIED Java Element Labels CU POST QUALIFIED else if get Flag SHOW CONTAINER QUALIFICATION f Text Flags Java Element Labels T FULLY QUALIFIED Java Element Labels CF QUALIFIED Java Element Labels CU QUALIFIED if get Flag SHOW TYPE f Text Flags Java Element Labels F APP TYPE SIGNATURE if get Flag SHOW ROOT f Text Flags Java Element Labels APPEND ROOT PATH if get Flag SHOW VARIABLE f Text Flags Java Element Labels ROOT VARIABLE if get Flag SHOW QUALIFIED f Text Flags Java Element Labels F FULLY QUALIFIED Java Element Labels M FULLY QUALIFIED Java Element Labels I FULLY QUALIFIED Java Element Labels T FULLY QUALIFIED Java Element Labels D QUALIFIED Java Element Labels CF QUALIFIED Java Element Labels CU QUALIFIED if get Flag SHOW POST QUALIFIED f Text Flags Java Element Labels F POST QUALIFIED Java Element Labels M POST QUALIFIED Java Element Labels I POST QUALIFIED Java Element Labels T POST QUALIFIED Java Element Labels D POST QUALIFIED Java Element Labels CF POST QUALIFIED Java Element Labels CU POST QUALIFIED  updateTextProviderFlags fTextFlags getFlag SHOW_RETURN_TYPE fTextFlags JavaElementLabels M_APP_RETURNTYPE getFlag SHOW_PARAMETERS fTextFlags JavaElementLabels M_PARAMETER_TYPES getFlag SHOW_CONTAINER fTextFlags JavaElementLabels P_POST_QUALIFIED JavaElementLabels T_POST_QUALIFIED JavaElementLabels CF_POST_QUALIFIED JavaElementLabels CU_POST_QUALIFIED JavaElementLabels M_POST_QUALIFIED JavaElementLabels F_POST_QUALIFIED getFlag SHOW_POSTIFIX_QUALIFICATION fTextFlags JavaElementLabels T_POST_QUALIFIED JavaElementLabels CF_POST_QUALIFIED JavaElementLabels CU_POST_QUALIFIED getFlag SHOW_CONTAINER_QUALIFICATION fTextFlags JavaElementLabels T_FULLY_QUALIFIED JavaElementLabels CF_QUALIFIED JavaElementLabels CU_QUALIFIED getFlag SHOW_TYPE fTextFlags JavaElementLabels F_APP_TYPE_SIGNATURE getFlag SHOW_ROOT fTextFlags JavaElementLabels APPEND_ROOT_PATH getFlag SHOW_VARIABLE fTextFlags JavaElementLabels ROOT_VARIABLE getFlag SHOW_QUALIFIED fTextFlags JavaElementLabels F_FULLY_QUALIFIED JavaElementLabels M_FULLY_QUALIFIED JavaElementLabels I_FULLY_QUALIFIED JavaElementLabels T_FULLY_QUALIFIED JavaElementLabels D_QUALIFIED JavaElementLabels CF_QUALIFIED JavaElementLabels CU_QUALIFIED getFlag SHOW_POST_QUALIFIED fTextFlags JavaElementLabels F_POST_QUALIFIED JavaElementLabels M_POST_QUALIFIED JavaElementLabels I_POST_QUALIFIED JavaElementLabels T_POST_QUALIFIED JavaElementLabels D_POST_QUALIFIED JavaElementLabels CF_POST_QUALIFIED JavaElementLabels CU_POST_QUALIFIED
public Image get Image Object element Image result f Image Label Provider get Image Label element f Image Flags if result null return result if element instanceof I Storage return f Storage Label Provider get Image element return result  getImage fImageLabelProvider getImageLabel fImageFlags IStorage fStorageLabelProvider getImage
public String get Text Object element String text Java Element Labels get Text Label element f Text Flags if text length 0 return text if element instanceof I Storage return f Storage Label Provider get Text element return text  getText JavaElementLabels getTextLabel fTextFlags IStorage fStorageLabelProvider getText
see I Base Label Provider dispose public void dispose f Storage Label Provider dispose f Image Label Provider dispose  IBaseLabelProvider fStorageLabelProvider fImageLabelProvider

Constructor public Java Element Sorter super null delay initialization of collator f Member Order Cache Java Plugin get Default get Member Order Preference Cache  JavaElementSorter fMemberOrderCache JavaPlugin getDefault getMemberOrderPreferenceCache
deprecated Bug 22518 Method never used does not override Viewer Sorter is Sorter Property Object String Method could be removed but kept for API compatibility public boolean is Sorter Property Object element Object property return true  ViewerSorter isSorterProperty isSorterProperty
public int category Object element if element instanceof I Java Element try I Java Element je I Java Element element switch je get Element Type case I Java Element METHOD I Method method I Method je if method is Constructor return get Member Category Members Order Preference Cache CONSTRUCTORS INDEX int flags method get Flags if Flags is Static flags return get Member Category Members Order Preference Cache STATIC METHODS INDEX else return get Member Category Members Order Preference Cache METHOD INDEX case I Java Element FIELD int flags I Field je get Flags if Flags is Static flags return get Member Category Members Order Preference Cache STATIC FIELDS INDEX else return get Member Category Members Order Preference Cache FIELDS INDEX case I Java Element INITIALIZER int flags I Initializer je get Flags if Flags is Static flags return get Member Category Members Order Preference Cache STATIC INIT INDEX else return get Member Category Members Order Preference Cache INIT INDEX case I Java Element TYPE return get Member Category Members Order Preference Cache TYPE INDEX case I Java Element PACKAGE DECLARATION return PACKAGE DECL case I Java Element IMPORT CONTAINER return IMPORT CONTAINER case I Java Element IMPORT DECLARATION return IMPORT DECLARATION case I Java Element PACKAGE FRAGMENT I Package Fragment pack I Package Fragment je if pack get Parent get Resource instanceof I Project return PACKAGEFRAGMENTROOTS return PACKAGEFRAGMENT case I Java Element PACKAGE FRAGMENT ROOT return PACKAGEFRAGMENTROOTS case I Java Element JAVA PROJECT return PROJECTS case I Java Element CLASS FILE return CLASSFILES case I Java Element COMPILATION UNIT return COMPILATIONUNITS catch Java Model Exception e if e is Does Not Exist Java Plugin log e return JAVAELEMENTS else if element instanceof I File return RESOURCES else if element instanceof I Project return PROJECTS else if element instanceof I Container return RESOURCEFOLDERS else if element instanceof I Storage return STORAGE else if element instanceof Class Path Container return PACKAGEFRAGMENTROOTS return OTHERS  IJavaElement IJavaElement IJavaElement getElementType IJavaElement IMethod IMethod isConstructor getMemberCategory MembersOrderPreferenceCache CONSTRUCTORS_INDEX getFlags isStatic getMemberCategory MembersOrderPreferenceCache STATIC_METHODS_INDEX getMemberCategory MembersOrderPreferenceCache METHOD_INDEX IJavaElement IField getFlags isStatic getMemberCategory MembersOrderPreferenceCache STATIC_FIELDS_INDEX getMemberCategory MembersOrderPreferenceCache FIELDS_INDEX IJavaElement IInitializer getFlags isStatic getMemberCategory MembersOrderPreferenceCache STATIC_INIT_INDEX getMemberCategory MembersOrderPreferenceCache INIT_INDEX IJavaElement getMemberCategory MembersOrderPreferenceCache TYPE_INDEX IJavaElement PACKAGE_DECLARATION PACKAGE_DECL IJavaElement IMPORT_CONTAINER IMPORT_CONTAINER IJavaElement IMPORT_DECLARATION IMPORT_DECLARATION IJavaElement PACKAGE_FRAGMENT IPackageFragment IPackageFragment getParent getResource IProject IJavaElement PACKAGE_FRAGMENT_ROOT IJavaElement JAVA_PROJECT IJavaElement CLASS_FILE IJavaElement COMPILATION_UNIT JavaModelException isDoesNotExist JavaPlugin IFile IProject IContainer IStorage ClassPathContainer
private int get Member Category int kind int offset f Member Order Cache get Category Index kind return offset MEMBERSOFFSET  getMemberCategory fMemberOrderCache getCategoryIndex
public int compare Viewer viewer Object e1 Object e2 int cat1 category e1 int cat2 category e2 if cat1 cat2 return cat1 cat2 if cat1 PROJECTS I Workbench Adapter a1 I Workbench Adapter I Adaptable e1 get Adapter I Workbench Adapter class I Workbench Adapter a2 I Workbench Adapter I Adaptable e2 get Adapter I Workbench Adapter class return get Collator compare a1 get Label e1 a2 get Label e2 if cat1 PACKAGEFRAGMENTROOTS I Package Fragment Root root1 get Package Fragment Root e1 I Package Fragment Root root2 get Package Fragment Root e2 if root1 null if root2 null return 0 else return 1 else if root2 null return 1 if root1 get Path equals root2 get Path int p1 get Class Path Index root1 int p2 get Class Path Index root2 if p1 p2 return p1 p2 e1 root1 normalize classpath container to root e2 root2 non java resources are sorted using the label from the viewers label provider if cat1 PROJECTS cat1 RESOURCES cat1 RESOURCEFOLDERS cat1 STORAGE cat1 OTHERS return compare With Label Provider viewer e1 e2 if e1 instanceof I Member if f Member Order Cache is Sort By Visibility try int flags1 Jdt Flags get Visibility Code I Member e1 int flags2 Jdt Flags get Visibility Code I Member e2 int vis f Member Order Cache get Visibility Index flags1 f Member Order Cache get Visibility Index flags2 if vis 0 return vis catch Java Model Exception ignore String name1 I Java Element e1 get Element Name String name2 I Java Element e2 get Element Name if e1 instanceof I Type handle anonymous types if name1 length 0 if name2 length 0 try return get Collator compare I Type e1 get Superclass Name I Type e2 get Superclass Name catch Java Model Exception e return 0 else return 1 else if name2 length 0 return 1 int cmp get Collator compare name1 name2 if cmp 0 return cmp if e1 instanceof I Method String params1 I Method e1 get Parameter Types String params2 I Method e2 get Parameter Types int len Math min params1 length params2 length for int i 0 i len i cmp get Collator compare Signature to String params1 i Signature to String params2 i if cmp 0 return cmp return params1 length params2 length return 0  IWorkbenchAdapter IWorkbenchAdapter IAdaptable getAdapter IWorkbenchAdapter IWorkbenchAdapter IWorkbenchAdapter IAdaptable getAdapter IWorkbenchAdapter getCollator getLabel getLabel IPackageFragmentRoot getPackageFragmentRoot IPackageFragmentRoot getPackageFragmentRoot getPath getPath getClassPathIndex getClassPathIndex compareWithLabelProvider IMember fMemberOrderCache isSortByVisibility JdtFlags getVisibilityCode IMember JdtFlags getVisibilityCode IMember fMemberOrderCache getVisibilityIndex fMemberOrderCache getVisibilityIndex JavaModelException IJavaElement getElementName IJavaElement getElementName IType getCollator IType getSuperclassName IType getSuperclassName JavaModelException getCollator IMethod IMethod getParameterTypes IMethod getParameterTypes getCollator toString toString
private I Package Fragment Root get Package Fragment Root Object element if element instanceof Class Path Container return first package fragment root from the container Class Path Container cp Class Path Container element Object roots cp get Package Fragment Roots if roots length 0 return I Package Fragment Root roots 0 non resolvable return null return null return Java Model Util get Package Fragment Root I Java Element element  IPackageFragmentRoot getPackageFragmentRoot ClassPathContainer ClassPathContainer ClassPathContainer getPackageFragmentRoots IPackageFragmentRoot JavaModelUtil getPackageFragmentRoot IJavaElement
private int compare With Label Provider Viewer viewer Object e1 Object e2 if viewer null viewer instanceof Content Viewer I Base Label Provider prov Content Viewer viewer get Label Provider if prov instanceof I Label Provider I Label Provider lprov I Label Provider prov String name1 lprov get Text e1 String name2 lprov get Text e2 if name1 null name2 null return get Collator compare name1 name2 return 0 can t compare  compareWithLabelProvider ContentViewer IBaseLabelProvider ContentViewer getLabelProvider ILabelProvider ILabelProvider ILabelProvider getText getText getCollator
private int get Class Path Index I Package Fragment Root root try I Path root Path root get Path I Package Fragment Root roots root get Java Project get Package Fragment Roots for int i 0 i roots length i if roots i get Path equals root Path return i catch Java Model Exception e return Integer MAX VALUE  getClassPathIndex IPackageFragmentRoot IPath rootPath getPath IPackageFragmentRoot getJavaProject getPackageFragmentRoots getPath rootPath JavaModelException MAX_VALUE
public final Collator get Collator if collator null collator Collator get Instance return collator  getCollator getInstance

private static I Shared Images fg Shared Images null private JavaUI prevent instantiation of JavaUI  ISharedImages fgSharedImages
Returns the shared images for the Java UI return the shared images manager public static I Shared Images get Shared Images if fg Shared Images null fg Shared Images new Shared Images return fg Shared Images  ISharedImages getSharedImages fgSharedImages fgSharedImages SharedImages fgSharedImages
Creates a selection dialog that lists all packages of the given Java project The caller is responsible for opening the dialog with code Window open code and subsequently extracting the selected package of type code I Package Fragment code via code Selection Dialog get Result code param parent the parent shell of the dialog to be created param project the Java project param style flags defining the style of the dialog the valid flags are code I Java Element Search Constants CONSIDER BINARIES code indicating that packages from binary package fragment roots should be included in addition to those from source package fragment roots code I Java Element Search Constants CONSIDER REQUIRED PROJECTS code indicating that packages from required projects should be included as well param filter the initial pattern to filter the set of packages For example com shows all packages starting with com The meta character representing any character and representing any string are supported Clients can pass an empty string if no filtering is required return a new selection dialog exception Java Model Exception if the selection dialog could not be opened since 2 0 public static Selection Dialog create Package Dialog Shell parent I Java Project project int style String filter throws Java Model Exception Assert is True style I Java Element Search Constants CONSIDER BINARIES I Java Element Search Constants CONSIDER REQUIRED PROJECTS I Java Element Search Constants CONSIDER BINARIES I Java Element Search Constants CONSIDER REQUIRED PROJECTS I Package Fragment Root roots null if style I Java Element Search Constants CONSIDER REQUIRED PROJECTS 0 roots project get All Package Fragment Roots else roots project get Package Fragment Roots List considered Roots null if style I Java Element Search Constants CONSIDER BINARIES 0 considered Roots Arrays as List roots else considered Roots new Array List roots length for int i 0 i roots length i I Package Fragment Root root roots i if root get Kind I Package Fragment Root K BINARY considered Roots add root int flags Java Element Label Provider SHOW DEFAULT if considered Roots size 1 flags flags Java Element Label Provider SHOW ROOT List packages new Array List Iterator iter considered Roots iterator while iter has Next I Package Fragment Root root I Package Fragment Root iter next packages add All Arrays as List root get Children Element List Selection Dialog dialog new Element List Selection Dialog parent new Java Element Label Provider flags dialog set Ignore Case false dialog set Elements packages to Array XXX inefficient dialog set Filter filter return dialog  IPackageFragment SelectionDialog getResult IJavaElementSearchConstants CONSIDER_BINARIES IJavaElementSearchConstants CONSIDER_REQUIRED_PROJECTS JavaModelException SelectionDialog createPackageDialog IJavaProject JavaModelException isTrue IJavaElementSearchConstants CONSIDER_BINARIES IJavaElementSearchConstants CONSIDER_REQUIRED_PROJECTS IJavaElementSearchConstants CONSIDER_BINARIES IJavaElementSearchConstants CONSIDER_REQUIRED_PROJECTS IPackageFragmentRoot IJavaElementSearchConstants CONSIDER_REQUIRED_PROJECTS getAllPackageFragmentRoots getPackageFragmentRoots consideredRoots IJavaElementSearchConstants CONSIDER_BINARIES consideredRoots asList consideredRoots ArrayList IPackageFragmentRoot getKind IPackageFragmentRoot K_BINARY consideredRoots JavaElementLabelProvider SHOW_DEFAULT consideredRoots JavaElementLabelProvider SHOW_ROOT ArrayList consideredRoots hasNext IPackageFragmentRoot IPackageFragmentRoot addAll asList getChildren ElementListSelectionDialog ElementListSelectionDialog JavaElementLabelProvider setIgnoreCase setElements toArray setFilter
Creates a selection dialog that lists all packages of the given Java project The caller is responsible for opening the dialog with code Window open code and subsequently extracting the selected package of type code I Package Fragment code via code Selection Dialog get Result code param parent the parent shell of the dialog to be created param project the Java project param style flags defining the style of the dialog the valid flags are code I Java Element Search Constants CONSIDER BINARIES code indicating that packages from binary package fragment roots should be included in addition to those from source package fragment roots code I Java Element Search Constants CONSIDER REQUIRED PROJECTS code indicating that packages from required projects should be included as well return a new selection dialog exception Java Model Exception if the selection dialog could not be opened public static Selection Dialog create Package Dialog Shell parent I Java Project project int style throws Java Model Exception return create Package Dialog parent project style NON NLS 1  IPackageFragment SelectionDialog getResult IJavaElementSearchConstants CONSIDER_BINARIES IJavaElementSearchConstants CONSIDER_REQUIRED_PROJECTS JavaModelException SelectionDialog createPackageDialog IJavaProject JavaModelException createPackageDialog
Creates a selection dialog that lists all packages under the given package fragment root The caller is responsible for opening the dialog with code Window open code and subsequently extracting the selected package of type code I Package Fragment code via code Selection Dialog get Result code param parent the parent shell of the dialog to be created param root the package fragment root param filter the initial pattern to filter the set of packages For example com shows all packages starting with com The meta character representing any character and representing any string are supported Clients can pass an empty string if no filtering is required return a new selection dialog exception Java Model Exception if the selection dialog could not be opened since 2 0 public static Selection Dialog create Package Dialog Shell parent I Package Fragment Root root String filter throws Java Model Exception Element List Selection Dialog dialog new Element List Selection Dialog parent new Java Element Label Provider Java Element Label Provider SHOW DEFAULT dialog set Ignore Case false dialog set Elements root get Children dialog set Filter filter return dialog  IPackageFragment SelectionDialog getResult JavaModelException SelectionDialog createPackageDialog IPackageFragmentRoot JavaModelException ElementListSelectionDialog ElementListSelectionDialog JavaElementLabelProvider JavaElementLabelProvider SHOW_DEFAULT setIgnoreCase setElements getChildren setFilter
Creates a selection dialog that lists all packages under the given package fragment root The caller is responsible for opening the dialog with code Window open code and subsequently extracting the selected package of type code I Package Fragment code via code Selection Dialog get Result code param parent the parent shell of the dialog to be created param root the package fragment root return a new selection dialog exception Java Model Exception if the selection dialog could not be opened public static Selection Dialog create Package Dialog Shell parent I Package Fragment Root root throws Java Model Exception return create Package Dialog parent root NON NLS 1  IPackageFragment SelectionDialog getResult JavaModelException SelectionDialog createPackageDialog IPackageFragmentRoot JavaModelException createPackageDialog
Creates a selection dialog that lists all types in the given scope The caller is responsible for opening the dialog with code Window open code and subsequently extracting the selected type s of type code I Type code via code Selection Dialog get Result code param parent the parent shell of the dialog to be created param context the runnable context used to show progress when the dialog is being populated param scope the scope that limits which types are included param style flags defining the style of the dialog the only valid values are code I Java Element Search Constants CONSIDER CLASSES code code CONSIDER INTERFACES code or their bitwise OR equivalent to code CONSIDER TYPES code param multiple Selection code true code if multiple selection is allowed param filter the initial pattern to filter the set of types For example Abstract shows all types starting with abstract The meta character representing any character and representing any string are supported Clients can pass an empty string if no filtering is required return a new selection dialog exception Java Model Exception if the selection dialog could not be opened since 2 0 public static Selection Dialog create Type Dialog Shell parent I Runnable Context context I Java Search Scope scope int style boolean multiple Selection String filter throws Java Model Exception int element Kinds 0 if style I Java Element Search Constants CONSIDER TYPES element Kinds I Java Search Constants TYPE else if style I Java Element Search Constants CONSIDER INTERFACES element Kinds I Java Search Constants INTERFACE else if style I Java Element Search Constants CONSIDER CLASSES element Kinds I Java Search Constants CLASS else Assert is True false illegal style NON NLS 1 if multiple Selection Multi Type Selection Dialog dialog new Multi Type Selection Dialog parent context element Kinds scope dialog set Message JavaUI Messages get String JavaUI default Dialog Message NON NLS 1 dialog set Filter filter return dialog else Type Selection Dialog dialog new Type Selection Dialog parent context element Kinds scope dialog set Message JavaUI Messages get String JavaUI default Dialog Message NON NLS 1 dialog set Filter filter return dialog  IType SelectionDialog getResult IJavaElementSearchConstants CONSIDER_CLASSES CONSIDER_INTERFACES CONSIDER_TYPES multipleSelection JavaModelException SelectionDialog createTypeDialog IRunnableContext IJavaSearchScope multipleSelection JavaModelException elementKinds IJavaElementSearchConstants CONSIDER_TYPES elementKinds IJavaSearchConstants IJavaElementSearchConstants CONSIDER_INTERFACES elementKinds IJavaSearchConstants IJavaElementSearchConstants CONSIDER_CLASSES elementKinds IJavaSearchConstants isTrue multipleSelection MultiTypeSelectionDialog MultiTypeSelectionDialog elementKinds setMessage JavaUIMessages getString defaultDialogMessage setFilter TypeSelectionDialog TypeSelectionDialog elementKinds setMessage JavaUIMessages getString defaultDialogMessage setFilter
Creates a selection dialog that lists all types in the given scope The caller is responsible for opening the dialog with code Window open code and subsequently extracting the selected type s of type code I Type code via code Selection Dialog get Result code param parent the parent shell of the dialog to be created param context the runnable context used to show progress when the dialog is being populated param scope the scope that limits which types are included param style flags defining the style of the dialog the only valid values are code I Java Element Search Constants CONSIDER CLASSES code code CONSIDER INTERFACES code or their bitwise OR equivalent to code CONSIDER TYPES code param multiple Selection code true code if multiple selection is allowed return a new selection dialog exception Java Model Exception if the selection dialog could not be opened public static Selection Dialog create Type Dialog Shell parent I Runnable Context context I Java Search Scope scope int style boolean multiple Selection throws Java Model Exception return create Type Dialog parent context scope style multiple Selection NON NLS 1  IType SelectionDialog getResult IJavaElementSearchConstants CONSIDER_CLASSES CONSIDER_INTERFACES CONSIDER_TYPES multipleSelection JavaModelException SelectionDialog createTypeDialog IRunnableContext IJavaSearchScope multipleSelection JavaModelException createTypeDialog multipleSelection
Creates a selection dialog that lists all types in the given scope containing a standard code main code method The caller is responsible for opening the dialog with code Window open code and subsequently extracting the selected type s of type code I Type code via code Selection Dialog get Result code param parent the parent shell of the dialog to be created param context the runnable context used to show progress when the dialog is being populated param scope the scope that limits which types are included param style flags defining the style of the dialog the only valid values are code I Java Element Search Constants CONSIDER BINARIES code code CONSIDER EXTERNAL JARS code or their bitwise OR or code 0 code param multiple Selection code true code if multiple selection is allowed param filter the initial pattern to filter the set of types containing a main method For example App shows all types starting with app The meta character representing any character and representing any string are supported Clients can pass an empty string if no filtering is required return a new selection dialog since 2 0 public static Selection Dialog create Main Type Dialog Shell parent I Runnable Context context I Java Search Scope scope int style boolean multiple Selection String filter if multiple Selection Multi Main Type Selection Dialog dialog new Multi Main Type Selection Dialog parent context scope style dialog set Filter filter return dialog else Main Type Selection Dialog dialog new Main Type Selection Dialog parent context scope style dialog set Filter filter return dialog  IType SelectionDialog getResult IJavaElementSearchConstants CONSIDER_BINARIES CONSIDER_EXTERNAL_JARS multipleSelection SelectionDialog createMainTypeDialog IRunnableContext IJavaSearchScope multipleSelection multipleSelection MultiMainTypeSelectionDialog MultiMainTypeSelectionDialog setFilter MainTypeSelectionDialog MainTypeSelectionDialog setFilter
Creates a selection dialog that lists all types in the given scope containing a standard code main code method The caller is responsible for opening the dialog with code Window open code and subsequently extracting the selected type s of type code I Type code via code Selection Dialog get Result code param parent the parent shell of the dialog to be created param context the runnable context used to show progress when the dialog is being populated param scope the scope that limits which types are included param style flags defining the style of the dialog the only valid values are code I Java Element Search Constants CONSIDER BINARIES code code CONSIDER EXTERNAL JARS code or their bitwise OR or code 0 code param multiple Selection code true code if multiple selection is allowed return a new selection dialog public static Selection Dialog create Main Type Dialog Shell parent I Runnable Context context I Java Search Scope scope int style boolean multiple Selection return create Main Type Dialog parent context scope style multiple Selection NON NLS 1  IType SelectionDialog getResult IJavaElementSearchConstants CONSIDER_BINARIES CONSIDER_EXTERNAL_JARS multipleSelection SelectionDialog createMainTypeDialog IRunnableContext IJavaSearchScope multipleSelection createMainTypeDialog multipleSelection
Creates a selection dialog that lists all types in the given project The caller is responsible for opening the dialog with code Window open code and subsequently extracting the selected type s of type code I Type code via code Selection Dialog get Result code param parent the parent shell of the dialog to be created param context the runnable context used to show progress when the dialog is being populated param project the Java project param style flags defining the style of the dialog the only valid values are code I Java Element Search Constants CONSIDER CLASSES code code CONSIDER INTERFACES code or their bitwise OR equivalent to code CONSIDER TYPES code param multiple Selection code true code if multiple selection is allowed return a new selection dialog exception Java Model Exception if the selection dialog could not be opened public static Selection Dialog create Type Dialog Shell parent I Runnable Context context I Project project int style boolean multiple Selection throws Java Model Exception I Java Search Scope scope Search Engine create Java Search Scope new I Java Project Java Core create project return create Type Dialog parent context scope style multiple Selection  IType SelectionDialog getResult IJavaElementSearchConstants CONSIDER_CLASSES CONSIDER_INTERFACES CONSIDER_TYPES multipleSelection JavaModelException SelectionDialog createTypeDialog IRunnableContext IProject multipleSelection JavaModelException IJavaSearchScope SearchEngine createJavaSearchScope IJavaProject JavaCore createTypeDialog multipleSelection
Opens a Java editor on the given Java element The element can be a compilation unit or class file If there already is an open Java editor for the given element it is returned param element the input element either a compilation unit code I Compilation Unit code or a class file code I Class File code return the editor or code null code if wrong element type or opening failed exception Part Init Exception if the editor could not be initialized exception Java Model Exception if this element does not exist or if an exception occurs while accessing its underlying resource public static I Editor Part open In Editor I Java Element element throws Java Model Exception Part Init Exception return Editor Utility open In Editor element  ICompilationUnit IClassFile PartInitException JavaModelException IEditorPart openInEditor IJavaElement JavaModelException PartInitException EditorUtility openInEditor
Reveals the source range of the given source reference element in the given editor No checking is done if the editor displays a compilation unit or class file that contains the given source reference The editor simply reveals the source range denoted by the given source reference param part the editor displaying the compilation unit or class file param element the source reference element defining the source range to be revealed deprecated use code reveal In Editor I Editor Part I Java Element code instead public static void reveal In Editor I Editor Part part I Source Reference element if element instanceof I Java Element reveal In Editor part I Java Element element  revealInEditor IEditorPart IJavaElement revealInEditor IEditorPart ISourceReference IJavaElement revealInEditor IJavaElement
Reveals the given java element in the given editor If the element is not an instance of code I Source Reference code this method result in a NOP If it is a source reference no checking is done if the editor displays a compilation unit or class file that contains the source reference element The editor simply reveals the source range denoted by the given element param part the editor displaying a compilation unit or class file param element the element to be revealed since 2 0 public static void reveal In Editor I Editor Part part I Java Element element Editor Utility reveal In Editor part element  ISourceReference revealInEditor IEditorPart IJavaElement EditorUtility revealInEditor
Returns the working copy manager for the Java UI plug in return the working copy manager for the Java UI plug in public static I Working Copy Manager get Working Copy Manager return Java Plugin get Default get Working Copy Manager  IWorkingCopyManager getWorkingCopyManager JavaPlugin getDefault getWorkingCopyManager
Answers the shared working copies currently registered for the Java plug in Note that the returned array can include working copies that are not on the class path of a Java project return the list of shared working copies see org eclipse jdt core Java Core get Shared Working Copies org eclipse jdt core I Buffer Factory since 2 0 deprecated Use link Java Core get Working Copies org eclipse jdt core Working Copy Owner instead with code null code as argument for owner public static I Working Copy get Shared Working Copies return Java Core get Shared Working Copies get Buffer Factory  JavaCore getSharedWorkingCopies IBufferFactory JavaCore getWorkingCopies WorkingCopyOwner IWorkingCopy getSharedWorkingCopies JavaCore getSharedWorkingCopies getBufferFactory
Answers the shared working copies that are on the class path of a Java project currently registered for the Java plug in return the list of shared working copies see get Shared Working Copies since 2 1 deprecated Use link Java Core get Working Copies org eclipse jdt core Working Copy Owner instead and filter the list with link I Java Project is On Classpath I Java Element public static I Working Copy get Shared Working Copies On Classpath I Working Copy wcs get Shared Working Copies List result new Array List wcs length for int i 0 i wcs length i I Working Copy wc wcs i if wc instanceof I Java Element I Java Element je I Java Element wc if je get Java Project is On Classpath je result add wc return I Working Copy result to Array new I Working Copy result size  getSharedWorkingCopies JavaCore getWorkingCopies WorkingCopyOwner IJavaProject isOnClasspath IJavaElement IWorkingCopy getSharedWorkingCopiesOnClasspath IWorkingCopy getSharedWorkingCopies ArrayList IWorkingCopy IJavaElement IJavaElement IJavaElement getJavaProject isOnClasspath IWorkingCopy toArray IWorkingCopy
Returns the buffer factory for the Java UI plug in return the buffer factory for the Java UI plug in see org eclipse jdt core I Buffer Factory since 2 0 deprecated link I Buffer Factory has been replaced by link org eclipse jdt core Working Copy Owner The Java UI plug in uses the i primary working copy owner i that can be accessed with code null code in API s that require an owner public static I Buffer Factory get Buffer Factory return Java Plugin get Default get Buffer Factory  IBufferFactory IBufferFactory WorkingCopyOwner IBufferFactory getBufferFactory JavaPlugin getDefault getBufferFactory
Returns the Document Provider used for Java compilation units return the Document Provider for Java compilation units see I Document Provider since 2 0 public static I Document Provider get Document Provider return Java Plugin get Default get Compilation Unit Document Provider  DocumentProvider DocumentProvider IDocumentProvider IDocumentProvider getDocumentProvider JavaPlugin getDefault getCompilationUnitDocumentProvider
Sets the Javadoc location for an archive with the given path param archive Path the path of the library this can be an workspace path or an external path in case of an external library param url the Javadoc location to set This location should contain index html and a file package list code null code clears the current documentation location since 2 0 public static void set Library Javadoc Location I Path archive Path URL url Java Doc Locations set Library Javadoc Location archive Path url  archivePath setLibraryJavadocLocation IPath archivePath JavaDocLocations setLibraryJavadocLocation archivePath
Sets the Javadoc locations for archives with the given paths param archive Paths the paths of the libraries can be workspace paths or external paths in case of an external library param urls the Javadoc locations to set Each location corresponds to the archive path of the same index A location should contain index html and a file package list code null code is a valid location entry and clears the current documentation location The length of the location array must be equals to the number of archive paths passed since 3 0 public static void set Library Javadoc Locations I Path archive Paths URL urls Assert is True archive Paths null urls null urls length archive Paths length Java Doc Locations set Library Javadoc Locations archive Paths urls  archivePaths setLibraryJavadocLocations IPath archivePaths isTrue archivePaths archivePaths JavaDocLocations setLibraryJavadocLocations archivePaths
Returns the Javadoc location for an archive or code null code if no location is available param archive Path the path of the library This can be an workspace path or an external path in case of an external library return the Javadoc location for an archive or code null code since 2 0 public static URL get Library Javadoc Location I Path archive Path return Java Doc Locations get Library Javadoc Location archive Path  archivePath getLibraryJavadocLocation IPath archivePath JavaDocLocations getLibraryJavadocLocation archivePath
Sets the Javadoc location for a Java project This location is used for all types located in the project s source folders param project the project param url the Javadoc location to set This location should contain index html and a file package list code null code clears the current documentation location since 2 1 public static void set Project Javadoc Location I Java Project project URL url Java Doc Locations set Project Javadoc Location project url  setProjectJavadocLocation IJavaProject JavaDocLocations setProjectJavadocLocation
Returns the Javadoc location for a Java project or code null code if no location is available This location is used for all types located in the project s source folders param project the project return the Javadoc location for a Java project or code null code since 2 1 public static URL get Project Javadoc Location I Java Project project return Java Doc Locations get Project Javadoc Location project  getProjectJavadocLocation IJavaProject JavaDocLocations getProjectJavadocLocation
Returns the Javadoc base URL for an element The base location contains the index file This location doesn t have to exist Returns code null code if no javadoc location has been attached to the element s library or project Example of a returned URL is i http www junit org junit javadoc i param element the element for which the documentation URL is requested return the base location throws Java Model Exception thrown when the element can not be accessed since 2 0 public static URL get Javadoc Base Location I Java Element element throws Java Model Exception return Java Doc Locations get Javadoc Base Location element  JavaModelException getJavadocBaseLocation IJavaElement JavaModelException JavaDocLocations getJavadocBaseLocation
Returns the Javadoc URL for an element Example of a returned URL is i http www junit org junit javadoc junit extensions Test Setup html i This returned location doesn t have to exist Returns code null code if no javadoc location has been attached to the element s library or project param element the element for which the documentation URL is requested param include Anchor If set the URL contains an anchor for member references i http www junit org junit javadoc junit extensions Test Setup html run junit framework Test Result i Note that this involves type resolving and is a more expensive call than without anchor return the Javadoc URL for the element throws Java Model Exception thrown when the element can not be accessed since 2 0 public static URL get Javadoc Location I Java Element element boolean include Anchor throws Java Model Exception return Java Doc Locations get Javadoc Location element include Anchor  TestSetup includeAnchor TestSetup TestResult JavaModelException getJavadocLocation IJavaElement includeAnchor JavaModelException JavaDocLocations getJavadocLocation includeAnchor
Returns the transfer instance used to copy paste Java elements to and from the clipboard Objects managed by this transfer instance are of type code I Java Element code So to access data from the clipboard clients should use the following code snippet pre I Java Element elements I Java Element clipboard get Contents JavaUI get Java Element Clipboard Transfer pre To put elements into the clipboard use the following snippet pre I Java Element java Elements clipboard set Contents new Object java Elements new Transfer JavaUI get Java Element Clipboard Transfer pre return returns the transfer object used to copy paste Java elements to and from the clipboard since 3 0 public static Transfer get Java Element Clipboard Transfer return Java Element Transfer get Instance  IJavaElement IJavaElement IJavaElement getContents getJavaElementClipboardTransfer IJavaElement javaElements setContents javaElements getJavaElementClipboardTransfer getJavaElementClipboardTransfer JavaElementTransfer getInstance

public class Preference Constants private Preference Constants  PreferenceConstants PreferenceConstants
Initializes the given preference store with the default values param store the preference store to be initialized since 2 1 public static void initialize Default Values I Preference Store store set the default values from Abstract Decorated Text Editor Abstract Decorated Text Editor Preference Constants initialize Default Values store store set Default Preference Constants EDITOR SHOW SEGMENTS false Java Base Preference Page store set Default Preference Constants LINK PACKAGES TO EDITOR false store set Default Preference Constants LINK TYPEHIERARCHY TO EDITOR false store set Default Preference Constants OPEN TYPE HIERARCHY Preference Constants OPEN TYPE HIERARCHY IN VIEW PART store set Default Preference Constants DOUBLE CLICK Preference Constants DOUBLE CLICK EXPANDS store set Default Preference Constants UPDATE JAVA VIEWS Preference Constants UPDATE WHILE EDITING store set To Default Preference Constants UPDATE JAVA VIEWS clear preference update on save not supported anymore store set Default Preference Constants LINK BROWSING PROJECTS TO EDITOR true store set Default Preference Constants LINK BROWSING PACKAGES TO EDITOR true store set Default Preference Constants LINK BROWSING TYPES TO EDITOR true store set Default Preference Constants LINK BROWSING MEMBERS TO EDITOR true store set Default Preference Constants SEARCH USE REDUCED MENU true Appearance Preference Page store set Default Preference Constants APPEARANCE COMPRESS PACKAGE NAMES false store set Default Preference Constants APPEARANCE METHOD RETURNTYPE false store set Default Preference Constants SHOW CU CHILDREN true store set Default Preference Constants BROWSING STACK VERTICALLY false store set Default Preference Constants APPEARANCE PKG NAME PATTERN FOR PKG VIEW NON NLS 1 store set Default Preference Constants APPEARANCE FOLD PACKAGES IN PACKAGE EXPLORER true Import Organize Preference Page store set Default Preference Constants ORGIMPORTS IMPORTORDER java javax org com NON NLS 1 store set Default Preference Constants ORGIMPORTS ONDEMANDTHRESHOLD 99 store set Default Preference Constants ORGIMPORTS IGNORELOWERCASE true Type Filter Preference Page store set Default Preference Constants TYPEFILTER ENABLED NON NLS 1 store set Default Preference Constants TYPEFILTER DISABLED NON NLS 1 Classpath Variables Preference Page Code Formatter Preference Page Compiler Preference Page no initialization needed Refactoring Preference Page store set Default Preference Constants REFACTOR ERROR PAGE SEVERITY THRESHOLD Preference Constants REFACTOR ERROR SEVERITY store set Default Preference Constants REFACTOR SAVE ALL EDITORS false Template Preference Page store set Default Preference Constants TEMPLATES USE CODEFORMATTER true Code Generation Preference Page compatibility code if store get Boolean Preference Constants CODEGEN USE GETTERSETTER PREFIX String prefix store get String Preference Constants CODEGEN GETTERSETTER PREFIX if prefix length 0 Java Core get Plugin get Plugin Preferences set Value Java Core CODEASSIST FIELD PREFIXES prefix store set To Default Preference Constants CODEGEN USE GETTERSETTER PREFIX store set To Default Preference Constants CODEGEN GETTERSETTER PREFIX if store get Boolean Preference Constants CODEGEN USE GETTERSETTER SUFFIX String suffix store get String Preference Constants CODEGEN GETTERSETTER SUFFIX if suffix length 0 Java Core get Plugin get Plugin Preferences set Value Java Core CODEASSIST FIELD SUFFIXES suffix store set To Default Preference Constants CODEGEN USE GETTERSETTER SUFFIX store set To Default Preference Constants CODEGEN GETTERSETTER SUFFIX store set Default Preference Constants CODEGEN KEYWORD THIS false store set Default Preference Constants CODEGEN IS FOR GETTERS true store set Default Preference Constants CODEGEN EXCEPTION VAR NAME e NON NLS 1 store set Default Preference Constants CODEGEN ADD COMMENTS true Members Order Preference Page store set Default Preference Constants APPEARANCE MEMBER SORT ORDER T SF SI SM I F C M NON NLS 1 store set Default Preference Constants APPEARANCE VISIBILITY SORT ORDER B V R D NON NLS 1 store set Default Preference Constants APPEARANCE ENABLE VISIBILITY SORT ORDER false must add here to guarantee that it is the first in the listener list store add Property Change Listener Java Plugin get Default get Member Order Preference Cache Java Editor Preference Page store set Default Preference Constants EDITOR MATCHING BRACKETS true Preference Converter set Default store Preference Constants EDITOR MATCHING BRACKETS COLOR new RGB 192 192 192 store set Default Preference Constants EDITOR CURRENT LINE true Preference Converter set Default store Preference Constants EDITOR CURRENT LINE COLOR new RGB 232 242 254 store set Default Preference Constants EDITOR PRINT MARGIN false store set Default Preference Constants EDITOR PRINT MARGIN COLUMN 80 Preference Converter set Default store Preference Constants EDITOR PRINT MARGIN COLOR new RGB 176 180 185 Preference Converter set Default store Preference Constants EDITOR FIND SCOPE COLOR new RGB 185 176 180 store set Default Preference Constants EDITOR CORRECTION INDICATION true store set Default Preference Constants EDITOR SYNC OUTLINE ON CURSOR MOVE true store set Default Preference Constants EDITOR EVALUTE TEMPORARY PROBLEMS true store set Default Preference Constants EDITOR OVERVIEW RULER true store set Default Preference Constants EDITOR LINE NUMBER RULER false Preference Converter set Default store Preference Constants EDITOR LINE NUMBER RULER COLOR new RGB 0 0 0 Preference Converter set Default store Preference Constants EDITOR LINKED POSITION COLOR new RGB 121 121 121 Preference Converter set Default store Preference Constants EDITOR LINK COLOR new RGB 0 0 255 store set Default Preference Constants EDITOR FOREGROUND DEFAULT COLOR true store set Default Preference Constants EDITOR BACKGROUND DEFAULT COLOR true store set Default Preference Constants EDITOR TAB WIDTH 4 store set Default Preference Constants EDITOR SPACES FOR TABS false Preference Converter set Default store Preference Constants EDITOR MULTI LINE COMMENT COLOR new RGB 63 127 95 store set Default Preference Constants EDITOR MULTI LINE COMMENT BOLD false store set Default Preference Constants EDITOR MULTI LINE COMMENT ITALIC false Preference Converter set Default store Preference Constants EDITOR SINGLE LINE COMMENT COLOR new RGB 63 127 95 store set Default Preference Constants EDITOR SINGLE LINE COMMENT BOLD false store set Default Preference Constants EDITOR SINGLE LINE COMMENT ITALIC false Preference Converter set Default store Preference Constants EDITOR JAVA KEYWORD COLOR new RGB 127 0 85 store set Default Preference Constants EDITOR JAVA KEYWORD BOLD true store set Default Preference Constants EDITOR JAVA KEYWORD ITALIC false Preference Converter set Default store Preference Constants EDITOR STRING COLOR new RGB 42 0 255 store set Default Preference Constants EDITOR STRING BOLD false store set Default Preference Constants EDITOR STRING ITALIC false Preference Converter set Default store Preference Constants EDITOR JAVA DEFAULT COLOR new RGB 0 0 0 store set Default Preference Constants EDITOR JAVA DEFAULT BOLD false store set Default Preference Constants EDITOR JAVA DEFAULT ITALIC false Preference Converter set Default store Preference Constants EDITOR JAVA METHOD NAME COLOR new RGB 0 0 0 store set Default Preference Constants EDITOR JAVA METHOD NAME BOLD false store set Default Preference Constants EDITOR JAVA METHOD NAME ITALIC false Preference Converter set Default store Preference Constants EDITOR JAVA KEYWORD RETURN COLOR new RGB 127 0 85 store set Default Preference Constants EDITOR JAVA KEYWORD RETURN BOLD true store set Default Preference Constants EDITOR JAVA KEYWORD RETURN ITALIC false Preference Converter set Default store Preference Constants EDITOR JAVA OPERATOR COLOR new RGB 0 0 0 store set Default Preference Constants EDITOR JAVA OPERATOR BOLD false store set Default Preference Constants EDITOR JAVA OPERATOR ITALIC false Preference Converter set Default store Preference Constants EDITOR TASK TAG COLOR new RGB 127 159 191 store set Default Preference Constants EDITOR TASK TAG BOLD true store set Default Preference Constants EDITOR TASK TAG ITALIC false Preference Converter set Default store Preference Constants EDITOR JAVADOC KEYWORD COLOR new RGB 127 159 191 store set Default Preference Constants EDITOR JAVADOC KEYWORD BOLD true store set Default Preference Constants EDITOR JAVADOC KEYWORD ITALIC false Preference Converter set Default store Preference Constants EDITOR JAVADOC TAG COLOR new RGB 127 127 159 store set Default Preference Constants EDITOR JAVADOC TAG BOLD false store set Default Preference Constants EDITOR JAVADOC TAG ITALIC false Preference Converter set Default store Preference Constants EDITOR JAVADOC LINKS COLOR new RGB 63 63 191 store set Default Preference Constants EDITOR JAVADOC LINKS BOLD false store set Default Preference Constants EDITOR JAVADOC LINKS ITALIC false Preference Converter set Default store Preference Constants EDITOR JAVADOC DEFAULT COLOR new RGB 63 95 191 store set Default Preference Constants EDITOR JAVADOC DEFAULT BOLD false store set Default Preference Constants EDITOR JAVADOC DEFAULT ITALIC false store set Default Preference Constants CODEASSIST AUTOACTIVATION true store set Default Preference Constants CODEASSIST AUTOACTIVATION DELAY 500 store set Default Preference Constants CODEASSIST AUTOINSERT true Preference Converter set Default store Preference Constants CODEASSIST PROPOSALS BACKGROUND new RGB 255 255 255 Preference Converter set Default store Preference Constants CODEASSIST PROPOSALS FOREGROUND new RGB 0 0 0  initializeDefaultValues IPreferenceStore AbstractDecoratedTextEditor AbstractDecoratedTextEditorPreferenceConstants initializeDefaultValues setDefault PreferenceConstants EDITOR_SHOW_SEGMENTS JavaBasePreferencePage setDefault PreferenceConstants LINK_PACKAGES_TO_EDITOR setDefault PreferenceConstants LINK_TYPEHIERARCHY_TO_EDITOR setDefault PreferenceConstants OPEN_TYPE_HIERARCHY PreferenceConstants OPEN_TYPE_HIERARCHY_IN_VIEW_PART setDefault PreferenceConstants DOUBLE_CLICK PreferenceConstants DOUBLE_CLICK_EXPANDS setDefault PreferenceConstants UPDATE_JAVA_VIEWS PreferenceConstants UPDATE_WHILE_EDITING setToDefault PreferenceConstants UPDATE_JAVA_VIEWS setDefault PreferenceConstants LINK_BROWSING_PROJECTS_TO_EDITOR setDefault PreferenceConstants LINK_BROWSING_PACKAGES_TO_EDITOR setDefault PreferenceConstants LINK_BROWSING_TYPES_TO_EDITOR setDefault PreferenceConstants LINK_BROWSING_MEMBERS_TO_EDITOR setDefault PreferenceConstants SEARCH_USE_REDUCED_MENU AppearancePreferencePage setDefault PreferenceConstants APPEARANCE_COMPRESS_PACKAGE_NAMES setDefault PreferenceConstants APPEARANCE_METHOD_RETURNTYPE setDefault PreferenceConstants SHOW_CU_CHILDREN setDefault PreferenceConstants BROWSING_STACK_VERTICALLY setDefault PreferenceConstants APPEARANCE_PKG_NAME_PATTERN_FOR_PKG_VIEW setDefault PreferenceConstants APPEARANCE_FOLD_PACKAGES_IN_PACKAGE_EXPLORER ImportOrganizePreferencePage setDefault PreferenceConstants ORGIMPORTS_IMPORTORDER setDefault PreferenceConstants ORGIMPORTS_ONDEMANDTHRESHOLD setDefault PreferenceConstants ORGIMPORTS_IGNORELOWERCASE TypeFilterPreferencePage setDefault PreferenceConstants TYPEFILTER_ENABLED setDefault PreferenceConstants TYPEFILTER_DISABLED ClasspathVariablesPreferencePage CodeFormatterPreferencePage CompilerPreferencePage RefactoringPreferencePage setDefault PreferenceConstants REFACTOR_ERROR_PAGE_SEVERITY_THRESHOLD PreferenceConstants REFACTOR_ERROR_SEVERITY setDefault PreferenceConstants REFACTOR_SAVE_ALL_EDITORS TemplatePreferencePage setDefault PreferenceConstants TEMPLATES_USE_CODEFORMATTER CodeGenerationPreferencePage getBoolean PreferenceConstants CODEGEN_USE_GETTERSETTER_PREFIX getString PreferenceConstants CODEGEN_GETTERSETTER_PREFIX JavaCore getPlugin getPluginPreferences setValue JavaCore CODEASSIST_FIELD_PREFIXES setToDefault PreferenceConstants CODEGEN_USE_GETTERSETTER_PREFIX setToDefault PreferenceConstants CODEGEN_GETTERSETTER_PREFIX getBoolean PreferenceConstants CODEGEN_USE_GETTERSETTER_SUFFIX getString PreferenceConstants CODEGEN_GETTERSETTER_SUFFIX JavaCore getPlugin getPluginPreferences setValue JavaCore CODEASSIST_FIELD_SUFFIXES setToDefault PreferenceConstants CODEGEN_USE_GETTERSETTER_SUFFIX setToDefault PreferenceConstants CODEGEN_GETTERSETTER_SUFFIX setDefault PreferenceConstants CODEGEN_KEYWORD_THIS setDefault PreferenceConstants CODEGEN_IS_FOR_GETTERS setDefault PreferenceConstants CODEGEN_EXCEPTION_VAR_NAME setDefault PreferenceConstants CODEGEN_ADD_COMMENTS MembersOrderPreferencePage setDefault PreferenceConstants APPEARANCE_MEMBER_SORT_ORDER setDefault PreferenceConstants APPEARANCE_VISIBILITY_SORT_ORDER setDefault PreferenceConstants APPEARANCE_ENABLE_VISIBILITY_SORT_ORDER addPropertyChangeListener JavaPlugin getDefault getMemberOrderPreferenceCache JavaEditorPreferencePage setDefault PreferenceConstants EDITOR_MATCHING_BRACKETS PreferenceConverter setDefault PreferenceConstants EDITOR_MATCHING_BRACKETS_COLOR setDefault PreferenceConstants EDITOR_CURRENT_LINE PreferenceConverter setDefault PreferenceConstants EDITOR_CURRENT_LINE_COLOR setDefault PreferenceConstants EDITOR_PRINT_MARGIN setDefault PreferenceConstants EDITOR_PRINT_MARGIN_COLUMN PreferenceConverter setDefault PreferenceConstants EDITOR_PRINT_MARGIN_COLOR PreferenceConverter setDefault PreferenceConstants EDITOR_FIND_SCOPE_COLOR setDefault PreferenceConstants EDITOR_CORRECTION_INDICATION setDefault PreferenceConstants EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE setDefault PreferenceConstants EDITOR_EVALUTE_TEMPORARY_PROBLEMS setDefault PreferenceConstants EDITOR_OVERVIEW_RULER setDefault PreferenceConstants EDITOR_LINE_NUMBER_RULER PreferenceConverter setDefault PreferenceConstants EDITOR_LINE_NUMBER_RULER_COLOR PreferenceConverter setDefault PreferenceConstants EDITOR_LINKED_POSITION_COLOR PreferenceConverter setDefault PreferenceConstants EDITOR_LINK_COLOR setDefault PreferenceConstants EDITOR_FOREGROUND_DEFAULT_COLOR setDefault PreferenceConstants EDITOR_BACKGROUND_DEFAULT_COLOR setDefault PreferenceConstants EDITOR_TAB_WIDTH setDefault PreferenceConstants EDITOR_SPACES_FOR_TABS PreferenceConverter setDefault PreferenceConstants EDITOR_MULTI_LINE_COMMENT_COLOR setDefault PreferenceConstants EDITOR_MULTI_LINE_COMMENT_BOLD setDefault PreferenceConstants EDITOR_MULTI_LINE_COMMENT_ITALIC PreferenceConverter setDefault PreferenceConstants EDITOR_SINGLE_LINE_COMMENT_COLOR setDefault PreferenceConstants EDITOR_SINGLE_LINE_COMMENT_BOLD setDefault PreferenceConstants EDITOR_SINGLE_LINE_COMMENT_ITALIC PreferenceConverter setDefault PreferenceConstants EDITOR_JAVA_KEYWORD_COLOR setDefault PreferenceConstants EDITOR_JAVA_KEYWORD_BOLD setDefault PreferenceConstants EDITOR_JAVA_KEYWORD_ITALIC PreferenceConverter setDefault PreferenceConstants EDITOR_STRING_COLOR setDefault PreferenceConstants EDITOR_STRING_BOLD setDefault PreferenceConstants EDITOR_STRING_ITALIC PreferenceConverter setDefault PreferenceConstants EDITOR_JAVA_DEFAULT_COLOR setDefault PreferenceConstants EDITOR_JAVA_DEFAULT_BOLD setDefault PreferenceConstants EDITOR_JAVA_DEFAULT_ITALIC PreferenceConverter setDefault PreferenceConstants EDITOR_JAVA_METHOD_NAME_COLOR setDefault PreferenceConstants EDITOR_JAVA_METHOD_NAME_BOLD setDefault PreferenceConstants EDITOR_JAVA_METHOD_NAME_ITALIC PreferenceConverter setDefault PreferenceConstants EDITOR_JAVA_KEYWORD_RETURN_COLOR setDefault PreferenceConstants EDITOR_JAVA_KEYWORD_RETURN_BOLD setDefault PreferenceConstants EDITOR_JAVA_KEYWORD_RETURN_ITALIC PreferenceConverter setDefault PreferenceConstants EDITOR_JAVA_OPERATOR_COLOR setDefault PreferenceConstants EDITOR_JAVA_OPERATOR_BOLD setDefault PreferenceConstants EDITOR_JAVA_OPERATOR_ITALIC PreferenceConverter setDefault PreferenceConstants EDITOR_TASK_TAG_COLOR setDefault PreferenceConstants EDITOR_TASK_TAG_BOLD setDefault PreferenceConstants EDITOR_TASK_TAG_ITALIC PreferenceConverter setDefault PreferenceConstants EDITOR_JAVADOC_KEYWORD_COLOR setDefault PreferenceConstants EDITOR_JAVADOC_KEYWORD_BOLD setDefault PreferenceConstants EDITOR_JAVADOC_KEYWORD_ITALIC PreferenceConverter setDefault PreferenceConstants EDITOR_JAVADOC_TAG_COLOR setDefault PreferenceConstants EDITOR_JAVADOC_TAG_BOLD setDefault PreferenceConstants EDITOR_JAVADOC_TAG_ITALIC PreferenceConverter setDefault PreferenceConstants EDITOR_JAVADOC_LINKS_COLOR setDefault PreferenceConstants EDITOR_JAVADOC_LINKS_BOLD setDefault PreferenceConstants EDITOR_JAVADOC_LINKS_ITALIC PreferenceConverter setDefault PreferenceConstants EDITOR_JAVADOC_DEFAULT_COLOR setDefault PreferenceConstants EDITOR_JAVADOC_DEFAULT_BOLD setDefault PreferenceConstants EDITOR_JAVADOC_DEFAULT_ITALIC setDefault PreferenceConstants CODEASSIST_AUTOACTIVATION setDefault PreferenceConstants CODEASSIST_AUTOACTIVATION_DELAY setDefault PreferenceConstants CODEASSIST_AUTOINSERT PreferenceConverter setDefault PreferenceConstants CODEASSIST_PROPOSALS_BACKGROUND PreferenceConverter setDefault PreferenceConstants CODEASSIST_PROPOSALS_FOREGROUND
Returns the JDT UI preference store return the JDT UI preference store public static I Preference Store get Preference Store return Java Plugin get Default get Preference Store  IPreferenceStore getPreferenceStore JavaPlugin getDefault getPreferenceStore
Encodes a JRE library to be used in the named preference code NEWPROJECT JRELIBRARY LIST code param description a string value describing the JRE library The description is used to identify the JDR library in the UI param entries an array of classpath entries to be encoded return the encoded string public static String encodeJRE Library String description I Classpath Entry entries return New Java Project Preference Page encodeJRE Library description entries  NEWPROJECT_JRELIBRARY_LIST encodeJRELibrary IClasspathEntry NewJavaProjectPreferencePage encodeJRELibrary
Decodes an encoded JRE library and returns its description string param encoded Library the encoded library return the description of an encoded JRE library see encodeJRE Library String I Classpath Entry public static String decodeJRE Library Description String encoded Library return New Java Project Preference Page decodeJRE Library Description encoded Library  encodedLibrary encodeJRELibrary IClasspathEntry decodeJRELibraryDescription encodedLibrary NewJavaProjectPreferencePage decodeJRELibraryDescription encodedLibrary
Decodes an encoded JRE library and returns its class path entries param encoded Library the encoded library return the array of classpath entries of an encoded JRE library see encodeJRE Library String I Classpath Entry public static I Classpath Entry decodeJRE Library Classpath Entries String encoded Library return New Java Project Preference Page decodeJRE Library Classpath Entries encoded Library  encodedLibrary encodeJRELibrary IClasspathEntry IClasspathEntry decodeJRELibraryClasspathEntries encodedLibrary NewJavaProjectPreferencePage decodeJRELibraryClasspathEntries encodedLibrary
Returns the current configuration for the JRE to be used as default in new Java projects This is a convenience method to access the named preference code NEWPROJECT JRELIBRARY LIST code with the index defined by code NEWPROJECT JRELIBRARY INDEX code return the current default set of class path entries see NEWPROJECT JRELIBRARY LIST see NEWPROJECT JRELIBRARY INDEX public static I Classpath Entry get DefaultJRE Library return New Java Project Preference Page get DefaultJRE Library  NEWPROJECT_JRELIBRARY_LIST NEWPROJECT_JRELIBRARY_INDEX NEWPROJECT_JRELIBRARY_LIST NEWPROJECT_JRELIBRARY_INDEX IClasspathEntry getDefaultJRELibrary NewJavaProjectPreferencePage getDefaultJRELibrary

Sets the editor on which the hover is shown param editor the editor on which the hover popup should be shown 

Returns the relevance of this completion proposal p The relevance is used to determine if this proposal is more relevant than another proposal p return the relevance of this completion proposal in the range of 0 100 

Returns code true code if the processor has proposals for the given problem This test should be an optimistic guess and be very cheap param unit the compilation unit param problem Id the problem Id return code true code if the processor has proposals for the given problem  problemId
Collects corrections or code manipulations for the given context param context Defines current compilation unit position and a shared AST param locations Problems are the current location return the corrections applicable at the location or code null code if no proposals can be offered throws Core Exception Core Exception can be thrown if the operation fails  CoreException CoreException

Creates a new Java source viewer configuration for viewers in the given editor using the given preference store the color manager and the specified document partitioning p Creates a Java source viewer configuration in the new setup without text tools Clients are allowed to call link Java Source Viewer Configuration handle Property Change Event Property Change Event and disallowed to call link Java Source Viewer Configuration get Preference Store on the resulting Java source viewer configuration p param color Manager the color manager param preference Store the preference store can be read only param editor the editor in which the configured viewer s will reside param partitioning the document partitioning for this configuration since 3 0 public Java Source Viewer Configuration I Color Manager color Manager I Preference Store preference Store I Text Editor editor String partitioning f Color Manager color Manager f Preference Store preference Store f Text Editor editor f Document Partitioning partitioning initialize Scanners  JavaSourceViewerConfiguration handlePropertyChangeEvent PropertyChangeEvent JavaSourceViewerConfiguration getPreferenceStore colorManager preferenceStore JavaSourceViewerConfiguration IColorManager colorManager IPreferenceStore preferenceStore ITextEditor fColorManager colorManager fPreferenceStore preferenceStore fTextEditor fDocumentPartitioning initializeScanners
Creates a new Java source viewer configuration for viewers in the given editor using the given Java tools param tools the Java text tools to be used param editor the editor in which the configured viewer s will reside see Java Text Tools deprecated As of 3 0 replaced by link Java Source Viewer Configuration Java Source Viewer Configuration I Color Manager I Preference Store I Text Editor String public Java Source Viewer Configuration Java Text Tools tools I Text Editor editor f Java Text Tools tools f Color Manager tools get Color Manager f Preference Store create Preference Store f Code Scanner Abstract Java Scanner f Java Text Tools get Code Scanner f Multiline Comment Scanner Abstract Java Scanner f Java Text Tools get Multiline Comment Scanner f Singleline Comment Scanner Abstract Java Scanner f Java Text Tools get Singleline Comment Scanner f String Scanner Abstract Java Scanner f Java Text Tools get String Scanner f Java Doc Scanner Abstract Java Scanner f Java Text Tools get Java Doc Scanner f Text Editor editor  JavaTextTools JavaSourceViewerConfiguration JavaSourceViewerConfiguration IColorManager IPreferenceStore ITextEditor JavaSourceViewerConfiguration JavaTextTools ITextEditor fJavaTextTools fColorManager getColorManager fPreferenceStore createPreferenceStore fCodeScanner AbstractJavaScanner fJavaTextTools getCodeScanner fMultilineCommentScanner AbstractJavaScanner fJavaTextTools getMultilineCommentScanner fSinglelineCommentScanner AbstractJavaScanner fJavaTextTools getSinglelineCommentScanner fStringScanner AbstractJavaScanner fJavaTextTools getStringScanner fJavaDocScanner AbstractJavaScanner fJavaTextTools getJavaDocScanner fTextEditor
Returns the Java source code scanner for this configuration return the Java source code scanner protected Rule Based Scanner get Code Scanner return f Code Scanner  RuleBasedScanner getCodeScanner fCodeScanner
Returns the Java multi line comment scanner for this configuration return the Java multi line comment scanner since 2 0 protected Rule Based Scanner get Multiline Comment Scanner return f Multiline Comment Scanner  RuleBasedScanner getMultilineCommentScanner fMultilineCommentScanner
Returns the Java single line comment scanner for this configuration return the Java single line comment scanner since 2 0 protected Rule Based Scanner get Singleline Comment Scanner return f Singleline Comment Scanner  RuleBasedScanner getSinglelineCommentScanner fSinglelineCommentScanner
Returns the Java string scanner for this configuration return the Java string scanner since 2 0 protected Rule Based Scanner get String Scanner return f String Scanner  RuleBasedScanner getStringScanner fStringScanner
Returns the Java Doc scanner for this configuration return the Java Doc scanner protected Rule Based Scanner get Java Doc Scanner return f Java Doc Scanner  JavaDoc JavaDoc RuleBasedScanner getJavaDocScanner fJavaDocScanner
Returns the color manager for this configuration return the color manager protected I Color Manager get Color Manager return f Color Manager  IColorManager getColorManager fColorManager
Returns the editor in which the configured viewer s will reside return the enclosing editor protected I Text Editor get Editor return f Text Editor  ITextEditor getEditor fTextEditor
Returns the preference store used by this configuration to initialize the individual bits and pieces p Clients are not allowed to call this method if the new setup without text tools is in use see Java Source Viewer Configuration Java Source Viewer Configuration I Color Manager I Preference Store I Text Editor String p return the preference store used to initialize this configuration since 2 0 deprecated As of 3 0 protected I Preference Store get Preference Store Assert is True is New Setup return f Java Text Tools get Preference Store  JavaSourceViewerConfiguration JavaSourceViewerConfiguration IColorManager IPreferenceStore ITextEditor IPreferenceStore getPreferenceStore isTrue isNewSetup fJavaTextTools getPreferenceStore
return code true code iff the new setup without text tools is in use since 3 0 private boolean is New Setup return f Java Text Tools null  isNewSetup fJavaTextTools
Creates and returns a preference store which combines the preference stores from the text tools and which is read only return the read only preference store since 3 0 private I Preference Store create Preference Store Assert is True is New Setup I Preference Store general Text Store EditorsUI get Preference Store if f Java Text Tools get Core Preference Store null return new Chained Preference Store new I Preference Store f Java Text Tools get Preference Store general Text Store return new Chained Preference Store new I Preference Store f Java Text Tools get Preference Store new Preferences Adapter f Java Text Tools get Core Preference Store general Text Store  IPreferenceStore createPreferenceStore isTrue isNewSetup IPreferenceStore generalTextStore getPreferenceStore fJavaTextTools getCorePreferenceStore ChainedPreferenceStore IPreferenceStore fJavaTextTools getPreferenceStore generalTextStore ChainedPreferenceStore IPreferenceStore fJavaTextTools getPreferenceStore PreferencesAdapter fJavaTextTools getCorePreferenceStore generalTextStore
Initializes the scanners since 3 0 private void initialize Scanners Assert is True is New Setup f Code Scanner new Java Code Scanner get Color Manager f Preference Store f Multiline Comment Scanner new Java Comment Scanner get Color Manager f Preference Store I Java Color Constants JAVA MULTI LINE COMMENT f Singleline Comment Scanner new Java Comment Scanner get Color Manager f Preference Store I Java Color Constants JAVA SINGLE LINE COMMENT f String Scanner new Single Token Java Scanner get Color Manager f Preference Store I Java Color Constants JAVA STRING f Java Doc Scanner new Java Doc Scanner get Color Manager f Preference Store  initializeScanners isTrue isNewSetup fCodeScanner JavaCodeScanner getColorManager fPreferenceStore fMultilineCommentScanner JavaCommentScanner getColorManager fPreferenceStore IJavaColorConstants JAVA_MULTI_LINE_COMMENT fSinglelineCommentScanner JavaCommentScanner getColorManager fPreferenceStore IJavaColorConstants JAVA_SINGLE_LINE_COMMENT fStringScanner SingleTokenJavaScanner getColorManager fPreferenceStore IJavaColorConstants JAVA_STRING fJavaDocScanner JavaDocScanner getColorManager fPreferenceStore
public I Presentation Reconciler get Presentation Reconciler I Source Viewer source Viewer Presentation Reconciler reconciler new Java Presentation Reconciler reconciler set Document Partitioning get Configured Document Partitioning source Viewer Default Damager Repairer dr new Default Damager Repairer get Code Scanner reconciler set Damager dr I Document DEFAULT CONTENT TYPE reconciler set Repairer dr I Document DEFAULT CONTENT TYPE dr new Default Damager Repairer get Java Doc Scanner reconciler set Damager dr I Java Partitions JAVA DOC reconciler set Repairer dr I Java Partitions JAVA DOC dr new Default Damager Repairer get Multiline Comment Scanner reconciler set Damager dr I Java Partitions JAVA MULTI LINE COMMENT reconciler set Repairer dr I Java Partitions JAVA MULTI LINE COMMENT dr new Default Damager Repairer get Singleline Comment Scanner reconciler set Damager dr I Java Partitions JAVA SINGLE LINE COMMENT reconciler set Repairer dr I Java Partitions JAVA SINGLE LINE COMMENT dr new Default Damager Repairer get String Scanner reconciler set Damager dr I Java Partitions JAVA STRING reconciler set Repairer dr I Java Partitions JAVA STRING dr new Default Damager Repairer get String Scanner reconciler set Damager dr I Java Partitions JAVA CHARACTER reconciler set Repairer dr I Java Partitions JAVA CHARACTER return reconciler  IPresentationReconciler getPresentationReconciler ISourceViewer sourceViewer PresentationReconciler JavaPresentationReconciler setDocumentPartitioning getConfiguredDocumentPartitioning sourceViewer DefaultDamagerRepairer DefaultDamagerRepairer getCodeScanner setDamager IDocument DEFAULT_CONTENT_TYPE setRepairer IDocument DEFAULT_CONTENT_TYPE DefaultDamagerRepairer getJavaDocScanner setDamager IJavaPartitions JAVA_DOC setRepairer IJavaPartitions JAVA_DOC DefaultDamagerRepairer getMultilineCommentScanner setDamager IJavaPartitions JAVA_MULTI_LINE_COMMENT setRepairer IJavaPartitions JAVA_MULTI_LINE_COMMENT DefaultDamagerRepairer getSinglelineCommentScanner setDamager IJavaPartitions JAVA_SINGLE_LINE_COMMENT setRepairer IJavaPartitions JAVA_SINGLE_LINE_COMMENT DefaultDamagerRepairer getStringScanner setDamager IJavaPartitions JAVA_STRING setRepairer IJavaPartitions JAVA_STRING DefaultDamagerRepairer getStringScanner setDamager IJavaPartitions JAVA_CHARACTER setRepairer IJavaPartitions JAVA_CHARACTER
public I Content Assistant get Content Assistant I Source Viewer source Viewer if get Editor null Content Assistant assistant new Content Assistant assistant set Document Partitioning get Configured Document Partitioning source Viewer assistant set Restore Completion Proposal Size get Settings completion proposal size NON NLS 1 I Content Assist Processor java Processor new Java Completion Processor get Editor assistant set Content Assist Processor java Processor I Document DEFAULT CONTENT TYPE Register the java processor for single line comments to get the NLS template working inside comments I Content Assist Processor word Processor new Word Completion Processor Compound Content Assist Processor compound Processor new Compound Content Assist Processor compound Processor add java Processor compound Processor add word Processor assistant set Content Assist Processor compound Processor I Java Partitions JAVA SINGLE LINE COMMENT assistant set Content Assist Processor word Processor I Java Partitions JAVA STRING assistant set Content Assist Processor word Processor I Java Partitions JAVA MULTI LINE COMMENT assistant set Content Assist Processor new Java Doc Completion Processor get Editor I Java Partitions JAVA DOC Content Assist Preference configure assistant f Preference Store assistant set Context Information Popup Orientation I Content Assistant CONTEXT INFO ABOVE assistant set Information Control Creator get Information Control Creator source Viewer return assistant return null  IContentAssistant getContentAssistant ISourceViewer sourceViewer getEditor ContentAssistant ContentAssistant setDocumentPartitioning getConfiguredDocumentPartitioning sourceViewer setRestoreCompletionProposalSize getSettings completion_proposal_size IContentAssistProcessor javaProcessor JavaCompletionProcessor getEditor setContentAssistProcessor javaProcessor IDocument DEFAULT_CONTENT_TYPE IContentAssistProcessor wordProcessor WordCompletionProcessor CompoundContentAssistProcessor compoundProcessor CompoundContentAssistProcessor compoundProcessor javaProcessor compoundProcessor wordProcessor setContentAssistProcessor compoundProcessor IJavaPartitions JAVA_SINGLE_LINE_COMMENT setContentAssistProcessor wordProcessor IJavaPartitions JAVA_STRING setContentAssistProcessor wordProcessor IJavaPartitions JAVA_MULTI_LINE_COMMENT setContentAssistProcessor JavaDocCompletionProcessor getEditor IJavaPartitions JAVA_DOC ContentAssistPreference fPreferenceStore setContextInformationPopupOrientation IContentAssistant CONTEXT_INFO_ABOVE setInformationControlCreator getInformationControlCreator sourceViewer
public I Reconciler get Reconciler I Source Viewer source Viewer final I Text Editor editor get Editor if editor null editor is Editable Java Composite Reconciling Strategy strategy new Java Composite Reconciling Strategy editor get Configured Document Partitioning source Viewer Java Reconciler reconciler new Java Reconciler editor strategy false reconciler set Is Incremental Reconciler false reconciler set Progress Monitor new Null Progress Monitor reconciler set Delay 500 return reconciler return null  IReconciler getReconciler ISourceViewer sourceViewer ITextEditor getEditor isEditable JavaCompositeReconcilingStrategy JavaCompositeReconcilingStrategy getConfiguredDocumentPartitioning sourceViewer JavaReconciler JavaReconciler setIsIncrementalReconciler setProgressMonitor NullProgressMonitor setDelay
public I Auto Indent Strategy get Auto Indent Strategy I Source Viewer source Viewer String content Type if I Java Partitions JAVA DOC equals content Type I Java Partitions JAVA MULTI LINE COMMENT equals content Type return new Java Doc Auto Indent Strategy get Configured Document Partitioning source Viewer else if I Java Partitions JAVA STRING equals content Type return new Java String Auto Indent Strategy get Configured Document Partitioning source Viewer return new Java Auto Indent Strategy get Configured Document Partitioning source Viewer  IAutoIndentStrategy getAutoIndentStrategy ISourceViewer sourceViewer contentType IJavaPartitions JAVA_DOC contentType IJavaPartitions JAVA_MULTI_LINE_COMMENT contentType JavaDocAutoIndentStrategy getConfiguredDocumentPartitioning sourceViewer IJavaPartitions JAVA_STRING contentType JavaStringAutoIndentStrategy getConfiguredDocumentPartitioning sourceViewer JavaAutoIndentStrategy getConfiguredDocumentPartitioning sourceViewer
public I Text Double Click Strategy get Double Click Strategy I Source Viewer source Viewer String content Type if I Java Partitions JAVA DOC equals content Type I Java Partitions JAVA MULTI LINE COMMENT equals content Type I Java Partitions JAVA SINGLE LINE COMMENT equals content Type return new Default Text Double Click Strategy else if I Java Partitions JAVA STRING equals content Type I Java Partitions JAVA CHARACTER equals content Type return new Java String Double Click Selector get Configured Document Partitioning source Viewer return new Java Double Click Selector  ITextDoubleClickStrategy getDoubleClickStrategy ISourceViewer sourceViewer contentType IJavaPartitions JAVA_DOC contentType IJavaPartitions JAVA_MULTI_LINE_COMMENT contentType IJavaPartitions JAVA_SINGLE_LINE_COMMENT contentType DefaultTextDoubleClickStrategy IJavaPartitions JAVA_STRING contentType IJavaPartitions JAVA_CHARACTER contentType JavaStringDoubleClickSelector getConfiguredDocumentPartitioning sourceViewer JavaDoubleClickSelector
since 2 0 public String get Default Prefixes I Source Viewer source Viewer String content Type return new String NON NLS 1 NON NLS 2  getDefaultPrefixes ISourceViewer sourceViewer contentType
public String get Indent Prefixes I Source Viewer source Viewer String content Type Vector vector new Vector prefix 0 is either t or x tab Width depending on use Spaces int tab Width Code Formatter Util get Tab Width boolean use Spaces f Preference Store get Boolean SPACES FOR TABS for int i 0 i tab Width i String Buffer prefix new String Buffer if use Spaces for int j 0 j i tab Width j prefix append if i 0 prefix append t else for int j 0 j i j prefix append if i tab Width prefix append t vector add prefix to String vector add NON NLS 1 return String vector to Array new String vector size  getIndentPrefixes ISourceViewer sourceViewer contentType tabWidth useSpaces tabWidth CodeFormatterUtil getTabWidth useSpaces fPreferenceStore getBoolean SPACES_FOR_TABS tabWidth StringBuffer StringBuffer useSpaces tabWidth tabWidth toString toArray
public int get Tab Width I Source Viewer source Viewer if f Preference Store contains Abstract Decorated Text Editor Preference Constants EDITOR TAB WIDTH return f Preference Store get Int Abstract Decorated Text Editor Preference Constants EDITOR TAB WIDTH else backwards compatibility code return f Preference Store get Int PREFERENCE TAB WIDTH  getTabWidth ISourceViewer sourceViewer fPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_TAB_WIDTH fPreferenceStore getInt AbstractDecoratedTextEditorPreferenceConstants EDITOR_TAB_WIDTH fPreferenceStore getInt PREFERENCE_TAB_WIDTH
see Source Viewer Configuration get Annotation Hover I Source Viewer public I Annotation Hover get Annotation Hover I Source Viewer source Viewer return new Java Annotation Hover Java Annotation Hover VERTICAL RULER HOVER  SourceViewerConfiguration getAnnotationHover ISourceViewer IAnnotationHover getAnnotationHover ISourceViewer sourceViewer JavaAnnotationHover JavaAnnotationHover VERTICAL_RULER_HOVER
since 3 0 public I Annotation Hover get Overview Ruler Annotation Hover I Source Viewer source Viewer return new Java Annotation Hover Java Annotation Hover OVERVIEW RULER HOVER  IAnnotationHover getOverviewRulerAnnotationHover ISourceViewer sourceViewer JavaAnnotationHover JavaAnnotationHover OVERVIEW_RULER_HOVER
public int get Configured Text Hover State Masks I Source Viewer source Viewer String content Type Java Editor Text Hover Descriptor hover Descs Java Plugin get Default get Java Editor Text Hover Descriptors int state Masks new int hover Descs length int state Masks Length 0 for int i 0 i hover Descs length i if hover Descs i is Enabled int j 0 int state Mask hover Descs i get State Mask while j state Masks Length if state Masks j state Mask break j if j state Masks Length state Masks state Masks Length state Mask if state Masks Length hover Descs length return state Masks int shortened State Masks new int state Masks Length System arraycopy state Masks 0 shortened State Masks 0 state Masks Length return shortened State Masks  getConfiguredTextHoverStateMasks ISourceViewer sourceViewer contentType JavaEditorTextHoverDescriptor hoverDescs JavaPlugin getDefault getJavaEditorTextHoverDescriptors stateMasks hoverDescs stateMasksLength hoverDescs hoverDescs isEnabled stateMask hoverDescs getStateMask stateMasksLength stateMasks stateMask stateMasksLength stateMasks stateMasksLength stateMask stateMasksLength hoverDescs stateMasks shortenedStateMasks stateMasksLength stateMasks shortenedStateMasks stateMasksLength shortenedStateMasks
public I Text Hover get Text Hover I Source Viewer source Viewer String content Type int state Mask Java Editor Text Hover Descriptor hover Descs Java Plugin get Default get Java Editor Text Hover Descriptors int i 0 while i hover Descs length if hover Descs i is Enabled hover Descs i get State Mask state Mask return new Java Editor Text Hover Proxy hover Descs i get Editor i return null  ITextHover getTextHover ISourceViewer sourceViewer contentType stateMask JavaEditorTextHoverDescriptor hoverDescs JavaPlugin getDefault getJavaEditorTextHoverDescriptors hoverDescs hoverDescs isEnabled hoverDescs getStateMask stateMask JavaEditorTextHoverProxy hoverDescs getEditor
see Source Viewer Configuration get Text Hover I Source Viewer String public I Text Hover get Text Hover I Source Viewer source Viewer String content Type return get Text Hover source Viewer content Type I Text Viewer Extension2 DEFAULT HOVER STATE MASK  SourceViewerConfiguration getTextHover ISourceViewer ITextHover getTextHover ISourceViewer sourceViewer contentType getTextHover sourceViewer contentType ITextViewerExtension2 DEFAULT_HOVER_STATE_MASK
public String get Configured Content Types I Source Viewer source Viewer return new String I Document DEFAULT CONTENT TYPE I Java Partitions JAVA DOC I Java Partitions JAVA MULTI LINE COMMENT I Java Partitions JAVA SINGLE LINE COMMENT I Java Partitions JAVA STRING I Java Partitions JAVA CHARACTER  getConfiguredContentTypes ISourceViewer sourceViewer IDocument DEFAULT_CONTENT_TYPE IJavaPartitions JAVA_DOC IJavaPartitions JAVA_MULTI_LINE_COMMENT IJavaPartitions JAVA_SINGLE_LINE_COMMENT IJavaPartitions JAVA_STRING IJavaPartitions JAVA_CHARACTER
public String get Configured Document Partitioning I Source Viewer source Viewer if f Document Partitioning null return f Document Partitioning return super get Configured Document Partitioning source Viewer  getConfiguredDocumentPartitioning ISourceViewer sourceViewer fDocumentPartitioning fDocumentPartitioning getConfiguredDocumentPartitioning sourceViewer
public I Content Formatter get Content Formatter I Source Viewer source Viewer final Multi Pass Content Formatter formatter new Multi Pass Content Formatter get Configured Document Partitioning source Viewer I Document DEFAULT CONTENT TYPE formatter set Master Strategy new Java Formatting Strategy Default Text Measurement text Measurement new Default Text Measurement source Viewer get Text Widget formatter set Slave Strategy new Comment Formatting Strategy text Measurement I Java Partitions JAVA DOC formatter set Slave Strategy new Comment Formatting Strategy text Measurement I Java Partitions JAVA SINGLE LINE COMMENT formatter set Slave Strategy new Comment Formatting Strategy text Measurement I Java Partitions JAVA MULTI LINE COMMENT return formatter  IContentFormatter getContentFormatter ISourceViewer sourceViewer MultiPassContentFormatter MultiPassContentFormatter getConfiguredDocumentPartitioning sourceViewer IDocument DEFAULT_CONTENT_TYPE setMasterStrategy JavaFormattingStrategy DefaultTextMeasurement textMeasurement DefaultTextMeasurement sourceViewer getTextWidget setSlaveStrategy CommentFormattingStrategy textMeasurement IJavaPartitions JAVA_DOC setSlaveStrategy CommentFormattingStrategy textMeasurement IJavaPartitions JAVA_SINGLE_LINE_COMMENT setSlaveStrategy CommentFormattingStrategy textMeasurement IJavaPartitions JAVA_MULTI_LINE_COMMENT
public I Information Control Creator get Information Control Creator I Source Viewer source Viewer return new I Information Control Creator public I Information Control create Information Control Shell parent return new Default Information Control parent SWT NONE new HTML Text Presenter true  IInformationControlCreator getInformationControlCreator ISourceViewer sourceViewer IInformationControlCreator IInformationControl createInformationControl DefaultInformationControl HTMLTextPresenter
public I Information Control Creator get Information Control Creator I Source Viewer source Viewer return new I Information Control Creator public I Information Control create Information Control Shell parent return new Default Information Control parent SWT NONE new HTML Text Presenter true  IInformationControlCreator getInformationControlCreator ISourceViewer sourceViewer IInformationControlCreator IInformationControl createInformationControl DefaultInformationControl HTMLTextPresenter
return new I Information Control Creator public I Information Control create Information Control Shell parent int shell Style SWT RESIZE int style SWT V SCROLL SWT H SCROLL return new Default Information Control parent shell Style style new HTML Text Presenter false return new Hover Browser Control parent  IInformationControlCreator IInformationControl createInformationControl shellStyle V_SCROLL H_SCROLL DefaultInformationControl shellStyle HTMLTextPresenter HoverBrowserControl
Returns the information presenter control creator The creator is a factory creating the presenter controls for the given source viewer This implementation always returns a creator for code Default Information Control code instances param source Viewer the source viewer to be configured by this configuration return an information control creator since 2 1 private I Information Control Creator get Information Presenter Control Creator I Source Viewer source Viewer return new I Information Control Creator public I Information Control create Information Control Shell parent int shell Style SWT RESIZE int style SWT V SCROLL SWT H SCROLL return new Default Information Control parent shell Style style new HTML Text Presenter false return new Hover Browser Control parent  DefaultInformationControl sourceViewer IInformationControlCreator getInformationPresenterControlCreator ISourceViewer sourceViewer IInformationControlCreator IInformationControl createInformationControl shellStyle V_SCROLL H_SCROLL DefaultInformationControl shellStyle HTMLTextPresenter HoverBrowserControl
return new I Information Control Creator public I Information Control create Information Control Shell parent int shell Style SWT RESIZE int tree Style SWT V SCROLL SWT H SCROLL return new Java Outline Information Control parent shell Style tree Style command Id  IInformationControlCreator IInformationControl createInformationControl shellStyle treeStyle V_SCROLL H_SCROLL JavaOutlineInformationControl shellStyle treeStyle commandId
Returns the outline presenter control creator The creator is a factory creating outline presenter controls for the given source viewer This implementation always returns a creator for code Java Outline Information Control code instances param source Viewer the source viewer to be configured by this configuration param command Id the ID of the command that opens this control return an information control creator since 2 1 private I Information Control Creator get Outline Presenter Control Creator I Source Viewer source Viewer final String command Id return new I Information Control Creator public I Information Control create Information Control Shell parent int shell Style SWT RESIZE int tree Style SWT V SCROLL SWT H SCROLL return new Java Outline Information Control parent shell Style tree Style command Id  JavaOutlineInformationControl sourceViewer commandId IInformationControlCreator getOutlinePresenterControlCreator ISourceViewer sourceViewer commandId IInformationControlCreator IInformationControl createInformationControl shellStyle treeStyle V_SCROLL H_SCROLL JavaOutlineInformationControl shellStyle treeStyle commandId
return new I Information Control Creator public I Information Control create Information Control Shell parent int shell Style SWT RESIZE int tree Style SWT V SCROLL SWT H SCROLL return new Hierarchy Information Control parent shell Style tree Style  IInformationControlCreator IInformationControl createInformationControl shellStyle treeStyle V_SCROLL H_SCROLL HierarchyInformationControl shellStyle treeStyle
private I Information Control Creator get Hierarchy Presenter Control Creator I Source Viewer source Viewer return new I Information Control Creator public I Information Control create Information Control Shell parent int shell Style SWT RESIZE int tree Style SWT V SCROLL SWT H SCROLL return new Hierarchy Information Control parent shell Style tree Style  IInformationControlCreator getHierarchyPresenterControlCreator ISourceViewer sourceViewer IInformationControlCreator IInformationControl createInformationControl shellStyle treeStyle V_SCROLL H_SCROLL HierarchyInformationControl shellStyle treeStyle
public I Information Presenter get Information Presenter I Source Viewer source Viewer Information Presenter presenter new Information Presenter get Information Presenter Control Creator source Viewer presenter set Document Partitioning get Configured Document Partitioning source Viewer I Information Provider provider new Java Information Provider get Editor presenter set Information Provider provider I Document DEFAULT CONTENT TYPE presenter set Information Provider provider I Java Partitions JAVA DOC presenter set Information Provider provider I Java Partitions JAVA CHARACTER presenter set Size Constraints 60 10 true true return presenter  IInformationPresenter getInformationPresenter ISourceViewer sourceViewer InformationPresenter InformationPresenter getInformationPresenterControlCreator sourceViewer setDocumentPartitioning getConfiguredDocumentPartitioning sourceViewer IInformationProvider JavaInformationProvider getEditor setInformationProvider IDocument DEFAULT_CONTENT_TYPE setInformationProvider IJavaPartitions JAVA_DOC setInformationProvider IJavaPartitions JAVA_CHARACTER setSizeConstraints
Returns the outline presenter which will determine and shown information requested for the current cursor position param source Viewer the source viewer to be configured by this configuration param do Code Resolve a boolean which specifies whether code resolve should be used to compute the Java element return an information presenter since 2 1 public I Information Presenter get Outline Presenter I Source Viewer source Viewer boolean do Code Resolve Information Presenter presenter if do Code Resolve presenter new Information Presenter get Outline Presenter Control Creator source Viewer I Java Editor Action Definition Ids OPEN STRUCTURE else presenter new Information Presenter get Outline Presenter Control Creator source Viewer I Java Editor Action Definition Ids SHOW OUTLINE presenter set Document Partitioning get Configured Document Partitioning source Viewer presenter set Anchor Abstract Information Control Manager ANCHOR GLOBAL I Information Provider provider new Java Element Provider get Editor do Code Resolve presenter set Information Provider provider I Document DEFAULT CONTENT TYPE presenter set Information Provider provider I Java Partitions JAVA DOC presenter set Information Provider provider I Java Partitions JAVA MULTI LINE COMMENT presenter set Information Provider provider I Java Partitions JAVA SINGLE LINE COMMENT presenter set Information Provider provider I Java Partitions JAVA STRING presenter set Information Provider provider I Java Partitions JAVA CHARACTER presenter set Size Constraints 20 20 true false presenter set Restore Information Control Bounds get Settings outline presenter bounds true true NON NLS 1 return presenter  sourceViewer doCodeResolve IInformationPresenter getOutlinePresenter ISourceViewer sourceViewer doCodeResolve InformationPresenter doCodeResolve InformationPresenter getOutlinePresenterControlCreator sourceViewer IJavaEditorActionDefinitionIds OPEN_STRUCTURE InformationPresenter getOutlinePresenterControlCreator sourceViewer IJavaEditorActionDefinitionIds SHOW_OUTLINE setDocumentPartitioning getConfiguredDocumentPartitioning sourceViewer setAnchor AbstractInformationControlManager ANCHOR_GLOBAL IInformationProvider JavaElementProvider getEditor doCodeResolve setInformationProvider IDocument DEFAULT_CONTENT_TYPE setInformationProvider IJavaPartitions JAVA_DOC setInformationProvider IJavaPartitions JAVA_MULTI_LINE_COMMENT setInformationProvider IJavaPartitions JAVA_SINGLE_LINE_COMMENT setInformationProvider IJavaPartitions JAVA_STRING setInformationProvider IJavaPartitions JAVA_CHARACTER setSizeConstraints setRestoreInformationControlBounds getSettings outline_presenter_bounds
Returns the settings for the given section param section Name the section name return the settings since 3 0 private I Dialog Settings get Settings String section Name I Dialog Settings settings Java Plugin get Default get Dialog Settings get Section section Name if settings null settings Java Plugin get Default get Dialog Settings add New Section section Name return settings  sectionName IDialogSettings getSettings sectionName IDialogSettings JavaPlugin getDefault getDialogSettings getSection sectionName JavaPlugin getDefault getDialogSettings addNewSection sectionName
Returns the hierarchy presenter which will determine and shown type hierarchy information requested for the current cursor position param source Viewer the source viewer to be configured by this configuration param do Code Resolve a boolean which specifies whether code resolve should be used to compute the Java element return an information presenter since 3 0 public I Information Presenter get Hierarchy Presenter I Source Viewer source Viewer boolean do Code Resolve Information Presenter presenter new Information Presenter get Hierarchy Presenter Control Creator source Viewer presenter set Document Partitioning get Configured Document Partitioning source Viewer presenter set Anchor Abstract Information Control Manager ANCHOR GLOBAL I Information Provider provider new Java Element Provider get Editor do Code Resolve presenter set Information Provider provider I Document DEFAULT CONTENT TYPE presenter set Information Provider provider I Java Partitions JAVA DOC presenter set Information Provider provider I Java Partitions JAVA MULTI LINE COMMENT presenter set Information Provider provider I Java Partitions JAVA SINGLE LINE COMMENT presenter set Information Provider provider I Java Partitions JAVA STRING presenter set Information Provider provider I Java Partitions JAVA CHARACTER presenter set Size Constraints 50 20 true false presenter set Restore Information Control Bounds get Settings hierarchy presenter bounds true true NON NLS 1 return presenter  sourceViewer doCodeResolve IInformationPresenter getHierarchyPresenter ISourceViewer sourceViewer doCodeResolve InformationPresenter InformationPresenter getHierarchyPresenterControlCreator sourceViewer setDocumentPartitioning getConfiguredDocumentPartitioning sourceViewer setAnchor AbstractInformationControlManager ANCHOR_GLOBAL IInformationProvider JavaElementProvider getEditor doCodeResolve setInformationProvider IDocument DEFAULT_CONTENT_TYPE setInformationProvider IJavaPartitions JAVA_DOC setInformationProvider IJavaPartitions JAVA_MULTI_LINE_COMMENT setInformationProvider IJavaPartitions JAVA_SINGLE_LINE_COMMENT setInformationProvider IJavaPartitions JAVA_STRING setInformationProvider IJavaPartitions JAVA_CHARACTER setSizeConstraints setRestoreInformationControlBounds getSettings hierarchy_presenter_bounds
Determines whether the preference change encoded by the given event changes the behavior of one of its contained components param event the event to be investigated return code true code if event causes a behavioral change since 3 0 public boolean affects Text Presentation Property Change Event event return f Code Scanner affects Behavior event f Multiline Comment Scanner affects Behavior event f Singleline Comment Scanner affects Behavior event f String Scanner affects Behavior event f Java Doc Scanner affects Behavior event  affectsTextPresentation PropertyChangeEvent fCodeScanner affectsBehavior fMultilineCommentScanner affectsBehavior fSinglelineCommentScanner affectsBehavior fStringScanner affectsBehavior fJavaDocScanner affectsBehavior
Adapts the behavior of the contained components to the change encoded in the given event p Clients are not allowed to call this method if the old setup with text tools is in use p param event the event to which to adapt see Java Source Viewer Configuration Java Source Viewer Configuration I Color Manager I Preference Store I Text Editor String since 3 0 public void handle Property Change Event Property Change Event event Assert is True is New Setup if f Code Scanner affects Behavior event f Code Scanner adapt To Preference Change event if f Multiline Comment Scanner affects Behavior event f Multiline Comment Scanner adapt To Preference Change event if f Singleline Comment Scanner affects Behavior event f Singleline Comment Scanner adapt To Preference Change event if f String Scanner affects Behavior event f String Scanner adapt To Preference Change event if f Java Doc Scanner affects Behavior event f Java Doc Scanner adapt To Preference Change event  JavaSourceViewerConfiguration JavaSourceViewerConfiguration IColorManager IPreferenceStore ITextEditor handlePropertyChangeEvent PropertyChangeEvent isTrue isNewSetup fCodeScanner affectsBehavior fCodeScanner adaptToPreferenceChange fMultilineCommentScanner affectsBehavior fMultilineCommentScanner adaptToPreferenceChange fSinglelineCommentScanner affectsBehavior fSinglelineCommentScanner adaptToPreferenceChange fStringScanner affectsBehavior fStringScanner adaptToPreferenceChange fJavaDocScanner affectsBehavior fJavaDocScanner adaptToPreferenceChange

private class Preference Listener implements I Property Change Listener Preferences I Property Change Listener public void property Change Property Change Event event adapt To Preference Change event  PreferenceListener IPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent adaptToPreferenceChange
adapt To Preference Change event public void property Change Preferences Property Change Event event adapt To Preference Change new Property Change Event event get Source event get Property event get Old Value event get New Value  adaptToPreferenceChange propertyChange PropertyChangeEvent adaptToPreferenceChange PropertyChangeEvent getSource getProperty getOldValue getNewValue
Creates a new Java text tools collection param store the preference store to initialize the text tools The text tool instance installs a listener on the passed preference store to adapt itself to changes in the preference store In general code Preference Constants get Preference Store code should be used to initialize the text tools see org eclipse jdt ui Preference Constants get Preference Store since 2 0 public Java Text Tools I Preference Store store this store null true  PreferenceConstants getPreferenceStore PreferenceConstants getPreferenceStore JavaTextTools IPreferenceStore
Creates a new Java text tools collection param store the preference store to initialize the text tools The text tool instance installs a listener on the passed preference store to adapt itself to changes in the preference store In general code Preference Constants get Preference Store code should be used to initialize the text tools param auto Dispose On Display Dispose if code true code the color manager automatically disposes all managed colors when the current display gets disposed and all calls to link org eclipse jface text source I Shared Text Colors dispose are ignored see org eclipse jdt ui Preference Constants get Preference Store since 2 1 public Java Text Tools I Preference Store store boolean auto Dispose On Display Dispose this store null auto Dispose On Display Dispose  PreferenceConstants getPreferenceStore autoDisposeOnDisplayDispose ISharedTextColors PreferenceConstants getPreferenceStore JavaTextTools IPreferenceStore autoDisposeOnDisplayDispose autoDisposeOnDisplayDispose
Creates a new Java text tools collection param store the preference store to initialize the text tools The text tool instance installs a listener on the passed preference store to adapt itself to changes in the preference store In general code Preference Constants get Preference Store code should be used to initialize the text tools param core Store optional preference store to initialize the text tools The text tool instance installs a listener on the passed preference store to adapt itself to changes in the preference store see org eclipse jdt ui Preference Constants get Preference Store since 2 1 public Java Text Tools I Preference Store store Preferences core Store this store core Store true  PreferenceConstants getPreferenceStore coreStore PreferenceConstants getPreferenceStore JavaTextTools IPreferenceStore coreStore coreStore
Creates a new Java text tools collection param store the preference store to initialize the text tools The text tool instance installs a listener on the passed preference store to adapt itself to changes in the preference store In general code Preference Constants get Preference Store code should be used to initialize the text tools param core Store optional preference store to initialize the text tools The text tool instance installs a listener on the passed preference store to adapt itself to changes in the preference store param auto Dispose On Display Dispose if code true code the color manager automatically disposes all managed colors when the current display gets disposed and all calls to link org eclipse jface text source I Shared Text Colors dispose are ignored see org eclipse jdt ui Preference Constants get Preference Store since 2 1 public Java Text Tools I Preference Store store Preferences core Store boolean auto Dispose On Display Dispose f Preference Store store f Preference Store add Property Change Listener f Preference Listener f Core Preference Store core Store if f Core Preference Store null f Core Preference Store add Property Change Listener f Preference Listener f Color Manager new Java Color Manager auto Dispose On Display Dispose f Code Scanner new Java Code Scanner f Color Manager store f Multiline Comment Scanner new Java Comment Scanner f Color Manager store core Store I Java Color Constants JAVA MULTI LINE COMMENT f Singleline Comment Scanner new Java Comment Scanner f Color Manager store core Store I Java Color Constants JAVA SINGLE LINE COMMENT f String Scanner new Single Token Java Scanner f Color Manager store I Java Color Constants JAVA STRING f Java Doc Scanner new Java Doc Scanner f Color Manager store core Store f Partition Scanner new Fast Java Partition Scanner  PreferenceConstants getPreferenceStore coreStore autoDisposeOnDisplayDispose ISharedTextColors PreferenceConstants getPreferenceStore JavaTextTools IPreferenceStore coreStore autoDisposeOnDisplayDispose fPreferenceStore fPreferenceStore addPropertyChangeListener fPreferenceListener fCorePreferenceStore coreStore fCorePreferenceStore fCorePreferenceStore addPropertyChangeListener fPreferenceListener fColorManager JavaColorManager autoDisposeOnDisplayDispose fCodeScanner JavaCodeScanner fColorManager fMultilineCommentScanner JavaCommentScanner fColorManager coreStore IJavaColorConstants JAVA_MULTI_LINE_COMMENT fSinglelineCommentScanner JavaCommentScanner fColorManager coreStore IJavaColorConstants JAVA_SINGLE_LINE_COMMENT fStringScanner SingleTokenJavaScanner fColorManager IJavaColorConstants JAVA_STRING fJavaDocScanner JavaDocScanner fColorManager coreStore fPartitionScanner FastJavaPartitionScanner
Disposes all the individual tools of this tools collection public void dispose f Code Scanner null f Multiline Comment Scanner null f Singleline Comment Scanner null f String Scanner null f Java Doc Scanner null f Partition Scanner null if f Color Manager null f Color Manager dispose f Color Manager null if f Preference Store null f Preference Store remove Property Change Listener f Preference Listener f Preference Store null if f Core Preference Store null f Core Preference Store remove Property Change Listener f Preference Listener f Core Preference Store null f Preference Listener null  fCodeScanner fMultilineCommentScanner fSinglelineCommentScanner fStringScanner fJavaDocScanner fPartitionScanner fColorManager fColorManager fColorManager fPreferenceStore fPreferenceStore removePropertyChangeListener fPreferenceListener fPreferenceStore fCorePreferenceStore fCorePreferenceStore removePropertyChangeListener fPreferenceListener fCorePreferenceStore fPreferenceListener
Returns the color manager which is used to manage any Java specific colors needed for such things like syntax highlighting return the color manager to be used for Java text viewers public I Color Manager get Color Manager return f Color Manager  IColorManager getColorManager fColorManager
Returns a scanner which is configured to scan Java source code return a Java source code scanner deprecated As of 3 0 replaced by link Java Source Viewer Configuration get Code Scanner public Rule Based Scanner get Code Scanner return f Code Scanner  JavaSourceViewerConfiguration getCodeScanner RuleBasedScanner getCodeScanner fCodeScanner
Returns a scanner which is configured to scan Java multi line comments return a Java multi line comment scanner since 2 0 deprecated As of 3 0 replaced by link Java Source Viewer Configuration get Multiline Comment Scanner public Rule Based Scanner get Multiline Comment Scanner return f Multiline Comment Scanner  JavaSourceViewerConfiguration getMultilineCommentScanner RuleBasedScanner getMultilineCommentScanner fMultilineCommentScanner
Returns a scanner which is configured to scan Java single line comments return a Java single line comment scanner since 2 0 deprecated As of 3 0 replaced by link Java Source Viewer Configuration get Singleline Comment Scanner public Rule Based Scanner get Singleline Comment Scanner return f Singleline Comment Scanner  JavaSourceViewerConfiguration getSinglelineCommentScanner RuleBasedScanner getSinglelineCommentScanner fSinglelineCommentScanner
Returns a scanner which is configured to scan Java strings return a Java string scanner since 2 0 deprecated As of 3 0 replaced by link Java Source Viewer Configuration get String Scanner public Rule Based Scanner get String Scanner return f String Scanner  JavaSourceViewerConfiguration getStringScanner RuleBasedScanner getStringScanner fStringScanner
Returns a scanner which is configured to scan Java Doc compliant comments p Note that the start sequence and the corresponding end sequence are part of the Javadoc comment p return a Javadoc scanner deprecated As of 3 0 replaced by link Java Source Viewer Configuration get Java Doc Scanner public Rule Based Scanner get Java Doc Scanner return f Java Doc Scanner  JavaDoc JavaSourceViewerConfiguration getJavaDocScanner RuleBasedScanner getJavaDocScanner fJavaDocScanner
Returns a scanner which is configured to scan Java specific partitions which are multi line comments Javadoc comments and regular Java source code return a Java partition scanner public I Partition Token Scanner get Partition Scanner return f Partition Scanner  IPartitionTokenScanner getPartitionScanner fPartitionScanner
Factory method for creating a Java specific document partitioner using this object s partitions scanner This method is a convenience method return a newly created Java document partitioner public I Document Partitioner create Document Partitioner return new Default Partitioner get Partition Scanner LEGAL CONTENT TYPES  IDocumentPartitioner createDocumentPartitioner DefaultPartitioner getPartitionScanner LEGAL_CONTENT_TYPES
Returns the names of the document position categories used by the document partitioners created by this object to manage their partition information p If the partitioners don t use document position categories the returned result is code null code p return the partition managing position categories or code null code if there is none deprecated As of 3 0 replaced by link org eclipse jface text Text Utilities compute Partition Managing Categories I Document public String get Partition Managing Position Categories return new String Default Partitioner CONTENT TYPES CATEGORY  TextUtilities computePartitionManagingCategories IDocument getPartitionManagingPositionCategories DefaultPartitioner CONTENT_TYPES_CATEGORY
Determines whether the preference change encoded by the given event changes the behavior of one its contained components param event the event to be investigated return code true code if event causes a behavioral change since 2 0 deprecated As of 3 0 replaced by link org eclipse jdt ui text Java Source Viewer Configuration affects Text Presentation Property Change Event public boolean affects Behavior Property Change Event event return f Code Scanner affects Behavior event f Multiline Comment Scanner affects Behavior event f Singleline Comment Scanner affects Behavior event f String Scanner affects Behavior event f Java Doc Scanner affects Behavior event  JavaSourceViewerConfiguration affectsTextPresentation PropertyChangeEvent affectsBehavior PropertyChangeEvent fCodeScanner affectsBehavior fMultilineCommentScanner affectsBehavior fSinglelineCommentScanner affectsBehavior fStringScanner affectsBehavior fJavaDocScanner affectsBehavior
Adapts the behavior of the contained components to the change encoded in the given event param event the event to which to adapt since 2 0 deprecated As of 3 0 no replacement protected void adapt To Preference Change Property Change Event event if f Code Scanner affects Behavior event f Code Scanner adapt To Preference Change event if f Multiline Comment Scanner affects Behavior event f Multiline Comment Scanner adapt To Preference Change event if f Singleline Comment Scanner affects Behavior event f Singleline Comment Scanner adapt To Preference Change event if f String Scanner affects Behavior event f String Scanner adapt To Preference Change event if f Java Doc Scanner affects Behavior event f Java Doc Scanner adapt To Preference Change event  adaptToPreferenceChange PropertyChangeEvent fCodeScanner affectsBehavior fCodeScanner adaptToPreferenceChange fMultilineCommentScanner affectsBehavior fMultilineCommentScanner adaptToPreferenceChange fSinglelineCommentScanner affectsBehavior fSinglelineCommentScanner adaptToPreferenceChange fStringScanner affectsBehavior fStringScanner adaptToPreferenceChange fJavaDocScanner affectsBehavior fJavaDocScanner adaptToPreferenceChange
Sets up the Java document partitioner for the given document for the default partitioning param document the document to be set up since 3 0 public void setup Java Document Partitioner I Document document setup Java Document Partitioner document I Document Extension3 DEFAULT PARTITIONING  setupJavaDocumentPartitioner IDocument setupJavaDocumentPartitioner IDocumentExtension3 DEFAULT_PARTITIONING
Sets up the Java document partitioner for the given document for the given partitioning param document the document to be set up param partitioning the document partitioning since 3 0 public void setup Java Document Partitioner I Document document String partitioning I Document Partitioner partitioner create Document Partitioner if document instanceof I Document Extension3 I Document Extension3 extension3 I Document Extension3 document extension3 set Document Partitioner partitioning partitioner else document set Document Partitioner partitioner partitioner connect document  setupJavaDocumentPartitioner IDocument IDocumentPartitioner createDocumentPartitioner IDocumentExtension3 IDocumentExtension3 IDocumentExtension3 setDocumentPartitioner setDocumentPartitioner
Returns this text tool s preference store return the preference store since 3 0 protected I Preference Store get Preference Store return f Preference Store  IPreferenceStore getPreferenceStore fPreferenceStore
Returns this text tool s core preference store return the core preference store since 3 0 protected Preferences get Core Preference Store return f Core Preference Store  getCorePreferenceStore fCorePreferenceStore

public final class Build Path Dialog Access private Build Path Dialog Access do not instantiate  BuildPathDialogAccess BuildPathDialogAccess
Shows the UI for configuring source attachments code null code is returned if the user cancels the dialog The dialog does not apply any changes param shell The parent shell for the dialog param initial Entry The entry to edit The kind of the classpath entry must be either code I Classpath Entry CPE LIBRARY code or code I Classpath Entry CPE VARIABLE code return Returns the resulting classpath entry containing a potentially modified source attachment path and source attachment root The resulting entry can be used to replace the original entry on the classpath Note that the dialog does not make any changes on the passed entry nor on the classpath that contains it public static I Classpath Entry configure Source Attachment Shell shell I Classpath Entry initial Entry int entry Kind initial Entry get Entry Kind if initial Entry null entry Kind I Classpath Entry CPE LIBRARY entry Kind I Classpath Entry CPE VARIABLE throw new Illegal Argument Exception Source Attachment Dialog dialog new Source Attachment Dialog shell initial Entry if dialog open Window OK return dialog get Result return null  initialEntry IClasspathEntry CPE_LIBRARY IClasspathEntry CPE_VARIABLE IClasspathEntry configureSourceAttachment IClasspathEntry initialEntry entryKind initialEntry getEntryKind initialEntry entryKind IClasspathEntry CPE_LIBRARY entryKind IClasspathEntry CPE_VARIABLE IllegalArgumentException SourceAttachmentDialog SourceAttachmentDialog initialEntry getResult
Shows the UI for configuring a javadoc location code null code is returned if the user cancels the dialog If OK is pressed an array of length 1 containing the configured URL is returned Note that the configured URL can be code null code when the user wishes to have no URL location specified The dialog does not apply any changes Use link org eclipse jdt ui JavaUI to access and configure Javadoc locations param shell The parent shell for the dialog param library Name Name of of the library to which configured javadoc location belongs param initialURL The initial URL or code null code return Returns an array of size 1 that contains the resulting javadoc location or code null code if the dialog has been cancelled Note that the configured URL can be code null code when the user wishes to have no URL location specified public static URL configure Javadoc Location Shell shell String library Name URL initialURL if library Name null throw new Illegal Argument Exception Javadoc Location Dialog dialog new Javadoc Location Dialog shell library Name initialURL if dialog open Window OK return new URL dialog get Result return null  libraryName configureJavadocLocation libraryName libraryName IllegalArgumentException JavadocLocationDialog JavadocLocationDialog libraryName getResult
Shows the UI for configuring a variable classpath entry See link I Classpath Entry CPE VARIABLE for details about variable classpath entries The dialog returns the configured classpath entry path or code null code if the dialog has been cancelled The dialog does not apply any changes param shell The parent shell for the dialog param initial Entry Path The initial variable classpath variable path or code null code to use an empty path param existing Paths An array of paths that are already on the classpath and therefore should not be selected again return Returns the configures classpath entry path or code null code if the dialog has been cancelled public static I Path configure Variable Entry Shell shell I Path initial Entry Path I Path existing Paths if existing Paths null throw new Illegal Argument Exception Edit Variable Entry Dialog dialog new Edit Variable Entry Dialog shell initial Entry Path existing Paths if dialog open Window OK return dialog get Path return null  IClasspathEntry CPE_VARIABLE initialEntryPath existingPaths IPath configureVariableEntry IPath initialEntryPath IPath existingPaths existingPaths IllegalArgumentException EditVariableEntryDialog EditVariableEntryDialog initialEntryPath existingPaths getPath
Shows the UI for selecting new variable classpath entries See link I Classpath Entry CPE VARIABLE for details about variable classpath entries The dialog returns an array of the selected variable entries or code null code if the dialog has been cancelled The dialog does not apply any changes param shell The parent shell for the dialog param existing Paths An array of paths that are already on the classpath and therefore should not be selected again return Returns an non empty array of the selected variable entries or code null code if the dialog has been cancelled public static I Path choose Variable Entries Shell shell I Path existing Paths if existing Paths null throw new Illegal Argument Exception New Variable Entry Dialog dialog new New Variable Entry Dialog shell if dialog open Window OK return dialog get Result return null  IClasspathEntry CPE_VARIABLE existingPaths IPath chooseVariableEntries IPath existingPaths existingPaths IllegalArgumentException NewVariableEntryDialog NewVariableEntryDialog getResult
Shows the UI to configure a classpath container classpath entry See link I Classpath Entry CPE CONTAINER for details about container classpath entries The dialog returns the configured classpath entry or code null code if the dialog has been cancelled The dialog does not apply any changes param shell The parent shell for the dialog param initial Entry The initial classpath container entry param project The project the entry belongs to The project does not have to exist and can also be code null code param current Classpath The class path entries currently selected to be set as the projects classpath This can also include the entry to be edited The dialog uses these entries as information only e g to avoid duplicate entries The user still can make changes after the the classpath container dialog has been closed See link I Classpath Container Page Extension for more information return Returns the configured classpath container entry or code null code if the dialog has been cancelled by the user public static I Classpath Entry configure Container Entry Shell shell I Classpath Entry initial Entry I Java Project project I Classpath Entry current Classpath if initial Entry null current Classpath null throw new Illegal Argument Exception Classpath Container Wizard wizard new Classpath Container Wizard initial Entry project current Classpath if Classpath Container Wizard open Wizard shell wizard Window OK I Classpath Entry created wizard get New Entries if created null created length 1 return created 0 return null  IClasspathEntry CPE_CONTAINER initialEntry currentClasspath IClasspathContainerPageExtension IClasspathEntry configureContainerEntry IClasspathEntry initialEntry IJavaProject IClasspathEntry currentClasspath initialEntry currentClasspath IllegalArgumentException ClasspathContainerWizard ClasspathContainerWizard initialEntry currentClasspath ClasspathContainerWizard openWizard IClasspathEntry getNewEntries
Shows the UI to choose new classpath container classpath entries See link I Classpath Entry CPE CONTAINER for details about container classpath entries The dialog returns the selected classpath entries or code null code if the dialog has been cancelled The dialog does not apply any changes param shell The parent shell for the dialog param project The project the entry belongs to The project does not have to exist and can also be code null code param current Classpath The class path entries currently selected to be set as the projects classpath This can also include the entry to be edited The dialog uses these entries as information only The user still can make changes after the the classpath container dialog has been closed See link I Classpath Container Page Extension for more information return Returns the selected classpath container entries or code null code if the dialog has been cancelled by the user public static I Classpath Entry choose Container Entries Shell shell I Java Project project I Classpath Entry current Classpath if current Classpath null throw new Illegal Argument Exception Classpath Container Wizard wizard new Classpath Container Wizard I Classpath Entry null project current Classpath if Classpath Container Wizard open Wizard shell wizard Window OK return wizard get New Entries return null  IClasspathEntry CPE_CONTAINER currentClasspath IClasspathContainerPageExtension IClasspathEntry chooseContainerEntries IJavaProject IClasspathEntry currentClasspath currentClasspath IllegalArgumentException ClasspathContainerWizard ClasspathContainerWizard IClasspathEntry currentClasspath ClasspathContainerWizard openWizard getNewEntries
Shows the UI to configure a JAR or ZIP archive located in the workspace The dialog returns the configured classpath entry path or code null code if the dialog has been cancelled The dialog does not apply any changes param shell The parent shell for the dialog param initial Entry The path of the initial archive entry param used Entries An array of paths that are already on the classpath and therefore should not be selected again return Returns the configured classpath container entry path or code null code if the dialog has been cancelled by the user public static I Path configureJAR Entry Shell shell I Path initial Entry I Path used Entries if initial Entry null used Entries null throw new Illegal Argument Exception Class accepted Classes new Class I File class Typed Element Selection Validator validator new Typed Element Selection Validator accepted Classes false Array List used Jars new Array List used Entries length I Workspace Root root Resources Plugin get Workspace get Root for int i 0 i used Entries length i I Path curr used Entries i if curr equals initial Entry I Resource resource root find Member used Entries i if resource instanceof I File used Jars add resource I Resource existing root find Member initial Entry Element Tree Selection Dialog dialog new Element Tree Selection Dialog shell new Workbench Label Provider new Workbench Content Provider dialog set Validator validator dialog set Title New Wizard Messages get String Build Path Dialog Access JAR Archive Dialog edit title NON NLS 1 dialog set Message New Wizard Messages get String Build Path Dialog Access JAR Archive Dialog edit description NON NLS 1 dialog add Filter new Archive File Filter used Jars true dialog set Input root dialog set Sorter new Resource Sorter Resource Sorter NAME dialog set Initial Selection existing if dialog open Window OK I Resource element I Resource dialog get First Result return element get Full Path return null  initialEntry usedEntries IPath configureJAREntry IPath initialEntry IPath usedEntries initialEntry usedEntries IllegalArgumentException acceptedClasses IFile TypedElementSelectionValidator TypedElementSelectionValidator acceptedClasses ArrayList usedJars ArrayList usedEntries IWorkspaceRoot ResourcesPlugin getWorkspace getRoot usedEntries IPath usedEntries initialEntry IResource findMember usedEntries IFile usedJars IResource findMember initialEntry ElementTreeSelectionDialog ElementTreeSelectionDialog WorkbenchLabelProvider WorkbenchContentProvider setValidator setTitle NewWizardMessages getString BuildPathDialogAccess JARArchiveDialog setMessage NewWizardMessages getString BuildPathDialogAccess JARArchiveDialog addFilter ArchiveFileFilter usedJars setInput setSorter ResourceSorter ResourceSorter setInitialSelection IResource IResource getFirstResult getFullPath
Shows the UI to select new JAR or ZIP archive entries located in the workspace The dialog returns the selected entries or code null code if the dialog has been cancelled The dialog does not apply any changes param shell The parent shell for the dialog param initial Selection The path of the element container or archive to initially select or code null code to not select an entry param used Entries An array of paths that are already on the classpath and therefore should not be selected again return Returns the new classpath container entry paths or code null code if the dialog has been cancelled by the user public static I Path chooseJAR Entries Shell shell I Path initial Selection I Path used Entries if used Entries null throw new Illegal Argument Exception Class accepted Classes new Class I File class Typed Element Selection Validator validator new Typed Element Selection Validator accepted Classes true Array List used Jars new Array List used Entries length I Workspace Root root Resources Plugin get Workspace get Root for int i 0 i used Entries length i I Resource resource root find Member used Entries i if resource instanceof I File used Jars add resource I Resource focus initial Selection null root find Member initial Selection null Element Tree Selection Dialog dialog new Element Tree Selection Dialog shell new Workbench Label Provider new Workbench Content Provider dialog set Validator validator dialog set Title New Wizard Messages get String Build Path Dialog Access JAR Archive Dialog new title NON NLS 1 dialog set Message New Wizard Messages get String Build Path Dialog Access JAR Archive Dialog new description NON NLS 1 dialog add Filter new Archive File Filter used Jars true dialog set Input root dialog set Sorter new Resource Sorter Resource Sorter NAME dialog set Initial Selection focus if dialog open Window OK Object elements dialog get Result I Path res new I Path elements length for int i 0 i res length i I Resource elem I Resource elements i res i elem get Full Path return res return null  initialSelection usedEntries IPath chooseJAREntries IPath initialSelection IPath usedEntries usedEntries IllegalArgumentException acceptedClasses IFile TypedElementSelectionValidator TypedElementSelectionValidator acceptedClasses ArrayList usedJars ArrayList usedEntries IWorkspaceRoot ResourcesPlugin getWorkspace getRoot usedEntries IResource findMember usedEntries IFile usedJars IResource initialSelection findMember initialSelection ElementTreeSelectionDialog ElementTreeSelectionDialog WorkbenchLabelProvider WorkbenchContentProvider setValidator setTitle NewWizardMessages getString BuildPathDialogAccess JARArchiveDialog setMessage NewWizardMessages getString BuildPathDialogAccess JARArchiveDialog addFilter ArchiveFileFilter usedJars setInput setSorter ResourceSorter ResourceSorter setInitialSelection getResult IPath IPath IResource IResource getFullPath
Shows the UI to configure an external JAR or ZIP archive The dialog returns the configured or code null code if the dialog has been cancelled The dialog does not apply any changes param shell The parent shell for the dialog param initial Entry The path of the initial archive entry return Returns the configured classpath container entry path or code null code if the dialog has been cancelled by the user public static I Path configure ExternalJAR Entry Shell shell I Path initial Entry if initial Entry null throw new Illegal Argument Exception String last Used Path initial Entry remove Last Segments 1 toOS String File Dialog dialog new File Dialog shell SWT SINGLE dialog set Text New Wizard Messages get String Build Path Dialog Access ExtJAR Archive Dialog edit title NON NLS 1 dialog set Filter Extensions Archive File Filter FILTER EXTENSIONS dialog set Filter Path last Used Path dialog set File Name initial Entry last Segment String res dialog open if res null return null String file Names dialog get File Name I Path filter Path new Path dialog get Filter Path Java Plugin get Default get Dialog Settings put IUI Constants DIALOGSTORE LASTEXTJAR filter Path toOS String return filter Path append file Names make Absolute  initialEntry IPath configureExternalJAREntry IPath initialEntry initialEntry IllegalArgumentException lastUsedPath initialEntry removeLastSegments toOSString FileDialog FileDialog setText NewWizardMessages getString BuildPathDialogAccess ExtJARArchiveDialog setFilterExtensions ArchiveFileFilter FILTER_EXTENSIONS setFilterPath lastUsedPath setFileName initialEntry lastSegment fileNames getFileName IPath filterPath getFilterPath JavaPlugin getDefault getDialogSettings IUIConstants DIALOGSTORE_LASTEXTJAR filterPath toOSString filterPath fileNames makeAbsolute
Shows the UI to select new external JAR or ZIP archive entries The dialog returns the selected entry paths or code null code if the dialog has been cancelled The dialog does not apply any changes param shell The parent shell for the dialog return Returns the new classpath container entry paths or code null code if the dialog has been cancelled by the user public static I Path choose ExternalJAR Entries Shell shell String last Used Path Java Plugin get Default get Dialog Settings get IUI Constants DIALOGSTORE LASTEXTJAR if last Used Path null last Used Path NON NLS 1 File Dialog dialog new File Dialog shell SWT MULTI dialog set Text New Wizard Messages get String Build Path Dialog Access ExtJAR Archive Dialog new title NON NLS 1 dialog set Filter Extensions Archive File Filter FILTER EXTENSIONS dialog set Filter Path last Used Path String res dialog open if res null return null String file Names dialog get File Names int n Chosen file Names length I Path filter Path new Path dialog get Filter Path I Path elems new I Path n Chosen for int i 0 i n Chosen i elems i filter Path append file Names i make Absolute Java Plugin get Default get Dialog Settings put IUI Constants DIALOGSTORE LASTEXTJAR filter Path toOS String return elems  IPath chooseExternalJAREntries lastUsedPath JavaPlugin getDefault getDialogSettings IUIConstants DIALOGSTORE_LASTEXTJAR lastUsedPath lastUsedPath FileDialog FileDialog setText NewWizardMessages getString BuildPathDialogAccess ExtJARArchiveDialog setFilterExtensions ArchiveFileFilter FILTER_EXTENSIONS setFilterPath lastUsedPath fileNames getFileNames nChosen fileNames IPath filterPath getFilterPath IPath IPath nChosen nChosen filterPath fileNames makeAbsolute JavaPlugin getDefault getDialogSettings IUIConstants DIALOGSTORE_LASTEXTJAR filterPath toOSString
Shows the UI to select new class folders The dialog returns the selected classpath entry paths or code null code if the dialog has been cancelled The dialog does not apply any changes param shell The parent shell for the dialog param initial Selection The path of the element to initially select or code null code param used Entries An array of paths that are already on the classpath and therefore should not be selected again return Returns the configured classpath container entry path or code null code if the dialog has been cancelled by the user public static I Path choose Class Folder Entries Shell shell I Path initial Selection I Path used Entries if used Entries null throw new Illegal Argument Exception String title New Wizard Messages get String Build Path Dialog Access Existing Class Folder Dialog edit title NON NLS 1 String message New Wizard Messages get String Build Path Dialog Access Existing Class Folder Dialog edit description NON NLS 1 return internal Choose Folder Entry shell initial Selection used Entries title message  initialSelection usedEntries IPath chooseClassFolderEntries IPath initialSelection IPath usedEntries usedEntries IllegalArgumentException NewWizardMessages getString BuildPathDialogAccess ExistingClassFolderDialog NewWizardMessages getString BuildPathDialogAccess ExistingClassFolderDialog internalChooseFolderEntry initialSelection usedEntries
Shows the UI to select new source folders The dialog returns the selected classpath entry paths or code null code if the dialog has been cancelled The dialog does not apply any changes param shell The parent shell for the dialog param initial Selection The path of the element to initially select or code null code param used Entries An array of paths that are already on the classpath and therefore should not be selected again return Returns the configured classpath container entry path or code null code if the dialog has been cancelled by the user public static I Path choose Source Folder Entries Shell shell I Path initial Selection I Path used Entries if used Entries null throw new Illegal Argument Exception String title New Wizard Messages get String Build Path Dialog Access Existing Source Folder Dialog edit title NON NLS 1 String message New Wizard Messages get String Build Path Dialog Access Existing Source Folder Dialog edit description NON NLS 1 return internal Choose Folder Entry shell initial Selection used Entries title message  initialSelection usedEntries IPath chooseSourceFolderEntries IPath initialSelection IPath usedEntries usedEntries IllegalArgumentException NewWizardMessages getString BuildPathDialogAccess ExistingSourceFolderDialog NewWizardMessages getString BuildPathDialogAccess ExistingSourceFolderDialog internalChooseFolderEntry initialSelection usedEntries
private static I Path internal Choose Folder Entry Shell shell I Path initial Selection I Path used Entries String title String message Class accepted Classes new Class I Project class I Folder class Array List used Containers new Array List used Entries length I Workspace Root root Resources Plugin get Workspace get Root for int i 0 i used Entries length i I Resource resource root find Member used Entries i if resource instanceof I Container used Containers add resource I Resource focus initial Selection null root find Member initial Selection null Object used used Containers to Array Multiple Folder Selection Dialog dialog new Multiple Folder Selection Dialog shell new Workbench Label Provider new Workbench Content Provider dialog set Existing used dialog set Title title dialog set Message message dialog add Filter new Typed Viewer Filter accepted Classes used dialog set Input root dialog set Initial Focus focus if dialog open Window OK Object elements dialog get Result I Path res new I Path elements length for int i 0 i res length i I Resource elem I Resource elements i res i elem get Full Path return res return null  IPath internalChooseFolderEntry IPath initialSelection IPath usedEntries acceptedClasses IProject IFolder ArrayList usedContainers ArrayList usedEntries IWorkspaceRoot ResourcesPlugin getWorkspace getRoot usedEntries IResource findMember usedEntries IContainer usedContainers IResource initialSelection findMember initialSelection usedContainers toArray MultipleFolderSelectionDialog MultipleFolderSelectionDialog WorkbenchLabelProvider WorkbenchContentProvider setExisting setTitle setMessage addFilter TypedViewerFilter acceptedClasses setInput setInitialFocus getResult IPath IPath IResource IResource getFullPath

Called when the classpath container wizard is closed by selecting the finish button Implementers typically override this method to store the page result new changed classpath entry returned in get Selection into its model return if the operation was succesful Only when returned code true code the wizard will close  getSelection
Returns the edited or created classpath container entry This method may return code null code if no classpath container entry exists The returned classpath entry is of kind code I Classpath Entry CPE CONTAINER code return the classpath entry edited or created on the page  IClasspathEntry CPE_CONTAINER
Sets the classpath container entry to be edited or code null code if a new entry should be created param container Entry the classpath entry to edit or code null code If unequals code null code then the classpath entry must be of kind code I Classpath Entry CPE CONTAINER code  containerEntry IClasspathEntry CPE_CONTAINER

Method code initialize code is called before code I Classpath Container Page set Selection code to give additional information about the context the classpath container entry is configured in This information only reflects the underlying dialogs current selection state The user still can make changes after the the classpath container pages has been closed or decide to cancel the operation param project The project the new or modified entry is added to The project does not have to exist Project can be code null code param current Entries The class path entries currently selected to be set as the projects classpath This can also include the entry to be edited  IClasspathContainerPage setSelection currentEntries

Creates a new code New Class Wizard Page code public New Class Wizard Page super true PAGE NAME set Title New Wizard Messages get String New Class Wizard Page title NON NLS 1 set Description New Wizard Messages get String New Class Wizard Page description NON NLS 1 String button Names3 new String New Wizard Messages get String New Class Wizard Page methods main New Wizard Messages get String New Class Wizard Page methods constructors NON NLS 1 NON NLS 2 New Wizard Messages get String New Class Wizard Page methods inherited NON NLS 1 f Method Stubs Buttons new Selection Button Dialog Field Group SWT CHECK button Names3 1 f Method Stubs Buttons set Label Text New Wizard Messages get String New Class Wizard Page methods label NON NLS 1  NewClassWizardPage NewClassWizardPage PAGE_NAME setTitle NewWizardMessages getString NewClassWizardPage setDescription NewWizardMessages getString NewClassWizardPage buttonNames3 NewWizardMessages getString NewClassWizardPage NewWizardMessages getString NewClassWizardPage NewWizardMessages getString NewClassWizardPage fMethodStubsButtons SelectionButtonDialogFieldGroup buttonNames3 fMethodStubsButtons setLabelText NewWizardMessages getString NewClassWizardPage
The wizard owning this page is responsible for calling this method with the current selection The selection is used to initialize the fields of the wizard page param selection used to initialize the fields public void init I Structured Selection selection I Java Element jelem get Initial Java Element selection init Container Page jelem init Type Page jelem do Status Update boolean create Main false boolean create Constructors false boolean create Unimplemented true I Dialog Settings section get Dialog Settings get Section PAGE NAME if section null create Main section get Boolean SETTINGS CREATEMAIN create Constructors section get Boolean SETTINGS CREATECONSTR create Unimplemented section get Boolean SETTINGS CREATEUNIMPLEMENTED set Method Stub Selection create Main create Constructors create Unimplemented true  IStructuredSelection IJavaElement getInitialJavaElement initContainerPage initTypePage doStatusUpdate createMain createConstructors createUnimplemented IDialogSettings getDialogSettings getSection PAGE_NAME createMain getBoolean SETTINGS_CREATEMAIN createConstructors getBoolean SETTINGS_CREATECONSTR createUnimplemented getBoolean SETTINGS_CREATEUNIMPLEMENTED setMethodStubSelection createMain createConstructors createUnimplemented
validation private void do Status Update status of all used components I Status status new I Status f Container Status is Enclosing Type Selected f Enclosing Type Status f Package Status f Type Name Status f Modifier Status f Super Class Status f Super Interfaces Status the mode severe status will be displayed and the ok button enabled disabled update Status status  doStatusUpdate IStatus IStatus fContainerStatus isEnclosingTypeSelected fEnclosingTypeStatus fPackageStatus fTypeNameStatus fModifierStatus fSuperClassStatus fSuperInterfacesStatus updateStatus
protected void handle Field Changed String field Name super handle Field Changed field Name do Status Update  handleFieldChanged fieldName handleFieldChanged fieldName doStatusUpdate
public void create Control Composite parent initialize Dialog Units parent Composite composite new Composite parent SWT NONE int n Columns 4 Grid Layout layout new Grid Layout layout num Columns n Columns composite set Layout layout pick choose the wanted UI components create Container Controls composite n Columns create Package Controls composite n Columns create Enclosing Type Controls composite n Columns create Separator composite n Columns create Type Name Controls composite n Columns create Modifier Controls composite n Columns create Super Class Controls composite n Columns create Super Interfaces Controls composite n Columns create Method Stub Selection Controls composite n Columns set Control composite Dialog apply Dialog Font composite Workbench Help set Help composite I Java Help Context Ids NEW CLASS WIZARD PAGE  createControl initializeDialogUnits nColumns GridLayout GridLayout numColumns nColumns setLayout createContainerControls nColumns createPackageControls nColumns createEnclosingTypeControls nColumns createSeparator nColumns createTypeNameControls nColumns createModifierControls nColumns createSuperClassControls nColumns createSuperInterfacesControls nColumns createMethodStubSelectionControls nColumns setControl applyDialogFont WorkbenchHelp setHelp IJavaHelpContextIds NEW_CLASS_WIZARD_PAGE
public void set Visible boolean visible super set Visible visible if visible set Focus  setVisible setVisible setFocus
private void create Method Stub Selection Controls Composite composite int n Columns Control label Control f Method Stubs Buttons get Label Control composite Layout Util set Horizontal Span label Control n Columns Dialog Field create Empty Space composite Control button Group f Method Stubs Buttons get Selection Buttons Group composite Layout Util set Horizontal Span button Group n Columns 1  createMethodStubSelectionControls nColumns labelControl fMethodStubsButtons getLabelControl LayoutUtil setHorizontalSpan labelControl nColumns DialogField createEmptySpace buttonGroup fMethodStubsButtons getSelectionButtonsGroup LayoutUtil setHorizontalSpan buttonGroup nColumns
Returns the current selection state of the Create Main checkbox return the selection state of the Create Main checkbox public boolean is Create Main return f Method Stubs Buttons is Selected 0  isCreateMain fMethodStubsButtons isSelected
Returns the current selection state of the Create Constructors checkbox return the selection state of the Create Constructors checkbox public boolean is Create Constructors return f Method Stubs Buttons is Selected 1  isCreateConstructors fMethodStubsButtons isSelected
Returns the current selection state of the Create inherited abstract methods checkbox return the selection state of the Create inherited abstract methods checkbox public boolean is Create Inherited return f Method Stubs Buttons is Selected 2  isCreateInherited fMethodStubsButtons isSelected
Sets the selection state of the method stub checkboxes param create Main initial selection state of the Create Main checkbox param create Constructors initial selection state of the Create Constructors checkbox param create Inherited initial selection state of the Create inherited abstract methods checkbox param can Be Modified if code true code the method stub checkboxes can be changed by the user If code false code the buttons are read only public void set Method Stub Selection boolean create Main boolean create Constructors boolean create Inherited boolean can Be Modified f Method Stubs Buttons set Selection 0 create Main f Method Stubs Buttons set Selection 1 create Constructors f Method Stubs Buttons set Selection 2 create Inherited f Method Stubs Buttons set Enabled can Be Modified  createMain createConstructors createInherited canBeModified setMethodStubSelection createMain createConstructors createInherited canBeModified fMethodStubsButtons setSelection createMain fMethodStubsButtons setSelection createConstructors fMethodStubsButtons setSelection createInherited fMethodStubsButtons setEnabled canBeModified
protected void create Type Members I Type type Imports Manager imports I Progress Monitor monitor throws Core Exception boolean do Main is Create Main boolean do Constr is Create Constructors boolean do Inherited is Create Inherited create Inherited Methods type do Constr do Inherited imports new Sub Progress Monitor monitor 1 if do Main String Buffer buf new String Buffer buf append public static void main NON NLS 1 buf append imports add Import java lang String NON NLS 1 buf append args NON NLS 1 type create Method buf to String null false null I Dialog Settings section get Dialog Settings get Section PAGE NAME if section null section get Dialog Settings add New Section PAGE NAME section put SETTINGS CREATEMAIN do Main section put SETTINGS CREATECONSTR do Constr section put SETTINGS CREATEUNIMPLEMENTED do Inherited if monitor null monitor done  createTypeMembers IType ImportsManager IProgressMonitor CoreException doMain isCreateMain doConstr isCreateConstructors doInherited isCreateInherited createInheritedMethods doConstr doInherited SubProgressMonitor doMain StringBuffer StringBuffer addImport createMethod toString IDialogSettings getDialogSettings getSection PAGE_NAME getDialogSettings addNewSection PAGE_NAME SETTINGS_CREATEMAIN doMain SETTINGS_CREATECONSTR doConstr SETTINGS_CREATEUNIMPLEMENTED doInherited

Create a new code New Container Wizard Page code param name the wizard page s name public New Container Wizard Page String name super name f Workspace Root Resources Plugin get Workspace get Root Container Field Adapter adapter new Container Field Adapter f Container Dialog Field new String Button Dialog Field adapter f Container Dialog Field set Dialog Field Listener adapter f Container Dialog Field set Label Text New Wizard Messages get String New Container Wizard Page container label NON NLS 1 f Container Dialog Field set Button Label New Wizard Messages get String New Container Wizard Page container button NON NLS 1 f Container Status new Status Info f Curr Root null  NewContainerWizardPage NewContainerWizardPage fWorkspaceRoot ResourcesPlugin getWorkspace getRoot ContainerFieldAdapter ContainerFieldAdapter fContainerDialogField StringButtonDialogField fContainerDialogField setDialogFieldListener fContainerDialogField setLabelText NewWizardMessages getString NewContainerWizardPage fContainerDialogField setButtonLabel NewWizardMessages getString NewContainerWizardPage fContainerStatus StatusInfo fCurrRoot
Initializes the source folder field with a valid package fragment root The package fragment root is computed from the given Java element param elem the Java element used to compute the initial package fragment root used as the source folder protected void init Container Page I Java Element elem I Package Fragment Root init Root null if elem null init Root Java Model Util get Package Fragment Root elem if init Root null init Root is Archive I Java Project jproject elem get Java Project if jproject null try init Root null if jproject exists I Package Fragment Root roots jproject get Package Fragment Roots for int i 0 i roots length i if roots i get Kind I Package Fragment Root K SOURCE init Root roots i break catch Java Model Exception e Java Plugin log e if init Root null init Root jproject get Package Fragment Root jproject get Resource set Package Fragment Root init Root true  initContainerPage IJavaElement IPackageFragmentRoot initRoot initRoot JavaModelUtil getPackageFragmentRoot initRoot initRoot isArchive IJavaProject getJavaProject initRoot IPackageFragmentRoot getPackageFragmentRoots getKind IPackageFragmentRoot K_SOURCE initRoot JavaModelException JavaPlugin initRoot initRoot getPackageFragmentRoot getResource setPackageFragmentRoot initRoot
Utility method to inspect a selection to find a Java element param selection the selection to be inspected return a Java element to be used as the initial selection or code null code if no Java element exists in the given selection protected I Java Element get Initial Java Element I Structured Selection selection I Java Element jelem null if selection null selection is Empty Object selected Element selection get First Element if selected Element instanceof I Adaptable I Adaptable adaptable I Adaptable selected Element jelem I Java Element adaptable get Adapter I Java Element class if jelem null I Resource resource I Resource adaptable get Adapter I Resource class if resource null resource get Type I Resource ROOT while jelem null resource get Type I Resource PROJECT resource resource get Parent jelem I Java Element resource get Adapter I Java Element class if jelem null jelem Java Core create resource java project if jelem null I Workbench Part part Java Plugin get Active Page get Active Part if part instanceof Content Outline part Java Plugin get Active Page get Active Editor if part instanceof I View Part Input Provider Object elem I View Part Input Provider part get View Part Input if elem instanceof I Java Element jelem I Java Element elem if jelem null jelem get Element Type I Java Element JAVA MODEL try I Java Project projects Java Core create get Workspace Root get Java Projects if projects length 1 jelem projects 0 catch Java Model Exception e Java Plugin log e return jelem  IJavaElement getInitialJavaElement IStructuredSelection IJavaElement isEmpty selectedElement getFirstElement selectedElement IAdaptable IAdaptable IAdaptable selectedElement IJavaElement getAdapter IJavaElement IResource IResource getAdapter IResource getType IResource getType IResource getParent IJavaElement getAdapter IJavaElement JavaCore IWorkbenchPart JavaPlugin getActivePage getActivePart ContentOutline JavaPlugin getActivePage getActiveEditor IViewPartInputProvider IViewPartInputProvider getViewPartInput IJavaElement IJavaElement getElementType IJavaElement JAVA_MODEL IJavaProject JavaCore getWorkspaceRoot getJavaProjects JavaModelException JavaPlugin
Returns the test selection of the current editor code null code is returned when the current editor does not have focus or does not return a text selection return Returns the test selection of the current editor or code null code since 3 0 protected I Text Selection get Current Text Selection I Workbench Part part Java Plugin get Active Page get Active Part if part instanceof I Editor Part I Selection Provider selection Provider part get Site get Selection Provider if selection Provider null I Selection selection selection Provider get Selection if selection instanceof I Text Selection return I Text Selection selection return null  ITextSelection getCurrentTextSelection IWorkbenchPart JavaPlugin getActivePage getActivePart IEditorPart ISelectionProvider selectionProvider getSite getSelectionProvider selectionProvider ISelection selectionProvider getSelection ITextSelection ITextSelection
Returns the recommended maximum width for text fields in pixels This method requires that create Content has been called before this method is call Subclasses may override to change the maximum width for text fields return the recommended maximum width for text fields protected int get Max Field Width return convert Width In Chars To Pixels 40  createContent getMaxFieldWidth convertWidthInCharsToPixels
Creates the necessary controls label text field and browse button to edit the source folder location The method expects that the parent composite uses a code Grid Layout code as its layout manager and that the grid layout has at least 3 columns param parent the parent composite param n Columns the number of columns to span This number must be greater or equal three protected void create Container Controls Composite parent int n Columns f Container Dialog Field do Fill Into Grid parent n Columns Layout Util set Width Hint f Container Dialog Field get Text Control null get Max Field Width  GridLayout nColumns createContainerControls nColumns fContainerDialogField doFillIntoGrid nColumns LayoutUtil setWidthHint fContainerDialogField getTextControl getMaxFieldWidth
Sets the focus to the source folder s text field protected void set Focus On Container f Container Dialog Field set Focus  setFocusOnContainer fContainerDialogField setFocus
I String Button Adapter public void change Control Pressed Dialog Field field container Change Control Pressed field  IStringButtonAdapter changeControlPressed DialogField containerChangeControlPressed
I Dialog Field Listener public void dialog Field Changed Dialog Field field container Dialog Field Changed field  IDialogFieldListener dialogFieldChanged DialogField containerDialogFieldChanged
private void container Change Control Pressed Dialog Field field take the current jproject as init element of the dialog I Package Fragment Root root get Package Fragment Root root choose Source Container root if root null set Package Fragment Root root true  containerChangeControlPressed DialogField IPackageFragmentRoot getPackageFragmentRoot chooseSourceContainer setPackageFragmentRoot
private void container Dialog Field Changed Dialog Field field if field f Container Dialog Field f Container Status container Changed tell all others handle Field Changed CONTAINER  containerDialogFieldChanged DialogField fContainerDialogField fContainerStatus containerChanged handleFieldChanged
This method is a hook which gets called after the source folder s text input field has changed This default implementation updates the model and returns an error status The underlying model is only valid if the returned status is OK return the model s error status protected I Status container Changed Status Info status new Status Info f Curr Root null String str get Package Fragment Root Text if str length 0 status set Error New Wizard Messages get String New Container Wizard Page error Enter Container Name NON NLS 1 return status I Path path new Path str I Resource res f Workspace Root find Member path if res null int res Type res get Type if res Type I Resource PROJECT res Type I Resource FOLDER I Project proj res get Project if proj is Open status set Error New Wizard Messages get Formatted String New Container Wizard Page error Project Closed proj get Full Path to String NON NLS 1 return status I Java Project jproject Java Core create proj f Curr Root jproject get Package Fragment Root res if res exists try if proj has Nature Java Core NATURE ID if res Type I Resource PROJECT status set Error New Wizard Messages get String New Container Wizard Page warning NotA Java Project NON NLS 1 else status set Warning New Wizard Messages get String New Container Wizard Page warning Not InA Java Project NON NLS 1 return status catch Core Exception e status set Warning New Wizard Messages get String New Container Wizard Page warning NotA Java Project NON NLS 1 if jproject is On Classpath f Curr Root status set Warning New Wizard Messages get Formatted String New Container Wizard Page warning Not On Class Path str NON NLS 1 if f Curr Root is Archive status set Error New Wizard Messages get Formatted String New Container Wizard Page error Container Is Binary str NON NLS 1 return status return status else status set Error New Wizard Messages get Formatted String New Container Wizard Page error NotA Folder str NON NLS 1 return status else status set Error New Wizard Messages get Formatted String New Container Wizard Page error Container Does Not Exist str NON NLS 1 return status  IStatus containerChanged StatusInfo StatusInfo fCurrRoot getPackageFragmentRootText setError NewWizardMessages getString NewContainerWizardPage EnterContainerName IPath IResource fWorkspaceRoot findMember resType getType resType IResource resType IResource IProject getProject isOpen setError NewWizardMessages getFormattedString NewContainerWizardPage ProjectClosed getFullPath toString IJavaProject JavaCore fCurrRoot getPackageFragmentRoot hasNature JavaCore NATURE_ID resType IResource setError NewWizardMessages getString NewContainerWizardPage NotAJavaProject setWarning NewWizardMessages getString NewContainerWizardPage NotInAJavaProject CoreException setWarning NewWizardMessages getString NewContainerWizardPage NotAJavaProject isOnClasspath fCurrRoot setWarning NewWizardMessages getFormattedString NewContainerWizardPage NotOnClassPath fCurrRoot isArchive setError NewWizardMessages getFormattedString NewContainerWizardPage ContainerIsBinary setError NewWizardMessages getFormattedString NewContainerWizardPage NotAFolder setError NewWizardMessages getFormattedString NewContainerWizardPage ContainerDoesNotExist
Hook method that gets called when a field on this page has changed For this page the method gets called when the source folder field changes p Every sub type is responsible to call this method when a field on its page has changed Subtypes override extend the method to add verification when a own field has a dependency to an other field For example the class name input must be verified again when the package field changes check for duplicated class names param field Name The name of the field that has changed field id For the source folder the field id is code CONTAINER code protected void handle Field Changed String field Name  fieldName handleFieldChanged fieldName
Returns the workspace root return the workspace root protected I Workspace Root get Workspace Root return f Workspace Root  IWorkspaceRoot getWorkspaceRoot fWorkspaceRoot
Returns the code I Package Fragment Root code that corresponds to the current value of the source folder field return the I Package Fragment Root or code null code if the current source folder value is not a valid package fragment root public I Package Fragment Root get Package Fragment Root return f Curr Root  IPackageFragmentRoot IPackageFragmentRoot IPackageFragmentRoot getPackageFragmentRoot fCurrRoot
Returns the current text of source folder text field return the text of the source folder text field public String get Package Fragment Root Text return f Container Dialog Field get Text  getPackageFragmentRootText fContainerDialogField getText
Sets the current source folder model and text field to the given package fragment root param root The new root param can Be Modified if code false code the source folder field can not be changed by the user If code true code the field is editable public void set Package Fragment Root I Package Fragment Root root boolean can Be Modified f Curr Root root String str root null root get Path make Relative to String NON NLS 1 f Container Dialog Field set Text str f Container Dialog Field set Enabled can Be Modified  canBeModified setPackageFragmentRoot IPackageFragmentRoot canBeModified fCurrRoot getPath makeRelative toString fContainerDialogField setText fContainerDialogField setEnabled canBeModified
Typed Element Selection Validator validator new Typed Element Selection Validator accepted Classes false public boolean is Selected Valid Object element try if element instanceof I Java Project I Java Project jproject I Java Project element I Path path jproject get Project get Full Path return jproject find Package Fragment Root path null else if element instanceof I Package Fragment Root return I Package Fragment Root element get Kind I Package Fragment Root K SOURCE return true catch Java Model Exception e Java Plugin log e get Status just log no ui in validation return false  TypedElementSelectionValidator TypedElementSelectionValidator acceptedClasses isSelectedValid IJavaProject IJavaProject IJavaProject IPath getProject getFullPath findPackageFragmentRoot IPackageFragmentRoot IPackageFragmentRoot getKind IPackageFragmentRoot K_SOURCE JavaModelException JavaPlugin getStatus
Viewer Filter filter new Typed Viewer Filter accepted Classes public boolean select Viewer viewer Object parent Object element if element instanceof I Package Fragment Root try return I Package Fragment Root element get Kind I Package Fragment Root K SOURCE catch Java Model Exception e Java Plugin log e get Status just log no ui in validation return false return super select viewer parent element  ViewerFilter TypedViewerFilter acceptedClasses IPackageFragmentRoot IPackageFragmentRoot getKind IPackageFragmentRoot K_SOURCE JavaModelException JavaPlugin getStatus
private I Package Fragment Root choose Source Container I Java Element init Element Class accepted Classes new Class I Package Fragment Root class I Java Project class Typed Element Selection Validator validator new Typed Element Selection Validator accepted Classes false public boolean is Selected Valid Object element try if element instanceof I Java Project I Java Project jproject I Java Project element I Path path jproject get Project get Full Path return jproject find Package Fragment Root path null else if element instanceof I Package Fragment Root return I Package Fragment Root element get Kind I Package Fragment Root K SOURCE return true catch Java Model Exception e Java Plugin log e get Status just log no ui in validation return false accepted Classes new Class I Java Model class I Package Fragment Root class I Java Project class Viewer Filter filter new Typed Viewer Filter accepted Classes public boolean select Viewer viewer Object parent Object element if element instanceof I Package Fragment Root try return I Package Fragment Root element get Kind I Package Fragment Root K SOURCE catch Java Model Exception e Java Plugin log e get Status just log no ui in validation return false return super select viewer parent element Standard Java Element Content Provider provider new Standard Java Element Content Provider I Label Provider label Provider new Java Element Label Provider Java Element Label Provider SHOW DEFAULT Element Tree Selection Dialog dialog new Element Tree Selection Dialog get Shell label Provider provider dialog set Validator validator dialog set Sorter new Java Element Sorter dialog set Title New Wizard Messages get String New Container Wizard Page Choose Source Container Dialog title NON NLS 1 dialog set Message New Wizard Messages get String New Container Wizard Page Choose Source Container Dialog description NON NLS 1 dialog add Filter filter dialog set Input Java Core create f Workspace Root dialog set Initial Selection init Element if dialog open Window OK Object element dialog get First Result if element instanceof I Java Project I Java Project jproject I Java Project element return jproject get Package Fragment Root jproject get Project else if element instanceof I Package Fragment Root return I Package Fragment Root element return null return null  IPackageFragmentRoot chooseSourceContainer IJavaElement initElement acceptedClasses IPackageFragmentRoot IJavaProject TypedElementSelectionValidator TypedElementSelectionValidator acceptedClasses isSelectedValid IJavaProject IJavaProject IJavaProject IPath getProject getFullPath findPackageFragmentRoot IPackageFragmentRoot IPackageFragmentRoot getKind IPackageFragmentRoot K_SOURCE JavaModelException JavaPlugin getStatus acceptedClasses IJavaModel IPackageFragmentRoot IJavaProject ViewerFilter TypedViewerFilter acceptedClasses IPackageFragmentRoot IPackageFragmentRoot getKind IPackageFragmentRoot K_SOURCE JavaModelException JavaPlugin getStatus StandardJavaElementContentProvider StandardJavaElementContentProvider ILabelProvider labelProvider JavaElementLabelProvider JavaElementLabelProvider SHOW_DEFAULT ElementTreeSelectionDialog ElementTreeSelectionDialog getShell labelProvider setValidator setSorter JavaElementSorter setTitle NewWizardMessages getString NewContainerWizardPage ChooseSourceContainerDialog setMessage NewWizardMessages getString NewContainerWizardPage ChooseSourceContainerDialog addFilter setInput JavaCore fWorkspaceRoot setInitialSelection initElement getFirstResult IJavaProject IJavaProject IJavaProject getPackageFragmentRoot getProject IPackageFragmentRoot IPackageFragmentRoot

Creates a code New Element Wizard Page code param name the wizard page s name public New Element Wizard Page String name super name f Page Visible false f Curr Status new Status Info  NewElementWizardPage NewElementWizardPage fPageVisible fCurrStatus StatusInfo
public void set Visible boolean visible super set Visible visible f Page Visible visible policy wizards are not allowed to come up with an error message if visible f Curr Status matches I Status ERROR Status Info status new Status Info status set Error NON NLS 1 f Curr Status status update Status f Curr Status  setVisible setVisible fPageVisible fCurrStatus IStatus StatusInfo StatusInfo setError fCurrStatus updateStatus fCurrStatus
Updates the status line and the ok button according to the given status param status status to apply protected void update Status I Status status f Curr Status status set Page Complete status matches I Status ERROR if f Page Visible Status Util apply To Status Line this status  updateStatus IStatus fCurrStatus setPageComplete IStatus fPageVisible StatusUtil applyToStatusLine
Updates the status line and the ok button according to the status evaluate from an array of status The most severe error is taken In case that two status with the same severity exists the status with lower index is taken param status the array of status protected void update Status I Status status update Status Status Util get Most Severe status  updateStatus IStatus updateStatus StatusUtil getMostSevere

private Set f Added Types package Imports Manager I Imports Structure imports Structure f Imports Structure Imports Structure imports Structure  fAddedTypes ImportsManager IImportsStructure importsStructure fImportsStructure ImportsStructure importsStructure
package Imports Manager I Compilation Unit created Working Copy throws Core Exception this created Working Copy new Hash Set  ImportsManager ICompilationUnit createdWorkingCopy CoreException createdWorkingCopy HashSet
package Imports Manager I Compilation Unit created Working Copy Set added Types throws Core Exception I Preference Store store Preference Constants get Preference Store String pref Order Java Preferences Settings get Import Order Preference store int threshold Java Preferences Settings get Import Number Threshold store f Added Types added Types f Imports Structure new Imports Structure created Working Copy pref Order threshold true  ImportsManager ICompilationUnit createdWorkingCopy addedTypes CoreException IPreferenceStore PreferenceConstants getPreferenceStore prefOrder JavaPreferencesSettings getImportOrderPreference JavaPreferencesSettings getImportNumberThreshold fAddedTypes addedTypes fImportsStructure ImportsStructure createdWorkingCopy prefOrder
package I Compilation Unit get Compilation Unit return f Imports Structure get Compilation Unit  ICompilationUnit getCompilationUnit fImportsStructure getCompilationUnit
Adds a new import declaration that is sorted in the existing imports If an import already exists or the import would conflict with an import of an other type with the same simple name the import is not added param qualified Type Name The fully qualified name of the type to import dot separated return Returns the simple type name that can be used in the code or the fully qualified type name if an import conflict prevented the import public String add Import String qualified Type Name f Added Types add qualified Type Name return f Imports Structure add Import qualified Type Name  qualifiedTypeName addImport qualifiedTypeName fAddedTypes qualifiedTypeName fImportsStructure addImport qualifiedTypeName
package void create boolean needs Save Sub Progress Monitor monitor throws Core Exception f Imports Structure create needs Save monitor  needsSave SubProgressMonitor CoreException fImportsStructure needsSave
package void remove Import String qualified Name if f Added Types contains qualified Name f Imports Structure remove Import qualified Name  removeImport qualifiedName fAddedTypes qualifiedName fImportsStructure removeImport qualifiedName
package Set get Added Types return f Added Types  getAddedTypes fAddedTypes
private Image f Interface Image public Interfaces List Label Provider super f Interface Image Java Plugin Images get Java Plugin Images IMG OBJS INTERFACE  fInterfaceImage InterfacesListLabelProvider fInterfaceImage JavaPluginImages JavaPluginImages IMG_OBJS_INTERFACE
public Image get Image Object element return f Interface Image  getImage fInterfaceImage
Creates a new code New Type Wizard Page code param is Class code true code if a new class is to be created otherwise an interface is to be created param page Name the wizard page s name public New Type Wizard Page boolean is Class String page Name super page Name f Created Type null f Is Class is Class Type Fields Adapter adapter new Type Fields Adapter f Package Dialog Field new String Button Status Dialog Field adapter f Package Dialog Field set Dialog Field Listener adapter f Package Dialog Field set Label Text New Wizard Messages get String New Type Wizard Page package label NON NLS 1 f Package Dialog Field set Button Label New Wizard Messages get String New Type Wizard Page package button NON NLS 1 f Package Dialog Field set Status Width Hint New Wizard Messages get String New Type Wizard Page default NON NLS 1 f Enclosing Type Selection new Selection Button Dialog Field SWT CHECK f Enclosing Type Selection set Dialog Field Listener adapter f Enclosing Type Selection set Label Text New Wizard Messages get String New Type Wizard Page enclosing selection label NON NLS 1 f Enclosing Type Dialog Field new String Button Dialog Field adapter f Enclosing Type Dialog Field set Dialog Field Listener adapter f Enclosing Type Dialog Field set Button Label New Wizard Messages get String New Type Wizard Page enclosing button NON NLS 1 f Type Name Dialog Field new String Dialog Field f Type Name Dialog Field set Dialog Field Listener adapter f Type Name Dialog Field set Label Text New Wizard Messages get String New Type Wizard Page typename label NON NLS 1 f Super Class Dialog Field new String Button Dialog Field adapter f Super Class Dialog Field set Dialog Field Listener adapter f Super Class Dialog Field set Label Text New Wizard Messages get String New Type Wizard Page superclass label NON NLS 1 f Super Class Dialog Field set Button Label New Wizard Messages get String New Type Wizard Page superclass button NON NLS 1 String add Buttons new String 0 New Wizard Messages get String New Type Wizard Page interfaces add NON NLS 1 1 null 2 New Wizard Messages get String New Type Wizard Page interfaces remove NON NLS 1 f Super Interfaces Dialog Field new List Dialog Field adapter add Buttons new Interfaces List Label Provider f Super Interfaces Dialog Field set Dialog Field Listener adapter String interface Label f Is Class New Wizard Messages get String New Type Wizard Page interfaces class label New Wizard Messages get String New Type Wizard Page interfaces ifc label NON NLS 1 NON NLS 2 f Super Interfaces Dialog Field set Label Text interface Label f Super Interfaces Dialog Field set Remove Button Index 2 String button Names1 new String 0 PUBLIC INDEX New Wizard Messages get String New Type Wizard Page modifiers public NON NLS 1 1 DEFAULT INDEX New Wizard Messages get String New Type Wizard Page modifiers default NON NLS 1 2 PRIVATE INDEX New Wizard Messages get String New Type Wizard Page modifiers private NON NLS 1 3 PROTECTED INDEX New Wizard Messages get String New Type Wizard Page modifiers protected NON NLS 1 f Acc Mdf Buttons new Selection Button Dialog Field Group SWT RADIO button Names1 4 f Acc Mdf Buttons set Dialog Field Listener adapter f Acc Mdf Buttons set Label Text New Wizard Messages get String New Type Wizard Page modifiers acc label NON NLS 1 f Acc Mdf Buttons set Selection 0 true String button Names2 if f Is Class button Names2 new String 0 ABSTRACT INDEX New Wizard Messages get String New Type Wizard Page modifiers abstract NON NLS 1 1 FINAL INDEX New Wizard Messages get String New Type Wizard Page modifiers final NON NLS 1 2 New Wizard Messages get String New Type Wizard Page modifiers static NON NLS 1 else button Names2 new String f Other Mdf Buttons new Selection Button Dialog Field Group SWT CHECK button Names2 4 f Other Mdf Buttons set Dialog Field Listener adapter f Acc Mdf Buttons enable Selection Button PRIVATE INDEX false f Acc Mdf Buttons enable Selection Button PROTECTED INDEX false f Other Mdf Buttons enable Selection Button STATIC INDEX false f Curr Package Completion Processor new Java Package Completion Processor f Enclosing Type Completion Processor new Java Type Completion Processor false false f Super Class Completion Processor new Java Type Completion Processor false false f Package Status new Status Info f Enclosing Type Status new Status Info f Can Modify Package true f Can Modify Enclosing Type true update Enable State f Type Name Status new Status Info f Super Class Status new Status Info f Super Interfaces Status new Status Info f Modifier Status new Status Info  NewTypeWizardPage isClass pageName NewTypeWizardPage isClass pageName pageName fCreatedType fIsClass isClass TypeFieldsAdapter TypeFieldsAdapter fPackageDialogField StringButtonStatusDialogField fPackageDialogField setDialogFieldListener fPackageDialogField setLabelText NewWizardMessages getString NewTypeWizardPage fPackageDialogField setButtonLabel NewWizardMessages getString NewTypeWizardPage fPackageDialogField setStatusWidthHint NewWizardMessages getString NewTypeWizardPage fEnclosingTypeSelection SelectionButtonDialogField fEnclosingTypeSelection setDialogFieldListener fEnclosingTypeSelection setLabelText NewWizardMessages getString NewTypeWizardPage fEnclosingTypeDialogField StringButtonDialogField fEnclosingTypeDialogField setDialogFieldListener fEnclosingTypeDialogField setButtonLabel NewWizardMessages getString NewTypeWizardPage fTypeNameDialogField StringDialogField fTypeNameDialogField setDialogFieldListener fTypeNameDialogField setLabelText NewWizardMessages getString NewTypeWizardPage fSuperClassDialogField StringButtonDialogField fSuperClassDialogField setDialogFieldListener fSuperClassDialogField setLabelText NewWizardMessages getString NewTypeWizardPage fSuperClassDialogField setButtonLabel NewWizardMessages getString NewTypeWizardPage addButtons NewWizardMessages getString NewTypeWizardPage NewWizardMessages getString NewTypeWizardPage fSuperInterfacesDialogField ListDialogField addButtons InterfacesListLabelProvider fSuperInterfacesDialogField setDialogFieldListener interfaceLabel fIsClass NewWizardMessages getString NewTypeWizardPage NewWizardMessages getString NewTypeWizardPage fSuperInterfacesDialogField setLabelText interfaceLabel fSuperInterfacesDialogField setRemoveButtonIndex buttonNames1 PUBLIC_INDEX NewWizardMessages getString NewTypeWizardPage DEFAULT_INDEX NewWizardMessages getString NewTypeWizardPage PRIVATE_INDEX NewWizardMessages getString NewTypeWizardPage PROTECTED_INDEX NewWizardMessages getString NewTypeWizardPage fAccMdfButtons SelectionButtonDialogFieldGroup buttonNames1 fAccMdfButtons setDialogFieldListener fAccMdfButtons setLabelText NewWizardMessages getString NewTypeWizardPage fAccMdfButtons setSelection buttonNames2 fIsClass buttonNames2 ABSTRACT_INDEX NewWizardMessages getString NewTypeWizardPage FINAL_INDEX NewWizardMessages getString NewTypeWizardPage NewWizardMessages getString NewTypeWizardPage buttonNames2 fOtherMdfButtons SelectionButtonDialogFieldGroup buttonNames2 fOtherMdfButtons setDialogFieldListener fAccMdfButtons enableSelectionButton PRIVATE_INDEX fAccMdfButtons enableSelectionButton PROTECTED_INDEX fOtherMdfButtons enableSelectionButton STATIC_INDEX fCurrPackageCompletionProcessor JavaPackageCompletionProcessor fEnclosingTypeCompletionProcessor JavaTypeCompletionProcessor fSuperClassCompletionProcessor JavaTypeCompletionProcessor fPackageStatus StatusInfo fEnclosingTypeStatus StatusInfo fCanModifyPackage fCanModifyEnclosingType updateEnableState fTypeNameStatus StatusInfo fSuperClassStatus StatusInfo fSuperInterfacesStatus StatusInfo fModifierStatus StatusInfo
Initializes all fields provided by the page with a given selection param elem the selection used to initialize this page or code null code if no selection was available protected void init Type Page I Java Element elem String init Superclass java lang Object NON NLS 1 Array List init Superinterfaces new Array List 5 I Package Fragment pack null I Type enclosing Type null if elem null evaluate the enclosing type pack I Package Fragment elem get Ancestor I Java Element PACKAGE FRAGMENT I Type type InCU I Type elem get Ancestor I Java Element TYPE if type InCU null if type InCU get Compilation Unit null enclosing Type type InCU else I Compilation Unit cu I Compilation Unit elem get Ancestor I Java Element COMPILATION UNIT if cu null enclosing Type cu find Primary Type try I Type type null if elem get Element Type I Java Element TYPE type I Type elem if type exists String super Name Java Model Util get Fully Qualified Name type if type is Interface init Superinterfaces add super Name else init Superclass super Name catch Java Model Exception e Java Plugin log e ignore this exception now String type Name NON NLS 1 I Text Selection selection get Current Text Selection if selection null String text selection get Text if Java Conventions validate Java Type Name text isOK type Name text set Package Fragment pack true set Enclosing Type enclosing Type true set Enclosing Type Selection false true set Type Name type Name true set Super Class init Superclass true set Super Interfaces init Superinterfaces true  initTypePage IJavaElement initSuperclass ArrayList initSuperinterfaces ArrayList IPackageFragment IType enclosingType IPackageFragment getAncestor IJavaElement PACKAGE_FRAGMENT IType typeInCU IType getAncestor IJavaElement typeInCU typeInCU getCompilationUnit enclosingType typeInCU ICompilationUnit ICompilationUnit getAncestor IJavaElement COMPILATION_UNIT enclosingType findPrimaryType IType getElementType IJavaElement IType superName JavaModelUtil getFullyQualifiedName isInterface initSuperinterfaces superName initSuperclass superName JavaModelException JavaPlugin typeName ITextSelection getCurrentTextSelection getText JavaConventions validateJavaTypeName typeName setPackageFragment setEnclosingType enclosingType setEnclosingTypeSelection setTypeName typeName setSuperClass initSuperclass setSuperInterfaces initSuperinterfaces
Creates a separator line Expects a code Grid Layout code with at least 1 column param composite the parent composite param n Columns number of columns to span protected void create Separator Composite composite int n Columns new Separator SWT SEPARATOR SWT HORIZONTAL do Fill Into Grid composite n Columns convert Height In Chars To Pixels 1  GridLayout nColumns createSeparator nColumns doFillIntoGrid nColumns convertHeightInCharsToPixels
Creates the controls for the package name field Expects a code Grid Layout code with at least 4 columns param composite the parent composite param n Columns number of columns to span protected void create Package Controls Composite composite int n Columns f Package Dialog Field do Fill Into Grid composite n Columns Text text f Package Dialog Field get Text Control null Layout Util set Width Hint text get Max Field Width Layout Util set Horizontal Grabbing text Control Content Assist Helper create Text Content Assistant text f Curr Package Completion Processor  GridLayout nColumns createPackageControls nColumns fPackageDialogField doFillIntoGrid nColumns fPackageDialogField getTextControl LayoutUtil setWidthHint getMaxFieldWidth LayoutUtil setHorizontalGrabbing ControlContentAssistHelper createTextContentAssistant fCurrPackageCompletionProcessor
Creates the controls for the enclosing type name field Expects a code Grid Layout code with at least 4 columns param composite the parent composite param n Columns number of columns to span protected void create Enclosing Type Controls Composite composite int n Columns 6891 Composite tab Group new Composite composite SWT NONE Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 tab Group set Layout layout f Enclosing Type Selection do Fill Into Grid tab Group 1 Text text f Enclosing Type Dialog Field get Text Control composite Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint get Max Field Width gd horizontal Span 2 text set Layout Data gd Button button f Enclosing Type Dialog Field get Change Control composite gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd height Hint SWT Util get Button Height Hint button gd width Hint SWT Util get Button Width Hint button button set Layout Data gd Control Content Assist Helper create Text Content Assistant text f Enclosing Type Completion Processor  GridLayout nColumns createEnclosingTypeControls nColumns tabGroup GridLayout GridLayout marginWidth marginHeight tabGroup setLayout fEnclosingTypeSelection doFillIntoGrid tabGroup fEnclosingTypeDialogField getTextControl GridData GridData GridData FILL_HORIZONTAL widthHint getMaxFieldWidth horizontalSpan setLayoutData fEnclosingTypeDialogField getChangeControl GridData GridData HORIZONTAL_ALIGN_FILL heightHint SWTUtil getButtonHeightHint widthHint SWTUtil getButtonWidthHint setLayoutData ControlContentAssistHelper createTextContentAssistant fEnclosingTypeCompletionProcessor
Creates the controls for the type name field Expects a code Grid Layout code with at least 2 columns param composite the parent composite param n Columns number of columns to span protected void create Type Name Controls Composite composite int n Columns f Type Name Dialog Field do Fill Into Grid composite n Columns 1 Dialog Field create Empty Space composite Layout Util set Width Hint f Type Name Dialog Field get Text Control null get Max Field Width  GridLayout nColumns createTypeNameControls nColumns fTypeNameDialogField doFillIntoGrid nColumns DialogField createEmptySpace LayoutUtil setWidthHint fTypeNameDialogField getTextControl getMaxFieldWidth
Creates the controls for the modifiers radio checkbox buttons Expects a code Grid Layout code with at least 3 columns param composite the parent composite param n Columns number of columns to span protected void create Modifier Controls Composite composite int n Columns Layout Util set Horizontal Span f Acc Mdf Buttons get Label Control composite 1 Control control f Acc Mdf Buttons get Selection Buttons Group composite Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span n Columns 2 control set Layout Data gd Dialog Field create Empty Space composite if f Is Class Dialog Field create Empty Space composite control f Other Mdf Buttons get Selection Buttons Group composite gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span n Columns 2 control set Layout Data gd Dialog Field create Empty Space composite  GridLayout nColumns createModifierControls nColumns LayoutUtil setHorizontalSpan fAccMdfButtons getLabelControl fAccMdfButtons getSelectionButtonsGroup GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan nColumns setLayoutData DialogField createEmptySpace fIsClass DialogField createEmptySpace fOtherMdfButtons getSelectionButtonsGroup GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan nColumns setLayoutData DialogField createEmptySpace
Creates the controls for the superclass name field Expects a code Grid Layout code with at least 3 columns param composite the parent composite param n Columns number of columns to span protected void create Super Class Controls Composite composite int n Columns f Super Class Dialog Field do Fill Into Grid composite n Columns Text text f Super Class Dialog Field get Text Control null Layout Util set Width Hint text get Max Field Width Control Content Assist Helper create Text Content Assistant text f Super Class Completion Processor  GridLayout nColumns createSuperClassControls nColumns fSuperClassDialogField doFillIntoGrid nColumns fSuperClassDialogField getTextControl LayoutUtil setWidthHint getMaxFieldWidth ControlContentAssistHelper createTextContentAssistant fSuperClassCompletionProcessor
Creates the controls for the superclass name field Expects a code Grid Layout code with at least 3 columns param composite the parent composite param n Columns number of columns to span protected void create Super Interfaces Controls Composite composite int n Columns f Super Interfaces Dialog Field do Fill Into Grid composite n Columns Grid Data gd Grid Data f Super Interfaces Dialog Field get List Control null get Layout Data if f Is Class gd height Hint convert Height In Chars To Pixels 3 else gd height Hint convert Height In Chars To Pixels 6 gd grab Excess Vertical Space false gd width Hint get Max Field Width  GridLayout nColumns createSuperInterfacesControls nColumns fSuperInterfacesDialogField doFillIntoGrid nColumns GridData GridData fSuperInterfacesDialogField getListControl getLayoutData fIsClass heightHint convertHeightInCharsToPixels heightHint convertHeightInCharsToPixels grabExcessVerticalSpace widthHint getMaxFieldWidth
Sets the focus on the type name input field protected void set Focus f Type Name Dialog Field set Focus  setFocus fTypeNameDialogField setFocus
I String Button Adapter public void change Control Pressed Dialog Field field type Page Change Control Pressed field  IStringButtonAdapter changeControlPressed DialogField typePageChangeControlPressed
I List Adapter public void custom Button Pressed List Dialog Field field int index type Page Custom Button Pressed field index  IListAdapter customButtonPressed ListDialogField typePageCustomButtonPressed
public void selection Changed List Dialog Field field  selectionChanged ListDialogField
I Dialog Field Listener public void dialog Field Changed Dialog Field field type Page Dialog Field Changed field  IDialogFieldListener dialogFieldChanged DialogField typePageDialogFieldChanged
public void double Clicked List Dialog Field field  doubleClicked ListDialogField
private void type Page Change Control Pressed Dialog Field field if field f Package Dialog Field I Package Fragment pack choose Package if pack null f Package Dialog Field set Text pack get Element Name else if field f Enclosing Type Dialog Field I Type type choose Enclosing Type if type null f Enclosing Type Dialog Field set Text Java Model Util get Fully Qualified Name type else if field f Super Class Dialog Field I Type type choose Super Type if type null f Super Class Dialog Field set Text Java Model Util get Fully Qualified Name type  typePageChangeControlPressed DialogField fPackageDialogField IPackageFragment choosePackage fPackageDialogField setText getElementName fEnclosingTypeDialogField IType chooseEnclosingType fEnclosingTypeDialogField setText JavaModelUtil getFullyQualifiedName fSuperClassDialogField IType chooseSuperType fSuperClassDialogField setText JavaModelUtil getFullyQualifiedName
private void type Page Custom Button Pressed Dialog Field field int index if field f Super Interfaces Dialog Field choose Super Interfaces  typePageCustomButtonPressed DialogField fSuperInterfacesDialogField chooseSuperInterfaces
private void type Page Dialog Field Changed Dialog Field field String field Name null if field f Package Dialog Field f Package Status package Changed update Package Status Label f Type Name Status type Name Changed f Super Class Status super Class Changed field Name PACKAGE else if field f Enclosing Type Dialog Field f Enclosing Type Status enclosing Type Changed f Type Name Status type Name Changed f Super Class Status super Class Changed field Name ENCLOSING else if field f Enclosing Type Selection update Enable State boolean is Enclosed Type is Enclosing Type Selected if is Enclosed Type if f Acc Mdf Buttons is Selected PRIVATE INDEX f Acc Mdf Buttons is Selected PROTECTED INDEX f Acc Mdf Buttons set Selection PRIVATE INDEX false f Acc Mdf Buttons set Selection PROTECTED INDEX false f Acc Mdf Buttons set Selection PUBLIC INDEX true if f Other Mdf Buttons is Selected STATIC INDEX f Other Mdf Buttons set Selection STATIC INDEX false f Acc Mdf Buttons enable Selection Button PRIVATE INDEX is Enclosed Type f Acc Mdf Buttons enable Selection Button PROTECTED INDEX is Enclosed Type f Other Mdf Buttons enable Selection Button STATIC INDEX is Enclosed Type f Type Name Status type Name Changed f Super Class Status super Class Changed field Name ENCLOSINGSELECTION else if field f Type Name Dialog Field f Type Name Status type Name Changed field Name TYPENAME else if field f Super Class Dialog Field f Super Class Status super Class Changed field Name SUPER else if field f Super Interfaces Dialog Field f Super Interfaces Status super Interfaces Changed field Name INTERFACES else if field f Other Mdf Buttons field f Acc Mdf Buttons f Modifier Status modifiers Changed field Name MODIFIERS else field Name METHODS tell all others handle Field Changed field Name  typePageDialogFieldChanged DialogField fieldName fPackageDialogField fPackageStatus packageChanged updatePackageStatusLabel fTypeNameStatus typeNameChanged fSuperClassStatus superClassChanged fieldName fEnclosingTypeDialogField fEnclosingTypeStatus enclosingTypeChanged fTypeNameStatus typeNameChanged fSuperClassStatus superClassChanged fieldName fEnclosingTypeSelection updateEnableState isEnclosedType isEnclosingTypeSelected isEnclosedType fAccMdfButtons isSelected PRIVATE_INDEX fAccMdfButtons isSelected PROTECTED_INDEX fAccMdfButtons setSelection PRIVATE_INDEX fAccMdfButtons setSelection PROTECTED_INDEX fAccMdfButtons setSelection PUBLIC_INDEX fOtherMdfButtons isSelected STATIC_INDEX fOtherMdfButtons setSelection STATIC_INDEX fAccMdfButtons enableSelectionButton PRIVATE_INDEX isEnclosedType fAccMdfButtons enableSelectionButton PROTECTED_INDEX isEnclosedType fOtherMdfButtons enableSelectionButton STATIC_INDEX isEnclosedType fTypeNameStatus typeNameChanged fSuperClassStatus superClassChanged fieldName fTypeNameDialogField fTypeNameStatus typeNameChanged fieldName fSuperClassDialogField fSuperClassStatus superClassChanged fieldName fSuperInterfacesDialogField fSuperInterfacesStatus superInterfacesChanged fieldName fOtherMdfButtons fAccMdfButtons fModifierStatus modifiersChanged fieldName fieldName handleFieldChanged fieldName
protected void handle Field Changed String field Name super handle Field Changed field Name if field Name CONTAINER f Package Status package Changed f Enclosing Type Status enclosing Type Changed f Type Name Status type Name Changed f Super Class Status super Class Changed f Super Interfaces Status super Interfaces Changed  handleFieldChanged fieldName handleFieldChanged fieldName fieldName fPackageStatus packageChanged fEnclosingTypeStatus enclosingTypeChanged fTypeNameStatus typeNameChanged fSuperClassStatus superClassChanged fSuperInterfacesStatus superInterfacesChanged
Returns the text of the package input field return the text of the package input field public String get Package Text return f Package Dialog Field get Text  getPackageText fPackageDialogField getText
Returns the text of the enclosing type input field return the text of the enclosing type input field public String get Enclosing Type Text return f Enclosing Type Dialog Field get Text  getEnclosingTypeText fEnclosingTypeDialogField getText
Returns the package fragment corresponding to the current input return a package fragment or code null code if the input could not be resolved public I Package Fragment get Package Fragment if is Enclosing Type Selected return f Curr Package else if f Curr Enclosing Type null return f Curr Enclosing Type get Package Fragment return null  IPackageFragment getPackageFragment isEnclosingTypeSelected fCurrPackage fCurrEnclosingType fCurrEnclosingType getPackageFragment
Sets the package fragment to the given value The method updates the model and the text of the control param pack the package fragment to be set param can Be Modified if code true code the package fragment is editable otherwise it is read only public void set Package Fragment I Package Fragment pack boolean can Be Modified f Curr Package pack f Can Modify Package can Be Modified String str pack null pack get Element Name NON NLS 1 f Package Dialog Field set Text str update Enable State  canBeModified setPackageFragment IPackageFragment canBeModified fCurrPackage fCanModifyPackage canBeModified getElementName fPackageDialogField setText updateEnableState
Returns the enclosing type corresponding to the current input return the enclosing type or code null code if the enclosing type is not selected or the input could not be resolved public I Type get Enclosing Type if is Enclosing Type Selected return f Curr Enclosing Type return null  IType getEnclosingType isEnclosingTypeSelected fCurrEnclosingType
Sets the enclosing type The method updates the underlying model and the text of the control param type the enclosing type param can Be Modified if code true code the enclosing type field is editable otherwise it is read only public void set Enclosing Type I Type type boolean can Be Modified f Curr Enclosing Type type f Can Modify Enclosing Type can Be Modified String str type null Java Model Util get Fully Qualified Name type NON NLS 1 f Enclosing Type Dialog Field set Text str update Enable State  canBeModified setEnclosingType IType canBeModified fCurrEnclosingType fCanModifyEnclosingType canBeModified JavaModelUtil getFullyQualifiedName fEnclosingTypeDialogField setText updateEnableState
Returns the selection state of the enclosing type checkbox return the selection state of the enclosing type checkbox public boolean is Enclosing Type Selected return f Enclosing Type Selection is Selected  isEnclosingTypeSelected fEnclosingTypeSelection isSelected
Sets the enclosing type checkbox s selection state param is Selected the checkbox s selection state param can Be Modified if code true code the enclosing type checkbox is modifiable otherwise it is read only public void set Enclosing Type Selection boolean is Selected boolean can Be Modified f Enclosing Type Selection set Selection is Selected f Enclosing Type Selection set Enabled can Be Modified update Enable State  isSelected canBeModified setEnclosingTypeSelection isSelected canBeModified fEnclosingTypeSelection setSelection isSelected fEnclosingTypeSelection setEnabled canBeModified updateEnableState
Returns the type name entered into the type input field return the type name public String get Type Name return f Type Name Dialog Field get Text  getTypeName fTypeNameDialogField getText
Sets the type name input field s text to the given value Method doesn t update the model param name the new type name param can Be Modified if code true code the type name field is editable otherwise it is read only public void set Type Name String name boolean can Be Modified f Type Name Dialog Field set Text name f Type Name Dialog Field set Enabled can Be Modified  canBeModified setTypeName canBeModified fTypeNameDialogField setText fTypeNameDialogField setEnabled canBeModified
Returns the selected modifiers return the selected modifiers see Flags public int get Modifiers int mdf 0 if f Acc Mdf Buttons is Selected PUBLIC INDEX mdf F PUBLIC else if f Acc Mdf Buttons is Selected PRIVATE INDEX mdf F PRIVATE else if f Acc Mdf Buttons is Selected PROTECTED INDEX mdf F PROTECTED if f Other Mdf Buttons is Selected ABSTRACT INDEX mdf F ABSTRACT if f Other Mdf Buttons is Selected FINAL INDEX mdf F FINAL if f Other Mdf Buttons is Selected STATIC INDEX mdf F STATIC return mdf  getModifiers fAccMdfButtons isSelected PUBLIC_INDEX F_PUBLIC fAccMdfButtons isSelected PRIVATE_INDEX F_PRIVATE fAccMdfButtons isSelected PROTECTED_INDEX F_PROTECTED fOtherMdfButtons isSelected ABSTRACT_INDEX F_ABSTRACT fOtherMdfButtons isSelected FINAL_INDEX F_FINAL fOtherMdfButtons isSelected STATIC_INDEX F_STATIC
Sets the modifiers param modifiers code F PUBLIC code code F PRIVATE code code F PROTECTED code code F ABSTRACT code code F FINAL code or code F STATIC code or a valid combination param can Be Modified if code true code the modifier fields are editable otherwise they are read only see Flags public void set Modifiers int modifiers boolean can Be Modified if Flags is Public modifiers f Acc Mdf Buttons set Selection PUBLIC INDEX true else if Flags is Private modifiers f Acc Mdf Buttons set Selection PRIVATE INDEX true else if Flags is Protected modifiers f Acc Mdf Buttons set Selection PROTECTED INDEX true else f Acc Mdf Buttons set Selection DEFAULT INDEX true if Flags is Abstract modifiers f Other Mdf Buttons set Selection ABSTRACT INDEX true if Flags is Final modifiers f Other Mdf Buttons set Selection FINAL INDEX true if Flags is Static modifiers f Other Mdf Buttons set Selection STATIC INDEX true f Acc Mdf Buttons set Enabled can Be Modified f Other Mdf Buttons set Enabled can Be Modified  F_PUBLIC F_PRIVATE F_PROTECTED F_ABSTRACT F_FINAL F_STATIC canBeModified setModifiers canBeModified isPublic fAccMdfButtons setSelection PUBLIC_INDEX isPrivate fAccMdfButtons setSelection PRIVATE_INDEX isProtected fAccMdfButtons setSelection PROTECTED_INDEX fAccMdfButtons setSelection DEFAULT_INDEX isAbstract fOtherMdfButtons setSelection ABSTRACT_INDEX isFinal fOtherMdfButtons setSelection FINAL_INDEX isStatic fOtherMdfButtons setSelection STATIC_INDEX fAccMdfButtons setEnabled canBeModified fOtherMdfButtons setEnabled canBeModified
Returns the content of the superclass input field return the superclass name public String get Super Class return f Super Class Dialog Field get Text  getSuperClass fSuperClassDialogField getText
Sets the super class name param name the new superclass name param can Be Modified if code true code the superclass name field is editable otherwise it is read only public void set Super Class String name boolean can Be Modified f Super Class Dialog Field set Text name f Super Class Dialog Field set Enabled can Be Modified  canBeModified setSuperClass canBeModified fSuperClassDialogField setText fSuperClassDialogField setEnabled canBeModified
Returns the chosen super interfaces return a list of chosen super interfaces The list s elements are of type code String code public List get Super Interfaces return f Super Interfaces Dialog Field get Elements  getSuperInterfaces fSuperInterfacesDialogField getElements
Sets the super interfaces param interfaces Names a list of super interface The method requires that the list s elements are of type code String code param can Be Modified if code true code the super interface field is editable otherwise it is read only public void set Super Interfaces List interfaces Names boolean can Be Modified f Super Interfaces Dialog Field set Elements interfaces Names f Super Interfaces Dialog Field set Enabled can Be Modified  interfacesNames canBeModified setSuperInterfaces interfacesNames canBeModified fSuperInterfacesDialogField setElements interfacesNames fSuperInterfacesDialogField setEnabled canBeModified
Returns the resource handle that corresponds to the compilation unit to was or will be created or modified return A resource or null if the page contains illegal values since 3 0 public I Resource get Modified Resource I Type enclosing get Enclosing Type if enclosing null return enclosing get Resource I Package Fragment pack get Package Fragment if pack null return pack get Compilation Unit get Type Name java get Resource NON NLS 1 return null  IResource getModifiedResource IType getEnclosingType getResource IPackageFragment getPackageFragment getCompilationUnit getTypeName getResource
protected I Status container Changed I Status status super container Changed f Curr Package Completion Processor set Package Fragment Root get Package Fragment Root if get Package Fragment Root null TODO use Java Source Type Completion Processor f Enclosing Type Completion Processor set Package Fragment get Package Fragment Root get Package Fragment NON NLS 1 return status  IStatus containerChanged IStatus containerChanged fCurrPackageCompletionProcessor setPackageFragmentRoot getPackageFragmentRoot getPackageFragmentRoot JavaSourceTypeCompletionProcessor fEnclosingTypeCompletionProcessor setPackageFragment getPackageFragmentRoot getPackageFragment
A hook method that gets called when the package field has changed The method validates the package name and returns the status of the validation The validation also updates the package fragment model p Subclasses may extend this method to perform their own validation p return the status of the validation protected I Status package Changed Status Info status new Status Info f Package Dialog Field enable Button get Package Fragment Root null String pack Name get Package Text if pack Name length 0 I Status val Java Conventions validate Package Name pack Name if val get Severity I Status ERROR status set Error New Wizard Messages get Formatted String New Type Wizard Page error Invalid Package Name val get Message NON NLS 1 return status else if val get Severity I Status WARNING status set Warning New Wizard Messages get Formatted String New Type Wizard Page warning Discouraged Package Name val get Message NON NLS 1 continue else status set Warning New Wizard Messages get String New Type Wizard Page warning Default Package Discouraged NON NLS 1 I Package Fragment Root root get Package Fragment Root if root null if root get Java Project exists pack Name length 0 try I Path root Path root get Path I Path output Path root get Java Project get Output Location if root Path is Prefix Of output Path root Path equals output Path if the bin folder is inside of our root don t allow to name a package like the bin folder I Path package Path root Path append pack Name replace if output Path is Prefix Of package Path status set Error New Wizard Messages get String New Type Wizard Page error Clash Output Location NON NLS 1 return status catch Java Model Exception e Java Plugin log e let pass f Curr Package root get Package Fragment pack Name f Super Class Completion Processor set Extends Completion Context f Curr Package else status set Error NON NLS 1 return status  IStatus packageChanged StatusInfo StatusInfo fPackageDialogField enableButton getPackageFragmentRoot packName getPackageText packName IStatus JavaConventions validatePackageName packName getSeverity IStatus setError NewWizardMessages getFormattedString NewTypeWizardPage InvalidPackageName getMessage getSeverity IStatus setWarning NewWizardMessages getFormattedString NewTypeWizardPage DiscouragedPackageName getMessage setWarning NewWizardMessages getString NewTypeWizardPage DefaultPackageDiscouraged IPackageFragmentRoot getPackageFragmentRoot getJavaProject packName IPath rootPath getPath IPath outputPath getJavaProject getOutputLocation rootPath isPrefixOf outputPath rootPath outputPath IPath packagePath rootPath packName outputPath isPrefixOf packagePath setError NewWizardMessages getString NewTypeWizardPage ClashOutputLocation JavaModelException JavaPlugin fCurrPackage getPackageFragment packName fSuperClassCompletionProcessor setExtendsCompletionContext fCurrPackage setError
private void update Package Status Label String pack Name get Package Text if pack Name length 0 f Package Dialog Field set Status New Wizard Messages get String New Type Wizard Page default NON NLS 1 else f Package Dialog Field set Status NON NLS 1  updatePackageStatusLabel packName getPackageText packName fPackageDialogField setStatus NewWizardMessages getString NewTypeWizardPage fPackageDialogField setStatus
private void update Enable State boolean enclosing is Enclosing Type Selected f Package Dialog Field set Enabled f Can Modify Package enclosing f Enclosing Type Dialog Field set Enabled f Can Modify Enclosing Type enclosing  updateEnableState isEnclosingTypeSelected fPackageDialogField setEnabled fCanModifyPackage fEnclosingTypeDialogField setEnabled fCanModifyEnclosingType
Hook method that gets called when the enclosing type name has changed The method validates the enclosing type and returns the status of the validation It also updates the enclosing type model p Subclasses may extend this method to perform their own validation p return the status of the validation protected I Status enclosing Type Changed Status Info status new Status Info f Curr Enclosing Type null I Package Fragment Root root get Package Fragment Root f Enclosing Type Dialog Field enable Button root null if root null status set Error NON NLS 1 return status String encl Name get Enclosing Type Text if encl Name length 0 status set Error New Wizard Messages get String New Type Wizard Page error Enclosing Type Enter Name NON NLS 1 return status try I Type type find Type root get Java Project encl Name if type null status set Error New Wizard Messages get String New Type Wizard Page error Enclosing Type Not Exists NON NLS 1 return status if type get Compilation Unit null status set Error New Wizard Messages get String New Type Wizard Page error Enclosing Not InCU NON NLS 1 return status if Java Model Util is Editable type get Compilation Unit status set Error New Wizard Messages get String New Type Wizard Page error Enclosing Not Editable NON NLS 1 return status f Curr Enclosing Type type I Package Fragment Root enclosing Root Java Model Util get Package Fragment Root type if enclosing Root equals root status set Warning New Wizard Messages get String New Type Wizard Page warning Enclosing Not In Source Folder NON NLS 1 return status catch Java Model Exception e status set Error New Wizard Messages get String New Type Wizard Page error Enclosing Type Not Exists NON NLS 1 Java Plugin log e return status  IStatus enclosingTypeChanged StatusInfo StatusInfo fCurrEnclosingType IPackageFragmentRoot getPackageFragmentRoot fEnclosingTypeDialogField enableButton setError enclName getEnclosingTypeText enclName setError NewWizardMessages getString NewTypeWizardPage EnclosingTypeEnterName IType findType getJavaProject enclName setError NewWizardMessages getString NewTypeWizardPage EnclosingTypeNotExists getCompilationUnit setError NewWizardMessages getString NewTypeWizardPage EnclosingNotInCU JavaModelUtil isEditable getCompilationUnit setError NewWizardMessages getString NewTypeWizardPage EnclosingNotEditable fCurrEnclosingType IPackageFragmentRoot enclosingRoot JavaModelUtil getPackageFragmentRoot enclosingRoot setWarning NewWizardMessages getString NewTypeWizardPage EnclosingNotInSourceFolder JavaModelException setError NewWizardMessages getString NewTypeWizardPage EnclosingTypeNotExists JavaPlugin
Hook method that gets called when the type name has changed The method validates the type name and returns the status of the validation p Subclasses may extend this method to perform their own validation p return the status of the validation protected I Status type Name Changed Status Info status new Status Info String type Name get Type Name must not be empty if type Name length 0 status set Error New Wizard Messages get String New Type Wizard Page error Enter Type Name NON NLS 1 return status if type Name index Of 1 status set Error New Wizard Messages get String New Type Wizard Page error Qualified Name NON NLS 1 return status I Status val Java Conventions validate Java Type Name type Name if val get Severity I Status ERROR status set Error New Wizard Messages get Formatted String New Type Wizard Page error Invalid Type Name val get Message NON NLS 1 return status else if val get Severity I Status WARNING status set Warning New Wizard Messages get Formatted String New Type Wizard Page warning Type Name Discouraged val get Message NON NLS 1 continue checking must not exist if is Enclosing Type Selected I Package Fragment pack get Package Fragment if pack null I Compilation Unit cu pack get Compilation Unit type Name java NON NLS 1 I Resource resource cu get Resource if resource exists status set Error New Wizard Messages get String New Type Wizard Page error Type Name Exists NON NLS 1 return status I Path location resource get Location if location null location to File exists status set Error New Wizard Messages get String New Type Wizard Page error Type Name Exists Different Case NON NLS 1 return status else I Type type get Enclosing Type if type null I Type member type get Type type Name if member exists status set Error New Wizard Messages get String New Type Wizard Page error Type Name Exists NON NLS 1 return status return status  IStatus typeNameChanged StatusInfo StatusInfo typeName getTypeName typeName setError NewWizardMessages getString NewTypeWizardPage EnterTypeName typeName indexOf setError NewWizardMessages getString NewTypeWizardPage QualifiedName IStatus JavaConventions validateJavaTypeName typeName getSeverity IStatus setError NewWizardMessages getFormattedString NewTypeWizardPage InvalidTypeName getMessage getSeverity IStatus setWarning NewWizardMessages getFormattedString NewTypeWizardPage TypeNameDiscouraged getMessage isEnclosingTypeSelected IPackageFragment getPackageFragment ICompilationUnit getCompilationUnit typeName IResource getResource setError NewWizardMessages getString NewTypeWizardPage TypeNameExists IPath getLocation toFile setError NewWizardMessages getString NewTypeWizardPage TypeNameExistsDifferentCase IType getEnclosingType IType getType typeName setError NewWizardMessages getString NewTypeWizardPage TypeNameExists
Hook method that gets called when the superclass name has changed The method validates the superclass name and returns the status of the validation p Subclasses may extend this method to perform their own validation p return the status of the validation protected I Status super Class Changed Status Info status new Status Info I Package Fragment Root root get Package Fragment Root f Super Class Dialog Field enable Button root null f Super Class null String sclass Name get Super Class if sclass Name length 0 accept the empty field stands for java lang Object return status I Status val Java Conventions validate Java Type Name sclass Name if val get Severity I Status ERROR status set Error New Wizard Messages get String New Type Wizard Page error Invalid Super Class Name NON NLS 1 return status if root null try I Type type resolve Super Type Name root get Java Project sclass Name if type null status set Warning New Wizard Messages get String New Type Wizard Page warning Super Class Not Exists NON NLS 1 return status else if type is Interface status set Warning New Wizard Messages get Formatted String New Type Wizard Page warning Super Class Is Not Class sclass Name NON NLS 1 return status int flags type get Flags if Flags is Final flags status set Warning New Wizard Messages get Formatted String New Type Wizard Page warning Super Class Is Final sclass Name NON NLS 1 return status else if Java Model Util is Visible type get Package Fragment status set Warning New Wizard Messages get Formatted String New Type Wizard Page warning Super Class Is Not Visible sclass Name NON NLS 1 return status f Super Class type catch Java Model Exception e status set Error New Wizard Messages get String New Type Wizard Page error Invalid Super Class Name NON NLS 1 Java Plugin log e else status set Error NON NLS 1 return status  IStatus superClassChanged StatusInfo StatusInfo IPackageFragmentRoot getPackageFragmentRoot fSuperClassDialogField enableButton fSuperClass sclassName getSuperClass sclassName IStatus JavaConventions validateJavaTypeName sclassName getSeverity IStatus setError NewWizardMessages getString NewTypeWizardPage InvalidSuperClassName IType resolveSuperTypeName getJavaProject sclassName setWarning NewWizardMessages getString NewTypeWizardPage SuperClassNotExists isInterface setWarning NewWizardMessages getFormattedString NewTypeWizardPage SuperClassIsNotClass sclassName getFlags isFinal setWarning NewWizardMessages getFormattedString NewTypeWizardPage SuperClassIsFinal sclassName JavaModelUtil isVisible getPackageFragment setWarning NewWizardMessages getFormattedString NewTypeWizardPage SuperClassIsNotVisible sclassName fSuperClass JavaModelException setError NewWizardMessages getString NewTypeWizardPage InvalidSuperClassName JavaPlugin setError
private I Type resolve Super Type Name I Java Project jproject String sclass Name throws Java Model Exception if jproject exists return null I Type type null if is Enclosing Type Selected search in the context of the enclosing type I Type enclosing Type get Enclosing Type if enclosing Type null String res enclosing Type resolve Type sclass Name if res null res length 0 type jproject find Type res 0 0 res 0 1 else I Package Fragment curr Pack get Package Fragment if type null curr Pack null String pack Name curr Pack get Element Name search in own package if curr Pack is Default Package type jproject find Type pack Name sclass Name search in java lang if type null java lang equals pack Name NON NLS 1 type jproject find Type java lang sclass Name NON NLS 1 search fully qualified if type null type jproject find Type sclass Name return type  IType resolveSuperTypeName IJavaProject sclassName JavaModelException IType isEnclosingTypeSelected IType enclosingType getEnclosingType enclosingType enclosingType resolveType sclassName findType IPackageFragment currPack getPackageFragment currPack packName currPack getElementName currPack isDefaultPackage findType packName sclassName packName findType sclassName findType sclassName
private I Type find Type I Java Project project String type Name throws Java Model Exception if project exists return project find Type type Name return null  IType findType IJavaProject typeName JavaModelException findType typeName
Hook method that gets called when the list of super interface has changed The method validates the super interfaces and returns the status of the validation p Subclasses may extend this method to perform their own validation p return the status of the validation protected I Status super Interfaces Changed Status Info status new Status Info I Package Fragment Root root get Package Fragment Root f Super Interfaces Dialog Field enable Button 0 root null if root null List elements f Super Interfaces Dialog Field get Elements int n Elements elements size for int i 0 i n Elements i String intfname String elements get i try I Type type find Type root get Java Project intfname if type null status set Warning New Wizard Messages get Formatted String New Type Wizard Page warning Interface Not Exists intfname NON NLS 1 return status else if type is Class status set Warning New Wizard Messages get Formatted String New Type Wizard Page warning Interface Is Not Interface intfname NON NLS 1 return status if Java Model Util is Visible type get Package Fragment status set Warning New Wizard Messages get Formatted String New Type Wizard Page warning Interface Is Not Visible intfname NON NLS 1 return status catch Java Model Exception e Java Plugin log e let pass checking is an extra return status  IStatus superInterfacesChanged StatusInfo StatusInfo IPackageFragmentRoot getPackageFragmentRoot fSuperInterfacesDialogField enableButton fSuperInterfacesDialogField getElements nElements nElements IType findType getJavaProject setWarning NewWizardMessages getFormattedString NewTypeWizardPage InterfaceNotExists isClass setWarning NewWizardMessages getFormattedString NewTypeWizardPage InterfaceIsNotInterface JavaModelUtil isVisible getPackageFragment setWarning NewWizardMessages getFormattedString NewTypeWizardPage InterfaceIsNotVisible JavaModelException JavaPlugin
Hook method that gets called when the modifiers have changed The method validates the modifiers and returns the status of the validation p Subclasses may extend this method to perform their own validation p return the status of the validation protected I Status modifiers Changed Status Info status new Status Info int modifiers get Modifiers if Flags is Final modifiers Flags is Abstract modifiers status set Error New Wizard Messages get String New Type Wizard Page error Modifiers Final And Abstract NON NLS 1 return status  IStatus modifiersChanged StatusInfo StatusInfo getModifiers isFinal isAbstract setError NewWizardMessages getString NewTypeWizardPage ModifiersFinalAndAbstract
private I Package Fragment choose Package I Package Fragment Root froot get Package Fragment Root I Java Element packages null try if froot null froot exists packages froot get Children catch Java Model Exception e Java Plugin log e if packages null packages new I Java Element 0 Element List Selection Dialog dialog new Element List Selection Dialog get Shell new Java Element Label Provider Java Element Label Provider SHOW DEFAULT dialog set Ignore Case false dialog set Title New Wizard Messages get String New Type Wizard Page Choose Package Dialog title NON NLS 1 dialog set Message New Wizard Messages get String New Type Wizard Page Choose Package Dialog description NON NLS 1 dialog set Empty List Message New Wizard Messages get String New Type Wizard Page Choose Package Dialog empty NON NLS 1 dialog set Elements packages I Package Fragment pack get Package Fragment if pack null dialog set Initial Selections new Object pack if dialog open Window OK return I Package Fragment dialog get First Result return null  IPackageFragment choosePackage IPackageFragmentRoot getPackageFragmentRoot IJavaElement getChildren JavaModelException JavaPlugin IJavaElement ElementListSelectionDialog ElementListSelectionDialog getShell JavaElementLabelProvider JavaElementLabelProvider SHOW_DEFAULT setIgnoreCase setTitle NewWizardMessages getString NewTypeWizardPage ChoosePackageDialog setMessage NewWizardMessages getString NewTypeWizardPage ChoosePackageDialog setEmptyListMessage NewWizardMessages getString NewTypeWizardPage ChoosePackageDialog setElements IPackageFragment getPackageFragment setInitialSelections IPackageFragment getFirstResult
private I Type choose Enclosing Type I Package Fragment Root root get Package Fragment Root if root null return null I Java Search Scope scope Search Engine create Java Search Scope new I Java Element root Type Selection Dialog dialog new Type Selection Dialog get Shell get Wizard get Container I Java Search Constants TYPE scope dialog set Title New Wizard Messages get String New Type Wizard Page Choose Enclosing Type Dialog title NON NLS 1 dialog set Message New Wizard Messages get String New Type Wizard Page Choose Enclosing Type Dialog description NON NLS 1 dialog set Filter Signature get Simple Name get Enclosing Type Text if dialog open Window OK return I Type dialog get First Result return null  IType chooseEnclosingType IPackageFragmentRoot getPackageFragmentRoot IJavaSearchScope SearchEngine createJavaSearchScope IJavaElement TypeSelectionDialog TypeSelectionDialog getShell getWizard getContainer IJavaSearchConstants setTitle NewWizardMessages getString NewTypeWizardPage ChooseEnclosingTypeDialog setMessage NewWizardMessages getString NewTypeWizardPage ChooseEnclosingTypeDialog setFilter getSimpleName getEnclosingTypeText IType getFirstResult
private I Type choose Super Type I Package Fragment Root root get Package Fragment Root if root null return null I Java Element elements new I Java Element root get Java Project I Java Search Scope scope Search Engine create Java Search Scope elements Type Selection Dialog dialog new Type Selection Dialog get Shell get Wizard get Container I Java Search Constants CLASS scope dialog set Title New Wizard Messages get String New Type Wizard Page Super Class Dialog title NON NLS 1 dialog set Message New Wizard Messages get String New Type Wizard Page Super Class Dialog message NON NLS 1 dialog set Filter get Super Class if dialog open Window OK return I Type dialog get First Result return null  IType chooseSuperType IPackageFragmentRoot getPackageFragmentRoot IJavaElement IJavaElement getJavaProject IJavaSearchScope SearchEngine createJavaSearchScope TypeSelectionDialog TypeSelectionDialog getShell getWizard getContainer IJavaSearchConstants setTitle NewWizardMessages getString NewTypeWizardPage SuperClassDialog setMessage NewWizardMessages getString NewTypeWizardPage SuperClassDialog setFilter getSuperClass IType getFirstResult
private void choose Super Interfaces I Package Fragment Root root get Package Fragment Root if root null return I Java Project project root get Java Project Super Interface Selection Dialog dialog new Super Interface Selection Dialog get Shell get Wizard get Container f Super Interfaces Dialog Field project dialog set Title f Is Class New Wizard Messages get String New Type Wizard Page Interfaces Dialog class title New Wizard Messages get String New Type Wizard Page Interfaces Dialog interface title NON NLS 1 NON NLS 2 dialog set Message New Wizard Messages get String New Type Wizard Page Interfaces Dialog message NON NLS 1 dialog open return  chooseSuperInterfaces IPackageFragmentRoot getPackageFragmentRoot IJavaProject getJavaProject SuperInterfaceSelectionDialog SuperInterfaceSelectionDialog getShell getWizard getContainer fSuperInterfacesDialogField setTitle fIsClass NewWizardMessages getString NewTypeWizardPage InterfacesDialog NewWizardMessages getString NewTypeWizardPage InterfacesDialog setMessage NewWizardMessages getString NewTypeWizardPage InterfacesDialog
Creates the new type using the entered field values param monitor a progress monitor to report progress throws Core Exception Thrown when the creation failed throws Interrupted Exception Thrown when the operation was cancelled public void create Type I Progress Monitor monitor throws Core Exception Interrupted Exception if monitor null monitor new Null Progress Monitor monitor begin Task New Wizard Messages get String New Type Wizard Page operationdesc 10 NON NLS 1 I Compilation Unit created Working Copy null try I Package Fragment Root root get Package Fragment Root I Package Fragment pack get Package Fragment if pack null pack root get Package Fragment NON NLS 1 if pack exists String pack Name pack get Element Name pack root create Package Fragment pack Name true null monitor worked 1 String cl Name get Type Name boolean is Inner Class is Enclosing Type Selected I Type created Type Imports Manager imports int indent 0 String line Delimiter null if is Inner Class line Delimiter System get Property line separator n NON NLS 1 NON NLS 2 I Compilation Unit parentCU pack create Compilation Unit cl Name java false new Sub Progress Monitor monitor 2 NON NLS 1 NON NLS 2 create a working copy with a new owner created Working Copy parentCU get Working Copy null use the compiler template a first time to read the imports String content Code Generation get Compilation Unit Content created Working Copy null line Delimiter NON NLS 1 if content null created Working Copy get Buffer set Contents content imports new Imports Manager created Working Copy add an import that will be removed again Having this import solves 14661 imports add Import Java Model Util concatenate Name pack get Element Name get Type Name String type Content construct Type Stub imports line Delimiter String cu Content constructCU Content parentCU type Content line Delimiter created Working Copy get Buffer set Contents cu Content created Type created Working Copy get Type cl Name else I Type enclosing Type get Enclosing Type I Compilation Unit parentCU enclosing Type get Compilation Unit imports new Imports Manager parentCU add imports that will be removed again Having the imports solves 14661 I Type top Level Types parentCU get Types for int i 0 i top Level Types length i imports add Import top Level Types i get Fully Qualified Name line Delimiter Stub Utility get Line Delimiter Used enclosing Type String Buffer content new String Buffer if Preference Constants get Preference Store get Boolean Preference Constants CODEGEN ADD COMMENTS String comment get Type Comment parentCU line Delimiter if comment null content append comment content append line Delimiter content append construct Type Stub imports line Delimiter I Java Element elems enclosing Type get Children I Java Element sibling elems length 0 elems 0 null created Type enclosing Type create Type content to String sibling false new Sub Progress Monitor monitor 1 indent Stub Utility get Indent Used enclosing Type 1 if monitor is Canceled throw new Interrupted Exception add imports for superclass interfaces so types can be resolved correctly I Compilation Unit cu created Type get Compilation Unit boolean needs Save cu is Working Copy imports create needs Save new Sub Progress Monitor monitor 1 Java Model Util reconcile cu if monitor is Canceled throw new Interrupted Exception set up again imports new Imports Manager imports get Compilation Unit imports get Added Types create Type Members created Type imports new Sub Progress Monitor monitor 1 add imports imports create needs Save new Sub Progress Monitor monitor 1 remove Unused Imports cu imports get Added Types needs Save Java Model Util reconcile cu I Source Range range created Type get Source Range I Buffer buf cu get Buffer String original Content buf get Text range get Offset range get Length String formatted Content Code Formatter Util format Code Formatter K CLASS BODY DECLARATIONS original Content indent null line Delimiter pack get Java Project buf replace range get Offset range get Length formatted Content if is Inner Class String file Comment get File Comment cu if file Comment null file Comment length 0 buf replace 0 0 file Comment line Delimiter cu commit Working Copy false new Sub Progress Monitor monitor 1 else if needs Save buf save null false monitor worked 1 if created Working Copy null f Created Type I Type created Type get Primary Element else f Created Type created Type finally if created Working Copy null created Working Copy discard Working Copy monitor done  CoreException InterruptedException createType IProgressMonitor CoreException InterruptedException NullProgressMonitor beginTask NewWizardMessages getString NewTypeWizardPage ICompilationUnit createdWorkingCopy IPackageFragmentRoot getPackageFragmentRoot IPackageFragment getPackageFragment getPackageFragment packName getElementName createPackageFragment packName clName getTypeName isInnerClass isEnclosingTypeSelected IType createdType ImportsManager lineDelimiter isInnerClass lineDelimiter getProperty ICompilationUnit createCompilationUnit clName SubProgressMonitor createdWorkingCopy getWorkingCopy CodeGeneration getCompilationUnitContent createdWorkingCopy lineDelimiter createdWorkingCopy getBuffer setContents ImportsManager createdWorkingCopy addImport JavaModelUtil concatenateName getElementName getTypeName typeContent constructTypeStub lineDelimiter cuContent constructCUContent typeContent lineDelimiter createdWorkingCopy getBuffer setContents cuContent createdType createdWorkingCopy getType clName IType enclosingType getEnclosingType ICompilationUnit enclosingType getCompilationUnit ImportsManager IType topLevelTypes getTypes topLevelTypes addImport topLevelTypes getFullyQualifiedName lineDelimiter StubUtility getLineDelimiterUsed enclosingType StringBuffer StringBuffer PreferenceConstants getPreferenceStore getBoolean PreferenceConstants CODEGEN_ADD_COMMENTS getTypeComment lineDelimiter lineDelimiter constructTypeStub lineDelimiter IJavaElement enclosingType getChildren IJavaElement createdType enclosingType createType toString SubProgressMonitor StubUtility getIndentUsed enclosingType isCanceled InterruptedException ICompilationUnit createdType getCompilationUnit needsSave isWorkingCopy needsSave SubProgressMonitor JavaModelUtil isCanceled InterruptedException ImportsManager getCompilationUnit getAddedTypes createTypeMembers createdType SubProgressMonitor needsSave SubProgressMonitor removeUnusedImports getAddedTypes needsSave JavaModelUtil ISourceRange createdType getSourceRange IBuffer getBuffer originalContent getText getOffset getLength formattedContent CodeFormatterUtil CodeFormatter K_CLASS_BODY_DECLARATIONS originalContent lineDelimiter getJavaProject getOffset getLength formattedContent isInnerClass fileComment getFileComment fileComment fileComment fileComment lineDelimiter commitWorkingCopy SubProgressMonitor needsSave createdWorkingCopy fCreatedType IType createdType getPrimaryElement fCreatedType createdType createdWorkingCopy createdWorkingCopy discardWorkingCopy
private void remove Unused Imports I Compilation Unit cu Set added Types boolean needs Save throws Core Exception AST Parser parser AST Parser new Parser AST JLS2 parser set Source cu parser set Resolve Bindings true Compilation Unit root Compilation Unit parser createAST null I Problem problems root get Problems Array List res new Array List for int i 0 i problems length i int id problems i getID if id I Problem Unused Import id I Problem Import Not Visible not visibles hide unused remove both String imp problems i get Arguments 0 res add imp if res is Empty Imports Manager imports new Imports Manager cu added Types for int i 0 i res size i String curr String res get i imports remove Import curr imports create needs Save null  removeUnusedImports ICompilationUnit addedTypes needsSave CoreException ASTParser ASTParser newParser setSource setResolveBindings CompilationUnit CompilationUnit IProblem getProblems ArrayList ArrayList IProblem UnusedImport IProblem ImportNotVisible getArguments isEmpty ImportsManager ImportsManager addedTypes removeImport needsSave
Uses the New Java file template from the code template page to generate a compilation unit with the given type content param cu The new created compilation unit param type Content The content of the type including signature and type body param line Delimiter The line delimiter to be used return String Returns the result of evaluating the new file template with the given type content throws Core Exception since 2 1 protected String constructCU Content I Compilation Unit cu String type Content String line Delimiter throws Core Exception String type Comment get Type Comment cu line Delimiter I Package Fragment pack I Package Fragment cu get Parent String content Code Generation get Compilation Unit Content cu type Comment type Content line Delimiter if content null AST Parser parser AST Parser new Parser AST JLS2 parser set Source content to Char Array Compilation Unit unit Compilation Unit parser createAST null if pack is Default Package unit get Package null unit types is Empty return content String Buffer buf new String Buffer if pack is Default Package buf append package append pack get Element Name append NON NLS 1 buf append line Delimiter append line Delimiter if type Comment null buf append type Comment append line Delimiter buf append type Content return buf to String  typeContent lineDelimiter CoreException constructCUContent ICompilationUnit typeContent lineDelimiter CoreException typeComment getTypeComment lineDelimiter IPackageFragment IPackageFragment getParent CodeGeneration getCompilationUnitContent typeComment typeContent lineDelimiter ASTParser ASTParser newParser setSource toCharArray CompilationUnit CompilationUnit isDefaultPackage getPackage isEmpty StringBuffer StringBuffer isDefaultPackage getElementName lineDelimiter lineDelimiter typeComment typeComment lineDelimiter typeContent toString
Returns the created type The method only returns a valid type after code create Type code has been called return the created type see create Type I Progress Monitor public I Type get Created Type return f Created Type  createType createType IProgressMonitor IType getCreatedType fCreatedType
private void write Super Class String Buffer buf Imports Manager imports String typename get Super Class if f Is Class typename length 0 java lang Object equals typename NON NLS 1 buf append extends NON NLS 1 String qualified Name f Super Class null Java Model Util get Fully Qualified Name f Super Class typename buf append imports add Import qualified Name  writeSuperClass StringBuffer ImportsManager getSuperClass fIsClass qualifiedName fSuperClass JavaModelUtil getFullyQualifiedName fSuperClass addImport qualifiedName
private void write Super Interfaces String Buffer buf Imports Manager imports List interfaces get Super Interfaces int last interfaces size 1 if last 0 if f Is Class buf append implements NON NLS 1 else buf append extends NON NLS 1 for int i 0 i last i String typename String interfaces get i buf append imports add Import typename if i last buf append  writeSuperInterfaces StringBuffer ImportsManager getSuperInterfaces fIsClass addImport
private String construct Type Stub Imports Manager imports String line Delimiter String Buffer buf new String Buffer int modifiers get Modifiers buf append Flags to String modifiers if modifiers 0 buf append buf append f Is Class class interface NON NLS 2 NON NLS 1 buf append get Type Name write Super Class buf imports write Super Interfaces buf imports buf append buf append line Delimiter buf append line Delimiter buf append buf append line Delimiter return buf to String  constructTypeStub ImportsManager lineDelimiter StringBuffer StringBuffer getModifiers toString fIsClass getTypeName writeSuperClass writeSuperInterfaces lineDelimiter lineDelimiter lineDelimiter toString
Hook method that gets called from code create Type code to support adding of unanticipated methods fields and inner types to the created type p Implementers can use any methods defined on code I Type code to manipulate the new type p p The source code of the new type will be formatted using the platform s formatter Needed imports are added by the wizard at the end of the type creation process using the given import manager p param new Type the new type created via code create Type code param imports an import manager which can be used to add new imports param monitor a progress monitor to report progress Must not be code null code see create Type I Progress Monitor protected void create Type Members I Type new Type Imports Manager imports I Progress Monitor monitor throws Core Exception call for compatibility create Type Members new Type I Imports Structure imports monitor default implementation does nothing example would be String main Mathod public void foo Vector vec created Type create Method main null false null imports add Import java lang Vector  createType IType newType createType createType IProgressMonitor createTypeMembers IType newType ImportsManager IProgressMonitor CoreException createTypeMembers newType IImportsStructure mainMathod createdType createMethod addImport
deprecated Overwrite create Type Members I Type I Imports Manager I Progress Monitor instead protected void create Type Members I Type new Type I Imports Structure imports I Progress Monitor monitor throws Core Exception deprecated if false throw new Core Exception JavaUI Status create Error I Status ERROR null  createTypeMembers IType IImportsManager IProgressMonitor createTypeMembers IType newType IImportsStructure IProgressMonitor CoreException CoreException JavaUIStatus createError IStatus
deprecated Instead of file templates the new type code template specifies the stub for a compilation unit protected String get File Comment I Compilation Unit parentCU return null  getFileComment ICompilationUnit
private boolean is Valid Comment String template I Scanner scanner Tool Factory create Scanner true false false false scanner set Source template to Char Array try int next scanner get Next Token while Token Scanner is Comment next next scanner get Next Token return next I Terminal Symbols Token NameEOF catch Invalid Input Exception e return false  isValidComment IScanner ToolFactory createScanner setSource toCharArray getNextToken TokenScanner isComment getNextToken ITerminalSymbols TokenNameEOF InvalidInputException
Hook method that gets called from code create Type code to retrieve a type comment This default implementation returns the content of the type comment template param parentCU the parent compilation unit param line Delimiter the line delimiter to use return the type comment or code null code if a type comment is not desired since 3 0 protected String get Type Comment I Compilation Unit parentCU String line Delimiter try String Buffer type Name new String Buffer if is Enclosing Type Selected type Name append Java Model Util get Type Qualified Name get Enclosing Type append type Name append get Type Name String comment Code Generation get Type Comment parentCU type Name to String line Delimiter if comment null is Valid Comment comment return comment catch Core Exception e Java Plugin log e return null  createType lineDelimiter getTypeComment ICompilationUnit lineDelimiter StringBuffer typeName StringBuffer isEnclosingTypeSelected typeName JavaModelUtil getTypeQualifiedName getEnclosingType typeName getTypeName CodeGeneration getTypeComment typeName toString lineDelimiter isValidComment CoreException JavaPlugin
deprecated Use get Type Comment I Compilation Unit String protected String get Type Comment I Compilation Unit parentCU if Preference Constants get Preference Store get Boolean Preference Constants CODEGEN ADD COMMENTS return get Type Comment parentCU String value Of n return null  getTypeComment ICompilationUnit getTypeComment ICompilationUnit PreferenceConstants getPreferenceStore getBoolean PreferenceConstants CODEGEN_ADD_COMMENTS getTypeComment valueOf
deprecated Use get Template String I Compilation Unit int protected String get Template String name I Compilation Unit parentCU return get Template name parentCU 0  getTemplate ICompilationUnit getTemplate ICompilationUnit getTemplate
Returns the string resulting from evaluation the given template in the context of the given compilation unit This accesses the normal template page not the code templates To use code templates use code constructCU Content code to construct a compilation unit stub or get Type Comment for the comment of the type param name the template to be evaluated param parentCU the templates evaluation context param pos a source offset into the parent compilation unit The template is evaluated at the given source offset protected String get Template String name I Compilation Unit parentCU int pos try Template template Java Plugin get Default get Template Store find Template name if template null return Java Context evaluate Template template parentCU pos catch Core Exception e Java Plugin log e catch Bad Location Exception e Java Plugin log e catch Template Exception e Java Plugin log e return null  constructCUContent getTypeComment getTemplate ICompilationUnit JavaPlugin getDefault getTemplateStore findTemplate JavaContext evaluateTemplate CoreException JavaPlugin BadLocationException JavaPlugin TemplateException JavaPlugin
Creates the bodies of all unimplemented methods and constructors and adds them to the type Method is typically called by implementers of code New Type Wizard Page code to add needed method and constructors param type the type for which the new methods and constructor are to be created param do Constructors if code true code unimplemented constructors are created param do Unimplemented Methods if code true code unimplemented methods are created param imports an import manager to add all needed import statements param monitor a progress monitor to report progress return the created methods throws Core Exception thrown when the creation fails protected I Method create Inherited Methods I Type type boolean do Constructors boolean do Unimplemented Methods Imports Manager imports I Progress Monitor monitor throws Core Exception Array List new Methods new Array List I Type Hierarchy hierarchy null Code Generation Settings settings Java Preferences Settings get Code Generation Settings if do Constructors hierarchy type new Supertype Hierarchy monitor I Type superclass hierarchy get Superclass type if superclass null String constructors Stub Utility eval Constructors type superclass settings imports if constructors null for int i 0 i constructors length i new Methods add constructors i if do Unimplemented Methods if hierarchy null hierarchy type new Supertype Hierarchy monitor String unimplemented Stub Utility eval Unimplemented Methods type hierarchy false settings imports if unimplemented null for int i 0 i unimplemented length i new Methods add unimplemented i I Method created Methods new I Method new Methods size for int i 0 i new Methods size i String content String new Methods get i n content will be formatted OK to use n created Methods i type create Method content null false null return created Methods  NewTypeWizardPage doConstructors doUnimplementedMethods CoreException IMethod createInheritedMethods IType doConstructors doUnimplementedMethods ImportsManager IProgressMonitor CoreException ArrayList newMethods ArrayList ITypeHierarchy CodeGenerationSettings JavaPreferencesSettings getCodeGenerationSettings doConstructors newSupertypeHierarchy IType getSuperclass StubUtility evalConstructors newMethods doUnimplementedMethods newSupertypeHierarchy StubUtility evalUnimplementedMethods newMethods IMethod createdMethods IMethod newMethods newMethods newMethods createdMethods createMethod createdMethods
deprecated Use create Inherited Methods I Type boolean boolean I Imports Manager I Progress Monitor protected I Method create Inherited Methods I Type type boolean do Constructors boolean do Unimplemented Methods I Imports Structure imports I Progress Monitor monitor throws Core Exception return create Inherited Methods type do Constructors do Unimplemented Methods new Imports Manager imports monitor  createInheritedMethods IType IImportsManager IProgressMonitor IMethod createInheritedMethods IType doConstructors doUnimplementedMethods IImportsStructure IProgressMonitor CoreException createInheritedMethods doConstructors doUnimplementedMethods ImportsManager
return new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try if monitor null monitor new Null Progress Monitor create Type monitor catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException NullProgressMonitor createType CoreException InvocationTargetException
Returns the runnable that creates the type using the current settings The returned runnable must be executed in the UI thread return the runnable to create the new type public I Runnable With Progress get Runnable return new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try if monitor null monitor new Null Progress Monitor create Type monitor catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress getRunnable IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException NullProgressMonitor createType CoreException InvocationTargetException

public abstract class Abstract Group Marker extends Contribution Item Constructor for use by subclasses protected Abstract Group Marker  AbstractGroupMarker ContributionItem AbstractGroupMarker
Create a new group marker with the given name The group name must not be code null code or the empty string The group name is also used as the item id param group Name the name of the group protected Abstract Group Marker String group Name super group Name Assert is True group Name null group Name length 0  groupName AbstractGroupMarker groupName groupName isTrue groupName groupName
Returns the group name return the group name public String get Group Name return get Id  getGroupName getId
The code Abstract Group Marker code implementation of this code I Contribution Item code method returns code true code iff the id is not code null code Subclasses may override public boolean is Group Marker return get Id null  AbstractGroupMarker IContributionItem isGroupMarker getId

private static final Boolean VAL TOGGLE BTN OFF Boolean FALSE private static final I Menu Creator VAL DROP DOWN MENU new I Menu Creator public void dispose do nothing  VAL_TOGGLE_BTN_OFF IMenuCreator VAL_DROP_DOWN_MENU IMenuCreator
do nothing public Menu get Menu Control parent do nothing return null  getMenu
return null 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
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 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 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 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 fire Property Change RESULT null Boolean value Of success  IAction IAction notifyResult firePropertyChange valueOf

Constructs a new instance of code Hashable Weak Reference code param referent The object to refer to may be code null code param reference Queue The reference queue to use should not be code null code private Hashable Weak Reference final Object referent final Reference Queue reference Queue super referent reference Queue  HashableWeakReference referenceQueue HashableWeakReference ReferenceQueue referenceQueue referenceQueue
see Object hash Code public final int hash Code final Object referent get if referent null return super hash Code return referent hash Code  hashCode hashCode hashCode hashCode
see Object equals java lang Object public final boolean equals Object object final Object referent get if referent null return super equals object if object instanceof Hashable Weak Reference object Hashable Weak Reference object get return referent equals object  HashableWeakReference HashableWeakReference
Constructs a new instance of code Reference Cleaner Thread code param reference Queue The reference queue to check for garbage mmmmm garbage This value must not be code null code param map The map to check for values must not be code null code It is expected that the keys are code Reference code instances The values are expected to be code Image code objects but it is okay if they are not private Reference Cleaner Thread final Reference Queue reference Queue final Map map super Reference Cleaner threads NON NLS 1 if reference Queue null throw new Null Pointer Exception The reference queue should not be null NON NLS 1 if map null throw new Null Pointer Exception The map should not be null NON NLS 1 this end Marker new Weak Reference reference Queue reference Queue this reference Queue reference Queue this map map  ReferenceCleanerThread referenceQueue ReferenceCleanerThread ReferenceQueue referenceQueue referenceQueue NullPointerException NullPointerException endMarker WeakReference referenceQueue referenceQueue referenceQueue referenceQueue
Tells this thread to stop trying to clean up This is usually run when the cache is shutting down private final void stop Cleaning end Marker enqueue  stopCleaning endMarker
public void run final Image image Image value if image is Disposed image dispose  isDisposed
Waits for new garbage When new garbage arriving it removes it clears it and disposes of any corresponding images public final void run while true Get the next reference to dispose Reference reference null try reference reference Queue remove catch final Interrupted Exception e Reference will be null Check to see if we ve been told to stop if reference end Marker break Remove the image and dispose it final Object value map remove reference if value instanceof Image Display get Current sync Exec new Runnable public void run final Image image Image value if image is Disposed image dispose Clear the reference if reference null reference clear  referenceQueue InterruptedException endMarker getCurrent syncExec isDisposed
Constructs a new instance of code Image Cache code and starts a couple of threads to monitor the reference queues private Image Cache grey Cleaner new Reference Cleaner Thread grey Reference Queue grey Map image Cleaner new Reference Cleaner Thread image Reference Queue image Map grey Cleaner start image Cleaner start  ImageCache ImageCache greyCleaner ReferenceCleanerThread greyReferenceQueue greyMap imageCleaner ReferenceCleanerThread imageReferenceQueue imageMap greyCleaner imageCleaner
Cleans up all images in the cache This disposes of all of the images and drops references to them This should only be called when all of the action contribution items are disappearing private final void dispose Clean up the missing image if missing Image null missing Image is Disposed missing Image dispose missing Image null Stop the image cleaner thread clear all of the weak references and dispose of all of the images image Cleaner stop Cleaning final Iterator image Itr image Map entry Set iterator while image Itr has Next final Map Entry entry Map Entry image Itr next final Weak Reference reference Weak Reference entry get Key reference clear final Image image Image entry get Value if image null image is Disposed image dispose image Map clear Stop the greyed image cleaner thread clear all of the weak references and dispose of all of the greyed images grey Cleaner stop Cleaning final Iterator grey Itr grey Map entry Set iterator while grey Itr has Next final Map Entry entry Map Entry grey Itr next final Weak Reference reference Weak Reference entry get Key reference clear final Image image Image entry get Value if image null image is Disposed image dispose grey Map clear  missingImage missingImage isDisposed missingImage missingImage imageCleaner stopCleaning imageItr imageMap entrySet imageItr hasNext imageItr WeakReference WeakReference getKey getValue isDisposed imageMap greyCleaner stopCleaning greyItr greyMap entrySet greyItr hasNext greyItr WeakReference WeakReference getKey getValue isDisposed greyMap
Returns the greyed image i e disabled for the given image descriptor This caches the result so that future attempts to get the greyed image for the same descriptor will only access the cache When the last reference to the image descriptor is dropped the image will be cleaned up This clean up makes no time guarantees about how long this will take param descriptor The image descriptor for which a greyed image should be created may be code null code return The greyed image either newly created or from the cache This value is code null code if the parameter passed in is code null code private final Image get Gray Image final Image Descriptor descriptor if descriptor null return null Try to load a cached image final Hashable Weak Reference key new Hashable Weak Reference descriptor image Reference Queue final Object value grey Map get key if value instanceof Image key clear return Image value Try to create a grey image from the regular image final Image image get Image descriptor if image null final Image grey Image new Image null image SWT IMAGE GRAY grey Map put key grey Image return grey Image All attempts have failed return null  getGrayImage ImageDescriptor HashableWeakReference HashableWeakReference imageReferenceQueue greyMap getImage greyImage IMAGE_GRAY greyMap greyImage greyImage
Returns the regular image i e enabled for the given image descriptor This caches the result so that future attempts to get the image for the same descriptor will only access the cache When the last reference to the image descriptor is dropped the image will be cleaned up This clean up makes no time guarantees about how long this will take param descriptor The image descriptor for which an image should be created may be code null code return The image either newly created or from the cache This value is code null code if the parameter passed in is code null code private final Image get Image final Image Descriptor descriptor if descriptor null return null Try to load the cached value final Hashable Weak Reference key new Hashable Weak Reference descriptor image Reference Queue final Object value image Map get key if value instanceof Image key clear return Image value Use the descriptor to create the image final Image image descriptor create Image image Map put key image return image  getImage ImageDescriptor HashableWeakReference HashableWeakReference imageReferenceQueue imageMap createImage imageMap
Returns the image to display when no image can be found or none is specified This image is only disposed when the cache is disposed return The image to display for missing images This value will never be code null code private final Image get Missing Image if missing Image null missing Image get Image Image Descriptor get Missing Image Descriptor return missing Image  getMissingImage missingImage missingImage getImage ImageDescriptor getMissingImageDescriptor missingImage
Returns whether color icons should be used in toolbars return code true code if color icons should be used in toolbars code false code otherwise public static boolean get Use Color Icons In Toolbars return USE COLOR ICONS  getUseColorIconsInToolbars USE_COLOR_ICONS
Sets whether color icons should be used in toolbars param use Color Icons code true code if color icons should be used in toolbars code false code otherwise public static void set Use Color Icons In Toolbars boolean use Color Icons USE COLOR ICONS use Color Icons  useColorIcons setUseColorIconsInToolbars useColorIcons USE_COLOR_ICONS useColorIcons
see I Property Change Listener property Change Property Change Event public void property Change Property Change Event event update event get Property  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent getProperty
private final I Property Change Listener property Listener new I Property Change Listener public void property Change Property Change Event event action Property Change event  IPropertyChangeListener propertyListener IPropertyChangeListener propertyChange PropertyChangeEvent actionPropertyChange
Creates a new contribution item from the given action The id of the action is used as the id of the item param action the action public Action Contribution Item I Action action super action get Id this action action  ActionContributionItem IAction getId
else display async Exec new Runnable public void run update e get Property  asyncExec getProperty
Handles a property change event on the action forwarded by nested listener private void action Property Change final Property Change Event e This code should be removed Avoid using free async Exec if is Visible widget null Display display widget get Display if display get Thread Thread current Thread update e get Property else display async Exec new Runnable public void run update e get Property  actionPropertyChange PropertyChangeEvent asyncExec isVisible getDisplay getThread currentThread getProperty asyncExec getProperty
Compares this action contribution item with another object Two action contribution items are equal if they refer to the identical Action public boolean equals Object o if o instanceof Action Contribution Item return false return action equals Action Contribution Item o action  ActionContributionItem ActionContributionItem
The code Action Contribution Item code implementation of this code I Contribution Item code method creates an SWT code Button code for the action using the action s style If the action s checked property has been set the button is created and primed to the value of the checked property public void fill Composite parent if widget null parent null int flags SWT PUSH if action null if action get Style I Action AS CHECK BOX flags SWT TOGGLE if action get Style I Action AS RADIO BUTTON flags SWT RADIO Button b new Button parent flags b set Data this b add Listener SWT Dispose get Button Listener Don t hook a dispose listener on the parent b add Listener SWT Selection get Button Listener if action get Help Listener null b add Help Listener action get Help Listener widget b update null Attach some extra listeners action add Property Change Listener property Listener if action null String command Id action get Action Definition Id External Action Manager I Callback callback External Action Manager get Instance get Callback if callback null command Id null callback add Property Change Listener command Id action Text Listener  ActionContributionItem IContributionItem getStyle IAction AS_CHECK_BOX getStyle IAction AS_RADIO_BUTTON setData addListener getButtonListener addListener getButtonListener getHelpListener addHelpListener getHelpListener addPropertyChangeListener propertyListener commandId getActionDefinitionId ExternalActionManager ICallback ExternalActionManager getInstance getCallback commandId addPropertyChangeListener commandId actionTextListener
The code Action Contribution Item code implementation of this code I Contribution Item code method creates an SWT code Menu Item code for the action using the action s style If the action s checked property has been set a button is created and primed to the value of the checked property If the action s menu creator property has been set a cascading submenu is created public void fill Menu parent int index if widget null parent null Menu sub Menu null int flags SWT PUSH if action null int style action get Style if style I Action AS CHECK BOX flags SWT CHECK else if style I Action AS RADIO BUTTON flags SWT RADIO else if style I Action AS DROP DOWN MENU I Menu Creator mc action get Menu Creator if mc null sub Menu mc get Menu parent flags SWT CASCADE Menu Item mi null if index 0 mi new Menu Item parent flags index else mi new Menu Item parent flags widget mi mi set Data this mi add Listener SWT Dispose get Menu Item Listener mi add Listener SWT Selection get Menu Item Listener if action get Help Listener null mi add Help Listener action get Help Listener if sub Menu null mi set Menu sub Menu update null Attach some extra listeners action add Property Change Listener property Listener if action null String command Id action get Action Definition Id External Action Manager I Callback callback External Action Manager get Instance get Callback if callback null command Id null callback add Property Change Listener command Id action Text Listener  ActionContributionItem IContributionItem MenuItem subMenu getStyle IAction AS_CHECK_BOX IAction AS_RADIO_BUTTON IAction AS_DROP_DOWN_MENU IMenuCreator getMenuCreator subMenu getMenu MenuItem MenuItem MenuItem setData addListener getMenuItemListener addListener getMenuItemListener getHelpListener addHelpListener getHelpListener subMenu setMenu subMenu addPropertyChangeListener propertyListener commandId getActionDefinitionId ExternalActionManager ICallback ExternalActionManager getInstance getCallback commandId addPropertyChangeListener commandId actionTextListener
The code Action Contribution Item code implementation of this code I Contribution Item code method creates an SWT code Tool Item code for the action using the action s style If the action s checked property has been set a button is created and primed to the value of the checked property If the action s menu creator property has been set a drop down tool item is created public void fill Tool Bar parent int index if widget null parent null int flags SWT PUSH if action null int style action get Style if style I Action AS CHECK BOX flags SWT CHECK else if style I Action AS RADIO BUTTON flags SWT RADIO else if style I Action AS DROP DOWN MENU flags SWT DROP DOWN Tool Item ti null if index 0 ti new Tool Item parent flags index else ti new Tool Item parent flags ti set Data this ti add Listener SWT Selection get Tool Item Listener ti add Listener SWT Dispose get Tool Item Listener widget ti update null Attach some extra listeners action add Property Change Listener property Listener if action null String command Id action get Action Definition Id External Action Manager I Callback callback External Action Manager get Instance get Callback if callback null command Id null callback add Property Change Listener command Id action Text Listener  ActionContributionItem IContributionItem ToolItem ToolBar getStyle IAction AS_CHECK_BOX IAction AS_RADIO_BUTTON IAction AS_DROP_DOWN_MENU DROP_DOWN ToolItem ToolItem ToolItem setData addListener getToolItemListener addListener getToolItemListener addPropertyChangeListener propertyListener commandId getActionDefinitionId ExternalActionManager ICallback ExternalActionManager getInstance getCallback commandId addPropertyChangeListener commandId actionTextListener
Returns the action associated with this contribution item return the action public I Action get Action return action  IAction getAction
button Listener new Listener public void handle Event Event event switch event type case SWT Dispose handle Widget Dispose event break case SWT Selection Widget ew event widget if ew null handle Widget Selection event Button ew get Selection break  buttonListener handleEvent handleWidgetDispose handleWidgetSelection getSelection
Returns the listener for SWT button widget events return a listener for button events private Listener get Button Listener if button Listener null button Listener new Listener public void handle Event Event event switch event type case SWT Dispose handle Widget Dispose event break case SWT Selection Widget ew event widget if ew null handle Widget Selection event Button ew get Selection break return button Listener  getButtonListener buttonListener buttonListener handleEvent handleWidgetDispose handleWidgetSelection getSelection buttonListener
display dispose Exec new Runnable public void run if global Image Cache null global Image Cache dispose global Image Cache null  disposeExec globalImageCache globalImageCache globalImageCache
Returns the image cache The cache is global and is shared by all action contribution items This has the disadvantage that once an image is allocated it is never freed until the display is disposed However it has the advantage that the same image in different contribution managers is only ever created once private static Image Cache get Image Cache Image Cache cache global Image Cache if cache null global Image Cache cache new Image Cache Display display Display get Default if display null display dispose Exec new Runnable public void run if global Image Cache null global Image Cache dispose global Image Cache null return cache  ImageCache getImageCache ImageCache globalImageCache globalImageCache ImageCache getDefault disposeExec globalImageCache globalImageCache globalImageCache
menu Item Listener new Listener public void handle Event Event event switch event type case SWT Dispose handle Widget Dispose event break case SWT Selection Widget ew event widget if ew null handle Widget Selection event Menu Item ew get Selection break  menuItemListener handleEvent handleWidgetDispose handleWidgetSelection MenuItem getSelection
Returns the listener for SWT menu item widget events return a listener for menu item events private Listener get Menu Item Listener if menu Item Listener null menu Item Listener new Listener public void handle Event Event event switch event type case SWT Dispose handle Widget Dispose event break case SWT Selection Widget ew event widget if ew null handle Widget Selection event Menu Item ew get Selection break return menu Item Listener  getMenuItemListener menuItemListener menuItemListener handleEvent handleWidgetDispose handleWidgetSelection MenuItem getSelection menuItemListener
Returns the presentation mode which is the bitwise or of the code MODE  code constants The default mode setting is 0 meaning that for menu items both text and image are shown if present but for tool items the text is shown only if there is no image return the presentation mode settings since 3 0 public int get Mode return mode  MODE_ getMode
tool Item Listener new Listener public void handle Event Event event switch event type case SWT Dispose handle Widget Dispose event break case SWT Selection Widget ew event widget if ew null handle Widget Selection event Tool Item ew get Selection break  toolItemListener handleEvent handleWidgetDispose handleWidgetSelection ToolItem getSelection
Returns the listener for SWT tool item widget events return a listener for tool item events private Listener get Tool Item Listener if tool Item Listener null tool Item Listener new Listener public void handle Event Event event switch event type case SWT Dispose handle Widget Dispose event break case SWT Selection Widget ew event widget if ew null handle Widget Selection event Tool Item ew get Selection break return tool Item Listener  getToolItemListener toolItemListener toolItemListener handleEvent handleWidgetDispose handleWidgetSelection ToolItem getSelection toolItemListener
Handles a widget dispose event for the widget corresponding to this item private void handle Widget Dispose Event e Check if our widget is the one being disposed if e widget widget Dispose of the menu creator if action get Style I Action AS DROP DOWN MENU I Menu Creator mc action get Menu Creator if mc null mc dispose Unhook all of the listeners action remove Property Change Listener property Listener if action null String command Id action get Action Definition Id External Action Manager I Callback callback External Action Manager get Instance get Callback if callback null command Id null callback remove Property Change Listener command Id action Text Listener Clear the widget field widget null  handleWidgetDispose getStyle IAction AS_DROP_DOWN_MENU IMenuCreator getMenuCreator removePropertyChangeListener propertyListener commandId getActionDefinitionId ExternalActionManager ICallback ExternalActionManager getInstance getCallback commandId removePropertyChangeListener commandId actionTextListener
Handles a widget selection event private void handle Widget Selection Event e boolean selection Widget item e widget if item null int style item get Style if style SWT TOGGLE SWT CHECK 0 if action get Style I Action AS CHECK BOX action set Checked selection else if style SWT RADIO 0 if action get Style I Action AS RADIO BUTTON action set Checked selection else if style SWT DROP DOWN 0 if e detail 4 on drop down button if action get Style I Action AS DROP DOWN MENU I Menu Creator mc action get Menu Creator Tool Item ti Tool Item item we create the menu as a sub menu of dummy so that we can use it in a cascading menu too If created on a SWT control we would get an SWT error Menu dummy new Menu ti get Parent Menu m mc get Menu dummy dummy dispose if mc null Menu m mc get Menu ti get Parent if m null position the menu below the drop down item Rectangle b ti get Bounds Point p ti get Parent to Display new Point b x b y b height m set Location p x p y waiting for SWT 0 42 m set Visible true return we don t fire the action Ensure action is enabled first See 1GAN3M6 ITPUI WINNT Any I Action in the workbench can be executed while disabled if action is Enabled boolean trace Policy TRACE ACTIONS long ms System current Time Millis if trace System out println Running action action get Text NON NLS 1 action run With Event e if trace System out println System current Time Millis ms ms to run action action get Text NON NLS 1  handleWidgetSelection getStyle getStyle IAction AS_CHECK_BOX setChecked getStyle IAction AS_RADIO_BUTTON setChecked DROP_DOWN getStyle IAction AS_DROP_DOWN_MENU IMenuCreator getMenuCreator ToolItem ToolItem getParent getMenu getMenu getParent getBounds getParent toDisplay setLocation setVisible IAction isEnabled TRACE_ACTIONS currentTimeMillis getText runWithEvent currentTimeMillis getText
Method declared on Object public int hash Code return action hash Code  hashCode hashCode
Returns whether the given action has any images param action To Check the action return code true code if the action has any images code false code if not private boolean has Images I Action action To Check return action To Check get Image Descriptor null action To Check get Hover Image Descriptor null action To Check get Disabled Image Descriptor null  actionToCheck hasImages IAction actionToCheck actionToCheck getImageDescriptor actionToCheck getHoverImageDescriptor actionToCheck getDisabledImageDescriptor
Returns whether the command corresponding to this action is active private boolean is Command Active I Action action To Check get Action if action To Check null String command Id action To Check get Action Definition Id External Action Manager I Callback callback External Action Manager get Instance get Callback if callback null return callback is Active command Id return true  isCommandActive IAction actionToCheck getAction actionToCheck commandId actionToCheck getActionDefinitionId ExternalActionManager ICallback ExternalActionManager getInstance getCallback isActive commandId
The action item implementation of this code I Contribution Item code method returns code true code for menu items and code false code for everything else public boolean is Dynamic if widget instanceof Menu Item Optimization Only recreate the item is the check or radio style has changed boolean item Is Check widget get Style SWT CHECK 0 boolean action Is Check get Action null get Action get Style I Action AS CHECK BOX boolean item Is Radio widget get Style SWT RADIO 0 boolean action Is Radio get Action null get Action get Style I Action AS RADIO BUTTON return item Is Check action Is Check item Is Radio action Is Radio return false  IContributionItem isDynamic MenuItem itemIsCheck getStyle actionIsCheck getAction getAction getStyle IAction AS_CHECK_BOX itemIsRadio getStyle actionIsRadio getAction getAction getStyle IAction AS_RADIO_BUTTON itemIsCheck actionIsCheck itemIsRadio actionIsRadio
Method declared on I Contribution Item public boolean is Enabled return action null action is Enabled  IContributionItem isEnabled isEnabled
Returns code true code if this item is allowed to enable code false code otherwise return if this item is allowed to be enabled since 2 0 protected boolean is Enabled Allowed if get Parent null return true Boolean value get Parent get Overrides get Enabled this return value null true value boolean Value  isEnabledAllowed getParent getParent getOverrides getEnabled booleanValue
The code Action Contribution Item code implementation of this code Contribution Item code method extends the super implementation by also checking whether the command corresponding to this action is active public boolean is Visible return super is Visible is Command Active  ActionContributionItem ContributionItem isVisible isVisible isCommandActive
Sets the presentation mode which is the bitwise or of the code MODE  code constants return the presentation mode settings since 3 0 public void set Mode int mode this mode mode update  MODE_ setMode
The action item implementation of this code I Contribution Item code method calls code update null code public final void update update null  IContributionItem
Synchronizes the UI with the given property param property Name the name of the property or code null code meaning all applicable properties public void update String property Name if widget null determine what to do boolean text Changed property Name null property Name equals I Action TEXT boolean image Changed property Name null property Name equals I Action IMAGE boolean tooltip Text Changed property Name null property Name equals I Action TOOL TIP TEXT boolean enable State Changed property Name null property Name equals I Action ENABLED property Name equals I Contribution Manager Overrides P ENABLED boolean check Changed action get Style I Action AS CHECK BOX action get Style I Action AS RADIO BUTTON property Name null property Name equals I Action CHECKED if widget instanceof Tool Item Tool Item ti Tool Item widget String text action get Text the set text is shown only if there is no image or if forced by MODE FORCE TEXT boolean show Text text null get Mode MODE FORCE TEXT 0 has Images action only do the trimming if the text will be used if show Text text null text Action remove Accelerator Text text text Action remove Mnemonics text if text Changed String text To Set show Text text NON NLS 1 boolean right Style ti get Parent get Style SWT RIGHT 0 if right Style ti get Text equals text To Set In addition to being required to update the text if it gets nulled out in the action this is also a workaround for bug 50151 Using SWT RIGHT on a Tool Bar leaves blank space ti set Text text To Set if image Changed only substitute a missing image if it has no text update Images show Text if tooltip Text Changed text Changed String tool Tip action get Tool Tip Text if the text is showing then only set the tooltip if different if show Text tool Tip null tool Tip equals text ti set Tool Tip Text action get Tool Tip Text else ti set Tool Tip Text null if enable State Changed boolean should Be Enabled action is Enabled is Enabled Allowed if ti get Enabled should Be Enabled ti set Enabled should Be Enabled if check Changed boolean bv action is Checked if ti get Selection bv ti set Selection bv return if widget instanceof Menu Item Menu Item mi Menu Item widget if text Changed int accelerator 0 String accelerator Text null I Action updated Action get Action String text null Set the accelerator using the action s accelerator accelerator updated Action get Accelerator Process accelerators on GTK in a special way to avoid Bug 42009 We will override the native input method by allowing these reserved accelerators to be placed on the menu We will only do this for Ctrl Shift A F External Action Manager I Callback callback External Action Manager get Instance get Callback String command Id updated Action get Action Definition Id if SWT get Platform equals gtk NON NLS 1 if callback null command Id null Integer command Accelerator callback get Accelerator command Id if command Accelerator null int accel Int callback get Accelerator command Id int Value if accel Int LOWER GTK ACCEL BOUND accel Int UPPER GTK ACCEL BOUND accelerator accel Int accelerator Text callback get Accelerator Text command Id if accelerator 0 if callback null command Id null accelerator Text callback get Accelerator Text command Id else accelerator Text Action convert Accelerator accelerator I Contribution Manager Overrides overrides null if get Parent null overrides get Parent get Overrides if overrides null text get Parent get Overrides get Text this mi set Accelerator accelerator if text null text updated Action get Text if text null text NON NLS 1 else text Action remove Accelerator Text text if accelerator Text null mi set Text text else mi set Text text t accelerator Text if image Changed update Images false if enable State Changed boolean should Be Enabled action is Enabled is Enabled Allowed if mi get Enabled should Be Enabled mi set Enabled should Be Enabled if check Changed boolean bv action is Checked if mi get Selection bv mi set Selection bv return if widget instanceof Button Button button Button widget if image Changed update Images false text Changed false don t update text if it has an image if text Changed String text action get Text if text null button set Text text if tooltip Text Changed button set Tool Tip Text action get Tool Tip Text if enable State Changed boolean should Be Enabled action is Enabled is Enabled Allowed if button get Enabled should Be Enabled button set Enabled should Be Enabled if check Changed boolean bv action is Checked if button get Selection bv button set Selection bv return  propertyName propertyName textChanged propertyName propertyName IAction imageChanged propertyName propertyName IAction tooltipTextChanged propertyName propertyName IAction TOOL_TIP_TEXT enableStateChanged propertyName propertyName IAction propertyName IContributionManagerOverrides P_ENABLED checkChanged getStyle IAction AS_CHECK_BOX getStyle IAction AS_RADIO_BUTTON propertyName propertyName IAction ToolItem ToolItem ToolItem getText MODE_FORCE_TEXT showText getMode MODE_FORCE_TEXT hasImages showText removeAcceleratorText removeMnemonics textChanged textToSet showText rightStyle getParent getStyle rightStyle getText textToSet ToolBar setText textToSet imageChanged updateImages showText tooltipTextChanged textChanged toolTip getToolTipText showText toolTip toolTip setToolTipText getToolTipText setToolTipText enableStateChanged shouldBeEnabled isEnabled isEnabledAllowed getEnabled shouldBeEnabled setEnabled shouldBeEnabled checkChanged isChecked getSelection setSelection MenuItem MenuItem MenuItem textChanged acceleratorText IAction updatedAction getAction updatedAction getAccelerator ExternalActionManager ICallback ExternalActionManager getInstance getCallback commandId updatedAction getActionDefinitionId getPlatform commandId commandAccelerator getAccelerator commandId commandAccelerator accelInt getAccelerator commandId intValue accelInt LOWER_GTK_ACCEL_BOUND accelInt UPPER_GTK_ACCEL_BOUND accelInt acceleratorText getAcceleratorText commandId commandId acceleratorText getAcceleratorText commandId acceleratorText convertAccelerator IContributionManagerOverrides getParent getParent getOverrides getParent getOverrides getText setAccelerator updatedAction getText removeAcceleratorText acceleratorText setText setText acceleratorText imageChanged updateImages enableStateChanged shouldBeEnabled isEnabled isEnabledAllowed getEnabled shouldBeEnabled setEnabled shouldBeEnabled checkChanged isChecked getSelection setSelection imageChanged updateImages textChanged textChanged getText setText tooltipTextChanged setToolTipText getToolTipText enableStateChanged shouldBeEnabled isEnabled isEnabledAllowed getEnabled shouldBeEnabled setEnabled shouldBeEnabled checkChanged isChecked getSelection setSelection
Updates the images for this action param force Image code true code if some form of image is compulsory and code false code if it is acceptable for this item to have no image return code true code if there are images for this action code false code if not private boolean update Images boolean force Image Image Cache cache get Image Cache if widget instanceof Tool Item if USE COLOR ICONS Image image cache get Image action get Hover Image Descriptor if image null image cache get Image action get Image Descriptor Image disabled Image cache get Image action get Disabled Image Descriptor Make sure there is a valid image if image null force Image image cache get Missing Image performance more efficient in SWT to set disabled and hot image before regular image if disabled Image null Set the disabled image if we were able to create one Assumes that SWT Tool Item will use platform s default behavior to show item when it is disabled and a disabled image has not been set Tool Item widget set Disabled Image disabled Image Tool Item widget set Image image return image null else Image image cache get Image action get Image Descriptor Image hover Image cache get Image action get Hover Image Descriptor Image disabled Image cache get Image action get Disabled Image Descriptor If there is no regular image but there is a hover image convert the hover image to gray and use it as the regular image if image null hover Image null image cache get Gray Image action get Hover Image Descriptor else If there is no hover image use the regular image as the hover image and convert the regular image to gray if hover Image null image null hover Image image image cache get Gray Image action get Image Descriptor Make sure there is a valid image if hover Image null image null force Image image cache get Missing Image performance more efficient in SWT to set disabled and hot image before regular image if disabled Image null Set the disabled image if we were able to create one Assumes that SWT Tool Item will use platform s default behavior to show item when it is disabled and a disabled image has not been set Tool Item widget set Disabled Image disabled Image Tool Item widget set Hot Image hover Image Tool Item widget set Image image return image null else if widget instanceof Item widget instanceof Button Use hover image if there is one otherwise use regular image Image image cache get Image action get Hover Image Descriptor if image null image cache get Image action get Image Descriptor Make sure there is a valid image if image null force Image image cache get Missing Image if widget instanceof Item Item widget set Image image else if widget instanceof Button Button widget set Image image return image null return false  forceImage updateImages forceImage ImageCache getImageCache ToolItem USE_COLOR_ICONS getImage getHoverImageDescriptor getImage getImageDescriptor disabledImage getImage getDisabledImageDescriptor forceImage getMissingImage disabledImage ToolItem ToolItem setDisabledImage disabledImage ToolItem setImage getImage getImageDescriptor hoverImage getImage getHoverImageDescriptor disabledImage getImage getDisabledImageDescriptor hoverImage getGrayImage getHoverImageDescriptor hoverImage hoverImage getGrayImage getImageDescriptor hoverImage forceImage getMissingImage disabledImage ToolItem ToolItem setDisabledImage disabledImage ToolItem setHotImage hoverImage ToolItem setImage getImage getHoverImageDescriptor getImage getImageDescriptor forceImage getMissingImage setImage setImage
Shorten the given text code t code so that its length doesn t exceed the given width The default implementation replaces characters in the center of the original string with an ellipsis Override if you need a different strategy protected String shorten Text String text Value Tool Item item if text Value null return null GC gc new GC item get Display int max Width item get Image get Bounds width 4 if gc text Extent text Value x max Width gc dispose return text Value for int i text Value length i 0 i String test text Value substring 0 i test test ellipsis if gc text Extent test x max Width gc dispose return test gc dispose If for some reason we fall through abort return text Value  shortenText textValue ToolItem textValue getDisplay maxWidth getImage getBounds textExtent textValue maxWidth textValue textValue textValue textExtent maxWidth textValue

private I Contribution Manager parent Creates a contribution item with a code null code id Calls code this String code with code null code protected Contribution Item this null  IContributionManager ContributionItem
Creates a contribution item with the given optional id The given id is used to find items in a contribution manager and for positioning items relative to other items param id the contribution item identifier or code null code protected Contribution Item String id this id id  ContributionItem
The default implementation of this code I Contribution Item code method does nothing Subclasses may override public void dispose  IContributionItem
The default implementation of this code I Contribution Item code method does nothing Subclasses may override public void fill Composite parent  IContributionItem
The default implementation of this code I Contribution Item code method does nothing Subclasses may override public void fill Menu menu int index  IContributionItem
The default implementation of this code I Contribution Item code method does nothing Subclasses may override public void fill Tool Bar parent int index  IContributionItem ToolBar
The default implementation of this code I Contribution Item code method does nothing Subclasses may override since 3 0 public void fill Cool Bar parent int index  IContributionItem CoolBar
The default implementation of this code I Contribution Item code method does nothing Subclasses may override since 3 0 public void save Widget State  IContributionItem saveWidgetState
Method declared on I Contribution Item public String get Id return id  IContributionItem getId
Returns the parent contribution manager return the parent contribution manager since 2 0 public I Contribution Manager get Parent return parent  IContributionManager getParent
The default implementation of this code I Contribution Item code method returns code false code Subclasses may override public boolean is Dirty issue should this be false instead of calling is Dynamic return is Dynamic  IContributionItem isDirty isDynamic isDynamic
The default implementation of this code I Contribution Item code method returns code true code Subclasses may override public boolean is Enabled return true  IContributionItem isEnabled
The default implementation of this code I Contribution Item code method returns code false code Subclasses may override public boolean is Dynamic return false  IContributionItem isDynamic
The default implementation of this code I Contribution Item code method returns code false code Subclasses may override public boolean is Group Marker return false  IContributionItem isGroupMarker
The default implementation of this code I Contribution Item code method returns code false code Subclasses may override public boolean is Separator return false  IContributionItem isSeparator
The default implementation of this code I Contribution Item code method returns the value recorded in an internal state variable which is code true code by default code set Visible code should be used to change this setting public boolean is Visible return visible  IContributionItem setVisible isVisible
The default implementation of this code I Contribution Item code method stores the value in an internal state variable which is code true code by default public void set Visible boolean visible this visible visible  IContributionItem setVisible
Returns a string representation of this contribution item suitable only for debugging public String to String return get Class get Name id get Id NON NLS 2 NON NLS 1  toString getClass getName getId
The default implementation of this code I Contribution Item code method does nothing Subclasses may override public void update  IContributionItem
Method declared on I Contribution Item public void set Parent I Contribution Manager parent this parent parent  IContributionItem setParent IContributionManager
The code Contribution Item code implementation of this method declared on code I Contribution Item code does nothing Subclasses should override to update their state public void update String id  ContributionItem IContributionItem

Creates a new contribution manager protected Contribution Manager Do nothing  ContributionManager
Method declared on I Contribution Manager public void add I Action action add new Action Contribution Item action  IContributionManager IAction ActionContributionItem
public void add I Contribution Item item if allow Item item item set Parent this contributions add item item Added item  IContributionItem allowItem setParent itemAdded
Adds a contribution item to the start or end of the group with the given name param group Name the name of the group param item the contribution item param append code true code to add to the end of the group and code false code to add the beginning of the group exception Illegal Argument Exception if there is no group with the given name private void add To Group String group Name I Contribution Item item boolean append int i Iterator items contributions iterator for i 0 items has Next i I Contribution Item o I Contribution Item items next if o is Group Marker String id o get Id if id null id equals Ignore Case group Name i if append for items has Next i I Contribution Item ci I Contribution Item items next if ci is Group Marker break if allow Item item item set Parent this contributions add i item item Added item return throw new Illegal Argument Exception Group not found group Name NON NLS 1  groupName IllegalArgumentException addToGroup groupName IContributionItem hasNext IContributionItem IContributionItem isGroupMarker getId equalsIgnoreCase groupName hasNext IContributionItem IContributionItem isGroupMarker allowItem setParent itemAdded IllegalArgumentException groupName
Method declared on I Contribution Manager public void append To Group String group Name I Action action add To Group group Name new Action Contribution Item action true  IContributionManager appendToGroup groupName IAction addToGroup groupName ActionContributionItem
Method declared on I Contribution Manager public void append To Group String group Name I Contribution Item item add To Group group Name item true  IContributionManager appendToGroup groupName IContributionItem addToGroup groupName
This method allows subclasses of code Contribution Manager code to prevent certain items in the contributions list code Contribution Manager code will either block or allow an addition based on the result of this method call This can be used to prevent duplication for example param item To Add The contribution item to be added may be code null code return code true code if the addition should be allowed code false code otherwise The default implementation allows all items since 3 0 protected boolean allow Item I Contribution Item item To Add return true  ContributionManager ContributionManager itemToAdd allowItem IContributionItem itemToAdd
Internal debug method for printing statistics about this manager to code System out code protected void dump Statistics int size 0 if contributions null size contributions size System out println this to String System out println Number of elements size NON NLS 1 int sum 0 for int i 0 i size i if I Contribution Item contributions get i is Visible sum System out println Number of visible elements sum NON NLS 1 System out println Is dirty is Dirty NON NLS 1  dumpStatistics toString IContributionItem isVisible isDirty
public I Contribution Item find String id Iterator e contributions iterator while e has Next I Contribution Item item I Contribution Item e next String item Id item get Id if item Id null item Id equals Ignore Case id return item return null  IContributionItem hasNext IContributionItem IContributionItem itemId getId itemId itemId equalsIgnoreCase
public I Contribution Item get Items I Contribution Item items new I Contribution Item contributions size contributions to Array items return items  IContributionItem getItems IContributionItem IContributionItem toArray
if overrides null overrides new I Contribution Manager Overrides public Boolean get Enabled I Contribution Item item return null  IContributionManagerOverrides getEnabled IContributionItem
return null public Integer get Accelerator I Contribution Item item return null  getAccelerator IContributionItem
return null public String get Accelerator Text I Contribution Item item return null  getAcceleratorText IContributionItem
return null public String get Text I Contribution Item item return null  getText IContributionItem
The code Contribution Manager code implementation of this method declared on code I Contribution Manager code returns the current overrides If there is no overrides it lazily creates one which overrides no item state since 2 0 public I Contribution Manager Overrides get Overrides if overrides null overrides new I Contribution Manager Overrides public Boolean get Enabled I Contribution Item item return null public Integer get Accelerator I Contribution Item item return null public String get Accelerator Text I Contribution Item item return null public String get Text I Contribution Item item return null return overrides  ContributionManager IContributionManager IContributionManagerOverrides getOverrides IContributionManagerOverrides getEnabled IContributionItem getAccelerator IContributionItem getAcceleratorText IContributionItem getText IContributionItem
Returns whether this contribution manager contains dynamic items A dynamic contribution item contributes items conditionally dependent on some internal state return code true code if this manager contains dynamic items and code false code otherwise protected boolean has Dynamic Items return dynamic Items 0  hasDynamicItems dynamicItems
Returns the index of the item with the given id return code int code the index or 1 if the item is not found public int index Of String id for int i 0 i contributions size i I Contribution Item item I Contribution Item contributions get i String item Id item get Id if item Id null item Id equals Ignore Case id return i return 1  indexOf IContributionItem IContributionItem itemId getId itemId itemId equalsIgnoreCase
Returns the index of the object in the internal structure This is different from code index Of String id code since some contribution items may not have an id param item the contribution item return the index or 1 if the item is not found since 3 0 protected int index Of I Contribution Item item return contributions index Of item  indexOf indexOf IContributionItem indexOf
Insert the item at the given index public void insert int index I Contribution Item item if index contributions size throw new Index Out Of Bounds Exception inserting item get Id at index NON NLS 1 NON NLS 2 if allow Item item item set Parent this contributions add index item item Added item  IContributionItem IndexOutOfBoundsException getId allowItem setParent itemAdded
Method declared on I Contribution Manager public void insert After String ID I Action action insert After ID new Action Contribution Item action  IContributionManager insertAfter IAction insertAfter ActionContributionItem
public void insert After String ID I Contribution Item item I Contribution Item ci find ID if ci null throw new Illegal Argument Exception can t find ID NON NLS 1 int ix contributions index Of ci if ix 0 System out println insert after ix if allow Item item item set Parent this contributions add ix 1 item item Added item  insertAfter IContributionItem IContributionItem IllegalArgumentException indexOf allowItem setParent itemAdded
Method declared on I Contribution Manager public void insert Before String ID I Action action insert Before ID new Action Contribution Item action  IContributionManager insertBefore IAction insertBefore ActionContributionItem
public void insert Before String ID I Contribution Item item I Contribution Item ci find ID if ci null throw new Illegal Argument Exception can t find ID ID NON NLS 1 int ix contributions index Of ci if ix 0 System out println insert before ix if allow Item item item set Parent this contributions add ix item item Added item  insertBefore IContributionItem IContributionItem IllegalArgumentException indexOf allowItem setParent itemAdded
public boolean is Dirty if is Dirty return true if has Dynamic Items for Iterator iter contributions iterator iter has Next I Contribution Item item I Contribution Item iter next if item is Dirty return true return false  isDirty isDirty hasDynamicItems hasNext IContributionItem IContributionItem isDirty
Method declared on I Contribution Manager public boolean is Empty return contributions is Empty  IContributionManager isEmpty isEmpty
The given item was added to the list of contributions Marks the manager as dirty and updates the number of dynamic items and the memento protected void item Added I Contribution Item item mark Dirty if item is Dynamic dynamic Items  itemAdded IContributionItem markDirty isDynamic dynamicItems
The given item was removed from the list of contributions Marks the manager as dirty and updates the number of dynamic items protected void item Removed I Contribution Item item mark Dirty if item is Dynamic dynamic Items  itemRemoved IContributionItem markDirty isDynamic dynamicItems
Method declared on I Contribution Manager public void mark Dirty set Dirty true  IContributionManager markDirty setDirty
Method declared on I Contribution Manager public void prepend To Group String group Name I Action action add To Group group Name new Action Contribution Item action false  IContributionManager prependToGroup groupName IAction addToGroup groupName ActionContributionItem
Method declared on I Contribution Manager public void prepend To Group String group Name I Contribution Item item add To Group group Name item false  IContributionManager prependToGroup groupName IContributionItem addToGroup groupName
public I Contribution Item remove String ID I Contribution Item ci find ID if ci null return null return remove ci  IContributionItem IContributionItem
public I Contribution Item remove I Contribution Item item if contributions remove item item Removed item return item return null  IContributionItem IContributionItem itemRemoved
public void remove All contributions clear dynamic Items 0 mark Dirty  removeAll dynamicItems markDirty
Replaces the item of the given identifier with another contribution item This can be used for example to replace large contribution items with placeholders to avoid memory leaks If the identifier cannot be found in the current list of items then this does nothing If multiple occurrences are found then the replacement items is put in the first position and the other positions are removed param identifier The identifier to look for in the list of contributions should not be code null code param replacement Item The contribution item to replace the old item must not be code null code Use link org eclipse jface action Contribution Manager remove java lang String remove if that is what you want to do return code true code if the given identifier can be code since 3 0 public boolean replace Item final String identifier final I Contribution Item replacement Item if identifier null return false final int index index Of identifier if index 0 return false couldn t find the item Remove the old item final I Contribution Item old Item I Contribution Item contributions get index item Removed old Item Add the new item contributions set index replacement Item item Added replacement Item throws NPE if replacement Item null Go through and remove duplicates for int i contributions size 1 i index i I Contribution Item item I Contribution Item contributions get i if item null identifier equals item get Id if Policy TRACE TOOLBAR NON NLS 1 System out println Removing duplicate on replace identifier NON NLS 1 contributions remove i item Removed item return true success  replacementItem ContributionManager replaceItem IContributionItem replacementItem indexOf IContributionItem oldItem IContributionItem itemRemoved oldItem replacementItem itemAdded replacementItem replacementItem IContributionItem IContributionItem getId TRACE_TOOLBAR itemRemoved
Sets whether this manager is dirty When dirty the list of contributions is not accurately reflected in the corresponding widgets param dirty code true code if this manager is dirty and code false code if it is up to date protected void set Dirty boolean dirty is Dirty dirty  setDirty isDirty
Sets the overrides for this contribution manager param new Overrides the overrides for the items of this manager since 2 0 public void set Overrides I Contribution Manager Overrides new Overrides overrides new Overrides  newOverrides setOverrides IContributionManagerOverrides newOverrides newOverrides
An internal method for setting the order of the contribution items param items the contribution items in the specified order since 3 0 protected void internal Set Items I Contribution Item items contributions clear for int i 0 i items length i if allow Item items i contributions add items i  internalSetItems IContributionItem allowItem

public abstract class Control Contribution extends Contribution Item Creates a control contribution item with the given id param id the contribution item id protected Control Contribution String id super id  ControlContribution ContributionItem ControlContribution
Computes the width of the given control which is being added to a tool bar This is needed to determine the width of the tool bar item containing the given control p The default implementation of this framework method returns code control compute Size SWT DEFAULT SWT DEFAULT true x code Subclasses may override if required p param control the control being added return the width of the control protected int compute Width Control control return control compute Size SWT DEFAULT SWT DEFAULT true x  computeSize computeWidth computeSize
Creates and returns the control for this contribution item under the given parent composite p This framework method must be implemented by concrete subclasses p param parent the parent composite return the new control 
protected abstract Control create Control Composite parent The control item implementation of this code I Contribution Item code method calls the code create Control code framework method Subclasses must implement code create Control code rather than overriding this method public final void fill Composite parent create Control parent  createControl IContributionItem createControl createControl createControl
The control item implementation of this code I Contribution Item code method throws an exception since controls cannot be added to menus public final void fill Menu parent int index Assert is True false Can t add a control to a menu NON NLS 1  IContributionItem isTrue
The control item implementation of this code I Contribution Item code method calls the code create Control code framework method to create a control under the given parent and then creates a new tool item to hold it Subclasses must implement code create Control code rather than overriding this method public final void fill Tool Bar parent int index Control control create Control parent Tool Item ti new Tool Item parent SWT SEPARATOR index ti set Control control ti set Width compute Width control  IContributionItem createControl createControl ToolBar createControl ToolItem ToolItem setControl setWidth computeWidth

Creates a new cool bar manager with the default style Equivalent to code Cool Bar Manager SWT NONE code public Cool Bar Manager do nothing  CoolBarManager CoolBarManager
Creates a cool bar manager for an existing cool bar control This manager becomes responsible for the control and will dispose of it when the manager is disposed param cool Bar the cool bar control public Cool Bar Manager Cool Bar cool Bar this Assert is Not Null cool Bar this cool Bar cool Bar item Style cool Bar get Style  coolBar CoolBarManager CoolBar coolBar isNotNull coolBar coolBar coolBar itemStyle coolBar getStyle
Creates a cool bar manager with the given SWT style Calling code create Control code will create the cool bar control param style the cool bar item style see link org eclipse swt widgets Cool Bar Cool Bar for for valid style bits public Cool Bar Manager int style item Style style  createControl CoolBar CoolBar CoolBarManager itemStyle
see org eclipse jface action I Cool Bar Manager add org eclipse jface action I Tool Bar Manager public void add I Tool Bar Manager tool Bar Manager Assert is Not Null tool Bar Manager super add new Tool Bar Contribution Item tool Bar Manager  ICoolBarManager IToolBarManager IToolBarManager toolBarManager isNotNull toolBarManager ToolBarContributionItem toolBarManager
Collapses consecutive separators and removes a separator from the beginning and end of the list param contribution List the list of contributions must not be code null code return The contribution list provided with extraneous separators removed this value is never code null code but may be empty private Array List adjust Contribution List Array List contribution List I Contribution Item item Fist remove a separator if it is the first element of the list if contribution List size 0 item I Contribution Item contribution List get 0 if item is Separator contribution List remove 0 List Iterator iterator contribution List list Iterator collapse consecutive separators while iterator has Next item I Contribution Item iterator next if item is Separator while iterator has Next item I Contribution Item iterator next if item is Separator iterator remove else break Now check last element to see if there is a separator item I Contribution Item contribution List get contribution List size 1 if item is Separator contribution List remove contribution List size 1 return contribution List  contributionList ArrayList adjustContributionList ArrayList contributionList IContributionItem contributionList IContributionItem contributionList isSeparator contributionList ListIterator contributionList listIterator hasNext IContributionItem isSeparator hasNext IContributionItem isSeparator IContributionItem contributionList contributionList isSeparator contributionList contributionList contributionList
protected boolean allow Item I Contribution Item item To Add We will allow as many null entries as they like though there should be none if item To Add null return true Null identifiers can be expected in generic contribution items String first Id item To Add get Id if first Id null return true Cycle through the current list looking for duplicates I Contribution Item current Items get Items for int i 0 i current Items length i I Contribution Item current Item current Items i We ignore null entries if current Item null continue String second Id current Item get Id if first Id equals second Id if Policy TRACE TOOLBAR NON NLS 1 System out println Trying to add a duplicate item NON NLS 1 new Exception print Stack Trace System out System out println DONE NON NLS 1 return false return true  allowItem IContributionItem itemToAdd itemToAdd firstId itemToAdd getId firstId IContributionItem currentItems getItems currentItems IContributionItem currentItem currentItems currentItem secondId currentItem getId firstId secondId TRACE_TOOLBAR printStackTrace
Positions the list iterator to the end of all the separators Calling code next code the iterator should return the immediate object following the last separator param iterator the list iterator private void collapse Separators List Iterator iterator while iterator has Next I Contribution Item item I Contribution Item iterator next if item is Separator iterator previous return  collapseSeparators ListIterator hasNext IContributionItem IContributionItem isSeparator
Returns whether the cool bar control has been created and not yet disposed return code true code if the control has been created and not yet disposed code false code otherwise private boolean cool Bar Exist return cool Bar null cool Bar is Disposed  coolBarExist coolBar coolBar isDisposed
Creates and returns this manager s cool bar control Does not create a new control if one already exists param parent the parent control return the cool bar control public Cool Bar create Control Composite parent Assert is Not Null parent if cool Bar Exist cool Bar new Cool Bar parent item Style cool Bar set Menu get Context Menu Control cool Bar set Locked false update false return cool Bar  CoolBar createControl isNotNull coolBarExist coolBar CoolBar itemStyle coolBar setMenu getContextMenuControl coolBar setLocked coolBar
Disposes of this cool bar manager and frees all allocated SWT resources Notifies all contribution items of the dispose Note that this method does not clean up references between this cool bar manager and its associated contribution items Use code remove All code for that purpose public void dispose if cool Bar Exist I Contribution Item items get Items for int i 0 i items length i Disposes of the contribution item If Contribution Item is a toolbar then it will dispose of all the nested contribution items items i dispose cool Bar dispose cool Bar null If a context menu existed then dispose of it if context Menu Manager null context Menu Manager dispose context Menu Manager null  removeAll coolBarExist IContributionItem getItems coolBar coolBar contextMenuManager contextMenuManager contextMenuManager
Disposes the given cool item param item the cool item to dispose private void dispose Cool Item item if item null item is Disposed item set Data null Control control item get Control if the control is already disposed setting the coolitem control to null will cause an SWT exception workaround for 19630 if control null control is Disposed item set Control null item dispose  CoolItem isDisposed setData getControl isDisposed setControl
Finds the cool item associated with the given contribution item param item the contribution item return the associated cool item or code null code if not found private Cool Item find Cool Item I Contribution Item item if cool Bar null return null Cool Item items cool Bar get Items for int i 0 i items length i Cool Item cool Item items i I Contribution Item data I Contribution Item cool Item get Data if data null data equals item return cool Item return null  CoolItem findCoolItem IContributionItem coolBar CoolItem coolBar getItems CoolItem coolItem IContributionItem IContributionItem coolItem getData coolItem
Return a consistent set of wrap indices The return value will always include at least one entry and the first entry will always be zero Cool Bar get Wrap Indices is inconsistent in whether or not it returns an index for the first row param wraps the wrap indicies from the cool bar widget return the adjusted wrap indicies private int get Adjusted Wrap Indices int wraps int adjusted Wrap Indices if wraps length 0 adjusted Wrap Indices new int 0 else if wraps 0 0 adjusted Wrap Indices new int wraps length 1 adjusted Wrap Indices 0 0 for int i 0 i wraps length i adjusted Wrap Indices i 1 wraps i else adjusted Wrap Indices wraps return adjusted Wrap Indices  CoolBar getWrapIndices getAdjustedWrapIndices adjustedWrapIndices adjustedWrapIndices adjustedWrapIndices adjustedWrapIndices adjustedWrapIndices adjustedWrapIndices adjustedWrapIndices
Returns the control of the Menu Manager If the menu manager does not have a control then one is created return menu control associated with manager or null if none private Menu get Context Menu Control if context Menu Manager null cool Bar null Menu menu Widget context Menu Manager get Menu if menu Widget null menu Widget is Disposed menu Widget context Menu Manager create Context Menu cool Bar return menu Widget return null  getContextMenuControl contextMenuManager coolBar menuWidget contextMenuManager getMenu menuWidget menuWidget isDisposed menuWidget contextMenuManager createContextMenu coolBar menuWidget
see org eclipse jface action I Cool Bar Manager is Layout Locked public I Menu Manager get Context Menu Manager return context Menu Manager  ICoolBarManager isLayoutLocked IMenuManager getContextMenuManager contextMenuManager
Returns the cool bar control for this manager return the cool bar control or code null code if none public Cool Bar get Control return cool Bar  CoolBar getControl coolBar
Returns an array list of all the contribution items in the manager return an array list of contribution items private Array List get Item List I Contribution Item cb Items get Items Array List list new Array List cb Items length for int i 0 i cb Items length i list add cb Items i return list  ArrayList getItemList IContributionItem cbItems getItems ArrayList ArrayList cbItems cbItems cbItems
see org eclipse jface action I Cool Bar Manager is Layout Locked public boolean get Lock Layout if cool Bar Exist return false return cool Bar get Locked  ICoolBarManager isLayoutLocked getLockLayout coolBarExist coolBar getLocked
Returns the number of rows that should be displayed visually param items the array of contributin items return the number of rows private int get Num Rows I Contribution Item items int num Rows 1 boolean separator Found false for int i 0 i items length i if items i is Separator separator Found true if separator Found items i is Visible items i is Group Marker items i is Separator num Rows separator Found false return num Rows  getNumRows IContributionItem numRows separatorFound isSeparator separatorFound separatorFound isVisible isGroupMarker isSeparator numRows separatorFound numRows
see org eclipse jface action I Cool Bar Manager get Style public int get Style return item Style  ICoolBarManager getStyle getStyle itemStyle
Subclasses may extend this code Contribution Manager code method but must call code super item Added code see org eclipse jface action Contribution Manager item Added org eclipse jface action I Contribution Item protected void item Added I Contribution Item item Assert is Not Null item super item Added item int inserted At index Of item boolean replaced false final int size cb Items Creation Order size for int i 0 i size i I Contribution Item created I Contribution Item cb Items Creation Order get i if created get Id null created get Id equals item get Id cb Items Creation Order set i item replaced true break if replaced cb Items Creation Order add Math min Math max inserted At 0 cb Items Creation Order size item  ContributionManager itemAdded ContributionManager itemAdded IContributionItem itemAdded IContributionItem isNotNull itemAdded insertedAt indexOf cbItemsCreationOrder IContributionItem IContributionItem cbItemsCreationOrder getId getId getId cbItemsCreationOrder cbItemsCreationOrder insertedAt cbItemsCreationOrder
Subclasses may extend this code Contribution Manager code method but must call code super item Removed code see org eclipse jface action Contribution Manager item Removed org eclipse jface action I Contribution Item protected void item Removed I Contribution Item item Assert is Not Null item super item Removed item Cool Item cool Item find Cool Item item if cool Item null cool Item set Data null  ContributionManager itemRemoved ContributionManager itemRemoved IContributionItem itemRemoved IContributionItem isNotNull itemRemoved CoolItem coolItem findCoolItem coolItem coolItem setData
Positions the list iterator to the starting of the next row By calling next on the returned iterator it will return the first element of the next row param iterator the list iterator of contribution items param ignore Current Item Whether the current item in the iterator should be considered as well as subsequent items private void next Row List Iterator iterator boolean ignore Current Item I Contribution Item current Element null if ignore Current Item iterator has Previous current Element I Contribution Item iterator previous iterator next if current Element null current Element is Separator collapse Separators iterator return else Find next separator while iterator has Next I Contribution Item item I Contribution Item iterator next if item is Separator we we find a separator collapse any consecutive separators and return collapse Separators iterator return  ignoreCurrentItem nextRow ListIterator ignoreCurrentItem IContributionItem currentElement ignoreCurrentItem hasPrevious currentElement IContributionItem currentElement currentElement isSeparator collapseSeparators hasNext IContributionItem IContributionItem isSeparator collapseSeparators
Synchronizes the visual order of the cool items in the control with this manager s internal data structures This method should be called before requesting the order of the contribution items to ensure that the order is accurate p Note that code update code and code refresh code are converses code update code changes the visual order to match the internal structures and code refresh code changes the internal structures to match the visual order p public void refresh if cool Bar Exist return Retreives the list of contribution items as an array list Array List contribution List get Item List Check the size of the list if contribution List size 0 return The list of all the cool items in their visual order Cool Item cool Items cool Bar get Items The wrap indicies of the coolbar int wrap Indicies get Adjusted Wrap Indices cool Bar get Wrap Indices int row 0 int cool Item Index 0 Traverse through all cool items in the coolbar add them to a new data structure in the correct order Array List displayed Items new Array List cool Bar get Item Count for int i 0 i cool Items length i Cool Item cool Item cool Items i if cool Item get Data instanceof I Contribution Item I Contribution Item cb Item I Contribution Item cool Item get Data displayed Items add Math min i displayed Items size cb Item Add separators to the displayed Items data structure int offset 0 for int i 1 i wrap Indicies length i int insert At wrap Indicies i offset displayed Items add insert At new Separator USER SEPARATOR offset Determine which rows are invisible Array List existing Visible Rows new Array List 4 List Iterator row Iterator contribution List list Iterator collapse Separators row Iterator int num Row 0 while row Iterator has Next Scan row while row Iterator has Next I Contribution Item cb Item I Contribution Item row Iterator next if displayed Items contains cb Item existing Visible Rows add new Integer num Row break if cb Item is Separator break next Row row Iterator false num Row Iterator existing Rows existing Visible Rows iterator Adjust row number to the first visible if existing Rows has Next row Integer existing Rows next int Value Hash Map item Location new Hash Map for List Iterator location Iterator displayed Items list Iterator location Iterator has Next I Contribution Item item I Contribution Item location Iterator next if item is Separator if existing Rows has Next Integer value Integer existing Rows next row value int Value else row else item Location put item new Integer row Insert the contribution items in their correct location for List Iterator iterator displayed Items list Iterator iterator has Next I Contribution Item cb Item I Contribution Item iterator next if cb Item is Separator cool Item Index 0 else relocate cb Item cool Item Index contribution List item Location cb Item save Widget State cool Item Index if contribution List size 0 contribution List adjust Contribution List contribution List I Contribution Item array new I Contribution Item contribution List size 1 array I Contribution Item contribution List to Array array internal Set Items array  coolBarExist ArrayList contributionList getItemList contributionList CoolItem coolItems coolBar getItems wrapIndicies getAdjustedWrapIndices coolBar getWrapIndices coolItemIndex ArrayList displayedItems ArrayList coolBar getItemCount coolItems CoolItem coolItem coolItems coolItem getData IContributionItem IContributionItem cbItem IContributionItem coolItem getData displayedItems displayedItems cbItem wrapIndicies insertAt wrapIndicies displayedItems insertAt USER_SEPARATOR ArrayList existingVisibleRows ArrayList ListIterator rowIterator contributionList listIterator collapseSeparators rowIterator numRow rowIterator hasNext rowIterator hasNext IContributionItem cbItem IContributionItem rowIterator displayedItems cbItem existingVisibleRows numRow cbItem isSeparator nextRow rowIterator numRow existingRows existingVisibleRows existingRows hasNext existingRows intValue HashMap itemLocation HashMap ListIterator locationIterator displayedItems listIterator locationIterator hasNext IContributionItem IContributionItem locationIterator isSeparator existingRows hasNext existingRows intValue itemLocation ListIterator displayedItems listIterator hasNext IContributionItem cbItem IContributionItem cbItem isSeparator coolItemIndex cbItem coolItemIndex contributionList itemLocation cbItem saveWidgetState coolItemIndex contributionList contributionList adjustContributionList contributionList IContributionItem IContributionItem contributionList IContributionItem contributionList toArray internalSetItems
Relocates the given contribution item to the specified index param cb Item the conribution item to relocate param index the index to locate this item param contribution List the current list of conrtributions param item Location private void relocate I Contribution Item cb Item int index Array List contribution List Hash Map item Location if item Location get cb Item instanceof Integer return int target Row Integer item Location get cb Item int Value int cb Internal Index contribution List index Of cb Item by default add to end of list int insert At contribution List size Find the row to place this item in List Iterator iterator contribution List list Iterator bypass any separators at the begining collapse Separators iterator int current Row 1 while iterator has Next current Row if current Row target Row We found the row to insert the item int virtual Index 0 insert At iterator next Index first check the position of the current element item then get the next element while iterator has Next I Contribution Item item I Contribution Item iterator next Integer item Row Integer item Location get item if item is Separator break if the item has an associate widget if item Row null item Row int Value target Row if the next element is the index we are looking for then break if virtual Index index break virtual Index insert At If we don t need to move it then we return if cb Internal Index insert At return break next Row iterator true contribution List remove cb Item Adjust insert At index if cb Internal Index insert At insert At if we didn t find the row then add a new row if current Row target Row contribution List add new Separator USER SEPARATOR insert At contribution List size insert At Math min insert At contribution List size contribution List add insert At cb Item  cbItem contributionList itemLocation IContributionItem cbItem ArrayList contributionList HashMap itemLocation itemLocation cbItem targetRow itemLocation cbItem intValue cbInternalIndex contributionList indexOf cbItem insertAt contributionList ListIterator contributionList listIterator collapseSeparators currentRow hasNext currentRow currentRow targetRow virtualIndex insertAt nextIndex hasNext IContributionItem IContributionItem itemRow itemLocation isSeparator itemRow itemRow intValue targetRow virtualIndex virtualIndex insertAt cbInternalIndex insertAt nextRow contributionList cbItem insertAt cbInternalIndex insertAt insertAt currentRow targetRow contributionList USER_SEPARATOR insertAt contributionList insertAt insertAt contributionList contributionList insertAt cbItem
Restores the canonical order of this cool bar manager The canonical order is the order in which the contribution items where added public void reset Item Order for List Iterator iterator cb Items Creation Order list Iterator iterator has Next I Contribution Item item I Contribution Item iterator next if its a user separator then do not include in original order if item get Id null item get Id equals USER SEPARATOR iterator remove I Contribution Item items To Set new I Contribution Item cb Items Creation Order size cb Items Creation Order to Array items To Set set Items items To Set  resetItemOrder ListIterator cbItemsCreationOrder listIterator hasNext IContributionItem IContributionItem getId getId USER_SEPARATOR IContributionItem itemsToSet IContributionItem cbItemsCreationOrder cbItemsCreationOrder toArray itemsToSet setItems itemsToSet
public void set Context Menu Manager I Menu Manager context Menu Manager this context Menu Manager Menu Manager context Menu Manager if cool Bar null cool Bar set Menu get Context Menu Control  setContextMenuManager IMenuManager contextMenuManager contextMenuManager MenuManager contextMenuManager coolBar coolBar setMenu getContextMenuControl
Replaces the current items with the given items Forces an update param new Items the items with which to replace the current items public void set Items I Contribution Item new Items dispose of all the cool items on the cool bar manager if cool Bar null Cool Item cool Items cool Bar get Items for int i 0 i cool Items length i dispose cool Items i Set the internal structure to this order internal Set Items new Items Force and update update true  newItems setItems IContributionItem newItems coolBar CoolItem coolItems coolBar getItems coolItems coolItems internalSetItems newItems
see org eclipse jface action I Cool Bar Manager lock Layout boolean public void set Lock Layout boolean value if cool Bar Exist return cool Bar set Locked value  ICoolBarManager lockLayout setLockLayout coolBarExist coolBar setLocked
Subclasses may extend this code I Contribution Manager code method but must call code super update code see org eclipse jface action I Contribution Manager update boolean public void update boolean force if is Dirty force cool Bar Exist return boolean relock false boolean changed false try cool Bar set Redraw false Refresh the widget data with the internal data structure refresh if cool Bar get Locked cool Bar set Locked false relock true Make a list of items including only those items that are visible Separators should stay because they mark line breaks in a cool bar final I Contribution Item items get Items final List visible Items new Array List items length for int i 0 i items length i final I Contribution Item item items i if item is Visible visible Items add item Make a list of Cool Item widgets in the cool bar for which there is no current visible contribution item These are the widgets to be disposed Dynamic items are also removed Cool Item cool Items cool Bar get Items final Array List cool Items To Remove new Array List cool Items length for int i 0 i cool Items length i final Object data cool Items i get Data if data null visible Items contains data data instanceof I Contribution Item I Contribution Item data is Dynamic cool Items To Remove add cool Items i Dispose of any items in the list to be removed for int i cool Items To Remove size 1 i 0 i Cool Item cool Item Cool Item cool Items To Remove get i if cool Item is Disposed Control control cool Item get Control if control null cool Item set Control null control dispose cool Item dispose Add any new items by telling them to fill cool Items cool Bar get Items I Contribution Item source Item I Contribution Item destination Item int source Index 0 int destination Index 0 final Iterator visible Item Itr visible Items iterator while visible Item Itr has Next source Item I Contribution Item visible Item Itr next Retrieve the corresponding contribution item from SWT s data if source Index cool Items length destination Item I Contribution Item cool Items source Index get Data else destination Item null The items match is they are equal or both separators if destination Item null if source Item equals destination Item source Index destination Index source Item update continue else if destination Item is Separator source Item is Separator cool Items source Index set Data source Item source Index destination Index source Item update continue Otherwise a new item has to be added final int start cool Bar get Item Count source Item fill cool Bar destination Index final int new Items cool Bar get Item Count start for int i 0 i new Items i cool Bar get Item destination Index set Data source Item changed true Remove any old widgets not accounted for for int i cool Items length 1 i source Index i final Cool Item item cool Items i if item is Disposed Control control item get Control if control null item set Control null control dispose item dispose changed true Update wrap indices update Wrap Indices Update the sizes for int i 0 i items length i I Contribution Item item items i item update SIZE if the cool Bar was previously locked then lock it if relock cool Bar set Locked true if changed update Tab Order We are no longer dirty set Dirty false finally cool Bar set Redraw true  IContributionManager IContributionManager isDirty coolBarExist coolBar setRedraw coolBar getLocked coolBar setLocked IContributionItem getItems visibleItems ArrayList IContributionItem isVisible visibleItems CoolItem CoolItem coolItems coolBar getItems ArrayList coolItemsToRemove ArrayList coolItems coolItems coolItems getData visibleItems IContributionItem IContributionItem isDynamic coolItemsToRemove coolItems coolItemsToRemove CoolItem coolItem CoolItem coolItemsToRemove coolItem isDisposed coolItem getControl coolItem setControl coolItem coolItems coolBar getItems IContributionItem sourceItem IContributionItem destinationItem sourceIndex destinationIndex visibleItemItr visibleItems visibleItemItr hasNext sourceItem IContributionItem visibleItemItr sourceIndex coolItems destinationItem IContributionItem coolItems sourceIndex getData destinationItem destinationItem sourceItem destinationItem sourceIndex destinationIndex sourceItem destinationItem isSeparator sourceItem isSeparator coolItems sourceIndex setData sourceItem sourceIndex destinationIndex sourceItem coolBar getItemCount sourceItem coolBar destinationIndex newItems coolBar getItemCount newItems coolBar getItem destinationIndex setData sourceItem coolItems sourceIndex CoolItem coolItems isDisposed getControl setControl updateWrapIndices IContributionItem coolBar coolBar setLocked updateTabOrder setDirty coolBar setRedraw
Sets the tab order of the coolbar to the visual order of its items package void update Tab Order if cool Bar null Cool Item items cool Bar get Items if items null Array List children new Array List items length for int i 0 i items length i if items i get Control null items i get Control is Disposed children add items i get Control Convert array Control children Array new Control 0 children Array Control children to Array children Array if children Array null cool Bar set Tab List children Array  updateTabOrder coolBar CoolItem coolBar getItems ArrayList ArrayList getControl getControl isDisposed getControl childrenArray childrenArray toArray childrenArray childrenArray coolBar setTabList childrenArray
Updates the indices at which the cool bar should wrap private void update Wrap Indices final I Contribution Item items get Items final int num Rows get Num Rows items 1 Generate the list of wrap indices final int wrap Indices new int num Rows boolean found Separator false int j 0 for int i 0 i items length i I Contribution Item item items i Cool Item cool Item find Cool Item item if item is Separator found Separator true if item is Separator item is Group Marker item is Visible cool Item null found Separator wrap Indices j cool Bar index Of cool Item j found Separator false Check to see if these new wrap indices are different than the old ones final int old Indices cool Bar get Wrap Indices boolean should Update false if old Indices length wrap Indices length for int i 0 i old Indices length i if old Indices i wrap Indices i should Update true break else should Update true if should Update cool Bar set Wrap Indices wrap Indices  updateWrapIndices IContributionItem getItems numRows getNumRows wrapIndices numRows foundSeparator IContributionItem CoolItem coolItem findCoolItem isSeparator foundSeparator isSeparator isGroupMarker isVisible coolItem foundSeparator wrapIndices coolBar indexOf coolItem foundSeparator oldIndices coolBar getWrapIndices shouldUpdate oldIndices wrapIndices oldIndices oldIndices wrapIndices shouldUpdate shouldUpdate shouldUpdate coolBar setWrapIndices wrapIndices

p Adds a listener to the object referenced by code identifier code This listener will be notified if a property of the item is to be changed This identifier is specific to mechanism being used In the case of the Eclipse workbench this is the command identifier p p A single instance of the listener may only ever be associated with one identifier Attempts to add the listener twice without a removal inbetween has undefined behaviour p param identifier The identifier of the item to which the listener should be attached must not be code null code param listener The listener to be added must not be code null code public void add Property Change Listener String identifier  addPropertyChangeListener
An accessor for the accelerator associated with the item indicated by the identifier This identifier is specific to mechanism being used In the case of the Eclipse workbench this is the command identifier param identifier The identifier of the item from which the accelerator should be obtained must not be code null code return An integer representation of the accelerator This is the same accelerator format used by SWT 
An accessor for the accelerator text associated with the item indicated by the identifier This identifier is specific to mechanism being used In the case of the Eclipse workbench this is the command identifier param identifier The identifier of the item from which the accelerator text should be obtained must not be code null code return A string representation of the accelerator This is the string representation that should be displayed to the user 
Checks to see whether the given accelerator is being used by some other mechanism outside of the menus controlled by J Face This is used to keep J Face from trying to grab accelerators away from someone else param accelerator The accelerator to check in SWT s internal accelerator format return code true code if the accelerator is already being used and shouldn t be used again code false code otherwise  JFace JFace
Checks whether the item matching this identifier is active This is used to decide whether a contribution item with this identifier should be made visible An inactive item is not visible param identifier The identifier of the item from which the active state should be retrieved must not be code null code return code true code if the item is active code false code otherwise 
Removes a listener from the object referenced by code identifier code This identifier is specific to mechanism being used In the case of the Eclipse workbench this is the command identifier param identifier The identifier of the item to from the listener should be removed must not be code null code param listener The listener to be removed must not be code null code public void remove Property Change Listener String identifier  removePropertyChangeListener
Retrieves the current singleton instance of this class return The singleton instance this value is never code null code public static External Action Manager get Instance if instance null instance new External Action Manager return instance  ExternalActionManager getInstance ExternalActionManager
Constructs a new instance of code External Action Manager code private External Action Manager This is a singleton class Only this class should create an instance  ExternalActionManager ExternalActionManager
An accessor for the current call back return The current callback mechanism being used This is the callback that should be queried for extra information about actions and action contribution items This value may be code null code if there is no extra information public I Callback get Callback return callback  ICallback getCallback
A mutator for the current call back param callback To Use The new callback mechanism to use this value may be code null code if the default is acceptable i e no extra information will provided to actions public void set Callback I Callback callback To Use callback callback To Use  callbackToUse setCallback ICallback callbackToUse callbackToUse

public class Group Marker extends Abstract Group Marker Create a new group marker with the given name The group name must not be code null code or the empty string The group name is also used as the item id param group Name the name of the group public Group Marker String group Name super group Name  GroupMarker AbstractGroupMarker groupName GroupMarker groupName groupName
The code Group Marker code implementation of this method returns code false code since group markers are always invisible public boolean is Visible return false  GroupMarker isVisible

Adds a property change listener to this action Has no effect if an identical listener is already registered param listener a property change listener 
public void add Property Change Listener I Property Change Listener listener Returns the accelerator keycode for this action The result is the bit wise OR of zero or more modifier masks and a key as explained in code Menu Item get Accelerator code return the accelerator keycode see org eclipse swt widgets Menu Item get Accelerator  addPropertyChangeListener IPropertyChangeListener MenuItem getAccelerator MenuItem getAccelerator
public int get Accelerator Returns the action definition id of this action return the action definition id of this action or code null code if none since 2 0  getAccelerator
public String get Action Definition Id Returns the action s description if it has one Otherwise it returns code get Tool Tip Text code  getActionDefinitionId getToolTipText
public String get Description Returns the disabled image for this action as an image descriptor p This method is associated with the code IMAGE code property property change events are reported when its value changes p return the image or code null code if this action has no image see IMAGE  getDescription
public Image Descriptor get Disabled Image Descriptor Returns a help listener for this action return a help listener for this action  ImageDescriptor getDisabledImageDescriptor
public Help Listener get Help Listener Returns the hover image for this action as an image descriptor p Hover images will be used on platforms that support changing the image when the user hovers over the item This method is associated with the code IMAGE code property property change events are reported when its value changes p return the image or code null code if this action has no image see IMAGE  HelpListener getHelpListener
public Image Descriptor get Hover Image Descriptor Returns a unique identifier for this action or code null code if it has none return the action id or code null code if none  ImageDescriptor getHoverImageDescriptor
public String get Id Returns the image for this action as an image descriptor p This method is associated with the code IMAGE code property property change events are reported when its value changes p return the image or code null code if this action has no image see IMAGE  getId
public Image Descriptor get Image Descriptor Returns the menu creator for this action return the menu creator or code null code if none  ImageDescriptor getImageDescriptor
public I Menu Creator get Menu Creator Return this action s style return one of code AS PUSH BUTTON code code AS CHECK BOX code code AS RADIO BUTTON code and code AS DROP DOWN MENU code  IMenuCreator getMenuCreator AS_PUSH_BUTTON AS_CHECK_BOX AS_RADIO_BUTTON AS_DROP_DOWN_MENU
public int get Style Returns the text for this action p This method is associated with the code TEXT code property property change events are reported when its value changes p return the text or code null code if none see TEXT  getStyle
public String get Text Returns the tool tip text for this action p This method is associated with the code TOOL TIP TEXT code property property change events are reported when its value changes p return the tool tip text or code null code if none see TOOL TIP TEXT  getText TOOL_TIP_TEXT TOOL_TIP_TEXT
public String get Tool Tip Text Returns the checked status of this action Applicable only if the style is code AS CHECK BOX code or code AS RADIO BUTTON code p This method is associated with the code CHECKED code property property change events are reported when its value changes p return the checked status see CHECKED  getToolTipText AS_CHECK_BOX AS_RADIO_BUTTON
public boolean is Checked Returns whether this action is enabled p This method is associated with the code ENABLED code property property change events are reported when its value changes p return code true code if enabled and code false code if disabled see ENABLED  isChecked
public boolean is Enabled Removes the given listener from this action Has no effect if an identical listener is not registered param listener a property change listener  isEnabled
Runs this action Each action implementation must define the steps needed to carry out this action The default implementation of this method in code Action code does nothing 
Runs this action passing the triggering SWT event As of 2 0 code Action Contribution Item code calls this method instead of code run code The default implementation of this method in code Action code simply calls code run code for backwards compatibility param event the SWT event which triggered this action being run since 2 0  ActionContributionItem
public void run With Event Event event Sets the action definition id of this action param id the action definition id since 2 0  runWithEvent
public void set Action Definition Id String id Sets the checked status of this action Applicable for the styles code AS CHECK BOX code or code AS RADIO BUTTON code p Fires a property change event for the code CHECKED code property if the checked status actually changes as a consequence p param checked the new checked status see CHECKED  setActionDefinitionId AS_CHECK_BOX AS_RADIO_BUTTON
public void set Checked boolean checked Sets this action s description Typically the description is shown as a longer help text in the status line p Fires a property change event for the code DESCRIPTION code property if the description actually changes as a consequence p param text the description or code null code to clear the description see DESCRIPTION  setChecked
public void set Description String text Sets the disabled image for this action as an image descriptor p Disabled images will be used on platforms that support changing the image when the item is disabled Fires a property change event for the code IMAGE code property if the image actually changes as a consequence p param new Image the image or code null code if this action should not have an image see IMAGE  setDescription newImage
public void set Disabled Image Descriptor Image Descriptor new Image Sets the enabled state of this action p When an action is in the enabled state the control associated with it is active triggering it will end up inkoking this action s code run code method p p Fires a property change event for the code ENABLED code property if the enabled state actually changes as a consequence p param enabled code true code to enable and code false code to disable see ENABLED  setDisabledImageDescriptor ImageDescriptor newImage
public void set Enabled boolean enabled Sets a help listener for this action param listener a help listener for this action  setEnabled
public void set Help Listener Help Listener listener Sets the hover image for this action as an image descriptor p Hover images will be used on platforms that support changing the image when the user hovers over the item Fires a property change event for the code IMAGE code property if the image actually changes as a consequence p param new Image the image or code null code if this action should not have an image see IMAGE  setHelpListener HelpListener newImage
public void set Hover Image Descriptor Image Descriptor new Image Sets the unique identifier for this action This is used to identify actions when added to a contribution manager It should be set when the action is created It should not be modified once the action is part of an action contribution item param id the action id see Action Contribution Item see I Contribution Item get Id  setHoverImageDescriptor ImageDescriptor newImage ActionContributionItem IContributionItem getId
public void set Id String id Sets the image for this action as an image descriptor p Fires a property change event for the code IMAGE code property if the image actually changes as a consequence p param new Image the image or code null code if this action should not have an image see IMAGE  setId newImage
public void set Image Descriptor Image Descriptor new Image Sets the menu creator for this action Applicable for style code AS DROP DOWN MENU code param creator the menu creator or code null code if none  setImageDescriptor ImageDescriptor newImage AS_DROP_DOWN_MENU
public void set Menu Creator I Menu Creator creator Sets the text for this action p An accelerator specification may follow the actual text separated from it by an or a t character An accelerator specification consists of zero or more modifier tokens followed by a key code token The tokens are separated by a character p p Fires a property change event for the code TEXT code property if the text actually changes as a consequence p param text the text or code null code if none see TEXT see Action find Modifier see Action find Key Code  setMenuCreator IMenuCreator findModifier findKeyCode
public void set Text String text 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 text the tool tip text or code null code if none see TOOL TIP TEXT  setText TOOL_TIP_TEXT TOOL_TIP_TEXT
p Sets the accelerator keycode that this action maps to This is a bitwise OR of zero or more SWT key modifier masks i e SWT CTRL or SWT ALT and a character code For example for Ctrl Z use code SWT CTRL Z code Use 0 for no accelerator p p This method should no longer be used for actions in the Eclipse workbench code I Workbench Command Support code and code I Workbench Context Support code provide all the functionality required for key bindings If you set an accelerator using this method then it will not work in the workbench if it conflicts any existing key binding or if there is a different key binding defined for this action s definition id The definition id should be used instead referring to the command in the workbench from which the key binding should be retrieved p param keycode the keycode to be accepted  IWorkbenchCommandSupport IWorkbenchContextSupport

Disposes of this contribution item Called by the parent contribution manager when the manager is being disposed Clients should not call this method directly since 2 1 
public void dispose Fills the given composite control with controls representing this contribution item Used by code Status Line Manager code param parent the parent control  StatusLineManager
public void fill Composite parent Fills the given menu with controls representing this contribution item Used by code Menu Manager code param parent the parent menu param index the index where the controls are inserted or code 1 code to insert at the end  MenuManager
public void fill Menu parent int index Fills the given tool bar with controls representing this contribution item Used by code Tool Bar Manager code param parent the parent tool bar param index the index where the controls are inserted or code 1 code to insert at the end  ToolBarManager
public void fill Tool Bar parent int index Fills the given cool bar with controls representing this contribution item Used by code Cool Bar Manager code param parent the parent cool bar param index the index where the controls are inserted or code 1 code to insert at the end since 3 0  ToolBar CoolBarManager
public void fill Cool Bar parent int index Returns the identifier of this contribution item The id is used for retrieving an item from its manager return the contribution item identifier or code null code if none  CoolBar
public String get Id Returns whether this contribution item is enabled return code true code if this item is enabled  getId
public boolean is Enabled Returns whether this contribution item is dirty A dirty item will be recreated when the action bar is updated return code true code if this item is dirty  isEnabled
public boolean is Dirty Returns whether this contribution item is dynamic A dynamic contribution item contributes items conditionally dependent on some internal state return code true code if this item is dynamic and code false code for normal items  isDirty
public boolean is Dynamic Returns whether this contribution item is a group marker This information is used when adding items to a group return code true code if this item is a group marker and code false code for normal items see Group Marker see I Contribution Manager append To Group see I Contribution Manager prepend To Group  isDynamic GroupMarker IContributionManager appendToGroup IContributionManager prependToGroup
public boolean is Group Marker Returns whether this contribution item is a separator This information is used to enable hiding of unnecessary separators return code true code if this item is a separator and code false code for normal items see Separator  isGroupMarker
public boolean is Separator Returns whether this contribution item is visibile within its manager return code true code if this item is visible and code false code otherwise  isSeparator
public boolean is Visible Saves any state information of the control s owned by this contribution item The contribution manager calls this method before disposing of the controls since 3 0  isVisible
public void save Widget State Sets the parent manager of this item param parent the parent contribution manager since 2 0  saveWidgetState
public void set Parent I Contribution Manager parent Sets whether this contribution item is visibile within its manager param visible code true code if this item should be visible and code false code otherwise  setParent IContributionManager
public void set Visible boolean visible Updates any SWT controls cached by this contribution item with any changes which have been made to this contribution item since the last update Called by contribution manager update methods  setVisible
public void update Updates any SWT controls cached by this contribution item with changes for the the given property param id the id of the changed property since 2 0 

public interface I Contribution Manager Adds an action as a contribution item to this manager Equivalent to code add new Action Contribution Item action code param action the action  IContributionManager ActionContributionItem
public void add I Action action Adds a contribution item to this manager param item the contribution item  IAction
public void add I Contribution Item item Adds a contribution item for the given action at the end of the group with the given name Equivalent to code append To Group group Name new Action Contribution Item action code param group Name the name of the group param action the action exception Illegal Argument Exception if there is no group with the given name  IContributionItem appendToGroup groupName ActionContributionItem groupName IllegalArgumentException
public void append To Group String group Name I Action action Adds a contribution item to this manager at the end of the group with the given name param group Name the name of the group param item the contribution item exception Illegal Argument Exception if there is no group with the given name  appendToGroup groupName IAction groupName IllegalArgumentException
public void append To Group String group Name I Contribution Item item Finds the contribution item with the given id param id the contribution item id return the contribution item or code null code if no item with the given id can be found  appendToGroup groupName IContributionItem
public I Contribution Item find String id Returns all contribution items known to this manager return a list of contribution items  IContributionItem
public I Contribution Item get Items Returns the overrides for the items of this manager return the overrides for the items of this manager since 2 0  IContributionItem getItems
public I Contribution Manager Overrides get Overrides Inserts a contribution item for the given action after the item with the given id Equivalent to code insert After id new Action Contribution Item action code param id the contribution item id param action the action to insert exception Illegal Argument Exception if there is no item with the given id  IContributionManagerOverrides getOverrides insertAfter ActionContributionItem IllegalArgumentException
public void insert After String id I Action action Inserts a contribution item after the item with the given id param id the contribution item id param item the contribution item to insert exception Illegal Argument Exception if there is no item with the given id  insertAfter IAction IllegalArgumentException
public void insert After String id I Contribution Item item Inserts a contribution item for the given action before the item with the given id Equivalent to code insert Before id new Action Contribution Item action code param id the contribution item id param action the action to insert exception Illegal Argument Exception if there is no item with the given id  insertAfter IContributionItem insertBefore ActionContributionItem IllegalArgumentException
public void insert Before String id I Action action Inserts a contribution item before the item with the given id param id the contribution item id param item the contribution item to insert exception Illegal Argument Exception if there is no item with the given id  insertBefore IAction IllegalArgumentException
public void insert Before String id I Contribution Item item Returns whether the list of contributions has recently changed and has yet to be reflected in the corresponding widgets return code true code if this manager is dirty and code false code if it is up to date  insertBefore IContributionItem
public boolean is Dirty Returns whether this manager has any contribution items return code true code if there are no items and code false code otherwise  isDirty
public boolean is Empty Marks this contribution manager as dirty public void mark Dirty  isEmpty markDirty
public void mark Dirty Adds a contribution item for the given action at the beginning of the group with the given name Equivalent to code prepend To Group group Name new Action Contribution Item action code param group Name the name of the group param action the action exception Illegal Argument Exception if there is no group with the given name  markDirty prependToGroup groupName ActionContributionItem groupName IllegalArgumentException
public void prepend To Group String group Name I Action action Adds a contribution item to this manager at the beginning of the group with the given name param group Name the name of the group param item the contribution item exception Illegal Argument Exception if there is no group with the given name  prependToGroup groupName IAction groupName IllegalArgumentException
public void prepend To Group String group Name I Contribution Item item Removes and returns the contribution item with the given id from this manager Returns code null code if this manager has no contribution items with the given id param id the contribution item id return the item that was found and removed or code null code if none  prependToGroup groupName IContributionItem
public I Contribution Item remove String id Removes the given contribution item from the contribution items known to this manager param item the contribution item return the code item code parameter if the item was removed and code null code if it was not found  IContributionItem
public I Contribution Item remove I Contribution Item item Removes all contribution items from this manager public void remove All  IContributionItem IContributionItem removeAll
public void remove All Updates this manager s underlying widget s with any changes which have been made to it or its items Normally changes to a contribution manager merely mark it as dirty without updating the underlying widgets This brings the underlying widgets up to date with any changes param force code true code means update even if not dirty and code false code for normal incremental updating  removeAll

Returns code Boolean TRUE code if the given contribution item should be enabled code Boolean FALSE code if the item should be disabled and code null code if the item may determine its own enablement param item the contribution item for which the enable override value is determined since 2 0 
This is not intended to be called outside of the workbench This method is intended to be deprecated in 3 1 TODO deprecate for 3 1 
This is not intended to be called outside of the workbench This method is intended to be deprecated in 3 1 TODO deprecate for 3 1 
This is not intended to be called outside of the workbench This method is intended to be deprecated in 3 1 TODO deprecate for 3 1 

A convenience method to add a tool bar as a contribution item to this cool bar manager Equivalent to code add new Tool Bar Contribution Manager tool Bar Manager code param tool Bar Manager the tool bar manager to be added see Tool Bar Contribution Item  ToolBarContributionManager toolBarManager toolBarManager ToolBarContributionItem
Returns the context menu manager used by this cool bar manager This context menu manager is used by the cool bar manager except for cool items that provide their own return the context menu manager or code null code if none see set Context Menu Manager  setContextMenuManager
Returns whether the layout of the underlying cool bar widget is locked return code true code if cool bar layout is locked code false code otherwise 
Returns the style of the underlying cool bar widget return the style of the cool bar 
Sets the context menu of this cool bar manager to the given menu manager param menu Manager the context menu manager or code null code if none see get Context Menu Manager  menuManager getContextMenuManager
Locks or unlocks the layout of the underlying cool bar widget Once the cool bar is locked cool items cannot be repositioned by the user p Note that items can be added or removed programmatically even while the cool bar is locked p param value code true code to lock the cool bar code false code to unlock 

public interface I Menu Creator Disposes the menu returned by code get Menu code Does nothing if there is no menu This method will be executed only when the parent of the menu is disposed  IMenuCreator getMenu
public void dispose Returns the SWT menu created as a pop up menu parented by the given control In most cases this menu can be created once cached and reused when the pop up drop down action occurs If the menu must be dynamically created i e each time it is popped up or dropped down the old menu should be disposed of before replacing it with the new menu param parent the parent control return the menu or code null code if the menu could not be created 
public Menu get Menu Control parent Returns an SWT menu created as a drop down menu parented by the given menu In most cases this menu can be created once cached and reused when the pop up drop down action occurs If the menu must be dynamically created i e each time it is popped up or dropped down the old menu should be disposed of before replacing it with the new menu param parent the parent menu return the menu or code null code if the menu could not be created  getMenu

public interface I Menu Listener Notifies this listener that the menu is about to be shown by the given menu manager param manager the menu manager  IMenuListener

public interface I Menu Manager extends I Contribution Manager I Contribution Item Adds a menu listener to this menu Has no effect if an identical listener is already registered param listener a menu listener  IMenuManager IContributionManager IContributionItem
public void add Menu Listener I Menu Listener listener Finds the manager for the menu at the given path A path consists of contribution item ids separated by the separator character The path separator character is code code p Convenience for code find Using Path path code which extracts an code I Menu Manager code if possible p param path the path string return the menu contribution item or code null code if there is no such contribution item or if the item does not have an associated menu manager  addMenuListener IMenuListener findUsingPath IMenuManager
public I Menu Manager find Menu Using Path String path Finds the contribution item at the given path A path consists of contribution item ids separated by the separator character The path separator character is code code param path the path string return the contribution item or code null code if there is no such contribution item  IMenuManager findMenuUsingPath
public I Contribution Item find Using Path String path Returns whether all items should be removed when the menu is first shown but before notifying menu listeners The default is code false code return code true code if all items should be removed when shown code false code if not  IContributionItem findUsingPath
public boolean get Remove All When Shown Returns whether this menu should be enabled or not return code true code if enabled and code false code if disabled  getRemoveAllWhenShown
public boolean is Enabled Removes the given menu listener from this menu Has no effect if an identical listener is not registered param listener the menu listener  isEnabled
public void remove Menu Listener I Menu Listener listener Sets whether all items should be removed when the menu is first shown but before notifying menu listeners param remove All code true code if all items should be removed when shown code false code if not  removeMenuListener IMenuListener removeAll
public void set Remove All When Shown boolean remove All Incrementally builds the menu from the contribution items and does so recursively for all submenus param force code true code means update even if not dirty and code false code for normal incremental updating  setRemoveAllWhenShown removeAll

public interface I Status Line Manager extends I Contribution Manager Returns a progress monitor which reports progress in the status line return the progress monitor Note There is a delay after a begin Task message before the monitor is shown This may not be appropriate for all apps  IStatusLineManager IContributionManager beginTask
public I Progress Monitor get Progress Monitor Returns whether the cancel button on the status line s progress monitor is enabled return code true code if the cancel button is enabled or code false code if not  IProgressMonitor getProgressMonitor
public boolean is Cancel Enabled Sets whether the cancel button on the status line s progress monitor is enabled param enabled code true code if the cancel button is enabled or code false code if not  isCancelEnabled
public void set Cancel Enabled boolean enabled Sets the error message text to be displayed on the status line The image on the status line is cleared p An error message overrides the current message until the error message is cleared set to code null code p param message the error message or code null code to clear the current error message  setCancelEnabled
public void set Error Message String message Sets the image and error message to be displayed on the status line p An error message overrides the current message until the error message is cleared set to code null code p param image the image to use or code null code for no image param message the error message or code null code to clear the current error message  setErrorMessage
public void set Error Message Image image String message Sets the message text to be displayed on the status line The image on the status line is cleared p This method replaces the current message but does not affect the error message That is the error message if set will continue to be displayed until it is cleared set to code null code p param message the message or code null code for no message  setErrorMessage
public void set Message String message Sets the image and message to be displayed on the status line p This method replaces the current message but does not affect the error message That is the error message if set will continue to be displayed until it is cleared set to code null code p param image the image to use or code null code for no image param message the message or code null code for no message  setMessage

Creates a menu manager The text and id are code null code Typically used for creating a context menu where it doesn t need to be referred to by id public Menu Manager this null null  MenuManager
Creates a menu manager with the given text The id of the menu is code null code Typically used for creating a sub menu where it doesn t need to be referred to by id param text the text for the menu or code null code if none public Menu Manager String text this text null  MenuManager
Creates a menu manager with the given text and id Typically used for creating a sub menu where it needs to be referred to by id param text the text for the menu or code null code if none param id the menu id or code null code if it is to have no id public Menu Manager String text String id this menu Text text this id id  MenuManager menuText
see org eclipse jface action I Menu Manager add Menu Listener org eclipse jface action I Menu Listener public void add Menu Listener I Menu Listener listener listeners add listener  IMenuManager addMenuListener IMenuListener addMenuListener IMenuListener
Creates and returns an SWT context menu control for this menu and installs all registered contributions Does not create a new control if one already exists p Note that the menu is not expected to be dynamic p param parent the parent control return the menu control public Menu create Context Menu Control parent if menu Exist menu new Menu parent initialize Menu return menu  createContextMenu menuExist initializeMenu
Creates and returns an SWT menu bar control for this menu for use in the given code Decorations code and installs all registered contributions Does not create a new control if one already exists param parent the parent decorations return the menu control since 2 1 public Menu create Menu Bar Decorations parent if menu Exist menu new Menu parent SWT BAR update false return menu  createMenuBar menuExist
Creates and returns an SWT menu bar control for this menu for use in the given code Shell code and installs all registered contributions Does not create a new control if one already exists This implementation simply calls the code create Menu Bar Decorations code method param parent the parent decorations return the menu control deprecated use code create Menu Bar Decorations code instead public Menu create Menu Bar Shell parent return create Menu Bar Decorations parent  createMenuBar createMenuBar createMenuBar createMenuBar
Disposes of this menu manager and frees all allocated SWT resources Notifies all contribution items of the dispose Note that this method does not clean up references between this menu manager and its associated contribution items Use code remove All code for that purpose public void dispose if menu Exist menu dispose menu null if menu Item null menu Item dispose menu Item null I Contribution Item items get Items for int i 0 i items length i items i dispose  removeAll menuExist menuItem menuItem menuItem IContributionItem getItems
see org eclipse jface action I Contribution Item fill org eclipse swt widgets Composite public void fill Composite parent  IContributionItem
see org eclipse jface action I Contribution Item fill org eclipse swt widgets Cool Bar int public void fill Cool Bar parent int index  IContributionItem CoolBar CoolBar
public void fill Menu parent int index if menu Item null menu Item is Disposed if index 0 menu Item new Menu Item parent SWT CASCADE index else menu Item new Menu Item parent SWT CASCADE menu Item set Text get Menu Text if menu Exist menu new Menu parent menu Item set Menu menu initialize Menu populate the submenu in order to enable accelerators and to set enabled state on the menu Item properly update true  menuItem menuItem isDisposed menuItem MenuItem menuItem MenuItem menuItem setText getMenuText menuExist menuItem setMenu initializeMenu menuItem
see org eclipse jface action I Contribution Item fill org eclipse swt widgets Tool Bar int public void fill Tool Bar parent int index  IContributionItem ToolBar ToolBar
public I Menu Manager find Menu Using Path String path I Contribution Item item find Using Path path if item instanceof I Menu Manager return I Menu Manager item return null  IMenuManager findMenuUsingPath IContributionItem findUsingPath IMenuManager IMenuManager
public I Contribution Item find Using Path String path String id path String rest null int separator path index Of if separator 1 id path substring 0 separator rest path substring separator 1 else return super find path I Contribution Item item super find id if item instanceof I Menu Manager I Menu Manager manager I Menu Manager item return manager find Using Path rest return null  IContributionItem findUsingPath indexOf IContributionItem IMenuManager IMenuManager IMenuManager findUsingPath
Notifies any menu listeners that a menu is about to show Only listeners registered at the time this method is called are notified param manager the menu manager see I Menu Listener menu About To Show private void fire About To Show I Menu Manager manager Object listeners this listeners get Listeners for int i 0 i listeners length i I Menu Listener listeners i menu About To Show manager  IMenuListener menuAboutToShow fireAboutToShow IMenuManager getListeners IMenuListener menuAboutToShow
Returns the menu id The menu id is used when creating a contribution item for adding this menu as a sub menu of another return the menu id public String get Id return id  getId
Returns the SWT menu control for this menu manager return the menu control public Menu get Menu return menu  getMenu
Returns the text shown in the menu return the menu text public String get Menu Text return menu Text  getMenuText menuText
if parent null overrides new I Contribution Manager Overrides public Integer get Accelerator I Contribution Item item return null  IContributionManagerOverrides getAccelerator IContributionItem
return null public String get Accelerator Text I Contribution Item item return null  getAcceleratorText IContributionItem
return null public Boolean get Enabled I Contribution Item item return null  getEnabled IContributionItem
return null public String get Text I Contribution Item item return null  getText IContributionItem
public I Contribution Manager Overrides get Overrides if overrides null if parent null overrides new I Contribution Manager Overrides public Integer get Accelerator I Contribution Item item return null public String get Accelerator Text I Contribution Item item return null public Boolean get Enabled I Contribution Item item return null public String get Text I Contribution Item item return null else overrides parent get Overrides super set Overrides overrides return overrides  IContributionManagerOverrides getOverrides IContributionManagerOverrides getAccelerator IContributionItem getAcceleratorText IContributionItem getEnabled IContributionItem getText IContributionItem getOverrides setOverrides
Returns the parent contribution manager of this manger return the parent contribution manager since 2 0 public I Contribution Manager get Parent return parent  IContributionManager getParent
see org eclipse jface action I Menu Manager get Remove All When Shown public boolean get Remove All When Shown return remove All When Shown  IMenuManager getRemoveAllWhenShown getRemoveAllWhenShown removeAllWhenShown
Notifies all listeners that this menu is about to appear private void handle About To Show if remove All When Shown remove All fire About To Show this update false true  handleAboutToShow removeAllWhenShown removeAll fireAboutToShow
private void initialize Menu menu add Menu Listener new Menu Adapter public void menu Hidden Menu Event e Application Window reset Description e widget  initializeMenu addMenuListener MenuAdapter menuHidden MenuEvent ApplicationWindow resetDescription
Application Window reset Description e widget public void menu Shown Menu Event e handle About To Show  ApplicationWindow resetDescription menuShown MenuEvent handleAboutToShow
Initializes the menu control private void initialize Menu menu add Menu Listener new Menu Adapter public void menu Hidden Menu Event e Application Window reset Description e widget public void menu Shown Menu Event e handle About To Show mark Dirty Don t do an update true here in case menu is never opened Always do it lazily in handle About To Show  initializeMenu addMenuListener MenuAdapter menuHidden MenuEvent ApplicationWindow resetDescription menuShown MenuEvent handleAboutToShow markDirty handleAboutToShow
see org eclipse jface action I Contribution Item is Dynamic public boolean is Dynamic return false  IContributionItem isDynamic isDynamic
Returns whether this menu should be enabled or not Used to enable the menu item containing this menu when it is realized as a sub menu p The default implementation of this framework method returns code true code Subclasses may reimplement p return code true code if enabled and code false code if disabled public boolean is Enabled return true  isEnabled
see org eclipse jface action I Contribution Item is Group Marker public boolean is Group Marker return false  IContributionItem isGroupMarker isGroupMarker
see org eclipse jface action I Contribution Item is Separator public boolean is Separator return false  IContributionItem isSeparator isSeparator
deprecated this method is no longer a part of the link org eclipse jface action I Contribution Item API public boolean is Substitute For I Contribution Item item return this equals item  IContributionItem isSubstituteFor IContributionItem
public boolean is Visible if visible return false short circut calculations in this case menus arent visible if all of its children are invisible or only contains visible separators I Contribution Item child Items get Items boolean visible Children false for int j 0 j child Items length j if child Items j is Visible child Items j is Separator visible Children true break return visible Children  isVisible IContributionItem childItems getItems visibleChildren childItems childItems isVisible childItems isSeparator visibleChildren visibleChildren
Returns whether the menu control is created and not disposed return code true code if the control is created and not disposed code false code otherwise private boolean menu Exist return menu null menu is Disposed  menuExist isDisposed
see org eclipse jface action I Menu Manager remove Menu Listener org eclipse jface action I Menu Listener public void remove Menu Listener I Menu Listener listener listeners remove listener  IMenuManager removeMenuListener IMenuListener removeMenuListener IMenuListener
see org eclipse jface action I Contribution Item save Widget State public void save Widget State  IContributionItem saveWidgetState saveWidgetState
Sets the overrides for this contribution manager param new Overrides the overrides for the items of this manager since 2 0 public void set Overrides I Contribution Manager Overrides new Overrides overrides new Overrides super set Overrides overrides  newOverrides setOverrides IContributionManagerOverrides newOverrides newOverrides setOverrides
see org eclipse jface action I Contribution Item set Parent org eclipse jface action I Contribution Manager public void set Parent I Contribution Manager manager parent manager  IContributionItem setParent IContributionManager setParent IContributionManager
see org eclipse jface action I Menu Manager set Remove All When Shown boolean public void set Remove All When Shown boolean remove All this remove All When Shown remove All  IMenuManager setRemoveAllWhenShown setRemoveAllWhenShown removeAll removeAllWhenShown removeAll
see org eclipse jface action I Contribution Item set Visible boolean public void set Visible boolean visible this visible visible  IContributionItem setVisible setVisible
see org eclipse jface action I Contribution Item update public void update update Menu Item  IContributionItem updateMenuItem
The code Menu Manager code implementation of this code I Contribution Manager code updates this menu but not any of its submenus see update All public void update boolean force update force false  MenuManager IContributionManager updateAll
Incrementally builds the menu from the contribution items This method leaves out double separators and separators in the first or last position param force code true code means update even if not dirty and code false code for normal incremental updating param recursive code true code means recursively update all submenus and code false code means just this menu protected void update boolean force boolean recursive if is Dirty force if menu Exist clean contains all active items without double separators I Contribution Item items get Items List clean new Array List items length I Contribution Item separator null for int i 0 i items length i I Contribution Item ci items i if ci is Visible continue if ci is Separator delay creation until necessary handles both adjacent separators and separator at end separator ci else if separator null if clean size 0 no separator if first item clean add separator separator null clean add ci remove obsolete removed or non active Menu Item mi menu get Items for int i 0 i mi length i Object data mi i get Data if data null clean contains data mi i dispose else if data instanceof I Contribution Item I Contribution Item data is Dynamic I Contribution Item data is Dirty mi i dispose add new mi menu get Items int src Ix 0 int dest Ix 0 for Iterator e clean iterator e has Next I Contribution Item src I Contribution Item e next I Contribution Item dest get corresponding item in SWT widget if src Ix mi length dest I Contribution Item mi src Ix get Data else dest null if dest null src equals dest src Ix dest Ix else if dest null dest is Separator src is Separator mi src Ix set Data src src Ix dest Ix else int start menu get Item Count src fill menu dest Ix int new Items menu get Item Count start for int i 0 i new Items i Menu Item item menu get Item dest Ix item set Data src May be we can optimize this call If the menu has just been created via the call src fill f Menu Bar dest Ix then the menu has already been updated with update true see Menu Manager So if force is true we do it again But we can t set force to false since then information for the sub sub menus is lost if recursive I Contribution Item item src if item instanceof Sub Contribution Item item Sub Contribution Item item get Inner Item if item instanceof I Menu Manager I Menu Manager item update All force remove any old menu items not accounted for for src Ix mi length src Ix mi src Ix dispose set Dirty false else I am not dirty Check if I must recursivly walk down the hierarchy if recursive I Contribution Item items get Items for int i 0 i items length i I Contribution Item ci items i if ci instanceof I Menu Manager I Menu Manager mm I Menu Manager ci if mm is Visible mm update All force update Menu Item  isDirty menuExist IContributionItem getItems ArrayList IContributionItem IContributionItem isVisible isSeparator MenuItem getItems getData IContributionItem IContributionItem isDynamic IContributionItem isDirty getItems srcIx destIx hasNext IContributionItem IContributionItem IContributionItem srcIx IContributionItem srcIx getData srcIx destIx isSeparator isSeparator srcIx setData srcIx destIx getItemCount destIx newItems getItemCount newItems MenuItem getItem destIx setData fMenuBar destIx MenuManager IContributionItem SubContributionItem SubContributionItem getInnerItem IMenuManager IMenuManager updateAll srcIx srcIx srcIx setDirty IContributionItem getItems IContributionItem IMenuManager IMenuManager IMenuManager isVisible updateAll updateMenuItem
public void update String property I Contribution Item items get Items for int i 0 i items length i items i update property if menu null menu is Disposed menu get Parent Item null I Action TEXT equals property String text get Overrides get Text this if text null text get Menu Text if text null External Action Manager I Callback callback External Action Manager get Instance get Callback if callback null int index text index Of if index 0 index text length 1 char character Character to Upper Case text char At index 1 if callback is Accelerator In Use SWT ALT character if index 0 text text substring 1 else text text substring 0 index text substring index 1 menu get Parent Item set Text text  IContributionItem getItems isDisposed getParentItem IAction getOverrides getText getMenuText ExternalActionManager ICallback ExternalActionManager getInstance getCallback indexOf toUpperCase charAt isAcceleratorInUse getParentItem setText
see org eclipse jface action I Menu Manager update All boolean public void update All boolean force update force true  IMenuManager updateAll updateAll
Updates the menu item for this sub menu The menu item is disabled if this sub menu is empty Does nothing if this menu is not a submenu private void update Menu Item Commented out until proper solution to enablement of menu item for a sub menu is found See bug 30833 for more details if menu Item null menu Item is Disposed menu Exist I Contribution Item items get Items boolean enabled false for int i 0 i items length i I Contribution Item item items i enabled item is Enabled if enabled break Workaround for 1GDDCN2 SWT Linux Menu Item set Enabled always causes a redraw if menu Item get Enabled enabled menu Item set Enabled enabled Partial fix for bug 34969 diable the menu item if no items in sub menu for context menus if menu Item null menu Item is Disposed menu Exist boolean enabled menu get Item Count 0 Workaround for 1GDDCN2 SWT Linux Menu Item set Enabled always causes a redraw if menu Item get Enabled enabled We only do this for context menus for bug 34969 Menu top Menu menu while top Menu get Parent Menu null top Menu top Menu get Parent Menu if top Menu get Style SWT BAR 0 menu Item set Enabled enabled  updateMenuItem menuItem menuItem isDisposed menuExist IContributionItem getItems IContributionItem isEnabled MenuItem setEnabled menuItem getEnabled menuItem setEnabled menuItem menuItem isDisposed menuExist getItemCount MenuItem setEnabled menuItem getEnabled topMenu topMenu getParentMenu topMenu topMenu getParentMenu topMenu getStyle menuItem setEnabled

public class Separator extends Abstract Group Marker Creates a separator which does not start a new group public Separator super  AbstractGroupMarker
Creates a new separator which also defines a new group having the given group name The group name must not be code null code or the empty string The group name is also used as the item id param group Name the group name of the separator public Separator String group Name super group Name  groupName groupName groupName
public void fill Menu menu int index if index 0 new Menu Item menu SWT SEPARATOR index else new Menu Item menu SWT SEPARATOR  MenuItem MenuItem
public void fill Tool Bar toolbar int index if index 0 new Tool Item toolbar SWT SEPARATOR index else new Tool Item toolbar SWT SEPARATOR  ToolBar ToolItem ToolItem
The code Separator code implementation of this code I Contribution Item code method returns code true code public boolean is Separator return true  IContributionItem isSeparator

public Point compute Size Composite composite int w Hint int h Hint boolean changed if w Hint SWT DEFAULT h Hint SWT DEFAULT return new Point w Hint h Hint Control children composite get Children int total Width 0 int max Height 0 int total Cnt 0 for int i 0 i children length i boolean use Width true Control w children i if w f Progress Bar Composite f Progress Is Visible use Width false else if w f Tool Bar f Cancel Button Is Visible use Width false Status Line Layout Data data Status Line Layout Data w get Layout Data if data null data DEFAULT DATA Point e w compute Size data width Hint data height Hint changed if use Width total Width e x total Cnt max Height Math max max Height e y if total Cnt 0 total Width total Cnt 1 GAP if total Width 0 total Width max Height 4 return new Point total Width max Height  computeSize wHint hHint wHint hHint wHint hHint getChildren totalWidth maxHeight totalCnt useWidth fProgressBarComposite fProgressIsVisible useWidth fToolBar fCancelButtonIsVisible useWidth StatusLineLayoutData StatusLineLayoutData getLayoutData DEFAULT_DATA computeSize widthHint heightHint useWidth totalWidth totalCnt maxHeight maxHeight totalCnt totalWidth totalCnt totalWidth totalWidth maxHeight totalWidth maxHeight
public void layout Composite composite boolean flush Cache if composite null return Status Line Manager skips over the standard status line widgets in its update method There is thus a dependency between the layout of the standard widgets and the update method Make sure cancel button and progress bar are before contributions f Message Label move Above null f Tool Bar move Below f Message Label f Progress Bar Composite move Below f Tool Bar Rectangle rect composite get Client Area Control children composite get Children int count children length int ws new int count int h rect height int total Width GAP for int i 0 i count i Control w children i if w f Progress Bar Composite f Progress Is Visible continue if w f Tool Bar f Cancel Button Is Visible continue Status Line Layout Data data Status Line Layout Data w get Layout Data if data null data DEFAULT DATA int width w compute Size data width Hint h flush Cache x ws i width total Width width GAP int diff rect width total Width ws 0 diff make the first Status Label wider Check against minimum recommended width final int msg Min Width rect width 3 if ws 0 msg Min Width diff ws 0 msg Min Width ws 0 msg Min Width else diff 0 Take space away from the contributions first for int i count 1 i 0 diff 0 i int min Math min ws i diff ws i min diff min GAP int x rect x int y rect y for int i 0 i count i Control w children i Workaround for Linux Motif Even if the progress bar and cancel button are not set to be visible ad of width 0 they still draw over the first pixel of the editor contributions The fix here is to draw the progress bar and cancel button off screen if they are not visible if w f Progress Bar Composite f Progress Is Visible w f Tool Bar f Cancel Button Is Visible w set Bounds x rect width y ws i h continue w set Bounds x y ws i h if ws i 0 x ws i GAP  flushCache StatusLineManager fMessageLabel moveAbove fToolBar moveBelow fMessageLabel fProgressBarComposite moveBelow fToolBar getClientArea getChildren totalWidth fProgressBarComposite fProgressIsVisible fToolBar fCancelButtonIsVisible StatusLineLayoutData StatusLineLayoutData getLayoutData DEFAULT_DATA computeSize widthHint flushCache totalWidth totalWidth StatusLabel msgMinWidth msgMinWidth msgMinWidth msgMinWidth fProgressBarComposite fProgressIsVisible fToolBar fCancelButtonIsVisible setBounds setBounds
add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e handle Dispose  addDisposeListener DisposeListener widgetDisposed DisposeEvent handleDispose
f Cancel Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e set Canceled true  fCancelButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setCanceled
f Cancel Button add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e Image i f Cancel Button get Image if i null i is Disposed i dispose  fCancelButton addDisposeListener DisposeListener widgetDisposed DisposeEvent fCancelButton getImage isDisposed
Create a new Status Line as a child of the given parent public Status Line Composite parent int style super parent style add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e handle Dispose Status Line Manager skips over the standard status line widgets in its update method There is thus a dependency between this code defining the creation and layout of the standard widgets and the update method set Layout new Status Line Layout f Message Label new C Label this SWT NONE SWT SHADOW IN Color colors new Color 2 colors 0 parent get Display get System Color SWT COLOR WIDGET LIGHT SHADOW colors 1 f Message Label get Background int gradient new int J Face Colors STATUS PERCENT f Message Label set Background colors gradient f Progress Is Visible false f Cancel Enabled false f Tool Bar new Tool Bar this SWT FLAT f Cancel Button new Tool Item f Tool Bar SWT PUSH f Cancel Button set Image fg Stop Image create Image f Cancel Button set Tool Tip Text J Face Resources get String Cancel Current Operation NON NLS 1 f Cancel Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e set Canceled true f Cancel Button add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e Image i f Cancel Button get Image if i null i is Disposed i dispose We create a composite to create the progress bar in so that it can be centered See bug 32331 f Progress Bar Composite new Composite this SWT NONE Grid Layout layout new Grid Layout layout horizontal Spacing 0 layout vertical Spacing 0 layout margin Height 0 layout margin Width 0 f Progress Bar Composite set Layout layout f Progress Bar new Progress Indicator f Progress Bar Composite f Progress Bar set Layout Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL f Stop Button Cursor new Cursor get Display SWT CURSOR ARROW  StatusLine StatusLine addDisposeListener DisposeListener widgetDisposed DisposeEvent handleDispose StatusLineManager setLayout StatusLineLayout fMessageLabel CLabel SHADOW_IN getDisplay getSystemColor COLOR_WIDGET_LIGHT_SHADOW fMessageLabel getBackground JFaceColors STATUS_PERCENT fMessageLabel setBackground fProgressIsVisible fCancelEnabled fToolBar ToolBar fCancelButton ToolItem fToolBar fCancelButton setImage fgStopImage createImage fCancelButton setToolTipText JFaceResources getString Cancel_Current_Operation fCancelButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setCanceled fCancelButton addDisposeListener DisposeListener widgetDisposed DisposeEvent fCancelButton getImage isDisposed fProgressBarComposite GridLayout GridLayout horizontalSpacing verticalSpacing marginHeight marginWidth fProgressBarComposite setLayout fProgressBar ProgressIndicator fProgressBarComposite fProgressBar setLayoutData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL fStopButtonCursor getDisplay CURSOR_ARROW
the task is running Fixes bug 32198 for the non animated case Runnable timer new Runnable public void run Status Line this start Task timestamp animated  StatusLine startTask
Notifies that the main task is beginning param name the name or description of the main task param total Work the total number of work units into which the main task is been subdivided If the value is 0 or UNKNOWN the implemenation is free to indicate progress in a way which doesn t require the total number of work units in advance In general users should use the UNKNOWN value if they don t know the total amount of work units public void begin Task String name int total Work final long timestamp System current Time Millis f Start Time timestamp final boolean animated total Work UNKNOWN total Work 0 make sure the progress bar is made visible while the task is running Fixes bug 32198 for the non animated case Runnable timer new Runnable public void run Status Line this start Task timestamp animated if f Progress Bar null return f Progress Bar get Display timer Exec DELAY PROGRESS timer if animated f Progress Bar begin Task total Work if name null f Task Name NON NLS 1 else f Task Name name set Message f Task Name  totalWork beginTask totalWork currentTimeMillis fStartTime totalWork totalWork StatusLine startTask fProgressBar fProgressBar getDisplay timerExec DELAY_PROGRESS fProgressBar beginTask totalWork fTaskName fTaskName setMessage fTaskName
Notifies that the work is done that is either the main task is completed or the user cancelled it Done can be called more than once an implementation should be prepared to handle this case public void done f Start Time 0 if f Progress Bar null f Progress Bar send Remaining Work f Progress Bar done set Message NON NLS 1 hide Progress  fStartTime fProgressBar fProgressBar sendRemainingWork fProgressBar setMessage hideProgress
Returns the status line s progress monitor public I Progress Monitor get Progress Monitor return this  IProgressMonitor getProgressMonitor
private protected void handle Dispose f Stop Button Cursor dispose f Stop Button Cursor null f Progress Bar dispose f Progress Bar null  handleDispose fStopButtonCursor fStopButtonCursor fProgressBar fProgressBar
Hides the Cancel button and Progress Indicator private protected void hide Progress if f Progress Is Visible is Disposed f Progress Is Visible false f Cancel Enabled false f Cancel Button Is Visible false if f Tool Bar null f Tool Bar is Disposed f Tool Bar set Visible false if f Progress Bar Composite null f Progress Bar Composite is Disposed f Progress Bar Composite set Visible false layout  ProgressIndicator hideProgress fProgressIsVisible isDisposed fProgressIsVisible fCancelEnabled fCancelButtonIsVisible fToolBar fToolBar isDisposed fToolBar setVisible fProgressBarComposite fProgressBarComposite isDisposed fProgressBarComposite setVisible
see I Progress Monitor internal Worked double public void internal Worked double work if f Progress Is Visible if System current Time Millis f Start Time DELAY PROGRESS show Progress if f Progress Bar null f Progress Bar worked work  IProgressMonitor internalWorked internalWorked fProgressIsVisible currentTimeMillis fStartTime DELAY_PROGRESS showProgress fProgressBar fProgressBar
Returns true if the user does some UI action to cancel this operation like hitting the Cancel button on the progress dialog The long running operation typically polls is Canceled public boolean is Canceled return f Is Canceled  isCanceled isCanceled fIsCanceled
Returns code true true if the Progress Indication provides UI for canceling a long running operation public boolean is Cancel Enabled return f Cancel Enabled  ProgressIndication isCancelEnabled fCancelEnabled
Sets the cancel status This method is usually called with the argument false if a client wants to abort a cancel action public void set Canceled boolean b f Is Canceled b if f Cancel Button null f Cancel Button set Enabled b  setCanceled fIsCanceled fCancelButton fCancelButton setEnabled
Controls whether the Progress Indication provides UI for canceling a long running operation If the Progress Indication is currently visible calling this method may have a direct effect on the layout because it will make a cancel button visible public void set Cancel Enabled boolean enabled f Cancel Enabled enabled if f Progress Is Visible f Cancel Button Is Visible enabled show Button layout if f Cancel Button null f Cancel Button is Disposed f Cancel Button set Enabled enabled  ProgressIndication ProgressIndication setCancelEnabled fCancelEnabled fProgressIsVisible fCancelButtonIsVisible showButton fCancelButton fCancelButton isDisposed fCancelButton setEnabled
Sets the error message text to be displayed on the status line The image on the status line is cleared param message the error message or code null code for no error message public void set Error Message String message set Error Message null message  setErrorMessage setErrorMessage
Sets an image and error message text to be displayed on the status line param image the image to use or code null code for no image param message the error message or code null code for no error message public void set Error Message Image image String message f Error Text trim message f Error Image image update Message Label  setErrorMessage fErrorText fErrorImage updateMessageLabel
Applies the given font to this status line public void set Font Font font super set Font font Control children get Children for int i 0 i children length i children i set Font font  setFont setFont getChildren setFont
Sets the message text to be displayed on the status line The image on the status line is cleared param message the error message or code null code for no error message public void set Message String message set Message null message  setMessage setMessage
Sets an image and a message text to be displayed on the status line param image the image to use or code null code for no image param message the message or code null code for no message public void set Message Image image String message f Message Text trim message f Message Image image update Message Label  setMessage fMessageText fMessageImage updateMessageLabel
see I Progress Monitor set Task Name java lang String public void set Task Name String name f Task Name name  IProgressMonitor setTaskName setTaskName fTaskName
Makes the Cancel button visible private protected void show Button if f Tool Bar null f Tool Bar is Disposed f Tool Bar set Visible true f Tool Bar set Enabled true f Tool Bar set Cursor f Stop Button Cursor f Cancel Button Is Visible true  showButton fToolBar fToolBar isDisposed fToolBar setVisible fToolBar setEnabled fToolBar setCursor fStopButtonCursor fCancelButtonIsVisible
Shows the Cancel button and Progress Indicator private protected void show Progress if f Progress Is Visible is Disposed f Progress Is Visible true if f Cancel Enabled show Button if f Progress Bar Composite null f Progress Bar Composite is Disposed f Progress Bar Composite set Visible true layout  ProgressIndicator showProgress fProgressIsVisible isDisposed fProgressIsVisible fCancelEnabled showButton fProgressBarComposite fProgressBarComposite isDisposed fProgressBarComposite setVisible
private void start Task final long timestamp final boolean animated if f Progress Is Visible f Start Time timestamp show Progress if animated if f Progress Bar null f Progress Bar is Disposed f Progress Bar begin Animated Task  startTask fProgressIsVisible fStartTime showProgress fProgressBar fProgressBar isDisposed fProgressBar beginAnimatedTask
Notifies that a subtask of the main task is beginning Subtasks are optional the main task might not have subtasks param name the name or description of the subtask see I Progress Monitor sub Task String public void sub Task String name String text if f Task Name length 0 text name else text J Face Resources format Set SubTask new Object f Task Name name NON NLS 1 set Message text  IProgressMonitor subTask subTask fTaskName JFaceResources Set_SubTask fTaskName setMessage
Trims the message to be displayable in the status line This just pulls out the first line of the message Allows null String trim String message if message null return null int cr message index Of r int lf message index Of n if cr 1 lf 1 return message int len if cr 1 len lf else if lf 1 len cr else len Math min cr lf return message substring 0 len  indexOf indexOf
Updates the message label widget protected void update Message Label if f Message Label null f Message Label is Disposed Display display f Message Label get Display if f Error Text null f Error Text length 0 f Error Image null f Message Label set Foreground J Face Colors get Error Text display f Message Label set Text f Error Text f Message Label set Image f Error Image else f Message Label set Foreground display get System Color SWT COLOR WIDGET FOREGROUND f Message Label set Text f Message Text null f Message Text NON NLS 1 f Message Label set Image f Message Image  updateMessageLabel fMessageLabel fMessageLabel isDisposed fMessageLabel getDisplay fErrorText fErrorText fErrorImage fMessageLabel setForeground JFaceColors getErrorText fMessageLabel setText fErrorText fMessageLabel setImage fErrorImage fMessageLabel setForeground getSystemColor COLOR_WIDGET_FOREGROUND fMessageLabel setText fMessageText fMessageText fMessageLabel setImage fMessageImage
see I Progress Monitor worked int public void worked int work internal Worked work  IProgressMonitor internalWorked

Creates an initial status line layout data object public Status Line Layout Data super  StatusLineLayoutData

Creates a new status line manager Use the code create Control code method to create the status line control public Status Line Manager do nothing  createControl StatusLineManager
Creates and returns this manager s status line control Does not create a new control if one already exists p Note Since 3 0 the return type is code Control code Before 3 0 the return type was the package private class code Status Line code p param parent the parent control return the status line control public Control create Control Composite parent return create Control parent SWT NONE  StatusLine createControl createControl
Creates and returns this manager s status line control Does not create a new control if one already exists param parent the parent control param style the style for the control return the status line control since 3 0 public Control create Control Composite parent int style if status Line Exist parent null status Line new Status Line parent style add new Group Marker BEGIN GROUP add new Group Marker MIDDLE GROUP add new Group Marker END GROUP update false return status Line  createControl statusLineExist statusLine StatusLine GroupMarker BEGIN_GROUP GroupMarker MIDDLE_GROUP GroupMarker END_GROUP statusLine
Disposes of this status line manager and frees all allocated SWT resources Notifies all contribution items of the dispose Note that this method does not clean up references between this status line manager and its associated contribution items Use code remove All code for that purpose public void dispose if status Line Exist status Line dispose status Line null I Contribution Item items get Items for int i 0 i items length i items i dispose  removeAll statusLineExist statusLine statusLine IContributionItem getItems
Returns the control used by this Status Line Manager return the control used by this manager public Control get Control return status Line  StatusLineManager getControl statusLine
Returns the progress monitor delegate Override this method to provide your own object used to handle progress return the I Progress Monitor delegate since 3 0 protected I Progress Monitor get Progress Monitor Delegate return I Progress Monitor get Control  IProgressMonitor IProgressMonitor getProgressMonitorDelegate IProgressMonitor getControl
see org eclipse core runtime I Progress Monitor begin Task java lang String int public void begin Task String name int total Work progress Delegate begin Task name total Work  IProgressMonitor beginTask beginTask totalWork progressDelegate beginTask totalWork
see org eclipse core runtime I Progress Monitor done public void done progress Delegate done  IProgressMonitor progressDelegate
see org eclipse core runtime I Progress Monitor internal Worked double public void internal Worked double work progress Delegate internal Worked work  IProgressMonitor internalWorked internalWorked progressDelegate internalWorked
see org eclipse core runtime I Progress Monitor is Canceled public boolean is Canceled return progress Delegate is Canceled  IProgressMonitor isCanceled isCanceled progressDelegate isCanceled
public void set Canceled boolean value Don t bother updating for disposed status if status Line is Disposed return progress Delegate set Canceled value  setCanceled statusLine isDisposed progressDelegate setCanceled
see org eclipse core runtime I Progress Monitor set Task Name java lang String public void set Task Name String name progress Delegate set Task Name name  IProgressMonitor setTaskName setTaskName progressDelegate setTaskName
see org eclipse core runtime I Progress Monitor sub Task java lang String public void sub Task String name progress Delegate sub Task name  IProgressMonitor subTask subTask progressDelegate subTask
see org eclipse core runtime I Progress Monitor worked int public void worked int work progress Delegate worked work  IProgressMonitor progressDelegate
see org eclipse core runtime I Progress Monitor With Blocking clear Blocked public void clear Blocked Do nothing here as we let the modal context handle it  IProgressMonitorWithBlocking clearBlocked clearBlocked
see org eclipse core runtime I Progress Monitor With Blocking set Blocked org eclipse core runtime I Status public void set Blocked I Status reason Do nothing here as we let the modal context handle it  IProgressMonitorWithBlocking setBlocked IStatus setBlocked IStatus
public I Progress Monitor get Progress Monitor return new I Progress Monitor With Blocking I Progress Monitor progress Delegate get Progress Monitor Delegate non Javadoc see org eclipse core runtime I Progress Monitor begin Task java lang String int public void begin Task String name int total Work progress Delegate begin Task name total Work non Javadoc see org eclipse core runtime I Progress Monitor done public void done progress Delegate done non Javadoc see org eclipse core runtime I Progress Monitor internal Worked double public void internal Worked double work progress Delegate internal Worked work non Javadoc see org eclipse core runtime I Progress Monitor is Canceled public boolean is Canceled return progress Delegate is Canceled non Javadoc see org eclipse core runtime I Progress Monitor set Canceled boolean public void set Canceled boolean value Don t bother updating for disposed status if status Line is Disposed return progress Delegate set Canceled value non Javadoc see org eclipse core runtime I Progress Monitor set Task Name java lang String public void set Task Name String name progress Delegate set Task Name name non Javadoc see org eclipse core runtime I Progress Monitor sub Task java lang String public void sub Task String name progress Delegate sub Task name non Javadoc see org eclipse core runtime I Progress Monitor worked int public void worked int work progress Delegate worked work non Javadoc see org eclipse core runtime I Progress Monitor With Blocking clear Blocked public void clear Blocked Do nothing here as we let the modal context handle it non Javadoc see org eclipse core runtime I Progress Monitor With Blocking set Blocked org eclipse core runtime I Status public void set Blocked I Status reason Do nothing here as we let the modal context handle it  IProgressMonitor getProgressMonitor IProgressMonitorWithBlocking IProgressMonitor progressDelegate getProgressMonitorDelegate IProgressMonitor beginTask beginTask totalWork progressDelegate beginTask totalWork IProgressMonitor progressDelegate IProgressMonitor internalWorked internalWorked progressDelegate internalWorked IProgressMonitor isCanceled isCanceled progressDelegate isCanceled IProgressMonitor setCanceled setCanceled statusLine isDisposed progressDelegate setCanceled IProgressMonitor setTaskName setTaskName progressDelegate setTaskName IProgressMonitor subTask subTask progressDelegate subTask IProgressMonitor progressDelegate IProgressMonitorWithBlocking clearBlocked clearBlocked IProgressMonitorWithBlocking setBlocked IStatus setBlocked IStatus
Method declared on I Statue Line Manager public boolean is Cancel Enabled return status Line Exist Status Line status Line is Cancel Enabled  IStatueLineManager isCancelEnabled statusLineExist StatusLine statusLine isCancelEnabled
Method declared on I Statue Line Manager public void set Cancel Enabled boolean enabled if status Line Exist Status Line status Line set Cancel Enabled enabled  IStatueLineManager setCancelEnabled statusLineExist StatusLine statusLine setCancelEnabled
Method declared on I Status Line Manager public void set Error Message String message if status Line Exist Status Line status Line set Error Message message  IStatusLineManager setErrorMessage statusLineExist StatusLine statusLine setErrorMessage
Method declared on I Status Line Manager public void set Error Message Image image String message if status Line Exist Status Line status Line set Error Message image message  IStatusLineManager setErrorMessage statusLineExist StatusLine statusLine setErrorMessage
Method declared on I Status Line Manager public void set Message String message if status Line Exist Status Line status Line set Message message  IStatusLineManager setMessage statusLineExist StatusLine statusLine setMessage
Method declared on I Status Line Manager public void set Message Image image String message if status Line Exist Status Line status Line set Message image message  IStatusLineManager setMessage statusLineExist StatusLine statusLine setMessage
Returns whether the status line control is created and not disposed return code true code if the control is created and not disposed code false code otherwise private boolean status Line Exist return status Line null status Line is Disposed  statusLineExist statusLine statusLine isDisposed
public void update boolean force boolean DEBUG false if is Dirty force if status Line Exist status Line set Redraw false NOTE the update algorithm is non incremental An incremental algorithm requires that SWT items can be created in the middle of the list but the Contribution Item fill Composite method used here does not take an index so this is not possible Control ws status Line get Children for int i 0 i ws length i Control w ws i Object data w get Data if data instanceof I Contribution Item w dispose int old Child Count status Line get Children length I Contribution Item items get Items for int i 0 i items length i I Contribution Item ci items i if ci is Visible ci fill status Line associate controls with contribution item Control new Children status Line get Children for int j old Child Count j new Children length j new Children j set Data ci old Child Count new Children length set Dirty false status Line layout status Line set Redraw true  isDirty statusLineExist statusLine setRedraw ContributionItem statusLine getChildren getData IContributionItem oldChildCount statusLine getChildren IContributionItem getItems IContributionItem isVisible statusLine newChildren statusLine getChildren oldChildCount newChildren newChildren setData oldChildCount newChildren setDirty statusLine statusLine setRedraw

private I Contribution Item inner Item Creates a new code Sub Contribution Item code public Sub Contribution Item I Contribution Item item inner Item item  IContributionItem innerItem SubContributionItem SubContributionItem IContributionItem innerItem
The default implementation of this code I Contribution Item code delegates to the inner item Subclasses may override public void dispose inner Item dispose  IContributionItem innerItem
Method declared on I Contribution Item public void fill Composite parent if visible inner Item fill parent  IContributionItem innerItem
Method declared on I Contribution Item public void fill Menu parent int index if visible inner Item fill parent index  IContributionItem innerItem
Method declared on I Contribution Item public void fill Tool Bar parent int index if visible inner Item fill parent index  IContributionItem ToolBar innerItem
Method declared on I Contribution Item public String get Id return inner Item get Id  IContributionItem getId innerItem getId
Returns the inner contribution item return the inner contribution item public I Contribution Item get Inner Item return inner Item  IContributionItem getInnerItem innerItem
Method declared on I Contribution Item public boolean is Enabled return inner Item is Enabled  IContributionItem isEnabled innerItem isEnabled
Method declared on I Contribution Item public boolean is Dirty return inner Item is Dirty  IContributionItem isDirty innerItem isDirty
Method declared on I Contribution Item public boolean is Dynamic return inner Item is Dynamic  IContributionItem isDynamic innerItem isDynamic
Method declared on I Contribution Item public boolean is Group Marker return inner Item is Group Marker  IContributionItem isGroupMarker innerItem isGroupMarker
Method declared on I Contribution Item public boolean is Separator return inner Item is Separator  IContributionItem isSeparator innerItem isSeparator
Method declared on I Contribution Item public boolean is Visible return visible inner Item is Visible  IContributionItem isVisible innerItem isVisible
Method declared on I Contribution Item public void set Parent I Contribution Manager parent do nothing the parent of our inner item is its Sub Contribution Manager  IContributionItem setParent IContributionManager SubContributionManager
Method declared on I Contribution Item public void set Visible boolean visible this visible visible  IContributionItem setVisible
Method declared on I Contribution Item public void update inner Item update  IContributionItem innerItem
Method declared on I Contribution Item public void update String id inner Item update id  IContributionItem innerItem
see org eclipse jface action I Contribution Item fill org eclipse swt widgets Cool Bar int public void fill Cool Bar parent int index  IContributionItem CoolBar CoolBar
see org eclipse jface action I Contribution Item save Widget State public void save Widget State  IContributionItem saveWidgetState saveWidgetState

Constructs a new code Sub Contribution Manager code param mgr the parent contribution manager All contributions made to the code Sub Contribution Manager code are forwarded and appear in the parent manager public Sub Contribution Manager I Contribution Manager mgr super parent Mgr mgr  SubContributionManager SubContributionManager SubContributionManager IContributionManager parentMgr
Method declared on I Contribution Manager public void add I Action action add new Action Contribution Item action  IContributionManager IAction ActionContributionItem
public void add I Contribution Item item item set Parent this Sub Contribution Item wrap wrap item wrap set Visible visible parent Mgr add wrap item Added item wrap  IContributionItem setParent SubContributionItem setVisible parentMgr itemAdded
Method declared on I Contribution Manager public void append To Group String group Name I Action action append To Group group Name new Action Contribution Item action  IContributionManager appendToGroup groupName IAction appendToGroup groupName ActionContributionItem
public void append To Group String group Name I Contribution Item item item set Parent this Sub Contribution Item wrap wrap item wrap set Visible visible parent Mgr append To Group group Name wrap item Added item wrap  appendToGroup groupName IContributionItem setParent SubContributionItem setVisible parentMgr appendToGroup groupName itemAdded
Disposes this sub contribution manager removing all its items and cleaning up any other resources allocated by it This must leave no trace of this sub contribution manager in the parent manager Subclasses may extend since 3 0 public void dispose Manager remove All  disposeManager removeAll
public I Contribution Item find String id I Contribution Item item parent Mgr find id Return the item passed to us not the wrapper item unwrap item return item  IContributionItem IContributionItem parentMgr
public I Contribution Item get Items I Contribution Item result new I Contribution Item map Item To Wrapper size map Item To Wrapper key Set to Array result return result  IContributionItem getItems IContributionItem IContributionItem mapItemToWrapper mapItemToWrapper keySet toArray
Returns the parent manager return the parent manager public I Contribution Manager get Parent return parent Mgr  IContributionManager getParent parentMgr
Method declared on I Contribution Manager public I Contribution Manager Overrides get Overrides return parent Mgr get Overrides  IContributionManager IContributionManagerOverrides getOverrides parentMgr getOverrides
Method declared on I Contribution Manager public void insert After String id I Action action insert After id new Action Contribution Item action  IContributionManager insertAfter IAction insertAfter ActionContributionItem
public void insert After String id I Contribution Item item item set Parent this Sub Contribution Item wrap wrap item wrap set Visible visible parent Mgr insert After id wrap item Added item wrap  insertAfter IContributionItem setParent SubContributionItem setVisible parentMgr insertAfter itemAdded
Method declared on I Contribution Manager public void insert Before String id I Action action insert Before id new Action Contribution Item action  IContributionManager insertBefore IAction insertBefore ActionContributionItem
public void insert Before String id I Contribution Item item item set Parent this Sub Contribution Item wrap wrap item wrap set Visible visible parent Mgr insert Before id wrap item Added item wrap  insertBefore IContributionItem setParent SubContributionItem setVisible parentMgr insertBefore itemAdded
Method declared on I Contribution Manager public boolean is Dirty return parent Mgr is Dirty  IContributionManager isDirty parentMgr isDirty
Method declared on I Contribution Manager public boolean is Empty return parent Mgr is Empty  IContributionManager isEmpty parentMgr isEmpty
Returns whether the contribution list is visible If the visibility is code true code then each item within the manager appears within the parent manager Otherwise the items are not visible return code true code if the manager is visible public boolean is Visible return visible  isVisible
Notifies that an item has been added p Subclasses are not expected to override this method p param item the item contributed by the client param wrap the item contributed to the parent manager as a proxy for the item contributed by the client protected void item Added I Contribution Item item Sub Contribution Item wrap map Item To Wrapper put item wrap  itemAdded IContributionItem SubContributionItem mapItemToWrapper
Notifies that an item has been removed p Subclasses are not expected to override this method p param item the item contributed by the client protected void item Removed I Contribution Item item map Item To Wrapper remove item  itemRemoved IContributionItem mapItemToWrapper
final Iterator i map Item To Wrapper values iterator return new Enumeration public boolean has More Elements return i has Next  mapItemToWrapper hasMoreElements hasNext
return i has Next public Object next Element return i next  hasNext nextElement
deprecated Use get Items String value instead public Enumeration items final Iterator i map Item To Wrapper values iterator return new Enumeration public boolean has More Elements return i has Next public Object next Element return i next  getItems mapItemToWrapper hasMoreElements hasNext nextElement
Method declared on I Contribution Manager public void mark Dirty parent Mgr mark Dirty  IContributionManager markDirty parentMgr markDirty
Method declared on I Contribution Manager public void prepend To Group String group Name I Action action prepend To Group group Name new Action Contribution Item action  IContributionManager prependToGroup groupName IAction prependToGroup groupName ActionContributionItem
public void prepend To Group String group Name I Contribution Item item item set Parent this Sub Contribution Item wrap wrap item wrap set Visible visible parent Mgr prepend To Group group Name wrap item Added item wrap  prependToGroup groupName IContributionItem setParent SubContributionItem setVisible parentMgr prependToGroup groupName itemAdded
public I Contribution Item remove String id I Contribution Item result parent Mgr remove id if result null item Removed result return result  IContributionItem IContributionItem parentMgr itemRemoved
public I Contribution Item remove I Contribution Item item Sub Contribution Item wrap Sub Contribution Item map Item To Wrapper get item if wrap null return null I Contribution Item result parent Mgr remove wrap if result null return null item Removed item return item  IContributionItem IContributionItem SubContributionItem SubContributionItem mapItemToWrapper IContributionItem parentMgr itemRemoved
public void remove All Iterator enum map Item To Wrapper values iterator while enum has Next I Contribution Item item I Contribution Item enum next parent Mgr remove item map Item To Wrapper clear  removeAll mapItemToWrapper hasNext IContributionItem IContributionItem parentMgr mapItemToWrapper
Sets the visibility of the manager If the visibility is code true code then each item within the manager appears within the parent manager Otherwise the items are not visible param visible the new visibility public void set Visible boolean visible this visible visible if map Item To Wrapper size 0 Iterator enum map Item To Wrapper values iterator while enum has Next I Contribution Item item I Contribution Item enum next item set Visible visible parent Mgr mark Dirty  setVisible mapItemToWrapper mapItemToWrapper hasNext IContributionItem IContributionItem setVisible parentMgr markDirty
Wraps a contribution item in a sub contribution item and returns the new wrapper protected Sub Contribution Item wrap I Contribution Item item return new Sub Contribution Item item  SubContributionItem IContributionItem SubContributionItem
Unwraps a nested contribution item If the contribution item is an instance of code Sub Contribution Item code then its inner item is returned Otherwise the item itself is returned param item The item to unwrap may be code null code return The inner item of code item code if code item code is a code Sub Contribution Item code code item code otherwise protected I Contribution Item unwrap I Contribution Item item if item instanceof Sub Contribution Item return Sub Contribution Item item get Inner Item return item  SubContributionItem SubContributionItem IContributionItem IContributionItem SubContributionItem SubContributionItem getInnerItem

Constructs a new manager param mgr the parent manager All contributions made to the code Sub Cool Bar Manager code are forwarded and appear in the parent manager public Sub Cool Bar Manager I Cool Bar Manager mgr super mgr Assert is Not Null mgr  SubCoolBarManager SubCoolBarManager ICoolBarManager isNotNull
see org eclipse jface action I Cool Bar Manager add org eclipse jface action I Tool Bar Manager public void add I Tool Bar Manager tool Bar Manager Assert is Not Null tool Bar Manager super add new Tool Bar Contribution Item tool Bar Manager  ICoolBarManager IToolBarManager IToolBarManager toolBarManager isNotNull toolBarManager ToolBarContributionItem toolBarManager
public int get Style It is okay to cast down since we only accept cool Bar Manager objects in the constructor return Cool Bar Manager get Parent get Style  getStyle coolBarManager CoolBarManager getParent getStyle
Returns the parent cool bar manager that this sub manager contributes to return the parent cool bar manager protected final I Cool Bar Manager get Parent Cool Bar Manager Cast is ok because that s the only thing we accept in the construtor return I Cool Bar Manager get Parent  ICoolBarManager getParentCoolBarManager ICoolBarManager getParent
see org eclipse jface action I Cool Bar Manager is Layout Locked public boolean get Lock Layout return get Parent Cool Bar Manager get Lock Layout  ICoolBarManager isLayoutLocked getLockLayout getParentCoolBarManager getLockLayout
see org eclipse jface action I Cool Bar Manager lock Layout boolean public void set Lock Layout boolean value  ICoolBarManager lockLayout setLockLayout
Sub Cool Bar Managers do not have control of the global context menu public I Menu Manager get Context Menu Manager return null  SubCoolBarManagers IMenuManager getContextMenuManager
In Sub Cool Bar Manager we do nothing public void set Context Menu Manager I Menu Manager menu Manager do nothing  SubCoolBarManager setContextMenuManager IMenuManager menuManager
public void update boolean force This method is not governed by visibility The client may call code set Visible code and then force an update At that point we need to update the parent get Parent Cool Bar Manager update force  setVisible getParentCoolBarManager

Constructs a new manager param mgr the parent manager All contributions made to the code Sub Menu Manager code are forwarded and appear in the parent manager public Sub Menu Manager I Menu Manager mgr super mgr  SubMenuManager SubMenuManager IMenuManager
menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager Object listeners menu Listeners get Listeners for int i 0 i listeners length i I Menu Listener listeners i menu About To Show Sub Menu Manager this  menuListener IMenuListener menuAboutToShow IMenuManager menuListeners getListeners IMenuListener menuAboutToShow SubMenuManager
public void add Menu Listener I Menu Listener listener menu Listeners add listener if menu Listener null menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager Object listeners menu Listeners get Listeners for int i 0 i listeners length i I Menu Listener listeners i menu About To Show Sub Menu Manager this get Parent Menu Manager add Menu Listener menu Listener  addMenuListener IMenuListener menuListeners menuListener menuListener IMenuListener menuAboutToShow IMenuManager menuListeners getListeners IMenuListener menuAboutToShow SubMenuManager getParentMenuManager addMenuListener menuListener
The default implementation of this code I Contribution Item code method does nothing Subclasses may override public void dispose do nothing  IContributionItem
public void dispose Manager if menu Listener null get Parent Menu Manager remove Menu Listener menu Listener menu Listener null menu Listeners clear super dispose Manager  disposeManager menuListener getParentMenuManager removeMenuListener menuListener menuListener menuListeners disposeManager
see org eclipse jface action I Contribution Item fill org eclipse swt widgets Composite public void fill Composite parent if is Visible get Parent Menu Manager fill parent  IContributionItem isVisible getParentMenuManager
see org eclipse jface action I Contribution Item fill org eclipse swt widgets Cool Bar int public void fill Cool Bar parent int index do nothing  IContributionItem CoolBar CoolBar
see org eclipse jface action I Contribution Item fill org eclipse swt widgets Menu int public void fill Menu parent int index if is Visible get Parent Menu Manager fill parent index  IContributionItem isVisible getParentMenuManager
see org eclipse jface action I Contribution Item fill org eclipse swt widgets Tool Bar int public void fill Tool Bar parent int index if is Visible get Parent Menu Manager fill parent index  IContributionItem ToolBar ToolBar isVisible getParentMenuManager
public I Contribution Item find String id I Contribution Item item get Parent Menu Manager find id if item instanceof Sub Contribution Item Return the item passed to us not the wrapper item unwrap item if item instanceof I Menu Manager if it is a menu manager wrap it before returning I Menu Manager menu I Menu Manager item item get Wrapper menu return item  IContributionItem IContributionItem getParentMenuManager SubContributionItem IMenuManager IMenuManager IMenuManager getWrapper
p The menu returned is wrapped within a code Sub Menu Manager code to monitor additions and removals If the visibility of this menu is modified the visibility of the submenus is also modified p public I Menu Manager find Menu Using Path String path I Contribution Item item find Using Path path if item instanceof I Menu Manager return I Menu Manager item return null  SubMenuManager IMenuManager findMenuUsingPath IContributionItem findUsingPath IMenuManager IMenuManager
public I Contribution Item find Using Path String path String id path String rest null int separator path index Of if separator 1 id path substring 0 separator rest path substring separator 1 I Contribution Item item find id unwraps item if rest null item instanceof I Menu Manager I Menu Manager menu I Menu Manager item item menu find Using Path rest return item  IContributionItem findUsingPath indexOf IContributionItem IMenuManager IMenuManager IMenuManager findUsingPath
see org eclipse jface action I Contribution Item get Id public String get Id return get Parent Menu Manager get Id  IContributionItem getId getId getParentMenuManager getId
Returns the parent menu manager that this sub manager contributes to protected final I Menu Manager get Parent Menu Manager Cast is ok because that s the only thing we accept in the construtor return I Menu Manager get Parent  IMenuManager getParentMenuManager IMenuManager getParent
see org eclipse jface action I Menu Manager get Remove All When Shown public boolean get Remove All When Shown return false  IMenuManager getRemoveAllWhenShown getRemoveAllWhenShown
Returns the menu wrapper for a menu manager p The sub menus within this menu are wrapped within a code Sub Menu Manager code to monitor additions and removals If the visibility of this menu is modified the visibility of the sub menus is also modified p return the menu wrapper protected I Menu Manager get Wrapper I Menu Manager mgr if map Menu To Wrapper null map Menu To Wrapper new Hash Map 4 Sub Menu Manager wrapper Sub Menu Manager map Menu To Wrapper get mgr if wrapper null wrapper wrap Menu mgr map Menu To Wrapper put mgr wrapper return wrapper  SubMenuManager IMenuManager getWrapper IMenuManager mapMenuToWrapper mapMenuToWrapper HashMap SubMenuManager SubMenuManager mapMenuToWrapper wrapMenu mapMenuToWrapper
see org eclipse jface action I Contribution Item is Dynamic public boolean is Dynamic return get Parent Menu Manager is Dynamic  IContributionItem isDynamic isDynamic getParentMenuManager isDynamic
see org eclipse jface action I Contribution Item is Enabled public boolean is Enabled return is Visible get Parent Menu Manager is Enabled  IContributionItem isEnabled isEnabled isVisible getParentMenuManager isEnabled
see org eclipse jface action I Contribution Item is Group Marker public boolean is Group Marker return get Parent Menu Manager is Group Marker  IContributionItem isGroupMarker isGroupMarker getParentMenuManager isGroupMarker
see org eclipse jface action I Contribution Item is Separator public boolean is Separator return get Parent Menu Manager is Separator  IContributionItem isSeparator isSeparator getParentMenuManager isSeparator
see org eclipse jface action Sub Contribution Manager is Visible public boolean is Visible return super is Visible get Parent Menu Manager is Visible  SubContributionManager isVisible isVisible isVisible getParentMenuManager isVisible
Remove all contribution items public void remove All super remove All if map Menu To Wrapper null Iterator iter map Menu To Wrapper values iterator while iter has Next Sub Menu Manager wrapper Sub Menu Manager iter next wrapper remove All map Menu To Wrapper clear map Menu To Wrapper null  removeAll removeAll mapMenuToWrapper mapMenuToWrapper hasNext SubMenuManager SubMenuManager removeAll mapMenuToWrapper mapMenuToWrapper
see org eclipse jface action I Menu Manager remove Menu Listener org eclipse jface action I Menu Listener public void remove Menu Listener I Menu Listener listener menu Listeners remove listener  IMenuManager removeMenuListener IMenuListener removeMenuListener IMenuListener menuListeners
see org eclipse jface action I Contribution Item save Widget State public void save Widget State do nothing  IContributionItem saveWidgetState saveWidgetState
see org eclipse jface action I Contribution Item set Parent org eclipse jface action I Contribution Manager public void set Parent I Contribution Manager parent do nothing our parent manager s parent is set when it is added to a manager  IContributionItem setParent IContributionManager setParent IContributionManager
see org eclipse jface action I Menu Manager set Remove All When Shown boolean public void set Remove All When Shown boolean remove All Assert is True false Should not be called on submenu manager NON NLS 1  IMenuManager setRemoveAllWhenShown setRemoveAllWhenShown removeAll isTrue
public void set Visible boolean visible super set Visible visible if map Menu To Wrapper null Iterator iter map Menu To Wrapper values iterator while iter has Next Sub Menu Manager wrapper Sub Menu Manager iter next wrapper set Visible visible  setVisible setVisible mapMenuToWrapper mapMenuToWrapper hasNext SubMenuManager SubMenuManager setVisible
public void update This method is not governed by visibility The client may call code set Visible code and then force an update At that point we need to update the parent get Parent Menu Manager update  setVisible getParentMenuManager
public void update boolean force This method is not governed by visibility The client may call code set Visible code and then force an update At that point we need to update the parent get Parent Menu Manager update force  setVisible getParentMenuManager
see org eclipse jface action I Contribution Item update java lang String public void update String id get Parent Menu Manager update id  IContributionItem getParentMenuManager
public void update All boolean force This method is not governed by visibility The client may call code set Visible code and then force an update At that point we need to update the parent get Parent Menu Manager update All force  updateAll setVisible getParentMenuManager updateAll
Wraps a menu manager in a sub menu manager and returns the new wrapper protected Sub Menu Manager wrap Menu I Menu Manager menu Sub Menu Manager mgr new Sub Menu Manager menu mgr set Visible is Visible return mgr  SubMenuManager wrapMenu IMenuManager SubMenuManager SubMenuManager setVisible isVisible

Constructs a new manager param mgr the parent manager All contributions made to the code Sub Status Line Manager code are forwarded and appear in the parent manager public Sub Status Line Manager I Status Line Manager mgr super mgr  SubStatusLineManager SubStatusLineManager IStatusLineManager
Returns the parent status line manager that this sub manager contributes to protected final I Status Line Manager get Parent Status Line Manager Cast is ok because that s the only thing we accept in the construtor return I Status Line Manager get Parent  IStatusLineManager getParentStatusLineManager IStatusLineManager getParent
Method declared on I Status Line Manager public I Progress Monitor get Progress Monitor return get Parent Status Line Manager get Progress Monitor  IStatusLineManager IProgressMonitor getProgressMonitor getParentStatusLineManager getProgressMonitor
Method declared on I Status Line Manager public boolean is Cancel Enabled return get Parent Status Line Manager is Cancel Enabled  IStatusLineManager isCancelEnabled getParentStatusLineManager isCancelEnabled
Method declared on I Status Line Manager public void set Cancel Enabled boolean enabled get Parent Status Line Manager set Cancel Enabled enabled  IStatusLineManager setCancelEnabled getParentStatusLineManager setCancelEnabled
public void set Error Message String message this error Image null this error Message message if is Visible get Parent Status Line Manager set Error Message error Message  setErrorMessage errorImage errorMessage isVisible getParentStatusLineManager setErrorMessage errorMessage
public void set Error Message Image image String message this error Image image this error Message message if is Visible get Parent Status Line Manager set Error Message error Image error Message  setErrorMessage errorImage errorMessage isVisible getParentStatusLineManager setErrorMessage errorImage errorMessage
public void set Message String message this message Image null this message message if is Visible get Parent Status Line Manager set Message message  setMessage messageImage isVisible getParentStatusLineManager setMessage
public void set Message Image image String message this message Image image this message message if is Visible get Parent Status Line Manager set Message message Image message  setMessage messageImage isVisible getParentStatusLineManager setMessage messageImage
public void set Visible boolean visible super set Visible visible if visible get Parent Status Line Manager set Error Message error Image error Message get Parent Status Line Manager set Message message Image message else get Parent Status Line Manager set Message null null get Parent Status Line Manager set Error Message null null  setVisible setVisible getParentStatusLineManager setErrorMessage errorImage errorMessage getParentStatusLineManager setMessage messageImage getParentStatusLineManager setMessage getParentStatusLineManager setErrorMessage
public void update boolean force This method is not governed by visibility The client may call code set Visible code and then force an update At that point we need to update the parent get Parent Status Line Manager update force  setVisible getParentStatusLineManager

Constructs a new manager param mgr the parent manager All contributions made to the code Sub Tool Bar Manager code are forwarded and appear in the parent manager public Sub Tool Bar Manager I Tool Bar Manager mgr super mgr  SubToolBarManager SubToolBarManager IToolBarManager
Returns the parent toolbar manager that this sub manager contributes to protected final I Tool Bar Manager get Parent Tool Bar Manager Cast is ok because that s the only thing we accept in the construtor return I Tool Bar Manager get Parent  IToolBarManager getParentToolBarManager IToolBarManager getParent
public void update boolean force This method is not governed by visibility The client may call code set Visible code and then force an update At that point we need to update the parent get Parent Tool Bar Manager update force  setVisible getParentToolBarManager

Convenience method equivalent to code Tool Bar Contribution Item new Tool Bar Manager null code public Tool Bar Contribution Item this new Tool Bar Manager null  ToolBarContributionItem ToolBarManager ToolBarContributionItem ToolBarManager
Convenience method equivalent to code Tool Bar Contribution Item tool Bar Manager null code param tool Bar Manager the tool bar manager public Tool Bar Contribution Item I Tool Bar Manager tool Bar Manager this tool Bar Manager null  ToolBarContributionItem toolBarManager toolBarManager ToolBarContributionItem IToolBarManager toolBarManager toolBarManager
Creates a tool bar contribution item param tool Bar Manager the tool bar manager to wrap param id the contribution item id or code null code if none public Tool Bar Contribution Item I Tool Bar Manager tool Bar Manager String id super id Assert is True tool Bar Manager instanceof Tool Bar Manager this tool Bar Manager Tool Bar Manager tool Bar Manager  toolBarManager ToolBarContributionItem IToolBarManager toolBarManager isTrue toolBarManager ToolBarManager toolBarManager ToolBarManager toolBarManager
Checks whether this contribution item has been disposed If it has and the tracing options are active then it prints some debugging information return code true code if the item is disposed code false code otherwise private final boolean check Disposed if disposed if Policy TRACE TOOLBAR NON NLS 1 System out println Method invocation on a disposed tool bar contribution item NON NLS 1 new Exception print Stack Trace System out return true return false  checkDisposed TRACE_TOOLBAR printStackTrace
public void dispose Dispose of the Tool Bar and all its contributions if tool Bar Manager null tool Bar Manager dispose tool Bar Manager null We need to dispose the cool item or we might be left holding a cool item with a disposed control if cool Item null cool Item is Disposed cool Item dispose cool Item null Mark this item as disposed disposed true  ToolBar toolBarManager toolBarManager toolBarManager coolItem coolItem isDisposed coolItem coolItem
public void handle Event Event event if the toolbar does not have its own context menu then handle the event if tool Bar Manager get Context Menu Manager null handle Context Menu event  handleEvent toolBarManager getContextMenuManager handleContextMenu
public void widget Selected Selection Event event if event detail SWT ARROW handle Chevron event  widgetSelected SelectionEvent handleChevron
cool Item add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event handle Widget Dispose event  coolItem addDisposeListener DisposeListener widgetDisposed DisposeEvent handleWidgetDispose
public void fill Cool Bar cool Bar int index if check Disposed return if cool Item null cool Bar null Tool Bar old Tool Bar tool Bar Manager get Control Tool Bar tool Bar tool Bar Manager create Control cool Bar if old Tool Bar null old Tool Bar equals tool Bar We are using an old tool bar so we need to update tool Bar Manager update true Do not create a cool Item if the toolbar is empty if tool Bar get Item Count 1 return int flags SWT DROP DOWN if index 0 cool Item new Cool Item cool Bar flags index else cool Item new Cool Item cool Bar flags sets the back reference cool Item set Data this Add the toolbar to the Cool Item widget cool Item set Control tool Bar Handle Context Menu tool Bar add Listener SWT Menu Detect new Listener public void handle Event Event event if the toolbar does not have its own context menu then handle the event if tool Bar Manager get Context Menu Manager null handle Context Menu event Handle for chevron clicking if get Use Chevron Chevron Support cool Item add Selection Listener new Selection Adapter public void widget Selected Selection Event event if event detail SWT ARROW handle Chevron event Handle for disposal cool Item add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event handle Widget Dispose event Sets the size of the cool Item update Size true  CoolBar coolBar checkDisposed coolItem coolBar ToolBar oldToolBar toolBarManager getControl ToolBar toolBar toolBarManager createControl coolBar oldToolBar oldToolBar toolBar toolBarManager coolItem toolBar getItemCount DROP_DOWN coolItem CoolItem coolBar coolItem CoolItem coolBar coolItem setData CoolItem coolItem setControl toolBar toolBar addListener MenuDetect handleEvent toolBarManager getContextMenuManager handleContextMenu getUseChevron coolItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleChevron coolItem addDisposeListener DisposeListener widgetDisposed DisposeEvent handleWidgetDispose coolItem updateSize
Returns a consistent set of wrap indices The return value will always include at least one entry and the first entry will always be zero Cool Bar get Wrap Indices is inconsistent in whether or not it returns an index for the first row private int get Adjusted Wrap Indices int wraps int adjusted Wrap Indices if wraps length 0 adjusted Wrap Indices new int 0 else if wraps 0 0 adjusted Wrap Indices new int wraps length 1 adjusted Wrap Indices 0 0 for int i 0 i wraps length i adjusted Wrap Indices i 1 wraps i else adjusted Wrap Indices wraps return adjusted Wrap Indices  CoolBar getWrapIndices getAdjustedWrapIndices adjustedWrapIndices adjustedWrapIndices adjustedWrapIndices adjustedWrapIndices adjustedWrapIndices adjustedWrapIndices adjustedWrapIndices
Returns the current height of the corresponding cool item return the current height public int get Current Height if check Disposed return 1 return current Height  getCurrentHeight checkDisposed currentHeight
Returns the current width of the corresponding cool item return the current size public int get Current Width if check Disposed return 1 return current Width  getCurrentWidth checkDisposed currentWidth
Returns the minimum number of tool items to show in the cool item return the minimum number of tool items to show or code SHOW ALL ITEMS code if a value was not set see set Minimum Items To Show int public int get Minimum Items To Show if check Disposed return 1 return minimum Items To Show  SHOW_ALL_ITEMS setMinimumItemsToShow getMinimumItemsToShow checkDisposed minimumItemsToShow
Returns the internal tool bar manager of the contribution item return the tool bar manager or code null code if one is not defined see I Tool Bar Manager public I Tool Bar Manager get Tool Bar Manager if check Disposed return null return tool Bar Manager  IToolBarManager IToolBarManager getToolBarManager checkDisposed toolBarManager
Returns whether chevron support is enabled return code true code if chevron support is enabled code false code otherwise public boolean get Use Chevron if check Disposed return false return use Chevron  getUseChevron checkDisposed useChevron
Create and display the chevron menu private void handle Chevron Selection Event event Cool Item item Cool Item event widget Control control item get Control if control instanceof Tool Bar false return Cool Bar cool Bar item get Parent Tool Bar tool Bar Tool Bar control Rectangle tool Bar Bounds tool Bar get Bounds Tool Item items tool Bar get Items Array List hidden new Array List for int i 0 i items length i Rectangle item Bounds items i get Bounds if item Bounds x item Bounds width tool Bar Bounds width item Bounds y item Bounds height tool Bar Bounds height hidden add items i Create a pop up menu with items for each of the hidden buttons if chevron Menu Manager null chevron Menu Manager dispose chevron Menu Manager new Menu Manager for Iterator i hidden iterator i has Next Tool Item tool Item Tool Item i next I Contribution Item data I Contribution Item tool Item get Data if data instanceof Action Contribution Item Action Contribution Item contribution new Action Contribution Item Action Contribution Item data get Action chevron Menu Manager add contribution else if data instanceof Sub Contribution Item I Contribution Item inner Data Sub Contribution Item data get Inner Item if inner Data instanceof Action Contribution Item Action Contribution Item contribution new Action Contribution Item Action Contribution Item inner Data get Action chevron Menu Manager add contribution else if data is Separator chevron Menu Manager add new Separator Menu popup chevron Menu Manager create Context Menu cool Bar Point chevron Position cool Bar to Display event x event y popup set Location chevron Position x chevron Position y popup set Visible true  handleChevron SelectionEvent CoolItem CoolItem getControl ToolBar CoolBar coolBar getParent ToolBar toolBar ToolBar toolBarBounds toolBar getBounds ToolItem toolBar getItems ArrayList ArrayList itemBounds getBounds itemBounds itemBounds toolBarBounds itemBounds itemBounds toolBarBounds chevronMenuManager chevronMenuManager chevronMenuManager MenuManager hasNext ToolItem toolItem ToolItem IContributionItem IContributionItem toolItem getData ActionContributionItem ActionContributionItem ActionContributionItem ActionContributionItem getAction chevronMenuManager SubContributionItem IContributionItem innerData SubContributionItem getInnerItem innerData ActionContributionItem ActionContributionItem ActionContributionItem ActionContributionItem innerData getAction chevronMenuManager isSeparator chevronMenuManager chevronMenuManager createContextMenu coolBar chevronPosition coolBar toDisplay setLocation chevronPosition chevronPosition setVisible
public void handle Event Event inner Event Tool Bar inner Tool Bar tool Bar Manager get Control if inner Tool Bar null inner Tool Bar set Menu null Menu inner Parent Menu inner Tool Bar get Parent get Menu if inner Parent Menu null inner Parent Menu remove Listener SWT Hide this  handleEvent innerEvent ToolBar innerToolBar toolBarManager getControl innerToolBar innerToolBar setMenu innerParentMenu innerToolBar getParent getMenu innerParentMenu innerParentMenu removeListener
Handles the event when the toobar item does not have its own context menu param event the event object private void handle Context Menu Event event Tool Bar tool Bar tool Bar Manager get Control If parent has a menu then use that one Menu parent Menu tool Bar get Parent get Menu if parent Menu null parent Menu is Disposed tool Bar set Menu parent Menu Hook listener to remove menu once it has disapeared parent Menu add Listener SWT Hide new Listener public void handle Event Event inner Event Tool Bar inner Tool Bar tool Bar Manager get Control if inner Tool Bar null inner Tool Bar set Menu null Menu inner Parent Menu inner Tool Bar get Parent get Menu if inner Parent Menu null inner Parent Menu remove Listener SWT Hide this  handleContextMenu ToolBar toolBar toolBarManager getControl parentMenu toolBar getParent getMenu parentMenu parentMenu isDisposed toolBar setMenu parentMenu parentMenu addListener handleEvent innerEvent ToolBar innerToolBar toolBarManager getControl innerToolBar innerToolBar setMenu innerParentMenu innerToolBar getParent getMenu innerParentMenu innerParentMenu removeListener
Handles the disposal of the widget param event the event object private void handle Widget Dispose Dispose Event event cool Item null  handleWidgetDispose DisposeEvent coolItem
A contribution item is visible iff its internal state is visible em or em the tool bar manager contains something other than group markers and separators return code true code if the tool bar manager contains something other than group marks and separators and the internal state is set to be visible public boolean is Visible if check Disposed return false boolean visible Item false if tool Bar Manager null I Contribution Item contribution Items tool Bar Manager get Items for int i 0 i contribution Items length i I Contribution Item contribution Item contribution Items i if contribution Item is Group Marker contribution Item is Separator visible Item true break return visible Item super is Visible  isVisible checkDisposed visibleItem toolBarManager IContributionItem contributionItems toolBarManager getItems contributionItems IContributionItem contributionItem contributionItems contributionItem isGroupMarker contributionItem isSeparator visibleItem visibleItem isVisible
public void save Widget State if check Disposed return if cool Item null return 1 Save current size Cool Bar cool Bar cool Item get Parent boolean is Last On Row false int last Index cool Bar get Item Count 1 int cool Item Index cool Bar index Of cool Item int wrap Indicies get Adjusted Wrap Indices cool Bar get Wrap Indices Traverse through all wrap indicies backwards for int row wrap Indicies length 1 row 0 row if wrap Indicies row cool Item Index int next Row row 1 int next Row Start Index if next Row wrap Indicies length 1 next Row Start Index last Index 1 else next Row Start Index wrap Indicies next Row Check to see if its the last item on the row if cool Item Index next Row Start Index 1 is Last On Row true break Save the preferred size as actual size for the last item on a row int n Current Width if is Last On Row n Current Width cool Item get Preferred Size x else n Current Width cool Item get Size x set Current Width n Current Width set Current Height cool Item get Size y  saveWidgetState checkDisposed coolItem CoolBar coolBar coolItem getParent isLastOnRow lastIndex coolBar getItemCount coolItemIndex coolBar indexOf coolItem wrapIndicies getAdjustedWrapIndices coolBar getWrapIndices wrapIndicies wrapIndicies coolItemIndex nextRow nextRowStartIndex nextRow wrapIndicies nextRowStartIndex lastIndex nextRowStartIndex wrapIndicies nextRow coolItemIndex nextRowStartIndex isLastOnRow nCurrentWidth isLastOnRow nCurrentWidth coolItem getPreferredSize nCurrentWidth coolItem getSize setCurrentWidth nCurrentWidth setCurrentHeight coolItem getSize
Sets the current height of the cool item Update SIZE should be called to adjust the widget param current Height the current height to set public void set Current Height int current Height if check Disposed return this current Height current Height  currentHeight setCurrentHeight currentHeight checkDisposed currentHeight currentHeight
Sets the current width of the cool item Update SIZE should be called to adjust the widget param current Width the current width to set public void set Current Width int current Width if check Disposed return this current Width current Width  currentWidth setCurrentWidth currentWidth checkDisposed currentWidth currentWidth
Sets the minimum number of tool items to show in the cool item If this number is less than the total tool items a chevron will appear and the hidden tool items appear in a drop down menu By default all the tool items are shown in the cool item param minimum Items To Show the minimum number of tool items to show see get Minimum Items To Show see set Use Chevron boolean public void set Minimum Items To Show int minimum Items To Show if check Disposed return this minimum Items To Show minimum Items To Show  minimumItemsToShow getMinimumItemsToShow setUseChevron setMinimumItemsToShow minimumItemsToShow checkDisposed minimumItemsToShow minimumItemsToShow
Enables or disables chevron support for the cool item By default chevron support is enabled param value code true code to enable chevron support code false code otherwise public void set Use Chevron boolean value if check Disposed return use Chevron value  setUseChevron checkDisposed useChevron
public void update String property Name if check Disposed return if cool Item null I Tool Bar Manager manager get Tool Bar Manager if manager null manager update true if property Name null property Name equals I Cool Bar Manager SIZE update Size true  propertyName checkDisposed coolItem IToolBarManager getToolBarManager propertyName propertyName ICoolBarManager updateSize
Updates the cool items preferred minimum and current size The preferred size is calculated based on the tool bar size and extra trim param change Current Size code true code if the current size should be changed to the preferred size code false code to not change the current size private void update Size boolean change Current Size if check Disposed return cannot set size if cool Item is null if cool Item null cool Item is Disposed return boolean locked false Cool Bar cool Bar cool Item get Parent try Fix odd behaviour with locked tool bars if cool Bar null if cool Bar get Locked cool Bar set Locked false locked true Tool Bar tool Bar Tool Bar cool Item get Control if tool Bar null tool Bar is Disposed tool Bar get Item Count 0 if the toolbar does not contain any items then dispose of cool Item cool Item set Data null Control control cool Item get Control if control null control is Disposed control dispose cool Item set Control null if cool Item is Disposed cool Item dispose else If the toolbar item exists then adjust the size of the cool item Point tool Bar Size tool Bar compute Size SWT DEFAULT SWT DEFAULT Set the preffered size to the size of the toolbar plus trim Point preferred Size cool Item compute Size tool Bar Size x tool Bar Size y cool Item set Preferred Size preferred Size note set Minimum Size must be called before set Size see PR 15565 Set minimum size if get Minimum Items To Show SHOW ALL ITEMS int tool Item Width tool Bar get Items 0 get Width int minimum Width tool Item Width get Minimum Items To Show cool Item set Minimum Size minimum Width tool Bar Size y else cool Item set Minimum Size tool Bar Size x tool Bar Size y if change Current Size Set current size to preferred size cool Item set Size preferred Size finally If the cool bar was locked then set it back to locked if locked cool Bar null cool Bar set Locked true  changeCurrentSize updateSize changeCurrentSize checkDisposed coolItem coolItem coolItem isDisposed CoolBar coolBar coolItem getParent coolBar coolBar getLocked coolBar setLocked ToolBar toolBar ToolBar coolItem getControl toolBar toolBar isDisposed toolBar getItemCount coolItem coolItem setData coolItem getControl isDisposed coolItem setControl coolItem isDisposed coolItem toolBarSize toolBar computeSize preferredSize coolItem computeSize toolBarSize toolBarSize coolItem setPreferredSize preferredSize setMinimumSize setSize getMinimumItemsToShow SHOW_ALL_ITEMS toolItemWidth toolBar getItems getWidth minimumWidth toolItemWidth getMinimumItemsToShow coolItem setMinimumSize minimumWidth toolBarSize coolItem setMinimumSize toolBarSize toolBarSize changeCurrentSize coolItem setSize preferredSize coolBar coolBar setLocked

Creates a new tool bar manager with the default SWT button style Use the code create Control code method to create the tool bar control public Tool Bar Manager  createControl ToolBarManager
Creates a tool bar manager with the given SWT button style Use the code create Control code method to create the tool bar control param style the tool bar item style see org eclipse swt widgets Tool Bar for valid style bits public Tool Bar Manager int style item Style style  createControl ToolBar ToolBarManager itemStyle
Creates a tool bar manager for an existing tool bar control This manager becomes responsible for the control and will dispose of it when the manager is disposed param toolbar the tool bar control public Tool Bar Manager Tool Bar toolbar this this tool Bar toolbar  ToolBarManager ToolBar toolBar
Creates and returns this manager s tool bar control Does not create a new control if one already exists param parent the parent control return the tool bar control public Tool Bar create Control Composite parent if tool Bar Exist parent null tool Bar new Tool Bar parent item Style tool Bar set Menu get Context Menu Control update false return tool Bar  ToolBar createControl toolBarExist toolBar ToolBar itemStyle toolBar setMenu getContextMenuControl toolBar
Disposes of this tool bar manager and frees all allocated SWT resources Notifies all contribution items of the dispose Note that this method does not clean up references between this tool bar manager and its associated contribution items Use code remove All code for that purpose public void dispose if tool Bar Exist tool Bar dispose tool Bar null I Contribution Item items get Items for int i 0 i items length i items i dispose if get Context Menu Manager null get Context Menu Manager dispose set Context Menu Manager null  removeAll toolBarExist toolBar toolBar IContributionItem getItems getContextMenuManager getContextMenuManager setContextMenuManager
Returns the tool bar control for this manager return the tool bar control or code null code if none before creating or after disposal public Tool Bar get Control return tool Bar  ToolBar getControl toolBar
Re lays out the tool bar p The default implementation of this framework method re lays out the parent when the number of items crosses the zero threshold Subclasses should override this method to implement their own re layout strategy param tool Bar the tool bar control param old Count the old number of items param new Count the new number of items protected void relayout Tool Bar tool Bar int old Count int new Count if old Count 0 new Count 0 tool Bar get Parent layout  toolBar oldCount newCount ToolBar toolBar oldCount newCount oldCount newCount toolBar getParent
Returns whether the tool bar control is created and not disposed return code true code if the control is created and not disposed code false code otherwise private boolean tool Bar Exist return tool Bar null tool Bar is Disposed  toolBarExist toolBar toolBar isDisposed
public void update boolean force long start Time 0 if DEBUG dump Statistics start Time new Date get Time if is Dirty force if tool Bar Exist int old Count tool Bar get Item Count clean contains all active items without double separators I Contribution Item items get Items Array List clean new Array List items length I Contribution Item separator null long clean Start Time 0 if DEBUG clean Start Time new Date get Time for int i 0 i items length i I Contribution Item ci items i if ci is Visible continue if ci is Separator delay creation until necessary handles both adjacent separators and separator at end separator ci else if separator null if clean size 0 no separator if first item clean add separator separator null clean add ci if DEBUG System out println Time needed to build clean vector new Date get Time clean Start Time determine obsolete items removed or non active Tool Item mi tool Bar get Items Array List to Remove new Array List mi length for int i 0 i mi length i Object data mi i get Data if data null clean contains data data instanceof I Contribution Item I Contribution Item data is Dynamic to Remove add mi i Turn redraw off if the number of items to be added is above a certain threshold to minimize flicker otherwise the toolbar can be seen to redraw after each item Do this before any modifications are made We assume each contribution item will contribute at least one toolbar item boolean use Redraw clean size mi length to Remove size 3 if use Redraw tool Bar set Redraw false remove obsolete items for int i to Remove size i 0 Tool Item item Tool Item to Remove get i if item is Disposed Control ctrl item get Control if ctrl null item set Control null ctrl dispose item dispose add new items I Contribution Item src dest mi tool Bar get Items int src Ix 0 int dest Ix 0 for Iterator e clean iterator e has Next src I Contribution Item e next get corresponding item in SWT widget if src Ix mi length dest I Contribution Item mi src Ix get Data else dest null if dest null src equals dest src Ix dest Ix continue if dest null dest is Separator src is Separator mi src Ix set Data src src Ix dest Ix continue int start tool Bar get Item Count src fill tool Bar dest Ix int new Items tool Bar get Item Count start for int i 0 i new Items i Tool Item item tool Bar get Item dest Ix item set Data src remove any old tool items not accounted for for int i mi length i src Ix Tool Item item mi i if item is Disposed Control ctrl item get Control if ctrl null item set Control null ctrl dispose item dispose set Dirty false turn redraw back on if we turned it off above if use Redraw tool Bar set Redraw true int new Count tool Bar get Item Count relayout tool Bar old Count new Count if DEBUG System out println Time needed for update new Date get Time start Time System out println  startTime dumpStatistics startTime getTime isDirty toolBarExist oldCount toolBar getItemCount IContributionItem getItems ArrayList ArrayList IContributionItem cleanStartTime cleanStartTime getTime IContributionItem isVisible isSeparator getTime cleanStartTime ToolItem toolBar getItems ArrayList toRemove ArrayList getData IContributionItem IContributionItem isDynamic toRemove useRedraw toRemove useRedraw toolBar setRedraw toRemove ToolItem ToolItem toRemove isDisposed getControl setControl IContributionItem toolBar getItems srcIx destIx hasNext IContributionItem srcIx IContributionItem srcIx getData srcIx destIx isSeparator isSeparator srcIx setData srcIx destIx toolBar getItemCount toolBar destIx newItems toolBar getItemCount newItems ToolItem toolBar getItem destIx setData srcIx ToolItem isDisposed getControl setControl setDirty useRedraw toolBar setRedraw newCount toolBar getItemCount toolBar oldCount newCount getTime startTime
Returns the control of the Menu Manager If the menu manager does not have a control then one is created return menu widget associated with manager private Menu get Context Menu Control if context Menu Manager null tool Bar null Menu menu Widget context Menu Manager get Menu if menu Widget null menu Widget is Disposed menu Widget context Menu Manager create Context Menu tool Bar return menu Widget return null  getContextMenuControl contextMenuManager toolBar menuWidget contextMenuManager getMenu menuWidget menuWidget isDisposed menuWidget contextMenuManager createContextMenu toolBar menuWidget
Returns the context menu manager for this tool bar manager return the context menu manager or code null code if none since 3 0 public Menu Manager get Context Menu Manager return context Menu Manager  MenuManager getContextMenuManager contextMenuManager
Sets the context menu manager for this tool bar manager to the given menu manager If the tool bar control exists it also adds the menu control to the tool bar param context Menu Manager the context menu manager or code null code if none since 3 0 public void set Context Menu Manager Menu Manager context Menu Manager this context Menu Manager context Menu Manager if tool Bar null tool Bar set Menu get Context Menu Control  contextMenuManager setContextMenuManager MenuManager contextMenuManager contextMenuManager contextMenuManager toolBar toolBar setMenu getContextMenuControl

Creates a new link Abstract Control Content Assist Subject Adapter public Abstract Control Content Assist Subject Adapter f Verify Key Listeners new Array List 1 f Key Listeners new Hash Set 1  AbstractControlContentAssistSubjectAdapter AbstractControlContentAssistSubjectAdapter fVerifyKeyListeners ArrayList fKeyListeners HashSet
see org eclipse jface text contentassist I Content Assist Subject Control get Control public abstract Control get Control  IContentAssistSubjectControl getControl getControl
public void add Key Listener Key Listener key Listener f Key Listeners add key Listener if DEBUG System out println Abstract Control Content Assist Subject Adapter add Key Listener NON NLS 1 install Control Listener  addKeyListener KeyListener keyListener fKeyListeners keyListener AbstractControlContentAssistSubjectAdapter addKeyListener installControlListener
public void remove Key Listener Key Listener key Listener boolean deleted f Key Listeners remove key Listener if DEBUG if deleted System out println remove Key Listener wasn t here NON NLS 1 System out println Abstract Control Content Assist Subject Adapter remove Key Listener f Key Listeners size NON NLS 1 uninstall Control Listener  removeKeyListener KeyListener keyListener fKeyListeners keyListener removeKeyListener AbstractControlContentAssistSubjectAdapter removeKeyListener fKeyListeners uninstallControlListener
see org eclipse jface contentassist I Content Assist Subject Control supports Verify Key Listener public boolean supports Verify Key Listener return true  IContentAssistSubjectControl supportsVerifyKeyListener supportsVerifyKeyListener
public boolean append Verify Key Listener final Verify Key Listener verify Key Listener f Verify Key Listeners add verify Key Listener if DEBUG System out println Abstract Control Content Assist Subject Adapter append Verify Key Listener f Verify Key Listeners size NON NLS 1 install Control Listener return true  appendVerifyKeyListener VerifyKeyListener verifyKeyListener fVerifyKeyListeners verifyKeyListener AbstractControlContentAssistSubjectAdapter appendVerifyKeyListener fVerifyKeyListeners installControlListener
public boolean prepend Verify Key Listener final Verify Key Listener verify Key Listener f Verify Key Listeners add 0 verify Key Listener if DEBUG System out println Abstract Control Content Assist Subject Adapter prepend Verify Key Listener f Verify Key Listeners size NON NLS 1 install Control Listener return true  prependVerifyKeyListener VerifyKeyListener verifyKeyListener fVerifyKeyListeners verifyKeyListener AbstractControlContentAssistSubjectAdapter prependVerifyKeyListener fVerifyKeyListeners installControlListener
public void remove Verify Key Listener Verify Key Listener verify Key Listener f Verify Key Listeners remove verify Key Listener if DEBUG System out println Abstract Control Content Assist Subject Adapter remove Verify Key Listener f Verify Key Listeners size NON NLS 1 uninstall Control Listener  removeVerifyKeyListener VerifyKeyListener verifyKeyListener fVerifyKeyListeners verifyKeyListener AbstractControlContentAssistSubjectAdapter removeVerifyKeyListener fVerifyKeyListeners uninstallControlListener
public void set Event Consumer I Event Consumer event Consumer this is not supported if DEBUG System out println Abstract Control Content Assist Subject Adapter set Event Consumer NON NLS 1  setEventConsumer IEventConsumer eventConsumer AbstractControlContentAssistSubjectAdapter setEventConsumer
see org eclipse jface contentassist I Content Assist Subject Control get Line Delimiter public String get Line Delimiter return System get Property line separator NON NLS 1  IContentAssistSubjectControl getLineDelimiter getLineDelimiter getProperty
f Control Listener new Listener public void handle Event Event e if get Control is Focus Control return SWT TRAVERSE MNEMONIC events can also come in to inactive widgets Verify Event verify Event new Verify Event e Key Event key Event new Key Event e switch e type case SWT Traverse if DEBUG dump before traverse e verify Event NON NLS 1 verify Event doit true for Iterator iter f Verify Key Listeners iterator iter has Next Verify Key Listener iter next verify Key verify Event if verify Event doit e detail SWT TRAVERSE NONE e doit true if DEBUG dump traverse eaten by verify e verify Event NON NLS 1 return if DEBUG dump traverse OK e verify Event NON NLS 1 break case SWT Key Down for Iterator iter f Verify Key Listeners iterator iter has Next Verify Key Listener iter next verify Key verify Event if verify Event doit e doit verify Event doit if DEBUG dump key Down eaten by verify e verify Event NON NLS 1 return if DEBUG dump key Down OK e verify Event NON NLS 1 for Iterator iter f Key Listeners iterator iter has Next Key Listener iter next key Pressed key Event break default Assert is True false  fControlListener handleEvent getControl isFocusControl TRAVERSE_MNEMONIC VerifyEvent verifyEvent VerifyEvent KeyEvent keyEvent KeyEvent verifyEvent verifyEvent fVerifyKeyListeners hasNext VerifyKeyListener verifyKey verifyEvent verifyEvent TRAVERSE_NONE verifyEvent verifyEvent KeyDown fVerifyKeyListeners hasNext VerifyKeyListener verifyKey verifyEvent verifyEvent verifyEvent keyDown verifyEvent keyDown verifyEvent fKeyListeners hasNext KeyListener keyPressed keyEvent isTrue
Dump the given events to standard output param who who dump s param e the event param ve the verify event private void dump String who Event e Verify Event ve String Buffer sb new String Buffer Abstract Control Content Assist Subject Adapter n NON NLS 1 sb append who sb append e key Code e key Code hex e key Code NON NLS 1 sb append character e character hex e character NON NLS 1 sb append state Mask e state Mask hex e state Mask NON NLS 1 sb append doit e doit NON NLS 1 sb append detail e detail hex e detail NON NLS 1 sb append widget e widget NON NLS 1 sb append n NON NLS 1 sb append verify Event key Code e key Code hex e key Code NON NLS 1 sb append character e character hex e character NON NLS 1 sb append state Mask e state Mask hex e state Mask NON NLS 1 sb append doit ve doit NON NLS 1 sb append widget e widget NON NLS 1 System out println sb  VerifyEvent StringBuffer StringBuffer AbstractControlContentAssistSubjectAdapter keyCode keyCode keyCode stateMask stateMask stateMask verifyEvent keyCode keyCode keyCode stateMask stateMask stateMask
private String hex int i return 0x Integer to Hex String i NON NLS 1  toHexString
Installs code f Control Listener code which handles Verify Events and Key Events by passing them to link f Verify Key Listeners and link f Key Listeners private void install Control Listener if DEBUG System out println Abstract Control Content Assist Subject Adapter install Control Listener k f Key Listeners size v f Verify Key Listeners size NON NLS 1 NON NLS 2 if f Control Listener null return f Control Listener new Listener public void handle Event Event e if get Control is Focus Control return SWT TRAVERSE MNEMONIC events can also come in to inactive widgets Verify Event verify Event new Verify Event e Key Event key Event new Key Event e switch e type case SWT Traverse if DEBUG dump before traverse e verify Event NON NLS 1 verify Event doit true for Iterator iter f Verify Key Listeners iterator iter has Next Verify Key Listener iter next verify Key verify Event if verify Event doit e detail SWT TRAVERSE NONE e doit true if DEBUG dump traverse eaten by verify e verify Event NON NLS 1 return if DEBUG dump traverse OK e verify Event NON NLS 1 break case SWT Key Down for Iterator iter f Verify Key Listeners iterator iter has Next Verify Key Listener iter next verify Key verify Event if verify Event doit e doit verify Event doit if DEBUG dump key Down eaten by verify e verify Event NON NLS 1 return if DEBUG dump key Down OK e verify Event NON NLS 1 for Iterator iter f Key Listeners iterator iter has Next Key Listener iter next key Pressed key Event break default Assert is True false Dump the given events to standard output param who who dump s param e the event param ve the verify event private void dump String who Event e Verify Event ve String Buffer sb new String Buffer Abstract Control Content Assist Subject Adapter n NON NLS 1 sb append who sb append e key Code e key Code hex e key Code NON NLS 1 sb append character e character hex e character NON NLS 1 sb append state Mask e state Mask hex e state Mask NON NLS 1 sb append doit e doit NON NLS 1 sb append detail e detail hex e detail NON NLS 1 sb append widget e widget NON NLS 1 sb append n NON NLS 1 sb append verify Event key Code e key Code hex e key Code NON NLS 1 sb append character e character hex e character NON NLS 1 sb append state Mask e state Mask hex e state Mask NON NLS 1 sb append doit ve doit NON NLS 1 sb append widget e widget NON NLS 1 System out println sb private String hex int i return 0x Integer to Hex String i NON NLS 1 get Control add Listener SWT Traverse f Control Listener get Control add Listener SWT Key Down f Control Listener if DEBUG System out println Abstract Control Content Assist Subject Adapter install Control Listener installed NON NLS 1  fControlListener VerifyEvents KeyEvents fVerifyKeyListeners fKeyListeners installControlListener AbstractControlContentAssistSubjectAdapter installControlListener fKeyListeners fVerifyKeyListeners fControlListener fControlListener handleEvent getControl isFocusControl TRAVERSE_MNEMONIC VerifyEvent verifyEvent VerifyEvent KeyEvent keyEvent KeyEvent verifyEvent verifyEvent fVerifyKeyListeners hasNext VerifyKeyListener verifyKey verifyEvent verifyEvent TRAVERSE_NONE verifyEvent verifyEvent KeyDown fVerifyKeyListeners hasNext VerifyKeyListener verifyKey verifyEvent verifyEvent verifyEvent keyDown verifyEvent keyDown verifyEvent fKeyListeners hasNext KeyListener keyPressed keyEvent isTrue VerifyEvent StringBuffer StringBuffer AbstractControlContentAssistSubjectAdapter keyCode keyCode keyCode stateMask stateMask stateMask verifyEvent keyCode keyCode keyCode stateMask stateMask stateMask toHexString getControl addListener fControlListener getControl addListener KeyDown fControlListener AbstractControlContentAssistSubjectAdapter installControlListener
Uninstalls code f Control Listener code iff there are no code Key Listener code s and no code Verify Key Listener code s registered Otherwise does nothing private void uninstall Control Listener if f Control Listener null f Key Listeners size f Verify Key Listeners size 0 if DEBUG System out println Abstract Control Content Assist Subject Adapter uninstall Control Listener k f Key Listeners size v f Verify Key Listeners size NON NLS 1 NON NLS 2 return get Control remove Listener SWT Traverse f Control Listener get Control remove Listener SWT Key Down f Control Listener f Control Listener null if DEBUG System out println Abstract Control Content Assist Subject Adapter uninstall Control Listener done NON NLS 1  fControlListener KeyListener VerifyKeyListener uninstallControlListener fControlListener fKeyListeners fVerifyKeyListeners AbstractControlContentAssistSubjectAdapter uninstallControlListener fKeyListeners fVerifyKeyListeners getControl removeListener fControlListener getControl removeListener KeyDown fControlListener fControlListener AbstractControlContentAssistSubjectAdapter uninstallControlListener
Sets the visual feedback provider for content assist The given link I Label Provider methods are called with link get Control as argument ul li code get Image Object code provides the visual cue image The image can maximally be 5 pixels wide and 8 pixels high If code get Image Object code returns code null code a default image is used li li code get Text Object code provides the hover info text It is shown when hovering over the cue image or the adapted link Control No info text is shown if code get Text Object code returns code null code li ul p The given link I Label Provider becomes owned by the link Abstract Control Content Assist Subject Adapter i e it gets disposed when the adapted link Control is disposed or when another link I Label Provider is set p param label Provider a link I Label Provider or code null code if no visual feedback should be shown public void set Content Assist Cue Provider I Label Provider label Provider Smart Field Controller set Smart Cue get Control label Provider  ILabelProvider getControl getImage getImage getText getText ILabelProvider AbstractControlContentAssistSubjectAdapter ILabelProvider labelProvider ILabelProvider setContentAssistCueProvider ILabelProvider labelProvider SmartFieldController setSmartCue getControl labelProvider
f Hover Shell add Paint Listener new Paint Listener public void paint Control Paint Event pe pe gc draw String f Text LABEL MARGIN LABEL MARGIN if fg Carbon pe gc draw Polygon get Polygon true  fHoverShell addPaintListener PaintListener paintControl PaintEvent drawString fText LABEL_MARGIN LABEL_MARGIN fgCarbon drawPolygon getPolygon
f Hover Shell add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e show Hover null null  fHoverShell addMouseListener MouseAdapter mouseDown MouseEvent showHover
Hover Shell parent final Display display parent get Display f Hover Shell new Shell parent SWT NO TRIM SWT ON TOP SWT NO FOCUS f Hover Shell set Background display get System Color SWT COLOR INFO BACKGROUND f Hover Shell set Foreground display get System Color SWT COLOR INFO FOREGROUND f Hover Shell add Paint Listener new Paint Listener public void paint Control Paint Event pe pe gc draw String f Text LABEL MARGIN LABEL MARGIN if fg Carbon pe gc draw Polygon get Polygon true f Hover Shell add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e show Hover null null  getDisplay fHoverShell NO_TRIM ON_TOP NO_FOCUS fHoverShell setBackground getSystemColor COLOR_INFO_BACKGROUND fHoverShell setForeground getSystemColor COLOR_INFO_FOREGROUND fHoverShell addPaintListener PaintListener paintControl PaintEvent drawString fText LABEL_MARGIN LABEL_MARGIN fgCarbon drawPolygon getPolygon fHoverShell addMouseListener MouseAdapter mouseDown MouseEvent showHover
int get Polygon boolean border Point e get Extent if border return new int 0 0 e x 1 0 e x 1 e y 1 HD HW e y 1 HD HW 2 e y HH 1 HD e y 1 0 e y 1 0 0 else return new int 0 0 e x 0 e x e y HD HW e y HD HW 2 e y HH HD e y 0 e y 0 0  getPolygon getExtent
void dispose if f Hover Shell is Disposed f Hover Shell dispose  fHoverShell isDisposed fHoverShell
void set Visible boolean visible if visible if f Hover Shell is Visible f Hover Shell set Visible true else if f Hover Shell is Visible f Hover Shell set Visible false  setVisible fHoverShell isVisible fHoverShell setVisible fHoverShell isVisible fHoverShell setVisible
void set Text String t if t null t NON NLS 1 if t equals f Text Point old Size get Extent f Text t f Hover Shell redraw Point new Size get Extent if old Size equals new Size Region region new Region region add get Polygon false f Hover Shell set Region region  setText fText oldSize getExtent fText fHoverShell newSize getExtent oldSize newSize getPolygon fHoverShell setRegion
boolean is Visible return f Hover Shell is Visible  isVisible fHoverShell isVisible
void set Location Control control if control null int h get Extent y f Hover Shell set Location control to Display HD HW 2 h HH 1  setLocation getExtent fHoverShell setLocation toDisplay
Point get Extent GC gc new GC f Hover Shell Point e gc text Extent f Text gc dispose e x LABEL MARGIN 2 e y LABEL MARGIN 2 return e  getExtent fHoverShell textExtent fText LABEL_MARGIN LABEL_MARGIN
Field Focus Listener f Field Focus Listener Create a new Hover Handler param field Focus Listener the field focus listener Hover Handler Field Focus Listener field Focus Listener f Field Focus Listener field Focus Listener  FieldFocusListener fFieldFocusListener HoverHandler fieldFocusListener HoverHandler FieldFocusListener fieldFocusListener fFieldFocusListener fieldFocusListener
inherit Doc public void mouse Hover Mouse Event e handle Mouse Event e  inheritDoc mouseHover MouseEvent handleMouseEvent
inherit Doc public void mouse Exit Mouse Event e if is Hover Visible f Field Focus Listener do Hide Hover  inheritDoc mouseExit MouseEvent isHoverVisible fFieldFocusListener doHideHover
Subclasses may extend or reimplement this method param e void handle Mouse Event Mouse Event e f Field Focus Listener do Show Hover  handleMouseEvent MouseEvent fFieldFocusListener doShowHover
class Cue Handler extends Hover Handler implements Paint Listener Create a new Cue Handler param field Focus Listener the field focus listener Cue Handler Field Focus Listener field Focus Listener super field Focus Listener  CueHandler HoverHandler PaintListener CueHandler fieldFocusListener CueHandler FieldFocusListener fieldFocusListener fieldFocusListener
inherit Doc public void paint Control Paint Event e f Field Focus Listener paint Control e  inheritDoc paintControl PaintEvent fFieldFocusListener paintControl
Updates the hover param event the mouse event void handle Mouse Event Mouse Event event f Field Focus Listener update Hover On Cue event  handleMouseEvent MouseEvent fFieldFocusListener updateHoverOnCue
Create a new Field Focus Listener param control the target control Field Focus Listener Control control f Control control f Dx 5 f Dy 1 if fg Carbon if control instanceof Text f Dy 3 else if control instanceof Combo f Dx 4 else if fg Win32 if control instanceof Text f Dx 2 f Dy 2  FieldFocusListener FieldFocusListener fControl fDx fDy fgCarbon fDy fDx fgWin32 fDx fDy
Paint the cue image param e the Paint Event void paint Control Paint Event e if f Control is Disposed return Image image get Cue Image f Control Point global f Control to Display f Dx f Dy Point local Control e widget to Control global e gc draw Image image local x local y  PaintEvent paintControl PaintEvent fControl isDisposed getCueImage fControl fControl toDisplay fDx fDy toControl drawImage
Show hide the hover param e the Mouse Event void update Hover On Cue Mouse Event e Image image get Cue Image f Control Rectangle r image get Bounds Point global f Control to Display f Dx f Dy Point local Control e widget to Control global r x local x r y local y if r contains e x e y do Show Hover else do Hide Hover  MouseEvent updateHoverOnCue MouseEvent getCueImage fControl getBounds fControl toDisplay fDx fDy toControl doShowHover doHideHover
Hide hover private void do Hide Hover show Hover f Control null  doHideHover showHover fControl
Show hover public void do Show Hover show Hover f Control f Label Provider get Text f Control  doShowHover showHover fControl fLabelProvider getText fControl
public void focus Gained Focus Event e install a Cue Handler on every parent control if DEBUG System out println Focus Gained e widget NON NLS 1 if f Hover Handler null f Hover Handler new Hover Handler this f Control add Mouse Track Listener f Hover Handler Control c f Control get Parent while c null if DEBUG System out println install Cue Handler c to String NON NLS 1 Cue Handler cue Handler new Cue Handler this Assert is True c get Data ANNOTATION HANDLER null parent control has Cue Handler c to String NON NLS 1 c set Data ANNOTATION HANDLER cue Handler c add Paint Listener cue Handler c add Mouse Track Listener cue Handler c redraw if c instanceof Shell break else c c get Parent  focusGained FocusEvent CueHandler fHoverHandler fHoverHandler HoverHandler fControl addMouseTrackListener fHoverHandler fControl getParent CueHandler toString CueHandler cueHandler CueHandler isTrue getData ANNOTATION_HANDLER CueHandler toString setData ANNOTATION_HANDLER cueHandler addPaintListener cueHandler addMouseTrackListener cueHandler getParent
public void focus Lost Focus Event e if DEBUG System out println Focus Lost e widget at NON NLS 1 NON NLS 2 Thread dump Stack if f Hover Handler null f Control remove Mouse Track Listener f Hover Handler Control c f Control get Parent while c null if DEBUG System out println uninstall Cue Handler c to String NON NLS 1 Cue Handler cue Handler Cue Handler c get Data ANNOTATION HANDLER workaround for bug 64052 if cue Handler null c set Data ANNOTATION HANDLER null c remove Paint Listener cue Handler c remove Mouse Track Listener cue Handler c redraw if c instanceof Shell break else c c get Parent  focusLost FocusEvent dumpStack fHoverHandler fControl removeMouseTrackListener fHoverHandler fControl getParent CueHandler toString CueHandler cueHandler CueHandler getData ANNOTATION_HANDLER cueHandler setData ANNOTATION_HANDLER removePaintListener cueHandler removeMouseTrackListener cueHandler getParent
Installs or de installs a visual cue indicating availability of content assist on the given control At most one cue and one hover info is shown at any point in time param control the control on which to install or uninstall the cue param label Provider the label provider or code null code to uninstall the cue public static void set Smart Cue Control control I Label Provider label Provider get Smart Field Controller control internal Set Smart Cue control label Provider  labelProvider setSmartCue ILabelProvider labelProvider getSmartFieldController internalSetSmartCue labelProvider
Listener l new Listener public void handle Event Event event switch event type case SWT Resize case SWT Move if f Hover null f Hover set Location f Hover Control break case SWT Dispose Object data f Shell get Data SMART FIELD CONTROLLER if data Smart Field Controller this f Shell set Data SMART FIELD CONTROLLER null handle Dispose break case SWT Activate case SWT Deactivate case SWT Close case SWT Iconify case SWT Deiconify show Hover null null break  handleEvent fHover fHover setLocation fHoverControl fShell getData SMART_FIELD_CONTROLLER SmartFieldController fShell setData SMART_FIELD_CONTROLLER handleDispose showHover
private Smart Field Controller Shell shell f Shell shell f Shell set Data SMART FIELD CONTROLLER this Listener l new Listener public void handle Event Event event switch event type case SWT Resize case SWT Move if f Hover null f Hover set Location f Hover Control break case SWT Dispose Object data f Shell get Data SMART FIELD CONTROLLER if data Smart Field Controller this f Shell set Data SMART FIELD CONTROLLER null handle Dispose break case SWT Activate case SWT Deactivate case SWT Close case SWT Iconify case SWT Deiconify show Hover null null break shell add Listener SWT Dispose l shell add Listener SWT Resize l shell add Listener SWT Move l shell add Listener SWT Activate l shell add Listener SWT Close l shell add Listener SWT Deactivate l shell add Listener SWT Iconify l shell add Listener SWT Deiconify l  SmartFieldController fShell fShell setData SMART_FIELD_CONTROLLER handleEvent fHover fHover setLocation fHoverControl fShell getData SMART_FIELD_CONTROLLER SmartFieldController fShell setData SMART_FIELD_CONTROLLER handleDispose showHover addListener addListener addListener addListener addListener addListener addListener addListener
private void handle Dispose f Shell null f Hover Control null if f Hover null f Hover dispose f Hover null if f Cue Image null f Cue Image dispose f Cue Image null if f Label Provider null f Label Provider dispose f Label Provider null  handleDispose fShell fHoverControl fHover fHover fHover fCueImage fCueImage fCueImage fLabelProvider fLabelProvider fLabelProvider
Gets the smart field controller from the given control s shell param control the control return the smart field controller private static Smart Field Controller get Smart Field Controller Control control Shell shell control get Shell Object data shell get Data SMART FIELD CONTROLLER if data instanceof Smart Field Controller data new Smart Field Controller shell return Smart Field Controller data  SmartFieldController getSmartFieldController getShell getData SMART_FIELD_CONTROLLER SmartFieldController SmartFieldController SmartFieldController
private void internal Set Smart Cue final Control control I Label Provider label Provider if f Label Provider null f Label Provider dispose f Label Provider label Provider Field Focus Listener focuslistener Field Focus Listener control get Data SMART FOCUS LISTENER if label Provider null add smart stuff if focuslistener null focuslistener new Field Focus Listener control control set Data SMART FOCUS LISTENER focuslistener control add Focus Listener focuslistener else remove smart stuff if focuslistener null control remove Focus Listener focuslistener control set Data SMART FOCUS LISTENER null if f Cue Image null f Cue Image dispose f Cue Image null  internalSetSmartCue ILabelProvider labelProvider fLabelProvider fLabelProvider fLabelProvider labelProvider FieldFocusListener FieldFocusListener getData SMART_FOCUS_LISTENER labelProvider FieldFocusListener setData SMART_FOCUS_LISTENER addFocusListener removeFocusListener setData SMART_FOCUS_LISTENER fCueImage fCueImage fCueImage
Show or hide hover param control the control param text a link String to show in hover or code null code to hide private void show Hover Control control String text if text null f Hover Control control if f Hover null f Hover new Hover f Shell f Hover set Text text f Hover set Location f Hover Control f Hover set Visible true else f Hover Control null if f Hover null f Hover set Visible false  showHover fHoverControl fHover fHover fShell fHover setText fHover setLocation fHoverControl fHover setVisible fHoverControl fHover fHover setVisible
private boolean is Hover Visible return f Hover null f Hover is Visible  isHoverVisible fHover fHover isVisible
private Image get Cue Image Control control Image image null if f Label Provider null image f Label Provider get Image control return image null image get Cue Image  getCueImage fLabelProvider fLabelProvider getImage getCueImage
private Image get Cue Image if f Cue Image null Image Descriptor cueID Image Descriptor create From File Smart Field Controller class images content assist cue gif NON NLS 1 f Cue Image cueID create Image f Shell get Display return f Cue Image  getCueImage fCueImage ImageDescriptor ImageDescriptor createFromFile SmartFieldController content_assist_cue fCueImage createImage fShell getDisplay fCueImage

see org eclipse swt events Modify Listener modify Text org eclipse swt events Modify Event public void modify Text Modify Event e set f Combo get Text  ModifyListener modifyText ModifyEvent modifyText ModifyEvent fCombo getText
private Internal Document super f Combo get Text f Modify Listener new Modify Listener see org eclipse swt events Modify Listener modify Text org eclipse swt events Modify Event public void modify Text Modify Event e set f Combo get Text f Combo add Modify Listener f Modify Listener  InternalDocument fCombo getText fModifyListener ModifyListener ModifyListener modifyText ModifyEvent modifyText ModifyEvent fCombo getText fCombo addModifyListener fModifyListener
public void replace int pos int length String text throws Bad Location Exception super replace pos length text f Combo remove Modify Listener f Modify Listener f Combo set Text get f Combo add Modify Listener f Modify Listener  BadLocationException fCombo removeModifyListener fModifyListener fCombo setText fCombo addModifyListener fModifyListener
Creates a content assist subject control adapter for the given combo param combo the combo to adapt public Combo Content Assist Subject Adapter Combo combo Assert is Not Null combo f Combo combo f Modify Listeners new Hash Map  ComboContentAssistSubjectAdapter isNotNull fCombo fModifyListeners HashMap
see org eclipse jface text contentassist I Content Assist Subject Control get Control public Control get Control return f Combo  IContentAssistSubjectControl getControl getControl fCombo
see org eclipse jface text contentassist I Content Assist Subject Control get Line Height public int get Line Height return f Combo get Text Height  IContentAssistSubjectControl getLineHeight getLineHeight fCombo getTextHeight
see org eclipse jface text contentassist I Content Assist Subject Control get Caret Offset public int get Caret Offset return f Combo get Selection y  IContentAssistSubjectControl getCaretOffset getCaretOffset fCombo getSelection
public Point get Location At Offset int offset String combo String f Combo get Text GC gc new GC f Combo gc set Font f Combo get Font Point extent gc text Extent combo String substring 0 Math min offset combo String length int space Width gc text Extent x NON NLS 1 gc dispose FIXME the two space widths below is a workaround for bug 44072 int x 2 space Width f Combo get Client Area x f Combo get Border Width extent x return new Point x f Combo get Client Area y  getLocationAtOffset comboString fCombo getText fCombo setFont fCombo getFont textExtent comboString comboString spaceWidth textExtent spaceWidth fCombo getClientArea fCombo getBorderWidth fCombo getClientArea
see org eclipse jface text contentassist I Content Assist Subject Control get Selection Range public Point get Widget Selection Range return new Point f Combo get Selection x Math abs f Combo get Selection y f Combo get Selection x  IContentAssistSubjectControl getSelectionRange getWidgetSelectionRange fCombo getSelection fCombo getSelection fCombo getSelection
see org eclipse jface text contentassist I Content Assist Subject Control get Selected Range public Point get Selected Range return new Point f Combo get Selection x Math abs f Combo get Selection y f Combo get Selection x  IContentAssistSubjectControl getSelectedRange getSelectedRange fCombo getSelection fCombo getSelection fCombo getSelection
public I Document get Document I Document document I Document f Combo get Data document NON NLS 1 if document null document new Internal Document f Combo set Data document document NON NLS 1 return document  IDocument getDocument IDocument IDocument fCombo getData InternalDocument fCombo setData
see org eclipse jface text contentassist I Content Assist Subject Control set Selected Range int int public void set Selected Range int i int j f Combo set Selection new Point i i j  IContentAssistSubjectControl setSelectedRange setSelectedRange fCombo setSelection
see org eclipse jface text contentassist I Content Assist Subject Control reveal Range int int public void reveal Range int i int j XXX this should be improved f Combo set Selection new Point i i j  IContentAssistSubjectControl revealRange revealRange fCombo setSelection
see org eclipse swt events Modify Listener modify Text org eclipse swt events Modify Event public void handle Event Event e selection Listener widget Selected new Selection Event e  ModifyListener modifyText ModifyEvent handleEvent selectionListener widgetSelected SelectionEvent
public boolean add Selection Listener final Selection Listener selection Listener f Combo add Selection Listener selection Listener Listener listener new Listener see org eclipse swt events Modify Listener modify Text org eclipse swt events Modify Event public void handle Event Event e selection Listener widget Selected new Selection Event e f Combo add Listener SWT Modify listener f Modify Listeners put selection Listener listener return true  addSelectionListener SelectionListener selectionListener fCombo addSelectionListener selectionListener ModifyListener modifyText ModifyEvent handleEvent selectionListener widgetSelected SelectionEvent fCombo addListener fModifyListeners selectionListener
public void remove Selection Listener Selection Listener selection Listener f Combo remove Selection Listener selection Listener Object listener f Modify Listeners get selection Listener if listener instanceof Listener f Combo remove Listener SWT Modify Listener listener  removeSelectionListener SelectionListener selectionListener fCombo removeSelectionListener selectionListener fModifyListeners selectionListener fCombo removeListener

Returns the control of this content assist subject control return the control of this content assist subject control 
Returns the line height return line height in pixel exception org eclipse swt SWT Exception ul li link org eclipse swt SWT ERROR WIDGET DISPOSED if the receiver has been disposed li li link org eclipse swt SWT ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li ul  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS
Returns the caret position relative to the start of the text in widget coordinates return the caret position relative to the start of the text in widget coordinates exception org eclipse swt SWT Exception ul li link org eclipse swt SWT ERROR WIDGET DISPOSED if the receiver has been disposed li li link org eclipse swt SWT ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li ul  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS
Returns the x y location of the upper left corner of the character bounding box at the specified offset in the text The point is relative to the upper left corner of the widget client area param offset widget offset relative to the start of the content 0 offset get Char Count return x y location of the upper left corner of the character bounding box at the specified offset in the text exception org eclipse swt SWT Exception ul li link org eclipse swt SWT ERROR WIDGET DISPOSED if the receiver has been disposed li li link org eclipse swt SWT ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li ul exception Illegal Argument Exception when the offset is outside the valid range  getCharCount SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException
Returns the line delimiter used for entering new lines by key down or paste operation return line delimiter used for entering new lines by key down or paste operation exception org eclipse swt SWT Exception ul li link org eclipse swt SWT ERROR WIDGET DISPOSED if the receiver has been disposed li li link org eclipse swt SWT ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li ul  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS
Returns the selected range in the subject s widget return start and length of the selection x is the offset of the exception org eclipse swt SWT Exception ul li link org eclipse swt SWT ERROR WIDGET DISPOSED if the receiver has been disposed li li link org eclipse swt SWT ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li ul  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS
Returns the selected range return start and length of the selection x is the offset and y the length based on the subject s model e g document 
Sets the selected range Offset and length based on the subject s model e g document param offset the offset of the selection based on the subject s model e g document param length the length of the selection based on the subject s model e g document 
Reveals the given region Offset and length based on the subject s model e g document param offset the offset of the selection based on the subject s model e g document param length the length of the selection based on the subject s model e g document 
Returns this content assist subject control s document return the viewer s input document 
If supported appends a verify key listener to the viewer s list of verify key listeners If the listener is already registered with the viewer this call moves the listener to the end of the list p Note This content assist subject control may not support appending a verify listener in which case code false code will be returned If this content assist subject control only supports code add Verify Key Listener code then this method can be used but code prepend Verify Key Listener code must return code false code p param verify Key Listener the listener to be added return code true code if the listener was added  addVerifyKeyListener prependVerifyKeyListener verifyKeyListener
If supported inserts the verify key listener at the beginning of this content assist subject s list of verify key listeners If the listener is already registered with the viewer this call moves the listener to the beginning of the list p Note This content assist subject control may not support prepending a verify listener in which case code false code will be returned However link append Verify Key Listener Verify Key Listener might work p param verify Key Listener the listener to be inserted return code true code if the listener was added  appendVerifyKeyListener VerifyKeyListener verifyKeyListener
Removes the verify key listener from this content assist subject control s list of verify key listeners If the listener is not registered this call has no effect param verify Key Listener the listener to be removed  verifyKeyListener
Tests whether a verify key listener can be added either using code prepend Verify Key Listener code or link append Verify Key Listener Verify Key Listener return code true code if adding verify key listeners is supported  prependVerifyKeyListener appendVerifyKeyListener VerifyKeyListener
Adds the listener to the collection of listeners who will be notified when keys are pressed and released on the system keyboard by sending it one of the messages defined in the link Key Listener interface param key Listener the listener which should be notified exception Illegal Argument Exception if the listener is code null code exception org eclipse swt SWT Exception ul li link org eclipse swt SWT ERROR WIDGET DISPOSED if the receiver has been disposed li li link org eclipse swt SWT ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li ul see Key Listener see remove Key Listener Key Listener  KeyListener keyListener IllegalArgumentException SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS KeyListener removeKeyListener KeyListener
Removes the listener from the collection of listeners who will be notified when keys are pressed and released on the system keyboard param key Listener the listener which should be notified exception Illegal Argument Exception if the listener is null li exception org eclipse swt SWT Exception ul li link org eclipse swt SWT ERROR WIDGET DISPOSED if the receiver has been disposed li li link org eclipse swt SWT ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li ul see Key Listener see add Key Listener Key Listener  keyListener IllegalArgumentException SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS KeyListener addKeyListener KeyListener
If supported registers an event consumer with this content assist subject param event Consumer the content assist subject control s event consumer code null code is a valid argument  eventConsumer
Removes the specified selection listener p param selection Listener the listener exception org eclipse swt SWT Exception ul ul li link org eclipse swt SWT ERROR WIDGET DISPOSED if the receiver has been disposed li li link org eclipse swt SWT ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li ul exception Illegal Argument Exception if listener is code null code  selectionListener SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException
If supported adds a selection listener A Selection event is sent by the widget when the selection has changed p param selection Listener the listener return code true code if adding a selection listener is supported ul li link org eclipse swt SWT ERROR WIDGET DISPOSED if the receiver has been disposed li li link org eclipse swt SWT ERROR THREAD INVALID ACCESS if not called from the thread that created the receiver li ul exception Illegal Argument Exception if listener is code null code  selectionListener ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS IllegalArgumentException

Installs content assist support on the given subject param content Assist Subject Control the one who requests content assist  contentAssistSubjectControl

Returns a list of completion proposals based on the specified location within the document that corresponds to the current cursor position within the text viewer param content Assist Subject Control the content assist subject control whose document is used to compute the proposals param document Offset an offset within the document for which completions should be computed return an array of completion proposals or code null code if no proposals are possible  contentAssistSubjectControl documentOffset
Returns information about possible contexts based on the specified location within the document that corresponds to the current cursor position within the content assist subject control param content Assist Subject Control the content assist subject control whose document is used to compute the possible contexts param document Offset an offset within the document for which context information should be computed return an array of context information objects or code null code if no context could be found  contentAssistSubjectControl documentOffset

Installs this presenter for the given context information param info the context information which this presenter should style param content Assist Subject Control the content assist subject control param offset the document offset for which the information has been computed  contentAssistSubjectControl

Installs this validator for the given context information param info the context information which this validator should check param content Assist Subject Control the content assist subject control param offset the document offset for which the information has been computed  contentAssistSubjectControl

see I Subject Control Content Assistant install I Content Assist Subject Control public void install I Content Assist Subject Control content Assist Subject Control Assert is Not Null content Assist Subject Control super install content Assist Subject Control  ISubjectControlContentAssistant IContentAssistSubjectControl IContentAssistSubjectControl contentAssistSubjectControl isNotNull contentAssistSubjectControl contentAssistSubjectControl

Creates a new context information validator which is ready to be installed on a particular context information param processor the processor to be used for validation public Subject Control Context Information Validator I Content Assist Processor processor f Processor processor  SubjectControlContextInformationValidator IContentAssistProcessor fProcessor
see I Context Information Validator install I Context Information I Text Viewer int public void install I Context Information context Information I Text Viewer viewer int offset throw new Unsupported Operation Exception  IContextInformationValidator IContextInformation ITextViewer IContextInformation contextInformation ITextViewer UnsupportedOperationException
see I Subject Control Context Information Validator install I Context Information I Content Assist Subject Control int public void install I Context Information context Information I Content Assist Subject Control content Assist Subject Control int offset f Context Information context Information f Content Assist Subject Control content Assist Subject Control  ISubjectControlContextInformationValidator IContextInformation IContentAssistSubjectControl IContextInformation contextInformation IContentAssistSubjectControl contentAssistSubjectControl fContextInformation contextInformation fContentAssistSubjectControl contentAssistSubjectControl
public boolean is Context Information Valid int offset if f Content Assist Subject Control null f Processor instanceof I Subject Control Content Assist Processor I Context Information infos I Subject Control Content Assist Processor f Processor compute Context Information f Content Assist Subject Control offset if infos null infos length 0 for int i 0 i infos length i if f Context Information equals infos i return true return false  isContextInformationValid fContentAssistSubjectControl fProcessor ISubjectControlContentAssistProcessor IContextInformation ISubjectControlContentAssistProcessor fProcessor computeContextInformation fContentAssistSubjectControl fContextInformation

see org eclipse swt events Modify Listener modify Text org eclipse swt events Modify Event public void modify Text Modify Event e set f Text get Text  ModifyListener modifyText ModifyEvent modifyText ModifyEvent fText getText
private Internal Document super f Text get Text f Modify Listener new Modify Listener see org eclipse swt events Modify Listener modify Text org eclipse swt events Modify Event public void modify Text Modify Event e set f Text get Text f Text add Modify Listener f Modify Listener  InternalDocument fText getText fModifyListener ModifyListener ModifyListener modifyText ModifyEvent modifyText ModifyEvent fText getText fText addModifyListener fModifyListener
public void replace int pos int length String text throws Bad Location Exception super replace pos length text f Text remove Modify Listener f Modify Listener f Text set Text get f Text add Modify Listener f Modify Listener  BadLocationException fText removeModifyListener fModifyListener fText setText fText addModifyListener fModifyListener
Creates a content assist subject control adapter for the given text widget param text the text widget to adapt public Text Content Assist Subject Adapter Text text Assert is Not Null text f Text text  TextContentAssistSubjectAdapter isNotNull fText
see org eclipse jface contentassist I Content Assist Subject Control get Control public Control get Control return f Text  IContentAssistSubjectControl getControl getControl fText
see org eclipse jface contentassist I Content Assist Subject Control get Line Height public int get Line Height return f Text get Line Height  IContentAssistSubjectControl getLineHeight getLineHeight fText getLineHeight
see org eclipse jface contentassist I Content Assist Subject Control get Caret Offset public int get Caret Offset return f Text get Caret Position  IContentAssistSubjectControl getCaretOffset getCaretOffset fText getCaretPosition
public Point get Location At Offset int offset Point caret Location f Text get Caret Location FIXME workaround for https bugs eclipse org bugs show bug cgi id 52520 caret Location y 2 return caret Location  getLocationAtOffset caretLocation fText getCaretLocation show_bug caretLocation caretLocation
see org eclipse jface contentassist I Content Assist Subject Control get Widget Selection Range public Point get Widget Selection Range return new Point f Text get Selection x Math abs f Text get Selection y f Text get Selection x  IContentAssistSubjectControl getWidgetSelectionRange getWidgetSelectionRange fText getSelection fText getSelection fText getSelection
see org eclipse jface contentassist I Content Assist Subject Control get Selected Range public Point get Selected Range return new Point f Text get Selection x Math abs f Text get Selection y f Text get Selection x  IContentAssistSubjectControl getSelectedRange getSelectedRange fText getSelection fText getSelection fText getSelection
public I Document get Document I Document document I Document f Text get Data document NON NLS 1 if document null document new Internal Document f Text set Data document document NON NLS 1 return document  IDocument getDocument IDocument IDocument fText getData InternalDocument fText setData
see org eclipse jface contentassist I Content Assist Subject Control set Selected Range int int public void set Selected Range int i int j f Text set Selection new Point i i j  IContentAssistSubjectControl setSelectedRange setSelectedRange fText setSelection
see org eclipse jface contentassist I Content Assist Subject Control reveal Range int int public void reveal Range int i int j XXX this should be improved f Text set Selection new Point i i j  IContentAssistSubjectControl revealRange revealRange fText setSelection
see org eclipse swt widgets Listener handle Event org eclipse swt widgets Event public void handle Event Event e selection Listener widget Selected new Selection Event e  handleEvent handleEvent selectionListener widgetSelected SelectionEvent
public boolean add Selection Listener final Selection Listener selection Listener f Text add Selection Listener selection Listener Listener listener new Listener see org eclipse swt widgets Listener handle Event org eclipse swt widgets Event public void handle Event Event e selection Listener widget Selected new Selection Event e f Text add Listener SWT Modify listener f Modify Listeners put selection Listener listener return true  addSelectionListener SelectionListener selectionListener fText addSelectionListener selectionListener handleEvent handleEvent selectionListener widgetSelected SelectionEvent fText addListener fModifyListeners selectionListener
public void remove Selection Listener Selection Listener selection Listener f Text remove Selection Listener selection Listener Object listener f Modify Listeners get selection Listener if listener instanceof Listener f Text remove Listener SWT Modify Listener listener  removeSelectionListener SelectionListener selectionListener fText removeSelectionListener selectionListener fModifyListeners selectionListener fText removeListener

protected boolean state Create a new instance of the receiver param item param state public Item State Control item boolean state this item item this state state  ItemState
Restore the enabled state to the original value public void restore if item null item is Disposed return item set Enabled state  isDisposed setEnabled
Creates a new object and saves in it the current enable disable state of the given control and its descendents the controls that are saved are also disabled param w the control protected Control Enable State Control w this w null  ControlEnableState
Creates a new object and saves in it the current enable disable state of the given control and its descendents except for the given list of exception cases the controls that are saved are also disabled param w the control param exceptions the list of controls to not disable element type code Control code or code null code if none protected Control Enable State Control w List exceptions super states new Array List this exceptions exceptions read State For And Disable w  ControlEnableState ArrayList readStateForAndDisable
Saves the current enable disable state of the given control and its descendents in the returned object the controls are all disabled param w the control return an object capturing the enable disable state public static Control Enable State disable Control w return new Control Enable State w  ControlEnableState ControlEnableState
Saves the current enable disable state of the given control and its descendents in the returned object except for the given list of exception cases the controls that are saved are also disabled param w the control param exceptions the list of controls to not disable element type code Control code return an object capturing the enable disable state public static Control Enable State disable Control w List exceptions return new Control Enable State w exceptions  ControlEnableState ControlEnableState
Recursively reads the enable disable state for the given window and disables all controls param control Control private void read State For And Disable Control control if exceptions null exceptions contains control return if control instanceof Composite Composite c Composite control Control children c get Children for int i 0 i children length i read State For And Disable children i XXX Workaround for 1G2Q8SS ITPUI Linux Combo box is not enabled in File New Solution states add new Item State control control get Enabled control set Enabled false  readStateForAndDisable getChildren readStateForAndDisable ItemState getEnabled setEnabled
Restores the window enable state saved in this object public void restore int size states size for int i 0 i size i Item State states get i restore  ItemState

private static final int VERTICAL DIALOG UNITS PER CHAR 8 Returns the number of pixels corresponding to the height of the given number of characters p The required code Font Metrics code parameter may be created in the following way code GC gc new GC control gc set Font control get Font font Metrics gc get Font Metrics gc dispose code p param font Metrics used in performing the conversion param chars the number of characters return the number of pixels since 2 0 public static int convert Height In Chars To Pixels Font Metrics font Metrics int chars return font Metrics get Height chars  VERTICAL_DIALOG_UNITS_PER_CHAR FontMetrics setFont getFont fontMetrics getFontMetrics fontMetrics convertHeightInCharsToPixels FontMetrics fontMetrics fontMetrics getHeight
Returns the number of pixels corresponding to the given number of horizontal dialog units p The required code Font Metrics code parameter may be created in the following way code GC gc new GC control gc set Font control get Font font Metrics gc get Font Metrics gc dispose code p param font Metrics used in performing the conversion param dlus the number of horizontal dialog units return the number of pixels since 2 0 public static int convert HorizontalDL Us To Pixels Font Metrics font Metrics int dlus round to the nearest pixel return font Metrics get Average Char Width dlus HORIZONTAL DIALOG UNIT PER CHAR 2 HORIZONTAL DIALOG UNIT PER CHAR  FontMetrics setFont getFont fontMetrics getFontMetrics fontMetrics convertHorizontalDLUsToPixels FontMetrics fontMetrics fontMetrics getAverageCharWidth HORIZONTAL_DIALOG_UNIT_PER_CHAR HORIZONTAL_DIALOG_UNIT_PER_CHAR
Returns the number of pixels corresponding to the given number of vertical dialog units p The required code Font Metrics code parameter may be created in the following way code GC gc new GC control gc set Font control get Font font Metrics gc get Font Metrics gc dispose code p param font Metrics used in performing the conversion param dlus the number of vertical dialog units return the number of pixels since 2 0 public static int convert VerticalDL Us To Pixels Font Metrics font Metrics int dlus round to the nearest pixel return font Metrics get Height dlus VERTICAL DIALOG UNITS PER CHAR 2 VERTICAL DIALOG UNITS PER CHAR  FontMetrics setFont getFont fontMetrics getFontMetrics fontMetrics convertVerticalDLUsToPixels FontMetrics fontMetrics fontMetrics getHeight VERTICAL_DIALOG_UNITS_PER_CHAR VERTICAL_DIALOG_UNITS_PER_CHAR
Returns the number of pixels corresponding to the width of the given number of characters p The required code Font Metrics code parameter may be created in the following way code GC gc new GC control gc set Font control get Font font Metrics gc get Font Metrics gc dispose code p param font Metrics used in performing the conversion param chars the number of characters return the number of pixels since 2 0 public static int convert Width In Chars To Pixels Font Metrics font Metrics int chars return font Metrics get Average Char Width chars  FontMetrics setFont getFont fontMetrics getFontMetrics fontMetrics convertWidthInCharsToPixels FontMetrics fontMetrics fontMetrics getAverageCharWidth
Shortens the given text code text Value code so that its width in pixels does not exceed the width of the given control Overrides characters in the center of the original string with an ellipsis if necessary If a code null code value is given code null code is returned param text Value the original string or code null code param control the control the string will be displayed on return the string to display or code null code if null was passed in since 3 0 public static String shorten Text String text Value Control control if text Value null return null GC gc new GC control int max Width control get Bounds width 5 if gc text Extent text Value x max Width gc dispose return text Value int length text Value length int pivot length 2 int start pivot int end pivot 1 while start 0 end length String s1 text Value substring 0 start String s2 text Value substring end length String s s1 ELLIPSIS s2 int l gc text Extent s x if l max Width gc dispose return s start end gc dispose return text Value  textValue textValue shortenText textValue textValue maxWidth getBounds textExtent textValue maxWidth textValue textValue textValue textValue textExtent maxWidth textValue
see org eclipse jface dialogs I Dialog Blocked Handler clear Blocked public void clear Blocked No default behaviour  IDialogBlockedHandler clearBlocked clearBlocked
org eclipse core runtime I Status java lang String public void show Blocked I Progress Monitor blocking I Status blocking Status String blocked Name No default behaviour  IStatus showBlocked IProgressMonitor IStatus blockingStatus blockedName
org eclipse core runtime I Status java lang String public void show Blocked Shell parent Shell I Progress Monitor blocking I Status blocking Status String blocked Name No default behaviour  IStatus showBlocked parentShell IProgressMonitor IStatus blockingStatus blockedName
Creates a dialog instance Note that the window will have no visual representation no widgets until it is told to open By default code open code blocks for dialogs param parent Shell the parent shell or code null code to create a top level shell protected Dialog Shell parent Shell super parent Shell set Shell Style SWT DIALOG TRIM SWT APPLICATION MODAL set Block On Open true if parent Shell null Policy DEBUG DIALOG NO PARENT Policy get Log log new Status I Status INFO Policy JFACE I Status INFO this get Class created with no shell NON NLS 1 new Exception  parentShell parentShell parentShell setShellStyle DIALOG_TRIM APPLICATION_MODAL setBlockOnOpen parentShell DEBUG_DIALOG_NO_PARENT getLog IStatus IStatus getClass
Notifies that this dialog s button with the given id has been pressed p The code Dialog code implementation of this framework method calls code ok Pressed code if the ok button is the pressed and code cancel Pressed code if the cancel button is the pressed All other button presses are ignored Subclasses may override to handle other buttons but should call code super button Pressed code if the default handling of the ok and cancel buttons is desired p param button Id the id of the button that was pressed see code I Dialog Constants  ID code constants protected void button Pressed int button Id if I Dialog Constants OK ID button Id ok Pressed else if I Dialog Constants CANCEL ID button Id cancel Pressed  okPressed cancelPressed buttonPressed buttonId IDialogConstants _ID buttonPressed buttonId IDialogConstants OK_ID buttonId okPressed IDialogConstants CANCEL_ID buttonId cancelPressed
Notifies that the cancel button of this dialog has been pressed p The code Dialog code implementation of this framework method sets this dialog s return code to code Window CANCEL code and closes the dialog Subclasses may override if desired p protected void cancel Pressed set Return Code CANCEL close  cancelPressed setReturnCode
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 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 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 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 convert Width In Chars To Pixels font Metrics chars  initializeDialogUnits convertWidthInCharsToPixels fontMetrics convertWidthInCharsToPixels fontMetrics
Creates a new button with the given id p The code Dialog code implementation of this framework method creates a standard push button registers it for selection events including button presses and registers default buttons with its shell The button id is stored as the button s client data If the button id is code I Dialog Constants CANCEL ID code the new button will be accessible from code get Cancel Button code If the button id is code I Dialog Constants OK ID code the new button will be accesible from code getOK Button code Note that the parent s layout is assumed to be a code Grid Layout code and the number of columns in this layout is incremented Subclasses may override p param parent the parent composite param id the id of the button see code I Dialog Constants  ID code constants for standard dialog button ids param label the label from the button param default Button code true code if the button is to be the default button and code false code otherwise return the new button see get Cancel Button see getOK Button protected Button create Button Composite parent int id String label boolean default Button increment the number of columns in the button bar Grid Layout parent get Layout num Columns Button button new Button parent SWT PUSH button set Text label button set Font J Face Resources get Dialog Font button set Data new Integer id button add Selection Listener new Selection Adapter public void widget Selected Selection Event event button Pressed Integer event widget get Data int Value if default Button Shell shell parent get Shell if shell null shell set Default Button button buttons put new Integer id button set Button Layout Data button return button  IDialogConstants CANCEL_ID getCancelButton IDialogConstants OK_ID getOKButton GridLayout IDialogConstants _ID defaultButton getCancelButton getOKButton createButton defaultButton GridLayout getLayout numColumns setText setFont JFaceResources getDialogFont setData addSelectionListener SelectionAdapter widgetSelected SelectionEvent buttonPressed getData intValue defaultButton getShell setDefaultButton setButtonLayoutData
Creates and returns the contents of this dialog s button bar p The code Dialog code implementation of this framework method lays out a button bar and calls the code create Buttons For Button Bar code framework method to populate it Subclasses may override p p The returned control s layout data must be an instance of code Grid Data code p param parent the parent composite to contain the button bar return the button bar control protected Control create Button Bar Composite parent Composite composite new Composite parent SWT NONE create a layout with spacing and margins appropriate for the font size Grid Layout layout new Grid Layout layout num Columns 0 this is incremented by create Button layout make Columns Equal Width true layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING composite set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data VERTICAL ALIGN CENTER composite set Layout Data data composite set Font parent get Font Add the buttons to the button bar create Buttons For Button Bar composite return composite  createButtonsForButtonBar GridData createButtonBar GridLayout GridLayout numColumns createButton makeColumnsEqualWidth marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING setLayout GridData GridData GridData HORIZONTAL_ALIGN_END GridData VERTICAL_ALIGN_CENTER setLayoutData setFont getFont createButtonsForButtonBar
Adds buttons to this dialog s button bar p The code Dialog code implementation of this framework method adds standard ok and cancel buttons using the code create Button code framework method These standard buttons will be accessible from code get Cancel Button code and code getOK Button code Subclasses may override p param parent the button bar composite protected void create Buttons For Button Bar Composite parent create OK and Cancel buttons by default create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButton getCancelButton getOKButton createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
protected void initialize Bounds String platform SWT get Platform if carbon equals platform NON NLS 1 On Mac OS X the default button must be the right most button Shell shell get Shell if shell null Button default Button shell get Default Button if default Button null is Contained button Bar default Button default Button move Below null super initialize Bounds  initializeBounds getPlatform getShell defaultButton getDefaultButton defaultButton isContained buttonBar defaultButton defaultButton moveBelow initializeBounds
Returns true if the given Control is a direct or indirect child of container param container the potential parent param control return boolean code true code if control is a child of container private boolean is Contained Control container Control control Composite parent while parent control get Parent null if parent container return true control parent return false  isContained getParent
The code Dialog code implementation of this code Window code method creates and lays out the top level composite for the dialog and determines the appropriate horizontal and vertical dialog units based on the font size It then calls the code create Dialog Area code and code create Button Bar code methods to create the dialog area and button bar respectively Overriding code create Dialog Area code and code create Button Bar code are recommended rather than overriding this method protected Control create Contents Composite parent create the top level composite for the dialog Composite composite new Composite parent 0 Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout vertical Spacing 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH apply Dialog Font composite initialize the dialog units initialize Dialog Units composite create the dialog area and button bar dialog Area create Dialog Area composite button Bar create Button Bar composite return composite  createDialogArea createButtonBar createDialogArea createButtonBar createContents GridLayout GridLayout marginHeight marginWidth verticalSpacing setLayout setLayoutData GridData GridData FILL_BOTH applyDialogFont initializeDialogUnits dialogArea createDialogArea buttonBar createButtonBar
Creates and returns the contents of the upper part of this dialog above the button bar p The code Dialog code implementation of this framework method creates and returns a new code Composite code with standard margins and spacing p p The returned control s layout data must be an instance of code Grid Data code This method must not modify the parent s layout p p Subclasses must override this method but may call code super code as in the following example p pre Composite composite Composite super create Dialog Area parent add controls to composite as necessary return composite pre param parent the parent composite to contain the dialog area return the dialog area control protected Control create Dialog Area Composite parent create a composite with standard margins and spacing Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH apply Dialog Font composite return composite  GridData createDialogArea createDialogArea GridLayout GridLayout marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING setLayout setLayoutData GridData GridData FILL_BOTH applyDialogFont
Returns the button created by the method code create Button code for the specified ID as defined on code I Dialog Constants code If code create Button code was never called with this ID or if code create Button code is overridden this method will return code null code param id the id of the button to look for return the button for the ID or code null code see create Button Composite int String boolean since 2 0 protected Button get Button int id return Button buttons get new Integer id  createButton IDialogConstants createButton createButton createButton getButton
Returns the button bar control p Clients may call this framework method but should not override it p return the button bar or code null code if the button bar has not been created yet protected Control get Button Bar return button Bar  getButtonBar buttonBar
Returns the button created when code create Button code is called with an ID of code I Dialog Constants CANCEL ID code If code create Button code was never called with this parameter or if code create Button code is overridden code get Cancel Button code will return code null code return the cancel button or code null code see create Button Composite int String boolean since 2 0 deprecated Use code get Button I Dialog Constants CANCEL ID code instead This method will be removed soon protected Button get Cancel Button return get Button I Dialog Constants CANCEL ID  createButton IDialogConstants CANCEL_ID createButton createButton getCancelButton createButton getButton IDialogConstants CANCEL_ID getCancelButton getButton IDialogConstants CANCEL_ID
Returns the dialog area control p Clients may call this framework method but should not override it p return the dialog area or code null code if the dialog area has not been created yet protected Control get Dialog Area return dialog Area  getDialogArea dialogArea
Returns the standard dialog image with the given key Note that these images are managed by the dialog framework and must not be disposed by another party param key one of the code Dialog DLG IMG  code constants return the standard dialog image public static Image get Image String key return J Face Resources get Image Registry get key  DLG_IMG_ getImage JFaceResources getImageRegistry
Returns the button created when code create Button code is called with an ID of code I Dialog Constants OK ID code If code create Button code was never called with this parameter or if code create Button code is overridden code getOK Button code will return code null code return the OK button or code null code see create Button Composite int String boolean since 2 0 deprecated Use code get Button I Dialog Constants OK ID code instead This method will be removed soon protected Button getOK Button return get Button I Dialog Constants OK ID  createButton IDialogConstants OK_ID createButton createButton getOKButton createButton getButton IDialogConstants OK_ID getOKButton getButton IDialogConstants OK_ID
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 control a control from which to obtain the current font protected void initialize Dialog Units Control control Compute and store a font metric GC gc new GC control gc set Font J Face Resources get Dialog Font font Metrics gc get Font Metrics gc dispose  initializeDialogUnits setFont JFaceResources getDialogFont fontMetrics getFontMetrics
Notifies that the ok button of this dialog has been pressed p The code Dialog code implementation of this framework method sets this dialog s return code to code Window OK code and closes the dialog Subclasses may override p protected void ok Pressed set Return Code OK close  okPressed setReturnCode
Set the layout data of the button to a Grid Data with appropriate heights and widths param button protected void set Button Layout Data Button button Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x button set Layout Data data  GridData setButtonLayoutData GridData GridData GridData HORIZONTAL_ALIGN_FILL heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize setLayoutData
Set the layout data of the button to a Form Data with appropriate heights and widths param button protected void set Button Layout Form Data Button button Form Data data new Form Data data height convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x button set Layout Data data  FormData setButtonLayoutFormData FormData FormData convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint computeSize setLayoutData
see org eclipse jface window Window close public boolean close boolean return Value super close if return Value buttons new Hash Map button Bar null dialog Area null return return Value  returnValue returnValue HashMap buttonBar dialogArea returnValue
Applies the dialog font to all controls that currently have the default font param control the control to apply the font to Font will also be applied to its children If the control is code null code nothing happens public static void apply Dialog Font Control control if control null dialog Font Is Default return Font dialog Font J Face Resources get Dialog Font apply Dialog Font control dialog Font  applyDialogFont dialogFontIsDefault dialogFont JFaceResources getDialogFont applyDialogFont dialogFont
Sets the dialog font on the control and any of its children if thier font is not otherwise set param control the control to apply the font to Font will also be applied to its children param dialog Font the dialog font to set private static void apply Dialog Font Control control Font dialog Font if has Default Font control control set Font dialog Font if control instanceof Composite Control children Composite control get Children for int i 0 i children length i apply Dialog Font children i dialog Font  dialogFont applyDialogFont dialogFont hasDefaultFont setFont dialogFont getChildren applyDialogFont dialogFont
Return whether or not this control has the same font as it s default param control Control return boolean private static boolean has Default Font Control control Font Data control Font Data control get Font get Font Data Font Data default Font Data get Default Font control get Font Data if control Font Data length default Font Data length for int i 0 i control Font Data length i if control Font Data i equals default Font Data i continue return false return true return false  hasDefaultFont FontData controlFontData getFont getFontData FontData defaultFontData getDefaultFont getFontData controlFontData defaultFontData controlFontData controlFontData defaultFontData
Get the default font for this type of control param control return private static Font get Default Font Control control String font Name DEFAULT FONT  control get Class get Name NON NLS 1 if J Face Resources get Font Registry has Value For font Name return J Face Resources get Font Registry get font Name Font cached control get Font control set Font null Font default Font control get Font control set Font cached J Face Resources get Font Registry put font Name default Font get Font Data return default Font  getDefaultFont fontName DEFAULT_FONT_ getClass getName JFaceResources getFontRegistry hasValueFor fontName JFaceResources getFontRegistry fontName getFont setFont defaultFont getFont setFont JFaceResources getFontRegistry fontName defaultFont getFontData defaultFont
Return whether or not the dialog font is currently the same as the default font return boolean if the two are the same protected static boolean dialog Font Is Default Font Data dialog Font Data J Face Resources get Font Registry get Font Data J Face Resources DIALOG FONT Font Data default Font Data J Face Resources get Font Registry get Font Data J Face Resources DEFAULT FONT return Arrays equals dialog Font Data default Font Data  dialogFontIsDefault FontData dialogFontData JFaceResources getFontRegistry getFontData JFaceResources DIALOG_FONT FontData defaultFontData JFaceResources getFontRegistry getFontData JFaceResources DEFAULT_FONT dialogFontData defaultFontData
see org eclipse jface window Window create public void create super create apply Dialog Font button Bar  applyDialogFont buttonBar
Get the I Dialog Blocked Handler to be used by Wizard Dialogs and Modal Contexts return Returns the blocked Handler public static I Dialog Blocked Handler get Blocked Handler return blocked Handler  IDialogBlockedHandler WizardDialogs ModalContexts blockedHandler IDialogBlockedHandler getBlockedHandler blockedHandler
Set the I Dialog Blocked Handler to be used by Wizard Dialogs and Modal Contexts param blocked Handler The blocked Handler for the dialogs public static void set Blocked Handler I Dialog Blocked Handler blocked Handler Dialog blocked Handler blocked Handler  IDialogBlockedHandler WizardDialogs ModalContexts blockedHandler blockedHandler setBlockedHandler IDialogBlockedHandler blockedHandler blockedHandler blockedHandler

private C Label title Label Create a new instance of the receiver public Dialog Message Area No initial behaviour  CLabel titleLabel DialogMessageArea
Create the contents for the receiver param parent the Composite that the children will be created in public void create Contents Composite parent Display display parent get Display Color background J Face Colors get Banner Background display Color foreground J Face Colors get Banner Foreground display Message label title Label new C Label parent SWT NONE J Face Colors set Colors title Label foreground background title Label set Font J Face Resources get Banner Font message Composite new Composite parent 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 Layout make Columns Equal Width false message Composite set Layout message Layout message Image Label new Label message Composite SWT NONE message Image Label set Image J Face Resources get Image Dialog DLG IMG MESSAGE INFO message Image Label set Layout Data new Grid Data Grid Data VERTICAL ALIGN CENTER message Image Label set Background parent get Display get System Color SWT COLOR YELLOW message Text new Text message Composite SWT NONE message Text set Editable false message Text set Background parent get Display get System Color SWT COLOR RED Grid Data text Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN CENTER message Text set Layout Data text Data set Message Colors J Face Colors get Banner Background message Composite get Display  createContents getDisplay JFaceColors getBannerBackground JFaceColors getBannerForeground titleLabel CLabel JFaceColors setColors titleLabel titleLabel setFont JFaceResources getBannerFont messageComposite GridLayout messageLayout GridLayout messageLayout numColumns messageLayout marginWidth messageLayout marginHeight messageLayout makeColumnsEqualWidth messageComposite setLayout messageLayout messageImageLabel messageComposite messageImageLabel setImage JFaceResources getImage DLG_IMG_MESSAGE_INFO messageImageLabel setLayoutData GridData GridData VERTICAL_ALIGN_CENTER messageImageLabel setBackground getDisplay getSystemColor COLOR_YELLOW messageText messageComposite messageText setEditable messageText setBackground getDisplay getSystemColor COLOR_RED GridData textData GridData GridData GRAB_HORIZONTAL GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_CENTER messageText setLayoutData textData setMessageColors JFaceColors getBannerBackground messageComposite getDisplay
Set the layout Data for the title area In most cases this will be a copy of the layout Data used in set Message Layout Data param layout Data the layout Data for the title see set Message Layout Data Object public void set Title Layout Data Object layout Data title Label set Layout Data layout Data  layoutData layoutData setMessageLayoutData layoutData layoutData setMessageLayoutData setTitleLayoutData layoutData titleLabel setLayoutData layoutData
Set the layout Data for the message Area In most cases this will be a copy of the layout Data used in set Title Layout Data param layout Data the layout Data for the message area composite see set Title Layout Data Object public void set Message Layout Data Object layout Data message Composite set Layout Data layout Data  layoutData messageArea layoutData setTitleLayoutData layoutData layoutData setTitleLayoutData setMessageLayoutData layoutData messageComposite setLayoutData layoutData
Show the title param title Message String for the titke param title Image Image or code null code public void show Title String title Message Image title Image title Label set Image title Image title Label set Text title Message restore Title return  titleMessage titleImage showTitle titleMessage titleImage titleLabel setImage titleImage titleLabel setText titleMessage restoreTitle
Enable the title and disable the message text and image public void restore Title title Label set Visible true message Composite set Visible false last Message Text null last Message Type I Message Provider NONE  restoreTitle titleLabel setVisible messageComposite setVisible lastMessageText lastMessageType IMessageProvider
Show the new message in the message text and update the image Base the background color on whether or not there are errors param new Message The new value for the message param new Type One of the I Message Provider constants If new Type is I Message Provider NONE show the title see I Message Provider public void update Text String new Message int new Type Image new Image null boolean showing Error false switch new Type case I Message Provider NONE if new Message null restore Title else show Title new Message null return case I Message Provider INFORMATION new Image J Face Resources get Image Dialog DLG IMG MESSAGE INFO break case I Message Provider WARNING new Image J Face Resources get Image Dialog DLG IMG MESSAGE WARNING break case I Message Provider ERROR new Image J Face Resources get Image Dialog DLG IMG MESSAGE ERROR showing Error true break message Composite set Visible true title Label set Visible false Any more updates required if new Message equals message Text get Text new Image message Image Label get Image return message Image Label set Image new Image message Text set Text new Message if showing Error set Message Colors J Face Colors get Error Background message Composite get Display else last Message Text new Message set Message Colors J Face Colors get Banner Background message Composite get Display  newMessage newType IMessageProvider newType IMessageProvider IMessageProvider updateText newMessage newType newImage showingError newType IMessageProvider newMessage restoreTitle showTitle newMessage IMessageProvider newImage JFaceResources getImage DLG_IMG_MESSAGE_INFO IMessageProvider newImage JFaceResources getImage DLG_IMG_MESSAGE_WARNING IMessageProvider newImage JFaceResources getImage DLG_IMG_MESSAGE_ERROR showingError messageComposite setVisible titleLabel setVisible newMessage messageText getText newImage messageImageLabel getImage messageImageLabel setImage newImage messageText setText newMessage showingError setMessageColors JFaceColors getErrorBackground messageComposite getDisplay lastMessageText newMessage setMessageColors JFaceColors getBannerBackground messageComposite getDisplay
Set the colors of the message area param color The color to be use in the message area private void set Message Colors Color color message Text set Background color message Composite set Background color message Image Label set Background color  setMessageColors messageText setBackground messageComposite setBackground messageImageLabel setBackground
Clear the error message Restore the previously displayed message if there is one if not restore the title label public void clear Error Message if last Message Text null restore Title else update Text last Message Text last Message Type  clearErrorMessage lastMessageText restoreTitle updateText lastMessageText lastMessageType

private Font Metrics font Metrics Creates a new empty dialog page protected Dialog Page No initial behaviour  FontMetrics fontMetrics 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 data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x button set Layout Data data return data  GridData initializeDialogUnits GridData GridData GridData setButtonLayoutData GridData GridData GridData HORIZONTAL_ALIGN_FILL heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize 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

private final String TAG ITEM item NON NLS 1 Create an empty dialog settings which loads and saves its content to a file Use the methods code load String code and code store String code to load and store this dialog settings param section Name the name of the section in the settings public Dialog Settings String section Name name section Name items new Hash Map array Items new Hash Map sections new Hash Map  TAG_ITEM sectionName DialogSettings sectionName sectionName HashMap arrayItems HashMap HashMap
public I Dialog Settings add New Section String section Name Dialog Settings section new Dialog Settings section Name add Section section return section  IDialogSettings addNewSection sectionName DialogSettings DialogSettings sectionName addSection
Method declared on I Dialog Settings public void add Section I Dialog Settings section sections put section get Name section  IDialogSettings addSection IDialogSettings getName
Method declared on I Dialog Settings public String get String key return String items get key  IDialogSettings
Method declared on I Dialog Settings public String get Array String key return String array Items get key  IDialogSettings getArray arrayItems
Method declared on I Dialog Settings public boolean get Boolean String key return new Boolean String items get key boolean Value  IDialogSettings getBoolean booleanValue
public double get Double String key throws Number Format Exception String setting String items get key if setting null throw new Number Format Exception There is no setting associated with the key key NON NLS 1 NON NLS 2 return new Double setting double Value  getDouble NumberFormatException NumberFormatException doubleValue
public float get Float String key throws Number Format Exception String setting String items get key if setting null throw new Number Format Exception There is no setting associated with the key key NON NLS 1 NON NLS 2 return new Float setting float Value  getFloat NumberFormatException NumberFormatException floatValue
public int get Int String key throws Number Format Exception String setting String items get key if setting null new Integer null will throw a Number Format Exception and meet our spec but this message is clearer throw new Number Format Exception There is no setting associated with the key key NON NLS 1 NON NLS 2 return new Integer setting int Value  getInt NumberFormatException NumberFormatException NumberFormatException intValue
public long get Long String key throws Number Format Exception String setting String items get key if setting null new Long null will throw a Number Format Exception and meet our spec but this message is clearer throw new Number Format Exception There is no setting associated with the key key NON NLS 1 NON NLS 2 return new Long setting long Value  getLong NumberFormatException NumberFormatException NumberFormatException longValue
Method declared on I Dialog Settings public String get Name return name  IDialogSettings getName
Method declared on I Dialog Settings public I Dialog Settings get Section String section Name return I Dialog Settings sections get section Name  IDialogSettings IDialogSettings getSection sectionName IDialogSettings sectionName
public I Dialog Settings get Sections Collection values sections values Dialog Settings result new Dialog Settings values size values to Array result return result  IDialogSettings getSections DialogSettings DialogSettings toArray
public void load Reader r Document document null try Document Builder parser Document Builder Factory new Instance new Document Builder parser set Process Namespace true document parser parse new Input Source r Strip out any comments first Node root document get First Child while root get Node Type Node COMMENT NODE document remove Child root root document get First Child load document Element root catch Parser Configuration Exception e ignore catch IO Exception e ignore catch SAX Exception e ignore  DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder setProcessNamespace InputSource getFirstChild getNodeType COMMENT_NODE removeChild getFirstChild ParserConfigurationException IOException SAXException
public void load String file Name throws IO Exception File Input Stream stream new File Input Stream file Name Buffered Reader reader new Buffered Reader new Input Stream Reader stream utf 8 NON NLS 1 load reader reader close  fileName IOException FileInputStream FileInputStream fileName BufferedReader BufferedReader InputStreamReader
private void load Document document Element root name root get Attribute TAG NAME Node List l root get Elements By Tag Name TAG ITEM for int i 0 i l get Length i Node n l item i if root n get Parent Node String key Element l item i get Attribute TAG KEY String value Element l item i get Attribute TAG VALUE items put key value l root get Elements By Tag Name TAG LIST for int i 0 i l get Length i Node n l item i if root n get Parent Node Element child Element l item i String key child get Attribute TAG KEY Node List list child get Elements By Tag Name TAG ITEM List value List new Array List for int j 0 j list get Length j Element node Element list item j if child node get Parent Node value List add node get Attribute TAG VALUE String value new String value List size value List to Array value array Items put key value l root get Elements By Tag Name TAG SECTION for int i 0 i l get Length i Node n l item i if root n get Parent Node Dialog Settings s new Dialog Settings No Name NON NLS 1 s load document Element n add Section s  getAttribute TAG_NAME NodeList getElementsByTagName TAG_ITEM getLength getParentNode getAttribute TAG_KEY getAttribute TAG_VALUE getElementsByTagName TAG_LIST getLength getParentNode getAttribute TAG_KEY NodeList getElementsByTagName TAG_ITEM valueList ArrayList getLength getParentNode valueList getAttribute TAG_VALUE valueList valueList toArray arrayItems getElementsByTagName TAG_SECTION getLength getParentNode DialogSettings DialogSettings NoName addSection
Method declared on I Dialog Settings public void put String key String value array Items put key value  IDialogSettings arrayItems
Method declared on I Dialog Settings public void put String key double value put key String value Of value  IDialogSettings valueOf
Method declared on I Dialog Settings public void put String key float value put key String value Of value  IDialogSettings valueOf
Method declared on I Dialog Settings public void put String key int value put key String value Of value  IDialogSettings valueOf
Method declared on I Dialog Settings public void put String key long value put key String value Of value  IDialogSettings valueOf
Method declared on I Dialog Settings public void put String key String value items put key value  IDialogSettings
Method declared on I Dialog Settings public void put String key boolean value put key String value Of value  IDialogSettings valueOf
public void save Writer writer throws IO Exception try Document document Document Builder Factory new Instance new Document Builder new Document save document document Result result new Stream Result writer Source source new DOM Source document Transformer transformer Transformer Factory new Instance new Transformer transformer set Output Property Output Keys METHOD xml NON NLS 1 transformer set Output Property Output Keys ENCODING UTF 8 NON NLS 1 transformer transform source result catch Transformer Configuration Exception e throw IO Exception new IO Exception init Cause e catch Transformer Exception e throw IO Exception new IO Exception init Cause e catch Parser Configuration Exception e throw IO Exception new IO Exception init Cause e  IOException DocumentBuilderFactory newInstance newDocumentBuilder newDocument StreamResult DOMSource TransformerFactory newInstance newTransformer setOutputProperty OutputKeys setOutputProperty OutputKeys TransformerConfigurationException IOException IOException initCause TransformerException IOException IOException initCause ParserConfigurationException IOException IOException initCause
public void save String file Name throws IO Exception File Output Stream stream new File Output Stream file Name Output Stream Writer writer new Output Stream Writer stream utf 8 NON NLS 1 save writer writer close  fileName IOException FileOutputStream FileOutputStream fileName OutputStreamWriter OutputStreamWriter
private void save Document document Node parent Element root document create Element TAG SECTION parent append Child root root set Attribute TAG NAME name null name NON NLS 1 for Iterator i items key Set iterator i has Next String key String i next Element child document create Element TAG ITEM root append Child child child set Attribute TAG KEY key null key NON NLS 1 String string String items get key child set Attribute TAG VALUE string null string NON NLS 1 for Iterator i array Items key Set iterator i has Next String key String i next Element child document create Element TAG LIST root append Child child child set Attribute TAG KEY key null key NON NLS 1 String value String array Items get key if value null for int index 0 index value length index Element c document create Element TAG ITEM child append Child c String string value index c set Attribute TAG VALUE string null string NON NLS 1 for Iterator i sections values iterator i has Next Dialog Settings i next save document root  createElement TAG_SECTION appendChild setAttribute TAG_NAME keySet hasNext createElement TAG_ITEM appendChild setAttribute TAG_KEY setAttribute TAG_VALUE arrayItems keySet hasNext createElement TAG_LIST appendChild setAttribute TAG_KEY arrayItems createElement TAG_ITEM appendChild setAttribute TAG_VALUE hasNext DialogSettings

private java util List status List Creates an error dialog Note that the dialog will have no visual representation no widgets until it is told to open p Normally one should use code open Error code to create and open one of these This constructor is useful only if the error object being displayed contains child items it and it you need to specify a mask which will be used to filter the displaying of these children p param parent Shell the shell under which to create this dialog param dialog Title the title to use for this dialog or code null code to indicate that the default title should be used param message the message to show in this dialog or code null code to indicate that the error s message should be shown as the primary message param status the error to show to the user param display Mask the mask to use to filter the displaying of child items as per code I Status matches code see org eclipse core runtime I Status matches int public Error Dialog Shell parent Shell String dialog Title String message I Status status int display Mask super parent Shell this title dialog Title null J Face Resources get String Problem Occurred NON NLS 1 dialog Title this message message null status get Message J Face Resources format Reason new Object message status get Message NON NLS 1 this status status status List Arrays as List status get Children this display Mask display Mask set Shell Style SWT DIALOG TRIM SWT RESIZE SWT APPLICATION MODAL  statusList openError parentShell dialogTitle displayMask IStatus IStatus ErrorDialog parentShell dialogTitle IStatus displayMask parentShell dialogTitle JFaceResources getString Problem_Occurred dialogTitle getMessage JFaceResources getMessage statusList asList getChildren displayMask displayMask setShellStyle DIALOG_TRIM APPLICATION_MODAL
protected void button Pressed int id if id I Dialog Constants DETAILS ID was the details button pressed toggle Details Area else super button Pressed id  buttonPressed IDialogConstants DETAILS_ID toggleDetailsArea buttonPressed
non Javadoc Method declared in Window protected void configure Shell Shell shell super configure Shell shell shell set Text title  configureShell configureShell setText
protected void create Buttons For Button Bar Composite parent create OK and Details buttons create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true if status is Multi Status details Button create Button parent I Dialog Constants DETAILS ID I Dialog Constants SHOW DETAILS LABEL false  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL isMultiStatus detailsButton createButton IDialogConstants DETAILS_ID IDialogConstants SHOW_DETAILS_LABEL
This implementation of the code Dialog code framework method creates and lays out a composite and calls code create Message Area code and code create Custom Area code to populate it Subclasses should override code create Custom Area code to add contents below the message protected Control create Dialog Area Composite parent create Message Area parent create a composite with standard margins and spacing Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING layout num Columns 2 composite set Layout layout Grid Data child Data new Grid Data Grid Data FILL BOTH child Data horizontal Span 2 composite set Layout Data child Data composite set Font parent get Font return composite  createMessageArea createCustomArea createCustomArea createDialogArea createMessageArea GridLayout GridLayout marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING numColumns setLayout GridData childData GridData GridData FILL_BOTH childData horizontalSpan setLayoutData childData setFont getFont
protected void create Dialog And Button Area Composite parent super create Dialog And Button Area parent if this dialog Area instanceof Composite Create a label if there are no children to force a smaller layout Composite dialog Composite Composite dialog Area if dialog Composite get Children length 0 new Label dialog Composite SWT NULL  createDialogAndButtonArea createDialogAndButtonArea dialogArea dialogComposite dialogArea dialogComposite getChildren dialogComposite
protected Image get Image if status null if status get Severity I Status WARNING return get Warning Image if status get Severity I Status INFO return get Info Image If it was not a warning or an error then return the error image return get Error Image  getImage getSeverity IStatus getWarningImage getSeverity IStatus getInfoImage getErrorImage
see Selection Listener widget Selected Selection Event public void widget Selected Selection Event e copy To Clipboard  SelectionListener widgetSelected SelectionEvent widgetSelected SelectionEvent copyToClipboard
see Selection Listener widget Default Selected Selection Event public void widget Default Selected Selection Event e copy To Clipboard  SelectionListener widgetDefaultSelected SelectionEvent widgetDefaultSelected SelectionEvent copyToClipboard
Create this dialog s drop down list component param parent the parent composite return the drop down list component protected List create Drop Down List Composite parent create the list list new List parent SWT BORDER SWT H SCROLL SWT V SCROLL SWT MULTI fill the list populate List list Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Grid Data VERTICAL ALIGN FILL Grid Data GRAB VERTICAL data height Hint list get Item Height LIST ITEM COUNT data horizontal Span 2 list set Layout Data data list set Font parent get Font Menu copy Menu new Menu list Menu Item copy Item new Menu Item copy Menu SWT NONE copy Item add Selection Listener new Selection Listener see Selection Listener widget Selected Selection Event public void widget Selected Selection Event e copy To Clipboard see Selection Listener widget Default Selected Selection Event public void widget Default Selected Selection Event e copy To Clipboard copy Item set Text J Face Resources get String copy NON NLS 1 list set Menu copy Menu list Created true return list  createDropDownList H_SCROLL V_SCROLL populateList GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridData VERTICAL_ALIGN_FILL GridData GRAB_VERTICAL heightHint getItemHeight LIST_ITEM_COUNT horizontalSpan setLayoutData setFont getFont copyMenu MenuItem copyItem MenuItem copyMenu copyItem addSelectionListener SelectionListener SelectionListener widgetSelected SelectionEvent widgetSelected SelectionEvent copyToClipboard SelectionListener widgetDefaultSelected SelectionEvent widgetDefaultSelected SelectionEvent copyToClipboard copyItem setText JFaceResources getString setMenu copyMenu listCreated
Extends code Window open code Opens an error dialog to display the error If you specified a mask to filter the displaying of these children the error dialog will only be displayed if there is at least one child status matching the mask public int open if AUTOMATED MODE should Display status display Mask return super open set Return Code OK return OK  AUTOMATED_MODE shouldDisplay displayMask setReturnCode
Opens an error dialog to display the given error Use this method if the error object being displayed does not contain child items or if you wish to display all such items without filtering param parent the parent shell of the dialog or code null code if none param dialog Title the title to use for this dialog or code null code to indicate that the default title should be used param message the message to show in this dialog or code null code to indicate that the error s message should be shown as the primary message param status the error to show to the user return the code of the button that was pressed that resulted in this dialog closing This will be code Dialog OK code if the OK button was pressed or code Dialog CANCEL code if this dialog s close window decoration or the ESC key was used public static int open Error Shell parent String dialog Title String message I Status status return open Error parent dialog Title message status I Status OK I Status INFO I Status WARNING I Status ERROR  dialogTitle openError dialogTitle IStatus openError dialogTitle IStatus IStatus IStatus IStatus
Opens an error dialog to display the given error Use this method if the error object being displayed contains child items it and it you wish to specify a mask which will be used to filter the displaying of these children The error dialog will only be displayed if there is at least one child status matching the mask param parent Shell the parent shell of the dialog or code null code if none param title the title to use for this dialog or code null code to indicate that the default title should be used param message the message to show in this dialog or code null code to indicate that the error s message should be shown as the primary message param status the error to show to the user param display Mask the mask to use to filter the displaying of child items as per code I Status matches code return the code of the button that was pressed that resulted in this dialog closing This will be code Dialog OK code if the OK button was pressed or code Dialog CANCEL code if this dialog s close window decoration or the ESC key was used see org eclipse core runtime I Status matches int public static int open Error Shell parent Shell String title String message I Status status int display Mask Error Dialog dialog new Error Dialog parent Shell title message status display Mask return dialog open  parentShell displayMask IStatus IStatus openError parentShell IStatus displayMask ErrorDialog ErrorDialog parentShell displayMask
Populates the list using this error dialog s status object This walks the child static of the status object and displays them in a list The format for each entry is status path status message If the status s path was null then it and the colon are omitted param list To Populate The list to fill private void populate List List list To Populate Iterator enum status List iterator while enum has Next I Status child Status I Status enum next populate List list To Populate child Status 0  status_path status_message listToPopulate populateList listToPopulate statusList hasNext IStatus childStatus IStatus populateList listToPopulate childStatus
private void populate List List list To Populate I Status building Status int nesting if building Status matches display Mask return String Buffer sb new String Buffer for int i 0 i nesting i sb append NESTING INDENT NON NLS 1 sb append building Status get Message list To Populate add sb to String I Status children building Status get Children for int i 0 i children length i populate List list To Populate children i nesting 1  populateList listToPopulate IStatus buildingStatus buildingStatus displayMask StringBuffer StringBuffer NESTING_INDENT buildingStatus getMessage listToPopulate toString IStatus buildingStatus getChildren populateList listToPopulate
Returns whether the given status object should be displayed param status a status object param mask a mask as per code I Status matches code return code true code if the given status should be displayed and code false code otherwise see org eclipse core runtime I Status matches int protected static boolean should Display I Status status int mask I Status children status get Children if children null children length 0 return status matches mask for int i 0 i children length i if children i matches mask return true return false  IStatus IStatus shouldDisplay IStatus IStatus getChildren
Toggles the unfolding of the details area This is triggered by the user pressing the details button private void toggle Details Area Point window Size get Shell get Size Point old Size get Shell compute Size SWT DEFAULT SWT DEFAULT if list Created list dispose list Created false details Button set Text I Dialog Constants SHOW DETAILS LABEL else list create Drop Down List Composite get Contents details Button set Text I Dialog Constants HIDE DETAILS LABEL Point new Size get Shell compute Size SWT DEFAULT SWT DEFAULT get Shell set Size new Point window Size x window Size y new Size y old Size y  toggleDetailsArea windowSize getShell getSize oldSize getShell computeSize listCreated listCreated detailsButton setText IDialogConstants SHOW_DETAILS_LABEL createDropDownList getContents detailsButton setText IDialogConstants HIDE_DETAILS_LABEL newSize getShell computeSize getShell setSize windowSize windowSize newSize oldSize
Put the details of the status of the error onto the stream param building Status param buffer param nesting private void populate Copy Buffer I Status building Status String Buffer buffer int nesting if building Status matches display Mask return for int i 0 i nesting i buffer append NESTING INDENT NON NLS 1 buffer append building Status get Message buffer append n NON NLS 1 I Status children building Status get Children for int i 0 i children length i populate Copy Buffer children i buffer nesting 1  buildingStatus populateCopyBuffer IStatus buildingStatus StringBuffer buildingStatus displayMask NESTING_INDENT buildingStatus getMessage IStatus buildingStatus getChildren populateCopyBuffer
Copy the contents of the statuses to the clipboard private void copy To Clipboard if clipboard null clipboard dispose String Buffer status Buffer new String Buffer populate Copy Buffer status status Buffer 0 clipboard new Clipboard list get Display clipboard set Contents new Object status Buffer to String new Transfer Text Transfer get Instance  copyToClipboard StringBuffer statusBuffer StringBuffer populateCopyBuffer statusBuffer getDisplay setContents statusBuffer toString TextTransfer getInstance
public boolean close if clipboard null clipboard dispose return super close 

protected Label image Label Constructor for Icon And Message Dialog param parent Shell the parent shell or code null code to create a top level shell public Icon And Message Dialog Shell parent Shell super parent Shell  imageLabel IconAndMessageDialog parentShell IconAndMessageDialog parentShell parentShell
Create the area the message will be shown in param composite The composite to parent from return Control protected Control create Message Area Composite composite create composite create image Image image get Image if image null image Label new Label composite SWT NULL image set Background image Label get Background image Label set Image image image Label set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN CENTER Grid Data VERTICAL ALIGN BEGINNING create message if message null message Label new Label composite get Message Label Style message Label set Text message Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN BEGINNING data width Hint convert HorizontalDL Us To Pixels I Dialog Constants MINIMUM MESSAGE AREA WIDTH message Label set Layout Data data return composite  createMessageArea getImage imageLabel setBackground imageLabel getBackground imageLabel setImage imageLabel setLayoutData GridData GridData HORIZONTAL_ALIGN_CENTER GridData VERTICAL_ALIGN_BEGINNING messageLabel getMessageLabelStyle messageLabel setText GridData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_BEGINNING widthHint convertHorizontalDLUsToPixels IDialogConstants MINIMUM_MESSAGE_AREA_WIDTH messageLabel setLayoutData
Returns the style for the message label return the style for the message label since 3 0 protected int get Message Label Style return SWT WRAP  getMessageLabelStyle
protected Control create Button Bar Composite parent Composite composite new Composite parent SWT NONE create a layout with spacing and margins appropriate for the font size Grid Layout layout new Grid Layout layout num Columns 0 this is incremented by create Button layout make Columns Equal Width true layout margin Width 0 layout margin Height 0 layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING composite set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data VERTICAL ALIGN CENTER data horizontal Span 2 composite set Layout Data data composite set Font parent get Font Add the buttons to the button bar create Buttons For Button Bar composite return composite  createButtonBar GridLayout GridLayout numColumns createButton makeColumnsEqualWidth marginWidth marginHeight horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING setLayout GridData GridData GridData HORIZONTAL_ALIGN_END GridData VERTICAL_ALIGN_CENTER horizontalSpan setLayoutData setFont getFont createButtonsForButtonBar
Returns the image to display beside the message in this dialog p Subclasses may override p return the image to display beside the message since 2 0 
protected Control create Contents Composite parent initialize the dialog units initialize Dialog Units parent Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN 3 2 layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING 2 layout make Columns Equal Width false parent set Layout layout parent set Layout Data new Grid Data Grid Data FILL BOTH create Dialog And Button Area parent return parent  createContents initializeDialogUnits GridLayout GridLayout numColumns marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING makeColumnsEqualWidth setLayout setLayoutData GridData GridData FILL_BOTH createDialogAndButtonArea
Create the dialog area and the button bar for the receiver param parent protected void create Dialog And Button Area Composite parent create the dialog area and button bar dialog Area create Dialog Area parent button Bar create Button Bar parent Apply to the parent so that the message gets it too apply Dialog Font parent  createDialogAndButtonArea dialogArea createDialogArea buttonBar createButtonBar applyDialogFont
Return the code Image code to be used when displaying an error return image the error image public Image get Error Image return getSWT Image SWT ICON ERROR  getErrorImage getSWTImage ICON_ERROR
Return the code Image code to be used when displaying a warning return image the warning image public Image get Warning Image return getSWT Image SWT ICON WARNING  getWarningImage getSWTImage ICON_WARNING
Return the code Image code to be used when displaying information return image the information image public Image get Info Image return getSWT Image SWT ICON INFORMATION  getInfoImage getSWTImage ICON_INFORMATION
Return the code Image code to be used when displaying a question return image the question image public Image get Question Image return getSWT Image SWT ICON QUESTION  getQuestionImage getSWTImage ICON_QUESTION
Get an code Image code from the provide SWT image constant param imageID the SWT image constant return image the image private Image getSWT Image final int imageID Shell shell get Shell final Display display if shell null shell get Parent Shell if shell null display Display get Current else display shell get Display final Image image new Image 1 display sync Exec new Runnable public void run image 0 display get System Image imageID return image 0  getSWTImage getShell getParentShell getCurrent getDisplay syncExec getSystemImage

public interface I Dialog Blocked Handler The blockage has been cleared Clear the extra information and resume  IDialogBlockedHandler
A blockage has occured Show the blockage and forward any actions to blocking Monitor b NOTE b This will open any blocked notification immediately even if there is a modal shell open param parent Shell The shell this is being sent from If the parent shell is code null code the behavior will be the same as I Dialog Blocked Handler show Blocked I Progress Monitor I Status String param blocking The monitor to forward to This is most important for calls to code cancel code param blocking Status The status that describes the blockage param blocked Name The name of the locked operation see I Dialog Blocked Handler show Blocked I Progress Monitor I Status String public void show Blocked Shell parent Shell I Progress Monitor blocking I Status blocking Status  blockingMonitor parentShell IDialogBlockedHandler showBlocked IProgressMonitor IStatus blockingStatus blockedName IDialogBlockedHandler showBlocked IProgressMonitor IStatus showBlocked parentShell IProgressMonitor IStatus blockingStatus
A blockage has occured Show the blockage when there is no longer any modal shells in the UI and forward any actions to blocking Monitor b NOTE b As no shell has been specified this method will not open any blocked notification until all other modal shells have been closed param blocking The monitor to forward to This is most important for calls to code cancel code param blocking Status The status that describes the blockage param blocked Name The name of the locked operation public void show Blocked I Progress Monitor blocking I Status blocking Status  blockingMonitor blockingStatus blockedName showBlocked IProgressMonitor IStatus blockingStatus

public interface I Dialog Page Creates the top level control for this dialog page under the given parent composite p Implementors are responsible for ensuring that the created control can be accessed via code get Control code p param parent the parent composite  IDialogPage getControl
public void create Control Composite parent Disposes the SWT resources allocated by this dialog page  createControl
public void dispose Returns the top level control for this dialog page p May return code null code if the control has not been created yet p return the top level control or code null code 
public Control get Control Returns this dialog page s description text return the description text for this dialog page or code null code if none  getControl
public String get Description Returns the current error message for this dialog page May be code null null to indicate no error message p An error message should describe some error state as opposed to a message which may simply provide instruction or information to the user p return the error message or code null code if none  getDescription
public String get Error Message Returns this dialog page s image return the image for this dialog page or code null code if none  getErrorMessage
public Image get Image Returns the current message for this wizard page p A message provides instruction or information to the user as opposed to an error message which should describe some error state p return the message or code null code if none  getImage
public String get Message Returns this dialog page s title return the title of this dialog page or code null code if none  getMessage
public String get Title Notifies that help has been requested for this dialog page public void perform Help  getTitle performHelp
public void perform Help Sets this dialog page s description text param description the description text for this dialog page or code null code if none  performHelp
public void set Description String description Sets this dialog page s image param image the image for this dialog page or code null code if none  setDescription
public void set Image Descriptor Image Descriptor image Set this dialog page s title param title the title of this dialog page or code null code if none  setImageDescriptor ImageDescriptor
public void set Title String title Sets the visibility of this dialog page param visible code true code to make this page visible and code false code to hide it  setTitle

public interface I Dialog Settings Create a new section in the receiver and return it param name the name of the new section return the new section  IDialogSettings
public I Dialog Settings add New Section String name Add a section in the receiver param section the section to be added  IDialogSettings addNewSection
public void add Section I Dialog Settings section Returns the value of the given key in this dialog settings param key the key return the value or code null code if none  addSection IDialogSettings
public String get String key Returns the value an array of strings of the given key in this dialog settings param key the key return the array of string or code null code if none 
public String get Array String key Convenience API Convert the value of the given key in this dialog settings to a boolean and return it param key the key return the boolean value or code false code if none  getArray
public boolean get Boolean String key Convenience API Convert the value of the given key in this dialog settings to a double and return it param key the key return the value coverted to double or throws code Number Format Exception code if none exception Number Format Exception if the string value does not contain a parsable number see java lang Double value Of java lang String  getBoolean NumberFormatException NumberFormatException valueOf
public double get Double String key throws Number Format Exception Convenience API Convert the value of the given key in this dialog settings to a float and return it param key the key return the value coverted to float or throws code Number Format Exception code if none exception Number Format Exception if the string value does not contain a parsable number see java lang Float value Of java lang String  getDouble NumberFormatException NumberFormatException NumberFormatException valueOf
public float get Float String key throws Number Format Exception Convenience API Convert the value of the given key in this dialog settings to a int and return it param key the key return the value coverted to int or throws code Number Format Exception code if none exception Number Format Exception if the string value does not contain a parsable number see java lang Integer value Of java lang String  getFloat NumberFormatException NumberFormatException NumberFormatException valueOf
public int get Int String key throws Number Format Exception Convenience API Convert the value of the given key in this dialog settings to a long and return it param key the key return the value coverted to long or throws code Number Format Exception code if none exception Number Format Exception if the string value does not contain a parsable number see java lang Long value Of java lang String  getInt NumberFormatException NumberFormatException NumberFormatException valueOf
public long get Long String key throws Number Format Exception Returns the I Dialog Settings name return the name  getLong NumberFormatException IDialogSettings
public String get Name Returns the section with the given name in this dialog settings param section Name the key return I Dialog Settings the section or code null code if none  getName sectionName IDialogSettings
public I Dialog Settings get Section String section Name Returns all the sections in this dialog settings return the section or code null code if none  IDialogSettings getSection sectionName
public I Dialog Settings get Sections Load a dialog settings from a stream and fill the receiver with its content param reader a Reader specifying the stream where the settings are read from throws IO Exception  IDialogSettings getSections IOException
public void load Reader reader throws IO Exception Load a dialog settings from a file and fill the receiver with its content param file Name the name of the file the settings are read from throws IO Exception  IOException fileName IOException
public void load String file Name throws IO Exception Adds the pair code key value code to this dialog settings param key the key param value the value to be associated with the code key code  fileName IOException
public void put String key String value Convenience API Converts the double code value code to a string and adds the pair code key value code to this dialog settings param key the key param value the value to be associated with the code key code 
public void put String key double value Convenience API Converts the float code value code to a string and adds the pair code key value code to this dialog settings param key the key param value the value to be associated with the code key code 
public void put String key float value Convenience API Converts the int code value code to a string and adds the pair code key value code to this dialog settings param key the key param value the value to be associated with the code key code 
public void put String key int value Convenience API Converts the long code value code to a string and adds the pair code key value code to this dialog settings param key the key param value the value to be associated with the code key code 
public void put String key long value Adds the pair code key value code to this dialog settings param key the key param value the value to be associated with the code key code 
public void put String key String value Convenience API Converts the boolean code value code to a string and adds the pair code key value code to this dialog settings param key the key param value the value to be associated with the code key code 
public void put String key boolean value Save a dialog settings to a stream param writer a Writer specifying the stream the settings are written in throws IO Exception  IOException
public void save Writer writer throws IO Exception Save a dialog settings to a file param file Name the name of the file the settings are written in throws IO Exception  IOException fileName IOException

public interface I Input Validator Validates the given string Returns an error message to display if the new text is invalid Returns code null code if there is no error Note that the empty string is not treated the same as code null code it indicates an error state but with no message to display param new Text the text to check for validity return an error message or code null code if no error  IInputValidator newText

public final static int ERROR 3 Returns the current message for this message provider p A message provides instruction or information to the user p return the message or code null code if none 
public String get Message Returns a value indicating if the message is a an information message a warning message or an error message p Returns one of code NONE code code INFORMATION code code WARNING code or code ERROR code p return the message type  getMessage

private Text error Message Text Creates an input dialog with OK and Cancel buttons Note that the dialog will have no visual representation no widgets until it is told to open p Note that the code open code method blocks for input dialogs p param parent Shell the parent shell param dialog Title the dialog title or code null code if none param dialog Message the dialog message or code null code if none param initial Value the initial input value or code null code if none equivalent to the empty string param validator an input validator or code null code if none public Input Dialog Shell parent Shell String dialog Title String dialog Message String initial Value I Input Validator validator super parent Shell this title dialog Title message dialog Message if initial Value null value NON NLS 1 else value initial Value this validator validator  errorMessageText parentShell dialogTitle dialogMessage initialValue InputDialog parentShell dialogTitle dialogMessage initialValue IInputValidator parentShell dialogTitle dialogMessage initialValue initialValue
protected void button Pressed int button Id if button Id I Dialog Constants OK ID value text get Text else value null super button Pressed button Id  buttonPressed buttonId buttonId IDialogConstants OK_ID getText buttonPressed buttonId
protected void configure Shell Shell shell super configure Shell shell if title null shell set Text title  configureShell configureShell setText
protected void create Buttons For Button Bar Composite parent create OK and Cancel buttons by default ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false do this here because setting the text will set enablement on the ok button text set Focus if value null text set Text value text select All  createButtonsForButtonBar okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL setFocus setText selectAll
Grid Data HORIZONTAL ALIGN FILL text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Input  GridData HORIZONTAL_ALIGN_FILL addModifyListener ModifyListener modifyText ModifyEvent validateInput
protected Control create Dialog Area Composite parent create composite Composite composite Composite super create Dialog Area parent create message if message null Label label new Label composite SWT WRAP label set Text message Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER data width Hint convert HorizontalDL Us To Pixels I Dialog Constants MINIMUM MESSAGE AREA WIDTH label set Layout Data data label set Font parent get Font text new Text composite SWT SINGLE SWT BORDER text set Layout Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Input error Message Text new Text composite SWT READ ONLY error Message Text set Layout Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL error Message Text set Background error Message Text get Display get System Color SWT COLOR WIDGET BACKGROUND apply Dialog Font composite return composite  createDialogArea createDialogArea setText GridData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER widthHint convertHorizontalDLUsToPixels IDialogConstants MINIMUM_MESSAGE_AREA_WIDTH setLayoutData setFont getFont setLayoutData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL addModifyListener ModifyListener modifyText ModifyEvent validateInput errorMessageText READ_ONLY errorMessageText setLayoutData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL errorMessageText setBackground errorMessageText getDisplay getSystemColor COLOR_WIDGET_BACKGROUND applyDialogFont
Returns the error message label return the error message label deprecated use set Error Message String instead protected Label get Error Message Label return null  setErrorMessage getErrorMessageLabel
Returns the ok button return the ok button protected Button get Ok Button return ok Button  getOkButton okButton
Returns the text area return the text area protected Text get Text return text  getText
Returns the validator return the validator protected I Input Validator get Validator return validator  IInputValidator getValidator
Returns the string typed into this input dialog return the input string public String get Value return value  getValue
Validates the input p The default implementation of this framework method delegates the request to the supplied input validator object if it finds the input invalid the error message is displayed in the dialog s message line This hook method is called whenever the text changes in the input field p protected void validate Input String error Message null if validator null error Message validator is Valid text get Text Bug 16256 important not to treat blank error the same as null no error set Error Message error Message  validateInput errorMessage errorMessage isValid getText setErrorMessage errorMessage
Sets or clears the error message If not code null code the OK button is disabled param error Message the error message or code null code to clear since 3 0 public void set Error Message String error Message error Message Text set Text error Message null error Message NON NLS 1 ok Button set Enabled error Message null error Message Text get Parent update  errorMessage setErrorMessage errorMessage errorMessageText setText errorMessage errorMessage okButton setEnabled errorMessage errorMessageText getParent

private Control custom Area Create a message dialog Note that the dialog will have no visual representation no widgets until it is told to open p The labels of the buttons to appear in the button bar are supplied in this constructor as an array The code open code method will return the index of the label in this array corresponding to the button that was pressed to close the dialog If the dialog was dismissed without pressing a button ESC etc then 1 is returned Note that the code open code method blocks p param parent Shell the parent shell param dialog Title the dialog title or code null code if none param dialog Title Image the dialog title image or code null code if none param dialog Message the dialog message param dialog Image Type one of the following values ul li code Message Dialog NONE code for a dialog with no image li li code Message Dialog ERROR code for a dialog with an error image li li code Message Dialog INFORMATION code for a dialog with an information image li li code Message Dialog QUESTION code for a dialog with a question image li li code Message Dialog WARNING code for a dialog with a warning image li ul param dialog Button Labels an array of labels for the buttons in the button bar param default Index the index in the button label array of the default button public Message Dialog Shell parent Shell String dialog Title Image dialog Title Image String dialog Message int dialog Image Type String dialog Button Labels int default Index super parent Shell this title dialog Title this title Image dialog Title Image this message dialog Message switch dialog Image Type case ERROR this image get Error Image break case INFORMATION this image get Info Image break case QUESTION this image get Question Image break case WARNING this image get Warning Image break this button Labels dialog Button Labels this default Button Index default Index  customArea parentShell dialogTitle dialogTitleImage dialogMessage dialogImageType MessageDialog MessageDialog MessageDialog MessageDialog MessageDialog dialogButtonLabels defaultIndex MessageDialog parentShell dialogTitle dialogTitleImage dialogMessage dialogImageType dialogButtonLabels defaultIndex parentShell dialogTitle titleImage dialogTitleImage dialogMessage dialogImageType getErrorImage getInfoImage getQuestionImage getWarningImage buttonLabels dialogButtonLabels defaultButtonIndex defaultIndex
see org eclipse jface dialogs Dialog button Pressed int protected void button Pressed int button Id set Return Code button Id close  buttonPressed buttonPressed buttonId setReturnCode buttonId
protected void configure Shell Shell shell super configure Shell shell if title null shell set Text title if title Image null shell set Image title Image  configureShell configureShell setText titleImage setImage titleImage
protected void create Buttons For Button Bar Composite parent buttons new Button button Labels length for int i 0 i button Labels length i String label button Labels i Button button create Button parent i label default Button Index i buttons i button  createButtonsForButtonBar buttonLabels buttonLabels buttonLabels createButton defaultButtonIndex
Creates and returns the contents of an area of the dialog which appears below the message and above the button bar p The default implementation of this framework method returns code null code Subclasses may override p param parent parent composite to contain the custom area return the custom area control or code null code protected Control create Custom Area Composite parent return null  createCustomArea
This implementation of the code Dialog code framework method creates and lays out a composite and calls code create Message Area code and code create Custom Area code to populate it Subclasses should override code create Custom Area code to add contents below the message protected Control create Dialog Area Composite parent create message area create Message Area parent create the top level composite for the dialog area Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 composite set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH data horizontal Span 2 composite set Layout Data data allow subclasses to add custom controls custom Area create Custom Area composite If it is null create a dummy label for spacing purposes if custom Area null custom Area new Label composite SWT NULL return composite  createMessageArea createCustomArea createCustomArea createDialogArea createMessageArea GridLayout GridLayout marginHeight marginWidth setLayout GridData GridData GridData FILL_BOTH horizontalSpan setLayoutData customArea createCustomArea customArea customArea
Gets a button in this dialog s button bar param index the index of the button in the dialog s button bar return a button in the dialog s button bar protected Button get Button int index return buttons index  getButton
Returns the minimum message area width in pixels This determines the minimum width of the dialog p Subclasses may override p return the minimum message area width in pixels protected int get Minimum Message Width return convert HorizontalDL Us To Pixels I Dialog Constants MINIMUM MESSAGE AREA WIDTH  getMinimumMessageWidth convertHorizontalDLUsToPixels IDialogConstants MINIMUM_MESSAGE_AREA_WIDTH
Handle the shell close Set the return code to code SWT DEFAULT code as there has been no explicit close by the user see org eclipse jface window Window handle Shell Close Event protected void handle Shell Close Event Sets a return code of SWT DEFAULT since none of the dialog buttons were pressed to close the dialog super handle Shell Close Event set Return Code SWT DEFAULT  handleShellCloseEvent handleShellCloseEvent handleShellCloseEvent setReturnCode
Convenience method to open a simple confirm OK Cancel dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message return code true code if the user presses the OK button code false code otherwise public static boolean open Confirm Shell parent String title String message Message Dialog dialog new Message Dialog parent title null accept the default window icon message QUESTION new String I Dialog Constants OK LABEL I Dialog Constants CANCEL LABEL 0 OK is the default return dialog open 0  openConfirm MessageDialog MessageDialog IDialogConstants OK_LABEL IDialogConstants CANCEL_LABEL
Convenience method to open a standard error dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message public static void open Error Shell parent String title String message Message Dialog dialog new Message Dialog parent title null accept the default window icon message ERROR new String I Dialog Constants OK LABEL 0 ok is the default dialog open return  openError MessageDialog MessageDialog IDialogConstants OK_LABEL
Convenience method to open a standard information dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message public static void open Information Shell parent String title String message Message Dialog dialog new Message Dialog parent title null accept the default window icon message INFORMATION new String I Dialog Constants OK LABEL 0 ok is the default dialog open return  openInformation MessageDialog MessageDialog IDialogConstants OK_LABEL
Convenience method to open a simple Yes No question dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message return code true code if the user presses the OK button code false code otherwise public static boolean open Question Shell parent String title String message Message Dialog dialog new Message Dialog parent title null accept the default window icon message QUESTION new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL 0 yes is the default return dialog open 0  openQuestion MessageDialog MessageDialog IDialogConstants YES_LABEL IDialogConstants NO_LABEL
Convenience method to open a standard warning dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message public static void open Warning Shell parent String title String message Message Dialog dialog new Message Dialog parent title null accept the default window icon message WARNING new String I Dialog Constants OK LABEL 0 ok is the default dialog open return  openWarning MessageDialog MessageDialog IDialogConstants OK_LABEL
protected Button create Button Composite parent int id String label boolean default Button Button button super create Button parent id label default Button Be sure to set the focus if the custom area cannot so as not to lose the default Button if default Button custom Should Take Focus button set Focus return button  createButton defaultButton createButton defaultButton defaultButton defaultButton customShouldTakeFocus setFocus
Return whether or not we should apply the workaround where we take focus for the default button or if that should be determined by the dialog By default only return true if the custom area is a label or C Label that cannot take focus return boolean protected boolean custom Should Take Focus if custom Area instanceof Label return false if custom Area instanceof C Label return custom Area get Style SWT NO FOCUS 0 return true  CLabel customShouldTakeFocus customArea customArea CLabel customArea getStyle NO_FOCUS
see org eclipse jface dialogs Icon And Message Dialog get Image public Image get Image return image  IconAndMessageDialog getImage getImage
An accessor for the labels to use on the buttons return The button labels to used never code null code protected String get Button Labels return button Labels  getButtonLabels buttonLabels
An accessor for the index of the default button in the button array return The default button index protected int get Default Button Index return default Button Index  getDefaultButtonIndex defaultButtonIndex
A mutator for the array of buttons in the button bar param buttons The buttons in the button bar must not be code null code protected void set Buttons Button buttons if buttons null throw new Null Pointer Exception The array of buttons cannot be null NON NLS 1 this buttons buttons  setButtons NullPointerException
A mutator for the button labels param button Labels The button labels to use must not be code null code protected void set Button Labels String button Labels if button Labels null throw new Null Pointer Exception The array of button labels cannot be null NON NLS 1 this button Labels button Labels  buttonLabels setButtonLabels buttonLabels buttonLabels NullPointerException buttonLabels buttonLabels

Convenience method to open a standard error dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message param toggle Message the message for the toggle control or code null code for the default message param toggle State the initial state for the toggle param store the I Preference store in which the user s preference should be persisted code null code if you don t want it persisted automatically param key the key to use when persisting the user s preference code null code if you don t want it persisted return the dialog after being closed by the user which the client can only call code get Return Code code or code get Toggle State code public static Message Dialog With Toggle open Error Shell parent String title String message String toggle Message boolean toggle State I Preference Store store String key Message Dialog With Toggle dialog new Message Dialog With Toggle parent title null accept the default window icon message ERROR new String I Dialog Constants OK LABEL 0 ok is the default toggle Message toggle State dialog pref Store store dialog pref Key key dialog open return dialog  toggleMessage toggleState IPreference getReturnCode getToggleState MessageDialogWithToggle openError toggleMessage toggleState IPreferenceStore MessageDialogWithToggle MessageDialogWithToggle IDialogConstants OK_LABEL toggleMessage toggleState prefStore prefKey
Convenience method to open a standard information dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message param toggle Message the message for the toggle control or code null code for the default message param toggle State the initial state for the toggle param store the I Preference store in which the user s preference should be persisted code null code if you don t want it persisted automatically param key the key to use when persisting the user s preference code null code if you don t want it persisted return the dialog after being closed by the user which the client can only call code get Return Code code or code get Toggle State code public static Message Dialog With Toggle open Information Shell parent String title String message String toggle Message boolean toggle State I Preference Store store String key Message Dialog With Toggle dialog new Message Dialog With Toggle parent title null accept the default window icon message INFORMATION new String I Dialog Constants OK LABEL 0 ok is the default toggle Message toggle State dialog pref Store store dialog pref Key key dialog open return dialog  toggleMessage toggleState IPreference getReturnCode getToggleState MessageDialogWithToggle openInformation toggleMessage toggleState IPreferenceStore MessageDialogWithToggle MessageDialogWithToggle IDialogConstants OK_LABEL toggleMessage toggleState prefStore prefKey
Convenience method to open a simple confirm OK Cancel dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message param toggle Message the message for the toggle control or code null code for the default message param toggle State the initial state for the toggle param store the I Preference store in which the user s preference should be persisted code null code if you don t want it persisted automatically param key the key to use when persisting the user s preference code null code if you don t want it persisted return the dialog after being closed by the user which the client can only call code get Return Code code or code get Toggle State code public static Message Dialog With Toggle open Ok Cancel Confirm Shell parent String title String message String toggle Message boolean toggle State I Preference Store store String key Message Dialog With Toggle dialog new Message Dialog With Toggle parent title null accept the default window icon message QUESTION new String I Dialog Constants OK LABEL I Dialog Constants CANCEL LABEL 0 OK is the default toggle Message toggle State dialog pref Store store dialog pref Key key dialog open return dialog  toggleMessage toggleState IPreference getReturnCode getToggleState MessageDialogWithToggle openOkCancelConfirm toggleMessage toggleState IPreferenceStore MessageDialogWithToggle MessageDialogWithToggle IDialogConstants OK_LABEL IDialogConstants CANCEL_LABEL toggleMessage toggleState prefStore prefKey
Convenience method to open a standard warning dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message param toggle Message the message for the toggle control or code null code for the default message param toggle State the initial state for the toggle param store the I Preference store in which the user s preference should be persisted code null code if you don t want it persisted automatically param key the key to use when persisting the user s preference code null code if you don t want it persisted return the dialog after being closed by the user which the client can only call code get Return Code code or code get Toggle State code public static Message Dialog With Toggle open Warning Shell parent String title String message String toggle Message boolean toggle State I Preference Store store String key Message Dialog With Toggle dialog new Message Dialog With Toggle parent title null accept the default window icon message WARNING new String I Dialog Constants OK LABEL 0 ok is the default toggle Message toggle State dialog pref Store store dialog pref Key key dialog open return dialog  toggleMessage toggleState IPreference getReturnCode getToggleState MessageDialogWithToggle openWarning toggleMessage toggleState IPreferenceStore MessageDialogWithToggle MessageDialogWithToggle IDialogConstants OK_LABEL toggleMessage toggleState prefStore prefKey
Convenience method to open a simple question Yes No Cancel dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message param toggle Message the message for the toggle control or code null code for the default message param toggle State the initial state for the toggle param store the I Preference store in which the user s preference should be persisted code null code if you don t want it persisted automatically param key the key to use when persisting the user s preference code null code if you don t want it persisted return the dialog after being closed by the user which the client can only call code get Return Code code or code get Toggle State code public static Message Dialog With Toggle open Yes No Cancel Question Shell parent String title String message String toggle Message boolean toggle State I Preference Store store String key Message Dialog With Toggle dialog new Message Dialog With Toggle parent title null accept the default window icon message QUESTION new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL 0 YES is the default toggle Message toggle State dialog pref Store store dialog pref Key key dialog open return dialog  toggleMessage toggleState IPreference getReturnCode getToggleState MessageDialogWithToggle openYesNoCancelQuestion toggleMessage toggleState IPreferenceStore MessageDialogWithToggle MessageDialogWithToggle IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL toggleMessage toggleState prefStore prefKey
Convenience method to open a simple Yes No question dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message param toggle Message the message for the toggle control or code null code for the default message param toggle State the initial state for the toggle param store the I Preference store in which the user s preference should be persisted code null code if you don t want it persisted automatically param key the key to use when persisting the user s preference code null code if you don t want it persisted return the dialog after being closed by the user which the client can only call code get Return Code code or code get Toggle State code public static Message Dialog With Toggle open Yes No Question Shell parent String title String message String toggle Message boolean toggle State I Preference Store store String key Message Dialog With Toggle dialog new Message Dialog With Toggle parent title null accept the default window icon message QUESTION new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL 0 yes is the default toggle Message toggle State dialog pref Store store dialog pref Key key dialog open return dialog  toggleMessage toggleState IPreference getReturnCode getToggleState MessageDialogWithToggle openYesNoQuestion toggleMessage toggleState IPreferenceStore MessageDialogWithToggle MessageDialogWithToggle IDialogConstants YES_LABEL IDialogConstants NO_LABEL toggleMessage toggleState prefStore prefKey
Creates a message dialog with a toggle See the superclass constructor for info on the other parameters param parent Shell the parent shell param dialog Title the dialog title or code null code if none param image the dialog title image or code null code if none param message the dialog message param dialog Image Type one of the following values ul li code Message Dialog NONE code for a dialog with no image li li code Message Dialog ERROR code for a dialog with an error image li li code Message Dialog INFORMATION code for a dialog with an information image li li code Message Dialog QUESTION code for a dialog with a question image li li code Message Dialog WARNING code for a dialog with a warning image li ul param dialog Button Labels an array of labels for the buttons in the button bar param default Index the index in the button label array of the default button param toggle Message the message for the toggle control or code null code for the default message param toggle State the initial state for the toggle public Message Dialog With Toggle Shell parent Shell String dialog Title Image image String message int dialog Image Type String dialog Button Labels int default Index String toggle Message boolean toggle State super parent Shell dialog Title image message dialog Image Type dialog Button Labels default Index this toggle Message toggle Message this toggle State toggle State set Button Labels dialog Button Labels  parentShell dialogTitle dialogImageType MessageDialog MessageDialog MessageDialog MessageDialog MessageDialog dialogButtonLabels defaultIndex toggleMessage toggleState MessageDialogWithToggle parentShell dialogTitle dialogImageType dialogButtonLabels defaultIndex toggleMessage toggleState parentShell dialogTitle dialogImageType dialogButtonLabels defaultIndex toggleMessage toggleMessage toggleState toggleState setButtonLabels dialogButtonLabels
see org eclipse jface dialogs Dialog button Pressed int protected void button Pressed int button Id super button Pressed button Id if button Id I Dialog Constants CANCEL ID toggle State pref Store null pref Key null switch button Id case I Dialog Constants YES ID case I Dialog Constants YES TO ALL ID case I Dialog Constants PROCEED ID case I Dialog Constants OK ID pref Store set Value pref Key ALWAYS break case I Dialog Constants NO ID case I Dialog Constants NO TO ALL ID pref Store set Value pref Key NEVER break  buttonPressed buttonPressed buttonId buttonPressed buttonId buttonId IDialogConstants CANCEL_ID toggleState prefStore prefKey buttonId IDialogConstants YES_ID IDialogConstants YES_TO_ALL_ID IDialogConstants PROCEED_ID IDialogConstants OK_ID prefStore setValue prefKey IDialogConstants NO_ID IDialogConstants NO_TO_ALL_ID prefStore setValue prefKey
see Dialog create Button Bar Composite protected void create Buttons For Button Bar Composite parent final String button Labels get Button Labels final Button buttons new Button button Labels length final int default Button Index get Default Button Index for int i 0 i button Labels length i int id i String label button Labels i if I Dialog Constants OK LABEL equals label id I Dialog Constants OK ID else if I Dialog Constants YES LABEL equals label id I Dialog Constants YES ID else if I Dialog Constants NO LABEL equals label id I Dialog Constants NO ID else if I Dialog Constants CANCEL LABEL equals label id I Dialog Constants CANCEL ID else if I Dialog Constants YES TO ALL LABEL equals label id I Dialog Constants YES TO ALL ID else if I Dialog Constants SKIP LABEL equals label id I Dialog Constants SKIP ID else if I Dialog Constants STOP LABEL equals label id I Dialog Constants STOP ID else if I Dialog Constants ABORT LABEL equals label id I Dialog Constants ABORT ID else if I Dialog Constants RETRY LABEL equals label id I Dialog Constants RETRY ID else if I Dialog Constants IGNORE LABEL equals label id I Dialog Constants IGNORE ID else if I Dialog Constants PROCEED LABEL equals label id I Dialog Constants PROCEED ID else if I Dialog Constants OPEN LABEL equals label id I Dialog Constants OPEN ID else if I Dialog Constants CLOSE LABEL equals label id I Dialog Constants CLOSE ID else if I Dialog Constants BACK LABEL equals label id I Dialog Constants BACK ID else if I Dialog Constants NEXT LABEL equals label id I Dialog Constants NEXT ID else if I Dialog Constants FINISH LABEL equals label id I Dialog Constants FINISH ID else if I Dialog Constants HELP LABEL equals label id I Dialog Constants HELP ID else if I Dialog Constants NO TO ALL LABEL equals label id I Dialog Constants NO TO ALL ID No XXX LABEL in I Dialog Constants for these Unlikely they would be used in a message dialog though public int DETAILS ID 13 public int SELECT ALL ID 18 public int DESELECT ALL ID 19 public int SELECT TYPES ID 20 Button button create Button parent id label default Button Index i buttons i button set Buttons buttons  createButtonBar createButtonsForButtonBar buttonLabels getButtonLabels buttonLabels defaultButtonIndex getDefaultButtonIndex buttonLabels buttonLabels IDialogConstants OK_LABEL IDialogConstants OK_ID IDialogConstants YES_LABEL IDialogConstants YES_ID IDialogConstants NO_LABEL IDialogConstants NO_ID IDialogConstants CANCEL_LABEL IDialogConstants CANCEL_ID IDialogConstants YES_TO_ALL_LABEL IDialogConstants YES_TO_ALL_ID IDialogConstants SKIP_LABEL IDialogConstants SKIP_ID IDialogConstants STOP_LABEL IDialogConstants STOP_ID IDialogConstants ABORT_LABEL IDialogConstants ABORT_ID IDialogConstants RETRY_LABEL IDialogConstants RETRY_ID IDialogConstants IGNORE_LABEL IDialogConstants IGNORE_ID IDialogConstants PROCEED_LABEL IDialogConstants PROCEED_ID IDialogConstants OPEN_LABEL IDialogConstants OPEN_ID IDialogConstants CLOSE_LABEL IDialogConstants CLOSE_ID IDialogConstants BACK_LABEL IDialogConstants BACK_ID IDialogConstants NEXT_LABEL IDialogConstants NEXT_ID IDialogConstants FINISH_LABEL IDialogConstants FINISH_ID IDialogConstants HELP_LABEL IDialogConstants HELP_ID IDialogConstants NO_TO_ALL_LABEL IDialogConstants NO_TO_ALL_ID XXX_LABEL IDialogConstants DETAILS_ID SELECT_ALL_ID DESELECT_ALL_ID SELECT_TYPES_ID createButton defaultButtonIndex setButtons
see Dialog create Dialog Area Composite protected Control create Dialog Area Composite parent Composite dialog Area Composite Composite super create Dialog Area parent set Toggle Button create Toggle Button dialog Area Composite return dialog Area Composite  createDialogArea createDialogArea dialogAreaComposite createDialogArea setToggleButton createToggleButton dialogAreaComposite dialogAreaComposite
button add Selection Listener new Selection Adapter public void widget Selected Selection Event e toggle State button get Selection  addSelectionListener SelectionAdapter widgetSelected SelectionEvent toggleState getSelection
Creates a toggle button without any text or state The text and state will be created by code create Dialog Area code param parent The composite in which the toggle button should be placed must not be code null code return The added toggle button never code null code protected Button create Toggle Button Composite parent final Button button new Button parent SWT CHECK SWT LEFT Grid Data data new Grid Data SWT NONE data horizontal Span 2 data horizontal Alignment Grid Data CENTER button set Layout Data data button set Font parent get Font button add Selection Listener new Selection Adapter public void widget Selected Selection Event e toggle State button get Selection return button  createDialogArea createToggleButton GridData GridData horizontalSpan horizontalAlignment GridData setLayoutData setFont getFont addSelectionListener SelectionAdapter widgetSelected SelectionEvent toggleState getSelection
Returns the toggle button return the toggle button protected Button get Toggle Button return toggle Button  getToggleButton toggleButton
An accessor for the current preference store for this dialog return The preference store this value may be code null code if no preference is being used public I Preference Store get Pref Store return pref Store  IPreferenceStore getPrefStore prefStore
An accessor for the current key of the toggle preference return The preference key this value may be code null code if no preference is being used public String get Pref Key return pref Key  getPrefKey prefKey
Returns the toggle state This can be called even after the dialog is closed return code true code if the toggle button is checked code false code if not public boolean get Toggle State return toggle State  getToggleState toggleState
A mutator for the key of the preference to be modified by the toggle button param pref Key The pref Key to set If this value is code null code then no preference will be modified public void set Pref Key String pref Key this pref Key pref Key  prefKey prefKey setPrefKey prefKey prefKey prefKey
A mutator for the preference store to be modified by the toggle button param pref Store The pref Store to set If this value is code null code then no preference will be modified public void set Pref Store I Preference Store pref Store this pref Store pref Store  prefStore prefStore setPrefStore IPreferenceStore prefStore prefStore prefStore
A mutator for the button providing the toggle option If the button exists then it will automatically get the text set to the current toggle message and its selection state set to the current selection state param button The button to use must not be code null code protected void set Toggle Button Button button if button null throw new Null Pointer Exception A message dialog with toggle may not have a null toggle button NON NLS 1 if button is Disposed final String text if toggle Message null text J Face Resources get String Message Dialog With Toggle default Toggle Message NON NLS 1 else text toggle Message button set Text text button set Selection toggle State this toggle Button button  setToggleButton NullPointerException isDisposed toggleMessage JFaceResources getString MessageDialogWithToggle defaultToggleMessage toggleMessage setText setSelection toggleState toggleButton
A mutator for the text on the toggle button The button will automatically get updated with the new text if it exists param message The new text of the toggle button if it is code null code then used the default toggle message protected void set Toggle Message String message this toggle Message message if toggle Button null toggle Button is Disposed final String text if toggle Message null text J Face Resources get String Message Dialog With Toggle default Toggle Message NON NLS 1 else text toggle Message toggle Button set Text text  setToggleMessage toggleMessage toggleButton toggleButton isDisposed toggleMessage JFaceResources getString MessageDialogWithToggle defaultToggleMessage toggleMessage toggleButton setText
A mutator for the state of the toggle button This method will update the button if it exists param toggle State The desired state of the toggle button code true code means the toggle should be selected public void set Toggle State boolean toggle State this toggle State toggle State Update the button if it exists if toggle Button null toggle Button is Disposed toggle Button set Selection toggle State  toggleState setToggleState toggleState toggleState toggleState toggleButton toggleButton isDisposed toggleButton setSelection toggleState

private double sum Worked Create a Progress Indicator as a child under the given parent param parent The widgets parent public Progress Indicator Composite parent super parent SWT NULL determinate Progress Bar new Progress Bar this SWT HORIZONTAL indeterminate Progress Bar new Progress Bar this SWT HORIZONTAL SWT INDETERMINATE layout new Stack Layout set Layout layout  sumWorked ProgressIndicator ProgressIndicator determinateProgressBar ProgressBar indeterminateProgressBar ProgressBar StackLayout setLayout
Initialize the progress bar to be animated public void begin Animated Task done layout top Control indeterminate Progress Bar layout animated true  beginAnimatedTask topControl indeterminateProgressBar
Initialize the progress bar param max The maximum value public void begin Task int max done this total Work max this sum Worked 0 determinate Progress Bar set Minimum 0 determinate Progress Bar set Maximum PROGRESS MAX determinate Progress Bar set Selection 0 layout top Control determinate Progress Bar layout animated false  beginTask totalWork sumWorked determinateProgressBar setMinimum determinateProgressBar setMaximum PROGRESS_MAX determinateProgressBar setSelection topControl determinateProgressBar
Progress is done public void done if animated determinate Progress Bar set Minimum 0 determinate Progress Bar set Maximum 0 determinate Progress Bar set Selection 0 layout top Control null layout  determinateProgressBar setMinimum determinateProgressBar setMaximum determinateProgressBar setSelection topControl
Moves the progress indicator to the end public void send Remaining Work worked total Work sum Worked  sendRemainingWork totalWork sumWorked
Moves the progress indicator by the given amount of work units param work the amount of work to increment by public void worked double work if work 0 animated return sum Worked work if sum Worked total Work sum Worked total Work if sum Worked 0 sum Worked 0 int value int sum Worked total Work PROGRESS MAX if determinate Progress Bar get Selection value determinate Progress Bar set Selection value  sumWorked sumWorked totalWork sumWorked totalWork sumWorked sumWorked sumWorked totalWork PROGRESS_MAX determinateProgressBar getSelection determinateProgressBar setSelection

protected boolean locked false public void begin Task String name int total Work if progress Indicator is Disposed return if name null task NON NLS 1 else task name String s task if s length 0 s DEFAULT TASKNAME set Message s if forked update if total Work UNKNOWN progress Indicator begin Animated Task else progress Indicator begin Task total Work  beginTask totalWork progressIndicator isDisposed DEFAULT_TASKNAME setMessage totalWork progressIndicator beginAnimatedTask progressIndicator beginTask totalWork
public void done if progress Indicator is Disposed progress Indicator send Remaining Work progress Indicator done  progressIndicator isDisposed progressIndicator sendRemainingWork progressIndicator
public void set Task Name String name if name null task NON NLS 1 else task name String s task if s length 0 s DEFAULT TASKNAME set Message s if forked update  setTaskName DEFAULT_TASKNAME setMessage
update public boolean is Canceled return f Is Canceled  isCanceled fIsCanceled
public void set Canceled boolean b f Is Canceled b if locked clear Blocked  setCanceled fIsCanceled clearBlocked
public void sub Task String name if sub Task Label is Disposed return if name null f Sub Task NON NLS 1 else f Sub Task name sub Task Label set Text f Sub Task if forked sub Task Label update  subTask subTaskLabel isDisposed fSubTask fSubTask subTaskLabel setText fSubTask subTaskLabel
sub Task Label update public void worked int work internal Worked work  subTaskLabel internalWorked
internal Worked work public void internal Worked double work if progress Indicator is Disposed progress Indicator worked work  internalWorked internalWorked progressIndicator isDisposed progressIndicator
see org eclipse core runtime I Progress Monitor With Blocking clear Blocked public void clear Blocked locked false update For Clear Blocked  IProgressMonitorWithBlocking clearBlocked clearBlocked updateForClearBlocked
see org eclipse core runtime I Progress Monitor With Blocking set Blocked org eclipse core runtime I Status public void set Blocked I Status reason locked true update For Set Blocked reason  IProgressMonitorWithBlocking setBlocked IStatus setBlocked IStatus updateForSetBlocked
Clear blocked state from the receiver protected void update For Clear Blocked set Message task image Label set Image get Image  updateForClearBlocked setMessage imageLabel setImage getImage
Set blocked state from the receiver param reason I Status that gives the details protected void update For Set Blocked I Status reason set Message shorten Text reason get Message message Label image Label set Image get Image  IStatus updateForSetBlocked IStatus setMessage shortenText getMessage messageLabel imageLabel setImage getImage
Creates a progress monitor dialog under the given shell The dialog has a standard title and no image code open code is non blocking param parent the parent shell or code null code to create a top level shell public Progress Monitor Dialog Shell parent super parent set Shell Style SWT BORDER SWT TITLE SWT APPLICATION MODAL no close button set Block On Open false  ProgressMonitorDialog setShellStyle APPLICATION_MODAL setBlockOnOpen
if get Shell null get Shell get Display async Exec new Runnable public void run set Operation Cancel Button Enabled b  getShell getShell getDisplay asyncExec setOperationCancelButtonEnabled
Enables the cancel button asynchronously param b The state to set the button to private void async Set Operation Cancel Button Enabled final boolean b if get Shell null get Shell get Display async Exec new Runnable public void run set Operation Cancel Button Enabled b  asyncSetOperationCancelButtonEnabled getShell getShell getDisplay asyncExec setOperationCancelButtonEnabled
The cancel button has been pressed since 3 0 protected void cancel Pressed NOTE this was previously done from a listener installed on the cancel button On GTK the listener installed by Dialog create Button is called first and this was throwing an exception because the cancel button was already disposed cancel set Enabled false progress Monitor set Canceled true super cancel Pressed  cancelPressed createButton setEnabled progressMonitor setCanceled cancelPressed
The code Progress Monitor Dialog code implementation of this method only closes the dialog if there are no currently running runnables public boolean close if get Nesting Depth 0 clear Cursors return super close return false  ProgressMonitorDialog getNestingDepth clearCursors
Clear the cursors in the dialog since 3 0 protected void clear Cursors if cancel null cancel is Disposed cancel set Cursor null Shell shell get Shell if shell null shell is Disposed shell set Cursor null if arrow Cursor null arrow Cursor dispose if wait Cursor null wait Cursor dispose arrow Cursor null wait Cursor null  clearCursors isDisposed setCursor getShell isDisposed setCursor arrowCursor arrowCursor waitCursor waitCursor arrowCursor waitCursor
protected void configure Shell Shell shell super configure Shell shell shell set Text J Face Resources get String Progress Monitor Dialog title NON NLS 1 if wait Cursor null wait Cursor new Cursor shell get Display SWT CURSOR WAIT shell set Cursor wait Cursor  configureShell configureShell setText JFaceResources getString ProgressMonitorDialog waitCursor waitCursor getDisplay CURSOR_WAIT setCursor waitCursor
non Javadoc Method declared on Dialog protected void create Buttons For Button Bar Composite parent cancel button create Cancel Button parent  createButtonsForButtonBar createCancelButton
Creates the cancel button param parent the parent composite since 3 0 protected void create Cancel Button Composite parent cancel create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL true if arrow Cursor null arrow Cursor new Cursor cancel get Display SWT CURSOR ARROW cancel set Cursor arrow Cursor set Operation Cancel Button Enabled enable Cancel Button  createCancelButton createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL arrowCursor arrowCursor getDisplay CURSOR_ARROW setCursor arrowCursor setOperationCancelButtonEnabled enableCancelButton
protected Control create Dialog Area Composite parent set Message DEFAULT TASKNAME create Message Area parent Only set for backwards compatibility task Label message Label progress indicator progress Indicator new Progress Indicator parent Grid Data gd new Grid Data gd height Hint convert VerticalDL Us To Pixels BAR DLUS gd horizontal Alignment Grid Data FILL gd grab Excess Horizontal Space true gd horizontal Span 2 progress Indicator set Layout Data gd label showing current task sub Task Label new Label parent SWT LEFT SWT WRAP gd new Grid Data Grid Data FILL HORIZONTAL gd height Hint convert VerticalDL Us To Pixels LABEL DLUS gd horizontal Span 2 sub Task Label set Layout Data gd sub Task Label set Font parent get Font return parent  createDialogArea setMessage DEFAULT_TASKNAME createMessageArea taskLabel messageLabel progressIndicator ProgressIndicator GridData GridData heightHint convertVerticalDLUsToPixels BAR_DLUS horizontalAlignment GridData grabExcessHorizontalSpace horizontalSpan progressIndicator setLayoutData subTaskLabel GridData GridData FILL_HORIZONTAL heightHint convertVerticalDLUsToPixels LABEL_DLUS horizontalSpan subTaskLabel setLayoutData subTaskLabel setFont getFont
protected Point get Initial Size Point calculated Size super get Initial Size if calculated Size x 450 calculated Size x 450 return calculated Size  getInitialSize calculatedSize getInitialSize calculatedSize calculatedSize calculatedSize
Returns the progress monitor to use for operations run in this progress dialog return the progress monitor public I Progress Monitor get Progress Monitor return progress Monitor  IProgressMonitor getProgressMonitor progressMonitor
public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception set Cancelable cancelable try about To Run Let the progress monitor know if they need to update in UI Thread progress Monitor forked fork Modal Context run runnable fork get Progress Monitor get Shell get Display finally finished Run  IRunnableWithProgress InvocationTargetException InterruptedException setCancelable aboutToRun progressMonitor ModalContext getProgressMonitor getShell getDisplay finishedRun
Returns whether the dialog should be opened before the operation is run Defaults to code true code return code true code to open the dialog before run code false code to only create the dialog but not open it since 3 0 public boolean get Open On Run return open On Run  getOpenOnRun openOnRun
Sets whether the dialog should be opened before the operation is run NOTE Setting this to false and not forking a process may starve any async Exec that tries to open the dialog later param open On Run code true code to open the dialog before run code false code to only create the dialog but not open it since 3 0 public void set Open On Run boolean open On Run this open On Run open On Run  asyncExec openOnRun setOpenOnRun openOnRun openOnRun openOnRun
Returns the nesting depth of running operations return the nesting depth of running operations since 3 0 protected int get Nesting Depth return nesting Depth  getNestingDepth nestingDepth
Increments the nesting depth of running operations since 3 0 protected void increment Nesting Depth nesting Depth  incrementNestingDepth nestingDepth
Decrements the nesting depth of running operations since 3 0 protected void decrement Nesting Depth nesting Depth  decrementNestingDepth nestingDepth
Called just before the operation is run Default behaviour is to open or create the dialog based on the setting of code get Open On Run code and increment the nesting depth since 3 0 protected void about To Run if get Open On Run open else create increment Nesting Depth  getOpenOnRun aboutToRun getOpenOnRun incrementNestingDepth
Called just after the operation is run Default behaviour is to decrement the nesting depth and close the dialog since 3 0 protected void finished Run decrement Nesting Depth close  finishedRun decrementNestingDepth
Sets whether the progress dialog is cancelable or not param cancelable code true code if the end user can cancel this progress dialog and code false code if it cannot be canceled public void set Cancelable boolean cancelable if cancel null enable Cancel Button cancelable else async Set Operation Cancel Button Enabled cancelable  setCancelable enableCancelButton asyncSetOperationCancelButtonEnabled
Helper to enable disable Cancel button for this dialog param b code true code to enable the cancel button and code false code to disable it since 3 0 protected void set Operation Cancel Button Enabled boolean b operation Cancelable State b cancel set Enabled b  setOperationCancelButtonEnabled operationCancelableState setEnabled
see org eclipse jface dialogs Icon And Message Dialog get Image protected Image get Image return get Info Image  IconAndMessageDialog getImage getImage getInfoImage
Set the message in the message label param message String The string for the new message private void set Message String message String must not set null text in a label message message String null message String NON NLS 1 if message Label null message Label is Disposed return message Label set Text message  messageString setMessage messageString messageString messageString messageLabel messageLabel isDisposed messageLabel setText
Update the message label Required if the monitor is forked private void update if message Label null message Label is Disposed return message Label update  messageLabel messageLabel isDisposed messageLabel
public int open Check to be sure it is not already done If it is just return OK if get Open On Run if get Nesting Depth 0 return OK return super open  getOpenOnRun getNestingDepth

private boolean title Image Largest true Instantiate a new title area dialog param parent Shell the parent SWT shell public Title Area Dialog Shell parent Shell super parent Shell  titleImageLargest parentShell TitleAreaDialog parentShell parentShell
protected Control create Contents Composite parent initialize the dialog units initialize Dialog Units parent Form Layout layout new Form Layout parent set Layout layout Form Data data new Form Data data top new Form Attachment 0 0 data bottom new Form Attachment 100 0 parent set Layout Data data Now create a work area for the rest of the dialog work Area new Composite parent SWT NULL Grid Layout child Layout new Grid Layout child Layout margin Height 0 child Layout margin Width 0 child Layout vertical Spacing 0 work Area set Layout child Layout Control top create Title Area parent reset Work Area Attachments top work Area set Font J Face Resources get Dialog Font initialize the dialog units initialize Dialog Units work Area create the dialog area and button bar dialog Area create Dialog Area work Area button Bar create Button Bar work Area return parent  createContents initializeDialogUnits FormLayout FormLayout setLayout FormData FormData FormAttachment FormAttachment setLayoutData workArea GridLayout childLayout GridLayout childLayout marginHeight childLayout marginWidth childLayout verticalSpacing workArea setLayout childLayout createTitleArea resetWorkAreaAttachments workArea setFont JFaceResources getDialogFont initializeDialogUnits workArea dialogArea createDialogArea workArea buttonBar createButtonBar workArea
Creates and returns the contents of the upper part of this dialog above the button bar p The code Dialog code implementation of this framework method creates and returns a new code Composite code with no margins and spacing Subclasses should override p param parent The parent composite to contain the dialog area return the dialog area control protected Control create Dialog Area Composite parent create the top level composite for the dialog area Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout vertical Spacing 0 layout horizontal Spacing 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH composite set Font parent get Font Build the separator line Label title Bar Separator new Label composite SWT HORIZONTAL SWT SEPARATOR title Bar Separator set Layout Data new Grid Data Grid Data FILL HORIZONTAL return composite  createDialogArea GridLayout GridLayout marginHeight marginWidth verticalSpacing horizontalSpacing setLayout setLayoutData GridData GridData FILL_BOTH setFont getFont titleBarSeparator titleBarSeparator setLayoutData GridData GridData FILL_HORIZONTAL
Creates the dialog s title area param parent the SWT parent for the title area widgets return Control with the highest x axis value private Control create Title Area Composite parent add a dispose listener parent add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if title Area Color null title Area Color dispose Determine the background color of the title bar Display display parent get Display Color background Color foreground if title AreaRGB null title Area Color new Color display title AreaRGB background title Area Color foreground null else background J Face Colors get Banner Background display foreground J Face Colors get Banner Foreground display int vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING int horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING parent set Background background Dialog image right title Image new Label parent SWT CENTER title Image set Background background title Image set Image J Face Resources get Image DLG IMG TITLE BANNER Form Data image Data new Form Data image Data top new Form Attachment 0 vertical Spacing Note do not use horizontal Spacing on the right as that would be a regression from the R2 x style where there was no margin on the right and images are flush to the right hand side see reopened comments in 41172 image Data right new Form Attachment 100 0 horizontal Spacing title Image set Layout Data image Data Title label top left title Label new Label parent SWT LEFT J Face Colors set Colors title Label foreground background title Label set Font J Face Resources get Banner Font title Label set Text NON NLS 1 Form Data title Data new Form Data title Data top new Form Attachment 0 vertical Spacing title Data right new Form Attachment title Image title Data left new Form Attachment 0 horizontal Spacing title Label set Layout Data title Data Message image bottom left message Image Label new Label parent SWT CENTER message Image Label set Background background Message label bottom center message Label new Text parent SWT WRAP SWT READ ONLY J Face Colors set Colors message Label foreground background message Label set Text n two lines NON NLS 1 message Label set Font J Face Resources get Dialog Font Filler labels left Filler Label new Label parent SWT CENTER left Filler Label set Background background bottom Filler Label new Label parent SWT CENTER bottom Filler Label set Background background set Layouts For Normal Message vertical Spacing horizontal Spacing determine Title Image Largest if title Image Largest return title Image return message Label  createTitleArea addDisposeListener DisposeListener widgetDisposed DisposeEvent titleAreaColor titleAreaColor getDisplay titleAreaRGB titleAreaColor titleAreaRGB titleAreaColor JFaceColors getBannerBackground JFaceColors getBannerForeground verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING setBackground titleImage titleImage setBackground titleImage setImage JFaceResources getImage DLG_IMG_TITLE_BANNER FormData imageData FormData imageData FormAttachment verticalSpacing horizontalSpacing imageData FormAttachment horizontalSpacing titleImage setLayoutData imageData titleLabel JFaceColors setColors titleLabel titleLabel setFont JFaceResources getBannerFont titleLabel setText FormData titleData FormData titleData FormAttachment verticalSpacing titleData FormAttachment titleImage titleData FormAttachment horizontalSpacing titleLabel setLayoutData titleData messageImageLabel messageImageLabel setBackground messageLabel READ_ONLY JFaceColors setColors messageLabel messageLabel setText messageLabel setFont JFaceResources getDialogFont leftFillerLabel leftFillerLabel setBackground bottomFillerLabel bottomFillerLabel setBackground setLayoutsForNormalMessage verticalSpacing horizontalSpacing determineTitleImageLargest titleImageLargest titleImage messageLabel
Determine if the title image is larger than the title message and message area This is used for layout decisions private void determine Title Image Largest int titleY title Image compute Size SWT DEFAULT SWT DEFAULT y int labelY title Label compute Size SWT DEFAULT SWT DEFAULT y labelY message Label compute Size SWT DEFAULT SWT DEFAULT y Font Data data message Label get Font get Font Data labelY data 0 get Height title Image Largest titleY labelY  determineTitleImageLargest titleImage computeSize titleLabel computeSize messageLabel computeSize FontData messageLabel getFont getFontData getHeight titleImageLargest
Set the layout values for the message Label message Image Label and filler Label for the case where there is a normal message param vertical Spacing int The spacing between widgets on the vertical axis param horizontal Spacing int The spacing between widgets on the horizontal axis private void set Layouts For Normal Message int vertical Spacing int horizontal Spacing Form Data message Image Data new Form Data message Image Data top new Form Attachment title Label vertical Spacing message Image Data left new Form Attachment 0 H GAP IMAGE message Image Label set Layout Data message Image Data Form Data message Label Data new Form Data message Label Data top new Form Attachment title Label vertical Spacing message Label Data right new Form Attachment title Image message Label Data left new Form Attachment message Image Label horizontal Spacing if title Image Largest message Label Data bottom new Form Attachment title Image 0 SWT BOTTOM message Label set Layout Data message Label Data Form Data filler Data new Form Data filler Data left new Form Attachment 0 horizontal Spacing filler Data top new Form Attachment message Image Label 0 filler Data bottom new Form Attachment message Label 0 SWT BOTTOM bottom Filler Label set Layout Data filler Data Form Data data new Form Data data top new Form Attachment message Image Label 0 SWT TOP data left new Form Attachment 0 0 data bottom new Form Attachment message Image Label 0 SWT BOTTOM data right new Form Attachment message Image Label 0 left Filler Label set Layout Data data  messageLabel messageImageLabel fillerLabel verticalSpacing horizontalSpacing setLayoutsForNormalMessage verticalSpacing horizontalSpacing FormData messageImageData FormData messageImageData FormAttachment titleLabel verticalSpacing messageImageData FormAttachment H_GAP_IMAGE messageImageLabel setLayoutData messageImageData FormData messageLabelData FormData messageLabelData FormAttachment titleLabel verticalSpacing messageLabelData FormAttachment titleImage messageLabelData FormAttachment messageImageLabel horizontalSpacing titleImageLargest messageLabelData FormAttachment titleImage messageLabel setLayoutData messageLabelData FormData fillerData FormData fillerData FormAttachment horizontalSpacing fillerData FormAttachment messageImageLabel fillerData FormAttachment messageLabel bottomFillerLabel setLayoutData fillerData FormData FormData FormAttachment messageImageLabel FormAttachment FormAttachment messageImageLabel FormAttachment messageImageLabel leftFillerLabel setLayoutData
The code Title Area Dialog code implementation of this code Window code methods returns an initial size which is at least some reasonable minimum return the initial size of the dialog protected Point get Initial Size Point shell Size super get Initial Size return new Point Math max convert HorizontalDL Us To Pixels MIN DIALOG WIDTH shell Size x Math max convert VerticalDL Us To Pixels MIN DIALOG HEIGHT shell Size y  TitleAreaDialog getInitialSize shellSize getInitialSize convertHorizontalDLUsToPixels MIN_DIALOG_WIDTH shellSize convertVerticalDLUsToPixels MIN_DIALOG_HEIGHT shellSize
Retained for backward compatibility Returns the title area composite There is no composite in this implementation so the shell is returned return Composite deprecated protected Composite get Title Area return get Shell  getTitleArea getShell
Returns the title image label return the title image label protected Label get Title Image Label return title Image  getTitleImageLabel titleImage
Display the given error message The currently displayed message is saved and will be redisplayed when the error message is set to code null code param new Error Message the new Error Message to display or code null code public void set Error Message String new Error Message Any change if error Message null new Error Message null error Message equals new Error Message return error Message new Error Message if error Message null if showing Error we were previously showing an error showing Error false set Message Backgrounds false show the message avoid calling set Message in case it is overridden to call set Error Message which would result in a recursive infinite loop if message null this should probably never happen since set Message does this conversion message NON NLS 1 update Message message message Image Label set Image message Image set Image Label Visible message Image null message Label set Tool Tip Text message else Add in a space for layout purposes but do not change the instance variable String displayed Error Message error Message NON NLS 1 update Message displayed Error Message message Label set Tool Tip Text error Message if showing Error we were not previously showing an error showing Error true lazy initialize the error background color and image if error Msg Area Background null error Msg Area Background J Face Colors get Error Background message Label get Display error Msg Image J Face Resources get Image DLG IMG TITLE ERROR show the error normal Msg Area Background message Label get Background set Message Backgrounds true message Image Label set Image error Msg Image set Image Label Visible true layout For New Message  newErrorMessage newErrorMessage setErrorMessage newErrorMessage errorMessage newErrorMessage errorMessage newErrorMessage errorMessage newErrorMessage errorMessage showingError showingError setMessageBackgrounds setMessage setErrorMessage setMessage updateMessage messageImageLabel setImage messageImage setImageLabelVisible messageImage messageLabel setToolTipText displayedErrorMessage errorMessage updateMessage displayedErrorMessage messageLabel setToolTipText errorMessage showingError showingError errorMsgAreaBackground errorMsgAreaBackground JFaceColors getErrorBackground messageLabel getDisplay errorMsgImage JFaceResources getImage DLG_IMG_TITLE_ERROR normalMsgAreaBackground messageLabel getBackground setMessageBackgrounds messageImageLabel setImage errorMsgImage setImageLabelVisible layoutForNewMessage
Re layout the labels for the new message private void layout For New Message int vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING int horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING If there are no images then layout as normal if error Message null message Image null set Image Label Visible false set Layouts For Normal Message vertical Spacing horizontal Spacing else message Image Label set Visible true bottom Filler Label set Visible true left Filler Label set Visible true Note that we do not use horizontal Spacing here as when the background of the messages changes there will be gaps between the icon label and the message that are the background color of the shell We add a leading space elsewhere to compendate for this Form Data data new Form Data data left new Form Attachment 0 H GAP IMAGE data top new Form Attachment title Label vertical Spacing message Image Label set Layout Data data data new Form Data data top new Form Attachment message Image Label 0 data left new Form Attachment 0 0 data bottom new Form Attachment message Label 0 SWT BOTTOM data right new Form Attachment message Image Label 0 SWT RIGHT bottom Filler Label set Layout Data data data new Form Data data top new Form Attachment message Image Label 0 SWT TOP data left new Form Attachment 0 0 data bottom new Form Attachment message Image Label 0 SWT BOTTOM data right new Form Attachment message Image Label 0 left Filler Label set Layout Data data Form Data message Label Data new Form Data message Label Data top new Form Attachment title Label vertical Spacing message Label Data right new Form Attachment title Image message Label Data left new Form Attachment message Image Label 0 if title Image Largest message Label Data bottom new Form Attachment title Image 0 SWT BOTTOM message Label set Layout Data message Label Data Do not layout before the dialog area has been created to avoid incomplete calculations if dialog Area null get Shell layout true  layoutForNewMessage verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING errorMessage messageImage setImageLabelVisible setLayoutsForNormalMessage verticalSpacing horizontalSpacing messageImageLabel setVisible bottomFillerLabel setVisible leftFillerLabel setVisible horizontalSpacing FormData FormData FormAttachment H_GAP_IMAGE FormAttachment titleLabel verticalSpacing messageImageLabel setLayoutData FormData FormAttachment messageImageLabel FormAttachment FormAttachment messageLabel FormAttachment messageImageLabel bottomFillerLabel setLayoutData FormData FormAttachment messageImageLabel FormAttachment FormAttachment messageImageLabel FormAttachment messageImageLabel leftFillerLabel setLayoutData FormData messageLabelData FormData messageLabelData FormAttachment titleLabel verticalSpacing messageLabelData FormAttachment titleImage messageLabelData FormAttachment messageImageLabel titleImageLargest messageLabelData FormAttachment titleImage messageLabel setLayoutData messageLabelData dialogArea getShell
Set the message text If the message line currently displays an error the message is saved and will be redisplayed when the error message is set to code null code p Shortcut for code set Message new Message I Message Provider NONE code p This method should be called after the dialog has been opened as it updates the message label immediately param new Message the message or code null code to clear the message public void set Message String new Message set Message new Message I Message Provider NONE  setMessage newMessage IMessageProvider newMessage setMessage newMessage setMessage newMessage IMessageProvider
Sets the message for this dialog 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 Image new Image null if new Message null switch new Type case I Message Provider NONE break case I Message Provider INFORMATION new Image J Face Resources get Image DLG IMG MESSAGE INFO break case I Message Provider WARNING new Image J Face Resources get Image DLG IMG MESSAGE WARNING break case I Message Provider ERROR new Image J Face Resources get Image DLG IMG MESSAGE ERROR break show Message new Message new Image  setErrorMessage newMessage newType setMessage newMessage newType newImage newMessage newType IMessageProvider IMessageProvider newImage JFaceResources getImage DLG_IMG_MESSAGE_INFO IMessageProvider newImage JFaceResources getImage DLG_IMG_MESSAGE_WARNING IMessageProvider newImage JFaceResources getImage DLG_IMG_MESSAGE_ERROR showMessage newMessage newImage
Show the new message and image param new Message param new Image private void show Message String new Message Image new Image Any change if message equals new Message message Image new Image return message new Message if message null message NON NLS 1 Message string to be shown if there is an image then add in a space to the message for layout purposes String shown Message new Image null message message NON NLS 1 message Image new Image if showing Error we are not showing an error update Message shown Message message Image Label set Image message Image set Image Label Visible message Image null message Label set Tool Tip Text message layout For New Message  newMessage newImage showMessage newMessage newImage newMessage messageImage newImage newMessage shownMessage newImage messageImage newImage showingError updateMessage shownMessage messageImageLabel setImage messageImage setImageLabelVisible messageImage messageLabel setToolTipText layoutForNewMessage
Update the contents of the message Label param new Message the message to use private void update Message String new Message Be sure there are always 2 lines for layout purposes if new Message null new Message index Of n 1 new Message new Message n NON NLS 1 message Label set Text new Message  messageLabel newMessage updateMessage newMessage newMessage newMessage indexOf newMessage newMessage messageLabel setText newMessage
Sets the title to be shown in the title area of this dialog param new Title the title show public void set Title String new Title if title Label null return String title new Title if title null title NON NLS 1 title Label set Text title  newTitle setTitle newTitle titleLabel newTitle titleLabel setText
Sets the title bar color for this dialog param color the title bar color public void set Title Area Color RGB color title AreaRGB color  setTitleAreaColor titleAreaRGB
Sets the title image to be shown in the title area of this dialog param new Title Image the title image show public void set Title Image Image new Title Image title Image set Image new Title Image title Image set Visible new Title Image null if new Title Image null determine Title Image Largest Control top if title Image Largest top title Image else top message Label reset Work Area Attachments top  newTitleImage setTitleImage newTitleImage titleImage setImage newTitleImage titleImage setVisible newTitleImage newTitleImage determineTitleImageLargest titleImageLargest titleImage messageLabel resetWorkAreaAttachments
Make the label used for displaying error images visible depending on boolean param visible If code true code make the image visible if not then make it not visible private void set Image Label Visible boolean visible message Image Label set Visible visible bottom Filler Label set Visible visible left Filler Label set Visible visible  setImageLabelVisible messageImageLabel setVisible bottomFillerLabel setVisible leftFillerLabel setVisible
Set the message backgrounds to be the error or normal color depending on whether or not showing Error is true param showing Error If code true code use a different Color to indicate the error private void set Message Backgrounds boolean showing Error Color color if showing Error color error Msg Area Background else color normal Msg Area Background message Label set Background color message Image Label set Background color bottom Filler Label set Background color left Filler Label set Background color  showingError showingError setMessageBackgrounds showingError showingError errorMsgAreaBackground normalMsgAreaBackground messageLabel setBackground messageImageLabel setBackground bottomFillerLabel setBackground leftFillerLabel setBackground
Reset the attachment of the work Area to now attach to top as the top control param top private void reset Work Area Attachments Control top Form Data child Data new Form Data child Data top new Form Attachment top child Data right new Form Attachment 100 0 child Data left new Form Attachment 0 0 child Data bottom new Form Attachment 100 0 work Area set Layout Data child Data  workArea resetWorkAreaAttachments FormData childData FormData childData FormAttachment childData FormAttachment childData FormAttachment childData FormAttachment workArea setLayoutData childData

see Selection Listener widget Selected Selection Event public void widget Selected Selection Event e handle Table Selection Changed  SelectionListener widgetSelected SelectionEvent widgetSelected SelectionEvent handleTableSelectionChanged
see Selection Listener widget Default Selected Selection Event public void widget Default Selected Selection Event e  SelectionListener widgetDefaultSelected SelectionEvent widgetDefaultSelected SelectionEvent
Creates a new additional information controller param creator the information control creator to be used by this controller param delay time in milliseconds after which additional info should be displayed Additional Info Controller2 I Information Control Creator creator int delay super creator f Delay delay set Anchor ANCHOR RIGHT set Fallback Anchors new Anchor ANCHOR LEFT ANCHOR BOTTOM ANCHOR RIGHT  AdditionalInfoController2 IInformationControlCreator fDelay setAnchor ANCHOR_RIGHT setFallbackAnchors ANCHOR_LEFT ANCHOR_BOTTOM ANCHOR_RIGHT
public void install Control control if f Proposal Table control already installed return super install control Assert is True control instanceof Table f Proposal Table Table control f Proposal Table add Selection Listener f Selection Listener synchronized f Thread Access if f Thread null f Thread interrupt f Thread new Thread this Content Assist Messages get String Info Popup info delay timer name NON NLS 1 f Start Signal new Object synchronized f Start Signal f Thread start try wait until thread is ready f Start Signal wait catch Interrupted Exception x  fProposalTable isTrue fProposalTable fProposalTable addSelectionListener fSelectionListener fThreadAccess fThread fThread fThread ContentAssistMessages getString InfoPopup info_delay_timer_name fStartSignal fStartSignal fThread fStartSignal InterruptedException
public void dispose Information Control synchronized f Thread Access if f Thread null f Thread interrupt f Thread null if f Proposal Table null f Proposal Table is Disposed f Proposal Table remove Selection Listener f Selection Listener f Proposal Table null super dispose Information Control  disposeInformationControl fThreadAccess fThread fThread fThread fProposalTable fProposalTable isDisposed fProposalTable removeSelectionListener fSelectionListener fProposalTable disposeInformationControl
if f Proposal Table null f Proposal Table is Disposed f Proposal Table get Display async Exec new Runnable public void run if f Is Reset show Information  fProposalTable fProposalTable isDisposed fProposalTable getDisplay asyncExec fIsReset showInformation
public void run try while true synchronized f Mutex if f Start Signal null synchronized f Start Signal f Start Signal notify All f Start Signal null Wait for a selection event to occur f Mutex wait while true f Is Reset false Delay before showing the popup f Mutex wait f Delay if f Is Reset break if f Proposal Table null f Proposal Table is Disposed f Proposal Table get Display async Exec new Runnable public void run if f Is Reset show Information catch Interrupted Exception e synchronized f Thread Access only null f Thread if it is us if Thread current Thread f Thread f Thread null  fMutex fStartSignal fStartSignal fStartSignal notifyAll fStartSignal fMutex fIsReset fMutex fDelay fIsReset fProposalTable fProposalTable isDisposed fProposalTable getDisplay asyncExec fIsReset showInformation InterruptedException fThreadAccess fThread currentThread fThread fThread
Handles a change of the line selected in the associated selector public void handle Table Selection Changed if f Proposal Table null f Proposal Table is Disposed f Proposal Table is Visible synchronized f Mutex f Is Reset true f Mutex notify All  handleTableSelectionChanged fProposalTable fProposalTable isDisposed fProposalTable isVisible fMutex fIsReset fMutex notifyAll
protected void compute Information if f Proposal Table null f Proposal Table is Disposed return Table Item selection f Proposal Table get Selection if selection null selection length 0 Table Item item selection 0 compute information String information null Object d item get Data if d instanceof I Completion Proposal I Completion Proposal p I Completion Proposal d information p get Additional Proposal Info if d instanceof I Completion Proposal Extension3 set Custom Information Control Creator I Completion Proposal Extension3 d get Information Control Creator else set Custom Information Control Creator null compute subject area set Margins 4 1 Rectangle area f Proposal Table get Bounds area x 0 subject area is the whole subject control area y 0 set information subject area set Information information area  computeInformation fProposalTable fProposalTable isDisposed TableItem fProposalTable getSelection TableItem getData ICompletionProposal ICompletionProposal ICompletionProposal getAdditionalProposalInfo ICompletionProposalExtension3 setCustomInformationControlCreator ICompletionProposalExtension3 getInformationControlCreator setCustomInformationControlCreator setMargins fProposalTable getBounds setInformation
protected Point compute Size Constraints Control subject Control I Information Control information Control Point size Constraint super compute Size Constraints subject Control information Control Point size subject Control get Size if size Constraint x size x size Constraint x size x if size Constraint y size y size Constraint y size y return size Constraint  computeSizeConstraints subjectControl IInformationControl informationControl sizeConstraint computeSizeConstraints subjectControl informationControl subjectControl getSize sizeConstraint sizeConstraint sizeConstraint sizeConstraint sizeConstraint

Creates a new completion proposal popup for the given elements param content Assistant the content assistant feeding this popup param viewer the viewer on top of which this popup appears param info Controller the info control collaborating with this popup since 2 0 public Completion Proposal Popup2 Content Assistant2 content Assistant I Text Viewer viewer Additional Info Controller2 info Controller f Content Assistant content Assistant f Viewer viewer f Additional Info Controller info Controller  contentAssistant infoController CompletionProposalPopup2 ContentAssistant2 contentAssistant ITextViewer AdditionalInfoController2 infoController fContentAssistant contentAssistant fViewer fAdditionalInfoController infoController
f Key Listener new Key Listener public void key Pressed Key Event e if Helper2 ok To Use f Proposal Shell return if e character 0 e key Code SWT MOD1 http dev eclipse org bugs show bug cgi id 34754 int index f Proposal Table get Selection Index if index 0 select Proposal index true  fKeyListener KeyListener keyPressed KeyEvent okToUse fProposalShell keyCode show_bug fProposalTable getSelectionIndex selectProposal
public void key Released Key Event e if Helper2 ok To Use f Proposal Shell return if e character 0 e key Code SWT MOD1 http dev eclipse org bugs show bug cgi id 34754 int index f Proposal Table get Selection Index if index 0 select Proposal index false  keyReleased KeyEvent okToUse fProposalShell keyCode show_bug fProposalTable getSelectionIndex selectProposal
Computes and presents completion proposals The flag indicates whether this call has be made out of an auto activation context param auto Activated code true code if auto activation context return an error message or code null code in case of no error public String show Proposals final boolean auto Activated if f Key Listener null f Key Listener new Key Listener public void key Pressed Key Event e if Helper2 ok To Use f Proposal Shell return if e character 0 e key Code SWT MOD1 http dev eclipse org bugs show bug cgi id 34754 int index f Proposal Table get Selection Index if index 0 select Proposal index true public void key Released Key Event e if Helper2 ok To Use f Proposal Shell return if e character 0 e key Code SWT MOD1 http dev eclipse org bugs show bug cgi id 34754 int index f Proposal Table get Selection Index if index 0 select Proposal index false final Styled Text styled Text f Viewer get Text Widget if styled Text null styled Text is Disposed styled Text add Key Listener f Key Listener Busy Indicator show While styled Text get Display new Runnable public void run f Invocation Offset f Viewer get Selected Range x lazily compute proposals if f Computed Proposals null f Computed Proposals compute Proposals f Content Assistant get Completion Position f Computed Proposals compute Proposals f Invocation Offset int count f Computed Proposals null 0 f Computed Proposals length if count 0 if auto Activated styled Text get Display beep else if count 1 auto Activated f Content Assistant is Auto Inserting insert Proposal f Computed Proposals 0 char 0 0 f Invocation Offset else if f Line Delimiter null f Line Delimiter styled Text get Line Delimiter create Proposal Selector set Proposals f Computed Proposals resize Proposal Selector true display Proposals return get Error Message  autoActivated showProposals autoActivated fKeyListener fKeyListener KeyListener keyPressed KeyEvent okToUse fProposalShell keyCode show_bug fProposalTable getSelectionIndex selectProposal keyReleased KeyEvent okToUse fProposalShell keyCode show_bug fProposalTable getSelectionIndex selectProposal StyledText styledText fViewer getTextWidget styledText styledText isDisposed styledText addKeyListener fKeyListener BusyIndicator showWhile styledText getDisplay fInvocationOffset fViewer getSelectedRange fComputedProposals fComputedProposals computeProposals fContentAssistant getCompletionPosition fComputedProposals computeProposals fInvocationOffset fComputedProposals fComputedProposals autoActivated styledText getDisplay autoActivated fContentAssistant isAutoInserting insertProposal fComputedProposals fInvocationOffset fLineDelimiter fLineDelimiter styledText getLineDelimiter createProposalSelector setProposals fComputedProposals resizeProposalSelector displayProposals getErrorMessage
Returns the completion proposal available at the given offset of the viewer s document Delegates the work to the content assistant param offset the offset return the completion proposals available at this offset private I Completion Proposal compute Proposals int offset return f Content Assistant compute Completion Proposals f Viewer offset  ICompletionProposal computeProposals fContentAssistant computeCompletionProposals fViewer
Returns the error message return the error message private String get Error Message return f Content Assistant get Error Message  getErrorMessage fContentAssistant getErrorMessage
f Proposal Shell add Control Listener new Control Listener public void control Moved Control Event e  fProposalShell addControlListener ControlListener controlMoved ControlEvent
public void control Moved Control Event e public void control Resized Control Event e resets the cached resize constraints f Additional Info Controller set Size Constraints 50 10 true false  controlMoved ControlEvent controlResized ControlEvent fAdditionalInfoController setSizeConstraints
f Proposal Table add Selection Listener new Selection Listener public void widget Selected Selection Event e  fProposalTable addSelectionListener SelectionListener widgetSelected SelectionEvent
public void widget Selected Selection Event e public void widget Default Selected Selection Event e select Proposal With Mask e state Mask  widgetSelected SelectionEvent widgetDefaultSelected SelectionEvent selectProposalWithMask stateMask
f Proposal Shell add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e unregister but don t dispose the shell since we re being called from its disposal event  fProposalShell addDisposeListener DisposeListener widgetDisposed DisposeEvent
Creates the proposal selector private void create Proposal Selector if Helper2 ok To Use f Proposal Shell return Control control f Viewer get Text Widget f Proposal Shell new Shell control get Shell SWT ON TOP f Proposal Shell new Shell control get Shell SWT ON TOP SWT RESIZE f Proposal Table new Table f Proposal Shell SWT H SCROLL SWT V SCROLL f Proposal Table new Table f Proposal Shell SWT H SCROLL SWT V SCROLL f Proposal Table set Location 0 0 if f Additional Info Controller null f Additional Info Controller set Size Constraints 50 10 true false Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 f Proposal Shell set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH f Proposal Table set Layout Data data f Proposal Shell pack set location Point current Location f Proposal Shell get Location Point new Location get Location if new Location x current Location x new Location y current Location y new Location y current Location y f Proposal Shell set Location new Location if f Additional Info Controller null f Proposal Shell add Control Listener new Control Listener public void control Moved Control Event e public void control Resized Control Event e resets the cached resize constraints f Additional Info Controller set Size Constraints 50 10 true false f Proposal Shell set Background control get Display get System Color SWT COLOR BLACK Color c f Content Assistant get Proposal Selector Background if c null c control get Display get System Color SWT COLOR INFO BACKGROUND f Proposal Table set Background c c f Content Assistant get Proposal Selector Foreground if c null c control get Display get System Color SWT COLOR INFO FOREGROUND f Proposal Table set Foreground c f Proposal Table add Selection Listener new Selection Listener public void widget Selected Selection Event e public void widget Default Selected Selection Event e select Proposal With Mask e state Mask f Popup Closer install f Content Assistant f Proposal Table f Proposal Shell add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e unregister but don t dispose the shell since we re being called from its disposal event f Proposal Table set Header Visible false f Content Assistant add To Layout this f Proposal Shell Content Assistant2 Layout Manager LAYOUT PROPOSAL SELECTOR f Content Assistant get Selection Offset  createProposalSelector okToUse fProposalShell fViewer getTextWidget fProposalShell getShell ON_TOP fProposalShell getShell ON_TOP fProposalTable fProposalShell H_SCROLL V_SCROLL fProposalTable fProposalShell H_SCROLL V_SCROLL fProposalTable setLocation fAdditionalInfoController fAdditionalInfoController setSizeConstraints GridLayout GridLayout marginWidth marginHeight fProposalShell setLayout GridData GridData GridData FILL_BOTH fProposalTable setLayoutData fProposalShell currentLocation fProposalShell getLocation newLocation getLocation newLocation currentLocation newLocation currentLocation newLocation currentLocation fProposalShell setLocation newLocation fAdditionalInfoController fProposalShell addControlListener ControlListener controlMoved ControlEvent controlResized ControlEvent fAdditionalInfoController setSizeConstraints fProposalShell setBackground getDisplay getSystemColor COLOR_BLACK fContentAssistant getProposalSelectorBackground getDisplay getSystemColor COLOR_INFO_BACKGROUND fProposalTable setBackground fContentAssistant getProposalSelectorForeground getDisplay getSystemColor COLOR_INFO_FOREGROUND fProposalTable setForeground fProposalTable addSelectionListener SelectionListener widgetSelected SelectionEvent widgetDefaultSelected SelectionEvent selectProposalWithMask stateMask fPopupCloser fContentAssistant fProposalTable fProposalShell addDisposeListener DisposeListener widgetDisposed DisposeEvent fProposalTable setHeaderVisible fContentAssistant addToLayout fProposalShell ContentAssistant2 LayoutManager LAYOUT_PROPOSAL_SELECTOR fContentAssistant getSelectionOffset
Returns the proposal selected in the proposal selector return the selected proposal since 2 0 private I Completion Proposal get Selected Proposal int i f Proposal Table get Selection Index if i 0 i f Filtered Proposals length return null return f Filtered Proposals i  ICompletionProposal getSelectedProposal fProposalTable getSelectionIndex fFilteredProposals fFilteredProposals
Takes the selected proposal and applies it param state Mask the state mask since 2 1 private void select Proposal With Mask int state Mask I Completion Proposal p get Selected Proposal hide if p null insert Proposal p char 0 state Mask f Viewer get Selected Range x  stateMask selectProposalWithMask stateMask ICompletionProposal getSelectedProposal insertProposal stateMask fViewer getSelectedRange
Applies the given proposal at the given offset The given character is the one that triggered the insertion of this proposal param p the completion proposal param trigger the trigger character param offset the offset since 2 1 private void insert Proposal I Completion Proposal p char trigger int state Mask int offset f Inserting true I Rewrite Target target null try I Document document f Viewer get Document if f Viewer instanceof I Text Viewer Extension I Text Viewer Extension extension I Text Viewer Extension f Viewer target extension get Rewrite Target if target null target begin Compound Change if p instanceof I Completion Proposal Extension2 I Completion Proposal Extension2 e I Completion Proposal Extension2 p e apply f Viewer trigger state Mask offset else if p instanceof I Completion Proposal Extension I Completion Proposal Extension e I Completion Proposal Extension p e apply document trigger offset else p apply document Point selection p get Selection document if selection null f Viewer set Selected Range selection x selection y f Viewer reveal Range selection x selection y I Context Information info p get Context Information if info null int position if p instanceof I Completion Proposal Extension I Completion Proposal Extension e I Completion Proposal Extension p position e get Context Information Position else if selection null selection f Viewer get Selected Range position selection x selection y f Content Assistant show Context Information info position f Content Assistant fire Proposal Chosen p finally if target null target end Compound Change f Inserting false  insertProposal ICompletionProposal stateMask fInserting IRewriteTarget IDocument fViewer getDocument fViewer ITextViewerExtension ITextViewerExtension ITextViewerExtension fViewer getRewriteTarget beginCompoundChange ICompletionProposalExtension2 ICompletionProposalExtension2 ICompletionProposalExtension2 fViewer stateMask ICompletionProposalExtension ICompletionProposalExtension ICompletionProposalExtension getSelection fViewer setSelectedRange fViewer revealRange IContextInformation getContextInformation ICompletionProposalExtension ICompletionProposalExtension ICompletionProposalExtension getContextInformationPosition fViewer getSelectedRange fContentAssistant showContextInformation fContentAssistant fireProposalChosen endCompoundChange fInserting
Returns whether this popup has the focus return code true code if the popup has the focus public boolean has Focus if Helper2 ok To Use f Proposal Shell return f Proposal Shell is Focus Control f Proposal Table is Focus Control return false  hasFocus okToUse fProposalShell fProposalShell isFocusControl fProposalTable isFocusControl
Hides this popup public void hide unregister if Helper2 ok To Use f Proposal Shell f Content Assistant remove Content Assist Listener this Content Assistant2 PROPOSAL SELECTOR f Popup Closer uninstall see bug 47511 set Visible may run the event loop on GTK and trigger a rentrant call have to make sure we don t dispose another shell that was already brought up in a reentrant call when calling set Visible Shell temp Shell f Proposal Shell f Proposal Shell null temp Shell set Visible false temp Shell dispose  okToUse fProposalShell fContentAssistant removeContentAssistListener ContentAssistant2 PROPOSAL_SELECTOR fPopupCloser setVisible setVisible tempShell fProposalShell fProposalShell tempShell setVisible tempShell
private void unregister if f Document Listener null I Document document f Viewer get Document if document null document remove Document Listener f Document Listener f Document Listener null f Document Events clear Styled Text styled Text f Viewer get Text Widget if f Key Listener null styled Text null styled Text is Disposed styled Text remove Key Listener f Key Listener if f Last Proposal null if f Last Proposal instanceof I Completion Proposal Extension2 I Completion Proposal Extension2 extension I Completion Proposal Extension2 f Last Proposal extension unselected f Viewer f Last Proposal null f Filtered Proposals null f Content Assistant possible Completions Closed  fDocumentListener IDocument fViewer getDocument removeDocumentListener fDocumentListener fDocumentListener fDocumentEvents StyledText styledText fViewer getTextWidget fKeyListener styledText styledText isDisposed styledText removeKeyListener fKeyListener fLastProposal fLastProposal ICompletionProposalExtension2 ICompletionProposalExtension2 ICompletionProposalExtension2 fLastProposal fViewer fLastProposal fFilteredProposals fContentAssistant possibleCompletionsClosed
Returns whether this popup is active It is active if the propsal selector is visible return code true code if this popup is active public boolean is Active return f Proposal Shell null f Proposal Shell is Disposed  isActive fProposalShell fProposalShell isDisposed
Initializes the proposal selector with these given proposals param proposals the proposals private void set Proposals I Completion Proposal proposals if Helper2 ok To Use f Proposal Table I Completion Proposal old Proposal get Selected Proposal if old Proposal instanceof I Completion Proposal Extension2 I Completion Proposal Extension2 old Proposal unselected f Viewer f Filtered Proposals proposals f Proposal Table set Redraw false f Proposal Table remove All Point selection f Viewer get Selected Range int end Offset end Offset selection x selection y I Document document f Viewer get Document boolean validate false if selection y 0 document null validate true int selection Index 0 Table Item item I Completion Proposal p for int i 0 i proposals length i p proposals i item new Table Item f Proposal Table SWT NULL if p get Image null item set Image p get Image item set Text p get Display String item set Data p if validate validate Proposal document p end Offset null selection Index i validate false resize Proposal Selector false select Proposal selection Index false f Proposal Table set Redraw true  setProposals ICompletionProposal okToUse fProposalTable ICompletionProposal oldProposal getSelectedProposal oldProposal ICompletionProposalExtension2 ICompletionProposalExtension2 oldProposal fViewer fFilteredProposals fProposalTable setRedraw fProposalTable removeAll fViewer getSelectedRange endOffset endOffset IDocument fViewer getDocument selectionIndex TableItem ICompletionProposal TableItem fProposalTable getImage setImage getImage setText getDisplayString setData validateProposal endOffset selectionIndex resizeProposalSelector selectProposal selectionIndex fProposalTable setRedraw
private void resize Proposal Selector boolean adjust Width in order to fill in the table items so size computation works correctly will cause flicker though f Proposal Table set Redraw true int width adjust Width SWT DEFAULT Grid Data f Proposal Table get Layout Data width Hint Point size f Proposal Table compute Size width SWT DEFAULT true Grid Data data new Grid Data Grid Data FILL BOTH data width Hint adjust Width Math min size x 300 width data height Hint Math min get Table Height Hint f Proposal Table f Proposal Table get Item Count get Table Height Hint f Proposal Table 10 f Proposal Table set Layout Data data f Proposal Shell layout true f Proposal Shell pack if adjust Width f Proposal Shell set Location get Location  resizeProposalSelector adjustWidth fProposalTable setRedraw adjustWidth GridData fProposalTable getLayoutData widthHint fProposalTable computeSize GridData GridData GridData FILL_BOTH widthHint adjustWidth heightHint getTableHeightHint fProposalTable fProposalTable getItemCount getTableHeightHint fProposalTable fProposalTable setLayoutData fProposalShell fProposalShell adjustWidth fProposalShell setLocation getLocation
Computes the table hight hint for code table code param table the table to compute the height for param rows the number of rows to compute the height for return the height hint for code table code private int get Table Height Hint Table table int rows if table get Font equals J Face Resources get Default Font table set Font J Face Resources get Dialog Font int result table get Item Height rows if table get Lines Visible result table get Grid Line Width rows 1 TODO adjustment might just work on windows return result 4 return result  getTableHeightHint getFont JFaceResources getDefaultFont setFont JFaceResources getDialogFont getItemHeight getLinesVisible getGridLineWidth
private boolean validate Proposal I Document document I Completion Proposal p int offset Document Event event detect selected if p instanceof I Completion Proposal Extension2 I Completion Proposal Extension2 e I Completion Proposal Extension2 p if e validate document offset event return true else if p instanceof I Completion Proposal Extension I Completion Proposal Extension e I Completion Proposal Extension p if e is Valid For document offset return true return false  validateProposal IDocument ICompletionProposal DocumentEvent ICompletionProposalExtension2 ICompletionProposalExtension2 ICompletionProposalExtension2 ICompletionProposalExtension ICompletionProposalExtension ICompletionProposalExtension isValidFor
Returns the graphical location at which this popup should be made visible return the location of this popup private Point get Location Styled Text text f Viewer get Text Widget Point selection text get Selection Point p text get Location At Offset selection x TODO subtract border width p x f Proposal Shell get Border Width if p x 0 p x 0 if p y 0 p y 0 p new Point p x p y text get Line Height p text to Display p if p x 0 p x 0 if p y 0 p y 0 return p  getLocation StyledText fViewer getTextWidget getSelection getLocationAtOffset fProposalShell getBorderWidth getLineHeight toDisplay
if f Document Listener null f Document Listener new I Document Listener public void document About To Be Changed Document Event event if f Inserting f Document Events add event  fDocumentListener fDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent fInserting fDocumentEvents
public void document Changed Document Event event if f Inserting filter Proposals  documentChanged DocumentEvent fInserting filterProposals
Displays this popup and install the additional info controller so that additional info is displayed when a proposal is selected and additional info is available private void display Proposals if f Content Assistant add Content Assist Listener this Content Assistant2 PROPOSAL SELECTOR if f Document Listener null f Document Listener new I Document Listener public void document About To Be Changed Document Event event if f Inserting f Document Events add event public void document Changed Document Event event if f Inserting filter Proposals I Document document f Viewer get Document if document null document add Document Listener f Document Listener f Proposal Shell set Visible true see bug 47511 set Visible may run the event loop on GTK and trigger a rentrant call have to check whether we are still visible if Helper2 ok To Use f Proposal Shell return if f Additional Info Controller null f Additional Info Controller install f Proposal Table f Additional Info Controller handle Table Selection Changed  displayProposals fContentAssistant addContentAssistListener ContentAssistant2 PROPOSAL_SELECTOR fDocumentListener fDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent fInserting fDocumentEvents documentChanged DocumentEvent fInserting filterProposals IDocument fViewer getDocument addDocumentListener fDocumentListener fProposalShell setVisible setVisible okToUse fProposalShell fAdditionalInfoController fAdditionalInfoController fProposalTable fAdditionalInfoController handleTableSelectionChanged
public boolean verify Key Verify Event e if Helper2 ok To Use f Proposal Shell return true char key e character if key 0 int new Selection f Proposal Table get Selection Index int visible Rows f Proposal Table get Size y f Proposal Table get Item Height 1 boolean smart Toggle false switch e key Code case SWT ARROW LEFT case SWT ARROW RIGHT filter Proposals return true case SWT ARROW UP new Selection 1 if new Selection 0 new Selection f Proposal Table get Item Count 1 break case SWT ARROW DOWN new Selection 1 if new Selection f Proposal Table get Item Count 1 new Selection 0 break case SWT PAGE DOWN new Selection visible Rows if new Selection f Proposal Table get Item Count new Selection f Proposal Table get Item Count 1 break case SWT PAGE UP new Selection visible Rows if new Selection 0 new Selection 0 break case SWT HOME new Selection 0 break case SWT END new Selection f Proposal Table get Item Count 1 break default if e key Code SWT MOD1 e key Code SWT MOD2 e key Code SWT MOD3 e key Code SWT MOD4 hide return true select Proposal new Selection smart Toggle e doit false return false else switch key case 0x1B Esc e doit false hide break case n Ctrl Enter on w2k case r Enter e doit false select Proposal With Mask e state Mask break in linked mode hide popup plus don t invalidate the event in order to give LinkedUI a chance to handle it case t hide break default I Completion Proposal p get Selected Proposal if p instanceof I Completion Proposal Extension I Completion Proposal Extension t I Completion Proposal Extension p char triggers t get Trigger Characters if contains triggers key hide if key e doit true insert Proposal p char 0 e state Mask f Viewer get Selected Range x else e doit false insert Proposal p key e state Mask f Viewer get Selected Range x return true  verifyKey VerifyEvent okToUse fProposalShell newSelection fProposalTable getSelectionIndex visibleRows fProposalTable getSize fProposalTable getItemHeight smartToggle keyCode ARROW_LEFT ARROW_RIGHT filterProposals ARROW_UP newSelection newSelection newSelection fProposalTable getItemCount ARROW_DOWN newSelection newSelection fProposalTable getItemCount newSelection PAGE_DOWN newSelection visibleRows newSelection fProposalTable getItemCount newSelection fProposalTable getItemCount PAGE_UP newSelection visibleRows newSelection newSelection newSelection newSelection fProposalTable getItemCount keyCode keyCode keyCode keyCode selectProposal newSelection smartToggle selectProposalWithMask stateMask ICompletionProposal getSelectedProposal ICompletionProposalExtension ICompletionProposalExtension ICompletionProposalExtension getTriggerCharacters insertProposal stateMask fViewer getSelectedRange insertProposal stateMask fViewer getSelectedRange
Selects the entry with the given index in the proposal selector and feeds the selection to the additional info controller param index the index in the list param smart Toggle code true code if the smart toogle key has been pressed since 2 1 private void select Proposal int index boolean smart Toggle I Completion Proposal old Proposal get Selected Proposal if old Proposal instanceof I Completion Proposal Extension2 I Completion Proposal Extension2 old Proposal unselected f Viewer I Completion Proposal proposal f Filtered Proposals index if proposal instanceof I Completion Proposal Extension2 I Completion Proposal Extension2 proposal selected f Viewer smart Toggle f Last Proposal proposal f Proposal Table set Selection index f Proposal Table show Selection if f Additional Info Controller null f Additional Info Controller handle Table Selection Changed  smartToggle selectProposal smartToggle ICompletionProposal oldProposal getSelectedProposal oldProposal ICompletionProposalExtension2 ICompletionProposalExtension2 oldProposal fViewer ICompletionProposal fFilteredProposals ICompletionProposalExtension2 ICompletionProposalExtension2 fViewer smartToggle fLastProposal fProposalTable setSelection fProposalTable showSelection fAdditionalInfoController fAdditionalInfoController handleTableSelectionChanged
Returns whether the given character is contained in the given array of characters param characters the list of characters param c the character to look for in the list return code true code if character belongs to the list since 2 0 private boolean contains char characters char c if characters null return false for int i 0 i characters length i if c characters i return true return false 
see I Event Consumer process Event Verify Event public void process Event Verify Event e  IEventConsumer processEvent VerifyEvent processEvent VerifyEvent
long f Counter f Invocation Counter public void run if f Counter f Invocation Counter return int offset f Viewer get Selected Range x I Completion Proposal proposals null try if offset 1 Document Event event Text Utilities merge Processed Document Events f Document Events proposals compute Filtered Proposals offset event catch Bad Location Exception x finally f Document Events clear f Filter Offset offset if proposals null proposals length 0 set Proposals proposals else hide  fCounter fInvocationCounter fCounter fInvocationCounter fViewer getSelectedRange ICompletionProposal DocumentEvent TextUtilities mergeProcessedDocumentEvents fDocumentEvents computeFilteredProposals BadLocationException fDocumentEvents fFilterOffset setProposals
Filters the displayed proposal based on the given cursor position and the offset of the original invocation of the content assistant private void filter Proposals f Invocation Counter Control control f Viewer get Text Widget control get Display async Exec new Runnable long f Counter f Invocation Counter public void run if f Counter f Invocation Counter return int offset f Viewer get Selected Range x I Completion Proposal proposals null try if offset 1 Document Event event Text Utilities merge Processed Document Events f Document Events proposals compute Filtered Proposals offset event catch Bad Location Exception x finally f Document Events clear f Filter Offset offset if proposals null proposals length 0 set Proposals proposals else hide  filterProposals fInvocationCounter fViewer getTextWidget getDisplay asyncExec fCounter fInvocationCounter fCounter fInvocationCounter fViewer getSelectedRange ICompletionProposal DocumentEvent TextUtilities mergeProcessedDocumentEvents fDocumentEvents computeFilteredProposals BadLocationException fDocumentEvents fFilterOffset setProposals
Computes the subset of already computed propsals that are still valid for the given offset param offset the offset param event the merged document event return the set of filtered proposals since 2 0 private I Completion Proposal compute Filtered Proposals int offset Document Event event if offset f Invocation Offset event null return f Computed Proposals if offset f Invocation Offset return null I Completion Proposal proposals f Computed Proposals if offset f Filter Offset proposals f Filtered Proposals if proposals null return null I Document document f Viewer get Document int length proposals length List filtered new Array List length for int i 0 i length i if proposals i instanceof I Completion Proposal Extension2 I Completion Proposal Extension2 p I Completion Proposal Extension2 proposals i if p validate document offset event filtered add p else if proposals i instanceof I Completion Proposal Extension I Completion Proposal Extension p I Completion Proposal Extension proposals i if p is Valid For document offset filtered add p else restore original behavior f Invocation Offset offset f Computed Proposals compute Proposals f Invocation Offset return f Computed Proposals I Completion Proposal p new I Completion Proposal filtered size filtered to Array p return p  ICompletionProposal computeFilteredProposals DocumentEvent fInvocationOffset fComputedProposals fInvocationOffset ICompletionProposal fComputedProposals fFilterOffset fFilteredProposals IDocument fViewer getDocument ArrayList ICompletionProposalExtension2 ICompletionProposalExtension2 ICompletionProposalExtension2 ICompletionProposalExtension ICompletionProposalExtension ICompletionProposalExtension isValidFor fInvocationOffset fComputedProposals computeProposals fInvocationOffset fComputedProposals ICompletionProposal ICompletionProposal toArray
Requests the proposal shell to take focus since 3 0 public void set Focus if Helper2 ok To Use f Proposal Shell f Proposal Shell set Focus  setFocus okToUse fProposalShell fProposalShell setFocus

Installs this closer on it s viewer s text widget protected void install Control w f Viewer get Text Widget if Helper2 ok To Use w Control shell w get Shell shell add Control Listener this w add Mouse Listener this w add Focus Listener this 1GGYYWK ITPJUI ALL Dismissing editor with code assist up causes lots of Internal Errors w add Dispose Listener this f Viewer add Viewport Listener this  fViewer getTextWidget okToUse getShell addControlListener addMouseListener addFocusListener addDisposeListener fViewer addViewportListener
Uninstalls this closer from the viewer s text widget protected void uninstall Control w f Viewer get Text Widget if Helper2 ok To Use w Control shell w get Shell if Helper2 ok To Use shell shell remove Control Listener this w remove Mouse Listener this w remove Focus Listener this 1GGYYWK ITPJUI ALL Dismissing editor with code assist up causes lots of Internal Errors w remove Dispose Listener this f Viewer remove Viewport Listener this  fViewer getTextWidget okToUse getShell okToUse removeControlListener removeMouseListener removeFocusListener removeDisposeListener fViewer removeViewportListener
see Control Listener control Resized Control Event public void control Resized Control Event e hide  ControlListener controlResized ControlEvent controlResized ControlEvent
see Control Listener control Moved Control Event public void control Moved Control Event e hide  ControlListener controlMoved ControlEvent controlMoved ControlEvent
see Mouse Listener mouse Down Mouse Event public void mouse Down Mouse Event e hide  MouseListener mouseDown MouseEvent mouseDown MouseEvent
see Mouse Listener mouse Up Mouse Event public void mouse Up Mouse Event e  MouseListener mouseUp MouseEvent mouseUp MouseEvent
see Mouse Listener mouse Double Click Mouse Event public void mouse Double Click Mouse Event e hide  MouseListener mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent
see Focus Listener focus Gained Focus Event public void focus Gained Focus Event e  FocusListener focusGained FocusEvent focusGained FocusEvent
if d null d async Exec new Runnable public void run if has Focus hide  asyncExec hasFocus
public void focus Lost Focus Event e if f Viewer null Control control f Viewer get Text Widget if control null Display d control get Display if d null d async Exec new Runnable public void run if has Focus hide  focusLost FocusEvent fViewer fViewer getTextWidget getDisplay asyncExec hasFocus
public void widget Disposed Dispose Event e 1GGYYWK ITPJUI ALL Dismissing editor with code assist up causes lots of Internal Errors hide  widgetDisposed DisposeEvent
see I Viewport Listener viewport Changed int public void viewport Changed int top Index hide  IViewportListener viewportChanged viewportChanged topIndex
Hides any open popups protected void hide f Proposal Popup hide f Context Info Popup hide  fProposalPopup fContextInfoPopup
private final static int SHOW CONTEXT INFO 2 protected Auto Assist Listener  SHOW_CONTEXT_INFO AutoAssistListener
protected void start int show Style f Show Style show Style f Thread new Thread this Content Assist Messages get String Content Assistant assist delay timer name NON NLS 1 f Thread start  showStyle fShowStyle showStyle fThread ContentAssistMessages getString ContentAssistant assist_delay_timer_name fThread
public void run try while true synchronized f Mutex if f Auto Activation Delay 0 f Mutex wait f Auto Activation Delay if f Is Reset f Is Reset false continue show Assist f Show Style break catch Interrupted Exception e f Thread null  fMutex fAutoActivationDelay fMutex fAutoActivationDelay fIsReset fIsReset showAssist fShowStyle InterruptedException fThread
protected void reset int show Style synchronized f Mutex f Show Style show Style f Is Reset true f Mutex notify All  showStyle fMutex fShowStyle showStyle fIsReset fMutex notifyAll
protected void stop if f Thread null f Thread interrupt  fThread fThread
private boolean contains char characters char character if characters null for int i 0 i characters length i if character characters i return true return false 
public void verify Key Verify Event e Only act on typed characters and ignore modifier only events if e character 0 e key Code SWT KEYCODE BIT 0 return int show Style int pos f Viewer get Selected Range x char activation get Completion Proposal Auto Activation Characters f Viewer pos if contains activation e character f Proposal Popup is Active show Style SHOW PROPOSALS else activation get Context Information Auto Activation Characters f Viewer pos if contains activation e character f Context Info Popup is Active show Style SHOW CONTEXT INFO else if f Thread null f Thread is Alive stop return if f Thread null f Thread is Alive reset show Style else start show Style  verifyKey VerifyEvent keyCode KEYCODE_BIT showStyle fViewer getSelectedRange getCompletionProposalAutoActivationCharacters fViewer fProposalPopup isActive showStyle SHOW_PROPOSALS getContextInformationAutoActivationCharacters fViewer fContextInfoPopup isActive showStyle SHOW_CONTEXT_INFO fThread fThread isAlive fThread fThread isAlive showStyle showStyle
d sync Exec new Runnable public void run if show Style SHOW PROPOSALS f Proposal Popup show Proposals true else if show Style SHOW CONTEXT INFO f Context Info Popup show Context Proposals true  syncExec showStyle SHOW_PROPOSALS fProposalPopup showProposals showStyle SHOW_CONTEXT_INFO fContextInfoPopup showContextProposals
protected void show Assist final int show Style Control control f Viewer get Text Widget Display d control get Display if d null try d sync Exec new Runnable public void run if show Style SHOW PROPOSALS f Proposal Popup show Proposals true else if show Style SHOW CONTEXT INFO f Context Info Popup show Context Proposals true catch SWT Error e  showAssist showStyle fViewer getTextWidget getDisplay syncExec showStyle SHOW_PROPOSALS fProposalPopup showProposals showStyle SHOW_CONTEXT_INFO fContextInfoPopup showContextProposals SWTError
protected void add Object popup Shell shell int type int offset Assert is Not Null popup Assert is True shell null shell is Disposed check Type type if f Shells type shell if f Shells type null f Shells type remove Listener SWT Dispose this shell add Listener SWT Dispose this f Shells type shell f Popups type popup if type LAYOUT CONTEXT SELECTOR type LAYOUT CONTEXT INFO POPUP f Context Type type layout type offset adjust Listeners type  isNotNull isTrue isDisposed checkType fShells fShells fShells removeListener addListener fShells fPopups LAYOUT_CONTEXT_SELECTOR LAYOUT_CONTEXT_INFO_POPUP fContextType adjustListeners
protected void check Type int type Assert is True type LAYOUT PROPOSAL SELECTOR type LAYOUT CONTEXT SELECTOR type LAYOUT CONTEXT INFO POPUP  checkType isTrue LAYOUT_PROPOSAL_SELECTOR LAYOUT_CONTEXT_SELECTOR LAYOUT_CONTEXT_INFO_POPUP
public void handle Event Event event Widget source event widget source remove Listener SWT Dispose this int type get Shell Type source check Type type f Shells type null switch type case LAYOUT PROPOSAL SELECTOR if f Context Type LAYOUT CONTEXT SELECTOR Helper2 ok To Use f Shells LAYOUT CONTEXT SELECTOR Restore event notification to the tip popup add Content Assist Listener I Content Assist Listener2 f Popups LAYOUT CONTEXT SELECTOR CONTEXT SELECTOR break case LAYOUT CONTEXT SELECTOR if Helper2 ok To Use f Shells LAYOUT PROPOSAL SELECTOR if f Proposal Popup Orientation PROPOSAL STACKED layout LAYOUT PROPOSAL SELECTOR get Selection Offset Restore event notification to the proposal popup add Content Assist Listener I Content Assist Listener2 f Popups LAYOUT PROPOSAL SELECTOR PROPOSAL SELECTOR f Context Type LAYOUT CONTEXT INFO POPUP break case LAYOUT CONTEXT INFO POPUP if Helper2 ok To Use f Shells LAYOUT PROPOSAL SELECTOR if f Context Info Popup Orientation CONTEXT INFO BELOW layout LAYOUT PROPOSAL SELECTOR get Selection Offset f Context Type LAYOUT CONTEXT SELECTOR break  handleEvent removeListener getShellType checkType fShells LAYOUT_PROPOSAL_SELECTOR fContextType LAYOUT_CONTEXT_SELECTOR okToUse fShells LAYOUT_CONTEXT_SELECTOR addContentAssistListener IContentAssistListener2 fPopups LAYOUT_CONTEXT_SELECTOR CONTEXT_SELECTOR LAYOUT_CONTEXT_SELECTOR okToUse fShells LAYOUT_PROPOSAL_SELECTOR fProposalPopupOrientation PROPOSAL_STACKED LAYOUT_PROPOSAL_SELECTOR getSelectionOffset addContentAssistListener IContentAssistListener2 fPopups LAYOUT_PROPOSAL_SELECTOR PROPOSAL_SELECTOR fContextType LAYOUT_CONTEXT_INFO_POPUP LAYOUT_CONTEXT_INFO_POPUP okToUse fShells LAYOUT_PROPOSAL_SELECTOR fContextInfoPopupOrientation CONTEXT_INFO_BELOW LAYOUT_PROPOSAL_SELECTOR getSelectionOffset fContextType LAYOUT_CONTEXT_SELECTOR
protected int get Shell Type Widget shell for int i 0 i f Shells length i if f Shells i shell return i return 1  getShellType fShells fShells
protected void layout int type int offset switch type case LAYOUT PROPOSAL SELECTOR layout Proposal Selector offset break case LAYOUT CONTEXT SELECTOR layout Context Selector offset break case LAYOUT CONTEXT INFO POPUP layout Context Info Popup offset break  LAYOUT_PROPOSAL_SELECTOR layoutProposalSelector LAYOUT_CONTEXT_SELECTOR layoutContextSelector LAYOUT_CONTEXT_INFO_POPUP layoutContextInfoPopup
protected void layout Proposal Selector int offset if f Context Type LAYOUT CONTEXT INFO POPUP f Context Info Popup Orientation CONTEXT INFO BELOW Helper2 ok To Use f Shells LAYOUT CONTEXT INFO POPUP Stack proposal selector beneath the tip box Shell shell f Shells LAYOUT PROPOSAL SELECTOR Shell parent f Shells LAYOUT CONTEXT INFO POPUP shell set Location get Stacked Location shell parent else if f Context Type LAYOUT CONTEXT SELECTOR Helper2 ok To Use f Shells LAYOUT CONTEXT SELECTOR There are no other presentations to be concerned with so place the proposal selector beneath the cursor line Shell shell f Shells LAYOUT PROPOSAL SELECTOR shell set Location get Below Location shell offset else switch f Proposal Popup Orientation case PROPOSAL REMOVE Remove the tip selector and place the proposal selector beneath the cursor line f Shells LAYOUT CONTEXT SELECTOR dispose Shell shell f Shells LAYOUT PROPOSAL SELECTOR shell set Location get Below Location shell offset break case PROPOSAL OVERLAY Overlay the tip selector with the proposal selector Shell shell f Shells LAYOUT PROPOSAL SELECTOR shell set Location get Below Location shell offset break case PROPOSAL STACKED Stack the proposal selector beneath the tip selector Shell shell f Shells LAYOUT PROPOSAL SELECTOR Shell parent f Shells LAYOUT CONTEXT SELECTOR shell set Location get Stacked Location shell parent break  layoutProposalSelector fContextType LAYOUT_CONTEXT_INFO_POPUP fContextInfoPopupOrientation CONTEXT_INFO_BELOW okToUse fShells LAYOUT_CONTEXT_INFO_POPUP fShells LAYOUT_PROPOSAL_SELECTOR fShells LAYOUT_CONTEXT_INFO_POPUP setLocation getStackedLocation fContextType LAYOUT_CONTEXT_SELECTOR okToUse fShells LAYOUT_CONTEXT_SELECTOR fShells LAYOUT_PROPOSAL_SELECTOR setLocation getBelowLocation fProposalPopupOrientation PROPOSAL_REMOVE fShells LAYOUT_CONTEXT_SELECTOR fShells LAYOUT_PROPOSAL_SELECTOR setLocation getBelowLocation PROPOSAL_OVERLAY fShells LAYOUT_PROPOSAL_SELECTOR setLocation getBelowLocation PROPOSAL_STACKED fShells LAYOUT_PROPOSAL_SELECTOR fShells LAYOUT_CONTEXT_SELECTOR setLocation getStackedLocation
protected void layout Context Selector int offset Always place the context selector beneath the cursor line Shell shell f Shells LAYOUT CONTEXT SELECTOR shell set Location get Below Location shell offset if Helper2 ok To Use f Shells LAYOUT PROPOSAL SELECTOR switch f Proposal Popup Orientation case PROPOSAL REMOVE Remove the proposal selector f Shells LAYOUT PROPOSAL SELECTOR dispose break case PROPOSAL OVERLAY The proposal selector has been overlayed by the tip selector break case PROPOSAL STACKED Stack the proposal selector beneath the tip selector shell f Shells LAYOUT PROPOSAL SELECTOR Shell parent f Shells LAYOUT CONTEXT SELECTOR shell set Location get Stacked Location shell parent break  layoutContextSelector fShells LAYOUT_CONTEXT_SELECTOR setLocation getBelowLocation okToUse fShells LAYOUT_PROPOSAL_SELECTOR fProposalPopupOrientation PROPOSAL_REMOVE fShells LAYOUT_PROPOSAL_SELECTOR PROPOSAL_OVERLAY PROPOSAL_STACKED fShells LAYOUT_PROPOSAL_SELECTOR fShells LAYOUT_CONTEXT_SELECTOR setLocation getStackedLocation
protected void layout Context Info Popup int offset switch f Context Info Popup Orientation case CONTEXT INFO ABOVE Place the popup above the cursor line Shell shell f Shells LAYOUT CONTEXT INFO POPUP shell set Location get Above Location shell offset break case CONTEXT INFO BELOW Place the popup beneath the cursor line Shell parent f Shells LAYOUT CONTEXT INFO POPUP parent set Location get Below Location parent offset if Helper2 ok To Use f Shells LAYOUT PROPOSAL SELECTOR Stack the proposal selector beneath the context info popup Shell shell f Shells LAYOUT PROPOSAL SELECTOR shell set Location get Stacked Location shell parent break  layoutContextInfoPopup fContextInfoPopupOrientation CONTEXT_INFO_ABOVE fShells LAYOUT_CONTEXT_INFO_POPUP setLocation getAboveLocation CONTEXT_INFO_BELOW fShells LAYOUT_CONTEXT_INFO_POPUP setLocation getBelowLocation okToUse fShells LAYOUT_PROPOSAL_SELECTOR fShells LAYOUT_PROPOSAL_SELECTOR setLocation getStackedLocation
protected void shift Horizontal Location Point location Rectangle shell Bounds Rectangle display Bounds if location x shell Bounds width display Bounds width location x display Bounds width shell Bounds width if location x display Bounds x location x display Bounds x  shiftHorizontalLocation shellBounds displayBounds shellBounds displayBounds displayBounds shellBounds displayBounds displayBounds
protected void shift Vertical Location Point location Rectangle shell Bounds Rectangle display Bounds if location y shell Bounds height display Bounds height location y display Bounds height shell Bounds height if location y display Bounds y location y display Bounds y  shiftVerticalLocation shellBounds displayBounds shellBounds displayBounds displayBounds shellBounds displayBounds displayBounds
protected Point get Above Location Shell shell int offset Styled Text text f Viewer get Text Widget Point location text get Location At Offset offset location text to Display location Rectangle shell Bounds shell get Bounds Rectangle display Bounds shell get Display get Client Area location y location y shell Bounds height shift Horizontal Location location shell Bounds display Bounds shift Vertical Location location shell Bounds display Bounds return location  getAboveLocation StyledText fViewer getTextWidget getLocationAtOffset toDisplay shellBounds getBounds displayBounds getDisplay getClientArea shellBounds shiftHorizontalLocation shellBounds displayBounds shiftVerticalLocation shellBounds displayBounds
protected Point get Below Location Shell shell int offset Styled Text text f Viewer get Text Widget Point location text get Location At Offset offset if location x 0 location x 0 if location y 0 location y 0 location text to Display location Rectangle shell Bounds shell get Bounds Rectangle display Bounds shell get Display get Client Area location y location y text get Line Height shift Horizontal Location location shell Bounds display Bounds shift Vertical Location location shell Bounds display Bounds return location  getBelowLocation StyledText fViewer getTextWidget getLocationAtOffset toDisplay shellBounds getBounds displayBounds getDisplay getClientArea getLineHeight shiftHorizontalLocation shellBounds displayBounds shiftVerticalLocation shellBounds displayBounds
protected Point get Stacked Location Shell shell Shell parent Point p parent get Location Point size parent get Size p x size x 4 p y size y p parent to Display p Rectangle shell Bounds shell get Bounds Rectangle display Bounds shell get Display get Client Area shift Horizontal Location p shell Bounds display Bounds shift Vertical Location p shell Bounds display Bounds return p  getStackedLocation getLocation getSize toDisplay shellBounds getBounds displayBounds getDisplay getClientArea shiftHorizontalLocation shellBounds displayBounds shiftVerticalLocation shellBounds displayBounds
protected void adjust Listeners int type switch type case LAYOUT PROPOSAL SELECTOR if f Context Type LAYOUT CONTEXT SELECTOR Helper2 ok To Use f Shells LAYOUT CONTEXT SELECTOR Disable event notification to the tip selector remove Content Assist Listener I Content Assist Listener2 f Popups LAYOUT CONTEXT SELECTOR CONTEXT SELECTOR break case LAYOUT CONTEXT SELECTOR if Helper2 ok To Use f Shells LAYOUT PROPOSAL SELECTOR Disable event notification to the proposal selector remove Content Assist Listener I Content Assist Listener2 f Popups LAYOUT PROPOSAL SELECTOR PROPOSAL SELECTOR break case LAYOUT CONTEXT INFO POPUP break  adjustListeners LAYOUT_PROPOSAL_SELECTOR fContextType LAYOUT_CONTEXT_SELECTOR okToUse fShells LAYOUT_CONTEXT_SELECTOR removeContentAssistListener IContentAssistListener2 fPopups LAYOUT_CONTEXT_SELECTOR CONTEXT_SELECTOR LAYOUT_CONTEXT_SELECTOR okToUse fShells LAYOUT_PROPOSAL_SELECTOR removeContentAssistListener IContentAssistListener2 fPopups LAYOUT_PROPOSAL_SELECTOR PROPOSAL_SELECTOR LAYOUT_CONTEXT_INFO_POPUP
Verifies key events by notifying the registered listeners Each listener is allowed to indicate that the event has been handled and should not be further processed param e the verify event see Verify Key Listener verify Key org eclipse swt events Verify Event public void verify Key Verify Event e I Content Assist Listener2 listeners I Content Assist Listener2 f Listeners clone for int i 0 i listeners length i if listeners i null if listeners i verify Key e e doit return  VerifyKeyListener verifyKey VerifyEvent verifyKey VerifyEvent IContentAssistListener2 IContentAssistListener2 fListeners verifyKey
public void process Event Verify Event event install Key Listener I Content Assist Listener2 listeners I Content Assist Listener2 f Listeners clone for int i 0 i listeners length i if listeners i null listeners i process Event event if event doit return  processEvent VerifyEvent installKeyListener IContentAssistListener2 IContentAssistListener2 fListeners processEvent
Creates a new content assistant The content assistant is not automatically activated overlays the completion proposals with context information list if necessary and shows the context information above the location at which it was activated If auto activation will be enabled without further configuration steps this content assistant is activated after a 500 ms delay It uses the default partitioning public Content Assistant2 set Context Information Popup Orientation CONTEXT INFO ABOVE set Information Control Creator get Information Control Creator Java Text Tools text Tools Java Plugin get Default get Java Text Tools I Color Manager manager text Tools get Color Manager I Preference Store store Java Plugin get Default get Preference Store Color c get Color store Preference Constants CODEASSIST PROPOSALS FOREGROUND manager set Proposal Selector Foreground c c get Color store Preference Constants CODEASSIST PROPOSALS BACKGROUND manager set Proposal Selector Background c  ContentAssistant2 setContextInformationPopupOrientation CONTEXT_INFO_ABOVE setInformationControlCreator getInformationControlCreator JavaTextTools textTools JavaPlugin getDefault getJavaTextTools IColorManager textTools getColorManager IPreferenceStore JavaPlugin getDefault getPreferenceStore getColor PreferenceConstants CODEASSIST_PROPOSALS_FOREGROUND setProposalSelectorForeground getColor PreferenceConstants CODEASSIST_PROPOSALS_BACKGROUND setProposalSelectorBackground
private I Information Control Creator get Information Control Creator return new I Information Control Creator public I Information Control create Information Control Shell parent return new Default Information Control parent new HTML Text Presenter  IInformationControlCreator getInformationControlCreator IInformationControlCreator IInformationControl createInformationControl DefaultInformationControl HTMLTextPresenter
Creates an code I Information Control Creator code to be used to display context information return an code I Information Control Creator code to be used to display context information private I Information Control Creator get Information Control Creator return new I Information Control Creator public I Information Control create Information Control Shell parent return new Default Information Control parent new HTML Text Presenter  IInformationControlCreator IInformationControlCreator IInformationControlCreator getInformationControlCreator IInformationControlCreator IInformationControl createInformationControl DefaultInformationControl HTMLTextPresenter
Sets the document partitioning this content assistant is using param partitioning the document partitioning for this content assistant public void set Document Partitioning String partitioning Assert is Not Null partitioning f Partitioning partitioning  setDocumentPartitioning isNotNull fPartitioning
since 3 0 public String get Document Partitioning return f Partitioning  getDocumentPartitioning fPartitioning
Registers a given content assist processor for a particular content type If there is already a processor registered for this type the new processor is registered instead of the old one param processor the content assist processor to register or code null code to remove an existing one param content Type the content type under which to register public void set Content Assist Processor I Content Assist Processor processor String content Type Assert is Not Null content Type if f Processors null f Processors new Hash Map if processor null f Processors remove content Type else f Processors put content Type processor  contentType setContentAssistProcessor IContentAssistProcessor contentType isNotNull contentType fProcessors fProcessors HashMap fProcessors contentType fProcessors contentType
public I Content Assist Processor get Content Assist Processor String content Type if f Processors null return null return I Content Assist Processor f Processors get content Type  IContentAssistProcessor getContentAssistProcessor contentType fProcessors IContentAssistProcessor fProcessors contentType
Enables the content assistant s auto activation mode param enabled indicates whether auto activation is enabled or not public void enable Auto Activation boolean enabled f Is Auto Activated enabled manage Auto Activation f Is Auto Activated  enableAutoActivation fIsAutoActivated manageAutoActivation fIsAutoActivated
Enables the content assistant s auto insertion mode If enabled the content assistant inserts a proposal automatically if it is the only proposal In the case of ambiguities the user must make the choice param enabled indicates whether auto insertion is enabled or not since 2 0 public void enable Auto Insert boolean enabled f Is Auto Inserting enabled  enableAutoInsert fIsAutoInserting
Returns whether this content assistant is in the auto insertion mode or not return code true code if in auto insertion mode since 2 0 boolean is Auto Inserting return f Is Auto Inserting  isAutoInserting fIsAutoInserting
Installs and uninstall the listeners needed for autoactivation param start code true code if listeners must be installed code false code if they must be removed since 2 0 private void manage Auto Activation boolean start if start if f Viewer null f Auto Assist Listener null f Auto Assist Listener new Auto Assist Listener if f Viewer instanceof I Text Viewer Extension I Text Viewer Extension extension I Text Viewer Extension f Viewer extension append Verify Key Listener f Auto Assist Listener else Styled Text text Widget f Viewer get Text Widget if Helper2 ok To Use text Widget text Widget add Verify Key Listener f Auto Assist Listener else if f Auto Assist Listener null if f Viewer instanceof I Text Viewer Extension I Text Viewer Extension extension I Text Viewer Extension f Viewer extension remove Verify Key Listener f Auto Assist Listener else Styled Text text Widget f Viewer get Text Widget if Helper2 ok To Use text Widget text Widget remove Verify Key Listener f Auto Assist Listener f Auto Assist Listener null  manageAutoActivation fViewer fAutoAssistListener fAutoAssistListener AutoAssistListener fViewer ITextViewerExtension ITextViewerExtension ITextViewerExtension fViewer appendVerifyKeyListener fAutoAssistListener StyledText textWidget fViewer getTextWidget okToUse textWidget textWidget addVerifyKeyListener fAutoAssistListener fAutoAssistListener fViewer ITextViewerExtension ITextViewerExtension ITextViewerExtension fViewer removeVerifyKeyListener fAutoAssistListener StyledText textWidget fViewer getTextWidget okToUse textWidget textWidget removeVerifyKeyListener fAutoAssistListener fAutoAssistListener
Sets the delay after which the content assistant is automatically invoked if the cursor is behind an auto activation character param delay the auto activation delay public void set Auto Activation Delay int delay f Auto Activation Delay delay  setAutoActivationDelay fAutoActivationDelay
Sets the proposal popups orientation The following values may be used ul li PROPOSAL OVERLAY p proposal popup windows should overlay each other li li PROPOSAL REMOVE p any currently shown proposal popup should be closed li li PROPOSAL STACKED p proposal popup windows should be vertical stacked with no overlap beneath the line containing the current cursor location li ul param orientation the popup s orientation public void set Proposal Popup Orientation int orientation f Proposal Popup Orientation orientation  PROPOSAL_OVERLAY PROPOSAL_REMOVE PROPOSAL_STACKED setProposalPopupOrientation fProposalPopupOrientation
Sets the context information popup s orientation The following values may be used ul li CONTEXT ABOVE p context information popup should always appear above the line containing the current cursor location li li CONTEXT BELOW p context information popup should always appear below the line containing the current cursor location li ul param orientation the popup s orientation public void set Context Information Popup Orientation int orientation f Context Info Popup Orientation orientation  CONTEXT_ABOVE CONTEXT_BELOW setContextInformationPopupOrientation fContextInfoPopupOrientation
Sets the context information popup s background color param background the background color public void set Context Information Popup Background Color background f Context Info Popup Background background  setContextInformationPopupBackground fContextInfoPopupBackground
Returns the background of the context information popup return the background of the context information popup since 2 0 Color get Context Information Popup Background return f Context Info Popup Background  getContextInformationPopupBackground fContextInfoPopupBackground
Sets the context information popup s foreground color param foreground the foreground color since 2 0 public void set Context Information Popup Foreground Color foreground f Context Info Popup Foreground foreground  setContextInformationPopupForeground fContextInfoPopupForeground
Returns the foreground of the context information popup return the foreground of the context information popup since 2 0 Color get Context Information Popup Foreground return f Context Info Popup Foreground  getContextInformationPopupForeground fContextInfoPopupForeground
Sets the proposal selector s background color param background the background color since 2 0 public void set Proposal Selector Background Color background f Proposal Selector Background background  setProposalSelectorBackground fProposalSelectorBackground
Returns the background of the proposal selector return the background of the proposal selector since 2 0 Color get Proposal Selector Background return f Proposal Selector Background  getProposalSelectorBackground fProposalSelectorBackground
Sets the proposal s foreground color param foreground the foreground color since 2 0 public void set Proposal Selector Foreground Color foreground f Proposal Selector Foreground foreground  setProposalSelectorForeground fProposalSelectorForeground
Returns the foreground of the proposal selector return the foreground of the proposal selector since 2 0 Color get Proposal Selector Foreground return f Proposal Selector Foreground  getProposalSelectorForeground fProposalSelectorForeground
Sets the context selector s background color param background the background color since 2 0 public void set Context Selector Background Color background f Context Selector Background background  setContextSelectorBackground fContextSelectorBackground
Returns the background of the context selector return the background of the context selector since 2 0 Color get Context Selector Background return f Context Selector Background  getContextSelectorBackground fContextSelectorBackground
Sets the context selector s foreground color param foreground the foreground color since 2 0 public void set Context Selector Foreground Color foreground f Context Selector Foreground foreground  setContextSelectorForeground fContextSelectorForeground
Returns the foreground of the context selector return the foreground of the context selector since 2 0 Color get Context Selector Foreground return f Context Selector Foreground  getContextSelectorForeground fContextSelectorForeground
Sets the information control creator for the additional information control param creator the information control creator for the additional information control since 2 0 public void set Information Control Creator I Information Control Creator creator f Information Control Creator creator  setInformationControlCreator IInformationControlCreator fInformationControlCreator
public void install I Text Viewer text Viewer Assert is Not Null text Viewer f Viewer text Viewer f Layout Manager new Layout Manager f Internal Listener new Internal Listener Additional Info Controller2 controller null if f Information Control Creator null int delay f Auto Activation Delay if delay 0 delay DEFAULT AUTO ACTIVATION DELAY delay Math round delay 1 5f controller new Additional Info Controller2 f Information Control Creator delay f Context Info Popup new Context Information Popup2 this f Viewer f Proposal Popup new Completion Proposal Popup2 this f Viewer controller manage Auto Activation f Is Auto Activated  ITextViewer textViewer isNotNull textViewer fViewer textViewer fLayoutManager LayoutManager fInternalListener InternalListener AdditionalInfoController2 fInformationControlCreator fAutoActivationDelay DEFAULT_AUTO_ACTIVATION_DELAY AdditionalInfoController2 fInformationControlCreator fContextInfoPopup ContextInformationPopup2 fViewer fProposalPopup CompletionProposalPopup2 fViewer manageAutoActivation fIsAutoActivated
public void uninstall if f Proposal Popup null f Proposal Popup hide if f Context Info Popup null f Context Info Popup hide manage Auto Activation false if f Closer null f Closer uninstall f Closer null f Viewer null  fProposalPopup fProposalPopup fContextInfoPopup fContextInfoPopup manageAutoActivation fCloser fCloser fCloser fViewer
Adds the given shell of the specified type to the layout Valid types are defined by code Layout Manager code param popup a content assist popup param shell the shell of the content assist popup param type the type of popup param visible Offset the offset at which to layout the popup relative to the offset of the viewer s visible region since 2 0 void add To Layout Object popup Shell shell int type int visible Offset f Layout Manager add popup shell type visible Offset  LayoutManager visibleOffset addToLayout visibleOffset fLayoutManager visibleOffset
Layouts the registered popup of the given type relative to the given offset The offset is relative to the offset of the viewer s visible region Valid types are defined by code Layout Manager code param type the type of popup to layout param visible Offset the offset at which to layout relative to the offset of the viewer s visible region since 2 0 void layout int type int visible Offset f Layout Manager layout type visible Offset  LayoutManager visibleOffset visibleOffset fLayoutManager visibleOffset
Notifies the controller that a popup has lost focus param e the focus event void popup Focus Lost Focus Event e f Closer focus Lost e  popupFocusLost FocusEvent fCloser focusLost
Returns the offset of the selection relative to the offset of the visible region return the offset of the selection relative to the offset of the visible region since 2 0 int get Selection Offset Styled Text text f Viewer get Text Widget return text get Selection Range x  getSelectionOffset StyledText fViewer getTextWidget getSelectionRange
Returns whether the widget token could be acquired The following are valid listener types ul li AUTO ASSIST li CONTEXT SELECTOR li PROPOSAL SELECTOR li CONTEXT INFO POPUP ul param type the listener type for which to acquire return code true code if the widget token could be acquired since 2 0 private boolean acquire Widget Token int type switch type case CONTEXT SELECTOR case PROPOSAL SELECTOR if f Viewer instanceof I Widget Token Owner I Widget Token Owner owner I Widget Token Owner f Viewer return owner request Widget Token this else if f Viewer instanceof I Widget Token Owner Extension I Widget Token Owner Extension extension I Widget Token Owner Extension f Viewer return extension request Widget Token this WIDGET PRIORITY return true  AUTO_ASSIST CONTEXT_SELECTOR PROPOSAL_SELECTOR CONTEXT_INFO_POPUP acquireWidgetToken CONTEXT_SELECTOR PROPOSAL_SELECTOR fViewer IWidgetTokenOwner IWidgetTokenOwner IWidgetTokenOwner fViewer requestWidgetToken fViewer IWidgetTokenOwnerExtension IWidgetTokenOwnerExtension IWidgetTokenOwnerExtension fViewer requestWidgetToken WIDGET_PRIORITY
Registers a content assist listener The following are valid listener types ul li AUTO ASSIST li CONTEXT SELECTOR li PROPOSAL SELECTOR li CONTEXT INFO POPUP ul Returns whether the listener could be added successfully A listener can not be added if the widget token could not be acquired param listener the listener to register param type the type of listener return code true code if the listener could be added boolean add Content Assist Listener I Content Assist Listener2 listener int type if acquire Widget Token type f Listeners type listener if get Number Of Listeners 1 f Closer new Closer f Closer install f Viewer set Event Consumer f Internal Listener install Key Listener return true return false  AUTO_ASSIST CONTEXT_SELECTOR PROPOSAL_SELECTOR CONTEXT_INFO_POPUP addContentAssistListener IContentAssistListener2 acquireWidgetToken fListeners getNumberOfListeners fCloser fCloser fViewer setEventConsumer fInternalListener installKeyListener
Installs a key listener on the text viewer s widget private void install Key Listener if f Key Listener Hooked Styled Text text f Viewer get Text Widget if Helper2 ok To Use text if f Viewer instanceof I Text Viewer Extension I Text Viewer Extension e I Text Viewer Extension f Viewer e prepend Verify Key Listener f Internal Listener else text add Verify Key Listener f Internal Listener f Key Listener Hooked true  installKeyListener fKeyListenerHooked StyledText fViewer getTextWidget okToUse fViewer ITextViewerExtension ITextViewerExtension ITextViewerExtension fViewer prependVerifyKeyListener fInternalListener addVerifyKeyListener fInternalListener fKeyListenerHooked
Releases the previously acquired widget token if the token is no longer necessary The following are valid listener types ul li AUTO ASSIST li CONTEXT SELECTOR li PROPOSAL SELECTOR li CONTEXT INFO POPUP ul param type the listener type since 2 0 private void release Widget Token int type if f Listeners CONTEXT SELECTOR null f Listeners PROPOSAL SELECTOR null if f Viewer instanceof I Widget Token Owner I Widget Token Owner owner I Widget Token Owner f Viewer owner release Widget Token this  AUTO_ASSIST CONTEXT_SELECTOR PROPOSAL_SELECTOR CONTEXT_INFO_POPUP releaseWidgetToken fListeners CONTEXT_SELECTOR fListeners PROPOSAL_SELECTOR fViewer IWidgetTokenOwner IWidgetTokenOwner IWidgetTokenOwner fViewer releaseWidgetToken
Unregisters a content assist listener param listener the listener to unregister param type the type of listener see add Content Assist Listener void remove Content Assist Listener I Content Assist Listener2 listener int type f Listeners type null if get Number Of Listeners 0 if f Closer null f Closer uninstall f Closer null uninstall Key Listener f Viewer set Event Consumer null release Widget Token type  addContentAssistListener removeContentAssistListener IContentAssistListener2 fListeners getNumberOfListeners fCloser fCloser fCloser uninstallKeyListener fViewer setEventConsumer releaseWidgetToken
Uninstall the key listener from the text viewer s widget private void uninstall Key Listener if f Key Listener Hooked Styled Text text f Viewer get Text Widget if Helper2 ok To Use text if f Viewer instanceof I Text Viewer Extension I Text Viewer Extension e I Text Viewer Extension f Viewer e remove Verify Key Listener f Internal Listener else text remove Verify Key Listener f Internal Listener f Key Listener Hooked false  uninstallKeyListener fKeyListenerHooked StyledText fViewer getTextWidget okToUse fViewer ITextViewerExtension ITextViewerExtension ITextViewerExtension fViewer removeVerifyKeyListener fInternalListener removeVerifyKeyListener fInternalListener fKeyListenerHooked
Returns the number of listeners return the number of listeners since 2 0 private int get Number Of Listeners int count 0 for int i 0 i CONTEXT INFO POPUP i if f Listeners i null count return count  getNumberOfListeners CONTEXT_INFO_POPUP fListeners
see I Content Assist show Possible Completions public String show Possible Completions return f Proposal Popup show Proposals false  IContentAssist showPossibleCompletions showPossibleCompletions fProposalPopup showProposals
Hides the proposal popup public void hide Possible Completions if f Proposal Popup null f Proposal Popup hide  hidePossibleCompletions fProposalPopup fProposalPopup
Callback to signal this content assistant that the presentation of the possible completions has been stopped since 2 1 protected void possible Completions Closed  possibleCompletionsClosed
see I Content Assist show Context Information public String show Context Information return f Context Info Popup show Context Proposals false  IContentAssist showContextInformation showContextInformation fContextInfoPopup showContextProposals
Callback to signal this content assistant that the presentation of the context information has been stopped since 2 1 protected void context Information Closed  contextInformationClosed
Requests that the specified context information to be shown param context Information the context information to be shown param position the position to which the context information refers to since 2 0 void show Context Information I Context Information context Information int position f Context Info Popup show Context Information context Information position  contextInformation showContextInformation IContextInformation contextInformation fContextInfoPopup showContextInformation contextInformation
Returns the current content assist error message return an error message or code null code if no error has occurred String get Error Message return f Last Error Message  getErrorMessage fLastErrorMessage
Returns the content assist processor for the content type of the specified document position param text Viewer the text viewer param offset a offset within the document return a content assist processor or code null code if none exists private I Content Assist Processor get Processor I Text Viewer viewer int offset try String type Text Utilities get Content Type viewer get Document get Document Partitioning offset true return get Content Assist Processor type catch Bad Location Exception x return null  textViewer IContentAssistProcessor getProcessor ITextViewer TextUtilities getContentType getDocument getDocumentPartitioning getContentAssistProcessor BadLocationException
Returns an array of completion proposals computed based on the specified document position The position is used to determine the appropriate content assist processor to invoke param viewer the viewer for which to compute the prosposals param position a document position return an array of completion proposals see I Content Assist Processor compute Completion Proposals I Completion Proposal compute Completion Proposals I Text Viewer viewer int position if f Proposals null return f Proposals else if f Proposal Strings null I Completion Proposal result new I Completion Proposal f Proposal Strings length for int i 0 i f Proposal Strings length i result i new Completion Proposal f Proposal Strings i position f Proposal Strings i length f Proposal Strings i length return result else return null  IContentAssistProcessor computeCompletionProposals ICompletionProposal computeCompletionProposals ITextViewer fProposals fProposals fProposalStrings ICompletionProposal ICompletionProposal fProposalStrings fProposalStrings CompletionProposal fProposalStrings fProposalStrings fProposalStrings
Returns an array of context information objects computed based on the specified document position The position is used to determine the appropriate content assist processor to invoke param viewer the viewer for which to compute the context information param position a document position return an array of context information objects see I Content Assist Processor compute Context Information I Context Information compute Context Information I Text Viewer viewer int position f Last Error Message null I Context Information result null I Content Assist Processor p get Processor viewer position if p null result p compute Context Information viewer position f Last Error Message p get Error Message return result  IContentAssistProcessor computeContextInformation IContextInformation computeContextInformation ITextViewer fLastErrorMessage IContextInformation IContentAssistProcessor getProcessor computeContextInformation fLastErrorMessage getErrorMessage
Returns the context information validator that should be used to determine when the currently displayed context information should be dismissed The position is used to determine the appropriate content assist processor to invoke param text Viewer the text viewer param offset a document offset return an validator see I Content Assist Processor get Context Information Validator I Context Information Validator get Context Information Validator I Text Viewer text Viewer int offset I Content Assist Processor p get Processor text Viewer offset return p null p get Context Information Validator null  textViewer IContentAssistProcessor getContextInformationValidator IContextInformationValidator getContextInformationValidator ITextViewer textViewer IContentAssistProcessor getProcessor textViewer getContextInformationValidator
Returns the context information presenter that should be used to display context information The position is used to determine the appropriate content assist processor to invoke param text Viewer the text viewer param offset a document offset return a presenter since 2 0 I Context Information Presenter get Context Information Presenter I Text Viewer text Viewer int offset I Context Information Validator validator get Context Information Validator text Viewer offset if validator instanceof I Context Information Presenter return I Context Information Presenter validator return null  textViewer IContextInformationPresenter getContextInformationPresenter ITextViewer textViewer IContextInformationValidator getContextInformationValidator textViewer IContextInformationPresenter IContextInformationPresenter
Returns the characters which when typed by the user should automatically initiate proposing completions The position is used to determine the appropriate content assist processor to invoke param text Viewer the text viewer param offset a document offset return the auto activation characters see I Content Assist Processor get Completion Proposal Auto Activation Characters private char get Completion Proposal Auto Activation Characters I Text Viewer text Viewer int offset I Content Assist Processor p get Processor text Viewer offset return p null p get Completion Proposal Auto Activation Characters null  textViewer IContentAssistProcessor getCompletionProposalAutoActivationCharacters getCompletionProposalAutoActivationCharacters ITextViewer textViewer IContentAssistProcessor getProcessor textViewer getCompletionProposalAutoActivationCharacters
Returns the characters which when typed by the user should automatically initiate the presentation of context information The position is used to determine the appropriate content assist processor to invoke param text Viewer the text viewer param offset a document offset return the auto activation characters see I Content Assist Processor get Context Information Auto Activation Characters private char get Context Information Auto Activation Characters I Text Viewer text Viewer int offset I Content Assist Processor p get Processor text Viewer offset return p null p get Context Information Auto Activation Characters null  textViewer IContentAssistProcessor getContextInformationAutoActivationCharacters getContextInformationAutoActivationCharacters ITextViewer textViewer IContentAssistProcessor getProcessor textViewer getContextInformationAutoActivationCharacters
since 2 0 public boolean request Widget Token I Widget Token Owner owner hide Possible Completions return true  requestWidgetToken IWidgetTokenOwner hidePossibleCompletions
param completion Position public void set Completion Position int completion Position f Completion Position completion Position  completionPosition setCompletionPosition completionPosition fCompletionPosition completionPosition
return the completion position public int get Completion Position return f Completion Position  getCompletionPosition fCompletionPosition
param proposals public void set Completions String proposals f Proposal Strings proposals  setCompletions fProposalStrings
param proposals public void set Completions I Completion Proposal proposals f Proposals proposals  setCompletions ICompletionProposal fProposals
public boolean request Widget Token I Widget Token Owner owner int priority if priority WIDGET PRIORITY hide Possible Completions return true else return false  requestWidgetToken IWidgetTokenOwner WIDGET_PRIORITY hidePossibleCompletions
public boolean set Focus I Widget Token Owner owner if f Proposal Popup null f Proposal Popup set Focus return f Proposal Popup has Focus return false  setFocus IWidgetTokenOwner fProposalPopup fProposalPopup setFocus fProposalPopup hasFocus
Returns whether any popups controlled by the receiver have the input focus return code true code if any of the managed popups have the focus code false code otherwise public boolean has Focus return f Proposal Popup null f Proposal Popup has Focus f Context Info Popup null f Context Info Popup has Focus  hasFocus fProposalPopup fProposalPopup hasFocus fContextInfoPopup fContextInfoPopup hasFocus
see org eclipse jface text contentassist I Content Assistant Extension complete Prefix public String complete Prefix TODO Auto generated method stub return null  IContentAssistantExtension completePrefix completePrefix
param proposal public void fire Proposal Chosen I Completion Proposal proposal List list new Array List f Proposal Listeners for Iterator it list iterator it has Next I Proposal Listener listener I Proposal Listener it next listener proposal Chosen proposal  fireProposalChosen ICompletionProposal ArrayList fProposalListeners hasNext IProposalListener IProposalListener proposalChosen
param listener public void remove Proposal Listener I Proposal Listener listener f Proposal Listeners remove listener  removeProposalListener IProposalListener fProposalListeners
param listener public void add Proposal Listener I Proposal Listener listener f Proposal Listeners add listener  addProposalListener IProposalListener fProposalListeners

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Content Assist Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE ContentAssistMessages
Gets a string from the resource bundle param key the string used to get the bundle value must not be null return the string from the resource bundle public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException
Gets a string from the resource bundle and formats it with the given arguments param key the string used to get the bundle value must not be null param args the arguments used to format the string return the formatted string public static String get Formatted String String key Object args String format null try format fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1 return Message Format format format args  getFormattedString fgResourceBundle getString MissingResourceException MessageFormat
Gets a string from the resource bundle and formats it with the given argument param key the string used to get the bundle value must not be null param arg the argument used to format the string return the formatted string public static String get Formatted String String key Object arg String format null try format fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1 if arg null arg NON NLS 1 return Message Format format format new Object arg  getFormattedString fgResourceBundle getString MissingResourceException MessageFormat

Creates a new context information popup param content Assistant the content assist for computing the context information param viewer the viewer on top of which the context information is shown public Context Information Popup2 Content Assistant2 content Assistant I Text Viewer viewer f Content Assistant content Assistant f Viewer viewer  contentAssistant ContextInformationPopup2 ContentAssistant2 contentAssistant ITextViewer fContentAssistant contentAssistant fViewer
Busy Indicator show While styled Text get Display new Runnable public void run int position f Viewer get Selected Range x I Context Information contexts compute Context Information position int count contexts null 0 contexts length if count 1 Show context information directly internal Show Context Info contexts 0 position else if count 0 Precise context must be selected if f Line Delimiter null f Line Delimiter styled Text get Line Delimiter create Context Selector set Contexts contexts display Context Selector hide Context Info Popup else if auto Activated styled Text get Display beep  BusyIndicator showWhile styledText getDisplay fViewer getSelectedRange IContextInformation computeContextInformation internalShowContextInfo fLineDelimiter fLineDelimiter styledText getLineDelimiter createContextSelector setContexts displayContextSelector hideContextInfoPopup autoActivated styledText getDisplay
Shows all possible contexts for the given cursor position of the viewer param auto Activated code true code if auto activated return a potential error message or code null code in case of no error public String show Context Proposals final boolean auto Activated final Styled Text styled Text f Viewer get Text Widget Busy Indicator show While styled Text get Display new Runnable public void run int position f Viewer get Selected Range x I Context Information contexts compute Context Information position int count contexts null 0 contexts length if count 1 Show context information directly internal Show Context Info contexts 0 position else if count 0 Precise context must be selected if f Line Delimiter null f Line Delimiter styled Text get Line Delimiter create Context Selector set Contexts contexts display Context Selector hide Context Info Popup else if auto Activated styled Text get Display beep return get Error Message  autoActivated showContextProposals autoActivated StyledText styledText fViewer getTextWidget BusyIndicator showWhile styledText getDisplay fViewer getSelectedRange IContextInformation computeContextInformation internalShowContextInfo fLineDelimiter fLineDelimiter styledText getLineDelimiter createContextSelector setContexts displayContextSelector hideContextInfoPopup autoActivated styledText getDisplay getErrorMessage
Control control f Viewer get Text Widget Busy Indicator show While control get Display new Runnable public void run internal Show Context Info info position hide Context Selector  fViewer getTextWidget BusyIndicator showWhile getDisplay internalShowContextInfo hideContextSelector
Displays the given context information for the given offset param info the context information param position the offset since 2 0 public void show Context Information final I Context Information info final int position Control control f Viewer get Text Widget Busy Indicator show While control get Display new Runnable public void run internal Show Context Info info position hide Context Selector  showContextInformation IContextInformation fViewer getTextWidget BusyIndicator showWhile getDisplay internalShowContextInfo hideContextSelector
Displays the given context information for the given offset param info the context information param position the offset since 2 0 private void internal Show Context Info I Context Information information int offset I Context Information Validator validator f Content Assistant get Context Information Validator f Viewer offset if validator null Context Frame current new Context Frame current f Information information current f Begin Offset information instanceof I Context Information Extension I Context Information Extension information get Context Information Position offset if current f Begin Offset 1 current f Begin Offset offset current f Offset offset current f Visible Offset f Viewer get Text Widget get Selection Range x offset current f Begin Offset current f Validator validator current f Presenter f Content Assistant get Context Information Presenter f Viewer offset f Context Frame Stack push current internal Show Context Frame current f Context Frame Stack size 1  internalShowContextInfo IContextInformation IContextInformationValidator fContentAssistant getContextInformationValidator fViewer ContextFrame ContextFrame fInformation fBeginOffset IContextInformationExtension IContextInformationExtension getContextInformationPosition fBeginOffset fBeginOffset fOffset fVisibleOffset fViewer getTextWidget getSelectionRange fBeginOffset fValidator fPresenter fContentAssistant getContextInformationPresenter fViewer fContextFrameStack internalShowContextFrame fContextFrameStack
Shows the given context frame param frame the frane to display param initial code true code if this is the first frame to be displayed since 2 0 private void internal Show Context Frame Context Frame frame boolean initial frame f Validator install frame f Information f Viewer frame f Offset if frame f Presenter null if f Text Presentation null f Text Presentation new Text Presentation frame f Presenter install frame f Information f Viewer frame f Begin Offset frame f Presenter update Presentation frame f Offset f Text Presentation create Context Info Popup f Context Info Text set Text frame f Information get Information Display String if f Text Presentation null Text Presentation apply Text Presentation f Text Presentation f Context Info Text resize if initial if f Content Assistant add Content Assist Listener this Content Assistant2 CONTEXT INFO POPUP f Content Assistant add To Layout this f Context Info Popup Content Assistant2 Layout Manager LAYOUT CONTEXT INFO POPUP frame f Visible Offset f Context Info Popup set Visible true else f Content Assistant layout Content Assistant2 Layout Manager LAYOUT CONTEXT INFO POPUP frame f Visible Offset  internalShowContextFrame ContextFrame fValidator fInformation fViewer fOffset fPresenter fTextPresentation fTextPresentation TextPresentation fPresenter fInformation fViewer fBeginOffset fPresenter updatePresentation fOffset fTextPresentation createContextInfoPopup fContextInfoText setText fInformation getInformationDisplayString fTextPresentation TextPresentation applyTextPresentation fTextPresentation fContextInfoText fContentAssistant addContentAssistListener ContentAssistant2 CONTEXT_INFO_POPUP fContentAssistant addToLayout fContextInfoPopup ContentAssistant2 LayoutManager LAYOUT_CONTEXT_INFO_POPUP fVisibleOffset fContextInfoPopup setVisible fContentAssistant ContentAssistant2 LayoutManager LAYOUT_CONTEXT_INFO_POPUP fVisibleOffset
Computes all possible context information for the given offset param position the offset return all possible context information for the given offset since 2 0 private I Context Information compute Context Information int position return f Content Assistant compute Context Information f Viewer position  IContextInformation computeContextInformation fContentAssistant computeContextInformation fViewer
Returns the error message generated while computing context information return the error message private String get Error Message return f Content Assistant get Error Message  getErrorMessage fContentAssistant getErrorMessage
Creates the context information popup This is the tooltip like overlay window private void create Context Info Popup if Helper2 ok To Use f Context Info Popup return Control control f Viewer get Text Widget Display display control get Display f Context Info Popup new Shell control get Shell SWT NO TRIM SWT ON TOP f Context Info Popup set Background display get System Color SWT COLOR BLACK f Context Info Text new Styled Text f Context Info Popup SWT MULTI SWT READ ONLY Color c f Content Assistant get Context Information Popup Background if c null c display get System Color SWT COLOR INFO BACKGROUND f Context Info Text set Background c c f Content Assistant get Context Information Popup Foreground if c null c display get System Color SWT COLOR INFO FOREGROUND f Context Info Text set Foreground c  createContextInfoPopup okToUse fContextInfoPopup fViewer getTextWidget getDisplay fContextInfoPopup getShell NO_TRIM ON_TOP fContextInfoPopup setBackground getSystemColor COLOR_BLACK fContextInfoText StyledText fContextInfoPopup READ_ONLY fContentAssistant getContextInformationPopupBackground getSystemColor COLOR_INFO_BACKGROUND fContextInfoText setBackground fContentAssistant getContextInformationPopupForeground getSystemColor COLOR_INFO_FOREGROUND fContextInfoText setForeground
Resizes the context information popup since 2 0 private void resize Point size f Context Info Text compute Size SWT DEFAULT SWT DEFAULT true size x 3 f Context Info Text set Size size f Context Info Text set Location 1 1 size x 2 size y 2 f Context Info Popup set Size size  fContextInfoText computeSize fContextInfoText setSize fContextInfoText setLocation fContextInfoPopup setSize
Hides the context information popup private void hide Context Info Popup if Helper2 ok To Use f Context Info Popup int size f Context Frame Stack size if size 0 f Context Frame Stack pop size if size 0 Context Frame current Context Frame f Context Frame Stack peek internal Show Context Frame current false else f Content Assistant remove Content Assist Listener this Content Assistant2 CONTEXT INFO POPUP f Context Info Popup set Visible false f Context Info Popup dispose f Context Info Popup null if f Text Presentation null f Text Presentation clear f Text Presentation null if f Context Info Popup null f Content Assistant context Information Closed  hideContextInfoPopup okToUse fContextInfoPopup fContextFrameStack fContextFrameStack ContextFrame ContextFrame fContextFrameStack internalShowContextFrame fContentAssistant removeContentAssistListener ContentAssistant2 CONTEXT_INFO_POPUP fContextInfoPopup setVisible fContextInfoPopup fContextInfoPopup fTextPresentation fTextPresentation fTextPresentation fContextInfoPopup fContentAssistant contextInformationClosed
f Context Selector Table add Selection Listener new Selection Listener public void widget Selected Selection Event e  fContextSelectorTable addSelectionListener SelectionListener widgetSelected SelectionEvent
public void widget Default Selected Selection Event e insert Selected Context hide Context Selector  widgetDefaultSelected SelectionEvent insertSelectedContext hideContextSelector
Creates the context selector in case the user has the choice between multiple valid contexts at a given offset private void create Context Selector if Helper2 ok To Use f Context Selector Shell return Control control f Viewer get Text Widget f Context Selector Shell new Shell control get Shell SWT NO TRIM SWT ON TOP f Context Selector Table new Table f Context Selector Shell SWT H SCROLL SWT V SCROLL int height f Context Selector Table get Item Height 10 f Context Selector Shell set Size 302 height 2 f Context Selector Table set Size 300 height f Context Selector Table set Location 1 1 f Context Selector Shell set Background control get Display get System Color SWT COLOR BLACK Color c f Content Assistant get Context Selector Background if c null c control get Display get System Color SWT COLOR INFO BACKGROUND f Context Selector Table set Background c c f Content Assistant get Context Selector Foreground if c null c control get Display get System Color SWT COLOR INFO FOREGROUND f Context Selector Table set Foreground c f Context Selector Table add Selection Listener new Selection Listener public void widget Selected Selection Event e public void widget Default Selected Selection Event e insert Selected Context hide Context Selector f Popup Closer install f Content Assistant f Context Selector Table f Context Selector Table set Header Visible false f Content Assistant add To Layout this f Context Selector Shell Content Assistant2 Layout Manager LAYOUT CONTEXT SELECTOR f Content Assistant get Selection Offset  createContextSelector okToUse fContextSelectorShell fViewer getTextWidget fContextSelectorShell getShell NO_TRIM ON_TOP fContextSelectorTable fContextSelectorShell H_SCROLL V_SCROLL fContextSelectorTable getItemHeight fContextSelectorShell setSize fContextSelectorTable setSize fContextSelectorTable setLocation fContextSelectorShell setBackground getDisplay getSystemColor COLOR_BLACK fContentAssistant getContextSelectorBackground getDisplay getSystemColor COLOR_INFO_BACKGROUND fContextSelectorTable setBackground fContentAssistant getContextSelectorForeground getDisplay getSystemColor COLOR_INFO_FOREGROUND fContextSelectorTable setForeground fContextSelectorTable addSelectionListener SelectionListener widgetSelected SelectionEvent widgetDefaultSelected SelectionEvent insertSelectedContext hideContextSelector fPopupCloser fContentAssistant fContextSelectorTable fContextSelectorTable setHeaderVisible fContentAssistant addToLayout fContextSelectorShell ContentAssistant2 LayoutManager LAYOUT_CONTEXT_SELECTOR fContentAssistant getSelectionOffset
Causes the context information of the context selected in the context selector to be displayed in the context information popup private void insert Selected Context int i f Context Selector Table get Selection Index if i 0 i f Context Selector Input length return int position f Viewer get Selected Range x internal Show Context Info f Context Selector Input i position  insertSelectedContext fContextSelectorTable getSelectionIndex fContextSelectorInput fViewer getSelectedRange internalShowContextInfo fContextSelectorInput
Sets the contexts in the context selector to the given set param contexts the possible contexts private void set Contexts I Context Information contexts if Helper2 ok To Use f Context Selector Table f Context Selector Input contexts f Context Selector Table set Redraw false f Context Selector Table remove All Table Item item I Context Information t for int i 0 i contexts length i t contexts i item new Table Item f Context Selector Table SWT NULL if t get Image null item set Image t get Image item set Text t get Context Display String f Context Selector Table select 0 f Context Selector Table set Redraw true  setContexts IContextInformation okToUse fContextSelectorTable fContextSelectorInput fContextSelectorTable setRedraw fContextSelectorTable removeAll TableItem IContextInformation TableItem fContextSelectorTable getImage setImage getImage setText getContextDisplayString fContextSelectorTable fContextSelectorTable setRedraw
Displays the context selector private void display Context Selector if f Content Assistant add Content Assist Listener this Content Assistant2 CONTEXT SELECTOR f Context Selector Shell set Visible true  displayContextSelector fContentAssistant addContentAssistListener ContentAssistant2 CONTEXT_SELECTOR fContextSelectorShell setVisible
Hodes the context selector private void hide Context Selector if Helper2 ok To Use f Context Selector Shell f Content Assistant remove Content Assist Listener this Content Assistant2 CONTEXT SELECTOR f Popup Closer uninstall f Context Selector Shell set Visible false f Context Selector Shell dispose f Context Selector Shell null if Helper2 ok To Use f Context Info Popup f Content Assistant context Information Closed  hideContextSelector okToUse fContextSelectorShell fContentAssistant removeContentAssistListener ContentAssistant2 CONTEXT_SELECTOR fPopupCloser fContextSelectorShell setVisible fContextSelectorShell fContextSelectorShell okToUse fContextInfoPopup fContentAssistant contextInformationClosed
Returns whether the context selector has the focus return code true code if teh context selector has the focus public boolean has Focus if Helper2 ok To Use f Context Selector Shell return f Context Selector Shell is Focus Control f Context Selector Table is Focus Control return false  hasFocus okToUse fContextSelectorShell fContextSelectorShell isFocusControl fContextSelectorTable isFocusControl
Hides context selector and context information popup public void hide hide Context Selector hide Context Info Popup  hideContextSelector hideContextInfoPopup
Returns whether this context information popup is active I e either a context selector or context information is displayed return code true code if the context selector is active public boolean is Active return Helper2 ok To Use f Context Info Popup Helper2 ok To Use f Context Selector Shell  isActive okToUse fContextInfoPopup okToUse fContextSelectorShell
public boolean verify Key Verify Event e if Helper2 ok To Use f Context Selector Shell return context Selector Key Pressed e if Helper2 ok To Use f Context Info Popup return context Info Popup Key Pressed e return true  verifyKey VerifyEvent okToUse fContextSelectorShell contextSelectorKeyPressed okToUse fContextInfoPopup contextInfoPopupKeyPressed
Processes a key stroke in the context selector param e the verify event describing the key stroke return code true code if processing can be stopped private boolean context Selector Key Pressed Verify Event e char key e character if key 0 int change int visible Rows f Context Selector Table get Size y f Context Selector Table get Item Height 1 int selection f Context Selector Table get Selection Index switch e key Code case SWT ARROW UP change f Context Selector Table get Selection Index 0 1 0 break case SWT ARROW DOWN change f Context Selector Table get Selection Index f Context Selector Table get Item Count 1 1 0 break case SWT PAGE DOWN change visible Rows if selection change f Context Selector Table get Item Count change f Context Selector Table get Item Count selection break case SWT PAGE UP change visible Rows if selection change 0 change selection break case SWT HOME change selection break case SWT END change f Context Selector Table get Item Count selection break default if e key Code SWT MOD1 e key Code SWT MOD2 e key Code SWT MOD3 e key Code SWT MOD4 hide Context Selector return true f Context Selector Table set Selection selection change f Context Selector Table show Selection e doit false return false else if t key switch focus to selector shell e doit false f Context Selector Shell set Focus return false else if key 0x1B terminate on Esc hide Context Selector return true  contextSelectorKeyPressed VerifyEvent visibleRows fContextSelectorTable getSize fContextSelectorTable getItemHeight fContextSelectorTable getSelectionIndex keyCode ARROW_UP fContextSelectorTable getSelectionIndex ARROW_DOWN fContextSelectorTable getSelectionIndex fContextSelectorTable getItemCount PAGE_DOWN visibleRows fContextSelectorTable getItemCount fContextSelectorTable getItemCount PAGE_UP visibleRows fContextSelectorTable getItemCount keyCode keyCode keyCode keyCode hideContextSelector fContextSelectorTable setSelection fContextSelectorTable showSelection fContextSelectorShell setFocus hideContextSelector
Processes a key stroke while the info popup is up param e the verify event describing the key stroke return code true code if processing can be stopped private boolean context Info Popup Key Pressed Key Event e char key e character if key 0 switch e key Code case SWT ARROW LEFT case SWT ARROW RIGHT validate Context Information break default if e key Code SWT MOD1 e key Code SWT MOD2 e key Code SWT MOD3 e key Code SWT MOD4 hide Context Info Popup break else if key 0x1B terminate on Esc hide Context Info Popup else validate Context Information return true  contextInfoPopupKeyPressed KeyEvent keyCode ARROW_LEFT ARROW_RIGHT validateContextInformation keyCode keyCode keyCode keyCode hideContextInfoPopup hideContextInfoPopup validateContextInformation
public void process Event Verify Event event if Helper2 ok To Use f Context Selector Shell context Selector Process Event event if Helper2 ok To Use f Context Info Popup context Info Popup Process Event event  processEvent VerifyEvent okToUse fContextSelectorShell contextSelectorProcessEvent okToUse fContextInfoPopup contextInfoPopupProcessEvent
Processes a key stroke in the context selector param e the verify event describing the key stroke private void context Selector Process Event Verify Event e if e start e end e text null e text equals f Line Delimiter e doit false insert Selected Context hide Context Selector  contextSelectorProcessEvent VerifyEvent fLineDelimiter insertSelectedContext hideContextSelector
Processes a key stroke while the info popup is up param e the verify event describing the key stroke private void context Info Popup Process Event Verify Event e if e start e end e text null e text length 0 validate Context Information  contextInfoPopupProcessEvent VerifyEvent validateContextInformation
public void run if Helper2 ok To Use f Context Info Popup f Frame f Context Frame Stack peek int offset f Viewer get Selected Range x if f Frame f Validator null f Frame f Validator is Context Information Valid offset hide Context Info Popup else if f Frame f Presenter null f Frame f Presenter update Presentation offset f Text Presentation Text Presentation apply Text Presentation f Text Presentation f Context Info Text resize  okToUse fContextInfoPopup fFrame fContextFrameStack fViewer getSelectedRange fFrame fValidator fFrame fValidator isContextInformationValid hideContextInfoPopup fFrame fPresenter fFrame fPresenter updatePresentation fTextPresentation TextPresentation applyTextPresentation fTextPresentation fContextInfoText
Validates the context information for the viewer s actual cursor position private void validate Context Information Post the code in the event queue in order to ensure that the action described by this verify key event has already beed executed Otherwise we d validate the context information based on the pre key stroke state f Context Info Popup get Display async Exec new Runnable private Context Frame f Frame Context Frame f Context Frame Stack peek public void run if Helper2 ok To Use f Context Info Popup f Frame f Context Frame Stack peek int offset f Viewer get Selected Range x if f Frame f Validator null f Frame f Validator is Context Information Valid offset hide Context Info Popup else if f Frame f Presenter null f Frame f Presenter update Presentation offset f Text Presentation Text Presentation apply Text Presentation f Text Presentation f Context Info Text resize  validateContextInformation fContextInfoPopup getDisplay asyncExec ContextFrame fFrame ContextFrame fContextFrameStack okToUse fContextInfoPopup fFrame fContextFrameStack fViewer getSelectedRange fFrame fValidator fFrame fValidator isContextInformationValid hideContextInfoPopup fFrame fPresenter fFrame fPresenter updatePresentation fTextPresentation TextPresentation applyTextPresentation fTextPresentation fContextInfoText

Returns whether the widget is code null code or disposed param widget the widget to check return code true code if the widget is neither code null code nor disposed public static boolean ok To Use Widget widget return widget null widget is Disposed  okToUse isDisposed

Transforms the HTML text from the reader to formatted text param reader the reader param presentation If not code null code formattings will be applied to the presentation public HTML2 Text Reader Reader reader Text Presentation presentation super new Pushback Reader reader f Text Presentation presentation  HTML2TextReader TextPresentation PushbackReader fTextPresentation
public int read throws IO Exception int c super read if c 1 f Counter return c  IOException fCounter
protected void start Bold if f Bold 0 f Start Offset f Counter f Bold  startBold fBold fStartOffset fCounter fBold
protected void start Preformatted Text f Is Preformatted Text true set Skip Whitespace false  startPreformattedText fIsPreformattedText setSkipWhitespace
protected void stop Preformatted Text f Is Preformatted Text false set Skip Whitespace true  stopPreformattedText fIsPreformattedText setSkipWhitespace
protected void stop Bold f Bold if f Bold 0 if f Text Presentation null f Text Presentation add Style Range new Style Range f Start Offset f Counter f Start Offset null null SWT BOLD f Start Offset 1  stopBold fBold fBold fTextPresentation fTextPresentation addStyleRange StyleRange fStartOffset fCounter fStartOffset fStartOffset
protected String compute Substitution int c throws IO Exception if c return processHTML Tag else if c return process Entity else if f Is Preformatted Text return process Preformatted Text c return null  computeSubstitution IOException processHTMLTag processEntity fIsPreformattedText processPreformattedText
private String html2 Text String html if html null html length 0 return EMPTY STRING String tag html if tag char At 0 tag tag substring 1 if fg Tags contains tag return EMPTY STRING if pre equals html NON NLS 1 start Preformatted Text return EMPTY STRING if pre equals html NON NLS 1 stop Preformatted Text return EMPTY STRING if f Is Preformatted Text return EMPTY STRING if b equals html NON NLS 1 start Bold return EMPTY STRING if h5 equals html dt equals html NON NLS 1 NON NLS 2 start Bold return EMPTY STRING if dl equals html NON NLS 1 return LINE DELIM if dd equals html NON NLS 1 return t NON NLS 1 if li equals html NON NLS 1 return LINE DELIM Content Assist Messages get String HTML2 Text Reader list Item Prefix NON NLS 1 NON NLS 2 if b equals html NON NLS 1 stop Bold return EMPTY STRING if p equals html NON NLS 1 f In Paragraph true return LINE DELIM if br equals html NON NLS 1 return LINE DELIM if p equals html NON NLS 1 boolean in Paragraph f In Paragraph f In Paragraph false return in Paragraph EMPTY STRING LINE DELIM if h5 equals html dt equals html NON NLS 1 NON NLS 2 stop Bold return LINE DELIM if dd equals html NON NLS 1 return LINE DELIM return EMPTY STRING  html2Text EMPTY_STRING charAt fgTags EMPTY_STRING startPreformattedText EMPTY_STRING stopPreformattedText EMPTY_STRING fIsPreformattedText EMPTY_STRING startBold EMPTY_STRING startBold EMPTY_STRING LINE_DELIM LINE_DELIM ContentAssistMessages getString HTML2TextReader listItemPrefix stopBold EMPTY_STRING fInParagraph LINE_DELIM LINE_DELIM inParagraph fInParagraph fInParagraph inParagraph EMPTY_STRING LINE_DELIM stopBold LINE_DELIM LINE_DELIM EMPTY_STRING
private String processHTML Tag throws IO Exception String Buffer buf new String Buffer int ch do ch next Char while ch 1 ch buf append Character to Lower Case char ch ch next Char if ch buf append Character to Lower Case char ch ch next Char while ch 1 ch buf append Character to Lower Case char ch ch next Char if ch unread ch return buf to String if ch 1 return null int tag Len buf length needs special treatment for comments if tag Len 3 equals buf substring 0 3 NON NLS 1 tag Len 5 equals buf substring tag Len 3 NON NLS 1 unfinished comment buf append ch else break while true return html2 Text buf to String  processHTMLTag IOException StringBuffer StringBuffer nextChar toLowerCase nextChar toLowerCase nextChar toLowerCase nextChar toString tagLen tagLen tagLen tagLen html2Text toString
private String process Preformatted Text int c if c r c n f Counter return null  processPreformattedText fCounter
private void unread int ch throws IO Exception Pushback Reader get Reader unread ch  IOException PushbackReader getReader
protected String entity2 Text String symbol if symbol length 1 symbol char At 0 int ch try if symbol char At 1 x ch Integer parse Int symbol substring 2 16 else ch Integer parse Int symbol substring 1 10 return EMPTY STRING char ch catch Number Format Exception e else String str String fg Entity Lookup get symbol if str null return str return symbol not found NON NLS 1  entity2Text charAt charAt parseInt parseInt EMPTY_STRING NumberFormatException fgEntityLookup
private String process Entity throws IO Exception String Buffer buf new String Buffer int ch next Char while Character is Letter Or Digit char ch ch buf append char ch ch next Char if ch return entity2 Text buf to String buf insert 0 if ch 1 buf append char ch return buf to String  processEntity IOException StringBuffer StringBuffer nextChar isLetterOrDigit nextChar entity2Text toString toString

private boolean f Enforce Upper Line Limit public HTML Text Presenter boolean enforce Upper Line Limit super f Enforce Upper Line Limit enforce Upper Line Limit  fEnforceUpperLineLimit HTMLTextPresenter enforceUpperLineLimit fEnforceUpperLineLimit enforceUpperLineLimit
public HTML Text Presenter this true  HTMLTextPresenter
protected Reader create Reader String hover Info Text Presentation presentation return new HTML2 Text Reader new String Reader hover Info presentation  createReader hoverInfo TextPresentation HTML2TextReader StringReader hoverInfo
protected void adapt Text Presentation Text Presentation presentation int offset int insert Length int yours Start offset int yours End offset insert Length 1 yours End Math max yours Start yours End Iterator e presentation get All Style Range Iterator while e has Next Style Range range Style Range e next int my Start range start int my End range start range length 1 my End Math max my Start my End if my End yours Start continue if my Start yours Start range length insert Length else range start insert Length  adaptTextPresentation TextPresentation insertLength yoursStart yoursEnd insertLength yoursEnd yoursStart yoursEnd getAllStyleRangeIterator hasNext StyleRange StyleRange myStart myEnd myEnd myStart myEnd myEnd yoursStart myStart yoursStart insertLength insertLength
private void append String Buffer buffer String string Text Presentation presentation int length string length buffer append string if presentation null adapt Text Presentation presentation f Counter length f Counter length  StringBuffer TextPresentation adaptTextPresentation fCounter fCounter
private String get Indent String line int length line length int i 0 while i length Character is Whitespace line char At i i return i length line line substring 0 i NON NLS 1  getIndent isWhitespace charAt
public String update Presentation Display display String hover Info Text Presentation presentation int max Width int max Height if hover Info null return null GC gc new GC display try String Buffer buffer new String Buffer int max Number Of Lines Math round max Height gc get Font Metrics get Height f Counter 0 Line Breaking Reader reader new Line Breaking Reader create Reader hover Info presentation gc max Width boolean last Line Formatted false String last Line Indent null String line reader read Line boolean line Formatted reader is Formatted Line boolean first Line Processed false while line null if f Enforce Upper Line Limit max Number Of Lines 0 break if first Line Processed if last Line Formatted append buffer LINE DELIM null else append buffer LINE DELIM presentation if last Line Indent null append buffer last Line Indent presentation append buffer line null first Line Processed true last Line Formatted line Formatted if line Formatted last Line Indent null else if last Line Indent null last Line Indent get Indent line line reader read Line line Formatted reader is Formatted Line max Number Of Lines if line null append buffer LINE DELIM line Formatted presentation null append buffer Content Assist Messages get String HTML Text Presenter ellipse presentation NON NLS 1 return trim buffer presentation catch IO Exception e ignore TODO do something else return null finally gc dispose  updatePresentation hoverInfo TextPresentation maxWidth maxHeight hoverInfo StringBuffer StringBuffer maxNumberOfLines maxHeight getFontMetrics getHeight fCounter LineBreakingReader LineBreakingReader createReader hoverInfo maxWidth lastLineFormatted lastLineIndent readLine lineFormatted isFormattedLine firstLineProcessed fEnforceUpperLineLimit maxNumberOfLines firstLineProcessed lastLineFormatted LINE_DELIM LINE_DELIM lastLineIndent lastLineIndent firstLineProcessed lastLineFormatted lineFormatted lineFormatted lastLineIndent lastLineIndent lastLineIndent getIndent readLine lineFormatted isFormattedLine maxNumberOfLines LINE_DELIM lineFormatted ContentAssistMessages getString HTMLTextPresenter IOException
private String trim String Buffer buffer Text Presentation presentation int length buffer length int end length 1 while end 0 Character is Whitespace buffer char At end end if end 1 return NON NLS 1 if end length 1 buffer delete end 1 length else end length int start 0 while start end Character is Whitespace buffer char At start start buffer delete 0 start presentation set Result Window new Region start buffer length return buffer to String  StringBuffer TextPresentation isWhitespace charAt isWhitespace charAt setResultWindow toString

Verifies the key event return code true code if processing should be continued by additional listeners see org eclipse swt custom Verify Key Listener verify Key Verify Event  VerifyKeyListener verifyKey VerifyEvent

public interface I Proposal Listener param proposal void proposal Chosen I Completion Proposal proposal  IProposalListener proposalChosen ICompletionProposal

Creates a reader that breaks an input text to fit in a given width param reader Reader of the input text param gc The graphic context that defines the currently used font sizes param max Line Width The max width pixes where the text has to fit in public Line Breaking Reader Reader reader GC gc int max Line Width f Reader new Buffered Reader reader fGC gc f Max Width max Line Width f Offset 0 f Line null f Line Break Iterator Break Iterator get Line Instance  maxLineWidth LineBreakingReader maxLineWidth fReader BufferedReader fMaxWidth maxLineWidth fOffset fLine fLineBreakIterator BreakIterator getLineInstance
public boolean is Formatted Line return f Line null  isFormattedLine fLine
Reads the next line The lengths of the line will not exceed the gived maximum width public String read Line throws IO Exception if f Line null String line f Reader read Line if line null return null int line Len fGC text Extent line x if line Len f Max Width return line f Line line f Line Break Iterator set Text line f Offset 0 int break Offset find Next Break Offset f Offset String res if break Offset Break Iterator DONE res f Line substring f Offset break Offset f Offset find Word Begin break Offset if f Offset f Line length f Line null else res f Line substring f Offset f Line null return res  readLine IOException fLine fReader readLine lineLen textExtent lineLen fMaxWidth fLine fLineBreakIterator setText fOffset breakOffset findNextBreakOffset fOffset breakOffset BreakIterator fLine fOffset breakOffset fOffset findWordBegin breakOffset fOffset fLine fLine fLine fOffset fLine
private int find Next Break Offset int curr Offset int curr Width 0 int next Offset f Line Break Iterator following curr Offset while next Offset Break Iterator DONE String word f Line substring curr Offset next Offset int word Width fGC text Extent word x int next Width word Width curr Width if next Width f Max Width if curr Width 0 return curr Offset else return next Offset curr Width next Width curr Offset next Offset next Offset f Line Break Iterator next return next Offset  findNextBreakOffset currOffset currWidth nextOffset fLineBreakIterator currOffset nextOffset BreakIterator fLine currOffset nextOffset wordWidth textExtent nextWidth wordWidth currWidth nextWidth fMaxWidth currWidth currOffset nextOffset currWidth nextWidth currOffset nextOffset nextOffset fLineBreakIterator nextOffset
private int find Word Begin int idx while idx f Line length Character is Whitespace f Line char At idx idx return idx  findWordBegin fLine isWhitespace fLine charAt

Installs this closer on the given table opened by the given content assistant param content Assistant the content assistant param table the table to be tracked public void install Content Assistant2 content Assistant Table table f Content Assistant content Assistant f Table table if Helper2 ok To Use f Table f Table add Focus Listener this f Scrollbar f Table get Vertical Bar if f Scrollbar null f Scrollbar add Selection Listener this  contentAssistant ContentAssistant2 contentAssistant fContentAssistant contentAssistant fTable okToUse fTable fTable addFocusListener fScrollbar fTable getVerticalBar fScrollbar fScrollbar addSelectionListener
Uninstalls this closer if previously installed public void uninstall if Helper2 ok To Use f Scrollbar f Scrollbar remove Selection Listener this if Helper2 ok To Use f Table f Table remove Focus Listener this  okToUse fScrollbar fScrollbar removeSelectionListener okToUse fTable fTable removeFocusListener
see org eclipse swt events Selection Listener widget Selected org eclipse swt events Selection Event public void widget Selected Selection Event e f Scrollbar Clicked true  SelectionListener widgetSelected SelectionEvent widgetSelected SelectionEvent fScrollbarClicked
see org eclipse swt events Selection Listener widget Default Selected org eclipse swt events Selection Event public void widget Default Selected Selection Event e f Scrollbar Clicked true  SelectionListener widgetDefaultSelected SelectionEvent widgetDefaultSelected SelectionEvent fScrollbarClicked
see org eclipse swt events Focus Listener focus Gained org eclipse swt events Focus Event public void focus Gained Focus Event e  FocusListener focusGained FocusEvent focusGained FocusEvent
public void focus Lost final Focus Event e f Scrollbar Clicked false Display d f Table get Display d async Exec new Runnable public void run if Helper2 ok To Use f Table f Table is Focus Control f Scrollbar Clicked f Content Assistant popup Focus Lost e  focusLost FocusEvent fScrollbarClicked fTable getDisplay asyncExec okToUse fTable fTable isFocusControl fScrollbarClicked fContentAssistant popupFocusLost

abstract class Single Char Reader extends Reader see Reader read public abstract int read throws IO Exception  SingleCharReader IOException
see Reader read char int int public int read char cbuf int off int len throws IO Exception int end off len for int i off i end i int ch read if ch 1 if i off return 1 else return i off cbuf i char ch return len  IOException
see Reader ready public boolean ready throws IO Exception return true  IOException
Gets the content as a String public String get String throws IO Exception String Buffer buf new String Buffer int ch while ch read 1 buf append char ch return buf to String  getString IOException StringBuffer StringBuffer toString

protected Substitution Text Reader Reader reader f Reader reader f Buffer new String Buffer f Index 0 f Read From Buffer false f Char After White Space 1 f Was White Space true  SubstitutionTextReader fReader fBuffer StringBuffer fIndex fReadFromBuffer fCharAfterWhiteSpace fWasWhiteSpace
Implement to compute the substitution for the given character and if necessary subsequent characters Use code next Char code to read subsequent characters  nextChar
Returns the internal reader protected Reader get Reader return f Reader  getReader fReader
Returns the next character protected int next Char throws IO Exception f Read From Buffer f Buffer length 0 if f Read From Buffer char ch f Buffer char At f Index if f Index f Buffer length f Buffer set Length 0 f Index 0 return ch else int ch f Char After White Space if ch 1 ch f Reader read if f Skip White Space Character is Whitespace char ch do ch f Reader read while Character is Whitespace char ch if ch 1 f Char After White Space ch return else f Char After White Space 1 return ch  nextChar IOException fReadFromBuffer fBuffer fReadFromBuffer fBuffer charAt fIndex fIndex fBuffer fBuffer setLength fIndex fCharAfterWhiteSpace fReader fSkipWhiteSpace isWhitespace fReader isWhitespace fCharAfterWhiteSpace fCharAfterWhiteSpace
see Reader read public int read throws IO Exception int c do c next Char while f Read From Buffer String s compute Substitution c if s null break if s length 0 f Buffer insert 0 s c next Char while f Skip White Space f Was White Space c f Was White Space c c r c n return c  IOException nextChar fReadFromBuffer computeSubstitution fBuffer nextChar fSkipWhiteSpace fWasWhiteSpace fWasWhiteSpace
see Reader ready public boolean ready throws IO Exception return f Reader ready  IOException fReader
see Reader close public void close throws IO Exception f Reader close  IOException fReader
see Reader reset public void reset throws IO Exception f Reader reset f Was White Space true f Char After White Space 1 f Buffer set Length 0 f Index 0  IOException fReader fWasWhiteSpace fCharAfterWhiteSpace fBuffer setLength fIndex
protected final void set Skip Whitespace boolean state f Skip White Space state  setSkipWhitespace fSkipWhiteSpace
protected final boolean is Skipping Whitespace return f Skip White Space  isSkippingWhitespace fSkipWhiteSpace

Create a new collector param sub Task param work param monitor public Collector String sub Task double work I Progress Monitor monitor this sub Task sub Task this worked work this monitor monitor  subTask subTask IProgressMonitor subTask subTask
Add worked to the work param worked Increment public void worked double worked Increment this worked this worked worked Increment  workedIncrement workedIncrement workedIncrement
Set the sub Task name param sub Task Name public void sub Task String sub Task Name this sub Task sub Task Name  subTask subTaskName subTask subTaskName subTask subTaskName
Run the collector public void run clear Collector this if sub Task null monitor sub Task sub Task if worked 0 monitor internal Worked worked  clearCollector subTask subTask subTask internalWorked
Creates an accumulating progress monitor wrapping the given one that uses the given display param monitor the actual progress monitor to be wrapped param display the SWT display used to forward the calls to the wrapped progress monitor public Accumulating Progress Monitor I Progress Monitor monitor Display display super monitor Assert is Not Null display this display display  AccumulatingProgressMonitor IProgressMonitor isNotNull
display sync Exec new Runnable public void run current Task name get Wrapped Progress Monitor begin Task name total Work  syncExec currentTask getWrappedProgressMonitor beginTask totalWork
public void begin Task final String name final int total Work synchronized this collector null display sync Exec new Runnable public void run current Task name get Wrapped Progress Monitor begin Task name total Work  beginTask totalWork syncExec currentTask getWrappedProgressMonitor beginTask totalWork
Clears the collector object used to accumulate work and subtask calls if it matches the given one param collector To Clear private synchronized void clear Collector Collector collector To Clear Check if the accumulator is still using the given collector If not don t clear it if this collector collector To Clear this collector null  collectorToClear clearCollector collectorToClear collectorToClear
Creates a collector object to accumulate work and subtask calls param sub Task param work private void create Collector String sub Task double work collector new Collector sub Task work get Wrapped Progress Monitor display async Exec collector  subTask createCollector subTask subTask getWrappedProgressMonitor asyncExec
display sync Exec new Runnable public void run get Wrapped Progress Monitor done  syncExec getWrappedProgressMonitor
public void done synchronized this collector null display sync Exec new Runnable public void run get Wrapped Progress Monitor done  syncExec getWrappedProgressMonitor
public synchronized void internal Worked final double work if collector null create Collector null work else collector worked work  internalWorked createCollector
display sync Exec new Runnable public void run current Task name get Wrapped Progress Monitor set Task Name name  syncExec currentTask getWrappedProgressMonitor setTaskName
public void set Task Name final String name synchronized this collector null display sync Exec new Runnable public void run current Task name get Wrapped Progress Monitor set Task Name name  setTaskName syncExec currentTask getWrappedProgressMonitor setTaskName
public synchronized void sub Task final String name if collector null create Collector name 0 else collector sub Task name  subTask createCollector subTask
Method declared on I Progress Monitor public synchronized void worked int work internal Worked work  IProgressMonitor internalWorked
see java lang Runnable run public void run I Progress Monitor With Blocking pm clear Blocked Dialog get Blocked Handler clear Blocked  IProgressMonitorWithBlocking clearBlocked getBlockedHandler clearBlocked
public void clear Blocked If this is a monitor that can report blocking do so Don t bother with a collector as this should only ever happen once and prevent any more progress final I Progress Monitor pm get Wrapped Progress Monitor if pm instanceof I Progress Monitor With Blocking return display async Exec new Runnable non Javadoc see java lang Runnable run public void run I Progress Monitor With Blocking pm clear Blocked Dialog get Blocked Handler clear Blocked  clearBlocked IProgressMonitor getWrappedProgressMonitor IProgressMonitorWithBlocking asyncExec IProgressMonitorWithBlocking clearBlocked getBlockedHandler clearBlocked
public void run I Progress Monitor With Blocking pm set Blocked reason Do not give a shell as we want it to block until it opens Dialog get Blocked Handler show Blocked pm reason current Task  IProgressMonitorWithBlocking setBlocked getBlockedHandler showBlocked currentTask
public void set Blocked final I Status reason If this is a monitor that can report blocking do so Don t bother with a collector as this should only ever happen once and prevent any more progress final I Progress Monitor pm get Wrapped Progress Monitor if pm instanceof I Progress Monitor With Blocking return display async Exec new Runnable non Javadoc see java lang Runnable run public void run I Progress Monitor With Blocking pm set Blocked reason Do not give a shell as we want it to block until it opens Dialog get Blocked Handler show Blocked pm reason current Task  setBlocked IStatus IProgressMonitor getWrappedProgressMonitor IProgressMonitorWithBlocking asyncExec IProgressMonitorWithBlocking setBlocked getBlockedHandler showBlocked currentTask

public interface I Runnable Context Runs the given code I Runnable With Progress code in this context For example if this is a code Progress Monitor Dialog code then the runnable is run using this dialog s progress monitor param fork code true code if the runnable should be run in a separate thread and code false code to run in the same thread param cancelable code true code to enable the cancelation and code false code to make the operation uncancellable param runnable the runnable to run exception Invocation Target Exception wraps any exception or error which occurs while running the runnable exception Interrupted Exception propagated by the context if the runnable acknowledges cancelation by throwing this exception This should not be thrown if cancelable is code false code  IRunnableContext IRunnableWithProgress ProgressMonitorDialog InvocationTargetException InterruptedException

public interface I Runnable With Progress Runs this operation Progress should be reported to the given progress monitor This method is usually invoked by an code I Runnable Context code s code run code method which supplies the progress monitor A request to cancel the operation should be honored and acknowledged by throwing code Interrupted Exception code param monitor the progress monitor to use to display progress and receive requests for cancelation exception Invocation Target Exception if the run method must propagate a checked exception it should wrap it inside an code Invocation Target Exception code runtime exceptions are automatically wrapped in an code Invocation Target Exception code by the calling context exception Interrupted Exception if the operation detects a request to cancel using code I Progress Monitor is Canceled code it should exit by throwing code Interrupted Exception code see I Runnable Context run  IRunnableWithProgress IRunnableContext InterruptedException InvocationTargetException InvocationTargetException InvocationTargetException InterruptedException IProgressMonitor isCanceled InterruptedException IRunnableContext

Creates a new modal context param operation the runnable to run param monitor the progress monitor to use to display progress and receive requests for cancelation param display the display to be used to read and dispatch events private Modal Context Thread I Runnable With Progress operation I Progress Monitor monitor Display display super Modal Context NON NLS 1 Assert is True monitor null display null runnable operation progress Monitor new Accumulating Progress Monitor monitor display this display display  ModalContextThread IRunnableWithProgress IProgressMonitor ModalContext isTrue progressMonitor AccumulatingProgressMonitor
are dispatched display sync Exec new Runnable public void run do nothing  syncExec
public void run try if runnable null runnable run progress Monitor catch Invocation Target Exception e throwable e catch Interrupted Exception e throwable e catch Runtime Exception e throwable e catch Thread Death e Make sure to propagate Thread Death or threads will never fully terminate throw e catch Error e throwable e finally Make sure that all events in the asynchronous event queue are dispatched display sync Exec new Runnable public void run do nothing Stop event dispatching continue Event Dispatching false Force the event loop to return from sleep so that it stops event dispatching display async Exec null  progressMonitor InvocationTargetException InterruptedException RuntimeException ThreadDeath ThreadDeath syncExec continueEventDispatching asyncExec
Processes events or waits until this modal context thread terminates public void block if display Display get Current while continue Event Dispatching if display read And Dispatch display sleep else try join catch Interrupted Exception e throwable e  getCurrent continueEventDispatching readAndDispatch InterruptedException
Returns whether the first progress monitor is the same as or a wrapper around the second progress monitor param monitor1 the first progress monitor param monitor2 the second progress monitor return code true code if the first is the same as or a wrapper around the second see Progress Monitor Wrapper public static boolean can Progress Monitor Be Used I Progress Monitor monitor1 I Progress Monitor monitor2 if monitor1 monitor2 return true while monitor1 instanceof Progress Monitor Wrapper monitor1 Progress Monitor Wrapper monitor1 get Wrapped Progress Monitor if monitor1 monitor2 return true return false  ProgressMonitorWrapper canProgressMonitorBeUsed IProgressMonitor IProgressMonitor ProgressMonitorWrapper ProgressMonitorWrapper getWrappedProgressMonitor
Checks with the given progress monitor and throws code Interrupted Exception code if it has been canceled p Code in a long running operation should call this method regularly so that a request to cancel will be honored p p Convenience for pre if monitor is Canceled throw new Interrupted Exception pre p param monitor the progress monitor exception Interrupted Exception if cancelling the operation has been requested see I Progress Monitor is Canceled public static void check Canceled I Progress Monitor monitor throws Interrupted Exception if monitor is Canceled throw new Interrupted Exception  InterruptedException isCanceled InterruptedException InterruptedException IProgressMonitor isCanceled checkCanceled IProgressMonitor InterruptedException isCanceled InterruptedException
Returns the currently active modal context thread or null if no modal context is active private static Modal Context Thread get Current Modal Context Thread Thread t Thread current Thread if t instanceof Modal Context Thread return Modal Context Thread t return null  ModalContextThread getCurrentModalContextThread currentThread ModalContextThread ModalContextThread
Returns the modal nesting level p The modal nesting level increases by one each time the code Modal Context run code method is called within the dynamic scope of another call to code Modal Context run code p return the modal nesting level or code 0 code if this method is called outside the dynamic scope of any invocation of code Modal Context run code public static int get Modal Level return modal Level  ModalContext ModalContext ModalContext getModalLevel modalLevel
Returns whether the given thread is running a modal context return code true code if the given thread is running a modal context code false code if not public static boolean is Modal Context Thread Thread thread return thread instanceof Modal Context Thread  isModalContextThread ModalContextThread
Runs the given runnable in a modal context passing it a progress monitor p The modal nesting level is increased by one from the perspective of the given runnable p param operation the runnable to run param fork code true code if the runnable should run in a separate thread and code false code if in the same thread param monitor the progress monitor to use to display progress and receive requests for cancelation param display the display to be used to read and dispatch events exception Invocation Target Exception if the run method must propagate a checked exception it should wrap it inside an code Invocation Target Exception code runtime exceptions and errors are automatically wrapped in an code Invocation Target Exception code by this method exception Interrupted Exception if the operation detects a request to cancel using code I Progress Monitor is Canceled code it should exit by throwing code Interrupted Exception code this method propagates the exception public static void run I Runnable With Progress operation boolean fork I Progress Monitor monitor Display display throws Invocation Target Exception Interrupted Exception Assert is True operation null monitor null modal Level try if monitor null monitor set Canceled false Is the runnable supposed to be execute in the same thread if fork run In Separate Thread run In Current Thread operation monitor else Modal Context Thread t get Current Modal Context Thread if t null Assert is True can Progress Monitor Be Used monitor t progress Monitor run In Current Thread operation monitor else t new Modal Context Thread operation monitor display t start t block Throwable throwable t throwable if throwable null if debug throwable instanceof Interrupted Exception throwable instanceof Operation Canceled Exception System err println Exception in modal context operation NON NLS 1 throwable print Stack Trace System err println Called from NON NLS 1 Don t create the Invocation Target Exception on the throwable otherwise it will print its stack trace from the other thread new Invocation Target Exception null print Stack Trace if throwable instanceof Invocation Target Exception throw Invocation Target Exception throwable else if throwable instanceof Interrupted Exception throw Interrupted Exception throwable else if throwable instanceof Operation Canceled Exception See 1GAN3L5 ITPUI WIN2000 Modal Context converts Operation Cancel Exception into Invocation Target Exception throw new Interrupted Exception throwable get Message else throw new Invocation Target Exception throwable finally modal Level  InvocationTargetException InvocationTargetException InvocationTargetException InterruptedException IProgressMonitor isCanceled InterruptedException IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException isTrue modalLevel setCanceled runInSeparateThread runInCurrentThread ModalContextThread getCurrentModalContextThread isTrue canProgressMonitorBeUsed progressMonitor runInCurrentThread ModalContextThread InterruptedException OperationCanceledException printStackTrace InvocationTargetException InvocationTargetException printStackTrace InvocationTargetException InvocationTargetException InterruptedException InterruptedException OperationCanceledException ModalContext OperationCancelException InvocationTargetException InterruptedException getMessage InvocationTargetException modalLevel
Run a runnable Convert all thrown exceptions to either Interrupted Exception or Invocation Target Exception private static void run In Current Thread I Runnable With Progress runnable I Progress Monitor progress Monitor throws Interrupted Exception Invocation Target Exception try if runnable null runnable run progress Monitor catch Invocation Target Exception e throw e catch Interrupted Exception e throw e catch Operation Canceled Exception e throw new Interrupted Exception catch Thread Death e Make sure to propagate Thread Death or threads will never fully terminate throw e catch Runtime Exception e throw new Invocation Target Exception e catch Error e throw new Invocation Target Exception e  InterruptedException InvocationTargetException runInCurrentThread IRunnableWithProgress IProgressMonitor progressMonitor InterruptedException InvocationTargetException progressMonitor InvocationTargetException InterruptedException OperationCanceledException InterruptedException ThreadDeath ThreadDeath RuntimeException InvocationTargetException InvocationTargetException
Sets whether Modal Context is running in debug mode param debug Mode code true code for debug mode and code false code for normal mode the default public static void set Debug Mode boolean debug Mode debug debug Mode  ModalContext debugMode setDebugMode debugMode debugMode

private Button check Box null Creates a new boolean field editor protected Boolean Field Editor  checkBox BooleanFieldEditor
Creates a boolean field editor in the given style param name the name of the preference this field editor works on param label Text the label text of the field editor param style the style either code DEFAULT code or code SEPARATE LABEL code param parent the parent of the field editor s control see DEFAULT see SEPARATE LABEL public Boolean Field Editor String name String label Text int style Composite parent init name label Text this style style create Control parent  labelText SEPARATE_LABEL SEPARATE_LABEL BooleanFieldEditor labelText labelText createControl
Creates a boolean field editor in the default style param name the name of the preference this field editor works on param label the label text of the field editor param parent the parent of the field editor s control public Boolean Field Editor String name String label Composite parent this name label DEFAULT parent  BooleanFieldEditor
protected void adjust For Num Columns int num Columns if style SEPARATE LABEL num Columns Grid Data check Box get Layout Data horizontal Span num Columns  adjustForNumColumns numColumns SEPARATE_LABEL numColumns GridData checkBox getLayoutData horizontalSpan numColumns
protected void do Fill Into Grid Composite parent int num Columns String text get Label Text switch style case SEPARATE LABEL get Label Control parent num Columns text null default check Box get Change Control parent Grid Data gd new Grid Data gd horizontal Span num Columns check Box set Layout Data gd if text null check Box set Text text  doFillIntoGrid numColumns getLabelText SEPARATE_LABEL getLabelControl numColumns checkBox getChangeControl GridData GridData horizontalSpan numColumns checkBox setLayoutData checkBox setText
protected void do Load if check Box null boolean value get Preference Store get Boolean get Preference Name check Box set Selection value was Selected value  doLoad checkBox getPreferenceStore getBoolean getPreferenceName checkBox setSelection wasSelected
protected void do Load Default if check Box null boolean value get Preference Store get Default Boolean get Preference Name check Box set Selection value was Selected value  doLoadDefault checkBox getPreferenceStore getDefaultBoolean getPreferenceName checkBox setSelection wasSelected
Method declared on Field Editor protected void do Store get Preference Store set Value get Preference Name check Box get Selection  FieldEditor doStore getPreferenceStore setValue getPreferenceName checkBox getSelection
Returns this field editor s current value return the value public boolean get Boolean Value return check Box get Selection  getBooleanValue checkBox getSelection
check Box add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean is Selected check Box get Selection value Changed was Selected is Selected was Selected is Selected  checkBox addSelectionListener SelectionAdapter widgetSelected SelectionEvent isSelected checkBox getSelection valueChanged wasSelected isSelected wasSelected isSelected
check Box add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event check Box null  checkBox addDisposeListener DisposeListener widgetDisposed DisposeEvent checkBox
Returns the change button for this field editor param parent The Composite to create the receiver in return the change button protected Button get Change Control Composite parent if check Box null check Box new Button parent SWT CHECK SWT LEFT check Box set Font parent get Font check Box add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean is Selected check Box get Selection value Changed was Selected is Selected was Selected is Selected check Box add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event check Box null else check Parent check Box parent return check Box  getChangeControl checkBox checkBox checkBox setFont getFont checkBox addSelectionListener SelectionAdapter widgetSelected SelectionEvent isSelected checkBox getSelection valueChanged wasSelected isSelected wasSelected isSelected checkBox addDisposeListener DisposeListener widgetDisposed DisposeEvent checkBox checkParent checkBox checkBox
public int get Number Of Controls switch style case SEPARATE LABEL return 2 default return 1  getNumberOfControls SEPARATE_LABEL
public void set Focus if check Box null check Box set Focus  setFocus checkBox checkBox setFocus
public void set Label Text String text super set Label Text text Label label get Label Control if label null check Box null check Box set Text text  setLabelText setLabelText getLabelControl checkBox checkBox setText
Informs this field editor s listener if it has one about a change to the value code VALUE code property provided that the old and new values are different param old Value the old value param new Value the new value protected void value Changed boolean old Value boolean new Value set Presents Default Value false if old Value new Value fire State Changed VALUE old Value new Value  oldValue newValue valueChanged oldValue newValue setPresentsDefaultValue oldValue newValue fireStateChanged oldValue newValue
public void set Enabled boolean enabled Composite parent Only call super if there is a label already if style SEPARATE LABEL super set Enabled enabled parent get Change Control parent set Enabled enabled  setEnabled SEPARATE_LABEL setEnabled getChangeControl setEnabled

preference Store add Property Change Listener new I Property Change Listener public void property Change Property Change Event event if final Proprety equals event get Property set Checked Boolean TRUE equals event get New Value  preferenceStore addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent finalProprety getProperty setChecked getNewValue
Create a new instance of the receiver param title The displayable name of the action param preference Store The preference store to propogate changes to param property The property that is being updated throws Illegal Argument Exception Thrown if preference Store or property are code null code public Boolean Property Action String title I Preference Store preference Store String property throws Illegal Argument Exception super title AS CHECK BOX if preference Store null property null throw new Illegal Argument Exception this preference Store preference Store this property property final String final Proprety property preference Store add Property Change Listener new I Property Change Listener public void property Change Property Change Event event if final Proprety equals event get Property set Checked Boolean TRUE equals event get New Value set Checked preference Store get Boolean property  preferenceStore IllegalArgumentException preferenceStore BooleanPropertyAction IPreferenceStore preferenceStore IllegalArgumentException AS_CHECK_BOX preferenceStore IllegalArgumentException preferenceStore preferenceStore finalProprety preferenceStore addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent finalProprety getProperty setChecked getNewValue setChecked preferenceStore getBoolean
see org eclipse jface action I Action run public void run preference Store set Value property is Checked  IAction preferenceStore setValue isChecked

Creates a new color field editor protected Color Field Editor  ColorFieldEditor
Creates a color field editor param name the name of the preference this field editor works on param label Text the label text of the field editor param parent the parent of the field editor s control public Color Field Editor String name String label Text Composite parent super name label Text parent  labelText ColorFieldEditor labelText labelText
Method declared on Field Editor protected void adjust For Num Columns int num Columns Grid Data color Selector get Button get Layout Data horizontal Span num Columns 1  FieldEditor adjustForNumColumns numColumns GridData colorSelector getButton getLayoutData horizontalSpan numColumns
Computes the size of the color image displayed on the button p This is an internal method and should not be called by clients p param window the window to create a GC on for calculation return Point The image size protected Point compute Image Size Control window Make the image height as high as a corresponding character This makes sure that the button has the same size as a normal text button GC gc new GC window Font f J Face Resources get Font Registry get J Face Resources DEFAULT FONT gc set Font f int height gc get Font Metrics get Height gc dispose Point p new Point height 3 6 height return p  computeImageSize JFaceResources getFontRegistry JFaceResources DEFAULT_FONT setFont getFontMetrics getHeight
protected void do Fill Into Grid Composite parent int num Columns Control control get Label Control parent Grid Data gd new Grid Data gd horizontal Span num Columns 1 control set Layout Data gd Button color Button get Change Control parent gd new Grid Data gd height Hint convert VerticalDL Us To Pixels color Button I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels color Button I Dialog Constants BUTTON WIDTH gd width Hint Math max width Hint color Button compute Size SWT DEFAULT SWT DEFAULT true x color Button set Layout Data gd  doFillIntoGrid numColumns getLabelControl GridData GridData horizontalSpan numColumns setLayoutData colorButton getChangeControl GridData heightHint convertVerticalDLUsToPixels colorButton IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels colorButton IDialogConstants BUTTON_WIDTH widthHint widthHint colorButton computeSize colorButton setLayoutData
protected void do Load if color Selector null return color Selector set Color Value Preference Converter get Color get Preference Store get Preference Name  doLoad colorSelector colorSelector setColorValue PreferenceConverter getColor getPreferenceStore getPreferenceName
protected void do Load Default if color Selector null return color Selector set Color Value Preference Converter get Default Color get Preference Store get Preference Name  doLoadDefault colorSelector colorSelector setColorValue PreferenceConverter getDefaultColor getPreferenceStore getPreferenceName
Method declared on Field Editor protected void do Store Preference Converter set Value get Preference Store get Preference Name color Selector get Color Value  FieldEditor doStore PreferenceConverter setValue getPreferenceStore getPreferenceName colorSelector getColorValue
Get the color selector used by the receiver return Color Selector public Color Selector get Color Selector return color Selector  ColorSelector ColorSelector getColorSelector colorSelector
color Selector add Listener new I Property Change Listener forward the property change of the color selector public void property Change Property Change Event event Color Field Editor this fire Value Changed event get Property event get Old Value event get New Value  colorSelector addListener IPropertyChangeListener propertyChange PropertyChangeEvent ColorFieldEditor fireValueChanged getProperty getOldValue getNewValue
Returns the change button for this field editor param parent The control to create the button in if required return the change button protected Button get Change Control Composite parent if color Selector null color Selector new Color Selector parent color Selector add Listener new I Property Change Listener forward the property change of the color selector public void property Change Property Change Event event Color Field Editor this fire Value Changed event get Property event get Old Value event get New Value else check Parent color Selector get Button parent return color Selector get Button  getChangeControl colorSelector colorSelector ColorSelector colorSelector addListener IPropertyChangeListener propertyChange PropertyChangeEvent ColorFieldEditor fireValueChanged getProperty getOldValue getNewValue checkParent colorSelector getButton colorSelector getButton
Method declared on Field Editor public int get Number Of Controls return 2  FieldEditor getNumberOfControls
see org eclipse jface preference Field Editor set Enabled boolean org eclipse swt widgets Composite public void set Enabled boolean enabled Composite parent super set Enabled enabled parent get Change Control parent set Enabled enabled  FieldEditor setEnabled setEnabled setEnabled getChangeControl setEnabled

f Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event Color Dialog color Dialog new Color Dialog f Button get Shell color Dialog setRGB f Color Value RGB new Color color Dialog open if new Color null RGB old Value f Color Value f Color Value new Color final Object final Listeners Color Selector this listeners get Listeners if final Listeners length 0 Property Change Event p Event new Property Change Event this PROP COLORCHANGE old Value new Color for int i 0 i final Listeners length i I Property Change Listener listener I Property Change Listener final Listeners i listener property Change p Event update Color Image  fButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent ColorDialog colorDialog ColorDialog fButton getShell colorDialog fColorValue newColor colorDialog newColor oldValue fColorValue fColorValue newColor finalListeners ColorSelector getListeners finalListeners PropertyChangeEvent pEvent PropertyChangeEvent PROP_COLORCHANGE oldValue newColor finalListeners IPropertyChangeListener IPropertyChangeListener finalListeners propertyChange pEvent updateColorImage
f Button add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event if f Image null f Image dispose f Image null if f Color null f Color dispose f Color null  fButton addDisposeListener DisposeListener widgetDisposed DisposeEvent fImage fImage fImage fColor fColor fColor
see org eclipse swt accessibility Accessible Adapter get Name org eclipse swt accessibility Accessible Event public void get Name Accessible Event e e result J Face Resources get String Color Selector Name NON NLS 1  AccessibleAdapter getName AccessibleEvent getName AccessibleEvent JFaceResources getString ColorSelector
private Listener List listeners Create a new instance of the reciever and the button that it wrappers in the supplied parent code Composite code param parent The parent of the button public Color Selector Composite parent listeners new Listener List f Button new Button parent SWT PUSH f Extent compute Image Size parent f Image new Image parent get Display f Extent x f Extent y GC gc new GC f Image gc set Background f Button get Background gc fill Rectangle 0 0 f Extent x f Extent y gc dispose f Button set Image f Image f Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event Color Dialog color Dialog new Color Dialog f Button get Shell color Dialog setRGB f Color Value RGB new Color color Dialog open if new Color null RGB old Value f Color Value f Color Value new Color final Object final Listeners Color Selector this listeners get Listeners if final Listeners length 0 Property Change Event p Event new Property Change Event this PROP COLORCHANGE old Value new Color for int i 0 i final Listeners length i I Property Change Listener listener I Property Change Listener final Listeners i listener property Change p Event update Color Image f Button add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event if f Image null f Image dispose f Image null if f Color null f Color dispose f Color null f Button get Accessible add Accessible Listener new Accessible Adapter non Javadoc see org eclipse swt accessibility Accessible Adapter get Name org eclipse swt accessibility Accessible Event public void get Name Accessible Event e e result J Face Resources get String Color Selector Name NON NLS 1  ListenerList ColorSelector ListenerList fButton fExtent computeImageSize fImage getDisplay fExtent fExtent fImage setBackground fButton getBackground fillRectangle fExtent fExtent fButton setImage fImage fButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent ColorDialog colorDialog ColorDialog fButton getShell colorDialog fColorValue newColor colorDialog newColor oldValue fColorValue fColorValue newColor finalListeners ColorSelector getListeners finalListeners PropertyChangeEvent pEvent PropertyChangeEvent PROP_COLORCHANGE oldValue newColor finalListeners IPropertyChangeListener IPropertyChangeListener finalListeners propertyChange pEvent updateColorImage fButton addDisposeListener DisposeListener widgetDisposed DisposeEvent fImage fImage fImage fColor fColor fColor fButton getAccessible addAccessibleListener AccessibleAdapter AccessibleAdapter getName AccessibleEvent getName AccessibleEvent JFaceResources getString ColorSelector
Adds a property change listener to this code Color Selector code Events are fired when the color in the control changes via the user clicking an selecting a new one in the color dialog No event is fired in the case where code set Color Value RGB code is invoked param listener a property change listener since 3 0 public void add Listener I Property Change Listener listener listeners add listener  ColorSelector setColorValue addListener IPropertyChangeListener
Compute the size of the image to be displayed param window the window used to calculate return code Point code private Point compute Image Size Control window GC gc new GC window Font f J Face Resources get Font Registry get J Face Resources DEFAULT FONT gc set Font f int height gc get Font Metrics get Height gc dispose Point p new Point height 3 6 height return p  computeImageSize JFaceResources getFontRegistry JFaceResources DEFAULT_FONT setFont getFontMetrics getHeight
Get the button control being wrappered by the selector return code Button code public Button get Button return f Button  getButton fButton
Return the currently displayed color return code RGB code public RGB get Color Value return f Color Value  getColorValue fColorValue
Removes the given listener from this code Color Selector code Has no affect if the listener is not registered param listener a property change listener since 3 0 public void remove Listener I Property Change Listener listener listeners remove listener  ColorSelector removeListener IPropertyChangeListener
Set the current color value and update the control param rgb The new color public void set Color Value RGB rgb f Color Value rgb update Color Image  setColorValue fColorValue updateColorImage
Set whether or not the button is enabled param state the enabled state public void set Enabled boolean state get Button set Enabled state  setEnabled getButton setEnabled
Update the image being displayed on the button using the current color setting protected void update Color Image Display display f Button get Display GC gc new GC f Image gc set Foreground display get System Color SWT COLOR BLACK gc draw Rectangle 0 2 f Extent x 1 f Extent y 4 if f Color null f Color dispose f Color new Color display f Color Value gc set Background f Color gc fill Rectangle 1 3 f Extent x 2 f Extent y 5 gc dispose f Button set Image f Image  updateColorImage fButton getDisplay fImage setForeground getSystemColor COLOR_BLACK drawRectangle fExtent fExtent fColor fColor fColor fColorValue setBackground fColor fillRectangle fExtent fExtent fButton setImage fImage

public class Directory Field Editor extends String Button Field Editor Creates a new directory field editor protected Directory Field Editor  DirectoryFieldEditor StringButtonFieldEditor DirectoryFieldEditor
Creates a directory field editor param name the name of the preference this field editor works on param label Text the label text of the field editor param parent the parent of the field editor s control public Directory Field Editor String name String label Text Composite parent init name label Text set Error Message J Face Resources get String Directory Field Editor error Message NON NLS 1 set Change Button Text J Face Resources get String open Browse NON NLS 1 set Validate Strategy VALIDATE ON FOCUS LOST create Control parent  labelText DirectoryFieldEditor labelText labelText setErrorMessage JFaceResources getString DirectoryFieldEditor errorMessage setChangeButtonText JFaceResources getString openBrowse setValidateStrategy VALIDATE_ON_FOCUS_LOST createControl
protected String change Pressed File f new File get Text Control get Text if f exists f null File d get Directory f if d null return null return d get Absolute Path  changePressed getTextControl getText getDirectory getAbsolutePath
protected boolean do Check State String file Name get Text Control get Text file Name file Name trim if file Name length 0 is Empty String Allowed return true File file new File file Name return file is Directory  doCheckState fileName getTextControl getText fileName fileName fileName isEmptyStringAllowed fileName isDirectory
Helper that opens the directory chooser dialog param starting Directory The directory the dialog will open in return File File or code null code private File get Directory File starting Directory Directory Dialog file Dialog new Directory Dialog get Shell SWT OPEN if starting Directory null file Dialog set Filter Path starting Directory get Path String dir file Dialog open if dir null dir dir trim if dir length 0 return new File dir return null  startingDirectory getDirectory startingDirectory DirectoryDialog fileDialog DirectoryDialog getShell startingDirectory fileDialog setFilterPath startingDirectory getPath fileDialog

private Preference Page page Creates a new field editor protected Field Editor  PreferencePage FieldEditor
Creates a new field editor param name the name of the preference this field editor works on param label Text the label text of the field editor param parent the parent of the field editor s control protected Field Editor String name String label Text Composite parent init name label Text create Control parent  labelText FieldEditor labelText labelText createControl
Adjusts the horizontal span of this field editor s basic controls p Subclasses must implement this method to adjust the horizontal span of controls so they appear correct in the given number of columns p p The number of columns will always be equal to or greater than the value returned by this editor s code get Number Of Controls code method param num Columns the number of columns  getNumberOfControls numColumns
protected abstract void adjust For Num Columns int num Columns Applies a font p The default implementation of this framework method does nothing Subclasses should override this method if they want to change the font of the SWT control to a value different than the standard dialog font p protected void apply Font  adjustForNumColumns numColumns applyFont
Checks if the given parent is the current parent of the supplied control throws an unchecked exception if they are not correctly related param control the control param parent the parent control protected void check Parent Control control Composite parent Assert is True control get Parent parent Different parents NON NLS 1  checkParent isTrue getParent
Clears the error message from the message line protected void clear Error Message if page null page set Error Message null  clearErrorMessage setErrorMessage
Clears the normal message from the message line protected void clear Message if page null page set Message null  clearMessage setMessage
Returns the number of pixels corresponding to the given number of horizontal dialog units p Clients may call this framework method but should not override it p param control the control being sized param dlus the number of horizontal dialog units return the number of pixels protected int convert HorizontalDL Us To Pixels Control control int dlus GC gc new GC control gc set Font control get Font int average Width gc get Font Metrics get Average Char Width gc dispose double horizontal Dialog Unit Size average Width 0 25 return int Math round dlus horizontal Dialog Unit Size  convertHorizontalDLUsToPixels setFont getFont averageWidth getFontMetrics getAverageCharWidth horizontalDialogUnitSize averageWidth horizontalDialogUnitSize
Returns the number of pixels corresponding to the given number of vertical dialog units p Clients may call this framework method but should not override it p param control the control being sized param dlus the number of vertical dialog units return the number of pixels protected int convert VerticalDL Us To Pixels Control control int dlus GC gc new GC control gc set Font control get Font int height gc get Font Metrics get Height gc dispose double vertical Dialog Unit Size height 0 125 return int Math round dlus vertical Dialog Unit Size  convertVerticalDLUsToPixels setFont getFont getFontMetrics getHeight verticalDialogUnitSize verticalDialogUnitSize
Creates this field editor s main control containing all of its basic controls param parent the parent control protected void create Control Composite parent Grid Layout layout new Grid Layout layout num Columns get Number Of Controls layout margin Width 0 layout margin Height 0 layout horizontal Spacing HORIZONTAL GAP parent set Layout layout do Fill Into Grid parent layout num Columns  createControl GridLayout GridLayout numColumns getNumberOfControls marginWidth marginHeight horizontalSpacing HORIZONTAL_GAP setLayout doFillIntoGrid numColumns
Disposes the SWT resources used by this field editor public void dispose nothing to dispose 
Fills this field editor s basic controls into the given parent p Subclasses must implement this method to create the controls for this field editor p param parent the composite used as a parent for the basic controls the parent s layout must be a code Grid Layout code param num Columns the number of columns  GridLayout numColumns
protected abstract void do Fill Into Grid Composite parent int num Columns Initializes this field editor with the preference value from the preference store p Subclasses must implement this method to properly initialize the field editor p  doFillIntoGrid numColumns
protected abstract void do Load Initializes this field editor with the default preference value from the preference store p Subclasses must implement this method to properly initialize the field editor p  doLoad
protected abstract void do Load Default Stores the preference value from this field editor into the preference store p Subclasses must implement this method to save the entered value into the preference store p  doLoadDefault
protected abstract void do Store Fills this field editor s basic controls into the given parent param parent the composite used as a parent for the basic controls the parent s layout must be a code Grid Layout code param num Columns the number of columns public void fill Into Grid Composite parent int num Columns Assert is True num Columns get Number Of Controls Assert is True parent get Layout instanceof Grid Layout do Fill Into Grid parent num Columns  doStore GridLayout numColumns fillIntoGrid numColumns isTrue numColumns getNumberOfControls isTrue getLayout GridLayout doFillIntoGrid numColumns
Informs this field editor s listener if it has one about a change to one of this field editor s boolean valued properties Does nothing if the old and new values are the same param property the field editor property name such as code VALUE code or code IS VALID code param old Value the old value param new Value the new value protected void fire State Changed String property boolean old Value boolean new Value if old Value new Value return fire Value Changed property new Boolean old Value new Boolean new Value  IS_VALID oldValue newValue fireStateChanged oldValue newValue oldValue newValue fireValueChanged oldValue newValue
Informs this field editor s listener if it has one about a change to one of this field editor s properties param property the field editor property name such as code VALUE code or code IS VALID code param old Value the old value object or code null code param new Value the new value or code null code protected void fire Value Changed String property Object old Value Object new Value if property Change Listener null return property Change Listener property Change new Property Change Event this property old Value new Value  IS_VALID oldValue newValue fireValueChanged oldValue newValue propertyChangeListener propertyChangeListener propertyChange PropertyChangeEvent oldValue newValue
Returns the symbolic font name used by this field editor return the symbolic font name public String get Field Editor Font Name return J Face Resources DIALOG FONT  getFieldEditorFontName JFaceResources DIALOG_FONT
Returns the label control return the label control or code null code if no label control has been created protected Label get Label Control return label  getLabelControl
Returns this field editor s label component p The label is created if it does not already exist p param parent the parent return the label control public Label get Label Control Composite parent if label null label new Label parent SWT LEFT label set Font parent get Font String text get Label Text if text null label set Text text label add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event label null else check Parent label parent return label  getLabelControl setFont getFont getLabelText setText addDisposeListener DisposeListener widgetDisposed DisposeEvent checkParent
Returns this field editor s label text return the label text public String get Label Text return label Text  getLabelText labelText
Returns the number of basic controls this field editor consists of return the number of controls 
public abstract int get Number Of Controls Returns the name of the preference this field editor operates on return the name of the preference public String get Preference Name return preference Name  getNumberOfControls getPreferenceName preferenceName
Returns the preference page in which this field editor appears return the preference page or code null code if none protected Preference Page get Preference Page return page  PreferencePage getPreferencePage
Returns the preference store used by this field editor return the preference store or code null code if none see set Preference Store public I Preference Store get Preference Store return preference Store  setPreferenceStore IPreferenceStore getPreferenceStore preferenceStore
Initialize the field editor with the given preference name and label param name the name of the preference this field editor works on param text the label text of the field editor protected void init String name String text Assert is Not Null name Assert is Not Null text preference Name name this label Text text  isNotNull isNotNull preferenceName labelText
Returns whether this field editor contains a valid value p The default implementation of this framework method returns code true code Subclasses wishing to perform validation should override both this method and code refresh Valid State code p return code true code if the field value is valid and code false code if invalid see refresh Valid State public boolean is Valid return true  refreshValidState refreshValidState isValid
Initializes this field editor with the preference value from the preference store public void load if preference Store null is Default Presented false do Load refresh Valid State  preferenceStore isDefaultPresented doLoad refreshValidState
Initializes this field editor with the default preference value from the preference store public void load Default if preference Store null is Default Presented true do Load Default refresh Valid State  loadDefault preferenceStore isDefaultPresented doLoadDefault refreshValidState
Returns whether this field editor currently presents the default value for its preference return code true code if the default value is presented and code false code otherwise public boolean presents Default Value return is Default Presented  presentsDefaultValue isDefaultPresented
Refreshes this field editor s valid state after a value change and fires an code IS VALID code property change event if warranted p The default implementation of this framework method does nothing Subclasses wishing to perform validation should override both this method and code is Valid code p see is Valid protected void refresh Valid State  IS_VALID isValid isValid refreshValidState
Sets the focus to this field editor p The default implementation of this framework method does nothing Subclasses may reimplement p public void set Focus do nothing  setFocus
Sets this field editor s label text The label is typically presented to the left of the entry field param text the label text public void set Label Text String text Assert is Not Null text label Text text if label null label set Text text  setLabelText isNotNull labelText setText
Sets the name of the preference this field editor operates on p The ability to change this allows the same field editor object to be reused for different preferences p p For example p pre editor set Preference Name font editor load pre p param name the name of the preference public void set Preference Name String name preference Name name  setPreferenceName setPreferenceName preferenceName
Sets the preference page in which this field editor appears param preference Page the preference page or code null code if none public void set Preference Page Preference Page preference Page page preference Page  preferencePage setPreferencePage PreferencePage preferencePage preferencePage
Sets the preference store used by this field editor param store the preference store or code null code if none see get Preference Store public void set Preference Store I Preference Store store preference Store store  getPreferenceStore setPreferenceStore IPreferenceStore preferenceStore
Sets whether this field editor is presenting the default value param boolean Value code true code if the default value is being presented and code false code otherwise protected void set Presents Default Value boolean boolean Value is Default Presented boolean Value  booleanValue setPresentsDefaultValue booleanValue isDefaultPresented booleanValue
Sets or removes the property change listener for this field editor p Note that field editors can support only a single listener p param listener a property change listener or code null code to remove public void set Property Change Listener I Property Change Listener listener property Change Listener listener  setPropertyChangeListener IPropertyChangeListener propertyChangeListener
Shows the given error message in the page for this field editor if it has one param msg the error message protected void show Error Message String msg if page null page set Error Message msg  showErrorMessage setErrorMessage
Shows the given message in the page for this field editor if it has one param msg the message protected void show Message String msg if page null page set Error Message msg  showMessage setErrorMessage
Stores this field editor s value back into the preference store public void store if preference Store null return if is Default Presented preference Store set To Default preference Name else do Store  preferenceStore isDefaultPresented preferenceStore setToDefault preferenceName doStore
Set the Grid Data on button to be one that is spaced for the current font param button the button the data is being set on protected void set Button Layout Data Button button Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Compute and store a font metric GC gc new GC button gc set Font button get Font Font Metrics font Metrics gc get Font Metrics gc dispose data height Hint org eclipse jface dialogs Dialog convert HorizontalDL Us To Pixels font Metrics I Dialog Constants BUTTON HEIGHT int width Hint org eclipse jface dialogs Dialog convert VerticalDL Us To Pixels font Metrics I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x button set Layout Data data  GridData setButtonLayoutData GridData GridData GridData HORIZONTAL_ALIGN_FILL setFont getFont FontMetrics fontMetrics getFontMetrics heightHint convertHorizontalDLUsToPixels fontMetrics IDialogConstants BUTTON_HEIGHT widthHint convertVerticalDLUsToPixels fontMetrics IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize setLayoutData
Set whether or not the controls in the field editor are enabled param enabled The enabled state param parent The parent of the controls in the group Used to create the controls if required public void set Enabled boolean enabled Composite parent get Label Control parent set Enabled enabled  setEnabled getLabelControl setEnabled

private Composite field Editor Parent Creates a new field editor preference page with the given style an empty title and no image param style either code GRID code or code FLAT code protected Field Editor Preference Page int style super this style style  fieldEditorParent FieldEditorPreferencePage
Creates a new field editor preference page with the given title and style but no image param title the title of this preference page param style either code GRID code or code FLAT code protected Field Editor Preference Page String title int style super title this style style  FieldEditorPreferencePage
Creates a new field editor preference page with the given title image and style param title the title of this preference page param image the image for this preference page or code null code if none param style either code GRID code or code FLAT code protected Field Editor Preference Page String title Image Descriptor image int style super title image this style style  FieldEditorPreferencePage ImageDescriptor
Adds the given field editor to this page param editor the field editor protected void add Field Field Editor editor if fields null fields new Array List fields add editor  addField FieldEditor ArrayList
Adjust the layout of the field editors so that they are properly aligned protected void adjust Grid Layout int num Columns calc Number Of Columns Grid Layout field Editor Parent get Layout num Columns num Columns if fields null for int i 0 i fields size i Field Editor field Editor Field Editor fields get i field Editor adjust For Num Columns num Columns  adjustGridLayout numColumns calcNumberOfColumns GridLayout fieldEditorParent getLayout numColumns numColumns FieldEditor fieldEditor FieldEditor fieldEditor adjustForNumColumns numColumns
Applys the font to the field editors managed by this page protected void apply Font if fields null Iterator e fields iterator while e has Next Field Editor pe Field Editor e next pe apply Font  applyFont hasNext FieldEditor FieldEditor applyFont
Calculates the number of columns needed to host all field editors return the number of columns private int calc Number Of Columns int result 0 if fields null Iterator e fields iterator while e has Next Field Editor pe Field Editor e next result Math max result pe get Number Of Controls return result  calcNumberOfColumns hasNext FieldEditor FieldEditor getNumberOfControls
Recomputes the page s error state by calling code is Valid code for every field editor protected void check State boolean valid true invalid Field Editor null The state can only be set to true if all field editors contain a valid value So we must check them all if fields null int size fields size for int i 0 i size i Field Editor editor Field Editor fields get i valid valid editor is Valid if valid invalid Field Editor editor break set Valid valid  isValid checkState invalidFieldEditor FieldEditor FieldEditor isValid invalidFieldEditor setValid
protected Control create Contents Composite parent field Editor Parent new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 1 layout margin Height 0 layout margin Width 0 field Editor Parent set Layout layout field Editor Parent set Font parent get Font create Field Editors if style GRID adjust Grid Layout initialize check State return field Editor Parent  createContents fieldEditorParent GridLayout GridLayout numColumns marginHeight marginWidth fieldEditorParent setLayout fieldEditorParent setFont getFont createFieldEditors adjustGridLayout checkState fieldEditorParent
Creates the page s field editors p The default implementation of this framework method does nothing Subclass must implement this method to create the field editors p p Subclasses should call code get Field Editor Parent code to obtain the parent control for each field editor This same parent should not be used for more than one editor as the parent may change for each field editor depending on the layout style of the page p  getFieldEditorParent
protected abstract void create Field Editors The field editor preference page implementation of an code I Dialog Page code method disposes of this page s controls and images Subclasses may override to release their own allocated SWT resources but must call code super dispose code public void dispose super dispose if fields null Iterator e fields iterator while e has Next Field Editor pe Field Editor e next pe set Preference Page null pe set Property Change Listener null pe set Preference Store null  createFieldEditors IDialogPage hasNext FieldEditor FieldEditor setPreferencePage setPropertyChangeListener setPreferenceStore
Returns a parent composite for a field editor p This value must not be cached since a new parent may be created each time this method called Thus this method must be called each time a field editor is constructed p return a parent protected Composite get Field Editor Parent if style FLAT Create a new parent for each field editor Composite parent new Composite field Editor Parent SWT NULL parent set Layout Data new Grid Data Grid Data FILL HORIZONTAL return parent else Just return the parent return field Editor Parent  getFieldEditorParent fieldEditorParent setLayoutData GridData GridData FILL_HORIZONTAL fieldEditorParent
Initializes all field editors protected void initialize if fields null Iterator e fields iterator while e has Next Field Editor pe Field Editor e next pe set Preference Page this pe set Property Change Listener this pe set Preference Store get Preference Store pe load  hasNext FieldEditor FieldEditor setPreferencePage setPropertyChangeListener setPreferenceStore getPreferenceStore
The field editor preference page implementation of a code Preference Page code method loads all the field editors with their default values protected void perform Defaults if fields null Iterator e fields iterator while e has Next Field Editor pe Field Editor e next pe load Default Force a recalculation of my error state check State super perform Defaults  PreferencePage performDefaults hasNext FieldEditor FieldEditor loadDefault checkState performDefaults
The field editor preference page implementation of this code Preference Page code method saves all field editors by calling code Field Editor store code Note that this method does not save the preference store itself it just stores the values back into the preference store see Field Editor store public boolean perform Ok if fields null Iterator e fields iterator while e has Next Field Editor pe Field Editor e next pe store return true  PreferencePage FieldEditor FieldEditor performOk hasNext FieldEditor FieldEditor
The field editor preference page implementation of this code I Preference Page code and code I Property Change Listener code method intercepts code IS VALID code events but passes other events on to its superclass public void property Change Property Change Event event if event get Property equals Field Editor IS VALID boolean new Value Boolean event get New Value boolean Value If the new value is true then we must check all field editors If it is false then the page is invalid in any case if new Value check State else invalid Field Editor Field Editor event get Source set Valid new Value  IPreferencePage IPropertyChangeListener IS_VALID propertyChange PropertyChangeEvent getProperty FieldEditor IS_VALID newValue getNewValue booleanValue newValue checkState invalidFieldEditor FieldEditor getSource setValid newValue
public void set Visible boolean visible super set Visible visible if visible invalid Field Editor null invalid Field Editor set Focus  setVisible setVisible invalidFieldEditor invalidFieldEditor setFocus

private boolean enforce Absolute false Creates a new file field editor protected File Field Editor  enforceAbsolute FileFieldEditor
Creates a file field editor param name the name of the preference this field editor works on param label Text the label text of the field editor param parent the parent of the field editor s control public File Field Editor String name String label Text Composite parent this name label Text false parent  labelText FileFieldEditor labelText labelText
Creates a file field editor param name the name of the preference this field editor works on param label Text the label text of the field editor param enforce Absolute code true code if the file path must be absolute and code false code otherwise param parent the parent of the field editor s control public File Field Editor String name String label Text boolean enforce Absolute Composite parent init name label Text this enforce Absolute enforce Absolute set Error Message J Face Resources get String File Field Editor error Message NON NLS 1 set Change Button Text J Face Resources get String open Browse NON NLS 1 set Validate Strategy VALIDATE ON FOCUS LOST create Control parent  labelText enforceAbsolute FileFieldEditor labelText enforceAbsolute labelText enforceAbsolute enforceAbsolute setErrorMessage JFaceResources getString FileFieldEditor errorMessage setChangeButtonText JFaceResources getString openBrowse setValidateStrategy VALIDATE_ON_FOCUS_LOST createControl
protected String change Pressed File f new File get Text Control get Text if f exists f null File d get File f if d null return null return d get Absolute Path  changePressed getTextControl getText getFile getAbsolutePath
protected boolean check State String msg null String path get Text Control get Text if path null path path trim else path NON NLS 1 if path length 0 if is Empty String Allowed msg get Error Message else File file new File path if file is File if enforce Absolute file is Absolute msg J Face Resources get String File Field Editor error Message2 NON NLS 1 else msg get Error Message if msg null error show Error Message msg return false OK clear Error Message return true  checkState getTextControl getText isEmptyStringAllowed getErrorMessage isFile enforceAbsolute isAbsolute JFaceResources getString FileFieldEditor errorMessage2 getErrorMessage showErrorMessage clearErrorMessage
Helper to open the file chooser dialog param starting Directory the directory to open the dialog on return File The File the user selected or code null code if they do not private File get File File starting Directory File Dialog dialog new File Dialog get Shell SWT OPEN if starting Directory null dialog set File Name starting Directory get Path if extensions null dialog set Filter Extensions extensions String file dialog open if file null file file trim if file length 0 return new File file return null  startingDirectory getFile startingDirectory FileDialog FileDialog getShell startingDirectory setFileName startingDirectory getPath setFilterExtensions
Sets this file field editor s file extension filter param extensions a list of file extension or code null code to set the filter to the system s default value public void set File Extensions String extensions this extensions extensions  setFileExtensions

text new Text parent SWT READ ONLY SWT BORDER text add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if font null font dispose  READ_ONLY addDisposeListener DisposeListener widgetDisposed DisposeEvent
Constructor for the previewer param s param parent public Default Previewer String s Composite parent string s text new Text parent SWT READ ONLY SWT BORDER text add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if font null font dispose if string null text set Text string  DefaultPreviewer READ_ONLY addDisposeListener DisposeListener widgetDisposed DisposeEvent setText
return the control the previewer is using public Control get Control return text  getControl
Set the font to display with param font Data public void set Font Font Data font Data if font null font dispose font new Font text get Display font Data text set Font font  fontData setFont FontData fontData getDisplay fontData setFont
return the preferred size of the previewer public int get Preferred Extent return 40  getPreferredExtent
Creates a new font field editor protected Font Field Editor  FontFieldEditor
Creates a font field editor with an optional preview area param name the name of the preference this field editor works on param label Text the label text of the field editor param preview Area Text the text used for the preview window If it is code null code there will be no preview area param parent the parent of the field editor s control public Font Field Editor String name String label Text String preview Area Text Composite parent init name label Text preview Text preview Area Text change Button Text J Face Resources get String open Change NON NLS 1 create Control parent  labelText previewAreaText FontFieldEditor labelText previewAreaText labelText previewText previewAreaText changeButtonText JFaceResources getString openChange createControl
Creates a font field editor without a preview param name the name of the preference this field editor works on param label Text the label text of the field editor param parent the parent of the field editor s control public Font Field Editor String name String label Text Composite parent this name label Text null parent  labelText FontFieldEditor labelText labelText
protected void adjust For Num Columns int num Columns Grid Data data new Grid Data if value Control get Layout Data null data Grid Data value Control get Layout Data data horizontal Span num Columns get Number Of Controls 1 value Control set Layout Data data  adjustForNumColumns numColumns GridData GridData valueControl getLayoutData GridData valueControl getLayoutData horizontalSpan numColumns getNumberOfControls valueControl setLayoutData
Method declared on Field Editor protected void apply Font if chosen Font null previewer null previewer set Font chosen Font  FieldEditor applyFont chosenFont setFont chosenFont
protected void do Fill Into Grid Composite parent int num Columns get Label Control parent value Control get Value Control parent Grid Data gd new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL gd horizontal Span num Columns get Number Of Controls 1 value Control set Layout Data gd if preview Text null previewer new Default Previewer preview Text parent gd new Grid Data Grid Data FILL HORIZONTAL gd height Hint previewer get Preferred Extent gd width Hint previewer get Preferred Extent previewer get Control set Layout Data gd change Font Button get Change Control parent gd new Grid Data gd height Hint convert VerticalDL Us To Pixels change Font Button I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels change Font Button I Dialog Constants BUTTON WIDTH gd width Hint Math max width Hint change Font Button compute Size SWT DEFAULT SWT DEFAULT true x change Font Button set Layout Data gd  doFillIntoGrid numColumns getLabelControl valueControl getValueControl GridData GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL horizontalSpan numColumns getNumberOfControls valueControl setLayoutData previewText DefaultPreviewer previewText GridData GridData FILL_HORIZONTAL heightHint getPreferredExtent widthHint getPreferredExtent getControl setLayoutData changeFontButton getChangeControl GridData heightHint convertVerticalDLUsToPixels changeFontButton IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels changeFontButton IDialogConstants BUTTON_WIDTH widthHint widthHint changeFontButton computeSize changeFontButton setLayoutData
protected void do Load if change Font Button null return update Font Preference Converter get Font Data Array get Preference Store get Preference Name  doLoad changeFontButton updateFont PreferenceConverter getFontDataArray getPreferenceStore getPreferenceName
protected void do Load Default if change Font Button null return update Font Preference Converter get Default Font Data Array get Preference Store get Preference Name  doLoadDefault changeFontButton updateFont PreferenceConverter getDefaultFontDataArray getPreferenceStore getPreferenceName
protected void do Store if chosen Font null Preference Converter set Value get Preference Store get Preference Name chosen Font  doStore chosenFont PreferenceConverter setValue getPreferenceStore getPreferenceName chosenFont
change Font Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event Font Dialog font Dialog new Font Dialog change Font Button get Shell if chosen Font null font Dialog set Font List chosen Font Font Data font font Dialog open if font null Font Data old Font chosen Font if old Font null old Font J Face Resources get Default Font get Font Data set Presents Default Value false Font Data new Data new Font Data 1 new Data 0 font update Font new Data fire Value Changed VALUE old Font 0 font  changeFontButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent FontDialog fontDialog FontDialog changeFontButton getShell chosenFont fontDialog setFontList chosenFont FontData fontDialog FontData oldFont chosenFont oldFont oldFont JFaceResources getDefaultFont getFontData setPresentsDefaultValue FontData newData FontData newData updateFont newData fireValueChanged oldFont
change Font Button add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event change Font Button null  changeFontButton addDisposeListener DisposeListener widgetDisposed DisposeEvent changeFontButton
Returns the change button for this field editor param parent The Composite to create the button in if required return the change button protected Button get Change Control Composite parent if change Font Button null change Font Button new Button parent SWT PUSH if change Button Text null change Font Button set Text change Button Text change Font Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event Font Dialog font Dialog new Font Dialog change Font Button get Shell if chosen Font null font Dialog set Font List chosen Font Font Data font font Dialog open if font null Font Data old Font chosen Font if old Font null old Font J Face Resources get Default Font get Font Data set Presents Default Value false Font Data new Data new Font Data 1 new Data 0 font update Font new Data fire Value Changed VALUE old Font 0 font change Font Button add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event change Font Button null change Font Button set Font parent get Font set Button Layout Data change Font Button else check Parent change Font Button parent return change Font Button  getChangeControl changeFontButton changeFontButton changeButtonText changeFontButton setText changeButtonText changeFontButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent FontDialog fontDialog FontDialog changeFontButton getShell chosenFont fontDialog setFontList chosenFont FontData fontDialog FontData oldFont chosenFont oldFont oldFont JFaceResources getDefaultFont getFontData setPresentsDefaultValue FontData newData FontData newData updateFont newData fireValueChanged oldFont changeFontButton addDisposeListener DisposeListener widgetDisposed DisposeEvent changeFontButton changeFontButton setFont getFont setButtonLayoutData changeFontButton checkParent changeFontButton changeFontButton
public int get Number Of Controls if previewer null return 3 else return 4  getNumberOfControls
Returns the preferred preview height return the height or code 1 code if no previewer is installed public int get Preferred Preview Height if previewer null return 1 return previewer get Preferred Extent  getPreferredPreviewHeight getPreferredExtent
Returns the preview control for this field editor return the preview control public Control get Preview Control if previewer null return null return previewer get Control  getPreviewControl getControl
value Control set Font parent get Font value Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event value Control null  valueControl setFont getFont valueControl addDisposeListener DisposeListener widgetDisposed DisposeEvent valueControl
Returns the value control for this field editor The value control displays the currently selected font name param parent The Composite to create the viewer in if required return the value control protected Label get Value Control Composite parent if value Control null value Control new Label parent SWT LEFT value Control set Font parent get Font value Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event value Control null else check Parent value Control parent return value Control  getValueControl valueControl valueControl valueControl setFont getFont valueControl addDisposeListener DisposeListener widgetDisposed DisposeEvent valueControl checkParent valueControl valueControl
Sets the text of the change button param text the new text public void set Change Button Text String text Assert is Not Null text change Button Text text if change Font Button null change Font Button set Text text  setChangeButtonText isNotNull changeButtonText changeFontButton changeFontButton setText
Updates the change font button and the previewer to reflect the newly selected font param font The Font Data to update with private void update Font Font Data font Font Data best Font J Face Resources get Font Registry best Data Array font value Control get Display if we have nothing valid do as best we can if best Font null best Font get Default Font Data Now cache this value in the receiver this chosen Font best Font if value Control null value Control set Text String Converter as String chosen Font 0 if previewer null previewer set Font best Font  FontData updateFont FontData FontData bestFont JFaceResources getFontRegistry bestDataArray valueControl getDisplay bestFont bestFont getDefaultFontData chosenFont bestFont valueControl valueControl setText StringConverter asString chosenFont setFont bestFont
Store the default preference for the field being edited protected void set To Default Font Data default Font Data Preference Converter get Default Font Data Array get Preference Store get Preference Name Preference Converter set Value get Preference Store get Preference Name default Font Data  setToDefault FontData defaultFontData PreferenceConverter getDefaultFontDataArray getPreferenceStore getPreferenceName PreferenceConverter setValue getPreferenceStore getPreferenceName defaultFontData
Get the system default font data return Font Data private Font Data get Default Font Data return value Control get Display get System Font get Font Data  FontData FontData getDefaultFontData valueControl getDisplay getSystemFont getFontData
public void set Enabled boolean enabled Composite parent super set Enabled enabled parent get Change Control parent set Enabled enabled get Value Control parent set Enabled enabled  setEnabled setEnabled getChangeControl setEnabled getValueControl setEnabled

private static final int DEFAULT TEXT LIMIT 10 Creates a new integer field editor protected Integer Field Editor  DEFAULT_TEXT_LIMIT IntegerFieldEditor
Creates an integer field editor param name the name of the preference this field editor works on param label Text the label text of the field editor param parent the parent of the field editor s control public Integer Field Editor String name String label Text Composite parent this name label Text parent DEFAULT TEXT LIMIT  labelText IntegerFieldEditor labelText labelText DEFAULT_TEXT_LIMIT
Creates an integer field editor param name the name of the preference this field editor works on param label Text the label text of the field editor param parent the parent of the field editor s control param text Limit the maximum number of characters in the text public Integer Field Editor String name String label Text Composite parent int text Limit init name label Text set Text Limit text Limit set Empty String Allowed false set Error Message J Face Resources get String Integer Field Editor error Message NON NLS 1 create Control parent  labelText textLimit IntegerFieldEditor labelText textLimit labelText setTextLimit textLimit setEmptyStringAllowed setErrorMessage JFaceResources getString IntegerFieldEditor errorMessage createControl
Sets the range of valid values for this field param min the minimum allowed value inclusive param max the maximum allowed value inclusive public void set Valid Range int min int max min Valid Value min max Valid Value max  setValidRange minValidValue maxValidValue
protected boolean check State Text text get Text Control if text null return false String number String text get Text try int number Integer value Of number String int Value if number min Valid Value number max Valid Value clear Error Message return true else show Error Message return false catch Number Format Exception e1 show Error Message return false  checkState getTextControl numberString getText valueOf numberString intValue minValidValue maxValidValue clearErrorMessage showErrorMessage NumberFormatException showErrorMessage
protected void do Load Text text get Text Control if text null int value get Preference Store get Int get Preference Name text set Text value NON NLS 1  doLoad getTextControl getPreferenceStore getInt getPreferenceName setText
protected void do Load Default Text text get Text Control if text null int value get Preference Store get Default Int get Preference Name text set Text value NON NLS 1 value Changed  doLoadDefault getTextControl getPreferenceStore getDefaultInt getPreferenceName setText valueChanged
protected void do Store Text text get Text Control if text null Integer i new Integer text get Text get Preference Store set Value get Preference Name i int Value  doStore getTextControl getText getPreferenceStore setValue getPreferenceName intValue
Returns this field editor s current value as an integer return the value exception Number Format Exception if the code String code does not contain a parsable integer public int get Int Value throws Number Format Exception return new Integer get String Value int Value  NumberFormatException getIntValue NumberFormatException getStringValue intValue

Saves the non default valued preferences known to this preference store to the file from which they were originally loaded exception java io IO Exception if there is a problem saving this store  IOException

public interface I Preference Node Adds the given preference node as a subnode of this preference node param node the node to add  IPreferenceNode
public void add I Preference Node node Creates the preference page for this node public void create Page  IPreferenceNode createPage
public void create Page Release the page managed by this node and any SWT resources held onto by this node Images Fonts etc Note that nodes are reused so this is not a call to dispose the node itself  createPage
public void dispose Resources Returns the subnode of this contribution node with the given node id param id the preference node id return the subnode or code null code if none  disposeResources
public I Preference Node find Sub Node String id Returns the id of this contribution node This id identifies a contribution node relative to its parent return the node id  IPreferenceNode findSubNode
public String get Id Returns the image used to present this node in a preference dialog return the image for this node or code null code if there is no image for this node  getId
public Image get Label Image Returns the text label used to present this node in a preference dialog return the text label for this node or code null code if there is no label for this node  getLabelImage
public String get Label Text Returns the preference page for this node return the preference page  getLabelText
public I Preference Page get Page Returns an iterator over the subnodes immediate children of this contribution node return an I Preference Node array containing the child nodes  IPreferencePage getPage IPreferenceNode
public I Preference Node get Sub Nodes Removes the subnode of this preference node with the given node id param id the subnode id return the removed subnode or code null code if none  IPreferenceNode getSubNodes
public I Preference Node remove String id Removes the given preference node from the list of subnodes immediate children of this node param node the node to remove return code true code if the node was removed and code false code otherwise  IPreferenceNode

Computes a size for this page s UI component 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 Returns whether this dialog page is in a valid state return code true code if the page is in a valid state and code false code if invalid  computeSize
public boolean is Valid Checks whether it is alright to leave this page return code false code to abort page flipping and the have the current page remain visible and code true code to allow the page flip  isValid
public boolean ok To Leave Notifies that the container of this preference page has been canceled return code false code to abort the container s cancel procedure and code true code to allow the cancel to happen  okToLeave
public boolean perform Cancel Notifies that the OK button of this page s container has been pressed return code false code to abort the container s OK processing and code true code to allow the OK to happen  performCancel
public boolean perform Ok Sets or clears the container of this page param preference Page Container the preference page container or code null code  performOk preferencePageContainer
public void set Container I Preference Page Container preference Page Container Sets the size of this page s UI component param size the size of the preference page encoded as code new Point width height code  setContainer IPreferencePageContainer preferencePageContainer

public interface I Preference Page Container Returns the preference store return the preference store or code null code if none  IPreferencePageContainer
public I Preference Store get Preference Store Adjusts the enable state of the OK button to reflect the state of the currently active page in this container p This method is called by the container itself when its preference page changes and may be called by the page at other times to force a button state update p  IPreferenceStore getPreferenceStore
public void update Buttons Updates the message or error message shown in the message line to reflect the state of the currently active page in this container p This method is called by the container itself when its preference page changes and may be called by the page at other times to force a message update p  updateButtons
public void update Message Updates the title to reflect the state of the currently active page in this container p This method is called by the container itself when its page changes and may be called by the page at other times to force a title update p  updateMessage

public static final String FALSE false NON NLS 1 Adds a property change listener to this preference store param listener a property change listener 
public void add Property Change Listener I Property Change Listener listener Returns whether the named preference is known to this preference store param name the name of the preference return code true code if either a current value or a default value is known for the named preference and code false code otherwise  addPropertyChangeListener IPropertyChangeListener
public boolean contains String name Fires a property change event corresponding to a change to the current value of the preference with the given name p This method is provided on this interface to simplify the implementation of decorators There is normally no need to call this method since code set Value code and code set To Default code report such events in due course Implementations should funnel all preference changes through this method p param name the name of the preference to be used as the property in the event object param old Value the old value param new Value the new value  setValue setToDefault oldValue newValue
public void fire Property Change Event String name Object old Value Object new Value Returns the current value of the boolean valued preference with the given name Returns the default default value code false code if there is no preference with the given name or if the current value cannot be treated as a boolean param name the name of the preference return the boolean valued preference  firePropertyChangeEvent oldValue newValue
public boolean get Boolean String name Returns the default value for the boolean valued preference with the given name Returns the default default value code false code if there is no default preference with the given name or if the default value cannot be treated as a boolean param name the name of the preference return the default value of the named preference  getBoolean
public boolean get Default Boolean String name Returns the default value for the double valued preference with the given name Returns the default default value code 0 0 code if there is no default preference with the given name or if the default value cannot be treated as a double param name the name of the preference return the default value of the named preference  getDefaultBoolean
public double get Default Double String name Returns the default value for the float valued preference with the given name Returns the default default value code 0 0f code if there is no default preference with the given name or if the default value cannot be treated as a float param name the name of the preference return the default value of the named preference  getDefaultDouble
public float get Default Float String name Returns the default value for the integer valued preference with the given name Returns the default default value code 0 code if there is no default preference with the given name or if the default value cannot be treated as an integer param name the name of the preference return the default value of the named preference  getDefaultFloat
public int get Default Int String name Returns the default value for the long valued preference with the given name Returns the default default value code 0L code if there is no default preference with the given name or if the default value cannot be treated as a long param name the name of the preference return the default value of the named preference  getDefaultInt
public long get Default Long String name Returns the default value for the string valued preference with the given name Returns the default default value the empty string code code is no default preference with the given name or if the default value cannot be treated as a string param name the name of the preference return the default value of the named preference  getDefaultLong
public String get Default String String name Returns the current value of the double valued preference with the given name Returns the default default value code 0 0 code if there is no preference with the given name or if the current value cannot be treated as a double param name the name of the preference return the double valued preference  getDefaultString
public double get Double String name Returns the current value of the float valued preference with the given name Returns the default default value code 0 0f code if there is no preference with the given name or if the current value cannot be treated as a float param name the name of the preference return the float valued preference  getDouble
public float get Float String name Returns the current value of the integer valued preference with the given name Returns the default default value code 0 code if there is no preference with the given name or if the current value cannot be treated as an integter param name the name of the preference return the int valued preference  getFloat
public int get Int String name Returns the current value of the long valued preference with the given name Returns the default default value code 0L code if there is no preference with the given name or if the current value cannot be treated as a long param name the name of the preference return the long valued preference  getInt
public long get Long String name Returns the current value of the string valued preference with the given name Returns the default default value the empty string code code if there is no preference with the given name or if the current value cannot be treated as a string param name the name of the preference return the string valued preference  getLong
public String get String String name Returns whether the current value of the preference with the given name has the default value param name the name of the preference return code true code if the preference has a known default value and its current value is the same and code false code otherwise including the case where the preference is unknown to this store  getString
public boolean is Default String name Returns whether the current values in this property store require saving return code true code if at least one of the preferences known to this store has a current value different from its default value and code false code otherwise  isDefault
public boolean needs Saving Sets the current value of the preference with the given name to the given string value p This method is provided on this interface to simplify the implementation of decorators and does not report a property change event Normal clients should instead call code set Value code p param name the name of the preference param value the new current value of the preference  needsSaving setValue
public void put Value String name String value Removes the given listener from this preference store Has no affect if the listener is not registered param listener a property change listener  putValue
public void remove Property Change Listener I Property Change Listener listener Sets the default value for the double valued preference with the given name p Note that the current value of the preference is affected if the preference s current value was its old default value in which case it changes to the new default value If the preference 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 preference param value the new default value for the preference  removePropertyChangeListener IPropertyChangeListener
public void set Default String name double value Sets the default value for the float valued preference with the given name p Note that the current value of the preference is affected if the preference s current value was its old default value in which case it changes to the new default value If the preference 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 preference param value the new default value for the preference  setDefault
public void set Default String name float value Sets the default value for the integer valued preference with the given name p Note that the current value of the preference is affected if the preference s current value was its old default value in which case it changes to the new default value If the preference 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 preference param value the new default value for the preference  setDefault
public void set Default String name int value Sets the default value for the long valued preference with the given name p Note that the current value of the preference is affected if the preference s current value was its old default value in which case it changes to the new default value If the preference 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 preference param value the new default value for the preference  setDefault
public void set Default String name long value Sets the default value for the string valued preference with the given name p Note that the current value of the preference is affected if the preference s current value was its old default value in which case it changes to the new default value If the preference 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 preference param default Object the new default value for the preference  setDefault defaultObject
public void set Default String name String default Object Sets the default value for the boolean valued preference with the given name p Note that the current value of the preference is affected if the preference s current value was its old default value in which case it changes to the new default value If the preference 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 preference param value the new default value for the preference  setDefault defaultObject
public void set Default String name boolean value Sets the current value of the preference with the given name back to its default value p Note that the preferred way of re initializing a preference to the appropriate default value is to call code set To Default code This is implemented by removing the named value from the store thereby exposing the default value p param name the name of the preference  setDefault setToDefault
public void set To Default String name Sets the current value of the double valued preference with the given name p A property change event is reported if the current value of the preference actually changes from its previous value In the event object the property name is the name of the preference and the old and new values are wrapped as objects p p Note that the preferred way of re initializing a preference to its default value is to call code set To Default code p param name the name of the preference param value the new current value of the preference  setToDefault setToDefault
public void set Value String name double value Sets the current value of the float valued preference with the given name p A property change event is reported if the current value of the preference actually changes from its previous value In the event object the property name is the name of the preference and the old and new values are wrapped as objects p p Note that the preferred way of re initializing a preference to its default value is to call code set To Default code p param name the name of the preference param value the new current value of the preference  setValue setToDefault
public void set Value String name float value Sets the current value of the integer valued preference with the given name p A property change event is reported if the current value of the preference actually changes from its previous value In the event object the property name is the name of the preference and the old and new values are wrapped as objects p p Note that the preferred way of re initializing a preference to its default value is to call code set To Default code p param name the name of the preference param value the new current value of the preference  setValue setToDefault
public void set Value String name int value Sets the current value of the long valued preference with the given name p A property change event is reported if the current value of the preference actually changes from its previous value In the event object the property name is the name of the preference and the old and new values are wrapped as objects p p Note that the preferred way of re initializing a preference to its default value is to call code set To Default code p param name the name of the preference param value the new current value of the preference  setValue setToDefault
public void set Value String name long value Sets the current value of the string valued preference with the given name p A property change event is reported if the current value of the preference actually changes from its previous value In the event object the property name is the name of the preference and the old and new values are wrapped as objects p p Note that the preferred way of re initializing a preference to its default value is to call code set To Default code p param name the name of the preference param value the new current value of the preference  setValue setToDefault
public void set Value String name String value Sets the current value of the boolean valued preference with the given name p A property change event is reported if the current value of the preference actually changes from its previous value In the event object the property name is the name of the preference and the old and new values are wrapped as objects p p Note that the preferred way of re initializing a preference to its default value is to call code set To Default code p param name the name of the preference param value the new current value of the preference  setValue setToDefault

private static I Preference Store preference Store Prevent construction private J Face Preferences  IPreferenceStore preferenceStore JFacePreferences
Return the preference store for the receiver return I Preference Store or null public static I Preference Store get Preference Store return preference Store  IPreferenceStore IPreferenceStore getPreferenceStore preferenceStore
Set the preference store for the receiver param store I Preference Store public static void set Preference Store I Preference Store store preference Store store  IPreferenceStore setPreferenceStore IPreferenceStore preferenceStore

private Selection Listener selection Listener Creates a new list field editor protected List Editor  SelectionListener selectionListener ListEditor
Creates a list field editor param name the name of the preference this field editor works on param label Text the label text of the field editor param parent the parent of the field editor s control protected List Editor String name String label Text Composite parent init name label Text create Control parent  labelText ListEditor labelText labelText createControl
Notifies that the Add button has been pressed private void add Pressed set Presents Default Value false String input get New Input Object if input null int index list get Selection Index if index 0 list add input index 1 else list add input 0 selection Changed  addPressed setPresentsDefaultValue getNewInputObject getSelectionIndex selectionChanged
protected void adjust For Num Columns int num Columns Control control get Label Control Grid Data control get Layout Data horizontal Span num Columns Grid Data list get Layout Data horizontal Span num Columns 1  adjustForNumColumns numColumns getLabelControl GridData getLayoutData horizontalSpan numColumns GridData getLayoutData horizontalSpan numColumns
Creates the Add Remove Up and Down button in the given button box param box the box for the buttons private void create Buttons Composite box add Button create Push Button box List Editor add NON NLS 1 remove Button create Push Button box List Editor remove NON NLS 1 up Button create Push Button box List Editor up NON NLS 1 down Button create Push Button box List Editor down NON NLS 1  createButtons addButton createPushButton ListEditor removeButton createPushButton ListEditor upButton createPushButton ListEditor downButton createPushButton ListEditor
Combines the given list of items into a single string This method is the converse of code parse String code p Subclasses must implement this method p param items the list of items return the combined string see parse String  parseString parseString
protected abstract String create List String items Helper method to create a push button param parent the parent control param key the resource name used to supply the button s label text return Button private Button create Push Button Composite parent String key Button button new Button parent SWT PUSH button set Text J Face Resources get String key button set Font parent get Font Grid Data data new Grid Data Grid Data FILL HORIZONTAL data height Hint convert VerticalDL Us To Pixels button I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels button I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x button set Layout Data data button add Selection Listener get Selection Listener return button  createList createPushButton setText JFaceResources getString setFont getFont GridData GridData GridData FILL_HORIZONTAL heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize setLayoutData addSelectionListener getSelectionListener
selection Listener new Selection Adapter public void widget Selected Selection Event event Widget widget event widget if widget add Button add Pressed else if widget remove Button remove Pressed else if widget up Button up Pressed else if widget down Button down Pressed else if widget list selection Changed  selectionListener SelectionAdapter widgetSelected SelectionEvent addButton addPressed removeButton removePressed upButton upPressed downButton downPressed selectionChanged
Creates a selection listener public void create Selection Listener selection Listener new Selection Adapter public void widget Selected Selection Event event Widget widget event widget if widget add Button add Pressed else if widget remove Button remove Pressed else if widget up Button up Pressed else if widget down Button down Pressed else if widget list selection Changed  createSelectionListener selectionListener SelectionAdapter widgetSelected SelectionEvent addButton addPressed removeButton removePressed upButton upPressed downButton downPressed selectionChanged
protected void do Fill Into Grid Composite parent int num Columns Control control get Label Control parent Grid Data gd new Grid Data gd horizontal Span num Columns control set Layout Data gd list get List Control parent gd new Grid Data Grid Data FILL HORIZONTAL gd vertical Alignment Grid Data FILL gd horizontal Span num Columns 1 gd grab Excess Horizontal Space true list set Layout Data gd button Box get Button Box Control parent gd new Grid Data gd vertical Alignment Grid Data BEGINNING button Box set Layout Data gd  doFillIntoGrid numColumns getLabelControl GridData GridData horizontalSpan numColumns setLayoutData getListControl GridData GridData FILL_HORIZONTAL verticalAlignment GridData horizontalSpan numColumns grabExcessHorizontalSpace setLayoutData buttonBox getButtonBoxControl GridData verticalAlignment GridData buttonBox setLayoutData
protected void do Load if list null String s get Preference Store get String get Preference Name String array parse String s for int i 0 i array length i list add array i  doLoad getPreferenceStore getString getPreferenceName parseString
protected void do Load Default if list null list remove All String s get Preference Store get Default String get Preference Name String array parse String s for int i 0 i array length i list add array i  doLoadDefault removeAll getPreferenceStore getDefaultString getPreferenceName parseString
protected void do Store String s create List list get Items if s null get Preference Store set Value get Preference Name s  doStore createList getItems getPreferenceStore setValue getPreferenceName
Notifies that the Down button has been pressed private void down Pressed swap false  downPressed
button Box add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event add Button null remove Button null up Button null down Button null button Box null  buttonBox addDisposeListener DisposeListener widgetDisposed DisposeEvent addButton removeButton upButton downButton buttonBox
Returns this field editor s button box containing the Add Remove Up and Down button param parent the parent control return the button box public Composite get Button Box Control Composite parent if button Box null button Box new Composite parent SWT NULL Grid Layout layout new Grid Layout layout margin Width 0 button Box set Layout layout create Buttons button Box button Box add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event add Button null remove Button null up Button null down Button null button Box null else check Parent button Box parent selection Changed return button Box  getButtonBoxControl buttonBox buttonBox GridLayout GridLayout marginWidth buttonBox setLayout createButtons buttonBox buttonBox addDisposeListener DisposeListener widgetDisposed DisposeEvent addButton removeButton upButton downButton buttonBox checkParent buttonBox selectionChanged buttonBox
list add Selection Listener get Selection Listener list add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event list null  addSelectionListener getSelectionListener addDisposeListener DisposeListener widgetDisposed DisposeEvent
Returns this field editor s list control param parent the parent control return the list control public List get List Control Composite parent if list null list new List parent SWT BORDER SWT SINGLE SWT V SCROLL SWT H SCROLL list set Font parent get Font list add Selection Listener get Selection Listener list add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event list null else check Parent list parent return list  getListControl V_SCROLL H_SCROLL setFont getFont addSelectionListener getSelectionListener addDisposeListener DisposeListener widgetDisposed DisposeEvent checkParent
Creates and returns a new item for the list p Subclasses must implement this method p return a new item 
Method declared on Field Editor public int get Number Of Controls return 2  FieldEditor getNumberOfControls
Returns this field editor s selection listener The listener is created if nessessary return the selection listener private Selection Listener get Selection Listener if selection Listener null create Selection Listener return selection Listener  SelectionListener getSelectionListener selectionListener createSelectionListener selectionListener
Returns this field editor s shell p This method is internal to the framework subclassers should not call this method p return the shell protected Shell get Shell if add Button null return null return add Button get Shell  getShell addButton addButton getShell
Splits the given string into a list of strings This method is the converse of code create List code p Subclasses must implement this method p param string List the string return an array of code String code see create List  createList stringList createList
protected abstract String parse String String string List Notifies that the Remove button has been pressed private void remove Pressed set Presents Default Value false int index list get Selection Index if index 0 list remove index selection Changed  parseString stringList removePressed setPresentsDefaultValue getSelectionIndex selectionChanged
Notifies that the list selection has changed private void selection Changed int index list get Selection Index int size list get Item Count remove Button set Enabled index 0 up Button set Enabled size 1 index 0 down Button set Enabled size 1 index 0 index size 1  selectionChanged getSelectionIndex getItemCount removeButton setEnabled upButton setEnabled downButton setEnabled
public void set Focus if list null list set Focus  setFocus setFocus
Moves the currently selected item up or down param up code true code if the item should move up and code false code if it should move down private void swap boolean up set Presents Default Value false int index list get Selection Index int target up index 1 index 1 if index 0 String selection list get Selection Assert is True selection length 1 list remove index list add selection 0 target list set Selection target selection Changed  setPresentsDefaultValue getSelectionIndex getSelection isTrue setSelection selectionChanged
Notifies that the Up button has been pressed private void up Pressed swap true  upPressed
public void set Enabled boolean enabled Composite parent super set Enabled enabled parent get List Control parent set Enabled enabled add Button set Enabled enabled remove Button set Enabled enabled up Button set Enabled enabled down Button set Enabled enabled  setEnabled setEnabled getListControl setEnabled addButton setEnabled removeButton setEnabled upButton setEnabled downButton setEnabled

private String dir Chooser Label Text Creates a new path field editor protected Path Editor  dirChooserLabelText PathEditor
Creates a path field editor param name the name of the preference this field editor works on param label Text the label text of the field editor param dir Chooser Label Text the label text displayed for the directory chooser param parent the parent of the field editor s control public Path Editor String name String label Text String dir Chooser Label Text Composite parent init name label Text this dir Chooser Label Text dir Chooser Label Text create Control parent  labelText dirChooserLabelText PathEditor labelText dirChooserLabelText labelText dirChooserLabelText dirChooserLabelText createControl
protected String create List String items String Buffer path new String Buffer NON NLS 1 for int i 0 i items length i path append items i path append File path Separator return path to String  createList StringBuffer StringBuffer pathSeparator toString
protected String get New Input Object Directory Dialog dialog new Directory Dialog get Shell if dir Chooser Label Text null dialog set Message dir Chooser Label Text if last Path null if new File last Path exists dialog set Filter Path last Path String dir dialog open if dir null dir dir trim if dir length 0 return null last Path dir return dir  getNewInputObject DirectoryDialog DirectoryDialog getShell dirChooserLabelText setMessage dirChooserLabelText lastPath lastPath setFilterPath lastPath lastPath
protected String parse String String string List String Tokenizer st new String Tokenizer string List File path Separator n r NON NLS 1 Array List v new Array List while st has More Elements v add st next Element return String v to Array new String v size  parseString stringList StringTokenizer StringTokenizer stringList pathSeparator ArrayList ArrayList hasMoreElements nextElement toArray

see org eclipse jface viewers I Content Provider dispose public void dispose manager null  IContentProvider
Find the parent of the provided node Will search recursivly through the preference tree param parent the possible parent node param target the target child node return the parent node of the child node private I Preference Node find Parent I Preference Node parent I Preference Node target if parent get Id equals target get Id return null I Preference Node found parent find Sub Node target get Id if found null return parent I Preference Node children parent get Sub Nodes for int i 0 i children length i found find Parent children i target if found null return found return null  IPreferenceNode findParent IPreferenceNode IPreferenceNode getId getId IPreferenceNode findSubNode getId IPreferenceNode getSubNodes findParent
see org eclipse jface viewers I Tree Content Provider get Children java lang Object public Object get Children Object parent Element must be an instance of code I Preference Node code return I Preference Node parent Element get Sub Nodes  ITreeContentProvider getChildren getChildren parentElement IPreferenceNode IPreferenceNode parentElement getSubNodes
see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element must be an instance of code Preference Manager code return get Children Preference Manager input Element get Root  IStructuredContentProvider getElements getElements inputElement PreferenceManager getChildren PreferenceManager inputElement getRoot
public Object get Parent Object element must be an instance of code I Preference Node code I Preference Node target Node I Preference Node element I Preference Node root manager get Root return find Parent root target Node  getParent IPreferenceNode IPreferenceNode targetNode IPreferenceNode IPreferenceNode getRoot findParent targetNode
see org eclipse jface viewers I Tree Content Provider has Children java lang Object public boolean has Children Object element return get Children element length 0  ITreeContentProvider hasChildren hasChildren getChildren
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input manager Preference Manager new Input  IContentProvider inputChanged inputChanged oldInput newInput PreferenceManager newInput

private constructor to prevent instantiation private Preference Converter no op  PreferenceConverter
Helper method to construct a color from the given string param value the indentifier for the color return RGB private static RGB basic Get Color String value if I Preference Store STRING DEFAULT DEFAULT equals value return COLOR DEFAULT DEFAULT RGB color String Converter asRGB value null if color null return COLOR DEFAULT DEFAULT return color  basicGetColor IPreferenceStore STRING_DEFAULT_DEFAULT COLOR_DEFAULT_DEFAULT StringConverter COLOR_DEFAULT_DEFAULT
Helper method to construct a code Font Data code from the given string String is in the form Font Data Font Data in order that multiple Font Datas can be defined param value the identifier for the font return Font Data since 3 0 public static Font Data basic Get Font Data String value if I Preference Store STRING DEFAULT DEFAULT equals value return FONTDATA ARRAY DEFAULT DEFAULT Read in all of them to get the value String Tokenizer tokenizer new String Tokenizer value ENTRY SEPARATOR int num Tokens tokenizer count Tokens Font Data font Data new Font Data num Tokens for int i 0 i num Tokens i try font Data i new Font Data tokenizer next Token catch SWT Exception error return FONTDATA ARRAY DEFAULT DEFAULT catch Illegal Argument Exception error return FONTDATA ARRAY DEFAULT DEFAULT return font Data  FontData FontData FontData FontDatas FontData FontData basicGetFontData IPreferenceStore STRING_DEFAULT_DEFAULT FONTDATA_ARRAY_DEFAULT_DEFAULT StringTokenizer StringTokenizer ENTRY_SEPARATOR numTokens countTokens FontData fontData FontData numTokens numTokens fontData FontData nextToken SWTException FONTDATA_ARRAY_DEFAULT_DEFAULT IllegalArgumentException FONTDATA_ARRAY_DEFAULT_DEFAULT fontData
Reads the supplied string and returns its corresponding Font Data If it cannot be read then the default Font Data will be returned param font Data Value the string value for the font data return the font data public static Font Data read Font Data String font Data Value return basic Get Font Data font Data Value  FontData FontData fontDataValue FontData readFontData fontDataValue basicGetFontData fontDataValue
Helper method to construct a point from the given string param value return Point private static Point basic Get Point String value Point dp new Point POINT DEFAULT DEFAULT x POINT DEFAULT DEFAULT y if I Preference Store STRING DEFAULT DEFAULT equals value return dp return String Converter as Point value dp  basicGetPoint POINT_DEFAULT_DEFAULT POINT_DEFAULT_DEFAULT IPreferenceStore STRING_DEFAULT_DEFAULT StringConverter asPoint
Helper method to construct a rectangle from the given string param value return Rectangle private static Rectangle basic Get Rectangle String value We can t just return RECTANGLE DEFAULT DEFAULT because a rectangle object doesn t have value semantik Rectangle dr new Rectangle RECTANGLE DEFAULT DEFAULT x RECTANGLE DEFAULT DEFAULT y RECTANGLE DEFAULT DEFAULT width RECTANGLE DEFAULT DEFAULT height if I Preference Store STRING DEFAULT DEFAULT equals value return dr return String Converter as Rectangle value dr  basicGetRectangle RECTANGLE_DEFAULT_DEFAULT RECTANGLE_DEFAULT_DEFAULT RECTANGLE_DEFAULT_DEFAULT RECTANGLE_DEFAULT_DEFAULT RECTANGLE_DEFAULT_DEFAULT IPreferenceStore STRING_DEFAULT_DEFAULT StringConverter asRectangle
Returns the current value of the color valued preference with the given name in the given preference store Returns the default default value code COLOR DEFAULT DEFAULT code if there is no preference with the given name or if the current value cannot be treated as a color param store the preference store param name the name of the preference return the color valued preference public static RGB get Color I Preference Store store String name return basic Get Color store get String name  COLOR_DEFAULT_DEFAULT getColor IPreferenceStore basicGetColor getString
Returns the default value for the color valued preference with the given name in the given preference store Returns the default default value code COLOR DEFAULT DEFAULT code is no default preference with the given name or if the default value cannot be treated as a color param store the preference store param name the name of the preference return the default value of the preference public static RGB get Default Color I Preference Store store String name return basic Get Color store get Default String name  COLOR_DEFAULT_DEFAULT getDefaultColor IPreferenceStore basicGetColor getDefaultString
Returns the default value array for the font valued preference with the given name in the given preference store Returns the default default value code FONTDATA ARRAY DEFAULT DEFAULT code is no default preference with the given name or if the default value cannot be treated as font data param store the preference store param name the name of the preference return the default value of the preference public static Font Data get Default Font Data Array I Preference Store store String name return basic Get Font Data store get Default String name  FONTDATA_ARRAY_DEFAULT_DEFAULT FontData getDefaultFontDataArray IPreferenceStore basicGetFontData getDefaultString
Returns a single default value for the font valued preference with the given name in the given preference store Returns the default default value code FONTDATA DEFAULT DEFAULT code is no default preference with the given name or if the default value cannot be treated as font data This method is provided for backwards compatibility It is recommended that code get Default Font Data Array code is used instead param store the preference store param name the name of the preference return the default value of the preference public static Font Data get Default Font Data I Preference Store store String name return get Default Font Data Array store name 0  FONTDATA_DEFAULT_DEFAULT getDefaultFontDataArray FontData getDefaultFontData IPreferenceStore getDefaultFontDataArray
Returns the default value for the point valued preference with the given name in the given preference store Returns the default default value code POINT DEFAULT DEFAULT code is no default preference with the given name or if the default value cannot be treated as a point param store the preference store param name the name of the preference return the default value of the preference public static Point get Default Point I Preference Store store String name return basic Get Point store get Default String name  POINT_DEFAULT_DEFAULT getDefaultPoint IPreferenceStore basicGetPoint getDefaultString
Returns the default value for the rectangle valued preference with the given name in the given preference store Returns the default default value code RECTANGLE DEFAULT DEFAULT code is no default preference with the given name or if the default value cannot be treated as a rectangle param store the preference store param name the name of the preference return the default value of the preference public static Rectangle get Default Rectangle I Preference Store store String name return basic Get Rectangle store get Default String name  RECTANGLE_DEFAULT_DEFAULT getDefaultRectangle IPreferenceStore basicGetRectangle getDefaultString
Returns the current value of the font valued preference with the given name in the given preference store Returns the default default value code FONTDATA ARRAY DEFAULT DEFAULT code if there is no preference with the given name or if the current value cannot be treated as font data param store the preference store param name the name of the preference return the font valued preference public static Font Data get Font Data Array I Preference Store store String name return basic Get Font Data store get String name  FONTDATA_ARRAY_DEFAULT_DEFAULT FontData getFontDataArray IPreferenceStore basicGetFontData getString
Returns the current value of the first entry of the font valued preference with the given name in the given preference store Returns the default default value code FONTDATA ARRAY DEFAULT DEFAULT code if there is no preference with the given name or if the current value cannot be treated as font data This API is provided for backwards compatibility It is recommended that code get Font Data Array code is used instead param store the preference store param name the name of the preference return the font valued preference public static Font Data get Font Data I Preference Store store String name return get Font Data Array store name 0  FONTDATA_ARRAY_DEFAULT_DEFAULT getFontDataArray FontData getFontData IPreferenceStore getFontDataArray
Returns the current value of the point valued preference with the given name in the given preference store Returns the default default value code POINT DEFAULT DEFAULT code if there is no preference with the given name or if the current value cannot be treated as a point param store the preference store param name the name of the preference return the point valued preference public static Point get Point I Preference Store store String name return basic Get Point store get String name  POINT_DEFAULT_DEFAULT getPoint IPreferenceStore basicGetPoint getString
Returns the current value of the rectangle valued preference with the given name in the given preference store Returns the default default value code RECTANGLE DEFAULT DEFAULT code if there is no preference with the given name or if the current value cannot be treated as a rectangle param store the preference store param name the name of the preference return the rectangle valued preference public static Rectangle get Rectangle I Preference Store store String name return basic Get Rectangle store get String name  RECTANGLE_DEFAULT_DEFAULT getRectangle IPreferenceStore basicGetRectangle getString
Sets the default value of the preference with the given name in the given preference store As Font Datas are stored as arrays this method is only provided for backwards compatibility Use code set Default I Preference Store String Font Data code instead param store the preference store param name the name of the preference param value the new default value of the preference public static void set Default I Preference Store store String name Font Data value Font Data font Datas new Font Data 1 font Datas 0 value set Default store name font Datas  FontDatas setDefault IPreferenceStore FontData setDefault IPreferenceStore FontData FontData fontDatas FontData fontDatas setDefault fontDatas
Sets the default value of the preference with the given name in the given preference store param store the preference store param name the name of the preference param value the new default value of the preference public static void set Default I Preference Store store String name Font Data value store set Default name get Stored Representation value  setDefault IPreferenceStore FontData setDefault getStoredRepresentation
Sets the default value of the preference with the given name in the given preference store param store the preference store param name the name of the preference param value the new default value of the preference public static void set Default I Preference Store store String name Point value store set Default name String Converter as String value  setDefault IPreferenceStore setDefault StringConverter asString
Sets the default value of the preference with the given name in the given preference store param store the preference store param name the name of the preference param value the new default value of the preference public static void set Default I Preference Store store String name Rectangle value store set Default name String Converter as String value  setDefault IPreferenceStore setDefault StringConverter asString
Sets the default value of the preference with the given name in the given preference store param store the preference store param name the name of the preference param value the new default value of the preference public static void set Default I Preference Store store String name RGB value store set Default name String Converter as String value  setDefault IPreferenceStore setDefault StringConverter asString
Sets the current value of the preference with the given name in the given preference store p Included for backwards compatibility This method is equivalent to code set Value store name new Font Data value code p param store the preference store param name the name of the preference param value the new current value of the preference public static void set Value I Preference Store store String name Font Data value set Value store name new Font Data value  setValue FontData setValue IPreferenceStore FontData setValue FontData
Sets the current value of the preference with the given name in the given preference store This method also sets the corresponding key in the J Face font registry to the value and fires a property change event to listeners on the preference store p Note that this API does not update any other settings that may be dependant upon it Only the value in the preference store and in the font registry is updated p param store the preference store param name the name of the preference param value the new current value of the preference see put Value I Preference Store String Font Data public static void set Value I Preference Store store String name Font Data value Font Data old Value get Font Data Array store name see if the font has changed if Arrays equals old Value value store put Value name get Stored Representation value J Face Resources get Font Registry put name value store fire Property Change Event name old Value value  JFace putValue IPreferenceStore FontData setValue IPreferenceStore FontData FontData oldValue getFontDataArray oldValue putValue getStoredRepresentation JFaceResources getFontRegistry firePropertyChangeEvent oldValue
Sets the current value of the preference with the given name in the given preference store This method does not update the font registry or fire a property change event param store the preference store param name the name of the preference param value the new current value of the preference see Preference Converter set Value I Preference Store String Font Data public static void put Value I Preference Store store String name Font Data value Font Data old Value get Font Data Array store name see if the font has changed if Arrays equals old Value value store put Value name get Stored Representation value  PreferenceConverter setValue IPreferenceStore FontData putValue IPreferenceStore FontData FontData oldValue getFontDataArray oldValue putValue getStoredRepresentation
Returns the stored representation of the given array of Font Data objects The stored representation has the form Font Data Font Data Only includes the non null entries param font Data the array of Font Data objects return the stored representation of the Font Data objects since 3 0 public static String get Stored Representation Font Data font Data String Buffer buffer new String Buffer for int i 0 i font Data length i if font Data i null buffer append font Data i to String buffer append ENTRY SEPARATOR return buffer to String  FontData FontData FontData fontData FontData FontData getStoredRepresentation FontData fontData StringBuffer StringBuffer fontData fontData fontData toString ENTRY_SEPARATOR toString
Sets the current value of the preference with the given name in the given preference store param store the preference store param name the name of the preference param value the new current value of the preference public static void set Value I Preference Store store String name Point value Point old Value get Point store name if old Value null old Value equals value store put Value name String Converter as String value store fire Property Change Event name old Value value  setValue IPreferenceStore oldValue getPoint oldValue oldValue putValue StringConverter asString firePropertyChangeEvent oldValue
Sets the current value of the preference with the given name in the given preference store param store the preference store param name the name of the preference param value the new current value of the preference public static void set Value I Preference Store store String name Rectangle value Rectangle old Value get Rectangle store name if old Value null old Value equals value store put Value name String Converter as String value store fire Property Change Event name old Value value  setValue IPreferenceStore oldValue getRectangle oldValue oldValue putValue StringConverter asString firePropertyChangeEvent oldValue
Sets the current value of the preference with the given name in the given preference store param store the preference store param name the name of the preference param value the new current value of the preference public static void set Value I Preference Store store String name RGB value RGB old Value get Color store name if old Value null old Value equals value store put Value name String Converter as String value store fire Property Change Event name old Value value  setValue IPreferenceStore oldValue getColor oldValue oldValue putValue StringConverter asString firePropertyChangeEvent oldValue

private class Page Layout extends Layout public Point compute Size Composite composite int w Hint int h Hint boolean force if w Hint SWT DEFAULT h Hint SWT DEFAULT return new Point w Hint h Hint int x minimum Page Size x int y minimum Page Size y Control children composite get Children for int i 0 i children length i Point size children i compute Size SWT DEFAULT SWT DEFAULT force x Math max x size x y Math max y size y if w Hint SWT DEFAULT x w Hint if h Hint SWT DEFAULT y h Hint return new Point x y  PageLayout computeSize wHint hHint wHint hHint wHint hHint minimumPageSize minimumPageSize getChildren computeSize wHint wHint hHint hHint
public void layout Composite composite boolean force Rectangle rect composite get Client Area Control children composite get Children for int i 0 i children length i children i set Size rect width rect height  getClientArea getChildren setSize
private Tree Viewer tree Viewer Creates a new preference dialog under the control of the given preference manager param parent Shell the parent shell param manager the preference manager public Preference Dialog Shell parent Shell Preference Manager manager super parent Shell set Shell Style get Shell Style SWT RESIZE SWT MAX preference Manager manager  TreeViewer treeViewer parentShell PreferenceDialog parentShell PreferenceManager parentShell setShellStyle getShellStyle preferenceManager
protected void button Pressed int button Id switch button Id case I Dialog Constants OK ID ok Pressed return case I Dialog Constants CANCEL ID cancel Pressed return case I Dialog Constants HELP ID help Pressed return  buttonPressed buttonId buttonId IDialogConstants OK_ID okPressed IDialogConstants CANCEL_ID cancelPressed IDialogConstants HELP_ID helpPressed
if node get Page null Platform run new Safe Runnable public void run if node get Page perform Cancel return  getPage SafeRunnable getPage performCancel
protected void cancel Pressed Inform all pages that we are cancelling Iterator nodes preference Manager get Elements Preference Manager PRE ORDER iterator while nodes has Next final I Preference Node node I Preference Node nodes next if node get Page null Platform run new Safe Runnable public void run if node get Page perform Cancel return set Return Code CANCEL close  cancelPressed preferenceManager getElements PreferenceManager PRE_ORDER hasNext IPreferenceNode IPreferenceNode getPage SafeRunnable getPage performCancel setReturnCode
Clear the last selected node This is so that we not chache the last selection in case of an error void clear Selected Node set Selected Node Preference null  clearSelectedNode setSelectedNodePreference
public boolean close List nodes preference Manager get Elements Preference Manager PRE ORDER for int i 0 i nodes size i I Preference Node node I Preference Node nodes get i node dispose Resources return super close  preferenceManager getElements PreferenceManager PRE_ORDER IPreferenceNode IPreferenceNode disposeResources
new Shell set Text J Face Resources get String Preference Dialog title NON NLS 1 new Shell add Shell Listener new Shell Adapter public void shell Activated Shell Event e if last Shell Size null last Shell Size get Shell get Size  newShell setText JFaceResources getString PreferenceDialog newShell addShellListener ShellAdapter shellActivated ShellEvent lastShellSize lastShellSize getShell getSize
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text J Face Resources get String Preference Dialog title NON NLS 1 new Shell add Shell Listener new Shell Adapter public void shell Activated Shell Event e if last Shell Size null last Shell Size get Shell get Size  configureShell newShell configureShell newShell newShell setText JFaceResources getString PreferenceDialog newShell addShellListener ShellAdapter shellActivated ShellEvent lastShellSize lastShellSize getShell getSize
protected void constrain Shell Size super constrain Shell Size record opening shell size if last Shell Size null last Shell Size get Shell get Size  constrainShellSize constrainShellSize lastShellSize lastShellSize getShell getSize
protected void create Buttons For Button Bar Composite parent create OK and Cancel buttons by default ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true get Shell set Default Button ok Button create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false if is Help Available create Button parent I Dialog Constants HELP ID I Dialog Constants HELP LABEL false  createButtonsForButtonBar okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL getShell setDefaultButton okButton createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL isHelpAvailable createButton IDialogConstants HELP_ID IDialogConstants HELP_LABEL
Busy Indicator show While get Shell get Display new Runnable public void run control 0 Preference Dialog super create Contents parent Add the first page select Saved Item  BusyIndicator showWhile getShell getDisplay PreferenceDialog createContents selectSavedItem
protected Control create Contents final Composite parent final Control control new Control 1 Busy Indicator show While get Shell get Display new Runnable public void run control 0 Preference Dialog super create Contents parent Add the first page select Saved Item return control 0  createContents BusyIndicator showWhile getShell getDisplay PreferenceDialog createContents selectSavedItem
public void handle Event Event event if event detail SWT DRAG return int shift event x sash get Bounds x Grid Data data Grid Data tree Control get Layout Data int new Width Hint data width Hint shift if new Width Hint 20 return Point computed Size get Shell compute Size SWT DEFAULT SWT DEFAULT Point current Size get Shell get Size if the dialog wasn t of a custom size we know we can shrink it if necessary based on sash movement boolean custom Size computed Size equals current Size data width Hint new Width Hint set Last Tree Width new Width Hint composite layout true recompute based on new widget size computed Size get Shell compute Size SWT DEFAULT SWT DEFAULT if the dialog was of a custom size then increase it only if necessary if custom Size computed Size x Math max computed Size x current Size x computed Size y Math max computed Size y current Size y if computed Size equals current Size return set Shell Size computed Size x computed Size y last Shell Size get Shell get Size  handleEvent getBounds GridData GridData treeControl getLayoutData newWidthHint widthHint newWidthHint computedSize getShell computeSize currentSize getShell getSize customSize computedSize currentSize widthHint newWidthHint setLastTreeWidth newWidthHint computedSize getShell computeSize customSize computedSize computedSize currentSize computedSize computedSize currentSize computedSize currentSize setShellSize computedSize computedSize lastShellSize getShell getSize
protected Control create Dialog Area Composite parent final Composite composite Composite super create Dialog Area parent Grid Layout composite get Layout num Columns 3 final Control tree Control create Tree Area Contents composite final Sash sash new Sash composite SWT VERTICAL sash set Layout Data new Grid Data Grid Data FILL VERTICAL the following listener resizes the tree control based on sash deltas If necessary it will also grow shrink the dialog sash add Listener SWT Selection new Listener non Javadoc see org eclipse swt widgets Listener handle Event org eclipse swt widgets Event public void handle Event Event event if event detail SWT DRAG return int shift event x sash get Bounds x Grid Data data Grid Data tree Control get Layout Data int new Width Hint data width Hint shift if new Width Hint 20 return Point computed Size get Shell compute Size SWT DEFAULT SWT DEFAULT Point current Size get Shell get Size if the dialog wasn t of a custom size we know we can shrink it if necessary based on sash movement boolean custom Size computed Size equals current Size data width Hint new Width Hint set Last Tree Width new Width Hint composite layout true recompute based on new widget size computed Size get Shell compute Size SWT DEFAULT SWT DEFAULT if the dialog was of a custom size then increase it only if necessary if custom Size computed Size x Math max computed Size x current Size x computed Size y Math max computed Size y current Size y if computed Size equals current Size return set Shell Size computed Size x computed Size y last Shell Size get Shell get Size Composite page Area Composite new Composite composite SWT NONE page Area Composite set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout layout new Grid Layout 1 true layout margin Height 0 layout margin Width 10 page Area Composite set Layout layout Build the title area and separator line Composite title Composite new Composite page Area Composite SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 layout vertical Spacing 0 layout horizontal Spacing 0 title Composite set Layout layout title Composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL create Title Area title Composite Build the Page container page Container create Page Container page Area Composite page Container set Layout Data new Grid Data Grid Data FILL BOTH Build the separator line Label separator new Label page Area Composite SWT HORIZONTAL SWT SEPARATOR Grid Data gd new Grid Data Grid Data FILL HORIZONTAL separator set Layout Data gd return composite  createDialogArea createDialogArea GridLayout getLayout numColumns treeControl createTreeAreaContents setLayoutData GridData GridData FILL_VERTICAL addListener handleEvent handleEvent getBounds GridData GridData treeControl getLayoutData newWidthHint widthHint newWidthHint computedSize getShell computeSize currentSize getShell getSize customSize computedSize currentSize widthHint newWidthHint setLastTreeWidth newWidthHint computedSize getShell computeSize customSize computedSize computedSize currentSize computedSize computedSize currentSize computedSize currentSize setShellSize computedSize computedSize lastShellSize getShell getSize pageAreaComposite pageAreaComposite setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout marginHeight marginWidth pageAreaComposite setLayout titleComposite pageAreaComposite GridLayout marginHeight marginWidth verticalSpacing horizontalSpacing titleComposite setLayout titleComposite setLayoutData GridData GridData FILL_HORIZONTAL createTitleArea titleComposite pageContainer createPageContainer pageAreaComposite pageContainer setLayoutData GridData GridData FILL_BOTH pageAreaComposite GridData GridData GridData FILL_HORIZONTAL setLayoutData
Creates the inner page container param parent return Composite private Composite create Page Container Composite parent Composite result new Composite parent SWT NULL result set Layout new Page Layout return result  createPageContainer setLayout PageLayout
title Area add Paint Listener new Paint Listener public void paint Control Paint Event e e gc set Foreground title Area get Display get System Color SWT COLOR WIDGET NORMAL SHADOW Rectangle bounds title Area get Client Area bounds height bounds height 2 bounds width bounds width 1 e gc draw Rectangle bounds  titleArea addPaintListener PaintListener paintControl PaintEvent setForeground titleArea getDisplay getSystemColor COLOR_WIDGET_NORMAL_SHADOW titleArea getClientArea drawRectangle
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 update Message if J Face Resources DIALOG FONT equals event get Property update Message Font dialog Font J Face Resources get Dialog Font update Tree Font dialog Font Control children Composite button Bar get Children for int i 0 i children length i children i set Font dialog Font  IPropertyChangeListener fontListener IPropertyChangeListener propertyChange PropertyChangeEvent JFaceResources BANNER_FONT getProperty updateMessage JFaceResources DIALOG_FONT getProperty updateMessage dialogFont JFaceResources getDialogFont updateTreeFont dialogFont buttonBar getChildren setFont dialogFont
title Area add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event J Face Resources get Font Registry remove Listener font Listener  titleArea addDisposeListener DisposeListener widgetDisposed DisposeEvent JFaceResources getFontRegistry removeListener fontListener
Creates the wizard s title area param parent the SWT parent for the title area composite return the created title area composite private Composite create Title Area Composite parent Create the title area which will contain a title message and image int margins 2 title Area new Composite parent SWT NONE Form Layout layout new Form Layout layout margin Height margins layout margin Width margins title Area set Layout layout Get the background color for the title area Display display parent get Display Color background J Face Colors get Banner Background display Grid Data layout Data new Grid Data Grid Data FILL HORIZONTAL layout Data height Hint J Face Resources get Image PREF DLG TITLE IMG get Bounds height margins 3 title Area set Layout Data layout Data title Area set Background background title Area add Paint Listener new Paint Listener public void paint Control Paint Event e e gc set Foreground title Area get Display get System Color SWT COLOR WIDGET NORMAL SHADOW Rectangle bounds title Area get Client Area bounds height bounds height 2 bounds width bounds width 1 e gc draw Rectangle bounds Message label message Area new Dialog Message Area message Area create Contents title Area 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 update Message if J Face Resources DIALOG FONT equals event get Property update Message Font dialog Font J Face Resources get Dialog Font update Tree Font dialog Font Control children Composite button Bar get Children for int i 0 i children length i children i set Font dialog Font title Area add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event J Face Resources get Font Registry remove Listener font Listener J Face Resources get Font Registry add Listener font Listener Title image title Image new Label title Area SWT LEFT title Image set Background background title Image set Image J Face Resources get Image PREF DLG TITLE IMG Form Data image Data new Form Data image Data right new Form Attachment 100 image Data top new Form Attachment 0 image Data bottom new Form Attachment 100 title Image set Layout Data image Data message Area set Title Layout Data create Message Area Data message Area set Message Layout Data create Message Area Data return title Area  createTitleArea titleArea FormLayout FormLayout marginHeight marginWidth titleArea setLayout getDisplay JFaceColors getBannerBackground GridData layoutData GridData GridData FILL_HORIZONTAL layoutData heightHint JFaceResources getImage PREF_DLG_TITLE_IMG getBounds titleArea setLayoutData layoutData titleArea setBackground titleArea addPaintListener PaintListener paintControl PaintEvent setForeground titleArea getDisplay getSystemColor COLOR_WIDGET_NORMAL_SHADOW titleArea getClientArea drawRectangle messageArea DialogMessageArea messageArea createContents titleArea IPropertyChangeListener fontListener IPropertyChangeListener propertyChange PropertyChangeEvent JFaceResources BANNER_FONT getProperty updateMessage JFaceResources DIALOG_FONT getProperty updateMessage dialogFont JFaceResources getDialogFont updateTreeFont dialogFont buttonBar getChildren setFont dialogFont titleArea addDisposeListener DisposeListener widgetDisposed DisposeEvent JFaceResources getFontRegistry removeListener fontListener JFaceResources getFontRegistry addListener fontListener titleImage titleArea titleImage setBackground titleImage setImage JFaceResources getImage PREF_DLG_TITLE_IMG FormData imageData FormData imageData FormAttachment imageData FormAttachment imageData FormAttachment titleImage setLayoutData imageData messageArea setTitleLayoutData createMessageAreaData messageArea setMessageLayoutData createMessageAreaData titleArea
Create the layout data for the message area return Form Data for the message area private Form Data create Message Area Data Form Data message Data new Form Data message Data top new Form Attachment 0 message Data bottom new Form Attachment title Image 0 SWT BOTTOM message Data right new Form Attachment title Image 0 message Data left new Form Attachment 0 return message Data  FormData FormData createMessageAreaData FormData messageData FormData messageData FormAttachment messageData FormAttachment titleImage messageData FormAttachment titleImage messageData FormAttachment messageData
param parent the SWT parent for the tree area controls return the new code Control code since 3 0 protected Control create Tree Area Contents Composite parent Build the tree an put it into the composite tree Viewer create Tree Viewer parent tree Viewer set Input get Preference Manager update Tree Font J Face Resources get Dialog Font layout Tree Area Control tree Viewer get Control return tree Viewer get Control  createTreeAreaContents treeViewer createTreeViewer treeViewer setInput getPreferenceManager updateTreeFont JFaceResources getDialogFont layoutTreeAreaControl treeViewer getControl treeViewer getControl
viewer add Post Selection Changed Listener new I Selection Changed Listener private void handle Error try remove the listener temporarily so that the events caused by the error handling dont further cause error handling to occur viewer remove Post Selection Changed Listener this show Page Flipping Abort Dialog select Current Page Again clear Selected Node finally viewer add Post Selection Changed Listener this  addPostSelectionChangedListener ISelectionChangedListener handleError removePostSelectionChangedListener showPageFlippingAbortDialog selectCurrentPageAgain clearSelectedNode addPostSelectionChangedListener
public void selection Changed Selection Changed Event event Object selection get Single Selection event get Selection if selection instanceof I Preference Node if is Current Page Valid handle Error else if show Page I Preference Node selection Page flipping wasn t successful handle Error else Everything went well last Successful Node I Preference Node selection viewer get Control set Focus  selectionChanged SelectionChangedEvent getSingleSelection getSelection IPreferenceNode isCurrentPageValid handleError showPage IPreferenceNode handleError lastSuccessfulNode IPreferenceNode getControl setFocus
add Selection Listener new Selection Adapter public void widget Default Selected final Selection Event event I Selection selection viewer get Selection if selection is Empty return I Preference Node single Selection get Single Selection selection boolean expanded viewer get Expanded State single Selection viewer set Expanded State single Selection expanded  addSelectionListener SelectionAdapter widgetDefaultSelected SelectionEvent ISelection getSelection isEmpty IPreferenceNode singleSelection getSingleSelection getExpandedState singleSelection setExpandedState singleSelection
viewer get Control add Help Listener new Help Listener public void help Requested Help Event event call perform help on the current page if current Page null current Page perform Help  getControl addHelpListener HelpListener helpRequested HelpEvent currentPage currentPage performHelp
Create a new code Tree Viewer code param parent the parent code Composite code return the code Tree Viewer code since 3 0 protected Tree Viewer create Tree Viewer Composite parent final Tree Viewer viewer new Tree Viewer parent SWT BORDER viewer add Post Selection Changed Listener new I Selection Changed Listener private void handle Error try remove the listener temporarily so that the events caused by the error handling dont further cause error handling to occur viewer remove Post Selection Changed Listener this show Page Flipping Abort Dialog select Current Page Again clear Selected Node finally viewer add Post Selection Changed Listener this public void selection Changed Selection Changed Event event Object selection get Single Selection event get Selection if selection instanceof I Preference Node if is Current Page Valid handle Error else if show Page I Preference Node selection Page flipping wasn t successful handle Error else Everything went well last Successful Node I Preference Node selection viewer get Control set Focus Tree viewer get Control add Selection Listener new Selection Adapter public void widget Default Selected final Selection Event event I Selection selection viewer get Selection if selection is Empty return I Preference Node single Selection get Single Selection selection boolean expanded viewer get Expanded State single Selection viewer set Expanded State single Selection expanded Register help listener on the tree to use context sensitive help viewer get Control add Help Listener new Help Listener public void help Requested Help Event event call perform help on the current page if current Page null current Page perform Help viewer set Label Provider new Preference Label Provider viewer set Content Provider new Preference Content Provider return viewer  TreeViewer TreeViewer TreeViewer createTreeViewer TreeViewer TreeViewer addPostSelectionChangedListener ISelectionChangedListener handleError removePostSelectionChangedListener showPageFlippingAbortDialog selectCurrentPageAgain clearSelectedNode addPostSelectionChangedListener selectionChanged SelectionChangedEvent getSingleSelection getSelection IPreferenceNode isCurrentPageValid handleError showPage IPreferenceNode handleError lastSuccessfulNode IPreferenceNode getControl setFocus getControl addSelectionListener SelectionAdapter widgetDefaultSelected SelectionEvent ISelection getSelection isEmpty IPreferenceNode singleSelection getSingleSelection getExpandedState singleSelection setExpandedState singleSelection getControl addHelpListener HelpListener helpRequested HelpEvent currentPage currentPage performHelp setLabelProvider PreferenceLabelProvider setContentProvider PreferenceContentProvider
Find the code I Preference Node code that has data the same id as the supplied value param node Id the id to search for return code I Preference Node code or code null code if not found protected I Preference Node find Node Matching String node Id List nodes preference Manager get Elements Preference Manager POST ORDER for Iterator i nodes iterator i has Next I Preference Node node I Preference Node i next if node get Id equals node Id return node return null  IPreferenceNode nodeId IPreferenceNode IPreferenceNode findNodeMatching nodeId preferenceManager getElements PreferenceManager POST_ORDER hasNext IPreferenceNode IPreferenceNode getId nodeId
Get the last known tree width return the width private int get Last Tree Width return last Tree Width  getLastTreeWidth lastTreeWidth
Returns the preference mananger used by this preference dialog return the preference mananger public Preference Manager get Preference Manager return preference Manager  PreferenceManager getPreferenceManager preferenceManager
see org eclipse jface preference I Preference Page Container get Preference Store public I Preference Store get Preference Store return preference Store  IPreferencePageContainer getPreferenceStore IPreferenceStore getPreferenceStore preferenceStore
Get the name of the selected item preference return String protected String get Selected Node Preference return last Preference Id  getSelectedNodePreference lastPreferenceId
param selection the code I Selection code to examine return the first element or null if empty protected I Preference Node get Single Selection I Selection selection if selection is Empty return I Preference Node I Structured Selection selection get First Element return null  ISelection IPreferenceNode getSingleSelection ISelection isEmpty IPreferenceNode IStructuredSelection getFirstElement
return the code Tree Viewer code for this dialog since 3 0 protected Tree Viewer get Tree Viewer return tree Viewer  TreeViewer TreeViewer getTreeViewer treeViewer
Save the values specified in the pages p The default implementation of this framework method saves all pages of type code Preference Page code if their store needs saving and is a code Preference Store code p p Subclasses may override p protected void handle Save Iterator nodes preference Manager get Elements Preference Manager PRE ORDER iterator while nodes has Next I Preference Node node I Preference Node nodes next I Preference Page page node get Page if page instanceof Preference Page Save now in case tbe workbench does not shutdown cleanly I Preference Store store Preference Page page get Preference Store if store null store needs Saving store instanceof I Persistent Preference Store try I Persistent Preference Store store save catch IO Exception e Message Dialog open Error get Shell J Face Resources get String Preference Dialog save Error Title NON NLS 1 J Face Resources format Preference Dialog save Error Message new Object page get Title e get Message NON NLS 1  PreferencePage PreferenceStore handleSave preferenceManager getElements PreferenceManager PRE_ORDER hasNext IPreferenceNode IPreferenceNode IPreferencePage getPage PreferencePage IPreferenceStore PreferencePage getPreferenceStore needsSaving IPersistentPreferenceStore IPersistentPreferenceStore IOException MessageDialog openError getShell JFaceResources getString PreferenceDialog saveErrorTitle JFaceResources PreferenceDialog saveErrorMessage getTitle getMessage
Notifies that the window s close button was pressed the close menu was selected or the ESCAPE key pressed p The default implementation of this framework method sets the window s return code to code CANCEL code and closes the window using code close code Subclasses may extend or reimplement p protected void handle Shell Close Event handle the same as pressing cancel cancel Pressed  handleShellCloseEvent cancelPressed
Notifies of the pressing of the Help button p The default implementation of this framework method calls code perform Help code on the currently active page p protected void help Pressed if current Page null current Page perform Help  performHelp helpPressed currentPage currentPage performHelp
Returns whether the current page is valid return code false code if the current page is not valid or or code true code if the current page is valid or there is no current page protected boolean is Current Page Valid if current Page null return true return current Page is Valid  isCurrentPageValid currentPage currentPage isValid
param control the code Control code to lay out since 3 0 protected void layout Tree Area Control Control control Grid Data gd new Grid Data Grid Data FILL VERTICAL gd width Hint get Last Tree Width gd vertical Span 1 control set Layout Data gd  layoutTreeAreaControl GridData GridData GridData FILL_VERTICAL widthHint getLastTreeWidth verticalSpan setLayoutData
public void run get Button I Dialog Constants OK ID set Enabled false error Occurred false try Notify all the pages and give them a chance to abort Iterator nodes preference Manager get Elements Preference Manager PRE ORDER iterator while nodes has Next I Preference Node node I Preference Node nodes next I Preference Page page node get Page if page null if page perform Ok return catch Exception e handle Exception e finally Give subclasses the choice to save the state of the preference pages if error Occurred handle Save Need to restore state close  getButton IDialogConstants OK_ID setEnabled errorOccurred preferenceManager getElements PreferenceManager PRE_ORDER hasNext IPreferenceNode IPreferenceNode IPreferencePage getPage performOk handleException errorOccurred handleSave
public void handle Exception Throwable e error Occurred true if Platform is Running String bundle Platform PI RUNTIME Platform get Log Platform get Bundle bundle log new Status I Status ERROR bundle 0 e to String e else e print Stack Trace clear Selected Node String message J Face Resources get String Safe Runnable error Message NON NLS 1 Message Dialog open Error get Shell J Face Resources get String Error message NON NLS 1  handleException errorOccurred isRunning PI_RUNTIME getLog getBundle IStatus toString printStackTrace clearSelectedNode JFaceResources getString SafeRunnable errorMessage MessageDialog openError getShell JFaceResources getString
The preference dialog implementation of this code Dialog code framework method sends code perform Ok code to all pages of the preference dialog then calls code handle Save code on this dialog to save any state and then calls code close code to close this dialog protected void ok Pressed Platform run new Safe Runnable private boolean error Occurred non Javadoc see org eclipse core runtime I Safe Runnable run public void run get Button I Dialog Constants OK ID set Enabled false error Occurred false try Notify all the pages and give them a chance to abort Iterator nodes preference Manager get Elements Preference Manager PRE ORDER iterator while nodes has Next I Preference Node node I Preference Node nodes next I Preference Page page node get Page if page null if page perform Ok return catch Exception e handle Exception e finally Give subclasses the choice to save the state of the preference pages if error Occurred handle Save Need to restore state close non Javadoc see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable e error Occurred true if Platform is Running String bundle Platform PI RUNTIME Platform get Log Platform get Bundle bundle log new Status I Status ERROR bundle 0 e to String e else e print Stack Trace clear Selected Node String message J Face Resources get String Safe Runnable error Message NON NLS 1 Message Dialog open Error get Shell J Face Resources get String Error message NON NLS 1  performOk handleSave okPressed SafeRunnable errorOccurred ISafeRunnable getButton IDialogConstants OK_ID setEnabled errorOccurred preferenceManager getElements PreferenceManager PRE_ORDER hasNext IPreferenceNode IPreferenceNode IPreferencePage getPage performOk handleException errorOccurred handleSave ISafeRunnable handleException handleException errorOccurred isRunning PI_RUNTIME getLog getBundle IStatus toString printStackTrace clearSelectedNode JFaceResources getString SafeRunnable errorMessage MessageDialog openError getShell JFaceResources getString
Selects the page determined by code last Successful Node code in the page hierarchy void select Current Page Again if last Successful Node null return get Tree Viewer set Selection new Structured Selection last Successful Node current Page set Visible true  lastSuccessfulNode selectCurrentPageAgain lastSuccessfulNode getTreeViewer setSelection StructuredSelection lastSuccessfulNode currentPage setVisible
Selects the saved item in the tree of preference pages If it cannot do this it saves the first one protected void select Saved Item I Preference Node node find Node Matching get Selected Node Preference if node null I Preference Node nodes preference Manager get Root get Sub Nodes if nodes length 0 node nodes 0 if node null get Tree Viewer set Selection new Structured Selection node true Keep focus in tree See bugs 2692 2621 and 6775 get Tree Viewer get Control set Focus  selectSavedItem IPreferenceNode findNodeMatching getSelectedNodePreference IPreferenceNode preferenceManager getRoot getSubNodes getTreeViewer setSelection StructuredSelection getTreeViewer getControl setFocus
Display the given error message The currently displayed message is saved and will be redisplayed when the error message is set to code null code param new Error Message the error Message to display or code null code public void set Error Message String new Error Message if new Error Message null message Area clear Error Message else message Area update Text new Error Message I Message Provider ERROR  newErrorMessage errorMessage setErrorMessage newErrorMessage newErrorMessage messageArea clearErrorMessage messageArea updateText newErrorMessage IMessageProvider
Save the last known tree width param width the width private void set Last Tree Width int width last Tree Width width  setLastTreeWidth lastTreeWidth
Sets whether a Help button is available for this dialog p Clients must call this framework method before the dialog s control has been created p param b code true code to include a Help button and code false code to not include one the default public void set Help Available boolean b is Help Available b  setHelpAvailable isHelpAvailable
Set the message text If the message line currently displays an error the message is stored and will be shown after a call to clear Error Message p Shortcut for code set Message new Message 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 I Message Provider NONE  clearErrorMessage setMessage newMessage newMessage setMessage newMessage setMessage newMessage IMessageProvider
Sets the message for this dialog 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 Area update Text new Message new Type  setErrorMessage newMessage newType setMessage newMessage newType messageArea updateText newMessage newType
Sets the minimum page size param min Width the minimum page width param min Height the minimum page height see set Minimum Page Size Point public void set Minimum Page Size int min Width int min Height minimum Page Size x min Width minimum Page Size y min Height  minWidth minHeight setMinimumPageSize setMinimumPageSize minWidth minHeight minimumPageSize minWidth minimumPageSize minHeight
Sets the minimum page size param size the page size encoded as code new Point width height code see set Minimum Page Size int int public void set Minimum Page Size Point size minimum Page Size x size x minimum Page Size y size y  setMinimumPageSize setMinimumPageSize minimumPageSize minimumPageSize
Sets the preference store for this preference dialog param store the preference store see get Preference Store public void set Preference Store I Preference Store store Assert is Not Null store preference Store store  getPreferenceStore setPreferenceStore IPreferenceStore isNotNull preferenceStore
Save the currently selected node private void set Selected Node String store Value null I Structured Selection selection I Structured Selection get Tree Viewer get Selection if selection size 1 I Preference Node node I Preference Node selection get First Element store Value node get Id set Selected Node Preference store Value  setSelectedNode storeValue IStructuredSelection IStructuredSelection getTreeViewer getSelection IPreferenceNode IPreferenceNode getFirstElement storeValue getId setSelectedNodePreference storeValue
Sets the name of the selected item preference Public equivalent to code set Selected Node Preference code param page Id The identifier for the page since 3 0 public void set Selected Node String page Id set Selected Node Preference page Id  setSelectedNodePreference pageId setSelectedNode pageId setSelectedNodePreference pageId
Sets the name of the selected item preference param page Id The identifier for the page protected void set Selected Node Preference String page Id last Preference Id page Id  pageId setSelectedNodePreference pageId lastPreferenceId pageId
Changes the shell size to the given size ensuring that it is no larger than the display bounds param width the shell width param height the shell height private void set Shell Size int width int height Rectangle preferred get Shell get Bounds preferred width width preferred height height get Shell set Bounds get Constrained Shell Bounds preferred  setShellSize getShell getBounds getShell setBounds getConstrainedShellBounds
final boolean failed false Platform run new I Safe Runnable public void handle Exception Throwable e failed 0 true  ISafeRunnable handleException
failed 0 true public void run current Page create Control page Container  currentPage createControl pageContainer
final Point failed new Point 1 1 Platform run new I Safe Runnable public void handle Exception Throwable e size 0 failed  ISafeRunnable handleException
size 0 failed public void run size 0 current Page compute Size  currentPage computeSize
Shows the preference page corresponding to the given preference node Does nothing if that page is already current param node the preference node or code null code if none return code true code if the page flip was successful and code false code is unsuccessful protected boolean show Page I Preference Node node if node null return false Create the page if nessessary if node get Page null node create Page if node get Page null return false I Preference Page new Page node get Page if new Page current Page return true if current Page null if current Page ok To Leave return false I Preference Page old Page current Page current Page new Page Set the new page s container current Page set Container this Ensure that the page control has been created this allows lazy page control creation if current Page get Control null final boolean failed false Platform run new I Safe Runnable public void handle Exception Throwable e failed 0 true public void run current Page create Control page Container if failed 0 return false the page is responsible for ensuring the created control is accessable via get Control Assert is Not Null current Page get Control Force calculation of the page s description label because label can be wrapped final Point size new Point 1 final Point failed new Point 1 1 Platform run new I Safe Runnable public void handle Exception Throwable e size 0 failed public void run size 0 current Page compute Size if size 0 equals failed return false Point content Size size 0 Do we need resizing Computation not needed if the first page is inserted since computing the dialog s size is done by calling dialog open Also prevent auto resize if the user has manually resized Shell shell get Shell Point shell Size shell get Size if old Page null Rectangle rect page Container get Client Area Point container Size new Point rect width rect height int hdiff content Size x container Size x int vdiff content Size y container Size y if hdiff 0 vdiff 0 if shell Size equals last Shell Size hdiff Math max 0 hdiff vdiff Math max 0 vdiff set Shell Size shell Size x hdiff shell Size y vdiff last Shell Size shell get Size else current Page set Size container Size else if hdiff 0 vdiff 0 current Page set Size container Size Ensure that all other pages are invisible including ones that triggered an exception during their creation Control children page Container get Children Control current Control current Page get Control for int i 0 i children length i if children i current Control children i set Visible false Make the new page visible current Page set Visible true if old Page null old Page set Visible false update the dialog controls update return true  showPage IPreferenceNode getPage createPage getPage IPreferencePage newPage getPage newPage currentPage currentPage currentPage okToLeave IPreferencePage oldPage currentPage currentPage newPage currentPage setContainer currentPage getControl ISafeRunnable handleException currentPage createControl pageContainer getControl isNotNull currentPage getControl ISafeRunnable handleException currentPage computeSize contentSize getShell shellSize getSize oldPage pageContainer getClientArea containerSize contentSize containerSize contentSize containerSize shellSize lastShellSize setShellSize shellSize shellSize lastShellSize getSize currentPage setSize containerSize currentPage setSize containerSize pageContainer getChildren currentControl currentPage getControl currentControl setVisible currentPage setVisible oldPage oldPage setVisible
Shows the Page Flipping abort dialog void show Page Flipping Abort Dialog Message Dialog open Error get Shell J Face Resources get String Abort Page Flipping Dialog title NON NLS 1 J Face Resources get String Abort Page Flipping Dialog message NON NLS 1  showPageFlippingAbortDialog MessageDialog openError getShell JFaceResources getString AbortPageFlippingDialog JFaceResources getString AbortPageFlippingDialog
Updates this dialog s controls to reflect the current page protected void update Update the title bar update Title Update the message line update Message Update the buttons update Buttons Saved the selected node in the preferences set Selected Node  updateTitle updateMessage updateButtons setSelectedNode
see org eclipse jface preference I Preference Page Container update Buttons public void update Buttons ok Button set Enabled is Current Page Valid  IPreferencePageContainer updateButtons updateButtons okButton setEnabled isCurrentPageValid
public void update Message String message current Page get Message int message Type I Message Provider NONE if message null current Page instanceof I Message Provider message Type I Message Provider current Page get Message Type String error Message current Page get Error Message if error Message null message error Message message Type I Message Provider ERROR if showing Error we were not previously showing an error showing Error true title Image set Image null title Image set Background J Face Colors get Error Background title Image get Display title Image set Size 0 0 title Image get Parent layout else if showing Error we were previously showing an error showing Error false title Image set Image J Face Resources get Image PREF DLG TITLE IMG title Image compute Size SWT NULL SWT NULL title Image get Parent layout message Area update Text get Shortened String message message Type  updateMessage currentPage getMessage messageType IMessageProvider currentPage IMessageProvider messageType IMessageProvider currentPage getMessageType errorMessage currentPage getErrorMessage errorMessage errorMessage messageType IMessageProvider showingError showingError titleImage setImage titleImage setBackground JFaceColors getErrorBackground titleImage getDisplay titleImage setSize titleImage getParent showingError showingError titleImage setImage JFaceResources getImage PREF_DLG_TITLE_IMG titleImage computeSize titleImage getParent messageArea updateText getShortenedString messageType
private final String ellipsis NON NLS 1 Shortened the message if too long param text Value The messgae value return The shortened string private String get Shortened String String text Value if text Value null return null Display display title Area get Display GC gc new GC display int max Width title Area get Bounds width 28 if gc text Extent text Value x max Width gc dispose return text Value int length text Value length int ellipsis Width gc text Extent ellipsis x int pivot length 2 int start pivot int end pivot 1 while start 0 end length String s1 text Value substring 0 start String s2 text Value substring end length int l1 gc text Extent s1 x int l2 gc text Extent s2 x if l1 ellipsis Width l2 max Width gc dispose return s1 ellipsis s2 start end gc dispose return text Value  textValue getShortenedString textValue textValue titleArea getDisplay maxWidth titleArea getBounds textExtent textValue maxWidth textValue textValue ellipsisWidth textExtent textValue textValue textExtent textExtent ellipsisWidth maxWidth textValue
see org eclipse jface preference I Preference Page Container update Title public void update Title message Area show Title current Page get Title current Page get Image  IPreferencePageContainer updateTitle updateTitle messageArea showTitle currentPage getTitle currentPage getImage
Update the tree to use the specified code Font code param dialog Font the code Font code to use since 3 0 protected void update Tree Font Font dialog Font get Tree Viewer get Control set Font dialog Font  dialogFont updateTreeFont dialogFont getTreeViewer getControl setFont dialogFont

param element must be an instance of code I Preference Node code see org eclipse jface viewers I Label Provider get Text java lang Object public String get Text Object element return I Preference Node element get Label Text  IPreferenceNode ILabelProvider getText getText IPreferenceNode getLabelText
param element must be an instance of code I Preference Node code see org eclipse jface viewers I Label Provider get Image java lang Object public Image get Image Object element return I Preference Node element get Label Image  IPreferenceNode ILabelProvider getImage getImage IPreferenceNode getLabelImage

String separator Creates a new preference manager public Preference Manager this  PreferenceManager
Creates a new preference manager with the given the path separator param separator Char the separator character public Preference Manager char separator Char separator new String new char separator Char  separatorChar PreferenceManager separatorChar separatorChar
Adds the given preference node as a subnode of the node at the given path param path the path param node the node to add return code true code if the add was successful and code false code if there is no contribution at the given path public boolean add To String path I Preference Node node I Preference Node target find path if target null return false target add node return true  addTo IPreferenceNode IPreferenceNode
Adds the given preference node as a subnode of the root param node the node to add which must implement code I Preference Node code public void add To Root I Preference Node node Assert is Not Null node root add node  IPreferenceNode addToRoot IPreferenceNode isNotNull
Recursively enumerates all nodes at or below the given node and adds them to the given list in the given order param node the starting node param sequence a read write list of preference nodes element type code I Preference Node code in the given order param order the traversal order one of code PRE ORDER code and code POST ORDER code protected void build Sequence I Preference Node node List sequence int order if order PRE ORDER sequence add node I Preference Node subnodes node get Sub Nodes for int i 0 i subnodes length i build Sequence subnodes i sequence order if order POST ORDER sequence add node  IPreferenceNode PRE_ORDER POST_ORDER buildSequence IPreferenceNode PRE_ORDER IPreferenceNode getSubNodes buildSequence POST_ORDER
Finds and returns the contribution node at the given path param path the path return the node or code null code if none public I Preference Node find String path Assert is Not Null path String Tokenizer stok new String Tokenizer path separator I Preference Node node root while stok has More Tokens String id stok next Token node node find Sub Node id if node null return null if node root return null return node  IPreferenceNode isNotNull StringTokenizer StringTokenizer IPreferenceNode hasMoreTokens nextToken findSubNode
Returns all preference nodes managed by this manager param order the traversal order one of code PRE ORDER code and code POST ORDER code return a list of preference nodes element type code I Preference Node code in the given order public List get Elements int order Assert is True order PRE ORDER order POST ORDER invalid traversal order NON NLS 1 Array List sequence new Array List I Preference Node subnodes get Root get Sub Nodes for int i 0 i subnodes length i build Sequence subnodes i sequence order return sequence  PRE_ORDER POST_ORDER IPreferenceNode getElements isTrue PRE_ORDER POST_ORDER ArrayList ArrayList IPreferenceNode getRoot getSubNodes buildSequence
Returns the root node Note that the root node is a special internal node that is used to collect together all the nodes that have no parent it is not given out to clients return the root node protected I Preference Node get Root return root  IPreferenceNode getRoot
Removes the prefernece node at the given path param path the path return the node that was removed or code null code if there was no node at the given path public I Preference Node remove String path Assert is Not Null path int index path last Index Of separator if index 1 return root remove path Make sure that the last character in the string isn t the Assert is True index path length 1 Path can not end with a dot NON NLS 1 String parent Path path substring 0 index String id path substring index 1 I Preference Node parent Node find parent Path if parent Node null return null return parent Node remove id  IPreferenceNode isNotNull lastIndexOf isTrue parentPath IPreferenceNode parentNode parentPath parentNode parentNode
Removes the given prefreence node if it is managed by this contribution manager param node the node to remove return code true code if the node was removed and code false code otherwise public boolean remove I Preference Node node Assert is Not Null node return root remove node  IPreferenceNode isNotNull
Removes all contribution nodes known to this manager public void remove All root new Preference Node NON NLS 1  removeAll PreferenceNode

private Image image Creates a new preference node with the given id The new node has no subnodes param id the node id public Preference Node String id Assert is Not Null id this id id  PreferenceNode isNotNull
Creates a preference node with the given id label and image and lazily loaded preference page The preference node assumes sole responsibility for disposing of the image this will happen when the node is disposed param id the node id param label the label used to display the node in the preference dialog s tree param image the image displayed left of the label in the preference dialog s tree or code null code if none param class Name the class name of the preference page this class must implement code I Preference Page code public Preference Node String id String label Image Descriptor image String class Name this id this image Descriptor image Assert is Not Null label this label label this classname class Name  className IPreferencePage PreferenceNode ImageDescriptor className imageDescriptor isNotNull className
Creates a preference node with the given id and preference page The title of the preference page is used for the node label The node will not have an image param id the node id param preference Page the preference page public Preference Node String id I Preference Page preference Page this id Assert is Not Null preference Page page preference Page  preferencePage PreferenceNode IPreferencePage preferencePage isNotNull preferencePage preferencePage
public void add I Preference Node node if sub Nodes null sub Nodes new Array List sub Nodes add node  IPreferenceNode subNodes subNodes ArrayList subNodes
Creates a new instance of the given class code class Name code param class Name return new Object or code null code in case of failures private Object create Object String class Name Assert is Not Null class Name try Class cl Class for Name class Name if cl null return cl new Instance catch Class Not Found Exception e return null catch Instantiation Exception e return null catch Illegal Access Exception e return null catch No Such Method Error e return null return null  className className createObject className isNotNull className forName className newInstance ClassNotFoundException InstantiationException IllegalAccessException NoSuchMethodError
public void create Page page I Preference Page create Object classname if get Label Image null page set Image Descriptor image Descriptor page set Title label  createPage IPreferencePage createObject getLabelImage setImageDescriptor imageDescriptor setTitle
non Javadoc Method declared on I Preference Node public void dispose Resources if image null image dispose image null if page null page dispose page null  IPreferenceNode disposeResources
public I Preference Node find Sub Node String id Assert is Not Null id Assert is True id length 0 if sub Nodes null return null int size sub Nodes size for int i 0 i size i I Preference Node node I Preference Node sub Nodes get i if id equals node get Id return node return null  IPreferenceNode findSubNode isNotNull isTrue subNodes subNodes IPreferenceNode IPreferenceNode subNodes getId
non Javadoc Method declared on I Preference Node public String get Id return this id  IPreferenceNode getId
Returns the image descriptor for this node return the image descriptor protected Image Descriptor get Image Descriptor return image Descriptor  ImageDescriptor getImageDescriptor imageDescriptor
public Image get Label Image if image null image Descriptor null image image Descriptor create Image return image  getLabelImage imageDescriptor imageDescriptor createImage
public String get Label Text if page null return page get Title return label  getLabelText getTitle
non Javadoc Method declared on I Preference Node public I Preference Page get Page return page  IPreferenceNode IPreferencePage getPage
public I Preference Node get Sub Nodes if sub Nodes null return new I Preference Node 0 return I Preference Node sub Nodes to Array new I Preference Node sub Nodes size  IPreferenceNode getSubNodes subNodes IPreferenceNode IPreferenceNode subNodes toArray IPreferenceNode subNodes
public I Preference Node remove String id I Preference Node node find Sub Node id if node null remove node return node  IPreferenceNode IPreferenceNode findSubNode
public boolean remove I Preference Node node if sub Nodes null return false return sub Nodes remove node  IPreferenceNode subNodes subNodes
Set the current page to be new Page param new Page public void set Page I Preference Page new Page page new Page  newPage newPage setPage IPreferencePage newPage newPage

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
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
protected abstract Control create Contents Composite parent 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 NULL 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 NULL layout new Grid Layout layout num Columns 0 layout margin Height 0 layout margin Width 0 button Bar set Layout layout gd new Grid Data gd horizontal Alignment Grid Data 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 height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT 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 data height Hint height Hint data width Hint Math max width Hint defaults Button compute Size SWT DEFAULT SWT DEFAULT true 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 data height Hint height Hint data width Hint Math max width Hint apply Button compute Size SWT DEFAULT SWT DEFAULT true 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  createContents 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 buttonBar setLayout GridData horizontalAlignment GridData buttonBar setLayoutData contributeButtons buttonBar createDefaultAndApplyButton numColumns numColumns JFaceResources getStrings heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH defaultsButton buttonBar defaultsButton setText applyDialogFont defaultsButton GridData GridData GridData HORIZONTAL_ALIGN_FILL heightHint heightHint widthHint widthHint defaultsButton computeSize defaultsButton setLayoutData defaultsButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent performDefaults applyButton buttonBar applyButton setText applyDialogFont applyButton GridData GridData HORIZONTAL_ALIGN_FILL heightHint heightHint widthHint widthHint applyButton computeSize 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 description Label get Parent layout true return get Control compute Size SWT DEFAULT SWT DEFAULT true  doComputeSize doComputeSize descriptionLabel bodySize computeSize GridData GridData descriptionLabel getLayoutData widthHint bodySize descriptionLabel getParent 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
The code Preference Page code implementation of this method declared on code Dialog Page code updates the container public void set Error Message String new Message super set Error Message new Message if get Container null get Container update Message  PreferencePage DialogPage setErrorMessage newMessage setErrorMessage newMessage getContainer getContainer updateMessage
The code Preference Page code implementation of this method declared on code Dialog Page code updates the container 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  PreferencePage DialogPage setMessage newMessage newType setMessage newMessage newType getContainer getContainer updateMessage
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
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 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
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

private String filename Creates an empty preference store p Use the methods code load Input Stream code and code save Input Stream code to load and store this preference store p see load Input Stream see save Output Stream String public Preference Store default Properties new Properties properties new Properties default Properties  InputStream InputStream InputStream OutputStream PreferenceStore defaultProperties defaultProperties
Creates an empty preference store that loads from and saves to the a file p Use the methods code load code and code save code to load and store this preference store p param filename the file name see load see save public Preference Store String filename this Assert is Not Null filename this filename filename  PreferenceStore isNotNull
non Javadoc Method declared on I Preference Store public void add Property Change Listener I Property Change Listener listener listeners add listener  IPreferenceStore addPropertyChangeListener IPropertyChangeListener
non Javadoc Method declared on I Preference Store public boolean contains String name return properties contains Key name default Properties contains Key name  IPreferenceStore containsKey defaultProperties containsKey
public void fire Property Change Event String name Object old Value Object new Value final Object final Listeners this listeners get Listeners Do we need to fire an event if final Listeners length 0 old Value null old Value equals new Value final Property Change Event pe new Property Change Event this name old Value new Value FIXME need to do this without dependency on org eclipse core runtime Platform run new Safe Runnable J Face Resources get String Preference Store change Error NON NLS 1 public void run for int i 0 i final Listeners length i I Property Change Listener l I Property Change Listener final Listeners i l property Change pe  firePropertyChangeEvent oldValue newValue finalListeners getListeners finalListeners oldValue oldValue newValue PropertyChangeEvent PropertyChangeEvent oldValue newValue SafeRunnable JFaceResources getString PreferenceStore changeError finalListeners IPropertyChangeListener IPropertyChangeListener finalListeners propertyChange
non Javadoc Method declared on I Preference Store public boolean get Boolean String name return get Boolean properties name  IPreferenceStore getBoolean getBoolean
Helper function gets boolean for a given name param p param name return boolean private boolean get Boolean Properties p String name String value p null p get Property name null if value null return BOOLEAN DEFAULT DEFAULT if value equals I Preference Store TRUE return true return false  getBoolean getProperty BOOLEAN_DEFAULT_DEFAULT IPreferenceStore
non Javadoc Method declared on I Preference Store public boolean get Default Boolean String name return get Boolean default Properties name  IPreferenceStore getDefaultBoolean getBoolean defaultProperties
non Javadoc Method declared on I Preference Store public double get Default Double String name return get Double default Properties name  IPreferenceStore getDefaultDouble getDouble defaultProperties
non Javadoc Method declared on I Preference Store public float get Default Float String name return get Float default Properties name  IPreferenceStore getDefaultFloat getFloat defaultProperties
non Javadoc Method declared on I Preference Store public int get Default Int String name return get Int default Properties name  IPreferenceStore getDefaultInt getInt defaultProperties
non Javadoc Method declared on I Preference Store public long get Default Long String name return get Long default Properties name  IPreferenceStore getDefaultLong getLong defaultProperties
non Javadoc Method declared on I Preference Store public String get Default String String name return get String default Properties name  IPreferenceStore getDefaultString getString defaultProperties
non Javadoc Method declared on I Preference Store public double get Double String name return get Double properties name  IPreferenceStore getDouble getDouble
Helper function gets double for a given name param p param name return double private double get Double Properties p String name String value p null p get Property name null if value null return DOUBLE DEFAULT DEFAULT double ival DOUBLE DEFAULT DEFAULT try ival new Double value double Value catch Number Format Exception e return ival  getDouble getProperty DOUBLE_DEFAULT_DEFAULT DOUBLE_DEFAULT_DEFAULT doubleValue NumberFormatException
non Javadoc Method declared on I Preference Store public float get Float String name return get Float properties name  IPreferenceStore getFloat getFloat
Helper function gets float for a given name param p param name return float private float get Float Properties p String name String value p null p get Property name null if value null return FLOAT DEFAULT DEFAULT float ival FLOAT DEFAULT DEFAULT try ival new Float value float Value catch Number Format Exception e return ival  getFloat getProperty FLOAT_DEFAULT_DEFAULT FLOAT_DEFAULT_DEFAULT floatValue NumberFormatException
non Javadoc Method declared on I Preference Store public int get Int String name return get Int properties name  IPreferenceStore getInt getInt
Helper function gets int for a given name param p param name return int private int get Int Properties p String name String value p null p get Property name null if value null return INT DEFAULT DEFAULT int ival 0 try ival Integer parse Int value catch Number Format Exception e return ival  getInt getProperty INT_DEFAULT_DEFAULT parseInt NumberFormatException
non Javadoc Method declared on I Preference Store public long get Long String name return get Long properties name  IPreferenceStore getLong getLong
Helper function gets long for a given name param p param name return private long get Long Properties p String name String value p null p get Property name null if value null return LONG DEFAULT DEFAULT long ival LONG DEFAULT DEFAULT try ival Long parse Long value catch Number Format Exception e return ival  getLong getProperty LONG_DEFAULT_DEFAULT LONG_DEFAULT_DEFAULT parseLong NumberFormatException
non Javadoc Method declared on I Preference Store public String get String String name return get String properties name  IPreferenceStore getString getString
Helper function gets string for a given name param p param name return private String get String Properties p String name String value p null p get Property name null if value null return STRING DEFAULT DEFAULT return value  getString getProperty STRING_DEFAULT_DEFAULT
non Javadoc Method declared on I Preference Store public boolean is Default String name return properties contains Key name default Properties contains Key name  IPreferenceStore isDefault containsKey defaultProperties containsKey
Prints the contents of this preference store to the given print stream param out the print stream public void list Print Stream out properties list out  PrintStream
Prints the contents of this preference store to the given print writer param out the print writer public void list Print Writer out properties list out  PrintWriter
Loads this preference store from the file established in the constructor code Preference Store java lang String code or by code set File Name code Default preference values are not affected exception java io IO Exception if there is a problem loading this store public void load throws IO Exception if filename null throw new IO Exception File name not specified NON NLS 1 File Input Stream in new File Input Stream filename load in in close  PreferenceStore setFileName IOException IOException IOException FileInputStream FileInputStream
Loads this preference store from the given input stream Default preference values are not affected param in the input stream exception java io IO Exception if there is a problem loading this store public void load Input Stream in throws IO Exception properties load in dirty false  IOException InputStream IOException
non Javadoc Method declared on I Preference Store public boolean needs Saving return dirty  IPreferenceStore needsSaving
Returns an enumeration of all preferences known to this store which have current values other than their default value return an array of preference names public String preference Names Array List list new Array List Enumeration enum properties property Names while enum has More Elements list add enum next Element return String list to Array new String list size  preferenceNames ArrayList ArrayList propertyNames hasMoreElements nextElement toArray
public void put Value String name String value String old Value get String name if old Value null old Value equals value set Value properties name value dirty true  putValue oldValue getString oldValue oldValue setValue
non Javadoc Method declared on I Preference Store public void remove Property Change Listener I Property Change Listener listener listeners remove listener  IPreferenceStore removePropertyChangeListener IPropertyChangeListener
Saves the non default valued preferences known to this preference store to the file from which they were originally loaded exception java io IO Exception if there is a problem saving this store public void save throws IO Exception if filename null throw new IO Exception File name not specified NON NLS 1 File Output Stream out null try out new File Output Stream filename save out null finally if out null out close  IOException IOException IOException FileOutputStream FileOutputStream
Saves this preference store to the given output stream The given string is inserted as header information param out the output stream param header the header exception java io IO Exception if there is a problem saving this store public void save Output Stream out String header throws IO Exception properties store out header dirty false  IOException OutputStream IOException
non Javadoc Method declared on I Preference Store public void set Default String name double value set Value default Properties name value  IPreferenceStore setDefault setValue defaultProperties
non Javadoc Method declared on I Preference Store public void set Default String name float value set Value default Properties name value  IPreferenceStore setDefault setValue defaultProperties
non Javadoc Method declared on I Preference Store public void set Default String name int value set Value default Properties name value  IPreferenceStore setDefault setValue defaultProperties
non Javadoc Method declared on I Preference Store public void set Default String name long value set Value default Properties name value  IPreferenceStore setDefault setValue defaultProperties
non Javadoc Method declared on I Preference Store public void set Default String name String value set Value default Properties name value  IPreferenceStore setDefault setValue defaultProperties
non Javadoc Method declared on I Preference Store public void set Default String name boolean value set Value default Properties name value  IPreferenceStore setDefault setValue defaultProperties
Sets the name of the file used when loading and storing this preference store p Afterward the methods code load code and code save code can be used to load and store this preference store p param name the file name see load see save public void set Filename String name filename name  setFilename
public void set To Default String name Object old Value properties get name properties remove name dirty true Object new Value null if default Properties null new Value default Properties get name fire Property Change Event name old Value new Value  setToDefault oldValue newValue defaultProperties newValue defaultProperties firePropertyChangeEvent oldValue newValue
public void set Value String name double value double old Value get Double name if old Value value set Value properties name value dirty true fire Property Change Event name new Double old Value new Double value  setValue oldValue getDouble oldValue setValue firePropertyChangeEvent oldValue
public void set Value String name float value float old Value get Float name if old Value value set Value properties name value dirty true fire Property Change Event name new Float old Value new Float value  setValue oldValue getFloat oldValue setValue firePropertyChangeEvent oldValue
public void set Value String name int value int old Value get Int name if old Value value set Value properties name value dirty true fire Property Change Event name new Integer old Value new Integer value  setValue oldValue getInt oldValue setValue firePropertyChangeEvent oldValue
public void set Value String name long value long old Value get Long name if old Value value set Value properties name value dirty true fire Property Change Event name new Long old Value new Long value  setValue oldValue getLong oldValue setValue firePropertyChangeEvent oldValue
public void set Value String name String value String old Value get String name if old Value null old Value equals value set Value properties name value dirty true fire Property Change Event name old Value value  setValue oldValue getString oldValue oldValue setValue firePropertyChangeEvent oldValue
public void set Value String name boolean value boolean old Value get Boolean name if old Value value set Value properties name value dirty true fire Property Change Event name new Boolean old Value new Boolean value  setValue oldValue getBoolean oldValue setValue firePropertyChangeEvent oldValue
Helper method sets value for a given name param p param name param value private void set Value Properties p String name double value Assert is True p null p put name Double to String value  setValue isTrue toString
Helper method sets value for a given name param p param name param value private void set Value Properties p String name float value Assert is True p null p put name Float to String value  setValue isTrue toString
Helper method sets value for a given name param p param name param value private void set Value Properties p String name int value Assert is True p null p put name Integer to String value  setValue isTrue toString
Helper method sets the value for a given name param p param name param value private void set Value Properties p String name long value Assert is True p null p put name Long to String value  setValue isTrue toString
Helper method sets the value for a given name param p param name param value private void set Value Properties p String name String value Assert is True p null value null p put name value  setValue isTrue
Helper method sets the value for a given name param p param name param value private void set Value Properties p String name boolean value Assert is True p null p put name value true I Preference Store TRUE I Preference Store FALSE  setValue isTrue IPreferenceStore IPreferenceStore

private boolean use Group Creates a new radio group field editor protected Radio Group Field Editor  useGroup RadioGroupFieldEditor
Creates a radio group field editor This constructor does not use a code Group code to contain the radio buttons It is equivalent to using the following constructor with code false code for the code use Group code argument p Example usage pre Radio Group Field Editor editor new Radio Group Field Editor General Page Double Click res Name 1 new String Open Browser open Expand Tree expand parent pre p param name the name of the preference this field editor works on param label Text the label text of the field editor param num Columns the number of columns for the radio button presentation param label And Values list of radio button label value entries the value is returned when the radio button is selected param parent the parent of the field editor s control public Radio Group Field Editor String name String label Text int num Columns String label And Values Composite parent this name label Text num Columns label And Values parent false  useGroup RadioGroupFieldEditor RadioGroupFieldEditor GeneralPage DoubleClick resName labelText numColumns labelAndValues RadioGroupFieldEditor labelText numColumns labelAndValues labelText numColumns labelAndValues
Creates a radio group field editor p Example usage pre Radio Group Field Editor editor new Radio Group Field Editor General Page Double Click res Name 1 new String Open Browser open Expand Tree expand parent true pre p param name the name of the preference this field editor works on param label Text the label text of the field editor param num Columns the number of columns for the radio button presentation param label And Values list of radio button label value entries the value is returned when the radio button is selected param parent the parent of the field editor s control param use Group whether to use a Group control to contain the radio buttons public Radio Group Field Editor String name String label Text int num Columns String label And Values Composite parent boolean use Group init name label Text Assert is True check Array label And Values this labels And Values label And Values this num Columns num Columns this use Group use Group create Control parent  RadioGroupFieldEditor RadioGroupFieldEditor GeneralPage DoubleClick resName labelText numColumns labelAndValues useGroup RadioGroupFieldEditor labelText numColumns labelAndValues useGroup labelText isTrue checkArray labelAndValues labelsAndValues labelAndValues numColumns numColumns useGroup useGroup createControl
protected void adjust For Num Columns int num Columns Control control get Label Control if control null Grid Data control get Layout Data horizontal Span num Columns Grid Data radio Box get Layout Data horizontal Span num Columns  adjustForNumColumns numColumns getLabelControl GridData getLayoutData horizontalSpan numColumns GridData radioBox getLayoutData horizontalSpan numColumns
Checks whether given code String code is of type code String 2 code param table return code true code if it is ok and code false code otherwise private boolean check Array String table if table null return false for int i 0 i table length i String array table i if array null array length 2 return false return true  checkArray
protected void do Fill Into Grid Composite parent int num Columns if use Group Control control get Radio Box Control parent Grid Data gd new Grid Data Grid Data FILL HORIZONTAL control set Layout Data gd else Control control get Label Control parent Grid Data gd new Grid Data gd horizontal Span num Columns control set Layout Data gd control get Radio Box Control parent gd new Grid Data gd horizontal Span num Columns gd horizontal Indent indent control set Layout Data gd  doFillIntoGrid numColumns useGroup getRadioBoxControl GridData GridData GridData FILL_HORIZONTAL setLayoutData getLabelControl GridData GridData horizontalSpan numColumns setLayoutData getRadioBoxControl GridData horizontalSpan numColumns horizontalIndent setLayoutData
Method declared on Field Editor protected void do Load update Value get Preference Store get String get Preference Name  FieldEditor doLoad updateValue getPreferenceStore getString getPreferenceName
Method declared on Field Editor protected void do Load Default update Value get Preference Store get Default String get Preference Name  FieldEditor doLoadDefault updateValue getPreferenceStore getDefaultString getPreferenceName
protected void do Store if value null get Preference Store set To Default get Preference Name return get Preference Store set Value get Preference Name value  doStore getPreferenceStore setToDefault getPreferenceName getPreferenceStore setValue getPreferenceName
Method declared on Field Editor public int get Number Of Controls return 1  FieldEditor getNumberOfControls
radio add Selection Listener new Selection Adapter public void widget Selected Selection Event event String old Value value value String event widget get Data set Presents Default Value false fire Value Changed VALUE old Value value  addSelectionListener SelectionAdapter widgetSelected SelectionEvent oldValue getData setPresentsDefaultValue fireValueChanged oldValue
radio Box add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event radio Box null radio Buttons null  radioBox addDisposeListener DisposeListener widgetDisposed DisposeEvent radioBox radioButtons
Returns this field editor s radio group control param parent The parent to create the radio Box in return the radio group control public Composite get Radio Box Control Composite parent if radio Box null Font font parent get Font if use Group Group group new Group parent SWT NONE group set Font font String text get Label Text if text null group set Text text radio Box group Grid Layout layout new Grid Layout layout horizontal Spacing HORIZONTAL GAP layout num Columns num Columns radio Box set Layout layout else radio Box new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 layout horizontal Spacing HORIZONTAL GAP layout num Columns num Columns radio Box set Layout layout radio Box set Font font radio Buttons new Button labels And Values length for int i 0 i labels And Values length i Button radio new Button radio Box SWT RADIO SWT LEFT radio Buttons i radio String label And Value labels And Values i radio set Text label And Value 0 radio set Data label And Value 1 radio set Font font radio add Selection Listener new Selection Adapter public void widget Selected Selection Event event String old Value value value String event widget get Data set Presents Default Value false fire Value Changed VALUE old Value value radio Box add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event radio Box null radio Buttons null else check Parent radio Box parent return radio Box  radioBox getRadioBoxControl radioBox getFont useGroup setFont getLabelText setText radioBox GridLayout GridLayout horizontalSpacing HORIZONTAL_GAP numColumns numColumns radioBox setLayout radioBox GridLayout GridLayout marginWidth marginHeight horizontalSpacing HORIZONTAL_GAP numColumns numColumns radioBox setLayout radioBox setFont radioButtons labelsAndValues labelsAndValues radioBox radioButtons labelAndValue labelsAndValues setText labelAndValue setData labelAndValue setFont addSelectionListener SelectionAdapter widgetSelected SelectionEvent oldValue getData setPresentsDefaultValue fireValueChanged oldValue radioBox addDisposeListener DisposeListener widgetDisposed DisposeEvent radioBox radioButtons checkParent radioBox radioBox
Sets the indent used for the first column of the radion button matrix param indent the indent in pixels public void set Indent int indent if indent 0 this indent 0 else this indent indent  setIndent
Select the radio button that conforms to the given value param selected Value the selected value private void update Value String selected Value this value selected Value if radio Buttons null return if this value null boolean found false for int i 0 i radio Buttons length i Button radio radio Buttons i boolean selection false if String radio get Data equals this value selection true found true radio set Selection selection if found return We weren t able to find the value So we select the first radio button as a default if radio Buttons length 0 radio Buttons 0 set Selection true this value String radio Buttons 0 get Data return  selectedValue updateValue selectedValue selectedValue radioButtons radioButtons radioButtons getData setSelection radioButtons radioButtons setSelection radioButtons getData
public void set Enabled boolean enabled Composite parent if use Group super set Enabled enabled parent for int i 0 i radio Buttons length i radio Buttons i set Enabled enabled  setEnabled useGroup setEnabled radioButtons radioButtons setEnabled

Creates a scale field editor param name the name of the preference this field editor works on param label Text the label text of the field editor param parent the parent of the field editor s control public Scale Field Editor String name String label Text Composite parent super name label Text parent set Default Values  labelText ScaleFieldEditor labelText labelText setDefaultValues
Creates a scale field editor with particular scale values param name the name of the preference this field editor works on param label Text the label text of the field editor param parent the parent of the field editor s control param min the value used for Scale set Minimum int param max the value used for Scale set Maximum int param increment the value used for Scale set Increment int param page Increment the value used for Scale set Page Increment int public Scale Field Editor String name String label Text Composite parent int min int max int increment int page Increment super name label Text parent set Values min max increment page Increment  labelText setMinimum setMaximum setIncrement pageIncrement setPageIncrement ScaleFieldEditor labelText pageIncrement labelText setValues pageIncrement
see org eclipse jface preference Field Editor adjust For Num Columns int protected void adjust For Num Columns int num Columns Grid Data scale get Layout Data horizontal Span num Columns 1  FieldEditor adjustForNumColumns adjustForNumColumns numColumns GridData getLayoutData horizontalSpan numColumns
protected void do Fill Into Grid Composite parent int num Columns Control control get Label Control parent Grid Data gd new Grid Data control set Layout Data gd scale get Scale Control parent gd new Grid Data Grid Data FILL HORIZONTAL gd vertical Alignment Grid Data FILL gd horizontal Span num Columns 1 gd grab Excess Horizontal Space true scale set Layout Data gd update Scale  doFillIntoGrid numColumns getLabelControl GridData GridData setLayoutData getScaleControl GridData GridData FILL_HORIZONTAL verticalAlignment GridData horizontalSpan numColumns grabExcessHorizontalSpace setLayoutData updateScale
protected void do Load if scale null int value get Preference Store get Int get Preference Name scale set Selection value old Value value  doLoad getPreferenceStore getInt getPreferenceName setSelection oldValue
protected void do Load Default if scale null int value get Preference Store get Default Int get Preference Name scale set Selection value value Changed  doLoadDefault getPreferenceStore getDefaultInt getPreferenceName setSelection valueChanged
see org eclipse jface preference Field Editor do Store protected void do Store get Preference Store set Value get Preference Name scale get Selection  FieldEditor doStore doStore getPreferenceStore setValue getPreferenceName getSelection
Returns the value that will be used for Scale set Increment int return the value see org eclipse swt widgets Scale set Increment int public int get Increment return increment Value  setIncrement setIncrement getIncrement incrementValue
Returns the value that will be used for Scale set Maximum int return the value see org eclipse swt widgets Scale set Maximum int public int get Maximum return max Value  setMaximum setMaximum getMaximum maxValue
Returns the value that will be used for Scale set Minimum int return the value see org eclipse swt widgets Scale set Minimum int public int get Minimum return min Value  setMinimum setMinimum getMinimum minValue
see org eclipse jface preference Field Editor get Number Of Controls public int get Number Of Controls return 2  FieldEditor getNumberOfControls getNumberOfControls
Returns the value that will be used for Scale set Page Increment int return the value see org eclipse swt widgets Scale set Page Increment int public int get Page Increment return page Increment Value  setPageIncrement setPageIncrement getPageIncrement pageIncrementValue
Returns this field editor s scale control return the scale control or code null code if no scale field is created yet public Scale get Scale Control return scale  getScaleControl
scale set Font parent get Font scale add Selection Listener new Selection Adapter public void widget Selected Selection Event event value Changed  setFont getFont addSelectionListener SelectionAdapter widgetSelected SelectionEvent valueChanged
scale add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event scale null  addDisposeListener DisposeListener widgetDisposed DisposeEvent
Returns this field editor s scale control The control is created if it does not yet exist param parent the parent return the scale control private Scale get Scale Control Composite parent if scale null scale new Scale parent SWT HORIZONTAL scale set Font parent get Font scale add Selection Listener new Selection Adapter public void widget Selected Selection Event event value Changed scale add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event scale null else check Parent scale parent return scale  getScaleControl setFont getFont addSelectionListener SelectionAdapter widgetSelected SelectionEvent valueChanged addDisposeListener DisposeListener widgetDisposed DisposeEvent checkParent
Set default values for the various scale fields These defaults are br ul li Minimum 0 li Maximim 10 li Increment 1 li Page Increment 1 ul private void set Default Values set Values 0 10 1 1  setDefaultValues setValues
public void set Focus if scale null scale is Disposed scale set Focus  setFocus isDisposed setFocus
Set the value to be used for Scale set Increment int and update the scale param increment a value greater than 0 see org eclipse swt widgets Scale set Increment int public void set Increment int increment this increment Value increment update Scale  setIncrement setIncrement setIncrement incrementValue updateScale
Set the value to be used for Scale set Maximum int and update the scale param max a value greater than 0 see org eclipse swt widgets Scale set Maximum int public void set Maximum int max this max Value max update Scale  setMaximum setMaximum setMaximum maxValue updateScale
Set the value to be used for Scale set Minumum int and update the scale param min a value greater than 0 see org eclipse swt widgets Scale set Minimum int public void set Minimum int min this min Value min update Scale  setMinumum setMinimum setMinimum minValue updateScale
Set the value to be used for Scale set Page Increment int and update the scale param page Increment a value greater than 0 see org eclipse swt widgets Scale set Page Increment int public void set Page Increment int page Increment this page Increment Value page Increment update Scale  setPageIncrement pageIncrement setPageIncrement setPageIncrement pageIncrement pageIncrementValue pageIncrement updateScale
Set all Scale values param min the value used for Scale set Minimum int param max the value used for Scale set Maximum int param increment the value used for Scale set Increment int param page Increment the value used for Scale set Page Increment int private void set Values int min int max int increment int page Increment this increment Value increment this max Value max this min Value min this page Increment Value page Increment update Scale  setMinimum setMaximum setIncrement pageIncrement setPageIncrement setValues pageIncrement incrementValue maxValue minValue pageIncrementValue pageIncrement updateScale
Update the scale particulars with set values private void update Scale if scale null scale is Disposed scale set Minimum get Minimum scale set Maximum get Maximum scale set Increment get Increment scale set Page Increment get Page Increment  updateScale isDisposed setMinimum getMinimum setMaximum getMaximum setIncrement getIncrement setPageIncrement getPageIncrement
Informs this field editor s listener if it has one about a change to the value code VALUE code property provided that the old and new values are different p This hook is em not em called when the scale is initialized or reset to the default value from the preference store p protected void value Changed set Presents Default Value false int new Value scale get Selection if new Value old Value fire State Changed IS VALID false true fire Value Changed VALUE new Integer old Value new Integer new Value old Value new Value  valueChanged setPresentsDefaultValue newValue getSelection newValue oldValue fireStateChanged IS_VALID fireValueChanged oldValue newValue oldValue newValue

private String change Button Text Creates a new string button field editor protected String Button Field Editor  changeButtonText StringButtonFieldEditor
Creates a string button field editor param name the name of the preference this field editor works on param label Text the label text of the field editor param parent the parent of the field editor s control protected String Button Field Editor String name String label Text Composite parent init name label Text create Control parent  labelText StringButtonFieldEditor labelText labelText createControl
Method declared on Field Editor protected void adjust For Num Columns int num Columns Grid Data get Text Control get Layout Data horizontal Span num Columns 2  FieldEditor adjustForNumColumns numColumns GridData getTextControl getLayoutData horizontalSpan numColumns
Notifies that this field editor s change button has been pressed p Subclasses must implement this method to provide a corresponding new string for the text field If the returned value is code null code the currently displayed value remains p return the new string to display or code null code to leave the old string showing 
protected void do Fill Into Grid Composite parent int num Columns super do Fill Into Grid parent num Columns 1 change Button get Change Control parent Grid Data gd new Grid Data gd horizontal Alignment Grid Data FILL gd height Hint convert VerticalDL Us To Pixels change Button I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels change Button I Dialog Constants BUTTON WIDTH gd width Hint Math max width Hint change Button compute Size SWT DEFAULT SWT DEFAULT true x change Button set Layout Data gd  doFillIntoGrid numColumns doFillIntoGrid numColumns changeButton getChangeControl GridData GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels changeButton IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels changeButton IDialogConstants BUTTON_WIDTH widthHint widthHint changeButton computeSize changeButton setLayoutData
Get the change control Create it in parent if required param parent return Button protected Button get Change Control Composite parent if change Button null change Button new Button parent SWT PUSH if change Button Text null change Button Text J Face Resources get String open Change NON NLS 1 change Button set Text change Button Text change Button set Font parent get Font change Button add Selection Listener new Selection Adapter public void widget Selected Selection Event evt String new Value change Pressed if new Value null set String Value new Value change Button add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event change Button null else check Parent change Button parent return change Button  getChangeControl changeButton changeButton changeButtonText changeButtonText JFaceResources getString openChange changeButton setText changeButtonText changeButton setFont getFont changeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent newValue changePressed newValue setStringValue newValue changeButton addDisposeListener DisposeListener widgetDisposed DisposeEvent changeButton checkParent changeButton changeButton
Method declared on Field Editor public int get Number Of Controls return 3  FieldEditor getNumberOfControls
Returns this field editor s shell return the shell protected Shell get Shell if change Button null return null return change Button get Shell  getShell changeButton changeButton getShell
Sets the text of the change button param text the new text public void set Change Button Text String text Assert is Not Null text change Button Text text if change Button null change Button set Text text  setChangeButtonText isNotNull changeButtonText changeButton changeButton setText
public void set Enabled boolean enabled Composite parent super set Enabled enabled parent if change Button null change Button set Enabled enabled  setEnabled setEnabled changeButton changeButton setEnabled

private int validate Strategy VALIDATE ON KEY STROKE Creates a new string field editor protected String Field Editor  validateStrategy VALIDATE_ON_KEY_STROKE StringFieldEditor
Creates a string field editor Use the method code set Text Limit code to limit the text param name the name of the preference this field editor works on param label Text the label text of the field editor param width the width of the text input field in characters or code UNLIMITED code for no limit param strategy either code VALIDATE ON KEY STROKE code to perform on the fly checking the default or code VALIDATE ON FOCUS LOST code to perform validation only after the text has been typed in param parent the parent of the field editor s control since 2 0 public String Field Editor String name String label Text int width int strategy Composite parent init name label Text width In Chars width set Validate Strategy strategy is Valid false error Message J Face Resources get String String Field Editor error Message NON NLS 1 create Control parent  setTextLimit labelText VALIDATE_ON_KEY_STROKE VALIDATE_ON_FOCUS_LOST StringFieldEditor labelText labelText widthInChars setValidateStrategy isValid errorMessage JFaceResources getString StringFieldEditor errorMessage createControl
Creates a string field editor Use the method code set Text Limit code to limit the text param name the name of the preference this field editor works on param label Text the label text of the field editor param width the width of the text input field in characters or code UNLIMITED code for no limit param parent the parent of the field editor s control public String Field Editor String name String label Text int width Composite parent this name label Text width VALIDATE ON KEY STROKE parent  setTextLimit labelText StringFieldEditor labelText labelText VALIDATE_ON_KEY_STROKE
Creates a string field editor of unlimited width Use the method code set Text Limit code to limit the text param name the name of the preference this field editor works on param label Text the label text of the field editor param parent the parent of the field editor s control public String Field Editor String name String label Text Composite parent this name label Text UNLIMITED parent  setTextLimit labelText StringFieldEditor labelText labelText
protected void adjust For Num Columns int num Columns Grid Data gd Grid Data text Field get Layout Data gd horizontal Span num Columns 1 We only grab excess space if we have to If another field editor has more columns then we assume it is setting the width gd grab Excess Horizontal Space gd horizontal Span 1  adjustForNumColumns numColumns GridData GridData textField getLayoutData horizontalSpan numColumns grabExcessHorizontalSpace horizontalSpan
Checks whether the text input field contains a valid value or not return code true code if the field value is valid and code false code if invalid protected boolean check State boolean result false if empty String Allowed result true if text Field null result false String txt text Field get Text if txt null result false result txt trim length 0 empty String Allowed call hook for subclasses result result do Check State if result clear Error Message else show Error Message error Message return result  checkState emptyStringAllowed textField textField getText emptyStringAllowed doCheckState clearErrorMessage showErrorMessage errorMessage
Hook for subclasses to do specific state checks p The default implementation of this framework method does nothing and returns code true code Subclasses should override this method to specific state checks p return code true code if the field value is valid and code false code if invalid protected boolean do Check State return true  doCheckState
Fills this field editor s basic controls into the given parent p The string field implementation of this code Field Editor code framework method contributes the text field Subclasses may override but must call code super do Fill Into Grid code p protected void do Fill Into Grid Composite parent int num Columns get Label Control parent text Field get Text Control parent Grid Data gd new Grid Data gd horizontal Span num Columns 1 if width In Chars UNLIMITED GC gc new GC text Field try Point extent gc text Extent X NON NLS 1 gd width Hint width In Chars extent x finally gc dispose else gd horizontal Alignment Grid Data FILL gd grab Excess Horizontal Space true text Field set Layout Data gd  FieldEditor doFillIntoGrid doFillIntoGrid numColumns getLabelControl textField getTextControl GridData GridData horizontalSpan numColumns widthInChars textField textExtent widthHint widthInChars horizontalAlignment GridData grabExcessHorizontalSpace textField setLayoutData
protected void do Load if text Field null String value get Preference Store get String get Preference Name text Field set Text value old Value value  doLoad textField getPreferenceStore getString getPreferenceName textField setText oldValue
protected void do Load Default if text Field null String value get Preference Store get Default String get Preference Name text Field set Text value value Changed  doLoadDefault textField getPreferenceStore getDefaultString getPreferenceName textField setText valueChanged
Method declared on Field Editor protected void do Store get Preference Store set Value get Preference Name text Field get Text  FieldEditor doStore getPreferenceStore setValue getPreferenceName textField getText
Returns the error message that will be displayed when and if an error occurs return the error message or code null code if none public String get Error Message return error Message  getErrorMessage errorMessage
Method declared on Field Editor public int get Number Of Controls return 2  FieldEditor getNumberOfControls
Returns the field editor s value return the current value public String get String Value if text Field null return text Field get Text else return get Preference Store get String get Preference Name  getStringValue textField textField getText getPreferenceStore getString getPreferenceName
Returns this field editor s text control return the text control or code null code if no text field is created yet protected Text get Text Control return text Field  getTextControl textField
see org eclipse swt events Key Adapter key Released org eclipse swt events Key Event public void key Released Key Event e value Changed  KeyAdapter keyReleased KeyEvent keyReleased KeyEvent valueChanged
case VALIDATE ON FOCUS LOST text Field add Key Listener new Key Adapter public void key Pressed Key Event e clear Error Message  VALIDATE_ON_FOCUS_LOST textField addKeyListener KeyAdapter keyPressed KeyEvent clearErrorMessage
text Field add Focus Listener new Focus Adapter public void focus Gained Focus Event e refresh Valid State  textField addFocusListener FocusAdapter focusGained FocusEvent refreshValidState
refresh Valid State public void focus Lost Focus Event e value Changed clear Error Message  refreshValidState focusLost FocusEvent valueChanged clearErrorMessage
text Field add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event text Field null  textField addDisposeListener DisposeListener widgetDisposed DisposeEvent textField
Returns this field editor s text control p The control is created if it does not yet exist p param parent the parent return the text control public Text get Text Control Composite parent if text Field null text Field new Text parent SWT SINGLE SWT BORDER text Field set Font parent get Font switch validate Strategy case VALIDATE ON KEY STROKE text Field add Key Listener new Key Adapter non Javadoc see org eclipse swt events Key Adapter key Released org eclipse swt events Key Event public void key Released Key Event e value Changed break case VALIDATE ON FOCUS LOST text Field add Key Listener new Key Adapter public void key Pressed Key Event e clear Error Message text Field add Focus Listener new Focus Adapter public void focus Gained Focus Event e refresh Valid State public void focus Lost Focus Event e value Changed clear Error Message break default Assert is True false Unknown validate strategy NON NLS 1 text Field add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event text Field null if text Limit 0 Only set limits above 0 see SWT spec text Field set Text Limit text Limit else check Parent text Field parent return text Field  getTextControl textField textField textField setFont getFont validateStrategy VALIDATE_ON_KEY_STROKE textField addKeyListener KeyAdapter KeyAdapter keyReleased KeyEvent keyReleased KeyEvent valueChanged VALIDATE_ON_FOCUS_LOST textField addKeyListener KeyAdapter keyPressed KeyEvent clearErrorMessage textField addFocusListener FocusAdapter focusGained FocusEvent refreshValidState focusLost FocusEvent valueChanged clearErrorMessage isTrue textField addDisposeListener DisposeListener widgetDisposed DisposeEvent textField textLimit textField setTextLimit textLimit checkParent textField textField
Returns whether an empty string is a valid value return code true code if an empty string is a valid value and code false code if an empty string is invalid see set Empty String Allowed public boolean is Empty String Allowed return empty String Allowed  setEmptyStringAllowed isEmptyStringAllowed emptyStringAllowed
Method declared on Field Editor public boolean is Valid return is Valid  FieldEditor isValid isValid
Method declared on Field Editor protected void refresh Valid State is Valid check State  FieldEditor refreshValidState isValid checkState
Sets whether the empty string is a valid value or not param b code true code if the empty string is allowed and code false code if it is considered invalid public void set Empty String Allowed boolean b empty String Allowed b  setEmptyStringAllowed emptyStringAllowed
Sets the error message that will be displayed when and if an error occurs param message the error message public void set Error Message String message error Message message  setErrorMessage errorMessage
public void set Focus if text Field null text Field set Focus  setFocus textField textField setFocus
Sets this field editor s value param value the new value or code null code meaning the empty string public void set String Value String value if text Field null if value null value NON NLS 1 old Value text Field get Text if old Value equals value text Field set Text value value Changed  setStringValue textField oldValue textField getText oldValue textField setText valueChanged
Sets this text field s text limit param limit the limit on the number of character in the text input field or code UNLIMITED code for no limit public void set Text Limit int limit text Limit limit if text Field null text Field set Text Limit limit  setTextLimit textLimit textField textField setTextLimit
Sets the strategy for validating the text p Calling this method has no effect after code create Part Control code is called Thus this method is really only useful for subclasses to call in their constructor However it has public visibility for backward compatibility p param value either code VALIDATE ON KEY STROKE code to perform on the fly checking the default or code VALIDATE ON FOCUS LOST code to perform validation only after the text has been typed in public void set Validate Strategy int value Assert is True value VALIDATE ON FOCUS LOST value VALIDATE ON KEY STROKE validate Strategy value  createPartControl VALIDATE_ON_KEY_STROKE VALIDATE_ON_FOCUS_LOST setValidateStrategy isTrue VALIDATE_ON_FOCUS_LOST VALIDATE_ON_KEY_STROKE validateStrategy
Shows the error message set via code set Error Message code public void show Error Message show Error Message error Message  setErrorMessage showErrorMessage showErrorMessage errorMessage
Informs this field editor s listener if it has one about a change to the value code VALUE code property provided that the old and new values are different p This hook is em not em called when the text is initialized or reset to the default value from the preference store p protected void value Changed set Presents Default Value false boolean old State is Valid refresh Valid State if is Valid old State fire State Changed IS VALID old State is Valid String new Value text Field get Text if new Value equals old Value fire Value Changed VALUE old Value new Value old Value new Value  valueChanged setPresentsDefaultValue oldState isValid refreshValidState isValid oldState fireStateChanged IS_VALID oldState isValid newValue textField getText newValue oldValue fireValueChanged oldValue newValue oldValue newValue
see Field Editor set Enabled boolean Composite public void set Enabled boolean enabled Composite parent super set Enabled enabled parent get Text Control parent set Enabled enabled  FieldEditor setEnabled setEnabled setEnabled getTextControl setEnabled

protected Runnable display Runnable new Runnable public void run clear Caches  displayRunnable clearCaches
Create a new instance of the receiver that is hooked to the current display see org eclipse swt widgets Display get Current public Color Registry this Display get Current  getCurrent ColorRegistry getCurrent
Create a new instance of the receiver param display the code Display code to hook into public Color Registry Display display Assert is Not Null display this display display hook Display Dispose  ColorRegistry isNotNull hookDisplayDispose
Create a new code Color code on the receivers code Display code param symbolic Name the symbolic color name param rgb the code RGB code data for the color return the new code Color code object private Color create Color String symbolic Name RGB rgb return new Color display rgb  symbolicName createColor symbolicName
Dispose of all of the code Color code s in this iterator param Iterator over code Collection code of code Color code private void dispose Colors Iterator iterator while iterator has Next Object next iterator next Color next dispose  disposeColors hasNext
Returns the code color code associated with the given symbolic color name or code null code if no such definition exists param symbolic Name symbolic color name return the code Color code or code null code public Color get String symbolic Name Assert is Not Null symbolic Name Object result string To Color get symbolic Name if result null return Color result Color color null result string ToRGB get symbolic Name if result null return null color create Color symbolic Name RGB result string To Color put symbolic Name color return color  symbolicName symbolicName isNotNull symbolicName stringToColor symbolicName stringToRGB symbolicName createColor symbolicName stringToColor symbolicName
see org eclipse jface resource Resource Registry get Key Set public Set get Key Set return Collections unmodifiable Set string ToRGB key Set  ResourceRegistry getKeySet getKeySet unmodifiableSet stringToRGB keySet
Returns the color data associated with the given symbolic color name param symbolic Name symbolic color name return the code RGB code data public RGB getRGB String symbolic Name Assert is Not Null symbolic Name return RGB string ToRGB get symbolic Name  symbolicName symbolicName isNotNull symbolicName stringToRGB symbolicName
protected void clear Caches dispose Colors string To Color values iterator dispose Colors stale Colors iterator string To Color clear stale Colors clear  clearCaches disposeColors stringToColor disposeColors staleColors stringToColor staleColors
see org eclipse jface resource Resource Registry has Value For java lang String public boolean has Value For String color Key return string ToRGB contains Key color Key  ResourceRegistry hasValueFor hasValueFor colorKey stringToRGB containsKey colorKey
Hook a dispose listener on the SWT display private void hook Display Dispose display dispose Exec display Runnable  hookDisplayDispose disposeExec displayRunnable
Adds or replaces a color to this color registry under the given symbolic name p A property change event is reported whenever the mapping from a symbolic name to a color changes The source of the event is this registry the property name is the symbolic color name p param symbolic Name the symbolic color name param color Data an code RGB code object public void put String symbolic Name RGB color Data put symbolic Name color Data true  symbolicName colorData symbolicName colorData symbolicName colorData
Adds or replaces a color to this color registry under the given symbolic name p A property change event is reported whenever the mapping from a symbolic name to a color changes The source of the event is this registry the property name is the symbolic color name p param symbolic Name the symbolic color name param color Data an code RGB code object param update fire a color mapping changed if true False if this method is called from the get method as no setting has changed private void put String symbolic Name RGB color Data boolean update Assert is Not Null symbolic Name Assert is Not Null color Data RGB existing RGB string ToRGB get symbolic Name if color Data equals existing return Color old Color Color string To Color remove symbolic Name string ToRGB put symbolic Name color Data if update fire Mapping Changed symbolic Name existing color Data if old Color null stale Colors add old Color  symbolicName colorData symbolicName colorData isNotNull symbolicName isNotNull colorData stringToRGB symbolicName colorData oldColor stringToColor symbolicName stringToRGB symbolicName colorData fireMappingChanged symbolicName colorData oldColor staleColors oldColor

Constructs an uninitialized composite image protected Composite Image Descriptor  CompositeImageDescriptor
Returns the index of a RGB entry in the given map which matches the specified RGB color If no such entry exists a new RGB is allocated If the given array is full the value 0 is returned which maps to the transparency value private static int alloc RGB map int red int green int blue int i RGB c this loops starts at index 1 because index 0 corresponds to the transparency value for i 1 i map length c map i null i if c red red c green green c blue blue return i if i map length 1 map i new RGB red green blue return i return 0 
Draw the composite images p Subclasses must implement this framework method to paint images within the given bounds using one or more calls to the code draw Image code framework method p param width the width param height the height  drawImage
protected abstract void draw Composite Image int width int height Draws the given source image data into this composite image at the given position p Call this internal framework method to superimpose another image atop this composite image p param src the source image data param ox the x position param oy the y position final protected void draw Image Image Data src int ox int oy RGB out image Data getRG Bs Palette Data palette src palette if palette is Direct Image Data mask src get Transparency Mask for int y 0 y src height y for int x 0 x src width x if mask get Pixel x y 0 int xx x ox int yy y oy if xx 0 xx image Data width yy 0 yy image Data height int pixel src get Pixel x y int r pixel palette red Mask JM Changed operators from to to shift sign bit right r palette red Shift 0 r palette red Shift r palette red Shift int g pixel palette green Mask g palette green Shift 0 g palette green Shift g palette green Shift int b pixel palette blue Mask b palette blue Shift 0 b palette blue Shift b palette blue Shift pixel alloc out r g b image Data set Pixel xx yy pixel return map maps src pixel values to dest pixel values int map new int 256 for int i 0 i map length i map i 1 JM added code to test if the image is an icon if src get Transparency Type SWT TRANSPARENCY MASK Image Data mask src get Transparency Mask for int y 0 y src height y for int x 0 x src width x if mask get Pixel x y 0 int xx x ox int yy y oy if xx 0 xx image Data width yy 0 yy image Data height int pixel src get Pixel x y int new Pixel map pixel if new Pixel 0 RGB c palette getRGB pixel map pixel new Pixel alloc out c red c green c blue image Data set Pixel xx yy new Pixel return int mask Pixel src transparent Pixel for int y 0 y src height y for int x 0 x src width x int pixel src get Pixel x y if mask Pixel 0 pixel mask Pixel int xx x ox int yy y oy if xx 0 xx image Data width yy 0 yy image Data height int new Pixel map pixel if new Pixel 0 RGB c palette getRGB pixel map pixel new Pixel alloc out c red c green c blue image Data set Pixel xx yy new Pixel  drawCompositeImage drawImage ImageData imageData getRGBs PaletteData isDirect ImageData getTransparencyMask getPixel imageData imageData getPixel redMask redShift redShift redShift greenMask greenShift greenShift greenShift blueMask blueShift blueShift blueShift imageData setPixel getTransparencyType TRANSPARENCY_MASK ImageData getTransparencyMask getPixel imageData imageData getPixel newPixel newPixel newPixel imageData setPixel newPixel maskPixel transparentPixel getPixel maskPixel maskPixel imageData imageData newPixel newPixel newPixel imageData setPixel newPixel
public Image Data get Image Data Point size get Size RGB black new RGB 0 0 0 RGB rgbs new RGB 256 rgbs 0 black transparency rgbs 1 black black Palette Data data Palette new Palette Data rgbs image Data new Image Data size x size y 8 data Palette image Data transparent Pixel 0 draw Composite Image size x size y for int i 0 i rgbs length i if rgbs i null rgbs i black return image Data  ImageData getImageData getSize PaletteData dataPalette PaletteData imageData ImageData dataPalette imageData transparentPixel drawCompositeImage imageData
Return the size of this composite image p Subclasses must implement this framework method p return the x and y size of the image expressed as a point object 

public class Data Format Exception extends Illegal Argument Exception Creates a new exception public Data Format Exception super  DataFormatException IllegalArgumentException DataFormatException
Creates a new exception param message the message public Data Format Exception String message super message  DataFormatException

private String name Creates a new file image descriptor The file has the given file name and is located in the given class s resource directory If the given class is code null code the file name must be absolute p Note that the file is not accessed until its code get Image Date code method is called p param clazz class for resource directory or code null code param filename the name of the file File Image Descriptor Class clazz String filename this location clazz this name filename  getImageDate FileImageDescriptor
public boolean equals Object o if o instanceof File Image Descriptor return false File Image Descriptor other File Image Descriptor o if location null if location equals other location return false else if other location null return false return name equals other name  FileImageDescriptor FileImageDescriptor FileImageDescriptor
public Image Data get Image Data Input Stream in get Stream Image Data result null if in null try result new Image Data in catch SWT Exception e if e code SWT ERROR INVALID IMAGE throw e fall through otherwise finally try in close catch IO Exception e System err println get Class get Name get Image Data Exception while closing Input Stream e return result  ImageData getImageData InputStream getStream ImageData ImageData SWTException ERROR_INVALID_IMAGE IOException getClass getName getImageData InputStream
Returns a stream on the image contents Returns null if a stream could not be opened return the buffered stream on the file or code null code if the file cannot be found private Input Stream get Stream Input Stream is null if location null is location get Resource As Stream name else try is new File Input Stream name catch File Not Found Exception e return null if is null return null else return new Buffered Input Stream is  InputStream getStream InputStream getResourceAsStream FileInputStream FileNotFoundException BufferedInputStream
public int hash Code int code name hash Code if location null code location hash Code return code  hashCode hashCode hashCode
The code File Image Descriptor code implementation of this code Object code method returns a string representation of this object which is suitable only for debugging public String to String return File Image Descriptor location location name name NON NLS 3 NON NLS 2 NON NLS 1  FileImageDescriptor toString FileImageDescriptor

Create a new instance of the receiver based on the plain font and the data for it param plain Font The base looked up font param data The data used to look it up Font Record Font plain Font Font Data data base Font plain Font base Data data  plainFont FontRecord plainFont FontData baseFont plainFont baseData
Dispose any of the fonts created for this record void dispose base Font dispose if bold Font null bold Font dispose if italic Font null italic Font dispose  baseFont boldFont boldFont italicFont italicFont
Return the base Font return Font public Font get Base Font return base Font  getBaseFont baseFont
Return the bold Font Create a bold version of the base font to get it return Font public Font get Bold Font if bold Font null return bold Font Font Data bold Data get Modified Font Data SWT BOLD bold Font new Font Display get Current bold Data return bold Font  getBoldFont boldFont boldFont FontData boldData getModifiedFontData boldFont getCurrent boldData boldFont
Get a version of the base font data with the specified style param style return todo Generated comment private Font Data get Modified Font Data int style Font Data style Data new Font Data base Data length for int i 0 i style Data length i Font Data base base Data i style Data i new Font Data base get Name base get Height base get Style style return style Data  FontData getModifiedFontData FontData styleData FontData baseData styleData FontData baseData styleData FontData getName getHeight getStyle styleData
Return the italic Font Create an italic version of the base font to get it return Font public Font get Italic Font if italic Font null return italic Font Font Data italic Data get Modified Font Data SWT ITALIC italic Font new Font Display get Current italic Data return italic Font  getItalicFont italicFont italicFont FontData italicData getModifiedFontData italicFont getCurrent italicData italicFont
Add any fonts that were allocated for this record to the stale fonts Anything that matches the default font will be skipped param default Font The system default void add Allocated Fonts To Stale Font default Font Return all of the fonts allocated by the receiver if any of them are the default Font then don t bother if default Font base Font stale Fonts add base Font if default Font bold Font stale Fonts add base Font if default Font italic Font stale Fonts add base Font  defaultFont addAllocatedFontsToStale defaultFont defaultFont defaultFont baseFont staleFonts baseFont defaultFont boldFont staleFonts baseFont defaultFont italicFont staleFonts baseFont
protected Runnable display Runnable new Runnable public void run clear Caches  displayRunnable clearCaches
Creates an empty font registry p There must be an SWT Display created in the current thread before calling this method p public Font Registry Display display Display get Current Assert is Not Null display hook Display Dispose display  FontRegistry getCurrent isNotNull hookDisplayDispose
Creates a font registry and initializes its content from a property file p There must be an SWT Display created in the current thread before calling this method p p The OS name retrieved using code System get Property os name code is converted to lowercase purged of whitespace and appended as suffix separated by an underscore code   code to the given location string to yield the base name of a resource bundle acceptable to code Resource Bundle get Bundle code The standard Java resource bundle mechanism is then used to locate and open the appropriate properties file taking into account locale specific variations p p For example on the Windows 2000 operating system the location string code com example myapp Fonts code yields the base name code com example myapp Fonts windows2000 code For the US English locale this further elaborates to the resource bundle name code com example myapp Fonts windows2000 en us code p p If no appropriate OS specific resource bundle is found the process is repeated using the location as the base bundle name p p The property file contains entries that look like this pre textfont 0 MS Sans Serif regular 10 textfont 1 Times New Roman regular 10 titlefont 0 MS Sans Serif regular 12 titlefont 1 Times New Roman regular 12 pre Each entry maps a symbolic font names the font registry keys with a code it n it code suffix to standard font names on the right The suffix indicated order of preference code 0 code indicates the first choice code 1 code indicates the second choice and so on p The following example shows how to use the font registry pre Font Registry registry new Font Registry com example myapp fonts Font font registry get textfont control set Font font pre param location the name of the resource bundle param loader the Class Loader to use to find the resource bundle exception Missing Resource Exception if the resource bundle cannot be found since 2 1 public Font Registry String location Class Loader loader throws Missing Resource Exception Display display Display get Current Assert is Not Null display FIXE need to respect loader read Resource Bundle location loader read Resource Bundle location hook Display Dispose display  getProperty _ ResourceBundle getBundle Fonts_windows2000 Fonts_windows2000_en_us FontRegistry FontRegistry setFont ClassLoader MissingResourceException FontRegistry ClassLoader MissingResourceException getCurrent isNotNull readResourceBundle readResourceBundle hookDisplayDispose
Load the Font Registry using the Class Loader from the PlatformUI plug in public Font Registry String location throws Missing Resource Exception FIXE this location Workbench Plugin get Default get Descriptor get Plugin Class Loader this location null  FontRegistry ClassLoader FontRegistry MissingResourceException WorkbenchPlugin getDefault getDescriptor getPluginClassLoader
Read the resource bundle at location Look for a file with the extension  os ws first then  os then just the name param location String the location of the file private void read Resource Bundle String location String osname System get Property os name trim NON NLS 1 String wsname SWT get Platform osname String Converter remove White Spaces osname to Lower Case wsname String Converter remove White Spaces wsname to Lower Case String OS Location location String WS Location location Resource Bundle bundle null if osname null OS Location location   osname NON NLS 1 if wsname null WS Location OS Location   wsname NON NLS 1 try bundle Resource Bundle get Bundle WS Location read Resource Bundle bundle WS Location catch Missing Resource Exception ws Exception try bundle Resource Bundle get Bundle OS Location read Resource Bundle bundle WS Location catch Missing Resource Exception os Exception if location OS Location bundle Resource Bundle get Bundle location read Resource Bundle bundle WS Location else throw os Exception  _os_ws _os readResourceBundle getProperty getPlatform StringConverter removeWhiteSpaces toLowerCase StringConverter removeWhiteSpaces toLowerCase OSLocation WSLocation ResourceBundle OSLocation _ WSLocation OSLocation _ ResourceBundle getBundle WSLocation readResourceBundle WSLocation MissingResourceException wsException ResourceBundle getBundle OSLocation readResourceBundle WSLocation MissingResourceException osException OSLocation ResourceBundle getBundle readResourceBundle WSLocation osException
Creates an empty font registry param display the Display public Font Registry Display display Assert is Not Null display hook Display Dispose display  FontRegistry isNotNull hookDisplayDispose
Find the first valid font Data in the provided list If none are valid return the first one regardless If the list is empty return null Return null if one cannot be found deprecated use best Data Array in order to support Motif multiple entry fonts public Font Data best Data Font Data fonts Display display for int i 0 i fonts length i Font Data fd fonts i if fd null break Font Data fixed Fonts display get Font List fd get Name false if is Fixed Font fixed Fonts fd return fd Font Data scalable Fonts display get Font List fd get Name true if scalable Fonts length 0 return fd None of the provided datas are valid Return the first one as it is at least the first choice if fonts length 0 return fonts 0 else Nothing specified return null  fontData bestDataArray FontData bestData FontData FontData FontData fixedFonts getFontList getName isFixedFont fixedFonts FontData scalableFonts getFontList getName scalableFonts
Find the first valid font Data in the provided list If none are valid return the first one regardless If the list is empty return null public Font Data best Data Array Font Data fonts Display display Font Data best Data best Data fonts display if best Data null return null else Font Data datas new Font Data 1 datas 0 best Data return datas  fontData FontData bestDataArray FontData FontData bestData bestData bestData FontData FontData bestData
Creates a new font with the given font datas or code null code if there is no data return Font Record for the new Font or code null code private Font Record create Font String symbolic Name Font Data fonts Display display Display get Current if display null return null Font Data valid Data best Data Array fonts display if valid Data null Nothing specified return null else Do not fire the update from creation as it is not a property change put symbolic Name valid Data false Font new Font new Font display valid Data return new Font Record new Font valid Data  FontRecord FontRecord createFont symbolicName FontData getCurrent FontData validData bestDataArray validData symbolicName validData newFont validData FontRecord newFont validData
Calculates the default font and returns the result Font calculate Default Font Display current Display get Current if current null Shell shell new Shell Font font new Font null shell get Font get Font Data shell dispose return font else return new Font current current get System Font get Font Data  calculateDefaultFont getCurrent getFont getFontData getSystemFont getFontData
Returns the default font data Creates it if necessary return Font public Font default Font return default Font Record get Base Font  defaultFont defaultFontRecord getBaseFont
Returns the default font record private Font Record default Font Record Font Record record Font Record string To Font Record get J Face Resources DEFAULT FONT if record null Font default Font calculate Default Font record create Font J Face Resources DEFAULT FONT default Font get Font Data string To Font Record put J Face Resources DEFAULT FONT record return record  FontRecord defaultFontRecord FontRecord FontRecord stringToFontRecord JFaceResources DEFAULT_FONT defaultFont calculateDefaultFont createFont JFaceResources DEFAULT_FONT defaultFont getFontData stringToFontRecord JFaceResources DEFAULT_FONT
Returns the default font data Creates it if necessary private Font Data default Font Data return default Font Record base Data  FontData defaultFontData defaultFontRecord baseData
Returns the font data associated with the given symbolic font name Returns the default font data if there is no special value associated with that name param symbolic Name symbolic font name return the font public Font Data get Font Data String symbolic Name Assert is Not Null symbolic Name Object result string To Font Data get symbolic Name if result null return default Font Data return Font Data result  symbolicName FontData getFontData symbolicName isNotNull symbolicName stringToFontData symbolicName defaultFontData FontData
Returns the font associated with the given symbolic font name Returns the default font if there is no special value associated with that name param symbolic Name symbolic font name return the font public Font get String symbolic Name return get Font Record symbolic Name get Base Font  symbolicName symbolicName getFontRecord symbolicName getBaseFont
Returns the bold font associated with the given symbolic font name Returns the bolded default font if there is no special value associated with that name param symbolic Name symbolic font name return the font since 3 0 public Font get Bold String symbolic Name return get Font Record symbolic Name get Bold Font  symbolicName getBold symbolicName getFontRecord symbolicName getBoldFont
Returns the italic font associated with the given symbolic font name Returns the italic default font if there is no special value associated with that name param symbolic Name symbolic font name return the font since 3 0 public Font get Italic String symbolic Name return get Font Record symbolic Name get Italic Font  symbolicName getItalic symbolicName getFontRecord symbolicName getItalicFont
Return the font record for the key param symbolic Name The key for the record return Font Recird private Font Record get Font Record String symbolic Name Assert is Not Null symbolic Name Object result string To Font Record get symbolic Name if result null return Font Record result result string To Font Data get symbolic Name Font Record font Record if result null font Record default Font Record else font Record create Font symbolic Name Font Data result if font Record null create may have failed Ensure we have a valid font font Record default Font Record string To Font Record put symbolic Name font Record return font Record  symbolicName FontRecird FontRecord getFontRecord symbolicName isNotNull symbolicName stringToFontRecord symbolicName FontRecord stringToFontData symbolicName FontRecord fontRecord fontRecord defaultFontRecord fontRecord createFont symbolicName FontData fontRecord fontRecord defaultFontRecord stringToFontRecord symbolicName fontRecord fontRecord
see org eclipse jface resource Resource Registry get Key Set public Set get Key Set return Collections unmodifiable Set string To Font Data key Set  ResourceRegistry getKeySet getKeySet unmodifiableSet stringToFontData keySet
see org eclipse jface resource Resource Registry has Value For java lang String public boolean has Value For String font Key return string To Font Data contains Key font Key  ResourceRegistry hasValueFor hasValueFor fontKey stringToFontData containsKey fontKey
protected void clear Caches Iterator iterator string To Font Record values iterator while iterator has Next Object next iterator next Font Record next dispose dispose Fonts stale Fonts iterator string To Font Record clear stale Fonts clear  clearCaches stringToFontRecord hasNext FontRecord disposeFonts staleFonts stringToFontRecord staleFonts
Dispose of all of the fonts in this iterator param Iterator over Collection of Font private void dispose Fonts Iterator iterator while iterator has Next Object next iterator next Font next dispose  disposeFonts hasNext
Hook a dispose listener on the SWT display private void hook Display Dispose Display display display dispose Exec display Runnable  hookDisplayDispose disposeExec displayRunnable
Checks whether the given font is in the list of fixed fonts private boolean is Fixed Font Font Data fixed Fonts Font Data fd Can t use Font Data equals since some values aren t set if a fontdata isn t used int height fd get Height String name fd get Name for int i 0 i fixed Fonts length i Font Data fixed fixed Fonts i if fixed get Height height fixed get Name equals name return true return false  isFixedFont FontData fixedFonts FontData FontData getHeight getName fixedFonts FontData fixedFonts getHeight getName
Converts a String into a Font Data object private Font Data make Font Data String value throws Missing Resource Exception try return String Converter as Font Data value trim catch Data Format Exception e throw new Missing Resource Exception Wrong font data format Value is value get Class get Name value NON NLS 2 NON NLS 1  FontData FontData makeFontData MissingResourceException StringConverter asFontData DataFormatException MissingResourceException getClass getName
Adds or replaces a font to this font registry under the given symbolic name p A property change event is reported whenever the mapping from a symbolic name to a font changes The source of the event is this registry the property name is the symbolic font name p param symbolic Name the symbolic font name param font Data an Array of Font Data public void put String symbolic Name Font Data font Data put symbolic Name font Data true  symbolicName fontData FontData symbolicName FontData fontData symbolicName fontData
Adds or replaces a font to this font registry under the given symbolic name p A property change event is reported whenever the mapping from a symbolic name to a font changes The source of the event is this registry the property name is the symbolic font name p param symbolic Name the symbolic font name param font Data an Array of Font Data param update fire a font mapping changed if true False if this method is called from the get method as no setting has changed private void put String symbolic Name Font Data font Data boolean update Assert is Not Null symbolic Name Assert is Not Null font Data Font Data existing Font Data string To Font Data get symbolic Name if Arrays equals existing font Data return Font Record old Font Font Record string To Font Record remove symbolic Name string To Font Data put symbolic Name font Data if update fire Mapping Changed symbolic Name existing font Data if old Font null old Font add Allocated Fonts To Stale default Font Record get Base Font  symbolicName fontData FontData symbolicName FontData fontData isNotNull symbolicName isNotNull fontData FontData FontData stringToFontData symbolicName fontData FontRecord oldFont FontRecord stringToFontRecord symbolicName stringToFontData symbolicName fontData fireMappingChanged symbolicName fontData oldFont oldFont addAllocatedFontsToStale defaultFontRecord getBaseFont
Reads the resource bundle This puts Font Data objects in the mapping table These will lazily be turned into real Font objects when requested private void read Resource Bundle Resource Bundle bundle String bundle Name throws Missing Resource Exception Enumeration keys bundle get Keys while keys has More Elements String key String keys next Element int pos key last Index Of if pos 1 string To Font Data put key new Font Data make Font Data bundle get String key else String name key substring 0 pos int i 0 try i Integer parse Int key substring pos 1 catch Number Format Exception e Panic the file can not be parsed throw new Missing Resource Exception Wrong key format bundle Name key NON NLS 1 Font Data elements Font Data string To Font Data get name if elements null elements new Font Data 8 string To Font Data put name elements if i elements length Font Data na new Font Data i 8 System arraycopy elements 0 na 0 elements length elements na string To Font Data put name elements elements i make Font Data bundle get String key  FontData readResourceBundle ResourceBundle bundleName MissingResourceException getKeys hasMoreElements nextElement lastIndexOf stringToFontData FontData makeFontData getString parseInt NumberFormatException MissingResourceException bundleName FontData FontData stringToFontData FontData stringToFontData FontData FontData stringToFontData makeFontData getString

Constructs an image descriptor protected Image Descriptor do nothing  ImageDescriptor
Creates and returns a new image descriptor from a file Convenience method for code new File Image Descriptor location filename code param location the class whose resource directory contain the file param filename the file name return a new image descriptor public static Image Descriptor create From File Class location String filename return new File Image Descriptor location filename  FileImageDescriptor ImageDescriptor createFromFile FileImageDescriptor
Creates and returns a new image descriptor from a URL param url The URL of the image file return a new image descriptor public static Image Descriptor create FromURL URL url if url null return get Missing Image Descriptor return new URL Image Descriptor url  ImageDescriptor createFromURL getMissingImageDescriptor URLImageDescriptor
Creates and returns a new SWT image for this image descriptor Note that each call returns a new SWT image object A default image is returned in the event of an error p Note it is still possible for this method to return code null code in extreme cases for example if SWT runs out of image handles p return a new image or code null code if the image could not be created public Image create Image return create Image true  createImage createImage
Creates and returns a new SWT image for this image descriptor In the even of an error a default image is returned if code return Missing Image On Error code is true otherwise code null code is returned p Note Even if code return Missing Image On Error code is true it is still possible for this method to return code null code in extreme cases for example if SWT runs out of image handles p param return Missing Image On Error flag that determines if a default image is returned on error return a new image or code null code if the image could not be created public Image create Image boolean return Missing Image On Error return create Image return Missing Image On Error Display get Current  returnMissingImageOnError returnMissingImageOnError returnMissingImageOnError createImage returnMissingImageOnError createImage returnMissingImageOnError getCurrent
Creates and returns a new SWT image for this image descriptor A default image is returned in the event of an error p Note it is still possible for this method to return code null code in extreme cases for example if SWT runs out of image handles p param device the device on which to create the image return a new image or code null code if the image could not be created since 2 0 public Image create Image Device device return create Image true device  createImage createImage
Creates and returns a new SWT image for this image descriptor In the even of an error a default image is returned if code return Missing Image On Error code is true otherwise code null code is returned p Note Even if code return Missing Image On Error code is true it is still possible for this method to return code null code in extreme cases for example if SWT runs out of image handles p param return Missing Image On Error flag that determines if a default image is returned on error param device the device on which to create the image return a new image or code null code if the image could not be created since 2 0 public Image create Image boolean return Missing Image On Error Device device Image Data data get Image Data if data null if return Missing Image On Error return null else data DEFAULT IMAGE DATA Try to create the supplied image If there is an SWT Exception try and create the default image if that was requested Return null if this fails try if data transparent Pixel 0 Image Data mask Data data get Transparency Mask return new Image device data mask Data return new Image device data catch SWT Exception exception if return Missing Image On Error try return new Image device DEFAULT IMAGE DATA catch SWT Exception next Exception return null else return null  returnMissingImageOnError returnMissingImageOnError returnMissingImageOnError createImage returnMissingImageOnError ImageData getImageData returnMissingImageOnError DEFAULT_IMAGE_DATA transparentPixel ImageData maskData getTransparencyMask maskData SWTException returnMissingImageOnError DEFAULT_IMAGE_DATA SWTException nextException
Creates and returns a new SWT code Image Data code object for this image descriptor Note that each call returns a new SWT image data object p This framework method is declared public so that it is possible to request an image descriptor s image data without creating an SWT image object p p Returns code null code if the image data could not be created p return a new image data or code null code  ImageData
Returns the shared image descriptor for a missing image return the missing image descriptor public static Image Descriptor get Missing Image Descriptor return Missing Image Descriptor get Instance  ImageDescriptor getMissingImageDescriptor MissingImageDescriptor getInstance

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 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 super Assert is Not Null display hook Display Dispose display this display display  ImageRegistry isNotNull hookDisplayDispose
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 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 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 descriptor null entry image entry descriptor create Image 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 createImage
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
Shut downs this resource registry and disposes of all registered images void handle Display Dispose remove reference to display display null Do not bother if the table was never used if table null return for Iterator e table values iterator e has Next Entry entry Entry e next if entry image null entry image dispose table null  handleDisplayDispose hasNext
private void hook Display Dispose Display display display dispose Exec new Runnable public void run handle Display Dispose  hookDisplayDispose disposeExec handleDisplayDispose
Hook a dispose listener on the SWT display param display the Display private void hook Display Dispose Display display display dispose Exec new Runnable public void run handle Display Dispose  hookDisplayDispose disposeExec handleDisplayDispose
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 put Entry key entry if entry image null entry descriptor descriptor return throw new Illegal Argument Exception Image Registry key already in use key NON NLS 1  ImageDescriptor createImage ImageDescriptor IllegalArgumentException ImageDescriptor getEntry putEntry 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 entry image image return throw new Illegal Argument Exception Image Registry key already in use key NON NLS 1  IllegalArgumentException getEntry putEntry IllegalArgumentException ImageRegistry
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 if table null return Entry entry Entry get Table remove key if entry null if entry image null entry image is Disposed entry image dispose entry image null  getTable isDisposed
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

Get the Color used for banner backgrounds public static Color get Banner Background Display display return display get System Color SWT COLOR LIST BACKGROUND  getBannerBackground getSystemColor COLOR_LIST_BACKGROUND
Get the Color used for banner foregrounds public static Color get Banner Foreground Display display return display get System Color SWT COLOR LIST FOREGROUND  getBannerForeground getSystemColor COLOR_LIST_FOREGROUND
Get the background Color for widgets that display errors public static Color get Error Background Display display return display get System Color SWT COLOR WIDGET BACKGROUND  getErrorBackground getSystemColor COLOR_WIDGET_BACKGROUND
Get the border Color for widgets that display errors public static Color get Error Border Display display return display get System Color SWT COLOR WIDGET DARK SHADOW  getErrorBorder getSystemColor COLOR_WIDGET_DARK_SHADOW
Get the default color to use for displaying errors public static Color get Error Text Display display return J Face Resources get Color Registry get J Face Preferences ERROR COLOR  getErrorText JFaceResources getColorRegistry JFacePreferences ERROR_COLOR
Get the default color to use for displaying hyperlinks public static Color get Hyperlink Text Display display return J Face Resources get Color Registry get J Face Preferences HYPERLINK COLOR  getHyperlinkText JFaceResources getColorRegistry JFacePreferences HYPERLINK_COLOR
Get the default color to use for displaying active hyperlinks public static Color get Active Hyperlink Text Display display return J Face Resources get Color Registry get J Face Preferences ACTIVE HYPERLINK COLOR  getActiveHyperlinkText JFaceResources getColorRegistry JFacePreferences ACTIVE_HYPERLINK_COLOR
Clear out the cached color for name This is generally done when the color preferences changed and any cached colors may be disposed Users of the colors in this class should add a I Property Change Listener to detect when any of these colors change deprecated J Face Colors no longer maintains a cache of colors This job is now handled by the Color Registry public static void clear Color String color Name no op  IPropertyChangeListener JFaceColors ColorRegistry clearColor colorName
Dispose of all allocated colors Called on workbench shutdown deprecated J Face Colors no longer maintains a cache of colors This job is now handled by the Color Registry public static void dispose Colors no op  JFaceColors ColorRegistry disposeColors
Set the foreground and background colors of the control to the specified values If the values are null than ignore them param foreground Color param background Color public static void set Colors Control control Color foreground Color background if foreground null control set Foreground foreground if background null control set Background background  setColors setForeground setBackground

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 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 return image Registry  JFace getImage ImageRegistry getImageRegistry imageRegistry imageRegistry ImageRegistry 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

private static Missing Image Descriptor instance Constructs a new missing image descriptor private Missing Image Descriptor super  MissingImageDescriptor MissingImageDescriptor
Method declared on Image Desciptor public Image Data get Image Data return DEFAULT IMAGE DATA  ImageDesciptor ImageData getImageData DEFAULT_IMAGE_DATA
Returns the shared missing image descriptor instance return the image descriptor for a missing image static Missing Image Descriptor get Instance if instance null instance new Missing Image Descriptor return instance  MissingImageDescriptor getInstance MissingImageDescriptor

Adds a property change listener to this registry param listener a property change listener public void add Listener I Property Change Listener listener listeners add listener  addListener IPropertyChangeListener
Disposes all currently allocated resources protected abstract void clear Caches  clearCaches
return the set of keys this manager knows about This collection should be immutable 
Return whether or not the receiver has a value for the supplied key param key the key return code true code if there is a value for this key 
Fires a code Property Change Event code param name the name of the symbolic value that is changing param old Value the old value param new Value the new value protected void fire Mapping Changed String name Object old Value Object new Value final Object my Listeners this listeners get Listeners if my Listeners length 0 Property Change Event event new Property Change Event this name old Value new Value for int i 0 i my Listeners length i try I Property Change Listener my Listeners i property Change event catch Exception e TODO how to log  PropertyChangeEvent oldValue newValue fireMappingChanged oldValue newValue myListeners getListeners myListeners PropertyChangeEvent PropertyChangeEvent oldValue newValue myListeners IPropertyChangeListener myListeners propertyChange
Removes the given listener from this registry Has no affect if the listener is not registered param listener a property change listener public void remove Listener I Property Change Listener listener listeners remove listener  removeListener IPropertyChangeListener

Declare a private constructor to block instantiation private String Converter no op  StringConverter
Breaks out space separated words into an array of words For example code no comment code into an array code a 0 no code and code a 1 comment code param value the string to be converted return the list of words public static String as Array String value throws Data Format Exception Array List list new Array List String Tokenizer stok new String Tokenizer value while stok has More Tokens list add stok next Token String result new String list size list to Array result return result  asArray DataFormatException ArrayList ArrayList StringTokenizer StringTokenizer hasMoreTokens nextToken toArray
Breaks out space separated words into an array of words For example code no comment code into an array code a 0 no code and code a 1 comment code Returns the given default value if the value cannot be parsed param value the string to be converted param dflt the default value return the list of words or the default value public static String as Array String value String dflt try return as Array value catch Data Format Exception e return dflt  asArray asArray DataFormatException
Converts the given value into a boolean This method fails if the value does not represent a boolean p Valid representations of code true code include the strings code t code code true code or equivalent in mixed or upper case Similarly valid representations of code false code include the strings code f code code false code or equivalent in mixed or upper case p param value the value to be converted return the value as a boolean exception Data Format Exception if the given value does not represent a boolean public static boolean as Boolean String value throws Data Format Exception String v value to Lower Case if v equals t v equals true NON NLS 2 NON NLS 1 return true if value equals f v equals false NON NLS 2 NON NLS 1 return false throw new Data Format Exception Value value doesn t represent a boolean NON NLS 2 NON NLS 1  DataFormatException asBoolean DataFormatException toLowerCase DataFormatException
Converts the given value into a boolean Returns the given default value if the value does not represent a boolean param value the value to be converted param dflt the default value return the value as a boolean or the default value public static boolean as Boolean String value boolean dflt try return as Boolean value catch Data Format Exception e return dflt  asBoolean asBoolean DataFormatException
Converts the given value into a double This method fails if the value does not represent a double param value the value to be converted return the value as a double exception Data Format Exception if the given value does not represent a double public static double as Double String value throws Data Format Exception try return Double value Of value double Value catch Number Format Exception e throw new Data Format Exception e get Message  DataFormatException asDouble DataFormatException valueOf doubleValue NumberFormatException DataFormatException getMessage
Converts the given value into a double Returns the given default value if the value does not represent a double param value the value to be converted param dflt the default value return the value as a double or the default value public static double as Double String value double dflt try return as Double value catch Data Format Exception e return dflt  asDouble asDouble DataFormatException
Converts the given value into a float This method fails if the value does not represent a float param value the value to be converted return the value as a float exception Data Format Exception if the given value does not represent a float public static float as Float String value throws Data Format Exception try return Float value Of value float Value catch Number Format Exception e throw new Data Format Exception e get Message  DataFormatException asFloat DataFormatException valueOf floatValue NumberFormatException DataFormatException getMessage
Converts the given value into a float Returns the given default value if the value does not represent a float param value the value to be converted param dflt the default value return the value as a float or the default value public static float as Float String value float dflt try return as Float value catch Data Format Exception e return dflt  asFloat asFloat DataFormatException
Converts the given value into an SWT font data object This method fails if the value does not represent font data p A valid font data representation is a string of the form code it fontname it it style it it height it code where code it fontname it code is the name of a font code it style it code is a font style one of code regular code code bold code code italic code or code bold italic code and code it height it code is an integer representing the font height Example code Times New Roman bold 36 code p param value the value to be converted return the value as font data exception Data Format Exception if the given value does not represent font data public static Font Data as Font Data String value throws Data Format Exception if value null throw new Data Format Exception Null doesn t represent a valid font data NON NLS 1 String name null int height 0 int style 0 try int length value length int height Index value last Index Of SEPARATOR if height Index 1 throw new Data Format Exception No correct font data format value NON NLS 2 NON NLS 1 height String Converter as Int value substring height Index 1 length int face Index value last Index Of SEPARATOR height Index 1 if face Index 1 throw new Data Format Exception No correct font data format value NON NLS 2 NON NLS 1 String s value substring face Index 1 height Index if BOLD ITALIC equals s style SWT BOLD SWT ITALIC else if BOLD equals s style SWT BOLD else if ITALIC equals s style SWT ITALIC else if REGULAR equals s style SWT NORMAL else throw new Data Format Exception Unknown face name s NON NLS 2 NON NLS 1 name value substring 0 face Index catch No Such Element Exception e throw new Data Format Exception e get Message return new Font Data name height style  DataFormatException FontData asFontData DataFormatException DataFormatException heightIndex lastIndexOf heightIndex DataFormatException StringConverter asInt heightIndex faceIndex lastIndexOf heightIndex faceIndex DataFormatException faceIndex heightIndex BOLD_ITALIC DataFormatException faceIndex NoSuchElementException DataFormatException getMessage FontData
Convert the given value into an array of SWT font data objects param value the font list string return the value as a font list since 3 0 public static Font Data as Font Data Array String value String strings value split FONT SEPERATOR Array List data new Array List strings length for int i 0 i strings length i try data add String Converter as Font Data strings i catch Data Format Exception e do nothing return Font Data data to Array new Font Data data size  FontData asFontDataArray FONT_SEPERATOR ArrayList ArrayList StringConverter asFontData DataFormatException FontData toArray FontData
Converts the given value into an SWT font data object Returns the given default value if the value does not represent a font data object param value the value to be converted param dflt the default value return the value as a font data object or the default value public static Font Data as Font Data String value Font Data dflt try return as Font Data value catch Data Format Exception e return dflt  FontData asFontData FontData asFontData DataFormatException
Converts the given value into an int This method fails if the value does not represent an int param value the value to be converted return the value as an int exception Data Format Exception if the given value does not represent an int public static int as Int String value throws Data Format Exception try return Integer parse Int value catch Number Format Exception e throw new Data Format Exception e get Message  DataFormatException asInt DataFormatException parseInt NumberFormatException DataFormatException getMessage
Converts the given value into an int Returns the given default value if the value does not represent an int param value the value to be converted param dflt the default value return the value as an int or the default value public static int as Int String value int dflt try return as Int value catch Data Format Exception e return dflt  asInt asInt DataFormatException
Converts the given value into a long This method fails if the value does not represent a long param value the value to be converted return the value as a long exception Data Format Exception if the given value does not represent a long public static long as Long String value throws Data Format Exception try return Long parse Long value catch Number Format Exception e throw new Data Format Exception e get Message  DataFormatException asLong DataFormatException parseLong NumberFormatException DataFormatException getMessage
Converts the given value into a long Returns the given default value if the value does not represent a long param value the value to be converted param dflt the default value return the value as a long or the default value public static long as Long String value long dflt try return as Long value catch Data Format Exception e return dflt  asLong asLong DataFormatException
Converts the given value into an SWT point This method fails if the value does not represent a point p A valid point representation is a string of the form code it x it it y it code where code it x it code and code it y it code are valid ints p param value the value to be converted return the value as a point exception Data Format Exception if the given value does not represent a point public static Point as Point String value throws Data Format Exception if value null throw new Data Format Exception Null doesn t represent a valid point NON NLS 1 String Tokenizer stok new String Tokenizer value NON NLS 1 String x stok next Token String y stok next Token int xval 0 yval 0 try xval Integer parse Int x yval Integer parse Int y catch Number Format Exception e throw new Data Format Exception e get Message return new Point xval yval  DataFormatException asPoint DataFormatException DataFormatException StringTokenizer StringTokenizer nextToken nextToken parseInt parseInt NumberFormatException DataFormatException getMessage
Converts the given value into an SWT point Returns the given default value if the value does not represent a point param value the value to be converted param dflt the default value return the value as a point or the default value public static Point as Point String value Point dflt try return as Point value catch Data Format Exception e return dflt  asPoint asPoint DataFormatException
Converts the given value into an SWT rectangle This method fails if the value does not represent a rectangle p A valid rectangle representation is a string of the form code it x it it y it it width it it height it code where code it x it code code it y it code code it width it code and code it height it code are valid ints p param value the value to be converted return the value as a rectangle exception Data Format Exception if the given value does not represent a rectangle public static Rectangle as Rectangle String value throws Data Format Exception if value null throw new Data Format Exception Null doesn t represent a valid rectangle NON NLS 1 String Tokenizer stok new String Tokenizer value NON NLS 1 String x stok next Token String y stok next Token String width stok next Token String height stok next Token int xval 0 yval 0 wval 0 hval 0 try xval Integer parse Int x yval Integer parse Int y wval Integer parse Int width hval Integer parse Int height catch Number Format Exception e throw new Data Format Exception e get Message return new Rectangle xval yval wval hval  DataFormatException asRectangle DataFormatException DataFormatException StringTokenizer StringTokenizer nextToken nextToken nextToken nextToken parseInt parseInt parseInt parseInt NumberFormatException DataFormatException getMessage
Converts the given value into an SWT rectangle Returns the given default value if the value does not represent a rectangle param value the value to be converted param dflt the default value return the value as a rectangle or the default value public static Rectangle as Rectangle String value Rectangle dflt try return as Rectangle value catch Data Format Exception e return dflt  asRectangle asRectangle DataFormatException
Converts the given value into an SWT RGB color value This method fails if the value does not represent an RGB color value p A valid RGB color value representation is a string of the form code it red it it green it code it blue it code where code it red it code it green it code and code it blue it code are valid ints p param value the value to be converted return the value as an RGB color value exception Data Format Exception if the given value does not represent an RGB color value public static RGB asRGB String value throws Data Format Exception if value null throw new Data Format Exception Null doesn t represent a valid RGB NON NLS 1 String Tokenizer stok new String Tokenizer value NON NLS 1 try String red stok next Token String green stok next Token String blue stok next Token int rval 0 gval 0 bval 0 try rval Integer parse Int red gval Integer parse Int green bval Integer parse Int blue catch Number Format Exception e Data Format Exception dfe new Data Format Exception e get Message dfe init Cause e throw dfe return new RGB rval gval bval catch No Such Element Exception e Data Format Exception dfe new Data Format Exception e get Message dfe init Cause e throw dfe  DataFormatException DataFormatException DataFormatException StringTokenizer StringTokenizer nextToken nextToken nextToken parseInt parseInt parseInt NumberFormatException DataFormatException DataFormatException getMessage initCause NoSuchElementException DataFormatException DataFormatException getMessage initCause
Converts the given value into an SWT RGB color value Returns the given default value if the value does not represent an RGB color value param value the value to be converted param dflt the default value return the value as a RGB color value or the default value public static RGB asRGB String value RGB dflt try return asRGB value catch Data Format Exception e return dflt  DataFormatException
Converts the given double value to a string Equivalent to code String value Of value code param value the double value return the string representing the given double public static String as String double value return String value Of value  valueOf asString valueOf
Converts the given float value to a string Equivalent to code String value Of value code param value the float value return the string representing the given float public static String as String float value return String value Of value  valueOf asString valueOf
Converts the given int value to a string Equivalent to code String value Of value code param value the int value return the string representing the given int public static String as String int value return String value Of value  valueOf asString valueOf
Converts the given long value to a string Equivalent to code String value Of value code param value the long value return the string representing the given long public static String as String long value return String value Of value  valueOf asString valueOf
Converts the given boolean object to a string Equivalent to code String value Of value boolean Value code param value the boolean object return the string representing the given boolean value public static String as String Boolean value Assert is Not Null value return String value Of value boolean Value  valueOf booleanValue asString isNotNull valueOf booleanValue
Converts the given double object to a string Equivalent to code String value Of value double Value code param value the double object return the string representing the given double value public static String as String Double value Assert is Not Null value return String value Of value double Value  valueOf doubleValue asString isNotNull valueOf doubleValue
Converts the given float object to a string Equivalent to code String value Of value float Value code param value the float object return the string representing the given float value public static String as String Float value Assert is Not Null value return String value Of value float Value  valueOf floatValue asString isNotNull valueOf floatValue
Converts the given integer object to a string Equivalent to code String value Of value int Value code param value the integer object return the string representing the given integer value public static String as String Integer value Assert is Not Null value return String value Of value int Value  valueOf intValue asString isNotNull valueOf intValue
Converts the given long object to a string Equivalent to code String value Of value long Value code param value the long object return the string representing the given long value public static String as String Long value Assert is Not Null value return String value Of value long Value  valueOf longValue asString isNotNull valueOf longValue
Converts a font data array to a string The string representation is that of as String Font Data seperated by param value The font data return The string representation of the font data arra since 3 0 public static String as String Font Data value String Buffer buffer new String Buffer for int i 0 i value length i buffer append as String value i if i value length 1 buffer append FONT SEPERATOR return buffer to String  asString FontData asString FontData StringBuffer StringBuffer asString FONT_SEPERATOR toString
Converts a font data object to a string The string representation is font name style height for example Times New Roman bold 36 param value The font data return The string representation of the font data object public static String as String Font Data value Assert is Not Null value String Buffer buffer new String Buffer buffer append value get Name buffer append SEPARATOR int style value get Style boolean bold style SWT BOLD SWT BOLD boolean italic style SWT ITALIC SWT ITALIC if bold italic buffer append BOLD ITALIC else if bold buffer append BOLD else if italic buffer append ITALIC else buffer append REGULAR buffer append SEPARATOR buffer append value get Height return buffer to String  asString FontData isNotNull StringBuffer StringBuffer getName getStyle BOLD_ITALIC getHeight toString
Converts the given SWT point object to a string p The string representation of a point has the form code it x it it y it code where code it x it code and code it y it code are string representations of integers p param value the point object return the string representing the given point public static String as String Point value Assert is Not Null value String Buffer buffer new String Buffer buffer append value x buffer append buffer append value y return buffer to String  asString isNotNull StringBuffer StringBuffer toString
Converts the given SWT rectangle object to a string p The string representation of a rectangle has the form code it x it it y it it width it it height it code where code it x it code code it y it code code it width it code and code it height it code are string representations of integers p param value the rectangle object return the string representing the given rectangle public static String as String Rectangle value Assert is Not Null value String Buffer buffer new String Buffer buffer append value x buffer append buffer append value y buffer append buffer append value width buffer append buffer append value height return buffer to String  asString isNotNull StringBuffer StringBuffer toString
Converts the given SWT RGB color value object to a string p The string representation of an RGB color value has the form code it red it it green it code it blue it code where code it red it code it green it code and code it blue it code are string representations of integers p param value the RGB color value object return the string representing the given RGB color value public static String as String RGB value Assert is Not Null value String Buffer buffer new String Buffer buffer append value red buffer append buffer append value green buffer append buffer append value blue return buffer to String  asString isNotNull StringBuffer StringBuffer toString
Converts the given boolean value to a string Equivalent to code String value Of value code param value the boolean value return the string representing the given boolean public static String as String boolean value return String value Of value  valueOf asString valueOf
Returns the given string with all whitespace characters removed p All characters that have codes less than or equal to code 92 u0020 code the space character are considered to be a white space p param s the source string return the string with all whitespace characters removed public static String remove White Spaces String s check for no whitespace common case boolean found false int ws Index 1 int size s length for int i 0 i size i found Character is Whitespace s char At i if found ws Index i break if found return s String Buffer result new String Buffer s substring 0 ws Index for int i ws Index 1 i size i char ch s char At i if Character is Whitespace ch result append ch return result to String  removeWhiteSpaces wsIndex isWhitespace charAt wsIndex StringBuffer StringBuffer wsIndex wsIndex charAt isWhitespace toString
Converts a font data object to a string representation for display The string representation is font name style height for example Times New Roman bold 36 param value The font data return The string representation of the font data object deprecated use as String Font Data public static String as Displayable String Font Data value Assert is Not Null value String Buffer buffer new String Buffer buffer append value get Name buffer append SEPARATOR int style value get Style boolean bold style SWT BOLD SWT BOLD boolean italic style SWT ITALIC SWT ITALIC if bold italic buffer append J Face Resources get String Bold Italic Font NON NLS 1 else if bold buffer append J Face Resources get String Bold Font NON NLS 1 else if italic buffer append J Face Resources get String Italic Font NON NLS 1 else buffer append J Face Resources get String Regular Font NON NLS 1 buffer append SEPARATOR buffer append value get Height return buffer to String  asString FontData asDisplayableString FontData isNotNull StringBuffer StringBuffer getName getStyle JFaceResources getString BoldItalicFont JFaceResources getString BoldFont JFaceResources getString ItalicFont JFaceResources getString RegularFont getHeight toString

private URL url Creates a new URL Image Descriptor param url The URL to load the image from Must be non null URL Image Descriptor URL url this url url  URLImageDescriptor URLImageDescriptor
public boolean equals Object o if o instanceof URL Image Descriptor return false return URL Image Descriptor o url equals this url  URLImageDescriptor URLImageDescriptor
public Image Data get Image Data Image Data result null Input Stream in get Stream if in null try result new Image Data in catch SWT Exception e if e code SWT ERROR INVALID IMAGE throw e fall through otherwise finally try in close catch IO Exception e System err println get Class get Name get Image Data Exception while closing Input Stream e return result  ImageData getImageData ImageData InputStream getStream ImageData SWTException ERROR_INVALID_IMAGE IOException getClass getName getImageData InputStream
Returns a stream on the image contents Returns null if a stream could not be opened return the stream for loading the data protected Input Stream get Stream try return new Buffered Input Stream url open Stream catch IO Exception e return null  InputStream getStream BufferedInputStream openStream IOException
Method declared on Object public int hash Code return url hash Code  hashCode hashCode
The code URL Image Descriptor code implementation of this code Object code method returns a string representation of this object which is suitable only for debugging public String to String return URL Image Descriptor url NON NLS 1 NON NLS 2  URLImageDescriptor toString URLImageDescriptor

Creates a new bundle object param owner the document listener owning the replace operation param replace the replace operation Registered Replace I Document Listener owner I Document Extension I Replace replace f Owner owner f Replace replace  RegisteredReplace IDocumentListener IDocumentExtension IReplace fOwner fReplace
The default constructor does not perform any configuration but leaves it to the clients who must first initialize the implementation plug ins and then call code complete Initialization code Results in the construction of an empty document protected Abstract Document  completeInitialization AbstractDocument
Returns the document s text store Assumes that the document has been initialized with a text store return the document s text store protected I Text Store get Store Assert is Not Null f Store return f Store  ITextStore getStore isNotNull fStore fStore
Returns the document s line tracker Assumes that the document has been initialized with a line tracker return the document s line tracker protected I Line Tracker get Tracker Assert is Not Null f Tracker return f Tracker  ILineTracker getTracker isNotNull fTracker fTracker
Returns the document s document listeners return the document s document listeners protected List get Document Listeners return f Document Listeners  getDocumentListeners fDocumentListeners
Returns the document s partitioning listeners return the document s partitioning listeners protected List get Document Partitioning Listeners return f Document Partitioning Listeners  getDocumentPartitioningListeners fDocumentPartitioningListeners
Returns all positions managed by the document grouped by category return the document s positions protected Map get Document Managed Positions return f Positions  getDocumentManagedPositions fPositions
see org eclipse jface text I Document get Document Partitioner public I Document Partitioner get Document Partitioner return get Document Partitioner DEFAULT PARTITIONING  IDocument getDocumentPartitioner IDocumentPartitioner getDocumentPartitioner getDocumentPartitioner DEFAULT_PARTITIONING
Sets the document s text store Must be called at the beginning of the constructor param store the document s text store protected void set Text Store I Text Store store f Store store  setTextStore ITextStore fStore
Sets the document s line tracker Must be called at the beginning of the constructor param tracker the document s line tracker protected void set Line Tracker I Line Tracker tracker f Tracker tracker  setLineTracker ILineTracker fTracker
see org eclipse jface text I Document set Document Partitioner org eclipse jface text I Document Partitioner public void set Document Partitioner I Document Partitioner partitioner set Document Partitioner DEFAULT PARTITIONING partitioner  IDocument setDocumentPartitioner IDocumentPartitioner setDocumentPartitioner IDocumentPartitioner setDocumentPartitioner DEFAULT_PARTITIONING
Initializes document listeners positions and position updaters Must be called inside the constructor after the implementation plug ins have been set protected void complete Initialization f Positions new Hash Map f Position Updaters new Array List f Document Listeners new Array List f Prenotified Document Listeners new Array List f Document Partitioning Listeners new Array List add Position Category DEFAULT CATEGORY add Position Updater new Default Position Updater DEFAULT CATEGORY  completeInitialization fPositions HashMap fPositionUpdaters ArrayList fDocumentListeners ArrayList fPrenotifiedDocumentListeners ArrayList fDocumentPartitioningListeners ArrayList addPositionCategory DEFAULT_CATEGORY addPositionUpdater DefaultPositionUpdater DEFAULT_CATEGORY
public void add Document Listener I Document Listener listener Assert is Not Null listener if f Document Listeners contains listener f Document Listeners add listener  addDocumentListener IDocumentListener isNotNull fDocumentListeners fDocumentListeners
see org eclipse jface text I Document remove Document Listener org eclipse jface text I Document Listener public void remove Document Listener I Document Listener listener Assert is Not Null listener f Document Listeners remove listener  IDocument removeDocumentListener IDocumentListener removeDocumentListener IDocumentListener isNotNull fDocumentListeners
public void add Prenotified Document Listener I Document Listener listener Assert is Not Null listener if f Prenotified Document Listeners contains listener f Prenotified Document Listeners add listener  addPrenotifiedDocumentListener IDocumentListener isNotNull fPrenotifiedDocumentListeners fPrenotifiedDocumentListeners
see org eclipse jface text I Document remove Prenotified Document Listener org eclipse jface text I Document Listener public void remove Prenotified Document Listener I Document Listener listener Assert is Not Null listener f Prenotified Document Listeners remove listener  IDocument removePrenotifiedDocumentListener IDocumentListener removePrenotifiedDocumentListener IDocumentListener isNotNull fPrenotifiedDocumentListeners
public void add Document Partitioning Listener I Document Partitioning Listener listener Assert is Not Null listener if f Document Partitioning Listeners contains listener f Document Partitioning Listeners add listener  addDocumentPartitioningListener IDocumentPartitioningListener isNotNull fDocumentPartitioningListeners fDocumentPartitioningListeners
see org eclipse jface text I Document remove Document Partitioning Listener org eclipse jface text I Document Partitioning Listener public void remove Document Partitioning Listener I Document Partitioning Listener listener Assert is Not Null listener f Document Partitioning Listeners remove listener  IDocument removeDocumentPartitioningListener IDocumentPartitioningListener removeDocumentPartitioningListener IDocumentPartitioningListener isNotNull fDocumentPartitioningListeners
public void add Position String category Position position throws Bad Location Exception Bad Position Category Exception if 0 position offset 0 position length position offset position length get Length throw new Bad Location Exception if category null throw new Bad Position Category Exception List list List f Positions get category if list null throw new Bad Position Category Exception list add compute Index In Position List list position offset position  addPosition BadLocationException BadPositionCategoryException getLength BadLocationException BadPositionCategoryException fPositions BadPositionCategoryException computeIndexInPositionList
public void add Position Position position throws Bad Location Exception try add Position DEFAULT CATEGORY position catch Bad Position Category Exception e  addPosition BadLocationException addPosition DEFAULT_CATEGORY BadPositionCategoryException
public void add Position Category String category if category null return if contains Position Category category f Positions put category new Array List  addPositionCategory containsPositionCategory fPositions ArrayList
see org eclipse jface text I Document add Position Updater org eclipse jface text I Position Updater public void add Position Updater I Position Updater updater insert Position Updater updater f Position Updaters size  IDocument addPositionUpdater IPositionUpdater addPositionUpdater IPositionUpdater insertPositionUpdater fPositionUpdaters
public boolean contains Position String category int offset int length if category null return false List list List f Positions get category if list null return false int size list size if size 0 return false int index compute Index In Position List list offset if index size Position p Position list get index while p null p offset offset if p length length return true index p index size Position list get index null return false  containsPosition fPositions computeIndexInPositionList
public boolean contains Position Category String category if category null return f Positions contains Key category return false  containsPositionCategory fPositions containsKey
Computes the index in the list of positions at which a position with the given offset would be inserted The position is supposed to become the first in this list of all positions with the same offset param positions the list in which the index is computed param offset the offset for which the index is computed return the computed index see I Document compute Index In Category String int protected int compute Index In Position List List positions int offset if positions size 0 return 0 int left 0 int right positions size 1 int mid 0 Position p null while left right mid left right 2 p Position positions get mid if offset p get Offset if left mid right left else right mid 1 else if offset p get Offset if right mid left right else left mid 1 else if offset p get Offset left right mid int pos left p Position positions get pos if offset p get Offset append to the end pos else entry will became the first of all entries with the same offset do pos if pos 0 break p Position positions get pos while offset p get Offset pos Assert is True 0 pos pos positions size return pos  IDocument computeIndexInCategory computeIndexInPositionList getOffset getOffset getOffset getOffset getOffset isTrue
public int compute Index In Category String category int offset throws Bad Location Exception Bad Position Category Exception if 0 offset offset get Length throw new Bad Location Exception List c List f Positions get category if c null throw new Bad Position Category Exception return compute Index In Position List c offset  computeIndexInCategory BadLocationException BadPositionCategoryException getLength BadLocationException fPositions BadPositionCategoryException computeIndexInPositionList
Fires the document partitioning changed notification to all registered document partitioning listeners Uses a robust iterator deprecated as of 2 0 Use code fire Document Partitioning Changed I Region code instead protected void fire Document Partitioning Changed if f Document Partitioning Listeners null f Document Partitioning Listeners size 0 List list new Array List f Document Partitioning Listeners Iterator e list iterator while e has Next I Document Partitioning Listener l I Document Partitioning Listener e next l document Partitioning Changed this  fireDocumentPartitioningChanged IRegion fireDocumentPartitioningChanged fDocumentPartitioningListeners fDocumentPartitioningListeners ArrayList fDocumentPartitioningListeners hasNext IDocumentPartitioningListener IDocumentPartitioningListener documentPartitioningChanged
Fires the document partitioning changed notification to all registered document partitioning listeners Uses a robust iterator param region the region in which partitioning has changed see I Document Partitioning Listener Extension since 2 0 deprecated as of 3 0 Use code fire Document Partitioning Changed Document Partitioning Changed Event code instead protected void fire Document Partitioning Changed I Region region if f Document Partitioning Listeners null f Document Partitioning Listeners size 0 List list new Array List f Document Partitioning Listeners Iterator e list iterator while e has Next I Document Partitioning Listener l I Document Partitioning Listener e next if l instanceof I Document Partitioning Listener Extension I Document Partitioning Listener Extension l document Partitioning Changed this region else l document Partitioning Changed this  IDocumentPartitioningListenerExtension fireDocumentPartitioningChanged DocumentPartitioningChangedEvent fireDocumentPartitioningChanged IRegion fDocumentPartitioningListeners fDocumentPartitioningListeners ArrayList fDocumentPartitioningListeners hasNext IDocumentPartitioningListener IDocumentPartitioningListener IDocumentPartitioningListenerExtension IDocumentPartitioningListenerExtension documentPartitioningChanged documentPartitioningChanged
Fires the document partitioning changed notification to all registered document partitioning listeners Uses a robust iterator param event the document partitioning changed event see I Document Partitioning Listener Extension2 since 3 0 protected void fire Document Partitioning Changed Document Partitioning Changed Event event if f Document Partitioning Listeners null f Document Partitioning Listeners size 0 return List list new Array List f Document Partitioning Listeners Iterator e list iterator while e has Next I Document Partitioning Listener l I Document Partitioning Listener e next if l instanceof I Document Partitioning Listener Extension2 I Document Partitioning Listener Extension2 extension2 I Document Partitioning Listener Extension2 l extension2 document Partitioning Changed event else if l instanceof I Document Partitioning Listener Extension I Document Partitioning Listener Extension extension I Document Partitioning Listener Extension l extension document Partitioning Changed this event get Coverage else l document Partitioning Changed this  IDocumentPartitioningListenerExtension2 fireDocumentPartitioningChanged DocumentPartitioningChangedEvent fDocumentPartitioningListeners fDocumentPartitioningListeners ArrayList fDocumentPartitioningListeners hasNext IDocumentPartitioningListener IDocumentPartitioningListener IDocumentPartitioningListenerExtension2 IDocumentPartitioningListenerExtension2 IDocumentPartitioningListenerExtension2 documentPartitioningChanged IDocumentPartitioningListenerExtension IDocumentPartitioningListenerExtension IDocumentPartitioningListenerExtension documentPartitioningChanged getCoverage documentPartitioningChanged
Fires the given document event to all registers document listeners informing them about the forthcoming document manipulation Uses a robust iterator param event the event to be sent out protected void fire Document About To Be Changed Document Event event I Document Extension if f Reentrance Count 0 flush Post Notification Changes if f Document Partitioners null Iterator e f Document Partitioners values iterator while e has Next I Document Partitioner p I Document Partitioner e next p document About To Be Changed event if f Prenotified Document Listeners size 0 List list new Array List f Prenotified Document Listeners Iterator e list iterator while e has Next I Document Listener l I Document Listener e next l document About To Be Changed event if f Document Listeners size 0 List list new Array List f Document Listeners Iterator e list iterator while e has Next I Document Listener l I Document Listener e next l document About To Be Changed event  fireDocumentAboutToBeChanged DocumentEvent IDocumentExtension fReentranceCount flushPostNotificationChanges fDocumentPartitioners fDocumentPartitioners hasNext IDocumentPartitioner IDocumentPartitioner documentAboutToBeChanged fPrenotifiedDocumentListeners ArrayList fPrenotifiedDocumentListeners hasNext IDocumentListener IDocumentListener documentAboutToBeChanged fDocumentListeners ArrayList fDocumentListeners hasNext IDocumentListener IDocumentListener documentAboutToBeChanged
Updates document partitioning and document positions according to the specification given by the document event param event the document event describing the change to which structures must be adapted protected void update Document Structures Document Event event if f Document Partitioners null f Document Partitioning Changed Event new Document Partitioning Changed Event this Iterator e f Document Partitioners key Set iterator while e has Next String partitioning String e next I Document Partitioner partitioner I Document Partitioner f Document Partitioners get partitioning if partitioner instanceof I Document Partitioner Extension I Document Partitioner Extension extension I Document Partitioner Extension partitioner I Region r extension document Changed2 event if r null f Document Partitioning Changed Event set Partition Change partitioning r get Offset r get Length else if partitioner document Changed event f Document Partitioning Changed Event set Partition Change partitioning 0 event get Document get Length if f Positions size 0 update Positions event  updateDocumentStructures DocumentEvent fDocumentPartitioners fDocumentPartitioningChangedEvent DocumentPartitioningChangedEvent fDocumentPartitioners keySet hasNext IDocumentPartitioner IDocumentPartitioner fDocumentPartitioners IDocumentPartitionerExtension IDocumentPartitionerExtension IDocumentPartitionerExtension IRegion documentChanged2 fDocumentPartitioningChangedEvent setPartitionChange getOffset getLength documentChanged fDocumentPartitioningChangedEvent setPartitionChange getDocument getLength fPositions updatePositions
Notifies all listeners about the given document change Uses a robust iterator p Executes all registered post notification replace operation param event the event to be sent out protected void do Fire Document Changed Document Event event boolean changed f Document Partitioning Changed Event null f Document Partitioning Changed Event is Empty I Region change changed f Document Partitioning Changed Event get Coverage null do Fire Document Changed event changed change  doFireDocumentChanged DocumentEvent fDocumentPartitioningChangedEvent fDocumentPartitioningChangedEvent isEmpty IRegion fDocumentPartitioningChangedEvent getCoverage doFireDocumentChanged
Notifies all listeners about the given document change Uses a robust iterator p Executes all registered post notification replace operation param event the event to be sent out param fire Partition Change code true code if a partition change notification should be sent param partition Change the region whose partitioning changed since 2 0 deprecated as of 3 0 Use code do Fire Document Changed2 Document Event code instead this method will be removed protected void do Fire Document Changed Document Event event boolean fire Partition Change I Region partition Change do Fire Document Changed2 event  firePartitionChange partitionChange doFireDocumentChanged2 DocumentEvent doFireDocumentChanged DocumentEvent firePartitionChange IRegion partitionChange doFireDocumentChanged2
Notifies all listeners about the given document change Uses a robust iterator p Executes all registered post notification replace operation p This method will be renamed to code do Fire Document Changed code param event the event to be sent out since 3 0 protected void do Fire Document Changed2 Document Event event Document Partitioning Changed Event p f Document Partitioning Changed Event f Document Partitioning Changed Event null if p null p is Empty fire Document Partitioning Changed p if f Prenotified Document Listeners size 0 List list new Array List f Prenotified Document Listeners Iterator e list iterator while e has Next I Document Listener l I Document Listener e next l document Changed event if f Document Listeners size 0 List list new Array List f Document Listeners Iterator e list iterator while e has Next I Document Listener l I Document Listener e next l document Changed event I Document Extension f Reentrance Count try if f Reentrance Count 1 execute Post Notification Changes finally f Reentrance Count  doFireDocumentChanged doFireDocumentChanged2 DocumentEvent DocumentPartitioningChangedEvent fDocumentPartitioningChangedEvent fDocumentPartitioningChangedEvent isEmpty fireDocumentPartitioningChanged fPrenotifiedDocumentListeners ArrayList fPrenotifiedDocumentListeners hasNext IDocumentListener IDocumentListener documentChanged fDocumentListeners ArrayList fDocumentListeners hasNext IDocumentListener IDocumentListener documentChanged IDocumentExtension fReentranceCount fReentranceCount executePostNotificationChanges fReentranceCount
Updates the internal document structures and informs all document listeners if listener notification has been enabled Otherwise it remembers the event to be sent to the listeners on resume param event the document event to be sent out protected void fire Document Changed Document Event event update Document Structures event if f Stopped Listener Notification 0 do Fire Document Changed event else f Deferred Document Event event  fireDocumentChanged DocumentEvent updateDocumentStructures fStoppedListenerNotification doFireDocumentChanged fDeferredDocumentEvent
public char get Char int pos throws Bad Location Exception if 0 pos pos get Length throw new Bad Location Exception return get Store get pos  getChar BadLocationException getLength BadLocationException getStore
public String get Content Type int offset throws Bad Location Exception String content Type null try content Type get Content Type DEFAULT PARTITIONING offset false Assert is Not Null content Type catch Bad Partitioning Exception e Assert is True false return content Type  getContentType BadLocationException contentType contentType getContentType DEFAULT_PARTITIONING isNotNull contentType BadPartitioningException isTrue contentType
public String get Legal Content Types String content Types null try content Types get Legal Content Types DEFAULT PARTITIONING Assert is Not Null content Types catch Bad Partitioning Exception e Assert is True false return content Types  getLegalContentTypes contentTypes contentTypes getLegalContentTypes DEFAULT_PARTITIONING isNotNull contentTypes BadPartitioningException isTrue contentTypes
see org eclipse jface text I Document get Length public int get Length return get Store get Length  IDocument getLength getLength getStore getLength
see org eclipse jface text I Document get Line Delimiter int public String get Line Delimiter int line throws Bad Location Exception return get Tracker get Line Delimiter line  IDocument getLineDelimiter getLineDelimiter BadLocationException getTracker getLineDelimiter
see org eclipse jface text I Document get Legal Line Delimiters public String get Legal Line Delimiters return get Tracker get Legal Line Delimiters  IDocument getLegalLineDelimiters getLegalLineDelimiters getTracker getLegalLineDelimiters
see org eclipse jface text I Document get Line Length int public int get Line Length int line throws Bad Location Exception return get Tracker get Line Length line  IDocument getLineLength getLineLength BadLocationException getTracker getLineLength
see org eclipse jface text I Document get Line Of Offset int public int get Line Of Offset int pos throws Bad Location Exception return get Tracker get Line Number Of Offset pos  IDocument getLineOfOffset getLineOfOffset BadLocationException getTracker getLineNumberOfOffset
see org eclipse jface text I Document get Line Offset int public int get Line Offset int line throws Bad Location Exception return get Tracker get Line Offset line  IDocument getLineOffset getLineOffset BadLocationException getTracker getLineOffset
see org eclipse jface text I Document get Line Information int public I Region get Line Information int line throws Bad Location Exception return get Tracker get Line Information line  IDocument getLineInformation IRegion getLineInformation BadLocationException getTracker getLineInformation
see org eclipse jface text I Document get Line Information Of Offset int public I Region get Line Information Of Offset int offset throws Bad Location Exception return get Tracker get Line Information Of Offset offset  IDocument getLineInformationOfOffset IRegion getLineInformationOfOffset BadLocationException getTracker getLineInformationOfOffset
see org eclipse jface text I Document get Number Of Lines public int get Number Of Lines return get Tracker get Number Of Lines  IDocument getNumberOfLines getNumberOfLines getTracker getNumberOfLines
see org eclipse jface text I Document get Number Of Lines int int public int get Number Of Lines int offset int length throws Bad Location Exception return get Tracker get Number Of Lines offset length  IDocument getNumberOfLines getNumberOfLines BadLocationException getTracker getNumberOfLines
see org eclipse jface text I Document compute Number Of Lines java lang String public int compute Number Of Lines String text return get Tracker compute Number Of Lines text  IDocument computeNumberOfLines computeNumberOfLines getTracker computeNumberOfLines
public I Typed Region get Partition int offset throws Bad Location Exception I Typed Region partition null try partition get Partition DEFAULT PARTITIONING offset false Assert is Not Null partition catch Bad Partitioning Exception e Assert is True false return partition  ITypedRegion getPartition BadLocationException ITypedRegion getPartition DEFAULT_PARTITIONING isNotNull BadPartitioningException isTrue
public I Typed Region compute Partitioning int offset int length throws Bad Location Exception I Typed Region partitioning null try partitioning compute Partitioning DEFAULT PARTITIONING offset length false Assert is Not Null partitioning catch Bad Partitioning Exception e Assert is True false return partitioning  ITypedRegion computePartitioning BadLocationException ITypedRegion computePartitioning DEFAULT_PARTITIONING isNotNull BadPartitioningException isTrue
public Position get Positions String category throws Bad Position Category Exception if category null throw new Bad Position Category Exception List c List f Positions get category if c null throw new Bad Position Category Exception Position positions new Position c size c to Array positions return positions  getPositions BadPositionCategoryException BadPositionCategoryException fPositions BadPositionCategoryException toArray
public String get Position Categories String categories new String f Positions size Iterator keys f Positions key Set iterator for int i 0 i categories length i categories i String keys next return categories  getPositionCategories fPositions fPositions keySet
public I Position Updater get Position Updaters I Position Updater updaters new I Position Updater f Position Updaters size f Position Updaters to Array updaters return updaters  IPositionUpdater getPositionUpdaters IPositionUpdater IPositionUpdater fPositionUpdaters fPositionUpdaters toArray
see org eclipse jface text I Document get public String get return get Store get 0 get Length  IDocument getStore getLength
public String get int pos int length throws Bad Location Exception int my Length get Length if 0 pos 0 length pos length my Length throw new Bad Location Exception return get Store get pos length  BadLocationException myLength getLength myLength BadLocationException getStore
public void insert Position Updater I Position Updater updater int index for int i f Position Updaters size 1 i 0 i if f Position Updaters get i updater return if index f Position Updaters size f Position Updaters add updater else f Position Updaters add index updater  insertPositionUpdater IPositionUpdater fPositionUpdaters fPositionUpdaters fPositionUpdaters fPositionUpdaters fPositionUpdaters
public void remove Position String category Position position throws Bad Position Category Exception if position null return if category null throw new Bad Position Category Exception List c List f Positions get category if c null throw new Bad Position Category Exception remove based on identity not equality int size c size for int i 0 i size i if position c get i c remove i return  removePosition BadPositionCategoryException BadPositionCategoryException fPositions BadPositionCategoryException
public void remove Position Position position try remove Position DEFAULT CATEGORY position catch Bad Position Category Exception e  removePosition removePosition DEFAULT_CATEGORY BadPositionCategoryException
public void remove Position Category String category throws Bad Position Category Exception if category null return if contains Position Category category throw new Bad Position Category Exception f Positions remove category  removePositionCategory BadPositionCategoryException containsPositionCategory BadPositionCategoryException fPositions
public void remove Position Updater I Position Updater updater for int i f Position Updaters size 1 i 0 i if f Position Updaters get i updater f Position Updaters remove i return  removePositionUpdater IPositionUpdater fPositionUpdaters fPositionUpdaters fPositionUpdaters
public void replace int pos int length String text throws Bad Location Exception if 0 pos 0 length pos length get Length throw new Bad Location Exception Document Event e new Document Event this pos length text fire Document About To Be Changed e get Store replace pos length text get Tracker replace pos length text fire Document Changed e  BadLocationException getLength BadLocationException DocumentEvent DocumentEvent fireDocumentAboutToBeChanged getStore getTracker fireDocumentChanged
public void set String text int length get Store get Length Document Event e new Document Event this 0 length text fire Document About To Be Changed e get Store set text get Tracker set text fire Document Changed e  getStore getLength DocumentEvent DocumentEvent fireDocumentAboutToBeChanged getStore getTracker fireDocumentChanged
Updates all positions of all categories to the change described by the document event All registered document updaters are called in the sequence they have been arranged Uses a robust iterator param event the document event describing the change to which to adapt the positions protected void update Positions Document Event event List list new Array List f Position Updaters Iterator e list iterator while e has Next I Position Updater u I Position Updater e next u update event  updatePositions DocumentEvent ArrayList fPositionUpdaters hasNext IPositionUpdater IPositionUpdater
public int search int start Position String find String boolean forward Search boolean case Sensitive boolean whole Word throws Bad Location Exception try I Region region get Find Replace Document Adapter find start Position find String forward Search case Sensitive whole Word false if region null return 1 else return region get Offset catch Illegal State Exception ex return 1 catch Pattern Syntax Exception ex return 1  startPosition findString forwardSearch caseSensitive wholeWord BadLocationException IRegion getFindReplaceDocumentAdapter startPosition findString forwardSearch caseSensitive wholeWord getOffset IllegalStateException PatternSyntaxException
Returns the find replace adapter for this document return this document s find replace document adapter since 3 0 private Find Replace Document Adapter get Find Replace Document Adapter if f Find Replace Document Adapter null f Find Replace Document Adapter new Find Replace Document Adapter this return f Find Replace Document Adapter  FindReplaceDocumentAdapter getFindReplaceDocumentAdapter fFindReplaceDocumentAdapter fFindReplaceDocumentAdapter FindReplaceDocumentAdapter fFindReplaceDocumentAdapter
Flushes all registered post notification changes since 2 0 private void flush Post Notification Changes if f Post Notification Changes null f Post Notification Changes clear  flushPostNotificationChanges fPostNotificationChanges fPostNotificationChanges
Executes all registered post notification changes The process is repeated until no new post notification changes are added since 2 0 private void execute Post Notification Changes if f Stopped Count 0 return while f Post Notification Changes null List changes f Post Notification Changes f Post Notification Changes null Iterator e changes iterator while e has Next Registered Replace replace Registered Replace e next replace f Replace perform this replace f Owner  executePostNotificationChanges fStoppedCount fPostNotificationChanges fPostNotificationChanges fPostNotificationChanges hasNext RegisteredReplace RegisteredReplace fReplace fOwner
since 2 1 public void accept Post Notification Replaces f Accept Post Notification Replaces true  acceptPostNotificationReplaces fAcceptPostNotificationReplaces
since 2 1 public void ignore Post Notification Replaces f Accept Post Notification Replaces false  ignorePostNotificationReplaces fAcceptPostNotificationReplaces
public void register Post Notification Replace I Document Listener owner I Document Extension I Replace replace if f Accept Post Notification Replaces if f Post Notification Changes null f Post Notification Changes new Array List 1 f Post Notification Changes add new Registered Replace owner replace  registerPostNotificationReplace IDocumentListener IDocumentExtension IReplace fAcceptPostNotificationReplaces fPostNotificationChanges fPostNotificationChanges ArrayList fPostNotificationChanges RegisteredReplace
since 2 0 public void stop Post Notification Processing f Stopped Count  stopPostNotificationProcessing fStoppedCount
public void resume Post Notification Processing f Stopped Count if f Stopped Count 0 f Reentrance Count 0 execute Post Notification Changes  resumePostNotificationProcessing fStoppedCount fStoppedCount fReentranceCount executePostNotificationChanges
since 2 0 public void start Sequential Rewrite boolean normalized  startSequentialRewrite
since 2 0 public void stop Sequential Rewrite  stopSequentialRewrite
public void resume Listener Notification f Stopped Listener Notification if f Stopped Listener Notification 0 resume Document Listener Notification  resumeListenerNotification fStoppedListenerNotification fStoppedListenerNotification resumeDocumentListenerNotification
since 2 1 public void stop Listener Notification f Stopped Listener Notification  stopListenerNotification fStoppedListenerNotification
Resumes the document listener notification by sending out the remembered partition changed and document event since 2 1 private void resume Document Listener Notification if f Deferred Document Event null Document Event event f Deferred Document Event f Deferred Document Event null do Fire Document Changed event  resumeDocumentListenerNotification fDeferredDocumentEvent DocumentEvent fDeferredDocumentEvent fDeferredDocumentEvent doFireDocumentChanged
public I Typed Region compute Partitioning String partitioning int offset int length boolean include Zero Length Partitions throws Bad Location Exception Bad Partitioning Exception if 0 offset 0 length offset length get Length throw new Bad Location Exception I Document Partitioner partitioner get Document Partitioner partitioning if partitioner instanceof I Document Partitioner Extension2 return I Document Partitioner Extension2 partitioner compute Partitioning offset length include Zero Length Partitions else if partitioner null return partitioner compute Partitioning offset length else if DEFAULT PARTITIONING equals partitioning return new Typed Region new Typed Region offset length DEFAULT CONTENT TYPE else throw new Bad Partitioning Exception  ITypedRegion computePartitioning includeZeroLengthPartitions BadLocationException BadPartitioningException getLength BadLocationException IDocumentPartitioner getDocumentPartitioner IDocumentPartitionerExtension2 IDocumentPartitionerExtension2 computePartitioning includeZeroLengthPartitions computePartitioning DEFAULT_PARTITIONING TypedRegion TypedRegion DEFAULT_CONTENT_TYPE BadPartitioningException
public String get Content Type String partitioning int offset boolean prefer Open Partitions throws Bad Location Exception Bad Partitioning Exception if 0 offset offset get Length throw new Bad Location Exception I Document Partitioner partitioner get Document Partitioner partitioning if partitioner instanceof I Document Partitioner Extension2 return I Document Partitioner Extension2 partitioner get Content Type offset prefer Open Partitions else if partitioner null return partitioner get Content Type offset else if DEFAULT PARTITIONING equals partitioning return DEFAULT CONTENT TYPE else throw new Bad Partitioning Exception  getContentType preferOpenPartitions BadLocationException BadPartitioningException getLength BadLocationException IDocumentPartitioner getDocumentPartitioner IDocumentPartitionerExtension2 IDocumentPartitionerExtension2 getContentType preferOpenPartitions getContentType DEFAULT_PARTITIONING DEFAULT_CONTENT_TYPE BadPartitioningException
since 3 0 public I Document Partitioner get Document Partitioner String partitioning return f Document Partitioners null I Document Partitioner f Document Partitioners get partitioning null  IDocumentPartitioner getDocumentPartitioner fDocumentPartitioners IDocumentPartitioner fDocumentPartitioners
public String get Legal Content Types String partitioning throws Bad Partitioning Exception I Document Partitioner partitioner get Document Partitioner partitioning if partitioner null return partitioner get Legal Content Types if DEFAULT PARTITIONING equals partitioning return new String DEFAULT CONTENT TYPE throw new Bad Partitioning Exception  getLegalContentTypes BadPartitioningException IDocumentPartitioner getDocumentPartitioner getLegalContentTypes DEFAULT_PARTITIONING DEFAULT_CONTENT_TYPE BadPartitioningException
public I Typed Region get Partition String partitioning int offset boolean prefer Open Partitions throws Bad Location Exception Bad Partitioning Exception if 0 offset offset get Length throw new Bad Location Exception I Document Partitioner partitioner get Document Partitioner partitioning if partitioner instanceof I Document Partitioner Extension2 return I Document Partitioner Extension2 partitioner get Partition offset prefer Open Partitions else if partitioner null return partitioner get Partition offset else if DEFAULT PARTITIONING equals partitioning return new Typed Region 0 get Length DEFAULT CONTENT TYPE else throw new Bad Partitioning Exception  ITypedRegion getPartition preferOpenPartitions BadLocationException BadPartitioningException getLength BadLocationException IDocumentPartitioner getDocumentPartitioner IDocumentPartitionerExtension2 IDocumentPartitionerExtension2 getPartition preferOpenPartitions getPartition DEFAULT_PARTITIONING TypedRegion getLength DEFAULT_CONTENT_TYPE BadPartitioningException
public String get Partitionings if f Document Partitioners null return new String 0 String partitionings new String f Document Partitioners size f Document Partitioners key Set to Array partitionings return partitionings  getPartitionings fDocumentPartitioners fDocumentPartitioners fDocumentPartitioners keySet toArray
public void set Document Partitioner String partitioning I Document Partitioner partitioner if partitioner null if f Document Partitioners null f Document Partitioners remove partitioning if f Document Partitioners size 0 f Document Partitioners null else if f Document Partitioners null f Document Partitioners new Hash Map f Document Partitioners put partitioning partitioner Document Partitioning Changed Event event new Document Partitioning Changed Event this event set Partition Change partitioning 0 get Length fire Document Partitioning Changed event  setDocumentPartitioner IDocumentPartitioner fDocumentPartitioners fDocumentPartitioners fDocumentPartitioners fDocumentPartitioners fDocumentPartitioners fDocumentPartitioners HashMap fDocumentPartitioners DocumentPartitioningChangedEvent DocumentPartitioningChangedEvent setPartitionChange getLength fireDocumentPartitioningChanged
since 3 0 public void repair Line Information get Tracker set get  repairLineInformation getTracker

Creates a new information control closer public Closer 
see I Information Control Closer set Subject Control Control public void set Subject Control Control control f Subject Control control  IInformationControlCloser setSubjectControl setSubjectControl fSubjectControl
see I Information Control Closer set Hover Control I Hover Control public void set Information Control I Information Control control  IInformationControlCloser setHoverControl IHoverControl setInformationControl IInformationControl
public void start Rectangle subject Area if f Is Active return f Is Active true f Subject Area subject Area if f Subject Control null f Subject Control is Disposed f Subject Control add Mouse Listener this f Subject Control add Mouse Move Listener this f Subject Control add Mouse Track Listener this f Subject Control add Control Listener this f Subject Control add Key Listener this  subjectArea fIsActive fIsActive fSubjectArea subjectArea fSubjectControl fSubjectControl isDisposed fSubjectControl addMouseListener fSubjectControl addMouseMoveListener fSubjectControl addMouseTrackListener fSubjectControl addControlListener fSubjectControl addKeyListener
see I Information Control Closer stop public void stop stop false  IInformationControlCloser
Stops the information control and if code delay Restart code is set allows restart only after a certain delay param delay Restart code true code if restart should be delayed protected void stop boolean delay Restart if f Is Active return f Is Active false hide Information Control if f Subject Control null f Subject Control is Disposed f Subject Control remove Mouse Listener this f Subject Control remove Mouse Move Listener this f Subject Control remove Mouse Track Listener this f Subject Control remove Control Listener this f Subject Control remove Key Listener this  delayRestart delayRestart delayRestart fIsActive fIsActive hideInformationControl fSubjectControl fSubjectControl isDisposed fSubjectControl removeMouseListener fSubjectControl removeMouseMoveListener fSubjectControl removeMouseTrackListener fSubjectControl removeControlListener fSubjectControl removeKeyListener
see org eclipse swt events Mouse Move Listener mouse Move org eclipse swt events Mouse Event public void mouse Move Mouse Event event if f Subject Area contains event x event y stop  MouseMoveListener mouseMove MouseEvent mouseMove MouseEvent fSubjectArea
see org eclipse swt events Mouse Listener mouse Up org eclipse swt events Mouse Event public void mouse Up Mouse Event event  MouseListener mouseUp MouseEvent mouseUp MouseEvent
see Mouse Listener mouse Down Mouse Event public void mouse Down Mouse Event event stop  MouseListener mouseDown MouseEvent mouseDown MouseEvent
see Mouse Listener mouse Double Click Mouse Event public void mouse Double Click Mouse Event event stop  MouseListener mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent
see Mouse Track Adapter mouse Exit Mouse Event public void mouse Exit Mouse Event event stop  MouseTrackAdapter mouseExit MouseEvent mouseExit MouseEvent
see Control Listener control Resized Control Event public void control Resized Control Event event stop  ControlListener controlResized ControlEvent controlResized ControlEvent
see Control Listener control Moved Control Event public void control Moved Control Event event stop  ControlListener controlMoved ControlEvent controlMoved ControlEvent
see Key Listener key Released Key Event public void key Released Key Event event  KeyListener keyReleased KeyEvent keyReleased KeyEvent
see Key Listener key Pressed Key Event public void key Pressed Key Event event stop true  KeyListener keyPressed KeyEvent keyPressed KeyEvent
Creates a new mouse tracker public Mouse Tracker  MouseTracker
Sets this mouse tracker s subject area the area to be tracked in order to re enable the information control manager param subject Area the subject area public void set Subject Area Rectangle subject Area Assert is Not Null subject Area f Subject Area subject Area  subjectArea setSubjectArea subjectArea isNotNull subjectArea fSubjectArea subjectArea
Starts this mouse tracker The given control becomes this tracker s subject control Installs itself as mouse track listener on the subject control param subject Control the subject control public void start Control subject Control f Subject Control subject Control if f Subject Control null f Subject Control is Disposed f Subject Control add Mouse Track Listener this f Is In Restart Mode false f Is Computing false f Mouse Lost While Computing false f Shell Deactivated While Computing false  subjectControl subjectControl fSubjectControl subjectControl fSubjectControl fSubjectControl isDisposed fSubjectControl addMouseTrackListener fIsInRestartMode fIsComputing fMouseLostWhileComputing fShellDeactivatedWhileComputing
Stops this mouse tracker Removes itself as mouse track mouse move and shell listener from the subject control public void stop if f Subject Control null f Subject Control is Disposed f Subject Control remove Mouse Track Listener this f Subject Control remove Mouse Move Listener this f Subject Control get Shell remove Shell Listener this  fSubjectControl fSubjectControl isDisposed fSubjectControl removeMouseTrackListener fSubjectControl removeMouseMoveListener fSubjectControl getShell removeShellListener
Initiates the computation of the information to be presented Sets the initial hover area to a small rectangle around the hover event location Adds mouse move and shell activation listeners to track whether the computed information is after completion useful for presentation and to implement the restart function param event the mouse hover event public void mouse Hover Mouse Event event if f Is Computing f Is In Restart Mode return f Is In Restart Mode true f Is Computing true f Mouse Lost While Computing false f Shell Deactivated While Computing false f Hover Event State Mask event state Mask f Hover Event event f Hover Area new Rectangle event x EPSILON event y EPSILON 2 EPSILON 2 EPSILON if f Hover Area x 0 f Hover Area x 0 if f Hover Area y 0 f Hover Area y 0 set Subject Area f Hover Area if f Subject Control null f Subject Control is Disposed f Subject Control add Mouse Move Listener this f Subject Control get Shell add Shell Listener this do Show Information  mouseHover MouseEvent fIsComputing fIsInRestartMode fIsInRestartMode fIsComputing fMouseLostWhileComputing fShellDeactivatedWhileComputing fHoverEventStateMask stateMask fHoverEvent fHoverArea fHoverArea fHoverArea fHoverArea fHoverArea setSubjectArea fHoverArea fSubjectControl fSubjectControl isDisposed fSubjectControl addMouseMoveListener fSubjectControl getShell addShellListener doShowInformation
Deactivates this tracker s restart function and enables the information control manager Does not have any effect if the tracker is still executing the start function i e computing the information to be presented protected void deactivate if f Is Computing return f Is In Restart Mode false if f Subject Control null f Subject Control is Disposed f Subject Control remove Mouse Move Listener this f Subject Control get Shell remove Shell Listener this  fIsComputing fIsInRestartMode fSubjectControl fSubjectControl isDisposed fSubjectControl removeMouseMoveListener fSubjectControl getShell removeShellListener
see Mouse Track Listener mouse Enter Mouse Event public void mouse Enter Mouse Event e  MouseTrackListener mouseEnter MouseEvent mouseEnter MouseEvent
see Mouse Track Listener mouse Exit Mouse Event public void mouse Exit Mouse Event e f Mouse Lost While Computing true deactivate  MouseTrackListener mouseExit MouseEvent mouseExit MouseEvent fMouseLostWhileComputing
see Mouse Move Listener mouse Move Mouse Event public void mouse Move Mouse Event event if f Subject Area contains event x event y deactivate  MouseMoveListener mouseMove MouseEvent mouseMove MouseEvent fSubjectArea
see Shell Listener shell Deactivated Shell Event public void shell Deactivated Shell Event e f Shell Deactivated While Computing true deactivate  ShellListener shellDeactivated ShellEvent shellDeactivated ShellEvent fShellDeactivatedWhileComputing
see Shell Listener shell Iconified Shell Event public void shell Iconified Shell Event e f Shell Deactivated While Computing true deactivate  ShellListener shellIconified ShellEvent shellIconified ShellEvent fShellDeactivatedWhileComputing
Tells this tracker that the start function processing has been completed public void computation Completed f Is Computing false f Mouse Lost While Computing false f Shell Deactivated While Computing false  computationCompleted fIsComputing fMouseLostWhileComputing fShellDeactivatedWhileComputing
Determines whether the computed information is still useful for presentation This is not the case if the shell of the subject control has been deactivated the mouse left the subject control or the mouse moved on so that it is no longer in the subject area return code true code if information is still useful for presentation code false code otherwise public boolean is Mouse Lost if f Mouse Lost While Computing f Shell Deactivated While Computing return true if f Subject Control null f Subject Control is Disposed Display display f Subject Control get Display Point p display get Cursor Location p f Subject Control to Control p if f Subject Area contains p f Hover Area contains p return true return false  isMouseLost fMouseLostWhileComputing fShellDeactivatedWhileComputing fSubjectControl fSubjectControl isDisposed fSubjectControl getDisplay getCursorLocation fSubjectControl toControl fSubjectArea fHoverArea
Creates a new hover information control manager using the given information control creator By default a code Closer code instance is set as this manager s closer param creator the information control creator protected Abstract Hover Information Control Manager I Information Control Creator creator super creator set Closer new Closer  AbstractHoverInformationControlManager IInformationControlCreator setCloser
protected void present Information if f Mouse Tracker null super present Information return Rectangle area get Subject Area if area null f Mouse Tracker set Subject Area area if f Mouse Tracker is Mouse Lost f Mouse Tracker computation Completed f Mouse Tracker deactivate else f Mouse Tracker computation Completed super present Information  presentInformation fMouseTracker presentInformation getSubjectArea fMouseTracker setSubjectArea fMouseTracker isMouseLost fMouseTracker computationCompleted fMouseTracker fMouseTracker computationCompleted presentInformation
public void set Enabled boolean enabled boolean was is Enabled super set Enabled enabled boolean is is Enabled if was is f Mouse Tracker null if is f Mouse Tracker start get Subject Control else f Mouse Tracker stop  setEnabled isEnabled setEnabled isEnabled fMouseTracker fMouseTracker getSubjectControl fMouseTracker
Disposes this manager s information control public void dispose if f Mouse Tracker null f Mouse Tracker stop f Mouse Tracker f Subject Control null f Mouse Tracker null super dispose  fMouseTracker fMouseTracker fMouseTracker fSubjectControl fMouseTracker
Returns the location at which the most recent mouse hover event has been issued return the location of the most recent mouse hover event protected Point get Hover Event Location return f Hover Event null new Point f Hover Event x f Hover Event y new Point 1 1  getHoverEventLocation fHoverEvent fHoverEvent fHoverEvent
Returns the most recent mouse hover event return the most recent mouse hover event or code null code since 3 0 protected Mouse Event get Hover Event return f Hover Event  MouseEvent getHoverEvent fHoverEvent
Returns the SWT event state of the most recent mouse hover event return the SWT event state of the most recent mouse hover event protected int get Hover Event State Mask return f Hover Event State Mask  getHoverEventStateMask fHoverEventStateMask

Sets the closer s subject control This is the control that parents the information control and from which the subject of the information to be shown is retrieved p Must be called before code start code May again be called between code start code and code stop code param subject the subject control 
Sets the closer s information control the one to close if necessary p Must be called before code start code May again be called between code start code and code stop code param control the information control 
Tells this closer to start monitoring the subject and the information control The presented information is considered valid for the given area of the subject control s display param subject Area the area for which the presented information is valid  subjectArea
public void start Rectangle subject Area Tells this closer to stop monitoring the subject and the information control public void stop  subjectArea
public static final class Anchor private Anchor 
Creates a new information control manager using the given information control creator By default the following configuration is given ul li enabled false li horizontal margin 5 points li vertical margin 5 points li width constraint 60 characters li height constraint 6 characters li enforce constraints as minimal size false li enforce constraints as maximal size false li layout anchor ANCHOR BOTTOM li fall back anchors ANCHOR TOP ANCHOR BOTTOM ANCHOR LEFT ANCHOR RIGHT ANCHOR GLOBAL li takes focus when visible false ul param creator the information control creator protected Abstract Information Control Manager I Information Control Creator creator Assert is Not Null creator f Information Control Creator creator  ANCHOR_BOTTOM ANCHOR_TOP ANCHOR_BOTTOM ANCHOR_LEFT ANCHOR_RIGHT ANCHOR_GLOBAL AbstractInformationControlManager IInformationControlCreator isNotNull fInformationControlCreator
Computes the information to be displayed and the area in which the computed information is valid Implementation of this method must finish their computation by setting the computation results using code set Information code  setInformation
Sets the parameters of the information to be displayed These are the information itself and the area for which the given information is valid This so called subject area is a graphical region of the information control s subject control This method calls code present Information code to trigger the presentation of the computed information param information the information param subject Area the subject area protected final void set Information String information Rectangle subject Area f Information information f Subject Area subject Area present Information  presentInformation subjectArea setInformation subjectArea fInformation fSubjectArea subjectArea presentInformation
Sets the parameters of the information to be displayed These are the information itself and the area for which the given information is valid This so called subject area is a graphical region of the information control s subject control This method calls code present Information code to trigger the presentation of the computed information param information the information param subject Area the subject area since 2 1 protected final void set Information Object information Rectangle subject Area f Information information f Subject Area subject Area present Information  presentInformation subjectArea setInformation subjectArea fInformation fSubjectArea subjectArea presentInformation
Sets the information control closer for this manager param closer the information control closer for this manager protected void set Closer I Information Control Closer closer f Information Control Closer closer  setCloser IInformationControlCloser fInformationControlCloser
Sets the horizontal and vertical margin to be used when laying out the information control relative to the subject control param x Margin the x margin param y Margin the y Margin public void set Margins int x Margin int y Margin f MarginX x Margin f MarginY y Margin  xMargin yMargin setMargins xMargin yMargin fMarginX xMargin fMarginY yMargin
Sets the width and height constraints of the information control param width In Char the width constraint in number of characters param height In Char the height constrain in number of characters param enforce As Minimal Size indicates whether the constraints describe the minimal allowed size of the control param enforce As Maximal Size indicates whether the constraints describe the maximal allowed size of the control public void set Size Constraints int width In Char int height In Char boolean enforce As Minimal Size boolean enforce As Maximal Size f Size Constraints null f Width Constraint width In Char f Height Constraint height In Char f Enforce As Minimal Size enforce As Minimal Size f Enforce As Maximal Size enforce As Maximal Size  widthInChar heightInChar enforceAsMinimalSize enforceAsMaximalSize setSizeConstraints widthInChar heightInChar enforceAsMinimalSize enforceAsMaximalSize fSizeConstraints fWidthConstraint widthInChar fHeightConstraint heightInChar fEnforceAsMinimalSize enforceAsMinimalSize fEnforceAsMaximalSize enforceAsMaximalSize
Tells this information control manager to open the information control with the values contained in the given dialog settings and to store the control s last valid size in the given dialog settings p Note This API is only valid if the information control implements link I Information Control Extension3 Not following this restriction will later result in an link Unsupported Operation Exception p p The constants used to store the values are ul li link Abstract Information Control Manager STORE LOCATION X li li link Abstract Information Control Manager STORE LOCATION Y li li link Abstract Information Control Manager STORE SIZE WIDTH li li link Abstract Information Control Manager STORE SIZE HEIGHT li ul p param dialog Settings param restore Location code true code iff the location is must be re stored param restore Size code true code iff the size is re stored since 3 0 public void set Restore Information Control Bounds I Dialog Settings dialog Settings boolean restore Location boolean restore Size Assert is True dialog Settings null restore Location restore Size f Dialog Settings dialog Settings f Is Restoring Location restore Location f Is Restoring Size restore Size  IInformationControlExtension3 UnsupportedOperationException AbstractInformationControlManager STORE_LOCATION_X AbstractInformationControlManager STORE_LOCATION_Y AbstractInformationControlManager STORE_SIZE_WIDTH AbstractInformationControlManager STORE_SIZE_HEIGHT dialogSettings restoreLocation restoreSize setRestoreInformationControlBounds IDialogSettings dialogSettings restoreLocation restoreSize isTrue dialogSettings restoreLocation restoreSize fDialogSettings dialogSettings fIsRestoringLocation restoreLocation fIsRestoringSize restoreSize
Sets the anchor used for laying out the information control relative to the subject control E g using code ANCHOR TOP code indicates that the information control is position above the area for which the information to be displayed is valid param anchor the layout anchor public void set Anchor Anchor anchor f Anchor anchor  ANCHOR_TOP setAnchor fAnchor
Sets the sequence of anchors along which the information control is tried to be laid out until it is fully visible This fallback is initiated when the information control does not fit into the client area of the subject control s display param fallback Anchors the list of anchors to be tried public void set Fallback Anchors Anchor fallback Anchors f Fallback Anchors fallback Anchors  fallbackAnchors setFallbackAnchors fallbackAnchors fFallbackAnchors fallbackAnchors
Sets the temporary custom control creator overriding this manager s default information control creator param information Control Creator since 3 0 protected void set Custom Information Control Creator I Information Control Creator information Control Creator if f Custom Information Control Creator instanceof I Information Control Creator Extension I Information Control Creator Extension extension I Information Control Creator Extension f Custom Information Control Creator if extension can Replace information Control Creator return f Custom Information Control Creator information Control Creator  informationControlCreator setCustomInformationControlCreator IInformationControlCreator informationControlCreator fCustomInformationControlCreator IInformationControlCreatorExtension IInformationControlCreatorExtension IInformationControlCreatorExtension fCustomInformationControlCreator canReplace informationControlCreator fCustomInformationControlCreator informationControlCreator
Tells the manager whether it should set the focus to the information control when made visible param takes Focus code true code if information control should take focus when made visible public void takes Focus When Visible boolean takes Focus f Takes Focus When Visible takes Focus  takesFocus takesFocusWhenVisible takesFocus fTakesFocusWhenVisible takesFocus
Handles the disposal of the subject control By default the information control is disposed by calling code dispose Information Control code Subclasses may extend this method protected void handle Subject Control Disposed dispose Information Control  disposeInformationControl handleSubjectControlDisposed disposeInformationControl
if f Subject Control null f Subject Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e handle Subject Control Disposed  fSubjectControl fSubjectControl addDisposeListener DisposeListener widgetDisposed DisposeEvent handleSubjectControlDisposed
Installs this manager on the given control The control is now taking the role of the subject control This implementation sets the control also as the information control closer s subject control and automatically enables this manager param subject Control the subject control public void install Control subject Control f Subject Control subject Control if f Subject Control null f Subject Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e handle Subject Control Disposed if f Information Control Closer null f Information Control Closer set Subject Control subject Control set Enabled true f Disposed false  subjectControl subjectControl fSubjectControl subjectControl fSubjectControl fSubjectControl addDisposeListener DisposeListener widgetDisposed DisposeEvent handleSubjectControlDisposed fInformationControlCloser fInformationControlCloser setSubjectControl subjectControl setEnabled fDisposed
Returns the subject control of this manager information control return the subject control protected Control get Subject Control return f Subject Control  getSubjectControl fSubjectControl
Returns the actual subject area return the actual subject area protected Rectangle get Subject Area return f Subject Area  getSubjectArea fSubjectArea
Sets the enable state of this manager param enabled the enable state deprecated visibility will be changed to protected public void set Enabled boolean enabled f Enabled enabled  setEnabled fEnabled
Returns whether this manager is enabled or not return code true code if this manager is enabled otherwise code false code protected boolean is Enabled return f Enabled  isEnabled fEnabled
Computes the size constraints of the information control in points based on the default font of the given subject control as well as the size constraints in character width param subject Control the subject control param information Control the information control whose size constraints are computed return the computed size constraints in points protected Point compute Size Constraints Control subject Control I Information Control information Control if f Size Constraints null if subject Control null return null GC gc new GC subject Control gc set Font subject Control get Font int width gc get Font Metrics get Average Char Width int height gc get Font Metrics get Height gc dispose f Size Constraints new Point f Width Constraint width f Height Constraint height return f Size Constraints  subjectControl informationControl computeSizeConstraints subjectControl IInformationControl informationControl fSizeConstraints subjectControl subjectControl setFont subjectControl getFont getFontMetrics getAverageCharWidth getFontMetrics getHeight fSizeConstraints fWidthConstraint fHeightConstraint fSizeConstraints
Computes the size constraints of the information control in points param subject Control the subject control param subject Area the subject area param information Control the information control whose size constraints are computed return the computed size constraints in points since 3 0 protected Point compute Size Constraints Control subject Control Rectangle subject Area I Information Control information Control return compute Size Constraints subject Control information Control  subjectControl subjectArea informationControl computeSizeConstraints subjectControl subjectArea IInformationControl informationControl computeSizeConstraints subjectControl informationControl
Handles the disposal of the information control By default the information control closer is stopped protected void handle Information Control Disposed store Information Control Bounds f Information Control null if f Information Control Closer null f Information Control Closer set Information Control null f Information Control Closer stop  handleInformationControlDisposed storeInformationControlBounds fInformationControl fInformationControlCloser fInformationControlCloser setInformationControl fInformationControlCloser
f Information Control creator create Information Control f Subject Control get Shell f Information Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e handle Information Control Disposed  fInformationControl createInformationControl fSubjectControl getShell fInformationControl addDisposeListener DisposeListener widgetDisposed DisposeEvent handleInformationControlDisposed
Returns the information control If the information control has not been created yet it is automatically created return the information control protected I Information Control get Information Control if f Disposed return f Information Control I Information Control Creator creator null if f Custom Information Control Creator null creator f Information Control Creator if f Is Custom Information Control f Information Control null f Information Control dispose f Information Control null f Is Custom Information Control false else creator f Custom Information Control Creator if creator instanceof I Information Control Creator Extension I Information Control Creator Extension extension I Information Control Creator Extension creator if extension can Reuse f Information Control return f Information Control if f Information Control null f Information Control dispose f Information Control null f Is Custom Information Control true if f Information Control null f Information Control creator create Information Control f Subject Control get Shell f Information Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e handle Information Control Disposed if f Information Control Closer null f Information Control Closer set Information Control f Information Control return f Information Control  IInformationControl getInformationControl fDisposed fInformationControl IInformationControlCreator fCustomInformationControlCreator fInformationControlCreator fIsCustomInformationControl fInformationControl fInformationControl fInformationControl fIsCustomInformationControl fCustomInformationControlCreator IInformationControlCreatorExtension IInformationControlCreatorExtension IInformationControlCreatorExtension canReuse fInformationControl fInformationControl fInformationControl fInformationControl fInformationControl fIsCustomInformationControl fInformationControl fInformationControl createInformationControl fSubjectControl getShell fInformationControl addDisposeListener DisposeListener widgetDisposed DisposeEvent handleInformationControlDisposed fInformationControlCloser fInformationControlCloser setInformationControl fInformationControl fInformationControl
Computes the display location of the information control The location is computed considering the given subject area the anchor at the subject area and the size of the information control This method does not care about whether the information control would be completely visible when placed at the result location param subject Area the subject area param control Size the size of the information control param anchor the anchor at the subject area return the display location of the information control protected Point compute Location Rectangle subject Area Point control Size Anchor anchor if ANCHOR GLOBAL anchor Point subject Control Size f Subject Control get Size Point location new Point subject Control Size x 2 subject Control Size y 2 location x control Size x 2 location y control Size y 2 return f Subject Control to Display location int x Shift 0 int y Shift 0 if ANCHOR BOTTOM anchor x Shift f MarginX y Shift subject Area height f MarginY else if ANCHOR RIGHT anchor x Shift f MarginX subject Area width y Shift f MarginY else if ANCHOR TOP anchor x Shift f MarginX y Shift control Size y f MarginY else if ANCHOR LEFT anchor x Shift control Size x f MarginX y Shift f MarginY return f Subject Control to Display new Point subject Area x x Shift subject Area y y Shift  subjectArea controlSize computeLocation subjectArea controlSize ANCHOR_GLOBAL subjectControlSize fSubjectControl getSize subjectControlSize subjectControlSize controlSize controlSize fSubjectControl toDisplay xShift yShift ANCHOR_BOTTOM xShift fMarginX yShift subjectArea fMarginY ANCHOR_RIGHT xShift fMarginX subjectArea yShift fMarginY ANCHOR_TOP xShift fMarginX yShift controlSize fMarginY ANCHOR_LEFT xShift controlSize fMarginX yShift fMarginY fSubjectControl toDisplay subjectArea xShift subjectArea yShift
Checks whether a control of the given size at the given location would be completely visible in the given display area when laid out by using the given anchor If not this method tries to shift the control orthogonal to the direction given by the anchor to make it visible If possible it updates the location p This method returns code true code if the potentially updated position results in a completely visible control or code false code otherwise param location the location of the control param size the size of the control param display Area the display area in which the control should be visible param anchor anchor for lying out the control return code true code if the updated location is useful protected boolean update Location Point location Point size Rectangle display Area Anchor anchor int display Lower RightX display Area x display Area width int display Lower RightY display Area y display Area height int lower RightX location x size x int lower RightY location y size y if ANCHOR BOTTOM anchor ANCHOR TOP anchor if ANCHOR BOTTOM anchor if lower RightY display Lower RightY return false else if location y display Area y return false if lower RightX display Lower RightX location x location x lower RightX display Lower RightX return location x 0 location y 0 else if ANCHOR RIGHT anchor ANCHOR LEFT anchor if ANCHOR RIGHT anchor if lower RightX display Lower RightX return false else if location x display Area x return false if lower RightY display Lower RightY location y location y lower RightY display Lower RightY return location x 0 location y 0 else if ANCHOR GLOBAL anchor if lower RightX display Lower RightX location x location x lower RightX display Lower RightX if lower RightY display Lower RightY location y location y lower RightY display Lower RightY return location x 0 location y 0 return false  displayArea updateLocation displayArea displayLowerRightX displayArea displayArea displayLowerRightY displayArea displayArea lowerRightX lowerRightY ANCHOR_BOTTOM ANCHOR_TOP ANCHOR_BOTTOM lowerRightY displayLowerRightY displayArea lowerRightX displayLowerRightX lowerRightX displayLowerRightX ANCHOR_RIGHT ANCHOR_LEFT ANCHOR_RIGHT lowerRightX displayLowerRightX displayArea lowerRightY displayLowerRightY lowerRightY displayLowerRightY ANCHOR_GLOBAL lowerRightX displayLowerRightX lowerRightX displayLowerRightX lowerRightY displayLowerRightY lowerRightY displayLowerRightY
Returns the next fallback anchor from this manager s list of fallback anchors If no more fallback anchor is available code null code is returned param anchor the current anchor return the next fallback anchor or code null code if no more anchor is available protected Anchor get Next Fallback Anchor Anchor anchor if anchor null f Fallback Anchors null return null for int i 0 i f Fallback Anchors length i if f Fallback Anchors i anchor return f Fallback Anchors i 1 f Fallback Anchors length 0 i 1 return null  getNextFallbackAnchor fFallbackAnchors fFallbackAnchors fFallbackAnchors fFallbackAnchors fFallbackAnchors
Computes the location of the information control depending on the subject area and the size of the information control This method attempts to find a location at which the information control lies completely in the display s client area while honoring the manager s default anchor If this isn t possible using the default anchor the fallback anchors are tried out param subject Area the information area param control Size the size of the information control return the computed location of the information control protected Point compute Information Control Location Rectangle subject Area Point control Size Rectangle display Bounds f Subject Control get Display get Client Area Point upper Left Anchor test Anchor f Anchor do upper Left compute Location subject Area control Size test Anchor if update Location upper Left control Size display Bounds test Anchor break test Anchor get Next Fallback Anchor test Anchor while test Anchor f Anchor test Anchor null return upper Left  subjectArea controlSize computeInformationControlLocation subjectArea controlSize displayBounds fSubjectControl getDisplay getClientArea upperLeft testAnchor fAnchor upperLeft computeLocation subjectArea controlSize testAnchor updateLocation upperLeft controlSize displayBounds testAnchor testAnchor getNextFallbackAnchor testAnchor testAnchor fAnchor testAnchor upperLeft
Computes information to be displayed as well as the subject area and initiates that this information is presented in the information control This happens only if this controller is enabled public void show Information if f Enabled do Show Information  showInformation fEnabled doShowInformation
Computes information to be displayed as well as the subject area and initiates that this information is presented in the information control protected void do Show Information f Subject Area null f Information null compute Information  doShowInformation fSubjectArea fInformation computeInformation
Presents the information in the information control or hides the information control if no information should be presented The information has previously been set using code set Information code protected void present Information boolean has Contents false if f Information instanceof String has Contents String f Information trim length 0 else has Contents f Information null if f Subject Area null has Contents internal Show Information Control f Subject Area f Information else hide Information Control  setInformation presentInformation hasContents fInformation hasContents fInformation hasContents fInformation fSubjectArea hasContents internalShowInformationControl fSubjectArea fInformation hideInformationControl
Opens the information control with the given information and the specified subject area It also activates the information control closer param subject Area the information area param information the information private void internal Show Information Control Rectangle subject Area Object information I Information Control information Control get Information Control if information Control null Point size Constraints compute Size Constraints f Subject Control f Subject Area information Control information Control set Size Constraints size Constraints x size Constraints y if information Control instanceof I Information Control Extension2 I Information Control Extension2 information Control set Input information else information Control set Information information to String if information Control instanceof I Information Control Extension I Information Control Extension extension I Information Control Extension information Control if extension has Contents return Point size null Point location null Rectangle bounds restore Information Control Bounds if bounds null if bounds x 1 bounds y 1 location new Point bounds x bounds y if bounds width 1 bounds height 1 size new Point bounds width bounds height if size null size information Control compute Size Hint if f Enforce As Minimal Size if size x size Constraints x size x size Constraints x if size y size Constraints y size y size Constraints y if f Enforce As Maximal Size if size x size Constraints x size x size Constraints x if size y size Constraints y size y size Constraints y information Control set Size size x size y if location null location compute Information Control Location subject Area size information Control set Location location show Information Control subject Area  subjectArea internalShowInformationControl subjectArea IInformationControl informationControl getInformationControl informationControl sizeConstraints computeSizeConstraints fSubjectControl fSubjectArea informationControl informationControl setSizeConstraints sizeConstraints sizeConstraints informationControl IInformationControlExtension2 IInformationControlExtension2 informationControl setInput informationControl setInformation toString informationControl IInformationControlExtension IInformationControlExtension IInformationControlExtension informationControl hasContents restoreInformationControlBounds informationControl computeSizeHint fEnforceAsMinimalSize sizeConstraints sizeConstraints sizeConstraints sizeConstraints fEnforceAsMaximalSize sizeConstraints sizeConstraints sizeConstraints sizeConstraints informationControl setSize computeInformationControlLocation subjectArea informationControl setLocation showInformationControl subjectArea
Hides the information control and stops the information control closer protected void hide Information Control if f Information Control null store Information Control Bounds f Information Control set Visible false if f Information Control Closer null f Information Control Closer stop  hideInformationControl fInformationControl storeInformationControlBounds fInformationControl setVisible fInformationControlCloser fInformationControlCloser
Shows the information control and starts the information control closer This method may not be called by clients param subject Area the information area protected void show Information Control Rectangle subject Area f Information Control set Visible true if f Takes Focus When Visible f Information Control set Focus if f Information Control Closer null f Information Control Closer start subject Area  subjectArea showInformationControl subjectArea fInformationControl setVisible fTakesFocusWhenVisible fInformationControl setFocus fInformationControlCloser fInformationControlCloser subjectArea
Disposes this manager s information control public void dispose Information Control if f Information Control null f Information Control dispose handle Information Control Disposed  disposeInformationControl fInformationControl fInformationControl handleInformationControlDisposed
Disposes this manager and if necessary all dependent parts such as the information control For symmetry it first disables this manager public void dispose if f Disposed f Disposed true set Enabled false dispose Information Control f Is Custom Information Control false f Custom Information Control Creator null f Information Control Creator null f Information Control Closer null  fDisposed fDisposed setEnabled disposeInformationControl fIsCustomInformationControl fCustomInformationControlCreator fInformationControlCreator fInformationControlCloser
Stores the information control s bounds since 3 0 protected void store Information Control Bounds if f Dialog Settings null f Information Control null f Is Restoring Location f Is Restoring Size return if f Information Control instanceof I Information Control Extension3 throw new Unsupported Operation Exception boolean control Restores Size I Information Control Extension3 f Information Control restores Size boolean control Restores Location I Information Control Extension3 f Information Control restores Location Rectangle bounds I Information Control Extension3 f Information Control get Bounds if bounds null return if f Is Restoring Size control Restores Size f Dialog Settings put STORE SIZE WIDTH bounds width f Dialog Settings put STORE SIZE HEIGHT bounds height if f Is Restoring Location control Restores Location f Dialog Settings put STORE LOCATION X bounds x f Dialog Settings put STORE LOCATION Y bounds y  storeInformationControlBounds fDialogSettings fInformationControl fIsRestoringLocation fIsRestoringSize fInformationControl IInformationControlExtension3 UnsupportedOperationException controlRestoresSize IInformationControlExtension3 fInformationControl restoresSize controlRestoresLocation IInformationControlExtension3 fInformationControl restoresLocation IInformationControlExtension3 fInformationControl getBounds fIsRestoringSize controlRestoresSize fDialogSettings STORE_SIZE_WIDTH fDialogSettings STORE_SIZE_HEIGHT fIsRestoringLocation controlRestoresLocation fDialogSettings STORE_LOCATION_X fDialogSettings STORE_LOCATION_Y
Restores the information control s bounds return the stored bounds since 3 0 protected Rectangle restore Information Control Bounds if f Dialog Settings null f Is Restoring Location f Is Restoring Size return null if f Information Control instanceof I Information Control Extension3 throw new Unsupported Operation Exception boolean control Restores Size I Information Control Extension3 f Information Control restores Size boolean control Restores Location I Information Control Extension3 f Information Control restores Location Rectangle bounds new Rectangle 1 1 1 1 if f Is Restoring Size control Restores Size try bounds width f Dialog Settings get Int STORE SIZE WIDTH bounds height f Dialog Settings get Int STORE SIZE HEIGHT catch Number Format Exception ex bounds width 1 bounds height 1 if f Is Restoring Location control Restores Location try bounds x f Dialog Settings get Int STORE LOCATION X bounds y f Dialog Settings get Int STORE LOCATION Y catch Number Format Exception ex bounds x 1 bounds y 1 sanity check if bounds x 1 bounds y 1 bounds width 1 bounds height 1 return null Rectangle max Bounds null if f Subject Control null f Subject Control is Disposed max Bounds f Subject Control get Display get Bounds else fallback Display display Display get Current if display null display Display get Default if display null display is Disposed max Bounds display get Bounds if bounds width 1 bounds height 1 if max Bounds null bounds width Math min bounds width max Bounds width bounds height Math min bounds height max Bounds height Enforce an absolute minimal size bounds width Math max bounds width 30 bounds height Math max bounds height 30 if bounds x 1 bounds y 1 max Bounds null bounds x Math max bounds x max Bounds x bounds y Math max bounds y max Bounds y if bounds width 1 bounds height 1 bounds x Math min bounds x max Bounds width bounds width bounds y Math min bounds y max Bounds height bounds height return bounds  restoreInformationControlBounds fDialogSettings fIsRestoringLocation fIsRestoringSize fInformationControl IInformationControlExtension3 UnsupportedOperationException controlRestoresSize IInformationControlExtension3 fInformationControl restoresSize controlRestoresLocation IInformationControlExtension3 fInformationControl restoresLocation fIsRestoringSize controlRestoresSize fDialogSettings getInt STORE_SIZE_WIDTH fDialogSettings getInt STORE_SIZE_HEIGHT NumberFormatException fIsRestoringLocation controlRestoresLocation fDialogSettings getInt STORE_LOCATION_X fDialogSettings getInt STORE_LOCATION_Y NumberFormatException maxBounds fSubjectControl fSubjectControl isDisposed maxBounds fSubjectControl getDisplay getBounds getCurrent getDefault isDisposed maxBounds getBounds maxBounds maxBounds maxBounds maxBounds maxBounds maxBounds maxBounds maxBounds

Creates a new line tracker protected Abstract Line Tracker  AbstractLineTracker
Binary search for the line at a given offset param offset the offset whose line should be found return the line of the offset private int find Line int offset if f Lines size 0 return 1 int left 0 int right f Lines size 1 int mid 0 Line line null while left right mid left right 2 line Line f Lines get mid if offset line offset if left mid right left else right mid 1 else if offset line offset if right mid left right else left mid 1 else if offset line offset left right mid line Line f Lines get left if line offset offset left return left  findLine fLines fLines fLines fLines
Returns the number of lines covered by the specified text range param start Line the line where the text range starts param offset the start offset of the text range param length the length of the text range return the number of lines covered by this text range exception Bad Location Exception if range is undefined in this tracker private int get Number Of Lines int start Line int offset int length throws Bad Location Exception if length 0 return 1 int target offset length Line l Line f Lines get start Line if l delimiter null return 1 if l offset l length target return 1 if l offset l length target return 2 return get Line Number Of Offset target start Line 1  startLine BadLocationException getNumberOfLines startLine BadLocationException fLines startLine getLineNumberOfOffset startLine
public int get Line Length int line throws Bad Location Exception int lines f Lines size if line 0 line lines throw new Bad Location Exception if lines 0 lines line return 0 Line l Line f Lines get line return l length  getLineLength BadLocationException fLines BadLocationException fLines
public int get Line Number Of Offset int position throws Bad Location Exception if position f Text Length throw new Bad Location Exception if position f Text Length int last Line f Lines size 1 if last Line 0 return 0 Line l Line f Lines get last Line return l delimiter null last Line 1 last Line return find Line position  getLineNumberOfOffset BadLocationException fTextLength BadLocationException fTextLength lastLine fLines lastLine fLines lastLine lastLine lastLine findLine
public I Region get Line Information Of Offset int position throws Bad Location Exception if position f Text Length throw new Bad Location Exception if position f Text Length int size f Lines size if size 0 return new Region 0 0 Line l Line f Lines get size 1 return l delimiter null new Line f Text Length 0 new Line f Text Length l length l length return get Line Information find Line position  IRegion getLineInformationOfOffset BadLocationException fTextLength BadLocationException fTextLength fLines fLines fTextLength fTextLength getLineInformation findLine
public I Region get Line Information int line throws Bad Location Exception int lines f Lines size if line 0 line lines throw new Bad Location Exception if lines 0 return new Line 0 0 if line lines Line l Line f Lines get line 1 return new Line l offset l length 0 Line l Line f Lines get line return l delimiter null new Line l offset l length l delimiter length l  IRegion getLineInformation BadLocationException fLines BadLocationException fLines fLines
public int get Line Offset int line throws Bad Location Exception int lines f Lines size if line 0 line lines throw new Bad Location Exception if lines 0 return 0 if line lines Line l Line f Lines get line 1 return l offset l length Line l Line f Lines get line return l offset  getLineOffset BadLocationException fLines BadLocationException fLines fLines
public int get Number Of Lines int lines f Lines size if lines 0 return 1 Line l Line f Lines get lines 1 return l delimiter null lines 1 lines  getNumberOfLines fLines fLines
public int get Number Of Lines int position int length throws Bad Location Exception if position 0 position length f Text Length throw new Bad Location Exception if length 0 optimization return 1 return get Number Of Lines get Line Number Of Offset position position length  getNumberOfLines BadLocationException fTextLength BadLocationException getNumberOfLines getLineNumberOfOffset
public int compute Number Of Lines String text int count 0 int start 0 Delimiter Info delimiter Info next Delimiter Info text start while delimiter Info null delimiter Info delimiter Index 1 count start delimiter Info delimiter Index delimiter Info delimiter Length delimiter Info next Delimiter Info text start return count  computeNumberOfLines DelimiterInfo delimiterInfo nextDelimiterInfo delimiterInfo delimiterInfo delimiterIndex delimiterInfo delimiterIndex delimiterInfo delimiterLength delimiterInfo nextDelimiterInfo
Returns the information about the first delimiter found in the given text starting at the given offset param text the text to be searched param offset the offset in the given text return the information of the first found delimiter or code null code 
Creates the line structure for the given text Newly created lines are inserted into the line structure starting at the given position Returns the number of newly created lines param text the text for which to create a line structure param insert Position the position at which the newly created lines are inserted into the tracker s line structure param offset the offset of all newly created lines return the number of newly created lines private int create Lines String text int insert Position int offset int count 0 int start 0 Delimiter Info delimiter Info next Delimiter Info text 0 while delimiter Info null delimiter Info delimiter Index 1 int index delimiter Info delimiter Index delimiter Info delimiter Length 1 if insert Position count f Lines size f Lines add new Line offset start offset index delimiter Info delimiter else f Lines add insert Position count new Line offset start offset index delimiter Info delimiter count start index 1 delimiter Info next Delimiter Info text start if start text length if insert Position count f Lines size there is a line below the current Line l Line f Lines get insert Position count int delta text length start l offset delta l length delta else f Lines add new Line offset start offset text length 1 null count return count  insertPosition createLines insertPosition DelimiterInfo delimiterInfo nextDelimiterInfo delimiterInfo delimiterInfo delimiterIndex delimiterInfo delimiterIndex delimiterInfo delimiterLength insertPosition fLines fLines delimiterInfo fLines insertPosition delimiterInfo delimiterInfo nextDelimiterInfo insertPosition fLines fLines insertPosition fLines
Keeps track of the line information when text is inserted Returns the number of inserted lines param line Number the line at which the insert happens param offset at which the insert happens param text the inserted text return the number of inserted lines exception Bad Location Exception if offset is invalid in this tracker private int insert int line Number int offset String text throws Bad Location Exception if text null text length 0 return 0 f Text Length text length int size f Lines size if size 0 line Number size return create Lines text size offset Line line Line f Lines get line Number Delimiter Info delimiter Info next Delimiter Info text 0 if delimiter Info null delimiter Info delimiter Index 1 line length text length return 0 as there is a line break split line but do so only if rest of line is not of length 0 int rest Length line offset line length offset if rest Length 0 determine start and end of the second half of the splitted line Line line Rest new Line offset rest Length line Rest delimiter line delimiter shift it by the inserted text line Rest offset text length and insert in line structure f Lines add line Number 1 line Rest adapt the beginning of the splitted line line delimiter delimiter Info delimiter int next Start offset delimiter Info delimiter Index delimiter Info delimiter Length line length next Start line offset insert lines for the remaining text text text substring delimiter Info delimiter Index delimiter Info delimiter Length return create Lines text line Number 1 next Start 1  lineNumber BadLocationException lineNumber BadLocationException fTextLength fLines lineNumber createLines fLines lineNumber DelimiterInfo delimiterInfo nextDelimiterInfo delimiterInfo delimiterInfo delimiterIndex restLength restLength lineRest restLength lineRest lineRest fLines lineNumber lineRest delimiterInfo nextStart delimiterInfo delimiterIndex delimiterInfo delimiterLength nextStart delimiterInfo delimiterIndex delimiterInfo delimiterLength createLines lineNumber nextStart
Keeps track of the line information when text is removed Returns whether the line at which the deletion start will thereby be deleted param line Number the line Number at which the deletion starts param offset the offset of the first deleted character param length the number of deleted characters return code true code if the start line has been deleted code false code otherwise exception Bad Location Exception if position is unknown to the tracker private boolean remove int line Number int offset int length throws Bad Location Exception if length 0 return false int removed Line Ends get Number Of Lines line Number offset length 1 Line line Line f Lines get line Number if line Number f Lines size 1 removed Line Ends 0 line length length line delimiter null else line Number for int i 1 i removed Line Ends i if line Number f Lines size line delimiter null break Line line2 Line f Lines get line Number line length line2 length line delimiter line2 delimiter f Lines remove line Number line length length f Text Length length if line length 0 f Lines remove line return true return false  lineNumber lineNumber BadLocationException lineNumber BadLocationException removedLineEnds getNumberOfLines lineNumber fLines lineNumber lineNumber fLines removedLineEnds lineNumber removedLineEnds lineNumber fLines fLines lineNumber fLines lineNumber fTextLength fLines
Adapts the offset of all lines with line numbers greater than the specified one to the given delta param line Number the line number after which to start param delta the offset delta to be applied private void adapt Line Offsets int line Number int delta int size f Lines size for int i line Number 1 i size i Line l Line f Lines get i l offset delta  lineNumber adaptLineOffsets lineNumber fLines lineNumber fLines
public void replace int position int length String text throws Bad Location Exception int first Line get Line Number Of Offset position int insert Line Number first Line if remove first Line position length first Line int last Line first Line insert insert Line Number position text int lines f Lines size if lines 0 try to collapse the first and the second line if second line is empty if 0 first Line first Line 1 lines Line l2 Line f Lines get first Line 1 if l2 delimiter null l2 length l2 delimiter length line is empty append empty line to precessor Line l1 Line f Lines get first Line String Buffer buffer new String Buffer buffer append l1 delimiter buffer append l2 delimiter test whether this yields just one line rather then two Delimiter Info info next Delimiter Info buffer to String 0 if info null info delimiter Index 0 info delimiter Length buffer length l1 length l2 length l1 delimiter l2 delimiter f Lines remove first Line 1 last Line try to collapse the last inserted line with the following line if last Line lines Line l2 Line f Lines get last Line if l2 delimiter null l2 length l2 delimiter length line is empty append empty line to precessor Line l1 Line f Lines get last Line 1 String Buffer buffer new String Buffer buffer append l1 delimiter buffer append l2 delimiter test whether this yields just one line rather then two Delimiter Info info next Delimiter Info buffer to String 0 if info null info delimiter Index 0 info delimiter Length buffer length l1 length l2 length l1 delimiter l2 delimiter f Lines remove last Line int delta length if text null delta text length delta if delta 0 adapt Line Offsets last Line delta  BadLocationException firstLine getLineNumberOfOffset insertLineNumber firstLine firstLine firstLine lastLine firstLine insertLineNumber fLines firstLine firstLine fLines firstLine fLines firstLine StringBuffer StringBuffer DelimiterInfo nextDelimiterInfo toString delimiterIndex delimiterLength fLines firstLine lastLine lastLine fLines lastLine fLines lastLine StringBuffer StringBuffer DelimiterInfo nextDelimiterInfo toString delimiterIndex delimiterLength fLines lastLine adaptLineOffsets lastLine
public void set String text f Lines clear if text null f Text Length text length create Lines text 0 0  fLines fTextLength createLines
public String get Line Delimiter int line throws Bad Location Exception int lines f Lines size if line 0 line lines throw new Bad Location Exception if lines 0 return null if line lines return null Line l Line f Lines get line return l delimiter  getLineDelimiter BadLocationException fLines BadLocationException fLines

Constructs a new exception public Assertion Failed Exception  AssertionFailedException
Constructs a new exception with the given message param detail the detailed message public Assertion Failed Exception String detail super detail  AssertionFailedException
This class is not intended to be instantiated private Assert 
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown param expression the outcome of the check return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression succeed as quickly as possible if expression return true return is Legal expression NON NLS 1  IllegalArgumentException IllegalArgumentException isLegal isLegal
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown The given message is included in that exception to aid debugging param expression the outcome of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression String message if expression throw new Illegal Argument Exception assertion failed message NON NLS 1 return expression  IllegalArgumentException IllegalArgumentException isLegal IllegalArgumentException
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown p As a general rule parameters passed to API methods must not be code null code unless b explicitly b allowed in the method s specification Similarly results returned from API methods are never code null code unless b explicitly b allowed in the method s specification Implementations are encouraged to make regular use of code Assert is Not Null code to ensure that code null code parameters are detected as early as possible p param object the value to test exception Throwable an unspecified unchecked exception if the object is code null code public static void is Not Null Object object succeed as quickly as possible if object null return is Not Null object NON NLS 1  isNotNull isNotNull isNotNull
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging p As a general rule parameters passed to API methods must not be code null code unless b explicitly b allowed in the method s specification Similarly results returned from API methods are never code null code unless b explicitly b allowed in the method s specification Implementations are encouraged to make regular use of code Assert is Not Null code to ensure that code null code parameters are detected as early as possible p param object the value to test param message the message to include in the exception exception Throwable an unspecified unchecked exception if the object is code null code public static void is Not Null Object object String message if object null throw new Assertion Failed Exception null argument message NON NLS 1  isNotNull isNotNull AssertionFailedException
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown param expression the outcome of the check return code true code if the check passes does not return if the check fails public static boolean is True boolean expression succeed as quickly as possible if expression return true return is True expression NON NLS 1  isTrue isTrue
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param expression the outcome of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails public static boolean is True boolean expression String message if expression throw new Assertion Failed Exception Assertion failed message NON NLS 1 return expression  isTrue AssertionFailedException

Creates a new bad location exception public Bad Location Exception super  BadLocationException
Creates a new bad location exception param message the exception message public Bad Location Exception String message super message  BadLocationException

Creates a new bad partitioning exception public Bad Partitioning Exception  BadPartitioningException
Creates a new bad partitioning exception param message message describing the exception public Bad Partitioning Exception String message super message  BadPartitioningException

Creates a new bad position category exception public Bad Position Category Exception super  BadPositionCategoryException
Creates a new bad position category exception param message the exception s message public Bad Position Category Exception String message super message  BadPositionCategoryException

Creates a standard line tracker for the given line delimiters param legal Line Delimiters the tracker s legal line delimiters may not be code null code and must be longer than 0 public Configurable Line Tracker String legal Line Delimiters Assert is True legal Line Delimiters null legal Line Delimiters length 0 f Delimiters legal Line Delimiters  legalLineDelimiters ConfigurableLineTracker legalLineDelimiters isTrue legalLineDelimiters legalLineDelimiters fDelimiters legalLineDelimiters
see org eclipse jface text I Line Tracker get Legal Line Delimiters public String get Legal Line Delimiters return f Delimiters  ILineTracker getLegalLineDelimiters getLegalLineDelimiters fDelimiters
protected Delimiter Info next Delimiter Info String text int offset int info Text Utilities index Of f Delimiters text offset if info 0 1 return null f Delimiter Info delimiter Index info 0 f Delimiter Info delimiter f Delimiters info 1 f Delimiter Info delimiter Length f Delimiter Info delimiter length return f Delimiter Info  DelimiterInfo nextDelimiterInfo TextUtilities indexOf fDelimiters fDelimiterInfo delimiterIndex fDelimiterInfo fDelimiters fDelimiterInfo delimiterLength fDelimiterInfo fDelimiterInfo

see Selection Listener widget Selected Selection Event public void widget Selected Selection Event e handle Table Selection Changed  SelectionListener widgetSelected SelectionEvent widgetSelected SelectionEvent handleTableSelectionChanged
see Selection Listener widget Default Selected Selection Event public void widget Default Selected Selection Event e  SelectionListener widgetDefaultSelected SelectionEvent widgetDefaultSelected SelectionEvent
Creates a new additional information controller param creator the information control creator to be used by this controller param delay time in milliseconds after which additional info should be displayed Additional Info Controller I Information Control Creator creator int delay super creator f Delay delay set Anchor ANCHOR RIGHT set Fallback Anchors new Anchor ANCHOR LEFT ANCHOR BOTTOM ANCHOR RIGHT  AdditionalInfoController IInformationControlCreator fDelay setAnchor ANCHOR_RIGHT setFallbackAnchors ANCHOR_LEFT ANCHOR_BOTTOM ANCHOR_RIGHT
public void install Control control if f Proposal Table control already installed return super install control Assert is True control instanceof Table f Proposal Table Table control f Proposal Table add Selection Listener f Selection Listener synchronized f Thread Access if f Thread null f Thread interrupt f Thread new Thread this J Face Text Messages get String Info Popup info delay timer name NON NLS 1 f Start Signal new Object synchronized f Start Signal f Thread start try wait until thread is ready f Start Signal wait catch Interrupted Exception x  fProposalTable isTrue fProposalTable fProposalTable addSelectionListener fSelectionListener fThreadAccess fThread fThread fThread JFaceTextMessages getString InfoPopup info_delay_timer_name fStartSignal fStartSignal fThread fStartSignal InterruptedException
public void dispose Information Control synchronized f Thread Access if f Thread null f Thread interrupt f Thread null if f Proposal Table null f Proposal Table is Disposed f Proposal Table remove Selection Listener f Selection Listener f Proposal Table null super dispose Information Control  disposeInformationControl fThreadAccess fThread fThread fThread fProposalTable fProposalTable isDisposed fProposalTable removeSelectionListener fSelectionListener fProposalTable disposeInformationControl
if f Proposal Table null f Proposal Table is Disposed f Proposal Table get Display async Exec new Runnable public void run if f Is Reset show Information  fProposalTable fProposalTable isDisposed fProposalTable getDisplay asyncExec fIsReset showInformation
public void run try while true synchronized f Mutex if f Start Signal null synchronized f Start Signal f Start Signal notify All f Start Signal null Wait for a selection event to occur f Mutex wait while true f Is Reset false Delay before showing the popup f Mutex wait f Delay if f Is Reset break if f Proposal Table null f Proposal Table is Disposed f Proposal Table get Display async Exec new Runnable public void run if f Is Reset show Information catch Interrupted Exception e synchronized f Thread Access only null f Thread if it is us if Thread current Thread f Thread f Thread null  fMutex fStartSignal fStartSignal fStartSignal notifyAll fStartSignal fMutex fIsReset fMutex fDelay fIsReset fProposalTable fProposalTable isDisposed fProposalTable getDisplay asyncExec fIsReset showInformation InterruptedException fThreadAccess fThread currentThread fThread fThread
Handles a change of the line selected in the associated selector public void handle Table Selection Changed if f Proposal Table null f Proposal Table is Disposed f Proposal Table is Visible synchronized f Mutex f Is Reset true f Mutex notify All  handleTableSelectionChanged fProposalTable fProposalTable isDisposed fProposalTable isVisible fMutex fIsReset fMutex notifyAll
protected void compute Information if f Proposal Table null f Proposal Table is Disposed return Table Item selection f Proposal Table get Selection if selection null selection length 0 Table Item item selection 0 compute information String information null Object d item get Data if d instanceof I Completion Proposal I Completion Proposal p I Completion Proposal d information p get Additional Proposal Info if d instanceof I Completion Proposal Extension3 set Custom Information Control Creator I Completion Proposal Extension3 d get Information Control Creator else set Custom Information Control Creator null compute subject area set Margins 4 2 Rectangle area f Proposal Table get Bounds area x 0 subject area is the whole subject control area y 0 set information subject area set Information information area  computeInformation fProposalTable fProposalTable isDisposed TableItem fProposalTable getSelection TableItem getData ICompletionProposal ICompletionProposal ICompletionProposal getAdditionalProposalInfo ICompletionProposalExtension3 setCustomInformationControlCreator ICompletionProposalExtension3 getInformationControlCreator setCustomInformationControlCreator setMargins fProposalTable getBounds setInformation
protected Point compute Size Constraints Control subject Control I Information Control information Control Point size Constraint super compute Size Constraints subject Control information Control Point size subject Control get Size Rectangle other Trim subject Control get Shell compute Trim 0 0 0 0 size x other Trim width size y other Trim height if information Control instanceof I Information Control Extension3 Rectangle this Trim I Information Control Extension3 information Control compute Trim size x this Trim width size y this Trim height if size Constraint x size x size Constraint x size x if size Constraint y size y size Constraint y size y return size Constraint  computeSizeConstraints subjectControl IInformationControl informationControl sizeConstraint computeSizeConstraints subjectControl informationControl subjectControl getSize otherTrim subjectControl getShell computeTrim otherTrim otherTrim informationControl IInformationControlExtension3 thisTrim IInformationControlExtension3 informationControl computeTrim thisTrim thisTrim sizeConstraint sizeConstraint sizeConstraint sizeConstraint sizeConstraint

Creates a new completion proposal based on the provided information The replacement string is considered being the display string too All remaining fields are set to code null code param replacement String the actual string to be inserted into the document param replacement Offset the offset of the text to be replaced param replacement Length the length of the text to be replaced param cursor Position the position of the cursor following the insert relative to replacement Offset public Completion Proposal String replacement String int replacement Offset int replacement Length int cursor Position this replacement String replacement Offset replacement Length cursor Position null null null null  replacementString replacementOffset replacementLength cursorPosition replacementOffset CompletionProposal replacementString replacementOffset replacementLength cursorPosition replacementString replacementOffset replacementLength cursorPosition
Creates a new completion proposal All fields are initialized based on the provided information param replacement String the actual string to be inserted into the document param replacement Offset the offset of the text to be replaced param replacement Length the length of the text to be replaced param cursor Position the position of the cursor following the insert relative to replacement Offset param image the image to display for this proposal param display String the string to be displayed for the proposal param context Information the context information associated with this proposal param additional Proposal Info the additional information associated with this proposal public Completion Proposal String replacement String int replacement Offset int replacement Length int cursor Position Image image String display String I Context Information context Information String additional Proposal Info Assert is Not Null replacement String Assert is True replacement Offset 0 Assert is True replacement Length 0 Assert is True cursor Position 0 f Replacement String replacement String f Replacement Offset replacement Offset f Replacement Length replacement Length f Cursor Position cursor Position f Image image f Display String display String f Context Information context Information f Additional Proposal Info additional Proposal Info  replacementString replacementOffset replacementLength cursorPosition replacementOffset displayString contextInformation additionalProposalInfo CompletionProposal replacementString replacementOffset replacementLength cursorPosition displayString IContextInformation contextInformation additionalProposalInfo isNotNull replacementString isTrue replacementOffset isTrue replacementLength isTrue cursorPosition fReplacementString replacementString fReplacementOffset replacementOffset fReplacementLength replacementLength fCursorPosition cursorPosition fImage fDisplayString displayString fContextInformation contextInformation fAdditionalProposalInfo additionalProposalInfo
public void apply I Document document try document replace f Replacement Offset f Replacement Length f Replacement String catch Bad Location Exception x ignore  IDocument fReplacementOffset fReplacementLength fReplacementString BadLocationException
see I Completion Proposal get Selection I Document public Point get Selection I Document document return new Point f Replacement Offset f Cursor Position 0  ICompletionProposal getSelection IDocument getSelection IDocument fReplacementOffset fCursorPosition
see I Completion Proposal get Context Information public I Context Information get Context Information return f Context Information  ICompletionProposal getContextInformation IContextInformation getContextInformation fContextInformation
see I Completion Proposal get Image public Image get Image return f Image  ICompletionProposal getImage getImage fImage
public String get Display String if f Display String null return f Display String return f Replacement String  getDisplayString fDisplayString fDisplayString fReplacementString
see I Completion Proposal get Additional Proposal Info public String get Additional Proposal Info return f Additional Proposal Info  ICompletionProposal getAdditionalProposalInfo getAdditionalProposalInfo fAdditionalProposalInfo

private final class Proposal Selection Listener implements Key Listener public void key Pressed Key Event e if Helper ok To Use f Proposal Shell return if e character 0 e key Code SWT MOD1 http dev eclipse org bugs show bug cgi id 34754 int index f Proposal Table get Selection Index if index 0 select Proposal index true  ProposalSelectionListener KeyListener keyPressed KeyEvent okToUse fProposalShell keyCode show_bug fProposalTable getSelectionIndex selectProposal
public void key Released Key Event e if Helper ok To Use f Proposal Shell return if e character 0 e key Code SWT MOD1 http dev eclipse org bugs show bug cgi id 34754 int index f Proposal Table get Selection Index if index 0 select Proposal index false  keyReleased KeyEvent okToUse fProposalShell keyCode show_bug fProposalTable getSelectionIndex selectProposal
Creates a new completion proposal popup for the given elements param content Assistant the content assistant feeding this popup param viewer the viewer on top of which this popup appears param info Controller the information control collaborating with this popup since 2 0 public Completion Proposal Popup Content Assistant content Assistant I Text Viewer viewer Additional Info Controller info Controller f Content Assistant content Assistant f Viewer viewer f Additional Info Controller info Controller f Content Assist Subject Control Adapter new Content Assist Subject Control Adapter f Viewer  contentAssistant infoController CompletionProposalPopup ContentAssistant contentAssistant ITextViewer AdditionalInfoController infoController fContentAssistant contentAssistant fViewer fAdditionalInfoController infoController fContentAssistSubjectControlAdapter ContentAssistSubjectControlAdapter fViewer
Creates a new completion proposal popup for the given elements param content Assistant the content assistant feeding this popup param content Assist Subject Control the content assist subject control on top of which this popup appears param info Controller the information control collaborating with this popup since 3 0 public Completion Proposal Popup Content Assistant content Assistant I Content Assist Subject Control content Assist Subject Control Additional Info Controller info Controller f Content Assistant content Assistant f Content Assist Subject Control content Assist Subject Control f Additional Info Controller info Controller f Content Assist Subject Control Adapter new Content Assist Subject Control Adapter f Content Assist Subject Control  contentAssistant contentAssistSubjectControl infoController CompletionProposalPopup ContentAssistant contentAssistant IContentAssistSubjectControl contentAssistSubjectControl AdditionalInfoController infoController fContentAssistant contentAssistant fContentAssistSubjectControl contentAssistSubjectControl fAdditionalInfoController infoController fContentAssistSubjectControlAdapter ContentAssistSubjectControlAdapter fContentAssistSubjectControl
Busy Indicator show While control get Display new Runnable public void run f Invocation Offset f Content Assist Subject Control Adapter get Selected Range x f Filter Offset f Invocation Offset f Computed Proposals compute Proposals f Invocation Offset int count f Computed Proposals null 0 f Computed Proposals length if count 0 if auto Activated control get Display beep hide else if count 1 auto Activated f Content Assistant is Auto Inserting insert Proposal f Computed Proposals 0 char 0 0 f Invocation Offset hide else if f Line Delimiter null f Line Delimiter f Content Assist Subject Control Adapter get Line Delimiter create Proposal Selector set Proposals f Computed Proposals display Proposals  BusyIndicator showWhile getDisplay fInvocationOffset fContentAssistSubjectControlAdapter getSelectedRange fFilterOffset fInvocationOffset fComputedProposals computeProposals fInvocationOffset fComputedProposals fComputedProposals autoActivated getDisplay autoActivated fContentAssistant isAutoInserting insertProposal fComputedProposals fInvocationOffset fLineDelimiter fLineDelimiter fContentAssistSubjectControlAdapter getLineDelimiter createProposalSelector setProposals fComputedProposals displayProposals
Computes and presents completion proposals The flag indicates whether this call has be made out of an auto activation context param auto Activated code true code if auto activation context return an error message or code null code in case of no error public String show Proposals final boolean auto Activated if f Key Listener null f Key Listener new Proposal Selection Listener final Control control f Content Assist Subject Control Adapter get Control if Helper ok To Use f Proposal Shell control null control is Disposed add the listener before computing the proposals so we don t move the caret when the user types fast f Content Assist Subject Control Adapter add Key Listener f Key Listener Busy Indicator show While control get Display new Runnable public void run f Invocation Offset f Content Assist Subject Control Adapter get Selected Range x f Filter Offset f Invocation Offset f Computed Proposals compute Proposals f Invocation Offset int count f Computed Proposals null 0 f Computed Proposals length if count 0 if auto Activated control get Display beep hide else if count 1 auto Activated f Content Assistant is Auto Inserting insert Proposal f Computed Proposals 0 char 0 0 f Invocation Offset hide else if f Line Delimiter null f Line Delimiter f Content Assist Subject Control Adapter get Line Delimiter create Proposal Selector set Proposals f Computed Proposals display Proposals return get Error Message  autoActivated showProposals autoActivated fKeyListener fKeyListener ProposalSelectionListener fContentAssistSubjectControlAdapter getControl okToUse fProposalShell isDisposed fContentAssistSubjectControlAdapter addKeyListener fKeyListener BusyIndicator showWhile getDisplay fInvocationOffset fContentAssistSubjectControlAdapter getSelectedRange fFilterOffset fInvocationOffset fComputedProposals computeProposals fInvocationOffset fComputedProposals fComputedProposals autoActivated getDisplay autoActivated fContentAssistant isAutoInserting insertProposal fComputedProposals fInvocationOffset fLineDelimiter fLineDelimiter fContentAssistSubjectControlAdapter getLineDelimiter createProposalSelector setProposals fComputedProposals displayProposals getErrorMessage
Returns the completion proposal available at the given offset of the viewer s document Delegates the work to the content assistant param offset the offset return the completion proposals available at this offset private I Completion Proposal compute Proposals int offset if f Content Assist Subject Control null return f Content Assistant compute Completion Proposals f Content Assist Subject Control offset else return f Content Assistant compute Completion Proposals f Viewer offset  ICompletionProposal computeProposals fContentAssistSubjectControl fContentAssistant computeCompletionProposals fContentAssistSubjectControl fContentAssistant computeCompletionProposals fViewer
Returns the error message return the error message private String get Error Message return f Content Assistant get Error Message  getErrorMessage fContentAssistant getErrorMessage
f Proposal Shell add Control Listener new Control Listener public void control Moved Control Event e  fProposalShell addControlListener ControlListener controlMoved ControlEvent
public void control Resized Control Event e if f Additional Info Controller null reset the cached resize constraints f Additional Info Controller set Size Constraints 50 10 true false f Size f Proposal Shell get Size  controlResized ControlEvent fAdditionalInfoController fAdditionalInfoController setSizeConstraints fSize fProposalShell getSize
f Proposal Table add Selection Listener new Selection Listener public void widget Selected Selection Event e  fProposalTable addSelectionListener SelectionListener widgetSelected SelectionEvent
public void widget Selected Selection Event e public void widget Default Selected Selection Event e select Proposal With Mask e state Mask  widgetSelected SelectionEvent widgetDefaultSelected SelectionEvent selectProposalWithMask stateMask
f Proposal Shell add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e unregister but don t dispose the shell since we re being called from its disposal event  fProposalShell addDisposeListener DisposeListener widgetDisposed DisposeEvent
Creates the proposal selector private void create Proposal Selector if Helper ok To Use f Proposal Shell return Control control f Content Assist Subject Control Adapter get Control f Proposal Shell new Shell control get Shell SWT ON TOP SWT RESIZE f Proposal Table new Table f Proposal Shell SWT H SCROLL SWT V SCROLL f Proposal Table set Location 0 0 if f Additional Info Controller null f Additional Info Controller set Size Constraints 50 10 true false Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 f Proposal Shell set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH Point size f Content Assistant restore Completion Proposal Popup Size if size null f Proposal Table set Layout Data data f Proposal Shell set Size size else data height Hint f Proposal Table get Item Height 10 data width Hint 300 f Proposal Table set Layout Data data f Proposal Shell pack f Proposal Shell add Control Listener new Control Listener public void control Moved Control Event e public void control Resized Control Event e if f Additional Info Controller null reset the cached resize constraints f Additional Info Controller set Size Constraints 50 10 true false f Size f Proposal Shell get Size if carbon equals SWT get Platform NON NLS 1 f Proposal Shell set Background control get Display get System Color SWT COLOR BLACK Color c f Content Assistant get Proposal Selector Background if c null c control get Display get System Color SWT COLOR INFO BACKGROUND f Proposal Table set Background c c f Content Assistant get Proposal Selector Foreground if c null c control get Display get System Color SWT COLOR INFO FOREGROUND f Proposal Table set Foreground c f Proposal Table add Selection Listener new Selection Listener public void widget Selected Selection Event e public void widget Default Selected Selection Event e select Proposal With Mask e state Mask f Popup Closer install f Content Assistant f Proposal Table f Proposal Shell add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e unregister but don t dispose the shell since we re being called from its disposal event f Proposal Table set Header Visible false f Content Assistant add To Layout this f Proposal Shell Content Assistant Layout Manager LAYOUT PROPOSAL SELECTOR f Content Assistant get Selection Offset  createProposalSelector okToUse fProposalShell fContentAssistSubjectControlAdapter getControl fProposalShell getShell ON_TOP fProposalTable fProposalShell H_SCROLL V_SCROLL fProposalTable setLocation fAdditionalInfoController fAdditionalInfoController setSizeConstraints GridLayout GridLayout marginWidth marginHeight fProposalShell setLayout GridData GridData GridData FILL_BOTH fContentAssistant restoreCompletionProposalPopupSize fProposalTable setLayoutData fProposalShell setSize heightHint fProposalTable getItemHeight widthHint fProposalTable setLayoutData fProposalShell fProposalShell addControlListener ControlListener controlMoved ControlEvent controlResized ControlEvent fAdditionalInfoController fAdditionalInfoController setSizeConstraints fSize fProposalShell getSize getPlatform fProposalShell setBackground getDisplay getSystemColor COLOR_BLACK fContentAssistant getProposalSelectorBackground getDisplay getSystemColor COLOR_INFO_BACKGROUND fProposalTable setBackground fContentAssistant getProposalSelectorForeground getDisplay getSystemColor COLOR_INFO_FOREGROUND fProposalTable setForeground fProposalTable addSelectionListener SelectionListener widgetSelected SelectionEvent widgetDefaultSelected SelectionEvent selectProposalWithMask stateMask fPopupCloser fContentAssistant fProposalTable fProposalShell addDisposeListener DisposeListener widgetDisposed DisposeEvent fProposalTable setHeaderVisible fContentAssistant addToLayout fProposalShell ContentAssistant LayoutManager LAYOUT_PROPOSAL_SELECTOR fContentAssistant getSelectionOffset
Returns the proposal selected in the proposal selector return the selected proposal since 2 0 private I Completion Proposal get Selected Proposal int i f Proposal Table get Selection Index if f Filtered Proposals null i 0 i f Filtered Proposals length return null return f Filtered Proposals i  ICompletionProposal getSelectedProposal fProposalTable getSelectionIndex fFilteredProposals fFilteredProposals fFilteredProposals
Takes the selected proposal and applies it param state Mask the state mask since 2 1 private void select Proposal With Mask int state Mask I Completion Proposal p get Selected Proposal hide if p null insert Proposal p char 0 state Mask f Content Assist Subject Control Adapter get Selected Range x  stateMask selectProposalWithMask stateMask ICompletionProposal getSelectedProposal insertProposal stateMask fContentAssistSubjectControlAdapter getSelectedRange
Applies the given proposal at the given offset The given character is the one that triggered the insertion of this proposal param p the completion proposal param trigger the trigger character param state Mask the state mask param offset the offset since 2 1 private void insert Proposal I Completion Proposal p char trigger int state Mask int offset f Inserting true I Rewrite Target target null try I Document document f Content Assist Subject Control Adapter get Document if f Viewer instanceof I Text Viewer Extension I Text Viewer Extension extension I Text Viewer Extension f Viewer target extension get Rewrite Target if target null target begin Compound Change if p instanceof I Completion Proposal Extension2 f Viewer null I Completion Proposal Extension2 e I Completion Proposal Extension2 p e apply f Viewer trigger state Mask offset else if p instanceof I Completion Proposal Extension I Completion Proposal Extension e I Completion Proposal Extension p e apply document trigger offset else p apply document Point selection p get Selection document if selection null f Content Assist Subject Control Adapter set Selected Range selection x selection y f Content Assist Subject Control Adapter reveal Range selection x selection y I Context Information info p get Context Information if info null int context Information Offset if p instanceof I Completion Proposal Extension I Completion Proposal Extension e I Completion Proposal Extension p context Information Offset e get Context Information Position else if selection null selection f Content Assist Subject Control Adapter get Selected Range context Information Offset selection x selection y f Content Assistant show Context Information info context Information Offset else f Content Assistant show Context Information null 1 finally if target null target end Compound Change f Inserting false  stateMask insertProposal ICompletionProposal stateMask fInserting IRewriteTarget IDocument fContentAssistSubjectControlAdapter getDocument fViewer ITextViewerExtension ITextViewerExtension ITextViewerExtension fViewer getRewriteTarget beginCompoundChange ICompletionProposalExtension2 fViewer ICompletionProposalExtension2 ICompletionProposalExtension2 fViewer stateMask ICompletionProposalExtension ICompletionProposalExtension ICompletionProposalExtension getSelection fContentAssistSubjectControlAdapter setSelectedRange fContentAssistSubjectControlAdapter revealRange IContextInformation getContextInformation contextInformationOffset ICompletionProposalExtension ICompletionProposalExtension ICompletionProposalExtension contextInformationOffset getContextInformationPosition fContentAssistSubjectControlAdapter getSelectedRange contextInformationOffset fContentAssistant showContextInformation contextInformationOffset fContentAssistant showContextInformation endCompoundChange fInserting
Returns whether this popup has the focus return code true code if the popup has the focus public boolean has Focus if Helper ok To Use f Proposal Shell return f Proposal Shell is Focus Control f Proposal Table is Focus Control return false  hasFocus okToUse fProposalShell fProposalShell isFocusControl fProposalTable isFocusControl
Hides this popup public void hide unregister if Helper ok To Use f Proposal Shell f Content Assistant remove Content Assist Listener this Content Assistant PROPOSAL SELECTOR f Popup Closer uninstall f Proposal Shell set Visible false f Proposal Shell dispose f Proposal Shell null  okToUse fProposalShell fContentAssistant removeContentAssistListener ContentAssistant PROPOSAL_SELECTOR fPopupCloser fProposalShell setVisible fProposalShell fProposalShell
Unregister this completion proposal popup since 3 0 private void unregister if f Document Listener null I Document document f Content Assist Subject Control Adapter get Document if document null document remove Document Listener f Document Listener f Document Listener null f Document Events clear if f Key Listener null f Content Assist Subject Control Adapter get Control null f Content Assist Subject Control Adapter get Control is Disposed f Content Assist Subject Control Adapter remove Key Listener f Key Listener f Key Listener null if f Last Proposal null if f Last Proposal instanceof I Completion Proposal Extension2 f Viewer null I Completion Proposal Extension2 extension I Completion Proposal Extension2 f Last Proposal extension unselected f Viewer f Last Proposal null f Filtered Proposals null f Computed Proposals null f Content Assistant possible Completions Closed  fDocumentListener IDocument fContentAssistSubjectControlAdapter getDocument removeDocumentListener fDocumentListener fDocumentListener fDocumentEvents fKeyListener fContentAssistSubjectControlAdapter getControl fContentAssistSubjectControlAdapter getControl isDisposed fContentAssistSubjectControlAdapter removeKeyListener fKeyListener fKeyListener fLastProposal fLastProposal ICompletionProposalExtension2 fViewer ICompletionProposalExtension2 ICompletionProposalExtension2 fLastProposal fViewer fLastProposal fFilteredProposals fComputedProposals fContentAssistant possibleCompletionsClosed
Returns whether this popup is active It is active if the proposal selector is visible return code true code if this popup is active public boolean is Active return f Proposal Shell null f Proposal Shell is Disposed  isActive fProposalShell fProposalShell isDisposed
Initializes the proposal selector with these given proposals param proposals the proposals private void set Proposals I Completion Proposal proposals if Helper ok To Use f Proposal Table I Completion Proposal old Proposal get Selected Proposal if old Proposal instanceof I Completion Proposal Extension2 f Viewer null I Completion Proposal Extension2 old Proposal unselected f Viewer f Filtered Proposals proposals f Proposal Table set Redraw false f Proposal Table remove All Table Item item I Completion Proposal p for int i 0 i proposals length i p proposals i item new Table Item f Proposal Table SWT NULL if p get Image null item set Image p get Image item set Text p get Display String item set Data p Point current Location f Proposal Shell get Location Point new Location get Location if new Location x current Location x new Location y current Location y new Location y current Location y f Proposal Shell set Location new Location select Proposal 0 false f Proposal Table set Redraw true  setProposals ICompletionProposal okToUse fProposalTable ICompletionProposal oldProposal getSelectedProposal oldProposal ICompletionProposalExtension2 fViewer ICompletionProposalExtension2 oldProposal fViewer fFilteredProposals fProposalTable setRedraw fProposalTable removeAll TableItem ICompletionProposal TableItem fProposalTable getImage setImage getImage setText getDisplayString setData currentLocation fProposalShell getLocation newLocation getLocation newLocation currentLocation newLocation currentLocation newLocation currentLocation fProposalShell setLocation newLocation selectProposal fProposalTable setRedraw
Returns the graphical location at which this popup should be made visible return the location of this popup private Point get Location int caret f Content Assist Subject Control Adapter get Caret Offset Point p f Content Assist Subject Control Adapter get Location At Offset caret if p x 0 p x 0 if p y 0 p y 0 p new Point p x p y f Content Assist Subject Control Adapter get Line Height p f Content Assist Subject Control Adapter get Control to Display p if p x 0 p x 0 if p y 0 p y 0 return p  getLocation fContentAssistSubjectControlAdapter getCaretOffset fContentAssistSubjectControlAdapter getLocationAtOffset fContentAssistSubjectControlAdapter getLineHeight fContentAssistSubjectControlAdapter getControl toDisplay
Returns the size of this completion proposal popup return a Point containing the size since 3 0 Point get Size return f Size  getSize fSize
if f Document Listener null f Document Listener new I Document Listener public void document About To Be Changed Document Event event if f Inserting f Document Events add event  fDocumentListener fDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent fInserting fDocumentEvents
public void document Changed Document Event event if f Inserting filter Proposals  documentChanged DocumentEvent fInserting filterProposals
Displays this popup and install the additional info controller so that additional info is displayed when a proposal is selected and additional info is available private void display Proposals if Helper ok To Use f Proposal Shell Helper ok To Use f Proposal Table return if f Content Assistant add Content Assist Listener this Content Assistant PROPOSAL SELECTOR if f Document Listener null f Document Listener new I Document Listener public void document About To Be Changed Document Event event if f Inserting f Document Events add event public void document Changed Document Event event if f Inserting filter Proposals I Document document f Content Assist Subject Control Adapter get Document if document null document add Document Listener f Document Listener https bugs eclipse org bugs show bug cgi id 52646 on GTK set Visible and such may run the event loop see also https bugs eclipse org bugs show bug cgi id 47511 Since the user may have already canceled the popup or selected an entry ESC or RETURN we have to double check whether the table is still ok To Use See comments below f Proposal Shell set Visible true may run event loop on GTK XXX transfer focus since no verify key listener can be attached if f Content Assist Subject Control Adapter supports Verify Key Listener Helper ok To Use f Proposal Shell f Proposal Shell set Focus may run event loop on GTK if f Additional Info Controller null Helper ok To Use f Proposal Table f Additional Info Controller install f Proposal Table f Additional Info Controller handle Table Selection Changed  displayProposals okToUse fProposalShell okToUse fProposalTable fContentAssistant addContentAssistListener ContentAssistant PROPOSAL_SELECTOR fDocumentListener fDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent fInserting fDocumentEvents documentChanged DocumentEvent fInserting filterProposals IDocument fContentAssistSubjectControlAdapter getDocument addDocumentListener fDocumentListener show_bug setVisible show_bug okToUse fProposalShell setVisible fContentAssistSubjectControlAdapter supportsVerifyKeyListener okToUse fProposalShell fProposalShell setFocus fAdditionalInfoController okToUse fProposalTable fAdditionalInfoController fProposalTable fAdditionalInfoController handleTableSelectionChanged
public boolean verify Key Verify Event e if Helper ok To Use f Proposal Shell return true char key e character if key 0 int new Selection f Proposal Table get Selection Index int visible Rows f Proposal Table get Size y f Proposal Table get Item Height 1 boolean smart Toggle false switch e key Code case SWT ARROW LEFT case SWT ARROW RIGHT filter Proposals return true case SWT ARROW UP new Selection 1 if new Selection 0 new Selection f Proposal Table get Item Count 1 break case SWT ARROW DOWN new Selection 1 if new Selection f Proposal Table get Item Count 1 new Selection 0 break case SWT PAGE DOWN new Selection visible Rows if new Selection f Proposal Table get Item Count new Selection f Proposal Table get Item Count 1 break case SWT PAGE UP new Selection visible Rows if new Selection 0 new Selection 0 break case SWT HOME new Selection 0 break case SWT END new Selection f Proposal Table get Item Count 1 break default if e key Code SWT MOD1 e key Code SWT MOD2 e key Code SWT MOD3 e key Code SWT MOD4 hide return true select Proposal new Selection smart Toggle e doit false return false else switch key case 0x1B Esc e doit false hide break case n Ctrl Enter on w2k case r Enter e doit false select Proposal With Mask e state Mask break case t e doit false f Proposal Shell set Focus return false default I Completion Proposal p get Selected Proposal if p instanceof I Completion Proposal Extension I Completion Proposal Extension t I Completion Proposal Extension p char triggers t get Trigger Characters if contains triggers key e doit false hide insert Proposal p key e state Mask f Content Assist Subject Control Adapter get Selected Range x return true  verifyKey VerifyEvent okToUse fProposalShell newSelection fProposalTable getSelectionIndex visibleRows fProposalTable getSize fProposalTable getItemHeight smartToggle keyCode ARROW_LEFT ARROW_RIGHT filterProposals ARROW_UP newSelection newSelection newSelection fProposalTable getItemCount ARROW_DOWN newSelection newSelection fProposalTable getItemCount newSelection PAGE_DOWN newSelection visibleRows newSelection fProposalTable getItemCount newSelection fProposalTable getItemCount PAGE_UP newSelection visibleRows newSelection newSelection newSelection newSelection fProposalTable getItemCount keyCode keyCode keyCode keyCode selectProposal newSelection smartToggle selectProposalWithMask stateMask fProposalShell setFocus ICompletionProposal getSelectedProposal ICompletionProposalExtension ICompletionProposalExtension ICompletionProposalExtension getTriggerCharacters insertProposal stateMask fContentAssistSubjectControlAdapter getSelectedRange
Selects the entry with the given index in the proposal selector and feeds the selection to the additional info controller param index the index in the list param smart Toggle code true code if the smart toggle key has been pressed since 2 1 private void select Proposal int index boolean smart Toggle if f Filtered Proposals null return I Completion Proposal old Proposal get Selected Proposal if old Proposal instanceof I Completion Proposal Extension2 f Viewer null I Completion Proposal Extension2 old Proposal unselected f Viewer I Completion Proposal proposal f Filtered Proposals index if proposal instanceof I Completion Proposal Extension2 f Viewer null I Completion Proposal Extension2 proposal selected f Viewer smart Toggle f Last Proposal proposal f Proposal Table set Selection index f Proposal Table show Selection if f Additional Info Controller null f Additional Info Controller handle Table Selection Changed  smartToggle selectProposal smartToggle fFilteredProposals ICompletionProposal oldProposal getSelectedProposal oldProposal ICompletionProposalExtension2 fViewer ICompletionProposalExtension2 oldProposal fViewer ICompletionProposal fFilteredProposals ICompletionProposalExtension2 fViewer ICompletionProposalExtension2 fViewer smartToggle fLastProposal fProposalTable setSelection fProposalTable showSelection fAdditionalInfoController fAdditionalInfoController handleTableSelectionChanged
Returns whether the given character is contained in the given array of characters param characters the list of characters param c the character to look for in the list return code true code if character belongs to the list since 2 0 private boolean contains char characters char c if characters null return false for int i 0 i characters length i if c characters i return true return false 
see I Event Consumer process Event Verify Event public void process Event Verify Event e  IEventConsumer processEvent VerifyEvent processEvent VerifyEvent
long f Counter f Invocation Counter public void run if f Counter f Invocation Counter return if control is Disposed return int offset f Content Assist Subject Control Adapter get Selected Range x I Completion Proposal proposals null try if offset 1 Document Event event Text Utilities merge Processed Document Events f Document Events proposals compute Filtered Proposals offset event catch Bad Location Exception x finally f Document Events clear f Filter Offset offset if proposals null proposals length 0 set Proposals proposals else hide  fCounter fInvocationCounter fCounter fInvocationCounter isDisposed fContentAssistSubjectControlAdapter getSelectedRange ICompletionProposal DocumentEvent TextUtilities mergeProcessedDocumentEvents fDocumentEvents computeFilteredProposals BadLocationException fDocumentEvents fFilterOffset setProposals
Filters the displayed proposal based on the given cursor position and the offset of the original invocation of the content assistant private void filter Proposals f Invocation Counter final Control control f Content Assist Subject Control Adapter get Control control get Display async Exec new Runnable long f Counter f Invocation Counter public void run if f Counter f Invocation Counter return if control is Disposed return int offset f Content Assist Subject Control Adapter get Selected Range x I Completion Proposal proposals null try if offset 1 Document Event event Text Utilities merge Processed Document Events f Document Events proposals compute Filtered Proposals offset event catch Bad Location Exception x finally f Document Events clear f Filter Offset offset if proposals null proposals length 0 set Proposals proposals else hide  filterProposals fInvocationCounter fContentAssistSubjectControlAdapter getControl getDisplay asyncExec fCounter fInvocationCounter fCounter fInvocationCounter isDisposed fContentAssistSubjectControlAdapter getSelectedRange ICompletionProposal DocumentEvent TextUtilities mergeProcessedDocumentEvents fDocumentEvents computeFilteredProposals BadLocationException fDocumentEvents fFilterOffset setProposals
Computes the subset of already computed proposals that are still valid for the given offset param offset the offset param event the merged document event return the set of filtered proposals since 3 0 private I Completion Proposal compute Filtered Proposals int offset Document Event event if offset f Invocation Offset event null return f Computed Proposals if offset f Invocation Offset f Invocation Offset offset f Computed Proposals compute Proposals f Invocation Offset return f Computed Proposals I Completion Proposal proposals f Computed Proposals if offset f Filter Offset proposals f Filtered Proposals if proposals null return null I Document document f Content Assist Subject Control Adapter get Document int length proposals length List filtered new Array List length for int i 0 i length i if proposals i instanceof I Completion Proposal Extension2 I Completion Proposal Extension2 p I Completion Proposal Extension2 proposals i if p validate document offset event filtered add p else if proposals i instanceof I Completion Proposal Extension I Completion Proposal Extension p I Completion Proposal Extension proposals i if p is Valid For document offset filtered add p else restore original behavior f Invocation Offset offset f Computed Proposals compute Proposals f Invocation Offset return f Computed Proposals I Completion Proposal p new I Completion Proposal filtered size filtered to Array p return p  ICompletionProposal computeFilteredProposals DocumentEvent fInvocationOffset fComputedProposals fInvocationOffset fInvocationOffset fComputedProposals computeProposals fInvocationOffset fComputedProposals ICompletionProposal fComputedProposals fFilterOffset fFilteredProposals IDocument fContentAssistSubjectControlAdapter getDocument ArrayList ICompletionProposalExtension2 ICompletionProposalExtension2 ICompletionProposalExtension2 ICompletionProposalExtension ICompletionProposalExtension ICompletionProposalExtension isValidFor fInvocationOffset fComputedProposals computeProposals fInvocationOffset fComputedProposals ICompletionProposal ICompletionProposal toArray
Requests the proposal shell to take focus since 3 0 public void set Focus if Helper ok To Use f Proposal Shell f Proposal Shell set Focus  setFocus okToUse fProposalShell fProposalShell setFocus
Busy Indicator show While control get Display new Runnable public void run f Invocation Offset f Content Assist Subject Control Adapter get Selected Range x f Filter Offset f Invocation Offset f Filtered Proposals compute Proposals f Invocation Offset int count f Filtered Proposals null 0 f Filtered Proposals length if count 0 control get Display beep hide else if count 1 f Content Assistant is Auto Inserting insert Proposal f Filtered Proposals 0 char 0 0 f Invocation Offset hide else if f Line Delimiter null f Line Delimiter f Content Assist Subject Control Adapter get Line Delimiter if complete Common Prefix hide TODO add some caching for now just throw away the completions else f Computed Proposals f Filtered Proposals create Proposal Selector set Proposals f Computed Proposals display Proposals  BusyIndicator showWhile getDisplay fInvocationOffset fContentAssistSubjectControlAdapter getSelectedRange fFilterOffset fInvocationOffset fFilteredProposals computeProposals fInvocationOffset fFilteredProposals fFilteredProposals getDisplay fContentAssistant isAutoInserting insertProposal fFilteredProposals fInvocationOffset fLineDelimiter fLineDelimiter fContentAssistSubjectControlAdapter getLineDelimiter completeCommonPrefix fComputedProposals fFilteredProposals createProposalSelector setProposals fComputedProposals displayProposals
Completes the common prefix of all proposals directly in the code If no common prefix can be found the proposal popup is shown return an error message if completion failed since 3 0 public String incremental Complete if Helper ok To Use f Proposal Shell f Filtered Proposals null complete Common Prefix else final Control control f Content Assist Subject Control Adapter get Control if f Key Listener null f Key Listener new Proposal Selection Listener if Helper ok To Use f Proposal Shell control is Disposed f Content Assist Subject Control Adapter add Key Listener f Key Listener Busy Indicator show While control get Display new Runnable public void run f Invocation Offset f Content Assist Subject Control Adapter get Selected Range x f Filter Offset f Invocation Offset f Filtered Proposals compute Proposals f Invocation Offset int count f Filtered Proposals null 0 f Filtered Proposals length if count 0 control get Display beep hide else if count 1 f Content Assistant is Auto Inserting insert Proposal f Filtered Proposals 0 char 0 0 f Invocation Offset hide else if f Line Delimiter null f Line Delimiter f Content Assist Subject Control Adapter get Line Delimiter if complete Common Prefix hide TODO add some caching for now just throw away the completions else f Computed Proposals f Filtered Proposals create Proposal Selector set Proposals f Computed Proposals display Proposals return get Error Message  incrementalComplete okToUse fProposalShell fFilteredProposals completeCommonPrefix fContentAssistSubjectControlAdapter getControl fKeyListener fKeyListener ProposalSelectionListener okToUse fProposalShell isDisposed fContentAssistSubjectControlAdapter addKeyListener fKeyListener BusyIndicator showWhile getDisplay fInvocationOffset fContentAssistSubjectControlAdapter getSelectedRange fFilterOffset fInvocationOffset fFilteredProposals computeProposals fInvocationOffset fFilteredProposals fFilteredProposals getDisplay fContentAssistant isAutoInserting insertProposal fFilteredProposals fInvocationOffset fLineDelimiter fLineDelimiter fContentAssistSubjectControlAdapter getLineDelimiter completeCommonPrefix fComputedProposals fFilteredProposals createProposalSelector setProposals fComputedProposals displayProposals getErrorMessage
Acts upon code f Filtered Proposals code if there is just one valid proposal it is inserted otherwise the common prefix of all proposals is inserted into the document If there is no common prefix code false code is returned return code true code if common prefix insertion was successful code false code otherwise since 3 0 private boolean complete Common Prefix 0 insert single proposals if f Filtered Proposals length 1 insert Proposal f Filtered Proposals 0 char 0 0 f Invocation Offset hide return true 1 get the common ignore case prefix of all remaining proposals note that the prefix still String Buffer prefix null the common prefix boolean is Case Compatible true I Document document f Content Assist Subject Control Adapter get Document int start Offset 1 the location where the proposals would insert f Invocation Offset if invoked in the middle of an indent String current Prefix null the prefix already in the document int current Prefix Len 1 the length of the current prefix List case Filtered new Array List for int i 0 i f Filtered Proposals length i I Completion Proposal proposal f Filtered Proposals i Char Sequence insertion get Replacement String proposal if current Prefix null start Offset get Replacement Offset proposal current Prefix Len f Filter Offset start Offset try make sure we get the right case current Prefix document get start Offset current Prefix Len catch Bad Location Exception e1 bail out silently return false prune ignore case matches if is Case Sensitive insertion to String starts With current Prefix continue case Filtered add proposal if prefix null prefix new String Buffer insertion to String initial else is Case Compatible truncate Prefix prefix insertion early break computation if there is nothing left to check if prefix length 0 break if prefix null current Prefix Len prefix length prefix to String equals current Prefix return false 2 replace insert the common prefix in the document if case Filtered size 1 insert Proposal I Completion Proposal case Filtered get 0 char 0 0 f Invocation Offset hide return true try String present Part prefix substring 0 current Prefix Len int replace Offset int replace Len if is Case Compatible current Prefix equals present Part update case current Prefix Len 0 replace Offset start Offset replace Len f Filter Offset start Offset else only insert remaining part replace Offset f Filter Offset replace Len 0 int remaining Len prefix length current Prefix Len String remaining Prefix prefix sub Sequence current Prefix Len current Prefix Len remaining Len to String document replace replace Offset replace Len remaining Prefix f Content Assist Subject Control Adapter set Selected Range replace Offset remaining Len 0 f Content Assist Subject Control Adapter reveal Range replace Offset remaining Len 0 return true catch Bad Location Exception e ignore and return false return false  fFilteredProposals completeCommonPrefix fFilteredProposals insertProposal fFilteredProposals fInvocationOffset StringBuffer isCaseCompatible IDocument fContentAssistSubjectControlAdapter getDocument startOffset fInvocationOffset currentPrefix currentPrefixLen caseFiltered ArrayList fFilteredProposals ICompletionProposal fFilteredProposals CharSequence getReplacementString currentPrefix startOffset getReplacementOffset currentPrefixLen fFilterOffset startOffset currentPrefix startOffset currentPrefixLen BadLocationException isCaseSensitive toString startsWith currentPrefix caseFiltered StringBuffer toString isCaseCompatible truncatePrefix currentPrefixLen toString currentPrefix caseFiltered insertProposal ICompletionProposal caseFiltered fInvocationOffset presentPart currentPrefixLen replaceOffset replaceLen isCaseCompatible currentPrefix presentPart currentPrefixLen replaceOffset startOffset replaceLen fFilterOffset startOffset replaceOffset fFilterOffset replaceLen remainingLen currentPrefixLen remainingPrefix subSequence currentPrefixLen currentPrefixLen remainingLen toString replaceOffset replaceLen remainingPrefix fContentAssistSubjectControlAdapter setSelectedRange replaceOffset remainingLen fContentAssistSubjectControlAdapter revealRange replaceOffset remainingLen BadLocationException
Truncates code prefix code to the longest prefix it has in common with code sequence code and returns code true code if the common prefix has the same case for code prefix code and code sequence code param prefix the previous prefix that will get truncated to the prefix it has in common with code sequence code param sequence the character sequence to match return code true code if the match is case compatible code false code if the common prefix differs in case since 3 0 private boolean truncate Prefix String Buffer prefix Char Sequence sequence find common prefix int min Math min prefix length sequence length boolean case Compatible true for int c 0 c min c char compare Char sequence char At c char prefix Char prefix char At c if prefix Char compare Char if is Case Sensitive Character to Lower Case prefix Char Character to Lower Case compare Char prefix delete c prefix length return case Compatible else case Compatible false prefix delete min prefix length return case Compatible  truncatePrefix StringBuffer CharSequence caseCompatible compareChar charAt prefixChar charAt prefixChar compareChar isCaseSensitive toLowerCase prefixChar toLowerCase compareChar caseCompatible caseCompatible caseCompatible
Returns whether common prefix completion should be case sensitive or not Returns code true code if no proposal popup is currently showing code false code if there is return code true code if common prefix completion should be case sensitive code false code otherwise since 3 0 private boolean is Case Sensitive return Helper ok To Use f Proposal Shell  isCaseSensitive okToUse fProposalShell
Extracts the completion offset of an code I Completion Proposal code If code proposal code is a code I Completion Proposal Extension3 code its code get Completion Offset code method is called otherwise the invocation offset of this popup is shown param proposal the proposal to extract the offset from return the proposals completion offset or code f Invocation Offset code since 3 0 private int get Replacement Offset I Completion Proposal proposal if proposal instanceof I Completion Proposal Extension3 return I Completion Proposal Extension3 proposal get Prefix Completion Start f Content Assist Subject Control Adapter get Document f Filter Offset else return f Invocation Offset  ICompletionProposal ICompletionProposalExtension3 getCompletionOffset fInvocationOffset getReplacementOffset ICompletionProposal ICompletionProposalExtension3 ICompletionProposalExtension3 getPrefixCompletionStart fContentAssistSubjectControlAdapter getDocument fFilterOffset fInvocationOffset
Extracts the replacement string from an code I Completion Proposal code If code proposal code is a code I Completion Proposal Extension3 code its code get Completion Text code method is called otherwise the display string is used param proposal the proposal to extract the text from return the proposals completion text since 3 0 private Char Sequence get Replacement String I Completion Proposal proposal Char Sequence insertion null if proposal instanceof I Completion Proposal Extension3 insertion I Completion Proposal Extension3 proposal get Prefix Completion Text f Content Assist Subject Control Adapter get Document f Filter Offset if insertion null insertion proposal get Display String return insertion  ICompletionProposal ICompletionProposalExtension3 getCompletionText CharSequence getReplacementString ICompletionProposal CharSequence ICompletionProposalExtension3 ICompletionProposalExtension3 getPrefixCompletionText fContentAssistSubjectControlAdapter getDocument fFilterOffset getDisplayString

Installs this closer on it s viewer s text widget protected void install Control control f Content Assist Subject Control Adapter get Control f Control control if Helper ok To Use control Control shell control get Shell f Shell shell shell add Control Listener this control add Mouse Listener this control add Focus Listener this 1GGYYWK ITPJUI ALL Dismissing editor with code assist up causes lots of Internal Errors control add Dispose Listener this if f Viewer null f Viewer add Viewport Listener this  fContentAssistSubjectControlAdapter getControl fControl okToUse getShell fShell addControlListener addMouseListener addFocusListener addDisposeListener fViewer fViewer addViewportListener
Uninstalls this closer from the viewer s text widget protected void uninstall Control shell f Shell f Shell null if Helper ok To Use shell shell remove Control Listener this Control control f Control f Control null if Helper ok To Use control control remove Mouse Listener this control remove Focus Listener this 1GGYYWK ITPJUI ALL Dismissing editor with code assist up causes lots of Internal Errors control remove Dispose Listener this if f Viewer null f Viewer remove Viewport Listener this  fShell fShell okToUse removeControlListener fControl fControl okToUse removeMouseListener removeFocusListener removeDisposeListener fViewer fViewer removeViewportListener
see Control Listener control Resized Control Event public void control Resized Control Event e hide  ControlListener controlResized ControlEvent controlResized ControlEvent
see Control Listener control Moved Control Event public void control Moved Control Event e hide  ControlListener controlMoved ControlEvent controlMoved ControlEvent
see Mouse Listener mouse Down Mouse Event public void mouse Down Mouse Event e hide  MouseListener mouseDown MouseEvent mouseDown MouseEvent
see Mouse Listener mouse Up Mouse Event public void mouse Up Mouse Event e  MouseListener mouseUp MouseEvent mouseUp MouseEvent
see Mouse Listener mouse Double Click Mouse Event public void mouse Double Click Mouse Event e hide  MouseListener mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent
see Focus Listener focus Gained Focus Event public void focus Gained Focus Event e  FocusListener focusGained FocusEvent focusGained FocusEvent
if d null d async Exec new Runnable public void run if f Proposal Popup has Focus f Context Info Popup null f Context Info Popup has Focus hide  asyncExec fProposalPopup hasFocus fContextInfoPopup fContextInfoPopup hasFocus
public void focus Lost Focus Event e Control control f Control if Helper ok To Use control Display d control get Display if d null d async Exec new Runnable public void run if f Proposal Popup has Focus f Context Info Popup null f Context Info Popup has Focus hide  focusLost FocusEvent fControl okToUse getDisplay asyncExec fProposalPopup hasFocus fContextInfoPopup fContextInfoPopup hasFocus
public void widget Disposed Dispose Event e 1GGYYWK ITPJUI ALL Dismissing editor with code assist up causes lots of Internal Errors hide  widgetDisposed DisposeEvent
see I Viewport Listener viewport Changed int public void viewport Changed int top Index hide  IViewportListener viewportChanged viewportChanged topIndex
private final static int SHOW CONTEXT INFO 2 protected Auto Assist Listener  SHOW_CONTEXT_INFO AutoAssistListener
protected void start int show Style f Show Style show Style f Thread new Thread this J Face Text Messages get String Content Assistant assist delay timer name NON NLS 1 f Thread start  showStyle fShowStyle showStyle fThread JFaceTextMessages getString ContentAssistant assist_delay_timer_name fThread
public void run try while true synchronized f Mutex if f Auto Activation Delay 0 f Mutex wait f Auto Activation Delay if f Is Reset f Is Reset false continue show Assist f Show Style break catch Interrupted Exception e f Thread null  fMutex fAutoActivationDelay fMutex fAutoActivationDelay fIsReset fIsReset showAssist fShowStyle InterruptedException fThread
protected void reset int show Style synchronized f Mutex f Show Style show Style f Is Reset true f Mutex notify All  showStyle fMutex fShowStyle showStyle fIsReset fMutex notifyAll
protected void stop if f Thread null f Thread interrupt  fThread fThread
private boolean contains char characters char character if characters null for int i 0 i characters length i if character characters i return true return false 
public void key Pressed Key Event e Only act on typed characters and ignore modifier only events if e character 0 e key Code SWT KEYCODE BIT 0 return int show Style int pos f Content Assist Subject Control Adapter get Selected Range x char activation activation f Content Assist Subject Control Adapter get Completion Proposal Auto Activation Characters Content Assistant this pos if contains activation e character f Proposal Popup is Active show Style SHOW PROPOSALS else activation f Content Assist Subject Control Adapter get Context Information Auto Activation Characters Content Assistant this pos if contains activation e character f Context Info Popup null f Context Info Popup is Active show Style SHOW CONTEXT INFO else if f Thread null f Thread is Alive stop return if f Thread null f Thread is Alive reset show Style else start show Style  keyPressed KeyEvent keyCode KEYCODE_BIT showStyle fContentAssistSubjectControlAdapter getSelectedRange fContentAssistSubjectControlAdapter getCompletionProposalAutoActivationCharacters ContentAssistant fProposalPopup isActive showStyle SHOW_PROPOSALS fContentAssistSubjectControlAdapter getContextInformationAutoActivationCharacters ContentAssistant fContextInfoPopup fContextInfoPopup isActive showStyle SHOW_CONTEXT_INFO fThread fThread isAlive fThread fThread isAlive showStyle showStyle
see org eclipse swt custom Verify Key Listener verify Key org eclipse swt events Verify Event public void verify Key Verify Event event key Pressed event  VerifyKeyListener verifyKey VerifyEvent verifyKey VerifyEvent keyPressed
d sync Exec new Runnable public void run if show Style SHOW PROPOSALS f Proposal Popup show Proposals true else if show Style SHOW CONTEXT INFO f Context Info Popup null f Context Info Popup show Context Proposals true  syncExec showStyle SHOW_PROPOSALS fProposalPopup showProposals showStyle SHOW_CONTEXT_INFO fContextInfoPopup fContextInfoPopup showContextProposals
protected void show Assist final int show Style Display d f Content Assist Subject Control Adapter get Control get Display if d null try d sync Exec new Runnable public void run if show Style SHOW PROPOSALS f Proposal Popup show Proposals true else if show Style SHOW CONTEXT INFO f Context Info Popup null f Context Info Popup show Context Proposals true catch SWT Error e  showAssist showStyle fContentAssistSubjectControlAdapter getControl getDisplay syncExec showStyle SHOW_PROPOSALS fProposalPopup showProposals showStyle SHOW_CONTEXT_INFO fContextInfoPopup fContextInfoPopup showContextProposals SWTError
protected void add Object popup Shell shell int type int offset Assert is Not Null popup Assert is True shell null shell is Disposed check Type type if f Shells type shell if f Shells type null f Shells type remove Listener SWT Dispose this shell add Listener SWT Dispose this f Shells type shell f Popups type popup if type LAYOUT CONTEXT SELECTOR type LAYOUT CONTEXT INFO POPUP f Context Type type layout type offset adjust Listeners type  isNotNull isTrue isDisposed checkType fShells fShells fShells removeListener addListener fShells fPopups LAYOUT_CONTEXT_SELECTOR LAYOUT_CONTEXT_INFO_POPUP fContextType adjustListeners
protected void check Type int type Assert is True type LAYOUT PROPOSAL SELECTOR type LAYOUT CONTEXT SELECTOR type LAYOUT CONTEXT INFO POPUP  checkType isTrue LAYOUT_PROPOSAL_SELECTOR LAYOUT_CONTEXT_SELECTOR LAYOUT_CONTEXT_INFO_POPUP
public void handle Event Event event Widget source event widget source remove Listener SWT Dispose this int type get Shell Type source check Type type f Shells type null switch type case LAYOUT PROPOSAL SELECTOR if f Context Type LAYOUT CONTEXT SELECTOR Helper ok To Use f Shells LAYOUT CONTEXT SELECTOR Restore event notification to the tip popup add Content Assist Listener I Content Assist Listener f Popups LAYOUT CONTEXT SELECTOR CONTEXT SELECTOR break case LAYOUT CONTEXT SELECTOR if Helper ok To Use f Shells LAYOUT PROPOSAL SELECTOR if f Proposal Popup Orientation PROPOSAL STACKED layout LAYOUT PROPOSAL SELECTOR get Selection Offset Restore event notification to the proposal popup add Content Assist Listener I Content Assist Listener f Popups LAYOUT PROPOSAL SELECTOR PROPOSAL SELECTOR f Context Type LAYOUT CONTEXT INFO POPUP break case LAYOUT CONTEXT INFO POPUP if Helper ok To Use f Shells LAYOUT PROPOSAL SELECTOR if f Context Info Popup Orientation CONTEXT INFO BELOW layout LAYOUT PROPOSAL SELECTOR get Selection Offset f Context Type LAYOUT CONTEXT SELECTOR break  handleEvent removeListener getShellType checkType fShells LAYOUT_PROPOSAL_SELECTOR fContextType LAYOUT_CONTEXT_SELECTOR okToUse fShells LAYOUT_CONTEXT_SELECTOR addContentAssistListener IContentAssistListener fPopups LAYOUT_CONTEXT_SELECTOR CONTEXT_SELECTOR LAYOUT_CONTEXT_SELECTOR okToUse fShells LAYOUT_PROPOSAL_SELECTOR fProposalPopupOrientation PROPOSAL_STACKED LAYOUT_PROPOSAL_SELECTOR getSelectionOffset addContentAssistListener IContentAssistListener fPopups LAYOUT_PROPOSAL_SELECTOR PROPOSAL_SELECTOR fContextType LAYOUT_CONTEXT_INFO_POPUP LAYOUT_CONTEXT_INFO_POPUP okToUse fShells LAYOUT_PROPOSAL_SELECTOR fContextInfoPopupOrientation CONTEXT_INFO_BELOW LAYOUT_PROPOSAL_SELECTOR getSelectionOffset fContextType LAYOUT_CONTEXT_SELECTOR
protected int get Shell Type Widget shell for int i 0 i f Shells length i if f Shells i shell return i return 1  getShellType fShells fShells
protected void layout int type int offset switch type case LAYOUT PROPOSAL SELECTOR layout Proposal Selector offset break case LAYOUT CONTEXT SELECTOR layout Context Selector offset break case LAYOUT CONTEXT INFO POPUP layout Context Info Popup offset break  LAYOUT_PROPOSAL_SELECTOR layoutProposalSelector LAYOUT_CONTEXT_SELECTOR layoutContextSelector LAYOUT_CONTEXT_INFO_POPUP layoutContextInfoPopup
protected void layout Proposal Selector int offset if f Context Type LAYOUT CONTEXT INFO POPUP f Context Info Popup Orientation CONTEXT INFO BELOW Helper ok To Use f Shells LAYOUT CONTEXT INFO POPUP Stack proposal selector beneath the tip box Shell shell f Shells LAYOUT PROPOSAL SELECTOR Shell parent f Shells LAYOUT CONTEXT INFO POPUP shell set Location get Stacked Location shell parent else if f Context Type LAYOUT CONTEXT SELECTOR Helper ok To Use f Shells LAYOUT CONTEXT SELECTOR There are no other presentations to be concerned with so place the proposal selector beneath the cursor line Shell shell f Shells LAYOUT PROPOSAL SELECTOR shell set Location get Below Location shell offset else switch f Proposal Popup Orientation case PROPOSAL REMOVE Remove the tip selector and place the proposal selector beneath the cursor line f Shells LAYOUT CONTEXT SELECTOR dispose Shell shell f Shells LAYOUT PROPOSAL SELECTOR shell set Location get Below Location shell offset break case PROPOSAL OVERLAY Overlay the tip selector with the proposal selector Shell shell f Shells LAYOUT PROPOSAL SELECTOR shell set Location get Below Location shell offset break case PROPOSAL STACKED Stack the proposal selector beneath the tip selector Shell shell f Shells LAYOUT PROPOSAL SELECTOR Shell parent f Shells LAYOUT CONTEXT SELECTOR shell set Location get Stacked Location shell parent break  layoutProposalSelector fContextType LAYOUT_CONTEXT_INFO_POPUP fContextInfoPopupOrientation CONTEXT_INFO_BELOW okToUse fShells LAYOUT_CONTEXT_INFO_POPUP fShells LAYOUT_PROPOSAL_SELECTOR fShells LAYOUT_CONTEXT_INFO_POPUP setLocation getStackedLocation fContextType LAYOUT_CONTEXT_SELECTOR okToUse fShells LAYOUT_CONTEXT_SELECTOR fShells LAYOUT_PROPOSAL_SELECTOR setLocation getBelowLocation fProposalPopupOrientation PROPOSAL_REMOVE fShells LAYOUT_CONTEXT_SELECTOR fShells LAYOUT_PROPOSAL_SELECTOR setLocation getBelowLocation PROPOSAL_OVERLAY fShells LAYOUT_PROPOSAL_SELECTOR setLocation getBelowLocation PROPOSAL_STACKED fShells LAYOUT_PROPOSAL_SELECTOR fShells LAYOUT_CONTEXT_SELECTOR setLocation getStackedLocation
protected void layout Context Selector int offset Always place the context selector beneath the cursor line Shell shell f Shells LAYOUT CONTEXT SELECTOR shell set Location get Below Location shell offset if Helper ok To Use f Shells LAYOUT PROPOSAL SELECTOR switch f Proposal Popup Orientation case PROPOSAL REMOVE Remove the proposal selector f Shells LAYOUT PROPOSAL SELECTOR dispose break case PROPOSAL OVERLAY The proposal selector has been overlaid by the tip selector break case PROPOSAL STACKED Stack the proposal selector beneath the tip selector shell f Shells LAYOUT PROPOSAL SELECTOR Shell parent f Shells LAYOUT CONTEXT SELECTOR shell set Location get Stacked Location shell parent break  layoutContextSelector fShells LAYOUT_CONTEXT_SELECTOR setLocation getBelowLocation okToUse fShells LAYOUT_PROPOSAL_SELECTOR fProposalPopupOrientation PROPOSAL_REMOVE fShells LAYOUT_PROPOSAL_SELECTOR PROPOSAL_OVERLAY PROPOSAL_STACKED fShells LAYOUT_PROPOSAL_SELECTOR fShells LAYOUT_CONTEXT_SELECTOR setLocation getStackedLocation
protected void layout Context Info Popup int offset switch f Context Info Popup Orientation case CONTEXT INFO ABOVE Place the popup above the cursor line Shell shell f Shells LAYOUT CONTEXT INFO POPUP shell set Location get Above Location shell offset break case CONTEXT INFO BELOW Place the popup beneath the cursor line Shell parent f Shells LAYOUT CONTEXT INFO POPUP parent set Location get Below Location parent offset if Helper ok To Use f Shells LAYOUT PROPOSAL SELECTOR Stack the proposal selector beneath the context info popup Shell shell f Shells LAYOUT PROPOSAL SELECTOR shell set Location get Stacked Location shell parent break  layoutContextInfoPopup fContextInfoPopupOrientation CONTEXT_INFO_ABOVE fShells LAYOUT_CONTEXT_INFO_POPUP setLocation getAboveLocation CONTEXT_INFO_BELOW fShells LAYOUT_CONTEXT_INFO_POPUP setLocation getBelowLocation okToUse fShells LAYOUT_PROPOSAL_SELECTOR fShells LAYOUT_PROPOSAL_SELECTOR setLocation getStackedLocation
protected void shift Horizontal Location Point location Rectangle shell Bounds Rectangle display Bounds if location x shell Bounds width display Bounds width location x display Bounds width shell Bounds width if location x display Bounds x location x display Bounds x  shiftHorizontalLocation shellBounds displayBounds shellBounds displayBounds displayBounds shellBounds displayBounds displayBounds
protected void shift Vertical Location Point location Rectangle shell Bounds Rectangle display Bounds if location y shell Bounds height display Bounds height location y display Bounds height shell Bounds height if location y display Bounds y location y display Bounds y  shiftVerticalLocation shellBounds displayBounds shellBounds displayBounds displayBounds shellBounds displayBounds displayBounds
protected Point get Above Location Shell shell int offset Point location f Content Assist Subject Control Adapter get Location At Offset offset location f Content Assist Subject Control Adapter get Control to Display location Rectangle shell Bounds shell get Bounds Rectangle display Bounds shell get Display get Client Area location y location y shell Bounds height shift Horizontal Location location shell Bounds display Bounds shift Vertical Location location shell Bounds display Bounds return location  getAboveLocation fContentAssistSubjectControlAdapter getLocationAtOffset fContentAssistSubjectControlAdapter getControl toDisplay shellBounds getBounds displayBounds getDisplay getClientArea shellBounds shiftHorizontalLocation shellBounds displayBounds shiftVerticalLocation shellBounds displayBounds
protected Point get Below Location Shell shell int offset Point location f Content Assist Subject Control Adapter get Location At Offset offset if location x 0 location x 0 if location y 0 location y 0 location f Content Assist Subject Control Adapter get Control to Display location Rectangle shell Bounds shell get Bounds Rectangle display Bounds shell get Display get Client Area location y location y f Content Assist Subject Control Adapter get Line Height shift Horizontal Location location shell Bounds display Bounds shift Vertical Location location shell Bounds display Bounds return location  getBelowLocation fContentAssistSubjectControlAdapter getLocationAtOffset fContentAssistSubjectControlAdapter getControl toDisplay shellBounds getBounds displayBounds getDisplay getClientArea fContentAssistSubjectControlAdapter getLineHeight shiftHorizontalLocation shellBounds displayBounds shiftVerticalLocation shellBounds displayBounds
protected Point get Stacked Location Shell shell Shell parent Point p parent get Location Point size parent get Size p x size x 4 p y size y p parent to Display p Rectangle shell Bounds shell get Bounds Rectangle display Bounds shell get Display get Client Area shift Horizontal Location p shell Bounds display Bounds shift Vertical Location p shell Bounds display Bounds return p  getStackedLocation getLocation getSize toDisplay shellBounds getBounds displayBounds getDisplay getClientArea shiftHorizontalLocation shellBounds displayBounds shiftVerticalLocation shellBounds displayBounds
protected void adjust Listeners int type switch type case LAYOUT PROPOSAL SELECTOR if f Context Type LAYOUT CONTEXT SELECTOR Helper ok To Use f Shells LAYOUT CONTEXT SELECTOR Disable event notification to the tip selector remove Content Assist Listener I Content Assist Listener f Popups LAYOUT CONTEXT SELECTOR CONTEXT SELECTOR break case LAYOUT CONTEXT SELECTOR if Helper ok To Use f Shells LAYOUT PROPOSAL SELECTOR Disable event notification to the proposal selector remove Content Assist Listener I Content Assist Listener f Popups LAYOUT PROPOSAL SELECTOR PROPOSAL SELECTOR break case LAYOUT CONTEXT INFO POPUP break  adjustListeners LAYOUT_PROPOSAL_SELECTOR fContextType LAYOUT_CONTEXT_SELECTOR okToUse fShells LAYOUT_CONTEXT_SELECTOR removeContentAssistListener IContentAssistListener fPopups LAYOUT_CONTEXT_SELECTOR CONTEXT_SELECTOR LAYOUT_CONTEXT_SELECTOR okToUse fShells LAYOUT_PROPOSAL_SELECTOR removeContentAssistListener IContentAssistListener fPopups LAYOUT_PROPOSAL_SELECTOR PROPOSAL_SELECTOR LAYOUT_CONTEXT_INFO_POPUP
Verifies key events by notifying the registered listeners Each listener is allowed to indicate that the event has been handled and should not be further processed param e the verify event see Verify Key Listener verify Key org eclipse swt events Verify Event public void verify Key Verify Event e I Content Assist Listener listeners I Content Assist Listener f Listeners clone for int i 0 i listeners length i if listeners i null if listeners i verify Key e e doit break if f Auto Assist Listener null f Auto Assist Listener key Pressed e  VerifyKeyListener verifyKey VerifyEvent verifyKey VerifyEvent IContentAssistListener IContentAssistListener fListeners verifyKey fAutoAssistListener fAutoAssistListener keyPressed
public void process Event Verify Event event install Key Listener I Content Assist Listener listeners I Content Assist Listener f Listeners clone for int i 0 i listeners length i if listeners i null listeners i process Event event if event doit return  processEvent VerifyEvent installKeyListener IContentAssistListener IContentAssistListener fListeners processEvent
Creates a new content assistant The content assistant is not automatically activated overlays the completion proposals with context information list if necessary and shows the context information above the location at which it was activated If auto activation will be enabled without further configuration steps this content assistant is activated after a 500 milli seconds delay It uses the default partitioning public Content Assistant f Partitioning I Document Extension3 DEFAULT PARTITIONING  ContentAssistant fPartitioning IDocumentExtension3 DEFAULT_PARTITIONING
Sets the document partitioning this content assistant is using param partitioning the document partitioning for this content assistant since 3 0 public void set Document Partitioning String partitioning Assert is Not Null partitioning f Partitioning partitioning  setDocumentPartitioning isNotNull fPartitioning
since 3 0 public String get Document Partitioning return f Partitioning  getDocumentPartitioning fPartitioning
Registers a given content assist processor for a particular content type If there is already a processor registered for this type the new processor is registered instead of the old one param processor the content assist processor to register or code null code to remove an existing one param content Type the content type under which to register public void set Content Assist Processor I Content Assist Processor processor String content Type Assert is Not Null content Type if f Processors null f Processors new Hash Map if processor null f Processors remove content Type else f Processors put content Type processor  contentType setContentAssistProcessor IContentAssistProcessor contentType isNotNull contentType fProcessors fProcessors HashMap fProcessors contentType fProcessors contentType
public I Content Assist Processor get Content Assist Processor String content Type if f Processors null return null return I Content Assist Processor f Processors get content Type  IContentAssistProcessor getContentAssistProcessor contentType fProcessors IContentAssistProcessor fProcessors contentType
Enables the content assistant s auto activation mode param enabled indicates whether auto activation is enabled or not public void enable Auto Activation boolean enabled f Is Auto Activated enabled manage Auto Activation f Is Auto Activated  enableAutoActivation fIsAutoActivated manageAutoActivation fIsAutoActivated
Enables the content assistant s auto insertion mode If enabled the content assistant inserts a proposal automatically if it is the only proposal In the case of ambiguities the user must make the choice param enabled indicates whether auto insertion is enabled or not since 2 0 public void enable Auto Insert boolean enabled f Is Auto Inserting enabled  enableAutoInsert fIsAutoInserting
Returns whether this content assistant is in the auto insertion mode or not return code true code if in auto insertion mode since 2 0 boolean is Auto Inserting return f Is Auto Inserting  isAutoInserting fIsAutoInserting
Installs and uninstall the listeners needed for auto activation param start code true code if listeners must be installed code false code if they must be removed since 2 0 private void manage Auto Activation boolean start if start if f Content Assist Subject Control Adapter null f Auto Assist Listener null f Auto Assist Listener new Auto Assist Listener TODO see bug 49212 if f Content Assist Subject Control Adapter supports Verify Key Listener f Content Assist Subject Control Adapter append Verify Key Listener f Auto Assist Listener else f Content Assist Subject Control Adapter add Key Listener f Auto Assist Listener else if f Auto Assist Listener null TODO see bug 49212 if f Content Assist Subject Control Adapter supports Verify Key Listener f Content Assist Subject Control Adapter remove Verify Key Listener f Auto Assist Listener else f Content Assist Subject Control Adapter remove Key Listener f Auto Assist Listener f Auto Assist Listener null  manageAutoActivation fContentAssistSubjectControlAdapter fAutoAssistListener fAutoAssistListener AutoAssistListener fContentAssistSubjectControlAdapter supportsVerifyKeyListener fContentAssistSubjectControlAdapter appendVerifyKeyListener fAutoAssistListener fContentAssistSubjectControlAdapter addKeyListener fAutoAssistListener fAutoAssistListener fContentAssistSubjectControlAdapter supportsVerifyKeyListener fContentAssistSubjectControlAdapter removeVerifyKeyListener fAutoAssistListener fContentAssistSubjectControlAdapter removeKeyListener fAutoAssistListener fAutoAssistListener
Sets the delay after which the content assistant is automatically invoked if the cursor is behind an auto activation character param delay the auto activation delay public void set Auto Activation Delay int delay f Auto Activation Delay delay  setAutoActivationDelay fAutoActivationDelay
Sets the proposal pop ups orientation The following values may be used ul li PROPOSAL OVERLAY p proposal popup windows should overlay each other li li PROPOSAL REMOVE p any currently shown proposal popup should be closed li li PROPOSAL STACKED p proposal popup windows should be vertical stacked with no overlap beneath the line containing the current cursor location li ul param orientation the popup s orientation public void set Proposal Popup Orientation int orientation f Proposal Popup Orientation orientation  PROPOSAL_OVERLAY PROPOSAL_REMOVE PROPOSAL_STACKED setProposalPopupOrientation fProposalPopupOrientation
Sets the context information popup s orientation The following values may be used ul li CONTEXT ABOVE p context information popup should always appear above the line containing the current cursor location li li CONTEXT BELOW p context information popup should always appear below the line containing the current cursor location li ul param orientation the popup s orientation public void set Context Information Popup Orientation int orientation f Context Info Popup Orientation orientation  CONTEXT_ABOVE CONTEXT_BELOW setContextInformationPopupOrientation fContextInfoPopupOrientation
Sets the context information popup s background color param background the background color public void set Context Information Popup Background Color background f Context Info Popup Background background  setContextInformationPopupBackground fContextInfoPopupBackground
Returns the background of the context information popup return the background of the context information popup since 2 0 Color get Context Information Popup Background return f Context Info Popup Background  getContextInformationPopupBackground fContextInfoPopupBackground
Sets the context information popup s foreground color param foreground the foreground color since 2 0 public void set Context Information Popup Foreground Color foreground f Context Info Popup Foreground foreground  setContextInformationPopupForeground fContextInfoPopupForeground
Returns the foreground of the context information popup return the foreground of the context information popup since 2 0 Color get Context Information Popup Foreground return f Context Info Popup Foreground  getContextInformationPopupForeground fContextInfoPopupForeground
Sets the proposal selector s background color param background the background color since 2 0 public void set Proposal Selector Background Color background f Proposal Selector Background background  setProposalSelectorBackground fProposalSelectorBackground
Returns the background of the proposal selector return the background of the proposal selector since 2 0 Color get Proposal Selector Background return f Proposal Selector Background  getProposalSelectorBackground fProposalSelectorBackground
Sets the proposal s foreground color param foreground the foreground color since 2 0 public void set Proposal Selector Foreground Color foreground f Proposal Selector Foreground foreground  setProposalSelectorForeground fProposalSelectorForeground
Returns the foreground of the proposal selector return the foreground of the proposal selector since 2 0 Color get Proposal Selector Foreground return f Proposal Selector Foreground  getProposalSelectorForeground fProposalSelectorForeground
Sets the context selector s background color param background the background color since 2 0 public void set Context Selector Background Color background f Context Selector Background background  setContextSelectorBackground fContextSelectorBackground
Returns the background of the context selector return the background of the context selector since 2 0 Color get Context Selector Background return f Context Selector Background  getContextSelectorBackground fContextSelectorBackground
Sets the context selector s foreground color param foreground the foreground color since 2 0 public void set Context Selector Foreground Color foreground f Context Selector Foreground foreground  setContextSelectorForeground fContextSelectorForeground
Returns the foreground of the context selector return the foreground of the context selector since 2 0 Color get Context Selector Foreground return f Context Selector Foreground  getContextSelectorForeground fContextSelectorForeground
Sets the information control creator for the additional information control param creator the information control creator for the additional information control since 2 0 public void set Information Control Creator I Information Control Creator creator f Information Control Creator creator  setInformationControlCreator IInformationControlCreator fInformationControlCreator
protected void install I Content Assist Subject Control content Assist Subject Control f Content Assist Subject Control content Assist Subject Control f Content Assist Subject Control Adapter new Content Assist Subject Control Adapter f Content Assist Subject Control install  IContentAssistSubjectControl contentAssistSubjectControl fContentAssistSubjectControl contentAssistSubjectControl fContentAssistSubjectControlAdapter ContentAssistSubjectControlAdapter fContentAssistSubjectControl
public void install I Text Viewer text Viewer f Viewer text Viewer f Content Assist Subject Control Adapter new Content Assist Subject Control Adapter f Viewer install  ITextViewer textViewer fViewer textViewer fContentAssistSubjectControlAdapter ContentAssistSubjectControlAdapter fViewer
protected void install f Layout Manager new Layout Manager f Internal Listener new Internal Listener Additional Info Controller controller null if f Information Control Creator null int delay f Auto Activation Delay if delay 0 delay DEFAULT AUTO ACTIVATION DELAY delay Math round delay 1 5f controller new Additional Info Controller f Information Control Creator delay f Context Info Popup f Content Assist Subject Control Adapter create Context Info Popup this f Proposal Popup f Content Assist Subject Control Adapter create Completion Proposal Popup this controller manage Auto Activation f Is Auto Activated  fLayoutManager LayoutManager fInternalListener InternalListener AdditionalInfoController fInformationControlCreator fAutoActivationDelay DEFAULT_AUTO_ACTIVATION_DELAY AdditionalInfoController fInformationControlCreator fContextInfoPopup fContentAssistSubjectControlAdapter createContextInfoPopup fProposalPopup fContentAssistSubjectControlAdapter createCompletionProposalPopup manageAutoActivation fIsAutoActivated
public void uninstall hide manage Auto Activation false if f Closer null f Closer uninstall f Closer null f Viewer null f Content Assist Subject Control null f Content Assist Subject Control Adapter null  manageAutoActivation fCloser fCloser fCloser fViewer fContentAssistSubjectControl fContentAssistSubjectControlAdapter
Adds the given shell of the specified type to the layout Valid types are defined by code Layout Manager code param popup a content assist popup param shell the shell of the content assist popup param type the type of popup param visible Offset the offset at which to layout the popup relative to the offset of the viewer s visible region since 2 0 void add To Layout Object popup Shell shell int type int visible Offset f Layout Manager add popup shell type visible Offset  LayoutManager visibleOffset addToLayout visibleOffset fLayoutManager visibleOffset
Layouts the registered popup of the given type relative to the given offset The offset is relative to the offset of the viewer s visible region Valid types are defined by code Layout Manager code param type the type of popup to layout param visible Offset the offset at which to layout relative to the offset of the viewer s visible region since 2 0 void layout int type int visible Offset f Layout Manager layout type visible Offset  LayoutManager visibleOffset visibleOffset fLayoutManager visibleOffset
Notifies the controller that a popup has lost focus param e the focus event void popup Focus Lost Focus Event e f Closer focus Lost e  popupFocusLost FocusEvent fCloser focusLost
Returns the offset of the selection relative to the offset of the visible region return the offset of the selection relative to the offset of the visible region since 2 0 int get Selection Offset return f Content Assist Subject Control Adapter get Widget Selection Range x  getSelectionOffset fContentAssistSubjectControlAdapter getWidgetSelectionRange
Returns whether the widget token could be acquired The following are valid listener types ul li AUTO ASSIST li li CONTEXT SELECTOR li li PROPOSAL SELECTOR li li CONTEXT INFO POPUP li ul param type the listener type for which to acquire return code true code if the widget token could be acquired since 2 0 private boolean acquire Widget Token int type switch type case CONTEXT SELECTOR case PROPOSAL SELECTOR if f Content Assist Subject Control instanceof I Widget Token Owner Extension I Widget Token Owner Extension extension I Widget Token Owner Extension f Content Assist Subject Control return extension request Widget Token this WIDGET PRIORITY else if f Content Assist Subject Control instanceof I Widget Token Owner I Widget Token Owner owner I Widget Token Owner f Content Assist Subject Control return owner request Widget Token this else if f Viewer instanceof I Widget Token Owner Extension I Widget Token Owner Extension extension I Widget Token Owner Extension f Viewer return extension request Widget Token this WIDGET PRIORITY else if f Viewer instanceof I Widget Token Owner I Widget Token Owner owner I Widget Token Owner f Viewer return owner request Widget Token this return true  AUTO_ASSIST CONTEXT_SELECTOR PROPOSAL_SELECTOR CONTEXT_INFO_POPUP acquireWidgetToken CONTEXT_SELECTOR PROPOSAL_SELECTOR fContentAssistSubjectControl IWidgetTokenOwnerExtension IWidgetTokenOwnerExtension IWidgetTokenOwnerExtension fContentAssistSubjectControl requestWidgetToken WIDGET_PRIORITY fContentAssistSubjectControl IWidgetTokenOwner IWidgetTokenOwner IWidgetTokenOwner fContentAssistSubjectControl requestWidgetToken fViewer IWidgetTokenOwnerExtension IWidgetTokenOwnerExtension IWidgetTokenOwnerExtension fViewer requestWidgetToken WIDGET_PRIORITY fViewer IWidgetTokenOwner IWidgetTokenOwner IWidgetTokenOwner fViewer requestWidgetToken
Registers a content assist listener The following are valid listener types ul li AUTO ASSIST li li CONTEXT SELECTOR li li PROPOSAL SELECTOR li li CONTEXT INFO POPUP li ul Returns whether the listener could be added successfully A listener can not be added if the widget token could not be acquired param listener the listener to register param type the type of listener return code true code if the listener could be added boolean add Content Assist Listener I Content Assist Listener listener int type if acquire Widget Token type f Listeners type listener if f Closer null get Number Of Listeners 1 f Closer new Closer f Closer install f Content Assist Subject Control Adapter set Event Consumer f Internal Listener install Key Listener else promote Key Listener return true return false  AUTO_ASSIST CONTEXT_SELECTOR PROPOSAL_SELECTOR CONTEXT_INFO_POPUP addContentAssistListener IContentAssistListener acquireWidgetToken fListeners fCloser getNumberOfListeners fCloser fCloser fContentAssistSubjectControlAdapter setEventConsumer fInternalListener installKeyListener promoteKeyListener
Re promotes the key listener to the first position using prepend Verify Key Listener This ensures no other instance is filtering away the keystrokes underneath if we ve been up for a while e g when the context info is showing since 3 0 private void promote Key Listener uninstall Verify Key Listener install Key Listener  prependVerifyKeyListener promoteKeyListener uninstallVerifyKeyListener installKeyListener
Installs a key listener on the text viewer s widget private void install Key Listener if f Verify Key Listener Hooked if Helper ok To Use f Content Assist Subject Control Adapter get Control f Verify Key Listener Hooked f Content Assist Subject Control Adapter prepend Verify Key Listener f Internal Listener  installKeyListener fVerifyKeyListenerHooked okToUse fContentAssistSubjectControlAdapter getControl fVerifyKeyListenerHooked fContentAssistSubjectControlAdapter prependVerifyKeyListener fInternalListener
Releases the previously acquired widget token if the token is no longer necessary The following are valid listener types ul li AUTO ASSIST li li CONTEXT SELECTOR li li PROPOSAL SELECTOR li li CONTEXT INFO POPUP li ul param type the listener type since 2 0 private void release Widget Token int type if f Listeners CONTEXT SELECTOR null f Listeners PROPOSAL SELECTOR null I Widget Token Owner owner null if f Content Assist Subject Control instanceof I Widget Token Owner owner I Widget Token Owner f Content Assist Subject Control else if f Viewer instanceof I Widget Token Owner owner I Widget Token Owner f Viewer if owner null owner release Widget Token this  AUTO_ASSIST CONTEXT_SELECTOR PROPOSAL_SELECTOR CONTEXT_INFO_POPUP releaseWidgetToken fListeners CONTEXT_SELECTOR fListeners PROPOSAL_SELECTOR IWidgetTokenOwner fContentAssistSubjectControl IWidgetTokenOwner IWidgetTokenOwner fContentAssistSubjectControl fViewer IWidgetTokenOwner IWidgetTokenOwner fViewer releaseWidgetToken
Unregisters a content assist listener param listener the listener to unregister param type the type of listener see add Content Assist Listener I Content Assist Listener int void remove Content Assist Listener I Content Assist Listener listener int type f Listeners type null if get Number Of Listeners 0 if f Closer null f Closer uninstall f Closer null uninstall Verify Key Listener f Content Assist Subject Control Adapter set Event Consumer null release Widget Token type  addContentAssistListener IContentAssistListener removeContentAssistListener IContentAssistListener fListeners getNumberOfListeners fCloser fCloser fCloser uninstallVerifyKeyListener fContentAssistSubjectControlAdapter setEventConsumer releaseWidgetToken
Uninstall the key listener from the text viewer s widget since 3 0 private void uninstall Verify Key Listener if f Verify Key Listener Hooked if Helper ok To Use f Content Assist Subject Control Adapter get Control f Content Assist Subject Control Adapter remove Verify Key Listener f Internal Listener f Verify Key Listener Hooked false  uninstallVerifyKeyListener fVerifyKeyListenerHooked okToUse fContentAssistSubjectControlAdapter getControl fContentAssistSubjectControlAdapter removeVerifyKeyListener fInternalListener fVerifyKeyListenerHooked
Returns the number of listeners return the number of listeners since 2 0 private int get Number Of Listeners int count 0 for int i 0 i CONTEXT INFO POPUP i if f Listeners i null count return count  getNumberOfListeners CONTEXT_INFO_POPUP fListeners
public String show Possible Completions promote Key Listener if f Is Prefix Completion Enabled return f Proposal Popup incremental Complete else return f Proposal Popup show Proposals false  showPossibleCompletions promoteKeyListener fIsPrefixCompletionEnabled fProposalPopup incrementalComplete fProposalPopup showProposals
since 3 0 public String complete Prefix promote Key Listener return f Proposal Popup incremental Complete  completePrefix promoteKeyListener fProposalPopup incrementalComplete
Callback to signal this content assistant that the presentation of the possible completions has been stopped since 2 1 protected void possible Completions Closed store Completion Proposal Popup Size  possibleCompletionsClosed storeCompletionProposalPopupSize
public String show Context Information promote Key Listener if f Context Info Popup null return f Context Info Popup show Context Proposals false else return null  showContextInformation promoteKeyListener fContextInfoPopup fContextInfoPopup showContextProposals
Callback to signal this content assistant that the presentation of the context information has been stopped since 2 1 protected void context Information Closed  contextInformationClosed
Requests that the specified context information to be shown param context Information the context information to be shown param offset the offset to which the context information refers to since 2 0 void show Context Information I Context Information context Information int offset if f Context Info Popup null f Context Info Popup show Context Information context Information offset  contextInformation showContextInformation IContextInformation contextInformation fContextInfoPopup fContextInfoPopup showContextInformation contextInformation
Returns the current content assist error message return an error message or code null code if no error has occurred String get Error Message return f Last Error Message  getErrorMessage fLastErrorMessage
Returns the content assist processor for the content type of the specified document position param viewer the text viewer param offset a offset within the document return a content assist processor or code null code if none exists since 3 0 private I Content Assist Processor get Processor I Text Viewer viewer int offset try I Document document viewer get Document String type Text Utilities get Content Type document get Document Partitioning offset true return get Content Assist Processor type catch Bad Location Exception x return null  IContentAssistProcessor getProcessor ITextViewer IDocument getDocument TextUtilities getContentType getDocumentPartitioning getContentAssistProcessor BadLocationException
Returns the content assist processor for the content type of the specified document position param content Assist Subject Control the content assist subject control param offset a offset within the document return a content assist processor or code null code if none exists since 3 0 private I Content Assist Processor get Processor I Content Assist Subject Control content Assist Subject Control int offset try I Document document content Assist Subject Control get Document String type if document null type Text Utilities get Content Type document get Document Partitioning offset true else type I Document DEFAULT CONTENT TYPE return get Content Assist Processor type catch Bad Location Exception x return null  contentAssistSubjectControl IContentAssistProcessor getProcessor IContentAssistSubjectControl contentAssistSubjectControl IDocument contentAssistSubjectControl getDocument TextUtilities getContentType getDocumentPartitioning IDocument DEFAULT_CONTENT_TYPE getContentAssistProcessor BadLocationException
Returns an array of completion proposals computed based on the specified document position The position is used to determine the appropriate content assist processor to invoke param content Assist Subject Control the content assist subject control param offset a document offset return an array of completion proposals see I Content Assist Processor compute Completion Proposals I Text Viewer int since 3 0 I Completion Proposal compute Completion Proposals I Content Assist Subject Control content Assist Subject Control int offset f Last Error Message null I Completion Proposal result null I Content Assist Processor p get Processor content Assist Subject Control offset if p instanceof I Subject Control Content Assist Processor result I Subject Control Content Assist Processor p compute Completion Proposals content Assist Subject Control offset f Last Error Message p get Error Message return result  contentAssistSubjectControl IContentAssistProcessor computeCompletionProposals ITextViewer ICompletionProposal computeCompletionProposals IContentAssistSubjectControl contentAssistSubjectControl fLastErrorMessage ICompletionProposal IContentAssistProcessor getProcessor contentAssistSubjectControl ISubjectControlContentAssistProcessor ISubjectControlContentAssistProcessor computeCompletionProposals contentAssistSubjectControl fLastErrorMessage getErrorMessage
Returns an array of completion proposals computed based on the specified document position The position is used to determine the appropriate content assist processor to invoke param viewer the viewer for which to compute the proposals param offset a document offset return an array of completion proposals see I Content Assist Processor compute Completion Proposals I Text Viewer int I Completion Proposal compute Completion Proposals I Text Viewer viewer int offset f Last Error Message null I Completion Proposal result null I Content Assist Processor p get Processor viewer offset if p null result p compute Completion Proposals viewer offset f Last Error Message p get Error Message return result  IContentAssistProcessor computeCompletionProposals ITextViewer ICompletionProposal computeCompletionProposals ITextViewer fLastErrorMessage ICompletionProposal IContentAssistProcessor getProcessor computeCompletionProposals fLastErrorMessage getErrorMessage
Returns an array of context information objects computed based on the specified document position The position is used to determine the appropriate content assist processor to invoke param viewer the viewer for which to compute the context information param offset a document offset return an array of context information objects see I Content Assist Processor compute Context Information I Text Viewer int I Context Information compute Context Information I Text Viewer viewer int offset f Last Error Message null I Context Information result null I Content Assist Processor p get Processor viewer offset if p null result p compute Context Information viewer offset f Last Error Message p get Error Message return result  IContentAssistProcessor computeContextInformation ITextViewer IContextInformation computeContextInformation ITextViewer fLastErrorMessage IContextInformation IContentAssistProcessor getProcessor computeContextInformation fLastErrorMessage getErrorMessage
Returns an array of context information objects computed based on the specified document position The position is used to determine the appropriate content assist processor to invoke param content Assist Subject Control the content assist subject control param offset a document offset return an array of context information objects see I Content Assist Processor compute Context Information I Text Viewer int since 3 0 I Context Information compute Context Information I Content Assist Subject Control content Assist Subject Control int offset f Last Error Message null I Context Information result null I Content Assist Processor p get Processor content Assist Subject Control offset if p instanceof I Subject Control Content Assist Processor result I Subject Control Content Assist Processor p compute Context Information content Assist Subject Control offset f Last Error Message p get Error Message return result  contentAssistSubjectControl IContentAssistProcessor computeContextInformation ITextViewer IContextInformation computeContextInformation IContentAssistSubjectControl contentAssistSubjectControl fLastErrorMessage IContextInformation IContentAssistProcessor getProcessor contentAssistSubjectControl ISubjectControlContentAssistProcessor ISubjectControlContentAssistProcessor computeContextInformation contentAssistSubjectControl fLastErrorMessage getErrorMessage
Returns the context information validator that should be used to determine when the currently displayed context information should be dismissed The position is used to determine the appropriate content assist processor to invoke param viewer the text viewer param offset a document offset return an validator see I Content Assist Processor get Context Information Validator since 3 0 I Context Information Validator get Context Information Validator I Text Viewer viewer int offset I Content Assist Processor p get Processor viewer offset return p null p get Context Information Validator null  IContentAssistProcessor getContextInformationValidator IContextInformationValidator getContextInformationValidator ITextViewer IContentAssistProcessor getProcessor getContextInformationValidator
Returns the context information validator that should be used to determine when the currently displayed context information should be dismissed The position is used to determine the appropriate content assist processor to invoke param content Assist Subject Control the content assist subject control param offset a document offset return an validator see I Content Assist Processor get Context Information Validator since 3 0 I Context Information Validator get Context Information Validator I Content Assist Subject Control content Assist Subject Control int offset I Content Assist Processor p get Processor content Assist Subject Control offset return p null p get Context Information Validator null  contentAssistSubjectControl IContentAssistProcessor getContextInformationValidator IContextInformationValidator getContextInformationValidator IContentAssistSubjectControl contentAssistSubjectControl IContentAssistProcessor getProcessor contentAssistSubjectControl getContextInformationValidator
Returns the context information presenter that should be used to display context information The position is used to determine the appropriate content assist processor to invoke param viewer the text viewer param offset a document offset return a presenter since 2 0 I Context Information Presenter get Context Information Presenter I Text Viewer viewer int offset I Context Information Validator validator get Context Information Validator viewer offset if validator instanceof I Context Information Presenter return I Context Information Presenter validator return null  IContextInformationPresenter getContextInformationPresenter ITextViewer IContextInformationValidator getContextInformationValidator IContextInformationPresenter IContextInformationPresenter
Returns the context information presenter that should be used to display context information The position is used to determine the appropriate content assist processor to invoke param content Assist Subject Control the content assist subject control param offset a document offset return a presenter since 3 0 I Context Information Presenter get Context Information Presenter I Content Assist Subject Control content Assist Subject Control int offset I Context Information Validator validator get Context Information Validator content Assist Subject Control offset if validator instanceof I Context Information Presenter return I Context Information Presenter validator return null  contentAssistSubjectControl IContextInformationPresenter getContextInformationPresenter IContentAssistSubjectControl contentAssistSubjectControl IContextInformationValidator getContextInformationValidator contentAssistSubjectControl IContextInformationPresenter IContextInformationPresenter
Returns the characters which when typed by the user should automatically initiate proposing completions The position is used to determine the appropriate content assist processor to invoke param content Assist Subject Control the content assist subject control param offset a document offset return the auto activation characters see I Content Assist Processor get Completion Proposal Auto Activation Characters since 3 0 char get Completion Proposal Auto Activation Characters I Content Assist Subject Control content Assist Subject Control int offset I Content Assist Processor p get Processor content Assist Subject Control offset return p null p get Completion Proposal Auto Activation Characters null  contentAssistSubjectControl IContentAssistProcessor getCompletionProposalAutoActivationCharacters getCompletionProposalAutoActivationCharacters IContentAssistSubjectControl contentAssistSubjectControl IContentAssistProcessor getProcessor contentAssistSubjectControl getCompletionProposalAutoActivationCharacters
Returns the characters which when typed by the user should automatically initiate proposing completions The position is used to determine the appropriate content assist processor to invoke param viewer the text viewer param offset a document offset return the auto activation characters see I Content Assist Processor get Completion Proposal Auto Activation Characters char get Completion Proposal Auto Activation Characters I Text Viewer viewer int offset I Content Assist Processor p get Processor viewer offset return p null p get Completion Proposal Auto Activation Characters null  IContentAssistProcessor getCompletionProposalAutoActivationCharacters getCompletionProposalAutoActivationCharacters ITextViewer IContentAssistProcessor getProcessor getCompletionProposalAutoActivationCharacters
Returns the characters which when typed by the user should automatically initiate the presentation of context information The position is used to determine the appropriate content assist processor to invoke param viewer the text viewer param offset a document offset return the auto activation characters see I Content Assist Processor get Context Information Auto Activation Characters since 3 0 char get Context Information Auto Activation Characters I Text Viewer viewer int offset I Content Assist Processor p get Processor viewer offset return p null p get Context Information Auto Activation Characters null  IContentAssistProcessor getContextInformationAutoActivationCharacters getContextInformationAutoActivationCharacters ITextViewer IContentAssistProcessor getProcessor getContextInformationAutoActivationCharacters
Returns the characters which when typed by the user should automatically initiate the presentation of context information The position is used to determine the appropriate content assist processor to invoke param content Assist Subject Control the content assist subject control param offset a document offset return the auto activation characters see I Content Assist Processor get Context Information Auto Activation Characters since 3 0 char get Context Information Auto Activation Characters I Content Assist Subject Control content Assist Subject Control int offset I Content Assist Processor p get Processor content Assist Subject Control offset return p null p get Context Information Auto Activation Characters null  contentAssistSubjectControl IContentAssistProcessor getContextInformationAutoActivationCharacters getContextInformationAutoActivationCharacters IContentAssistSubjectControl contentAssistSubjectControl IContentAssistProcessor getProcessor contentAssistSubjectControl getContextInformationAutoActivationCharacters
since 2 0 public boolean request Widget Token I Widget Token Owner owner return false  requestWidgetToken IWidgetTokenOwner
public boolean request Widget Token I Widget Token Owner owner int priority if priority WIDGET PRIORITY hide return true else return false  requestWidgetToken IWidgetTokenOwner WIDGET_PRIORITY
public boolean set Focus I Widget Token Owner owner if f Proposal Popup null f Proposal Popup set Focus return f Proposal Popup has Focus return false  setFocus IWidgetTokenOwner fProposalPopup fProposalPopup setFocus fProposalPopup hasFocus
Hides any open pop ups since 3 0 protected void hide if f Proposal Popup null f Proposal Popup hide if f Context Info Popup null f Context Info Popup hide  fProposalPopup fProposalPopup fContextInfoPopup fContextInfoPopup
Tells this information control manager to open the information control with the values contained in the given dialog settings and to store the control s last valid size in the given dialog settings p Note This API is only valid if the information control implements link org eclipse jface text I Information Control Extension3 Not following this restriction will later result in an link Unsupported Operation Exception p p The constants used to store the values are ul li link Content Assistant STORE SIZE X li li link Content Assistant STORE SIZE Y li ul p param dialog Settings since 3 0 public void set Restore Completion Proposal Size I Dialog Settings dialog Settings Assert is True dialog Settings null f Dialog Settings dialog Settings  IInformationControlExtension3 UnsupportedOperationException ContentAssistant STORE_SIZE_X ContentAssistant STORE_SIZE_Y dialogSettings setRestoreCompletionProposalSize IDialogSettings dialogSettings isTrue dialogSettings fDialogSettings dialogSettings
Stores the content assist pop up s size protected void store Completion Proposal Popup Size if f Dialog Settings null f Proposal Popup null return Point size f Proposal Popup get Size if size null return f Dialog Settings put STORE SIZE X size x f Dialog Settings put STORE SIZE Y size y  storeCompletionProposalPopupSize fDialogSettings fProposalPopup fProposalPopup getSize fDialogSettings STORE_SIZE_X fDialogSettings STORE_SIZE_Y
Restores the content assist pop up s size return the stored size since 3 0 protected Point restore Completion Proposal Popup Size if f Dialog Settings null return null Point size new Point 1 1 try size x f Dialog Settings get Int STORE SIZE X size y f Dialog Settings get Int STORE SIZE Y catch Number Format Exception ex size x 1 size y 1 sanity check if size x 1 size y 1 return null Rectangle max Bounds null if f Content Assist Subject Control null f Content Assist Subject Control get Control is Disposed max Bounds f Content Assist Subject Control get Control get Display get Bounds else fallback Display display Display get Current if display null display Display get Default if display null display is Disposed max Bounds display get Bounds if size x 1 size y 1 if max Bounds null size x Math min size x max Bounds width size y Math min size y max Bounds height Enforce an absolute minimal size size x Math max size x 30 size y Math max size y 30 return size  restoreCompletionProposalPopupSize fDialogSettings fDialogSettings getInt STORE_SIZE_X fDialogSettings getInt STORE_SIZE_Y NumberFormatException maxBounds fContentAssistSubjectControl fContentAssistSubjectControl getControl isDisposed maxBounds fContentAssistSubjectControl getControl getDisplay getBounds getCurrent getDefault isDisposed maxBounds getBounds maxBounds maxBounds maxBounds
Sets the prefix completion property If enabled content assist delegates completion to prefix completion param enabled code true code to enable prefix completion code false code to disable public void enable Prefix Completion boolean enabled f Is Prefix Completion Enabled enabled  enablePrefixCompletion fIsPrefixCompletionEnabled
Returns whether the content assistant proposal popup has the focus return code true code if the proposal popup has the focus since 3 0 public boolean has Proposal Popup Focus return f Proposal Popup has Focus  hasProposalPopupFocus fProposalPopup hasFocus

Creates an adapter for the given content assist subject control param content Assist Subject Control the content assist subject control Content Assist Subject Control Adapter I Content Assist Subject Control content Assist Subject Control Assert is Not Null content Assist Subject Control f Content Assist Subject Control content Assist Subject Control  contentAssistSubjectControl ContentAssistSubjectControlAdapter IContentAssistSubjectControl contentAssistSubjectControl isNotNull contentAssistSubjectControl fContentAssistSubjectControl contentAssistSubjectControl
Creates an adapter for the given text viewer param viewer the text viewer public Content Assist Subject Control Adapter I Text Viewer viewer Assert is Not Null viewer f Viewer viewer  ContentAssistSubjectControlAdapter ITextViewer isNotNull fViewer
public int get Line Height if f Content Assist Subject Control null return f Content Assist Subject Control get Line Height else return f Viewer get Text Widget get Line Height  getLineHeight fContentAssistSubjectControl fContentAssistSubjectControl getLineHeight fViewer getTextWidget getLineHeight
public Control get Control if f Content Assist Subject Control null return f Content Assist Subject Control get Control else return f Viewer get Text Widget  getControl fContentAssistSubjectControl fContentAssistSubjectControl getControl fViewer getTextWidget
public Point get Location At Offset int offset if f Content Assist Subject Control null return f Content Assist Subject Control get Location At Offset offset else return f Viewer get Text Widget get Location At Offset offset  getLocationAtOffset fContentAssistSubjectControl fContentAssistSubjectControl getLocationAtOffset fViewer getTextWidget getLocationAtOffset
public Point get Widget Selection Range if f Content Assist Subject Control null return f Content Assist Subject Control get Widget Selection Range else return f Viewer get Text Widget get Selection Range  getWidgetSelectionRange fContentAssistSubjectControl fContentAssistSubjectControl getWidgetSelectionRange fViewer getTextWidget getSelectionRange
public Point get Selected Range if f Content Assist Subject Control null return f Content Assist Subject Control get Selected Range else return f Viewer get Selected Range  getSelectedRange fContentAssistSubjectControl fContentAssistSubjectControl getSelectedRange fViewer getSelectedRange
public int get Caret Offset if f Content Assist Subject Control null return f Content Assist Subject Control get Caret Offset else return f Viewer get Text Widget get Caret Offset  getCaretOffset fContentAssistSubjectControl fContentAssistSubjectControl getCaretOffset fViewer getTextWidget getCaretOffset
public String get Line Delimiter if f Content Assist Subject Control null return f Content Assist Subject Control get Line Delimiter else return f Viewer get Text Widget get Line Delimiter  getLineDelimiter fContentAssistSubjectControl fContentAssistSubjectControl getLineDelimiter fViewer getTextWidget getLineDelimiter
public void add Key Listener Key Listener key Listener if f Content Assist Subject Control null f Content Assist Subject Control add Key Listener key Listener else f Viewer get Text Widget add Key Listener key Listener  addKeyListener KeyListener keyListener fContentAssistSubjectControl fContentAssistSubjectControl addKeyListener keyListener fViewer getTextWidget addKeyListener keyListener
public void remove Key Listener Key Listener key Listener if f Content Assist Subject Control null f Content Assist Subject Control remove Key Listener key Listener else f Viewer get Text Widget remove Key Listener key Listener  removeKeyListener KeyListener keyListener fContentAssistSubjectControl fContentAssistSubjectControl removeKeyListener keyListener fViewer getTextWidget removeKeyListener keyListener
public I Document get Document if f Content Assist Subject Control null return f Content Assist Subject Control get Document else return f Viewer get Document  IDocument getDocument fContentAssistSubjectControl fContentAssistSubjectControl getDocument fViewer getDocument
public boolean prepend Verify Key Listener Verify Key Listener verify Key Listener if f Content Assist Subject Control null return f Content Assist Subject Control prepend Verify Key Listener verify Key Listener else if f Viewer instanceof I Text Viewer Extension I Text Viewer Extension e I Text Viewer Extension f Viewer e prepend Verify Key Listener verify Key Listener return true else Styled Text text Widget f Viewer get Text Widget if Helper ok To Use text Widget text Widget add Verify Key Listener verify Key Listener return true return false  prependVerifyKeyListener VerifyKeyListener verifyKeyListener fContentAssistSubjectControl fContentAssistSubjectControl prependVerifyKeyListener verifyKeyListener fViewer ITextViewerExtension ITextViewerExtension ITextViewerExtension fViewer prependVerifyKeyListener verifyKeyListener StyledText textWidget fViewer getTextWidget okToUse textWidget textWidget addVerifyKeyListener verifyKeyListener
public boolean append Verify Key Listener Verify Key Listener verify Key Listener if f Content Assist Subject Control null return f Content Assist Subject Control append Verify Key Listener verify Key Listener else if f Viewer instanceof I Text Viewer Extension I Text Viewer Extension extension I Text Viewer Extension f Viewer extension append Verify Key Listener verify Key Listener return true else Styled Text text Widget f Viewer get Text Widget if Helper ok To Use text Widget text Widget add Verify Key Listener verify Key Listener return true return false  appendVerifyKeyListener VerifyKeyListener verifyKeyListener fContentAssistSubjectControl fContentAssistSubjectControl appendVerifyKeyListener verifyKeyListener fViewer ITextViewerExtension ITextViewerExtension ITextViewerExtension fViewer appendVerifyKeyListener verifyKeyListener StyledText textWidget fViewer getTextWidget okToUse textWidget textWidget addVerifyKeyListener verifyKeyListener
public void remove Verify Key Listener Verify Key Listener verify Key Listener if f Content Assist Subject Control null f Content Assist Subject Control remove Verify Key Listener verify Key Listener else if f Viewer instanceof I Text Viewer Extension I Text Viewer Extension extension I Text Viewer Extension f Viewer extension remove Verify Key Listener verify Key Listener else Styled Text text Widget f Viewer get Text Widget if Helper ok To Use text Widget text Widget remove Verify Key Listener verify Key Listener  removeVerifyKeyListener VerifyKeyListener verifyKeyListener fContentAssistSubjectControl fContentAssistSubjectControl removeVerifyKeyListener verifyKeyListener fViewer ITextViewerExtension ITextViewerExtension ITextViewerExtension fViewer removeVerifyKeyListener verifyKeyListener StyledText textWidget fViewer getTextWidget okToUse textWidget textWidget removeVerifyKeyListener verifyKeyListener
public void set Event Consumer I Event Consumer event Consumer if f Content Assist Subject Control null f Content Assist Subject Control set Event Consumer event Consumer else f Viewer set Event Consumer event Consumer  setEventConsumer IEventConsumer eventConsumer fContentAssistSubjectControl fContentAssistSubjectControl setEventConsumer eventConsumer fViewer setEventConsumer eventConsumer
public void set Selected Range int i int j if f Content Assist Subject Control null f Content Assist Subject Control set Selected Range i j else f Viewer set Selected Range i j  setSelectedRange fContentAssistSubjectControl fContentAssistSubjectControl setSelectedRange fViewer setSelectedRange
public void reveal Range int i int j if f Content Assist Subject Control null f Content Assist Subject Control reveal Range i j else f Viewer reveal Range i j  revealRange fContentAssistSubjectControl fContentAssistSubjectControl revealRange fViewer revealRange
public boolean supports Verify Key Listener if f Content Assist Subject Control null return f Content Assist Subject Control supports Verify Key Listener else return true  supportsVerifyKeyListener fContentAssistSubjectControl fContentAssistSubjectControl supportsVerifyKeyListener
Returns the characters which when typed by the user should automatically initiate proposing completions The position is used to determine the appropriate content assist processor to invoke param content Assistant the content assistant param offset a document offset return the auto activation characters see I Content Assist Processor get Completion Proposal Auto Activation Characters public char get Completion Proposal Auto Activation Characters Content Assistant content Assistant int offset if f Content Assist Subject Control null return content Assistant get Completion Proposal Auto Activation Characters f Content Assist Subject Control offset else return content Assistant get Completion Proposal Auto Activation Characters f Viewer offset  contentAssistant IContentAssistProcessor getCompletionProposalAutoActivationCharacters getCompletionProposalAutoActivationCharacters ContentAssistant contentAssistant fContentAssistSubjectControl contentAssistant getCompletionProposalAutoActivationCharacters fContentAssistSubjectControl contentAssistant getCompletionProposalAutoActivationCharacters fViewer
Returns the characters which when typed by the user should automatically initiate the presentation of context information The position is used to determine the appropriate content assist processor to invoke param content Assistant the content assistant param offset a document offset return the auto activation characters see I Content Assist Processor get Context Information Auto Activation Characters char get Context Information Auto Activation Characters Content Assistant content Assistant int offset if f Content Assist Subject Control null return content Assistant get Context Information Auto Activation Characters f Content Assist Subject Control offset else return content Assistant get Context Information Auto Activation Characters f Viewer offset  contentAssistant IContentAssistProcessor getContextInformationAutoActivationCharacters getContextInformationAutoActivationCharacters ContentAssistant contentAssistant fContentAssistSubjectControl contentAssistant getContextInformationAutoActivationCharacters fContentAssistSubjectControl contentAssistant getContextInformationAutoActivationCharacters fViewer
Creates and returns a completion proposal popup for the given content assistant param content Assistant the content assistant param controller the additional info controller return the completion proposal popup Completion Proposal Popup create Completion Proposal Popup Content Assistant content Assistant Additional Info Controller controller if f Content Assist Subject Control null return new Completion Proposal Popup content Assistant f Content Assist Subject Control controller else return new Completion Proposal Popup content Assistant f Viewer controller  contentAssistant CompletionProposalPopup createCompletionProposalPopup ContentAssistant contentAssistant AdditionalInfoController fContentAssistSubjectControl CompletionProposalPopup contentAssistant fContentAssistSubjectControl CompletionProposalPopup contentAssistant fViewer
Creates and returns a context info popup for the given content assistant param content Assistant the content assistant return the context info popup or code null code Context Information Popup create Context Info Popup Content Assistant content Assistant if f Content Assist Subject Control null return new Context Information Popup content Assistant f Content Assist Subject Control else return new Context Information Popup content Assistant f Viewer  contentAssistant ContextInformationPopup createContextInfoPopup ContentAssistant contentAssistant fContentAssistSubjectControl ContextInformationPopup contentAssistant fContentAssistSubjectControl ContextInformationPopup contentAssistant fViewer
Returns the context information validator that should be used to determine when the currently displayed context information should be dismissed The position is used to determine the appropriate content assist processor to invoke param content Assistant the content assistant param offset a document offset return an validator public I Context Information Validator get Context Information Validator Content Assistant content Assistant int offset if f Content Assist Subject Control null return content Assistant get Context Information Validator f Content Assist Subject Control offset else return content Assistant get Context Information Validator f Viewer offset  contentAssistant IContextInformationValidator getContextInformationValidator ContentAssistant contentAssistant fContentAssistSubjectControl contentAssistant getContextInformationValidator fContentAssistSubjectControl contentAssistant getContextInformationValidator fViewer
Returns the context information presenter that should be used to display context information The position is used to determine the appropriate content assist processor to invoke param content Assistant the content assistant param offset a document offset return a presenter public I Context Information Presenter get Context Information Presenter Content Assistant content Assistant int offset if f Content Assist Subject Control null return content Assistant get Context Information Presenter f Content Assist Subject Control offset else return content Assistant get Context Information Presenter f Viewer offset  contentAssistant IContextInformationPresenter getContextInformationPresenter ContentAssistant contentAssistant fContentAssistSubjectControl contentAssistant getContextInformationPresenter fContentAssistSubjectControl contentAssistant getContextInformationPresenter fViewer
Installs this adapter s information validator on the given context frame param frame the context frame public void install Validator Context Frame frame if f Content Assist Subject Control null if frame f Validator instanceof I Subject Control Context Information Validator I Subject Control Context Information Validator frame f Validator install frame f Information f Content Assist Subject Control frame f Offset else frame f Validator install frame f Information f Viewer frame f Offset  installValidator ContextFrame fContentAssistSubjectControl fValidator ISubjectControlContextInformationValidator ISubjectControlContextInformationValidator fValidator fInformation fContentAssistSubjectControl fOffset fValidator fInformation fViewer fOffset
Installs this adapter s information presenter on the given context frame param frame the context frame public void install Context Information Presenter Context Frame frame if f Content Assist Subject Control null if frame f Presenter instanceof I Subject Control Context Information Presenter I Subject Control Context Information Presenter frame f Validator install frame f Information f Content Assist Subject Control frame f Begin Offset else frame f Presenter install frame f Information f Viewer frame f Begin Offset  installContextInformationPresenter ContextFrame fContentAssistSubjectControl fPresenter ISubjectControlContextInformationPresenter ISubjectControlContextInformationPresenter fValidator fInformation fContentAssistSubjectControl fBeginOffset fPresenter fInformation fViewer fBeginOffset
Returns an array of context information objects computed based on the specified document position The position is used to determine the appropriate content assist processor to invoke param content Assistant the content assistant param offset a document offset return an array of context information objects see I Content Assist Processor compute Context Information I Text Viewer int public I Context Information compute Context Information Content Assistant content Assistant int offset if f Content Assist Subject Control null return content Assistant compute Context Information f Content Assist Subject Control offset else return content Assistant compute Context Information f Viewer offset  contentAssistant IContentAssistProcessor computeContextInformation ITextViewer IContextInformation computeContextInformation ContentAssistant contentAssistant fContentAssistSubjectControl contentAssistant computeContextInformation fContentAssistSubjectControl contentAssistant computeContextInformation fViewer
public boolean add Selection Listener Selection Listener selection Listener if f Content Assist Subject Control null return f Content Assist Subject Control add Selection Listener selection Listener else f Viewer get Text Widget add Selection Listener selection Listener return true  addSelectionListener SelectionListener selectionListener fContentAssistSubjectControl fContentAssistSubjectControl addSelectionListener selectionListener fViewer getTextWidget addSelectionListener selectionListener
public void remove Selection Listener Selection Listener selection Listener if f Content Assist Subject Control null f Content Assist Subject Control remove Selection Listener selection Listener else f Viewer get Text Widget remove Selection Listener selection Listener  removeSelectionListener SelectionListener selectionListener fContentAssistSubjectControl fContentAssistSubjectControl removeSelectionListener selectionListener fViewer getTextWidget removeSelectionListener selectionListener

Creates a new context information without an image param context Display String the string to be used when presenting the context param information Display String the string to be displayed when presenting the context information public Context Information String context Display String String information Display String this null context Display String information Display String  contextDisplayString informationDisplayString ContextInformation contextDisplayString informationDisplayString contextDisplayString informationDisplayString
Creates a new context information with an image param image the image to display when presenting the context information param context Display String the string to be used when presenting the context param information Display String the string to be displayed when presenting the context information may not be code null code public Context Information Image image String context Display String String information Display String Assert is Not Null information Display String f Image image f Context Display String context Display String f Information Display String information Display String  contextDisplayString informationDisplayString ContextInformation contextDisplayString informationDisplayString isNotNull informationDisplayString fImage fContextDisplayString contextDisplayString fInformationDisplayString informationDisplayString
public boolean equals Object object if object instanceof I Context Information I Context Information context Information I Context Information object boolean equals f Information Display String equals Ignore Case context Information get Information Display String if f Context Display String null equals equals f Context Display String equals Ignore Case context Information get Context Display String return equals return false  IContextInformation IContextInformation contextInformation IContextInformation fInformationDisplayString equalsIgnoreCase contextInformation getInformationDisplayString fContextDisplayString fContextDisplayString equalsIgnoreCase contextInformation getContextDisplayString
see I Context Information get Information Display String public String get Information Display String return f Information Display String  IContextInformation getInformationDisplayString getInformationDisplayString fInformationDisplayString
see I Context Information get Image public Image get Image return f Image  IContextInformation getImage getImage fImage
public String get Context Display String if f Context Display String null return f Context Display String return f Information Display String  getContextDisplayString fContextDisplayString fContextDisplayString fInformationDisplayString

public boolean equals Object obj if obj instanceof Context Frame Context Frame frame Context Frame obj return f Information equals frame f Information f Begin Offset frame f Begin Offset return super equals obj  ContextFrame ContextFrame ContextFrame fInformation fInformation fBeginOffset fBeginOffset
Creates a new context information popup param content Assistant the content assist for computing the context information param viewer the viewer on top of which the context information is shown public Context Information Popup Content Assistant content Assistant I Text Viewer viewer f Content Assistant content Assistant f Viewer viewer f Content Assist Subject Control Adapter new Content Assist Subject Control Adapter f Viewer  contentAssistant ContextInformationPopup ContentAssistant contentAssistant ITextViewer fContentAssistant contentAssistant fViewer fContentAssistSubjectControlAdapter ContentAssistSubjectControlAdapter fViewer
Creates a new context information popup param content Assistant the content assist for computing the context information param content Assist Subject Control the content assist subject control on top of which the context information is shown since 3 0 public Context Information Popup Content Assistant content Assistant I Content Assist Subject Control content Assist Subject Control f Content Assistant content Assistant f Content Assist Subject Control content Assist Subject Control f Content Assist Subject Control Adapter new Content Assist Subject Control Adapter f Content Assist Subject Control  contentAssistant contentAssistSubjectControl ContextInformationPopup ContentAssistant contentAssistant IContentAssistSubjectControl contentAssistSubjectControl fContentAssistant contentAssistant fContentAssistSubjectControl contentAssistSubjectControl fContentAssistSubjectControlAdapter ContentAssistSubjectControlAdapter fContentAssistSubjectControl
Busy Indicator show While control get Display new Runnable public void run int offset f Content Assist Subject Control Adapter get Selected Range x I Context Information contexts compute Context Information offset int count contexts null 0 contexts length if count 1 Context Frame frame create Context Frame contexts 0 offset if is Duplicate frame validate Context Information else Show context information directly internal Show Context Info frame else if count 0 if any of the proposed context matches the any of the contexts on the stack assume that one so if context info is invoked repeatedly the current info is kept for int i 0 i contexts length i I Context Information info contexts i Context Frame frame create Context Frame info offset check top of stack and stored context if is Duplicate frame validate Context Information return if is Last Frame frame internal Show Context Info frame return also check all other contexts for Iterator it f Context Frame Stack iterator it has Next Context Frame stack Frame Context Frame it next if stack Frame equals frame validate Context Information return otherwise Precise context must be selected if f Line Delimiter null f Line Delimiter f Content Assist Subject Control Adapter get Line Delimiter create Context Selector set Contexts contexts display Context Selector hide Context Info Popup else if auto Activated control get Display beep  BusyIndicator showWhile getDisplay fContentAssistSubjectControlAdapter getSelectedRange IContextInformation computeContextInformation ContextFrame createContextFrame isDuplicate validateContextInformation internalShowContextInfo IContextInformation ContextFrame createContextFrame isDuplicate validateContextInformation isLastFrame internalShowContextInfo fContextFrameStack hasNext ContextFrame stackFrame ContextFrame stackFrame validateContextInformation fLineDelimiter fLineDelimiter fContentAssistSubjectControlAdapter getLineDelimiter createContextSelector setContexts displayContextSelector hideContextInfoPopup autoActivated getDisplay
Shows all possible contexts for the given cursor position of the viewer param auto Activated code true code if auto activated return a potential error message or code null code in case of no error public String show Context Proposals final boolean auto Activated final Control control f Content Assist Subject Control Adapter get Control Busy Indicator show While control get Display new Runnable public void run int offset f Content Assist Subject Control Adapter get Selected Range x I Context Information contexts compute Context Information offset int count contexts null 0 contexts length if count 1 Context Frame frame create Context Frame contexts 0 offset if is Duplicate frame validate Context Information else Show context information directly internal Show Context Info frame else if count 0 if any of the proposed context matches the any of the contexts on the stack assume that one so if context info is invoked repeatedly the current info is kept for int i 0 i contexts length i I Context Information info contexts i Context Frame frame create Context Frame info offset check top of stack and stored context if is Duplicate frame validate Context Information return if is Last Frame frame internal Show Context Info frame return also check all other contexts for Iterator it f Context Frame Stack iterator it has Next Context Frame stack Frame Context Frame it next if stack Frame equals frame validate Context Information return otherwise Precise context must be selected if f Line Delimiter null f Line Delimiter f Content Assist Subject Control Adapter get Line Delimiter create Context Selector set Contexts contexts display Context Selector hide Context Info Popup else if auto Activated control get Display beep return get Error Message  autoActivated showContextProposals autoActivated fContentAssistSubjectControlAdapter getControl BusyIndicator showWhile getDisplay fContentAssistSubjectControlAdapter getSelectedRange IContextInformation computeContextInformation ContextFrame createContextFrame isDuplicate validateContextInformation internalShowContextInfo IContextInformation ContextFrame createContextFrame isDuplicate validateContextInformation isLastFrame internalShowContextInfo fContextFrameStack hasNext ContextFrame stackFrame ContextFrame stackFrame validateContextInformation fLineDelimiter fLineDelimiter fContentAssistSubjectControlAdapter getLineDelimiter createContextSelector setContexts displayContextSelector hideContextInfoPopup autoActivated getDisplay getErrorMessage
Busy Indicator show While control get Display new Runnable public void run if info null validate Context Information else Context Frame frame create Context Frame info offset if is Duplicate frame validate Context Information else internal Show Context Info frame hide Context Selector  BusyIndicator showWhile getDisplay validateContextInformation ContextFrame createContextFrame isDuplicate validateContextInformation internalShowContextInfo hideContextSelector
Displays the given context information for the given offset param info the context information param offset the offset since 2 0 public void show Context Information final I Context Information info final int offset Control control f Content Assist Subject Control Adapter get Control Busy Indicator show While control get Display new Runnable public void run if info null validate Context Information else Context Frame frame create Context Frame info offset if is Duplicate frame validate Context Information else internal Show Context Info frame hide Context Selector  showContextInformation IContextInformation fContentAssistSubjectControlAdapter getControl BusyIndicator showWhile getDisplay validateContextInformation ContextFrame createContextFrame isDuplicate validateContextInformation internalShowContextInfo hideContextSelector
Displays the given context information for the given offset param frame the context frame to display or code null code since 3 0 private void internal Show Context Info Context Frame frame if frame null f Context Frame Stack push frame if f Context Frame Stack size 1 f Last Context null internal Show Context Frame frame f Context Frame Stack size 1 validate Context Information  internalShowContextInfo ContextFrame fContextFrameStack fContextFrameStack fLastContext internalShowContextFrame fContextFrameStack validateContextInformation
Creates a context frame for the given offset param information the context information param offset the offset return the created context frame since 3 0 private Context Frame create Context Frame I Context Information information int offset I Context Information Validator validator f Content Assist Subject Control Adapter get Context Information Validator f Content Assistant offset if validator null Context Frame current new Context Frame current f Information information current f Begin Offset information instanceof I Context Information Extension I Context Information Extension information get Context Information Position offset if current f Begin Offset 1 current f Begin Offset offset current f Offset offset current f Visible Offset f Content Assist Subject Control Adapter get Widget Selection Range x offset current f Begin Offset current f Validator validator current f Presenter f Content Assist Subject Control Adapter get Context Information Presenter f Content Assistant offset return current return null  ContextFrame createContextFrame IContextInformation IContextInformationValidator fContentAssistSubjectControlAdapter getContextInformationValidator fContentAssistant ContextFrame ContextFrame fInformation fBeginOffset IContextInformationExtension IContextInformationExtension getContextInformationPosition fBeginOffset fBeginOffset fOffset fVisibleOffset fContentAssistSubjectControlAdapter getWidgetSelectionRange fBeginOffset fValidator fPresenter fContentAssistSubjectControlAdapter getContextInformationPresenter fContentAssistant
Compares code frame code with the top of the stack returns code true code if the frames are the same param frame the frame to check return code true code if code frame code matches the top of the stack since 3 0 private boolean is Duplicate Context Frame frame if frame null return false if f Context Frame Stack is Empty return false stack not empty Context Frame top Context Frame f Context Frame Stack peek return frame equals top  isDuplicate ContextFrame fContextFrameStack isEmpty ContextFrame ContextFrame fContextFrameStack
Compares code frame code with most recently removed context frame returns code true code if the frames are the same param frame the frame to check return code true code if code frame code matches the most recently removed since 3 0 private boolean is Last Frame Context Frame frame return frame null frame equals f Last Context  isLastFrame ContextFrame fLastContext
see org eclipse swt events Selection Adapter widget Selected org eclipse swt events Selection Event public void widget Selected Selection Event e validate Context Information  SelectionAdapter widgetSelected SelectionEvent widgetSelected SelectionEvent validateContextInformation
Shows the given context frame param frame the frame to display param initial code true code if this is the first frame to be displayed since 2 0 private void internal Show Context Frame Context Frame frame boolean initial f Content Assist Subject Control Adapter install Validator frame if frame f Presenter null if f Text Presentation null f Text Presentation new Text Presentation f Content Assist Subject Control Adapter install Context Information Presenter frame frame f Presenter update Presentation frame f Offset f Text Presentation create Context Info Popup f Context Info Text set Text frame f Information get Information Display String if f Text Presentation null Text Presentation apply Text Presentation f Text Presentation f Context Info Text resize if initial if f Content Assistant add Content Assist Listener this Content Assistant CONTEXT INFO POPUP if f Content Assist Subject Control Adapter get Control null f Text Widget Selection Listener new Selection Adapter see org eclipse swt events Selection Adapter widget Selected org eclipse swt events Selection Event public void widget Selected Selection Event e validate Context Information f Content Assist Subject Control Adapter add Selection Listener f Text Widget Selection Listener f Content Assistant add To Layout this f Context Info Popup Content Assistant Layout Manager LAYOUT CONTEXT INFO POPUP frame f Visible Offset f Context Info Popup set Visible true else f Content Assistant layout Content Assistant Layout Manager LAYOUT CONTEXT INFO POPUP frame f Visible Offset  internalShowContextFrame ContextFrame fContentAssistSubjectControlAdapter installValidator fPresenter fTextPresentation fTextPresentation TextPresentation fContentAssistSubjectControlAdapter installContextInformationPresenter fPresenter updatePresentation fOffset fTextPresentation createContextInfoPopup fContextInfoText setText fInformation getInformationDisplayString fTextPresentation TextPresentation applyTextPresentation fTextPresentation fContextInfoText fContentAssistant addContentAssistListener ContentAssistant CONTEXT_INFO_POPUP fContentAssistSubjectControlAdapter getControl fTextWidgetSelectionListener SelectionAdapter SelectionAdapter widgetSelected SelectionEvent widgetSelected SelectionEvent validateContextInformation fContentAssistSubjectControlAdapter addSelectionListener fTextWidgetSelectionListener fContentAssistant addToLayout fContextInfoPopup ContentAssistant LayoutManager LAYOUT_CONTEXT_INFO_POPUP fVisibleOffset fContextInfoPopup setVisible fContentAssistant ContentAssistant LayoutManager LAYOUT_CONTEXT_INFO_POPUP fVisibleOffset
Computes all possible context information for the given offset param offset the offset return all possible context information for the given offset since 2 0 private I Context Information compute Context Information int offset return f Content Assist Subject Control Adapter compute Context Information f Content Assistant offset  IContextInformation computeContextInformation fContentAssistSubjectControlAdapter computeContextInformation fContentAssistant
Returns the error message generated while computing context information return the error message private String get Error Message return f Content Assistant get Error Message  getErrorMessage fContentAssistant getErrorMessage
Creates the context information popup This is the tool tip like overlay window private void create Context Info Popup if Helper ok To Use f Context Info Popup return Control control f Content Assist Subject Control Adapter get Control Display display control get Display f Context Info Popup new Shell control get Shell SWT NO TRIM SWT ON TOP f Context Info Popup set Background display get System Color SWT COLOR BLACK f Context Info Text new Styled Text f Context Info Popup SWT MULTI SWT READ ONLY Color c f Content Assistant get Context Information Popup Background if c null c display get System Color SWT COLOR INFO BACKGROUND f Context Info Text set Background c c f Content Assistant get Context Information Popup Foreground if c null c display get System Color SWT COLOR INFO FOREGROUND f Context Info Text set Foreground c  createContextInfoPopup okToUse fContextInfoPopup fContentAssistSubjectControlAdapter getControl getDisplay fContextInfoPopup getShell NO_TRIM ON_TOP fContextInfoPopup setBackground getSystemColor COLOR_BLACK fContextInfoText StyledText fContextInfoPopup READ_ONLY fContentAssistant getContextInformationPopupBackground getSystemColor COLOR_INFO_BACKGROUND fContextInfoText setBackground fContentAssistant getContextInformationPopupForeground getSystemColor COLOR_INFO_FOREGROUND fContextInfoText setForeground
Resizes the context information popup since 2 0 private void resize Point size f Context Info Text compute Size SWT DEFAULT SWT DEFAULT true size x 3 f Context Info Text set Size size f Context Info Text set Location 1 1 size x 2 size y 2 f Context Info Popup set Size size  fContextInfoText computeSize fContextInfoText setSize fContextInfoText setLocation fContextInfoPopup setSize
Hides the context information popup private void hide Context Info Popup if Helper ok To Use f Context Info Popup int size f Context Frame Stack size if size 0 f Last Context Context Frame f Context Frame Stack pop size if size 0 Context Frame current Context Frame f Context Frame Stack peek internal Show Context Frame current false else f Content Assistant remove Content Assist Listener this Content Assistant CONTEXT INFO POPUP if f Content Assist Subject Control Adapter get Control null f Content Assist Subject Control Adapter remove Selection Listener f Text Widget Selection Listener f Text Widget Selection Listener null f Context Info Popup set Visible false f Context Info Popup dispose f Context Info Popup null if f Text Presentation null f Text Presentation clear f Text Presentation null if f Context Info Popup null f Content Assistant context Information Closed  hideContextInfoPopup okToUse fContextInfoPopup fContextFrameStack fLastContext ContextFrame fContextFrameStack ContextFrame ContextFrame fContextFrameStack internalShowContextFrame fContentAssistant removeContentAssistListener ContentAssistant CONTEXT_INFO_POPUP fContentAssistSubjectControlAdapter getControl fContentAssistSubjectControlAdapter removeSelectionListener fTextWidgetSelectionListener fTextWidgetSelectionListener fContextInfoPopup setVisible fContextInfoPopup fContextInfoPopup fTextPresentation fTextPresentation fTextPresentation fContextInfoPopup fContentAssistant contextInformationClosed
f Context Selector Table add Selection Listener new Selection Listener public void widget Selected Selection Event e  fContextSelectorTable addSelectionListener SelectionListener widgetSelected SelectionEvent
public void widget Default Selected Selection Event e insert Selected Context hide Context Selector  widgetDefaultSelected SelectionEvent insertSelectedContext hideContextSelector
Creates the context selector in case the user has the choice between multiple valid contexts at a given offset private void create Context Selector if Helper ok To Use f Context Selector Shell return Control control f Content Assist Subject Control Adapter get Control f Context Selector Shell new Shell control get Shell SWT ON TOP SWT RESIZE f Context Selector Table new Table f Context Selector Shell SWT H SCROLL SWT V SCROLL int height f Context Selector Table get Item Height 10 f Context Selector Shell set Size 302 height 2 f Context Selector Table set Size 300 height f Context Selector Table set Location 1 1 f Context Selector Shell set Background control get Display get System Color SWT COLOR BLACK Color c f Content Assistant get Context Selector Background if c null c control get Display get System Color SWT COLOR INFO BACKGROUND f Context Selector Table set Background c c f Content Assistant get Context Selector Foreground if c null c control get Display get System Color SWT COLOR INFO FOREGROUND f Context Selector Table set Foreground c f Context Selector Table add Selection Listener new Selection Listener public void widget Selected Selection Event e public void widget Default Selected Selection Event e insert Selected Context hide Context Selector f Popup Closer install f Content Assistant f Context Selector Table f Context Selector Table set Header Visible false f Content Assistant add To Layout this f Context Selector Shell Content Assistant Layout Manager LAYOUT CONTEXT SELECTOR f Content Assistant get Selection Offset  createContextSelector okToUse fContextSelectorShell fContentAssistSubjectControlAdapter getControl fContextSelectorShell getShell ON_TOP fContextSelectorTable fContextSelectorShell H_SCROLL V_SCROLL fContextSelectorTable getItemHeight fContextSelectorShell setSize fContextSelectorTable setSize fContextSelectorTable setLocation fContextSelectorShell setBackground getDisplay getSystemColor COLOR_BLACK fContentAssistant getContextSelectorBackground getDisplay getSystemColor COLOR_INFO_BACKGROUND fContextSelectorTable setBackground fContentAssistant getContextSelectorForeground getDisplay getSystemColor COLOR_INFO_FOREGROUND fContextSelectorTable setForeground fContextSelectorTable addSelectionListener SelectionListener widgetSelected SelectionEvent widgetDefaultSelected SelectionEvent insertSelectedContext hideContextSelector fPopupCloser fContentAssistant fContextSelectorTable fContextSelectorTable setHeaderVisible fContentAssistant addToLayout fContextSelectorShell ContentAssistant LayoutManager LAYOUT_CONTEXT_SELECTOR fContentAssistant getSelectionOffset
Causes the context information of the context selected in the context selector to be displayed in the context information popup private void insert Selected Context int i f Context Selector Table get Selection Index if i 0 i f Context Selector Input length return int offset f Content Assist Subject Control Adapter get Selected Range x internal Show Context Info create Context Frame f Context Selector Input i offset  insertSelectedContext fContextSelectorTable getSelectionIndex fContextSelectorInput fContentAssistSubjectControlAdapter getSelectedRange internalShowContextInfo createContextFrame fContextSelectorInput
Sets the contexts in the context selector to the given set param contexts the possible contexts private void set Contexts I Context Information contexts if Helper ok To Use f Context Selector Table f Context Selector Input contexts f Context Selector Table set Redraw false f Context Selector Table remove All Table Item item I Context Information t for int i 0 i contexts length i t contexts i item new Table Item f Context Selector Table SWT NULL if t get Image null item set Image t get Image item set Text t get Context Display String f Context Selector Table select 0 f Context Selector Table set Redraw true  setContexts IContextInformation okToUse fContextSelectorTable fContextSelectorInput fContextSelectorTable setRedraw fContextSelectorTable removeAll TableItem IContextInformation TableItem fContextSelectorTable getImage setImage getImage setText getContextDisplayString fContextSelectorTable fContextSelectorTable setRedraw
Displays the context selector private void display Context Selector if f Content Assistant add Content Assist Listener this Content Assistant CONTEXT SELECTOR f Context Selector Shell set Visible true  displayContextSelector fContentAssistant addContentAssistListener ContentAssistant CONTEXT_SELECTOR fContextSelectorShell setVisible
Hides the context selector private void hide Context Selector if Helper ok To Use f Context Selector Shell f Content Assistant remove Content Assist Listener this Content Assistant CONTEXT SELECTOR f Popup Closer uninstall f Context Selector Shell set Visible false f Context Selector Shell dispose f Context Selector Shell null if Helper ok To Use f Context Info Popup f Content Assistant context Information Closed  hideContextSelector okToUse fContextSelectorShell fContentAssistant removeContentAssistListener ContentAssistant CONTEXT_SELECTOR fPopupCloser fContextSelectorShell setVisible fContextSelectorShell fContextSelectorShell okToUse fContextInfoPopup fContentAssistant contextInformationClosed
Returns whether the context selector has the focus return code true code if the context selector has the focus public boolean has Focus if Helper ok To Use f Context Selector Shell return f Context Selector Shell is Focus Control f Context Selector Table is Focus Control return false  hasFocus okToUse fContextSelectorShell fContextSelectorShell isFocusControl fContextSelectorTable isFocusControl
Hides context selector and context information popup public void hide hide Context Selector hide Context Info Popup  hideContextSelector hideContextInfoPopup
Returns whether this context information popup is active I e either a context selector or context information is displayed return code true code if the context selector is active public boolean is Active return Helper ok To Use f Context Info Popup Helper ok To Use f Context Selector Shell  isActive okToUse fContextInfoPopup okToUse fContextSelectorShell
public boolean verify Key Verify Event e if Helper ok To Use f Context Selector Shell return context Selector Key Pressed e if Helper ok To Use f Context Info Popup return context Info Popup Key Pressed e return true  verifyKey VerifyEvent okToUse fContextSelectorShell contextSelectorKeyPressed okToUse fContextInfoPopup contextInfoPopupKeyPressed
Processes a key stroke in the context selector param e the verify event describing the key stroke return code true code if processing can be stopped private boolean context Selector Key Pressed Verify Event e char key e character if key 0 int change int visible Rows f Context Selector Table get Size y f Context Selector Table get Item Height 1 int selection f Context Selector Table get Selection Index switch e key Code case SWT ARROW UP change f Context Selector Table get Selection Index 0 1 0 break case SWT ARROW DOWN change f Context Selector Table get Selection Index f Context Selector Table get Item Count 1 1 0 break case SWT PAGE DOWN change visible Rows if selection change f Context Selector Table get Item Count change f Context Selector Table get Item Count selection break case SWT PAGE UP change visible Rows if selection change 0 change selection break case SWT HOME change selection break case SWT END change f Context Selector Table get Item Count selection break default if e key Code SWT MOD1 e key Code SWT MOD2 e key Code SWT MOD3 e key Code SWT MOD4 hide Context Selector return true f Context Selector Table set Selection selection change f Context Selector Table show Selection e doit false return false else if t key switch focus to selector shell e doit false f Context Selector Shell set Focus return false else if key 0x1B terminate on Esc hide Context Selector return true  contextSelectorKeyPressed VerifyEvent visibleRows fContextSelectorTable getSize fContextSelectorTable getItemHeight fContextSelectorTable getSelectionIndex keyCode ARROW_UP fContextSelectorTable getSelectionIndex ARROW_DOWN fContextSelectorTable getSelectionIndex fContextSelectorTable getItemCount PAGE_DOWN visibleRows fContextSelectorTable getItemCount fContextSelectorTable getItemCount PAGE_UP visibleRows fContextSelectorTable getItemCount keyCode keyCode keyCode keyCode hideContextSelector fContextSelectorTable setSelection fContextSelectorTable showSelection fContextSelectorShell setFocus hideContextSelector
Processes a key stroke while the info popup is up param e the verify event describing the key stroke return code true code if processing can be stopped private boolean context Info Popup Key Pressed Key Event e char key e character if key 0 switch e key Code case SWT ARROW LEFT case SWT ARROW RIGHT validate Context Information break default if e key Code SWT MOD1 e key Code SWT MOD2 e key Code SWT MOD3 e key Code SWT MOD4 hide Context Info Popup break else if key 0x1B terminate on Esc hide Context Info Popup else validate Context Information return true  contextInfoPopupKeyPressed KeyEvent keyCode ARROW_LEFT ARROW_RIGHT validateContextInformation keyCode keyCode keyCode keyCode hideContextInfoPopup hideContextInfoPopup validateContextInformation
public void process Event Verify Event event if Helper ok To Use f Context Selector Shell context Selector Process Event event if Helper ok To Use f Context Info Popup context Info Popup Process Event event  processEvent VerifyEvent okToUse fContextSelectorShell contextSelectorProcessEvent okToUse fContextInfoPopup contextInfoPopupProcessEvent
Processes a key stroke in the context selector param e the verify event describing the key stroke private void context Selector Process Event Verify Event e if e start e end e text null e text equals f Line Delimiter e doit false insert Selected Context hide Context Selector  contextSelectorProcessEvent VerifyEvent fLineDelimiter insertSelectedContext hideContextSelector
Processes a key stroke while the info popup is up param e the verify event describing the key stroke private void context Info Popup Process Event Verify Event e if e start e end e text null e text length 0 validate Context Information  contextInfoPopupProcessEvent VerifyEvent validateContextInformation
public void run only do this if no other frames have been added in between if f Context Frame Stack is Empty f Frame f Context Frame Stack peek int offset f Content Assist Subject Control Adapter get Selected Range x iterate all contexts on the stack while Helper ok To Use f Context Info Popup f Context Frame Stack is Empty Context Frame top Context Frame f Context Frame Stack peek if top f Validator null top f Validator is Context Information Valid offset hide Context Info Popup loop variant reduces the number of contexts on the stack else if top f Presenter null top f Presenter update Presentation offset f Text Presentation Text Presentation apply Text Presentation f Text Presentation f Context Info Text resize break else break  fContextFrameStack isEmpty fFrame fContextFrameStack fContentAssistSubjectControlAdapter getSelectedRange okToUse fContextInfoPopup fContextFrameStack isEmpty ContextFrame ContextFrame fContextFrameStack fValidator fValidator isContextInformationValid hideContextInfoPopup fPresenter fPresenter updatePresentation fTextPresentation TextPresentation applyTextPresentation fTextPresentation fContextInfoText
Validates the context information for the viewer s actual cursor position private void validate Context Information Post the code in the event queue in order to ensure that the action described by this verify key event has already been executed Otherwise we d validate the context information based on the pre key stroke state if Helper ok To Use f Context Info Popup return f Context Info Popup get Display async Exec new Runnable private Context Frame f Frame Context Frame f Context Frame Stack peek public void run only do this if no other frames have been added in between if f Context Frame Stack is Empty f Frame f Context Frame Stack peek int offset f Content Assist Subject Control Adapter get Selected Range x iterate all contexts on the stack while Helper ok To Use f Context Info Popup f Context Frame Stack is Empty Context Frame top Context Frame f Context Frame Stack peek if top f Validator null top f Validator is Context Information Valid offset hide Context Info Popup loop variant reduces the number of contexts on the stack else if top f Presenter null top f Presenter update Presentation offset f Text Presentation Text Presentation apply Text Presentation f Text Presentation f Context Info Text resize break else break  validateContextInformation okToUse fContextInfoPopup fContextInfoPopup getDisplay asyncExec ContextFrame fFrame ContextFrame fContextFrameStack fContextFrameStack isEmpty fFrame fContextFrameStack fContentAssistSubjectControlAdapter getSelectedRange okToUse fContextInfoPopup fContextFrameStack isEmpty ContextFrame ContextFrame fContextFrameStack fValidator fValidator isContextInformationValid hideContextInfoPopup fPresenter fPresenter updatePresentation fTextPresentation TextPresentation applyTextPresentation fTextPresentation fContextInfoText

Creates a new context information validator which is ready to be installed on a particular context information param processor the processor to be used for validation public Context Information Validator I Content Assist Processor processor f Processor processor  ContextInformationValidator IContentAssistProcessor fProcessor
see I Context Information Validator install I Context Information I Text Viewer int public void install I Context Information context Information I Text Viewer viewer int offset f Context Information context Information f Viewer viewer  IContextInformationValidator IContextInformation ITextViewer IContextInformation contextInformation ITextViewer fContextInformation contextInformation fViewer
public boolean is Context Information Valid int offset I Context Information infos f Processor compute Context Information f Viewer offset if infos null infos length 0 for int i 0 i infos length i if f Context Information equals infos i return true return false  isContextInformationValid IContextInformation fProcessor computeContextInformation fViewer fContextInformation

Returns whether the widget is code null code or disposed param widget the widget to check return code true code if the widget is neither code null code nor disposed public static boolean ok To Use Widget widget return widget null widget is Disposed  okToUse isDisposed

Inserts the proposed completion into the given document param document the document into which to insert the proposed completion 
Returns the new selection after the proposal has been applied to the given document in absolute document coordinates If it returns code null code no new selection is set A document change can trigger other document changes which have to be taken into account when calculating the new selection Typically this would be done by installing a document listener or by using a document position during link apply I Document param document the document into which the proposed completion has been inserted return the new selection in absolute document coordinates  IDocument
Returns optional additional information about the proposal The additional information will be presented to assist the user in deciding if the selected proposal is the desired choice return the additional information or code null code 
Returns the string to be displayed in the list of completion proposals return the string to be displayed 
Returns the image to be displayed in the list of completion proposals The image would typically be shown to the left of the display string return the image to be shown or code null code if no image is desired 
Returns optional context information associated with this proposal The context information will automatically be shown if the proposal has been applied return the context information for this proposal or code null code 

Applies the proposed completion to the given document The insertion has been triggered by entering the given character at the given offset This method assumes that link is Valid For I Document int returns code true code if called for code offset code param document the document into which to insert the proposed completion param trigger the trigger to apply the completion param offset the offset at which the trigger has been activated  isValidFor IDocument
Returns whether this completion proposal is valid for the given position in the given document param document the document for which the proposal is tested param offset the offset for which the proposal is tested return code true code iff valid 
Returns the characters which trigger the application of this completion proposal return the completion characters for this completion proposal or code null code if no completion other than the new line character is possible 
Returns the position to which the computed context information refers to or code 1 code if no context information can be provided by this completion proposal return the position to which the context information refers to or code 1 code for no information 

Applies the proposed completion to the given document The insertion has been triggered by entering the given character with a modifier at the given offset This method assumes that link validate I Document int Document Event returns code true code if called for code offset code param viewer the text viewer into which to insert the proposed completion param trigger the trigger to apply the completion param state Mask the state mask of the modifiers param offset the offset at which the trigger has been activated  IDocument DocumentEvent stateMask
Called when the proposal is selected param viewer the text viewer param smart Toggle the smart toggle key was pressed  smartToggle
Called when the proposal is unselected param viewer the text viewer 
Requests the proposal to be validated with respect to the document event If the proposal cannot be validated the methods returns code false code If the document event was code null code only the caret offset was changed but not the document This method replaces link I Completion Proposal Extension is Valid For I Document int param document the document param offset the caret offset param event the document event may be code null code return boolean  ICompletionProposalExtension isValidFor IDocument

public interface I Completion Proposal Extension3 Returns the information control creator of this completion proposal return the information control creator or code null code if no custom control creator is available  ICompletionProposalExtension3
Returns the string that would be inserted at the position returned from link get Prefix Completion Start I Document int if this proposal was applied If the replacement string cannot be determined code null code may be returned p If this interface is not implemented link I Completion Proposal get Display String will be used instead p param document the document that the receiver applies to param completion Offset the offset into code document code where the completion takes place return the replacement string or code null code if it cannot be determined  getPrefixCompletionStart IDocument ICompletionProposal getDisplayString completionOffset
Returns the document offset at which the receiver would insert its proposal p If this interface is not implemented code completion Offset code will be used instead p param document the document that the receiver applies to param completion Offset the offset into code document code where the completion takes place return the offset at which the proposal would insert its proposal  completionOffset completionOffset

Installs content assist support on the given text viewer param text Viewer the text viewer on which content assist will work  textViewer
Uninstalls content assist support from the text viewer it has previously be installed on 
Shows all possible completions of the content at the viewer s cursor position return an optional error message if no proposals can be computed 
Shows context information for the content at the viewer s cursor position return an optional error message if no context information can be computed 
Returns the content assist processor to be used for the given content type param content Type the type of the content for which this content assistant is to be requested return an instance content assist processor or code null code if none exists for the specified content type  contentType

Returns the document partitioning this content assistant is using return the document partitioning this content assistant is using 
Inserts the common prefix of the available completions If no common prefix can be computed it is identical to link I Content Assistant show Possible Completions return an optional error message if no proposals can be computed  IContentAssistant showPossibleCompletions

Verifies the key event param event the verify event return code true code if processing should be continued by additional listeners see org eclipse swt custom Verify Key Listener verify Key Verify Event  VerifyKeyListener verifyKey VerifyEvent

Returns a list of completion proposals based on the specified location within the document that corresponds to the current cursor position within the text viewer param viewer the viewer whose document is used to compute the proposals param offset an offset within the document for which completions should be computed return an array of completion proposals or code null code if no proposals are possible 
Returns information about possible contexts based on the specified location within the document that corresponds to the current cursor position within the text viewer param viewer the viewer whose document is used to compute the possible contexts param offset an offset within the document for which context information should be computed return an array of context information objects or code null code if no context could be found 
Returns the characters which when entered by the user should automatically trigger the presentation of possible completions return the auto activation characters for completion proposal or code null code if no auto activation is desired 
Returns the characters which when entered by the user should automatically trigger the presentation of context information return the auto activation characters for presenting context information or code null code if no auto activation is desired 
Returns the reason why this content assist processor was unable to produce any completion proposals or context information return an error message or code null code if no error occurred 
Returns a validator used to determine when displayed context information should be dismissed May only return code null code if the processor is incapable of computing context information p return a context information validator or code null code if the processor is incapable of computing context information 

Returns the string to be displayed in the list of contexts This method is used to supply a unique presentation for situations where the context is ambiguous These strings are used to allow the user to select the specific context return the string to be displayed for the context 
Returns the image for this context information The image will be shown to the left of the display string return the image to be shown or code null code if no image is desired 
Returns the string to be displayed in the tool tip like information popup return the string to be displayed 
Compares the given object with this receiver Two context informations are equal if there information display strings and their context display strings are equal see Object equals Object 

Returns the start offset of the range for which this context information is valid return the start offset of the range for which this context information is valid 

Installs this presenter for the given context information param info the context information which this presenter should style param viewer the text viewer on which the information is presented param offset the document offset for which the information has been computed 
Updates the given presentation of the given context information at the given document position Returns whether update changed the presentation param offset the current offset within the document param presentation the presentation to be updated return code true code if the given presentation has been changed 

Installs this validator for the given context information param info the context information which this validator should check param viewer the text viewer on which the information is presented param offset the document offset for which the information has been computed 
Returns whether the information this validator is installed on is still valid at the given document position param offset the current offset within the document return code true code if the information also valid at the given document position 

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private J Face Text Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE JFaceTextMessages
Gets a string from the resource bundle param key the string used to get the bundle value must not be code null code return the string from the resource bundle public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

Installs this closer on the given table opened by the given content assistant param content Assistant the content assistant param table the table to be tracked public void install Content Assistant content Assistant Table table f Content Assistant content Assistant f Table table if Helper ok To Use f Table f Table add Focus Listener this f Scrollbar f Table get Vertical Bar if f Scrollbar null f Scrollbar add Selection Listener this  contentAssistant ContentAssistant contentAssistant fContentAssistant contentAssistant fTable okToUse fTable fTable addFocusListener fScrollbar fTable getVerticalBar fScrollbar fScrollbar addSelectionListener
Uninstalls this closer if previously installed public void uninstall if Helper ok To Use f Scrollbar f Scrollbar remove Selection Listener this if Helper ok To Use f Table f Table remove Focus Listener this  okToUse fScrollbar fScrollbar removeSelectionListener okToUse fTable fTable removeFocusListener
see org eclipse swt events Selection Listener widget Selected org eclipse swt events Selection Event public void widget Selected Selection Event e f Scrollbar Clicked true  SelectionListener widgetSelected SelectionEvent widgetSelected SelectionEvent fScrollbarClicked
see org eclipse swt events Selection Listener widget Default Selected org eclipse swt events Selection Event public void widget Default Selected Selection Event e f Scrollbar Clicked true  SelectionListener widgetDefaultSelected SelectionEvent widgetDefaultSelected SelectionEvent fScrollbarClicked
see org eclipse swt events Focus Listener focus Gained org eclipse swt events Focus Event public void focus Gained Focus Event e  FocusListener focusGained FocusEvent focusGained FocusEvent
Display d f Table get Display d async Exec new Runnable public void run if Helper ok To Use f Table f Table is Focus Control f Scrollbar Clicked f Content Assistant popup Focus Lost e  fTable getDisplay asyncExec okToUse fTable fTable isFocusControl fScrollbarClicked fContentAssistant popupFocusLost
public void focus Lost final Focus Event e f Scrollbar Clicked false Display d f Table get Display d async Exec new Runnable public void run if Helper ok To Use f Table f Table is Focus Control f Scrollbar Clicked f Content Assistant popup Focus Lost e  focusLost FocusEvent fScrollbarClicked fTable getDisplay asyncExec okToUse fTable fTable isFocusControl fScrollbarClicked fContentAssistant popupFocusLost

Creates a new painter for the given source viewer param text Viewer the source viewer for which to create a painter public Cursor Line Painter I Text Viewer text Viewer f Viewer text Viewer  textViewer CursorLinePainter ITextViewer textViewer fViewer textViewer
Sets the color in which to draw the background of the cursor line param highlight Color the color in which to draw the background of the cursor line public void set Highlight Color Color highlight Color f Highlight Color highlight Color  highlightColor setHighlightColor highlightColor fHighlightColor highlightColor
public void line Get Background Line Background Event event don t use cached line information because of asynchronous painting Styled Text text Widget f Viewer get Text Widget if text Widget null int caret text Widget get Caret Offset int length event line Text length if event line Offset caret caret event line Offset length event line Background f Highlight Color else event line Background text Widget get Background  lineGetBackground LineBackgroundEvent StyledText textWidget fViewer getTextWidget textWidget textWidget getCaretOffset lineText lineOffset lineOffset lineBackground fHighlightColor lineBackground textWidget getBackground
Updates all the cached information about the lines to be painted and to be cleared Returns code true code if the line number of the cursor line has changed return code true code if cursor line changed private boolean update Highlight Line try I Document document f Viewer get Document int line Number document get Line Of Offset get Model Caret redraw if the current line number is different from the last line number we painted initially f Last Line Number is 1 if line Number f Last Line Number f Last Line offset f Current Line offset f Last Line length f Current Line length f Last Line is Deleted f Current Line is Deleted if f Current Line is Deleted f Current Line is Deleted false f Position Manager manage Position f Current Line f Current Line offset document get Line Offset line Number if line Number document get Number Of Lines 1 f Current Line length document get Length f Current Line offset else f Current Line length document get Line Offset line Number 1 f Current Line offset f Last Line Number line Number return true catch Bad Location Exception e return false  updateHighlightLine IDocument fViewer getDocument lineNumber getLineOfOffset getModelCaret fLastLineNumber lineNumber fLastLineNumber fLastLine fCurrentLine fLastLine fCurrentLine fLastLine isDeleted fCurrentLine isDeleted fCurrentLine isDeleted fCurrentLine isDeleted fPositionManager managePosition fCurrentLine fCurrentLine getLineOffset lineNumber lineNumber getNumberOfLines fCurrentLine getLength fCurrentLine fCurrentLine getLineOffset lineNumber fCurrentLine fLastLineNumber lineNumber BadLocationException
Returns the location of the caret as offset in the source viewer s input document return the caret location private int get Model Caret int widget Caret f Viewer get Text Widget get Caret Offset if f Viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 f Viewer return extension widget Offset2 Model Offset widget Caret else I Region visible f Viewer get Visible Region return widget Caret visible get Offset  getModelCaret widgetCaret fViewer getTextWidget getCaretOffset fViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 fViewer widgetOffset2ModelOffset widgetCaret IRegion fViewer getVisibleRegion widgetCaret getOffset
Assumes the given position to specify offset and length of a line to be painted param position the specification of the line to be painted private void draw Highlight Line Position position if the position that is about to be drawn was deleted then we can t if position is Deleted return int widget Offset 0 if f Viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 f Viewer widget Offset extension model Offset2 Widget Offset position get Offset if widget Offset 1 return else I Region visible f Viewer get Visible Region widget Offset position get Offset visible get Offset if widget Offset 0 visible get Length widget Offset return Styled Text text Widget f Viewer get Text Widget check for https bugs eclipse org bugs show bug cgi id 64898 this is a guard against the symptoms but not the actual solution if 0 widget Offset widget Offset text Widget get Char Count Point upper Left text Widget get Location At Offset widget Offset int width text Widget get Client Area width text Widget get Horizontal Pixel int height text Widget get Line Height text Widget redraw 0 upper Left y width height false  drawHighlightLine isDeleted widgetOffset fViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 fViewer widgetOffset modelOffset2WidgetOffset getOffset widgetOffset IRegion fViewer getVisibleRegion widgetOffset getOffset getOffset widgetOffset getLength widgetOffset StyledText textWidget fViewer getTextWidget show_bug widgetOffset widgetOffset textWidget getCharCount upperLeft textWidget getLocationAtOffset widgetOffset textWidget getClientArea textWidget getHorizontalPixel textWidget getLineHeight textWidget upperLeft
public void deactivate boolean redraw if f Is Active f Is Active false on turning off the feature one has to paint the currently highlighted line with the standard background color if redraw draw Highlight Line f Current Line f Viewer get Text Widget remove Line Background Listener this if f Position Manager null f Position Manager unmanage Position f Current Line f Last Line Number 1 f Current Line offset 0 f Current Line length 0  fIsActive fIsActive drawHighlightLine fCurrentLine fViewer getTextWidget removeLineBackgroundListener fPositionManager fPositionManager unmanagePosition fCurrentLine fLastLineNumber fCurrentLine fCurrentLine
see I Painter dispose public void dispose  IPainter
public void paint int reason if f Viewer get Document null deactivate false return Styled Text text Widget f Viewer get Text Widget check selection Point selection text Widget get Selection int start Line text Widget get Line At Offset selection x int end Line text Widget get Line At Offset selection y if start Line end Line deactivate true return initialization if f Is Active text Widget add Line Background Listener this f Position Manager manage Position f Current Line f Is Active true redraw line highlight only if it hasn t been drawn yet on the respective line if update Highlight Line clear last line draw Highlight Line f Last Line draw new line draw Highlight Line f Current Line  fViewer getDocument StyledText textWidget fViewer getTextWidget textWidget getSelection startLine textWidget getLineAtOffset endLine textWidget getLineAtOffset startLine endLine fIsActive textWidget addLineBackgroundListener fPositionManager managePosition fCurrentLine fIsActive updateHighlightLine drawHighlightLine fLastLine drawHighlightLine fCurrentLine
see I Painter set Position Manager I Paint Position Manager public void set Position Manager I Paint Position Manager manager f Position Manager manager  IPainter setPositionManager IPaintPositionManager setPositionManager IPaintPositionManager fPositionManager

Creates a new default auto indent strategy which can be installed on text viewers public Default Auto Indent Strategy  DefaultAutoIndentStrategy
Returns the first offset greater than code offset code and smaller than code end code whose character is not a space or tab character If no such offset is found code end code is returned param document the document to search in param offset the offset at which searching start param end the offset at which searching stops return the offset in the specified range whose character is not a space or tab exception Bad Location Exception if position is an invalid range in the given document protected int find End Of White Space I Document document int offset int end throws Bad Location Exception while offset end char c document get Char offset if c c t return offset offset return end  BadLocationException findEndOfWhiteSpace IDocument BadLocationException getChar
Copies the indentation of the previous line param d the document to work on param c the command to deal with private void auto Indent After New Line I Document d Document Command c if c offset 1 d get Length 0 return try find start of line int p c offset d get Length c offset 1 c offset I Region info d get Line Information Of Offset p int start info get Offset find white spaces int end find End Of White Space d start c offset String Buffer buf new String Buffer c text if end start append to input buf append d get start end start c text buf to String catch Bad Location Exception excp stop work  autoIndentAfterNewLine IDocument DocumentCommand getLength getLength IRegion getLineInformationOfOffset getOffset findEndOfWhiteSpace StringBuffer StringBuffer toString BadLocationException
see I Auto Indent Strategy customize Document Command public void customize Document Command I Document d Document Command c if c length 0 c text null Text Utilities ends With d get Legal Line Delimiters c text 1 auto Indent After New Line d c  IAutoIndentStrategy customizeDocumentCommand customizeDocumentCommand IDocument DocumentCommand TextUtilities endsWith getLegalLineDelimiters autoIndentAfterNewLine

Creates a new document adapter which is initially not connected to any document public Default Document Adapter  DefaultDocumentAdapter
Sets the given document as the document to be adapted param document the document to be adapted or code null code if there is no document public void set Document I Document document if f Document null f Document remove Prenotified Document Listener this f Document document f Line Delimiter null if f Is Forwarding f Document Clone null f Original Content f Document get f Original Line Delimiters f Document get Legal Line Delimiters if f Document null f Document add Prenotified Document Listener this  setDocument IDocument fDocument fDocument removePrenotifiedDocumentListener fDocument fLineDelimiter fIsForwarding fDocumentClone fOriginalContent fDocument fOriginalLineDelimiters fDocument getLegalLineDelimiters fDocument fDocument addPrenotifiedDocumentListener
public void add Text Change Listener Text Change Listener listener Assert is Not Null listener if f Text Change Listeners contains listener f Text Change Listeners add listener  addTextChangeListener TextChangeListener isNotNull fTextChangeListeners fTextChangeListeners
see Styled Text Content remove Text Change Listener Text Change Listener public void remove Text Change Listener Text Change Listener listener Assert is Not Null listener f Text Change Listeners remove listener  StyledTextContent removeTextChangeListener TextChangeListener removeTextChangeListener TextChangeListener isNotNull fTextChangeListeners
Tries to repair the line information param document the document see I Repairable Document repair Line Information since 3 0 private void repair Line Information I Document document if document instanceof I Repairable Document I Repairable Document repairable I Repairable Document document repairable repair Line Information  IRepairableDocument repairLineInformation repairLineInformation IDocument IRepairableDocument IRepairableDocument IRepairableDocument repairLineInformation
Returns the line for the given line number param document the document param line the line number return the content of the line of the given number in the given document throws Bad Location Exception if the line number is invalid for the adapted document since 3 0 private String do Get Line I Document document int line throws Bad Location Exception I Region r document get Line Information line return document get r get Offset r get Length  BadLocationException doGetLine IDocument BadLocationException IRegion getLineInformation getOffset getLength
private I Document get Document For Read if f Is Forwarding if f Document Clone null String content f Original Content null f Original Content String delims f Original Line Delimiters null Default Line Tracker DELIMITERS f Original Line Delimiters f Document Clone new Document Clone content delims return f Document Clone return f Document  IDocument getDocumentForRead fIsForwarding fDocumentClone fOriginalContent fOriginalContent fOriginalLineDelimiters DefaultLineTracker fOriginalLineDelimiters fDocumentClone DocumentClone fDocumentClone fDocument
public String get Line int line I Document document get Document For Read try return do Get Line document line catch Bad Location Exception x repair Line Information document try return do Get Line document line catch Bad Location Exception x2 SWT error SWT ERROR INVALID ARGUMENT return null  getLine IDocument getDocumentForRead doGetLine BadLocationException repairLineInformation doGetLine BadLocationException ERROR_INVALID_ARGUMENT
public int get Line At Offset int offset I Document document get Document For Read try return document get Line Of Offset offset catch Bad Location Exception x repair Line Information document try return document get Line Of Offset offset catch Bad Location Exception x2 SWT error SWT ERROR INVALID ARGUMENT return 1  getLineAtOffset IDocument getDocumentForRead getLineOfOffset BadLocationException repairLineInformation getLineOfOffset BadLocationException ERROR_INVALID_ARGUMENT
see Styled Text Content get Line Count public int get Line Count return get Document For Read get Number Of Lines  StyledTextContent getLineCount getLineCount getDocumentForRead getNumberOfLines
public int get Offset At Line int line I Document document get Document For Read try return document get Line Offset line catch Bad Location Exception x repair Line Information document try return document get Line Offset line catch Bad Location Exception x2 SWT error SWT ERROR INVALID ARGUMENT return 1  getOffsetAtLine IDocument getDocumentForRead getLineOffset BadLocationException repairLineInformation getLineOffset BadLocationException ERROR_INVALID_ARGUMENT
public String get Text Range int offset int length try return get Document For Read get offset length catch Bad Location Exception x SWT error SWT ERROR INVALID ARGUMENT return null  getTextRange getDocumentForRead BadLocationException ERROR_INVALID_ARGUMENT
public void replace Text Range int pos int length String text try f Document replace pos length text catch Bad Location Exception x SWT error SWT ERROR INVALID ARGUMENT  replaceTextRange fDocument BadLocationException ERROR_INVALID_ARGUMENT
see Styled Text Content set Text String public void set Text String text f Document set text  StyledTextContent setText setText fDocument
see Styled Text Content get Char Count public int get Char Count return get Document For Read get Length  StyledTextContent getCharCount getCharCount getDocumentForRead getLength
public String get Line Delimiter if f Line Delimiter null f Line Delimiter Text Utilities get Default Line Delimiter f Document return f Line Delimiter  getLineDelimiter fLineDelimiter fLineDelimiter TextUtilities getDefaultLineDelimiter fDocument fLineDelimiter
public void document Changed Document Event event check whether the given event is the one which was remembered if f Event null event f Event return if is Patched Event event event get Offset 0 event get Length f Remembered Length Of Document f Line Delimiter null fire Text Set else if event get Offset f Remembered Length Of First Line f Line Delimiter null fire Text Changed  documentChanged DocumentEvent fEvent fEvent isPatchedEvent getOffset getLength fRememberedLengthOfDocument fLineDelimiter fireTextSet getOffset fRememberedLengthOfFirstLine fLineDelimiter fireTextChanged
public void document About To Be Changed Document Event event f Remembered Length Of Document f Document get Length try f Remembered Length Of First Line f Document get Line Length 0 catch Bad Location Exception e f Remembered Length Of First Line 1 f Event event remember Event Data f Event fire Text Changing  documentAboutToBeChanged DocumentEvent fRememberedLengthOfDocument fDocument getLength fRememberedLengthOfFirstLine fDocument getLineLength BadLocationException fRememberedLengthOfFirstLine fEvent rememberEventData fEvent fireTextChanging
Checks whether this event has been changed between code document About To Be Changed code and code document Changed code param event the event to be checked return code true code if the event has been changed code false code otherwise private boolean is Patched Event Document Event event return f Original Event f Offset event f Offset f Original Event f Length event f Length f Original Event f Text event f Text  documentAboutToBeChanged documentChanged isPatchedEvent DocumentEvent fOriginalEvent fOffset fOffset fOriginalEvent fLength fLength fOriginalEvent fText fText
Makes a copy of the given event and remembers it param event the event to be copied private void remember Event Data Document Event event f Original Event f Offset event f Offset f Original Event f Length event f Length f Original Event f Text event f Text  rememberEventData DocumentEvent fOriginalEvent fOffset fOffset fOriginalEvent fLength fLength fOriginalEvent fText fText
Sends a text changed event to all registered listeners private void fire Text Changed if f Is Forwarding return Text Changed Event event new Text Changed Event this if f Text Change Listeners null f Text Change Listeners size 0 Iterator e new Array List f Text Change Listeners iterator while e has Next Text Change Listener e next text Changed event  fireTextChanged fIsForwarding TextChangedEvent TextChangedEvent fTextChangeListeners fTextChangeListeners ArrayList fTextChangeListeners hasNext TextChangeListener textChanged
Sends a text set event to all registered listeners private void fire Text Set if f Is Forwarding return Text Changed Event event new Text Changed Event this if f Text Change Listeners null f Text Change Listeners size 0 Iterator e new Array List f Text Change Listeners iterator while e has Next Text Change Listener e next text Set event  fireTextSet fIsForwarding TextChangedEvent TextChangedEvent fTextChangeListeners fTextChangeListeners ArrayList fTextChangeListeners hasNext TextChangeListener textSet
Sends the text changing event to all registered listeners private void fire Text Changing if f Is Forwarding return try I Document document f Event get Document if document null return Text Changing Event event new Text Changing Event this event start f Event f Offset event replace Char Count f Event f Length event replace Line Count document get Number Of Lines f Event f Offset f Event f Length 1 event new Text f Event f Text event new Char Count f Event f Text null 0 f Event f Text length event new Line Count f Event f Text null 0 document compute Number Of Lines f Event f Text if f Text Change Listeners null f Text Change Listeners size 0 Iterator e new Array List f Text Change Listeners iterator while e has Next Text Change Listener e next text Changing event catch Bad Location Exception e  fireTextChanging fIsForwarding IDocument fEvent getDocument TextChangingEvent TextChangingEvent fEvent fOffset replaceCharCount fEvent fLength replaceLineCount getNumberOfLines fEvent fOffset fEvent fLength newText fEvent fText newCharCount fEvent fText fEvent fText newLineCount fEvent fText computeNumberOfLines fEvent fText fTextChangeListeners fTextChangeListeners ArrayList fTextChangeListeners hasNext TextChangeListener textChanging BadLocationException
public void resume Forwarding Document Changes f Is Forwarding true f Document Clone null f Original Content null f Original Line Delimiters null fire Text Set  resumeForwardingDocumentChanges fIsForwarding fDocumentClone fOriginalContent fOriginalLineDelimiters fireTextSet
public void stop Forwarding Document Changes f Document Clone null f Original Content f Document get f Original Line Delimiters f Document get Legal Line Delimiters f Is Forwarding false  stopForwardingDocumentChanges fDocumentClone fOriginalContent fDocument fOriginalLineDelimiters fDocument getLegalLineDelimiters fIsForwarding

Updates the given presentation of the given information and thereby may manipulate the information to be displayed The manipulation could be the extraction of textual encoded style information etc Returns the manipulated information param display the display of the information control param hover Info the information to be presented param presentation the presentation to be updated param max Width the maximal width in pixels param max Height the maximal height in pixels return the manipulated information  hoverInfo maxWidth maxHeight
Creates a default information control with the given shell as parent The given information presenter is used to process the information to be displayed The given styles are applied to the created styled text widget param parent the parent shell param shell Style the additional styles for the shell param style the additional styles for the styled text widget param presenter the presenter to be used public Default Information Control Shell parent int shell Style int style I Information Presenter presenter this parent shell Style style presenter null  shellStyle DefaultInformationControl shellStyle IInformationPresenter shellStyle
f Text add Key Listener new Key Listener public void key Pressed Key Event e if e character 0x1B ESC f Shell dispose  fText addKeyListener KeyListener keyPressed KeyEvent fShell
public void key Released Key Event e  keyReleased KeyEvent
Creates a default information control with the given shell as parent The given information presenter is used to process the information to be displayed The given styles are applied to the created styled text widget param parent the parent shell param shell Style the additional styles for the shell param style the additional styles for the styled text widget param presenter the presenter to be used param status Field Text the text to be used in the optional status field or code null code if the status field should be hidden since 3 0 public Default Information Control Shell parent int shell Style int style I Information Presenter presenter String status Field Text Grid Layout layout Grid Data gd f Shell new Shell parent SWT NO FOCUS SWT ON TOP shell Style Display display f Shell get Display f Shell set Background display get System Color SWT COLOR BLACK Composite composite f Shell layout new Grid Layout 1 false int border shell Style SWT NO TRIM 0 0 BORDER layout margin Height border layout margin Width border composite set Layout layout gd new Grid Data Grid Data FILL BOTH composite set Layout Data gd if status Field Text null composite new Composite composite SWT NONE layout new Grid Layout 1 false layout margin Height 0 layout margin Width 0 composite set Layout layout gd new Grid Data Grid Data FILL BOTH composite set Layout Data gd composite set Foreground display get System Color SWT COLOR INFO FOREGROUND composite set Background display get System Color SWT COLOR INFO BACKGROUND Text field f Text new Styled Text composite SWT MULTI SWT READ ONLY style gd new Grid Data Grid Data BEGINNING Grid Data FILL BOTH f Text set Layout Data gd f Text set Foreground display get System Color SWT COLOR INFO FOREGROUND f Text set Background display get System Color SWT COLOR INFO BACKGROUND f Text add Key Listener new Key Listener public void key Pressed Key Event e if e character 0x1B ESC f Shell dispose public void key Released Key Event e f Presenter presenter Status field if status Field Text null Horizontal separator line Label separator new Label composite SWT SEPARATOR SWT HORIZONTAL SWT LINE DOT separator set Layout Data new Grid Data Grid Data FILL HORIZONTAL Status field label Label status Field new Label composite SWT RIGHT status Field set Text status Field Text Font font status Field get Font Font Data font Datas font get Font Data for int i 0 i font Datas length i font Datas i set Height font Datas i get Height 9 10 f Status Text Font new Font status Field get Display font Datas status Field set Font f Status Text Font gd new Grid Data Grid Data FILL HORIZONTAL Grid Data HORIZONTAL ALIGN BEGINNING Grid Data VERTICAL ALIGN BEGINNING status Field set Layout Data gd status Field set Foreground display get System Color SWT COLOR WIDGET DARK SHADOW status Field set Background display get System Color SWT COLOR INFO BACKGROUND add Dispose Listener this  shellStyle statusFieldText DefaultInformationControl shellStyle IInformationPresenter statusFieldText GridLayout GridData fShell NO_FOCUS ON_TOP shellStyle fShell getDisplay fShell setBackground getSystemColor COLOR_BLACK fShell GridLayout shellStyle NO_TRIM marginHeight marginWidth setLayout GridData GridData FILL_BOTH setLayoutData statusFieldText GridLayout marginHeight marginWidth setLayout GridData GridData FILL_BOTH setLayoutData setForeground getSystemColor COLOR_INFO_FOREGROUND setBackground getSystemColor COLOR_INFO_BACKGROUND fText StyledText READ_ONLY GridData GridData GridData FILL_BOTH fText setLayoutData fText setForeground getSystemColor COLOR_INFO_FOREGROUND fText setBackground getSystemColor COLOR_INFO_BACKGROUND fText addKeyListener KeyListener keyPressed KeyEvent fShell keyReleased KeyEvent fPresenter statusFieldText LINE_DOT setLayoutData GridData GridData FILL_HORIZONTAL statusField statusField setText statusFieldText statusField getFont FontData fontDatas getFontData fontDatas fontDatas setHeight fontDatas getHeight fStatusTextFont statusField getDisplay fontDatas statusField setFont fStatusTextFont GridData GridData FILL_HORIZONTAL GridData HORIZONTAL_ALIGN_BEGINNING GridData VERTICAL_ALIGN_BEGINNING statusField setLayoutData statusField setForeground getSystemColor COLOR_WIDGET_DARK_SHADOW statusField setBackground getSystemColor COLOR_INFO_BACKGROUND addDisposeListener
Creates a default information control with the given shell as parent The given information presenter is used to process the information to be displayed The given styles are applied to the created styled text widget param parent the parent shell param style the additional styles for the styled text widget param presenter the presenter to be used public Default Information Control Shell parent int style I Information Presenter presenter this parent SWT NO TRIM style presenter  DefaultInformationControl IInformationPresenter NO_TRIM
Creates a default information control with the given shell as parent The given information presenter is used to process the information to be displayed The given styles are applied to the created styled text widget param parent the parent shell param style the additional styles for the styled text widget param presenter the presenter to be used param status Field Text the text to be used in the optional status field or code null code if the status field should be hidden since 3 0 public Default Information Control Shell parent int style I Information Presenter presenter String status Field Text this parent SWT NO TRIM style presenter status Field Text  statusFieldText DefaultInformationControl IInformationPresenter statusFieldText NO_TRIM statusFieldText
Creates a default information control with the given shell as parent No information presenter is used to process the information to be displayed No additional styles are applied to the styled text widget param parent the parent shell public Default Information Control Shell parent this parent SWT NONE null  DefaultInformationControl
Creates a default information control with the given shell as parent The given information presenter is used to process the information to be displayed No additional styles are applied to the styled text widget param parent the parent shell param presenter the presenter to be used public Default Information Control Shell parent I Information Presenter presenter this parent SWT NONE presenter  DefaultInformationControl IInformationPresenter
public void set Information String content if f Presenter null f Text set Text content else f Presentation clear content f Presenter update Presentation f Shell get Display content f Presentation f Max Width f Max Height if content null f Text set Text content Text Presentation apply Text Presentation f Presentation f Text else f Text set Text NON NLS 1  setInformation fPresenter fText setText fPresentation fPresenter updatePresentation fShell getDisplay fPresentation fMaxWidth fMaxHeight fText setText TextPresentation applyTextPresentation fPresentation fText fText setText
see I Information Control set Visible boolean public void set Visible boolean visible f Shell set Visible visible  IInformationControl setVisible setVisible fShell setVisible
public void dispose if f Shell null f Shell is Disposed f Shell dispose else widget Disposed null  fShell fShell isDisposed fShell widgetDisposed
public void widget Disposed Dispose Event event if f Status Text Font null f Status Text Font is Disposed f Status Text Font dispose f Shell null f Text null f Status Text Font null  widgetDisposed DisposeEvent fStatusTextFont fStatusTextFont isDisposed fStatusTextFont fShell fText fStatusTextFont
see I Information Control set Size int int public void set Size int width int height f Shell set Size width height  IInformationControl setSize setSize fShell setSize
public void set Location Point location Rectangle trim f Shell compute Trim 0 0 0 0 Point text Location f Text get Location location x trim x text Location x location y trim y text Location y f Shell set Location location  setLocation fShell computeTrim textLocation fText getLocation textLocation textLocation fShell setLocation
see I Information Control set Size Constraints int int public void set Size Constraints int max Width int max Height f Max Width max Width f Max Height max Height  IInformationControl setSizeConstraints setSizeConstraints maxWidth maxHeight fMaxWidth maxWidth fMaxHeight maxHeight
see I Information Control compute Size Hint public Point compute Size Hint return f Shell compute Size SWT DEFAULT SWT DEFAULT  IInformationControl computeSizeHint computeSizeHint fShell computeSize
since 3 0 public Rectangle compute Trim return f Shell compute Trim 0 0 0 0  computeTrim fShell computeTrim
since 3 0 public Rectangle get Bounds return f Shell get Bounds  getBounds fShell getBounds
since 3 0 public boolean restores Location return false  restoresLocation
since 3 0 public boolean restores Size return false  restoresSize
see I Information Control add Dispose Listener Dispose Listener public void add Dispose Listener Dispose Listener listener f Shell add Dispose Listener listener  IInformationControl addDisposeListener DisposeListener addDisposeListener DisposeListener fShell addDisposeListener
see I Information Control remove Dispose Listener Dispose Listener public void remove Dispose Listener Dispose Listener listener f Shell remove Dispose Listener listener  IInformationControl removeDisposeListener DisposeListener removeDisposeListener DisposeListener fShell removeDisposeListener
see I Information Control set Foreground Color Color public void set Foreground Color Color foreground f Text set Foreground foreground  IInformationControl setForegroundColor setForegroundColor fText setForeground
see I Information Control set Background Color Color public void set Background Color Color background f Text set Background background  IInformationControl setBackgroundColor setBackgroundColor fText setBackground
see I Information Control is Focus Control public boolean is Focus Control return f Text is Focus Control  IInformationControl isFocusControl isFocusControl fText isFocusControl
see I Information Control set Focus public void set Focus f Shell force Focus f Text set Focus  IInformationControl setFocus setFocus fShell forceFocus fText setFocus
see I Information Control add Focus Listener Focus Listener public void add Focus Listener Focus Listener listener f Text add Focus Listener listener  IInformationControl addFocusListener FocusListener addFocusListener FocusListener fText addFocusListener
see I Information Control remove Focus Listener Focus Listener public void remove Focus Listener Focus Listener listener f Text remove Focus Listener listener  IInformationControl removeFocusListener FocusListener removeFocusListener FocusListener fText removeFocusListener
see I Information Control Extension has Contents public boolean has Contents return f Text get Char Count 0  IInformationControlExtension hasContents hasContents fText getCharCount

Creates a standard line tracker public Default Line Tracker  DefaultLineTracker
see org eclipse jface text I Line Tracker get Legal Line Delimiters public String get Legal Line Delimiters return DELIMITERS  ILineTracker getLegalLineDelimiters getLegalLineDelimiters
protected Delimiter Info next Delimiter Info String text int offset char ch int length text length for int i offset i length i ch text char At i if ch r if i 1 length if text char At i 1 n f Delimiter Info delimiter DELIMITERS 2 f Delimiter Info delimiter Index i f Delimiter Info delimiter Length 2 return f Delimiter Info f Delimiter Info delimiter DELIMITERS 0 f Delimiter Info delimiter Index i f Delimiter Info delimiter Length 1 return f Delimiter Info else if ch n f Delimiter Info delimiter DELIMITERS 1 f Delimiter Info delimiter Index i f Delimiter Info delimiter Length 1 return f Delimiter Info return null  DelimiterInfo nextDelimiterInfo charAt charAt fDelimiterInfo fDelimiterInfo delimiterIndex fDelimiterInfo delimiterLength fDelimiterInfo fDelimiterInfo fDelimiterInfo delimiterIndex fDelimiterInfo delimiterLength fDelimiterInfo fDelimiterInfo fDelimiterInfo delimiterIndex fDelimiterInfo delimiterLength fDelimiterInfo

Creates a new default position updater for the given category param category the category the updater is responsible for public Default Position Updater String category f Category category  DefaultPositionUpdater fCategory
Returns the category this updater is responsible for return the category this updater is responsible for protected String get Category return f Category  getCategory fCategory
Returns whether the current event describes a well formed replace by which the current position is directly affected return code true code the current position is directly affected since 3 0 protected boolean is Affecting Replace return f Length 0 f Replace Length 0 f Position length f Original Position length  isAffectingReplace fLength fReplaceLength fPosition fOriginalPosition
Adapts the currently investigated position to an insertion protected void adapt To Insert int my Start f Position offset int my End f Position offset f Position length is Affecting Replace 0 1 my End Math max my Start my End int yours Start f Offset int yours End f Offset f Replace Length 1 yours End Math max yours Start yours End if my End yours Start return if f Length 0 if my Start yours Start f Position length f Replace Length else f Position offset f Replace Length else if my Start yours Start f Original Position offset yours Start f Position length f Replace Length else f Position offset f Replace Length  adaptToInsert myStart fPosition myEnd fPosition fPosition isAffectingReplace myEnd myStart myEnd yoursStart fOffset yoursEnd fOffset fReplaceLength yoursEnd yoursStart yoursEnd myEnd yoursStart fLength myStart yoursStart fPosition fReplaceLength fPosition fReplaceLength myStart yoursStart fOriginalPosition yoursStart fPosition fReplaceLength fPosition fReplaceLength
Adapts the currently investigated position to a deletion protected void adapt To Remove int my Start f Position offset int my End f Position offset f Position length 1 my End Math max my Start my End int yours Start f Offset int yours End f Offset f Length 1 yours End Math max yours Start yours End if my End yours Start return if my Start yours Start if yours End my End f Position length f Length else f Position length my End yours Start 1 else if yours Start my Start if yours End my Start f Position offset f Length else f Position offset my Start yours Start f Position length yours End my Start 1 validate position to allowed values if f Position offset 0 f Position offset 0 if f Position length 0 f Position length 0  adaptToRemove myStart fPosition myEnd fPosition fPosition myEnd myStart myEnd yoursStart fOffset yoursEnd fOffset fLength yoursEnd yoursStart yoursEnd myEnd yoursStart myStart yoursStart yoursEnd myEnd fPosition fLength fPosition myEnd yoursStart yoursStart myStart yoursEnd myStart fPosition fLength fPosition myStart yoursStart fPosition yoursEnd myStart fPosition fPosition fPosition fPosition
Adapts the currently investigated position to the replace operation First it checks whether the change replaces the whole range of the position If not it performs first the deletion of the previous text and afterwards the insertion of the new text protected void adapt To Replace if f Position offset f Offset f Position length f Length f Position length 0 replace the whole range of the position f Position length f Replace Length f Length if f Position length 0 f Position offset f Position length f Position length 0 else if f Length 0 adapt To Remove if f Replace Length 0 adapt To Insert  adaptToReplace fPosition fOffset fPosition fLength fPosition fPosition fReplaceLength fLength fPosition fPosition fPosition fPosition fLength adaptToRemove fReplaceLength adaptToInsert
Determines whether the currently investigated position has been deleted by the replace operation specified in the current event If so it deletes the position and removes it from the document s position category return code true code if position has been deleted protected boolean not Deleted if f Offset f Position offset f Position offset f Position length f Offset f Length f Position delete try f Document remove Position f Category f Position catch Bad Position Category Exception x return false return true  notDeleted fOffset fPosition fPosition fPosition fOffset fLength fPosition fDocument removePosition fCategory fPosition BadPositionCategoryException
public void update Document Event event try f Offset event get Offset f Length event get Length f Replace Length event get Text null 0 event get Text length f Document event get Document Position category f Document get Positions f Category for int i 0 i category length i f Position category i f Original Position offset f Position offset f Original Position length f Position length if not Deleted adapt To Replace catch Bad Position Category Exception x do nothing  DocumentEvent fOffset getOffset fLength getLength fReplaceLength getText getText fDocument getDocument fDocument getPositions fCategory fPosition fOriginalPosition fPosition fOriginalPosition fPosition notDeleted adaptToReplace BadPositionCategoryException

private int f Index 1 Creates a new document iterator public Document Character Iterator  fIndex DocumentCharacterIterator
Configures this document iterator with the document section to be visited param document the document to be iterated param iterator Range the range in the document to be iterated public void set Document I Document document I Region iterator Range f Document document f Offset iterator Range get Offset f End Offset f Offset iterator Range get Length  iteratorRange setDocument IDocument IRegion iteratorRange fDocument fOffset iteratorRange getOffset fEndOffset fOffset iteratorRange getLength
see Character Iterator first public char first f Index f Offset return current  CharacterIterator fIndex fOffset
see Character Iterator last public char last f Index f Offset f End Offset f End Offset 1 f End Offset return current  CharacterIterator fIndex fOffset fEndOffset fEndOffset fEndOffset
public char current if f Offset f Index f Index f End Offset try return f Document get Char f Index catch Bad Location Exception x return DONE  fOffset fIndex fIndex fEndOffset fDocument getChar fIndex BadLocationException
public char next if f Index f End Offset 1 return DONE if f Index f End Offset f Index return current  fIndex fEndOffset fIndex fEndOffset fIndex
public char previous if f Index f Offset return DONE if f Index f Offset f Index return current  fIndex fOffset fIndex fOffset fIndex
see Character Iterator set Index int public char set Index int index f Index index return current  CharacterIterator setIndex setIndex fIndex
see Character Iterator get Begin Index public int get Begin Index return f Offset  CharacterIterator getBeginIndex getBeginIndex fOffset
see Character Iterator get End Index public int get End Index return f End Offset  CharacterIterator getEndIndex getEndIndex fEndOffset
see Character Iterator get Index public int get Index return f Index  CharacterIterator getIndex getIndex fIndex
public Object clone Document Character Iterator i new Document Character Iterator i f Document f Document i f Index f Index i f Offset f Offset i f End Offset f End Offset return i  DocumentCharacterIterator DocumentCharacterIterator fDocument fDocument fIndex fIndex fOffset fOffset fEndOffset fEndOffset
Creates a new default text double click strategy public Default Text Double Click Strategy super  DefaultTextDoubleClickStrategy
public void double Clicked I Text Viewer text int position text get Selected Range x if position 0 return try I Document document text get Document I Region line document get Line Information Of Offset position if position line get Offset line get Length return f Doc Iter set Document document line Break Iterator break Iter Break Iterator get Word Instance break Iter set Text f Doc Iter int start break Iter preceding position if start Break Iterator DONE start line get Offset int end break Iter following position if end Break Iterator DONE end line get Offset line get Length if break Iter is Boundary position if end position position start start position else end position if start end text set Selected Range start end start catch Bad Location Exception x  doubleClicked ITextViewer getSelectedRange IDocument getDocument IRegion getLineInformationOfOffset getOffset getLength fDocIter setDocument BreakIterator breakIter BreakIterator getWordInstance breakIter setText fDocIter breakIter BreakIterator getOffset breakIter BreakIterator getOffset getLength breakIter isBoundary setSelectedRange BadLocationException

Re initializes this text command protected void reinitialize f Start f End 1 f Text f Preserved Text null  fStart fEnd fText fPreservedText
Sets the start and the end index of this command param start the start index param end the end index protected void set int start int end f Start start f End end f Text null f Preserved Text null  fStart fEnd fText fPreservedText
Undo the change described by this command since 2 0 protected void undo Text Change try f Text Viewer get Document replace f Start f Text length f Preserved Text catch Bad Location Exception x  undoTextChange fTextViewer getDocument fStart fText fPreservedText BadLocationException
Undo the change described by this command Also selects and reveals the change protected void undo undo Text Change select And Reveal f Start f Preserved Text null 0 f Preserved Text length  undoTextChange selectAndReveal fStart fPreservedText fPreservedText
Re applies the change described by this command since 2 0 protected void redo Text Change try f Text Viewer get Document replace f Start f End f Start f Text catch Bad Location Exception x  redoTextChange fTextViewer getDocument fStart fEnd fStart fText BadLocationException
Re applies the change described by this command that previously been rolled back Also selects and reveals the change protected void redo redo Text Change select And Reveal f Start f Text null 0 f Text length  redoTextChange selectAndReveal fStart fText fText
Updates the command stack in response to committing the current change into this command protected void update Command Stack int length f Command Stack size for int i f Command Counter 1 i length i f Command Stack remove f Command Counter 1 f Command Stack add this while f Command Stack size f Undo Level f Command Stack remove 0 f Command Counter f Command Stack size 1  updateCommandStack fCommandStack fCommandCounter fCommandStack fCommandCounter fCommandStack fCommandStack fUndoLevel fCommandStack fCommandCounter fCommandStack
Creates a new uncommitted text command depending on whether a compound change is currently being executed return a new uncommitted text command or a compound text command protected Text Command create Current return f Folding Into Compound Change new Compound Text Command new Text Command  TextCommand createCurrent fFoldingIntoCompoundChange CompoundTextCommand TextCommand
Commits the current change into this command protected void commit if f Start 0 reinitialize else f Text f Text Buffer to String f Text Buffer set Length 0 f Preserved Text f Preserved Text Buffer to String f Preserved Text Buffer set Length 0 update Command Stack f Current create Current  fStart fText fTextBuffer toString fTextBuffer setLength fPreservedText fPreservedTextBuffer toString fPreservedTextBuffer setLength updateCommandStack fCurrent createCurrent
Adds a new individual command to this compound command param command the command to be added protected void add Text Command command f Commands add command  TextCommand fCommands
protected void undo I Text Viewer Extension extension null if f Text Viewer instanceof I Text Viewer Extension extension I Text Viewer Extension f Text Viewer if extension null extension set Redraw false try int size f Commands size if size 0 Text Command c for int i size 1 i 0 i c Text Command f Commands get i c undo Text Change c Text Command f Commands get 0 c undo finally if extension null extension set Redraw true  ITextViewerExtension fTextViewer ITextViewerExtension ITextViewerExtension fTextViewer setRedraw fCommands TextCommand TextCommand fCommands undoTextChange TextCommand fCommands setRedraw
protected void redo I Text Viewer Extension extension null if f Text Viewer instanceof I Text Viewer Extension extension I Text Viewer Extension f Text Viewer if extension null extension set Redraw false try int size f Commands size if size 0 Text Command c for int i 0 i size 1 i c Text Command f Commands get i c redo Text Change c Text Command f Commands get size 1 c redo finally if extension null extension set Redraw true  ITextViewerExtension fTextViewer ITextViewerExtension ITextViewerExtension fTextViewer setRedraw fCommands TextCommand TextCommand fCommands redoTextChange TextCommand fCommands setRedraw
protected void update Command Stack Text Command c new Text Command c f Start f Start c f End f End c f Text f Text c f Preserved Text f Preserved Text add c if f Folding Into Compound Change super update Command Stack  updateCommandStack TextCommand TextCommand fStart fStart fEnd fEnd fText fText fPreservedText fPreservedText fFoldingIntoCompoundChange updateCommandStack
protected Text Command create Current if f Folding Into Compound Change return new Text Command reinitialize return this  TextCommand createCurrent fFoldingIntoCompoundChange TextCommand
protected void commit if f Start 0 if f Commands size 0 f Folding Into Compound Change super update Command Stack f Current create Current return super commit  fStart fCommands fFoldingIntoCompoundChange updateCommandStack fCurrent createCurrent
see Mouse Listener mouse Double Click public void mouse Double Click Mouse Event e  MouseListener mouseDoubleClick mouseDoubleClick MouseEvent
see Mouse Listener mouse Down public void mouse Down Mouse Event e if e button 1 commit  MouseListener mouseDown mouseDown MouseEvent
see Mouse Listener mouse Up public void mouse Up Mouse Event e  MouseListener mouseUp mouseUp MouseEvent
see Key Listener key Pressed public void key Released Key Event e  KeyListener keyPressed keyReleased KeyEvent
public void key Pressed Key Event e switch e key Code case SWT ARROW UP case SWT ARROW DOWN case SWT ARROW LEFT case SWT ARROW RIGHT commit break  keyPressed KeyEvent keyCode ARROW_UP ARROW_DOWN ARROW_LEFT ARROW_RIGHT
public void document About To Be Changed Document Event event try f Replaced Text event get Document get event get Offset event get Length catch Bad Location Exception x f Replaced Text null  documentAboutToBeChanged DocumentEvent fReplacedText getDocument getOffset getLength BadLocationException fReplacedText
see org eclipse jface text I Document Listener document Changed org eclipse jface text Document Event public void document Changed Document Event event process Change event get Offset event get Offset event get Length event get Text f Replaced Text  IDocumentListener documentChanged DocumentEvent documentChanged DocumentEvent processChange getOffset getOffset getLength getText fReplacedText
public void input Document About To Be Changed I Document old Input I Document new Input if old Input null f Document Listener null old Input remove Document Listener f Document Listener commit  inputDocumentAboutToBeChanged IDocument oldInput IDocument newInput oldInput fDocumentListener oldInput removeDocumentListener fDocumentListener
public void input Document Changed I Document old Input I Document new Input if new Input null if f Document Listener null f Document Listener new Document Listener new Input add Document Listener f Document Listener  inputDocumentChanged IDocument oldInput IDocument newInput newInput fDocumentListener fDocumentListener DocumentListener newInput addDocumentListener fDocumentListener
Creates a new undo manager who remembers the specified number of edit commands param undo Level the length of this manager s history public Default Undo Manager int undo Level set Maximal Undo Level undo Level  undoLevel DefaultUndoManager undoLevel setMaximalUndoLevel undoLevel
see I Undo Manager begin Compound Change public void begin Compound Change f Folding Into Compound Change true commit  IUndoManager beginCompoundChange beginCompoundChange fFoldingIntoCompoundChange
see I Undo Manager end Compound Change public void end Compound Change f Folding Into Compound Change false commit  IUndoManager endCompoundChange endCompoundChange fFoldingIntoCompoundChange
Registers all necessary listeners with the text viewer private void add Listeners Styled Text text f Text Viewer get Text Widget if text null f Key And Mouse Listener new Key And Mouse Listener text add Mouse Listener f Key And Mouse Listener text add Key Listener f Key And Mouse Listener f Text Input Listener new Text Input Listener f Text Viewer add Text Input Listener f Text Input Listener listen To Text Changes true  addListeners StyledText fTextViewer getTextWidget fKeyAndMouseListener KeyAndMouseListener addMouseListener fKeyAndMouseListener addKeyListener fKeyAndMouseListener fTextInputListener TextInputListener fTextViewer addTextInputListener fTextInputListener listenToTextChanges
Unregister all previously installed listeners from the text viewer private void remove Listeners Styled Text text f Text Viewer get Text Widget if text null if f Key And Mouse Listener null text remove Mouse Listener f Key And Mouse Listener text remove Key Listener f Key And Mouse Listener f Key And Mouse Listener null if f Text Input Listener null f Text Viewer remove Text Input Listener f Text Input Listener f Text Input Listener null listen To Text Changes false  removeListeners StyledText fTextViewer getTextWidget fKeyAndMouseListener removeMouseListener fKeyAndMouseListener removeKeyListener fKeyAndMouseListener fKeyAndMouseListener fTextInputListener fTextViewer removeTextInputListener fTextInputListener fTextInputListener listenToTextChanges
Switches the state of whether there is a text listener or not param listen the state which should be established private void listen To Text Changes boolean listen if listen if f Document Listener null f Text Viewer get Document null f Document Listener new Document Listener f Text Viewer get Document add Document Listener f Document Listener else if listen if f Document Listener null f Text Viewer get Document null f Text Viewer get Document remove Document Listener f Document Listener f Document Listener null  listenToTextChanges fDocumentListener fTextViewer getDocument fDocumentListener DocumentListener fTextViewer getDocument addDocumentListener fDocumentListener fDocumentListener fTextViewer getDocument fTextViewer getDocument removeDocumentListener fDocumentListener fDocumentListener
Closes the current editing command and opens a new one private void commit f Inserting false f Overwriting false f Previous Delete reinitialize f Current commit  fInserting fOverwriting fPreviousDelete fCurrent
Re applies the previously undone editing command private void internal Redo f Command Counter Text Command cmd Text Command f Command Stack get f Command Counter listen To Text Changes false cmd redo listen To Text Changes true f Current new Text Command  internalRedo fCommandCounter TextCommand TextCommand fCommandStack fCommandCounter listenToTextChanges listenToTextChanges fCurrent TextCommand
Does undo the last editing command private void internal Undo Text Command cmd Text Command f Command Stack get f Command Counter f Command Counter listen To Text Changes false cmd undo listen To Text Changes true f Current new Text Command  internalUndo TextCommand TextCommand fCommandStack fCommandCounter fCommandCounter listenToTextChanges listenToTextChanges fCurrent TextCommand
Checks whether the given text starts with a line delimiter and subsequently contains a white space only param text the text to check return code true code if the text is a line delimiter followed by whitespace code false code otherwise private boolean is Whitespace Text String text if text null text length 0 return false String delimiters f Text Viewer get Document get Legal Line Delimiters int index Text Utilities starts With delimiters text if index 1 char c int length text length for int i delimiters index length i length i c text char At i if c c t return false return true return false  isWhitespaceText fTextViewer getDocument getLegalLineDelimiters TextUtilities startsWith charAt
Returns the state the would result if the current editing command would be closed return the pretended state after closing the current editing command private Pretended Undo Manager State pretend Commit if f Current f Start 0 f Pretended State stack Size f Command Stack size f Pretended State cmd Counter f Command Counter else int sz Math max f Command Counter 0 1 if sz f Undo Level sz f Undo Level f Pretended State stack Size sz f Pretended State cmd Counter sz 1 return f Pretended State  PretendedUndoManagerState pretendCommit fCurrent fStart fPretendedState stackSize fCommandStack fPretendedState cmdCounter fCommandCounter fCommandCounter fUndoLevel fUndoLevel fPretendedState stackSize fPretendedState cmdCounter fPretendedState
private void process Change int model Start int model End String inserted Text String replaced Text if inserted Text null inserted Text NON NLS 1 if replaced Text null replaced Text NON NLS 1 int length inserted Text length int diff model End model Start normalize if diff 0 int tmp model End model End model Start model Start tmp if model Start model End text will be inserted if length 1 is Whitespace Text inserted Text by typing or model manipulation if f Inserting model Start f Current f Start f Text Buffer length commit f Inserting true if f Current f Start 0 f Current f Start f Current f End model Start if length 0 f Text Buffer append inserted Text else if length 0 by pasting commit f Current f Start f Current f End model Start f Text Buffer append inserted Text commit else if length 0 text will be deleted by backspace or DEL key or empty clipboard length replaced Text length String delimiters f Text Viewer get Document get Legal Line Delimiters if length 1 Text Utilities equals delimiters replaced Text 1 whereby selection is empty if f Previous Delete f Start model Start f Previous Delete f End model End repeated DEL correct wrong settings of f Current if f Current f Start model End f Current f End model Start f Current f Start model Start f Current f End model End append to buffer extend command range f Preserved Text Buffer append replaced Text f Current f End else if f Previous Delete f Start model End repeated backspace insert in buffer and extend command range f Preserved Text Buffer insert 0 replaced Text f Current f Start model Start else either DEL or backspace for the first time commit as we can not decide whether it was DEL or backspace we initialize for backspace f Preserved Text Buffer append replaced Text f Current f Start model Start f Current f End model End f Previous Delete set model Start model End else if length 0 whereby selection is not empty commit f Current f Start model Start f Current f End model End f Preserved Text Buffer append replaced Text else text will be replaced if length 1 length replaced Text length String delimiters f Text Viewer get Document get Legal Line Delimiters if length 1 Text Utilities equals delimiters replaced Text 1 because of overwrite mode or model manipulation if f Overwriting model Start f Current f Start f Text Buffer length commit f Overwriting true if f Current f Start 0 f Current f Start model Start f Current f End model End f Text Buffer append inserted Text f Preserved Text Buffer append replaced Text return because of typing or pasting whereby selection is not empty commit f Current f Start model Start f Current f End model End f Text Buffer append inserted Text f Preserved Text Buffer append replaced Text  processChange modelStart modelEnd insertedText replacedText insertedText insertedText replacedText replacedText insertedText modelEnd modelStart modelEnd modelEnd modelStart modelStart modelStart modelEnd isWhitespaceText insertedText fInserting modelStart fCurrent fStart fTextBuffer fInserting fCurrent fStart fCurrent fStart fCurrent fEnd modelStart fTextBuffer insertedText fCurrent fStart fCurrent fEnd modelStart fTextBuffer insertedText replacedText fTextViewer getDocument getLegalLineDelimiters TextUtilities replacedText fPreviousDelete fStart modelStart fPreviousDelete fEnd modelEnd fCurrent fCurrent fStart modelEnd fCurrent fEnd modelStart fCurrent fStart modelStart fCurrent fEnd modelEnd fPreservedTextBuffer replacedText fCurrent fEnd fPreviousDelete fStart modelEnd fPreservedTextBuffer replacedText fCurrent fStart modelStart fPreservedTextBuffer replacedText fCurrent fStart modelStart fCurrent fEnd modelEnd fPreviousDelete modelStart modelEnd fCurrent fStart modelStart fCurrent fEnd modelEnd fPreservedTextBuffer replacedText replacedText fTextViewer getDocument getLegalLineDelimiters TextUtilities replacedText fOverwriting modelStart fCurrent fStart fTextBuffer fOverwriting fCurrent fStart fCurrent fStart modelStart fCurrent fEnd modelEnd fTextBuffer insertedText fPreservedTextBuffer replacedText fCurrent fStart modelStart fCurrent fEnd modelEnd fTextBuffer insertedText fPreservedTextBuffer replacedText
see org eclipse jface text I Undo Manager set Maximal Undo Level int public void set Maximal Undo Level int undo Level f Undo Level undo Level  IUndoManager setMaximalUndoLevel setMaximalUndoLevel undoLevel fUndoLevel undoLevel
public void connect I Text Viewer text Viewer if f Text Viewer null f Text Viewer text Viewer f Command Stack new Array List f Current new Text Command f Previous Delete new Text Command add Listeners  ITextViewer textViewer fTextViewer fTextViewer textViewer fCommandStack ArrayList fCurrent TextCommand fPreviousDelete TextCommand addListeners
public void disconnect if f Text Viewer null remove Listeners f Current null if f Command Stack null f Command Stack clear f Command Stack null f Text Buffer null f Preserved Text Buffer null f Text Viewer null  fTextViewer removeListeners fCurrent fCommandStack fCommandStack fCommandStack fTextBuffer fPreservedTextBuffer fTextViewer
public void reset if f Command Stack null f Command Stack clear f Command Counter 1 if f Current null f Current reinitialize f Folding Into Compound Change false f Inserting false f Overwriting false f Text Buffer set Length 0 f Preserved Text Buffer set Length 0  fCommandStack fCommandStack fCommandCounter fCurrent fCurrent fFoldingIntoCompoundChange fInserting fOverwriting fTextBuffer setLength fPreservedTextBuffer setLength
public boolean redoable if f Command Stack null Pretended Undo Manager State s pretend Commit return 0 s cmd Counter 1 s cmd Counter 1 s stack Size return false  fCommandStack PretendedUndoManagerState pretendCommit cmdCounter cmdCounter stackSize
public boolean undoable if f Command Stack null Pretended Undo Manager State s pretend Commit return 0 s cmd Counter s cmd Counter s stack Size return false  fCommandStack PretendedUndoManagerState pretendCommit cmdCounter cmdCounter stackSize
public void redo if redoable commit internal Redo  internalRedo
public void undo if undoable f Folding Into Compound Change false commit internal Undo  fFoldingIntoCompoundChange internalUndo
Selects and reveals the specified range param offset the offset of the range param length the length of the range since 3 0 protected void select And Reveal int offset int length if f Text Viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 f Text Viewer extension expose Model Range new Region offset length else if f Text Viewer overlaps With Visible Region offset length f Text Viewer reset Visible Region f Text Viewer set Selected Range offset length f Text Viewer reveal Range offset length  selectAndReveal fTextViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 fTextViewer exposeModelRange fTextViewer overlapsWithVisibleRegion fTextViewer resetVisibleRegion fTextViewer setSelectedRange fTextViewer revealRange

Creates a new empty document public Document super set Text Store new Gap Text Store 50 300 set Line Tracker new Default Line Tracker complete Initialization  setTextStore GapTextStore setLineTracker DefaultLineTracker completeInitialization
Creates a new document with the given initial content param initial Content the document s initial content public Document String initial Content super set Text Store new Gap Text Store 50 300 set Line Tracker new Default Line Tracker get Store set initial Content get Tracker set initial Content complete Initialization  initialContent initialContent setTextStore GapTextStore setLineTracker DefaultLineTracker getStore initialContent getTracker initialContent completeInitialization
since 2 0 public void start Sequential Rewrite boolean normalized I Text Store store new Sequential Rewrite Text Store get Store set Text Store store  startSequentialRewrite ITextStore SequentialRewriteTextStore getStore setTextStore
public void stop Sequential Rewrite if get Store instanceof Sequential Rewrite Text Store Sequential Rewrite Text Store srws Sequential Rewrite Text Store get Store I Text Store source srws get Source Store set Text Store source srws dispose  stopSequentialRewrite getStore SequentialRewriteTextStore SequentialRewriteTextStore SequentialRewriteTextStore getStore ITextStore getSourceStore setTextStore

Creates a new string text store with the given content param content the content public String Text Store String content Assert is Not Null content f Content content  StringTextStore isNotNull fContent
see org eclipse jface text I Text Store get int public char get int offset return f Content char At offset  ITextStore fContent charAt
see org eclipse jface text I Text Store get int int public String get int offset int length return f Content substring offset offset length  ITextStore fContent
see org eclipse jface text I Text Store get Length public int get Length return f Content length  ITextStore getLength getLength fContent
see org eclipse jface text I Text Store replace int int java lang String public void replace int offset int length String text  ITextStore
see org eclipse jface text I Text Store set java lang String public void set String text  ITextStore
Creates a new document clone with the given content param content the content param line Delimiters the line delimiters public Document Clone String content String line Delimiters super set Text Store new String Text Store content Configurable Line Tracker tracker new Configurable Line Tracker line Delimiters set Line Tracker tracker get Tracker set content complete Initialization  lineDelimiters DocumentClone lineDelimiters setTextStore StringTextStore ConfigurableLineTracker ConfigurableLineTracker lineDelimiters setLineTracker getTracker completeInitialization

Creates a new command with the given specification param offset the offset of the replace command param length the length of the replace command param text the text to replace with may be code null code param owner the document command owner may be code null code since 3 0 public Command int offset int length String text I Document Listener owner if offset 0 length 0 throw new Illegal Argument Exception f Offset offset f Length length f Text text f Owner owner  IDocumentListener IllegalArgumentException fOffset fLength fText fOwner
Returns the length delta for this command return the length delta for this command public int get Delta Length return f Text null 0 f Text length f Length  getDeltaLength fText fText fLength
Executes the document command on the specified document param document the document on which to execute the command throws Bad Location Exception in case this commands cannot be executed public void execute I Document document throws Bad Location Exception if f Length 0 f Text null return if f Owner null document remove Document Listener f Owner document replace f Offset f Length f Text if f Owner null document add Document Listener f Owner  BadLocationException IDocument BadLocationException fLength fText fOwner removeDocumentListener fOwner fOffset fLength fText fOwner addDocumentListener fOwner
public int compare To final Object object if equals object return 0 final Command command Command object diff middle points if not intersecting if f Offset f Length command f Offset command f Offset command f Length f Offset int value 2 f Offset f Length 2 command f Offset command f Length if value 0 return value the answer return 42  compareTo fOffset fLength fOffset fOffset fLength fOffset fOffset fLength fOffset fLength
public boolean equals Object object if object this return true if object instanceof Command return false final Command command Command object return command f Offset f Offset command f Length f Length  fOffset fOffset fLength fLength
Creates a reverse list iterator param list Iterator the iterator that this reverse iterator is based upon public Reverse List Iterator List Iterator list Iterator if list Iterator null throw new Illegal Argument Exception f List Iterator list Iterator  listIterator ReverseListIterator ListIterator listIterator listIterator IllegalArgumentException fListIterator listIterator
see java util Iterator has Next public boolean has Next return f List Iterator has Previous  hasNext hasNext fListIterator hasPrevious
see java util Iterator next public Object next return f List Iterator previous  fListIterator
see java util Iterator remove public void remove throw new Unsupported Operation Exception  UnsupportedOperationException
Creates a command iterator param commands an ascending ordered list of commands param command the original command param forward the direction public Command Iterator final List commands final Command command final boolean forward if commands null command null throw new Illegal Argument Exception f Iterator forward commands iterator new Reverse List Iterator commands list Iterator commands size f Command command f Forward forward  CommandIterator IllegalArgumentException fIterator ReverseListIterator listIterator fCommand fForward
see java util Iterator has Next public boolean has Next return f Command null f Iterator has Next  hasNext hasNext fCommand fIterator hasNext
public Object next if has Next throw new No Such Element Exception if f Command null return f Iterator next if f Iterator has Next final Command temp Command f Command f Command null return temp Command final Command command Command f Iterator next final int compare Value command compare To f Command if compare Value 0 f Forward return command else if compare Value 0 f Forward final Command temp Command f Command f Command command return temp Command else throw new Illegal Argument Exception  hasNext NoSuchElementException fCommand fIterator fIterator hasNext tempCommand fCommand fCommand tempCommand fIterator compareValue compareTo fCommand compareValue fForward compareValue fForward tempCommand fCommand fCommand tempCommand IllegalArgumentException
see java util Iterator remove public void remove throw new Unsupported Operation Exception  UnsupportedOperationException
Creates a new document command protected Document Command  DocumentCommand
Translates a verify event into a document replace command using the given offset param event the event to be translated param model Range the event range as model range void set Event Verify Event event I Region model Range doit true text event text offset model Range get Offset length model Range get Length owner null caret Offset 1 shifts Caret true f Commands clear  modelRange setEvent VerifyEvent IRegion modelRange modelRange getOffset modelRange getLength caretOffset shiftsCaret fCommands
Fills the given verify event with the replace text and the code doit code flag of this document command Returns whether the document command covers the same range as the verify event considering the given offset param event the event to be changed param model Range to be considered for range comparison return code true code if this command and the event cover the same range boolean fill Event Verify Event event I Region model Range event text text event doit offset model Range get Offset length model Range get Length doit caret Offset 1 return event doit  modelRange fillEvent VerifyEvent IRegion modelRange modelRange getOffset modelRange getLength caretOffset
Adds an additional replace command The added replace command must not overlap with existing ones If the document command owner is not code null code it will not get document change notifications for the particular command param offset the offset of the region to replace param length the length of the region to replace param text the text to replace with may be code null code param owner the command owner may be code null code throws Bad Location Exception if the added command intersects with an existing one since 2 1 public void add Command int offset int length String text I Document Listener owner throws Bad Location Exception final Command command new Command offset length text owner if intersects command throw new Bad Location Exception final int index Collections binary Search f Commands command a command with exactly the same ranges exists already if index 0 throw new Bad Location Exception binary search result is defined as insertion Index 1 final int insertion Index index 1 overlaps to the right if insertion Index f Commands size intersects Command f Commands get insertion Index command throw new Bad Location Exception overlaps to the left if insertion Index 0 intersects Command f Commands get insertion Index 1 command throw new Bad Location Exception f Commands add insertion Index command  BadLocationException addCommand IDocumentListener BadLocationException BadLocationException binarySearch fCommands BadLocationException insertionIndex insertionIndex insertionIndex fCommands fCommands insertionIndex BadLocationException insertionIndex fCommands insertionIndex BadLocationException fCommands insertionIndex
Returns an iterator over the commands in ascending position order The iterator includes the original document command Commands cannot be removed return returns the command iterator public Iterator get Command Iterator Command command new Command offset length text owner return new Command Iterator f Commands command true  getCommandIterator CommandIterator fCommands
Returns the number of commands including the original document command return returns the number of commands since 2 1 public int get Command Count return 1 f Commands size  getCommandCount fCommands
Returns whether the two given commands intersect param command0 the first command param command1 the second command return code true code if the commands intersect since 2 1 private boolean intersects Command command0 Command command1 diff middle points if not intersecting if command0 f Offset command0 f Length command1 f Offset command1 f Offset command1 f Length command0 f Offset return 2 command0 f Offset command0 f Length 2 command1 f Offset command1 f Length 0 else return true  fOffset fLength fOffset fOffset fLength fOffset fOffset fLength fOffset fLength
Returns whether the given command intersects with this command param command the command return code true code if the command intersects with this command since 2 1 private boolean intersects Command command diff middle points if not intersecting if offset length command f Offset command f Offset command f Length offset return 2 offset length 2 command f Offset command f Length 0 else return true  fOffset fOffset fLength fOffset fLength
Executes the document commands on a document param document the document on which to execute the commands throws Bad Location Exception in case access to the given document fails since 2 1 void execute I Document document throws Bad Location Exception if length 0 text null f Commands size 0 return Default Position Updater updater new Default Position Updater get Category Position caret Position null try if update Caret document add Position Category get Category document add Position Updater updater caret Position new Position caret Offset document add Position get Category caret Position final Command original Command new Command offset length text owner for final Iterator iterator new Command Iterator f Commands original Command false iterator has Next Command iterator next execute document catch Bad Location Exception e ignore catch Bad Position Category Exception e ignore finally if update Caret document remove Position Updater updater try document remove Position Category get Category catch Bad Position Category Exception e Assert is True false caret Offset caret Position get Offset  BadLocationException IDocument BadLocationException fCommands DefaultPositionUpdater DefaultPositionUpdater getCategory caretPosition updateCaret addPositionCategory getCategory addPositionUpdater caretPosition caretOffset addPosition getCategory caretPosition originalCommand CommandIterator fCommands originalCommand hasNext BadLocationException BadPositionCategoryException updateCaret removePositionUpdater removePositionCategory getCategory BadPositionCategoryException isTrue caretOffset caretPosition getOffset
Returns code true code if the caret offset should be updated code false code otherwise return code true code if the caret offset should be updated code false code otherwise since 3 0 private boolean update Caret return shifts Caret caret Offset 1  updateCaret shiftsCaret caretOffset
Returns the position category for the caret offset position return the position category for the caret offset position since 3 0 private String get Category return to String  getCategory toString

Creates a new document event param doc the changed document param offset the offset of the replaced text param length the length of the replaced text param text the substitution text public Document Event I Document doc int offset int length String text Assert is Not Null doc Assert is True offset 0 Assert is True length 0 f Document doc f Offset offset f Length length f Text text  DocumentEvent IDocument isNotNull isTrue isTrue fDocument fOffset fLength fText
Creates a new not initialized document event public Document Event  DocumentEvent
Returns the changed document return the changed document public I Document get Document return f Document  IDocument getDocument fDocument
Returns the offset of the change return the offset of the change public int get Offset return f Offset  getOffset fOffset
Returns the length of the replaced text return the length of the replaced text public int get Length return f Length  getLength fLength
Returns the text that has been inserted return the text that has been inserted public String get Text return f Text  getText fText

Creates a new document partitioning changed event for the given document Initially this event is empty i e does not describe any change param document the changed document public Document Partitioning Changed Event I Document document f Document document  DocumentPartitioningChangedEvent IDocument fDocument
Returns the changed document return the changed document public I Document get Document return f Document  IDocument getDocument fDocument
Returns the changed region of the given partitioning or code null code if the given partitioning did not change param partitioning the partitioning return the changed region of the given partitioning or code null code public I Region get Changed Region String partitioning return I Region f Map get partitioning  IRegion getChangedRegion IRegion fMap
Returns the set of changed partitionings return the set of changed partitionings public String get Changed Partitionings String partitionings new String f Map size f Map key Set to Array partitionings return partitionings  getChangedPartitionings fMap fMap keySet toArray
Sets the specified range as changed region for the given partitioning param partitioning the partitioning param offset the region offset param length the region length public void set Partition Change String partitioning int offset int length Assert is Not Null partitioning f Map put partitioning new Region offset length  setPartitionChange isNotNull fMap
Returns code true code if the set of changed partitionings is empty code false code otherwise return code true code if the set of changed partitionings is empty public boolean is Empty return f Map is Empty  isEmpty fMap isEmpty
Returns the coverage of this event This is the minimal region that contains all changed regions of all changed partitionings return the coverage of this event public I Region get Coverage if f Map is Empty return new Region 0 0 int offset 1 int end Offset 1 Iterator e f Map values iterator while e has Next I Region r I Region e next if offset 0 r get Offset offset offset r get Offset int end r get Offset r get Length if end end Offset end Offset end return new Region offset end Offset offset  IRegion getCoverage fMap isEmpty endOffset fMap hasNext IRegion IRegion getOffset getOffset getOffset getLength endOffset endOffset endOffset

Constructs a new find replace document adapter param document the adapted document public Find Replace Document Adapter I Document document Assert is Not Null document f Document document  FindReplaceDocumentAdapter IDocument isNotNull fDocument
Returns the location of a given string in this adapter s document based on a set of search criteria param start Offset document offset at which search starts param find String the string to find param forward Search the search direction param case Sensitive indicates whether lower and upper case should be distinguished param whole Word indicates whether the find String should be limited by white spaces as defined by Character is White Space Must not be used in combination with code reg Ex Search code param reg Ex Search if code true code find String represents a regular expression Must not be used in combination with code whole Word code return the find or replace region or code null code if there was no match throws Bad Location Exception if start Offset is an invalid document offset throws Pattern Syntax Exception if a regular expression has invalid syntax public I Region find int start Offset String find String boolean forward Search boolean case Sensitive boolean whole Word boolean reg Ex Search throws Bad Location Exception Assert is True reg Ex Search whole Word Adjust offset to special meaning of 1 if start Offset 1 forward Search start Offset 0 if start Offset 1 forward Search start Offset length 1 return find Replace FIND FIRST start Offset find String null forward Search case Sensitive whole Word reg Ex Search  startOffset findString forwardSearch caseSensitive wholeWord findString isWhiteSpace regExSearch regExSearch findString wholeWord BadLocationException startOffset PatternSyntaxException IRegion startOffset findString forwardSearch caseSensitive wholeWord regExSearch BadLocationException isTrue regExSearch wholeWord startOffset forwardSearch startOffset startOffset forwardSearch startOffset findReplace FIND_FIRST startOffset findString forwardSearch caseSensitive wholeWord regExSearch
Stateful find Replace executes a FIND REPLACE REPLACE FIND or FIND FIRST operation In case of REPLACE and REPLACE FIND it sends a code Document Event code to all registered code I Document Listener code param start Offset document offset at which search starts this value is only used in the FIND FIRST operation and otherwise ignored param find String the string to find this value is only used in the FIND FIRST operation and otherwise ignored param replace Text the string to replace the current match this value is only used in the REPLACE and REPLACE FIND operations and otherwise ignored param forward Search the search direction param case Sensitive indicates whether lower and upper case should be distinguished param whole Word indicates whether the find String should be limited by white spaces as defined by Character is White Space Must not be used in combination with code reg Ex Search code param reg Ex Search if code true code this operation represents a regular expression Must not be used in combination with code whole Word code param operation Code specifies what kind of operation is executed return the find or replace region or code null code if there was no match throws Bad Location Exception if start Offset is an invalid document offset throws Illegal State Exception if a REPLACE or REPLACE FIND operation is not preceded by a successful FIND operation throws Pattern Syntax Exception if a regular expression has invalid syntax private I Region find Replace final Find Replace Operation Code operation Code int start Offset String find String String replace Text boolean forward Search boolean case Sensitive boolean whole Word boolean reg Ex Search throws Bad Location Exception Validate option combinations Assert is True reg Ex Search whole Word Validate state if operation Code REPLACE operation Code REPLACE FIND NEXT f Find Replace State FIND FIRST f Find Replace State FIND NEXT throw new Illegal State Exception illegal find Replace state cannot replace without preceding find NON NLS 1 if operation Code FIND FIRST Reset if find String null find String length 0 return null Validate start offset if start Offset 0 start Offset length throw new Bad Location Exception int pattern Flags 0 if reg Ex Search pattern Flags Pattern MULTILINE if case Sensitive pattern Flags Pattern CASE INSENSITIVE if whole Word find String b find String b NON NLS 1 NON NLS 2 if reg Ex Search whole Word find String as Reg Pattern find String f Find Replace Match Offset start Offset if f Find Replace Matcher null f Find Replace Matcher pattern pattern equals find String f Find Replace Matcher pattern flags pattern Flags Commented out for optimization The call is not needed since FIND FIRST uses find int which resets the matcher f Find Replace Matcher reset else Pattern pattern Pattern compile find String pattern Flags f Find Replace Matcher pattern matcher this Set state f Find Replace State operation Code if operation Code REPLACE operation Code REPLACE FIND NEXT if reg Ex Search Pattern pattern f Find Replace Matcher pattern Matcher replace Text Matcher pattern matcher f Find Replace Matcher group try replace Text replace Text Matcher replace First replace Text catch Index Out Of Bounds Exception ex throw new Pattern Syntax Exception ex get Localized Message replace Text 1 int offset f Find Replace Matcher start f Document replace offset f Find Replace Matcher group length replace Text if operation Code REPLACE return new Region offset replace Text length if operation Code REPLACE if forward Search boolean found false if operation Code FIND FIRST found f Find Replace Matcher find start Offset else found f Find Replace Matcher find if operation Code REPLACE FIND NEXT f Find Replace State FIND NEXT if found f Find Replace Matcher group length 0 return new Region f Find Replace Matcher start f Find Replace Matcher group length else return null else backward search boolean found f Find Replace Matcher find 0 int index 1 int length 1 while found f Find Replace Matcher start f Find Replace Match Offset index f Find Replace Matcher start length f Find Replace Matcher group length found f Find Replace Matcher find index 1 f Find Replace Match Offset index if index 1 must set matcher to correct position f Find Replace Matcher find index return new Region index length else return null return null  findReplace REPLACE_FIND FIND_FIRST REPLACE_FIND DocumentEvent IDocumentListener startOffset FIND_FIRST findString FIND_FIRST replaceText REPLACE_FIND forwardSearch caseSensitive wholeWord findString isWhiteSpace regExSearch regExSearch wholeWord operationCode BadLocationException startOffset IllegalStateException REPLACE_FIND PatternSyntaxException IRegion findReplace FindReplaceOperationCode operationCode startOffset findString replaceText forwardSearch caseSensitive wholeWord regExSearch BadLocationException isTrue regExSearch wholeWord operationCode operationCode REPLACE_FIND_NEXT fFindReplaceState FIND_FIRST fFindReplaceState FIND_NEXT IllegalStateException findReplace operationCode FIND_FIRST findString findString startOffset startOffset BadLocationException patternFlags regExSearch patternFlags caseSensitive patternFlags CASE_INSENSITIVE wholeWord findString findString regExSearch wholeWord findString asRegPattern findString fFindReplaceMatchOffset startOffset fFindReplaceMatcher fFindReplaceMatcher findString fFindReplaceMatcher patternFlags FIND_FIRST fFindReplaceMatcher findString patternFlags fFindReplaceMatcher fFindReplaceState operationCode operationCode operationCode REPLACE_FIND_NEXT regExSearch fFindReplaceMatcher replaceTextMatcher fFindReplaceMatcher replaceText replaceTextMatcher replaceFirst replaceText IndexOutOfBoundsException PatternSyntaxException getLocalizedMessage replaceText fFindReplaceMatcher fDocument fFindReplaceMatcher replaceText operationCode replaceText operationCode forwardSearch operationCode FIND_FIRST fFindReplaceMatcher startOffset fFindReplaceMatcher operationCode REPLACE_FIND_NEXT fFindReplaceState FIND_NEXT fFindReplaceMatcher fFindReplaceMatcher fFindReplaceMatcher fFindReplaceMatcher fFindReplaceMatcher fFindReplaceMatchOffset fFindReplaceMatcher fFindReplaceMatcher fFindReplaceMatcher fFindReplaceMatchOffset fFindReplaceMatcher
Converts a non regex string to a pattern that can be used with the regex search engine param string the non regex pattern return the string converted to a regex pattern private String as Reg Pattern String string String Buffer out new String Buffer string length boolean quoting false for int i 0 length string length i length i char ch string char At i if ch if quoting out append E NON NLS 1 quoting false out append NON NLS 1 continue if quoting out append Q NON NLS 1 quoting true out append ch if quoting out append E NON NLS 1 return out to String  asRegPattern StringBuffer StringBuffer charAt toString
Substitutes the previous match with the given text Sends a code Document Event code to all registered code I Document Listener code param text the substitution text param reg Ex Replace if code true code code text code represents a regular expression return the replace region or code null code if there was no match throws Bad Location Exception if start Offset is an invalid document offset throws Illegal State Exception if a REPLACE or REPLACE FIND operation is not preceded by a successful FIND operation throws Pattern Syntax Exception if a regular expression has invalid syntax see Document Event see I Document Listener public I Region replace String text boolean reg Ex Replace throws Bad Location Exception return find Replace REPLACE 1 null text false false false reg Ex Replace  DocumentEvent IDocumentListener regExReplace BadLocationException startOffset IllegalStateException REPLACE_FIND PatternSyntaxException DocumentEvent IDocumentListener IRegion regExReplace BadLocationException findReplace regExReplace
see java lang Char Sequence length public int length return f Document get Length  CharSequence fDocument getLength
public char char At int index try return f Document get Char index catch Bad Location Exception e throw new Index Out Of Bounds Exception  charAt fDocument getChar BadLocationException IndexOutOfBoundsException
public Char Sequence sub Sequence int start int end try return f Document get start end start catch Bad Location Exception e throw new Index Out Of Bounds Exception  CharSequence subSequence fDocument BadLocationException IndexOutOfBoundsException
see java lang Object to String public String to String return f Document get  toString toString fDocument

Creates a new position reference param position the position to be referenced param refers To Offset code true code if position offset should be referenced param category the category the given position belongs to protected Position Reference Position position boolean refers To Offset String category f Position position f Refers To Offset refers To Offset f Category category  refersToOffset PositionReference refersToOffset fPosition fRefersToOffset refersToOffset fCategory
Returns the offset of the referenced position return the offset of the referenced position protected int get Offset return f Position get Offset  getOffset fPosition getOffset
Manipulates the offset of the referenced position param offset the new offset of the referenced position protected void set Offset int offset f Position set Offset offset  setOffset fPosition setOffset
Returns the length of the referenced position return the length of the referenced position protected int get Length return f Position get Length  getLength fPosition getLength
Manipulates the length of the referenced position param length the new length of the referenced position protected void set Length int length f Position set Length length  setLength fPosition setLength
Returns whether this reference points to the offset or end offset of the references position return code true code if the offset of the position is referenced code false code otherwise protected boolean refers To Offset return f Refers To Offset  refersToOffset fRefersToOffset
Returns the category of the referenced position return the category of the referenced position protected String get Category return f Category  getCategory fCategory
Returns the referenced position return the referenced position protected Position get Position return f Position  getPosition fPosition
Returns the referenced character position return the referenced character position protected int get Character Position if f Refers To Offset return get Offset return get Offset get Length  getCharacterPosition fRefersToOffset getOffset getOffset getLength
public int compare To Object obj if obj instanceof Position Reference Position Reference r Position Reference obj return get Character Position r get Character Position throw new Class Cast Exception  compareTo PositionReference PositionReference PositionReference getCharacterPosition getCharacterPosition ClassCastException
Creates a new updater for the given category param category the category protected Non Deleting Position Updater String category super category  NonDeletingPositionUpdater
see Default Position Updater not Deleted protected boolean not Deleted return true  DefaultPositionUpdater notDeleted notDeleted
see I Position Updater update Document Event public void update Document Event event remove Affected Positions event get Document  IPositionUpdater DocumentEvent DocumentEvent removeAffectedPositions getDocument
Creates a new updater param positions the affected positions param offset the offset public Update Affected Positions int positions int offset f Positions positions f Offset offset  UpdateAffectedPositions fPositions fOffset
see I Position Updater update Document Event public void update Document Event event update Affected Positions event get Document f Positions f Offset  IPositionUpdater DocumentEvent DocumentEvent updateAffectedPositions getDocument fPositions fOffset
Creates a new content formatter The content formatter operates by default in the partition aware mode There are no preconfigured formatting strategies Will use the default document partitioning if not further configured public Content Formatter f Partitioning I Document Extension3 DEFAULT PARTITIONING  ContentFormatter fPartitioning IDocumentExtension3 DEFAULT_PARTITIONING
Registers a strategy for a particular content type If there is already a strategy registered for this type the new strategy is registered instead of the old one If the given content type is code null code the given strategy is registered for all content types as is called only once per formatting session param strategy the formatting strategy to register or code null code to remove an existing one param content Type the content type under which to register or code null code for all content types public void set Formatting Strategy I Formatting Strategy strategy String content Type Assert is Not Null content Type if f Strategies null f Strategies new Hash Map if strategy null f Strategies remove content Type else f Strategies put content Type strategy  contentType setFormattingStrategy IFormattingStrategy contentType isNotNull contentType fStrategies fStrategies HashMap fStrategies contentType fStrategies contentType
Informs this content formatter about the names of those position categories which are used to manage the document s partitioning information and thus should be ignored when this formatter updates positions param categories the categories to be ignored deprecated incompatible with an open set of document partitionings The provided information is only used if this formatter can not compute the partition managing position categories public void set Partition Managing Position Categories String categories f External Partiton Managing Categories categories  setPartitionManagingPositionCategories fExternalPartitonManagingCategories
Sets the document partitioning to be used by this formatter param partitioning the document partitioning since 3 0 public void set Document Partitioning String partitioning f Partitioning partitioning  setDocumentPartitioning fPartitioning
Sets the formatter s operation mode param enable indicates whether the formatting process should be partition ware public void enable Partition Aware Formatting boolean enable f Is Partition Aware enable  enablePartitionAwareFormatting fIsPartitionAware
public I Formatting Strategy get Formatting Strategy String content Type Assert is Not Null content Type if f Strategies null return null return I Formatting Strategy f Strategies get content Type  IFormattingStrategy getFormattingStrategy contentType isNotNull contentType fStrategies IFormattingStrategy fStrategies contentType
public void format I Document document I Region region f Needs Computation true f Document document try if f Is Partition Aware format Partitions region else format Region region finally f Needs Computation true f Document null  IDocument IRegion fNeedsComputation fDocument fIsPartitionAware formatPartitions formatRegion fNeedsComputation fDocument
Determines the partitioning of the given region of the document Informs the formatting strategies of each partition about the start the process and the termination of the formatting session param region the document region to be formatted since 3 0 private void format Partitions I Region region add Partitioning Updater try Typed Position ranges get Partitioning region if ranges null start ranges get Indentation region get Offset format ranges stop ranges catch Bad Location Exception x remove Partitioning Updater  formatPartitions IRegion addPartitioningUpdater TypedPosition getPartitioning getIndentation getOffset BadLocationException removePartitioningUpdater
Formats the given region with the strategy registered for the default content type The strategy is informed about the start the process and the termination of the formatting session param region the region to be formatted since 3 0 private void format Region I Region region I Formatting Strategy strategy get Formatting Strategy I Document DEFAULT CONTENT TYPE if strategy null strategy formatter Starts get Indentation region get Offset format strategy new Typed Position region get Offset region get Length I Document DEFAULT CONTENT TYPE strategy formatter Stops  formatRegion IRegion IFormattingStrategy getFormattingStrategy IDocument DEFAULT_CONTENT_TYPE formatterStarts getIndentation getOffset TypedPosition getOffset getLength IDocument DEFAULT_CONTENT_TYPE formatterStops
Returns the partitioning of the given region of the document to be formatted As one partition after the other will be formatted and formatting will probably change the length of the formatted partition it must be kept track of the modifications in order to submit the correct partition to all formatting strategies For this all partitions are remembered as positions in a dedicated position category As formatting strategies might rely on each other calling them in reversed order is not an option param region the region for which the partitioning must be determined return the partitioning of the specified region exception Bad Location Exception of region is invalid in the document since 3 0 private Typed Position get Partitioning I Region region throws Bad Location Exception I Typed Region regions Text Utilities compute Partitioning f Document f Partitioning region get Offset region get Length false Typed Position positions new Typed Position regions length for int i 0 i regions length i positions i new Typed Position regions i try f Document add Position PARTITIONING positions i catch Bad Position Category Exception x should not happen return positions  BadLocationException TypedPosition getPartitioning IRegion BadLocationException ITypedRegion TextUtilities computePartitioning fDocument fPartitioning getOffset getLength TypedPosition TypedPosition TypedPosition fDocument addPosition BadPositionCategoryException
Fires code formatter Starts code to all formatter strategies which will be involved in the forthcoming formatting process param regions the partitioning of the document to be formatted param indentation the initial indentation private void start Typed Position regions String indentation for int i 0 i regions length i I Formatting Strategy s get Formatting Strategy regions i get Type if s null s formatter Starts indentation  formatterStarts TypedPosition IFormattingStrategy getFormattingStrategy getType formatterStarts
Formats one partition after the other using the formatter strategy registered for the partition s content type param ranges the partitioning of the document region to be formatted since 3 0 private void format Typed Position ranges for int i 0 i ranges length i I Formatting Strategy s get Formatting Strategy ranges i get Type if s null format s ranges i  TypedPosition IFormattingStrategy getFormattingStrategy getType
Formats the given region of the document using the specified formatting strategy In order to maintain positions correctly first all affected positions determined after all document listeners have been informed about the coming change the affected positions are removed to avoid that they are regularly updated After all position updaters have run the affected positions are updated with the formatter s information and added back to their categories right before the first document listener is informed about that a change happened param strategy the strategy to be used param region the region to be formatted since 3 0 private void format I Formatting Strategy strategy Typed Position region try final int offset region get Offset int length region get Length String content f Document get offset length final int positions get Affected Positions offset length String formatted strategy format content is Line Start offset get Indentation offset positions if formatted null formatted equals content I Position Updater first new Remove Affected Positions f Document insert Position Updater first 0 I Position Updater last new Update Affected Positions positions offset f Document add Position Updater last f Document replace offset length formatted f Document remove Position Updater first f Document remove Position Updater last catch Bad Location Exception x should not happen  IFormattingStrategy TypedPosition getOffset getLength fDocument getAffectedPositions isLineStart getIndentation IPositionUpdater RemoveAffectedPositions fDocument insertPositionUpdater IPositionUpdater UpdateAffectedPositions fDocument addPositionUpdater fDocument fDocument removePositionUpdater fDocument removePositionUpdater BadLocationException
Fires code formatter Stops code to all formatter strategies which were involved in the formatting process which is about to terminate param regions the partitioning of the document which has been formatted private void stop Typed Position regions for int i 0 i regions length i I Formatting Strategy s get Formatting Strategy regions i get Type if s null s formatter Stops  formatterStops TypedPosition IFormattingStrategy getFormattingStrategy getType formatterStops
Installs those updaters which the formatter needs to keep track of the partitions since 3 0 private void add Partitioning Updater f Partitioning Updater new Non Deleting Position Updater PARTITIONING f Document add Position Category PARTITIONING f Document add Position Updater f Partitioning Updater  addPartitioningUpdater fPartitioningUpdater NonDeletingPositionUpdater fDocument addPositionCategory fDocument addPositionUpdater fPartitioningUpdater
Removes the formatter s internal position updater and category since 3 0 private void remove Partitioning Updater try f Document remove Position Updater f Partitioning Updater f Document remove Position Category PARTITIONING f Partitioning Updater null catch Bad Position Category Exception x should not happen  removePartitioningUpdater fDocument removePositionUpdater fPartitioningUpdater fDocument removePositionCategory fPartitioningUpdater BadPositionCategoryException
Returns the partition managing position categories for the formatted document return the position managing position categories since 3 0 private String get Partition Managing Categories if f Needs Computation f Needs Computation false f Partition Managing Categories Text Utilities compute Partition Managing Categories f Document if f Partition Managing Categories null f Partition Managing Categories f External Partiton Managing Categories return f Partition Managing Categories  getPartitionManagingCategories fNeedsComputation fNeedsComputation fPartitionManagingCategories TextUtilities computePartitionManagingCategories fDocument fPartitionManagingCategories fPartitionManagingCategories fExternalPartitonManagingCategories fPartitionManagingCategories
Determines whether the given document position category should be ignored by this formatter s position updating param category the category to check return code true code if the category should be ignored code false code otherwise private boolean ignore Category String category if PARTITIONING equals category return true String categories get Partition Managing Categories if categories null for int i 0 i categories length i if categories i equals category return true return false  ignoreCategory getPartitionManagingCategories
Determines all embracing overlapping and follow up positions for the given region of the document param offset the offset of the document region to be formatted param length the length of the document to be formatted since 3 0 private void determine Positions To Update int offset int length String categories f Document get Position Categories if categories null for int i 0 i categories length i if ignore Category categories i continue try Position positions f Document get Positions categories i for int j 0 j positions length j Position p positions j if p overlaps With offset length if offset p get Offset f Overlapping Position References add new Position Reference p true categories i if p get Offset p get Length offset length f Overlapping Position References add new Position Reference p false categories i catch Bad Position Category Exception x can not happen  determinePositionsToUpdate fDocument getPositionCategories ignoreCategory fDocument getPositions overlapsWith getOffset fOverlappingPositionReferences PositionReference getOffset getLength fOverlappingPositionReferences PositionReference BadPositionCategoryException
Returns all offset and the end offset of all positions overlapping with the specified document range param offset the offset of the document region to be formatted param length the length of the document to be formatted return all character positions of the interleaving positions since 3 0 private int get Affected Positions int offset int length f Overlapping Position References new Array List determine Positions To Update offset length Collections sort f Overlapping Position References int positions new int f Overlapping Position References size for int i 0 i positions length i Position Reference r Position Reference f Overlapping Position References get i positions i r get Character Position offset return positions  getAffectedPositions fOverlappingPositionReferences ArrayList determinePositionsToUpdate fOverlappingPositionReferences fOverlappingPositionReferences PositionReference PositionReference fOverlappingPositionReferences getCharacterPosition
Removes the affected positions from their categories to avoid that they are invalidly updated param document the document private void remove Affected Positions I Document document int size f Overlapping Position References size for int i 0 i size i Position Reference r Position Reference f Overlapping Position References get i try document remove Position r get Category r get Position catch Bad Position Category Exception x can not happen  removeAffectedPositions IDocument fOverlappingPositionReferences PositionReference PositionReference fOverlappingPositionReferences removePosition getCategory getPosition BadPositionCategoryException
Updates all the overlapping positions Note all other positions are automatically updated by their document position updaters param document the document to has been formatted param positions the adapted character positions to be used to update the document positions param offset the offset of the document region that has been formatted protected void update Affected Positions I Document document int positions int offset if document f Document return if positions length 0 return for int i 0 i positions length i Position Reference r Position Reference f Overlapping Position References get i if r refers To Offset r set Offset offset positions i else r set Length offset positions i r get Offset Position p r get Position String category r get Category if document contains Position category p offset p length try if position About To Be Added document category p document add Position r get Category p catch Bad Position Category Exception x can not happen catch Bad Location Exception x should not happen f Overlapping Position References null  updateAffectedPositions IDocument fDocument PositionReference PositionReference fOverlappingPositionReferences refersToOffset setOffset setLength getOffset getPosition getCategory containsPosition positionAboutToBeAdded addPosition getCategory BadPositionCategoryException BadLocationException fOverlappingPositionReferences
The given position is about to be added to the given position category of the given document p This default implementation return code true code param document the document param category the position category param position the position that will be added return code true code if the position can be added code false code if it should be ignored protected boolean position About To Be Added I Document document String category Position position return true  positionAboutToBeAdded IDocument
Returns the indentation of the line of the given offset param offset the offset return the indentation of the line of the offset since 3 0 private String get Indentation int offset try int start f Document get Line Of Offset offset start f Document get Line Offset start int end start char c f Document get Char end while t c c c f Document get Char end return f Document get start end start catch Bad Location Exception x return NON NLS 1  getIndentation fDocument getLineOfOffset fDocument getLineOffset fDocument getChar fDocument getChar fDocument BadLocationException
Determines whether the offset is the beginning of a line in the given document param offset the offset return code true code if offset is the beginning of a line exception Bad Location Exception if offset is invalid in document since 3 0 private boolean is Line Start int offset throws Bad Location Exception int start f Document get Line Of Offset offset start f Document get Line Offset start return start offset  BadLocationException isLineStart BadLocationException fDocument getLineOfOffset fDocument getLineOffset

see org eclipse jface text formatter I Formatting Strategy Extension format public void format f Current Preferences Map f Preferences remove First  IFormattingStrategyExtension fCurrentPreferences fPreferences removeFirst
see org eclipse jface text formatter I Formatting Strategy format java lang String boolean java lang String int public String format String content boolean start String indentation int positions return null  IFormattingStrategy
see org eclipse jface text formatter I Formatting Strategy Extension formatter Starts org eclipse jface text formatter I Formatting Context public void formatter Starts final I Formatting Context context f Preferences add Last context get Property Formatting Context Properties CONTEXT PREFERENCES  IFormattingStrategyExtension formatterStarts IFormattingContext formatterStarts IFormattingContext fPreferences addLast getProperty FormattingContextProperties CONTEXT_PREFERENCES
see I Formatting Strategy formatter Starts String public void formatter Starts final String indentation Do nothing  IFormattingStrategy formatterStarts formatterStarts
public void formatter Stops f Preferences clear f Current Preferences null  formatterStops fPreferences fCurrentPreferences
Returns the preferences used for the current formatting step return The preferences for the current formatting step public final Map get Preferences return f Current Preferences  getPreferences fCurrentPreferences

see org eclipse jface text formatter I Formatting Context dispose public void dispose f Map clear  IFormattingContext fMap
see org eclipse jface text formatter I Formatting Context get Preference Keys public String get Preference Keys return new String  IFormattingContext getPreferenceKeys getPreferenceKeys
see org eclipse jface text formatter I Formatting Context get Property java lang Object public Object get Property Object key return f Map get key  IFormattingContext getProperty getProperty fMap
see org eclipse jface text formatter I Formatting Context is Boolean Preference java lang String public boolean is Boolean Preference String key return false  IFormattingContext isBooleanPreference isBooleanPreference
see org eclipse jface text formatter I Formatting Context is Double Preference java lang String public boolean is Double Preference String key return false  IFormattingContext isDoublePreference isDoublePreference
see org eclipse jface text formatter I Formatting Context is Float Preference java lang String public boolean is Float Preference String key return false  IFormattingContext isFloatPreference isFloatPreference
see org eclipse jface text formatter I Formatting Context is Integer Preference java lang String public boolean is Integer Preference String key return false  IFormattingContext isIntegerPreference isIntegerPreference
see org eclipse jface text formatter I Formatting Context is Long Preference java lang String public boolean is Long Preference String key return false  IFormattingContext isLongPreference isLongPreference
see org eclipse jface text formatter I Formatting Context is String Preference java lang String public boolean is String Preference String key return false  IFormattingContext isStringPreference isStringPreference
public void map To Store Map map I Preference Store store final String preferences get Preference Keys String result null String preference null for int index 0 index preferences length index preference preferences index result String map get preference if result null try if is Boolean Preference preference store set Value preference result equals I Preference Store TRUE else if is Integer Preference preference store set Value preference Integer parse Int result else if is String Preference preference store set Value preference result else if is Double Preference preference store set Value preference Double parse Double result else if is Float Preference preference store set Value preference Float parse Float result else if is Long Preference preference store set Value preference Long parse Long result catch Number Format Exception exception Do nothing  mapToStore IPreferenceStore getPreferenceKeys isBooleanPreference setValue IPreferenceStore isIntegerPreference setValue parseInt isStringPreference setValue isDoublePreference setValue parseDouble isFloatPreference setValue parseFloat isLongPreference setValue parseLong NumberFormatException
see org eclipse jface text formatter I Formatting Context set Property java lang Object java lang Object public void set Property Object key Object property f Map put key property  IFormattingContext setProperty setProperty fMap
public void store To Map I Preference Store store Map map boolean use Default final String preferences get Preference Keys String preference null for int index 0 index preferences length index preference preferences index if is Boolean Preference preference map put preference use Default store get Default Boolean preference store get Boolean preference I Preference Store TRUE I Preference Store FALSE else if is Integer Preference preference map put preference String value Of use Default store get Default Int preference store get Int preference else if is String Preference preference map put preference use Default store get Default String preference store get String preference else if is Double Preference preference map put preference String value Of use Default store get Default Double preference store get Double preference else if is Float Preference preference map put preference String value Of use Default store get Default Float preference store get Float preference else if is Long Preference preference map put preference String value Of use Default store get Default Long preference store get Long preference  storeToMap IPreferenceStore useDefault getPreferenceKeys isBooleanPreference useDefault getDefaultBoolean getBoolean IPreferenceStore IPreferenceStore isIntegerPreference valueOf useDefault getDefaultInt getInt isStringPreference useDefault getDefaultString getString isDoublePreference valueOf useDefault getDefaultDouble getDouble isFloatPreference valueOf useDefault getDefaultFloat getFloat isLongPreference valueOf useDefault getDefaultLong getLong

Ensure that this class cannot be instantiated private Formatting Context Properties  FormattingContextProperties

Formats the given region of the specified document The formatter may safely assume that it is the only subject that modifies the document at this point in time param document the document to be formatted param region the region within the document to be formatted 
Returns the formatting strategy registered for the given content type param content Type the content type for which to look up the formatting strategy return the formatting strategy for the given content type or code null code if there is no such strategy  contentType

Formats the given region of the specified document p The formatter may safely assume that it is the only subject that modifies the document at this point in time This method is fully reentrant but not thread safe p The formatting process performed by code format I Document I Formatting Context code happens as follows ul li In a first pass the content formatter formats the range of the document to be formatted by using the master formatting strategy This happens regardless of the content type of the underlying partition li li In the second pass the range is formatted again this time using the registered slave formatting strategies For each partition contained in the range to be formatted the content formatter determines its content type and formats the partition with the correct formatting strategy li param document The document to be formatted param context The formatting context to pass to the formatting strategies This argument must not be code null code  IDocument IFormattingContext

Dispose of the formatting context p Must be called after the formatting context has been used in a formatting process 
Returns the preference keys used for the retrieval of formatting preferences return The preference keys for formatting 
Retrieves the property code key code from the formatting context param key Key of the property to store in the context return The property code key code if available code null code otherwise 
Is this preference key for a boolean preference param key The preference key to query its type return code true code iff this key is for a boolean preference code false code otherwise 
Is this preference key for a double preference param key The preference key to query its type return code true code iff this key is for a double preference code false code otherwise 
Is this preference key for a float preference param key The preference key to query its type return code true code iff this key is for a float preference code false code otherwise 
Is this preference key for an integer preference param key The preference key to query its type return code true code iff this key is for an integer preference code false code otherwise 
Is this preference key for a long preference param key The preference key to query its type return code true code iff this key is for a long preference code false code otherwise 
Is this preference key for a string preference param key The preference key to query its type return code true code iff this key is for a string preference code false code otherwise 
Stores the preferences from a map to a preference store p Note that the preference keys returned by link get Preference Keys must not be used in the preference store Otherwise the preferences are overwritten p param map Map to retrieve the preferences from param store Preference store to store the preferences in  getPreferenceKeys
Stores the property code key code in the formatting context param key Key of the property to store in the context param property Property to store in the context If already present the new property overwrites the present one 
Retrieves the preferences from a preference store in a map p Note that the preference keys returned by link get Preference Keys must not be used in the map Otherwise the preferences are overwritten p param store Preference store to retrieve the preferences from param map Map to store the preferences in param use Default code true code if the default preferences should be used code false code otherwise  getPreferenceKeys useDefault

Informs the strategy about the start of a formatting process in which it will participate param initial Indentation the indent string of the first line at which the overall formatting process starts  initialIndentation
Formats the given string During the formatting process this strategy must update the given character positions according to the changes applied to the given string param content the initial string to be formatted param is Line Start indicates whether the beginning of content is a line start in its document param indentation the indentation string to be used param positions the character positions to be updated return the formatted string  isLineStart
Informs the strategy that the formatting process in which it has participated has been finished 

Formats the region with the properties indicated in the formatting context previously supplied by code formatter Starts I Formatting Context code  formatterStarts IFormattingContext
Informs the strategy about the start of a formatting process in which it will participate param context Formatting context used in the corresponding formatting process 
Informs the strategy that the formatting process in which it has participated has been finished 

Creates a new non deleting position updater param category The position category to update its positions public Non Deleting Position Updater final String category super category  NonDeletingPositionUpdater
protected final boolean not Deleted if f Offset f Position offset f Position offset f Position length f Offset f Length int offset f Offset f Length if offset f Document get Length try boolean moved false char character f Document get Char offset while offset f Document get Length Character is Whitespace character moved true character f Document get Char offset if moved offset catch Bad Location Exception exception Can not happen f Position offset offset f Position length 0 return true  notDeleted fOffset fPosition fPosition fPosition fOffset fLength fOffset fLength fDocument getLength fDocument getChar fDocument getLength isWhitespace fDocument getChar BadLocationException fPosition fPosition
Creates a new content formatter param partitioning the document partitioning for this formatter param type the default content type public Multi Pass Content Formatter final String partitioning final String type f Partitioning partitioning f Type type  MultiPassContentFormatter fPartitioning fType
public final void format final I Document medium final I Formatting Context context context set Property Formatting Context Properties CONTEXT MEDIUM medium final Boolean document Boolean context get Property Formatting Context Properties CONTEXT DOCUMENT if document null document boolean Value final I Region region I Region context get Property Formatting Context Properties CONTEXT REGION if region null try format Master context medium region get Offset region get Length finally format Slaves context medium region get Offset region get Length else try format Master context medium 0 medium get Length finally format Slaves context medium 0 medium get Length  IDocument IFormattingContext setProperty FormattingContextProperties CONTEXT_MEDIUM getProperty FormattingContextProperties CONTEXT_DOCUMENT booleanValue IRegion IRegion getProperty FormattingContextProperties CONTEXT_REGION formatMaster getOffset getLength formatSlaves getOffset getLength formatMaster getLength formatSlaves getLength
public final void format final I Document medium final I Region region final Formatting Context context new Formatting Context context set Property Formatting Context Properties CONTEXT DOCUMENT Boolean FALSE context set Property Formatting Context Properties CONTEXT REGION region format medium context  IDocument IRegion FormattingContext FormattingContext setProperty FormattingContextProperties CONTEXT_DOCUMENT setProperty FormattingContextProperties CONTEXT_REGION
Formats the document specified in the formatting context with the master formatting strategy p The master formatting strategy covers all regions of the document The offset of the region to be formatted is aligned on line start boundaries whereas the end index of the region remains the same For this formatting type the document partitioning is not taken into account param context The formatting context to use param document The document to operate on param offset The offset of the region to format param length The length of the region to format protected void format Master final I Formatting Context context final I Document document int offset int length try final int delta offset document get Line Information Of Offset offset get Offset offset delta length delta catch Bad Location Exception exception Do nothing if f Master null context set Property Formatting Context Properties CONTEXT PARTITION new Typed Position offset length f Type f Master formatter Starts context f Master format f Master formatter Stops  formatMaster IFormattingContext IDocument getLineInformationOfOffset getOffset BadLocationException fMaster setProperty FormattingContextProperties CONTEXT_PARTITION TypedPosition fType fMaster formatterStarts fMaster fMaster formatterStops
Formats the document specified in the formatting context with the formatting strategy registered for the content type p For this formatting type only slave strategies are used The region to be formatted is aligned on partition boundaries of the underlying content type The exact formatting strategy is determined by the underlying content type of the document partitioning param context The formatting context to use param document The document to operate on param offset The offset of the region to format param length The length of the region to format param type The content type of the region to format protected void format Slave final I Formatting Context context final I Document document final int offset final int length final String type final I Formatting Strategy Extension strategy I Formatting Strategy Extension f Slaves get type if strategy null context set Property Formatting Context Properties CONTEXT PARTITION new Typed Position offset length type strategy formatter Starts context strategy format strategy formatter Stops  formatSlave IFormattingContext IDocument IFormattingStrategyExtension IFormattingStrategyExtension fSlaves setProperty FormattingContextProperties CONTEXT_PARTITION TypedPosition formatterStarts formatterStops
Formats the document specified in the formatting context with the slave formatting strategies p For each content type of the region to be formatted in the document partitioning the registered slave formatting strategy is used to format that particular region The region to be formatted is aligned on partition boundaries of the underlying content type If the content type is the document s default content type nothing happens param context The formatting context to use param document The document to operate on param offset The offset of the region to format param length The length of the region to format protected void format Slaves final I Formatting Context context final I Document document final int offset final int length Map partitioners new Hash Map 0 try final I Typed Region partitions Text Utilities compute Partitioning document f Partitioning offset length false if f Type equals partitions 0 get Type partitions 0 Text Utilities get Partition document f Partitioning partitions 0 get Offset false if partitions length 1 if f Type equals partitions partitions length 1 get Type partitions partitions length 1 Text Utilities get Partition document f Partitioning partitions partitions length 1 get Offset false String type null I Typed Region partition null partitioners Text Utilities remove Document Partitioners document for int index partitions length 1 index 0 index partition partitions index type partition get Type if f Type equals type format Slave context document partition get Offset partition get Length type catch Bad Location Exception exception Should not happen finally Text Utilities add Document Partitioners document partitioners  formatSlaves IFormattingContext IDocument HashMap ITypedRegion TextUtilities computePartitioning fPartitioning fType getType TextUtilities getPartition fPartitioning getOffset fType getType TextUtilities getPartition fPartitioning getOffset ITypedRegion TextUtilities removeDocumentPartitioners getType fType formatSlave getOffset getLength BadLocationException TextUtilities addDocumentPartitioners
see org eclipse jface text formatter I Content Formatter get Formatting Strategy java lang String public final I Formatting Strategy get Formatting Strategy final String type return null  IContentFormatter getFormattingStrategy IFormattingStrategy getFormattingStrategy
Registers a master formatting strategy p The strategy may already be registered with a certain content type as slave strategy The master strategy is registered for the default content type of documents If a master strategy has already been registered it is overridden by the new one param strategy The master formatting strategy must implement link I Formatting Strategy Extension public final void set Master Strategy final I Formatting Strategy strategy Assert is True strategy instanceof I Formatting Strategy Extension f Master I Formatting Strategy Extension strategy  IFormattingStrategyExtension setMasterStrategy IFormattingStrategy isTrue IFormattingStrategyExtension fMaster IFormattingStrategyExtension
Registers a slave formatting strategy for a certain content type p The strategy may already be registered as master strategy If it is already registered as slave strategy for the specified content type nothing happens However the same strategy may be registered with several content types Slave strategies cannot be registered for the default content type of documents param strategy The slave formatting strategy param type The content type to register this strategy with must implement link I Formatting Strategy Extension public final void set Slave Strategy final I Formatting Strategy strategy final String type Assert is True strategy instanceof I Formatting Strategy Extension if f Type equals type f Slaves put type strategy  IFormattingStrategyExtension setSlaveStrategy IFormattingStrategy isTrue IFormattingStrategyExtension fType fSlaves

Creates a new empty text store using the specified low and high watermarks param low Watermark if this gap is ever smaller than this it will automatically be extended param high Watermark if the gap is ever larger than this it will automatically be shrunken public Gap Text Store int low Watermark int high Watermark Assert is True low Watermark high Watermark f Low Watermark low Watermark f High Watermark high Watermark  lowWatermark highWatermark GapTextStore lowWatermark highWatermark isTrue lowWatermark highWatermark fLowWatermark lowWatermark fHighWatermark highWatermark
Adjusts the gap so that is at the right offset and capable of handling the addition of a specified number of characters without having to be shifted The code size Hint code represents the range that will be filled afterwards If the gap is already at the right offset it must only be resized if it will be no longer between the low and high watermark However on delete size Hint lt 0 at the edges of the gap the gap is only enlarged param offset the offset at which the change happens param size Hint the number of character which will be inserted private void adjust Gap int offset int size Hint if offset f Gap Start int size f Gap End f Gap Start size Hint if f Low Watermark size size f High Watermark return move And Resize Gap offset size Hint  sizeHint sizeHint sizeHint adjustGap sizeHint fGapStart fGapEnd fGapStart sizeHint fLowWatermark fHighWatermark moveAndResizeGap sizeHint
Moves the gap to the specified offset and adjust its size to the anticipated change size The given size represents the expected range of the gap that will be filled after the gap has been moved Thus the gap is resized to actual size the specified size and moved to the given offset param offset the offset where the gap is moved to param size the anticipated size of the change private void move And Resize Gap int offset int size char content null int old Size f Gap End f Gap Start int new Size f High Watermark size if new Size 0 if old Size 0 content new char f Content length old Size System arraycopy f Content 0 content 0 f Gap Start System arraycopy f Content f Gap End content f Gap Start content length f Gap Start f Content content f Gap Start f Gap End offset return content new char f Content length new Size old Size int new Gap Start offset int new Gap End new Gap Start new Size if old Size 0 System arraycopy f Content 0 content 0 new Gap Start System arraycopy f Content new Gap Start content new Gap End content length new Gap End else if new Gap Start f Gap Start int delta f Gap Start new Gap Start System arraycopy f Content 0 content 0 new Gap Start System arraycopy f Content new Gap Start content new Gap End delta System arraycopy f Content f Gap End content new Gap End delta f Content length f Gap End else int delta new Gap Start f Gap Start System arraycopy f Content 0 content 0 f Gap Start System arraycopy f Content f Gap End content f Gap Start delta System arraycopy f Content f Gap End delta content new Gap End content length new Gap End f Content content f Gap Start new Gap Start f Gap End new Gap End  moveAndResizeGap oldSize fGapEnd fGapStart newSize fHighWatermark newSize oldSize fContent oldSize fContent fGapStart fContent fGapEnd fGapStart fGapStart fContent fGapStart fGapEnd fContent newSize oldSize newGapStart newGapEnd newGapStart newSize oldSize fContent newGapStart fContent newGapStart newGapEnd newGapEnd newGapStart fGapStart fGapStart newGapStart fContent newGapStart fContent newGapStart newGapEnd fContent fGapEnd newGapEnd fContent fGapEnd newGapStart fGapStart fContent fGapStart fContent fGapEnd fGapStart fContent fGapEnd newGapEnd newGapEnd fContent fGapStart newGapStart fGapEnd newGapEnd
public char get int offset if offset f Gap Start return f Content offset int gap Length f Gap End f Gap Start return f Content offset gap Length  fGapStart fContent gapLength fGapEnd fGapStart fContent gapLength
public String get int offset int length int end offset length if f Content null return NON NLS 1 if end f Gap Start return new String f Content offset length if f Gap Start offset int gap Length f Gap End f Gap Start return new String f Content offset gap Length length String Buffer buf new String Buffer buf append f Content offset f Gap Start offset buf append f Content f Gap End end f Gap Start return buf to String  fContent fGapStart fContent fGapStart gapLength fGapEnd fGapStart fContent gapLength StringBuffer StringBuffer fContent fGapStart fContent fGapEnd fGapStart toString
see org eclipse jface text I Text Store get Length public int get Length int length f Gap End f Gap Start return f Content length length  ITextStore getLength getLength fGapEnd fGapStart fContent
public void replace int offset int length String text int text Length text null 0 text length handle delete at the edges of the gap if text Length 0 if offset f Gap Start offset length f Gap Start f Gap Start 1 f Gap End 1 length f Gap Start offset f Gap Start offset f Gap End length return move gap adjust Gap offset length text Length length overwrite int min Math min text Length length for int i offset j 0 i offset min i j f Content i text char At j if length text Length enlarge the gap f Gap Start length text Length else if text Length length shrink gap f Gap Start text Length length for int i length i text Length i f Content offset i text char At i  textLength textLength fGapStart fGapStart fGapStart fGapEnd fGapStart fGapStart fGapEnd adjustGap textLength textLength fContent charAt textLength fGapStart textLength textLength fGapStart textLength textLength fContent charAt
Sets the content to code text code and removes the gap since there are no sensible predictions about where the next change will occur see I Text Store set String public void set String text if text null text NON NLS 1 f Content text to Char Array f Gap Start 1 f Gap End 1  ITextStore fContent toCharArray fGapStart fGapEnd
Returns a copy of the content of this text store For internal use only return a copy of the content of this text store protected String get Content As String return new String f Content  getContentAsString fContent
Returns the start index of the gap managed by this text store For internal use only return the start index of the gap managed by this text store protected int get Gap Start Index return f Gap Start  getGapStartIndex fGapStart
Returns the end index of the gap managed by this text store For internal use only return the end index of the gap managed by this text store protected int get Gap End Index return f Gap End  getGapEndIndex fGapEnd

Allows the strategy to manipulate the document command param document the document that will be changed param command the document command describing the change 

Returns the character at the given document offset in this document param offset a document offset return the character at the offset exception Bad Location Exception if the offset is invalid in this document  BadLocationException
Returns the number of characters in this document return the number of characters in this document 
Returns this document s complete text return the document s complete text 
Returns this document s text for the specified range param offset the document offset param length the length of the specified range return the document s text for the specified range exception Bad Location Exception if the range is invalid in this document  BadLocationException
Replaces the content of the document with the given text Sends a code Document Event code to all registered code I Document Listener code This method is a convenience method for code replace 0 get Length text code param text the new content of the document see Document Event see I Document Listener  DocumentEvent IDocumentListener getLength DocumentEvent IDocumentListener
Substitutes the given text for the specified document range Sends a code Document Event code to all registered code I Document Listener code param offset the document offset param length the length of the specified range param text the substitution text exception Bad Location Exception if the offset is invalid in this document see Document Event see I Document Listener  DocumentEvent IDocumentListener BadLocationException DocumentEvent IDocumentListener
Registers the document listener with the document After registration the I Document Listener is informed about each change of this document If the listener is already registered nothing happens p An code I Document Listener code may call back to this method when being inside a document notification param listener the listener to be registered  IDocumentListener IDocumentListener
Removes the listener from the document s list of document listeners If the listener is not registered with the document nothing happens p An code I Document Listener code may call back to this method when being inside a document notification param listener the listener to be removed  IDocumentListener
Adds the given document listener as one which is notified before those document listeners added with code add Document Listener code are notified If the given listener is also registered using code add Document Listener code it will be notified twice If the listener is already registered nothing happens p This method is not for public use param document Adapter the listener to be added as pre notified document listener see remove Prenotified Document Listener I Document Listener  addDocumentListener addDocumentListener documentAdapter removePrenotifiedDocumentListener IDocumentListener
Removes the given document listener from the document s list of pre notified document listeners If the listener is not registered with the document nothing happens p This method is not for public use param document Adapter the listener to be removed see add Prenotified Document Listener I Document Listener  documentAdapter addPrenotifiedDocumentListener IDocumentListener
Adds a new position category to the document If the position category already exists nothing happens param category the category to be added 
Deletes the position category from the document All positions in this category are thus deleted as well param category the category to be removed exception Bad Position Category Exception if category is undefined in this document  BadPositionCategoryException
Returns all position categories of this document This includes the default position category return the document s position categories 
Checks the presence of the specified position category param category the category to check return code true code if category is defined 
Adds the position to the document s default position category This is a convenience method for code add Position DEFAULT CATEGORY position code param position the position to be added exception Bad Location Exception if position describes an invalid range in this document  addPosition DEFAULT_CATEGORY BadLocationException
Removes the given position from the document s default position category This is a convenience method for code remove Position DEFAULT CATEGORY position code param position the position to be removed  removePosition DEFAULT_CATEGORY
Adds the position to the specified position category of the document A position that has been added to a position category is updated on each change applied to the document Positions may be added multiple times The order of the category is maintained param category the category to which to add param position the position to be added exception Bad Location Exception if position describes an invalid range in this document exception Bad Position Category Exception if the category is undefined in this document  BadLocationException BadPositionCategoryException
Removes the given position from the specified position category If the position is not part of the specified category nothing happens If the position has been added multiple times only the first occurrence is deleted param category the category from which to delete param position the position to be deleted exception Bad Position Category Exception if category is undefined in this document  BadPositionCategoryException
Returns all positions of the given position category The positions are ordered according to the category s order Manipulating this list does not affect the document but manipulating the position does affect the document param category the category return the list of all positions exception Bad Position Category Exception if category is undefined in this document  BadPositionCategoryException
Determines whether a position described by the parameters is managed by this document param category the category to check param offset the offset of the position to find param length the length of the position to find return code true code if position is found 
Computes the index at which a code Position code with the specified offset would be inserted into the given category As the ordering inside a category only depends on the offset the index must be chosen to be the first of all positions with the same offset param category the category in which would be added param offset the position offset to be considered return the index into the category exception Bad Location Exception if offset is invalid in this document exception Bad Position Category Exception if category is undefined in this document  BadLocationException BadPositionCategoryException
Appends a new position updater to the document s list of position updaters Position updaters may be added multiple times p An code I Position Updater code may call back to this method when being inside a document notification param updater the updater to be added  IPositionUpdater
Removes the position updater from the document s list of position updaters If the position updater has multiple occurrences only the first occurrence is removed If the position updater is not registered with this document nothing happens p An code I Position Updater code may call back to this method when being inside a document notification param updater the updater to be removed  IPositionUpdater
Inserts the position updater at the specified index in the document s list of position updaters Positions updaters may be inserted multiple times p An code I Position Updater code may call back to this method when being inside a document notification param updater the updater to be inserted param index the index in the document s updater list  IPositionUpdater
Returns the list of position updaters attached to the document return the list of position updaters 
Returns the set of legal content types of document partitions This set can be empty The set can contain more content types than contained by the result of code get Partitioning 0 get Length code p Use link I Document Extension3 get Legal Content Types String when the document supports multiple partitionings In that case this method is equivalent to pre I Document Extension3 extension I Document Extension3 document return extension get Legal Content Types I Document Extension3 DEFAULT PARTITIONING pre return the set of legal content types  getPartitioning getLength IDocumentExtension3 getLegalContentTypes IDocumentExtension3 IDocumentExtension3 getLegalContentTypes IDocumentExtension3 DEFAULT_PARTITIONING
Returns the type of the document partition containing the given offset This is a convenience method for code get Partition offset get Type code p Use link I Document Extension3 get Content Type String int boolean when the document supports multiple partitionings In that case this method is equivalent to pre I Document Extension3 extension I Document Extension3 document return extension get Content Types I Document Extension3 DEFAULT PARTITIONING offset false pre param offset the document offset return the partition type exception Bad Location Exception if offset is invalid in this document  getPartition getType IDocumentExtension3 getContentType IDocumentExtension3 IDocumentExtension3 getContentTypes IDocumentExtension3 DEFAULT_PARTITIONING BadLocationException
Returns the document partition in which the position is located p Use link I Document Extension3 get Partition String int boolean when the document supports multiple partitionings In that case this method is equivalent pre I Document Extension3 extension I Document Extension3 document return extension get Partition I Document Extension3 DEFAULT PARTITIONING offset false pre param offset the document offset return a specification of the partition exception Bad Location Exception if offset is invalid in this document  IDocumentExtension3 getPartition IDocumentExtension3 IDocumentExtension3 getPartition IDocumentExtension3 DEFAULT_PARTITIONING BadLocationException
Computes the partitioning of the given document range using the document s partitioner p Use link I Document Extension3 compute Partitioning String int int boolean when the document supports multiple partitionings In that case this method is equivalent pre I Document Extension3 extension I Document Extension3 document return extension compute Partitioning I Document Extension3 DEFAULT PARTITIONING offset length false pre param offset the document offset at which the range starts param length the length of the document range return a specification of the range s partitioning exception Bad Location Exception if the range is invalid in this document  IDocumentExtension3 computePartitioning IDocumentExtension3 IDocumentExtension3 computePartitioning IDocumentExtension3 DEFAULT_PARTITIONING BadLocationException
Registers the document partitioning listener with the document After registration the document partitioning listener is informed about each partition change cause by a document manipulation or by changing the document s partitioner If a document partitioning listener is also a document listener the following notification sequence is guaranteed if a document manipulation changes the document partitioning ul li listener document About To Be Changed Document Event li listener document Partitioning Changed li listener document Changed Document Event ul If the listener is already registered nothing happens p An code I Document Partitioning Listener code may call back to this method when being inside a document notification param listener the listener to be added  documentAboutToBeChanged DocumentEvent documentPartitioningChanged documentChanged DocumentEvent IDocumentPartitioningListener
Removes the listener from this document s list of document partitioning listeners If the listener is not registered with the document nothing happens p An code I Document Partitioning Listener code may call back to this method when being inside a document notification param listener the listener to be removed  IDocumentPartitioningListener
Sets this document s partitioner The caller of this method is responsible for disconnecting the document s old partitioner from the document and to connect the new partitioner to the document Informs all document partitioning listeners about this change p Use link I Document Extension3 set Document Partitioner String I Document Partitioner when the document supports multiple partitionings In that case this method is equivalent to pre I Document Extension3 extension I Document Extension3 document extension set Document Partitioner I Document Extension3 DEFAULT PARTITIONING partitioner pre param partitioner the document s new partitioner see I Document Partitioning Listener  IDocumentExtension3 setDocumentPartitioner IDocumentPartitioner IDocumentExtension3 IDocumentExtension3 setDocumentPartitioner IDocumentExtension3 DEFAULT_PARTITIONING IDocumentPartitioningListener
Returns this document s partitioner p Use link I Document Extension3 get Document Partitioner String when the document supports multiple partitionings In that case this method is equivalent to pre I Document Extension3 extension I Document Extension3 document return extension get Document Partitioner I Document Extension3 DEFAULT PARTITIONING pre return this document s partitioner  IDocumentExtension3 getDocumentPartitioner IDocumentExtension3 IDocumentExtension3 getDocumentPartitioner IDocumentExtension3 DEFAULT_PARTITIONING
Returns the length of the given line including the line s delimiter param line the line of interest return the length of the line exception Bad Location Exception if the line number is invalid in this document  BadLocationException
Returns the number of the line at which the character of the specified position is located The first line has the line number 0 A new line starts directly after a line delimiter code offset document length code is a valid argument although there is no corresponding character param offset the document offset return the number of the line exception Bad Location Exception if the offset is invalid in this document  BadLocationException
Determines the offset of the first character of the given line param line the line of interest return the document offset exception Bad Location Exception if the line number is invalid in this document  BadLocationException
Returns a description of the specified line The line is described by its offset and its length excluding the line s delimiter param line the line of interest return a line description exception Bad Location Exception if the line number is invalid in this document  BadLocationException
Returns a description of the line at the given offset The description contains the offset and the length of the line excluding the line s delimiter param offset the offset whose line should be described return a region describing the line exception Bad Location Exception if offset is invalid in this document  BadLocationException
Returns the number of lines in this document return the number of lines in this document 
Returns the number of lines which are occupied by a given text range param offset the offset of the specified text range param length the length of the specified text range return the number of lines occupied by the specified range exception Bad Location Exception if specified range is invalid in this tracker  BadLocationException
Computes the number of lines in the given text For a given implementer of this interface this method returns the same result as code set text get Number Of Lines code param text the text whose number of lines should be computed return the number of lines in the given text  getNumberOfLines
Returns the document s legal line delimiters return the document s legal line delimiters 
Returns the line delimiter of that line or code null code if the line is not closed with a line delimiter param line the line of interest return the line s delimiter or code null code if line does not have a delimiter exception Bad Location Exception if the line number is invalid in this document  BadLocationException
Returns the offset of a given search string in the document based on a set of search criteria param start Offset document offset at which search starts param find String the string to find param forward Search the search direction param case Sensitive indicates whether lower and upper case should be distinguished param whole Word indicates whether the find String should be limited by white spaces as defined by Character is White Space return the offset of the first occurrence of find String based on the parameters or 1 if no match is found exception Bad Location Exception if start Offset is an invalid document offset deprecated as of 3 0 search is provided by link Find Replace Document Adapter  startOffset findString forwardSearch caseSensitive wholeWord findString isWhiteSpace findString BadLocationException startOffset FindReplaceDocumentAdapter

Sets the adapters document param document the document to be adapted 

public interface I Document Adapter Extension Stops forwarding document changes to the styled text void stop Forwarding Document Changes  IDocumentAdapterExtension stopForwardingDocumentChanges
Resumes forwarding document changes to the styled text Also forces the styled text to catch up with all the changes that have been applied since code stop Forwarding Document Changes code has been called  stopForwardingDocumentChanges

Executes the replace operation on the given document param document the document to be changed param owner the owner of this replace operation 
Callback for document listeners to be used inside code document Changed code to register a post notification replace operation on the document notifying them param owner the owner of the replace operation param replace the replace operation to be executed exception Unsupported Operation Exception if code register Post Notification Replace code is not supported by this document  documentChanged UnsupportedOperationException registerPostNotificationReplace
Stops the processing of registered post notification replace operations until code resume Post Notification Processing code is called  resumePostNotificationProcessing
Resumes the processing of post notification replace operations If the queue of registered code I Document Extension I Replace code objects is not empty they are immediately processed if the document is not inside a replace operation If the document is inside a replace operation they are processed directly after the replace operation has finished  IDocumentExtension IReplace
Tells the document that it is about to be sequentially rewritten That is a sequence of non overlapping replace operations will be performed on it The code normalize code flag indicates whether the rewrite is performed from the start of the document to its end or from an arbitrary start offset p The document is considered being in sequential rewrite mode as long as code stop Sequential Rewrite code has not been called param normalize code true code if performed from the start to the end of the document  stopSequentialRewrite
Tells the document that the sequential rewrite has been finished This method has only any effect if code start Sequential Rewrite code has been called before  startSequentialRewrite

Tells the receiver to ignore calls to code register Post Notification Replace code until code accept Post Notification Replaces code is called  registerPostNotificationReplace acceptPostNotificationReplaces
Tells the receiver to accept calls to code register Post Notification Replace code until code ignore Post Notification Replaces code is called  registerPostNotificationReplace ignorePostNotificationReplaces
Can be called prior to a code replace code operation After the code replace code code resume Listener Notification code must be called The affect of these calls is that no document listener is notified until code resume Listener Notification code is called This allows clients to update structure before any listener is informed about the change p Listener notification can only be stopped for a single code replace code operation Otherwise document change notifications will be lost  resumeListenerNotification resumeListenerNotification
Resumes the notification of document listeners which must previously have been stopped by a call to code stop Listener Notification code  stopListenerNotification

Returns the existing partitionings for this document This includes the default partitioning return the existing partitionings for this document 
Returns the set of legal content types of document partitions for the given partitioning This set can be empty The set can contain more content types than contained by the result of code get Partitioning partitioning 0 get Length code param partitioning the partitioning for which to return the legal content types return the set of legal content types exception Bad Partitioning Exception if partitioning is invalid for this document  getPartitioning getLength BadPartitioningException
Returns the type of the document partition containing the given offset for the given partitioning This is a convenience method for code get Partition partitioning offset boolean get Type code p If code prefer Open Partitions code is code true code precedence is given to an open partition ending at code offset code over a delimited partition starting at code offset code If it is code false code precedence is given to the partition that does not end at code offset code p This is only supported if the connected code I Document Partitioner code supports it i e implements code I Document Partitioner Extension2 code Otherwise code prefer Open Partitions code is ignored p param partitioning the partitioning param offset the document offset param prefer Open Partitions code true code if precedence should be given to a open partition ending at code offset code over a closed partition starting at code offset code return the partition type exception Bad Location Exception if offset is invalid in this document exception Bad Partitioning Exception if partitioning is invalid for this document  getPartition getType preferOpenPartitions IDocumentPartitioner IDocumentPartitionerExtension2 preferOpenPartitions preferOpenPartitions BadLocationException BadPartitioningException
Returns the document partition of the given partitioning in which the given offset is located p If code prefer Open Partitions code is code true code precedence is given to an open partition ending at code offset code over a delimited partition starting at code offset code If it is code false code precedence is given to the partition that does not end at code offset code p This is only supported if the connected code I Document Partitioner code supports it i e implements code I Document Partitioner Extension2 code Otherwise code prefer Open Partitions code is ignored p param partitioning the partitioning param offset the document offset param prefer Open Partitions code true code if precedence should be given to a open partition ending at code offset code over a closed partition starting at code offset code return a specification of the partition exception Bad Location Exception if offset is invalid in this document exception Bad Partitioning Exception if partitioning is invalid for this document  preferOpenPartitions IDocumentPartitioner IDocumentPartitionerExtension2 preferOpenPartitions preferOpenPartitions BadLocationException BadPartitioningException
Computes the partitioning of the given document range based on the given partitioning type p If code include Zero Length Partitions code is code true code a zero length partition of an open partition type usually the default partition is included between two closed partitions If it is code false code no zero length partitions are included p This is only supported if the connected code I Document Partitioner code supports it i e implements code I Document Partitioner Extension2 code Otherwise code include Zero Length Partitions code is ignored p param partitioning the document s partitioning type param offset the document offset at which the range starts param length the length of the document range param include Zero Length Partitions code true code if zero length partitions should be returned as part of the computed partitioning return a specification of the range s partitioning exception Bad Location Exception if the range is invalid in this document exception Bad Partitioning Exception if partitioning is invalid for this document  includeZeroLengthPartitions IDocumentPartitioner IDocumentPartitionerExtension2 includeZeroLengthPartitions includeZeroLengthPartitions BadLocationException BadPartitioningException
Sets this document s partitioner The caller of this method is responsible for disconnecting the document s old partitioner from the document and to connect the new partitioner to the document Informs all document partitioning listeners about this change param partitioning the partitioning for which to set the partitioner param partitioner the document s new partitioner see I Document Partitioning Listener  IDocumentPartitioningListener
Returns the partitioner for the given partitioning or code null code if no partitioner is registered param partitioning the partitioning for which to set the partitioner return the partitioner for the given partitioning 

Returns the minimal region of the original document that completely comprises all of the image document or code null code if there is no such region return the minimal region of the original document comprising the image document or code null code 
Returns the offset in the original document that corresponds to the given offset in the image document or code 1 code if there is no such offset param image Offset the offset in the image document return the corresponding offset in the original document or code 1 code throws Bad Location Exception if code image Offset code is not a valid offset in the image document  imageOffset BadLocationException imageOffset
Returns the minimal region of the original document that completely comprises the given region of the image document or code null code if there is no such region param image Region the region of the image document return the minimal region of the original document comprising the given region of the image document or code null code throws Bad Location Exception if code image Region code is not a valid region of the image document  imageRegion BadLocationException imageRegion
Returns the range of lines of the original document that corresponds to the given line of the image document or code null code if there are no such lines param image Line the line of the image document return the corresponding lines of the original document or code null code throws Bad Location Exception if code image Line code is not a valid line number in the image document  imageLine BadLocationException imageLine
Returns the line of the original document that corresponds to the given line of the image document or code 1 code if there is no such line param image Line the line of the image document return the corresponding line of the original document or code 1 code throws Bad Location Exception if code image Line code is not a valid line number in the image document  imageLine BadLocationException imageLine
Returns the offset in the image document that corresponds to the given offset in the original document or code 1 code if there is no such offset param origin Offset the offset in the original document return the corresponding offset in the image document or code 1 code throws Bad Location Exception if code origin Offset code is not a valid offset in the original document  originOffset BadLocationException originOffset
Returns the minimal region of the image document that completely comprises the given region of the original document or code null code if there is no such region param origin Region the region of the original document return the minimal region of the image document comprising the given region of the original document or code null code throws Bad Location Exception if code origin Region code is not a valid region of the original document  originRegion BadLocationException originRegion
Returns the line of the image document that corresponds to the given line of the original document or code 1 code if there is no such line param origin Line the line of the original document return the corresponding line of the image document or code 1 code throws Bad Location Exception if code origin Line code is not a valid line number in the original document  originLine BadLocationException originLine
Returns the line of the image document whose corresponding line in the original document is closest to the given line in the original document param origin Line the line in the original document return the line in the image document that corresponds best to the given line in the original document throws Bad Location Exception if code origin Line code is not a valid line in the original document  originLine BadLocationException originLine

Adheres to code origin Region to Origin Region to Exact Image Region origin Region code if code to Exact Image Region origin Region null code Returns code null code if there is no image for the given origin region param origin Region the origin region return the exact image region or code null code throws Bad Location Exception if origin region is not a valid region in the origin document  originRegion toOriginRegion toExactImageRegion originRegion toExactImageRegion originRegion originRegion BadLocationException
Returns the segments of the image document that exactly correspond to the given region of the original document Returns code null code if there are no such image regions param origin Region the region in the origin document return the segments in the image document or code null code throws Bad Location Exception in case the given origin region is not valid in the original document  originRegion BadLocationException
Returns the fragments of the original document that exactly correspond to the given region of the image document param image Region the region in the image document return the fragments in the origin document throws Bad Location Exception in case the given image region is not valid in the image document  imageRegion BadLocationException
Returns the length of the image document return the length of the image document 
Returns the maximal sub regions of the given origin region which are completely covered I e each offset in a sub region has a corresponding image offset Returns code null code if there are no such sub regions param origin Region the region in the origin document return the sub regions with complete coverage or code null code throws Bad Location Exception in case the given origin region is not valid in the original document  originRegion BadLocationException

The manipulation described by the document event will be performed param event the document event describing the document change 
The manipulation described by the document event has been performed param event the document event describing the document change 

Connects the partitioner to a document Connect indicates the begin of the usage of the receiver as partitioner of the given document Thus resources the partitioner needs to be operational for this document should be allocated p The caller of this method must ensure that this partitioner is also set as the document s document partitioner param document the document to be connected to 
Disconnects the partitioner from the document it is connected to Disconnect indicates the end of the usage of the receiver as partitioner of the connected document Thus resources the partitioner needed to be operation for its connected document should be deallocated p The caller of this method should also must ensure that this partitioner is no longer the document s partitioner 
Informs about a forthcoming document change Will be called by the connected document and is not intended to be used by clients other than the connected document param event the event describing the forthcoming change 
The document has been changed The partitioner updates the document s partitioning and returns whether the structure of the document partitioning has been changed i e whether partitions have been added or removed Will be called by the connected document and is not intended to be used by clients other than the connected document p This method has been replaced by link I Document Partitioner Extension document Changed2 Document Event param event the event describing the document change return code true code if partitioning changed  IDocumentPartitionerExtension documentChanged2 DocumentEvent
Returns the set of all legal content types of this partitioner I e any result delivered by this partitioner may not contain a content type which would not be included in this method s result return the set of legal content types 
Returns the content type of the partition containing the given offset in the connected document There must be a document connected to this partitioner p Use link I Document Partitioner Extension2 get Content Type int boolean when zero length partitions are supported In that case this method is equivalent pre I Document Partitioner Extension2 extension I Document Partitioner Extension2 partitioner return extension get Content Type offset false pre param offset the offset in the connected document return the content type of the offset s partition  IDocumentPartitionerExtension2 getContentType IDocumentPartitionerExtension2 IDocumentPartitionerExtension2 getContentType
Returns the partitioning of the given range of the connected document There must be a document connected to this partitioner p Use link I Document Partitioner Extension2 compute Partitioning int int boolean when zero length partitions are supported In that case this method is equivalent pre I Document Partitioner Extension2 extension I Document Partitioner Extension2 partitioner return extension compute Partitioning offset length false pre param offset the offset of the range of interest param length the length of the range of interest return the partitioning of the range  IDocumentPartitionerExtension2 computePartitioning IDocumentPartitionerExtension2 IDocumentPartitionerExtension2 computePartitioning
Returns the partition containing the given offset of the connected document There must be a document connected to this partitioner p Use link I Document Partitioner Extension2 get Partition int boolean when zero length partitions are supported In that case this method is equivalent pre I Document Partitioner Extension2 extension I Document Partitioner Extension2 partitioner return extension get Partition offset false pre param offset the offset for which to determine the partition return the partition containing the offset  IDocumentPartitionerExtension2 getPartition IDocumentPartitionerExtension2 IDocumentPartitionerExtension2 getPartition

The document has been changed The partitioner updates the document s partitioning and returns the minimal region that comprises all partition changes caused in response to the given document event This method returns code null code if the partitioning did not change p Will be called by the connected document and is not intended to be used by clients other than the connected document p Replaces link I Document Partitioner document Changed Document Event param event the event describing the document change return the region of the document in which the partition type changed  IDocumentPartitioner documentChanged DocumentEvent

Returns the position categories that this partitioners uses in order to manage the partitioning information of the documents Returns code null code if no position category is used return the position categories used to manage partitioning information or code null code 
Returns the content type of the partition containing the given offset in the connected document There must be a document connected to this partitioner p If code prefer Open Partitions code is code true code precedence is given to an open partition ending at code offset code over a delimited partition starting at code offset code p This method replaces link I Document Partitioner get Content Type int and behaves like it when code preprefer Open Partitions code is code false code i e precedence is always given to the partition that does not end at code offset code p param offset the offset in the connected document param prefer Open Partitions code true code if precedence should be given to a open partition ending at code offset code over a delimited partition starting at code offset code return the content type of the offset s partition  preferOpenPartitions IDocumentPartitioner getContentType prepreferOpenPartitions preferOpenPartitions
Returns the partition containing the given offset of the connected document There must be a document connected to this partitioner p If code prefer Open Partitions code is code true code precedence is given to an open partition ending at code offset code over a delimited partition starting at code offset code p This method replaces link I Document Partitioner get Partition int and behaves like it when prefer Open Partitions code is code false code i e precedence is always given to the partition that does not end at code offset code p param offset the offset for which to determine the partition param prefer Open Partitions code true code if precedence should be given to a open partition ending at code offset code over a delimited partition starting at code offset code return the partition containing the offset  preferOpenPartitions IDocumentPartitioner getPartition preferOpenPartitions preferOpenPartitions
Returns the partitioning of the given range of the connected document There must be a document connected to this partitioner p If code include Zero Length Partitions code is code true code a zero length partition of an open partition type usually the default partition is included between two delimited partitions If it is code false code no zero length partitions are included p p This method replaces link I Document Partitioner compute Partitioning int int and behaves like it when code include Zero Length Partitions code is code false code p param offset the offset of the range of interest param length the length of the range of interest param include Zero Length Partitions code true code if zero length partitions should be returned as part of the computed partitioning return the partitioning of the range  includeZeroLengthPartitions IDocumentPartitioner computePartitioning includeZeroLengthPartitions includeZeroLengthPartitions

The partitioning of the given document changed p In version 2 0 this method has been replaces by link I Document Partitioning Listener Extension document Partitioning Changed I Document I Region p In version 3 0 this method has been replaces by link I Document Partitioning Listener Extension2 document Partitioning Changed Document Partitioning Changed Event p param document the document whose partitioning changed see I Document Partitioning Listener Extension document Partitioning Changed I Document I Region see I Document Partitioning Listener Extension2 document Partitioning Changed Document Partitioning Changed Event see I Document add Document Partitioning Listener I Document Partitioning Listener  IDocumentPartitioningListenerExtension documentPartitioningChanged IDocument IRegion IDocumentPartitioningListenerExtension2 documentPartitioningChanged DocumentPartitioningChangedEvent IDocumentPartitioningListenerExtension documentPartitioningChanged IDocument IRegion IDocumentPartitioningListenerExtension2 documentPartitioningChanged DocumentPartitioningChangedEvent IDocument addDocumentPartitioningListener IDocumentPartitioningListener

The partitioning of the given document changed in the given region p In version 3 0 this method has been replaced with link I Document Partitioning Listener Extension2 document Partitioning Changed Document Partitioning Changed Event param document the document whose partitioning changed param region the region in which the partitioning changed see I Document Partitioning Listener Extension2 document Partitioning Changed Document Partitioning Changed Event see I Document add Document Partitioning Listener I Document Partitioning Listener  IDocumentPartitioningListenerExtension2 documentPartitioningChanged DocumentPartitioningChangedEvent IDocumentPartitioningListenerExtension2 documentPartitioningChanged DocumentPartitioningChangedEvent IDocument addDocumentPartitioningListener IDocumentPartitioningListener

Signals the change of document partitionings p This method replaces link I Document Partitioning Listener document Partitioning Changed I Document and link I Document Partitioning Listener Extension2 document Partitioning Changed Document Partitioning Changed Event param event the event describing the change see I Document add Document Partitioning Listener I Document Partitioning Listener  IDocumentPartitioningListener documentPartitioningChanged IDocument IDocumentPartitioningListenerExtension2 documentPartitioningChanged DocumentPartitioningChangedEvent IDocument addDocumentPartitioningListener IDocumentPartitioningListener

Processes the given event and marks it as done if it should be ignored by subsequent receivers param event the verify event which will be investigated 

Returns whether a find operation can be performed return whether a find operation can be performed 
Searches for a string starting at the given widget offset and using the specified search directives If a string has been found it is selected and its start offset is returned p Replaced by link I Find Replace Target Extension3 find And Select int String boolean boolean boolean boolean param widget Offset the widget offset at which searching starts param find String the string which should be found param search Forward code true code searches forward code false code backwards param case Sensitive code true code performs a case sensitive search code false code an insensitive search param whole Word if code true code only occurrences are reported in which the find String stands as a word by itself return the position of the specified string or 1 if the string has not been found  IFindReplaceTargetExtension3 findAndSelect widgetOffset findString searchForward caseSensitive wholeWord findString
Returns the currently selected range of characters as a offset and length in widget coordinates return the currently selected character range in widget coordinates 
Returns the currently selected characters as a string return the currently selected characters 
Returns whether this target can be modified return code true code if target can be modified 
Replaces the currently selected range of characters with the given text This target must be editable Otherwise nothing happens p Replaced by link I Find Replace Target Extension3 replace Selection String boolean param text the substitution text  IFindReplaceTargetExtension3 replaceSelection

Indicates that a session with the target begins All calls except code begin Session code and code end Session code to code I Find Replace Target code and code I Find Replace Target Extension code must be embedded within calls to code begin Session code and code end Session code see end Session  beginSession endSession IFindReplaceTarget IFindReplaceTargetExtension beginSession endSession endSession
Indicates that a session with the target ends see begin Session  beginSession
Returns the find scope of the target code null code for global scope return returns the find scope of the target may be code null code 
Sets the find scope of the target to operate on code null code indicates that the global scope should be used param scope the find scope of the target may be code null code 
Returns the currently selected range of lines as a offset and length return the currently selected line range 
Sets a selection param offset the offset of the selection param length the length of the selection 
Sets the scope highlight color param color the color of the scope highlight 
Sets the target s replace all mode param replace All code true code if this target should switch into replace all mode code false code if it should leave the replace all state  replaceAll

Searches for a string starting at the given offset and using the specified search directives If a string has been found it is selected and its start offset is returned If reg Ex Search is code true code the find String is interpreted as a regular expression param offset the offset at which searching starts param find String the specification of what should be found param search Forward code true code searches forward code false code backwards param case Sensitive code true code performs a case sensitive search code false code an insensitive search param whole Word if code true code only occurrences are reported in which the find String stands as a word by itself Must not be used in combination with code reg Ex Search code param reg Ex Search if code true code find String represents a regular expression Must not be used in combination with code whole Word code return the position of the specified string or 1 if the string has not been found throws java util regex Pattern Syntax Exception if reg Ex Search is code true code and find String is an invalid regular expression  regExSearch findString findString searchForward caseSensitive wholeWord findString regExSearch regExSearch findString wholeWord PatternSyntaxException regExSearch findString
Replaces the currently selected range of characters with the given text If reg Ex Replace is code true code the text is interpreted as a regular expression that is used to process the selected text in order to produce the actual replacement of the selected text p This target must be editable Otherwise nothing happens param text the specification of the substitution text param reg Ex Replace if code true code text represents a regular expression throws Illegal State Exception in case of regular expressions this call is not preceded by a call to code find And Select code throws java util regex Pattern Syntax Exception if reg Ex Replace is code true code and text is an invalid regular expression  regExReplace regExReplace IllegalStateException findAndSelect PatternSyntaxException regExReplace

Sets the information to be presented by this information control p Replaced by link I Information Control Extension2 set Input Object param information the information to be presented  IInformationControlExtension2 setInput
Sets the information control s size constraints A constraint value of code 1 code indicates no constraint This method must be called before code compute Size Hint code is called p Note An information control which implements link I Information Control Extension3 may ignore this method or use it as hint for its very first appearance p param max Width the maximal width of the control to present the information or code 1 code for not constraint param max Height the maximal height of the control to present the information or code 1 code for not constraint  computeSizeHint IInformationControlExtension3 maxWidth maxHeight
Computes and returns a proposal for the size of this information control depending on the information to present The method tries to honor known size constraints but might return a size that exceeds them return the computed size hint 
Controls the visibility of this information control param visible code true code if the control should be visible 
Sets the size of this information control param width the width of the control param height the height of the control 
Sets the location of this information control param location the location 
void set Location Point location Disposes this information control void dispose  setLocation
Adds the given listener to the list of dispose listeners If the listener is already registered it is not registered again param listener the listener to be added 
Removes the given listeners from the list of dispose listeners If the listener is not registered this call has no effect param listener the listener to be removed 
Sets the foreground color of this information control param foreground the foreground color of this information control 
Sets the background color of this information control param background the background color of this information control 
Returns whether this information control has the focus return code true code when the information control has the focus otherwise code false code 
boolean is Focus Control Sets the keyboard focus to this information control void set Focus  isFocusControl setFocus
Adds the given listener to the list of focus listeners If the listener is already registered it is not registered again param listener the listener to be added 
Removes the given listeners from the list of focus listeners If the listener is not registered this call has no affect param listener the listener to be removed 

Creates a new information control with the given shell as the control s parent param parent the parent shell return the created information control 

Tests if an existing information control can be reused param control the information control to test return code true code if the control can be reused 
Tests whether this information control creator can replace the given information control creator This is the case if the two creators create the same kind of information controls param creator the creator to be checked return code true code if the given creator can be replaced code false code otherwise 

Returns whether this information control has contents to be displayed return code true code if there is contents to be displayed 

Sets the input to be presented in this information control The concrete contract the input object is expected to adhere is defined by the implementer of this interface param input the object to be used as input for this control 

Returns a rectangle describing the receiver s size and location relative to its parent or its display if its parent is null p Note If the receiver is already disposed then this methods must return the last valid location and size p return the receiver s bounding rectangle 
Computes the trim for this control x and y denote the upper left corner of the trimming relative to this control s location i e this will most likely be negative values Width and height represent the border sizes return the receivers trim 
Tells whether this control allows to restore the previously used size p Note This is not a static property it can change during the lifetime of this control p return code true code if restoring size is supported 
Tells whether this control allows to restore the previously used location p Note This is not a static property it can change during the lifetime of this control p return code true code if restoring location is supported 

Returns the strings this tracker considers as legal line delimiters return the legal line delimiters 
Returns the line delimiter of the specified line Returns code null code if the line is not closed with a line delimiter param line the line whose line delimiter is queried return the line s delimiter or code null code if line does not have a delimiter exception Bad Location Exception if the line number is invalid in this tracker s line structure  BadLocationException
Computes the number of lines in the given text param text the text whose number of lines should be computed return the number of lines in the given text 
Returns the number of lines return the number of lines in this tracker s line structure 
Returns the number of lines which are occupied by a given text range param offset the offset of the specified text range param length the length of the specified text range return the number of lines occupied by the specified range exception Bad Location Exception if specified range is unknown to this tracker  BadLocationException
Returns the position of the first character of the specified line param line the line of interest return offset of the first character of the line exception Bad Location Exception if the line is unknown to this tracker  BadLocationException
Returns length of the specified line including the line s delimiter param line the line of interest return the length of the line exception Bad Location Exception if line is unknown to this tracker  BadLocationException
Returns the line number the character at the given offset belongs to param offset the offset whose line number to be determined return the number of the line the offset is on exception Bad Location Exception if the offset is invalid in this tracker  BadLocationException
Returns a line description of the line at the given offset The description contains the start offset and the length of the line excluding the line s delimiter param offset the offset whose line should be described return a region describing the line exception Bad Location Exception if offset is invalid in this tracker  BadLocationException
Returns a line description of the given line The description contains the start offset and the length of the line excluding the line s delimiter param line the line that should be described return a region describing the line exception Bad Location Exception if line is unknown to this tracker  BadLocationException
Informs the line tracker about the specified change in the tracked text param offset the offset of the replaced text param length the length of the replaced text param text the substitution text exception Bad Location Exception if specified range is unknown to this tracker  BadLocationException
Sets the tracked text to the specified text param text the new tracked text 

Sets or clears a mark at the current cursor position param set sets the mark if code true code clears otherwise 
void set Mark At Cursor boolean set Swaps the mark and cursor position if the mark is in the visible region void swap Mark And Cursor  setMarkAtCursor swapMarkAndCursor

Returns the marked document return the marked document 
Returns the mark position The offset may be code 1 code if there s no marked region return the mark position or code 1 code if there is no marked region 
Returns the length of the mark selection The length may be negative if the caret is before the mark position The length has no meaning if code get Offset code returns code 1 code return the length of the mark selection Result is undefined for code get Offset 1 code  getOffset getOffset

Installs the information presenter on the given text viewer After this method has been finished the presenter is operational i e the method link show Information can be called until link uninstall is called param text Viewer the viewer on which the presenter is installed  showInformation textViewer
Removes the information presenter from the text viewer it has previously been installed on 
Shows information related to the cursor position of the text viewer this information presenter is installed on 
Returns the information provider to be used for the given content type param content Type the type of the content for which information will be requested return an information provider or code null code if none exists for the specified content type  contentType

Returns the document partitioning this information presenter is using return the document partitioning this information presenter is using 

Returns the region of the text viewer s document close to the given offset that contains a subject about which information can be provided p For example if information can be provided on a per code block basis the offset should be used to find the enclosing code block and the source range of the block should be returned param text Viewer the text viewer in which information has been requested param offset the offset at which information has been requested return the region of the text viewer s document containing the information subject  textViewer
Returns the information about the given subject or code null code if no information is available It depends on the concrete configuration in which format the information is to be provided For example information presented in an information control displaying HTML should be provided in HTML param text Viewer the viewer in whose document the subject is contained param subject the text region constituting the information subject return the information about the subject see I Information Presenter deprecated As of 2 1 replaced by link I Information Provider Extension get Information2 I Text Viewer I Region  textViewer IInformationPresenter IInformationProviderExtension getInformation2 ITextViewer IRegion

Returns the element for the given subject or code null code if no element is available p Implementers should ignore the text returned by link I Information Provider get Information I Text Viewer I Region p param text Viewer the viewer in whose document the subject is contained param subject the text region constituting the information subject return the element for the subject see I Information Provider get Information I Text Viewer I Region see org eclipse jface text I Text Viewer  IInformationProvider getInformation ITextViewer IRegion textViewer IInformationProvider getInformation ITextViewer IRegion ITextViewer

Returns the information control creator of this information provider return the information control creator 

see I Information Control Closer set Subject Control Control public void set Subject Control Control control f Subject Control control  IInformationControlCloser setSubjectControl setSubjectControl fSubjectControl
see I Information Control Closer set Information Control I Information Control public void set Information Control I Information Control control f Information Control control  IInformationControlCloser setInformationControl IInformationControl setInformationControl IInformationControl fInformationControl
public void start Rectangle information Area if f Is Active return f Is Active true if f Subject Control null f Subject Control is Disposed f Subject Control add Control Listener this f Subject Control add Mouse Listener this f Subject Control add Focus Listener this f Subject Control add Key Listener this if f Information Control null f Information Control add Focus Listener this f Text Viewer add Viewport Listener this  informationArea fIsActive fIsActive fSubjectControl fSubjectControl isDisposed fSubjectControl addControlListener fSubjectControl addMouseListener fSubjectControl addFocusListener fSubjectControl addKeyListener fInformationControl fInformationControl addFocusListener fTextViewer addViewportListener
public void stop if f Is Active return f Is Active false f Text Viewer remove Viewport Listener this if f Information Control null f Information Control remove Focus Listener this hide Information Control if f Subject Control null f Subject Control is Disposed f Subject Control remove Control Listener this f Subject Control remove Mouse Listener this f Subject Control remove Focus Listener this f Subject Control remove Key Listener this  fIsActive fIsActive fTextViewer removeViewportListener fInformationControl fInformationControl removeFocusListener hideInformationControl fSubjectControl fSubjectControl isDisposed fSubjectControl removeControlListener fSubjectControl removeMouseListener fSubjectControl removeFocusListener fSubjectControl removeKeyListener
see Control Listener control Resized Control Event public void control Resized Control Event e stop  ControlListener controlResized ControlEvent controlResized ControlEvent
see Control Listener control Moved Control Event public void control Moved Control Event e stop  ControlListener controlMoved ControlEvent controlMoved ControlEvent
see Mouse Listener mouse Down Mouse Event public void mouse Down Mouse Event e stop  MouseListener mouseDown MouseEvent mouseDown MouseEvent
see Mouse Listener mouse Up Mouse Event public void mouse Up Mouse Event e  MouseListener mouseUp MouseEvent mouseUp MouseEvent
see Mouse Listener mouse Double Click Mouse Event public void mouse Double Click Mouse Event e stop  MouseListener mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent
see Focus Listener focus Gained Focus Event public void focus Gained Focus Event e  FocusListener focusGained FocusEvent focusGained FocusEvent
Display d f Subject Control get Display d async Exec new Runnable public void run if f Information Control null f Information Control is Focus Control stop  fSubjectControl getDisplay asyncExec fInformationControl fInformationControl isFocusControl
public void focus Lost Focus Event e Display d f Subject Control get Display d async Exec new Runnable public void run if f Information Control null f Information Control is Focus Control stop  focusLost FocusEvent fSubjectControl getDisplay asyncExec fInformationControl fInformationControl isFocusControl
see I Viewport Listener Listener viewport Changed int public void viewport Changed int top Index stop  IViewportListenerListener viewportChanged viewportChanged topIndex
see Key Listener key Pressed Key Event public void key Pressed Key Event e stop  KeyListener keyPressed KeyEvent keyPressed KeyEvent
see Key Listener key Released Key Event public void key Released Key Event e  KeyListener keyReleased KeyEvent keyReleased KeyEvent
Creates a new information presenter that uses the given information control creator The presenter is not installed on any text viewer yet By default an information control closer is set that closes the information control in the event of key strokes resizing moves focus changes mouse clicks and disposal all of those applied to the information control s parent control Also the setup ensures that the information control when made visible will request the focus By default the default document partitioning link I Document Extension3 DEFAULT PARTITIONING is used param creator the information control creator to be used public Information Presenter I Information Control Creator creator super creator set Closer new Closer takes Focus When Visible true f Partitioning I Document Extension3 DEFAULT PARTITIONING  IDocumentExtension3 DEFAULT_PARTITIONING InformationPresenter IInformationControlCreator setCloser takesFocusWhenVisible fPartitioning IDocumentExtension3 DEFAULT_PARTITIONING
Sets the document partitioning to be used by this information presenter param partitioning the document partitioning to be used by this information presenter since 3 0 public void set Document Partitioning String partitioning Assert is Not Null partitioning f Partitioning partitioning  setDocumentPartitioning isNotNull fPartitioning
since 3 0 public String get Document Partitioning return f Partitioning  getDocumentPartitioning fPartitioning
Registers a given information provider for a particular content type If there is already a provider registered for this type the new provider is registered instead of the old one param provider the information provider to register or code null code to remove an existing one param content Type the content type under which to register public void set Information Provider I Information Provider provider String content Type Assert is Not Null content Type if f Providers null f Providers new Hash Map if provider null f Providers remove content Type else f Providers put content Type provider  contentType setInformationProvider IInformationProvider contentType isNotNull contentType fProviders fProviders HashMap fProviders contentType fProviders contentType
public I Information Provider get Information Provider String content Type if f Providers null return null return I Information Provider f Providers get content Type  IInformationProvider getInformationProvider contentType fProviders IInformationProvider fProviders contentType
Sets a offset to override the selection Setting the value to code 1 code will disable overriding param offset the offset to override selection or code 1 code public void set Offset int offset f Offset offset  setOffset fOffset
protected void compute Information int offset f Offset 0 f Text Viewer get Selected Range x f Offset if offset 1 return f Offset 1 I Information Provider provider null try String content Type Text Utilities get Content Type f Text Viewer get Document get Document Partitioning offset true provider get Information Provider content Type catch Bad Location Exception x if provider null return I Region subject provider get Subject f Text Viewer offset if subject null return if provider instanceof I Information Provider Extension2 set Custom Information Control Creator I Information Provider Extension2 provider get Information Presenter Control Creator else set Custom Information Control Creator null if provider instanceof I Information Provider Extension I Information Provider Extension extension I Information Provider Extension provider set Information extension get Information2 f Text Viewer subject compute Area subject else set Information provider get Information f Text Viewer subject compute Area subject  computeInformation fOffset fTextViewer getSelectedRange fOffset fOffset IInformationProvider contentType TextUtilities getContentType fTextViewer getDocument getDocumentPartitioning getInformationProvider contentType BadLocationException IRegion getSubject fTextViewer IInformationProviderExtension2 setCustomInformationControlCreator IInformationProviderExtension2 getInformationPresenterControlCreator setCustomInformationControlCreator IInformationProviderExtension IInformationProviderExtension IInformationProviderExtension setInformation getInformation2 fTextViewer computeArea setInformation getInformation fTextViewer computeArea
Determines the graphical area covered by the given text region param region the region whose graphical extend must be computed return the graphical extend of the given region private Rectangle compute Area I Region region I Region widget Region model Range2 Widget Range region int start widget Region get Offset int end widget Region get Offset widget Region get Length Styled Text styled Text f Text Viewer get Text Widget Point upper Left styled Text get Location At Offset start Point lower Right new Point upper Left x upper Left y for int i start 1 i end i Point p styled Text get Location At Offset i if upper Left x p x upper Left x p x if upper Left y p y upper Left y p y if lower Right x p x lower Right x p x if lower Right y p y lower Right y p y GC gc new GC styled Text lower Right x gc get Font Metrics get Average Char Width lower Right y styled Text get Line Height gc dispose int width lower Right x upper Left x int height lower Right y upper Left y return new Rectangle upper Left x upper Left y width height  computeArea IRegion IRegion widgetRegion modelRange2WidgetRange widgetRegion getOffset widgetRegion getOffset widgetRegion getLength StyledText styledText fTextViewer getTextWidget upperLeft styledText getLocationAtOffset lowerRight upperLeft upperLeft styledText getLocationAtOffset upperLeft upperLeft upperLeft upperLeft lowerRight lowerRight lowerRight lowerRight styledText lowerRight getFontMetrics getAverageCharWidth lowerRight styledText getLineHeight lowerRight upperLeft lowerRight upperLeft upperLeft upperLeft
Translated the given range in the viewer s document into the corresponding range of the viewer s widget param region the range in the viewer s document return the corresponding widget range since 2 1 private I Region model Range2 Widget Range I Region region if f Text Viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 f Text Viewer return extension model Range2 Widget Range region I Region visible Region f Text Viewer get Visible Region int start region get Offset visible Region get Offset int end start region get Length if end visible Region get Length end visible Region get Length return new Region start end start  IRegion modelRange2WidgetRange IRegion fTextViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 fTextViewer modelRange2WidgetRange IRegion visibleRegion fTextViewer getVisibleRegion getOffset visibleRegion getOffset getLength visibleRegion getLength visibleRegion getLength
see I Information Presenter install I Text Viewer public void install I Text Viewer text Viewer f Text Viewer text Viewer install f Text Viewer get Text Widget  IInformationPresenter ITextViewer ITextViewer textViewer fTextViewer textViewer fTextViewer getTextWidget
see I Information Presenter uninstall public void uninstall dispose  IInformationPresenter
protected void show Information Control Rectangle subject Area if f Text Viewer instanceof I Widget Token Owner Extension I Widget Token Owner Extension extension I Widget Token Owner Extension f Text Viewer if extension request Widget Token this WIDGET PRIORITY super show Information Control subject Area else if f Text Viewer instanceof I Widget Token Owner I Widget Token Owner owner I Widget Token Owner f Text Viewer if owner request Widget Token this super show Information Control subject Area  showInformationControl subjectArea fTextViewer IWidgetTokenOwnerExtension IWidgetTokenOwnerExtension IWidgetTokenOwnerExtension fTextViewer requestWidgetToken WIDGET_PRIORITY showInformationControl subjectArea fTextViewer IWidgetTokenOwner IWidgetTokenOwner IWidgetTokenOwner fTextViewer requestWidgetToken showInformationControl subjectArea
protected void hide Information Control try super hide Information Control finally if f Text Viewer instanceof I Widget Token Owner I Widget Token Owner owner I Widget Token Owner f Text Viewer owner release Widget Token this  hideInformationControl hideInformationControl fTextViewer IWidgetTokenOwner IWidgetTokenOwner IWidgetTokenOwner fTextViewer releaseWidgetToken
protected void handle Information Control Disposed try super handle Information Control Disposed finally if f Text Viewer instanceof I Widget Token Owner I Widget Token Owner owner I Widget Token Owner f Text Viewer owner release Widget Token this  handleInformationControlDisposed handleInformationControlDisposed fTextViewer IWidgetTokenOwner IWidgetTokenOwner IWidgetTokenOwner fTextViewer releaseWidgetToken
see org eclipse jface text I Widget Token Keeper request Widget Token I Widget Token Owner public boolean request Widget Token I Widget Token Owner owner return false  IWidgetTokenKeeper requestWidgetToken IWidgetTokenOwner requestWidgetToken IWidgetTokenOwner
since 3 0 public boolean request Widget Token I Widget Token Owner owner int priority return false  requestWidgetToken IWidgetTokenOwner
since 3 0 public boolean set Focus I Widget Token Owner owner return false  setFocus IWidgetTokenOwner

Disposes this painter Prior to disposing a painter should be deactivated A disposed painter can not be reactivated see deactivate boolean 
Requests this painter to repaint because of the given reason Based on the given reason the painter can decide whether it will repaint or not If it repaints and is inactive it will activate itself param reason the repaint reason value is one of the constants defined in this interface 
Deactivates this painter If the painter is inactive this call does not have any effect code redraw code indicates whether the painter should remove any decoration it previously applied A deactivated painter can be reactivated by calling code paint code param redraw code true code if any previously applied decoration should be removed see paint int 
Sets the paint position manager that can be used by this painter or removes any previously set paint position manager param manager the paint position manager or code null code 

Starts managing the given position until code unmanage Position code is called param position the position to manage see unmanage Position Position  unmanagePosition unmanagePosition
Stops managing the given position If the position is not managed by this managed this call has no effect param position the position that should no longer be managed 

Adapts positions to the change specified by the document event It is ensured that the document s partitioning has been adapted to this document change and that all the position updaters which have a smaller index in the document s position updater list have been called param event the document event describing the document change 

Returns the length of the region return the length of the region 
Returns the offset of the region return the offset of the region 

public interface I Repairable Document Repairs the line information of the document implementing this interface void repair Line Information  IRepairableDocument repairLineInformation

Returns the document of this target return the document of this target 
Disables enables redrawing while modifying the target s document param redraw code true code if the document s visible presentation should be updated code false code otherwise 
If an undo manager is connected to the document s visible presentation this method tells the undo manager to fold all subsequent changes into one single undo command until code end Compound Change code is called  endCompoundChange
If an undo manager is connected to the document s visible presentation this method tells the undo manager to stop the folding of changes into a single undo command After this call all subsequent changes are considered to be individually undo able 

Tests whether the given post selection is still valid param selection return code true code if the selection is still valid 

Creates a new slave document for the given master document The slave document is causally connected to its master document until code free Slave Document code is called The connection between the newly created slave document and the master document is managed by this slave document manager param master the master document return the newly created slave document see free Slave Document I Document  freeSlaveDocument freeSlaveDocument IDocument
Frees the given slave document If the given document is not a slave document known to this slave document manager this call does not have any effect A slave document is known to this slave document manager if it has been created by this manager using code create Slave Document code param slave the slave document to be freed see create Slave Document I Document  createSlaveDocument createSlaveDocument IDocument
Creates a new document information mapping between the given slave document and its master document Returns code null code if the given document is unknown to this slave document manager param slave the slave document return a document information mapping between the slave document and its master document or code null code 
Returns the master document of the given slave document or code null code if the given document is unknown to this slave document manager param slave the slave document return the master document of the given slave document or code null code 
Returns whether the given document is a slave document known to this slave document manager A slave document is known to this slave document manager if the document has been created by this manager param document the document to be checked whether it is a slave document known to this manager return code true code if the document is a slave document code false code otherwise 
Sets the given slave document s auto expand mode In auto expand mode a slave document is automatically adapted to reflect all changes applied to it s master document Assume a master document contains 30 lines and the slave is defined to contain the lines 11 20 In auto expand mode when the master document is changed at line 8 the slave document is expanded to contain the lines 8 20 p This call is without effect if the given document is unknown to this slave document manager param slave the slave whose auto expand mode should be set param auto Expand code true code for auto expand code false code otherwise  autoExpand

Returns the list of slave documents for the given master document or code null code if there are no such slave document param master the master document return the list of slave documents or code null code 

Sets the lock object for this object If the lock object is not code null code subsequent calls to specified methods of this object are synchronized on this lock object Which methods are synchronized is specified by the implementer param lock Object the lock object May be code null code  lockObject
Returns the lock object or code null code if there is none Clients should use the lock object in order to synchronize concurrent access to the implementer return the lock object or code null code 

The mouse has been double clicked on the given text viewer param viewer the viewer into which has been double clicked 

Returns the information which should be presented when a hover popup is shown for the specified hover region The hover region has the same semantics as the region returned by code get Hover Region code If the returned information is code null code or empty no hover popup will be shown param text Viewer the viewer on which the hover popup should be shown param hover Region the text range in the viewer which is used to determine the hover display information return the hover popup display information  getHoverRegion textViewer hoverRegion
Returns the text region which should serve as the source of information to compute the hover popup display information The popup has been requested for the given offset p For example if hover information can be provided on a per method basis in a source viewer the offset should be used to find the enclosing method and the source range of the method should be returned param text Viewer the viewer on which the hover popup should be shown param offset the offset for which the hover request has been issued return the hover region used to compute the hover display information  textViewer

Returns the hover control creator of this text hover or code null code return the hover control creator or code null code 

Called before the input document is replaced param old Input the text viewer s previous input document param new Input the text viewer s new input document  oldInput newInput
Called after the input document has been replaced param old Input the text viewer s previous input document param new Input the text viewer s new input document  oldInput newInput

The visual representation of a text viewer this listener is registered with has been changed param event the description of the change 

Returns whether the operation specified by the given operation code can be performed param operation the operation code return code true code if the specified operation can be performed 
Performs the operation specified by the operation code on the target code do Operation code must only be called if code can Do Operation code returns code true code param operation the operation code  doOperation canDoOperation

Enables disabled the given text operation param operation the operation to enable disable param enable code true code to enable the operation otherwise code false code 

This method is called when a text presentation is about to be applied to the text viewer The receiver is allowed to change the text presentation during that call param text Presentation the current text presentation  textPresentation

Returns the offset of the selected text return the offset of the selected text 
Returns the length of the selected text return the length of the selected text 
Returns number of the line containing the offset of the selected text If the underlying text has been changed between the creation of this selection object and the call of this method the value returned might differ from what it would have been at the point of creation return the start line of this selection or code 1 code if there is no valid line information 
Returns the number of the line containing the last character of the selected text If the underlying text has been changed between the creation of this selection object and the call of this method the value returned might differ from what it would have been at the point of creation return the end line of this selection or code 1 code if there is no valid line information 
Returns the selected text If the underlying text has been changed between the creation of this selection object and the call of this method the value returned might differ from what it would have been at the point of creation return the selected text or code null code if there is no valid text information 

Returns the character at the specified offset param offset the offset in this text store return the character at this offset 
Returns the text of the specified character range param offset the offset of the range param length the length of the range return the text of the range 
Returns number of characters stored in this text store return the number of characters stored in this text store 
Replaces the specified character range with the given text code replace get Length 0 some text code is a valid call and appends text to the end of the text store param offset the offset of the range to be replaced param length the number of characters to be replaced param text the substitution text  getLength
Replace the content of the text store with the given text Convenience method for code replace 0 get Length text code param text the new content of the text store  getLength

Returns this viewer s SWT control code null code if the control is disposed return the SWT control or code null code 
Sets this viewer s undo manager param undo Manager the new undo manager code null code is a valid argument  undoManager
Sets this viewer s text double click strategy for the given content type param strategy the new double click strategy code null code is a valid argument param content Type the type for which the strategy is registered  contentType
Sets this viewer s auto indent strategy for the given content type If the given strategy is code null code any installed strategy for the content type is removed This method has been replaced by link I Text Viewer Extension2 prepend Auto Edit Strategy I Auto Edit Strategy String and link I Text Viewer Extension2 remove Auto Edit Strategy I Auto Edit Strategy String It is now equivalent to pre I Text Viewer Extension2 extension I Text Viewer Extension2 viewer extension remove Auto Edit Strategy old Strategy content Type extension prepend Auto Edit Strategy strategy content Type pre param strategy the new auto indent strategy code null code is a valid argument param content Type the type for which the strategy is registered  ITextViewerExtension2 prependAutoEditStrategy IAutoEditStrategy ITextViewerExtension2 removeAutoEditStrategy IAutoEditStrategy ITextViewerExtension2 ITextViewerExtension2 removeAutoEditStrategy oldStrategy contentType prependAutoEditStrategy contentType contentType
Sets this viewer s text hover for the given content type p This method has been replaced by link I Text Viewer Extension2 set Text Hover I Text Hover String int It is now equivalent to pre I Text Viewer Extension2 extension I Text Viewer Extension2 document extension set Text Hover text Viewer Hover content Type I Text Viewer Extension2 DEFAULT HOVER STATE MASK pre param text Viewer Hover the new hover code null code is a valid argument param content Type the type for which the hover is registered  ITextViewerExtension2 setTextHover ITextHover ITextViewerExtension2 ITextViewerExtension2 setTextHover textViewerHover contentType ITextViewerExtension2 DEFAULT_HOVER_STATE_MASK textViewerHover contentType
Activates the installed plug ins If the plug ins are already activated this call has no effect 
Resets the installed plug ins If plug ins change their state or behavior over the course of time this method causes them to be set back to their initial state and behavior E g if an link I Undo Manager has been installed on this text viewer the manager s list of remembered text editing operations is removed  IUndoManager
Adds the given view port listener to this viewer The listener is informed about all changes to the visible area of this viewer If the listener is already registered with this viewer this call has no effect param listener the listener to be added 
Removes the given listener from this viewer s set of view port listeners If the listener is not registered with this viewer this call has no effect param listener the listener to be removed 
Adds a text listener to this viewer If the listener is already registered with this viewer this call has no effect param listener the listener to be added 
Removes the given listener from this viewer s set of text listeners If the listener is not registered with this viewer this call has no effect param listener the listener to be removed 
Adds a text input listener to this viewer If the listener is already registered with this viewer this call has no effect param listener the listener to be added 
Removes the given listener from this viewer s set of text input listeners If the listener is not registered with this viewer this call has no effect param listener the listener to be removed 
Sets the given document as the text viewer s model and updates the presentation accordingly An appropriate code Text Event code is issued This text event does not carry a related document event param document the viewer s new input document  TextEvent
Returns the text viewer s input document return the viewer s input document 
Registers an event consumer with this viewer This method has been replaces with the link org eclipse swt custom Verify Key Listener management methods in link I Text Viewer Extension param consumer the viewer s event consumer code null code is a valid argument  VerifyKeyListener ITextViewerExtension
Sets the editable state param editable the editable state 
Returns whether the shown text can be manipulated return the viewer s editable state 
Sets the given document as this viewer s model and exposes the specified region An appropriate code Text Event code is issued The text event does not carry a related document event This method is a convenience method for code set Document document set Visible Region offset length code param document the new input document param model Range Offset the offset of the model range param model Range Length the length of the model range  TextEvent setDocument setVisibleRegion modelRangeOffset modelRangeLength
Defines and sets the region of this viewer s document which will be visible in the presentation Every character inside the specified region is supposed to be visible in the viewer s widget after that call param offset the offset of the visible region param length the length of the visible region 
Resets the region of this viewer s document which is visible in the presentation Afterwards the whole input document is visible 
Returns the current visible region of this viewer s document The result may differ from the argument passed to code set Visible Region code if the document has been modified since then The visible region is supposed to be a consecutive region in viewer s input document and every character inside that region is supposed to visible in the viewer s widget p Viewers implementing link I Text Viewer Extension5 may be forced to change the fractions of the input document that are shown in order to fulfill this contract return this viewer s current visible region  setVisibleRegion ITextViewerExtension5
Returns whether a given range overlaps with the visible region of this viewer s document p Viewers implementing link I Text Viewer Extension5 may be forced to change the fractions of the input document that are shown in order to fulfill this request This is because the overlap is supposed to be without gaps param offset the offset param length the length return code true code if the specified range overlaps with the visible region  ITextViewerExtension5
Applies the color information encoded in the given text presentation code control Redraw code tells this viewer whether it should take care of redraw management or not If e g this call is one in a sequence of multiple presentation calls it is more appropriate to explicitly control redrawing at the beginning and the end of the sequence param presentation the presentation to be applied to this viewer param control Redraw indicates whether this viewer should manage redraws  controlRedraw controlRedraw
Marks the currently applied text presentation as invalid It is the viewer s responsibility to take any action it can to repair the text presentation p See link I Text Viewer Extension2 invalidate Text Presentation int int for a way to invalidate specific regions rather than the presentation as a whole since 2 0  ITextViewerExtension2 invalidateTextPresentation
Applies the given color as text foreground color to this viewer s selection param color the color to be applied 
Applies the given color as text foreground color to the specified section of this viewer code control Redraw code tells this viewer whether it should take care of redraw management or not param color the color to be applied param offset the offset of the range to be changed param length the length of the range to be changed param control Redraw indicates whether this viewer should manage redraws  controlRedraw controlRedraw
Returns the text operation target of this viewer return the text operation target of this viewer 
Returns the find replace operation target of this viewer return the find replace operation target of this viewer 
Sets the string that is used as prefix when lines of the given content type are prefixed by the prefix text operation Sets the strings that are used as prefixes when lines of the given content type are prefixed using the prefix text operation The prefixes are considered equivalent Inserting a prefix always inserts the default Prefixes 0 Removing a prefix removes all of the specified prefixes param default Prefixes the prefixes to be used param content Type the content type for which the prefixes are specified since 2 0  defaultPrefixes defaultPrefixes contentType
Sets the strings that are used as prefixes when lines of the given content type are shifted using the shift text operation The prefixes are considered equivalent Thus t and can both be used as prefix characters Shift right always inserts the indent Prefixes 0 Shift left removes all of the specified prefixes param indent Prefixes the prefixes to be used param content Type the content type for which the prefixes are specified  indentPrefixes indentPrefixes contentType
Sets the selection to the specified range param offset the offset of the selection range param length the length of the selection range 
Returns the range of the current selection in coordinates of this viewer s document return the current selection 
Returns a selection provider dedicated to this viewer Subsequent calls to this method return always the same selection provider return this viewer s selection provider 
Ensures that the given range is visible param offset the offset of the range to be revealed param length the length of the range to be revealed 
Scrolls the widget so the the given index is the line with the smallest line number of all visible lines param index the line which should become the top most line 
Returns the visible line with the smallest line number return the number of the top most visible line 
Returns the document offset of the upper left corner of this viewer s view port return the upper left corner offset 
Returns the visible line with the highest line number return the number of the bottom most line 
Returns the document offset of the lower right corner of this viewer s view port This is the visible character with the highest character position If the content of this viewer is shorter the position of the last character of the content is returned return the lower right corner offset 
Returns the vertical offset of the first visible line return the vertical offset of the first visible line 

Inserts the verify key listener at the beginning of the viewer s list of verify key listeners If the listener is already registered with the viewer this call moves the listener to the beginning of the list param listener the listener to be inserted 
Appends a verify key listener to the viewer s list of verify key listeners If the listener is already registered with the viewer this call moves the listener to the end of the list param listener the listener to be added 
Removes the verify key listener from the viewer s list of verify key listeners If the listener is not registered with this viewer this call has no effect param listener the listener to be removed 
Returns the control of this viewer return the control of this viewer 
Sets a mark at the given offset or clears the mark if the specified offset is code 1 code If a mark is set and the selection is empty cut and copy actions performed on this text viewer work on the region described by the positions of the mark and the cursor param offset the offset of the mark 
Returns the position of the mark code 1 code if the mark is not set return the position of the mark or code 1 code if no mark is set 
Enables disables the redrawing of this text viewer This temporarily disconnects the viewer from its underlying link org eclipse swt custom Styled Text widget While being disconnected only the viewer s selection may be changed using code set Selected Range code Any direct manipulation of the widget as well as calls to methods that change the viewer s presentation state such as enabling the segmented view are not allowed When redrawing is disabled the viewer does not send out any selection or view port change notification When redrawing is enabled again a selection change notification is sent out for the selected range and this range is revealed causing a view port changed notification param redraw code true code to enable redrawing code false code otherwise  StyledText setSelectedRange
Returns the viewer s rewrite target return the viewer s rewrite target 

Invalidates the viewer s text presentation for the given range param offset the offset of the first character to be redrawn param length the length of the range to be redrawn 
Sets this viewer s text hover for the given content type and the given state mask If the given text hover is code null code any hover installed for the given content type and state mask is removed param text Viewer Hover the new hover or code null code param content Type the type for which the hover is to be registered or unregistered param state Mask the SWT event state mask code DEFAULT HOVER STATE MASK code indicates that the hover is installed as the default hover  textViewerHover contentType stateMask DEFAULT_HOVER_STATE_MASK
Removes all text hovers for the given content type independent from their state mask p Note To remove a hover for a given content type and state mask use link set Text Hover I Text Hover String int with code null code as parameter for the text hover p param content Type the type for which all text hovers are to be unregistered  setTextHover ITextHover contentType
Returns the currently displayed text hover if any code null code otherwise return the currently displayed text hover or code null code 
Returns the location at which the most recent mouse hover event has occurred return the location of the most recent mouse hover event 
Prepends the given auto edit strategy to the existing list of strategies for the specified content type The strategies are called in the order in which they appear in the list of strategies param strategy the auto edit strategy param content Type the content type  contentType
Removes the first occurrence of the given auto edit strategy in the list of strategies registered under the specified content type param strategy the auto edit strategy param content Type the content type  contentType
Adds the given painter to this viewer param painter the painter to be added 
Removes the given painter from this viewer If the painter has not been added to this viewer this call is without effect param painter the painter to be removed 

Returns the minimal region of the viewer s document that completely comprises everything that is visible in the viewer s widget or code null code if there is no such region return the minimal region of the viewer s document comprising the contents of the viewer s widget or code null code 
Returns the widget line that corresponds to the given line of the viewer s document or code 1 code if there is no such line param model Line the line of the viewer s document return the corresponding widget line or code 1 code  modelLine
Returns the widget offset that corresponds to the given offset in the viewer s document or code 1 code if there is no such offset param model Offset the offset in the viewer s document return the corresponding widget offset or code 1 code  modelOffset
Returns the minimal region of the viewer s widget that completely comprises the given region of the viewer s document or code null code if there is no such region param model Range the region of the viewer s document return the minimal region of the widget comprising code model Range code or code null code  modelRange modelRange
Returns the offset of the viewer s document that corresponds to the given widget offset or code 1 code if there is no such offset param widget Offset the widget offset return the corresponding offset in the viewer s document or code 1 code  widgetOffset
Returns the minimal region of the viewer s document that completely comprises the given widget region or code null code if there is no such region param widget Range the widget region return the minimal region of the viewer s document comprising code widgetl Range code or code null code  widgetRange widgetlRange
Returns the line of the viewer s document that corresponds to the given widget line or code 1 code if there is no such line param widget Line the widget line return the corresponding line of the viewer s document or code 1 code  widgetLine
Returns the widget line of the given widget offset param widget Offset the widget offset return the widget line of the widget offset  widgetOffset

Instructs the receiver to request the link I Widget Token Keeper currently holding the widget token to take the keyboard focus return code true code if there was any code I Widget Token Keeper code that was asked to take the focus code false code otherwise  IWidgetTokenKeeper IWidgetTokenKeeper
Adds the given text presentation listener to this text viewer This call has no effect if the listener is already registered with this text viewer param listener the text presentation listener 
Removes the given text presentation listener from this text viewer This call has no effect if the listener is not registered with this text viewer param listener the text presentation listener 

Returns the minimal region of the viewer s input document that completely comprises everything that is visible in the viewer s widget or code null code if there is no such region return the minimal region of the viewer s document comprising the contents of the viewer s widget or code null code 
Returns the widget line that corresponds to the given line of the viewer s input document or code 1 code if there is no such line param model Line the line of the viewer s document return the corresponding widget line or code 1 code  modelLine
Returns the widget offset that corresponds to the given offset in the viewer s input document or code 1 code if there is no such offset param model Offset the offset in the viewer s document return the corresponding widget offset or code 1 code  modelOffset
Returns the minimal region of the viewer s widget that completely comprises the given region of the viewer s input document or code null code if there is no such region param model Range the region of the viewer s document return the minimal region of the widget comprising code model Range code or code null code  modelRange modelRange
Returns the offset of the viewer s input document that corresponds to the given widget offset or code 1 code if there is no such offset param widget Offset the widget offset return the corresponding offset in the viewer s document or code 1 code  widgetOffset
Returns the minimal region of the viewer s input document that completely comprises the given widget region or code null code if there is no such region param widget Range the widget region return the minimal region of the viewer s document comprising code widgetl Range code or code null code  widgetRange widgetlRange
Returns the line of the viewer s input document that corresponds to the given widget line or code 1 code if there is no such line param widget Line the widget line return the corresponding line of the viewer s document or code 1 code  widgetLine
Returns the widget line of the given widget offset param widget Offset the widget offset return the widget line of the widget offset  widgetOffset
Returns the maximal subranges of the given model range thus that there is no offset inside a subrange for which there is no image offset param model Range the model range return the list of subranges  modelRange
Exposes the given model range Returns whether this call caused a change of the set of exposed model ranges param model Range the model range to be exposed return code true code if the set of exposed model ranges changed code false code otherwise  modelRange

Returns the content type of the region return the content type of the region 

Connects this undo manager to the given text viewer param viewer the viewer the undo manager is connected to 
Disconnects this undo manager from its text viewer If this undo manager hasn t been connected before this operation has no effect 
Signals the undo manager that all subsequent changes until code end Compound Change code is called are to be undone in one piece  endCompoundChange
Signals the undo manager that the sequence of changes which started with code begin Compound Change code has been finished All subsequent changes are considered to be individually undo able  beginCompoundChange
Resets the history of the undo manager After that call there aren t any undo able or redo able text changes 
The given parameter determines the maximal length of the history remembered by the undo manager param undo Level the length of this undo manager s history  undoLevel
Returns whether at least one text change can be rolled back return code true code if at least one text change can be rolled back 
Returns whether at least one text change can be repeated A text change can be repeated only if it was executed and rolled back return code true code if at least on text change can be repeated 
boolean redoable Rolls back the most recently executed text change void undo 
void undo Repeats the most recently rolled back text change void redo 

Informs about view port changes The given vertical position is the new vertical scrolling offset measured in pixels param vertical Offset the vertical offset measured in pixels  verticalOffset

The given widget token owner requests the widget token from this token keeper Returns code true code if the token is released by this token keeper Note the keeper must not call code release Widget Token I Widget Token Keeper code explicitly p Replaced by link I Widget Token Keeper Extension request Widget Token I Widget Token Owner int param owner the token owner return code true code if token has been released code false code otherwise  releaseWidgetToken IWidgetTokenKeeper IWidgetTokenKeeperExtension requestWidgetToken IWidgetTokenOwner

The given widget token owner requests the widget token from this token keeper Returns code true code if the token is released by this token keeper Note the keeper must not call code release Widget Token I Widget Token Keeper code explicitly p The general contract is that the receiver should release the token if code priority code exceeds the receiver s priority p param owner the token owner param priority the priority of the request return code true code if token has been released code false code otherwise  releaseWidgetToken IWidgetTokenKeeper
Requests the receiver to give focus to its popup shell hover or similar There is no assumption made whether the receiver actually succeeded in taking the focus The return value gives a hint whether the receiver tried to take focus param owner the token owner return code true code if the receiver tried to take focus code false code if it did not 

Requests the widget token from this token owner Returns code true code if the token has been acquired or is already owned by the requester This method is non blocking p Replaced by link I Widget Token Owner Extension request Widget Token I Widget Token Keeper int param requester the token requester return code true code if requester acquires the token code false code otherwise  IWidgetTokenOwnerExtension requestWidgetToken IWidgetTokenKeeper
The given token keeper releases the token to this token owner If the token has previously not been held by the given token keeper nothing happens This method is non blocking param token Keeper the token keeper  tokenKeeper

Requests the widget token from this token owner Returns code true code if the token has been acquired or is already owned by the requester This method is non blocking p code priority code is forwarded to any existing token keeper to give it an estimate on whether the request has higher priority than the current keeper s There is however no guarantee that another keeper will release the token even if it has a high priority p param requester the token requester param priority the priority of the request return code true code if requester acquires the token code false code otherwise 

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private J Face Text Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE JFaceTextMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException

Creates a new Line param offset the offset of the line param end the last including character offset of the line param delimiter the line s delimiter public Line int offset int end String delimiter this offset offset this length end offset 1 this delimiter delimiter 
Creates a new Line param offset the offset of the line param length the length of the line public Line int offset int length this offset offset this length length this delimiter null 
see org eclipse jface text I Region get Offset public int get Offset return offset  IRegion getOffset getOffset
see org eclipse jface text I Region get Length public int get Length return length  IRegion getLength getLength

The leave event occurs when linked is left param model the model being left param flags the reason and commands for leaving linked mode 
The suspend event occurs when a nested linked mode is installed within code model code param model the model being suspended due to a nested model being installed 
The resume event occurs when a nested linked mode exits param model the linked mode model being resumed due to a nested mode exiting param flags the commands to execute when resuming after suspend 

Creates a new updater for the given code category code param category the new category public Inclusive Position Updater String category f Category category  InclusivePositionUpdater fCategory
public void update Document Event event int event Offset event get Offset int event Old Length event get Length int event New Length event get Text null 0 event get Text length int delta Length event New Length event Old Length try Position positions event get Document get Positions f Category for int i 0 i positions length i Position position positions i if position is Deleted continue int offset position get Offset int length position get Length int end offset length if offset event Offset event Old Length position comes way after change shift position set Offset offset delta Length else if end event Offset position comes way before change leave alone else if offset event Offset end event Offset event Old Length event completely internal to the position adjust length position set Length length delta Length else if offset event Offset event extends over end of position adjust length int new End event Offset event New Length position set Length new End offset else if end event Offset event Old Length event extends from before position into it adjust offset and length offset becomes end of event length adjusted accordingly we want to recycle the overlapping part position set Offset event Offset int deleted event Offset event Old Length offset position set Length length deleted event New Length else event consumes the position delete it position delete catch Bad Position Category Exception e ignore and return  DocumentEvent eventOffset getOffset eventOldLength getLength eventNewLength getText getText deltaLength eventNewLength eventOldLength getDocument getPositions fCategory isDeleted getOffset getLength eventOffset eventOldLength setOffset deltaLength eventOffset eventOffset eventOffset eventOldLength setLength deltaLength eventOffset newEnd eventOffset eventNewLength setLength newEnd eventOffset eventOldLength setOffset eventOffset eventOffset eventOldLength setLength eventNewLength BadPositionCategoryException
Returns the position category return the position category public String get Category return f Category  getCategory fCategory

see org eclipse jdt internal ui text link2 Linked Mode Model I Linked Mode Listener left org eclipse jdt internal ui text link2 Linked Mode Model int public void left Linked Mode Model model int flags Linked Mode Manager this left model flags  LinkedModeModel ILinkedModeListener LinkedModeModel LinkedModeModel LinkedModeManager
see org eclipse jdt internal ui text link2 Linked Mode Model I Linked Mode Listener suspend org eclipse jdt internal ui text link2 Linked Mode Model public void suspend Linked Mode Model model not interested  LinkedModeModel ILinkedModeListener LinkedModeModel LinkedModeModel
see org eclipse jdt internal ui text link2 Linked Mode Model I Linked Mode Listener resume org eclipse jdt internal ui text link2 Linked Mode Model int public void resume Linked Mode Model model int flags not interested  LinkedModeModel ILinkedModeListener LinkedModeModel LinkedModeModel
Returns whether there exists a code Linked Mode Manager code on code document code param document the document of interest return code true code if there exists a code Linked Mode Manager code on code document code code false code otherwise public static boolean has Manager I Document document return f Managers get document null  LinkedModeManager LinkedModeManager hasManager IDocument fManagers
Returns whether there exists a code Linked Mode Manager code on any of the code documents code param documents the documents of interest return code true code if there exists a code Linked Mode Manager code on any of the code documents code code false code otherwise public static boolean has Manager I Document documents for int i 0 i documents length i if has Manager documents i return true return false  LinkedModeManager LinkedModeManager hasManager IDocument hasManager
Returns the manager for the given documents If code force code is code true code any existing conflicting managers are canceled otherwise the method may return code null code if there are conflicts param documents the documents of interest param force whether to kill any conflicting managers return a manager able to cover the requested documents or code null code if there is a conflict and code force code was set to code false code public static Linked Mode Manager get Linked Manager I Document documents boolean force if documents null documents length 0 return null Set mgrs new Hash Set Linked Mode Manager mgr null for int i 0 i documents length i mgr Linked Mode Manager f Managers get documents i if mgr null mgrs add mgr if mgrs size 1 if force for Iterator it mgrs iterator it has Next Linked Mode Manager m Linked Mode Manager it next m close All Environments else return null if mgrs size 0 mgr new Linked Mode Manager for int i 0 i documents length i f Managers put documents i mgr return mgr  LinkedModeManager getLinkedManager IDocument HashSet LinkedModeManager LinkedModeManager fManagers hasNext LinkedModeManager LinkedModeManager closeAllEnvironments LinkedModeManager fManagers
Cancels any linked mode manager for the specified document param document the document whose code Linked Mode Manager code should be cancelled public static void cancel Manager I Document document Linked Mode Manager mgr Linked Mode Manager f Managers get document if mgr null mgr close All Environments  LinkedModeManager cancelManager IDocument LinkedModeManager LinkedModeManager fManagers closeAllEnvironments
Notify the manager about a leaving model param model param flags private void left Linked Mode Model model int flags if f Environments contains model return while f Environments is Empty Linked Mode Model env Linked Mode Model f Environments pop if env model break else env exit I Linked Mode Listener NONE if f Environments is Empty remove Manager  LinkedModeModel fEnvironments fEnvironments isEmpty LinkedModeModel LinkedModeModel fEnvironments ILinkedModeListener fEnvironments isEmpty removeManager
private void close All Environments while f Environments is Empty Linked Mode Model env Linked Mode Model f Environments pop env exit I Linked Mode Listener NONE remove Manager  closeAllEnvironments fEnvironments isEmpty LinkedModeModel LinkedModeModel fEnvironments ILinkedModeListener removeManager
private void remove Manager for Iterator it f Managers key Set iterator it has Next I Document doc I Document it next if f Managers get doc this it remove  removeManager fManagers keySet hasNext IDocument IDocument fManagers
Tries to nest the given code Linked Mode Model code onto the top of the stack of environments managed by the receiver If code force code is code true code any environments on the stack that create a conflict are killed param model the model to nest param force whether to force the addition of the model return code true code if nesting was successful code false code otherwise only possible if code force code is code false code public boolean nest Environment Linked Mode Model model boolean force Assert is Not Null model try while true if f Environments is Empty model add Linking Listener f Listener f Environments push model return true Linked Mode Model top Linked Mode Model f Environments peek if model can Nest Into top model add Linking Listener f Listener f Environments push model return true else if force return false else force f Environments pop top exit I Linked Mode Listener NONE continue finally if we remove any make sure the new one got inserted Assert is True f Environments size 0  LinkedModeModel nestEnvironment LinkedModeModel isNotNull fEnvironments isEmpty addLinkingListener fListener fEnvironments LinkedModeModel LinkedModeModel fEnvironments canNestInto addLinkingListener fListener fEnvironments fEnvironments ILinkedModeListener isTrue fEnvironments
return public Linked Mode Model get Top Environment if f Environments is Empty return null else return Linked Mode Model f Environments peek  LinkedModeModel getTopEnvironment fEnvironments isEmpty LinkedModeModel fEnvironments

Checks whether there is already a model installed on code document code param document the code I Document code of interest return code true code if there is an existing model code false code otherwise public static boolean has Installed Model I Document document if there is a manager there also is a model return Linked Mode Manager has Manager document  IDocument hasInstalledModel IDocument LinkedModeManager hasManager
Checks whether there is already a linked mode model installed on any of the code documents code param documents the code I Document code s of interest return code true code if there is an existing model code false code otherwise public static boolean has Installed Model I Document documents if there is a manager there also is a model return Linked Mode Manager has Manager documents  IDocument hasInstalledModel IDocument LinkedModeManager hasManager
Cancels any linked mode model on the specified document If there is no model nothing happens param document the document whose code Linked Mode Model code should be cancelled public static void close All Models I Document document Linked Mode Manager cancel Manager document  LinkedModeModel closeAllModels IDocument LinkedModeManager cancelManager
Returns the model currently active on code document code at code offset code or code null code if there is none param document the document for which the caller asks for a model param offset the offset into code document code as there may be several models on a document return the model currently active on code document code or code null code public static Linked Mode Model get Model I Document document int offset Linked Mode Manager mgr Linked Mode Manager get Linked Manager new I Document document false if mgr null return mgr get Top Environment else return null  LinkedModeModel getModel IDocument LinkedModeManager LinkedModeManager getLinkedManager IDocument getTopEnvironment
Creates a new instance param edit the edition to apply to a document public Replace Text Edit edit f Edit edit  TextEdit fEdit
public void perform I Document document I Document Listener owner throws Runtime Exception Malformed Tree Exception document remove Document Listener owner f Is Changing true try f Edit apply document Text Edit UPDATE REGIONS Text Edit CREATE UNDO catch Bad Location Exception e perform should really throw a Bad Location Exception TODO see https bugs eclipse org bugs show bug cgi id 52950 throw new Runtime Exception e finally document add Document Listener owner f Is Changing false  IDocument IDocumentListener RuntimeException MalformedTreeException removeDocumentListener fIsChanging fEdit TextEdit UPDATE_REGIONS TextEdit CREATE_UNDO BadLocationException BadLocationException show_bug RuntimeException addDocumentListener fIsChanging
Checks whether code event code occurs within any of the positions managed by this model If not the linked mode is left param event inherit Doc public void document About To Be Changed Document Event event don t react on changes executed by the parent model if f Parent Environment null f Parent Environment is Changing return f Exit false f Last Event event for Iterator it f Groups iterator it has Next Linked Position Group group Linked Position Group it next if group is Legal Event event take the first hit exlusion is guaranteed by enforcing disjointness when adding positions return the event describes a change that lies outside of any managed position signal to exit don t exit here already since we want to make sure that the positions are updated to the document event TODO we might not always want to exit e g we want to stay linked if code completion has inserted import statements f Exit true  inheritDoc documentAboutToBeChanged DocumentEvent fParentEnvironment fParentEnvironment isChanging fExit fLastEvent fGroups hasNext LinkedPositionGroup LinkedPositionGroup isLegalEvent fExit
Propagates a change to a linked position to all its sibling positions param event inherit Doc public void document Changed Document Event event don t react on changes executed by the parent model if f Parent Environment null f Parent Environment is Changing return if event equals f Last Event f Exit Linked Mode Model this exit I Linked Mode Listener EXTERNAL MODIFICATION for Iterator it f Groups iterator it has Next Linked Position Group group Linked Position Group it next Map result group handle Event event if result null continue edit all documents for Iterator it2 result key Set iterator it2 has Next I Document doc I Document it2 next Text Edit edit Text Edit result get doc Replace replace new Replace edit apply the edition either as post notification replace on the calling document or directly on any other document if doc event get Document if doc instanceof I Document Extension I Document Extension doc register Post Notification Replace this replace else ignore there is no way we can log from jface text else replace perform doc this take the first hit exlusion is guaranteed by enforcing disjointness when adding positions return  inheritDoc documentChanged DocumentEvent fParentEnvironment fParentEnvironment isChanging fLastEvent fExit LinkedModeModel ILinkedModeListener EXTERNAL_MODIFICATION fGroups hasNext LinkedPositionGroup LinkedPositionGroup handleEvent keySet hasNext IDocument IDocument TextEdit TextEdit getDocument IDocumentExtension IDocumentExtension registerPostNotificationReplace
Whether we are in the process of editing documents set by code Replace code read by code Document Listener code return code true code if we are in the process of editing a document code false code otherwise private boolean is Changing return f Is Changing f Parent Environment null f Parent Environment is Changing  DocumentListener isChanging fIsChanging fParentEnvironment fParentEnvironment isChanging
Throws a code Bad Location Exception code if code group code conflicts with this model s groups param group the group being checked throws Bad Location Exception if code group code conflicts with this model s groups private void enforce Disjoint Linked Position Group group throws Bad Location Exception for Iterator it f Groups iterator it has Next Linked Position Group g Linked Position Group it next g enforce Disjoint group  BadLocationException BadLocationException enforceDisjoint LinkedPositionGroup BadLocationException fGroups hasNext LinkedPositionGroup LinkedPositionGroup enforceDisjoint
Causes this model to exit Called either if a document change outside this model is detected or by the UI p This method part of the private protocol between code LinkedUI Control code and code Linked Mode Model code p param flags the exit flags public void exit int flags if f Is Active return f Is Active false for Iterator it f Documents iterator it has Next I Document doc I Document it next try doc remove Position Category get Category catch Bad Position Category Exception e won t happen Assert is True false doc remove Position Updater f Updater doc remove Document Listener f Document Listener f Documents clear f Groups clear List listeners new Array List f Listeners f Listeners clear for Iterator it listeners iterator it has Next I Linked Mode Listener listener I Linked Mode Listener it next listener left this flags if f Parent Environment null f Parent Environment resume flags  LinkedUIControl LinkedModeModel fIsActive fIsActive fDocuments hasNext IDocument IDocument removePositionCategory getCategory BadPositionCategoryException isTrue removePositionUpdater fUpdater removeDocumentListener fDocumentListener fDocuments fGroups ArrayList fListeners fListeners hasNext ILinkedModeListener ILinkedModeListener fParentEnvironment fParentEnvironment
Puts code document code into the set of managed documents This involves registering the document listener and adding our position category param document the new document private void manage Document I Document document if f Documents contains document f Documents add document document add Position Category get Category document add Position Updater f Updater document add Document Listener f Document Listener  manageDocument IDocument fDocuments fDocuments addPositionCategory getCategory addPositionUpdater fUpdater addDocumentListener fDocumentListener
Returns the position category used by this model return the position category used by this model private String get Category return to String  getCategory toString
Adds a position group to this code Linked Mode Model code This method may not be called if the model has been installed Also if a UI has been set up for this model it may not pick up groups added afterwards p If the positions in code group code conflict with any other group in this model a code Bad Location Exception code is thrown Also if this model is nested inside another one all positions in all groups of the child model have to reside within a single position in the parent model otherwise a code Bad Location Exception code is thrown p p If code group code already exists nothing happens p param group the group to be added to this model throws Bad Location Exception if the group conflicts with the other groups in this model or violates the nesting requirements throws Illegal State Exception if the method is called when the model is already sealed public void add Group Linked Position Group group throws Bad Location Exception if group null throw new Illegal Argument Exception group may not be null NON NLS 1 if f Is Sealed throw new Illegal State Exception model is already installed NON NLS 1 if f Groups contains group nothing happens return enforce Disjoint group group seal f Groups add group  LinkedModeModel BadLocationException BadLocationException BadLocationException IllegalStateException addGroup LinkedPositionGroup BadLocationException IllegalArgumentException fIsSealed IllegalStateException fGroups enforceDisjoint fGroups
Installs this model which includes registering as document listener on all involved documents and storing global information about this model Any conflicting model already present will be closed p If an exception is thrown the installation failed and the model is unusable p throws Bad Location Exception if some of the positions of this model were not valid positions on their respective documents public void force Install throws Bad Location Exception if install true Assert is True false  BadLocationException forceInstall BadLocationException isTrue
Installs this model which includes registering as document listener on all involved documents and storing global information about this model If there is another model installed on the document s targeted by the receiver that conflicts with it installation may fail p The return value states whether installation was successful if not the model is not installed and will not work p return code true code if installation was successful code false code otherwise throws Bad Location Exception if some of the positions of this model were not valid positions on their respective documents public boolean try Install throws Bad Location Exception return install false  BadLocationException tryInstall BadLocationException
Installs this model which includes registering as document listener on all involved documents and storing global information about this model The return value states whether installation was successful if not the model is not installed and will not work The return value can only then become code false code if code force code was set to code false code as well param force if code true code any other model that cannot coexist with this one is canceled if code false code install will fail when conflicts occur and return false return code true code if installation was successful code false code otherwise throws Bad Location Exception if some of the positions of this model were not valid positions on their respective documents private boolean install boolean force throws Bad Location Exception if f Is Sealed throw new Illegal State Exception model is already installed NON NLS 1 enforce Not Empty I Document documents get Documents Linked Mode Manager manager Linked Mode Manager get Linked Manager documents force if we force creation we require a valid manager Assert is True force manager null if manager null return false if manager nest Environment this force if force Assert is True false else return false we set up successfully After this point exit has to be called to remove registered listeners f Is Sealed true if f Parent Environment null f Parent Environment suspend register positions try for Iterator it f Groups iterator it has Next Linked Position Group group Linked Position Group it next group register this return true catch Bad Location Exception e if we fail to add make sure to release all listeners again exit I Linked Mode Listener NONE throw e  BadLocationException BadLocationException fIsSealed IllegalStateException enforceNotEmpty IDocument getDocuments LinkedModeManager LinkedModeManager getLinkedManager isTrue nestEnvironment isTrue fIsSealed fParentEnvironment fParentEnvironment fGroups hasNext LinkedPositionGroup LinkedPositionGroup BadLocationException ILinkedModeListener
Asserts that there is at least one linked position in this linked mode model throws an Illegal State Exception otherwise private void enforce Not Empty boolean has Position false for Iterator it f Groups iterator it has Next if Linked Position Group it next is Emtpy has Position true break if has Position throw new Illegal State Exception must specify at least one linked position NON NLS 1  IllegalStateException enforceNotEmpty hasPosition fGroups hasNext LinkedPositionGroup isEmtpy hasPosition hasPosition IllegalStateException
Collects all the documents that contained positions are set upon return the set of documents affected by this model private I Document get Documents Set docs new Hash Set for Iterator it f Groups iterator it has Next Linked Position Group group Linked Position Group it next docs add All Arrays as List group get Documents return I Document docs to Array new I Document docs size  IDocument getDocuments HashSet fGroups hasNext LinkedPositionGroup LinkedPositionGroup addAll asList getDocuments IDocument toArray IDocument
Returns whether the receiver can be nested into the given code parent code model If yes the parent model and its position that the receiver fits in are remembered param parent the parent model candidate return code true code if the receiver can be nested into code parent code code false code otherwise boolean can Nest Into Linked Mode Model parent for Iterator it f Groups iterator it has Next Linked Position Group group Linked Position Group it next if enforce Nestability group parent f Parent Position null return false Assert is Not Null f Parent Position f Parent Environment parent return true  canNestInto LinkedModeModel fGroups hasNext LinkedPositionGroup LinkedPositionGroup enforceNestability fParentPosition isNotNull fParentPosition fParentEnvironment
Called by nested models when a group is added to them All positions in all groups of a nested model have to fit inside a single position in the parent model param group the group of the nested model to be adopted param model the model to check against return code false code if it failed to enforce nestability private boolean enforce Nestability Linked Position Group group Linked Mode Model model Assert is Not Null model Assert is Not Null group try for Iterator it model f Groups iterator it has Next Linked Position Group pg Linked Position Group it next Linked Position pos pos pg adopt group if pos null f Parent Position null f Parent Position pos return false group does not fit into one parent position which is illegal else if f Parent Position null pos null f Parent Position pos catch Bad Location Exception e return false group must fit into exactly one of the parent s positions return f Parent Position null  enforceNestability LinkedPositionGroup LinkedModeModel isNotNull isNotNull fGroups hasNext LinkedPositionGroup LinkedPositionGroup LinkedPosition fParentPosition fParentPosition fParentPosition fParentPosition BadLocationException fParentPosition
Returns whether this model is nested p This method is part of the private protocol between code LinkedUI Control code and code Linked Mode Model code p return code true code if this model is nested code false code otherwise public boolean is Nested return f Parent Environment null  LinkedUIControl LinkedModeModel isNested fParentEnvironment
Returns the positions in this model that have a tab stop in the order they were added p This method is part of the private protocol between code LinkedUI Control code and code Linked Mode Model code p return the positions in this model that have a tab stop in the order they were added public List get Tab Stop Sequence return f Position Sequence  LinkedUIControl LinkedModeModel getTabStopSequence fPositionSequence
Adds code listener code to the set of listeners that are informed upon state changes param listener the new listener public void add Linking Listener I Linked Mode Listener listener Assert is Not Null listener if f Listeners contains listener f Listeners add listener  addLinkingListener ILinkedModeListener isNotNull fListeners fListeners
Removes code listener code from the set of listeners that are informed upon state changes param listener the new listener public void remove Linking Listener I Linked Mode Listener listener f Listeners remove listener  removeLinkingListener ILinkedModeListener fListeners
Finds the position in this model that is closest after code to Find code code to Find code needs not be a position in this model and serves merely as an offset p This method part of the private protocol between code LinkedUI Control code and code Linked Mode Model code p param to Find the position to search from return the closest position in the same document as code to Find code after the offset of code to Find code or code null code public Linked Position find Position Linked Position to Find Linked Position position null for Iterator it f Groups iterator it has Next Linked Position Group group Linked Position Group it next position group get Position to Find if position null break return position  toFind toFind LinkedUIControl LinkedModeModel toFind toFind toFind LinkedPosition findPosition LinkedPosition toFind LinkedPosition fGroups hasNext LinkedPositionGroup LinkedPositionGroup getPosition toFind
Registers a code Linked Position code with this model Called by code Position Group code param position the position to register throws Bad Location Exception if the position cannot be added to its document void register Linked Position position throws Bad Location Exception Assert is Not Null position I Document document position get Document manage Document document try document add Position get Category position catch Bad Position Category Exception e won t happen as the category has been added by manage Document Assert is True false int seq Nr position get Sequence Number if seq Nr Linked Position Group NO STOP f Position Sequence add position  LinkedPosition PositionGroup BadLocationException LinkedPosition BadLocationException isNotNull IDocument getDocument manageDocument addPosition getCategory BadPositionCategoryException manageDocument isTrue seqNr getSequenceNumber seqNr LinkedPositionGroup NO_STOP fPositionSequence
Suspends this model private void suspend List l new Array List f Listeners for Iterator it l iterator it has Next I Linked Mode Listener listener I Linked Mode Listener it next listener suspend this  ArrayList fListeners hasNext ILinkedModeListener ILinkedModeListener
Resumes this model code flags code can be code NONE code or code SELECT code param flags code NONE code or code SELECT code private void resume int flags List l new Array List f Listeners for Iterator it l iterator it has Next I Linked Mode Listener listener I Linked Mode Listener it next listener resume this flags  ArrayList fListeners hasNext ILinkedModeListener ILinkedModeListener
Returns whether an offset is contained by any position in this model param offset the offset to check return code true code if code offset code is included by any position see link Linked Position includes int in this model code false code otherwise public boolean any Position Contains int offset for Iterator it f Groups iterator it has Next Linked Position Group group Linked Position Group it next if group contains offset take the first hit exlusion is guaranteed by enforcing disjointness when adding positions return true return false  LinkedPosition anyPositionContains fGroups hasNext LinkedPositionGroup LinkedPositionGroup
Returns the linked position group that contains code position code or code null code if code position code is not contained in any group within this model Group containment is tested by calling code group contains position code for every code group code in this model p This method part of the private protocol between code LinkedUI Control code and code Linked Mode Model code p param position the position the group of which is requested return the first group in this model for which code group contains position code returns code true code or code null code if no group contains code position code public Linked Position Group get Group For Position Position position for Iterator it f Groups iterator it has Next Linked Position Group group Linked Position Group it next if group contains position return group return null  LinkedUIControl LinkedModeModel LinkedPositionGroup getGroupForPosition fGroups hasNext LinkedPositionGroup LinkedPositionGroup

public static interface I Linked ModeUI Focus Listener Called when the UI for the linked mode leaves a linked position param position the position being left param target the target where code position code resides in  ILinkedModeUIFocusListener
void linking Focus Lost Linked Position position Linked ModeUI Target target Called when the UI for the linked mode gives focus to a linked position param position the position being entered param target the target where code position code resides in  linkingFocusLost LinkedPosition LinkedModeUITarget
private static final class Emtpy Focus Listener implements I Linked ModeUI Focus Listener public void linking Focus Gained Linked Position position Linked ModeUI Target target ignore  EmtpyFocusListener ILinkedModeUIFocusListener linkingFocusGained LinkedPosition LinkedModeUITarget
public void linking Focus Lost Linked Position position Linked ModeUI Target target ignore  linkingFocusLost LinkedPosition LinkedModeUITarget
public static abstract class Linked ModeUI Target implements I Linked ModeUI Focus Listener Returns the viewer represented by this target never code null code return the viewer associated with this target  LinkedModeUITarget ILinkedModeUIFocusListener
param viewer the viewer public Empty Target I Text Viewer viewer Assert is Not Null viewer f Text Viewer viewer  EmptyTarget ITextViewer isNotNull fTextViewer
see org eclipse jdt internal ui text link2 Linked ModeUI I LinkedUI Target get Viewer public I Text Viewer get Viewer return f Text Viewer  LinkedModeUI ILinkedUITarget getViewer ITextViewer getViewer fTextViewer
inherit Doc public void linking Focus Lost Linked Position position Linked ModeUI Target target  inheritDoc linkingFocusLost LinkedPosition LinkedModeUITarget
inherit Doc public void linking Focus Gained Linked Position position Linked ModeUI Target target  inheritDoc linkingFocusGained LinkedPosition LinkedModeUITarget
private final class Exit Listener implements I Linked Mode Listener public void left Linked Mode Model model int flags leave I Linked Mode Listener EXIT ALL flags  ExitListener ILinkedModeListener LinkedModeModel ILinkedModeListener EXIT_ALL
public void suspend Linked Mode Model model disconnect redraw  LinkedModeModel
public void resume Linked Mode Model model int flags if flags I Linked Mode Listener EXIT ALL 0 leave flags else connect if flags I Linked Mode Listener SELECT 0 select ensure Annotation Model Installed redraw  LinkedModeModel ILinkedModeListener EXIT_ALL ILinkedModeListener ensureAnnotationModelInstalled
public boolean doit Creates a new instance param flags the exit flags param doit the doit flag for the verify event public Exit Flags int flags boolean doit this flags flags this doit doit  ExitFlags
public interface I Exit Policy Checks whether the linked mode should be left after receiving the given code Verify Event code and selection Note that the event carries widget coordinates as opposed to code offset code and code length code which are document coordinates param model the linked mode model param event the verify event param offset the offset of the current selection param length the length of the current selection return valid exit flags or code null code if no special action should be taken  IExitPolicy VerifyEvent
see org eclipse jdt internal ui text link2 Linked ModeUI I Exit Policy do Exit org eclipse swt events Verify Event int int public Exit Flags do Exit Linked Mode Model model Verify Event event int offset int length return null  LinkedModeUI IExitPolicy doExit VerifyEvent ExitFlags doExit LinkedModeModel VerifyEvent
private class Closer implements Shell Listener I Text Input Listener public void shell Activated Shell Event e  ShellListener ITextInputListener shellActivated ShellEvent
public void shell Closed Shell Event e leave I Linked Mode Listener EXIT ALL  shellClosed ShellEvent ILinkedModeListener EXIT_ALL
display async Exec new Runnable public void run if f Is Active f Assistant null f Assistant has Focus leave I Linked Mode Listener EXIT ALL  asyncExec fIsActive fAssistant fAssistant hasFocus ILinkedModeListener EXIT_ALL
public void shell Deactivated Shell Event e T ODO reenable after debugging if true return from Linked PositionUI don t deactivate on focus lost since the proposal popups may take focus plus it doesn t hurt if you can check with another window without losing linked mode since there is no intrusive popup sticking out need to check first what happens on reentering based on an open action Seems to be no problem Better Check with content assistant and only leave if its not the proposal shell that took the focus away Styled Text text Display display if f Assistant null f Current Target null text f Current Target f Widget null text is Disposed display text get Display null display is Disposed leave I Linked Mode Listener EXIT ALL else Post in UI thread since the assistant popup will only get the focus after we lose it display async Exec new Runnable public void run if f Is Active f Assistant null f Assistant has Focus leave I Linked Mode Listener EXIT ALL  shellDeactivated ShellEvent LinkedPositionUI StyledText fAssistant fCurrentTarget fCurrentTarget fWidget isDisposed getDisplay isDisposed ILinkedModeListener EXIT_ALL asyncExec fIsActive fAssistant fAssistant hasFocus ILinkedModeListener EXIT_ALL
public void shell Deiconified Shell Event e  shellDeiconified ShellEvent
public void shell Iconified Shell Event e leave I Linked Mode Listener EXIT ALL  shellIconified ShellEvent ILinkedModeListener EXIT_ALL
see org eclipse jface text I Text Input Listener input Document About To Be Changed org eclipse jface text I Document org eclipse jface text I Document public void input Document About To Be Changed I Document old Input I Document new Input leave I Linked Mode Listener EXIT ALL  ITextInputListener inputDocumentAboutToBeChanged IDocument IDocument inputDocumentAboutToBeChanged IDocument oldInput IDocument newInput ILinkedModeListener EXIT_ALL
see org eclipse jface text I Text Input Listener input Document Changed org eclipse jface text I Document org eclipse jface text I Document public void input Document Changed I Document old Input I Document new Input  ITextInputListener inputDocumentChanged IDocument IDocument inputDocumentChanged IDocument oldInput IDocument newInput
public void verify Key Verify Event event if event doit f Is Enabled return Point selection f Current Target get Viewer get Selected Range int offset selection x int length selection y if the custom exit policy returns anything use that Exit Flags exit Flags f Exit Policy do Exit f Environment event offset length if exit Flags null leave exit Flags flags event doit exit Flags doit return standard behaviour Shift Tab jumps from position to position depending on cycle mode Enter accepts all entries and leaves all possibly stacked environments the last sets the caret Esc accepts all entries and leaves all possibly stacked environments the caret stays what do we do to leave one level of a cycling model that is stacked This is only the case if the level was set up with forced cycling CYCLE ALWAYS in which case the caller is sure that one does not need by level exiting switch event character SHIFT TAB hop between edit boxes case 0x09 if f Exit Position null f Exit Position includes offset f Environment any Position Contains offset outside any edit box leave all TODO should only leave the affected level and forward to the next upper leave I Linked Mode Listener EXIT ALL break else if event state Mask SWT SHIFT previous else next event doit false break ENTER case 0x0A Ctrl Enter on WinXP case 0x0D if f Exit Position null f Exit Position includes offset f Environment any Position Contains offset if f Environment any Position Contains offset if f Exit Position null f Exit Position includes offset f Environment any Position Contains offset outside any edit box or on exit position leave all TODO should only leave the affected level and forward to the next upper leave I Linked Mode Listener EXIT ALL break else normal case exit entire stack and put caret to final position leave I Linked Mode Listener EXIT ALL I Linked Mode Listener UPDATE CARET event doit false break ESC case 0x1B exit entire stack and leave caret leave I Linked Mode Listener EXIT ALL event doit false break default if event character 0 if control Undo Behavior offset length leave I Linked Mode Listener EXIT ALL break  verifyKey VerifyEvent fIsEnabled fCurrentTarget getViewer getSelectedRange ExitFlags exitFlags fExitPolicy doExit fEnvironment exitFlags exitFlags exitFlags CYCLE_ALWAYS fExitPosition fExitPosition fEnvironment anyPositionContains ILinkedModeListener EXIT_ALL stateMask fExitPosition fExitPosition fEnvironment anyPositionContains fEnvironment anyPositionContains fExitPosition fExitPosition fEnvironment anyPositionContains ILinkedModeListener EXIT_ALL ILinkedModeListener EXIT_ALL ILinkedModeListener UPDATE_CARET ILinkedModeListener EXIT_ALL controlUndoBehavior ILinkedModeListener EXIT_ALL
private boolean control Undo Behavior int offset int length Linked Position position f Environment find Position new Linked Position f Current Target get Viewer get Document offset length Linked Position Group NO STOP if position null if the last position is not the same and there is an open change close it if position equals f Previous Position end Compound Change begin Compound Change f Previous Position position return f Previous Position null  controlUndoBehavior LinkedPosition fEnvironment findPosition LinkedPosition fCurrentTarget getViewer getDocument LinkedPositionGroup NO_STOP fPreviousPosition endCompoundChange beginCompoundChange fPreviousPosition fPreviousPosition
param enabled the new enabled state public void set Enabled boolean enabled f Is Enabled enabled  setEnabled fIsEnabled
public void selection Changed Selection Changed Event event I Selection selection event get Selection if selection instanceof I Text Selection I Text Selection textsel I Text Selection selection if event get Selection Provider instanceof I Text Viewer I Document doc I Text Viewer event get Selection Provider get Document if doc null int offset textsel get Offset int length textsel get Length if offset 0 length 0 Linked Position find new Linked Position doc offset length Linked Position Group NO STOP Linked Position pos f Environment find Position find if pos null f Exit Position null f Exit Position includes find pos f Exit Position if pos null switch Position pos false false  selectionChanged SelectionChangedEvent ISelection getSelection ITextSelection ITextSelection ITextSelection getSelectionProvider ITextViewer IDocument ITextViewer getSelectionProvider getDocument getOffset getLength LinkedPosition LinkedPosition LinkedPositionGroup NO_STOP LinkedPosition fEnvironment findPosition fExitPosition fExitPosition fExitPosition switchPosition
see org eclipse jface internal text link contentassist I Proposal Listener proposal Chosen org eclipse jface text contentassist I Completion Proposal public void proposal Chosen I Completion Proposal proposal next  IProposalListener proposalChosen ICompletionProposal proposalChosen ICompletionProposal
public void customize Document Command I Document document Document Command command invalidate the change to ensure that the change is performed on the document only if f Environment any Position Contains command offset command doit false command caret Offset command offset command length  customizeDocumentCommand IDocument DocumentCommand fEnvironment anyPositionContains caretOffset
Creates a new UI on the given model and the set of viewers The model must provide a tab stop sequence with a non empty list of tab stops param model the linked mode model param targets the non empty list of targets upon which the linked mode UI should act public Linked ModeUI Linked Mode Model model Linked ModeUI Target targets constructor model targets  LinkedModeUI LinkedModeModel LinkedModeUITarget
Convenience constructor for just one viewer param model the linked mode model param viewer the viewer upon which the linked mode UI should act public Linked ModeUI Linked Mode Model model I Text Viewer viewer constructor model new Linked ModeUI Target new Empty Target viewer  LinkedModeUI LinkedModeModel ITextViewer LinkedModeUITarget EmptyTarget
Convenience constructor for multiple viewers param model the linked mode model param viewers the non empty list of viewers upon which the linked mode UI should act public Linked ModeUI Linked Mode Model model I Text Viewer viewers Linked ModeUI Target array new Linked ModeUI Target viewers length for int i 0 i array length i array i new Empty Target viewers i constructor model array  LinkedModeUI LinkedModeModel ITextViewer LinkedModeUITarget LinkedModeUITarget EmptyTarget
Convenience constructor for one target param model the linked mode model param target the target upon which the linked mode UI should act public Linked ModeUI Linked Mode Model model Linked ModeUI Target target constructor model new Linked ModeUI Target target  LinkedModeUI LinkedModeModel LinkedModeUITarget LinkedModeUITarget
This does the actual constructor work param model the linked mode model param targets the non empty array of targets upon which the linked mode ui should act private void constructor Linked Mode Model model Linked ModeUI Target targets Assert is Not Null model Assert is Not Null targets Assert is True targets length 0 Assert is True model get Tab Stop Sequence size 0 f Environment model f Targets targets f Current Target targets 0 f Iterator new Tab Stop Iterator f Environment get Tab Stop Sequence f Iterator set Cycling f Environment is Nested f Environment add Linking Listener f Linked Listener f Assistant new Content Assistant2 f Assistant add Proposal Listener f Proposal Listener TODO find a way to set up content assistant f Assistant set Document Partitioning I Java Partitions JAVA PARTITIONING f Caret Position delete  LinkedModeModel LinkedModeUITarget isNotNull isNotNull isTrue isTrue getTabStopSequence fEnvironment fTargets fCurrentTarget fIterator TabStopIterator fEnvironment getTabStopSequence fIterator setCycling fEnvironment isNested fEnvironment addLinkingListener fLinkedListener fAssistant ContentAssistant2 fAssistant addProposalListener fProposalListener fAssistant setDocumentPartitioning IJavaPartitions JAVA_PARTITIONING fCaretPosition
Starts this UI on the first position public void enter f Is Active true connect next  fIsActive
Sets an code I Exit Policy code to customize the exit behavior of this linked mode UI param policy the exit policy to use public void set Exit Policy I Exit Policy policy f Exit Policy policy  IExitPolicy setExitPolicy IExitPolicy fExitPolicy
Sets the exit position to move the caret to when linked mode mode is exited param target the target where the exit position is located param offset the offset of the exit position param length the length of the exit position in case there should be a selection param sequence set to the tab stop position of the exit position or code Linked Position Group NO STOP code if there should be no tab stop throws Bad Location Exception if the position is not valid in the viewer s document public void set Exit Position Linked ModeUI Target target int offset int length int sequence throws Bad Location Exception remove any existing exit position if f Exit Position null f Exit Position get Document remove Position f Exit Position f Iterator remove Position f Exit Position f Exit Position null I Document doc target get Viewer get Document if doc null return f Exit Position new Linked Position doc offset length sequence doc add Position f Exit Position gets removed in leave if sequence Linked Position Group NO STOP f Iterator add Position f Exit Position  LinkedPositionGroup NO_STOP BadLocationException setExitPosition LinkedModeUITarget BadLocationException fExitPosition fExitPosition getDocument removePosition fExitPosition fIterator removePosition fExitPosition fExitPosition IDocument getViewer getDocument fExitPosition LinkedPosition addPosition fExitPosition LinkedPositionGroup NO_STOP fIterator addPosition fExitPosition
Sets the exit position to move the caret to when linked mode is exited param viewer the viewer where the exit position is located param offset the offset of the exit position param length the length of the exit position in case there should be a selection param sequence set to the tab stop position of the exit position or code Linked Position Group NO STOP code if there should be no tab stop throws Bad Location Exception if the position is not valid in the viewer s document public void set Exit Position I Text Viewer viewer int offset int length int sequence throws Bad Location Exception set Exit Position new Empty Target viewer offset length sequence  LinkedPositionGroup NO_STOP BadLocationException setExitPosition ITextViewer BadLocationException setExitPosition EmptyTarget
Sets the cycling mode to either of code CYCLING ALWAYS code code CYCLING NEVER code or code CYCLING WHEN NO PARENT code which is the default param mode the new cycling mode public void set Cycling Mode Object mode if mode CYCLE ALWAYS mode CYCLE NEVER mode CYCLE WHEN NO PARENT throw new Illegal Argument Exception if mode CYCLE ALWAYS mode CYCLE WHEN NO PARENT f Environment is Nested f Iterator set Cycling true else f Iterator set Cycling false  CYCLING_ALWAYS CYCLING_NEVER CYCLING_WHEN_NO_PARENT setCyclingMode CYCLE_ALWAYS CYCLE_NEVER CYCLE_WHEN_NO_PARENT IllegalArgumentException CYCLE_ALWAYS CYCLE_WHEN_NO_PARENT fEnvironment isNested fIterator setCycling fIterator setCycling
void next if f Iterator has Next f Frame Position switch Position f Iterator next f Frame Position true true return else leave I Linked Mode Listener UPDATE CARET  fIterator hasNext fFramePosition switchPosition fIterator fFramePosition ILinkedModeListener UPDATE_CARET
void previous if f Iterator has Previous f Frame Position switch Position f Iterator previous f Frame Position true true else dont t update caret but rather select the current frame leave I Linked Mode Listener SELECT  fIterator hasPrevious fFramePosition switchPosition fIterator fFramePosition ILinkedModeListener
private void trigger Context Info I Text Operation Target target f Current Target get Viewer get Text Operation Target if target null if target can Do Operation I Source Viewer CONTENTASSIST CONTEXT INFORMATION target do Operation I Source Viewer CONTENTASSIST CONTEXT INFORMATION  triggerContextInfo ITextOperationTarget fCurrentTarget getViewer getTextOperationTarget canDoOperation ISourceViewer CONTENTASSIST_CONTEXT_INFORMATION doOperation ISourceViewer CONTENTASSIST_CONTEXT_INFORMATION
Trigger content assist on choice positions private void trigger Content Assist if f Frame Position instanceof Proposal Position Proposal Position pp Proposal Position f Frame Position I Completion Proposal choices pp get Choices if choices null choices length 0 f Assistant set Completions choices f Assistant show Possible Completions return f Assistant set Completions new I Completion Proposal 0 f Assistant hide Possible Completions  triggerContentAssist fFramePosition ProposalPosition ProposalPosition ProposalPosition fFramePosition ICompletionProposal getChoices fAssistant setCompletions fAssistant showPossibleCompletions fAssistant setCompletions ICompletionProposal fAssistant hidePossibleCompletions
private void switch Position Linked Position pos boolean select boolean show Proposals Assert is Not Null pos if pos equals f Frame Position return if f Frame Position null f Current Target null f Position Listener linking Focus Lost f Frame Position f Current Target undo end Compound Change redraw redraw current position being left usually not needed I Document old Doc f Frame Position null null f Frame Position get Document I Document new Doc pos get Document switch Viewer old Doc new Doc pos f Frame Position pos if select select if f Frame Position f Exit Position f Iterator is Cycling leave I Linked Mode Listener NONE else redraw redraw new position ensure Annotation Model Installed if show Proposals trigger Content Assist if f Frame Position f Exit Position f Do Context Info trigger Context Info if f Frame Position null f Current Target null f Position Listener linking Focus Gained f Frame Position f Current Target  switchPosition LinkedPosition showProposals isNotNull fFramePosition fFramePosition fCurrentTarget fPositionListener linkingFocusLost fFramePosition fCurrentTarget endCompoundChange IDocument oldDoc fFramePosition fFramePosition getDocument IDocument newDoc getDocument switchViewer oldDoc newDoc fFramePosition fFramePosition fExitPosition fIterator isCycling ILinkedModeListener ensureAnnotationModelInstalled showProposals triggerContentAssist fFramePosition fExitPosition fDoContextInfo triggerContextInfo fFramePosition fCurrentTarget fPositionListener linkingFocusGained fFramePosition fCurrentTarget
private void ensure Annotation Model Installed Linked Position Annotations lpa f Current Target f Annotation Model if lpa null I Text Viewer viewer f Current Target get Viewer if viewer instanceof I Source Viewer I Source Viewer sv I Source Viewer viewer I Annotation Model model sv get Annotation Model if model instanceof I Annotation Model Extension I Annotation Model Extension ext I Annotation Model Extension model I Annotation Model our Model ext get Annotation Model get Unique Key if our Model null ext add Annotation Model get Unique Key lpa  ensureAnnotationModelInstalled LinkedPositionAnnotations fCurrentTarget fAnnotationModel ITextViewer fCurrentTarget getViewer ISourceViewer ISourceViewer ISourceViewer IAnnotationModel getAnnotationModel IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension IAnnotationModel ourModel getAnnotationModel getUniqueKey ourModel addAnnotationModel getUniqueKey
private void uninstall Annotation Model Linked ModeUI Target target I Text Viewer viewer target get Viewer if viewer instanceof I Source Viewer I Source Viewer sv I Source Viewer viewer I Annotation Model model sv get Annotation Model if model instanceof I Annotation Model Extension I Annotation Model Extension ext I Annotation Model Extension model ext remove Annotation Model get Unique Key  uninstallAnnotationModel LinkedModeUITarget ITextViewer getViewer ISourceViewer ISourceViewer ISourceViewer IAnnotationModel getAnnotationModel IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension removeAnnotationModel getUniqueKey
private void switch Viewer I Document old Doc I Document new Doc Linked Position pos if old Doc new Doc redraw current document with new position before switching viewer if f Current Target f Annotation Model null f Current Target f Annotation Model switch To Position f Environment pos Linked ModeUI Target target null for int i 0 i f Targets length i if f Targets i get Viewer get Document new Doc target f Targets i break if target f Current Target disconnect f Current Target target target linking Focus Lost f Frame Position target connect ensure Annotation Model Installed if f Current Target null f Current Target linking Focus Gained pos f Current Target  switchViewer IDocument oldDoc IDocument newDoc LinkedPosition oldDoc newDoc fCurrentTarget fAnnotationModel fCurrentTarget fAnnotationModel switchToPosition fEnvironment LinkedModeUITarget fTargets fTargets getViewer getDocument newDoc fTargets fCurrentTarget fCurrentTarget linkingFocusLost fFramePosition ensureAnnotationModelInstalled fCurrentTarget fCurrentTarget linkingFocusGained fCurrentTarget
private void select I Text Viewer viewer f Current Target get Viewer if viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension5 I Text Viewer Extension5 viewer extension5 expose Model Range new Region f Frame Position offset f Frame Position length else if viewer overlaps With Visible Region f Frame Position offset f Frame Position length viewer reset Visible Region viewer reveal Range f Frame Position offset f Frame Position length viewer set Selected Range f Frame Position offset f Frame Position length  ITextViewer fCurrentTarget getViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 exposeModelRange fFramePosition fFramePosition overlapsWithVisibleRegion fFramePosition fFramePosition resetVisibleRegion revealRange fFramePosition fFramePosition setSelectedRange fFramePosition fFramePosition
private void redraw if f Current Target f Annotation Model null f Current Target f Annotation Model switch To Position f Environment f Frame Position  fCurrentTarget fAnnotationModel fCurrentTarget fAnnotationModel switchToPosition fEnvironment fFramePosition
private void connect Assert is Not Null f Current Target I Text Viewer viewer f Current Target get Viewer Assert is Not Null viewer f Current Target f Widget viewer get Text Widget if f Current Target f Widget null leave I Linked Mode Listener EXIT ALL if f Current Target f Key Listener null f Current Target f Key Listener new Key Listener I Text Viewer Extension viewer prepend Verify Key Listener f Current Target f Key Listener else f Current Target f Key Listener set Enabled true register Auto Edit Vetoer viewer I Post Selection Provider viewer add Post Selection Changed Listener f Selection Listener create Annotation Model show Selection f Current Target f Shell f Current Target f Widget get Shell if f Current Target f Shell null leave I Linked Mode Listener EXIT ALL f Current Target f Shell add Shell Listener f Closer f Assistant install viewer viewer add Text Input Listener f Closer  isNotNull fCurrentTarget ITextViewer fCurrentTarget getViewer isNotNull fCurrentTarget fWidget getTextWidget fCurrentTarget fWidget ILinkedModeListener EXIT_ALL fCurrentTarget fKeyListener fCurrentTarget fKeyListener KeyListener ITextViewerExtension prependVerifyKeyListener fCurrentTarget fKeyListener fCurrentTarget fKeyListener setEnabled registerAutoEditVetoer IPostSelectionProvider addPostSelectionChangedListener fSelectionListener createAnnotationModel showSelection fCurrentTarget fShell fCurrentTarget fWidget getShell fCurrentTarget fShell ILinkedModeListener EXIT_ALL fCurrentTarget fShell addShellListener fCloser fAssistant addTextInputListener fCloser
Reveals the selection on the current target s widget if it is valid private void show Selection try f Current Target f Widget show Selection catch Illegal Argument Exception e https bugs eclipse org bugs show bug cgi id 66914 if the Styled Text is in set Redraw false mode its selection may not be up2date and calling show Selection will throw an IAE we don t have means to find out whether the selection is valid or whether the widget is redrawing or not therefore we try and ignore an IAE  showSelection fCurrentTarget fWidget showSelection IllegalArgumentException show_bug StyledText setRedraw showSelection
Registers our auto edit vetoer with the viewer param viewer the viewer we want to veto ui triggered changes within linked positions private void register Auto Edit Vetoer I Text Viewer viewer try if viewer get Document instanceof I Document Extension3 I Document Extension3 ext I Document Extension3 viewer get Document String content Types ext get Legal Content Types I Document Extension3 DEFAULT PARTITIONING if viewer instanceof I Text Viewer Extension2 I Text Viewer Extension2 v Extension I Text Viewer Extension2 viewer for int i 0 i content Types length i v Extension prepend Auto Edit Strategy f Auto Edit Vetoer content Types i else Assert is True false catch Bad Partitioning Exception e leave I Linked Mode Listener EXIT ALL  registerAutoEditVetoer ITextViewer getDocument IDocumentExtension3 IDocumentExtension3 IDocumentExtension3 getDocument contentTypes getLegalContentTypes IDocumentExtension3 DEFAULT_PARTITIONING ITextViewerExtension2 ITextViewerExtension2 vExtension ITextViewerExtension2 contentTypes vExtension prependAutoEditStrategy fAutoEditVetoer contentTypes isTrue BadPartitioningException ILinkedModeListener EXIT_ALL
private void unregister Auto Edit Vetoer I Text Viewer viewer try if viewer get Document instanceof I Document Extension3 I Document Extension3 ext I Document Extension3 viewer get Document String content Types ext get Legal Content Types I Document Extension3 DEFAULT PARTITIONING if viewer instanceof I Text Viewer Extension2 I Text Viewer Extension2 v Extension I Text Viewer Extension2 viewer for int i 0 i content Types length i v Extension remove Auto Edit Strategy f Auto Edit Vetoer content Types i catch Bad Partitioning Exception e leave I Linked Mode Listener EXIT ALL  unregisterAutoEditVetoer ITextViewer getDocument IDocumentExtension3 IDocumentExtension3 IDocumentExtension3 getDocument contentTypes getLegalContentTypes IDocumentExtension3 DEFAULT_PARTITIONING ITextViewerExtension2 ITextViewerExtension2 vExtension ITextViewerExtension2 contentTypes vExtension removeAutoEditStrategy fAutoEditVetoer contentTypes BadPartitioningException ILinkedModeListener EXIT_ALL
private void create Annotation Model if f Current Target f Annotation Model null Linked Position Annotations lpa new Linked Position Annotations if f Simple lpa mark Exit Target true lpa mark Focus false lpa mark Slaves false lpa mark Targets false lpa set Targets f Iterator get Positions lpa set Exit Target f Exit Position lpa connect f Current Target get Viewer get Document f Current Target f Annotation Model lpa  createAnnotationModel fCurrentTarget fAnnotationModel LinkedPositionAnnotations LinkedPositionAnnotations fSimple markExitTarget markFocus markSlaves markTargets setTargets fIterator getPositions setExitTarget fExitPosition fCurrentTarget getViewer getDocument fCurrentTarget fAnnotationModel
private String get Unique Key return linked annotationmodelkey to String NON NLS 1  getUniqueKey toString
private void disconnect Assert is Not Null f Current Target I Text Viewer viewer f Current Target get Viewer Assert is Not Null viewer f Assistant uninstall f Assistant remove Proposal Listener f Proposal Listener f Current Target f Widget null Shell shell f Current Target f Shell f Current Target f Shell null if shell null shell is Disposed shell remove Shell Listener f Closer this one is asymmetric we don t install the model in connect but leave it to its callers to ensure they have the model installed if they need it uninstall Annotation Model f Current Target unregister Auto Edit Vetoer viewer don t remove the verify key listener to let it keep its position in the listener queue f Current Target f Key Listener set Enabled false I Post Selection Provider viewer remove Post Selection Changed Listener f Selection Listener redraw  isNotNull fCurrentTarget ITextViewer fCurrentTarget getViewer isNotNull fAssistant fAssistant removeProposalListener fProposalListener fCurrentTarget fWidget fCurrentTarget fShell fCurrentTarget fShell isDisposed removeShellListener fCloser uninstallAnnotationModel fCurrentTarget unregisterAutoEditVetoer fCurrentTarget fKeyListener setEnabled IPostSelectionProvider removePostSelectionChangedListener fSelectionListener
Runnable runnable new Runnable public void run for Iterator iter docs iterator iter has Next I Document doc I Document iter next doc remove Position Updater f Position Updater boolean uninstall Cat false String cats doc get Position Categories for int j 0 j cats length j if get Category equals cats j uninstall Cat true break if uninstall Cat try doc remove Position Category get Category catch Bad Position Category Exception e ignore f Environment exit flags  hasNext IDocument IDocument removePositionUpdater fPositionUpdater uninstallCat getPositionCategories getCategory uninstallCat uninstallCat removePositionCategory getCategory BadPositionCategoryException fEnvironment
void leave final int flags if f Is Active return f Is Active false end Compound Change Display display null if f Current Target f Widget null f Current Target f Widget is Disposed display f Current Target f Widget get Display debug trace Java Plugin log new Status I Status INFO Java Plugin get Plugin Id I Status OK leaving linked mode null if f Current Target f Annotation Model null f Current Target f Annotation Model remove All Annotations disconnect for int i 0 i f Targets length i Linked ModeUI Target target f Targets i I Text Viewer viewer target get Viewer if target f Key Listener null I Text Viewer Extension viewer remove Verify Key Listener target f Key Listener target f Key Listener null viewer remove Text Input Listener f Closer for int i 0 i f Targets length i if f Targets i f Annotation Model null f Targets i f Annotation Model remove All Annotations f Targets i f Annotation Model disconnect f Targets i get Viewer get Document f Targets i f Annotation Model null uninstall Annotation Model f Targets i if f Exit Position null f Exit Position get Document remove Position f Exit Position if flags I Linked Mode Listener UPDATE CARET 0 f Exit Position null f Frame Position f Exit Position f Exit Position is Deleted switch Position f Exit Position true false final List docs new Array List for int i 0 i f Targets length i I Document doc f Targets i get Viewer get Document if doc null docs add doc Runnable runnable new Runnable public void run for Iterator iter docs iterator iter has Next I Document doc I Document iter next doc remove Position Updater f Position Updater boolean uninstall Cat false String cats doc get Position Categories for int j 0 j cats length j if get Category equals cats j uninstall Cat true break if uninstall Cat try doc remove Position Category get Category catch Bad Position Category Exception e ignore f Environment exit flags remove positions both exit positions AND linked positions in the model async to make sure that the annotation painter gets correct document offsets if display null display async Exec runnable else runnable run  fIsActive fIsActive endCompoundChange fCurrentTarget fWidget fCurrentTarget fWidget isDisposed fCurrentTarget fWidget getDisplay JavaPlugin IStatus JavaPlugin getPluginId IStatus fCurrentTarget fAnnotationModel fCurrentTarget fAnnotationModel removeAllAnnotations fTargets LinkedModeUITarget fTargets ITextViewer getViewer fKeyListener ITextViewerExtension removeVerifyKeyListener fKeyListener fKeyListener removeTextInputListener fCloser fTargets fTargets fAnnotationModel fTargets fAnnotationModel removeAllAnnotations fTargets fAnnotationModel fTargets getViewer getDocument fTargets fAnnotationModel uninstallAnnotationModel fTargets fExitPosition fExitPosition getDocument removePosition fExitPosition ILinkedModeListener UPDATE_CARET fExitPosition fFramePosition fExitPosition fExitPosition isDeleted switchPosition fExitPosition ArrayList fTargets IDocument fTargets getViewer getDocument hasNext IDocument IDocument removePositionUpdater fPositionUpdater uninstallCat getPositionCategories getCategory uninstallCat uninstallCat removePositionCategory getCategory BadPositionCategoryException fEnvironment asyncExec
private void end Compound Change if f Has Open Compound Change I Text Viewer Extension extension I Text Viewer Extension f Current Target get Viewer I Rewrite Target target extension get Rewrite Target target end Compound Change f Has Open Compound Change false  endCompoundChange fHasOpenCompoundChange ITextViewerExtension ITextViewerExtension fCurrentTarget getViewer IRewriteTarget getRewriteTarget endCompoundChange fHasOpenCompoundChange
private void begin Compound Change if f Has Open Compound Change I Text Viewer Extension extension I Text Viewer Extension f Current Target get Viewer I Rewrite Target target extension get Rewrite Target target begin Compound Change f Has Open Compound Change true  beginCompoundChange fHasOpenCompoundChange ITextViewerExtension ITextViewerExtension fCurrentTarget getViewer IRewriteTarget getRewriteTarget beginCompoundChange fHasOpenCompoundChange
Returns the currently selected region or code null code return the currently selected region or code null code public I Region get Selected Region if f Frame Position null if f Exit Position null return new Region f Exit Position get Offset f Exit Position get Length else return null else return new Region f Frame Position get Offset f Frame Position get Length  IRegion getSelectedRegion fFramePosition fExitPosition fExitPosition getOffset fExitPosition getLength fFramePosition getOffset fFramePosition getLength
private String get Category return to String  getCategory toString
Sets the context info property If set to code true code context info will be invoked on the current target s viewer whenever a position is switched param do Context Info code true code if context information should be displayed public void set Do Context Info boolean do Context Info f Do Context Info do Context Info  doContextInfo setDoContextInfo doContextInfo fDoContextInfo doContextInfo
Sets the focus callback which will get informed when the focus of the linked mode UI changes p If there is a listener installed already it will be replaced p param listener the new listener never code null code protected void set Position Listener I Linked ModeUI Focus Listener listener Assert is Not Null listener f Position Listener listener  setPositionListener ILinkedModeUIFocusListener isNotNull fPositionListener
Sets the simple mode of the receiver A linked mode UI in simple mode merely draws the exit position but not the target focus and slave positions Default is code false code This method must be called before it is entered param simple code true code if the UI should be in simple mode public void set Simple Mode boolean simple f Simple simple  setSimpleMode fSimple

Creates a new instance param document the document param offset the offset of the position param length the length of the position param sequence the iteration sequence rank public Linked Position I Document document int offset int length int sequence super offset length Assert is Not Null document f Document document f Sequence Number sequence  LinkedPosition IDocument isNotNull fDocument fSequenceNumber
Creates a new instance Equivalent to calling code Linked Position document offset length Linked Position Group NO STOP code param document the document param offset the offset of the position param length the length of the position public Linked Position I Document document int offset int length this document offset length Linked Position Group NO STOP  LinkedPosition LinkedPositionGroup NO_STOP LinkedPosition IDocument LinkedPositionGroup NO_STOP
return Returns the document public I Document get Document return f Document  IDocument getDocument fDocument
public boolean equals Object other if other instanceof Linked Position Linked Position p Linked Position other return p offset offset p length length p f Document f Document return false  LinkedPosition LinkedPosition LinkedPosition fDocument fDocument
Returns whether this position overlaps with code position code param position the position to check return code true code if this position overlaps with code position code code false code otherwise public boolean overlaps With Linked Position position return position get Document f Document overlaps With position get Offset position get Length  overlapsWith LinkedPosition getDocument fDocument overlapsWith getOffset getLength
Returns whether this position includes code event code param event the event to check return code true code if this position includes code event code code false code otherwise public boolean includes Document Event event return includes event get Document event get Offset event get Length  DocumentEvent getDocument getOffset getLength
Returns whether this position includes code position code param position the position to check return code true code if this position includes code position code code false code otherwise public boolean includes Linked Position position return includes position get Document position get Offset position get Length  LinkedPosition getDocument getOffset getLength
Overrides link Position includes int so every offset is considered included that lies in between the first and last offset of this position and offsets that are right at the end of the position param p Offset the offset to check return code true code if code p Offset code is in code offset offset length code public boolean includes int p Offset return this offset p Offset p Offset this offset this length  pOffset pOffset pOffset pOffset pOffset
Returns whether this position includes the range given by code offset code and code length code A range is included by a code Linked Position code if link includes int includes offset returns true for every offset in the range including the borders of the range param doc the document that the given range refers to may be code null code param off the offset of the range referring to code document code param len the length of the range return code true code if code doc code is the same document as this position refers to and if the entire range is included in this position protected boolean includes I Document doc int off int len return doc f Document off offset len off offset length  LinkedPosition IDocument fDocument
Returns the content of this position on the referenced document return the content of the document at this position throws Bad Location Exception if the position is not valid public String get Content throws Bad Location Exception return f Document get offset length  BadLocationException getContent BadLocationException fDocument
Returns the sequence number of this position return the sequence number of this position public int get Sequence Number return f Sequence Number  getSequenceNumber fSequenceNumber
Sets the sequence number of this position param sequence the new sequence number public void set Sequence Number int sequence f Sequence Number sequence  setSequenceNumber fSequenceNumber
see org eclipse jface text Position hash Code public int hash Code return f Document hash Code super hash Code f Sequence Number  hashCode hashCode fDocument hashCode hashCode fSequenceNumber

Sets the position that should be highlighted as the focus position i e as the position whose changes are propagated to all its linked positions by the linked environment param position the new focus position or code null code if no focus is set private void set Focus Position Position position throws Bad Location Exception if f Mark Focus get Position f Focus Annotation position remove Annotation f Focus Annotation false if position null f Focus Annotation new Annotation FOCUS ANNOTATION TYPE false NON NLS 1 add Annotation f Focus Annotation position false else f Focus Annotation null  setFocusPosition BadLocationException fMarkFocus getPosition fFocusAnnotation removeAnnotation fFocusAnnotation fFocusAnnotation FOCUS_ANNOTATION_TYPE addAnnotation fFocusAnnotation fFocusAnnotation
Sets the position that should be highlighted as the exit position i e as the position whose changes are propagated to all its linked positions by the linked environment param position the new exit position or code null code if no focus is set private void set Exit Position Position position throws Bad Location Exception if f Mark Exit Target get Position f Exit Annotation position remove Annotation f Exit Annotation false if position null f Exit Annotation new Annotation EXIT ANNOTATION TYPE false NON NLS 1 add Annotation f Exit Annotation position false else f Exit Annotation null  setExitPosition BadLocationException fMarkExitTarget getPosition fExitAnnotation removeAnnotation fExitAnnotation fExitAnnotation EXIT_ANNOTATION_TYPE addAnnotation fExitAnnotation fExitAnnotation
Sets the positions that should be highlighted as the slave positions i e as the positions that are linked to the focus position param positions the new slave positions or code null code if no slave positions are to be set private void set Group Positions List positions throws Bad Location Exception if f Mark Slaves return remove all positions which are already there algo to Remove contains all mappings at first but all that are in positions get removed to Remove contains the difference set of previsous new to Add are the new positions which don t exist in previous new previous List to Remove new Array List f Group Annotations values Map to Add new Hash Map if positions null for Iterator iter positions iterator iter has Next Position p Position iter next if f Group Annotations contains Key p to Remove remove f Group Annotations get p else Annotation a new Annotation SLAVE ANNOTATION TYPE false NON NLS 1 to Add put a p f Group Annotations put p a f Group Annotations values remove All to Remove replace Annotations Annotation to Remove to Array new Annotation 0 to Add false  setGroupPositions BadLocationException fMarkSlaves toRemove toRemove toAdd toRemove ArrayList fGroupAnnotations toAdd HashMap hasNext fGroupAnnotations containsKey toRemove fGroupAnnotations SLAVE_ANNOTATION_TYPE toAdd fGroupAnnotations fGroupAnnotations removeAll toRemove replaceAnnotations toRemove toArray toAdd
Sets the positions that should be highlighted as the target positions i e as the positions that can be jumped to in a linked set up param positions the new target positions or code null code if no target positions are to be set private void set Target Positions List positions throws Bad Location Exception if f Mark Targets return remove all positions which are already there algo to Remove contains all mappings at first but all that are in positions get removed to Remove contains the difference set of previsous new to Add are the new positions which don t exist in previous new previous List to Remove new Array List f Target Annotations values Map to Add new Hash Map if positions null for Iterator iter positions iterator iter has Next Position p Position iter next if f Target Annotations contains Key p to Remove remove f Target Annotations get p else Annotation a new Annotation TARGET ANNOTATION TYPE false NON NLS 1 to Add put a p f Target Annotations put p a f Target Annotations values remove All to Remove replace Annotations Annotation to Remove to Array new Annotation 0 to Add false  setTargetPositions BadLocationException fMarkTargets toRemove toRemove toAdd toRemove ArrayList fTargetAnnotations toAdd HashMap hasNext fTargetAnnotations containsKey toRemove fTargetAnnotations TARGET_ANNOTATION_TYPE toAdd fTargetAnnotations fTargetAnnotations removeAll toRemove replaceAnnotations toRemove toArray toAdd
Switches the focus position to code position code given the code Linked Mode Model env code The slave positions for code position code is extracted from the environment and set accordingly the target positions are updated as well param env param position public void switch To Position Linked Mode Model env Linked Position position if f Document null position null get Position f Focus Annotation position position null f Focus Annotation null return Linked Position Group linked Group null if position null linked Group env get Group For Position position List targets new Array List targets add All Arrays as List f Targets List group if linked Group null group new Array List Arrays as List linked Group get Positions else group new Array List if position null f Document equals position get Document position is not valid if not in this document position null Linked Position exit f Exit Position if exit null f Document equals exit get Document position is not valid if not in this document exit null if exit null group remove exit targets remove exit group remove All targets targets remove position group remove position prune targets prune group try set Focus Position position set Exit Position exit set Group Positions group set Target Positions targets catch Bad Location Exception e will never happen as we don t actually add remove positions from the document see the add Position remove Position methods Assert is True false fire Model Changed  LinkedModeModel switchToPosition LinkedModeModel LinkedPosition fDocument getPosition fFocusAnnotation fFocusAnnotation LinkedPositionGroup linkedGroup linkedGroup getGroupForPosition ArrayList addAll asList fTargets linkedGroup ArrayList asList linkedGroup getPositions ArrayList fDocument getDocument LinkedPosition fExitPosition fDocument getDocument removeAll setFocusPosition setExitPosition setGroupPositions setTargetPositions BadLocationException addPosition removePosition isTrue fireModelChanged
Prune code list code of all code Linked Position code s that do not belong to this model s code I Document code param list the list of positions to prune private void prune List list for Iterator iter list iterator iter has Next Linked Position pos Linked Position iter next if pos get Document equals f Document iter remove  LinkedPosition IDocument hasNext LinkedPosition LinkedPosition getDocument fDocument
Sets the target positions param positions public void set Targets Position positions f Targets positions  setTargets fTargets
Sets the exit position param position the new exit position or code null code if no exit position should be set public void set Exit Target Linked Position position f Exit Position position  setExitTarget LinkedPosition fExitPosition
see org eclipse jface text source Annotation Model add Position org eclipse jface text I Document org eclipse jface text Position protected void add Position I Document document Position position don t to anything as our positions are managed by custom position updaters  AnnotationModel addPosition IDocument addPosition IDocument
see org eclipse jface text source Annotation Model remove Position org eclipse jface text I Document org eclipse jface text Position protected void remove Position I Document document Position pos don t to anything as our positions are managed by custom position updaters  AnnotationModel removePosition IDocument removePosition IDocument
see org eclipse jface text source Annotation Model fire Model Changed public void fire Model Changed super fire Model Changed  AnnotationModel fireModelChanged fireModelChanged fireModelChanged
Sets the drawing state for the exit target Default is code true code param mark Exit Targets the new drawing state for exit targets public void mark Exit Target boolean mark Exit Targets f Mark Exit Target mark Exit Targets  markExitTargets markExitTarget markExitTargets fMarkExitTarget markExitTargets
Sets the drawing state for the focus position Default is code true code param mark Focus the new drawing state for exit targets public void mark Focus boolean mark Focus f Mark Focus mark Focus  markFocus markFocus markFocus fMarkFocus markFocus
Sets the drawing state for slave positions Default is code true code param mark Slaves the new drawing state for slaves public void mark Slaves boolean mark Slaves f Mark Slaves mark Slaves  markSlaves markSlaves markSlaves fMarkSlaves markSlaves
Sets the drawing state for targets Default is code true code param mark Targets the new drawing state for targets public void mark Targets boolean mark Targets f Mark Targets mark Targets  markTargets markTargets markTargets fMarkTargets markTargets

Adds a position to this group The document region defined by the position must contain the same content and thus have the same length as any of the other positions already in this group Additionally all positions added must be disjoint otherwise a code Bad Location Exception code is thrown p Positions added using this method are owned by this group afterwards and may not be updated or modified thereafter p p Once a group has been added to a code Linked Mode Model code it becomes em sealed em and no positions may be added any more p param position the position to add throws Bad Location Exception if the position is invalid or conflicts with other positions in the group throws Illegal State Exception if the group has already been added to a model public void add Position Linked Position position throws Bad Location Exception Enforces constraints and sets the custom iteration flag If the position is already in this group nothing happens Assert is Not Null position if f Is Sealed throw new Illegal State Exception cannot add positions after the group is added to an model NON NLS 1 if f Positions contains position enforce Disjoint position enforce Equal Content position f Positions add position f Has Custom Iteration position get Sequence Number Linked Position Group NO STOP else return nothing happens  BadLocationException LinkedModeModel BadLocationException IllegalStateException addPosition LinkedPosition BadLocationException isNotNull fIsSealed IllegalStateException fPositions enforceDisjoint enforceEqualContent fPositions fHasCustomIteration getSequenceNumber LinkedPositionGroup NO_STOP
Enforces the invariant that all positions must contain the same string param position the position to check throws Bad Location Exception if the equal content check fails private void enforce Equal Content Linked Position position throws Bad Location Exception if f Positions size 0 String group Content Linked Position f Positions get 0 get Content String position Content position get Content if group Content equals position Content throw new Bad Location Exception  BadLocationException enforceEqualContent LinkedPosition BadLocationException fPositions groupContent LinkedPosition fPositions getContent positionContent getContent groupContent positionContent BadLocationException
Enforces the invariant that all positions must be disjoint param position the position to check throws Bad Location Exception if the disjointness check fails private void enforce Disjoint Linked Position position throws Bad Location Exception for Iterator it f Positions iterator it has Next Linked Position p Linked Position it next if p overlaps With position throw new Bad Location Exception  BadLocationException enforceDisjoint LinkedPosition BadLocationException fPositions hasNext LinkedPosition LinkedPosition overlapsWith BadLocationException
Enforces the disjointness for another group param group the group to check throws Bad Location Exception if the disjointness check fails void enforce Disjoint Linked Position Group group throws Bad Location Exception Assert is Not Null group for Iterator it group f Positions iterator it has Next Linked Position p Linked Position it next enforce Disjoint p  BadLocationException enforceDisjoint LinkedPositionGroup BadLocationException isNotNull fPositions hasNext LinkedPosition LinkedPosition enforceDisjoint
Checks whether code event code fits in any of the positions of this group param event the document event to check return code true code if code event code fits in any position boolean is Legal Event Document Event event for Iterator it f Positions iterator it has Next Linked Position pos Linked Position it next if pos includes event f Last Position pos f Last Position Offset pos get Offset return true f Last Position null f Last Position Offset 1 return false  isLegalEvent DocumentEvent fPositions hasNext LinkedPosition LinkedPosition fLastPosition fLastPositionOffset getOffset fLastPosition fLastPositionOffset
Creates an edition of a document change that will forward any modification in one position to all linked siblings The return value is a map from code I Document code to code Text Edit code param event the document event to check return a map of edits grouped by edited document Map handle Event Document Event event if f Last Position null Map map new Hash Map int rel Offset event get Offset f Last Position Offset int length event get Length String text event get Text for Iterator it2 f Positions iterator it2 has Next Linked Position p Linked Position it2 next if p f Last Position continue don t re update the origin of the change List edits List map get p get Document if edits null edits new Array List map put p get Document edits edits add new Replace Edit p get Offset rel Offset length text for Iterator it2 map key Set iterator it2 has Next I Document d I Document it2 next Text Edit edit new Multi Text Edit 0 d get Length edit add Children Text Edit List map get d to Array new Text Edit 0 map put d edit return map return null  IDocument TextEdit handleEvent DocumentEvent fLastPosition HashMap relOffset getOffset fLastPositionOffset getLength getText fPositions hasNext LinkedPosition LinkedPosition fLastPosition getDocument ArrayList getDocument ReplaceEdit getOffset relOffset keySet hasNext IDocument IDocument TextEdit MultiTextEdit getLength addChildren TextEdit toArray TextEdit
Sets the model of this group Once a model has been set no more positions can be added and the model cannot be changed void seal Assert is True f Is Sealed f Is Sealed true if f Has Custom Iteration false f Positions size 0 Linked Position f Positions get 0 set Sequence Number 0  isTrue fIsSealed fIsSealed fHasCustomIteration fPositions LinkedPosition fPositions setSequenceNumber
I Document get Documents I Document docs new I Document f Positions size int i 0 for Iterator it f Positions iterator it has Next i Linked Position pos Linked Position it next docs i pos get Document return docs  IDocument getDocuments IDocument IDocument fPositions fPositions hasNext LinkedPosition LinkedPosition getDocument
void register Linked Mode Model model throws Bad Location Exception for Iterator it f Positions iterator it has Next Linked Position pos Linked Position it next model register pos  LinkedModeModel BadLocationException fPositions hasNext LinkedPosition LinkedPosition
Returns the position in this group that encompasses all positions in code group code param group the group to be adopted return a position in the receiver that contains all positions in code group code or code null code if none can be found throws Bad Location Exception if more than one position are affected by code group code Linked Position adopt Linked Position Group group throws Bad Location Exception Linked Position found null for Iterator it group f Positions iterator it has Next Linked Position pos Linked Position it next Linked Position local Found null for Iterator it2 f Positions iterator it2 has Next Linked Position my Pos Linked Position it2 next if my Pos includes pos if found null found my Pos else if found my Pos throw new Bad Location Exception if local Found null local Found my Pos if local Found found throw new Bad Location Exception return found  BadLocationException LinkedPosition LinkedPositionGroup BadLocationException LinkedPosition fPositions hasNext LinkedPosition LinkedPosition LinkedPosition localFound fPositions hasNext LinkedPosition myPos LinkedPosition myPos myPos myPos BadLocationException localFound localFound myPos localFound BadLocationException
Finds the closest position to code to Find code param to Find the linked position for which to find the closest position return the closest position to code to Find code Linked Position get Position Linked Position to Find for Iterator it f Positions iterator it has Next Linked Position p Linked Position it next if p includes to Find return p return null  toFind toFind toFind LinkedPosition getPosition LinkedPosition toFind fPositions hasNext LinkedPosition LinkedPosition toFind
Returns code true code if code offset code is contained in any position in this group param offset the offset to check return code true code if offset is contained by this group boolean contains int offset for Iterator it f Positions iterator it has Next Linked Position pos Linked Position it next if pos includes offset return true return false  fPositions hasNext LinkedPosition LinkedPosition
Returns whether this group contains any positions return code true code if this group is empty code false code if it is not public boolean is Emtpy return f Positions size 0  isEmtpy fPositions
Returns the positions contained in the receiver as an array The positions are the actual positions and must not be modified the array is a copy of internal structures return the positions of this group in no particular order public Linked Position get Positions return Linked Position f Positions to Array new Linked Position 0  LinkedPosition getPositions LinkedPosition fPositions toArray LinkedPosition
Returns code true code if the receiver contains code position code param position the position to check return code true code if the receiver contains code position code boolean contains Position position for Iterator it f Positions iterator it has Next Linked Position p Linked Position it next if position equals p return true return false  fPositions hasNext LinkedPosition LinkedPosition

Creates a new instance param document the document param offset the offset of the position param length the length of the position param sequence the iteration sequence rank param proposals the proposals to be shown when entering this position public Proposal Position I Document document int offset int length int sequence I Completion Proposal proposals super document offset length sequence f Proposals proposals  ProposalPosition IDocument ICompletionProposal fProposals
Creates a new instance with no sequence number param document the document param offset the offset of the position param length the length of the position param proposals the proposals to be shown when entering this position public Proposal Position I Document document int offset int length I Completion Proposal proposals super document offset length Linked Position Group NO STOP f Proposals proposals  ProposalPosition IDocument ICompletionProposal LinkedPositionGroup NO_STOP fProposals
public boolean equals Object o if o instanceof Proposal Position if super equals o return Arrays equals f Proposals Proposal Position o f Proposals return false  ProposalPosition fProposals ProposalPosition fProposals
Returns the proposals attached to this position return an array of choices including the initial one Callers must not modify it public I Completion Proposal get Choices return f Proposals  ICompletionProposal getChoices fProposals
see org eclipse jdt internal ui text link Linked Position hash Code public int hash Code return super hash Code f Proposals null 0 f Proposals hash Code  LinkedPosition hashCode hashCode hashCode fProposals fProposals hashCode

inherit Doc p code o1 code and code o2 code are required to be instances of code Linked Position code p public int compare Object o1 Object o2 Linked Position p1 Linked Position o1 Linked Position p2 Linked Position o2 int i p1 get Sequence Number p2 get Sequence Number if i 0 return i else return p1 get Offset p2 get Offset  inheritDoc LinkedPosition LinkedPosition LinkedPosition LinkedPosition LinkedPosition getSequenceNumber getSequenceNumber getOffset getOffset
Tab Stop Iterator List position Sequence Assert is Not Null position Sequence f List new Array List position Sequence Collections sort f List f Comparator f Size f List size f Index 1 Assert is True f Size 0  TabStopIterator positionSequence isNotNull positionSequence fList ArrayList positionSequence fList fComparator fSize fList fIndex isTrue fSize
boolean has Next Linked Position current return get Next Index current f Size  hasNext LinkedPosition getNextIndex fSize
private int get Next Index Linked Position current if current null f List get f Index current return find Next current else if f Is Cycling f Index f Size 1 return 0 else default increase return f Index 1  getNextIndex LinkedPosition fList fIndex findNext fIsCycling fIndex fSize fIndex
Finds the closest position in the iteration set that follows after code current code and sets code f Index code accordingly If code current code is in the iteration set the next in turn is chosen param current the current position return code true code if there is a next position code false code otherwise private int find Next Linked Position current Assert is Not Null current if the position is in the iteration set jump to the next one int index f List index Of current if index 1 if f Is Cycling index f Size 1 return 0 else return index 1 else find the position that follows closest to the current position Linked Position found null for Iterator it f List iterator it has Next Linked Position p Linked Position it next if p offset current offset if found null found offset p offset found p if found null return f List index Of found else if f Is Cycling return 0 else return f Size  fIndex findNext LinkedPosition isNotNull fList indexOf fIsCycling fSize LinkedPosition fList hasNext LinkedPosition LinkedPosition fList indexOf fIsCycling fSize
boolean has Previous Linked Position current return get Previous Index current 1  hasPrevious LinkedPosition getPreviousIndex
private int get Previous Index Linked Position current if current null f List get f Index current return find Previous current else if f Is Cycling f Index 0 return f Size 1 else return f Index 1  getPreviousIndex LinkedPosition fList fIndex findPrevious fIsCycling fIndex fSize fIndex
Finds the closest position in the iteration set that precedes code current code If code current code is in the iteration set the previous in turn is chosen param current the current position return the index of the previous position private int find Previous Linked Position current Assert is Not Null current if the position is in the iteration set jump to the next one int index f List index Of current if index 1 if f Is Cycling index 0 return f Size 1 else return index 1 else find the position that follows closest to the current position Linked Position found null for Iterator it f List iterator it has Next Linked Position p Linked Position it next if p offset current offset if found null found offset p offset found p if found null return f List index Of found else if f Is Cycling return f Size 1 else return 1  findPrevious LinkedPosition isNotNull fList indexOf fIsCycling fSize LinkedPosition fList hasNext LinkedPosition LinkedPosition fList indexOf fIsCycling fSize
Linked Position next Linked Position current if has Next current throw new No Such Element Exception else return Linked Position f List get f Index get Next Index current  LinkedPosition LinkedPosition hasNext NoSuchElementException LinkedPosition fList fIndex getNextIndex
Linked Position previous Linked Position current if has Previous current throw new No Such Element Exception else return Linked Position f List get f Index get Previous Index current  LinkedPosition LinkedPosition hasPrevious NoSuchElementException LinkedPosition fList fIndex getPreviousIndex
void set Cycling boolean mode f Is Cycling mode  setCycling fIsCycling
void add Position Position position f List add f Size position Collections sort f List f Comparator  addPosition fList fSize fList fComparator
void remove Position Position position if f List remove position f Size  removePosition fList fSize
return Returns the is Cycling boolean is Cycling return f Is Cycling  isCycling isCycling fIsCycling
Linked Position get Positions return Linked Position f List to Array new Linked Position 0  LinkedPosition getPositions LinkedPosition fList toArray LinkedPosition

Creates a new painter for the given text viewer param text Viewer the text viewer public Margin Painter I Text Viewer text Viewer f Text Widget text Viewer get Text Widget  textViewer MarginPainter ITextViewer textViewer fTextWidget textViewer getTextWidget
Sets the column after which to draw the margin line param width the column public void set Margin Ruler Column int width f Margin Width width initialize  setMarginRulerColumn fMarginWidth
Sets the line style of the margin line param line Style a code SWT code style constant describing the line style public void set Margin Ruler Style int line Style f Line Style line Style  lineStyle setMarginRulerStyle lineStyle fLineStyle lineStyle
Sets the line width of the margin line param line Width the line width public void set Margin Ruler Width int line Width f Line Width line Width  lineWidth setMarginRulerWidth lineWidth fLineWidth lineWidth
Sets the color of the margin line Must be called before code paint code is called the first time param color the color public void set Margin Ruler Color Color color f Color color  setMarginRulerColor fColor
Initializes this painter by flushing and recomputing all caches and causing the widget to be redrawn Must be called explicitly when font of text widget changes public void initialize compute WidgetX f Text Widget redraw  computeWidgetX fTextWidget
Computes and remembers the x offset of the margin column for the current widget font private void compute WidgetX GC gc new GC f Text Widget int pixels gc get Font Metrics get Average Char Width gc dispose f Cached WidgetX pixels f Margin Width  computeWidgetX fTextWidget getFontMetrics getAverageCharWidth fCachedWidgetX fMarginWidth
public void deactivate boolean redraw if f Is Active f Is Active false f Cached WidgetX 1 f Text Widget remove Paint Listener this if redraw f Text Widget redraw  fIsActive fIsActive fCachedWidgetX fTextWidget removePaintListener fTextWidget
see I Painter dispose public void dispose f Text Widget null  IPainter fTextWidget
public void paint int reason if f Is Active f Is Active true f Text Widget add Paint Listener this if f Cached WidgetX 1 compute WidgetX f Text Widget redraw else if CONFIGURATION reason INTERNAL reason f Text Widget redraw  fIsActive fIsActive fTextWidget addPaintListener fCachedWidgetX computeWidgetX fTextWidget fTextWidget
public void paint Control Paint Event e if f Text Widget null int x f Cached WidgetX f Text Widget get Horizontal Pixel if x 0 Rectangle area f Text Widget get Client Area e gc set Foreground f Color e gc set Line Style f Line Style e gc set Line Width f Line Width e gc draw Line x 0 x area height  paintControl PaintEvent fTextWidget fCachedWidgetX fTextWidget getHorizontalPixel fTextWidget getClientArea setForeground fColor setLineStyle fLineStyle setLineWidth fLineWidth drawLine
see org eclipse jface text I Painter set Position Manager org eclipse jface text I Paint Position Manager public void set Position Manager I Paint Position Manager manager  IPainter setPositionManager IPaintPositionManager setPositionManager IPaintPositionManager

Creates a Mark Selection param document the marked document param offset the offset of the mark param length the length of the mark may be negative if caret before offset public Mark Selection I Document document int offset int length f Document document f Offset offset f Length length  MarkSelection MarkSelection IDocument fDocument fOffset fLength
see I Mark Selection get Document public I Document get Document return f Document  IMarkSelection getDocument IDocument getDocument fDocument
see I Mark Selection get Offset public int get Offset return f Offset  IMarkSelection getOffset getOffset fOffset
see I Mark Selection get Length public int get Length return f Length  IMarkSelection getLength getLength fLength
see I Selection is Empty public boolean is Empty return f Length 0  ISelection isEmpty isEmpty fLength

Creates the position updater for the given category param category the position category protected Paint Position Updater String category super category  PaintPositionUpdater
If an insertion happens at a position s offset the position is extended rather than shifted Also if something is added right behind the end of the position the position is extended rather than kept stable protected void adapt To Insert int my Start f Position offset int my End f Position offset f Position length my End Math max my Start my End int yours Start f Offset int yours End f Offset f Replace Length 1 yours End Math max yours Start yours End if my End yours Start return if my Start yours Start f Position length f Replace Length else f Position offset f Replace Length  adaptToInsert myStart fPosition myEnd fPosition fPosition myEnd myStart myEnd yoursStart fOffset yoursEnd fOffset fReplaceLength yoursEnd yoursStart yoursEnd myEnd yoursStart myStart yoursStart fPosition fReplaceLength fPosition fReplaceLength
Creates a new position manager Initializes the managing position category using its class name and its hash value public Position Manager f Category get Class get Name hash Code f Position Updater new Paint Position Updater f Category  PositionManager fCategory getClass getName hashCode fPositionUpdater PaintPositionUpdater fCategory
Installs this position manager in the given document The position manager stays active until code uninstall code or code dispose code is called param document the document to be installed on public void install I Document document f Document document f Document add Position Category f Category f Document add Position Updater f Position Updater  IDocument fDocument fDocument addPositionCategory fCategory fDocument addPositionUpdater fPositionUpdater
Disposes this position manager The position manager is automatically removed from the document it has previously been installed on public void dispose uninstall f Document  fDocument
Uninstalls this position manager form the given document If the position manager has no been installed on this document this method is without effect param document the document form which to uninstall public void uninstall I Document document if document f Document document null try f Document remove Position Updater f Position Updater f Document remove Position Category f Category catch Bad Position Category Exception x should not happen f Document null  IDocument fDocument fDocument removePositionUpdater fPositionUpdater fDocument removePositionCategory fCategory BadPositionCategoryException fDocument
public void manage Position Position position try f Document add Position f Category position catch Bad Position Category Exception x should not happen catch Bad Location Exception x should not happen  managePosition fDocument addPosition fCategory BadPositionCategoryException BadLocationException
public void unmanage Position Position position try f Document remove Position f Category position catch Bad Position Category Exception x should not happen  unmanagePosition fDocument removePosition fCategory BadPositionCategoryException
Creates a new paint manager for the given text viewer param text Viewer the text viewer associated to this newly created paint manager public Paint Manager I Text Viewer text Viewer f Text Viewer text Viewer  textViewer PaintManager ITextViewer textViewer fTextViewer textViewer
Adds the given painter to the list of painters managed by this paint manager If the painter is already registered with this paint manager this method is without effect param painter the painter to be added public void add Painter I Painter painter if f Painters contains painter f Painters add painter if f Painters size 1 install painter set Position Manager f Manager painter paint I Painter INTERNAL  addPainter IPainter fPainters fPainters fPainters setPositionManager fManager IPainter
Removes the given painter from the list of painters managed by this paint manager If the painter has not previously been added to this paint manager this method is without effect param painter the painter to be removed public void remove Painter I Painter painter if f Painters remove painter painter deactivate true painter set Position Manager null if f Painters size 0 dispose  removePainter IPainter fPainters setPositionManager fPainters
Installs activates this paint manager Is called as soon as the first painter is to be managed by this paint manager private void install f Manager new Position Manager if f Text Viewer get Document null f Manager install f Text Viewer get Document f Text Viewer add Text Input Listener this add Listeners  fManager PositionManager fTextViewer getDocument fManager fTextViewer getDocument fTextViewer addTextInputListener addListeners
Installs our listener set on the text viewer and the text widget respectively private void add Listeners I Selection Provider provider f Text Viewer get Selection Provider provider add Selection Changed Listener this f Text Viewer add Text Listener this Styled Text text f Text Viewer get Text Widget text add Key Listener this text add Mouse Listener this  addListeners ISelectionProvider fTextViewer getSelectionProvider addSelectionChangedListener fTextViewer addTextListener StyledText fTextViewer getTextWidget addKeyListener addMouseListener
Disposes this paint manager The paint manager uninstalls itself and clears all registered painters This method is also called when the last painter is removed from the list of managed painters public void dispose if f Manager null f Manager dispose f Manager null for Iterator e f Painters iterator e has Next I Painter e next dispose f Painters clear f Text Viewer remove Text Input Listener this remove Listeners  fManager fManager fManager fPainters hasNext IPainter fPainters fTextViewer removeTextInputListener removeListeners
Removes our set of listeners from the text viewer and widget respectively private void remove Listeners I Selection Provider provider f Text Viewer get Selection Provider if provider null provider remove Selection Changed Listener this f Text Viewer remove Text Listener this Styled Text text f Text Viewer get Text Widget if text null text is Disposed text remove Key Listener this text remove Mouse Listener this  removeListeners ISelectionProvider fTextViewer getSelectionProvider removeSelectionChangedListener fTextViewer removeTextListener StyledText fTextViewer getTextWidget isDisposed removeKeyListener removeMouseListener
Triggers all registered painters for the given reason param reason the reason see I Painter private void paint int reason for Iterator e f Painters iterator e has Next I Painter e next paint reason  IPainter fPainters hasNext IPainter
see Key Listener key Pressed Key Event public void key Pressed Key Event e paint I Painter KEY STROKE  KeyListener keyPressed KeyEvent keyPressed KeyEvent IPainter KEY_STROKE
see Key Listener key Released Key Event public void key Released Key Event e  KeyListener keyReleased KeyEvent keyReleased KeyEvent
see Mouse Listener mouse Double Click Mouse Event public void mouse Double Click Mouse Event e  MouseListener mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent
see Mouse Listener mouse Down Mouse Event public void mouse Down Mouse Event e paint I Painter MOUSE BUTTON  MouseListener mouseDown MouseEvent mouseDown MouseEvent IPainter MOUSE_BUTTON
see Mouse Listener mouse Up Mouse Event public void mouse Up Mouse Event e  MouseListener mouseUp MouseEvent mouseUp MouseEvent
see I Selection Changed Listener selection Changed Selection Changed Event public void selection Changed Selection Changed Event event paint I Painter SELECTION  ISelectionChangedListener selectionChanged SelectionChangedEvent selectionChanged SelectionChangedEvent IPainter
if control null control get Display async Exec new Runnable public void run if f Text Viewer null paint I Painter TEXT CHANGE  getDisplay asyncExec fTextViewer IPainter TEXT_CHANGE
public void text Changed Text Event event if event get Viewer Redraw State return Control control f Text Viewer get Text Widget if control null control get Display async Exec new Runnable public void run if f Text Viewer null paint I Painter TEXT CHANGE  textChanged TextEvent getViewerRedrawState fTextViewer getTextWidget getDisplay asyncExec fTextViewer IPainter TEXT_CHANGE
public void input Document About To Be Changed I Document old Input I Document new Input if old Input null for Iterator e f Painters iterator e has Next I Painter e next deactivate false f Manager uninstall old Input remove Listeners  inputDocumentAboutToBeChanged IDocument oldInput IDocument newInput oldInput fPainters hasNext IPainter fManager oldInput removeListeners
public void input Document Changed I Document old Input I Document new Input if new Input null f Manager install new Input paint I Painter TEXT CHANGE add Listeners  inputDocumentChanged IDocument oldInput IDocument newInput newInput fManager newInput IPainter TEXT_CHANGE addListeners

Creates a new position with the given offset and length 0 param offset the position offset must be 0 public Position int offset this offset 0 
Creates a new position with the given offset and length param offset the position offset must be 0 param length the position length must be 0 public Position int offset int length Assert is True offset 0 Assert is True length 0 this offset offset this length length  isTrue isTrue
Creates a new not initialized position protected Position 
see java lang Object hash Code public int hash Code int deleted is Deleted 0 1 return offset 24 length 16 deleted  hashCode hashCode isDeleted
Marks this position as deleted public void delete is Deleted true  isDeleted
Marks this position as not deleted since 2 0 public void undelete is Deleted false  isDeleted
public boolean equals Object other if other instanceof Position Position rp Position other return rp offset offset rp length length return super equals other 
Returns the length of this position return the length of this position public int get Length return length  getLength
Returns the offset of this position return the length of this position public int get Offset return offset  getOffset
Checks whether the given offset is inside of this position s text range param offset the offset to check return code true code if offset is inside of this position public boolean includes int offset if is Deleted return false return this offset offset offset this offset length  isDeleted
Checks whether the intersection of the given text range and the text range represented by this position is empty or not param offset the offset of the range to check param length the length of the range to check return code true code if intersection is not empty public boolean overlaps With int offset int length if is Deleted return false int end offset length int this End this offset this length if length 0 if this length 0 return this offset end offset this End return offset this offset this offset end if this length 0 return this offset offset offset this End return this offset offset  overlapsWith isDeleted thisEnd thisEnd thisEnd
Returns whether this position has been deleted or not return code true code if position has been deleted public boolean is Deleted return is Deleted  isDeleted isDeleted
Changes the length of this position to the given length param length the new length of this position public void set Length int length Assert is True length 0 this length length  setLength isTrue
Changes the offset of this position to the given offset param offset the new offset of this position public void set Offset int offset Assert is True offset 0 this offset offset  setOffset isTrue

Tells the presentation damager on which document it will work param document the damager s working document 
Returns the damage in the document s presentation caused by the given document change The damage is restricted to the specified partition for which the presentation damager is responsible The damage may also depend on whether the document change also caused changes of the document s partitioning param partition the partition inside which the damage must be determined param event the event describing the change whose damage must be determined param document Partitioning Changed indicates whether the given change changed the document s partitioning return the computed damage  documentPartitioningChanged

Installs this presentation reconciler on the given text viewer After this method has been finished the reconciler is operational I e it works without requesting further client actions until code uninstall code is called p The code install code and code uninstall code methods must be called in sequence i e repeatedly calling code install code without uninstalling may throw an exception p param viewer the viewer on which this presentation reconciler is installed 
Removes the reconciler from the text viewer it has previously been installed on 
Returns the presentation damager registered with this presentation reconciler for the specified content type param content Type the content type for which to determine the damager return the presentation damager registered for the given content type or code null code if there is no damager  contentType
Returns the presentation repairer registered with this presentation reconciler for the specified content type param content Type the content type for which to determine the repairer return the presentation repairer registered for the given content type or code null code if there is no repairer  contentType

Returns the document partitioning this presentation reconciler is using return the document partitioning this presentation reconciler is using 

Tells the presentation repairer on which document it will work param document the damager s working document 
Fills the given presentation with the style ranges which when applied to the presentation reconciler s text viewer repair the presentational damage described by the given region param presentation the text presentation to be filled by this repairer param damage the damage to be repaired 

public void input Document About To Be Changed I Document old Document I Document new Document if old Document null try f Viewer remove Text Listener this old Document remove Document Listener this old Document remove Document Partitioning Listener this old Document remove Position Updater f Position Updater old Document remove Position Category f Position Category catch Bad Position Category Exception x should not happend for former input documents  inputDocumentAboutToBeChanged IDocument oldDocument IDocument newDocument oldDocument fViewer removeTextListener oldDocument removeDocumentListener oldDocument removeDocumentPartitioningListener oldDocument removePositionUpdater fPositionUpdater oldDocument removePositionCategory fPositionCategory BadPositionCategoryException
public void input Document Changed I Document old Document I Document new Document f Document Changing false f Cached Redraw State true if new Document null new Document add Position Category f Position Category new Document add Position Updater f Position Updater new Document add Document Partitioning Listener this new Document add Document Listener this f Viewer add Text Listener this set Document To Damagers new Document set Document To Repairers new Document process Damage new Region 0 new Document get Length new Document  inputDocumentChanged IDocument oldDocument IDocument newDocument fDocumentChanging fCachedRedrawState newDocument newDocument addPositionCategory fPositionCategory newDocument addPositionUpdater fPositionUpdater newDocument addDocumentPartitioningListener newDocument addDocumentListener fViewer addTextListener setDocumentToDamagers newDocument setDocumentToRepairers newDocument processDamage newDocument getLength newDocument
public void document Partitioning Changed I Document document if f Document Changing f Cached Redraw State process Damage new Region 0 document get Length document else f Document Partitioning Changed true  documentPartitioningChanged IDocument fDocumentChanging fCachedRedrawState processDamage getLength fDocumentPartitioningChanged
public void document Partitioning Changed I Document document I Region changed Region if f Document Changing f Cached Redraw State process Damage new Region changed Region get Offset changed Region get Length document else f Document Partitioning Changed true f Changed Document Partitions changed Region  documentPartitioningChanged IDocument IRegion changedRegion fDocumentChanging fCachedRedrawState processDamage changedRegion getOffset changedRegion getLength fDocumentPartitioningChanged fChangedDocumentPartitions changedRegion
public void document Partitioning Changed Document Partitioning Changed Event event I Region changed Region event get Changed Region get Document Partitioning if changed Region null document Partitioning Changed event get Document changed Region  documentPartitioningChanged DocumentPartitioningChangedEvent IRegion changedRegion getChangedRegion getDocumentPartitioning changedRegion documentPartitioningChanged getDocument changedRegion
public void document About To Be Changed Document Event e f Document Changing true if f Cached Redraw State try int offset e get Offset e get Length I Typed Region region get Partition e get Document offset f Remembered Position new Typed Position region e get Document add Position f Position Category f Remembered Position catch Bad Location Exception x can not happen catch Bad Position Category Exception x should not happen on input elements  documentAboutToBeChanged DocumentEvent fDocumentChanging fCachedRedrawState getOffset getLength ITypedRegion getPartition getDocument fRememberedPosition TypedPosition getDocument addPosition fPositionCategory fRememberedPosition BadLocationException BadPositionCategoryException
public void document Changed Document Event e if f Cached Redraw State try e get Document remove Position f Position Category f Remembered Position catch Bad Position Category Exception x can not happen on input documents f Document Changing false  documentChanged DocumentEvent fCachedRedrawState getDocument removePosition fPositionCategory fRememberedPosition BadPositionCategoryException fDocumentChanging
public void text Changed Text Event e f Cached Redraw State e get Viewer Redraw State if f Cached Redraw State return I Region damage null I Document document null if e get Document Event null document f Viewer get Document if document null if e get Offset 0 e get Length 0 e get Text null redraw state change damage the whole document damage new Region 0 document get Length else I Region region widget Region2 Model Region e try String text document get region get Offset region get Length Document Event de new Document Event document region get Offset region get Length text damage get Damage de false catch Bad Location Exception x else Document Event de e get Document Event document de get Document damage get Damage de true if damage null document null process Damage damage document f Document Partitioning Changed false f Changed Document Partitions null  textChanged TextEvent fCachedRedrawState getViewerRedrawState fCachedRedrawState IRegion IDocument getDocumentEvent fViewer getDocument getOffset getLength getText getLength IRegion widgetRegion2ModelRegion getOffset getLength DocumentEvent DocumentEvent getOffset getLength getDamage BadLocationException DocumentEvent getDocumentEvent getDocument getDamage processDamage fDocumentPartitioningChanged fChangedDocumentPartitions
Translates the given text event into the corresponding range of the viewer s document param e the text event return the widget region corresponding the region of the given event since 2 1 protected I Region widget Region2 Model Region Text Event e String text e get Text int length text null 0 text length if f Viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 f Viewer return extension widget Range2 Model Range new Region e get Offset length I Region visible f Viewer get Visible Region I Region region new Region e get Offset visible get Offset length return region  IRegion widgetRegion2ModelRegion TextEvent getText fViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 fViewer widgetRange2ModelRange getOffset IRegion fViewer getVisibleRegion IRegion getOffset getOffset
Creates a new presentation reconciler There are no damagers or repairers registered with this reconciler by default The default partitioning code I Document Extension3 DEFAULT PARTITIONING code is used public Presentation Reconciler super f Partitioning I Document Extension3 DEFAULT PARTITIONING f Position Category TRACKED PARTITION hash Code f Position Updater new Default Position Updater f Position Category  IDocumentExtension3 DEFAULT_PARTITIONING PresentationReconciler fPartitioning IDocumentExtension3 DEFAULT_PARTITIONING fPositionCategory TRACKED_PARTITION hashCode fPositionUpdater DefaultPositionUpdater fPositionCategory
Sets the document partitioning for this presentation reconciler param partitioning the document partitioning for this presentation reconciler since 3 0 public void set Document Partitioning String partitioning Assert is Not Null partitioning f Partitioning partitioning  setDocumentPartitioning isNotNull fPartitioning
since 3 0 public String get Document Partitioning return f Partitioning  getDocumentPartitioning fPartitioning
Registers the given presentation damager for a particular content type If there is already a damager registered for this type the old damager is removed first param damager the presentation damager to register or code null code to remove an existing one param content Type the content type under which to register public void set Damager I Presentation Damager damager String content Type Assert is Not Null content Type if f Damagers null f Damagers new Hash Map if damager null f Damagers remove content Type else f Damagers put content Type damager  contentType setDamager IPresentationDamager contentType isNotNull contentType fDamagers fDamagers HashMap fDamagers contentType fDamagers contentType
Registers the given presentation repairer for a particular content type If there is already a repairer registered for this type the old repairer is removed first param repairer the presentation repairer to register or code null code to remove an existing one param content Type the content type under which to register public void set Repairer I Presentation Repairer repairer String content Type Assert is Not Null content Type if f Repairers null f Repairers new Hash Map if repairer null f Repairers remove content Type else f Repairers put content Type repairer  contentType setRepairer IPresentationRepairer contentType isNotNull contentType fRepairers fRepairers HashMap fRepairers contentType fRepairers contentType
public void install I Text Viewer viewer Assert is Not Null viewer f Viewer viewer f Viewer add Text Input Listener f Internal Listener  ITextViewer isNotNull fViewer fViewer addTextInputListener fInternalListener
public void uninstall f Viewer remove Text Input Listener f Internal Listener Ensure we uninstall all listeners f Internal Listener input Document About To Be Changed f Viewer get Document null  fViewer removeTextInputListener fInternalListener fInternalListener inputDocumentAboutToBeChanged fViewer getDocument
public I Presentation Damager get Damager String content Type if f Damagers null return null return I Presentation Damager f Damagers get content Type  IPresentationDamager getDamager contentType fDamagers IPresentationDamager fDamagers contentType
public I Presentation Repairer get Repairer String content Type if f Repairers null return null return I Presentation Repairer f Repairers get content Type  IPresentationRepairer getRepairer contentType fRepairers IPresentationRepairer fRepairers contentType
Informs all registered damagers about the document on which they will work param document the document on which to work protected void set Document To Damagers I Document document if f Damagers null Iterator e f Damagers values iterator while e has Next I Presentation Damager damager I Presentation Damager e next damager set Document document  setDocumentToDamagers IDocument fDamagers fDamagers hasNext IPresentationDamager IPresentationDamager setDocument
Informs all registered repairers about the document on which they will work param document the document on which to work protected void set Document To Repairers I Document document if f Repairers null Iterator e f Repairers values iterator while e has Next I Presentation Repairer repairer I Presentation Repairer e next repairer set Document document  setDocumentToRepairers IDocument fRepairers fRepairers hasNext IPresentationRepairer IPresentationRepairer setDocument
Constructs a repair description for the given damage and returns this description as a text presentation For this it queries the partitioning of the damage region and asks the appropriate presentation repairer for each partition to construct the repair description for this partition param damage the damage to be repaired param document the document whose presentation must be repaired return the presentation repair description as text presentation or code null code if the partitioning could not be computed protected Text Presentation create Presentation I Region damage I Document document try if f Repairers null f Repairers is Empty Text Presentation presentation new Text Presentation damage 1 presentation set Default Style Range new Style Range damage get Offset damage get Length null null return presentation Text Presentation presentation new Text Presentation damage 1000 I Typed Region partitioning Text Utilities compute Partitioning document get Document Partitioning damage get Offset damage get Length false for int i 0 i partitioning length i I Typed Region r partitioning i I Presentation Repairer repairer get Repairer r get Type if repairer null repairer create Presentation presentation r return presentation catch Bad Location Exception x return null  TextPresentation createPresentation IRegion IDocument fRepairers fRepairers isEmpty TextPresentation TextPresentation setDefaultStyleRange StyleRange getOffset getLength TextPresentation TextPresentation ITypedRegion TextUtilities computePartitioning getDocumentPartitioning getOffset getLength ITypedRegion IPresentationRepairer getRepairer getType createPresentation BadLocationException
Checks for the first and the last affected partition affected by a document event and calls their damagers Invalidates everything from the start of the damage for the first partition until the end of the damage for the last partition param e the event describing the document change param optimize code true code if partition changes should be considered for optimization return the damaged caused by the change or code null code if computing the partitioning failed since 3 0 private I Region get Damage Document Event e boolean optimize if f Damagers null f Damagers is Empty int length e get Text null 0 e get Text length length Math max e get Length length length Math min e get Document get Length e get Offset length return new Region e get Offset length I Region damage null try I Typed Region partition get Partition e get Document e get Offset I Presentation Damager damager get Damager partition get Type if damager null return null I Region r damager get Damage Region partition e f Document Partitioning Changed if f Document Partitioning Changed optimize damage r else int damage End get Damage End Offset e int paritition Damage End 1 if f Changed Document Partitions null paritition Damage End f Changed Document Partitions get Offset f Changed Document Partitions get Length int end Math max damage End paritition Damage End damage end 1 r new Region r get Offset end r get Offset catch Bad Location Exception x return damage  IRegion getDamage DocumentEvent fDamagers fDamagers isEmpty getText getText getLength getDocument getLength getOffset getOffset IRegion ITypedRegion getPartition getDocument getOffset IPresentationDamager getDamager getType IRegion getDamageRegion fDocumentPartitioningChanged fDocumentPartitioningChanged damageEnd getDamageEndOffset parititionDamageEnd fChangedDocumentPartitions parititionDamageEnd fChangedDocumentPartitions getOffset fChangedDocumentPartitions getLength damageEnd parititionDamageEnd getOffset getOffset BadLocationException
Returns the end offset of the damage If a partition has been split by the given document event also the second half of the original partition must be considered This is achieved by using the remembered partition range param e the event describing the change return the damage end offset excluding exception Bad Location Exception if method accesses invalid offset private int get Damage End Offset Document Event e throws Bad Location Exception I Document d e get Document int length 0 if e get Text null length e get Text length if length 0 length I Typed Region partition get Partition d e get Offset length int end Offset partition get Offset partition get Length if end Offset e get Offset return 1 int end f Remembered Position null 1 f Remembered Position get Offset f Remembered Position get Length if end Offset end partition get Partition d end I Presentation Damager damager get Damager partition get Type if damager null return 1 I Region r damager get Damage Region partition e f Document Partitioning Changed return r get Offset r get Length  BadLocationException getDamageEndOffset DocumentEvent BadLocationException IDocument getDocument getText getText ITypedRegion getPartition getOffset endOffset getOffset getLength endOffset getOffset fRememberedPosition fRememberedPosition getOffset fRememberedPosition getLength endOffset getPartition IPresentationDamager getDamager getType IRegion getDamageRegion fDocumentPartitioningChanged getOffset getLength
Processes the given damage param damage the damage to be repaired param document the document whose presentation must be repaired private void process Damage I Region damage I Document document if damage null damage get Length 0 Text Presentation p create Presentation damage document if p null apply Text Region Collection p  processDamage IRegion IDocument getLength TextPresentation createPresentation applyTextRegionCollection
Applies the given text presentation to the text viewer the presentation reconciler is installed on param presentation the text presentation to be applied to the text viewer private void apply Text Region Collection Text Presentation presentation f Viewer change Text Presentation presentation false  applyTextRegionCollection TextPresentation fViewer changeTextPresentation
Returns the partition for the given offset in the given document param document the document param offset the offset return the partition throws Bad Location Exception if offset is invalid in the given document since 3 0 private I Typed Region get Partition I Document document int offset throws Bad Location Exception return Text Utilities get Partition document get Document Partitioning offset false  BadLocationException ITypedRegion getPartition IDocument BadLocationException TextUtilities getPartition getDocumentPartitioning

Creates a new visible region param offset the offset of the region param length the length of the region public Visible Region int offset int length super offset length  VisibleRegion
If offset is the end of the visible region and the length is 0 the offset is considered overlapping with the visible region see org eclipse jface text Position overlaps With int int public boolean overlaps With int offset int length boolean appending offset this offset this length length 0 return appending super overlaps With offset length  overlapsWith overlapsWith overlapsWith
Creates a new child document param master Document inherit Doc public Child Document I Document master Document super master Document  masterDocument inheritDoc ChildDocument IDocument masterDocument masterDocument
Returns the parent document of this child document return the parent document of this child document see Projection Document get Master Document public I Document get Parent Document return get Master Document  ProjectionDocument getMasterDocument IDocument getParentDocument getMasterDocument
Sets the parent document range covered by this child document to the given range param offset the offset of the range param length the length of the range throws Bad Location Exception if the given range is not valid public void set Parent Document Range int offset int length throws Bad Location Exception replace Master Document Ranges offset length  BadLocationException setParentDocumentRange BadLocationException replaceMasterDocumentRanges
Returns the parent document range of this child document return the parent document range of this child document public Position get Parent Document Range I Region coverage get Projection Mapping get Coverage return new Visible Region coverage get Offset coverage get Length  getParentDocumentRange IRegion getProjectionMapping getCoverage VisibleRegion getOffset getLength

see org eclipse jface text projection Projection Document Manager create Projection Document org eclipse jface text I Document protected Projection Document create Projection Document I Document master return new Child Document master  ProjectionDocumentManager createProjectionDocument IDocument ProjectionDocument createProjectionDocument IDocument ChildDocument

Creates a new fragment covering the given range param offset the offset of the fragment param length the length of the fragment public Fragment int offset int length super offset length 

Creates the fragment updater for the given category param fragment Category the position category used for managing the fragments of a document protected Fragment Updater String fragment Category super fragment Category  fragmentCategory FragmentUpdater fragmentCategory fragmentCategory
public void update Document Event event try Position category event get Document get Positions get Category f Offset event get Offset f Length event get Length f Replace Length event get Text null 0 event get Text length f Document event get Document for int i 0 i category length i f Position category i f Is Last i category length 1 f Original Position offset f Position offset f Original Position length f Position length if not Deleted adapt To Replace catch Bad Position Category Exception x do nothing  DocumentEvent getDocument getPositions getCategory fOffset getOffset fLength getLength fReplaceLength getText getText fDocument getDocument fPosition fIsLast fOriginalPosition fPosition fOriginalPosition fPosition notDeleted adaptToReplace BadPositionCategoryException
protected void adapt To Insert int my Start f Position offset int my End Math max my Start f Position offset f Position length f Is Last is Affecting Replace 0 1 if my End f Offset return if f Length 0 if my Start f Offset f Position length f Replace Length else f Position offset f Replace Length else if my Start f Offset f Original Position offset f Offset f Position length f Replace Length else f Position offset f Replace Length  adaptToInsert myStart fPosition myEnd myStart fPosition fPosition fIsLast isAffectingReplace myEnd fOffset fLength myStart fOffset fPosition fReplaceLength fPosition fReplaceLength myStart fOffset fOriginalPosition fOffset fPosition fReplaceLength fPosition fReplaceLength
Returns whether this updater considers any position affected by the given document event A position is affected if either the offset or the length of the position is modified but the position is not just shifted param event the event return code true code if there is any affected position code false code otherwise public boolean affects Positions Document Event event I Document document event get Document try int index document compute Index In Category get Category event get Offset Position fragments document get Positions get Category if 0 index Position fragment fragments index 1 if fragment overlaps With event get Offset event get Length return true if fragment offset fragment length event get Offset return index fragments length if index fragments length Position fragment fragments index return fragment overlaps With event get Offset event get Length catch Bad Location Exception x catch Bad Position Category Exception x return false  affectsPositions DocumentEvent IDocument getDocument computeIndexInCategory getCategory getOffset getPositions getCategory overlapsWith getOffset getLength getOffset overlapsWith getOffset getLength BadLocationException BadPositionCategoryException

interface I Minimal Mapping see org eclipse jface text I Document Information Mapping get Coverage I Region get Coverage  IMinimalMapping IDocumentInformationMapping getCoverage IRegion getCoverage
I Region get Coverage see org eclipse jface text I Document Information Mapping to Origin Region I Region I Region to Origin Region I Region region throws Bad Location Exception  IRegion getCoverage IDocumentInformationMapping toOriginRegion IRegion IRegion toOriginRegion IRegion BadLocationException
I Region to Origin Region I Region region throws Bad Location Exception see org eclipse jface text I Document Information Mapping to Origin Offset int int to Origin Offset int offset throws Bad Location Exception  IRegion toOriginRegion IRegion BadLocationException IDocumentInformationMapping toOriginOffset toOriginOffset BadLocationException
int to Origin Offset int offset throws Bad Location Exception see org eclipse jface text I Document Information Mapping Extension to Exact Origin Regions I Region I Region to Exact Origin Regions I Region region throws Bad Location Exception  toOriginOffset BadLocationException IDocumentInformationMappingExtension toExactOriginRegions IRegion IRegion toExactOriginRegions IRegion BadLocationException
I Region to Exact Origin Regions I Region region throws Bad Location Exception see org eclipse jface text I Document Information Mapping Extension get Image Length int get Image Length  IRegion toExactOriginRegions IRegion BadLocationException IDocumentInformationMappingExtension getImageLength getImageLength

Creates a projection document for the given master document param master Document the master document public Projection Document I Document master Document super f Master Document master Document if f Master Document instanceof I Document Extension f Master Document Extension I Document Extension f Master Document f Segments Category SEGMENTS CATEGORY f Fragments Category FRAGMENTS CATEGORY PREFIX hash Code f Master Document add Position Category f Fragments Category f Fragments Updater new Fragment Updater f Fragments Category f Master Document add Position Updater f Fragments Updater f Mapping new Projection Mapping master Document f Fragments Category this f Segments Category I Text Store s new Projection Text Store master Document f Mapping I Line Tracker tracker new Default Line Tracker set Text Store s set Line Tracker tracker complete Initialization initialize Projection tracker set s get 0 s get Length  masterDocument ProjectionDocument IDocument masterDocument fMasterDocument masterDocument fMasterDocument IDocumentExtension fMasterDocumentExtension IDocumentExtension fMasterDocument fSegmentsCategory SEGMENTS_CATEGORY fFragmentsCategory FRAGMENTS_CATEGORY_PREFIX hashCode fMasterDocument addPositionCategory fFragmentsCategory fFragmentsUpdater FragmentUpdater fFragmentsCategory fMasterDocument addPositionUpdater fFragmentsUpdater fMapping ProjectionMapping masterDocument fFragmentsCategory fSegmentsCategory ITextStore ProjectionTextStore masterDocument fMapping ILineTracker DefaultLineTracker setTextStore setLineTracker completeInitialization initializeProjection getLength
Disposes this projection document public void dispose f Master Document remove Position Updater f Fragments Updater try f Master Document remove Position Category f Fragments Category catch Bad Position Category Exception x allow multiple dispose calls  fMasterDocument removePositionUpdater fFragmentsUpdater fMasterDocument removePositionCategory fFragmentsCategory BadPositionCategoryException
private void internal Error throw new Illegal State Exception  internalError IllegalStateException
Returns the fragments of the master documents return the fragment of the master document protected final Position get Fragments try return f Master Document get Positions f Fragments Category catch Bad Position Category Exception e internal Error unreachable return null  getFragments fMasterDocument getPositions fFragmentsCategory BadPositionCategoryException internalError
Returns the segments of this projection document return the segments of this projection document protected final Position get Segments try return get Positions f Segments Category catch Bad Position Category Exception e internal Error unreachable return null  getSegments getPositions fSegmentsCategory BadPositionCategoryException internalError
Returns the projection mapping used by this document return the projection mapping used by this document public Projection Mapping get Projection Mapping return f Mapping  ProjectionMapping getProjectionMapping fMapping
Returns the master document of this projection document return the master document of this projection document public I Document get Master Document return f Master Document  IDocument getMasterDocument fMasterDocument
Initializes the projection document from the master document based on the master s fragments private void initialize Projection try add Position Category f Segments Category f Segment Updater new Segment Updater f Segments Category add Position Updater f Segment Updater int offset 0 Position fragments get Fragments for int i 0 i fragments length i Fragment fragment Fragment fragments i Segment segment new Segment offset fragment get Length segment fragment fragment add Position f Segments Category segment offset fragment length catch Bad Position Category Exception x internal Error catch Bad Location Exception x internal Error  initializeProjection addPositionCategory fSegmentsCategory fSegmentUpdater SegmentUpdater fSegmentsCategory addPositionUpdater fSegmentUpdater getFragments getLength addPosition fSegmentsCategory BadPositionCategoryException internalError BadLocationException internalError
Creates a segment for the given fragment at the given position inside the list of segments param fragment the corresponding fragment param index the index in the list of segments return the created segment throws Bad Location Exception in case the fragment is invalid throws Bad Position Category Exception in case the segment category is invalid private Segment create Segment For Fragment fragment int index throws Bad Location Exception Bad Position Category Exception int offset 0 if index 0 Position segments get Segments Segment segment Segment segments index 1 offset segment get Offset segment get Length Segment segment new Segment offset 0 segment fragment fragment fragment segment segment add Position f Segments Category segment return segment  BadLocationException BadPositionCategoryException createSegmentFor BadLocationException BadPositionCategoryException getSegments getOffset getLength addPosition fSegmentsCategory
Adds the given range of the master document to this projection document param offset In Master offset of the master document range param length In Master length of the master document range param master Document Event the master document event that causes this projection change or code null code if none throws Bad Location Exception if the given range is invalid in the master document private void internal Add Master Document Range int offset In Master int length In Master Document Event master Document Event throws Bad Location Exception if length In Master 0 return try Position fragments get Fragments int index f Master Document compute Index In Category f Fragments Category offset In Master Fragment left null Fragment right null if index fragments length if offset In Master fragments index offset throw new Illegal Argument Exception overlaps with existing fragment NON NLS 1 if offset In Master length In Master fragments index offset right Fragment fragments index if 0 index index fragments length Fragment fragment Fragment fragments index 1 if fragment includes offset In Master throw new Illegal Argument Exception overlaps with existing fragment NON NLS 1 if fragment get Offset fragment get Length offset In Master left fragment int offset In Slave 0 if index 0 Fragment fragment Fragment fragments index 1 Segment segment fragment segment offset In Slave segment get Offset segment get Length Projection Document Event event new Projection Document Event this offset In Slave 0 f Master Document get offset In Master length In Master offset In Master length In Master master Document Event super fire Document About To Be Changed event check for neighboring fragment if left null right null int end Offset right get Offset right get Length left set Length end Offset left get Offset left segment set Length left segment get Length right segment get Length remove Position f Segments Category right segment f Master Document remove Position f Fragments Category right else if left null int end Offset offset In Master length In Master left set Length end Offset left get Offset left segment mark For Stretch else if right null right set Offset right get Offset length In Master right set Length right get Length length In Master right segment mark For Stretch else create a new segment Fragment fragment new Fragment offset In Master length In Master f Master Document add Position f Fragments Category fragment Segment segment create Segment For fragment index segment mark For Stretch get Tracker replace event get Offset event get Length event get Text super fire Document Changed event catch Bad Position Category Exception x internal Error  offsetInMaster lengthInMaster masterDocumentEvent BadLocationException internalAddMasterDocumentRange offsetInMaster lengthInMaster DocumentEvent masterDocumentEvent BadLocationException lengthInMaster getFragments fMasterDocument computeIndexInCategory fFragmentsCategory offsetInMaster offsetInMaster IllegalArgumentException offsetInMaster lengthInMaster offsetInMaster IllegalArgumentException getOffset getLength offsetInMaster offsetInSlave offsetInSlave getOffset getLength ProjectionDocumentEvent ProjectionDocumentEvent offsetInSlave fMasterDocument offsetInMaster lengthInMaster offsetInMaster lengthInMaster masterDocumentEvent fireDocumentAboutToBeChanged endOffset getOffset getLength setLength endOffset getOffset setLength getLength getLength removePosition fSegmentsCategory fMasterDocument removePosition fFragmentsCategory endOffset offsetInMaster lengthInMaster setLength endOffset getOffset markForStretch setOffset getOffset lengthInMaster setLength getLength lengthInMaster markForStretch offsetInMaster lengthInMaster fMasterDocument addPosition fFragmentsCategory createSegmentFor markForStretch getTracker getOffset getLength getText fireDocumentChanged BadPositionCategoryException internalError
Finds the fragment of the master document that represents the given range param offset In Master the offset of the range in the master document param length In Master the length of the range in the master document return the fragment representing the given master document range private Fragment find Fragment int offset In Master int length In Master Position fragments get Fragments for int i 0 i fragments length i Fragment f Fragment fragments i if f get Offset offset In Master offset In Master length In Master f get Offset f get Length return f return null  offsetInMaster lengthInMaster findFragment offsetInMaster lengthInMaster getFragments getOffset offsetInMaster offsetInMaster lengthInMaster getOffset getLength
Removes the given range of the master document from this projection document param offset In Master the offset of the range in the master document param length In Master the length of the range in the master document throws Bad Location Exception if the given range is not valid in the master document throws Illegal Argument Exception if the given range is not projected in this projection document or is not completely comprised by an existing fragment private void internal Remove Master Document Range int offset In Master int length In Master throws Bad Location Exception try I Region image Region f Mapping to Exact Image Region new Region offset In Master length In Master if image Region null throw new Illegal Argument Exception Fragment fragment find Fragment offset In Master length In Master if fragment null throw new Illegal Argument Exception Projection Document Event event new Projection Document Event this image Region get Offset image Region get Length null offset In Master length In Master super fire Document About To Be Changed event if fragment get Offset offset In Master fragment set Offset offset In Master length In Master fragment set Length fragment get Length length In Master else if fragment get Offset fragment get Length offset In Master length In Master fragment set Length fragment get Length length In Master else split fragment into three fragments let position updater remove it add fragment for the region to be removed Fragment new Fragment new Fragment offset In Master length In Master Segment segment new Segment image Region get Offset image Region get Length new Fragment segment segment segment fragment new Fragment f Master Document add Position f Fragments Category new Fragment add Position f Segments Category segment add fragment for the remainder right of the deleted range in the original fragment int offset offset In Master length In Master new Fragment new Fragment offset fragment get Offset fragment get Length offset offset image Region get Offset image Region get Length segment new Segment offset fragment segment get Offset fragment segment get Length offset new Fragment segment segment segment fragment new Fragment f Master Document add Position f Fragments Category new Fragment add Position f Segments Category segment adjust length of initial fragment the left one fragment set Length offset In Master fragment get Offset fragment segment set Length image Region get Offset fragment segment get Offset get Tracker replace event get Offset event get Length event get Text super fire Document Changed event catch Bad Position Category Exception x internal Error  offsetInMaster lengthInMaster BadLocationException IllegalArgumentException internalRemoveMasterDocumentRange offsetInMaster lengthInMaster BadLocationException IRegion imageRegion fMapping toExactImageRegion offsetInMaster lengthInMaster imageRegion IllegalArgumentException findFragment offsetInMaster lengthInMaster IllegalArgumentException ProjectionDocumentEvent ProjectionDocumentEvent imageRegion getOffset imageRegion getLength offsetInMaster lengthInMaster fireDocumentAboutToBeChanged getOffset offsetInMaster setOffset offsetInMaster lengthInMaster setLength getLength lengthInMaster getOffset getLength offsetInMaster lengthInMaster setLength getLength lengthInMaster newFragment offsetInMaster lengthInMaster imageRegion getOffset imageRegion getLength newFragment newFragment fMasterDocument addPosition fFragmentsCategory newFragment addPosition fSegmentsCategory offsetInMaster lengthInMaster newFragment getOffset getLength imageRegion getOffset imageRegion getLength getOffset getLength newFragment newFragment fMasterDocument addPosition fFragmentsCategory newFragment addPosition fSegmentsCategory setLength offsetInMaster getOffset setLength imageRegion getOffset getOffset getTracker getOffset getLength getText fireDocumentChanged BadPositionCategoryException internalError
Returns the sequence of all master document regions with are contained in the given master document range and which are not yet part of this projection document param offset In Master the range offset in the master document param length In Master the range length in the master document return the sequence of regions which are not yet part of the projection document throws Bad Location Exception in case the given range is invalid in the master document public final I Region compute Unprojected Master Regions int offset In Master int length In Master throws Bad Location Exception I Region fragments null I Region image Region f Mapping to Image Region new Region offset In Master length In Master if image Region null fragments f Mapping to Exact Origin Regions image Region if fragments null fragments length 0 return new I Region new Region offset In Master length In Master List gaps new Array List I Region region fragments 0 if offset In Master region get Offset gaps add new Region offset In Master region get Offset offset In Master for int i 0 i fragments length 1 i I Region left fragments i I Region right fragments i 1 int left End left get Offset left get Length if left End right get Offset gaps add new Region left End right get Offset left End region fragments fragments length 1 int left End region get Offset region get Length int right End offset In Master length In Master if left End right End gaps add new Region left End right End left End I Region result new I Region gaps size gaps to Array result return result  offsetInMaster lengthInMaster BadLocationException IRegion computeUnprojectedMasterRegions offsetInMaster lengthInMaster BadLocationException IRegion IRegion imageRegion fMapping toImageRegion offsetInMaster lengthInMaster imageRegion fMapping toExactOriginRegions imageRegion IRegion offsetInMaster lengthInMaster ArrayList IRegion offsetInMaster getOffset offsetInMaster getOffset offsetInMaster IRegion IRegion leftEnd getOffset getLength leftEnd getOffset leftEnd getOffset leftEnd leftEnd getOffset getLength rightEnd offsetInMaster lengthInMaster leftEnd rightEnd leftEnd rightEnd leftEnd IRegion IRegion toArray
Ensures that the given range of the master document is part of this projection document param offset In Master the offset of the master document range param length In Master the length of the master document range throws Bad Location Exception in case the master event is not valid public void add Master Document Range int offset In Master int length In Master throws Bad Location Exception add Master Document Range offset In Master length In Master null  offsetInMaster lengthInMaster BadLocationException addMasterDocumentRange offsetInMaster lengthInMaster BadLocationException addMasterDocumentRange offsetInMaster lengthInMaster
Ensures that the given range of the master document is part of this projection document param offset In Master the offset of the master document range param length In Master the length of the master document range param master Document Event the master document event which causes this projection change or code null code if none throws Bad Location Exception in case the master event is not valid private void add Master Document Range int offset In Master int length In Master Document Event master Document Event throws Bad Location Exception I Region gaps compute Unprojected Master Regions offset In Master length In Master if gaps null return for int i 0 i gaps length i I Region gap gaps i internal Add Master Document Range gap get Offset gap get Length master Document Event  offsetInMaster lengthInMaster masterDocumentEvent BadLocationException addMasterDocumentRange offsetInMaster lengthInMaster DocumentEvent masterDocumentEvent BadLocationException IRegion computeUnprojectedMasterRegions offsetInMaster lengthInMaster IRegion internalAddMasterDocumentRange getOffset getLength masterDocumentEvent
Ensures that the given range of the master document is not part of this projection document param offset In Master the offset of the master document range param length In Master the length of the master document range throws Bad Location Exception in case the master event is not valid public void remove Master Document Range int offset In Master int length In Master throws Bad Location Exception I Region fragments compute Projected Master Regions offset In Master length In Master if fragments null fragments length 0 return for int i 0 i fragments length i I Region fragment fragments i internal Remove Master Document Range fragment get Offset fragment get Length  offsetInMaster lengthInMaster BadLocationException removeMasterDocumentRange offsetInMaster lengthInMaster BadLocationException IRegion computeProjectedMasterRegions offsetInMaster lengthInMaster IRegion internalRemoveMasterDocumentRange getOffset getLength
Returns the sequence of all master document regions with are contained in the given master document range and which are part of this projection document May return code null code if no such regions exist param offset In Master the range offset in the master document param length In Master the range length in the master document return the sequence of regions which are part of the projection document or code null code throws Bad Location Exception in case the given range is invalid in the master document final public I Region compute Projected Master Regions int offset In Master int length In Master throws Bad Location Exception I Region image Region f Mapping to Image Region new Region offset In Master length In Master if image Region null return f Mapping to Exact Origin Regions image Region return null  offsetInMaster lengthInMaster BadLocationException IRegion computeProjectedMasterRegions offsetInMaster lengthInMaster BadLocationException IRegion imageRegion fMapping toImageRegion offsetInMaster lengthInMaster imageRegion fMapping toExactOriginRegions imageRegion
Returns whether this project is being updated return code true code if the document is updating protected boolean is Updating return f Is Updating  isUpdating fIsUpdating
public void replace int offset int length String text throws Bad Location Exception try f Is Updating true if f Master Document Extension null f Master Document Extension stop Post Notification Processing super replace offset length text finally f Is Updating false if f Master Document Extension null f Master Document Extension resume Post Notification Processing  BadLocationException fIsUpdating fMasterDocumentExtension fMasterDocumentExtension stopPostNotificationProcessing fIsUpdating fMasterDocumentExtension fMasterDocumentExtension resumePostNotificationProcessing
public void set String text try f Is Updating true if f Master Document Extension null f Master Document Extension stop Post Notification Processing super set text finally f Is Updating false if f Master Document Extension null f Master Document Extension resume Post Notification Processing  fIsUpdating fMasterDocumentExtension fMasterDocumentExtension stopPostNotificationProcessing fIsUpdating fMasterDocumentExtension fMasterDocumentExtension resumePostNotificationProcessing
Transforms a document event of the master document into a projection document based document event param master Event the master document event return the slave document event throws Bad Location Exception in case the master event is not valid private Projection Document Event normalize Document Event master Event throws Bad Location Exception if is Updating I Region image Region f Mapping to Exact Image Region new Region master Event get Offset master Event get Length if image Region null return new Projection Document Event this image Region get Offset image Region get Length master Event get Text master Event return null else Projection Document Event event new Projection Document Event this f Original Event get Offset f Original Event get Length f Original Event get Text master Event f Original Event null return event  masterEvent BadLocationException ProjectionDocumentEvent DocumentEvent masterEvent BadLocationException isUpdating IRegion imageRegion fMapping toExactImageRegion masterEvent getOffset masterEvent getLength imageRegion ProjectionDocumentEvent imageRegion getOffset imageRegion getLength masterEvent getText masterEvent ProjectionDocumentEvent ProjectionDocumentEvent fOriginalEvent getOffset fOriginalEvent getLength fOriginalEvent getText masterEvent fOriginalEvent
private boolean includes I Region region int offset if region null return false return region get Offset offset offset region get Offset region get Length  IRegion getOffset getOffset getLength
private boolean includes I Region region1 int offset int length if region1 null return false return region1 get Offset offset offset length region1 get Offset region1 get Length  IRegion getOffset getOffset getLength
Compute the gaps that must be covered in order to ensure that the range affected by the given document event is completely projected param event the master document event return the gaps to be covered private I Region compute Coverage Gap Document Event event I Region left null List gaps new Array List try deal with the beginning of the event region int image Offset f Mapping to Image Offset event get Offset if image Offset 1 Position fragments get Fragments int index f Master Document compute Index In Category f Fragments Category event get Offset if index fragments length Fragment fragment Fragment fragments index left new Region event get Offset fragment get Offset event get Offset gaps add left the event itself if includes left event get Offset event get Length gaps add new Region event get Offset event get Length deal with the end of the event region int inclusive Origin End Offset event get Offset Math max 0 event get Length 1 int inclusive Image End Offset f Mapping to Image Offset inclusive Origin End Offset if inclusive Image End Offset 1 includes left inclusive Origin End Offset int index f Master Document compute Index In Category f Fragments Category inclusive Origin End Offset if 0 index Position fragments get Fragments Fragment fragment Fragment fragments index 1 gaps add new Region fragment get Offset inclusive Origin End Offset 1 fragment get Offset catch Bad Location Exception e internal Error catch Bad Position Category Exception e internal Error I Region result new I Region gaps size gaps to Array result return result  IRegion computeCoverageGap DocumentEvent IRegion ArrayList imageOffset fMapping toImageOffset getOffset imageOffset getFragments fMasterDocument computeIndexInCategory fFragmentsCategory getOffset getOffset getOffset getOffset getOffset getLength getOffset getLength inclusiveOriginEndOffset getOffset getLength inclusiveImageEndOffset fMapping toImageOffset inclusiveOriginEndOffset inclusiveImageEndOffset inclusiveOriginEndOffset fMasterDocument computeIndexInCategory fFragmentsCategory inclusiveOriginEndOffset getFragments getOffset inclusiveOriginEndOffset getOffset BadLocationException internalError BadPositionCategoryException internalError IRegion IRegion toArray
Ensures that when the master event effects this projection document that the whole region described by the event is part of this projection document param master Event the master document event return code true code if master Event affects this projection document throws Bad Location Exception in case the master event is not valid protected final boolean adapt Projection To Master Change Document Event master Event throws Bad Location Exception if is Updating f Fragments Updater affects Positions master Event f Is Auto Expanding I Region gaps compute Coverage Gap master Event for int i 0 i gaps length i I Region gap gaps i add Master Document Range gap get Offset gap get Length master Event return true else if f Mapping get Image Length 0 master Event get Length 0 Position fragments get Fragments if fragments length 0 there is no segment in this projection document thus one must be created need to bypass the usual infrastructure as the new segment fragment would be of length 0 and thus the segmentation be not well formed try Fragment fragment new Fragment 0 0 f Master Document add Position f Fragments Category fragment create Segment For fragment 0 catch Bad Position Category Exception x internal Error return is Updating  masterEvent masterEvent BadLocationException adaptProjectionToMasterChange DocumentEvent masterEvent BadLocationException isUpdating fFragmentsUpdater affectsPositions masterEvent fIsAutoExpanding IRegion computeCoverageGap masterEvent IRegion addMasterDocumentRange getOffset getLength masterEvent fMapping getImageLength masterEvent getLength getFragments fMasterDocument addPosition fFragmentsCategory createSegmentFor BadPositionCategoryException internalError isUpdating
When called this projection document is informed about a forthcoming change of its master document This projection document checks whether the master document change affects it and if so informs all document listeners param master Event the master document event public void master Document About To Be Changed Document Event master Event try boolean assert Not Null adapt Projection To Master Change master Event f Slave Event normalize master Event if assert Not Null f Slave Event null internal Error f Master Event master Event if f Slave Event null delayed Fire Document About To Be Changed catch Bad Location Exception e internal Error  masterEvent masterDocumentAboutToBeChanged DocumentEvent masterEvent assertNotNull adaptProjectionToMasterChange masterEvent fSlaveEvent masterEvent assertNotNull fSlaveEvent internalError fMasterEvent masterEvent fSlaveEvent delayedFireDocumentAboutToBeChanged BadLocationException internalError
When called this projection document is informed about a change of its master document If this projection document is affected it informs all of its document listeners param master Event the master document event public void master Document Changed Document Event master Event if is Updating master Event f Master Event if f Slave Event null try get Tracker replace f Slave Event get Offset f Slave Event get Length f Slave Event get Text fire Document Changed f Slave Event catch Bad Location Exception e internal Error else if ensure Well Formed Segmentation master Event get Offset f Mapping projection Changed  masterEvent masterDocumentChanged DocumentEvent masterEvent isUpdating masterEvent fMasterEvent fSlaveEvent getTracker fSlaveEvent getOffset fSlaveEvent getLength fSlaveEvent getText fireDocumentChanged fSlaveEvent BadLocationException internalError ensureWellFormedSegmentation masterEvent getOffset fMapping projectionChanged
protected void fire Document About To Be Changed Document Event event f Original Event event delay it until there is a notification from the master document at this point it is expensive to construct the master document information  fireDocumentAboutToBeChanged DocumentEvent fOriginalEvent
Fires the slave document event as about to be changed event to all registered listeners private void delayed Fire Document About To Be Changed super fire Document About To Be Changed f Slave Event  delayedFireDocumentAboutToBeChanged fireDocumentAboutToBeChanged fSlaveEvent
Ignores the given event and sends the semantically equal slave document event instead param event the event to be ignored protected void fire Document Changed Document Event event super fire Document Changed f Slave Event  fireDocumentChanged DocumentEvent fireDocumentChanged fSlaveEvent
protected void update Document Structures Document Event event super update Document Structures event ensure Well Formed Segmentation compute Anchor event f Mapping projection Changed  updateDocumentStructures DocumentEvent updateDocumentStructures ensureWellFormedSegmentation computeAnchor fMapping projectionChanged
private int compute Anchor Document Event event if event instanceof Projection Document Event Projection Document Event slave Projection Document Event event if Projection Document Event CONTENT CHANGE slave get Change Type Document Event master slave get Master Event if master null return master get Offset return 1  computeAnchor DocumentEvent ProjectionDocumentEvent ProjectionDocumentEvent ProjectionDocumentEvent ProjectionDocumentEvent CONTENT_CHANGE getChangeType DocumentEvent getMasterEvent getOffset
private boolean ensure Well Formed Segmentation int anchor Offset boolean changed false Position segments get Segments for int i 0 i segments length i Segment segment Segment segments i if segment is Deleted segment get Length 0 try remove Position f Segments Category segment f Master Document remove Position f Fragments Category segment fragment changed true catch Bad Position Category Exception e internal Error else if i segments length 1 Segment next Segment segments i 1 if next is Deleted next get Length 0 continue Fragment fragment segment fragment if fragment get Offset fragment get Length next fragment get Offset join fragments and their corresponding segments segment set Length segment get Length next get Length fragment set Length fragment get Length next fragment get Length next delete if changed anchor Offset 1 Position changed Segments get Segments if changed Segments null changed Segments length 0 Fragment fragment new Fragment anchor Offset 0 try f Master Document add Position f Fragments Category fragment create Segment For fragment 0 catch Bad Location Exception e internal Error catch Bad Position Category Exception e internal Error return changed  ensureWellFormedSegmentation anchorOffset getSegments isDeleted getLength removePosition fSegmentsCategory fMasterDocument removePosition fFragmentsCategory BadPositionCategoryException internalError isDeleted getLength getOffset getLength getOffset setLength getLength getLength setLength getLength getLength anchorOffset changedSegments getSegments changedSegments changedSegments anchorOffset fMasterDocument addPosition fFragmentsCategory createSegmentFor BadLocationException internalError BadPositionCategoryException internalError
public void register Post Notification Replace I Document Listener owner I Document Extension I Replace replace if is Updating throw new Unsupported Operation Exception super register Post Notification Replace owner replace  registerPostNotificationReplace IDocumentListener IDocumentExtension IReplace isUpdating UnsupportedOperationException registerPostNotificationReplace
Sets the auto expand mode for this document param auto Expand Mode code true code if auto expanding public void set Auto Expand Mode boolean auto Expand Mode f Is Auto Expanding auto Expand Mode  autoExpandMode setAutoExpandMode autoExpandMode fIsAutoExpanding autoExpandMode
Replaces all master document ranges with the given master document range param offset In Master the offset in the master document param length In Master the length in the master document throws Bad Location Exception if the given range of the master document is not valid public void replace Master Document Ranges int offset In Master int length In Master throws Bad Location Exception try Projection Document Event event new Projection Document Event this 0 f Mapping get Image Length f Master Document get offset In Master length In Master offset In Master length In Master super fire Document About To Be Changed event Position fragments get Fragments for int i 0 i fragments length i Fragment fragment Fragment fragments i f Master Document remove Position f Fragments Category fragment remove Position f Segments Category fragment segment Fragment fragment new Fragment offset In Master length In Master Segment segment new Segment 0 0 segment fragment fragment fragment segment segment f Master Document add Position f Fragments Category fragment add Position f Segments Category segment get Tracker set f Master Document get offset In Master length In Master super fire Document Changed event catch Bad Position Category Exception x internal Error  offsetInMaster lengthInMaster BadLocationException replaceMasterDocumentRanges offsetInMaster lengthInMaster BadLocationException ProjectionDocumentEvent ProjectionDocumentEvent fMapping getImageLength fMasterDocument offsetInMaster lengthInMaster offsetInMaster lengthInMaster fireDocumentAboutToBeChanged getFragments fMasterDocument removePosition fFragmentsCategory removePosition fSegmentsCategory offsetInMaster lengthInMaster fMasterDocument addPosition fFragmentsCategory addPosition fSegmentsCategory getTracker fMasterDocument offsetInMaster lengthInMaster fireDocumentChanged BadPositionCategoryException internalError

Creates a new content change event caused by the given master document change Instances created using this constructor return code 1 code when calling code get Master Offset code or code get Master Length code This information can be obtained by accessing the master event param doc the changed projection document param offset the offset in the projection document param length the length in the projection document param text the replacement text param master Event the original master event public Projection Document Event I Document doc int offset int length String text Document Event master Event super doc offset length text master Event f Change Type CONTENT CHANGE  getMasterOffset getMasterLength masterEvent ProjectionDocumentEvent IDocument DocumentEvent masterEvent masterEvent fChangeType CONTENT_CHANGE
Creates a new projection change event for the given properties Instances created with this constructor return the given master document offset and length but do not have an associated master document event param doc the projection document param offset the offset in the projection document param length the length in the projection document param text the replacement text param master Offset the offset in the master document param master Length the length in the master document public Projection Document Event I Document doc int offset int length String text int master Offset int master Length super doc offset length text null f Change Type PROJECTION CHANGE f Master Offset master Offset f Master Length master Length  masterOffset masterLength ProjectionDocumentEvent IDocument masterOffset masterLength fChangeType PROJECTION_CHANGE fMasterOffset masterOffset fMasterLength masterLength
Creates a new projection document event for the given properties The projection change is caused by a manipulation of the master document In order to accommodate the master document change the projection document had to change the projection Instances created with this constructor return the given master document offset and length and also have an associated master document event param doc the projection document param offset the offset in the projection document param length the length in the projection document param text the replacement text param master Offset the offset in the master document param master Length the length in the master document param master Event the master document event public Projection Document Event I Document doc int offset int length String text int master Offset int master Length Document Event master Event super doc offset length text master Event f Change Type PROJECTION CHANGE f Master Offset master Offset f Master Length master Length  masterOffset masterLength masterEvent ProjectionDocumentEvent IDocument masterOffset masterLength DocumentEvent masterEvent masterEvent fChangeType PROJECTION_CHANGE fMasterOffset masterOffset fMasterLength masterLength
Returns the change type of this event This is either link PROJECTION CHANGE or link CONTENT CHANGE return the change type of this event public Object get Change Type return f Change Type  PROJECTION_CHANGE CONTENT_CHANGE getChangeType fChangeType
Returns the offset of the master document range that has been added or removed in case this event describes a projection change otherwise it returns code 1 code return the master document offset of the projection change or code 1 code public int get Master Offset return f Master Offset  getMasterOffset fMasterOffset
Returns the length of the master document range that has been added or removed in case this event describes a projection changed otherwise code 1 code return the master document length of the projection change or code 1 code public int get Master Length return f Master Length  getMasterLength fMasterLength

Registers the given projection document for the given master document param master the master document param projection the projection document private void add I Document master Projection Document projection List list List f Projection Registry get master if list null list new Array List 1 f Projection Registry put master list list add projection  IDocument ProjectionDocument fProjectionRegistry ArrayList fProjectionRegistry
Unregisters the given projection document from its master param master the master document param projection the projection document private void remove I Document master Projection Document projection List list List f Projection Registry get master if list null list remove projection if list size 0 f Projection Registry remove master  IDocument ProjectionDocument fProjectionRegistry fProjectionRegistry
Returns whether the given document is a master document param master the document return code true code if the given document is a master document known to this manager private boolean has Projection I Document master return f Projection Registry get master instanceof List  hasProjection IDocument fProjectionRegistry
Returns an iterator enumerating all projection documents registered for the given document or code null code if the document is not a known master document param master the document return an iterator for all registered projection documents or code null code private Iterator get Projections Iterator I Document master List list List f Projection Registry get master if list null return list iterator return null  getProjectionsIterator IDocument fProjectionRegistry
Informs all projection documents of the master document that issued the given document event param about indicates whether the change is about to happen or happened already param master Event the document event which will be processed to inform the projection documents protected void fire Document Event boolean about Document Event master Event I Document master master Event get Document Iterator e get Projections Iterator master if e null return while e has Next Projection Document document Projection Document e next if about document master Document About To Be Changed master Event else document master Document Changed master Event  masterEvent fireDocumentEvent DocumentEvent masterEvent IDocument masterEvent getDocument getProjectionsIterator hasNext ProjectionDocument ProjectionDocument masterDocumentAboutToBeChanged masterEvent masterDocumentChanged masterEvent
see org eclipse jface text I Document Listener document Changed org eclipse jface text Document Event public void document Changed Document Event event fire Document Event false event  IDocumentListener documentChanged DocumentEvent documentChanged DocumentEvent fireDocumentEvent
see org eclipse jface text I Document Listener document About To Be Changed org eclipse jface text Document Event public void document About To Be Changed Document Event event fire Document Event true event  IDocumentListener documentAboutToBeChanged DocumentEvent documentAboutToBeChanged DocumentEvent fireDocumentEvent
public I Document Information Mapping create Master Slave Mapping I Document slave if slave instanceof Projection Document Projection Document projection Document Projection Document slave return projection Document get Projection Mapping return null  IDocumentInformationMapping createMasterSlaveMapping IDocument ProjectionDocument ProjectionDocument projectionDocument ProjectionDocument projectionDocument getProjectionMapping
public I Document create Slave Document I Document master if has Projection master master add Document Listener this Projection Document slave create Projection Document master add master slave return slave  IDocument createSlaveDocument IDocument hasProjection addDocumentListener ProjectionDocument createProjectionDocument
Factory method for projection documents param master the master document return the newly created projection document protected Projection Document create Projection Document I Document master return new Projection Document master  ProjectionDocument createProjectionDocument IDocument ProjectionDocument
public void free Slave Document I Document slave if slave instanceof Projection Document Projection Document projection Document Projection Document slave I Document master projection Document get Master Document remove master projection Document projection Document dispose if has Projection master master remove Document Listener this  freeSlaveDocument IDocument ProjectionDocument ProjectionDocument projectionDocument ProjectionDocument IDocument projectionDocument getMasterDocument projectionDocument projectionDocument hasProjection removeDocumentListener
public I Document get Master Document I Document slave if slave instanceof Projection Document return Projection Document slave get Master Document return null  IDocument getMasterDocument IDocument ProjectionDocument ProjectionDocument getMasterDocument
see org eclipse jface text I Slave Document Manager is Slave Document org eclipse jface text I Document public boolean is Slave Document I Document document return document instanceof Projection Document  ISlaveDocumentManager isSlaveDocument IDocument isSlaveDocument IDocument ProjectionDocument
see org eclipse jface text I Slave Document Manager set Auto Expand Mode org eclipse jface text I Document boolean public void set Auto Expand Mode I Document slave boolean auto Expanding if slave instanceof Projection Document Projection Document slave set Auto Expand Mode auto Expanding  ISlaveDocumentManager setAutoExpandMode IDocument setAutoExpandMode IDocument autoExpanding ProjectionDocument ProjectionDocument setAutoExpandMode autoExpanding
public I Document get Slave Documents I Document master List list List f Projection Registry get master if list null I Document result new I Document list size list to Array result return result return null  IDocument getSlaveDocuments IDocument fProjectionRegistry IDocument IDocument toArray

Thread local indices private static Thread Local sf Indices new Thread Local protected Object initial Value return new int 2  ThreadLocal sfIndices ThreadLocal initialValue
Creates a new mapping between the given parent document and the given projection document param master Document the master document param fragments Category the position category of the parent document used to manage the projected regions param slave Document the slave document param segments Category the position category of the projection document used to manage the fragments public Projection Mapping I Document master Document String fragments Category I Document slave Document String segments Category f Master Document master Document f Fragments Category fragments Category f Slave Document slave Document f Segments Category segments Category  masterDocument fragmentsCategory slaveDocument segmentsCategory ProjectionMapping IDocument masterDocument fragmentsCategory IDocument slaveDocument segmentsCategory fMasterDocument masterDocument fFragmentsCategory fragmentsCategory fSlaveDocument slaveDocument fSegmentsCategory segmentsCategory
Notifies this projection mapping that there was a projection change public void projection Changed f Cached Segments null f Cached Fragments null  projectionChanged fCachedSegments fCachedFragments
private Position get Segments if f Cached Segments null try f Cached Segments f Slave Document get Positions f Segments Category catch Bad Position Category Exception e return new Position 0 return f Cached Segments  getSegments fCachedSegments fCachedSegments fSlaveDocument getPositions fSegmentsCategory BadPositionCategoryException fCachedSegments
private Position get Fragments if f Cached Fragments null try f Cached Fragments f Master Document get Positions f Fragments Category catch Bad Position Category Exception e return new Position 0 return f Cached Fragments  getFragments fCachedFragments fCachedFragments fMasterDocument getPositions fFragmentsCategory BadPositionCategoryException fCachedFragments
private int find Segment Index int offset throws Bad Location Exception Position segments get Segments if segments length 0 if offset 0 throw new Bad Location Exception return 1 try int index f Slave Document compute Index In Category f Segments Category offset if index segments length offset segments index 1 offset segments index 1 length throw new Bad Location Exception if index segments length offset segments index offset return index if index 0 index return index catch Bad Position Category Exception e throw new Illegal State Exception  findSegmentIndex BadLocationException getSegments BadLocationException fSlaveDocument computeIndexInCategory fSegmentsCategory BadLocationException BadPositionCategoryException IllegalStateException
private Segment find Segment int offset throws Bad Location Exception if offset 0 get Image Length offset throw new Bad Location Exception int index find Segment Index offset if index 1 Segment s new Segment 0 0 Fragment f new Fragment 0 0 s fragment f f segment s return s Position segments get Segments return Segment segments index  findSegment BadLocationException getImageLength BadLocationException findSegmentIndex getSegments
private int find Fragment Index int offset int extension Direction throws Bad Location Exception try Position fragments get Fragments if fragments length 0 return 1 int index f Master Document compute Index In Category f Fragments Category offset if index fragments length offset fragments index offset return index if 0 index index fragments length fragments index 1 includes offset return index 1 switch extension Direction case LEFT return Math max index 1 0 case RIGHT return Math min index fragments length 1 return 1 catch Bad Position Category Exception e throw new Illegal State Exception  findFragmentIndex extensionDirection BadLocationException getFragments fMasterDocument computeIndexInCategory fFragmentsCategory extensionDirection BadPositionCategoryException IllegalStateException
private Fragment find Fragment int offset throws Bad Location Exception int length f Master Document get Length if offset 0 length offset throw new Bad Location Exception int index find Fragment Index offset NONE Position fragments get Fragments if index 1 if fragments length 0 Fragment last Fragment fragments fragments length 1 if last get Offset last get Length offset return last return null return Fragment fragments index  findFragment BadLocationException fMasterDocument getLength BadLocationException findFragmentIndex getFragments getOffset getLength
private void find Fragment Indices I Region region boolean exact int result throws Bad Location Exception int offset region get Offset if offset 0 f Master Document get Length offset throw new Bad Location Exception int inclusive End Offset region get Offset region get Length 1 if inclusive End Offset 0 f Master Document get Length inclusive End Offset throw new Bad Location Exception int start Index find Fragment Index offset exact NONE LEFT if start Index 1 result 0 1 return int end Index find Fragment Index inclusive End Offset exact NONE RIGHT if end Index 1 result 0 1 return Position fragments get Fragments while start Index end Index fragments start Index overlaps With region get Offset region get Length start Index while end Index start Index fragments end Index overlaps With region get Offset region get Length end Index if start Index end Index result 0 1 return result 0 start Index result 1 end Index  findFragmentIndices IRegion BadLocationException getOffset fMasterDocument getLength BadLocationException inclusiveEndOffset getOffset getLength inclusiveEndOffset fMasterDocument getLength inclusiveEndOffset BadLocationException startIndex findFragmentIndex startIndex endIndex findFragmentIndex inclusiveEndOffset endIndex getFragments startIndex endIndex startIndex overlapsWith getOffset getLength startIndex endIndex startIndex endIndex overlapsWith getOffset getLength endIndex startIndex endIndex startIndex endIndex
private I Region to Image Region I Region origin Region boolean exact throws Bad Location Exception if origin Region get Length 0 int image Offset to Image Offset origin Region get Offset return image Offset 1 null new Region image Offset 0 int indices int sf Indices get find Fragment Indices origin Region exact indices if indices 0 0 Position fragments get Fragments translate start offset Fragment fragment Fragment fragments indices 0 int origin Offset origin Region get Offset int relative origin Offset fragment get Offset if relative 0 Assert is True exact relative 0 int image Offset fragment segment get Offset relative translate end offset fragment Fragment fragments indices 1 int exclusive Origin End Offset origin Region get Offset origin Region get Length relative exclusive Origin End Offset fragment get Offset if relative fragment get Length Assert is True exact int delta relative fragment get Length relative delta int exclusive Image End Offset fragment segment get Offset relative return new Region image Offset exclusive Image End Offset image Offset return null  IRegion toImageRegion IRegion originRegion BadLocationException originRegion getLength imageOffset toImageOffset originRegion getOffset imageOffset imageOffset sfIndices findFragmentIndices originRegion getFragments originOffset originRegion getOffset originOffset getOffset isTrue imageOffset getOffset exclusiveOriginEndOffset originRegion getOffset originRegion getLength exclusiveOriginEndOffset getOffset getLength isTrue getLength exclusiveImageEndOffset getOffset imageOffset exclusiveImageEndOffset imageOffset
private I Region create Origin Start Region Segment image int offset Shift return new Region image fragment get Offset offset Shift image fragment get Length offset Shift  IRegion createOriginStartRegion offsetShift getOffset offsetShift getLength offsetShift
private I Region create Origin Region Segment image return new Region image fragment get Offset image fragment get Length  IRegion createOriginRegion getOffset getLength
private I Region create Origin End Region Segment image int length Reduction return new Region image fragment get Offset image fragment get Length length Reduction  IRegion createOriginEndRegion lengthReduction getOffset getLength lengthReduction
private I Region create Image Start Region Fragment origin int offset Shift int shift offset Shift 0 offset Shift 0 return new Region origin segment get Offset shift origin segment get Length shift  IRegion createImageStartRegion offsetShift offsetShift offsetShift getOffset getLength
private I Region create Image Region Fragment origin return new Region origin segment get Offset origin segment get Length  IRegion createImageRegion getOffset getLength
private I Region create Image End Region Fragment origin int length Reduction int reduction length Reduction 0 length Reduction 0 return new Region origin segment get Offset origin segment get Length reduction  IRegion createImageEndRegion lengthReduction lengthReduction lengthReduction getOffset getLength
private I Region create Origin Start Region Fragment origin int offset Shift int shift offset Shift 0 offset Shift 0 return new Region origin get Offset shift origin get Length shift  IRegion createOriginStartRegion offsetShift offsetShift offsetShift getOffset getLength
private I Region create Origin Region Fragment origin return new Region origin get Offset origin get Length  IRegion createOriginRegion getOffset getLength
private I Region create Origin End Region Fragment origin int length Reduction int reduction length Reduction 0 length Reduction 0 return new Region origin get Offset origin get Length reduction  IRegion createOriginEndRegion lengthReduction lengthReduction lengthReduction getOffset getLength
private I Region get Intersecting Region I Region left I Region right int offset Math max left get Offset right get Offset int exclusive End Offset Math min left get Offset left get Length right get Offset right get Length if exclusive End Offset offset return null return new Region offset exclusive End Offset offset  IRegion getIntersectingRegion IRegion IRegion getOffset getOffset exclusiveEndOffset getOffset getLength getOffset getLength exclusiveEndOffset exclusiveEndOffset
public I Region get Coverage Position fragments get Fragments if fragments null fragments length 0 Position first fragments 0 Position last fragments fragments length 1 return new Region first offset last offset last length first offset return new Region 0 0  IRegion getCoverage getFragments
public int to Origin Offset int image Offset throws Bad Location Exception Segment segment find Segment image Offset int relative image Offset segment offset return segment fragment offset relative  toOriginOffset imageOffset BadLocationException findSegment imageOffset imageOffset
public I Region to Origin Region I Region image Region throws Bad Location Exception int image Offset image Region get Offset int image Length image Region get Length if image Length 0 if image Offset 0 Position fragments get Fragments if fragments length 0 fragments length 1 fragments 0 get Offset 0 fragments 0 get Length 0 return new Region 0 f Master Document get Length return new Region to Origin Offset image Offset 0 int origin Offset to Origin Offset image Offset int inclusive Image End Offset image Offset image Length 1 int inclusive Origin End Offset to Origin Offset inclusive Image End Offset return new Region origin Offset inclusive Origin End Offset 1 origin Offset  IRegion toOriginRegion IRegion imageRegion BadLocationException imageOffset imageRegion getOffset imageLength imageRegion getLength imageLength imageOffset getFragments getOffset getLength fMasterDocument getLength toOriginOffset imageOffset originOffset toOriginOffset imageOffset inclusiveImageEndOffset imageOffset imageLength inclusiveOriginEndOffset toOriginOffset inclusiveImageEndOffset originOffset inclusiveOriginEndOffset originOffset
public I Region to Origin Lines int image Line throws Bad Location Exception I Region image Region f Slave Document get Line Information image Line I Region origin Region to Origin Region image Region int origin Start Line f Master Document get Line Of Offset origin Region get Offset if origin Region get Length 0 return new Region origin Start Line 1 int inclusive Origin End Offset origin Region get Offset origin Region get Length 1 int origin End Line f Master Document get Line Of Offset inclusive Origin End Offset return new Region origin Start Line origin End Line 1 origin Start Line  IRegion toOriginLines imageLine BadLocationException IRegion imageRegion fSlaveDocument getLineInformation imageLine IRegion originRegion toOriginRegion imageRegion originStartLine fMasterDocument getLineOfOffset originRegion getOffset originRegion getLength originStartLine inclusiveOriginEndOffset originRegion getOffset originRegion getLength originEndLine fMasterDocument getLineOfOffset inclusiveOriginEndOffset originStartLine originEndLine originStartLine
see org eclipse jface text I Document Information Mapping to Origin Line int public int to Origin Line int image Line throws Bad Location Exception I Region lines to Origin Lines image Line return lines get Length 1 1 lines get Offset  IDocumentInformationMapping toOriginLine toOriginLine imageLine BadLocationException IRegion toOriginLines imageLine getLength getOffset
public int to Image Offset int origin Offset throws Bad Location Exception Fragment fragment find Fragment origin Offset if fragment null int relative origin Offset fragment offset return fragment segment offset relative return 1  toImageOffset originOffset BadLocationException findFragment originOffset originOffset
see org eclipse jface text I Document Information Mapping Extension to Exact Image Region org eclipse jface text I Region public I Region to Exact Image Region I Region origin Region throws Bad Location Exception return to Image Region origin Region true  IDocumentInformationMappingExtension toExactImageRegion IRegion IRegion toExactImageRegion IRegion originRegion BadLocationException toImageRegion originRegion
see org eclipse jface text I Document Information Mapping to Image Region org eclipse jface text I Region public I Region to Image Region I Region origin Region throws Bad Location Exception return to Image Region origin Region false  IDocumentInformationMapping toImageRegion IRegion IRegion toImageRegion IRegion originRegion BadLocationException toImageRegion originRegion
public int to Image Line int origin Line throws Bad Location Exception I Region origin Region f Master Document get Line Information origin Line I Region image Region to Image Region origin Region if image Region null int image Offset to Image Offset origin Region get Offset if image Offset 1 image Region new Region image Offset 0 else return 1 int start Line f Slave Document get Line Of Offset image Region get Offset if image Region get Length 0 return start Line int end Line f Slave Document get Line Of Offset image Region get Offset image Region get Length if end Line start Line throw new Illegal State Exception return start Line  toImageLine originLine BadLocationException IRegion originRegion fMasterDocument getLineInformation originLine IRegion imageRegion toImageRegion originRegion imageRegion imageOffset toImageOffset originRegion getOffset imageOffset imageRegion imageOffset startLine fSlaveDocument getLineOfOffset imageRegion getOffset imageRegion getLength startLine endLine fSlaveDocument getLineOfOffset imageRegion getOffset imageRegion getLength endLine startLine IllegalStateException startLine
public int to Closest Image Line int origin Line throws Bad Location Exception try int image Line to Image Line origin Line if image Line 1 return image Line Position fragments get Fragments if fragments length 0 return 1 I Region origin Line Region f Master Document get Line Information origin Line int index f Master Document compute Index In Category f Fragments Category origin Line Region get Offset if 0 index index fragments length Fragment left Fragment fragments index 1 int left Distance origin Line Region get Offset left get Offset left get Length Fragment right Fragment fragments index int right Distance right get Offset origin Line Region get Offset origin Line Region get Length if left Distance right Distance origin Line f Master Document get Line Of Offset left get Offset Math max left get Length 1 0 else origin Line f Master Document get Line Of Offset right get Offset else if index 0 Fragment right Fragment fragments index origin Line f Master Document get Line Of Offset right get Offset else if index fragments length Fragment left Fragment fragments index 1 origin Line f Master Document get Line Of Offset left get Offset left get Length return to Image Line origin Line catch Bad Position Category Exception x return 1  toClosestImageLine originLine BadLocationException imageLine toImageLine originLine imageLine imageLine getFragments IRegion originLineRegion fMasterDocument getLineInformation originLine fMasterDocument computeIndexInCategory fFragmentsCategory originLineRegion getOffset leftDistance originLineRegion getOffset getOffset getLength rightDistance getOffset originLineRegion getOffset originLineRegion getLength leftDistance rightDistance originLine fMasterDocument getLineOfOffset getOffset getLength originLine fMasterDocument getLineOfOffset getOffset originLine fMasterDocument getLineOfOffset getOffset originLine fMasterDocument getLineOfOffset getOffset getLength toImageLine originLine BadPositionCategoryException
public I Region to Exact Origin Regions I Region image Region throws Bad Location Exception if image Region get Length 0 return new I Region new Region to Origin Offset image Region get Offset 0 int end Offset image Region get Offset image Region get Length Position segments get Segments int first Index find Segment Index image Region get Offset int last Index find Segment Index end Offset 1 int result Length last Index first Index 1 I Region result new I Region result Length first result 0 create Origin Start Region Segment segments first Index image Region get Offset segments first Index get Offset middles for int i 1 i result Length 1 i result i create Origin Region Segment segments first Index i last Segment last Segment segments last Index int segment End Offset last get Offset last get Length I Region last Region create Origin End Region last segment End Offset end Offset if result Length 1 first last result result Length 1 last Region else merge first and last I Region intersection get Intersecting Region result 0 last Region if intersection null result new I Region 0 else result 0 intersection return result  IRegion toExactOriginRegions IRegion imageRegion BadLocationException imageRegion getLength IRegion toOriginOffset imageRegion getOffset endOffset imageRegion getOffset imageRegion getLength getSegments firstIndex findSegmentIndex imageRegion getOffset lastIndex findSegmentIndex endOffset resultLength lastIndex firstIndex IRegion IRegion resultLength createOriginStartRegion firstIndex imageRegion getOffset firstIndex getOffset resultLength createOriginRegion firstIndex lastIndex segmentEndOffset getOffset getLength IRegion lastRegion createOriginEndRegion segmentEndOffset endOffset resultLength resultLength lastRegion IRegion getIntersectingRegion lastRegion IRegion
public int get Image Length Position segments get Segments int length 0 for int i 0 i segments length i length segments i length return length  getImageLength getSegments
public I Region to Exact Image Regions I Region origin Region throws Bad Location Exception if origin Region get Length 0 int image Offset to Image Offset origin Region get Offset return image Offset 1 new I Region new Region image Offset 0 null int end Offset origin Region get Offset origin Region get Length Position fragments get Fragments int first Index find Fragment Index origin Region get Offset RIGHT int last Index find Fragment Index end Offset 1 LEFT if first Index 1 last Index 1 first Index last Index return null int result Length last Index first Index 1 I Region result new I Region result Length first result 0 create Image Start Region Fragment fragments first Index origin Region get Offset fragments first Index get Offset middles for int i 1 i result Length 1 i result i create Image Region Fragment fragments first Index i last Fragment last Fragment fragments last Index int fragment End Offset last get Offset last get Length I Region last Region create Image End Region last fragment End Offset end Offset if result Length 1 first last result result Length 1 last Region else merge first and last I Region intersection get Intersecting Region result 0 last Region if intersection null return null result 0 intersection return result  IRegion toExactImageRegions IRegion originRegion BadLocationException originRegion getLength imageOffset toImageOffset originRegion getOffset imageOffset IRegion imageOffset endOffset originRegion getOffset originRegion getLength getFragments firstIndex findFragmentIndex originRegion getOffset lastIndex findFragmentIndex endOffset firstIndex lastIndex firstIndex lastIndex resultLength lastIndex firstIndex IRegion IRegion resultLength createImageStartRegion firstIndex originRegion getOffset firstIndex getOffset resultLength createImageRegion firstIndex lastIndex fragmentEndOffset getOffset getLength IRegion lastRegion createImageEndRegion fragmentEndOffset endOffset resultLength resultLength lastRegion IRegion getIntersectingRegion lastRegion
public I Region get Exact Coverage I Region origin Region throws Bad Location Exception int origin Offset origin Region get Offset int origin Length origin Region get Length if origin Length 0 int image Offset to Image Offset origin Offset return image Offset 1 new I Region new Region origin Offset 0 null int end Offset origin Offset origin Length Position fragments get Fragments int first Index find Fragment Index origin Offset RIGHT int last Index find Fragment Index end Offset 1 LEFT if first Index 1 last Index 1 first Index last Index return null int result Length last Index first Index 1 I Region result new I Region result Length first result 0 create Origin Start Region Fragment fragments first Index origin Offset fragments first Index get Offset middles for int i 1 i result Length 1 i result i create Origin Region Fragment fragments first Index i last Fragment last Fragment fragments last Index int fragment End Offset last get Offset last get Length I Region last Region create Origin End Region last fragment End Offset end Offset if result Length 1 first last result result Length 1 last Region else merge first and last I Region intersection get Intersecting Region result 0 last Region if intersection null return null result 0 intersection return result  IRegion getExactCoverage IRegion originRegion BadLocationException originOffset originRegion getOffset originLength originRegion getLength originLength imageOffset toImageOffset originOffset imageOffset IRegion originOffset endOffset originOffset originLength getFragments firstIndex findFragmentIndex originOffset lastIndex findFragmentIndex endOffset firstIndex lastIndex firstIndex lastIndex resultLength lastIndex firstIndex IRegion IRegion resultLength createOriginStartRegion firstIndex originOffset firstIndex getOffset resultLength createOriginRegion firstIndex lastIndex fragmentEndOffset getOffset getLength IRegion lastRegion createOriginEndRegion fragmentEndOffset endOffset resultLength resultLength lastRegion IRegion getIntersectingRegion lastRegion

see org eclipse jface text I Region get Length public int get Length return f Length  IRegion getLength getLength fLength
see org eclipse jface text I Region get Offset public int get Offset return f Offset  IRegion getOffset getOffset fOffset
Updates this region param offset the new offset param length the new length public void update int offset int length f Offset offset f Length length  fOffset fLength
Creates a new projection text store for the given master document and the given document information mapping param master Document the master document param mapping the document information mapping public Projection Text Store I Document master Document I Minimal Mapping mapping f Master Document master Document f Mapping mapping  masterDocument ProjectionTextStore IDocument masterDocument IMinimalMapping fMasterDocument masterDocument fMapping
private void internal Error throw new Illegal State Exception  internalError IllegalStateException
public void set String contents I Region master Region f Mapping get Coverage if master Region null internal Error try f Master Document replace master Region get Offset master Region get Length contents catch Bad Location Exception e internal Error  IRegion masterRegion fMapping getCoverage masterRegion internalError fMasterDocument masterRegion getOffset masterRegion getLength BadLocationException internalError
public void replace int offset int length String text f Reusable Region update offset length try I Region master Region f Mapping to Origin Region f Reusable Region f Master Document replace master Region get Offset master Region get Length text catch Bad Location Exception e internal Error  fReusableRegion IRegion masterRegion fMapping toOriginRegion fReusableRegion fMasterDocument masterRegion getOffset masterRegion getLength BadLocationException internalError
see org eclipse jface text I Text Store get Length public int get Length return f Mapping get Image Length  ITextStore getLength getLength fMapping getImageLength
public char get int offset try int origin Offset f Mapping to Origin Offset offset return f Master Document get Char origin Offset catch Bad Location Exception e internal Error unreachable return char 0  originOffset fMapping toOriginOffset fMasterDocument getChar originOffset BadLocationException internalError
public String get int offset int length try I Region fragments f Mapping to Exact Origin Regions new Region offset length String Buffer buffer new String Buffer for int i 0 i fragments length i I Region fragment fragments i buffer append f Master Document get fragment get Offset fragment get Length return buffer to String catch Bad Location Exception e internal Error unreachable return null  IRegion fMapping toExactOriginRegions StringBuffer StringBuffer IRegion fMasterDocument getOffset getLength toString BadLocationException internalError

Creates a new segment covering the given range param offset the offset of the segment param length the length of the segment public Segment int offset int length super offset length 
Sets the stretching flag public void mark For Stretch is Marked For Stretch true  markForStretch isMarkedForStretch
Returns code true code if the stretching flag is set code false code otherwise return code true code if the stretching flag is set code false code otherwise public boolean is Marked For Stretch return is Marked For Stretch  isMarkedForStretch isMarkedForStretch
Sets the shifting flag public void mark For Shift is Marked For Shift true  markForShift isMarkedForShift
Returns code true code if the shifting flag is set code false code otherwise return code true code if the shifting flag is set code false code otherwise public boolean is Marked For Shift return is Marked For Shift  isMarkedForShift isMarkedForShift
Clears the shifting and the streching flag public void clear Mark is Marked For Stretch false is Marked For Shift false  clearMark isMarkedForStretch isMarkedForShift

Creates the segment updater for the given category param segment Category the position category used for managing the segments of a projection document protected Segment Updater String segment Category super segment Category  segmentCategory SegmentUpdater segmentCategory segmentCategory
public void update Document Event event Assert is True event instanceof Projection Document Event f Is Projection Change Projection Document Event event get Change Type Projection Document Event PROJECTION CHANGE try Position category event get Document get Positions get Category f Offset event get Offset f Length event get Length f Replace Length event get Text null 0 event get Text length f Document event get Document for int i 0 i category length i f Position category i Assert is True f Position instanceof Segment if i category length 1 f Next Segment Segment category i 1 else f Next Segment null f Original Position offset f Position offset f Original Position length f Position length if not Deleted adapt To Replace catch Bad Position Category Exception x do nothing  DocumentEvent isTrue ProjectionDocumentEvent fIsProjectionChange ProjectionDocumentEvent getChangeType ProjectionDocumentEvent PROJECTION_CHANGE getDocument getPositions getCategory fOffset getOffset fLength getLength fReplaceLength getText getText fDocument getDocument fPosition isTrue fPosition fNextSegment fNextSegment fOriginalPosition fPosition fOriginalPosition fPosition notDeleted adaptToReplace BadPositionCategoryException
protected void adapt To Insert Segment segment Segment f Position int my Start segment offset int my End segment offset segment length segment is Marked For Stretch f Next Segment null is Affecting Replace 0 1 my End Math max my Start my End int yours Start f Offset try if my End yours Start return if segment is Marked For Stretch Assert is True f Is Projection Change segment is Marked For Shift false if f Next Segment null f Next Segment is Marked For Shift true f Next Segment is Marked For Stretch false if f Length 0 if my Start yours Start segment is Marked For Shift 0 1 f Position length f Replace Length else f Position offset f Replace Length else if my Start yours Start f Original Position offset yours Start f Position length f Replace Length else f Position offset f Replace Length finally segment clear Mark  adaptToInsert fPosition myStart myEnd isMarkedForStretch fNextSegment isAffectingReplace myEnd myStart myEnd yoursStart fOffset myEnd yoursStart isMarkedForStretch isTrue fIsProjectionChange isMarkedForShift fNextSegment fNextSegment isMarkedForShift fNextSegment isMarkedForStretch fLength myStart yoursStart isMarkedForShift fPosition fReplaceLength fPosition fReplaceLength myStart yoursStart fOriginalPosition yoursStart fPosition fReplaceLength fPosition fReplaceLength clearMark

Creates a new font field editor with the given parameters param name the editor s name param label Text the text shown as editor description param parent the editor s parent widget param default Font Label the label shown in the editor value field when the default value should be taken public Propagating Font Field Editor String name String label Text Composite parent String default Font Label super name label Text parent f Parent parent f Default Font Label default Font Label null default Font Label NON NLS 1  labelText defaultFontLabel PropagatingFontFieldEditor labelText defaultFontLabel labelText fParent fDefaultFontLabel defaultFontLabel defaultFontLabel
protected void do Load if get Preference Store is Default get Preference Name load Default super do Load check For Default  doLoad getPreferenceStore isDefault getPreferenceName loadDefault doLoad checkForDefault
see Font Field Editor do Load Default protected void do Load Default super do Load Default check For Default  FontFieldEditor doLoadDefault doLoadDefault doLoadDefault checkForDefault
Checks whether this editor presents the default value inherited from the workbench rather than its own font private void check For Default if presents Default Value Control c get Value Control f Parent if c instanceof Label Label c set Text f Default Font Label  checkForDefault presentsDefaultValue getValueControl fParent setText fDefaultFontLabel
Propagates the font set in the source store to the target store using the given keys param source the store from which to read the text font param source Key the key under which the font can be found param target the store to which to propagate the font param target Key the key under which to store the font private static void propagate Font I Preference Store source String source Key I Preference Store target String target Key Font Data fd Preference Converter get Font Data source source Key if fd null boolean is Default target is Default target Key save old state Preference Converter set Default target target Key fd if is Default restore old state target set To Default target Key  sourceKey targetKey propagateFont IPreferenceStore sourceKey IPreferenceStore targetKey FontData PreferenceConverter getFontData sourceKey isDefault isDefault targetKey PreferenceConverter setDefault targetKey isDefault setToDefault targetKey
public static void start Propagate final I Preference Store source final String source Key final I Preference Store target final String target Key source add Property Change Listener new I Property Change Listener public void property Change Property Change Event event if source Key equals event get Property propagate Font source source Key target target Key  startPropagate IPreferenceStore sourceKey IPreferenceStore targetKey addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent sourceKey getProperty propagateFont sourceKey targetKey
Starts the propagation of the font preference stored in the source preference store under the source key to the target preference store using the target preference key param source the source preference store param source Key the key to be used in the source preference store param target the target preference store param target Key the key to be used in the target preference store public static void start Propagate final I Preference Store source final String source Key final I Preference Store target final String target Key source add Property Change Listener new I Property Change Listener public void property Change Property Change Event event if source Key equals event get Property propagate Font source source Key target target Key propagate Font source source Key target target Key  sourceKey targetKey startPropagate IPreferenceStore sourceKey IPreferenceStore targetKey addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent sourceKey getProperty propagateFont sourceKey targetKey propagateFont sourceKey targetKey

Creates a new background thread The thread runs with minimal priority param name the thread s name public Background Thread String name super name set Priority Thread MIN PRIORITY set Daemon true  BackgroundThread setPriority MIN_PRIORITY setDaemon
Returns whether a reconciling strategy is active right now return code true code if a activity is active public boolean is Active return f Is Active  isActive fIsActive
Returns whether some changes need to be processed return code true code if changes wait to be processed since 3 0 public synchronized boolean is Dirty return f Is Dirty  isDirty fIsDirty
Cancels the background thread public void cancel f Canceled true I Progress Monitor pm f Progress Monitor if pm null pm set Canceled true synchronized f Dirty Region Queue f Dirty Region Queue notify All  fCanceled IProgressMonitor fProgressMonitor setCanceled fDirtyRegionQueue fDirtyRegionQueue notifyAll
Suspends the caller of this method until this background thread has emptied the dirty region queue public void suspend Caller While Dirty boolean is Dirty do synchronized f Dirty Region Queue is Dirty f Dirty Region Queue get Size 0 if is Dirty try f Dirty Region Queue wait catch Interrupted Exception x while is Dirty  suspendCallerWhileDirty isDirty fDirtyRegionQueue isDirty fDirtyRegionQueue getSize isDirty fDirtyRegionQueue InterruptedException isDirty
Reset the background thread as the text viewer has been changed public void reset if f Delay 0 synchronized this f Is Dirty true f Reset true else synchronized this f Is Dirty true synchronized f Dirty Region Queue f Dirty Region Queue notify All reconciler Reset  fDelay fIsDirty fReset fIsDirty fDirtyRegionQueue fDirtyRegionQueue notifyAll reconcilerReset
The background activity Waits until there is something in the queue managing the changes that have been applied to the text viewer Removes the first change from the queue and process it p Calls link Abstract Reconciler initial Process on entrance p public void run synchronized f Dirty Region Queue try f Dirty Region Queue wait f Delay catch Interrupted Exception x initial Process while f Canceled synchronized f Dirty Region Queue try f Dirty Region Queue wait f Delay catch Interrupted Exception x if f Canceled break if is Dirty continue synchronized this if f Reset f Reset false continue Dirty Region r null synchronized f Dirty Region Queue r f Dirty Region Queue remove Next Dirty Region f Is Active true if f Progress Monitor null f Progress Monitor set Canceled false process r synchronized f Dirty Region Queue if 0 f Dirty Region Queue get Size synchronized this f Is Dirty f Progress Monitor null f Progress Monitor is Canceled false f Dirty Region Queue notify All f Is Active false  AbstractReconciler initialProcess fDirtyRegionQueue fDirtyRegionQueue fDelay InterruptedException initialProcess fCanceled fDirtyRegionQueue fDirtyRegionQueue fDelay InterruptedException fCanceled isDirty fReset fReset DirtyRegion fDirtyRegionQueue fDirtyRegionQueue removeNextDirtyRegion fIsActive fProgressMonitor fProgressMonitor setCanceled fDirtyRegionQueue fDirtyRegionQueue getSize fIsDirty fProgressMonitor fProgressMonitor isCanceled fDirtyRegionQueue notifyAll fIsActive
see I Document Listener document About To Be Changed Document Event public void document About To Be Changed Document Event e  IDocumentListener documentAboutToBeChanged DocumentEvent documentAboutToBeChanged DocumentEvent
public void document Changed Document Event e if f Thread is Dirty f Thread is Alive about To Be Reconciled if f Progress Monitor null f Thread is Active f Progress Monitor set Canceled true if f Is Incremental Reconciler create Dirty Region e f Thread reset  documentChanged DocumentEvent fThread isDirty fThread isAlive aboutToBeReconciled fProgressMonitor fThread isActive fProgressMonitor setCanceled fIsIncrementalReconciler createDirtyRegion fThread
public void input Document About To Be Changed I Document old Input I Document new Input if old Input f Document if f Document null f Document remove Document Listener this if f Is Incremental Reconciler f Dirty Region Queue purge Queue if f Document null f Document get Length 0 Document Event e new Document Event f Document 0 f Document get Length null create Dirty Region e f Thread reset f Thread suspend Caller While Dirty f Document null  inputDocumentAboutToBeChanged IDocument oldInput IDocument newInput oldInput fDocument fDocument fDocument removeDocumentListener fIsIncrementalReconciler fDirtyRegionQueue purgeQueue fDocument fDocument getLength DocumentEvent DocumentEvent fDocument fDocument getLength createDirtyRegion fThread fThread suspendCallerWhileDirty fDocument
public void input Document Changed I Document old Input I Document new Input f Document new Input if f Document null return reconciler Document Changed f Document f Document add Document Listener this if f Thread is Dirty about To Be Reconciled if f Is Incremental Reconciler Document Event e new Document Event f Document 0 0 f Document get create Dirty Region e start Reconciling  inputDocumentChanged IDocument oldInput IDocument newInput fDocument newInput fDocument reconcilerDocumentChanged fDocument fDocument addDocumentListener fThread isDirty aboutToBeReconciled fIsIncrementalReconciler DocumentEvent DocumentEvent fDocument fDocument createDirtyRegion startReconciling
Processes a dirty region If the dirty region is code null code the whole document is consider being dirty The dirty region is partitioned by the document and each partition is handed over to a reconciling strategy registered for the partition s content type param dirty Region the dirty region to be processed  dirtyRegion
Hook called when the document whose contents should be reconciled has been changed i e the input document of the text viewer this reconciler is installed on Usually subclasses use this hook to inform all their reconciling strategies about the change param new Document the new reconciler document  newDocument
Creates a new reconciler without configuring it protected Abstract Reconciler super  AbstractReconciler
Tells the reconciler how long it should wait for further text changes before activating the appropriate reconciling strategies param delay the duration in milliseconds of a change collection period public void set Delay int delay f Delay delay  setDelay fDelay
Tells the reconciler whether any of the available reconciling strategies is interested in getting detailed dirty region information or just in the fact the the document has been changed In the second case the reconciling can not incrementally be pursued param is Incremental indicates whether this reconciler will be configured with incremental reconciling strategies see Dirty Region see I Reconciling Strategy public void set Is Incremental Reconciler boolean is Incremental f Is Incremental Reconciler is Incremental  isIncremental DirtyRegion IReconcilingStrategy setIsIncrementalReconciler isIncremental fIsIncrementalReconciler isIncremental
Sets the progress monitor of this reconciler param monitor the monitor to be used public void set Progress Monitor I Progress Monitor monitor f Progress Monitor monitor  setProgressMonitor IProgressMonitor fProgressMonitor
Returns whether any of the reconciling strategies is interested in detailed dirty region information return whether this reconciler is incremental see I Reconciling Strategy protected boolean is Incremental Reconciler return f Is Incremental Reconciler  IReconcilingStrategy isIncrementalReconciler fIsIncrementalReconciler
Returns the input document of the text viewer this reconciler is installed on return the reconciler document protected I Document get Document return f Document  IDocument getDocument fDocument
Returns the text viewer this reconciler is installed on return the text viewer this reconciler is installed on protected I Text Viewer get Text Viewer return f Viewer  ITextViewer getTextViewer fViewer
Returns the progress monitor of this reconciler return the progress monitor of this reconciler protected I Progress Monitor get Progress Monitor return f Progress Monitor  IProgressMonitor getProgressMonitor fProgressMonitor
public void install I Text Viewer text Viewer Assert is Not Null text Viewer synchronized this if f Thread null return f Thread new Background Thread get Class get Name f Viewer text Viewer f Listener new Listener f Viewer add Text Input Listener f Listener f Dirty Region Queue new Dirty Region Queue  ITextViewer textViewer isNotNull textViewer fThread fThread BackgroundThread getClass getName fViewer textViewer fListener fViewer addTextInputListener fListener fDirtyRegionQueue DirtyRegionQueue
public void uninstall if f Listener null f Viewer remove Text Input Listener f Listener if f Document null f Document remove Document Listener f Listener f Listener null synchronized this http dev eclipse org bugs show bug cgi id 19135 Background Thread bt f Thread f Thread null bt cancel  fListener fViewer removeTextInputListener fListener fDocument fDocument removeDocumentListener fListener fListener show_bug BackgroundThread fThread fThread
Creates a dirty region for a document event and adds it to the queue param e the document event for which to create a dirty region private void create Dirty Region Document Event e if e get Length 0 e get Text null Insert f Dirty Region Queue add Dirty Region new Dirty Region e get Offset e get Text length Dirty Region INSERT e get Text else if e get Text null e get Text length 0 Remove f Dirty Region Queue add Dirty Region new Dirty Region e get Offset e get Length Dirty Region REMOVE null else Replace Remove Insert f Dirty Region Queue add Dirty Region new Dirty Region e get Offset e get Length Dirty Region REMOVE null f Dirty Region Queue add Dirty Region new Dirty Region e get Offset e get Text length Dirty Region INSERT e get Text  createDirtyRegion DocumentEvent getLength getText fDirtyRegionQueue addDirtyRegion DirtyRegion getOffset getText DirtyRegion getText getText getText fDirtyRegionQueue addDirtyRegion DirtyRegion getOffset getLength DirtyRegion fDirtyRegionQueue addDirtyRegion DirtyRegion getOffset getLength DirtyRegion fDirtyRegionQueue addDirtyRegion DirtyRegion getOffset getText DirtyRegion getText
Hook for subclasses which want to perform some action as soon as reconciliation is needed p Default implementation is to do nothing p since 3 0 protected void about To Be Reconciled  aboutToBeReconciled
This method is called on startup of the background activity It is called only once during the life time of the reconciler Clients may reimplement this method protected void initial Process  initialProcess
Forces the reconciler to reconcile the structure of the whole document Clients may extend this method protected void force Reconciling if f Document null if f Is Incremental Reconciler Document Event e new Document Event f Document 0 f Document get Length f Document get create Dirty Region e start Reconciling  forceReconciling fDocument fIsIncrementalReconciler DocumentEvent DocumentEvent fDocument fDocument getLength fDocument createDirtyRegion startReconciling
Starts the reconciler to reconcile the queued dirty regions Clients may extend this method protected synchronized void start Reconciling if f Thread null return if f Thread is Alive try f Thread start catch Illegal Thread State Exception e see https bugs eclipse org bugs show bug cgi id 40549 This is the only instance where the thread is started since we checked that it is not alive it must be dead already due to a run time exception or error Exit else f Thread reset  startReconciling fThread fThread isAlive fThread IllegalThreadStateException show_bug fThread
Hook that is called after the reconciler thread has been reset protected void reconciler Reset  reconcilerReset

Creates an intermediate reconcile step which adds the given step to the pipe param step the reconcile step public Abstract Reconcile Step I Reconcile Step step Assert is Not Null step f Next Step step f Next Step set Previous Step this  AbstractReconcileStep IReconcileStep isNotNull fNextStep fNextStep setPreviousStep
Creates the last reconcile step of the pipe public Abstract Reconcile Step  AbstractReconcileStep
public boolean is Last Step return f Next Step null  isLastStep fNextStep
public boolean is First Step return f Previous Step null  isFirstStep fPreviousStep
public void set Progress Monitor I Progress Monitor monitor f Progress Monitor monitor if is Last Step f Next Step set Progress Monitor monitor  setProgressMonitor IProgressMonitor fProgressMonitor isLastStep fNextStep setProgressMonitor
see org eclipse jface text reconciler I Reconcile Step get Progress Monitor public I Progress Monitor get Progress Monitor return f Progress Monitor  IReconcileStep getProgressMonitor IProgressMonitor getProgressMonitor fProgressMonitor
public final I Reconcile Result reconcile I Region partition I Reconcile Result result reconcile Model null partition if is Last Step f Next Step set Input Model get Model I Reconcile Result next Result f Next Step reconcile partition return merge result convert To Input Model next Result else return result  IReconcileResult IRegion IReconcileResult reconcileModel isLastStep fNextStep setInputModel getModel IReconcileResult nextResult fNextStep convertToInputModel nextResult
public final I Reconcile Result reconcile Dirty Region dirty Region I Region sub Region I Reconcile Result result reconcile Model dirty Region sub Region if is Last Step f Next Step set Input Model get Model I Reconcile Result next Result f Next Step reconcile dirty Region sub Region return merge result convert To Input Model next Result else return result  IReconcileResult DirtyRegion dirtyRegion IRegion subRegion IReconcileResult reconcileModel dirtyRegion subRegion isLastStep fNextStep setInputModel getModel IReconcileResult nextResult fNextStep dirtyRegion subRegion convertToInputModel nextResult
Reconciles the model of this reconcile step The result is based on the input model param dirty Region the document region which has been changed param sub Region the sub region in the dirty region which should be reconciled return an array with reconcile results  dirtyRegion subRegion
Adapts the given an array with reconcile results to this step s input model and returns it param input Results an array with reconcile results return an array with the reconcile results adapted to the input model protected I Reconcile Result convert To Input Model I Reconcile Result input Results return input Results  inputResults IReconcileResult convertToInputModel IReconcileResult inputResults inputResults
Merges the two reconcile result arrays param results1 an array with reconcile results param results2 an array with reconcile results return an array with the merged reconcile results private I Reconcile Result merge I Reconcile Result results1 I Reconcile Result results2 if results1 null return results2 if results2 null return results1 XXX not yet performance optimized Collection collection new Array List Arrays as List results1 collection add All Arrays as List results2 return I Reconcile Result collection to Array new I Reconcile Result collection size  IReconcileResult IReconcileResult IReconcileResult ArrayList asList addAll asList IReconcileResult toArray IReconcileResult
see I Progress Monitor is Canceled protected final boolean is Canceled return f Progress Monitor null f Progress Monitor is Canceled  IProgressMonitor isCanceled isCanceled fProgressMonitor fProgressMonitor isCanceled
public void set Previous Step I Reconcile Step step Assert is Not Null step Assert is True f Previous Step null f Previous Step step  setPreviousStep IReconcileStep isNotNull isTrue fPreviousStep fPreviousStep
public void set Input Model I Reconcilable Model input Model f Input Model input Model if is Last Step f Next Step set Input Model get Model  setInputModel IReconcilableModel inputModel fInputModel inputModel isLastStep fNextStep setInputModel getModel
Returns the reconcilable input model return the reconcilable input model public I Reconcilable Model get Input Model return f Input Model  IReconcilableModel getInputModel fInputModel
Returns the reconcilable model return the reconcilable model 

Creates a new dirty region param offset the offset within the document where the change occurred param length the length of the text within the document that changed param type the type of change that this region represents link INSERT link REMOVE param text the substitution text public Dirty Region int offset int length String type String text f Offset offset f Length length f Type type f Text text  DirtyRegion fOffset fLength fType fText
see I Typed Region get Offset public int get Offset return f Offset  ITypedRegion getOffset getOffset fOffset
see I Typed Region get Length public int get Length return f Length  ITypedRegion getLength getLength fLength
see I Typed Region get Type public String get Type return f Type  ITypedRegion getType getType fType
Returns the text that changed as part of the region change return the changed text public String get Text return f Text  getText fText
Modify the receiver so that it encompasses the region specified by the dirty region param dr the dirty region with which to merge void merge With Dirty Region dr int start Math min f Offset dr f Offset int end Math max f Offset f Length dr f Offset dr f Length f Offset start f Length end start f Text dr f Text null f Text f Text null dr f Text f Text dr f Text  mergeWith DirtyRegion fOffset fOffset fOffset fLength fOffset fLength fOffset fLength fText fText fText fText fText fText fText

Creates a new empty dirty region public Dirty Region Queue super  DirtyRegionQueue
Adds a dirty region to the end of the dirty region queue param dr the dirty region to add public void add Dirty Region Dirty Region dr If the dirty region being added is directly after the last dirty region on the queue then merge the two dirty regions together Dirty Region lastDR get Last Dirty Region boolean was Merged false if lastDR null if lastDR get Type dr get Type if lastDR get Type Dirty Region INSERT if lastDR get Offset lastDR get Length dr get Offset lastDR merge With dr was Merged true else if lastDR get Type Dirty Region REMOVE if dr get Offset dr get Length lastDR get Offset lastDR merge With dr was Merged true if was Merged Don t merge just add the new one onto the queue f Dirty Regions add dr  addDirtyRegion DirtyRegion DirtyRegion getLastDirtyRegion wasMerged getType getType getType DirtyRegion getOffset getLength getOffset mergeWith wasMerged getType DirtyRegion getOffset getLength getOffset mergeWith wasMerged wasMerged fDirtyRegions
Returns the last dirty region that was added to the queue return the last Dirty Region on the queue private Dirty Region get Last Dirty Region int size f Dirty Regions size return size 0 null Dirty Region f Dirty Regions get size 1  DirtyRegion DirtyRegion getLastDirtyRegion fDirtyRegions DirtyRegion fDirtyRegions
Returns the number of regions in the queue return the dirty region queue size public int get Size return f Dirty Regions size  getSize fDirtyRegions
Throws away all entries in the queue public void purge Queue f Dirty Regions clear  purgeQueue fDirtyRegions
Removes and returns the first dirty region in the queue return the next dirty region on the queue public Dirty Region remove Next Dirty Region if f Dirty Regions size 0 return null Dirty Region dr Dirty Region f Dirty Regions get 0 f Dirty Regions remove 0 return dr  DirtyRegion removeNextDirtyRegion fDirtyRegions DirtyRegion DirtyRegion fDirtyRegions fDirtyRegions

Installs the reconciler on the given text viewer After this method has been finished the reconciler is operational i e it works without requesting further client actions until code uninstall code is called param text Viewer the viewer on which the reconciler is installed  textViewer
Removes the reconciler from the text viewer it has previously been installed on 
Returns the reconciling strategy registered with the reconciler for the specified content type param content Type the content type for which to determine the reconciling strategy return the reconciling strategy registered for the given content type or code null code if there is no such strategy  contentType

Returns the partitioning this reconciler is using return the partitioning this reconciler is using 

Returns whether this is the last reconcile step or not return code true code iff this is the last reconcile step 
Returns whether this is the first reconcile step or not return code true code iff this is the first reconcile step 
Sets the step which is in front of this step in the pipe p Note This method must be called at most once per reconcile step p param step the previous step throws Runtime Exception if called more than once  RuntimeException
Activates incremental reconciling of the specified dirty region As a dirty region might span multiple content types the segment of the dirty region which should be investigated is also provided to this reconciling strategy The given regions refer to the document passed into the most recent call of link I Reconciling Strategy set Document org eclipse jface text I Document param dirty Region the document region which has been changed param sub Region the sub region in the dirty region which should be reconciled return an array with reconcile results  IReconcilingStrategy setDocument IDocument dirtyRegion subRegion
Activates non incremental reconciling The reconciling strategy is just told that there are changes and that it should reconcile the given partition of the document most recently passed into link I Reconciling Strategy set Document org eclipse jface text I Document param partition the document partition to be reconciled return an array with reconcile results  IReconcilingStrategy setDocument IDocument
Sets the progress monitor for this reconcile step param monitor the progress monitor to be used 
Returns the progress monitor used to report progress return a progress monitor or code null code if no progress monitor is available 
Tells this reconcile step on which model it will work This method will be called before any other method and can be called multiple times The regions passed to the other methods always refer to the most recent model passed into this method param input Model the model on which this step will work  inputModel

Tells this reconciling strategy on which document it will work This method will be called before any other method and can be called multiple times The regions passed to the other methods always refer to the most recent document passed into this method param document the document on which this strategy will work 
Activates incremental reconciling of the specified dirty region As a dirty region might span multiple content types the segment of the dirty region which should be investigated is also provided to this reconciling strategy The given regions refer to the document passed into the most recent call of link set Document I Document param dirty Region the document region which has been changed param sub Region the sub region in the dirty region which should be reconciled  setDocument IDocument dirtyRegion subRegion
Activates non incremental reconciling The reconciling strategy is just told that there are changes and that it should reconcile the given partition of the document most recently passed into link set Document I Document param partition the document partition to be reconciled  setDocument IDocument

Tells this reconciling strategy with which progress monitor it will work This method will be called before any other method and can be called multiple times param monitor the progress monitor with which this strategy will work 
void set Progress Monitor I Progress Monitor monitor Called only once in the life time of this reconciling strategy void initial Reconcile  setProgressMonitor IProgressMonitor initialReconcile

Creates a new reconciler that uses the same reconciling strategy to reconcile its document independent of the type of the document s contents param strategy the reconciling strategy to be used param is Incremental the indication whether strategy is incremental or not public Mono Reconciler I Reconciling Strategy strategy boolean is Incremental super Assert is Not Null strategy f Strategy strategy set Is Incremental Reconciler is Incremental  isIncremental MonoReconciler IReconcilingStrategy isIncremental isNotNull fStrategy setIsIncrementalReconciler isIncremental
see I Reconciler get Reconciling Strategy String public I Reconciling Strategy get Reconciling Strategy String content Type Assert is Not Null content Type return f Strategy  IReconciler getReconcilingStrategy IReconcilingStrategy getReconcilingStrategy contentType isNotNull contentType fStrategy
protected void process Dirty Region dirty Region if dirty Region null f Strategy reconcile dirty Region dirty Region else I Document document get Document if document null f Strategy reconcile new Region 0 document get Length  DirtyRegion dirtyRegion dirtyRegion fStrategy dirtyRegion dirtyRegion IDocument getDocument fStrategy getLength
see Abstract Reconciler reconciler Document Changed I Document protected void reconciler Document Changed I Document document f Strategy set Document document  AbstractReconciler reconcilerDocumentChanged IDocument reconcilerDocumentChanged IDocument fStrategy setDocument
public void set Progress Monitor I Progress Monitor monitor super set Progress Monitor monitor if f Strategy instanceof I Reconciling Strategy Extension I Reconciling Strategy Extension extension I Reconciling Strategy Extension f Strategy extension set Progress Monitor monitor  setProgressMonitor IProgressMonitor setProgressMonitor fStrategy IReconcilingStrategyExtension IReconcilingStrategyExtension IReconcilingStrategyExtension fStrategy setProgressMonitor
protected void initial Process if f Strategy instanceof I Reconciling Strategy Extension I Reconciling Strategy Extension extension I Reconciling Strategy Extension f Strategy extension initial Reconcile  initialProcess fStrategy IReconcilingStrategyExtension IReconcilingStrategyExtension IReconcilingStrategyExtension fStrategy initialReconcile

Creates a new reconciler with the following configuration it is an incremental reconciler with a standard delay of 500 milli seconds There are no predefined reconciling strategies The partitioning it uses is the default partitioning link I Document Extension3 DEFAULT PARTITIONING public Reconciler super f Partitioning I Document Extension3 DEFAULT PARTITIONING  IDocumentExtension3 DEFAULT_PARTITIONING fPartitioning IDocumentExtension3 DEFAULT_PARTITIONING
Sets the document partitioning for this reconciler param partitioning the document partitioning for this reconciler since 3 0 public void set Document Partitioning String partitioning Assert is Not Null partitioning f Partitioning partitioning  setDocumentPartitioning isNotNull fPartitioning
since 3 0 public String get Document Partitioning return f Partitioning  getDocumentPartitioning fPartitioning
Registers a given reconciling strategy for a particular content type If there is already a strategy registered for this type the new strategy is registered instead of the old one param strategy the reconciling strategy to register or code null code to remove an existing one param content Type the content type under which to register public void set Reconciling Strategy I Reconciling Strategy strategy String content Type Assert is Not Null content Type if f Strategies null f Strategies new Hash Map if strategy null f Strategies remove content Type else f Strategies put content Type strategy if strategy instanceof I Reconciling Strategy Extension get Progress Monitor null I Reconciling Strategy Extension extension I Reconciling Strategy Extension strategy extension set Progress Monitor get Progress Monitor  contentType setReconcilingStrategy IReconcilingStrategy contentType isNotNull contentType fStrategies fStrategies HashMap fStrategies contentType fStrategies contentType IReconcilingStrategyExtension getProgressMonitor IReconcilingStrategyExtension IReconcilingStrategyExtension setProgressMonitor getProgressMonitor
public I Reconciling Strategy get Reconciling Strategy String content Type Assert is Not Null content Type if f Strategies null return null return I Reconciling Strategy f Strategies get content Type  IReconcilingStrategy getReconcilingStrategy contentType isNotNull contentType fStrategies IReconcilingStrategy fStrategies contentType
Processes a dirty region If the dirty region is code null code the whole document is consider being dirty The dirty region is partitioned by the document and each partition is handed over to a reconciling strategy registered for the partition s content type param dirty Region the dirty region to be processed see Abstract Reconciler process Dirty Region protected void process Dirty Region dirty Region I Region region dirty Region if region null region new Region 0 get Document get Length I Typed Region regions compute Partitioning region get Offset region get Length for int i 0 i regions length i I Typed Region r regions i I Reconciling Strategy s get Reconciling Strategy r get Type if s null continue if dirty Region null s reconcile dirty Region r else s reconcile r  dirtyRegion AbstractReconciler DirtyRegion DirtyRegion dirtyRegion IRegion dirtyRegion getDocument getLength ITypedRegion computePartitioning getOffset getLength ITypedRegion IReconcilingStrategy getReconcilingStrategy getType dirtyRegion dirtyRegion
protected void reconciler Document Changed I Document document if f Strategies null Iterator e f Strategies values iterator while e has Next I Reconciling Strategy strategy I Reconciling Strategy e next strategy set Document document  reconcilerDocumentChanged IDocument fStrategies fStrategies hasNext IReconcilingStrategy IReconcilingStrategy setDocument
public void set Progress Monitor I Progress Monitor monitor super set Progress Monitor monitor if f Strategies null Iterator e f Strategies values iterator while e has Next I Reconciling Strategy strategy I Reconciling Strategy e next if strategy instanceof I Reconciling Strategy Extension I Reconciling Strategy Extension extension I Reconciling Strategy Extension strategy extension set Progress Monitor monitor  setProgressMonitor IProgressMonitor setProgressMonitor fStrategies fStrategies hasNext IReconcilingStrategy IReconcilingStrategy IReconcilingStrategyExtension IReconcilingStrategyExtension IReconcilingStrategyExtension setProgressMonitor
protected void initial Process I Typed Region regions compute Partitioning 0 get Document get Length for int i 0 i regions length i I Typed Region r regions i I Reconciling Strategy s get Reconciling Strategy r get Type if s instanceof I Reconciling Strategy Extension I Reconciling Strategy Extension e I Reconciling Strategy Extension s e initial Reconcile  initialProcess ITypedRegion computePartitioning getDocument getLength ITypedRegion IReconcilingStrategy getReconcilingStrategy getType IReconcilingStrategyExtension IReconcilingStrategyExtension IReconcilingStrategyExtension initialReconcile
Computes and returns the partitioning for the given region of the input document of the reconciler s connected text viewer param offset the region offset param length the region length return the computed partitioning since 3 0 private I Typed Region compute Partitioning int offset int length I Typed Region regions null try regions Text Utilities compute Partitioning get Document get Document Partitioning offset length false catch Bad Location Exception x regions new Typed Region 0 return regions  ITypedRegion computePartitioning ITypedRegion TextUtilities computePartitioning getDocument getDocumentPartitioning BadLocationException TypedRegion

Create a new region param offset the offset of the region param length the length of the region public Region int offset int length f Offset offset f Length length  fOffset fLength
see org eclipse jface text I Region get Length public int get Length return f Length  IRegion getLength getLength fLength
see org eclipse jface text I Region get Offset public int get Offset return f Offset  IRegion getOffset getOffset fOffset
public boolean equals Object o if o instanceof I Region I Region r I Region o return r get Offset f Offset r get Length f Length return false  IRegion IRegion IRegion getOffset fOffset getLength fLength
see java lang Object hash Code public int hash Code return f Offset 24 f Length 16  hashCode hashCode fOffset fLength

Creates a new buffered rule based scanner which does not have any rule and a default buffer size of 500 characters protected Buffered Rule Based Scanner super  BufferedRuleBasedScanner
Creates a new buffered rule based scanner which does not have any rule The buffer size is set to the given number of characters param size the buffer size public Buffered Rule Based Scanner int size super set Buffer Size size  BufferedRuleBasedScanner setBufferSize
Sets the buffer to the given number of characters param size the buffer size protected void set Buffer Size int size Assert is True size 0 f Buffer Size size f Buffer new char size  setBufferSize isTrue fBufferSize fBuffer
Shifts the buffer so that the buffer starts at the given document offset param offset the document offset at which the buffer starts private void shift Buffer int offset f Start offset f End f Start f Buffer Size if f End f Document Length f End f Document Length try String content f Document get f Start f End f Start content get Chars 0 f End f Start f Buffer 0 catch Bad Location Exception x  shiftBuffer fStart fEnd fStart fBufferSize fEnd fDocumentLength fEnd fDocumentLength fDocument fStart fEnd fStart getChars fEnd fStart fBuffer BadLocationException
public void set Range I Document document int offset int length super set Range document offset length f Document Length document get Length shift Buffer offset  setRange IDocument setRange fDocumentLength getLength shiftBuffer
public int read if f Offset f Range End f Offset return EOF if f Offset f End shift Buffer f End else if f Offset f Start f End f Offset shift Buffer f Offset return f Buffer f Offset f Start  fOffset fRangeEnd fOffset fOffset fEnd shiftBuffer fEnd fOffset fStart fEnd fOffset shiftBuffer fOffset fBuffer fOffset fStart
public void unread if f Offset f Start shift Buffer Math max 0 f Start f Buffer Size 2 f Offset  fOffset fStart shiftBuffer fStart fBufferSize fOffset

Creates a damager repairer that uses the given scanner and returns the given default text attribute if the current token does not carry a text attribute param scanner the token scanner to be used param default Text Attribute the text attribute to be returned if non is specified by the current token may not be code null code deprecated use Default Damager Repairer I Token Scanner instead public Default Damager Repairer I Token Scanner scanner Text Attribute default Text Attribute Assert is Not Null default Text Attribute f Scanner scanner f Default Text Attribute default Text Attribute  defaultTextAttribute DefaultDamagerRepairer ITokenScanner DefaultDamagerRepairer ITokenScanner TextAttribute defaultTextAttribute isNotNull defaultTextAttribute fScanner fDefaultTextAttribute defaultTextAttribute
Creates a damager repairer that uses the given scanner The scanner may not be code null code and is assumed to return only token that carry text attributes param scanner the token scanner to be used may not be code null code public Default Damager Repairer I Token Scanner scanner Assert is Not Null scanner f Scanner scanner f Default Text Attribute new Text Attribute null  DefaultDamagerRepairer ITokenScanner isNotNull fScanner fDefaultTextAttribute TextAttribute
see I Presentation Repairer set Document I Document public void set Document I Document document f Document document  IPresentationRepairer setDocument IDocument setDocument IDocument fDocument
Returns the end offset of the line that contains the specified offset or if the offset is inside a line delimiter the end offset of the next line param offset the offset whose line end offset must be computed return the line end offset for the given offset exception Bad Location Exception if offset is invalid in the current document protected int end Of Line Of int offset throws Bad Location Exception I Region info f Document get Line Information Of Offset offset if offset info get Offset info get Length return info get Offset info get Length int line f Document get Line Of Offset offset try info f Document get Line Information line 1 return info get Offset info get Length catch Bad Location Exception x return f Document get Length  BadLocationException endOfLineOf BadLocationException IRegion fDocument getLineInformationOfOffset getOffset getLength getOffset getLength fDocument getLineOfOffset fDocument getLineInformation getOffset getLength BadLocationException fDocument getLength
public I Region get Damage Region I Typed Region partition Document Event e boolean document Partitioning Changed if document Partitioning Changed try I Region info f Document get Line Information Of Offset e get Offset int start Math max partition get Offset info get Offset int end e get Offset e get Text null e get Length e get Text length if info get Offset end end info get Offset info get Length optimize the case of the same line end info get Offset info get Length else end end Of Line Of end end Math min partition get Offset partition get Length end return new Region start end start catch Bad Location Exception x return partition  IRegion getDamageRegion ITypedRegion DocumentEvent documentPartitioningChanged documentPartitioningChanged IRegion fDocument getLineInformationOfOffset getOffset getOffset getOffset getOffset getText getLength getText getOffset getOffset getLength getOffset getLength endOfLineOf getOffset getLength BadLocationException
public void create Presentation Text Presentation presentation I Typed Region region if f Scanner null will be removed if deprecated constructor will be removed add Range presentation region get Offset region get Length f Default Text Attribute return int last Start region get Offset int length 0 boolean first Token true I Token last Token Token UNDEFINED Text Attribute last Attribute get Token Text Attribute last Token f Scanner set Range f Document last Start region get Length while true I Token token f Scanner next Token if token isEOF break Text Attribute attribute get Token Text Attribute token if last Attribute null last Attribute equals attribute length f Scanner get Token Length first Token false else if first Token add Range presentation last Start length last Attribute first Token false last Token token last Attribute attribute last Start f Scanner get Token Offset length f Scanner get Token Length add Range presentation last Start length last Attribute  createPresentation TextPresentation ITypedRegion fScanner addRange getOffset getLength fDefaultTextAttribute lastStart getOffset firstToken IToken lastToken TextAttribute lastAttribute getTokenTextAttribute lastToken fScanner setRange fDocument lastStart getLength IToken fScanner nextToken TextAttribute getTokenTextAttribute lastAttribute lastAttribute fScanner getTokenLength firstToken firstToken addRange lastStart lastAttribute firstToken lastToken lastAttribute lastStart fScanner getTokenOffset fScanner getTokenLength addRange lastStart lastAttribute
Returns a text attribute encoded in the given token If the token s data is not code null code and a text attribute it is assumed that it is the encoded text attribute It returns the default text attribute if there is no encoded text attribute found param token the token whose text attribute is to be determined return the token s text attribute protected Text Attribute get Token Text Attribute I Token token Object data token get Data if data instanceof Text Attribute return Text Attribute data return f Default Text Attribute  TextAttribute getTokenTextAttribute IToken getData TextAttribute TextAttribute fDefaultTextAttribute
Adds style information to the given text presentation param presentation the text presentation to be extended param offset the offset of the range to be styled param length the length of the range to be styled param attr the attribute describing the style of the range to be styled protected void add Range Text Presentation presentation int offset int length Text Attribute attr if attr null presentation add Style Range new Style Range offset length attr get Foreground attr get Background attr get Style  addRange TextPresentation TextAttribute addStyleRange StyleRange getForeground getBackground getStyle

Creates a new partitioner that uses the given scanner and may return partitions of the given legal content types param scanner the scanner this partitioner is supposed to use param legal Content Types the legal content types of this partitioner public Default Partitioner I Partition Token Scanner scanner String legal Content Types f Scanner scanner f Legal Content Types legal Content Types f Position Category CONTENT TYPES CATEGORY hash Code f Position Updater new Default Position Updater f Position Category  legalContentTypes DefaultPartitioner IPartitionTokenScanner legalContentTypes fScanner fLegalContentTypes legalContentTypes fPositionCategory CONTENT_TYPES_CATEGORY hashCode fPositionUpdater DefaultPositionUpdater fPositionCategory
since 3 0 public String get Managing Position Categories return new String f Position Category  getManagingPositionCategories fPositionCategory
public void connect I Document document Assert is Not Null document Assert is True document contains Position Category f Position Category f Document document f Document add Position Category f Position Category initialize  IDocument isNotNull isTrue containsPositionCategory fPositionCategory fDocument fDocument addPositionCategory fPositionCategory
Performs the initial partitioning of the partitioner s document protected void initialize f Scanner set Range f Document 0 f Document get Length try I Token token f Scanner next Token while token isEOF String content Type get Token Content Type token if is Supported Content Type content Type Typed Position p new Typed Position f Scanner get Token Offset f Scanner get Token Length content Type f Document add Position f Position Category p token f Scanner next Token catch Bad Location Exception x cannot happen as offsets come from scanner catch Bad Position Category Exception x cannot happen if document has been connected before  fScanner setRange fDocument fDocument getLength IToken fScanner nextToken contentType getTokenContentType isSupportedContentType contentType TypedPosition TypedPosition fScanner getTokenOffset fScanner getTokenLength contentType fDocument addPosition fPositionCategory fScanner nextToken BadLocationException BadPositionCategoryException
public void disconnect Assert is True f Document contains Position Category f Position Category try f Document remove Position Category f Position Category catch Bad Position Category Exception x can not happen because of Assert  isTrue fDocument containsPositionCategory fPositionCategory fDocument removePositionCategory fPositionCategory BadPositionCategoryException
public void document About To Be Changed Document Event e Assert is True e get Document f Document f Previous Document Length e get Document get Length f Start Offset 1 f End Offset 1 f Delete Offset 1  documentAboutToBeChanged DocumentEvent isTrue getDocument fDocument fPreviousDocumentLength getDocument getLength fStartOffset fEndOffset fDeleteOffset
see I Document Partitioner document Changed Document Event public boolean document Changed Document Event e I Region region document Changed2 e return region null  IDocumentPartitioner documentChanged DocumentEvent documentChanged DocumentEvent IRegion documentChanged2
Helper method for tracking the minimal region containing all partition changes If code offset code is smaller than the remembered offset code offset code will from now on be remembered If code offset length code is greater than the remembered end offset it will be remembered from now on param offset the offset param length the length private void remember Region int offset int length remember start offset if f Start Offset 1 f Start Offset offset else if offset f Start Offset f Start Offset offset remember end offset int end Offset offset length if f End Offset 1 f End Offset end Offset else if end Offset f End Offset f End Offset end Offset  rememberRegion fStartOffset fStartOffset fStartOffset fStartOffset endOffset fEndOffset fEndOffset endOffset endOffset fEndOffset fEndOffset endOffset
Remembers the given offset as the deletion offset param offset the offset private void remember Deleted Offset int offset f Delete Offset offset  rememberDeletedOffset fDeleteOffset
Creates the minimal region containing all partition changes using the remembered offset end offset and deletion offset return the minimal region containing all the partition changes private I Region create Region if f Delete Offset 1 if f Start Offset 1 f End Offset 1 return null return new Region f Start Offset f End Offset f Start Offset else if f Start Offset 1 f End Offset 1 return new Region f Delete Offset 0 else int offset Math min f Delete Offset f Start Offset int end Offset Math max f Delete Offset f End Offset return new Region offset end Offset offset  IRegion createRegion fDeleteOffset fStartOffset fEndOffset fStartOffset fEndOffset fStartOffset fStartOffset fEndOffset fDeleteOffset fDeleteOffset fStartOffset endOffset fDeleteOffset fEndOffset endOffset
public I Region document Changed2 Document Event e try I Document d e get Document Position category d get Positions f Position Category I Region line d get Line Information Of Offset e get Offset int reparse Start line get Offset int partition Start 1 String content Type null int new Length e get Text null 0 e get Text length int first d compute Index In Category f Position Category reparse Start if first 0 Typed Position partition Typed Position category first 1 if partition includes reparse Start partition Start partition get Offset content Type partition get Type if e get Offset partition get Offset partition get Length reparse Start partition Start first else if reparse Start e get Offset reparse Start partition get Offset partition get Length partition Start partition get Offset content Type partition get Type reparse Start partition Start first else partition Start partition get Offset partition get Length content Type I Document DEFAULT CONTENT TYPE f Position Updater update e for int i first i category length i Position p category i if p is Deleted remember Deleted Offset e get Offset break category d get Positions f Position Category f Scanner set Partial Range d reparse Start d get Length reparse Start content Type partition Start int last Scanned Position reparse Start I Token token f Scanner next Token while token isEOF content Type get Token Content Type token if is Supported Content Type content Type token f Scanner next Token continue int start f Scanner get Token Offset int length f Scanner get Token Length last Scanned Position start length 1 remove all affected positions while first category length Typed Position p Typed Position category first if last Scanned Position p offset p length p overlaps With start length d contains Position f Position Category start length content Type equals p get Type remember Region p offset p length d remove Position f Position Category p first else break if position already exists and we have scanned at least the area covered by the event we are done if d contains Position f Position Category start length if last Scanned Position e get Offset new Length return create Region first else insert the new type position try d add Position f Position Category new Typed Position start length content Type remember Region start length catch Bad Position Category Exception x catch Bad Location Exception x token f Scanner next Token remove all positions behind last Scanned Position since there aren t any further types if last Scanned Position reparse Start if this condition is not met nothing has been scanned because of a deletion last Scanned Position first d compute Index In Category f Position Category last Scanned Position Typed Position p while first category length p Typed Position category first d remove Position f Position Category p remember Region p offset p length catch Bad Position Category Exception x should never happen on connected documents catch Bad Location Exception x return create Region  IRegion documentChanged2 DocumentEvent IDocument getDocument getPositions fPositionCategory IRegion getLineInformationOfOffset getOffset reparseStart getOffset partitionStart contentType newLength getText getText computeIndexInCategory fPositionCategory reparseStart TypedPosition TypedPosition reparseStart partitionStart getOffset contentType getType getOffset getOffset getLength reparseStart partitionStart reparseStart getOffset reparseStart getOffset getLength partitionStart getOffset contentType getType reparseStart partitionStart partitionStart getOffset getLength contentType IDocument DEFAULT_CONTENT_TYPE fPositionUpdater isDeleted rememberDeletedOffset getOffset getPositions fPositionCategory fScanner setPartialRange reparseStart getLength reparseStart contentType partitionStart lastScannedPosition reparseStart IToken fScanner nextToken contentType getTokenContentType isSupportedContentType contentType fScanner nextToken fScanner getTokenOffset fScanner getTokenLength lastScannedPosition TypedPosition TypedPosition lastScannedPosition overlapsWith containsPosition fPositionCategory contentType getType rememberRegion removePosition fPositionCategory containsPosition fPositionCategory lastScannedPosition getOffset newLength createRegion addPosition fPositionCategory TypedPosition contentType rememberRegion BadPositionCategoryException BadLocationException fScanner nextToken lastScannedPosition lastScannedPosition reparseStart lastScannedPosition computeIndexInCategory fPositionCategory lastScannedPosition TypedPosition TypedPosition removePosition fPositionCategory rememberRegion BadPositionCategoryException BadLocationException createRegion
Returns the position in the partitoner s position category which is close to the given offset This is the position has either an offset which is the same as the given offset or an offset which is smaller than the given offset This method profits from the knowledge that a partitioning is a ordered set of disjoint position param offset the offset for which to search the closest position return the closest position in the partitioner s category protected Typed Position find Closest Position int offset try int index f Document compute Index In Category f Position Category offset Position category f Document get Positions f Position Category if category length 0 return null if index category length if offset category index offset return Typed Position category index if index 0 index return Typed Position category index catch Bad Position Category Exception x catch Bad Location Exception x return null  TypedPosition findClosestPosition fDocument computeIndexInCategory fPositionCategory fDocument getPositions fPositionCategory TypedPosition TypedPosition BadPositionCategoryException BadLocationException
public String get Content Type int offset Typed Position p find Closest Position offset if p null p includes offset return p get Type return I Document DEFAULT CONTENT TYPE  getContentType TypedPosition findClosestPosition getType IDocument DEFAULT_CONTENT_TYPE
public I Typed Region get Partition int offset try Position category f Document get Positions f Position Category if category null category length 0 return new Typed Region 0 f Document get Length I Document DEFAULT CONTENT TYPE int index f Document compute Index In Category f Position Category offset if index category length Typed Position next Typed Position category index if offset next offset return new Typed Region next get Offset next get Length next get Type if index 0 return new Typed Region 0 next offset I Document DEFAULT CONTENT TYPE Typed Position previous Typed Position category index 1 if previous includes offset return new Typed Region previous get Offset previous get Length previous get Type int end Offset previous get Offset previous get Length return new Typed Region end Offset next get Offset end Offset I Document DEFAULT CONTENT TYPE Typed Position previous Typed Position category category length 1 if previous includes offset return new Typed Region previous get Offset previous get Length previous get Type int end Offset previous get Offset previous get Length return new Typed Region end Offset f Document get Length end Offset I Document DEFAULT CONTENT TYPE catch Bad Position Category Exception x catch Bad Location Exception x return new Typed Region 0 f Document get Length I Document DEFAULT CONTENT TYPE  ITypedRegion getPartition fDocument getPositions fPositionCategory TypedRegion fDocument getLength IDocument DEFAULT_CONTENT_TYPE fDocument computeIndexInCategory fPositionCategory TypedPosition TypedPosition TypedRegion getOffset getLength getType TypedRegion IDocument DEFAULT_CONTENT_TYPE TypedPosition TypedPosition TypedRegion getOffset getLength getType endOffset getOffset getLength TypedRegion endOffset getOffset endOffset IDocument DEFAULT_CONTENT_TYPE TypedPosition TypedPosition TypedRegion getOffset getLength getType endOffset getOffset getLength TypedRegion endOffset fDocument getLength endOffset IDocument DEFAULT_CONTENT_TYPE BadPositionCategoryException BadLocationException TypedRegion fDocument getLength IDocument DEFAULT_CONTENT_TYPE
see I Document Partitioner compute Partitioning int int public I Typed Region compute Partitioning int offset int length return compute Partitioning offset length false  IDocumentPartitioner computePartitioning ITypedRegion computePartitioning computePartitioning
see I Document Partitioner get Legal Content Types public String get Legal Content Types return f Legal Content Types  IDocumentPartitioner getLegalContentTypes getLegalContentTypes fLegalContentTypes
Returns whether the given type is one of the legal content types param content Type the content type to check return code true code if the content type is a legal content type protected boolean is Supported Content Type String content Type if content Type null for int i 0 i f Legal Content Types length i if f Legal Content Types i equals content Type return true return false  contentType isSupportedContentType contentType contentType fLegalContentTypes fLegalContentTypes contentType
Returns a content type encoded in the given token If the token s data is not code null code and a string it is assumed that it is the encoded content type param token the token whose content type is to be determined return the token s content type protected String get Token Content Type I Token token Object data token get Data if data instanceof String return String data return null  getTokenContentType IToken getData
since 3 0 public String get Content Type int offset boolean prefer Open Partitions return get Partition offset prefer Open Partitions get Type  getContentType preferOpenPartitions getPartition preferOpenPartitions getType
public I Typed Region get Partition int offset boolean prefer Open Partitions I Typed Region region get Partition offset if prefer Open Partitions if region get Offset offset region get Type equals I Document DEFAULT CONTENT TYPE if offset 0 region get Partition offset 1 if region get Type equals I Document DEFAULT CONTENT TYPE return region return new Typed Region offset 0 I Document DEFAULT CONTENT TYPE return region  ITypedRegion getPartition preferOpenPartitions ITypedRegion getPartition preferOpenPartitions getOffset getType IDocument DEFAULT_CONTENT_TYPE getPartition getType IDocument DEFAULT_CONTENT_TYPE TypedRegion IDocument DEFAULT_CONTENT_TYPE
public I Typed Region compute Partitioning int offset int length boolean include Zero Length Partitions List list new Array List try int end Offset offset length Position category f Document get Positions f Position Category Typed Position previous null current null int start end gap Offset Position gap new Position 0 int start Index get First Index Ending After Offset category offset int end Index get First Index Starting After Offset category end Offset for int i start Index i end Index i current Typed Position category i gap Offset previous null previous get Offset previous get Length 0 gap set Offset gap Offset gap set Length current get Offset gap Offset if include Zero Length Partitions overlaps Or Touches gap offset length gap get Length 0 gap overlaps With offset length start Math max offset gap Offset end Math min end Offset gap get Offset gap get Length list add new Typed Region start end start I Document DEFAULT CONTENT TYPE if current overlaps With offset length start Math max offset current get Offset end Math min end Offset current get Offset current get Length list add new Typed Region start end start current get Type previous current if previous null gap Offset previous get Offset previous get Length gap set Offset gap Offset gap set Length f Document get Length gap Offset if include Zero Length Partitions overlaps Or Touches gap offset length gap get Length 0 gap overlaps With offset length start Math max offset gap Offset end Math min end Offset f Document get Length list add new Typed Region start end start I Document DEFAULT CONTENT TYPE if list is Empty list add new Typed Region offset length I Document DEFAULT CONTENT TYPE catch Bad Position Category Exception x Typed Region result new Typed Region list size list to Array result return result  ITypedRegion computePartitioning includeZeroLengthPartitions ArrayList endOffset fDocument getPositions fPositionCategory TypedPosition gapOffset startIndex getFirstIndexEndingAfterOffset endIndex getFirstIndexStartingAfterOffset endOffset startIndex endIndex TypedPosition gapOffset getOffset getLength setOffset gapOffset setLength getOffset gapOffset includeZeroLengthPartitions overlapsOrTouches getLength overlapsWith gapOffset endOffset getOffset getLength TypedRegion IDocument DEFAULT_CONTENT_TYPE overlapsWith getOffset endOffset getOffset getLength TypedRegion getType gapOffset getOffset getLength setOffset gapOffset setLength fDocument getLength gapOffset includeZeroLengthPartitions overlapsOrTouches getLength overlapsWith gapOffset endOffset fDocument getLength TypedRegion IDocument DEFAULT_CONTENT_TYPE isEmpty TypedRegion IDocument DEFAULT_CONTENT_TYPE BadPositionCategoryException TypedRegion TypedRegion toArray
Returns code true code if the given ranges overlap with or touch each other param gap the first range param offset the offset of the second range param length the length of the second range return code true code if the given ranges overlap with or touch each other since 3 0 private boolean overlaps Or Touches Position gap int offset int length return gap get Offset offset length offset gap get Offset gap get Length  overlapsOrTouches getOffset getOffset getLength
Returns the index of the first position which ends after the given offset param positions the positions in linear order param offset the offset return the index of the first position which ends after the offset since 3 0 private int get First Index Ending After Offset Position positions int offset int i 1 j positions length while j i 1 int k i j 1 Position p positions k if p get Offset p get Length offset j k else i k return j  getFirstIndexEndingAfterOffset getOffset getLength
Returns the index of the first position which starts at or after the given offset param positions the positions in linear order param offset the offset return the index of the first position which starts after the offset since 3 0 private int get First Index Starting After Offset Position positions int offset int i 1 j positions length while j i 1 int k i j 1 Position p positions k if p get Offset offset j k else i k return j  getFirstIndexStartingAfterOffset getOffset

Creates a rule for the given starting sequence which if detected will return the specified token param start Sequence the pattern s start sequence param token the token to be returned on success public End Of Line Rule String start Sequence I Token token this start Sequence token char 0  startSequence EndOfLineRule startSequence IToken startSequence
Creates a rule for the given starting sequence which if detected will return the specified token Any character which follows the given escape character will be ignored param start Sequence the pattern s start sequence param token the token to be returned on success param escape Character the escape character public End Of Line Rule String start Sequence I Token token char escape Character super start Sequence null token escape Character true  startSequence escapeCharacter EndOfLineRule startSequence IToken escapeCharacter startSequence escapeCharacter
Creates a rule for the given starting sequence which if detected will return the specified token Any character which follows the given escape character will be ignored In addition an escape character immediately before an end of line can be set to continue the line param start Sequence the pattern s start sequence param token the token to be returned on success param escape Character the escape character param escape Continues Line indicates whether the specified escape character is used for line continuation so that an end of line immediately after the escape character does not terminate the line even if code break OnEOL code is true since 3 0 public End Of Line Rule String start Sequence I Token token char escape Character boolean escape Continues Line super start Sequence null token escape Character true escape Continues Line  startSequence escapeCharacter escapeContinuesLine breakOnEOL EndOfLineRule startSequence IToken escapeCharacter escapeContinuesLine startSequence escapeCharacter escapeContinuesLine

Provides rules access to the legal line delimiters return the legal line delimiters 
Returns the column of the character scanner return the column of the character scanner 
Returns the next character or EOF if end of file has been reached return the next character or EOF 
int read Rewinds the scanner before the last read character void unread 

Configures the scanner by providing access to the document range that should be scanned The range may no only contain complete partitions but starts at the beginning of a line in the middle of a partition of the given content type This requires that a partition delimiter can not contain a line delimiter param document the document to scan param offset the offset of the document range to scan param length the length of the document range to scan param content Type the content type at the given offset param partition Offset the offset at which the partition of the given offset starts  contentType partitionOffset

Returns the success token of this predicate rule return the success token of this rule 
Evaluates the rule by examining the characters available from the provided character scanner The token returned by this rule returns code true code when calling code is Undefined code if the text the rule investigated does not match the rule s requirements Otherwise this method returns this rule s success token If this rules relies on a text pattern comprising a opening and a closing character sequence this method can also be called when the scanner is positioned already between the opening and the closing sequence In this case code resume code must be set to code true code param scanner the character scanner to be used by this rule param resume indicates that the rule starts working between the opening and the closing character sequence return the token computed by the rule  isUndefined

Evaluates the rule by examining the characters available from the provided character scanner The token returned by this rule returns code true code when calling code is Undefined code if the text the rule investigated does not match the rule s requirements param scanner the character scanner to be used by this rule return the token computed by the rule  isUndefined

Return whether this token is undefined return code true code if this token is undefined 
Return whether this token represents a whitespace return code true code if this token represents a whitespace 
Return whether this token represents End Of File return code true code if this token represents EOF 
Return whether this token is neither undefined nor whitespace nor EOF return code true code if this token is not undefined not a whitespace and not EOF 
Return a data attached to this token The semantics of this data kept undefined by this interface return the data attached to this token 

Configures the scanner by providing access to the document range that should be scanned param document the document to scan param offset the offset of the document range to scan param length the length of the document range to scan 
Returns the next token in the document return the next token in the document 
Returns the offset of the last token read by this scanner return the offset of the last token read by this scanner 
Returns the length of the last token read by this scanner return the length of the last token read by this scanner 

Returns whether the specified character is whitespace param c the character to be checked return code true code if the specified character is a whitespace char 

Returns whether the specified character is valid as the first character in a word param c the character to be checked return code true code is a valid first character in a word code false code otherwise 
Returns whether the specified character is valid as a subsequent character in a word param c the character to be checked return code true code if the character is a valid word part code false code otherwise 

Creates a rule for the given starting and ending sequence which if detected will return the specified token param start Sequence the pattern s start sequence param end Sequence the pattern s end sequence param token the token to be returned on success public Multi Line Rule String start Sequence String end Sequence I Token token this start Sequence end Sequence token char 0  startSequence endSequence MultiLineRule startSequence endSequence IToken startSequence endSequence
Creates a rule for the given starting and ending sequence which if detected will return the specific token Any character which follows the given escape character will be ignored param start Sequence the pattern s start sequence param end Sequence the pattern s end sequence param token the token to be returned on success param escape Character the escape character public Multi Line Rule String start Sequence String end Sequence I Token token char escape Character this start Sequence end Sequence token escape Character false  startSequence endSequence escapeCharacter MultiLineRule startSequence endSequence IToken escapeCharacter startSequence endSequence escapeCharacter
Creates a rule for the given starting and ending sequence which if detected will return the specific token Any character that follows the given escape character will be ignored code break OnEOF code indicates whether EOF is equivalent to detecting the code end Sequence code param start Sequence the pattern s start sequence param end Sequence the pattern s end sequence param token the token to be returned on success param escape Character the escape character param breaks OnEOF indicates whether the end of the file terminates this rule successfully since 2 1 public Multi Line Rule String start Sequence String end Sequence I Token token char escape Character boolean breaks OnEOF super start Sequence end Sequence token escape Character false breaks OnEOF  breakOnEOF endSequence startSequence endSequence escapeCharacter breaksOnEOF MultiLineRule startSequence endSequence IToken escapeCharacter breaksOnEOF startSequence endSequence escapeCharacter breaksOnEOF

Creates a rule which will return the specified token when a numerical sequence is detected param token the token to be returned public Number Rule I Token token Assert is Not Null token f Token token  NumberRule IToken isNotNull fToken
Sets a column constraint for this rule If set the rule s token will only be returned if the pattern is detected starting at the specified column If the column is smaller then 0 the column constraint is considered removed param column the column in which the pattern starts public void set Column Constraint int column if column 0 column UNDEFINED f Column column  setColumnConstraint fColumn
public I Token evaluate I Character Scanner scanner int c scanner read if Character is Digit char c if f Column UNDEFINED f Column scanner get Column 1 do c scanner read while Character is Digit char c scanner unread return f Token scanner unread return Token UNDEFINED  IToken ICharacterScanner isDigit fColumn fColumn getColumn isDigit fToken

Creates a rule for the given starting and ending sequence When these sequences are detected the rule will return the specified token Alternatively the sequence can also be ended by the end of the line Any character which follows the given escape Character will be ignored param start Sequence the pattern s start sequence param end Sequence the pattern s end sequence code null code is a legal value param token the token which will be returned on success param escape Character any character following this one will be ignored param breaks OnEOL indicates whether the end of the line also terminates the pattern public Pattern Rule String start Sequence String end Sequence I Token token char escape Character boolean breaks OnEOL Assert is True start Sequence null start Sequence length 0 Assert is True end Sequence null breaks OnEOL Assert is Not Null token f Start Sequence start Sequence to Char Array f End Sequence end Sequence null new char 0 end Sequence to Char Array f Token token f Escape Character escape Character f Breaks OnEOL breaks OnEOL  escapeCharacter startSequence endSequence escapeCharacter breaksOnEOL PatternRule startSequence endSequence IToken escapeCharacter breaksOnEOL isTrue startSequence startSequence isTrue endSequence breaksOnEOL isNotNull fStartSequence startSequence toCharArray fEndSequence endSequence endSequence toCharArray fToken fEscapeCharacter escapeCharacter fBreaksOnEOL breaksOnEOL
Creates a rule for the given starting and ending sequence When these sequences are detected the rule will return the specified token Alternatively the sequence can also be ended by the end of the line or the end of the file Any character which follows the given escape Character will be ignored param start Sequence the pattern s start sequence param end Sequence the pattern s end sequence code null code is a legal value param token the token which will be returned on success param escape Character any character following this one will be ignored param breaks OnEOL indicates whether the end of the line also terminates the pattern param breaks OnEOF indicates whether the end of the file also terminates the pattern since 2 1 public Pattern Rule String start Sequence String end Sequence I Token token char escape Character boolean breaks OnEOL boolean breaks OnEOF this start Sequence end Sequence token escape Character breaks OnEOL f Breaks OnEOF breaks OnEOF  escapeCharacter startSequence endSequence escapeCharacter breaksOnEOL breaksOnEOF PatternRule startSequence endSequence IToken escapeCharacter breaksOnEOL breaksOnEOF startSequence endSequence escapeCharacter breaksOnEOL fBreaksOnEOF breaksOnEOF
Creates a rule for the given starting and ending sequence When these sequences are detected the rule will return the specified token Alternatively the sequence can also be ended by the end of the line or the end of the file Any character which follows the given escape Character will be ignored An end of line immediately after the given code line Continuation Character code will not cause the pattern to terminate even if code break OnEOL code is set to true param start Sequence the pattern s start sequence param end Sequence the pattern s end sequence code null code is a legal value param token the token which will be returned on success param escape Character any character following this one will be ignored param breaks OnEOL indicates whether the end of the line also terminates the pattern param breaks OnEOF indicates whether the end of the file also terminates the pattern param escape Continues Line indicates whether the specified escape character is used for line continuation so that an end of line immediately after the escape character does not terminate the pattern even if code break OnEOL code is set since 3 0 public Pattern Rule String start Sequence String end Sequence I Token token char escape Character boolean breaks OnEOL boolean breaks OnEOF boolean escape Continues Line this start Sequence end Sequence token escape Character breaks OnEOL breaks OnEOF f Escape Continues Line escape Continues Line  escapeCharacter lineContinuationCharacter breakOnEOL startSequence endSequence escapeCharacter breaksOnEOL breaksOnEOF escapeContinuesLine breakOnEOL PatternRule startSequence endSequence IToken escapeCharacter breaksOnEOL breaksOnEOF escapeContinuesLine startSequence endSequence escapeCharacter breaksOnEOL breaksOnEOF fEscapeContinuesLine escapeContinuesLine
Sets a column constraint for this rule If set the rule s token will only be returned if the pattern is detected starting at the specified column If the column is smaller then 0 the column constraint is considered removed param column the column in which the pattern starts public void set Column Constraint int column if column 0 column UNDEFINED f Column column  setColumnConstraint fColumn
Evaluates this rules without considering any column constraints param scanner the character scanner to be used return the token resulting from this evaluation protected I Token do Evaluate I Character Scanner scanner return do Evaluate scanner false  IToken doEvaluate ICharacterScanner doEvaluate
Evaluates this rules without considering any column constraints Resumes detection i e look sonly for the end sequence required by this rule if the code resume code flag is set param scanner the character scanner to be used param resume code true code if detection should be resumed code false code otherwise return the token resulting from this evaluation since 2 0 protected I Token do Evaluate I Character Scanner scanner boolean resume if resume if end Sequence Detected scanner return f Token else int c scanner read if c f Start Sequence 0 if sequence Detected scanner f Start Sequence false if end Sequence Detected scanner return f Token scanner unread return Token UNDEFINED  IToken doEvaluate ICharacterScanner endSequenceDetected fToken fStartSequence sequenceDetected fStartSequence endSequenceDetected fToken
see I Rule evaluate I Character Scanner public I Token evaluate I Character Scanner scanner return evaluate scanner false  IRule ICharacterScanner IToken ICharacterScanner
Returns whether the end sequence was detected As the pattern can be considered ended by a line delimiter the result of this method is code true code if the rule breaks on the end of the line or if the EOF character is read param scanner the character scanner to be used return code true code if the end sequence has been detected protected boolean end Sequence Detected I Character Scanner scanner int c char delimiters scanner get Legal Line Delimiters boolean previous Was Escape Character false while c scanner read I Character Scanner EOF if c f Escape Character Skip the escaped character scanner read else if f End Sequence length 0 c f End Sequence 0 Check if the specified end sequence has been found if sequence Detected scanner f End Sequence true return true else if f Breaks OnEOL Check for end of line since it can be used to terminate the pattern for int i 0 i delimiters length i if c delimiters i 0 sequence Detected scanner delimiters i true if f Escape Continues Line previous Was Escape Character return true previous Was Escape Character c f Escape Character if f Breaks OnEOF return true scanner unread return false  endSequenceDetected ICharacterScanner getLegalLineDelimiters previousWasEscapeCharacter ICharacterScanner fEscapeCharacter fEndSequence fEndSequence sequenceDetected fEndSequence fBreaksOnEOL sequenceDetected fEscapeContinuesLine previousWasEscapeCharacter previousWasEscapeCharacter fEscapeCharacter fBreaksOnEOF
Returns whether the next characters to be read by the character scanner are an exact match with the given sequence No escape characters are allowed within the sequence If specified the sequence is considered to be found when reading the EOF character param scanner the character scanner to be used param sequence the sequence to be detected param eof Allowed indicated whether EOF terminates the pattern return code true code if the given sequence has been detected protected boolean sequence Detected I Character Scanner scanner char sequence boolean eof Allowed for int i 1 i sequence length i int c scanner read if c I Character Scanner EOF eof Allowed return true else if c sequence i Non matching character detected rewind the scanner back to the start Do not unread the first character scanner unread for int j i 1 j 0 j scanner unread return false return true  eofAllowed sequenceDetected ICharacterScanner eofAllowed ICharacterScanner eofAllowed
public I Token evaluate I Character Scanner scanner boolean resume if f Column UNDEFINED return do Evaluate scanner resume int c scanner read scanner unread if c f Start Sequence 0 return f Column scanner get Column do Evaluate scanner resume Token UNDEFINED else return Token UNDEFINED  IToken ICharacterScanner fColumn doEvaluate fStartSequence fColumn getColumn doEvaluate
since 2 0 public I Token get Success Token return f Token  IToken getSuccessToken fToken

Creates a damager repairer that uses the given scanner and returns the given default text attribute if the current token does not carry a text attribute param scanner the rule based scanner to be used param default Text Attribute the text attribute to be returned if non is specified by the current token may not be code null code deprecated use Rule Based Damager Repairer Rule Based Scanner instead public Rule Based Damager Repairer Rule Based Scanner scanner Text Attribute default Text Attribute super scanner default Text Attribute  defaultTextAttribute RuleBasedDamagerRepairer RuleBasedScanner RuleBasedDamagerRepairer RuleBasedScanner TextAttribute defaultTextAttribute defaultTextAttribute
Creates a damager repairer that uses the given scanner The scanner may not be code null code and is assumed to return only token that carry text attributes param scanner the rule based scanner to be used may not be code null code since 2 0 public Rule Based Damager Repairer Rule Based Scanner scanner super scanner  RuleBasedDamagerRepairer RuleBasedScanner

Creates a new partitioner that uses the given scanner and may return partitions of the given legal content types param scanner the scanner this partitioner is supposed to use param legal Content Types the legal content types of this partitioner public Rule Based Partitioner Rule Based Scanner scanner String legal Content Types f Scanner scanner f Legal Content Types legal Content Types f Position Category CONTENT TYPES CATEGORY hash Code f Position Updater new Default Position Updater f Position Category  legalContentTypes RuleBasedPartitioner RuleBasedScanner legalContentTypes fScanner fLegalContentTypes legalContentTypes fPositionCategory CONTENT_TYPES_CATEGORY hashCode fPositionUpdater DefaultPositionUpdater fPositionCategory
since 3 0 public String get Managing Position Categories return new String f Position Category  getManagingPositionCategories fPositionCategory
public void connect I Document document Assert is Not Null document Assert is True document contains Position Category f Position Category f Document document f Document add Position Category f Position Category initialize  IDocument isNotNull isTrue containsPositionCategory fPositionCategory fDocument fDocument addPositionCategory fPositionCategory
Performs the initial partitioning of the partitioner s document protected void initialize f Scanner set Range f Document 0 f Document get Length try I Token token f Scanner next Token while token isEOF String content Type get Token Content Type token if is Supported Content Type content Type Typed Position p new Typed Position f Scanner get Token Offset f Scanner get Token Length content Type f Document add Position f Position Category p token f Scanner next Token catch Bad Location Exception x cannot happen as offsets come from scanner catch Bad Position Category Exception x cannot happen if document has been connected before  fScanner setRange fDocument fDocument getLength IToken fScanner nextToken contentType getTokenContentType isSupportedContentType contentType TypedPosition TypedPosition fScanner getTokenOffset fScanner getTokenLength contentType fDocument addPosition fPositionCategory fScanner nextToken BadLocationException BadPositionCategoryException
public void disconnect Assert is True f Document contains Position Category f Position Category try f Document remove Position Category f Position Category catch Bad Position Category Exception x can not happen because of Assert  isTrue fDocument containsPositionCategory fPositionCategory fDocument removePositionCategory fPositionCategory BadPositionCategoryException
public void document About To Be Changed Document Event e Assert is True e get Document f Document f Previous Document Length e get Document get Length f Start Offset 1 f End Offset 1 f Delete Offset 1  documentAboutToBeChanged DocumentEvent isTrue getDocument fDocument fPreviousDocumentLength getDocument getLength fStartOffset fEndOffset fDeleteOffset
see I Document Partitioner document Changed public boolean document Changed Document Event e I Region region document Changed2 e return region null  IDocumentPartitioner documentChanged documentChanged DocumentEvent IRegion documentChanged2
Helper method for tracking the minimal region containing all partition changes If code offset code is smaller than the remembered offset code offset code will from now on be remembered If code offset length code is greater than the remembered end offset it will be remembered from now on param offset the offset param length the length private void remember Region int offset int length remember start offset if f Start Offset 1 f Start Offset offset else if offset f Start Offset f Start Offset offset remember end offset int end Offset offset length if f End Offset 1 f End Offset end Offset else if end Offset f End Offset f End Offset end Offset  rememberRegion fStartOffset fStartOffset fStartOffset fStartOffset endOffset fEndOffset fEndOffset endOffset endOffset fEndOffset fEndOffset endOffset
Remembers the given offset as the deletion offset param offset the offset private void remember Deleted Offset int offset f Delete Offset offset  rememberDeletedOffset fDeleteOffset
Creates the minimal region containing all partition changes using the remembered offset end offset and deletion offset return the minimal region containing all the partition changes private I Region create Region if f Delete Offset 1 if f Start Offset 1 f End Offset 1 return null return new Region f Start Offset f End Offset f Start Offset else if f Start Offset 1 f End Offset 1 return new Region f Delete Offset 0 else int offset Math min f Delete Offset f Start Offset int end Offset Math max f Delete Offset f End Offset return new Region offset end Offset offset  IRegion createRegion fDeleteOffset fStartOffset fEndOffset fStartOffset fEndOffset fStartOffset fStartOffset fEndOffset fDeleteOffset fDeleteOffset fStartOffset endOffset fDeleteOffset fEndOffset endOffset
public I Region document Changed2 Document Event e try I Document d e get Document Position category d get Positions f Position Category int first 0 int reparse Start 0 int original Size category length if original Size 0 determine character position at which the scanner starts first position behind the last non default partition the actual position is not involved with first d compute Index In Category f Position Category e get Offset Position p null do first if first 0 break p category first while p overlaps With e get Offset e get Length e get Offset f Previous Document Length p get Offset p get Length f Previous Document Length f Position Updater update e for int i 0 i category length i p category i if p is Deleted remember Deleted Offset e get Offset break category d get Positions f Position Category if first 0 p category first reparse Start p get Offset p get Length first f Scanner set Range d reparse Start d get Length reparse Start int last Scanned Position reparse Start I Token token f Scanner next Token while token isEOF String content Type get Token Content Type token if is Supported Content Type content Type token f Scanner next Token continue int start f Scanner get Token Offset int length f Scanner get Token Length last Scanned Position start length 1 remove all affected positions while first category length Typed Position p Typed Position category first if last Scanned Position p offset p length p overlaps With start length d contains Position f Position Category start length content Type equals p get Type remember Region p offset p length d remove Position f Position Category p first else break if position already exists we are done if d contains Position f Position Category start length return create Region insert the new type position try d add Position f Position Category new Typed Position start length content Type remember Region start length catch Bad Position Category Exception x catch Bad Location Exception x token f Scanner next Token remove all positions behind last Scanned Position since there aren t any further types if last Scanned Position reparse Start if this condition is not met nothing has been scanned because of a delete last Scanned Position first d compute Index In Category f Position Category last Scanned Position Typed Position p while first category length p Typed Position category first d remove Position f Position Category p remember Region p offset p length catch Bad Position Category Exception x should never happen on connected documents catch Bad Location Exception x return create Region  IRegion documentChanged2 DocumentEvent IDocument getDocument getPositions fPositionCategory reparseStart originalSize originalSize computeIndexInCategory fPositionCategory getOffset overlapsWith getOffset getLength getOffset fPreviousDocumentLength getOffset getLength fPreviousDocumentLength fPositionUpdater isDeleted rememberDeletedOffset getOffset getPositions fPositionCategory reparseStart getOffset getLength fScanner setRange reparseStart getLength reparseStart lastScannedPosition reparseStart IToken fScanner nextToken contentType getTokenContentType isSupportedContentType contentType fScanner nextToken fScanner getTokenOffset fScanner getTokenLength lastScannedPosition TypedPosition TypedPosition lastScannedPosition overlapsWith containsPosition fPositionCategory contentType getType rememberRegion removePosition fPositionCategory containsPosition fPositionCategory createRegion addPosition fPositionCategory TypedPosition contentType rememberRegion BadPositionCategoryException BadLocationException fScanner nextToken lastScannedPosition lastScannedPosition reparseStart lastScannedPosition computeIndexInCategory fPositionCategory lastScannedPosition TypedPosition TypedPosition removePosition fPositionCategory rememberRegion BadPositionCategoryException BadLocationException createRegion
Returns the position in the partitoner s position category which is close to the given offset This is the position has either an offset which is the same as the given offset or an offset which is smaller than the given offset This method profits from the knowledge that a partitioning is a ordered set of disjoint position param offset the offset for which to search the closest position return the closest position in the partitioner s category protected Typed Position find Closest Position int offset try int index f Document compute Index In Category f Position Category offset Position category f Document get Positions f Position Category if category length 0 return null if index category length if offset category index offset return Typed Position category index if index 0 index return Typed Position category index catch Bad Position Category Exception x catch Bad Location Exception x return null  TypedPosition findClosestPosition fDocument computeIndexInCategory fPositionCategory fDocument getPositions fPositionCategory TypedPosition TypedPosition BadPositionCategoryException BadLocationException
public String get Content Type int offset Typed Position p find Closest Position offset if p null p includes offset return p get Type return I Document DEFAULT CONTENT TYPE  getContentType TypedPosition findClosestPosition getType IDocument DEFAULT_CONTENT_TYPE
public I Typed Region get Partition int offset try Position category f Document get Positions f Position Category if category null category length 0 return new Typed Region 0 f Document get Length I Document DEFAULT CONTENT TYPE int index f Document compute Index In Category f Position Category offset if index category length Typed Position next Typed Position category index if offset next offset return new Typed Region next get Offset next get Length next get Type if index 0 return new Typed Region 0 next offset I Document DEFAULT CONTENT TYPE Typed Position previous Typed Position category index 1 if previous includes offset return new Typed Region previous get Offset previous get Length previous get Type int end Offset previous get Offset previous get Length return new Typed Region end Offset next get Offset end Offset I Document DEFAULT CONTENT TYPE Typed Position previous Typed Position category category length 1 if previous includes offset return new Typed Region previous get Offset previous get Length previous get Type int end Offset previous get Offset previous get Length return new Typed Region end Offset f Document get Length end Offset I Document DEFAULT CONTENT TYPE catch Bad Position Category Exception x catch Bad Location Exception x return new Typed Region 0 f Document get Length I Document DEFAULT CONTENT TYPE  ITypedRegion getPartition fDocument getPositions fPositionCategory TypedRegion fDocument getLength IDocument DEFAULT_CONTENT_TYPE fDocument computeIndexInCategory fPositionCategory TypedPosition TypedPosition TypedRegion getOffset getLength getType TypedRegion IDocument DEFAULT_CONTENT_TYPE TypedPosition TypedPosition TypedRegion getOffset getLength getType endOffset getOffset getLength TypedRegion endOffset getOffset endOffset IDocument DEFAULT_CONTENT_TYPE TypedPosition TypedPosition TypedRegion getOffset getLength getType endOffset getOffset getLength TypedRegion endOffset fDocument getLength endOffset IDocument DEFAULT_CONTENT_TYPE BadPositionCategoryException BadLocationException TypedRegion fDocument getLength IDocument DEFAULT_CONTENT_TYPE
see I Document Partitioner compute Partitioning public I Typed Region compute Partitioning int offset int length return compute Partitioning offset length false  IDocumentPartitioner computePartitioning ITypedRegion computePartitioning computePartitioning
see I Document Partitioner get Legal Content Types public String get Legal Content Types return f Legal Content Types  IDocumentPartitioner getLegalContentTypes getLegalContentTypes fLegalContentTypes
Returns whether the given type is one of the legal content types param content Type the content type to check return code true code if the content type is a legal content type protected boolean is Supported Content Type String content Type if content Type null for int i 0 i f Legal Content Types length i if f Legal Content Types i equals content Type return true return false  contentType isSupportedContentType contentType contentType fLegalContentTypes fLegalContentTypes contentType
Returns a content type encoded in the given token If the token s data is not code null code and a string it is assumed that it is the encoded content type param token the token whose content type is to be determined return the token s content type protected String get Token Content Type I Token token Object data token get Data if data instanceof String return String data return null  getTokenContentType IToken getData
since 3 0 public String get Content Type int offset boolean prefer Open Partitions return get Partition offset prefer Open Partitions get Type  getContentType preferOpenPartitions getPartition preferOpenPartitions getType
public I Typed Region get Partition int offset boolean prefer Open Partitions I Typed Region region get Partition offset if prefer Open Partitions if region get Offset offset region get Type equals I Document DEFAULT CONTENT TYPE if offset 0 region get Partition offset 1 if region get Type equals I Document DEFAULT CONTENT TYPE return region return new Typed Region offset 0 I Document DEFAULT CONTENT TYPE return region  ITypedRegion getPartition preferOpenPartitions ITypedRegion getPartition preferOpenPartitions getOffset getType IDocument DEFAULT_CONTENT_TYPE getPartition getType IDocument DEFAULT_CONTENT_TYPE TypedRegion IDocument DEFAULT_CONTENT_TYPE
public I Typed Region compute Partitioning int offset int length boolean include Zero Length Partitions List list new Array List try int end Offset offset length Position category f Document get Positions f Position Category Typed Position previous null current null int start end gap Offset Position gap null for int i 0 i category length i current Typed Position category i gap Offset previous null previous get Offset previous get Length 0 gap new Position gap Offset current get Offset gap Offset if include Zero Length Partitions gap get Length 0 gap overlaps With offset length start Math max offset gap Offset end Math min end Offset gap get Offset gap get Length list add new Typed Region start end start I Document DEFAULT CONTENT TYPE if current overlaps With offset length start Math max offset current get Offset end Math min end Offset current get Offset current get Length list add new Typed Region start end start current get Type previous current if previous null gap Offset previous get Offset previous get Length gap new Position gap Offset f Document get Length gap Offset if include Zero Length Partitions gap get Length 0 include Zero Length Partitions offset length gap Offset gap length 0 gap overlaps With offset length start Math max offset gap Offset end Math min end Offset f Document get Length list add new Typed Region start end start I Document DEFAULT CONTENT TYPE if list is Empty list add new Typed Region offset length I Document DEFAULT CONTENT TYPE catch Bad Position Category Exception x Typed Region result new Typed Region list size list to Array result return result  ITypedRegion computePartitioning includeZeroLengthPartitions ArrayList endOffset fDocument getPositions fPositionCategory TypedPosition gapOffset TypedPosition gapOffset getOffset getLength gapOffset getOffset gapOffset includeZeroLengthPartitions getLength overlapsWith gapOffset endOffset getOffset getLength TypedRegion IDocument DEFAULT_CONTENT_TYPE overlapsWith getOffset endOffset getOffset getLength TypedRegion getType gapOffset getOffset getLength gapOffset fDocument getLength gapOffset includeZeroLengthPartitions getLength includeZeroLengthPartitions gapOffset overlapsWith gapOffset endOffset fDocument getLength TypedRegion IDocument DEFAULT_CONTENT_TYPE isEmpty TypedRegion IDocument DEFAULT_CONTENT_TYPE BadPositionCategoryException TypedRegion TypedRegion toArray

see Rule Based Scanner set Rules I Rule public void set Rules I Rule rules throw new Unsupported Operation Exception  RuleBasedScanner setRules IRule setRules IRule UnsupportedOperationException
see Rule Based Scanner set Rules I Rule public void set Predicate Rules I Predicate Rule rules super set Rules rules  RuleBasedScanner setRules IRule setPredicateRules IPredicateRule setRules
see I Token Scanner set Range I Document int int public void set Range I Document document int offset int length set Partial Range document offset length null 1  ITokenScanner setRange IDocument setRange IDocument setPartialRange
public void set Partial Range I Document document int offset int length String content Type int partition Offset f Content Type content Type f Partition Offset partition Offset if partition Offset 1 int delta offset partition Offset if delta 0 super set Range document partition Offset length delta f Offset offset return super set Range document offset length  setPartialRange IDocument contentType partitionOffset fContentType contentType fPartitionOffset partitionOffset partitionOffset partitionOffset setRange partitionOffset fOffset setRange
public I Token next Token if f Content Type null f Rules null don t try to resume return super next Token inside a partition f Column UNDEFINED boolean resume f Partition Offset 1 f Partition Offset f Offset f Token Offset resume f Partition Offset f Offset I Predicate Rule rule I Token token for int i 0 i f Rules length i rule I Predicate Rule f Rules i token rule get Success Token if f Content Type equals token get Data token rule evaluate this resume if token is Undefined f Content Type null return token haven t found any rule for this type of partition f Content Type null if resume f Offset f Partition Offset return super next Token  IToken nextToken fContentType fRules nextToken fColumn fPartitionOffset fPartitionOffset fOffset fTokenOffset fPartitionOffset fOffset IPredicateRule IToken fRules IPredicateRule fRules getSuccessToken fContentType getData isUndefined fContentType fContentType fOffset fPartitionOffset nextToken

Creates a new rule based scanner which does not have any rule public Rule Based Scanner  RuleBasedScanner
Configures the scanner with the given sequence of rules param rules the sequence of rules controlling this scanner public void set Rules I Rule rules f Rules rules  setRules IRule fRules
Configures the scanner s default return token This is the token which is returned when non of the rules fired and EOF has not been reached param default Return Token the default return token since 2 0 public void set Default Return Token I Token default Return Token Assert is Not Null default Return Token get Data f Default Return Token default Return Token  defaultReturnToken setDefaultReturnToken IToken defaultReturnToken isNotNull defaultReturnToken getData fDefaultReturnToken defaultReturnToken
public void set Range I Document document int offset int length f Document document f Offset offset f Column UNDEFINED f Range End Math min f Document get Length offset length String delimiters f Document get Legal Line Delimiters f Delimiters new char delimiters length for int i 0 i delimiters length i f Delimiters i delimiters i to Char Array if f Default Return Token null f Default Return Token new Token null  setRange IDocument fDocument fOffset fColumn fRangeEnd fDocument getLength fDocument getLegalLineDelimiters fDelimiters fDelimiters toCharArray fDefaultReturnToken fDefaultReturnToken
see I Token Scanner get Token Offset public int get Token Offset return f Token Offset  ITokenScanner getTokenOffset getTokenOffset fTokenOffset
public int get Token Length if f Offset f Range End return f Offset get Token Offset return f Range End get Token Offset  getTokenLength fOffset fRangeEnd fOffset getTokenOffset fRangeEnd getTokenOffset
public int get Column if f Column UNDEFINED try int line f Document get Line Of Offset f Offset int start f Document get Line Offset line f Column f Offset start catch Bad Location Exception ex return f Column  getColumn fColumn fDocument getLineOfOffset fOffset fDocument getLineOffset fColumn fOffset BadLocationException fColumn
see I Character Scanner get Legal Line Delimiters public char get Legal Line Delimiters return f Delimiters  ICharacterScanner getLegalLineDelimiters getLegalLineDelimiters fDelimiters
public I Token next Token I Token token while true f Token Offset f Offset f Column UNDEFINED if f Rules null for int i 0 i f Rules length i token f Rules i evaluate this if token is Undefined return token if read EOF return Token EOF else return f Default Return Token  IToken nextToken IToken fTokenOffset fOffset fColumn fRules fRules fRules isUndefined fDefaultReturnToken
public int read try if f Offset f Range End try return f Document get Char f Offset catch Bad Location Exception e return EOF finally f Offset f Column UNDEFINED  fOffset fRangeEnd fDocument getChar fOffset BadLocationException fOffset fColumn
see I Character Scanner unread public void unread f Offset  ICharacterScanner fOffset

Creates a rule for the given starting and ending sequence which if detected will return the specified token param start Sequence the pattern s start sequence param end Sequence the pattern s end sequence param token the token to be returned on success public Single Line Rule String start Sequence String end Sequence I Token token this start Sequence end Sequence token char 0  startSequence endSequence SingleLineRule startSequence endSequence IToken startSequence endSequence
Creates a rule for the given starting and ending sequence which if detected will return the specified token Any character which follows the given escape character will be ignored param start Sequence the pattern s start sequence param end Sequence the pattern s end sequence param token the token to be returned on success param escape Character the escape character public Single Line Rule String start Sequence String end Sequence I Token token char escape Character this start Sequence end Sequence token escape Character false  startSequence endSequence escapeCharacter SingleLineRule startSequence endSequence IToken escapeCharacter startSequence endSequence escapeCharacter
Creates a rule for the given starting and ending sequence which if detected will return the specified token Alternatively the line can also be ended with the end of the file Any character which follows the given escape character will be ignored param start Sequence the pattern s start sequence param end Sequence the pattern s end sequence param token the token to be returned on success param escape Character the escape character param breaks OnEOF indicates whether the end of the file successfully terminates this rule since 2 1 public Single Line Rule String start Sequence String end Sequence I Token token char escape Character boolean breaks OnEOF super start Sequence end Sequence token escape Character true breaks OnEOF  startSequence endSequence escapeCharacter breaksOnEOF SingleLineRule startSequence endSequence IToken escapeCharacter breaksOnEOF startSequence endSequence escapeCharacter breaksOnEOF
Creates a rule for the given starting and ending sequence which if detected will return the specified token Alternatively the line can also be ended with the end of the file Any character which follows the given escape character will be ignored In addition an escape character immediately before an end of line can be set to continue the line param start Sequence the pattern s start sequence param end Sequence the pattern s end sequence param token the token to be returned on success param escape Character the escape character param breaks OnEOF indicates whether the end of the file successfully terminates this rule param escape Continues Line indicates whether the specified escape character is used for line continuation so that an end of line immediately after the escape character does not terminate the line even if code break OnEOL code is true since 3 0 public Single Line Rule String start Sequence String end Sequence I Token token char escape Character boolean breaks OnEOF boolean escape Continues Line super start Sequence end Sequence token escape Character true breaks OnEOF escape Continues Line  startSequence endSequence escapeCharacter breaksOnEOF escapeContinuesLine breakOnEOL SingleLineRule startSequence endSequence IToken escapeCharacter breaksOnEOF escapeContinuesLine startSequence endSequence escapeCharacter breaksOnEOF escapeContinuesLine

Creates a new token according to the given specification which does not have any data attached to it param type the type of the token since 2 0 private Token int type f Type type f Data null  fType fData
Creates a new token which represents neither undefined whitespace nor EOF The newly created token has the given data attached to it param data the data attached to the newly created token public Token Object data f Type T OTHER f Data data  fType T_OTHER fData
Reinitializes the data of this token The token may not represent undefined whitespace or EOF param data to be attached to the token since 2 0 public void set Data Object data Assert is True is Other f Data data  setData isTrue isOther fData
see I Token get Data public Object get Data return f Data  IToken getData getData fData
see I Token is Other public boolean is Other return f Type T OTHER  IToken isOther isOther fType T_OTHER
see I Token isEOF public boolean isEOF return f Type T EOF  IToken fType T_EOF
see I Token is Whitespace public boolean is Whitespace return f Type T WHITESPACE  IToken isWhitespace isWhitespace fType T_WHITESPACE
see I Token is Undefined public boolean is Undefined return f Type T UNDEFINED  IToken isUndefined isUndefined fType T_UNDEFINED

Creates a rule which with the help of an whitespace detector will return a whitespace token when a whitespace is detected param detector the rule s whitespace detector may not be code null code public Whitespace Rule I Whitespace Detector detector Assert is Not Null detector f Detector detector  WhitespaceRule IWhitespaceDetector isNotNull fDetector
public I Token evaluate I Character Scanner scanner int c scanner read if f Detector is Whitespace char c do c scanner read while f Detector is Whitespace char c scanner unread return Token WHITESPACE else scanner unread return Token UNDEFINED  IToken ICharacterScanner fDetector isWhitespace fDetector isWhitespace

Creates a rule for the given starting and ending word pattern which if detected will return the specified token A word detector is used to identify words param detector the word detector to be used param start Sequence the start sequence of the word pattern param end Sequence the end sequence of the word pattern param token the token to be returned on success public Word Pattern Rule I Word Detector detector String start Sequence String end Sequence I Token token this detector start Sequence end Sequence token char 0  startSequence endSequence WordPatternRule IWordDetector startSequence endSequence IToken startSequence endSequence
Creates a rule for the given starting and ending word pattern which if detected will return the specified token A word detector is used to identify words Any character which follows the given escape Character will be ignored param detector the word detector to be used param start Sequence the start sequence of the word pattern param end Sequence the end sequence of the word pattern param token the token to be returned on success param escape Character the escape character public Word Pattern Rule I Word Detector detector String start Sequence String end Sequence I Token token char escape Character super start Sequence end Sequence token escape Character Assert is Not Null detector f Detector detector  escapeCharacter startSequence endSequence escapeCharacter WordPatternRule IWordDetector startSequence endSequence IToken escapeCharacter startSequence endSequence escapeCharacter isNotNull fDetector
Returns whether the end sequence was detected The rule acquires the rest of the word using the provided word detector and tests to determine if it ends with the end sequence param scanner the scanner to be used return code true code if the word ends on the given end sequence protected boolean end Sequence Detected I Character Scanner scanner f Buffer set Length 0 int c scanner read while f Detector is Word Part char c f Buffer append char c c scanner read scanner unread if f Buffer length f End Sequence length for int i f End Sequence length 1 j f Buffer length 1 i 0 i j if f End Sequence i f Buffer char At j unread Buffer scanner return false return true unread Buffer scanner return false  endSequenceDetected ICharacterScanner fBuffer setLength fDetector isWordPart fBuffer fBuffer fEndSequence fEndSequence fBuffer fEndSequence fBuffer charAt unreadBuffer unreadBuffer
Returns the characters in the buffer to the scanner Note that the rule must also return the characters read in as part of the start sequence expect the first one param scanner the scanner to be used protected void unread Buffer I Character Scanner scanner f Buffer insert 0 f Start Sequence for int i f Buffer length 1 i 0 i scanner unread  unreadBuffer ICharacterScanner fBuffer fStartSequence fBuffer

Creates a rule which with the help of an word detector will return the token associated with the detected word If no token has been associated the scanner will be rolled back and an undefined token will be returned in order to allow any subsequent rules to analyze the characters param detector the word detector to be used by this rule may not be code null code see add Word String I Token public Word Rule I Word Detector detector this detector Token UNDEFINED  addWord IToken WordRule IWordDetector
Creates a rule which with the help of an word detector will return the token associated with the detected word If no token has been associated the specified default token will be returned param detector the word detector to be used by this rule may not be code null code param default Token the default token to be returned on success if nothing else is specified may not be code null code see add Word String I Token public Word Rule I Word Detector detector I Token default Token Assert is Not Null detector Assert is Not Null default Token f Detector detector f Default Token default Token  defaultToken addWord IToken WordRule IWordDetector IToken defaultToken isNotNull isNotNull defaultToken fDetector fDefaultToken defaultToken
Adds a word and the token to be returned if it is detected param word the word this rule will search for may not be code null code param token the token to be returned if the word has been found may not be code null code public void add Word String word I Token token Assert is Not Null word Assert is Not Null token f Words put word token  addWord IToken isNotNull isNotNull fWords
Sets a column constraint for this rule If set the rule s token will only be returned if the pattern is detected starting at the specified column If the column is smaller then 0 the column constraint is considered removed param column the column in which the pattern starts public void set Column Constraint int column if column 0 column UNDEFINED f Column column  setColumnConstraint fColumn
public I Token evaluate I Character Scanner scanner int c scanner read if f Detector is Word Start char c if f Column UNDEFINED f Column scanner get Column 1 f Buffer set Length 0 do f Buffer append char c c scanner read while c I Character Scanner EOF f Detector is Word Part char c scanner unread I Token token I Token f Words get f Buffer to String if token null return token if f Default Token is Undefined unread Buffer scanner return f Default Token scanner unread return Token UNDEFINED  IToken ICharacterScanner fDetector isWordStart fColumn fColumn getColumn fBuffer setLength fBuffer ICharacterScanner fDetector isWordPart IToken IToken fWords fBuffer toString fDefaultToken isUndefined unreadBuffer fDefaultToken
Returns the characters in the buffer to the scanner param scanner the scanner to be used protected void unread Buffer I Character Scanner scanner for int i f Buffer length 1 i 0 i scanner unread  unreadBuffer ICharacterScanner fBuffer

public Replace int offset int new Offset int length String text this new Offset new Offset this offset offset this length length this text text  newOffset newOffset newOffset
Creates a new sequential rewrite store for the given source store param source the source text store public Sequential Rewrite Text Store I Text Store source f Replace List new Linked List f Source source  SequentialRewriteTextStore ITextStore fReplaceList LinkedList fSource
Returns the source store of this rewrite store return the source store of this rewrite store public I Text Store get Source Store commit return f Source  ITextStore getSourceStore fSource
public void replace int offset int length String text if f Replace List size 0 f Replace List add new Replace offset offset length text else Replace first Replace Replace f Replace List get 0 Replace last Replace Replace f Replace List get f Replace List size 1 backward if offset length first Replace new Offset int delta text length length if delta 0 for Iterator i f Replace List iterator i has Next Replace replace Replace i next replace new Offset delta f Replace List add 0 new Replace offset offset length text forward else if offset last Replace new Offset last Replace text length int delta get Delta last Replace f Replace List add new Replace offset delta offset length text else if ASSERT SEQUENTIALITY throw new Illegal Argument Exception else commit f Source replace offset length text  fReplaceList fReplaceList firstReplace fReplaceList lastReplace fReplaceList fReplaceList firstReplace newOffset fReplaceList hasNext newOffset fReplaceList lastReplace newOffset lastReplace getDelta lastReplace fReplaceList ASSERT_SEQUENTIALITY IllegalArgumentException fSource
see org eclipse jface text I Text Store set java lang String public void set String text f Source set text f Replace List clear  ITextStore fSource fReplaceList
public String get int offset int length if f Replace List size 0 return f Source get offset length else Replace first Replace Replace f Replace List get 0 Replace last Replace Replace f Replace List get f Replace List size 1 before if offset length first Replace new Offset return f Source get offset length after else if offset last Replace new Offset last Replace text length int delta get Delta last Replace return f Source get offset delta length else if ASSERT SEQUENTIALITY throw new Illegal Argument Exception else int delta 0 for Iterator i f Replace List iterator i has Next Replace replace Replace i next if offset length replace new Offset return f Source get offset delta length else if offset replace new Offset offset length replace new Offset replace text length return replace text substring offset replace new Offset offset replace new Offset length else if offset replace new Offset replace text length delta get Delta replace continue else commit return f Source get offset length return f Source get offset delta length  fReplaceList fSource firstReplace fReplaceList lastReplace fReplaceList fReplaceList firstReplace newOffset fSource lastReplace newOffset lastReplace getDelta lastReplace fSource ASSERT_SEQUENTIALITY IllegalArgumentException fReplaceList hasNext newOffset fSource newOffset newOffset newOffset newOffset newOffset getDelta fSource fSource
Returns the difference between the offset in the source store and the same offset in the rewrite store after the replace operation param replace the replace command return the difference private static final int get Delta Replace replace return replace new Offset replace offset replace text length replace length  getDelta newOffset
public char get int offset if f Replace List size 0 return f Source get offset else Replace first Replace Replace f Replace List get 0 Replace last Replace Replace f Replace List get f Replace List size 1 before if offset first Replace new Offset return f Source get offset after else if offset last Replace new Offset last Replace text length int delta get Delta last Replace return f Source get offset delta else if ASSERT SEQUENTIALITY throw new Illegal Argument Exception else int delta 0 for Iterator i f Replace List iterator i has Next Replace replace Replace i next if offset replace new Offset return f Source get offset delta else if offset replace new Offset replace text length return replace text char At offset replace new Offset delta get Delta replace return f Source get offset delta  fReplaceList fSource firstReplace fReplaceList lastReplace fReplaceList fReplaceList firstReplace newOffset fSource lastReplace newOffset lastReplace getDelta lastReplace fSource ASSERT_SEQUENTIALITY IllegalArgumentException fReplaceList hasNext newOffset fSource newOffset charAt newOffset getDelta fSource
public int get Length if f Replace List size 0 return f Source get Length else Replace last Replace Replace f Replace List get f Replace List size 1 return f Source get Length get Delta last Replace  getLength fReplaceList fSource getLength lastReplace fReplaceList fReplaceList fSource getLength getDelta lastReplace
Disposes this rewrite store public void dispose f Replace List null f Source null  fReplaceList fSource
Commits all buffered replace commands private void commit if f Replace List size 0 return String Buffer buffer new String Buffer int delta 0 for Iterator i f Replace List iterator i has Next Replace replace Replace i next int offset buffer length delta buffer append f Source get offset replace offset offset buffer append replace text delta get Delta replace int offset buffer length delta buffer append f Source get offset f Source get Length offset f Source set buffer to String f Replace List clear  fReplaceList StringBuffer StringBuffer fReplaceList hasNext fSource getDelta fSource fSource getLength fSource toString fReplaceList

Creates a new slave document event param doc the slave document param offset the offset in the slave document param length the length in the slave document param text the substitution text param master Event the master document event public Slave Document Event I Document doc int offset int length String text Document Event master Event super doc offset length text f Master Event master Event  masterEvent SlaveDocumentEvent IDocument DocumentEvent masterEvent fMasterEvent masterEvent
Returns this event s master event return this event s master event public Document Event get Master Event return f Master Event  DocumentEvent getMasterEvent fMasterEvent

Creates a new annotation that is not persistent and type less protected Annotation this null false null 
Creates a new annotation with the given properties param type the type of this annotation param is Persistent code true code if this annotation is persistent code false code otherwise param text the text associated with this annotation since 3 0 public Annotation String type boolean is Persistent String text f Type type f Is Persistent is Persistent f Text text  isPersistent isPersistent fType fIsPersistent isPersistent fText
Creates a new annotation with the given persistence state param is Persistent code true code if persistent code false code otherwise since 3 0 public Annotation boolean is Persistent this null is Persistent null  isPersistent isPersistent isPersistent
Returns whether this annotation is persistent return code true code if this annotation is persistent code false code otherwise since 3 0 public boolean is Persistent return f Is Persistent  isPersistent fIsPersistent
Sets the type of this annotation param type the annotation type since 3 0 public void set Type String type f Type type  setType fType
Returns the type of the annotation return the type of the annotation since 3 0 public String get Type return f Type null TYPE UNKNOWN f Type  getType fType TYPE_UNKNOWN fType
Marks this annotation deleted according to the value of the code deleted code parameter param deleted code true code if annotation should be marked as deleted since 3 0 public void mark Deleted boolean deleted f Marked As Deleted deleted  markDeleted fMarkedAsDeleted
Returns whether this annotation is marked as deleted return code true code if annotation is marked as deleted code false code otherwise since 3 0 public boolean is Marked Deleted return f Marked As Deleted  isMarkedDeleted fMarkedAsDeleted
Sets the text associated with this annotation param text the text associated with this annotation since 3 0 public void set Text String text f Text text  setText fText
Returns the text associated with this annotation return the text associated with this annotation or code null code since 3 0 public String get Text return f Text  getText fText

Creates a new information control closer public Closer 
see I Information Control Closer set Subject Control Control public void set Subject Control Control control f Subject Control control  IInformationControlCloser setSubjectControl setSubjectControl fSubjectControl
see I Information Control Closer set Hover Control I Hover Control public void set Information Control I Information Control control f Information Control control  IInformationControlCloser setHoverControl IHoverControl setInformationControl IInformationControl fInformationControl
public void start Rectangle subject Area if f Is Active return f Is Active true f Subject Area subject Area f Information Control add Dispose Listener this if f Subject Control null f Subject Control is Disposed f Subject Control add Mouse Listener this f Subject Control add Mouse Move Listener this f Subject Control add Mouse Track Listener this install control and key listeners on subject control in any case if f Subject Control null f Subject Control is Disposed f Subject Control add Control Listener this f Subject Control add Key Listener this  subjectArea fIsActive fIsActive fSubjectArea subjectArea fInformationControl addDisposeListener fSubjectControl fSubjectControl isDisposed fSubjectControl addMouseListener fSubjectControl addMouseMoveListener fSubjectControl addMouseTrackListener fSubjectControl fSubjectControl isDisposed fSubjectControl addControlListener fSubjectControl addKeyListener
see I Information Control Closer stop public void stop stop false  IInformationControlCloser
Stops the information control and if code delay Restart code is set allows restart only after a certain delay param delay Restart code true code if restart should be delayed protected void stop boolean delay Restart if f Is Active return f Is Active false hide Information Control if f Subject Control null f Subject Control is Disposed f Subject Control remove Mouse Listener this f Subject Control remove Mouse Move Listener this f Subject Control remove Mouse Track Listener this if f Subject Control null f Subject Control is Disposed f Subject Control remove Control Listener this f Subject Control remove Key Listener this  delayRestart delayRestart delayRestart fIsActive fIsActive hideInformationControl fSubjectControl fSubjectControl isDisposed fSubjectControl removeMouseListener fSubjectControl removeMouseMoveListener fSubjectControl removeMouseTrackListener fSubjectControl fSubjectControl isDisposed fSubjectControl removeControlListener fSubjectControl removeKeyListener
see org eclipse swt events Mouse Move Listener mouse Move org eclipse swt events Mouse Event public void mouse Move Mouse Event event if f Subject Area contains event x event y stop  MouseMoveListener mouseMove MouseEvent mouseMove MouseEvent fSubjectArea
see org eclipse swt events Mouse Listener mouse Up org eclipse swt events Mouse Event public void mouse Up Mouse Event event  MouseListener mouseUp MouseEvent mouseUp MouseEvent
see Mouse Listener mouse Down Mouse Event public void mouse Down Mouse Event event stop  MouseListener mouseDown MouseEvent mouseDown MouseEvent
see Mouse Listener mouse Double Click Mouse Event public void mouse Double Click Mouse Event event stop  MouseListener mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent
see Mouse Track Adapter mouse Exit Mouse Event public void mouse Exit Mouse Event event if f Allow Mouse Exit stop  MouseTrackAdapter mouseExit MouseEvent mouseExit MouseEvent fAllowMouseExit
see Control Listener control Resized Control Event public void control Resized Control Event event stop  ControlListener controlResized ControlEvent controlResized ControlEvent
see Control Listener control Moved Control Event public void control Moved Control Event event stop  ControlListener controlMoved ControlEvent controlMoved ControlEvent
see Key Listener key Released Key Event public void key Released Key Event event  KeyListener keyReleased KeyEvent keyReleased KeyEvent
see Key Listener key Pressed Key Event public void key Pressed Key Event event stop true  KeyListener keyPressed KeyEvent keyPressed KeyEvent
see org eclipse swt events Dispose Listener widget Disposed org eclipse swt events Dispose Event public void widget Disposed Dispose Event e stop  DisposeListener widgetDisposed DisposeEvent widgetDisposed DisposeEvent
Creates an annotation hover manager with the given parameters In addition the hovers anchor is RIGHT and the margin is 5 points to the right param source Viewer the source viewer this manager connects to param ruler the vertical ruler this manager connects to param annotation Hover the annotation hover providing the information to be displayed param creator the information control creator deprecated As of 2 1 replaced by link Annotation Bar Hover Manager Annotation Bar Hover Manager I Vertical Ruler Info I Source Viewer I Annotation Hover I Information Control Creator public Annotation Bar Hover Manager I Source Viewer source Viewer I Vertical Ruler ruler I Annotation Hover annotation Hover I Information Control Creator creator this ruler source Viewer annotation Hover creator  sourceViewer annotationHover AnnotationBarHoverManager AnnotationBarHoverManager IVerticalRulerInfo ISourceViewer IAnnotationHover IInformationControlCreator AnnotationBarHoverManager ISourceViewer sourceViewer IVerticalRuler IAnnotationHover annotationHover IInformationControlCreator sourceViewer annotationHover
Creates an annotation hover manager with the given parameters In addition the hovers anchor is RIGHT and the margin is 5 points to the right param ruler Info the vertical ruler this manager connects to param source Viewer the source viewer this manager connects to param annotation Hover the annotation hover providing the information to be displayed param creator the information control creator since 2 1 public Annotation Bar Hover Manager I Vertical Ruler Info ruler Info I Source Viewer source Viewer I Annotation Hover annotation Hover I Information Control Creator creator super creator Assert is Not Null source Viewer Assert is Not Null annotation Hover f Source Viewer source Viewer f Vertical Ruler Info ruler Info f Annotation Hover annotation Hover set Anchor ANCHOR RIGHT set Margins 5 0 set Closer new Closer  rulerInfo sourceViewer annotationHover AnnotationBarHoverManager IVerticalRulerInfo rulerInfo ISourceViewer sourceViewer IAnnotationHover annotationHover IInformationControlCreator isNotNull sourceViewer isNotNull annotationHover fSourceViewer sourceViewer fVerticalRulerInfo rulerInfo fAnnotationHover annotationHover setAnchor ANCHOR_RIGHT setMargins setCloser
protected void compute Information f Allow Mouse Exit false Mouse Event event get Hover Event I Annotation Hover hover get Hover event int line get Hover Line event if hover instanceof I Annotation Hover Extension I Annotation Hover Extension extension I Annotation Hover Extension hover set Custom Information Control Creator extension get Hover Control Creator I Line Range range extension get Hover Line Range f Source Viewer line range adapt Line Range range line if range null set Information extension get Hover Info f Source Viewer range compute Number Of Visible Lines compute Area range else set Information null null else set Custom Information Control Creator null set Information hover get Hover Info f Source Viewer line compute Area line  computeInformation fAllowMouseExit MouseEvent getHoverEvent IAnnotationHover getHover getHoverLine IAnnotationHoverExtension IAnnotationHoverExtension IAnnotationHoverExtension setCustomInformationControlCreator getHoverControlCreator ILineRange getHoverLineRange fSourceViewer adaptLineRange setInformation getHoverInfo fSourceViewer computeNumberOfVisibleLines computeArea setInformation setCustomInformationControlCreator setInformation getHoverInfo fSourceViewer computeArea
Adapts a given line range so that the result is a line range that does not overlap with any collapsed region and fits into the view port of the attached viewer param line Range the original line range param line the anchor line return the adapted line range since 3 0 private I Line Range adapt Line Range I Line Range line Range int line if line Range null line Range adapt Line Range To Folding line Range line if line Range null return adapt Line Range To Viewport line Range return null  lineRange ILineRange adaptLineRange ILineRange lineRange lineRange lineRange adaptLineRangeToFolding lineRange lineRange adaptLineRangeToViewport lineRange
Adapts a given line range so that the result is a line range that does not overlap with any collapsed region of the attached viewer param line Range the original line range param line the anchor line return the adapted line range since 3 0 private I Line Range adapt Line Range To Folding I Line Range line Range int line if f Source Viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 f Source Viewer try I Region region convert To Region line Range I Region coverage extension get Covered Model Ranges region if coverage null coverage length 0 I Region container find Region Containing Line coverage line if container null return convert To Line Range container catch Bad Location Exception x return null return line Range  lineRange ILineRange adaptLineRangeToFolding ILineRange lineRange fSourceViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 fSourceViewer IRegion convertToRegion lineRange IRegion getCoveredModelRanges IRegion findRegionContainingLine convertToLineRange BadLocationException lineRange
Adapts a given line range so that the result is a line range that fits into the view port of the attached viewer param line Range the original line range return the adapted line range since 3 0 private I Line Range adapt Line Range To Viewport I Line Range line Range try Styled Text text f Source Viewer get Text Widget int top Line text get Top Index int range Top Line get Widget Line Number line Range get Start Line int top Delta Math max top Line range Top Line 0 int line Height text get Line Height Rectangle size text get Client Area Rectangle trim text compute Trim 0 0 0 0 int height size height trim height int bottom Line top Line height line Height int range Bottom Line get Widget Line Number line Range get Start Line line Range get Number Of Lines 1 int bottom Delta Math max range Bottom Line bottom Line 0 return new Line Range line Range get Start Line top Delta line Range get Number Of Lines bottom Delta catch Bad Location Exception x return null  lineRange ILineRange adaptLineRangeToViewport ILineRange lineRange StyledText fSourceViewer getTextWidget topLine getTopIndex rangeTopLine getWidgetLineNumber lineRange getStartLine topDelta topLine rangeTopLine lineHeight getLineHeight getClientArea computeTrim bottomLine topLine lineHeight rangeBottomLine getWidgetLineNumber lineRange getStartLine lineRange getNumberOfLines bottomDelta rangeBottomLine bottomLine LineRange lineRange getStartLine topDelta lineRange getNumberOfLines bottomDelta BadLocationException
Converts a line range into a character range param line Range the line range return the corresponding character range throws Bad Location Exception in case the given line range is invalid private I Region convert To Region I Line Range line Range throws Bad Location Exception I Document document f Source Viewer get Document int start Offset document get Line Offset line Range get Start Line int end Line line Range get Start Line Math max 0 line Range get Number Of Lines 1 I Region line Info document get Line Information end Line int end Offset line Info get Offset line Info get Length return new Region start Offset end Offset start Offset  lineRange BadLocationException IRegion convertToRegion ILineRange lineRange BadLocationException IDocument fSourceViewer getDocument startOffset getLineOffset lineRange getStartLine endLine lineRange getStartLine lineRange getNumberOfLines IRegion lineInfo getLineInformation endLine endOffset lineInfo getOffset lineInfo getLength startOffset endOffset startOffset
Returns the region out of the given set that contains the given line or code null code param regions the set of regions param line the line return the region of the set that contains the line throws Bad Location Exception in case line is invalid private I Region find Region Containing Line I Region regions int line throws Bad Location Exception I Document document f Source Viewer get Document I Region line Info document get Line Information line for int i 0 i regions length i if Text Utilities overlaps regions i line Info return regions i return null  BadLocationException IRegion findRegionContainingLine IRegion BadLocationException IDocument fSourceViewer getDocument IRegion lineInfo getLineInformation TextUtilities lineInfo
Converts a given character region into a line range param region the character region return the corresponding line range throws Bad Location Exception in case the given region in invalid private I Line Range convert To Line Range I Region region throws Bad Location Exception I Document document f Source Viewer get Document int start Line document get Line Of Offset region get Offset int end Line document get Line Of Offset region get Offset region get Length return new Line Range start Line end Line start Line 1  BadLocationException ILineRange convertToLineRange IRegion BadLocationException IDocument fSourceViewer getDocument startLine getLineOfOffset getOffset endLine getLineOfOffset getOffset getLength LineRange startLine endLine startLine
Returns the visible area of the vertical ruler covered by the given line range param line Range the line range return the visible area private Rectangle compute Area I Line Range line Range try Styled Text text f Source Viewer get Text Widget int line Height text get Line Height int y get Widget Line Number line Range get Start Line line Height text get Top Pixel Point size f Vertical Ruler Info get Control get Size return new Rectangle 0 y size x line Height line Range get Number Of Lines catch Bad Location Exception x return null  lineRange computeArea ILineRange lineRange StyledText fSourceViewer getTextWidget lineHeight getLineHeight getWidgetLineNumber lineRange getStartLine lineHeight getTopPixel fVerticalRulerInfo getControl getSize lineHeight lineRange getNumberOfLines BadLocationException
Returns the number of the currently visible lines return the number of the currently visible lines private int compute Number Of Visible Lines Styled Text text f Source Viewer get Text Widget Point size f Vertical Ruler Info get Control get Size return size y text get Line Height  computeNumberOfVisibleLines StyledText fSourceViewer getTextWidget fVerticalRulerInfo getControl getSize getLineHeight
Determines the hover to be used to display information based on the source of the mouse hover event If code f Vertical Ruler Info code is not a composite ruler the standard hover is returned param event the source of the mouse hover event return the hover depending on code source code or code f Annotation Hover code if none can be found since 3 0 private I Annotation Hover get Hover Mouse Event event if event null event get Source null return f Annotation Hover if f Vertical Ruler Info instanceof Composite Ruler Composite Ruler comp Composite Ruler f Vertical Ruler Info for Iterator it comp get Decorator Iterator it has Next Object o it next if o instanceof I Vertical Ruler Info Extension o instanceof I Vertical Ruler Info if I Vertical Ruler Info o get Control event get Source I Annotation Hover hover I Vertical Ruler Info Extension o get Hover if hover null return hover return f Annotation Hover  fVerticalRulerInfo fAnnotationHover IAnnotationHover getHover MouseEvent getSource fAnnotationHover fVerticalRulerInfo CompositeRuler CompositeRuler CompositeRuler fVerticalRulerInfo getDecoratorIterator hasNext IVerticalRulerInfoExtension IVerticalRulerInfo IVerticalRulerInfo getControl getSource IAnnotationHover IVerticalRulerInfoExtension getHover fAnnotationHover
Returns the line of interest deduced from the mouse hover event param event a mouse hover event that triggered hovering return the document model line number on which the hover event occurred or code 1 code if there is no event since 3 0 private int get Hover Line Mouse Event event return event null 1 f Vertical Ruler Info to Document Line Number event y  getHoverLine MouseEvent fVerticalRulerInfo toDocumentLineNumber
Returns for the widget line number for the given document line number param line the absolute line number return the line number relative to the viewer s visible region throws Bad Location Exception if code line code is not valid in the viewer s document private int get Widget Line Number int line throws Bad Location Exception if f Source Viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 f Source Viewer return extension model Line2 Widget Line line I Region region f Source Viewer get Visible Region int first Line f Source Viewer get Document get Line Of Offset region get Offset return line first Line  BadLocationException getWidgetLineNumber BadLocationException fSourceViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 fSourceViewer modelLine2WidgetLine IRegion fSourceViewer getVisibleRegion firstLine fSourceViewer getDocument getLineOfOffset getOffset firstLine
Determines graphical area covered by the given line param line the number of the line in the viewer whose graphical extend in the vertical ruler must be computed return the graphical extend of the given line private Rectangle compute Area int line try Styled Text text f Source Viewer get Text Widget int line Height text get Line Height int y get Widget Line Number line line Height text get Top Pixel Point size f Vertical Ruler Info get Control get Size return new Rectangle 0 y size x line Height catch Bad Location Exception x return null  computeArea StyledText fSourceViewer getTextWidget lineHeight getLineHeight getWidgetLineNumber lineHeight getTopPixel fVerticalRulerInfo getControl getSize lineHeight BadLocationException
Returns the annotation hover for this hover manager return the annotation hover for this hover manager since 2 1 protected I Annotation Hover get Annotation Hover return f Annotation Hover  IAnnotationHover getAnnotationHover fAnnotationHover
Returns the source viewer for this hover manager return the source viewer for this hover manager since 2 1 protected I Source Viewer get Source Viewer return f Source Viewer  ISourceViewer getSourceViewer fSourceViewer
Returns the vertical ruler info for this hover manager return the vertical ruler info for this hover manager since 2 1 protected I Vertical Ruler Info get Vertical Ruler Info return f Vertical Ruler Info  IVerticalRulerInfo getVerticalRulerInfo fVerticalRulerInfo
protected Point compute Size Constraints Control subject Control Rectangle subject Area I Information Control information Control Point constraints super compute Size Constraints subject Control subject Area information Control Styled Text styled Text f Source Viewer get Text Widget if styled Text null Rectangle r styled Text get Client Area if r null constraints x r width Point size f Vertical Ruler Info get Control get Size constraints y size y subject Area y return constraints  computeSizeConstraints subjectControl subjectArea IInformationControl informationControl computeSizeConstraints subjectControl subjectArea informationControl StyledText styledText fSourceViewer getTextWidget styledText styledText getClientArea fVerticalRulerInfo getControl getSize subjectArea
protected Point compute Location Rectangle subject Area Point control Size Anchor anchor Mouse Event event get Hover Event I Annotation Hover hover get Hover event boolean allow Mouse Exit false if hover instanceof I Annotation Hover Extension I Annotation Hover Extension extension I Annotation Hover Extension hover allow Mouse Exit extension can Handle Mouse Cursor if allow Mouse Exit f Allow Mouse Exit true Control subject Control get Subject Control return a location that just overlaps the annotation on the bar if anchor Abstract Information Control Manager ANCHOR RIGHT return subject Control to Display subject Area x 4 subject Area y 2 else if anchor Abstract Hover Information Control Manager ANCHOR LEFT return subject Control to Display subject Area x subject Area width control Size x 4 subject Area y 2 f Allow Mouse Exit false return super compute Location subject Area control Size anchor  computeLocation subjectArea controlSize MouseEvent getHoverEvent IAnnotationHover getHover allowMouseExit IAnnotationHoverExtension IAnnotationHoverExtension IAnnotationHoverExtension allowMouseExit canHandleMouseCursor allowMouseExit fAllowMouseExit subjectControl getSubjectControl AbstractInformationControlManager ANCHOR_RIGHT subjectControl toDisplay subjectArea subjectArea AbstractHoverInformationControlManager ANCHOR_LEFT subjectControl toDisplay subjectArea subjectArea controlSize subjectArea fAllowMouseExit computeLocation subjectArea controlSize

Creates a new code Annotation Column code of the given width param width the width of this column deprecated public Annotation Column int width super width  AnnotationColumn AnnotationColumn

Creates a new annotation map with the given capacity param capacity the capacity public Annotation Map int capacity f Internal Map new Hash Map capacity  AnnotationMap fInternalMap HashMap
see org eclipse jface text source I Synchronizable set Lock Object java lang Object public void set Lock Object Object lock Object f Lock Object lock Object  ISynchronizable setLockObject setLockObject lockObject fLockObject lockObject
see org eclipse jface text source I Synchronizable get Lock Object public Object get Lock Object if f Lock Object null return this return f Lock Object  ISynchronizable getLockObject getLockObject fLockObject fLockObject
public Iterator values Iterator synchronized get Lock Object return new Array List f Internal Map values iterator  valuesIterator getLockObject ArrayList fInternalMap
public Iterator key Set Iterator synchronized get Lock Object return new Array List f Internal Map key Set iterator  keySetIterator getLockObject ArrayList fInternalMap keySet
public boolean contains Key Object annotation synchronized get Lock Object return f Internal Map contains Key annotation  containsKey getLockObject fInternalMap containsKey
public Object put Object annotation Object position synchronized get Lock Object return f Internal Map put annotation position  getLockObject fInternalMap
public Object get Object annotation synchronized get Lock Object return f Internal Map get annotation  getLockObject fInternalMap
public void clear synchronized get Lock Object f Internal Map clear  getLockObject fInternalMap
public Object remove Object annotation synchronized get Lock Object return f Internal Map remove annotation  getLockObject fInternalMap
public int size synchronized get Lock Object return f Internal Map size  getLockObject fInternalMap
public boolean is Empty synchronized get Lock Object return f Internal Map is Empty  isEmpty getLockObject fInternalMap isEmpty
public boolean contains Value Object value synchronized get Lock Object return f Internal Map contains Value value  containsValue getLockObject fInternalMap containsValue
public void put All Map map synchronized get Lock Object f Internal Map put All map  putAll getLockObject fInternalMap putAll
public Set entry Set synchronized get Lock Object return f Internal Map entry Set  entrySet getLockObject fInternalMap entrySet
public Set key Set synchronized get Lock Object return f Internal Map key Set  keySet getLockObject fInternalMap keySet
public Collection values synchronized get Lock Object return f Internal Map values  getLockObject fInternalMap

see org eclipse jface text source I Annotation Model Listener model Changed org eclipse jface text source I Annotation Model public void model Changed I Annotation Model model Annotation Model this fire Model Changed new Annotation Model Event model true  IAnnotationModelListener modelChanged IAnnotationModel modelChanged IAnnotationModel AnnotationModel fireModelChanged AnnotationModelEvent
see org eclipse jface text source I Annotation Model Listener Extension model Changed org eclipse jface text source Annotation Model Event public void model Changed Annotation Model Event event Annotation Model this fire Model Changed event  IAnnotationModelListenerExtension modelChanged AnnotationModelEvent modelChanged AnnotationModelEvent AnnotationModel fireModelChanged
f Document Listener new I Document Listener public void document About To Be Changed Document Event event  fDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent
public void document Changed Document Event event f Document Changed true  documentChanged DocumentEvent fDocumentChanged
Creates a new annotation model The annotation is empty i e does not manage any annotations and is not connected to any document public Annotation Model f Annotations new Annotation Map 10 f Annotation Model Listeners new Array List 2 f Document Listener new I Document Listener public void document About To Be Changed Document Event event public void document Changed Document Event event f Document Changed true  AnnotationModel fAnnotations AnnotationMap fAnnotationModelListeners ArrayList fDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent documentChanged DocumentEvent fDocumentChanged
Returns the annotation map internally used by this annotation model return the annotation map internally used by this annotation model since 3 0 protected I Annotation Map get Annotation Map return I Annotation Map f Annotations  IAnnotationMap getAnnotationMap IAnnotationMap fAnnotations
since 3 0 public Object get Lock Object return get Annotation Map get Lock Object  getLockObject getAnnotationMap getLockObject
since 3 0 public void set Lock Object Object lock Object get Annotation Map set Lock Object lock Object  setLockObject lockObject getAnnotationMap setLockObject lockObject
Returns the current annotation model event This is the event that will be sent out when calling code fire Model Changed code return the current annotation model event since 3 0 protected final Annotation Model Event get Annotation Model Event synchronized get Lock Object if f Model Event null f Model Event create Annotation Model Event f Model Event mark World Change false f Modification Stamp f Model Event return f Model Event  fireModelChanged AnnotationModelEvent getAnnotationModelEvent getLockObject fModelEvent fModelEvent createAnnotationModelEvent fModelEvent markWorldChange fModificationStamp fModelEvent fModelEvent
public void add Annotation Annotation annotation Position position try add Annotation annotation position true catch Bad Location Exception e ignore invalid position  addAnnotation addAnnotation BadLocationException
public void replace Annotations Annotation annotations To Remove Map annotations To Add try replace Annotations annotations To Remove annotations To Add true catch Bad Location Exception x  replaceAnnotations annotationsToRemove annotationsToAdd replaceAnnotations annotationsToRemove annotationsToAdd BadLocationException
Replaces the given annotations in this model and if advised fires a model change event param annotations To Remove the annotations to be removed param annotations To Add the annotations to be added param fire Model Changed code true code if a model change event should be fired code false code otherwise throws Bad Location Exception in case an annotation should be added at an invalid position since 3 0 protected void replace Annotations Annotation annotations To Remove Map annotations To Add boolean fire Model Changed throws Bad Location Exception if annotations To Remove null for int i 0 length annotations To Remove length i length i remove Annotation annotations To Remove i false if annotations To Add null Iterator iter annotations To Add entry Set iterator while iter has Next Map Entry map Entry Map Entry iter next Annotation annotation Annotation map Entry get Key Position position Position map Entry get Value add Annotation annotation position false if fire Model Changed fire Model Changed  annotationsToRemove annotationsToAdd fireModelChanged BadLocationException replaceAnnotations annotationsToRemove annotationsToAdd fireModelChanged BadLocationException annotationsToRemove annotationsToRemove removeAnnotation annotationsToRemove annotationsToAdd annotationsToAdd entrySet hasNext mapEntry mapEntry getKey mapEntry getValue addAnnotation fireModelChanged fireModelChanged
Adds the given annotation to this model Associates the annotation with the given position If requested all annotation model listeners are informed about this model change If the annotation is already managed by this model nothing happens param annotation the annotation to add param position the associate position param fire Model Changed indicates whether to notify all model listeners throws Bad Location Exception if the position is not a valid document position protected void add Annotation Annotation annotation Position position boolean fire Model Changed throws Bad Location Exception if f Annotations contains Key annotation add Position f Document position f Annotations put annotation position synchronized get Lock Object get Annotation Model Event annotation Added annotation if fire Model Changed fire Model Changed  fireModelChanged BadLocationException addAnnotation fireModelChanged BadLocationException fAnnotations containsKey addPosition fDocument fAnnotations getLockObject getAnnotationModelEvent annotationAdded fireModelChanged fireModelChanged
public void add Annotation Model Listener I Annotation Model Listener listener if f Annotation Model Listeners contains listener f Annotation Model Listeners add listener if listener instanceof I Annotation Model Listener Extension I Annotation Model Listener Extension extension I Annotation Model Listener Extension listener Annotation Model Event event create Annotation Model Event event mark Sealed extension model Changed event else listener model Changed this  addAnnotationModelListener IAnnotationModelListener fAnnotationModelListeners fAnnotationModelListeners IAnnotationModelListenerExtension IAnnotationModelListenerExtension IAnnotationModelListenerExtension AnnotationModelEvent createAnnotationModelEvent markSealed modelChanged modelChanged
Adds the given position to the default position category of the given document param document the document to which to add the position param position the position to add throws Bad Location Exception if the position is not a valid document position protected void add Position I Document document Position position throws Bad Location Exception if document null document add Position position  BadLocationException addPosition IDocument BadLocationException addPosition
Removes the given position from the default position category of the given document param document the document to which to add the position param position the position to add since 3 0 protected void remove Position I Document document Position position if document null document remove Position position  removePosition IDocument removePosition
public void connect I Document document Assert is True f Document null f Document document if f Document null f Document document Iterator e get Annotation Map values Iterator while e has Next try add Position f Document Position e next catch Bad Location Exception x ignore invalid position f Open Connections if f Open Connections 1 f Document add Document Listener f Document Listener connected for Iterator it f Attachments key Set iterator it has Next I Annotation Model model I Annotation Model f Attachments get it next model connect document  IDocument isTrue fDocument fDocument fDocument fDocument getAnnotationMap valuesIterator hasNext addPosition fDocument BadLocationException fOpenConnections fOpenConnections fDocument addDocumentListener fDocumentListener fAttachments keySet hasNext IAnnotationModel IAnnotationModel fAttachments
Hook method Is called as soon as this model becomes connected to a document Subclasses may re implement protected void connected 
Hook method Is called as soon as this model becomes disconnected from its document Subclasses may re implement protected void disconnected 
public void disconnect I Document document Assert is True f Document document for Iterator it f Attachments key Set iterator it has Next I Annotation Model model I Annotation Model f Attachments get it next model disconnect document f Open Connections if f Open Connections 0 disconnected f Document remove Document Listener f Document Listener if f Document null Iterator e get Annotation Map values Iterator while e has Next Position p Position e next remove Position f Document p f Document null  IDocument isTrue fDocument fAttachments keySet hasNext IAnnotationModel IAnnotationModel fAttachments fOpenConnections fOpenConnections fDocument removeDocumentListener fDocumentListener fDocument getAnnotationMap valuesIterator hasNext removePosition fDocument fDocument
Informs all annotation model listeners that this model has been changed protected void fire Model Changed Annotation Model Event model Event null synchronized get Lock Object if f Model Event null model Event f Model Event f Model Event null if model Event null fire Model Changed model Event  fireModelChanged AnnotationModelEvent modelEvent getLockObject fModelEvent modelEvent fModelEvent fModelEvent modelEvent fireModelChanged modelEvent
Creates and returns a new annotation model event Subclasses may override return a new and empty annotation model event since 3 0 protected Annotation Model Event create Annotation Model Event return new Annotation Model Event this  AnnotationModelEvent createAnnotationModelEvent AnnotationModelEvent
Informs all annotation model listeners that this model has been changed as described in the annotation model event The event is sent out to all listeners implementing code I Annotation Model Listener Extension code All other listeners are notified by just calling code model Changed I Annotation Model code param event the event to be sent out to the listeners since 2 0 protected void fire Model Changed Annotation Model Event event event mark Sealed if event is Empty return Array List v new Array List f Annotation Model Listeners Iterator e v iterator while e has Next I Annotation Model Listener l I Annotation Model Listener e next if l instanceof I Annotation Model Listener Extension I Annotation Model Listener Extension l model Changed event else l model Changed this  IAnnotationModelListenerExtension modelChanged IAnnotationModel fireModelChanged AnnotationModelEvent markSealed isEmpty ArrayList ArrayList fAnnotationModelListeners hasNext IAnnotationModelListener IAnnotationModelListener IAnnotationModelListenerExtension IAnnotationModelListenerExtension modelChanged modelChanged
Removes the given annotations from this model If requested all annotation model listeners will be informed about this change code model Initiated code indicates whether the deletion has been initiated by this model or by one of its clients param annotations the annotations to be removed param fire Model Changed indicates whether to notify all model listeners param model Initiated indicates whether this changes has been initiated by this model protected void remove Annotations List annotations boolean fire Model Changed boolean model Initiated if annotations size 0 Iterator e annotations iterator while e has Next remove Annotation Annotation e next false if fire Model Changed fire Model Changed  modelInitiated fireModelChanged modelInitiated removeAnnotations fireModelChanged modelInitiated hasNext removeAnnotation fireModelChanged fireModelChanged
Removes all annotations from the model whose associated positions have been deleted If requested inform all model listeners about the change param fire Model Changed indicates whether to notify all model listeners protected void cleanup boolean fire Model Changed cleanup fire Model Changed true  fireModelChanged fireModelChanged fireModelChanged
if f Model Event null new Thread public void run fire Model Changed  fModelEvent fireModelChanged
Removes all annotations from the model whose associated positions have been deleted If requested inform all model listeners about the change If requested a new thread is created for the notification of the model listeners param fire Model Changed indicates whether to notify all model listeners param fork Notification code true code iff notification should be done in a new thread since 3 0 private void cleanup boolean fire Model Changed boolean fork Notification if f Document Changed f Document Changed false Array List deleted new Array List Iterator e get Annotation Map key Set Iterator while e has Next Annotation a Annotation e next Position p Position f Annotations get a if p null p is Deleted deleted add a if fire Model Changed fork Notification remove Annotations deleted false false synchronized get Lock Object if f Model Event null new Thread public void run fire Model Changed start else remove Annotations deleted fire Model Changed false  fireModelChanged forkNotification fireModelChanged forkNotification fDocumentChanged fDocumentChanged ArrayList ArrayList getAnnotationMap keySetIterator hasNext fAnnotations isDeleted fireModelChanged forkNotification removeAnnotations getLockObject fModelEvent fireModelChanged removeAnnotations fireModelChanged
see org eclipse jface text source I Annotation Model get Annotation Iterator public Iterator get Annotation Iterator return get Annotation Iterator true true  IAnnotationModel getAnnotationIterator getAnnotationIterator getAnnotationIterator
private Object f Current Element public void remove throw new Unsupported Operation Exception  fCurrentElement UnsupportedOperationException
public boolean has Next if f Current Element null return true if f Current has Next f Current Element f Current next return true else if iter has Next f Current Iterator iter next return has Next else return false  hasNext fCurrentElement fCurrent hasNext fCurrentElement fCurrent hasNext fCurrent hasNext
public Object next if has Next throw new No Such Element Exception Object element f Current Element f Current Element null return element  hasNext NoSuchElementException fCurrentElement fCurrentElement
Returns all annotations managed by this model code cleanup code indicates whether all annotations whose associated positions are deleted should previously be removed from the model code recurse code indicates whether annotations of attached sub models should also be returned param cleanup indicates whether annotations with deleted associated positions are removed param recurse whether to return annotations managed by sub models return all annotations managed by this model since 3 0 private Iterator get Annotation Iterator boolean cleanup boolean recurse if recurse return get Annotation Iterator cleanup List iterators new Array List f Attachments size 1 iterators add get Annotation Iterator cleanup for Iterator it f Attachments key Set iterator it has Next iterators add I Annotation Model f Attachments get it next get Annotation Iterator final Iterator iter iterators iterator Meta iterator return new Iterator The current iterator private Iterator f Current Iterator iter next there is at least one The current element private Object f Current Element public void remove throw new Unsupported Operation Exception public boolean has Next if f Current Element null return true if f Current has Next f Current Element f Current next return true else if iter has Next f Current Iterator iter next return has Next else return false public Object next if has Next throw new No Such Element Exception Object element f Current Element f Current Element null return element  getAnnotationIterator getAnnotationIterator ArrayList fAttachments getAnnotationIterator fAttachments keySet hasNext IAnnotationModel fAttachments getAnnotationIterator fCurrent fCurrentElement UnsupportedOperationException hasNext fCurrentElement fCurrent hasNext fCurrentElement fCurrent hasNext fCurrent hasNext hasNext NoSuchElementException fCurrentElement fCurrentElement
Returns all annotations managed by this model code cleanup code indicates whether all annotations whose associated positions are deleted should previously be removed from the model param cleanup indicates whether annotations with deleted associated positions are removed return all annotations managed by this model protected Iterator get Annotation Iterator boolean cleanup if cleanup cleanup true return get Annotation Map key Set Iterator  getAnnotationIterator getAnnotationMap keySetIterator
public Position get Position Annotation annotation Position position Position f Annotations get annotation if position null return position Iterator it f Attachments values iterator while position null it has Next position I Annotation Model it next get Position annotation return position  getPosition fAnnotations fAttachments hasNext IAnnotationModel getPosition
since 3 0 public void remove All Annotations remove All Annotations true  removeAllAnnotations removeAllAnnotations
Removes all annotations from the annotation model If requested inform all model change listeners about this change param fire Model Changed indicates whether to notify all model listeners protected void remove All Annotations boolean fire Model Changed if f Document null Iterator e get Annotation Map key Set Iterator while e has Next Annotation a Annotation e next Position p Position f Annotations get a remove Position f Document p p delete synchronized get Lock Object get Annotation Model Event annotation Removed a p f Annotations clear if fire Model Changed fire Model Changed  fireModelChanged removeAllAnnotations fireModelChanged fDocument getAnnotationMap keySetIterator hasNext fAnnotations removePosition fDocument getLockObject getAnnotationModelEvent annotationRemoved fAnnotations fireModelChanged fireModelChanged
see org eclipse jface text source I Annotation Model remove Annotation org eclipse jface text source Annotation public void remove Annotation Annotation annotation remove Annotation annotation true  IAnnotationModel removeAnnotation removeAnnotation removeAnnotation
Removes the given annotation from the annotation model If requested inform all model change listeners about this change param annotation the annotation to be removed param fire Model Changed indicates whether to notify all model listeners protected void remove Annotation Annotation annotation boolean fire Model Changed if f Annotations contains Key annotation Position p null if f Document null p Position f Annotations get annotation remove Position f Document p p delete f Annotations remove annotation synchronized get Lock Object get Annotation Model Event annotation Removed annotation p if fire Model Changed fire Model Changed  fireModelChanged removeAnnotation fireModelChanged fAnnotations containsKey fDocument fAnnotations removePosition fDocument fAnnotations getLockObject getAnnotationModelEvent annotationRemoved fireModelChanged fireModelChanged
since 3 0 public void modify Annotation Position Annotation annotation Position position modify Annotation Position annotation position true  modifyAnnotationPosition modifyAnnotationPosition
Modifies the associated position of the given annotation to the given position If the annotation is not yet managed by this annotation model the annotation is added When the position is code null code the annotation is removed from the model p If requested all annotation model change listeners will be informed about the change param annotation the annotation whose associated position should be modified param position the position to whose values the associated position should be changed param fire Model Changed indicates whether to notify all model listeners since 3 0 protected void modify Annotation Position Annotation annotation Position position boolean fire Model Changed if position null remove Annotation annotation fire Model Changed else Position p Position f Annotations get annotation if p null if position get Offset p get Offset position get Length p get Length p set Offset position get Offset p set Length position get Length synchronized get Lock Object get Annotation Model Event annotation Changed annotation if fire Model Changed fire Model Changed else try add Annotation annotation position fire Model Changed catch Bad Location Exception x ignore invalid position  fireModelChanged modifyAnnotationPosition fireModelChanged removeAnnotation fireModelChanged fAnnotations getOffset getOffset getLength getLength setOffset getOffset setLength getLength getLockObject getAnnotationModelEvent annotationChanged fireModelChanged fireModelChanged addAnnotation fireModelChanged BadLocationException
Modifies the given annotation if the annotation is managed by this annotation model p If requested all annotation model change listeners will be informed about the change param annotation the annotation to be modified param fire Model Changed indicates whether to notify all model listeners since 3 0 protected void modify Annotation Annotation annotation boolean fire Model Changed if f Annotations contains Key annotation synchronized get Lock Object get Annotation Model Event annotation Changed annotation if fire Model Changed fire Model Changed  fireModelChanged modifyAnnotation fireModelChanged fAnnotations containsKey getLockObject getAnnotationModelEvent annotationChanged fireModelChanged fireModelChanged
see I Annotation Model remove Annotation Model Listener I Annotation Model Listener public void remove Annotation Model Listener I Annotation Model Listener listener f Annotation Model Listeners remove listener  IAnnotationModel removeAnnotationModelListener IAnnotationModelListener removeAnnotationModelListener IAnnotationModelListener fAnnotationModelListeners
public void add Annotation Model Object key I Annotation Model attachment Assert is Not Null attachment if f Attachments contains Value attachment f Attachments put key attachment for int i 0 i f Open Connections i attachment connect f Document attachment add Annotation Model Listener f Model Listener  addAnnotationModel IAnnotationModel isNotNull fAttachments containsValue fAttachments fOpenConnections fDocument addAnnotationModelListener fModelListener
since 3 0 public I Annotation Model get Annotation Model Object key return I Annotation Model f Attachments get key  IAnnotationModel getAnnotationModel IAnnotationModel fAttachments
public I Annotation Model remove Annotation Model Object key I Annotation Model ret I Annotation Model f Attachments remove key if ret null for int i 0 i f Open Connections i ret disconnect f Document ret remove Annotation Model Listener f Model Listener return ret  IAnnotationModel removeAnnotationModel IAnnotationModel IAnnotationModel fAttachments fOpenConnections fDocument removeAnnotationModelListener fModelListener
since 3 0 public Object get Modification Stamp return f Modification Stamp  getModificationStamp fModificationStamp

Creates a new annotation model event for the given model param model the model public Annotation Model Event I Annotation Model model this model true  AnnotationModelEvent IAnnotationModel
Creates a new annotation model event for the given model param model the model param is World Change code true code if world change since 3 0 public Annotation Model Event I Annotation Model model boolean is World Change f Annotation Model model f Is World Change is World Change  isWorldChange AnnotationModelEvent IAnnotationModel isWorldChange fAnnotationModel fIsWorldChange isWorldChange
Returns the model this event refers to return the model this events belongs to public I Annotation Model get Annotation Model return f Annotation Model  IAnnotationModel getAnnotationModel fAnnotationModel
Adds the given annotation to the set of annotations that are reported as being added from the model If this event is considered a world change it is no longer so after this method has successfully finished param annotation the added annotation since 3 0 public void annotation Added Annotation annotation f Added Annotations add annotation f Is World Change false  annotationAdded fAddedAnnotations fIsWorldChange
Returns the added annotations return the added annotations since 3 0 public Annotation get Added Annotations int size f Added Annotations size Annotation added new Annotation size f Added Annotations to Array added return added  getAddedAnnotations fAddedAnnotations fAddedAnnotations toArray
Adds the given annotation to the set of annotations that are reported as being removed from the model If this event is considered a world change it is no longer so after this method has successfully finished param annotation the removed annotation since 3 0 public void annotation Removed Annotation annotation annotation Removed annotation null  annotationRemoved annotationRemoved
Adds the given annotation to the set of annotations that are reported as being removed from the model If this event is considered a world change it is no longer so after this method has successfully finished param annotation the removed annotation param position the position of the removed annotation since 3 0 public void annotation Removed Annotation annotation Position position f Removed Annotations put annotation position f Is World Change false  annotationRemoved fRemovedAnnotations fIsWorldChange
Returns the removed annotations return the removed annotations since 3 0 public Annotation get Removed Annotations int size f Removed Annotations size Annotation removed new Annotation size f Removed Annotations key Set to Array removed return removed  getRemovedAnnotations fRemovedAnnotations fRemovedAnnotations keySet toArray
Returns the position of the removed annotation at that point in time when the annotation has been removed param annotation the removed annotation return the position of the removed annotation or code null code since 3 0 public Position get Position Of Removed Annotation Annotation annotation return Position f Removed Annotations get annotation  getPositionOfRemovedAnnotation fRemovedAnnotations
Adds the given annotation to the set of annotations that are reported as being changed from the model If this event is considered a world change it is no longer so after this method has successfully finished param annotation the changed annotation since 3 0 public void annotation Changed Annotation annotation f Changed Annotations add annotation f Is World Change false  annotationChanged fChangedAnnotations fIsWorldChange
Returns the changed annotations return the changed annotations since 3 0 public Annotation get Changed Annotations int size f Changed Annotations size Annotation changed new Annotation size f Changed Annotations to Array changed return changed  getChangedAnnotations fChangedAnnotations fChangedAnnotations toArray
Returns whether this annotation model event is empty or not If this event represents a world change this method returns code false code although the event does not carry any added removed or changed annotations return code true code if this event is empty since 3 0 public boolean is Empty return f Is World Change f Added Annotations is Empty f Removed Annotations is Empty f Changed Annotations is Empty  isEmpty fIsWorldChange fAddedAnnotations isEmpty fRemovedAnnotations isEmpty fChangedAnnotations isEmpty
Returns whether this annotation model events contains detailed information about the modifications applied to the event annotation model or whether it represents a world change I e everything in the model might have changed return code true code if world change code false code otherwise since 3 0 public boolean is World Change return f Is World Change  isWorldChange fIsWorldChange
Marks this event as world change according to the given flag param is World Change code true code if this event is a world change code false code otherwise since 3 0 void mark World Change boolean is World Change f Is World Change is World Change  isWorldChange markWorldChange isWorldChange fIsWorldChange isWorldChange
Returns whether this annotation model event is still valid return code true code if this event is still valid code false code otherwise since 3 0 public boolean is Valid if f Modification Stamp null f Annotation Model instanceof I Annotation Model Extension I Annotation Model Extension extension I Annotation Model Extension f Annotation Model return f Modification Stamp extension get Modification Stamp return true  isValid fModificationStamp fAnnotationModel IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension fAnnotationModel fModificationStamp getModificationStamp
Seals this event Any direct modification to the annotation model after the event has been sealed invalidates this event since 3 0 public void mark Sealed if f Annotation Model instanceof I Annotation Model Extension I Annotation Model Extension extension I Annotation Model Extension f Annotation Model f Modification Stamp extension get Modification Stamp  markSealed fAnnotationModel IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension fAnnotationModel fModificationStamp getModificationStamp

public interface I Drawing Strategy Draws a decoration of the given length start at the given offset in the given color onto the specified GC param annotation the annotation to be drawn param gc the graphical context param text Widget the text widget to draw on param offset the offset of the line param length the length of the line param color the color of the line  IDrawingStrategy textWidget
public void draw Annotation annotation GC gc Styled Text text Widget int offset int length Color color if gc null Point left text Widget get Location At Offset offset Point right text Widget get Location At Offset offset length gc set Foreground color int polyline compute Polyline left right text Widget get Baseline text Widget get Line Height gc draw Polyline polyline else text Widget redraw Range offset length true  StyledText textWidget textWidget getLocationAtOffset textWidget getLocationAtOffset setForeground computePolyline textWidget getBaseline textWidget getLineHeight drawPolyline textWidget redrawRange
Computes an array of alternating x and y values which are the corners of the squiggly line of the given height between the given end points param left the left end point param right the right end point param baseline the font s baseline param line Height the height of the line return the array of alternating x and y values which are the corners of the squiggly line private int compute Polyline Point left Point right int baseline int line Height final int WIDTH 4 must be even final int HEIGHT 2 can be any number final int MINPEEKS 2 minimal number of peeks int peeks right x left x WIDTH if peeks MINPEEKS int missing MINPEEKS peeks WIDTH left x Math max 0 left x missing 2 peeks MINPEEKS int leftX left x compute number of point 2 int length 2 peeks 1 2 if length 0 return new int 0 int coordinates new int length cache peeks y coordinates int top left y Math min baseline 1 line Height HEIGHT 1 int bottom top HEIGHT populate array with peek coordinates for int i 0 i peeks i int index 4 i coordinates index leftX WIDTH i coordinates index 1 bottom coordinates index 2 coordinates index WIDTH 2 coordinates index 3 top the last down flank is missing coordinates length 2 left x WIDTH peeks coordinates length 1 bottom return coordinates  lineHeight computePolyline lineHeight lineHeight
since 3 0 public void draw Annotation annotation GC gc Styled Text text Widget int offset int length Color color do nothing  StyledText textWidget
see org eclipse jface text I Region get Length public int get Length return f Length  IRegion getLength getLength fLength
see org eclipse jface text I Region get Offset public int get Offset return f Offset  IRegion getOffset getOffset fOffset
Updates this region param offset the new offset param length the new length public void update int offset int length f Offset offset f Length length  fOffset fLength
Creates a new annotation painter for the given source viewer and with the given annotation access The painter is not initialized i e no annotation types are configured to be painted param source Viewer the source viewer for this painter param access the annotation access for this painter public Annotation Painter I Source Viewer source Viewer I Annotation Access access f Source Viewer source Viewer f Annotation Access access f Text Widget source Viewer get Text Widget default drawing strategies squiggles were the only decoration style before version 3 0 f Registered Drawing Strategies put SQUIGGLES fg Squiggly Drawer  sourceViewer AnnotationPainter ISourceViewer sourceViewer IAnnotationAccess fSourceViewer sourceViewer fAnnotationAccess fTextWidget sourceViewer getTextWidget fRegisteredDrawingStrategies fgSquigglyDrawer
Returns whether this painter has to draw any squiggles return code true code if there are squiggles to be drawn code false code otherwise private boolean has Decorations synchronized f Decoration Map Lock return f Decorations Map is Empty  hasDecorations fDecorationMapLock fDecorationsMap isEmpty
Enables painting This painter registers a paint listener with the source viewer s widget private void enable Painting if f Is Painting has Decorations f Is Painting true f Text Widget add Paint Listener this handle Draw Request null  enablePainting fIsPainting hasDecorations fIsPainting fTextWidget addPaintListener handleDrawRequest
Disables painting if is has previously been enabled Removes any paint listeners registered with the source viewer s widget param redraw code true code if the widget should be redrawn after disabling private void disable Painting boolean redraw if f Is Painting f Is Painting false f Text Widget remove Paint Listener this if redraw has Decorations handle Draw Request null  disablePainting fIsPainting fIsPainting fTextWidget removePaintListener hasDecorations handleDrawRequest
Sets the annotation model for this painter Registers this painter as listener of the give model if the model is not code null code param model the annotation model private void set Model I Annotation Model model if f Model model if f Model null f Model remove Annotation Model Listener this f Model model if f Model null try f Is Setting Model true f Model add Annotation Model Listener this finally f Is Setting Model false  setModel IAnnotationModel fModel fModel fModel removeAnnotationModelListener fModel fModel fIsSettingModel fModel addAnnotationModelListener fIsSettingModel
Updates the set of decorations based on the current state of the painter s annotation model param event the annotation model event private void catchup With Model Annotation Model Event event synchronized f Decoration Map Lock if f Decorations Map null return int highlight Annotation Range Start Integer MAX VALUE int highlight Annotation Range End 1 if f Model null Map decorations Map Map highlighted Decorations Map Clone decoration maps synchronized f Decoration Map Lock decorations Map new Hash Map f Decorations Map synchronized f Highlighted Decorations Map Lock highlighted Decorations Map new Hash Map f Highlighted Decorations Map boolean is World Change false Iterator e if event null event is World Change is World Change true if DEBUG event null System out println AP INTERNAL CHANGE NON NLS 1 decorations Map clear highlighted Decorations Map clear e f Model get Annotation Iterator else Remove annotations Annotation removed Annotations event get Removed Annotations for int i 0 length removed Annotations length i length i Annotation annotation removed Annotations i Decoration decoration Decoration highlighted Decorations Map remove annotation if decoration null Position position decoration f Position if position null highlight Annotation Range Start Math min highlight Annotation Range Start position offset highlight Annotation Range End Math max highlight Annotation Range End position offset position length decorations Map remove annotation Update existing annotations Annotation changed Annotations event get Changed Annotations for int i 0 length changed Annotations length i length i Annotation annotation changed Annotations i Object annotation Type annotation get Type boolean is Highlighting should Be Highlighted annotation Type boolean is Drawing Squiggles should Be Drawn annotation Type Decoration decoration Decoration highlighted Decorations Map get annotation if decoration null The call below updates the decoration no need to create new decoration decoration get Decoration annotation decoration is Drawing Squiggles is Highlighting if decoration null highlighted Decorations Map remove annotation else decoration get Decoration annotation decoration is Drawing Squiggles is Highlighting if decoration null is Highlighting highlighted Decorations Map put annotation decoration Position position null if decoration null position f Model get Position annotation else position decoration f Position if position null position is Deleted highlight Annotation Range Start Math min highlight Annotation Range Start position offset highlight Annotation Range End Math max highlight Annotation Range End position offset position length else highlighted Decorations Map remove annotation Decoration old Decoration Decoration decorations Map get annotation if decoration null is Drawing Squiggles decorations Map put annotation decoration else if old Decoration null decorations Map remove annotation e Arrays as List event get Added Annotations iterator Add new annotations while e has Next Annotation annotation Annotation e next Object annotation Type annotation get Type boolean is Highlighting should Be Highlighted annotation Type boolean is Drawing Squiggles should Be Drawn annotation Type Decoration pp get Decoration annotation null is Drawing Squiggles is Highlighting if pp null if is Drawing Squiggles decorations Map put annotation pp if is Highlighting highlighted Decorations Map put annotation pp highlight Annotation Range Start Math min highlight Annotation Range Start pp f Position offset highlight Annotation Range End Math max highlight Annotation Range End pp f Position offset pp f Position length synchronized f Decoration Map Lock f Decorations Map decorations Map synchronized f Highlighted Decorations Map Lock f Highlighted Decorations Map highlighted Decorations Map update Highlight Ranges highlight Annotation Range Start highlight Annotation Range End is World Change  catchupWithModel AnnotationModelEvent fDecorationMapLock fDecorationsMap highlightAnnotationRangeStart MAX_VALUE highlightAnnotationRangeEnd fModel decorationsMap highlightedDecorationsMap fDecorationMapLock decorationsMap HashMap fDecorationsMap fHighlightedDecorationsMapLock highlightedDecorationsMap HashMap fHighlightedDecorationsMap isWorldChange isWorldChange isWorldChange decorationsMap highlightedDecorationsMap fModel getAnnotationIterator removedAnnotations getRemovedAnnotations removedAnnotations removedAnnotations highlightedDecorationsMap fPosition highlightAnnotationRangeStart highlightAnnotationRangeStart highlightAnnotationRangeEnd highlightAnnotationRangeEnd decorationsMap changedAnnotations getChangedAnnotations changedAnnotations changedAnnotations annotationType getType isHighlighting shouldBeHighlighted annotationType isDrawingSquiggles shouldBeDrawn annotationType highlightedDecorationsMap getDecoration isDrawingSquiggles isHighlighting highlightedDecorationsMap getDecoration isDrawingSquiggles isHighlighting isHighlighting highlightedDecorationsMap fModel getPosition fPosition isDeleted highlightAnnotationRangeStart highlightAnnotationRangeStart highlightAnnotationRangeEnd highlightAnnotationRangeEnd highlightedDecorationsMap oldDecoration decorationsMap isDrawingSquiggles decorationsMap oldDecoration decorationsMap asList getAddedAnnotations hasNext annotationType getType isHighlighting shouldBeHighlighted annotationType isDrawingSquiggles shouldBeDrawn annotationType getDecoration isDrawingSquiggles isHighlighting isDrawingSquiggles decorationsMap isHighlighting highlightedDecorationsMap highlightAnnotationRangeStart highlightAnnotationRangeStart fPosition highlightAnnotationRangeEnd highlightAnnotationRangeEnd fPosition fPosition fDecorationMapLock fDecorationsMap decorationsMap fHighlightedDecorationsMapLock fHighlightedDecorationsMap highlightedDecorationsMap updateHighlightRanges highlightAnnotationRangeStart highlightAnnotationRangeEnd isWorldChange
Updates the remembered highlight ranges param highlight Annotation Range Start the start of the range param highlight Annotation Range Endthe end of the range param is World Changetells whether the range belongs to a annotation model event reporting a world change since 3 0 private void update Highlight Ranges int highlight Annotation Range Start int highlight Annotation Range End boolean is World Change if highlight Annotation Range Start Integer MAX VALUE int max Range Start highlight Annotation Range Start int max Range End highlight Annotation Range End if f Total Highlight Annotation Range null max Range Start Math min max Range Start f Total Highlight Annotation Range offset max Range End Math max max Range End f Total Highlight Annotation Range offset f Total Highlight Annotation Range length if f Total Highlight Annotation Range null f Total Highlight Annotation Range new Position 0 if f Current Highlight Annotation Range null f Current Highlight Annotation Range new Position 0 if is World Change f Total Highlight Annotation Range offset highlight Annotation Range Start f Total Highlight Annotation Range length highlight Annotation Range End highlight Annotation Range Start f Current Highlight Annotation Range offset max Range Start f Current Highlight Annotation Range length max Range End max Range Start else f Total Highlight Annotation Range offset max Range Start f Total Highlight Annotation Range length max Range End max Range Start f Current Highlight Annotation Range offset highlight Annotation Range Start f Current Highlight Annotation Range length highlight Annotation Range End highlight Annotation Range Start else if is World Change f Current Highlight Annotation Range f Total Highlight Annotation Range f Total Highlight Annotation Range null else f Current Highlight Annotation Range null adapt To Document Length f Current Highlight Annotation Range adapt To Document Length f Total Highlight Annotation Range  highlightAnnotationRangeStart highlightAnnotationRangeEndthe isWorldChangetells updateHighlightRanges highlightAnnotationRangeStart highlightAnnotationRangeEnd isWorldChange highlightAnnotationRangeStart MAX_VALUE maxRangeStart highlightAnnotationRangeStart maxRangeEnd highlightAnnotationRangeEnd fTotalHighlightAnnotationRange maxRangeStart maxRangeStart fTotalHighlightAnnotationRange maxRangeEnd maxRangeEnd fTotalHighlightAnnotationRange fTotalHighlightAnnotationRange fTotalHighlightAnnotationRange fTotalHighlightAnnotationRange fCurrentHighlightAnnotationRange fCurrentHighlightAnnotationRange isWorldChange fTotalHighlightAnnotationRange highlightAnnotationRangeStart fTotalHighlightAnnotationRange highlightAnnotationRangeEnd highlightAnnotationRangeStart fCurrentHighlightAnnotationRange maxRangeStart fCurrentHighlightAnnotationRange maxRangeEnd maxRangeStart fTotalHighlightAnnotationRange maxRangeStart fTotalHighlightAnnotationRange maxRangeEnd maxRangeStart fCurrentHighlightAnnotationRange highlightAnnotationRangeStart fCurrentHighlightAnnotationRange highlightAnnotationRangeEnd highlightAnnotationRangeStart isWorldChange fCurrentHighlightAnnotationRange fTotalHighlightAnnotationRange fTotalHighlightAnnotationRange fCurrentHighlightAnnotationRange adaptToDocumentLength fCurrentHighlightAnnotationRange adaptToDocumentLength fTotalHighlightAnnotationRange
Adapts the given position to the document length param position the position to adapt since 3 0 private void adapt To Document Length Position position if position null return int length f Source Viewer get Document get Length position offset Math min position offset length position length Math min position length length position offset  adaptToDocumentLength fSourceViewer getDocument getLength
Returns a decoration for the given annotation if this annotation is valid and shown by this painter param annotation the annotation param decoration the decoration to be adapted and returned or code null code if a new one must be created param is Drawing Squigglestells if squiggles should be drawn for this annotation param is Highlightingtells if this annotation should be highlighted return the decoration or code null code if there s no valid one since 3 0 private Decoration get Decoration Annotation annotation Decoration decoration boolean is Drawing Squiggles boolean is Highlighting if annotation is Marked Deleted return null Color color null if is Drawing Squiggles is Highlighting color find Color annotation get Type if color null return null Position position f Model get Position annotation if position null position is Deleted return null if decoration null decoration new Decoration decoration f Position position decoration f Color color if f Annotation Access instanceof I Annotation Access Extension I Annotation Access Extension extension I Annotation Access Extension f Annotation Access decoration f Layer extension get Layer annotation else decoration f Layer I Annotation Access Extension DEFAULT LAYER decoration f Painter get Drawing Strategy annotation return decoration  isDrawingSquigglestells isHighlightingtells getDecoration isDrawingSquiggles isHighlighting isMarkedDeleted isDrawingSquiggles isHighlighting findColor getType fModel getPosition isDeleted fPosition fColor fAnnotationAccess IAnnotationAccessExtension IAnnotationAccessExtension IAnnotationAccessExtension fAnnotationAccess fLayer getLayer fLayer IAnnotationAccessExtension DEFAULT_LAYER fPainter getDrawingStrategy
Returns the drawing type for the given annotation param annotation the annotation return the annotation painter since 3 0 private I Drawing Strategy get Drawing Strategy Annotation annotation String type annotation get Type I Drawing Strategy strategy I Drawing Strategy f Registered Drawing Strategies get f Annotation Type2 Drawing Strategy Id get type if strategy null return strategy if f Annotation Access instanceof I Annotation Access Extension I Annotation Access Extension ext I Annotation Access Extension f Annotation Access Object sts ext get Supertypes type for int i 0 i sts length i strategy I Drawing Strategy f Registered Drawing Strategies get f Annotation Type2 Drawing Strategy Id get sts i if strategy null return strategy return fg Null Drawer  IDrawingStrategy getDrawingStrategy getType IDrawingStrategy IDrawingStrategy fRegisteredDrawingStrategies fAnnotationType2DrawingStrategyId fAnnotationAccess IAnnotationAccessExtension IAnnotationAccessExtension IAnnotationAccessExtension fAnnotationAccess getSupertypes IDrawingStrategy fRegisteredDrawingStrategies fAnnotationType2DrawingStrategyId fgNullDrawer
Returns whether the given annotation type should be drawn param annotation Type the annotation type return code true code if annotation type should be drawn code false code otherwise since 3 0 private boolean should Be Drawn Object annotation Type return contains annotation Type f Allowed Annotation Types f Configured Annotation Types  annotationType shouldBeDrawn annotationType annotationType fAllowedAnnotationTypes fConfiguredAnnotationTypes
Returns whether the given annotation type should be highlighted param annotation Type the annotation type return code true code if annotation type should be highlighted code false code otherwise since 3 0 private boolean should Be Highlighted Object annotation Type return contains annotation Type f Allowed Highlight Annotation Types f Configured Highlight Annotation Types  annotationType shouldBeHighlighted annotationType annotationType fAllowedHighlightAnnotationTypes fConfiguredHighlightAnnotationTypes
Returns whether the given annotation type is contained in the given code allowed code set This is the case if the type is either in the set or covered by the code configured code set param annotation Type the annotation type param allowed set with allowed annotation types param configured set with configured annotation types return code true code if annotation is contained code false code otherwise since 3 0 private boolean contains Object annotation Type Set allowed Set configured if allowed contains annotation Type return true boolean covered is Covered annotation Type configured if covered allowed add annotation Type return covered  annotationType annotationType annotationType isCovered annotationType annotationType
Computes whether the annotations of the given type are covered by the given code configured code set This is the case if either the type of the annotation or any of its super types is contained in the code configured code set param annotation Type the annotation type param configured set with configured annotation types return code true code if annotation is covered code false code otherwise since 3 0 private boolean is Covered Object annotation Type Set configured if f Annotation Access instanceof I Annotation Access Extension I Annotation Access Extension extension I Annotation Access Extension f Annotation Access Iterator e configured iterator while e has Next if extension is Subtype annotation Type e next return true return false return configured contains annotation Type  annotationType isCovered annotationType fAnnotationAccess IAnnotationAccessExtension IAnnotationAccessExtension IAnnotationAccessExtension fAnnotationAccess hasNext isSubtype annotationType annotationType
Returns the color for the given annotation type param annotation Type the annotation type return the color since 3 0 private Color find Color Object annotation Type Color color Color f Color Table get annotation Type if color null return color if f Annotation Access instanceof I Annotation Access Extension I Annotation Access Extension extension I Annotation Access Extension f Annotation Access Object super Types extension get Supertypes annotation Type if super Types null for int i 0 i super Types length i color Color f Color Table get super Types i if color null return color return null  annotationType findColor annotationType fColorTable annotationType fAnnotationAccess IAnnotationAccessExtension IAnnotationAccessExtension IAnnotationAccessExtension fAnnotationAccess superTypes getSupertypes annotationType superTypes superTypes fColorTable superTypes
Recomputes the squiggles to be drawn and redraws them param event the annotation model event since 3 0 private void update Painting Annotation Model Event event disable Painting true catchup With Model event if f Input Document About To Be Changed invalidate Text Presentation enable Painting  updatePainting AnnotationModelEvent disablePainting catchupWithModel fInputDocumentAboutToBeChanged invalidateTextPresentation enablePainting
private void invalidate Text Presentation I Region r null synchronized f Highlighted Decorations Map Lock if f Current Highlight Annotation Range null r new Region f Current Highlight Annotation Range get Offset f Current Highlight Annotation Range get Length if r null return if f Source Viewer instanceof I Text Viewer Extension2 if DEBUG System out println AP invalidating offset r get Offset length r get Length NON NLS 1 NON NLS 2 I Text Viewer Extension2 f Source Viewer invalidate Text Presentation r get Offset r get Length else f Source Viewer invalidate Text Presentation  invalidateTextPresentation IRegion fHighlightedDecorationsMapLock fCurrentHighlightAnnotationRange fCurrentHighlightAnnotationRange getOffset fCurrentHighlightAnnotationRange getLength fSourceViewer ITextViewerExtension2 getOffset getLength ITextViewerExtension2 fSourceViewer invalidateTextPresentation getOffset getLength fSourceViewer invalidateTextPresentation
public void apply Text Presentation Text Presentation tp Set decorations synchronized f Highlighted Decorations Map Lock if f Highlighted Decorations Map null f Highlighted Decorations Map is Empty return decorations new Hash Set f Highlighted Decorations Map entry Set I Region region tp get Extent if DEBUG System out println AP applying text presentation offset region get Offset length region get Length NON NLS 1 NON NLS 2 for int layer 0 max Layer 1 layer max Layer layer for Iterator iter decorations iterator iter has Next Map Entry entry Map Entry iter next Annotation a Annotation entry get Key if a is Marked Deleted continue Decoration pp Decoration entry get Value max Layer Math max max Layer pp f Layer 1 dynamically update layer maximum if pp f Layer layer wrong layer skip annotation continue Position p pp f Position if f Source Viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension3 I Text Viewer Extension5 f Source Viewer if null extension3 model Range2 Widget Range new Region p get Offset p get Length continue else if f Source Viewer overlaps With Visible Region p offset p length continue int region End region get Offset region get Length int p End p get Offset p get Length if p End region get Offset region End p get Offset int start Math max p get Offset region get Offset int end Math min region End p End int length Math max end start 0 tp merge Style Range new Style Range start length null pp f Color  applyTextPresentation TextPresentation fHighlightedDecorationsMapLock fHighlightedDecorationsMap fHighlightedDecorationsMap isEmpty HashSet fHighlightedDecorationsMap entrySet IRegion getExtent getOffset getLength maxLayer maxLayer hasNext getKey isMarkedDeleted getValue maxLayer maxLayer fLayer fLayer fPosition fSourceViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 fSourceViewer modelRange2WidgetRange getOffset getLength fSourceViewer overlapsWithVisibleRegion regionEnd getOffset getLength pEnd getOffset getLength pEnd getOffset regionEnd getOffset getOffset getOffset regionEnd pEnd mergeStyleRange StyleRange fColor
public synchronized void model Changed final I Annotation Model model if DEBUG System err println AP OLD API of Annotation Model Listener called NON NLS 1 model Changed new Annotation Model Event model  modelChanged IAnnotationModel AnnotationModelListener modelChanged AnnotationModelEvent
if d null d async Exec new Runnable public void run if f Text Widget null f Text Widget is Disposed update Painting event  asyncExec fTextWidget fTextWidget isDisposed updatePainting
public void model Changed final Annotation Model Event event if f Text Widget null f Text Widget is Disposed if f Is Setting Model inside the UI thread no need for posting if f Text Widget get Display Display get Current update Painting event else we can throw away the changes since further update painting will happen return else Display d f Text Widget get Display if DEBUG event null event is World Change System out println AP WORLD CHANGED stack trace follows NON NLS 1 new Throwable print Stack Trace System out TODO posting here is a problem for annotations that are being removed and the positions of which are not updated to document changes any more If the document gets modified between now and running the posted runnable the position information is not accurate any longer if d null d async Exec new Runnable public void run if f Text Widget null f Text Widget is Disposed update Painting event  modelChanged AnnotationModelEvent fTextWidget fTextWidget isDisposed fIsSettingModel fTextWidget getDisplay getCurrent updatePainting fTextWidget getDisplay isWorldChange printStackTrace asyncExec fTextWidget fTextWidget isDisposed updatePainting
Sets the color in which the squiggly for the given annotation type should be drawn param annotation Type the annotation type param color the color public void set Annotation Type Color Object annotation Type Color color if color null f Color Table put annotation Type color else f Color Table remove annotation Type  annotationType setAnnotationTypeColor annotationType fColorTable annotationType fColorTable annotationType
Adds the given annotation type to the list of annotation types whose annotations should be painted by this painter using squiggly drawing If the annotation type is already in this list this method is without effect param annotation Type the annotation type public void add Annotation Type Object annotation Type add Annotation Type annotation Type SQUIGGLES  annotationType addAnnotationType annotationType addAnnotationType annotationType
Adds the given annotation type to the list of annotation types whose annotations should be painted by this painter using the given drawing strategy If the annotation type is already in this list the old drawing strategy gets replaced p TODO This is new API and subject to change p param annotation Type the annotation type param drawing StrategyID the id of the drawing strategy that should be used for this annotation type since 3 0 public void add Annotation Type Object annotation Type Object drawing StrategyID f Configured Annotation Types add annotation Type f Annotation Type2 Drawing Strategy Id put annotation Type drawing StrategyID  annotationType drawingStrategyID addAnnotationType annotationType drawingStrategyID fConfiguredAnnotationTypes annotationType fAnnotationType2DrawingStrategyId annotationType drawingStrategyID
Registers a new drawing strategy under the given ID If there is already a strategy registered under code id code the old strategy gets replaced p The given id can be referenced when adding annotation types see link add Annotation Type Object Object p p TODO This is new API and subject to change p param id the identifier under which the strategy can be referenced not code null code param strategy the new strategy since 3 0 public void add Drawing Strategy Object id I Drawing Strategy strategy don t permit null as null is used to signal that an annotation type is not registered with a specific strategy and that its annotation hierarchy should be searched if id null throw new Illegal Argument Exception f Registered Drawing Strategies put id strategy  addAnnotationType addDrawingStrategy IDrawingStrategy IllegalArgumentException fRegisteredDrawingStrategies
see org eclipse jface text I Text Input Listener input Document About To Be Changed org eclipse jface text I Document org eclipse jface text I Document public void input Document About To Be Changed I Document old Input I Document new Input f Input Document About To Be Changed true  ITextInputListener inputDocumentAboutToBeChanged IDocument IDocument inputDocumentAboutToBeChanged IDocument oldInput IDocument newInput fInputDocumentAboutToBeChanged
see org eclipse jface text I Text Input Listener input Document Changed org eclipse jface text I Document org eclipse jface text I Document public void input Document Changed I Document old Input I Document new Input f Input Document About To Be Changed false  ITextInputListener inputDocumentChanged IDocument IDocument inputDocumentChanged IDocument oldInput IDocument newInput fInputDocumentAboutToBeChanged
Adds the given annotation type to the list of annotation types whose annotations should be highlighted this painter If the annotation type is already in this list this method is without effect param annotation Type the annotation type since 3 0 public void add Highlight Annotation Type Object annotation Type f Configured Highlight Annotation Types add annotation Type if f Text Input Listener null f Text Input Listener new I Text Input Listener see org eclipse jface text I Text Input Listener input Document About To Be Changed org eclipse jface text I Document org eclipse jface text I Document public void input Document About To Be Changed I Document old Input I Document new Input f Input Document About To Be Changed true see org eclipse jface text I Text Input Listener input Document Changed org eclipse jface text I Document org eclipse jface text I Document public void input Document Changed I Document old Input I Document new Input f Input Document About To Be Changed false f Source Viewer add Text Input Listener f Text Input Listener  annotationType addHighlightAnnotationType annotationType fConfiguredHighlightAnnotationTypes annotationType fTextInputListener fTextInputListener ITextInputListener ITextInputListener inputDocumentAboutToBeChanged IDocument IDocument inputDocumentAboutToBeChanged IDocument oldInput IDocument newInput fInputDocumentAboutToBeChanged ITextInputListener inputDocumentChanged IDocument IDocument inputDocumentChanged IDocument oldInput IDocument newInput fInputDocumentAboutToBeChanged fSourceViewer addTextInputListener fTextInputListener
Removes the given annotation type from the list of annotation types whose annotations are painted by this painter If the annotation type is not in this list this method is without effect param annotation Type the annotation type public void remove Annotation Type Object annotation Type f Configured Annotation Types remove annotation Type f Allowed Annotation Types clear  annotationType removeAnnotationType annotationType fConfiguredAnnotationTypes annotationType fAllowedAnnotationTypes
Removes the given annotation type from the list of annotation types whose annotations are highlighted by this painter If the annotation type is not in this list this method is without effect param annotation Type the annotation type since 3 0 public void remove Highlight Annotation Type Object annotation Type f Configured Highlight Annotation Types remove annotation Type f Allowed Highlight Annotation Types clear if f Configured Highlight Annotation Types is Empty f Text Input Listener null f Source Viewer remove Text Input Listener f Text Input Listener f Text Input Listener null f Input Document About To Be Changed false  annotationType removeHighlightAnnotationType annotationType fConfiguredHighlightAnnotationTypes annotationType fAllowedHighlightAnnotationTypes fConfiguredHighlightAnnotationTypes isEmpty fTextInputListener fSourceViewer removeTextInputListener fTextInputListener fTextInputListener fInputDocumentAboutToBeChanged
Clears the list of annotation types whose annotations are painted by this painter public void remove All Annotation Types f Configured Annotation Types clear f Allowed Annotation Types clear f Configured Highlight Annotation Types clear f Allowed Highlight Annotation Types clear if f Text Input Listener null f Source Viewer remove Text Input Listener f Text Input Listener f Text Input Listener null  removeAllAnnotationTypes fConfiguredAnnotationTypes fAllowedAnnotationTypes fConfiguredHighlightAnnotationTypes fAllowedHighlightAnnotationTypes fTextInputListener fSourceViewer removeTextInputListener fTextInputListener fTextInputListener
Returns whether the list of annotation types whose annotations are painted by this painter contains at least on element return code true code if there is an annotation type whose annotations are painted public boolean is Painting Annotations return f Configured Annotation Types is Empty f Configured Highlight Annotation Types is Empty  isPaintingAnnotations fConfiguredAnnotationTypes isEmpty fConfiguredHighlightAnnotationTypes isEmpty
public void dispose if f Color Table null f Color Table clear f Color Table null if f Configured Annotation Types null f Configured Annotation Types clear f Configured Annotation Types null if f Allowed Annotation Types null f Allowed Annotation Types clear f Allowed Annotation Types null if f Configured Highlight Annotation Types null f Configured Highlight Annotation Types clear f Configured Highlight Annotation Types null if f Allowed Highlight Annotation Types null f Allowed Highlight Annotation Types clear f Allowed Highlight Annotation Types null f Text Widget null f Source Viewer null f Annotation Access null f Model null synchronized f Decoration Map Lock f Decorations Map null synchronized f Highlighted Decorations Map Lock f Highlighted Decorations Map null  fColorTable fColorTable fColorTable fConfiguredAnnotationTypes fConfiguredAnnotationTypes fConfiguredAnnotationTypes fAllowedAnnotationTypes fAllowedAnnotationTypes fAllowedAnnotationTypes fConfiguredHighlightAnnotationTypes fConfiguredHighlightAnnotationTypes fConfiguredHighlightAnnotationTypes fAllowedHighlightAnnotationTypes fAllowedHighlightAnnotationTypes fAllowedHighlightAnnotationTypes fTextWidget fSourceViewer fAnnotationAccess fModel fDecorationMapLock fDecorationsMap fHighlightedDecorationsMapLock fHighlightedDecorationsMap
Returns the document offset of the upper left corner of the source viewer s view port possibly including partially visible lines return the document offset if the upper left corner of the view port private int get Inclusive Top Index Start Offset if f Text Widget null f Text Widget is Disposed int top 1 if f Source Viewer instanceof I Text Viewer Extension5 top f Text Widget get Top Index if f Text Widget get Top Pixel f Text Widget get Line Height 0 top I Text Viewer Extension5 extension I Text Viewer Extension5 f Source Viewer top extension widget Line2 Model Line top else top f Source Viewer get Top Index if f Text Widget get Top Pixel f Text Widget get Line Height 0 top try I Document document f Source Viewer get Document return document get Line Offset top catch Bad Location Exception x return 1  getInclusiveTopIndexStartOffset fTextWidget fTextWidget isDisposed fSourceViewer ITextViewerExtension5 fTextWidget getTopIndex fTextWidget getTopPixel fTextWidget getLineHeight ITextViewerExtension5 ITextViewerExtension5 fSourceViewer widgetLine2ModelLine fSourceViewer getTopIndex fTextWidget getTopPixel fTextWidget getLineHeight IDocument fSourceViewer getDocument getLineOffset BadLocationException
Returns the first invisible document offset of the lower right corner of the source viewer s view port possibly including partially visible lines return the first invisible document offset of the lower right corner of the view port private int get Exclusive Bottom Index End Offset if f Text Widget null f Text Widget is Disposed int bottom f Source Viewer get Bottom Index if f Text Widget get Top Pixel f Text Widget get Client Area height f Text Widget get Line Height 0 bottom try I Document document f Source Viewer get Document if bottom document get Number Of Lines bottom document get Number Of Lines 1 return document get Line Offset bottom document get Line Length bottom catch Bad Location Exception x return 1  getExclusiveBottomIndexEndOffset fTextWidget fTextWidget isDisposed fSourceViewer getBottomIndex fTextWidget getTopPixel fTextWidget getClientArea fTextWidget getLineHeight IDocument fSourceViewer getDocument getNumberOfLines getNumberOfLines getLineOffset getLineLength BadLocationException
see org eclipse swt events Paint Listener paint Control org eclipse swt events Paint Event public void paint Control Paint Event event if f Text Widget null handle Draw Request event gc  PaintListener paintControl PaintEvent paintControl PaintEvent fTextWidget handleDrawRequest
Handles the request to draw the annotations using the given graphical context param gc the graphical context private void handle Draw Request GC gc if f Text Widget null is already disposed return Reusable Region range new Reusable Region int v Offset get Inclusive Top Index Start Offset http bugs eclipse org bugs show bug cgi id 17147 int v Length get Exclusive Bottom Index End Offset v Offset Set decorations Clone decorations set synchronized f Decoration Map Lock decorations new Hash Set f Decorations Map entry Set for int layer 0 max Layer 1 layer max Layer layer for Iterator e decorations iterator e has Next Map Entry entry Map Entry e next Annotation a Annotation entry get Key if a is Marked Deleted continue Decoration pp Decoration entry get Value if pp f Painter fg Null Drawer continue if skip a continue max Layer Math max max Layer pp f Layer 1 dynamically update layer maximum if pp f Layer layer wrong layer skip annotation continue Position p pp f Position if p overlaps With v Offset v Length I Document document f Source Viewer get Document try int start Line document get Line Of Offset p get Offset int last Inclusive Math max p get Offset p get Offset p get Length 1 int end Line document get Line Of Offset last Inclusive for int i start Line i end Line i int line Offset document get Line Offset i int paint Start Math max line Offset p get Offset String line Delimiter document get Line Delimiter i int delimiter Length line Delimiter null line Delimiter length 0 int paint Length Math min line Offset document get Line Length i delimiter Length p get Offset p get Length paint Start if paint Length 0 overlaps With paint Start paint Length v Offset v Length otherwise inside a line delimiter range update paint Start paint Length I Region widget Range get Widget Range range if widget Range null pp f Painter draw a gc f Text Widget widget Range get Offset widget Range get Length pp f Color catch Bad Location Exception x  handleDrawRequest fTextWidget ReusableRegion ReusableRegion vOffset getInclusiveTopIndexStartOffset show_bug vLength getExclusiveBottomIndexEndOffset vOffset fDecorationMapLock HashSet fDecorationsMap entrySet maxLayer maxLayer hasNext getKey isMarkedDeleted getValue fPainter fgNullDrawer maxLayer maxLayer fLayer fLayer fPosition overlapsWith vOffset vLength IDocument fSourceViewer getDocument startLine getLineOfOffset getOffset lastInclusive getOffset getOffset getLength endLine getLineOfOffset lastInclusive startLine endLine lineOffset getLineOffset paintStart lineOffset getOffset lineDelimiter getLineDelimiter delimiterLength lineDelimiter lineDelimiter paintLength lineOffset getLineLength delimiterLength getOffset getLength paintStart paintLength overlapsWith paintStart paintLength vOffset vLength paintStart paintLength IRegion widgetRange getWidgetRange widgetRange fPainter fTextWidget widgetRange getOffset widgetRange getLength fColor BadLocationException
Should the given annotation be skipped when handling draw requests param annotation the annotation return code true code iff the given annotation should be skipped when handling draw requests since 3 0 protected boolean skip Annotation annotation return false 
Returns the widget region that corresponds to the given region in the viewer s document param p the region in the viewer s document return the corresponding widget region private I Region get Widget Range I Region p if p null p get Offset Integer MAX VALUE return null if f Source Viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 f Source Viewer return extension model Range2 Widget Range p else I Region region f Source Viewer get Visible Region int offset region get Offset int length region get Length if overlaps With p region int p1 Math max offset p get Offset int p2 Math min offset length p get Offset p get Length return new Region p1 offset p2 p1 return null  IRegion getWidgetRange IRegion getOffset MAX_VALUE fSourceViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 fSourceViewer modelRange2WidgetRange IRegion fSourceViewer getVisibleRegion getOffset getLength overlapsWith getOffset getOffset getLength
Checks whether the intersection of the given text ranges is empty or not param range1 the first range to check param range2 the second range to check return code true code if intersection is not empty private boolean overlaps With I Region range1 I Region range2 return overlaps With range1 get Offset range1 get Length range2 get Offset range2 get Length  overlapsWith IRegion IRegion overlapsWith getOffset getLength getOffset getLength
Checks whether the intersection of the given text ranges is empty or not param offset1 offset of the first range param length1 length of the first range param offset2 offset of the second range param length2 length of the second range return code true code if intersection is not empty private boolean overlaps With int offset1 int length1 int offset2 int length2 int end offset2 length2 int this End offset1 length1 if length2 0 if length1 0 return offset1 end offset2 this End return offset2 offset1 offset1 end if length1 0 return offset1 offset2 offset2 this End return offset1 offset2  overlapsWith thisEnd thisEnd thisEnd
public void deactivate boolean redraw if f Is Active f Is Active false disable Painting redraw set Model null catchup With Model null  fIsActive fIsActive disablePainting setModel catchupWithModel
Returns whether the given reason causes a repaint param reason the reason return code true code if repaint reason code false code otherwise since 3 0 protected boolean is Repaint Reason int reason return CONFIGURATION reason INTERNAL reason  isRepaintReason
Retrieves the annotation model from the given source viewer param source Viewer the source viewer return the source viewer s annotation model or code null code if none can be found since 3 0 protected I Annotation Model find Annotation Model I Source Viewer source Viewer if source Viewer null return source Viewer get Annotation Model return null  sourceViewer IAnnotationModel findAnnotationModel ISourceViewer sourceViewer sourceViewer sourceViewer getAnnotationModel
public void paint int reason if f Source Viewer get Document null deactivate false return if f Is Active I Annotation Model model find Annotation Model f Source Viewer if model null f Is Active true set Model model else if is Repaint Reason reason update Painting null  fSourceViewer getDocument fIsActive IAnnotationModel findAnnotationModel fSourceViewer fIsActive setModel isRepaintReason updatePainting
see org eclipse jface text I Painter set Position Manager org eclipse jface text I Paint Position Manager public void set Position Manager I Paint Position Manager manager  IPainter setPositionManager IPaintPositionManager setPositionManager IPaintPositionManager

see I Viewport Listener viewport Changed int public void viewport Changed int vertical Position if vertical Position f Scroll Pos redraw  IViewportListener viewportChanged viewportChanged verticalPosition verticalPosition fScrollPos
see I Annotation Model Listener model Changed I Annotation Model public void model Changed I Annotation Model model post Redraw  IAnnotationModelListener modelChanged IAnnotationModel modelChanged IAnnotationModel postRedraw
see I Text Listener text Changed Text Event public void text Changed Text Event e if e get Viewer Redraw State post Redraw  ITextListener textChanged TextEvent textChanged TextEvent getViewerRedrawState postRedraw
see org eclipse jface text I Region get Length public int get Length return f Length  IRegion getLength getLength fLength
see org eclipse jface text I Region get Offset public int get Offset return f Offset  IRegion getOffset getOffset fOffset
Updates this region param offset the new offset param length the new length public void update int offset int length f Offset offset f Length length  fOffset fLength
Position position Tuple Annotation annotation Position position this annotation annotation this position position 
public int compare Object o1 Object o2 Position p1 Tuple o1 position Position p2 Tuple o2 position return p1 get Offset p2 get Offset  getOffset getOffset
Constructs this column with the given arguments param model the annotation model to get the annotations from param width the width of the vertical ruler param annotation Access the annotation access since 3 0 public Annotation Ruler Column I Annotation Model model int width I Annotation Access annotation Access this width annotation Access f Allow Set Model false f Model model f Model add Annotation Model Listener f Internal Listener  annotationAccess AnnotationRulerColumn IAnnotationModel IAnnotationAccess annotationAccess annotationAccess fAllowSetModel fModel fModel addAnnotationModelListener fInternalListener
Constructs this column with the given arguments param width the width of the vertical ruler param annotation Access the annotation access since 3 0 public Annotation Ruler Column int width I Annotation Access annotation Access f Width width if annotation Access instanceof I Annotation Access Extension f Annotation Access Extension I Annotation Access Extension annotation Access  annotationAccess AnnotationRulerColumn IAnnotationAccess annotationAccess fWidth annotationAccess IAnnotationAccessExtension fAnnotationAccessExtension IAnnotationAccessExtension annotationAccess
Constructs this column with the given arguments param model the annotation model to get the annotations from param width the width of the vertical ruler public Annotation Ruler Column I Annotation Model model int width f Width width f Allow Set Model false f Model model f Model add Annotation Model Listener f Internal Listener  AnnotationRulerColumn IAnnotationModel fWidth fAllowSetModel fModel fModel addAnnotationModelListener fInternalListener
Constructs this column with the given width param width the width of the vertical ruler public Annotation Ruler Column int width f Width width  AnnotationRulerColumn fWidth
see I Vertical Ruler Column get Control public Control get Control return f Canvas  IVerticalRulerColumn getControl getControl fCanvas
see I Vertical Ruler Column get Width public int get Width return f Width  IVerticalRulerColumn getWidth getWidth fWidth
public Control create Control Composite Ruler parent Ruler Composite parent Control f Parent Ruler parent Ruler f Cached Text Viewer parent Ruler get Text Viewer f Cached Text Widget f Cached Text Viewer get Text Widget f Hit Detection Cursor new Cursor parent Control get Display SWT CURSOR HAND f Canvas create Canvas parent Control f Canvas add Paint Listener new Paint Listener public void paint Control Paint Event event if f Cached Text Viewer null double Buffer Paint event gc f Canvas add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e handle Dispose f Cached Text Viewer null f Cached Text Widget null f Mouse Listener new Mouse Listener public void mouse Up Mouse Event event int line Number if is Propagating Mouse Listener f Parent Ruler set Location Of Last Mouse Button Activity event x event y line Number f Parent Ruler get Line Of Last Mouse Button Activity else line Number f Parent Ruler to Document Line Number event y if 1 event button mouse Clicked line Number public void mouse Down Mouse Event event if is Propagating Mouse Listener f Parent Ruler set Location Of Last Mouse Button Activity event x event y public void mouse Double Click Mouse Event event int line Number if is Propagating Mouse Listener f Parent Ruler set Location Of Last Mouse Button Activity event x event y line Number f Parent Ruler get Line Of Last Mouse Button Activity else line Number f Parent Ruler to Document Line Number event y if 1 event button mouse Double Clicked line Number f Canvas add Mouse Listener f Mouse Listener f Canvas add Mouse Move Listener new Mouse Move Listener see org eclipse swt events Mouse Move Listener mouse Move org eclipse swt events Mouse Event since 3 0 public void mouse Move Mouse Event e handle Mouse Move e if f Cached Text Viewer null f Cached Text Viewer add Viewport Listener f Internal Listener f Cached Text Viewer add Text Listener f Internal Listener return f Canvas  createControl CompositeRuler parentRuler parentControl fParentRuler parentRuler fCachedTextViewer parentRuler getTextViewer fCachedTextWidget fCachedTextViewer getTextWidget fHitDetectionCursor parentControl getDisplay CURSOR_HAND fCanvas createCanvas parentControl fCanvas addPaintListener PaintListener paintControl PaintEvent fCachedTextViewer doubleBufferPaint fCanvas addDisposeListener DisposeListener widgetDisposed DisposeEvent handleDispose fCachedTextViewer fCachedTextWidget fMouseListener MouseListener mouseUp MouseEvent lineNumber isPropagatingMouseListener fParentRuler setLocationOfLastMouseButtonActivity lineNumber fParentRuler getLineOfLastMouseButtonActivity lineNumber fParentRuler toDocumentLineNumber mouseClicked lineNumber mouseDown MouseEvent isPropagatingMouseListener fParentRuler setLocationOfLastMouseButtonActivity mouseDoubleClick MouseEvent lineNumber isPropagatingMouseListener fParentRuler setLocationOfLastMouseButtonActivity lineNumber fParentRuler getLineOfLastMouseButtonActivity lineNumber fParentRuler toDocumentLineNumber mouseDoubleClicked lineNumber fCanvas addMouseListener fMouseListener fCanvas addMouseMoveListener MouseMoveListener MouseMoveListener mouseMove MouseEvent mouseMove MouseEvent handleMouseMove fCachedTextViewer fCachedTextViewer addViewportListener fInternalListener fCachedTextViewer addTextListener fInternalListener fCanvas
Creates a canvas with the given parent param parent the parent return the created canvas private Canvas create Canvas Composite parent return new Canvas parent SWT NO BACKGROUND see org eclipse swt widgets Control add Mouse Listener org eclipse swt events Mouse Listener since 3 0 public void add Mouse Listener Mouse Listener listener if is Propagating Mouse Listener listener f Mouse Listener super add Mouse Listener listener  createCanvas NO_BACKGROUND addMouseListener MouseListener addMouseListener MouseListener isPropagatingMouseListener fMouseListener addMouseListener
Tells whether this ruler column propagates mouse listener events to its parent return code true code if propagating to parent since 3 0 protected boolean is Propagating Mouse Listener return true  isPropagatingMouseListener
Hook method for a mouse double click event on the given ruler line param ruler Line the ruler line protected void mouse Double Clicked int ruler Line  rulerLine mouseDoubleClicked rulerLine
Hook method for a mouse click event on the given ruler line param ruler Line the ruler line since 3 0 protected void mouse Clicked int ruler Line  rulerLine mouseClicked rulerLine
Handles mouse moves param event the mouse move event private void handle Mouse Move Mouse Event event if f Cached Text Viewer null int line to Document Line Number event y Cursor cursor has Annotation line f Hit Detection Cursor null if cursor f Last Cursor f Canvas set Cursor cursor f Last Cursor cursor  handleMouseMove MouseEvent fCachedTextViewer toDocumentLineNumber hasAnnotation fHitDetectionCursor fLastCursor fCanvas setCursor fLastCursor
Tells whether the given line contains an annotation param line Number the line number return code true code if the given line contains an annotation protected boolean has Annotation int line Number I Annotation Model model f Model if f Model instanceof I Annotation Model Extension model I Annotation Model Extension f Model get Annotation Model Source Viewer MODEL ANNOTATION MODEL if model null return false I Region line try I Document d f Cached Text Viewer get Document line d get Line Information line Number catch Bad Location Exception ex return false int line Start line get Offset int line Length line get Length Iterator e model get Annotation Iterator while e has Next Annotation a Annotation e next if a is Marked Deleted continue if skip a continue Position p model get Position a if p null p is Deleted continue if p overlaps With line Start line Length return true return false  lineNumber hasAnnotation lineNumber IAnnotationModel fModel fModel IAnnotationModelExtension IAnnotationModelExtension fModel getAnnotationModel SourceViewer MODEL_ANNOTATION_MODEL IRegion IDocument fCachedTextViewer getDocument getLineInformation lineNumber BadLocationException lineStart getOffset lineLength getLength getAnnotationIterator hasNext isMarkedDeleted getPosition isDeleted overlapsWith lineStart lineLength
Disposes the ruler s resources private void handle Dispose if f Cached Text Viewer null f Cached Text Viewer remove Viewport Listener f Internal Listener f Cached Text Viewer remove Text Listener f Internal Listener if f Model null f Model remove Annotation Model Listener f Internal Listener if f Buffer null f Buffer dispose f Buffer null if f Hit Detection Cursor null f Hit Detection Cursor dispose f Hit Detection Cursor null f Configured Annotation Types clear f Allowed Annotation Types clear f Annotation Access Extension null  handleDispose fCachedTextViewer fCachedTextViewer removeViewportListener fInternalListener fCachedTextViewer removeTextListener fInternalListener fModel fModel removeAnnotationModelListener fInternalListener fBuffer fBuffer fBuffer fHitDetectionCursor fHitDetectionCursor fHitDetectionCursor fConfiguredAnnotationTypes fAllowedAnnotationTypes fAnnotationAccessExtension
Double buffer drawing param dest the GC to draw into private void double Buffer Paint GC dest Point size f Canvas get Size if size x 0 size y 0 return if f Buffer null Rectangle r f Buffer get Bounds if r width size x r height size y f Buffer dispose f Buffer null if f Buffer null f Buffer new Image f Canvas get Display size x size y GC gc new GC f Buffer gc set Font f Cached Text Widget get Font try gc set Background f Canvas get Background gc fill Rectangle 0 0 size x size y if f Cached Text Viewer instanceof I Text Viewer Extension5 do Paint1 gc else do Paint gc finally gc dispose dest draw Image f Buffer 0 0  doubleBufferPaint fCanvas getSize fBuffer fBuffer getBounds fBuffer fBuffer fBuffer fBuffer fCanvas getDisplay fBuffer setFont fCachedTextWidget getFont setBackground fCanvas getBackground fillRectangle fCachedTextViewer ITextViewerExtension5 doPaint1 doPaint drawImage fBuffer
Returns the document offset of the upper left corner of the source viewer s view port possibly including partially visible lines return document offset of the upper left corner including partially visible lines protected int get Inclusive Top Index Start Offset if f Cached Text Widget null f Cached Text Widget is Disposed int top 1 if f Cached Text Viewer instanceof I Text Viewer Extension5 top f Cached Text Widget get Top Index if f Cached Text Widget get Top Pixel f Cached Text Widget get Line Height 0 top I Text Viewer Extension5 extension I Text Viewer Extension5 f Cached Text Viewer top extension widget Line2 Model Line top else top f Cached Text Viewer get Top Index if f Cached Text Widget get Top Pixel f Cached Text Widget get Line Height 0 top try I Document document f Cached Text Viewer get Document return document get Line Offset top catch Bad Location Exception x return 1  getInclusiveTopIndexStartOffset fCachedTextWidget fCachedTextWidget isDisposed fCachedTextViewer ITextViewerExtension5 fCachedTextWidget getTopIndex fCachedTextWidget getTopPixel fCachedTextWidget getLineHeight ITextViewerExtension5 ITextViewerExtension5 fCachedTextViewer widgetLine2ModelLine fCachedTextViewer getTopIndex fCachedTextWidget getTopPixel fCachedTextWidget getLineHeight IDocument fCachedTextViewer getDocument getLineOffset BadLocationException
Returns the first invisible document offset of the lower right corner of the source viewer s view port possibly including partially visible lines return the first invisible document offset of the lower right corner of the view port private int get Exclusive Bottom Index End Offset if f Cached Text Widget null f Cached Text Widget is Disposed int bottom f Cached Text Viewer get Bottom Index if f Cached Text Widget get Top Pixel f Cached Text Widget get Client Area height f Cached Text Widget get Line Height 0 bottom try I Document document f Cached Text Viewer get Document if bottom document get Number Of Lines bottom document get Number Of Lines 1 return document get Line Offset bottom document get Line Length bottom catch Bad Location Exception x return 1  getExclusiveBottomIndexEndOffset fCachedTextWidget fCachedTextWidget isDisposed fCachedTextViewer getBottomIndex fCachedTextWidget getTopPixel fCachedTextWidget getClientArea fCachedTextWidget getLineHeight IDocument fCachedTextViewer getDocument getNumberOfLines getNumberOfLines getLineOffset getLineLength BadLocationException
Draws the vertical ruler w o drawing the Canvas background param gc the GC to draw into protected void do Paint GC gc if f Model null f Cached Text Viewer null return int top Left get Inclusive Top Index Start Offset int bottom Right I Region coverage null if f Cached Text Viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 f Cached Text Viewer coverage extension get Model Coverage else if f Cached Text Viewer instanceof Text Viewer TODO remove once Text Viewer implements I Text Viewer Extension5 Text Viewer extension Text Viewer f Cached Text Viewer coverage extension get Model Coverage if coverage null bottom Right coverage get Offset coverage get Length else http dev eclipse org bugs show bug cgi id 14938 http dev eclipse org bugs show bug cgi id 22487 add 1 as get Bottom Index End Offset returns the inclusive offset but we want the exclusive offset right after the last character bottom Right f Cached Text Viewer get Bottom Index End Offset 1 int view Port bottom Right top Left f Scroll Pos f Cached Text Widget get Top Pixel int lineheight f Cached Text Widget get Line Height Point dimension f Canvas get Size int shift f Cached Text Viewer get Top Inset I Document doc f Cached Text Viewer get Document int top Line 1 bottom Line 1 try I Region region f Cached Text Viewer get Visible Region top Line doc get Line Of Offset region get Offset bottom Line doc get Line Of Offset region get Offset region get Length catch Bad Location Exception x return draw Annotations Rectangle r new Rectangle 0 0 0 0 int max Layer 1 loop at least once through layers for int layer 0 layer max Layer layer Iterator iter f Model get Annotation Iterator while iter has Next Annotation annotation Annotation iter next int lay I Annotation Access Extension DEFAULT LAYER if f Annotation Access Extension null lay f Annotation Access Extension get Layer annotation max Layer Math max max Layer lay 1 dynamically update layer maximum if lay layer wrong layer skip annotation continue if skip annotation continue Position position f Model get Position annotation if position null continue https bugs eclipse org bugs show bug cgi id 20284 Position overlaps With returns false if the position just starts at the end of the specified range If the position has zero length we want to include it anyhow int view Port Size position get Length 0 view Port 1 view Port if position overlaps With top Left view Port Size continue try int offset position get Offset int length position get Length int start Line doc get Line Of Offset offset if start Line top Line start Line top Line int end Line start Line if length 0 end Line doc get Line Of Offset offset length 1 if end Line bottom Line end Line bottom Line start Line top Line end Line top Line r x 0 r y start Line lineheight f Scroll Pos shift r width dimension x int lines end Line start Line if lines 0 lines lines r height lines 1 lineheight if r y dimension y f Annotation Access Extension null annotation within visible area f Annotation Access Extension paint annotation gc f Canvas r catch Bad Location Exception x  doPaint fModel fCachedTextViewer topLeft getInclusiveTopIndexStartOffset bottomRight IRegion fCachedTextViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 fCachedTextViewer getModelCoverage fCachedTextViewer TextViewer TextViewer ITextViewerExtension5 TextViewer TextViewer fCachedTextViewer getModelCoverage bottomRight getOffset getLength show_bug show_bug getBottomIndexEndOffset bottomRight fCachedTextViewer getBottomIndexEndOffset viewPort bottomRight topLeft fScrollPos fCachedTextWidget getTopPixel fCachedTextWidget getLineHeight fCanvas getSize fCachedTextViewer getTopInset IDocument fCachedTextViewer getDocument topLine bottomLine IRegion fCachedTextViewer getVisibleRegion topLine getLineOfOffset getOffset bottomLine getLineOfOffset getOffset getLength BadLocationException maxLayer maxLayer fModel getAnnotationIterator hasNext IAnnotationAccessExtension DEFAULT_LAYER fAnnotationAccessExtension fAnnotationAccessExtension getLayer maxLayer maxLayer fModel getPosition show_bug overlapsWith viewPortSize getLength viewPort viewPort overlapsWith topLeft viewPortSize getOffset getLength startLine getLineOfOffset startLine topLine startLine topLine endLine startLine endLine getLineOfOffset endLine bottomLine endLine bottomLine startLine topLine endLine topLine startLine fScrollPos endLine startLine fAnnotationAccessExtension fAnnotationAccessExtension fCanvas BadLocationException
Draws the vertical ruler w o drawing the Canvas background Implementation based on code I Text Viewer Extension5 code Will replace code do Paint GC code param gc the GC to draw into protected void do Paint1 GC gc if f Model null f Cached Text Viewer null return I Text Viewer Extension5 extension I Text Viewer Extension5 f Cached Text Viewer f Scroll Pos f Cached Text Widget get Top Pixel int lineheight f Cached Text Widget get Line Height Point dimension f Canvas get Size int shift f Cached Text Viewer get Top Inset int v Offset get Inclusive Top Index Start Offset int v Length get Exclusive Bottom Index End Offset v Offset draw Annotations Rectangle r new Rectangle 0 0 0 0 Reusable Region range new Reusable Region int min Layer Integer MAX VALUE max Layer Integer MIN VALUE f Cached Annotations clear Iterator iter f Model get Annotation Iterator while iter has Next Annotation annotation Annotation iter next if skip annotation continue Position position f Model get Position annotation if position null continue if position overlaps With v Offset v Length continue int lay I Annotation Access Extension DEFAULT LAYER if f Annotation Access Extension null lay f Annotation Access Extension get Layer annotation min Layer Math min min Layer lay max Layer Math max max Layer lay f Cached Annotations add new Tuple annotation position Collections sort f Cached Annotations f Tuple Comparator for int layer min Layer layer max Layer layer for int i 0 n f Cached Annotations size i n i Tuple tuple Tuple f Cached Annotations get i Annotation annotation tuple annotation Position position tuple position int lay I Annotation Access Extension DEFAULT LAYER if f Annotation Access Extension null lay f Annotation Access Extension get Layer annotation if lay layer wrong layer skip annotation continue range update position get Offset position get Length I Region widget Region extension model Range2 Widget Range range if widget Region null continue int start Line extension widget Line Of Widget Offset widget Region get Offset if start Line 1 continue int end Line extension widget Line Of Widget Offset widget Region get Offset Math max widget Region get Length 1 0 if end Line 1 continue r x 0 r y start Line lineheight f Scroll Pos shift r width dimension x int lines end Line start Line if lines 0 lines lines r height lines 1 lineheight if r y dimension y f Annotation Access Extension null annotation within visible area f Annotation Access Extension paint annotation gc f Canvas r f Cached Annotations clear  ITextViewerExtension5 doPaint doPaint1 fModel fCachedTextViewer ITextViewerExtension5 ITextViewerExtension5 fCachedTextViewer fScrollPos fCachedTextWidget getTopPixel fCachedTextWidget getLineHeight fCanvas getSize fCachedTextViewer getTopInset vOffset getInclusiveTopIndexStartOffset vLength getExclusiveBottomIndexEndOffset vOffset ReusableRegion ReusableRegion minLayer MAX_VALUE maxLayer MIN_VALUE fCachedAnnotations fModel getAnnotationIterator hasNext fModel getPosition overlapsWith vOffset vLength IAnnotationAccessExtension DEFAULT_LAYER fAnnotationAccessExtension fAnnotationAccessExtension getLayer minLayer minLayer maxLayer maxLayer fCachedAnnotations fCachedAnnotations fTupleComparator minLayer maxLayer fCachedAnnotations fCachedAnnotations IAnnotationAccessExtension DEFAULT_LAYER fAnnotationAccessExtension fAnnotationAccessExtension getLayer getOffset getLength IRegion widgetRegion modelRange2WidgetRange widgetRegion startLine widgetLineOfWidgetOffset widgetRegion getOffset startLine endLine widgetLineOfWidgetOffset widgetRegion getOffset widgetRegion getLength endLine startLine fScrollPos endLine startLine fAnnotationAccessExtension fAnnotationAccessExtension fCanvas fCachedAnnotations
if d null d async Exec new Runnable public void run redraw  asyncExec
Post a redraw request for this column into the UI thread private void post Redraw if f Canvas null f Canvas is Disposed Display d f Canvas get Display if d null d async Exec new Runnable public void run redraw  postRedraw fCanvas fCanvas isDisposed fCanvas getDisplay asyncExec
public void redraw if f Canvas null f Canvas is Disposed GC gc new GC f Canvas double Buffer Paint gc gc dispose  fCanvas fCanvas isDisposed fCanvas doubleBufferPaint
public void set Model I Annotation Model model if f Allow Set Model model f Model if f Model null f Model remove Annotation Model Listener f Internal Listener f Model model if f Model null f Model add Annotation Model Listener f Internal Listener post Redraw  setModel IAnnotationModel fAllowSetModel fModel fModel fModel removeAnnotationModelListener fInternalListener fModel fModel fModel addAnnotationModelListener fInternalListener postRedraw
see I Vertical Ruler Column set Font Font public void set Font Font font  IVerticalRulerColumn setFont setFont
Returns the cached text viewer return the cached text viewer protected I Text Viewer get Cached Text Viewer return f Cached Text Viewer  ITextViewer getCachedTextViewer fCachedTextViewer
see org eclipse jface text source I Vertical Ruler Info Extension get Model public I Annotation Model get Model return f Model  IVerticalRulerInfoExtension getModel IAnnotationModel getModel fModel
Adds the given annotation type to this annotation ruler column Starting with this call annotations of the given type are shown in this annotation ruler column param annotation Type the annotation type since 3 0 public void add Annotation Type Object annotation Type f Configured Annotation Types add annotation Type f Allowed Annotation Types clear  annotationType addAnnotationType annotationType fConfiguredAnnotationTypes annotationType fAllowedAnnotationTypes
since 3 0 public int get Line Of Last Mouse Button Activity return f Parent Ruler get Line Of Last Mouse Button Activity  getLineOfLastMouseButtonActivity fParentRuler getLineOfLastMouseButtonActivity
since 3 0 public int to Document Line Number int y coordinate return f Parent Ruler to Document Line Number y coordinate  toDocumentLineNumber y_coordinate fParentRuler toDocumentLineNumber y_coordinate
Removes the given annotation type from this annotation ruler column Annotations of the given type are no longer shown in this annotation ruler column param annotation Type the annotation type since 3 0 public void remove Annotation Type Object annotation Type f Configured Annotation Types remove annotation Type f Allowed Annotation Types clear  annotationType removeAnnotationType annotationType fConfiguredAnnotationTypes annotationType fAllowedAnnotationTypes
Returns whether the given annotation should be skipped by the drawing routine param annotation the annotation return code true code if annotation of the given type should be skipped code false code otherwise since 3 0 private boolean skip Annotation annotation Object annotation Type annotation get Type Boolean allowed Boolean f Allowed Annotation Types get annotation Type if allowed null return allowed boolean Value boolean skip skip annotation Type f Allowed Annotation Types put annotation Type skip Boolean TRUE Boolean FALSE return skip  annotationType getType fAllowedAnnotationTypes annotationType booleanValue annotationType fAllowedAnnotationTypes annotationType
Computes whether the annotation of the given type should be skipped or not param annotation Type the annotation type return code true code if annotation should be skipped code false code otherwise since 3 0 private boolean skip Object annotation Type if f Annotation Access Extension null Iterator e f Configured Annotation Types iterator while e has Next if f Annotation Access Extension is Subtype annotation Type e next return false return true return f Configured Annotation Types contains annotation Type  annotationType annotationType fAnnotationAccessExtension fConfiguredAnnotationTypes hasNext fAnnotationAccessExtension isSubtype annotationType fConfiguredAnnotationTypes annotationType
since 3 0 public I Annotation Hover get Hover return f Hover  IAnnotationHover getHover fHover
param hover The hover to set since 3 0 public void set Hover I Annotation Hover hover f Hover hover  setHover IAnnotationHover fHover
since 3 0 public void add Vertical Ruler Listener I Vertical Ruler Listener listener throw new Unsupported Operation Exception  addVerticalRulerListener IVerticalRulerListener UnsupportedOperationException
since 3 0 public void remove Vertical Ruler Listener I Vertical Ruler Listener listener throw new Unsupported Operation Exception  removeVerticalRulerListener IVerticalRulerListener UnsupportedOperationException

see org eclipse swt events Mouse Listener mouse Up org eclipse swt events Mouse Event public void mouse Up Mouse Event event  MouseListener mouseUp MouseEvent mouseUp MouseEvent
see org eclipse swt events Mouse Listener mouse Down org eclipse swt events Mouse Event public void mouse Down Mouse Event event f Parent Ruler set Location Of Last Mouse Button Activity event x event y  MouseListener mouseDown MouseEvent mouseDown MouseEvent fParentRuler setLocationOfLastMouseButtonActivity
see org eclipse swt events Mouse Listener mouse Double Click org eclipse swt events Mouse Event public void mouse Double Click Mouse Event event f Parent Ruler set Location Of Last Mouse Button Activity event x event y  MouseListener mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent fParentRuler setLocationOfLastMouseButtonActivity
see org eclipse swt events Mouse Move Listener mouse Move org eclipse swt events Mouse Event public void mouse Move Mouse Event e  MouseMoveListener mouseMove MouseEvent mouseMove MouseEvent
see I Viewport Listener viewport Changed int public void viewport Changed int vertical Position if vertical Position f Scroll Pos redraw  IViewportListener viewportChanged viewportChanged verticalPosition verticalPosition fScrollPos
public void text Changed Text Event event if event get Viewer Redraw State return if f Sensitive To Text Changes event get Document Event null post Redraw  textChanged TextEvent getViewerRedrawState fSensitiveToTextChanges getDocumentEvent postRedraw
see org eclipse jface text source I Annotation Model Listener model Changed org eclipse jface text source I Annotation Model public void model Changed I Annotation Model model post Redraw  IAnnotationModelListener modelChanged IAnnotationModel modelChanged IAnnotationModel postRedraw
Returns the System background color for list widgets param display the display the drawing occurs on return the System background color for list widgets protected Color get Background Display display if f Background null return display get System Color SWT COLOR LIST BACKGROUND return f Background  getBackground fBackground getSystemColor COLOR_LIST_BACKGROUND fBackground
f Canvas add Paint Listener new Paint Listener public void paint Control Paint Event event if f Cached Text Viewer null double Buffer Paint event gc  fCanvas addPaintListener PaintListener paintControl PaintEvent fCachedTextViewer doubleBufferPaint
f Canvas add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e handle Dispose f Cached Text Viewer null f Cached Text Widget null  fCanvas addDisposeListener DisposeListener widgetDisposed DisposeEvent handleDispose fCachedTextViewer fCachedTextWidget
public Control create Control Composite Ruler parent Ruler Composite parent Control f Parent Ruler parent Ruler f Cached Text Viewer parent Ruler get Text Viewer f Cached Text Widget f Cached Text Viewer get Text Widget f Canvas new Canvas parent Control SWT NONE f Canvas set Background get Background f Canvas get Display f Canvas set Foreground f Foreground f Canvas add Paint Listener new Paint Listener public void paint Control Paint Event event if f Cached Text Viewer null double Buffer Paint event gc f Canvas add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e handle Dispose f Cached Text Viewer null f Cached Text Widget null Mouse Handler mouse Handler new Mouse Handler f Canvas add Mouse Listener mouse Handler f Canvas add Mouse Move Listener mouse Handler if f Cached Text Viewer null f Cached Text Viewer add Viewport Listener f Internal Listener f Cached Text Viewer add Text Listener f Internal Listener return f Canvas  createControl CompositeRuler parentRuler parentControl fParentRuler parentRuler fCachedTextViewer parentRuler getTextViewer fCachedTextWidget fCachedTextViewer getTextWidget fCanvas parentControl fCanvas setBackground getBackground fCanvas getDisplay fCanvas setForeground fForeground fCanvas addPaintListener PaintListener paintControl PaintEvent fCachedTextViewer doubleBufferPaint fCanvas addDisposeListener DisposeListener widgetDisposed DisposeEvent handleDispose fCachedTextViewer fCachedTextWidget MouseHandler mouseHandler MouseHandler fCanvas addMouseListener mouseHandler fCanvas addMouseMoveListener mouseHandler fCachedTextViewer fCachedTextViewer addViewportListener fInternalListener fCachedTextViewer addTextListener fInternalListener fCanvas
Disposes the column s resources protected void handle Dispose if f Annotation Model null f Annotation Model remove Annotation Model Listener f Annotation Listener f Annotation Model null if f Cached Text Viewer null f Cached Text Viewer remove Viewport Listener f Internal Listener f Cached Text Viewer remove Text Listener f Internal Listener if f Buffer null f Buffer dispose f Buffer null  handleDispose fAnnotationModel fAnnotationModel removeAnnotationModelListener fAnnotationListener fAnnotationModel fCachedTextViewer fCachedTextViewer removeViewportListener fInternalListener fCachedTextViewer removeTextListener fInternalListener fBuffer fBuffer fBuffer
Double buffer drawing param dest the GC to draw into private void double Buffer Paint GC dest Point size f Canvas get Size if size x 0 size y 0 return if f Buffer null Rectangle r f Buffer get Bounds if r width size x r height size y f Buffer dispose f Buffer null if f Buffer null f Buffer new Image f Canvas get Display size x size y GC gc new GC f Buffer gc set Font f Canvas get Font if f Foreground null gc set Foreground f Foreground try gc set Background get Background f Canvas get Display gc fill Rectangle 0 0 size x size y if f Cached Text Viewer instanceof I Text Viewer Extension5 do Paint1 gc else do Paint gc finally gc dispose dest draw Image f Buffer 0 0  doubleBufferPaint fCanvas getSize fBuffer fBuffer getBounds fBuffer fBuffer fBuffer fBuffer fCanvas getDisplay fBuffer setFont fCanvas getFont fForeground setForeground fForeground setBackground getBackground fCanvas getDisplay fillRectangle fCachedTextViewer ITextViewerExtension5 doPaint1 doPaint drawImage fBuffer
Returns the view port height in lines return the view port height in lines protected int get Visible Lines In Viewport Rectangle cl Area f Cached Text Widget get Client Area if cl Area is Empty return cl Area height f Cached Text Widget get Line Height return 1  getVisibleLinesInViewport clArea fCachedTextWidget getClientArea clArea isEmpty clArea fCachedTextWidget getLineHeight
Draws the ruler column param gc the GC to draw into private void do Paint GC gc if f Cached Text Viewer null return if f Cached Text Widget null return int first Line 0 int top Line f Cached Text Viewer get Top Index 1 int bottom Line f Cached Text Viewer get Bottom Index 1 try I Region region f Cached Text Viewer get Visible Region I Document doc f Cached Text Viewer get Document if doc null return first Line doc get Line Of Offset region get Offset if first Line top Line top Line first Line int last Line doc get Line Of Offset region get Offset region get Length if last Line bottom Line bottom Line last Line catch Bad Location Exception x return f Sensitive To Text Changes bottom Line top Line get Visible Lines In Viewport int lineheight f Cached Text Widget get Line Height f Scroll Pos f Cached Text Widget get Top Pixel int canvasheight f Canvas get Size y int y top Line first Line lineheight f Scroll Pos f Cached Text Viewer get Top Inset for int line top Line line bottom Line line y lineheight if y canvasheight break paint Line line y lineheight gc f Cached Text Widget get Display  doPaint fCachedTextViewer fCachedTextWidget firstLine topLine fCachedTextViewer getTopIndex bottomLine fCachedTextViewer getBottomIndex IRegion fCachedTextViewer getVisibleRegion IDocument fCachedTextViewer getDocument firstLine getLineOfOffset getOffset firstLine topLine topLine firstLine lastLine getLineOfOffset getOffset getLength lastLine bottomLine bottomLine lastLine BadLocationException fSensitiveToTextChanges bottomLine topLine getVisibleLinesInViewport fCachedTextWidget getLineHeight fScrollPos fCachedTextWidget getTopPixel fCanvas getSize topLine firstLine fScrollPos fCachedTextViewer getTopInset topLine bottomLine paintLine fCachedTextWidget getDisplay
Draws the ruler column Uses code I Text Viewer Extension5 code for the implementation Will replace code do Pinat GC code param gc the GC to draw into private void do Paint1 GC gc if f Cached Text Viewer null return I Text Viewer Extension5 extension I Text Viewer Extension5 f Cached Text Viewer int first Line 0 int widget Top Line f Cached Text Widget get Top Index if widget Top Line 0 widget Top Line int top Line extension widget Line2 Model Line widget Top Line int bottom Line f Cached Text Viewer get Bottom Index if bottom Line 0 bottom Line try I Region region extension get Model Coverage I Document doc f Cached Text Viewer get Document if doc null return first Line doc get Line Of Offset region get Offset if first Line top Line top Line 1 top Line first Line int last Line doc get Line Of Offset region get Offset region get Length if last Line bottom Line bottom Line 1 bottom Line last Line catch Bad Location Exception x return f Sensitive To Text Changes bottom Line top Line get Visible Lines In Viewport int lineheight f Cached Text Widget get Line Height f Scroll Pos f Cached Text Widget get Top Pixel int canvasheight f Canvas get Size y int y widget Top Line lineheight f Scroll Pos f Cached Text Viewer get Top Inset for int model Line top Line model Line bottom Line model Line if y canvasheight break int widget Line extension model Line2 Widget Line model Line if widget Line 1 continue paint Line model Line y lineheight gc f Cached Text Widget get Display y lineheight  ITextViewerExtension5 doPinat doPaint1 fCachedTextViewer ITextViewerExtension5 ITextViewerExtension5 fCachedTextViewer firstLine widgetTopLine fCachedTextWidget getTopIndex widgetTopLine widgetTopLine topLine widgetLine2ModelLine widgetTopLine bottomLine fCachedTextViewer getBottomIndex bottomLine bottomLine IRegion getModelCoverage IDocument fCachedTextViewer getDocument firstLine getLineOfOffset getOffset firstLine topLine topLine topLine firstLine lastLine getLineOfOffset getOffset getLength lastLine bottomLine bottomLine bottomLine lastLine BadLocationException fSensitiveToTextChanges bottomLine topLine getVisibleLinesInViewport fCachedTextWidget getLineHeight fScrollPos fCachedTextWidget getTopPixel fCanvas getSize widgetTopLine fScrollPos fCachedTextViewer getTopInset modelLine topLine modelLine bottomLine modelLine widgetLine modelLine2WidgetLine modelLine widgetLine paintLine modelLine fCachedTextWidget getDisplay
public void redraw if f Canvas null f Canvas is Disposed GC gc new GC f Canvas double Buffer Paint gc gc dispose  fCanvas fCanvas isDisposed fCanvas doubleBufferPaint
see I Vertical Ruler Column set Font Font public void set Font Font font  IVerticalRulerColumn setFont setFont
Returns the parent composite ruler of this ruler column return the parent ruler since 3 0 protected Composite Ruler get Parent Ruler return f Parent Ruler  CompositeRuler getParentRuler fParentRuler
protected void paint Line int line int y int lineheight GC gc Display display I Line Diff Info info get Diff Info line if info null width of the column int width get Width draw background color if special if has Special Color info gc set Background get Color info display gc fill Rectangle 0 y width lineheight Deletion Indicator Simply a horizontal line int del Before info get Removed Lines Above int del Below info get Removed Lines Below if del Before 0 del Below 0 Color deletion Color get Deletion Color display gc set Foreground deletion Color if del Before 0 gc draw Line 0 y width y if del Below 0 gc draw Line 0 y lineheight 1 width y lineheight 1  paintLine ILineDiffInfo getDiffInfo getWidth hasSpecialColor setBackground getColor fillRectangle delBefore getRemovedLinesAbove delBelow getRemovedLinesBelow delBefore delBelow deletionColor getDeletionColor setForeground deletionColor delBefore drawLine delBelow drawLine
Returns whether the line background differs from the default param info the info being queried return code true code if code info code describes either a changed or an added line private boolean has Special Color I Line Diff Info info return info get Change Type I Line Diff Info ADDED info get Change Type I Line Diff Info CHANGED  hasSpecialColor ILineDiffInfo getChangeType ILineDiffInfo getChangeType ILineDiffInfo
Retrieves the code I Line Diff Info code for code line code from the model There are optimizations for direct access and sequential access patterns param line the line we want the info for return the code I Line Diff Info code for code line code or code null code private I Line Diff Info get Diff Info int line if f Annotation Model null return null assume direct access if f Annotation Model instanceof I Line Differ I Line Differ differ I Line Differ f Annotation Model return differ get Line Info line return null  ILineDiffInfo ILineDiffInfo ILineDiffInfo getDiffInfo fAnnotationModel fAnnotationModel ILineDiffer ILineDiffer ILineDiffer fAnnotationModel getLineInfo
Returns the color for deleted lines param display the display return the color to be used for the deletion indicator private Color get Deletion Color Display display return f Deleted Color null get Background display f Deleted Color  getDeletionColor fDeletedColor getBackground fDeletedColor
Returns the color for the given line diff info param info the code I Line Diff Info code being queried param display the display that the drawing occurs on return the correct background color for the line type being described by code info code private Color get Color I Line Diff Info info Display display Assert is True info null info get Change Type I Line Diff Info UNCHANGED Color ret null switch info get Change Type case I Line Diff Info CHANGED ret f Changed Color break case I Line Diff Info ADDED ret f Added Color break return ret null get Background display ret  ILineDiffInfo getColor ILineDiffInfo isTrue getChangeType ILineDiffInfo getChangeType ILineDiffInfo fChangedColor ILineDiffInfo fAddedColor getBackground
see org eclipse jface text source I Vertical Ruler Info get Line Of Last Mouse Button Activity public int get Line Of Last Mouse Button Activity return get Parent Ruler get Line Of Last Mouse Button Activity  IVerticalRulerInfo getLineOfLastMouseButtonActivity getLineOfLastMouseButtonActivity getParentRuler getLineOfLastMouseButtonActivity
see org eclipse jface text source I Vertical Ruler Info to Document Line Number int public int to Document Line Number int y coordinate return get Parent Ruler to Document Line Number y coordinate  IVerticalRulerInfo toDocumentLineNumber toDocumentLineNumber y_coordinate getParentRuler toDocumentLineNumber y_coordinate
see org eclipse jface text source I Vertical Ruler Info Extension get Hover public I Annotation Hover get Hover return f Hover  IVerticalRulerInfoExtension getHover IAnnotationHover getHover fHover
see org eclipse jface text source I Change Ruler Column set Hover org eclipse jface text source I Annotation Hover public void set Hover I Annotation Hover hover f Hover hover  IChangeRulerColumn setHover IAnnotationHover setHover IAnnotationHover fHover
public void set Model I Annotation Model model I Annotation Model new Model if model instanceof I Annotation Model Extension new Model I Annotation Model Extension model get Annotation Model QUICK DIFF MODEL ID else new Model model if f Annotation Model new Model if f Annotation Model null f Annotation Model remove Annotation Model Listener f Annotation Listener f Annotation Model new Model if f Annotation Model null f Annotation Model add Annotation Model Listener f Annotation Listener redraw  setModel IAnnotationModel IAnnotationModel newModel IAnnotationModelExtension newModel IAnnotationModelExtension getAnnotationModel QUICK_DIFF_MODEL_ID newModel fAnnotationModel newModel fAnnotationModel fAnnotationModel removeAnnotationModelListener fAnnotationListener fAnnotationModel newModel fAnnotationModel fAnnotationModel addAnnotationModelListener fAnnotationListener
public void set Background Color background f Background background if f Canvas null f Canvas is Disposed f Canvas set Background get Background f Canvas get Display  setBackground fBackground fCanvas fCanvas isDisposed fCanvas setBackground getBackground fCanvas getDisplay
see org eclipse jface text source I Change Ruler Column set Added Color org eclipse swt graphics Color public void set Added Color Color added Color f Added Color added Color  IChangeRulerColumn setAddedColor setAddedColor addedColor fAddedColor addedColor
see org eclipse jface text source I Change Ruler Column set Changed Color org eclipse swt graphics Color public void set Changed Color Color changed Color f Changed Color changed Color  IChangeRulerColumn setChangedColor setChangedColor changedColor fChangedColor changedColor
see org eclipse jface text source I Change Ruler Column set Deleted Color org eclipse swt graphics Color public void set Deleted Color Color deleted Color f Deleted Color deleted Color  IChangeRulerColumn setDeletedColor setDeletedColor deletedColor fDeletedColor deletedColor
see org eclipse jface text source I Vertical Ruler Info Extension get Model public I Annotation Model get Model return f Annotation Model  IVerticalRulerInfoExtension getModel IAnnotationModel getModel fAnnotationModel
see I Vertical Ruler Column get Control public Control get Control return f Canvas  IVerticalRulerColumn getControl getControl fCanvas
see org eclipse jface text source I Vertical Ruler Info get Width public int get Width return f Width  IVerticalRulerInfo getWidth getWidth fWidth
if d null d async Exec new Runnable public void run redraw  asyncExec
Triggers a redraw in the display thread protected final void post Redraw if f Canvas null f Canvas is Disposed Display d f Canvas get Display if d null d async Exec new Runnable public void run redraw  postRedraw fCanvas fCanvas isDisposed fCanvas getDisplay asyncExec
see org eclipse jface text source I Vertical Ruler Info Extension add Vertical Ruler Listener org eclipse jface text source I Vertical Ruler Listener public void add Vertical Ruler Listener I Vertical Ruler Listener listener throw new Unsupported Operation Exception  IVerticalRulerInfoExtension addVerticalRulerListener IVerticalRulerListener addVerticalRulerListener IVerticalRulerListener UnsupportedOperationException
see org eclipse jface text source I Vertical Ruler Info Extension remove Vertical Ruler Listener org eclipse jface text source I Vertical Ruler Listener public void remove Vertical Ruler Listener I Vertical Ruler Listener listener throw new Unsupported Operation Exception  IVerticalRulerInfoExtension removeVerticalRulerListener IVerticalRulerListener removeVerticalRulerListener IVerticalRulerListener UnsupportedOperationException

Creates the new ruler layout protected Ruler Layout  RulerLayout
protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache Control children composite get Children Point size new Point 0 0 for int i 0 i children length i Point s children i compute Size SWT DEFAULT SWT DEFAULT flush Cache size x s x size y Math max size y s y size x Math max 0 children length 1 f Gap return size  computeSize wHint hHint flushCache getChildren computeSize flushCache fGap
protected void layout Composite composite boolean flush Cache Rectangle cl Area composite get Client Area int ruler Height cl Area height int x 0 Iterator e f Decorators iterator while e has Next I Vertical Ruler Column column I Vertical Ruler Column e next int column Width column get Width column get Control set Bounds x 0 column Width ruler Height x column Width f Gap  flushCache clArea getClientArea rulerHeight clArea fDecorators hasNext IVerticalRulerColumn IVerticalRulerColumn columnWidth getWidth getControl setBounds columnWidth rulerHeight columnWidth fGap
f Menu Detect Listener new Listener public void handle Event Event event if event type SWT Menu Detect Menu menu get Menu if menu null menu set Location event x event y menu set Visible true  fMenuDetectListener handleEvent MenuDetect getMenu setLocation setVisible
super add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Cached Listeners null f Cached Listeners clear f Cached Listeners null  addDisposeListener DisposeListener widgetDisposed DisposeEvent fCachedListeners fCachedListeners fCachedListeners
Creates a new composite ruler canvas param parent the parent composite param style the SWT styles public Composite Ruler Canvas Composite parent int style super parent style f Menu Detect Listener new Listener public void handle Event Event event if event type SWT Menu Detect Menu menu get Menu if menu null menu set Location event x event y menu set Visible true super add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Cached Listeners null f Cached Listeners clear f Cached Listeners null  CompositeRulerCanvas fMenuDetectListener handleEvent MenuDetect getMenu setLocation setVisible addDisposeListener DisposeListener widgetDisposed DisposeEvent fCachedListeners fCachedListeners fCachedListeners
Adds the given listener object as listener of the given type code clazz code to the given control param clazz the listener type param control the control to add the listener to param listener the listener to be added private void add Listener Class clazz Control control SWT Event Listener listener if Control Listener class equals clazz control add Control Listener Control Listener listener return if Focus Listener class equals clazz control add Focus Listener Focus Listener listener return if Help Listener class equals clazz control add Help Listener Help Listener listener return if Key Listener class equals clazz control add Key Listener Key Listener listener return if Mouse Listener class equals clazz control add Mouse Listener Mouse Listener listener return if Mouse Move Listener class equals clazz control add Mouse Move Listener Mouse Move Listener listener return if Mouse Track Listener class equals clazz control add Mouse Track Listener Mouse Track Listener listener return if Paint Listener class equals clazz control add Paint Listener Paint Listener listener return if Traverse Listener class equals clazz control add Traverse Listener Traverse Listener listener return if Dispose Listener class equals clazz control add Dispose Listener Dispose Listener listener return  addListener SWTEventListener ControlListener addControlListener ControlListener FocusListener addFocusListener FocusListener HelpListener addHelpListener HelpListener KeyListener addKeyListener KeyListener MouseListener addMouseListener MouseListener MouseMoveListener addMouseMoveListener MouseMoveListener MouseTrackListener addMouseTrackListener MouseTrackListener PaintListener addPaintListener PaintListener TraverseListener addTraverseListener TraverseListener DisposeListener addDisposeListener DisposeListener
Removes the given listener object as listener of the given type code clazz code from the given control param clazz the listener type param control the control to remove the listener from param listener the listener to be removed private void remove Listener Class clazz Control control SWT Event Listener listener if Control Listener class equals clazz control remove Control Listener Control Listener listener return if Focus Listener class equals clazz control remove Focus Listener Focus Listener listener return if Help Listener class equals clazz control remove Help Listener Help Listener listener return if Key Listener class equals clazz control remove Key Listener Key Listener listener return if Mouse Listener class equals clazz control remove Mouse Listener Mouse Listener listener return if Mouse Move Listener class equals clazz control remove Mouse Move Listener Mouse Move Listener listener return if Mouse Track Listener class equals clazz control remove Mouse Track Listener Mouse Track Listener listener return if Paint Listener class equals clazz control remove Paint Listener Paint Listener listener return if Traverse Listener class equals clazz control remove Traverse Listener Traverse Listener listener return if Dispose Listener class equals clazz control remove Dispose Listener Dispose Listener listener return  removeListener SWTEventListener ControlListener removeControlListener ControlListener FocusListener removeFocusListener FocusListener HelpListener removeHelpListener HelpListener KeyListener removeKeyListener KeyListener MouseListener removeMouseListener MouseListener MouseMoveListener removeMouseMoveListener MouseMoveListener MouseTrackListener removeMouseTrackListener MouseTrackListener PaintListener removePaintListener PaintListener TraverseListener removeTraverseListener TraverseListener DisposeListener removeDisposeListener DisposeListener
Adds the given listener object to the internal book keeping under the given listener type code clazz code param clazz the listener type param listener the listener object private void add Listener Class clazz SWT Event Listener listener Control children get Children for int i 0 i children length i if children i null children i is Disposed add Listener clazz children i listener Listener Info info new Listener Info info f Class clazz info f Listener listener f Cached Listeners add info  addListener SWTEventListener getChildren isDisposed addListener ListenerInfo ListenerInfo fClass fListener fCachedListeners
Removes the given listener object from the internal book keeping under the given listener type code clazz code param clazz the listener type param listener the listener object private void remove Listener Class clazz SWT Event Listener listener int length f Cached Listeners size for int i 0 i length i Listener Info info Listener Info f Cached Listeners get i if listener info f Listener clazz equals info f Class f Cached Listeners remove i break Control children get Children for int i 0 i children length i if children i null children i is Disposed remove Listener clazz children i listener  removeListener SWTEventListener fCachedListeners ListenerInfo ListenerInfo fCachedListeners fListener fClass fCachedListeners getChildren isDisposed removeListener
Tells this canvas that a child has been added param child the child public void child Added Control child if child null child is Disposed int length f Cached Listeners size for int i 0 i length i Listener Info info Listener Info f Cached Listeners get i add Listener info f Class child info f Listener child add Listener SWT Menu Detect f Menu Detect Listener  childAdded isDisposed fCachedListeners ListenerInfo ListenerInfo fCachedListeners addListener fClass fListener addListener MenuDetect fMenuDetectListener
Tells this canvas that a child has been removed param child the child public void child Removed Control child if child null child is Disposed int length f Cached Listeners size for int i 0 i length i Listener Info info Listener Info f Cached Listeners get i remove Listener info f Class child info f Listener child remove Listener SWT Menu Detect f Menu Detect Listener  childRemoved isDisposed fCachedListeners ListenerInfo ListenerInfo fCachedListeners removeListener fClass fListener removeListener MenuDetect fMenuDetectListener
see Control remove Control Listener Control Listener public void remove Control Listener Control Listener listener remove Listener Control Listener class listener super remove Control Listener listener  removeControlListener ControlListener removeControlListener ControlListener removeListener ControlListener removeControlListener
see Control remove Focus Listener Focus Listener public void remove Focus Listener Focus Listener listener remove Listener Focus Listener class listener super remove Focus Listener listener  removeFocusListener FocusListener removeFocusListener FocusListener removeListener FocusListener removeFocusListener
see Control remove Help Listener Help Listener public void remove Help Listener Help Listener listener remove Listener Help Listener class listener super remove Help Listener listener  removeHelpListener HelpListener removeHelpListener HelpListener removeListener HelpListener removeHelpListener
see Control remove Key Listener Key Listener public void remove Key Listener Key Listener listener remove Listener Key Listener class listener super remove Key Listener listener  removeKeyListener KeyListener removeKeyListener KeyListener removeListener KeyListener removeKeyListener
see Control remove Mouse Listener Mouse Listener public void remove Mouse Listener Mouse Listener listener remove Listener Mouse Listener class listener super remove Mouse Listener listener  removeMouseListener MouseListener removeMouseListener MouseListener removeListener MouseListener removeMouseListener
see Control remove Mouse Move Listener Mouse Move Listener public void remove Mouse Move Listener Mouse Move Listener listener remove Listener Mouse Move Listener class listener super remove Mouse Move Listener listener  removeMouseMoveListener MouseMoveListener removeMouseMoveListener MouseMoveListener removeListener MouseMoveListener removeMouseMoveListener
see Control remove Mouse Track Listener Mouse Track Listener public void remove Mouse Track Listener Mouse Track Listener listener remove Listener Mouse Track Listener class listener super remove Mouse Track Listener listener  removeMouseTrackListener MouseTrackListener removeMouseTrackListener MouseTrackListener removeListener MouseTrackListener removeMouseTrackListener
see Control remove Paint Listener Paint Listener public void remove Paint Listener Paint Listener listener remove Listener Paint Listener class listener super remove Paint Listener listener  removePaintListener PaintListener removePaintListener PaintListener removeListener PaintListener removePaintListener
see Control remove Traverse Listener Traverse Listener public void remove Traverse Listener Traverse Listener listener remove Listener Traverse Listener class listener super remove Traverse Listener listener  removeTraverseListener TraverseListener removeTraverseListener TraverseListener removeListener TraverseListener removeTraverseListener
see Widget remove Dispose Listener Dispose Listener public void remove Dispose Listener Dispose Listener listener remove Listener Dispose Listener class listener super remove Dispose Listener listener  removeDisposeListener DisposeListener removeDisposeListener DisposeListener removeListener DisposeListener removeDisposeListener
see Control add Control Listener Control Listener public void add Control Listener Control Listener listener super add Control Listener listener add Listener Control Listener class listener  seeControl addControlListener ControlListener addControlListener ControlListener addControlListener addListener ControlListener
see Control add Focus Listener Focus Listener public void add Focus Listener Focus Listener listener super add Focus Listener listener add Listener Focus Listener class listener  addFocusListener FocusListener addFocusListener FocusListener addFocusListener addListener FocusListener
see Control add Help Listener Help Listener public void add Help Listener Help Listener listener super add Help Listener listener add Listener Help Listener class listener  addHelpListener HelpListener addHelpListener HelpListener addHelpListener addListener HelpListener
see Control add Key Listener Key Listener public void add Key Listener Key Listener listener super add Key Listener listener add Listener Key Listener class listener  addKeyListener KeyListener addKeyListener KeyListener addKeyListener addListener KeyListener
see Control add Mouse Listener Mouse Listener public void add Mouse Listener Mouse Listener listener super add Mouse Listener listener add Listener Mouse Listener class listener  addMouseListener MouseListener addMouseListener MouseListener addMouseListener addListener MouseListener
see Control add Mouse Move Listener Mouse Move Listener public void add Mouse Move Listener Mouse Move Listener listener super add Mouse Move Listener listener add Listener Mouse Move Listener class listener  addMouseMoveListener MouseMoveListener addMouseMoveListener MouseMoveListener addMouseMoveListener addListener MouseMoveListener
see Control add Mouse Track Listener Mouse Track Listener public void add Mouse Track Listener Mouse Track Listener listener super add Mouse Track Listener listener add Listener Mouse Track Listener class listener  addMouseTrackListener MouseTrackListener addMouseTrackListener MouseTrackListener addMouseTrackListener addListener MouseTrackListener
see Control add Paint Listener Paint Listener public void add Paint Listener Paint Listener listener super add Paint Listener listener add Listener Paint Listener class listener  seeControl addPaintListener PaintListener addPaintListener PaintListener addPaintListener addListener PaintListener
see Control add Traverse Listener Traverse Listener public void add Traverse Listener Traverse Listener listener super add Traverse Listener listener add Listener Traverse Listener class listener  addTraverseListener TraverseListener addTraverseListener TraverseListener addTraverseListener addListener TraverseListener
see Widget add Dispose Listener Dispose Listener public void add Dispose Listener Dispose Listener listener super add Dispose Listener listener add Listener Dispose Listener class listener  addDisposeListener DisposeListener addDisposeListener DisposeListener addDisposeListener addListener DisposeListener
Constructs a new composite vertical ruler public Composite Ruler this 0  CompositeRuler
Constructs a new composite ruler with the given gap between its columns param gap public Composite Ruler int gap f Gap gap  CompositeRuler fGap
Inserts the given column at the specified slot to this composite ruler Columns are counted from left to right param index the index param ruler Column the decorator to be inserted public void add Decorator int index I Vertical Ruler Column ruler Column if index f Decorators size f Decorators add ruler Column else f Decorators add index ruler Column if f Composite null f Composite is Disposed ruler Column create Control this f Composite f Composite child Added ruler Column get Control layout Text Viewer  rulerColumn addDecorator IVerticalRulerColumn rulerColumn fDecorators fDecorators rulerColumn fDecorators rulerColumn fComposite fComposite isDisposed rulerColumn createControl fComposite fComposite childAdded rulerColumn getControl layoutTextViewer
Removes the decorator in the specified slot from this composite ruler param index the index public void remove Decorator int index I Vertical Ruler Column ruler Column I Vertical Ruler Column f Decorators get index remove Decorator ruler Column  removeDecorator IVerticalRulerColumn rulerColumn IVerticalRulerColumn fDecorators removeDecorator rulerColumn
Removes the given decorator from the composite ruler param ruler Column the ruler column to be removed since 3 0 public void remove Decorator I Vertical Ruler Column ruler Column f Decorators remove ruler Column if ruler Column null Control cc ruler Column get Control if cc null cc is Disposed f Composite child Removed cc cc dispose layout Text Viewer  rulerColumn removeDecorator IVerticalRulerColumn rulerColumn fDecorators rulerColumn rulerColumn rulerColumn getControl isDisposed fComposite childRemoved layoutTextViewer
Layouts the text viewer This also causes this ruler to get be layouted private void layout Text Viewer Control parent f Text Viewer get Text Widget if f Text Viewer instanceof I Text Viewer Extension I Text Viewer Extension extension I Text Viewer Extension f Text Viewer parent extension get Control if parent instanceof Composite parent is Disposed Composite parent layout true  layoutTextViewer fTextViewer getTextWidget fTextViewer ITextViewerExtension ITextViewerExtension ITextViewerExtension fTextViewer getControl isDisposed
see I Vertical Ruler get Control public Control get Control return f Composite  IVerticalRuler getControl getControl fComposite
parent add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e f Text Viewer null f Composite null f Model null f Decorators clear  addDisposeListener DisposeListener widgetDisposed DisposeEvent fTextViewer fComposite fModel fDecorators
public Control create Control Composite parent I Text Viewer text Viewer f Text Viewer text Viewer f Composite new Composite Ruler Canvas parent SWT NONE f Composite set Layout new Ruler Layout Iterator iter f Decorators iterator while iter has Next I Vertical Ruler Column column I Vertical Ruler Column iter next column create Control this f Composite f Composite child Added column get Control parent add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e f Text Viewer null f Composite null f Model null f Decorators clear return f Composite  createControl ITextViewer textViewer fTextViewer textViewer fComposite CompositeRulerCanvas fComposite setLayout RulerLayout fDecorators hasNext IVerticalRulerColumn IVerticalRulerColumn createControl fComposite fComposite childAdded getControl addDisposeListener DisposeListener widgetDisposed DisposeEvent fTextViewer fComposite fModel fDecorators fComposite
public void set Model I Annotation Model model f Model model Iterator e f Decorators iterator while e has Next I Vertical Ruler Column column I Vertical Ruler Column e next column set Model model  setModel IAnnotationModel fModel fDecorators hasNext IVerticalRulerColumn IVerticalRulerColumn setModel
see I Vertical Ruler get Model public I Annotation Model get Model return f Model  IVerticalRuler getModel IAnnotationModel getModel fModel
d async Exec new Runnable public void run Iterator e f Decorators iterator while e has Next I Vertical Ruler Column column I Vertical Ruler Column e next column redraw  asyncExec fDecorators hasNext IVerticalRulerColumn IVerticalRulerColumn
public void update if f Composite null f Composite is Disposed Display d f Composite get Display if d null d async Exec new Runnable public void run Iterator e f Decorators iterator while e has Next I Vertical Ruler Column column I Vertical Ruler Column e next column redraw  fComposite fComposite isDisposed fComposite getDisplay asyncExec fDecorators hasNext IVerticalRulerColumn IVerticalRulerColumn
public void set Font Font font Iterator e f Decorators iterator while e has Next I Vertical Ruler Column column I Vertical Ruler Column e next column set Font font  setFont fDecorators hasNext IVerticalRulerColumn IVerticalRulerColumn setFont
public int get Width int width 0 Iterator e f Decorators iterator while e has Next I Vertical Ruler Column column I Vertical Ruler Column e next width column get Width f Gap return Math max 0 width f Gap  getWidth fDecorators hasNext IVerticalRulerColumn IVerticalRulerColumn getWidth fGap fGap
public int get Line Of Last Mouse Button Activity if f Last Mouse Button Activity Line 1 f Last Mouse Button Activity Line to Document Line Number f Location y return f Last Mouse Button Activity Line  getLineOfLastMouseButtonActivity fLastMouseButtonActivityLine fLastMouseButtonActivityLine toDocumentLineNumber fLocation fLastMouseButtonActivityLine
public int to Document Line Number int y coordinate if f Text Viewer null y coordinate 1 return 1 Styled Text text f Text Viewer get Text Widget int line y coordinate text get Top Pixel text get Line Height return widget Line2 Model Line f Text Viewer line  toDocumentLineNumber y_coordinate fTextViewer y_coordinate StyledText fTextViewer getTextWidget y_coordinate getTopPixel getLineHeight widgetLine2ModelLine fTextViewer
Returns the line in the given viewer s document that correspond to the given line of the viewer s widget param viewer the viewer param widget Line the widget line return the corresponding line the viewer s document since 2 1 protected final static int widget Line2 Model Line I Text Viewer viewer int widget Line if viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 viewer return extension widget Line2 Model Line widget Line try I Region r viewer get Visible Region I Document d viewer get Document return widget Line d get Line Of Offset r get Offset catch Bad Location Exception x return widget Line  widgetLine widgetLine2ModelLine ITextViewer widgetLine ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 widgetLine2ModelLine widgetLine IRegion getVisibleRegion IDocument getDocument widgetLine getLineOfOffset getOffset BadLocationException widgetLine
Returns this ruler s text viewer return this ruler s text viewer public I Text Viewer get Text Viewer return f Text Viewer  ITextViewer getTextViewer fTextViewer
public void set Location Of Last Mouse Button Activity int x int y f Location x x f Location y y f Last Mouse Button Activity Line 1  setLocationOfLastMouseButtonActivity fLocation fLocation fLastMouseButtonActivityLine
Returns an iterator over the code I Vertical Ruler Columns code that make up this composite column return an iterator over the contained columns since 3 0 public Iterator get Decorator Iterator Assert is Not Null f Decorators f Decorators must be initialized NON NLS 1 return f Decorators iterator  IVerticalRulerColumns getDecoratorIterator isNotNull fDecorators fDecorators fDecorators
since 3 0 public I Annotation Hover get Hover return null  IAnnotationHover getHover
since 3 0 public void add Vertical Ruler Listener I Vertical Ruler Listener listener f Annotation Listeners add listener  addVerticalRulerListener IVerticalRulerListener fAnnotationListeners
since 3 0 public void remove Vertical Ruler Listener I Vertical Ruler Listener listener f Annotation Listeners remove listener  removeVerticalRulerListener IVerticalRulerListener fAnnotationListeners
Fires the annotation selected event to all registered vertical ruler listeners TODO use robust iterators param event the event to fire since 3 0 public void fire Annotation Selected Vertical Ruler Event event forward to listeners for Iterator it f Annotation Listeners iterator it has Next I Vertical Ruler Listener listener I Vertical Ruler Listener it next listener annotation Selected event  fireAnnotationSelected VerticalRulerEvent fAnnotationListeners hasNext IVerticalRulerListener IVerticalRulerListener annotationSelected
Fires the annotation default selected event to all registered vertical ruler listeners TODO use robust iterators param event the event to fire since 3 0 public void fire Annotation Default Selected Vertical Ruler Event event forward to listeners for Iterator it f Annotation Listeners iterator it has Next I Vertical Ruler Listener listener I Vertical Ruler Listener it next listener annotation Default Selected event  fireAnnotationDefaultSelected VerticalRulerEvent fAnnotationListeners hasNext IVerticalRulerListener IVerticalRulerListener annotationDefaultSelected
Informs all registered vertical ruler listeners that the content menu on a selected annotation is about to be shown TODO use robust iterators param event the event to fire param menu the menu that is about to be shown since 3 0 public void fire Annotation Context Menu About To Show Vertical Ruler Event event Menu menu forward to listeners for Iterator it f Annotation Listeners iterator it has Next I Vertical Ruler Listener listener I Vertical Ruler Listener it next listener annotation Context Menu About To Show event menu  fireAnnotationContextMenuAboutToShow VerticalRulerEvent fAnnotationListeners hasNext IVerticalRulerListener IVerticalRulerListener annotationContextMenuAboutToShow

Returns the type of the given annotation param annotation the annotation return the type of the given annotation or code null code if it has none deprecated use code Annotation get Type code  getType
Returns whether the given annotation spans multiple lines param annotation the annotation return code true code if the annotation spans multiple lines code false code otherwise deprecated assumed to always return code true code 
Returns whether the given annotation is temporary rather than persistent param annotation the annotation return code true code if the annotation is temporary code false code otherwise deprecated use code Annotation is Persistent code  isPersistent

Returns the label for the given annotation s type param annotation the annotation return the label the given annotation s type or code null code if no such label exists 
Returns the layer for given annotation Annotations are considered being located at layers and are considered being painted starting with layer 0 upwards Thus an annotation at layer 5 will be drawn on top of all co located annotations at the layers 4 0 param annotation the annotation return the layer of the given annotation 
Draws a graphical representation of the given annotation within the given bounds param annotation the given annotation param gc the drawing GC param canvas the canvas to draw on param bounds the bounds inside the canvas to draw on 
Returns code true code if painting code annotation code will produce something meaningful code false code if not E g if no image is available param annotation the annotation to check whether it can be painted return code true code if painting code annotation code will succeed 
Returns code true code if the given annotation is of the given type or code false code otherwise param annotation Type the annotation type param potential Supertype the potential super annotation type return code true code if annotation type is a sub type of the potential annotation super type  annotationType potentialSupertype
Returns the list of super types for the given annotation type This does not include the type itself The index in the array of super types indicates the length of the path in the hierarchy graph to the given annotation type param annotation Type the annotation type to check return the super types for the given annotation type  annotationType

Returns the text which should be presented in the a hover popup window This information is requested based on the specified line number param source Viewer the source viewer this hover is registered with param line Number the line number for which information is requested return the requested information or code null code if no such information exists  sourceViewer lineNumber

Returns the hover control creator of this annotation hover return the hover control creator 
Returns whether the provided information control can interact with the mouse cursor I e the hover must implement custom information control management return code true code if the mouse cursor can be handled 
Returns the object which should be presented in the a hover popup window The information is requested based on the specified line range param source Viewer the source viewer this hover is registered with param line Range the line range for which information is requested param visible Number Of Lines the number of visible lines return the requested information or code null code if no such information exists  sourceViewer lineRange visibleNumberOfLines
Returns the range of lines that include the given line number for which the same hover information is valid param viewer the viewer which the hover is queried for param line Number the line number of the line for which a hover is displayed for return the computed line range  lineNumber

Returns an iterator for a copy of this annotation map s values return an iterator for a copy of this map s values 
Returns an iterator for a copy of this map s key set return an iterator for a copy of this map s key set 
inherit Doc The returned set is not synchronized on this annotation map s lock object  inheritDoc
inherit Doc The returned set is not synchronized on this annotation map s lock object  inheritDoc
inherit Doc The returned collection is not synchronized on this annotation map s lock object  inheritDoc

Registers the annotation model listener with this annotation model After registration listener is informed about each change of this model If the listener is already registered nothing happens param listener the listener to be registered may not be code null code 
Removes the listener from the model s list of annotation model listeners If the listener is not registered with the model nothing happens param listener the listener to be removed may not be code null code 
Connects the annotation model to a document The annotations managed by this model must subsequently update according to the changes applied to the document Once an annotation model is connected to a document all further code connect code calls must mention the document the model is already connected to An annotation model primarily uses code connect code and code disconnect code for reference counting the document Reference counting frees the clients from keeping tracker whether a model has already been connected to a document param document the document the model gets connected to may not be code null code see disconnect I Document  IDocument
Disconnects this model from a document After that document changes no longer matter An annotation model may only be disconnected from a document to which it has been connected before If the model reference counts the connections to a document the connection to the document may only be terminated if the reference count does down to 0 param document the document the model gets disconnected from may not be code null code see connect I Document for further specification details  IDocument
Adds a annotation to this annotation model The annotation is associated with with the given position which describes the range covered by the annotation All registered annotation model listeners are informed about the change If the model is connected to a document the position is automatically updated on document changes If the annotation is already managed by this annotation model or is not a valid position in the connected nothing happens param annotation the annotation to add may not be code null code param position the position describing the range covered by this annotation may not be code null code 
Removes the given annotation from the model I e the annotation is no longer managed by this model The position associated with the annotation is no longer updated on document changes If the annotation is not managed by this model nothing happens param annotation the annotation to be removed from this model may not be code null code 
Returns all annotations managed by this model return all annotations managed by this model 
Returns the position associated with the given annotation param annotation the annotation whose position should be returned return the position of the given annotation or code null code if no associated annotation exists 

Attaches code attachment code to the receiver Connects code attachment code to the currently connected document If code attachment code is already attached even under a different key it is not attached again param key the key through which the attachment is identified param attachment the attached code I Annotation Model code  IAnnotationModel
Returns the attached code I Annotation Model code for code key code or code null code if none is attached for code key code param key the key through which the attachment is identified return an code I Annotation Model code attached under code key code or code null code  IAnnotationModel IAnnotationModel
Removes and returns the attached code I Annotation Model code for code key code param key the key through which the attachment is identified return an code I Annotation Model code attached under code key code or code null code  IAnnotationModel IAnnotationModel
Adds and removes annotations to from this annotation model in a single step The annotations to remove are given in an array The annotations to add are provided in a map associating the annotations with the positions at which they should be added All registered annotation model listeners are informed about the change If the model is connected to a document the positions are automatically updated on document changes Annotations that are already managed by this annotation model or are not associated with a valid position in the connected document have no effect param annotations To Remove the annotations to be removed may be code null code param annotations To Add the annotations which will be added may be code null code each map entry has an code Annotation code as key and a code Position code as value throws Class Cast Exception if one of the map key or values has a wrong type  annotationsToRemove annotationsToAdd ClassCastException
Modifies the position associated with the given annotation to equal the given position If the annotation is not yet managed by this annotation model the annotation is added If the given position is code null code the annotation is removed from the model All annotation model change listeners will be informed about the change param annotation the annotation whose associated position should be modified param position the position to whose values the associated position should be changed 
void modify Annotation Position Annotation annotation Position position Removes all annotations from this annotation model void remove All Annotations  modifyAnnotationPosition removeAllAnnotations
Returns the modification stamp of this annotation model return the modification stamp of this annotation model 

Called if a model change occurred on the given model p Replaced by link I Annotation Model Listener Extension model Changed Annotation Model Event param model the changed annotation model  IAnnotationModelListenerExtension modelChanged AnnotationModelEvent

Called if a model change occurred on the given model param event the event to be sent out 

Returns the annotations drawing layer return the annotations drawing layer 
Implement this method to draw a graphical representation of this annotation within the given bounds param gc the drawing GC param canvas the canvas to draw on param bounds the bounds inside the canvas to draw on 

Sets the hover of this ruler column param hover the hover that will produce hover information text for this ruler column 
Sets the background color for normal lines The color has to be disposed of by the caller when the receiver is no longer used param background Color the new color to be used as standard line background  backgroundColor
Sets the background color for added lines The color has to be disposed of by the caller when the receiver is no longer used param added Color the new color to be used for the added lines background  addedColor
Sets the background color for changed lines The color has to be disposed of by the caller when the receiver is no longer used param changed Color the new color to be used for the changed lines background  changedColor
Sets the color for the deleted lines indicator The color has to be disposed of by the caller when the receiver is no longer used param deleted Color the new color to be used for the deleted lines indicator  deletedColor

Disposes this pair matcher void dispose 
Clears this pair matcher I e the matcher throws away all state it might remember and prepares itself for a new call of the code match code method 
Starting at the given offset the matcher chooses a character close to this offset The matcher then searches for the matching peer character of the chosen character and if it finds one returns the minimal region of the document that contains both characters It returns code null code if there is no peer character param i Document the document to work on param i the start offset return the minimal region containing the peer characters  iDocument
Returns the anchor for the region of the matching peer characters The anchor says whether the character that has been chosen to search for its peer character has been left or right of the initial offset return code RIGHT code or code LEFT code 

Determines the line state for line code line code in the targeted document param line the line to get diff information for return the line information object for code line code 
Reverts a single changed line to its original state not touching any lines that are deleted at its borders param line the line number of the line to be restored throws Bad Location Exception if code line code is out of bounds  BadLocationException
Reverts a block of modified added lines to their original state including any deleted lines inside the block or at its borders A block is considered to be a range of modified e g changed or added lines param line any line in the block to be reverted throws Bad Location Exception if code line code is out of bounds  BadLocationException
Reverts a range of lines to their original state including any deleted lines inside the block or at its borders param line any line in the block to be reverted param n Lines the number of lines to be reverted must be gt 0 throws Bad Location Exception if code line code is out of bounds  nLines BadLocationException
Restores the deleted lines after code line code param line the deleted lines following this line number are restored return the number of restored lines throws Bad Location Exception if code line code is out of bounds  BadLocationException

Returns the number of deleted lines after this line return the number of lines after this line 
Returns the number of deleted lines before this line return the number of lines before this line 
Returns the type of this line one out of code UNCHANGED code code CHANGED code or code ADDED code return the type of this line 
Returns whether this line has any changes to itself or any deletions before or after it return code true code if the line s state as returned by code get Type code is either code CHANGED code or code ADDED code or either of code get Removed Lines Below code and code get Removed Lines Above code would return a number gt 0  getType getRemovedLinesBelow getRemovedLinesAbove
Returns the original text of this changed region return the original text of this changed region including any deleted lines The returned value and its elements may not be code null code it may however be of zero length 

Returns the start line of this line range or code 1 code return the start line of this line range or code 1 code if this line range is invalid 
Returns the number of lines of this line range or code 1 code return the number of lines in this line range or code 1 code if this line range is invalid 

Draws an image aligned inside the given rectangle on the given canvas param image the image to be drawn param gc the drawing GC param canvas the canvas on which to draw param r the clipping rectangle param halign the horizontal alignment of the image to be drawn param valign the vertical alignment of the image to be drawn public static void draw Image Image image GC gc Canvas canvas Rectangle r int halign int valign if image null Rectangle bounds image get Bounds int x 0 switch halign case SWT LEFT break case SWT CENTER x r width bounds width 2 break case SWT RIGHT x r width bounds width break int y 0 switch valign case SWT TOP Font Metrics font Metrics gc get Font Metrics y font Metrics get Height bounds height 2 break case SWT CENTER y r height bounds height 2 break case SWT BOTTOM Font Metrics font Metrics gc get Font Metrics y r height font Metrics get Height bounds height 2 break gc draw Image image r x x r y y  drawImage getBounds FontMetrics fontMetrics getFontMetrics fontMetrics getHeight FontMetrics fontMetrics getFontMetrics fontMetrics getHeight drawImage
Draws an image aligned inside the given rectangle on the given canvas param image the image to be drawn param gc the drawing GC param canvas the canvas on which to draw param r the clipping rectangle param align the alignment of the image to be drawn public static void draw Image Image image GC gc Canvas canvas Rectangle r int align draw Image image gc canvas r align SWT CENTER  drawImage drawImage

Returns whether there is an annotation an the given vertical coordinate This method takes the compression factor of the overview ruler into account param y the y coordinate return code true code if there is an annotation code false code otherwise 
Returns the height of the visual presentation of an annotation in this overview ruler Assumes that all annotations are represented using the same height return int the visual height of an annotation 
Sets the color for the given annotation type in this overview ruler param annotation Type the annotation type param color the color  annotationType
Sets the drawing layer for the given annotation type in this overview ruler param annotation Type the annotation type param layer the drawing layer  annotationType
Adds the given annotation type to this overview ruler Starting with this call annotations of the given type are shown in the overview ruler param annotation Type the annotation type  annotationType
Removes the given annotation type from this overview ruler Annotations of the given type are no longer shown in the overview ruler param annotation Type the annotation type  annotationType
Adds the given annotation type to the header of this ruler Starting with this call the presence of annotations is tracked and the header is drawn in the configured color param annotation Type the annotation type to be tracked  annotationType
Removes the given annotation type from the header of this ruler The presence of annotations of the given type is no longer tracked and the header is drawn in the default color depending on the other configured configured annotation types param annotation Type the annotation type to be removed  annotationType
Returns this rulers header control This is the little area between the top of the text widget and the top of this overview ruler return the header control of this overview ruler 

Returns the color object for the value represented by the given code RGB code object param rgb the RBG color specification return the color object for the given RGB value 
Color get Color RGB rgb Tells this object to dispose all its managed colors void dispose  getColor

Configures the source viewer using the given configuration Prior to 3 0 this method can only be called once Since 3 0 this method can be called again after a call to link I Source Viewer Extension2 unconfigure param configuration the source viewer configuration to be used  ISourceViewerExtension2
Sets the annotation hover of this source viewer The annotation hover provides the information to be displayed in a hover popup window if requested over the annotation presentation area The annotation hover is assumed to be line oriented param annotation Hover the hover to be used code null code is a valid argument  annotationHover
Sets the given document as this viewer s text model and the given annotation model as the model for this viewer s visual annotations The presentation is accordingly updated An appropriate code Text Event code is issued This text event does not carry a related document event param document the viewer s new input document param annotation Model the model for the viewer s visual annotations see I Text Viewer set Document I Document  TextEvent annotationModel ITextViewer setDocument IDocument
Sets the given document as this viewer s text model and the given annotation model as the model for this viewer s visual annotations The presentation is accordingly updated whereby only the specified region is exposed An appropriate code Text Event code is issued The text event does not carry a related document event This method is a convenience method for code set Document document annotation Model set Visible Region offset length code param document the new input document param annotation Model the model of the viewer s visual annotations param model Range Offset the offset of the model range param model Range Length the length of the model range see I Text Viewer set Document I Document int int  TextEvent setDocument annotationModel setVisibleRegion annotationModel modelRangeOffset modelRangeLength ITextViewer setDocument IDocument
Returns this viewer s annotation model Use link I Source Viewer Extension2 get Visual Annotation Model in order to get access to the viewer s visual annotation model return this viewer s annotation model  ISourceViewerExtension2 getVisualAnnotationModel
Sets the annotation used by this viewer as range indicator The range covered by this annotation is referred to as range indication param range Indicator the annotation to be used as this viewer s range indicator  rangeIndicator
Sets the viewers s range indication to the specified range Its is indicated whether the cursor should also be moved to the beginning of the specified range param offset the offset of the range param length the length of the range param move Cursor indicates whether the cursor should be moved to the given offset  moveCursor
Returns the viewer s range indication return the viewer s range indication 
Removes the viewer s range indication There is no visible range indication after this method completed 
Controls the visibility of annotations and in the case of separate presentation areas of text and annotations the visibility of the annotation s presentation area p By default annotations and their presentation area are visible param show indicates the visibility of annotations 

Shows hides an overview representation of the annotations of the whole document of this viewer param show code true code if annotation overview should be visible code false code otherwise 

Rolls back the configuration process of this source viewer The source viewer can be configured again after a call to this method Unlike link I Source Viewer configure Source Viewer Configuration this method can be called more than once without interleaving calls to link I Source Viewer configure Source Viewer Configuration  ISourceViewer SourceViewerConfiguration ISourceViewer SourceViewerConfiguration
Returns the visual annotation model of this viewer return the visual annotation model of this viewer 

Associates an annotation model with this ruler A value code null code is acceptable and clears the ruler param model the new annotation model may be code null code 
Returns the current annotation model of this ruler or code null code if the ruler has no model return this ruler s annotation model or code null code if there is no model 
Forces the vertical ruler to synchronize itself with its annotation model and its viewer s view port 
Creates the ruler s SWT control param parent the parent control of the ruler s control param text Viewer the text viewer to which this ruler belongs return the ruler s SWT control  textViewer

Associates an annotation model with this ruler column A value code null code is acceptable and clears the ruler param model the new annotation model may be code null code 
void set Model I Annotation Model model Redraws this column void redraw  setModel IAnnotationModel
Creates the column s SWT control param parent Ruler the parent ruler of this column param parent Control the control of the parent ruler return the column s SWT control  parentRuler parentControl
Returns the column s SWT control return the column s SWT control 
Returns the width of this column s control return the width of this column s control 
Sets the font of this ruler column param font the new font of the ruler column 

Sets the font of this vertical ruler param font the new font of the vertical ruler 
Sets the location of the last mouse button activity This method is used for example by external mouse listeners param x the x coordinate param y the y coordinate 

Returns the ruler s SWT control return the ruler s SWT control 
Returns the line number of the last mouse button activity Based on the input document of the connected text viewer The smallest possible line number is code 0 code return the line number of the last mouse button activity 
Translates a y coordinate of the ruler s SWT control into the according line number of the document of the connected text viewer param y coordinate a y coordinate of the ruler s SWT control return the line number of that coordinate or code 1 code if that coordinate does not correspond to a valid document line  y_coordinate
Returns the width of this ruler s control return the width of this ruler s control 

public interface I Vertical Ruler Info Extension Returns the hover for this vertical ruler column return the hover for this column  IVerticalRulerInfoExtension
Returns the model currently used by the receiver return the model of the receiver or code null code if no model is installed 
Registers a vertical ruler listener to be informed if an annotation gets selected on the vertical ruler param listener the listener to be informed 
Removes a previously registered listener If code listener code is not registered with the receiver calling this method has no effect param listener the listener to be removed 

Called when an annotation is selected in the vertical ruler param event the annotation event that occurred 
Called when a default selection occurs on an annotation in the vertical ruler param event the annotation event that occurred 
Called when the context menu is opened on an annotation in the vertical ruler param event the annotation event that occurred param menu the menu that is about to be shown 

Prohibits the creation of accessor objects private J Face Text Messages  JFaceTextMessages
Returns the string found in the resource bundle under the given key or a place holder string param key the look up key return the value found under the given key public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException
Gets a string from the resource bundle and formats it with the argument param keythe string used to get the bundle value must not be null param args arguments used when formatting the string return the formatted string since 3 0 public static String get Formatted String String key Object args String format null try format fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1 return Message Format format format args  getFormattedString fgResourceBundle getString MissingResourceException MessageFormat

see org eclipse jface text source I Annotation Hover get Hover Info org eclipse jface text source I Source Viewer int public String get Hover Info I Source Viewer source Viewer int line Number return null  IAnnotationHover getHoverInfo ISourceViewer getHoverInfo ISourceViewer sourceViewer lineNumber
Formats the source w syntax coloring etc This implementation replaces tabs with spaces May be overridden by subclasses param content the hover content return code content code reformatted protected String format Source String content if content null String Buffer sb new String Buffer content final String tab Replacement get Tab Replacement for int pos 0 pos sb length pos if sb char At pos t sb replace pos pos 1 tab Replacement return sb to String return content  formatSource StringBuffer StringBuffer tabReplacement getTabReplacement charAt tabReplacement toString
Returns a replacement for the tab character The default implementation returns a tabulator character but subclasses may override to specify a number of spaces return a whitespace String that will be substituted for the tabulator character protected String get Tab Replacement return t NON NLS 1  getTabReplacement
Computes the content of the hover for the document contained in code viewer code on line code line code param viewer the connected viewer param first the first line in code viewer code s document to consider param last the last line in code viewer code s document to consider param max Lines the max number of lines return The hover content corresponding to the parameters see get Hover Info I Source Viewer int see get Hover Info I Source Viewer I Line Range int private String compute Content I Source Viewer viewer int first int last int max Lines I Line Differ differ get Differ viewer if differ null return null final List lines new Linked List for int l first l last l I Line Diff Info info differ get Line Info l if info null lines add info return decorate Text lines max Lines  maxLines getHoverInfo ISourceViewer getHoverInfo ISourceViewer ILineRange computeContent ISourceViewer maxLines ILineDiffer getDiffer LinkedList ILineDiffInfo getLineInfo decorateText maxLines
Takes a list of code I Line Diff Info code s and computes a hover of at most code max Lines code Added lines are prefixed with a code code changed lines with code code and deleted lines with code code p Deleted and added lines can even each other out so that a number of deleted lines get displayed where in the current document the added lines are param diff Infos a code List code of code I Line Diff Info code param max Lines the maximum number of lines Note that adding up all annotations might give more than that due to deleted lines return a code String code suitable for hover display protected String decorate Text List diff Infos int max Lines max Lines controls the size of the hover not more than what fits into the display are of the viewer added controls how many lines are added added lines are String text new String int added 0 for Iterator it diff Infos iterator it has Next I Line Diff Info info I Line Diff Info it next String original info get Original Text int type info get Change Type int i 0 if type I Line Diff Info ADDED added else if type I Line Diff Info CHANGED text original length 0 original i NON NLS 1 NON NLS 2 max Lines else if type I Line Diff Info UNCHANGED max Lines if max Lines 0 return trim Trailing text for i original length i text original i NON NLS 1 added if max Lines 0 return trim Trailing text text text trim if text length 0 added 0 max Lines 0 text NON NLS 1 while added 0 max Lines 0 text n NON NLS 1 return text  ILineDiffInfo maxLines diffInfos ILineDiffInfo maxLines decorateText diffInfos maxLines maxLines diffInfos hasNext ILineDiffInfo ILineDiffInfo getOriginalText getChangeType ILineDiffInfo ILineDiffInfo maxLines ILineDiffInfo maxLines maxLines trimTrailing maxLines trimTrailing maxLines maxLines
Trims trailing spaces param text a code String code return a copy of code text code with trailing spaces removed private String trim Trailing String text int pos text length 1 while pos 0 Character is Whitespace text char At pos pos return text substring 0 pos 1  trimTrailing isWhitespace charAt
Extracts the line differ if any from the viewer s document s annotation model param viewer the viewer return a line differ for the document displayed in viewer or code null code private I Line Differ get Differ I Source Viewer viewer I Annotation Model model viewer get Annotation Model if model null return null if model instanceof I Annotation Model Extension I Annotation Model diff Model I Annotation Model Extension model get Annotation Model I Change Ruler Column QUICK DIFF MODEL ID if diff Model null model diff Model if model instanceof I Line Differ return I Line Differ model else return null  ILineDiffer getDiffer ISourceViewer IAnnotationModel getAnnotationModel IAnnotationModelExtension IAnnotationModel diffModel IAnnotationModelExtension getAnnotationModel IChangeRulerColumn QUICK_DIFF_MODEL_ID diffModel diffModel ILineDiffer ILineDiffer
Computes the block of lines which form a contiguous block of changes covering code line code param viewer the source viewer showing param line the line which a hover is displayed for param min the first line in code viewer code s document to consider param max the last line in code viewer code s document to consider return the selection in the document displayed in code viewer code containing code line code that is covered by the hover information returned by the receiver protected Point compute Line Range I Source Viewer viewer int line int min int max Algorithm All lines that have changes to themselves added changed are taken that form a contiguous block of lines that includes code line code If code line code is itself unchanged if there is a deleted line either above or below or both the lines 1 from code line code are included in the search as well without applying this last rule to them though I e if code line code is unchanged but has a deleted line above this one is taken in If the line above has changes the block is extended from there If the line has no changes itself the search stops The block never extends the visible line range of the viewer I Line Differ differ get Differ viewer if differ null return null backward search int l line I Line Diff Info info differ get Line Info l search backwards until a line has no changes to itself while l min info null info get Change Type I Line Diff Info CHANGED info get Change Type I Line Diff Info ADDED info differ get Line Info l int first Math min l 1 line forward search l line info differ get Line Info l search forward until a line has no changes to itself while l max info null info get Change Type I Line Diff Info CHANGED info get Change Type I Line Diff Info ADDED info differ get Line Info l int last Math max l 1 line return new Point first last  computeLineRange ISourceViewer ILineDiffer getDiffer ILineDiffInfo getLineInfo getChangeType ILineDiffInfo getChangeType ILineDiffInfo getLineInfo getLineInfo getChangeType ILineDiffInfo getChangeType ILineDiffInfo getLineInfo
see org eclipse jface text source I Annotation Hover Extension get Hover Control Creator public I Information Control Creator get Hover Control Creator return null  IAnnotationHoverExtension getHoverControlCreator IInformationControlCreator getHoverControlCreator
public Object get Hover Info I Source Viewer source Viewer I Line Range line Range int visible Lines int first adapt First Line source Viewer line Range get Start Line int last adapt Last Line source Viewer line Range get Start Line line Range get Number Of Lines 1 String content compute Content source Viewer first last visible Lines return format Source content  getHoverInfo ISourceViewer sourceViewer ILineRange lineRange visibleLines adaptFirstLine sourceViewer lineRange getStartLine adaptLastLine sourceViewer lineRange getStartLine lineRange getNumberOfLines computeContent sourceViewer visibleLines formatSource
Adapts the start line to the implementation of code I Line Diff Info code param start Line the line to adapt return code start Line 1 code if that line exists and is an unchanged line followed by deletions code start Line code otherwise private int adapt First Line I Source Viewer viewer int start Line I Line Differ differ get Differ viewer if differ null start Line 0 int l start Line 1 I Line Diff Info info differ get Line Info l if info null info get Change Type I Line Diff Info UNCHANGED info get Removed Lines Below 0 return l return start Line  ILineDiffInfo startLine startLine startLine adaptFirstLine ISourceViewer startLine ILineDiffer getDiffer startLine startLine ILineDiffInfo getLineInfo getChangeType ILineDiffInfo getRemovedLinesBelow startLine
Adapts the last line to the implementation of code I Line Diff Info code param last Line the line to adapt return code last Line 1 code if that line exists and is an unchanged line followed by deletions code start Line code otherwise private int adapt Last Line I Source Viewer viewer int last Line I Line Differ differ get Differ viewer if differ null last Line 0 I Line Diff Info info differ get Line Info last Line if info null info get Change Type I Line Diff Info UNCHANGED return last Line 1 return last Line  ILineDiffInfo lastLine lastLine startLine adaptLastLine ISourceViewer lastLine ILineDiffer getDiffer lastLine ILineDiffInfo getLineInfo lastLine getChangeType ILineDiffInfo lastLine lastLine
public I Line Range get Hover Line Range I Source Viewer viewer int line Number I Document document viewer get Document if document null Point range compute Line Range viewer line Number 0 Math max 0 document get Number Of Lines 1 if range x 1 range y 1 return new Line Range range x range y range x 1 return null  ILineRange getHoverLineRange ISourceViewer lineNumber IDocument getDocument computeLineRange lineNumber getNumberOfLines LineRange
see org eclipse jface text source I Annotation Hover Extension can Handle Mouse Cursor public boolean can Handle Mouse Cursor return false  IAnnotationHoverExtension canHandleMouseCursor canHandleMouseCursor

see org eclipse jface text source I Annotation Model Listener model Changed org eclipse jface text source I Annotation Model public void model Changed I Annotation Model model post Redraw  IAnnotationModelListener modelChanged IAnnotationModel modelChanged IAnnotationModel postRedraw
Returns a specification of a color that lies between the given foreground and background color using the given scale factor param fg the foreground color param bg the background color param scale the scale factor return the interpolated color private static RGB interpolate RGB fg RGB bg double scale return new RGB int 1 0 scale fg red scale bg red int 1 0 scale fg green scale bg green int 1 0 scale fg blue scale bg blue 
Returns the grey value in which the given color would be drawn in grey scale param rgb the color return the grey scale value private static double grey Level RGB rgb if rgb red rgb green rgb green rgb blue return rgb red return 0 299 rgb red 0 587 rgb green 0 114 rgb blue 0 5  greyLevel
Returns whether the given color is dark or light depending on the colors grey scale level param rgb the color return code true code if the color is dark code false code if it is light private static boolean is Dark RGB rgb return grey Level rgb 128  isDark greyLevel
Creates a new instance param shared Colors the shared colors provider to use public Line Number Change Ruler Column I Shared Text Colors shared Colors Assert is Not Null shared Colors f Shared Colors shared Colors  sharedColors LineNumberChangeRulerColumn ISharedTextColors sharedColors isNotNull sharedColors fSharedColors sharedColors
protected void handle Dispose if f Annotation Model null f Annotation Model remove Annotation Model Listener f Annotation Listener f Annotation Model null super handle Dispose  handleDispose fAnnotationModel fAnnotationModel removeAnnotationModelListener fAnnotationListener fAnnotationModel handleDispose
protected void paint Line int line int y int lineheight GC gc Display display I Line Diff Info info get Diff Info line if info null width of the column int width get Width draw background color if special if has Special Color info gc set Background get Color info display gc fill Rectangle 0 y width lineheight Deletion Indicator It consists of a line across the column and a triangle as shown for a deleted line below the line 50 x means its colored 1 2 3 show the points of the triangle painted 0 width y 1  x xxx f Triangle Height 2 xxxxx xxxxxxxxxxxx0xxxxxxx2  v   y lineheight f Triangle Width int del Before info get Removed Lines Above int del Below info get Removed Lines Below if del Before 0 del Below 0 Color deletion Color get Deletion Color display gc set Background deletion Color gc set Foreground deletion Color int triangle new int 6 triangle 0 width f Triangle Width triangle 1 y triangle 2 width triangle 3 y f Triangle Height triangle 4 width triangle 5 y f Triangle Height if del Before 0 gc draw Line 0 y width y gc fill Polygon triangle if del Below 0 triangle 1 lineheight triangle 3 lineheight triangle 5 lineheight gc draw Line 0 y lineheight width y lineheight gc fill Polygon triangle gc set Foreground get Foreground  paintLine ILineDiffInfo getDiffInfo getWidth hasSpecialColor setBackground getColor fillRectangle 1_ fTriangleHeight xxxxxxxxxxxx0xxxxxxx2_ _ fTriangleWidth delBefore getRemovedLinesAbove delBelow getRemovedLinesBelow delBefore delBelow deletionColor getDeletionColor setBackground deletionColor setForeground deletionColor fTriangleWidth fTriangleHeight fTriangleHeight delBefore drawLine fillPolygon delBelow drawLine fillPolygon setForeground getForeground
Returns whether the line background differs from the default param info the info being queried return code true code if code info code describes either a changed or an added line private boolean has Special Color I Line Diff Info info return info get Change Type I Line Diff Info ADDED info get Change Type I Line Diff Info CHANGED  hasSpecialColor ILineDiffInfo getChangeType ILineDiffInfo getChangeType ILineDiffInfo
Retrieves the code I Line Diff Info code for code line code from the model There are optimizations for direct access and sequential access patterns param line the line we want the info for return the code I Line Diff Info code for code line code or code null code private I Line Diff Info get Diff Info int line if f Annotation Model null return null assume direct access if f Annotation Model instanceof I Line Differ I Line Differ differ I Line Differ f Annotation Model return differ get Line Info line return null  ILineDiffInfo ILineDiffInfo ILineDiffInfo getDiffInfo fAnnotationModel fAnnotationModel ILineDiffer ILineDiffer ILineDiffer fAnnotationModel getLineInfo
Returns the color for deleted lines param display the display that the drawing occurs on return the color to be used for the deletion indicator private Color get Deletion Color Display display return f Deleted Color null get Background display f Deleted Color  getDeletionColor fDeletedColor getBackground fDeletedColor
Returns the color for the given line diff info param info the code I Line Diff Info code being queried param display the display that the drawing occurs on return the correct background color for the line type being described by code info code private Color get Color I Line Diff Info info Display display Assert is True info null info get Change Type I Line Diff Info UNCHANGED Color ret null switch info get Change Type case I Line Diff Info CHANGED ret get Shaded Color f Changed Color display break case I Line Diff Info ADDED ret get Shaded Color f Added Color display break return ret null get Background display ret  ILineDiffInfo getColor ILineDiffInfo isTrue getChangeType ILineDiffInfo getChangeType ILineDiffInfo getShadedColor fChangedColor ILineDiffInfo getShadedColor fAddedColor getBackground
Returns the character to display in character display mode for the given code I Line Diff Info code param info the code I Line Diff Info code being queried return the character indication for code info code private String get Display Character I Line Diff Info info if info null return NON NLS 1 switch info get Change Type case I Line Diff Info CHANGED return NON NLS 1 case I Line Diff Info ADDED return NON NLS 1 return NON NLS 1  ILineDiffInfo ILineDiffInfo getDisplayCharacter ILineDiffInfo getChangeType ILineDiffInfo ILineDiffInfo
see org eclipse jface text source I Vertical Ruler Info get Line Of Last Mouse Button Activity public int get Line Of Last Mouse Button Activity return get Parent Ruler get Line Of Last Mouse Button Activity  IVerticalRulerInfo getLineOfLastMouseButtonActivity getLineOfLastMouseButtonActivity getParentRuler getLineOfLastMouseButtonActivity
see org eclipse jface text source I Vertical Ruler Info to Document Line Number int public int to Document Line Number int y coordinate return get Parent Ruler to Document Line Number y coordinate  IVerticalRulerInfo toDocumentLineNumber toDocumentLineNumber y_coordinate getParentRuler toDocumentLineNumber y_coordinate
see org eclipse jface text source I Vertical Ruler Info Extension get Hover public I Annotation Hover get Hover return f Hover  IVerticalRulerInfoExtension getHover IAnnotationHover getHover fHover
Sets the hover of this ruler column param hover the hover that will produce hover information text for this ruler column public void set Hover I Annotation Hover hover f Hover hover  setHover IAnnotationHover fHover
public void set Model I Annotation Model model I Annotation Model new Model if model instanceof I Annotation Model Extension new Model I Annotation Model Extension model get Annotation Model QUICK DIFF MODEL ID else new Model model if f Annotation Model new Model if f Annotation Model null f Annotation Model remove Annotation Model Listener f Annotation Listener f Annotation Model new Model if f Annotation Model null f Annotation Model add Annotation Model Listener f Annotation Listener update Number Of Digits compute Indentations layout true post Redraw  setModel IAnnotationModel IAnnotationModel newModel IAnnotationModelExtension newModel IAnnotationModelExtension getAnnotationModel QUICK_DIFF_MODEL_ID newModel fAnnotationModel newModel fAnnotationModel fAnnotationModel removeAnnotationModelListener fAnnotationListener fAnnotationModel newModel fAnnotationModel fAnnotationModel addAnnotationModelListener fAnnotationListener updateNumberOfDigits computeIndentations postRedraw
Sets the background color for added lines The color has to be disposed of by the caller when the receiver is no longer used param added Color the new color to be used for the added lines background public void set Added Color Color added Color f Added Color added Color  addedColor setAddedColor addedColor fAddedColor addedColor
Sets the background color for changed lines The color has to be disposed of by the caller when the receiver is no longer used param changed Color the new color to be used for the changed lines background public void set Changed Color Color changed Color f Changed Color changed Color  changedColor setChangedColor changedColor fChangedColor changedColor
Sets the background color for changed lines The color has to be disposed of by the caller when the receiver is no longer used param color the new color to be used for the changed lines background param display the display return the shaded color private Color get Shaded Color Color color Display display if color null return null RGB baseRGB color getRGB RGB background get Background display getRGB boolean dark Base is Dark baseRGB boolean dark Background is Dark background if dark Base dark Background background new RGB 255 255 255 else if dark Base dark Background background new RGB 0 0 0 return f Shared Colors get Color interpolate baseRGB background 0 6  getShadedColor getBackground darkBase isDark darkBackground isDark darkBase darkBackground darkBase darkBackground fSharedColors getColor
Sets the color for the deleted lines indicator The color has to be disposed of by the caller when the receiver is no longer used param deleted Color the new color to be used for the deleted lines indicator public void set Deleted Color Color deleted Color f Deleted Color deleted Color  deletedColor setDeletedColor deletedColor fDeletedColor deletedColor
Sets the the display mode of the ruler If character mode is set to code true code diff information will be displayed textually on the line number ruler param character Mode code true code if diff information is to be displayed textually public void set Display Mode boolean character Mode if character Mode f Character Display f Character Display character Mode update Number Of Digits compute Indentations layout true  characterMode setDisplayMode characterMode characterMode fCharacterDisplay fCharacterDisplay characterMode updateNumberOfDigits computeIndentations
see org eclipse jface text source I Vertical Ruler Info Extension get Model public I Annotation Model get Model return f Annotation Model  IVerticalRulerInfoExtension getModel IAnnotationModel getModel fAnnotationModel
protected String create Display String int line if f Character Display get Model null return super create Display String line get Display Character get Diff Info line else return super create Display String line  createDisplayString fCharacterDisplay getModel createDisplayString getDisplayCharacter getDiffInfo createDisplayString
protected int compute Number Of Digits if f Character Display get Model null return super compute Number Of Digits 1 else return super compute Number Of Digits  computeNumberOfDigits fCharacterDisplay getModel computeNumberOfDigits computeNumberOfDigits
see org eclipse jface text source I Vertical Ruler Info Extension add Vertical Ruler Listener org eclipse jface text source I Vertical Ruler Listener public void add Vertical Ruler Listener I Vertical Ruler Listener listener throw new Unsupported Operation Exception  IVerticalRulerInfoExtension addVerticalRulerListener IVerticalRulerListener addVerticalRulerListener IVerticalRulerListener UnsupportedOperationException
see org eclipse jface text source I Vertical Ruler Info Extension remove Vertical Ruler Listener org eclipse jface text source I Vertical Ruler Listener public void remove Vertical Ruler Listener I Vertical Ruler Listener listener throw new Unsupported Operation Exception  IVerticalRulerInfoExtension removeVerticalRulerListener IVerticalRulerListener removeVerticalRulerListener IVerticalRulerListener UnsupportedOperationException

see I Viewport Listener viewport Changed int public void viewport Changed int vertical Position if vertical Position f Scroll Pos redraw  IViewportListener viewportChanged viewportChanged verticalPosition verticalPosition fScrollPos
public void text Changed Text Event event if update Number Of Digits compute Indentations layout event get Viewer Redraw State return if event get Viewer Redraw State return if f Sensitive To Text Changes event get Document Event null post Redraw  textChanged TextEvent updateNumberOfDigits computeIndentations getViewerRedrawState getViewerRedrawState fSensitiveToTextChanges getDocumentEvent postRedraw
public void mouse Up Mouse Event event see bug 45700 if event button 1 stop Selecting stop Auto Scroll  mouseUp MouseEvent stopSelecting stopAutoScroll
public void mouse Down Mouse Event event f Parent Ruler set Location Of Last Mouse Button Activity event x event y see bug 45700 if event button 1 start Selecting  mouseDown MouseEvent fParentRuler setLocationOfLastMouseButtonActivity startSelecting
public void mouse Double Click Mouse Event event f Parent Ruler set Location Of Last Mouse Button Activity event x event y stop Selecting stop Auto Scroll  mouseDoubleClick MouseEvent fParentRuler setLocationOfLastMouseButtonActivity stopSelecting stopAutoScroll
public void mouse Move Mouse Event event if auto Scroll event int new Line f Parent Ruler to Document Line Number event y expand Selection new Line  mouseMove MouseEvent autoScroll newLine fParentRuler toDocumentLineNumber expandSelection newLine
see org eclipse swt events Mouse Track Listener mouse Enter org eclipse swt events Mouse Event public void mouse Enter Mouse Event event  MouseTrackListener mouseEnter MouseEvent mouseEnter MouseEvent
see org eclipse swt events Mouse Track Listener mouse Exit org eclipse swt events Mouse Event public void mouse Exit Mouse Event event  MouseTrackListener mouseExit MouseEvent mouseExit MouseEvent
see org eclipse swt events Mouse Track Listener mouse Hover org eclipse swt events Mouse Event public void mouse Hover Mouse Event event  MouseTrackListener mouseHover MouseEvent mouseHover MouseEvent
Called when line drag selection started Adds mouse move and track listeners to this column s control private void start Selecting try select line I Document document f Cached Text Viewer get Document f Start Line Number f Parent Ruler get Line Of Last Mouse Button Activity f Start Line document get Line Information f Start Line Number f Cached Text Viewer set Selected Range f Start Line get Offset f Start Line get Length f Cached Viewport Size get Visible Lines In Viewport prepare for drag selection f Canvas add Mouse Move Listener this f Canvas add Mouse Track Listener this catch Bad Location Exception x  startSelecting IDocument fCachedTextViewer getDocument fStartLineNumber fParentRuler getLineOfLastMouseButtonActivity fStartLine getLineInformation fStartLineNumber fCachedTextViewer setSelectedRange fStartLine getOffset fStartLine getLength fCachedViewportSize getVisibleLinesInViewport fCanvas addMouseMoveListener fCanvas addMouseTrackListener BadLocationException
Called when line drag selection stopped Removes all previously installed listeners from this column s control private void stop Selecting drag selection stopped f Canvas remove Mouse Move Listener this f Canvas remove Mouse Track Listener this  stopSelecting fCanvas removeMouseMoveListener fCanvas removeMouseTrackListener
Expands the line selection from the remembered start line to the given line param line Number the line to which to expand the selection private void expand Selection int line Number try I Document document f Cached Text Viewer get Document I Region line Info document get Line Information line Number int start Math min f Start Line get Offset line Info get Offset int end Math max f Start Line get Offset f Start Line get Length line Info get Offset line Info get Length if line Number f Start Line Number f Cached Text Viewer set Selected Range end start end else f Cached Text Viewer set Selected Range start end start catch Bad Location Exception x  lineNumber expandSelection lineNumber IDocument fCachedTextViewer getDocument IRegion lineInfo getLineInformation lineNumber fStartLine getOffset lineInfo getOffset fStartLine getOffset fStartLine getLength lineInfo getOffset lineInfo getLength lineNumber fStartLineNumber fCachedTextViewer setSelectedRange fCachedTextViewer setSelectedRange BadLocationException
Called when auto scrolling stopped Clears the auto scroll direction private void stop Auto Scroll f Auto Scroll Direction SWT NULL  stopAutoScroll fAutoScrollDirection
Called on drag selection param event the mouse event caught by the mouse move listener return code true code if scrolling happened code false code otherwise private boolean auto Scroll Mouse Event event Rectangle area f Canvas get Client Area if event y area height auto Scroll SWT DOWN return true if event y 0 auto Scroll SWT UP return true stop Auto Scroll return false  autoScroll MouseEvent fCanvas getClientArea autoScroll autoScroll stopAutoScroll
timer new Runnable public void run if f Auto Scroll Direction SWT UP int top get Inclusive Top Index if top 0 f Cached Text Viewer set Top Index top 1 expand Selection top 1 display timer Exec TIMER INTERVAL this  fAutoScrollDirection getInclusiveTopIndex fCachedTextViewer setTopIndex expandSelection timerExec TIMER_INTERVAL
timer new Runnable public void run if f Auto Scroll Direction SWT DOWN int top get Inclusive Top Index f Cached Text Viewer set Top Index top 1 expand Selection top 1 f Cached Viewport Size display timer Exec TIMER INTERVAL this  fAutoScrollDirection getInclusiveTopIndex fCachedTextViewer setTopIndex expandSelection fCachedViewportSize timerExec TIMER_INTERVAL
Scrolls the viewer into the given direction param direction the scroll direction private void auto Scroll int direction if f Auto Scroll Direction direction return final int TIMER INTERVAL 5 final Display display f Canvas get Display Runnable timer null switch direction case SWT UP timer new Runnable public void run if f Auto Scroll Direction SWT UP int top get Inclusive Top Index if top 0 f Cached Text Viewer set Top Index top 1 expand Selection top 1 display timer Exec TIMER INTERVAL this break case SWT DOWN timer new Runnable public void run if f Auto Scroll Direction SWT DOWN int top get Inclusive Top Index f Cached Text Viewer set Top Index top 1 expand Selection top 1 f Cached Viewport Size display timer Exec TIMER INTERVAL this break if timer null f Auto Scroll Direction direction display timer Exec TIMER INTERVAL timer  autoScroll fAutoScrollDirection TIMER_INTERVAL fCanvas getDisplay fAutoScrollDirection getInclusiveTopIndex fCachedTextViewer setTopIndex expandSelection timerExec TIMER_INTERVAL fAutoScrollDirection getInclusiveTopIndex fCachedTextViewer setTopIndex expandSelection fCachedViewportSize timerExec TIMER_INTERVAL fAutoScrollDirection timerExec TIMER_INTERVAL
Returns the viewer s first visible line even if only partially visible return the viewer s first visible line private int get Inclusive Top Index if f Cached Text Widget null f Cached Text Widget is Disposed int top f Cached Text Viewer get Top Index if f Cached Text Widget get Top Pixel f Cached Text Widget get Line Height 0 top return top return 1  getInclusiveTopIndex fCachedTextWidget fCachedTextWidget isDisposed fCachedTextViewer getTopIndex fCachedTextWidget getTopPixel fCachedTextWidget getLineHeight
private Runnable f Runnable new Runnable public void run synchronized f Runnable Lock f Is Runnable Posted false redraw  fRunnable fRunnableLock fIsRunnablePosted
Constructs a new vertical ruler column public Line Number Ruler Column  LineNumberRulerColumn
Sets the foreground color of this column param foreground the foreground color public void set Foreground Color foreground f Foreground foreground  setForeground fForeground
Returns the foreground color being used to print the line numbers return the configured foreground color since 3 0 protected Color get Foreground return f Foreground  getForeground fForeground
Sets the background color of this column param background the background color public void set Background Color background f Background background if f Canvas null f Canvas is Disposed f Canvas set Background get Background f Canvas get Display  setBackground fBackground fCanvas fCanvas isDisposed fCanvas setBackground getBackground fCanvas getDisplay
Returns the System background color for list widgets param display the display return the System background color for list widgets protected Color get Background Display display if f Background null return display get System Color SWT COLOR LIST BACKGROUND return f Background  getBackground fBackground getSystemColor COLOR_LIST_BACKGROUND fBackground
see I Vertical Ruler Column get Control public Control get Control return f Canvas  IVerticalRulerColumn getControl getControl fCanvas
see I Vertical Rule Columnr get Width public int get Width return f Indentation 0  IVerticalRuleColumnr getWidth getWidth fIndentation
Computes the number of digits to be displayed Returns code true code if the number of digits changed compared to the previous call of this method If the method is called for the first time the return value is also code true code return whether the number of digits has been changed since 3 0 protected boolean update Number Of Digits if f Cached Text Viewer null return false int digits compute Number Of Digits if f Cached Number Of Digits digits f Cached Number Of Digits digits return true return false  updateNumberOfDigits fCachedTextViewer computeNumberOfDigits fCachedNumberOfDigits fCachedNumberOfDigits
Does the real computation of the number of digits Subclasses may override this method if they need extra space on the line number ruler return the number of digits to be displayed on the line number ruler protected int compute Number Of Digits I Document document f Cached Text Viewer get Document int lines document null 0 document get Number Of Lines int digits 2 while lines Math pow 10 digits 1 digits return digits  computeNumberOfDigits IDocument fCachedTextViewer getDocument getNumberOfLines
Layouts the enclosing viewer to adapt the layout to changes of the size of the individual components param redraw code true code if this column can be redrawn protected void layout boolean redraw if redraw f Relayout Required true return f Relayout Required false if f Cached Text Viewer instanceof I Text Viewer Extension I Text Viewer Extension extension I Text Viewer Extension f Cached Text Viewer Control control extension get Control if control instanceof Composite control is Disposed Composite composite Composite control composite layout true  fRelayoutRequired fRelayoutRequired fCachedTextViewer ITextViewerExtension ITextViewerExtension ITextViewerExtension fCachedTextViewer getControl isDisposed
Computes the indentations for the given font and stores them in code f Indentation code protected void compute Indentations if f Canvas null return GC gc new GC f Canvas try gc set Font f Canvas get Font f Indentation new int f Cached Number Of Digits 1 Float number new Float Math pow 10 f Cached Number Of Digits 1 Point p gc string Extent Integer to String number int Value f Indentation 0 p x for int i 1 i f Cached Number Of Digits i number new Float Math pow 10 i 1 p gc string Extent Integer to String number int Value f Indentation i f Indentation 0 p x finally gc dispose  fIndentation computeIndentations fCanvas fCanvas setFont fCanvas getFont fIndentation fCachedNumberOfDigits fCachedNumberOfDigits stringExtent toString intValue fIndentation fCachedNumberOfDigits stringExtent toString intValue fIndentation fIndentation
f Canvas add Paint Listener new Paint Listener public void paint Control Paint Event event if f Cached Text Viewer null double Buffer Paint event gc  fCanvas addPaintListener PaintListener paintControl PaintEvent fCachedTextViewer doubleBufferPaint
f Canvas add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e handle Dispose f Cached Text Viewer null f Cached Text Widget null  fCanvas addDisposeListener DisposeListener widgetDisposed DisposeEvent handleDispose fCachedTextViewer fCachedTextWidget
public Control create Control Composite Ruler parent Ruler Composite parent Control f Parent Ruler parent Ruler f Cached Text Viewer parent Ruler get Text Viewer f Cached Text Widget f Cached Text Viewer get Text Widget f Canvas new Canvas parent Control SWT NONE f Canvas set Background get Background f Canvas get Display f Canvas set Foreground f Foreground f Canvas add Paint Listener new Paint Listener public void paint Control Paint Event event if f Cached Text Viewer null double Buffer Paint event gc f Canvas add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e handle Dispose f Cached Text Viewer null f Cached Text Widget null f Canvas add Mouse Listener new Mouse Handler if f Cached Text Viewer null f Cached Text Viewer add Viewport Listener f Internal Listener f Cached Text Viewer add Text Listener f Internal Listener if f Font null if f Cached Text Widget null f Cached Text Widget is Disposed f Font f Cached Text Widget get Font if f Font null f Canvas set Font f Font update Number Of Digits compute Indentations return f Canvas  createControl CompositeRuler parentRuler parentControl fParentRuler parentRuler fCachedTextViewer parentRuler getTextViewer fCachedTextWidget fCachedTextViewer getTextWidget fCanvas parentControl fCanvas setBackground getBackground fCanvas getDisplay fCanvas setForeground fForeground fCanvas addPaintListener PaintListener paintControl PaintEvent fCachedTextViewer doubleBufferPaint fCanvas addDisposeListener DisposeListener widgetDisposed DisposeEvent handleDispose fCachedTextViewer fCachedTextWidget fCanvas addMouseListener MouseHandler fCachedTextViewer fCachedTextViewer addViewportListener fInternalListener fCachedTextViewer addTextListener fInternalListener fFont fCachedTextWidget fCachedTextWidget isDisposed fFont fCachedTextWidget getFont fFont fCanvas setFont fFont updateNumberOfDigits computeIndentations fCanvas
Disposes the column s resources protected void handle Dispose if f Cached Text Viewer null f Cached Text Viewer remove Viewport Listener f Internal Listener f Cached Text Viewer remove Text Listener f Internal Listener if f Buffer null f Buffer dispose f Buffer null  handleDispose fCachedTextViewer fCachedTextViewer removeViewportListener fInternalListener fCachedTextViewer removeTextListener fInternalListener fBuffer fBuffer fBuffer
Double buffer drawing param dest the gc to draw into private void double Buffer Paint GC dest Point size f Canvas get Size if size x 0 size y 0 return if f Buffer null Rectangle r f Buffer get Bounds if r width size x r height size y f Buffer dispose f Buffer null if f Buffer null f Buffer new Image f Canvas get Display size x size y GC gc new GC f Buffer gc set Font f Canvas get Font if f Foreground null gc set Foreground f Foreground try gc set Background get Background f Canvas get Display gc fill Rectangle 0 0 size x size y if f Cached Text Viewer instanceof I Text Viewer Extension5 do Paint1 gc else do Paint gc finally gc dispose dest draw Image f Buffer 0 0  doubleBufferPaint fCanvas getSize fBuffer fBuffer getBounds fBuffer fBuffer fBuffer fBuffer fCanvas getDisplay fBuffer setFont fCanvas getFont fForeground setForeground fForeground setBackground getBackground fCanvas getDisplay fillRectangle fCachedTextViewer ITextViewerExtension5 doPaint1 doPaint drawImage fBuffer
Returns the viewport height in lines return the viewport height in lines protected int get Visible Lines In Viewport Rectangle cl Area f Cached Text Widget get Client Area if cl Area is Empty return cl Area height f Cached Text Widget get Line Height return 1  getVisibleLinesInViewport clArea fCachedTextWidget getClientArea clArea isEmpty clArea fCachedTextWidget getLineHeight
Draws the ruler column param gc the gc to draw into private void do Paint GC gc if f Cached Text Viewer null return if f Cached Text Widget null return int first Line 0 int top Line f Cached Text Widget get Top Index f Scroll Pos f Cached Text Widget get Top Pixel int lineheight f Cached Text Widget get Line Height int partial Line Hidden f Scroll Pos lineheight if partial Line Hidden 0 top Line 0 widget Top Line shows the first fully visible line top Line int bottom Line f Cached Text Viewer get Bottom Index 1 try I Region region f Cached Text Viewer get Visible Region I Document doc f Cached Text Viewer get Document if doc null return first Line doc get Line Of Offset region get Offset if first Line top Line top Line first Line int last Line doc get Line Of Offset region get Offset region get Length if last Line bottom Line bottom Line last Line catch Bad Location Exception x return f Sensitive To Text Changes bottom Line top Line get Visible Lines In Viewport int baseline Bias get Baseline Bias gc int top Inset f Cached Text Viewer get Top Inset int y top Inset partial Line Hidden int canvasheight f Canvas get Size y for int line top Line line bottom Line line y lineheight if y canvasheight break paint Line line y lineheight gc f Cached Text Widget get Display String s create Display String line int indentation f Indentation s length gc draw String s indentation y baseline Bias true  doPaint fCachedTextViewer fCachedTextWidget firstLine topLine fCachedTextWidget getTopIndex fScrollPos fCachedTextWidget getTopPixel fCachedTextWidget getLineHeight partialLineHidden fScrollPos partialLineHidden topLine widgetTopLine topLine bottomLine fCachedTextViewer getBottomIndex IRegion fCachedTextViewer getVisibleRegion IDocument fCachedTextViewer getDocument firstLine getLineOfOffset getOffset firstLine topLine topLine firstLine lastLine getLineOfOffset getOffset getLength lastLine bottomLine bottomLine lastLine BadLocationException fSensitiveToTextChanges bottomLine topLine getVisibleLinesInViewport baselineBias getBaselineBias topInset fCachedTextViewer getTopInset topInset partialLineHidden fCanvas getSize topLine bottomLine paintLine fCachedTextWidget getDisplay createDisplayString fIndentation drawString baselineBias
Computes the string to be printed for code line code The default implementation returns code Integer to String line 1 code param line the line number for which the line number string is generated return the string to be printed on the line number bar for code line code since 3 0 protected String create Display String int line return Integer to String line 1  toString createDisplayString toString
Draws the ruler column Uses code I Text Viewer Extension5 code for the implementation Will replace code do Pinat GC code param gc the gc to draw into private void do Paint1 GC gc if f Cached Text Viewer null return I Text Viewer Extension5 extension I Text Viewer Extension5 f Cached Text Viewer int widget Top Line f Cached Text Widget get Top Index f Scroll Pos f Cached Text Widget get Top Pixel int lineheight f Cached Text Widget get Line Height int partial Line Hidden f Scroll Pos lineheight if partial Line Hidden 0 widget Top Line 0 widget Top Line shows the first fully visible line widget Top Line int model Top Line extension widget Line2 Model Line widget Top Line int model Bottom Line f Cached Text Viewer get Bottom Index if model Bottom Line 0 model Bottom Line try I Region region extension get Model Coverage I Document doc f Cached Text Viewer get Document if doc null return int coverage Top Line doc get Line Of Offset region get Offset if coverage Top Line model Top Line model Top Line 1 model Top Line coverage Top Line int coverage Bottom Line doc get Line Of Offset region get Offset region get Length if coverage Bottom Line model Bottom Line model Bottom Line 1 model Bottom Line coverage Bottom Line catch Bad Location Exception x return f Sensitive To Text Changes model Bottom Line model Top Line get Visible Lines In Viewport int baseline Bias get Baseline Bias gc int top Inset f Cached Text Viewer get Top Inset int y top Inset partial Line Hidden int canvasheight f Canvas get Size y for int model Line model Top Line model Line model Bottom Line model Line if y canvasheight break don t draw hidden e g folded lines int widget Line extension model Line2 Widget Line model Line if widget Line 1 continue paint Line model Line y lineheight gc f Cached Text Widget get Display String s create Display String model Line int indentation f Indentation s length gc draw String s indentation y baseline Bias true y lineheight  ITextViewerExtension5 doPinat doPaint1 fCachedTextViewer ITextViewerExtension5 ITextViewerExtension5 fCachedTextViewer widgetTopLine fCachedTextWidget getTopIndex fScrollPos fCachedTextWidget getTopPixel fCachedTextWidget getLineHeight partialLineHidden fScrollPos partialLineHidden widgetTopLine widgetTopLine widgetTopLine modelTopLine widgetLine2ModelLine widgetTopLine modelBottomLine fCachedTextViewer getBottomIndex modelBottomLine modelBottomLine IRegion getModelCoverage IDocument fCachedTextViewer getDocument coverageTopLine getLineOfOffset getOffset coverageTopLine modelTopLine modelTopLine modelTopLine coverageTopLine coverageBottomLine getLineOfOffset getOffset getLength coverageBottomLine modelBottomLine modelBottomLine modelBottomLine coverageBottomLine BadLocationException fSensitiveToTextChanges modelBottomLine modelTopLine getVisibleLinesInViewport baselineBias getBaselineBias topInset fCachedTextViewer getTopInset topInset partialLineHidden fCanvas getSize modelLine modelTopLine modelLine modelBottomLine modelLine widgetLine modelLine2WidgetLine modelLine widgetLine paintLine modelLine fCachedTextWidget getDisplay createDisplayString modelLine fIndentation drawString baselineBias
Returns the difference between the baseline of the widget and the baseline as specified by the font for code gc code When drawing line numbers the returned bias should be added to obtain text line up on the correct base line of the text widget param gc the code GC code to get the font metrics from return the baseline bias to use when drawing text that is line up with code f Cached Text Widget code private int get Baseline Bias GC gc https bugs eclipse org bugs show bug cgi id 62951 widget line height may be more than the font height used for the linenumbers since font styles bold italics can have larger font metrics than the simple font used for the numbers int widget Baseline f Cached Text Widget get Baseline Font Metrics fm gc get Font Metrics int font Baseline fm get Ascent fm get Leading Assert is True widget Baseline font Baseline int baseline Bias widget Baseline font Baseline return baseline Bias  fCachedTextWidget getBaselineBias show_bug widgetBaseline fCachedTextWidget getBaseline FontMetrics getFontMetrics fontBaseline getAscent getLeading isTrue widgetBaseline fontBaseline baselineBias widgetBaseline fontBaseline baselineBias
Paints the line After this method is called the line numbers are painted on top of the result of this method p This default implementation does nothing p param line the line of the document which the ruler is painted for param y the y coordinate of the box being painted for code line code relative to code gc code param lineheight the height of one line and therefore of the box being painted param gc the drawing context the client may choose to draw on param display the display the drawing occurs on since 3 0 protected void paint Line int line int y int lineheight GC gc Display display  paintLine
Triggers a redraw in the display thread since 3 0 protected final void post Redraw if f Canvas null f Canvas is Disposed Display d f Canvas get Display if d null synchronized f Runnable Lock if f Is Runnable Posted return f Is Runnable Posted true d async Exec f Runnable  postRedraw fCanvas fCanvas isDisposed fCanvas getDisplay fRunnableLock fIsRunnablePosted fIsRunnablePosted asyncExec fRunnable
public void redraw if f Relayout Required layout true return if f Canvas null f Canvas is Disposed GC gc new GC f Canvas double Buffer Paint gc gc dispose  fRelayoutRequired fCanvas fCanvas isDisposed fCanvas doubleBufferPaint
see I Vertical Ruler Column set Model I Annotation Model public void set Model I Annotation Model model  IVerticalRulerColumn setModel IAnnotationModel setModel IAnnotationModel
public void set Font Font font f Font font if f Canvas null f Canvas is Disposed f Canvas set Font f Font update Number Of Digits compute Indentations  setFont fFont fCanvas fCanvas isDisposed fCanvas setFont fFont updateNumberOfDigits computeIndentations
Returns the parent composite ruler of this ruler column return the parent ruler since 3 0 protected Composite Ruler get Parent Ruler return f Parent Ruler  CompositeRuler getParentRuler fParentRuler

Creates a new line range with the given specification param start Line the start line param number Of Lines the number of lines public Line Range int start Line int number Of Lines f Start Line start Line f Number Of Lines number Of Lines  startLine numberOfLines LineRange startLine numberOfLines fStartLine startLine fNumberOfLines numberOfLines
see org eclipse jface text source I Line Range get Start Line public int get Start Line return f Start Line  ILineRange getStartLine getStartLine fStartLine
see org eclipse jface text source I Line Range get Number Of Lines public int get Number Of Lines return f Number Of Lines  ILineRange getNumberOfLines getNumberOfLines fNumberOfLines

Creates a new Matching Character Painter for the given source viewer using the given character pair matcher The character matcher is not adopted by this painter Thus it is not disposed However this painter requires exclusive access to the given pair matcher param source Viewer param matcher public Matching Character Painter I Source Viewer source Viewer I Character Pair Matcher matcher f Source Viewer source Viewer f Matcher matcher f Text Widget source Viewer get Text Widget  MatchingCharacterPainter sourceViewer MatchingCharacterPainter ISourceViewer sourceViewer ICharacterPairMatcher fSourceViewer sourceViewer fMatcher fTextWidget sourceViewer getTextWidget
Sets the color in which to highlight the match character param color the color public void set Color Color color f Color color  setColor fColor
public void dispose if f Matcher null f Matcher clear f Matcher null f Color null f Text Widget null  fMatcher fMatcher fMatcher fColor fTextWidget
public void deactivate boolean redraw if f Is Active f Is Active false f Text Widget remove Paint Listener this if f Paint Position Manager null f Paint Position Manager unmanage Position f Pair Position if redraw handle Draw Request null  fIsActive fIsActive fTextWidget removePaintListener fPaintPositionManager fPaintPositionManager unmanagePosition fPairPosition handleDrawRequest
see org eclipse swt events Paint Listener paint Control org eclipse swt events Paint Event public void paint Control Paint Event event if f Text Widget null handle Draw Request event gc  PaintListener paintControl PaintEvent paintControl PaintEvent fTextWidget handleDrawRequest
Handles a redraw request param gc the GC to draw into private void handle Draw Request GC gc if f Pair Position is Deleted return int offset f Pair Position get Offset int length f Pair Position get Length if length 1 return if f Source Viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 f Source Viewer I Region widget Range extension model Range2 Widget Range new Region offset length if widget Range null return try don t draw if the pair position is really hidden and widget Range just marks the coverage around it I Document doc f Source Viewer get Document int start Line doc get Line Of Offset offset int end Line doc get Line Of Offset offset length if extension model Line2 Widget Line start Line 1 extension model Line2 Widget Line end Line 1 return catch Bad Location Exception e return offset widget Range get Offset length widget Range get Length else I Region region f Source Viewer get Visible Region if region get Offset offset region get Offset region get Length offset length return offset region get Offset if I Character Pair Matcher RIGHT f Anchor draw gc offset 1 else draw gc offset length 1 1  handleDrawRequest fPairPosition isDeleted fPairPosition getOffset fPairPosition getLength fSourceViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 fSourceViewer IRegion widgetRange modelRange2WidgetRange widgetRange widgetRange IDocument fSourceViewer getDocument startLine getLineOfOffset endLine getLineOfOffset modelLine2WidgetLine startLine modelLine2WidgetLine endLine BadLocationException widgetRange getOffset widgetRange getLength IRegion fSourceViewer getVisibleRegion getOffset getOffset getLength getOffset ICharacterPairMatcher fAnchor
Highlights the given widget region param gc the GC to draw into param offset the offset of the widget region param length the length of the widget region private void draw GC gc int offset int length if gc null Point left f Text Widget get Location At Offset offset Point right f Text Widget get Location At Offset offset length gc set Foreground f Color draw box around line segment gc draw Rectangle left x left y right x left x 1 f Text Widget get Line Height 1 draw box around character area int widget Baseline f Text Widget get Baseline Font Metrics fm gc get Font Metrics int font Baseline fm get Ascent fm get Leading int font Bias widget Baseline font Baseline gc draw Rectangle left x left y font Bias right x left x 1 fm get Height 1 else f Text Widget redraw Range offset length true  fTextWidget getLocationAtOffset fTextWidget getLocationAtOffset setForeground fColor drawRectangle fTextWidget getLineHeight widgetBaseline fTextWidget getBaseline FontMetrics getFontMetrics fontBaseline getAscent getLeading fontBias widgetBaseline fontBaseline drawRectangle fontBias getHeight fTextWidget redrawRange
public void paint int reason I Document document f Source Viewer get Document if document null deactivate false return Point selection f Source Viewer get Selected Range if selection y 0 deactivate true return I Region pair f Matcher match document selection x if pair null deactivate true return if f Is Active if I Painter CONFIGURATION reason redraw current highlighting handle Draw Request null else if pair get Offset f Pair Position get Offset pair get Length f Pair Position get Length f Matcher get Anchor f Anchor otherwise only do something if position is different remove old highlighting handle Draw Request null update position f Pair Position is Deleted false f Pair Position offset pair get Offset f Pair Position length pair get Length f Anchor f Matcher get Anchor apply new highlighting handle Draw Request null else f Is Active true f Pair Position is Deleted false f Pair Position offset pair get Offset f Pair Position length pair get Length f Anchor f Matcher get Anchor f Text Widget add Paint Listener this f Paint Position Manager manage Position f Pair Position handle Draw Request null  IDocument fSourceViewer getDocument fSourceViewer getSelectedRange IRegion fMatcher fIsActive IPainter handleDrawRequest getOffset fPairPosition getOffset getLength fPairPosition getLength fMatcher getAnchor fAnchor handleDrawRequest fPairPosition isDeleted fPairPosition getOffset fPairPosition getLength fAnchor fMatcher getAnchor handleDrawRequest fIsActive fPairPosition isDeleted fPairPosition getOffset fPairPosition getLength fAnchor fMatcher getAnchor fTextWidget addPaintListener fPaintPositionManager managePosition fPairPosition handleDrawRequest
see org eclipse jface text I Painter set Position Manager org eclipse jface text I Paint Position Manager public void set Position Manager I Paint Position Manager manager f Paint Position Manager manager  IPainter setPositionManager IPaintPositionManager setPositionManager IPaintPositionManager fPaintPositionManager

public void text Changed Text Event e if f Text Viewer null e get Document Event null e get Viewer Redraw State handle only changes of visible document redraw  textChanged TextEvent fTextViewer getDocumentEvent getViewerRedrawState
see I Annotation Model Listener model Changed I Annotation Model public void model Changed I Annotation Model model update  IAnnotationModelListener modelChanged IAnnotationModel modelChanged IAnnotationModel
Creates a new filter iterator with the given specification param annotation Type the annotation type param style the style public Filter Iterator Object annotation Type int style f Type annotation Type f Style style if f Model null f Iterator f Model get Annotation Iterator skip  annotationType FilterIterator annotationType fType annotationType fStyle fModel fIterator fModel getAnnotationIterator
Creates a new filter iterator with the given specification param annotation Type the annotation type param style the style param iterator the iterator public Filter Iterator Object annotation Type int style Iterator iterator f Type annotation Type f Style style f Iterator iterator skip  annotationType FilterIterator annotationType fType annotationType fStyle fIterator
private void skip boolean temp f Style TEMPORARY 0 boolean pers f Style PERSISTENT 0 boolean ignr f Style IGNORE BAGS 0 while f Iterator has Next Annotation next Annotation f Iterator next if next is Marked Deleted continue if ignr next instanceof Annotation Bag continue f Next next Object annotation Type next get Type if f Type null is Subtype annotation Type if temp pers return if pers next is Persistent return if temp next is Persistent return f Next null  fStyle fStyle fStyle IGNORE_BAGS fIterator hasNext fIterator isMarkedDeleted AnnotationBag fNext annotationType getType fType isSubtype annotationType isPersistent isPersistent fNext
private boolean is Subtype Object annotation Type if f Annotation Access instanceof I Annotation Access Extension I Annotation Access Extension extension I Annotation Access Extension f Annotation Access return extension is Subtype annotation Type f Type return f Type equals annotation Type  isSubtype annotationType fAnnotationAccess IAnnotationAccessExtension IAnnotationAccessExtension IAnnotationAccessExtension fAnnotationAccess isSubtype annotationType fType fType annotationType
see Iterator has Next public boolean has Next return f Next null  hasNext hasNext fNext
public Object next try return f Next finally if f Iterator null skip  fNext fIterator
see Iterator remove public void remove throw new Unsupported Operation Exception  UnsupportedOperationException
Creates a new header painter public Header Painter f Separator Color f Shared Text Colors get Color View Form border InsideRGB  HeaderPainter fSeparatorColor fSharedTextColors getColor ViewForm borderInsideRGB
Sets the header color param color the header color public void set Color Color color f Indicator Color color  setColor fIndicatorColor
private void draw Bevel Rect GC gc int x int y int w int h Color top Left Color bottom Right gc set Foreground top Left null f Separator Color top Left gc draw Line x y x w 1 y gc draw Line x y x y h 1 gc set Foreground bottom Right null f Separator Color bottom Right gc draw Line x w y x w y h gc draw Line x y h x w y h  drawBevelRect topLeft bottomRight setForeground topLeft fSeparatorColor topLeft drawLine drawLine setForeground bottomRight fSeparatorColor bottomRight drawLine drawLine
public void paint Control Paint Event e Point s f Header get Size if f Indicator Color null e gc set Background f Indicator Color Rectangle r new Rectangle INSET s y 2 ANNOTATION HEIGHT 2 s x 2 INSET 2 ANNOTATION HEIGHT e gc fill Rectangle r Display d f Header get Display if d null draw Bevel Rect e gc r x r y r width 1 r height 1 d get System Color SWT COLOR WIDGET NORMAL SHADOW d get System Color SWT COLOR WIDGET HIGHLIGHT SHADOW draw Bevel Rect e gc r x r y r width 1 r height 1 null null e gc set Foreground f Separator Color e gc set Line Width 1 e gc draw Line 0 s y 1 s x 1 s y 1  paintControl PaintEvent fHeader getSize fIndicatorColor setBackground fIndicatorColor ANNOTATION_HEIGHT ANNOTATION_HEIGHT fillRectangle fHeader getDisplay drawBevelRect getSystemColor COLOR_WIDGET_NORMAL_SHADOW getSystemColor COLOR_WIDGET_HIGHLIGHT_SHADOW drawBevelRect setForeground fSeparatorColor setLineWidth drawLine
Constructs a overview ruler of the given width using the given annotation access and the given color manager param annotation Access the annotation access param width the width of the vertical ruler param shared Colors the color manager public Overview Ruler I Annotation Access annotation Access int width I Shared Text Colors shared Colors f Annotation Access annotation Access f Width width f Shared Text Colors shared Colors  annotationAccess sharedColors OverviewRuler IAnnotationAccess annotationAccess ISharedTextColors sharedColors fAnnotationAccess annotationAccess fWidth fSharedTextColors sharedColors
see org eclipse jface text source I Vertical Ruler Info get Control public Control get Control return f Canvas  IVerticalRulerInfo getControl getControl fCanvas
see org eclipse jface text source I Vertical Ruler Info get Width public int get Width return f Width  IVerticalRulerInfo getWidth getWidth fWidth
public void set Model I Annotation Model model if model f Model model null if f Model null f Model remove Annotation Model Listener f Internal Listener f Model model if f Model null f Model add Annotation Model Listener f Internal Listener update  setModel IAnnotationModel fModel fModel fModel removeAnnotationModelListener fInternalListener fModel fModel fModel addAnnotationModelListener fInternalListener
f Canvas add Paint Listener new Paint Listener public void paint Control Paint Event event if f Text Viewer null f Model null double Buffer Paint event gc  fCanvas addPaintListener PaintListener paintControl PaintEvent fTextViewer fModel doubleBufferPaint
f Canvas add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event handle Dispose f Text Viewer null  fCanvas addDisposeListener DisposeListener widgetDisposed DisposeEvent handleDispose fTextViewer
f Canvas add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event event handle Mouse Down event  fCanvas addMouseListener MouseAdapter mouseDown MouseEvent handleMouseDown
f Canvas add Mouse Move Listener new Mouse Move Listener public void mouse Move Mouse Event event handle Mouse Move event  fCanvas addMouseMoveListener MouseMoveListener mouseMove MouseEvent handleMouseMove
public Control create Control Composite parent I Text Viewer text Viewer f Text Viewer text Viewer f Hit Detection Cursor new Cursor parent get Display SWT CURSOR HAND f Header new Canvas parent SWT NONE f Canvas new Canvas parent SWT NO BACKGROUND f Canvas add Paint Listener new Paint Listener public void paint Control Paint Event event if f Text Viewer null f Model null double Buffer Paint event gc f Canvas add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event handle Dispose f Text Viewer null f Canvas add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event event handle Mouse Down event f Canvas add Mouse Move Listener new Mouse Move Listener public void mouse Move Mouse Event event handle Mouse Move event if f Text Viewer null f Text Viewer add Text Listener f Internal Listener return f Canvas  createControl ITextViewer textViewer fTextViewer textViewer fHitDetectionCursor getDisplay CURSOR_HAND fHeader fCanvas NO_BACKGROUND fCanvas addPaintListener PaintListener paintControl PaintEvent fTextViewer fModel doubleBufferPaint fCanvas addDisposeListener DisposeListener widgetDisposed DisposeEvent handleDispose fTextViewer fCanvas addMouseListener MouseAdapter mouseDown MouseEvent handleMouseDown fCanvas addMouseMoveListener MouseMoveListener mouseMove MouseEvent handleMouseMove fTextViewer fTextViewer addTextListener fInternalListener fCanvas
Disposes the ruler s resources private void handle Dispose if f Text Viewer null f Text Viewer remove Text Listener f Internal Listener f Text Viewer null if f Model null f Model remove Annotation Model Listener f Internal Listener if f Buffer null f Buffer dispose f Buffer null if f Hit Detection Cursor null f Hit Detection Cursor dispose f Hit Detection Cursor null f Configured Annotation Types clear f Allowed Annotation Types clear f Configured Header Annotation Types clear f Allowed Header Annotation Types clear f Annotation Types2 Colors clear f Annotations Sorted By Layer clear f Layers Sorted By Layer clear  handleDispose fTextViewer fTextViewer removeTextListener fInternalListener fTextViewer fModel fModel removeAnnotationModelListener fInternalListener fBuffer fBuffer fBuffer fHitDetectionCursor fHitDetectionCursor fHitDetectionCursor fConfiguredAnnotationTypes fAllowedAnnotationTypes fConfiguredHeaderAnnotationTypes fAllowedHeaderAnnotationTypes fAnnotationTypes2Colors fAnnotationsSortedByLayer fLayersSortedByLayer
Double buffer drawing param dest the GC to draw into private void double Buffer Paint GC dest Point size f Canvas get Size if size x 0 size y 0 return if f Buffer null Rectangle r f Buffer get Bounds if r width size x r height size y f Buffer dispose f Buffer null if f Buffer null f Buffer new Image f Canvas get Display size x size y GC gc new GC f Buffer try gc set Background f Canvas get Background gc fill Rectangle 0 0 size x size y if f Text Viewer instanceof I Text Viewer Extension5 do Paint1 gc else do Paint gc finally gc dispose dest draw Image f Buffer 0 0  doubleBufferPaint fCanvas getSize fBuffer fBuffer getBounds fBuffer fBuffer fBuffer fBuffer fCanvas getDisplay fBuffer setBackground fCanvas getBackground fillRectangle fTextViewer ITextViewerExtension5 doPaint1 doPaint drawImage fBuffer
Draws this overview ruler param gc the GC to draw into private void do Paint GC gc Rectangle r new Rectangle 0 0 0 0 int yy hh ANNOTATION HEIGHT I Document document f Text Viewer get Document I Region visible f Text Viewer get Visible Region Styled Text text Widget f Text Viewer get Text Widget int max Lines text Widget get Line Count Point size f Canvas get Size int writable max Lines text Widget get Line Height if size y writable size y Math max writable f Header get Size y 0 for Iterator iterator f Annotations Sorted By Layer iterator iterator has Next Object annotation Type iterator next if skip annotation Type continue int style new int Filter Iterator PERSISTENT Filter Iterator TEMPORARY for int t 0 t style length t Iterator e new Filter Iterator annotation Type style t Color fill get Fill Color annotation Type style t Filter Iterator TEMPORARY Color stroke get Stroke Color annotation Type style t Filter Iterator TEMPORARY for int i 0 e has Next i Annotation a Annotation e next Position p f Model get Position a if p null p overlaps With visible get Offset visible get Length continue int annotation Offset Math max p get Offset visible get Offset int annotation End Math min p get Offset p get Length visible get Offset visible get Length int annotation Length annotation End annotation Offset try if ANNOTATION HEIGHT SCALABLE int numbers Of Lines document get Number Of Lines annotation Offset annotation Length don t count empty trailing lines I Region last Line document get Line Information Of Offset annotation Offset annotation Length if last Line get Offset annotation Offset annotation Length numbers Of Lines 2 hh numbers Of Lines size y max Lines ANNOTATION HEIGHT if hh ANNOTATION HEIGHT hh ANNOTATION HEIGHT else hh ANNOTATION HEIGHT f Annotation Height hh int start Line text Widget get Line At Offset annotation Offset visible get Offset yy Math min start Line size y max Lines size y hh if fill null gc set Background fill gc fill Rectangle INSET yy size x 2 INSET hh if stroke null gc set Foreground stroke r x INSET r y yy r width size x 2 INSET 1 r height hh gc set Line Width 1 gc draw Rectangle r catch Bad Location Exception x  doPaint ANNOTATION_HEIGHT IDocument fTextViewer getDocument IRegion fTextViewer getVisibleRegion StyledText textWidget fTextViewer getTextWidget maxLines textWidget getLineCount fCanvas getSize maxLines textWidget getLineHeight fHeader getSize fAnnotationsSortedByLayer hasNext annotationType annotationType FilterIterator FilterIterator FilterIterator annotationType getFillColor annotationType FilterIterator getStrokeColor annotationType FilterIterator hasNext fModel getPosition overlapsWith getOffset getLength annotationOffset getOffset getOffset annotationEnd getOffset getLength getOffset getLength annotationLength annotationEnd annotationOffset ANNOTATION_HEIGHT_SCALABLE numbersOfLines getNumberOfLines annotationOffset annotationLength IRegion lastLine getLineInformationOfOffset annotationOffset annotationLength lastLine getOffset annotationOffset annotationLength numbersOfLines numbersOfLines maxLines ANNOTATION_HEIGHT ANNOTATION_HEIGHT ANNOTATION_HEIGHT ANNOTATION_HEIGHT fAnnotationHeight startLine textWidget getLineAtOffset annotationOffset getOffset startLine maxLines setBackground fillRectangle setForeground setLineWidth drawRectangle BadLocationException
Draws this overview ruler Uses code I Text Viewer Extension5 code for its implementation Will replace code do Paint GC code param gc the GC to draw into private void do Paint1 GC gc Rectangle r new Rectangle 0 0 0 0 int yy hh ANNOTATION HEIGHT I Text Viewer Extension5 extension I Text Viewer Extension5 f Text Viewer I Document document f Text Viewer get Document Styled Text text Widget f Text Viewer get Text Widget int max Lines text Widget get Line Count Point size f Canvas get Size int writable max Lines text Widget get Line Height if size y writable size y Math max writable f Header get Size y 0 f Cached Annotations clear Iterator iter f Model get Annotation Iterator while iter has Next Annotation annotation Annotation iter next if annotation is Marked Deleted continue if skip annotation get Type continue f Cached Annotations add annotation for Iterator iterator f Annotations Sorted By Layer iterator iterator has Next Object annotation Type iterator next if skip annotation Type continue int style new int Filter Iterator PERSISTENT Filter Iterator TEMPORARY for int t 0 t style length t Iterator e new Filter Iterator annotation Type style t f Cached Annotations iterator Color fill get Fill Color annotation Type style t Filter Iterator TEMPORARY Color stroke get Stroke Color annotation Type style t Filter Iterator TEMPORARY for int i 0 e has Next i Annotation a Annotation e next Position p f Model get Position a if p null continue I Region widget Region extension model Range2 Widget Range new Region p get Offset p get Length if widget Region null continue try if ANNOTATION HEIGHT SCALABLE int numbers Of Lines document get Number Of Lines p get Offset p get Length don t count empty trailing lines I Region last Line document get Line Information Of Offset p get Offset p get Length if last Line get Offset p get Offset p get Length numbers Of Lines 2 hh numbers Of Lines size y max Lines ANNOTATION HEIGHT if hh ANNOTATION HEIGHT hh ANNOTATION HEIGHT else hh ANNOTATION HEIGHT f Annotation Height hh int start Line text Widget get Line At Offset widget Region get Offset yy Math min start Line size y max Lines size y hh if fill null gc set Background fill gc fill Rectangle INSET yy size x 2 INSET hh if stroke null gc set Foreground stroke r x INSET r y yy r width size x 2 INSET 1 r height hh gc set Line Width 1 gc draw Rectangle r catch Bad Location Exception x f Cached Annotations clear  ITextViewerExtension5 doPaint doPaint1 ANNOTATION_HEIGHT ITextViewerExtension5 ITextViewerExtension5 fTextViewer IDocument fTextViewer getDocument StyledText textWidget fTextViewer getTextWidget maxLines textWidget getLineCount fCanvas getSize maxLines textWidget getLineHeight fHeader getSize fCachedAnnotations fModel getAnnotationIterator hasNext isMarkedDeleted getType fCachedAnnotations fAnnotationsSortedByLayer hasNext annotationType annotationType FilterIterator FilterIterator FilterIterator annotationType fCachedAnnotations getFillColor annotationType FilterIterator getStrokeColor annotationType FilterIterator hasNext fModel getPosition IRegion widgetRegion modelRange2WidgetRange getOffset getLength widgetRegion ANNOTATION_HEIGHT_SCALABLE numbersOfLines getNumberOfLines getOffset getLength IRegion lastLine getLineInformationOfOffset getOffset getLength lastLine getOffset getOffset getLength numbersOfLines numbersOfLines maxLines ANNOTATION_HEIGHT ANNOTATION_HEIGHT ANNOTATION_HEIGHT ANNOTATION_HEIGHT fAnnotationHeight startLine textWidget getLineAtOffset widgetRegion getOffset startLine maxLines setBackground fillRectangle setForeground setLineWidth drawRectangle BadLocationException fCachedAnnotations
if d null d async Exec new Runnable public void run redraw update Header  asyncExec updateHeader
public void update if f Canvas null f Canvas is Disposed Display d f Canvas get Display if d null d async Exec new Runnable public void run redraw update Header  fCanvas fCanvas isDisposed fCanvas getDisplay asyncExec updateHeader
Redraws the overview ruler private void redraw if f Text Viewer null f Model null return if f Canvas null f Canvas is Disposed GC gc new GC f Canvas double Buffer Paint gc gc dispose  fTextViewer fModel fCanvas fCanvas isDisposed fCanvas doubleBufferPaint
Translates a given y coordinate of this ruler into the corresponding document lines The number of lines depends on the concrete scaling given as the ration between the height of this ruler and the length of the document param y coordinate the y coordinate return the corresponding document lines private int to Line Numbers int y coordinate Styled Text text Widget f Text Viewer get Text Widget int max Lines text Widget get Content get Line Count int ruler Length f Canvas get Size y int writable max Lines text Widget get Line Height if ruler Length writable ruler Length Math max writable f Header get Size y 0 if y coordinate writable y coordinate ruler Length return new int 1 1 int lines new int 2 int pixel0 Math max y coordinate 1 0 int pixel1 Math min ruler Length y coordinate 1 ruler Length Math max ruler Length 1 lines 0 pixel0 max Lines ruler Length lines 1 pixel1 max Lines ruler Length if f Text Viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 f Text Viewer lines 0 extension widget Line2 Model Line lines 0 lines 1 extension widget Line2 Model Line lines 1 else try I Region visible f Text Viewer get Visible Region int line Number f Text Viewer get Document get Line Of Offset visible get Offset lines 0 line Number lines 1 line Number catch Bad Location Exception x return lines  y_coordinate toLineNumbers y_coordinate StyledText textWidget fTextViewer getTextWidget maxLines textWidget getContent getLineCount rulerLength fCanvas getSize maxLines textWidget getLineHeight rulerLength rulerLength fHeader getSize y_coordinate y_coordinate rulerLength y_coordinate rulerLength y_coordinate rulerLength rulerLength maxLines rulerLength maxLines rulerLength fTextViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 fTextViewer widgetLine2ModelLine widgetLine2ModelLine IRegion fTextViewer getVisibleRegion lineNumber fTextViewer getDocument getLineOfOffset getOffset lineNumber lineNumber BadLocationException
Returns the position of the first annotation found in the given line range param line Numbers the line range param ignore Selected Annotation whether to ignore the current selection return the position of the first found annotation private Position get Annotation Position int line Numbers boolean ignore Selected Annotation if line Numbers 0 1 return null Position found null try I Document d f Text Viewer get Document I Region line d get Line Information line Numbers 0 Point current Selection f Text Viewer get Selected Range int start line get Offset line d get Line Information line Numbers line Numbers length 1 int end line get Offset line get Length for int i f Annotations Sorted By Layer size 1 i 0 i Object annotation Type f Annotations Sorted By Layer get i Iterator e new Filter Iterator annotation Type Filter Iterator PERSISTENT Filter Iterator TEMPORARY while e has Next found null Annotation a Annotation e next if a is Marked Deleted continue if skip a get Type continue Position p f Model get Position a if p null continue int pos Offset p get Offset int pos End pos Offset p get Length I Region region d get Line Information Of Offset pos End trailing empty lines don t count if pos End pos Offset region get Offset pos End pos End region d get Line Information Of Offset pos End if pos Offset end pos End start if found null pos Offset found get Offset ignore Selected Annotation current Selection x pos Offset current Selection y p get Length found p catch Bad Location Exception x return found  lineNumbers ignoreSelectedAnnotation getAnnotationPosition lineNumbers ignoreSelectedAnnotation lineNumbers IDocument fTextViewer getDocument IRegion getLineInformation lineNumbers currentSelection fTextViewer getSelectedRange getOffset getLineInformation lineNumbers lineNumbers getOffset getLength fAnnotationsSortedByLayer annotationType fAnnotationsSortedByLayer FilterIterator annotationType FilterIterator FilterIterator hasNext isMarkedDeleted getType fModel getPosition posOffset getOffset posEnd posOffset getLength IRegion getLineInformationOfOffset posEnd posEnd posOffset getOffset posEnd posEnd getLineInformationOfOffset posEnd posOffset posEnd posOffset getOffset ignoreSelectedAnnotation currentSelection posOffset currentSelection getLength BadLocationException
Returns the line which corresponds best to one of the underlying annotations at the given y coordinate param line Numbers the line numbers return the best matching line or code 1 code if no such line can be found private int find Best Matching Line Number int line Numbers if line Numbers null line Numbers length 1 return 1 try Position pos get Annotation Position line Numbers true if pos null return 1 return f Text Viewer get Document get Line Of Offset pos get Offset catch Bad Location Exception ex return 1  lineNumbers findBestMatchingLineNumber lineNumbers lineNumbers lineNumbers getAnnotationPosition lineNumbers fTextViewer getDocument getLineOfOffset getOffset BadLocationException
Handles mouse clicks param event the mouse button down event private void handle Mouse Down Mouse Event event if f Text Viewer null int lines to Line Numbers event y Position p get Annotation Position lines false if p null f Text Viewer reveal Range p get Offset p get Length f Text Viewer set Selected Range p get Offset p get Length f Text Viewer get Text Widget set Focus f Last Mouse Button Activity Line to Document Line Number event y  handleMouseDown MouseEvent fTextViewer toLineNumbers getAnnotationPosition fTextViewer revealRange getOffset getLength fTextViewer setSelectedRange getOffset getLength fTextViewer getTextWidget setFocus fLastMouseButtonActivityLine toDocumentLineNumber
Handles mouse moves param event the mouse move event private void handle Mouse Move Mouse Event event if f Text Viewer null int lines to Line Numbers event y Position p get Annotation Position lines true Cursor cursor p null f Hit Detection Cursor null if cursor f Last Cursor f Canvas set Cursor cursor f Last Cursor cursor  handleMouseMove MouseEvent fTextViewer toLineNumbers getAnnotationPosition fHitDetectionCursor fLastCursor fCanvas setCursor fLastCursor
see org eclipse jface text source I Overview Ruler add Annotation Type java lang Object public void add Annotation Type Object annotation Type f Configured Annotation Types add annotation Type f Allowed Annotation Types clear  IOverviewRuler addAnnotationType addAnnotationType annotationType fConfiguredAnnotationTypes annotationType fAllowedAnnotationTypes
see org eclipse jface text source I Overview Ruler remove Annotation Type java lang Object public void remove Annotation Type Object annotation Type f Configured Annotation Types remove annotation Type f Allowed Annotation Types clear  IOverviewRuler removeAnnotationType removeAnnotationType annotationType fConfiguredAnnotationTypes annotationType fAllowedAnnotationTypes
public void set Annotation Type Layer Object annotation Type int layer Integer layer Obj new Integer layer if f Annotations Sorted By Layer remove annotation Type f Layers Sorted By Layer remove layer Obj if layer 0 int i 0 int size f Layers Sorted By Layer size while i size layer Integer f Layers Sorted By Layer get i int Value i f Layers Sorted By Layer add i layer Obj f Annotations Sorted By Layer add i annotation Type  setAnnotationTypeLayer annotationType layerObj fAnnotationsSortedByLayer annotationType fLayersSortedByLayer layerObj fLayersSortedByLayer fLayersSortedByLayer intValue fLayersSortedByLayer layerObj fAnnotationsSortedByLayer annotationType
public void set Annotation Type Color Object annotation Type Color color if color null f Annotation Types2 Colors put annotation Type color else f Annotation Types2 Colors remove annotation Type  setAnnotationTypeColor annotationType fAnnotationTypes2Colors annotationType fAnnotationTypes2Colors annotationType
Returns whether the given annotation type should be skipped by the drawing routine param annotation Type the annotation type return code true code if annotation of the given type should be skipped private boolean skip Object annotation Type return contains annotation Type f Allowed Annotation Types f Configured Annotation Types  annotationType annotationType annotationType fAllowedAnnotationTypes fConfiguredAnnotationTypes
Returns whether the given annotation type should be skipped by the drawing routine of the header param annotation Type the annotation type return code true code if annotation of the given type should be skipped since 3 0 private boolean skip In Header Object annotation Type return contains annotation Type f Allowed Header Annotation Types f Configured Header Annotation Types  annotationType skipInHeader annotationType annotationType fAllowedHeaderAnnotationTypes fConfiguredHeaderAnnotationTypes
Returns whether the given annotation type is mapped to code true code in the given code allowed code map or covered by the code configured code set param annotation Type the annotation type param allowed the map with allowed annotation types mapped to booleans param configured the set with configured annotation types return code true code if annotation is contained code false code otherwise since 3 0 private boolean contains Object annotation Type Map allowed Set configured Boolean cached Boolean allowed get annotation Type if cached null return cached boolean Value boolean covered is Covered annotation Type configured allowed put annotation Type covered Boolean TRUE Boolean FALSE return covered  annotationType annotationType annotationType booleanValue isCovered annotationType annotationType
Computes whether the annotations of the given type are covered by the given code configured code set This is the case if either the type of the annotation or any of its super types is contained in the code configured code set param annotation Type the annotation type param configured the set with configured annotation types return code true code if annotation is covered code false code otherwise since 3 0 private boolean is Covered Object annotation Type Set configured if f Annotation Access instanceof I Annotation Access Extension I Annotation Access Extension extension I Annotation Access Extension f Annotation Access Iterator e configured iterator while e has Next if extension is Subtype annotation Type e next return true return false return configured contains annotation Type  annotationType isCovered annotationType fAnnotationAccess IAnnotationAccessExtension IAnnotationAccessExtension IAnnotationAccessExtension fAnnotationAccess hasNext isSubtype annotationType annotationType
Returns a specification of a color that lies between the given foreground and background color using the given scale factor param fg the foreground color param bg the background color param scale the scale factor return the interpolated color private static RGB interpolate RGB fg RGB bg double scale return new RGB int 1 0 scale fg red scale bg red int 1 0 scale fg green scale bg green int 1 0 scale fg blue scale bg blue 
Returns the grey value in which the given color would be drawn in grey scale param rgb the color return the grey scale value private static double grey Level RGB rgb if rgb red rgb green rgb green rgb blue return rgb red return 0 299 rgb red 0 587 rgb green 0 114 rgb blue 0 5  greyLevel
Returns whether the given color is dark or light depending on the colors grey scale level param rgb the color return code true code if the color is dark code false code if it is light private static boolean is Dark RGB rgb return grey Level rgb 128  isDark greyLevel
Returns a color based on the color configured for the given annotation type and the given scale factor param annotation Type the annotation type param scale the scale factor return the computed color private Color get Color Object annotation Type double scale Color base find Color annotation Type if base null return null RGB baseRGB base getRGB RGB background f Canvas get Background getRGB boolean dark Base is Dark baseRGB boolean dark Background is Dark background if dark Base dark Background background new RGB 255 255 255 else if dark Base dark Background background new RGB 0 0 0 return f Shared Text Colors get Color interpolate baseRGB background scale  annotationType getColor annotationType findColor annotationType fCanvas getBackground darkBase isDark darkBackground isDark darkBase darkBackground darkBase darkBackground fSharedTextColors getColor
Returns the color for the given annotation type param annotation Type the annotation type return the color since 3 0 private Color find Color Object annotation Type Color color Color f Annotation Types2 Colors get annotation Type if color null return color if f Annotation Access instanceof I Annotation Access Extension I Annotation Access Extension extension I Annotation Access Extension f Annotation Access Object super Types extension get Supertypes annotation Type if super Types null for int i 0 i super Types length i color Color f Annotation Types2 Colors get super Types i if color null return color return null  annotationType findColor annotationType fAnnotationTypes2Colors annotationType fAnnotationAccess IAnnotationAccessExtension IAnnotationAccessExtension IAnnotationAccessExtension fAnnotationAccess superTypes getSupertypes annotationType superTypes superTypes fAnnotationTypes2Colors superTypes
Returns the stroke color for the given annotation type and characteristics param annotation Type the annotation type param temporary code true code if for temporary annotations return the stroke color private Color get Stroke Color Object annotation Type boolean temporary return get Color annotation Type temporary 0 5 0 2  annotationType getStrokeColor annotationType getColor annotationType
Returns the fill color for the given annotation type and characteristics param annotation Type the annotation type param temporary code true code if for temporary annotations return the fill color private Color get Fill Color Object annotation Type boolean temporary return get Color annotation Type temporary 0 9 0 6  annotationType getFillColor annotationType getColor annotationType
see I Vertical Ruler Info get Line Of Last Mouse Button Activity public int get Line Of Last Mouse Button Activity return f Last Mouse Button Activity Line  IVerticalRulerInfo getLineOfLastMouseButtonActivity getLineOfLastMouseButtonActivity fLastMouseButtonActivityLine
public int to Document Line Number int y coordinate if f Text Viewer null y coordinate 1 return 1 int line Numbers to Line Numbers y coordinate int best Line find Best Matching Line Number line Numbers if best Line 1 line Numbers length 0 return line Numbers 0 returnbest Line  toDocumentLineNumber y_coordinate fTextViewer y_coordinate lineNumbers toLineNumbers y_coordinate bestLine findBestMatchingLineNumber lineNumbers bestLine lineNumbers lineNumbers returnbestLine
see org eclipse jface text source I Vertical Ruler get Model public I Annotation Model get Model return f Model  IVerticalRuler getModel IAnnotationModel getModel fModel
see org eclipse jface text source I Overview Ruler get Annotation Height public int get Annotation Height return f Annotation Height  IOverviewRuler getAnnotationHeight getAnnotationHeight fAnnotationHeight
see org eclipse jface text source I Overview Ruler has Annotation int public boolean has Annotation int y return find Best Matching Line Number to Line Numbers y 1  IOverviewRuler hasAnnotation hasAnnotation findBestMatchingLineNumber toLineNumbers
see org eclipse jface text source I Overview Ruler get Header Control public Control get Header Control return f Header  IOverviewRuler getHeaderControl getHeaderControl fHeader
see org eclipse jface text source I Overview Ruler add Header Annotation Type java lang Object public void add Header Annotation Type Object annotation Type f Configured Header Annotation Types add annotation Type f Allowed Header Annotation Types clear  IOverviewRuler addHeaderAnnotationType addHeaderAnnotationType annotationType fConfiguredHeaderAnnotationTypes annotationType fAllowedHeaderAnnotationTypes
see org eclipse jface text source I Overview Ruler remove Header Annotation Type java lang Object public void remove Header Annotation Type Object annotation Type f Configured Header Annotation Types remove annotation Type f Allowed Header Annotation Types clear  IOverviewRuler removeHeaderAnnotationType removeHeaderAnnotationType annotationType fConfiguredHeaderAnnotationTypes annotationType fAllowedHeaderAnnotationTypes
Updates the header of this ruler private void update Header if f Header null f Header is Disposed return Object color Type null outer for int i f Annotations Sorted By Layer size 1 i 0 i Object annotation Type f Annotations Sorted By Layer get i if skip In Header annotation Type skip annotation Type continue for Iterator e new Filter Iterator annotation Type Filter Iterator PERSISTENT Filter Iterator TEMPORARY Filter Iterator IGNORE BAGS e has Next if e next null color Type annotation Type break outer Color color null if color Type null color find Color color Type if color null if f Header Painter null f Header Painter set Color null else if f Header Painter null f Header Painter new Header Painter f Header add Paint Listener f Header Painter f Header Painter set Color color f Header redraw update Header Tool Tip Text  updateHeader fHeader fHeader isDisposed colorType fAnnotationsSortedByLayer annotationType fAnnotationsSortedByLayer skipInHeader annotationType annotationType FilterIterator annotationType FilterIterator FilterIterator FilterIterator IGNORE_BAGS hasNext colorType annotationType colorType findColor colorType fHeaderPainter fHeaderPainter setColor fHeaderPainter fHeaderPainter HeaderPainter fHeader addPaintListener fHeaderPainter fHeaderPainter setColor fHeader updateHeaderToolTipText
Updates the tool tip text of the header of this ruler since 3 0 private void update Header Tool Tip Text if f Header null f Header is Disposed return f Header set Tool Tip Text null if f Annotation Access instanceof I Annotation Access Extension return String overview NON NLS 1 for int i f Annotations Sorted By Layer size 1 i 0 i Object annotation Type f Annotations Sorted By Layer get i if skip In Header annotation Type skip annotation Type continue int count 0 String annotation Type Label null for Iterator e new Filter Iterator annotation Type Filter Iterator PERSISTENT Filter Iterator TEMPORARY Filter Iterator IGNORE BAGS e has Next Annotation annotation Annotation e next if annotation null if annotation Type Label null annotation Type Label I Annotation Access Extension f Annotation Access get Type Label annotation count if annotation Type Label null if overview length 0 overview n NON NLS 1 overview J Face Text Messages get Formatted String Overview Ruler Header tool Tip Text Entry new Object annotation Type Label new Integer count NON NLS 1 if overview length 0 f Header set Tool Tip Text overview  updateHeaderToolTipText fHeader fHeader isDisposed fHeader setToolTipText fAnnotationAccess IAnnotationAccessExtension fAnnotationsSortedByLayer annotationType fAnnotationsSortedByLayer skipInHeader annotationType annotationType annotationTypeLabel FilterIterator annotationType FilterIterator FilterIterator FilterIterator IGNORE_BAGS hasNext annotationTypeLabel annotationTypeLabel IAnnotationAccessExtension fAnnotationAccess getTypeLabel annotationTypeLabel JFaceTextMessages getFormattedString OverviewRulerHeader toolTipTextEntry annotationTypeLabel fHeader setToolTipText

Creates an overview hover manager with the given parameters In addition the hovers anchor is RIGHT and the margin is 5 points to the right param ruler the overview ruler this manager connects to param source Viewer the source viewer this manager connects to param annotation Hover the annotation hover providing the information to be displayed param creator the information control creator public Overview Ruler Hover Manager I Overview Ruler ruler I Source Viewer source Viewer I Annotation Hover annotation Hover I Information Control Creator creator super ruler source Viewer annotation Hover creator set Anchor ANCHOR LEFT  sourceViewer annotationHover OverviewRulerHoverManager IOverviewRuler ISourceViewer sourceViewer IAnnotationHover annotationHover IInformationControlCreator sourceViewer annotationHover setAnchor ANCHOR_LEFT
protected void compute Information Point location get Hover Event Location int line get Vertical Ruler Info to Document Line Number location y set Information get Annotation Hover get Hover Info get Source Viewer line compute Area location y  computeInformation getHoverEventLocation getVerticalRulerInfo toDocumentLineNumber setInformation getAnnotationHover getHoverInfo getSourceViewer computeArea
Determines graphical area covered for which the hover is valid param y coordinate in the vertical ruler return the graphical extend where the hover is valid private Rectangle compute Area int y This is OK see constructor I Overview Ruler overview Ruler I Overview Ruler get Vertical Ruler Info int hover height overview Ruler get Annotation Height int hover width get Vertical Ruler Info get Control get Size x Calculate y coordinate for hover int hover y y boolean has Annotation true while has Annotation hover y y hover height hover y has Annotation overview Ruler has Annotation hover y hover y return new Rectangle 0 hover y hover width hover height  computeArea IOverviewRuler overviewRuler IOverviewRuler getVerticalRulerInfo hover_height overviewRuler getAnnotationHeight hover_width getVerticalRulerInfo getControl getSize hover_y hasAnnotation hasAnnotation hover_y hover_height hover_y hasAnnotation overviewRuler hasAnnotation hover_y hover_y hover_y hover_width hover_height

Creates a new annotation bag param type the annotation type public Annotation Bag String type super type false null  AnnotationBag
Adds the given annotation to the annotation bag param annotation the annotation to add public void add Annotation annotation if f Annotations null f Annotations new Hash Set 2 f Annotations add annotation  fAnnotations fAnnotations HashSet fAnnotations
Removes the given annotation from the annotation bag param annotation the annotation to remove public void remove Annotation annotation if f Annotations null f Annotations remove annotation if f Annotations is Empty f Annotations null  fAnnotations fAnnotations fAnnotations isEmpty fAnnotations
Returns whether the annotation bag is empty return code true code if the annotation bag is empty code false code otherwise public boolean is Empty return f Annotations null  isEmpty fAnnotations

public interface I Projection Listener Tells this listener that projection has been enabled void projection Enabled  IProjectionListener projectionEnabled
void projection Enabled Tells this listener that projection has been disabled void projection Disabled  projectionEnabled projectionDisabled

public void run if fg Collapsed Image null fg Collapsed Image dispose fg Collapsed Image null if fg Expanded Image null fg Expanded Image dispose fg Expanded Image null  fgCollapsedImage fgCollapsedImage fgCollapsedImage fgExpandedImage fgExpandedImage fgExpandedImage
Creates a new expanded projection annotation public Projection Annotation this false  ProjectionAnnotation
Creates a new projection annotation When code is Collapsed code is code true code the annotation is initially collapsed param is Collapsed code true code if the annotation should initially be collapsed code false code otherwise public Projection Annotation boolean is Collapsed super TYPE false null f Is Collapsed is Collapsed  isCollapsed isCollapsed ProjectionAnnotation isCollapsed fIsCollapsed isCollapsed
Enables and disables the range indication for this annotation param range Indication the enable state for the range indication public void set Range Indication boolean range Indication f Is Range Indication range Indication  rangeIndication setRangeIndication rangeIndication fIsRangeIndication rangeIndication
private void draw Range Indication GC gc Canvas canvas Rectangle r final int MARGIN 3 Color fg gc get Foreground gc set Foreground canvas get Display get System Color COLOR gc set Line Width 1 gc draw Line r x 4 r y 12 r x 4 r y r height MARGIN gc draw Line r x 4 r y r height MARGIN r x r width MARGIN r y r height MARGIN gc set Foreground fg  drawRangeIndication getForeground setForeground getDisplay getSystemColor setLineWidth drawLine drawLine setForeground
public void paint GC gc Canvas canvas Rectangle rectangle Image image get Image canvas get Display if image null Image Utilities draw Image image gc canvas rectangle SWT CENTER SWT TOP if f Is Range Indication draw Range Indication gc canvas rectangle  getImage getDisplay ImageUtilities drawImage fIsRangeIndication drawRangeIndication
see org eclipse jface text source I Annotation Presentation get Layer public int get Layer return I Annotation Presentation DEFAULT LAYER  IAnnotationPresentation getLayer getLayer IAnnotationPresentation DEFAULT_LAYER
private Image get Image Display display initialize Images display return is Collapsed fg Collapsed Image fg Expanded Image  getImage initializeImages isCollapsed fgCollapsedImage fgExpandedImage
private void initialize Images Display display if fg Collapsed Image null Image Descriptor descriptor Image Descriptor create From File Projection Annotation class images collapsed gif NON NLS 1 fg Collapsed Image descriptor create Image display descriptor Image Descriptor create From File Projection Annotation class images expanded gif NON NLS 1 fg Expanded Image descriptor create Image display display dispose Exec new Display Dispose Runnable  initializeImages fgCollapsedImage ImageDescriptor ImageDescriptor createFromFile ProjectionAnnotation fgCollapsedImage createImage ImageDescriptor createFromFile ProjectionAnnotation fgExpandedImage createImage disposeExec DisplayDisposeRunnable
Returns the state of this annotation return code true code if collapsed public boolean is Collapsed return f Is Collapsed  isCollapsed fIsCollapsed
Marks this annotation as being collapsed public void mark Collapsed f Is Collapsed true  markCollapsed fIsCollapsed
Marks this annotation as being unfolded public void mark Expanded f Is Collapsed false  markExpanded fIsCollapsed

Sets the hover control creator for this projection annotation hover param creator the creator public void set Hover Control Creator I Information Control Creator creator f Information Control Creator creator  setHoverControlCreator IInformationControlCreator fInformationControlCreator
see org eclipse jface text source I Annotation Hover get Hover Info org eclipse jface text source I Source Viewer int public String get Hover Info I Source Viewer source Viewer int line Number this is a no op as semantics is defined by the implementation of the annotation hover extension return null  IAnnotationHover getHoverInfo ISourceViewer getHoverInfo ISourceViewer sourceViewer lineNumber
private int compare Ruler Line Position position I Document document int line if position get Offset 1 position get Length 1 try int start Line document get Line Of Offset position get Offset if line start Line return 1 if start Line line line document get Line Of Offset position get Offset position get Length return 2 catch Bad Location Exception x return 0  compareRulerLine IDocument getOffset getLength startLine getLineOfOffset getOffset startLine startLine getLineOfOffset getOffset getLength BadLocationException
private String get Projection Text At Line I Source Viewer viewer int line int number Of Lines I Annotation Model model null if viewer instanceof I Source Viewer Extension2 I Source Viewer Extension2 viewer Extension I Source Viewer Extension2 viewer I Annotation Model visual viewer Extension get Visual Annotation Model if visual instanceof I Annotation Model Extension I Annotation Model Extension model Extension I Annotation Model Extension visual model model Extension get Annotation Model Projection Support PROJECTION if model null try I Document document viewer get Document Iterator e model get Annotation Iterator while e has Next Projection Annotation annotation Projection Annotation e next if annotation is Collapsed continue Position position model get Position annotation if position null continue if 1 compare Ruler Line position document line return get Text document position get Offset position get Length number Of Lines catch Bad Location Exception x return null  getProjectionTextAtLine ISourceViewer numberOfLines IAnnotationModel ISourceViewerExtension2 ISourceViewerExtension2 viewerExtension ISourceViewerExtension2 IAnnotationModel viewerExtension getVisualAnnotationModel IAnnotationModelExtension IAnnotationModelExtension modelExtension IAnnotationModelExtension modelExtension getAnnotationModel ProjectionSupport IDocument getDocument getAnnotationIterator hasNext ProjectionAnnotation ProjectionAnnotation isCollapsed getPosition compareRulerLine getText getOffset getLength numberOfLines BadLocationException
private String get Text I Document document int offset int length int number Of Lines throws Bad Location Exception int end Offset offset length try int end Line document get Line Of Offset offset Math max 0 number Of Lines 1 I Region line Info document get Line Information end Line end Offset Math min end Offset line Info get Offset line Info get Length catch Bad Location Exception x return document get offset end Offset offset  getText IDocument numberOfLines BadLocationException endOffset endLine getLineOfOffset numberOfLines IRegion lineInfo getLineInformation endLine endOffset endOffset lineInfo getOffset lineInfo getLength BadLocationException endOffset
see org eclipse jface text source I Annotation Hover Extension get Hover Info org eclipse jface text source I Source Viewer org eclipse jface text source I Line Range int public Object get Hover Info I Source Viewer source Viewer I Line Range line Range int visible Lines return get Projection Text At Line source Viewer line Range get Start Line visible Lines  IAnnotationHoverExtension getHoverInfo ISourceViewer ILineRange getHoverInfo ISourceViewer sourceViewer ILineRange lineRange visibleLines getProjectionTextAtLine sourceViewer lineRange getStartLine visibleLines
see org eclipse jface text source I Annotation Hover Extension get Hover Line Range org eclipse jface text source I Source Viewer int public I Line Range get Hover Line Range I Source Viewer viewer int line Number return new Line Range line Number 1  IAnnotationHoverExtension getHoverLineRange ISourceViewer ILineRange getHoverLineRange ISourceViewer lineNumber LineRange lineNumber
see org eclipse jface text source I Annotation Hover Extension can Handle Mouse Cursor public boolean can Handle Mouse Cursor return false  IAnnotationHoverExtension canHandleMouseCursor canHandleMouseCursor
return new I Information Control Creator public I Information Control create Information Control Shell parent return new Source Viewer Information Control parent J Face Resources TEXT FONT  IInformationControlCreator IInformationControl createInformationControl SourceViewerInformationControl JFaceResources TEXT_FONT
public I Information Control Creator get Hover Control Creator if f Information Control Creator null return f Information Control Creator return new I Information Control Creator public I Information Control create Information Control Shell parent return new Source Viewer Information Control parent J Face Resources TEXT FONT  IInformationControlCreator getHoverControlCreator fInformationControlCreator fInformationControlCreator IInformationControlCreator IInformationControl createInformationControl SourceViewerInformationControl JFaceResources TEXT_FONT

Creates a new empty projection annotation model public Projection Annotation Model  ProjectionAnnotationModel
Changes the state of the given annotation to collapsed An appropriate annotation model change event is sent out param annotation the annotation public void collapse Annotation annotation if annotation instanceof Projection Annotation Projection Annotation projection Projection Annotation annotation if projection is Collapsed projection mark Collapsed modify Annotation projection true  ProjectionAnnotation ProjectionAnnotation ProjectionAnnotation isCollapsed markCollapsed modifyAnnotation
Changes the state of the given annotation to expanded An appropriate annotation model change event is sent out param annotation the annotation public void expand Annotation annotation if annotation instanceof Projection Annotation Projection Annotation projection Projection Annotation annotation if projection is Collapsed projection mark Expanded modify Annotation projection true  ProjectionAnnotation ProjectionAnnotation ProjectionAnnotation isCollapsed markExpanded modifyAnnotation
Toggles the expansion state of the given annotation An appropriate annotation model change event is sent out param annotation the annotation public void toggle Expansion State Annotation annotation if annotation instanceof Projection Annotation Projection Annotation projection Projection Annotation annotation if projection is Collapsed projection mark Expanded else projection mark Collapsed modify Annotation projection true  toggleExpansionState ProjectionAnnotation ProjectionAnnotation ProjectionAnnotation isCollapsed markExpanded markCollapsed modifyAnnotation
Expands all annotations that overlap with the given range and are collapsed param offset the range offset param length the range length return code true code if any annotation has been expanded code false code otherwise public boolean expand All int offset int length return expand All offset length true  expandAll expandAll
Expands all annotations that overlap with the given range and are collapsed Fires a model change event if requested param offset the offset of the range param length the length of the range param fire Model Changed code true code if a model change event should be fired code false code otherwise return code true code if any annotation has been expanded code false code otherwise protected boolean expand All int offset int length boolean fire Model Changed boolean expanding false Iterator iterator get Annotation Iterator while iterator has Next Projection Annotation annotation Projection Annotation iterator next if annotation is Collapsed Position position get Position annotation if position null position overlaps With offset length is a delete at the boundary annotation mark Expanded modify Annotation annotation false expanding true if expanding fire Model Changed fire Model Changed return expanding  fireModelChanged expandAll fireModelChanged getAnnotationIterator hasNext ProjectionAnnotation ProjectionAnnotation isCollapsed getPosition overlapsWith markExpanded modifyAnnotation fireModelChanged fireModelChanged
Modifies the annotation model param deletions the list of deleted annotations param additions the set of annotations to add together with their associated position param modifications the list of modified annotations public void modify Annotations Annotation deletions Map additions Annotation modifications try replace Annotations deletions additions false if modifications null for int i 0 i modifications length i modify Annotation modifications i false catch Bad Location Exception x fire Model Changed  modifyAnnotations replaceAnnotations modifyAnnotation BadLocationException fireModelChanged

Creates a new projection ruler column param model the column s annotation model param width the width in pixels param annotation Access the annotation access public Projection Ruler Column I Annotation Model model int width I Annotation Access annotation Access super model width annotation Access  annotationAccess ProjectionRulerColumn IAnnotationModel IAnnotationAccess annotationAccess annotationAccess
Creates a new projection ruler column param width the width in pixels param annotation Access the annotation access public Projection Ruler Column int width I Annotation Access annotation Access super width annotation Access  annotationAccess ProjectionRulerColumn IAnnotationAccess annotationAccess annotationAccess
protected void mouse Clicked int line clear Current Annotation Projection Annotation annotation find Annotation line true if annotation null Projection Annotation Model model Projection Annotation Model get Model model toggle Expansion State annotation  mouseClicked clearCurrentAnnotation ProjectionAnnotation findAnnotation ProjectionAnnotationModel ProjectionAnnotationModel getModel toggleExpansionState
Returns the projection annotation of the column s annotation model that contains the given line param line the line param exact code true code if the annotation range must match exactly return the projection annotation containing the given line private Projection Annotation find Annotation int line boolean exact Projection Annotation previous Annotation null I Annotation Model model get Model if model null I Document document get Cached Text Viewer get Document int previous Distance Integer MAX VALUE Iterator e model get Annotation Iterator while e has Next Object next e next if next instanceof Projection Annotation Projection Annotation annotation Projection Annotation next Position p model get Position annotation if p null continue int distance get Distance p document line if distance 1 continue if exact if distance previous Distance previous Annotation annotation previous Distance distance else if distance 0 previous Annotation annotation return previous Annotation  ProjectionAnnotation findAnnotation ProjectionAnnotation previousAnnotation IAnnotationModel getModel IDocument getCachedTextViewer getDocument previousDistance MAX_VALUE getAnnotationIterator hasNext ProjectionAnnotation ProjectionAnnotation ProjectionAnnotation getPosition getDistance previousDistance previousAnnotation previousDistance previousAnnotation previousAnnotation
Returns the distance of the given line to the the start line of the given position in the given document The distance is code 1 code when the line is not included in the given position param position the position param document the document param line the line return code 1 code if line is not contained a position number otherwise private int get Distance Position position I Document document int line if position get Offset 1 position get Length 1 try int start Line document get Line Of Offset position get Offset int end Line document get Line Of Offset position get Offset position get Length if start Line line line end Line return line start Line catch Bad Location Exception x return 1  getDistance IDocument getOffset getLength startLine getLineOfOffset getOffset endLine getLineOfOffset getOffset getLength startLine endLine startLine BadLocationException
private boolean clear Current Annotation if f Current Annotation null f Current Annotation set Range Indication false f Current Annotation null return true return false  clearCurrentAnnotation fCurrentAnnotation fCurrentAnnotation setRangeIndication fCurrentAnnotation
install hover listener control add Mouse Track Listener new Mouse Track Adapter public void mouse Exit Mouse Event e if clear Current Annotation redraw  addMouseTrackListener MouseTrackAdapter mouseExit MouseEvent clearCurrentAnnotation
control add Mouse Move Listener new Mouse Move Listener public void mouse Move Mouse Event e boolean redraw false Projection Annotation annotation find Annotation to Document Line Number e y false if annotation f Current Annotation if f Current Annotation null f Current Annotation set Range Indication false redraw true f Current Annotation annotation if f Current Annotation null f Current Annotation is Collapsed f Current Annotation set Range Indication true redraw true if redraw redraw  addMouseMoveListener MouseMoveListener mouseMove MouseEvent ProjectionAnnotation findAnnotation toDocumentLineNumber fCurrentAnnotation fCurrentAnnotation fCurrentAnnotation setRangeIndication fCurrentAnnotation fCurrentAnnotation fCurrentAnnotation isCollapsed fCurrentAnnotation setRangeIndication
public Control create Control Composite Ruler parent Ruler Composite parent Control Control control super create Control parent Ruler parent Control set background Display display parent Control get Display Color background display get System Color SWT COLOR LIST BACKGROUND control set Background background install hover listener control add Mouse Track Listener new Mouse Track Adapter public void mouse Exit Mouse Event e if clear Current Annotation redraw install mouse move listener control add Mouse Move Listener new Mouse Move Listener public void mouse Move Mouse Event e boolean redraw false Projection Annotation annotation find Annotation to Document Line Number e y false if annotation f Current Annotation if f Current Annotation null f Current Annotation set Range Indication false redraw true f Current Annotation annotation if f Current Annotation null f Current Annotation is Collapsed f Current Annotation set Range Indication true redraw true if redraw redraw return control  createControl CompositeRuler parentRuler parentControl createControl parentRuler parentControl parentControl getDisplay getSystemColor COLOR_LIST_BACKGROUND setBackground addMouseTrackListener MouseTrackAdapter mouseExit MouseEvent clearCurrentAnnotation addMouseMoveListener MouseMoveListener mouseMove MouseEvent ProjectionAnnotation findAnnotation toDocumentLineNumber fCurrentAnnotation fCurrentAnnotation fCurrentAnnotation setRangeIndication fCurrentAnnotation fCurrentAnnotation fCurrentAnnotation isCollapsed fCurrentAnnotation setRangeIndication
public void set Model I Annotation Model model if model instanceof I Annotation Model Extension I Annotation Model Extension extension I Annotation Model Extension model model extension get Annotation Model Projection Support PROJECTION super set Model model  setModel IAnnotationModel IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension getAnnotationModel ProjectionSupport setModel
see org eclipse jface text source Annotation Ruler Column is Propagating Mouse Listener protected boolean is Propagating Mouse Listener return false  AnnotationRulerColumn isPropagatingMouseListener isPropagatingMouseListener
see org eclipse jface text source Annotation Ruler Column has Annotation int protected boolean has Annotation int line Number return find Annotation line Number true null  AnnotationRulerColumn hasAnnotation hasAnnotation lineNumber findAnnotation lineNumber

Creates a new thread param monitor the progress monitor public Summarizer I Progress Monitor monitor f Progress Monitor monitor set Daemon true start  IProgressMonitor fProgressMonitor setDaemon
Resets the thread public void reset f Reset true  fReset
public void run while true synchronized f Lock if f Reset break f Reset false internal Update Summaries f Progress Monitor synchronized f Lock f Summarizer null  fLock fReset fReset internalUpdateSummaries fProgressMonitor fLock fSummarizer
Creates a new projection summary param projection Viewer the projection viewer param annotation Access the annotation access public Projection Summary Projection Viewer projection Viewer I Annotation Access annotation Access super f Projection Viewer projection Viewer f Annotation Access annotation Access  projectionViewer annotationAccess ProjectionSummary ProjectionViewer projectionViewer IAnnotationAccess annotationAccess fProjectionViewer projectionViewer fAnnotationAccess annotationAccess
Adds the given annotation type For now on annotations of that type are also reflected in their enclosing collapsed regions param annotation Type the annotation type to add public void add Annotation Type String annotation Type synchronized f Lock if f Configured Annotation Types null f Configured Annotation Types new Array List f Configured Annotation Types add annotation Type else if f Configured Annotation Types contains annotation Type f Configured Annotation Types add annotation Type  annotationType addAnnotationType annotationType fLock fConfiguredAnnotationTypes fConfiguredAnnotationTypes ArrayList fConfiguredAnnotationTypes annotationType fConfiguredAnnotationTypes annotationType fConfiguredAnnotationTypes annotationType
Removes the given annotation Annotation of that type are no longer reflected in their enclosing collapsed region param annotation Type the annotation type to remove public void remove Annotation Type String annotation Type synchronized f Lock if f Configured Annotation Types null f Configured Annotation Types remove annotation Type if f Configured Annotation Types size 0 f Configured Annotation Types null  annotationType removeAnnotationType annotationType fLock fConfiguredAnnotationTypes fConfiguredAnnotationTypes annotationType fConfiguredAnnotationTypes fConfiguredAnnotationTypes
Forces an updated of the annotation summary param monitor the progress monitor public void update Summaries I Progress Monitor monitor synchronized f Lock if f Configured Annotation Types null if f Summarizer null f Summarizer new Summarizer monitor f Summarizer reset  updateSummaries IProgressMonitor fLock fConfiguredAnnotationTypes fSummarizer fSummarizer fSummarizer
private void internal Update Summaries I Progress Monitor monitor Object previous Lock Object null f Annotation Model f Projection Viewer get Visual Annotation Model if f Annotation Model null return try I Document document f Projection Viewer get Document if document instanceof I Synchronizable f Annotation Model instanceof I Synchronizable I Synchronizable sync I Synchronizable f Annotation Model previous Lock Object sync get Lock Object sync set Lock Object I Synchronizable document get Lock Object remove Summaries monitor create Summaries monitor finally if f Annotation Model instanceof I Synchronizable I Synchronizable sync I Synchronizable f Annotation Model sync set Lock Object previous Lock Object f Annotation Model null  internalUpdateSummaries IProgressMonitor previousLockObject fAnnotationModel fProjectionViewer getVisualAnnotationModel fAnnotationModel IDocument fProjectionViewer getDocument ISynchronizable fAnnotationModel ISynchronizable ISynchronizable ISynchronizable fAnnotationModel previousLockObject getLockObject setLockObject ISynchronizable getLockObject removeSummaries createSummaries fAnnotationModel ISynchronizable ISynchronizable ISynchronizable fAnnotationModel setLockObject previousLockObject fAnnotationModel
private boolean is Canceled I Progress Monitor monitor return monitor null monitor is Canceled  isCanceled IProgressMonitor isCanceled
private void remove Summaries I Progress Monitor monitor I Annotation Model Extension extension null List bags null if f Annotation Model instanceof I Annotation Model Extension extension I Annotation Model Extension f Annotation Model bags new Array List Iterator e f Annotation Model get Annotation Iterator while e has Next Annotation annotation Annotation e next if annotation instanceof Annotation Bag if bags null f Annotation Model remove Annotation annotation else bags add annotation if is Canceled monitor return if bags null bags size 0 Annotation deletions new Annotation bags size bags to Array deletions if is Canceled monitor extension replace Annotations deletions null  removeSummaries IProgressMonitor IAnnotationModelExtension fAnnotationModel IAnnotationModelExtension IAnnotationModelExtension fAnnotationModel ArrayList fAnnotationModel getAnnotationIterator hasNext AnnotationBag fAnnotationModel removeAnnotation isCanceled toArray isCanceled replaceAnnotations
private void create Summaries I Progress Monitor monitor Projection Annotation Model model f Projection Viewer get Projection Annotation Model if model null return Map additions new Hash Map Iterator e model get Annotation Iterator while e has Next Projection Annotation projection Projection Annotation e next if projection is Collapsed Position position model get Position projection if position null I Region summary Region f Projection Viewer compute Collapsed Region position if summary Region null Position summary Anchor f Projection Viewer compute Collapsed Region Anchor position if summary Anchor null create Summary additions summary Region summary Anchor if is Canceled monitor return if additions size 0 if f Annotation Model instanceof I Annotation Model Extension I Annotation Model Extension extension I Annotation Model Extension f Annotation Model if is Canceled monitor extension replace Annotations null additions else Iterator e1 additions key Set iterator while e1 has Next Annotation Bag bag Annotation Bag e1 next Position position Position additions get bag if is Canceled monitor return f Annotation Model add Annotation bag position  createSummaries IProgressMonitor ProjectionAnnotationModel fProjectionViewer getProjectionAnnotationModel HashMap getAnnotationIterator hasNext ProjectionAnnotation ProjectionAnnotation isCollapsed getPosition IRegion summaryRegion fProjectionViewer computeCollapsedRegion summaryRegion summaryAnchor fProjectionViewer computeCollapsedRegionAnchor summaryAnchor createSummary summaryRegion summaryAnchor isCanceled fAnnotationModel IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension fAnnotationModel isCanceled replaceAnnotations keySet hasNext AnnotationBag AnnotationBag isCanceled fAnnotationModel addAnnotation
private void create Summary Map additions I Region summary Range Position summary Anchor int size 0 Map map null synchronized f Lock if f Configured Annotation Types null size f Configured Annotation Types size map new Hash Map for int i 0 i size i String type String f Configured Annotation Types get i map put type new Annotation Bag type if map null return I Annotation Model model f Projection Viewer get Annotation Model Iterator e model get Annotation Iterator while e has Next Annotation annotation Annotation e next Annotation Bag bag find Bag For Type map annotation get Type if bag null Position position model get Position annotation if includes summary Range position bag add annotation for int i 0 i size i Annotation Bag bag Annotation Bag map get f Configured Annotation Types get i if bag is Empty additions put bag new Position summary Anchor get Offset summary Anchor get Length  createSummary IRegion summaryRange summaryAnchor fLock fConfiguredAnnotationTypes fConfiguredAnnotationTypes HashMap fConfiguredAnnotationTypes AnnotationBag IAnnotationModel fProjectionViewer getAnnotationModel getAnnotationIterator hasNext AnnotationBag findBagForType getType getPosition summaryRange AnnotationBag AnnotationBag fConfiguredAnnotationTypes isEmpty summaryAnchor getOffset summaryAnchor getLength
private Annotation Bag find Bag For Type Map bag Map String annotation Type if f Annotation Access instanceof I Annotation Access Extension I Annotation Access Extension extension I Annotation Access Extension f Annotation Access Object super Types extension get Supertypes annotation Type for int i 0 i super Types length i Annotation Bag bag Annotation Bag bag Map get super Types i if bag null return bag return null  AnnotationBag findBagForType bagMap annotationType fAnnotationAccess IAnnotationAccessExtension IAnnotationAccessExtension IAnnotationAccessExtension fAnnotationAccess superTypes getSupertypes annotationType superTypes AnnotationBag AnnotationBag bagMap superTypes
private boolean includes I Region range Position position if position null position is Deleted return range get Offset position get Offset position get Offset position get Length range get Offset range get Length return false  IRegion isDeleted getOffset getOffset getOffset getLength getOffset getLength

Creates a new painter indicating the location of collapsed regions param source Viewer the source viewer for the painter param access the annotation access public Projection Annotations Painter I Source Viewer source Viewer I Annotation Access access super source Viewer access  sourceViewer ProjectionAnnotationsPainter ISourceViewer sourceViewer IAnnotationAccess sourceViewer
protected I Annotation Model find Annotation Model I Source Viewer source Viewer if source Viewer instanceof Projection Viewer Projection Viewer projection Viewer Projection Viewer source Viewer return projection Viewer get Projection Annotation Model return null  IAnnotationModel findAnnotationModel ISourceViewer sourceViewer sourceViewer ProjectionViewer ProjectionViewer projectionViewer ProjectionViewer sourceViewer projectionViewer getProjectionAnnotationModel
protected boolean skip Annotation annotation if annotation instanceof Projection Annotation return Projection Annotation annotation is Collapsed return super skip annotation  ProjectionAnnotation ProjectionAnnotation isCollapsed
public void draw Annotation annotation GC gc Styled Text text Widget int offset int length Color color if annotation instanceof Projection Annotation Projection Annotation projection Annotation Projection Annotation annotation if projection Annotation is Collapsed if gc null Styled Text Content content text Widget get Content int line content get Line At Offset offset int line Start content get Offset At Line line String text content get Line line int line Length text null 0 text length int line End line Start line Length Point p text Widget get Location At Offset line End Color c gc get Foreground gc set Foreground color Font Metrics metrics gc get Font Metrics baseline where the dots are drawn int baseline text Widget get Baseline descent number of pixels that the box extends over baseline int descent Math min 2 text Widget get Line Height baseline ascent so much does the box stand up from baseline int ascent metrics get Ascent leading free space from line top to box upper line int leading baseline ascent height height of the box int height ascent descent int width metrics get Average Char Width gc draw Rectangle p x p y leading width height int third width 3 int dots Vertical p y baseline 1 gc draw Point p x third dots Vertical gc draw Point p x width third dots Vertical gc set Foreground c else text Widget redraw Range offset length true  StyledText textWidget ProjectionAnnotation ProjectionAnnotation projectionAnnotation ProjectionAnnotation projectionAnnotation isCollapsed StyledTextContent textWidget getContent getLineAtOffset lineStart getOffsetAtLine getLine lineLength lineEnd lineStart lineLength textWidget getLocationAtOffset lineEnd getForeground setForeground FontMetrics getFontMetrics textWidget getBaseline textWidget getLineHeight getAscent getAverageCharWidth drawRectangle dotsVertical drawPoint dotsVertical drawPoint dotsVertical setForeground textWidget redrawRange
see org eclipse jface text source projection I Projection Listener projection Enabled public void projection Enabled do Enable Projection  IProjectionListener projectionEnabled projectionEnabled doEnableProjection
see org eclipse jface text source projection I Projection Listener projection Disabled public void projection Disabled do Disable Projection  IProjectionListener projectionDisabled projectionDisabled doDisableProjection
Creates new projection support for the given projection viewer param viewer the projection viewer param annotation Access the annotation access param shared Text Colors the shared text colors to use public Projection Support Projection Viewer viewer I Annotation Access annotation Access I Shared Text Colors shared Text Colors f Viewer viewer f Annotation Access annotation Access f Shared Text Colors shared Text Colors  annotationAccess sharedTextColors ProjectionSupport ProjectionViewer IAnnotationAccess annotationAccess ISharedTextColors sharedTextColors fViewer fAnnotationAccess annotationAccess fSharedTextColors sharedTextColors
Marks the given annotation type to be considered when creating summaries for collapsed regions of the projection viewer param annotation Type the annotation type to consider public void add Summarizable Annotation Type String annotation Type if f Summarizable Types null f Summarizable Types new Array List f Summarizable Types add annotation Type else if f Summarizable Types contains annotation Type f Summarizable Types add annotation Type  annotationType addSummarizableAnnotationType annotationType fSummarizableTypes fSummarizableTypes ArrayList fSummarizableTypes annotationType fSummarizableTypes annotationType fSummarizableTypes annotationType
Marks the given annotation type to be ignored when creating summaries for collapsed regions of the projection viewer This method has only an effect when code add Summarizable Annotation Type code has been called before for the give annotation type param annotation Type the annotation type to remove public void remove Summarizable Annotation Type String annotation Type if f Summarizable Types null f Summarizable Types remove annotation Type if f Summarizable Types size 0 f Summarizable Types null  addSummarizableAnnotationType annotationType removeSummarizableAnnotationType annotationType fSummarizableTypes fSummarizableTypes annotationType fSummarizableTypes fSummarizableTypes
Sets the hover control creator that is used for the annotation hovers that are shown in the projection viewer s projection ruler column param creator the hover control creator public void set Hover Control Creator I Information Control Creator creator f Information Control Creator creator  setHoverControlCreator IInformationControlCreator fInformationControlCreator
Installs this projection support on its viewer public void install f Viewer set Projection Summary create Projection Summary f Projection Listener new Projection Listener f Viewer add Projection Listener f Projection Listener  fViewer setProjectionSummary createProjectionSummary fProjectionListener ProjectionListener fViewer addProjectionListener fProjectionListener
Disposes this projection support public void dispose if f Projection Listener null f Viewer remove Projection Listener f Projection Listener f Projection Listener null  fProjectionListener fViewer removeProjectionListener fProjectionListener fProjectionListener
Enables projection mode If not yet done installs the projection ruler column in the viewer s vertical ruler and installs a painter that indicate the locations of collapsed regions protected void do Enable Projection if f Painter null f Painter new Projection Annotations Painter f Viewer f Annotation Access f Painter add Drawing Strategy PROJECTION new Projection Drawing Strategy f Painter add Annotation Type Projection Annotation TYPE PROJECTION f Painter set Annotation Type Color Projection Annotation TYPE f Shared Text Colors get Color get Color f Viewer add Painter f Painter if f Column null f Column new Projection Ruler Column 9 f Annotation Access f Column add Annotation Type Projection Annotation TYPE f Column set Hover create Projection Annotation Hover f Viewer add Vertical Ruler Column f Column f Column set Model f Viewer get Visual Annotation Model  doEnableProjection fPainter fPainter ProjectionAnnotationsPainter fViewer fAnnotationAccess fPainter addDrawingStrategy ProjectionDrawingStrategy fPainter addAnnotationType ProjectionAnnotation fPainter setAnnotationTypeColor ProjectionAnnotation fSharedTextColors getColor getColor fViewer addPainter fPainter fColumn fColumn ProjectionRulerColumn fAnnotationAccess fColumn addAnnotationType ProjectionAnnotation fColumn setHover createProjectionAnnotationHover fViewer addVerticalRulerColumn fColumn fColumn setModel fViewer getVisualAnnotationModel
Removes the projection ruler column and the painter from the projection viewer protected void do Disable Projection if f Painter null f Viewer remove Painter f Painter f Painter dispose f Painter null if f Column null f Viewer remove Vertical Ruler Column f Column f Column null  doDisableProjection fPainter fViewer removePainter fPainter fPainter fPainter fColumn fViewer removeVerticalRulerColumn fColumn fColumn
private Projection Summary create Projection Summary Projection Summary summary new Projection Summary f Viewer f Annotation Access if f Summarizable Types null int size f Summarizable Types size for int i 0 i size i summary add Annotation Type String f Summarizable Types get i return summary  ProjectionSummary createProjectionSummary ProjectionSummary ProjectionSummary fViewer fAnnotationAccess fSummarizableTypes fSummarizableTypes addAnnotationType fSummarizableTypes
private I Annotation Hover create Projection Annotation Hover Projection Annotation Hover hover new Projection Annotation Hover hover set Hover Control Creator f Information Control Creator return hover  IAnnotationHover createProjectionAnnotationHover ProjectionAnnotationHover ProjectionAnnotationHover setHoverControlCreator fInformationControlCreator
Implements the contract of link org eclipse core runtime I Adaptable get Adapter java lang Class by forwarding the adapter requests to the given viewer param viewer the viewer param required the required class of the adapter return the adapter or code null code public Object get Adapter I Source Viewer viewer Class required if Projection Annotation Model class equals required if viewer instanceof Projection Viewer Projection Viewer projection Viewer Projection Viewer viewer return projection Viewer get Projection Annotation Model return null  IAdaptable getAdapter getAdapter ISourceViewer ProjectionAnnotationModel ProjectionViewer ProjectionViewer projectionViewer ProjectionViewer projectionViewer getProjectionAnnotationModel
private RGB get Color TODO read out preference settings Color c Display get Default get System Color SWT COLOR DARK GRAY return c getRGB  getColor getDefault getSystemColor COLOR_DARK_GRAY

see org eclipse jface text source I Annotation Model Listener model Changed org eclipse jface text source I Annotation Model public void model Changed I Annotation Model model process Model Changed model null  IAnnotationModelListener modelChanged IAnnotationModel modelChanged IAnnotationModel processModelChanged
see org eclipse jface text source I Annotation Model Listener Extension model Changed org eclipse jface text source Annotation Model Event public void model Changed Annotation Model Event event process Model Changed event get Annotation Model event  IAnnotationModelListenerExtension modelChanged AnnotationModelEvent modelChanged AnnotationModelEvent processModelChanged getAnnotationModel
private void process Model Changed I Annotation Model model Annotation Model Event event if model f Projection Annotation Model if f Projection Summary null f Projection Summary update Summaries new Null Progress Monitor process Catchup Request event else if model get Annotation Model f Projection Summary null f Projection Summary update Summaries new Null Progress Monitor  processModelChanged IAnnotationModel AnnotationModelEvent fProjectionAnnotationModel fProjectionSummary fProjectionSummary updateSummaries NullProgressMonitor processCatchupRequest getAnnotationModel fProjectionSummary fProjectionSummary updateSummaries NullProgressMonitor
Creates a new executor in order to free the given slave document param slave Document the slave document to free public Replace Visible Document Executor I Document slave Document f Slave Document slave Document  slaveDocument ReplaceVisibleDocumentExecutor IDocument slaveDocument fSlaveDocument slaveDocument
Installs this executor on the given trigger document param execution Trigger the trigger document public void install I Document execution Trigger if execution Trigger null f Slave Document null f Execution Trigger execution Trigger f Execution Trigger add Document Listener this  executionTrigger IDocument executionTrigger executionTrigger fSlaveDocument fExecutionTrigger executionTrigger fExecutionTrigger addDocumentListener
see org eclipse jface text I Document Listener document About To Be Changed org eclipse jface text Document Event public void document About To Be Changed Document Event event  IDocumentListener documentAboutToBeChanged DocumentEvent documentAboutToBeChanged DocumentEvent
see org eclipse jface text I Document Listener document Changed org eclipse jface text Document Event public void document Changed Document Event event f Execution Trigger remove Document Listener this execute Replace Visible Document f Slave Document  IDocumentListener documentChanged DocumentEvent documentChanged DocumentEvent fExecutionTrigger removeDocumentListener executeReplaceVisibleDocument fSlaveDocument
Projection Command Projection Document projection int type int offset int length f Projection projection f Type type f Offset offset f Length length  ProjectionCommand ProjectionDocument fProjection fType fOffset fLength
Projection Command int offset int length f Type INVALIDATE PRESENTATION f Offset offset f Length length  ProjectionCommand fType INVALIDATE_PRESENTATION fOffset fLength
int compute Expected Costs switch f Type case ADD try I Region gaps f Projection compute Unprojected Master Regions f Offset f Length return gaps null 0 gaps length catch Bad Location Exception x break case REMOVE try I Region fragments f Projection compute Projected Master Regions f Offset f Length return fragments null 0 fragments length catch Bad Location Exception x break return 0  computeExpectedCosts fType IRegion fProjection computeUnprojectedMasterRegions fOffset fLength BadLocationException IRegion fProjection computeProjectedMasterRegions fOffset fLength BadLocationException
void add Projection Command command f List add command  ProjectionCommand fList
Iterator iterator return f List iterator  fList
void clear f List clear f Expected Execution Costs 1  fList fExpectedExecutionCosts
boolean passed Redraw Costs Threshold if f Expected Execution Costs 1 compute Expected Execution Costs return f Expected Execution Costs REDRAW COSTS  passedRedrawCostsThreshold fExpectedExecutionCosts computeExpectedExecutionCosts fExpectedExecutionCosts REDRAW_COSTS
boolean passed Invalidation Costs Threshold if f Expected Execution Costs 1 compute Expected Execution Costs return f Expected Execution Costs INVALIDATION COSTS  passedInvalidationCostsThreshold fExpectedExecutionCosts computeExpectedExecutionCosts fExpectedExecutionCosts INVALIDATION_COSTS
private void compute Expected Execution Costs int max costs Math max REDRAW COSTS INVALIDATION COSTS f Expected Execution Costs f List size if f Expected Execution Costs max costs Projection Command command Iterator e f List iterator while e has Next command Projection Command e next f Expected Execution Costs command compute Expected Costs if f Expected Execution Costs max costs break  computeExpectedExecutionCosts max_costs REDRAW_COSTS INVALIDATION_COSTS fExpectedExecutionCosts fList fExpectedExecutionCosts max_costs ProjectionCommand fList hasNext ProjectionCommand fExpectedExecutionCosts computeExpectedCosts fExpectedExecutionCosts max_costs
Creates a new projection source viewer param parent the SWT parent control param ruler the vertical ruler param overview Ruler the overview ruler param shows Annotation Overview code true code if the overview ruler should be shown param styles the SWT style bits public Projection Viewer Composite parent I Vertical Ruler ruler I Overview Ruler overview Ruler boolean shows Annotation Overview int styles super parent ruler overview Ruler shows Annotation Overview styles  overviewRuler showsAnnotationOverview ProjectionViewer IVerticalRuler IOverviewRuler overviewRuler showsAnnotationOverview overviewRuler showsAnnotationOverview
see org eclipse jface text source Source Viewer create Layout protected Layout create Layout return new Ruler Layout 1  SourceViewer createLayout createLayout RulerLayout
Sets the projection summary for this viewer param projection Summary the projection summary public void set Projection Summary Projection Summary projection Summary f Projection Summary projection Summary  projectionSummary setProjectionSummary ProjectionSummary projectionSummary fProjectionSummary projectionSummary
Adds the projection annotation model to the given annotation model param model the model to which the projection annotation model is added private void add Projection Annotation Model I Annotation Model model if model instanceof I Annotation Model Extension I Annotation Model Extension extension I Annotation Model Extension model extension add Annotation Model Projection Support PROJECTION f Projection Annotation Model model add Annotation Model Listener f Annotation Model Listener  addProjectionAnnotationModel IAnnotationModel IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension addAnnotationModel ProjectionSupport fProjectionAnnotationModel addAnnotationModelListener fAnnotationModelListener
Removes the projection annotation model from the given annotation model param model the mode from which the projection annotation model is removed return the removed projection annotation model or code null code if there was none private I Annotation Model remove Projection Annotation Model I Annotation Model model if model instanceof I Annotation Model Extension model remove Annotation Model Listener f Annotation Model Listener I Annotation Model Extension extension I Annotation Model Extension model return extension remove Annotation Model Projection Support PROJECTION return null  IAnnotationModel removeProjectionAnnotationModel IAnnotationModel IAnnotationModelExtension removeAnnotationModelListener fAnnotationModelListener IAnnotationModelExtension IAnnotationModelExtension removeAnnotationModel ProjectionSupport
public void set Document I Document document I Annotation Model annotation Model int model Range Offset int model Range Length boolean was Projection Enabled false synchronized f Lock f Pending Requests clear if f Projection Annotation Model null was Projection Enabled remove Projection Annotation Model get Visual Annotation Model null f Projection Annotation Model null super set Document document annotation Model model Range Offset model Range Length if was Projection Enabled enable Projection  setDocument IDocument IAnnotationModel annotationModel modelRangeOffset modelRangeLength wasProjectionEnabled fLock fPendingRequests fProjectionAnnotationModel wasProjectionEnabled removeProjectionAnnotationModel getVisualAnnotationModel fProjectionAnnotationModel setDocument annotationModel modelRangeOffset modelRangeLength wasProjectionEnabled enableProjection
protected I Annotation Model create Visual Annotation Model I Annotation Model annotation Model I Annotation Model model super create Visual Annotation Model annotation Model f Projection Annotation Model new Projection Annotation Model return model  IAnnotationModel createVisualAnnotationModel IAnnotationModel annotationModel IAnnotationModel createVisualAnnotationModel annotationModel fProjectionAnnotationModel ProjectionAnnotationModel
Returns the projection annotation model return the projection annotation model public Projection Annotation Model get Projection Annotation Model I Annotation Model model get Visual Annotation Model if model instanceof I Annotation Model Extension I Annotation Model Extension extension I Annotation Model Extension model return Projection Annotation Model extension get Annotation Model Projection Support PROJECTION return null  ProjectionAnnotationModel getProjectionAnnotationModel IAnnotationModel getVisualAnnotationModel IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension ProjectionAnnotationModel getAnnotationModel ProjectionSupport
see org eclipse jface text Text Viewer create Slave Document Manager protected I Slave Document Manager create Slave Document Manager return new Projection Document Manager  TextViewer createSlaveDocumentManager ISlaveDocumentManager createSlaveDocumentManager ProjectionDocumentManager
protected boolean update Slave Document I Document slave Document int model Range Offset int model Range Length throws Bad Location Exception if slave Document instanceof Projection Document Projection Document projection Projection Document slave Document int offset model Range Offset int length model Range Length if is Projection Mode mimic original Text Viewer behavior I Document master projection get Master Document int line master get Line Of Offset model Range Offset offset master get Line Offset line length model Range Offset offset model Range Length try f Handle Projection Changes false projection replace Master Document Ranges offset length finally f Handle Projection Changes true return true return false  updateSlaveDocument IDocument slaveDocument modelRangeOffset modelRangeLength BadLocationException slaveDocument ProjectionDocument ProjectionDocument ProjectionDocument slaveDocument modelRangeOffset modelRangeLength isProjectionMode TextViewer IDocument getMasterDocument getLineOfOffset modelRangeOffset getLineOffset modelRangeOffset modelRangeLength fHandleProjectionChanges replaceMasterDocumentRanges fHandleProjectionChanges
Adds a projection annotation listener to this viewer The listener may not be code null code If the listener is already registered this method does not have any effect param listener the listener to add public void add Projection Listener I Projection Listener listener Assert is Not Null listener if f Projection Listeners null f Projection Listeners new Array List if f Projection Listeners contains listener f Projection Listeners add listener  addProjectionListener IProjectionListener isNotNull fProjectionListeners fProjectionListeners ArrayList fProjectionListeners fProjectionListeners
Removes the given listener from this viewer The listener may not be code null code If the listener is not registered with this viewer this method is without effect param listener the listener to remove public void remove Projection Listener I Projection Listener listener Assert is Not Null listener if f Projection Listeners null f Projection Listeners remove listener if f Projection Listeners size 0 f Projection Listeners null  removeProjectionListener IProjectionListener isNotNull fProjectionListeners fProjectionListeners fProjectionListeners fProjectionListeners
Notifies all registered projection listeners that projection mode has been enabled protected void fire Projection Enabled if f Projection Listeners null Iterator e new Array List f Projection Listeners iterator while e has Next I Projection Listener l I Projection Listener e next l projection Enabled  fireProjectionEnabled fProjectionListeners ArrayList fProjectionListeners hasNext IProjectionListener IProjectionListener projectionEnabled
Notifies all registered projection listeners that projection mode has been disabled protected void fire Projection Disabled if f Projection Listeners null Iterator e new Array List f Projection Listeners iterator while e has Next I Projection Listener l I Projection Listener e next l projection Disabled  fireProjectionDisabled fProjectionListeners ArrayList fProjectionListeners hasNext IProjectionListener IProjectionListener projectionDisabled
Returns whether this viewer is in projection mode return code true code if this viewer is in projection mode code false code otherwise public final boolean is Projection Mode return get Projection Annotation Model null  isProjectionMode getProjectionAnnotationModel
Disables the projection mode public final void disable Projection if is Projection Mode remove Projection Annotation Model get Visual Annotation Model f Projection Annotation Model remove All Annotations f Find Replace Document Adapter null fire Projection Disabled  disableProjection isProjectionMode removeProjectionAnnotationModel getVisualAnnotationModel fProjectionAnnotationModel removeAllAnnotations fFindReplaceDocumentAdapter fireProjectionDisabled
Enables the projection mode public final void enable Projection if is Projection Mode add Projection Annotation Model get Visual Annotation Model f Find Replace Document Adapter null fire Projection Enabled  enableProjection isProjectionMode addProjectionAnnotationModel getVisualAnnotationModel fFindReplaceDocumentAdapter fireProjectionEnabled
private void expand All int offset 0 I Document doc get Document int length doc null 0 doc get Length if is Projection Mode f Projection Annotation Model expand All offset length  expandAll IDocument getDocument getLength isProjectionMode fProjectionAnnotationModel expandAll
private void expand if is Projection Mode Position found null Annotation best Match null Point selection get Selected Range for Iterator e f Projection Annotation Model get Annotation Iterator e has Next Projection Annotation annotation Projection Annotation e next if annotation is Collapsed Position position f Projection Annotation Model get Position annotation take the first most fine grained match if position null touches selection position if found null position includes found offset position includes found offset found length found position best Match annotation if best Match null f Projection Annotation Model expand best Match  isProjectionMode bestMatch getSelectedRange fProjectionAnnotationModel getAnnotationIterator hasNext ProjectionAnnotation ProjectionAnnotation isCollapsed fProjectionAnnotationModel getPosition bestMatch bestMatch fProjectionAnnotationModel bestMatch
private boolean touches Point selection Position position return position overlaps With selection x selection y selection y 0 position offset position length selection x selection y  overlapsWith
private void collapse if is Projection Mode Position found null Annotation best Match null Point selection get Selected Range for Iterator e f Projection Annotation Model get Annotation Iterator e has Next Projection Annotation annotation Projection Annotation e next if annotation is Collapsed Position position f Projection Annotation Model get Position annotation take the first most fine grained match if position null touches selection position if found null found includes position offset found includes position offset position length found position best Match annotation if best Match null f Projection Annotation Model collapse best Match  isProjectionMode bestMatch getSelectedRange fProjectionAnnotationModel getAnnotationIterator hasNext ProjectionAnnotation ProjectionAnnotation isCollapsed fProjectionAnnotationModel getPosition bestMatch bestMatch fProjectionAnnotationModel bestMatch
Adds the given master range to the given projection document While the modification is processed the viewer no longer handles projection changes as it is causing them param projection the projection document param offset the offset in the master document param length the length in the master document throws Bad Location Exception in case the specified range is invalid see Projection Document add Master Document Range int int private void add Master Document Range Projection Document projection int offset int length throws Bad Location Exception if f Command Queue null f Command Queue add new Projection Command projection Projection Command ADD offset length else try f Handle Projection Changes false projection add Master Document Range offset length finally f Handle Projection Changes true  BadLocationException ProjectionDocument addMasterDocumentRange addMasterDocumentRange ProjectionDocument BadLocationException fCommandQueue fCommandQueue ProjectionCommand ProjectionCommand fHandleProjectionChanges addMasterDocumentRange fHandleProjectionChanges
Removes the given master range from the given projection document While the modification is processed the viewer no longer handles projection changes as it is causing them param projection the projection document param offset the offset in the master document param length the length in the master document throws Bad Location Exception in case the specified range is invalid see Projection Document remove Master Document Range int int private void remove Master Document Range Projection Document projection int offset int length throws Bad Location Exception if f Command Queue null f Command Queue add new Projection Command projection Projection Command REMOVE offset length else try f Handle Projection Changes false projection remove Master Document Range offset length finally f Handle Projection Changes true  BadLocationException ProjectionDocument removeMasterDocumentRange removeMasterDocumentRange ProjectionDocument BadLocationException fCommandQueue fCommandQueue ProjectionCommand ProjectionCommand fHandleProjectionChanges removeMasterDocumentRange fHandleProjectionChanges
public void set Visible Region int start int length if is Segmented f Was Projection Enabled is Projection Mode disable Projection super set Visible Region start length  setVisibleRegion isSegmented fWasProjectionEnabled isProjectionMode disableProjection setVisibleRegion
protected void set Visible Document I Document document if is Projection Mode super set Visible Document document return In projection mode we don t want to throw away the find replace document adapter Find Replace Document Adapter adapter f Find Replace Document Adapter super set Visible Document document f Find Replace Document Adapter adapter  setVisibleDocument IDocument isProjectionMode setVisibleDocument FindReplaceDocumentAdapter fFindReplaceDocumentAdapter setVisibleDocument fFindReplaceDocumentAdapter
public void reset Visible Region super reset Visible Region if f Was Projection Enabled enable Projection  resetVisibleRegion resetVisibleRegion fWasProjectionEnabled enableProjection
public I Region get Visible Region disable Projection I Region visible Region get Model Coverage if visible Region null visible Region new Region 0 0 return visible Region  IRegion getVisibleRegion disableProjection IRegion visibleRegion getModelCoverage visibleRegion visibleRegion visibleRegion
public boolean overlaps With Visible Region int offset int length disable Projection I Region coverage get Model Coverage if coverage null return false boolean appending offset coverage get Offset coverage get Length length 0 return appending Text Utilities overlaps coverage new Region offset length  overlapsWithVisibleRegion disableProjection IRegion getModelCoverage getOffset getLength TextUtilities
Replace the visible document with the given document Maintains the scroll offset and the selection param slave the visible document private void replace Visible Document I Document slave if f Replace Visible Document Execution Trigger null Replace Visible Document Executor executor new Replace Visible Document Executor slave executor install f Replace Visible Document Execution Trigger else execute Replace Visible Document slave  replaceVisibleDocument IDocument fReplaceVisibleDocumentExecutionTrigger ReplaceVisibleDocumentExecutor ReplaceVisibleDocumentExecutor fReplaceVisibleDocumentExecutionTrigger executeReplaceVisibleDocument
private void execute Replace Visible Document I Document visible Document Styled Text text Widget get Text Widget try if text Widget null text Widget is Disposed text Widget set Redraw false int top Index get Top Index Point selection get Selected Range set Visible Document visible Document set Selected Range selection x selection y set Top Index top Index finally if text Widget null text Widget is Disposed text Widget set Redraw true  executeReplaceVisibleDocument IDocument visibleDocument StyledText textWidget getTextWidget textWidget textWidget isDisposed textWidget setRedraw topIndex getTopIndex getSelectedRange setVisibleDocument visibleDocument setSelectedRange setTopIndex topIndex textWidget textWidget isDisposed textWidget setRedraw
Hides the given range by collapsing it If requested a redraw request is issued param offset the offset of the range to hide param length the length of the range to hide param fire Redraw code true code if a redraw request should be issued code false code otherwise throws Bad Location Exception in case the range is invalid private void collapse int offset int length boolean fire Redraw throws Bad Location Exception Projection Document projection null I Document visible Document get Visible Document if visible Document instanceof Projection Document projection Projection Document visible Document else I Document master get Document I Document slave create Slave Document get Document if slave instanceof Projection Document projection Projection Document slave add Master Document Range projection 0 master get Length replace Visible Document projection if projection null remove Master Document Range projection offset length if projection null fire Redraw repaint line above I Document document get Document int line document get Line Of Offset offset if line 0 I Region info document get Line Information line 1 internal Invalidate Text Presentation info get Offset info get Length  fireRedraw BadLocationException fireRedraw BadLocationException ProjectionDocument IDocument visibleDocument getVisibleDocument visibleDocument ProjectionDocument ProjectionDocument visibleDocument IDocument getDocument IDocument createSlaveDocument getDocument ProjectionDocument ProjectionDocument addMasterDocumentRange getLength replaceVisibleDocument removeMasterDocumentRange fireRedraw IDocument getDocument getLineOfOffset IRegion getLineInformation internalInvalidateTextPresentation getOffset getLength
Makes the given range visible again while keeping the given collapsed ranges If requested a redraw request is issued param expanded the range to be expanded param collapsed a sequence of collapsed ranges completely contained by the expanded range param fire Redraw code true code if a redraw request should be issued code false code otherwise throws Bad Location Exception in case the range is invalid private void expand Position expanded Position collapsed boolean fire Redraw throws Bad Location Exception I Document slave get Visible Document if slave instanceof Projection Document Projection Document projection Projection Document slave expand add Master Document Range projection expanded get Offset expanded get Length collapse contained regions if collapsed null for int i 0 i collapsed length i I Region p compute Collapsed Region collapsed i remove Master Document Range projection p get Offset p get Length  fireRedraw BadLocationException fireRedraw BadLocationException IDocument getVisibleDocument ProjectionDocument ProjectionDocument ProjectionDocument addMasterDocumentRange getOffset getLength IRegion computeCollapsedRegion removeMasterDocumentRange getOffset getLength
Processes the request for catch up with the annotation model in the UI thread If the current thread is not the UI thread or there are pending catch up requests a new request is posted param event the annotation model event protected final void process Catchup Request Annotation Model Event event if Display get Current null boolean run false synchronized f Lock run f Pending Requests is Empty if run try catchup With Projection Annotation Model event catch Bad Location Exception x throw new Illegal Argument Exception else post Catchup Request event else post Catchup Request event  processCatchupRequest AnnotationModelEvent getCurrent fLock fPendingRequests isEmpty catchupWithProjectionAnnotationModel BadLocationException IllegalArgumentException postCatchupRequest postCatchupRequest
display async Exec new Runnable public void run try while true Annotation Model Event ame null synchronized f Lock if f Pending Requests size 0 return ame Annotation Model Event f Pending Requests remove 0 catchup With Projection Annotation Model ame catch Bad Location Exception x try catchup With Projection Annotation Model null catch Bad Location Exception x1 throw new Illegal Argument Exception finally synchronized f Lock f Pending Requests clear  asyncExec AnnotationModelEvent fLock fPendingRequests AnnotationModelEvent fPendingRequests catchupWithProjectionAnnotationModel BadLocationException catchupWithProjectionAnnotationModel BadLocationException IllegalArgumentException fLock fPendingRequests
Posts the request for catch up with the annotation model into the UI thread param event the annotation model event protected final void post Catchup Request final Annotation Model Event event synchronized f Lock f Pending Requests add event if f Pending Requests size 1 Styled Text widget get Text Widget if widget null Display display widget get Display if display null display async Exec new Runnable public void run try while true Annotation Model Event ame null synchronized f Lock if f Pending Requests size 0 return ame Annotation Model Event f Pending Requests remove 0 catchup With Projection Annotation Model ame catch Bad Location Exception x try catchup With Projection Annotation Model null catch Bad Location Exception x1 throw new Illegal Argument Exception finally synchronized f Lock f Pending Requests clear  postCatchupRequest AnnotationModelEvent fLock fPendingRequests fPendingRequests StyledText getTextWidget getDisplay asyncExec AnnotationModelEvent fLock fPendingRequests AnnotationModelEvent fPendingRequests catchupWithProjectionAnnotationModel BadLocationException catchupWithProjectionAnnotationModel BadLocationException IllegalArgumentException fLock fPendingRequests
Adapts the slave visual document of this viewer to the changes described in the annotation model event When the event is code null code this is identical to a world change event param event the annotation model event or code null code exception Bad Location Exception in case the annotation model event is no longer in synchronization with the document private void catchup With Projection Annotation Model Annotation Model Event event throws Bad Location Exception if event null f Pending Annotation World Change false reinitialize Projection else if event is World Change if event is Valid f Pending Annotation World Change false reinitialize Projection else f Pending Annotation World Change true else if f Pending Annotation World Change if event is Valid f Pending Annotation World Change false reinitialize Projection else Annotation added Annotations event get Added Annotations Annotation changed Annotation event get Changed Annotations Annotation removed Annotations event get Removed Annotations f Command Queue new Projection Command Queue int top Index get Top Index process Deletions event removed Annotations true List coverage new Array List process Changes added Annotations true coverage process Changes changed Annotation true coverage Projection Command Queue command Queue f Command Queue f Command Queue null if command Queue passed Redraw Costs Threshold set Redraw false try try execute Projection Commands command Queue false catch Illegal Argument Exception x reinitialize Projection finally set Redraw true top Index else Point selection get Selected Range Styled Text text Widget get Text Widget try if text Widget null text Widget is Disposed text Widget set Redraw false boolean fire Redraw command Queue passed Invalidation Costs Threshold try boolean visible Document Replaced execute Projection Commands command Queue fire Redraw if visible Document Replaced fire Redraw invalidate Text Presentation catch Illegal Argument Exception x reinitialize Projection finally if selection x 1 selection y 1 set Selected Range selection x selection y if text Widget null text Widget is Disposed if top Index 1 set Top Index top Index text Widget set Redraw true  BadLocationException catchupWithProjectionAnnotationModel AnnotationModelEvent BadLocationException fPendingAnnotationWorldChange reinitializeProjection isWorldChange isValid fPendingAnnotationWorldChange reinitializeProjection fPendingAnnotationWorldChange fPendingAnnotationWorldChange isValid fPendingAnnotationWorldChange reinitializeProjection addedAnnotations getAddedAnnotations changedAnnotation getChangedAnnotations removedAnnotations getRemovedAnnotations fCommandQueue ProjectionCommandQueue topIndex getTopIndex processDeletions removedAnnotations ArrayList processChanges addedAnnotations processChanges changedAnnotation ProjectionCommandQueue commandQueue fCommandQueue fCommandQueue commandQueue passedRedrawCostsThreshold setRedraw executeProjectionCommands commandQueue IllegalArgumentException reinitializeProjection setRedraw topIndex getSelectedRange StyledText textWidget getTextWidget textWidget textWidget isDisposed textWidget setRedraw fireRedraw commandQueue passedInvalidationCostsThreshold visibleDocumentReplaced executeProjectionCommands commandQueue fireRedraw visibleDocumentReplaced fireRedraw invalidateTextPresentation IllegalArgumentException reinitializeProjection setSelectedRange textWidget textWidget isDisposed topIndex setTopIndex topIndex textWidget setRedraw
private boolean execute Projection Commands Projection Command Queue command Queue boolean fire Redraw throws Bad Location Exception Projection Command command Iterator e command Queue iterator while e has Next command Projection Command e next switch command f Type case Projection Command ADD add Master Document Range command f Projection command f Offset command f Length break case Projection Command REMOVE remove Master Document Range command f Projection command f Offset command f Length break case Projection Command INVALIDATE PRESENTATION if fire Redraw invalidate Text Presentation command f Offset command f Length break command Queue clear I Document master get Document I Document slave get Visible Document if slave instanceof Projection Document slave get Length master get Length replace Visible Document master return true return false  executeProjectionCommands ProjectionCommandQueue commandQueue fireRedraw BadLocationException ProjectionCommand commandQueue hasNext ProjectionCommand fType ProjectionCommand addMasterDocumentRange fProjection fOffset fLength ProjectionCommand removeMasterDocumentRange fProjection fOffset fLength ProjectionCommand INVALIDATE_PRESENTATION fireRedraw invalidateTextPresentation fOffset fLength commandQueue IDocument getDocument IDocument getVisibleDocument ProjectionDocument getLength getLength replaceVisibleDocument
private boolean covers Position expanded Position position if expanded equals position position is Deleted return expanded get Offset position get Offset position get Offset position get Length expanded get Offset expanded get Length return false  isDeleted getOffset getOffset getOffset getLength getOffset getLength
private Position compute Collapsed Ranges Position expanded List positions new Array List 5 Iterator e f Projection Annotation Model get Annotation Iterator while e has Next Projection Annotation annotation Projection Annotation e next if annotation is Collapsed Position position f Projection Annotation Model get Position annotation if position null annotation might already be deleted we will be informed later on about this deletion continue if covers expanded position positions add position if positions size 0 Position result new Position positions size positions to Array result return result return null  computeCollapsedRanges ArrayList fProjectionAnnotationModel getAnnotationIterator hasNext ProjectionAnnotation ProjectionAnnotation isCollapsed fProjectionAnnotationModel getPosition toArray
private void internal Invalidate Text Presentation int offset int length if f Command Queue null f Command Queue add new Projection Command offset length else invalidate Text Presentation offset length  internalInvalidateTextPresentation fCommandQueue fCommandQueue ProjectionCommand invalidateTextPresentation
private void process Deletions Annotation Model Event event Annotation removed Annotations boolean fire Redraw throws Bad Location Exception for int i 0 i removed Annotations length i Projection Annotation annotation Projection Annotation removed Annotations i if annotation is Collapsed Position expanded event get Position Of Removed Annotation annotation Position collapsed compute Collapsed Ranges expanded expand expanded collapsed false if fire Redraw internal Invalidate Text Presentation expanded get Offset expanded get Length  processDeletions AnnotationModelEvent removedAnnotations fireRedraw BadLocationException removedAnnotations ProjectionAnnotation ProjectionAnnotation removedAnnotations isCollapsed getPositionOfRemovedAnnotation computeCollapsedRanges fireRedraw internalInvalidateTextPresentation getOffset getLength
Computes the region that must be collapsed when the given position is the position of an expanded projection annotation param position the position return the range that must be collapsed public I Region compute Collapsed Region Position position try I Document document get Document int line document get Line Of Offset position get Offset int offset document get Line Offset line 1 int length position get Length offset position get Offset if length 0 return new Region offset length catch Bad Location Exception x return null  IRegion computeCollapsedRegion IDocument getDocument getLineOfOffset getOffset getLineOffset getLength getOffset BadLocationException
Computes the collapsed region anchor for the given position Assuming that the position is the position of an expanded projection annotation the anchor is the region that is still visible after the projection annotation has been collapsed param position the position return the collapsed region anchor public Position compute Collapsed Region Anchor Position position try I Document document get Document I Region line Info document get Line Information Of Offset position get Offset return new Position line Info get Offset line Info get Length 0 catch Bad Location Exception x return null  computeCollapsedRegionAnchor IDocument getDocument IRegion lineInfo getLineInformationOfOffset getOffset lineInfo getOffset lineInfo getLength BadLocationException
private void process Changes Annotation annotations boolean fire Redraw List coverage throws Bad Location Exception for int i 0 i annotations length i Projection Annotation annotation Projection Annotation annotations i Position position f Projection Annotation Model get Position annotation if position null continue if annotation is Collapsed if covers coverage position coverage add position I Region region compute Collapsed Region position if region null collapse region get Offset region get Length fire Redraw else if covers coverage position Position collapsed compute Collapsed Ranges position expand position collapsed false if fire Redraw internal Invalidate Text Presentation position get Offset position get Length  processChanges fireRedraw BadLocationException ProjectionAnnotation ProjectionAnnotation fProjectionAnnotationModel getPosition isCollapsed IRegion computeCollapsedRegion getOffset getLength fireRedraw computeCollapsedRanges fireRedraw internalInvalidateTextPresentation getOffset getLength
private boolean covers List coverage Position position Iterator e coverage iterator while e has Next Position p Position e next if p get Offset position get Offset position get Offset position get Length p get Offset p get Length return true return false  hasNext getOffset getOffset getOffset getLength getOffset getLength
Forces this viewer to throw away any old state and to initialize its content from its projection annotation model throws Bad Location Exception in case something goes wrong during initialization public final void reinitialize Projection throws Bad Location Exception Projection Document projection null I Slave Document Manager manager get Slave Document Manager if manager null I Document master get Document if master null I Document slave manager create Slave Document master if slave instanceof Projection Document projection Projection Document slave add Master Document Range projection 0 master get Length if projection null Iterator e f Projection Annotation Model get Annotation Iterator while e has Next Projection Annotation annotation Projection Annotation e next if annotation is Collapsed Position position f Projection Annotation Model get Position annotation if position null I Region region compute Collapsed Region position if region null remove Master Document Range projection region get Offset region get Length replace Visible Document projection  BadLocationException reinitializeProjection BadLocationException ProjectionDocument ISlaveDocumentManager getSlaveDocumentManager IDocument getDocument IDocument createSlaveDocument ProjectionDocument ProjectionDocument addMasterDocumentRange getLength fProjectionAnnotationModel getAnnotationIterator hasNext ProjectionAnnotation ProjectionAnnotation isCollapsed fProjectionAnnotationModel getPosition IRegion computeCollapsedRegion removeMasterDocumentRange getOffset getLength replaceVisibleDocument
protected void handle Verify Event Verify Event e I Region model Range event2 Model Range e if expose Model Range model Range e doit false else super handle Verify Event e  handleVerifyEvent VerifyEvent IRegion modelRange event2ModelRange exposeModelRange modelRange handleVerifyEvent
Adds the give column as last column to this viewer s vertical ruler param column the column to be added public void add Vertical Ruler Column I Vertical Ruler Column column I Vertical Ruler ruler get Vertical Ruler if ruler instanceof Composite Ruler Composite Ruler composite Ruler Composite Ruler ruler composite Ruler add Decorator 99 column  addVerticalRulerColumn IVerticalRulerColumn IVerticalRuler getVerticalRuler CompositeRuler CompositeRuler compositeRuler CompositeRuler compositeRuler addDecorator
Removes the give column from this viewer s vertical ruler param column the column to be removed public void remove Vertical Ruler Column I Vertical Ruler Column column I Vertical Ruler ruler get Vertical Ruler if ruler instanceof Composite Ruler Composite Ruler composite Ruler Composite Ruler ruler composite Ruler remove Decorator column  removeVerticalRulerColumn IVerticalRulerColumn IVerticalRuler getVerticalRuler CompositeRuler CompositeRuler compositeRuler CompositeRuler compositeRuler removeDecorator
public boolean expose Model Range I Region model Range if is Projection Mode return f Projection Annotation Model expand All model Range get Offset model Range get Length if overlaps With Visible Region model Range get Offset model Range get Length reset Visible Region return true return false  exposeModelRange IRegion modelRange isProjectionMode fProjectionAnnotationModel expandAll modelRange getOffset modelRange getLength overlapsWithVisibleRegion modelRange getOffset modelRange getLength resetVisibleRegion
public void set Range Indication int offset int length boolean move Cursor List expand new Array List 2 if move Cursor expand the immediate effected collapsed regions Iterator iterator f Projection Annotation Model get Annotation Iterator while iterator has Next Projection Annotation annotation Projection Annotation iterator next if annotation is Collapsed will Auto Expand f Projection Annotation Model get Position annotation offset length expand add annotation if expand is Empty Iterator e expand iterator while e has Next f Projection Annotation Model expand Annotation e next super set Range Indication offset length move Cursor  setRangeIndication moveCursor ArrayList moveCursor fProjectionAnnotationModel getAnnotationIterator hasNext ProjectionAnnotation ProjectionAnnotation isCollapsed willAutoExpand fProjectionAnnotationModel getPosition isEmpty hasNext fProjectionAnnotationModel setRangeIndication moveCursor
private boolean will Auto Expand Position position int offset int length if position null position is Deleted return false right or left boundary if position get Offset offset position get Offset position get Length offset length return true completely embedded in given position if position get Offset offset offset length position get Offset position get Length return true return false  willAutoExpand isDeleted getOffset getOffset getLength getOffset getOffset getLength
since 3 0 protected void handle Dispose f Was Projection Enabled false super handle Dispose  handleDispose fWasProjectionEnabled handleDispose
protected void handle Visible Document Changed Document Event event if f Handle Projection Changes event instanceof Projection Document Event is Projection Mode Projection Document Event e Projection Document Event event Document Event master e get Master Event if master null f Replace Visible Document Execution Trigger master get Document try int replace Length e get Text null 0 e get Text length if Projection Document Event PROJECTION CHANGE e get Change Type if e get Length 0 replace Length 0 f Projection Annotation Model expand All e get Master Offset e get Master Length else if master null replace Length 0 try int number Of Lines e get Document get Number Of Lines e get Offset replace Length if number Of Lines 1 f Projection Annotation Model expand All master get Offset master get Length catch Bad Location Exception x finally f Replace Visible Document Execution Trigger null  handleVisibleDocumentChanged DocumentEvent fHandleProjectionChanges ProjectionDocumentEvent isProjectionMode ProjectionDocumentEvent ProjectionDocumentEvent DocumentEvent getMasterEvent fReplaceVisibleDocumentExecutionTrigger getDocument replaceLength getText getText ProjectionDocumentEvent PROJECTION_CHANGE getChangeType getLength replaceLength fProjectionAnnotationModel expandAll getMasterOffset getMasterLength replaceLength numberOfLines getDocument getNumberOfLines getOffset replaceLength numberOfLines fProjectionAnnotationModel expandAll getOffset getLength BadLocationException fReplaceVisibleDocumentExecutionTrigger
public I Region get Covered Model Ranges I Region model Range if f Information Mapping null return new I Region new Region model Range get Offset model Range get Length if f Information Mapping instanceof I Document Information Mapping Extension I Document Information Mapping Extension extension I Document Information Mapping Extension f Information Mapping try return extension get Exact Coverage model Range catch Bad Location Exception x return null  IRegion getCoveredModelRanges IRegion modelRange fInformationMapping IRegion modelRange getOffset modelRange getLength fInformationMapping IDocumentInformationMappingExtension IDocumentInformationMappingExtension IDocumentInformationMappingExtension fInformationMapping getExactCoverage modelRange BadLocationException
public void do Operation int operation switch operation case TOGGLE if can Do Operation TOGGLE if is Projection Mode enable Projection else expand All disable Projection return if is Projection Mode super do Operation operation return Styled Text text Widget get Text Widget if text Widget null return Point selection null switch operation case CUT if redraws selection get Selected Range if selection y 0 copy Marked Region true else copy To Clipboard selection x selection y true text Widget selection text Widget get Selection Range fire Selection Changed selection x selection y break case COPY if redraws selection get Selected Range if selection y 0 copy Marked Region false else copy To Clipboard selection x selection y false text Widget break case DELETE if redraws try selection get Selected Range Point widget Selection text Widget get Selection Range if selection y 0 selection y widget Selection y delete Text else delete Text Range selection x selection y text Widget selection text Widget get Selection Range fire Selection Changed selection x selection y catch Bad Location Exception x ignore break case EXPAND ALL if redraws expand All break case EXPAND if redraws expand break case COLLAPSE if redraws collapse break default super do Operation operation  doOperation canDoOperation isProjectionMode enableProjection expandAll disableProjection isProjectionMode doOperation StyledText textWidget getTextWidget textWidget getSelectedRange copyMarkedRegion copyToClipboard textWidget textWidget getSelectionRange fireSelectionChanged getSelectedRange copyMarkedRegion copyToClipboard textWidget getSelectedRange widgetSelection textWidget getSelectionRange widgetSelection deleteText deleteTextRange textWidget textWidget getSelectionRange fireSelectionChanged BadLocationException EXPAND_ALL expandAll doOperation
public boolean can Do Operation int operation switch operation case COLLAPSE case EXPAND case EXPAND ALL return is Projection Mode case TOGGLE return is Segmented return super can Do Operation operation  canDoOperation EXPAND_ALL isProjectionMode isSegmented canDoOperation
private boolean is Segmented I Document document get Document int length document null 0 document get Length I Region visible get Model Coverage boolean is Segmented visible null visible equals new Region 0 length return is Segmented  isSegmented IDocument getDocument getLength IRegion getModelCoverage isSegmented isSegmented
private I Region get Marked Region if get Text Widget null return null if f Mark Position null f Mark Position is Deleted return null int start f Mark Position get Offset int end get Selected Range x return start end new Region end start end new Region start end start  IRegion getMarkedRegion getTextWidget fMarkPosition fMarkPosition isDeleted fMarkPosition getOffset getSelectedRange
protected void copy Marked Region boolean delete I Region marked Region get Marked Region if marked Region null copy To Clipboard marked Region get Offset marked Region get Length delete get Text Widget  copyMarkedRegion IRegion markedRegion getMarkedRegion markedRegion copyToClipboard markedRegion getOffset markedRegion getLength getTextWidget
private void copy To Clipboard int offset int length boolean delete Styled Text text Widget I Document document get Document Clipboard clipboard new Clipboard text Widget get Display try Transfer data Types new Transfer Text Transfer get Instance Object data new Object document get offset length try clipboard set Contents data data Types catch SWT Error e if e code DND ERROR CANNOT SET CLIPBOARD throw e TODO see https bugs eclipse org bugs show bug cgi id 59459 we should either log and or inform the user silently fail for now return if delete delete Text Range offset length text Widget catch Bad Location Exception x finally clipboard dispose  copyToClipboard StyledText textWidget IDocument getDocument textWidget getDisplay dataTypes TextTransfer getInstance setContents dataTypes SWTError ERROR_CANNOT_SET_CLIPBOARD show_bug deleteTextRange textWidget BadLocationException
private void delete Text Range int offset int length Styled Text text Widget throws Bad Location Exception get Document replace offset length null int widget Caret model Offset2 Widget Offset offset if widget Caret 1 text Widget set Selection widget Caret  deleteTextRange StyledText textWidget BadLocationException getDocument widgetCaret modelOffset2WidgetOffset widgetCaret textWidget setSelection widgetCaret
Adapts the behavior of the super class to respect line based folding param widget Selection the widget selection return the model selection while respecting line based folding protected Point widget Selection2 Model Selection Point widget Selection if is Projection Mode return super widget Selection2 Model Selection widget Selection I Region model Selection widget Range2 Model Range new Region widget Selection x widget Selection y if model Selection null return null int model Offset model Selection get Offset int model Length model Selection get Length if get Visible Document get Length 0 model Length 0 int widget Selection Exclusive End widget Selection x widget Selection y int model Exclusive End widget Offset2 Model Offset widget Selection Exclusive End if model Offset model Length model Exclusive End return new Point model Offset model Exclusive End model Offset if widget Selection Exclusive End get Visible Document get Length widget Selection Exclusive End 0 return new Point model Offset get Document get Length model Offset return new Point model Offset model Length  widgetSelection widgetSelection2ModelSelection widgetSelection isProjectionMode widgetSelection2ModelSelection widgetSelection IRegion modelSelection widgetRange2ModelRange widgetSelection widgetSelection modelSelection modelOffset modelSelection getOffset modelLength modelSelection getLength getVisibleDocument getLength modelLength widgetSelectionExclusiveEnd widgetSelection widgetSelection modelExclusiveEnd widgetOffset2ModelOffset widgetSelectionExclusiveEnd modelOffset modelLength modelExclusiveEnd modelOffset modelExclusiveEnd modelOffset widgetSelectionExclusiveEnd getVisibleDocument getLength widgetSelectionExclusiveEnd modelOffset getDocument getLength modelOffset modelOffset modelLength
protected Find Replace Document Adapter get Find Replace Document Adapter if f Find Replace Document Adapter null I Document document is Projection Mode get Document get Visible Document f Find Replace Document Adapter new Find Replace Document Adapter document return f Find Replace Document Adapter  FindReplaceDocumentAdapter getFindReplaceDocumentAdapter fFindReplaceDocumentAdapter IDocument isProjectionMode getDocument getVisibleDocument fFindReplaceDocumentAdapter FindReplaceDocumentAdapter fFindReplaceDocumentAdapter
protected int find And Select int start Position String find String boolean forward Search boolean case Sensitive boolean whole Word boolean reg Ex Search if is Projection Mode return super find And Select start Position find String forward Search case Sensitive whole Word reg Ex Search Styled Text text Widget get Text Widget if text Widget null return 1 try I Region match Region get Find Replace Document Adapter find start Position find String forward Search case Sensitive whole Word reg Ex Search if match Region null expose Model Range match Region set Selected Range match Region get Offset match Region get Length text Widget show Selection return match Region get Offset catch Bad Location Exception x return 1  findAndSelect startPosition findString forwardSearch caseSensitive wholeWord regExSearch isProjectionMode findAndSelect startPosition findString forwardSearch caseSensitive wholeWord regExSearch StyledText textWidget getTextWidget textWidget IRegion matchRegion getFindReplaceDocumentAdapter startPosition findString forwardSearch caseSensitive wholeWord regExSearch matchRegion exposeModelRange matchRegion setSelectedRange matchRegion getOffset matchRegion getLength textWidget showSelection matchRegion getOffset BadLocationException
protected int find And Select In Range int start Position String find String boolean forward Search boolean case Sensitive boolean whole Word int range Offset int range Length boolean reg Ex Search if is Projection Mode return super find And Select start Position find String forward Search case Sensitive whole Word reg Ex Search Styled Text text Widget get Text Widget if text Widget null return 1 try int model Offset start Position if forward Search start Position 1 start Position range Offset model Offset range Offset else if forward Search start Position 1 start Position range Offset range Length model Offset range Offset range Length I Region match Region get Find Replace Document Adapter find model Offset find String forward Search case Sensitive whole Word reg Ex Search if match Region null int offset match Region get Offset int length match Region get Length if range Offset offset offset length range Offset range Length expose Model Range match Region set Selected Range offset length text Widget show Selection return offset catch Bad Location Exception x return 1  findAndSelectInRange startPosition findString forwardSearch caseSensitive wholeWord rangeOffset rangeLength regExSearch isProjectionMode findAndSelect startPosition findString forwardSearch caseSensitive wholeWord regExSearch StyledText textWidget getTextWidget textWidget modelOffset startPosition forwardSearch startPosition startPosition rangeOffset modelOffset rangeOffset forwardSearch startPosition startPosition rangeOffset rangeLength modelOffset rangeOffset rangeLength IRegion matchRegion getFindReplaceDocumentAdapter modelOffset findString forwardSearch caseSensitive wholeWord regExSearch matchRegion matchRegion getOffset matchRegion getLength rangeOffset rangeOffset rangeLength exposeModelRange matchRegion setSelectedRange textWidget showSelection BadLocationException

Creates a source viewer information control with the given shell as parent and the given font param parent the parent shell param symbolic Font Name the symbolic font name public Source Viewer Information Control Shell parent String symbolic Font Name this parent SWT NO TRIM SWT NONE symbolic Font Name null  symbolicFontName SourceViewerInformationControl symbolicFontName NO_TRIM symbolicFontName
f Text add Key Listener new Key Listener public void key Pressed Key Event e if e character 0x1B ESC f Shell dispose  fText addKeyListener KeyListener keyPressed KeyEvent fShell
public void key Released Key Event e  keyReleased KeyEvent
Creates a source viewer information control with the given shell as parent The given shell styles are applied to the created shell The given styles are applied to the created styled text widget The text widget will be initialized with the given font The status field will contain the given text or be hidden param parent the parent shell param shell Style the additional styles for the shell param style the additional styles for the styled text widget param symbolic Font Name the symbolic font name param status Field Text the text to be used in the optional status field or code null code if the status field should be hidden public Source Viewer Information Control Shell parent int shell Style int style String symbolic Font Name String status Field Text Grid Layout layout Grid Data gd f Shell new Shell parent SWT NO FOCUS SWT ON TOP shell Style Display display f Shell get Display f Shell set Background display get System Color SWT COLOR BLACK Composite composite f Shell layout new Grid Layout 1 false int border shell Style SWT NO TRIM 0 0 BORDER layout margin Height border layout margin Width border composite set Layout layout gd new Grid Data Grid Data FILL HORIZONTAL composite set Layout Data gd if status Field Text null composite new Composite composite SWT NONE layout new Grid Layout 1 false layout margin Height 0 layout margin Width 0 composite set Layout layout gd new Grid Data Grid Data FILL BOTH composite set Layout Data gd composite set Foreground display get System Color SWT COLOR INFO FOREGROUND composite set Background display get System Color SWT COLOR INFO BACKGROUND Source viewer f Viewer new Source Viewer composite null style f Viewer configure new Source Viewer Configuration f Viewer set Editable false f Text f Viewer get Text Widget gd new Grid Data Grid Data BEGINNING Grid Data FILL BOTH f Text set Layout Data gd f Text set Foreground parent get Display get System Color SWT COLOR INFO FOREGROUND f Text set Background parent get Display get System Color SWT COLOR INFO BACKGROUND f Text set Font J Face Resources get Font symbolic Font Name f Text add Key Listener new Key Listener public void key Pressed Key Event e if e character 0x1B ESC f Shell dispose public void key Released Key Event e Status field if status Field Text null Horizontal separator line f Separator new Label composite SWT SEPARATOR SWT HORIZONTAL SWT LINE DOT f Separator set Layout Data new Grid Data Grid Data FILL HORIZONTAL Status field label f Status Field new Label composite SWT RIGHT f Status Field set Text status Field Text Font font f Status Field get Font Font Data font Datas font get Font Data for int i 0 i font Datas length i font Datas i set Height font Datas i get Height 9 10 f Status Text Font new Font f Status Field get Display font Datas f Status Field set Font f Status Text Font Grid Data gd2 new Grid Data Grid Data FILL VERTICAL Grid Data FILL HORIZONTAL Grid Data HORIZONTAL ALIGN BEGINNING Grid Data VERTICAL ALIGN BEGINNING f Status Field set Layout Data gd2 Regarding the color see bug 41128 f Status Field set Foreground display get System Color SWT COLOR WIDGET DARK SHADOW f Status Field set Background display get System Color SWT COLOR INFO BACKGROUND add Dispose Listener this  shellStyle symbolicFontName statusFieldText SourceViewerInformationControl shellStyle symbolicFontName statusFieldText GridLayout GridData fShell NO_FOCUS ON_TOP shellStyle fShell getDisplay fShell setBackground getSystemColor COLOR_BLACK fShell GridLayout shellStyle NO_TRIM marginHeight marginWidth setLayout GridData GridData FILL_HORIZONTAL setLayoutData statusFieldText GridLayout marginHeight marginWidth setLayout GridData GridData FILL_BOTH setLayoutData setForeground getSystemColor COLOR_INFO_FOREGROUND setBackground getSystemColor COLOR_INFO_BACKGROUND fViewer SourceViewer fViewer SourceViewerConfiguration fViewer setEditable fText fViewer getTextWidget GridData GridData GridData FILL_BOTH fText setLayoutData fText setForeground getDisplay getSystemColor COLOR_INFO_FOREGROUND fText setBackground getDisplay getSystemColor COLOR_INFO_BACKGROUND fText setFont JFaceResources getFont symbolicFontName fText addKeyListener KeyListener keyPressed KeyEvent fShell keyReleased KeyEvent statusFieldText fSeparator LINE_DOT fSeparator setLayoutData GridData GridData FILL_HORIZONTAL fStatusField fStatusField setText statusFieldText fStatusField getFont FontData fontDatas getFontData fontDatas fontDatas setHeight fontDatas getHeight fStatusTextFont fStatusField getDisplay fontDatas fStatusField setFont fStatusTextFont GridData GridData GridData FILL_VERTICAL GridData FILL_HORIZONTAL GridData HORIZONTAL_ALIGN_BEGINNING GridData VERTICAL_ALIGN_BEGINNING fStatusField setLayoutData fStatusField setForeground getSystemColor COLOR_WIDGET_DARK_SHADOW fStatusField setBackground getSystemColor COLOR_INFO_BACKGROUND addDisposeListener
see org eclipse jface text I Information Control Extension2 set Input java lang Object param input the input object public void set Input Object input if input instanceof String set Information String input else set Information null  IInformationControlExtension2 setInput setInput setInformation setInformation
public void set Information String content if content null f Viewer set Input null return I Document doc new Document content f Viewer set Input doc  setInformation fViewer setInput IDocument fViewer setInput
see I Information Control set Visible boolean public void set Visible boolean visible f Shell set Visible visible  IInformationControl setVisible setVisible fShell setVisible
public void widget Disposed Dispose Event event if f Status Text Font null f Status Text Font is Disposed f Status Text Font dispose f Status Text Font null f Shell null f Text null  widgetDisposed DisposeEvent fStatusTextFont fStatusTextFont isDisposed fStatusTextFont fStatusTextFont fShell fText
public final void dispose if f Shell null f Shell is Disposed f Shell dispose else widget Disposed null  fShell fShell isDisposed fShell widgetDisposed
public void set Size int width int height if f Status Field null Grid Data gd Grid Data f Viewer get Text Widget get Layout Data Point status Size f Status Field compute Size SWT DEFAULT SWT DEFAULT true Point separator Size f Separator compute Size SWT DEFAULT SWT DEFAULT true gd height Hint height status Size y separator Size y f Shell set Size width height if f Status Field null f Shell pack true  setSize fStatusField GridData GridData fViewer getTextWidget getLayoutData statusSize fStatusField computeSize separatorSize fSeparator computeSize heightHint statusSize separatorSize fShell setSize fStatusField fShell
public void set Location Point location Rectangle trim f Shell compute Trim 0 0 0 0 Point text Location f Text get Location location x trim x text Location x location y trim y text Location y f Shell set Location location  setLocation fShell computeTrim textLocation fText getLocation textLocation textLocation fShell setLocation
see I Information Control set Size Constraints int int public void set Size Constraints int max Width int max Height f Max Width max Width f Max Height max Height  IInformationControl setSizeConstraints setSizeConstraints maxWidth maxHeight fMaxWidth maxWidth fMaxHeight maxHeight
public Point compute Size Hint Point size f Shell compute Size SWT DEFAULT SWT DEFAULT size x Math min size x f Max Width size y Math min size y f Max Height return size  computeSizeHint fShell computeSize fMaxWidth fMaxHeight
see I Information Control add Dispose Listener Dispose Listener public void add Dispose Listener Dispose Listener listener f Shell add Dispose Listener listener  IInformationControl addDisposeListener DisposeListener addDisposeListener DisposeListener fShell addDisposeListener
see I Information Control remove Dispose Listener Dispose Listener public void remove Dispose Listener Dispose Listener listener f Shell remove Dispose Listener listener  IInformationControl removeDisposeListener DisposeListener removeDisposeListener DisposeListener fShell removeDisposeListener
see I Information Control set Foreground Color Color public void set Foreground Color Color foreground f Text set Foreground foreground  IInformationControl setForegroundColor setForegroundColor fText setForeground
see I Information Control set Background Color Color public void set Background Color Color background f Text set Background background  IInformationControl setBackgroundColor setBackgroundColor fText setBackground
see I Information Control is Focus Control public boolean is Focus Control return f Text is Focus Control  IInformationControl isFocusControl isFocusControl fText isFocusControl
see I Information Control set Focus public void set Focus f Shell force Focus f Text set Focus  IInformationControl setFocus setFocus fShell forceFocus fText setFocus
see I Information Control add Focus Listener Focus Listener public void add Focus Listener Focus Listener listener f Text add Focus Listener listener  IInformationControl addFocusListener FocusListener addFocusListener FocusListener fText addFocusListener
see I Information Control remove Focus Listener Focus Listener public void remove Focus Listener Focus Listener listener f Text remove Focus Listener listener  IInformationControl removeFocusListener FocusListener removeFocusListener FocusListener fText removeFocusListener
see I Information Control Extension has Contents public boolean has Contents return f Text get Char Count 0  IInformationControlExtension hasContents hasContents fText getCharCount

Creates a new ruler layout with the given gap between text viewer and vertical ruler param gap the gap between text viewer and vertical ruler public Ruler Layout int gap f Gap gap  RulerLayout fGap
protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache Control children composite get Children Point s children children length 1 compute Size SWT DEFAULT SWT DEFAULT flush Cache if f Vertical Ruler null f Is Vertical Ruler Visible s x f Vertical Ruler get Width f Gap return s  computeSize wHint hHint flushCache getChildren computeSize flushCache fVerticalRuler fIsVerticalRulerVisible fVerticalRuler getWidth fGap
protected void layout Composite composite boolean flush Cache Rectangle cl Area composite get Client Area if f Vertical Ruler null f Is Vertical Ruler Visible Rectangle trim get Text Widget compute Trim 0 0 0 0 int scrollbar Height trim height int vertical Ruler Width f Vertical Ruler get Width int overview Ruler Width 0 if f Overview Ruler null f Is Overview Ruler Visible overview Ruler Width f Overview Ruler get Width f Overview Ruler get Control set Bounds cl Area width overview Ruler Width 1 scrollbar Height overview Ruler Width cl Area height 3 scrollbar Height f Overview Ruler get Header Control set Bounds cl Area width overview Ruler Width 1 0 overview Ruler Width scrollbar Height get Text Widget set Bounds vertical Ruler Width f Gap 0 cl Area width vertical Ruler Width overview Ruler Width 2 f Gap cl Area height f Vertical Ruler get Control set Bounds 0 0 vertical Ruler Width cl Area height scrollbar Height else get Text Widget set Bounds 0 0 cl Area width cl Area height  flushCache clArea getClientArea fVerticalRuler fIsVerticalRulerVisible getTextWidget computeTrim scrollbarHeight verticalRulerWidth fVerticalRuler getWidth overviewRulerWidth fOverviewRuler fIsOverviewRulerVisible overviewRulerWidth fOverviewRuler getWidth fOverviewRuler getControl setBounds clArea overviewRulerWidth scrollbarHeight overviewRulerWidth clArea scrollbarHeight fOverviewRuler getHeaderControl setBounds clArea overviewRulerWidth overviewRulerWidth scrollbarHeight getTextWidget setBounds verticalRulerWidth fGap clArea verticalRulerWidth overviewRulerWidth fGap clArea fVerticalRuler getControl setBounds verticalRulerWidth clArea scrollbarHeight getTextWidget setBounds clArea clArea
Constructs a new source viewer The vertical ruler is initially visible The viewer has not yet been initialized with a source viewer configuration param parent the parent of the viewer s control param ruler the vertical ruler used by this source viewer param styles the SWT style bits public Source Viewer Composite parent I Vertical Ruler ruler int styles this parent ruler null false styles  SourceViewer IVerticalRuler
Constructs a new source viewer The vertical ruler is initially visible The overview ruler visibility is controlled by the value of code show Annotations Overview code The viewer has not yet been initialized with a source viewer configuration param parent the parent of the viewer s control param vertical Ruler the vertical ruler used by this source viewer param overview Ruler the overview ruler param show Annotations Overview code true code if the overview ruler should be visible code false code otherwise param styles the SWT style bits since 2 1 public Source Viewer Composite parent I Vertical Ruler vertical Ruler I Overview Ruler overview Ruler boolean show Annotations Overview int styles super f Vertical Ruler vertical Ruler f Is Vertical Ruler Visible vertical Ruler null f Overview Ruler overview Ruler f Is Overview Ruler Visible show Annotations Overview overview Ruler null create Control parent styles  showAnnotationsOverview verticalRuler overviewRuler showAnnotationsOverview SourceViewer IVerticalRuler verticalRuler IOverviewRuler overviewRuler showAnnotationsOverview fVerticalRuler verticalRuler fIsVerticalRulerVisible verticalRuler fOverviewRuler overviewRuler fIsOverviewRulerVisible showAnnotationsOverview overviewRuler createControl
protected void create Control Composite parent int styles if f Vertical Ruler null f Overview Ruler null styles styles SWT BORDER f Composite new Canvas parent SWT NONE f Composite set Layout create Layout parent f Composite super create Control parent styles if f Vertical Ruler null f Vertical Ruler create Control f Composite this if f Overview Ruler null f Overview Ruler create Control f Composite this  createControl fVerticalRuler fOverviewRuler fComposite fComposite setLayout createLayout fComposite createControl fVerticalRuler fVerticalRuler createControl fComposite fOverviewRuler fOverviewRuler createControl fComposite
Creates the layout used for this viewer Subclasses may override this method return the layout used for this viewer since 3 0 protected Layout create Layout return new Ruler Layout GAP SIZE  createLayout RulerLayout GAP_SIZE
public Control get Control if f Composite null return f Composite return super get Control  getControl fComposite fComposite getControl
see I Source Viewer set Annotation Hover I Annotation Hover public void set Annotation Hover I Annotation Hover annotation Hover f Annotation Hover annotation Hover  ISourceViewer setAnnotationHover IAnnotationHover setAnnotationHover IAnnotationHover annotationHover fAnnotationHover annotationHover
Sets the overview ruler s annotation hover of this source viewer The annotation hover provides the information to be displayed in a hover popup window if requested over the overview rulers area The annotation hover is assumed to be line oriented param annotation Hover the hover to be used code null code is a valid argument since 3 0 public void set Overview Ruler Annotation Hover I Annotation Hover annotation Hover f Overview Ruler Annotation Hover annotation Hover  annotationHover setOverviewRulerAnnotationHover IAnnotationHover annotationHover fOverviewRulerAnnotationHover annotationHover
public void configure Source Viewer Configuration configuration if get Text Widget null return set Document Partitioning configuration get Configured Document Partitioning this install content type independent plug ins f Presentation Reconciler configuration get Presentation Reconciler this if f Presentation Reconciler null f Presentation Reconciler install this f Reconciler configuration get Reconciler this if f Reconciler null f Reconciler install this f Content Assistant configuration get Content Assistant this if f Content Assistant null f Content Assistant install this f Content Assistant Installed true f Content Formatter configuration get Content Formatter this f Information Presenter configuration get Information Presenter this if f Information Presenter null f Information Presenter install this set Undo Manager configuration get Undo Manager this get Text Widget set Tabs configuration get Tab Width this set Annotation Hover configuration get Annotation Hover this set Overview Ruler Annotation Hover configuration get Overview Ruler Annotation Hover this set Hover Control Creator configuration get Information Control Creator this install content type specific plug ins String types configuration get Configured Content Types this for int i 0 i types length i String t types i set Auto Indent Strategy configuration get Auto Indent Strategy this t t set Text Double Click Strategy configuration get Double Click Strategy this t t int state Masks configuration get Configured Text Hover State Masks this t if state Masks null for int j 0 j state Masks length j int state Mask state Masks j set Text Hover configuration get Text Hover this t state Mask t state Mask else set Text Hover configuration get Text Hover this t t I Text Viewer Extension2 DEFAULT HOVER STATE MASK String prefixes configuration get Indent Prefixes this t if prefixes null prefixes length 0 set Indent Prefixes prefixes t prefixes configuration get Default Prefixes this t if prefixes null prefixes length 0 set Default Prefixes prefixes t activate Plugins  SourceViewerConfiguration getTextWidget setDocumentPartitioning getConfiguredDocumentPartitioning fPresentationReconciler getPresentationReconciler fPresentationReconciler fPresentationReconciler fReconciler getReconciler fReconciler fReconciler fContentAssistant getContentAssistant fContentAssistant fContentAssistant fContentAssistantInstalled fContentFormatter getContentFormatter fInformationPresenter getInformationPresenter fInformationPresenter fInformationPresenter setUndoManager getUndoManager getTextWidget setTabs getTabWidth setAnnotationHover getAnnotationHover setOverviewRulerAnnotationHover getOverviewRulerAnnotationHover setHoverControlCreator getInformationControlCreator getConfiguredContentTypes setAutoIndentStrategy getAutoIndentStrategy setTextDoubleClickStrategy getDoubleClickStrategy stateMasks getConfiguredTextHoverStateMasks stateMasks stateMasks stateMask stateMasks setTextHover getTextHover stateMask stateMask setTextHover getTextHover ITextViewerExtension2 DEFAULT_HOVER_STATE_MASK getIndentPrefixes setIndentPrefixes getDefaultPrefixes setDefaultPrefixes activatePlugins
After this method has been executed the caller knows that any installed annotation hover has been installed protected void ensure Annotation Hover Manager Installed if f Vertical Ruler null f Annotation Hover null f Vertical Ruler Hovering Controller null f Hover Control Creator null f Vertical Ruler Hovering Controller new Annotation Bar Hover Manager f Vertical Ruler this f Annotation Hover f Hover Control Creator f Vertical Ruler Hovering Controller install f Vertical Ruler get Control  ensureAnnotationHoverManagerInstalled fVerticalRuler fAnnotationHover fVerticalRulerHoveringController fHoverControlCreator fVerticalRulerHoveringController AnnotationBarHoverManager fVerticalRuler fAnnotationHover fHoverControlCreator fVerticalRulerHoveringController fVerticalRuler getControl
After this method has been executed the caller knows that any installed overview hover has been installed protected void ensure Overview Hover Manager Installed if f Overview Ruler null f Overview Ruler Annotation Hover null f Overview Ruler Hovering Controller null f Hover Control Creator null f Overview Ruler Hovering Controller new Overview Ruler Hover Manager f Overview Ruler this f Overview Ruler Annotation Hover f Hover Control Creator f Overview Ruler Hovering Controller install f Overview Ruler get Control  ensureOverviewHoverManagerInstalled fOverviewRuler fOverviewRulerAnnotationHover fOverviewRulerHoveringController fHoverControlCreator fOverviewRulerHoveringController OverviewRulerHoverManager fOverviewRuler fOverviewRulerAnnotationHover fHoverControlCreator fOverviewRulerHoveringController fOverviewRuler getControl
public void activate Plugins ensure Annotation Hover Manager Installed ensure Overview Hover Manager Installed super activate Plugins  activatePlugins ensureAnnotationHoverManagerInstalled ensureOverviewHoverManagerInstalled activatePlugins
see I Source Viewer set Document I Document I Annotation Model public void set Document I Document document set Document document null 1 1  ISourceViewer setDocument IDocument IAnnotationModel setDocument IDocument setDocument
see I Source Viewer set Document I Document I Annotation Model int int public void set Document I Document document int visible Region Offset int visible Region Length set Document document null visible Region Offset visible Region Length  ISourceViewer setDocument IDocument IAnnotationModel setDocument IDocument visibleRegionOffset visibleRegionLength setDocument visibleRegionOffset visibleRegionLength
see I Source Viewer set Document I Document I Annotation Model public void set Document I Document document I Annotation Model annotation Model set Document document annotation Model 1 1  ISourceViewer setDocument IDocument IAnnotationModel setDocument IDocument IAnnotationModel annotationModel setDocument annotationModel
Creates the visual annotation model on top of the given annotation model param annotation Model the wrapped annotation model return the visual annotation model on top of the given annotation model since 3 0 protected I Annotation Model create Visual Annotation Model I Annotation Model annotation Model I Annotation Model Extension model new Annotation Model model add Annotation Model MODEL ANNOTATION MODEL annotation Model return I Annotation Model model  annotationModel IAnnotationModel createVisualAnnotationModel IAnnotationModel annotationModel IAnnotationModelExtension AnnotationModel addAnnotationModel MODEL_ANNOTATION_MODEL annotationModel IAnnotationModel
public void set Document I Document document I Annotation Model annotation Model int model Range Offset int model Range Length if f Vertical Ruler null f Overview Ruler null if model Range Offset 1 model Range Length 1 super set Document document else super set Document document model Range Offset model Range Length else if f Visual Annotation Model null get Document null f Visual Annotation Model disconnect get Document if annotation Model null document null f Visual Annotation Model create Visual Annotation Model annotation Model f Visual Annotation Model connect document else f Visual Annotation Model null if model Range Offset 1 model Range Length 1 super set Document document else super set Document document model Range Offset model Range Length if f Vertical Ruler null f Vertical Ruler set Model f Visual Annotation Model if f Overview Ruler null f Overview Ruler set Model f Visual Annotation Model  setDocument IDocument IAnnotationModel annotationModel modelRangeOffset modelRangeLength fVerticalRuler fOverviewRuler modelRangeOffset modelRangeLength setDocument setDocument modelRangeOffset modelRangeLength fVisualAnnotationModel getDocument fVisualAnnotationModel getDocument annotationModel fVisualAnnotationModel createVisualAnnotationModel annotationModel fVisualAnnotationModel fVisualAnnotationModel modelRangeOffset modelRangeLength setDocument setDocument modelRangeOffset modelRangeLength fVerticalRuler fVerticalRuler setModel fVisualAnnotationModel fOverviewRuler fOverviewRuler setModel fVisualAnnotationModel
public I Annotation Model get Annotation Model if f Visual Annotation Model instanceof I Annotation Model Extension I Annotation Model Extension extension I Annotation Model Extension f Visual Annotation Model return extension get Annotation Model MODEL ANNOTATION MODEL return null  IAnnotationModel getAnnotationModel fVisualAnnotationModel IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension fVisualAnnotationModel getAnnotationModel MODEL_ANNOTATION_MODEL
since 3 0 public I Annotation Model get Visual Annotation Model return f Visual Annotation Model  IAnnotationModel getVisualAnnotationModel fVisualAnnotationModel
public void unconfigure clear Remembered Selection if f Presentation Reconciler null f Presentation Reconciler uninstall f Presentation Reconciler null if f Reconciler null f Reconciler uninstall f Reconciler null if f Content Assistant null f Content Assistant uninstall f Content Assistant Installed false f Content Assistant null f Content Formatter null if f Information Presenter null f Information Presenter uninstall f Information Presenter null f Auto Indent Strategies null f Double Click Strategies null f Text Hovers null f Indent Chars null f Default Prefix Chars null if f Vertical Ruler Hovering Controller null f Vertical Ruler Hovering Controller dispose f Vertical Ruler Hovering Controller null if f Overview Ruler Hovering Controller null f Overview Ruler Hovering Controller dispose f Overview Ruler Hovering Controller null  clearRememberedSelection fPresentationReconciler fPresentationReconciler fPresentationReconciler fReconciler fReconciler fReconciler fContentAssistant fContentAssistant fContentAssistantInstalled fContentAssistant fContentFormatter fInformationPresenter fInformationPresenter fInformationPresenter fAutoIndentStrategies fDoubleClickStrategies fTextHovers fIndentChars fDefaultPrefixChars fVerticalRulerHoveringController fVerticalRulerHoveringController fVerticalRulerHoveringController fOverviewRulerHoveringController fOverviewRulerHoveringController fOverviewRulerHoveringController
protected void handle Dispose unconfigure if f Visual Annotation Model null get Document null f Visual Annotation Model disconnect get Document f Visual Annotation Model null f Vertical Ruler null f Overview Ruler null http dev eclipse org bugs show bug cgi id 15300 f Composite null super handle Dispose  handleDispose fVisualAnnotationModel getDocument fVisualAnnotationModel getDocument fVisualAnnotationModel fVerticalRuler fOverviewRuler show_bug fComposite handleDispose
public boolean can Do Operation int operation if get Text Widget null redraws operation FORMAT return false if operation CONTENTASSIST PROPOSALS return f Content Assistant null f Content Assistant Installed is Editable if operation CONTENTASSIST CONTEXT INFORMATION return f Content Assistant null f Content Assistant Installed is Editable if operation INFORMATION return f Information Presenter null if operation FORMAT return f Content Formatter null is Editable return super can Do Operation operation  canDoOperation getTextWidget CONTENTASSIST_PROPOSALS fContentAssistant fContentAssistantInstalled isEditable CONTENTASSIST_CONTEXT_INFORMATION fContentAssistant fContentAssistantInstalled isEditable fInformationPresenter fContentFormatter isEditable canDoOperation
Creates a new formatting context for a format operation p After the use of the context clients are required to call its code dispose code method return The new formatting context since 3 0 protected I Formatting Context create Formatting Context return new Formatting Context  IFormattingContext createFormattingContext FormattingContext
Remembers and returns the current selection The saved selection can be restored by calling code restore Selection code return the current selection see org eclipse jface text I Text Viewer get Selected Range since 3 0 protected Point remember Selection final Point selection get Selected Range final I Document document get Document if f Selections is Empty f Selection Category  SELECTION POSITION CATEGORY hash Code f Selection Updater new Default Position Updater f Selection Category document add Position Category f Selection Category document add Position Updater f Selection Updater try final Position position new Position selection x selection y document add Position f Selection Category position f Selections push position catch Bad Location Exception exception Should not happen catch Bad Position Category Exception exception Should not happen return selection  restoreSelection ITextViewer getSelectedRange rememberSelection getSelectedRange IDocument getDocument fSelections isEmpty fSelectionCategory _SELECTION_POSITION_CATEGORY hashCode fSelectionUpdater DefaultPositionUpdater fSelectionCategory addPositionCategory fSelectionCategory addPositionUpdater fSelectionUpdater addPosition fSelectionCategory fSelections BadLocationException BadPositionCategoryException
Restores a previously saved selection in the document p If no selection was previously saved nothing happens since 3 0 protected void restore Selection if f Selections is Empty final I Document document get Document final Position position Position f Selections pop try document remove Position f Selection Category position set Selected Range position get Offset position get Length if f Selections is Empty document remove Position Updater f Selection Updater f Selection Updater null document remove Position Category f Selection Category f Selection Category null catch Bad Position Category Exception exception Should not happen  restoreSelection fSelections isEmpty IDocument getDocument fSelections removePosition fSelectionCategory setSelectedRange getOffset getLength fSelections isEmpty removePositionUpdater fSelectionUpdater fSelectionUpdater removePositionCategory fSelectionCategory fSelectionCategory BadPositionCategoryException
protected void clear Remembered Selection if f Selections is Empty return f Selections clear I Document document get Document document remove Position Updater f Selection Updater f Selection Updater null try document remove Position Category f Selection Category catch Bad Position Category Exception e ignore f Selection Category null  clearRememberedSelection fSelections isEmpty fSelections IDocument getDocument removePositionUpdater fSelectionUpdater fSelectionUpdater removePositionCategory fSelectionCategory BadPositionCategoryException fSelectionCategory
public void do Operation int operation if get Text Widget null redraws operation FORMAT return switch operation case CONTENTASSIST PROPOSALS f Content Assistant show Possible Completions return case CONTENTASSIST CONTEXT INFORMATION f Content Assistant show Context Information return case INFORMATION f Information Presenter show Information return case FORMAT final Point selection remember Selection final I Rewrite Target target get Rewrite Target I Formatting Context context null try set Redraw false start Sequential Rewrite Mode false target begin Compound Change final I Document document get Document final String remembered Contents document get try if f Content Formatter instanceof I Content Formatter Extension final I Content Formatter Extension extension I Content Formatter Extension f Content Formatter context create Formatting Context if selection y 0 context set Property Formatting Context Properties CONTEXT DOCUMENT Boolean TRUE else context set Property Formatting Context Properties CONTEXT DOCUMENT Boolean FALSE context set Property Formatting Context Properties CONTEXT REGION new Region selection x selection y extension format document context else I Region r if selection y 0 I Region coverage get Model Coverage r coverage null new Region 0 0 coverage else r new Region selection x selection y f Content Formatter format document r update Slave Documents document catch Runtime Exception x fire wall for https bugs eclipse org bugs show bug cgi id 47472 if something went wrong we undo the changes we just did TODO to be removed after 3 0 M8 document set remembered Contents throw x finally target end Compound Change stop Sequential Rewrite Mode set Redraw true restore Selection if context null context dispose return default super do Operation operation  doOperation getTextWidget CONTENTASSIST_PROPOSALS fContentAssistant showPossibleCompletions CONTENTASSIST_CONTEXT_INFORMATION fContentAssistant showContextInformation fInformationPresenter showInformation rememberSelection IRewriteTarget getRewriteTarget IFormattingContext setRedraw startSequentialRewriteMode beginCompoundChange IDocument getDocument rememberedContents fContentFormatter IContentFormatterExtension IContentFormatterExtension IContentFormatterExtension fContentFormatter createFormattingContext setProperty FormattingContextProperties CONTEXT_DOCUMENT setProperty FormattingContextProperties CONTEXT_DOCUMENT setProperty FormattingContextProperties CONTEXT_REGION IRegion IRegion getModelCoverage fContentFormatter updateSlaveDocuments RuntimeException show_bug rememberedContents endCompoundChange stopSequentialRewriteMode setRedraw restoreSelection doOperation
Updates all slave documents of the given document This default implementation calls code update Slave Document code for their current visible range Subclasses may reimplement param master Document the master document since 3 0 protected void update Slave Documents I Document master Document I Slave Document Manager manager get Slave Document Manager if manager instanceof I Slave Document Manager Extension I Slave Document Manager Extension extension I Slave Document Manager Extension manager I Document slaves extension get Slave Documents master Document if slaves null for int i 0 i slaves length i if slaves i instanceof Child Document Child Document child Child Document slaves i Position p child get Parent Document Range try if update Slave Document child p get Offset p get Length child repair Line Information catch Bad Location Exception e ignore  updateSlaveDocument masterDocument updateSlaveDocuments IDocument masterDocument ISlaveDocumentManager getSlaveDocumentManager ISlaveDocumentManagerExtension ISlaveDocumentManagerExtension ISlaveDocumentManagerExtension IDocument getSlaveDocuments masterDocument ChildDocument ChildDocument ChildDocument getParentDocumentRange updateSlaveDocument getOffset getLength repairLineInformation BadLocationException
public void enable Operation int operation boolean enable switch operation case CONTENTASSIST PROPOSALS case CONTENTASSIST CONTEXT INFORMATION if f Content Assistant null return if enable if f Content Assistant Installed f Content Assistant install this f Content Assistant Installed true else if f Content Assistant Installed f Content Assistant uninstall f Content Assistant Installed false  enableOperation CONTENTASSIST_PROPOSALS CONTENTASSIST_CONTEXT_INFORMATION fContentAssistant fContentAssistantInstalled fContentAssistant fContentAssistantInstalled fContentAssistantInstalled fContentAssistant fContentAssistantInstalled
see I Source Viewer set Range Indicator Annotation public void set Range Indicator Annotation range Indicator f Range Indicator range Indicator  ISourceViewer setRangeIndicator setRangeIndicator rangeIndicator fRangeIndicator rangeIndicator
public void set Range Indication int start int length boolean move Cursor if move Cursor set Selected Range start 0 reveal Range start length if f Range Indicator null f Visual Annotation Model instanceof I Annotation Model Extension I Annotation Model Extension extension I Annotation Model Extension f Visual Annotation Model extension modify Annotation Position f Range Indicator new Position start length  setRangeIndication moveCursor moveCursor setSelectedRange revealRange fRangeIndicator fVisualAnnotationModel IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension fVisualAnnotationModel modifyAnnotationPosition fRangeIndicator
public I Region get Range Indication if f Range Indicator null f Visual Annotation Model null Position position f Visual Annotation Model get Position f Range Indicator if position null return new Region position get Offset position get Length return null  IRegion getRangeIndication fRangeIndicator fVisualAnnotationModel fVisualAnnotationModel getPosition fRangeIndicator getOffset getLength
see I Source Viewer remove Range Indication public void remove Range Indication if f Range Indicator null f Visual Annotation Model null f Visual Annotation Model remove Annotation f Range Indicator  ISourceViewer removeRangeIndication removeRangeIndication fRangeIndicator fVisualAnnotationModel fVisualAnnotationModel removeAnnotation fRangeIndicator
public void show Annotations boolean show boolean old f Is Vertical Ruler Visible f Is Vertical Ruler Visible show f Vertical Ruler null if old f Is Vertical Ruler Visible if f Composite null f Composite is Disposed f Composite layout if f Is Vertical Ruler Visible ensure Annotation Hover Manager Installed else if f Vertical Ruler Hovering Controller null f Vertical Ruler Hovering Controller dispose f Vertical Ruler Hovering Controller null  showAnnotations fIsVerticalRulerVisible fIsVerticalRulerVisible fVerticalRuler fIsVerticalRulerVisible fComposite fComposite isDisposed fComposite fIsVerticalRulerVisible ensureAnnotationHoverManagerInstalled fVerticalRulerHoveringController fVerticalRulerHoveringController fVerticalRulerHoveringController
Returns the vertical ruler of this viewer return the vertical ruler of this viewer since 3 0 protected final I Vertical Ruler get Vertical Ruler return f Vertical Ruler  IVerticalRuler getVerticalRuler fVerticalRuler
public void show Annotations Overview boolean show boolean old f Is Overview Ruler Visible f Is Overview Ruler Visible show f Overview Ruler null if old f Is Overview Ruler Visible if f Composite null f Composite is Disposed f Composite layout if f Is Overview Ruler Visible ensure Overview Hover Manager Installed else if f Overview Ruler Hovering Controller null f Overview Ruler Hovering Controller dispose f Overview Ruler Hovering Controller null  showAnnotationsOverview fIsOverviewRulerVisible fIsOverviewRulerVisible fOverviewRuler fIsOverviewRulerVisible fComposite fComposite isDisposed fComposite fIsOverviewRulerVisible ensureOverviewHoverManagerInstalled fOverviewRulerHoveringController fOverviewRulerHoveringController fOverviewRulerHoveringController

Creates a new source viewer configuration that behaves according to specification of this class methods public Source Viewer Configuration super  SourceViewerConfiguration
Returns the visual width of the tab character This implementation always returns 4 param source Viewer the source viewer to be configured by this configuration return the tab width public int get Tab Width I Source Viewer source Viewer return 4  sourceViewer getTabWidth ISourceViewer sourceViewer
Returns the undo manager for the given source viewer This implementation always returns a new instance of code Default Undo Manager code whose history length is set to 25 param source Viewer the source viewer to be configured by this configuration return an undo manager or code null code if no undo redo should not be supported public I Undo Manager get Undo Manager I Source Viewer source Viewer return new Default Undo Manager 25  DefaultUndoManager sourceViewer IUndoManager getUndoManager ISourceViewer sourceViewer DefaultUndoManager
Returns the reconciler ready to be used with the given source viewer This implementation always returns code null code param source Viewer the source viewer to be configured by this configuration return a reconciler or code null code if reconciling should not be supported public I Reconciler get Reconciler I Source Viewer source Viewer return null  sourceViewer IReconciler getReconciler ISourceViewer sourceViewer
Returns the presentation reconciler ready to be used with the given source viewer This implementation always returns code null code param source Viewer the source viewer return the presentation reconciler or code null code if presentation reconciling should not be supported public I Presentation Reconciler get Presentation Reconciler I Source Viewer source Viewer Presentation Reconciler reconciler new Presentation Reconciler reconciler set Document Partitioning get Configured Document Partitioning source Viewer return reconciler  sourceViewer IPresentationReconciler getPresentationReconciler ISourceViewer sourceViewer PresentationReconciler PresentationReconciler setDocumentPartitioning getConfiguredDocumentPartitioning sourceViewer
Returns the content formatter ready to be used with the given source viewer This implementation always returns code null code param source Viewer the source viewer to be configured by this configuration return a content formatter or code null code if formatting should not be supported public I Content Formatter get Content Formatter I Source Viewer source Viewer return null  sourceViewer IContentFormatter getContentFormatter ISourceViewer sourceViewer
Returns the content assistant ready to be used with the given source viewer This implementation always returns code null code param source Viewer the source viewer to be configured by this configuration return a content assistant or code null code if content assist should not be supported public I Content Assistant get Content Assistant I Source Viewer source Viewer return null  sourceViewer IContentAssistant getContentAssistant ISourceViewer sourceViewer
Returns the auto indentation strategy ready to be used with the given source viewer when manipulating text of the given content type This implementation always returns an new instance of code Default Auto Indent Strategy code param source Viewer the source viewer to be configured by this configuration param content Type the content type for which the strategy is applicable return the auto indent strategy or code null code if automatic indentation is not to be enabled public I Auto Indent Strategy get Auto Indent Strategy I Source Viewer source Viewer String content Type return new Default Auto Indent Strategy  DefaultAutoIndentStrategy sourceViewer contentType IAutoIndentStrategy getAutoIndentStrategy ISourceViewer sourceViewer contentType DefaultAutoIndentStrategy
Returns the default prefixes to be used by the line prefix operation in the given source viewer for text of the given content type This implementation always returns code null code param source Viewer the source viewer to be configured by this configuration param content Type the content type for which the prefix is applicable return the default prefixes or code null code if the prefix operation should not be supported since 2 0 public String get Default Prefixes I Source Viewer source Viewer String content Type return null  sourceViewer contentType getDefaultPrefixes ISourceViewer sourceViewer contentType
Returns the double click strategy ready to be used in this viewer when double clicking onto text of the given content type This implementation always returns a new instance of code Default Text Double Click Strategy code param source Viewer the source viewer to be configured by this configuration param content Type the content type for which the strategy is applicable return a double click strategy or code null code if double clicking should not be supported public I Text Double Click Strategy get Double Click Strategy I Source Viewer source Viewer String content Type return new Default Text Double Click Strategy  DefaultTextDoubleClickStrategy sourceViewer contentType ITextDoubleClickStrategy getDoubleClickStrategy ISourceViewer sourceViewer contentType DefaultTextDoubleClickStrategy
Returns the prefixes to be used by the line shift operation This implementation always returns code new String t code param source Viewer the source viewer to be configured by this configuration param content Type the content type for which the prefix is applicable return the prefixes or code null code if the prefix operation should not be supported public String get Indent Prefixes I Source Viewer source Viewer String content Type return new String t NON NLS 1 NON NLS 2 NON NLS 3  sourceViewer contentType getIndentPrefixes ISourceViewer sourceViewer contentType
Returns the annotation hover which will provide the information to be shown in a hover popup window when requested for the given source viewer This implementation always returns code null code param source Viewer the source viewer to be configured by this configuration return an annotation hover or code null code if no hover support should be installed public I Annotation Hover get Annotation Hover I Source Viewer source Viewer return null  sourceViewer IAnnotationHover getAnnotationHover ISourceViewer sourceViewer
Returns the annotation hover which will provide the information to be shown in a hover popup window when requested for the overview ruler of the given source viewer This implementation always returns the general annotation hover returned by code get Annotation Hover code param source Viewer the source viewer to be configured by this configuration return an annotation hover or code null code if no hover support should be installed since 3 0 public I Annotation Hover get Overview Ruler Annotation Hover I Source Viewer source Viewer return get Annotation Hover source Viewer  getAnnotationHover sourceViewer IAnnotationHover getOverviewRulerAnnotationHover ISourceViewer sourceViewer getAnnotationHover sourceViewer
Returns the SWT event state masks for which text hover are configured for the given content type param source Viewer the source viewer to be configured by this configuration param content Type the content type return an code int code array with the configured SWT event state masks or code null code if text hovers are not supported for the given content type since 2 1 public int get Configured Text Hover State Masks I Source Viewer source Viewer String content Type return null  sourceViewer contentType getConfiguredTextHoverStateMasks ISourceViewer sourceViewer contentType
Returns the text hover which will provide the information to be shown in a text hover popup window when requested for the given source viewer and the given content type This implementation always returns code null code param source Viewer the source viewer to be configured by this configuration param content Type the content type param state Mask the SWT event state mask return a text hover or code null code if no hover support should be installed since 2 1 public I Text Hover get Text Hover I Source Viewer source Viewer String content Type int state Mask return null  sourceViewer contentType stateMask ITextHover getTextHover ISourceViewer sourceViewer contentType stateMask
Returns the text hover which will provide the information to be shown in a text hover popup window when requested for the given source viewer and the given content type This implementation always returns code null code param source Viewer the source viewer to be configured by this configuration param content Type the content type return a text hover or code null code if no hover support should be installed public I Text Hover get Text Hover I Source Viewer source Viewer String content Type return null  sourceViewer contentType ITextHover getTextHover ISourceViewer sourceViewer contentType
public I Information Control Creator get Information Control Creator I Source Viewer source Viewer return new I Information Control Creator public I Information Control create Information Control Shell parent return new Default Information Control parent  IInformationControlCreator getInformationControlCreator ISourceViewer sourceViewer IInformationControlCreator IInformationControl createInformationControl DefaultInformationControl
Returns the information control creator The creator is a factory creating information controls for the given source viewer This implementation always returns a creator for code Default Information Control code instances param source Viewer the source viewer to be configured by this configuration return the information control creator or code null code if no information support should be installed since 2 0 public I Information Control Creator get Information Control Creator I Source Viewer source Viewer return new I Information Control Creator public I Information Control create Information Control Shell parent return new Default Information Control parent  DefaultInformationControl sourceViewer IInformationControlCreator getInformationControlCreator ISourceViewer sourceViewer IInformationControlCreator IInformationControl createInformationControl DefaultInformationControl
Returns the information presenter which will determine and shown information requested for the current cursor position This implementation always returns code null code param source Viewer the source viewer to be configured by this configuration return an information presenter code null code if no information presenter should be installed since 2 0 public I Information Presenter get Information Presenter I Source Viewer source Viewer return null  sourceViewer IInformationPresenter getInformationPresenter ISourceViewer sourceViewer
Returns all configured content types for the given source viewer This list tells the caller which content types must be configured for the given source viewer i e for which content types the given source viewer s functionalities must be specified This implementation always returns code new String I Document DEFAULT CONTENT TYPE code param source Viewer the source viewer to be configured by this configuration return the configured content types for the given viewer public String get Configured Content Types I Source Viewer source Viewer return new String I Document DEFAULT CONTENT TYPE  IDocument DEFAULT_CONTENT_TYPE sourceViewer getConfiguredContentTypes ISourceViewer sourceViewer IDocument DEFAULT_CONTENT_TYPE
Returns the configured partitioning for the given source viewer The partitioning is used when the querying content types from the source viewer s input document This implementation always returns code I Document Extension3 DEFAULT PARTITIONING code param source Viewer the source viewer to be configured by this configuration return the configured partitioning see get Configured Content Types I Source Viewer since 3 0 public String get Configured Document Partitioning I Source Viewer source Viewer return I Document Extension3 DEFAULT PARTITIONING  IDocumentExtension3 DEFAULT_PARTITIONING sourceViewer getConfiguredContentTypes ISourceViewer getConfiguredDocumentPartitioning ISourceViewer sourceViewer IDocumentExtension3 DEFAULT_PARTITIONING

see I Viewport Listener viewport Changed int public void viewport Changed int vertical Position if vertical Position f Scroll Pos redraw  IViewportListener viewportChanged viewportChanged verticalPosition verticalPosition fScrollPos
see I Annotation Model Listener model Changed I Annotation Model public void model Changed I Annotation Model model update  IAnnotationModelListener modelChanged IAnnotationModel modelChanged IAnnotationModel
see I Text Listener text Changed Text Event public void text Changed Text Event e if f Text Viewer null e get Viewer Redraw State redraw  ITextListener textChanged TextEvent textChanged TextEvent fTextViewer getViewerRedrawState
Constructs a vertical ruler with the given width param width the width of the vertical ruler public Vertical Ruler int width this width null  VerticalRuler
Constructs a vertical ruler with the given width and the given annotation access param width the width of the vertical ruler param annotation Acccess the annotation access since 3 0 public Vertical Ruler int width I Annotation Access annotation Acccess f Width width f Annotation Access annotation Acccess  annotationAcccess VerticalRuler IAnnotationAccess annotationAcccess fWidth fAnnotationAccess annotationAcccess
see I Vertical Ruler get Control public Control get Control return f Canvas  IVerticalRuler getControl getControl fCanvas
f Canvas add Paint Listener new Paint Listener public void paint Control Paint Event event if f Text Viewer null double Buffer Paint event gc  fCanvas addPaintListener PaintListener paintControl PaintEvent fTextViewer doubleBufferPaint
f Canvas add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e handle Dispose f Text Viewer null  fCanvas addDisposeListener DisposeListener widgetDisposed DisposeEvent handleDispose fTextViewer
f Canvas add Mouse Listener new Mouse Listener public void mouse Up Mouse Event event  fCanvas addMouseListener MouseListener mouseUp MouseEvent
public void mouse Down Mouse Event event f Last Mouse Button Activity Line to Document Line Number event y  mouseDown MouseEvent fLastMouseButtonActivityLine toDocumentLineNumber
public void mouse Double Click Mouse Event event f Last Mouse Button Activity Line to Document Line Number event y  mouseDoubleClick MouseEvent fLastMouseButtonActivityLine toDocumentLineNumber
public Control create Control Composite parent I Text Viewer text Viewer f Text Viewer text Viewer f Canvas new Canvas parent SWT NO BACKGROUND f Canvas add Paint Listener new Paint Listener public void paint Control Paint Event event if f Text Viewer null double Buffer Paint event gc f Canvas add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e handle Dispose f Text Viewer null f Canvas add Mouse Listener new Mouse Listener public void mouse Up Mouse Event event public void mouse Down Mouse Event event f Last Mouse Button Activity Line to Document Line Number event y public void mouse Double Click Mouse Event event f Last Mouse Button Activity Line to Document Line Number event y if f Text Viewer null f Text Viewer add Viewport Listener f Internal Listener f Text Viewer add Text Listener f Internal Listener return f Canvas  createControl ITextViewer textViewer fTextViewer textViewer fCanvas NO_BACKGROUND fCanvas addPaintListener PaintListener paintControl PaintEvent fTextViewer doubleBufferPaint fCanvas addDisposeListener DisposeListener widgetDisposed DisposeEvent handleDispose fTextViewer fCanvas addMouseListener MouseListener mouseUp MouseEvent mouseDown MouseEvent fLastMouseButtonActivityLine toDocumentLineNumber mouseDoubleClick MouseEvent fLastMouseButtonActivityLine toDocumentLineNumber fTextViewer fTextViewer addViewportListener fInternalListener fTextViewer addTextListener fInternalListener fCanvas
Disposes the ruler s resources private void handle Dispose if f Text Viewer null f Text Viewer remove Viewport Listener f Internal Listener f Text Viewer remove Text Listener f Internal Listener f Text Viewer null if f Model null f Model remove Annotation Model Listener f Internal Listener if f Buffer null f Buffer dispose f Buffer null  handleDispose fTextViewer fTextViewer removeViewportListener fInternalListener fTextViewer removeTextListener fInternalListener fTextViewer fModel fModel removeAnnotationModelListener fInternalListener fBuffer fBuffer fBuffer
Double buffer drawing param dest the GC to draw into private void double Buffer Paint GC dest Point size f Canvas get Size if size x 0 size y 0 return if f Buffer null Rectangle r f Buffer get Bounds if r width size x r height size y f Buffer dispose f Buffer null if f Buffer null f Buffer new Image f Canvas get Display size x size y GC gc new GC f Buffer gc set Font f Text Viewer get Text Widget get Font try gc set Background f Canvas get Background gc fill Rectangle 0 0 size x size y if f Text Viewer instanceof I Text Viewer Extension5 do Paint1 gc else do Paint gc finally gc dispose dest draw Image f Buffer 0 0  doubleBufferPaint fCanvas getSize fBuffer fBuffer getBounds fBuffer fBuffer fBuffer fBuffer fCanvas getDisplay fBuffer setFont fTextViewer getTextWidget getFont setBackground fCanvas getBackground fillRectangle fTextViewer ITextViewerExtension5 doPaint1 doPaint drawImage fBuffer
Returns the document offset of the upper left corner of the widgets view port possibly including partially visible lines return the document offset of the upper left corner including partially visible lines since 2 0 private int get Inclusive Top Index Start Offset Styled Text text Widget f Text Viewer get Text Widget if text Widget null text Widget is Disposed int top 1 if f Text Viewer instanceof I Text Viewer Extension5 top text Widget get Top Index if text Widget get Top Pixel text Widget get Line Height 0 top I Text Viewer Extension5 extension I Text Viewer Extension5 f Text Viewer top extension widget Line2 Model Line top else top f Text Viewer get Top Index if text Widget get Top Pixel text Widget get Line Height 0 top try I Document document f Text Viewer get Document return document get Line Offset top catch Bad Location Exception x return 1  getInclusiveTopIndexStartOffset StyledText textWidget fTextViewer getTextWidget textWidget textWidget isDisposed fTextViewer ITextViewerExtension5 textWidget getTopIndex textWidget getTopPixel textWidget getLineHeight ITextViewerExtension5 ITextViewerExtension5 fTextViewer widgetLine2ModelLine fTextViewer getTopIndex textWidget getTopPixel textWidget getLineHeight IDocument fTextViewer getDocument getLineOffset BadLocationException
Draws the vertical ruler w o drawing the Canvas background param gc the GC to draw into protected void do Paint GC gc if f Model null f Text Viewer null return I Annotation Access Extension annotation Access Extension null if f Annotation Access instanceof I Annotation Access Extension annotation Access Extension I Annotation Access Extension f Annotation Access Styled Text styled Text f Text Viewer get Text Widget I Document doc f Text Viewer get Document int top Left get Inclusive Top Index Start Offset int bottom Right f Text Viewer get Bottom Index End Offset int view Port bottom Right top Left Point d f Canvas get Size f Scroll Pos styled Text get Top Pixel int lineheight styled Text get Line Height int shift f Text Viewer get Top Inset int top Line 1 bottom Line 1 try I Region region f Text Viewer get Visible Region top Line doc get Line Of Offset region get Offset bottom Line doc get Line Of Offset region get Offset region get Length catch Bad Location Exception x return draw Annotations Rectangle r new Rectangle 0 0 0 0 int max Layer 1 loop at least once though layers for int layer 0 layer max Layer layer Iterator iter f Model get Annotation Iterator while iter has Next Annotation annotation Annotation iter next int lay I Annotation Access Extension DEFAULT LAYER if annotation Access Extension null lay annotation Access Extension get Layer annotation max Layer Math max max Layer lay 1 dynamically update layer maximum if lay layer wrong layer skip annotation continue Position position f Model get Position annotation if position null continue if position overlaps With top Left view Port continue try int offset position get Offset int length position get Length int start Line doc get Line Of Offset offset if start Line top Line start Line top Line int end Line start Line if length 0 end Line doc get Line Of Offset offset length 1 if end Line bottom Line end Line bottom Line start Line top Line end Line top Line r x 0 r y start Line lineheight f Scroll Pos shift r width d x int lines end Line start Line if lines 0 lines lines r height lines 1 lineheight if r y d y annotation Access Extension null annotation within visible area annotation Access Extension paint annotation gc f Canvas r catch Bad Location Exception e  doPaint fModel fTextViewer IAnnotationAccessExtension annotationAccessExtension fAnnotationAccess IAnnotationAccessExtension annotationAccessExtension IAnnotationAccessExtension fAnnotationAccess StyledText styledText fTextViewer getTextWidget IDocument fTextViewer getDocument topLeft getInclusiveTopIndexStartOffset bottomRight fTextViewer getBottomIndexEndOffset viewPort bottomRight topLeft fCanvas getSize fScrollPos styledText getTopPixel styledText getLineHeight fTextViewer getTopInset topLine bottomLine IRegion fTextViewer getVisibleRegion topLine getLineOfOffset getOffset bottomLine getLineOfOffset getOffset getLength BadLocationException maxLayer maxLayer fModel getAnnotationIterator hasNext IAnnotationAccessExtension DEFAULT_LAYER annotationAccessExtension annotationAccessExtension getLayer maxLayer maxLayer fModel getPosition overlapsWith topLeft viewPort getOffset getLength startLine getLineOfOffset startLine topLine startLine topLine endLine startLine endLine getLineOfOffset endLine bottomLine endLine bottomLine startLine topLine endLine topLine startLine fScrollPos endLine startLine annotationAccessExtension annotationAccessExtension fCanvas BadLocationException
Draws the vertical ruler w o drawing the Canvas background Uses code I Text Viewer Extension5 code for its implementation Will replace code do Paint GC code param gc the GC to draw into protected void do Paint1 GC gc if f Model null f Text Viewer null return I Annotation Access Extension annotation Access Extension null if f Annotation Access instanceof I Annotation Access Extension annotation Access Extension I Annotation Access Extension f Annotation Access I Text Viewer Extension5 extension I Text Viewer Extension5 f Text Viewer Styled Text text Widget f Text Viewer get Text Widget f Scroll Pos text Widget get Top Pixel int lineheight text Widget get Line Height Point dimension f Canvas get Size int shift f Text Viewer get Top Inset draw Annotations Rectangle r new Rectangle 0 0 0 0 int max Layer 1 loop at least once through layers for int layer 0 layer max Layer layer Iterator iter f Model get Annotation Iterator while iter has Next Annotation annotation Annotation iter next int lay I Annotation Access Extension DEFAULT LAYER if annotation Access Extension null lay annotation Access Extension get Layer annotation max Layer Math max max Layer lay 1 dynamically update layer maximum if lay layer wrong layer skip annotation continue Position position f Model get Position annotation if position null continue I Region widget Region extension model Range2 Widget Range new Region position get Offset position get Length if widget Region null continue int start Line extension widget Line Of Widget Offset widget Region get Offset if start Line 1 continue int end Line extension widget Line Of Widget Offset widget Region get Offset Math max widget Region get Length 1 0 if end Line 1 continue r x 0 r y start Line lineheight f Scroll Pos shift r width dimension x int lines end Line start Line if lines 0 lines lines r height lines 1 lineheight if r y dimension y annotation Access Extension null annotation within visible area annotation Access Extension paint annotation gc f Canvas r  ITextViewerExtension5 doPaint doPaint1 fModel fTextViewer IAnnotationAccessExtension annotationAccessExtension fAnnotationAccess IAnnotationAccessExtension annotationAccessExtension IAnnotationAccessExtension fAnnotationAccess ITextViewerExtension5 ITextViewerExtension5 fTextViewer StyledText textWidget fTextViewer getTextWidget fScrollPos textWidget getTopPixel textWidget getLineHeight fCanvas getSize fTextViewer getTopInset maxLayer maxLayer fModel getAnnotationIterator hasNext IAnnotationAccessExtension DEFAULT_LAYER annotationAccessExtension annotationAccessExtension getLayer maxLayer maxLayer fModel getPosition IRegion widgetRegion modelRange2WidgetRange getOffset getLength widgetRegion startLine widgetLineOfWidgetOffset widgetRegion getOffset startLine endLine widgetLineOfWidgetOffset widgetRegion getOffset widgetRegion getLength endLine startLine fScrollPos endLine startLine annotationAccessExtension annotationAccessExtension fCanvas
if d null d async Exec new Runnable public void run redraw  asyncExec
Thread safe implementation Can be called from any thread see I Vertical Ruler update public void update if f Canvas null f Canvas is Disposed Display d f Canvas get Display if d null d async Exec new Runnable public void run redraw  IVerticalRuler fCanvas fCanvas isDisposed fCanvas getDisplay asyncExec
Redraws the vertical ruler private void redraw if f Canvas null f Canvas is Disposed GC gc new GC f Canvas double Buffer Paint gc gc dispose  fCanvas fCanvas isDisposed fCanvas doubleBufferPaint
public void set Model I Annotation Model model if model f Model if f Model null f Model remove Annotation Model Listener f Internal Listener f Model model if f Model null f Model add Annotation Model Listener f Internal Listener update  setModel IAnnotationModel fModel fModel fModel removeAnnotationModelListener fInternalListener fModel fModel fModel addAnnotationModelListener fInternalListener
see I Vertical Ruler get Model public I Annotation Model get Model return f Model  IVerticalRuler getModel IAnnotationModel getModel fModel
see I Vertical Ruler Info get Width public int get Width return f Width  IVerticalRulerInfo getWidth getWidth fWidth
see I Vertical Ruler Info get Line Of Last Mouse Button Activity public int get Line Of Last Mouse Button Activity return f Last Mouse Button Activity Line  IVerticalRulerInfo getLineOfLastMouseButtonActivity getLineOfLastMouseButtonActivity fLastMouseButtonActivityLine
public int to Document Line Number int y coordinate if f Text Viewer null return 1 Styled Text text f Text Viewer get Text Widget int line y coordinate f Scroll Pos text get Line Height return widget Line2 Model Line f Text Viewer line  toDocumentLineNumber y_coordinate fTextViewer StyledText fTextViewer getTextWidget y_coordinate fScrollPos getLineHeight widgetLine2ModelLine fTextViewer
Returns the line of the viewer s document that corresponds to the given widget line param viewer the viewer param widget Line the widget line return the corresponding line of the viewer s document since 2 1 protected final static int widget Line2 Model Line I Text Viewer viewer int widget Line if viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 viewer return extension widget Line2 Model Line widget Line try I Region r viewer get Visible Region I Document d viewer get Document return widget Line d get Line Of Offset r get Offset catch Bad Location Exception x return widget Line  widgetLine widgetLine2ModelLine ITextViewer widgetLine ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 widgetLine2ModelLine widgetLine IRegion getVisibleRegion IDocument getDocument widgetLine getLineOfOffset getOffset BadLocationException widgetLine
since 2 0 public void set Font Font font  setFont
since 2 0 public void set Location Of Last Mouse Button Activity int x int y f Last Mouse Button Activity Line to Document Line Number y  setLocationOfLastMouseButtonActivity fLastMouseButtonActivityLine toDocumentLineNumber
Adds the given mouse listener param listener the listener to be added deprecated will be removed since 2 0 public void add Mouse Listener Mouse Listener listener if f Canvas null f Canvas is Disposed f Canvas add Mouse Listener listener  addMouseListener MouseListener fCanvas fCanvas isDisposed fCanvas addMouseListener
Removes the given mouse listener param listener the listener to be removed deprecated will be removed since 2 0 public void remove Mouse Listener Mouse Listener listener if f Canvas null f Canvas is Disposed f Canvas remove Mouse Listener listener  removeMouseListener MouseListener fCanvas fCanvas isDisposed fCanvas removeMouseListener

Creates a new event param annotation the annotation concerned or code null code public Vertical Ruler Event Annotation annotation f Annotation annotation  VerticalRulerEvent fAnnotation
return the concerned annotation or code null code public Annotation get Selected Annotation return f Annotation  getSelectedAnnotation fAnnotation
param annotation the concerned annotation or code null code public void set Selected Annotation Annotation annotation f Annotation annotation  setSelectedAnnotation fAnnotation

Constructs a visual annotation model which wraps the given model based annotation model param model Annotation Model the model based annotation model public Visual Annotation Model I Annotation Model model Annotation Model f Model model Annotation Model  modelAnnotationModel VisualAnnotationModel IAnnotationModel modelAnnotationModel fModel modelAnnotationModel
Returns the visual annotation model s wrapped model based annotation model return the model based annotation model public I Annotation Model get Model Annotation Model return f Model  IAnnotationModel getModelAnnotationModel fModel
public void add Annotation Model Listener I Annotation Model Listener listener if f Model null f Annotation Model Listeners is Empty f Model add Annotation Model Listener this super add Annotation Model Listener listener  addAnnotationModelListener IAnnotationModelListener fModel fAnnotationModelListeners isEmpty fModel addAnnotationModelListener addAnnotationModelListener
public void connect I Document document super connect document if f Model null f Model connect document  IDocument fModel fModel
public void disconnect I Document document super disconnect document if f Model null f Model disconnect document  IDocument fModel fModel
public Iterator get Annotation Iterator if f Model null return super get Annotation Iterator Array List a new Array List 20 Iterator e f Model get Annotation Iterator while e has Next a add e next e super get Annotation Iterator while e has Next a add e next return a iterator  getAnnotationIterator fModel getAnnotationIterator ArrayList ArrayList fModel getAnnotationIterator hasNext getAnnotationIterator hasNext
public Position get Position Annotation annotation Position p Position get Annotation Map get annotation if p null return p if f Model null return f Model get Position annotation return null  getPosition getAnnotationMap fModel fModel getPosition
public void model Changed I Annotation Model model if model f Model Iterator iter new Array List f Annotation Model Listeners iterator while iter has Next I Annotation Model Listener l I Annotation Model Listener iter next l model Changed this  modelChanged IAnnotationModel fModel ArrayList fAnnotationModelListeners hasNext IAnnotationModelListener IAnnotationModelListener modelChanged
public void remove Annotation Model Listener I Annotation Model Listener listener super remove Annotation Model Listener listener if f Model null f Annotation Model Listeners is Empty f Model remove Annotation Model Listener this  removeAnnotationModelListener IAnnotationModelListener removeAnnotationModelListener fModel fAnnotationModelListeners isEmpty fModel removeAnnotationModelListener

Adds a context type to the registry If there already is a context type with the same ID registered it is replaced param context Type the context type to add public void add Context Type Template Context Type context Type f Context Types put context Type get Id context Type  contextType addContextType TemplateContextType contextType fContextTypes contextType getId contextType
Returns the context type if the id is valid code null code otherwise param id the id of the context type to retrieve return the context type if code name code is valid code null code otherwise public Template Context Type get Context Type String id return Template Context Type f Context Types get id  TemplateContextType getContextType TemplateContextType fContextTypes
Returns an iterator over all registered context types return an iterator over all registered context types public Iterator context Types return f Context Types values iterator  contextTypes fContextTypes

Creates a document template context param type the context type param document the document this context applies to param completion Offset the completion offset for usage in content assist param completion Length the completion length public Document Template Context Template Context Type type I Document document int completion Offset int completion Length super type Assert is Not Null document Assert is True completion Offset 0 completion Offset document get Length Assert is True completion Length 0 f Document document f Completion Offset completion Offset f Completion Length completion Length  completionOffset completionLength DocumentTemplateContext TemplateContextType IDocument completionOffset completionLength isNotNull isTrue completionOffset completionOffset getLength isTrue completionLength fDocument fCompletionOffset completionOffset fCompletionLength completionLength
Returns the document return the document public I Document get Document return f Document  IDocument getDocument fDocument
Returns the completion offset within the string of the context return the completion offset within the string of the context public int get Completion Offset return f Completion Offset  getCompletionOffset fCompletionOffset
Sets the completion offset param new Offset the new completion offset protected void set Completion Offset int new Offset f Completion Offset new Offset  newOffset setCompletionOffset newOffset fCompletionOffset newOffset
Returns the completion length within the string of the context return the completion length within the string of the context public int get Completion Length return f Completion Length  getCompletionLength fCompletionLength
Sets the completion length param new Length the new completion length protected void set Completion Length int new Length f Completion Length new Length  newLength setCompletionLength newLength fCompletionLength newLength
Returns the keyword which triggered template insertion return the keyword which triggered template insertion public String get Key int offset get Start int length get End offset try return f Document get offset length catch Bad Location Exception e return NON NLS 1  getKey getStart getEnd fDocument BadLocationException
Returns the beginning offset of the keyword return the beginning offset of the keyword public int get Start return f Completion Offset  getStart fCompletionOffset
Returns the end offset of the keyword return the end offset of the keyword public int get End return f Completion Offset f Completion Length  getEnd fCompletionOffset fCompletionLength
see org eclipse jface text templates Template Context can Evaluate org eclipse jface text templates Template public boolean can Evaluate Template template return true  TemplateContext canEvaluate canEvaluate
public Template Buffer evaluate Template template throws Bad Location Exception Template Exception if can Evaluate template return null Template Translator translator new Template Translator Template Buffer buffer translator translate template get Context Type resolve buffer this return buffer  TemplateBuffer BadLocationException TemplateException canEvaluate TemplateTranslator TemplateTranslator TemplateBuffer getContextType

Creates a new cursor variable public Cursor super NAME Text Template Messages get String Global Variables variable description cursor NON NLS 1 set Evaluation String NON NLS 1  TextTemplateMessages getString GlobalVariables setEvaluationString
Creates a new word selection variable public Word Selection super NAME Text Template Messages get String Global Variables variable description selected Word NON NLS 1  WordSelection TextTemplateMessages getString GlobalVariables selectedWord
protected String resolve Template Context context String selection context get Variable SELECTION NON NLS 1 if selection null return NON NLS 1 else return selection  TemplateContext getVariable
Creates a new line selection variable public Line Selection super NAME Text Template Messages get String Global Variables variable description selected Lines NON NLS 1  LineSelection TextTemplateMessages getString GlobalVariables selectedLines
protected String resolve Template Context context String selection context get Variable SELECTION NON NLS 1 if selection null return NON NLS 1 else return selection  TemplateContext getVariable
public static class Dollar extends Simple Template Variable Resolver Creates a new dollar variable public Dollar super dollar Text Template Messages get String Global Variables variable description dollar NON NLS 1 NON NLS 2 set Evaluation String NON NLS 1  SimpleTemplateVariableResolver TextTemplateMessages getString GlobalVariables setEvaluationString
public static class Date extends Simple Template Variable Resolver Creates a new date variable public Date super date Text Template Messages get String Global Variables variable description date NON NLS 1 NON NLS 2  SimpleTemplateVariableResolver TextTemplateMessages getString GlobalVariables
super date Text Template Messages get String Global Variables variable description date NON NLS 1 NON NLS 2 protected String resolve Template Context context return Date Format get Date Instance format new java util Date  TextTemplateMessages getString GlobalVariables TemplateContext DateFormat getDateInstance
public static class Year extends Simple Template Variable Resolver Creates a new year variable public Year super year Text Template Messages get String Global Variables variable description year NON NLS 1 NON NLS 2  SimpleTemplateVariableResolver TextTemplateMessages getString GlobalVariables
super year Text Template Messages get String Global Variables variable description year NON NLS 1 NON NLS 2 protected String resolve Template Context context return Integer to String Calendar get Instance get Calendar YEAR  TextTemplateMessages getString GlobalVariables TemplateContext toString getInstance
public static class Time extends Simple Template Variable Resolver Creates a new time variable public Time super time Text Template Messages get String Global Variables variable description time NON NLS 1 NON NLS 2  SimpleTemplateVariableResolver TextTemplateMessages getString GlobalVariables
inherit Doc protected String resolve Template Context context return Date Format get Time Instance format new java util Date  inheritDoc TemplateContext DateFormat getTimeInstance
public static class User extends Simple Template Variable Resolver Creates a new user name variable public User super user Text Template Messages get String Global Variables variable description user NON NLS 1 NON NLS 2  SimpleTemplateVariableResolver TextTemplateMessages getString GlobalVariables
inherit Doc protected String resolve Template Context context return System get Property user name NON NLS 1  inheritDoc TemplateContext getProperty

Creates a new updater for the given code category code param category the new category public Inclusive Position Updater String category f Category category  InclusivePositionUpdater fCategory
public void update Document Event event int event Offset event get Offset int event Old Length event get Length int event New Length event get Text null 0 event get Text length int delta Length event New Length event Old Length try Position positions event get Document get Positions f Category for int i 0 i positions length i Position position positions i if position is Deleted continue int offset position get Offset int length position get Length int end offset length if offset event Offset event Old Length position comes way after change shift position set Offset offset delta Length else if end event Offset position comes way before change leave alone else if offset event Offset end event Offset event Old Length event completely internal to the position adjust length position set Length length delta Length else if offset event Offset event extends over end of position adjust length int new End event Offset event New Length position set Length new End offset else if end event Offset event Old Length event extends from before position into it adjust offset and length offset becomes end of event length ajusted acordingly we want to recycle the overlapping part position set Offset event Offset int deleted event Offset event Old Length offset position set Length length deleted event New Length else event consumes the position delete it position delete catch Bad Position Category Exception e ignore and return  DocumentEvent eventOffset getOffset eventOldLength getLength eventNewLength getText getText deltaLength eventNewLength eventOldLength getDocument getPositions fCategory isDeleted getOffset getLength eventOffset eventOldLength setOffset deltaLength eventOffset eventOffset eventOffset eventOldLength setLength deltaLength eventOffset newEnd eventOffset eventNewLength setLength newEnd eventOffset eventOldLength setOffset eventOffset eventOffset eventOldLength setLength eventNewLength BadPositionCategoryException
Returns the position category return the position category public String get Category return f Category  getCategory fCategory

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private J Face Text Template Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE JFaceTextTemplateMessages
param key return public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key  getString fgResourceBundle getString MissingResourceException
Gets a string from the resource bundle and formats it with the argument param keythe string used to get the bundle value must not be null param arg return public static String get Formatted String String key Object arg return Message Format format get String key new Object arg  getFormattedString MessageFormat getString
Gets a string from the resource bundle and formats it with arguments param key param args return public static String get Formatted String String key Object args return Message Format format get String key args  getFormattedString MessageFormat getString

Creates a new user added instance that is not linked to a contributed template param template the template which is stored by the new instance param enabled whether the template is enabled public Template Persistence Data Template template boolean enabled this template enabled null  TemplatePersistenceData
Creates a new instance If code id code is not code null code the instance is represents a template that is contributed and can be identified via its id param template the template which is stored by the new instance param enabled whether the template is enabled param id the id of the template or code null code if a user added instance should be created public Template Persistence Data Template template boolean enabled String id Assert is Not Null template f Original Template template f Custom Template template f Original Is Enabled enabled f Custom Is Enabled enabled f Id id  TemplatePersistenceData isNotNull fOriginalTemplate fCustomTemplate fOriginalIsEnabled fCustomIsEnabled fId
Returns the id of this template store or code null code if there is none return the id of this template store public String get Id return f Id  getId fId
Returns the deletion state of the stored template This is only relevant of contributed templates return the deletion state of the stored template public boolean is Deleted return f Is Deleted  isDeleted fIsDeleted
Sets the deletion state of the stored template param is Deleted the deletion state of the stored template public void set Deleted boolean is Deleted f Is Deleted is Deleted  isDeleted setDeleted isDeleted fIsDeleted isDeleted
Returns the template encapsulated by the receiver return the template encapsulated by the receiver public Template get Template return f Custom Template  getTemplate fCustomTemplate
Sets the template encapsulated by the receiver param template the new template public void set Template Template template f Custom Template template  setTemplate fCustomTemplate
Returns whether the receiver represents a custom template i e is either a user added template or a contributed template that has been modified return code true code if the contained template is a custom template and cannot be reconstructed from the contributed templates public boolean is Custom return f Id null f Is Deleted f Original Is Enabled f Custom Is Enabled f Original Template equals f Custom Template  isCustom fId fIsDeleted fOriginalIsEnabled fCustomIsEnabled fOriginalTemplate fCustomTemplate
Returns whether the receiver represents a modified template i e a contributed template that has been changed return code true code if the contained template is contributed but has been modified code false code otherwise public boolean is Modified return is Custom is User Added  isModified isCustom isUserAdded
Returns code true code if the contained template was added by a user i e does not reference a contributed template return code true code if the contained template was added by a user code false code otherwise public boolean is User Added return f Id null  isUserAdded fId
Reverts the template to its original setting public void revert f Custom Template f Original Template f Custom Is Enabled f Original Is Enabled f Is Deleted false  fCustomTemplate fOriginalTemplate fCustomIsEnabled fOriginalIsEnabled fIsDeleted
Returns the enablement state of the contained template return the enablement state of the contained template public boolean is Enabled return f Custom Is Enabled  isEnabled fCustomIsEnabled
Sets the enablement state of the contained template param is Enabled the new enablement state of the contained template public void set Enabled boolean is Enabled f Custom Is Enabled is Enabled  isEnabled setEnabled isEnabled fCustomIsEnabled isEnabled

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Template Persistence Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE TemplatePersistenceMessages
param key return public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key  getString fgResourceBundle getString MissingResourceException
Gets a string from the resource bundle and formats it with the argument param keythe string used to get the bundle value must not be null param arg return public static String get Formatted String String key Object arg return Message Format format get String key new Object arg  getFormattedString MessageFormat getString
Gets a string from the resource bundle and formats it with arguments param key param args return public static String get Formatted String String key Object args return Message Format format get String key args  getFormattedString MessageFormat getString

Create a new instance public Template Reader Writer  TemplateReaderWriter
Reads templates from a reader and returns them The reader must present a serialized form as produced by the code save code method param reader the reader to read templates from return the read templates encapsulated in instances of code Template Persistence Data code throws IO Exception if reading from the stream fails public Template Persistence Data read Reader reader throws IO Exception return read reader null  TemplatePersistenceData IOException TemplatePersistenceData IOException
Reads templates from a stream and adds them to the templates param reader the reader to read templates from param bundle a resource bundle to use for translating the read templates or code null code if no translation should occur return the read templates encapsulated in instances of code Template Persistence Data code throws IO Exception if reading from the stream fails public Template Persistence Data read Reader reader Resource Bundle bundle throws IO Exception return read new Input Source reader bundle  TemplatePersistenceData IOException TemplatePersistenceData ResourceBundle IOException InputSource
Reads templates from a stream and adds them to the templates param stream the byte stream to read templates from param bundle a resource bundle to use for translating the read templates or code null code if no translation should occur return the read templates encapsulated in instances of code Template Persistence Data code throws IO Exception if reading from the stream fails public Template Persistence Data read Input Stream stream Resource Bundle bundle throws IO Exception return read new Input Source stream bundle  TemplatePersistenceData IOException TemplatePersistenceData InputStream ResourceBundle IOException InputSource
Reads templates from an code Input Source code and adds them to the templates param source the input source param bundle a resource bundle to use for translating the read templates or code null code if no translation should occur return the read templates encapsulated in instances of code Template Persistence Data code throws IO Exception if reading from the stream fails private Template Persistence Data read Input Source source Resource Bundle bundle throws IO Exception try Collection templates new Array List Set ids new Hash Set Document Builder Factory factory Document Builder Factory new Instance Document Builder parser factory new Document Builder Document document parser parse source Node List elements document get Elements By Tag Name TEMPLATE ELEMENT int count elements get Length for int i 0 i count i Node node elements item i Named Node Map attributes node get Attributes if attributes null continue String id get String Value attributes ID ATTRIBUTE null if id null ids contains id throw new IO Exception Template Persistence Messages get String Template Reader Writer duplicate id NON NLS 1 boolean deleted get Boolean Value attributes DELETED ATTRIBUTE false String name get String Value attributes NAME ATTRIBUTE name translate String name bundle String description get String Value attributes DESCRIPTION ATTRIBUTE NON NLS 1 description translate String description bundle String context get String Value attributes CONTEXT ATTRIBUTE if name null context null throw new IO Exception Template Persistence Messages get String Template Reader Writer error missing attribute NON NLS 1 boolean enabled get Boolean Value attributes ENABLED ATTRIBUTE true String Buffer buffer new String Buffer Node List children node get Child Nodes for int j 0 j children get Length j String value children item j get Node Value if value null buffer append value String pattern buffer to String pattern translate String pattern bundle Template template new Template name description context pattern Template Persistence Data data new Template Persistence Data template enabled id data set Deleted deleted templates add data return Template Persistence Data templates to Array new Template Persistence Data templates size catch Parser Configuration Exception e Assert is True false catch SAX Exception e Throwable t e get Cause if t instanceof IO Exception throw IO Exception t else throw new IO Exception t get Message return null dummy  InputSource TemplatePersistenceData IOException TemplatePersistenceData InputSource ResourceBundle IOException ArrayList HashSet DocumentBuilderFactory DocumentBuilderFactory newInstance DocumentBuilder newDocumentBuilder NodeList getElementsByTagName TEMPLATE_ELEMENT getLength NamedNodeMap getAttributes getStringValue ID_ATTRIBUTE IOException TemplatePersistenceMessages getString TemplateReaderWriter getBooleanValue DELETED_ATTRIBUTE getStringValue NAME_ATTRIBUTE translateString getStringValue DESCRIPTION_ATTRIBUTE translateString getStringValue CONTEXT_ATTRIBUTE IOException TemplatePersistenceMessages getString TemplateReaderWriter missing_attribute getBooleanValue ENABLED_ATTRIBUTE StringBuffer StringBuffer NodeList getChildNodes getLength getNodeValue toString translateString TemplatePersistenceData TemplatePersistenceData setDeleted TemplatePersistenceData toArray TemplatePersistenceData ParserConfigurationException isTrue SAXException getCause IOException IOException IOException getMessage
Saves the templates as XML encoded as UTF 8 onto the given byte stream param templates the templates to save param stream the byte output to write the templates to in XML throws IO Exception if writing the templates fails public void save Template Persistence Data templates Output Stream stream throws IO Exception save templates new Stream Result stream  IOException TemplatePersistenceData OutputStream IOException StreamResult
Saves the templates as XML param templates the templates to save param writer the writer to write the templates to in XML throws IO Exception if writing the templates fails public void save Template Persistence Data templates Writer writer throws IO Exception save templates new Stream Result writer  IOException TemplatePersistenceData IOException StreamResult
Saves the templates as XML param templates the templates to save param result the stream result to write to throws IO Exception if writing the templates fails private void save Template Persistence Data templates Stream Result result throws IO Exception try Document Builder Factory factory Document Builder Factory new Instance Document Builder builder factory new Document Builder Document document builder new Document Node root document create Element TEMPLATE ROOT NON NLS 1 document append Child root for int i 0 i templates length i Template Persistence Data data templates i Template template data get Template Node node document create Element TEMPLATE ELEMENT root append Child node Named Node Map attributes node get Attributes String id data get Id if id null Attr id Attr document create Attribute ID ATTRIBUTE id Attr set Value id attributes set Named Item id Attr if template null Attr name document create Attribute NAME ATTRIBUTE name set Value template get Name attributes set Named Item name if template null Attr description document create Attribute DESCRIPTION ATTRIBUTE description set Value template get Description attributes set Named Item description if template null Attr context document create Attribute CONTEXT ATTRIBUTE context set Value template get Context Type Id attributes set Named Item context Attr enabled document create Attribute ENABLED ATTRIBUTE enabled set Value data is Enabled Boolean to String true Boolean to String false NON NLS 1 NON NLS 2 attributes set Named Item enabled Attr deleted document create Attribute DELETED ATTRIBUTE deleted set Value data is Deleted Boolean to String true Boolean to String false NON NLS 1 NON NLS 2 attributes set Named Item deleted if template null Text pattern document create Text Node template get Pattern node append Child pattern Transformer transformer Transformer Factory new Instance new Transformer transformer set Output Property Output Keys METHOD xml NON NLS 1 transformer set Output Property Output Keys ENCODING UTF 8 NON NLS 1 DOM Source source new DOM Source document transformer transform source result catch Parser Configuration Exception e Assert is True false catch Transformer Exception e if e get Exception instanceof IO Exception throw IO Exception e get Exception Assert is True false  IOException TemplatePersistenceData StreamResult IOException DocumentBuilderFactory DocumentBuilderFactory newInstance DocumentBuilder newDocumentBuilder newDocument createElement TEMPLATE_ROOT appendChild TemplatePersistenceData getTemplate createElement TEMPLATE_ELEMENT appendChild NamedNodeMap getAttributes getId idAttr createAttribute ID_ATTRIBUTE idAttr setValue setNamedItem idAttr createAttribute NAME_ATTRIBUTE setValue getName setNamedItem createAttribute DESCRIPTION_ATTRIBUTE setValue getDescription setNamedItem createAttribute CONTEXT_ATTRIBUTE setValue getContextTypeId setNamedItem createAttribute ENABLED_ATTRIBUTE setValue isEnabled toString toString setNamedItem createAttribute DELETED_ATTRIBUTE setValue isDeleted toString toString setNamedItem createTextNode getPattern appendChild TransformerFactory newInstance newTransformer setOutputProperty OutputKeys setOutputProperty OutputKeys DOMSource DOMSource ParserConfigurationException isTrue TransformerException getException IOException IOException getException isTrue
private boolean get Boolean Value Named Node Map attributes String attribute boolean default Value throws SAX Exception Node enabled Node attributes get Named Item attribute if enabled Node null return default Value else if enabled Node get Node Value equals Boolean to String true return true else if enabled Node get Node Value equals Boolean to String false return false else throw new SAX Exception Template Persistence Messages get String Template Reader Writer error illegal boolean attribute NON NLS 1  getBooleanValue NamedNodeMap defaultValue SAXException enabledNode getNamedItem enabledNode defaultValue enabledNode getNodeValue toString enabledNode getNodeValue toString SAXException TemplatePersistenceMessages getString TemplateReaderWriter illegal_boolean_attribute
private String get String Value Named Node Map attributes String name throws SAX Exception String val get String Value attributes name null if val null throw new SAX Exception Template Persistence Messages get String Template Reader Writer error missing attribute NON NLS 1 return val  getStringValue NamedNodeMap SAXException getStringValue SAXException TemplatePersistenceMessages getString TemplateReaderWriter missing_attribute
private String get String Value Named Node Map attributes String name String default Value Node node attributes get Named Item name return node null default Value node get Node Value  getStringValue NamedNodeMap defaultValue getNamedItem defaultValue getNodeValue
private String translate String String str Resource Bundle bundle if bundle null return str int idx str index Of if idx 1 return str String Buffer buf new String Buffer int k 0 while idx 1 buf append str substring k idx for k idx 1 k str length Character is Whitespace str char At k k loop String key str substring idx 1 k buf append get Bundle String key bundle idx str index Of k buf append str substring k return buf to String  translateString ResourceBundle indexOf StringBuffer StringBuffer isWhitespace charAt getBundleString indexOf toString
private String get Bundle String String key Resource Bundle bundle if bundle null try return bundle get String key catch Missing Resource Exception e return key else return Template Persistence Messages get String key default messages  getBundleString ResourceBundle getString MissingResourceException TemplatePersistenceMessages getString

Creates a new template store param store the preference store in which to store custom templates under code key code param key the key into code store code where to store custom templates public Template Store I Preference Store store String key Assert is Not Null store Assert is Not Null key f Preference Store store f Key key  TemplateStore IPreferenceStore isNotNull isNotNull fPreferenceStore fKey
Creates a new template store with a context type registry Only templates that specify a context type contained in the registry will be loaded by this store if the registry is not code null code param registry a context type registry or code null code if all templates should be loaded param store the preference store in which to store custom templates under code key code param key the key into code store code where to store custom templates public Template Store Context Type Registry registry I Preference Store store String key this store key f Registry registry  TemplateStore ContextTypeRegistry IPreferenceStore fRegistry
Loads the templates from contributions and preferences throws IO Exception if loading fails public void load throws IO Exception f Templates clear load Contributed Templates load Custom Templates  IOException IOException fTemplates loadContributedTemplates loadCustomTemplates
Hook method to load contributed templates Contributed templates are superseded by customized versions of user added templates stored in the preferences p The default implementation does nothing p throws IO Exception if loading fails protected void load Contributed Templates throws IO Exception  IOException loadContributedTemplates IOException
Adds a template to the internal store The added templates must have a unique id param data the template data to add protected void internal Add Template Persistence Data data if data is Custom check if the added template is not a duplicate id String id data get Id for Iterator it f Templates iterator it has Next Template Persistence Data d2 Template Persistence Data it next if d2 get Id null d2 get Id equals id return f Templates add data  internalAdd TemplatePersistenceData isCustom getId fTemplates hasNext TemplatePersistenceData TemplatePersistenceData getId getId fTemplates
Saves the templates to the preferences throws IO Exception if the templates cannot be written public void save throws IO Exception Array List custom new Array List for Iterator it f Templates iterator it has Next Template Persistence Data data Template Persistence Data it next if data is Custom data is User Added data is Deleted don t save deleted user added templates custom add data String Writer output new String Writer Template Reader Writer writer new Template Reader Writer writer save Template Persistence Data custom to Array new Template Persistence Data custom size output f Preference Store set Value f Key output to String  IOException IOException ArrayList ArrayList fTemplates hasNext TemplatePersistenceData TemplatePersistenceData isCustom isUserAdded isDeleted StringWriter StringWriter TemplateReaderWriter TemplateReaderWriter TemplatePersistenceData toArray TemplatePersistenceData fPreferenceStore setValue fKey toString
Adds a template encapsulated in its persistent form param data the template to add public void add Template Persistence Data data if validate Template data get Template return if data is User Added f Templates add data else for Iterator it f Templates iterator it has Next Template Persistence Data d2 Template Persistence Data it next if d2 get Id null d2 get Id equals data get Id d2 set Template data get Template d2 set Deleted data is Deleted d2 set Enabled data is Enabled return add an id which is not contributed as add on if data get Template null Template Persistence Data new Data new Template Persistence Data data get Template data is Enabled f Templates add new Data  TemplatePersistenceData validateTemplate getTemplate isUserAdded fTemplates fTemplates hasNext TemplatePersistenceData TemplatePersistenceData getId getId getId setTemplate getTemplate setDeleted isDeleted setEnabled isEnabled getTemplate TemplatePersistenceData newData TemplatePersistenceData getTemplate isEnabled fTemplates newData
Removes a template from the store param data the template to remove public void delete Template Persistence Data data if data is User Added f Templates remove data else data set Deleted true  TemplatePersistenceData isUserAdded fTemplates setDeleted
Restores all contributed templates that have been deleted public void restore Deleted for Iterator it f Templates iterator it has Next Template Persistence Data data Template Persistence Data it next if data is Deleted data set Deleted false  restoreDeleted fTemplates hasNext TemplatePersistenceData TemplatePersistenceData isDeleted setDeleted
Deletes all user added templates and reverts all contributed templates public void restore Defaults for Iterator it f Templates iterator it has Next Template Persistence Data data Template Persistence Data it next if data is User Added it remove else data revert  restoreDefaults fTemplates hasNext TemplatePersistenceData TemplatePersistenceData isUserAdded
Returns all enabled templates return all enabled templates public Template get Templates return get Templates null  getTemplates getTemplates
Returns all enabled templates for the given context type param context Type Id the id of the context type of the requested templates or code null code if all templates should be returned return all enabled templates for the given context type public Template get Templates String context Type Id List templates new Array List for Iterator it f Templates iterator it has Next Template Persistence Data data Template Persistence Data it next if data is Enabled data is Deleted context Type Id null context Type Id equals data get Template get Context Type Id templates add data get Template return Template templates to Array new Template templates size  contextTypeId getTemplates contextTypeId ArrayList fTemplates hasNext TemplatePersistenceData TemplatePersistenceData isEnabled isDeleted contextTypeId contextTypeId getTemplate getContextTypeId getTemplate toArray
Returns the first enabled template that matches the name param name the name of the template searched for return the first enabled template that matches both name and context type id or code null code if none is found public Template find Template String name return find Template name null  findTemplate findTemplate
Returns the first enabled template that matches both name and context type id param name the name of the template searched for param context Type Id the context type id to clip unwanted templates or code null code if any context type is ok return the first enabled template that matches both name and context type id or code null code if none is found public Template find Template String name String context Type Id Assert is Not Null name for Iterator it f Templates iterator it has Next Template Persistence Data data Template Persistence Data it next Template template data get Template if data is Enabled data is Deleted context Type Id null context Type Id equals template get Context Type Id name equals template get Name return template return null  contextTypeId findTemplate contextTypeId isNotNull fTemplates hasNext TemplatePersistenceData TemplatePersistenceData getTemplate isEnabled isDeleted contextTypeId contextTypeId getContextTypeId getName
Returns all template datas param include Deleted whether to include deleted datas return all template datas whether enabled or not public Template Persistence Data get Template Data boolean include Deleted List datas new Array List for Iterator it f Templates iterator it has Next Template Persistence Data data Template Persistence Data it next if include Deleted data is Deleted datas add data return Template Persistence Data datas to Array new Template Persistence Data datas size  includeDeleted TemplatePersistenceData getTemplateData includeDeleted ArrayList fTemplates hasNext TemplatePersistenceData TemplatePersistenceData includeDeleted isDeleted TemplatePersistenceData toArray TemplatePersistenceData
private void load Custom Templates throws IO Exception String pref f Preference Store get String f Key if pref null pref trim length 0 Reader input new String Reader pref Template Reader Writer reader new Template Reader Writer Template Persistence Data datas reader read input for int i 0 i datas length i Template Persistence Data data datas i add data  loadCustomTemplates IOException fPreferenceStore getString fKey StringReader TemplateReaderWriter TemplateReaderWriter TemplatePersistenceData TemplatePersistenceData
Validates a template against the context type registered in the context type registry Returns always code true code if no registry is present param template the template to validate return code true code if validation is successful or no context type registry is specified code false code if validation fails private boolean validate Template Template template String context Type Id template get Context Type Id if context Exists context Type Id if f Registry null try f Registry get Context Type context Type Id validate template get Pattern catch Template Exception e return false return true else return false  validateTemplate contextTypeId getContextTypeId contextExists contextTypeId fRegistry fRegistry getContextType contextTypeId getPattern TemplateException
Returns code true code if a context type id specifies a valid context type or if no context type registry is present param context Type Id the context type id to look for return code true code if the context type specified by the id is present in the context type registry or if no registry is specified private boolean context Exists String context Type Id return context Type Id null f Registry null f Registry get Context Type context Type Id null  contextTypeId contextExists contextTypeId contextTypeId fRegistry fRegistry getContextType contextTypeId
Returns the registry return Returns the registry protected final Context Type Registry get Registry return f Registry  ContextTypeRegistry getRegistry fRegistry

Creates a new completion proposal based on the provided information The replacement string is considered being the display string too All remaining fields are set to code null code param replacement String the actual string to be inserted into the document param replacement Position the position of the text to be replaced param cursor Position the position of the cursor following the insert relative to replacement Offset public Position Based Completion Proposal String replacement String Position replacement Position int cursor Position this replacement String replacement Position cursor Position null null null null  replacementString replacementPosition cursorPosition replacementOffset PositionBasedCompletionProposal replacementString replacementPosition cursorPosition replacementString replacementPosition cursorPosition
Creates a new completion proposal All fields are initialized based on the provided information param replacement String the actual string to be inserted into the document param replacement Position the position of the text to be replaced param cursor Position the position of the cursor following the insert relative to replacement Offset param image the image to display for this proposal param display String the string to be displayed for the proposal param context Information the context information associated with this proposal param additional Proposal Info the additional information associated with this proposal public Position Based Completion Proposal String replacement String Position replacement Position int cursor Position Image image String display String I Context Information context Information String additional Proposal Info Assert is Not Null replacement String Assert is True replacement Position null f Replacement String replacement String f Replacement Position replacement Position f Cursor Position cursor Position f Image image f Display String display String f Context Information context Information f Additional Proposal Info additional Proposal Info  replacementString replacementPosition cursorPosition replacementOffset displayString contextInformation additionalProposalInfo PositionBasedCompletionProposal replacementString replacementPosition cursorPosition displayString IContextInformation contextInformation additionalProposalInfo isNotNull replacementString isTrue replacementPosition fReplacementString replacementString fReplacementPosition replacementPosition fCursorPosition cursorPosition fImage fDisplayString displayString fContextInformation contextInformation fAdditionalProposalInfo additionalProposalInfo
public void apply I Document document try document replace f Replacement Position get Offset f Replacement Position get Length f Replacement String catch Bad Location Exception x ignore  IDocument fReplacementPosition getOffset fReplacementPosition getLength fReplacementString BadLocationException
see I Completion Proposal get Selection I Document public Point get Selection I Document document return new Point f Replacement Position get Offset f Cursor Position 0  ICompletionProposal getSelection IDocument getSelection IDocument fReplacementPosition getOffset fCursorPosition
see I Completion Proposal get Context Information public I Context Information get Context Information return f Context Information  ICompletionProposal getContextInformation IContextInformation getContextInformation fContextInformation
see I Completion Proposal get Image public Image get Image return f Image  ICompletionProposal getImage getImage fImage
public String get Display String if f Display String null return f Display String return f Replacement String  getDisplayString fDisplayString fDisplayString fReplacementString
see I Completion Proposal get Additional Proposal Info public String get Additional Proposal Info return f Additional Proposal Info  ICompletionProposal getAdditionalProposalInfo getAdditionalProposalInfo fAdditionalProposalInfo
see org eclipse jface text contentassist I Completion Proposal Extension2 apply org eclipse jface text I Text Viewer char int int public void apply I Text Viewer viewer char trigger int state Mask int offset apply viewer get Document  ICompletionProposalExtension2 ITextViewer ITextViewer stateMask getDocument
see org eclipse jface text contentassist I Completion Proposal Extension2 selected org eclipse jface text I Text Viewer boolean public void selected I Text Viewer viewer boolean smart Toggle  ICompletionProposalExtension2 ITextViewer ITextViewer smartToggle
see org eclipse jface text contentassist I Completion Proposal Extension2 unselected org eclipse jface text I Text Viewer public void unselected I Text Viewer viewer  ICompletionProposalExtension2 ITextViewer ITextViewer
public boolean validate I Document document int offset Document Event event try String content document get f Replacement Position get Offset f Replacement Position get Length if content starts With f Replacement String return true catch Bad Location Exception e ignore concurrently modified document return false  IDocument DocumentEvent fReplacementPosition getOffset fReplacementPosition getLength startsWith fReplacementString BadLocationException

see Template Variable Resolver Template Variable Resolver String String protected Simple Template Variable Resolver String type String description super type description  TemplateVariableResolver TemplateVariableResolver SimpleTemplateVariableResolver
Sets the string to which this variable evaluates param evaluation String the evaluation string may be code null code public final void set Evaluation String String evaluation String f Evaluation String evaluation String  evaluationString setEvaluationString evaluationString fEvaluationString evaluationString
see Template Variable Resolver evaluate Template Context protected String resolve Template Context context return f Evaluation String  TemplateVariableResolver TemplateContext TemplateContext fEvaluationString
Returns always code true code since simple variables are normally unambiguous param context inherit Doc return code true code protected boolean is Unambiguous Template Context context return true  inheritDoc isUnambiguous TemplateContext

Creates an empty template public Template this NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 
Creates a copy of a template param template the template to copy public Template Template template this template get Name template get Description template get Context Type Id template get Pattern  getName getDescription getContextTypeId getPattern
Creates a template param name the name of the template param description the description of the template param context Type Id the id of the context type in which the template can be applied param pattern the template pattern public Template String name String description String context Type Id String pattern set Description description set Name name set Context Type Id context Type Id set Pattern pattern  contextTypeId contextTypeId setDescription setName setContextTypeId contextTypeId setPattern
see Object hash Code public int hash Code return f Name hash Code f Pattern hash Code f Context Type Id hash Code  hashCode hashCode fName hashCode fPattern hashCode fContextTypeId hashCode
Sets the description of the template param description the new description public void set Description String description Assert is Not Null description f Description description  setDescription isNotNull fDescription
Returns the description of the template return the description of the template public String get Description return f Description  getDescription fDescription
Sets the name of the context type in which the template can be applied param context Type Id the new context type name public void set Context Type Id String context Type Id Assert is Not Null context Type Id f Context Type Id context Type Id  contextTypeId setContextTypeId contextTypeId isNotNull contextTypeId fContextTypeId contextTypeId
Returns the id of the context type in which the template can be applied return the id of the context type in which the template can be applied public String get Context Type Id return f Context Type Id  getContextTypeId fContextTypeId
Sets the name of the template param name the name of the template public void set Name String name f Name name  setName fName
Returns the name of the template return the name of the template public String get Name return f Name  getName fName
Sets the pattern of the template param pattern the new pattern of the template public void set Pattern String pattern f Pattern pattern  setPattern fPattern
Returns the template pattern return the template pattern public String get Pattern return f Pattern  getPattern fPattern
Returns code true code if template is enabled and matches the context code false code otherwise param prefix the prefix e g inside a document to match param context Type Name the context type name to match return code true code if template is enabled and matches the context code false code otherwise public boolean matches String prefix String context Type Name return f Context Type Id equals context Type Name  contextTypeName contextTypeName fContextTypeId contextTypeName
public boolean equals Object o if o instanceof Template return false Template t Template o if t this return true return t f Name equals f Name t f Pattern equals f Pattern t f Context Type Id equals f Context Type Id t f Description equals f Description  fName fName fPattern fPattern fContextTypeId fContextTypeId fDescription fDescription

Creates a template buffer param string the string param variables the variable positions public Template Buffer String string Template Variable variables set Content string variables  TemplateBuffer TemplateVariable setContent
Sets the content of the template buffer param string the string param variables the variable positions public final void set Content String string Template Variable variables Assert is Not Null string Assert is Not Null variables XXX assert non overlapping variable properties f String string f Variables variables  setContent TemplateVariable isNotNull isNotNull fString fVariables
Returns the string of the template buffer return the string representation of the template buffer public final String get String return f String  getString fString
Returns the variable positions of the template buffer return the variable positions of the template buffer public final Template Variable get Variables return f Variables  TemplateVariable getVariables fVariables

private static final class Proposal Comparator implements Comparator public int compare Object o1 Object o2 return Template Proposal o2 get Relevance Template Proposal o1 get Relevance  ProposalComparator TemplateProposal getRelevance TemplateProposal getRelevance
public I Completion Proposal compute Completion Proposals I Text Viewer viewer int offset I Text Selection selection I Text Selection viewer get Selection Provider get Selection adjust offset to end of normalized selection if selection get Offset offset offset selection get Offset selection get Length String prefix extract Prefix viewer offset Region region new Region offset prefix length prefix length Template Context context create Context viewer region if context null return new I Completion Proposal 0 context set Variable selection selection get Text name of the selection variables line word  selection NON NLS 1 Template templates get Templates context get Context Type get Id List matches new Array List for int i 0 i templates length i Template template templates i try context get Context Type validate template get Pattern catch Template Exception e continue if template matches prefix context get Context Type get Id matches add create Proposal template context region get Relevance template prefix Collections sort matches fg Proposal Comparator return I Completion Proposal matches to Array new I Completion Proposal matches size  ICompletionProposal computeCompletionProposals ITextViewer ITextSelection ITextSelection getSelectionProvider getSelection getOffset getOffset getLength extractPrefix TemplateContext createContext ICompletionProposal setVariable getText _selection getTemplates getContextType getId ArrayList getContextType getPattern TemplateException getContextType getId createProposal getRelevance fgProposalComparator ICompletionProposal toArray ICompletionProposal
Creates a new proposal p The default implementation returns an instance of link Template Proposal Subclasses may replace this method to provide their own implementations p param template the template to be applied by the proposal param context the context for the proposal param region the region the proposal applies to param relevance the relevance of the proposal return a new code I Completion Proposal code for code template code protected I Completion Proposal create Proposal Template template Template Context context Region region int relevance return new Template Proposal template context region get Image template relevance  TemplateProposal ICompletionProposal ICompletionProposal createProposal TemplateContext TemplateProposal getImage
Returns the templates valid for the context type specified by code context Type Id code param context Type Id the context type id return the templates valid for this context type id  contextTypeId contextTypeId
Creates a concrete template context for the given region in the document This involves finding out which context type is valid at the given location and then creating a context of this type The default implementation returns a code Document Template Context code for the context type at the given location param viewer the viewer for which the context is created param region the region into code document code for which the context is created return a template context that can handle template insertion at the given location or code null code protected Template Context create Context I Text Viewer viewer I Region region Template Context Type context Type get Context Type viewer region if context Type null I Document document viewer get Document return new Document Template Context context Type document region get Offset region get Length return null  DocumentTemplateContext TemplateContext createContext ITextViewer IRegion TemplateContextType contextType getContextType contextType IDocument getDocument DocumentTemplateContext contextType getOffset getLength
Returns the context type that can handle template insertion at the given region in the viewer s document param viewer the text viewer param region the region into the document displayed by viewer return the context type that can handle template expansion for the given location or code null code if none exists 
Returns the relevance of a template given a prefix The default implementation returns a number greater than zero if the template name starts with the prefix and zero otherwise param template the template to compute the relevance for param prefix the prefix after which content assist was requested return the relevance of code template code see extract Prefix I Text Viewer int protected int get Relevance Template template String prefix if template get Name starts With prefix return 90 return 0  extractPrefix ITextViewer getRelevance getName startsWith
Heuristically extracts the prefix used for determining template relevance from the viewer s document The default implementation returns the String from offset backwards that forms a java identifier param viewer the viewer param offset offset into document return the prefix to consider see get Relevance Template String protected String extract Prefix I Text Viewer viewer int offset int i offset I Document document viewer get Document if i document get Length return NON NLS 1 try while i 0 char ch document get Char i 1 if Character is Java Identifier Part ch break i return document get i offset i catch Bad Location Exception e return NON NLS 1  getRelevance extractPrefix ITextViewer IDocument getDocument getLength getChar isJavaIdentifierPart BadLocationException
Returns the image to be used for the proposal for code template code param template the template for which an image should be returned return the image for code template code 
see org eclipse jface text contentassist I Content Assist Processor compute Context Information org eclipse jface text I Text Viewer int public I Context Information compute Context Information I Text Viewer viewer int document Offset return null  IContentAssistProcessor computeContextInformation ITextViewer IContextInformation computeContextInformation ITextViewer documentOffset
see org eclipse jface text contentassist I Content Assist Processor get Completion Proposal Auto Activation Characters public char get Completion Proposal Auto Activation Characters return null  IContentAssistProcessor getCompletionProposalAutoActivationCharacters getCompletionProposalAutoActivationCharacters
see org eclipse jface text contentassist I Content Assist Processor get Context Information Auto Activation Characters public char get Context Information Auto Activation Characters return null  IContentAssistProcessor getContextInformationAutoActivationCharacters getContextInformationAutoActivationCharacters
see org eclipse jface text contentassist I Content Assist Processor get Error Message public String get Error Message return null  IContentAssistProcessor getErrorMessage getErrorMessage
see org eclipse jface text contentassist I Content Assist Processor get Context Information Validator public I Context Information Validator get Context Information Validator return null  IContentAssistProcessor getContextInformationValidator IContextInformationValidator getContextInformationValidator

Creates a template context of a particular context type param context Type the context type of this context protected Template Context Template Context Type context Type f Context Type context Type f Read Only true  contextType TemplateContext TemplateContextType contextType fContextType contextType fReadOnly
Returns the context type of this context return the context type of this context public Template Context Type get Context Type return f Context Type  TemplateContextType getContextType fContextType
Sets or clears the read only flag param read Only the new read only state public void set Read Only boolean read Only f Read Only read Only  readOnly setReadOnly readOnly fReadOnly readOnly
Returns code true code if the receiver is read only code false code otherwise return code true code if the receiver is read only code false code otherwise public boolean is Read Only return f Read Only  isReadOnly fReadOnly
Defines the value of a variable param name the name of the variable param value the value of the variable code null code to undefine a variable public void set Variable String name String value f Variables put name value  setVariable fVariables
Returns the value of a defined variable param name the name of the variable return returns the value of the variable code null code if the variable was not defined public String get Variable String name return String f Variables get name  getVariable fVariables
Evaluates the template in this context and returns a template buffer p Evaluation means translating the template into a code Template Buffer code resolving the defined variables in this context and possibly formatting the resolved buffer p param template the template to evaluate return returns the buffer with the evaluated template or code null code if the buffer could not be created throws Bad Location Exception if evaluation fails due to concurrently changed documents etc throws Template Exception if the template specification is not valid  TemplateBuffer BadLocationException TemplateException
Tests if the specified template can be evaluated in this context p Examples are templates defined for a different context e g a javadoc template cannot be evaluated in Java context p param template the code Template code to check return code true code if code template code can be evaluated in this context code false code otherwise 

Creates a context type with an identifier The identifier must be unique a qualified name is suggested The id is also used as name param id the unique identifier of the context type public Template Context Type String id this id id  TemplateContextType
Creates a context type with an identifier The identifier must be unique a qualified name is suggested param id the unique identifier of the context type param name the name of the context type public Template Context Type String id String name Assert is Not Null id Assert is Not Null name f Id id f Name name  TemplateContextType isNotNull isNotNull fId fName
Returns the name of the context type return the name of the receiver public String get Id return f Id  getId fId
Returns the name of the context type return the name of the context type public String get Name return f Name  getName fName
Creates a context type with a code null code identifier p This is a framework only constructor that exists only so that context types can be contributed via an extension point and that should not be called in client code except for subclass constructors use link Template Context Type String instead p public Template Context Type  TemplateContextType TemplateContextType
Sets the id of this context p This is a framework only method that exists solely so that context types can be contributed via an extension point and that should not be called in client code use link Template Context Type String instead p param id the identifier of this context throws Runtime Exception an unspecified exception if the id has already been set on this context type public final void set Id String id throws Runtime Exception Assert is Not Null id Assert is True f Id null may only be called once when the context is instantiated f Id id  TemplateContextType RuntimeException setId RuntimeException isNotNull isTrue fId fId
Sets the name of the context type p This is a framework only method that exists solely so that context types can be contributed via an extension point and that should not be called in client code use link Template Context Type String String instead p param name the name of the context type public final void set Name String name Assert is True f Name null only initialized by extension code f Name name  TemplateContextType setName isTrue fName fName
Adds a variable resolver to the context type If there already is a resolver for the same type the previous one gets replaced by code resolver code param resolver the resolver to be added under its name public void add Resolver Template Variable Resolver resolver Assert is Not Null resolver f Resolvers put resolver get Type resolver  addResolver TemplateVariableResolver isNotNull fResolvers getType
Removes a template variable from the context type param resolver the variable to be removed public void remove Resolver Template Variable Resolver resolver Assert is Not Null resolver f Resolvers remove resolver get Type  removeResolver TemplateVariableResolver isNotNull fResolvers getType
Removes all template variables from the context type public void remove All Resolvers f Resolvers clear  removeAllResolvers fResolvers
Returns an iterator for the variables known to the context type return an iterator over the variables in this context type public Iterator resolvers return Collections unmodifiable Map f Resolvers values iterator  unmodifiableMap fResolvers
Returns the resolver for the given type param type the type for which a resolver is needed return a resolver for the given type or code null code if none is registered protected Template Variable Resolver get Resolver String type return Template Variable Resolver f Resolvers get type  TemplateVariableResolver getResolver TemplateVariableResolver fResolvers
Validates a pattern a code Template Exception code is thrown if validation fails param pattern the template pattern to validate throws Template Exception if the pattern is invalid public void validate String pattern throws Template Exception Template Translator translator new Template Translator Template Buffer buffer translator translate pattern validate Variables buffer get Variables  TemplateException TemplateException TemplateException TemplateTranslator TemplateTranslator TemplateBuffer validateVariables getVariables
Validates the variables in this context type If a variable is not valid e g if its type is not known in this context type a code Template Exception code is thrown p The default implementation does nothing p param variables the variables to validate throws Template Exception if one of the variables is not valid in this context type protected void validate Variables Template Variable variables throws Template Exception  TemplateException TemplateException validateVariables TemplateVariable TemplateException
Resolves the variables in code buffer code within code context code and edits the template buffer to reflect the resolved variables param buffer the template buffer param context the template context throws Malformed Tree Exception if the positions in the buffer overlap throws Bad Location Exception if the buffer cannot be successfully modified public void resolve Template Buffer buffer Template Context context throws Malformed Tree Exception Bad Location Exception Assert is Not Null context Template Variable variables buffer get Variables List positions variables To Positions variables List edits new Array List 5 iterate over all variables and try to resolve them for int i 0 i variables length i Template Variable variable variables i if variable is Unambiguous continue remember old values int old Offsets variable get Offsets int old Length variable get Length String old Value variable get Default Value String type variable get Type Template Variable Resolver resolver Template Variable Resolver f Resolvers get type if resolver null resolver new Template Variable Resolver type NON NLS 1 resolver resolve variable context String value variable get Default Value if old Value equals value update buffer to reflect new value for int k 0 k old Offsets length k edits add new Replace Edit old Offsets k old Length value I Document document new Document buffer get String Multi Text Edit edit new Multi Text Edit 0 document get Length edit add Children Text Edit positions to Array new Text Edit positions size edit add Children Text Edit edits to Array new Text Edit edits size edit apply document Text Edit UPDATE REGIONS positions To Variables positions variables buffer set Content document get variables  MalformedTreeException BadLocationException TemplateBuffer TemplateContext MalformedTreeException BadLocationException isNotNull TemplateVariable getVariables variablesToPositions ArrayList TemplateVariable isUnambiguous oldOffsets getOffsets oldLength getLength oldValue getDefaultValue getType TemplateVariableResolver TemplateVariableResolver fResolvers TemplateVariableResolver getDefaultValue oldValue oldOffsets ReplaceEdit oldOffsets oldLength IDocument getString MultiTextEdit MultiTextEdit getLength addChildren TextEdit toArray TextEdit addChildren TextEdit toArray TextEdit TextEdit UPDATE_REGIONS positionsToVariables setContent
private static List variables To Positions Template Variable variables List positions new Array List 5 for int i 0 i variables length i int offsets variables i get Offsets for int j 0 j offsets length j positions add new Range Marker offsets j 0 return positions  variablesToPositions TemplateVariable ArrayList getOffsets RangeMarker
private static void positions To Variables List positions Template Variable variables Iterator iterator positions iterator for int i 0 i variables length i Template Variable variable variables i int offsets new int variable get Offsets length for int j 0 j offsets length j offsets j Text Edit iterator next get Offset variable set Offsets offsets  positionsToVariables TemplateVariable TemplateVariable getOffsets TextEdit getOffset setOffsets

Creates a new template exception public Template Exception super  TemplateException
Creates a new template exception param message the message describing the problem that arised public Template Exception String message super message  TemplateException
Creates a new template exception param message the message describing the problem that arised param cause the original exception public Template Exception String message Throwable cause super message cause  TemplateException
Creates a new template exception param cause the original exception public Template Exception Throwable cause super cause  TemplateException

Creates a template proposal with a template and its context param template the template param context the context in which the template was requested param regionthe region this proposal is applied to param image the icon of the proposal public Template Proposal Template template Template Context context I Region region Image image this template context region image 0  TemplateProposal TemplateContext IRegion
Creates a template proposal with a template and its context param template the template param context the context in which the template was requested param image the icon of the proposal param regionthe region this proposal is applied to param relevance the relevance of the proposal public Template Proposal Template template Template Context context I Region region Image image int relevance Assert is Not Null template Assert is Not Null context Assert is Not Null region f Template template f Context context f Image image f Region region f Display String null f Relevance relevance  TemplateProposal TemplateContext IRegion isNotNull isNotNull isNotNull fTemplate fContext fImage fRegion fDisplayString fRelevance
see I Completion Proposal apply I Document public final void apply I Document document not called anymore  ICompletionProposal IDocument IDocument
Inserts the template offered by this proposal into the viewer s document and sets up a code Linked ModeUI code on the viewer to edit any of the template s unresolved variables param viewer inherit Doc param trigger inherit Doc param state Mask inherit Doc param offset inherit Doc public void apply I Text Viewer viewer char trigger int state Mask int offset I Document document viewer get Document try f Context set Read Only false Template Buffer template Buffer try template Buffer f Context evaluate f Template catch Template Exception e1 f Selected Region f Region return int start get Replace Offset int end Math max get Replace End Offset offset insert template string String template String template Buffer get String document replace start end start template String translate positions Linked Mode Model model new Linked Mode Model Template Variable variables template Buffer get Variables boolean has Positions false for int i 0 i variables length i Template Variable variable variables i if variable is Unambiguous continue Linked Position Group group new Linked Position Group int offsets variable get Offsets int length variable get Length String values variable get Values I Completion Proposal proposals new I Completion Proposal values length for int j 0 j values length j ensure Position Category Installed document model Position pos new Position offsets 0 start length document add Position get Category pos proposals j new Position Based Completion Proposal values j pos length for int j 0 j offsets length j if j 0 proposals length 1 group add Position new Proposal Position document offsets j start length proposals else group add Position new Linked Position document offsets j start length model add Group group has Positions true if has Positions model force Install Linked ModeUI ui new Linked ModeUI model viewer ui set Exit Position viewer get Caret Offset template Buffer start 0 Integer MAX VALUE ui enter f Selected Region ui get Selected Region else ensure Position Category Removed document f Selected Region new Region get Caret Offset template Buffer start 0 catch Bad Location Exception e open Error Dialog viewer get Text Widget get Shell e ensure Position Category Removed document f Selected Region f Region catch Bad Position Category Exception e open Error Dialog viewer get Text Widget get Shell e f Selected Region f Region  LinkedModeUI inheritDoc inheritDoc stateMask inheritDoc inheritDoc ITextViewer stateMask IDocument getDocument fContext setReadOnly TemplateBuffer templateBuffer templateBuffer fContext fTemplate TemplateException fSelectedRegion fRegion getReplaceOffset getReplaceEndOffset templateString templateBuffer getString templateString LinkedModeModel LinkedModeModel TemplateVariable templateBuffer getVariables hasPositions TemplateVariable isUnambiguous LinkedPositionGroup LinkedPositionGroup getOffsets getLength getValues ICompletionProposal ICompletionProposal ensurePositionCategoryInstalled addPosition getCategory PositionBasedCompletionProposal addPosition ProposalPosition addPosition LinkedPosition addGroup hasPositions hasPositions forceInstall LinkedModeUI LinkedModeUI setExitPosition getCaretOffset templateBuffer MAX_VALUE fSelectedRegion getSelectedRegion ensurePositionCategoryRemoved fSelectedRegion getCaretOffset templateBuffer BadLocationException openErrorDialog getTextWidget getShell ensurePositionCategoryRemoved fSelectedRegion fRegion BadPositionCategoryException openErrorDialog getTextWidget getShell fSelectedRegion fRegion
see org eclipse jface text link I Linked Mode Listener left org eclipse jface text link Linked Mode Model int public void left Linked Mode Model environment int flags ensure Position Category Removed document  ILinkedModeListener LinkedModeModel LinkedModeModel ensurePositionCategoryRemoved
public void suspend Linked Mode Model environment  LinkedModeModel
public void suspend Linked Mode Model environment public void resume Linked Mode Model environment int flags  LinkedModeModel LinkedModeModel
private void ensure Position Category Installed final I Document document Linked Mode Model model if document contains Position Category get Category document add Position Category get Category f Updater new Inclusive Position Updater get Category document add Position Updater f Updater model add Linking Listener new I Linked Mode Listener see org eclipse jface text link I Linked Mode Listener left org eclipse jface text link Linked Mode Model int public void left Linked Mode Model environment int flags ensure Position Category Removed document public void suspend Linked Mode Model environment public void resume Linked Mode Model environment int flags  ensurePositionCategoryInstalled IDocument LinkedModeModel containsPositionCategory getCategory addPositionCategory getCategory fUpdater InclusivePositionUpdater getCategory addPositionUpdater fUpdater addLinkingListener ILinkedModeListener ILinkedModeListener LinkedModeModel LinkedModeModel ensurePositionCategoryRemoved LinkedModeModel LinkedModeModel
private void ensure Position Category Removed I Document document if document contains Position Category get Category try document remove Position Category get Category catch Bad Position Category Exception e ignore document remove Position Updater f Updater  ensurePositionCategoryRemoved IDocument containsPositionCategory getCategory removePositionCategory getCategory BadPositionCategoryException removePositionUpdater fUpdater
private String get Category return TemplateProposalCategory  to String NON NLS 1  getCategory TemplateProposalCategory_ toString
private int get Caret Offset Template Buffer buffer Template Variable variables buffer get Variables for int i 0 i variables length i Template Variable variable variables i if variable get Type equals Global Template Variables Cursor NAME return variable get Offsets 0 return buffer get String length  getCaretOffset TemplateBuffer TemplateVariable getVariables TemplateVariable getType GlobalTemplateVariables getOffsets getString
Returns the offset of the range in the document that will be replaced by applying this template return the offset of the range in the document that will be replaced by applying this template private int get Replace Offset int start if f Context instanceof Document Template Context Document Template Context doc Context Document Template Context f Context start doc Context get Start else start f Region get Offset return start  getReplaceOffset fContext DocumentTemplateContext DocumentTemplateContext docContext DocumentTemplateContext fContext docContext getStart fRegion getOffset
Returns the end offset of the range in the document that will be replaced by applying this template return the end offset of the range in the document that will be replaced by applying this template private int get Replace End Offset int end if f Context instanceof Document Template Context Document Template Context doc Context Document Template Context f Context end doc Context get End else end f Region get Offset f Region get Length return end  getReplaceEndOffset fContext DocumentTemplateContext DocumentTemplateContext docContext DocumentTemplateContext fContext docContext getEnd fRegion getOffset fRegion getLength
see I Completion Proposal get Selection I Document public Point get Selection I Document document return new Point f Selected Region get Offset f Selected Region get Length  ICompletionProposal getSelection IDocument getSelection IDocument fSelectedRegion getOffset fSelectedRegion getLength
public String get Additional Proposal Info try f Context set Read Only true Template Buffer template Buffer try template Buffer f Context evaluate f Template catch Template Exception e return null return template Buffer get String catch Bad Location Exception e return null  getAdditionalProposalInfo fContext setReadOnly TemplateBuffer templateBuffer templateBuffer fContext fTemplate TemplateException templateBuffer getString BadLocationException
public String get Display String if f Display String null f Display String f Template get Name J Face Text Template Messages get String Template Proposal delimiter f Template get Description NON NLS 1 return f Display String  getDisplayString fDisplayString fDisplayString fTemplate getName JFaceTextTemplateMessages getString TemplateProposal fTemplate getDescription fDisplayString
see I Completion Proposal get Image public Image get Image return f Image  ICompletionProposal getImage getImage fImage
see I Completion Proposal get Context Information public I Context Information get Context Information return null  ICompletionProposal getContextInformation IContextInformation getContextInformation
private void open Error Dialog Shell shell Exception e Message Dialog open Error shell J Face Text Template Messages get String Template Proposal error Dialog title e get Message NON NLS 1  openErrorDialog MessageDialog openError JFaceTextTemplateMessages getString TemplateProposal errorDialog getMessage
Returns the relevance return the relevance public int get Relevance return f Relevance  getRelevance fRelevance
see org eclipse jface text contentassist I Completion Proposal Extension3 get Information Control Creator public I Information Control Creator get Information Control Creator return new Template Information Control Creator return null  ICompletionProposalExtension3 getInformationControlCreator IInformationControlCreator getInformationControlCreator TemplateInformationControlCreator
see org eclipse jface text contentassist I Completion Proposal Extension2 selected org eclipse jface text I Text Viewer boolean public void selected I Text Viewer viewer boolean smart Toggle  ICompletionProposalExtension2 ITextViewer ITextViewer smartToggle
see org eclipse jface text contentassist I Completion Proposal Extension2 unselected org eclipse jface text I Text Viewer public void unselected I Text Viewer viewer  ICompletionProposalExtension2 ITextViewer ITextViewer
public boolean validate I Document document int offset Document Event event try int replace Offset get Replace Offset if offset replace Offset String content document get replace Offset offset replace Offset return f Template get Name starts With content catch Bad Location Exception e concurrent modification ignore return false  IDocument DocumentEvent replaceOffset getReplaceOffset replaceOffset replaceOffset replaceOffset fTemplate getName startsWith BadLocationException
see org eclipse jface text contentassist I Completion Proposal Extension3 get Replacement String public Char Sequence get Prefix Completion Text I Document document int completion Offset return f Template get Name  ICompletionProposalExtension3 getReplacementString CharSequence getPrefixCompletionText IDocument completionOffset fTemplate getName
see org eclipse jface text contentassist I Completion Proposal Extension3 get Replacement Offset public int get Prefix Completion Start I Document document int completion Offset return get Replace Offset  ICompletionProposalExtension3 getReplacementOffset getPrefixCompletionStart IDocument completionOffset getReplaceOffset
see org eclipse jface text contentassist I Completion Proposal Extension apply org eclipse jface text I Document char int public void apply I Document document char trigger int offset not called any longer  ICompletionProposalExtension IDocument IDocument
see org eclipse jface text contentassist I Completion Proposal Extension is Valid For org eclipse jface text I Document int public boolean is Valid For I Document document int offset not called any longer return false  ICompletionProposalExtension isValidFor IDocument isValidFor IDocument
see org eclipse jface text contentassist I Completion Proposal Extension get Trigger Characters public char get Trigger Characters no triggers return new char 0  ICompletionProposalExtension getTriggerCharacters getTriggerCharacters
see org eclipse jface text contentassist I Completion Proposal Extension get Context Information Position public int get Context Information Position return f Region get Offset  ICompletionProposalExtension getContextInformationPosition getContextInformationPosition fRegion getOffset

Returns an error message if an error occurred for the last translation code null code otherwise return the error message if an error occurred during the most recent translation code null code otherwise public String get Error Message return f Error Message  getErrorMessage fErrorMessage
Translates a template to a code Template Buffer code code null code is returned if there was an error code get Error Message code retrieves the associated error message param template the template to translate return returns the template buffer corresponding to the string code null code if there was an error see get Error Message throws Template Exception if translation failed public Template Buffer translate Template template throws Template Exception return translate template get Pattern  TemplateBuffer getErrorMessage getErrorMessage TemplateException TemplateBuffer TemplateException getPattern
Translates a template string to code Template Buffer code code null code is returned if there was an error code get Error Message code retrieves the associated error message param string the string to translate return returns the template buffer corresponding to the string code null code if there was an error see get Error Message throws Template Exception if translation failed public Template Buffer translate String string throws Template Exception f Buffer set Length 0 f Offsets clear f Lengths clear f State TEXT f Error Message null if parse string throw new Template Exception f Error Message switch f State case TEXT break illegal case ESCAPE throw new Template Exception Text Template Messages get String Template Translator error incomplete variable NON NLS 1 illegal case IDENTIFIER throw new Template Exception Text Template Messages get String Template Translator error incomplete variable NON NLS 1 int offsets new int f Offsets size int lengths new int f Lengths size for int i 0 i f Offsets size i offsets i Integer f Offsets get i int Value lengths i Integer f Lengths get i int Value String translated String f Buffer to String Template Variable variables find Variables translated String offsets lengths return new Template Buffer translated String variables  TemplateBuffer getErrorMessage getErrorMessage TemplateException TemplateBuffer TemplateException fBuffer setLength fOffsets fLengths fState fErrorMessage TemplateException fErrorMessage fState TemplateException TextTemplateMessages getString TemplateTranslator TemplateException TextTemplateMessages getString TemplateTranslator fOffsets fLengths fOffsets fOffsets intValue fLengths intValue translatedString fBuffer toString TemplateVariable findVariables translatedString TemplateBuffer translatedString
private Template Variable find Variables String string int offsets int lengths Map map new Hash Map for int i 0 i offsets length i int offset offsets i int length lengths i String content string substring offset offset length Vector vector Vector map get content if vector null vector new Vector map put content vector vector add new Integer offset Template Variable variables new Template Variable map size int k 0 Set keys map key Set for Iterator i keys iterator i has Next String name String i next Vector vector Vector map get name int offsets  new int vector size for int j 0 j offsets  length j offsets  j Integer vector get j int Value variables k create Variable name name offsets  k return variables  TemplateVariable findVariables HashMap TemplateVariable TemplateVariable keySet hasNext offsets_ offsets_ offsets_ intValue createVariable offsets_
Hook method to create new variables Subclasses may override to supply their custom variable type p Clients may replace this method p param type the type of the new variable param name the name of the new variable param offsets the offsets where the variable occurs in the template return a new instance of code Template Variable code protected Template Variable create Variable String type String name int offsets return new Template Variable type name offsets  TemplateVariable TemplateVariable createVariable TemplateVariable
Internal parser param string the string to parse return code true code if parsing was successful private boolean parse String string for int i 0 i string length i char ch string char At i switch f State case TEXT switch ch case ESCAPE CHARACTER f State ESCAPE break default f Buffer append ch break break case ESCAPE switch ch case ESCAPE CHARACTER f Buffer append ch f State TEXT break case IDENTIFIER BEGIN f Offsets add new Integer f Buffer length f State IDENTIFIER break default illegal single escape character but be tolerant f Error Message Text Template Messages get String Template Translator error incomplete variable NON NLS 1 f Buffer append ESCAPE CHARACTER f Buffer append ch f State TEXT return false break case IDENTIFIER switch ch case IDENTIFIER END int offset Integer f Offsets get f Offsets size 1 int Value f Lengths add new Integer f Buffer length offset f State TEXT break default if Character is Unicode Identifier Start ch Character is Unicode Identifier Part ch illegal identifier character f Error Message Text Template Messages get String Template Translator error invalid identifier NON NLS 1 return false f Buffer append ch break break return true  charAt fState ESCAPE_CHARACTER fState fBuffer ESCAPE_CHARACTER fBuffer fState IDENTIFIER_BEGIN fOffsets fBuffer fState fErrorMessage TextTemplateMessages getString TemplateTranslator fBuffer ESCAPE_CHARACTER fBuffer fState IDENTIFIER_END fOffsets fOffsets intValue fLengths fBuffer fState isUnicodeIdentifierStart isUnicodeIdentifierPart fErrorMessage TextTemplateMessages getString TemplateTranslator fBuffer

Creates a template variable The type is used as the name of the variable param type the type of the variable param default Value the default value of the variable param offsets the array of offsets of the variable public Template Variable String type String default Value int offsets this type new String default Value offsets  defaultValue TemplateVariable defaultValue defaultValue
Creates a template variable param type the type of the variable param name the name of the variable param default Value the default value of the variable param offsets the array of offsets of the variable public Template Variable String type String name String default Value int offsets this type name new String default Value offsets  defaultValue TemplateVariable defaultValue defaultValue
Creates a template variable with multiple possible values The type is used as the name of the template param type the type of the template variable param values the values available at this variable non empty param offsets the array of offsets of the variable public Template Variable String type String values int offsets this type type values offsets  TemplateVariable
Creates a template variable with multiple possible values param type the type of the variable param name the name of the variable param values the values available at this variable non empty param offsets the array of offsets of the variable public Template Variable String type String name String values int offsets Assert is Not Null type Assert is Not Null name f Type type f Name name set Values values set Offsets offsets set Unambiguous false  TemplateVariable isNotNull isNotNull fType fName setValues setOffsets setUnambiguous
Returns the type of the variable return the type of the variable public String get Type return f Type  getType fType
Returns the name of the variable return the name of the variable public String get Name return f Name  getName fName
Returns the default value of the variable return the default value of the variable public String get Default Value return get Values 0  getDefaultValue getValues
Returns the possible values for this variable The returned array is owned by this variable and must not be modified return the possible values for this variable public String get Values return f Values  getValues fValues
Returns the length of the variable return the length of the variable public int get Length return get Default Value length  getLength getDefaultValue
Sets the offsets of the variable param offsets the new offsets of the variable public void set Offsets int offsets f Offsets offsets  setOffsets fOffsets
Returns the offsets of the variable return the length of the variable public int get Offsets return f Offsets  getOffsets fOffsets
Sets the default value for this variable This is a shortcut for code set Values new String value code param value the new default value public final void set Value String value set Values new String value  setValues setValue setValues
Sets the possible values for this variable with the first being the default value param values a non empty array of values public void set Values String values Assert is True values length 0 f Values values  setValues isTrue fValues
Sets the is Unambiguous flag of the variable param unambiguous the new unambiguous state of the variable public void set Unambiguous boolean unambiguous f Is Unambiguous unambiguous  isUnambiguous setUnambiguous fIsUnambiguous
Returns code true code if the variable is unambiguously resolved code false code otherwise return code true code if the variable is unambiguously resolved code false code otherwise public boolean is Unambiguous return f Is Unambiguous  isUnambiguous fIsUnambiguous

Creates an instance of code Template Variable Resolver code param type the name of the type param description the description for the type protected Template Variable Resolver String type String description set Type type set Description description  TemplateVariableResolver TemplateVariableResolver setType setDescription
Creates an empty instance p This is a framework only constructor that exists only so that resolvers can be contributed via an extension point and that should not be called in client code except for subclass constructors use link Template Variable Resolver String String instead p public Template Variable Resolver  TemplateVariableResolver TemplateVariableResolver
Returns the type of this resolver return the type public String get Type return f Type  getType fType
Returns the description for the resolver return the description for the resolver public String get Description return f Description  getDescription fDescription
Returns an instance of the type resolved by the receiver available in code context code To resolve means to provide a binding to a concrete text object a code String code in the given context p The default implementation looks up the type in the context p param context the context in which to resolve the type return the name of the text object of this type or code null code if it cannot be determined protected String resolve Template Context context return context get Variable get Type  TemplateContext getVariable getType
Returns all possible bindings available in code context code The default implementation simply returns an array which contains the result of link resolve Template Context or an empty array if that call returns code null code param context the context in which to resolve the type return an array of possible bindings of this type in code context code protected String resolve All Template Context context String binding resolve context if binding null return new String 0 else return new String binding  TemplateContext resolveAll TemplateContext
Resolves code variable code in code context code To resolve means to find a valid binding of the receiver s type in the given code Template Context code If the variable can be successfully resolved its value is set using link Template Variable set Values String param context the context in which variable is resolved param variable the variable to resolve public void resolve Template Variable variable Template Context context String bindings resolve All context if bindings length 0 variable set Values bindings if bindings length 1 variable set Unambiguous false else variable set Unambiguous is Unambiguous context  TemplateContext TemplateVariable setValues TemplateVariable TemplateContext resolveAll setValues setUnambiguous setUnambiguous isUnambiguous
Returns whether this resolver is able to resolve unambiguously When resolving a code Template Variable code its code is Umambiguous code state is set to the one of this resolver By default this method returns code false code Clients can overwrite this method to give a hint about whether there should be e g prompting for input values for ambiguous variables param context the context in which the resolved check should be evaluated return code true code if the receiver is unambiguously resolvable in code context code code false code otherwise protected boolean is Unambiguous Template Context context return false  TemplateVariable isUmambiguous isUnambiguous TemplateContext
Sets the description p This is a framework only method that exists only so that resolvers can be contributed via an extension point and that should not be called in client code use link Template Variable Resolver String String instead p param description the description of this resolver public final void set Description String description Assert is Not Null description Assert is True f Description null may only be called once when initialized f Description description  TemplateVariableResolver setDescription isNotNull isTrue fDescription fDescription
Sets the type p This is a framework only method that exists only so that resolvers can be contributed via an extension point and that should not be called in client code use link Template Variable Resolver String String instead p param type the type of this resolver public final void set Type String type Assert is Not Null type Assert is True f Type null may only be called once when initialized f Type type  TemplateVariableResolver setType isNotNull isTrue fType fType

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Text Template Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE TextTemplateMessages
param key return public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key  getString fgResourceBundle getString MissingResourceException
Gets a string from the resource bundle and formats it with the argument param keythe string used to get the bundle value must not be null param arg return public static String get Formatted String String key Object arg return Message Format format get String key new Object arg  getFormattedString MessageFormat getString
Gets a string from the resource bundle and formats it with arguments param key param args return public static String get Formatted String String key Object args return Message Format format get String key args  getFormattedString MessageFormat getString

Creates a text attribute with the given colors and style param foreground the foreground color param background the background color param style the style public Text Attribute Color foreground Color background int style this foreground foreground this background background this style style  TextAttribute
Creates a text attribute for the given foreground color no background color and with the SWT normal style param foreground the foreground color public Text Attribute Color foreground this foreground null SWT NORMAL  TextAttribute
public boolean equals Object object if object this return true if object instanceof Text Attribute return false Text Attribute a Text Attribute object return a style style equals a foreground foreground equals a background background  TextAttribute TextAttribute TextAttribute
Returns whether the two given objects are equal param o1 the first object can be code null code param o2 the second object can be code null code return code true code if the given objects are equals since 2 0 private boolean equals Object o1 Object o2 if o1 null return o1 equals o2 return o2 null 
public int hash Code int foreground Hash foreground null 0 foreground hash Code int background Hash background null 0 background hash Code return foreground Hash 24 background Hash 16 style  hashCode foregroundHash hashCode backgroundHash hashCode foregroundHash backgroundHash
Returns the attribute s foreground color return the attribute s foreground color public Color get Foreground return foreground  getForeground
Returns the attribute s background color return the attribute s background color public Color get Background return background  getBackground
Returns the attribute s style return the attribute s style public int get Style return style  getStyle

Creates a new code Text Event code based on the specification param offset the offset param length the length param text the inserted text param replaced Text the replaced text param event the associated document event or code null code if none param viewer Redraw State the redraw state of the viewer protected Text Event int offset int length String text String replaced Text Document Event event boolean viewer Redraw State f Offset offset f Length length f Text text f Replaced Text replaced Text f Document Event event f Viewer Redraw State viewer Redraw State  TextEvent replacedText viewerRedrawState TextEvent replacedText DocumentEvent viewerRedrawState fOffset fLength fText fReplacedText replacedText fDocumentEvent fViewerRedrawState viewerRedrawState
Returns the offset of the event return the offset of the event public int get Offset return f Offset  getOffset fOffset
Returns the length of the event return the length of the event public int get Length return f Length  getLength fLength
Returns the text of the event return the text of the event public String get Text return f Text  getText fText
Returns the text replaced by this event return the text replaced by this event public String get Replaced Text return f Replaced Text  getReplacedText fReplacedText
Returns the corresponding document event that caused the viewer change return the corresponding document event code null code if a visual change only public Document Event get Document Event return f Document Event  DocumentEvent getDocumentEvent fDocumentEvent
Returns the viewer s redraw state return code true code if the viewer s redraw state is code true code since 2 0 public boolean get Viewer Redraw State return f Viewer Redraw State  getViewerRedrawState fViewerRedrawState

Applies the given presentation to the given text widget Helper method param presentation the style information param text the widget to which to apply the style information since 2 0 public static void apply Text Presentation Text Presentation presentation Styled Text text Style Range ranges new Style Range presentation get Denumerable Ranges int i 0 Iterator e presentation get All Style Range Iterator while e has Next ranges i Style Range e next text set Style Ranges ranges  applyTextPresentation TextPresentation StyledText StyleRange StyleRange getDenumerableRanges getAllStyleRangeIterator hasNext StyleRange setStyleRanges
code skip Defaults code tells the enumeration to skip all those style ranges which define the same style as the presentation s default style range param skip Defaults code false code if ranges similar to the default range should be enumerated protected Filter Iterator boolean skip Defaults f Skip Defaults skip Defaults f Window f Result Window f Index get First Index In Window f Window f Length get First Index After Window f Window if f Skip Defaults compute Index  skipDefaults skipDefaults FilterIterator skipDefaults fSkipDefaults skipDefaults fWindow fResultWindow fIndex getFirstIndexInWindow fWindow fLength getFirstIndexAfterWindow fWindow fSkipDefaults computeIndex
public Object next try Style Range r Style Range f Ranges get f Index return create Window Relative Range f Window r catch Array Index Out Of Bounds Exception x throw new No Such Element Exception finally if f Skip Defaults compute Index  StyleRange StyleRange fRanges fIndex createWindowRelativeRange fWindow ArrayIndexOutOfBoundsException NoSuchElementException fSkipDefaults computeIndex
see Iterator has Next public boolean has Next return f Index f Length  hasNext hasNext fIndex fLength
see Iterator remove public void remove throw new Unsupported Operation Exception  UnsupportedOperationException
Returns whether the given object should be skipped param o the object to be checked return code true code if the object should be skipped by the iterator protected boolean skip Object o Style Range r Style Range o return r similar To f Default Range  StyleRange StyleRange similarTo fDefaultRange
Computes the index of the styled range that is the next to be enumerated protected void compute Index while f Index f Length skip f Ranges get f Index f Index  computeIndex fIndex fLength fRanges fIndex fIndex
Creates a new empty text presentation public Text Presentation f Ranges new Array List 50  TextPresentation fRanges ArrayList
Creates a new empty text presentation code size Hint code tells the expected size of this presentation param size Hint the expected size of this presentation public Text Presentation int size Hint Assert is True size Hint 0 f Ranges new Array List size Hint  sizeHint sizeHint TextPresentation sizeHint isTrue sizeHint fRanges ArrayList sizeHint
Creates a new empty text presentation with the given extent code size Hint code tells the expected size of this presentation param extent the extent of the created code Text Presentation code param size Hint the expected size of this presentation since 3 0 public Text Presentation I Region extent int size Hint this size Hint Assert is Not Null extent f Extent extent  sizeHint TextPresentation sizeHint TextPresentation IRegion sizeHint sizeHint isNotNull fExtent
Sets the result window for this presentation When dealing with this presentation all ranges which are outside the result window are ignored For example the size of the presentation is 0 when there is no range inside the window even if there are ranges outside the window All methods are aware of the result window param result Window the result window public void set Result Window I Region result Window f Result Window result Window  resultWindow setResultWindow IRegion resultWindow fResultWindow resultWindow
Set the default style range of this presentation The default style range defines the overall area covered by this presentation and its style information param range the range describing the default region public void set Default Style Range Style Range range f Default Range range  setDefaultStyleRange StyleRange fDefaultRange
Returns this presentation s default style range The returned code Style Range code is relative to the start of the result window return this presentation s default style range public Style Range get Default Style Range Style Range range create Window Relative Range f Result Window f Default Range if range null return null else return Style Range range clone  StyleRange StyleRange getDefaultStyleRange StyleRange createWindowRelativeRange fResultWindow fDefaultRange StyleRange
Add the given range to the presentation The range must be a subrange of the presentation s default range param range the range to be added public void add Style Range Style Range range check Consistency range f Ranges add range  addStyleRange StyleRange checkConsistency fRanges
Replaces the given range in this presentation The range must be a subrange of the presentation s default range param range the range to be added since 3 0 public void replace Style Range Style Range range apply Style Range range false  replaceStyleRange StyleRange applyStyleRange
Merges the given range into this presentation The range must be a subrange of the presentation s default range param range the range to be added since 3 0 public void merge Style Range Style Range range apply Style Range range true  mergeStyleRange StyleRange applyStyleRange
Applies the given range to this presentation The range must be a subrange of the presentation s default range param range the range to be added param merge code true code if the style should be merged instead of replaced since 3 0 private void apply Style Range Style Range range boolean merge if range length 0 return check Consistency range int start range start int length range length int end start length if f Ranges size 0 Style Range default Range get Default Style Range if default Range null default Range range default Range start start default Range length length apply Style range default Range merge f Ranges add default Range else I Region range Region new Region start length int first get First Index In Window range Region if first f Ranges size Style Range default Range get Default Style Range if default Range null default Range range default Range start start default Range length length apply Style range default Range merge f Ranges add default Range return int last get First Index After Window range Region for int i first i last length 0 i Style Range current Style Range f Ranges get i int current Start current start int current End current Start current length if end current Start f Ranges add i range return if start current End continue Style Range current Copy null if end current End current Copy Style Range current clone if start current Start Apply background to new default range and add it Style Range default Range get Default Style Range if default Range null default Range new Style Range default Range start start default Range length current Start start apply Style range default Range merge f Ranges add i default Range i last Apply background to first part of current range current length Math min end current End current Start apply Style range current merge if start current Start Shorten the current range current length start current Start Apply the background to the rest of the current range and add it if current length 0 current Style Range current clone i last f Ranges add i current apply Style range current merge current start start current length Math min end current End start if end current End Add rest of current range current Copy start end current Copy length current End end i last f Ranges add i current Copy Update range range start current End range length Math max end current End 0 start range start length range length if length 0 Apply background to new default range and add it Style Range default Range get Default Style Range if default Range null default Range range default Range start start default Range length end start default Range background range background f Ranges add last default Range  applyStyleRange StyleRange checkConsistency fRanges StyleRange defaultRange getDefaultStyleRange defaultRange defaultRange defaultRange defaultRange applyStyle defaultRange fRanges defaultRange IRegion rangeRegion getFirstIndexInWindow rangeRegion fRanges StyleRange defaultRange getDefaultStyleRange defaultRange defaultRange defaultRange defaultRange applyStyle defaultRange fRanges defaultRange getFirstIndexAfterWindow rangeRegion StyleRange StyleRange fRanges currentStart currentEnd currentStart currentStart fRanges currentEnd StyleRange currentCopy currentEnd currentCopy StyleRange currentStart StyleRange defaultRange getDefaultStyleRange defaultRange defaultRange StyleRange defaultRange defaultRange currentStart applyStyle defaultRange fRanges defaultRange currentEnd currentStart applyStyle currentStart currentStart StyleRange fRanges applyStyle currentEnd currentEnd currentCopy currentCopy currentEnd fRanges currentCopy currentEnd currentEnd StyleRange defaultRange getDefaultStyleRange defaultRange defaultRange defaultRange defaultRange defaultRange fRanges defaultRange
Replaces the given ranges in this presentation Each range must be a subrange of the presentation s default range The ranges must be ordered by increasing offset and must not overlap but may be adjacent param ranges the ranges to be added since 3 0 public void replace Style Ranges Style Range ranges apply Style Ranges ranges false  replaceStyleRanges StyleRange applyStyleRanges
Merges the given ranges into this presentation Each range must be a subrange of the presentation s default range The ranges must be ordered by increasing offset and must not overlap but may be adjacent param ranges the ranges to be added since 3 0 public void merge Style Ranges Style Range ranges apply Style Ranges ranges true  mergeStyleRanges StyleRange applyStyleRanges
Applies the given ranges to this presentation Each range must be a subrange of the presentation s default range The ranges must be ordered by increasing offset and must not overlap but may be adjacent param ranges the ranges to be added param merge code true code if the style should be merged instead of replaced since 3 0 private void apply Style Ranges Style Range ranges boolean merge int j 0 Array List old Ranges f Ranges Array List new Ranges new Array List 2 ranges length old Ranges size for int i 0 n ranges length i n i Style Range range ranges i f Ranges old Ranges for get First Index After Window for int m get First Index After Window new Region range start range length j m j new Ranges add old Ranges get j f Ranges new Ranges for merge Style Range apply Style Range range merge for int m old Ranges size j m j new Ranges add old Ranges get j f Ranges new Ranges  applyStyleRanges StyleRange ArrayList oldRanges fRanges ArrayList newRanges ArrayList oldRanges StyleRange fRanges oldRanges getFirstIndexAfterWindow getFirstIndexAfterWindow newRanges oldRanges fRanges newRanges mergeStyleRange applyStyleRange oldRanges newRanges oldRanges fRanges newRanges
Applies the template s style to the target param template the style range to be used as template param target the style range to which to apply the template param merge code true code if the style should be merged instead of replaced since 3 0 private void apply Style Style Range template Style Range target boolean merge if merge if template foreground null target foreground template foreground if template background null target background template background target font Style template font Style else target foreground template foreground target background template background target font Style template font Style  applyStyle StyleRange StyleRange fontStyle fontStyle fontStyle fontStyle
Checks whether the given range is a subrange of the presentation s default style range param range the range to be checked exception Illegal Argument Exception if range is not a subrange of the presentation s default range private void check Consistency Style Range range if range null throw new Illegal Argument Exception if f Default Range null if range start f Default Range start range start f Default Range start int default End f Default Range start f Default Range length int end range start range length if end default End range length end default End  IllegalArgumentException checkConsistency StyleRange IllegalArgumentException fDefaultRange fDefaultRange fDefaultRange defaultEnd fDefaultRange fDefaultRange defaultEnd defaultEnd
Returns the index of the first range which overlaps with the specified window param window the window to be used for searching return the index of the first range overlapping with the window private int get First Index In Window I Region window if window null int start window get Offset int i 1 j f Ranges size while j i 1 int k i j 1 Style Range r Style Range f Ranges get k if r start r length start j k else i k return j return 0  getFirstIndexInWindow IRegion getOffset fRanges StyleRange StyleRange fRanges
Returns the index of the first range which comes after the specified window and does not overlap with this window param window the window to be used for searching return the index of the first range behind the window and not overlapping with the window private int get First Index After Window I Region window if window null int end window get Offset window get Length int i 1 j f Ranges size while j i 1 int k i j 1 Style Range r Style Range f Ranges get k if r start end i k else j k return j return f Ranges size  getFirstIndexAfterWindow IRegion getOffset getLength fRanges StyleRange StyleRange fRanges fRanges
Returns a style range which is relative to the specified window and appropriately clipped if necessary The original style range is not modified param window the reference window param range the absolute range return the window relative range based on the absolute range private Style Range create Window Relative Range I Region window Style Range range if window null range null return range int start range start window get Offset if start 0 start 0 int range End range start range length int window End window get Offset window get Length int end range End window End window End range End end window get Offset Style Range new Range Style Range range clone new Range start start new Range length end start return new Range  StyleRange createWindowRelativeRange IRegion StyleRange getOffset rangeEnd windowEnd getOffset getLength rangeEnd windowEnd windowEnd rangeEnd getOffset StyleRange newRange StyleRange newRange newRange newRange
Returns the region which is relative to the specified window and appropriately clipped if necessary param coverage the absolute coverage return the window relative region based on the absolute coverage since 3 0 private I Region create Window Relative Region I Region coverage if f Result Window null coverage null return coverage int start coverage get Offset f Result Window get Offset if start 0 start 0 int range End coverage get Offset coverage get Length int window End f Result Window get Offset f Result Window get Length int end range End window End window End range End end f Result Window get Offset return new Region start end start  IRegion createWindowRelativeRegion IRegion fResultWindow getOffset fResultWindow getOffset rangeEnd getOffset getLength windowEnd fResultWindow getOffset fResultWindow getLength rangeEnd windowEnd windowEnd rangeEnd fResultWindow getOffset
Returns an iterator which enumerates all style ranged which define a style different from the presentation s default style range The default style range is not enumerated return a style range iterator public Iterator get Non Default Style Range Iterator return new Filter Iterator f Default Range null  getNonDefaultStyleRangeIterator FilterIterator fDefaultRange
Returns an iterator which enumerates all style ranges of this presentation except the default style range The returned code Style Range code s are relative to the start of the presentation s result window return a style range iterator public Iterator get All Style Range Iterator return new Filter Iterator false  StyleRange getAllStyleRangeIterator FilterIterator
Returns whether this collection contains any style range including the default style range return code true code if there is no style range in this presentation public boolean is Empty return f Default Range null get Denumerable Ranges 0  isEmpty fDefaultRange getDenumerableRanges
Returns the number of style ranges in the presentation not counting the default style range return the number of style ranges in the presentation excluding the default style range public int get Denumerable Ranges int size get First Index After Window f Result Window get First Index In Window f Result Window return size 0 0 size  getDenumerableRanges getFirstIndexAfterWindow fResultWindow getFirstIndexInWindow fResultWindow
Returns the style range with the smallest offset ignoring the default style range or null if the presentation is empty return the style range with the smallest offset different from the default style range public Style Range get First Style Range try Style Range range Style Range f Ranges get get First Index In Window f Result Window return create Window Relative Range f Result Window range catch No Such Element Exception x return null  StyleRange getFirstStyleRange StyleRange StyleRange fRanges getFirstIndexInWindow fResultWindow createWindowRelativeRange fResultWindow NoSuchElementException
Returns the style range with the highest offset ignoring the default style range return the style range with the highest offset different from the default style range public Style Range get Last Style Range try Style Range range Style Range f Ranges get get First Index After Window f Result Window 1 return create Window Relative Range f Result Window range catch No Such Element Exception x return null  StyleRange getLastStyleRange StyleRange StyleRange fRanges getFirstIndexAfterWindow fResultWindow createWindowRelativeRange fResultWindow NoSuchElementException
Returns the coverage of this presentation as clipped by the presentation s result window return the coverage of this presentation public I Region get Coverage if f Default Range null Style Range range get Default Style Range return new Region range start range length Style Range first get First Style Range Style Range last get Last Style Range if first null last null return null return new Region first start last start first start last length  IRegion getCoverage fDefaultRange StyleRange getDefaultStyleRange StyleRange getFirstStyleRange StyleRange getLastStyleRange
Returns the extent of this presentation clipped by the presentation s result window return the clipped extent since 3 0 public I Region get Extent if f Extent null return create Window Relative Region f Extent else return get Coverage  IRegion getExtent fExtent createWindowRelativeRegion fExtent getCoverage
Clears this presentation by resetting all applied changes since 2 0 public void clear f Default Range null f Result Window null f Ranges clear  fDefaultRange fResultWindow fRanges

Returns a shared instance of an empty text selection return a shared instance of an empty text selection public static I Text Selection empty Selection return NULL  ITextSelection emptySelection
Creates an empty text selection private Text Selection this null 1 1  TextSelection
Creates a text selection for the given range This selection object describes generically a text range and is intended to be an argument for the code set Selection code method of selection providers param offset the offset of the range param length the length of the range public Text Selection int offset int length this null offset length  setSelection TextSelection
Creates a text selection for the given range of the given document This selection object is created by selection providers in responds code get Selection code param document the document whose text range is selected in a viewer param offset the offset of the selected range param length the length of the selected range public Text Selection I Document document int offset int length f Document document f Offset offset f Length length  getSelection TextSelection IDocument fDocument fOffset fLength
Returns true if the offset and length are smaller than 0 A selection of length 0 is a valid text selection as it describes e g the cursor position in a viewer return code true code if this selection is empty see org eclipse jface viewers I Selection is Empty public boolean is Empty return f Offset 0 f Length 0  ISelection isEmpty isEmpty fOffset fLength
see org eclipse jface text I Text Selection get Offset public int get Offset return f Offset  ITextSelection getOffset getOffset fOffset
see org eclipse jface text I Text Selection get Length public int get Length return f Length  ITextSelection getLength getLength fLength
public int get Start Line try if f Document null return f Document get Line Of Offset f Offset catch Bad Location Exception x return 1  getStartLine fDocument fDocument getLineOfOffset fOffset BadLocationException
public int get End Line try if f Document null int end Offset f Offset f Length if f Length 0 end Offset return f Document get Line Of Offset end Offset catch Bad Location Exception x return 1  getEndLine fDocument endOffset fOffset fLength fLength endOffset fDocument getLineOfOffset endOffset BadLocationException
public String get Text try if f Document null return f Document get f Offset f Length catch Bad Location Exception x return null  getText fDocument fDocument fOffset fLength BadLocationException
public boolean equals Object obj if obj this return true if obj null get Class obj get Class return false Text Selection s Text Selection obj boolean same Range s f Offset f Offset s f Length f Length if same Range if s f Document null f Document null return true if s f Document null f Document null return false try String s Content s f Document get f Offset f Length String content f Document get f Offset f Length return s Content equals content catch Bad Location Exception x return false  getClass getClass TextSelection TextSelection sameRange fOffset fOffset fLength fLength sameRange fDocument fDocument fDocument fDocument sContent fDocument fOffset fLength fDocument fOffset fLength sContent BadLocationException
see java lang Object hash Code public int hash Code int low f Document null f Document hash Code 0 return f Offset 24 f Length 16 low  hashCode hashCode fDocument fDocument hashCode fOffset fLength

Determines which one of default line delimiters appears first in the list If none of them the hint is returned param text the text to be checked param hint the line delimiter hint return the line delimiter public static String determine Line Delimiter String text String hint try int info index Of DELIMITERS text 0 return DELIMITERS info 1 catch Array Index Out Of Bounds Exception x return hint  determineLineDelimiter indexOf ArrayIndexOutOfBoundsException
Returns the starting position and the index of the longest matching search string in the given text that is greater than the given offset Returns code 1 1 code if no match can be found param search Strings the strings to search for param text the text to be searched param offset the offset at which to start the search return an code int code with two elements the first is the starting offset the second the index of the found search string in the given code search Strings code array returns code 1 1 code if no match exists public static int index Of String search Strings String text int offset int result 1 1 int zero Index 1 for int i 0 i search Strings length i int length search Strings i length if length 0 zero Index i continue int index text index Of search Strings i offset if index 0 if result 0 1 result 0 index result 1 i else if index result 0 result 0 index result 1 i else if index result 0 length search Strings result 1 length result 0 index result 1 i if zero Index 1 result 0 1 result 0 0 result 1 zero Index return result  searchStrings searchStrings indexOf searchStrings zeroIndex searchStrings searchStrings zeroIndex indexOf searchStrings searchStrings zeroIndex zeroIndex
Returns the index of the longest search string with which the given text ends or code 1 code if none matches param search Strings the strings to search for param text the text to search return the index in code search Strings code of the longest string with which code text code ends or code 1 code public static int ends With String search Strings String text int index 1 for int i 0 i search Strings length i if text ends With search Strings i if index 1 search Strings i length search Strings index length index i return index  searchStrings searchStrings endsWith searchStrings searchStrings endsWith searchStrings searchStrings searchStrings
Returns the index of the longest search string with which the given text starts or code 1 code if none matches param search Strings the strings to search for param text the text to search return the index in code search Strings code of the longest string with which code text code starts or code 1 code public static int starts With String search Strings String text int index 1 for int i 0 i search Strings length i if text starts With search Strings i if index 1 search Strings i length search Strings index length index i return index  searchStrings searchStrings startsWith searchStrings searchStrings startsWith searchStrings searchStrings searchStrings
Returns the index of the first compare string that equals the given text or code 1 code if none is equal param compare Strings the strings to compare with param text the text to check return the index of the first equal compare string or code 1 code public static int equals String compare Strings String text for int i 0 i compare Strings length i if text equals compare Strings i return i return 1  compareStrings compareStrings compareStrings compareStrings
Returns a document event which is an accumulation of a list of document events code null code if the list of document Events is empty The document of the document events are ignored param unprocessed Document the document to which the document events would be applied param document Events the list of document events to merge return returns the merged document event throws Bad Location Exception might be thrown if document is not in the correct state with respect to document events public static Document Event merge Unprocessed Document Events I Document unprocessed Document List document Events throws Bad Location Exception if document Events size 0 return null final Iterator iterator document Events iterator final Document Event first Event Document Event iterator next current merged event final I Document document unprocessed Document int offset first Event get Offset int length first Event get Length final String Buffer text new String Buffer first Event get Text null first Event get Text NON NLS 1 while iterator has Next final int delta text length length final Document Event event Document Event iterator next final int event Offset event get Offset final int event Length event get Length final String event Text event get Text null event get Text NON NLS 1 event is right from merged event if event Offset offset length delta final String string document get offset length event Offset delta offset length text append string text append event Text length event Offset delta event Length offset event is left from merged event else if event Offset event Length offset final String string document get event Offset event Length offset event Offset event Length text insert 0 string text insert 0 event Text length offset length event Offset offset event Offset events overlap each other else final int start Math max 0 event Offset offset final int end Math min text length event Length event Offset offset text replace start end event Text offset Math min offset event Offset final int total Delta delta event Text length event Length length text length total Delta return new Document Event document offset length text to String  documentEvents unprocessedDocument documentEvents BadLocationException DocumentEvent mergeUnprocessedDocumentEvents IDocument unprocessedDocument documentEvents BadLocationException documentEvents documentEvents DocumentEvent firstEvent DocumentEvent IDocument unprocessedDocument firstEvent getOffset firstEvent getLength StringBuffer StringBuffer firstEvent getText firstEvent getText hasNext DocumentEvent DocumentEvent eventOffset getOffset eventLength getLength eventText getText getText eventOffset eventOffset eventText eventOffset eventLength eventOffset eventLength eventOffset eventLength eventOffset eventLength eventText eventOffset eventOffset eventOffset eventLength eventOffset eventText eventOffset totalDelta eventText eventLength totalDelta DocumentEvent toString
Returns a document event which is an accumulation of a list of document events code null code if the list of document events is empty The document events being merged must all refer to the same document to which the document changes have been already applied param document Events the list of document events to merge return returns the merged document event throws Bad Location Exception might be thrown if document is not in the correct state with respect to document events public static Document Event merge Processed Document Events List document Events throws Bad Location Exception if document Events size 0 return null final List Iterator iterator document Events list Iterator document Events size final Document Event first Event Document Event iterator previous current merged event final I Document document first Event get Document int offset first Event get Offset int length first Event get Length int text Length first Event get Text null 0 first Event get Text length while iterator has Previous final int delta length text Length final Document Event event Document Event iterator previous final int event Offset event get Offset final int event Length event get Length final int event Text Length event get Text null 0 event get Text length event is right from merged event if event Offset offset text Length delta length event Offset delta offset text Length length event Length text Length event Offset delta event Text Length offset event is left from merged event else if event Offset event Text Length offset length offset event Offset event Text Length length event Length text Length offset text Length event Offset offset event Offset events overlap each other else final int start Math max 0 event Offset offset final int end Math min length event Text Length event Offset offset length event Length end start offset Math min offset event Offset final int total Delta delta event Length event Text Length text Length length total Delta final String text document get offset text Length return new Document Event document offset length text  documentEvents BadLocationException DocumentEvent mergeProcessedDocumentEvents documentEvents BadLocationException documentEvents ListIterator documentEvents listIterator documentEvents DocumentEvent firstEvent DocumentEvent IDocument firstEvent getDocument firstEvent getOffset firstEvent getLength textLength firstEvent getText firstEvent getText hasPrevious textLength DocumentEvent DocumentEvent eventOffset getOffset eventLength getLength eventTextLength getText getText eventOffset textLength eventOffset textLength eventLength textLength eventOffset eventTextLength eventOffset eventTextLength eventOffset eventTextLength eventLength textLength textLength eventOffset eventOffset eventOffset eventTextLength eventOffset eventLength eventOffset totalDelta eventLength eventTextLength textLength totalDelta textLength DocumentEvent
Removes all connected document partitioners from the given document and stores them under their partitioning name in a map This map is returned After this method has been called the given document is no longer connected to any document partitioner param document the document return the map containing the removed partitioners public static Map remove Document Partitioners I Document document Map partitioners new Hash Map if document instanceof I Document Extension3 I Document Extension3 extension3 I Document Extension3 document String partitionings extension3 get Partitionings for int i 0 i partitionings length i I Document Partitioner partitioner extension3 get Document Partitioner partitionings i if partitioner null extension3 set Document Partitioner partitionings i null partitioner disconnect partitioners put partitionings i partitioner else I Document Partitioner partitioner document get Document Partitioner if partitioner null document set Document Partitioner null partitioner disconnect partitioners put I Document Extension3 DEFAULT PARTITIONING partitioner return partitioners  removeDocumentPartitioners IDocument HashMap IDocumentExtension3 IDocumentExtension3 IDocumentExtension3 getPartitionings IDocumentPartitioner getDocumentPartitioner setDocumentPartitioner IDocumentPartitioner getDocumentPartitioner setDocumentPartitioner IDocumentExtension3 DEFAULT_PARTITIONING
Connects the given document with all document partitioners stored in the given map under their partitioning name This method cleans the given map param document the document param partitioners the map containing the partitioners to be connected since 3 0 public static void add Document Partitioners I Document document Map partitioners if document instanceof I Document Extension3 I Document Extension3 extension3 I Document Extension3 document Iterator e partitioners key Set iterator while e has Next String partitioning String e next I Document Partitioner partitioner I Document Partitioner partitioners get partitioning partitioner connect document extension3 set Document Partitioner partitioning partitioner partitioners clear else I Document Partitioner partitioner I Document Partitioner partitioners get I Document Extension3 DEFAULT PARTITIONING partitioner connect document document set Document Partitioner partitioner  addDocumentPartitioners IDocument IDocumentExtension3 IDocumentExtension3 IDocumentExtension3 keySet hasNext IDocumentPartitioner IDocumentPartitioner setDocumentPartitioner IDocumentPartitioner IDocumentPartitioner IDocumentExtension3 DEFAULT_PARTITIONING setDocumentPartitioner
Returns the content type at the given offset of the given document param document the document param partitioning the partitioning to be used param offset the offset param prefer Open Partitions code true code if precedence should be given to a open partition ending at code offset code over a closed partition starting at code offset code return the content type at the given offset of the document throws Bad Location Exception if offset is invalid in the document since 3 0 public static String get Content Type I Document document String partitioning int offset boolean prefer Open Partitions throws Bad Location Exception if document instanceof I Document Extension3 I Document Extension3 extension3 I Document Extension3 document try return extension3 get Content Type partitioning offset prefer Open Partitions catch Bad Partitioning Exception x return I Document DEFAULT CONTENT TYPE else return document get Content Type offset  preferOpenPartitions BadLocationException getContentType IDocument preferOpenPartitions BadLocationException IDocumentExtension3 IDocumentExtension3 IDocumentExtension3 getContentType preferOpenPartitions BadPartitioningException IDocument DEFAULT_CONTENT_TYPE getContentType
Returns the partition of the given offset of the given document param document the document param partitioning the partitioning to be used param offset the offset param prefer Open Partitions code true code if precedence should be given to a open partition ending at code offset code over a closed partition starting at code offset code return the content type at the given offset of this viewer s input document throws Bad Location Exception if offset is invalid in the given document since 3 0 public static I Typed Region get Partition I Document document String partitioning int offset boolean prefer Open Partitions throws Bad Location Exception if document instanceof I Document Extension3 I Document Extension3 extension3 I Document Extension3 document try return extension3 get Partition partitioning offset prefer Open Partitions catch Bad Partitioning Exception x return new Typed Region 0 document get Length I Document DEFAULT CONTENT TYPE else return document get Partition offset  preferOpenPartitions BadLocationException ITypedRegion getPartition IDocument preferOpenPartitions BadLocationException IDocumentExtension3 IDocumentExtension3 IDocumentExtension3 getPartition preferOpenPartitions BadPartitioningException TypedRegion getLength IDocument DEFAULT_CONTENT_TYPE getPartition
Computes and returns the partitioning for the given region of the given document for the given partitioning name param document the document param partitioning the partitioning name param offset the region offset param length the region length param include Zero Length Partitions whether to include zero length partitions return the partitioning for the given region of the given document for the given partitioning name throws Bad Location Exception if the given region is invalid for the given document since 3 0 public static I Typed Region compute Partitioning I Document document String partitioning int offset int length boolean include Zero Length Partitions throws Bad Location Exception if document instanceof I Document Extension3 I Document Extension3 extension3 I Document Extension3 document try return extension3 compute Partitioning partitioning offset length include Zero Length Partitions catch Bad Partitioning Exception x return new I Typed Region 0 else return document compute Partitioning offset length  includeZeroLengthPartitions BadLocationException ITypedRegion computePartitioning IDocument includeZeroLengthPartitions BadLocationException IDocumentExtension3 IDocumentExtension3 IDocumentExtension3 computePartitioning includeZeroLengthPartitions BadPartitioningException ITypedRegion computePartitioning
Computes and returns the partition managing position categories for the given document or code null code if this was impossible param document the document return the partition managing position categories since 3 0 public static String compute Partition Managing Categories I Document document if document instanceof I Document Extension3 I Document Extension3 extension3 I Document Extension3 document String partitionings extension3 get Partitionings if partitionings null Set categories new Hash Set for int i 0 i partitionings length i I Document Partitioner p extension3 get Document Partitioner partitionings i if p instanceof I Document Partitioner Extension2 I Document Partitioner Extension2 extension2 I Document Partitioner Extension2 p String c extension2 get Managing Position Categories if c null for int j 0 j c length j categories add c j String result new String categories size categories to Array result return result return null  computePartitionManagingCategories IDocument IDocumentExtension3 IDocumentExtension3 IDocumentExtension3 getPartitionings HashSet IDocumentPartitioner getDocumentPartitioner IDocumentPartitionerExtension2 IDocumentPartitionerExtension2 IDocumentPartitionerExtension2 getManagingPositionCategories toArray
Returns the default line delimiter for the given document This is either the delimiter of the first line or the platform line delimiter if it is a legal line delimiter or the first one of the legal line delimiters The default line delimiter should be used when performing document manipulations that span multiple lines param document the document return the document s default line delimiter since 3 0 public static String get Default Line Delimiter I Document document String line Delimiter null try line Delimiter document get Line Delimiter 0 catch Bad Location Exception x if line Delimiter null String sys Line Delimiter System get Property line separator NON NLS 1 String delimiters document get Legal Line Delimiters Assert is True delimiters length 0 for int i 0 i delimiters length i if delimiters i equals sys Line Delimiter line Delimiter sys Line Delimiter break if line Delimiter null line Delimiter delimiters 0 return line Delimiter  getDefaultLineDelimiter IDocument lineDelimiter lineDelimiter getLineDelimiter BadLocationException lineDelimiter sysLineDelimiter getProperty getLegalLineDelimiters isTrue sysLineDelimiter lineDelimiter sysLineDelimiter lineDelimiter lineDelimiter lineDelimiter
Returns code true code if the two regions overlap Returns code false code if one of the arguments is code null code param left the left region param right the right region return code true code if the two regions overlap code false code otherwise since 3 0 public static boolean overlaps I Region left I Region right if left null right null return false int right End right get Offset right get Length int left End left get Offset left get Length if right get Length 0 if left get Length 0 return left get Offset right End right get Offset left End return right get Offset left get Offset left get Offset right End if left get Length 0 return left get Offset right get Offset right get Offset left End return left get Offset right get Offset  IRegion IRegion rightEnd getOffset getLength leftEnd getOffset getLength getLength getLength getOffset rightEnd getOffset leftEnd getOffset getOffset getOffset rightEnd getLength getOffset getOffset getOffset leftEnd getOffset getOffset

Translates a document event into the presentation coordinates of this text viewer param e the event to be translated public void set Event Document Event e event e start e get Offset length e get Length text e get Text if length 0 try if e instanceof Slave Document Event Slave Document Event slave Slave Document Event e Document Event master slave get Master Event if master null preserved Text master get Document get master get Offset master get Length else preserved Text e get Document get e get Offset e get Length catch Bad Location Exception x preserved Text null if TRACE ERRORS System out println J Face Text Messages get String Text Viewer error bad location Widget Command set Event NON NLS 1 else preserved Text null  setEvent DocumentEvent getOffset getLength getText SlaveDocumentEvent SlaveDocumentEvent SlaveDocumentEvent DocumentEvent getMasterEvent preservedText getDocument getOffset getLength preservedText getDocument getOffset getLength BadLocationException preservedText TRACE_ERRORS JFaceTextMessages getString TextViewer bad_location WidgetCommand setEvent preservedText
Creates a new text double click strategy adapter public Text Double Click Strategy Connector  TextDoubleClickStrategyConnector
see Mouse Listener mouse Double Click Mouse Event public void mouse Double Click Mouse Event e f Double Clicked true  MouseListener mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent fDoubleClicked
public void mouse Up Mouse Event e if f Double Clicked f Double Clicked false I Text Double Click Strategy s I Text Double Click Strategy select Content Type Plugin get Selected Range x f Double Click Strategies if s null s double Clicked Text Viewer this  mouseUp MouseEvent fDoubleClicked fDoubleClicked ITextDoubleClickStrategy ITextDoubleClickStrategy selectContentTypePlugin getSelectedRange fDoubleClickStrategies doubleClicked TextViewer
see Control Listener control Resized Control Event public void control Resized Control Event e update Viewport Listeners RESIZE  ControlListener controlResized ControlEvent controlResized ControlEvent updateViewportListeners
see Control Listener control Moved Control Event public void control Moved Control Event e  ControlListener controlMoved ControlEvent controlMoved ControlEvent
see Key Listener key Released public void key Released Key Event e update Viewport Listeners KEY  KeyListener keyReleased keyReleased KeyEvent updateViewportListeners
see Key Listener key Pressed public void key Pressed Key Event e update Viewport Listeners KEY  KeyListener keyPressed keyPressed KeyEvent updateViewportListeners
public void mouse Up Mouse Event e if f Text Widget null f Text Widget remove Selection Listener this update Viewport Listeners MOUSE END  mouseUp MouseEvent fTextWidget fTextWidget removeSelectionListener updateViewportListeners MOUSE_END
see Mouse Listener mouse Down public void mouse Down Mouse Event e if f Text Widget null f Text Widget add Selection Listener this  MouseListener mouseDown mouseDown MouseEvent fTextWidget fTextWidget addSelectionListener
public void widget Selected Selection Event e if e widget f Scroller update Viewport Listeners SCROLLER else update Viewport Listeners MOUSE  widgetSelected SelectionEvent fScroller updateViewportListeners updateViewportListeners
see Selection Listener widget Default Selected public void widget Default Selected Selection Event e  SelectionListener widgetDefaultSelected widgetDefaultSelected SelectionEvent
Creates the position updater for the given category param category the category this updater takes care of protected Shift Position Updater String category super category  ShiftPositionUpdater
If an insertion happens at the selection s start offset the position is extended rather than shifted protected void adapt To Insert int my Start f Position offset int my End f Position offset f Position length 1 my End Math max my Start my End int yours Start f Offset int yours End f Offset f Replace Length 1 yours End Math max yours Start yours End if my End yours Start return if my Start yours Start f Position length f Replace Length return if my Start yours Start f Position offset f Replace Length  adaptToInsert myStart fPosition myEnd fPosition fPosition myEnd myStart myEnd yoursStart fOffset yoursEnd fOffset fReplaceLength yoursEnd yoursStart yoursEnd myEnd yoursStart myStart yoursStart fPosition fReplaceLength myStart yoursStart fPosition fReplaceLength
public void document About To Be Changed Document Event e if e get Document get Visible Document f Widget Command set Event e handle Visible Document About To Be Changed e  documentAboutToBeChanged DocumentEvent getDocument getVisibleDocument fWidgetCommand setEvent handleVisibleDocumentAboutToBeChanged
public void document Changed Document Event e if f Widget Command event e update Text Listeners f Widget Command f Last Sent Selection Change null handle Visible Document Changed e  documentChanged DocumentEvent fWidgetCommand updateTextListeners fWidgetCommand fLastSentSelectionChange handleVisibleDocumentChanged
Tells the listener to forward received events param forward code true code if forwarding should be enabled since 2 0 public void forward boolean forward f Forward forward  fForward
see Verify Listener verify Text Verify Event public void verify Text Verify Event e if f Forward handle Verify Event e  VerifyListener verifyText VerifyEvent verifyText VerifyEvent fForward handleVerifyEvent
Creates a new batch containing the given listener for the given index param l the listener to be added param i the index at which to insert the listener public Batch Verify Key Listener l int i listener l index i  VerifyKeyListener
public void verify Key Verify Event event if f Listeners is Empty return try f Reentrance Count Iterator iterator f Listeners iterator while iterator has Next event doit Verify Key Listener listener Verify Key Listener iterator next listener verify Key event we might trigger reentrant calls on GTK finally f Reentrance Count if f Reentrance Count 0 process Batched Requests  verifyKey VerifyEvent fListeners isEmpty fReentranceCount fListeners hasNext VerifyKeyListener VerifyKeyListener verifyKey fReentranceCount fReentranceCount processBatchedRequests
Processes the pending batched requests private void process Batched Requests if f Batched is Empty Iterator e f Batched iterator while e has Next Batch batch Batch e next insert Listener batch listener batch index f Batched clear  processBatchedRequests fBatched isEmpty fBatched hasNext insertListener fBatched
Returns the number of registered verify key listeners return the number of registered verify key listeners public int number Of Listeners return f Listeners size  numberOfListeners fListeners
Inserts the given listener at the given index or moves it to that index param listener the listener to be inserted param index the index of the listener or 1 for remove public void insert Listener Verify Key Listener listener int index if index 1 remove Listener listener else if listener null if f Reentrance Count 0 f Batched add new Batch listener index else int idx 1 find index based on identity int size f Listeners size for int i 0 i size i if listener f Listeners get i idx i break move or add it if idx index if idx 1 f Listeners remove idx if index f Listeners size f Listeners add listener else f Listeners add index listener if size 0 checking old size i e current size size 1 install  insertListener VerifyKeyListener removeListener fReentranceCount fBatched fListeners fListeners fListeners fListeners fListeners fListeners
Removes the given listener param listener the listener to be removed public void remove Listener Verify Key Listener listener if listener null return if f Reentrance Count 0 f Batched add new Batch listener 1 else int size f Listeners size for int i 0 i size i if listener f Listeners get i f Listeners remove i if size 1 checking old size i e current size size 1 uninstall return  removeListener VerifyKeyListener fReentranceCount fBatched fListeners fListeners fListeners
Installs this manager private void install Styled Text text Widget get Text Widget if text Widget null text Widget is Disposed text Widget add Verify Key Listener this  StyledText textWidget getTextWidget textWidget textWidget isDisposed textWidget addVerifyKeyListener
Uninstalls this manager private void uninstall Styled Text text Widget get Text Widget if text Widget null text Widget is Disposed text Widget remove Verify Key Listener this  StyledText textWidget getTextWidget textWidget textWidget isDisposed textWidget removeVerifyKeyListener
Creates a new find replace range with the given extent param range the extent of this range public Find Replace Range I Region range set Range range  FindReplaceRange IRegion setRange
Sets the extent of this range param range the extent of this range public void set Range I Region range f Position new Position range get Offset range get Length  setRange IRegion fPosition getOffset getLength
Returns the extent of this range return the extent of this range public I Region get Range return new Region f Position get Offset f Position get Length  IRegion getRange fPosition getOffset fPosition getLength
Sets the highlight color of this range Causes the range to be redrawn param color the highlight color public void set Highlight Color Color color f Highlight Color color paint  setHighlightColor fHighlightColor
public void line Get Background Line Background Event event Don t use cached line information because of patched redrawing events if f Text Widget null int offset widget Offset2 Model Offset event line Offset if f Position includes offset event line Background f Highlight Color  lineGetBackground LineBackgroundEvent fTextWidget widgetOffset2ModelOffset lineOffset fPosition lineBackground fHighlightColor
Installs this range The range registers itself as background line painter and text listener Also it creates a category with the viewer s document to maintain its own extent public void install Text Viewer this add Text Listener this f Text Widget add Line Background Listener this I Document document Text Viewer this get Document try document add Position Category RANGE CATEGORY document add Position RANGE CATEGORY f Position document add Position Updater this catch Bad Position Category Exception e should not happen catch Bad Location Exception e should not happen paint  TextViewer addTextListener fTextWidget addLineBackgroundListener IDocument TextViewer getDocument addPositionCategory RANGE_CATEGORY addPosition RANGE_CATEGORY fPosition addPositionUpdater BadPositionCategoryException BadLocationException
Uninstalls this range see install public void uninstall http bugs eclipse org bugs show bug cgi id 19612 I Document document Text Viewer this get Document if document null document remove Position Updater this document remove Position f Position if f Text Widget null f Text Widget is Disposed f Text Widget remove Line Background Listener this Text Viewer this remove Text Listener this clear  show_bug IDocument TextViewer getDocument removePositionUpdater removePosition fPosition fTextWidget fTextWidget isDisposed fTextWidget removeLineBackgroundListener TextViewer removeTextListener
Clears the highlighting of this range private void clear if f Text Widget null f Text Widget is Disposed f Text Widget redraw  fTextWidget fTextWidget isDisposed fTextWidget
Paints the highlighting of this range private void paint I Region widget Region model Range2 Widget Range f Position int offset widget Region get Offset int length widget Region get Length int count f Text Widget get Char Count if offset length count length count offset clip Point upper Left f Text Widget get Location At Offset offset Point lower Right f Text Widget get Location At Offset offset length int width f Text Widget get Client Area width int height f Text Widget get Line Height lower Right y upper Left y f Text Widget redraw upper Left x upper Left y width height false f Text Widget redraw Range offset length true  IRegion widgetRegion modelRange2WidgetRange fPosition widgetRegion getOffset widgetRegion getLength fTextWidget getCharCount upperLeft fTextWidget getLocationAtOffset lowerRight fTextWidget getLocationAtOffset fTextWidget getClientArea fTextWidget getLineHeight lowerRight upperLeft fTextWidget upperLeft upperLeft fTextWidget redrawRange
since 2 0 public void text Changed Text Event event if event get Viewer Redraw State paint  textChanged TextEvent getViewerRedrawState
public void update Document Event event int offset event get Offset int length event get Length int delta event get Text length length if offset f Position get Offset f Position set Offset f Position get Offset delta else if offset f Position get Offset f Position get Length f Position set Length f Position get Length delta  DocumentEvent getOffset getLength getText fPosition getOffset fPosition setOffset fPosition getOffset fPosition getOffset fPosition getLength fPosition setLength fPosition getLength
public String get Selection Text Point s Text Viewer this get Selected Range if s x 1 s y 1 try I Document document Text Viewer this get Document return document get s x s y catch Bad Location Exception x return null  getSelectionText TextViewer getSelectedRange IDocument TextViewer getDocument BadLocationException
see I Find Replace Target replace Selection String public void replace Selection String text replace Selection text false  IFindReplaceTarget replaceSelection replaceSelection replaceSelection
public void replace Selection String text boolean reg Ex Replace Point s Text Viewer this get Selected Range if s x 1 s y 1 try I Region match Region Text Viewer this get Find Replace Document Adapter replace text reg Ex Replace int length 1 if match Region null length match Region get Length if text null length 0 Text Viewer this set Selected Range s x length catch Bad Location Exception x  replaceSelection regExReplace TextViewer getSelectedRange IRegion matchRegion TextViewer getFindReplaceDocumentAdapter regExReplace matchRegion matchRegion getLength TextViewer setSelectedRange BadLocationException
see I Find Replace Target is Editable public boolean is Editable return Text Viewer this is Editable  IFindReplaceTarget isEditable isEditable TextViewer isEditable
see I Find Replace Target get Selection public Point get Selection Point model Selection Text Viewer this get Selected Range return model Selection2 Widget Selection model Selection  IFindReplaceTarget getSelection getSelection modelSelection TextViewer getSelectedRange modelSelection2WidgetSelection modelSelection
public int find And Select int widget Offset String find String boolean search Forward boolean case Sensitive boolean whole Word try return find And Select widget Offset find String search Forward case Sensitive whole Word false catch Pattern Syntax Exception x return 1  findAndSelect widgetOffset findString searchForward caseSensitive wholeWord findAndSelect widgetOffset findString searchForward caseSensitive wholeWord PatternSyntaxException
public int find And Select int widget Offset String find String boolean search Forward boolean case Sensitive boolean whole Word boolean reg Ex Search int model Offset widget Offset 1 1 widget Offset2 Model Offset widget Offset if f Range null I Region range f Range get Range model Offset Text Viewer this find And Select In Range model Offset find String search Forward case Sensitive whole Word range get Offset range get Length reg Ex Search else model Offset Text Viewer this find And Select model Offset find String search Forward case Sensitive whole Word reg Ex Search widget Offset model Offset 1 1 model Offset2 Widget Offset model Offset return widget Offset  findAndSelect widgetOffset findString searchForward caseSensitive wholeWord regExSearch modelOffset widgetOffset widgetOffset2ModelOffset widgetOffset fRange IRegion fRange getRange modelOffset TextViewer findAndSelectInRange modelOffset findString searchForward caseSensitive wholeWord getOffset getLength regExSearch modelOffset TextViewer findAndSelect modelOffset findString searchForward caseSensitive wholeWord regExSearch widgetOffset modelOffset modelOffset2WidgetOffset modelOffset widgetOffset
see I Find Replace Target can Perform Find public boolean can Perform Find return Text Viewer this can Perform Find  IFindReplaceTarget canPerformFind canPerformFind TextViewer canPerformFind
since 2 0 public void begin Session f Range null  beginSession fRange
public void end Session if f Range null f Range uninstall f Range null  endSession fRange fRange fRange
since 2 0 public I Region get Scope return f Range null null f Range get Range  IRegion getScope fRange fRange getRange
public Point get Line Selection Point point Text Viewer this get Selected Range try I Document document Text Viewer this get Document beginning of line int line document get Line Of Offset point x int offset document get Line Offset line end of line I Region last Line Info document get Line Information Of Offset point x point y int last Line document get Line Of Offset point x point y int length if last Line Info get Offset point x point y last Line 0 length document get Line Offset last Line 1 document get Line Length last Line 1 offset else length last Line Info get Offset last Line Info get Length offset return new Point offset length catch Bad Location Exception e should not happen return new Point point x 0  getLineSelection TextViewer getSelectedRange IDocument TextViewer getDocument getLineOfOffset getLineOffset IRegion lastLineInfo getLineInformationOfOffset lastLine getLineOfOffset lastLineInfo getOffset lastLine getLineOffset lastLine getLineLength lastLine lastLineInfo getOffset lastLineInfo getLength BadLocationException
since 2 0 public void set Selection int model Offset int model Length Text Viewer this set Selected Range model Offset model Length  setSelection modelOffset modelLength TextViewer setSelectedRange modelOffset modelLength
public void set Scope I Region scope if f Range null f Range uninstall if scope null f Range null return f Range new Find Replace Range scope f Range set Highlight Color f Scope Highlight Color f Range install  setScope IRegion fRange fRange fRange fRange FindReplaceRange fRange setHighlightColor fScopeHighlightColor fRange
public void set Scope Highlight Color Color color if f Range null f Range set Highlight Color color f Scope Highlight Color color  setScopeHighlightColor fRange fRange setHighlightColor fScopeHighlightColor
public void set Replace All Mode boolean replace All http bugs eclipse org bugs show bug cgi id 18232 if replace All Text Viewer this set Redraw false Text Viewer this start Sequential Rewrite Mode false if f Undo Manager null f Undo Manager begin Compound Change I Document document Text Viewer this get Document f Remembered Partitioners Text Utilities remove Document Partitioners document else Text Viewer this set Redraw true Text Viewer this stop Sequential Rewrite Mode if f Undo Manager null f Undo Manager end Compound Change if f Remembered Partitioners null I Document document Text Viewer this get Document Text Utilities add Document Partitioners document f Remembered Partitioners  setReplaceAllMode replaceAll show_bug replaceAll TextViewer setRedraw TextViewer startSequentialRewriteMode fUndoManager fUndoManager beginCompoundChange IDocument TextViewer getDocument fRememberedPartitioners TextUtilities removeDocumentPartitioners TextViewer setRedraw TextViewer stopSequentialRewriteMode fUndoManager fUndoManager endCompoundChange fRememberedPartitioners IDocument TextViewer getDocument TextUtilities addDocumentPartitioners fRememberedPartitioners
see org eclipse jface text I Rewrite Target begin Compound Change public void begin Compound Change if f Undo Manager null f Undo Manager begin Compound Change  IRewriteTarget beginCompoundChange beginCompoundChange fUndoManager fUndoManager beginCompoundChange
see org eclipse jface text I Rewrite Target end Compound Change public void end Compound Change if f Undo Manager null f Undo Manager end Compound Change  IRewriteTarget endCompoundChange endCompoundChange fUndoManager fUndoManager endCompoundChange
see org eclipse jface text I Rewrite Target get Document public I Document get Document return Text Viewer this get Document  IRewriteTarget getDocument IDocument getDocument TextViewer getDocument
see org eclipse jface text I Rewrite Target set Redraw boolean public void set Redraw boolean redraw Text Viewer this set Redraw redraw  IRewriteTarget setRedraw setRedraw TextViewer setRedraw
Creates a new text hover key for the given content type and state mask param content Type the content type param state Mask the state mask protected Text Hover Key String content Type int state Mask Assert is Not Null content Type f Content Type content Type f State Mask state Mask  contentType stateMask TextHoverKey contentType stateMask isNotNull contentType fContentType contentType fStateMask stateMask
public boolean equals Object obj if obj null obj get Class get Class return false Text Hover Key text Hover Key Text Hover Key obj return text Hover Key f Content Type equals f Content Type text Hover Key f State Mask f State Mask  getClass getClass TextHoverKey textHoverKey TextHoverKey textHoverKey fContentType fContentType textHoverKey fStateMask fStateMask
see java lang Object hash Code public int hash Code return f State Mask 16 f Content Type hash Code  hashCode hashCode fStateMask fContentType hashCode
Sets the state mask of this text hover key param state Mask the state mask private void set State Mask int state Mask f State Mask state Mask  stateMask setStateMask stateMask fStateMask stateMask
Creates a new selection position for the specified selection param point the specified selection public Selection Position Point point super reverse point y 0 if reverse offset point x point y length point y else offset point x length point y  SelectionPosition
Returns the selection in a format where the selection length is always non negative return the normalized selection public Point get Normalized Selection return new Point offset length  getNormalizedSelection
Returns the selection reflecting its anchor return the selection reflecting the selection anchor public Point get Selection return reverse new Point offset length length new Point offset length  getSelection
Installs this cursor listener private void install if f Text Widget null f Text Widget is Disposed f Text Widget add Key Listener this f Text Widget add Mouse Listener this  fTextWidget fTextWidget isDisposed fTextWidget addKeyListener fTextWidget addMouseListener
Uninstalls this cursor listener private void uninstall if f Text Widget null f Text Widget is Disposed f Text Widget remove Key Listener this f Text Widget remove Mouse Listener this  fTextWidget fTextWidget isDisposed fTextWidget removeKeyListener fTextWidget removeMouseListener
see Key Listener key Pressed org eclipse swt events Key Event public void key Pressed Key Event event  KeyListener keyPressed KeyEvent keyPressed KeyEvent
see Key Listener key Pressed org eclipse swt events Key Event public void key Released Key Event e if f Text Widget get Selection Count 0 queue Post Selection Changed  KeyListener keyPressed KeyEvent keyReleased KeyEvent fTextWidget getSelectionCount queuePostSelectionChanged
see Mouse Listener mouse Double Click org eclipse swt events Mouse Event public void mouse Double Click Mouse Event e  MouseListener mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent
see Mouse Listener mouse Down org eclipse swt events Mouse Event public void mouse Down Mouse Event e  MouseListener mouseDown MouseEvent mouseDown MouseEvent
see Mouse Listener mouse Up org eclipse swt events Mouse Event public void mouse Up Mouse Event event if f Text Widget get Selection Count 0 queue Post Selection Changed  MouseListener mouseUp MouseEvent mouseUp MouseEvent fTextWidget getSelectionCount queuePostSelectionChanged
Internal use only protected Text Viewer  TextViewer
Create a new text viewer with the given SWT style bits The viewer is ready to use but does not have any plug in installed param parent the parent of the viewer s control param styles the SWT style bits for the viewer s control public Text Viewer Composite parent int styles create Control parent styles  TextViewer createControl
Factory method to create the text widget to be used as the viewer s text widget param parent the parent of the styled text param styles the styles for the styled text return the text widget to be used protected Styled Text create Text Widget Composite parent int styles return new Styled Text parent styles  StyledText createTextWidget StyledText
Factory method to create the document adapter to be used by this viewer return the document adapter to be used protected I Document Adapter create Document Adapter return new Default Document Adapter  IDocumentAdapter createDocumentAdapter DefaultDocumentAdapter
new Dispose Listener public void widget Disposed Dispose Event e set Document null handle Dispose f Text Widget null  DisposeListener widgetDisposed DisposeEvent setDocument handleDispose fTextWidget
f Text Widget add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if SWT SHIFT e state Mask t e character e doit false  fTextWidget addTraverseListener TraverseListener keyTraversed TraverseEvent stateMask
f Text Widget add Selection Listener new Selection Listener public void widget Default Selected Selection Event event selection Changed event x event y event x  fTextWidget addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent selectionChanged
selection Changed event x event y event x public void widget Selected Selection Event event selection Changed event x event y event x  selectionChanged widgetSelected SelectionEvent selectionChanged
Creates the viewer s SWT control The viewer s text widget either is the control or is a child of the control param parent the parent of the viewer s control param styles the SWT style bits for the viewer s control protected void create Control Composite parent int styles f Text Widget create Text Widget parent styles f Text Widget add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e set Document null handle Dispose f Text Widget null f Text Widget set Font parent get Font f Text Widget set Double Click Enabled false Disable SWT Shift TAB traversal in this viewer 1GIYQ9K ITPUI WINNT Styled Text swallows Shift TAB f Text Widget add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if SWT SHIFT e state Mask t e character e doit false where does the first line start f Top Inset f Text Widget compute Trim 0 0 0 0 y f Verify Listener forward true f Text Widget add Verify Listener f Verify Listener f Text Widget add Selection Listener new Selection Listener public void widget Default Selected Selection Event event selection Changed event x event y event x public void widget Selected Selection Event event selection Changed event x event y event x f Cursor Listener new Cursor Listener f Cursor Listener install initialize Viewport Update  createControl fTextWidget createTextWidget fTextWidget addDisposeListener DisposeListener widgetDisposed DisposeEvent setDocument handleDispose fTextWidget fTextWidget setFont getFont fTextWidget setDoubleClickEnabled StyledText fTextWidget addTraverseListener TraverseListener keyTraversed TraverseEvent stateMask fTopInset fTextWidget computeTrim fVerifyListener fTextWidget addVerifyListener fVerifyListener fTextWidget addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent selectionChanged widgetSelected SelectionEvent selectionChanged fCursorListener CursorListener fCursorListener initializeViewportUpdate
see Viewer get Control public Control get Control return f Text Widget  getControl getControl fTextWidget
public void activate Plugins if f Double Click Strategies null f Double Click Strategies is Empty f Double Click Strategy Connector null f Double Click Strategy Connector new Text Double Click Strategy Connector f Text Widget add Mouse Listener f Double Click Strategy Connector ensure Hover Control Manager Installed if f Undo Manager null f Undo Manager connect this f Undo Manager reset  activatePlugins fDoubleClickStrategies fDoubleClickStrategies isEmpty fDoubleClickStrategyConnector fDoubleClickStrategyConnector TextDoubleClickStrategyConnector fTextWidget addMouseListener fDoubleClickStrategyConnector ensureHoverControlManagerInstalled fUndoManager fUndoManager fUndoManager
After this method has been executed the caller knows that any installed text hover has been installed private void ensure Hover Control Manager Installed if f Text Hovers null f Text Hovers is Empty f Hover Control Creator null f Text Hover Manager null f Text Hover Manager new Text Viewer Hover Manager this f Hover Control Creator f Text Hover Manager install this get Text Widget f Text Hover Manager set Size Constraints 60 10 false true  ensureHoverControlManagerInstalled fTextHovers fTextHovers isEmpty fHoverControlCreator fTextHoverManager fTextHoverManager TextViewerHoverManager fHoverControlCreator fTextHoverManager getTextWidget fTextHoverManager setSizeConstraints
see I Text Viewer reset Plugins public void reset Plugins if f Undo Manager null f Undo Manager reset  ITextViewer resetPlugins resetPlugins fUndoManager fUndoManager
Frees all resources allocated by this viewer Internally called when the viewer s control has been disposed protected void handle Dispose if f Paint Manager null f Paint Manager dispose f Paint Manager null remove View Port Update f Viewport Guard null if f Viewport Listeners null f Viewport Listeners clear f Viewport Listeners null if f Text Listeners null f Text Listeners clear f Text Listeners null if f Text Input Listeners null f Text Input Listeners clear f Text Input Listeners null if f Post Selection Changed Listeners null f Post Selection Changed Listeners clear f Post Selection Changed Listeners null if f Auto Indent Strategies null f Auto Indent Strategies clear f Auto Indent Strategies null if f Undo Manager null f Undo Manager disconnect f Undo Manager null if f Double Click Strategies null f Double Click Strategies clear f Double Click Strategies null if f Text Hovers null f Text Hovers clear f Text Hovers null f Double Click Strategy Connector null if f Text Hover Manager null f Text Hover Manager dispose f Text Hover Manager null if f Visible Document Listener null if f Visible Document null f Visible Document remove Document Listener f Visible Document Listener f Visible Document Listener null if f Document Adapter null f Document Adapter set Document null f Document Adapter null if f Slave Document Manager null if f Visible Document null f Slave Document Manager free Slave Document f Visible Document f Slave Document Manager null if f Cursor Listener null f Cursor Listener uninstall f Cursor Listener null f Visible Document null f Document null f Scroller null  handleDispose fPaintManager fPaintManager fPaintManager removeViewPortUpdate fViewportGuard fViewportListeners fViewportListeners fViewportListeners fTextListeners fTextListeners fTextListeners fTextInputListeners fTextInputListeners fTextInputListeners fPostSelectionChangedListeners fPostSelectionChangedListeners fPostSelectionChangedListeners fAutoIndentStrategies fAutoIndentStrategies fAutoIndentStrategies fUndoManager fUndoManager fUndoManager fDoubleClickStrategies fDoubleClickStrategies fDoubleClickStrategies fTextHovers fTextHovers fTextHovers fDoubleClickStrategyConnector fTextHoverManager fTextHoverManager fTextHoverManager fVisibleDocumentListener fVisibleDocument fVisibleDocument removeDocumentListener fVisibleDocumentListener fVisibleDocumentListener fDocumentAdapter fDocumentAdapter setDocument fDocumentAdapter fSlaveDocumentManager fVisibleDocument fSlaveDocumentManager freeSlaveDocument fVisibleDocument fSlaveDocumentManager fCursorListener fCursorListener fCursorListener fVisibleDocument fDocument fScroller
Returns viewer s text widget return the viewer s text widget public Styled Text get Text Widget return f Text Widget  StyledText getTextWidget fTextWidget
The delay in milliseconds before an empty selection changed event is sent by the cursor listener p Note The return value is used to initialize the cursor listener To return a non constant value has no effect p p The same value code 500 code is used in code Open Strategy TIME code p return delay in milliseconds see org eclipse jface util Open Strategy since 3 0 protected int get Empty Selection Changed Event Delay return 500  OpenStrategy OpenStrategy getEmptySelectionChangedEventDelay
public void set Auto Indent Strategy I Auto Indent Strategy strategy String content Type if f Auto Indent Strategies null f Auto Indent Strategies new Hash Map List auto Edit Strategies List f Auto Indent Strategies get content Type if strategy null if auto Edit Strategies null return f Auto Indent Strategies put content Type null else if auto Edit Strategies null auto Edit Strategies new Array List f Auto Indent Strategies put content Type auto Edit Strategies auto Edit Strategies clear auto Edit Strategies add strategy  setAutoIndentStrategy IAutoIndentStrategy contentType fAutoIndentStrategies fAutoIndentStrategies HashMap autoEditStrategies fAutoIndentStrategies contentType autoEditStrategies fAutoIndentStrategies contentType autoEditStrategies autoEditStrategies ArrayList fAutoIndentStrategies contentType autoEditStrategies autoEditStrategies autoEditStrategies
public void prepend Auto Edit Strategy I Auto Edit Strategy strategy String content Type if strategy null content Type null throw new Illegal Argument Exception if f Auto Indent Strategies null f Auto Indent Strategies new Hash Map List auto Edit Strategies List f Auto Indent Strategies get content Type if auto Edit Strategies null auto Edit Strategies new Array List f Auto Indent Strategies put content Type auto Edit Strategies auto Edit Strategies add 0 strategy  prependAutoEditStrategy IAutoEditStrategy contentType contentType IllegalArgumentException fAutoIndentStrategies fAutoIndentStrategies HashMap autoEditStrategies fAutoIndentStrategies contentType autoEditStrategies autoEditStrategies ArrayList fAutoIndentStrategies contentType autoEditStrategies autoEditStrategies
public void remove Auto Edit Strategy I Auto Edit Strategy strategy String content Type if f Auto Indent Strategies null return List auto Edit Strategies List f Auto Indent Strategies get content Type if auto Edit Strategies null return for final Iterator iterator auto Edit Strategies iterator iterator has Next if iterator next equals strategy iterator remove break if auto Edit Strategies is Empty f Auto Indent Strategies put content Type null  removeAutoEditStrategy IAutoEditStrategy contentType fAutoIndentStrategies autoEditStrategies fAutoIndentStrategies contentType autoEditStrategies autoEditStrategies hasNext autoEditStrategies isEmpty fAutoIndentStrategies contentType
see I Text Viewer set Event Consumer I Event Consumer public void set Event Consumer I Event Consumer consumer f Event Consumer consumer  ITextViewer setEventConsumer IEventConsumer setEventConsumer IEventConsumer fEventConsumer
public void set Indent Prefixes String indent Prefixes String content Type int i 1 boolean ok indent Prefixes null while ok i indent Prefixes length ok indent Prefixes i null if ok if f Indent Chars null f Indent Chars new Hash Map f Indent Chars put content Type indent Prefixes else if f Indent Chars null f Indent Chars remove content Type  setIndentPrefixes indentPrefixes contentType indentPrefixes indentPrefixes indentPrefixes fIndentChars fIndentChars HashMap fIndentChars contentType indentPrefixes fIndentChars fIndentChars contentType
see I Text Viewer get Top Inset public int get Top Inset return f Top Inset  ITextViewer getTopInset getTopInset fTopInset
public boolean is Editable if f Text Widget null return false return f Text Widget get Editable  isEditable fTextWidget fTextWidget getEditable
see I Text Viewer set Editable boolean public void set Editable boolean editable if f Text Widget null f Text Widget set Editable editable  ITextViewer setEditable setEditable fTextWidget fTextWidget setEditable
public void set Default Prefixes String default Prefixes String content Type if default Prefixes null default Prefixes length 0 if f Default Prefix Chars null f Default Prefix Chars new Hash Map f Default Prefix Chars put content Type default Prefixes else if f Default Prefix Chars null f Default Prefix Chars remove content Type  setDefaultPrefixes defaultPrefixes contentType defaultPrefixes defaultPrefixes fDefaultPrefixChars fDefaultPrefixChars HashMap fDefaultPrefixChars contentType defaultPrefixes fDefaultPrefixChars fDefaultPrefixChars contentType
see I Text Viewer set Undo Manager I Undo Manager public void set Undo Manager I Undo Manager undo Manager f Undo Manager undo Manager  ITextViewer setUndoManager IUndoManager setUndoManager IUndoManager undoManager fUndoManager undoManager
see I Text Viewer set Text Hover I Text Hover String public void set Text Hover I Text Hover hover String content Type set Text Hover hover content Type I Text Viewer Extension2 DEFAULT HOVER STATE MASK  ITextViewer setTextHover ITextHover setTextHover ITextHover contentType setTextHover contentType ITextViewerExtension2 DEFAULT_HOVER_STATE_MASK
public void set Text Hover I Text Hover hover String content Type int state Mask Text Hover Key key new Text Hover Key content Type state Mask if hover null if f Text Hovers null f Text Hovers new Hash Map f Text Hovers put key hover else if f Text Hovers null f Text Hovers remove key ensure Hover Control Manager Installed  setTextHover ITextHover contentType stateMask TextHoverKey TextHoverKey contentType stateMask fTextHovers fTextHovers HashMap fTextHovers fTextHovers fTextHovers ensureHoverControlManagerInstalled
public void remove Text Hovers String content Type if f Text Hovers null return Iterator iter new Hash Set f Text Hovers key Set iterator while iter has Next Text Hover Key key Text Hover Key iter next if key f Content Type equals content Type f Text Hovers remove key  removeTextHovers contentType fTextHovers HashSet fTextHovers keySet hasNext TextHoverKey TextHoverKey fContentType contentType fTextHovers
Returns the text hover for a given offset param offset the offset for which to return the text hover return the text hover for the given offset protected I Text Hover get Text Hover int offset return get Text Hover offset I Text Viewer Extension2 DEFAULT HOVER STATE MASK  ITextHover getTextHover getTextHover ITextViewerExtension2 DEFAULT_HOVER_STATE_MASK
Returns the text hover for a given offset and a given state mask param offset the offset for which to return the text hover param state Mask the SWT event state mask return the text hover for the given offset and state mask since 2 1 protected I Text Hover get Text Hover int offset int state Mask if f Text Hovers null return null I Document document get Document if document null return null try Text Hover Key key new Text Hover Key Text Utilities get Content Type document get Document Partitioning offset true state Mask Object text Hover f Text Hovers get key if text Hover null Use default text hover key set State Mask I Text Viewer Extension2 DEFAULT HOVER STATE MASK text Hover f Text Hovers get key return I Text Hover text Hover catch Bad Location Exception x if TRACE ERRORS System out println J Face Text Messages get String Text Viewer error bad location select Content Type Plugin NON NLS 1 return null  stateMask ITextHover getTextHover stateMask fTextHovers IDocument getDocument TextHoverKey TextHoverKey TextUtilities getContentType getDocumentPartitioning stateMask textHover fTextHovers textHover setStateMask ITextViewerExtension2 DEFAULT_HOVER_STATE_MASK textHover fTextHovers ITextHover textHover BadLocationException TRACE_ERRORS JFaceTextMessages getString TextViewer bad_location selectContentTypePlugin
Returns the text hovering controller of this viewer return the text hovering controller of this viewer since 2 0 protected Abstract Information Control Manager get Text Hovering Controller return f Text Hover Manager  AbstractInformationControlManager getTextHoveringController fTextHoverManager
Sets the creator for the hover controls param creator the hover control creator since 2 0 public void set Hover Control Creator I Information Control Creator creator f Hover Control Creator creator  setHoverControlCreator IInformationControlCreator fHoverControlCreator
public boolean request Widget Token I Widget Token Keeper requester if f Text Widget null if f Widget Token Keeper null if f Widget Token Keeper requester return true if f Widget Token Keeper request Widget Token this f Widget Token Keeper requester return true else f Widget Token Keeper requester return true return false  requestWidgetToken IWidgetTokenKeeper fTextWidget fWidgetTokenKeeper fWidgetTokenKeeper fWidgetTokenKeeper requestWidgetToken fWidgetTokenKeeper fWidgetTokenKeeper
public boolean request Widget Token I Widget Token Keeper requester int priority if f Text Widget null if f Widget Token Keeper null if f Widget Token Keeper requester return true boolean accepted false if f Widget Token Keeper instanceof I Widget Token Keeper Extension I Widget Token Keeper Extension extension I Widget Token Keeper Extension f Widget Token Keeper accepted extension request Widget Token this priority else accepted f Widget Token Keeper request Widget Token this if accepted f Widget Token Keeper requester return true else f Widget Token Keeper requester return true return false  requestWidgetToken IWidgetTokenKeeper fTextWidget fWidgetTokenKeeper fWidgetTokenKeeper fWidgetTokenKeeper IWidgetTokenKeeperExtension IWidgetTokenKeeperExtension IWidgetTokenKeeperExtension fWidgetTokenKeeper requestWidgetToken fWidgetTokenKeeper requestWidgetToken fWidgetTokenKeeper fWidgetTokenKeeper
since 2 0 public void release Widget Token I Widget Token Keeper token Keeper if f Widget Token Keeper token Keeper f Widget Token Keeper null  releaseWidgetToken IWidgetTokenKeeper tokenKeeper fWidgetTokenKeeper tokenKeeper fWidgetTokenKeeper
public Point get Selected Range if redraws f Document Selection null return f Document Selection get Normalized Selection if f Text Widget null Point p f Text Widget get Selection Range p widget Selection2 Model Selection p if p null return p return new Point 1 1  getSelectedRange fDocumentSelection fDocumentSelection getNormalizedSelection fTextWidget fTextWidget getSelectionRange widgetSelection2ModelSelection
public void set Selected Range int selection Offset int selection Length if redraws if f Document Selection null f Document Selection offset selection Offset f Document Selection length selection Length http bugs eclipse org bugs show bug cgi id 32795 f Document Selection is Deleted false return if f Text Widget null return I Region widget Selection model Range2 Widget Range new Region selection Offset selection Length if widget Selection null int selection Range new int widget Selection get Offset widget Selection get Length validate Selection Range selection Range if selection Range 0 0 f Text Widget set Selection Range selection Range 0 selection Range 1 selection Changed selection Range 0 selection Range 1  setSelectedRange selectionOffset selectionLength fDocumentSelection fDocumentSelection selectionOffset fDocumentSelection selectionLength show_bug fDocumentSelection isDeleted fTextWidget IRegion widgetSelection modelRange2WidgetRange selectionOffset selectionLength widgetSelection selectionRange widgetSelection getOffset widgetSelection getLength validateSelectionRange selectionRange selectionRange fTextWidget setSelectionRange selectionRange selectionRange selectionChanged selectionRange selectionRange
Validates and adapts the given selection range if it is not a valid widget selection The widget selection is invalid if it starts or ends inside a multi character line delimiter If so the selection is adapted to start b after b the divided line delimiter and to end b before b the divided line delimiter The parameter passed in is changed in place when being adapted An adaptation to code 1 1 code indicates that the selection range could not be validated Subclasses may reimplement this method param selection Range selection Range 0 is the offset selection Range 1 the length of the selection to validate since 2 0 protected void validate Selection Range int selection Range I Document document get Visible Document if document null selection Range 0 1 selection Range 1 1 return int document Length document get Length int offset selection Range 0 int length selection Range 1 if length 0 length length offset length if offset 0 offset 0 if offset document Length offset document Length int delta offset length document Length if delta 0 length delta try int line Number document get Line Of Offset offset I Region line Information document get Line Information line Number int line End line Information get Offset line Information get Length delta offset line End if delta 0 in the middle of a multi character line delimiter offset line End String delimiter document get Line Delimiter line Number if delimiter null offset delimiter length int end offset length line Information document get Line Information Of Offset end line End line Information get Offset line Information get Length delta end line End if delta 0 in the middle of a multi character line delimiter length delta catch Bad Location Exception x selection Range 0 1 selection Range 1 1 return if selection Range 1 0 selection Range 0 offset length selection Range 1 length else selection Range 0 offset selection Range 1 length  selectionRange selectionRange selectionRange validateSelectionRange selectionRange IDocument getVisibleDocument selectionRange selectionRange documentLength getLength selectionRange selectionRange documentLength documentLength documentLength lineNumber getLineOfOffset IRegion lineInformation getLineInformation lineNumber lineEnd lineInformation getOffset lineInformation getLength lineEnd lineEnd getLineDelimiter lineNumber lineInformation getLineInformationOfOffset lineEnd lineInformation getOffset lineInformation getLength lineEnd BadLocationException selectionRange selectionRange selectionRange selectionRange selectionRange selectionRange selectionRange
public void set Selection I Selection selection boolean reveal if selection instanceof I Text Selection I Text Selection s I Text Selection selection set Selected Range s get Offset s get Length if reveal reveal Range s get Offset s get Length  setSelection ISelection ITextSelection ITextSelection ITextSelection setSelectedRange getOffset getLength revealRange getOffset getLength
public I Selection get Selection Point p get Selected Range if p x 1 p y 1 return Text Selection empty Selection return new Text Selection get Document p x p y  ISelection getSelection getSelectedRange TextSelection emptySelection TextSelection getDocument
see I Text Viewer get Selection Provider public I Selection Provider get Selection Provider return this  ITextViewer getSelectionProvider ISelectionProvider getSelectionProvider
public void add Post Selection Changed Listener I Selection Changed Listener listener Assert is Not Null listener if f Post Selection Changed Listeners null f Post Selection Changed Listeners new Array List if f Post Selection Changed Listeners contains listener f Post Selection Changed Listeners add listener  addPostSelectionChangedListener ISelectionChangedListener isNotNull fPostSelectionChangedListeners fPostSelectionChangedListeners ArrayList fPostSelectionChangedListeners fPostSelectionChangedListeners
public void remove Post Selection Changed Listener I Selection Changed Listener listener Assert is Not Null listener if f Post Selection Changed Listeners null f Post Selection Changed Listeners remove listener if f Post Selection Changed Listeners size 0 f Post Selection Changed Listeners null  removePostSelectionChangedListener ISelectionChangedListener isNotNull fPostSelectionChangedListeners fPostSelectionChangedListeners fPostSelectionChangedListeners fPostSelectionChangedListeners
Get the text widget s display return the display or code null code if the display cannot be retrieved or if the display is disposed since 3 0 private Display get Display if f Text Widget null f Text Widget is Disposed return null Display display f Text Widget get Display if display null display is Disposed return null return display  getDisplay fTextWidget fTextWidget isDisposed fTextWidget getDisplay isDisposed
final int id f Number Of Post Selection Changed Events 0 public void run if id f Number Of Post Selection Changed Events 0 Check again because this is executed after the delay if get Display null Point selection f Text Widget get Selection Range if selection null fire Post Selection Changed selection x selection y  fNumberOfPostSelectionChangedEvents fNumberOfPostSelectionChangedEvents getDisplay fTextWidget getSelectionRange firePostSelectionChanged
Starts a timer to send out a post selection changed event since 3 0 private void queue Post Selection Changed Display display get Display if display null return f Number Of Post Selection Changed Events 0 display timer Exec get Empty Selection Changed Event Delay new Runnable final int id f Number Of Post Selection Changed Events 0 public void run if id f Number Of Post Selection Changed Events 0 Check again because this is executed after the delay if get Display null Point selection f Text Widget get Selection Range if selection null fire Post Selection Changed selection x selection y  queuePostSelectionChanged getDisplay fNumberOfPostSelectionChangedEvents timerExec getEmptySelectionChangedEventDelay fNumberOfPostSelectionChangedEvents fNumberOfPostSelectionChangedEvents getDisplay fTextWidget getSelectionRange firePostSelectionChanged
Sends out a text selection changed event to all registered post selection changed listeners param offset the offset of the newly selected range in the visible document param length the length of the newly selected range in the visible document since 3 0 protected void fire Post Selection Changed int offset int length if redraws I Region r widget Range2 Model Range new Region offset length if r null r equals f Last Sent Post Selection Change r null f Last Sent Post Selection Change r I Selection selection r null new Text Selection get Document r get Offset r get Length Text Selection empty Selection Selection Changed Event event new Selection Changed Event this selection fire Post Selection Changed event  firePostSelectionChanged IRegion widgetRange2ModelRange fLastSentPostSelectionChange fLastSentPostSelectionChange ISelection TextSelection getDocument getOffset getLength TextSelection emptySelection SelectionChangedEvent SelectionChangedEvent firePostSelectionChanged
Sends out a text selection changed event to all registered listeners and registers the selection changed event to be send out to all post selection listeners param offset the offset of the newly selected range in the visible document param length the length of the newly selected range in the visible document protected void selection Changed int offset int length queue Post Selection Changed fire Selection Changed offset length  selectionChanged queuePostSelectionChanged fireSelectionChanged
Sends out a text selection changed event to all registered listeners param offset the offset of the newly selected range in the visible document param length the length of the newly selected range in the visible document since 3 0 protected void fire Selection Changed int offset int length if redraws I Region r widget Range2 Model Range new Region offset length if r null r equals f Last Sent Selection Change r null f Last Sent Selection Change r I Selection selection r null new Text Selection get Document r get Offset r get Length Text Selection empty Selection Selection Changed Event event new Selection Changed Event this selection fire Selection Changed event  fireSelectionChanged IRegion widgetRange2ModelRange fLastSentSelectionChange fLastSentSelectionChange ISelection TextSelection getDocument getOffset getLength TextSelection emptySelection SelectionChangedEvent SelectionChangedEvent fireSelectionChanged
Sends the given event to all registered post selection changed listeners param event the selection event since 3 0 private void fire Post Selection Changed Selection Changed Event event if f Post Selection Changed Listeners null for int i 0 i f Post Selection Changed Listeners size i I Selection Changed Listener l I Selection Changed Listener f Post Selection Changed Listeners get i l selection Changed event  firePostSelectionChanged SelectionChangedEvent fPostSelectionChangedListeners fPostSelectionChangedListeners ISelectionChangedListener ISelectionChangedListener fPostSelectionChangedListeners selectionChanged
Sends out a mark selection changed event to all registered listeners param offset the offset of the mark selection in the visible document the offset is code 1 code if the mark was cleared param length the length of the mark selection may be negative if the caret is before the mark since 2 0 protected void mark Changed int offset int length if redraws if offset 1 I Region r widget Range2 Model Range new Region offset length offset r get Offset length r get Length I Selection selection new Mark Selection get Document offset length Selection Changed Event event new Selection Changed Event this selection fire Selection Changed event  markChanged IRegion widgetRange2ModelRange getOffset getLength ISelection MarkSelection getDocument SelectionChangedEvent SelectionChangedEvent fireSelectionChanged
public void add Text Listener I Text Listener listener Assert is Not Null listener if f Text Listeners null f Text Listeners new Array List if f Text Listeners contains listener f Text Listeners add listener  addTextListener ITextListener isNotNull fTextListeners fTextListeners ArrayList fTextListeners fTextListeners
public void remove Text Listener I Text Listener listener Assert is Not Null listener if f Text Listeners null f Text Listeners remove listener if f Text Listeners size 0 f Text Listeners null  removeTextListener ITextListener isNotNull fTextListeners fTextListeners fTextListeners fTextListeners
Informs all registered text listeners about the change specified by the widget command This method does not use a robust iterator param cmd the widget command translated into a text event sent to all text listeners protected void update Text Listeners Widget Command cmd if f Text Listeners null Document Event event cmd event if event instanceof Slave Document Event event Slave Document Event event get Master Event Text Event e new Text Event cmd start cmd length cmd text cmd preserved Text event redraws for int i 0 i f Text Listeners size i I Text Listener l I Text Listener f Text Listeners get i l text Changed e  updateTextListeners WidgetCommand fTextListeners DocumentEvent SlaveDocumentEvent SlaveDocumentEvent getMasterEvent TextEvent TextEvent preservedText fTextListeners ITextListener ITextListener fTextListeners textChanged
public void add Text Input Listener I Text Input Listener listener Assert is Not Null listener if f Text Input Listeners null f Text Input Listeners new Array List if f Text Input Listeners contains listener f Text Input Listeners add listener  addTextInputListener ITextInputListener isNotNull fTextInputListeners fTextInputListeners ArrayList fTextInputListeners fTextInputListeners
public void remove Text Input Listener I Text Input Listener listener Assert is Not Null listener if f Text Input Listeners null f Text Input Listeners remove listener if f Text Input Listeners size 0 f Text Input Listeners null  removeTextInputListener ITextInputListener isNotNull fTextInputListeners fTextInputListeners fTextInputListeners fTextInputListeners
Informs all registered text input listeners about the forthcoming input change This method does not use a robust iterator param old Input the old input document param new Input the new input document protected void fire Input Document About To Be Changed I Document old Input I Document new Input if f Text Input Listeners null for int i 0 i f Text Input Listeners size i I Text Input Listener l I Text Input Listener f Text Input Listeners get i l input Document About To Be Changed old Input new Input  oldInput newInput fireInputDocumentAboutToBeChanged IDocument oldInput IDocument newInput fTextInputListeners fTextInputListeners ITextInputListener ITextInputListener fTextInputListeners inputDocumentAboutToBeChanged oldInput newInput
Informs all registered text input listeners about the successful input change This method does not use a robust iterator param old Input the old input document param new Input the new input document protected void fire Input Document Changed I Document old Input I Document new Input if f Text Input Listeners null for int i 0 i f Text Input Listeners size i I Text Input Listener l I Text Input Listener f Text Input Listeners get i l input Document Changed old Input new Input  oldInput newInput fireInputDocumentChanged IDocument oldInput IDocument newInput fTextInputListeners fTextInputListeners ITextInputListener ITextInputListener fTextInputListeners inputDocumentChanged oldInput newInput
see Viewer get Input public Object get Input return get Document  getInput getInput getDocument
see I Text Viewer get Document public I Document get Document return f Document  ITextViewer getDocument IDocument getDocument fDocument
public void set Input Object input I Document document null if input instanceof I Document document I Document input set Document document  setInput IDocument IDocument IDocument setDocument
public void set Document I Document document f Replace Text Presentation true fire Input Document About To Be Changed f Document document I Document old Document f Document f Document document set Visible Document f Document reset Plugins input Changed f Document old Document fire Input Document Changed old Document f Document f Last Sent Selection Change null f Replace Text Presentation false  setDocument IDocument fReplaceTextPresentation fireInputDocumentAboutToBeChanged fDocument IDocument oldDocument fDocument fDocument setVisibleDocument fDocument resetPlugins inputChanged fDocument oldDocument fireInputDocumentChanged oldDocument fDocument fLastSentSelectionChange fReplaceTextPresentation
public void set Document I Document document int model Range Offset int model Range Length f Replace Text Presentation true fire Input Document About To Be Changed f Document document I Document old Document f Document f Document document try I Document slave Document create Slave Document document update Slave Document slave Document model Range Offset model Range Length set Visible Document slave Document catch Bad Location Exception x throw new Illegal Argument Exception J Face Text Messages get String Text Viewer error invalid visible region 1 NON NLS 1 reset Plugins input Changed f Document old Document fire Input Document Changed old Document f Document f Last Sent Selection Change null f Replace Text Presentation false  setDocument IDocument modelRangeOffset modelRangeLength fReplaceTextPresentation fireInputDocumentAboutToBeChanged fDocument IDocument oldDocument fDocument fDocument IDocument slaveDocument createSlaveDocument updateSlaveDocument slaveDocument modelRangeOffset modelRangeLength setVisibleDocument slaveDocument BadLocationException IllegalArgumentException JFaceTextMessages getString TextViewer invalid_visible_region_1 resetPlugins inputChanged fDocument oldDocument fireInputDocumentChanged oldDocument fDocument fLastSentSelectionChange fReplaceTextPresentation
Creates a slave document for the given document if there is a slave document manager associated with this viewer param document the master document return the newly created slave document since 2 1 protected I Document create Slave Document I Document document I Slave Document Manager manager get Slave Document Manager if manager null if manager is Slave Document document return document return manager create Slave Document document return document  IDocument createSlaveDocument IDocument ISlaveDocumentManager getSlaveDocumentManager isSlaveDocument createSlaveDocument
Sets the given slave document to the specified range of its master document param visible Document the slave document param visible Region Offset the offset of the master document range param visible Region Length the length of the master document range return code true code if the slave has been adapted successfully throws Bad Location Exception in case the specified range is not valid in the master document since 2 1 deprecated use code update Slave Document code instead protected boolean update Visible Document I Document visible Document int visible Region Offset int visible Region Length throws Bad Location Exception if visible Document instanceof Child Document Child Document child Document Child Document visible Document I Document document child Document get Parent Document int line document get Line Of Offset visible Region Offset int offset document get Line Offset line int length visible Region Offset offset visible Region Length Position parent Range child Document get Parent Document Range if offset parent Range get Offset length parent Range get Length child Document set Parent Document Range offset length return true return false  visibleDocument visibleRegionOffset visibleRegionLength BadLocationException updateSlaveDocument updateVisibleDocument IDocument visibleDocument visibleRegionOffset visibleRegionLength BadLocationException visibleDocument ChildDocument ChildDocument childDocument ChildDocument visibleDocument IDocument childDocument getParentDocument getLineOfOffset visibleRegionOffset getLineOffset visibleRegionOffset visibleRegionLength parentRange childDocument getParentDocumentRange parentRange getOffset parentRange getLength childDocument setParentDocumentRange
Updates the given slave document to show the specified range of its master document param slave Document the slave document param model Range Offset the offset of the master document range param model Range Length the length of the master document range return code true code if the slave has been adapted successfully throws Bad Location Exception in case the specified range is not valid in the master document since 3 0 protected boolean update Slave Document I Document slave Document int model Range Offset int model Range Length throws Bad Location Exception return update Visible Document slave Document model Range Offset model Range Length  slaveDocument modelRangeOffset modelRangeLength BadLocationException updateSlaveDocument IDocument slaveDocument modelRangeOffset modelRangeLength BadLocationException updateVisibleDocument slaveDocument modelRangeOffset modelRangeLength
Initializes all listeners and structures required to set up view port listeners private void initialize Viewport Update if f Viewport Guard null return if f Text Widget null f Viewport Guard new Viewport Guard f Last Top Pixel 1 f Text Widget add Key Listener f Viewport Guard f Text Widget add Mouse Listener f Viewport Guard f Scroller f Text Widget get Vertical Bar if f Scroller null f Scroller add Selection Listener f Viewport Guard  initializeViewportUpdate fViewportGuard fTextWidget fViewportGuard ViewportGuard fLastTopPixel fTextWidget addKeyListener fViewportGuard fTextWidget addMouseListener fViewportGuard fScroller fTextWidget getVerticalBar fScroller fScroller addSelectionListener fViewportGuard
Removes all listeners and structures required to set up view port listeners private void remove View Port Update if f Text Widget null f Text Widget remove Key Listener f Viewport Guard f Text Widget remove Mouse Listener f Viewport Guard if f Scroller null f Scroller is Disposed f Scroller remove Selection Listener f Viewport Guard f Scroller null f Viewport Guard null  removeViewPortUpdate fTextWidget fTextWidget removeKeyListener fViewportGuard fTextWidget removeMouseListener fViewportGuard fScroller fScroller isDisposed fScroller removeSelectionListener fViewportGuard fScroller fViewportGuard
public void add Viewport Listener I Viewport Listener listener if f Viewport Listeners null f Viewport Listeners new Array List initialize Viewport Update if f Viewport Listeners contains listener f Viewport Listeners add listener  addViewportListener IViewportListener fViewportListeners fViewportListeners ArrayList initializeViewportUpdate fViewportListeners fViewportListeners
see I Text Viewer remove Viewport Listener I Vewport Listener public void remove Viewport Listener I Viewport Listener listener if f Viewport Listeners null f Viewport Listeners remove listener  ITextViewer removeViewportListener IVewportListener removeViewportListener IViewportListener fViewportListeners fViewportListeners
Checks whether the view port changed and if so informs all registered listeners about the change param origin describes under which circumstances this method has been called see I Viewport Listener protected void update Viewport Listeners int origin if redraws int top Pixel f Text Widget get Top Pixel if top Pixel 0 top Pixel f Last Top Pixel if f Viewport Listeners null for int i 0 i f Viewport Listeners size i I Viewport Listener l I Viewport Listener f Viewport Listeners get i l viewport Changed top Pixel f Last Top Pixel top Pixel  IViewportListener updateViewportListeners topPixel fTextWidget getTopPixel topPixel topPixel fLastTopPixel fViewportListeners fViewportListeners IViewportListener IViewportListener fViewportListeners viewportChanged topPixel fLastTopPixel topPixel
public int get Top Index if f Text Widget null int top f Text Widget get Top Index return widget Line2 Model Line top return 1  getTopIndex fTextWidget fTextWidget getTopIndex widgetLine2ModelLine
public void set Top Index int index if f Text Widget null int widget Line model Line2 Widget Line index if widget Line 1 widget Line get Closest Widget Line For Model Line index if widget Line 1 f Text Widget set Top Index widget Line update Viewport Listeners INTERNAL  setTopIndex fTextWidget widgetLine modelLine2WidgetLine widgetLine widgetLine getClosestWidgetLineForModelLine widgetLine fTextWidget setTopIndex widgetLine updateViewportListeners
Returns the view port height in lines The actual visible lines can be fewer if the document is shorter than the view port return the view port height in lines protected int get Visible Lines In Viewport if f Text Widget null Rectangle cl Area f Text Widget get Client Area if cl Area is Empty return cl Area height f Text Widget get Line Height return 1  getVisibleLinesInViewport fTextWidget clArea fTextWidget getClientArea clArea isEmpty clArea fTextWidget getLineHeight
public int get Bottom Index if f Text Widget null return 1 I Region coverage get Model Coverage if coverage null return 1 try I Document d get Document if d null return 1 int start Line d get Line Of Offset coverage get Offset int end Line d get Line Of Offset coverage get Offset coverage get Length 1 int lines get Visible Lines In Viewport if start Line lines end Line int widget Top Index f Text Widget get Top Index int widget Bottom Index widget Top Index lines 1 int model Line widget Line2 Model Line widget Bottom Index if model Line 1 return end Line return model Line return end Line catch Bad Location Exception x if TRACE ERRORS System out println J Face Text Messages get String Text Viewer error bad location get Bottom Index NON NLS 1 return 1  getBottomIndex fTextWidget IRegion getModelCoverage IDocument getDocument startLine getLineOfOffset getOffset endLine getLineOfOffset getOffset getLength getVisibleLinesInViewport startLine endLine widgetTopIndex fTextWidget getTopIndex widgetBottomIndex widgetTopIndex modelLine widgetLine2ModelLine widgetBottomIndex modelLine endLine modelLine endLine BadLocationException TRACE_ERRORS JFaceTextMessages getString TextViewer bad_location getBottomIndex
public int get Top Index Start Offset if f Text Widget null int top f Text Widget get Top Index try top get Visible Document get Line Offset top return widget Line2 Model Line top catch Bad Location Exception ex if TRACE ERRORS System out println J Face Text Messages get String Text Viewer error bad location get Top Index Start Offset NON NLS 1 return 1  getTopIndexStartOffset fTextWidget fTextWidget getTopIndex getVisibleDocument getLineOffset widgetLine2ModelLine BadLocationException TRACE_ERRORS JFaceTextMessages getString TextViewer bad_location getTopIndexStartOffset
public int get Bottom Index End Offset try I Region line get Document get Line Information get Bottom Index int bottom End Offset line get Offset line get Length 1 I Region coverage get Model Coverage if coverage null return 1 int coverage End Offset coverage get Offset coverage get Length 1 return Math min coverage End Offset bottom End Offset catch Bad Location Exception ex if TRACE ERRORS System out println J Face Text Messages get String Text Viewer error bad location get Bottom Index End Offset NON NLS 1 return get Document get Length 1  getBottomIndexEndOffset IRegion getDocument getLineInformation getBottomIndex bottomEndOffset getOffset getLength IRegion getModelCoverage coverageEndOffset getOffset getLength coverageEndOffset bottomEndOffset BadLocationException TRACE_ERRORS JFaceTextMessages getString TextViewer bad_location getBottomIndexEndOffset getDocument getLength
public void reveal Range int start int length if f Text Widget null redraws return I Region model Range new Region start length I Region widget Range model Range2 Widget Range model Range if widget Range null int range new int widget Range get Offset widget Range get Length validate Selection Range range if range 0 0 internal Reveal Range range 0 range 0 range 1 else I Region coverage get Model Coverage int cursor coverage null start coverage get Offset 0 get Visible Document get Length internal Reveal Range cursor cursor  revealRange fTextWidget IRegion modelRange IRegion widgetRange modelRange2WidgetRange modelRange widgetRange widgetRange getOffset widgetRange getLength validateSelectionRange internalRevealRange IRegion getModelCoverage getOffset getVisibleDocument getLength internalRevealRange
Reveals the given range of the visible document param start the start offset of the range param end the end offset of the range protected void internal Reveal Range int start int end try I Document doc get Visible Document int start Line doc get Line Of Offset start int end Line doc get Line Of Offset end int top f Text Widget get Top Index if top 1 scroll vertically int lines get Visible Lines In Viewport int bottom top lines two lines at the top and the bottom should always be left if window is smaller than 5 lines always center position is chosen int buffer Zone 2 if start Line top buffer Zone start Line bottom buffer Zone end Line top buffer Zone end Line bottom buffer Zone do not scroll at all as it is already visible else int delta Math max 0 lines end Line start Line f Text Widget set Top Index start Line delta 3 update Viewport Listeners INTERNAL scroll horizontally if end Line start Line end Line start Line start Line end Line start Line end Line start Line int start Pixel 1 int end Pixel 1 if end Line start Line reveal the beginning of the range in the start line I Region extent get Extent start start start Pixel extent get Offset f Text Widget get Horizontal Pixel end Pixel start Pixel else I Region extent get Extent start end start Pixel extent get Offset f Text Widget get Horizontal Pixel end Pixel start Pixel extent get Length int visible Start f Text Widget get Horizontal Pixel int visible End visible Start f Text Widget get Client Area width scroll only if not yet visible if start Pixel visible Start visible End end Pixel set buffer zone to 10 pixels buffer Zone 10 int new Offset visible Start int visible Width visible End visible Start int selection Pixel Width end Pixel start Pixel if start Pixel visible Start new Offset start Pixel else if selection Pixel Width buffer Zone visible Width new Offset end Pixel buffer Zone visible Width else new Offset start Pixel float index float new Offset float get Average Char Width f Text Widget set Horizontal Index Math round index catch Bad Location Exception e throw new Illegal Argument Exception J Face Text Messages get String Text Viewer error invalid range NON NLS 1  internalRevealRange IDocument getVisibleDocument startLine getLineOfOffset endLine getLineOfOffset fTextWidget getTopIndex getVisibleLinesInViewport bufferZone startLine bufferZone startLine bufferZone endLine bufferZone endLine bufferZone endLine startLine fTextWidget setTopIndex startLine updateViewportListeners endLine startLine endLine startLine startLine endLine startLine endLine startLine startPixel endPixel endLine startLine IRegion getExtent startPixel getOffset fTextWidget getHorizontalPixel endPixel startPixel IRegion getExtent startPixel getOffset fTextWidget getHorizontalPixel endPixel startPixel getLength visibleStart fTextWidget getHorizontalPixel visibleEnd visibleStart fTextWidget getClientArea startPixel visibleStart visibleEnd endPixel bufferZone newOffset visibleStart visibleWidth visibleEnd visibleStart selectionPixelWidth endPixel startPixel startPixel visibleStart newOffset startPixel selectionPixelWidth bufferZone visibleWidth newOffset endPixel bufferZone visibleWidth newOffset startPixel newOffset getAverageCharWidth fTextWidget setHorizontalIndex BadLocationException IllegalArgumentException JFaceTextMessages getString TextViewer invalid_range
Returns the width of the text when being drawn into this viewer s widget param text the string to measure return the width of the presentation of the given string deprecated use code get Width In Pixels int int code instead final protected int get Width In Pixels String text GC gc new GC f Text Widget gc set Font f Text Widget get Font Point extent gc text Extent text gc dispose return extent x  getWidthInPixels getWidthInPixels fTextWidget setFont fTextWidget getFont textExtent
Returns the region covered by the given start and end offset The result is relative to the upper left corner of the widget client area param start offset relative to the start of this viewer s view port 0 offset get Char Count param end offset relative to the start of this viewer s view port 0 offset get Char Count return the region covered by start and end offset final protected I Region get Extent int start int end Point left f Text Widget get Location At Offset start Point right new Point left x left y for int i start 1 i end i Point p f Text Widget get Location At Offset i if left x p x left x p x if right x p x right x p x return new Region left x right x left x  getCharCount getCharCount IRegion getExtent fTextWidget getLocationAtOffset fTextWidget getLocationAtOffset
Returns the width of the representation of a text range in the visible region of the viewer s document as drawn in this viewer s widget param offset the offset of the text range in the visible region param length the length of the text range in the visible region return the width of the presentation of the specified text range since 2 0 final protected int get Width In Pixels int offset int length Point left f Text Widget get Location At Offset offset Point right new Point left x left y int end offset length for int i offset 1 i end i Point p f Text Widget get Location At Offset i if left x p x left x p x if right x p x right x p x return right x left x  getWidthInPixels fTextWidget getLocationAtOffset fTextWidget getLocationAtOffset
Returns the average character width of this viewer s widget return the average character width of this viewer s widget final protected int get Average Char Width GC gc new GC f Text Widget gc set Font f Text Widget get Font int increment gc get Font Metrics get Average Char Width gc dispose return increment  getAverageCharWidth fTextWidget setFont fTextWidget getFont getFontMetrics getAverageCharWidth
see Viewer refresh public void refresh set Document get Document  setDocument getDocument
Returns the slave document manager return the slave document manager since 2 1 protected I Slave Document Manager get Slave Document Manager if f Slave Document Manager null f Slave Document Manager create Slave Document Manager return f Slave Document Manager  ISlaveDocumentManager getSlaveDocumentManager fSlaveDocumentManager fSlaveDocumentManager createSlaveDocumentManager fSlaveDocumentManager
Creates a new slave document manager This implementation always returns a code Child Document Manager code return I Slave Document Manager since 2 1 protected I Slave Document Manager create Slave Document Manager return new Child Document Manager  ChildDocumentManager ISlaveDocumentManager ISlaveDocumentManager createSlaveDocumentManager ChildDocumentManager
public final void invalidate Text Presentation if f Visible Document null f Widget Command event null f Widget Command start 0 f Widget Command length f Visible Document get Length f Widget Command text f Visible Document get update Text Listeners f Widget Command  invalidateTextPresentation fVisibleDocument fWidgetCommand fWidgetCommand fWidgetCommand fVisibleDocument getLength fWidgetCommand fVisibleDocument updateTextListeners fWidgetCommand
Invalidates the given range of the text presentation param offset the offset of the range to be invalidated param length the length of the range to be invalidated since 2 1 public final void invalidate Text Presentation int offset int length if f Visible Document null I Region widget Range model Range2 Widget Range new Region offset length if widget Range null f Widget Command event null f Widget Command start widget Range get Offset f Widget Command length widget Range get Length try f Widget Command text f Visible Document get widget Range get Offset widget Range get Length update Text Listeners f Widget Command catch Bad Location Exception x can not happen because of previous checking  invalidateTextPresentation fVisibleDocument IRegion widgetRange modelRange2WidgetRange widgetRange fWidgetCommand fWidgetCommand widgetRange getOffset fWidgetCommand widgetRange getLength fWidgetCommand fVisibleDocument widgetRange getOffset widgetRange getLength updateTextListeners fWidgetCommand BadLocationException
Initializes the text widget with the visual document and invalidates the overall presentation private void initialize Widget Contents if f Text Widget null f Visible Document null set widget content if f Document Adapter null f Document Adapter create Document Adapter f Document Adapter set Document f Visible Document f Text Widget set Content f Document Adapter invalidate presentation invalidate Text Presentation  initializeWidgetContents fTextWidget fVisibleDocument fDocumentAdapter fDocumentAdapter createDocumentAdapter fDocumentAdapter setDocument fVisibleDocument fTextWidget setContent fDocumentAdapter invalidateTextPresentation
Frees the given document if it is a slave document param slave the potential slave document since 3 0 protected void free Slave Document I Document slave I Slave Document Manager manager get Slave Document Manager if manager null manager is Slave Document slave manager free Slave Document slave  freeSlaveDocument IDocument ISlaveDocumentManager getSlaveDocumentManager isSlaveDocument freeSlaveDocument
Sets this viewer s visible document The visible document represents the visible region of the viewer s input document param document the visible document protected void set Visible Document I Document document if f Visible Document document f Visible Document instanceof Child Document optimization for new child documents return if f Visible Document null if f Visible Document Listener null f Visible Document remove Document Listener f Visible Document Listener if f Visible Document document free Slave Document f Visible Document f Visible Document document initialize Document Information Mapping f Visible Document initialize Widget Contents f Find Replace Document Adapter null if f Visible Document null f Visible Document Listener null f Visible Document add Document Listener f Visible Document Listener  setVisibleDocument IDocument fVisibleDocument fVisibleDocument ChildDocument fVisibleDocument fVisibleDocumentListener fVisibleDocument removeDocumentListener fVisibleDocumentListener fVisibleDocument freeSlaveDocument fVisibleDocument fVisibleDocument initializeDocumentInformationMapping fVisibleDocument initializeWidgetContents fFindReplaceDocumentAdapter fVisibleDocument fVisibleDocumentListener fVisibleDocument addDocumentListener fVisibleDocumentListener
Hook method called when the visible document is about to be changed p Subclasses may override param event the document event since 3 0 protected void handle Visible Document About To Be Changed Document Event event  handleVisibleDocumentAboutToBeChanged DocumentEvent
Hook method called when the visible document has been changed p Subclasses may override param event the document event since 3 0 protected void handle Visible Document Changed Document Event event  handleVisibleDocumentChanged DocumentEvent
Initializes the document information mapping between the given slave document and its master document param visible Document the slave document since 2 1 protected void initialize Document Information Mapping I Document visible Document I Slave Document Manager manager get Slave Document Manager f Information Mapping manager null null manager create Master Slave Mapping visible Document  visibleDocument initializeDocumentInformationMapping IDocument visibleDocument ISlaveDocumentManager getSlaveDocumentManager fInformationMapping createMasterSlaveMapping visibleDocument
Returns the viewer s visible document return the viewer s visible document protected I Document get Visible Document return f Visible Document  IDocument getVisibleDocument fVisibleDocument
Returns the offset of the visible region return the offset of the visible region protected int  getVisibleRegionOffset I Document document get Visible Document if document instanceof Child Document Child Document cdoc Child Document document return cdoc get Parent Document Range get Offset return 0  _getVisibleRegionOffset IDocument getVisibleDocument ChildDocument ChildDocument ChildDocument getParentDocumentRange getOffset
public I Region get Visible Region I Document document get Visible Document if document instanceof Child Document Position p Child Document document get Parent Document Range return new Region p get Offset p get Length return new Region 0 document null 0 document get Length  IRegion getVisibleRegion IDocument getVisibleDocument ChildDocument ChildDocument getParentDocumentRange getOffset getLength getLength
public boolean overlaps With Visible Region int start int length I Document document get Visible Document if document instanceof Child Document Child Document cdoc Child Document document return cdoc get Parent Document Range overlaps With start length else if document null int size document get Length return start 0 length 0 start length size return false  overlapsWithVisibleRegion IDocument getVisibleDocument ChildDocument ChildDocument ChildDocument getParentDocumentRange overlapsWith getLength
public void set Visible Region int start int length I Region region get Visible Region if start region get Offset length region get Length nothing to change return set Redraw false try I Document slave Document create Slave Document get Visible Document if update Slave Document slave Document start length set Visible Document slave Document catch Bad Location Exception x throw new Illegal Argument Exception J Face Text Messages get String Text Viewer error invalid visible region 2 NON NLS 1 finally set Redraw true  setVisibleRegion IRegion getVisibleRegion getOffset getLength setRedraw IDocument slaveDocument createSlaveDocument getVisibleDocument updateSlaveDocument slaveDocument setVisibleDocument slaveDocument BadLocationException IllegalArgumentException JFaceTextMessages getString TextViewer invalid_visible_region_2 setRedraw
public void reset Visible Region I Slave Document Manager manager get Slave Document Manager if manager null I Document slave get Visible Document I Document master manager get Master Document slave if master null set Visible Document master manager free Slave Document slave  resetVisibleRegion ISlaveDocumentManager getSlaveDocumentManager IDocument getVisibleDocument IDocument getMasterDocument setVisibleDocument freeSlaveDocument
public void set Text Double Click Strategy I Text Double Click Strategy strategy String content Type if strategy null if f Double Click Strategies null f Double Click Strategies new Hash Map f Double Click Strategies put content Type strategy else if f Double Click Strategies null f Double Click Strategies remove content Type  setTextDoubleClickStrategy ITextDoubleClickStrategy contentType fDoubleClickStrategies fDoubleClickStrategies HashMap fDoubleClickStrategies contentType fDoubleClickStrategies fDoubleClickStrategies contentType
Selects from the given map the one which is registered under the content type of the partition in which the given offset is located param plugins the map from which to choose param offset the offset for which to find the plug in return the plug in registered under the offset s content type protected Object select Content Type Plugin int offset Map plugins try return select Content Type Plugin Text Utilities get Content Type get Document get Document Partitioning offset true plugins catch Bad Location Exception x if TRACE ERRORS System out println J Face Text Messages get String Text Viewer error bad location select Content Type Plugin NON NLS 1 return null  selectContentTypePlugin selectContentTypePlugin TextUtilities getContentType getDocument getDocumentPartitioning BadLocationException TRACE_ERRORS JFaceTextMessages getString TextViewer bad_location selectContentTypePlugin
Selects from the given code plug ins code this one which is registered for the given content code type code param type the type to be used as lookup key param plugins the table to be searched return the plug in in the map for the given content type private Object select Content Type Plugin String type Map plugins if plugins null return null return plugins get type  selectContentTypePlugin
Hook called on receipt of a code Verify Event code The event has been translated into a code Document Command code which can now be manipulated by interested parties By default the hook forwards the command to the installed instances of code I Auto Edit Strategy code param command the document command representing the verify event protected void customize Document Command Document Command command if is Ignoring Auto Edit Strategies return List strategies List select Content Type Plugin command offset f Auto Indent Strategies if strategies null return switch strategies size optimization case 0 break case 1 I Auto Edit Strategy strategies iterator next customize Document Command get Document command break make iterator robust against adding removing strategies from within strategies default strategies new Array List strategies I Document document get Document for final Iterator iterator strategies iterator iterator has Next I Auto Edit Strategy iterator next customize Document Command document command break  VerifyEvent DocumentCommand IAutoEditStrategy customizeDocumentCommand DocumentCommand isIgnoringAutoEditStrategies selectContentTypePlugin fAutoIndentStrategies IAutoEditStrategy customizeDocumentCommand getDocument ArrayList IDocument getDocument hasNext IAutoEditStrategy customizeDocumentCommand
Handles the verify event issued by the viewer s text widget see Verify Listener verify Text Verify Event param e the verify event protected void handle Verify Event Verify Event e if f Event Consumer null f Event Consumer process Event e if e doit return I Region model Range event2 Model Range e f Document Command set Event e model Range customize Document Command f Document Command if f Document Command fill Event e model Range boolean compound Change f Document Command get Command Count 1 try f Verify Listener forward false if compound Change f Undo Manager null f Undo Manager begin Compound Change if f Slave Document Manager null I Document visible get Visible Document try f Slave Document Manager set Auto Expand Mode visible true f Document Command execute get Document finally f Slave Document Manager set Auto Expand Mode visible false else f Document Command execute get Document if f Text Widget null int document Caret f Document Command caret Offset if document Caret 1 old behavior of document command document Caret f Document Command offset f Document Command text null 0 f Document Command text length int widget Caret model Offset2 Widget Offset document Caret if widget Caret 1 try to move it to the closest spot I Region region get Model Coverage if region null if document Caret region get Offset widget Caret 0 else if document Caret region get Offset region get Length widget Caret get Visible Region get Length if widget Caret 1 there is a valid widget caret f Text Widget set Caret Offset widget Caret f Text Widget show Selection catch Bad Location Exception x if TRACE ERRORS System out println J Face Text Messages get String Text Viewer error bad location verify Text NON NLS 1 finally if compound Change f Undo Manager null f Undo Manager end Compound Change f Verify Listener forward true  VerifyListener verifyText VerifyEvent handleVerifyEvent VerifyEvent fEventConsumer fEventConsumer processEvent IRegion modelRange event2ModelRange fDocumentCommand setEvent modelRange customizeDocumentCommand fDocumentCommand fDocumentCommand fillEvent modelRange compoundChange fDocumentCommand getCommandCount fVerifyListener compoundChange fUndoManager fUndoManager beginCompoundChange fSlaveDocumentManager IDocument getVisibleDocument fSlaveDocumentManager setAutoExpandMode fDocumentCommand getDocument fSlaveDocumentManager setAutoExpandMode fDocumentCommand getDocument fTextWidget documentCaret fDocumentCommand caretOffset documentCaret documentCaret fDocumentCommand fDocumentCommand fDocumentCommand widgetCaret modelOffset2WidgetOffset documentCaret widgetCaret IRegion getModelCoverage documentCaret getOffset widgetCaret documentCaret getOffset getLength widgetCaret getVisibleRegion getLength widgetCaret fTextWidget setCaretOffset widgetCaret fTextWidget showSelection BadLocationException TRACE_ERRORS JFaceTextMessages getString TextViewer bad_location verifyText compoundChange fUndoManager fUndoManager endCompoundChange fVerifyListener
Returns whether the marked region of this viewer is empty return code true code if the marked region of this viewer is empty otherwise code false code since 2 0 private boolean is Marked Region Empty return f Text Widget null f Mark Position null f Mark Position is Deleted model Range2 Widget Range f Mark Position null  isMarkedRegionEmpty fTextWidget fMarkPosition fMarkPosition isDeleted modelRange2WidgetRange fMarkPosition
public boolean can Do Operation int operation if f Text Widget null redraws return false switch operation case CUT return is Editable f Text Widget get Selection Count 0 is Marked Region Empty case COPY return f Text Widget get Selection Count 0 is Marked Region Empty case DELETE case PASTE return is Editable case SELECT ALL return true case SHIFT LEFT return is Editable f Indent Chars null case SHIFT RIGHT return is Editable f Indent Chars null are Multiple Lines Selected case PREFIX case STRIP PREFIX return is Editable f Default Prefix Chars null case UNDO return f Undo Manager null f Undo Manager undoable case REDO return f Undo Manager null f Undo Manager redoable case PRINT return is Printable return false  canDoOperation fTextWidget isEditable fTextWidget getSelectionCount isMarkedRegionEmpty fTextWidget getSelectionCount isMarkedRegionEmpty isEditable SELECT_ALL SHIFT_LEFT isEditable fIndentChars SHIFT_RIGHT isEditable fIndentChars areMultipleLinesSelected STRIP_PREFIX isEditable fDefaultPrefixChars fUndoManager fUndoManager fUndoManager fUndoManager isPrintable
public void do Operation int operation if f Text Widget null redraws return Point selection null switch operation case UNDO if f Undo Manager null ignore Auto Edit Strategies true f Undo Manager undo ignore Auto Edit Strategies false break case REDO if f Undo Manager null ignore Auto Edit Strategies true f Undo Manager redo ignore Auto Edit Strategies false break case CUT if f Text Widget get Selection Count 0 copy Marked Region true else f Text Widget cut selection f Text Widget get Selection Range fire Selection Changed selection x selection y break case COPY if f Text Widget get Selection Count 0 copy Marked Region false else f Text Widget copy break case PASTE ignore Auto Edit Strategies true f Text Widget paste selection f Text Widget get Selection Range fire Selection Changed selection x selection y ignore Auto Edit Strategies false break case DELETE delete Text selection f Text Widget get Selection Range fire Selection Changed selection x selection y break case SELECT ALL if get Document null set Selected Range 0 get Document get Length break case SHIFT RIGHT shift false true false break case SHIFT LEFT shift false false false break case PREFIX shift true true true break case STRIP PREFIX shift true false true break case PRINT print break  doOperation fTextWidget fUndoManager ignoreAutoEditStrategies fUndoManager ignoreAutoEditStrategies fUndoManager ignoreAutoEditStrategies fUndoManager ignoreAutoEditStrategies fTextWidget getSelectionCount copyMarkedRegion fTextWidget fTextWidget getSelectionRange fireSelectionChanged fTextWidget getSelectionCount copyMarkedRegion fTextWidget ignoreAutoEditStrategies fTextWidget fTextWidget getSelectionRange fireSelectionChanged ignoreAutoEditStrategies deleteText fTextWidget getSelectionRange fireSelectionChanged SELECT_ALL getDocument setSelectedRange getDocument getLength SHIFT_RIGHT SHIFT_LEFT STRIP_PREFIX
Tells this viewer whether the registered auto edit strategies should be ignored param ignore code true code if the strategies should be ignored since 2 1 protected void ignore Auto Edit Strategies boolean ignore f Ignore Auto Indent ignore I Document document get Document if document instanceof I Document Extension2 I Document Extension2 extension I Document Extension2 document if ignore extension ignore Post Notification Replaces else extension accept Post Notification Replaces  ignoreAutoEditStrategies fIgnoreAutoIndent IDocument getDocument IDocumentExtension2 IDocumentExtension2 IDocumentExtension2 ignorePostNotificationReplaces acceptPostNotificationReplaces
Returns whether this viewer ignores the registered auto edit strategies return code true code if the strategies are ignored since 2 1 protected boolean is Ignoring Auto Edit Strategies return f Ignore Auto Indent  isIgnoringAutoEditStrategies fIgnoreAutoIndent
public void enable Operation int operation boolean enable No op by default Will be changed to regularly disable the known operations  enableOperation
Copies cuts the marked region param delete code true code if the region should be deleted rather than copied since 2 0 protected void copy Marked Region boolean delete if f Text Widget null return if f Mark Position null f Mark Position is Deleted model Range2 Widget Range f Mark Position null return int widget Mark Offset model Offset2 Widget Offset f Mark Position offset Point selection f Text Widget get Selection if selection x widget Mark Offset f Text Widget set Selection selection x widget Mark Offset else f Text Widget set Selection widget Mark Offset selection x if delete f Text Widget cut else f Text Widget copy f Text Widget set Selection selection x restore old cursor position  copyMarkedRegion fTextWidget fMarkPosition fMarkPosition isDeleted modelRange2WidgetRange fMarkPosition widgetMarkOffset modelOffset2WidgetOffset fMarkPosition fTextWidget getSelection widgetMarkOffset fTextWidget setSelection widgetMarkOffset fTextWidget setSelection widgetMarkOffset fTextWidget fTextWidget fTextWidget setSelection
Deletes the current selection If the selection has the length 0 the selection is automatically extended to the right either by 1 or by the length of line delimiter if at the end of a line deprecated use code Styled Text invoke Action code instead protected void delete Text f Text Widget invoke Action ST DELETE NEXT  StyledText invokeAction deleteText fTextWidget invokeAction DELETE_NEXT
A block is selected if the character preceding the start of the selection is a new line character return code true code if a block is selected protected boolean is Block Selected Point s get Selected Range if s y 0 return false try I Document document get Document int line document get Line Of Offset s x int start document get Line Offset line return s x start catch Bad Location Exception x return false  isBlockSelected getSelectedRange IDocument getDocument getLineOfOffset getLineOffset BadLocationException
Returns code true code if one line is completely selected or if multiple lines are selected Being completely selected means that all characters except the new line characters are selected return code true code if one or multiple lines are selected since 2 0 protected boolean are Multiple Lines Selected Point s get Selected Range if s y 0 return false try I Document document get Document int start Line document get Line Of Offset s x int end Line document get Line Of Offset s x s y I Region line document get Line Information start Line return start Line end Line s x line get Offset s y line get Length catch Bad Location Exception x return false  areMultipleLinesSelected getSelectedRange IDocument getDocument startLine getLineOfOffset endLine getLineOfOffset IRegion getLineInformation startLine startLine endLine getOffset getLength BadLocationException
Returns the index of the first line whose start offset is in the given text range param region the text range in characters where to find the line return the first line whose start index is in the given range 1 if there is no such line private int get First Complete Line Of Region I Region region try I Document d get Document int start Line d get Line Of Offset region get Offset int offset d get Line Offset start Line if offset region get Offset return start Line offset d get Line Offset start Line 1 return offset region get Offset region get Length 1 start Line 1 catch Bad Location Exception x if TRACE ERRORS System out println J Face Text Messages get String Text Viewer error bad location get First Complete Line Of Region NON NLS 1 return 1  getFirstCompleteLineOfRegion IRegion IDocument getDocument startLine getLineOfOffset getOffset getLineOffset startLine getOffset startLine getLineOffset startLine getOffset getLength startLine BadLocationException TRACE_ERRORS JFaceTextMessages getString TextViewer bad_location getFirstCompleteLineOfRegion
Creates a region describing the text block something that starts at the beginning of a line completely containing the current selection param selection the selection to use return the region describing the text block comprising the given selection since 2 0 private I Region get Text Block From Selection Point selection try I Document document get Document I Region line document get Line Information Of Offset selection x int length selection y 0 line get Length selection y selection x line get Offset return new Region line get Offset length catch Bad Location Exception x return null  IRegion getTextBlockFromSelection IDocument getDocument IRegion getLineInformationOfOffset getLength getOffset getOffset BadLocationException
Shifts a text block to the right or left using the specified set of prefix characters The prefixes must start at the beginning of the line param use Default Prefixes says whether the configured default or indent prefixes should be used param right says whether to shift to the right or the left deprecated use shift boolean boolean boolean instead protected void shift boolean use Default Prefixes boolean right shift use Default Prefixes right false  useDefaultPrefixes useDefaultPrefixes useDefaultPrefixes
Shifts a text block to the right or left using the specified set of prefix characters If white space should be ignored the prefix characters must not be at the beginning of the line when shifting to the left There may be whitespace in front of the prefixes param use Default Prefixes says whether the configured default or indent prefixes should be used param right says whether to shift to the right or the left param ignore Whitespace says whether whitespace in front of prefixes is allowed since 2 0 protected void shift boolean use Default Prefixes boolean right boolean ignore Whitespace if f Undo Manager null f Undo Manager begin Compound Change set Redraw false start Sequential Rewrite Mode true I Document d get Document Map partitioners null try Point selection get Selected Range I Region block get Text Block From Selection selection I Typed Region regions Text Utilities compute Partitioning d get Document Partitioning block get Offset block get Length false int line Count 0 int lines new int regions length 2 start line end line start line end line for int i 0 j 0 i regions length i j 2 start line of region lines j get First Complete Line Of Region regions i end line of region int length regions i get Length int offset regions i get Offset length if length 0 offset lines j 1 lines j 1 1 d get Line Of Offset offset line Count lines j 1 lines j 1 if line Count 20 partitioners Text Utilities remove Document Partitioners d Remember the selection range I Position Updater position Updater new Shift Position Updater SHIFTING Position remembered Selection new Position selection x selection y d add Position Category SHIFTING d add Position Updater position Updater try d add Position SHIFTING remembered Selection catch Bad Position Category Exception ex should not happen Perform the shift operation Map map use Default Prefixes f Default Prefix Chars f Indent Chars for int i 0 j 0 i regions length i j 2 String prefixes String select Content Type Plugin regions i get Type map if prefixes null prefixes length 0 lines j 0 lines j 1 0 if right shift Right lines j lines j 1 prefixes 0 else shift Left lines j lines j 1 prefixes ignore Whitespace Restore the selection set Selected Range remembered Selection get Offset remembered Selection get Length try d remove Position Updater position Updater d remove Position Category SHIFTING catch Bad Position Category Exception ex should not happen catch Bad Location Exception x if TRACE ERRORS System out println J Face Text Messages get String Text Viewer error bad location shift 1 NON NLS 1 finally if partitioners null Text Utilities add Document Partitioners d partitioners stop Sequential Rewrite Mode set Redraw true if f Undo Manager null f Undo Manager end Compound Change  useDefaultPrefixes ignoreWhitespace useDefaultPrefixes ignoreWhitespace fUndoManager fUndoManager beginCompoundChange setRedraw startSequentialRewriteMode IDocument getDocument getSelectedRange IRegion getTextBlockFromSelection ITypedRegion TextUtilities computePartitioning getDocumentPartitioning getOffset getLength lineCount getFirstCompleteLineOfRegion getLength getOffset getLineOfOffset lineCount lineCount TextUtilities removeDocumentPartitioners IPositionUpdater positionUpdater ShiftPositionUpdater rememberedSelection addPositionCategory addPositionUpdater positionUpdater addPosition rememberedSelection BadPositionCategoryException useDefaultPrefixes fDefaultPrefixChars fIndentChars selectContentTypePlugin getType shiftRight shiftLeft ignoreWhitespace setSelectedRange rememberedSelection getOffset rememberedSelection getLength removePositionUpdater positionUpdater removePositionCategory BadPositionCategoryException BadLocationException TRACE_ERRORS JFaceTextMessages getString TextViewer bad_location shift_1 TextUtilities addDocumentPartitioners stopSequentialRewriteMode setRedraw fUndoManager fUndoManager endCompoundChange
Shifts the specified lines to the right inserting the given prefix at the beginning of each line param prefix the prefix to be inserted param start Line the first line to shift param end Line the last line to shift since 2 0 private void shift Right int start Line int end Line String prefix try I Document d get Document while start Line end Line d replace d get Line Offset start Line 0 prefix catch Bad Location Exception x if TRACE ERRORS System out println Text Viewer shift Right Bad Location Exception NON NLS 1  startLine endLine shiftRight startLine endLine IDocument getDocument startLine endLine getLineOffset startLine BadLocationException TRACE_ERRORS TextViewer shiftRight BadLocationException
Shifts the specified lines to the right or to the left On shifting to the right it insert code prefixes 0 code at the beginning of each line On shifting to the left it tests whether each of the specified lines starts with one of the specified prefixes and if so removes the prefix param start Line the first line to shift param end Line the last line to shift param prefixes the prefixes to be used for shifting param ignore Whitespace code true code if whitespace should be ignored code false code otherwise since 2 0 private void shift Left int start Line int end Line String prefixes boolean ignore Whitespace I Document d get Document try I Region occurrences new I Region end Line start Line 1 find all the first occurrences of prefix in the given lines for int i 0 i occurrences length i I Region line d get Line Information start Line i String text d get line get Offset line get Length int index 1 int found Text Utilities index Of prefixes text 0 if found 0 1 if ignore Whitespace String s d get line get Offset found 0 s s trim if s length 0 index line get Offset found 0 else if found 0 0 index line get Offset if index 1 remember where prefix is in line so that it can be removed int length prefixes found 1 length if length 0 ignore Whitespace line get Length 0 found a non empty line which cannot be shifted return else occurrences i new Region index length else found a line which cannot be shifted return OK change the document int decrement 0 for int i 0 i occurrences length i I Region r occurrences i d replace r get Offset decrement r get Length NON NLS 1 decrement r get Length catch Bad Location Exception x if TRACE ERRORS System out println Text Viewer shift Left Bad Location Exception NON NLS 1  startLine endLine ignoreWhitespace shiftLeft startLine endLine ignoreWhitespace IDocument getDocument IRegion IRegion endLine startLine IRegion getLineInformation startLine getOffset getLength TextUtilities indexOf ignoreWhitespace getOffset getOffset getOffset ignoreWhitespace getLength IRegion getOffset getLength getLength BadLocationException TRACE_ERRORS TextViewer shiftLeft BadLocationException
Returns whether the shown text can be printed return the viewer s printable mode protected boolean is Printable 1GK7Q10 ITPUI WIN98 internal error after invoking print at editor view Changed from returning true to testing the length of the printer queue Printer Data printer List Printer get Printer List return printer List null printer List length 0  isPrintable PrinterData printerList getPrinterList printerList printerList
Thread printing Thread new Thread Printing NON NLS 1 public void run styled Text Printer run printer dispose  printingThread styledTextPrinter
Brings up a print dialog and calls code print Contents Printer code which performs the actual print protected void print final Print Dialog dialog new Print Dialog f Text Widget get Shell SWT PRIMARY MODAL final Printer Data data dialog open if data null final Printer printer new Printer data final Runnable styled Text Printer f Text Widget print printer Thread printing Thread new Thread Printing NON NLS 1 public void run styled Text Printer run printer dispose printing Thread start  printContents PrintDialog PrintDialog fTextWidget getShell PRIMARY_MODAL PrinterData styledTextPrinter fTextWidget printingThread styledTextPrinter printingThread
Adheres to the contract of link I Find Replace Target can Perform Find return code true code if find can be performed code false code otherwise protected boolean can Perform Find I Document d get Visible Document return f Text Widget null d null d get Length 0  IFindReplaceTarget canPerformFind canPerformFind IDocument getVisibleDocument fTextWidget getLength
Adheres to the contract of link I Find Replace Target find And Select int String boolean boolean boolean param start Position the start position param find String the find string specification param forward Search the search direction param case Sensitive code true code if case sensitive code false code otherwise param whole Word code true code if match must be whole words code false code otherwise return the widget offset of the first match deprecated as of 3 0 use link find And Select int String boolean boolean boolean boolean protected int find And Select int start Position String find String boolean forward Search boolean case Sensitive boolean whole Word try return find And Select start Position find String forward Search case Sensitive whole Word false catch Illegal State Exception ex return 1 catch Pattern Syntax Exception ex return 1  IFindReplaceTarget findAndSelect startPosition findString forwardSearch caseSensitive wholeWord findAndSelect findAndSelect startPosition findString forwardSearch caseSensitive wholeWord findAndSelect startPosition findString forwardSearch caseSensitive wholeWord IllegalStateException PatternSyntaxException
Adheres to the contract of link I Find Replace Target Extension3 find And Select int String boolean boolean boolean boolean param start Position the start position param find String the find string specification param forward Search the search direction param case Sensitive code true code if case sensitive code false code otherwise param whole Word code true code if matches must be whole words code false code otherwise param reg Ex Search code true code if code find String code is a regular expression code false code otherwise return the widget offset of the first match protected int find And Select int start Position String find String boolean forward Search boolean case Sensitive boolean whole Word boolean reg Ex Search if f Text Widget null return 1 try int widget Offset start Position 1 start Position model Offset2 Widget Offset start Position I Region match Region get Find Replace Document Adapter find widget Offset find String forward Search case Sensitive whole Word reg Ex Search if match Region null int widget Pos match Region get Offset int length match Region get Length if redraws f Text Widget set Selection Range widget Pos length internal Reveal Range widget Pos widget Pos length selection Changed widget Pos length else set Selected Range widget Offset2 Model Offset widget Pos length return widget Offset2 Model Offset widget Pos catch Bad Location Exception x if TRACE ERRORS System out println J Face Text Messages get String Text Viewer error bad location find And Select NON NLS 1 return 1  IFindReplaceTargetExtension3 findAndSelect startPosition findString forwardSearch caseSensitive wholeWord regExSearch findString findAndSelect startPosition findString forwardSearch caseSensitive wholeWord regExSearch fTextWidget widgetOffset startPosition startPosition modelOffset2WidgetOffset startPosition IRegion matchRegion getFindReplaceDocumentAdapter widgetOffset findString forwardSearch caseSensitive wholeWord regExSearch matchRegion widgetPos matchRegion getOffset matchRegion getLength fTextWidget setSelectionRange widgetPos internalRevealRange widgetPos widgetPos selectionChanged widgetPos setSelectedRange widgetOffset2ModelOffset widgetPos widgetOffset2ModelOffset widgetPos BadLocationException TRACE_ERRORS JFaceTextMessages getString TextViewer bad_location findAndSelect
Adheres to the contract of link I Find Replace Target Extension3 find And Select int String boolean boolean boolean boolean param start Position the start position param find String the find string specification param forward Search the search direction param case Sensitive code true code if case sensitive code false code otherwise param whole Word code true code if matches must be whole words code false code otherwise param range Offset the search scope offset param range Length the search scope length param reg Ex Search code true code if code find String code is a regular expression code false code otherwise return the widget offset of the first match since 3 0 protected int find And Select In Range int start Position String find String boolean forward Search boolean case Sensitive boolean whole Word int range Offset int range Length boolean reg Ex Search if f Text Widget null return 1 try int model Offset if forward Search start Position 1 start Position range Offset model Offset range Offset else if forward Search start Position 1 start Position range Offset range Length model Offset range Offset range Length else model Offset start Position int widget Offset model Offset2 Widget Offset model Offset if widget Offset 1 return 1 I Region match Region get Find Replace Document Adapter find widget Offset find String forward Search case Sensitive whole Word reg Ex Search int widget Pos 1 int length 0 if match Region null widget Pos match Region get Offset length match Region get Length int model Pos widget Pos 1 1 widget Offset2 Model Offset widget Pos if widget Pos 1 model Pos range Offset model Pos length range Offset range Length widget Pos 1 if widget Pos 1 if redraws f Text Widget set Selection Range widget Pos length internal Reveal Range widget Pos widget Pos length selection Changed widget Pos length else set Selected Range model Pos length return model Pos catch Bad Location Exception x if TRACE ERRORS System out println J Face Text Messages get String Text Viewer error bad location find And Select NON NLS 1 return 1  IFindReplaceTargetExtension3 findAndSelect startPosition findString forwardSearch caseSensitive wholeWord rangeOffset rangeLength regExSearch findString findAndSelectInRange startPosition findString forwardSearch caseSensitive wholeWord rangeOffset rangeLength regExSearch fTextWidget modelOffset forwardSearch startPosition startPosition rangeOffset modelOffset rangeOffset forwardSearch startPosition startPosition rangeOffset rangeLength modelOffset rangeOffset rangeLength modelOffset startPosition widgetOffset modelOffset2WidgetOffset modelOffset widgetOffset IRegion matchRegion getFindReplaceDocumentAdapter widgetOffset findString forwardSearch caseSensitive wholeWord regExSearch widgetPos matchRegion widgetPos matchRegion getOffset matchRegion getLength modelPos widgetPos widgetOffset2ModelOffset widgetPos widgetPos modelPos rangeOffset modelPos rangeOffset rangeLength widgetPos widgetPos fTextWidget setSelectionRange widgetPos internalRevealRange widgetPos widgetPos selectionChanged widgetPos setSelectedRange modelPos modelPos BadLocationException TRACE_ERRORS JFaceTextMessages getString TextViewer bad_location findAndSelect
see I Text Viewer set Text Color Color public void set Text Color Color color if color null set Text Color color 0 get Document get Length true  ITextViewer setTextColor setTextColor setTextColor getDocument getLength
public void set Text Color Color color int start int length boolean control Redraw if f Text Widget null if control Redraw f Text Widget set Redraw false Style Range s new Style Range s foreground color s start start s length length s model Style Range2 Widget Style Range s if s null if control Redraw f Text Widget set Redraw false f Text Widget set Style Range s if control Redraw f Text Widget set Redraw true  setTextColor controlRedraw fTextWidget controlRedraw fTextWidget setRedraw StyleRange StyleRange modelStyleRange2WidgetStyleRange controlRedraw fTextWidget setRedraw fTextWidget setStyleRange controlRedraw fTextWidget setRedraw
Adds the given presentation to the viewer s style information param presentation the presentation to be added private void add Presentation Text Presentation presentation Style Range range presentation get Default Style Range if range null range model Style Range2 Widget Style Range range if range null f Text Widget set Style Range range Iterator e presentation get Non Default Style Range Iterator while e has Next range Style Range e next range model Style Range2 Widget Style Range range if range null f Text Widget set Style Range range else I Region region model Range2 Widget Range presentation get Coverage if region null return List list new Array List presentation get Denumerable Ranges Iterator e presentation get All Style Range Iterator while e has Next range Style Range e next range model Style Range2 Widget Style Range range if range null list add range if list is Empty Style Range ranges new Style Range list size list to Array ranges f Text Widget replace Style Ranges region get Offset region get Length ranges  addPresentation TextPresentation StyleRange getDefaultStyleRange modelStyleRange2WidgetStyleRange fTextWidget setStyleRange getNonDefaultStyleRangeIterator hasNext StyleRange modelStyleRange2WidgetStyleRange fTextWidget setStyleRange IRegion modelRange2WidgetRange getCoverage ArrayList getDenumerableRanges getAllStyleRangeIterator hasNext StyleRange modelStyleRange2WidgetStyleRange isEmpty StyleRange StyleRange toArray fTextWidget replaceStyleRanges getOffset getLength
Applies the given presentation to the given text widget Helper method param presentation the style information since 2 1 private void apply Text Presentation Text Presentation presentation List list new Array List presentation get Denumerable Ranges Iterator e presentation get All Style Range Iterator while e has Next Style Range range Style Range e next range model Style Range2 Widget Style Range range if range null list add range if list is Empty Style Range ranges new Style Range list size list to Array ranges f Text Widget set Style Ranges ranges  applyTextPresentation TextPresentation ArrayList getDenumerableRanges getAllStyleRangeIterator hasNext StyleRange StyleRange modelStyleRange2WidgetStyleRange isEmpty StyleRange StyleRange toArray fTextWidget setStyleRanges
Returns the visible region if it is not equal to the whole document Otherwise returns code null code return the viewer s visible region if smaller than input document otherwise code null code protected I Region  internalGetVisibleRegion I Document document get Visible Document if document instanceof Child Document Position p Child Document document get Parent Document Range return new Region p get Offset p get Length return null  IRegion _internalGetVisibleRegion IDocument getVisibleDocument ChildDocument ChildDocument getParentDocumentRange getOffset getLength
public void change Text Presentation Text Presentation presentation boolean control Redraw if presentation null redraws return if f Text Widget null return Call registered text presentation listeners and let them apply their presentation if f Text Presentation Listeners null Array List listeners new Array List f Text Presentation Listeners for int i 0 size listeners size i size i I Text Presentation Listener listener I Text Presentation Listener listeners get i listener apply Text Presentation presentation if presentation is Empty return if control Redraw f Text Widget set Redraw false if f Replace Text Presentation apply Text Presentation presentation else add Presentation presentation if control Redraw f Text Widget set Redraw true  changeTextPresentation TextPresentation controlRedraw fTextWidget fTextPresentationListeners ArrayList ArrayList fTextPresentationListeners ITextPresentationListener ITextPresentationListener applyTextPresentation isEmpty controlRedraw fTextWidget setRedraw fReplaceTextPresentation applyTextPresentation addPresentation controlRedraw fTextWidget setRedraw
public I Find Replace Target get Find Replace Target if f Find Replace Target null f Find Replace Target new Find Replace Target return f Find Replace Target  IFindReplaceTarget getFindReplaceTarget fFindReplaceTarget fFindReplaceTarget FindReplaceTarget fFindReplaceTarget
Returns the find replace document adapter return the find replace document adapter since 3 0 protected Find Replace Document Adapter get Find Replace Document Adapter if f Find Replace Document Adapter null f Find Replace Document Adapter new Find Replace Document Adapter get Visible Document return f Find Replace Document Adapter  FindReplaceDocumentAdapter getFindReplaceDocumentAdapter fFindReplaceDocumentAdapter fFindReplaceDocumentAdapter FindReplaceDocumentAdapter getVisibleDocument fFindReplaceDocumentAdapter
see I Text Viewer get Text Operation Target public I Text Operation Target get Text Operation Target return this  ITextViewer getTextOperationTarget ITextOperationTarget getTextOperationTarget
since 2 0 public void append Verify Key Listener Verify Key Listener listener int index f Verify Key Listeners Manager number Of Listeners f Verify Key Listeners Manager insert Listener listener index  appendVerifyKeyListener VerifyKeyListener fVerifyKeyListenersManager numberOfListeners fVerifyKeyListenersManager insertListener
since 2 0 public void prepend Verify Key Listener Verify Key Listener listener f Verify Key Listeners Manager insert Listener listener 0  prependVerifyKeyListener VerifyKeyListener fVerifyKeyListenersManager insertListener
since 2 0 public void remove Verify Key Listener Verify Key Listener listener f Verify Key Listeners Manager remove Listener listener  removeVerifyKeyListener VerifyKeyListener fVerifyKeyListenersManager removeListener
since 2 0 public int get Mark return f Mark Position null f Mark Position is Deleted 1 f Mark Position get Offset  getMark fMarkPosition fMarkPosition isDeleted fMarkPosition getOffset
public void set Mark int offset clear if offset 1 if f Mark Position null f Mark Position is Deleted I Document document get Document if document null document remove Position f Mark Position f Mark Position null mark Changed 1 0 set else I Document document get Document if document null f Mark Position null return if f Mark Position null document remove Position f Mark Position f Mark Position null try Position position new Position offset document add Position MARK POSITION CATEGORY position f Mark Position position catch Bad Location Exception e return catch Bad Position Category Exception e return mark Changed model Offset2 Widget Offset f Mark Position offset 0  setMark fMarkPosition fMarkPosition isDeleted IDocument getDocument removePosition fMarkPosition fMarkPosition markChanged IDocument getDocument fMarkPosition fMarkPosition removePosition fMarkPosition fMarkPosition addPosition MARK_POSITION_CATEGORY fMarkPosition BadLocationException BadPositionCategoryException markChanged modelOffset2WidgetOffset fMarkPosition
protected void input Changed Object new Input Object old Input I Document old Document I Document old Input if old Document null if f Mark Position null f Mark Position is Deleted old Document remove Position f Mark Position try old Document remove Position Updater f Mark Position Updater old Document remove Position Category MARK POSITION CATEGORY catch Bad Position Category Exception e f Mark Position null super input Changed new Input old Input I Document new Document I Document new Input if new Document null new Document add Position Category MARK POSITION CATEGORY new Document add Position Updater f Mark Position Updater  inputChanged newInput oldInput IDocument oldDocument IDocument oldInput oldDocument fMarkPosition fMarkPosition isDeleted oldDocument removePosition fMarkPosition oldDocument removePositionUpdater fMarkPositionUpdater oldDocument removePositionCategory MARK_POSITION_CATEGORY BadPositionCategoryException fMarkPosition inputChanged newInput oldInput IDocument newDocument IDocument newInput newDocument newDocument addPositionCategory MARK_POSITION_CATEGORY newDocument addPositionUpdater fMarkPositionUpdater
Informs all text listeners about the change of the viewer s redraw state since 2 0 private void fire Redraw Changed f Widget Command start 0 f Widget Command length 0 f Widget Command text null f Widget Command event null update Text Listeners f Widget Command  fireRedrawChanged fWidgetCommand fWidgetCommand fWidgetCommand fWidgetCommand updateTextListeners fWidgetCommand
Forgets the previously remembered selection position After that call the selection position can no longer be queried and is longer updated in responds to content changes of the viewer return the remembered and updated selection position or code null code if no selection position has been remembered since 2 1 private Point forget Document Selection if f Document Selection null return null Point selection f Document Selection is Deleted null f Document Selection get Selection I Document document get Document if document null document remove Position f Document Selection f Document Selection null return selection  forgetDocumentSelection fDocumentSelection fDocumentSelection isDeleted fDocumentSelection getSelection IDocument getDocument removePosition fDocumentSelection fDocumentSelection
Enables the redrawing of this text viewer since 2 0 protected void enabled Redrawing enabled Redrawing 1  enabledRedrawing enabledRedrawing
Enables the redrawing of this text viewer param top Index the top index to be set or code 1 code since 3 0 protected void enabled Redrawing int top Index if f Document Adapter instanceof I Document Adapter Extension I Document Adapter Extension extension I Document Adapter Extension f Document Adapter Styled Text text Widget get Text Widget if text Widget null text Widget is Disposed int top Pixel text Widget get Top Pixel extension resume Forwarding Document Changes if top Index 1 try set Top Index top Index catch Illegal Argument Exception x changes don t allow for the previous top pixel else if top Pixel 1 try text Widget set Top Pixel top Pixel catch Illegal Argument Exception x changes don t allow for the previous top pixel Point selection forget Document Selection if selection null set Selected Range selection x selection y if top Index 1 reveal Range selection x selection y if f Text Widget null f Text Widget is Disposed f Text Widget set Redraw true fire Redraw Changed  topIndex enabledRedrawing topIndex fDocumentAdapter IDocumentAdapterExtension IDocumentAdapterExtension IDocumentAdapterExtension fDocumentAdapter StyledText textWidget getTextWidget textWidget textWidget isDisposed topPixel textWidget getTopPixel resumeForwardingDocumentChanges topIndex setTopIndex topIndex IllegalArgumentException topPixel textWidget setTopPixel topPixel IllegalArgumentException forgetDocumentSelection setSelectedRange topIndex revealRange fTextWidget fTextWidget isDisposed fTextWidget setRedraw fireRedrawChanged
Remembers the current selection in a code Selection Position code The selection position can be queried and is updated to changes made to the viewer s contents since 2 1 private void remember Document Selection Point selection get Selected Range if selection null Selection Position p new Selection Position selection I Document document get Document if document null try document add Position p f Document Selection p catch Bad Location Exception x  SelectionPosition rememberDocumentSelection getSelectedRange SelectionPosition SelectionPosition IDocument getDocument addPosition fDocumentSelection BadLocationException
Disables the redrawing of this text viewer Subclasses may extend since 2 0 protected void disable Redrawing remember Document Selection if f Document Adapter instanceof I Document Adapter Extension I Document Adapter Extension extension I Document Adapter Extension f Document Adapter extension stop Forwarding Document Changes if f Text Widget null f Text Widget is Disposed f Text Widget set Redraw false fire Redraw Changed  disableRedrawing rememberDocumentSelection fDocumentAdapter IDocumentAdapterExtension IDocumentAdapterExtension IDocumentAdapterExtension fDocumentAdapter stopForwardingDocumentChanges fTextWidget fTextWidget isDisposed fTextWidget setRedraw fireRedrawChanged
since 2 0 public final void set Redraw boolean redraw set Redraw redraw 1  setRedraw setRedraw
Basically same functionality as code I Text Viewer Extension set Redraw boolean code Adds a way for subclasses to pass in a desired top index that should be used when code redraw code is code true code If code top Index code is 1 this method is identical to code I Text Viewer Extension set Redraw boolean code see I Text Viewer Extension set Redraw boolean param redraw param top Index since 3 0 protected final void set Redraw boolean redraw int top Index if redraw f Redraw Counter if f Redraw Counter 1 disable Redrawing else f Redraw Counter if f Redraw Counter 0 if top Index 1 enabled Redrawing else enabled Redrawing top Index  ITextViewerExtension setRedraw topIndex ITextViewerExtension setRedraw ITextViewerExtension setRedraw topIndex setRedraw topIndex fRedrawCounter fRedrawCounter disableRedrawing fRedrawCounter fRedrawCounter topIndex enabledRedrawing enabledRedrawing topIndex
Returns whether this viewer redraws itself return code true code if this viewer redraws itself since 2 0 protected final boolean redraws return f Redraw Counter 0  fRedrawCounter
Starts the sequential rewrite mode of the viewer s document param normalized code true code if the rewrite is performed from the start to the end of the document since 2 0 protected final void start Sequential Rewrite Mode boolean normalized I Document document get Document if document instanceof I Document Extension I Document Extension extension I Document Extension document extension start Sequential Rewrite normalized  startSequentialRewriteMode IDocument getDocument IDocumentExtension IDocumentExtension IDocumentExtension startSequentialRewrite
Sets the sequential rewrite mode of the viewer s document since 2 0 protected final void stop Sequential Rewrite Mode I Document document get Document if document instanceof I Document Extension I Document Extension extension I Document Extension document extension stop Sequential Rewrite  stopSequentialRewriteMode IDocument getDocument IDocumentExtension IDocumentExtension IDocumentExtension stopSequentialRewrite
public I Rewrite Target get Rewrite Target if f Rewrite Target null f Rewrite Target new Rewrite Target return f Rewrite Target  IRewriteTarget getRewriteTarget fRewriteTarget fRewriteTarget RewriteTarget fRewriteTarget
public I Text Hover get Current Text Hover if f Text Hover Manager null return null return f Text Hover Manager get Current Text Hover  ITextHover getCurrentTextHover fTextHoverManager fTextHoverManager getCurrentTextHover
public Point get Hover Event Location if f Text Hover Manager null return null return f Text Hover Manager get Hover Event Location  getHoverEventLocation fTextHoverManager fTextHoverManager getHoverEventLocation
Returns the paint manager of this viewer return the paint manager of this viewer since 2 1 protected Paint Manager get Paint Manager if f Paint Manager null f Paint Manager new Paint Manager this return f Paint Manager  PaintManager getPaintManager fPaintManager fPaintManager PaintManager fPaintManager
Adds the given painter to this viewer If the painter is already registered this method is without effect param painter the painter to be added since 2 1 public void add Painter I Painter painter get Paint Manager add Painter painter  addPainter IPainter getPaintManager addPainter
Removes the given painter from this viewer If the painter has previously not been added to this viewer this method is without effect param painter the painter to be removed since 2 1 public void remove Painter I Painter painter get Paint Manager remove Painter painter  removePainter IPainter getPaintManager removePainter
Implements the contract of link I Text Viewer Extension5 model Line2 Widget Line int param model Line the model line return the corresponding widget line or code 1 code since 2 1 public int model Line2 Widget Line int model Line if f Information Mapping null return model Line try return f Information Mapping to Image Line model Line catch Bad Location Exception x return 1  ITextViewerExtension5 modelLine2WidgetLine modelLine modelLine2WidgetLine modelLine fInformationMapping modelLine fInformationMapping toImageLine modelLine BadLocationException
Implements the contract of link I Text Viewer Extension5 model Offset2 Widget Offset int param model Offset the model offset return the corresponding widget offset or code 1 code since 2 1 public int model Offset2 Widget Offset int model Offset if f Information Mapping null return model Offset try return f Information Mapping to Image Offset model Offset catch Bad Location Exception x return 1  ITextViewerExtension5 modelOffset2WidgetOffset modelOffset modelOffset2WidgetOffset modelOffset fInformationMapping modelOffset fInformationMapping toImageOffset modelOffset BadLocationException
Implements the contract of link I Text Viewer Extension5 model Range2 Widget Range I Region param model Range the model range return the corresponding widget range or code null code since 2 1 public I Region model Range2 Widget Range I Region model Range if f Information Mapping null return model Range try if model Range get Length 0 Region reversed new Region model Range get Offset model Range get Length model Range get Length I Region result f Information Mapping to Image Region reversed return new Region result get Offset result get Length result get Length else return f Information Mapping to Image Region model Range catch Bad Location Exception x return null  ITextViewerExtension5 modelRange2WidgetRange IRegion modelRange IRegion modelRange2WidgetRange IRegion modelRange fInformationMapping modelRange modelRange getLength modelRange getOffset modelRange getLength modelRange getLength IRegion fInformationMapping toImageRegion getOffset getLength getLength fInformationMapping toImageRegion modelRange BadLocationException
Implements the contract of link I Text Viewer Extension5 widget Line2 Model Line int param widget Line the widget line return the corresponding model line since 2 1 public int widgetl Line2 Model Line int widget Line return widget Line2 Model Line widget Line  ITextViewerExtension5 widgetLine2ModelLine widgetLine widgetlLine2ModelLine widgetLine widgetLine2ModelLine widgetLine
Implements the contract of link I Text Viewer Extension5 widget Line2 Model Line int param widget Line the widget line return the corresponding model line or code 1 code since 3 0 public int widget Line2 Model Line int widget Line if f Information Mapping null return widget Line try return f Information Mapping to Origin Line widget Line catch Bad Location Exception x return 1  ITextViewerExtension5 widgetLine2ModelLine widgetLine widgetLine2ModelLine widgetLine fInformationMapping widgetLine fInformationMapping toOriginLine widgetLine BadLocationException
Implements the contract of link I Text Viewer Extension5 widget Offset2 Model Offset int param widget Offset the widget offset return the corresponding model offset or code 1 code since 2 1 public int widget Offset2 Model Offset int widget Offset if f Information Mapping null return widget Offset try return f Information Mapping to Origin Offset widget Offset catch Bad Location Exception x if widget Offset get Visible Document get Length I Region coverage f Information Mapping get Coverage return coverage get Offset coverage get Length return 1  ITextViewerExtension5 widgetOffset2ModelOffset widgetOffset widgetOffset2ModelOffset widgetOffset fInformationMapping widgetOffset fInformationMapping toOriginOffset widgetOffset BadLocationException widgetOffset getVisibleDocument getLength IRegion fInformationMapping getCoverage getOffset getLength
Implements the contract of link I Text Viewer Extension5 widget Range2 Model Range I Region param widget Range the widget range return the corresponding model range or code null code since 2 1 public I Region widget Range2 Model Range I Region widget Range if f Information Mapping null return widget Range try if widget Range get Length 0 Region reveresed new Region widget Range get Offset widget Range get Length widget Range get Length I Region result f Information Mapping to Origin Region reveresed return new Region result get Offset result get Length result get Length else return f Information Mapping to Origin Region widget Range catch Bad Location Exception x int model Offset widget Offset2 Model Offset widget Range get Offset if model Offset 1 int model End Offset widget Offset2 Model Offset widget Range get Offset widget Range get Length if model End Offset 1 return new Region model Offset model End Offset model Offset return null  ITextViewerExtension5 widgetRange2ModelRange IRegion widgetRange IRegion widgetRange2ModelRange IRegion widgetRange fInformationMapping widgetRange widgetRange getLength widgetRange getOffset widgetRange getLength widgetRange getLength IRegion fInformationMapping toOriginRegion getOffset getLength getLength fInformationMapping toOriginRegion widgetRange BadLocationException modelOffset widgetOffset2ModelOffset widgetRange getOffset modelOffset modelEndOffset widgetOffset2ModelOffset widgetRange getOffset widgetRange getLength modelEndOffset modelOffset modelEndOffset modelOffset
Implements the contract of link I Text Viewer Extension5 get Model Coverage return the model coverage since 2 1 public I Region get Model Coverage if f Information Mapping null I Document document get Document if document null return null return new Region 0 document get Length return f Information Mapping get Coverage  ITextViewerExtension5 getModelCoverage IRegion getModelCoverage fInformationMapping IDocument getDocument getLength fInformationMapping getCoverage
Returns the line of the widget whose corresponding line in the viewer s document is closest to the given line in the viewer s document or code 1 code param model Line the line in the viewer s document return the line in the widget that corresponds best to the given line in the viewer s document or code 1 code since 2 1 protected int get Closest Widget Line For Model Line int model Line if f Information Mapping null return model Line try return f Information Mapping to Closest Image Line model Line catch Bad Location Exception x return 1  modelLine getClosestWidgetLineForModelLine modelLine fInformationMapping modelLine fInformationMapping toClosestImageLine modelLine BadLocationException
Translates a style range given relative to the viewer s document into style ranges relative to the viewer s widget or code null code param range the style range in the coordinates of the viewer s document return the style range in the coordinates of the viewer s widget or code null code since 2 1 protected Style Range model Style Range2 Widget Style Range Style Range range I Region region model Range2 Widget Range new Region range start range length if region null Style Range result Style Range range clone result start region get Offset result length region get Length return result return null  StyleRange modelStyleRange2WidgetStyleRange StyleRange IRegion modelRange2WidgetRange StyleRange StyleRange getOffset getLength
Same as link model Range2 Widget Range I Region just for a link Position param model Position the position describing a range in the viewer s document return a region describing a range in the viewer s widget since 2 1 protected I Region model Range2 Widget Range Position model Position return model Range2 Widget Range new Region model Position get Offset model Position get Length  modelRange2WidgetRange IRegion modelPosition IRegion modelRange2WidgetRange modelPosition modelRange2WidgetRange modelPosition getOffset modelPosition getLength
Translates the widget region of the given verify event into the corresponding region of the viewer s document param event the verify event return the region of the viewer s document corresponding to the verify event since 2 1 protected I Region event2 Model Range Verify Event event Region region null if event start event end region new Region event start event end event start else region new Region event end event start event end return widget Range2 Model Range region  IRegion event2ModelRange VerifyEvent widgetRange2ModelRange
Translates the given widget selection into the corresponding region of the viewer s document or returns code null code if this fails param widget Selection the widget selection return the region of the viewer s document corresponding to the widget selection or code null code since 2 1 protected Point widget Selection2 Model Selection Point widget Selection I Region region new Region widget Selection x widget Selection y region widget Range2 Model Range region return region null null new Point region get Offset region get Length  widgetSelection widgetSelection2ModelSelection widgetSelection IRegion widgetSelection widgetSelection widgetRange2ModelRange getOffset getLength
Translates the given selection range of the viewer s document into the corresponding widget range or returns code null code of this fails param model Selection the selection range of the viewer s document return the widget range corresponding to the selection range or code null code since 2 1 protected Point model Selection2 Widget Selection Point model Selection if f Information Mapping null return model Selection try I Region region new Region model Selection x model Selection y region f Information Mapping to Image Region region return new Point region get Offset region get Length catch Bad Location Exception x return null  modelSelection modelSelection2WidgetSelection modelSelection fInformationMapping modelSelection IRegion modelSelection modelSelection fInformationMapping toImageRegion getOffset getLength BadLocationException
Implements the contract of link I Text Viewer Extension5 widget Line Of Widget Offset int param widget Offset the widget offset return the corresponding widget line or code 1 code since 2 1 public int widget Line Of Widget Offset int widget Offset I Document document get Visible Document if document null try return document get Line Of Offset widget Offset catch Bad Location Exception e return 1  ITextViewerExtension5 widgetLineOfWidgetOffset widgetOffset widgetLineOfWidgetOffset widgetOffset IDocument getVisibleDocument getLineOfOffset widgetOffset BadLocationException
public boolean move Focus To Widget Token if f Widget Token Keeper instanceof I Widget Token Keeper Extension I Widget Token Keeper Extension extension I Widget Token Keeper Extension f Widget Token Keeper return extension set Focus this else return false  moveFocusToWidgetToken fWidgetTokenKeeper IWidgetTokenKeeperExtension IWidgetTokenKeeperExtension IWidgetTokenKeeperExtension fWidgetTokenKeeper setFocus
Sets the document partitioning of this viewer The partitioning is used by this viewer to access partitioning information of the viewers input document param partitioning the partitioning name since 3 0 public void set Document Partitioning String partitioning f Partitioning partitioning  setDocumentPartitioning fPartitioning
Returns the document partitioning for this viewer return the document partitioning for this viewer since 3 0 protected String get Document Partitioning return f Partitioning  getDocumentPartitioning fPartitioning
public void add Text Presentation Listener I Text Presentation Listener listener Assert is Not Null listener if f Text Presentation Listeners null f Text Presentation Listeners new Array List if f Text Presentation Listeners contains listener f Text Presentation Listeners add listener  addTextPresentationListener ITextPresentationListener isNotNull fTextPresentationListeners fTextPresentationListeners ArrayList fTextPresentationListeners fTextPresentationListeners
public void remove Text Presentation Listener I Text Presentation Listener listener Assert is Not Null listener if f Text Presentation Listeners null f Text Presentation Listeners remove listener if f Text Presentation Listeners size 0 f Text Presentation Listeners null  removeTextPresentationListener ITextPresentationListener isNotNull fTextPresentationListeners fTextPresentationListeners fTextPresentationListeners fTextPresentationListeners

f Stopper new I Text Listener public void text Changed Text Event event synchronized f Mutex if f Thread null f Thread interrupt f Thread null  fStopper ITextListener textChanged TextEvent fMutex fThread fThread fThread
see org eclipse jface text I Viewport Listener viewport Changed int public void viewport Changed int vertical Offset f Process Mouse Hover Event false  IViewportListener viewportChanged viewportChanged verticalOffset fProcessMouseHoverEvent
see Mouse Move Listener mouse Move Mouse Event public void mouse Move Mouse Event event f Process Mouse Hover Event true  MouseMoveListener mouseMove MouseEvent mouseMove MouseEvent fProcessMouseHoverEvent
Creates a new text viewer hover manager specific for the given text viewer The manager uses the given information control creator param text Viewer the viewer for which the controller is created param creator the information control creator public Text Viewer Hover Manager Text Viewer text Viewer I Information Control Creator creator super creator f Text Viewer text Viewer f Stopper new I Text Listener public void text Changed Text Event event synchronized f Mutex if f Thread null f Thread interrupt f Thread null f Viewport Listener new I Viewport Listener see org eclipse jface text I Viewport Listener viewport Changed int public void viewport Changed int vertical Offset f Process Mouse Hover Event false f Text Viewer add Viewport Listener f Viewport Listener f Mouse Move Listener new Mouse Move Listener see Mouse Move Listener mouse Move Mouse Event public void mouse Move Mouse Event event f Process Mouse Hover Event true f Text Viewer get Text Widget add Mouse Move Listener f Mouse Move Listener  textViewer TextViewerHoverManager TextViewer textViewer IInformationControlCreator fTextViewer textViewer fStopper ITextListener textChanged TextEvent fMutex fThread fThread fThread fViewportListener IViewportListener IViewportListener viewportChanged viewportChanged verticalOffset fProcessMouseHoverEvent fTextViewer addViewportListener fViewportListener fMouseMoveListener MouseMoveListener MouseMoveListener mouseMove MouseEvent mouseMove MouseEvent fProcessMouseHoverEvent fTextViewer getTextWidget addMouseMoveListener fMouseMoveListener
f Thread new Thread Text Viewer Hover Presenter NON NLS 1 public void run http bugs eclipse org bugs show bug cgi id 17693 boolean has Finished false try if f Thread null String information try information hover get Hover Info f Text Viewer region catch Array Index Out Of Bounds Exception x This code runs in a separate thread which can lead to text offsets being out of bounds when computing the hover info see bug 32848 information null if hover instanceof I Text Hover Extension set Custom Information Control Creator I Text Hover Extension hover get Hover Control Creator else set Custom Information Control Creator null set Information information area if information null area null f Text Hover hover else set Information null null has Finished true finally synchronized f Mutex if f Text Viewer null f Text Viewer remove Text Listener f Stopper f Thread null https bugs eclipse org bugs show bug cgi id 44756 if has Finished set Information null null  fThread show_bug hasFinished fThread getHoverInfo fTextViewer ArrayIndexOutOfBoundsException ITextHoverExtension setCustomInformationControlCreator ITextHoverExtension getHoverControlCreator setCustomInformationControlCreator setInformation fTextHover setInformation hasFinished fMutex fTextViewer fTextViewer removeTextListener fStopper fThread show_bug hasFinished setInformation
Determines all necessary details and delegates the computation into a background thread protected void compute Information if f Process Mouse Hover Event set Information null null return Point location get Hover Event Location int offset compute Offset At Location location x location y if offset 1 set Information null null return final I Text Hover hover f Text Viewer get Text Hover offset get Hover Event State Mask if hover null set Information null null return final I Region region hover get Hover Region f Text Viewer offset if region null set Information null null return final Rectangle area compute Area region if area null area is Empty set Information null null return if f Thread null set Information null null return f Thread new Thread Text Viewer Hover Presenter NON NLS 1 public void run http bugs eclipse org bugs show bug cgi id 17693 boolean has Finished false try if f Thread null String information try information hover get Hover Info f Text Viewer region catch Array Index Out Of Bounds Exception x This code runs in a separate thread which can lead to text offsets being out of bounds when computing the hover info see bug 32848 information null if hover instanceof I Text Hover Extension set Custom Information Control Creator I Text Hover Extension hover get Hover Control Creator else set Custom Information Control Creator null set Information information area if information null area null f Text Hover hover else set Information null null has Finished true finally synchronized f Mutex if f Text Viewer null f Text Viewer remove Text Listener f Stopper f Thread null https bugs eclipse org bugs show bug cgi id 44756 if has Finished set Information null null f Thread set Daemon true f Thread set Priority Thread MIN PRIORITY synchronized f Mutex f Text Viewer add Text Listener f Stopper f Thread start  computeInformation fProcessMouseHoverEvent setInformation getHoverEventLocation computeOffsetAtLocation setInformation ITextHover fTextViewer getTextHover getHoverEventStateMask setInformation IRegion getHoverRegion fTextViewer setInformation computeArea isEmpty setInformation fThread setInformation fThread show_bug hasFinished fThread getHoverInfo fTextViewer ArrayIndexOutOfBoundsException ITextHoverExtension setCustomInformationControlCreator ITextHoverExtension getHoverControlCreator setCustomInformationControlCreator setInformation fTextHover setInformation hasFinished fMutex fTextViewer fTextViewer removeTextListener fStopper fThread show_bug hasFinished setInformation fThread setDaemon fThread setPriority MIN_PRIORITY fMutex fTextViewer addTextListener fStopper fThread
display async Exec new Runnable public void run do Present Information  asyncExec doPresentInformation
As computation is done in the background this method is also called in the background thread Delegates the control flow back into the UI thread in order to allow displaying the information in the information control protected void present Information if f Text Viewer null return Styled Text text Widget f Text Viewer get Text Widget if text Widget null text Widget is Disposed Display display text Widget get Display if display null return display async Exec new Runnable public void run do Present Information  presentInformation fTextViewer StyledText textWidget fTextViewer getTextWidget textWidget textWidget isDisposed textWidget getDisplay asyncExec doPresentInformation
see Abstract Information Control Manager present Information protected void do Present Information super present Information  AbstractInformationControlManager presentInformation doPresentInformation presentInformation
Computes the document offset underlying the given text widget coordinates This method uses a linear search as it cannot make any assumption about how the document is actually presented in the widget Covers cases such as bidirectional text param x the horizontal coordinate inside the text widget param y the vertical coordinate inside the text widget return the document offset corresponding to the given point private int compute Offset At Location int x int y try Styled Text styled Text f Text Viewer get Text Widget int widget Offset styled Text get Offset At Location new Point x y if f Text Viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 f Text Viewer return extension widget Offset2 Model Offset widget Offset return widget Offset f Text Viewer  getVisibleRegionOffset catch Illegal Argument Exception e return 1  computeOffsetAtLocation StyledText styledText fTextViewer getTextWidget widgetOffset styledText getOffsetAtLocation fTextViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 fTextViewer widgetOffset2ModelOffset widgetOffset widgetOffset fTextViewer _getVisibleRegionOffset IllegalArgumentException
Determines graphical area covered by the given text region param region the region whose graphical extend must be computed return the graphical extend of the given region private Rectangle compute Area I Region region I Region widget Region model Range2 Widget Range region int start widget Region get Offset int end widget Region get Offset widget Region get Length Styled Text styled Text f Text Viewer get Text Widget Point upper Left styled Text get Location At Offset start Point lower Right new Point upper Left x upper Left y for int i start 1 i end i Point p styled Text get Location At Offset i if upper Left x p x upper Left x p x if upper Left y p y upper Left y p y if lower Right x p x lower Right x p x if lower Right y p y lower Right y p y lower Right x f Text Viewer get Average Char Width lower Right y styled Text get Line Height int width lower Right x upper Left x int height lower Right y upper Left y return new Rectangle upper Left x upper Left y width height  computeArea IRegion IRegion widgetRegion modelRange2WidgetRange widgetRegion getOffset widgetRegion getOffset widgetRegion getLength StyledText styledText fTextViewer getTextWidget upperLeft styledText getLocationAtOffset lowerRight upperLeft upperLeft styledText getLocationAtOffset upperLeft upperLeft upperLeft upperLeft lowerRight lowerRight lowerRight lowerRight lowerRight fTextViewer getAverageCharWidth lowerRight styledText getLineHeight lowerRight upperLeft lowerRight upperLeft upperLeft upperLeft
Translates a given region of the text viewer s document into the corresponding region of the viewer s widget param region the document region return the corresponding widget region since 2 1 private I Region model Range2 Widget Range I Region region if f Text Viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 f Text Viewer return extension model Range2 Widget Range region I Region visible Region f Text Viewer get Visible Region int start region get Offset visible Region get Offset int end start region get Length if end visible Region get Length end visible Region get Length return new Region start end start  IRegion modelRange2WidgetRange IRegion fTextViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 fTextViewer modelRange2WidgetRange IRegion visibleRegion fTextViewer getVisibleRegion getOffset visibleRegion getOffset getLength visibleRegion getLength visibleRegion getLength
see org eclipse jface text Abstract Information Control Manager show Information Control org eclipse swt graphics Rectangle protected void show Information Control Rectangle subject Area if f Text Viewer null f Text Viewer request Widget Token this WIDGET PRIORITY super show Information Control subject Area  AbstractInformationControlManager showInformationControl showInformationControl subjectArea fTextViewer fTextViewer requestWidgetToken WIDGET_PRIORITY showInformationControl subjectArea
protected void hide Information Control try f Text Hover null super hide Information Control finally if f Text Viewer null f Text Viewer release Widget Token this  hideInformationControl fTextHover hideInformationControl fTextViewer fTextViewer releaseWidgetToken
protected void handle Information Control Disposed try super handle Information Control Disposed finally if f Text Viewer null f Text Viewer release Widget Token this  handleInformationControlDisposed handleInformationControlDisposed fTextViewer fTextViewer releaseWidgetToken
public boolean request Widget Token I Widget Token Owner owner f Text Hover null super hide Information Control return true  requestWidgetToken IWidgetTokenOwner fTextHover hideInformationControl
public boolean request Widget Token I Widget Token Owner owner int priority if priority WIDGET PRIORITY f Text Hover null super hide Information Control return true return false  requestWidgetToken IWidgetTokenOwner WIDGET_PRIORITY fTextHover hideInformationControl
since 3 0 public boolean set Focus I Widget Token Owner owner return false  setFocus IWidgetTokenOwner
Returns the currently shown text hover or code null code if no text hover is shown return the currently shown text hover or code null code protected I Text Hover get Current Text Hover return f Text Hover  ITextHover getCurrentTextHover fTextHover
public void dispose if f Text Viewer null f Text Viewer remove Viewport Listener f Viewport Listener f Viewport Listener null Styled Text st f Text Viewer get Text Widget if st null st is Disposed st remove Mouse Move Listener f Mouse Move Listener f Mouse Move Listener null super dispose  fTextViewer fTextViewer removeViewportListener fViewportListener fViewportListener StyledText fTextViewer getTextWidget isDisposed removeMouseMoveListener fMouseMoveListener fMouseMoveListener

Creates a position along the given specification param offset the offset of this position param length the length of this position param type the type of this position public Typed Position int offset int length String type super offset length f Type type  TypedPosition fType
Creates a position based on the typed region param region the typed region public Typed Position I Typed Region region super region get Offset region get Length f Type region get Type  TypedPosition ITypedRegion getOffset getLength fType getType
Returns the type of the position return the type of this position public String get Type return f Type  getType fType
public boolean equals Object o if o instanceof Typed Position if super equals o Typed Position p Typed Position o return f Type null p get Type null f Type equals p get Type return false  TypedPosition TypedPosition TypedPosition fType getType fType getType
see java lang Object hash Code public int hash Code int type f Type null 0 f Type hash Code return super hash Code type  hashCode hashCode fType fType hashCode hashCode

Creates a typed region based on the given specification param offset the region s offset param length the region s length param type the region s type public Typed Region int offset int length String type super offset length f Type type  TypedRegion fType
see org eclipse jface text I Typed Region get Type public String get Type return f Type  ITypedRegion getType getType fType
public boolean equals Object o if o instanceof Typed Region Typed Region r Typed Region o return super equals r f Type null r get Type null f Type equals r get Type return false  TypedRegion TypedRegion TypedRegion fType getType fType getType
see java lang Object hash Code public int hash Code int type f Type null 0 f Type hash Code return super hash Code type  hashCode hashCode fType fType hashCode hashCode

Constructs a new exception public Assertion Failed Exception  AssertionFailedException
Constructs a new exception with the given message public Assertion Failed Exception String detail super detail  AssertionFailedException
This class is not intended to be instantiated private Assert 
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown param expression the outcome of the check return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression succeed as quickly as possible if expression return true return is Legal expression NON NLS 1  IllegalArgumentException IllegalArgumentException isLegal isLegal
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown The given message is included in that exception to aid debugging param expression the outcome of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression String message if expression throw new Illegal Argument Exception assertion failed message NON NLS 1 return expression  IllegalArgumentException IllegalArgumentException isLegal IllegalArgumentException
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown p As a general rule parameters passed to API methods must not be code null code unless b explicitly b allowed in the method s specification Similarly results returned from API methods are never code null code unless b explicitly b allowed in the method s specification Implementations are encouraged to make regular use of code Assert is Not Null code to ensure that code null code parameters are detected as early as possible p param object the value to test exception Throwable an unspecified unchecked exception if the object is code null code public static void is Not Null Object object succeed as quickly as possible if object null return is Not Null object NON NLS 1  isNotNull isNotNull isNotNull
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging p As a general rule parameters passed to API methods must not be code null code unless b explicitly b allowed in the method s specification Similarly results returned from API methods are never code null code unless b explicitly b allowed in the method s specification Implementations are encouraged to make regular use of code Assert is Not Null code to ensure that code null code parameters are detected as early as possible p param object the value to test param message the message to include in the exception exception Throwable an unspecified unchecked exception if the object is code null code public static void is Not Null Object object String message if object null throw new Assertion Failed Exception null argument message NON NLS 1  isNotNull isNotNull AssertionFailedException
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown param expression the outcome of the check return code true code if the check passes does not return if the check fails public static boolean is True boolean expression succeed as quickly as possible if expression return true return is True expression NON NLS 1  isTrue isTrue
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param expression the outcome of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails public static boolean is True boolean expression String message if expression throw new Assertion Failed Exception Assertion failed message NON NLS 1 return expression  isTrue AssertionFailedException

Adds the given code Transfer Drag Source Listener code param listener the new listener public void add Drag Source Listener Transfer Drag Source Listener listener listeners add listener  TransferDragSourceListener addDragSourceListener TransferDragSourceListener
Platform run new Safe Runnable public void run throws Exception if current Listener null there is a listener that can handle the drop delegate the event current Listener drag Finished event else The drag was canceled and current Listener was never set so send the drag Finished event to all the active listeners Iterator iterator active Listeners iterator while iterator has Next Transfer Drag Source Listener iterator next drag Finished event  SafeRunnable currentListener currentListener dragFinished currentListener dragFinished activeListeners hasNext TransferDragSourceListener dragFinished
The drop has successfully completed This event is forwarded to the current drag listener Doesn t update the current listener since the current listener is already the one that completed the drag operation param event the drag source event see Drag Source Listener drag Finished Drag Source Event public void drag Finished final Drag Source Event event if Policy DEBUG DRAG DROP System out println Drag Finished to String NON NLS 1 Platform run new Safe Runnable public void run throws Exception if current Listener null there is a listener that can handle the drop delegate the event current Listener drag Finished event else The drag was canceled and current Listener was never set so send the drag Finished event to all the active listeners Iterator iterator active Listeners iterator while iterator has Next Transfer Drag Source Listener iterator next drag Finished event current Listener null active Listeners clear  DragSourceListener dragFinished DragSourceEvent dragFinished DragSourceEvent DEBUG_DRAG_DROP toString SafeRunnable currentListener currentListener dragFinished currentListener dragFinished activeListeners hasNext TransferDragSourceListener dragFinished currentListener activeListeners
if current Listener null Platform run new Safe Runnable public void run throws Exception current Listener drag Set Data event  currentListener SafeRunnable currentListener dragSetData
The drop data is requested Updates the current listener and then forwards the event to it param event the drag source event see Drag Source Listener drag Set Data Drag Source Event public void drag Set Data final Drag Source Event event if Policy DEBUG DRAG DROP System out println Drag Set Data to String NON NLS 1 update Current Listener event find a listener that can provide the given data type if current Listener null Platform run new Safe Runnable public void run throws Exception current Listener drag Set Data event  DragSourceListener dragSetData DragSourceEvent dragSetData DragSourceEvent DEBUG_DRAG_DROP toString updateCurrentListener currentListener SafeRunnable currentListener dragSetData
event doit true restore event doit Platform run new Safe Runnable public void run throws Exception listener drag Start event  SafeRunnable dragStart
A drag operation has started Forwards this event to each listener A listener must set code event doit code to code false code if it cannot handle the drag operation If a listener can handle the drag it is added to the list of active listeners The drag is aborted if there are no listeners that can handle it param event the drag source event see Drag Source Listener drag Start Drag Source Event public void drag Start final Drag Source Event event if Policy DEBUG DRAG DROP System out println Drag Start to String NON NLS 1 boolean doit false true if any one of the listeners can handle the drag List transfers new Array List listeners size active Listeners clear for int i 0 i listeners size i final Transfer Drag Source Listener listener Transfer Drag Source Listener listeners get i event doit true restore event doit Platform run new Safe Runnable public void run throws Exception listener drag Start event if event doit the listener can handle this drag transfers add listener get Transfer active Listeners add listener doit event doit if doit Drag Source event widget set Transfer Transfer transfers to Array new Transfer transfers size event doit doit  DragSourceListener dragStart DragSourceEvent dragStart DragSourceEvent DEBUG_DRAG_DROP toString ArrayList activeListeners TransferDragSourceListener TransferDragSourceListener SafeRunnable dragStart getTransfer activeListeners DragSource setTransfer toArray
Returns the code Transfer code s from every code Transfer Drag Source Listener code return the combined code Transfer code s public Transfer get Transfers Transfer types new Transfer listeners size for int i 0 i listeners size i Transfer Drag Source Listener listener Transfer Drag Source Listener listeners get i types i listener get Transfer return types  TransferDragSourceListener getTransfers TransferDragSourceListener TransferDragSourceListener getTransfer
Returns code true code if there are no listeners to delegate drag events to return code true code if there are no code Transfer Drag Source Listeners code code false code otherwise public boolean is Empty return listeners is Empty  TransferDragSourceListeners isEmpty isEmpty
Removes the given code Transfer Drag Source Listener code Listeners should not be removed while a drag and drop operation is in progress param listener the code Transfer Drag Source Listener code to remove public void remove Drag Source Listener Transfer Drag Source Listener listener listeners remove listener if current Listener listener current Listener null if active Listeners contains listener active Listeners remove listener  TransferDragSourceListener TransferDragSourceListener removeDragSourceListener TransferDragSourceListener currentListener currentListener activeListeners activeListeners
Updates the current listener to one that can handle the drag There can be many listeners and each listener may be able to handle many code Transfer Data code types The first listener found that supports one of the code Transfer Data ode types specified in the code Drag Source Event code will be selected param event the drag source event private void update Current Listener Drag Source Event event current Listener null if event data Type null return Iterator iterator active Listeners iterator while iterator has Next Transfer Drag Source Listener listener Transfer Drag Source Listener iterator next if listener get Transfer is Supported Type event data Type if Policy DEBUG DRAG DROP System out println Current drag listener listener NON NLS 1 current Listener listener return  TransferData TransferData DragSourceEvent updateCurrentListener DragSourceEvent currentListener dataType activeListeners hasNext TransferDragSourceListener TransferDragSourceListener getTransfer isSupportedType dataType DEBUG_DRAG_DROP currentListener

Adds the given code Transfer Drop Target Listener code param listener the new listener public void add Drop Target Listener Transfer Drop Target Listener listener listeners add listener  TransferDropTargetListener addDropTargetListener TransferDropTargetListener
The cursor has entered the drop target boundaries The current listener is updated and code drag Enter code is forwarded to the current listener param event the drop target event see Drop Target Listener drag Enter Drop Target Event public void drag Enter Drop Target Event event if Policy DEBUG DRAG DROP System out println Drag Enter to String NON NLS 1 original Drop Type event detail update Current Listener event  dragEnter DropTargetListener dragEnter DropTargetEvent dragEnter DropTargetEvent DEBUG_DRAG_DROP toString originalDropType updateCurrentListener
The cursor has left the drop target boundaries The event is forwarded to the current listener param event the drop target event see Drop Target Listener drag Leave Drop Target Event public void drag Leave final Drop Target Event event if Policy DEBUG DRAG DROP System out println Drag Leave to String NON NLS 1 set Current Listener null event  DropTargetListener dragLeave DropTargetEvent dragLeave DropTargetEvent DEBUG_DRAG_DROP toString setCurrentListener
if new Listener null new Listener old Listener Platform run new Safe Runnable public void run throws Exception new Listener drag Operation Changed event  newListener newListener oldListener SafeRunnable newListener dragOperationChanged
The operation being performed has changed usually due to the user changing a drag modifier key while dragging Updates the current listener and forwards this event to that listener param event the drop target event see Drop Target Listener drag Operation Changed Drop Target Event public void drag Operation Changed final Drop Target Event event if Policy DEBUG DRAG DROP System out println Drag Operation Changed to event detail NON NLS 1 original Drop Type event detail Transfer Drop Target Listener old Listener get Current Listener update Current Listener event final Transfer Drop Target Listener new Listener get Current Listener only notify the current listener if it hasn t changed based on the operation change otherwise the new listener would get a drag Enter followed by a drag Operation Changed with the exact same event if new Listener null new Listener old Listener Platform run new Safe Runnable public void run throws Exception new Listener drag Operation Changed event  DropTargetListener dragOperationChanged DropTargetEvent dragOperationChanged DropTargetEvent DEBUG_DRAG_DROP originalDropType TransferDropTargetListener oldListener getCurrentListener updateCurrentListener TransferDropTargetListener newListener getCurrentListener dragEnter dragOperationChanged newListener newListener oldListener SafeRunnable newListener dragOperationChanged
if new Listener null new Listener old Listener Platform run new Safe Runnable public void run throws Exception new Listener drag Over event  newListener newListener oldListener SafeRunnable newListener dragOver
The cursor is moving over the drop target Updates the current listener and forwards this event to that listener If no listener can handle the drag operation the code event detail code field is set to code DND DROP NONE code to indicate an invalid drop param event the drop target event see Drop Target Listener drag Over Drop Target Event public void drag Over final Drop Target Event event Transfer Drop Target Listener old Listener get Current Listener update Current Listener event final Transfer Drop Target Listener new Listener get Current Listener only notify the current listener if it hasn t changed based on the drag over otherwise the new listener would get a drag Enter followed by a drag Over with the exact same event if new Listener null new Listener old Listener Platform run new Safe Runnable public void run throws Exception new Listener drag Over event  DROP_NONE DropTargetListener dragOver DropTargetEvent dragOver DropTargetEvent TransferDropTargetListener oldListener getCurrentListener updateCurrentListener TransferDropTargetListener newListener getCurrentListener dragEnter dragOver newListener newListener oldListener SafeRunnable newListener dragOver
if get Current Listener null Platform run new Safe Runnable public void run throws Exception get Current Listener drop event  getCurrentListener SafeRunnable getCurrentListener
Forwards this event to the current listener if there is one Sets the current listener to code null code afterwards param event the drop target event see Drop Target Listener drop Drop Target Event public void drop final Drop Target Event event if Policy DEBUG DRAG DROP System out println Drop to String NON NLS 1 update Current Listener event if get Current Listener null Platform run new Safe Runnable public void run throws Exception get Current Listener drop event set Current Listener null event  DropTargetListener DropTargetEvent DropTargetEvent DEBUG_DRAG_DROP toString updateCurrentListener getCurrentListener SafeRunnable getCurrentListener setCurrentListener
if get Current Listener null Platform run new Safe Runnable public void run throws Exception get Current Listener drop Accept event  getCurrentListener SafeRunnable getCurrentListener dropAccept
Forwards this event to the current listener if there is one param event the drop target event see Drop Target Listener drop Accept Drop Target Event public void drop Accept final Drop Target Event event if Policy DEBUG DRAG DROP System out println Drop Accept to String NON NLS 1 if get Current Listener null Platform run new Safe Runnable public void run throws Exception get Current Listener drop Accept event  DropTargetListener dropAccept DropTargetEvent dropAccept DropTargetEvent DEBUG_DRAG_DROP toString getCurrentListener SafeRunnable getCurrentListener dropAccept
Returns the listener which currently handles drop events return the code Transfer Drop Target Listener code which currently handles drop events private Transfer Drop Target Listener get Current Listener return current Listener  TransferDropTargetListener TransferDropTargetListener getCurrentListener currentListener
Returns the transfer data type supported by the given listener Returns code null code if the listener does not support any of the specified data types param data Types available data types param listener code Transfer Drop Target Listener code to use for testing supported data types return the transfer data type supported by the given listener or code null code private Transfer Data get Supported Transfer Type Transfer Data data Types Transfer Drop Target Listener listener for int i 0 i data Types length i if listener get Transfer is Supported Type data Types i return data Types i return null  dataTypes TransferDropTargetListener TransferData getSupportedTransferType TransferData dataTypes TransferDropTargetListener dataTypes getTransfer isSupportedType dataTypes dataTypes
Returns the combined set of code Transfer code types of all code Transfer Drop Target Listeners code return the combined set of code Transfer code types public Transfer get Transfers Transfer types new Transfer listeners size for int i 0 i listeners size i Transfer Drop Target Listener listener Transfer Drop Target Listener listeners get i types i listener get Transfer return types  TransferDropTargetListeners getTransfers TransferDropTargetListener TransferDropTargetListener getTransfer
Returns code true code if there are no listeners to delegate events to return code true code if there are no code Transfer Drop Target Listeners code code false code otherwise public boolean is Empty return listeners is Empty  TransferDropTargetListeners isEmpty isEmpty
Removes the given code Transfer Drop Target Listener code Listeners should not be removed while a drag and drop operation is in progress param listener the listener to remove public void remove Drop Target Listener Transfer Drop Target Listener listener if current Listener listener current Listener null listeners remove listener  TransferDropTargetListener removeDropTargetListener TransferDropTargetListener currentListener currentListener
if current Listener null Platform run new Safe Runnable public void run throws Exception current Listener drag Leave event  currentListener SafeRunnable currentListener dragLeave
if current Listener null Platform run new Safe Runnable public void run throws Exception current Listener drag Enter event  currentListener SafeRunnable currentListener dragEnter
Sets the current listener to code listener code Sends the given code Drop Target Event code if the current listener changes return code true code if the new listener is different than the previous code false code otherwise private boolean set Current Listener Transfer Drop Target Listener listener final Drop Target Event event if current Listener listener return false if current Listener null Platform run new Safe Runnable public void run throws Exception current Listener drag Leave event current Listener listener if Policy DEBUG DRAG DROP System out println Current drop listener listener NON NLS 1 if current Listener null Platform run new Safe Runnable public void run throws Exception current Listener drag Enter event return true  DropTargetEvent setCurrentListener TransferDropTargetListener DropTargetEvent currentListener currentListener SafeRunnable currentListener dragLeave currentListener DEBUG_DRAG_DROP currentListener SafeRunnable currentListener dragEnter
Updates the current listener to one that can handle the drop There can be many listeners and each listener may be able to handle many code Transfer Data code types The first listener found that can handle a drop of one of the given code Transfer Data code types will be selected If no listener can handle the drag operation the code event detail code field is set to code DND DROP NONE code to indicate an invalid drop param event the drop target event private void update Current Listener Drop Target Event event int original Detail event detail revert the detail to the original drop type that the User indicated this is necessary because the previous listener may have changed the detail to something other than what the user indicated event detail original Drop Type Iterator iter listeners iterator while iter has Next Transfer Drop Target Listener listener Transfer Drop Target Listener iter next Transfer Data data Type get Supported Transfer Type event data Types listener if data Type null Transfer Data original Data Type event current Data Type set the data type supported by the drop listener event current Data Type data Type if listener is Enabled event if the listener stays the same set its previously determined event detail if set Current Listener listener event event detail original Detail return else event current Data Type original Data Type set Current Listener null event event detail DND DROP NONE  TransferData TransferData DROP_NONE updateCurrentListener DropTargetEvent originalDetail originalDropType hasNext TransferDropTargetListener TransferDropTargetListener TransferData dataType getSupportedTransferType dataTypes dataType TransferData originalDataType currentDataType currentDataType dataType isEnabled setCurrentListener originalDetail currentDataType originalDataType setCurrentListener DROP_NONE

Prevent this class from being instantiated since 3 0 private Geometry 
Returns the square of the distance between two points p This is preferred over the real distance when searching for the closest point since it avoids square roots p param p1 first endpoint param p2 second endpoint return the square of the distance between the two points since 3 0 public static int distance Squared Point p1 Point p2 int term1 p1 x p2 x int term2 p1 y p2 y return term1 term1 term2 term2  distanceSquared
Returns the magnitude of the given 2d vector represented as a Point param p point representing the 2d vector whose magnitude is being computed return the magnitude of the given 2d vector since 3 0 public static double magnitude Point p return Math sqrt magnitude Squared p  magnitudeSquared
Returns the square of the magnitude of the given 2 space vector represented using a point param p the point whose magnitude is being computed return the square of the magnitude of the given vector since 3 0 public static int magnitude Squared Point p return p x p x p y p y  magnitudeSquared
Returns the dot product of the given vectors expressed as Points param p1 the first vector param p2 the second vector return the dot product of the two vectors since 3 0 public static int dot Product Point p1 Point p2 return p1 x p2 x p1 y p2 y  dotProduct
Returns a new point whose coordinates are the minimum of the coordinates of the given points param p1 a Point param p2 a Point return a new point whose coordinates are the minimum of the coordinates of the given points since 3 0 public static Point min Point p1 Point p2 return new Point Math min p1 x p2 x Math min p1 y p2 y 
Returns a new point whose coordinates are the maximum of the coordinates of the given points param p1 a Point param p2 a Point return point a new point whose coordinates are the maximum of the coordinates since 3 0 public static Point max Point p1 Point p2 return new Point Math max p1 x p2 x Math max p1 y p2 y 
Returns a vector in the given direction with the given magnitude Directions are given using SWT direction constants and the resulting vector is in the screen s coordinate system That is the vector 0 1 is down and the vector 1 0 is right param distance magnitude of the vector param direction one of SWT TOP SWT BOTTOM SWT LEFT or SWT RIGHT return a point representing a vector in the given direction with the given magnitude since 3 0 public static Point get Direction Vector int distance int direction switch direction case SWT TOP return new Point 0 distance case SWT BOTTOM return new Point 0 distance case SWT LEFT return new Point distance 0 case SWT RIGHT return new Point distance 0 return new Point 0 0  getDirectionVector
Returns the point in the center of the given rectangle param rect rectangle being computed return a Point at the center of the given rectangle since 3 0 public static Point center Point Rectangle rect return new Point rect x rect width 2 rect y rect height 2  centerPoint
Returns a copy of the given point param to Copy point to copy return a copy of the given point public static Point copy Point to Copy return new Point to Copy x to Copy y  toCopy toCopy toCopy toCopy
Adds two points as 2d vectors Returns a new point whose coordinates are the sum of the original two points param point1 the first point not null param point2 the second point not null return a new point whose coordinates are the sum of the given points since 3 0 public static Point add Point point1 Point point2 return new Point point1 x point2 x point1 y point2 y 
Performs vector subtraction on two points Returns a new point equal to point1 point2 param point1 initial point param point2 vector to subtract return the difference point1 point2 since 3 0 public static Point subtract Point point1 Point point2 return new Point point1 x point2 x point1 y point2 y 
Returns the height or width of the given rectangle param to Measure rectangle to measure param width returns the width if true and the height if false return the width or height of the given rectangle since 3 0 public static int get Dimension Rectangle to Measure boolean width if width return to Measure width else return to Measure height  toMeasure getDimension toMeasure toMeasure toMeasure
Returns the distance of the given point from a particular side of the given rectangle Returns negative values for points outside the rectangle param rectangle a bounding rectangle param test Point a point to test param edge Of Interest side of the rectangle to test against return the distance of the given point from the given edge of the rectangle since 3 0 public static int get Distance From Edge Rectangle rectangle Point test Point int edge Of Interest switch edge Of Interest case SWT TOP return test Point y rectangle y case SWT BOTTOM return rectangle y rectangle height test Point y case SWT LEFT return test Point x rectangle x case SWT RIGHT return rectangle x rectangle width test Point x return 0  testPoint edgeOfInterest getDistanceFromEdge testPoint edgeOfInterest edgeOfInterest testPoint testPoint testPoint testPoint
Extrudes the given edge inward by the given distance That is if one side of the rectangle was sliced off with a given thickness this returns the rectangle that forms the slice Note that the returned rectangle will be inside the given rectangle if size 0 param to Extrude the rectangle to extrude The resulting rectangle will share three sides with this rectangle param size distance to extrude A negative size will extrude outwards that is the resulting rectangle will overlap the original iff this is positive param orientation the side to extrude One of SWT LEFT SWT RIGHT SWT TOP or SWT BOTTOM The resulting rectangle will always share this side with the original rectangle return a rectangle formed by extruding the given side of the rectangle by the given distance since 3 0 public static Rectangle get Extruded Edge Rectangle to Extrude int size int orientation Rectangle bounds new Rectangle to Extrude x to Extrude y to Extrude width to Extrude height if is Horizontal orientation bounds width size else bounds height size switch orientation case SWT RIGHT bounds x to Extrude x to Extrude width bounds width break case SWT BOTTOM bounds y to Extrude y to Extrude height bounds height break normalize bounds return bounds  toExtrude getExtrudedEdge toExtrude toExtrude toExtrude toExtrude toExtrude isHorizontal toExtrude toExtrude toExtrude toExtrude
Returns the opposite of the given direction That is returns SWT LEFT if given SWT RIGHT and visa versa param swt Direction Constant one of SWT LEFT SWT RIGHT SWT TOP or SWT BOTTOM return one of SWT LEFT SWT RIGHT SWT TOP or SWT BOTTOM since 3 0 public static int get Opposite Side int swt Direction Constant switch swt Direction Constant case SWT TOP return SWT BOTTOM case SWT BOTTOM return SWT TOP case SWT LEFT return SWT RIGHT case SWT RIGHT return SWT LEFT return swt Direction Constant  swtDirectionConstant getOppositeSide swtDirectionConstant swtDirectionConstant swtDirectionConstant
Converts the given boolean into an SWT orientation constant param horizontal if true returns SWT HORIZONTAL If false returns SWT VERTICAL return SWT HORIZONTAL or SWT VERTICAL since 3 0 public static int get Swt Horizontal Or Vertical Constant boolean horizontal if horizontal return SWT HORIZONTAL else return SWT VERTICAL  getSwtHorizontalOrVerticalConstant
Returns true iff the given SWT side constant corresponds to a horizontal side of a rectangle That is returns true for the top and bottom but false for the left and right param swt Side Constant one of SWT TOP SWT BOTTOM SWT LEFT or SWT RIGHT return true iff the given side is horizontal since 3 0 public static boolean is Horizontal int swt Side Constant return swt Side Constant SWT LEFT swt Side Constant SWT RIGHT  swtSideConstant isHorizontal swtSideConstant swtSideConstant swtSideConstant
Moves the given rectangle by the given delta param rect rectangle to move will be modified param delta direction vector to move the rectangle by since 3 0 public static void move Rectangle Rectangle rect Point delta rect x delta x rect y delta y  moveRectangle
Normalizes the given rectangle That is any rectangle with negative width or height becomes a rectangle with positive width or height that extends to the upper left of the original rectangle param rect rectangle to modify since 3 0 public static void normalize Rectangle rect if rect width 0 rect width rect width rect x rect width if rect height 0 rect height rect height rect y rect height 
Converts the given rectangle from display coordinates to the local coordinate system of the given object into display coordinates param coordinate System local coordinate system being converted to param to Convert rectangle to convert return a rectangle in control coordinates since 3 0 public static Rectangle to Control Control coordinate System Rectangle to Convert Point start coordinate System to Control to Convert x to Convert y return new Rectangle start x start y to Convert width to Convert height  coordinateSystem toConvert toControl coordinateSystem toConvert coordinateSystem toControl toConvert toConvert toConvert toConvert
Converts the given rectangle from the local coordinate system of the given object into display coordinates param coordinate System local coordinate system being converted from param to Convert rectangle to convert return a rectangle in display coordinates since 3 0 public static Rectangle to Display Control coordinate System Rectangle to Convert Point start coordinate System to Display to Convert x to Convert y return new Rectangle start x start y to Convert width to Convert height  coordinateSystem toConvert toDisplay coordinateSystem toConvert coordinateSystem toDisplay toConvert toConvert toConvert toConvert
Determines where the given point lies with respect to the given rectangle Returns a combination of SWT LEFT SWT RIGHT SWT TOP and SWT BOTTOM combined with bitwise or for example returns SWT TOP SWT LEFT if the point is to the upper left of the rectangle Returns 0 if the point lies within the rectangle Positions are in screen coordinates ie a point is to the upper left of the rectangle if its x and y coordinates are smaller than any point in the rectangle param boundary normalized boundary rectangle param to Test point whose relative position to the rectangle is being computed return one of SWT LEFT SWT TOP SWT TOP SWT RIGHT SWT TOP SWT LEFT 0 SWT RIGHT SWT LEFT SWT BOTTOM SWT BOTTOM SWT RIGHT SWT BOTTOM since 3 0 public static int get Relative Position Rectangle boundary Point to Test int result 0 if to Test x boundary x result SWT LEFT else if to Test x boundary x boundary width result SWT RIGHT if to Test y boundary y result SWT TOP else if to Test y boundary y boundary height result SWT BOTTOM return result  toTest getRelativePosition toTest toTest toTest toTest toTest
Returns the edge of the given rectangle is closest to the given point param boundary rectangle to test param to Test point to compare return one of SWT LEFT SWT RIGHT SWT TOP or SWT BOTTOM since 3 0 public static int get Closest Side Rectangle boundary Point to Test int sides new int SWT LEFT SWT RIGHT SWT TOP SWT BOTTOM int closest Side SWT LEFT int closest Distance Integer MAX VALUE for int idx 0 idx sides length idx int side sides idx int distance get Distance From Edge boundary to Test side if distance closest Distance closest Distance distance closest Side side return closest Side  toTest getClosestSide toTest closestSide closestDistance MAX_VALUE getDistanceFromEdge toTest closestDistance closestDistance closestSide closestSide
Returns a copy of the given rectangle param to Copy rectangle to copy return a copy of the given rectangle since 3 0 public static Rectangle copy Rectangle to Copy return new Rectangle to Copy x to Copy y to Copy width to Copy height  toCopy toCopy toCopy toCopy toCopy toCopy
Returns the size of the rectangle as a Point param rectangle rectangle whose size is being computed return the size of the given rectangle since 3 0 public static Point get Size Rectangle rectangle return new Point rectangle width rectangle height  getSize
Sets the size of the given rectangle to the given size param rectangle rectangle to modify param new Size new size of the rectangle since 3 0 public static void set Size Rectangle rectangle Point new Size rectangle width new Size x rectangle height new Size y  newSize setSize newSize newSize newSize
Sets the x y position of the given rectangle For a normalized rectangle a rectangle with positive width and height this will be the upper left corner of the rectangle param rectangle rectangle to modify param new Size new size of the rectangle since 3 0 public static void set Location Rectangle rectangle Point new Size rectangle width new Size x rectangle height new Size y  newSize setLocation newSize newSize newSize
Returns the x y position of the given rectangle For normalized rectangles rectangles with positive width and height this is the upper left corner of the rectangle param to Query rectangle to query return a Point containing the x y position of the rectangle since 3 0 public static Point get Location Rectangle to Query return new Point to Query x to Query y  toQuery getLocation toQuery toQuery toQuery
Returns a new rectangle with the given position and dimensions expressed as points param position the x y position of the rectangle param size the size of the new rectangle where x y width height return a new Rectangle with the given position and size since 3 0 public static Rectangle create Rectangle Point position Point size return new Rectangle position x position y size x size y  createRectangle

public interface I Open Event Listener Called when a selection or default selection occurs depending on the user preference  IOpenEventListener

public interface I Property Change Listener extends Event Listener 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  IPropertyChangeListener EventListener

Creates a listener list with an initial capacity of 1 public Listener List this 1  ListenerList
Creates a listener list with the given initial capacity param capacity the number of listeners which this list can initially accept without growing its internal representation must be at least 1 public Listener List int capacity Assert is True capacity 1 this capacity capacity  ListenerList isTrue
Adds the given listener to this list Has no effect if an identical listener is already registered param listener the listener public void add Object listener Assert is Not Null listener if size 0 listeners new Object capacity else check for duplicates using identity for int i 0 i size i if listeners i listener return grow array if necessary if size listeners length System arraycopy listeners 0 listeners new Object size 2 1 0 size listeners size listener size  isNotNull
Removes all listeners from this list public void clear size 0 listeners null 
Returns an array containing all the registered listeners in the order in which they were added p The resulting array is unaffected by subsequent adds or removes If there are no listeners registered the result is an empty array singleton instance no garbage is created Use this method when notifying listeners so that any modifications to the listener list during the notification will have no effect on the notification itself p return the list of registered listeners public Object get Listeners if size 0 return Empty Array Object result new Object size System arraycopy listeners 0 result 0 size return result  getListeners EmptyArray
Returns whether this listener list is empty return code true code if there are no registered listeners and code false code otherwise public boolean is Empty return size 0  isEmpty
Removes the given listener from this list Has no effect if an identical listener was not already registered param listener the listener public void remove Object listener Assert is Not Null listener for int i 0 i size i if listeners i listener if size 1 listeners null size 0 else System arraycopy listeners i 1 listeners i size i listeners size null return  isNotNull
Returns the number of registered listeners return the number of registered listeners public int size return size 

private Listener List post Selection Event Listeners new Listener List 1 public Open Strategy Control control initialize Handler control get Display add Listener control  ListenerList postSelectionEventListeners ListenerList OpenStrategy initializeHandler getDisplay addListener
Adds an I Open Event Listener to the collection of open Event Listeners public void add Open Listener I Open Event Listener listener open Event Listeners add listener  IOpenEventListener openEventListeners addOpenListener IOpenEventListener openEventListeners
Removes an I Open Event Listener to the collection of open Event Listeners public void remove Open Listener I Open Event Listener listener open Event Listeners remove listener  IOpenEventListener openEventListeners removeOpenListener IOpenEventListener openEventListeners
Adds an Selection Listener to the collection of selection Event Listeners public void add Selection Listener Selection Listener listener selection Event Listeners add listener  SelectionListener selectionEventListeners addSelectionListener SelectionListener selectionEventListeners
Removes an Selection Listener to the collection of selection Event Listeners public void remove Selection Listener Selection Listener listener selection Event Listeners remove listener  SelectionListener selectionEventListeners removeSelectionListener SelectionListener selectionEventListeners
Adds an Selection Listener to the collection of selection Event Listeners public void add Post Selection Listener Selection Listener listener post Selection Event Listeners add listener  SelectionListener selectionEventListeners addPostSelectionListener SelectionListener postSelectionEventListeners
Removes an Selection Listener to the collection of selection Event Listeners public void remove Post Selection Listener Selection Listener listener post Selection Event Listeners remove listener  SelectionListener selectionEventListeners removePostSelectionListener SelectionListener postSelectionEventListeners
Returns the current used single double click method This method is internal to the framework it should not be implemented outside the framework public static int get Open Method return CURRENT METHOD  getOpenMethod CURRENT_METHOD
Set the current used single double click method This method is internal to the framework it should not be implemented outside the framework public static void set Open Method int method if method DOUBLE CLICK CURRENT METHOD method return if method SINGLE CLICK 0 throw new Illegal Argument Exception Invalid open mode NON NLS 1 if method SINGLE CLICK SELECT ON HOVER ARROW KEYS OPEN 0 throw new Illegal Argument Exception Invalid open mode NON NLS 1 CURRENT METHOD method  setOpenMethod DOUBLE_CLICK CURRENT_METHOD SINGLE_CLICK IllegalArgumentException SINGLE_CLICK SELECT_ON_HOVER ARROW_KEYS_OPEN IllegalArgumentException CURRENT_METHOD
Return true if editors should be activated when opened public static boolean activate On Open return get Open Method DOUBLE CLICK  activateOnOpen getOpenMethod DOUBLE_CLICK
private void add Listener Control c c add Listener SWT Mouse Enter event Handler c add Listener SWT Mouse Exit event Handler c add Listener SWT Mouse Move event Handler c add Listener SWT Mouse Down event Handler c add Listener SWT Mouse Up event Handler c add Listener SWT Key Down event Handler c add Listener SWT Selection event Handler c add Listener SWT Default Selection event Handler c add Listener SWT Collapse event Handler c add Listener SWT Expand event Handler  addListener addListener MouseEnter eventHandler addListener MouseExit eventHandler addListener MouseMove eventHandler addListener MouseDown eventHandler addListener MouseUp eventHandler addListener KeyDown eventHandler addListener eventHandler addListener DefaultSelection eventHandler addListener eventHandler addListener eventHandler
private void fire Selection Event Selection Event e if e item null e item is Disposed return Object l selection Event Listeners get Listeners for int i 0 i l length i Selection Listener l i widget Selected e  fireSelectionEvent SelectionEvent isDisposed selectionEventListeners getListeners SelectionListener widgetSelected
private void fire Default Selection Event Selection Event e Object l selection Event Listeners get Listeners for int i 0 i l length i Selection Listener l i widget Default Selected e  fireDefaultSelectionEvent SelectionEvent selectionEventListeners getListeners SelectionListener widgetDefaultSelected
private void fire Post Selection Event Selection Event e if e item null e item is Disposed return Object l post Selection Event Listeners get Listeners for int i 0 i l length i Selection Listener l i widget Selected e  firePostSelectionEvent SelectionEvent isDisposed postSelectionEventListeners getListeners SelectionListener widgetSelected
private void fire Open Event Selection Event e if e item null e item is Disposed return Object l open Event Listeners get Listeners for int i 0 i l length i I Open Event Listener l i handle Open e  fireOpenEvent SelectionEvent isDisposed openEventListeners getListeners IOpenEventListener handleOpen
runnable 0 new Runnable public void run long time System current Time Millis int diff int time start Time if diff TIME display timer Exec diff 2 3 runnable 0 else timer Started false set Selection mouse Move Event  currentTimeMillis startTime timerExec timerStarted setSelection mouseMoveEvent
int id count 0 public void run if id count 0 fire Post Selection Event new Selection Event e if CURRENT METHOD ARROW KEYS OPEN 0 fire Open Event new Selection Event e  firePostSelectionEvent SelectionEvent CURRENT_METHOD ARROW_KEYS_OPEN fireOpenEvent SelectionEvent
display async Exec new Runnable public void run if arrow Key Down display timer Exec TIME new Runnable int id count 0 public void run if id count 0 fire Post Selection Event new Selection Event e if CURRENT METHOD ARROW KEYS OPEN 0 fire Open Event new Selection Event e else fire Post Selection Event new Selection Event e  asyncExec arrowKeyDown timerExec firePostSelectionEvent SelectionEvent CURRENT_METHOD ARROW_KEYS_OPEN fireOpenEvent SelectionEvent firePostSelectionEvent SelectionEvent
public void handle Event final Event e if e type SWT Default Selection Selection Event event new Selection Event e fire Default Selection Event event if CURRENT METHOD DOUBLE CLICK fire Open Event event else if enter Key Down fire Open Event event enter Key Down false default Selection Pendent null else default Selection Pendent event return switch e type case SWT Mouse Enter case SWT Mouse Exit mouse Up Event null mouse Move Event null selection Pendent null break case SWT Mouse Move if CURRENT METHOD SELECT ON HOVER 0 return if e state Mask 0 return if e widget get Display get Focus Control e widget return mouse Move Event e final Runnable runnable new Runnable 1 runnable 0 new Runnable public void run long time System current Time Millis int diff int time start Time if diff TIME display timer Exec diff 2 3 runnable 0 else timer Started false set Selection mouse Move Event start Time System current Time Millis if timer Started timer Started true display timer Exec TIME 2 3 runnable 0 break case SWT Mouse Down mouse Up Event null arrow Key Down false break case SWT Expand expand Occurred true break case SWT Collapse collapse Occurred true break case SWT Mouse Up mouse Move Event null if e button 1 e state Mask SWT BUTTON1 0 return if selection Pendent null collapse Occurred expand Occurred mouse Select Item selection Pendent else mouse Up Event e collapse Occurred false expand Occurred false break case SWT Key Down mouse Move Event null mouse Up Event null arrow Key Down e key Code SWT ARROW UP e key Code SWT ARROW DOWN e state Mask 0 if e character SWT CR if default Selection Pendent null fire Open Event new Selection Event e enter Key Down false default Selection Pendent null else enter Key Down true break case SWT Selection Selection Event event new Selection Event e fire Selection Event event mouse Move Event null if mouse Up Event null mouse Select Item event else selection Pendent event count 0 In the case of arrow Up arrow Down when in the arrow Keys Open mode we want to delay any selection until the last arrow Down Up occurs This handles the case where the user presses arrow Down Up successively We only want to open an editor for the last selected item display async Exec new Runnable public void run if arrow Key Down display timer Exec TIME new Runnable int id count 0 public void run if id count 0 fire Post Selection Event new Selection Event e if CURRENT METHOD ARROW KEYS OPEN 0 fire Open Event new Selection Event e else fire Post Selection Event new Selection Event e break  handleEvent DefaultSelection SelectionEvent SelectionEvent fireDefaultSelectionEvent CURRENT_METHOD DOUBLE_CLICK fireOpenEvent enterKeyDown fireOpenEvent enterKeyDown defaultSelectionPendent defaultSelectionPendent MouseEnter MouseExit mouseUpEvent mouseMoveEvent selectionPendent MouseMove CURRENT_METHOD SELECT_ON_HOVER stateMask getDisplay getFocusControl mouseMoveEvent currentTimeMillis startTime timerExec timerStarted setSelection mouseMoveEvent startTime currentTimeMillis timerStarted timerStarted timerExec MouseDown mouseUpEvent arrowKeyDown expandOccurred collapseOccurred MouseUp mouseMoveEvent stateMask selectionPendent collapseOccurred expandOccurred mouseSelectItem selectionPendent mouseUpEvent collapseOccurred expandOccurred KeyDown mouseMoveEvent mouseUpEvent arrowKeyDown keyCode ARROW_UP keyCode ARROW_DOWN stateMask defaultSelectionPendent fireOpenEvent SelectionEvent enterKeyDown defaultSelectionPendent enterKeyDown SelectionEvent SelectionEvent fireSelectionEvent mouseMoveEvent mouseUpEvent mouseSelectItem selectionPendent arrowUp arrowDown arrowKeysOpen arrowDown arrowDown asyncExec arrowKeyDown timerExec firePostSelectionEvent SelectionEvent CURRENT_METHOD ARROW_KEYS_OPEN fireOpenEvent SelectionEvent firePostSelectionEvent SelectionEvent
void mouse Select Item Selection Event e if CURRENT METHOD SINGLE CLICK 0 fire Open Event e mouse Up Event null selection Pendent null  mouseSelectItem SelectionEvent CURRENT_METHOD SINGLE_CLICK fireOpenEvent mouseUpEvent selectionPendent
void set Selection Event e if e null return Widget w e widget if w is Disposed return Selection Event sel Event new Selection Event e ISSUE May have to create a interface with method set Selection Point p so that user s custom widgets can use this class If we keep this option if w instanceof Tree Tree tree Tree w Tree Item item tree get Item new Point e x e y if item null tree set Selection new Tree Item item sel Event item item else if w instanceof Table Table table Table w Table Item item table get Item new Point e x e y if item null table set Selection new Table Item item sel Event item item else if w instanceof Table Tree Table Tree table Table Tree w Table Tree Item item table get Item new Point e x e y if item null table set Selection new Table Tree Item item sel Event item item else return if sel Event item null return fire Selection Event sel Event fire Post Selection Event sel Event  setSelection isDisposed SelectionEvent selEvent SelectionEvent setSelection TreeItem getItem setSelection TreeItem selEvent TableItem getItem setSelection TableItem selEvent TableTree TableTree TableTree TableTreeItem getItem setSelection TableTreeItem selEvent selEvent fireSelectionEvent selEvent firePostSelectionEvent selEvent
Initialize event handler private void initialize Handler final Display display event Handler new Listener boolean timer Started false Event mouse Up Event null Event mouse Move Event null Selection Event selection Pendent null boolean enter Key Down false Selection Event default Selection Pendent null boolean arrow Key Down false final int count new int 1 long start Time System current Time Millis boolean collapse Occurred false boolean expand Occurred false public void handle Event final Event e if e type SWT Default Selection Selection Event event new Selection Event e fire Default Selection Event event if CURRENT METHOD DOUBLE CLICK fire Open Event event else if enter Key Down fire Open Event event enter Key Down false default Selection Pendent null else default Selection Pendent event return switch e type case SWT Mouse Enter case SWT Mouse Exit mouse Up Event null mouse Move Event null selection Pendent null break case SWT Mouse Move if CURRENT METHOD SELECT ON HOVER 0 return if e state Mask 0 return if e widget get Display get Focus Control e widget return mouse Move Event e final Runnable runnable new Runnable 1 runnable 0 new Runnable public void run long time System current Time Millis int diff int time start Time if diff TIME display timer Exec diff 2 3 runnable 0 else timer Started false set Selection mouse Move Event start Time System current Time Millis if timer Started timer Started true display timer Exec TIME 2 3 runnable 0 break case SWT Mouse Down mouse Up Event null arrow Key Down false break case SWT Expand expand Occurred true break case SWT Collapse collapse Occurred true break case SWT Mouse Up mouse Move Event null if e button 1 e state Mask SWT BUTTON1 0 return if selection Pendent null collapse Occurred expand Occurred mouse Select Item selection Pendent else mouse Up Event e collapse Occurred false expand Occurred false break case SWT Key Down mouse Move Event null mouse Up Event null arrow Key Down e key Code SWT ARROW UP e key Code SWT ARROW DOWN e state Mask 0 if e character SWT CR if default Selection Pendent null fire Open Event new Selection Event e enter Key Down false default Selection Pendent null else enter Key Down true break case SWT Selection Selection Event event new Selection Event e fire Selection Event event mouse Move Event null if mouse Up Event null mouse Select Item event else selection Pendent event count 0 In the case of arrow Up arrow Down when in the arrow Keys Open mode we want to delay any selection until the last arrow Down Up occurs This handles the case where the user presses arrow Down Up successively We only want to open an editor for the last selected item display async Exec new Runnable public void run if arrow Key Down display timer Exec TIME new Runnable int id count 0 public void run if id count 0 fire Post Selection Event new Selection Event e if CURRENT METHOD ARROW KEYS OPEN 0 fire Open Event new Selection Event e else fire Post Selection Event new Selection Event e break void mouse Select Item Selection Event e if CURRENT METHOD SINGLE CLICK 0 fire Open Event e mouse Up Event null selection Pendent null void set Selection Event e if e null return Widget w e widget if w is Disposed return Selection Event sel Event new Selection Event e ISSUE May have to create a interface with method set Selection Point p so that user s custom widgets can use this class If we keep this option if w instanceof Tree Tree tree Tree w Tree Item item tree get Item new Point e x e y if item null tree set Selection new Tree Item item sel Event item item else if w instanceof Table Table table Table w Table Item item table get Item new Point e x e y if item null table set Selection new Table Item item sel Event item item else if w instanceof Table Tree Table Tree table Table Tree w Table Tree Item item table get Item new Point e x e y if item null table set Selection new Table Tree Item item sel Event item item else return if sel Event item null return fire Selection Event sel Event fire Post Selection Event sel Event  initializeHandler eventHandler timerStarted mouseUpEvent mouseMoveEvent SelectionEvent selectionPendent enterKeyDown SelectionEvent defaultSelectionPendent arrowKeyDown startTime currentTimeMillis collapseOccurred expandOccurred handleEvent DefaultSelection SelectionEvent SelectionEvent fireDefaultSelectionEvent CURRENT_METHOD DOUBLE_CLICK fireOpenEvent enterKeyDown fireOpenEvent enterKeyDown defaultSelectionPendent defaultSelectionPendent MouseEnter MouseExit mouseUpEvent mouseMoveEvent selectionPendent MouseMove CURRENT_METHOD SELECT_ON_HOVER stateMask getDisplay getFocusControl mouseMoveEvent currentTimeMillis startTime timerExec timerStarted setSelection mouseMoveEvent startTime currentTimeMillis timerStarted timerStarted timerExec MouseDown mouseUpEvent arrowKeyDown expandOccurred collapseOccurred MouseUp mouseMoveEvent stateMask selectionPendent collapseOccurred expandOccurred mouseSelectItem selectionPendent mouseUpEvent collapseOccurred expandOccurred KeyDown mouseMoveEvent mouseUpEvent arrowKeyDown keyCode ARROW_UP keyCode ARROW_DOWN stateMask defaultSelectionPendent fireOpenEvent SelectionEvent enterKeyDown defaultSelectionPendent enterKeyDown SelectionEvent SelectionEvent fireSelectionEvent mouseMoveEvent mouseUpEvent mouseSelectItem selectionPendent arrowUp arrowDown arrowKeysOpen arrowDown arrowDown asyncExec arrowKeyDown timerExec firePostSelectionEvent SelectionEvent CURRENT_METHOD ARROW_KEYS_OPEN fireOpenEvent SelectionEvent firePostSelectionEvent SelectionEvent mouseSelectItem SelectionEvent CURRENT_METHOD SINGLE_CLICK fireOpenEvent mouseUpEvent selectionPendent setSelection isDisposed SelectionEvent selEvent SelectionEvent setSelection TreeItem getItem setSelection TreeItem selEvent TableItem getItem setSelection TableItem selEvent TableTree TableTree TableTree TableTreeItem getItem setSelection TableTreeItem selEvent selEvent fireSelectionEvent selEvent firePostSelectionEvent selEvent

see org eclipse core runtime I Log add Log Listener org eclipse core runtime I Log Listener public void add Log Listener I Log Listener listener Do nothing as this is a dummy placeholder  ILog addLogListener ILogListener addLogListener ILogListener
see org eclipse core runtime I Log get Bundle public Bundle get Bundle Do nothing as this is a dummy placeholder return null  ILog getBundle getBundle
see org eclipse core runtime I Log log org eclipse core runtime I Status public void log I Status status System err println status get Message  ILog IStatus IStatus getMessage
see org eclipse core runtime I Log remove Log Listener org eclipse core runtime I Log Listener public void remove Log Listener I Log Listener listener Do nothing as this is a dummy placeholder  ILog removeLogListener ILogListener removeLogListener ILogListener
Get the dummy log to use if none has been set return I Log private static I Log get Dummy Log return new I Log non Javadoc see org eclipse core runtime I Log add Log Listener org eclipse core runtime I Log Listener public void add Log Listener I Log Listener listener Do nothing as this is a dummy placeholder non Javadoc see org eclipse core runtime I Log get Bundle public Bundle get Bundle Do nothing as this is a dummy placeholder return null non Javadoc see org eclipse core runtime I Log log org eclipse core runtime I Status public void log I Status status System err println status get Message non Javadoc see org eclipse core runtime I Log remove Log Listener org eclipse core runtime I Log Listener public void remove Log Listener I Log Listener listener Do nothing as this is a dummy placeholder  ILog ILog getDummyLog ILog ILog addLogListener ILogListener addLogListener ILogListener ILog getBundle getBundle ILog IStatus IStatus getMessage ILog removeLogListener ILogListener removeLogListener ILogListener
private static boolean get Debug Option String option if Platform is Running return true equals Ignore Case Platform get Debug Option JFACE option NON NLS 1 return false  getDebugOption isRunning equalsIgnoreCase getDebugOption
Set the log to be forwarding log param forwarding Log public static void set Log I Log forwarding Log log forwarding Log  forwardingLog setLog ILog forwardingLog forwardingLog
Return the log the receiver is using return I Log public static I Log get Log if log null log get Dummy Log return log  ILog ILog getLog getDummyLog

private Object new Value 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 public Property Change Event Object source String property Object old Value Object new Value super source Assert is Not Null property this property Name property this old Value old Value this new Value new Value  newValue oldValue newValue PropertyChangeEvent oldValue newValue isNotNull propertyName oldValue oldValue newValue newValue
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
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 equals not p return the name of the property that changed public String get Property return property Name  getProperty propertyName

Creates a new instance of Safe Runnable with a default error message public Safe Runnable do nothing  SafeRunnable SafeRunnable
Creates a new instance of Safe Runnable with the given error message param message the error message to use public Safe Runnable String message this message message  SafeRunnable SafeRunnable
public void handle Exception Throwable e Workaround to avoid interactive error dialogs during automated testing if ignore Errors if message null message J Face Resources get String Safe Runnable error Message NON NLS 1 Message Dialog open Error null J Face Resources get String Error message NON NLS 1  handleException ignoreErrors JFaceResources getString SafeRunnable errorMessage MessageDialog openError JFaceResources getString
Flag to avoid interactive error dialogs during automated testing deprecated use get Ignore Errors public static boolean get Ignore Errors boolean flag return ignore Errors  getIgnoreErrors getIgnoreErrors ignoreErrors
Flag to avoid interactive error dialogs during automated testing since 3 0 public static boolean get Ignore Errors return ignore Errors  getIgnoreErrors ignoreErrors
Flag to avoid interactive error dialogs during automated testing public static void set Ignore Errors boolean flag ignore Errors flag  setIgnoreErrors ignoreErrors

public interface Transfer Drag Source Listener extends Drag Source Listener Returns the code Transfer code type that this listener can provide data for return the code Transfer code associated with this listener  TransferDragSourceListener DragSourceListener

public interface Transfer Drop Target Listener extends Drop Target Listener Returns the code Transfer code type that this listener can accept a drop operation for return the code Transfer code for this listener  TransferDropTargetListener DropTargetListener
Transfer get Transfer Returns code true code if this listener can handle the drop based on the given code Drop Target Event code p This method is called by the code Delegating Drop Adapter code only if the code Drop Target Event code contains a transfer data type supported by this listener The code Transfer code returned by the code get Transfer code method is used for this purpose p param event the drop target event return code true code if the listener is enabled for the given drop target event  getTransfer DropTargetEvent DelegatingDropAdapter DropTargetEvent getTransfer

Adds the given string to the underlying widget at the given index param string the string to add param index position to insert the string into 
Sets the text of the item at the given index in the underlying widget param index index to modify param string new text 
Returns the zero relative indices of the items which are currently selected in the underlying widget The array is empty if no items are selected p Note This is not the actual structure used by the receiver to maintain its selection so modifying the array will not affect the receiver p return the array of indices of the selected items 
Returns the number of items contained in the underlying widget return the number of items 
Sets the underlying widget s items to be the given array of items param labels the array of label text 
protected abstract void list Set Items String labels Removes all of the items from the underlying widget protected abstract void list Remove All  listSetItems listRemoveAll
Removes the item from the underlying widget at the given zero relative index param index the index for the item 
Selects the items at the given zero relative indices in the underlying widget The current selection is cleared before the new items are selected p Indices that are out of range and duplicate indices are ignored If the receiver is single select and multiple indices are specified then all indices are ignored param ixs the indices of the items to select 
Shows the selection If the selection is already showing in the receiver this method simply returns Otherwise the items are scrolled until the selection is visible 
protected abstract void list Show Selection Deselects all selected items in the underlying widget protected abstract void list Deselect All  listShowSelection listDeselectAll
Adds the given elements to this list viewer If this viewer does not have a sorter the elements are added at the end in the order given otherwise the elements are inserted at appropriate positions p This method should be called by the content provider when elements have been added to the model in order to cause the viewer to accurately reflect the model This method only affects the viewer not the model p param elements the elements to add public void add Object elements assert Elements Not Null elements Object filtered filter elements I Label Provider label Provider I Label Provider get Label Provider for int i 0 i filtered length i Object element filtered i int ix index For Element element list Add label Provider get Text element ix list Map add ix element map Element element get Control must map it since find Item only looks in map if enabled  assertElementsNotNull ILabelProvider labelProvider ILabelProvider getLabelProvider indexForElement listAdd labelProvider getText listMap mapElement getControl findItem
Adds the given element to this list viewer If this viewer does not have a sorter the element is added at the end otherwise the element is inserted at the appropriate position p This method should be called by the content provider when a single element has been added to the model in order to cause the viewer to accurately reflect the model This method only affects the viewer not the model Note that there is another method for efficiently processing the simultaneous addition of multiple elements p param element the element public void add Object element add new Object element 
protected Widget do Find Input Item Object element if element null equals element get Root return get Control return null  doFindInputItem getRoot getControl
protected Widget do Find Item Object element if element null if list Map contains element return get Control return null  doFindItem listMap getControl
protected void do Update Item Widget data Object element boolean full Map if element null int ix list Map index Of element if ix 0 I Label Provider label Provider I Label Provider get Label Provider list Set Item ix label Provider get Text element  doUpdateItem fullMap listMap indexOf ILabelProvider labelProvider ILabelProvider getLabelProvider listSetItem labelProvider getText
Method declared on Viewer public abstract Control get Control  getControl
public abstract Control get Control Returns the element with the given index from this list viewer Returns code null code if the index is out of range param index the zero based index return the element at the given index or code null code if the index is out of range public Object get Element At int index if index 0 index list Map size return list Map get index return null  getControl getElementAt listMap listMap
The list viewer implementation of this code Viewer code framework method returns the label provider which in the case of list viewers will be an instance of code I Label Provider code public I Base Label Provider get Label Provider return super get Label Provider  ILabelProvider IBaseLabelProvider getLabelProvider getLabelProvider
protected List get Selection From Widget int ixs list Get Selection Indices Array List list new Array List ixs length for int i 0 i ixs length i Object e get Element At ixs i if e null list add e return list  getSelectionFromWidget listGetSelectionIndices ArrayList ArrayList getElementAt
protected int index For Element Object element Viewer Sorter sorter get Sorter if sorter null return list Get Item Count int count list Get Item Count int min 0 max count 1 while min max int mid min max 2 Object data list Map get mid int compare sorter compare this data element if compare 0 find first item element while compare 0 mid if mid count break data list Map get mid compare sorter compare this data element return mid if compare 0 min mid 1 else max mid 1 return min  indexForElement ViewerSorter getSorter listGetItemCount listGetItemCount listMap listMap
protected void input Changed Object input Object old Input list Map clear Object children get Sorted Children get Root int size children length list Remove All String labels new String size for int i 0 i size i Object el children i labels i I Label Provider get Label Provider get Text el list Map add el map Element el get Control must map it since find Item only looks in map if enabled list Set Items labels  inputChanged oldInput listMap getSortedChildren getRoot listRemoveAll ILabelProvider getLabelProvider getText listMap mapElement getControl findItem listSetItems
protected void internal Refresh Object element Control list get Control if element null equals element get Root the parent if list Map null list Map clear unmap All Elements List selection get Selection From Widget list set Redraw false list Remove All Object children get Sorted Children get Root I Label Provider label Provider I Label Provider get Label Provider for int i 0 i children length i Object el children i list Add label Provider get Text el i list Map add el map Element el list must map it since find Item only looks in map if enabled list set Redraw true set Selection To Widget selection false else do Update Item list element true  internalRefresh getControl getRoot listMap listMap unmapAllElements getSelectionFromWidget setRedraw listRemoveAll getSortedChildren getRoot ILabelProvider labelProvider ILabelProvider getLabelProvider listAdd labelProvider getText listMap mapElement findItem setRedraw setSelectionToWidget doUpdateItem
Removes the given elements from this list viewer param elements the elements to remove private void internal Remove final Object elements Object input get Input for int i 0 i elements length i if equals elements i input set Input null return int ix list Map index Of elements i if ix 0 list Remove ix list Map remove ix unmap Element elements i get Control  internalRemove getInput setInput listMap indexOf listRemove listMap unmapElement getControl
assert Elements Not Null elements preserving Selection new Runnable public void run internal Remove elements  assertElementsNotNull preservingSelection internalRemove
Removes the given elements from this list viewer The selection is updated if required p This method should be called by the content provider when elements have been removed from the model in order to cause the viewer to accurately reflect the model This method only affects the viewer not the model p param elements the elements to remove public void remove final Object elements assert Elements Not Null elements preserving Selection new Runnable public void run internal Remove elements  assertElementsNotNull preservingSelection internalRemove
Removes the given element from this list viewer The selection is updated if necessary p This method should be called by the content provider when a single element has been removed from the model in order to cause the viewer to accurately reflect the model This method only affects the viewer not the model Note that there is another method for efficiently processing the simultaneous removal of multiple elements p param element the element public void remove Object element remove new Object element 
The list viewer implementation of this code Viewer code framework method ensures that the given label provider is an instance of code I Label Provider code public void set Label Provider I Base Label Provider label Provider Assert is True label Provider instanceof I Label Provider super set Label Provider label Provider  ILabelProvider setLabelProvider IBaseLabelProvider labelProvider isTrue labelProvider ILabelProvider setLabelProvider labelProvider
protected void set Selection To Widget List in boolean reveal if in null in size 0 clear selection list Deselect All else int n in size int ixs new int n int count 0 for int i 0 i n i Object el in get i int ix list Map index Of el if ix 0 ixs count ix if count n System arraycopy ixs 0 ixs new int count 0 count list Set Selection ixs if reveal list Show Selection  setSelectionToWidget listDeselectAll listMap indexOf listSetSelection listShowSelection
int get Element Index Object element return list Map index Of element  getElementIndex listMap indexOf

private Object element private Item item Update Item Safe Runnable Item item Object element this item item this element element  UpdateItemSafeRunnable
this element element public void run do Update Item item element  doUpdateItem
Creates an abstract tree viewer The viewer has no input no content provider a default label provider no sorter no filters and has auto expand turned off protected Abstract Tree Viewer do nothing  AbstractTreeViewer
Adds the given child elements to this viewer as children of the given parent element If this viewer does not have a sorter the elements are added at the end of the parent s list of children in the order given otherwise the elements are inserted at the appropriate positions p This method should be called by the content provider when elements have been added to the model in order to cause the viewer to accurately reflect the model This method only affects the viewer not the model p param parent Element the parent element param child Elements the child elements to add public void add Object parent Element Object child Elements Assert is Not Null parent Element assert Elements Not Null child Elements Widget widget find Item parent Element If parent hasn t been realized yet just ignore the add if widget null return Control tree get Control optimization if the widget is not expanded we just invalidate the subtree if widget instanceof Item Item ti Item widget if get Expanded ti boolean need Dummy is Expandable parent Element boolean have Dummy false remove all children Item items get Items ti for int i 0 i items length i if items i get Data null disassociate items i items i dispose else if need Dummy have Dummy have Dummy true else items i dispose append a dummy if necessary if need Dummy have Dummy new Item ti SWT NULL 1 else XXX Workaround PR missing tree redraw return if child Elements length 0 Object filtered filter child Elements for int i 0 i filtered length i create Added Element widget filtered i  parentElement childElements parentElement childElements isNotNull parentElement assertElementsNotNull childElements findItem parentElement getControl getExpanded needDummy isExpandable parentElement haveDummy getItems getData needDummy haveDummy haveDummy needDummy haveDummy newItem childElements childElements createAddedElement
Create the new element in the parent widget If the child already exists do nothing param widget param element private void create Added Element Widget widget Object element if equals element widget get Data return Item items get Children widget for int i 0 i items length i if items i get Data equals element return int index index For Element widget element create Tree Item widget element index  createAddedElement getData getChildren getData indexForElement createTreeItem
Returns the index where the item should be inserted param parent The parent widget the element will be inserted into param element The element to insert return int protected int index For Element Widget parent Object element Viewer Sorter sorter get Sorter Item items get Children parent if sorter null return items length int count items length int min 0 max count 1 while min max int mid min max 2 Object data items mid get Data int compare sorter compare this data element if compare 0 find first item element while compare 0 mid if mid count break data items mid get Data compare sorter compare this data element return mid if compare 0 min mid 1 else max mid 1 return min  indexForElement ViewerSorter getSorter getChildren getData getData
Adds the given child element to this viewer as a child of the given parent element If this viewer does not have a sorter the element is added at the end of the parent s list of children otherwise the element is inserted at the appropriate position p This method should be called by the content provider when a single element has been added to the model in order to cause the viewer to accurately reflect the model This method only affects the viewer not the model Note that there is another method for efficiently processing the simultaneous addition of multiple elements p param parent Element the parent element param child Element the child element public void add Object parent Element Object child Element add parent Element new Object child Element  parentElement childElement parentElement childElement parentElement childElement
Adds the given SWT selection listener to the given SWT control param control the SWT control param listener the SWT selection listener deprecated protected void add Selection Listener Control control Selection Listener listener do nothing  addSelectionListener SelectionListener
Adds a listener for expand and collapse events in this viewer Has no effect if an identical listener is already registered param listener a tree viewer listener public void add Tree Listener I Tree Viewer Listener listener tree Listeners add listener  addTreeListener ITreeViewerListener treeListeners
Adds the given SWT tree listener to the given SWT control param control the SWT control param listener the SWT tree listener protected abstract void add Tree Listener Control control  addTreeListener
non Javadoc see Structured Viewer associate Object Item protected void associate Object element Item item Object data item get Data if data null data element equals data element workaround for PR 1FV62BT assumption elements are equal but not identical remove from map but don t touch children unmap Element data item item set Data element map Element element item else recursively disassociate all super associate element item  StructuredViewer getData unmapElement setData mapElement
Collapses all nodes of the viewer s tree starting with the root This method is equivalent to code collapse To Level ALL LEVELS code public void collapse All Object root get Root if root null collapse To Level root ALL LEVELS  collapseToLevel ALL_LEVELS collapseAll getRoot collapseToLevel ALL_LEVELS
Collapses the subtree rooted at the given element to the given level param element the element param level non negative level or code ALL LEVELS code to collapse all levels of the tree public void collapse To Level Object element int level Assert is Not Null element Widget w find Item element if w null internal Collapse To Level w level  ALL_LEVELS collapseToLevel isNotNull findItem internalCollapseToLevel
Creates all children for the given widget p The default implementation of this framework method assumes that code widget get Data code returns the element corresponding to the node Note the node is not visually expanded You may have to call code parent set Expanded true code p param widget the widget protected void create Children final Widget widget final Item tis get Children widget if tis null tis length 0 Object data tis 0 get Data if data null return children already there Busy Indicator show While widget get Display new Runnable public void run fix for PR 1FW89L7 don t complain and remove all dummies if tis null for int i 0 i tis length i if tis i get Data null disassociate tis i Assert is True tis i get Data null Second or later child is non null NON NLS 1 tis i dispose Object d widget get Data if d null Object parent Element d Object children get Sorted Children parent Element for int i 0 i children length i create Tree Item widget children i 1  getData setExpanded createChildren getChildren getData BusyIndicator showWhile getDisplay getData isTrue getData getData parentElement getSortedChildren parentElement createTreeItem
Creates a single item for the given parent and synchronizes it with the given element param parent the parent widget param element the element param index if non negative indicates the position to insert the item into its parent protected void create Tree Item Widget parent Object element int index Item item new Item parent SWT NULL index update Item item element update Plus item element  createTreeItem newItem updateItem updatePlus
The code Abstract Tree Viewer code implementation of this method also recurses over children of the corresponding element protected void disassociate Item item super disassociate item recursively unmapping the items is only required when the hash map is used In the other case disposing an item will recursively dispose its children if using Element Map disassociate Children item  AbstractTreeViewer usingElementMap disassociateChildren
Disassociates the children of the given SWT item from their corresponding elements param item the widget private void disassociate Children Item item Item items get Children item for int i 0 i items length i if items i get Data null disassociate items i  disassociateChildren getChildren getData
non Javadoc Method declared on Structured Viewer protected Widget do Find Input Item Object element compare with root Object root get Root if root null return null if equals root element return get Control return null  StructuredViewer doFindInputItem getRoot getControl
non Javadoc Method declared on Structured Viewer protected Widget do Find Item Object element compare with root Object root get Root if root null return null Item items get Children get Control if items null for int i 0 i items length i Widget o internal Find Item items i element if o null return o return null  StructuredViewer doFindItem getRoot getChildren getControl internalFindItem
Copies the attributes of the given element into the given SWT item param item the SWT item param element the element 
non Javadoc Method declared on Structured Viewer protected void do Update Item Widget widget Object element boolean full Map if widget instanceof Item Item item Item widget ensure that backpointer is correct if full Map associate element item else item set Data element map Element element item update icon and label Platform run new Update Item Safe Runnable item element  StructuredViewer doUpdateItem fullMap fullMap setData mapElement UpdateItemSafeRunnable
Expands all nodes of the viewer s tree starting with the root This method is equivalent to code expand To Level ALL LEVELS code public void expand All expand To Level ALL LEVELS  expandToLevel ALL_LEVELS expandAll expandToLevel ALL_LEVELS
Expands the root of the viewer s tree to the given level param level non negative level or code ALL LEVELS code to expand all levels of the tree public void expand To Level int level expand To Level get Root level  ALL_LEVELS expandToLevel expandToLevel getRoot
Expands all ancestors of the given element so that the given element becomes visible in this viewer s tree control and then expands the subtree rooted at the given element to the given level param element the element param level non negative level or code ALL LEVELS code to expand all levels of the tree public void expand To Level Object element int level Widget w internal Expand element true if w null internal Expand To Level w level  ALL_LEVELS expandToLevel internalExpand internalExpandToLevel
final I Tree Viewer Listener l I Tree Viewer Listener listeners i Platform run new Safe Runnable public void run l tree Collapsed event  ITreeViewerListener ITreeViewerListener SafeRunnable treeCollapsed
Fires a tree collapsed event Only listeners registered at the time this method is called are notified param event the tree expansion event see I Tree Viewer Listener tree Collapsed protected void fire Tree Collapsed final Tree Expansion Event event Object listeners tree Listeners get Listeners for int i 0 i listeners length i final I Tree Viewer Listener l I Tree Viewer Listener listeners i Platform run new Safe Runnable public void run l tree Collapsed event  ITreeViewerListener treeCollapsed fireTreeCollapsed TreeExpansionEvent treeListeners getListeners ITreeViewerListener ITreeViewerListener SafeRunnable treeCollapsed
final I Tree Viewer Listener l I Tree Viewer Listener listeners i Platform run new Safe Runnable public void run l tree Expanded event  ITreeViewerListener ITreeViewerListener SafeRunnable treeExpanded
Fires a tree expanded event Only listeners registered at the time this method is called are notified param event the tree expansion event see I Tree Viewer Listener tree Expanded protected void fire Tree Expanded final Tree Expansion Event event Object listeners tree Listeners get Listeners for int i 0 i listeners length i final I Tree Viewer Listener l I Tree Viewer Listener listeners i Platform run new Safe Runnable public void run l tree Expanded event  ITreeViewerListener treeExpanded fireTreeExpanded TreeExpansionEvent treeListeners getListeners ITreeViewerListener ITreeViewerListener SafeRunnable treeExpanded
Returns the auto expand level return non negative level or code ALL LEVELS code if all levels of the tree are expanded automatically see set Auto Expand Level public int get Auto Expand Level return expand To Level  ALL_LEVELS setAutoExpandLevel getAutoExpandLevel expandToLevel
Returns the SWT child items for the given SWT widget param widget the widget return the child items 
protected abstract Item get Children Widget widget Returns whether the given SWT item is expanded or collapsed param item the item return code true code if the item is considered expanded and code false code if collapsed  getChildren
protected abstract boolean get Expanded Item item Returns a list of elements corresponding to expanded nodes in this viewer s tree including currently hidden ones that are marked as expanded but are under a collapsed ancestor p This method is typically used when preserving the interesting state of a viewer code set Expanded Elements code is used during the restore p return the array of expanded elements see set Expanded Elements public Object get Expanded Elements Array List v new Array List internal Collect Expanded v get Control return v to Array  getExpanded setExpandedElements setExpandedElements getExpandedElements ArrayList ArrayList internalCollectExpanded getControl toArray
Returns whether the node corresponding to the given element is expanded or collapsed param element the element return code true code if the node is expanded and code false code if collapsed public boolean get Expanded State Object element Assert is Not Null element Widget item find Item element if item instanceof Item return get Expanded Item item return false  getExpandedState isNotNull findItem getExpanded
Returns the number of child items of the given SWT control param control the control return the number of children 
protected abstract int get Item Count Control control Returns the number of child items of the given SWT item param item the item return the number of children  getItemCount
protected abstract int get Item Count Item item Returns the child items of the given SWT item param item the item return the child items  getItemCount
protected abstract Item get Items Item item Returns the item after the given item in the tree or code null code if there is no next item param item the item param include Children code true code if the children are considered in determining which item is next and code false code if subtrees are ignored return the next item or code null code if none protected Item get Next Item Item item boolean include Children if item null return null if include Children get Expanded item Item children get Items item if children null children length 0 return children 0 next item is either next sibling or next sibling of first parent that has a next sibling Item parent get Parent Item item if parent null return null Item siblings get Items parent if siblings null siblings length 1 return get Next Item parent false for int i 0 i siblings length i if siblings i item i siblings length 1 return siblings i 1 return get Next Item parent false  getItems includeChildren getNextItem includeChildren includeChildren getExpanded getItems getParentItem getItems getNextItem getNextItem
Returns the parent item of the given item in the tree or code null code if there is parent item param item the item return the parent item or code null code if none 
protected abstract Item get Parent Item Item item Returns the item before the given item in the tree or code null code if there is no previous item param item the item return the previous item or code null code if none protected Item get Previous Item Item item previous item is either right most visible descendent of previous sibling or parent Item parent get Parent Item item if parent null return null Item siblings get Items parent if siblings length 0 siblings 0 item return parent Item previous siblings 0 for int i 1 i siblings length i if siblings i item return right Most Visible Descendent previous previous siblings i return null  getParentItem getPreviousItem getParentItem getItems rightMostVisibleDescendent
non Javadoc Method declared on Structured Viewer protected Object get Raw Children Object parent if parent null if equals parent get Root return super get Raw Children parent I Tree Content Provider cp I Tree Content Provider get Content Provider if cp null Object result cp get Children parent if result null return result return new Object 0  StructuredViewer getRawChildren getRoot getRawChildren ITreeContentProvider ITreeContentProvider getContentProvider getChildren
Returns all selected items for the given SWT control param control the control return the list of selected items 
non Javadoc Method declared on Structured Viewer protected List get Selection From Widget Widget items get Selection get Control Array List list new Array List items length for int i 0 i items length i Widget item items i Object e item get Data if e null list add e return list  StructuredViewer getSelectionFromWidget getSelection getControl ArrayList ArrayList getData
Handles a tree collapse event from the SWT widget param event the SWT tree event protected void handle Tree Collapse Tree Event event if event item get Data null fire Tree Collapsed new Tree Expansion Event this event item get Data  handleTreeCollapse TreeEvent getData fireTreeCollapsed TreeExpansionEvent getData
Handles a tree expand event from the SWT widget param event the SWT tree event protected void handle Tree Expand Tree Event event create Children event item if event item get Data null fire Tree Expanded new Tree Expansion Event this event item get Data  handleTreeExpand TreeEvent createChildren getData fireTreeExpanded TreeExpansionEvent getData
non Javadoc Method declared on Viewer protected void hook Control Control control super hook Control control add Tree Listener control new Tree Listener public void tree Expanded Tree Event event handle Tree Expand event public void tree Collapsed Tree Event event handle Tree Collapse event  hookControl hookControl addTreeListener TreeListener treeExpanded TreeEvent handleTreeExpand treeCollapsed TreeEvent handleTreeCollapse
preserving Selection new Runnable public void run Control tree get Control boolean use Redraw true size REDRAW THRESHOLD table get Item Count REDRAW THRESHOLD if use Redraw tree set Redraw false remove All tree tree set Data get Root create Children tree internal Expand To Level tree expand To Level if use Redraw tree set Redraw true  preservingSelection getControl useRedraw REDRAW_THRESHOLD getItemCount REDRAW_THRESHOLD useRedraw setRedraw removeAll setData getRoot createChildren internalExpandToLevel expandToLevel useRedraw setRedraw
protected void input Changed Object input Object old Input preserving Selection new Runnable public void run Control tree get Control boolean use Redraw true size REDRAW THRESHOLD table get Item Count REDRAW THRESHOLD if use Redraw tree set Redraw false remove All tree tree set Data get Root create Children tree internal Expand To Level tree expand To Level if use Redraw tree set Redraw true  inputChanged oldInput preservingSelection getControl useRedraw REDRAW_THRESHOLD getItemCount REDRAW_THRESHOLD useRedraw setRedraw removeAll setData getRoot createChildren internalExpandToLevel expandToLevel useRedraw setRedraw
Recursively collapses the subtree rooted at the given widget to the given level p p Note that the default implementation of this method does not call code set Redraw code param widget the widget param level non negative level or code ALL LEVELS code to collapse all levels of the tree protected void internal Collapse To Level Widget widget int level if level ALL LEVELS level 0 if widget instanceof Item set Expanded Item widget false if level ALL LEVELS level 1 Item children get Children widget if children null int next Level level ALL LEVELS ALL LEVELS level 1 for int i 0 i children length i internal Collapse To Level children i next Level  setRedraw ALL_LEVELS internalCollapseToLevel ALL_LEVELS setExpanded ALL_LEVELS getChildren nextLevel ALL_LEVELS ALL_LEVELS internalCollapseToLevel nextLevel
Recursively collects all expanded elements from the given widget param result a list element type code Object code into which to collect the elements param widget the widget private void internal Collect Expanded List result Widget widget Item items get Children widget for int i 0 i items length i Item item items i if get Expanded item Object data item get Data if data null result add data internal Collect Expanded result item  internalCollectExpanded getChildren getExpanded getData internalCollectExpanded
Tries to create a path of tree items for the given element This method recursively walks up towards the root of the tree and assumes that code get Parent code returns the correct parent of an element param element the element param expand code true code if all nodes on the path should be expanded and code false code otherwise return Widget protected Widget internal Expand Object element boolean expand if element null return null Widget w find Item element if w null if equals element get Root stop at root return null my parent has to create me I Tree Content Provider cp I Tree Content Provider get Content Provider if cp null return null Object parent cp get Parent element if parent null Widget pw internal Expand parent expand if pw null let my parent create me create Children pw expand parent and find me if pw instanceof Item Item item Item pw if expand set Expanded item true w internal Find Child item element return w  getParent internalExpand findItem getRoot ITreeContentProvider ITreeContentProvider getContentProvider getParent internalExpand createChildren setExpanded internalFindChild
Recursively expands the subtree rooted at the given widget to the given level p p Note that the default implementation of this method does not call code set Redraw code param widget the widget param level non negative level or code ALL LEVELS code to collapse all levels of the tree protected void internal Expand To Level Widget widget int level if level ALL LEVELS level 0 create Children widget if widget instanceof Item set Expanded Item widget true if level ALL LEVELS level 1 Item children get Children widget if children null int new Level level ALL LEVELS ALL LEVELS level 1 for int i 0 i children length i internal Expand To Level children i new Level  setRedraw ALL_LEVELS internalExpandToLevel ALL_LEVELS createChildren setExpanded ALL_LEVELS getChildren newLevel ALL_LEVELS ALL_LEVELS internalExpandToLevel newLevel
Non recursively tries to find the given element as a child of the given parent item param parent the parent item param element the element return Widget private Widget internal Find Child Item parent Object element Item items get Children parent for int i 0 i items length i Item item items i Object data item get Data if data null equals data element return item return null  internalFindChild getChildren getData
Recursively tries to find the given element param parent the parent item param element the element return Widget private Widget internal Find Item Item parent Object element compare with node Object data parent get Data if data null if equals data element return parent recurse over children Item items get Children parent for int i 0 i items length i Item item items i Widget o internal Find Item item element if o null return o return null  internalFindItem getData getChildren internalFindItem
non Javadoc Method declared on Structured Viewer protected void internal Refresh Object element internal Refresh element true  StructuredViewer internalRefresh internalRefresh
non Javadoc Method declared on Structured Viewer protected void internal Refresh Object element boolean update Labels If element is null do a full refresh if element null internal Refresh get Control get Root true update Labels return Widget item find Item element if item null pick up structure changes too internal Refresh item element true update Labels  StructuredViewer internalRefresh updateLabels internalRefresh getControl getRoot updateLabels findItem internalRefresh updateLabels
Refreshes the tree starting at the given widget param widget the widget param element the element param do Struct code true code if structural changes are to be picked up and code false code if only label provider changes are of interest param update Labels code true code to update labels for existing elements code false code to only update labels as needed assuming that labels for existing elements are unchanged private void internal Refresh Widget widget Object element boolean do Struct boolean update Labels if widget instanceof Item if do Struct update Plus Item widget element if update Labels equals element widget get Data do Update Item widget element true else associate element Item widget if do Struct internal Refresh Struct widget element update Labels else Item children get Children widget if children null for int i 0 i children length i Widget item children i Object data item get Data if data null internal Refresh item data do Struct update Labels  doStruct updateLabels internalRefresh doStruct updateLabels doStruct updatePlus updateLabels getData doUpdateItem doStruct internalRefreshStruct updateLabels getChildren getData internalRefresh doStruct updateLabels
Update the structure and recurse Items are updated in update Children as needed param widget param element param update Labels private void internal Refresh Struct Widget widget Object element boolean update Labels update Children widget element null update Labels Item children get Children widget if children null for int i 0 i children length i Widget item children i Object data item get Data if data null internal Refresh Struct item data update Labels  updateChildren updateLabels internalRefreshStruct updateLabels updateChildren updateLabels getChildren getData internalRefreshStruct updateLabels
Removes the given elements from this viewer param elements the elements to remove private void internal Remove Object elements Object input get Input Note do not use the comparer here since the hashtable contains SWT Items not model elements Custom Hashtable parent Items new Custom Hashtable 5 for int i 0 i elements length i if equals elements i input set Input null return Widget child Item find Item elements i if child Item instanceof Item Item parent Item get Parent Item Item child Item if parent Item null parent Items put parent Item parent Item disassociate Item child Item child Item dispose Control tree get Control for Enumeration e parent Items keys e has More Elements Item parent Item Item e next Element if get Expanded parent Item get Item Count parent Item 0 append a dummy if necessary if is Expandable parent Item get Data new Item parent Item SWT NULL 1 else XXX Workaround PR missing tree redraw  internalRemove getInput CustomHashtable parentItems CustomHashtable setInput childItem findItem childItem parentItem getParentItem childItem parentItem parentItems parentItem parentItem childItem childItem getControl parentItems hasMoreElements parentItem nextElement getExpanded parentItem getItemCount parentItem isExpandable parentItem getData newItem parentItem
Sets the expanded state of all items to correspond to the given set of expanded elements param expanded Elements the set element type code Object code of elements which are expanded param widget the widget private void internal Set Expanded Custom Hashtable expanded Elements Widget widget Item items get Children widget for int i 0 i items length i Item item items i Object data item get Data if data null remove the element to avoid an infinite loop if the same element appears on a child item boolean expanded expanded Elements remove data null if expanded get Expanded item if expanded create Children item set Expanded item expanded internal Set Expanded expanded Elements item  expandedElements internalSetExpanded CustomHashtable expandedElements getChildren getData expandedElements getExpanded createChildren setExpanded internalSetExpanded expandedElements
Return whether the tree node representing the given element can be expanded p The default implementation of this framework method calls code has Children code on this viewer s content provider It may be overridden if necessary p param element the element return code true code if the tree node representing the given element can be expanded or code false code if not public boolean is Expandable Object element I Tree Content Provider cp I Tree Content Provider get Content Provider return cp null cp has Children element  hasChildren isExpandable ITreeContentProvider ITreeContentProvider getContentProvider hasChildren
non Javadoc Method declared on Viewer protected void label Provider Changed we have to walk the visible tree and update every item Control tree get Control tree set Redraw false don t pick up structure changes but do force label updates internal Refresh tree get Root false true tree set Redraw true  labelProviderChanged getControl setRedraw internalRefresh getRoot setRedraw
Creates a new item param parent the parent widget param style SWT style bits param index if non negative indicates the position to insert the item into its parent return the newly created item 
assert Elements Not Null elements preserving Selection new Runnable public void run internal Remove elements  assertElementsNotNull preservingSelection internalRemove
protected abstract Item new Item Widget parent int style int index Removes the given elements from this viewer The selection is updated if required p This method should be called by the content provider when elements have been removed from the model in order to cause the viewer to accurately reflect the model This method only affects the viewer not the model p param elements the elements to remove public void remove final Object elements assert Elements Not Null elements preserving Selection new Runnable public void run internal Remove elements  newItem assertElementsNotNull preservingSelection internalRemove
Removes the given element from the viewer The selection is updated if necessary p This method should be called by the content provider when a single element has been removed from the model in order to cause the viewer to accurately reflect the model This method only affects the viewer not the model Note that there is another method for efficiently processing the simultaneous removal of multiple elements p param element the element public void remove Object element remove new Object element 
Removes all items from the given control param control the control 
protected abstract void remove All Control control Removes a listener for expand and collapse events in this viewer Has no affect if an identical listener is not registered param listener a tree viewer listener public void remove Tree Listener I Tree Viewer Listener listener tree Listeners remove listener  removeAll removeTreeListener ITreeViewerListener treeListeners
Non Javadoc Method defined on Structured Viewer public void reveal Object element Assert is Not Null element Widget w internal Expand element true if w instanceof Item show Item Item w  StructuredViewer isNotNull internalExpand showItem
Returns the rightmost visible descendent of the given item Returns the item itself if it has no children param item the item to compute the descendent of return the rightmost visible descendent or the item iself if it has no children private Item right Most Visible Descendent Item item Item children get Items item if get Expanded item children null children length 0 return right Most Visible Descendent children children length 1 return item  rightMostVisibleDescendent getItems getExpanded rightMostVisibleDescendent
non Javadoc Method declared on Viewer public Item scroll Down int x int y Item current get Item x y if current null Item next get Next Item current true show Item next null current next return next return null  scrollDown getItem getNextItem showItem
non Javadoc Method declared on Viewer public Item scroll Up int x int y Item current get Item x y if current null Item previous get Previous Item current show Item previous null current previous return previous return null  scrollUp getItem getPreviousItem showItem
Sets the auto expand level The value 0 means that there is no auto expand 1 means that top level elements are expanded but not their children 2 means that top level elements are expanded and their children but not grandchildren and so on p The value code ALL LEVELS code means that all subtrees should be expanded p param level non negative level or code ALL LEVELS code to expand all levels of the tree public void set Auto Expand Level int level expand To Level level  ALL_LEVELS ALL_LEVELS setAutoExpandLevel expandToLevel
The code Abstract Tree Viewer code implementation of this method checks to ensure that the content provider is an code I Tree Content Provider code public void set Content Provider I Content Provider provider Assert is True provider instanceof I Tree Content Provider super set Content Provider provider  AbstractTreeViewer ITreeContentProvider setContentProvider IContentProvider isTrue ITreeContentProvider setContentProvider
Sets the expand state of the given item param item the item param expand the expand state of the item 
protected abstract void set Expanded Item item boolean expand Sets which nodes are expanded in this viewer s tree The given list contains the elements that are to be expanded all other nodes are to be collapsed p This method is typically used when restoring the interesting state of a viewer captured by an earlier call to code get Expanded Elements code p param elements the array of expanded elements see get Expanded Elements public void set Expanded Elements Object elements assert Elements Not Null elements Custom Hashtable expanded Elements new Hashtable elements length 2 1 for int i 0 i elements length i Object element elements i Ensure item exists for element internal Expand element false expanded Elements put element element internal Set Expanded expanded Elements get Control  setExpanded getExpandedElements getExpandedElements setExpandedElements assertElementsNotNull CustomHashtable expandedElements newHashtable internalExpand expandedElements internalSetExpanded expandedElements getControl
Sets whether the node corresponding to the given element is expanded or collapsed param element the element param expanded code true code if the node is expanded and code false code if collapsed public void set Expanded State Object element boolean expanded Assert is Not Null element Widget item internal Expand element false if item instanceof Item if expanded create Children item set Expanded Item item expanded  setExpandedState isNotNull internalExpand createChildren setExpanded
Sets the selection to the given list of items param items list of items element type code org eclipse swt widgets Item code 
non Javadoc Method declared on Structured Viewer protected void set Selection To Widget List v boolean reveal if v null set Selection new Array List 0 return int size v size List new Selection new Array List size for int i 0 i size i Use internal Expand since item may not yet be created See 1G6B1AR Widget w internal Expand v get i true if w instanceof Item new Selection add w set Selection new Selection if reveal new Selection size 0 show Item Item new Selection get 0  StructuredViewer setSelectionToWidget setSelection ArrayList newSelection ArrayList internalExpand internalExpand newSelection setSelection newSelection newSelection showItem newSelection
Shows the given item param item the item 
Updates the tree items to correspond to the child elements of the given parent element If null is passed for the children this method obtains them only if needed param widget the widget param parent the parent element param element Children the child elements or null deprecated this is no longer called by the framework protected void update Children Widget widget Object parent Object element Children update Children widget parent element Children true  elementChildren updateChildren elementChildren updateChildren elementChildren
Updates the tree items to correspond to the child elements of the given parent element If null is passed for the children this method obtains them only if needed param widget the widget param parent the parent element param element Children the child elements or null param update Labels code true code to update labels for existing elements code false code to only update labels as needed assuming that labels for existing elements are unchanged since 2 1 private void update Children Widget widget Object parent Object element Children boolean update Labels optimization prune collapsed subtrees if widget instanceof Item Item ti Item widget if get Expanded ti need a dummy node if element is expandable but try to avoid recreating the dummy node boolean need Dummy is Expandable parent boolean have Dummy false remove all children Item items get Items ti for int i 0 i items length i if items i get Data null disassociate items i items i dispose else if need Dummy have Dummy have Dummy true else items i dispose if need Dummy have Dummy new Item ti SWT NULL 1 return If the children weren t passed in get them now since they re needed below if element Children null element Children get Sorted Children parent Control tree get Control WORKAROUND int old Cnt 1 if widget tree old Cnt get Item Count tree Item items get Children widget save the expanded elements Custom Hashtable expanded new Hashtable Custom Hashtable DEFAULT CAPACITY assume num expanded is small for int i 0 i items length i if get Expanded items i Object element items i get Data if element null expanded put element element int min Math min element Children length items length Note In the code below doing disassociate calls before associate calls is important since a later disassociate can undo an earlier associate if items are changing position dispose of all items beyond the end of the current elements for int i items length i min if items i get Data null disassociate items i items i dispose compare first min items and update item if necessary need to do it in two passes 1 disassociate old items 2 associate new items because otherwise a later disassociate can remove a mapping made for a previous associate making the map inconsistent for int i 0 i min i Item item items i Object old Element item get Data if old Element null Object new Element element Children i if new Element old Element if equals new Element old Element update the data to be the new element since although the elements may be equal they may still have different labels or children item set Data new Element map Element new Element item else disassociate item Clear the text and image to force a label update item set Image null item set Text NON NLS 1 for int i 0 i min i Item item items i Object new Element element Children i if item get Data null old and new elements are not equal associate new Element item update Plus item new Element update Item item new Element Restore expanded state for items that changed position Make sure set Expanded is called after update Plus since set Expanded false fails if item has no children Need to call set Expanded for both expanded and unexpanded cases since the expanded state can change either way set Expanded item expanded contains Key new Element else old and new elements are equal update Plus item new Element if update Labels update Item item new Element add any remaining elements if min element Children length for int i min i element Children length i create Tree Item widget element Children i i Need to restore expanded state in a separate pass because create Tree Item does not return the new item Avoid doing this unless needed if expanded size 0 get the items again to include the new items items get Children widget for int i min i element Children length i Restore expanded state for items that changed position Make sure set Expanded is called after update Plus called in create Tree Item since set Expanded false fails if item has no children Only need to call set Expanded if element was expanded since new items are initially unexpanded if expanded contains Key element Children i set Expanded items i true WORKAROUND if widget tree old Cnt 0 get Item Count tree 0 System out println WORKAROUND set Redraw tree set Redraw false tree set Redraw true  elementChildren updateLabels updateChildren elementChildren updateLabels getExpanded needDummy isExpandable haveDummy getItems getData needDummy haveDummy haveDummy needDummy haveDummy newItem elementChildren elementChildren getSortedChildren getControl oldCnt oldCnt getItemCount getChildren CustomHashtable newHashtable CustomHashtable DEFAULT_CAPACITY getExpanded getData elementChildren getData oldElement getData oldElement newElement elementChildren newElement oldElement newElement oldElement setData newElement mapElement newElement setImage setText newElement elementChildren getData newElement updatePlus newElement updateItem newElement setExpanded updatePlus setExpanded setExpanded setExpanded containsKey newElement updatePlus newElement updateLabels updateItem newElement elementChildren elementChildren createTreeItem elementChildren createTreeItem getChildren elementChildren setExpanded updatePlus createTreeItem setExpanded setExpanded containsKey elementChildren setExpanded oldCnt getItemCount setRedraw setRedraw setRedraw
Updates the icon of the tree node from the given element It calls code is Expandable code to determine whether an element is expandable param item the item param element the element protected void update Plus Item item Object element boolean has Plus get Item Count item 0 boolean needs Plus is Expandable element boolean remove All false boolean add Dummy false Object data item get Data if data null equals element data item shows same element if has Plus needs Plus if needs Plus add Dummy true else remove All true else item shows different element remove All true add Dummy needs Plus we cannot maintain expand state so collapse it set Expanded item false if remove All remove all children Item items get Items item for int i 0 i items length i if items i get Data null disassociate items i items i dispose if add Dummy new Item item SWT NULL 1 append a dummy  isExpandable updatePlus hasPlus getItemCount needsPlus isExpandable removeAll addDummy getData hasPlus needsPlus needsPlus addDummy removeAll removeAll addDummy needsPlus setExpanded removeAll getItems getData addDummy newItem
Gets the expanded elements that are visible to the user An expanded element is only visible if the parent is expanded return the visible expanded elements since 2 0 public Object get Visible Expanded Elements Array List v new Array List internal Collect Visible Expanded v get Control return v to Array  getVisibleExpandedElements ArrayList ArrayList internalCollectVisibleExpanded getControl toArray
private void internal Collect Visible Expanded Array List result Widget widget Item items get Children widget for int i 0 i items length i Item item items i if get Expanded item Object data item get Data if data null result add data Only recurse if it is expanded if not then the children aren t visible internal Collect Visible Expanded result item  internalCollectVisibleExpanded ArrayList getChildren getExpanded getData internalCollectVisibleExpanded

Returns the elements in the input which must be either an array or a code Collection code public Object get Elements Object input Element if input Element instanceof Object return Object input Element if input Element instanceof Collection return Collection input Element to Array return new Object 0  getElements inputElement inputElement inputElement inputElement inputElement toArray
This implementation does nothing public void input Changed Viewer viewer Object old Input Object new Input do nothing  inputChanged oldInput newInput
This implementation does nothing public void dispose do nothing 

Creates a new cell editor with no control The cell editor has no cell validator since 2 1 protected Cell Editor  CellEditor
Creates a new cell editor under the given parent control The cell editor has no cell validator param parent the parent control protected Cell Editor Composite parent this parent default Style  CellEditor defaultStyle
Creates a new cell editor under the given parent control The cell editor has no cell validator param parent the parent control param style the style bits since 2 1 protected Cell Editor Composite parent int style this style style create parent  CellEditor
Activates this cell editor p The default implementation of this framework method does nothing Subclasses may reimplement p public void activate 
Adds a listener to this cell editor Has no effect if an identical listener is already registered param listener a cell editor listener public void add Listener I Cell Editor Listener listener listeners add listener  addListener ICellEditorListener
Adds a property change listener to this cell editor Has no effect if an identical property change listener is already registered param listener a property change listener public void add Property Change Listener I Property Change Listener listener property Change Listeners add listener  addPropertyChangeListener IPropertyChangeListener propertyChangeListeners
Creates the control for this cell editor under the given parent control p This framework method must be implemented by concrete subclasses p param parent the parent control return the new control or code null code if this cell editor has no control 
protected abstract Control create Control Composite parent Creates the control for this cell editor under the given parent control param parent the parent control since 2 1 public void create Composite parent Assert is True control null control create Control parent See 1GD5CA6 ITPUI ALL Task View set Selection does not work Control is created with is Visible true by default This causes composite set Focus to work incorrectly The cell editor s control grabs focus instead even if it is not active Make the control invisible here by default deactivate  createControl isTrue createControl TaskView setSelection isVisible setFocus
Hides this cell editor s control Does nothing if this cell editor is not visible public void deactivate if control null control is Disposed control set Visible false  isDisposed setVisible
Disposes of this cell editor and frees any associated SWT resources public void dispose if control null control is Disposed control dispose control null  isDisposed
Returns this cell editor s value p This framework method must be implemented by concrete subclasses p return the value of this cell editor see get Value  getValue
protected abstract Object do Get Value Sets the focus to the cell editor s control p This framework method must be implemented by concrete subclasses p see set Focus  doGetValue setFocus
protected abstract void do Set Focus Sets this cell editor s value p This framework method must be implemented by concrete subclasses p param value the value of this cell editor see set Value  doSetFocus setValue
final I Cell Editor Listener l I Cell Editor Listener array i Platform run new Safe Runnable public void run l apply Editor Value  ICellEditorListener ICellEditorListener SafeRunnable applyEditorValue
protected abstract void do Set Value Object value Notifies all registered cell editor listeners of an apply event Only listeners registered at the time this method is called are notified see I Cell Editor Listener apply Editor Value protected void fire Apply Editor Value Object array listeners get Listeners for int i 0 i array length i final I Cell Editor Listener l I Cell Editor Listener array i Platform run new Safe Runnable public void run l apply Editor Value  doSetValue ICellEditorListener applyEditorValue fireApplyEditorValue getListeners ICellEditorListener ICellEditorListener SafeRunnable applyEditorValue
final I Cell Editor Listener l I Cell Editor Listener array i Platform run new Safe Runnable public void run l cancel Editor  ICellEditorListener ICellEditorListener SafeRunnable cancelEditor
Notifies all registered cell editor listeners that editing has been canceled see I Cell Editor Listener cancel Editor protected void fire Cancel Editor Object array listeners get Listeners for int i 0 i array length i final I Cell Editor Listener l I Cell Editor Listener array i Platform run new Safe Runnable public void run l cancel Editor  ICellEditorListener cancelEditor fireCancelEditor getListeners ICellEditorListener ICellEditorListener SafeRunnable cancelEditor
final I Cell Editor Listener l I Cell Editor Listener array i Platform run new Safe Runnable public void run l editor Value Changed old Valid State new Valid State  ICellEditorListener ICellEditorListener SafeRunnable editorValueChanged oldValidState newValidState
Notifies all registered cell editor listeners of a value change param old Valid State the valid state before the end user changed the value param new Valid State the current valid state see I Cell Editor Listener editor Value Changed protected void fire Editor Value Changed final boolean old Valid State final boolean new Valid State Object array listeners get Listeners for int i 0 i array length i final I Cell Editor Listener l I Cell Editor Listener array i Platform run new Safe Runnable public void run l editor Value Changed old Valid State new Valid State  oldValidState newValidState ICellEditorListener editorValueChanged fireEditorValueChanged oldValidState newValidState getListeners ICellEditorListener ICellEditorListener SafeRunnable editorValueChanged oldValidState newValidState
final I Property Change Listener l I Property Change Listener array i Platform run new Safe Runnable public void run l property Change new Property Change Event this action Id null null  IPropertyChangeListener IPropertyChangeListener SafeRunnable propertyChange PropertyChangeEvent actionId
Notifies all registered property listeners of an enablement change param action Id the id indicating what action s enablement has changed protected void fire Enablement Changed final String action Id Object array property Change Listeners get Listeners for int i 0 i array length i final I Property Change Listener l I Property Change Listener array i Platform run new Safe Runnable public void run l property Change new Property Change Event this action Id null null  actionId fireEnablementChanged actionId propertyChangeListeners getListeners IPropertyChangeListener IPropertyChangeListener SafeRunnable propertyChange PropertyChangeEvent actionId
Sets the style bits for this cell editor param style the SWT style bits for this cell editor since 2 1 public void set Style int style this style style  setStyle
Returns the style bits for this cell editor return the style for this cell editor since 2 1 public int get Style return style  getStyle
Returns the control used to implement this cell editor return the control or code null code if this cell editor has no control public Control get Control return control  getControl
Returns the current error message for this cell editor return the error message if the cell editor is in an invalid state and code null code if the cell editor is valid public String get Error Message return error Message  getErrorMessage errorMessage
Returns a layout data object for this cell editor This is called each time the cell editor is activated and controls the layout of the SWT table editor p The default implementation of this method sets the minimum width to the control s preferred width Subclasses may extend or reimplement p return the layout data object public Layout Data get Layout Data Layout Data result new Layout Data Control control get Control if control null result minimum Width control compute Size SWT DEFAULT SWT DEFAULT true x return result  LayoutData getLayoutData LayoutData LayoutData getControl minimumWidth computeSize
Returns the input validator for this cell editor return the input validator or code null code if none public I Cell Editor Validator get Validator return validator  ICellEditorValidator getValidator
Returns this cell editor s value provided that it has a valid one return the value of this cell editor or code null code if the cell editor does not contain a valid value public final Object get Value if valid return null return do Get Value  getValue doGetValue
Returns whether this cell editor is activated return code true code if this cell editor s control is currently visible and code false code if not visible public boolean is Activated return control null control is Visible  isActivated isVisible
Returns code true code if this cell editor is able to perform the copy action p This default implementation always returns code false code p p Subclasses may override p return code true code if copy is possible code false code otherwise public boolean is Copy Enabled return false  isCopyEnabled
Returns whether the given value is valid for this cell editor This cell editor s validator if any makes the actual determination return code true code if the value is valid and code false code if invalid protected boolean is Correct Object value error Message null if validator null return true error Message validator is Valid value return error Message null error Message equals NON NLS 1  isCorrect errorMessage errorMessage isValid errorMessage errorMessage
Returns code true code if this cell editor is able to perform the cut action p This default implementation always returns code false code p p Subclasses may override p return code true code if cut is possible code false code otherwise public boolean is Cut Enabled return false  isCutEnabled
Returns code true code if this cell editor is able to perform the delete action p This default implementation always returns code false code p p Subclasses may override p return code true code if delete is possible code false code otherwise public boolean is Delete Enabled return false  isDeleteEnabled
Returns whether the value of this cell editor has changed since the last call to code set Value code return code true code if the value has changed and code false code if unchanged public boolean is Dirty return dirty  setValue isDirty
Marks this cell editor as dirty since 2 1 protected void mark Dirty dirty true  markDirty
Returns code true code if this cell editor is able to perform the find action p This default implementation always returns code false code p p Subclasses may override p return code true code if find is possible code false code otherwise public boolean is Find Enabled return false  isFindEnabled
Returns code true code if this cell editor is able to perform the paste action p This default implementation always returns code false code p p Subclasses may override p return code true code if paste is possible code false code otherwise public boolean is Paste Enabled return false  isPasteEnabled
Returns code true code if this cell editor is able to perform the redo action p This default implementation always returns code false code p p Subclasses may override p return code true code if redo is possible code false code otherwise public boolean is Redo Enabled return false  isRedoEnabled
Returns code true code if this cell editor is able to perform the select all action p This default implementation always returns code false code p p Subclasses may override p return code true code if select all is possible code false code otherwise public boolean is Select All Enabled return false  isSelectAllEnabled
Returns code true code if this cell editor is able to perform the undo action p This default implementation always returns code false code p p Subclasses may override p return code true code if undo is possible code false code otherwise public boolean is Undo Enabled return false  isUndoEnabled
Returns whether this cell editor has a valid value The default value is false return code true code if the value is valid and code false code if invalid see set Value Valid boolean public boolean is Value Valid return valid  setValueValid isValueValid
Processes a key release event that occurred in this cell editor p The default implementation of this framework method cancels editing when the ESC key is pressed When the RETURN key is pressed the current value is applied and the cell editor deactivates Subclasses should call this method at appropriate times Subclasses may also extend or reimplement p param key Event the key event protected void key Release Occured Key Event key Event if key Event character u001b Escape character fire Cancel Editor else if key Event character r Return key fire Apply Editor Value deactivate  keyEvent keyReleaseOccured KeyEvent keyEvent keyEvent fireCancelEditor keyEvent fireApplyEditorValue
Processes a focus lost event that occurred in this cell editor p The default implementation of this framework method applies the current value and deactivates the cell editor Subclasses should call this method at appropriate times Subclasses may also extend or reimplement p protected void focus Lost if is Activated fire Apply Editor Value deactivate  focusLost isActivated fireApplyEditorValue
Performs the copy action This default implementation does nothing p Subclasses may override p public void perform Copy  performCopy
Performs the cut action This default implementation does nothing p Subclasses may override p public void perform Cut  performCut
Performs the delete action This default implementation does nothing p Subclasses may override p public void perform Delete  performDelete
Performs the find action This default implementation does nothing p Subclasses may override p public void perform Find  performFind
Performs the paste action This default implementation does nothing p Subclasses may override p public void perform Paste  performPaste
Performs the redo action This default implementation does nothing p Subclasses may override p public void perform Redo  performRedo
Performs the select all action This default implementation does nothing p Subclasses may override p public void perform Select All  performSelectAll
Performs the undo action This default implementation does nothing p Subclasses may override p public void perform Undo  performUndo
Removes the given listener from this cell editor Has no affect if an identical listener is not registered param listener a cell editor listener public void remove Listener I Cell Editor Listener listener listeners remove listener  removeListener ICellEditorListener
Removes the given property change listener from this cell editor Has no affect if an identical property change listener is not registered param listener a property change listener public void remove Property Change Listener I Property Change Listener listener property Change Listeners remove listener  removePropertyChangeListener IPropertyChangeListener propertyChangeListeners
Sets or clears the current error message for this cell editor param message the error message or code null code to clear protected void set Error Message String message error Message message  setErrorMessage errorMessage
Sets the focus to the cell editor s control public void set Focus do Set Focus  setFocus doSetFocus
Sets the input validator for this cell editor param validator the input validator or code null code if none public void set Validator I Cell Editor Validator validator this validator validator  setValidator ICellEditorValidator
Sets this cell editor s value param value the value of this cell editor public final void set Value Object value valid is Correct value dirty false do Set Value value  setValue isCorrect doSetValue
Sets the valid state of this cell editor The default value is false Subclasses should call this method on construction param valid code true code if the current valie is valid and code false code if invalid see is Value Valid protected void set Value Valid boolean valid this valid valid  isValueValid setValueValid
The value has changed Updates the valid state flag marks this cell editor as dirty and notifies all registered cell editor listeners of a value change param old Valid State the valid state before the end user changed the value param new Valid State the current valid state see I Cell Editor Listener editor Value Changed protected void value Changed boolean old Valid State boolean new Valid State valid new Valid State dirty true fire Editor Value Changed old Valid State new Valid State  oldValidState newValidState ICellEditorListener editorValueChanged valueChanged oldValidState newValidState newValidState fireEditorValueChanged oldValidState newValidState

Creates a new checkbox cell editor with no control since 2 1 public Checkbox Cell Editor set Style default Style  CheckboxCellEditor setStyle defaultStyle
Creates a new checkbox cell editor parented under the given control The cell editor value is a boolean value which is initially code false code Initially the cell editor has no cell validator param parent the parent control public Checkbox Cell Editor Composite parent this parent default Style  CheckboxCellEditor defaultStyle
Creates a new checkbox cell editor parented under the given control The cell editor value is a boolean value which is initially code false code Initially the cell editor has no cell validator param parent the parent control param style the style bits since 2 1 public Checkbox Cell Editor Composite parent int style super parent style  CheckboxCellEditor
The code Checkbox Cell Editor code implementation of this code Cell Editor code framework method simulates the toggling of the checkbox control and notifies listeners with code I Cell Editor Listener apply Editor Value code public void activate value value fire Apply Editor Value  CheckboxCellEditor CellEditor ICellEditorListener applyEditorValue fireApplyEditorValue
The code Checkbox Cell Editor code implementation of this code Cell Editor code framework method does nothing and returns code null code protected Control create Control Composite parent return null  CheckboxCellEditor CellEditor createControl
The code Checkbox Cell Editor code implementation of this code Cell Editor code framework method returns the checkbox setting wrapped as a code Boolean code return the Boolean checkbox value protected Object do Get Value return new Boolean value  CheckboxCellEditor CellEditor doGetValue
Method declared on Cell Editor protected void do Set Focus Ignore  CellEditor doSetFocus
The code Checkbox Cell Editor code implementation of this code Cell Editor code framework method accepts a value wrapped as a code Boolean code param value a Boolean value protected void do Set Value Object value Assert is True value instanceof Boolean this value Boolean value boolean Value  CheckboxCellEditor CellEditor doSetValue isTrue booleanValue

private Listener List check State Listeners new Listener List 3 Creates a table viewer on a newly created table control under the given parent The table control is created using the SWT style bits code SWT CHECK code and code SWT BORDER code The table has one column The viewer has no input no content provider a default label provider no sorter and no filters p This is equivalent to calling code new Checkbox Table Viewer parent SWT BORDER code See that constructor for more details p param parent the parent control deprecated use new Check List Composite int or new Checkbox Table Viewer Table instead see below for details public Checkbox Table Viewer Composite parent this parent SWT BORDER  ListenerList checkStateListeners ListenerList CheckboxTableViewer newCheckList CheckboxTableViewer CheckboxTableViewer
Creates a table viewer on a newly created table control under the given parent The table control is created using the given SWT style bits plus the code SWT CHECK code style bit The table has one column The viewer has no input no content provider a default label provider no sorter and no filters p This also adds a code Table Column code for the single column and sets a code Table Layout code on the table which sizes the column to fill the table for its initial sizing but does nothing on subsequent resizes p p If the caller just needs to show a single column with no header it is preferable to use the code new Check List code factory method instead since SWT properly handles the initial sizing and subsequent resizes in this case p p If the caller adds its own columns uses code Table set Headers Visible true code or needs to handle dynamic resizing of the table it is recommended to create the code Table code itself specifying the code SWT CHECK code style bit along with any other style bits needed and use code new Checkbox Table Viewer Table code rather than this constructor p param parent the parent control param style SWT style bits deprecated use new Check List Composite int or new Checkbox Table Viewer Table instead see above for details public Checkbox Table Viewer Composite parent int style this create Table parent style  TableColumn TableLayout newCheckList setHeadersVisible CheckboxTableViewer newCheckList CheckboxTableViewer CheckboxTableViewer createTable
Creates a table viewer on a newly created table control under the given parent The table control is created using the given SWT style bits plus the code SWT CHECK code style bit The table shows its contents in a single column with no header The viewer has no input no content provider a default label provider no sorter and no filters p No code Table Column code is added SWT does not require a code Table Column code if showing only a single column with no header SWT correctly handles the initial sizing and subsequent resizes in this case param parent the parent control param style SWT style bits since 2 0 public static Checkbox Table Viewer new Check List Composite parent int style Table table new Table parent SWT CHECK style return new Checkbox Table Viewer table  TableColumn TableColumn CheckboxTableViewer newCheckList CheckboxTableViewer
Creates a table viewer on the given table control The code SWT CHECK code style bit must be set on the given table control The viewer has no input no content provider a default label provider no sorter and no filters param table the table control public Checkbox Table Viewer Table table super table  CheckboxTableViewer
Method declared on I Checkable public void add Check State Listener I Check State Listener listener check State Listeners add listener  ICheckable addCheckStateListener ICheckStateListener checkStateListeners
Creates a new table control with one column param parent the parent control param style style bits return a new table control protected static Table create Table Composite parent int style Table table new Table parent SWT CHECK style Although this table column is not needed and can cause resize problems it can t be removed since this would be a breaking change against R1 0 See bug 6643 for more details new Table Column table SWT NONE Table Layout layout new Table Layout layout add Column Data new Column Weight Data 100 table set Layout layout return table  createTable TableColumn TableLayout TableLayout addColumnData ColumnWeightData setLayout
final I Check State Listener l I Check State Listener array i Platform run new Safe Runnable public void run l check State Changed event  ICheckStateListener ICheckStateListener SafeRunnable checkStateChanged
Notifies any check state listeners that a check state changed has been received Only listeners registered at the time this method is called are notified param event a check state changed event see I Check State Listener check State Changed private void fire Check State Changed final Check State Changed Event event Object array check State Listeners get Listeners for int i 0 i array length i final I Check State Listener l I Check State Listener array i Platform run new Safe Runnable public void run l check State Changed event  ICheckStateListener checkStateChanged fireCheckStateChanged CheckStateChangedEvent checkStateListeners getListeners ICheckStateListener ICheckStateListener SafeRunnable checkStateChanged
public boolean get Checked Object element Widget widget find Item element if widget instanceof Table Item return Table Item widget get Checked return false  getChecked findItem TableItem TableItem getChecked
Returns a list of elements corresponding to checked table items in this viewer p This method is typically used when preserving the interesting state of a viewer code set Checked Elements code is used during the restore p return the array of checked elements see set Checked Elements public Object get Checked Elements Table Item children get Table get Items Array List v new Array List children length for int i 0 i children length i Table Item item children i if item get Checked v add item get Data return v to Array  setCheckedElements setCheckedElements getCheckedElements TableItem getTable getItems ArrayList ArrayList TableItem getChecked getData toArray
Returns the grayed state of the given element param element the element return code true code if the element is grayed and code false code if not grayed public boolean get Grayed Object element Widget widget find Item element if widget instanceof Table Item return Table Item widget get Grayed return false  getGrayed findItem TableItem TableItem getGrayed
Returns a list of elements corresponding to grayed nodes in this viewer p This method is typically used when preserving the interesting state of a viewer code set Grayed Elements code is used during the restore p return the array of grayed elements see set Grayed Elements public Object get Grayed Elements Table Item children get Table get Items List v new Array List children length for int i 0 i children length i Table Item item children i if item get Grayed v add item get Data return v to Array  setGrayedElements setGrayedElements getGrayedElements TableItem getTable getItems ArrayList TableItem getGrayed getData toArray
public void handle Select Selection Event event if event detail SWT CHECK super handle Select event this will change the current selection Table Item item Table Item event item Object data item get Data if data null fire Check State Changed new Check State Changed Event this data item get Checked else super handle Select event  handleSelect SelectionEvent handleSelect TableItem TableItem getData fireCheckStateChanged CheckStateChangedEvent getChecked handleSelect
protected void preserving Selection Runnable update Code Table Item children get Table get Items Custom Hashtable checked new Hashtable children length 2 1 Custom Hashtable grayed new Hashtable children length 2 1 for int i 0 i children length i Table Item item children i Object data item get Data if data null if item get Checked checked put data data if item get Grayed grayed put data data super preserving Selection update Code children get Table get Items for int i 0 i children length i Table Item item children i Object data item get Data if data null item set Checked checked contains Key data item set Grayed grayed contains Key data  preservingSelection updateCode TableItem getTable getItems CustomHashtable newHashtable CustomHashtable newHashtable TableItem getData getChecked getGrayed preservingSelection updateCode getTable getItems TableItem getData setChecked containsKey setGrayed containsKey
Method declared on I Checkable public void remove Check State Listener I Check State Listener listener check State Listeners remove listener  ICheckable removeCheckStateListener ICheckStateListener checkStateListeners
Sets to the given value the checked state for all elements in this viewer param state code true code if the element should be checked and code false code if it should be unchecked public void set All Checked boolean state Table Item children get Table get Items for int i 0 i children length i Table Item item children i item set Checked state  setAllChecked TableItem getTable getItems TableItem setChecked
Sets to the given value the grayed state for all elements in this viewer param state code true code if the element should be grayed and code false code if it should be ungrayed public void set All Grayed boolean state Table Item children get Table get Items for int i 0 i children length i Table Item item children i item set Grayed state  setAllGrayed TableItem getTable getItems TableItem setGrayed
public boolean set Checked Object element boolean state Assert is Not Null element Widget widget find Item element if widget instanceof Table Item Table Item widget set Checked state return true return false  setChecked isNotNull findItem TableItem TableItem setChecked
Sets which nodes are checked in this viewer The given list contains the elements that are to be checked all other nodes are to be unchecked p This method is typically used when restoring the interesting state of a viewer captured by an earlier call to code get Checked Elements code p param elements the list of checked elements element type code Object code see get Checked Elements public void set Checked Elements Object elements assert Elements Not Null elements Custom Hashtable set new Hashtable elements length 2 1 for int i 0 i elements length i set put elements i elements i Table Item items get Table get Items for int i 0 i items length i Table Item item items i Object element item get Data if element null boolean check set contains Key element only set if different to avoid flicker if item get Checked check item set Checked check  getCheckedElements getCheckedElements setCheckedElements assertElementsNotNull CustomHashtable newHashtable TableItem getTable getItems TableItem getData containsKey getChecked setChecked
Sets the grayed state for the given element in this viewer param element the element param state code true code if the item should be grayed and code false code if it should be ungrayed return code true code if the element is visible and the gray state could be set and code false code otherwise public boolean set Grayed Object element boolean state Assert is Not Null element Widget widget find Item element if widget instanceof Table Item Table Item widget set Grayed state return true return false  setGrayed isNotNull findItem TableItem TableItem setGrayed
Sets which nodes are grayed in this viewer The given list contains the elements that are to be grayed all other nodes are to be ungrayed p This method is typically used when restoring the interesting state of a viewer captured by an earlier call to code get Grayed Elements code p param elements the array of grayed elements see get Grayed Elements public void set Grayed Elements Object elements assert Elements Not Null elements Custom Hashtable set new Hashtable elements length 2 1 for int i 0 i elements length i set put elements i elements i Table Item items get Table get Items for int i 0 i items length i Table Item item items i Object element item get Data if element null boolean gray set contains Key element only set if different to avoid flicker if item get Grayed gray item set Grayed gray  getGrayedElements getGrayedElements setGrayedElements assertElementsNotNull CustomHashtable newHashtable TableItem getTable getItems TableItem getData containsKey getGrayed setGrayed

private Tree Item last Clicked Item null Creates a tree viewer on a newly created tree control under the given parent The tree control is created using the SWT style bits code CHECK code and code BORDER code The viewer has no input no content provider a default label provider no sorter and no filters param parent the parent control public Checkbox Tree Viewer Composite parent this parent SWT BORDER  TreeItem lastClickedItem CheckboxTreeViewer
Creates a tree viewer on a newly created tree control under the given parent The tree control is created using the given SWT style bits plus the code CHECK code style bit The viewer has no input no content provider a default label provider no sorter and no filters param parent the parent control param style the SWT style bits public Checkbox Tree Viewer Composite parent int style this new Tree parent SWT CHECK style  CheckboxTreeViewer
Creates a tree viewer on the given tree control The code SWT CHECK code style bit must be set on the given tree control The viewer has no input no content provider a default label provider no sorter and no filters param tree the tree control public Checkbox Tree Viewer Tree tree super tree  CheckboxTreeViewer
Method declared on I Checkable public void add Check State Listener I Check State Listener listener check State Listeners add listener  ICheckable addCheckStateListener ICheckStateListener checkStateListeners
Applies the checked and grayed states of the given widget and its descendents param checked a set of elements element type code Object code param grayed a set of elements element type code Object code param widget the widget private void apply State Custom Hashtable checked Custom Hashtable grayed Widget widget Item items get Children widget for int i 0 i items length i Item item items i if item instanceof Tree Item Object data item get Data if data null Tree Item ti Tree Item item ti set Checked checked contains Key data ti set Grayed grayed contains Key data apply State checked grayed item  applyState CustomHashtable CustomHashtable getChildren TreeItem getData TreeItem TreeItem setChecked containsKey setGrayed containsKey applyState
final I Check State Listener l I Check State Listener array i Platform run new Safe Runnable public void run l check State Changed event  ICheckStateListener ICheckStateListener SafeRunnable checkStateChanged
Notifies any check state listeners that the check state of an element has changed Only listeners registered at the time this method is called are notified param event a check state changed event see I Check State Listener check State Changed protected void fire Check State Changed final Check State Changed Event event Object array check State Listeners get Listeners for int i 0 i array length i final I Check State Listener l I Check State Listener array i Platform run new Safe Runnable public void run l check State Changed event  ICheckStateListener checkStateChanged fireCheckStateChanged CheckStateChangedEvent checkStateListeners getListeners ICheckStateListener ICheckStateListener SafeRunnable checkStateChanged
Gathers the checked and grayed states of the given widget and its descendents param checked a writeable set of elements element type code Object code param grayed a writeable set of elements element type code Object code param widget the widget private void gather State Custom Hashtable checked Custom Hashtable grayed Widget widget Item items get Children widget for int i 0 i items length i Item item items i if item instanceof Tree Item Object data item get Data if data null Tree Item ti Tree Item item if ti get Checked checked put data data if ti get Grayed grayed put data data gather State checked grayed item  gatherState CustomHashtable CustomHashtable getChildren TreeItem getData TreeItem TreeItem getChecked getGrayed gatherState
public boolean get Checked Object element Widget widget find Item element if widget instanceof Tree Item return Tree Item widget get Checked return false  getChecked findItem TreeItem TreeItem getChecked
Returns a list of checked elements in this viewer s tree including currently hidden ones that are marked as checked but are under a collapsed ancestor p This method is typically used when preserving the interesting state of a viewer code set Checked Elements code is used during the restore p return the array of checked elements see set Checked Elements public Object get Checked Elements Array List v new Array List Control tree get Control internal Collect Checked v tree return v to Array  setCheckedElements setCheckedElements getCheckedElements ArrayList ArrayList getControl internalCollectChecked toArray
Returns the grayed state of the given element param element the element return code true code if the element is grayed and code false code if not grayed public boolean get Grayed Object element Widget widget find Item element if widget instanceof Tree Item return Tree Item widget get Grayed return false  getGrayed findItem TreeItem TreeItem getGrayed
Returns a list of grayed elements in this viewer s tree including currently hidden ones that are marked as grayed but are under a collapsed ancestor p This method is typically used when preserving the interesting state of a viewer code set Grayed Elements code is used during the restore p return the array of grayed elements see set Grayed Elements public Object get Grayed Elements List result new Array List internal Collect Grayed result get Control return result to Array  setGrayedElements setGrayedElements getGrayedElements ArrayList internalCollectGrayed getControl toArray
protected void handle Double Select Selection Event event if last Clicked Item null Tree Item item last Clicked Item Object data item get Data if data null boolean state item get Checked set Checked data state fire Check State Changed new Check State Changed Event this data state last Clicked Item null else super handle Double Select event  handleDoubleSelect SelectionEvent lastClickedItem TreeItem lastClickedItem getData getChecked setChecked fireCheckStateChanged CheckStateChangedEvent lastClickedItem handleDoubleSelect
protected void handle Select Selection Event event last Clicked Item null if event detail SWT CHECK Tree Item item Tree Item event item last Clicked Item item super handle Select event Object data item get Data if data null fire Check State Changed new Check State Changed Event this data item get Checked else super handle Select event  handleSelect SelectionEvent lastClickedItem TreeItem TreeItem lastClickedItem handleSelect getData fireCheckStateChanged CheckStateChangedEvent getChecked handleSelect
Gathers the checked states of the given widget and its descendents following a pre order traversal of the tree param result a writeable list of elements element type code Object code param widget the widget private void internal Collect Checked List result Widget widget Item items get Children widget for int i 0 i items length i Item item items i if item instanceof Tree Item Tree Item item get Checked Object data item get Data if data null result add data internal Collect Checked result item  internalCollectChecked getChildren TreeItem TreeItem getChecked getData internalCollectChecked
Gathers the grayed states of the given widget and its descendents following a pre order traversal of the tree param result a writeable list of elements element type code Object code param widget the widget private void internal Collect Grayed List result Widget widget Item items get Children widget for int i 0 i items length i Item item items i if item instanceof Tree Item Tree Item item get Grayed Object data item get Data if data null result add data internal Collect Grayed result item  internalCollectGrayed getChildren TreeItem TreeItem getGrayed getData internalCollectGrayed
Sets the checked state of all items to correspond to the given set of checked elements param checked Elements the set element type code Object code of elements which are checked param widget the widget private void internal Set Checked Custom Hashtable checked Elements Widget widget Item items get Children widget for int i 0 i items length i Tree Item item Tree Item items i Object data item get Data if data null boolean checked checked Elements contains Key data if checked item get Checked item set Checked checked internal Set Checked checked Elements item  checkedElements internalSetChecked CustomHashtable checkedElements getChildren TreeItem TreeItem getData checkedElements containsKey getChecked setChecked internalSetChecked checkedElements
Sets the grayed state of all items to correspond to the given set of grayed elements param grayed Elements the set element type code Object code of elements which are grayed param widget the widget private void internal Set Grayed Custom Hashtable grayed Elements Widget widget Item items get Children widget for int i 0 i items length i Tree Item item Tree Item items i Object data item get Data if data null boolean grayed grayed Elements contains Key data if grayed item get Grayed item set Grayed grayed internal Set Grayed grayed Elements item  grayedElements internalSetGrayed CustomHashtable grayedElements getChildren TreeItem TreeItem getData grayedElements containsKey getGrayed setGrayed internalSetGrayed grayedElements
protected void preserving Selection Runnable update Code int n get Item Count get Control Custom Hashtable checked Nodes new Hashtable n 2 1 Custom Hashtable grayed Nodes new Hashtable n 2 1 gather State checked Nodes grayed Nodes get Control super preserving Selection update Code apply State checked Nodes grayed Nodes get Control  preservingSelection updateCode getItemCount getControl CustomHashtable checkedNodes newHashtable CustomHashtable grayedNodes newHashtable gatherState checkedNodes grayedNodes getControl preservingSelection updateCode applyState checkedNodes grayedNodes getControl
Method declared on I Checkable public void remove Check State Listener I Check State Listener listener check State Listeners remove listener  ICheckable removeCheckStateListener ICheckStateListener checkStateListeners
public boolean set Checked Object element boolean state Assert is Not Null element Widget widget internal Expand element false if widget instanceof Tree Item Tree Item widget set Checked state return true return false  setChecked isNotNull internalExpand TreeItem TreeItem setChecked
Sets the checked state for the children of the given item param item the item param state code true code if the item should be checked and code false code if it should be unchecked private void set Checked Children Item item boolean state create Children item Item items get Children item if items null for int i 0 i items length i Item it items i if it get Data null it instanceof Tree Item Tree Item tree Item Tree Item it tree Item set Checked state set Checked Children tree Item state  setCheckedChildren createChildren getChildren getData TreeItem TreeItem treeItem TreeItem treeItem setChecked setCheckedChildren treeItem
Sets which elements are checked in this viewer s tree The given list contains the elements that are to be checked all other elements are to be unchecked p This method is typically used when restoring the interesting state of a viewer captured by an earlier call to code get Checked Elements code p param elements the array of checked elements see get Checked Elements public void set Checked Elements Object elements assert Elements Not Null elements Custom Hashtable checked Elements new Hashtable elements length 2 1 for int i 0 i elements length i Object element elements i Ensure item exists for element internal Expand element false checked Elements put element element Control tree get Control tree set Redraw false internal Set Checked checked Elements tree tree set Redraw true  getCheckedElements getCheckedElements setCheckedElements assertElementsNotNull CustomHashtable checkedElements newHashtable internalExpand checkedElements getControl setRedraw internalSetChecked checkedElements setRedraw
Sets the grayed state for the given element in this viewer param element the element param state code true code if the item should be grayed and code false code if it should be ungrayed return code true code if the gray state could be set and code false code otherwise public boolean set Grayed Object element boolean state Assert is Not Null element Widget widget internal Expand element false if widget instanceof Tree Item Tree Item widget set Grayed state return true return false  setGrayed isNotNull internalExpand TreeItem TreeItem setGrayed
Check and gray the selection rather than calling both set Grayed and set Checked as an optimization param element the item being checked param state a boolean indicating selection or deselection return boolean indicating success or failure public boolean set Gray Checked Object element boolean state Assert is Not Null element Widget widget internal Expand element false if widget instanceof Tree Item Tree Item item Tree Item widget item set Checked state item set Grayed state return true return false  setGrayed setChecked setGrayChecked isNotNull internalExpand TreeItem TreeItem TreeItem setChecked setGrayed
Sets which elements are grayed in this viewer s tree The given list contains the elements that are to be grayed all other elements are to be ungrayed p This method is typically used when restoring the interesting state of a viewer captured by an earlier call to code get Grayed Elements code p param elements the array of grayed elements see get Grayed Elements public void set Grayed Elements Object elements assert Elements Not Null elements Custom Hashtable grayed Elements new Hashtable elements length 2 1 for int i 0 i elements length i Object element elements i Ensure item exists for element internal Expand element false grayed Elements put element element Control tree get Control tree set Redraw false internal Set Grayed grayed Elements tree tree set Redraw true  getGrayedElements getGrayedElements setGrayedElements assertElementsNotNull CustomHashtable grayedElements newHashtable internalExpand grayedElements getControl setRedraw internalSetGrayed grayedElements setRedraw
Sets the grayed state for the given element and its parents in this viewer param element the element param state code true code if the item should be grayed and code false code if it should be ungrayed return code true code if the element is visible and the gray state could be set and code false code otherwise see set Grayed public boolean set Parents Grayed Object element boolean state Assert is Not Null element Widget widget internal Expand element false if widget instanceof Tree Item Tree Item item Tree Item widget item set Grayed state item item get Parent Item while item null item set Grayed state item item get Parent Item return true return false  setGrayed setParentsGrayed isNotNull internalExpand TreeItem TreeItem TreeItem setGrayed getParentItem setGrayed getParentItem
Sets the checked state for the given element and its visible children in this viewer Assumes that the element has been expanded before To enforce that the item is expanded call code expand To Level code for the element param element the element param state code true code if the item should be checked and code false code if it should be unchecked return code true code if the checked state could be set and code false code otherwise public boolean set Subtree Checked Object element boolean state Widget widget internal Expand element false if widget instanceof Tree Item Tree Item item Tree Item widget item set Checked state set Checked Children item state return true return false  expandToLevel setSubtreeChecked internalExpand TreeItem TreeItem TreeItem setChecked setCheckedChildren

private boolean state Creates a new event for the given source element and checked state param source the source param element the element param state the checked state public Check State Changed Event I Checkable source Object element boolean state super source this element element this state state  CheckStateChangedEvent ICheckable
Returns the checkable that is the source of this event return the originating checkable public I Checkable get Checkable return I Checkable source  ICheckable getCheckable ICheckable
Returns the checked state of the element return the checked state public boolean get Checked return state  getChecked
Returns the element whose check state changed return the element public Object get Element return element  getElement

private class Color Cell Layout extends Layout public Point compute Size Composite editor int w Hint int h Hint boolean force if w Hint SWT DEFAULT h Hint SWT DEFAULT return new Point w Hint h Hint Point color Size color Label compute Size SWT DEFAULT SWT DEFAULT force Point rgb Size rgb Label compute Size SWT DEFAULT SWT DEFAULT force return new Point color Size x GAP rgb Size x Math max color Size y rgb Size y  ColorCellLayout computeSize wHint hHint wHint hHint wHint hHint colorSize colorLabel computeSize rgbSize rgbLabel computeSize colorSize rgbSize colorSize rgbSize
public void layout Composite editor boolean force Rectangle bounds editor get Client Area Point color Size color Label compute Size SWT DEFAULT SWT DEFAULT force Point rgb Size rgb Label compute Size SWT DEFAULT SWT DEFAULT force int ty bounds height rgb Size y 2 if ty 0 ty 0 color Label set Bounds 1 0 color Size x color Size y rgb Label set Bounds color Size x GAP 1 ty bounds width color Size x GAP bounds height  getClientArea colorSize colorLabel computeSize rgbSize rgbLabel computeSize rgbSize colorLabel setBounds colorSize colorSize rgbLabel setBounds colorSize colorSize
Creates a new color cell editor parented under the given control The cell editor value is black code RGB 0 0 0 code initially and has no validator param parent the parent control public Color Cell Editor Composite parent this parent SWT NONE  ColorCellEditor
Creates a new color cell editor parented under the given control The cell editor value is black code RGB 0 0 0 code initially and has no validator param parent the parent control param style the style bits since 2 1 public Color Cell Editor Composite parent int style super parent style do Set Value new RGB 0 0 0  ColorCellEditor doSetValue
Creates and returns the color image data for the given control and RGB value The image s size is either the control s item extent or the cell editor s default extent which is 16 pixels square param w the control param color the color private Image Data create Color Image Control w RGB color GC gc new GC w Font Metrics fm gc get Font Metrics int size fm get Ascent gc dispose int indent 6 int extent DEFAULT EXTENT if w instanceof Table extent Table w get Item Height 1 else if w instanceof Tree extent Tree w get Item Height 1 else if w instanceof Table Tree extent Table Tree w get Item Height 1 if size extent size extent int width indent size int height extent int xoffset indent int yoffset height size 2 RGB black new RGB 0 0 0 Palette Data data Palette new Palette Data new RGB black black color Image Data data new Image Data width height 4 data Palette data transparent Pixel 0 int end size 1 for int y 0 y size y for int x 0 x size x if x 0 y 0 x end y end data set Pixel x xoffset y yoffset 1 else data set Pixel x xoffset y yoffset 2 return data  ImageData createColorImage FontMetrics getFontMetrics getAscent DEFAULT_EXTENT getItemHeight getItemHeight TableTree TableTree getItemHeight PaletteData dataPalette PaletteData ImageData ImageData dataPalette transparentPixel setPixel setPixel
protected Control create Contents Composite cell Color bg cell get Background composite new Composite cell get Style composite set Background bg composite set Layout new Color Cell Layout color Label new Label composite SWT LEFT color Label set Background bg rgb Label new Label composite SWT LEFT rgb Label set Background bg rgb Label set Font cell get Font return composite  createContents getBackground getStyle setBackground setLayout ColorCellLayout colorLabel colorLabel setBackground rgbLabel rgbLabel setBackground rgbLabel setFont getFont
public void dispose if image null image dispose image null super dispose 
protected Object open Dialog Box Control cell Editor Window Color Dialog dialog new Color Dialog cell Editor Window get Shell Object value get Value if value null dialog setRGB RGB value value dialog open return dialog getRGB  openDialogBox cellEditorWindow ColorDialog ColorDialog cellEditorWindow getShell getValue
protected void update Contents Object value RGB rgb RGB value XXX We don t have a value the first time this method is called if rgb null rgb new RGB 0 0 0 XXX Workaround for 1FMQ0P3 SWT ALL Table Item set Image doesn t work if using the identical image if image null image dispose Image Data id create Color Image color Label get Parent get Parent rgb Image Data mask id get Transparency Mask image new Image color Label get Display id mask color Label set Image image rgb Label set Text rgb red rgb green rgb blue NON NLS 4 NON NLS 3 NON NLS 2 NON NLS 1  updateContents TableItem setImage ImageData createColorImage colorLabel getParent getParent ImageData getTransparencyMask colorLabel getDisplay colorLabel setImage rgbLabel setText

public boolean resizable Creates a new column layout data object param resizable code true code if the column is resizable and code false code if not protected Column Layout Data boolean resizable this resizable resizable  ColumnLayoutData

public int width Creates a resizable column width of the given number of pixels param width In Pixels the width of column in pixels public Column Pixel Data int width In Pixels this width In Pixels true  widthInPixels ColumnPixelData widthInPixels widthInPixels
Creates a column width of the given number of pixels param width In Pixels the width of column in pixels param resizable code true code if the column is resizable and code false code if size of the column is fixed public Column Pixel Data int width In Pixels boolean resizable super resizable Assert is True width In Pixels 0 this width width In Pixels  widthInPixels ColumnPixelData widthInPixels isTrue widthInPixels widthInPixels

public int weight Creates a resizable column width with the given weight and a default minimum width param weight the weight of the column public Column Weight Data int weight this weight true  ColumnWeightData
Creates a resizable column width with the given weight and minimum width param weight the weight of the column param minimum Width the minimum width of the column in pixels public Column Weight Data int weight int minimum Width this weight minimum Width true  minimumWidth ColumnWeightData minimumWidth minimumWidth
Creates a column width with the given weight and minimum width param weight the weight of the column param minimum Width the minimum width of the column in pixels param resizable code true code if the column is resizable and code false code if size of the column is fixed public Column Weight Data int weight int minimum Width boolean resizable super resizable Assert is True weight 0 Assert is True minimum Width 0 this weight weight this minimum Width minimum Width  minimumWidth ColumnWeightData minimumWidth isTrue isTrue minimumWidth minimumWidth minimumWidth
Creates a column width with the given weight and a default minimum width param weight the weight of the column param resizable code true code if the column is resizable and code false code if size of the column is fixed public Column Weight Data int weight boolean resizable this weight MINIMUM WIDTH resizable  ColumnWeightData MINIMUM_WIDTH

Creates a new cell editor with no control and no st of choices Initially the cell editor has no cell validator since 2 1 see set Style see create see set Items see dispose public Combo Box Cell Editor set Style default Style  setStyle setItems ComboBoxCellEditor setStyle defaultStyle
Creates a new cell editor with a combo containing the given list of choices and parented under the given control The cell editor value is the zero based index of the selected item Initially the cell editor has no cell validator and the first item in the list is selected param parent the parent control param items the list of strings for the combo box public Combo Box Cell Editor Composite parent String items this parent items default Style  ComboBoxCellEditor defaultStyle
Creates a new cell editor with a combo containing the given list of choices and parented under the given control The cell editor value is the zero based index of the selected item Initially the cell editor has no cell validator and the first item in the list is selected param parent the parent control param items the list of strings for the combo box param style the style bits since 2 1 public Combo Box Cell Editor Composite parent String items int style super parent style set Items items  ComboBoxCellEditor setItems
Returns the list of choices for the combo box return the list of choices for the combo box public String get Items return this items  getItems
Sets the list of choices for the combo box param items the list of choices for the combo box public void set Items String items Assert is Not Null items this items items populate Combo Box Items  setItems isNotNull populateComboBoxItems
combo Box add Key Listener new Key Adapter hook key pressed see PR 14201 public void key Pressed Key Event e key Release Occured e  comboBox addKeyListener KeyAdapter keyPressed KeyEvent keyReleaseOccured
combo Box add Selection Listener new Selection Adapter public void widget Default Selected Selection Event event apply Editor Value And Deactivate  comboBox addSelectionListener SelectionAdapter widgetDefaultSelected SelectionEvent applyEditorValueAndDeactivate
public void widget Selected Selection Event event selection combo Box get Selection Index  widgetSelected SelectionEvent comboBox getSelectionIndex
combo Box add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE e detail SWT TRAVERSE RETURN e doit false  comboBox addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE TRAVERSE_RETURN
combo Box add Focus Listener new Focus Adapter public void focus Lost Focus Event e Combo Box Cell Editor this focus Lost  comboBox addFocusListener FocusAdapter focusLost FocusEvent ComboBoxCellEditor focusLost
protected Control create Control Composite parent combo Box new C Combo parent get Style combo Box set Font parent get Font combo Box add Key Listener new Key Adapter hook key pressed see PR 14201 public void key Pressed Key Event e key Release Occured e combo Box add Selection Listener new Selection Adapter public void widget Default Selected Selection Event event apply Editor Value And Deactivate public void widget Selected Selection Event event selection combo Box get Selection Index combo Box add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE e detail SWT TRAVERSE RETURN e doit false combo Box add Focus Listener new Focus Adapter public void focus Lost Focus Event e Combo Box Cell Editor this focus Lost return combo Box  createControl comboBox CCombo getStyle comboBox setFont getFont comboBox addKeyListener KeyAdapter keyPressed KeyEvent keyReleaseOccured comboBox addSelectionListener SelectionAdapter widgetDefaultSelected SelectionEvent applyEditorValueAndDeactivate widgetSelected SelectionEvent comboBox getSelectionIndex comboBox addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE TRAVERSE_RETURN comboBox addFocusListener FocusAdapter focusLost FocusEvent ComboBoxCellEditor focusLost comboBox
The code Combo Box Cell Editor code implementation of this code Cell Editor code framework method returns the zero based index of the current selection return the zero based index of the current selection wrapped as an code Integer code protected Object do Get Value return new Integer selection  ComboBoxCellEditor CellEditor doGetValue
Method declared on Cell Editor protected void do Set Focus combo Box set Focus  CellEditor doSetFocus comboBox setFocus
The code Combo Box Cell Editor code implementation of this code Cell Editor code framework method sets the minimum width of the cell The minimum width is 10 characters if code combo Box code is not code null code or code disposed code eles it is 60 pixels to make sure the arrow button and some text is visible The list of C Combo will be wide enough to show its longest item public Layout Data get Layout Data Layout Data layout Data super get Layout Data if combo Box null combo Box is Disposed layout Data minimum Width 60 else make the combo Box 10 characters wide GC gc new GC combo Box layout Data minimum Width gc get Font Metrics get Average Char Width 10 10 gc dispose return layout Data  ComboBoxCellEditor CellEditor comboBox CCombo LayoutData getLayoutData LayoutData layoutData getLayoutData comboBox comboBox isDisposed layoutData minimumWidth comboBox comboBox layoutData minimumWidth getFontMetrics getAverageCharWidth layoutData
The code Combo Box Cell Editor code implementation of this code Cell Editor code framework method accepts a zero based index of a selection param value the zero based index of the selection wrapped as an code Integer code protected void do Set Value Object value Assert is True combo Box null value instanceof Integer selection Integer value int Value combo Box select selection  ComboBoxCellEditor CellEditor doSetValue isTrue comboBox intValue comboBox
Updates the list of choices for the combo box for the current control private void populate Combo Box Items if combo Box null items null combo Box remove All for int i 0 i items length i combo Box add items i i set Value Valid true selection 0  populateComboBoxItems comboBox comboBox removeAll comboBox setValueValid
Applies the currently selected value and deactiavates the cell editor void apply Editor Value And Deactivate must set the selection before getting value selection combo Box get Selection Index Object new Value do Get Value mark Dirty boolean is Valid is Correct new Value set Value Valid is Valid if is Valid try to insert the current value into the error message set Error Message Message Format format get Error Message new Object items selection fire Apply Editor Value deactivate  applyEditorValueAndDeactivate comboBox getSelectionIndex newValue doGetValue markDirty isValid isCorrect newValue setValueValid isValid isValid setErrorMessage MessageFormat getErrorMessage fireApplyEditorValue
protected void focus Lost if is Activated apply Editor Value And Deactivate  focusLost isActivated applyEditorValueAndDeactivate
protected void key Release Occured Key Event key Event if key Event character u001b Escape character fire Cancel Editor else if key Event character t tab key apply Editor Value And Deactivate  keyReleaseOccured KeyEvent keyEvent keyEvent fireCancelEditor keyEvent applyEditorValueAndDeactivate

Creates a combo viewer on a newly created combo control under the given parent The viewer has no input no content provider a default label provider no sorter and no filters param parent the parent control public Combo Viewer Composite parent this parent SWT READ ONLY SWT BORDER  ComboViewer READ_ONLY
Creates a combo viewer on a newly created combo control under the given parent The combo control is created using the given SWT style bits The viewer has no input no content provider a default label provider no sorter and no filters param parent the parent control param style the SWT style bits public Combo Viewer Composite parent int style this new Combo parent style  ComboViewer
Creates a combo viewer on the given combo control The viewer has no input no content provider a default label provider no sorter and no filters param list the combo control public Combo Viewer Combo list this combo list hook Control list  ComboViewer hookControl
protected void list Add String string int index combo add string index  listAdd
protected void list Set Item int index String string combo set Item index string  listSetItem setItem
protected int list Get Selection Indices return new int combo get Selection Index  listGetSelectionIndices getSelectionIndex
protected int list Get Item Count return combo get Item Count  listGetItemCount getItemCount
protected void list Set Items String labels combo set Items labels  listSetItems setItems
protected void list Remove All combo remove All  listRemoveAll removeAll
protected void list Remove int index combo remove index  listRemove
Method declared on Viewer public Control get Control return combo  getControl
Returns this list viewer s list control return the list control public Combo get Combo return combo  getCombo
Method defined on Structured Viewer public void reveal Object element return  StructuredViewer
protected void list Set Selection int ixs for int idx 0 idx ixs length idx combo select ixs idx  listSetSelection
see org eclipse jface viewers Abstract List Viewer list Deselect All protected void list Deselect All combo deselect All combo clear Selection  AbstractListViewer listDeselectAll listDeselectAll deselectAll clearSelection
see org eclipse jface viewers Abstract List Viewer list Show Selection protected void list Show Selection  AbstractListViewer listShowSelection listShowSelection

private final I Label Provider Listener label Provider Listener new I Label Provider Listener public void label Provider Changed Label Provider Changed Event event Content Viewer this handle Label Provider Changed event  ILabelProviderListener labelProviderListener ILabelProviderListener labelProviderChanged LabelProviderChangedEvent ContentViewer handleLabelProviderChanged
Creates a content viewer with no input no content provider and a default label provider protected Content Viewer  ContentViewer
Returns the content provider used by this viewer or code null code if this view does not yet have a content provider p The code Content Viewer code implementation of this method returns the content provider recorded is an internal state variable Overriding this method is generally not required however if overriding in a subclass code super get Content Provider code must be invoked p return the content provider or code null code if none public I Content Provider get Content Provider return content Provider  ContentViewer getContentProvider IContentProvider getContentProvider contentProvider
The code Content Viewer code implementation of this code I Input Provider code method returns the current input of this viewer or code null code if none The viewer s input provides the model for the viewer s content public Object get Input return input  ContentViewer IInputProvider getInput
Returns the label provider used by this viewer p The code Content Viewer code implementation of this method returns the label provider recorded in an internal state variable if none has been set with code set Label Provider code a code Simple Label Provider code will be created remembered and returned Overriding this method is generally not required however if overriding in a subclass code super get Label Provider code must be invoked p return a label provider public I Base Label Provider get Label Provider if label Provider null label Provider new Label Provider return label Provider  ContentViewer setLabelProvider SimpleLabelProvider getLabelProvider IBaseLabelProvider getLabelProvider labelProvider labelProvider LabelProvider labelProvider
Handles a dispose event on this viewer s control p The code Content Viewer code implementation of this method disposes of this viewer s label provider and content provider if it has one Subclasses should override this method to perform any additional cleanup of resources however overriding methods must invoke code super handle Dispose code p param event a dispose event protected void handle Dispose Dispose Event event if content Provider null content Provider input Changed this get Input null content Provider dispose content Provider null if label Provider null label Provider remove Listener label Provider Listener label Provider dispose label Provider null  ContentViewer handleDispose handleDispose DisposeEvent contentProvider contentProvider inputChanged getInput contentProvider contentProvider labelProvider labelProvider removeListener labelProviderListener labelProvider labelProvider
Handles a label provider changed event p The code Content Viewer code implementation of this method calls code label Provider Changed code to cause a complete refresh of the viewer Subclasses may reimplement or extend p protected void handle Label Provider Changed Label Provider Changed Event event label Provider Changed  ContentViewer labelProviderChanged handleLabelProviderChanged LabelProviderChangedEvent labelProviderChanged
Adds event listener hooks to the given control p All subclasses must call this method when their control is first established p p The code Content Viewer code implementation of this method hooks dispose events for the given control Subclasses may override if they need to add other control hooks however code super hook Control code must be invoked p param control the control protected void hook Control Control control control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event handle Dispose event  ContentViewer hookControl hookControl addDisposeListener DisposeListener widgetDisposed DisposeEvent handleDispose
Notifies that the label provider has changed p The code Content Viewer code implementation of this method calls code refresh code Subclasses may reimplement or extend p protected void label Provider Changed refresh  ContentViewer labelProviderChanged
Sets the content provider used by this viewer p The code Content Viewer code implementation of this method records the content provider in an internal state variable Overriding this method is generally not required however if overriding in a subclass code super set Content Provider code must be invoked p param content Provider the content provider see get Content Provider public void set Content Provider I Content Provider content Provider Assert is Not Null content Provider I Content Provider old Content Provider this content Provider this content Provider content Provider if old Content Provider null Object current Input get Input old Content Provider input Changed this current Input null old Content Provider dispose content Provider input Changed this null current Input refresh  ContentViewer setContentProvider contentProvider getContentProvider setContentProvider IContentProvider contentProvider isNotNull contentProvider IContentProvider oldContentProvider contentProvider contentProvider contentProvider oldContentProvider currentInput getInput oldContentProvider inputChanged currentInput oldContentProvider contentProvider inputChanged currentInput
The code Content Viewer code implementation of this code Viewer code method invokes code input Changed code on the content provider and then the code input Changed code hook method This method fails if this viewer does not have a content provider Subclassers are advised to override code input Changed code rather than this method but may extend this method if required public void set Input Object input Assert is True get Content Provider null Content Viewer must have a content provider when input is set NON NLS 1 Object old Input get Input content Provider input Changed this old Input input this input input call input hook input Changed this input old Input  ContentViewer inputChanged inputChanged inputChanged setInput isTrue getContentProvider ContentViewer oldInput getInput contentProvider inputChanged oldInput inputChanged oldInput
Sets the label provider for this viewer p The code Content Viewer code implementation of this method ensures that the given label provider is connected to this viewer and the former label provider is disconnected from this viewer Overriding this method is generally not required however if overriding in a subclass code super set Label Provider code must be invoked p param label Provider the label provider or code null code if none public void set Label Provider I Base Label Provider label Provider I Base Label Provider old Provider this label Provider If it hasn t changed do nothing This also ensures that the provider is not disposed if set a second time if label Provider old Provider return if old Provider null old Provider remove Listener this label Provider Listener this label Provider label Provider if label Provider null label Provider add Listener this label Provider Listener refresh Dispose old provider after refresh so that items never refer to stale images if old Provider null old Provider dispose  ContentViewer setLabelProvider labelProvider setLabelProvider IBaseLabelProvider labelProvider IBaseLabelProvider oldProvider labelProvider labelProvider oldProvider oldProvider oldProvider removeListener labelProviderListener labelProvider labelProvider labelProvider labelProvider addListener labelProviderListener oldProvider oldProvider

Hash Map Entry next Hash Map Entry Object the Key Object the Value key the Key value the Value  HashMapEntry HashMapEntry theKey theValue theKey theValue
private static final class Empty Enumerator implements Enumeration public boolean has More Elements return false  EmptyEnumerator hasMoreElements
public Object next Element throw new No Such Element Exception  nextElement NoSuchElementException
Hash Map Entry entry Hash Enumerator boolean is Key key is Key start first Slot  HashMapEntry HashEnumerator isKey isKey firstSlot
public boolean has More Elements if entry null return true while start last Slot if element Data start null entry element Data start 1 return true return false  hasMoreElements lastSlot elementData elementData
public Object next Element if has More Elements Object result key entry key entry value entry entry next return result else throw new No Such Element Exception  nextElement hasMoreElements NoSuchElementException
Constructs a new Hashtable using the default capacity and load factor public Custom Hashtable this 13  CustomHashtable
Constructs a new Hashtable using the specified capacity and the default load factor param capacity the initial capacity public Custom Hashtable int capacity this capacity null  CustomHashtable
Constructs a new hash table with the default capacity and the given element comparer param comparer the element comparer to use to compare keys and obtain hash codes for keys or code null code to use the normal code equals code and code hash Code code methods public Custom Hashtable I Element Comparer comparer this DEFAULT CAPACITY comparer  hashCode CustomHashtable IElementComparer DEFAULT_CAPACITY
Constructs a new hash table with the given capacity and the given element comparer param capacity the maximum number of elements that can be added without rehashing param comparer the element comparer to use to compare keys and obtain hash codes for keys or code null code to use the normal code equals code and code hash Code code methods public Custom Hashtable int capacity I Element Comparer comparer if capacity 0 element Count 0 element Data new Hash Map Entry capacity 0 1 capacity first Slot element Data length load Factor 0 75f compute Max Size else throw new Illegal Argument Exception this comparer comparer  hashCode CustomHashtable IElementComparer elementCount elementData HashMapEntry firstSlot elementData loadFactor computeMaxSize IllegalArgumentException
Constructs a new hash table with enough capacity to hold all keys in the given hash table then adds all key value pairs in the given hash table to the new one using the given element comparer param capacity the maximum number of elements that can be added without rehashing param comparer the element comparer to use to compare keys and obtain hash codes for keys or code null code to use the normal code equals code and code hash Code code methods public Custom Hashtable Custom Hashtable table I Element Comparer comparer this table size 2 comparer for int i table element Data length i 0 Hash Map Entry entry table element Data i while entry null put entry key entry value entry entry next  hashCode CustomHashtable CustomHashtable IElementComparer elementData HashMapEntry elementData
private void compute Max Size threshold int element Data length load Factor  computeMaxSize elementData loadFactor
Answers if this Hashtable contains the specified object as a key of one of the key value pairs paramkeythe object to look for as a key in this Hashtable returntrue if object is a key in this Hashtable false otherwise public boolean contains Key Object key return get Entry key null  containsKey getEntry
Answers an Enumeration on the values of this Hashtable The results of the Enumeration may be affected if the contents of this Hashtable are modified returnan Enumeration of the values of this Hashtable public Enumeration elements if element Count 0 return empty Enumerator return new Hash Enumerator false  elementCount emptyEnumerator HashEnumerator
Answers the value associated with the specified key in this Hashtable paramkeythe key of the value returned returnthe value associated with the specified key null if the specified key does not exist public Object get Object key int index hash Code key 0x7FFFFFFF element Data length Hash Map Entry entry element Data index while entry null if key Equals key entry key return entry value entry entry next return null  hashCode elementData HashMapEntry elementData keyEquals
private Hash Map Entry get Entry Object key int index hash Code key 0x7FFFFFFF element Data length Hash Map Entry entry element Data index while entry null if key Equals key entry key return entry entry entry next return null  HashMapEntry getEntry hashCode elementData HashMapEntry elementData keyEquals
Answers the hash code for the given key private int hash Code Object key if comparer null return key hash Code else return comparer hash Code key  hashCode hashCode hashCode
Compares two keys for equality private boolean key Equals Object a Object b if comparer null return a equals b else return comparer equals a b  keyEquals
Answers an Enumeration on the keys of this Hashtable The results of the Enumeration may be affected if the contents of this Hashtable are modified returnan Enumeration of the keys of this Hashtable public Enumeration keys if element Count 0 return empty Enumerator return new Hash Enumerator true  elementCount emptyEnumerator HashEnumerator
Associate the specified value with the specified key in this Hashtable If the key already exists the old value is replaced The key and value cannot be null paramkeythe key to add paramvaluethe value to add returnthe old value associated with the specified key null if the key did not exist public Object put Object key Object value if key null value null int index hash Code key 0x7FFFFFFF element Data length Hash Map Entry entry element Data index while entry null key Equals key entry key entry entry next if entry null if element Count threshold rehash index hash Code key 0x7FFFFFFF element Data length if index first Slot first Slot index if index last Slot last Slot index entry new Hash Map Entry key value entry next element Data index element Data index entry return null Object result entry value entry key key important to avoid hanging onto keys that are equal but old see bug 30607 entry value value return result else throw new Null Pointer Exception  hashCode elementData HashMapEntry elementData keyEquals elementCount hashCode elementData firstSlot firstSlot lastSlot lastSlot HashMapEntry elementData elementData NullPointerException
Increases the capacity of this Hashtable This method is sent when the size of this Hashtable exceeds the load factor private void rehash int length element Data length 1 if length 0 length 1 first Slot length last Slot 1 Hash Map Entry new Data new Hash Map Entry length for int i element Data length i 0 Hash Map Entry entry element Data i while entry null int index hash Code entry key 0x7FFFFFFF length if index first Slot first Slot index if index last Slot last Slot index Hash Map Entry next entry next entry next new Data index new Data index entry entry next element Data new Data compute Max Size  elementData firstSlot lastSlot HashMapEntry newData HashMapEntry elementData HashMapEntry elementData hashCode firstSlot firstSlot lastSlot lastSlot HashMapEntry newData newData elementData newData computeMaxSize
Remove the key value pair with the specified key from this Hashtable paramkeythe key to remove returnthe value associated with the specified key null if the specified key did not exist public Object remove Object key Hash Map Entry last null int index hash Code key 0x7FFFFFFF element Data length Hash Map Entry entry element Data index while entry null key Equals key entry key last entry entry entry next if entry null if last null element Data index entry next else last next entry next element Count return entry value return null  HashMapEntry hashCode elementData HashMapEntry elementData keyEquals elementData elementCount
Answers the number of key value pairs in this Hashtable returnthe number of key value pairs in this Hashtable public int size return element Count  elementCount
Answers the string representation of this Hashtable returnthe string representation of this Hashtable public String to String if size 0 return NON NLS 1 String Buffer buffer new String Buffer buffer append for int i element Data length i 0 Hash Map Entry entry element Data i while entry null buffer append entry key buffer append buffer append entry value buffer append NON NLS 1 entry entry next Remove the last if element Count 0 buffer set Length buffer length 2 buffer append return buffer to String  toString StringBuffer StringBuffer elementData HashMapEntry elementData elementCount setLength toString

private Listener List listeners new Listener List Creates a decorating label provider which uses the given label decorator to decorate labels provided by the given label provider param provider the nested label provider param decorator the label decorator or code null code if no decorator is to be used initially public Decorating Label Provider I Label Provider provider I Label Decorator decorator Assert is Not Null provider this provider provider this decorator decorator  ListenerList ListenerList DecoratingLabelProvider ILabelProvider ILabelDecorator isNotNull
The code Decorating Label Provider code implementation of this code I Base Label Provider code method adds the listener to both the nested label provider and the label decorator param listener a label provider listener public void add Listener I Label Provider Listener listener super add Listener listener provider add Listener listener if decorator null decorator add Listener listener listeners add listener  DecoratingLabelProvider IBaseLabelProvider addListener ILabelProviderListener addListener addListener addListener
The code Decorating Label Provider code implementation of this code I Base Label Provider code method disposes both the nested label provider and the label decorator public void dispose provider dispose if decorator null decorator dispose  DecoratingLabelProvider IBaseLabelProvider
The code Decorating Label Provider code implementation of this code I Label Provider code method returns the image provided by the nested label provider s code get Image code method decorated with the decoration provided by the label decorator s code decorate Image code method public Image get Image Object element Image image provider get Image element if decorator null Image decorated decorator decorate Image image element if decorated null return decorated return image  DecoratingLabelProvider ILabelProvider getImage decorateImage getImage getImage decorateImage
Returns the label decorator or code null code if none has been set return the label decorator or code null code if none has been set public I Label Decorator get Label Decorator return decorator  ILabelDecorator getLabelDecorator
Returns the nested label provider return the nested label provider public I Label Provider get Label Provider return provider  ILabelProvider getLabelProvider
The code Decorating Label Provider code implementation of this code I Label Provider code method returns the text label provided by the nested label provider s code get Text code method decorated with the decoration provided by the label decorator s code decorate Text code method public String get Text Object element String text provider get Text element if decorator null String decorated decorator decorate Text text element if decorated null return decorated return text  DecoratingLabelProvider ILabelProvider getText decorateText getText getText decorateText
The code Decorating Label Provider code implementation of this code I Base Label Provider code method returns code true code if the corresponding method on the nested label provider returns code true code or if the corresponding method on the decorator returns code true code public boolean is Label Property Object element String property if provider is Label Property element property return true if decorator null decorator is Label Property element property return true return false  DecoratingLabelProvider IBaseLabelProvider isLabelProperty isLabelProperty isLabelProperty
The code Decorating Label Provider code implementation of this code I Base Label Provider code method removes the listener from both the nested label provider and the label decorator param listener a label provider listener public void remove Listener I Label Provider Listener listener super remove Listener listener provider remove Listener listener if decorator null decorator remove Listener listener listeners remove listener  DecoratingLabelProvider IBaseLabelProvider removeListener ILabelProviderListener removeListener removeListener removeListener
Sets the label decorator Removes all known listeners from the old decorator and adds all known listeners to the new decorator The old decorator is not disposed Fires a label provider changed event indicating that all labels should be updated Has no effect if the given decorator is identical to the current one param decorator the label decorator or code null code if no decorations are to be applied public void set Label Decorator I Label Decorator decorator I Label Decorator old Decorator this decorator if old Decorator decorator Object listener List this listeners get Listeners if old Decorator null for int i 0 i listener List length i old Decorator remove Listener I Label Provider Listener listener List i this decorator decorator if decorator null for int i 0 i listener List length i decorator add Listener I Label Provider Listener listener List i fire Label Provider Changed new Label Provider Changed Event this  setLabelDecorator ILabelDecorator ILabelDecorator oldDecorator oldDecorator listenerList getListeners oldDecorator listenerList oldDecorator removeListener ILabelProviderListener listenerList listenerList addListener ILabelProviderListener listenerList fireLabelProviderChanged LabelProviderChangedEvent
Return whether the two image handles are equal param old Image param new Image return private boolean equals Image old Image Image new Image return old Image null new Image null old Image null new Image null old Image equals new Image  oldImage newImage oldImage newImage oldImage newImage oldImage newImage oldImage newImage
public void update Label Viewer Label settings Object element I Label Decorator current Decorator get Label Decorator String old Text settings get Text boolean decoration Ready true if current Decorator instanceof I Delayed Label Decorator I Delayed Label Decorator delayed Decorator I Delayed Label Decorator current Decorator if delayed Decorator prepare Decoration element old Text The decoration is not ready but has been queued for processing decoration Ready false update icon and label if decoration Ready old Text null settings get Text length 0 settings set Text get Text element Image old Image settings get Image if decoration Ready old Image null settings set Image get Image element  updateLabel ViewerLabel ILabelDecorator currentDecorator getLabelDecorator oldText getText decorationReady currentDecorator IDelayedLabelDecorator IDelayedLabelDecorator delayedDecorator IDelayedLabelDecorator currentDecorator delayedDecorator prepareDecoration oldText decorationReady decorationReady oldText getText setText getText oldImage getImage decorationReady oldImage setImage getImage

private class Dialog Cell Layout extends Layout public void layout Composite editor boolean force Rectangle bounds editor get Client Area Point size button compute Size SWT DEFAULT SWT DEFAULT force if contents null contents set Bounds 0 0 bounds width size x bounds height button set Bounds bounds width size x 0 size x bounds height  DialogCellLayout getClientArea computeSize setBounds setBounds
public Point compute Size Composite editor int w Hint int h Hint boolean force if w Hint SWT DEFAULT h Hint SWT DEFAULT return new Point w Hint h Hint Point contents Size contents compute Size SWT DEFAULT SWT DEFAULT force Point button Size button compute Size SWT DEFAULT SWT DEFAULT force Just return the button width to ensure the button is not clipped if the label is long The label will just use whatever extra width there is Point result new Point button Size x Math max contents Size y button Size y return result  computeSize wHint hHint wHint hHint wHint hHint contentsSize computeSize buttonSize computeSize buttonSize contentsSize buttonSize
Creates a new dialog cell editor with no control since 2 1 public Dialog Cell Editor set Style default Style  DialogCellEditor setStyle defaultStyle
Creates a new dialog cell editor parented under the given control The cell editor value is code null code initially and has no validator param parent the parent control protected Dialog Cell Editor Composite parent this parent default Style  DialogCellEditor defaultStyle
Creates a new dialog cell editor parented under the given control The cell editor value is code null code initially and has no validator param parent the parent control param style the style bits since 2 1 protected Dialog Cell Editor Composite parent int style super parent style  DialogCellEditor
Creates the button for this cell editor under the given parent control p The default implementation of this framework method creates the button display on the right hand side of the dialog cell editor Subclasses may extend or reimplement p param parent the parent control return the new button control protected Button create Button Composite parent Button result new Button parent SWT DOWN result set Text NON NLS 1 return result  createButton setText
Creates the controls used to show the value of this cell editor p The default implementation of this framework method creates a label widget using the same font and background color as the parent control p p Subclasses may reimplement If you reimplement this method you should also reimplement code update Contents code p param cell the control for this cell editor protected Control create Contents Composite cell default Label new Label cell SWT LEFT default Label set Font cell get Font default Label set Background cell get Background return default Label  updateContents createContents defaultLabel defaultLabel setFont getFont defaultLabel setBackground getBackground defaultLabel
protected Control create Control Composite parent Font font parent get Font Color bg parent get Background editor new Composite parent get Style editor set Font font editor set Background bg editor set Layout new Dialog Cell Layout contents create Contents editor update Contents value button create Button editor button set Font font button add Key Listener new Key Adapter public void key Released Key Event e if e character u001b Escape fire Cancel Editor button add Selection Listener new Selection Adapter public void widget Selected Selection Event event Object new Value open Dialog Box editor if new Value null boolean new Valid State is Correct new Value if new Valid State mark Dirty do Set Value new Value else try to insert the current value into the error message set Error Message Message Format format get Error Message new Object new Value to String fire Apply Editor Value set Value Valid true return editor  createControl getFont getBackground getStyle setFont setBackground setLayout DialogCellLayout createContents updateContents createButton setFont addKeyListener KeyAdapter keyReleased KeyEvent fireCancelEditor addSelectionListener SelectionAdapter widgetSelected SelectionEvent newValue openDialogBox newValue newValidState isCorrect newValue newValidState markDirty doSetValue newValue setErrorMessage MessageFormat getErrorMessage newValue toString fireApplyEditorValue setValueValid
Method declared on Cell Editor protected Object do Get Value return value  CellEditor doGetValue
The focus is set to the cell editor s button protected void do Set Focus button set Focus  doSetFocus setFocus
Method declared on Cell Editor protected void do Set Value Object value this value value update Contents value  CellEditor doSetValue updateContents
Returns the default label widget created by code create Contents code return the default label widget protected Label get Default Label return default Label  createContents getDefaultLabel defaultLabel
Opens a dialog box under the given parent control and returns the dialog s value when it closes or code null code if the dialog was cancelled or no selection was made in the dialog p This framework method must be implemented by concrete subclasses It is called when the user has pressed the button and the dialog box must pop up p param cell Editor Window the parent control cell editor s window so that a subclass can adjust the dialog box accordingly return the selected value or code null code if the dialog was cancelled or no selection was made in the dialog  cellEditorWindow
protected abstract Object open Dialog Box Control cell Editor Window Updates the controls showing the value of this cell editor p The default implementation of this framework method just converts the passed object to a string using code to String code and sets this as the text of the label widget p p Subclasses may reimplement If you reimplement this method you should also reimplement code create Contents code p param value the new value of this cell editor protected void update Contents Object value if default Label null return String text NON NLS 1 if value null text value to String default Label set Text text  openDialogBox cellEditorWindow toString createContents updateContents defaultLabel toString defaultLabel setText

protected I Selection selection Creates a new event for the given source and selection param source the viewer param selection the selection public Double Click Event Viewer source I Selection selection super source Assert is Not Null selection this selection selection  ISelection DoubleClickEvent ISelection isNotNull
Returns the selection return the selection public I Selection get Selection return selection  ISelection getSelection
Returns the viewer that is the source of this event return the originating viewer public Viewer get Viewer return Viewer get Source  getViewer getSource

public interface I Base Label Provider Adds a listener to this label provider Has no effect if an identical listener is already registered p Label provider listeners are informed about state changes that affect the rendering of the viewer that uses this label provider p param listener a label provider listener  IBaseLabelProvider
public void add Listener I Label Provider Listener listener Disposes of this label provider When a label provider is attached to a viewer the viewer will automatically call this method when the viewer is being closed When label providers are used outside of the context of a viewer it is the client s responsibility to ensure that this method is called when the provider is no longer needed  addListener ILabelProviderListener
public void dispose Returns whether the label would be affected by a change to the given property of the given element This can be used to optimize a non structural viewer update If the property mentioned in the update does not affect the label then the viewer need not update the label param element the element param property the property return code true code if the label would be affected and code false code if it would be unaffected 
public boolean is Label Property Object element String property Removes a listener to this label provider Has no affect if an identical listener is not registered param listener a label provider listener  isLabelProperty

public interface I Cell Editor Listener Notifies that the end user has requested applying a value All cell editors send this notification p The normal reaction is to update the model with the current cell editor value However if the value is not valid it should not be applied A typical text based cell editor would send this message when the end user hits Return whereas other editors would send it whenever their value changes p  ICellEditorListener
public void apply Editor Value Notifies that the end user has canceled editing All cell editors send this notification A listener should b not b update the model based on this notification see code apply Editor Value code  applyEditorValue applyEditorValue
public void cancel Editor Notifies that the end user is changing the value in the cell editor This notification is normally sent only by text based editors in response to a keystroke so that the listener may show an error message reflecting the current valid state This notification is sent while the value is being actively edited before the value is applied or cancelled A listener should b not b update the model based on this notification see code apply Editor Value code p If the code new Valid State code parameter is code true code the new value may be retrieved by calling code I Cell Editor get Value code on the appropriate cell editor p param old Valid State the valid state before the end user changed the value param new Valid State the current valid state  cancelEditor applyEditorValue newValidState ICellEditor getValue oldValidState newValidState

public interface I Cell Editor Validator Returns a string indicating whether the given value is valid code null code means valid and non code null code means invalid with the result being the error message to display to the end user param value the value to be validated return the error message or code null code indicating that the value is valid  ICellEditorValidator

public interface I Cell Modifier Checks whether the given property of the given element can be modified param element the element param property the property return code true code if the property can be modified and code false code if it is not modifiable  ICellModifier
public boolean can Modify Object element String property Returns the value for the given property of the given element Returns code null code if the element does not have the given property param element the element param property the property return the property value  canModify
public Object get Value Object element String property Modifies the value for the given property of the given element Has no effect if the element does not have the given property or if the property cannot be modified p Note that it is possible for an SWT Item to be passed instead of the model element To handle this case in a safe way use pre if element instanceof Item element Item element get Data modify the element s property here pre p param element the model element or SWT Item see above param property the property param value the new property value see org eclipse swt widgets Item  getValue getData

public interface I Checkable Adds a listener for changes to the checked state of elements in this viewer Has no effect if an identical listener is already registered param listener a check state listener  ICheckable
public void add Check State Listener I Check State Listener listener Returns the checked state of the given element param element the element return code true code if the element is checked and code false code if not checked  addCheckStateListener ICheckStateListener
public boolean get Checked Object element Removes the given check state listener from this viewer Has no effect if an identical listener is not registered param listener a check state listener  getChecked
public void remove Check State Listener I Check State Listener listener Sets the checked state for the given element in this viewer param element the element param state code true code if the item should be checked and code false code if it should be unchecked return code true code if the checked state could be set and code false code otherwise  removeCheckStateListener ICheckStateListener

public interface I Check State Listener Notifies of a change to the checked state of an element param event event object describing the change  ICheckStateListener

Provides a foreground color for the given element param element the element returnthe foreground color for the element or code null code to use the default foreground color 
Provides a background color for the given element param element the element returnthe background color for the element or code null code to use the default background color 

public interface I Content Provider Disposes of this content provider This is called by the viewer when it is disposed p The viewer should not be updated during this call as it is in the process of being disposed p  IContentProvider
public void dispose Notifies this content provider that the given viewer s input has been switched to a different element p A typical use for this method is registering the content provider as a listener to changes on the new input using model specific means and deregistering the viewer from the old input In response to these change notifications the content provider should update the viewer see the add remove update and refresh methods on the viewers p p The viewer should not be updated during this call as it might be in the process of being disposed p param viewer the viewer param old Input the old input element or code null code if the viewer did not previously have an input param new Input the new input element or code null code if the viewer does not have an input  oldInput newInput

Adds a prefix to the element s label param prefix the prefix 
Adds a suffix to the element s label param suffix the suffix 
Adds an overlay to the element s image param overlay the overlay image descriptor 
Adds an overlay to the element s image param overlay the overlay image descriptor 

Prepare the element for decoration If it is already decorated and ready for update return true If decoration is pending return false param element The element to be decorated param original Text The starting text return boolean true if the decoration is ready for this element  originalText

public interface I Double Click Listener Notifies of a double click param event event object describing the double click  IDoubleClickListener

Compares two elements for equality param a the first element param b the second element return whether a is equal to b 
Returns the hash code for the given element return the hash code for the given element 

Provides a font for the given element param element the element return the font for the element or code null code to use the default font 

public interface I Input Provider Returns the input return the input object  IInputProvider

public interface I Label Decorator extends I Base Label Provider Returns an image that is based on the given image but decorated with additional information relating to the state of the provided element Text and image decoration updates can occur as a result of other updates within the workbench including deferred decoration by background processes Clients should handle label Provider Changed Events for the given element to get the complete decoration see Label Provider Changed Event see I Base Label Provider add Listener param image the input image to decorate or code null code if the element has no image param element the element whose image is being decorated return the decorated image or code null code if no decoration is to be applied see org eclipse jface resource Composite Image Descriptor  ILabelDecorator IBaseLabelProvider labelProviderChangedEvents LabelProviderChangedEvent IBaseLabelProvider addListener CompositeImageDescriptor
public Image decorate Image Image image Object element Returns a text label that is based on the given text label but decorated with additional information relating to the state of the provided element Text and image decoration updates can occur as a result of other updates within the workbench including deferred decoration by background processes Clients should handle label Provider Changed Events for the given element to get the complete decoration see Label Provider Changed Event see I Base Label Provider add Listener param text the input text label to decorate param element the element whose image is being decorated return the decorated text label or code null code if no decoration is to be applied  decorateImage labelProviderChangedEvents LabelProviderChangedEvent IBaseLabelProvider addListener

public interface I Label Provider extends I Base Label Provider Returns the image for the label of the given element The image is owned by the label provider and must not be disposed directly Instead dispose the label provider when no longer needed param element the element for which to provide the label image return the image used to label the element or code null code if there is no image for the given object  ILabelProvider IBaseLabelProvider
public Image get Image Object element Returns the text for the label of the given element param element the element for which to provide the label text return the text string used to label the element or code null code if there is no text label for the given object  getImage

public interface I Label Provider Listener Notifies this listener that the state of the label provider has changed in a way that affects the labels it computes p A typical response would be to refresh all labels by re requesting them from the label provider p param event the label provider change event  ILabelProviderListener

Calculates decorations based on element param element the element to decorate param decoration the decoration to set 

public interface I Open Listener Notifies of an open event param event event object describing the open event  IOpenListener

Adds a listener for post selection changes in this selection provider Has no effect if an identical listener is already registered param listener a selection changed listener 
Removes the given listener for post selection changes from this selection provider Has no affect if an identical listener is not registered param listener a selection changed listener 

Returns whether this selection is empty return code true code if this selection is empty and code false code otherwise 

public interface I Selection Changed Listener Notifies that the selection has changed param event event object describing the change  ISelectionChangedListener

public interface I Selection Provider Adds a listener for selection changes in this selection provider Has no effect if an identical listener is already registered param listener a selection changed listener  ISelectionProvider
public void add Selection Changed Listener I Selection Changed Listener listener Returns the current selection for this provider return the current selection  addSelectionChangedListener ISelectionChangedListener
public I Selection get Selection Removes the given selection change listener from this selection provider Has no affect if an identical listener is not registered param listener a selection changed listener  ISelection getSelection
public void remove Selection Changed Listener I Selection Changed Listener listener Sets the current selection for this selection provider param selection the new selection  removeSelectionChangedListener ISelectionChangedListener

public interface I Structured Content Provider extends I Content Provider Returns the elements to display in the viewer when its input is set to the given element These elements can be presented as rows in a table items in a list etc The result is not modified by the viewer param input Element the input element return the array of elements to display in the viewer  IStructuredContentProvider IContentProvider inputElement

public interface I Structured Selection extends I Selection Returns the first element in this selection or code null code if the selection is empty return an element or code null code if none  IStructuredSelection ISelection
public Object get First Element Returns an iterator over the elements of this selection return an iterator over the selected elements  getFirstElement
public Iterator iterator Returns the number of elements selected in this selection return the number of elements selected 
public int size Returns the elements in this selection as an array return the selected elements as an array 
public Object to Array Returns the elements in this selection as a code List code return the selected elements as a list  toArray

public interface I Table Label Provider extends I Base Label Provider Returns the label image for the given column of the given element param element the object representing the entire row or code null code indicating that no input object is set in the viewer param column Index the zero based index of the column in which the label appears  ITableLabelProvider IBaseLabelProvider columnIndex
public Image get Column Image Object element int column Index Returns the label text for the given column of the given element param element the object representing the entire row or code null code indicating that no input object is set in the viewer param column Index the zero based index of the column in which the label appears  getColumnImage columnIndex columnIndex

public interface I Tree Content Provider extends I Structured Content Provider Returns the child elements of the given parent element p The difference between this method and code I Structured Content Provider get Elements code is that code get Elements code is called to obtain the tree viewer s root elements whereas code get Children code is used to obtain the children of a given parent element in the tree including a root p The result is not modified by the viewer param parent Element the parent element return an array of child elements  ITreeContentProvider IStructuredContentProvider IStructuredContentProvider getElements getElements getChildren parentElement
public Object get Children Object parent Element Returns the parent for the given element or code null code indicating that the parent can t be computed In this case the tree structured viewer can t expand a given node correctly if requested param element the element return the parent element or code null code if it has none or if the parent cannot be computed  getChildren parentElement
public Object get Parent Object element Returns whether the given element has children p Intended as an optimization for when the viewer does not need the actual children Clients may be able to implement this more efficiently than code get Children code p param element the element return code true code if the given element has children and code false code if it has no children  getParent getChildren

public interface I Tree Viewer Listener Notifies that a node in the tree has been collapsed param event event object describing details  ITreeViewerListener
public void tree Collapsed Tree Expansion Event event Notifies that a node in the tree has been expanded param event event object describing details  treeCollapsed TreeExpansionEvent

Updates the label for the given element param label the label to update param element the element 

private Listener List listeners new Listener List 1 Creates a new label provider public Label Provider  ListenerList ListenerList LabelProvider
Method declared on I Base Label Provider public void add Listener I Label Provider Listener listener listeners add listener  IBaseLabelProvider addListener ILabelProviderListener
The code Label Provider code implementation of this code I Base Label Provider code method does nothing Subclasses may extend public void dispose  LabelProvider IBaseLabelProvider
final I Label Provider Listener l I Label Provider Listener listeners i Platform run new Safe Runnable public void run l label Provider Changed event  ILabelProviderListener ILabelProviderListener SafeRunnable labelProviderChanged
Fires a label provider changed event to all registered listeners Only listeners registered at the time this method is called are notified param event a label provider changed event see I Label Provider Listener label Provider Changed protected void fire Label Provider Changed final Label Provider Changed Event event Object listeners this listeners get Listeners for int i 0 i listeners length i final I Label Provider Listener l I Label Provider Listener listeners i Platform run new Safe Runnable public void run l label Provider Changed event  ILabelProviderListener labelProviderChanged fireLabelProviderChanged LabelProviderChangedEvent getListeners ILabelProviderListener ILabelProviderListener SafeRunnable labelProviderChanged
The code Label Provider code implementation of this code I Label Provider code method returns code null code Subclasses may override public Image get Image Object element return null  LabelProvider ILabelProvider getImage
The code Label Provider code implementation of this code I Label Provider code method returns the element s code to String code string Subclasses may override public String get Text Object element return element null element to String NON NLS 1  LabelProvider ILabelProvider toString getText toString
The code Label Provider code implementation of this code I Base Label Provider code method returns code true code Subclasses may override public boolean is Label Property Object element String property return true  LabelProvider IBaseLabelProvider isLabelProperty
Method declared on I Base Label Provider public void remove Listener I Label Provider Listener listener listeners remove listener  IBaseLabelProvider removeListener ILabelProviderListener

Creates a new event for the given source indicating that all labels provided by the source are no longer valid and should be updated param source the label provider public Label Provider Changed Event I Base Label Provider source super source  LabelProviderChangedEvent IBaseLabelProvider
Creates a new event for the given source indicating that the label provided by the source for the given elements is no longer valid and should be updated param source the label provider param elements the element whose labels have changed public Label Provider Changed Event I Base Label Provider source Object elements super source this elements elements  LabelProviderChangedEvent IBaseLabelProvider
Creates a new event for the given source indicating that the label provided by the source for the given element is no longer valid and should be updated param source the label provider param element the element whose label needs to be updated public Label Provider Changed Event I Base Label Provider source Object element super source this elements new Object 1 this elements 0 element  LabelProviderChangedEvent IBaseLabelProvider
Returns the first element whose label needs to be updated or code null code if all labels need to be updated return the element whose label needs to be updated or code null code public Object get Element if this elements null this elements length 0 return null else return this elements 0  getElement
Returns the elements whose labels need to be updated or code null code if all labels need to be updated return the element whose labels need to be updated or code null code public Object get Elements if this elements null return null else return this elements  getElements

Creates a list viewer on a newly created list control under the given parent The list control is created using the SWT style bits code MULTI H SCROLL V SCROLL code and code BORDER code The viewer has no input no content provider a default label provider no sorter and no filters param parent the parent control public List Viewer Composite parent this parent SWT MULTI SWT H SCROLL SWT V SCROLL SWT BORDER  H_SCROLL V_SCROLL ListViewer H_SCROLL V_SCROLL
Creates a list viewer on a newly created list control under the given parent The list control is created using the given SWT style bits The viewer has no input no content provider a default label provider no sorter and no filters param parent the parent control param style the SWT style bits public List Viewer Composite parent int style this new org eclipse swt widgets List parent style  ListViewer
Creates a list viewer on the given list control The viewer has no input no content provider a default label provider no sorter and no filters param list the list control public List Viewer org eclipse swt widgets List list this list list hook Control list  ListViewer hookControl
Method declared on Viewer public Control get Control return list  getControl
Returns this list viewer s list control return the list control public org eclipse swt widgets List get List return list  getList
public void reveal Object element Assert is Not Null element int index get Element Index element if index 1 return algorithm patterned after List show Selection int count list get Item Count if count 0 return int height list get Item Height Rectangle rect list get Client Area int top Index list get Top Index int visible Count Math max rect x rect height height 1 int bottom Index Math min top Index visible Count 1 count 1 if top Index index index bottom Index return int new Top Math min Math max index visible Count 2 0 count 1 list set Top Index new Top  isNotNull getElementIndex showSelection getItemCount getItemHeight getClientArea topIndex getTopIndex visibleCount bottomIndex topIndex visibleCount topIndex bottomIndex newTop visibleCount setTopIndex newTop
see org eclipse jface viewers Abstract List Viewer list Add java lang String int protected void list Add String string int index list add string index  AbstractListViewer listAdd listAdd
see org eclipse jface viewers Abstract List Viewer list Set Item int java lang String protected void list Set Item int index String string list set Item index string  AbstractListViewer listSetItem listSetItem setItem
see org eclipse jface viewers Abstract List Viewer list Get Selection Indices protected int list Get Selection Indices return list get Selection Indices  AbstractListViewer listGetSelectionIndices listGetSelectionIndices getSelectionIndices
see org eclipse jface viewers Abstract List Viewer list Get Item Count protected int list Get Item Count return list get Item Count  AbstractListViewer listGetItemCount listGetItemCount getItemCount
see org eclipse jface viewers Abstract List Viewer list Set Items java lang String protected void list Set Items String labels list set Items labels  AbstractListViewer listSetItems listSetItems setItems
see org eclipse jface viewers Abstract List Viewer list Remove All protected void list Remove All list remove All  AbstractListViewer listRemoveAll listRemoveAll removeAll
see org eclipse jface viewers Abstract List Viewer list Remove int protected void list Remove int index list remove index  AbstractListViewer listRemove listRemove
see org eclipse jface viewers Abstract List Viewer list Select And Show int protected void list Set Selection int ixs list set Selection ixs  AbstractListViewer listSelectAndShow listSetSelection setSelection
see org eclipse jface viewers Abstract List Viewer list Deselect All protected void list Deselect All list deselect All  AbstractListViewer listDeselectAll listDeselectAll deselectAll
see org eclipse jface viewers Abstract List Viewer list Show Selection protected void list Show Selection list show Selection  AbstractListViewer listShowSelection listShowSelection showSelection

protected I Selection selection Creates a new event for the given source and selection param source the viewer param selection the selection public Open Event Viewer source I Selection selection super source Assert is Not Null selection this selection selection  ISelection OpenEvent ISelection isNotNull
Returns the selection return the selection public I Selection get Selection return selection  ISelection getSelection
Returns the viewer that is the source of this event return the originating viewer public Viewer get Viewer return Viewer get Source  getViewer getSource

protected I Selection selection Creates a new event for the given source and selection param source the selection provider param selection the selection public Selection Changed Event I Selection Provider source I Selection selection super source Assert is Not Null selection this selection selection  ISelection SelectionChangedEvent ISelectionProvider ISelection isNotNull
Returns the selection return the selection public I Selection get Selection return selection  ISelection getSelection
Returns the selection provider that is the source of this event return the originating selection provider public I Selection Provider get Selection Provider return I Selection Provider get Source  ISelectionProvider getSelectionProvider ISelectionProvider getSource

public static final Structured Selection EMPTY new Structured Selection Creates a new empty selection See also the static field code EMPTY code which contains an empty selection singleton see EMPTY public Structured Selection  StructuredSelection StructuredSelection StructuredSelection
Creates a structured selection from the given elements param elements an array of elements public Structured Selection Object elements this elements new Object elements length System arraycopy elements 0 this elements 0 elements length  StructuredSelection
Creates a structured selection containing a single object The object must not be code null code param element the element public Structured Selection Object element Assert is Not Null element elements new Object element  StructuredSelection isNotNull
Creates a structured selection from the given code List code public Structured Selection List elements Assert is Not Null elements this elements elements to Array  StructuredSelection isNotNull toArray
Returns whether this structured selection is equal to the given object Two structured selections are equal iff they contain the same elements in the same order param o the other object return code true code if they are equal and code false code otherwise public boolean equals Object o if this o return true null and other classes if o instanceof Structured Selection return false Structured Selection s2 Structured Selection o either or both empty if is Empty return s2 is Empty if s2 is Empty return false size int my Len elements length if my Len s2 elements length return false element comparison for int i 0 i my Len i if elements i equals s2 elements i return false return true  StructuredSelection StructuredSelection StructuredSelection isEmpty isEmpty isEmpty myLen myLen myLen
Method declared in I Structured Selection public Object get First Element return is Empty null elements 0  IStructuredSelection getFirstElement isEmpty
Method declared in I Selection public boolean is Empty return elements null elements length 0  ISelection isEmpty
Method declared in I Structured Selection public Iterator iterator return Arrays as List elements null new Object 0 elements iterator  IStructuredSelection asList
Method declared in I Structured Selection public int size return elements null 0 elements length  IStructuredSelection
Method declared in I Structured Selection public Object to Array return elements null new Object 0 Object elements clone  IStructuredSelection toArray
Method declared in I Structured Selection public List to List return Arrays as List elements null new Object 0 elements  IStructuredSelection toList asList
Internal method which returns a string representation of this selection suitable for debug purposes only return debug string public String to String return is Empty J Face Resources get String empty selection to List to String NON NLS 1  toString isEmpty JFaceResources getString empty_selection toList toString

private boolean full Map Update Item Safe Runnable Widget widget Object element boolean full Map this widget widget this element element this full Map full Map  fullMap UpdateItemSafeRunnable fullMap fullMap fullMap
this full Map full Map public void run do Update Item widget element full Map  fullMap fullMap doUpdateItem fullMap
Creates a structured element viewer The viewer has no input no content provider a default label provider no sorter and no filters protected Structured Viewer do nothing  StructuredViewer
Adds a listener for double clicks in this viewer Has no effect if an identical listener is already registered param listener a double click listener public void add Double Click Listener I Double Click Listener listener double Click Listeners add listener  addDoubleClickListener IDoubleClickListener doubleClickListeners
Adds a listener for selection open in this viewer Has no effect if an identical listener is already registered param listener a double click listener public void add Open Listener I Open Listener listener open Listeners add listener  addOpenListener IOpenListener openListeners
non Javadoc Method declared on I Post Selection Provider public void add Post Selection Changed Listener I Selection Changed Listener listener post Selection Changed Listeners add listener  IPostSelectionProvider addPostSelectionChangedListener ISelectionChangedListener postSelectionChangedListeners
Adds support for dragging items out of this viewer via a user drag and drop operation param operations a bitwise OR of the supported drag and drop operation types code DROP COPY code code DROP LINK code and code DROP MOVE code param transfer Types the transfer types that are supported by the drag operation param listener the callback that will be invoked to set the drag data and to cleanup after the drag and drop operation finishes see org eclipse swt dnd DND public void add Drag Support int operations Transfer transfer Types Drag Source Listener listener Control my Control get Control final Drag Source drag Source new Drag Source my Control operations drag Source set Transfer transfer Types drag Source add Drag Listener listener  DROP_COPY DROP_LINK DROP_MOVE transferTypes addDragSupport transferTypes DragSourceListener myControl getControl DragSource dragSource DragSource myControl dragSource setTransfer transferTypes dragSource addDragListener
Adds support for dropping items into this viewer via a user drag and drop operation param operations a bitwise OR of the supported drag and drop operation types code DROP COPY code code DROP LINK code and code DROP MOVE code param transfer Types the transfer types that are supported by the drop operation param listener the callback that will be invoked after the drag and drop operation finishes see org eclipse swt dnd DND public void add Drop Support int operations Transfer transfer Types final Drop Target Listener listener Control control get Control Drop Target drop Target new Drop Target control operations drop Target set Transfer transfer Types drop Target add Drop Listener listener  DROP_COPY DROP_LINK DROP_MOVE transferTypes addDropSupport transferTypes DropTargetListener getControl DropTarget dropTarget DropTarget dropTarget setTransfer transferTypes dropTarget addDropListener
Adds the given filter to this viewer and triggers refiltering and resorting of the elements param filter a viewer filter public void add Filter Viewer Filter filter if filters null filters new Array List filters add filter refresh  addFilter ViewerFilter ArrayList
Asserts that the given array of elements is itself non code null code and contains no code null code elements param elements the array to check protected void assert Elements Not Null Object elements Assert is Not Null elements for int i 0 n elements length i n i Assert is Not Null elements i  assertElementsNotNull isNotNull isNotNull
Associates the given element with the given widget Sets the given item s data to be the element and maps the element to the item in the element map if enabled param element the element param item the widget protected void associate Object element Item item Object data item get Data if data element if data null disassociate item item set Data element Always map the element even if data element since unmap All Elements can leave the map inconsistent See bug 2741 for details map Element element item  getData setData unmapAllElements mapElement
Disassociates the given SWT item from its corresponding element Sets the item s data to code null code and removes the element from the element map if enabled param item the widget protected void disassociate Item item Object element item get Data Assert is Not Null element Clear the map before we clear the data unmap Element element item item set Data null  getData isNotNull unmapElement setData
Returns the widget in this viewer s control which represents the given element if it is the viewer s input p This method is internal to the framework subclassers should not call this method p param element return the corresponding widget or code null code if none 
protected abstract Widget do Find Input Item Object element Returns the widget in this viewer s control which represent the given element This method searchs all the children of the input element p This method is internal to the framework subclassers should not call this method p param element return the corresponding widget or code null code if none  doFindInputItem
protected abstract Widget do Find Item Object element Copies the attributes of the given element into the given SWT item The element map is updated according to the value of code full Map code If code full Map code is code true code then the current mapping from element to widgets is removed and the new mapping is added If fullmap is code false code then only the new map gets installed Installing only the new map is necessary in cases where only the order of elements changes but not the set of elements p This method is internal to the framework subclassers should not call this method p param item param element element param full Map code true code if mappings are added and removed and code false code if only the new map gets installed protected abstract void do Update Item Widget item Object element  doFindItem fullMap fullMap fullMap doUpdateItem
Compares two elements for equality Uses the element comparer if one has been set otherwise uses the default code equals code method on the elements themselves param elementA the first element param elementB the second element return whether elementA is equal to elementB protected boolean equals Object elementA Object elementB if comparer null return elementA null elementB null elementA equals elementB else return elementA null elementB null comparer equals elementA elementB 
Returns the result of running the given elements through the filters param elements the elements to filter return only the elements which all filters accept protected Object filter Object elements if filters null Array List filtered new Array List elements length Object root get Root for int i 0 i elements length i boolean add true for int j 0 j filters size j add Viewer Filter filters get j select this root elements i if add break if add filtered add elements i return filtered to Array return elements  ArrayList ArrayList getRoot ViewerFilter toArray
Finds the widget which represents the given element p The default implementation of this method tries first to find the widget for the given element assuming that it is the viewer s input this is done by calling code do Find Input Item code If it is not found there it is looked up in the internal element map provided that this feature has been enabled If the element map is disabled the widget is found via code do Find Input Item code p param element the element return the corresponding widget or code null code if none protected final Widget find Item Object element Widget result do Find Input Item element if result null return result if we have an element map use it otherwise search for the item if element Map null return Widget element Map get element return do Find Item element  doFindInputItem doFindInputItem findItem doFindInputItem elementMap elementMap doFindItem
final I Double Click Listener l I Double Click Listener listeners i Platform run new Safe Runnable public void run l double Click event  IDoubleClickListener IDoubleClickListener SafeRunnable doubleClick
Notifies any double click listeners that a double click has been received Only listeners registered at the time this method is called are notified param event a double click event see I Double Click Listener double Click protected void fire Double Click final Double Click Event event Object listeners double Click Listeners get Listeners for int i 0 i listeners length i final I Double Click Listener l I Double Click Listener listeners i Platform run new Safe Runnable public void run l double Click event  IDoubleClickListener doubleClick fireDoubleClick DoubleClickEvent doubleClickListeners getListeners IDoubleClickListener IDoubleClickListener SafeRunnable doubleClick
final I Open Listener l I Open Listener listeners i Platform run new Safe Runnable public void run l open event  IOpenListener IOpenListener SafeRunnable
Notifies any open event listeners that a open event has been received Only listeners registered at the time this method is called are notified param event a double click event see I Open Listener open Open Event protected void fire Open final Open Event event Object listeners open Listeners get Listeners for int i 0 i listeners length i final I Open Listener l I Open Listener listeners i Platform run new Safe Runnable public void run l open event  IOpenListener OpenEvent fireOpen OpenEvent openListeners getListeners IOpenListener IOpenListener SafeRunnable
final I Selection Changed Listener l I Selection Changed Listener listeners i Platform run new Safe Runnable public void run l selection Changed event  ISelectionChangedListener ISelectionChangedListener SafeRunnable selectionChanged
Notifies any post selection listeners that a post selection event has been received Only listeners registered at the time this method is called are notified param event a selection changed event see add Post Selection Changed Listener I Selection Changed Listener protected void fire Post Selection Changed final Selection Changed Event event Object listeners post Selection Changed Listeners get Listeners for int i 0 i listeners length i final I Selection Changed Listener l I Selection Changed Listener listeners i Platform run new Safe Runnable public void run l selection Changed event  addPostSelectionChangedListener ISelectionChangedListener firePostSelectionChanged SelectionChangedEvent postSelectionChangedListeners getListeners ISelectionChangedListener ISelectionChangedListener SafeRunnable selectionChanged
Returns the comparator to use for comparing elements or code null code if none has been set return I Element Comparer the comparator to use for comparing elements or code null code public I Element Comparer get Comparer return comparer  IElementComparer IElementComparer getComparer
Returns the filtered array of children of the given element The resulting array must not be modified as it may come directly from the model s internal state param parent the parent element return a filtered array of child elements protected Object get Filtered Children Object parent Object result get Raw Children parent if filters null for Iterator iter filters iterator iter has Next Viewer Filter f Viewer Filter iter next result f filter this parent result return result  getFilteredChildren getRawChildren hasNext ViewerFilter ViewerFilter
Returns this viewer s filters return an array of viewer filters public Viewer Filter get Filters if filters null return new Viewer Filter 0 Viewer Filter result new Viewer Filter filters size filters to Array result return result  ViewerFilter getFilters ViewerFilter ViewerFilter ViewerFilter toArray
Returns the item at the given display relative coordinates or code null code if there is no item at that location p The default implementation of this method returns code null code p param x horizontal coordinate param y vertical coordinate return the item or code null code if there is no item at the given coordinates protected Item get Item int x int y return null  getItem
Returns the children of the given parent without sorting and filtering them The resulting array must not be modified as it may come directly from the model s internal state p Returns an empty array if the given parent is code null code p param parent the parent element return the child elements protected Object get Raw Children Object parent Object result null if parent null I Structured Content Provider cp I Structured Content Provider get Content Provider if cp null result cp get Elements parent assert Elements Not Null result return result null result new Object 0  getRawChildren IStructuredContentProvider IStructuredContentProvider getContentProvider getElements assertElementsNotNull
Returns the root element p The default implementation of this framework method forwards to code get Input code Override if the root element is different from the viewer s input element p return the root element or code null code if none protected Object get Root return get Input  getInput getRoot getInput
The code Structured Viewer code implementation of this method returns the result as an code I Structured Selection code p Subclasses do not typically override this method but implement code get Selection From Widget List code instead p return I Selection public I Selection get Selection Control control get Control if control null control is Disposed return Structured Selection EMPTY List list get Selection From Widget return new Structured Selection list  StructuredViewer IStructuredSelection getSelectionFromWidget ISelection ISelection getSelection getControl isDisposed StructuredSelection getSelectionFromWidget StructuredSelection
Retrieves the selection as a code List code from the underlying widget return the list of selected elements 
protected abstract List get Selection From Widget Returns the sorted and filtered set of children of the given element The resulting array must not be modified as it may come directly from the model s internal state param parent the parent element return a sorted and filtered array of child elements protected Object get Sorted Children Object parent Object result get Filtered Children parent if sorter null be sure we re not modifying the original array from the model result Object result clone sorter sort this result return result  getSelectionFromWidget getSortedChildren getFilteredChildren
Returns this viewer s sorter or code null code if it does not have one return a viewer sorter or code null code if none public Viewer Sorter get Sorter return sorter  ViewerSorter getSorter
Handles a double click select event from the widget p This method is internal to the framework subclassers should not call this method p param event the SWT selection event protected void handle Double Select Selection Event event handle case where an earlier selection listener disposed the control Control control get Control if control null control is Disposed I Selection selection get Selection update Selection selection fire Double Click new Double Click Event this selection  handleDoubleSelect SelectionEvent getControl isDisposed ISelection getSelection updateSelection fireDoubleClick DoubleClickEvent
Handles an open event from the Open Strategy p This method is internal to the framework subclassers should not call this method p param event the SWT selection event protected void handle Open Selection Event event Control control get Control if control null control is Disposed I Selection selection get Selection fire Open new Open Event this selection  OpenStrategy handleOpen SelectionEvent getControl isDisposed ISelection getSelection fireOpen OpenEvent
Handles an invalid selection p This framework method is called if a model change picked up by a viewer results in an invalid selection For instance if an element contained in the selection has been removed from the viewer the viewer is free to either remove the element from the selection or to pick another element as its new selection The default implementation of this method calls code update Selection code Subclasses may override it to implement a different strategy for picking a new selection when the old selection becomes invalid p param invalid Selection the selection before the viewer was updated param new Selection the selection after the update or code null code if none protected void handle Invalid Selection I Selection invalid Selection I Selection new Selection update Selection new Selection Selection Changed Event event new Selection Changed Event this new Selection fire Post Selection Changed event  updateSelection invalidSelection newSelection handleInvalidSelection ISelection invalidSelection ISelection newSelection updateSelection newSelection SelectionChangedEvent SelectionChangedEvent newSelection firePostSelectionChanged
The code Structured Viewer code implementation of this code Content Viewer code method calls code update code if the event specifies that the label of a given element has changed otherwise it calls super Subclasses may reimplement or extend p param event the event that generated this update protected void handle Label Provider Changed Label Provider Changed Event event Object elements event get Elements if elements null update elements null else super handle Label Provider Changed event  StructuredViewer ContentViewer handleLabelProviderChanged LabelProviderChangedEvent getElements handleLabelProviderChanged
Handles a select event from the widget p This method is internal to the framework subclassers should not call this method p param event the SWT selection event protected void handle Select Selection Event event handle case where an earlier selection listener disposed the control Control control get Control if control null control is Disposed update Selection get Selection  handleSelect SelectionEvent getControl isDisposed updateSelection getSelection
Handles a post select event from the widget p This method is internal to the framework subclassers should not call this method p param e the SWT selection event protected void handle Post Select Selection Event e Selection Changed Event event new Selection Changed Event this get Selection fire Post Selection Changed event  handlePostSelect SelectionEvent SelectionChangedEvent SelectionChangedEvent getSelection firePostSelectionChanged
Open Strategy handler new Open Strategy control handler add Selection Listener new Selection Listener public void widget Selected Selection Event e handle Select e  OpenStrategy OpenStrategy addSelectionListener SelectionListener widgetSelected SelectionEvent handleSelect
handle Select e public void widget Default Selected Selection Event e handle Double Select e  handleSelect widgetDefaultSelected SelectionEvent handleDoubleSelect
handler add Post Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Post Select e  addPostSelectionListener SelectionAdapter widgetSelected SelectionEvent handlePostSelect
handler add Open Listener new I Open Event Listener public void handle Open Selection Event e Structured Viewer this handle Open e  addOpenListener IOpenEventListener handleOpen SelectionEvent StructuredViewer handleOpen
protected void hook Control Control control super hook Control control Open Strategy handler new Open Strategy control handler add Selection Listener new Selection Listener public void widget Selected Selection Event e handle Select e public void widget Default Selected Selection Event e handle Double Select e handler add Post Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Post Select e handler add Open Listener new I Open Event Listener public void handle Open Selection Event e Structured Viewer this handle Open e  hookControl hookControl OpenStrategy OpenStrategy addSelectionListener SelectionListener widgetSelected SelectionEvent handleSelect widgetDefaultSelected SelectionEvent handleDoubleSelect addPostSelectionListener SelectionAdapter widgetSelected SelectionEvent handlePostSelect addOpenListener IOpenEventListener handleOpen SelectionEvent StructuredViewer handleOpen
Returns whether this viewer has any filters return boolean protected boolean has Filters return filters null filters size 0  hasFilters
Refreshes this viewer starting at the given element param element the element 
Refreshes this viewer starting at the given element Labels are updated as described in code refresh boolean update Labels code p The default implementation simply calls code internal Refresh element code ignoring code update Labels code p If this method is overridden to do the actual refresh then code internal Refresh Object element code should simply call code internal Refresh element true code param element the element param update Labels code true code to update labels for existing elements code false code to only update labels as needed assuming that labels for existing elements are unchanged since 2 0 protected void internal Refresh Object element boolean update Labels internal Refresh element  updateLabels internalRefresh updateLabels internalRefresh internalRefresh updateLabels internalRefresh updateLabels internalRefresh
Adds the element item pair to the element map p This method is internal to the framework subclassers should not call this method p param element the element param item the corresponding widget protected void map Element Object element Widget item if element Map null element Map put element item  mapElement elementMap elementMap
Determines whether a change to the given property of the given element would require refiltering and or resorting p This method is internal to the framework subclassers should not call this method p param element the element param property the property return code true code if refiltering is required and code false code otherwise protected boolean needs Refilter Object element String property if sorter null sorter is Sorter Property element property return true if filters null for int i 0 n filters size i n i Viewer Filter filter Viewer Filter filters get i if filter is Filter Property element property return true return false  needsRefilter isSorterProperty ViewerFilter ViewerFilter isFilterProperty
Returns a new hashtable using the given capacity and this viewer s element comparer param capacity the initial capacity of the hashtable return a new hashtable since 3 0 Custom Hashtable new Hashtable int capacity return new Custom Hashtable capacity get Comparer  CustomHashtable newHashtable CustomHashtable getComparer
Attempts to preserves the current selection across a run of the given code p The default implementation of this method ul li discovers the old selection via code get Selection code li li runs the given runnable li li attempts to restore the old selection using code set Selection To Widget code li li rediscovers the resulting selection via code get Selection code li li calls code handle Invalid Selection code if the selection did not take li li calls code post Update Hook code li ul p param update Code the code to run protected void preserving Selection Runnable update Code I Selection old Selection null try preserve selection old Selection get Selection in Change restore Selection true perform the update update Code run finally in Change false restore selection if restore Selection set Selection To Widget old Selection false send out notification if old and new differ I Selection new Selection get Selection if new Selection equals old Selection handle Invalid Selection old Selection new Selection  getSelection setSelectionToWidget getSelection handleInvalidSelection postUpdateHook updateCode preservingSelection updateCode ISelection oldSelection oldSelection getSelection inChange restoreSelection updateCode inChange restoreSelection setSelectionToWidget oldSelection ISelection newSelection getSelection newSelection oldSelection handleInvalidSelection oldSelection newSelection
Non Javadoc Method declared on Viewer public void refresh refresh get Root  getRoot
Refreshes this viewer with information freshly obtained from this viewer s model If code update Labels code is code true code then labels for otherwise unaffected elements are updated as well Otherwise it assumes labels for existing elements are unchanged and labels are only obtained as needed for example for new elements p Calling code refresh true code has the same effect as code refresh code p Note that the implementation may still obtain labels for existing elements even if code update Labels code is false The intent is simply to allow optimization where possible param update Labels code true code to update labels for existing elements code false code to only update labels as needed assuming that labels for existing elements are unchanged since 2 0 public void refresh boolean update Labels refresh get Root update Labels  updateLabels updateLabels updateLabels updateLabels getRoot updateLabels
public void refresh final Object element preserving Selection new Runnable public void run internal Refresh element  preservingSelection internalRefresh
Refreshes this viewer starting with the given element p Unlike the code update code methods this handles structural changes to the given element e g addition or removal of children If only the given element needs updating it is more efficient to use the code update code methods p param element the element public void refresh final Object element preserving Selection new Runnable public void run internal Refresh element  preservingSelection internalRefresh
public void refresh final Object element final boolean update Labels preserving Selection new Runnable public void run internal Refresh element update Labels  updateLabels preservingSelection internalRefresh updateLabels
Refreshes this viewer starting with the given element Labels are updated as described in code refresh boolean update Labels code p Unlike the code update code methods this handles structural changes to the given element e g addition or removal of children If only the given element needs updating it is more efficient to use the code update code methods p param element the element param update Labels code true code to update labels for existing elements code false code to only update labels as needed assuming that labels for existing elements are unchanged since 2 0 public void refresh final Object element final boolean update Labels preserving Selection new Runnable public void run internal Refresh element update Labels  updateLabels updateLabels updateLabels preservingSelection internalRefresh updateLabels
Refreshes the given Table Item with the given element Calls code do Update Item false code p This method is internal to the framework subclassers should not call this method p param widget param element protected final void refresh Item Widget widget Object element Platform run new Update Item Safe Runnable widget element true  TableItem doUpdateItem refreshItem UpdateItemSafeRunnable
Removes the given open listener from this viewer Has no affect if an identical listener is not registered param listener a double click listener public void remove Open Listener I Open Listener listener open Listeners remove listener  removeOpenListener IOpenListener openListeners
non Javadoc Method declared on I Post Selection Provider public void remove Post Selection Changed Listener I Selection Changed Listener listener post Selection Changed Listeners remove listener  IPostSelectionProvider removePostSelectionChangedListener ISelectionChangedListener postSelectionChangedListeners
Removes the given double click listener from this viewer Has no affect if an identical listener is not registered param listener a double click listener public void remove Double Click Listener I Double Click Listener listener double Click Listeners remove listener  removeDoubleClickListener IDoubleClickListener doubleClickListeners
Removes the given filter from this viewer and triggers refiltering and resorting of the elements if required Has no effect if the identical filter is not registered param filter a viewer filter public void remove Filter Viewer Filter filter Assert is Not Null filter if filters null Note can t use List remove Object Use identity comparison instead for Iterator i filters iterator i has Next Object o i next if o filter i remove refresh if filters size 0 filters null return  removeFilter ViewerFilter isNotNull hasNext
Discards this viewer s filters and triggers refiltering and resorting of the elements public void reset Filters if filters null filters null refresh  resetFilters
Ensures that the given element is visible scrolling the viewer if necessary The selection is unchanged param element the element to reveal 
see org eclipse jface viewers Content Viewer set Content Provider org eclipse jface viewers I Content Provider public void set Content Provider I Content Provider provider Assert is True provider instanceof I Structured Content Provider super set Content Provider provider  ContentViewer setContentProvider IContentProvider setContentProvider IContentProvider isTrue IStructuredContentProvider setContentProvider
public final void set Input Object input try f In Change true unmap All Elements super set Input input finally f In Change false  setInput fInChange unmapAllElements setInput fInChange
public void set Selection I Selection selection boolean reveal p If the new selection differs from the current selection the hook code update Selection code is called p p If code set Selection code is called from within code preserve Selection code the call to code update Selection code is delayed until the end of code preserve Selection code p p Subclasses do not typically override this method but implement code set Selection To Widget code instead p Control control get Control if control null control is Disposed return if in Change set Selection To Widget selection reveal I Selection sel get Selection update Selection sel fire Post Selection Changed new Selection Changed Event this sel else restore Selection false set Selection To Widget selection reveal  setSelection ISelection updateSelection setSelection preserveSelection updateSelection preserveSelection setSelectionToWidget getControl isDisposed inChange setSelectionToWidget ISelection getSelection updateSelection firePostSelectionChanged SelectionChangedEvent restoreSelection setSelectionToWidget
Parlays the given list of selected elements into selections on this viewer s control p Subclasses should override to set their selection based on the given list of elements p param l list of selected elements element type code Object code or code null code if the selection is to be cleared param reveal code true code if the selection is to be made visible and code false code otherwise 
protected abstract void set Selection To Widget List l boolean reveal Converts the selection to a code List code and calls code set Selection To Widget List boolean code The selection is expected to be an code I Structured Selection code of elements If not the selection is cleared p Subclasses do not typically override this method but implement code set Selection To Widget List boolean code instead param selection an I Structured Selection of elements param reveal code true code to reveal the first element in the selection or code false code otherwise protected void set Selection To Widget I Selection selection boolean reveal if selection instanceof I Structured Selection set Selection To Widget I Structured Selection selection to List reveal else set Selection To Widget List null reveal  setSelectionToWidget setSelectionToWidget IStructuredSelection setSelectionToWidget IStructuredSelection setSelectionToWidget ISelection IStructuredSelection setSelectionToWidget IStructuredSelection toList setSelectionToWidget
Sets this viewer s sorter and triggers refiltering and resorting of this viewer s element Passing code null code turns sorting off param sorter a viewer sorter or code null code if none public void set Sorter Viewer Sorter sorter if this sorter sorter this sorter sorter refresh  setSorter ViewerSorter
Configures whether this structured viewer uses an internal hash table to speeds up the mapping between elements and SWT items This must be called before the viewer is given an input via code set Input code param enable code true code to enable hash lookup and code false code to disable it public void set Use Hashlookup boolean enable Assert is True get Input null Can only enable the hash look up before input has been set NON NLS 1 if enable element Map new Hashtable Custom Hashtable DEFAULT CAPACITY else element Map null  setInput setUseHashlookup isTrue getInput elementMap newHashtable CustomHashtable DEFAULT_CAPACITY elementMap
Sets the comparator to use for comparing elements or code null code to use the default code equals code and code hash Code code methods on the elements themselves param comparer the comparator to use for comparing elements or code null code public void set Comparer I Element Comparer comparer this comparer comparer if element Map null element Map new Custom Hashtable element Map comparer  hashCode setComparer IElementComparer elementMap elementMap CustomHashtable elementMap
Hook for testing param element return Widget public Widget test Find Item Object element return find Item element  testFindItem findItem
Removes all elements from the map p This method is internal to the framework subclassers should not call this method p protected void unmap All Elements if element Map null element Map new Hashtable Custom Hashtable DEFAULT CAPACITY  unmapAllElements elementMap elementMap newHashtable CustomHashtable DEFAULT_CAPACITY
Removes the given element from the internal element to widget map Does nothing if mapping is disabled If mapping is enabled the given element must be present p This method is internal to the framework subclassers should not call this method p param element the element protected void unmap Element Object element if element Map null element Map remove element  unmapElement elementMap elementMap
Removes the given association from the internal element to widget map Does nothing if mapping is disabled or if the given element does not map to the given item p This method is internal to the framework subclassers should not call this method p param element the element param item the item to unmap since 2 0 protected void unmap Element Object element Widget item double check that the element actually maps to the given item before unmapping it if element Map null element Map get element item call unmap Element for backwards compatibility unmap Element element  unmapElement elementMap elementMap unmapElement unmapElement
Updates the given elements presentation when one or more of their properties change Only the given elements are updated p This does not handle structural changes e g addition or removal of elements and does not update any other related elements e g child elements To handle structural changes use the code refresh code methods instead p p This should be called when an element has changed in the model in order to have the viewer accurately reflect the model This method only affects the viewer not the model p p Specifying which properties are affected may allow the viewer to optimize the update For example if the label provider is not affected by changes to any of these properties an update may not actually be required Specifing code properties code as code null code forces a full update of the given elements p p If the viewer has a sorter which is affected by a change to one of the properties the elements positions are updated to maintain the sort order p p If the viewer has a filter which is affected by a change to one of the properties elements may appear or disappear if the change affects whether or not they are filtered out p param elements the elements param properties the properties that have changed or code null code to indicate unknown public void update Object elements String properties for int i 0 i elements length i update elements i properties 
Updates the given element s presentation when one or more of its properties changes Only the given element is updated p This does not handle structural changes e g addition or removal of elements and does not update any other related elements e g child elements To handle structural changes use the code refresh code methods instead p p This should be called when an element has changed in the model in order to have the viewer accurately reflect the model This method only affects the viewer not the model p p Specifying which properties are affected may allow the viewer to optimize the update For example if the label provider is not affected by changes to any of these properties an update may not actually be required Specifing code properties code as code null code forces a full update of the element p p If the viewer has a sorter which is affected by a change to one of the properties the element s position is updated to maintain the sort order p p If the viewer has a filter which is affected by a change to one of the properties the element may appear or disappear if the change affects whether or not the element is filtered out p param element the element param properties the properties that have changed or code null code to indicate unknown public void update Object element String properties Assert is Not Null element Widget item find Item element if item null return boolean needs Refilter false if properties null for int i 0 i properties length i needs Refilter needs Refilter element properties i if needs Refilter break if needs Refilter refresh return boolean needs Update if properties null needs Update true else needs Update false I Base Label Provider label Provider get Label Provider for int i 0 i properties length i needs Update label Provider is Label Property element properties i if needs Update break if needs Update update Item item element  isNotNull findItem needsRefilter needsRefilter needsRefilter needsRefilter needsRefilter needsUpdate needsUpdate needsUpdate IBaseLabelProvider labelProvider getLabelProvider needsUpdate labelProvider isLabelProperty needsUpdate needsUpdate updateItem
Copies attributes of the given element into the given widget p This method is internal to the framework subclassers should not call this method Calls code do Update Item widget element true code p param widget the widget param element the element protected final void update Item Widget widget Object element Platform run new Update Item Safe Runnable widget element true  doUpdateItem updateItem UpdateItemSafeRunnable
Updates the selection of this viewer p This framework method should be called when the selection in the viewer widget changes p p The default implementation of this method notifies all selection change listeners recorded in an internal state variable Overriding this method is generally not required however if overriding in a subclass code super update Selection code must be invoked p param selection the selection or code null code if none protected void update Selection I Selection selection Selection Changed Event event new Selection Changed Event this selection fire Selection Changed event  updateSelection updateSelection ISelection SelectionChangedEvent SelectionChangedEvent fireSelectionChanged
Returns whether this structured viewer is configured to use an internal map to speed up the mapping between elements and SWT items p The default implementation of this framework method checks whether the internal map has been initialized p return code true code if the element map is enabled and code false code if disabled protected boolean using Element Map return element Map null  usingElementMap elementMap

private boolean first Time true Creates a new table layout public Table Layout  firstTime 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 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 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 int pixels Column Pixel Data col width 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 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

class Table Tree Viewer Impl extends Table Viewer Impl public Table Tree Viewer Impl Table Tree Viewer viewer super viewer  TableTreeViewerImpl TableViewerImpl TableTreeViewerImpl TableTreeViewer
super viewer Rectangle get Bounds Item item int column Number return Table Tree Item item get Bounds column Number  getBounds columnNumber TableTreeItem getBounds columnNumber
return Table Tree Item item get Bounds column Number int get Column Count get Column Count should be a API in Table Tree return get Table Tree get Table get Column Count  TableTreeItem getBounds columnNumber getColumnCount getColumnCount TableTree getTableTree getTable getColumnCount
return get Table Tree get Table get Column Count Item get Selection return get Table Tree get Selection  getTableTree getTable getColumnCount getSelection getTableTree getSelection
return get Table Tree get Selection void set Editor Control w Item item int column Number table Tree Editor set Editor w Table Tree Item item column Number  getTableTree getSelection setEditor columnNumber tableTreeEditor setEditor TableTreeItem columnNumber
table Tree Editor set Editor w Table Tree Item item column Number void set Selection Structured Selection selection boolean b Table Tree Viewer this set Selection selection b  tableTreeEditor setEditor TableTreeItem columnNumber setSelection StructuredSelection TableTreeViewer setSelection
Table Tree Viewer this set Selection selection b void show Selection get Table Tree show Selection  TableTreeViewer setSelection showSelection getTableTree showSelection
void set Layout Data Cell Editor Layout Data layout Data table Tree Editor horizontal Alignment layout Data horizontal Alignment table Tree Editor grab Horizontal layout Data grab Horizontal table Tree Editor minimum Width layout Data minimum Width  setLayoutData CellEditor LayoutData layoutData tableTreeEditor horizontalAlignment layoutData horizontalAlignment tableTreeEditor grabHorizontal layoutData grabHorizontal tableTreeEditor minimumWidth layoutData minimumWidth
void handle Double Click Event Viewer viewer get Viewer fire Double Click new Double Click Event viewer viewer get Selection fire Open new Open Event viewer viewer get Selection  handleDoubleClickEvent getViewer fireDoubleClick DoubleClickEvent getSelection fireOpen OpenEvent getSelection
Creates a table tree viewer on the given table tree control The viewer has no input no content provider a default label provider no sorter and no filters param tree the table tree control public Table Tree Viewer Table Tree tree super table Tree tree hook Control tree table Tree Editor new Table Tree Editor table Tree table Viewer Impl new Table Tree Viewer Impl this  TableTreeViewer TableTree tableTree hookControl tableTreeEditor TableTreeEditor tableTree tableViewerImpl TableTreeViewerImpl
Creates a table tree viewer on a newly created table tree control under the given parent The table tree control is created using the SWT style bits code MULTI H SCROLL V SCROLL and BORDER code The viewer has no input no content provider a default label provider no sorter and no filters param parent the parent control public Table Tree Viewer Composite parent this parent SWT MULTI SWT H SCROLL SWT V SCROLL SWT BORDER  H_SCROLL V_SCROLL TableTreeViewer H_SCROLL V_SCROLL
Creates a table tree viewer on a newly created table tree control under the given parent The table tree control is created using the given SWT style bits The viewer has no input no content provider a default label provider no sorter and no filters param parent the parent control param style the SWT style bits public Table Tree Viewer Composite parent int style this new Table Tree parent style  TableTreeViewer TableTree
Method declared on Abstract Tree Viewer protected void add Tree Listener Control c Tree Listener listener Table Tree c add Tree Listener listener  AbstractTreeViewer addTreeListener TreeListener TableTree addTreeListener
Cancels a currently active cell editor All changes already done in the cell editor are lost public void cancel Editing table Viewer Impl cancel Editing  cancelEditing tableViewerImpl cancelEditing
protected void do Update Item Item item Object element update icon and label Similar code in Table Tree Viewer do Update Item I Base Label Provider prov get Label Provider I Table Label Provider tprov null I Label Provider lprov null if prov instanceof I Table Label Provider tprov I Table Label Provider prov else lprov I Label Provider prov int column Count table Tree get Table get Column Count Table Tree Item ti Table Tree Item item Also enter loop if no columns added See 1G9WWGZ JFUIF WINNT Table Viewer with 0 columns does not work for int column 0 column column Count column 0 column String text NON NLS 1 Image image null if tprov null text tprov get Column Text element column image tprov get Column Image element column else if column 0 text lprov get Text element image lprov get Image element ti set Text column text Apparently a problem to set Image to null if already null if ti get Image column image ti set Image column image if prov instanceof I Color Provider I Color Provider cprov I Color Provider prov ti set Foreground cprov get Foreground element ti set Background cprov get Background element if prov instanceof I Font Provider I Font Provider fprov I Font Provider prov ti set Font fprov get Font element  doUpdateItem TableTreeViewer doUpdateItem IBaseLabelProvider getLabelProvider ITableLabelProvider ILabelProvider ITableLabelProvider ITableLabelProvider ILabelProvider columnCount tableTree getTable getColumnCount TableTreeItem TableTreeItem TableViewer columnCount getColumnText getColumnImage getText getImage setText setImage getImage setImage IColorProvider IColorProvider IColorProvider setForeground getForeground setBackground getBackground IFontProvider IFontProvider IFontProvider setFont getFont
Starts editing the given element param element the element param column the column number public void edit Element Object element int column table Viewer Impl edit Element element column  editElement tableViewerImpl editElement
Returns the cell editors of this viewer return the list of cell editors public Cell Editor get Cell Editors return table Viewer Impl get Cell Editors  CellEditor getCellEditors tableViewerImpl getCellEditors
Returns the cell modifier of this viewer return the cell modifier public I Cell Modifier get Cell Modifier return table Viewer Impl get Cell Modifier  ICellModifier getCellModifier tableViewerImpl getCellModifier
protected Item get Children Widget o if o instanceof Table Tree Item return Table Tree Item o get Items if o instanceof Table Tree return Table Tree o get Items return null  getChildren TableTreeItem TableTreeItem getItems TableTree TableTree getItems
Returns the column properties of this viewer The properties must correspond with the columns of the table control They are used to identify the column in a cell modifier return the list of column properties public Object get Column Properties return table Viewer Impl get Column Properties  getColumnProperties tableViewerImpl getColumnProperties
Method declared on Viewer public Control get Control return table Tree  getControl tableTree
Returns the element with the given index from this viewer Returns code null code if the index is out of range p This method is internal to the framework p param index the zero based index return the element at the given index or code null code if the index is out of range public Object get Element At int index XXX Workaround for 1GBCSB1 SWT WIN2000 Table Tree should have get Item int index Table Tree Item i table Tree get Items index if i null return i get Data return null  getElementAt TableTree getItem TableTreeItem tableTree getItems getData
Method declared on Abstract Tree Viewer protected boolean get Expanded Item item return Table Tree Item item get Expanded  AbstractTreeViewer getExpanded TableTreeItem getExpanded
Method declared on Structured Viewer protected Item get Item int x int y XXX Workaround for 1GBCSHG SWT WIN2000 Table Tree should have get Item Point point return get Table Tree get Table get Item get Table Tree to Control new Point x y  StructuredViewer getItem TableTree getItem getTableTree getTable getItem getTableTree toControl
Method declared on Abstract Tree Viewer protected int get Item Count Control widget return Table Tree widget get Item Count  AbstractTreeViewer getItemCount TableTree getItemCount
Method declared on Abstract Tree Viewer protected int get Item Count Item item return Table Tree Item item get Item Count  AbstractTreeViewer getItemCount TableTreeItem getItemCount
Method declared on Abstract Tree Viewer protected org eclipse swt widgets Item get Items org eclipse swt widgets Item item return Table Tree Item item get Items  AbstractTreeViewer getItems TableTreeItem getItems
The table tree viewer implementation of this code Viewer code framework method returns the label provider which in the case of table tree viewers will be an instance of either code I Table Label Provider code or code I Label Provider code If it is an code I Table Label Provider code then it provides a separate label text and image for each column If it is an code I Label Provider code then it provides only the label text and image for the first column and any remaining columns are blank public I Base Label Provider get Label Provider return super get Label Provider  ITableLabelProvider ILabelProvider ITableLabelProvider ILabelProvider IBaseLabelProvider getLabelProvider getLabelProvider
Method declared on Abstract Tree Viewer protected Item get Parent Item Item item return Table Tree Item item get Parent Item  AbstractTreeViewer getParentItem TableTreeItem getParentItem
Method declared on Abstract Tree Viewer protected Item get Selection Control widget return Table Tree widget get Selection  AbstractTreeViewer getSelection TableTree getSelection
Returns this table tree viewer s table tree control return the table tree control public Table Tree get Table Tree return table Tree  TableTree getTableTree tableTree
table Tree get Table add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e If user clicked on the or do not activate Cell Editor XXX This code should not be here SWT should either have support to see if the user clicked on the or manage the table editor activation org eclipse swt widgets Table Item items table Tree get Table get Items for int i 0 i items length i Rectangle rect items i get Image Bounds 0 if rect contains e x e y return table Viewer Impl handle Mouse Down e  tableTree getTable addMouseListener MouseAdapter mouseDown MouseEvent CellEditor TableItem tableTree getTable getItems getImageBounds tableViewerImpl handleMouseDown
protected void hook Control Control control super hook Control control table Tree get Table add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e If user clicked on the or do not activate Cell Editor XXX This code should not be here SWT should either have support to see if the user clicked on the or manage the table editor activation org eclipse swt widgets Table Item items table Tree get Table get Items for int i 0 i items length i Rectangle rect items i get Image Bounds 0 if rect contains e x e y return table Viewer Impl handle Mouse Down e  hookControl hookControl tableTree getTable addMouseListener MouseAdapter mouseDown MouseEvent CellEditor TableItem tableTree getTable getItems getImageBounds tableViewerImpl handleMouseDown
Returns whether there is an active cell editor return code true code if there is an active cell editor and code false code otherwise public boolean is Cell Editor Active return table Viewer Impl is Cell Editor Active  isCellEditorActive tableViewerImpl isCellEditorActive
protected Item new Item Widget parent int flags int ix Table Tree Item item if ix 0 if parent instanceof Table Tree Item item new Table Tree Item Table Tree Item parent flags ix else item new Table Tree Item Table Tree parent flags ix else if parent instanceof Table Tree Item item new Table Tree Item Table Tree Item parent flags else item new Table Tree Item Table Tree parent flags return item  newItem TableTreeItem TableTreeItem TableTreeItem TableTreeItem TableTreeItem TableTree TableTreeItem TableTreeItem TableTreeItem TableTreeItem TableTree
Method declared in Abstract Tree Viewer protected void remove All Control widget Table Tree widget remove All  AbstractTreeViewer removeAll TableTree removeAll
Sets the cell editors of this table viewer param editors the list of cell editors public void set Cell Editors Cell Editor editors table Viewer Impl set Cell Editors editors  setCellEditors CellEditor tableViewerImpl setCellEditors
Sets the cell modifier of this table viewer param modifier the cell modifier public void set Cell Modifier I Cell Modifier modifier table Viewer Impl set Cell Modifier modifier  setCellModifier ICellModifier tableViewerImpl setCellModifier
Sets the column properties of this table viewer The properties must correspond with the columns of the table control They are used to identify the column in a cell modifier param column Properties the list of column properties public void set Column Properties String column Properties table Viewer Impl set Column Properties column Properties  columnProperties setColumnProperties columnProperties tableViewerImpl setColumnProperties columnProperties
Method declared in Abstract Tree Viewer protected void set Expanded Item node boolean expand Table Tree Item node set Expanded expand  AbstractTreeViewer setExpanded TableTreeItem setExpanded
The table tree viewer implementation of this code Viewer code framework method ensures that the given label provider is an instance of either code I Table Label Provider code or code I Label Provider code If it is an code I Table Label Provider code then it provides a separate label text and image for each column If it is an code I Label Provider code then it provides only the label text and image for the first column and any remaining columns are blank public void set Label Provider I Base Label Provider label Provider Assert is True label Provider instanceof I Table Label Provider label Provider instanceof I Label Provider super set Label Provider label Provider  ITableLabelProvider ILabelProvider ITableLabelProvider ILabelProvider setLabelProvider IBaseLabelProvider labelProvider isTrue labelProvider ITableLabelProvider labelProvider ILabelProvider setLabelProvider labelProvider
protected void set Selection List items Table Tree Item new Items new Table Tree Item items size items to Array new Items get Table Tree set Selection new Items  setSelection TableTreeItem newItems TableTreeItem toArray newItems getTableTree setSelection newItems
Method declared in Abstract Tree Viewer protected void show Item Item item get Table Tree show Item Table Tree Item item  AbstractTreeViewer showItem getTableTree showItem TableTreeItem

private Table Editor table Editor Creates a table viewer on a newly created table control under the given parent The table control is created using the SWT style bits code MULTI H SCROLL V SCROLL code and code BORDER code The viewer has no input no content provider a default label provider no sorter and no filters The table has no columns param parent the parent control public Table Viewer Composite parent this parent SWT MULTI SWT H SCROLL SWT V SCROLL SWT BORDER  TableEditor tableEditor H_SCROLL V_SCROLL TableViewer H_SCROLL V_SCROLL
Creates a table viewer on a newly created table control under the given parent The table control is created using the given style bits The viewer has no input no content provider a default label provider no sorter and no filters The table has no columns param parent the parent control param style SWT style bits public Table Viewer Composite parent int style this new Table parent style  TableViewer
Creates a table viewer on the given table control The viewer has no input no content provider a default label provider no sorter and no filters param table the table control public Table Viewer Table table this table table hook Control table table Editor new Table Editor table init Table Viewer Impl  TableViewer hookControl tableEditor TableEditor initTableViewerImpl
Adds the given elements to this table viewer If this viewer does not have a sorter the elements are added at the end in the order given otherwise the elements are inserted at appropriate positions p This method should be called by the content provider when elements have been added to the model in order to cause the viewer to accurately reflect the model This method only affects the viewer not the model p param elements the elements to add public void add Object elements assert Elements Not Null elements Object filtered filter elements for int i 0 i filtered length i Object element filtered i int index index For Element element update Item new Table Item get Table SWT NONE index element  assertElementsNotNull indexForElement updateItem TableItem getTable
Adds the given element to this table viewer If this viewer does not have a sorter the element is added at the end otherwise the element is inserted at the appropriate position p This method should be called by the content provider when a single element has been added to the model in order to cause the viewer to accurately reflect the model This method only affects the viewer not the model Note that there is another method for efficiently processing the simultaneous addition of multiple elements p param element the element to add public void add Object element add new Object element 
Cancels a currently active cell editor All changes already done in the cell editor are lost public void cancel Editing table Viewer Impl cancel Editing  cancelEditing tableViewerImpl cancelEditing
protected Widget do Find Input Item Object element if equals element get Root return get Table return null  doFindInputItem getRoot getTable
protected Widget do Find Item Object element Table Item children table get Items for int i 0 i children length i Table Item item children i Object data item get Data if data null equals data element return item return null  doFindItem TableItem getItems TableItem getData
protected void do Update Item Widget widget Object element boolean full Map if widget instanceof Table Item final Table Item item Table Item widget remember element we are showing if full Map associate element item else item set Data element map Element element item I Base Label Provider prov get Label Provider I Table Label Provider tprov null I Label Provider lprov null if prov instanceof I Table Label Provider tprov I Table Label Provider prov else lprov I Label Provider prov int column Count table get Column Count Table Item ti item Also enter loop if no columns added See 1G9WWGZ JFUIF WINNT Table Viewer with 0 columns does not work for int column 0 column column Count column 0 column Similar code in Table Tree Viewer do Update Item String text NON NLS 1 Image image null if tprov null text tprov get Column Text element column image tprov get Column Image element column else if column 0 if lprov instanceof I Viewer Label Provider I Viewer Label Provider item Provider I Viewer Label Provider lprov Viewer Label update Label new Viewer Label item get Text item get Image item Provider update Label update Label element text update Label get Text image update Label get Image else text lprov get Text element image lprov get Image element ti set Text column text if ti get Image column image ti set Image column image if prov instanceof I Color Provider I Color Provider cprov I Color Provider prov ti set Foreground cprov get Foreground element ti set Background cprov get Background element if prov instanceof I Font Provider I Font Provider fprov I Font Provider prov ti set Font fprov get Font element  doUpdateItem fullMap TableItem TableItem TableItem fullMap setData mapElement IBaseLabelProvider getLabelProvider ITableLabelProvider ILabelProvider ITableLabelProvider ITableLabelProvider ILabelProvider columnCount getColumnCount TableItem TableViewer columnCount TableTreeViewer doUpdateItem getColumnText getColumnImage IViewerLabelProvider IViewerLabelProvider itemProvider IViewerLabelProvider ViewerLabel updateLabel ViewerLabel getText getImage itemProvider updateLabel updateLabel updateLabel getText updateLabel getImage getText getImage setText getImage setImage IColorProvider IColorProvider IColorProvider setForeground getForeground setBackground getBackground IFontProvider IFontProvider IFontProvider setFont getFont
Starts editing the given element param element the element param column the column number public void edit Element Object element int column table Viewer Impl edit Element element column  editElement tableViewerImpl editElement
Returns the cell editors of this table viewer return the list of cell editors public Cell Editor get Cell Editors return table Viewer Impl get Cell Editors  CellEditor getCellEditors tableViewerImpl getCellEditors
Returns the cell modifier of this table viewer return the cell modifier public I Cell Modifier get Cell Modifier return table Viewer Impl get Cell Modifier  ICellModifier getCellModifier tableViewerImpl getCellModifier
Returns the column properties of this table viewer The properties must correspond with the columns of the table control They are used to identify the column in a cell modifier return the list of column properties public Object get Column Properties return table Viewer Impl get Column Properties  getColumnProperties tableViewerImpl getColumnProperties
Method declared on Viewer public Control get Control return table  getControl
Returns the element with the given index from this table viewer Returns code null code if the index is out of range p This method is internal to the framework p param index the zero based index return the element at the given index or code null code if the index is out of range public Object get Element At int index if index 0 index table get Item Count Table Item i table get Item index if i null return i get Data return null  getElementAt getItemCount TableItem getItem getData
The table viewer implementation of this code Viewer code framework method returns the label provider which in the case of table viewers will be an instance of either code I Table Label Provider code or code I Label Provider code If it is an code I Table Label Provider code then it provides a separate label text and image for each column If it is an code I Label Provider code then it provides only the label text and image for the first column and any remaining columns are blank public I Base Label Provider get Label Provider return super get Label Provider  ITableLabelProvider ILabelProvider ITableLabelProvider ILabelProvider IBaseLabelProvider getLabelProvider getLabelProvider
protected List get Selection From Widget Widget items table get Selection Array List list new Array List items length for int i 0 i items length i Widget item items i Object e item get Data if e null list add e return list  getSelectionFromWidget getSelection ArrayList ArrayList getData
Returns this table viewer s table control return the table control public Table get Table return table  getTable
Table table Control Table control table Control add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e table Viewer Impl handle Mouse Down e  tableControl tableControl addMouseListener MouseAdapter mouseDown MouseEvent tableViewerImpl handleMouseDown
protected void hook Control Control control super hook Control control Table table Control Table control table Control add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e table Viewer Impl handle Mouse Down e  hookControl hookControl tableControl tableControl addMouseListener MouseAdapter mouseDown MouseEvent tableViewerImpl handleMouseDown
protected int index For Element Object element Viewer Sorter sorter get Sorter if sorter null return table get Item Count int count table get Item Count int min 0 max count 1 while min max int mid min max 2 Object data table get Item mid get Data int compare sorter compare this data element if compare 0 find first item element while compare 0 mid if mid count break data table get Item mid get Data compare sorter compare this data element return mid if compare 0 min mid 1 else max mid 1 return min  indexForElement ViewerSorter getSorter getItemCount getItemCount getItem getData getItem getData
private void init Table Viewer Impl table Viewer Impl new Table Viewer Impl this Rectangle get Bounds Item item int column Number return Table Item item get Bounds column Number  initTableViewerImpl tableViewerImpl TableViewerImpl getBounds columnNumber TableItem getBounds columnNumber
return Table Item item get Bounds column Number int get Column Count return get Table get Column Count  TableItem getBounds columnNumber getColumnCount getTable getColumnCount
return get Table get Column Count Item get Selection return get Table get Selection  getTable getColumnCount getSelection getTable getSelection
return get Table get Selection void set Editor Control w Item item int column Number table Editor set Editor w Table Item item column Number  getTable getSelection setEditor columnNumber tableEditor setEditor TableItem columnNumber
table Editor set Editor w Table Item item column Number void set Selection Structured Selection selection boolean b Table Viewer this set Selection selection b  tableEditor setEditor TableItem columnNumber setSelection StructuredSelection TableViewer setSelection
Table Viewer this set Selection selection b void show Selection get Table show Selection  TableViewer setSelection showSelection getTable showSelection
void set Layout Data Cell Editor Layout Data layout Data table Editor grab Horizontal layout Data grab Horizontal table Editor horizontal Alignment layout Data horizontal Alignment table Editor minimum Width layout Data minimum Width  setLayoutData CellEditor LayoutData layoutData tableEditor grabHorizontal layoutData grabHorizontal tableEditor horizontalAlignment layoutData horizontalAlignment tableEditor minimumWidth layoutData minimumWidth
void handle Double Click Event Viewer viewer get Viewer fire Double Click new Double Click Event viewer viewer get Selection fire Open new Open Event viewer viewer get Selection  handleDoubleClickEvent getViewer fireDoubleClick DoubleClickEvent getSelection fireOpen OpenEvent getSelection
Initializes the table viewer implementation private void init Table Viewer Impl table Viewer Impl new Table Viewer Impl this Rectangle get Bounds Item item int column Number return Table Item item get Bounds column Number int get Column Count return get Table get Column Count Item get Selection return get Table get Selection void set Editor Control w Item item int column Number table Editor set Editor w Table Item item column Number void set Selection Structured Selection selection boolean b Table Viewer this set Selection selection b void show Selection get Table show Selection void set Layout Data Cell Editor Layout Data layout Data table Editor grab Horizontal layout Data grab Horizontal table Editor horizontal Alignment layout Data horizontal Alignment table Editor minimum Width layout Data minimum Width void handle Double Click Event Viewer viewer get Viewer fire Double Click new Double Click Event viewer viewer get Selection fire Open new Open Event viewer viewer get Selection  initTableViewerImpl tableViewerImpl TableViewerImpl getBounds columnNumber TableItem getBounds columnNumber getColumnCount getTable getColumnCount getSelection getTable getSelection setEditor columnNumber tableEditor setEditor TableItem columnNumber setSelection StructuredSelection TableViewer setSelection showSelection getTable showSelection setLayoutData CellEditor LayoutData layoutData tableEditor grabHorizontal layoutData grabHorizontal tableEditor horizontalAlignment layoutData horizontalAlignment tableEditor minimumWidth layoutData minimumWidth handleDoubleClickEvent getViewer fireDoubleClick DoubleClickEvent getSelection fireOpen OpenEvent getSelection
protected void input Changed Object input Object old Input get Control set Redraw false try refresh attempts to preserve selection which we want here refresh finally get Control set Redraw true  inputChanged oldInput getControl setRedraw getControl setRedraw
Inserts the given element into this table viewer at the given position If this viewer has a sorter the position is ignored and the element is inserted at the correct position in the sort order p This method should be called by the content provider when elements have been added to the model in order to cause the viewer to accurately reflect the model This method only affects the viewer not the model p param element the element param position a 0 based position relative to the model or 1 to indicate the last position public void insert Object element int position table Viewer Impl apply Editor Value if get Sorter null has Filters add element return if position 1 position table get Item Count update Item new Table Item table SWT NONE position element  tableViewerImpl applyEditorValue getSorter hasFilters getItemCount updateItem TableItem
Method declared on Structured Viewer protected void internal Refresh Object element internal Refresh element true  StructuredViewer internalRefresh internalRefresh
protected void internal Refresh Object element boolean update Labels table Viewer Impl apply Editor Value if element null equals element get Root the parent in the code below it is important to do all disassociates before any associates since a later disassociate can undo an earlier associate e g if a b is replaced by b a the disassociate of b to item 1 could undo the associate of b to item 0 Object children get Sorted Children get Root Table Item items table get Items int min Math min children length items length for int i 0 i min i if the element is unchanged update its label if appropriate if equals children i items i get Data if update Labels update Item items i children i else associate the new element even if equal to the old one to remove stale references see bug 31314 associate children i items i else update Item does an associate which can mess up the associations if the order of elements has changed E g a b b a first replaces a 0 with b 0 then replaces b 1 with a 1 but this actually removes b 0 So if the object associated with this item has changed just disassociate it for now and update it below items i set Text NON NLS 1 items i set Image new Image 0 disassociate items i dispose of all items beyond the end of the current elements if min items length for int i items length i min disassociate items i table remove min items length 1 Workaround for 1GDGN4Q ITPUI WIN2000 Table Viewer icons get scrunched if table get Item Count 0 table remove All Update items which were removed above for int i 0 i min i if items i get Data null update Item items i children i add any remaining elements for int i min i children length i update Item new Table Item table SWT NONE i children i else Widget w find Item element if w null update Item w element  internalRefresh updateLabels tableViewerImpl applyEditorValue getRoot getSortedChildren getRoot TableItem getItems getData updateLabels updateItem updateItem setText setImage TableViewer getItemCount removeAll getData updateItem updateItem TableItem findItem updateItem
Removes the given elements from this table viewer param elements the elements to remove private void internal Remove final Object elements Object input get Input for int i 0 i elements length i if equals elements i input set Input null return use remove int rather than repeated Table Item dispose calls to allow SWT to optimize multiple removals int indices new int elements length int count 0 for int i 0 i elements length i Widget w find Item elements i if w instanceof Table Item Table Item item Table Item w disassociate item indices count table index Of item if count indices length System arraycopy indices 0 indices new int count 0 count table remove indices Workaround for 1GDGN4Q ITPUI WIN2000 Table Viewer icons get scrunched if table get Item Count 0 table remove All  internalRemove getInput setInput TableItem findItem TableItem TableItem TableItem indexOf TableViewer getItemCount removeAll
Returns whether there is an active cell editor return code true code if there is an active cell editor and code false code otherwise public boolean is Cell Editor Active return table Viewer Impl is Cell Editor Active  isCellEditorActive tableViewerImpl isCellEditorActive
assert Elements Not Null elements preserving Selection new Runnable public void run internal Remove elements  assertElementsNotNull preservingSelection internalRemove
Removes the given elements from this table viewer The selection is updated if required p This method should be called by the content provider when elements have been removed from the model in order to cause the viewer to accurately reflect the model This method only affects the viewer not the model p param elements the elements to remove public void remove final Object elements assert Elements Not Null elements preserving Selection new Runnable public void run internal Remove elements  assertElementsNotNull preservingSelection internalRemove
Removes the given element from this table viewer The selection is updated if necessary p This method should be called by the content provider when a single element has been removed from the model in order to cause the viewer to accurately reflect the model This method only affects the viewer not the model Note that there is another method for efficiently processing the simultaneous removal of multiple elements p param element the element public void remove Object element remove new Object element 
public void reveal Object element Assert is Not Null element Widget w find Item element if w instanceof Table Item get Table show Item Table Item w  isNotNull findItem TableItem getTable showItem TableItem
Sets the cell editors of this table viewer param editors the list of cell editors public void set Cell Editors Cell Editor editors table Viewer Impl set Cell Editors editors  setCellEditors CellEditor tableViewerImpl setCellEditors
Sets the cell modifier of this table viewer param modifier the cell modifier public void set Cell Modifier I Cell Modifier modifier table Viewer Impl set Cell Modifier modifier  setCellModifier ICellModifier tableViewerImpl setCellModifier
Sets the column properties of this table viewer The properties must correspond with the columns of the table control They are used to identify the column in a cell modifier param column Properties the list of column properties public void set Column Properties String column Properties table Viewer Impl set Column Properties column Properties  columnProperties setColumnProperties columnProperties tableViewerImpl setColumnProperties columnProperties
The table viewer implementation of this code Viewer code framework method ensures that the given label provider is an instance of either code I Table Label Provider code or code I Label Provider code If it is an code I Table Label Provider code then it provides a separate label text and image for each column If it is an code I Label Provider code then it provides only the label text and image for the first column and any remaining columns are blank public void set Label Provider I Base Label Provider label Provider Assert is True label Provider instanceof I Table Label Provider label Provider instanceof I Label Provider super set Label Provider label Provider  ITableLabelProvider ILabelProvider ITableLabelProvider ILabelProvider setLabelProvider IBaseLabelProvider labelProvider isTrue labelProvider ITableLabelProvider labelProvider ILabelProvider setLabelProvider labelProvider
protected void set Selection To Widget List list boolean reveal if list null table deselect All return int size list size Table Item items new Table Item size Table Item first Item null int count 0 for int i 0 i size i Object o list get i Widget w find Item o if w instanceof Table Item Table Item item Table Item w items count item if first Item null first Item item if count size System arraycopy items 0 items new Table Item count 0 count table set Selection items if reveal first Item null table show Item first Item  setSelectionToWidget deselectAll TableItem TableItem TableItem firstItem findItem TableItem TableItem TableItem firstItem firstItem TableItem setSelection firstItem showItem firstItem

Table Viewer Impl Structured Viewer viewer this viewer viewer init Cell Editor Listener  TableViewerImpl StructuredViewer initCellEditorListener
Returns this code Table Viewer Impl code viewer return the viewer public Structured Viewer get Viewer return viewer  TableViewerImpl StructuredViewer getViewer
if focus Listener null focus Listener new Focus Adapter public void focus Lost Focus Event e apply Editor Value  focusListener focusListener FocusAdapter focusLost FocusEvent applyEditorValue
mouse Listener new Mouse Adapter public void mouse Down Mouse Event e time wrap check for expiration of double Click Time if e time double Click Expiration Time control remove Mouse Listener mouse Listener cancel Editing handle Double Click Event else if mouse Listener null control remove Mouse Listener mouse Listener  mouseListener MouseAdapter mouseDown MouseEvent doubleClickTime doubleClickExpirationTime removeMouseListener mouseListener cancelEditing handleDoubleClickEvent mouseListener removeMouseListener mouseListener
private void activate Cell Editor if cell Editors null if cell Editors column Number null cell Modifier null Object element table Item get Data String property column Properties column Number if cell Modifier can Modify element property cell Editor cell Editors column Number table show Selection cell Editor add Listener cell Editor Listener Object value cell Modifier get Value element property cell Editor set Value value Tricky flow of control here activate can trigger callback to cell Editor Listener which will clear cell Editor so must get control first but must still call activate even if there is no control final Control control cell Editor get Control cell Editor activate if control null return set Layout Data cell Editor get Layout Data set Editor control table Item column Number cell Editor set Focus if focus Listener null focus Listener new Focus Adapter public void focus Lost Focus Event e apply Editor Value control add Focus Listener focus Listener mouse Listener new Mouse Adapter public void mouse Down Mouse Event e time wrap check for expiration of double Click Time if e time double Click Expiration Time control remove Mouse Listener mouse Listener cancel Editing handle Double Click Event else if mouse Listener null control remove Mouse Listener mouse Listener control add Mouse Listener mouse Listener  activateCellEditor cellEditors cellEditors columnNumber cellModifier tableItem getData columnProperties columnNumber cellModifier canModify cellEditor cellEditors columnNumber showSelection cellEditor addListener cellEditorListener cellModifier getValue cellEditor setValue cellEditorListener cellEditor cellEditor getControl cellEditor setLayoutData cellEditor getLayoutData setEditor tableItem columnNumber cellEditor setFocus focusListener focusListener FocusAdapter focusLost FocusEvent applyEditorValue addFocusListener focusListener mouseListener MouseAdapter mouseDown MouseEvent doubleClickTime doubleClickExpirationTime removeMouseListener mouseListener cancelEditing handleDoubleClickEvent mouseListener removeMouseListener mouseListener addMouseListener mouseListener
Activate a cell editor for the given mouse position private void activate Cell Editor Mouse Event event if table Item null table Item is Disposed item no longer exists return int column To Edit int columns get Column Count if columns 0 If no Table Column Table acts as if it has a single column which takes the whole width column To Edit 0 else column To Edit 1 for int i 0 i columns i Rectangle bounds get Bounds table Item i if bounds contains event x event y column To Edit i break if column To Edit 1 return column Number column To Edit activate Cell Editor  activateCellEditor MouseEvent tableItem tableItem isDisposed columnToEdit getColumnCount TableColumn columnToEdit columnToEdit getBounds tableItem columnToEdit columnToEdit columnNumber columnToEdit activateCellEditor
Deactivates the currently active cell editor public void apply Editor Value Cell Editor c this cell Editor if c null null out cell editor before calling save in case save results in apply Editor Value being re entered see 1GAHI8Z ITPUI ALL How to code event notification when using cell editor this cell Editor null Item t this table Item don t null out table item same item is still selected if t null t is Disposed save Editor Value c t set Editor null null 0 c remove Listener cell Editor Listener Control control c get Control if control null if mouse Listener null control remove Mouse Listener mouse Listener if focus Listener null control remove Focus Listener focus Listener c deactivate  applyEditorValue CellEditor cellEditor applyEditorValue cellEditor tableItem isDisposed saveEditorValue setEditor removeListener cellEditorListener getControl mouseListener removeMouseListener mouseListener focusListener removeFocusListener focusListener
Cancels the active cell editor without saving the value back to the domain model public void cancel Editing if cell Editor null set Editor null null 0 cell Editor remove Listener cell Editor Listener Cell Editor old Editor cell Editor cell Editor null old Editor deactivate  cancelEditing cellEditor setEditor cellEditor removeListener cellEditorListener CellEditor oldEditor cellEditor cellEditor oldEditor
Start editing the given element public void edit Element Object element int column if cell Editor null apply Editor Value set Selection new Structured Selection element true Item selection get Selection if selection length 1 return table Item selection 0 Make sure selection is visible show Selection column Number column activate Cell Editor  editElement cellEditor applyEditorValue setSelection StructuredSelection getSelection tableItem showSelection columnNumber activateCellEditor
abstract Rectangle get Bounds Item item int column Number  getBounds columnNumber
abstract Rectangle get Bounds Item item int column Number public Cell Editor get Cell Editors return cell Editors  getBounds columnNumber CellEditor getCellEditors cellEditors
return cell Editors public I Cell Modifier get Cell Modifier return cell Modifier  cellEditors ICellModifier getCellModifier cellModifier
return cell Modifier abstract int get Column Count  cellModifier getColumnCount
abstract int get Column Count public Object get Column Properties return column Properties  getColumnCount getColumnProperties columnProperties
return column Properties abstract Item get Selection  columnProperties getSelection
abstract Item get Selection Handles the mouse down event activates the cell editor public void handle Mouse Down Mouse Event event if event button 1 return if cell Editor null apply Editor Value activate the cell editor immediately If a second mouse Down is received prior to the expiration of the double Click time then the cell editor will be deactivated and a double Click event will be processed double Click Expiration Time event time Display get Current get Double Click Time Item items get Selection Do not edit if more than one row is selected if items length 1 table Item null return table Item items 0 activate Cell Editor event  getSelection handleMouseDown MouseEvent cellEditor applyEditorValue mouseDown doubleClick doubleClick doubleClickExpirationTime getCurrent getDoubleClickTime getSelection tableItem tableItem activateCellEditor
private void init Cell Editor Listener cell Editor Listener new I Cell Editor Listener public void editor Value Changed boolean old Valid State boolean new Valid State Ignore  initCellEditorListener cellEditorListener ICellEditorListener editorValueChanged oldValidState newValidState
public void cancel Editor Table Viewer Impl this cancel Editing  cancelEditor TableViewerImpl cancelEditing
public void apply Editor Value Table Viewer Impl this apply Editor Value  applyEditorValue TableViewerImpl applyEditorValue
private void init Cell Editor Listener cell Editor Listener new I Cell Editor Listener public void editor Value Changed boolean old Valid State boolean new Valid State Ignore public void cancel Editor Table Viewer Impl this cancel Editing public void apply Editor Value Table Viewer Impl this apply Editor Value  initCellEditorListener cellEditorListener ICellEditorListener editorValueChanged oldValidState newValidState cancelEditor TableViewerImpl cancelEditing applyEditorValue TableViewerImpl applyEditorValue
Returns code true code if there is an active cell editor otherwise code false code is returned public boolean is Cell Editor Active return cell Editor null  isCellEditorActive cellEditor
Saves the value of the currently active cell editor by delegating to the cell modifier private void save Editor Value Cell Editor cell Editor Item table Item if cell Modifier null if cell Editor is Value Valid Do what String property null if column Properties null column Number column Properties length property column Properties column Number cell Modifier modify table Item property cell Editor get Value  saveEditorValue CellEditor cellEditor tableItem cellModifier cellEditor isValueValid columnProperties columnNumber columnProperties columnProperties columnNumber cellModifier tableItem cellEditor getValue
public void set Cell Editors Cell Editor editors this cell Editors editors  setCellEditors CellEditor cellEditors
this cell Editors editors public void set Cell Modifier I Cell Modifier modifier this cell Modifier modifier  cellEditors setCellModifier ICellModifier cellModifier
this cell Modifier modifier public void set Column Properties String column Properties this column Properties column Properties  cellModifier setColumnProperties columnProperties columnProperties columnProperties
this column Properties column Properties abstract void set Editor Control w Item item int f Column Number  columnProperties columnProperties setEditor fColumnNumber
abstract void set Editor Control w Item item int f Column Number abstract void set Layout Data Cell Editor Layout Data layout Data  setEditor fColumnNumber setLayoutData CellEditor LayoutData layoutData
abstract void set Editor Control w Item item int f Column Number abstract void set Layout Data Cell Editor Layout Data layout Data abstract void set Selection Structured Selection selection boolean b  setEditor fColumnNumber setLayoutData CellEditor LayoutData layoutData setSelection StructuredSelection
abstract void set Layout Data Cell Editor Layout Data layout Data abstract void set Selection Structured Selection selection boolean b abstract void show Selection  setLayoutData CellEditor LayoutData layoutData setSelection StructuredSelection showSelection
abstract void set Selection Structured Selection selection boolean b abstract void show Selection abstract void handle Double Click Event  setSelection StructuredSelection showSelection handleDoubleClickEvent

Creates a new text string cell editor with no control The cell editor value is the string itself which is initially the empty string Initially the cell editor has no cell validator since 2 1 public Text Cell Editor set Style default Style  TextCellEditor setStyle defaultStyle
Creates a new text string cell editor parented under the given control The cell editor value is the string itself which is initially the empty string Initially the cell editor has no cell validator param parent the parent control public Text Cell Editor Composite parent this parent default Style  TextCellEditor defaultStyle
Creates a new text string cell editor parented under the given control The cell editor value is the string itself which is initially the empty string Initially the cell editor has no cell validator param parent the parent control param style the style bits since 2 1 public Text Cell Editor Composite parent int style super parent style  TextCellEditor
Checks to see if the deleteable state can delete nothing to delete has changed and if so fire an enablement changed notification private void check Deleteable boolean old Is Deleteable is Deleteable is Deleteable is Delete Enabled if old Is Deleteable is Deleteable fire Enablement Changed DELETE  checkDeleteable oldIsDeleteable isDeleteable isDeleteable isDeleteEnabled oldIsDeleteable isDeleteable fireEnablementChanged
Checks to see if the selectable state can select has changed and if so fire an enablement changed notification private void check Selectable boolean old Is Selectable is Selectable is Selectable is Select All Enabled if old Is Selectable is Selectable fire Enablement Changed SELECT ALL  checkSelectable oldIsSelectable isSelectable isSelectable isSelectAllEnabled oldIsSelectable isSelectable fireEnablementChanged SELECT_ALL
Checks to see if the selection state selection no selection has changed and if so fire an enablement changed notification private void check Selection boolean old Is Selection is Selection is Selection text get Selection Count 0 if old Is Selection is Selection fire Enablement Changed COPY fire Enablement Changed CUT  checkSelection oldIsSelection isSelection isSelection getSelectionCount oldIsSelection isSelection fireEnablementChanged fireEnablementChanged
text new Text parent get Style text add Selection Listener new Selection Adapter public void widget Default Selected Selection Event e handle Default Selection e  getStyle addSelectionListener SelectionAdapter widgetDefaultSelected SelectionEvent handleDefaultSelection
hook key pressed see PR 14201 public void key Pressed Key Event e key Release Occured e as a result of processing the above call clients may have disposed this cell editor if get Control null get Control is Disposed return check Selection see explaination below check Deleteable check Selectable  keyPressed KeyEvent keyReleaseOccured getControl getControl isDisposed checkSelection checkDeleteable checkSelectable
text add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE e detail SWT TRAVERSE RETURN e doit false  addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE TRAVERSE_RETURN
text add Mouse Listener new Mouse Adapter public void mouse Up Mouse Event e check Selection check Deleteable check Selectable  addMouseListener MouseAdapter mouseUp MouseEvent checkSelection checkDeleteable checkSelectable
text add Focus Listener new Focus Adapter public void focus Lost Focus Event e Text Cell Editor this focus Lost  addFocusListener FocusAdapter focusLost FocusEvent TextCellEditor focusLost
protected Control create Control Composite parent text new Text parent get Style text add Selection Listener new Selection Adapter public void widget Default Selected Selection Event e handle Default Selection e text add Key Listener new Key Adapter hook key pressed see PR 14201 public void key Pressed Key Event e key Release Occured e as a result of processing the above call clients may have disposed this cell editor if get Control null get Control is Disposed return check Selection see explaination below check Deleteable check Selectable text add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE e detail SWT TRAVERSE RETURN e doit false We really want a selection listener but it is not supported so we use a key listener and a mouse listener to know when selection changes may have occured text add Mouse Listener new Mouse Adapter public void mouse Up Mouse Event e check Selection check Deleteable check Selectable text add Focus Listener new Focus Adapter public void focus Lost Focus Event e Text Cell Editor this focus Lost text set Font parent get Font text set Background parent get Background text set Text NON NLS 1 text add Modify Listener get Modify Listener return text  createControl getStyle addSelectionListener SelectionAdapter widgetDefaultSelected SelectionEvent handleDefaultSelection addKeyListener KeyAdapter keyPressed KeyEvent keyReleaseOccured getControl getControl isDisposed checkSelection checkDeleteable checkSelectable addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE TRAVERSE_RETURN addMouseListener MouseAdapter mouseUp MouseEvent checkSelection checkDeleteable checkSelectable addFocusListener FocusAdapter focusLost FocusEvent TextCellEditor focusLost setFont getFont setBackground getBackground setText addModifyListener getModifyListener
The code Text Cell Editor code implementation of this code Cell Editor code framework method returns the text string return the text string protected Object do Get Value return text get Text  TextCellEditor CellEditor doGetValue getText
protected void do Set Focus if text null text select All text set Focus check Selection check Deleteable check Selectable  doSetFocus selectAll setFocus checkSelection checkDeleteable checkSelectable
The code Text Cell Editor code implementation of this code Cell Editor code framework method accepts a text string type code String code param value a text string type code String code protected void do Set Value Object value Assert is True text null value instanceof String text remove Modify Listener get Modify Listener text set Text String value text add Modify Listener get Modify Listener  TextCellEditor CellEditor doSetValue isTrue removeModifyListener getModifyListener setText addModifyListener getModifyListener
Processes a modify event that occurred in this text cell editor This framework method performs validation and sets the error message accordingly and then reports a change via code fire Editor Value Changed code Subclasses should call this method at appropriate times Subclasses may extend or reimplement param e the SWT modify event protected void edit Occured Modify Event e String value text get Text if value null value NON NLS 1 Object typed Value value boolean old Valid State is Value Valid boolean new Valid State is Correct typed Value if typed Value null new Valid State Assert is True false Validator isn t limiting the cell editor s type range NON NLS 1 if new Valid State try to insert the current value into the error message set Error Message Message Format format get Error Message new Object value value Changed old Valid State new Valid State  fireEditorValueChanged editOccured ModifyEvent getText typedValue oldValidState isValueValid newValidState isCorrect typedValue typedValue newValidState isTrue newValidState setErrorMessage MessageFormat getErrorMessage valueChanged oldValidState newValidState
Since a text editor field is scrollable we don t set a minimum Size public Layout Data get Layout Data return new Layout Data  minimumSize LayoutData getLayoutData LayoutData
if modify Listener null modify Listener new Modify Listener public void modify Text Modify Event e edit Occured e  modifyListener modifyListener ModifyListener modifyText ModifyEvent editOccured
Return the modify listener private Modify Listener get Modify Listener if modify Listener null modify Listener new Modify Listener public void modify Text Modify Event e edit Occured e return modify Listener  ModifyListener getModifyListener modifyListener modifyListener ModifyListener modifyText ModifyEvent editOccured modifyListener
Handles a default selection event from the text control by applying the editor value and deactivating this cell editor param event the selection event since 3 0 protected void handle Default Selection Selection Event event same with enter key handling code in key Release Occured e fire Apply Editor Value deactivate  handleDefaultSelection SelectionEvent keyReleaseOccured fireApplyEditorValue
The code Text Cell Editor code implementation of this code Cell Editor code method returns code true code if the current selection is not empty public boolean is Copy Enabled if text null text is Disposed return false return text get Selection Count 0  TextCellEditor CellEditor isCopyEnabled isDisposed getSelectionCount
The code Text Cell Editor code implementation of this code Cell Editor code method returns code true code if the current selection is not empty public boolean is Cut Enabled if text null text is Disposed return false return text get Selection Count 0  TextCellEditor CellEditor isCutEnabled isDisposed getSelectionCount
The code Text Cell Editor code implementation of this code Cell Editor code method returns code true code if there is a selection or if the caret is not positioned at the end of the text public boolean is Delete Enabled if text null text is Disposed return false return text get Selection Count 0 text get Caret Position text get Char Count  TextCellEditor CellEditor isDeleteEnabled isDisposed getSelectionCount getCaretPosition getCharCount
The code Text Cell Editor code implementation of this code Cell Editor code method always returns code true code public boolean is Paste Enabled if text null text is Disposed return false return true  TextCellEditor CellEditor isPasteEnabled isDisposed
The code Text Cell Editor code implementation of this code Cell Editor code method always returns code true code public boolean is Save All Enabled if text null text is Disposed return false return true  TextCellEditor CellEditor isSaveAllEnabled isDisposed
Returns code true code if this cell editor is able to perform the select all action p This default implementation always returns code false code p p Subclasses may override p return code true code if select all is possible code false code otherwise public boolean is Select All Enabled if text null text is Disposed return false return text get Char Count 0  isSelectAllEnabled isDisposed getCharCount
Processes a key release event that occurred in this cell editor p The code Text Cell Editor code implementation of this framework method ignores when the RETURN key is pressed since this is handled in code handle Default Selection code An exception is made for Ctrl Enter for multi line texts since a default selection event is not sent in this case p param key Event the key event protected void key Release Occured Key Event key Event if key Event character r Return key Enter is handled in handle Default Selection Do not apply the editor value in response to an Enter key event since this can be received from the IME when the intent is not to apply the value See bug 39074 Cell Editors DBCS canna input mode fires bogus event from Text Control An exception is made for Ctrl Enter for multi line texts since a default selection event is not sent in this case if text null text is Disposed text get Style SWT MULTI 0 if key Event state Mask SWT CTRL 0 super key Release Occured key Event return super key Release Occured key Event  TextCellEditor handleDefaultSelection keyEvent keyReleaseOccured KeyEvent keyEvent keyEvent handleDefaultSelection CellEditors isDisposed getStyle keyEvent stateMask keyReleaseOccured keyEvent keyReleaseOccured keyEvent
The code Text Cell Editor code implementation of this code Cell Editor code method copies the current selection to the clipboard public void perform Copy text copy  TextCellEditor CellEditor performCopy
The code Text Cell Editor code implementation of this code Cell Editor code method cuts the current selection to the clipboard public void perform Cut text cut check Selection check Deleteable check Selectable  TextCellEditor CellEditor performCut checkSelection checkDeleteable checkSelectable
The code Text Cell Editor code implementation of this code Cell Editor code method deletes the current selection or if there is no selection the character next character from the current position public void perform Delete if text get Selection Count 0 remove the contents of the current selection text insert NON NLS 1 else remove the next character int pos text get Caret Position if pos text get Char Count text set Selection pos pos 1 text insert NON NLS 1 check Selection check Deleteable check Selectable  TextCellEditor CellEditor performDelete getSelectionCount getCaretPosition getCharCount setSelection checkSelection checkDeleteable checkSelectable
The code Text Cell Editor code implementation of this code Cell Editor code method pastes the the clipboard contents over the current selection public void perform Paste text paste check Selection check Deleteable check Selectable  TextCellEditor CellEditor performPaste checkSelection checkDeleteable checkSelectable
The code Text Cell Editor code implementation of this code Cell Editor code method selects all of the current text public void perform Select All text select All check Selection check Deleteable  TextCellEditor CellEditor performSelectAll selectAll checkSelection checkDeleteable

private Object element Creates a new event for the given source and element param source the tree viewer param element the element public Tree Expansion Event Abstract Tree Viewer source Object element super source this element element  TreeExpansionEvent AbstractTreeViewer
Returns the element that got expanded or collapsed return the element public Object get Element return element  getElement
Returns the originator of the event return the originating tree viewer public Abstract Tree Viewer get Tree Viewer return Abstract Tree Viewer source  AbstractTreeViewer getTreeViewer AbstractTreeViewer

private Tree tree Creates a tree viewer on a newly created tree control under the given parent The tree control is created using the SWT style bits code MULTI H SCROLL V SCROLL code and code BORDER code The viewer has no input no content provider a default label provider no sorter and no filters param parent the parent control public Tree Viewer Composite parent this parent SWT MULTI SWT H SCROLL SWT V SCROLL SWT BORDER  H_SCROLL V_SCROLL TreeViewer H_SCROLL V_SCROLL
Creates a tree viewer on a newly created tree control under the given parent The tree control is created using the given SWT style bits The viewer has no input no content provider a default label provider no sorter and no filters param parent the parent control param style the SWT style bits used to create the tree public Tree Viewer Composite parent int style this new Tree parent style  TreeViewer
Creates a tree viewer on the given tree control The viewer has no input no content provider a default label provider no sorter and no filters param tree the tree control public Tree Viewer Tree tree super this tree tree hook Control tree  TreeViewer hookControl
Method declared in Abstract Tree Viewer protected void add Tree Listener Control c Tree Listener listener Tree c add Tree Listener listener  AbstractTreeViewer addTreeListener TreeListener addTreeListener
protected void do Update Item final Item item Object element if item is Disposed unmap Element element Assert is True item is Disposed Update to disposed element element to String NON NLS 1 return update icon and label I Base Label Provider base Provider get Label Provider if base Provider instanceof I Viewer Label Provider I Viewer Label Provider provider I Viewer Label Provider base Provider Viewer Label update Label new Viewer Label item get Text item get Image provider update Label update Label element if update Label has New Image item set Image update Label get Image if update Label has New Text item set Text update Label get Text else if base Provider instanceof I Label Provider I Label Provider provider I Label Provider base Provider item set Text provider get Text element Image image provider get Image element if item get Image image item set Image image if base Provider instanceof I Color Provider I Color Provider cp I Color Provider base Provider Tree Item tree Item Tree Item item tree Item set Foreground cp get Foreground element tree Item set Background cp get Background element if base Provider instanceof I Font Provider I Font Provider fprov I Font Provider base Provider Tree Item tree Item Tree Item item tree Item set Font fprov get Font element  doUpdateItem isDisposed unmapElement isTrue isDisposed toString IBaseLabelProvider baseProvider getLabelProvider baseProvider IViewerLabelProvider IViewerLabelProvider IViewerLabelProvider baseProvider ViewerLabel updateLabel ViewerLabel getText getImage updateLabel updateLabel updateLabel hasNewImage setImage updateLabel getImage updateLabel hasNewText setText updateLabel getText baseProvider ILabelProvider ILabelProvider ILabelProvider baseProvider setText getText getImage getImage setImage baseProvider IColorProvider IColorProvider IColorProvider baseProvider TreeItem treeItem TreeItem treeItem setForeground getForeground treeItem setBackground getBackground baseProvider IFontProvider IFontProvider IFontProvider baseProvider TreeItem treeItem TreeItem treeItem setFont getFont
protected Item get Children Widget o if o instanceof Tree Item return Tree Item o get Items if o instanceof Tree return Tree o get Items return null  getChildren TreeItem TreeItem getItems getItems
Method declared in Viewer public Control get Control return tree  getControl
Method declared in Abstract Tree Viewer protected boolean get Expanded Item item return Tree Item item get Expanded  AbstractTreeViewer getExpanded TreeItem getExpanded
Method declared in Structured Viewer protected Item get Item int x int y return get Tree get Item get Tree to Control new Point x y  StructuredViewer getItem getTree getItem getTree toControl
Method declared in Abstract Tree Viewer protected int get Item Count Control widget return Tree widget get Item Count  AbstractTreeViewer getItemCount getItemCount
Method declared in Abstract Tree Viewer protected int get Item Count Item item return Tree Item item get Item Count  AbstractTreeViewer getItemCount TreeItem getItemCount
Method declared in Abstract Tree Viewer protected Item get Items Item item return Tree Item item get Items  AbstractTreeViewer getItems TreeItem getItems
The tree viewer implementation of this code Viewer code framework method returns the label provider which in the case of tree viewers will be an instance of code I Label Provider code public I Base Label Provider get Label Provider return super get Label Provider  ILabelProvider IBaseLabelProvider getLabelProvider getLabelProvider
Method declared in Abstract Tree Viewer protected Item get Parent Item Item item return Tree Item item get Parent Item  AbstractTreeViewer getParentItem TreeItem getParentItem
Method declared in Abstract Tree Viewer protected Item get Selection Control widget return Tree widget get Selection  AbstractTreeViewer getSelection getSelection
Returns this tree viewer s tree control return the tree control public Tree get Tree return tree  getTree
protected Item new Item Widget parent int flags int ix Tree Item item if ix 0 if parent instanceof Tree Item item new Tree Item Tree Item parent flags ix else item new Tree Item Tree parent flags ix else if parent instanceof Tree Item item new Tree Item Tree Item parent flags else item new Tree Item Tree parent flags return item  newItem TreeItem TreeItem TreeItem TreeItem TreeItem TreeItem TreeItem TreeItem TreeItem
Method declared in Abstract Tree Viewer protected void remove All Control widget Tree widget remove All  AbstractTreeViewer removeAll removeAll
Method declared in Abstract Tree Viewer protected void set Expanded Item node boolean expand Tree Item node set Expanded expand  AbstractTreeViewer setExpanded TreeItem setExpanded
The tree viewer implementation of this code Viewer code framework method ensures that the given label provider is an instance of code I Label Provider code public void set Label Provider I Base Label Provider label Provider Assert is True label Provider instanceof I Label Provider super set Label Provider label Provider  ILabelProvider setLabelProvider IBaseLabelProvider labelProvider isTrue labelProvider ILabelProvider setLabelProvider labelProvider
protected void set Selection List items Item current get Selection get Tree Don t bother resetting the same selection if have Same Data items current return Tree Item new Items new Tree Item items size items to Array new Items get Tree set Selection new Items  setSelection getSelection getTree haveSameData TreeItem newItems TreeItem toArray newItems getTree setSelection newItems
Returns code true code if the given list and array of items refer to the same model elements Order is unimportant param items the list of items param current the array of items return code true code if the refer to the same elements code false code otherwise private boolean have Same Data List items Item current If they are not the same size then they are not equivalent int n items size if n current length return false Custom Hashtable item Set new Hashtable n 2 1 for Iterator i items iterator i has Next Item item Item i next Object element item get Data item Set put element element Go through the items of the current collection If there is a mismatch return false for int i 0 i current length i if item Set contains Key current i get Data return false return true  haveSameData CustomHashtable itemSet newHashtable hasNext getData itemSet itemSet containsKey getData
Method declared in Abstract Tree Viewer protected void show Item Item item get Tree show Item Tree Item item  AbstractTreeViewer showItem getTree showItem TreeItem

protected static final String WIDGET DATA KEY org eclipse jface viewers WIDGET DATA NON NLS 1 Creates a new viewer protected Viewer  WIDGET_DATA_KEY WIDGET_DATA
Adds a listener for help requests in this viewer Has no effect if an identical listener is already registered param listener a help listener public void add Help Listener Help Listener listener help Listeners add listener if help Hooked Control control get Control if control null control is Disposed if this help Listener null this help Listener new Help Listener public void help Requested Help Event event handle Help Request event control add Help Listener this help Listener help Hooked true  addHelpListener HelpListener helpListeners helpHooked getControl isDisposed helpListener helpListener HelpListener helpRequested HelpEvent handleHelpRequest addHelpListener helpListener helpHooked
Method declared on I Selection Provider public void add Selection Changed Listener I Selection Changed Listener listener selection Changed Listeners add listener  ISelectionProvider addSelectionChangedListener ISelectionChangedListener selectionChangedListeners
Notifies any help listeners that help has been requested Only listeners registered at the time this method is called are notified param event a help event see Help Listener help Requested org eclipse swt events Help Event protected void fire Help Requested Help Event event Object listeners help Listeners get Listeners for int i 0 i listeners length i Help Listener listeners i help Requested event  HelpListener helpRequested HelpEvent fireHelpRequested HelpEvent helpListeners getListeners HelpListener helpRequested
final I Selection Changed Listener l I Selection Changed Listener listeners i Platform run new Safe Runnable public void run l selection Changed event  ISelectionChangedListener ISelectionChangedListener SafeRunnable selectionChanged
Notifies any selection changed listeners that the viewer s selection has changed Only listeners registered at the time this method is called are notified param event a selection changed event see I Selection Changed Listener selection Changed protected void fire Selection Changed final Selection Changed Event event Object listeners selection Changed Listeners get Listeners for int i 0 i listeners length i final I Selection Changed Listener l I Selection Changed Listener listeners i Platform run new Safe Runnable public void run l selection Changed event  ISelectionChangedListener selectionChanged fireSelectionChanged SelectionChangedEvent selectionChangedListeners getListeners ISelectionChangedListener ISelectionChangedListener SafeRunnable selectionChanged
Returns the primary control associated with this viewer return the SWT control which displays this viewer s content 
public abstract Control get Control Returns the value of the property with the given name or code null code if the property is not found p The default implementation performs a linear search of an internal table Overriding this method is generally not required if the number of different keys is small If a more efficient representation of a viewer s properties is required override both code get Data code and code set Data code p param key the property name return the property value or code null code if the property is not found public Object get Data String key Assert is Not Null key if keys null return null for int i 0 i keys length i if keys i equals key return values i return null  getControl getData setData getData isNotNull
Copy down of method declared on code I Input Provider code public abstract Object get Input  IInputProvider getInput
Copy down of method declared on code I Selection Provider code public abstract I Selection get Selection  ISelectionProvider ISelection getSelection
public abstract I Selection get Selection Handles a help request from the underlying SWT control The default behavior is to fire a help request with the event s data modified to hold this viewer protected void handle Help Request Help Event event Object old Data event data event data this fire Help Requested event event data old Data  ISelection getSelection handleHelpRequest HelpEvent oldData fireHelpRequested oldData
Internal hook method called when the input to this viewer is initially set or subsequently changed p The default implementation does nothing Subclassers may override this method to do something when a viewer s input is set A typical use is populate the viewer p param input the new input of this viewer or code null code if none param old Input the old input element or code null code if there was previously no input protected void input Changed Object input Object old Input  oldInput inputChanged oldInput
Refreshes this viewer completely with information freshly obtained from this viewer s model 
public abstract void refresh Removes the given help listener from this viewer Has no affect if an identical listener is not registered param listener a help listener public void remove Help Listener Help Listener listener help Listeners remove listener if help Listeners size 0 Control control get Control if control null control is Disposed control remove Help Listener this help Listener help Hooked false  removeHelpListener HelpListener helpListeners helpListeners getControl isDisposed removeHelpListener helpListener helpHooked
Method declared on I Selection Provider public void remove Selection Changed Listener I Selection Changed Listener listener selection Changed Listeners remove listener  ISelectionProvider removeSelectionChangedListener ISelectionChangedListener selectionChangedListeners
Scrolls the viewer s control down by one item from the given display relative coordinates Returns the newly revealed Item or code null code if no scrolling occurred or if the viewer doesn t represent an item based widget param x horizontal coordinate param y vertical coordinate public Item scroll Down int x int y return null  scrollDown
Scrolls the viewer s control up by one item from the given display relative coordinates Returns the newly revealed Item or code null code if no scrolling occurred or if the viewer doesn t represent an item based widget param x horizontal coordinate param y vertical coordinate public Item scroll Up int x int y return null  scrollUp
Sets the value of the property with the given name to the given value or to code null code if the property is to be removed If this viewer has such a property its value is replaced otherwise a new property is added p The default implementation records properties in an internal table which is searched linearly Overriding this method is generally not required if the number of different keys is small If a more efficient representation of a viewer s properties is required override both code get Data code and code set Data code p param key the property name param value the property value or code null code if the property is not found public void set Data String key Object value Assert is Not Null key Remove the key value pair if value null if keys null return int index 0 while index keys length keys index equals key index if index keys length return if keys length 1 keys null values null else String new Keys new String keys length 1 Object new Values new Object values length 1 System arraycopy keys 0 new Keys 0 index System arraycopy keys index 1 new Keys index new Keys length index System arraycopy values 0 new Values 0 index System arraycopy values index 1 new Values index new Values length index keys new Keys values new Values return Add the key value pair if keys null keys new String key values new Object value return for int i 0 i keys length i if keys i equals key values i value return String new Keys new String keys length 1 Object new Values new Object values length 1 System arraycopy keys 0 new Keys 0 keys length System arraycopy values 0 new Values 0 values length new Keys keys length key new Values values length value keys new Keys values new Values  getData setData setData isNotNull newKeys newValues newKeys newKeys newKeys newValues newValues newValues newKeys newValues newKeys newValues newKeys newValues newKeys newValues newKeys newValues
Sets or clears the input for this viewer param input the input of this viewer or code null code if none 
public abstract void set Input Object input The viewer implementation of this code I Selection Provider code method make the new selection for this viewer without making it visible p This method is equivalent to code set Selection selection false code p public void set Selection I Selection selection set Selection selection false  setInput ISelectionProvider setSelection setSelection ISelection setSelection
Sets a new selection for this viewer and optionally makes it visible p Subclasses must implement this method p param selection the new selection param reveal code true code if the selection is to be made visible and code false code otherwise 

Creates a new drop adapter for the given viewer param viewer the viewer protected Viewer Drop Adapter Viewer viewer this viewer viewer  ViewerDropAdapter
Returns the position of the given event s coordinates relative to its target The position is determined to be before after or on the item based on some threshold value param event the event return one of the code LOCATION  code constants defined in this class protected int determine Location Drop Target Event event if event item instanceof Item return LOCATION NONE Item item Item event item Point coordinates new Point event x event y coordinates viewer get Control to Control coordinates if item null Rectangle bounds get Bounds item if bounds null return LOCATION NONE if coordinates y bounds y 5 return LOCATION BEFORE if bounds y bounds height coordinates y 5 return LOCATION AFTER return LOCATION ON  LOCATION_ determineLocation DropTargetEvent LOCATION_NONE getControl toControl getBounds LOCATION_NONE LOCATION_BEFORE LOCATION_AFTER LOCATION_ON
Returns the target item of the given drop event param event the event return The target of the drop may be code null code protected Object determine Target Drop Target Event event return event item null null event item get Data  determineTarget DropTargetEvent getData
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 current Target 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 currentTarget currentDataType currentOperation lastValidOperation currentOperation DROP_NONE currentOperation
if the drop should be allowed public void drag Enter Drop Target Event event current Target determine Target event do Drop Validation event  dragEnter DropTargetEvent currentTarget determineTarget doDropValidation
should still be enabled public void drag Operation Changed Drop Target Event event current Target determine Target event do Drop Validation event  dragOperationChanged DropTargetEvent currentTarget determineTarget doDropValidation
public void drag Over Drop Target Event event use newly revealed item as target if scrolling occurs Object target determine Target event set the location feedback int old Location current Location current Location determine Location event set Feedback event current Location see if anything has really changed before doing validation if target current Target current Location old Location current Target target do Drop Validation event  dragOver DropTargetEvent determineTarget oldLocation currentLocation currentLocation determineLocation setFeedback currentLocation currentTarget currentLocation oldLocation currentTarget doDropValidation
public void drop Drop Target Event event current Location determine Location event perform the drop behaviour if perform Drop event data event detail DND DROP NONE current Operation event detail  DropTargetEvent currentLocation determineLocation performDrop DROP_NONE currentOperation
public void drop Accept Drop Target Event event if validate Drop current Target event detail event current Data Type event detail DND DROP NONE  dropAccept DropTargetEvent validateDrop currentTarget currentDataType DROP_NONE
Returns the bounds of the given SWT tree or table item param item the SWT Item return the bounds or code null code if it is not a known type of item protected Rectangle get Bounds Item item if item instanceof Tree Item return Tree Item item get Bounds if item instanceof Table Item return Table Item item get Bounds 0 return null  getBounds TreeItem TreeItem getBounds TableItem TableItem getBounds
Returns a constant describing the position of the mouse relative to the target before on or after the target return one of the code LOCATION  code constants defined in this type protected int get Current Location return current Location  LOCATION_ getCurrentLocation currentLocation
Returns the current operation return a code DROP  code constant from class code DND code see DND DROP COPY see DND DROP MOVE see DND DROP LINK see DND DROP NONE protected int get Current Operation return current Operation  DROP_ DROP_COPY DROP_MOVE DROP_LINK DROP_NONE getCurrentOperation currentOperation
Returns the target object currently under the mouse return the current target object protected Object get Current Target return current Target  getCurrentTarget currentTarget
Returns whether visible insertion feedback should be presented to the user p Typical insertion feedback is the horizontal insertion bars that appear between adjacent items while dragging p return code true code if visual feedback is desired and code false code if not public boolean get Feedback Enabled return feedback Enabled  getFeedbackEnabled feedbackEnabled
Returns the object currently selected by the viewer return the selected object or code null code if either no object or multiple objects are selected protected Object get Selected Object I Selection selection viewer get Selection if selection instanceof I Structured Selection selection is Empty I Structured Selection structured I Structured Selection selection return structured get First Element return null  getSelectedObject ISelection getSelection IStructuredSelection isEmpty IStructuredSelection IStructuredSelection getFirstElement
Returns the viewer to which this drop support has been added protected Viewer get Viewer return viewer  getViewer
deprecated this method should not be used Exception handling has been removed from Drop Target Adapter methods overridden by this class Handles any exception that occurs during callback including rethrowing behavior p Issue Implementation prints stack trace and eats exception to avoid crashing VA J Consider conditionalizing the implementation to do one thing in VAJ and something more reasonable in other operating environments p param exception the exception param event the event protected void handle Exception Throwable exception Drop Target Event event Currently we never rethrow because VA Java crashes if an SWT callback throws anything Generally catching Throwable is bad but in this cases it s better than hanging the image exception print Stack Trace event detail DND DROP NONE  DropTargetAdapter handleException DropTargetEvent printStackTrace DROP_NONE
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 
private void set Feedback Drop Target Event event int location if feedback Enabled switch location case LOCATION BEFORE event feedback DND FEEDBACK INSERT BEFORE break case LOCATION AFTER event feedback DND FEEDBACK INSERT AFTER break case LOCATION ON default event feedback DND FEEDBACK SELECT break if scroll Expand Enabled event feedback DND FEEDBACK EXPAND DND FEEDBACK SCROLL  setFeedback DropTargetEvent feedbackEnabled LOCATION_BEFORE FEEDBACK_INSERT_BEFORE LOCATION_AFTER FEEDBACK_INSERT_AFTER LOCATION_ON FEEDBACK_SELECT scrollExpandEnabled FEEDBACK_EXPAND FEEDBACK_SCROLL
Sets whether visible insertion feedback should be presented to the user p Typical insertion feedback is the horizontal insertion bars that appear between adjacent items while dragging p param value code true code if visual feedback is desired and code false code if not public void set Feedback Enabled boolean value feedback Enabled value  setFeedbackEnabled feedbackEnabled
Sets whether auto scrolling and expanding should be provided during dragging param value code true code if scrolling and expanding is desired and code false code if not since 2 0 public void set Scroll Expand Enabled boolean value scroll Expand Enabled value  setScrollExpandEnabled scrollExpandEnabled
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  transferType

public abstract class Viewer Filter Creates a new viewer filter protected Viewer Filter  ViewerFilter ViewerFilter
Filters the given elements for the given viewer The input array is not modified p The default implementation of this method calls code select code on each element in the array and returns only those elements for which code select code returns code true code p param viewer the viewer param parent the parent element param elements the elements to filter return the filtered elements public Object filter Viewer viewer Object parent Object elements int size elements length Array List out new Array List size for int i 0 i size i Object element elements i if select viewer parent element out add element return out to Array  ArrayList ArrayList toArray
Returns whether this viewer filter would be affected by a change to the given property of the given element p The default implementation of this method returns code false code Subclasses should reimplement p param element the element param property the property return code true code if the filtering would be affected and code false code if it would be unaffected public boolean is Filter Property Object element String property return false  isFilterProperty
Returns whether the given element makes it through this filter param viewer the viewer param parent Element the parent element param element the element return code true code if element is included in the filtered set and code false code if excluded  parentElement

private Image start Image public Viewer Label String initial Text Image initial Image start Text initial Text start Image initial Image  startImage ViewerLabel initialText initialImage startText initialText startImage initialImage
Get the image for the receiver If the new image has been set return it otherwise return the starting image return Returns the image public final Image get Image if new Image null return start Image else return new Image  getImage newImage startImage newImage
Set the image for the receiver param image The image to set public final void set Image Image image new Image image  setImage newImage
Get the text for the receiver If the new text has been set return it otherwise return the starting text return Returns the text public final String get Text if new Text null return start Text else return new Text  getText newText startText newText
Set the text for the receiver param text The label to set public final void set Text String text new Text text  setText newText
Return whether or not the image has been set return boolean true if the image has been set to something new public boolean has New Image If we started with null any change is an update if start Image null return new Image null return start Image equals new Image  hasNewImage startImage newImage startImage newImage
Return whether or not the text has been set return boolean true if the text has been set to something new public boolean has New Text If we started with null any change is an update if start Text null return new Text null return start Text equals new Text  hasNewText startText newText startText newText

protected Collator collator Creates a new viewer sorter which uses the default collator to sort strings public Viewer Sorter this Collator get Instance  ViewerSorter getInstance
Creates a new viewer sorter which uses the given collator to sort strings param collator the collator to use to sort strings public Viewer Sorter Collator collator this collator collator  ViewerSorter
Returns the category of the given element The category is a number used to allocate elements to bins the bins are arranged in ascending numeric order The elements within a bin are arranged via a second level sort criterion p The default implementation of this framework method returns code 0 code Subclasses may reimplement this method to provide non trivial categorization p param element the element return the category public int category Object element return 0 
Returns a negative zero or positive number depending on whether the first element is less than equal to or greater than the second element p The default implementation of this method is based on comparing the elements categories as computed by the code category code framework method Elements within the same category are further subjected to a case insensitive compare of their label strings either as computed by the content viewer s label provider or their code to String code values in other cases Subclasses may override p param viewer the viewer param e1 the first element param e2 the second element return a negative number if the first element is less than the second element the value code 0 code if the first element is equal to the second element and a positive number if the first element is greater than the second element public int compare Viewer viewer Object e1 Object e2 int cat1 category e1 int cat2 category e2 if cat1 cat2 return cat1 cat2 cat1 cat2 String name1 String name2 if viewer null viewer instanceof Content Viewer name1 e1 to String name2 e2 to String else I Base Label Provider prov Content Viewer viewer get Label Provider if prov instanceof I Label Provider I Label Provider lprov I Label Provider prov name1 lprov get Text e1 name2 lprov get Text e2 else name1 e1 to String name2 e2 to String if name1 null name1 NON NLS 1 if name2 null name2 NON NLS 1 return collator compare name1 name2  toString ContentViewer toString toString IBaseLabelProvider ContentViewer getLabelProvider ILabelProvider ILabelProvider ILabelProvider getText getText toString toString
Returns the collator used to sort strings return the collator used to sort strings public Collator get Collator return collator  getCollator
Returns whether this viewer sorter would be affected by a change to the given property of the given element p The default implementation of this method returns code false code Subclasses may reimplement p param element the element param property the property return code true code if the sorting would be affected and code false code if it would be unaffected public boolean is Sorter Property Object element String property return false  isSorterProperty
public void sort final Viewer viewer Object elements Arrays sort elements new Comparator public int compare Object a Object b return Viewer Sorter this compare viewer a b  ViewerSorter
Sorts the given elements in place modifying the given array p The default implementation of this method uses the java util Arrays sort algorithm on the given array calling code compare code to compare elements p p Subclasses may reimplement this method to provide a more optimized implementation p param viewer the viewer param elements the elements to sort public void sort final Viewer viewer Object elements Arrays sort elements new Comparator public int compare Object a Object b return Viewer Sorter this compare viewer a b  ViewerSorter

protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache if w Hint SWT DEFAULT h Hint SWT DEFAULT return new Point w Hint h Hint Point result new Point 0 0 Control ws composite get Children for int i 0 i ws length i Control w ws i boolean hide false if get Tool Bar Control w if tool Bar Children Exist hide true result y BAR SIZE REVISIT else if get Cool Bar Control w if cool Bar Children Exist hide true result y BAR SIZE else if status Line Manager null status Line Manager get Control w else if i 0 we assume this window is contents hide false if hide Point e w compute Size w Hint h Hint flush Cache result x Math max result x e x result y e y VGAP if w Hint SWT DEFAULT result x w Hint if h Hint SWT DEFAULT result y h Hint return result  computeSize wHint hHint flushCache wHint hHint wHint hHint getChildren getToolBarControl toolBarChildrenExist BAR_SIZE getCoolBarControl coolBarChildrenExist BAR_SIZE statusLineManager statusLineManager getControl computeSize wHint hHint flushCache wHint wHint hHint hHint
protected void layout Composite composite boolean flush Cache Rectangle client Area composite get Client Area Control ws composite get Children for int i 0 i ws length i Control w ws i if i 0 Separator Point e w compute Size SWT DEFAULT SWT DEFAULT flush Cache w set Bounds client Area x client Area y client Area width e y client Area y e y client Area height e y else if get Tool Bar Control w if tool Bar Children Exist Point e w compute Size SWT DEFAULT SWT DEFAULT flush Cache w set Bounds client Area x client Area y client Area width e y client Area y e y VGAP client Area height e y VGAP else if get Cool Bar Control w if cool Bar Children Exist Point e w compute Size client Area width SWT DEFAULT flush Cache w set Bounds client Area x client Area y client Area width e y client Area y e y VGAP client Area height e y VGAP else if status Line Manager null status Line Manager get Control w Point e w compute Size SWT DEFAULT SWT DEFAULT flush Cache w set Bounds client Area x client Area y client Area height e y client Area width e y client Area height e y VGAP else w set Bounds client Area x client Area y VGAP client Area width client Area height VGAP  flushCache clientArea getClientArea getChildren computeSize flushCache setBounds clientArea clientArea clientArea clientArea clientArea getToolBarControl toolBarChildrenExist computeSize flushCache setBounds clientArea clientArea clientArea clientArea clientArea getCoolBarControl coolBarChildrenExist computeSize clientArea flushCache setBounds clientArea clientArea clientArea clientArea clientArea statusLineManager statusLineManager getControl computeSize flushCache setBounds clientArea clientArea clientArea clientArea clientArea setBounds clientArea clientArea clientArea clientArea
Return the top seperator return Label protected Label get Seperator1 return seperator1  getSeperator1
Create an application window instance whose shell will be created under the given parent shell Note that the window will have no visual representation no widgets until it is told to open By default code open code does not block param parent Shell the parent shell or code null code to create a top level shell public Application Window Shell parent Shell super parent Shell  parentShell ApplicationWindow parentShell parentShell
Configures this window to have a menu bar Does nothing if it already has one This method must be called before this window s shell is created protected void add Menu Bar if get Shell null menu Bar Manager null menu Bar Manager create Menu Manager  addMenuBar getShell menuBarManager menuBarManager createMenuManager
Configures this window to have a status line Does nothing if it already has one This method must be called before this window s shell is created protected void add Status Line if get Shell null status Line Manager null status Line Manager create Status Line Manager  addStatusLine getShell statusLineManager statusLineManager createStatusLineManager
Configures this window to have a tool bar Does nothing if it already has one This method must be called before this window s shell is created protected void add Tool Bar int style if get Shell null tool Bar Manager null cool Bar Manager null tool Bar Manager create Tool Bar Manager style  addToolBar getShell toolBarManager coolBarManager toolBarManager createToolBarManager
Configures this window to have a cool bar Does nothing if it already has one This method must be called before this window s shell is created param style the cool bar style since 3 0 protected void add Cool Bar int style if get Shell null tool Bar Manager null cool Bar Manager null cool Bar Manager create Cool Bar Manager style  addCoolBar getShell toolBarManager coolBarManager coolBarManager createCoolBarManager
Method declared on Window protected boolean can Handle Shell Close Event return super can Handle Shell Close Event operation In Progress  canHandleShellCloseEvent canHandleShellCloseEvent operationInProgress
public boolean close if operation In Progress return false if super close if menu Bar Manager null menu Bar Manager dispose menu Bar Manager null if tool Bar Manager null tool Bar Manager dispose tool Bar Manager null if status Line Manager null status Line Manager dispose status Line Manager null if cool Bar Manager null cool Bar Manager dispose cool Bar Manager null return true return false  operationInProgress menuBarManager menuBarManager menuBarManager toolBarManager toolBarManager toolBarManager statusLineManager statusLineManager statusLineManager coolBarManager coolBarManager coolBarManager
Extends the super implementation by creating the trim widgets using code create Trim Widgets code protected void configure Shell Shell shell super configure Shell shell create Trim Widgets shell  createTrimWidgets configureShell configureShell createTrimWidgets
Creates the trim widgets around the content area param shell the shell since 3 0 protected void create Trim Widgets Shell shell if menu Bar Manager null menu Bar Manager update All true shell set Menu Bar menu Bar Manager create Menu Bar Decorations shell if show Top Seperator NON NLS 1 seperator1 new Label shell SWT SEPARATOR SWT HORIZONTAL will create either a cool bar or a tool bar create Tool Bar Control shell create Cool Bar Control shell create Status Line shell  createTrimWidgets menuBarManager menuBarManager updateAll setMenuBar menuBarManager createMenuBar showTopSeperator createToolBarControl createCoolBarControl createStatusLine
see org eclipse jface window Window get Layout protected Layout get Layout return new Application Window Layout  getLayout getLayout ApplicationWindowLayout
Returns whether to show a top separator line between the menu bar and the rest of the window contents On some platforms such as the Mac the menu is separated from the main window already so a separator line is not desired return code true code to show the top separator code false code to not show it since 3 0 protected boolean show Top Seperator return carbon equals SWT get Platform NON NLS 1  showTopSeperator getPlatform
Create the status line if required param shell protected void create Status Line Shell shell if status Line Manager null status Line Manager create Control shell SWT NONE  createStatusLine statusLineManager statusLineManager createControl
Returns a new menu manager for the window p Subclasses may override this method to customize the menu manager p return a menu manager protected Menu Manager create Menu Manager return new Menu Manager  MenuManager createMenuManager MenuManager
Returns a new status line manager for the window p Subclasses may override this method to customize the status line manager p return a status line manager protected Status Line Manager create Status Line Manager return new Status Line Manager  StatusLineManager createStatusLineManager StatusLineManager
Returns a new tool bar manager for the window p Subclasses may override this method to customize the tool bar manager p return a tool bar manager protected Tool Bar Manager create Tool Bar Manager int style return new Tool Bar Manager style  ToolBarManager createToolBarManager ToolBarManager
Returns a new cool bar manager for the window p Subclasses may override this method to customize the cool bar manager p return a cool bar manager since 3 0 protected Cool Bar Manager create Cool Bar Manager int style return new Cool Bar Manager style  CoolBarManager createCoolBarManager CoolBarManager
Creates the control for the tool bar manager p Subclasses may override this method to customize the tool bar manager p return a Control protected Control create Tool Bar Control Composite parent if tool Bar Manager null return tool Bar Manager create Control parent return null  createToolBarControl toolBarManager toolBarManager createControl
Creates the control for the cool bar manager p Subclasses may override this method to customize the cool bar manager p return an instance of code Cool Bar code since 3 0 protected Control create Cool Bar Control Composite composite if cool Bar Manager null return cool Bar Manager create Control composite return null  CoolBar createCoolBarControl coolBarManager coolBarManager createControl
Returns the default font used for this window p The default implementation of this framework method obtains the symbolic name of the font from the code get Symbolic Font Name code framework method and retrieves this font from J Face s font registry using code J Face Resources get Font code Subclasses may override to use a different registry etc p return the default font or code null code if none protected Font get Font return J Face Resources get Font get Symbolic Font Name  getSymbolicFontName JFace JFaceResources getFont getFont JFaceResources getFont getSymbolicFontName
Returns the menu bar manager for this window if it has one return the menu bar manager or code null code if this window does not have a menu bar see add Menu Bar public Menu Manager get Menu Bar Manager return menu Bar Manager  addMenuBar MenuManager getMenuBarManager menuBarManager
Returns the status line manager for this window if it has one return the status line manager or code null code if this window does not have a status line see add Status Line protected Status Line Manager get Status Line Manager return status Line Manager  addStatusLine StatusLineManager getStatusLineManager statusLineManager
Returns the symbolic font name of the font to be used to display text in this window This is not recommended and is included for backwards compatability It is recommended to use the default font provided by SWT that is do not set the font return the symbolic font name public String get Symbolic Font Name return J Face Resources TEXT FONT  getSymbolicFontName JFaceResources TEXT_FONT
Returns the tool bar manager for this window if it has one return the tool bar manager or code null code if this window does not have a tool bar see add Tool Bar int public Tool Bar Manager get Tool Bar Manager return tool Bar Manager  addToolBar ToolBarManager getToolBarManager toolBarManager
Returns the cool bar manager for this window return the cool bar manager or code null code if this window does not have a cool bar see add Cool Bar int since 3 0 public Cool Bar Manager get Cool Bar Manager return cool Bar Manager  addCoolBar CoolBarManager getCoolBarManager coolBarManager
Returns the control for the window s toolbar p Subclasses may override this method to customize the tool bar manager p return a Control protected Control get Tool Bar Control if tool Bar Manager null return tool Bar Manager get Control return null  getToolBarControl toolBarManager toolBarManager getControl
Returns the control for the window s cool bar p Subclasses may override this method to customize the cool bar manager p return an instance of code Cool Bar code since 3 0 protected Control get Cool Bar Control if cool Bar Manager null return cool Bar Manager get Control return null  CoolBar getCoolBarControl coolBarManager coolBarManager getControl
Busy Indicator show While display new Runnable public void run try Modal Context run runnable fork mgr get Progress Monitor display catch Invocation Target Exception ite holder 0 ite catch Interrupted Exception ie holder 0 ie  BusyIndicator showWhile ModalContext getProgressMonitor InvocationTargetException InterruptedException
public void run final boolean fork boolean cancelable final I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception try operation In Progress true final Status Line Manager mgr get Status Line Manager if mgr null runnable run new Null Progress Monitor return boolean cancel Was Enabled mgr is Cancel Enabled final Control contents get Contents final Display display contents get Display Shell shell get Shell boolean contents Was Enabled contents get Enabled Menu Manager manager get Menu Bar Manager Menu menu Bar null if manager null menu Bar manager get Menu manager null boolean menu Bar Was Enabled false if menu Bar null menu Bar Was Enabled menu Bar is Enabled Control toolbar Control get Tool Bar Control boolean toolbar Was Enabled false if toolbar Control null toolbar Was Enabled toolbar Control get Enabled Control coolbar Control get Cool Bar Control boolean coolbar Was Enabled false if coolbar Control null coolbar Was Enabled coolbar Control get Enabled Disable the rest of the shells on the current display Shell shells display get Shells boolean enabled new boolean shells length for int i 0 i shells length i Shell current shells i if current shell continue if current null current is Disposed enabled i current get Enabled current set Enabled false Control current Focus display get Focus Control try contents set Enabled false if menu Bar null menu Bar set Enabled false if toolbar Control null toolbar Control set Enabled false if coolbar Control null coolbar Control set Enabled false mgr set Cancel Enabled cancelable final Exception holder new Exception 1 Busy Indicator show While display new Runnable public void run try Modal Context run runnable fork mgr get Progress Monitor display catch Invocation Target Exception ite holder 0 ite catch Interrupted Exception ie holder 0 ie if holder 0 null if holder 0 instanceof Invocation Target Exception throw Invocation Target Exception holder 0 else if holder 0 instanceof Interrupted Exception throw Interrupted Exception holder 0 finally operation In Progress false Enable the rest of the shells on the current display for int i 0 i shells length i Shell current shells i if current shell continue if current null current is Disposed current set Enabled enabled i if contents is Disposed contents set Enabled contents Was Enabled if menu Bar null menu Bar is Disposed menu Bar set Enabled menu Bar Was Enabled if toolbar Control null toolbar Control is Disposed toolbar Control set Enabled toolbar Was Enabled if coolbar Control null coolbar Control is Disposed coolbar Control set Enabled coolbar Was Enabled mgr set Cancel Enabled cancel Was Enabled if current Focus null current Focus is Disposed It s necessary to restore focus after reenabling the controls because disabling them causes focus to jump elsewhere Use force Focus rather than set Focus to avoid SWT s search for children which can take focus so focus ends up back on the actual control that previously had it current Focus force Focus finally operation In Progress false  IRunnableWithProgress InvocationTargetException InterruptedException operationInProgress StatusLineManager getStatusLineManager NullProgressMonitor cancelWasEnabled isCancelEnabled getContents getDisplay getShell contentsWasEnabled getEnabled MenuManager getMenuBarManager menuBar menuBar getMenu menuBarWasEnabled menuBar menuBarWasEnabled menuBar isEnabled toolbarControl getToolBarControl toolbarWasEnabled toolbarControl toolbarWasEnabled toolbarControl getEnabled coolbarControl getCoolBarControl coolbarWasEnabled coolbarControl coolbarWasEnabled coolbarControl getEnabled getShells isDisposed getEnabled setEnabled currentFocus getFocusControl setEnabled menuBar menuBar setEnabled toolbarControl toolbarControl setEnabled coolbarControl coolbarControl setEnabled setCancelEnabled BusyIndicator showWhile ModalContext getProgressMonitor InvocationTargetException InterruptedException InvocationTargetException InvocationTargetException InterruptedException InterruptedException operationInProgress isDisposed setEnabled isDisposed setEnabled contentsWasEnabled menuBar menuBar isDisposed menuBar setEnabled menuBarWasEnabled toolbarControl toolbarControl isDisposed toolbarControl setEnabled toolbarWasEnabled coolbarControl coolbarControl isDisposed coolbarControl setEnabled coolbarWasEnabled setCancelEnabled cancelWasEnabled currentFocus currentFocus isDisposed forceFocus setFocus currentFocus forceFocus operationInProgress
Sets or clears the message displayed in this window s status line if it has one This method has no effect if the window does not have a status line param message the status message or code null code to clear it public void set Status String message if status Line Manager null status Line Manager set Message message  setStatus statusLineManager statusLineManager setMessage
Returns whether or not children exist for the Application Window s toolbar control p return boolean true if children exist false otherwise protected boolean tool Bar Children Exist Control tool Control get Tool Bar Control if tool Control instanceof Tool Bar return Tool Bar tool Control get Item Count 0 return false  toolBarChildrenExist toolControl getToolBarControl toolControl ToolBar ToolBar toolControl getItemCount
Returns whether or not children exist for this application window s cool bar control return boolean true if children exist false otherwise since 3 0 protected boolean cool Bar Children Exist Control cool Control get Cool Bar Control if cool Control instanceof Cool Bar return Cool Bar cool Control get Item Count 0 return false  coolBarChildrenExist coolControl getCoolBarControl coolControl CoolBar CoolBar coolControl getItemCount

public static interface I Exception Handler public void handle Exception Throwable t  IExceptionHandler handleException
private static class Default Exception Handler implements I Exception Handler public void handle Exception Throwable t if t instanceof Thread Death Don t catch Thread Death as this is a normal occurrence when the thread dies throw Thread Death t else Try to keep running t print Stack Trace  DefaultExceptionHandler IExceptionHandler handleException ThreadDeath ThreadDeath ThreadDeath printStackTrace
private class Font Change Listener implements I Property Change Listener public void property Change Property Change Event event handle Font Change event  FontChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent handleFontChange
Creates a window instance whose shell will be created under the given parent shell Note that the window will have no visual representation until it is told to open By default code open code does not block param parent Shell the parent shell or code null code to create a top level shell see set Block On Open protected Window Shell parent Shell this parent Shell parent Shell  parentShell setBlockOnOpen parentShell parentShell parentShell
Determines if the window should handle the close event or do nothing p The default implementation of this framework method returns code true code which will allow the code handle Shell Close Event code method to be called Subclasses may extend or reimplement p return whether the window should handle the close event protected boolean can Handle Shell Close Event return true  handleShellCloseEvent canHandleShellCloseEvent
Closes this window disposes its shell and removes this window from its window manager if it has one p This framework method may be extended code super close code must be called p return code true code if the window is or was already closed and code false code if it is still open public boolean close if shell null shell is Disposed return true stop listening for font changes if font Change Listener null J Face Resources get Font Registry remove Listener font Change Listener font Change Listener null If we close the shell recursion will occur Instead we need to dispose the shell to remove it from the display shell dispose shell null contents null if window Manager null window Manager remove this window Manager null return true  isDisposed fontChangeListener JFaceResources getFontRegistry removeListener fontChangeListener fontChangeListener windowManager windowManager windowManager
Configures the given shell in preparation for opening this window in it p The default implementation of this framework method sets the shell s image and gives it a grid layout Subclasses may extend or reimplement p param new Shell the shell protected void configure Shell Shell new Shell The single image version of this code had a comment related to bug 46624 and some code that did nothing if the stored image was already disposed The equivalent in the multi image version seems to be to remove the disposed images from the array passed to the shell if default Images null default Images length 0 Array List non Disposed Images new Array List default Images length for int i 0 i default Images length i if default Images i null default Images i is Disposed non Disposed Images add default Images i if non Disposed Images size 0 System err println Window configure Shell images disposed NON NLS 1 else Image array new Image non Disposed Images size non Disposed Images to Array array new Shell set Images array Layout layout get Layout if layout null new Shell set Layout layout  newShell configureShell newShell defaultImages defaultImages ArrayList nonDisposedImages ArrayList defaultImages defaultImages defaultImages defaultImages isDisposed nonDisposedImages defaultImages nonDisposedImages configureShell nonDisposedImages nonDisposedImages toArray newShell setImages getLayout newShell setLayout
Creates the layout for the shell The layout created here will be attached to the composite passed into create Contents The default implementation returns a Grid Layout with no margins Subclasses that change the layout type by overriding this method should also override create Contents p A return value of null indicates that no layout should be attached to the composite In this case the layout may be attached within create Contents p return a newly created Layout or null if no layout should be attached since 3 0 protected Layout get Layout Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 return layout  createContents GridLayout createContents createContents getLayout GridLayout GridLayout marginHeight marginWidth
Constrain the shell size to be no larger than the display bounds since 2 0 protected void constrain Shell Size limit the shell size to the display size Rectangle bounds shell get Bounds Rectangle constrained get Constrained Shell Bounds bounds if bounds equals constrained shell set Bounds constrained  constrainShellSize getBounds getConstrainedShellBounds setBounds
Creates this window s widgetry in a new top level shell p The default implementation of this framework method creates this window s shell by calling code create Shell code and its controls by calling code create Contents code then initializes this window s shell bounds by calling code initialize Bounds code p public void create shell create Shell contents create Contents shell initialize the bounds of the shell to that appropriate for the contents initialize Bounds  createShell createContents initializeBounds createShell createContents initializeBounds
Creates and returns this window s contents Subclasses may attach any number of children to the parent As a convenience the return value of this method will be remembered and returned by subsequent calls to get Control Subclasses may modify the parent s layout if they overload get Layout to return null p It is common practise to create and return a single composite that contains the entire window contents p p The default implementation of this framework method creates an instance of code Composite code Subclasses may override p param parent the parent composite for the controls in this window The type of layout used is determined by get Layout return the control that will be returned by subsequent calls to get Control protected Control create Contents Composite parent by default just create a composite return new Composite parent SWT NONE  getControl getLayout getLayout getControl createContents
resize Listener new Listener public void handle Event Event e resize Has Occurred true  resizeListener handleEvent resizeHasOccurred
Creates and returns this window s shell p The default implementation of this framework method creates a new shell and configures it using code configure Shell code Rather than override this method subclasses should instead override code configure Shell code p return the shell protected final Shell create Shell Create the shell Shell new Shell new Shell get Parent Shell get Shell Style resize Listener new Listener public void handle Event Event e resize Has Occurred true new Shell add Listener SWT Resize resize Listener new Shell set Data this Add a listener new Shell add Shell Listener get Shell Listener Set the layout configure Shell new Shell Register for font changes if font Change Listener null font Change Listener new Font Change Listener J Face Resources get Font Registry add Listener font Change Listener return new Shell  configureShell configureShell createShell newShell getParentShell getShellStyle resizeListener handleEvent resizeHasOccurred newShell addListener resizeListener newShell setData newShell addShellListener getShellListener configureShell newShell fontChangeListener fontChangeListener FontChangeListener JFaceResources getFontRegistry addListener fontChangeListener newShell
Returns the top level control for this window The parent of this control is the shell return the top level control or code null code if this window s control has not been created yet protected Control get Contents return contents  getContents
Returns the default image This is the image that will be used for windows that have no shell image at the time they are opened There is no default image unless one is installed via code set Default Image code return the default image or code null code if none see set Default Image public static Image get Default Image return default Images null default Images length 1 null default Images 0  setDefaultImage setDefaultImage getDefaultImage defaultImages defaultImages defaultImages
Returns the array of default images to use for newly opened windows It is expected that the array will contain the same icon rendered at different resolutions see org eclipse swt widgets Decorations set Images return the array of images to be used when a new window is opened see set Default Images since 3 0 public static Image get Default Images return default Images null new Image 0 default Images  setImages setDefaultImages getDefaultImages defaultImages defaultImages
Returns the initial location to use for the shell The default implementation centers the shell horizontally 1 2 of the difference to the left and 1 2 to the right and vertically 1 3 above and 2 3 below relative to the parent shell or display bounds if there is no parent shell param initial Size the initial size of the shell as returned by code get Initial Size code return the initial location of the shell protected Point get Initial Location Point initial Size Composite parent shell get Parent Monitor monitor shell get Display get Primary Monitor if parent null monitor parent get Monitor Rectangle monitor Bounds monitor get Client Area Point center Point if parent null center Point Geometry center Point parent get Bounds else center Point Geometry center Point monitor Bounds return new Point center Point x initial Size x 2 Math max monitor Bounds y Math min center Point y initial Size y 2 3 monitor Bounds y monitor Bounds height initial Size y  initialSize getInitialSize getInitialLocation initialSize getParent getDisplay getPrimaryMonitor getMonitor monitorBounds getClientArea centerPoint centerPoint centerPoint getBounds centerPoint centerPoint monitorBounds centerPoint initialSize monitorBounds centerPoint initialSize monitorBounds monitorBounds initialSize
Returns the initial size to use for the shell The default implementation returns the preferred size of the shell using code Shell compute Size SWT DEFAULT SWT DEFAULT true code return the initial size of the shell protected Point get Initial Size return shell compute Size SWT DEFAULT SWT DEFAULT true  computeSize getInitialSize computeSize
Returns parent shell under which this window s shell is created return the parent shell or code null code if there is no parent shell protected Shell get Parent Shell return parent Shell  getParentShell parentShell
Returns this window s return code A window s return codes are window specific although two standard return codes are predefined code OK code and code CANCEL code return the return code public int get Return Code return return Code  getReturnCode returnCode
Returns this window s shell return this window s shell or code null code if this window s shell has not been created yet public Shell get Shell return shell  getShell
return new Shell Adapter public void shell Closed Shell Event event event doit false don t close now if can Handle Shell Close Event handle Shell Close Event  ShellAdapter shellClosed ShellEvent canHandleShellCloseEvent handleShellCloseEvent
Returns a shell listener This shell listener gets registered with this window s shell p The default implementation of this framework method returns a new listener that makes this window the active window for its window manager if it has one when the shell is activated and calls the framework method code handle Shell Close Event code when the shell is closed Subclasses may extend or reimplement p return a shell listener protected Shell Listener get Shell Listener return new Shell Adapter public void shell Closed Shell Event event event doit false don t close now if can Handle Shell Close Event handle Shell Close Event  handleShellCloseEvent ShellListener getShellListener ShellAdapter shellClosed ShellEvent canHandleShellCloseEvent handleShellCloseEvent
Returns the shell style bits p The default value is code SWT CLOSE SWT MIN SWT MAX SWT RESIZE code Subclassers should call code set Shell Style code to change this value rather than overriding this method p return the shell style bits protected int get Shell Style return shell Style  setShellStyle getShellStyle shellStyle
Returns the window manager of this window return the Window Manager or code null code if none public Window Manager get Window Manager return window Manager  WindowManager WindowManager getWindowManager windowManager
Notifies of a font property change p The default implementation of this framework method does nothing Subclasses may reimplement p param event the property change event detailing what changed protected void handle Font Change Property Change Event event do nothing  handleFontChange PropertyChangeEvent
Notifies that the window s close button was pressed the close menu was selected or the ESCAPE key pressed p The default implementation of this framework method sets the window s return code to code CANCEL code and closes the window using code close code Subclasses may extend or reimplement p protected void handle Shell Close Event set Return Code CANCEL close  handleShellCloseEvent setReturnCode
Initializes the location and size of this window s SWT shell after it has been created p This framework method is called by the code create code framework method The default implementation calls code get Initial Size code and code get Initial Location code and passes the results to code Shell set Bounds code This is only done if the bounds of the shell have not already been modified Subclasses may extend or reimplement p protected void initialize Bounds if resize Listener null shell remove Listener SWT Resize resize Listener if resize Has Occurred Check if shell size has been set already return Point size get Initial Size Point location get Initial Location size shell set Bounds get Constrained Shell Bounds new Rectangle location x location y size x size y  getInitialSize getInitialLocation setBounds initializeBounds resizeListener removeListener resizeListener resizeHasOccurred getInitialSize getInitialLocation setBounds getConstrainedShellBounds
Opens this window creating it first if it has not yet been created p If this window has been configured to block on open code set Block On Open code this method waits until the window is closed by the end user and then it returns the window s return code otherwise this method returns immediately A window s return codes are window specific although two standard return codes are predefined code OK code and code CANCEL code p return the return code see create public int open if shell null create the window create limit the shell size to the display size constrain Shell Size open the window shell open run the event loop if specified if block run Event Loop shell return return Code  setBlockOnOpen constrainShellSize runEventLoop returnCode
Runs the event loop for the given shell param shell the shell private void run Event Loop Shell shell Use the display provided by the shell if possible Display display if shell null display Display get Current else display shell get Display while shell null shell is Disposed try if display read And Dispatch display sleep catch Throwable e exception Handler handle Exception e display update  runEventLoop getCurrent getDisplay isDisposed readAndDispatch exceptionHandler handleException
Sets whether the code open code method should block until the window closes param should Block code true code if the code open code method should not return until the window closes and code false code if the code open code method should return immediately public void set Block On Open boolean should Block block should Block  shouldBlock setBlockOnOpen shouldBlock shouldBlock
Sets the default image This is the image that will be used for windows that have no shell image at the time they are opened There is no default image unless one is installed via this method param image the default image or code null code if none public static void set Default Image Image image default Images image null null new Image image  setDefaultImage defaultImages
Sets the array of default images to use for newly opened windows It is expected that the array will contain the same icon rendered at different resolutions see org eclipse swt widgets Decorations set Images param images the array of images to be used when this window is opened since 3 0 public static void set Default Images Image images Image new Array new Image images length System arraycopy images 0 new Array 0 new Array length default Images new Array  setImages setDefaultImages newArray newArray newArray defaultImages newArray
Sets this window s return code The return code is automatically returned by code open code if block on open is enabled For non blocking opens the return code needs to be retrieved manually using code get Return Code code param code the return code protected void set Return Code int code return Code code  getReturnCode setReturnCode returnCode
Returns the monitor whose client area contains the given point If no monitor contains the point returns the monitor that is closest to the point If this is ever made public it should be moved into a separate utility class param to Search point to find display coordinates param to Find point to find display coordinates return the montor closest to the given point private static Monitor get Closest Monitor Display to Search Point to Find int closest Integer MAX VALUE Monitor monitors to Search get Monitors Monitor result monitors 0 for int idx 0 idx monitors length idx Monitor current monitors idx Rectangle client Area current get Client Area if client Area contains to Find return current int distance Geometry distance Squared Geometry center Point client Area to Find if distance closest closest distance result current return result  toSearch toFind getClosestMonitor toSearch toFind MAX_VALUE toSearch getMonitors clientArea getClientArea clientArea toFind distanceSquared centerPoint clientArea toFind
Given the desired position of the window this method returns an adjusted position such that the window is no larger than its monitor and does not extend beyond the edge of the monitor This is used for computing the initial window position and subclasses can use this as a utility method if they want to limit the region in which the window may be moved param preferred Size the preferred position of the window return a rectangle as close as possible to preferred Size that does not extend outside the monitor since 3 0 protected Rectangle get Constrained Shell Bounds Rectangle preferred Size Rectangle result new Rectangle preferred Size x preferred Size y preferred Size width preferred Size height Monitor mon get Closest Monitor get Shell get Display Geometry center Point result Rectangle bounds mon get Client Area if result height bounds height result height bounds height if result width bounds width result width bounds width result x Math max bounds x Math min result x bounds x bounds width result width result y Math max bounds y Math min result y bounds y bounds height result height return result  preferredSize preferredSize getConstrainedShellBounds preferredSize preferredSize preferredSize preferredSize preferredSize getClosestMonitor getShell getDisplay centerPoint getClientArea
Sets the shell style bits This method has no effect after the shell is created p The shell style bits are used by the framework method code create Shell code when creating this window s shell p param new Shell Style the new shell style bits protected void set Shell Style int new Shell Style shell Style new Shell Style  createShell newShellStyle setShellStyle newShellStyle shellStyle newShellStyle
Sets the window manager of this window p Note that this method is used by code Window Manager code to maintain a backpointer Clients must not call the method directly p param manager the window manager or code null code if none public void set Window Manager Window Manager manager window Manager manager Code to detect invalid usage if manager null Window windows manager get Windows for int i 0 i windows length i if windows i this return manager add this  WindowManager setWindowManager WindowManager windowManager getWindows
Sets the exception handler for this application p Note that only one handler may be set Other calls to this method will be ignored p param handler the exception handler for the application public static void set Exception Handler I Exception Handler handler if exception Handler instanceof Default Exception Handler exception Handler handler  setExceptionHandler IExceptionHandler exceptionHandler DefaultExceptionHandler exceptionHandler

private List sub Managers Creates an empty window manager without a parent window manager that is a root window manager public Window Manager  subManagers WindowManager
Creates an empty window manager with the given window manager as parent param parent the parent window manager public Window Manager Window Manager parent Assert is Not Null parent parent add Window Manager this  WindowManager WindowManager isNotNull addWindowManager
Adds the given window to the set of windows managed by this window manager Does nothing is this window is already managed by this window manager param window the window public void add Window window if windows contains window windows add window window set Window Manager this  setWindowManager
Adds the given window manager to the list of window managers that have this one as a parent p param wm the child window manager private void add Window Manager Window Manager wm if sub Managers null sub Managers new Array List if sub Managers contains wm sub Managers add wm  addWindowManager WindowManager subManagers subManagers ArrayList subManagers subManagers
Attempts to close all windows managed by this window manager as well as windows managed by any descendent window managers return code true code if all windows were sucessfully closed and code false code if any window refused to close public boolean close List t List windows clone make iteration robust Iterator e t iterator while e has Next Window window Window e next boolean closed window close if closed return false if sub Managers null e sub Managers iterator while e has Next Window Manager wm Window Manager e next boolean closed wm close if closed return false return true  hasNext subManagers subManagers hasNext WindowManager WindowManager
Returns this window manager s number of windows return the number of windows since 3 0 public int get Window Count return windows size  getWindowCount
Returns this window manager s set of windows return a possibly empty list of window public Window get Windows Window bs new Window windows size windows to Array bs return bs  getWindows toArray
Removes the given window from the set of windows managed by this window manager Does nothing is this window is not managed by this window manager param window the window public final void remove Window window if windows contains window windows remove window window set Window Manager null  setWindowManager

public interface I Wizard Adds any last minute pages to this wizard p This method is called just before the wizard becomes visible to give the wizard the opportunity to add any lazily created pages p  IWizard
public void add Pages Returns whether this wizard could be finished without further user interaction p The result of this method is typically used by the wizard container to enable or disable the Finish button p return code true code if the wizard could be finished and code false code otherwise  addPages
public boolean can Finish Creates this wizard s controls in the given parent control p The wizard container calls this method to create the controls for the wizard s pages before the wizard is opened This allows the wizard to size correctly otherwise a resize may occur when moving to a new page p param page Container the parent control  canFinish pageContainer
public void create Page Controls Composite page Container Disposes of this wizard and frees all SWT resources public void dispose  createPageControls pageContainer
public void dispose Returns the container of this wizard return the wizard container or code null code if this wizard has yet to be added to a container 
public I Wizard Container get Container Returns the default page image for this wizard p This image can be used for pages which do not supply their own image p return the default page image  IWizardContainer getContainer
public Image get Default Page Image Returns the dialog settings for this wizard p The dialog store is used to record state between wizard invocations for example radio button selections last directory etc p return the dialog settings or code null code if none  getDefaultPageImage
public I Dialog Settings get Dialog Settings Returns the successor of the given page p This method is typically called by a wizard page p param page the page return the next page or code null code if none  IDialogSettings getDialogSettings
public I Wizard Page get Next Page I Wizard Page page Returns the wizard page with the given name belonging to this wizard param page Name the name of the wizard page return the wizard page with the given name or code null code if none  IWizardPage getNextPage IWizardPage pageName
public I Wizard Page get Page String page Name Returns the number of pages in this wizard return the number of wizard pages  IWizardPage getPage pageName
public int get Page Count Returns all the pages in this wizard return a list of pages  getPageCount
public I Wizard Page get Pages Returns the predecessor of the given page p This method is typically called by a wizard page p param page the page return the previous page or code null code if none  IWizardPage getPages
public I Wizard Page get Previous Page I Wizard Page page Returns the first page to be shown in this wizard return the first wizard page  IWizardPage getPreviousPage IWizardPage
public I Wizard Page get Starting Page Returns the title bar color for this wizard return the title bar color  IWizardPage getStartingPage
public RGB get Title Bar Color Returns the window title string for this wizard return the window title string or code null code for no title  getTitleBarColor
public String get Window Title Returns whether help is available for this wizard p The result of this method is typically used by the container to show or hide the Help button p return code true code if help is available and code false code if this wizard is helpless  getWindowTitle
public boolean is Help Available Returns whether this wizard needs Previous and Next buttons p The result of this method is typically used by the container p return code true code if Previous and Next buttons are required and code false code if none are needed  isHelpAvailable
public boolean needs Previous And Next Buttons Returns whether this wizard needs a progress monitor p The result of this method is typically used by the container p return code true code if a progress monitor is required and code false code if none is needed  needsPreviousAndNextButtons
public boolean needs Progress Monitor Performs any actions appropriate in response to the user having pressed the Cancel button or refuse if canceling now is not permitted return code true code to indicate the cancel request was accepted and code false code to indicate that the cancel request was refused  needsProgressMonitor
public boolean perform Cancel Performs any actions appropriate in response to the user having pressed the Finish button or refuse if finishing now is not permitted Normally this method is only called on the container s current wizard However if the current wizard is a nested wizard this method will also be called on all wizards in its parent chain Such parents may use this notification to save state etc However the value the parents return from this method is ignored return code true code to indicate the finish request was accepted and code false code to indicate that the finish request was refused  performCancel
public boolean perform Finish Sets or clears the container of this wizard param wizard Container the wizard container or code null code  performFinish wizardContainer

public interface I Wizard Container extends I Runnable Context Returns the current wizard page for this container return the current wizard page or code null code if the container is not yet showing the wizard see show Page  IWizardContainer IRunnableContext showPage
public I Wizard Page get Current Page Returns the shell for this wizard container return the shell or code null code if this wizard container does not have a shell  IWizardPage getCurrentPage
public Shell get Shell Makes the given page visible p This method should not be use for normal page sequencing back next which is handled by the container itself It may however be used to move to another page in response to some custom action such as double clicking in a list p param page the page to show see get Current Page  getShell getCurrentPage
public void show Page I Wizard Page page Adjusts the enable state of the Back Next and Finish buttons to reflect the state of the currently active page in this container p This method is called by the container itself when its wizard page changes and may be called by the page at other times to force a button state update p  showPage IWizardPage
public void update Buttons Updates the message or error message shown in the message line to reflect the state of the currently active page in this container p This method is called by the container itself when its wizard page changes and may be called by the page at other times to force a message update p  updateButtons
public void update Message Updates the title bar title description and image to reflect the state of the currently active page in this container p This method is called by the container itself when its wizard page changes and may be called by the page at other times to force a title bar update p  updateMessage
public void update Title Bar Updates the window title to reflect the state of the current wizard p This method is called by the container itself when its wizard changes and may be called by the wizard at other times to force a window title change p  updateTitleBar

Updates the window size to reflect the state of the current wizard p This method is called by the container itself when its wizard changes and may be called by the wizard at other times to force a window size change p 

public interface I Wizard Node Disposes the wizard managed by this node Does nothing if the wizard has not been created p This is the last message that should ever be sent to this node p  IWizardNode
public void dispose Returns the extent of the wizard for this node p If the content has not yet been created calling this method does not trigger the creation of the wizard This allows this node to suggest an extent in advance of actually creating the wizard p return the extent or code 1 1 code extent is not known 
public Point get Extent Returns the wizard this node stands for p If the content has not been created beforehand calling this method triggers the creation of the wizard and caches it so that the identical wizard object is returned on subsequent calls p return the wizard  getExtent
public I Wizard get Wizard Returns whether a wizard has been created for this node return code true code if a wizard has been created and code false code otherwise  IWizard getWizard

public interface I Wizard Page extends I Dialog Page Returns whether the next page could be displayed return code true code if the next page could be displayed and code false code otherwise  IWizardPage IDialogPage
public boolean can Flip To Next Page Returns this page s name return the name of this page  canFlipToNextPage
public String get Name Returns the wizard page that would to be shown if the user was to press the Next button return the next wizard page or code null code if none  getName
public I Wizard Page get Next Page Returns the wizard page that would to be shown if the user was to press the Back button return the previous wizard page or code null code if none  IWizardPage getNextPage
public I Wizard Page get Previous Page Returns the wizard that hosts this wizard page return the wizard or code null code if this page has not been added to any wizard see set Wizard  IWizardPage getPreviousPage setWizard
public I Wizard get Wizard Returns whether this page is complete or not p This information is typically used by the wizard to decide when it is okay to finish p return code true code if this page is complete and code false code otherwise  IWizard getWizard
public boolean is Page Complete Sets the wizard page that would typically be shown if the user was to press the Back button p This method is called by the container p param page the previous wizard page  isPageComplete
public void set Previous Page I Wizard Page page Sets the wizard that hosts this wizard page Once established a page s wizard cannot be changed to a different wizard param new Wizard the wizard see get Wizard  setPreviousPage IWizardPage newWizard getWizard

protected Listener f Cancel Listener new Listener public void handle Event Event e set Canceled true if f Cancel Component null f Cancel Component set Enabled false  fCancelListener handleEvent setCanceled fCancelComponent fCancelComponent setEnabled
Creates a Progress Monitor Part param parent The SWT parent of the part param layout The SWT grid bag layout used by the part A client can supply the layout to control how the progress monitor part is layed out If null is passed the part uses its default layout public Progress Monitor Part Composite parent Layout layout this parent layout SWT DEFAULT  ProgressMonitorPart ProgressMonitorPart
Creates a Progress Monitor Part param parent The SWT parent of the part param layout The SWT grid bag layout used by the part A client can supply the layout to control how the progress monitor part is layed out If null is passed the part uses its default layout param progress Indicator Height The height of the progress indicator in pixel public Progress Monitor Part Composite parent Layout layout int progress Indicator Height super parent SWT NONE initialize layout progress Indicator Height  ProgressMonitorPart progressIndicatorHeight ProgressMonitorPart progressIndicatorHeight progressIndicatorHeight
Attaches the progress monitor part to the given cancel component param cancel Component the control whose selection will trigger a cancel public void attach To Cancel Component Control cancel Component Assert is Not Null cancel Component f Cancel Component cancel Component f Cancel Component add Listener SWT Selection f Cancel Listener  cancelComponent attachToCancelComponent cancelComponent isNotNull cancelComponent fCancelComponent cancelComponent fCancelComponent addListener fCancelListener
Implements code I Progress Monitor begin Task code see I Progress Monitor begin Task java lang String int public void begin Task String name int total Work f Task Name name update Label if total Work I Progress Monitor UNKNOWN total Work 0 f Progress Indicator begin Animated Task else f Progress Indicator begin Task total Work  IProgressMonitor beginTask IProgressMonitor beginTask beginTask totalWork fTaskName updateLabel totalWork IProgressMonitor totalWork fProgressIndicator beginAnimatedTask fProgressIndicator beginTask totalWork
Implements code I Progress Monitor done code see I Progress Monitor done public void done f Label set Text NON NLS 1 f Progress Indicator send Remaining Work f Progress Indicator done  IProgressMonitor IProgressMonitor fLabel setText fProgressIndicator sendRemainingWork fProgressIndicator
Escapes any occurrence of in the given String so that it is not considered as a mnemonic character in SWT Tool Items Menu Items Button and Labels param in the original String return The converted String protected static String escape Meta Characters String in if in null in index Of 0 return in int length in length String Buffer out new String Buffer length 1 for int i 0 i length i char c in char At i if c out append NON NLS 1 else out append c return out to String  ToolItems MenuItems escapeMetaCharacters indexOf StringBuffer StringBuffer charAt toString
Creates the progress monitor s UI parts and layouts them according to the given layout If the layou is code null code the part s default layout is used param layout The layoutfor the receiver param progress Indicator Height The suggested height of the indicator protected void initialize Layout layout int progress Indicator Height if layout null Grid Layout l new Grid Layout l margin Width 0 l margin Height 0 l num Columns 1 layout l set Layout layout f Label new Label this SWT LEFT f Label set Layout Data new Grid Data Grid Data FILL HORIZONTAL if progress Indicator Height SWT DEFAULT GC gc new GC f Label Font Metrics fm gc get Font Metrics gc dispose progress Indicator Height fm get Height f Progress Indicator new Progress Indicator this Grid Data gd new Grid Data gd horizontal Alignment Grid Data FILL gd grab Excess Horizontal Space true gd vertical Alignment Grid Data CENTER gd height Hint progress Indicator Height f Progress Indicator set Layout Data gd  progressIndicatorHeight progressIndicatorHeight GridLayout GridLayout marginWidth marginHeight numColumns setLayout fLabel fLabel setLayoutData GridData GridData FILL_HORIZONTAL progressIndicatorHeight fLabel FontMetrics getFontMetrics progressIndicatorHeight getHeight fProgressIndicator ProgressIndicator GridData GridData horizontalAlignment GridData grabExcessHorizontalSpace verticalAlignment GridData heightHint progressIndicatorHeight fProgressIndicator setLayoutData
Implements code I Progress Monitor internal Worked code see I Progress Monitor internal Worked double public void internal Worked double work f Progress Indicator worked work  IProgressMonitor internalWorked IProgressMonitor internalWorked internalWorked fProgressIndicator
Implements code I Progress Monitor is Canceled code see I Progress Monitor is Canceled public boolean is Canceled return f Is Canceled  IProgressMonitor isCanceled IProgressMonitor isCanceled isCanceled fIsCanceled
Detach the progress monitor part from the given cancel component param cc public void remove From Cancel Component Control cc Assert is True f Cancel Component cc f Cancel Component null f Cancel Component remove Listener SWT Selection f Cancel Listener f Cancel Component null  removeFromCancelComponent isTrue fCancelComponent fCancelComponent fCancelComponent removeListener fCancelListener fCancelComponent
Implements code I Progress Monitor set Canceled code see I Progress Monitor set Canceled boolean public void set Canceled boolean b f Is Canceled b  IProgressMonitor setCanceled IProgressMonitor setCanceled setCanceled fIsCanceled
Sets the progress monitor part s font public void set Font Font font super set Font font f Label set Font font f Progress Indicator set Font font  setFont setFont fLabel setFont fProgressIndicator setFont
see org eclipse core runtime I Progress Monitor set Task Name java lang String public void set Task Name String name f Task Name name update Label  IProgressMonitor setTaskName setTaskName fTaskName updateLabel
see org eclipse core runtime I Progress Monitor sub Task java lang String public void sub Task String name f Sub Task Name name update Label  IProgressMonitor subTask subTask fSubTaskName updateLabel
Updates the label with the current task and subtask names protected void update Label if blocked Status null String text task Label f Label set Text text else f Label set Text blocked Status get Message Force an update as we are in the UI Thread f Label update  updateLabel blockedStatus taskLabel fLabel setText fLabel setText blockedStatus getMessage fLabel
Return the label for showing tasks return String private String task Label String text f Sub Task Name null f Sub Task Name NON NLS 1 if f Task Name null f Task Name length 0 text J Face Resources format Set SubTask new Object f Task Name text NON NLS 1 return escape Meta Characters text  taskLabel fSubTaskName fSubTaskName fTaskName fTaskName JFaceResources Set_SubTask fTaskName escapeMetaCharacters
Implements code I Progress Monitor worked code see I Progress Monitor worked int public void worked int work internal Worked work  IProgressMonitor IProgressMonitor internalWorked
public void clear Blocked blocked Status null update Label  clearBlocked blockedStatus updateLabel
public void set Blocked I Status reason blocked Status reason update Label  setBlocked IStatus blockedStatus updateLabel

private I Dialog Settings dialog Settings null Creates a new empty wizard protected Wizard super  IDialogSettings dialogSettings
Adds a new page to this wizard The page is inserted at the end of the page list param page the new page public void add Page I Wizard Page page pages add page page set Wizard this  addPage IWizardPage setWizard
The code Wizard code implementation of this code I Wizard code method does nothing Subclasses should extend if extra pages need to be added before the wizard opens New pages should be added by calling code add Page code public void add Pages  IWizard addPage addPages
public boolean can Finish Default implementation is to check if all pages are complete for int i 0 i pages size i if I Wizard Page pages get i is Page Complete return false return true  canFinish IWizardPage isPageComplete
The code Wizard code implementation of this code I Wizard code method creates all the pages controls using code I Dialog Page create Control code Subclasses should reimplement this method if they want to delay creating one or more of the pages lazily The framework ensures that the contents of a page will be created before attempting to show it public void create Page Controls Composite page Container the default behavior is to create all the pages controls for int i 0 i pages size i I Wizard Page page I Wizard Page pages get i page create Control page Container page is responsible for ensuring the created control is accessable via get Control Assert is Not Null page get Control  IWizard IDialogPage createControl createPageControls pageContainer IWizardPage IWizardPage createControl pageContainer getControl isNotNull getControl
The code Wizard code implementation of this code I Wizard code method disposes all the pages controls using code Dialog Page dispose code Subclasses should extend this method if the wizard instance maintains addition SWT resource that need to be disposed public void dispose notify pages for int i 0 i pages size i I Wizard Page pages get i dispose dispose of image if default Image null default Image dispose default Image null  IWizard DialogPage IWizardPage defaultImage defaultImage defaultImage
non Javadoc Method declared on I Wizard public I Wizard Container get Container return container  IWizard IWizardContainer getContainer
public Image get Default Page Image if default Image null return default Image if default Image Descriptor null default Image default Image Descriptor create Image return default Image return J Face Resources get Image Registry get DEFAULT IMAGE  getDefaultPageImage defaultImage defaultImage defaultImageDescriptor defaultImage defaultImageDescriptor createImage defaultImage JFaceResources getImageRegistry DEFAULT_IMAGE
non Javadoc Method declared on I Wizard public I Dialog Settings get Dialog Settings return dialog Settings  IWizard IDialogSettings getDialogSettings dialogSettings
public I Wizard Page get Next Page I Wizard Page page int index pages index Of page if index pages size 1 index 1 last page or page not found return null return I Wizard Page pages get index 1  IWizardPage getNextPage IWizardPage indexOf IWizardPage
public I Wizard Page get Page String name for int i 0 i pages size i I Wizard Page page I Wizard Page pages get i String page Name page get Name if page Name equals name return page return null  IWizardPage getPage IWizardPage IWizardPage pageName getName pageName
non Javadoc Method declared on I Wizard public int get Page Count return pages size  IWizard getPageCount
non Javadoc Method declared on I Wizard public I Wizard Page get Pages return I Wizard Page pages to Array new I Wizard Page pages size  IWizard IWizardPage getPages IWizardPage toArray IWizardPage
public I Wizard Page get Previous Page I Wizard Page page int index pages index Of page if index 0 index 1 first page or page not found return null else return I Wizard Page pages get index 1  IWizardPage getPreviousPage IWizardPage indexOf IWizardPage
Returns the wizard s shell if the wizard is visible Otherwise code null code is returned return Shell public Shell get Shell if container null return null return container get Shell  getShell getShell
public I Wizard Page get Starting Page if pages size 0 return null return I Wizard Page pages get 0  IWizardPage getStartingPage IWizardPage
non Javadoc Method declared on I Wizard public RGB get Title Bar Color return title Bar Color  IWizard getTitleBarColor titleBarColor
non Javadoc Method declared on I Wizard public String get Window Title return window Title  IWizard getWindowTitle windowTitle
non Javadoc Method declared on I Wizard public boolean is Help Available return is Help Available  IWizard isHelpAvailable isHelpAvailable
non Javadoc Method declared on I Wizard public boolean needs Previous And Next Buttons return force Previous And Next Buttons pages size 1  IWizard needsPreviousAndNextButtons forcePreviousAndNextButtons
non Javadoc Method declared on I Wizard public boolean needs Progress Monitor return needs Progress Monitor  IWizard needsProgressMonitor needsProgressMonitor
The code Wizard code implementation of this code I Wizard code method does nothing and returns code true code Subclasses should reimplement this method if they need to perform any special cancel processing for their wizard public boolean perform Cancel return true  IWizard performCancel
Subclasses must implement this code I Wizard code method to perform any special finish processing for their wizard  IWizard
non Javadoc Method declared on I Wizard public void set Container I Wizard Container wizard Container container wizard Container  IWizard setContainer IWizardContainer wizardContainer wizardContainer
Sets the default page image descriptor for this wizard p This image descriptor will be used to generate an image for a page with no image of its own the image will be computed once and cached p param image Descriptor the default page image descriptor public void set Default Page Image Descriptor Image Descriptor image Descriptor default Image Descriptor image Descriptor  imageDescriptor setDefaultPageImageDescriptor ImageDescriptor imageDescriptor defaultImageDescriptor imageDescriptor
Sets the dialog settings for this wizard p The dialog settings is used to record state between wizard invocations for example radio button selection last import directory etc p param settings the dialog settings or code null code if none see get Dialog Settings public void set Dialog Settings I Dialog Settings settings dialog Settings settings  getDialogSettings setDialogSettings IDialogSettings dialogSettings
Controls whether the wizard needs Previous and Next buttons even if it currently contains only one page p This flag should be set on wizards where the first wizard page adds follow on wizard pages based on user input p param b code true code to always show Next and Previous buttons and code false code to suppress Next and Previous buttons for single page wizards public void set Force Previous And Next Buttons boolean b force Previous And Next Buttons b  setForcePreviousAndNextButtons forcePreviousAndNextButtons
Sets whether help is available for this wizard p The result of this method is typically used by the container to show or hide the Help button p param b code true code if help is available and code false code if this wizard is helpless see is Help Available public void set Help Available boolean b is Help Available b  isHelpAvailable setHelpAvailable isHelpAvailable
Sets whether this wizard needs a progress monitor param b code true code if a progress monitor is required and code false code if none is needed see needs Progress Monitor public void set Needs Progress Monitor boolean b needs Progress Monitor b  needsProgressMonitor setNeedsProgressMonitor needsProgressMonitor
Sets the title bar color for this wizard param color the title bar color public void set Title Bar Color RGB color title Bar Color color  setTitleBarColor titleBarColor
Sets the window title for the container that hosts this page to the given string param new Title the window title for the container public void set Window Title String new Title window Title new Title if container null container update Window Title  newTitle setWindowTitle newTitle windowTitle newTitle updateWindowTitle

public int minimum Height 0 Creates new layout object param mw the margin width param mh the margin height param minW the minimum width param minH the minimum height public Page Container Fill Layout int mw int mh int minW int minH margin Width mw margin Height mh minimum Width minW minimum Height minH  minimumHeight PageContainerFillLayout marginWidth marginHeight minimumWidth minimumHeight
public Point compute Size Composite composite int w Hint int h Hint boolean force if w Hint SWT DEFAULT h Hint SWT DEFAULT return new Point w Hint h Hint Point result null Control children composite get Children if children length 0 result new Point 0 0 for int i 0 i children length i Point cp children i compute Size w Hint h Hint force result x Math max result x cp x result y Math max result y cp y result x result x 2 margin Width result y result y 2 margin Height else Rectangle rect composite get Client Area result new Point rect width rect height result x Math max result x minimum Width result y Math max result y minimum Height if w Hint SWT DEFAULT result x w Hint if h Hint SWT DEFAULT result y h Hint return result  computeSize wHint hHint wHint hHint wHint hHint getChildren computeSize wHint hHint marginWidth marginHeight getClientArea minimumWidth minimumHeight wHint wHint hHint hHint
Returns the client area for the given composite according to this layout param c the composite return the client area rectangle public Rectangle get Client Area Composite c Rectangle rect c get Client Area rect x rect x margin Width rect y rect y margin Height rect width rect width 2 margin Width rect height rect height 2 margin Height return rect  getClientArea getClientArea marginWidth marginHeight marginWidth marginHeight
public void layout Composite composite boolean force Rectangle rect get Client Area composite Control children composite get Children for int i 0 i children length i children i set Bounds rect  getClientArea getChildren setBounds
Lays outs the page according to this layout param w the control public void layout Page Control w w set Bounds get Client Area w get Parent  layoutPage setBounds getClientArea getParent
Sets the location of the page so that its origin is in the upper left corner param w the control public void set Page Location Control w w set Location margin Width margin Height  setPageLocation setLocation marginWidth marginHeight
class outside a constructor we do it here cancel Listener new Selection Adapter public void widget Selected Selection Event e cancel Pressed  cancelListener SelectionAdapter widgetSelected SelectionEvent cancelPressed
Creates a new wizard dialog for the given wizard param parent Shell the parent shell param new Wizard the wizard this dialog is working on public Wizard Dialog Shell parent Shell I Wizard new Wizard super parent Shell set Shell Style SWT CLOSE SWT TITLE SWT BORDER SWT APPLICATION MODAL SWT RESIZE set Wizard new Wizard since VA Java can t initialize an instance var with an anonymous class outside a constructor we do it here cancel Listener new Selection Adapter public void widget Selected Selection Event e cancel Pressed  parentShell newWizard WizardDialog parentShell IWizard newWizard parentShell setShellStyle APPLICATION_MODAL setWizard newWizard VAJava cancelListener SelectionAdapter widgetSelected SelectionEvent cancelPressed
About to start a long running operation tiggered through the wizard Shows the progress monitor and disables the wizard s buttons and controls param enable Cancel Button code true code if the Cancel button should be enabled and code false code if it should be disabled return the saved UI state private Object about To Start boolean enable Cancel Button Map saved State null if get Shell null Save focus control Control focus Control get Shell get Display get Focus Control if focus Control null focus Control get Shell get Shell focus Control null boolean needs Progress Monitor wizard needs Progress Monitor cancel Button remove Selection Listener cancel Listener Set the busy cursor to all shells Display d get Shell get Display wait Cursor new Cursor d SWT CURSOR WAIT set Display Cursor wait Cursor Set the arrow cursor to the cancel component arrow Cursor new Cursor d SWT CURSOR ARROW cancel Button set Cursor arrow Cursor Deactivate shell saved State saveUI State needs Progress Monitor enable Cancel Button if focus Control null saved State put FOCUS CONTROL focus Control Attach the progress monitor part to the cancel button if needs Progress Monitor progress Monitor Part attach To Cancel Component cancel Button progress Monitor Part set Visible true return saved State  enableCancelButton aboutToStart enableCancelButton savedState getShell focusControl getShell getDisplay getFocusControl focusControl focusControl getShell getShell focusControl needsProgressMonitor needsProgressMonitor cancelButton removeSelectionListener cancelListener getShell getDisplay waitCursor CURSOR_WAIT setDisplayCursor waitCursor arrowCursor CURSOR_ARROW cancelButton setCursor arrowCursor savedState saveUIState needsProgressMonitor enableCancelButton focusControl savedState FOCUS_CONTROL focusControl needsProgressMonitor progressMonitorPart attachToCancelComponent cancelButton progressMonitorPart setVisible savedState
The Back button has been pressed protected void back Pressed I Wizard Page page current Page get Previous Page if page null should never happen since we have already visited the page return set flag to indicate that we are moving back is Moving To Previous Page true show the page show Page page  backPressed IWizardPage currentPage getPreviousPage isMovingToPreviousPage showPage
protected void button Pressed int button Id switch button Id case I Dialog Constants HELP ID help Pressed break case I Dialog Constants BACK ID back Pressed break case I Dialog Constants NEXT ID next Pressed break case I Dialog Constants FINISH ID finish Pressed break The Cancel button has a listener which calls cancel Pressed directly  buttonPressed buttonId buttonId IDialogConstants HELP_ID helpPressed IDialogConstants BACK_ID backPressed IDialogConstants NEXT_ID nextPressed IDialogConstants FINISH_ID finishPressed cancelPressed
Calculates the difference in size between the given page and the page container A larger page results in a positive delta param page the page return the size difference encoded as a code new Point delta Width delta Height code private Point calculate Page Size Delta I Wizard Page page Control page Control page get Control if page Control null control not created yet return new Point 0 0 Point content Size page Control compute Size SWT DEFAULT SWT DEFAULT true Rectangle rect page Container Layout get Client Area page Container Point container Size new Point rect width rect height return new Point Math max 0 content Size x container Size x Math max 0 content Size y container Size y  deltaWidth deltaHeight calculatePageSizeDelta IWizardPage pageControl getControl pageControl contentSize pageControl computeSize pageContainerLayout getClientArea pageContainer containerSize contentSize containerSize contentSize containerSize
protected void cancel Pressed if active Running Operations 0 Close the dialog The check whether the dialog can be closed or not is done in code ok To Close code This ensures that the check is also evaluated when the user presses the window s close button set Return Code CANCEL close else cancel Button set Enabled false  cancelPressed activeRunningOperations okToClose setReturnCode cancelButton setEnabled
public boolean close if ok To Close return hard Close else return false  okToClose hardClose
new Shell add Help Listener new Help Listener public void help Requested Help Event event call perform help on the current page if current Page null current Page perform Help  newShell addHelpListener HelpListener helpRequested HelpEvent currentPage currentPage performHelp
protected void configure Shell Shell new Shell super configure Shell new Shell Register help listener on the shell new Shell add Help Listener new Help Listener public void help Requested Help Event event call perform help on the current page if current Page null current Page perform Help  configureShell newShell configureShell newShell newShell addHelpListener HelpListener helpRequested HelpEvent currentPage currentPage performHelp
Creates and returns the contents of this dialog s button bar p The code Wizard Dialog code implementation of this framework method prevents the composite s columns from being made equal width in order to remove the margin between the Back and Next buttons p param parent the parent composite to contain the button bar return the button bar control protected Control create Button Bar Composite parent Composite composite Composite super create Button Bar parent Grid Layout composite get Layout make Columns Equal Width false return composite  WizardDialog createButtonBar createButtonBar GridLayout getLayout makeColumnsEqualWidth
protected void create Buttons For Button Bar Composite parent if wizard is Help Available help Button create Button parent I Dialog Constants HELP ID I Dialog Constants HELP LABEL false if wizard needs Previous And Next Buttons create Previous And Next Buttons parent finish Button create Button parent I Dialog Constants FINISH ID I Dialog Constants FINISH LABEL true cancel Button create Cancel Button parent  createButtonsForButtonBar isHelpAvailable helpButton createButton IDialogConstants HELP_ID IDialogConstants HELP_LABEL needsPreviousAndNextButtons createPreviousAndNextButtons finishButton createButton IDialogConstants FINISH_ID IDialogConstants FINISH_LABEL cancelButton createCancelButton
Creates the Cancel button for this wizard dialog Creates a standard code SWT PUSH code button and registers for its selection events Note that the number of columns in the button bar composite is incremented The Cancel button is created specially to give it a removeable listener param parent the parent button bar return the new Cancel button private Button create Cancel Button Composite parent increment the number of columns in the button bar Grid Layout parent get Layout num Columns Button button new Button parent SWT PUSH button set Text I Dialog Constants CANCEL LABEL set Button Layout Data button button set Font parent get Font button set Data new Integer I Dialog Constants CANCEL ID button add Selection Listener cancel Listener return button  createCancelButton GridLayout getLayout numColumns setText IDialogConstants CANCEL_LABEL setButtonLayoutData setFont getFont setData IDialogConstants CANCEL_ID addSelectionListener cancelListener
Return the cancel button if the id is a the cancel id param id the button id return the button corresponding to the button id protected Button get Button int id if id I Dialog Constants CANCEL ID return cancel Button return super get Button id  getButton IDialogConstants CANCEL_ID cancelButton getButton
The code Wizard Dialog code implementation of this code Window code method calls call code I Wizard add Pages code to allow the current wizard to add extra pages then code super create Contents code to create the controls It then calls code I Wizard create Page Controls code to allow the wizard to pre create their page controls prior to opening so that the wizard opens to the correct size And finally it shows the first page protected Control create Contents Composite parent Allow the wizard to add pages to itself Need to call this now so page count is correct for determining if next previous buttons are needed wizard add Pages Control contents super create Contents parent Allow the wizard pages to precreate their page controls create Page Controls Show the first page show Starting Page return contents  WizardDialog IWizard addPages createContents IWizard createPageControls createContents addPages createContents createPageControls showStartingPage
protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent Build the Page container page Container create Page Container composite Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint page Width gd height Hint page Height page Container set Layout Data gd page Container set Font parent get Font Insert a progress monitor Grid Layout pmlayout new Grid Layout pmlayout num Columns 1 progress Monitor Part create Progress Monitor Part composite pmlayout progress Monitor Part set Layout Data new Grid Data Grid Data FILL HORIZONTAL progress Monitor Part set Visible false Build the separator line Label separator new Label composite SWT HORIZONTAL SWT SEPARATOR separator set Layout Data new Grid Data Grid Data FILL HORIZONTAL apply Dialog Font progress Monitor Part return composite  createDialogArea createDialogArea pageContainer createPageContainer GridData GridData GridData FILL_BOTH widthHint pageWidth heightHint pageHeight pageContainer setLayoutData pageContainer setFont getFont GridLayout GridLayout numColumns progressMonitorPart createProgressMonitorPart progressMonitorPart setLayoutData GridData GridData FILL_HORIZONTAL progressMonitorPart setVisible setLayoutData GridData GridData FILL_HORIZONTAL applyDialogFont progressMonitorPart
public void set Blocked I Status reason super set Blocked reason if lockedUI Do not show blocked if we are locking the UI get Blocked Handler show Blocked get Shell this reason current Task  setBlocked IStatus setBlocked getBlockedHandler showBlocked getShell currentTask
public void clear Blocked super clear Blocked if lockedUI Do not vlear if we never set it get Blocked Handler clear Blocked  clearBlocked clearBlocked getBlockedHandler clearBlocked
see org eclipse jface wizard Progress Monitor Part begin Task java lang String int public void begin Task String name int total Work super begin Task name total Work current Task name  ProgressMonitorPart beginTask beginTask totalWork beginTask totalWork currentTask
see org eclipse jface wizard Progress Monitor Part set Task Name java lang String public void set Task Name String name super set Task Name name current Task name  ProgressMonitorPart setTaskName setTaskName setTaskName currentTask
public void sub Task String name super sub Task name If we haven t got anything yet use this value for more context if current Task null current Task name  subTask subTask currentTask currentTask
Create the progress monitor part in the receiver param composite param pmlayout return Progress Monitor Part protected Progress Monitor Part create Progress Monitor Part Composite composite Grid Layout pmlayout return new Progress Monitor Part composite pmlayout SWT DEFAULT String current Task null non Javadoc see org eclipse jface wizard Progress Monitor Part set Blocked org eclipse core runtime I Status public void set Blocked I Status reason super set Blocked reason if lockedUI Do not show blocked if we are locking the UI get Blocked Handler show Blocked get Shell this reason current Task non Javadoc see org eclipse jface wizard Progress Monitor Part clear Blocked public void clear Blocked super clear Blocked if lockedUI Do not vlear if we never set it get Blocked Handler clear Blocked non Javadoc see org eclipse jface wizard Progress Monitor Part begin Task java lang String int public void begin Task String name int total Work super begin Task name total Work current Task name non Javadoc see org eclipse jface wizard Progress Monitor Part set Task Name java lang String public void set Task Name String name super set Task Name name current Task name non Javadoc see org eclipse jface wizard Progress Monitor Part sub Task java lang String public void sub Task String name super sub Task name If we haven t got anything yet use this value for more context if current Task null current Task name  ProgressMonitorPart ProgressMonitorPart createProgressMonitorPart GridLayout ProgressMonitorPart currentTask ProgressMonitorPart setBlocked IStatus setBlocked IStatus setBlocked getBlockedHandler showBlocked getShell currentTask ProgressMonitorPart clearBlocked clearBlocked clearBlocked getBlockedHandler clearBlocked ProgressMonitorPart beginTask beginTask totalWork beginTask totalWork currentTask ProgressMonitorPart setTaskName setTaskName setTaskName currentTask ProgressMonitorPart subTask subTask subTask currentTask currentTask
Creates the container that holds all pages param parent return Composite private Composite create Page Container Composite parent Composite result new Composite parent SWT NULL result set Layout page Container Layout return result  createPageContainer setLayout pageContainerLayout
Allow the wizard s pages to pre create their page controls This allows the wizard dialog to open to the correct size private void create Page Controls Allow the wizard pages to precreate their page controls This allows the wizard to open to the correct size wizard create Page Controls page Container Ensure that all of the created pages are initially not visible I Wizard Page pages wizard get Pages for int i 0 i pages length i I Wizard Page page pages i if page get Control null page get Control set Visible false  createPageControls createPageControls pageContainer IWizardPage getPages IWizardPage getControl getControl setVisible
Creates the Previous and Next buttons for this wizard dialog Creates standard code SWT PUSH code buttons and registers for their selection events Note that the number of columns in the button bar composite is incremented These buttons are created specially to prevent any space between them param parent the parent button bar return a composite containing the new buttons private Composite create Previous And Next Buttons Composite parent increment the number of columns in the button bar Grid Layout parent get Layout num Columns Composite composite new Composite parent SWT NONE create a layout with spacing and margins appropriate for the font size Grid Layout layout new Grid Layout layout num Columns 0 will be incremented by create Button layout margin Width 0 layout margin Height 0 layout horizontal Spacing 0 layout vertical Spacing 0 composite set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN CENTER Grid Data VERTICAL ALIGN CENTER composite set Layout Data data composite set Font parent get Font back Button create Button composite I Dialog Constants BACK ID I Dialog Constants BACK LABEL false next Button create Button composite I Dialog Constants NEXT ID I Dialog Constants NEXT LABEL false return composite  createPreviousAndNextButtons GridLayout getLayout numColumns GridLayout GridLayout numColumns createButton marginWidth marginHeight horizontalSpacing verticalSpacing setLayout GridData GridData GridData HORIZONTAL_ALIGN_CENTER GridData VERTICAL_ALIGN_CENTER setLayoutData setFont getFont backButton createButton IDialogConstants BACK_ID IDialogConstants BACK_LABEL nextButton createButton IDialogConstants NEXT_ID IDialogConstants NEXT_LABEL
Creates and return a new wizard closing dialog without openiong it return Message Dalog private Message Dialog create Wizard Closing Dialog Message Dialog result new Message Dialog get Shell J Face Resources get String Wizard Closing Dialog title NON NLS 1 null J Face Resources get String Wizard Closing Dialog message NON NLS 1 Message Dialog QUESTION new String I Dialog Constants OK LABEL 0 return result  MessageDalog MessageDialog createWizardClosingDialog MessageDialog MessageDialog getShell JFaceResources getString WizardClosingDialog JFaceResources getString WizardClosingDialog MessageDialog IDialogConstants OK_LABEL
The Finish button has been pressed protected void finish Pressed Wizards are added to the nested wizards list in set Wizard This means that the current wizard is always the last wizard in the list Note that we first call the current wizard directly to give it a chance to abort do work and save state then call the remaining n 1 wizards in the list to save state if wizard perform Finish Call perform finish on outer wizards in the nested chain to allow them to save state for example for int i 0 i nested Wizards size 1 i I Wizard nested Wizards get i perform Finish Hard close the dialog set Return Code OK hard Close  finishPressed setWizard performFinish nestedWizards IWizard nestedWizards performFinish setReturnCode hardClose
Method declared on I Wizard Container public I Wizard Page get Current Page return current Page  IWizardContainer IWizardPage getCurrentPage currentPage
Returns the progress monitor for this wizard dialog if it has one return the progress monitor or code null code if this wizard dialog does not have one protected I Progress Monitor get Progress Monitor return progress Monitor Part  IProgressMonitor getProgressMonitor progressMonitorPart
Returns the wizard this dialog is currently displaying return the current wizard protected I Wizard get Wizard return wizard  IWizard getWizard
Closes this window return code true code if the window is or was already closed and code false code if it is still open private boolean hard Close inform wizards for int i 0 i created Wizards size i I Wizard created Wizard I Wizard created Wizards get i created Wizard dispose Remove this dialog as a parent from the managed wizard Note that we do this after calling dispose as the wizard or its pages may need access to the container during dispose code created Wizard set Container null return super close  hardClose createdWizards IWizard createdWizard IWizard createdWizards createdWizard createdWizard setContainer
The Help button has been pressed protected void help Pressed if current Page null current Page perform Help  helpPressed currentPage currentPage performHelp
The Next button has been pressed protected void next Pressed I Wizard Page page current Page get Next Page if page null something must have happend getting the next page return show the next page show Page page  nextPressed IWizardPage currentPage getNextPage showPage
Checks whether it is alright to close this wizard dialog and performed standard cancel processing If there is a long running operation in progress this method posts an alert message saying that the wizard cannot be closed return code true code if it is alright to close this dialog and code false code if it is not private boolean ok To Close if active Running Operations 0 synchronized this window Closing Dialog create Wizard Closing Dialog window Closing Dialog open synchronized this window Closing Dialog null return false return wizard perform Cancel  okToClose activeRunningOperations windowClosingDialog createWizardClosingDialog windowClosingDialog windowClosingDialog performCancel
Restores the enabled disabled state of the given control param w the control param h the map key type code String code element type code Boolean code param key the key see save Enable State And Set private void restore Enable State Control w Map h String key if w null Boolean b Boolean h get key if b null w set Enabled b boolean Value  saveEnableStateAndSet restoreEnableState setEnabled booleanValue
Restores the enabled disabled state of the wizard dialog s buttons and the tree of controls for the currently showing page param state a map containing the saved state as returned by code saveUI State code see saveUI State private void restoreUI State Map state restore Enable State back Button state back NON NLS 1 restore Enable State next Button state next NON NLS 1 restore Enable State finish Button state finish NON NLS 1 restore Enable State cancel Button state cancel NON NLS 1 restore Enable State help Button state help NON NLS 1 Object page Value state get page NON NLS 1 if page Value null page may never have been created Control Enable State page Value restore  saveUIState saveUIState restoreUIState restoreEnableState backButton restoreEnableState nextButton restoreEnableState finishButton restoreEnableState cancelButton restoreEnableState helpButton pageValue pageValue ControlEnableState pageValue
public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception The operation can only be canceled if it is executed in a separate thread Otherwise the UI is blocked anyway Object state null if active Running Operations 0 state about To Start fork cancelable active Running Operations try if fork If we are not forking do not open other dialogs lockedUI true Modal Context run runnable fork get Progress Monitor get Shell get Display lockedUI false finally active Running Operations Stop if this is the last one if state null stopped state  IRunnableWithProgress InvocationTargetException InterruptedException activeRunningOperations aboutToStart activeRunningOperations ModalContext getProgressMonitor getShell getDisplay activeRunningOperations
Saves the enabled disabled state of the given control in the given map which must be modifiable param w the control or code null code if none param h the map key type code String code element type code Boolean code param key the key param enabled code true code to enable the control and code false code to disable it see restore Enable State Control Map String private void save Enable State And Set Control w Map h String key boolean enabled if w null h put key new Boolean w get Enabled w set Enabled enabled  restoreEnableState saveEnableStateAndSet getEnabled setEnabled
Captures and returns the enabled disabled state of the wizard dialog s buttons and the tree of controls for the currently showing page All these controls are disabled in the process with the possible excepton of the Cancel button param keep Cancel Enabled code true code if the Cancel button should remain enabled and code false code if it should be disabled return a map containing the saved state suitable for restoring later with code restoreUI State code see restoreUI State private Map saveUI State boolean keep Cancel Enabled Map saved State new Hash Map 10 save Enable State And Set back Button saved State back false NON NLS 1 save Enable State And Set next Button saved State next false NON NLS 1 save Enable State And Set finish Button saved State finish false NON NLS 1 save Enable State And Set cancel Button saved State cancel keep Cancel Enabled NON NLS 1 save Enable State And Set help Button saved State help false NON NLS 1 if current Page null saved State put page Control Enable State disable current Page get Control NON NLS 1 return saved State  keepCancelEnabled restoreUIState restoreUIState saveUIState keepCancelEnabled savedState HashMap saveEnableStateAndSet backButton savedState saveEnableStateAndSet nextButton savedState saveEnableStateAndSet finishButton savedState saveEnableStateAndSet cancelButton savedState keepCancelEnabled saveEnableStateAndSet helpButton savedState currentPage savedState ControlEnableState currentPage getControl savedState
Sets the given cursor for all shells currently active for this window s display param c the cursor private void set Display Cursor Cursor c Shell shells get Shell get Display get Shells for int i 0 i shells length i shells i set Cursor c  setDisplayCursor getShell getDisplay getShells setCursor
Sets the minimum page size used for the pages param min Width the minimum page width param min Height the minimum page height see set Minimum Page Size Point public void set Minimum Page Size int min Width int min Height Assert is True min Width 0 min Height 0 page Container Layout minimum Width min Width page Container Layout minimum Height min Height  minWidth minHeight setMinimumPageSize setMinimumPageSize minWidth minHeight isTrue minWidth minHeight pageContainerLayout minimumWidth minWidth pageContainerLayout minimumHeight minHeight
Sets the minimum page size used for the pages param size the page size encoded as code new Point width height code see set Minimum Page Size int int public void set Minimum Page Size Point size set Minimum Page Size size x size y  setMinimumPageSize setMinimumPageSize setMinimumPageSize
Sets the size of all pages The given size takes precedence over computed sizes param width the page width param height the page height see set Page Size Point public void set Page Size int width int height page Width width page Height height  setPageSize setPageSize pageWidth pageHeight
Sets the size of all pages The given size takes precedence over computed sizes param size the page size encoded as code new Point width height code see set Page Size int int public void set Page Size Point size set Page Size size x size y  setPageSize setPageSize setPageSize
Sets the wizard this dialog is currently displaying param new Wizard the wizard protected void set Wizard I Wizard new Wizard wizard new Wizard wizard set Container this if created Wizards contains wizard created Wizards add wizard New wizard so just add it to the end of our nested list nested Wizards add wizard if page Container null Dialog is already open Allow the wizard pages to precreate their page controls This allows the wizard to open to the correct size create Page Controls Ensure the dialog is large enough for the wizard update Size For Wizard wizard page Container layout true else We have already seen this wizard if it is the previous wizard on the nested list then we assume we have gone back and remove the last wizard from the list int size nested Wizards size if size 2 nested Wizards get size 2 wizard nested Wizards remove size 1 else Assume we are going forward to revisit a wizard nested Wizards add wizard  newWizard setWizard IWizard newWizard newWizard setContainer createdWizards createdWizards nestedWizards pageContainer createPageControls updateSizeForWizard pageContainer nestedWizards nestedWizards nestedWizards nestedWizards
final I Wizard Page final Page page Busy Indicator show While get Contents get Display new Runnable public void run update For Page final Page  IWizardPage finalPage BusyIndicator showWhile getContents getDisplay updateForPage finalPage
public void show Page I Wizard Page page if page null page current Page return if is Moving To Previous Page remember my previous page page set Previous Page current Page else is Moving To Previous Page false Update for the new page ina busy cursor if possible if get Contents null update For Page page else final I Wizard Page final Page page Busy Indicator show While get Contents get Display new Runnable public void run update For Page final Page  showPage IWizardPage currentPage isMovingToPreviousPage setPreviousPage currentPage isMovingToPreviousPage getContents updateForPage IWizardPage finalPage BusyIndicator showWhile getContents getDisplay updateForPage finalPage
Update the receiver for the new page param page private void update For Page I Wizard Page page ensure this page belongs to the current wizard if wizard page get Wizard set Wizard page get Wizard ensure that page control has been created this allows lazy page control creation if page get Control null page create Control page Container the page is responsible for ensuring the created control is accessable via get Control Assert is Not Null page get Control ensure the dialog is large enough for this page update Size page make the new page visible I Wizard Page old Page current Page current Page page current Page set Visible true if old Page null old Page set Visible false update the dialog controls update  updateForPage IWizardPage getWizard setWizard getWizard getControl createControl pageContainer getControl isNotNull getControl updateSize IWizardPage oldPage currentPage currentPage currentPage setVisible oldPage oldPage setVisible
Shows the starting page of the wizard private void show Starting Page current Page wizard get Starting Page if current Page null something must have happend getting the page return ensure the page control has been created if current Page get Control null current Page create Control page Container the page is responsible for ensuring the created control is accessable via get Control Assert is Not Null current Page get Control we do not need to update the size since the call to initialize bounds has not been made yet make the new page visible current Page set Visible true update the dialog controls update  showStartingPage currentPage getStartingPage currentPage currentPage getControl currentPage createControl pageContainer getControl isNotNull currentPage getControl currentPage setVisible
A long running operation triggered through the wizard was stopped either by user input or by normal end Hides the progress monitor and restores the enable state wizard s buttons and controls param saved State the saved UI state as returned by code about To Start code see about To Start private void stopped Object saved State if get Shell null if wizard needs Progress Monitor progress Monitor Part set Visible false progress Monitor Part remove From Cancel Component cancel Button Map state Map saved State restoreUI State state cancel Button add Selection Listener cancel Listener set Display Cursor null cancel Button set Cursor null wait Cursor dispose wait Cursor null arrow Cursor dispose arrow Cursor null Control focus Control Control state get FOCUS CONTROL if focus Control null focus Control set Focus  savedState aboutToStart aboutToStart savedState getShell needsProgressMonitor progressMonitorPart setVisible progressMonitorPart removeFromCancelComponent cancelButton savedState restoreUIState cancelButton addSelectionListener cancelListener setDisplayCursor cancelButton setCursor waitCursor waitCursor arrowCursor arrowCursor focusControl FOCUS_CONTROL focusControl focusControl setFocus
Updates this dialog s controls to reflect the current page protected void update Update the window title update Window Title Update the title bar update Title Bar Update the buttons update Buttons  updateWindowTitle updateTitleBar updateButtons
public void update Buttons boolean can Flip To Next Page false boolean can Finish wizard can Finish if back Button null back Button set Enabled current Page get Previous Page null if next Button null can Flip To Next Page current Page can Flip To Next Page next Button set Enabled can Flip To Next Page finish Button set Enabled can Finish finish is default unless it is diabled and next is enabled if can Flip To Next Page can Finish get Shell set Default Button next Button else get Shell set Default Button finish Button  updateButtons canFlipToNextPage canFinish canFinish backButton backButton setEnabled currentPage getPreviousPage nextButton canFlipToNextPage currentPage canFlipToNextPage nextButton setEnabled canFlipToNextPage finishButton setEnabled canFinish canFlipToNextPage canFinish getShell setDefaultButton nextButton getShell setDefaultButton finishButton
Update the message line with the page s description p A discription is shown only if there is no message or error message p private void update Description Message page Description current Page get Description if page Message null set Message current Page get Description  updateDescriptionMessage pageDescription currentPage getDescription pageMessage setMessage currentPage getDescription
public void update Message if current Page null return page Message current Page get Message if page Message null current Page instanceof I Message Provider page Message Type I Message Provider current Page get Message Type else page Message Type I Message Provider NONE if page Message null set Message page Description else set Message page Message page Message Type set Error Message current Page get Error Message  updateMessage currentPage pageMessage currentPage getMessage pageMessage currentPage IMessageProvider pageMessageType IMessageProvider currentPage getMessageType pageMessageType IMessageProvider pageMessage setMessage pageDescription setMessage pageMessage pageMessageType setErrorMessage currentPage getErrorMessage
Changes the shell size to the given size ensuring that it is no larger than the display bounds param width the shell width param height the shell height private void set Shell Size int width int height Rectangle size get Shell get Bounds size height height size width width get Shell set Bounds get Constrained Shell Bounds size  setShellSize getShell getBounds getShell setBounds getConstrainedShellBounds
Computes the correct dialog size for the current page and resizes its shell if nessessary Also causes the container to refresh its layout param page the wizard page to use to resize the dialog since 2 0 protected void update Size I Wizard Page page if page null page get Control null return update Size For Page page page Container Layout layout Page page get Control  updateSize IWizardPage getControl updateSizeForPage pageContainerLayout layoutPage getControl
see org eclipse jface wizard I Wizard Container2 update Size public void update Size update Size current Page  IWizardContainer2 updateSize updateSize updateSize currentPage
Computes the correct dialog size for the given page and resizes its shell if nessessary param page the wizard page private void update Size For Page I Wizard Page page ensure the page container is large enough Point delta calculate Page Size Delta page if delta x 0 delta y 0 increase the size of the shell Shell shell get Shell Point shell Size shell get Size set Shell Size shell Size x delta x shell Size y delta y constrain Shell Size  updateSizeForPage IWizardPage calculatePageSizeDelta getShell shellSize getSize setShellSize shellSize shellSize constrainShellSize
Computes the correct dialog size for the given wizard and resizes its shell if nessessary param sizing Wizard the wizard private void update Size For Wizard I Wizard sizing Wizard Point delta new Point 0 0 I Wizard Page pages sizing Wizard get Pages for int i 0 i pages length i ensure the page container is large enough Point page Delta calculate Page Size Delta pages i delta x Math max delta x page Delta x delta y Math max delta y page Delta y if delta x 0 delta y 0 increase the size of the shell Shell shell get Shell Point shell Size shell get Size set Shell Size shell Size x delta x shell Size y delta y  sizingWizard updateSizeForWizard IWizard sizingWizard IWizardPage sizingWizard getPages pageDelta calculatePageSizeDelta pageDelta pageDelta getShell shellSize getSize setShellSize shellSize shellSize
public void update Title Bar String s null if current Page null s current Page get Title if s null s NON NLS 1 set Title s if current Page null set Title Image current Page get Image update Description Message update Message  updateTitleBar currentPage currentPage getTitle setTitle currentPage setTitleImage currentPage getImage updateDescriptionMessage updateMessage
public void update Window Title if get Shell null Not created yet return String title wizard get Window Title if title null title NON NLS 1 get Shell set Text title  updateWindowTitle getShell getWindowTitle getShell setText

Creates a new wizard page with the given name and with no title or image param page Name the name of the page protected Wizard Page String page Name this page Name null Image Descriptor null  pageName WizardPage pageName pageName ImageDescriptor
Creates a new wizard page with the given name title and image param page Name the name of the page param title the title for this wizard page or code null code if none param title Image the image descriptor for the title of this wizard page or code null code if none protected Wizard Page String page Name String title Image Descriptor title Image super title title Image Assert is Not Null page Name page name must not be null name page Name  pageName titleImage WizardPage pageName ImageDescriptor titleImage titleImage isNotNull pageName pageName
The code Wizard Page code implementation of this code I Wizard Page code method returns code true code if this page is complete code is Page Complete code and there is a next page to flip to Subclasses may override extend or reimplement see get Next Page see is Page Complete public boolean can Flip To Next Page return is Page Complete get Next Page null  WizardPage IWizardPage isPageComplete getNextPage isPageComplete canFlipToNextPage isPageComplete getNextPage
Returns the wizard container for this wizard page return the wizard container or code null code if this wizard page has yet to be added to a wizard or the wizard has yet to be added to a container protected I Wizard Container get Container if wizard null return null return wizard get Container  IWizardContainer getContainer getContainer
Returns the dialog settings for this wizard page return the dialog settings or code null code if none protected I Dialog Settings get Dialog Settings if wizard null return null return wizard get Dialog Settings  IDialogSettings getDialogSettings getDialogSettings
public Image get Image Image result super get Image if result null wizard null return wizard get Default Page Image return result  getImage getImage getDefaultPageImage
Method declared on I Wizard Page public String get Name return name  IWizardPage getName
public I Wizard Page get Next Page if wizard null return null return wizard get Next Page this  IWizardPage getNextPage getNextPage
public I Wizard Page get Previous Page if previous Page null return previous Page if wizard null return null return wizard get Previous Page this  IWizardPage getPreviousPage previousPage previousPage getPreviousPage
The code Wizard Page code implementation of this method declared on code Dialog Page code returns the shell of the container The advantage of this implementation is that the shell is accessable once the container is created even though this page s control may not yet be created public Shell get Shell I Wizard Container container get Container if container null return null Ask the wizard since our contents may not have been created return container get Shell  WizardPage DialogPage getShell IWizardContainer getContainer getShell
Method declared on I Wizard Page public I Wizard get Wizard return wizard  IWizardPage IWizard getWizard
Returns whether this page is the current one in the wizard s container return code true code if the page is active and code false code otherwise protected boolean is Current Page return get Container null this get Container get Current Page  isCurrentPage getContainer getContainer getCurrentPage
The code Wizard Page code implementation of this code I Wizard code method returns the value of an internal state variable set by code set Page Complete code Subclasses may extend public boolean is Page Complete return is Page Complete  WizardPage IWizard setPageComplete isPageComplete isPageComplete
The code Wizard Page code implementation of this code I Dialog Page code method extends the code Dialog Page code implementation to update the wizard container title bar Subclasses may extend public void set Description String description super set Description description if is Current Page get Container update Title Bar  WizardPage IDialogPage DialogPage setDescription setDescription isCurrentPage getContainer updateTitleBar
The code Wizard Page code implementation of this method declared on code Dialog Page code updates the container if this is the current page public void set Error Message String new Message super set Error Message new Message if is Current Page get Container update Message  WizardPage DialogPage setErrorMessage newMessage setErrorMessage newMessage isCurrentPage getContainer updateMessage
The code Wizard Page code implementation of this method declared on code Dialog Page code updates the container if this page is the current page public void set Image Descriptor Image Descriptor image super set Image Descriptor image if is Current Page get Container update Title Bar  WizardPage DialogPage setImageDescriptor ImageDescriptor setImageDescriptor isCurrentPage getContainer updateTitleBar
The code Wizard Page code implementation of this method declared on code Dialog Page code updates the container if this is the current page public void set Message String new Message int new Type super set Message new Message new Type if is Current Page get Container update Message  WizardPage DialogPage setMessage newMessage newType setMessage newMessage newType isCurrentPage getContainer updateMessage
Sets whether this page is complete p This information is typically used by the wizard to decide when it is okay to move on to the next page or finish up p param complete code true code if this page is complete and and code false code otherwise see is Page Complete public void set Page Complete boolean complete is Page Complete complete if is Current Page get Container update Buttons  isPageComplete setPageComplete isPageComplete isCurrentPage getContainer updateButtons
Method declared on I Wizard Page public void set Previous Page I Wizard Page page previous Page page  IWizardPage setPreviousPage IWizardPage previousPage
The code Wizard Page code implementation of this code I Dialog Page code method extends the code Dialog Page code implementation to update the wizard container title bar Subclasses may extend public void set Title String title super set Title title if is Current Page get Container update Title Bar  WizardPage IDialogPage DialogPage setTitle setTitle isCurrentPage getContainer updateTitleBar
Method declared on I Wizard Page public void set Wizard I Wizard new Wizard wizard new Wizard  IWizardPage setWizard IWizard newWizard newWizard
Returns a printable representation of this wizard page suitable only for debug purposes public String to String return name  toString

private List selected Wizard Nodes new Array List Creates a new wizard selection page with the given name and with no title or image param page Name the name of the page protected Wizard Selection Page String page Name super page Name Cannot finish from this page set Page Complete false  selectedWizardNodes ArrayList pageName WizardSelectionPage pageName pageName setPageComplete
Adds the given wizard node to the list of selected nodes if it is not already in the list param node the wizard node or code null code private void add Selected Node I Wizard Node node if node null return if selected Wizard Nodes contains node return selected Wizard Nodes add node  addSelectedNode IWizardNode selectedWizardNodes selectedWizardNodes
The code Wizard Selection Page code implementation of this code I Wizard Page code method returns code true code if there is a selected node public boolean can Flip To Next Page return selected Node null  WizardSelectionPage IWizardPage canFlipToNextPage selectedNode
The code Wizard Selection Page code implementation of an code I Dialog Page code method disposes of all nested wizards Subclasses may extend public void dispose super dispose notify nested wizards for int i 0 i selected Wizard Nodes size i I Wizard Node selected Wizard Nodes get i dispose  WizardSelectionPage IDialogPage selectedWizardNodes IWizardNode selectedWizardNodes
The code Wizard Selection Page code implementation of this code I Wizard Page code method returns the first page of the currently selected wizard if there is one public I Wizard Page get Next Page if selected Node null return null boolean is Created selected Node is Content Created I Wizard wizard selected Node get Wizard if wizard null set Selected Node null return null if is Created Allow the wizard to create its pages wizard add Pages return wizard get Starting Page  WizardSelectionPage IWizardPage IWizardPage getNextPage selectedNode isCreated selectedNode isContentCreated IWizard selectedNode getWizard setSelectedNode isCreated addPages getStartingPage
Returns the currently selected wizard node within this page return the wizard node or code null code if no node is selected public I Wizard Node get Selected Node return selected Node  IWizardNode getSelectedNode selectedNode
Sets or clears the currently selected wizard node within this page param node the wizard node or code null code to clear protected void set Selected Node I Wizard Node node add Selected Node node selected Node node if is Current Page get Container update Buttons  setSelectedNode IWizardNode addSelectedNode selectedNode isCurrentPage getContainer updateButtons

Constructs a new change object protected Change 
Returns the human readable name of this change The name em MUST em not be code null code return the human readable name of this change 
Returns whether this change is enabled or not Disabled changes must not be executed return code true code if the change is enabled code false code otherwise public boolean is Enabled return f Is Enabled  isEnabled fIsEnabled
Sets whether this change is enabled or not param enabled code true code to enable this change code false code otherwise public void set Enabled boolean enabled f Is Enabled enabled  setEnabled fIsEnabled
Returns the parent change Returns code null code if no parent exists return the parent change public Change get Parent return f Parent  getParent fParent
Sets the parent of this change Requires that this change isn t already connected to a parent The parent can be code null code to disconnect this change from a parent param parent the parent of this change or code null code package void set Parent Change parent if parent null Assert is True f Parent null f Parent parent  setParent isTrue fParent fParent
Hook method to initialize some internal state to provide an adequate answer for the code is Valid code method This method gets called after a change or a whole change tree has been created p Typically this method is implemented in one of the following ways ul li the change hooks up a listener on some delta notification mechanism and marks itself as invalid if it receives a certain delta Is this the case the implementor must take care of unhooking the listener in code dispose code li li the change remembers some information allowing to decide if a change object is still valid when code is Valid code is called li ul p For example a change object that manipulates the content of an code I File code could either listen to resource changes and detect that the file got changed or it could remember some content stamp and compare it with the actual content stamp when code is Valid code is called p param pm a progress monitor  isValid isValid IFile isValid
Verifies that this change object is still valid and can be executed by calling code perform code If a refactoring status with a severity of link Refactoring Status FATAL is returned then the change has to be treated as invalid and can no longer be executed Performing such a change produces an unspecified result and will very likely throw an exception p This method is also called by the link I Undo Manager Undo Manager to decide if an undo or redo change is still valid and therefore can be executed p param pm a progress monitor return a refactoring status describing the outcome of the validation check throws Core Exception if an error occurred during validation check The change is to be treated as invalid if an exception occurs throws Operation Canceled Exception if the validation check got cancelled  RefactoringStatus IUndoManager UndoManager CoreException OperationCanceledException
Performs this change If this method is call on an invalid or disabled change object the result is unspecified Changes should in general not respond to link I Progress Monitor is Canceled since canceling a change tree in the middle of its execution leaves the workspace in a half changed state param pm a progress monitor return the undo change for this change object or code null code if no undo is provided throws Core Exception if an error occurred during change execution  IProgressMonitor isCanceled CoreException
Disposes this change Subclasses that override this method typically unregister listeners which got registered during the call to code initialize Validation State code p Subclasses may override this method p public void dispose empty default implementation  initializeValidationState
Returns the element modified by this code Change code The method may return code null code if the change isn t related to an element return the element modified by this change 
inherit Doc public Object get Adapter Class adapter if f Parent null return null return f Parent get Adapter adapter  inheritDoc getAdapter fParent fParent getAdapter

Creates a new code Check Conditions Operation code param refactoring the refactoring for which the preconditions are to be checked param style style to define which conditions to check Must be one of code INITIAL CONDITONS code code FINAL CONDITIONS code or code ALL CONDITIONS code public Check Conditions Operation Refactoring refactoring int style Assert is Not Null refactoring f Refactoring refactoring f Style style Assert is True check Style f Style  CheckConditionsOperation INITIAL_CONDITONS FINAL_CONDITIONS ALL_CONDITIONS CheckConditionsOperation isNotNull fRefactoring fStyle isTrue checkStyle fStyle
inherit Doc public void run I Progress Monitor pm throws Core Exception if pm null pm new Null Progress Monitor try f Status null if f Style ALL CONDITIONS ALL CONDITIONS f Status f Refactoring check All Conditions pm else if f Style INITIAL CONDITONS INITIAL CONDITONS f Status f Refactoring check Initial Conditions pm else if f Style FINAL CONDITIONS FINAL CONDITIONS f Status f Refactoring check Final Conditions pm finally pm done  inheritDoc IProgressMonitor CoreException NullProgressMonitor fStatus fStyle ALL_CONDITIONS ALL_CONDITIONS fStatus fRefactoring checkAllConditions fStyle INITIAL_CONDITONS INITIAL_CONDITONS fStatus fRefactoring checkInitialConditions fStyle FINAL_CONDITIONS FINAL_CONDITIONS fStatus fRefactoring checkFinalConditions
Returns the outcome of the operation or code null code if an exception has occurred while performing the operation or if the operation hasn t been performed yet return the link Refactoring Status of the condition checking public Refactoring Status get Status return f Status  RefactoringStatus RefactoringStatus getStatus fStatus
Returns the operation s refactoring return the operation s refactoring public Refactoring get Refactoring return f Refactoring  getRefactoring fRefactoring
Returns the condition checking style return the condition checking style public int get Style return f Style  getStyle fStyle
private boolean check Style int style return style NONE style LAST  checkStyle

Creates a new composite change with the given name param name the human readable name of the change Will be used to display the change in the user interface public Composite Change String name this name new Array List 2  CompositeChange ArrayList
Creates a new composite change with the given name and array of children param name the human readable name of the change Will be used to display the change in the user interface param children the initial array of children public Composite Change String name Change children this name new Array List children length add All children  CompositeChange ArrayList addAll
private Composite Change String name List changes Assert is Not Null changes Assert is Not Null name f Changes changes f Name name  CompositeChange isNotNull isNotNull fChanges fName
Returns whether this change is synthetic or not return code true code if this change is synthetic otherwise code false code public boolean is Synthetic return f Is Synthetic  isSynthetic fIsSynthetic
Marks this change as synthetic public void mark As Synthetic f Is Synthetic true  markAsSynthetic fIsSynthetic
inherit Doc public String get Name return f Name  inheritDoc getName fName
Adds the given change to the list of children The change to be added can be code null code Adding a null change does nothing param change the change to add public void add Change change if change null Assert is True change get Parent null f Changes add change change set Parent this  isTrue getParent fChanges setParent
Adds all changes in the given array to the list of children param changes the changes to add public void add All Change changes for int i 0 i changes length i add changes i  addAll
Merges the children of the given composite change into this change This means the changes are removed from the given composite change and added to this change param change the change to merge public void merge Composite Change change Change others change get Children for int i 0 i others length i Change other others i change remove other add other  CompositeChange getChildren
Removes the given change from the list of children param change the change to remove return code true code if the change contained the given child otherwise code false code is returned public boolean remove Change change Assert is Not Null change boolean result f Changes remove change if result change set Parent null return result  isNotNull fChanges setParent
Returns the children managed by this composite change return the children of this change or an empty array if no children exist public Change get Children This is false code There is only one write access to f Changes in this code and this is in the private constructor Composite Change String name List changes And this one ensures that f Changes is not null Code should be removed after 3 0 if f Changes null return null return Change f Changes to Array new Change f Changes size  getChildren fChanges CompositeChange fChanges fChanges fChanges toArray fChanges
inherit Doc p The composite change sends code set Enabled code to all its children p p Client are allowed to extend this method p public void set Enabled boolean enabled for Iterator iter f Changes iterator iter has Next Change iter next set Enabled enabled  inheritDoc setEnabled setEnabled fChanges hasNext setEnabled
inherit Doc p The composite change sends code initialize Validation Data code to all its children p p Client are allowed to extend this method p public void initialize Validation Data I Progress Monitor pm pm begin Task f Changes size NON NLS 1 for Iterator iter f Changes iterator iter has Next Change change Change iter next change initialize Validation Data new Sub Progress Monitor pm 1 pm worked 1  inheritDoc initializeValidationData initializeValidationData IProgressMonitor beginTask fChanges fChanges hasNext initializeValidationData SubProgressMonitor
inherit Doc p The composite change sends code is Valid code to all its children until the first one returns a status with a severity of code FATAL code If one of the children throws an exception the remaining children will not receive the code is Valid code call p p Client are allowed to extend this method p public Refactoring Status is Valid I Progress Monitor pm throws Core Exception Refactoring Status result new Refactoring Status pm begin Task f Changes size NON NLS 1 for Iterator iter f Changes iterator iter has Next result has Fatal Error Change change Change iter next if change is Enabled result merge change is Valid new Sub Progress Monitor pm 1 else pm worked 1 if pm is Canceled throw new Operation Canceled Exception pm done return result  inheritDoc isValid isValid RefactoringStatus isValid IProgressMonitor CoreException RefactoringStatus RefactoringStatus beginTask fChanges fChanges hasNext hasFatalError isEnabled isValid SubProgressMonitor isCanceled OperationCanceledException
final Change change To Dispose change Platform run new I Safe Runnable public void run throws Exception change To Dispose dispose  changeToDispose ISafeRunnable changeToDispose
change To Dispose dispose public void handle Exception Throwable exception Refactoring Core Plugin log exception  changeToDispose handleException RefactoringCorePlugin
inherit Doc p The composite change sends code perform code to all its em enabled em children If one of the children throws an exception the remaining children will not receive the code perform code call In this case the method code get Undo Until Exception code can be used to get an undo object containing the undo objects of all executed children p p Client are allowed to extend this method p public Change perform I Progress Monitor pm throws Core Exception f Undo Until Exception null List undos new Array List f Changes size pm begin Task f Changes size NON NLS 1 pm set Task Name Refactoring Core Messages get String Composite Change performing Changes Task name NON NLS 1 Change change null try for Iterator iter f Changes iterator iter has Next change Change iter next if change is Enabled Change undo Change change perform new Sub Progress Monitor pm 1 if undos null if undo Change null undos null else undos add undo Change remove the change from the list of children to give the garbage collector the change to collect the change This ensures that the memory consumption doesn t go up when producing the undo change tree iter remove Make sure we dispose the change since it will now longer be in the list of children when call Composite Change dispose final Change change To Dispose change Platform run new I Safe Runnable public void run throws Exception change To Dispose dispose public void handle Exception Throwable exception Refactoring Core Plugin log exception if undos null Collections reverse undos return create Undo Change Change undos to Array new Change undos size else return null catch Core Exception e handle Undos change undos internal Handle Exception change e throw e catch Runtime Exception e handle Undos change undos internal Handle Exception change e throw e  inheritDoc getUndoUntilException IProgressMonitor CoreException fUndoUntilException ArrayList fChanges beginTask fChanges setTaskName RefactoringCoreMessages getString CompositeChange performingChangesTask fChanges hasNext isEnabled undoChange SubProgressMonitor undoChange undoChange CompositeChange changeToDispose ISafeRunnable changeToDispose handleException RefactoringCorePlugin createUndoChange toArray CoreException handleUndos internalHandleException RuntimeException handleUndos internalHandleException
private void handle Undos Change failed Change List undos if undos null f Undo Until Exception null return if failed Change instanceof Composite Change Change part Undo Change Composite Change failed Change get Undo Until Exception if part Undo Change null undos add part Undo Change if undos size 0 f Undo Until Exception new Null Change get Name return Collections reverse undos f Undo Until Exception create Undo Change Change undos to Array new Change undos size  handleUndos failedChange fUndoUntilException failedChange CompositeChange partUndoChange CompositeChange failedChange getUndoUntilException partUndoChange partUndoChange fUndoUntilException NullChange getName fUndoUntilException createUndoChange toArray
Note this is an internal method and should not be overridden outside of the refacotring framework p The method gets called if one of the changes managed by this composite change generates and exception when performed p param change the change that caused the exception param t the exception itself protected void internal Handle Exception Change change Throwable t do nothing  internalHandleException
final Change change Change iter next Platform run new I Safe Runnable public void run throws Exception change dispose  ISafeRunnable
change dispose public void handle Exception Throwable exception Refactoring Core Plugin log exception  handleException RefactoringCorePlugin
inherit Doc p The composite change sends code dispose code to all its children It is guaranteed that all children receive the code dispose code call p public void dispose for Iterator iter f Changes iterator iter has Next final Change change Change iter next Platform run new I Safe Runnable public void run throws Exception change dispose public void handle Exception Throwable exception Refactoring Core Plugin log exception  inheritDoc fChanges hasNext ISafeRunnable handleException RefactoringCorePlugin
Returns the undo object containing all undo changes of those children that got successfully executed while performing this change Returns code null code if all changes were executed successfully p This method is not intended to be overridden or extended p return the undo object containing all undo changes of those children that got successfully executed while performing this change public Change get Undo Until Exception return f Undo Until Exception  getUndoUntilException fUndoUntilException
Hook to create an undo change The method should be overridden by clients which provide their own composite change to create a corresponding undo change param child Undos the child undo The undos appear in the list in the reverse order of their execution So the first change in the array is the undo change of the last change that got executed return the undo change protected Change create Undo Change Change child Undos return new Composite Change get Name child Undos  childUndos createUndoChange childUndos CompositeChange getName childUndos
inherit Doc public Object get Modified Element return null  inheritDoc getModifiedElement
public String to String String Buffer buff new String Buffer buff append get Name buff append n NON NLS 1 for Iterator iter f Changes iterator iter has Next buff append append iter next to String append n NON NLS 2 NON NLS 1 return buff to String  toString StringBuffer StringBuffer getName fChanges hasNext toString toString

Checks whether the stamp is the null stamp or not A null stamp is generated for files which either don t exist or exist in a closed project return whether the stamp is the null stamp or not 

Creates a new operation with the given refactoring No condition checking is performed before creating the change object It is assumed that the condition checking has already been performed outside of this operation The operation might fail if the precondition checking has not been performed yet param refactoring the refactoring for which the change is to be created public Create Change Operation Refactoring refactoring Assert is Not Null refactoring f Refactoring refactoring  CreateChangeOperation isNotNull fRefactoring
Creates a new operation with the given link Check Conditions Operation When performed the operation first checks the conditions as specified by the code Check Conditions Operation code Depending on the result of the condition checking a change object is created or not param operation the condition checking operation param check Failed Severity the severity from which on the condition checking is interpreted as failed The passed value must be greater than link Refactoring Status OK and less than or equal link Refactoring Status FATAL The standard value from which on a condition check should is to be interpreted as failed can be accessed via link Refactoring Core get Condition Checking Failed Severity public Create Change Operation Check Conditions Operation operation int check Failed Severity Assert is Not Null operation f Check Condition Operation operation f Refactoring operation get Refactoring Assert is True check Failed Severity Refactoring Status OK check Failed Severity Refactoring Status FATAL f Condition Checking Failed Severity check Failed Severity  CheckConditionsOperation CheckConditionsOperation checkFailedSeverity RefactoringStatus RefactoringStatus RefactoringCore getConditionCheckingFailedSeverity CreateChangeOperation CheckConditionsOperation checkFailedSeverity isNotNull fCheckConditionOperation fRefactoring getRefactoring isTrue checkFailedSeverity RefactoringStatus checkFailedSeverity RefactoringStatus fConditionCheckingFailedSeverity checkFailedSeverity
Returns the condition checking failed severity used by this operation return the condition checking failed severity see Refactoring Status public int get Condition Checking Failed Severity return f Condition Checking Failed Severity  RefactoringStatus getConditionCheckingFailedSeverity fConditionCheckingFailedSeverity
inherit Doc public void run I Progress Monitor pm throws Core Exception if pm null pm new Null Progress Monitor f Change null try f Change null if f Check Condition Operation null pm begin Task 7 NON NLS 1 pm sub Task NON NLS 1 f Check Condition Operation run new Sub Progress Monitor pm 4 Refactoring Status status f Check Condition Operation get Status if status null status get Severity f Condition Checking Failed Severity f Change f Refactoring create Change new Sub Progress Monitor pm 2 f Change initialize Validation Data new Not Cancelable Progress Monitor new Sub Progress Monitor pm 1 else pm worked 3 else pm begin Task 3 NON NLS 1 f Change f Refactoring create Change new Sub Progress Monitor pm 2 f Change initialize Validation Data new Not Cancelable Progress Monitor new Sub Progress Monitor pm 1 finally pm done  inheritDoc IProgressMonitor CoreException NullProgressMonitor fChange fChange fCheckConditionOperation beginTask subTask fCheckConditionOperation SubProgressMonitor RefactoringStatus fCheckConditionOperation getStatus getSeverity fConditionCheckingFailedSeverity fChange fRefactoring createChange SubProgressMonitor fChange initializeValidationData NotCancelableProgressMonitor SubProgressMonitor beginTask fChange fRefactoring createChange SubProgressMonitor fChange initializeValidationData NotCancelableProgressMonitor SubProgressMonitor
Returns the outcome of the operation or code null code if an exception occurred when performing the operation or the operation hasn t been performed yet return the created change or code null code public Change get Change return f Change  getChange fChange
Returns the status of the condition checking Returns code null code if no condition checking has been requested return the status of the condition checking public Refactoring Status get Condition Checking Status if f Check Condition Operation null return f Check Condition Operation get Status return null  RefactoringStatus getConditionCheckingStatus fCheckConditionOperation fCheckConditionOperation getStatus
Returns the condition checking style as set to the link Check Conditions Operation If no condition checking operation is provided e g the change is created directly by calling link Refactoring create Change I Progress Monitor then link Check Conditions Operation NONE is returned return the condition checking style public int get Condition Checking Style if f Check Condition Operation null return f Check Condition Operation get Style return Check Conditions Operation NONE  CheckConditionsOperation createChange IProgressMonitor CheckConditionsOperation getConditionCheckingStyle fCheckConditionOperation fCheckConditionOperation getStyle CheckConditionsOperation

Creates a new code Document Change code for the given link I Document param name the change s name Has to be a human readable name param document the document this change is working on public Document Change String name I Document document super name Assert is Not Null document f Document document  DocumentChange IDocument DocumentChange IDocument isNotNull fDocument
inherit Doc public Object get Modified Element return f Document  inheritDoc getModifiedElement fDocument
inherit Doc public void initialize Validation Data I Progress Monitor pm as long as we don t have modification stamps on documents we can only remember its length f Length f Document get Length  inheritDoc initializeValidationData IProgressMonitor fLength fDocument getLength
inherit Doc public Refactoring Status is Valid I Progress Monitor pm throws Core Exception pm begin Task 1 NON NLS 1 Refactoring Status result Text Changes is Valid f Document f Length pm worked 1 return result  inheritDoc RefactoringStatus isValid IProgressMonitor CoreException beginTask RefactoringStatus TextChanges isValid fDocument fLength
inherit Doc protected I Document acquire Document I Progress Monitor pm throws Core Exception return f Document  inheritDoc IDocument acquireDocument IProgressMonitor CoreException fDocument
inherit Doc protected void commit I Document document I Progress Monitor pm throws Core Exception do nothing  inheritDoc IDocument IProgressMonitor CoreException
inherit Doc protected void release Document I Document document I Progress Monitor pm throws Core Exception do nothing  inheritDoc releaseDocument IDocument IProgressMonitor CoreException
inherit Doc protected Change create Undo Change Undo Edit edit return new Undo Document Change get Name f Document edit  inheritDoc createUndoChange UndoEdit UndoDocumentChange getName fDocument

Creates an status entry context for the given file and source region param file the file that has caused the problem Must not be code null code param region the source region of the problem inside the given file or code null code if now source region is known public File Status Context I File file I Region region Assert is Not Null file f File file f Source Region region  FileStatusContext IFile IRegion isNotNull fFile fSourceRegion
Returns the context s file return the context s file public I File get File return f File  IFile getFile fFile
Returns the context s source region return the context s source region or code null code if no source region has been set public I Region get Text Region return f Source Region  IRegion getTextRegion fSourceRegion
Method declared on Refactoring Status Context public Object get Corresponding Element return get File  RefactoringStatusContext getCorrespondingElement getFile

Adds a listener to the undo manager Does nothing if the listener is already present param listener the listener to be added to the undo manager 
Removes the given listener from this undo manager Does nothing if the listener isn t registered with this undo manager param listener the listener to be removed 
The infrastructure is going to perform the given change param change the change to be performed 
The infrastructure has performed the given change param change the change that was performed 
Adds a new undo change to this undo manager param name the name presented on the undo stack for the provided undo change The name must be human readable param change the undo change 
Returns code true code if there is anything to undo otherwise code false code return code true code if there is anything to undo otherwise code false code 
Returns the name of the top most undo return the top most undo name Returns code null code if there aren t any changes to undo 
Undo the top most undo change param query a proceed query to decide how to proceed if the validation checking of the undo change to perform returns a non OK status and the status isn t a fatal error If code null code is passed in the the undo proceeds if the status is not a fatal error param pm a progress monitor to report progress during performing the undo change throws Core Exception if performing the undo caused an exception  CoreException
Returns code true code if there is anything to redo otherwise code false code return code true code if there is anything to redo otherwise code false code 
Returns the name of the top most redo return the top most redo name Returns code null code if there are no any changes to redo 
Redo the top most redo change param query a proceed query to decide how to proceed if the validation checking of the redo change to perform returns a non OK status If code null code is passed in the the undo proceeds if the status is not a fatal error param pm a progress monitor to report progress during performing the redo change throws Core Exception if performing the redo caused an exception  CoreException
public void perform Redo I Validation Check Result Query query I Progress Monitor pm throws Core Exception Flushes the undo manager s undo and redo stacks public void flush  performRedo IValidationCheckResultQuery IProgressMonitor CoreException
public void flush Shut down the undo manager public void shutdown 

This method is called by the undo manager if the undo stack has changed for example a undo object got added or the undo stack got flushed param manager the manager this listener is registered to 
This method is called by the undo manager if the redo stack has changed for example a redo object got added or the redo stack got flushed param manager the manager this listener is registered to 
This method gets called by the undo manager if a change gets executed in the context of the undo manager param manager the manager this listener is registered to param change the change to be executed 
This method gets called by the undo manager when a change has been executed in the context of the undo manager param manager the manager this listener is registered to param change the change that has been executed 

Returns whether the undo proceeds or not This method is called if the validation check returned a status greater than code OK code and less than code FATAL code param status the refactoring status returned from link Change is Valid I Progress Monitor return code true code if the undo should proceed code false code otherwise  isValid IProgressMonitor
Called when the validation check returned a fatal error In this case the undo can t proceed The hook can be used to present a corresponding dialog to the user param status the refactoring status returned from link Change is Valid I Progress Monitor  isValid IProgressMonitor

Creates a new code Null Change code with a default name public Null Change this Refactoring Core Messages get String Null Change name NON NLS 1  NullChange NullChange RefactoringCoreMessages getString NullChange
Creates a new code Null Change code with the given name param name the human readable name of this change public Null Change String name Assert is Not Null name f Name name  NullChange NullChange isNotNull fName
inherit Doc public String get Name return f Name  inheritDoc getName fName
inherit Doc public void initialize Validation Data I Progress Monitor pm do nothing  inheritDoc initializeValidationData IProgressMonitor
inherit Doc public Refactoring Status is Valid I Progress Monitor pm throws Core Exception return new Refactoring Status  inheritDoc RefactoringStatus isValid IProgressMonitor CoreException RefactoringStatus
inherit Doc public Change perform I Progress Monitor pm throws Core Exception return new Null Change  inheritDoc IProgressMonitor CoreException NullChange
inherit Doc public Object get Modified Element return null  inheritDoc getModifiedElement

Returns the condition checker of the given type param clazz the type of the condition checker return the condition checker or code null code if no checker is registered for the given type public I Condition Checker get Checker Class clazz return I Condition Checker f Checkers get clazz  IConditionChecker getChecker IConditionChecker fCheckers
Adds the given condition checker An exception will be thrown if a checker of the same type already exists in this context param checker the checker to add throws Core Exception if a checker of the same type already exists public void add I Condition Checker checker throws Core Exception Object old f Checkers put checker get Class checker if old null f Checkers put checker get Class old throw new Core Exception new Status I Status ERROR Refactoring Core Plugin get Plugin Id I Refactoring Core Status Codes CHECKER ALREADY EXISTS IN CONTEXT Refactoring Core Messages get Formatted String Check Condition Context error checker exists checker get Class to String NON NLS 1 null  CoreException IConditionChecker CoreException fCheckers getClass fCheckers getClass CoreException IStatus RefactoringCorePlugin getPluginId IRefactoringCoreStatusCodes CHECKER_ALREADY_EXISTS_IN_CONTEXT RefactoringCoreMessages getFormattedString CheckConditionContext checker_exists getClass toString
Checks the condition of all registered condition checkers and returns a merge status result param pm a progress monitor or code null code if no progress reporting is desired return the combined status result throws Core Exception if an error occurs during condition checking public Refactoring Status check I Progress Monitor pm throws Core Exception if pm null pm new Null Progress Monitor Refactoring Status result new Refactoring Status Collection values f Checkers values pm begin Task values size NON NLS 1 for Iterator iter values iterator iter has Next I Condition Checker checker I Condition Checker iter next result merge checker check new Sub Progress Monitor pm 1 if pm is Canceled throw new Operation Canceled Exception return result  CoreException RefactoringStatus IProgressMonitor CoreException NullProgressMonitor RefactoringStatus RefactoringStatus fCheckers beginTask hasNext IConditionChecker IConditionChecker SubProgressMonitor isCanceled OperationCanceledException

Creates a new create arguments object public Create Arguments  CreateArguments

inherit Doc protected final void initialize Refactoring Arguments arguments f Arguments Create Arguments arguments  inheritDoc RefactoringArguments fArguments CreateArguments
Returns the create arguments return the create arguments public Create Arguments get Arguments return f Arguments  CreateArguments getArguments fArguments

Creates a new delete arguments object public Delete Arguments  DeleteArguments

inherit Doc protected final void initialize Refactoring Arguments arguments f Arguments Delete Arguments arguments  inheritDoc RefactoringArguments fArguments DeleteArguments
Returns the delete arguments return the delete arguments public Delete Arguments get Arguments return f Arguments  DeleteArguments getArguments fArguments

Constructs a new delete refactoring for the given processor param processor the delete processor public Delete Refactoring Delete Processor processor Assert is Not Null processor f Processor processor  DeleteRefactoring DeleteProcessor isNotNull fProcessor
inherit Doc public Refactoring Processor get Processor return f Processor  inheritDoc RefactoringProcessor getProcessor fProcessor

Performs the actual condition checking param monitor a progress monitor to report progress return the outcome of the condition check throws Core Exception if an error occurred during condition checking The check is interpreted as failed if this happens  CoreException

Adds the given element and argument to the refactoring participant param element the element to add param arguments the corresponding arguments 

Creates new rename arguments param destination the destination of the move param update References code true code if reference updating is requested code false code otherwise public Move Arguments Object destination boolean update References Assert is Not Null destination f Destination destination f Update References update References  updateReferences MoveArguments updateReferences isNotNull fDestination fUpdateReferences updateReferences
Returns the destination of the move return the move s destination public Object get Destination return f Destination  getDestination fDestination
Returns whether reference updating is requested or not return returns code true code if reference updating is requested code false code otherwise public boolean get Update References return f Update References  getUpdateReferences fUpdateReferences

inherit Doc protected final void initialize Refactoring Arguments arguments f Arguments Move Arguments arguments  inheritDoc RefactoringArguments fArguments MoveArguments
Returns the move arguments return the move arguments public Move Arguments get Arguments return f Arguments  MoveArguments getArguments fArguments

Creates a new move refactoring with the given move processor param processor the move processor public Move Refactoring Move Processor processor Assert is Not Null processor f Processor processor  MoveRefactoring MoveProcessor isNotNull fProcessor
Returns the move processor associated with this move refactoring return returns the move processor associated with this move refactoring public Move Processor get Move Processor return f Processor  MoveProcessor getMoveProcessor fProcessor
inherit Doc public Refactoring Processor get Processor return f Processor  inheritDoc RefactoringProcessor getProcessor fProcessor

public Participant Extension Point String name String participant Id Class clazz Assert is Not Null name Assert is Not Null participant Id Assert is Not Null clazz f Name name f ParticipantID participant Id f Participant Class clazz  ParticipantExtensionPoint participantId isNotNull isNotNull participantId isNotNull fName fParticipantID participantId fParticipantClass
public String get Name return f Name  getName fName
public Refactoring Participant get Participants Refactoring Status status Refactoring Processor processor Object element Refactoring Arguments arguments String affected Natures Sharable Participants shared if f Participants null init Evaluation Context eval Context create Evaluation Context processor element affected Natures List result new Array List for Iterator iter f Participants iterator iter has Next Participant Descriptor descriptor Participant Descriptor iter next if descriptor is Enabled iter remove else try if descriptor matches eval Context Refactoring Participant participant shared get descriptor if participant null I Sharable Participant participant add Element element arguments else try participant descriptor create Participant if f Participant Class is Instance participant throw new Class Cast Exception if participant initialize processor element arguments participant set Descriptor descriptor result add participant if participant instanceof I Sharable Participant shared put descriptor participant catch Class Cast Exception e status add Error Refactoring Core Messages get Formatted String Participant Extension Point participant removed NON NLS 1 descriptor get Name Refactoring Core Plugin log Error Message Refactoring Core Messages get Formatted String Participant Extension Point wrong type NON NLS 1 new String descriptor get Name f Participant Class get Name iter remove catch Core Exception e status add Error Refactoring Core Messages get Formatted String Participant Extension Point participant removed NON NLS 1 descriptor get Name Refactoring Core Plugin log Removed Participant descriptor e iter remove return Refactoring Participant result to Array new Refactoring Participant result size  RefactoringParticipant getParticipants RefactoringStatus RefactoringProcessor RefactoringArguments affectedNatures SharableParticipants fParticipants EvaluationContext evalContext createEvaluationContext affectedNatures ArrayList fParticipants hasNext ParticipantDescriptor ParticipantDescriptor isEnabled evalContext RefactoringParticipant ISharableParticipant addElement createParticipant fParticipantClass isInstance ClassCastException setDescriptor ISharableParticipant ClassCastException addError RefactoringCoreMessages getFormattedString ParticipantExtensionPoint participant_removed getName RefactoringCorePlugin logErrorMessage RefactoringCoreMessages getFormattedString ParticipantExtensionPoint wrong_type getName fParticipantClass getName CoreException addError RefactoringCoreMessages getFormattedString ParticipantExtensionPoint participant_removed getName RefactoringCorePlugin logRemovedParticipant RefactoringParticipant toArray RefactoringParticipant
private void init I Extension Registry registry Platform get Extension Registry I Configuration Element ces registry get Configuration Elements For Refactoring Core Plugin get Plugin Id f ParticipantID f Participants new Array List ces length for int i 0 i ces length i Participant Descriptor descriptor new Participant Descriptor ces i I Status status descriptor check Syntax switch status get Severity case I Status ERROR Refactoring Core Plugin log status break case I Status WARNING case I Status INFO Refactoring Core Plugin log status fall through default f Participants add descriptor  IExtensionRegistry getExtensionRegistry IConfigurationElement getConfigurationElementsFor RefactoringCorePlugin getPluginId fParticipantID fParticipants ArrayList ParticipantDescriptor ParticipantDescriptor IStatus checkSyntax getSeverity IStatus RefactoringCorePlugin IStatus IStatus RefactoringCorePlugin fParticipants
private static Evaluation Context create Evaluation Context Refactoring Processor processor Object element String affected Natures Evaluation Context result new Evaluation Context null element result add Variable element element NON NLS 1 result add Variable affected Natures Arrays as List affected Natures NON NLS 1 result add Variable processor Identifier processor get Identifier NON NLS 1 return result  EvaluationContext createEvaluationContext RefactoringProcessor affectedNatures EvaluationContext EvaluationContext addVariable addVariable affectedNatures asList affectedNatures addVariable processorIdentifier getIdentifier

public class Participant Manager private Participant Manager no instance  ParticipantManager ParticipantManager
Loads the rename participants for the given element param status a refactoring status to report status if problems occurred while loading the participants param processor the processor that will own the participants param element the element to be renamed param arguments the rename arguments describing the rename param affected Natures an array of project natures affected by the refactoring param shared a list of shared participants return an array of rename participants public static Rename Participant load Rename Participants Refactoring Status status Refactoring Processor processor Object element Rename Arguments arguments String affected Natures Sharable Participants shared Refactoring Participant participants fg Rename Instance get Participants status processor element arguments affected Natures shared Rename Participant result new Rename Participant participants length System arraycopy participants 0 result 0 participants length return result  affectedNatures RenameParticipant loadRenameParticipants RefactoringStatus RefactoringProcessor RenameArguments affectedNatures SharableParticipants RefactoringParticipant fgRenameInstance getParticipants affectedNatures RenameParticipant RenameParticipant
Loads the move participants for the given element param status a refactoring status to report status if problems occurred while loading the participants param processor the processor that will own the participants param element the element to be moved param arguments the move arguments describing the move param affected Natures an array of project natures affected by the refactoring param shared a list of shared participants return an array of move participants public static Move Participant load Move Participants Refactoring Status status Refactoring Processor processor Object element Move Arguments arguments String affected Natures Sharable Participants shared Refactoring Participant participants fg Move Extensions get Participants status processor element arguments affected Natures shared Move Participant result new Move Participant participants length System arraycopy participants 0 result 0 participants length return result  affectedNatures MoveParticipant loadMoveParticipants RefactoringStatus RefactoringProcessor MoveArguments affectedNatures SharableParticipants RefactoringParticipant fgMoveExtensions getParticipants affectedNatures MoveParticipant MoveParticipant
Loads the delete participants for the given element param status a refactoring status to report status if problems occurred while loading the participants param processor the processor that will own the participants param element the element to be deleted param arguments the delete arguments describing the delete param affected Natures an array of project natures affected by the refactoring param shared a list of shared participants return an array of delete participants public static Delete Participant load Delete Participants Refactoring Status status Refactoring Processor processor Object element Delete Arguments arguments String affected Natures Sharable Participants shared Refactoring Participant participants fg Delete Instance get Participants status processor element arguments affected Natures shared Delete Participant result new Delete Participant participants length System arraycopy participants 0 result 0 participants length return result  affectedNatures DeleteParticipant loadDeleteParticipants RefactoringStatus RefactoringProcessor DeleteArguments affectedNatures SharableParticipants RefactoringParticipant fgDeleteInstance getParticipants affectedNatures DeleteParticipant DeleteParticipant
Loads the create participants for the given element param status a refactoring status to report status if problems occurred while loading the participants param processor the processor that will own the participants param element the element to be created or a corresponding descriptor param arguments the create arguments describing the create param affected Natures an array of project natures affected by the refactoring param shared a list of shared participants return an array of create participants public static Create Participant load Create Participants Refactoring Status status Refactoring Processor processor Object element Create Arguments arguments String affected Natures Sharable Participants shared Refactoring Participant participants fg Create Instance get Participants status processor element arguments affected Natures shared Create Participant result new Create Participant participants length System arraycopy participants 0 result 0 participants length return result  affectedNatures CreateParticipant loadCreateParticipants RefactoringStatus RefactoringProcessor CreateArguments affectedNatures SharableParticipants RefactoringParticipant fgCreateInstance getParticipants affectedNatures CreateParticipant CreateParticipant

private static class Processor Change extends Composite Change private Map f Participant Map public Processor Change String name super name  ProcessorChange CompositeChange fParticipantMap ProcessorChange
super name public void set Participant Map Map map f Participant Map map  setParticipantMap fParticipantMap
protected void internal Handle Exception Change change Throwable e Refactoring Participant participant Refactoring Participant f Participant Map get change if participant null Participant Descriptor descriptor participant get Descriptor descriptor disable Refactoring Core Plugin log Removed Participant descriptor e  internalHandleException RefactoringParticipant RefactoringParticipant fParticipantMap ParticipantDescriptor getDescriptor RefactoringCorePlugin logRemovedParticipant
Creates a new processor based refactoring protected Processor Based Refactoring  ProcessorBasedRefactoring
Return the processor associated with this refactoring The method must not return code null code return the processor associated with this refactoring 
Checks whether the refactoring is applicable to the elements to be refactored or not p This default implementation forwards the call to the refactoring processor p return code true code if the refactoring is applicable to the elements otherwise code false code is returned throws Core Exception if the test fails public final boolean is Applicable throws Core Exception return get Processor is Applicable  CoreException isApplicable CoreException getProcessor isApplicable
inherit Doc public String get Name return get Processor get Processor Name  inheritDoc getName getProcessor getProcessorName
inherit Doc public Refactoring Status check Initial Conditions I Progress Monitor pm throws Core Exception if pm null pm new Null Progress Monitor Refactoring Status result new Refactoring Status pm begin Task 10 NON NLS 1 pm set Task Name Refactoring Core Messages get String Processor Based Refactoring initial conditions NON NLS 1 result merge get Processor check Initial Conditions new Sub Progress Monitor pm 8 if result has Fatal Error pm done return result pm done return result  inheritDoc RefactoringStatus checkInitialConditions IProgressMonitor CoreException NullProgressMonitor RefactoringStatus RefactoringStatus beginTask setTaskName RefactoringCoreMessages getString ProcessorBasedRefactoring initial_conditions getProcessor checkInitialConditions SubProgressMonitor hasFatalError
inherit Doc public Refactoring Status check Final Conditions I Progress Monitor pm throws Core Exception if pm null pm new Null Progress Monitor Refactoring Status result new Refactoring Status Check Conditions Context context create Check Conditions Context pm begin Task 9 NON NLS 1 pm set Task Name Refactoring Core Messages get String Processor Based Refactoring final conditions NON NLS 1 result merge get Processor check Final Conditions new Sub Progress Monitor pm 5 context if result has Fatal Error pm done return result if pm is Canceled throw new Operation Canceled Exception f Participants get Processor load Participants result f Shared Participants if f Participants null f Participants EMPTY PARTICIPANTS if result has Fatal Error pm done return result I Progress Monitor sm new Sub Progress Monitor pm 2 sm begin Task f Participants length NON NLS 1 for int i 0 i f Participants length result has Fatal Error i result merge f Participants i check Conditions new Sub Progress Monitor sm 1 context if sm is Canceled throw new Operation Canceled Exception sm done if result has Fatal Error pm done return result result merge context check new Sub Progress Monitor pm 1 pm done return result  inheritDoc RefactoringStatus checkFinalConditions IProgressMonitor CoreException NullProgressMonitor RefactoringStatus RefactoringStatus CheckConditionsContext createCheckConditionsContext beginTask setTaskName RefactoringCoreMessages getString ProcessorBasedRefactoring final_conditions getProcessor checkFinalConditions SubProgressMonitor hasFatalError isCanceled OperationCanceledException fParticipants getProcessor loadParticipants fSharedParticipants fParticipants fParticipants EMPTY_PARTICIPANTS hasFatalError IProgressMonitor SubProgressMonitor beginTask fParticipants fParticipants hasFatalError fParticipants checkConditions SubProgressMonitor isCanceled OperationCanceledException hasFatalError SubProgressMonitor
inherit Doc public Change create Change I Progress Monitor pm throws Core Exception if pm null pm new Null Progress Monitor pm begin Task f Participants length 2 NON NLS 1 pm set Task Name Refactoring Core Messages get String Processor Based Refactoring create change NON NLS 1 Change processor Change get Processor create Change new Sub Progress Monitor pm 1 if pm is Canceled throw new Operation Canceled Exception List changes new Array List Map participant Map new Hash Map for int i 0 i f Participants length i final Refactoring Participant participant f Participants i try Change change participant create Change new Sub Progress Monitor pm 1 if change null changes add change participant Map put change participant catch Core Exception e disable Participant participant e throw e catch Runtime Exception e disable Participant participant e throw e if pm is Canceled throw new Operation Canceled Exception Change post Change get Processor post Create Change Change changes to Array new Change changes size new Sub Progress Monitor pm 1 Processor Change result new Processor Change get Name result add processor Change result add All Change changes to Array new Change changes size result set Participant Map participant Map if post Change null result add post Change return result  inheritDoc createChange IProgressMonitor CoreException NullProgressMonitor beginTask fParticipants setTaskName RefactoringCoreMessages getString ProcessorBasedRefactoring create_change processorChange getProcessor createChange SubProgressMonitor isCanceled OperationCanceledException ArrayList participantMap HashMap fParticipants RefactoringParticipant fParticipants createChange SubProgressMonitor participantMap CoreException disableParticipant RuntimeException disableParticipant isCanceled OperationCanceledException postChange getProcessor postCreateChange toArray SubProgressMonitor ProcessorChange ProcessorChange getName processorChange addAll toArray setParticipantMap participantMap postChange postChange
Adapts the refactoring to the given type The adapter is resolved as follows ol li the refactoring itself is checked whether it is an instance of the requested type li li its processor is checked whether it is an instance of the requested type li li the request is delegated to the super class li ol param clazz the adapter class to look up return the requested adapter or code null code if no adapter exists public Object get Adapter Class clazz if clazz is Instance this return this if clazz is Instance get Processor return get Processor return super get Adapter clazz  getAdapter isInstance isInstance getProcessor getProcessor getAdapter
for debugging only public String to String return get Name  toString getName
private Check Conditions Context create Check Conditions Context throws Core Exception Check Conditions Context result new Check Conditions Context I Condition Checker checker new Validate Edit Checker get Validation Context result add checker return result  CheckConditionsContext createCheckConditionsContext CoreException CheckConditionsContext CheckConditionsContext IConditionChecker ValidateEditChecker getValidationContext
private void disable Participant final Refactoring Participant participant Throwable e Participant Descriptor descriptor participant get Descriptor descriptor disable Refactoring Core Plugin log Removed Participant descriptor e  disableParticipant RefactoringParticipant ParticipantDescriptor getDescriptor RefactoringCorePlugin logRemovedParticipant

Creates new refactoring arguments protected Refactoring Arguments  RefactoringArguments

Returns the processor that is associated with this participant return the processor that is associated with this participant public Refactoring Processor get Processor return f Processor  RefactoringProcessor getProcessor fProcessor
Initializes the participant This method is called by the framework when a participant gets instantiated p This method isn t intended to be extended or reimplemented by clients p param processor the processor this participant is associated with param element the element to be refactored param arguments the refactoring arguments return code true code if the participant could be initialized otherwise code false code is returned If code false code is returned then the participant will not be added to the refactoring see initialize Object public boolean initialize Refactoring Processor processor Object element Refactoring Arguments arguments Assert is Not Null processor Assert is Not Null arguments f Processor processor initialize arguments return initialize element  RefactoringProcessor RefactoringArguments isNotNull isNotNull fProcessor
Initializes the participant with the element to be refactored If this method returns code false code then the framework will consider the participant as not being initialized and the participant will be dropped by the framework param element the element to be refactored return code true code if the participant could be initialized otherwise code false code is returned 
Initializes the participant with the refactoring arguments param arguments the refactoring arguments 
Returns a human readable name of this participant return a human readable name 
Checks the conditions of the refactoring participant p The refactoring is considered as not being executable if the returned status has the severity of code Refactoring Status FATAL code p p This method can be called more than once p param pm a progress monitor to report progress param context a condition checking context to collect shared condition checks return a refactoring status If the status is code Refactoring Status FATAL code the refactoring is considered as not being executable throws Operation Canceled Exception if the condition checking got cancelled see org eclipse ltk core refactoring Refactoring check Initial Conditions I Progress Monitor see Refactoring Status FATAL  RefactoringStatus RefactoringStatus OperationCanceledException checkInitialConditions IProgressMonitor RefactoringStatus
Creates a link Change object that contains the workspace modifications of this participant The changes provided by a participant em must em not conflict with any change provided by other participants or by the refactoring itself p If the change conflicts with any change provided by other participants or by the refactoring itself then change execution will fail and the participant will be disabled for the rest of the eclipse session p p If an exception occurs while creating the change the refactoring can not be carried out and the participant will be disabled for the rest of the eclipse session p param pm a progress monitor to report progress return the change representing the workspace modifications throws Core Exception if an error occurred while creating the change throws Operation Canceled Exception if the condition checking got cancelled  CoreException OperationCanceledException
helper method package void set Descriptor Participant Descriptor descriptor Assert is Not Null descriptor f Descriptor descriptor  setDescriptor ParticipantDescriptor isNotNull fDescriptor
package Participant Descriptor get Descriptor return f Descriptor  ParticipantDescriptor getDescriptor fDescriptor

Returns an array containing the elements to be refactored The concrete type of the elements depend on the concrete refactoring processor For example a processor responsible for renaming Java methods returns the method to be renamed via this call return an array containing the element to be refactored 
Returns the unique identifier of the refactoring processor The identifier must not be code null code return a unique identifier 
Returns a human readable name The name will be displayed to users The name must not be code null code return a human readable name 
Checks whether the processor is applicable to the elements to be refactored or not If code false code is returned the processor is interpreted to be unusable return code true code if the processor is applicable to the elements otherwise code false code is returned throws Core Exception is the test fails The processor is treated as unusable if this method throws an exception  CoreException
Checks some initial conditions based on the element to be refactored p The refactoring using this processor is considered as not being executable if the returned status has the severity of code Refactoring Status FATAL code p p This method can be called more than once p param pm a progress monitor to report progress Although availability checks are supposed to execute fast there can be certain situations where progress reporting is necessary For example rebuilding a corrupted index may report progress return a refactoring status If the status is code Refactoring Status FATAL code the refactoring is considered as not being executable throws Core Exception if an exception occurred during initial condition checking If this happens the initial condition checking is interpreted as failed throws Operation Canceled Exception if the condition checking got cancelled see org eclipse ltk core refactoring Refactoring check Initial Conditions I Progress Monitor see Refactoring Status FATAL  RefactoringStatus RefactoringStatus CoreException OperationCanceledException checkInitialConditions IProgressMonitor RefactoringStatus
Checks the final conditions based on the element to be refactored p The refactoring using this processor is considered as not being executable if the returned status has the severity of code Refactoring Status FATAL code p p This method can be called more than once p param pm a progress monitor to report progress param context a condition checking context to collect shared condition checks return a refactoring status If the status is code Refactoring Status FATAL code the refactoring is considered as not being executable throws Core Exception if an exception occurred during final condition checking If this happens the final condition checking is interpreted as failed throws Operation Canceled Exception if the condition checking got cancelled see org eclipse ltk core refactoring Refactoring check Final Conditions I Progress Monitor see Refactoring Status FATAL public abstract Refactoring Status check Final Conditions I Progress Monitor pm Check Conditions Context context  RefactoringStatus RefactoringStatus CoreException OperationCanceledException checkFinalConditions IProgressMonitor RefactoringStatus RefactoringStatus checkFinalConditions IProgressMonitor CheckConditionsContext
Creates a link Change object describing the workspace modifications the processor contributes to the overall refactoring param pm a progress monitor to report progress return the change representing the workspace modifications of the processor throws Core Exception if an error occurred while creating the change throws Operation Canceled Exception if the condition checking got cancelled see org eclipse ltk core refactoring Refactoring create Change I Progress Monitor  CoreException OperationCanceledException createChange IProgressMonitor
Additional hook allowing processor s to add changes to the set of workspace modifications after all participant changes have been created param participant Changes an array containing the changes created by the participants param pm a progress monitor to report progress return change representing additional workspace modifications throws Core Exception if an error occurred while creating the post change throws Operation Canceled Exception if the condition checking got cancelled see create Change I Progress Monitor public Change post Create Change Change participant Changes I Progress Monitor pm throws Core Exception Operation Canceled Exception return null  participantChanges CoreException OperationCanceledException createChange IProgressMonitor postCreateChange participantChanges IProgressMonitor CoreException OperationCanceledException
Returns the array of participants It is up to the implementor of a concrete processor to define which participants are loaded In general three different kinds of participants can be distinguished ul li participants listening to the processed refactoring itself For example if a Java field gets renamed all participants listening to Java field renames should be added via this hook li li participants listening to changes of derived elements For example if a Java field gets renamed corresponding setter and getters methods are renamed as well The setter and getter methods are considered as derived elements and the corresponding participants should be added via this hook li li participants listening to changes of a domain model different than the one that gets manipulated but changed as a side effect of the refactoring For example renaming a package moves all its files to a different folder If the package contains a HTML file then the rename package processor is supposed to load all move HTML file participants via this hook li ul p Implementors are responsible to initialize the created participants with the right arguments The method is called after link check Final Conditions I Progress Monitor Check Conditions Context has been called on the processor itself p param status a refactoring status to report status if problems occur while loading the participants param shared Participants a list of sharable participants Implementors of this method can simply pass this instance to the corresponding participant loading methods defined in link Participant Manager return an array of participants or code null code or an empty array if no participants are loaded throws Core Exception if creating or loading of the participants failed see I Sharable Participant  checkFinalConditions IProgressMonitor CheckConditionsContext sharedParticipants ParticipantManager CoreException ISharableParticipant

Creates new rename arguments param new Name the new name of the element to be renamed param update References code true code if reference updating is requested code false code otherwise public Rename Arguments String new Name boolean update References Assert is Not Null new Name f New Name new Name f Update References update References  newName updateReferences RenameArguments newName updateReferences isNotNull newName fNewName newName fUpdateReferences updateReferences
Returns the new element name return the new element name public String get New Name return f New Name  getNewName fNewName
Returns whether reference updating is requested or not return returns code true code if reference updating is requested code false code otherwise public boolean get Update References return f Update References  getUpdateReferences fUpdateReferences

inherit Doc protected final void initialize Refactoring Arguments arguments f Arguments Rename Arguments arguments  inheritDoc RefactoringArguments fArguments RenameArguments
Returns the rename arguments return the rename arguments public Rename Arguments get Arguments return f Arguments  RenameArguments getArguments fArguments

Creates a new rename refactoring with the given rename processor param processor the rename processor public Rename Refactoring Rename Processor processor Assert is Not Null processor f Processor processor  RenameRefactoring RenameProcessor isNotNull fProcessor
inherit Doc public Refactoring Processor get Processor return f Processor  inheritDoc RefactoringProcessor getProcessor fProcessor

private Map f Map new Hash Map package void put Participant Descriptor descriptor Refactoring Participant participant f Map put descriptor participant  fMap HashMap ParticipantDescriptor RefactoringParticipant fMap
f Map put descriptor participant package Refactoring Participant get Participant Descriptor descriptor return Refactoring Participant f Map get descriptor  fMap RefactoringParticipant ParticipantDescriptor RefactoringParticipant fMap

The context passed to the validate edit call param context the code org eclipse swt widgets Shell code that is to be used to parent any dialogs with the user or code null code if there is no UI context declared as an code Object code to avoid any direct references on the SWT component see org eclipse core resources I Workspace validate Edit org eclipse core resources I File java lang Object public Validate Edit Checker Object context f Context context  IWorkspace validateEdit IFile ValidateEditChecker fContext
Adds the given file to this checker param file the file to add public void add File I File file Assert is Not Null file f Files add file  addFile IFile isNotNull fFiles
Adds the given array of files param files the array of files to add public void add Files I File files Assert is Not Null files f Files add All Arrays as List files  addFiles IFile isNotNull fFiles addAll asList
inherit Doc public Refactoring Status check I Progress Monitor monitor throws Core Exception if monitor null monitor new Null Progress Monitor I Resource resources I Resource f Files to Array new I Resource f Files size Refactoring Status result new Refactoring Status I Status status Resources check In Sync resources if status isOK result merge Refactoring Status create status status Resources make Committable resources f Context if status isOK result merge Refactoring Status create status if result has Fatal Error result add Fatal Error Refactoring Core Messages get String Validate Edit Checker failed NON NLS 1 return result  inheritDoc RefactoringStatus IProgressMonitor CoreException NullProgressMonitor IResource IResource fFiles toArray IResource fFiles RefactoringStatus RefactoringStatus IStatus checkInSync RefactoringStatus makeCommittable fContext RefactoringStatus hasFatalError addFatalError RefactoringCoreMessages getString ValidateEditChecker

Creates a new perform change operation instance for the given change param change the change to be applied to the workbench public Perform Change Operation Change change Assert is Not Null change f Change change  PerformChangeOperation isNotNull fChange
Creates a new code Perform Change Operation code for the given link Create Change Operation The create change operation is used to create the actual change to execute param op the code Create Change Operation code used to create the actual change object public Perform Change Operation Create Change Operation op Assert is Not Null op f Create Change Operation op  PerformChangeOperation CreateChangeOperation CreateChangeOperation PerformChangeOperation CreateChangeOperation isNotNull fCreateChangeOperation
Returns code true code if the change execution failed return code true code if the change execution failed code false code otherwise public boolean change Execution Failed return f Change Execution Failed  changeExecutionFailed fChangeExecutionFailed
Returns code true code if the change has been executed Otherwise code false code is returned return code true code if the change has been executed otherwise code false code public boolean change Executed return f Change Executed  changeExecuted fChangeExecuted
Returns the status of the condition checking Returns code null code if no condition checking has been requested return the status of the condition checking public Refactoring Status get Condition Checking Status if f Create Change Operation null return f Create Change Operation get Condition Checking Status return null  RefactoringStatus getConditionCheckingStatus fCreateChangeOperation fCreateChangeOperation getConditionCheckingStatus
Returns the change used by this operation This is either the change passed to the constructor or the one create by the code Create Change Operation code Method returns code null code if the create operation did not create a corresponding change or hasn t been executed yet return the change used by this operation or code null code if no change has been created public Change get Change return f Change  CreateChangeOperation getChange fChange
Returns the undo change of the change performed by this operation Returns code null code if the change hasn t been performed yet or if the change doesn t provide a undo return the undo change of the performed change or code null code public Change get Undo Change return f Undo Change  getUndoChange fUndoChange
Returns the refactoring status returned from the call code I Change is Valid code Returns code null code if the change has not been executed return the change s validation status public Refactoring Status get Validation Status return f Validation Status  IChange isValid RefactoringStatus getValidationStatus fValidationStatus
Sets the undo manager If the executed change provides an undo change then the undo change is pushed onto this manager param manager the undo manager to use or code null code if no undo recording is desired param undo Name the name used to present the undo change on the undo stack Must be a human readable string Must not be code null code if manager is unequal code null code public void set Undo Manager I Undo Manager manager String undo Name if manager null Assert is Not Null undo Name f Undo Manager manager f Undo Name undo Name  undoName setUndoManager IUndoManager undoName isNotNull undoName fUndoManager fUndoName undoName
inherit Doc public void run I Progress Monitor pm throws Core Exception if pm null pm new Null Progress Monitor try f Change Executed false if create Change pm begin Task 2 NON NLS 1 pm sub Task NON NLS 1 f Create Change Operation run new Sub Progress Monitor pm 1 f Change f Create Change Operation get Change if f Change null execute Change new Sub Progress Monitor pm 1 else pm worked 1 else execute Change pm finally pm done  inheritDoc IProgressMonitor CoreException NullProgressMonitor fChangeExecuted createChange beginTask subTask fCreateChangeOperation SubProgressMonitor fChange fCreateChangeOperation getChange fChange executeChange SubProgressMonitor executeChange
I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception boolean undo Initialized false try monitor begin Task 10 NON NLS 1 f Validation Status f Change is Valid new Sub Progress Monitor monitor 1 if f Validation Status has Fatal Error return if f Undo Manager null Resources Plugin get Workspace checkpoint false f Undo Manager about To Perform Change f Change f Change Execution Failed true f Undo Change f Change perform new Sub Progress Monitor monitor 9 f Change Execution Failed false f Change Executed true if f Undo Manager null Resources Plugin get Workspace checkpoint false f Undo Manager change Performed f Change f Change dispose if f Undo Change null f Undo Change initialize Validation Data new Not Cancelable Progress Monitor new Sub Progress Monitor monitor 1 undo Initialized true if f Undo Manager null if f Undo Change null f Undo Manager add Undo f Undo Name f Undo Change else f Undo Manager flush catch Core Exception e if f Undo Manager null f Undo Manager flush if f Undo Change null undo Initialized Change ch f Undo Change f Undo Change null ch dispose f Undo Change null throw e catch Runtime Exception e if f Undo Manager null f Undo Manager flush if f Undo Change null undo Initialized Change ch f Undo Change f Undo Change null ch dispose f Undo Change null throw e finally monitor done  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException undoInitialized beginTask fValidationStatus fChange isValid SubProgressMonitor fValidationStatus hasFatalError fUndoManager ResourcesPlugin getWorkspace fUndoManager aboutToPerformChange fChange fChangeExecutionFailed fUndoChange fChange SubProgressMonitor fChangeExecutionFailed fChangeExecuted fUndoManager ResourcesPlugin getWorkspace fUndoManager changePerformed fChange fChange fUndoChange fUndoChange initializeValidationData NotCancelableProgressMonitor SubProgressMonitor undoInitialized fUndoManager fUndoChange fUndoManager addUndo fUndoName fUndoChange fUndoManager CoreException fUndoManager fUndoManager fUndoChange undoInitialized fUndoChange fUndoChange fUndoChange RuntimeException fUndoManager fUndoManager fUndoChange undoInitialized fUndoChange fUndoChange fUndoChange
Actually executes the change param pm a progress monitor to report progress throws Core Exception if an unexpected error occurs during change execution protected void execute Change I Progress Monitor pm throws Core Exception f Change Executed false if f Change is Enabled return I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception boolean undo Initialized false try monitor begin Task 10 NON NLS 1 f Validation Status f Change is Valid new Sub Progress Monitor monitor 1 if f Validation Status has Fatal Error return if f Undo Manager null Resources Plugin get Workspace checkpoint false f Undo Manager about To Perform Change f Change f Change Execution Failed true f Undo Change f Change perform new Sub Progress Monitor monitor 9 f Change Execution Failed false f Change Executed true if f Undo Manager null Resources Plugin get Workspace checkpoint false f Undo Manager change Performed f Change f Change dispose if f Undo Change null f Undo Change initialize Validation Data new Not Cancelable Progress Monitor new Sub Progress Monitor monitor 1 undo Initialized true if f Undo Manager null if f Undo Change null f Undo Manager add Undo f Undo Name f Undo Change else f Undo Manager flush catch Core Exception e if f Undo Manager null f Undo Manager flush if f Undo Change null undo Initialized Change ch f Undo Change f Undo Change null ch dispose f Undo Change null throw e catch Runtime Exception e if f Undo Manager null f Undo Manager flush if f Undo Change null undo Initialized Change ch f Undo Change f Undo Change null ch dispose f Undo Change null throw e finally monitor done Resources Plugin get Workspace run runnable pm  CoreException executeChange IProgressMonitor CoreException fChangeExecuted fChange isEnabled IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException undoInitialized beginTask fValidationStatus fChange isValid SubProgressMonitor fValidationStatus hasFatalError fUndoManager ResourcesPlugin getWorkspace fUndoManager aboutToPerformChange fChange fChangeExecutionFailed fUndoChange fChange SubProgressMonitor fChangeExecutionFailed fChangeExecuted fUndoManager ResourcesPlugin getWorkspace fUndoManager changePerformed fChange fChange fUndoChange fUndoChange initializeValidationData NotCancelableProgressMonitor SubProgressMonitor undoInitialized fUndoManager fUndoChange fUndoManager addUndo fUndoName fUndoChange fUndoManager CoreException fUndoManager fUndoManager fUndoChange undoInitialized fUndoChange fUndoChange fUndoChange RuntimeException fUndoManager fUndoManager fUndoChange undoInitialized fUndoChange fUndoChange fUndoChange ResourcesPlugin getWorkspace
private boolean create Change return f Create Change Operation null  createChange fCreateChangeOperation

Create a new perform refactoring operation The operation will not perform the refactoring if the refactoring s condition checking returns an errorof severity link Refactoring Status FATAL param refactoring the refactoring to perform param style the condition checking style as defined by link Check Conditions Operation public Perform Refactoring Operation Refactoring refactoring int style Assert is Not Null refactoring f Refactoring refactoring f Style style  RefactoringStatus CheckConditionsOperation PerformRefactoringOperation isNotNull fRefactoring fStyle
Return the refactoring status of the condition checking return the refactoring status of the condition checking or code null code if the operation hasn t been performed yet public Refactoring Status get Condition Status return f Precondition Status  RefactoringStatus getConditionStatus fPreconditionStatus
Returns the refactoring status of the change s validation checking or code null code if a change couldn t be created or the operation hasn t been performed yet return the refactoring status of the change s validation checking public Refactoring Status get Validation Status return f Validation Status  RefactoringStatus getValidationStatus fValidationStatus
The undo object or code null code if no undo exists The undo object is initialize via the call link Change initialize Validation Data I Progress Monitor return the undo object or code null code public Change get Undo Change return f Undo  initializeValidationData IProgressMonitor getUndoChange fUndo
inherit Doc public void run I Progress Monitor monitor throws Core Exception if monitor null monitor new Null Progress Monitor monitor begin Task 10 NON NLS 1 Create Change Operation create new Create Change Operation new Check Conditions Operation f Refactoring f Style Refactoring Status FATAL create run new Sub Progress Monitor monitor 6 f Precondition Status create get Condition Checking Status if f Precondition Status has Fatal Error monitor done return Change change create get Change Perform Change Operation perform new Perform Change Operation change perform set Undo Manager Refactoring Core get Undo Manager f Refactoring get Name perform run new Sub Progress Monitor monitor 2 f Validation Status perform get Validation Status f Undo perform get Undo Change  inheritDoc IProgressMonitor CoreException NullProgressMonitor beginTask CreateChangeOperation CreateChangeOperation CheckConditionsOperation fRefactoring fStyle RefactoringStatus SubProgressMonitor fPreconditionStatus getConditionCheckingStatus fPreconditionStatus hasFatalError getChange PerformChangeOperation PerformChangeOperation setUndoManager RefactoringCore getUndoManager fRefactoring getName SubProgressMonitor fValidationStatus getValidationStatus fUndo getUndoChange

Sets the validation context used when calling link org eclipse core resources I Workspace validate Edit org eclipse core resources I File java lang Object param context the code org eclipse swt widgets Shell code that is to be used to parent any dialogs with the user or code null code if there is no UI context declared as an code Object code to avoid any direct references on the SWT component public final void set Validation Context Object context f Validation Context context  IWorkspace validateEdit IFile setValidationContext fValidationContext
Returns the validation context return the validation context or code null code if no validation context has been set public final Object get Validation Context return f Validation Context  getValidationContext fValidationContext
Returns the refactoring s name return the refactoring s human readable name Must not be code null code 
Checks all conditions This implementation calls code check Initial Conditions code and code check Final Conditions code p Subclasses may extend this method to provide additional condition checks p param pm a progress monitor to report progress return a refactoring status If the status is code Refactoring Status FATAL code the refactoring has to be considered as not being executable throws Core Exception if an exception occurred during condition checking If this happens then the condition checking has to be interpreted as failed throws Operation Canceled Exception if the condition checking got cancelled see check Initial Conditions I Progress Monitor see check Final Conditions I Progress Monitor public Refactoring Status check All Conditions I Progress Monitor pm throws Core Exception Operation Canceled Exception pm begin Task 11 NON NLS 1 Refactoring Status result new Refactoring Status result merge check Initial Conditions new Sub Progress Monitor pm 1 if result has Fatal Error if pm is Canceled throw new Operation Canceled Exception result merge check Final Conditions new Sub Progress Monitor pm 10 pm done return result  checkInitialConditions checkFinalConditions RefactoringStatus CoreException OperationCanceledException checkInitialConditions IProgressMonitor checkFinalConditions IProgressMonitor RefactoringStatus checkAllConditions IProgressMonitor CoreException OperationCanceledException beginTask RefactoringStatus RefactoringStatus checkInitialConditions SubProgressMonitor hasFatalError isCanceled OperationCanceledException checkFinalConditions SubProgressMonitor
Checks some initial conditions based on the element to be refactored The method is typically called by the UI to perform an initial checks after an action has been executed p The refactoring has to be considered as not being executable if the returned status has the severity of code Refactoring Status FATAL code p p This method can be called more than once p param pm a progress monitor to report progress Although initial checks are supposed to execute fast there can be certain situations where progress reporting is necessary For example rebuilding a corrupted index may report progress return a refactoring status If the status is code Refactoring Status FATAL code the refactoring has to be considered as not being executable throws Core Exception if an exception occurred during initial condition checking If this happens then the initial condition checking has to be interpreted as failed throws Operation Canceled Exception if the condition checking got cancelled see check Final Conditions I Progress Monitor see Refactoring Status FATAL  RefactoringStatus RefactoringStatus CoreException OperationCanceledException checkFinalConditions IProgressMonitor RefactoringStatus
After code check Initial Conditions code has been performed and the user has provided all input necessary to perform the refactoring this method is called to check the remaining preconditions p The refactoring has to be considered as not being executable if the returned status has the severity of code Refactoring Status FATAL code p p This method can be called more than once p param pm a progress monitor to report progress return a refactoring status If the status is code Refactoring Status FATAL code the refactoring is considered as not being executable throws Core Exception if an exception occurred during final condition checking If this happens then the final condition checking is interpreted as failed throws Operation Canceled Exception if the condition checking got cancelled see check Initial Conditions I Progress Monitor see Refactoring Status FATAL  checkInitialConditions RefactoringStatus RefactoringStatus CoreException OperationCanceledException checkInitialConditions IProgressMonitor RefactoringStatus
Creates a link Change object that performs the actual workspace transformation param pm a progress monitor to report progress return the change representing the workspace modifications of the refactoring throws Core Exception if an error occurred while creating the change throws Operation Canceled Exception if the condition checking got cancelled  CoreException OperationCanceledException
inherit Doc public Object get Adapter Class adapter if adapter is Instance this return this return super get Adapter adapter  inheritDoc getAdapter isInstance getAdapter
for debugging only public String to String return get Name  toString getName

private static I Undo Manager fg Undo Manager null private Refactoring Core no instance  IUndoManager fgUndoManager RefactoringCore
Returns the singleton undo manager for the refactoring undo stack return the refactoring undo manager public static I Undo Manager get Undo Manager if fg Undo Manager null fg Undo Manager create Undo Manager return fg Undo Manager  IUndoManager getUndoManager fgUndoManager fgUndoManager createUndoManager fgUndoManager
When condition checking is performed for a refactoring then the condition check is interpreted as failed if the refactoring status severity return from the condition checking operation is equal or greater than the value returned by this method return the condition checking failed severity public static int get Condition Checking Failed Severity return Refactoring Core Preferences get Stop Severity  getConditionCheckingFailedSeverity RefactoringCorePreferences getStopSeverity
Creates a new empty undo manager return a new undo manager private static I Undo Manager create Undo Manager return new Undo Manager  IUndoManager createUndoManager UndoManager

Creates a new refactoring status with an empty list of status entries and a severity of code OK code public Refactoring Status f Entries new Array List 0  RefactoringStatus fEntries ArrayList
Returns the severity return the severity public int get Severity return f Severity  getSeverity fSeverity
Returns the list of refactoring status entries return the list of refactoring status entries Returns an empty array if not entries are managed public Refactoring Status Entry get Entries return Refactoring Status Entry f Entries to Array new Refactoring Status Entry f Entries size  RefactoringStatusEntry getEntries RefactoringStatusEntry fEntries toArray RefactoringStatusEntry fEntries
Returns whether the status has entries or not return code true code if the status as any entries otherwise code false code is returned public boolean has Entries return f Entries is Empty  hasEntries fEntries isEmpty
Returns the code Refactoring Status Entry code at the specified index param index the index of the entry to return return the entry at the specified index throws Index Out Of Bounds Exception if the index is out of range public Refactoring Status Entry get Entry At int index return Refactoring Status Entry f Entries get index  RefactoringStatusEntry IndexOutOfBoundsException RefactoringStatusEntry getEntryAt RefactoringStatusEntry fEntries
Returns the first entry managed by this refactoring status that matches the given plug in identifier and code If more than one entry exists that matches the criteria the first one in the list of entries is returned Returns code null code if no entry matches param plugin Id the entry s plug in identifier param code the entry s code return the entry that matches the given plug in identifier and code code null code otherwise public Refactoring Status Entry get Entry Matching Code String plugin Id int code Assert is True plugin Id null for Iterator iter f Entries iterator iter has Next Refactoring Status Entry entry Refactoring Status Entry iter next if plugin Id equals entry get Plugin Id entry get Code code return entry return null  pluginId RefactoringStatusEntry getEntryMatchingCode pluginId isTrue pluginId fEntries hasNext RefactoringStatusEntry RefactoringStatusEntry pluginId getPluginId getCode
Returns the first entry which severity is equal or greater than the given severity If more than one entry exists that matches the criteria the first one is returned Returns code null code if no entry matches param severity the severity to search for Must be one of code FATAL code code ERROR code code WARNING code or code INFO code return the entry that matches the search criteria public Refactoring Status Entry get Entry Matching Severity int severity Assert is True severity OK severity FATAL if severity f Severity return null Iterator iter f Entries iterator while iter has Next Refactoring Status Entry entry Refactoring Status Entry iter next if entry get Severity severity return entry return null  RefactoringStatusEntry getEntryMatchingSeverity isTrue fSeverity fEntries hasNext RefactoringStatusEntry RefactoringStatusEntry getSeverity
Returns the first message which severity is equal or greater than the given severity If more than one entry exists that matches the criteria the first one is returned Returns code null code if no entry matches param severity the severity to search for Must be one of code FATAL code code ERROR code code WARNING code or code INFO code return the message of the entry that matches the search criteria public String get Message Matching Severity int severity Refactoring Status Entry entry get Entry Matching Severity severity if entry null return null return entry get Message  getMessageMatchingSeverity RefactoringStatusEntry getEntryMatchingSeverity getMessage
Creates a new code Refactoring Status code with one entry filled with the given arguments param severity the severity param msg the message param context the context Can be code null code param plugin Id the plug in identifier Can be code null code if argument code code code equals code NO CODE code param code the problem code Must be either code NO CODE code or a positive integer param data application specific data return the newly created refactoring status see Refactoring Status Entry public static Refactoring Status create Status int severity String msg Refactoring Status Context context String plugin Id int code Object data Refactoring Status result new Refactoring Status result f Entries add new Refactoring Status Entry severity msg context plugin Id code data result f Severity severity return result  RefactoringStatus pluginId NO_CODE NO_CODE RefactoringStatusEntry RefactoringStatus createStatus RefactoringStatusContext pluginId RefactoringStatus RefactoringStatus fEntries RefactoringStatusEntry pluginId fSeverity
Creates a new code Refactorng Status code with one code INFO code entry filled with the given message param msg the message of the info entry return the refactoring status see Refactoring Status Entry public static Refactoring Status create Info Status String msg return create Status INFO msg null null Refactoring Status Entry NO CODE null  RefactorngStatus RefactoringStatusEntry RefactoringStatus createInfoStatus createStatus RefactoringStatusEntry NO_CODE
Creates a new code Refactorng Status code with one code INFO code entry filled with the given message and context param msg the message of the info entry param context the context of the info entry return the refactoring status see Refactoring Status Entry public static Refactoring Status create Info Status String msg Refactoring Status Context context return create Status INFO msg context null Refactoring Status Entry NO CODE null  RefactorngStatus RefactoringStatusEntry RefactoringStatus createInfoStatus RefactoringStatusContext createStatus RefactoringStatusEntry NO_CODE
Creates a new code Refactorng Status code with one code WARNING code entry filled with the given message param msg the message of the warning entry return the refactoring status see Refactoring Status Entry public static Refactoring Status create Warning Status String msg return create Status WARNING msg null null Refactoring Status Entry NO CODE null  RefactorngStatus RefactoringStatusEntry RefactoringStatus createWarningStatus createStatus RefactoringStatusEntry NO_CODE
Creates a code Refactorng Status code with one code WARNING code entry fill with the given message and context param msg the message of the warning entry param context the context of the warning entry return the refactoring status see Refactoring Status Entry public static Refactoring Status create Warning Status String msg Refactoring Status Context context return create Status WARNING msg context null Refactoring Status Entry NO CODE null  RefactorngStatus RefactoringStatusEntry RefactoringStatus createWarningStatus RefactoringStatusContext createStatus RefactoringStatusEntry NO_CODE
Creates a new code Refactorng Status code with one code ERROR code entry filled with the given message param msg the message of the error entry return the refactoring status see Refactoring Status Entry public static Refactoring Status create Error Status String msg return create Status ERROR msg null null Refactoring Status Entry NO CODE null  RefactorngStatus RefactoringStatusEntry RefactoringStatus createErrorStatus createStatus RefactoringStatusEntry NO_CODE
Creates a code Refactorng Status code with one code ERROR code entry fill with the given message and context param msg the message of the error entry param context the context of the error entry return the refactoring status see Refactoring Status Entry public static Refactoring Status create Error Status String msg Refactoring Status Context context return create Status ERROR msg context null Refactoring Status Entry NO CODE null  RefactorngStatus RefactoringStatusEntry RefactoringStatus createErrorStatus RefactoringStatusContext createStatus RefactoringStatusEntry NO_CODE
Creates a new code Refactorng Status code with one code FATAL code entry filled with the given message param msg the message of the fatal entry return the refactoring status see Refactoring Status Entry public static Refactoring Status create Fatal Error Status String msg return create Status FATAL msg null null Refactoring Status Entry NO CODE null  RefactorngStatus RefactoringStatusEntry RefactoringStatus createFatalErrorStatus createStatus RefactoringStatusEntry NO_CODE
Creates a code Refactorng Status code with one code FATAL code entry fill with the given message and context param msg the message of the fatal entry param context the context of the fatal entry return the refactoring status see Refactoring Status Entry public static Refactoring Status create Fatal Error Status String msg Refactoring Status Context context return create Status FATAL msg context null Refactoring Status Entry NO CODE null  RefactorngStatus RefactoringStatusEntry RefactoringStatus createFatalErrorStatus RefactoringStatusContext createStatus RefactoringStatusEntry NO_CODE
Creates a new code Refactorng Status code from the given code I Status code An OK status is mapped to an OK refactoring status an information status is mapped to a warning refactoring status a warning status is mapped to an error refactoring status and an error or cancel status is mapped to a fatal refactoring status An unknown status is converted into a fatal error status as well If the status is a code Multi Status code then the first level of children of the status will be added as refactoring status entries to the created refactoring status param status the status to create a refactoring status from return the refactoring status see I Status public static Refactoring Status create I Status status if status isOK return new Refactoring Status if status is Multi Status switch status get Severity case I Status OK return new Refactoring Status case I Status INFO return Refactoring Status create Warning Status status get Message case I Status WARNING return Refactoring Status create Error Status status get Message case I Status ERROR return Refactoring Status create Fatal Error Status status get Message case I Status CANCEL return Refactoring Status create Fatal Error Status status get Message default return Refactoring Status create Fatal Error Status status get Message else I Status children status get Children Refactoring Status result new Refactoring Status for int i 0 i children length i result merge Refactoring Status create children i return result  RefactorngStatus IStatus MultiStatus IStatus RefactoringStatus IStatus RefactoringStatus isMultiStatus getSeverity IStatus RefactoringStatus IStatus RefactoringStatus createWarningStatus getMessage IStatus RefactoringStatus createErrorStatus getMessage IStatus RefactoringStatus createFatalErrorStatus getMessage IStatus RefactoringStatus createFatalErrorStatus getMessage RefactoringStatus createFatalErrorStatus getMessage IStatus getChildren RefactoringStatus RefactoringStatus RefactoringStatus
Merges the receiver and the parameter statuses The resulting list of entries in the receiver will contain entries from both The resulting severity in the receiver will be the more severe of its current severity and the parameter s severity Merging with code null code is allowed it has no effect param other the refactoring status to merge with public void merge Refactoring Status other if other null return f Entries add All other f Entries f Severity Math max f Severity other get Severity  RefactoringStatus fEntries addAll fEntries fSeverity fSeverity getSeverity
Adds an code INFO code entry filled with the given message to this status If the current severity is code OK code it will be changed to code INFO code It will remain unchanged otherwise param msg the message of the info entry see Refactoring Status Entry public void add Info String msg add Info msg null  RefactoringStatusEntry addInfo addInfo
Adds an code INFO code entry filled with the given message and context to this status If the current severity is code OK code it will be changed to code INFO code It will remain unchanged otherwise param msg the message of the info entry param context the context of the info entry see Refactoring Status Entry public void add Info String msg Refactoring Status Context context f Entries add new Refactoring Status Entry Refactoring Status INFO msg context f Severity Math max f Severity INFO  RefactoringStatusEntry addInfo RefactoringStatusContext fEntries RefactoringStatusEntry RefactoringStatus fSeverity fSeverity
Adds a code WARNING code entry filled with the given message to this status If the current severity is code OK code or code INFO code it will be changed to code WARNING code It will remain unchanged otherwise param msg the message of the warning entry see Refactoring Status Entry public void add Warning String msg add Warning msg null  RefactoringStatusEntry addWarning addWarning
Adds a code WARNING code entry filled with the given message and context to this status If the current severity is code OK code or code INFO code it will be changed to code WARNING code It will remain unchanged otherwise param msg the message of the warning entry param context the context of the warning entry see Refactoring Status Entry public void add Warning String msg Refactoring Status Context context f Entries add new Refactoring Status Entry Refactoring Status WARNING msg context f Severity Math max f Severity WARNING  RefactoringStatusEntry addWarning RefactoringStatusContext fEntries RefactoringStatusEntry RefactoringStatus fSeverity fSeverity
Adds an code ERROR code entry filled with the given message to this status If the current severity is code OK code code INFO code or code WARNING code it will be changed to code ERROR code It will remain unchanged otherwise param msg the message of the error entry see Refactoring Status Entry public void add Error String msg add Error msg null  RefactoringStatusEntry addError addError
Adds an code ERROR code entry filled with the given message and context to this status If the current severity is code OK code code INFO code or code WARNING code it will be changed to code ERROR code It will remain unchanged otherwise param msg the message of the error entry param context the context of the error entry see Refactoring Status Entry public void add Error String msg Refactoring Status Context context f Entries add new Refactoring Status Entry Refactoring Status ERROR msg context f Severity Math max f Severity ERROR  RefactoringStatusEntry addError RefactoringStatusContext fEntries RefactoringStatusEntry RefactoringStatus fSeverity fSeverity
Adds a code FATAL code entry filled with the given message to this status The severity of this status will changed to code FATAL code param msg the message of the fatal entry see Refactoring Status Entry public void add Fatal Error String msg add Fatal Error msg null  RefactoringStatusEntry addFatalError addFatalError
Adds a code FATAL code entry filled with the given message and status to this status The severity of this status will changed to code FATAL code param msg the message of the fatal entry param context the context of the fatal entry see Refactoring Status Entry public void add Fatal Error String msg Refactoring Status Context context f Entries add new Refactoring Status Entry Refactoring Status FATAL msg context f Severity Math max f Severity FATAL  RefactoringStatusEntry addFatalError RefactoringStatusContext fEntries RefactoringStatusEntry RefactoringStatus fSeverity fSeverity
Adds a new entry filled with the given arguments to this status The severity of this status is set to the maximum of code f Severity code and code severity code param severity the severity of the entry param msg the message of the entry param context the context of the entry Can be code null code param plugin Id the plug in identifier of the entry Can be code null code if argument code code code equals code NO CODE code param code the problem code of the entry Must be either code NO CODE code or a positive integer public void add Entry int severity String msg Refactoring Status Context context String plugin Id int code f Entries add new Refactoring Status Entry severity msg context plugin Id code f Severity Math max f Severity severity  fSeverity pluginId NO_CODE NO_CODE addEntry RefactoringStatusContext pluginId fEntries RefactoringStatusEntry pluginId fSeverity fSeverity
Adds a new entry filled with the given arguments to this status The severity of this status is set to the maximum of code f Severity code and code severity code param severity the severity of the entry param msg the message of the entry param context the context of the entry Can be code null code param plugin Id the plug in identifier of the entry Can be code null code if argument code code code equals code NO CODE code param code the problem code of the entry Must be either code NO CODE code or a positive integer param data application specific data of the entry public void add Entry int severity String msg Refactoring Status Context context String plugin Id int code Object data f Entries add new Refactoring Status Entry severity msg context plugin Id code data f Severity Math max f Severity severity  fSeverity pluginId NO_CODE NO_CODE addEntry RefactoringStatusContext pluginId fEntries RefactoringStatusEntry pluginId fSeverity fSeverity
Adds the given code Refactoring Status Entry code The severity of this status is set to the maximum of code f Severity code and the severity of the entry param entry the code Refactoring Status Entry code to be added public void add Entry Refactoring Status Entry entry Assert is Not Null entry f Entries add entry f Severity Math max f Severity entry get Severity  RefactoringStatusEntry fSeverity RefactoringStatusEntry addEntry RefactoringStatusEntry isNotNull fEntries fSeverity fSeverity getSeverity
Returns whether the status s severity is code OK code or not return code true code if the severity is code OK code otherwise code false code is returned public boolean isOK return f Severity OK  fSeverity
Returns code true code if the current severity is code FATAL code return code true code if the current severity is code FATAL code otherwise code false code is returned public boolean has Fatal Error return f Severity FATAL  hasFatalError fSeverity
Returns code true code if the current severity is code FATAL code or code ERROR code return code true code if the current severity is code FATAL code or code ERROR code otherwise code false code is returned public boolean has Error return f Severity FATAL f Severity ERROR  hasError fSeverity fSeverity
Returns code true code if the current severity is code FATAL code code ERROR code or code WARNING code return code true code if the current severity is code FATAL code code ERROR code or code WARNING code otherwise code false code is returned public boolean has Warning return f Severity FATAL f Severity ERROR f Severity WARNING  hasWarning fSeverity fSeverity fSeverity
Returns code true code if the current severity is code FATAL code code ERROR code code WARNING code or code INFO code return code true code if the current severity is code FATAL code code ERROR code code WARNING code or code INFO code otherwise code false code is returned public boolean has Info return f Severity FATAL f Severity ERROR f Severity WARNING f Severity INFO  hasInfo fSeverity fSeverity fSeverity fSeverity
public String to String String Buffer buff new String Buffer buff append NON NLS 1 append get Severity String f Severity append n NON NLS 1 if isOK for Iterator iter f Entries iterator iter has Next buff append t NON NLS 1 append iter next append n NON NLS 1 buff append NON NLS 1 return buff to String  toString StringBuffer StringBuffer getSeverityString fSeverity fEntries hasNext toString
package static String get Severity String int severity Assert is True severity OK severity FATAL if severity Refactoring Status OK return OK NON NLS 1 if severity Refactoring Status INFO return INFO NON NLS 1 if severity Refactoring Status WARNING return WARNING NON NLS 1 if severity Refactoring Status ERROR return ERROR NON NLS 1 if severity Refactoring Status FATAL return FATALERROR NON NLS 1 return null  getSeverityString isTrue RefactoringStatus RefactoringStatus RefactoringStatus RefactoringStatus RefactoringStatus

public abstract class Refactoring Status Context Returns the element that corresponds directly to this context or code null code if there is no corresponding element p For example the corresponding element of a context for a problem detected in an code I Resource code would the the resource itself p return the corresponding element  RefactoringStatusContext IResource
see java lang Object to String public String to String Object element get Corresponding Element return element null null element to String  toString toString getCorrespondingElement toString

Creates a new refactoring status entry The context is set to code null code the problem code is set to code NO CODE code the plug in identifier is set to code null code and the data pointer is set to code null code as well param severity the severity param msg the message public Refactoring Status Entry int severity String msg this severity msg null  NO_CODE RefactoringStatusEntry
Creates a new refactoring status entry The problem code is set to code NO CODE code the plug in identifier is set to code null code and the data pointer is set to code null code as well param severity the severity param msg the message param context the context Can be code null code public Refactoring Status Entry int severity String msg Refactoring Status Context context this severity msg context null NO CODE null  NO_CODE RefactoringStatusEntry RefactoringStatusContext NO_CODE
Creates a new refactoring status entry param severity the severity param msg the message param context the context Can be code null code param plugin Id the plug in identifier Can be code null code if argument code code code equals code NO CODE code param code the problem code Must be either code NO CODE code or equals or greater than zero public Refactoring Status Entry int severity String msg Refactoring Status Context context String plugin Id int code this severity msg context plugin Id code null  pluginId NO_CODE NO_CODE RefactoringStatusEntry RefactoringStatusContext pluginId pluginId
Creates a new refactoring status entry param severity the severity param msg the message param context the context Can be code null code param plugin Id the plug in identifier Can be code null code if argument code code code equals code NO CODE code param code the problem code Must be either code NO CODE code or a positive integer param data application specific data public Refactoring Status Entry int severity String msg Refactoring Status Context context String plugin Id int code Object data Assert is True severity Refactoring Status INFO severity Refactoring Status WARNING severity Refactoring Status ERROR severity Refactoring Status FATAL Assert is Not Null msg Assert is True code NO CODE code 0 if code NO CODE Assert is True plugin Id null f Message msg f Severity severity f Context context f Plugin Id plugin Id f Code code f Data data  pluginId NO_CODE NO_CODE RefactoringStatusEntry RefactoringStatusContext pluginId isTrue RefactoringStatus RefactoringStatus RefactoringStatus RefactoringStatus isNotNull isTrue NO_CODE NO_CODE isTrue pluginId fMessage fSeverity fContext fPluginId pluginId fCode fData
Returns the message of the status entry return the message public String get Message return f Message  getMessage fMessage
Returns the severity level return the severity level see Refactoring Status INFO see Refactoring Status WARNING see Refactoring Status ERROR see Refactoring Status FATAL public int get Severity return f Severity  RefactoringStatus RefactoringStatus RefactoringStatus RefactoringStatus getSeverity fSeverity
Returns the context which can be used to show more detailed information regarding this status entry in the UI The method may return code null code indicating that no context is available return the status entry s context public Refactoring Status Context get Context return f Context  RefactoringStatusContext getContext fContext
Returns the plug in identifier associated with the problem code Might return code null code if the problem code equals code NO CODE code return the plug in identifier public String get Plugin Id return f Plugin Id  NO_CODE getPluginId fPluginId
Returns the problem code return the problem code public int get Code return f Code  getCode fCode
Returns the application defined entry data associated with the receiver or code null code if it has not been set return the entry data public Object get Data return f Data  getData fData
Returns whether the entry represents a fatal error or not return code true code if severity code Refactoring Status FATAL code public boolean is Fatal Error return f Severity Refactoring Status FATAL  RefactoringStatus isFatalError fSeverity RefactoringStatus
Returns whether the entry represents an error or not return code true code if severity code Refactoring Status ERROR code public boolean is Error return f Severity Refactoring Status ERROR  RefactoringStatus isError fSeverity RefactoringStatus
Returns whether the entry represents a warning or not return code true code if severity code Refactoring Status WARNING code public boolean is Warning return f Severity Refactoring Status WARNING  RefactoringStatus isWarning fSeverity RefactoringStatus
Returns whether the entry represents an information or not return code true code if severity code Refactoring Status INFO code public boolean is Info return f Severity Refactoring Status INFO  RefactoringStatus isInfo fSeverity RefactoringStatus
public String to String String context String f Context null Unspecified context f Context to String NON NLS 1 return n NON NLS 1 Refactoring Status get Severity String f Severity f Message NON NLS 1 n Context context String NON NLS 1 f Code NO CODE ncode none nplug in id f Plugin Id code f Code NON NLS 1 NON NLS 2 NON NLS 3 n Data f Data NON NLS 1  toString contextString fContext fContext toString RefactoringStatus getSeverityString fSeverity fMessage nContext contextString fCode NO_CODE fPluginId fCode nData fData

private Text Edit f Includes public Local Text Edit Processor I Document document Text Edit root int flags super document root flags  TextEdit fIncludes LocalTextEditProcessor IDocument TextEdit
public void set Includes Text Edit includes Assert is Not Null includes Assert is True f Excludes null f Includes flatten includes  setIncludes TextEdit isNotNull isTrue fExcludes fIncludes
public void set Excludes Text Edit excludes Assert is Not Null excludes Assert is True f Includes null f Excludes excludes  setExcludes TextEdit isNotNull isTrue fIncludes fExcludes
protected boolean consider Edit Text Edit edit if f Excludes null for int i 0 i f Excludes length i if edit equals f Excludes i return false return true if f Includes null for int i 0 i f Includes length i if edit equals f Includes i return true return false return true  considerEdit TextEdit fExcludes fExcludes fExcludes fIncludes fIncludes fIncludes
private Text Edit flatten Text Edit edits List result new Array List 5 for int i 0 i edits length i flatten result edits i return Text Edit result to Array new Text Edit result size  TextEdit TextEdit ArrayList TextEdit toArray TextEdit
private void flatten List result Text Edit edit result add edit Text Edit children edit get Children for int i 0 i children length i flatten result children i  TextEdit TextEdit getChildren
private static class Preview And Region public Preview And Region I Document d I Region r document d region r  PreviewAndRegion PreviewAndRegion IDocument IRegion
Creates a new text change with the specified name The name is a human readable value that is displayed to users The name does not need to be unique but it must not be code null code p The text type of this text change is set to code txt code p param name the name of the text change see set Text Type String protected Text Change String name Assert is Not Null name f Name name f Text Edit Change Groups new Array List 5 f Text Type txt NON NLS 1  setTextType TextChange isNotNull fName fTextEditChangeGroups ArrayList fTextType
inherit Doc public String get Name return f Name  inheritDoc getName fName
inherit Doc public void set Enabled boolean enabled super set Enabled enabled for Iterator iter f Text Edit Change Groups iterator iter has Next Text Edit Change Group element Text Edit Change Group iter next element set Enabled enabled  inheritDoc setEnabled setEnabled fTextEditChangeGroups hasNext TextEditChangeGroup TextEditChangeGroup setEnabled
Sets the text type The text type is used to determine the content merge viewer used to present the difference between the original and the preview content in the user interface Content merge viewers are defined via the extension point code org eclipse compare content Merge Viewers code p The default text type is code txt code p param type the text type If code null code is passed the text type is reseted to the default text type code txt code public void set Text Type String type if type null type txt NON NLS 1 f Text Type type  contentMergeViewers setTextType fTextType
Returns the text change s text type return the text change s text type public String get Text Type return f Text Type  getTextType fTextType
Sets the root text edit that should be applied to the document represented by this text change param edit the root text edit The root text edit can only be set once public void set Edit Text Edit edit Assert is True f Edit null Root edit can only be set once NON NLS 1 Assert is True edit null f Edit edit  setEdit TextEdit isTrue fEdit isTrue fEdit
Returns the root text edit return the root text edit or code null code if no root edit has been set public Text Edit get Edit return f Edit  TextEdit getEdit fEdit
Adds a link Text Edit Group text edit group This method is a convenient method for calling code change add Text Edit Change Group new Text Edit Change Group change group code param group the text edit group to add public void add Text Edit Group Text Edit Group group add Text Edit Change Group new Text Edit Change Group this group  TextEditGroup addTextEditChangeGroup TextEditChangeGroup addTextEditGroup TextEditGroup addTextEditChangeGroup TextEditChangeGroup
Adds a link Text Edit Change Group text edit change group Calling the methods requires that a root edit has been set via the method link set Edit Text Edit set Edit The edits managed by the given text edit change group must be part of the change s root edit param group the text edit change group to add public void add Text Edit Change Group Text Edit Change Group group Assert is True f Edit null Can only add a description if a root edit exists NON NLS 1 Assert is True group null f Text Edit Change Groups add group  TextEditChangeGroup setEdit TextEdit setEdit addTextEditChangeGroup TextEditChangeGroup isTrue fEdit isTrue fTextEditChangeGroups
Returns the link Text Edit Change Group text edit change groups managed by this text change return the text edit change groups public Text Edit Change Group get Text Edit Change Groups return Text Edit Change Group f Text Edit Change Groups to Array new Text Edit Change Group f Text Edit Change Groups size  TextEditChangeGroup TextEditChangeGroup getTextEditChangeGroups TextEditChangeGroup fTextEditChangeGroups toArray TextEditChangeGroup fTextEditChangeGroups
Acquires a reference to the document to be changed by this text change A document acquired by this call em MUST em be released via a call to link release Document I Document I Progress Monitor p The method code release Document code must be call as many times as code aquire Document code has been called p param pm a progress monitor return a reference to the document to be changed throws Core Exception if the document can t be acquired  releaseDocument IDocument IProgressMonitor releaseDocument aquireDocument CoreException
Commits the document acquired via a call to link acquire Document I Progress Monitor aquire Document It is up to the implementors of this method to decide what committing a document means Typically the content of the document is written back to the file system param document the document to commit param pm a progress monitor throws Core Exception if the document can t be committed  acquireDocument IProgressMonitor aquireDocument CoreException
Releases the document acquired via a call to link acquire Document I Progress Monitor aquire Document param document the document to release param pm a progress monitor throws Core Exception if the document can t be released  acquireDocument IProgressMonitor aquireDocument CoreException
Hook to create an undo change for the given undo edit This hook gets called while performing the change to construct the corresponding undo change object param edit the link Undo Edit to create an undo change for return the undo change or code null code if no undo change can be created Returning code null code results in the fact that the whole change tree can t be undone So returning code null code is only recommended if an exception occurred during creating the undo change  UndoEdit
inherit Doc public Change perform I Progress Monitor pm throws Core Exception pm begin Task 3 NON NLS 1 I Document document null try document acquire Document new Sub Progress Monitor pm 1 Text Edit Processor processor create Text Edit Processor document Text Edit CREATE UNDO false Undo Edit undo processor perform Edits commit document new Sub Progress Monitor pm 1 return create Undo Change undo catch Bad Location Exception e throw Changes as Core Exception e finally if document null release Document document new Sub Progress Monitor pm 1 pm done  inheritDoc IProgressMonitor CoreException beginTask IDocument acquireDocument SubProgressMonitor TextEditProcessor createTextEditProcessor TextEdit CREATE_UNDO UndoEdit performEdits SubProgressMonitor createUndoChange BadLocationException asCoreException releaseDocument SubProgressMonitor
Returns the document this text change is associated to The document returned is computed at the point in time when this method is called So calling this method multiple times may return different document instances p The returned document must not be modified by the client Doing so will result in an unexpected behaviour when the change is performed p param pm a progress monitor to report progress or code null code if no progress reporting is desired return the document this change is working on throws Core Exception if the document can t be acquired public I Document get Current Document I Progress Monitor pm throws Core Exception if pm null pm new Null Progress Monitor I Document result null pm begin Task 2 NON NLS 1 try result acquire Document new Sub Progress Monitor pm 1 finally if result null release Document result new Sub Progress Monitor pm 1 pm done return result  CoreException IDocument getCurrentDocument IProgressMonitor CoreException NullProgressMonitor IDocument beginTask acquireDocument SubProgressMonitor releaseDocument SubProgressMonitor
Returns the current content of the document this text change is associated with param pm a progress monitor to report progress or code null code if no progress reporting is desired return the current content of the text change exception Core Exception if the content can t be accessed public String get Current Content I Progress Monitor pm throws Core Exception return get Current Document pm get  CoreException getCurrentContent IProgressMonitor CoreException getCurrentDocument
Returns the current content of the text change clipped to a specific region The region is determined as follows ul li if code expand Region To Full Line code is code false code then the parameter code region code determines the clipping li li if code expand Region To Full Line code is code true code then the region determined by the parameter code region code is extended to cover full lines li li if code surrounding Lines code gt 0 then the given number of surrounding lines is added The value of code surrounding Lines code is only considered if code expand Region To Full Line code is code true code li ul param region the starting region for the text to be returned param expand Region To Full Line if code true code is passed the region is extended to cover full lines param surrounding Lines the number of surrounding lines to be added to the clipping region Is only considered if code expand Region To Full Line code is code true code param pm a progress monitor to report progress or code null code if no progress reporting is desired return the current content of the text change clipped to a region determined by the given parameters throws Core Exception if an exception occurs while accessing the current content public String get Current Content I Region region boolean expand Region To Full Line int surrounding Lines I Progress Monitor pm throws Core Exception Assert is Not Null region Assert is True surrounding Lines 0 I Document document get Current Document pm Assert is True document get Length region get Offset region get Length return get Content document region expand Region To Full Line surrounding Lines  expandRegionToFullLine expandRegionToFullLine surroundingLines surroundingLines expandRegionToFullLine expandRegionToFullLine surroundingLines expandRegionToFullLine CoreException getCurrentContent IRegion expandRegionToFullLine surroundingLines IProgressMonitor CoreException isNotNull isTrue surroundingLines IDocument getCurrentDocument isTrue getLength getOffset getLength getContent expandRegionToFullLine surroundingLines
Controls whether the text change should keep executed edits during preview generation param keep if code true code executed preview edits are kept public void set Keep Preview Edits boolean keep f Track Edits keep if f Track Edits f Copier null  setKeepPreviewEdits fTrackEdits fTrackEdits fCopier
Returns whether preview edits are remembered for further region tracking or not return code true code if executed text edits are remembered during preview generation otherwise code false code public boolean get Keep Preview Edits return f Track Edits  getKeepPreviewEdits fTrackEdits
Returns the edit that got executed during preview generation instead of the given original The method requires that code set Keep Preview Edits code is set to code true code and that a preview has been requested via one of the code get Preview code methods p The method returns code null code if the original isn t managed by this text change p param original the original edit managed by this text change return the edit executed during preview generation public Text Edit get Preview Edit Text Edit original Assert is True f Track Edits f Copier null original null return f Copier get Copy original  setKeepPreviewEdits getPreview TextEdit getPreviewEdit TextEdit isTrue fTrackEdits fCopier fCopier getCopy
Returns the edits that were executed during preview generation instead of the given array of original edits The method requires that code set Keep Preview Edits code is set to code true code and that a preview has been requested via one of the code get Preview code methods p The method returns an empty array if none of the original edits is managed by this text change p param originals an array of original edits managed by this text change return an array of edits containing the corresponding edits executed during preview generation public Text Edit get Preview Edits Text Edit originals Assert is True f Track Edits f Copier null originals null if originals length 0 return new Text Edit 0 List result new Array List originals length for int i 0 i originals length i Text Edit copy f Copier get Copy originals i if copy null result add copy return Text Edit result to Array new Text Edit result size  setKeepPreviewEdits getPreview TextEdit getPreviewEdits TextEdit isTrue fTrackEdits fCopier TextEdit ArrayList TextEdit fCopier getCopy TextEdit toArray TextEdit
Returns a document containing a preview of the text change The preview is computed by executing the all managed text edits The method considers the active state of the added link Text Edit Change Group text edit change groups param pm a progress monitor to report progress or code null code if no progress reporting is desired return a document containing the preview of the text change throws Core Exception if the preview can t be created public I Document get Preview Document I Progress Monitor pm throws Core Exception Preview And Region result get Preview Document ALL EDITS pm return result document  TextEditChangeGroup CoreException IDocument getPreviewDocument IProgressMonitor CoreException PreviewAndRegion getPreviewDocument ALL_EDITS
Returns the preview content as a string This is a convenient method for calling code get Preview Document I Progress Monitor get code param pm a progress monitor to report progress or code null code if no progress reporting is desired return the preview throws Core Exception if the preview can t be created public String get Preview Content I Progress Monitor pm throws Core Exception return get Preview Document pm get  getPreviewDocument IProgressMonitor CoreException getPreviewContent IProgressMonitor CoreException getPreviewDocument
Returns a preview of the text change clipped to a specific region The preview is created by applying the text edits managed by the given array of link Text Edit Change Group text edit change groups The region is determined as follows ul li if code expand Region To Full Line code is code false code then the parameter code region code determines the clipping li li if code expand Region To Full Line code is code true code then the region determined by the parameter code region code is extended to cover full lines li li if code surrounding Lines code gt 0 then the given number of surrounding lines is added The value of code surrounding Lines code is only considered if code expand Region To Full Line code is code true code li ul param change Groups a set of change groups for which a preview is to be generated param region the starting region for the clipping param expand Region To Full Line if code true code is passed the region is extended to cover full lines param surrounding Lines the number of surrounding lines to be added to the clipping region Is only considered if code expand Region To Full Line code is code true code param pm a progress monitor to report progress or code null code if no progress reporting is desired return the current content of the text change clipped to a region determined by the given parameters throws Core Exception if an exception occurs while generating the preview see get Current Content I Region boolean int I Progress Monitor public String get Preview Content Text Edit Change Group change Groups I Region region boolean expand Region To Full Line int surrounding Lines I Progress Monitor pm throws Core Exception I Region current Region get Region change Groups Assert is True region get Offset current Region get Offset current Region get Offset current Region get Length region get Offset region get Length Preview And Region result get Preview Document change Groups pm int delta result region get Length current Region get Length return get Content result document new Region region get Offset region get Length delta expand Region To Full Line surrounding Lines  TextEditChangeGroup expandRegionToFullLine expandRegionToFullLine surroundingLines surroundingLines expandRegionToFullLine changeGroups expandRegionToFullLine surroundingLines expandRegionToFullLine CoreException getCurrentContent IRegion IProgressMonitor getPreviewContent TextEditChangeGroup changeGroups IRegion expandRegionToFullLine surroundingLines IProgressMonitor CoreException IRegion currentRegion getRegion changeGroups isTrue getOffset currentRegion getOffset currentRegion getOffset currentRegion getLength getOffset getLength PreviewAndRegion getPreviewDocument changeGroups getLength currentRegion getLength getContent getOffset getLength expandRegionToFullLine surroundingLines
private Preview And Region get Preview Document Text Edit Change Group changes I Progress Monitor pm throws Core Exception I Document document new Document get Current Document pm get boolean track Changes f Track Edits set Keep Preview Edits true Text Edit Processor processor changes ALL EDITS create Text Edit Processor document Text Edit NONE true create Text Edit Processor document Text Edit NONE changes try processor perform Edits return new Preview And Region document get New Region changes catch Bad Location Exception e throw Changes as Core Exception e finally set Keep Preview Edits track Changes  PreviewAndRegion getPreviewDocument TextEditChangeGroup IProgressMonitor CoreException IDocument getCurrentDocument trackChanges fTrackEdits setKeepPreviewEdits TextEditProcessor ALL_EDITS createTextEditProcessor TextEdit createTextEditProcessor TextEdit performEdits PreviewAndRegion getNewRegion BadLocationException asCoreException setKeepPreviewEdits trackChanges
private Text Edit Processor create Text Edit Processor I Document document int flags boolean preview if f Edit null return new Text Edit Processor document new Multi Text Edit 0 0 flags List excludes new Array List 0 for Iterator iter f Text Edit Change Groups iterator iter has Next Text Edit Change Group edit Text Edit Change Group iter next if edit is Enabled excludes add All Arrays as List edit get Text Edit Group get Text Edits if preview f Copier new Text Edit Copier f Edit Text Edit copied Edit f Copier perform if f Track Edits flags flags Text Edit UPDATE REGIONS Local Text Edit Processor result new Local Text Edit Processor document copied Edit flags result set Excludes map Edits Text Edit excludes to Array new Text Edit excludes size f Copier if f Track Edits f Copier null return result else Local Text Edit Processor result new Local Text Edit Processor document f Edit flags Text Edit UPDATE REGIONS result set Excludes Text Edit excludes to Array new Text Edit excludes size return result  TextEditProcessor createTextEditProcessor IDocument fEdit TextEditProcessor MultiTextEdit ArrayList fTextEditChangeGroups hasNext TextEditChangeGroup TextEditChangeGroup isEnabled addAll asList getTextEditGroup getTextEdits fCopier TextEditCopier fEdit TextEdit copiedEdit fCopier fTrackEdits TextEdit UPDATE_REGIONS LocalTextEditProcessor LocalTextEditProcessor copiedEdit setExcludes mapEdits TextEdit toArray TextEdit fCopier fTrackEdits fCopier LocalTextEditProcessor LocalTextEditProcessor fEdit TextEdit UPDATE_REGIONS setExcludes TextEdit toArray TextEdit
private Text Edit Processor create Text Edit Processor I Document document int flags Text Edit Change Group changes if f Edit null return new Text Edit Processor document new Multi Text Edit 0 0 flags List includes new Array List 0 for int c 0 c changes length c Text Edit Change Group change changes c Assert is True change get Text Change this if change is Enabled includes add All Arrays as List change get Text Edit Group get Text Edits f Copier new Text Edit Copier f Edit Text Edit copied Edit f Copier perform if f Track Edits flags flags Text Edit UPDATE REGIONS Local Text Edit Processor result new Local Text Edit Processor document copied Edit flags result set Includes map Edits Text Edit includes to Array new Text Edit includes size f Copier if f Track Edits f Copier null return result  TextEditProcessor createTextEditProcessor IDocument TextEditChangeGroup fEdit TextEditProcessor MultiTextEdit ArrayList TextEditChangeGroup isTrue getTextChange isEnabled addAll asList getTextEditGroup getTextEdits fCopier TextEditCopier fEdit TextEdit copiedEdit fCopier fTrackEdits TextEdit UPDATE_REGIONS LocalTextEditProcessor LocalTextEditProcessor copiedEdit setIncludes mapEdits TextEdit toArray TextEdit fCopier fTrackEdits fCopier
private Text Edit map Edits Text Edit edits Text Edit Copier copier if edits null return null for int i 0 i edits length i edits i copier get Copy edits i return edits  TextEdit mapEdits TextEdit TextEditCopier getCopy
private String get Content I Document document I Region region boolean expand Region To Full Line int surrounding Lines throws Core Exception try if expand Region To Full Line int start Line Math max document get Line Of Offset region get Offset surrounding Lines 0 int end Line if region get Length 0 end Line Math min document get Line Of Offset region get Offset surrounding Lines document get Number Of Lines 1 else end Line Math min document get Line Of Offset region get Offset region get Length 1 surrounding Lines document get Number Of Lines 1 int offset document get Line Information start Line get Offset I Region end Line Region document get Line Information end Line int length end Line Region get Offset end Line Region get Length offset return document get offset length else return document get region get Offset region get Length catch Bad Location Exception e throw Changes as Core Exception e  getContent IDocument IRegion expandRegionToFullLine surroundingLines CoreException expandRegionToFullLine startLine getLineOfOffset getOffset surroundingLines endLine getLength endLine getLineOfOffset getOffset surroundingLines getNumberOfLines endLine getLineOfOffset getOffset getLength surroundingLines getNumberOfLines getLineInformation startLine getOffset IRegion endLineRegion getLineInformation endLine endLineRegion getOffset endLineRegion getLength getOffset getLength BadLocationException asCoreException
private I Region get Region Text Edit Change Group changes if changes ALL EDITS if f Edit null return null return f Edit get Region else List edits new Array List for int i 0 i changes length i edits add All Arrays as List changes i get Text Edit Group get Text Edits if edits size 0 return null return Text Edit get Coverage Text Edit edits to Array new Text Edit edits size  IRegion getRegion TextEditChangeGroup ALL_EDITS fEdit fEdit getRegion ArrayList addAll asList getTextEditGroup getTextEdits TextEdit getCoverage TextEdit toArray TextEdit
private I Region get New Region Text Edit Change Group changes if changes ALL EDITS if f Edit null return null return f Copier get Copy f Edit get Region else List result new Array List for int c 0 c changes length c Text Edit edits changes c get Text Edit Group get Text Edits for int e 0 e edits length e Text Edit copy f Copier get Copy edits e if copy null result add copy if result size 0 return null return Text Edit get Coverage Text Edit result to Array new Text Edit result size  IRegion getNewRegion TextEditChangeGroup ALL_EDITS fEdit fCopier getCopy fEdit getRegion ArrayList TextEdit getTextEditGroup getTextEdits TextEdit fCopier getCopy TextEdit getCoverage TextEdit toArray TextEdit

Creates new code Text Edit Change Group code for the given code Text Change code and code Text Edit Group code param change the change owning this text edit change group param group the underlying text edit group public Text Edit Change Group Text Change change Text Edit Group group Assert is Not Null change Assert is Not Null group f Text Change change f Is Enabled true f Text Edit Group group  TextEditChangeGroup TextChange TextEditGroup TextEditChangeGroup TextChange TextEditGroup isNotNull isNotNull fTextChange fIsEnabled fTextEditGroup
Returns the groups s name by forwarding the method to the underlying text edit group return the group s name public String get Name return f Text Edit Group get Name  getName fTextEditGroup getName
Marks the group as enabled or disabled If a group is marked as disabled the text edits managed by the underlying text edit group aren t executed when performing the text change that owns this group param enabled code true code to mark this group as enabled code false code to mark it as disabled public void set Enabled boolean enabled f Is Enabled enabled  setEnabled fIsEnabled
Returns whether the group is enabled or not return code true code if the group is marked as enabled code false code otherwise public boolean is Enabled return f Is Enabled  isEnabled fIsEnabled
Returns the text change this group belongs to return the text change this group belongs to public Text Change get Text Change return f Text Change  TextChange getTextChange fTextChange
Returns the underlying text edit group return the underlying text edit group public Text Edit Group get Text Edit Group return f Text Edit Group  TextEditGroup getTextEditGroup fTextEditGroup
Returns the region covered by the underlying text edit group return the region covered by the underlying text edit group public I Region get Region return f Text Edit Group get Region  IRegion getRegion fTextEditGroup getRegion
Returns the text edits managed by the underlying text edit group return the text edits managed by the underlying text edit group public Text Edit get Text Edits return f Text Edit Group get Text Edits  TextEdit getTextEdits fTextEditGroup getTextEdits

Creates a new code Text File Change code for the given file param name the change s name mainly used to render the change in the UI param file the file this text change operates on public Text File Change String name I File file super name Assert is Not Null file f File file  TextFileChange TextFileChange IFile isNotNull fFile
Sets the save state Must be one of code KEEP SAVE STATE code code FORCE SAVE code or code LEAVE DIRTY code param save Mode indicating how save is handled when the document gets committed public void set Save Mode int save Mode f Save Mode save Mode  KEEP_SAVE_STATE FORCE_SAVE LEAVE_DIRTY saveMode setSaveMode saveMode fSaveMode saveMode
Returns the save state set via link set Save Mode int return the save state public int get Save Mode return f Save Mode  setSaveMode getSaveMode fSaveMode
Returns the code I File code this change is working on return the file this change is working on public I File get File return f File  IFile IFile getFile fFile
Hook to create an undo change for the given undo edit and content stamp This hook gets called while performing the change to construct the corresponding undo change object param edit the link Undo Edit to create an undo change for param stamp To Restore the content stamp to restore when the undo edit is executed return the undo change or code null code if no undo change can be created Returning code null code results in the fact that the whole change tree can t be undone So returning code null code is only recommended if an exception occurred during creating the undo change protected Change create Undo Change Undo Edit edit Content Stamp stamp To Restore return new Undo Text File Change get Name f File edit stamp To Restore f Save Mode  UndoEdit stampToRestore createUndoChange UndoEdit ContentStamp stampToRestore UndoTextFileChange getName fFile stampToRestore fSaveMode
inherit Doc public Object get Modified Element return f File  inheritDoc getModifiedElement fFile
inherit Doc public void initialize Validation Data I Progress Monitor pm pm begin Task 1 NON NLS 1 f Validation State Buffer Validation State create f File I Text File Buffer buffer File Buffers get Text File Buffer Manager get Text File Buffer f File get Full Path f Dirty buffer null buffer is Dirty pm worked 1  inheritDoc initializeValidationData IProgressMonitor beginTask fValidationState BufferValidationState fFile ITextFileBuffer FileBuffers getTextFileBufferManager getTextFileBuffer fFile getFullPath fDirty isDirty
inherit Doc public Refactoring Status is Valid I Progress Monitor pm throws Core Exception pm begin Task 1 NON NLS 1 Refactoring Status result f Validation State is Valid if needs Saving result merge Changes validate Modifies Files new I File f File pm worked 1 return result  inheritDoc RefactoringStatus isValid IProgressMonitor CoreException beginTask RefactoringStatus fValidationState isValid needsSaving validateModifiesFiles IFile fFile
inherit Doc public void dispose f Validation State dispose  inheritDoc fValidationState
inherit Doc protected I Document acquire Document I Progress Monitor pm throws Core Exception if f Aquire Count 0 return f Buffer get Document I Text File Buffer Manager manager File Buffers get Text File Buffer Manager I Path path f File get Full Path manager connect path pm f Aquire Count f Buffer manager get Text File Buffer path f Content Stamp Content Stamps get f File true return f Buffer get Document  inheritDoc IDocument acquireDocument IProgressMonitor CoreException fAquireCount fBuffer getDocument ITextFileBufferManager FileBuffers getTextFileBufferManager IPath fFile getFullPath fAquireCount fBuffer getTextFileBuffer fContentStamp ContentStamps fFile fBuffer getDocument
inherit Doc protected void commit I Document document I Progress Monitor pm throws Core Exception if needs Saving f Buffer commit pm false Content Stamps increment f File  inheritDoc IDocument IProgressMonitor CoreException needsSaving fBuffer ContentStamps fFile
inherit Doc protected void release Document I Document document I Progress Monitor pm throws Core Exception Assert is True f Aquire Count 0 if f Aquire Count 1 I Text File Buffer Manager manager File Buffers get Text File Buffer Manager manager disconnect f File get Full Path pm f Aquire Count  inheritDoc releaseDocument IDocument IProgressMonitor CoreException isTrue fAquireCount fAquireCount ITextFileBufferManager FileBuffers getTextFileBufferManager fFile getFullPath fAquireCount
inherit Doc protected final Change create Undo Change Undo Edit edit return create Undo Change edit f Content Stamp  inheritDoc createUndoChange UndoEdit createUndoChange fContentStamp
private boolean needs Saving return f Save Mode FORCE SAVE 0 f Dirty f Save Mode KEEP SAVE STATE 0  needsSaving fSaveMode FORCE_SAVE fDirty fSaveMode KEEP_SAVE_STATE

inherit Doc public void undo Stack Changed I Undo Manager manager  inheritDoc undoStackChanged IUndoManager
inherit Doc public void redo Stack Changed I Undo Manager manager  inheritDoc redoStackChanged IUndoManager
inherit Doc public void about To Perform Change I Undo Manager manager Change change  inheritDoc aboutToPerformChange IUndoManager
inherit Doc public void change Performed I Undo Manager manager Change change  inheritDoc changePerformed IUndoManager

Create a new undo text file change object param name the human readable name of the change param file the file the change is working on param stamp the content stamp to restore when the undo is executed param undo the edit representing the undo modifications param save Mode the save mode as specified by link Text File Change see Text File Change KEEP SAVE STATE see Text File Change FORCE SAVE see Text File Change LEAVE DIRTY protected Undo Text File Change String name I File file Undo Edit undo Content Stamp stamp int save Mode Assert is Not Null name Assert is Not Null file Assert is Not Null undo f Name name f File file f Undo undo f Content Stamp To Restore stamp f Save Mode save Mode  saveMode TextFileChange TextFileChange KEEP_SAVE_STATE TextFileChange FORCE_SAVE TextFileChange LEAVE_DIRTY UndoTextFileChange IFile UndoEdit ContentStamp saveMode isNotNull isNotNull isNotNull fName fFile fUndo fContentStampToRestore fSaveMode saveMode
Returns the change s save mode return the change s save mode see Text File Change KEEP SAVE STATE see Text File Change FORCE SAVE see Text File Change LEAVE DIRTY public int get Save Mode return f Save Mode  TextFileChange KEEP_SAVE_STATE TextFileChange FORCE_SAVE TextFileChange LEAVE_DIRTY getSaveMode fSaveMode
inherit Doc public String get Name return f Name  inheritDoc getName fName
Hook to create an undo change for the given undo edit This hook gets called while performing the change to construct the corresponding undo change object p Subclasses may override it to create a different undo change p param edit the link Undo Edit undo edit to create a undo change for param stamp To Restore the content stamp to restore when the undo edit is executed return the undo change throws Core Exception if an undo change can t be created protected Change create Undo Change Undo Edit edit Content Stamp stamp To Restore throws Core Exception return new Undo Text File Change get Name f File edit stamp To Restore f Save Mode  UndoEdit stampToRestore CoreException createUndoChange UndoEdit ContentStamp stampToRestore CoreException UndoTextFileChange getName fFile stampToRestore fSaveMode
inherit Doc public Object get Modified Element return f File  inheritDoc getModifiedElement fFile
inherit Doc public void initialize Validation Data I Progress Monitor pm if pm null pm new Null Progress Monitor pm begin Task 1 NON NLS 1 f Validation State Buffer Validation State create f File I Text File Buffer buffer File Buffers get Text File Buffer Manager get Text File Buffer f File get Full Path f Dirty buffer null buffer is Dirty pm worked 1  inheritDoc initializeValidationData IProgressMonitor NullProgressMonitor beginTask fValidationState BufferValidationState fFile ITextFileBuffer FileBuffers getTextFileBufferManager getTextFileBuffer fFile getFullPath fDirty isDirty
inherit Doc public Refactoring Status is Valid I Progress Monitor pm throws Core Exception if pm null pm new Null Progress Monitor pm begin Task 1 NON NLS 1 Refactoring Status result f Validation State is Valid pm worked 1 return result  inheritDoc RefactoringStatus isValid IProgressMonitor CoreException NullProgressMonitor beginTask RefactoringStatus fValidationState isValid
inherit Doc public Change perform I Progress Monitor pm throws Core Exception if pm null pm new Null Progress Monitor I Text File Buffer Manager manager File Buffers get Text File Buffer Manager pm begin Task 2 NON NLS 1 I Text File Buffer buffer null try manager connect f File get Full Path new Sub Progress Monitor pm 1 buffer manager get Text File Buffer f File get Full Path I Document document buffer get Document Undo Edit redo f Undo apply document Text Edit CREATE UNDO Content Stamp current Stamp Content Stamps get f File true if needs Saving buffer commit pm false Content Stamps set f File f Content Stamp To Restore return create Undo Change redo current Stamp catch Bad Location Exception e throw Changes as Core Exception e finally if buffer null manager disconnect f File get Full Path new Sub Progress Monitor pm 1  inheritDoc IProgressMonitor CoreException NullProgressMonitor ITextFileBufferManager FileBuffers getTextFileBufferManager beginTask ITextFileBuffer fFile getFullPath SubProgressMonitor getTextFileBuffer fFile getFullPath IDocument getDocument UndoEdit fUndo TextEdit CREATE_UNDO ContentStamp currentStamp ContentStamps fFile needsSaving ContentStamps fFile fContentStampToRestore createUndoChange currentStamp BadLocationException asCoreException fFile getFullPath SubProgressMonitor
inherit Doc public void dispose f Validation State dispose  inheritDoc fValidationState
private boolean needs Saving return f Save Mode Text File Change FORCE SAVE 0 f Dirty f Save Mode Text File Change KEEP SAVE STATE 0  needsSaving fSaveMode TextFileChange FORCE_SAVE fDirty fSaveMode TextFileChange KEEP_SAVE_STATE

This class is not intended to be instantiated private Assert not allowed 
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression return is Legal expression NON NLS 1  IllegalArgumentException IllegalArgumentException isLegal isLegal
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression String message if expression throw new Illegal Argument Exception message return expression  IllegalArgumentException IllegalArgumentException isLegal IllegalArgumentException
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown param object the value to test exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object is Not Null object NON NLS 1  IllegalArgumentException isNotNull isNotNull
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param object the value to test param message the message to include in the exception exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object String message if object null throw new Assertion Failed Exception null argument message NON NLS 1  IllegalArgumentException isNotNull AssertionFailedException
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails public static boolean is True boolean expression return is True expression NON NLS 1  isTrue isTrue
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails public static boolean is True boolean expression String message if expression throw new Assertion Failed Exception assertion failed message NON NLS 1 return expression  isTrue AssertionFailedException

class Assertion Failed Exception extends Runtime Exception Constructs a new exception public Assertion Failed Exception super  AssertionFailedException RuntimeException AssertionFailedException
Constructs a new exception with the given message param detail the detailed message public Assertion Failed Exception String detail super detail  AssertionFailedException

public static Buffer Validation State create I File file I Text File Buffer buffer get Buffer file if buffer null return new Saved Buffer Validation State file else if buffer is Dirty return new Dirty Buffer Validation State file else return new Saved Buffer Validation State file  BufferValidationState IFile ITextFileBuffer getBuffer SavedBufferValidationState isDirty DirtyBufferValidationState SavedBufferValidationState
public Refactoring Status is Valid if f Existed if f File exists return Refactoring Status create Fatal Error Status Refactoring Core Messages get Formatted String Text Changes error existing NON NLS 1 f File get Full Path to String else if f File exists return Refactoring Status create Fatal Error Status Refactoring Core Messages get Formatted String Text Changes error not existing NON NLS 1 f File get Full Path to String return new Refactoring Status  RefactoringStatus isValid fExisted fFile RefactoringStatus createFatalErrorStatus RefactoringCoreMessages getFormattedString TextChanges fFile getFullPath toString fFile RefactoringStatus createFatalErrorStatus RefactoringCoreMessages getFormattedString TextChanges not_existing fFile getFullPath toString RefactoringStatus
public void dispose 
protected Buffer Validation State I File file f File file f Existed file exists  BufferValidationState IFile fFile fExisted
protected I Document get Document I Text File Buffer buffer get Buffer f File if buffer null return null return buffer get Document  IDocument getDocument ITextFileBuffer getBuffer fFile getDocument
protected static boolean is Dirty I File file I Text File Buffer buffer get Buffer file if buffer null return false return buffer is Dirty  isDirty IFile ITextFileBuffer getBuffer isDirty
protected static I Text File Buffer get Buffer I File file I Text File Buffer Manager manager File Buffers get Text File Buffer Manager I Path path file get Full Path I Text File Buffer buffer manager get Text File Buffer path return buffer  ITextFileBuffer getBuffer IFile ITextFileBufferManager FileBuffers getTextFileBufferManager IPath getFullPath ITextFileBuffer getTextFileBuffer
class Document Changed Listener implements I Document Listener public void document About To Be Changed Document Event event  DocumentChangedListener IDocumentListener documentAboutToBeChanged DocumentEvent
public void document About To Be Changed Document Event event public void document Changed Document Event event Dirty Buffer Validation State this document Changed  documentAboutToBeChanged DocumentEvent documentChanged DocumentEvent DirtyBufferValidationState documentChanged
class File Buffer Listener implements I File Buffer Listener public void buffer Created I File Buffer buffer begin https bugs eclipse org bugs show bug cgi id 67821 if buffer get Location equals f File get Full Path buffer instanceof I Text File Buffer I Text File Buffer text Buffer I Text File Buffer buffer if f Document Listener null f Document Listener new Document Changed Listener text Buffer get Document add Document Listener f Document Listener end fix https bugs eclipse org bugs show bug cgi id 67821  FileBufferListener IFileBufferListener bufferCreated IFileBuffer show_bug getLocation fFile getFullPath ITextFileBuffer ITextFileBuffer textBuffer ITextFileBuffer fDocumentListener fDocumentListener DocumentChangedListener textBuffer getDocument addDocumentListener fDocumentListener show_bug
public void buffer Disposed I File Buffer buffer begin fix https bugs eclipse org bugs show bug cgi id 67821 if f Document Listener null buffer get Location equals f File get Full Path if buffer instanceof I Text File Buffer I Text File Buffer text Buffer I Text File Buffer buffer text Buffer get Document remove Document Listener f Document Listener f Document Listener null f Content Stamp Content Stamps get f File true end fix https bugs eclipse org bugs show bug cgi id 67821  bufferDisposed IFileBuffer show_bug fDocumentListener getLocation fFile getFullPath ITextFileBuffer ITextFileBuffer textBuffer ITextFileBuffer textBuffer getDocument removeDocumentListener fDocumentListener fDocumentListener fContentStamp ContentStamps fFile show_bug
end fix https bugs eclipse org bugs show bug cgi id 67821 public void buffer Content About To Be Replaced I File Buffer buffer  show_bug bufferContentAboutToBeReplaced IFileBuffer
public void buffer Content About To Be Replaced I File Buffer buffer public void buffer Content Replaced I File Buffer buffer  bufferContentAboutToBeReplaced IFileBuffer bufferContentReplaced IFileBuffer
public void buffer Content Replaced I File Buffer buffer public void state Changing I File Buffer buffer  bufferContentReplaced IFileBuffer stateChanging IFileBuffer
public void state Changing I File Buffer buffer public void dirty State Changed I File Buffer buffer boolean is Dirty  stateChanging IFileBuffer dirtyStateChanged IFileBuffer isDirty
public void dirty State Changed I File Buffer buffer boolean is Dirty public void state Validation Changed I File Buffer buffer boolean is State Validated  dirtyStateChanged IFileBuffer isDirty stateValidationChanged IFileBuffer isStateValidated
public void state Validation Changed I File Buffer buffer boolean is State Validated public void underlying File Moved I File Buffer buffer I Path path  stateValidationChanged IFileBuffer isStateValidated underlyingFileMoved IFileBuffer IPath
public void underlying File Moved I File Buffer buffer I Path path public void underlying File Deleted I File Buffer buffer  underlyingFileMoved IFileBuffer IPath underlyingFileDeleted IFileBuffer
public void underlying File Deleted I File Buffer buffer public void state Change Failed I File Buffer buffer  underlyingFileDeleted IFileBuffer stateChangeFailed IFileBuffer
public Dirty Buffer Validation State I File file super file f Content Stamp Content Stamps get file f File Buffer Listener new File Buffer Listener File Buffers get Text File Buffer Manager add File Buffer Listener f File Buffer Listener f Document Listener new Document Changed Listener get Document add Document Listener f Document Listener  DirtyBufferValidationState IFile fContentStamp ContentStamps fFileBufferListener FileBufferListener FileBuffers getTextFileBufferManager addFileBufferListener fFileBufferListener fDocumentListener DocumentChangedListener getDocument addDocumentListener fDocumentListener
public Refactoring Status is Valid Refactoring Status result super is Valid if result has Fatal Error return result If we have initialized the content stamp with the null stamp then we can t compare it with the current stamp since a change executed later could have set a concrete stamp for the current content if f Changed f Content Stamp is Null Stamp f Content Stamp equals Content Stamps get f File result add Fatal Error Refactoring Core Messages get Formatted String Text Changes error content changed NON NLS 1 f File get Full Path to String return result  RefactoringStatus isValid RefactoringStatus isValid hasFatalError fChanged fContentStamp isNullStamp fContentStamp ContentStamps fFile addFatalError RefactoringCoreMessages getFormattedString TextChanges content_changed fFile getFullPath toString
public void dispose if f File Buffer Listener null File Buffers get Text File Buffer Manager remove File Buffer Listener f File Buffer Listener fix https bugs eclipse org bugs show bug cgi id 67821 f File Buffer Listener null if f Document Listener null get Document remove Document Listener f Document Listener fix https bugs eclipse org bugs show bug cgi id 67821 f Document Listener null  fFileBufferListener FileBuffers getTextFileBufferManager removeFileBufferListener fFileBufferListener show_bug fFileBufferListener fDocumentListener getDocument removeDocumentListener fDocumentListener show_bug fDocumentListener
private void document Changed f Changed true get Document remove Document Listener f Document Listener File Buffers get Text File Buffer Manager remove File Buffer Listener f File Buffer Listener f File Buffer Listener null f Document Listener null  documentChanged fChanged getDocument removeDocumentListener fDocumentListener FileBuffers getTextFileBufferManager removeFileBufferListener fFileBufferListener fFileBufferListener fDocumentListener
private Content Stamp f Content Stamp public Saved Buffer Validation State I File file super file f Content Stamp Content Stamps get file true  ContentStamp fContentStamp SavedBufferValidationState IFile fContentStamp ContentStamps
public Refactoring Status is Valid Refactoring Status result super is Valid if result has Fatal Error return result if f Content Stamp equals Content Stamps get f File result add Fatal Error Refactoring Core Messages get Formatted String Text Changes error content changed NON NLS 1 f File get Full Path to String else if f File is Read Only result add Fatal Error Refactoring Core Messages get Formatted String Text Changes error read only NON NLS 1 f File get Full Path to String else if f File is Synchronized I Resource DEPTH ZERO result add Fatal Error Refactoring Core Messages get Formatted String Text Changes error out Of Sync NON NLS 1 f File get Full Path to String else if is Dirty f File result add Fatal Error Refactoring Core Messages get Formatted String Text Changes error unsaved changes NON NLS 1 f File get Full Path to String return result  RefactoringStatus isValid RefactoringStatus isValid hasFatalError fContentStamp ContentStamps fFile addFatalError RefactoringCoreMessages getFormattedString TextChanges content_changed fFile getFullPath toString fFile isReadOnly addFatalError RefactoringCoreMessages getFormattedString TextChanges read_only fFile getFullPath toString fFile isSynchronized IResource DEPTH_ZERO addFatalError RefactoringCoreMessages getFormattedString TextChanges outOfSync fFile getFullPath toString isDirty fFile addFatalError RefactoringCoreMessages getFormattedString TextChanges unsaved_changes fFile getFullPath toString

public static Refactoring Status validate Modifies Files I File files To Modify Refactoring Status result new Refactoring Status I Status status Resources check In Sync files To Modify if status isOK result merge Refactoring Status create status status Resources make Committable files To Modify null if status isOK result merge Refactoring Status create status if result has Fatal Error result add Fatal Error Refactoring Core Messages get String Changes validate Edit NON NLS 1 return result  RefactoringStatus validateModifiesFiles IFile filesToModify RefactoringStatus RefactoringStatus IStatus checkInSync filesToModify RefactoringStatus makeCommittable filesToModify RefactoringStatus hasFatalError addFatalError RefactoringCoreMessages getString validateEdit
public static Core Exception as Core Exception Bad Location Exception e String message e get Message if message null message Bad Location Exception NON NLS 1 return new Core Exception new Status I Status ERROR Refactoring Core Plugin get Plugin Id I Refactoring Core Status Codes BAD LOCATION message e  CoreException asCoreException BadLocationException getMessage BadLocationException CoreException IStatus RefactoringCorePlugin getPluginId IRefactoringCoreStatusCodes BAD_LOCATION

private int f Value private Content Stamp Impl int value f Value value  fValue ContentStampImpl fValue
f Value value public boolean is Null Stamp return f Value NULL VALUE  fValue isNullStamp fValue NULL_VALUE
public boolean equals Object obj if obj instanceof Content Stamp Impl return false return Content Stamp Impl obj f Value f Value  ContentStampImpl ContentStampImpl fValue fValue
return Content Stamp Impl obj f Value f Value public int hash Code return f Value  ContentStampImpl fValue fValue hashCode fValue
public String to String if f Value NULL VALUE return Null Stamp NON NLS 1 return Stamp f Value NON NLS 1  toString fValue NULL_VALUE fValue
public static Content Stamp get I File file try Content Stamp result Content Stamp file get Session Property CONTENT STAMP if result null return result return NULL CONTENT STAMP catch Core Exception e fall through return NULL CONTENT STAMP  ContentStamp IFile ContentStamp ContentStamp getSessionProperty CONTENT_STAMP NULL_CONTENT_STAMP CoreException NULL_CONTENT_STAMP
public static Content Stamp get I File file boolean create Content Stamp result get file if result is Null Stamp create result new Content Stamp Impl 0 try file set Session Property CONTENT STAMP result catch Core Exception e return NULL CONTENT STAMP return result  ContentStamp IFile ContentStamp isNullStamp ContentStampImpl setSessionProperty CONTENT_STAMP CoreException NULL_CONTENT_STAMP
public static void remove I File file try file set Session Property CONTENT STAMP null catch Core Exception e  IFile setSessionProperty CONTENT_STAMP CoreException
public static void increment I File file try Content Stamp Impl stamp Content Stamp Impl file get Session Property CONTENT STAMP if stamp null return file set Session Property CONTENT STAMP new Content Stamp Impl stamp f Value 1 catch Core Exception e  IFile ContentStampImpl ContentStampImpl getSessionProperty CONTENT_STAMP setSessionProperty CONTENT_STAMP ContentStampImpl fValue CoreException
public static void set I File file Content Stamp stamp try file set Session Property CONTENT STAMP stamp catch Core Exception e  IFile ContentStamp setSessionProperty CONTENT_STAMP CoreException

Creates a listener list with an initial capacity of 3 public Listener List this 3  ListenerList
Creates a listener list with the given initial capacity param capacity the number of listeners which this list can initially accept without growing its internal representation must be at least 1 public Listener List int capacity Assert is True capacity 1 this capacity capacity  ListenerList isTrue
Adds the given listener to this list Has no effect if an identical listener is already registered param listener the listener public void add Object listener Assert is Not Null listener if size 0 listeners new Object capacity else check for duplicates using identity for int i 0 i size i if listeners i listener return grow array if necessary if size listeners length System arraycopy listeners 0 listeners new Object size 2 1 0 size listeners size listener  isNotNull
Returns an array containing all the registered listeners The resulting array is unaffected by subsequent adds or removes If there are no listeners registered the result is an empty array singleton instance no garbage is created Use this method when notifying listeners so that any modifications to the listener list during the notification will have no effect on the notification itself return the list of registered listeners public Object get Listeners if size 0 return Empty Array Object result new Object size System arraycopy listeners 0 result 0 size return result  getListeners EmptyArray
Returns whether this listener list is empty return code true code if there are no registered listeners and code false code otherwise public boolean is Empty return size 0  isEmpty
Removes the given listener from this list Has no effect if an identical listener was not already registered param listener the listener public void remove Object listener Assert is Not Null listener for int i 0 i size i if listeners i listener if size 0 listeners new Object 1 else if i size listeners i listeners size listeners size null return  isNotNull
Returns the number of registered listeners return the number of registered listeners public int size return size 

public class Not Cancelable Progress Monitor extends Progress Monitor Wrapper public Not Cancelable Progress Monitor I Progress Monitor monitor super monitor  NotCancelableProgressMonitor ProgressMonitorWrapper NotCancelableProgressMonitor IProgressMonitor
super monitor public void set Canceled boolean b ignore set cancel  setCanceled
ignore set cancel public boolean is Canceled return false  isCanceled

private static final String CLASS class NON NLS 1 public Participant Descriptor I Configuration Element element f Configuration Element element f Enabled true  ParticipantDescriptor IConfigurationElement fConfigurationElement fEnabled
public String get Id return f Configuration Element get Attribute ID  getId fConfigurationElement getAttribute
public String get Name return f Configuration Element get Attribute NAME  getName fConfigurationElement getAttribute
public I Status check Syntax if f Configuration Element get Attribute ID null return new Status I Status ERROR Refactoring Core Plugin get Plugin Id I Status ERROR Refactoring Core Messages get String Participant Descriptor error id missing null NON NLS 1 if f Configuration Element get Attribute NAME null return new Status I Status ERROR Refactoring Core Plugin get Plugin Id I Status ERROR Refactoring Core Messages get Formatted String Participant Descriptor error name missing get Id NON NLS 1 null if f Configuration Element get Attribute CLASS null return new Status I Status ERROR Refactoring Core Plugin get Plugin Id I Status ERROR Refactoring Core Messages get Formatted String Participant Descriptor error class missing get Id NON NLS 1 null return new Status I Status OK Refactoring Core Plugin get Plugin Id I Status OK Refactoring Core Messages get String Participant Descriptor correct null NON NLS 1  IStatus checkSyntax fConfigurationElement getAttribute IStatus RefactoringCorePlugin getPluginId IStatus RefactoringCoreMessages getString ParticipantDescriptor id_missing fConfigurationElement getAttribute IStatus RefactoringCorePlugin getPluginId IStatus RefactoringCoreMessages getFormattedString ParticipantDescriptor name_missing getId fConfigurationElement getAttribute IStatus RefactoringCorePlugin getPluginId IStatus RefactoringCoreMessages getFormattedString ParticipantDescriptor class_missing getId IStatus RefactoringCorePlugin getPluginId IStatus RefactoringCoreMessages getString ParticipantDescriptor
public boolean matches I Evaluation Context context throws Core Exception I Configuration Element elements f Configuration Element get Children Expression Tag Names ENABLEMENT if elements length 0 return false Assert is True elements length 1 Expression exp Expression Converter get Default perform elements 0 return convert exp evaluate context  IEvaluationContext CoreException IConfigurationElement fConfigurationElement getChildren ExpressionTagNames isTrue ExpressionConverter getDefault
public Refactoring Participant create Participant throws Core Exception return Refactoring Participant f Configuration Element create Executable Extension CLASS  RefactoringParticipant createParticipant CoreException RefactoringParticipant fConfigurationElement createExecutableExtension
public boolean is Enabled return f Enabled  isEnabled fEnabled
public void disable f Enabled false  fEnabled
private boolean convert Evaluation Result eval if eval Evaluation Result FALSE return false return true  EvaluationResult EvaluationResult

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Refactoring Core Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME RefactoringCoreMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString RESOURCE_BUNDLE getString MissingResourceException
public static String get Formatted String String key String arg try return Message Format format RESOURCE BUNDLE get String key new String arg catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getFormattedString MessageFormat RESOURCE_BUNDLE getString MissingResourceException
public static String get Formatted String String key Object arg try return Message Format format RESOURCE BUNDLE get String key new Object arg catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getFormattedString MessageFormat RESOURCE_BUNDLE getString MissingResourceException
public static String get Formatted String String key String args try return Message Format format RESOURCE BUNDLE get String key args catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getFormattedString MessageFormat RESOURCE_BUNDLE getString MissingResourceException
public static String get Formatted String String key Object args try return Message Format format RESOURCE BUNDLE get String key args catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getFormattedString MessageFormat RESOURCE_BUNDLE getString MissingResourceException

private static Refactoring Core Plugin fg Default public Refactoring Core Plugin fg Default this  RefactoringCorePlugin fgDefault RefactoringCorePlugin fgDefault
public static Refactoring Core Plugin get Default return fg Default  RefactoringCorePlugin getDefault fgDefault
public static String get Plugin Id return org eclipse ltk core refactoring NON NLS 1  getPluginId
public static void log I Status status get Default get Log log status  IStatus getDefault getLog
public static void log Throwable t I Status status new Status I Status ERROR get Plugin Id I Refactoring Core Status Codes INTERNAL ERROR Refactoring Core Messages get String Refactoring Core Plugin internal error NON NLS 1 t Resources Plugin get Plugin get Log log status  IStatus IStatus getPluginId IRefactoringCoreStatusCodes INTERNAL_ERROR RefactoringCoreMessages getString RefactoringCorePlugin internal_error ResourcesPlugin getPlugin getLog
public static void log Removed Listener Throwable t I Status status new Status I Status ERROR get Plugin Id I Refactoring Core Status Codes INTERNAL ERROR Refactoring Core Messages get String Refactoring Core Plugin listener removed NON NLS 1 t Resources Plugin get Plugin get Log log status  logRemovedListener IStatus IStatus getPluginId IRefactoringCoreStatusCodes INTERNAL_ERROR RefactoringCoreMessages getString RefactoringCorePlugin listener_removed ResourcesPlugin getPlugin getLog
public static void log Removed Participant Participant Descriptor descriptor Throwable t I Status status new Status I Status ERROR get Plugin Id I Refactoring Core Status Codes INTERNAL ERROR Refactoring Core Messages get Formatted String Refactoring Core Plugin participant removed NON NLS 1 descriptor get Id t Resources Plugin get Plugin get Log log status  logRemovedParticipant ParticipantDescriptor IStatus IStatus getPluginId IRefactoringCoreStatusCodes INTERNAL_ERROR RefactoringCoreMessages getFormattedString RefactoringCorePlugin participant_removed getId ResourcesPlugin getPlugin getLog
public static void log Error Message String message log new Status I Status ERROR get Plugin Id I Refactoring Core Status Codes INTERNAL ERROR message null  logErrorMessage IStatus getPluginId IRefactoringCoreStatusCodes INTERNAL_ERROR
inherit Doc public void start Bundle Context context throws Exception super start context Save Listener get Instance startup  inheritDoc BundleContext SaveListener getInstance
inherit Doc public void stop Bundle Context context throws Exception Save Listener get Instance shutdown super stop context  inheritDoc BundleContext SaveListener getInstance

public static int get Check Passed Severity String value RefactoringUI Plugin get Default get Preference Store get String CONDITION CHECKING FAILED SEVERITY try return Integer value Of value int Value 1 catch Number Format Exception e return Refactoring Status WARNING return Refactoring Status INFO  getCheckPassedSeverity RefactoringUIPlugin getDefault getPreferenceStore getString CONDITION_CHECKING_FAILED_SEVERITY valueOf intValue NumberFormatException RefactoringStatus RefactoringStatus
public static int get Stop Severity switch get Check Passed Severity case Refactoring Status OK return Refactoring Status INFO case Refactoring Status INFO return Refactoring Status WARNING case Refactoring Status WARNING return Refactoring Status ERROR return Refactoring Status FATAL  getStopSeverity getCheckPassedSeverity RefactoringStatus RefactoringStatus RefactoringStatus RefactoringStatus RefactoringStatus RefactoringStatus RefactoringStatus

public class Resources private Resources 
Checks if the given resource is in sync with the underlying file system param resource the resource to be checked return I Status status describing the check s result If code status isOK code returns code true code then the resource is in sync public static I Status check In Sync I Resource resource return check In Sync new I Resource resource  IStatus IStatus checkInSync IResource checkInSync IResource
Checks if the given resources are in sync with the underlying file system param resources the resources to be checked return I Status status describing the check s result If code status isOK code returns code true code then the resources are in sync public static I Status check In Sync I Resource resources I Status result null for int i 0 i resources length i I Resource resource resources i if resource is Synchronized I Resource DEPTH INFINITE result add Out Of Sync result resource if result null return result return new Status I Status OK Refactoring Core Plugin get Plugin Id I Status OK null NON NLS 1  IStatus IStatus checkInSync IResource IStatus IResource isSynchronized IResource DEPTH_INFINITE addOutOfSync IStatus RefactoringCorePlugin getPluginId IStatus
Makes the given resource committable Committable means that it is writeable and that its content hasn t changed by calling code validate Edit code for the given resource on tt I Workspace tt param resource the resource to be checked param context the context passed to code validate Edit code return status describing the method s result If code status isOK code returns code true code then the resources are committable see org eclipse core resources I Workspace validate Edit org eclipse core resources I File java lang Object public static I Status make Committable I Resource resource Object context return make Committable new I Resource resource context  validateEdit IWorkspace validateEdit IWorkspace validateEdit IFile IStatus makeCommittable IResource makeCommittable IResource
Makes the given resources committable Committable means that all resources are writeable and that the content of the resources hasn t changed by calling code validate Edit code for a given file on tt I Workspace tt param resources the resources to be checked param context the context passed to code validate Edit code return I Status status describing the method s result If code status isOK code returns code true code then the add resources are committable see org eclipse core resources I Workspace validate Edit org eclipse core resources I File java lang Object public static I Status make Committable I Resource resources Object context List read Only Files new Array List for int i 0 i resources length i I Resource resource resources i if resource get Type I Resource FILE resource is Read Only read Only Files add resource if read Only Files size 0 return new Status I Status OK Refactoring Core Plugin get Plugin Id I Status OK null NON NLS 1 Map old Time Stamps create Modification Stamp Map read Only Files I Status status Resources Plugin get Workspace validate Edit I File read Only Files to Array new I File read Only Files size context if status isOK return status I Status modified null Map new Time Stamps create Modification Stamp Map read Only Files for Iterator iter old Time Stamps key Set iterator iter has Next I File file I File iter next if old Time Stamps get file equals new Time Stamps get file modified add Modified modified file if modified null return modified return new Status I Status OK Refactoring Core Plugin get Plugin Id I Status OK null NON NLS 1  validateEdit IWorkspace validateEdit IStatus IWorkspace validateEdit IFile IStatus makeCommittable IResource readOnlyFiles ArrayList IResource getType IResource isReadOnly readOnlyFiles readOnlyFiles IStatus RefactoringCorePlugin getPluginId IStatus oldTimeStamps createModificationStampMap readOnlyFiles IStatus ResourcesPlugin getWorkspace validateEdit IFile readOnlyFiles toArray IFile readOnlyFiles IStatus newTimeStamps createModificationStampMap readOnlyFiles oldTimeStamps keySet hasNext IFile IFile oldTimeStamps newTimeStamps addModified IStatus RefactoringCorePlugin getPluginId IStatus
private static Map create Modification Stamp Map List files Map map new Hash Map for Iterator iter files iterator iter has Next I File file I File iter next map put file new Long file get Modification Stamp return map  createModificationStampMap HashMap hasNext IFile IFile getModificationStamp
private static I Status add Modified I Status status I File file I Status entry new Status I Status ERROR Refactoring Core Plugin get Plugin Id I Refactoring Core Status Codes VALIDATE EDIT CHANGED CONTENT Refactoring Core Messages get Formatted String Resources file Modified file get Full Path to String NON NLS 1 null if status null return entry else if status is Multi Status Multi Status status add entry return status else Multi Status result new Multi Status Refactoring Core Plugin get Plugin Id I Refactoring Core Status Codes VALIDATE EDIT CHANGED CONTENT Refactoring Core Messages get String Resources modified Resources null NON NLS 1 result add status result add entry return result  IStatus addModified IStatus IFile IStatus IStatus RefactoringCorePlugin getPluginId IRefactoringCoreStatusCodes VALIDATE_EDIT_CHANGED_CONTENT RefactoringCoreMessages getFormattedString fileModified getFullPath toString isMultiStatus MultiStatus MultiStatus MultiStatus RefactoringCorePlugin getPluginId IRefactoringCoreStatusCodes VALIDATE_EDIT_CHANGED_CONTENT RefactoringCoreMessages getString modifiedResources
private static I Status add Out Of Sync I Status status I Resource resource I Status entry new Status I Status ERROR Resources Plugin PI RESOURCES I Resource Status OUT OF SYNC LOCAL Refactoring Core Messages get Formatted String Resources out Of Sync resource get Full Path to String NON NLS 1 null if status null return entry else if status is Multi Status Multi Status status add entry return status else Multi Status result new Multi Status Resources Plugin PI RESOURCES I Resource Status OUT OF SYNC LOCAL Refactoring Core Messages get String Resources out Of Sync Resources null NON NLS 1 result add status result add entry return result  IStatus addOutOfSync IStatus IResource IStatus IStatus ResourcesPlugin PI_RESOURCES IResourceStatus OUT_OF_SYNC_LOCAL RefactoringCoreMessages getFormattedString outOfSync getFullPath toString isMultiStatus MultiStatus MultiStatus MultiStatus ResourcesPlugin PI_RESOURCES IResourceStatus OUT_OF_SYNC_LOCAL RefactoringCoreMessages getString outOfSyncResources
public static String get LocationOS Strings I Resource resources List result new Array List resources length for int i 0 i resources length i I Path location resources i get Location if location null result add location toOS String return String result to Array new String result size  getLocationOSStrings IResource ArrayList IPath getLocation toOSString toArray

private class Delta Visitor implements I Resource Delta Visitor public boolean visit I Resource Delta delta I Resource resource delta get Resource if resource get Type I Resource FILE delta get Kind I Resource Delta CHANGED delta get Flags I Resource Delta CONTENT 0 I File file I File resource Content Stamps increment file return true  DeltaVisitor IResourceDeltaVisitor IResourceDelta IResource getResource getType IResource getKind IResourceDelta getFlags IResourceDelta IFile IFile ContentStamps
private static final Save Listener INSTANCE new Save Listener public static Save Listener get Instance return INSTANCE  SaveListener SaveListener SaveListener getInstance
public void resource Changed I Resource Change Event event try I Resource Delta delta event get Delta if delta null f In Change Execution 0 delta accept f Visitor catch Core Exception e Refactoring Core Plugin log e  resourceChanged IResourceChangeEvent IResourceDelta getDelta fInChangeExecution fVisitor CoreException RefactoringCorePlugin
public void undo Stack Changed I Undo Manager manager  undoStackChanged IUndoManager
public void undo Stack Changed I Undo Manager manager public void redo Stack Changed I Undo Manager manager  undoStackChanged IUndoManager redoStackChanged IUndoManager
public void redo Stack Changed I Undo Manager manager public void about To Perform Change I Undo Manager manager Change change f In Change Execution  redoStackChanged IUndoManager aboutToPerformChange IUndoManager fInChangeExecution
f In Change Execution public void change Performed I Undo Manager manager Change change f In Change Execution  fInChangeExecution changePerformed IUndoManager fInChangeExecution
public void startup Resources Plugin get Workspace add Resource Change Listener this Refactoring Core get Undo Manager add Listener this  ResourcesPlugin getWorkspace addResourceChangeListener RefactoringCore getUndoManager addListener
public void shutdown Resources Plugin get Workspace remove Resource Change Listener this Refactoring Core get Undo Manager remove Listener this  ResourcesPlugin getWorkspace removeResourceChangeListener RefactoringCore getUndoManager removeListener

public class Text Changes private Text Changes no instance  TextChanges TextChanges
public static I Document get Document I File file throws Core Exception I Text File Buffer Manager manager File Buffers get Text File Buffer Manager I Path path file get Full Path I Text File Buffer buffer manager get Text File Buffer path if buffer null return null return buffer get Document  IDocument getDocument IFile CoreException ITextFileBufferManager FileBuffers getTextFileBufferManager IPath getFullPath ITextFileBuffer getTextFileBuffer getDocument
public static Refactoring Status is Valid I File file boolean existed long last Modification Stamp boolean f Save throws Core Exception the file did not exist anymore when initializing the validation state In this case we must ensure that it still doesn t exist if existed if file exists return Refactoring Status create Fatal Error Status Refactoring Core Messages get Formatted String Text Changes error existing NON NLS 1 file get Full Path to String else if file exists return Refactoring Status create Fatal Error Status Refactoring Core Messages get Formatted String Text Changes error not existing NON NLS 1 file get Full Path to String if last Modification Stamp file get Modification Stamp return Refactoring Status create Fatal Error Status Refactoring Core Messages get Formatted String Text Changes error content changed NON NLS 1 file get Full Path to String if file is Read Only return Refactoring Status create Fatal Error Status Refactoring Core Messages get Formatted String Text Changes error read only NON NLS 1 file get Full Path to String if file is Synchronized I Resource DEPTH ZERO return Refactoring Status create Fatal Error Status Refactoring Core Messages get Formatted String Text Changes error out Of Sync NON NLS 1 file get Full Path to String if f Save I Text File Buffer Manager manager File Buffers get Text File Buffer Manager Don t connect We want to check if the file is under modification right now I Text File Buffer buffer manager get Text File Buffer file get Full Path if buffer null buffer is Dirty return Refactoring Status create Fatal Error Status Refactoring Core Messages get Formatted String Text Changes error unsaved changes NON NLS 1 file get Full Path to String return new Refactoring Status  RefactoringStatus isValid IFile lastModificationStamp fSave CoreException RefactoringStatus createFatalErrorStatus RefactoringCoreMessages getFormattedString TextChanges getFullPath toString RefactoringStatus createFatalErrorStatus RefactoringCoreMessages getFormattedString TextChanges not_existing getFullPath toString lastModificationStamp getModificationStamp RefactoringStatus createFatalErrorStatus RefactoringCoreMessages getFormattedString TextChanges content_changed getFullPath toString isReadOnly RefactoringStatus createFatalErrorStatus RefactoringCoreMessages getFormattedString TextChanges read_only getFullPath toString isSynchronized IResource DEPTH_ZERO RefactoringStatus createFatalErrorStatus RefactoringCoreMessages getFormattedString TextChanges outOfSync getFullPath toString fSave ITextFileBufferManager FileBuffers getTextFileBufferManager ITextFileBuffer getTextFileBuffer getFullPath isDirty RefactoringStatus createFatalErrorStatus RefactoringCoreMessages getFormattedString TextChanges unsaved_changes getFullPath toString RefactoringStatus
public static Refactoring Status is Valid I Document document int length throws Core Exception Refactoring Status result new Refactoring Status if length document get Length result add Fatal Error Refactoring Core Messages get String Text Changes error document content changed NON NLS 1 return result  RefactoringStatus isValid IDocument CoreException RefactoringStatus RefactoringStatus getLength addFatalError RefactoringCoreMessages getString TextChanges document_content_changed

public Undo Document Change String name I Document document Undo Edit undo f Name name f Undo undo f Document document  UndoDocumentChange IDocument UndoEdit fName fUndo fDocument
inherit Doc public String get Name return f Name  inheritDoc getName fName
inherit Doc public Object get Modified Element return null  inheritDoc getModifiedElement
inherit Doc public void initialize Validation Data I Progress Monitor pm f Length f Document get Length  inheritDoc initializeValidationData IProgressMonitor fLength fDocument getLength
inherit Doc public Refactoring Status is Valid I Progress Monitor pm throws Core Exception if pm null pm new Null Progress Monitor pm begin Task 1 NON NLS 1 Refactoring Status result Text Changes is Valid f Document f Length pm worked 1 return result  inheritDoc RefactoringStatus isValid IProgressMonitor CoreException NullProgressMonitor beginTask RefactoringStatus TextChanges isValid fDocument fLength
inherit Doc public Change perform I Progress Monitor pm throws Core Exception try Undo Edit redo f Undo apply f Document Text Edit CREATE UNDO Change result new Undo Document Change get Name f Document redo return result catch Bad Location Exception e throw Changes as Core Exception e  inheritDoc IProgressMonitor CoreException UndoEdit fUndo fDocument TextEdit CREATE_UNDO UndoDocumentChange getName fDocument BadLocationException asCoreException

private static class Null Query implements I Validation Check Result Query public boolean proceed Refactoring Status status return true  NullQuery IValidationCheckResultQuery RefactoringStatus
return true public void stopped Refactoring Status status do nothing  RefactoringStatus
Creates a new undo manager with an empty undo and redo stack public Undo Manager flush  UndoManager
public void add Listener I Undo Manager Listener listener if f Listeners null f Listeners new Listener List f Listeners add listener  addListener IUndoManagerListener fListeners fListeners ListenerList fListeners
public void remove Listener I Undo Manager Listener listener if f Listeners null return f Listeners remove listener if f Listeners size 0 f Listeners null  removeListener IUndoManagerListener fListeners fListeners fListeners fListeners
inherit Doc public void about To Perform Change Change change if f Listeners null return Object listeners f Listeners get Listeners for int i 0 i listeners length i I Undo Manager Listener listeners i about To Perform Change this change  inheritDoc aboutToPerformChange fListeners fListeners getListeners IUndoManagerListener aboutToPerformChange
inherit Doc public void change Performed Change change if f Listeners null return Object listeners f Listeners get Listeners for int i 0 i listeners length i I Undo Manager Listener listeners i change Performed this change  inheritDoc changePerformed fListeners fListeners getListeners IUndoManagerListener changePerformed
Non Javadoc Method declared in I Undo Manager public void about To Perform Refactoring  IUndoManager aboutToPerformRefactoring
Non Javadoc Method declared in I Undo Manager public void refactoring Performed boolean success  IUndoManager refactoringPerformed
see I Undo Manager shutdown public void shutdown  IUndoManager
Non Javadoc Method declared in I Undo Manager public void flush flush Undo flush Redo  IUndoManager flushUndo flushRedo
private void flush Undo if f Undo Changes null send Dispose f Undo Changes f Undo Changes new Stack f Undo Names new Stack fire Undo Stack Changed  flushUndo fUndoChanges sendDispose fUndoChanges fUndoChanges fUndoNames fireUndoStackChanged
private void flush Redo if f Redo Changes null send Dispose f Redo Changes f Redo Changes new Stack f Redo Names new Stack fire Redo Stack Changed  flushRedo fRedoChanges sendDispose fRedoChanges fRedoChanges fRedoNames fireRedoStackChanged
public void add Undo String refactoring Name Change change Assert is Not Null refactoring Name refactoring NON NLS 1 Assert is Not Null change change NON NLS 1 f Undo Names push refactoring Name f Undo Changes push change if f Undo Changes size MAX UNDO REDOS f Undo Changes remove 0 f Undo Names remove 0 flush Redo fire Undo Stack Changed  addUndo refactoringName isNotNull refactoringName isNotNull fUndoNames refactoringName fUndoChanges fUndoChanges MAX_UNDO_REDOS fUndoChanges fUndoNames flushRedo fireUndoStackChanged
public void perform Undo I Validation Check Result Query query I Progress Monitor pm throws Core Exception if pm null pm new Null Progress Monitor Refactoring Status result new Refactoring Status if f Undo Changes empty return Change change Change f Undo Changes pop if query null query new Null Query Change redo try redo execute Change result change query pm catch Interrupted Exception e f Undo Changes push change return if result has Fatal Error if redo null f Undo Names is Empty f Redo Names push f Undo Names pop f Redo Changes push redo fire Undo Stack Changed fire Redo Stack Changed else flush else flush  performUndo IValidationCheckResultQuery IProgressMonitor CoreException NullProgressMonitor RefactoringStatus RefactoringStatus fUndoChanges fUndoChanges NullQuery executeChange InterruptedException fUndoChanges hasFatalError fUndoNames isEmpty fRedoNames fUndoNames fRedoChanges fireUndoStackChanged fireRedoStackChanged
public void perform Redo I Validation Check Result Query query I Progress Monitor pm throws Core Exception if pm null pm new Null Progress Monitor Refactoring Status result new Refactoring Status if f Redo Changes empty return Change change Change f Redo Changes pop if query null query new Null Query Change undo try undo execute Change result change query pm catch Interrupted Exception e f Redo Changes push change return if result has Fatal Error if undo null f Redo Names is Empty f Undo Names push f Redo Names pop f Undo Changes push undo fire Redo Stack Changed fire Undo Stack Changed else flush  performRedo IValidationCheckResultQuery IProgressMonitor CoreException NullProgressMonitor RefactoringStatus RefactoringStatus fRedoChanges fRedoChanges NullQuery executeChange InterruptedException fRedoChanges hasFatalError fRedoNames isEmpty fUndoNames fRedoNames fUndoChanges fireRedoStackChanged fireUndoStackChanged
I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception boolean undo Initialized false try monitor begin Task 11 NON NLS 1 status merge change is Valid new Sub Progress Monitor monitor 2 if status has Fatal Error query stopped status return if status isOK query proceed status interrupted 0 true return Resources Plugin get Workspace checkpoint false about To Perform Change change undo 0 change perform new Sub Progress Monitor monitor 8 Resources Plugin get Workspace checkpoint false change Performed change change dispose if undo 0 null undo 0 initialize Validation Data new Sub Progress Monitor monitor 1 undo Initialized true catch Core Exception e flush if undo 0 null undo Initialized Change ch undo 0 undo 0 null ch dispose else undo 0 null throw e catch Runtime Exception e flush if undo 0 null undo Initialized Change ch undo 0 undo 0 null ch dispose else undo 0 null throw e finally monitor done  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException undoInitialized beginTask isValid SubProgressMonitor hasFatalError ResourcesPlugin getWorkspace aboutToPerformChange SubProgressMonitor ResourcesPlugin getWorkspace changePerformed initializeValidationData SubProgressMonitor undoInitialized CoreException undoInitialized RuntimeException undoInitialized
private Change execute Change final Refactoring Status status final Change change final I Validation Check Result Query query I Progress Monitor pm throws Core Exception Interrupted Exception final Change undo new Change 1 final boolean interrupted new boolean 1 I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception boolean undo Initialized false try monitor begin Task 11 NON NLS 1 status merge change is Valid new Sub Progress Monitor monitor 2 if status has Fatal Error query stopped status return if status isOK query proceed status interrupted 0 true return Resources Plugin get Workspace checkpoint false about To Perform Change change undo 0 change perform new Sub Progress Monitor monitor 8 Resources Plugin get Workspace checkpoint false change Performed change change dispose if undo 0 null undo 0 initialize Validation Data new Sub Progress Monitor monitor 1 undo Initialized true catch Core Exception e flush if undo 0 null undo Initialized Change ch undo 0 undo 0 null ch dispose else undo 0 null throw e catch Runtime Exception e flush if undo 0 null undo Initialized Change ch undo 0 undo 0 null ch dispose else undo 0 null throw e finally monitor done Resources Plugin get Workspace run runnable pm if interrupted 0 throw new Interrupted Exception return undo 0  executeChange RefactoringStatus IValidationCheckResultQuery IProgressMonitor CoreException InterruptedException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException undoInitialized beginTask isValid SubProgressMonitor hasFatalError ResourcesPlugin getWorkspace aboutToPerformChange SubProgressMonitor ResourcesPlugin getWorkspace changePerformed initializeValidationData SubProgressMonitor undoInitialized CoreException undoInitialized RuntimeException undoInitialized ResourcesPlugin getWorkspace InterruptedException
Non Javadoc Method declared in I Undo Manager public boolean anything To Redo return f Redo Changes empty  IUndoManager anythingToRedo fRedoChanges
Non Javadoc Method declared in I Undo Manager public boolean anything To Undo return f Undo Changes empty  IUndoManager anythingToUndo fUndoChanges
public String peek Undo Name if f Undo Names size 0 return String f Undo Names peek return null  peekUndoName fUndoNames fUndoNames
public String peek Redo Name if f Redo Names size 0 return String f Redo Names peek return null  peekRedoName fRedoNames fRedoNames
private void fire Undo Stack Changed if f Listeners null return Object listeners f Listeners get Listeners for int i 0 i listeners length i I Undo Manager Listener listeners i undo Stack Changed this  fireUndoStackChanged fListeners fListeners getListeners IUndoManagerListener undoStackChanged
private void fire Redo Stack Changed if f Listeners null return Object listeners f Listeners get Listeners for int i 0 i listeners length i I Undo Manager Listener listeners i redo Stack Changed this  fireRedoStackChanged fListeners fListeners getListeners IUndoManagerListener redoStackChanged
private void send Dispose Collection collection for Iterator iter collection iterator iter has Next Change change Change iter next change dispose  sendDispose hasNext
testing methods public boolean test Has Number Of Undos int number return f Undo Changes size number  testHasNumberOfUndos fUndoChanges
public boolean test Has Number Of Redos int number return f Redo Changes size number  testHasNumberOfRedos fRedoChanges

protected static final String CLASS class NON NLS 1 protected Abstract Descriptor I Configuration Element element f Configuration Element element  AbstractDescriptor IConfigurationElement fConfigurationElement
public String get Id return f Configuration Element get Attribute ID  getId fConfigurationElement getAttribute
public boolean matches Object element String variable Name throws Core Exception Assert is Not Null element Assert is Not Null variable Name Expression exp get Expression Evaluation Context evaluation Context new Evaluation Context null element evaluation Context add Variable variable Name element if exp evaluate evaluation Context Evaluation Result FALSE return false return true  variableName CoreException isNotNull isNotNull variableName getExpression EvaluationContext evaluationContext EvaluationContext evaluationContext addVariable variableName evaluationContext EvaluationResult
public Expression get Expression throws Core Exception if f Expression null f Expression create Expression f Configuration Element return f Expression  getExpression CoreException fExpression fExpression createExpression fConfigurationElement fExpression
public void clear f Expression null  fExpression
protected Expression create Expression I Configuration Element element throws Core Exception I Configuration Element children element get Children Expression Tag Names ENABLEMENT if children length 0 return Expression FALSE TODO we should add some sort of syntax check and throw an core exception in this case Assert is True children length 1 return Expression Converter get Default perform children 0  createExpression IConfigurationElement CoreException IConfigurationElement getChildren ExpressionTagNames isTrue ExpressionConverter getDefault

This class is not intended to be instantiated private Assert not allowed 
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression return is Legal expression NON NLS 1  IllegalArgumentException IllegalArgumentException isLegal isLegal
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression String message if expression throw new Illegal Argument Exception message return expression  IllegalArgumentException IllegalArgumentException isLegal IllegalArgumentException
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown param object the value to test exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object is Not Null object NON NLS 1  IllegalArgumentException isNotNull isNotNull
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param object the value to test param message the message to include in the exception exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object String message if object null throw new Assertion Failed Exception null argument message NON NLS 1  IllegalArgumentException isNotNull AssertionFailedException
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails public static boolean is True boolean expression return is True expression NON NLS 1  isTrue isTrue
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails public static boolean is True boolean expression String message if expression throw new Assertion Failed Exception assertion failed message NON NLS 1 return expression  isTrue AssertionFailedException

class Assertion Failed Exception extends Runtime Exception Constructs a new exception public Assertion Failed Exception super  AssertionFailedException RuntimeException AssertionFailedException
Constructs a new exception with the given message param detail the detail message public Assertion Failed Exception String detail super detail  AssertionFailedException

Creates a new code Change Element code with the given parent param parent the change element s parent or code null code if the change element doesn t have a parent public Change Element Change Element parent f Parent parent  ChangeElement ChangeElement ChangeElement fParent
Returns the change element s parent return the change element s parent public Change Element get Parent return f Parent  ChangeElement getParent fParent
Returns the viewer descriptor used to present a preview of this change element return the viewer suitable to present a preview of this change or code null code if no previewer is configured throws Core Exception if an error occurred while creating the descriptor  CoreException
public abstract Change Preview Viewer Descriptor get Change Preview Viewer Descriptor throws Core Exception public abstract void feed Input I Change Preview Viewer viewer throws Core Exception  ChangePreviewViewerDescriptor getChangePreviewViewerDescriptor CoreException feedInput IChangePreviewViewer CoreException
Returns the change directly associated with this change element or code null code if the element isn t associated with a change return the change or code null code 
Sets the activation status for this code Change Element code When a change element is not active then executing it is expected to do nothing param active the activation status for this change element  ChangeElement
Returns the activation status of this code Change Element code Returns one of the following values code I Change ACTIVE code if the node and all its children are active code I Change INACTIVE code if all children and the node itself is inactive and code I Change PARTLy ACTIVE code otherwise return the change element s activation status  ChangeElement IChange IChange IChange PARTLy_ACTIVE
Returns the change element s children return the change element s children 

private static class Offset Comparator implements Comparator public int compare Object o1 Object o2 Text Edit Change Group c1 Text Edit Change Group o1 Text Edit Change Group c2 Text Edit Change Group o2 int p1 get Offset c1 int p2 get Offset c2 if p1 p2 return 1 if p1 p2 return 1 same offset return 0  OffsetComparator TextEditChangeGroup TextEditChangeGroup TextEditChangeGroup TextEditChangeGroup getOffset getOffset
return 0 private int get Offset Text Edit Change Group edit return edit get Region get Offset  getOffset TextEditChangeGroup getRegion getOffset
see I Tree Content Provider input Changed public void input Changed Viewer viewer Object old Input Object new Input do nothing  ITreeContentProvider inputChanged inputChanged oldInput newInput
public Object get Children Object o Change Element element Change Element o Change Element children element get Children if children null children create Children element return children  getChildren ChangeElement ChangeElement ChangeElement getChildren createChildren
see I Tree Content Provider get Parent public Object get Parent Object element return Change Element element get Parent  ITreeContentProvider getParent getParent ChangeElement getParent
see I Tree Content Provider has Children public boolean has Children Object element Object children get Children element return children null children length 0  ITreeContentProvider hasChildren hasChildren getChildren
see I Tree Content Provider dispose public void dispose  ITreeContentProvider
see I Tree Content Provider get Elements public Object get Elements Object element return get Children element  ITreeContentProvider getElements getElements getChildren
private Change Element create Children Change Element object Change Element result EMPTY CHILDREN if object instanceof Default Change Element return result Default Change Element change Element Default Change Element object Change change change Element get Change if change instanceof Composite Change List children new Array List get Flattended Children children change Element Composite Change change result Change Element children to Array new Change Element children size else if change instanceof Text Change Text Change text Change Text Change change I Compilation Unit cunit I Compilation Unit text Change get Adapter I Compilation Unit class if cunit null List children new Array List 5 Map map new Hash Map 20 Text Edit Change Group changes get Sorted Text Edit Changes text Change for int i 0 i changes length i Text Edit Change Group tec changes i try I Java Element element get Modified Java Element tec cunit if element equals cunit children add new Text Edit Change Element change Element tec else Pseudo Java Change Element pjce get Change Element map element children change Element pjce add Child new Text Edit Change Element pjce tec catch Java Model Exception e children add new Text Edit Change Element change Element tec result Change Element children to Array new Change Element children size else Text Edit Change Group changes get Sorted Text Edit Changes Text Change change result new Change Element changes length for int i 0 i changes length i result i new Text Edit Change Element change Element changes i change Element set Children result return result  ChangeElement createChildren ChangeElement ChangeElement EMPTY_CHILDREN DefaultChangeElement DefaultChangeElement changeElement DefaultChangeElement changeElement getChange CompositeChange ArrayList getFlattendedChildren changeElement CompositeChange ChangeElement toArray ChangeElement TextChange TextChange textChange TextChange ICompilationUnit ICompilationUnit textChange getAdapter ICompilationUnit ArrayList HashMap TextEditChangeGroup getSortedTextEditChanges textChange TextEditChangeGroup IJavaElement getModifiedJavaElement TextEditChangeElement changeElement PseudoJavaChangeElement getChangeElement changeElement addChild TextEditChangeElement JavaModelException TextEditChangeElement changeElement ChangeElement toArray ChangeElement TextEditChangeGroup getSortedTextEditChanges TextChange ChangeElement TextEditChangeElement changeElement changeElement setChildren
private Text Edit Change Group get Sorted Text Edit Changes Text Change change Text Edit Change Group edits change get Text Edit Change Groups List result new Array List edits length for int i 0 i edits length i if edits i get Text Edit Group is Empty result add edits i Comparator comparator new Offset Comparator Collections sort result comparator return Text Edit Change Group result to Array new Text Edit Change Group result size  TextEditChangeGroup getSortedTextEditChanges TextChange TextEditChangeGroup getTextEditChangeGroups ArrayList getTextEditGroup isEmpty OffsetComparator TextEditChangeGroup toArray TextEditChangeGroup
private Pseudo Java Change Element get Change Element Map map I Java Element element List children Change Element cunit Change Pseudo Java Change Element result Pseudo Java Change Element map get element if result null return result I Java Element parent element get Parent if parent instanceof I Compilation Unit result new Pseudo Java Change Element cunit Change element children add result map put element result else Pseudo Java Change Element parent Change get Change Element map parent children cunit Change result new Pseudo Java Change Element parent Change element parent Change add Child result map put element result return result  PseudoJavaChangeElement getChangeElement IJavaElement ChangeElement cunitChange PseudoJavaChangeElement PseudoJavaChangeElement IJavaElement getParent ICompilationUnit PseudoJavaChangeElement cunitChange PseudoJavaChangeElement parentChange getChangeElement cunitChange PseudoJavaChangeElement parentChange parentChange addChild
private I Java Element get Modified Java Element Text Edit Change Group edit I Compilation Unit cunit throws Java Model Exception I Region range edit get Region if range get Offset 0 range get Length 0 return cunit I Java Element result cunit get Element At range get Offset if result null return cunit try while true I Source Reference ref I Source Reference result I Region s Range new Region ref get Source Range get Offset ref get Source Range get Length if result get Element Type I Java Element COMPILATION UNIT result get Parent null covered By edit s Range break result result get Parent catch Java Model Exception e Do nothing use old value catch Class Cast Exception e Do nothing use old value return result  IJavaElement getModifiedJavaElement TextEditChangeGroup ICompilationUnit JavaModelException IRegion getRegion getOffset getLength IJavaElement getElementAt getOffset ISourceReference ISourceReference IRegion sRange getSourceRange getOffset getSourceRange getLength getElementType IJavaElement COMPILATION_UNIT getParent coveredBy sRange getParent JavaModelException ClassCastException
private void get Flattended Children List result Default Change Element parent Composite Change focus Change changes focus get Children for int i 0 i changes length i Change change changes i if change instanceof Composite Change Composite Change change is Synthetic get Flattended Children result parent Composite Change change else result add new Default Change Element parent change  getFlattendedChildren DefaultChangeElement CompositeChange getChildren CompositeChange CompositeChange isSynthetic getFlattendedChildren CompositeChange DefaultChangeElement
public boolean covered By Text Edit Change Group group I Region source Region int s Length source Region get Length if s Length 0 return false int s Offset source Region get Offset int s End s Offset s Length 1 Text Edit edits group get Text Edits for int i 0 i edits length i Text Edit edit edits i if edit is Deleted return false int r Offset edit get Offset int r Length edit get Length int r End r Offset r Length 1 if r Length 0 if s Offset r Offset r Offset s End return false else if s Offset r Offset r End s End return false return true  coveredBy TextEditChangeGroup IRegion sourceRegion sLength sourceRegion getLength sLength sOffset sourceRegion getOffset sEnd sOffset sLength TextEdit getTextEdits TextEdit isDeleted rOffset getOffset rLength getLength rEnd rOffset rLength rLength sOffset rOffset rOffset sEnd sOffset rOffset rEnd sEnd

private boolean f Show Qualification true public Change Element Label Provider  fShowQualification ChangeElementLabelProvider
public void set Show Qualification boolean show Qualification f Show Qualification show Qualification Label Provider Changed Event event new Label Provider Changed Event this null fire Label Provider Changed event  setShowQualification showQualification fShowQualification showQualification LabelProviderChangedEvent LabelProviderChangedEvent fireLabelProviderChanged
public Image get Image Object object if object instanceof Default Change Element Object element Default Change Element object get Change return do Get Image element else if object instanceof Text Edit Change Element Object element Text Edit Change Element object get Text Edit Change return do Get Image element else if object instanceof Pseudo Java Change Element Pseudo Java Change Element element Pseudo Java Change Element object I Adaptable j Element element get Java Element I Workbench Adapter adapter I Workbench Adapter j Element get Adapter I Workbench Adapter class if adapter null return manage Image Descriptor adapter get Image Descriptor j Element return super get Image object  getImage DefaultChangeElement DefaultChangeElement getChange doGetImage TextEditChangeElement TextEditChangeElement getTextEditChange doGetImage PseudoJavaChangeElement PseudoJavaChangeElement PseudoJavaChangeElement IAdaptable jElement getJavaElement IWorkbenchAdapter IWorkbenchAdapter jElement getAdapter IWorkbenchAdapter manageImageDescriptor getImageDescriptor jElement getImage
public String get Text Object object if object instanceof Default Change Element Change change Default Change Element object get Change if f Show Qualification return change get Name if change instanceof Text File Change I File file Text File Change change get File return RefactoringUI Messages get Formatted String Preview Wizard Page change Element Label Provider text Format NON NLS 1 new String file get Name get Path file else return change get Name else if object instanceof Text Edit Change Element Text Edit Change Element element Text Edit Change Element object String result element get Text Edit Change get Name if f Java Element Flags Java Element Label Provider SHOW POST QUALIFIED 0 Change Element parent get Parent element if parent null result RefactoringUI Messages get Formatted String Preview Wizard Page change Element Label Provider text Format Edit NON NLS 1 new String get Text parent result return result else if object instanceof Pseudo Java Change Element Pseudo Java Change Element element Pseudo Java Change Element object I Adaptable j Element element get Java Element I Workbench Adapter adapter I Workbench Adapter j Element get Adapter I Workbench Adapter class if adapter null return adapter get Label j Element return super get Text object  getText DefaultChangeElement DefaultChangeElement getChange fShowQualification getName TextFileChange IFile TextFileChange getFile RefactoringUIMessages getFormattedString PreviewWizardPage changeElementLabelProvider textFormat getName getPath getName TextEditChangeElement TextEditChangeElement TextEditChangeElement getTextEditChange getName fJavaElementFlags JavaElementLabelProvider SHOW_POST_QUALIFIED ChangeElement getParent RefactoringUIMessages getFormattedString PreviewWizardPage changeElementLabelProvider textFormatEdit getText PseudoJavaChangeElement PseudoJavaChangeElement PseudoJavaChangeElement IAdaptable jElement getJavaElement IWorkbenchAdapter IWorkbenchAdapter jElement getAdapter IWorkbenchAdapter getLabel jElement getText
public void dispose for Iterator iter f Descriptor Image Map values iterator iter has Next Image image Image iter next image dispose super dispose  fDescriptorImageMap hasNext
private Image do Get Image Object element Image Descriptor descriptor null if descriptor null if element instanceof Text Edit Change Element descriptor Refactoring Plugin Images DESC OBJS TEXT EDIT else if element instanceof Composite Change descriptor Refactoring Plugin Images DESC OBJS COMPOSITE CHANGE else if element instanceof Compilation Unit Change descriptor Refactoring Plugin Images DESC OBJS CU CHANGE else if element instanceof Text File Change descriptor Refactoring Plugin Images DESC OBJS FILE CHANGE else descriptor Refactoring Plugin Images DESC OBJS DEFAULT CHANGE return manage Image Descriptor descriptor  doGetImage ImageDescriptor TextEditChangeElement RefactoringPluginImages DESC_OBJS_TEXT_EDIT CompositeChange RefactoringPluginImages DESC_OBJS_COMPOSITE_CHANGE CompilationUnitChange RefactoringPluginImages DESC_OBJS_CU_CHANGE TextFileChange RefactoringPluginImages DESC_OBJS_FILE_CHANGE RefactoringPluginImages DESC_OBJS_DEFAULT_CHANGE manageImageDescriptor
private Image manage Image Descriptor Image Descriptor descriptor Image image Image f Descriptor Image Map get descriptor if image null image descriptor create Image f Descriptor Image Map put descriptor image return image  manageImageDescriptor ImageDescriptor fDescriptorImageMap createImage fDescriptorImageMap
private String get Path I File file String Buffer result new String Buffer file get Project get Name String project Relative Path file get Parent get Project Relative Path to String if project Relative Path length 0 result append result append project Relative Path return result to String  getPath IFile StringBuffer StringBuffer getProject getName projectRelativePath getParent getProjectRelativePath toString projectRelativePath projectRelativePath toString

public Change Element Tree Viewer Composite parent Composite super parent Composite SWT NONE add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Change Element element Change Element event get Element boolean checked event get Checked element set Active checked set Subtree Checked element checked set Subtree Grayed element false Change Element parent element get Parent while parent null int active parent get Active boolean grayed active Change Element PARTLY ACTIVE set Checked parent checked true grayed set Grayed parent grayed parent parent get Parent  ChangeElementTreeViewer parentComposite parentComposite addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent ChangeElement ChangeElement getElement getChecked setActive setSubtreeChecked setSubtreeGrayed ChangeElement getParent getActive ChangeElement PARTLY_ACTIVE setChecked setGrayed getParent
protected void input Changed Object input Object old Input super input Changed input old Input XXX workaround for http bugs eclipse org bugs show bug cgi id 9390 initialize Children Change Element input  inputChanged oldInput inputChanged oldInput show_bug initializeChildren ChangeElement
protected void do Update Item Item item Object element super do Update Item item element Tree Item tree Item Tree Item item Change Element ce Change Element element int state ce get Active boolean checked state Change Element INACTIVE false true tree Item set Checked checked boolean grayed state Change Element PARTLY ACTIVE true false tree Item set Grayed grayed  doUpdateItem doUpdateItem TreeItem treeItem TreeItem ChangeElement ChangeElement getActive ChangeElement treeItem setChecked ChangeElement PARTLY_ACTIVE treeItem setGrayed
protected void reveal Next reveal Element true  revealNext revealElement
protected void reveal Previous reveal Element false  revealPrevious revealElement
private void initialize Children Change Element element if element null return Change Element children element get Children if children null return for int i 0 i children length i Change Element child children i int state child get Active boolean checked state Change Element INACTIVE false true if checked set Checked child checked boolean grayed state Change Element PARTLY ACTIVE true false if grayed set Grayed child grayed  initializeChildren ChangeElement ChangeElement getChildren ChangeElement getActive ChangeElement setChecked ChangeElement PARTLY_ACTIVE setGrayed
private void set Subtree Grayed Object element boolean grayed Widget widget find Item element if widget instanceof Tree Item Tree Item item Tree Item widget if item get Grayed grayed item set Grayed grayed gray Children get Children item grayed  setSubtreeGrayed findItem TreeItem TreeItem TreeItem getGrayed setGrayed grayChildren getChildren
private void gray Children Item items boolean grayed for int i 0 i items length i Item element items i if element instanceof Tree Item Tree Item item Tree Item element if item get Grayed grayed item set Grayed grayed gray Children get Children item grayed  grayChildren TreeItem TreeItem TreeItem getGrayed setGrayed grayChildren getChildren
private void reveal Element boolean next Change Element current Change Element get Input I Structured Selection selection I Structured Selection get Selection if selection is Empty current Change Element selection iterator next Change Element candidate get Leaf current next if candidate null candidate get Element current next if candidate null Change Element leaf get Leaf candidate next if leaf null candidate leaf if candidate null set Selection new Structured Selection candidate true else get Control get Display beep  revealElement ChangeElement ChangeElement getInput IStructuredSelection IStructuredSelection getSelection isEmpty ChangeElement ChangeElement getLeaf getElement ChangeElement getLeaf setSelection StructuredSelection getControl getDisplay
private Change Element get Leaf Change Element element boolean first Change Element result null Change Element children element get Children while children null children length 0 result children first 0 children length 1 children result get Children return result  ChangeElement getLeaf ChangeElement ChangeElement ChangeElement getChildren getChildren
private Change Element get Element Change Element element boolean next while true Change Element parent element get Parent if parent null return null Change Element candidate get Sibling parent get Children element next if candidate null return candidate element parent  ChangeElement getElement ChangeElement ChangeElement getParent ChangeElement getSibling getChildren
private Change Element get Sibling Change Element children Change Element element boolean next for int i 0 i children length i if children i element if next if i children length 1 return children i 1 else return null else if i 0 return children i 1 else return null return null  ChangeElement getSibling ChangeElement ChangeElement

private static class Refactor Error Dialog extends Error Dialog public Refactor Error Dialog Shell parent Shell String dialog Title String message I Status status int display Mask super parent Shell dialog Title message status display Mask  RefactorErrorDialog ErrorDialog RefactorErrorDialog parentShell dialogTitle IStatus displayMask parentShell dialogTitle displayMask
protected void create Buttons For Button Bar Composite parent super create Buttons For Button Bar parent Button ok get Button I Dialog Constants OK ID ok set Text RefactoringUI Messages get String Change Exception Handler undo NON NLS 1 Button abort create Button parent I Dialog Constants CANCEL ID RefactoringUI Messages get String Change Exception Handler abort true NON NLS 1 abort move Below ok abort set Focus  createButtonsForButtonBar createButtonsForButtonBar getButton IDialogConstants OK_ID setText RefactoringUIMessages getString ChangeExceptionHandler createButton IDialogConstants CANCEL_ID RefactoringUIMessages getString ChangeExceptionHandler moveBelow setFocus
protected Control create Message Area Composite parent Control result super create Message Area parent new Label parent SWT NONE filler Label label new Label parent SWT NONE label set Text RefactoringUI Messages get String Change Exception Handler button explanation NON NLS 1 label set Layout Data new Grid Data Grid Data FILL HORIZONTAL apply Dialog Font result return result  createMessageArea createMessageArea setText RefactoringUIMessages getString ChangeExceptionHandler button_explanation setLayoutData GridData GridData FILL_HORIZONTAL applyDialogFont
public Change Exception Handler Shell parent Refactoring refactoring f Parent parent f Name refactoring get Name  ChangeExceptionHandler fParent fName getName
public void handle Change change Runtime Exception exception RefactoringUI Plugin log exception I Status status null if exception get Message null status new Status I Status ERROR RefactoringUI Plugin get Plugin Id I Status ERROR RefactoringUI Messages get String Change Exception Handler no details exception NON NLS 1 else status new Status I Status ERROR RefactoringUI Plugin get Plugin Id I Status ERROR exception get Message exception handle change status  RuntimeException RefactoringUIPlugin IStatus getMessage IStatus RefactoringUIPlugin getPluginId IStatus RefactoringUIMessages getString ChangeExceptionHandler no_details IStatus RefactoringUIPlugin getPluginId IStatus getMessage
public void handle Change change Core Exception exception RefactoringUI Plugin log exception handle change exception get Status  CoreException RefactoringUIPlugin getStatus
private void handle Change change I Status status if change instanceof Composite Change Change undo Composite Change change get Undo Until Exception if undo null RefactoringUI Plugin log status final Error Dialog dialog new Refactor Error Dialog f Parent RefactoringUI Messages get String Change Exception Handler refactoring NON NLS 1 RefactoringUI Messages get Formatted String Change Exception Handler unexpected exception new String f Name NON NLS 1 status I Status OK I Status INFO I Status WARNING I Status ERROR int result dialog open if result I Dialog Constants OK ID perform Undo undo return Error Dialog dialog new Error Dialog f Parent RefactoringUI Messages get String Change Exception Handler refactoring NON NLS 1 RefactoringUI Messages get Formatted String Change Exception Handler unexpected exception new String f Name NON NLS 1 status I Status OK I Status INFO I Status WARNING I Status ERROR dialog open  IStatus CompositeChange CompositeChange getUndoUntilException RefactoringUIPlugin ErrorDialog RefactorErrorDialog fParent RefactoringUIMessages getString ChangeExceptionHandler RefactoringUIMessages getFormattedString ChangeExceptionHandler unexpected_exception fName IStatus IStatus IStatus IStatus IDialogConstants OK_ID performUndo ErrorDialog ErrorDialog fParent RefactoringUIMessages getString ChangeExceptionHandler RefactoringUIMessages getFormattedString ChangeExceptionHandler unexpected_exception fName IStatus IStatus IStatus IStatus
I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception monitor begin Task 11 NON NLS 1 undo initialize Validation Data new Not Cancelable Progress Monitor new Sub Progress Monitor monitor 1 if undo is Valid new Sub Progress Monitor monitor 1 has Fatal Error monitor done return undo perform new Sub Progress Monitor monitor 9  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException beginTask initializeValidationData NotCancelableProgressMonitor SubProgressMonitor isValid SubProgressMonitor hasFatalError SubProgressMonitor
private void perform Undo final Change undo I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception monitor begin Task 11 NON NLS 1 undo initialize Validation Data new Not Cancelable Progress Monitor new Sub Progress Monitor monitor 1 if undo is Valid new Sub Progress Monitor monitor 1 has Fatal Error monitor done return undo perform new Sub Progress Monitor monitor 9 Workbench Runnable Adapter adapter new Workbench Runnable Adapter runnable Resources Plugin get Workspace get Root Progress Monitor Dialog dialog new Progress Monitor Dialog f Parent try dialog run false false adapter catch Invocation Target Exception e Exception Handler handle e f Parent RefactoringUI Messages get String Change Exception Handler rollback title NON NLS 1 RefactoringUI Messages get String Change Exception Handler rollback message f Name NON NLS 1 catch Interrupted Exception e can t happen  performUndo IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException beginTask initializeValidationData NotCancelableProgressMonitor SubProgressMonitor isValid SubProgressMonitor hasFatalError SubProgressMonitor WorkbenchRunnableAdapter WorkbenchRunnableAdapter ResourcesPlugin getWorkspace getRoot ProgressMonitorDialog ProgressMonitorDialog fParent InvocationTargetException ExceptionHandler fParent RefactoringUIMessages getString ChangeExceptionHandler RefactoringUIMessages getString ChangeExceptionHandler fName InterruptedException

private static Descriptor Manager fg Descriptions new Descriptor Manager EXT ID change NON NLS 1 protected Abstract Descriptor create Descriptor I Configuration Element element return new Change Preview Viewer Descriptor element  DescriptorManager fgDescriptions DescriptorManager EXT_ID AbstractDescriptor createDescriptor IConfigurationElement ChangePreviewViewerDescriptor
public static Change Preview Viewer Descriptor get Object element throws Core Exception return Change Preview Viewer Descriptor fg Descriptions get Descriptor element  ChangePreviewViewerDescriptor CoreException ChangePreviewViewerDescriptor fgDescriptions getDescriptor
public Change Preview Viewer Descriptor I Configuration Element element super element  ChangePreviewViewerDescriptor IConfigurationElement
public I Change Preview Viewer create Viewer throws Core Exception return I Change Preview Viewer f Configuration Element create Executable Extension CLASS  IChangePreviewViewer createViewer CoreException IChangePreviewViewer fConfigurationElement createExecutableExtension

Creates a new code Change Element code for the given change param parent the change element s parent or code null code if the change element doesn t have a parent param change the actual change Argument must not be code null code public Default Change Element Change Element parent Change change super parent f Change change Assert is Not Null f Change  ChangeElement DefaultChangeElement ChangeElement fChange isNotNull fChange
Returns the underlying code I Change code object return the underlying change public Change get Change return f Change  IChange getChange fChange
public Change Preview Viewer Descriptor get Change Preview Viewer Descriptor throws Core Exception return Change Preview Viewer Descriptor get f Change  ChangePreviewViewerDescriptor getChangePreviewViewerDescriptor CoreException ChangePreviewViewerDescriptor fChange
public void feed Input I Change Preview Viewer viewer throws Core Exception viewer set Input new Change Preview Viewer Input f Change  feedInput IChangePreviewViewer CoreException setInput ChangePreviewViewerInput fChange
see Change Element set Active public void set Active boolean active f Change set Enabled active  ChangeElement setActive setActive fChange setEnabled
public int get Active if f Change instanceof Composite Change f Change instanceof Text Change return get Composite Change Active else return get Default Change Active  getActive fChange CompositeChange fChange TextChange getCompositeChangeActive getDefaultChangeActive
see Change Element get Children public Change Element get Children return f Children  ChangeElement getChildren ChangeElement getChildren fChildren
Sets the children param children the children of this node Must not be code null code public void set Children Change Element children Assert is Not Null children f Children children  setChildren ChangeElement isNotNull fChildren
private int get Default Change Active int result f Change is Enabled ACTIVE INACTIVE if f Children null for int i 0 i f Children length i result ACTIVATION TABLE f Children i get Active result if result PARTLY ACTIVE break return result  getDefaultChangeActive fChange isEnabled fChildren fChildren ACTIVATION_TABLE fChildren getActive PARTLY_ACTIVE
private int get Composite Change Active if f Children null f Children length 0 int result f Children 0 get Active for int i 1 i f Children length i result ACTIVATION TABLE f Children i get Active result if result PARTLY ACTIVE break return result else return ACTIVE  getCompositeChangeActive fChildren fChildren fChildren getActive fChildren ACTIVATION_TABLE fChildren getActive PARTLY_ACTIVE

public Descriptor Manager String extension Point String variable Name Assert is Not Null extension Point Assert is Not Null variable Name f Extension Point extension Point f Variable Name variable Name  DescriptorManager extensionPoint variableName isNotNull extensionPoint isNotNull variableName fExtensionPoint extensionPoint fVariableName variableName
public Abstract Descriptor get Descriptor Object element throws Core Exception if f Extensions null init List candidates new Array List 1 for int i 0 i f Extensions length i Abstract Descriptor descriptor f Extensions i if descriptor matches element f Variable Name candidates add descriptor descriptor clear if candidates size 0 return null No support for conflicts yet return Abstract Descriptor candidates get 0  AbstractDescriptor getDescriptor CoreException fExtensions ArrayList fExtensions AbstractDescriptor fExtensions fVariableName AbstractDescriptor
protected abstract Abstract Descriptor create Descriptor I Configuration Element element  AbstractDescriptor createDescriptor IConfigurationElement
private void init I Extension Registry registry Platform get Extension Registry I Configuration Element ces registry get Configuration Elements For RefactoringUI Plugin get Plugin Id f Extension Point f Extensions new Abstract Descriptor ces length for int i 0 i ces length i f Extensions i create Descriptor ces i  IExtensionRegistry getExtensionRegistry IConfigurationElement getConfigurationElementsFor RefactoringUIPlugin getPluginId fExtensionPoint fExtensions AbstractDescriptor fExtensions createDescriptor

private Refactoring Status Viewer f Viewer public Error Wizard Page super PAGE NAME  RefactoringStatusViewer fViewer ErrorWizardPage PAGE_NAME
Sets the page s refactoring status to the given value param status the refactoring status public void set Status Refactoring Status status f Status status if f Status null set Page Complete is Refactoring Possible int severity f Status get Severity if severity Refactoring Status FATAL set Description RefactoringUI Messages get String Error Wizard Page cannot proceed NON NLS 1 else if severity Refactoring Status INFO set Description RefactoringUI Messages get String Error Wizard Page confirm NON NLS 1 else set Description NON NLS 1 else set Page Complete true set Description NON NLS 1  setStatus RefactoringStatus fStatus fStatus setPageComplete isRefactoringPossible fStatus getSeverity RefactoringStatus setDescription RefactoringUIMessages getString ErrorWizardPage cannot_proceed RefactoringStatus setDescription RefactoringUIMessages getString ErrorWizardPage setDescription setPageComplete setDescription
public Refactoring Status get Status return f Status  RefactoringStatus getStatus fStatus
public void create Control Composite parent initialize Dialog Units parent set Control f Viewer new Refactoring Status Viewer parent SWT NONE Dialog apply Dialog Font f Viewer Workbench Help set Help get Control I Refactoring Help Context Ids REFACTORING ERROR WIZARD PAGE  createControl initializeDialogUnits setControl fViewer RefactoringStatusViewer applyDialogFont fViewer WorkbenchHelp setHelp getControl IRefactoringHelpContextIds REFACTORING_ERROR_WIZARD_PAGE
public void set Visible boolean visible if visible f Viewer set Status f Status else the page was not complete if we show a fatal error In this case we can finish anyway To enable the OK and Preview button on the user input page we have to mark the page as complete again if is Page Complete f Status has Fatal Error set Page Complete true super set Visible visible  setVisible fViewer setStatus fStatus isPageComplete fStatus hasFatalError setPageComplete setVisible
public boolean can Flip To Next Page We have to call super get Next Page since computing the next page is expensive So we avoid it as long as possible return f Status null is Refactoring Possible is Page Complete super get Next Page null  canFlipToNextPage getNextPage fStatus isRefactoringPossible isPageComplete getNextPage
public I Wizard Page get Next Page Refactoring Wizard wizard get Refactoring Wizard Change change wizard get Change if change null change wizard internal Create Change InternalAPI INSTANCE new Create Change Operation get Refactoring false wizard internal Set Change InternalAPI INSTANCE change if change null return this return super get Next Page  IWizardPage getNextPage RefactoringWizard getRefactoringWizard getChange internalCreateChange CreateChangeOperation getRefactoring internalSetChange getNextPage
protected boolean perform Finish Refactoring Wizard wizard get Refactoring Wizard Change change wizard get Change Perform Change Operation operation null if change null operation new UI Perform Change Operation get Shell get Display change get Container else Create Change Operation ccop new Create Change Operation get Refactoring operation new UI Perform Change Operation get Shell get Display ccop get Container Finish Result result wizard internal Perform Finish InternalAPI INSTANCE operation if result is Exception return true if result is Interrupted return false Refactoring Status f Validation Status operation get Validation Status if f Validation Status null f Validation Status has Fatal Error Message Dialog open Error wizard get Shell wizard get Window Title RefactoringUI Messages get Formatted String RefactoringUI cannot execute NON NLS 1 f Validation Status get Message Matching Severity Refactoring Status FATAL return true return true  performFinish RefactoringWizard getRefactoringWizard getChange PerformChangeOperation UIPerformChangeOperation getShell getDisplay getContainer CreateChangeOperation CreateChangeOperation getRefactoring UIPerformChangeOperation getShell getDisplay getContainer FinishResult internalPerformFinish isException isInterrupted RefactoringStatus fValidationStatus getValidationStatus fValidationStatus fValidationStatus hasFatalError MessageDialog openError getShell getWindowTitle RefactoringUIMessages getFormattedString cannot_execute fValidationStatus getMessageMatchingSeverity RefactoringStatus
Helpers private boolean is Refactoring Possible return f Status get Severity Refactoring Status FATAL  isRefactoringPossible fStatus getSeverity RefactoringStatus

Logs the given exception using the platform s logging mechanism The exception is logged as an error with the error code code Java Status Constants INTERNAL ERROR code param t the throwable to log param message the detail message public static void log Throwable t String message RefactoringUI Plugin log new Status I Status ERROR RefactoringUI Plugin get Plugin Id I RefactoringUI Status Codes INTERNAL ERROR message t  JavaStatusConstants INTERNAL_ERROR RefactoringUIPlugin IStatus RefactoringUIPlugin getPluginId IRefactoringUIStatusCodes INTERNAL_ERROR
Handles the given code Core Exception code param e the code Core Exception code to be handled param parent the dialog window s parent shell param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Core Exception e Shell parent String title String message fg Instance perform e parent title message  CoreException CoreException CoreException fgInstance
Handles the given code Invocation Target Exception code param e the code Invocation Target Exception code to be handled param parent the dialog window s parent shell param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Invocation Target Exception e Shell parent String title String message fg Instance perform e parent title message  InvocationTargetException InvocationTargetException InvocationTargetException fgInstance
protected void perform Core Exception e Shell shell String title String message RefactoringUI Plugin log e I Status status e get Status if status null Error Dialog open Error shell title message status else display Message Dialog e e get Message shell title message  CoreException RefactoringUIPlugin IStatus getStatus ErrorDialog openError displayMessageDialog getMessage
protected void perform Invocation Target Exception e Shell shell String title String message Throwable target e get Target Exception if target instanceof Core Exception perform Core Exception target shell title message else RefactoringUI Plugin log e if e get Message null e get Message length 0 display Message Dialog e e get Message shell title message else display Message Dialog e target get Message shell title message  InvocationTargetException getTargetException CoreException CoreException RefactoringUIPlugin getMessage getMessage displayMessageDialog getMessage displayMessageDialog getMessage
private void display Message Dialog Throwable t String exception Message Shell shell String title String message String Writer msg new String Writer if message null msg write message msg write n n NON NLS 1 if exception Message null exception Message length 0 msg write RefactoringUI Messages get String Exception Handler see Error Log Message NON NLS 1 else msg write exception Message Message Dialog open Error shell title msg to String  displayMessageDialog exceptionMessage StringWriter StringWriter exceptionMessage exceptionMessage RefactoringUIMessages getString ExceptionHandler seeErrorLogMessage exceptionMessage MessageDialog openError toString

public class File Status Context Viewer extends Text Status Context Viewer public void create Control Composite parent super create Control parent get Source Viewer configure new Source Viewer Configuration  FileStatusContextViewer TextStatusContextViewer createControl createControl getSourceViewer SourceViewerConfiguration
public void set Input Refactoring Status Context context File Status Context fc File Status Context context I File file fc get File update Title file I Document document get Document file I Region region fc get Text Region if document get Length region get Offset region get Length set Input document region else set Input document new Region 0 0  setInput RefactoringStatusContext FileStatusContext FileStatusContext IFile getFile updateTitle IDocument getDocument IRegion getTextRegion getLength getOffset getLength setInput setInput
protected Source Viewer create Source Viewer Composite parent return new Source Viewer parent null SWT V SCROLL SWT H SCROLL SWT MULTI SWT FULL SELECTION  SourceViewer createSourceViewer SourceViewer V_SCROLL H_SCROLL FULL_SELECTION
private I Document get Document I File file I Text File Buffer Manager manager File Buffers get Text File Buffer Manager I Path path file get Full Path try try manager connect path new Null Progress Monitor I Text File Buffer buffer manager get Text File Buffer path if buffer null return buffer get Document finally manager disconnect path new Null Progress Monitor catch Core Exception e RefactoringUI Plugin log e return new Document RefactoringUI Messages get String File Status Context Viewer error reading file NON NLS 1  IDocument getDocument IFile ITextFileBufferManager FileBuffers getTextFileBufferManager IPath getFullPath NullProgressMonitor ITextFileBuffer getTextFileBuffer getDocument NullProgressMonitor CoreException RefactoringUIPlugin RefactoringUIMessages getString FileStatusContextViewer error_reading_file

private int f Value private Finish Result int value f Value value  fValue FinishResult fValue
public static Finish Result create Exception return new Finish Result 0  FinishResult createException FinishResult
public boolean is Exception return f Value 0  isException fValue
public static Finish Result create Interrupted return new Finish Result 1  FinishResult createInterrupted FinishResult
public boolean is Interrupted return f Value 1  isInterrupted fValue
public static Finish Result createOK return new Finish Result 2  FinishResult FinishResult
public boolean isOK return f Value 2  fValue

public interface I Change Element Children Creator public Change Element create Change Element parent Change change  IChangeElementChildrenCreator ChangeElement ChangeElement

public static final InternalAPI INSTANCE new InternalAPI private InternalAPI no instances outside this class 

Sets that change for which the page is supposed to display a preview param change the new change 

public class Not Cancelable Progress Monitor extends Progress Monitor Wrapper public Not Cancelable Progress Monitor I Progress Monitor monitor super monitor  NotCancelableProgressMonitor ProgressMonitorWrapper NotCancelableProgressMonitor IProgressMonitor
super monitor public void set Canceled boolean b ignore set cancel  setCanceled
ignore set cancel public boolean is Canceled return false  isCanceled

private static class Null Previewer implements I Change Preview Viewer private Label f Label public void create Control Composite parent f Label new Label parent SWT CENTER SWT FLAT f Label set Text RefactoringUI Messages get String Preview Wizard Page no preview NON NLS 1  NullPreviewer IChangePreviewViewer fLabel createControl fLabel fLabel setText RefactoringUIMessages getString PreviewWizardPage no_preview
f Label set Text RefactoringUI Messages get String Preview Wizard Page no preview NON NLS 1 public void refresh  fLabel setText RefactoringUIMessages getString PreviewWizardPage no_preview
public void refresh public Control get Control return f Label  getControl fLabel
return f Label public void set Input Change Preview Viewer Input input  fLabel setInput ChangePreviewViewerInput
private class Next Change extends Action public Next Change set Image Descriptor CompareUI DESC ETOOL NEXT set Disabled Image Descriptor CompareUI DESC DTOOL NEXT set Hover Image Descriptor CompareUI DESC CTOOL NEXT set Tool Tip Text RefactoringUI Messages get String Preview Wizard Page next Change NON NLS 1 Workbench Help set Help this I Refactoring Help Context Ids NEXT CHANGE ACTION  NextChange NextChange setImageDescriptor DESC_ETOOL_NEXT setDisabledImageDescriptor DESC_DTOOL_NEXT setHoverImageDescriptor DESC_CTOOL_NEXT setToolTipText RefactoringUIMessages getString PreviewWizardPage next_Change WorkbenchHelp setHelp IRefactoringHelpContextIds NEXT_CHANGE_ACTION
Workbench Help set Help this I Refactoring Help Context Ids NEXT CHANGE ACTION public void run f Tree Viewer reveal Next  WorkbenchHelp setHelp IRefactoringHelpContextIds NEXT_CHANGE_ACTION fTreeViewer revealNext
private class Previous Change extends Action public Previous Change set Image Descriptor CompareUI DESC ETOOL PREV set Disabled Image Descriptor CompareUI DESC DTOOL PREV set Hover Image Descriptor CompareUI DESC CTOOL PREV set Tool Tip Text RefactoringUI Messages get String Preview Wizard Page previous Change NON NLS 1 Workbench Help set Help this I Refactoring Help Context Ids PREVIOUS CHANGE ACTION  PreviousChange PreviousChange setImageDescriptor DESC_ETOOL_PREV setDisabledImageDescriptor DESC_DTOOL_PREV setHoverImageDescriptor DESC_CTOOL_PREV setToolTipText RefactoringUIMessages getString PreviewWizardPage previous_Change WorkbenchHelp setHelp IRefactoringHelpContextIds PREVIOUS_CHANGE_ACTION
Workbench Help set Help this I Refactoring Help Context Ids PREVIOUS CHANGE ACTION public void run f Tree Viewer reveal Previous  WorkbenchHelp setHelp IRefactoringHelpContextIds PREVIOUS_CHANGE_ACTION fTreeViewer revealPrevious
Creates a new proposed changes wizard page public Preview Wizard Page super PAGE NAME set Description RefactoringUI Messages get String Preview Wizard Page description NON NLS 1  PreviewWizardPage PAGE_NAME setDescription RefactoringUIMessages getString PreviewWizardPage
Sets the given change Setting the change initializes the tree viewer with the given change param change the new change public void set Change Change change if f Change change return f Change change if f Change instanceof Composite Change f Tree Viewer Input Change Composite Change f Change else f Tree Viewer Input Change new Composite Change Dummy Change NON NLS 1 f Tree Viewer Input Change add f Change set Tree Viewer Input  setChange fChange fChange fChange CompositeChange fTreeViewerInputChange CompositeChange fChange fTreeViewerInputChange CompositeChange fTreeViewerInputChange fChange setTreeViewerInput
Creates the tree viewer to present the hierarchy of changes Subclasses may override to create their own custom tree viewer param parent the tree viewer s parent return the tree viewer to present the hierarchy of changes protected Change Element Tree Viewer create Tree Viewer Composite parent return new Change Element Tree Viewer parent  ChangeElementTreeViewer createTreeViewer ChangeElementTreeViewer
Creates the content provider used to fill the tree of changes Subclasses may override to create their own custom tree content provider return the tree content provider used to fill the tree of changes protected I Tree Content Provider create Tree Content Provider return new Change Element Content Provider  ITreeContentProvider createTreeContentProvider ChangeElementContentProvider
Creates the label provider used to render the tree of changes Subclasses may override to create their own custom label provider return the label provider used to render the tree of changes protected I Label Provider create Tree Label Provider return new Change Element Label Provider Java Element Label Provider SHOW DEFAULT Java Element Label Provider SHOW SMALL ICONS return new Change Element Label Provider  ILabelProvider createTreeLabelProvider ChangeElementLabelProvider JavaElementLabelProvider SHOW_DEFAULT JavaElementLabelProvider SHOW_SMALL_ICONS ChangeElementLabelProvider
protected boolean perform Finish UI Perform Change Operation operation new UI Perform Change Operation get Shell get Display f Change get Container Finish Result result get Refactoring Wizard internal Perform Finish InternalAPI INSTANCE operation if result is Exception return true if result is Interrupted return false Refactoring Status f Validation Status operation get Validation Status if f Validation Status null f Validation Status has Fatal Error Refactoring Wizard wizard get Refactoring Wizard Message Dialog open Error wizard get Shell wizard get Window Title RefactoringUI Messages get Formatted String RefactoringUI cannot execute NON NLS 1 f Validation Status get Message Matching Severity Refactoring Status FATAL return true return true  performFinish UIPerformChangeOperation UIPerformChangeOperation getShell getDisplay fChange getContainer FinishResult getRefactoringWizard internalPerformFinish isException isInterrupted RefactoringStatus fValidationStatus getValidationStatus fValidationStatus fValidationStatus hasFatalError RefactoringWizard getRefactoringWizard MessageDialog openError getShell getWindowTitle RefactoringUIMessages getFormattedString cannot_execute fValidationStatus getMessageMatchingSeverity RefactoringStatus
Method defined in I Wizard Page public boolean can Flip To Next Page return false  IWizardPage canFlipToNextPage
public void create Control Composite parent initialize Dialog Units parent f Page Container new Page Book parent SWT NONE f Standard Page create Standard Preview Page f Page Container f Null Page create Null Page f Page Container set Control f Page Container Workbench Help set Help get Control I Refactoring Help Context Ids REFACTORING PREVIEW WIZARD PAGE  createControl initializeDialogUnits fPageContainer PageBook fStandardPage createStandardPreviewPage fPageContainer fNullPage createNullPage fPageContainer setControl fPageContainer WorkbenchHelp setHelp getControl IRefactoringHelpContextIds REFACTORING_PREVIEW_WIZARD_PAGE
private Composite create Standard Preview Page Composite parent XXX The composite is needed to limit the width of the Sash Form See http bugs eclipse org bugs show bug cgi id 6854 Composite result new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 result set Layout layout Sash Form sash Form new Sash Form result SWT VERTICAL Viewer Pane pane new Viewer Pane sash Form SWT BORDER SWT FLAT pane set Text RefactoringUI Messages get String Preview Wizard Page changes NON NLS 1 Tool Bar Manager tbm pane get Tool Bar Manager tbm add new Next Change tbm add new Previous Change tbm update true f Tree Viewer create Tree Viewer pane f Tree Viewer set Content Provider create Tree Content Provider f Tree Viewer set Label Provider create Tree Label Provider f Tree Viewer add Selection Changed Listener create Selection Changed Listener f Tree Viewer add Check State Listener create Check State Listener pane set Content f Tree Viewer get Control set Tree Viewer Input f Preview Container new Page Book sash Form SWT NONE f Null Previewer new Null Previewer f Null Previewer create Control f Preview Container f Preview Container show Page f Null Previewer get Control f Current Preview Viewer f Null Previewer f Current Descriptor null sash Form set Weights new int 33 67 Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint convert Width In Chars To Pixels 80 sash Form set Layout Data gd Dialog apply Dialog Font result return result  createStandardPreviewPage SashForm show_bug GridLayout GridLayout marginHeight marginWidth setLayout SashForm sashForm SashForm ViewerPane ViewerPane sashForm setText RefactoringUIMessages getString PreviewWizardPage ToolBarManager getToolBarManager NextChange PreviousChange fTreeViewer createTreeViewer fTreeViewer setContentProvider createTreeContentProvider fTreeViewer setLabelProvider createTreeLabelProvider fTreeViewer addSelectionChangedListener createSelectionChangedListener fTreeViewer addCheckStateListener createCheckStateListener setContent fTreeViewer getControl setTreeViewerInput fPreviewContainer PageBook sashForm fNullPreviewer NullPreviewer fNullPreviewer createControl fPreviewContainer fPreviewContainer showPage fNullPreviewer getControl fCurrentPreviewViewer fNullPreviewer fCurrentDescriptor sashForm setWeights GridData GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels sashForm setLayoutData applyDialogFont
private Control create Null Page Composite parent Composite result new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN result set Layout layout Label label new Label result SWT CENTER label set Text RefactoringUI Messages get String Preview Wizard Page no source code change NON NLS 1 label set Layout Data new Grid Data Grid Data FILL HORIZONTAL Dialog apply Dialog Font result return result  createNullPage GridLayout GridLayout marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN setLayout setText RefactoringUIMessages getString PreviewWizardPage no_source_code_change setLayoutData GridData GridData FILL_HORIZONTAL applyDialogFont
public void set Visible boolean visible f Current Selection null if has Changes f Page Container show Page f Standard Page Change Element tree Viewer Input Change Element f Tree Viewer get Input if visible tree Viewer Input null I Structured Selection selection I Structured Selection f Tree Viewer get Selection if selection is Empty I Tree Content Provider provider I Tree Content Provider f Tree Viewer get Content Provider Change Element element get First Non Composite Change provider tree Viewer Input if element null if get Refactoring Wizard internal Get Expand First Node InternalAPI INSTANCE Object sub Elements provider get Elements element if sub Elements null sub Elements length 0 f Tree Viewer expand To Level element 999 f Tree Viewer set Selection new Structured Selection element super set Visible visible f Tree Viewer get Control set Focus else f Page Container show Page f Null Page super set Visible visible get Refactoring Wizard internal Set Preview Shown InternalAPI INSTANCE visible  setVisible fCurrentSelection hasChanges fPageContainer showPage fStandardPage ChangeElement treeViewerInput ChangeElement fTreeViewer getInput treeViewerInput IStructuredSelection IStructuredSelection fTreeViewer getSelection isEmpty ITreeContentProvider ITreeContentProvider fTreeViewer getContentProvider ChangeElement getFirstNonCompositeChange treeViewerInput getRefactoringWizard internalGetExpandFirstNode subElements getElements subElements subElements fTreeViewer expandToLevel fTreeViewer setSelection StructuredSelection setVisible fTreeViewer getControl setFocus fPageContainer showPage fNullPage setVisible getRefactoringWizard internalSetPreviewShown
private Change Element get First Non Composite Change I Tree Content Provider provider Change Element input Change Element focus input Change change input get Change while change null change instanceof Composite Change Change Element children Change Element provider get Elements focus if children null children length 0 focus children 0 change focus get Change return focus  ChangeElement getFirstNonCompositeChange ITreeContentProvider ChangeElement ChangeElement getChange CompositeChange ChangeElement ChangeElement getElements getChange
private void set Tree Viewer Input if f Tree Viewer null return Change Element input null if f Tree Viewer Input Change null input new Default Change Element null f Tree Viewer Input Change f Tree Viewer set Input input  setTreeViewerInput fTreeViewer ChangeElement fTreeViewerInputChange DefaultChangeElement fTreeViewerInputChange fTreeViewer setInput
return new I Check State Listener public void check State Changed Check State Changed Event event Change Element element Change Element event get Element if is Child f Current Selection element is Child element f Current Selection show Preview f Current Selection  ICheckStateListener checkStateChanged CheckStateChangedEvent ChangeElement ChangeElement getElement isChild fCurrentSelection isChild fCurrentSelection showPreview fCurrentSelection
private boolean is Child Change Element element Change Element child while child null if child element return true child child get Parent return false  isChild ChangeElement ChangeElement getParent
private I Check State Listener create Check State Listener return new I Check State Listener public void check State Changed Check State Changed Event event Change Element element Change Element event get Element if is Child f Current Selection element is Child element f Current Selection show Preview f Current Selection private boolean is Child Change Element element Change Element child while child null if child element return true child child get Parent return false  ICheckStateListener createCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent ChangeElement ChangeElement getElement isChild fCurrentSelection isChild fCurrentSelection showPreview fCurrentSelection isChild ChangeElement ChangeElement getParent
return new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection sel I Structured Selection event get Selection if sel size 1 Change Element new Selection Change Element sel get First Element if new Selection f Current Selection f Current Selection new Selection show Preview new Selection else show Preview null  ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection ChangeElement newSelection ChangeElement getFirstElement newSelection fCurrentSelection fCurrentSelection newSelection showPreview newSelection showPreview
private I Selection Changed Listener create Selection Changed Listener return new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection sel I Structured Selection event get Selection if sel size 1 Change Element new Selection Change Element sel get First Element if new Selection f Current Selection f Current Selection new Selection show Preview new Selection else show Preview null  ISelectionChangedListener createSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection ChangeElement newSelection ChangeElement getFirstElement newSelection fCurrentSelection fCurrentSelection newSelection showPreview newSelection showPreview
private void show Preview Change Element element try if element null show Null Previewer else Change Preview Viewer Descriptor descriptor element get Change Preview Viewer Descriptor if f Current Descriptor descriptor I Change Preview Viewer new Viewer if descriptor null new Viewer descriptor create Viewer new Viewer create Control f Preview Container else new Viewer f Null Previewer f Current Descriptor descriptor element feed Input new Viewer if f Current Preview Viewer null f Current Preview Viewer f Null Previewer f Current Preview Viewer get Control dispose f Current Preview Viewer new Viewer f Preview Container show Page f Current Preview Viewer get Control else element feed Input f Current Preview Viewer catch Core Exception e show Null Previewer Exception Handler handle e get Shell RefactoringUI Messages get String Preview Wizard Page refactoring NON NLS 1 RefactoringUI Messages get String Preview Wizard Page Internal error NON NLS 1  showPreview ChangeElement showNullPreviewer ChangePreviewViewerDescriptor getChangePreviewViewerDescriptor fCurrentDescriptor IChangePreviewViewer newViewer newViewer createViewer newViewer createControl fPreviewContainer newViewer fNullPreviewer fCurrentDescriptor feedInput newViewer fCurrentPreviewViewer fCurrentPreviewViewer fNullPreviewer fCurrentPreviewViewer getControl fCurrentPreviewViewer newViewer fPreviewContainer showPage fCurrentPreviewViewer getControl feedInput fCurrentPreviewViewer CoreException showNullPreviewer ExceptionHandler getShell RefactoringUIMessages getString PreviewWizardPage RefactoringUIMessages getString PreviewWizardPage Internal_error
private void show Null Previewer f Current Descriptor null f Current Preview Viewer f Null Previewer f Preview Container show Page f Current Preview Viewer get Control  showNullPreviewer fCurrentDescriptor fCurrentPreviewViewer fNullPreviewer fPreviewContainer showPage fCurrentPreviewViewer getControl
Returns code true code if the preview page will show any changes when it becomes visibile Otherwise code false code is returned return whether the preview has changes or not public boolean has Changes if f Change null return false if f Change instanceof Composite Change return Composite Change f Change get Children length 0 return true  hasChanges fChange fChange CompositeChange CompositeChange fChange getChildren

public Pseudo Java Change Element Change Element parent I Java Element element super parent f Java Element element Assert is Not Null f Java Element  PseudoJavaChangeElement ChangeElement IJavaElement fJavaElement isNotNull fJavaElement
Returns the Java element return the Java element managed by this node public I Java Element get Java Element return f Java Element  IJavaElement getJavaElement fJavaElement
public Change get Change return null  getChange
public Change Preview Viewer Descriptor get Change Preview Viewer Descriptor throws Core Exception Default Change Element element get Default Change Element if element null return null return element get Change Preview Viewer Descriptor  ChangePreviewViewerDescriptor getChangePreviewViewerDescriptor CoreException DefaultChangeElement getDefaultChangeElement getChangePreviewViewerDescriptor
public void feed Input I Change Preview Viewer viewer throws Core Exception Default Change Element element get Default Change Element if element null Change change element get Change if change instanceof Text Change List edits collect Text Edit Changes viewer set Input Text Change Preview Viewer create Input change Text Edit Change Group edits to Array new Text Edit Change Group edits size get Text Range else viewer set Input null  feedInput IChangePreviewViewer CoreException DefaultChangeElement getDefaultChangeElement getChange TextChange collectTextEditChanges setInput TextChangePreviewViewer createInput TextEditChangeGroup toArray TextEditChangeGroup getTextRange setInput
public void set Active boolean active for Iterator iter f Children iterator iter has Next Change Element element Change Element iter next element set Active active  setActive fChildren hasNext ChangeElement ChangeElement setActive
public int get Active Assert is True f Children size 0 int result Change Element f Children get 0 get Active for int i 1 i f Children size i Change Element element Change Element f Children get i result ACTIVATION TABLE element get Active result if result PARTLY ACTIVE break return result  getActive isTrue fChildren ChangeElement fChildren getActive fChildren ChangeElement ChangeElement fChildren ACTIVATION_TABLE getActive PARTLY_ACTIVE
public Change Element get Children if f Children null return EMPTY CHILDREN return Change Element f Children to Array new Change Element f Children size  ChangeElement getChildren fChildren EMPTY_CHILDREN ChangeElement fChildren toArray ChangeElement fChildren
Adds the given code Text Edit Change Element code as a child to this code Pseudo Java Change Element code param child the child to be added public void add Child Text Edit Change Element child do Add Child child  TextEditChangeElement PseudoJavaChangeElement addChild TextEditChangeElement doAddChild
Adds the given code Pseudo Java Change Element code as a child to this code Pseudo Java Change Element code param child the child to be added public void add Child Pseudo Java Change Element child do Add Child child  PseudoJavaChangeElement PseudoJavaChangeElement addChild PseudoJavaChangeElement doAddChild
private void do Add Child Change Element child if f Children null f Children new Array List 2 f Children add child  doAddChild ChangeElement fChildren fChildren ArrayList fChildren
private Default Change Element get Default Change Element Change Element element get Parent while element instanceof Default Change Element element null element element get Parent return Default Change Element element  DefaultChangeElement getDefaultChangeElement ChangeElement getParent DefaultChangeElement getParent DefaultChangeElement
private List collect Text Edit Changes List result new Array List 10 Change Element children get Children for int i 0 i children length i Change Element child children i if child instanceof Text Edit Change Element result add Text Edit Change Element child get Text Edit Change else if child instanceof Pseudo Java Change Element result add All Pseudo Java Change Element child collect Text Edit Changes return result  collectTextEditChanges ArrayList ChangeElement getChildren ChangeElement TextEditChangeElement TextEditChangeElement getTextEditChange PseudoJavaChangeElement addAll PseudoJavaChangeElement collectTextEditChanges
public I Region get Text Range throws Core Exception I Source Range range I Source Reference f Java Element get Source Range return new Region range get Offset range get Length  IRegion getTextRange CoreException ISourceRange ISourceReference fJavaElement getSourceRange getOffset getLength

Returns the image managed under the given key in this registry param key the image s key return the image managed under the given key public static Image get String key return get Image Registry get key  getImageRegistry
Sets the three image descriptors for enabled disabled and hovered to an action The actions are retrieved from the tool16 folders param action the action to set the icons to param icon Name the icon Name public static void set Tool Image Descriptors I Action action String icon Name set Image Descriptors action tool16 icon Name NON NLS 1  iconName iconName setToolImageDescriptors IAction iconName setImageDescriptors iconName
Sets the three image descriptors for enabled disabled and hovered to an action The actions are retrieved from the lcl16 folders param action the action to set the icons to param icon Name the icon Name public static void set Local Image Descriptors I Action action String icon Name set Image Descriptors action lcl16 icon Name NON NLS 1  iconName iconName setLocalImageDescriptors IAction iconName setImageDescriptors iconName
package static Image Registry get Image Registry if fg Image Registry null fg Image Registry new Image Registry for Iterator iter fg AvoidSWT Error Map key Set iterator iter has Next String key String iter next fg Image Registry put key Image Descriptor fg AvoidSWT Error Map get key fg AvoidSWT Error Map null return fg Image Registry  ImageRegistry getImageRegistry fgImageRegistry fgImageRegistry ImageRegistry fgAvoidSWTErrorMap keySet hasNext fgImageRegistry ImageDescriptor fgAvoidSWTErrorMap fgAvoidSWTErrorMap fgImageRegistry
private static void set Image Descriptors I Action action String type String rel Path try Image Descriptor id Image Descriptor create FromURL make Icon FileURL d type rel Path NON NLS 1 if id null action set Disabled Image Descriptor id catch MalformedURL Exception e Image Descriptor descriptor create e type rel Path NON NLS 1 action set Hover Image Descriptor descriptor action set Image Descriptor descriptor  setImageDescriptors IAction relPath ImageDescriptor ImageDescriptor createFromURL makeIconFileURL relPath setDisabledImageDescriptor MalformedURLException ImageDescriptor relPath setHoverImageDescriptor setImageDescriptor
private static Image Descriptor create Managed String prefix String name try Image Descriptor result Image Descriptor create FromURL make Icon FileURL prefix name substring NAME PREFIX LENGTH if fg AvoidSWT Error Map null fg AvoidSWT Error Map new Hash Map fg AvoidSWT Error Map put name result if fg Image Registry null RefactoringUI Plugin log Error Message Image registry already defined NON NLS 1 return result catch MalformedURL Exception e return Image Descriptor get Missing Image Descriptor  ImageDescriptor createManaged ImageDescriptor ImageDescriptor createFromURL makeIconFileURL NAME_PREFIX_LENGTH fgAvoidSWTErrorMap fgAvoidSWTErrorMap HashMap fgAvoidSWTErrorMap fgImageRegistry RefactoringUIPlugin logErrorMessage MalformedURLException ImageDescriptor getMissingImageDescriptor
private static Image Descriptor create String prefix String name try return Image Descriptor create FromURL make Icon FileURL prefix name catch MalformedURL Exception e return Image Descriptor get Missing Image Descriptor  ImageDescriptor ImageDescriptor createFromURL makeIconFileURL MalformedURLException ImageDescriptor getMissingImageDescriptor
private static URL make Icon FileURL String prefix String name throws MalformedURL Exception if fg Icon BaseURL null throw new MalformedURL Exception String Buffer buffer new String Buffer prefix buffer append buffer append name return new URL fg Icon BaseURL buffer to String  makeIconFileURL MalformedURLException fgIconBaseURL MalformedURLException StringBuffer StringBuffer fgIconBaseURL toString

public class Refactoring Status Content Provider implements I Structured Content Provider public void input Changed Viewer viewer Object old Input Object new Input  RefactoringStatusContentProvider IStructuredContentProvider inputChanged oldInput newInput
public void dispose 
public Object get Elements Object obj return Refactoring Status obj get Entries  getElements RefactoringStatus getEntries

public Refactoring Status Dialog Refactoring Status status Shell parent String window Title boolean back Button super parent f Status status f Window Title window Title f Back Button back Button set Shell Style get Shell Style SWT RESIZE  RefactoringStatusDialog RefactoringStatus windowTitle backButton fStatus fWindowTitle windowTitle fBackButton backButton setShellStyle getShellStyle
public Refactoring Status Dialog Shell parent Error Wizard Page page boolean back Button this page get Status parent parent get Text back Button  RefactoringStatusDialog ErrorWizardPage backButton getStatus getText backButton
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text f Window Title  configureShell newShell configureShell newShell newShell setText fWindowTitle
protected Control create Dialog Area Composite parent Composite result new Composite parent SWT NONE initialize Dialog Units result Grid Layout layout new Grid Layout result set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint 600 gd height Hint 400 result set Layout Data gd Color background parent get Display get System Color SWT COLOR INFO BACKGROUND View Form message Pane new View Form result SWT BORDER SWT FLAT message Pane margin Width layout margin Width message Pane margin Height layout margin Height gd new Grid Data Grid Data FILL HORIZONTAL XXX http bugs eclipse org bugs show bug cgi id 27572 Rectangle rect message Pane compute Trim 0 0 0 convert Height In Chars To Pixels 2 message Pane margin Height 2 gd height Hint rect height message Pane set Layout Data gd message Pane set Background background Label label new Label message Pane SWT LEFT SWT WRAP if f Status has Fatal Error label set Text RefactoringUI Messages get String Refactoring Status Dialog Cannot proceed NON NLS 1 else label set Text RefactoringUI Messages get String Refactoring Status Dialog Please look NON NLS 1 label set Background background message Pane set Content label Refactoring Status Viewer viewer new Refactoring Status Viewer result SWT NONE viewer set Layout Data new Grid Data Grid Data FILL BOTH viewer set Status f Status apply Dialog Font result return result  createDialogArea initializeDialogUnits GridLayout GridLayout setLayout GridData GridData GridData FILL_BOTH widthHint heightHint setLayoutData getDisplay getSystemColor COLOR_INFO_BACKGROUND ViewForm messagePane ViewForm messagePane marginWidth marginWidth messagePane marginHeight marginHeight GridData GridData FILL_HORIZONTAL show_bug messagePane computeTrim convertHeightInCharsToPixels messagePane marginHeight heightHint messagePane setLayoutData messagePane setBackground messagePane fStatus hasFatalError setText RefactoringUIMessages getString RefactoringStatusDialog Cannot_proceed setText RefactoringUIMessages getString RefactoringStatusDialog Please_look setBackground messagePane setContent RefactoringStatusViewer RefactoringStatusViewer setLayoutData GridData GridData FILL_BOTH setStatus fStatus applyDialogFont
protected void button Pressed int button Id if button Id I Dialog Constants BACK ID set Return Code I Dialog Constants BACK ID close else super button Pressed button Id  buttonPressed buttonId buttonId IDialogConstants BACK_ID setReturnCode IDialogConstants BACK_ID buttonPressed buttonId
protected void create Buttons For Button Bar Composite parent if f Status has Fatal Error if f Back Button create Button parent I Dialog Constants BACK ID I Dialog Constants BACK LABEL false NON NLS 1 create Button parent I Dialog Constants OK ID RefactoringUI Messages get String Refactoring Status Dialog Continue true NON NLS 1 create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false else if f Back Button create Button parent I Dialog Constants BACK ID I Dialog Constants BACK LABEL true NON NLS 1 create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL f Back Button false true  createButtonsForButtonBar fStatus hasFatalError fBackButton createButton IDialogConstants BACK_ID IDialogConstants BACK_LABEL createButton IDialogConstants OK_ID RefactoringUIMessages getString RefactoringStatusDialog createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL fBackButton createButton IDialogConstants BACK_ID IDialogConstants BACK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL fBackButton

public class Refactoring Status Entry Label Provider extends Label Provider public String get Text Object element return Strings remove New Line Refactoring Status Entry element get Message  RefactoringStatusEntryLabelProvider LabelProvider getText removeNewLine RefactoringStatusEntry getMessage
public Image get Image Object element Refactoring Status Entry entry Refactoring Status Entry element if entry is Fatal Error return Refactoring Plugin Images get Refactoring Plugin Images IMG OBJS REFACTORING FATAL else if entry is Error return Refactoring Plugin Images get Refactoring Plugin Images IMG OBJS REFACTORING ERROR else if entry is Warning return Refactoring Plugin Images get Refactoring Plugin Images IMG OBJS REFACTORING WARNING else return Refactoring Plugin Images get Refactoring Plugin Images IMG OBJS REFACTORING INFO  getImage RefactoringStatusEntry RefactoringStatusEntry isFatalError RefactoringPluginImages RefactoringPluginImages IMG_OBJS_REFACTORING_FATAL isError RefactoringPluginImages RefactoringPluginImages IMG_OBJS_REFACTORING_ERROR isWarning RefactoringPluginImages RefactoringPluginImages IMG_OBJS_REFACTORING_WARNING RefactoringPluginImages RefactoringPluginImages IMG_OBJS_REFACTORING_INFO

private static class Null Context Viewer implements I Status Context Viewer private Label f Label public Null Context Viewer  NullContextViewer IStatusContextViewer fLabel NullContextViewer
public Null Context Viewer public void create Control Composite parent f Label new Label parent SWT CENTER SWT FLAT f Label set Text RefactoringUI Messages get String Error Wizard Page no context information available NON NLS 1  NullContextViewer createControl fLabel fLabel setText RefactoringUIMessages getString ErrorWizardPage no_context_information_available
f Label set Text RefactoringUI Messages get String Error Wizard Page no context information available NON NLS 1 public void set Input Refactoring Status Context input do nothing  fLabel setText RefactoringUIMessages getString ErrorWizardPage no_context_information_available setInput RefactoringStatusContext
do nothing public Control get Control return f Label  getControl fLabel
private class Next Problem extends Action public Next Problem set Image Descriptor CompareUI DESC ETOOL NEXT set Disabled Image Descriptor CompareUI DESC DTOOL NEXT set Hover Image Descriptor CompareUI DESC CTOOL NEXT set Tool Tip Text RefactoringUI Messages get String Error Wizard Page next Change NON NLS 1 Workbench Help set Help this I Refactoring Help Context Ids NEXT PROBLEM ACTION  NextProblem NextProblem setImageDescriptor DESC_ETOOL_NEXT setDisabledImageDescriptor DESC_DTOOL_NEXT setHoverImageDescriptor DESC_CTOOL_NEXT setToolTipText RefactoringUIMessages getString ErrorWizardPage next_Change WorkbenchHelp setHelp IRefactoringHelpContextIds NEXT_PROBLEM_ACTION
Workbench Help set Help this I Refactoring Help Context Ids NEXT PROBLEM ACTION public void run reveal Element true  WorkbenchHelp setHelp IRefactoringHelpContextIds NEXT_PROBLEM_ACTION revealElement
public void update boolean enabled false if f Status null f Status has Entries Refactoring Status Entry entries f Status get Entries int index f Table Viewer get Table get Selection Index enabled index 1 index entries length 1 set Enabled enabled  fStatus fStatus hasEntries RefactoringStatusEntry fStatus getEntries fTableViewer getTable getSelectionIndex setEnabled
private class Previous Problem extends Action public Previous Problem set Image Descriptor CompareUI DESC ETOOL PREV set Disabled Image Descriptor CompareUI DESC DTOOL PREV set Hover Image Descriptor CompareUI DESC CTOOL PREV set Tool Tip Text RefactoringUI Messages get String Error Wizard Page previous Change NON NLS 1 Workbench Help set Help this I Refactoring Help Context Ids PREVIOUS PROBLEM ACTION  PreviousProblem PreviousProblem setImageDescriptor DESC_ETOOL_PREV setDisabledImageDescriptor DESC_DTOOL_PREV setHoverImageDescriptor DESC_CTOOL_PREV setToolTipText RefactoringUIMessages getString ErrorWizardPage previous_Change WorkbenchHelp setHelp IRefactoringHelpContextIds PREVIOUS_PROBLEM_ACTION
Workbench Help set Help this I Refactoring Help Context Ids PREVIOUS PROBLEM ACTION public void run reveal Element false  WorkbenchHelp setHelp IRefactoringHelpContextIds PREVIOUS_PROBLEM_ACTION revealElement
public void update boolean enabled false if f Status null f Status has Entries int index f Table Viewer get Table get Selection Index enabled index 1 index 0 set Enabled enabled  fStatus fStatus hasEntries fTableViewer getTable getSelectionIndex setEnabled
private static class Refactoring Status Sorter extends Viewer Sorter public int compare Viewer viewer Object e1 Object e2 int r1 Refactoring Status Entry e1 get Severity int r2 Refactoring Status Entry e2 get Severity if r1 r2 return 1 if r2 r1 return 1 return 0  RefactoringStatusSorter ViewerSorter RefactoringStatusEntry getSeverity RefactoringStatusEntry getSeverity
private Previous Problem f Previous Problem public Refactoring Status Viewer Composite parent int style super parent style SWT VERTICAL create Contents  PreviousProblem fPreviousProblem RefactoringStatusViewer createContents
Sets the refactoring status param status the refactoring status public void set Status Refactoring Status status f Status status if f Table Viewer get Input f Status f Table Viewer set Input f Status f Table Viewer get Table get Column 0 pack I Selection selection f Table Viewer get Selection if selection is Empty Refactoring Status Entry entry get First Entry if entry null f Table Viewer set Selection new Structured Selection entry show Context Viewer entry f Table Viewer get Control set Focus f Next Problem update f Previous Problem update  setStatus RefactoringStatus fStatus fTableViewer getInput fStatus fTableViewer setInput fStatus fTableViewer getTable getColumn ISelection fTableViewer getSelection isEmpty RefactoringStatusEntry getFirstEntry fTableViewer setSelection StructuredSelection showContextViewer fTableViewer getControl setFocus fNextProblem fPreviousProblem
Returns the currently used tt Refactoring Status tt return the tt Refactoring Status tt public Refactoring Status get Status return f Status  RefactoringStatus RefactoringStatus RefactoringStatus getStatus fStatus
UI creation public Point compute Size int w Hint int h Hint boolean changed Pixel Converter converter new Pixel Converter this return new Point converter convert Width In Chars To Pixels 90 converter convert Height In Chars To Pixels 25  computeSize wHint hHint PixelConverter PixelConverter convertWidthInCharsToPixels convertHeightInCharsToPixels
private void create Contents Grid Layout layout new Grid Layout layout num Columns 1 layout margin Width 0 layout margin Height 0 set Layout layout Viewer Pane context Pane new Viewer Pane this SWT BORDER SWT FLAT context Pane set Text RefactoringUI Messages get String Refactoring Status Viewer Found problems NON NLS 1 Tool Bar Manager tbm context Pane get Tool Bar Manager tbm add f Next Problem new Next Problem tbm add f Previous Problem new Previous Problem tbm update true create Table Viewer context Pane context Pane set Content f Table Viewer get Control f Context Viewer Container new Page Book this SWT NONE f Null Context Viewer new Null Context Viewer f Null Context Viewer create Control f Context Viewer Container f Context Viewer Container show Page f Null Context Viewer get Control f Current Context Viewer f Null Context Viewer f Current Context Viewer f Null Context Viewer f Current Descriptor null set Weights new int 35 65  createContents GridLayout GridLayout numColumns marginWidth marginHeight setLayout ViewerPane contextPane ViewerPane contextPane setText RefactoringUIMessages getString RefactoringStatusViewer Found_problems ToolBarManager contextPane getToolBarManager fNextProblem NextProblem fPreviousProblem PreviousProblem createTableViewer contextPane contextPane setContent fTableViewer getControl fContextViewerContainer PageBook fNullContextViewer NullContextViewer fNullContextViewer createControl fContextViewerContainer fContextViewerContainer showPage fNullContextViewer getControl fCurrentContextViewer fNullContextViewer fCurrentContextViewer fNullContextViewer fCurrentDescriptor setWeights
f Table Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event entry Selected event get Selection f Next Problem update f Previous Problem update  fTableViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent entrySelected getSelection fNextProblem fPreviousProblem
private void create Table Viewer Composite parent f Table Viewer new Table Viewer new Table parent SWT SINGLE SWT H SCROLL f Table Viewer set Label Provider new Refactoring Status Entry Label Provider f Table Viewer set Content Provider new Refactoring Status Content Provider f Table Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event entry Selected event get Selection f Next Problem update f Previous Problem update f Table Viewer set Sorter new Refactoring Status Sorter Table table Control f Table Viewer get Table must set the dialog font here since we pack the table and this might otherwise happen with the wrong font resulting in clipped messages table Control set Font J Face Resources get Dialog Font Grid Data gd new Grid Data Grid Data FILL BOTH table Control set Layout Data gd Add a column so that we can pack it in set Visible Table Column tc new Table Column table Control SWT NONE tc set Resizable false  createTableViewer fTableViewer TableViewer H_SCROLL fTableViewer setLabelProvider RefactoringStatusEntryLabelProvider fTableViewer setContentProvider RefactoringStatusContentProvider fTableViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent entrySelected getSelection fNextProblem fPreviousProblem fTableViewer setSorter RefactoringStatusSorter tableControl fTableViewer getTable tableControl setFont JFaceResources getDialogFont GridData GridData GridData FILL_BOTH tableControl setLayoutData setVisible TableColumn TableColumn tableControl setResizable
private void entry Selected I Selection s if s instanceof I Structured Selection return Object first I Structured Selection s get First Element if first instanceof Refactoring Status Entry return Refactoring Status Entry entry Refactoring Status Entry first show Context Viewer entry  entrySelected ISelection IStructuredSelection IStructuredSelection getFirstElement RefactoringStatusEntry RefactoringStatusEntry RefactoringStatusEntry showContextViewer
private void show Context Viewer Refactoring Status Entry entry Refactoring Status Context context entry get Context if context null show Null Context Viewer else try Status Context Viewer Descriptor descriptor Status Context Viewer Descriptor get context if f Current Descriptor descriptor I Status Context Viewer new Viewer if descriptor null new Viewer descriptor create Viewer new Viewer create Control f Context Viewer Container else new Viewer f Null Context Viewer f Current Descriptor descriptor new Viewer set Input context if f Current Context Viewer null f Current Context Viewer f Null Context Viewer f Current Context Viewer get Control dispose f Current Context Viewer new Viewer f Context Viewer Container show Page f Current Context Viewer get Control else f Current Context Viewer set Input context catch Core Exception e show Null Context Viewer Exception Handler handle e get Shell RefactoringUI Messages get String Refactoring Status Viewer error title NON NLS 1 RefactoringUI Messages get String Refactoring Status Viewer error message NON NLS 1  showContextViewer RefactoringStatusEntry RefactoringStatusContext getContext showNullContextViewer StatusContextViewerDescriptor StatusContextViewerDescriptor fCurrentDescriptor IStatusContextViewer newViewer newViewer createViewer newViewer createControl fContextViewerContainer newViewer fNullContextViewer fCurrentDescriptor newViewer setInput fCurrentContextViewer fCurrentContextViewer fNullContextViewer fCurrentContextViewer getControl fCurrentContextViewer newViewer fContextViewerContainer showPage fCurrentContextViewer getControl fCurrentContextViewer setInput CoreException showNullContextViewer ExceptionHandler getShell RefactoringUIMessages getString RefactoringStatusViewer RefactoringUIMessages getString RefactoringStatusViewer
private void show Null Context Viewer f Current Context Viewer f Null Context Viewer f Current Descriptor null f Context Viewer Container show Page f Current Context Viewer get Control  showNullContextViewer fCurrentContextViewer fNullContextViewer fCurrentDescriptor fContextViewerContainer showPage fCurrentContextViewer getControl
private Refactoring Status Entry get First Entry if f Status null f Status has Entries return null return f Status get Entry At 0  RefactoringStatusEntry getFirstEntry fStatus fStatus hasEntries fStatus getEntryAt
private void reveal Element boolean next Refactoring Status Entry entries f Status get Entries if entries length 0 return int index f Table Viewer get Table get Selection Index int last entries length 1 boolean do It true if index 1 index 0 else if next index last index else if next index 0 index else do It false if do It f Table Viewer set Selection new Structured Selection entries index  revealElement RefactoringStatusEntry fStatus getEntries fTableViewer getTable getSelectionIndex doIt doIt doIt fTableViewer setSelection StructuredSelection

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private RefactoringUI Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME RefactoringUIMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString RESOURCE_BUNDLE getString MissingResourceException
public static String get Formatted String String key String arg try return Message Format format RESOURCE BUNDLE get String key new String arg catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getFormattedString MessageFormat RESOURCE_BUNDLE getString MissingResourceException
public static String get Formatted String String key Object arg try return Message Format format RESOURCE BUNDLE get String key new Object arg catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getFormattedString MessageFormat RESOURCE_BUNDLE getString MissingResourceException
public static String get Formatted String String key String args try return Message Format format RESOURCE BUNDLE get String key args catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getFormattedString MessageFormat RESOURCE_BUNDLE getString MissingResourceException
public static String get Formatted String String key Object args try return Message Format format RESOURCE BUNDLE get String key args catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getFormattedString MessageFormat RESOURCE_BUNDLE getString MissingResourceException

private static RefactoringUI Plugin fg Default public RefactoringUI Plugin fg Default this  RefactoringUIPlugin fgDefault RefactoringUIPlugin fgDefault
public static RefactoringUI Plugin get Default return fg Default  RefactoringUIPlugin getDefault fgDefault
public static String get Plugin Id return org eclipse ltk ui refactoring NON NLS 1  getPluginId
public static void log I Status status get Default get Log log status  IStatus getDefault getLog
public static void log Throwable t I Status status new Status I Status ERROR get Plugin Id I RefactoringUI Status Codes INTERNAL ERROR RefactoringUI Messages get String RefactoringUI Plugin internal error NON NLS 1 t Resources Plugin get Plugin get Log log status  IStatus IStatus getPluginId IRefactoringUIStatusCodes INTERNAL_ERROR RefactoringUIMessages getString RefactoringUIPlugin internal_error ResourcesPlugin getPlugin getLog
public static void log Error Message String message log new Status I Status ERROR get Plugin Id I RefactoringUI Status Codes INTERNAL ERROR message null  logErrorMessage IStatus getPluginId IRefactoringUIStatusCodes INTERNAL_ERROR
public static void log Removed Listener Throwable t I Status status new Status I Status ERROR get Plugin Id I RefactoringUI Status Codes INTERNAL ERROR RefactoringUI Messages get String RefactoringUI Plugin listener removed NON NLS 1 t Resources Plugin get Plugin get Log log status  logRemovedListener IStatus IStatus getPluginId IRefactoringUIStatusCodes INTERNAL_ERROR RefactoringUIMessages getString RefactoringUIPlugin listener_removed ResourcesPlugin getPlugin getLog
public static I Editor Part get Instanciated Editors List result new Array List 0 I Workbench workbench get Default get Workbench I Workbench Window windows workbench get Workbench Windows for int window Index 0 window Index windows length window Index I Workbench Page pages windows window Index get Pages for int page Index 0 page Index pages length page Index I Editor Reference references pages page Index get Editor References for int ref Index 0 ref Index references length ref Index I Editor Part editor references ref Index get Editor false if editor null result add editor return I Editor Part result to Array new I Editor Part result size  IEditorPart getInstanciatedEditors ArrayList IWorkbench getDefault getWorkbench IWorkbenchWindow getWorkbenchWindows windowIndex windowIndex windowIndex IWorkbenchPage windowIndex getPages pageIndex pageIndex pageIndex IEditorReference pageIndex getEditorReferences refIndex refIndex refIndex IEditorPart refIndex getEditor IEditorPart toArray IEditorPart
protected Image Registry create Image Registry return Refactoring Plugin Images get Image Registry  ImageRegistry createImageRegistry RefactoringPluginImages getImageRegistry

Creates a new refactoring wizard dialog with the given wizard param parent the parent shell param wizard the refactoring wizard public Refactoring Wizard Dialog Shell parent Refactoring Wizard wizard super parent wizard set Shell Style get Shell Style SWT RESIZE I Dialog Settings settings RefactoringUI Plugin get Default get Dialog Settings wizard set Dialog Settings settings f Settings settings get Section DIALOG SETTINGS if f Settings null f Settings new Dialog Settings DIALOG SETTINGS settings add Section f Settings f Settings put WIDTH 600 f Settings put HEIGHT 400 int width 600 int height 400 try width f Settings get Int WIDTH height f Settings get Int HEIGHT catch Number Format Exception e set Minimum Page Size width height  RefactoringWizardDialog RefactoringWizard setShellStyle getShellStyle IDialogSettings RefactoringUIPlugin getDefault getDialogSettings setDialogSettings fSettings getSection DIALOG_SETTINGS fSettings fSettings DialogSettings DIALOG_SETTINGS addSection fSettings fSettings fSettings fSettings getInt fSettings getInt NumberFormatException setMinimumPageSize
inherit Doc protected void configure Shell Shell new Shell super configure Shell new Shell get Refactoring Wizard get Refactoring set Validation Context new Shell  inheritDoc configureShell newShell configureShell newShell getRefactoringWizard getRefactoring setValidationContext newShell
protected void finish Pressed I Wizard Page page get Current Page Control control page get Control get Parent Point size control get Size f Settings put WIDTH size x f Settings put HEIGHT size y super finish Pressed  finishPressed IWizardPage getCurrentPage getControl getParent getSize fSettings fSettings finishPressed
public void update Buttons super update Buttons if f Make Next Button Default return if get Shell null return Button next get Button I Dialog Constants NEXT ID if next is Enabled get Shell set Default Button next  updateButtons updateButtons fMakeNextButtonDefault getShell getButton IDialogConstants NEXT_ID isEnabled getShell setDefaultButton
usually called in the I Wizard set Container I Wizard Container method public void make Next Button Default f Make Next Button Default true  IWizard setContainer IWizardContainer makeNextButtonDefault fMakeNextButtonDefault
public Button get Cancel Button return get Button I Dialog Constants CANCEL ID  getCancelButton getButton IDialogConstants CANCEL_ID
private Refactoring Wizard get Refactoring Wizard return Refactoring Wizard get Wizard  RefactoringWizard getRefactoringWizard RefactoringWizard getWizard

private Label f Text public Message Box Composite parent int style super parent style Grid Layout layout new Grid Layout layout num Columns 2 set Layout layout f Image new Label this SWT NONE f Image set Image INFO Point size f Image compute Size SWT DEFAULT SWT DEFAULT Grid Data gd new Grid Data gd vertical Alignment SWT TOP gd width Hint size x gd height Hint size y f Image set Layout Data gd f Image set Image null f Text new Label this SWT WRAP f Text set Text n NON NLS 1 size f Text compute Size SWT DEFAULT SWT DEFAULT gd new Grid Data Grid Data FILL HORIZONTAL gd height Hint size y gd vertical Alignment SWT TOP f Text set Layout Data gd  fText MessageBox GridLayout GridLayout numColumns setLayout fImage fImage setImage fImage computeSize GridData GridData verticalAlignment widthHint heightHint fImage setLayoutData fImage setImage fText fText setText fText computeSize GridData GridData FILL_HORIZONTAL heightHint verticalAlignment fText setLayoutData
public void set Message I Wizard Page page String msg page get Error Message int type I Message Provider ERROR if msg null msg length 0 msg page get Message type I Message Provider NONE if msg null page instanceof I Message Provider type I Message Provider page get Message Type Image image null switch type case I Message Provider INFORMATION image INFO break case I Message Provider WARNING image WARNING break case I Message Provider ERROR image ERROR break if msg null msg NON NLS 1 f Text set Text msg if image null msg length 0 image INFO f Image set Image image  setMessage IWizardPage getErrorMessage IMessageProvider getMessage IMessageProvider IMessageProvider IMessageProvider getMessageType IMessageProvider IMessageProvider IMessageProvider fText setText fImage setImage
private Stack Layout f Layout public Page Book Composite parent int style super parent style f Layout new Stack Layout set Layout f Layout f Layout margin Width 5 f Layout margin Height 5  StackLayout fLayout PageBook fLayout StackLayout setLayout fLayout fLayout marginWidth fLayout marginHeight
f Layout margin Width 5 f Layout margin Height 5 public void show Page Control page f Layout top Control page layout  fLayout marginWidth fLayout marginHeight showPage fLayout topControl
layout public Control get Top Page return f Layout top Control  getTopPage fLayout topControl
public Refactoring Wizard Dialog2 Shell shell Refactoring Wizard wizard super shell Assert is Not Null wizard set Shell Style get Shell Style SWT RESIZE wizard set Dialog Settings RefactoringUI Plugin get Default get Dialog Settings f Wizard wizard f Wizard set Container this f Wizard add Pages init Size  RefactoringWizardDialog2 RefactoringWizard isNotNull setShellStyle getShellStyle setDialogSettings RefactoringUIPlugin getDefault getDialogSettings fWizard fWizard setContainer fWizard addPages initSize
private void init Size I Dialog Settings settings RefactoringUI Plugin get Default get Dialog Settings f Settings settings get Section DIALOG SETTINGS if f Settings null f Settings new Dialog Settings DIALOG SETTINGS settings add Section f Settings f Settings put WIDTH 600 f Settings put HEIGHT 400 f Preview Width 600 f Preview Height 400 try f Preview Width f Settings get Int WIDTH f Preview Height f Settings get Int HEIGHT catch Number Format Exception e  initSize IDialogSettings RefactoringUIPlugin getDefault getDialogSettings fSettings getSection DIALOG_SETTINGS fSettings fSettings DialogSettings DIALOG_SETTINGS addSection fSettings fSettings fSettings fPreviewWidth fPreviewHeight fPreviewWidth fSettings getInt fPreviewHeight fSettings getInt NumberFormatException
private void save Size if f Current Page instanceof Preview Wizard Page Control control f Current Page get Control get Parent Point size control get Size f Settings put WIDTH size x f Settings put HEIGHT size y  saveSize fCurrentPage PreviewWizardPage fCurrentPage getControl getParent getSize fSettings fSettings
public Button get Cancel Button return get Button I Dialog Constants CANCEL ID  getCancelButton getButton IDialogConstants CANCEL_ID
I Refactoring Wizard Dialog public void make Next Button Default f Make Next Button Default true  IRefactoringWizardDialog makeNextButtonDefault fMakeNextButtonDefault
Method declared on I Wizard Container public void show Page I Wizard Page page f Current Page page  IWizardContainer showPage IWizardPage fCurrentPage
public void update Buttons boolean preview Page is Preview Page Active boolean ok f Wizard can Finish boolean can Flip f Current Page can Flip To Next Page Button preview Button get Button PREVIEW ID Button default Button null if preview Button null preview Button is Disposed preview Button set Enabled preview Page if preview Page preview Button set Enabled can Flip if preview Button is Enabled default Button preview Button Button ok Button get Button I Dialog Constants OK ID if ok Button null ok Button is Disposed ok Button set Enabled ok if ok default Button ok Button if default Button null default Button get Shell set Default Button default Button  updateButtons previewPage isPreviewPageActive fWizard canFinish canFlip fCurrentPage canFlipToNextPage previewButton getButton PREVIEW_ID defaultButton previewButton previewButton isDisposed previewButton setEnabled previewPage previewPage previewButton setEnabled canFlip previewButton isEnabled defaultButton previewButton okButton getButton IDialogConstants OK_ID okButton okButton isDisposed okButton setEnabled defaultButton okButton defaultButton defaultButton getShell setDefaultButton defaultButton
public void update Message if f Status Container null f Status Container is Disposed return f Status Container show Page f Message Box f Message Box set Message f Current Page  updateMessage fStatusContainer fStatusContainer isDisposed fStatusContainer showPage fMessageBox fMessageBox setMessage fCurrentPage
Method declared on I Wizard Container public void update Title Bar we don t have a title bar  IWizardContainer updateTitleBar
Method declared on I Wizard Container public void update Window Title get Shell set Text f Wizard get Window Title  IWizardContainer updateWindowTitle getShell setText fWizard getWindowTitle
Method declared on I Wizard Container public I Wizard Page get Current Page return f Current Page  IWizardContainer IWizardPage getCurrentPage fCurrentPage
public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception if f Progress Monitor Part null Modal Context run runnable false new Null Progress Monitor get Shell get Display else Object state null if f Active Running Operations 0 state about To Start fork cancelable f Active Running Operations try Modal Context run runnable fork f Progress Monitor Part get Shell get Display finally f Active Running Operations Stop if this is the last one if state null stopped state  IRunnableWithProgress InvocationTargetException InterruptedException fProgressMonitorPart ModalContext NullProgressMonitor getShell getDisplay fActiveRunningOperations aboutToStart fActiveRunningOperations ModalContext fProgressMonitorPart getShell getDisplay fActiveRunningOperations
private Object about To Start boolean cancelable Map saved State null Shell shell get Shell if shell null Save focus control Control focus Control get Shell get Display get Focus Control if focus Control null focus Control get Shell get Shell focus Control null Button cancel Button get Button I Dialog Constants CANCEL ID Set the busy cursor to all shells Display d get Shell get Display f Wait Cursor new Cursor d SWT CURSOR WAIT set Display Cursor d f Wait Cursor Set the arrow cursor to the cancel component f Arrow Cursor new Cursor d SWT CURSOR ARROW cancel Button set Cursor f Arrow Cursor boolean has Progress Monitor f Progress Monitor Part null Deactivate shell saved State saveUI State has Progress Monitor cancelable if focus Control null saved State put focus focus Control NON NLS 1 if has Progress Monitor f Progress Monitor Part attach To Cancel Component cancel Button f Status Container show Page f Progress Monitor Part Update the status container since we are blocking the event loop right now f Status Container update return saved State  aboutToStart savedState getShell focusControl getShell getDisplay getFocusControl focusControl focusControl getShell getShell focusControl cancelButton getButton IDialogConstants CANCEL_ID getShell getDisplay fWaitCursor CURSOR_WAIT setDisplayCursor fWaitCursor fArrowCursor CURSOR_ARROW cancelButton setCursor fArrowCursor hasProgressMonitor fProgressMonitorPart savedState saveUIState hasProgressMonitor focusControl savedState focusControl hasProgressMonitor fProgressMonitorPart attachToCancelComponent cancelButton fStatusContainer showPage fProgressMonitorPart fStatusContainer savedState
private Map saveUI State boolean keep Cancel Enabled Map saved State new Hash Map 10 save Enable State And Set get Button PREVIEW ID saved State preview false NON NLS 1 save Enable State And Set get Button I Dialog Constants OK ID saved State ok false NON NLS 1 save Enable State And Set get Button I Dialog Constants CANCEL ID saved State cancel keep Cancel Enabled NON NLS 1 saved State put page Control Enable State disable f Visible Page get Control NON NLS 1 return saved State  saveUIState keepCancelEnabled savedState HashMap saveEnableStateAndSet getButton PREVIEW_ID savedState saveEnableStateAndSet getButton IDialogConstants OK_ID savedState saveEnableStateAndSet getButton IDialogConstants CANCEL_ID savedState keepCancelEnabled savedState ControlEnableState fVisiblePage getControl savedState
private void save Enable State And Set Control w Map h String key boolean enabled if w null h put key new Boolean w get Enabled w set Enabled enabled  saveEnableStateAndSet getEnabled setEnabled
private void set Display Cursor Display d Cursor c Shell shells d get Shells for int i 0 i shells length i shells i set Cursor c  setDisplayCursor getShells setCursor
private void stopped Object saved State Shell shell get Shell if shell null Button cancel Button get Button I Dialog Constants CANCEL ID if f Progress Monitor Part null f Progress Monitor Part remove From Cancel Component cancel Button f Status Container show Page f Message Box Map state Map saved State restoreUI State state set Display Cursor shell get Display null cancel Button set Cursor null f Wait Cursor dispose f Wait Cursor null f Arrow Cursor dispose f Arrow Cursor null Control focus Control Control state get focus NON NLS 1 if focus Control null focus Control set Focus  savedState getShell cancelButton getButton IDialogConstants CANCEL_ID fProgressMonitorPart fProgressMonitorPart removeFromCancelComponent cancelButton fStatusContainer showPage fMessageBox savedState restoreUIState setDisplayCursor getDisplay cancelButton setCursor fWaitCursor fWaitCursor fArrowCursor fArrowCursor focusControl focusControl focusControl setFocus
private void restoreUI State Map state restore Enable State get Button PREVIEW ID state preview NON NLS 1 restore Enable State get Button I Dialog Constants OK ID state ok NON NLS 1 restore Enable State get Button I Dialog Constants CANCEL ID state cancel NON NLS 1 Control Enable State page State Control Enable State state get page NON NLS 1 page State restore  restoreUIState restoreEnableState getButton PREVIEW_ID restoreEnableState getButton IDialogConstants OK_ID restoreEnableState getButton IDialogConstants CANCEL_ID ControlEnableState pageState ControlEnableState pageState
private void restore Enable State Control w Map h String key if w null Boolean b Boolean h get key if b null w set Enabled b boolean Value  restoreEnableState setEnabled booleanValue
Dialog public boolean close f Wizard dispose return super close  fWizard
protected void cancel Pressed if f Active Running Operations 0 if f Wizard perform Cancel super cancel Pressed  cancelPressed fActiveRunningOperations fWizard performCancel cancelPressed
protected void ok Pressed I Wizard Page current f Current Page if f Wizard perform Finish save Size super ok Pressed return if f Current Page current return Assert is True Error Wizard Page PAGE NAME equals f Current Page get Name if show Error Dialog Error Wizard Page f Current Page if f Wizard perform Finish super ok Pressed return f Current Page current  okPressed IWizardPage fCurrentPage fWizard performFinish saveSize okPressed fCurrentPage isTrue ErrorWizardPage PAGE_NAME fCurrentPage getName showErrorDialog ErrorWizardPage fCurrentPage fWizard performFinish okPressed fCurrentPage
private boolean is Preview Page Active return I Preview Wizard Page PAGE NAME equals f Current Page get Name  isPreviewPageActive IPreviewWizardPage PAGE_NAME fCurrentPage getName
private void preview Pressed I Wizard Page current f Current Page f Current Page f Current Page get Next Page if current f Current Page return String page Name f Current Page get Name if Error Wizard Page PAGE NAME equals page Name if show Error Dialog Error Wizard Page f Current Page f Current Page f Current Page get Next Page page Name f Current Page get Name else return if I Preview Wizard Page PAGE NAME equals page Name f Current Page create Control f Page Container make Visible f Current Page update Buttons if Preview Wizard Page f Current Page has Changes resize else get Button I Dialog Constants OK ID set Enabled false else f Current Page current  previewPressed IWizardPage fCurrentPage fCurrentPage fCurrentPage getNextPage fCurrentPage pageName fCurrentPage getName ErrorWizardPage PAGE_NAME pageName showErrorDialog ErrorWizardPage fCurrentPage fCurrentPage fCurrentPage getNextPage pageName fCurrentPage getName IPreviewWizardPage PAGE_NAME pageName fCurrentPage createControl fPageContainer makeVisible fCurrentPage updateButtons PreviewWizardPage fCurrentPage hasChanges getButton IDialogConstants OK_ID setEnabled fCurrentPage
private boolean show Error Dialog Error Wizard Page page Refactoring Status Dialog dialog new Refactoring Status Dialog get Shell page f Wizard internal Show Back Button On Status Dialog InternalAPI INSTANCE switch dialog open case I Dialog Constants OK ID return true case I Dialog Constants BACK ID f Current Page f Current Page get Previous Page break case I Dialog Constants CANCEL ID super cancel Pressed return false  showErrorDialog ErrorWizardPage RefactoringStatusDialog RefactoringStatusDialog getShell fWizard internalShowBackButtonOnStatusDialog IDialogConstants OK_ID IDialogConstants BACK_ID fCurrentPage fCurrentPage getPreviousPage IDialogConstants CANCEL_ID cancelPressed
private void resize Control control f Page Container get Top Page Point size control get Size int dw Math max 0 f Preview Width size x int dh Math max 0 f Preview Height size y int dx dw 2 int dy dh 2 Shell shell get Shell Rectangle rect shell get Bounds Rectangle display shell get Display get Client Area rect x Math max 0 rect x dx rect y Math max 0 rect y dy rect width Math min rect width dw display width rect height Math min rect height dh display height int xe rect x rect width if xe display width rect x xe display width int ye rect y rect height if ye display height rect y ye display height shell set Bounds rect  fPageContainer getTopPage getSize fPreviewWidth fPreviewHeight getShell getBounds getDisplay getClientArea setBounds
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text f Wizard get Default Page Title f Wizard get Refactoring set Validation Context new Shell  configureShell newShell configureShell newShell newShell setText fWizard getDefaultPageTitle fWizard getRefactoring setValidationContext newShell
protected Control create Contents Composite parent Composite result new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout vertical Spacing 0 layout horizontal Spacing 0 result set Layout layout result set Layout Data new Grid Data Grid Data FILL BOTH initialize the dialog units initialize Dialog Units result f Page Container new Page Book result SWT NONE Grid Data gd new Grid Data Grid Data FILL BOTH f Page Container set Layout Data gd f Current Page f Wizard get Starting Page dialog Area f Page Container if f Current Page instanceof Preview Wizard Page gd width Hint f Preview Width gd height Hint f Preview Height f Status Container new Page Book result SWT NONE gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint convert Width In Chars To Pixels f Wizard get Message Line Width In Chars f Status Container set Layout Data gd if f Wizard needs Progress Monitor create Progress Monitor Part create Message Box f Status Container show Page f Message Box button Bar create Button Bar result f Current Page create Control f Page Container make Visible f Current Page update Message update Buttons apply Dialog Font result return result  createContents GridLayout GridLayout marginHeight marginWidth verticalSpacing horizontalSpacing setLayout setLayoutData GridData GridData FILL_BOTH initializeDialogUnits fPageContainer PageBook GridData GridData GridData FILL_BOTH fPageContainer setLayoutData fCurrentPage fWizard getStartingPage dialogArea fPageContainer fCurrentPage PreviewWizardPage widthHint fPreviewWidth heightHint fPreviewHeight fStatusContainer PageBook GridData GridData FILL_HORIZONTAL widthHint convertWidthInCharsToPixels fWizard getMessageLineWidthInChars fStatusContainer setLayoutData fWizard needsProgressMonitor createProgressMonitorPart createMessageBox fStatusContainer showPage fMessageBox buttonBar createButtonBar fCurrentPage createControl fPageContainer makeVisible fCurrentPage updateMessage updateButtons applyDialogFont
private void create Progress Monitor Part Insert a progress monitor Grid Layout pmlayout new Grid Layout pmlayout num Columns 1 pmlayout margin Height 0 f Progress Monitor Part new Progress Monitor Part f Status Container pmlayout  createProgressMonitorPart GridLayout GridLayout numColumns marginHeight fProgressMonitorPart ProgressMonitorPart fStatusContainer
private void create Message Box f Message Box new Message Box f Status Container SWT NONE  createMessageBox fMessageBox MessageBox fStatusContainer
preview add Selection Listener new Selection Adapter public void widget Selected Selection Event e preview Pressed  addSelectionListener SelectionAdapter widgetSelected SelectionEvent previewPressed
protected void create Buttons For Button Bar Composite parent if f Current Page instanceof Preview Wizard Page f Wizard internal Has Preview Page InternalAPI INSTANCE Button preview create Button parent PREVIEW ID RefactoringUI Messages get String Refactoring Wizard Dialog2 buttons preview label false NON NLS 1 if f Make Next Button Default preview get Shell set Default Button preview preview add Selection Listener new Selection Adapter public void widget Selected Selection Event e preview Pressed String OK LABEL I Dialog Constants OK LABEL String CANCEL LABEL I Dialog Constants CANCEL LABEL if f Wizard internal Is Yes No Style InternalAPI INSTANCE OK LABEL I Dialog Constants YES LABEL CANCEL LABEL I Dialog Constants NO LABEL create Button parent I Dialog Constants OK ID OK LABEL true create Button parent I Dialog Constants CANCEL ID CANCEL LABEL false Button ok Button get Button I Dialog Constants OK ID ok Button set Focus  createButtonsForButtonBar fCurrentPage PreviewWizardPage fWizard internalHasPreviewPage createButton PREVIEW_ID RefactoringUIMessages getString RefactoringWizardDialog2 fMakeNextButtonDefault getShell setDefaultButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent previewPressed OK_LABEL IDialogConstants OK_LABEL CANCEL_LABEL IDialogConstants CANCEL_LABEL fWizard internalIsYesNoStyle OK_LABEL IDialogConstants YES_LABEL CANCEL_LABEL IDialogConstants NO_LABEL createButton IDialogConstants OK_ID OK_LABEL createButton IDialogConstants CANCEL_ID CANCEL_LABEL okButton getButton IDialogConstants OK_ID okButton setFocus
private void make Visible I Wizard Page page if f Visible Page page return if f Visible Page null f Visible Page set Visible false f Visible Page page f Page Container show Page page get Control f Visible Page set Visible true  makeVisible IWizardPage fVisiblePage fVisiblePage fVisiblePage setVisible fVisiblePage fPageContainer showPage getControl fVisiblePage setVisible

private static Descriptor Manager fg Descriptions new Descriptor Manager EXT ID context NON NLS 1 protected Abstract Descriptor create Descriptor I Configuration Element element return new Status Context Viewer Descriptor element  DescriptorManager fgDescriptions DescriptorManager EXT_ID AbstractDescriptor createDescriptor IConfigurationElement StatusContextViewerDescriptor
public static Status Context Viewer Descriptor get Object element throws Core Exception return Status Context Viewer Descriptor fg Descriptions get Descriptor element  StatusContextViewerDescriptor CoreException StatusContextViewerDescriptor fgDescriptions getDescriptor
public Status Context Viewer Descriptor I Configuration Element element super element  StatusContextViewerDescriptor IConfigurationElement
public I Status Context Viewer create Viewer throws Core Exception return I Status Context Viewer f Configuration Element create Executable Extension CLASS  IStatusContextViewer createViewer CoreException IStatusContextViewer fConfigurationElement createExecutableExtension

I Region range public Text Edit Change Input Change change super change  IRegion TextEditChangeInput
f Compare Configuration set Right Label RefactoringUI Messages get String Compare Previewer refactored source NON NLS 1 add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Image null f Image is Disposed f Image dispose  fCompareConfiguration setRightLabel RefactoringUIMessages getString ComparePreviewer refactored_source addDisposeListener DisposeListener widgetDisposed DisposeEvent fImage fImage isDisposed fImage
private Image f Image public Compare Previewer Composite parent super parent SWT BORDER SWT FLAT true f Compare Configuration new Compare Configuration f Compare Configuration set Left Editable false f Compare Configuration set Left Label RefactoringUI Messages get String Compare Previewer original source NON NLS 1 f Compare Configuration set Right Editable false f Compare Configuration set Right Label RefactoringUI Messages get String Compare Previewer refactored source NON NLS 1 add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Image null f Image is Disposed f Image dispose  fImage ComparePreviewer fCompareConfiguration CompareConfiguration fCompareConfiguration setLeftEditable fCompareConfiguration setLeftLabel RefactoringUIMessages getString ComparePreviewer original_source fCompareConfiguration setRightEditable fCompareConfiguration setRightLabel RefactoringUIMessages getString ComparePreviewer refactored_source addDisposeListener DisposeListener widgetDisposed DisposeEvent fImage fImage isDisposed fImage
public void set Label String label f Label label  setLabel fLabel
f Label label public void set Image Descriptor Image Descriptor image Descriptor f Descriptor image Descriptor  fLabel setImageDescriptor ImageDescriptor imageDescriptor fDescriptor imageDescriptor
f Descriptor image Descriptor protected Viewer get Viewer Viewer old Viewer Object input return CompareUI find Content Viewer old Viewer I Compare Input input this f Compare Configuration  fDescriptor imageDescriptor getViewer oldViewer findContentViewer oldViewer ICompareInput fCompareConfiguration
public void set Text String text if f Label null super set Text f Label else super set Text text Image current null if f Descriptor null current f Image f Image f Descriptor create Image else current f Image f Image null set Image f Image if current null current dispose  setText fLabel setText fLabel setText fDescriptor fImage fImage fDescriptor createImage fImage fImage setImage fImage
private String f Content private String f Type public Compare Element String content String type f Content content f Type type  fContent fType CompareElement fContent fType
f Type type public String get Name return RefactoringUI Messages get String Compare Previewer element name NON NLS 1  fType getName RefactoringUIMessages getString ComparePreviewer element_name
return RefactoringUI Messages get String Compare Previewer element name NON NLS 1 public Image get Image return null  RefactoringUIMessages getString ComparePreviewer element_name getImage
return null public String get Type return f Type  getType fType
public Input Stream get Contents throws Core Exception try return new Byte Array Input Stream f Content get Bytes ENCODING catch Unsupported Encoding Exception e return new Byte Array Input Stream f Content get Bytes  InputStream getContents CoreException ByteArrayInputStream fContent getBytes UnsupportedEncodingException ByteArrayInputStream fContent getBytes
public String get Charset return ENCODING  getCharset
public static Change Preview Viewer Input create Input Text Change change return new Change Preview Viewer Input change  ChangePreviewViewerInput createInput TextChange ChangePreviewViewerInput
public static Change Preview Viewer Input create Input Change change Text Edit Change Group group int surrounding Lines Text Edit Change Input result new Text Edit Change Input change result group group result surrounding Lines surrounding Lines return result  ChangePreviewViewerInput createInput TextEditChangeGroup surroundingLines TextEditChangeInput TextEditChangeInput surroundingLines surroundingLines
public static Change Preview Viewer Input create Input Change change Text Edit Change Group groups I Region range Text Edit Change Input result new Text Edit Change Input change result groups groups result range range return result  ChangePreviewViewerInput createInput TextEditChangeGroup IRegion TextEditChangeInput TextEditChangeInput
public void create Control Composite parent f Viewer new Compare Previewer parent  createControl fViewer ComparePreviewer
public Control get Control return f Viewer  getControl fViewer
public void set Input Change Preview Viewer Input input try Change change input get Change if input instanceof Text Edit Change Input Text Edit Change Input edi Text Edit Change Input input if edi group null edi surrounding Lines 0 Text Edit Change Group edit Change edi group Text Change text Change edit Change get Text Change set Input text Change text Change get Current Content edit Change get Region true 2 new Null Progress Monitor text Change get Preview Content new Text Edit Change Group edit Change edit Change get Region true 2 new Null Progress Monitor text Change get Text Type return else if edi groups null edi groups length 0 edi range null Text Change text Change edi groups 0 get Text Change set Input text Change text Change get Current Content edi range true 0 new Null Progress Monitor text Change get Preview Content edi groups edi range true 0 new Null Progress Monitor text Change get Text Type return else if change instanceof Text Change Text Change text Change Text Change change set Input text Change text Change get Current Content new Null Progress Monitor text Change get Preview Content new Null Progress Monitor text Change get Text Type return else f Viewer set Input null catch Core Exception e RefactoringUI Plugin log e f Viewer set Input null  setInput ChangePreviewViewerInput getChange TextEditChangeInput TextEditChangeInput TextEditChangeInput surroundingLines TextEditChangeGroup editChange TextChange textChange editChange getTextChange setInput textChange textChange getCurrentContent editChange getRegion NullProgressMonitor textChange getPreviewContent TextEditChangeGroup editChange editChange getRegion NullProgressMonitor textChange getTextType TextChange textChange getTextChange setInput textChange textChange getCurrentContent NullProgressMonitor textChange getPreviewContent NullProgressMonitor textChange getTextType TextChange TextChange textChange TextChange setInput textChange textChange getCurrentContent NullProgressMonitor textChange getPreviewContent NullProgressMonitor textChange getTextType fViewer setInput CoreException RefactoringUIPlugin fViewer setInput
public void refresh f Viewer get Viewer refresh  fViewer getViewer
private void set Input Text Change change String left String right String type Object element change get Modified Element if element instanceof I Adaptable I Workbench Adapter adapter I Workbench Adapter I Adaptable element get Adapter I Workbench Adapter class if adapter null f Viewer set Label adapter get Label element f Viewer set Image Descriptor adapter get Image Descriptor element else f Viewer set Label null f Viewer set Image Descriptor null else f Viewer set Label null f Viewer set Image Descriptor null f Viewer set Input new Diff Node new Compare Element left type new Compare Element right type  setInput TextChange getModifiedElement IAdaptable IWorkbenchAdapter IWorkbenchAdapter IAdaptable getAdapter IWorkbenchAdapter fViewer setLabel getLabel fViewer setImageDescriptor getImageDescriptor fViewer setLabel fViewer setImageDescriptor fViewer setLabel fViewer setImageDescriptor fViewer setInput DiffNode CompareElement CompareElement

public Text Edit Change Element Change Element parent Text Edit Change Group change Group super parent f Change Group change Group Assert is Not Null f Change Group  TextEditChangeElement ChangeElement TextEditChangeGroup changeGroup fChangeGroup changeGroup isNotNull fChangeGroup
Returns the code Text Edit Change code managed by this node return the code Text Edit Change code public Text Edit Change Group get Text Edit Change return f Change Group  TextEditChange TextEditChange TextEditChangeGroup getTextEditChange fChangeGroup
public Change get Change return null  getChange
public Change Preview Viewer Descriptor get Change Preview Viewer Descriptor throws Core Exception Default Change Element element get Default Change Element if element null return null return element get Change Preview Viewer Descriptor  ChangePreviewViewerDescriptor getChangePreviewViewerDescriptor CoreException DefaultChangeElement getDefaultChangeElement getChangePreviewViewerDescriptor
public void feed Input I Change Preview Viewer viewer throws Core Exception Default Change Element element get Default Change Element if element null Change change element get Change if change instanceof Text Change I Region range get Text Range this Change Preview Viewer Input input null if range null input Text Change Preview Viewer create Input change new Text Edit Change Group f Change Group range else input Text Change Preview Viewer create Input change f Change Group 2 viewer set Input input else viewer set Input null  feedInput IChangePreviewViewer CoreException DefaultChangeElement getDefaultChangeElement getChange TextChange IRegion getTextRange ChangePreviewViewerInput TextChangePreviewViewer createInput TextEditChangeGroup fChangeGroup TextChangePreviewViewer createInput fChangeGroup setInput setInput
see Change Element set Active public void set Active boolean active f Change Group set Enabled active  ChangeElement setActive setActive fChangeGroup setEnabled
see Change Element get Active public int get Active return f Change Group is Enabled ACTIVE INACTIVE  ChangeElement getActive getActive fChangeGroup isEnabled
see Change Element get Children public Change Element get Children return fg Children  ChangeElement getChildren ChangeElement getChildren fgChildren
private Default Change Element get Default Change Element Change Element element get Parent while element instanceof Default Change Element element null element element get Parent return Default Change Element element  DefaultChangeElement getDefaultChangeElement ChangeElement getParent DefaultChangeElement getParent DefaultChangeElement
private static I Region get Text Range Change Element element throws Core Exception if element null return null if element instanceof Pseudo Java Change Element return Pseudo Java Change Element element get Text Range else if element instanceof Default Change Element return null return get Text Range element get Parent  IRegion getTextRange ChangeElement CoreException PseudoJavaChangeElement PseudoJavaChangeElement getTextRange DefaultChangeElement getTextRange getParent

public UI Perform Change Operation Display display Change change I Wizard Container container super change f Display display f Wizard Container container  UIPerformChangeOperation IWizardContainer fDisplay fWizardContainer
public UI Perform Change Operation Display display Create Change Operation op I Wizard Container container super op f Display display f Wizard Container container  UIPerformChangeOperation CreateChangeOperation IWizardContainer fDisplay fWizardContainer
Runnable r new Runnable public void run I Rewrite Target targets null try final Button cancel get Cancel Button targets get Rewrite Targets begin Compound Change targets boolean enabled true if cancel null cancel is Disposed enabled cancel is Enabled cancel set Enabled false try UI Perform Change Operation super execute Change pm finally if cancel null cancel is Disposed cancel set Enabled enabled catch Core Exception e exception 0 e finally if targets null end Compound Change targets  IRewriteTarget getCancelButton getRewriteTargets beginCompoundChange isDisposed isEnabled setEnabled UIPerformChangeOperation executeChange isDisposed setEnabled CoreException endCompoundChange
protected void execute Change final I Progress Monitor pm throws Core Exception if f Display null f Display is Disposed final Core Exception exception new Core Exception 1 Runnable r new Runnable public void run I Rewrite Target targets null try final Button cancel get Cancel Button targets get Rewrite Targets begin Compound Change targets boolean enabled true if cancel null cancel is Disposed enabled cancel is Enabled cancel set Enabled false try UI Perform Change Operation super execute Change pm finally if cancel null cancel is Disposed cancel set Enabled enabled catch Core Exception e exception 0 e finally if targets null end Compound Change targets f Display sync Exec r if exception 0 null throw new Core Exception exception 0 get Status else I Rewrite Target targets null try targets get Rewrite Targets begin Compound Change targets super execute Change pm finally if targets null end Compound Change targets  executeChange IProgressMonitor CoreException fDisplay fDisplay isDisposed CoreException CoreException IRewriteTarget getCancelButton getRewriteTargets beginCompoundChange isDisposed isEnabled setEnabled UIPerformChangeOperation executeChange isDisposed setEnabled CoreException endCompoundChange fDisplay syncExec CoreException getStatus IRewriteTarget getRewriteTargets beginCompoundChange executeChange endCompoundChange
private static void begin Compound Change I Rewrite Target targets for int i 0 i targets length i targets i begin Compound Change  beginCompoundChange IRewriteTarget beginCompoundChange
private static void end Compound Change I Rewrite Target targets for int i 0 i targets length i targets i end Compound Change  endCompoundChange IRewriteTarget endCompoundChange
private static I Rewrite Target get Rewrite Targets I Editor Part editors RefactoringUI Plugin get Instanciated Editors List result new Array List editors length for int i 0 i editors length i I Rewrite Target target I Rewrite Target editors i get Adapter I Rewrite Target class if target null result add target return I Rewrite Target result to Array new I Rewrite Target result size  IRewriteTarget getRewriteTargets IEditorPart RefactoringUIPlugin getInstanciatedEditors ArrayList IRewriteTarget IRewriteTarget getAdapter IRewriteTarget IRewriteTarget toArray IRewriteTarget
private Button get Cancel Button if f Wizard Container instanceof Refactoring Wizard Dialog2 return Refactoring Wizard Dialog2 f Wizard Container get Cancel Button else if f Wizard Container instanceof Refactoring Wizard Dialog return Refactoring Wizard Dialog f Wizard Container get Cancel Button return null  getCancelButton fWizardContainer RefactoringWizardDialog2 RefactoringWizardDialog2 fWizardContainer getCancelButton fWizardContainer RefactoringWizardDialog RefactoringWizardDialog fWizardContainer getCancelButton

private Shell f Parent private String f Title public Query Shell parent String title f Parent parent f Title title  fParent fTitle fParent fTitle
final int result new int 1 Runnable r new Runnable public void run result 0 dialog open 
public boolean proceed Refactoring Status status final Dialog dialog RefactoringUI create Refactoring Status Dialog status f Parent f Title false final int result new int 1 Runnable r new Runnable public void run result 0 dialog open f Parent get Display sync Exec r return result 0 I Dialog Constants OK ID  RefactoringStatus createRefactoringStatusDialog fParent fTitle fParent getDisplay syncExec IDialogConstants OK_ID
public void stopped final Refactoring Status status Runnable r new Runnable public void run String message status get Message Matching Severity Refactoring Status FATAL Message Dialog open Warning f Parent f Title get Full Message message  RefactoringStatus getMessageMatchingSeverity RefactoringStatus MessageDialog openWarning fParent fTitle getFullMessage
public void stopped final Refactoring Status status Runnable r new Runnable public void run String message status get Message Matching Severity Refactoring Status FATAL Message Dialog open Warning f Parent f Title get Full Message message f Parent get Display sync Exec r  RefactoringStatus getMessageMatchingSeverity RefactoringStatus MessageDialog openWarning fParent fTitle getFullMessage fParent getDisplay syncExec
f Parent get Display sync Exec r protected abstract String get Full Message String error Message  fParent getDisplay syncExec getFullMessage errorMessage
public Undo Manager Action  UndoManagerAction
protected abstract I Runnable With Progress create Operation Shell parent  IRunnableWithProgress createOperation
protected abstract I Runnable With Progress create Operation Shell parent protected abstract Undo Manager Adapter create Undo Manager Listener  IRunnableWithProgress createOperation UndoManagerAdapter createUndoManagerListener
protected abstract Undo Manager Adapter create Undo Manager Listener protected abstract String get Name  UndoManagerAdapter createUndoManagerListener getName
protected abstract String get Name protected I Workbench Window get Workbench Window return f Workbench Window  getName IWorkbenchWindow getWorkbenchWindow fWorkbenchWindow
protected I Action get Action return f Action  IAction getAction fAction
protected boolean is Hooked return f Action null  isHooked fAction
protected void hook Listener I Action action if is Hooked return f Action action f Undo Manager Listener create Undo Manager Listener Refactoring Core get Undo Manager add Listener f Undo Manager Listener  hookListener IAction isHooked fAction fUndoManagerListener createUndoManagerListener RefactoringCore getUndoManager addListener fUndoManagerListener
protected String shorten Text String text int pattern Length int length text length final int final Length MAX LENGTH pattern Length if text length final Length return text String Buffer result new String Buffer int mid final Length 2 result append text substring 0 mid result append NON NLS 1 result append text substring length mid return result to String  shortenText patternLength finalLength MAX_LENGTH patternLength finalLength StringBuffer StringBuffer finalLength toString
public void dispose if f Undo Manager Listener null Refactoring Core get Undo Manager remove Listener f Undo Manager Listener f Workbench Window null f Action null f Undo Manager Listener null  fUndoManagerListener RefactoringCore getUndoManager removeListener fUndoManagerListener fWorkbenchWindow fAction fUndoManagerListener
Method declared in I Action Delegate public void init I Workbench Window window f Workbench Window window  IActionDelegate IWorkbenchWindow fWorkbenchWindow
public void run I Action action Shell parent f Workbench Window get Shell I Runnable With Progress op create Operation parent try PlatformUI get Workbench get Progress Service run InUI new Progress Monitor Dialog f Workbench Window get Shell op Resources Plugin get Workspace get Root catch Invocation Target Exception e Refactoring Core get Undo Manager flush Exception Handler handle e PlatformUI get Workbench get Active Workbench Window get Shell RefactoringUI Messages get String Undo Manager Action internal error title NON NLS 1 RefactoringUI Messages get String Undo Manager Action internal error message NON NLS 1 catch Interrupted Exception e Opertation isn t cancelable catch Operation Canceled Exception e the waiting dialog got canceled  IAction fWorkbenchWindow getShell IRunnableWithProgress createOperation getWorkbench getProgressService runInUI ProgressMonitorDialog fWorkbenchWindow getShell ResourcesPlugin getWorkspace getRoot InvocationTargetException RefactoringCore getUndoManager ExceptionHandler getWorkbench getActiveWorkbenchWindow getShell RefactoringUIMessages getString UndoManagerAction internal_error RefactoringUIMessages getString UndoManagerAction internal_error InterruptedException OperationCanceledException

public Pixel Converter Control control GC gc null try gc new GC control gc set Font control get Font f Font Metrics gc get Font Metrics finally if gc null gc dispose  PixelConverter setFont getFont fFontMetrics getFontMetrics
public int convert Height In Chars To Pixels int chars return Dialog convert Height In Chars To Pixels f Font Metrics chars  convertHeightInCharsToPixels convertHeightInCharsToPixels fFontMetrics
public int convert HorizontalDL Us To Pixels int dlus return Dialog convert HorizontalDL Us To Pixels f Font Metrics dlus  convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels fFontMetrics
public int convert VerticalDL Us To Pixels int dlus return Dialog convert VerticalDL Us To Pixels f Font Metrics dlus  convertVerticalDLUsToPixels convertVerticalDLUsToPixels fFontMetrics
public int convert Width In Chars To Pixels int chars return Dialog convert Width In Chars To Pixels f Font Metrics chars  convertWidthInCharsToPixels convertWidthInCharsToPixels fFontMetrics

public class Strings private Strings 
public static String remove New Line String message String Buffer result new String Buffer int current 0 int index message index Of n 0 while index 1 result append message substring current index if current index index 0 result append current index 1 index message index Of n current result append message substring current return result to String  removeNewLine StringBuffer StringBuffer indexOf indexOf toString

public Viewer Pane Composite parent int style super parent style margin Width 0 margin Height 0 C Label label new C Label this SWT NONE set Top Left label Tool Bar tb new Tool Bar this SWT FLAT set Top Center tb f Tool Bar Manager new Tool Bar Manager tb  ViewerPane marginWidth marginHeight CLabel CLabel setTopLeft ToolBar ToolBar setTopCenter fToolBarManager ToolBarManager
Sets the receiver s title text param label the text public void set Text String label C Label cl C Label get Top Left cl set Text label  setText CLabel CLabel getTopLeft setText
public String get Text C Label cl C Label get Top Left return cl get Text  getText CLabel CLabel getTopLeft getText
Sets the receiver s title image param image the image public void set Image Image image C Label cl C Label get Top Left cl set Image image  setImage CLabel CLabel getTopLeft setImage
public Image get Image C Label cl C Label get Top Left return cl get Image  getImage CLabel CLabel getTopLeft getImage
public Tool Bar Manager get Tool Bar Manager return f Tool Bar Manager  ToolBarManager getToolBarManager fToolBarManager

Runs a workspace runnable with the given lock or code null code to run with no lock at all param runnable the workspace runnable param rule the scheduling rule public Workbench Runnable Adapter I Workspace Runnable runnable I Scheduling Rule rule Assert is Not Null runnable Assert is Not Null rule f Workspace Runnable runnable f Rule rule  WorkbenchRunnableAdapter IWorkspaceRunnable ISchedulingRule isNotNull isNotNull fWorkspaceRunnable fRule
public I Scheduling Rule get Scheduling Rule return f Rule  ISchedulingRule getSchedulingRule fRule
public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try Resources Plugin get Workspace run f Workspace Runnable f Rule I Workspace AVOID UPDATE monitor catch Operation Canceled Exception e throw new Interrupted Exception e get Message catch Core Exception e throw new Invocation Target Exception e  IProgressMonitor InvocationTargetException InterruptedException ResourcesPlugin getWorkspace fWorkspaceRunnable fRule IWorkspace AVOID_UPDATE OperationCanceledException InterruptedException getMessage CoreException InvocationTargetException

Creates a new input object for the given change param change the change object public Change Preview Viewer Input Change change Assert is Not Null change f Change change  ChangePreviewViewerInput isNotNull fChange
Returns the change of this input object return the change of this input object public Change get Change return f Change  getChange fChange

Creates the preview viewer s widget hierarchy This method is only called once Method code get Control code should be used to retrieve the widget hierarchy param parent the parent for the widget hierarchy see get Control  getControl getControl
Returns the preview viewer s SWT control return the preview viewer s SWT control or code null code is the widget hierarchy hasn t been created yet 
Sets the preview viewer s input element param input the input element 

Creates the status viewer s widget hierarchy This method is only called once Method code get Control code should be used to retrieve the widget hierarchy param parent the parent for the widget hierarchy see get Control  getControl getControl
Returns the status context viewer s SWT control return the status context viewer s SWT control or code null code is the widget hierarchy hasn t been created yet 
Sets the status context viewer s input element param input the input element 

Creates a new redo refactoring action public Redo Refactoring Action  RedoRefactoringAction
Method declared in Undo Manager Action protected String get Name return RefactoringUI Messages get String Redo Refactoring Action name NON NLS 1  UndoManagerAction getName RefactoringUIMessages getString RedoRefactoringAction
final I Validation Check Result Query query new Query parent RefactoringUI Messages get String Redo Refactoring Action error title NON NLS 1 protected String get Full Message String error Message return RefactoringUI Messages get Formatted String Redo Refactoring Action error message NON NLS 1 error Message  IValidationCheckResultQuery RefactoringUIMessages getString RedoRefactoringAction getFullMessage errorMessage RefactoringUIMessages getFormattedString RedoRefactoringAction errorMessage
return new I Runnable With Progress public void run I Progress Monitor pm throws Invocation Target Exception try Refactoring Core get Undo Manager perform Redo query pm catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IProgressMonitor InvocationTargetException RefactoringCore getUndoManager performRedo CoreException InvocationTargetException
protected I Runnable With Progress create Operation Shell parent final I Validation Check Result Query query new Query parent RefactoringUI Messages get String Redo Refactoring Action error title NON NLS 1 protected String get Full Message String error Message return RefactoringUI Messages get Formatted String Redo Refactoring Action error message NON NLS 1 error Message return new I Runnable With Progress public void run I Progress Monitor pm throws Invocation Target Exception try Refactoring Core get Undo Manager perform Redo query pm catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress createOperation IValidationCheckResultQuery RefactoringUIMessages getString RedoRefactoringAction getFullMessage errorMessage RefactoringUIMessages getFormattedString RedoRefactoringAction errorMessage IRunnableWithProgress IProgressMonitor InvocationTargetException RefactoringCore getUndoManager performRedo CoreException InvocationTargetException
return new Undo Manager Adapter public void redo Stack Changed I Undo Manager manager I Action action get Action if action null return boolean enabled false String text null if manager anything To Redo enabled true text get Action Text else text RefactoringUI Messages get String Redo Refactoring Action label NON NLS 1 action set Enabled enabled action set Text text  UndoManagerAdapter redoStackChanged IUndoManager IAction getAction anythingToRedo getActionText RefactoringUIMessages getString RedoRefactoringAction setEnabled setText
protected Undo Manager Adapter create Undo Manager Listener return new Undo Manager Adapter public void redo Stack Changed I Undo Manager manager I Action action get Action if action null return boolean enabled false String text null if manager anything To Redo enabled true text get Action Text else text RefactoringUI Messages get String Redo Refactoring Action label NON NLS 1 action set Enabled enabled action set Text text  UndoManagerAdapter createUndoManagerListener UndoManagerAdapter redoStackChanged IUndoManager IAction getAction anythingToRedo getActionText RefactoringUIMessages getString RedoRefactoringAction setEnabled setText
public void selection Changed I Action action I Selection s if is Hooked hook Listener action f Pattern Length RefactoringUI Messages get String Redo Refactoring Action extended Label length NON NLS 1 I Undo Manager undo Manager Refactoring Core get Undo Manager if undo Manager anything To Redo if undo Manager peek Redo Name null action set Text get Action Text action set Enabled true else action set Enabled false  selectionChanged IAction ISelection isHooked hookListener fPatternLength RefactoringUIMessages getString RedoRefactoringAction extendedLabel IUndoManager undoManager RefactoringCore getUndoManager undoManager anythingToRedo undoManager peekRedoName setText getActionText setEnabled setEnabled
private String get Action Text return shorten Text RefactoringUI Messages get Formatted String Redo Refactoring Action extended Label NON NLS 1 Refactoring Core get Undo Manager peek Redo Name f Pattern Length  getActionText shortenText RefactoringUIMessages getFormattedString RedoRefactoringAction extendedLabel RefactoringCore getUndoManager peekRedoName fPatternLength

public class RefactoringUI private RefactoringUI no instance 
Creates a dialog to present a link Refactoring Status to the user The following values are returned from the dialogs open method ul li link org eclipse jface dialogs I Dialog Constants OK ID I Dialog Constants OK ID if the user has pressed the continue button li li link org eclipse jface dialogs I Dialog Constants CANCEL ID I Dialog Constants CANCEL ID if the user has pressed the cancel button li li link org eclipse jface dialogs I Dialog Constants BACK ID I Dialog Constants BACK ID if the user has pressed the back button li ul param status the status to present param parent the parent shell of the dialog May be code null code if the dialog is a top level dialog param window Title the dialog s window title param back Button if code true code the dialog will contain a back button otherwise no back button will be present return a dialog to present a refactoring status public static Dialog create Refactoring Status Dialog Refactoring Status status Shell parent String window Title boolean back Button return new Refactoring Status Dialog status parent window Title back Button  RefactoringStatus IDialogConstants OK_ID IDialogConstants OK_ID IDialogConstants CANCEL_ID IDialogConstants CANCEL_ID IDialogConstants BACK_ID IDialogConstants BACK_ID windowTitle backButton createRefactoringStatusDialog RefactoringStatus windowTitle backButton RefactoringStatusDialog windowTitle backButton
Creates a dialog capable to present the given refactoring wizard Clients of this method can assume that the returned dialog is an instance of link org eclipse jface wizard I Wizard Container I Wizard Container However the dialog is not necessarily an instance of link org eclipse jface wizard Wizard Dialog Wizard Dialog param wizard the refactoring wizard to create a dialog for param parent the parent of the created dialog or code null code to create a top level dialog return the dialog package static Dialog create Refactoring Wizard Dialog Refactoring Wizard wizard Shell parent Dialog result if wizard needs Wizard Based User Interface result new Refactoring Wizard Dialog parent wizard else result new Refactoring Wizard Dialog2 parent wizard return result  IWizardContainer IWizardContainer WizardDialog WizardDialog createRefactoringWizardDialog RefactoringWizard needsWizardBasedUserInterface RefactoringWizardDialog RefactoringWizardDialog2
Creates a special perform change operations that knows how to batch undo operations in open editors into one undo object The operation batches the undo operations for those editors that implement the interface link org eclipse jface text I Rewrite Target param change the change to perform return a special perform change operation that knows how to batch undo operations for open editors if they implement code I Rewrite Target code public static Perform Change Operation createUI Aware Change Operation Change change return new UI Perform Change Operation null change null  IRewriteTarget IRewriteTarget PerformChangeOperation createUIAwareChangeOperation UIPerformChangeOperation

Creates a new refactoring wizard for the given refactoring param refactoring the refactoring the wizard is presenting param flags flags specifying the behaviour of the wizard If neither code WIZARD BASED USER INTERFACE code nor code DIALOG BASED UESR INTERFACE code is specified then code WIZARD BASED USER INTERFACE code will be taken as a default public Refactoring Wizard Refactoring refactoring int flags Assert is Not Null refactoring Assert is True flags LAST if flags DIALOG BASED UESR INTERFACE 0 flags WIZARD BASED USER INTERFACE Assert is True flags DIALOG BASED UESR INTERFACE 0 flags WIZARD BASED USER INTERFACE 0 f Refactoring refactoring f Flags flags set Needs Progress Monitor true set Change Creation Cancelable true set Window Title RefactoringUI Messages get String Refactoring Wizard title NON NLS 1 set Default Page Image Descriptor Refactoring Plugin Images DESC WIZBAN REFACTOR  WIZARD_BASED_USER_INTERFACE DIALOG_BASED_UESR_INTERFACE WIZARD_BASED_USER_INTERFACE RefactoringWizard isNotNull isTrue DIALOG_BASED_UESR_INTERFACE WIZARD_BASED_USER_INTERFACE isTrue DIALOG_BASED_UESR_INTERFACE WIZARD_BASED_USER_INTERFACE fRefactoring fFlags setNeedsProgressMonitor setChangeCreationCancelable setWindowTitle RefactoringUIMessages getString RefactoringWizard setDefaultPageImageDescriptor RefactoringPluginImages DESC_WIZBAN_REFACTOR
Returns the refactoring this wizard is associated with return the wizard s refactoring public final Refactoring get Refactoring return f Refactoring  getRefactoring fRefactoring
Sets the default page title to the given value This value is used as a page title for wizard pages which don t provide their own page title Setting this value has only an effect as long as the user interface hasn t been created yet param default Page Title the default page title see Wizard set Default Page Image Descriptor org eclipse jface resource Image Descriptor public final void set Default Page Title String default Page Title Assert is Not Null default Page Title f Default Page Title default Page Title  defaultPageTitle setDefaultPageImageDescriptor ImageDescriptor setDefaultPageTitle defaultPageTitle isNotNull defaultPageTitle fDefaultPageTitle defaultPageTitle
Returns the default page title used for pages that don t provide their own page title return the default page title or code null code if non has been set see set Default Page Title String public final String get Default Page Title return f Default Page Title  setDefaultPageTitle getDefaultPageTitle fDefaultPageTitle
If set to code true code the Finish or OK button respectively will be disabled until the user has visited the preview page If set to code false code the refactoring can be performed before the preview page has been visited param force Preview Review if code true code to user must confirm the preview public final void set Force Preview Review boolean force Preview Review f Force Preview Review force Preview Review get Container update Buttons  forcePreviewReview setForcePreviewReview forcePreviewReview fForcePreviewReview forcePreviewReview getContainer updateButtons
Returns the width in characters to be used for the message line embedded into the refactoring wizard dialog p Subclasses may override this method and return a different value p return the message lines width in characters public int get Message Line Width In Chars return 80  getMessageLineWidthInChars
If set to code true code the change creation is cancelable by the user p By default change creation is cancelable p param is Change Creation Cancelable determines whether the change creation is cancelable by the user or not see Refactoring create Change I Progress Monitor public final void set Change Creation Cancelable boolean is Change Creation Cancelable f Is Change Creation Cancelable is Change Creation Cancelable  isChangeCreationCancelable createChange IProgressMonitor setChangeCreationCancelable isChangeCreationCancelable fIsChangeCreationCancelable isChangeCreationCancelable
Sets the initial condition checking status computed by the refactoring Clients should uses this method if the initial condition checking status has been computed outside of this refactoring wizard param status the initial condition checking status see Refactoring check Initial Conditions I Progress Monitor see CHECK INITIAL CONDITIONS ON OPEN public final void set Initial Condition Checking Status Refactoring Status status Assert is Not Null status f Initial Condition Checking Status status set Condition Checking Status status  checkInitialConditions IProgressMonitor CHECK_INITIAL_CONDITIONS_ON_OPEN setInitialConditionCheckingStatus RefactoringStatus isNotNull fInitialConditionCheckingStatus setConditionCheckingStatus
Returns the refactoring s change object or code null code if no change object has been created yet return the refactoring s change object or code null code see Refactoring create Change I Progress Monitor public final Change get Change return f Change  createChange IProgressMonitor getChange fChange
Returns the status of the initial condition checking or code null code if the initial condition checking hasn t been performed yet return the status of the initial condition checking or code null code see Refactoring check Initial Conditions I Progress Monitor package final Refactoring Status get Initial Condition Checking Status return f Initial Condition Checking Status  checkInitialConditions IProgressMonitor RefactoringStatus getInitialConditionCheckingStatus fInitialConditionCheckingStatus
Returns code true code if the wizard needs a wizard based user interface Otherwise code false code is returned return whether the wizard needs a wizard based user interface or not package boolean needs Wizard Based User Interface return f Flags WIZARD BASED USER INTERFACE 0  needsWizardBasedUserInterface fFlags WIZARD_BASED_USER_INTERFACE
inherit Doc This method calls the hook method link add User Input Pages to allow subclasses to add specific user input pages public final void add Pages Assert is Not Null f Refactoring try f In Add Pages true if check Activation On Open internal Check Condition Check Conditions Operation INITIAL CONDITONS if f Initial Condition Checking Status has Fatal Error add Error Page Set the status since we added the error page set Condition Checking Status get Condition Checking Status else Assert is True get Page Count 0 add User Input Pages f User Input Pages get Page Count if f User Input Pages 0 I Wizard Page pages get Pages User Input Wizard Page pages f User Input Pages 1 mark As Last User Input Page if f User Input Pages 1 Assert is True f Flags WIZARD BASED USER INTERFACE 0 add Error Page add Preview Page initialize Default Page Titles finally f In Add Pages false  inheritDoc addUserInputPages addPages isNotNull fRefactoring fInAddPages checkActivationOnOpen internalCheckCondition CheckConditionsOperation INITIAL_CONDITONS fInitialConditionCheckingStatus hasFatalError addErrorPage setConditionCheckingStatus getConditionCheckingStatus isTrue getPageCount addUserInputPages fUserInputPages getPageCount fUserInputPages IWizardPage getPages UserInputWizardPage fUserInputPages markAsLastUserInputPage fUserInputPages isTrue fFlags WIZARD_BASED_USER_INTERFACE addErrorPage addPreviewPage initializeDefaultPageTitles fInAddPages
inherit Doc This method asserts that the pages added to the refactoring wizard are instances of type link Refactoring Wizard Page public final void add Page I Wizard Page page Assert is True page instanceof Refactoring Wizard Page f In Add Pages super add Page page  inheritDoc RefactoringWizardPage addPage IWizardPage isTrue RefactoringWizardPage fInAddPages addPage
Hook method to add user input pages to this refactoring wizard Pages added via this call have to be instances of the type link User Input Wizard Page Adding pages of a different kind is not permitted and will result in unexpected behaviour  UserInputWizardPage
protected abstract void add User Input Pages private void add Error Page add Page new Error Wizard Page  addUserInputPages addErrorPage addPage ErrorWizardPage
private void add Preview Page add Page new Preview Wizard Page  addPreviewPage addPage PreviewWizardPage
private boolean has User Input return f User Input Pages 0  hasUserInput fUserInputPages
private void initialize Default Page Titles if f Default Page Title null return I Wizard Page pages get Pages for int i 0 i pages length i I Wizard Page page pages i if page get Title null page set Title f Default Page Title  initializeDefaultPageTitles fDefaultPageTitle IWizardPage getPages IWizardPage getTitle setTitle fDefaultPageTitle
inherit Doc public I Wizard Page get Starting Page if has User Input return super get Starting Page return compute User Input Successor Page null PlatformUI get Workbench get Active Workbench Window  inheritDoc IWizardPage getStartingPage hasUserInput getStartingPage computeUserInputSuccessorPage getWorkbench getActiveWorkbenchWindow
inherit Doc public I Wizard Page get Previous Page I Wizard Page page if has User Input return super get Previous Page page if page get Name equals Error Wizard Page PAGE NAME if f Condition Checking Status isOK return null return super get Previous Page page  inheritDoc IWizardPage getPreviousPage IWizardPage hasUserInput getPreviousPage getName ErrorWizardPage PAGE_NAME fConditionCheckingStatus getPreviousPage
package I Wizard Page compute User Input Successor Page I Wizard Page caller I Runnable Context context Change change create Change new Create Change Operation new Check Conditions Operation f Refactoring Check Conditions Operation FINAL CONDITIONS Refactoring Status FATAL true context Status has been updated since we have passed true Refactoring Status status get Condition Checking Status Creating the change has been canceled if change null status null internal Set Change InternalAPI INSTANCE change return caller Set change if we don t have fatal errors if status has Fatal Error internal Set Change InternalAPI INSTANCE change if status isOK return get Page I Preview Wizard Page PAGE NAME else return get Page Error Wizard Page PAGE NAME  IWizardPage computeUserInputSuccessorPage IWizardPage IRunnableContext createChange CreateChangeOperation CheckConditionsOperation fRefactoring CheckConditionsOperation FINAL_CONDITIONS RefactoringStatus RefactoringStatus getConditionCheckingStatus internalSetChange hasFatalError internalSetChange getPage IPreviewWizardPage PAGE_NAME getPage ErrorWizardPage PAGE_NAME
inherit Doc public boolean can Finish if f Force Preview Review f Preview Shown return false return super can Finish  inheritDoc canFinish fForcePreviewReview fPreviewShown canFinish
Condition checking package final Refactoring Status check Final Conditions return internal Check Condition Check Conditions Operation FINAL CONDITIONS  RefactoringStatus checkFinalConditions internalCheckCondition CheckConditionsOperation FINAL_CONDITIONS
private Refactoring Status internal Check Condition int style Check Conditions Operation op new Check Conditions Operation f Refactoring style Exception exception null try PlatformUI get Workbench get Progress Service busy Cursor While new Workbench Runnable Adapter op Resources Plugin get Workspace get Root catch Interrupted Exception e exception e catch Invocation Target Exception e exception e Refactoring Status status null if exception null RefactoringUI Plugin log exception status new Refactoring Status status add Fatal Error RefactoringUI Messages get String Refactoring Wizard internal error 1 NON NLS 1 else status op get Status set Condition Checking Status status style return status  RefactoringStatus internalCheckCondition CheckConditionsOperation CheckConditionsOperation fRefactoring getWorkbench getProgressService busyCursorWhile WorkbenchRunnableAdapter ResourcesPlugin getWorkspace getRoot InterruptedException InvocationTargetException RefactoringStatus RefactoringUIPlugin RefactoringStatus addFatalError RefactoringUIMessages getString RefactoringWizard internal_error_1 getStatus setConditionCheckingStatus
private void set Condition Checking Status Refactoring Status status int style if style Check Conditions Operation ALL CONDITIONS Check Conditions Operation ALL CONDITIONS set Condition Checking Status status else if style Check Conditions Operation INITIAL CONDITONS Check Conditions Operation INITIAL CONDITONS set Initial Condition Checking Status status else if style Check Conditions Operation FINAL CONDITIONS Check Conditions Operation FINAL CONDITIONS set Final Condition Checking Status status  setConditionCheckingStatus RefactoringStatus CheckConditionsOperation ALL_CONDITIONS CheckConditionsOperation ALL_CONDITIONS setConditionCheckingStatus CheckConditionsOperation INITIAL_CONDITONS CheckConditionsOperation INITIAL_CONDITONS setInitialConditionCheckingStatus CheckConditionsOperation FINAL_CONDITIONS CheckConditionsOperation FINAL_CONDITIONS setFinalConditionCheckingStatus
private Refactoring Status get Condition Checking Status return f Condition Checking Status  RefactoringStatus getConditionCheckingStatus fConditionCheckingStatus
Sets the refactoring status param status the refactoring status to set package final void set Condition Checking Status Refactoring Status status Error Wizard Page page Error Wizard Page get Page Error Wizard Page PAGE NAME if page null page set Status status f Condition Checking Status status  setConditionCheckingStatus RefactoringStatus ErrorWizardPage ErrorWizardPage getPage ErrorWizardPage PAGE_NAME setStatus fConditionCheckingStatus
Sets the refactoring status returned from final condition checking Any previously computed initial status is merged into the given status before it is set to the error page param status the final condition checking status to set private void set Final Condition Checking Status Refactoring Status status Refactoring Status new Status new Refactoring Status if f Initial Condition Checking Status null new Status merge f Initial Condition Checking Status new Status merge status set Condition Checking Status new Status  setFinalConditionCheckingStatus RefactoringStatus RefactoringStatus newStatus RefactoringStatus fInitialConditionCheckingStatus newStatus fInitialConditionCheckingStatus newStatus setConditionCheckingStatus newStatus
Note This method is for internal use only Clients are not allowed to call this method param api internal instance to avoid access from external clients param operation the create change operation param update Status flag indicating if status updating is requested return the created change public final Change internal Create Change InternalAPI api Create Change Operation operation boolean update Status Assert is Not Null api return create Change operation update Status get Container  updateStatus internalCreateChange CreateChangeOperation updateStatus isNotNull createChange updateStatus getContainer
Note This method is for internal use only Clients are not allowed to call this method param api internal instance to avoid access from external clients param op the perform change operation return whether the finish ended OK or not public final Finish Result internal Perform Finish InternalAPI api Perform Change Operation op op set Undo Manager Refactoring Core get Undo Manager f Refactoring get Name Shell parent get Container get Shell try get Container run true true new Workbench Runnable Adapter op Resources Plugin get Workspace get Root catch Invocation Target Exception e Throwable inner e get Target Exception if op change Execution Failed Change Exception Handler handler new Change Exception Handler parent f Refactoring if inner instanceof Runtime Exception handler handle op get Change Runtime Exception inner return Finish Result create Exception else if inner instanceof Core Exception handler handle op get Change Core Exception inner return Finish Result create Exception Exception Handler handle e parent RefactoringUI Messages get String Refactoring Wizard refactoring NON NLS 1 RefactoringUI Messages get String Refactoring Wizard unexpected exception 1 NON NLS 1 return Finish Result create Exception catch Interrupted Exception e return Finish Result create Interrupted return Finish Result createOK  FinishResult internalPerformFinish PerformChangeOperation setUndoManager RefactoringCore getUndoManager fRefactoring getName getContainer getShell getContainer WorkbenchRunnableAdapter ResourcesPlugin getWorkspace getRoot InvocationTargetException getTargetException changeExecutionFailed ChangeExceptionHandler ChangeExceptionHandler fRefactoring RuntimeException getChange RuntimeException FinishResult createException CoreException getChange CoreException FinishResult createException ExceptionHandler RefactoringUIMessages getString RefactoringWizard RefactoringUIMessages getString RefactoringWizard unexpected_exception_1 FinishResult createException InterruptedException FinishResult createInterrupted FinishResult
private Change create Change Create Change Operation operation boolean update Status I Runnable Context context Invocation Target Exception exception null try context run true f Is Change Creation Cancelable new Workbench Runnable Adapter operation Resources Plugin get Workspace get Root catch Interrupted Exception e set Condition Checking Status null return null catch Invocation Target Exception e exception e if update Status Refactoring Status status null if exception null status new Refactoring Status String msg exception get Message if msg null status add Fatal Error RefactoringUI Messages get Formatted String Refactoring Wizard see log msg NON NLS 1 else status add Fatal Error RefactoringUI Messages get String Refactoring Wizard Internal error NON NLS 1 RefactoringUI Plugin log exception else status operation get Condition Checking Status set Condition Checking Status status operation get Condition Checking Style else if exception null Exception Handler handle exception get Container get Shell RefactoringUI Messages get String Refactoring Wizard refactoring NON NLS 1 RefactoringUI Messages get String Refactoring Wizard unexpected exception NON NLS 1 Change change operation get Change return change  createChange CreateChangeOperation updateStatus IRunnableContext InvocationTargetException fIsChangeCreationCancelable WorkbenchRunnableAdapter ResourcesPlugin getWorkspace getRoot InterruptedException setConditionCheckingStatus InvocationTargetException updateStatus RefactoringStatus RefactoringStatus getMessage addFatalError RefactoringUIMessages getFormattedString RefactoringWizard see_log addFatalError RefactoringUIMessages getString RefactoringWizard Internal_error RefactoringUIPlugin getConditionCheckingStatus setConditionCheckingStatus getConditionCheckingStyle ExceptionHandler getContainer getShell RefactoringUIMessages getString RefactoringWizard RefactoringUIMessages getString RefactoringWizard unexpected_exception getChange
public boolean perform Finish Assert is Not Null f Refactoring Refactoring Wizard Page page Refactoring Wizard Page get Container get Current Page return page perform Finish  performFinish isNotNull fRefactoring RefactoringWizardPage RefactoringWizardPage getContainer getCurrentPage performFinish
Note This method is for internal use only Clients are not allowed to call this method param api internal instance to avoid access from external clients return whether the wizard has a preview page or not public final boolean internal Has Preview Page InternalAPI api Assert is Not Null api return f Flags NO PREVIEW PAGE 0  internalHasPreviewPage isNotNull fFlags NO_PREVIEW_PAGE
Note This method is for internal use only Clients are not allowed to call this method param api internal instance to avoid access from external clients return whether yes no button style is requested public final boolean internal Is Yes No Style InternalAPI api Assert is Not Null api return f Flags YES NO BUTTON STYLE 0  internalIsYesNoStyle isNotNull fFlags YES_NO_BUTTON_STYLE
Note This method is for internal use only Clients are not allowed to call this method param api internal instance to avoid access from external clients return whether the first node of the preview is supposed to be expanded public final boolean internal Get Expand First Node InternalAPI api Assert is Not Null api return f Flags PREVIEW EXPAND FIRST NODE 0  internalGetExpandFirstNode isNotNull fFlags PREVIEW_EXPAND_FIRST_NODE
Note This method is for internal use only Clients are not allowed to call this method param api internal instance to avoid access from external clients param change the change to set public final void internal Set Change InternalAPI api Change change Assert is Not Null api I Preview Wizard Page page I Preview Wizard Page get Page I Preview Wizard Page PAGE NAME if page null page set Change change f Change change  internalSetChange isNotNull IPreviewWizardPage IPreviewWizardPage getPage IPreviewWizardPage PAGE_NAME setChange fChange
Note This method is for internal use only Clients are not allowed to call this method param api internal instance to avoid access from external clients param shown a boolean indicating if the preview page has been shown or not public final void internal Set Preview Shown InternalAPI api boolean shown Assert is Not Null api f Preview Shown shown get Container update Buttons  internalSetPreviewShown isNotNull fPreviewShown getContainer updateButtons
Note This method is for internal use only Clients are not allowed to call this method param api internal instance to avoid access from external clients return whether to show a back button or not public final boolean internal Show Back Button On Status Dialog InternalAPI api Assert is Not Null api return f Flags NO BACK BUTTON ON STATUS DIALOG 0  internalShowBackButtonOnStatusDialog isNotNull fFlags NO_BACK_BUTTON_ON_STATUS_DIALOG
Helper methods to check style bits private boolean check Activation On Open return f Flags CHECK INITIAL CONDITIONS ON OPEN 0  checkActivationOnOpen fFlags CHECK_INITIAL_CONDITIONS_ON_OPEN

Creates a new refactoring wizard starter for the given wizard param wizard the wizard to open a dialog for public Refactoring Wizard Open Operation Refactoring Wizard wizard Assert is Not Null wizard f Wizard wizard  RefactoringWizardOpenOperation RefactoringWizard isNotNull fWizard
Returns the outcome of the initial condition checking return the outcome of the initial condition checking or code null code if the condition checking hasn t been performed yet public Refactoring Status get Initial Condition Checking Status return f Initial Conditions  RefactoringStatus getInitialConditionCheckingStatus fInitialConditions
Runnable r new Runnable public void run try we are getting the block dialog for free if we pass in null manager suspend Resources Plugin get Workspace get Root null refactoring set Validation Context parent f Initial Conditions check Initial Conditions refactoring parent dialog Title if f Initial Conditions has Fatal Error String message f Initial Conditions get Message Matching Severity Refactoring Status FATAL Message Dialog open Information parent dialog Title message result 0 INITIAL CONDITION CHECKING FAILED return else f Wizard set Initial Condition Checking Status f Initial Conditions Dialog dialog RefactoringUI create Refactoring Wizard Dialog f Wizard parent result 0 dialog open return catch Interrupted Exception e canceled 0 e catch Operation Canceled Exception e canceled 0 new Interrupted Exception e get Message finally manager resume Resources Plugin get Workspace get Root refactoring set Validation Context null  ResourcesPlugin getWorkspace getRoot setValidationContext fInitialConditions checkInitialConditions dialogTitle fInitialConditions hasFatalError fInitialConditions getMessageMatchingSeverity RefactoringStatus MessageDialog openInformation dialogTitle INITIAL_CONDITION_CHECKING_FAILED fWizard setInitialConditionCheckingStatus fInitialConditions createRefactoringWizardDialog fWizard InterruptedException OperationCanceledException InterruptedException getMessage ResourcesPlugin getWorkspace getRoot setValidationContext
Opens the refactoring dialog for the refactoring wizard passed to the constructor The method first checks the initial conditions of the refactoring If the condition checking returns a status with a severity of link Refactoring Status FATAL then a message dialog is opened containing the corresponding status message No wizard dialog is opened in this situation If the condition checking passes then the refactoring dialog is opened param parent the parent shell for the dialog or code null code if the dialog is a top level dialog param dialog Title the dialog title of the message box presenting the failed condition check if any return link INITIAL CONDITION CHECKING FAILED if the initial condition checking failed and no wizard dialog was presented Otherwise either link I Dialog Constants OK ID or link I Dialog Constants CANCEL ID is returned depending on whether the user has pressed the OK or cancel button on the wizard dialog throws Interrupted Exception if the initial condition checking got cancelled by the user public int run final Shell parent final String dialog Title throws Interrupted Exception Assert is Not Null dialog Title final Refactoring refactoring f Wizard get Refactoring final I Job Manager manager Platform get Job Manager final int result new int 1 final Interrupted Exception canceled new Interrupted Exception 1 Runnable r new Runnable public void run try we are getting the block dialog for free if we pass in null manager suspend Resources Plugin get Workspace get Root null refactoring set Validation Context parent f Initial Conditions check Initial Conditions refactoring parent dialog Title if f Initial Conditions has Fatal Error String message f Initial Conditions get Message Matching Severity Refactoring Status FATAL Message Dialog open Information parent dialog Title message result 0 INITIAL CONDITION CHECKING FAILED return else f Wizard set Initial Condition Checking Status f Initial Conditions Dialog dialog RefactoringUI create Refactoring Wizard Dialog f Wizard parent result 0 dialog open return catch Interrupted Exception e canceled 0 e catch Operation Canceled Exception e canceled 0 new Interrupted Exception e get Message finally manager resume Resources Plugin get Workspace get Root refactoring set Validation Context null Busy Indicator show While parent get Display r if canceled 0 null throw canceled 0 return result 0  RefactoringStatus dialogTitle INITIAL_CONDITION_CHECKING_FAILED IDialogConstants OK_ID IDialogConstants CANCEL_ID InterruptedException dialogTitle InterruptedException isNotNull dialogTitle fWizard getRefactoring IJobManager getJobManager InterruptedException InterruptedException ResourcesPlugin getWorkspace getRoot setValidationContext fInitialConditions checkInitialConditions dialogTitle fInitialConditions hasFatalError fInitialConditions getMessageMatchingSeverity RefactoringStatus MessageDialog openInformation dialogTitle INITIAL_CONDITION_CHECKING_FAILED fWizard setInitialConditionCheckingStatus fInitialConditions createRefactoringWizardDialog fWizard InterruptedException OperationCanceledException InterruptedException getMessage ResourcesPlugin getWorkspace getRoot setValidationContext BusyIndicator showWhile getDisplay
private Refactoring Status check Initial Conditions Refactoring refactoring Shell parent String title throws Interrupted Exception try Check Conditions Operation cco new Check Conditions Operation refactoring Check Conditions Operation INITIAL CONDITONS I Progress Service service PlatformUI get Workbench get Progress Service service busy Cursor While new Workbench Runnable Adapter cco Resources Plugin get Workspace get Root return cco get Status catch Invocation Target Exception e Exception Handler handle e parent title RefactoringUI Messages get String RefactoringUI open unexpected exception NON NLS 1 return Refactoring Status create Fatal Error Status RefactoringUI Messages get String RefactoringUI open unexpected exception NON NLS 1  RefactoringStatus checkInitialConditions InterruptedException CheckConditionsOperation CheckConditionsOperation CheckConditionsOperation INITIAL_CONDITONS IProgressService getWorkbench getProgressService busyCursorWhile WorkbenchRunnableAdapter ResourcesPlugin getWorkspace getRoot getStatus InvocationTargetException ExceptionHandler RefactoringUIMessages getString unexpected_exception RefactoringStatus createFatalErrorStatus RefactoringUIMessages getString unexpected_exception

Creates a new refactoring wizard page param name the page s name see org eclipse jface wizard I Wizard Page get Name protected Refactoring Wizard Page String name super name  IWizardPage getName RefactoringWizardPage
inherit Doc This method asserts that the wizard passed as a parameter is of type code Refactoring Wizard code public void set Wizard I Wizard new Wizard Assert is True new Wizard instanceof Refactoring Wizard super set Wizard new Wizard  inheritDoc RefactoringWizard setWizard IWizard newWizard isTrue newWizard RefactoringWizard setWizard newWizard
Returns the refactoring associated with this wizard page Returns code null code if the page isn t been added to any refactoring wizard yet return the refactoring associated with this refactoring wizard page or code null code protected Refactoring get Refactoring Refactoring Wizard wizard get Refactoring Wizard if wizard null return null return wizard get Refactoring  getRefactoring RefactoringWizard getRefactoringWizard getRefactoring
Returns the page s refactoring wizard return the page s refactoring wizard or code null code if the wizard hasn t been set yet protected Refactoring Wizard get Refactoring Wizard return Refactoring Wizard get Wizard  RefactoringWizard getRefactoringWizard RefactoringWizard getWizard
Performs any actions appropriate in response to the user having pressed the Finish button or refuse if finishing now is not permitted This method is called by the refactoring wizard on the currently active refactoring wizard page return code true code to indicate the finish request was accepted and code false code to indicate that the finish request was refused protected boolean perform Finish return true  performFinish
Returns the refactoring wizard s dialog settings return the refactoring wizard s dialog settings or code null code if no settings are associated with the refactoring wizard dialog protected I Dialog Settings get Refactoring Settings I Dialog Settings settings get Dialog Settings if settings null return null I Dialog Settings result settings get Section REFACTORING SETTINGS if result null result new Dialog Settings REFACTORING SETTINGS settings add Section result return result  IDialogSettings getRefactoringSettings IDialogSettings getDialogSettings IDialogSettings getSection REFACTORING_SETTINGS DialogSettings REFACTORING_SETTINGS addSection

Returns the internal source viewer return the internal source viewer or code null code if the source viewer hasn t been created yet protected Source Viewer get Source Viewer return f Source Viewer  SourceViewer getSourceViewer fSourceViewer
Hook to create the source viewer used to present the textual context information param parent the composite to be used as the source viewer s parent return the source viewer to be used 
Updates the title image and text of the pane surrounding the source viewer The image and text is determined by retrieving the code I Workbench Adapter code for the given element If the element doen t provide a code I Workbench Adapter code or if the element is code null code the image is reseted and a default label is shown param element the element providing the image and label for the title Can be code null code to reset the image and text protected void update Title I Adaptable element String title null Image Descriptor image Descriptor null if element null I Workbench Adapter adapter I Workbench Adapter element get Adapter I Workbench Adapter class if adapter null title adapter get Label element image Descriptor adapter get Image Descriptor element if title null title length 0 title RefactoringUI Messages get String Refactoring Status Viewer Problem context NON NLS 1 f Label set Text title if f Pane Image null f Pane Image dispose f Pane Image null if image Descriptor null f Pane Image image Descriptor create Image get Control get Display f Label set Image f Pane Image  IWorkbenchAdapter IWorkbenchAdapter updateTitle IAdaptable ImageDescriptor imageDescriptor IWorkbenchAdapter IWorkbenchAdapter getAdapter IWorkbenchAdapter getLabel imageDescriptor getImageDescriptor RefactoringUIMessages getString RefactoringStatusViewer Problem_context fLabel setText fPaneImage fPaneImage fPaneImage imageDescriptor fPaneImage imageDescriptor createImage getControl getDisplay fLabel setImage fPaneImage
Sets the input of the source viewer to the given document and reveals the region determined by the given parameter region param document the document to present param region the region to reveal protected void set Input I Document document I Region region Control ctrl get Control if ctrl null ctrl is Disposed ctrl null try if ctrl null ctrl set Redraw false f Source Viewer set Input document if region null document null int offset region get Offset int length region get Length if offset 0 length 0 f Source Viewer set Selected Range offset length f Source Viewer reveal Range offset length finally if ctrl null ctrl set Redraw true  setInput IDocument IRegion getControl isDisposed setRedraw fSourceViewer setInput getOffset getLength fSourceViewer setSelectedRange fSourceViewer revealRange setRedraw
f Form set Top Left f Label f Form add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Pane Image null f Pane Image dispose  fForm setTopLeft fLabel fForm addDisposeListener DisposeListener widgetDisposed DisposeEvent fPaneImage fPaneImage
inherit Doc public void create Control Composite parent f Form new View Form parent SWT BORDER SWT FLAT f Form margin Width 0 f Form margin Height 0 f Label new C Label f Form SWT NONE f Form set Top Left f Label f Form add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Pane Image null f Pane Image dispose f Source Viewer create Source Viewer f Form f Source Viewer set Editable false f Form set Content f Source Viewer get Control  inheritDoc createControl fForm ViewForm fForm marginWidth fForm marginHeight fLabel CLabel fForm fForm setTopLeft fLabel fForm addDisposeListener DisposeListener widgetDisposed DisposeEvent fPaneImage fPaneImage fSourceViewer createSourceViewer fForm fSourceViewer setEditable fForm setContent fSourceViewer getControl
inherit Doc public Control get Control return f Form  inheritDoc getControl fForm

Creates a new undo refactoring action public Undo Refactoring Action  UndoRefactoringAction
Method declared in Undo Manager Action protected String get Name PR 1GEWDUH ITPJCORE WINNT Refactoring Unable to undo refactor change return RefactoringUI Messages get String Undo Refactoring Action name NON NLS 1  UndoManagerAction getName RefactoringUIMessages getString UndoRefactoringAction
final I Validation Check Result Query query new Query parent RefactoringUI Messages get String Undo Refactoring Action error title NON NLS 1 protected String get Full Message String error Message return RefactoringUI Messages get Formatted String Undo Refactoring Action error message NON NLS 1 error Message  IValidationCheckResultQuery RefactoringUIMessages getString UndoRefactoringAction getFullMessage errorMessage RefactoringUIMessages getFormattedString UndoRefactoringAction errorMessage
return new I Runnable With Progress public void run I Progress Monitor pm throws Invocation Target Exception try Refactoring Core get Undo Manager perform Undo query pm catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IProgressMonitor InvocationTargetException RefactoringCore getUndoManager performUndo CoreException InvocationTargetException
protected I Runnable With Progress create Operation Shell parent final I Validation Check Result Query query new Query parent RefactoringUI Messages get String Undo Refactoring Action error title NON NLS 1 protected String get Full Message String error Message return RefactoringUI Messages get Formatted String Undo Refactoring Action error message NON NLS 1 error Message return new I Runnable With Progress public void run I Progress Monitor pm throws Invocation Target Exception try Refactoring Core get Undo Manager perform Undo query pm catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress createOperation IValidationCheckResultQuery RefactoringUIMessages getString UndoRefactoringAction getFullMessage errorMessage RefactoringUIMessages getFormattedString UndoRefactoringAction errorMessage IRunnableWithProgress IProgressMonitor InvocationTargetException RefactoringCore getUndoManager performUndo CoreException InvocationTargetException
return new Undo Manager Adapter public void undo Stack Changed I Undo Manager manager I Action action get Action if action null return boolean enabled false String text null if manager anything To Undo enabled true text get Action Text else text RefactoringUI Messages get String Undo Refactoring Action label NON NLS 1 action set Enabled enabled action set Text text  UndoManagerAdapter undoStackChanged IUndoManager IAction getAction anythingToUndo getActionText RefactoringUIMessages getString UndoRefactoringAction setEnabled setText
protected Undo Manager Adapter create Undo Manager Listener return new Undo Manager Adapter public void undo Stack Changed I Undo Manager manager I Action action get Action if action null return boolean enabled false String text null if manager anything To Undo enabled true text get Action Text else text RefactoringUI Messages get String Undo Refactoring Action label NON NLS 1 action set Enabled enabled action set Text text  UndoManagerAdapter createUndoManagerListener UndoManagerAdapter undoStackChanged IUndoManager IAction getAction anythingToUndo getActionText RefactoringUIMessages getString UndoRefactoringAction setEnabled setText
public void selection Changed I Action action I Selection s if is Hooked hook Listener action f Pattern Length RefactoringUI Messages get String Undo Refactoring Action extended Label length NON NLS 1 I Undo Manager undo Manager Refactoring Core get Undo Manager if undo Manager anything To Undo if undo Manager peek Undo Name null action set Text get Action Text action set Enabled true else action set Enabled false  selectionChanged IAction ISelection isHooked hookListener fPatternLength RefactoringUIMessages getString UndoRefactoringAction extendedLabel IUndoManager undoManager RefactoringCore getUndoManager undoManager anythingToUndo undoManager peekUndoName setText getActionText setEnabled setEnabled
private String get Action Text return shorten Text RefactoringUI Messages get Formatted String Undo Refactoring Action extended Label NON NLS 1 Refactoring Core get Undo Manager peek Undo Name f Pattern Length  getActionText shortenText RefactoringUIMessages getFormattedString UndoRefactoringAction extendedLabel RefactoringCore getUndoManager peekUndoName fPatternLength

Creates a new user input page param name the page s name public User Input Wizard Page String name super name  UserInputWizardPage
Returns code true code if this is the last user input page in the stack of input pages code false code otherwise The last user input page is not necessarily the page after which the refactoring s precondition has to be triggered For wizards implementing a dynamic work flow this may happen for other pages as well return whether this is the last user input page or not public boolean is Last User Input Page return f Is Last User Input Page  isLastUserInputPage fIsLastUserInputPage
Triggers the refactoring s condition checking and returns either the error wizard page or a preview page depending on the outcome of the precondition checking return either the error or the preview page depending on the refactoring s precondition checking protected final I Wizard Page compute Successor Page return get Refactoring Wizard compute User Input Successor Page this get Container  IWizardPage computeSuccessorPage getRefactoringWizard computeUserInputSuccessorPage getContainer
Sets the page s complete status depending on the given tt Reactoring Status tt param status the tt Refactoring Status tt public void set Page Complete Refactoring Status status get Refactoring Wizard set Condition Checking Status status int severity status get Severity if severity Refactoring Status FATAL set Page Complete false set Error Message status get Message Matching Severity severity else set Page Complete true set Error Message null if severity Refactoring Status OK set Message null NONE else set Message status get Message Matching Severity severity get CorrespondingI Status Severity severity  ReactoringStatus RefactoringStatus setPageComplete RefactoringStatus getRefactoringWizard setConditionCheckingStatus getSeverity RefactoringStatus setPageComplete setErrorMessage getMessageMatchingSeverity setPageComplete setErrorMessage RefactoringStatus setMessage setMessage getMessageMatchingSeverity getCorrespondingIStatusSeverity
inherit Doc public void set Visible boolean visible if visible get Refactoring Wizard internal Set Change InternalAPI INSTANCE null super set Visible visible  inheritDoc setVisible getRefactoringWizard internalSetChange setVisible
inherit Doc public I Wizard Page get Next Page if f Is Last User Input Page return compute Successor Page else return super get Next Page  inheritDoc IWizardPage getNextPage fIsLastUserInputPage computeSuccessorPage getNextPage
inherit Doc public boolean can Flip To Next Page if f Is Last User Input Page we can t call get Next Page to determine if flipping is allowed since computing the next page is quite expensive checking preconditions and creating a change So we say yes if the page is complete return is Page Complete else return super can Flip To Next Page  inheritDoc canFlipToNextPage fIsLastUserInputPage getNextPage isPageComplete canFlipToNextPage
inherit Doc protected boolean perform Finish Refactoring Wizard wizard get Refactoring Wizard int threshold Refactoring Core get Condition Checking Failed Severity Refactoring Status activation Status wizard get Initial Condition Checking Status Refactoring Status input Status null Refactoring Status status new Refactoring Status Refactoring refactoring get Refactoring if activation Status null activation Status get Severity threshold if activation Status has Fatal Error input Status wizard check Final Conditions else Create Change Operation create new Create Change Operation new Check Conditions Operation refactoring Check Conditions Operation FINAL CONDITIONS threshold Perform Change Operation perform new UI Perform Change Operation get Shell get Display create get Container Finish Result result wizard internal Perform Finish InternalAPI INSTANCE perform wizard internal Set Change InternalAPI INSTANCE create get Change if result is Exception return true if result is Interrupted return false input Status new Refactoring Status input Status merge create get Condition Checking Status Refactoring Status validation Status perform get Validation Status only merge this in if we have a fatal error In all other cases the change got executed if validation Status null validation Status has Fatal Error input Status merge perform get Validation Status status merge activation Status status merge input Status if status get Severity threshold wizard set Condition Checking Status status I Wizard Page next Page wizard get Page Error Wizard Page PAGE NAME wizard get Container show Page next Page return false return true  inheritDoc performFinish RefactoringWizard getRefactoringWizard RefactoringCore getConditionCheckingFailedSeverity RefactoringStatus activationStatus getInitialConditionCheckingStatus RefactoringStatus inputStatus RefactoringStatus RefactoringStatus getRefactoring activationStatus activationStatus getSeverity activationStatus hasFatalError inputStatus checkFinalConditions CreateChangeOperation CreateChangeOperation CheckConditionsOperation CheckConditionsOperation FINAL_CONDITIONS PerformChangeOperation UIPerformChangeOperation getShell getDisplay getContainer FinishResult internalPerformFinish internalSetChange getChange isException isInterrupted inputStatus RefactoringStatus inputStatus getConditionCheckingStatus RefactoringStatus validationStatus getValidationStatus validationStatus validationStatus hasFatalError inputStatus getValidationStatus activationStatus inputStatus getSeverity setConditionCheckingStatus IWizardPage nextPage getPage ErrorWizardPage PAGE_NAME getContainer showPage nextPage
package void mark As Last User Input Page f Is Last User Input Page true  markAsLastUserInputPage fIsLastUserInputPage
private static int get CorrespondingI Status Severity int severity if severity Refactoring Status FATAL return I Status ERROR if severity Refactoring Status ERROR return I Status WARNING if severity Refactoring Status WARNING return I Status WARNING if severity Refactoring Status INFO return I Status INFO return I Status OK  getCorrespondingIStatusSeverity RefactoringStatus IStatus RefactoringStatus IStatus RefactoringStatus IStatus RefactoringStatus IStatus IStatus

Initializes the Class Loader This is called after all currently resolved fragment bundles have been attached to the Bundle Class Loader by the Framework  ClassLoader BundleClassLoader
Finds a local resource in the Bundle Class Loader without consulting the delegate param resource the resource path to find return a URL to the resource or null if the resource does not exist  BundleClassLoader
Finds all local resources in the Bundle Class Loader with the specified path without consulting the delegate param resource the resource path to find return An Enumeration of all resources found or null if the resource does not exist  BundleClassLoader
Finds a local class in the Bundle Class Loader without consulting the delegate param classname the classname to find return The class object found throws Class Not Found Exception if the classname does not exist locally  BundleClassLoader ClassNotFoundException
Finds a local object in the Bundle Class Loader without consulting the delegate param object the object name to fined return the object found or null if the object does not exist  BundleClassLoader
This method will first search the parent class loader for the resource That failing this method will invoke link Class Loader Delegate find Resource String to find the resource param name the resource path to get return  ClassLoaderDelegate findResource
This method will first search the parent class loader for the class That failing this method will invoke link Class Loader Delegate find Class String to find the resource param name the class name to load return throws Class Not Found Exception  ClassLoaderDelegate findClass ClassNotFoundException
Closes this class loader After this method is called load Class will always throw Class Not Found Exception get Resource get Resource As Stream get Resources and will return null  loadClass ClassNotFoundException getResource getResourceAsStream getResources
Attaches the Bundle Data for a fragment to this Bundle Class Loader The Fragment Bundle Data resources must be appended to the end of this Bundle Class Loader s classpath Fragment Bundle Data resources must be searched ordered by Bundle ID s param bundledata The Bundle Data of the fragment param domain The Protection Domain of the resources of the fragment Any classes loaded from the fragment s Bundle Data must belong to this Protection Domain param classpath An array of Bundle Class Path entries to use for loading classes and resources This is specified by the Bundle Class Path manifest entry of the fragment  BundleData BundleClassLoader BundleData BundleClassLoader BundleData BundleData ProtectionDomain BundleData ProtectionDomain ClassPath ClassPath

public interface Bundle Data Creates the Class Loader for the Bundle Data The Class Loader created must use the code Class Loader Delegate code to delegate class resource and library loading The delegate is responsible for finding any resource or classes imported by the bundle through an imported package or a required bundle p The code Protection Domain code domain must be used by the Classloader when defining a class param delegate The code Class Loader Delegate code to delegate to param domain The code Protection Domain code to use when defining a class param bundleclasspath An array of bundle classpaths to use to create this classloader This is specified by the Bundle Class Path manifest entry return The new Class Loader for the Bundle Data  BundleData ClassLoader BundleData ClassLoader ClassLoaderDelegate ProtectionDomain ClassLoaderDelegate ProtectionDomain ClassPath ClassLoader BundleData
Gets a code URL code to the bundle entry specified by path This method must not use the Bundle Class Loader to find the bundle entry since the Class Loader will delegate to find the resource see org osgi framework Bundle get Entry String param path The bundle entry path return A URL used to access the entry or null if the entry does not exist  BundleClassLoader ClassLoader getEntry
Gets all of the bundle entries that exist under the specified path For example p code get Entry Paths META INF code p This will return all entries from the META INF directory of the bundle see org osgi framework Bundle get Entry Paths String path param path The path to a directory in the bundle return An Enumeration of the entry paths or null if the specified path does not exist  getEntryPaths getEntryPaths
Returns the absolute path name of a native library The Bundle Data Class Loader invokes this method to locate the native libraries that belong to classes loaded from this Bundle Data Returns null if the library does not exist in this Bundle Data param libname The name of the library to find the absolute path to return The absolute path name of the native library or null if the library does not exist  BundleData ClassLoader BundleData BundleData
Installs the native code paths for this Bundle Data Each element of nativepaths must be installed for lookup when find Library is called param nativepaths The array of native code paths to install for the bundle throws Bundle Exception If any error occurs during install  BundleData findLibrary BundleException
Return the bundle data directory Attempt to create the directory if it does not exist see org osgi framework Bundle Context get Data File String return Bundle data directory or null if not supported  BundleContext getDataFile
Return the Dictionary of manifest headers for the Bundle Data return Dictionary that contains the Manifest headers for the Bundle Data throws Bundle Exception if an error occurred while reading the bundle manifest data  BundleData BundleData BundleException
Get the Bundle Data bundle ID This will be used as the bundle ID by the framework return The Bundle Data ID  BundleData BundleData
Get the Bundle Data Location This will be used as the bundle location by the framework return the Bundle Data location  BundleData BundleData
Close all resources for this Bundle Data throws IO Exception If an error occurs closing  BundleData IOException
Open the Bundle Data This method will reopen the Bundle Data if it has been previously closed throws IO Exception If an error occurs opening  BundleData BundleData IOException
Sets the Bundle object for this Bundle Data param bundle The Bundle Object for this Bundle Data  BundleData BundleData
Returns the start level metadata for this Bundle Data return the start level metadata for this Bundle Data  BundleData BundleData
Returns the status metadata for this Bundle Data A value of 1 indicates that this bundle is started persistently A value of 0 indicates that this bundle is not started persistently return the status metadata for this Bundle Data  BundleData BundleData
Sets the start level metatdata for this Bundle Data Metadata must be stored persistently when Bundle Data save is called param value the start level metadata  BundleData BundleData
Sets the status metadata for this Bundle Data Metadata must be stored persistently when Bundle Data save is called param value the status metadata  BundleData BundleData
Persistently stores all the metadata for this Bundle Data throws IO Exception  BundleData IOException
Returns the Bundle Symbolic Name for this Bundle Data as specified in the bundle manifest file return the Bundle Symbolic Name for this Bundle Data  SymbolicName BundleData SymbolicName BundleData
Returns the Bundle Version for this Bundle Data as specified in the bundle manifest file return the Bundle Version for this Bundle Data  BundleData BundleData
Indicates whether this Bundle Data is a fragment bundle A bundle is considered to be a fragment bundle if its bundle manifest file has a Fragment Host entry return the value of true if this Bundle Data represents a fragment bundle false otherwise  BundleData BundleData
Returns the Bundle Class Path for this Bundle Data as specified in the bundle manifest file return the classpath for this Bundle Data  ClassPath BundleData BundleData
Returns the Bundle Activator for this Bundle Data as specified in the bundle manifest file return the Bundle Activator for this Bundle Data  BundleData BundleData
Returns the Bundle Required Execution Environment for this Bundle Data as specified in the bundle manifest file return the Bundle Required Execution Environment for this Bundle Data  RequiredExecutionEnvironment BundleData RequiredExecutionEnvironment BundleData
Returns the Dynamic Import Package for this Bundle Data as specified in the bundle manifest file return the Dynamic Import Packaget for this Bundle Data  DynamicImport BundleData DynamicImport BundleData

Begin the operation on the bundle install update uninstall return Bundle Data object for the target bundle throws Bundle Exception If a failure occured modifiying peristent storage  BundleData BundleException
Commit the operation performed param postpone If true the bundle s persistent storage cannot be immediately reclaimed This may occur if the bundle is still exporting a package throws Bundle Exception If a failure occured modifiying peristent storage  BundleException
Undo the change to persistent storage p This method can be called before calling commit or if commit throws an exception to undo any changes in progress throws Bundle Exception If a failure occured modifiying peristent storage  BundleException

public interface Bundle Watcher public void start Activation Bundle bundle  BundleWatcher startActivation
public void start Activation Bundle bundle public void end Activation Bundle bundle  startActivation endActivation

public interface Class Loader Delegate Finds a class for a bundle that may be outside of the actual bundle i e a class from an imported package or required bundle p If the class does not belong to an imported package or is not found in a required bundle then the Classloader Delegate will call Bundle Class Loader find Local Class p If no class is found then a Class Not Found Exception is thrown param classname the class to find return the Class throws Import Class Not Found Exception if trying to import a class from an imported package and the class is not found throws Class Not Found Exception if the class is not found  ClassLoaderDelegate ClassloaderDelegate BundleClassLoader findLocalClass ClassNotFoundException ImportClassNotFoundException ClassNotFoundException
Finds a resource for a bundle that may be outside of the actual bundle i e a resource from an imported package or required bundle p If the resource does not belong to an imported package or is not found in a required bundle then the Classloader Delegate will call Bundle Class Loader find Local Resource p If no resource is found then return null param resource the resource to load return the resource or null if resource is not found throws Import Resource Not Found Exception if trying to import a resource from an imported package and the resource is not found  ClassloaderDelegate BundleClassLoader findLocalResource ImportResourceNotFoundException
Finds an enumeration of resources for a bundle that may be outside of the actual bundle i e a resource from an imported package or required bundle p If the resource does not belong to an imported package or is not found in a required bundle then the Classloader Delegate will call Bundle Class Loader find Local Resource p If no resource is found then return null param resource the resource to find return the enumeration of resources found or null if the resource does not exist throws Import Resource Not Found Exception if trying to import a resource from an imported package and the resource is not found  ClassloaderDelegate BundleClassLoader findLocalResource ImportResourceNotFoundException
Finds an object for a bundle that may be outside of the actual bundle i e an object from an imported package or required bundle p If the resource does not belong to an imported package or is not found in a required bundle then the Classloader Delegate will call Bundle Class Loader find Local Object p If no resource is found then return null param object the name of the object to load return the resource or null if resource is not found throws Import Resource Not Found Exception if trying to import a resource from an imported package and the resource is not found  ClassloaderDelegate BundleClassLoader findLocalObject ImportResourceNotFoundException
Returns the absolute path name of a native library The following is a list of steps that a Class Loader Delegate must take when trying to find a library ul li If the bundle is a fragment then try to find the library in the host bundle li if the bundle is a host then try to find the library in the host bundle and then try to find the library in the fragment bundles ul If no library is found return null param libraryname the library to find the path to return the path to the library or null if not found  ClassLoaderDelegate

End values from Manifest public Abstract Bundle Data Abstract Framework Adaptor adaptor long id this adaptor adaptor this id id  AbstractBundleData AbstractFrameworkAdaptor
Return the Bundle Manifest for the Bundle Data If the manifest field is null this method will parse the bundle manifest file and construct a Bundle Manifest file to return If the manifest field is not null then the manifest object is returned return Bundle Manifest for the Bundle Data throws Bundle Exception if an error occurred while reading the bundle manifest data public Dictionary get Manifest throws Bundle Exception if manifest null synchronized this make sure the manifest is still null after we have aquired the lock if manifest null URL url get Entry Constants OSGI BUNDLE MANIFEST if url null throw new Bundle Exception Adaptor Msg formatter get String MANIFEST NOT FOUND EXCEPTION Constants OSGI BUNDLE MANIFEST get Location NON NLS 1 try manifest Headers parse Manifest url open Stream catch IO Exception e throw new Bundle Exception Adaptor Msg formatter get String MANIFEST NOT FOUND EXCEPTION Constants OSGI BUNDLE MANIFEST get Location e NON NLS 1 return manifest  BundleManifest BundleData BundleManifest BundleManifest BundleData BundleException getManifest BundleException getEntry OSGI_BUNDLE_MANIFEST BundleException AdaptorMsg getString MANIFEST_NOT_FOUND_EXCEPTION OSGI_BUNDLE_MANIFEST getLocation parseManifest openStream IOException BundleException AdaptorMsg getString MANIFEST_NOT_FOUND_EXCEPTION OSGI_BUNDLE_MANIFEST getLocation
Sets the Bundle object for this Bundle Data param bundle The Bundle Object for this Bundle Data public void set Bundle Bundle bundle this bundle bundle  BundleData BundleData setBundle
Returns the Bundle object for this Bundle Data return the Bundle object for this Bundle Data public Bundle get Bundle return bundle  BundleData BundleData getBundle
Get the Bundle Data bundle ID This will be used as the bundle ID by the framework return The Bundle Data ID public long get BundleID return id  BundleData BundleData getBundleID
Gets a code URL code to the bundle entry specified by path This method must not use the Bundle Class Loader to find the bundle entry since the Class Loader will delegate to find the resource param path The bundle entry path return A URL used to access the entry or null if the entry does not exist public URL get Entry String path Bundle Entry entry get Base Bundle File get Entry path if entry null return null try return new URL null get Bundle EntryURL id path new Handler entry catch MalformedURL Exception e return null  BundleClassLoader ClassLoader getEntry BundleEntry getBaseBundleFile getEntry getBundleEntryURL MalformedURLException
Gets all of the bundle entries that exist under the specified path For example p code get Entry Paths META INF code p This will return all entries from the META INF directory of the bundle param path The path to a directory in the bundle return An Enumeration of the entry paths or null if the specified path does not exist public Enumeration get Entry Paths String path return get Base Bundle File get Entry Paths path  getEntryPaths getEntryPaths getBaseBundleFile getEntryPaths
Creates the Class Loader for the Bundle Data The Class Loader created must use the code Class Loader Delegate code to delegate class resource and library loading The delegate is responsible for finding any resource or classes imported by the bundle or provided by bundle fragments or bundle hosts The code Protection Domain code domain must be used by the Classloader when defining a class param delegate The code Class Loader Delegate code to delegate to param domain The code Protection Domain code to use when defining a class param bundleclasspath An array of bundle classpaths to use to create this classloader This is specified by the Bundle Class Path manifest entry return The new Class Loader for the Bundle Data public org eclipse osgi framework adaptor Bundle Class Loader create Class Loader Class Loader Delegate delegate Protection Domain domain String bundleclasspath return get Adaptor get Element Factory create Class Loader delegate domain bundleclasspath this  ClassLoader BundleData ClassLoader ClassLoaderDelegate ProtectionDomain ClassLoaderDelegate ProtectionDomain ClassPath ClassLoader BundleData BundleClassLoader createClassLoader ClassLoaderDelegate ProtectionDomain getAdaptor getElementFactory createClassLoader
Return the generation directory for the bundle data The generation directory can be used by the framework to cache files from the bundle to the file system return The generation directory for the bundle data or null if not supported 
Return the base Bundle File for this Bundle Data The base Bundle File is the Bundle File that contains all the content of the bundle return the base Bundle File  BundleFile BundleData BundleFile BundleFile BundleFile
abstract public Bundle File get Base Bundle File public Abstract Framework Adaptor get Adaptor return adaptor  BundleFile getBaseBundleFile AbstractFrameworkAdaptor getAdaptor
public static String get Bundle EntryURL long id String path String Buffer url new String Buffer Constants OSGI ENTRY URL PROTOCOL url append append id NON NLS 1 if path length 0 path char At 0 url append url append path return url to String  getBundleEntryURL StringBuffer StringBuffer OSGI_ENTRY_URL_PROTOCOL charAt toString
public static String parse Symbolic Name Dictionary manifest String symbolic Name Entry String manifest get Constants BUNDLE SYMBOLICNAME if symbolic Name Entry null return null try return Manifest Element parse Header Constants BUNDLE SYMBOLICNAME symbolic Name Entry 0 get Value catch Bundle Exception e here is not the place to validate a manifest return null  parseSymbolicName symbolicNameEntry BUNDLE_SYMBOLICNAME symbolicNameEntry ManifestElement parseHeader BUNDLE_SYMBOLICNAME symbolicNameEntry getValue BundleException
Begin Meta Data Accessor Methods public String get Location return location  getLocation
public void set Location String location this location location  setLocation
public String get File Name return file Name  getFileName fileName
public void set File Name String file Name this file Name file Name  setFileName fileName fileName fileName
public String get Native Paths return native Paths  getNativePaths nativePaths
public String get Native Paths String if native Paths null native Paths length 0 return null String Buffer sb new String Buffer for int i 0 i native Paths length i sb append native Paths i if i native Paths length 1 sb append return sb to String  getNativePathsString nativePaths nativePaths StringBuffer StringBuffer nativePaths nativePaths nativePaths toString
public void set Native Paths String native Paths this native Paths native Paths  setNativePaths nativePaths nativePaths nativePaths
public void set Native Paths String native Paths if native Paths null return Array List result new Array List 5 String Tokenizer st new String Tokenizer native Paths NON NLS 1 while st has More Tokens String path st next Token result add path set Native Paths String result to Array new String result size  setNativePaths nativePaths nativePaths ArrayList ArrayList StringTokenizer StringTokenizer nativePaths hasMoreTokens nextToken setNativePaths toArray
public int get Generation return generation  getGeneration
public void set Generation int generation this generation generation  setGeneration
public int get Start Level return start Level  getStartLevel startLevel
public void set Start Level int start Level this start Level start Level  setStartLevel startLevel startLevel startLevel
public int get Status return status  getStatus
public void set Status int status this status status  setStatus
public boolean is Reference return reference  isReference
public void set Reference boolean reference this reference reference  setReference
Begin Manifest Value Accessor Methods public String get Symbolic Name return symbolic Name  getSymbolicName symbolicName
public void set Symbolic Name String symbolic Name this symbolic Name symbolic Name  setSymbolicName symbolicName symbolicName symbolicName
public Version get Version return version  getVersion
public void set Version Version version this version version  setVersion
public String get Activator return activator  getActivator
public void set Activator String activator this activator activator  setActivator
public String get Class Path return classpath  getClassPath
public void set Class Path String classpath this classpath classpath  setClassPath
public String get Execution Environment return execution Environment  getExecutionEnvironment executionEnvironment
public void set Execution Environment String execution Environment this execution Environment execution Environment  setExecutionEnvironment executionEnvironment executionEnvironment executionEnvironment
public String get Dynamic Imports return dynamic Imports  getDynamicImports dynamicImports
public void set Dynamic Imports String dynamic Imports this dynamic Imports dynamic Imports  setDynamicImports dynamicImports dynamicImports dynamicImports
public boolean is Fragment return fragment  isFragment
public void set Fragment boolean fragment this fragment fragment  setFragment

Bundle Class Loader constructor param delegate The Class Loader Delegate for this bundle param domain The Protection Domain for this bundle param parent The parent classloader to use Must not be null param classpath The classpath entries to use for the host public Abstract Class Loader Class Loader Delegate delegate Protection Domain domain String classpath Class Loader parent super parent this delegate delegate this hostdomain domain this hostclasspath classpath  BundleClassLoader ClassLoaderDelegate ProtectionDomain AbstractClassLoader ClassLoaderDelegate ProtectionDomain ClassLoader
Loads a class for the bundle First delegate find Class name is called The delegate will query the system class loader bundle imports bundle local classes bundle hosts and fragments The delegate will call Bundle Class Loader find Local Class name to find a class local to this bundle param name the name of the class to load param resolve indicates whether to resolve the loaded class or not return The Class object throws Class Not Found Exception if the class is not found protected Class load Class String name boolean resolve throws Class Not Found Exception if closed throw new Class Not Found Exception name if Debug DEBUG Debug DEBUG LOADER Debug println Bundle Class Loader delegate load Class name NON NLS 1 NON NLS 2 NON NLS 3 try First check the parent classloader for system classes Class Loader parent get Parent Privileged if parent null try return parent load Class name catch Class Not Found Exception e Do nothing continue to delegate Just ask the delegate This could result in find Local Class name being called Class clazz delegate find Class name resolve the class if asked to if resolve resolve Class clazz return clazz catch Error e if Debug DEBUG Debug DEBUG LOADER Debug println Bundle Class Loader delegate load Class name failed NON NLS 1 NON NLS 2 NON NLS 3 Debug print Stack Trace e throw e catch Class Not Found Exception e If the class is not found do not try to look for it locally The delegate would have already done that for us if Debug DEBUG Debug DEBUG LOADER Debug println Bundle Class Loader delegate load Class name failed NON NLS 1 NON NLS 2 NON NLS 3 Debug print Stack Trace e throw e  findClass BundleClassLoader findLocalClass ClassNotFoundException loadClass ClassNotFoundException ClassNotFoundException DEBUG_LOADER BundleClassLoader loadClass ClassLoader getParentPrivileged loadClass ClassNotFoundException findLocalClass findClass resolveClass DEBUG_LOADER BundleClassLoader loadClass printStackTrace ClassNotFoundException DEBUG_LOADER BundleClassLoader loadClass printStackTrace
Finds a class local to this bundle The bundle class path is used to search for the class The delegate must not be used This method is abstract to force extending classes to implement this method instead of using the Class Loader find Class String method param name The classname of the class to find return The Class object throws Class Not Found Exception if the class is not found  ClassLoader findClass ClassNotFoundException
Gets a resource for the bundle First delegate find Resource name is called The delegate will query the system class loader bundle imports bundle local resources bundle hosts and fragments The delegate will call Bundle Class Loader find Local Resource name to find a resource local to this bundle param name The resource path to get return The URL of the resource or null if it does not exist public URL get Resource String name if closed return null if Debug DEBUG Debug DEBUG LOADER Debug println Bundle Class Loader delegate get Resource name NON NLS 1 NON NLS 2 NON NLS 3 try URL url null First check the parent classloader for system resources Class Loader parent get Parent Privileged if parent null url parent get Resource name if url null return url url delegate find Resource name if url null return url catch Import Resource Not Found Exception e if Debug DEBUG Debug DEBUG LOADER Debug println Bundle Class Loader delegate get Resource name failed NON NLS 1 NON NLS 2 NON NLS 3 return null  findResource BundleClassLoader findLocalResource getResource DEBUG_LOADER BundleClassLoader getResource ClassLoader getParentPrivileged getResource findResource ImportResourceNotFoundException DEBUG_LOADER BundleClassLoader getResource
Finds a resource local to this bundle Simply calls find Resource Impl name to find the resource param name The resource path to find return The URL of the resource or null if it does not exist  findResourceImpl
Finds all resources with the specified name This method must call delegate find Resources name to find all the resources param name The resource path to find return An Enumeration of all resources found or null if the resource protected Enumeration find Resources String name throws IO Exception try return delegate find Resources name catch Exception e if Debug DEBUG Debug DEBUG LOADER Debug println Bundle Class Loader delegate find Resources name failed NON NLS 1 NON NLS 2 NON NLS 3 Debug print Stack Trace e return null  findResources findResources IOException findResources DEBUG_LOADER BundleClassLoader findResources printStackTrace
Finds a library for this bundle Simply calls delegate find Library libname to find the library param libname The library to find return The URL of the resource or null if it does not exist protected String find Library String libname return delegate find Library libname  findLibrary findLibrary findLibrary
Finds a local resource in the Bundle Class Loader without consulting the delegate param resource the resource path to find return a URL to the resource or null if the resource does not exist public URL find Local Resource String resource return find Resource resource  BundleClassLoader findLocalResource findResource
Finds a local class in the Bundle Class Loader without consulting the delegate param classname the classname to find return The class object found throws Class Not Found Exception if the classname does not exist locally public Class find Local Class String classname throws Class Not Found Exception return find Class classname  BundleClassLoader ClassNotFoundException findLocalClass ClassNotFoundException findClass
Closes this class loader After this method is called load Class will always throw Class Not Found Exception get Resource get Resource As Stream and get Resources will return null public void close closed true  loadClass ClassNotFoundException getResource getResourceAsStream getResources
return Class Loader Access Controller do Privileged new Privileged Action public Object run return get Parent  ClassLoader AccessController doPrivileged PrivilegedAction getParent
protected Class Loader get Parent Privileged if System get Security Manager null return get Parent return Class Loader Access Controller do Privileged new Privileged Action public Object run return get Parent  ClassLoader getParentPrivileged getSecurityManager getParent ClassLoader AccessController doPrivileged PrivilegedAction getParent

Initializes the Service Registry loads the properties for this Framework Adaptor reads the adaptor manifest file public void initialize Event Publisher event Publisher this event Publisher event Publisher service Registry new Service Registry Impl service Registry initialize load Properties read Adaptor Manifest  ServiceRegistry FrameworkAdaptor EventPublisher eventPublisher eventPublisher eventPublisher serviceRegistry ServiceRegistryImpl serviceRegistry loadProperties readAdaptorManifest
see org eclipse osgi framework adaptor Framework Adaptor get Properties public Properties get Properties return properties  FrameworkAdaptor getProperties getProperties
see org eclipse osgi framework adaptor Framework Adaptor map Location ToURL Connection String public URL Connection map Location ToURL Connection String location throws Bundle Exception try return new URL location open Connection catch IO Exception e throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR URL CREATE EXCEPTION location e NON NLS 1  FrameworkAdaptor mapLocationToURLConnection URLConnection mapLocationToURLConnection BundleException openConnection IOException BundleException AdaptorMsg getString ADAPTOR_URL_CREATE_EXCEPTION
Always returns 1 to indicate that this operation is not supported by this Framework Adaptor Extending classes should override this method if they support this operation see org eclipse osgi framework adaptor Framework Adaptor get Total Free Space public long get Total Free Space throws IO Exception return 1  FrameworkAdaptor FrameworkAdaptor getTotalFreeSpace getTotalFreeSpace IOException
see org eclipse osgi framework adaptor Framework Adaptor get Service Registry public org eclipse osgi framework adaptor Service Registry get Service Registry return service Registry  FrameworkAdaptor getServiceRegistry ServiceRegistry getServiceRegistry serviceRegistry
see org eclipse osgi framework adaptor Framework Adaptor framework Start org osgi framework Bundle Context public void framework Start Bundle Context context throws Bundle Exception this stopping false this context context Bundle Resource Handler set Context context  FrameworkAdaptor frameworkStart BundleContext frameworkStart BundleContext BundleException BundleResourceHandler setContext
see org eclipse osgi framework adaptor Framework Adaptor framework Stop org osgi framework Bundle Context public void framework Stop Bundle Context context throws Bundle Exception this context null Bundle Resource Handler set Context null  FrameworkAdaptor frameworkStop BundleContext frameworkStop BundleContext BundleException BundleResourceHandler setContext
see org eclipse osgi framework adaptor Framework Adaptor framework Stopping Bundle Context public void framework Stopping Bundle Context context this stopping true  FrameworkAdaptor frameworkStopping BundleContext frameworkStopping BundleContext
see org eclipse osgi framework adaptor Framework Adaptor get Export Packages public String get Export Packages if manifest null return null return String manifest get Constants EXPORT PACKAGE  FrameworkAdaptor getExportPackages getExportPackages EXPORT_PACKAGE
see org eclipse osgi framework adaptor Framework Adaptor get Export Services public String get Export Services if manifest null return null return String manifest get Constants EXPORT SERVICE  FrameworkAdaptor getExportServices getExportServices EXPORT_SERVICE
public String get Provide Packages if manifest null return null return String manifest get Constants PROVIDE PACKAGE  getProvidePackages PROVIDE_PACKAGE
Returns the Event Publisher for this Framework Adaptor return The Event Publisher public Event Publisher get Event Publisher return event Publisher  EventPublisher FrameworkAdaptor EventPublisher EventPublisher getEventPublisher eventPublisher
public boolean is Stopping return stopping  isStopping
public int get Initial Bundle Start Level return initial Bundle Start Level  getInitialBundleStartLevel initialBundleStartLevel
public void set Initial Bundle Start Level int value initial Bundle Start Level value  setInitialBundleStartLevel initialBundleStartLevel
public Bundle Watcher get Bundle Watcher return null  BundleWatcher getBundleWatcher
This method locates and reads the osgi properties file If the system property i org eclipse osgi framework internal core properties i is specifed its value will be used as the name of the file instead of tt osgi properties tt There are 3 places to look for these properties These 3 places are searched in the following order stopping when the properties are found ol li Look for a file in the file system li Look for a resource in the Framework Adaptor s package ol protected void load Properties properties new Properties String resource System get Property Constants OSGI PROPERTIES Constants DEFAULT OSGI PROPERTIES try Input Stream in null File file new File resource if file exists in new File Input Stream file if in null in get Class get Resource As Stream resource if in null try properties load new Buffered Input Stream in finally try in close catch IO Exception ee else if Debug DEBUG Debug DEBUG GENERAL Debug println Skipping osgi properties resource NON NLS 1 catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to load osgi properties e get Message NON NLS 1  FrameworkAdaptor loadProperties getProperty OSGI_PROPERTIES DEFAULT_OSGI_PROPERTIES InputStream FileInputStream getClass getResourceAsStream BufferedInputStream IOException DEBUG_GENERAL IOException DEBUG_GENERAL getMessage
Reads and initializes the adaptor Bundle Manifest object The Bundle Manifest is used by the get Export Packages and get Export Services methods of the adpator protected void read Adaptor Manifest Input Stream in null walk up the class hierarchy until we find the ADAPTOR MANIFEST Class adaptor Clazz get Class while in null Abstract Framework Adaptor class is Assignable From adaptor Clazz in adaptor Clazz get Resource As Stream ADAPTOR MANIFEST adaptor Clazz adaptor Clazz get Superclass if in null if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to find adaptor bundle manifest ADAPTOR MANIFEST NON NLS 1 manifest new Headers new Properties return try manifest Headers parse Manifest in catch Bundle Exception e Debug println Unable to read adaptor bundle manifest ADAPTOR MANIFEST NON NLS 1  BundleManifest BundleManifest getExportPackages getExportServices readAdaptorManifest InputStream ADAPTOR_MANIFEST adaptorClazz getClass AbstractFrameworkAdaptor isAssignableFrom adaptorClazz adaptorClazz getResourceAsStream ADAPTOR_MANIFEST adaptorClazz adaptorClazz getSuperclass DEBUG_GENERAL ADAPTOR_MANIFEST parseManifest BundleException ADAPTOR_MANIFEST
public Bundle Data create System Bundle Data throws Bundle Exception return new System Bundle Data this  BundleData createSystemBundleData BundleException SystemBundleData
Returns the Adaptor Element Factory for this Adaptor This allows extending adaptors to control how Bundle Data and Bundle Class Loader objects are created return the Adaptor Element Factory for this Adapotr  AdaptorElementFactory BundleData BundleClassLoader AdaptorElementFactory
Does a recursive copy of one directory to another param in Dir input directory to copy param out Dir output directory to copy to throws IO Exception if any error occurs during the copy public static void copy Dir File in Dir File out Dir throws IO Exception String files in Dir list if files null files length 0 out Dir mkdir for int i 0 i files length i File in File new File in Dir files i File out File new File out Dir files i if in File is Directory copy Dir in File out File else Input Stream in new File Input Stream in File read File in out File  inDir outDir IOException copyDir inDir outDir IOException inDir outDir inFile inDir outFile outDir inFile isDirectory copyDir inFile outFile InputStream FileInputStream inFile readFile outFile
Read a file from an Input Stream and write it to the file system param in Input Stream from which to read param file output file to create exception IO Exception public static void read File Input Stream in File file throws IO Exception File Output Stream fos null try fos new File Output Stream file byte buffer new byte 1024 int count while count in read buffer 0 buffer length 0 fos write buffer 0 count fos close fos null in close in null catch IO Exception e close open streams if fos null try fos close catch IO Exception ee if in null try in close catch IO Exception ee if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to read file NON NLS 1 Debug print Stack Trace e throw e  InputStream InputStream IOException readFile InputStream IOException FileOutputStream FileOutputStream IOException IOException IOException DEBUG_GENERAL printStackTrace
public Class Loader get Bundle Class Loader Parent return bundle Class Loader Parent  ClassLoader getBundleClassLoaderParent bundleClassLoaderParent
public void handle Runtime Error Throwable error do nothing by default  handleRuntimeError
Creates a Bundle File object from a File object and a Bundle Data object This implementation checks to see if the basefile is a directory or a regular file and creates the proper Bundle File type accordingly If the file is a regular file this implementation assumes that the file is a zip file param basefile the base File object param bundledata the Bundle Data object that Bundle File is associated with return A new Bundle File object throws IO Exception if an error occurred creating the Bundle File object public Bundle File create Bundle File File basefile Bundle Data bundledata throws IO Exception if basefile is Directory return new Bundle File Dir Bundle File basefile else return new Bundle File Zip Bundle File basefile bundledata  BundleFile BundleData BundleFile BundleData BundleFile BundleFile IOException BundleFile BundleFile createBundleFile BundleData IOException isDirectory BundleFile DirBundleFile BundleFile ZipBundleFile
protected static class Parent Class Loader extends Class Loader protected Parent Class Loader super null  ParentClassLoader ClassLoader ParentClassLoader

public interface Adaptor Element Factory public Abstract Bundle Data create Bundle Data Abstract Framework Adaptor adaptor long id throws IO Exception  AdaptorElementFactory AbstractBundleData createBundleData AbstractFrameworkAdaptor IOException
public Abstract Bundle Data create Bundle Data Abstract Framework Adaptor adaptor long id throws IO Exception public Bundle Class Loader create Class Loader Class Loader Delegate delegate Protection Domain domain String bundleclasspath Abstract Bundle Data data  AbstractBundleData createBundleData AbstractFrameworkAdaptor IOException BundleClassLoader createClassLoader ClassLoaderDelegate ProtectionDomain AbstractBundleData

public abstract class Bundle Entry Return an Input Stream for the entry return Input Stream for the entry throws java io IO Exception If an error occurs reading the bundle  BundleEntry InputStream InputStream IOException
Return the size of the entry uncompressed return size of entry 
Return the name of the entry return name of entry 
Get the modification time for this Bundle Entry p If the modification time has not been set this method will return tt 1 tt return last modification time  BundleEntry
Get a URL to the bundle entry that uses a common protocol i e file jar or http etc return a URL to the bundle entry that uses a common protocol 
Get a URL to the content of the bundle entry that uses the file protocol The content of the bundle entry may be downloaded or extracted to the local file system in order to create a file URL return a URL to the content of the bundle entry that uses the file protocol 
Return the name of this Bundle Entry by calling get Name return String representation of this Bundle Entry public String to String return get Name  BundleEntry getName BundleEntry toString getName
Constructs the Bundle Entry using a Zip Entry param zip File the Zip File that this Bundle Entry belongs to param bundle File Bundle File object this entry is a member of param entry Zip Entry object of this entry Zip Bundle Entry Zip File zip File Zip Entry entry Bundle File bundle File this zip File zip File this zip Entry entry this bundle File bundle File  BundleEntry ZipEntry zipFile ZipFile BundleEntry bundleFile BundleFile ZipEntry ZipBundleEntry ZipFile zipFile ZipEntry BundleFile bundleFile zipFile zipFile zipEntry bundleFile bundleFile
Return an Input Stream for the entry return Input Stream for the entry exception java io IO Exception public Input Stream get Input Stream throws IO Exception return zip File get Input Stream zip Entry  InputStream InputStream IOException InputStream getInputStream IOException zipFile getInputStream zipEntry
Return size of the uncompressed entry return size of entry public long get Size return zip Entry get Size  getSize zipEntry getSize
Return name of the entry return name of entry public String get Name return zip Entry get Name  getName zipEntry getName
Get the modification time for this Bundle Entry p If the modification time has not been set this method will return tt 1 tt return last modification time public long get Time return zip Entry get Time  BundleEntry getTime zipEntry getTime
public URL get LocalURL try return new URL jar file bundle File basefile get Absolute Path zip Entry get Name NON NLS 1 NON NLS 2 catch MalformedURL Exception e This can not happen return null  getLocalURL bundleFile getAbsolutePath zipEntry getName MalformedURLException
public URL get FileURL try File file bundle File get File zip Entry get Name return file toURL catch MalformedURL Exception e This can not happen return null  getFileURL bundleFile getFile zipEntry getName MalformedURLException
Constructs the Bundle Entry using a File param file Bundle File object this entry is a member of param name the name of this Bundle Entry File Bundle Entry File file String name this file file this name name  BundleEntry BundleFile BundleEntry FileBundleEntry
Return an Input Stream for the entry return Input Stream for the entry exception java io IO Exception public Input Stream get Input Stream throws IO Exception return Secure Action get File Input Stream file  InputStream InputStream IOException InputStream getInputStream IOException SecureAction getFileInputStream
Return size of the uncompressed entry return size of entry public long get Size return file length  getSize
Return name of the entry return name of entry public String get Name return name  getName
Get the modification time for this Bundle Entry p If the modification time has not been set this method will return tt 1 tt return last modification time public long get Time return file last Modified  BundleEntry getTime lastModified
public URL get LocalURL return get FileURL  getLocalURL getFileURL
public URL get FileURL try return file toURL catch MalformedURL Exception e return null  getFileURL MalformedURLException
private String name public Dir Zip Bundle Entry Bundle File Zip Bundle File bundle File String name this name name this bundle File bundle File  DirZipBundleEntry BundleFile ZipBundleFile bundleFile bundleFile bundleFile
public Input Stream get Input Stream throws IO Exception return null  InputStream getInputStream IOException
public long get Size return 0  getSize
public String get Name return name  getName
public long get Time return 0  getTime
public URL get LocalURL try return new URL jar file bundle File basefile get Absolute Path name NON NLS 1 NON NLS 2 catch MalformedURL Exception e This can not happen unless the jar protocol is not supported return null  getLocalURL bundleFile getAbsolutePath MalformedURLException
public URL get FileURL try return bundle File extract Directory name toURL catch MalformedURL Exception e this cannot happen return null  getFileURL bundleFile extractDirectory MalformedURLException

Bundle File constructor param basefile The File object where this Bundle File is persistently stored public Bundle File File basefile this basefile basefile  BundleFile BundleFile BundleFile
Returns a File for the bundle entry specified by the path If required the content of the bundle entry is extracted into a file on the file system param path The path to the entry to locate a File for return A File object to access the contents of the bundle entry 
Locates a file name in this bundle and returns a Bundle Entry object param path path of the entry to locate in the bundle return Bundle Entry object or null if the file name does not exist in the bundle  BundleEntry BundleEntry
Allows to access the entries of the bundle Since the bundle content is usually a jar this allows to access the jar contents Get Entry Paths allows to enumerate the content of path If path is a directory it is equivalent to listing the directory contents The returned names are either files or directories themselves If a returned name is a directory it finishes with a slash If a returned name is a file it does not finish with a slash param path path of the entry to locate in the bundle return an Enumeration of Strings that indicate the paths found or null if the path does not exist  GetEntryPaths
Closes the Bundle File throws IO Exception if any error occurs  BundleFile IOException
Opens the Bundle Files throws IO Exception if any error occurs  BundleFiles IOException
Determines if any Bundle Entries exist in the given directory path param dir The directory path to check existence of return true if the Bundle File contains entries under the given directory path false otherwise  BundleEntries BundleFile
Returns a URL to access the contents of the entry specified by the path param path the path to the resource param host BundleID the host bundle ID public URL get ResourceURL String path long host BundleID Bundle Entry bundle Entry get Entry path if bundle Entry null return null try String Buffer url new String Buffer Constants OSGI RESOURCE URL PROTOCOL url append append host BundleID NON NLS 1 if path length 0 path char At 0 url append url append path return new URL null url to String new Handler bundle Entry catch MalformedURL Exception e return null  hostBundleID getResourceURL hostBundleID BundleEntry bundleEntry getEntry bundleEntry StringBuffer StringBuffer OSGI_RESOURCE_URL_PROTOCOL hostBundleID charAt toString bundleEntry MalformedURLException
public Zip Bundle File File basefile Bundle Data bundledata throws IO Exception super basefile this bundledata bundledata this closed true open  ZipBundleFile BundleData IOException
protected Zip Entry get Zip Entry String path if path length 0 path char At 0 path path substring 1 return zip File get Entry path  ZipEntry getZipEntry charAt zipFile getEntry
protected File extract Directory String dir Name Enumeration entries zip File entries while entries has More Elements String entry Path Zip Entry entries next Element get Name if entry Path starts With dir Name entry Path ends With NON NLS 1 get File entry Path return get Extract File dir Name  extractDirectory dirName zipFile hasMoreElements entryPath ZipEntry nextElement getName entryPath startsWith dirName entryPath endsWith getFile entryPath getExtractFile dirName
protected File get Extract File String entry Name if bundledata instanceof Abstract Bundle Data return null File bundle Generation Dir Abstract Bundle Data bundledata create Generation Dir if the generation dir exists then we have place to cache if bundle Generation Dir null bundle Generation Dir exists String path cp put all these entries in this subdir NON NLS 1 String name entry Name replace File separator Char if name length 1 name char At 0 File separator Char if name has a leading slash path path concat name else path path File separator name return new File bundle Generation Dir path return null  getExtractFile entryName AbstractBundleData bundleGenerationDir AbstractBundleData createGenerationDir bundleGenerationDir bundleGenerationDir entryName separatorChar charAt separatorChar bundleGenerationDir
public File get File String entry Zip Entry zip Entry get Zip Entry entry if zip Entry null return null try File nested get Extract File zip Entry get Name if nested null if nested exists the entry is already cached if Debug DEBUG Debug DEBUG GENERAL Debug println File already present nested get Path NON NLS 1 else if zip Entry get Name ends With NON NLS 1 if nested mkdirs if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to create directory nested get Path NON NLS 1 throw new IO Exception Adaptor Msg formatter get String ADAPTOR DIRECTORY CREATE EXCEPTION nested get Absolute Path NON NLS 1 extract Directory zip Entry get Name else Input Stream in zip File get Input Stream zip Entry if in null return null the entry has not been cached if Debug DEBUG Debug DEBUG GENERAL Debug println Creating file nested get Path NON NLS 1 create the necessary directories File dir new File nested get Parent if dir exists dir mkdirs if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to create directory dir get Path NON NLS 1 throw new IO Exception Adaptor Msg formatter get String ADAPTOR DIRECTORY CREATE EXCEPTION dir get Absolute Path NON NLS 1 copy the entry to the cache Abstract Framework Adaptor read File in nested return nested catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug print Stack Trace e return null  getFile ZipEntry zipEntry getZipEntry zipEntry getExtractFile zipEntry getName DEBUG_GENERAL getPath zipEntry getName endsWith DEBUG_GENERAL getPath IOException AdaptorMsg getString ADAPTOR_DIRECTORY_CREATE_EXCEPTION getAbsolutePath extractDirectory zipEntry getName InputStream zipFile getInputStream zipEntry DEBUG_GENERAL getPath getParent DEBUG_GENERAL getPath IOException AdaptorMsg getString ADAPTOR_DIRECTORY_CREATE_EXCEPTION getAbsolutePath AbstractFrameworkAdaptor readFile IOException DEBUG_GENERAL printStackTrace
public boolean contains Dir String dir if dir null return false if dir length 0 return true if dir char At 0 dir dir substring 0 if dir length 0 dir char At dir length 1 dir dir Enumeration entries zip File entries Zip Entry zip Entry String entry Path while entries has More Elements zip Entry Zip Entry entries next Element entry Path zip Entry get Name if entry Path starts With dir return true return false  containsDir charAt charAt zipFile ZipEntry zipEntry entryPath hasMoreElements zipEntry ZipEntry nextElement entryPath zipEntry getName entryPath startsWith
public Bundle Entry get Entry String path Zip Entry zip Entry get Zip Entry path if zip Entry null if path length 0 path char At path length 1 this is a directory request lets see if any entries exist in this directory if contains Dir path return new Bundle Entry Dir Zip Bundle Entry this path return null return new Bundle Entry Zip Bundle Entry zip File zip Entry this  BundleEntry getEntry ZipEntry zipEntry getZipEntry zipEntry charAt containsDir BundleEntry DirZipBundleEntry BundleEntry ZipBundleEntry zipFile zipEntry
public Enumeration get Entry Paths String path if path null throw new Null Pointer Exception if path length 0 path char At 0 path path substring 1 if path length 0 path char At path length 1 path new String Buffer path append to String NON NLS 1 Vector v Entries new Vector Enumeration entries zip File entries while entries has More Elements Zip Entry zip Entry Zip Entry entries next Element String entry Path zip Entry get Name if entry Path starts With path if path length entry Path length if entry Path last Index Of path length v Entries add entry Path else entry Path entry Path substring path length int slash entry Path index Of entry Path path entry Path substring 0 slash 1 if v Entries contains entry Path v Entries add entry Path return v Entries elements  getEntryPaths NullPointerException charAt charAt StringBuffer toString vEntries zipFile hasMoreElements ZipEntry zipEntry ZipEntry nextElement entryPath zipEntry getName entryPath startsWith entryPath entryPath lastIndexOf vEntries entryPath entryPath entryPath entryPath indexOf entryPath entryPath vEntries entryPath vEntries entryPath vEntries
public void close throws IO Exception if closed closed true zip File close  IOException zipFile
public void open throws IO Exception if closed zip File new Zip File this basefile closed false  IOException zipFile ZipFile
public Dir Bundle File File basefile throws IO Exception super basefile if basefile exists basefile is Directory throw new IO Exception Adaptor Msg formatter get String ADAPTOR DIRECTORY EXCEPTION basefile NON NLS 1  DirBundleFile IOException isDirectory IOException AdaptorMsg getString ADAPTOR_DIRECTORY_EXCEPTION
public File get File String path File file Path new File this basefile path if file Path exists return file Path return null  getFile filePath filePath filePath
public Bundle Entry get Entry String path File file Path new File this basefile path if file Path exists return null return new Bundle Entry File Bundle Entry file Path path  BundleEntry getEntry filePath filePath BundleEntry FileBundleEntry filePath
public boolean contains Dir String dir File dir Path new File this basefile dir return dir Path exists dir Path is Directory  containsDir dirPath dirPath dirPath isDirectory
if path File exists return new Enumeration public boolean has More Elements return false  pathFile hasMoreElements
public Object next Element throw new No Such Element Exception  nextElement NoSuchElementException
int cur 0 public boolean has More Elements return cur file List length  hasMoreElements fileList
public Object next Element if cur file List length throw new No Such Element Exception java io File child File new java io File path File file List cur String Buffer sb new String Buffer dir Path append file List cur if child File is Directory sb append NON NLS 1 return sb to String  nextElement fileList NoSuchElementException childFile pathFile fileList StringBuffer StringBuffer dirPath fileList childFile isDirectory toString
int cur 0 public boolean has More Elements return cur 1  hasMoreElements
public Object next Element if cur 0 cur 1 return path else throw new No Such Element Exception  nextElement NoSuchElementException
public Enumeration get Entry Paths final String path final java io File path File new java io File basefile path if path File exists return new Enumeration public boolean has More Elements return false public Object next Element throw new No Such Element Exception if path File is Directory final String file List path File list final String dir Path path length 0 path char At path length 1 path path return new Enumeration int cur 0 public boolean has More Elements return cur file List length public Object next Element if cur file List length throw new No Such Element Exception java io File child File new java io File path File file List cur String Buffer sb new String Buffer dir Path append file List cur if child File is Directory sb append NON NLS 1 return sb to String else return new Enumeration int cur 0 public boolean has More Elements return cur 1 public Object next Element if cur 0 cur 1 return path else throw new No Such Element Exception  getEntryPaths pathFile pathFile hasMoreElements nextElement NoSuchElementException pathFile isDirectory fileList pathFile dirPath charAt hasMoreElements fileList nextElement fileList NoSuchElementException childFile pathFile fileList StringBuffer StringBuffer dirPath fileList childFile isDirectory toString hasMoreElements nextElement NoSuchElementException
public void close nothing to do 
public void open nothing to do 
public Nested Dir Bundle File Bundle File base Bundlefile String cp super base Bundlefile basefile this base Bundle File base Bundlefile this cp cp if cp char At cp length 1 this cp this cp  NestedDirBundleFile BundleFile baseBundlefile baseBundlefile baseBundleFile baseBundlefile charAt
public void close do nothing 
public Bundle Entry get Entry String path if path length 0 path char At 0 path path substring 1 String newpath new String Buffer cp append path to String return base Bundle File get Entry newpath  BundleEntry getEntry charAt StringBuffer toString baseBundleFile getEntry
public boolean contains Dir String dir if dir null return false if dir length 0 dir char At 0 dir dir substring 1 String newdir new String Buffer cp append dir to String return base Bundle File contains Dir newdir  containsDir charAt StringBuffer toString baseBundleFile containsDir
public Enumeration get Entry Paths String path get Entry Paths is only valid if this is a root bundle file return null  getEntryPaths getEntryPaths
public File get File String entry get File is only valid if this is a root bundle file return null  getFile getFile
public void open do nothing 
public File get Base File return basefile  getBaseFile

Constructor for a bundle protocol resource URL Stream Handler public Bundle Resource Handler  URLStreamHandler BundleResourceHandler
public Bundle Resource Handler Bundle Entry bundle Entry this bundle Entry bundle Entry  BundleResourceHandler BundleEntry bundleEntry bundleEntry bundleEntry
Parse reference URL protected void parseURL URL url String str int start int end Check the permission of the caller to see if they are allowed access to the resource check Admin Permission if end start return if url get Path null A call to a URL constructor has been made that uses an authorized URL as its context Null out bundle Entry because it will not be valid for the new path bundle Entry null String spec NON NLS 1 if start end spec str substring start end end start Default is to use path and bundle Id from context String path url get Path String bundle Id url get Host int path Idx 0 if spec starts With NON NLS 1 int bundle Id Idx 2 path Idx spec index Of bundle Id Idx if path Idx 1 path Idx end Use default path NON NLS 1 bundle Id spec substring bundle Id Idx path Idx if path Idx end spec char At path Idx path spec substring path Idx end else if end path Idx if path null path equals NON NLS 1 path NON NLS 1 int last path last Index Of 1 if last 0 path spec substring path Idx end else path path substring 0 last spec substring path Idx end if path null path NON NLS 1 modify path if there s any relative references int dot Index while dot Index path index Of 0 NON NLS 1 path path substring 0 dot Index 1 path substring dot Index 3 if path ends With NON NLS 1 path path substring 0 path length 1 while dot Index path index Of 0 NON NLS 1 if dot Index 0 path path substring 0 path last Index Of dot Index 1 path substring dot Index 3 else path path substring dot Index 3 if path ends With path length 3 NON NLS 1 path path substring 0 path length 2 Setting the authority portion of the URL to SECURITY ATHORIZED ensures that this URL was created by using this parseURL method The open Connection method will only open UR Ls that have the authority set to this setURL url url get Protocol bundle Id 0 SECURITY AUTHORIZED null path null null  checkAdminPermission getPath bundleEntry bundleEntry bundleId getPath bundleId getHost pathIdx startsWith bundleIdIdx pathIdx indexOf bundleIdIdx pathIdx pathIdx bundleId bundleIdIdx pathIdx pathIdx charAt pathIdx pathIdx pathIdx lastIndexOf pathIdx pathIdx dotIndex dotIndex indexOf dotIndex dotIndex endsWith dotIndex indexOf dotIndex lastIndexOf dotIndex dotIndex dotIndex endsWith SECURITY_ATHORIZED openConnection URLs getProtocol bundleId SECURITY_AUTHORIZED
Establishes a connection to the resource specified by code URL code Since different protocols may have unique ways of connecting it must be overridden by the subclass return java net URL Connection param url java net URL exceptionIO Exception thrown if an IO error occurs during connection establishment protected URL Connection open Connection URL url throws IO Exception String authority url get Authority check to make sure that this URL was created using the parseURL method This ensures the security check was done at URL construction if url get Authority equals SECURITY AUTHORIZED No admin security check was made better check now check Admin Permission if bundle Entry null return new BundleURL Connection url bundle Entry else String bid String url get Host if bid String null throw new IO Exception Adaptor Msg formatter get String URL NO BUNDLE ID url to External Form NON NLS 1 Abstract Bundle bundle null try Long bundleID new Long bid String bundle Abstract Bundle context get Bundle bundleID long Value catch Number Format Exception nfe throw new MalformedURL Exception Adaptor Msg formatter get String URL INVALID BUNDLE ID bid String NON NLS 1 if bundle null throw new IO Exception Adaptor Msg formatter get String URL NO BUNDLE FOUND url to External Form NON NLS 1 return new BundleURL Connection url find Bundle Entry url bundle  URLConnection exceptionIOException URLConnection openConnection IOException getAuthority getAuthority SECURITY_AUTHORIZED checkAdminPermission bundleEntry BundleURLConnection bundleEntry bidString getHost bidString IOException AdaptorMsg getString URL_NO_BUNDLE_ID toExternalForm AbstractBundle bidString AbstractBundle getBundle longValue NumberFormatException MalformedURLException AdaptorMsg getString URL_INVALID_BUNDLE_ID bidString IOException AdaptorMsg getString URL_NO_BUNDLE_FOUND toExternalForm BundleURLConnection findBundleEntry
Finds the bundle entry for this protocal This is handled differently for Bundle ger Resource and Bundle get Entry because get Resource uses the bundle classloader and get Entry only used the base bundle file param url The URL to find the Bundle Entry for return  gerResource getEntry getResource getEntry BundleEntry
Converts a bundle URL to a String param url the URL return a string representation of the URL protected String to External Form URL url String Buffer result new String Buffer url get Protocol result append NON NLS 1 String bundle Id url get Host if bundle Id null bundle Id length 0 result append bundle Id String path url get Path if path null if path length 0 path char At 0 if name doesn t have a leading slash result append NON NLS 1 result append path return result to String  toExternalForm StringBuffer StringBuffer getProtocol bundleId getHost bundleId bundleId bundleId getPath charAt toString
public static void set Context Bundle Context context Bundle Resource Handler context context  setContext BundleContext BundleResourceHandler
protected int hash Code URL url int hash 0 String protocol url get Protocol if protocol null hash protocol hash Code String host url get Host if host null hash host hash Code String path url get Path if path null hash path hash Code return hash  hashCode getProtocol hashCode getHost hashCode getPath hashCode
protected boolean equals URL url1 URL url2 return same File url1 url2  sameFile
protected synchronized Inet Address get Host Address URL url return null  InetAddress getHostAddress
protected boolean hosts Equal URL url1 URL url2 String host1 url1 get Host String host2 url2 get Host if host1 null host2 null return host1 equals Ignore Case host2 else return host1 null host2 null  hostsEqual getHost getHost equalsIgnoreCase
protected boolean same File URL url1 URL url2 String p1 url1 get Protocol String p2 url2 get Protocol if p1 p2 p1 null p1 equals Ignore Case p2 return false if hosts Equal url1 url2 return false String a1 url1 get Authority String a2 url2 get Authority if a1 a2 a1 null a1 equals a2 return false String path1 url1 get Path String path2 url2 get Path if path1 path2 path1 null path1 equals path2 return false return true  sameFile getProtocol getProtocol equalsIgnoreCase hostsEqual getAuthority getAuthority getPath getPath
protected void check Admin Permission Security Manager sm System get Security Manager if sm null if admin Permission null admin Permission new Admin Permission sm check Permission admin Permission  checkAdminPermission SecurityManager getSecurityManager adminPermission adminPermission AdminPermission checkPermission adminPermission

Constructor for a Bundle Class Loader resource URL Connection param url URL for this URL Connection param bundle Entry Bundle Entry that the URL Connection is associated public BundleURL Connection URL url Bundle Entry bundle Entry super url this bundle Entry bundle Entry this in null this content Type null  BundleClassLoader URLConnection URLConnection bundleEntry BundleEntry URLConnection BundleURLConnection BundleEntry bundleEntry bundleEntry bundleEntry contentType
public synchronized void connect throws IO Exception if connected if bundle Entry null in bundle Entry get Input Stream connected true else throw new IO Exception Adaptor Msg formatter get String RESOURCE NOT FOUND EXCEPTION url NON NLS 1  IOException bundleEntry bundleEntry getInputStream IOException AdaptorMsg getString RESOURCE_NOT_FOUND_EXCEPTION
public int get Content Length return int bundle Entry get Size  getContentLength bundleEntry getSize
public String get Content Type if content Type null content Type guess Content Type From Name bundle Entry get Name if content Type null if connected try connect catch IO Exception e return null try if in mark Supported content Type guess Content Type From Stream in catch IO Exception e return content Type  getContentType contentType contentType guessContentTypeFromName bundleEntry getName contentType IOException markSupported contentType guessContentTypeFromStream IOException contentType
public boolean get Do Input return true  getDoInput
public boolean get Do Output return false  getDoOutput
public Input Stream get Input Stream throws IO Exception if connected connect return in  InputStream getInputStream IOException
public long get Last Modified long last Modified bundle Entry get Time if last Modified 1 return 0 return last Modified  getLastModified lastModified bundleEntry getTime lastModified lastModified
Converts the URL to a common local URL protocol i e file or jar protocol return the local URL using a common local protocol public URL get LocalURL return bundle Entry get LocalURL  getLocalURL bundleEntry getLocalURL
Converts the URL to a URL that uses the file protocol The content of this URL may be downloaded or extracted onto the local filesystem to create a file URL return the local URL that uses the file protocol public URL get FileURL return bundle Entry get FileURL  getFileURL bundleEntry getFileURL

protected URL reference public Reference Input Stream URL reference this reference reference  ReferenceInputStream
This method should not be called public int read throws IO Exception throw new IO Exception  IOException IOException
public URL get Reference return reference  getReference

Initializes the internal data structures of this Service Registry public void initialize published Services By Class new Hash Map 50 published Services By Context new Hash Map 50 all Published Services new Array List 50  ServiceRegistry publishedServicesByClass HashMap publishedServicesByContext HashMap allPublishedServices ArrayList
see org eclipse osgi framework adaptor Service Registry publish Service Bundle Context Service Registration public void publish Service Bundle Context context Service Registration service Reg Add the Service Registration to the list of Services published by Bundle Context Array List context Services Array List published Services By Context get context if context Services null context Services new Array List 10 published Services By Context put context context Services context Services add service Reg Add the Service Registration to the list of Services published by Class Name String clazzes String service Reg get Reference get Property Constants OBJECTCLASS int size clazzes length for int i 0 i size i String clazz clazzes i Array List services Array List published Services By Class get clazz if services null services new Array List 10 published Services By Class put clazz services services add service Reg Add the Service Registration to the list of all published Services all Published Services add service Reg  ServiceRegistry publishService BundleContext ServiceRegistration publishService BundleContext ServiceRegistration serviceReg ServiceRegistration BundleContext ArrayList contextServices ArrayList publishedServicesByContext contextServices contextServices ArrayList publishedServicesByContext contextServices contextServices serviceReg ServiceRegistration serviceReg getReference getProperty ArrayList ArrayList publishedServicesByClass ArrayList publishedServicesByClass serviceReg ServiceRegistration allPublishedServices serviceReg
see org eclipse osgi framework adaptor Service Registry unpublish Service Bundle Context Service Registration public void unpublish Service Bundle Context context Service Registration service Reg Remove the Service Registration from the list of Services published by Bundle Context Array List context Services Array List published Services By Context get context if context Services null context Services remove service Reg Remove the Service Registration from the list of Services published by Class Name String clazzes String service Reg get Reference get Property Constants OBJECTCLASS int size clazzes length for int i 0 i size i String clazz clazzes i Array List services Array List published Services By Class get clazz services remove service Reg Remove the Service Registration from the list of all published Services all Published Services remove service Reg  ServiceRegistry unpublishService BundleContext ServiceRegistration unpublishService BundleContext ServiceRegistration serviceReg ServiceRegistration BundleContext ArrayList contextServices ArrayList publishedServicesByContext contextServices contextServices serviceReg ServiceRegistration serviceReg getReference getProperty ArrayList ArrayList publishedServicesByClass serviceReg ServiceRegistration allPublishedServices serviceReg
see org eclipse osgi framework adaptor Service Registry unpublish Services Bundle Context public void unpublish Services Bundle Context context Get all the Services published by the Bundle Context Array List service Regs Array List published Services By Context get context if service Regs null Remove this list for the Bundle Context published Services By Context remove context int size service Regs size for int i 0 i size i Service Registration service Reg Service Registration service Regs get i Remove each service from the list of all published Services all Published Services remove service Reg Remove each service from the list of Services published by Class Name String clazzes String service Reg get Reference get Property Constants OBJECTCLASS int numclazzes clazzes length for int j 0 j numclazzes j String clazz clazzes j Array List services Array List published Services By Class get clazz services remove service Reg  ServiceRegistry unpublishServices BundleContext unpublishServices BundleContext BundleContext ArrayList serviceRegs ArrayList publishedServicesByContext serviceRegs BundleContext publishedServicesByContext serviceRegs ServiceRegistration serviceReg ServiceRegistration serviceRegs allPublishedServices serviceReg serviceReg getReference getProperty ArrayList ArrayList publishedServicesByClass serviceReg
see org eclipse osgi framework adaptor Service Registry lookup Service References String Filter public Service Reference lookup Service References String clazz Filter filter int size Array List references Array List service Regs if clazz null all services service Regs all Published Services else services registered under the class name service Regs Array List published Services By Class get clazz if service Regs null return null size service Regs size if size 0 return null references new Array List size for int i 0 i size i Service Registration registration Service Registration service Regs get i Service Reference reference registration get Reference if filter null filter match reference references add reference if references size 0 return null return Service Reference references to Array new Service Reference references size  ServiceRegistry lookupServiceReferences ServiceReference lookupServiceReferences ArrayList ArrayList serviceRegs serviceRegs allPublishedServices serviceRegs ArrayList publishedServicesByClass serviceRegs serviceRegs ArrayList ServiceRegistration ServiceRegistration serviceRegs ServiceReference getReference ServiceReference toArray ServiceReference
see org eclipse osgi framework adaptor Service Registry lookup Service References Bundle Context public Service Reference lookup Service References Bundle Context context int size Array List references Array List service Regs Array List published Services By Context get context if service Regs null return null size service Regs size if size 0 return null references new Array List size for int i 0 i size i Service Registration registration Service Registration service Regs get i Service Reference reference registration get Reference references add reference if references size 0 return null return Service Reference references to Array new Service Reference references size  ServiceRegistry lookupServiceReferences BundleContext ServiceReference lookupServiceReferences BundleContext ArrayList ArrayList serviceRegs ArrayList publishedServicesByContext serviceRegs serviceRegs ArrayList ServiceRegistration ServiceRegistration serviceRegs ServiceReference getReference ServiceReference toArray ServiceReference

public System Bundle Data Abstract Framework Adaptor adaptor throws Bundle Exception super adaptor 0 File osgi Base get Osgi Base manifest create Manifest osgi Base create Bundle File osgi Base set Meta Data  SystemBundleData AbstractFrameworkAdaptor BundleException osgiBase getOsgiBase createManifest osgiBase createBundleFile osgiBase setMetaData
private File get Osgi Base String framework Location System get Property OSGI FRAMEWORK if framework Location null TODO assumes the location is a file URL return new File framework Location substring 5 framework Location System get Property user dir NON NLS 1 if framework Location null return new File framework Location return null  getOsgiBase frameworkLocation getProperty OSGI_FRAMEWORK frameworkLocation frameworkLocation frameworkLocation getProperty frameworkLocation frameworkLocation
private Headers create Manifest File osgi Base throws Bundle Exception Input Stream in null if osgi Base null osgi Base exists try in new File Input Stream new File osgi Base Constants OSGI BUNDLE MANIFEST catch File Not Found Exception e do nothing here in null If we cannot find the Manifest file then use the old SYSTEMBUNDLE MF file This allows an adaptor to package the SYSTEMBUNDLE MF file in a jar if in null in get Class get Resource As Stream Constants OSGI SYSTEMBUNDLE MANIFEST if Debug DEBUG Debug DEBUG GENERAL if in null Debug println Unable to find system bundle manifest Constants OSGI SYSTEMBUNDLE MANIFEST NON NLS 1 if in null throw new Bundle Exception Adaptor Msg formatter get String SYSTEMBUNDLE MISSING MANIFEST NON NLS 1 Headers system Manifest Headers parse Manifest in check the OS Gi system package property String system Export Prop System get Property Constants OSGI SYSTEMPACKAGES if system Export Prop null append Manifest Value system Manifest Constants EXPORT PACKAGE system Export Prop now get any extra packages and services that the adaptor wants to export and merge this into the system bundle s manifest String export Packages adaptor get Export Packages String export Services adaptor get Export Services String provide Packages adaptor get Provide Packages if export Packages null append Manifest Value system Manifest Constants EXPORT PACKAGE export Packages if export Services null append Manifest Value system Manifest Constants EXPORT SERVICE export Services if provide Packages null append Manifest Value system Manifest Constants PROVIDE PACKAGE provide Packages return system Manifest  createManifest osgiBase BundleException InputStream osgiBase osgiBase FileInputStream osgiBase OSGI_BUNDLE_MANIFEST FileNotFoundException getClass getResourceAsStream OSGI_SYSTEMBUNDLE_MANIFEST DEBUG_GENERAL OSGI_SYSTEMBUNDLE_MANIFEST BundleException AdaptorMsg getString SYSTEMBUNDLE_MISSING_MANIFEST systemManifest parseManifest OSGi systemExportProp getProperty OSGI_SYSTEMPACKAGES systemExportProp appendManifestValue systemManifest EXPORT_PACKAGE systemExportProp exportPackages getExportPackages exportServices getExportServices providePackages getProvidePackages exportPackages appendManifestValue systemManifest EXPORT_PACKAGE exportPackages exportServices appendManifestValue systemManifest EXPORT_SERVICE exportServices providePackages appendManifestValue systemManifest PROVIDE_PACKAGE providePackages systemManifest
private void append Manifest Value Headers system Manifest String header String append String new Value String system Manifest get header if new Value null new Value append else new Value append NON NLS 1 system Manifest set header null system Manifest set header new Value  appendManifestValue systemManifest newValue systemManifest newValue newValue newValue systemManifest systemManifest newValue
else base Bundle File new Bundle File osgi Base public File get File String path return null  baseBundleFile BundleFile osgiBase getFile
public Bundle Entry get Entry String path return null  BundleEntry getEntry
public Enumeration get Entry Paths String path return null  getEntryPaths
public void close throws IO Exception  IOException
public void open throws IO Exception  IOException
public boolean contains Dir String dir return false  containsDir
private void create Bundle File File osgi Base if osgi Base null try base Bundle File adaptor create Bundle File osgi Base this catch IO Exception e should not happen else base Bundle File new Bundle File osgi Base public File get File String path return null public Bundle Entry get Entry String path return null public Enumeration get Entry Paths String path return null public void close throws IO Exception public void open throws IO Exception public boolean contains Dir String dir return false  createBundleFile osgiBase osgiBase baseBundleFile createBundleFile osgiBase IOException baseBundleFile BundleFile osgiBase getFile BundleEntry getEntry getEntryPaths IOException IOException containsDir
private void set Meta Data set Activator String manifest get Constants BUNDLE ACTIVATOR set Class Path String manifest get Constants BUNDLE CLASSPATH set Dynamic Imports String manifest get Constants DYNAMICIMPORT PACKAGE set Execution Environment String manifest get Constants BUNDLE REQUIREDEXECUTIONENVIRONMENT set Location Constants SYSTEM BUNDLE LOCATION set Symbolic Name Abstract Bundle Data parse Symbolic Name manifest String s Version String manifest get Constants BUNDLE VERSION if s Version null set Version new Version s Version  setMetaData setActivator BUNDLE_ACTIVATOR setClassPath BUNDLE_CLASSPATH setDynamicImports DYNAMICIMPORT_PACKAGE setExecutionEnvironment BUNDLE_REQUIREDEXECUTIONENVIRONMENT setLocation SYSTEM_BUNDLE_LOCATION setSymbolicName AbstractBundleData parseSymbolicName sVersion BUNDLE_VERSION sVersion setVersion sVersion
public Bundle Class Loader create Class Loader Class Loader Delegate delegate Protection Domain domain String bundleclasspath return null  BundleClassLoader createClassLoader ClassLoaderDelegate ProtectionDomain
public File create Generation Dir return null  createGenerationDir
public Bundle File get Base Bundle File return base Bundle File  BundleFile getBaseBundleFile baseBundleFile
public String find Library String libname return null  findLibrary
public void install Native Code String nativepaths throws Bundle Exception  installNativeCode BundleException
public File get Data File String path return null  getDataFile
public int get Start Level return 0  getStartLevel
public int get Status return 0  getStatus
public void close throws IO Exception  IOException
public void open throws IO Exception  IOException
public void save throws IO Exception  IOException

Publish a Framework Event param type Framework Event type param bundle Bundle related to Framework Event param throwable Related exception or tt null tt see org osgi framework Framework Event  FrameworkEvent FrameworkEvent FrameworkEvent FrameworkEvent

Initialize the Framework Adaptor object so that it is ready to be called by the framework Handle the arguments that were passed to the constructor This method must be called before any other Framework Adaptor methods param event Publisher The Event Publisher used to publish any events to the framework  FrameworkAdaptor FrameworkAdaptor eventPublisher EventPublisher
Initialize the persistent storage for the adaptor throws IO Exception If the adaptor is unable to initialize the bundle storage  IOException
Compact cleanup the persistent storage for the adaptor throws IO Exception If the adaptor is unable to compact the bundle storage  IOException
Return the properties object for the adaptor The properties in the returned object supplement the System properties The framework may modify this object The Framework will use the returned properties to set the System properties return The properties object for the adaptor 
Return a list of the installed bundles Each element in the list must be of type code Bundle Data code Each code Bundle Data code corresponds to one bundle that is persitently stored This method must construct code Bundle Data code objects for all installed bundles and return a Vector containing the objects The returned Vector becomes the property of the framework return Array of installed Bundle Data objects or null if none can be found  BundleData BundleData BundleData BundleData
Map a location to a URL Connection This is used by the Framework when installing a bundle from a spacified location param location of the bundle return URL Connection that represents the location throws Bundle Exception if the mapping fails  URLConnection URLConnection BundleException
Prepare to install a bundle from a URL Connection p To complete the install begin and then commit must be called on the returned code Bundle Operation code object If either of these methods throw a Bundle Exception or some other error occurs then undo must be called on the code Bundle Operation code object to undo the change to persistent storage param location Bundle location param source URL Connection from which the bundle may be read Any Input Streams returned from the source URL Connections get Input Stream must be closed by the code Bundle Operation code object return Bundle Operation object to be used to complete the install  URLConnection BundleOperation BundleException BundleOperation URLConnection InputStreams URLConnections getInputStream BundleOperation BundleOperation
Prepare to update a bundle from a URL Connection p To complete the update begin and then commit must be called on the returned code Bundle Operation code object If either of these methods throw a Bundle Exception or some other error occurs then undo must be called on the code Bundle Operation code object to undo the change to persistent storage param bundledata Bundle Data to update param source URL Connection from which the updated bundle may be read Any Input Streams returned from the source URL Connections get Input Stream must be closed by the code Bundle Operation code object return Bundle Operation object to be used to complete the update  URLConnection BundleOperation BundleException BundleOperation BundleData URLConnection InputStreams URLConnections getInputStream BundleOperation BundleOperation
Prepare to uninstall a bundle p To complete the uninstall begin and then commit must be called on the returned code Bundle Operation code object If either of these methods throw a Bundle Exception or some other error occurs then undo must be called on the code Bundle Operation code object to undo the change to persistent storage param bundledata Bundle Data to uninstall return Bundle Operation object to be used to complete the uninstall  BundleOperation BundleException BundleOperation BundleData BundleOperation
Returns the total amount of free space available for bundle storage on the device return Free space available in bytes or 1 if it does not apply to this adaptor exception IO Exception if an I O error occurs determining the available space  IOException
Returns the Permission Storage object which will be used to to manage the permission data return The Permission Storage object for the adaptor see org osgi service permissionadmin Permission Admin  PermissionStorage PermissionStorage PermissionAdmin
Returns the code Service Registry code object which will be used to manage Service Reference bindings return The Service Registry object for the adaptor  ServiceRegistry ServiceReference ServiceRegistry
The framework will call this method after the System Bundle Activator start Bundle Context has been called The context is the System Bundle s Bundle Context This method allows Framework Adaptors to have access to the OS Gi framework to get services register services and perform other OS Gi operations param context The System Bundle s Bundle Context exception Bundle Exception on any error that may occur  BundleActivator BundleContext BundleContext FrameworkAdaptors OSGi OSGi BundleContext BundleException
The framework will call this method before the System Bundle Activator stop Bundle Context has been called The context is the System Bundle s Bundle Context This method allows Framework Adaptors to have access to the OS Gi framework to get services register services and perform other OS Gi operations param context The System Bundle s Bundle Context exception Bundle Exception on any error that may occur  BundleActivator BundleContext BundleContext FrameworkAdaptors OSGi OSGi BundleContext BundleException
The framework will call this method before the process of framework shutdown is started This gives Framework Adaptors a chance to perform actions before the framework start level is decremented and all the bundles are stopped This method will get called before the link framework Stop Bundle Context method param context The System Bundle s Bundle Context  FrameworkAdaptors frameworkStop BundleContext BundleContext
Gets the value for Export Package for packages that a Framework Adaptor is exporting to the framework The String returned will be parsed by the framework and the packages specified will be exported by the System Bundle return The value for Export Package that the System Bundle will export or null if none exist  FrameworkAdaptor
Gets the value for Provide Package for packages that a Framework Adaptor is exporting to the framework The String returned will be parsed by the framework and the packages specified will be exported by the System Bundle return The value for Provide Package that the System Bundle will export or null if none exist  FrameworkAdaptor
Gets any Service class names that a Framework Adaptor is exporting to the framework The class names returned will be exported by the System Bundle return The value of Export Service that the System Bundle will export or null if none exist  FrameworkAdaptor
Returns the initial bundle start level as maintained by this adaptor return the initial bundle start level 
Sets the initial bundle start level param value the initial bundle start level 
Returns the Framework Log for the Framework Adaptor The Framework Log is used by the Framework and Framework Adaptor to log any error messages and Framwork Events of type ERROR return The Framework Log to be used by the Framework  FrameworkLog FrameworkAdaptor FrameworkLog FrameworkAdaptor FramworkEvents FrameworkLog
Creates a Bundle Data object for the System Bundle The Bundle Data returned will be used to define the System Bundle for the Framework return the Bundle Data for the System Bundle throws Bundle Exception if any error occurs while creating the System Bundle Data  BundleData BundleData BundleData BundleException BundleData
Returns the bundle watcher for this Framework Adaptor return the bundle watcher for this Framework Adaptor  FrameworkAdaptor FrameworkAdaptor
Returns the Platform Admin for this Framework Adaptor return the Platform Admin for this Framework Adaptor  PlatformAdmin FrameworkAdaptor PlatformAdmin FrameworkAdaptor
Returns the State for this Framework Adaptor return the State for this Framework Adaptor  FrameworkAdaptor FrameworkAdaptor
Returns the parent Class Loader all Bundle Class Loaders created All Bundle Class Loaders that are created must use the Class Loader returned by this method as a parent Class Loader Each call to this method must return the same Class Loader object return the parent Class Loader for all Bundle Class Loaders created  ClassLoader BundleClassLoaders BundleClassLoaders ClassLoader ClassLoader ClassLoader ClassLoader BundleClassLoaders
Handles a Runtime Exception or Error that was caught by the Framework and there is not a suitable caller to propagate the Throwable to This gives the Framework Adaptor the ablity to handle such cases For example a Framework Adaptor may decide that such unexpected errors should cause an error message to be logged or that the Framework should be terminated immediately param error The Throwable for the runtime error that is to be handled  RuntimeException FrameworkAdaptor FrameworkAdaptor

public class Import Class Not Found Exception extends Class Not Found Exception Constructor with no detail message public Import Class Not Found Exception super  ImportClassNotFoundException ClassNotFoundException ImportClassNotFoundException
Constructor with detail message param s the detail message public Import Class Not Found Exception String s super s  ImportClassNotFoundException

public class Import Resource Not Found Exception extends Runtime Exception Constructor with no detail message public Import Resource Not Found Exception super  ImportResourceNotFoundException RuntimeException ImportResourceNotFoundException
Constructor with detail message param s the detail message public Import Resource Not Found Exception String s super s  ImportResourceNotFoundException

public interface Permission Storage Returns the locations that have permission data assigned to them that is locations for which permission data exists in persistent storage return The locations that have permission data in persistent storage or tt null tt if there is no permission data in persistent storage throws IO Exception If a failure occurs accessing peristent storage  PermissionStorage IOException
Gets the permission data assigned to the specified location param location The location whose permission data is to be returned The location can be tt null tt for the default permission data return The permission data assigned to the specified location or tt null tt if that location has not been assigned any permission data throws IO Exception If a failure occurs accessing peristent storage  IOException
Assigns the specified permission data to the specified location param location The location that will be assigned the permissions The location can be tt null tt for the default permission data param data The permission data to be assigned or tt null tt if the specified location is to be removed from persistent storaqe throws IO Exception If a failure occurs modifying peristent storage  IOException

Publishes a service to this Service Registry param context the Bundle Context that registered the service param service Reg the Service Registration to register  ServiceRegistry BundleContext serviceReg ServiceRegistration
Unpublishes a service from this Service Registry param context the Bundle Context that registered the service param service Reg the Service Registration to unpublish  ServiceRegistry BundleContext serviceReg ServiceRegistration
Unpublishes all services from this Service Registry that the specified Bundle Context registered param context the Bundle Context to unpublish all services for  ServiceRegistry BundleContext BundleContext
Performs a lookup for Service References that are bound to this Service Registry If both clazz and filter are null then all bound Service References are returned param clazz A fully qualified class name All Service References that reference an object that implement this class are returned May be null param filter Used to match against published Services All Service References that match the filter are returned If a clazz is specified then all Service References that match the clazz and the filter parameter are returned May be null return An array of all matching Service References or null if none exist  ServiceReferences ServiceRegistry ServiceReferences ServiceReferences ServiceReferences ServiceReferences ServiceReferences
Performs a lookup for Service References that are bound to this Service Registry using the specified Bundle Context param context The Bundle Context to lookup the Service References on return An array of all matching Service References or null if none exist  ServiceReferences ServiceRegistry BundleContext BundleContext ServiceReferences ServiceReferences

public interface Command Interpreter Get the next argument in the input E g if the commandline is hello world the  hello method will get world as the first argument  CommandInterpreter _hello
Execute a command line as if it came from the end user and return the result Throws any exceptions generated by the command that executed 
Prints an object to the outputstream param othe object to be printed 
public void print Object o Prints an empty line to the outputstream public void println 
Prints an object to the output medium appended with newline character p If running on the target environment the user is prompted with more if more than the configured number of lines have been printed without user prompt That way the user of the program has control over the scrolling p For this to work properly you should not embedded n etc into the string paramothe object to be printed 
Print a stack trace including nested exceptions param t The offending exception 
Prints the given dictionary sorted by keys param dicthe dictionary to print param titlethe header to print above the key value pairs 
Prints the given bundle resource if it exists param bundlethe bundle containing the resource param resourcethe resource to print 

public interface Command Provider Answer a string may be as many lines as you like with help texts that explain the command  CommandProvider

public static Print Stream out System out public static void print boolean x out print x  PrintStream
public static void print char x out print x 
public static void print int x out print x 
public static void print long x out print x 
public static void print float x out print x 
public static void print double x out print x 
public static void print char x out print x 
public static void print String x out print x 
public static void print Object x out print x 
public static void println boolean x out println x 
public static void println char x out println x 
public static void println int x out println x 
public static void println long x out println x 
public static void println float x out println x 
public static void println double x out println x 
public static void println char x out println x 
public static void println String x out println x 
public static void println Object x out println x 
public static void print Stack Trace Throwable t t print Stack Trace out Method methods t get Class get Methods int size methods length Class throwable Throwable class for int i 0 i size i Method method methods i if Modifier is Public method get Modifiers method get Name starts With get throwable is Assignable From method get Return Type method get Parameter Types length 0 NON NLS 1 try Throwable nested Throwable method invoke t null if nested null nested t out println Nested Exception NON NLS 1 print Stack Trace nested catch Illegal Access Exception e catch Invocation Target Exception e  printStackTrace printStackTrace getClass getMethods isPublic getModifiers getName startsWith isAssignableFrom getReturnType getParameterTypes printStackTrace IllegalAccessException InvocationTargetException

public static Debug Options get Default if singleton null debug Enabled Debug Options result new Debug Options debug Enabled result is Debug Enabled if debug Enabled singleton result return singleton  DebugOptions getDefault debugEnabled DebugOptions DebugOptions debugEnabled isDebugEnabled debugEnabled
public static URL buildURL String spec boolean trailing Slash if spec null return null boolean is File spec starts With file NON NLS 1 try if is File return adjust Trailing Slash new File spec substring 5 toURL trailing Slash else return new URL spec catch MalformedURL Exception e if we failed and it is a file spec there is nothing more we can do otherwise try to make the spec into a file URL if is File return null try return adjust Trailing Slash new File spec toURL trailing Slash catch MalformedURL Exception e1 return null  trailingSlash isFile startsWith isFile adjustTrailingSlash trailingSlash MalformedURLException isFile adjustTrailingSlash trailingSlash MalformedURLException
private static URL adjust Trailing Slash URL url boolean trailing Slash throws MalformedURL Exception String file url get File if trailing Slash file ends With NON NLS 1 return url file trailing Slash file file substring 0 file length 1 NON NLS 1 return new URL url get Protocol url get Host file  adjustTrailingSlash trailingSlash MalformedURLException getFile trailingSlash endsWith trailingSlash getProtocol getHost
private Debug Options super load Options  DebugOptions loadOptions
public boolean get Boolean Option String option boolean default Value String option Value get Option option return option Value null option Value equals Ignore Case true default Value NON NLS 1  getBooleanOption defaultValue optionValue getOption optionValue optionValue equalsIgnoreCase defaultValue
public String get Option String option return options null options get Property option null  getOption getProperty
public String get Option String option String default Value return options null options get Property option default Value default Value  getOption defaultValue getProperty defaultValue defaultValue
public int get Integer Option String option int default Value String value get Option option try return value null default Value Integer parse Int value catch Number Format Exception e return default Value  getIntegerOption defaultValue getOption defaultValue parseInt NumberFormatException defaultValue
public void set Option String option String value if options null options put option value trim  setOption
public boolean is Debug Enabled return options null  isDebugEnabled
private void load Options if no debug option was specified don t even bother to try Must ensure that the options slot is null as this is the signal to the platform that debugging is not enabled String debug Options Filename System get Property osgi debug NON NLS 1 if debug Options Filename null return options new Properties URL options File if debug Options Filename length 0 default options location is user dir install location may be r o so is not a good candidate for a trace options that need to be updatable by by the user String user Dir System get Property user dir replace File separator Char NON NLS 1 if user Dir ends With NON NLS 1 user Dir NON NLS 1 debug Options Filename new File user Dir OPTIONS to String options File buildURL debug Options Filename false if options File null System out println Unable to construct URL for options file debug Options Filename NON NLS 1 return System out print Debug options n options File to External Form NON NLS 1 try Input Stream input options File open Stream try options load input System out println loaded NON NLS 1 finally input close catch File Not Found Exception e System out println not found NON NLS 1 catch IO Exception e System out println did not parse NON NLS 1 e print Stack Trace System out trim off all the blanks since properties files don t do that for Iterator i options key Set iterator i has Next Object key i next options put key String options get key trim if options size 0 options null  loadOptions debugOptionsFilename getProperty debugOptionsFilename optionsFile debugOptionsFilename userDir getProperty separatorChar userDir endsWith userDir debugOptionsFilename userDir toString optionsFile debugOptionsFilename optionsFile debugOptionsFilename optionsFile toExternalForm InputStream optionsFile openStream FileNotFoundException IOException printStackTrace keySet hasNext

public interface Event Dispatcher This method is called once for each listener This method must cast the event listener object to the appropriate listener class for the event type and call the appropriate listener method p The method should properly log handle any exceptions thrown by the called listener The Event Manager will ignore any Throwable thrown by this method in order to continue delivery of the event to the next listener param event Listener This listener must be cast to the appropriate listener class for the event to be delivered and the appropriate listener method must then be called param listener Object This is the optional companion object that was specified when the listener was added to the Event Listeners object param event Action This value was passed to the Listener Queue object via one of its dispatch Event method calls It can provide information such as which listener method to call so that the Event Dispatcher can complete the delivery of the event to the listener param event Object This object was passed to the Listener Queue object via one of its dispatch Event method calls This object was created by the event source and is passed to this method It should contain all the necessary information such as what event object to pass so that this method can complete the delivery of the event to the listener This is typically the actual event object  EventDispatcher EventManager eventListener listenerObject EventListeners eventAction ListenerQueue dispatchEvent EventDispatcher eventObject ListenerQueue dispatchEvent

Creates a listener list with an initial capacity of 10 public Event Listeners this 10  EventListeners
Creates a listener list with the given initial capacity param capacity The number of listeners which this list can initially accept without growing its internal representation must be at least 1 throws Illegal Argument Exception If capacity is less than 1 public Event Listeners int capacity if capacity 1 throw new Illegal Argument Exception this initial Capacity capacity  IllegalArgumentException EventListeners IllegalArgumentException initialCapacity
Add a listener to the list If a listener object is already in the list then it is replaced param listener This is the listener object to be added to the list param listener Object This is an optional listener specific object This object will be passed to the Event Dispatcher along with the listener when the listener is to be called This may be null throws Illegal Argument Exception If listener is null public synchronized void add Listener Object listener Object listener Object if listener null throw new Illegal Argument Exception if size 0 list new List Element initial Capacity else copy array if necessary if copy On Write copy List size copy On Write false check for duplicates using identity for int i 0 i size i if list i primary listener list i new List Element listener listener Object use the most recent companion return grow array if necessary This wont recopy list if copy on write occured above since that would have grown the list if size list length copy List size list size new List Element listener listener Object size  listenerObject EventDispatcher IllegalArgumentException addListener listenerObject IllegalArgumentException ListElement initialCapacity copyOnWrite copyList copyOnWrite ListElement listenerObject copyList ListElement listenerObject
Remove a listener from the list param listener This is the listener object to be removed from the list throws Illegal Argument Exception If listener is null public synchronized void remove Listener Object listener if listener null throw new Illegal Argument Exception for int i 0 i size i if list i primary listener size if size 0 list null invariant list must be null iff size is zero return if copy On Write copy List i copy On Write false else System arraycopy list i 1 list i size i list size null invariant end of list must be null return  IllegalArgumentException removeListener IllegalArgumentException copyOnWrite copyList copyOnWrite
Remove all listeners from the list public synchronized void remove All Listeners invariant list must be null iff size is zero list null size 0  removeAllListeners
Return the list of listener listener Object pairs Package private method The array may be longer than the number of pairs in the array The end of the pairs is signalled by a null element or end of array This array must not be modified by anyone and should not be exposed outside of this package To reduce memory allocations the internal array is shared with the rest of this package However an array returned by this method must not be modified in anyway return A shared array that must not be modified by anyone synchronized List Element get Listeners if size 0 return empty Array copy On Write true return list  listenerObject ListElement getListeners emptyArray copyOnWrite
Copy the array param i Index of element to remove from array Must be equal to size to copy entire array throws Index Out Of Bounds Exception If i 0 or i size private void copy List int i if i size throw new Index Out Of Bounds Exception int capacity size 3 2 1 if capacity initial Capacity capacity initial Capacity List Element new List new List Element capacity System arraycopy list 0 new List 0 i if i size System arraycopy list i 1 new List i size i list new List  IndexOutOfBoundsException copyList IndexOutOfBoundsException initialCapacity initialCapacity ListElement newList ListElement newList newList newList

Event Manager constructor An Event Manager object is responsible for the delivery of events to listeners via an Event Dispatcher public Event Manager this null  EventManager EventManager EventDispatcher EventManager
Event Manager constructor An Event Manager object is responsible for the delivery of events to listeners via an Event Dispatcher param thread Name The name to give the event thread associated with this Event Manager public Event Manager String thread Name thread null this thread Name thread Name  EventManager EventManager EventDispatcher threadName EventManager EventManager threadName threadName threadName
This method can be called to release any resources associated with this Event Manager public synchronized void close if thread null thread close thread null  EventManager
Returns the Event Thread to use for dispatching events asynchronously for this Event Manager return Event Thread to use for dispatching events asynchronously for this Event Manager synchronized Event Thread get Event Thread if thread null if there is no thread then create a new one if thread Name null thread new Event Thread else thread new Event Thread thread Name thread start start the new thread return thread  EventThread EventManager EventThread EventManager EventThread getEventThread threadName EventThread EventThread threadName
This method calls the Event Dispatcher object to complete the dispatch of the event If there are more elements in the list call dispatch Event on the next item on the list This method is package private param listeners A null terminated array of List Elements with each element containing the primary and companion object for a listener This array must not be modified param dispatcher Call back object which is called to complete the delivery of the event param event Action This value was passed by the event source and is passed to this method This is passed on to the call back object param event Object This object was created by the event source and is passed to this method This is passed on to the call back object static void dispatch Event List Element listeners Event Dispatcher dispatcher int event Action Object event Object int size listeners length for int i 0 i size i iterate over the list of listeners List Element listener listeners i if listener null a null element terminates the list break try Call the Event Dispatcher to complete the delivery of the event dispatcher dispatch Event listener primary listener companion event Action event Object catch Throwable t Consume and ignore any exceptions thrown by the listener if DEBUG System out println Exception in listener primary NON NLS 1 t print Stack Trace  EventDispatcher dispatchEvent ListElements eventAction eventObject dispatchEvent ListElement EventDispatcher eventAction eventObject ListElement EventDispatcher dispatchEvent eventAction eventObject printStackTrace

Constructor for event queue item param l Listener list for this event param d Dispatcher for this event param a Action for this event param o Object for this event Queued List Element l Event Dispatcher d int a Object o listeners l dispatcher d action a object o next null  ListElement EventDispatcher
Constructor for the event thread param thread Name Name of the Event Thread Event Thread String thread Name super thread Name init  threadName EventThread EventThread threadName threadName
Constructor for the event thread Event Thread super init  EventThread
private void init running true head null tail null set Daemon true Mark thread as daemon thread  setDaemon
Stop thread void close running false interrupt 
This method pulls events from the queue and dispatches them public void run try while true Queued item get Next Event if item null return Event Manager dispatch Event item listeners item dispatcher item action item object catch Runtime Exception e if Event Manager DEBUG e print Stack Trace throw e catch Error e if Event Manager DEBUG e print Stack Trace throw e  getNextEvent EventManager dispatchEvent RuntimeException EventManager printStackTrace EventManager printStackTrace
This methods takes the input parameters and creates a Queued object and queues it The thread is notified param l Listener list for this event param d Dispatcher for this event param a Action for this event param o Object for this event synchronized void post Event List Element l Event Dispatcher d int a Object o if is Alive If the thread is not alive throw an exception throw new Illegal State Exception Queued item new Queued l d a o if head null if the queue was empty head item tail item else else add to end of queue tail next item tail item notify  postEvent ListElement EventDispatcher isAlive IllegalStateException
This method is called by the thread to remove items from the queue so that they can be dispatched to their listeners If the queue is empty the thread waits return The Queued removed from the top of the queue or null if the thread has been requested to stop private synchronized Queued get Next Event while running head null try wait catch Interrupted Exception e if running if we are stopping return null Queued item head head item next if head null tail null return item  getNextEvent InterruptedException

Constructor for Element List element param primary Primary object in element Used for uniqueness param companion Companion object stored with primary object List Element final Object primary final Object companion this primary primary this companion companion  ElementList ListElement

Listener Queue constructor This method creates an empty snapshop list param manager The Event Manager this queue is associated with throws Illegal Argument Exception If manager is null public Listener Queue Event Manager manager if manager null throw new Illegal Argument Exception this manager manager queue new Array List read Only false  ListenerQueue EventManager IllegalArgumentException ListenerQueue EventManager IllegalArgumentException ArrayList readOnly
Add a listener list to the snapshot list This method can be called multiple times prior to calling one of the dispatch Event methods to build the set of listeners for the delivery of a specific event The current list of listeners in the specified Event Listeners object is added to the snapshot list param listeners An Event Listeners object to add to the queue The current listeners in the Event Listeners object will be called when an event is dispatched param dispatcher An Event Dispatcher object to use when dispatching an event to the listeners on the specified Event Listeners throws Illegal State Exception If called after one of the dispatch methods has been called public synchronized void queue Listeners Event Listeners listeners Event Dispatcher dispatcher if read Only throw new Illegal State Exception if listeners null List Element list listeners get Listeners if list length 0 queue add new List Element list dispatcher  dispatchEvent EventListeners EventListeners EventListeners EventDispatcher EventListeners IllegalStateException queueListeners EventListeners EventDispatcher readOnly IllegalStateException ListElement getListeners ListElement
Asynchronously dispatch an event to the snapshot list An event dispatch thread maintained by the associated Event Manager is used to deliver the events This method may return immediately to the caller param event Action This value is passed to the Event Dispatcher param event Object This object is passed to the Event Dispatcher public void dispatch Event Asynchronous int event Action Object event Object synchronized this read Only true Event Thread event Thread manager get Event Thread synchronized event Thread synchronize on the Event Thread to ensure no interleaving of posting to the event thread int size queue size for int i 0 i size i iterate over the list of listener lists List Element list List Element queue get i event Thread post Event List Element list primary Event Dispatcher list companion event Action event Object  EventManager eventAction EventDispatcher eventObject EventDispatcher dispatchEventAsynchronous eventAction eventObject readOnly EventThread eventThread getEventThread eventThread EventThread ListElement ListElement eventThread postEvent ListElement EventDispatcher eventAction eventObject
Synchronously dispatch an event to the snapshot list The event may be dispatched on the current thread or an event dispatch thread maintained by the associated Event Manager This method will not return to the caller until the Event Dispatcher has been called and has returned for each listener on the queue param event Action This value is passed to the Event Dispatcher param event Object This object is passed to the Event Dispatcher public void dispatch Event Synchronous int event Action Object event Object synchronized this read Only true We can t guarantee any delivery order for synchronous events Attempts to do so result in deadly embraces int size queue size for int i 0 i size i iterate over the list of listener lists List Element list List Element queue get i Event Manager dispatch Event List Element list primary Event Dispatcher list companion event Action event Object  EventManager EventDispatcher eventAction EventDispatcher eventObject EventDispatcher dispatchEventSynchronous eventAction eventObject readOnly ListElement ListElement EventManager dispatchEvent ListElement EventDispatcher eventAction eventObject

Bundle object constructor This constructor should not perform any real work param bundledata Bundle Data for this bundle param framework Framework this bundle is running in protected static Abstract Bundle create Bundle Bundle Data bundledata Framework framework throws Bundle Exception if bundledata is Fragment return new Bundle Fragment bundledata framework else return new Bundle Host bundledata framework  BundleData AbstractBundle createBundle BundleData BundleException isFragment BundleFragment BundleHost
Bundle object constructor This constructor should not perform any real work param bundledata Bundle Data for this bundle param framework Framework this bundle is running in protected Abstract Bundle Bundle Data bundledata Framework framework throws Bundle Exception state INSTALLED state Changing null this bundledata bundledata this framework framework bundledata set Bundle this  BundleData AbstractBundle BundleData BundleException stateChanging setBundle
Load the bundle exception org osgi framework Bundle Exception  BundleException
Reload from a new bundle This method must be called while holding the bundles lock param new Bundle Dummy Bundle which contains new data return true if an exported package is in use i e it has been imported by a bundle exception org osgi framework Bundle Exception  newBundle BundleException
Refresh the bundle This is called by Framework refresh Packages This method must be called while holding the bundles lock this loader unimport Packages must have already been called before calling this method exception org osgi framework Bundle Exception if an exported package is in use i e it has been imported by a bundle  refreshPackages unimportPackages BundleException
Unload the bundle This method must be called while holding the bundles lock return true if an exported package is in use i e it has been imported by a bundle 
Close the the Bundle s file protected void close if Debug DEBUG Debug DEBUG GENERAL if state INSTALLED 0 Debug println Bundle close called when state INSTALLED this NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 state UNINSTALLED  DEBUG_GENERAL printStackTrace
Load and instantiate bundle s Bundle Activator class protected Bundle Activator load Bundle Activator throws Bundle Exception load Bundle s Bundle Activator if it has one String activator Class Name bundledata get Activator if activator Class Name null try Class activator Class load Class activator Class Name false Create the activator for the bundle return Bundle Activator activator Class new Instance catch Throwable t if Debug DEBUG Debug DEBUG GENERAL Debug print Stack Trace t throw new Bundle Exception Msg formatter get String BUNDLE INVALID ACTIVATOR EXCEPTION activator Class Name bundledata get Symbolic Name t NON NLS 1 return null  BundleActivator BundleActivator loadBundleActivator BundleException BundleActivator activatorClassName getActivator activatorClassName activatorClass loadClass activatorClassName BundleActivator activatorClass newInstance DEBUG_GENERAL printStackTrace BundleException getString BUNDLE_INVALID_ACTIVATOR_EXCEPTION activatorClassName getSymbolicName
This method loads a class from the bundle param name the name of the desired Class param check Permission indicates whether a permission check should be done return the resulting Class exception java lang Class Not Found Exception if the class definition was not found  checkPermission ClassNotFoundException
Find the specified resource in this bundle This bundle s class loader is called to search for the named resource If this bundle s state is tt INSTALLED tt then only this bundle will be searched for the specified resource Imported packages cannot be searched when a bundle has not been resolved param name The name of the resource See tt java lang Class Loader get Resource tt for a description of the format of a resource name return a URL to the named resource or tt null tt if the resource could not be found or if the caller does not have the tt Admin Permission tt and the Java Runtime Environment supports permissions exception java lang Illegal State Exception If this bundle has been uninstalled  ClassLoader getResource AdminPermission IllegalStateException
Returns the current state of the bundle A bundle can only be in one state at any time return bundle s state public int get State return state  getState
Return true if the bundle is starting or active protected boolean is Active return state ACTIVE STARTING 0  isActive
Return true if the bundle is resolved protected boolean is Resolved return state INSTALLED UNINSTALLED 0  isResolved
Start this bundle If the current start level is less than this bundle s start level then the Framework must persistently mark this bundle as started and delay the starting of this bundle until the Framework s current start level becomes equal or more than the bundle s start level p Otherwise the following steps are required to start a bundle ol li If the bundle is link UNINSTALLED then an code Illegal State Exception code is thrown li If the bundle is link ACTIVE or link STARTING then this method returns immediately li If the bundle is link STOPPING then this method may wait for the bundle to return to the link RESOLVED state before continuing If this does not occur in a reasonable time a link Bundle Exception is thrown to indicate the bundle was unable to be started li If the bundle is not link RESOLVED an attempt is made to resolve the bundle If the bundle cannot be resolved a link Bundle Exception is thrown li The state of the bundle is set to link STARTING li The link Bundle Activator start Bundle Context start method of the bundle s link Bundle Activator if one is specified is called If the link Bundle Activator is invalid or throws an exception the state of the bundle is set back to link RESOLVED the bundle s listeners if any are removed service s registered by the bundle if any are unregistered and service s used by the bundle if any are released A link Bundle Exception is then thrown li It is recorded that this bundle has been started so that when the framework is restarted this bundle will be automatically started li The state of the bundle is set to link ACTIVE li A link Bundle Event of type link Bundle Event STARTED is broadcast ol h5 Preconditons h5 ul li get State in link INSTALLED link RESOLVED ul h5 Postconditons no exceptions thrown h5 ul li get State in link ACTIVE li link Bundle Activator start Bundle Context Bundle Activator start has been called and did not throw an exception ul h5 Postconditions when an exception is thrown h5 ul li get State not in link STARTING link ACTIVE ul exception Bundle Exception If the bundle couldn t be started This could be because a code dependency could not be resolved or the specified Bundle Activator could not be loaded or threw an exception exception java lang Illegal State Exception If the bundle has been uninstalled or the bundle tries to change its own state exception java lang Security Exception If the caller does not have link Admin Permission permission and the Java runtime environment supports permissions public void start throws Bundle Exception framework check Admin Permission check Valid begin State Change try start Worker true finally complete State Change  IllegalStateException BundleException BundleException BundleActivator BundleContext BundleActivator BundleActivator BundleException BundleEvent BundleEvent getState getState BundleActivator BundleContext BundleActivator getState BundleException BundleActivator IllegalStateException SecurityException AdminPermission BundleException checkAdminPermission checkValid beginStateChange startWorker completeStateChange
Internal worker to start a bundle param persistent if true persistently record the bundle was started 
Start this bundle w o marking is persistently started p The following steps are followed to start a bundle ol li If the bundle is link UNINSTALLED then an code Illegal State Exception code is thrown li If the bundle is link ACTIVE or link STARTING then this method returns immediately li If the bundle is link STOPPING then this method may wait for the bundle to return to the link RESOLVED state before continuing If this does not occur in a reasonable time a link Bundle Exception is thrown to indicate the bundle was unable to be started li If the bundle is not link RESOLVED an attempt is made to resolve the bundle If the bundle cannot be resolved a link Bundle Exception is thrown li The state of the bundle is set to link STARTING li The link Bundle Activator start Bundle Context start method of the bundle s link Bundle Activator if one is specified is called If the link Bundle Activator is invalid or throws an exception the state of the bundle is set back to link RESOLVED the bundle s listeners if any are removed service s registered by the bundle if any are unregistered and service s used by the bundle if any are released A link Bundle Exception is then thrown li The state of the bundle is set to link ACTIVE li A link Bundle Event of type link Bundle Event STARTED is broadcast ol h5 Preconditons h5 ul li get State in link INSTALLED link RESOLVED ul h5 Postconditons no exceptions thrown h5 ul li get State in link ACTIVE li link Bundle Activator start Bundle Context Bundle Activator start has been called and did not throw an exception ul h5 Postconditions when an exception is thrown h5 ul li get State not in link STARTING link ACTIVE ul exception Bundle Exception If the bundle couldn t be started This could be because a code dependency could not be resolved or the specified Bundle Activator could not be loaded or threw an exception exception java lang Illegal State Exception If the bundle tries to change its own state protected void resume throws Bundle Exception if state UNINSTALLED return begin State Change try start Worker false finally complete State Change  IllegalStateException BundleException BundleException BundleActivator BundleContext BundleActivator BundleActivator BundleException BundleEvent BundleEvent getState getState BundleActivator BundleContext BundleActivator getState BundleException BundleActivator IllegalStateException BundleException beginStateChange startWorker completeStateChange
Stop this bundle Any services registered by this bundle will be unregistered Any services used by this bundle will be released Any listeners registered by this bundle will be removed p The following steps are followed to stop a bundle ol li If the bundle is link UNINSTALLED then an code Illegal State Exception code is thrown li If the bundle is link STOPPING link RESOLVED or link INSTALLED then this method returns immediately li If the bundle is link STARTING then this method may wait for the bundle to reach the link ACTIVE state before continuing If this does not occur in a reasonable time a link Bundle Exception is thrown to indicate the bundle was unable to be stopped li The state of the bundle is set to link STOPPING li It is recorded that this bundle has been stopped so that when the framework is restarted this bundle will not be automatically started li The link Bundle Activator stop Bundle Context stop method of the bundle s link Bundle Activator if one is specified is called If the link Bundle Activator throws an exception this method will continue to stop the bundle A link Bundle Exception will be thrown after completion of the remaining steps li The bundle s listeners if any are removed service s registered by the bundle if any are unregistered and service s used by the bundle if any are released li The state of the bundle is set to link RESOLVED li A link Bundle Event of type link Bundle Event STOPPED is broadcast ol h5 Preconditons h5 ul li get State in link ACTIVE ul h5 Postconditons no exceptions thrown h5 ul li get State not in link ACTIVE link STOPPING li link Bundle Activator stop Bundle Context Bundle Activator stop has been called and did not throw an exception ul h5 Postconditions when an exception is thrown h5 ul li None ul exception Bundle Exception If the bundle s Bundle Activator could not be loaded or threw an exception exception java lang Illegal State Exception If the bundle has been uninstalled or the bundle tries to change its own state exception java lang Security Exception If the caller does not have link Admin Permission permission and the Java runtime environment supports permissions public void stop throws Bundle Exception framework check Admin Permission check Valid begin State Change try stop Worker true finally complete State Change  IllegalStateException BundleException BundleActivator BundleContext BundleActivator BundleActivator BundleException BundleEvent BundleEvent getState getState BundleActivator BundleContext BundleActivator BundleException BundleActivator IllegalStateException SecurityException AdminPermission BundleException checkAdminPermission checkValid beginStateChange stopWorker completeStateChange
Internal worker to stop a bundle param persistent if true persistently record the bundle was stopped 
Access Controller do Privileged new Privileged Exception Action public Object run throws Bundle Exception IO Exception int status bundledata get Status boolean test status mask 0 if test state bundledata set Status state status mask status mask bundledata save return null  AccessController doPrivileged PrivilegedExceptionAction BundleException IOException getStatus setStatus
Set the persistent status bit for the bundle param mask Mask for bit to set clear param state true to set bit false to clear bit protected void set Status final int mask final boolean state try Access Controller do Privileged new Privileged Exception Action public Object run throws Bundle Exception IO Exception int status bundledata get Status boolean test status mask 0 if test state bundledata set Status state status mask status mask bundledata save return null catch Privileged Action Exception pae framework publish Framework Event Framework Event ERROR this pae get Exception  setStatus AccessController doPrivileged PrivilegedExceptionAction BundleException IOException getStatus setStatus PrivilegedActionException publishFrameworkEvent FrameworkEvent getException
Stop this bundle w o marking is persistently stopped Any services registered by this bundle will be unregistered Any services used by this bundle will be released Any listeners registered by this bundle will be removed p The following steps are followed to stop a bundle ol li If the bundle is link UNINSTALLED then an code Illegal State Exception code is thrown li If the bundle is link STOPPING link RESOLVED or link INSTALLED then this method returns immediately li If the bundle is link STARTING then this method may wait for the bundle to reach the link ACTIVE state before continuing If this does not occur in a reasonable time a link Bundle Exception is thrown to indicate the bundle was unable to be stopped li The state of the bundle is set to link STOPPING li The link Bundle Activator stop Bundle Context stop method of the bundle s link Bundle Activator if one is specified is called If the link Bundle Activator throws an exception this method will continue to stop the bundle A link Bundle Exception will be thrown after completion of the remaining steps li The bundle s listeners if any are removed service s registered by the bundle if any are unregistered and service s used by the bundle if any are released li The state of the bundle is set to link RESOLVED li A link Bundle Event of type link Bundle Event STOPPED is broadcast ol h5 Preconditons h5 ul li get State in link ACTIVE ul h5 Postconditons no exceptions thrown h5 ul li get State not in link ACTIVE link STOPPING li link Bundle Activator stop Bundle Context Bundle Activator stop has been called and did not throw an exception ul h5 Postconditions when an exception is thrown h5 ul li None ul param lock true if state change lock should be held when returning from this method exception Bundle Exception If the bundle s Bundle Activator could not be loaded or threw an exception exception java lang Illegal State Exception If the bundle tries to change its own state protected void suspend boolean lock throws Bundle Exception if state UNINSTALLED return begin State Change try stop Worker false finally if lock complete State Change  IllegalStateException BundleException BundleActivator BundleContext BundleActivator BundleActivator BundleException BundleEvent BundleEvent getState getState BundleActivator BundleContext BundleActivator BundleException BundleActivator IllegalStateException BundleException beginStateChange stopWorker completeStateChange
update Worker new Privileged Exception Action public Object run throws Bundle Exception compute the update location String update Location bundledata get Location if bundledata get Manifest get Constants BUNDLE UPDATELOCATION null update Location String bundledata get Manifest get Constants BUNDLE UPDATELOCATION if Debug DEBUG Debug DEBUG GENERAL Debug println from location update Location NON NLS 1 Map the identity to a URL Connection URL Connection source framework adaptor map Location ToURL Connection update Location call the worker update Worker Privileged source return null  updateWorker PrivilegedExceptionAction BundleException updateLocation getLocation getManifest BUNDLE_UPDATELOCATION updateLocation getManifest BUNDLE_UPDATELOCATION DEBUG_GENERAL updateLocation URLConnection URLConnection mapLocationToURLConnection updateLocation updateWorkerPrivileged
Update this bundle If the bundle is link ACTIVE the bundle will be stopped before the update and started after the update successfully completes p The following steps are followed to update a bundle ol li If the bundle is link UNINSTALLED then an code Illegal State Exception code is thrown li If the bundle is link ACTIVE or link STARTING the bundle is stopped as described in the link stop method If link stop throws an exception the exception is rethrown terminating the update li The location for the new version of the bundle is determined from either the manifest header code Bundle Update Location code if available or the original location li The location is interpreted in an implementation dependent way typically as a URL and the new version of the bundle is obtained from the location li The new version of the bundle is installed If the framework is unable to install the new version of the bundle the original version of the bundle will be restored and a link Bundle Exception will be thrown after completion of the remaining steps li The state of the bundle is set to link INSTALLED li If the new version of the bundle was successfully installed a link Bundle Event of type link Bundle Event UPDATED is broadcast li If the bundle was originally link ACTIVE the updated bundle is started as described in the link start method If link start throws an exception a link Framework Event of type link Framework Event ERROR is broadcast containing the exception ol h5 Preconditions h5 ul li get State not in link UNINSTALLED ul h5 Postconditons no exceptions thrown h5 ul li get State in link INSTALLED link RESOLVED link ACTIVE li The bundle has been updated ul h5 Postconditions when an exception is thrown h5 ul li get State in link INSTALLED link RESOLVED link ACTIVE li Original bundle is still used no update took place ul exception Bundle Exception If the update fails exception java lang Illegal State Exception If the bundle has been uninstalled or the bundle tries to change its own state exception java lang Security Exception If the caller does not have link Admin Permission permission and the Java runtime environment supports permissions see stop see start public void update throws Bundle Exception if Debug DEBUG Debug DEBUG GENERAL Debug println update location bundledata get Location NON NLS 1 framework check Admin Permission check Valid begin State Change try update Worker new Privileged Exception Action public Object run throws Bundle Exception compute the update location String update Location bundledata get Location if bundledata get Manifest get Constants BUNDLE UPDATELOCATION null update Location String bundledata get Manifest get Constants BUNDLE UPDATELOCATION if Debug DEBUG Debug DEBUG GENERAL Debug println from location update Location NON NLS 1 Map the identity to a URL Connection URL Connection source framework adaptor map Location ToURL Connection update Location call the worker update Worker Privileged source return null catch Bundle Exception e if e get Nested Exception instanceof Nothing To Update Exception throw e There is no work to be done with this update Quietly return with no error finally complete State Change  IllegalStateException UpdateLocation BundleException BundleEvent BundleEvent FrameworkEvent FrameworkEvent getState getState getState BundleException IllegalStateException SecurityException AdminPermission BundleException DEBUG_GENERAL getLocation checkAdminPermission checkValid beginStateChange updateWorker PrivilegedExceptionAction BundleException updateLocation getLocation getManifest BUNDLE_UPDATELOCATION updateLocation getManifest BUNDLE_UPDATELOCATION DEBUG_GENERAL updateLocation URLConnection URLConnection mapLocationToURLConnection updateLocation updateWorkerPrivileged BundleException getNestedException NothingToUpdateException completeStateChange
update Worker new Privileged Exception Action public Object run throws Bundle Exception Map the Input Stream to a URL Connection URL Connection source new Bundle Source in call the worker update Worker Privileged source return null  updateWorker PrivilegedExceptionAction BundleException InputStream URLConnection URLConnection BundleSource updateWorkerPrivileged
Update this bundle from an Input Stream p This method performs all the steps listed in link update except the bundle will be read in through the supplied code Input Stream code rather than a code URL code param in The Input Stream from which to read the new bundle see update public void update final Input Stream in throws Bundle Exception if Debug DEBUG Debug DEBUG GENERAL Debug println update location bundledata get Location NON NLS 1 Debug println from in NON NLS 1 framework check Admin Permission check Valid begin State Change try update Worker new Privileged Exception Action public Object run throws Bundle Exception Map the Input Stream to a URL Connection URL Connection source new Bundle Source in call the worker update Worker Privileged source return null finally complete State Change  InputStream InputStream InputStream InputStream BundleException DEBUG_GENERAL getLocation checkAdminPermission checkValid beginStateChange updateWorker PrivilegedExceptionAction BundleException InputStream URLConnection URLConnection BundleSource updateWorkerPrivileged completeStateChange
Update worker Assumes the caller has the state change lock protected void update Worker Privileged Exception Action action throws Bundle Exception boolean bundle Active false Abstract Bundle host null if is Fragment host Abstract Bundle get Host bundle Active host null false host state ACTIVE else bundle Active state ACTIVE if bundle Active try if is Fragment host stop Worker false else stop Worker false catch Bundle Exception e framework publish Framework Event Framework Event ERROR this e if state ACTIVE if the bundle is still active throw e try Access Controller do Privileged action framework publish Bundle Event Bundle Event UPDATED this catch Privileged Action Exception pae throw Bundle Exception pae get Exception finally if bundle Active try if is Fragment host start Worker false else start Worker false catch Bundle Exception e framework publish Framework Event Framework Event ERROR this e  updateWorker PrivilegedExceptionAction BundleException bundleActive AbstractBundle isFragment AbstractBundle getHost bundleActive bundleActive bundleActive isFragment stopWorker stopWorker BundleException publishFrameworkEvent FrameworkEvent AccessController doPrivileged publishBundleEvent BundleEvent PrivilegedActionException BundleException getException bundleActive isFragment startWorker startWorker BundleException publishFrameworkEvent FrameworkEvent
Update worker Assumes the caller has the state change lock protected void update Worker Privileged URL Connection source throws Bundle Exception Abstract Bundle old Bundle Abstract Bundle create Bundle bundledata framework boolean reloaded false Bundle Operation storage framework adaptor update Bundle this bundledata source Bundle Repository bundles framework get Bundles try Bundle Data new Bundle Data storage begin Must call framework create Bundle to check execution environment Abstract Bundle new Bundle framework create Bundle new Bundle Data Check for a bundle already installed with the same symbolic Name and version String symbolic Name new Bundle get Symbolic Name Abstract Bundle installed Bundle symbolic Name null null framework get Bundle By Symbolic Name symbolic Name new Bundle get Version to String if installed Bundle null installed Bundle this throw new Bundle Exception Msg formatter get String BUNDLE INSTALL SAME UNIQUEID new Object installed Bundle get Symbolic Name installed Bundle get Version installed Bundle get Location NON NLS 1 String nativepaths framework select Native Code new Bundle if nativepaths null bundledata install Native Code nativepaths boolean exporting synchronized bundles bundles mark Dependancies exporting reload new Bundle manifest Localization null reloaded true indicate we have loaded from the new version of the bundle storage commit exporting catch Bundle Exception e try storage undo if reloaded if we loaded from the new version of the bundle synchronized bundles reload old Bundle revert to old version catch Bundle Exception ee if we fail to revert then we are in big trouble framework publish Framework Event Framework Event ERROR this ee throw e  updateWorkerPrivileged URLConnection BundleException AbstractBundle oldBundle AbstractBundle createBundle BundleOperation updateBundle BundleRepository getBundles BundleData newBundleData createBundle AbstractBundle newBundle createBundle newBundleData symbolicName symbolicName newBundle getSymbolicName AbstractBundle installedBundle symbolicName getBundleBySymbolicName symbolicName newBundle getVersion toString installedBundle installedBundle BundleException getString BUNDLE_INSTALL_SAME_UNIQUEID installedBundle getSymbolicName installedBundle getVersion installedBundle getLocation selectNativeCode newBundle installNativeCode markDependancies newBundle manifestLocalization BundleException oldBundle BundleException publishFrameworkEvent FrameworkEvent
try uninstall Worker new Privileged Exception Action public Object run throws Bundle Exception uninstall Worker Privileged return null  uninstallWorker PrivilegedExceptionAction BundleException uninstallWorkerPrivileged
Uninstall this bundle p This method removes all traces of the bundle including any data in the persistent storage area provided for the bundle by the framework p The following steps are followed to uninstall a bundle ol li If the bundle is link UNINSTALLED then an code Illegal State Exception code is thrown li If the bundle is link ACTIVE or link STARTING the bundle is stopped as described in the link stop method If link stop throws an exception a link Framework Event of type link Framework Event ERROR is broadcast containing the exception li A link Bundle Event of type link Bundle Event UNINSTALLED is broadcast li The state of the bundle is set to link UNINSTALLED li The bundle and the persistent storage area provided for the bundle by the framework if any is removed ol h5 Preconditions h5 ul li get State not in link UNINSTALLED ul h5 Postconditons no exceptions thrown h5 ul li get State in link UNINSTALLED li The bundle has been uninstalled ul h5 Postconditions when an exception is thrown h5 ul li get State not in link UNINSTALLED li The Bundle has not been uninstalled ul exception Bundle Exception If the uninstall failed exception java lang Illegal State Exception If the bundle has been uninstalled or the bundle tries to change its own state exception java lang Security Exception If the caller does not have link Admin Permission permission and the Java runtime environment supports permissions see stop public void uninstall throws Bundle Exception if Debug DEBUG Debug DEBUG GENERAL Debug println uninstall location bundledata get Location NON NLS 1 framework check Admin Permission check Valid begin State Change try uninstall Worker new Privileged Exception Action public Object run throws Bundle Exception uninstall Worker Privileged return null finally complete State Change  IllegalStateException FrameworkEvent FrameworkEvent BundleEvent BundleEvent getState getState getState BundleException IllegalStateException SecurityException AdminPermission BundleException DEBUG_GENERAL getLocation checkAdminPermission checkValid beginStateChange uninstallWorker PrivilegedExceptionAction BundleException uninstallWorkerPrivileged completeStateChange
Uninstall worker Assumes the caller has the state change lock protected void uninstall Worker Privileged Exception Action action throws Bundle Exception boolean bundle Active false Abstract Bundle host null if is Fragment host Abstract Bundle get Host bundle Active host null false host state ACTIVE else bundle Active state ACTIVE if bundle Active try if is Fragment host stop Worker true else stop Worker true catch Bundle Exception e framework publish Framework Event Framework Event ERROR this e try Access Controller do Privileged action catch Privileged Action Exception pae if bundle Active if we stopped the bundle try if is Fragment host start Worker false else start Worker false catch Bundle Exception e if we fail to start the original bundle then we are in big trouble framework publish Framework Event Framework Event ERROR this e set the bundle Active to false so that the finally will not try to start the bundle again bundle Active false throw Bundle Exception pae get Exception finally if is Fragment bundle Active try host start Worker false catch Bundle Exception e if we fail to start the original host bundle then we are in big trouble framework publish Framework Event Framework Event ERROR this e framework publish Bundle Event Bundle Event UNINSTALLED this  uninstallWorker PrivilegedExceptionAction BundleException bundleActive AbstractBundle isFragment AbstractBundle getHost bundleActive bundleActive bundleActive isFragment stopWorker stopWorker BundleException publishFrameworkEvent FrameworkEvent AccessController doPrivileged PrivilegedActionException bundleActive isFragment startWorker startWorker BundleException publishFrameworkEvent FrameworkEvent bundleActive bundleActive BundleException getException isFragment bundleActive startWorker BundleException publishFrameworkEvent FrameworkEvent publishBundleEvent BundleEvent
Uninstall worker Assumes the caller has the state change lock protected void uninstall Worker Privileged throws Bundle Exception boolean unloaded false cache the bundle s headers get Headers Bundle Operation storage framework adaptor uninstall Bundle this bundledata Bundle Repository bundles framework get Bundles try storage begin boolean exporting synchronized bundles bundles mark Dependancies bundles remove this remove before calling unload exporting unload unloaded true storage commit exporting close catch Bundle Exception e try storage undo if unloaded if we unloaded the bundle synchronized bundles load reload the bundle bundles add this catch Bundle Exception ee if we fail to load the original bundle then we are in big trouble framework publish Framework Event Framework Event ERROR this ee throw e  uninstallWorkerPrivileged BundleException getHeaders BundleOperation uninstallBundle BundleRepository getBundles markDependancies BundleException BundleException publishFrameworkEvent FrameworkEvent
Return the bundle s manifest headers and values from the manifest s preliminary section That is all the manifest s headers and values prior to the first blank line p Manifest header names are case insensitive The methods of the returned code Dictionary code object will operate on header names in a case insensitive manner p For example the following manifest headers and values are included if they are present in the manifest pre Bundle Name Bundle Vendor Bundle Version Bundle Description Bundle DocURL Bundle Contact Address pre p This method will continue to return this information when the bundle is in the link UNINSTALLED state return A code Dictionary code object containing the bundle s manifest headers and values exception java lang Security Exception If the caller does not have link Admin Permission permission and the Java runtime environment supports permissions public Dictionary get Headers return get Headers Locale get Default to String  ContactAddress SecurityException AdminPermission getHeaders getHeaders getDefault toString
Returns this bundle s Manifest headers and values This method returns all the Manifest headers and values from the main section of the bundle s Manifest file that is all lines prior to the first blank line p Manifest header names are case insensitive The methods of the returned tt Dictionary tt object will operate on header names in a case insensitive manner If a Manifest header begins with a it will be evaluated with the specified properties file for the specied Locale p For example the following Manifest headers and values are included if they are present in the Manifest file pre Bundle Name Bundle Vendor Bundle Version Bundle Description Bundle DocURL Bundle Contact Address pre p This method will continue to return Manifest header information while this bundle is in the tt UNINSTALLED tt state return A tt Dictionary tt object containing this bundle s Manifest headers and values exception java lang Security Exception If the caller does not have the tt Admin Permission tt and the Java Runtime Environment supports permissions public Dictionary get Headers String locale String framework check Admin Permission try initialize Manifest Localization catch Bundle Exception e framework publish Framework Event Framework Event ERROR this e return an empty dictinary return new Hashtable return manifest Localization get Headers locale String  ContactAddress SecurityException AdminPermission getHeaders localeString checkAdminPermission initializeManifestLocalization BundleException publishFrameworkEvent FrameworkEvent manifestLocalization getHeaders localeString
Retrieve the bundle s unique identifier which the framework assigned to this bundle when it was installed p The unique identifier has the following attributes ul li It is unique and persistent li The identifier is a long li Once its value is assigned to a bundle that value is not reused for another bundle even after the bundle is uninstalled li Its value does not change as long as the bundle remains installed li Its value does not change when the bundle is updated ul p This method will continue to return the bundle s unique identifier when the bundle is in the link UNINSTALLED state return This bundle s unique identifier public long get Bundle Id return bundledata get BundleID  getBundleId getBundleID
Retrieve the location identifier of the bundle This is typically the location passed to link Bundle Context Impl install Bundle String Bundle Context install Bundle when the bundle was installed The location identifier of the bundle may change during bundle update Calling this method while framework is updating the bundle results in undefined behavior p This method will continue to return the bundle s location identifier when the bundle is in the link UNINSTALLED state return A string that is the location identifier of the bundle exception java lang Security Exception If the caller does not have link Admin Permission permission and the Java runtime environment supports permissions public String get Location framework check Admin Permission return bundledata get Location  BundleContextImpl installBundle BundleContext installBundle SecurityException AdminPermission getLocation checkAdminPermission getLocation
Provides a list of link Service Reference Impl s for the services registered by this bundle or code null code if the bundle has no registered services p The list is valid at the time of the call to this method but the framework is a very dynamic environment and services can be modified or unregistered at anytime return An array of link Service Reference Impl or code null code exception java lang Illegal State Exception If the bundle has been uninstalled see Service Registration Impl see Service Reference Impl  ServiceReferenceImpl ServiceReferenceImpl IllegalStateException ServiceRegistrationImpl ServiceReferenceImpl
Provides a list of link Service Reference Impl s for the services this bundle is using or code null code if the bundle is not using any services A bundle is considered to be using a service if the bundle s use count for the service is greater than zero p The list is valid at the time of the call to this method but the framework is a very dynamic environment and services can be modified or unregistered at anytime return An array of link Service Reference Impl or code null code exception java lang Illegal State Exception If the bundle has been uninstalled see Service Reference Impl  ServiceReferenceImpl ServiceReferenceImpl IllegalStateException ServiceReferenceImpl
Determine whether the bundle has the requested permission p If the Java runtime environment does not supports permissions this method always returns code true code The permission parameter is of type code Object code to avoid referencing the code java security Permission code class directly This is to allow the framework to be implemented in Java environments which do not support permissions param permission The requested permission return code true code if the bundle has the requested permission or code false code if the bundle does not have the permission or the permission parameter is not an code instanceof java security Permission code exception java lang Illegal State Exception If the bundle has been uninstalled public boolean has Permission Object permission check Valid if domain null if permission instanceof Permission return domain implies Permission permission return false return true  IllegalStateException hasPermission checkValid
This method marks the bundle s state as changing so that other calls to start stop suspend update uninstall can wait until the state change is complete If state Changing is non null when this method is called we will wait for the state change to complete If the timeout expires without changing state this may happen if the state change is back up our call stack a Bundle Exception is thrown so that we don t wait forever A call to this method should be immediately followed by a try block whose finally block calls complete State Change begin State Change try change the bundle s state here finally complete State Change exception org osgi framework Bundle Exception if the bundles state is still changing after waiting for the timeout protected void begin State Change throws Bundle Exception synchronized statechange Lock boolean double Fault false while true if state Changing null state Changing Thread current Thread return if double Fault state Changing Thread current Thread throw new Bundle Exception Msg formatter get String BUNDLE STATE CHANGE EXCEPTION get Location state Changing get Name NON NLS 1 try if Debug DEBUG Debug DEBUG GENERAL Debug println Waiting for state to change in bundle this NON NLS 1 long start 0 if Debug DEBUG start System current Time Millis statechange Lock wait 5000 wait for other thread to finish changing state if Debug DEBUG long end System current Time Millis if end start 0 System out println Waiting get Symbolic Name end start NON NLS 1 catch Interrupted Exception e double Fault true  stateChanging BundleException completeStateChange beginStateChange completeStateChange BundleException beginStateChange BundleException statechangeLock doubleFault stateChanging stateChanging currentThread doubleFault stateChanging currentThread BundleException getString BUNDLE_STATE_CHANGE_EXCEPTION getLocation stateChanging getName DEBUG_GENERAL currentTimeMillis statechangeLock currentTimeMillis getSymbolicName InterruptedException doubleFault
This method completes the bundle state change by setting state Changing to null and notifying one waiter that the state change has completed protected void complete State Change synchronized statechange Lock if state Changing null state Changing null statechange Lock notify notify one waiting thread that the state change is complete  stateChanging completeStateChange statechangeLock stateChanging stateChanging statechangeLock
Return a string representation of this bundle return String public String to String return bundledata get Location get Bundle Id NON NLS 1 NON NLS 2  toString getLocation getBundleId
Answers an integer indicating the relative positions of the receiver and the argument in the natural order of elements of the receiver s class return int which should be 0 if the receiver should sort before the argument 0 if the receiver should sort in the same position as the argument and 0 if the receiver should sort after the argument param obj another Bundle an object to compare the receiver to exception Class Cast Exception if the argument can not be converted into something comparable with the receiver public int compare To Object obj int slcomp get Start Level Abstract Bundle obj get Start Level if slcomp 0 return slcomp long idcomp get Bundle Id Abstract Bundle obj get Bundle Id return idcomp 0L 1 idcomp 0L 1 0  ClassCastException compareTo getStartLevel AbstractBundle getStartLevel getBundleId AbstractBundle getBundleId
This method checks that the bundle is not uninstalled If the bundle is uninstalled an Illegal State Exception is thrown exception java lang Illegal State Exception If the bundle is uninstalled protected void check Valid if state UNINSTALLED throw new Illegal State Exception Msg formatter get String BUNDLE UNINSTALLED EXCEPTION get Location NON NLS 1  IllegalStateException IllegalStateException checkValid IllegalStateException getString BUNDLE_UNINSTALLED_EXCEPTION getLocation
Get the bundle s Protection Domain return bundle s Protection Domain protected Protection Domain get Protection Domain return domain  ProtectionDomain ProtectionDomain ProtectionDomain getProtectionDomain
protected boolean is Singleton return singleton  isSingleton
The bundle must unresolve the permissions in these packages param unresolved Packages A list of the package which have been unresolved as a result of a package Refresh protected void unresolve Permissions Hashtable unresolved Packages if domain null Bundle Permission Collection collection Bundle Permission Collection domain get Permissions if Debug DEBUG Debug DEBUG GENERAL Debug println Unresolving permissions in bundle this NON NLS 1 collection unresolve Permissions unresolved Packages  unresolvedPackages packageRefresh unresolvePermissions unresolvedPackages BundlePermissionCollection BundlePermissionCollection getPermissions DEBUG_GENERAL unresolvePermissions unresolvedPackages
public org osgi framework Bundle get Fragments check Valid return null  getFragments checkValid
public boolean is Fragment return false  isFragment
public org osgi framework Bundle get Host check Valid return null  getHost checkValid
see org osgi framework Bundle find Class java lang String public Class load Class String classname throws Class Not Found Exception return load Class classname true  findClass loadClass ClassNotFoundException loadClass
return Enumeration Access Controller do Privileged new Privileged Action public Object run return bundledata get Entry Paths path  AccessController doPrivileged PrivilegedAction getEntryPaths
public Enumeration get Entry Paths final String path try framework check Admin Permission catch Security Exception e return null check Valid if bundledata null if Debug DEBUG Debug DEBUG GENERAL Debug println Bundle get Resource Paths path called when bundledata null this NON NLS 1 NON NLS 2 Debug print Stack Trace new Exception Stack trace NON NLS 1 return null return Enumeration Access Controller do Privileged new Privileged Action public Object run return bundledata get Entry Paths path  getEntryPaths checkAdminPermission SecurityException checkValid DEBUG_GENERAL getResourcePaths printStackTrace AccessController doPrivileged PrivilegedAction getEntryPaths
final String ffile Name file Name return URL Access Controller do Privileged new Privileged Action public Object run return bundledata get Entry ffile Name  ffileName fileName AccessController doPrivileged PrivilegedAction getEntry ffileName
public URL get Entry String file Name try framework check Admin Permission catch Security Exception e return null check Valid if bundledata null if Debug DEBUG Debug DEBUG GENERAL Debug println Bundle get File file Name called when bundledata null this NON NLS 1 NON NLS 2 Debug print Stack Trace new Exception Stack trace NON NLS 1 return null if System get Security Manager null return bundledata get Entry file Name final String ffile Name file Name return URL Access Controller do Privileged new Privileged Action public Object run return bundledata get Entry ffile Name  getEntry fileName checkAdminPermission SecurityException checkValid DEBUG_GENERAL getFile fileName printStackTrace getSecurityManager getEntry fileName ffileName fileName AccessController doPrivileged PrivilegedAction getEntry ffileName
public String get Symbolic Name return bundledata get Symbolic Name  getSymbolicName getSymbolicName
public Bundle Data get Bundle Data return bundledata  BundleData getBundleData
public Version get Version return bundledata get Version  getVersion getVersion
protected Bundle Description get Bundle Description return framework adaptor get State get Bundle get Bundle Id  BundleDescription getBundleDescription getState getBundle getBundleId
protected int get Start Level return bundledata get Start Level  getStartLevel getStartLevel
public abstract Bundle Loader get Bundle Loader  BundleLoader getBundleLoader
Mark this bundle as resolved protected void resolve boolean singleton if domain null check Permissions state INSTALLED return if Debug DEBUG Debug DEBUG GENERAL if state INSTALLED 0 Debug println Bundle resolve called when state INSTALLED this NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 Need to see if this is a singleton if singleton this singleton true Abstract Bundle same Names framework bundles get Bundles get Symbolic Name if same Names null same Names length 1 for int i 0 i same Names length i if same Names i this if same Names i is Resolved same Names i singleton runtime Resolve Error Msg formatter get String BUNDLE SINGLETON RESOLVE ERROR this get Location same Names i get Location NON NLS 1 return if state INSTALLED state RESOLVED Do not publish RESOLVED event here This is done by caller to resolve if appropriate  checkPermissions DEBUG_GENERAL printStackTrace AbstractBundle sameNames getBundles getSymbolicName sameNames sameNames sameNames sameNames sameNames isResolved sameNames runtimeResolveError getString BUNDLE_SINGLETON_RESOLVE_ERROR getLocation sameNames getLocation
protected abstract boolean unresolve throws Bundle Exception  BundleException
Return the current context for this bundle return Bundle Context for this bundle  BundleContext
protected String get Resolution Failure Message String default Message Msg formatter get String BUNDLE UNRESOLVED EXCEPTION NON NLS 1 don t spend time if debug info is not needed if Debug DEBUG return default Message if runtime Resolve Error null return runtime Resolve Error do not null this field out until a successful resolve is done Bundle Description bundle Description get Bundle Description if bundle Description null return default Message just a sanity check this would be an inconsistency between the framework and the state if bundle Description is Resolved throw new Illegal State Exception Msg formatter get String BUNDLE UNRESOLVED STATE CONFLICT NON NLS 1 Version Constraint unsatisfied framework adaptor get Platform Admin get State Helper get Unsatisfied Constraints bundle Description if unsatisfied length 0 return Msg formatter get String BUNDLE UNRESOLVED NOT CHOSEN EXCEPTION NON NLS 1 String Buffer missing new String Buffer for int i 0 i unsatisfied length i if unsatisfied i instanceof Package Specification missing append Msg formatter get String BUNDLE UNRESOLVED PACKAGE to String unsatisfied i NON NLS 1 else if unsatisfied i instanceof Bundle Specification missing append Msg formatter get String BUNDLE UNRESOLVED BUNDLE to String unsatisfied i NON NLS 1 else missing append Msg formatter get String BUNDLE UNRESOLVED HOST to String unsatisfied i NON NLS 1 missing append missing delete Char At missing length 1 return Msg formatter get String BUNDLE UNRESOLVED UNSATISFIED CONSTRAINT EXCEPTION missing to String NON NLS 1  getResolutionFailureMessage defaultMessage getString BUNDLE_UNRESOLVED_EXCEPTION defaultMessage runtimeResolveError runtimeResolveError BundleDescription bundleDescription getBundleDescription bundleDescription defaultMessage bundleDescription isResolved IllegalStateException getString BUNDLE_UNRESOLVED_STATE_CONFLICT VersionConstraint getPlatformAdmin getStateHelper getUnsatisfiedConstraints bundleDescription getString BUNDLE_UNRESOLVED_NOT_CHOSEN_EXCEPTION StringBuffer StringBuffer PackageSpecification getString BUNDLE_UNRESOLVED_PACKAGE toString BundleSpecification getString BUNDLE_UNRESOLVED_BUNDLE toString getString BUNDLE_UNRESOLVED_HOST toString deleteCharAt getString BUNDLE_UNRESOLVED_UNSATISFIED_CONSTRAINT_EXCEPTION toString
private String to String Version Constraint constraint org eclipse osgi service resolver Version Range version Range constraint get Version Range if version Range null return constraint get Name return constraint get Name   version Range  toString VersionConstraint VersionRange versionRange getVersionRange versionRange getName getName _ versionRange
public int get Key Hash Code return int get Bundle Id  getKeyHashCode getBundleId
public boolean compare Keyed Element other return get Bundle Id Abstract Bundle other get Bundle Id  KeyedElement getBundleId AbstractBundle getBundleId
public Object get Key return new Long get Bundle Id  getKey getBundleId
protected boolean check Permissions runtime Resolve Error null Bundle Description bundle Desc get Bundle Description if bundle Desc null return false Package Specification pkgs bundle Desc get Packages for int i 0 i pkgs length i check to make sure the exporter has permissions Bundle Description supplier pkgs i get Supplier Abstract Bundle supplier Bundle supplier null null framework get Bundle supplier get Bundle Id if supplier Bundle null supplier Bundle check Export Package Permission pkgs i get Name runtime Resolve Error Msg formatter get String BUNDLE PERMISSION EXCEPTION EXPORT supplier Bundle pkgs i get Name NON NLS 1 return false check to make sure the importer has permissions if check Import Package Permission pkgs i get Name runtime Resolve Error Msg formatter get String BUNDLE PERMISSION EXCEPTION IMPORT this pkgs i get Name NON NLS 1 return false Bundle Specification bundles bundle Desc get Required Bundles for int i 0 i bundles length i check to make sure the provider has permissions Bundle Description supplier bundles i get Supplier Abstract Bundle supplier Bundle supplier null null framework get Bundle supplier get Bundle Id if supplier Bundle null supplier Bundle check Provide Bundle Permission bundles i get Name runtime Resolve Error Msg formatter get String BUNDLE PERMISSION EXCEPTION PROVIDE supplier Bundle bundles i get Name NON NLS 1 return false check to make sure the requirer has permissions if check Require Bundle Permission bundles i get Name runtime Resolve Error Msg formatter get String BUNDLE PERMISSION EXCEPTION REQUIRE this bundles i get Name NON NLS 1 return false Host Specification host bundle Desc get Host if host null check to make sure the host has permissions Bundle Description supplier host get Supplier Abstract Bundle supplier Bundle supplier null null framework get Bundle supplier get Bundle Id if supplier Bundle null supplier Bundle check Fragment Host Permission host get Name runtime Resolve Error Msg formatter get String BUNDLE PERMISSION EXCEPTION HOST supplier Bundle host get Name NON NLS 1 return false check to make sure the fragment has permissions if check Fragment Bundle Permission host get Name runtime Resolve Error Msg formatter get String BUNDLE PERMISSION EXCEPTION FRAGMENT this host get Name NON NLS 1 return false return true  checkPermissions runtimeResolveError BundleDescription bundleDesc getBundleDescription bundleDesc PackageSpecification bundleDesc getPackages BundleDescription getSupplier AbstractBundle supplierBundle getBundle getBundleId supplierBundle supplierBundle checkExportPackagePermission getName runtimeResolveError getString BUNDLE_PERMISSION_EXCEPTION_EXPORT supplierBundle getName checkImportPackagePermission getName runtimeResolveError getString BUNDLE_PERMISSION_EXCEPTION_IMPORT getName BundleSpecification bundleDesc getRequiredBundles BundleDescription getSupplier AbstractBundle supplierBundle getBundle getBundleId supplierBundle supplierBundle checkProvideBundlePermission getName runtimeResolveError getString BUNDLE_PERMISSION_EXCEPTION_PROVIDE supplierBundle getName checkRequireBundlePermission getName runtimeResolveError getString BUNDLE_PERMISSION_EXCEPTION_REQUIRE getName HostSpecification bundleDesc getHost BundleDescription getSupplier AbstractBundle supplierBundle getBundle getBundleId supplierBundle supplierBundle checkFragmentHostPermission getName runtimeResolveError getString BUNDLE_PERMISSION_EXCEPTION_HOST supplierBundle getName checkFragmentBundlePermission getName runtimeResolveError getString BUNDLE_PERMISSION_EXCEPTION_FRAGMENT getName
protected boolean check Export Package Permission String pkg Name if domain null return domain implies new Package Permission pkg Name Package Permission EXPORT return true  checkExportPackagePermission pkgName PackagePermission pkgName PackagePermission
protected boolean check Provide Bundle Permission String symbolic Name Return true until Bundle Permissions are better defined return true  checkProvideBundlePermission symbolicName BundlePermissions
protected boolean check Import Package Permission String pkg Name if domain null return domain implies new Package Permission pkg Name Package Permission IMPORT return true  checkImportPackagePermission pkgName PackagePermission pkgName PackagePermission
protected boolean check Require Bundle Permission String symbolic Name Return true until Bundle Permissions are better defined return true  checkRequireBundlePermission symbolicName BundlePermissions
protected boolean check Fragment Host Permission String symbolic Name Return true until Bundle Permissions are better defined return true  checkFragmentHostPermission symbolicName BundlePermissions
protected boolean check Fragment Bundle Permission String symbolic Name Return true until Bundle Permissions are better defined return true  checkFragmentBundlePermission symbolicName BundlePermissions
public Resource Bundle get Resource Bundle String locale String try initialize Manifest Localization catch Bundle Exception ex return null if locale String null locale String Locale get Default to String return manifest Localization get Resource Bundle locale String  ResourceBundle getResourceBundle localeString initializeManifestLocalization BundleException localeString localeString getDefault toString manifestLocalization getResourceBundle localeString
private void initialize Manifest Localization throws Bundle Exception if manifest Localization null Dictionary raw Headers raw Headers bundledata get Manifest manifest Localization new Manifest Localization this raw Headers  initializeManifestLocalization BundleException manifestLocalization rawHeaders rawHeaders getManifest manifestLocalization ManifestLocalization rawHeaders
public boolean test State Changing Object thread return state Changing thread  testStateChanging stateChanging
public Object get State Change Lock return statechange Lock  getStateChangeLock statechangeLock
public Thread get State Changing return state Changing  getStateChanging stateChanging

Constructor public Alias Mapper  AliasMapper
Return the master alias for the processor param processor Input name return aliased name if any public String alias Processor String processor processor processor to Lower Case if processor Alias Table null Input Stream in get Class get Resource As Stream Constants OSGI PROCESSOR ALIASES if in null try processor Alias Table init Aliases in finally try in close catch IO Exception ee if processor Alias Table null String alias String processor Alias Table get processor if alias null processor alias return processor  aliasProcessor toLowerCase processorAliasTable InputStream getClass getResourceAsStream OSGI_PROCESSOR_ALIASES processorAliasTable initAliases IOException processorAliasTable processorAliasTable
Return the master alias for the osname param osname Input name return aliased name if any public Object aliasOS Name String osname osname osname to Lower Case if osname Alias Table null Input Stream in get Class get Resource As Stream Constants OSGI OSNAME ALIASES if in null try osname Alias Table init Aliases in finally try in close catch IO Exception ee if osname Alias Table null Object alias Object osname Alias Table get osname String alias String osname Alias Table get osname if alias Object null if alias Object instanceof String osname String alias Object else return Vector alias Object return osname  aliasOSName toLowerCase osnameAliasTable InputStream getClass getResourceAsStream OSGI_OSNAME_ALIASES osnameAliasTable initAliases IOException osnameAliasTable aliasObject osnameAliasTable osnameAliasTable aliasObject aliasObject aliasObject aliasObject
Read alias data and populate a Hashtable param in Input Stream from which to read alias data return Hashtable of aliases protected static Hashtable init Aliases Input Stream in Hashtable aliases new Hashtable 37 try Buffered Reader br try br new Buffered Reader new Input Stream Reader in UTF8 NON NLS 1 catch Unsupported Encoding Exception e br new Buffered Reader new Input Stream Reader in while true String line br read Line if line null EOF break done Tokenizer tokenizer new Tokenizer line String master tokenizer get String t NON NLS 1 if master null aliases put master to Lower Case master parseloop while true String alias tokenizer get String t NON NLS 1 if alias null break parseloop String lower Case Alias alias to Lower Case Object stored Master aliases get lower Case Alias if stored Master null aliases put lower Case Alias master else if stored Master instanceof String Vector new Master new Vector new Master add stored Master new Master add master aliases put lower Case Alias new Master else Vector stored Master add master aliases put lower Case Alias stored Master catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug print Stack Trace e return aliases  InputStream initAliases InputStream BufferedReader BufferedReader InputStreamReader UnsupportedEncodingException BufferedReader InputStreamReader readLine getString toLowerCase getString lowerCaseAlias toLowerCase storedMaster lowerCaseAlias storedMaster lowerCaseAlias storedMaster newMaster newMaster storedMaster newMaster lowerCaseAlias newMaster storedMaster lowerCaseAlias storedMaster IOException DEBUG_GENERAL printStackTrace

Create a permission combiner class param implied The permissions a bundle always has Bundle Combined Permissions Bundle Permission Collection implied this implied implied set Read Only this doesn t really mean anything  BundleCombinedPermissions BundlePermissionCollection setReadOnly
Assign the administrator defined permissions param assigned The permissions assigned by the administrator void set Assigned Permissions Bundle Permission Collection assigned this assigned assigned  setAssignedPermissions BundlePermissionCollection
The Permission collection will unresolve the permissions in these packages param unresolved Packages A list of the package which have been unresolved as a result of a package Refresh void unresolve Permissions Hashtable unresolved Packages if assigned null assigned unresolve Permissions unresolved Packages if implied null implied unresolve Permissions unresolved Packages  unresolvedPackages packageRefresh unresolvePermissions unresolvedPackages unresolvePermissions unresolvedPackages unresolvePermissions unresolvedPackages
Adds the argument to the collection parampermission java security Permission the permission to add to the collection exception Security Exception if the collection is read only public void add Permission permission throw new Security Exception  exceptionSecurityException SecurityException
Answers an enumeration of the permissions in the receiver return Enumeration the permissions in the receiver public Enumeration elements return new Enumeration private int i 0 private Enumeration enums enums new Enumeration assigned null null assigned elements implied null null implied elements Answers if this Enumeration has more elements returntrue if there are more elements false otherwise see next Element public boolean has More Elements while i enums length Enumeration enum enums i if enum null enum has More Elements return true i return false Answers the next element in this Enumeration returnthe next element in this Enumeration exception No Such Element Exception when there are no more elements see has More Elements public Object next Element while i enums length try Enumeration enum enums i if enum null return enum next Element catch No Such Element Exception e i throw new No Such Element Exception  returnEnumeration nextElement hasMoreElements hasMoreElements exceptionNoSuchElementException hasMoreElements nextElement nextElement NoSuchElementException NoSuchElementException
Indicates whether the argument permission is implied by the permissions contained in the receiver returnboolean code true code if the argument permission is implied by the permissions in the receiver and code false code if it is not parampermission java security Permission the permission to check public boolean implies Permission permission return assigned null assigned implies permission implied null implied implies permission 

Construct a Bundle Context which wrappers the framework for a bundle param bundle The bundle we are wrapping protected Bundle Context Impl Bundle Host bundle this bundle bundle valid true framework bundle framework bundle Event null bundle Event Sync null service Event null framework Event null services In Use null activator null  BundleContext BundleContextImpl BundleHost bundleEvent bundleEventSync serviceEvent frameworkEvent servicesInUse
Destroy the wrapper This is called when the bundle is stopped protected void close valid false invalidate context if service Event null framework service Event remove Listener this service Event null if framework Event null framework framework Event remove Listener this framework Event null if bundle Event null framework bundle Event remove Listener this bundle Event null if bundle Event Sync null framework bundle Event Sync remove Listener this bundle Event Sync null service s registered by the bundle if any are unregistered Service Reference published References null synchronized framework service Registry published References framework service Registry lookup Service References this if published References null for int i 0 i published References length i try Service Reference Impl published References i registration unregister catch Illegal State Exception e already unregistered service s used by the bundle if any are released if services In Use null int used Size Service Reference used Refs null synchronized services In Use used Size services In Use size if used Size 0 if Debug DEBUG Debug DEBUG SERVICES Debug println Releasing services NON NLS 1 used Refs new Service Reference used Size Enumeration enum services In Use keys for int i 0 i used Size i used Refs i Service Reference enum next Element for int i 0 i used Size i Service Reference Impl used Refs i registration release Service this services In Use null bundle null  serviceEvent serviceEvent removeListener serviceEvent frameworkEvent frameworkEvent removeListener frameworkEvent bundleEvent bundleEvent removeListener bundleEvent bundleEventSync bundleEventSync removeListener bundleEventSync ServiceReference publishedReferences serviceRegistry publishedReferences serviceRegistry lookupServiceReferences publishedReferences publishedReferences ServiceReferenceImpl publishedReferences IllegalStateException servicesInUse usedSize ServiceReference usedRefs servicesInUse usedSize servicesInUse usedSize DEBUG_SERVICES usedRefs ServiceReference usedSize servicesInUse usedSize usedRefs ServiceReference nextElement usedSize ServiceReferenceImpl usedRefs releaseService servicesInUse
Retrieve the value of the named environment property param key The name of the requested property return The value of the requested property or code null code if the property is undefined public String get Property String key Security Manager sm System get Security Manager if sm null sm check Property Access key return framework get Property key  getProperty SecurityManager getSecurityManager checkPropertyAccess getProperty
Retrieve the Bundle object for the context bundle return The context bundle s Bundle object public org osgi framework Bundle get Bundle check Valid return bundle  getBundle checkValid
Install a bundle from a location The bundle is obtained from the location parameter as interpreted by the framework in an implementation dependent way Typically location will most likely be a URL param location The location identifier of the bundle to install return The Bundle object of the installed bundle public org osgi framework Bundle install Bundle String location throws Bundle Exception framework check Admin Permission check Valid return framework install Bundle location  installBundle BundleException checkAdminPermission checkValid installBundle
Install a bundle from an Input Stream p This method performs all the steps listed in link install Bundle java lang String except the bundle s content will be read from the Input Stream The location identifier specified will be used as the identity of the bundle param location The location identifier of the bundle to install param in The Input Stream from which the bundle will be read return The Bundle of the installed bundle public org osgi framework Bundle install Bundle String location Input Stream in throws Bundle Exception framework check Admin Permission check Valid return framework install Bundle location in  InputStream installBundle InputStream InputStream installBundle InputStream BundleException checkAdminPermission checkValid installBundle
Retrieve the bundle that has the given unique identifier param id The identifier of the bundle to retrieve return A Bundle object or code null code if the identifier doesn t match any installed bundle public org osgi framework Bundle get Bundle long id return framework get Bundle id  getBundle getBundle
Retrieve the bundle that has the given location param location The location string of the bundle to retrieve return A Bundle object or code null code if the location doesn t match any installed bundle public Abstract Bundle get Bundle By Location String location return framework get Bundle By Location location  AbstractBundle getBundleByLocation getBundleByLocation
Retrieve a list of all installed bundles The list is valid at the time of the call to get Bundles but the framework is a very dynamic environment and bundles can be installed or uninstalled at anytime return An array of link Abstract Bundle objects one object per installed bundle public org osgi framework Bundle get Bundles return framework get All Bundles  getBundles AbstractBundle getBundles getAllBundles
Add a service listener with a filter link Service Listener s are notified when a service has a lifecycle state change See link get Service References String String get Service References for a description of the filter syntax The listener is added to the context bundle s list of listeners See link get Bundle get Bundle for a definition of context bundle p The listener is called if the filter criteria is met To filter based upon the class of the service the filter should reference the object Class property If the filter paramater is code null code all services are considered to match the filter p If the Java runtime environment supports permissions then additional filtering is done link Abstract Bundle has Permission Object Bundle has Permission is called for the bundle which defines the listener to validate that the listener has the link Service Permission permission to code get code the service using at least one of the named classes the service was registered under param listener The service listener to add param filter The filter criteria exception Invalid Syntax Exception If the filter parameter contains an invalid filter string which cannot be parsed see Service Event see Service Listener exception java lang Illegal State Exception If the bundle context has stopped public void add Service Listener Service Listener listener String filter throws Invalid Syntax Exception check Valid if Debug DEBUG Debug DEBUG EVENTS String listener Name listener get Class get Name Integer to Hex String listener hash Code NON NLS 1 Debug println add Service Listener bundle listener Name filter NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 Service Listener filtered Listener filter null listener new Filtered Service Listener filter listener synchronized framework service Event if service Event null service Event new Event Listeners framework service Event add Listener this this service Event add Listener listener filtered Listener  ServiceListener getServiceReferences getServiceReferences getBundle getBundle objectClass AbstractBundle hasPermission hasPermission ServicePermission InvalidSyntaxException ServiceEvent ServiceListener IllegalStateException addServiceListener ServiceListener InvalidSyntaxException checkValid DEBUG_EVENTS listenerName getClass getName toHexString hashCode addServiceListener listenerName ServiceListener filteredListener FilteredServiceListener serviceEvent serviceEvent serviceEvent EventListeners serviceEvent addListener serviceEvent addListener filteredListener
Add a service listener p This method is the same as calling link add Service Listener Service Listener String with filter set to code null code see add Service Listener Service Listener String public void add Service Listener Service Listener listener try add Service Listener listener null catch Invalid Syntax Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Invalid Syntax Exception w null filter e get Message NON NLS 1 Debug print Stack Trace e  addServiceListener ServiceListener addServiceListener ServiceListener addServiceListener ServiceListener addServiceListener InvalidSyntaxException DEBUG_GENERAL InvalidSyntaxException getMessage printStackTrace
Remove a service listener The listener is removed from the context bundle s list of listeners See link get Bundle get Bundle for a definition of context bundle p If this method is called with a listener which is not registered then this method does nothing param listener The service listener to remove exception java lang Illegal State Exception If the bundle context has stopped public void remove Service Listener Service Listener listener check Valid if Debug DEBUG Debug DEBUG SERVICES String listener Name listener get Class get Name Integer to Hex String listener hash Code NON NLS 1 Debug println remove Service Listener bundle listener Name NON NLS 1 NON NLS 2 NON NLS 3 if service Event null synchronized framework service Event service Event remove Listener listener  getBundle getBundle IllegalStateException removeServiceListener ServiceListener checkValid DEBUG_SERVICES listenerName getClass getName toHexString hashCode removeServiceListener listenerName serviceEvent serviceEvent serviceEvent removeListener
Add a bundle listener link Bundle Listener s are notified when a bundle has a lifecycle state change The listener is added to the context bundle s list of listeners See link get Bundle get Bundle for a definition of context bundle param listener The bundle listener to add exception java lang Illegal State Exception If the bundle context has stopped see Bundle Event see Bundle Listener public void add Bundle Listener Bundle Listener listener check Valid if Debug DEBUG Debug DEBUG EVENTS String listener Name listener get Class get Name Integer to Hex String listener hash Code NON NLS 1 Debug println add Bundle Listener bundle listener Name NON NLS 1 NON NLS 2 NON NLS 3 if listener instanceof Synchronous Bundle Listener framework check Admin Permission synchronized framework bundle Event Sync if bundle Event Sync null bundle Event Sync new Event Listeners framework bundle Event Sync add Listener this this bundle Event Sync add Listener listener listener else synchronized framework bundle Event if bundle Event null bundle Event new Event Listeners framework bundle Event add Listener this this bundle Event add Listener listener listener  BundleListener getBundle getBundle IllegalStateException BundleEvent BundleListener addBundleListener BundleListener checkValid DEBUG_EVENTS listenerName getClass getName toHexString hashCode addBundleListener listenerName SynchronousBundleListener checkAdminPermission bundleEventSync bundleEventSync bundleEventSync EventListeners bundleEventSync addListener bundleEventSync addListener bundleEvent bundleEvent bundleEvent EventListeners bundleEvent addListener bundleEvent addListener
Remove a bundle listener The listener is removed from the context bundle s list of listeners See link get Bundle get Bundle for a definition of context bundle p If this method is called with a listener which is not registered then this method does nothing param listener The bundle listener to remove exception java lang Illegal State Exception If the bundle context has stopped public void remove Bundle Listener Bundle Listener listener check Valid if Debug DEBUG Debug DEBUG EVENTS String listener Name listener get Class get Name Integer to Hex String listener hash Code NON NLS 1 Debug println remove Bundle Listener bundle listener Name NON NLS 1 NON NLS 2 NON NLS 3 if listener instanceof Synchronous Bundle Listener framework check Admin Permission if bundle Event Sync null synchronized framework bundle Event Sync bundle Event Sync remove Listener listener else if bundle Event null synchronized framework bundle Event bundle Event remove Listener listener  getBundle getBundle IllegalStateException removeBundleListener BundleListener checkValid DEBUG_EVENTS listenerName getClass getName toHexString hashCode removeBundleListener listenerName SynchronousBundleListener checkAdminPermission bundleEventSync bundleEventSync bundleEventSync removeListener bundleEvent bundleEvent bundleEvent removeListener
Add a general framework listener link Framework Listener s are notified of general framework events The listener is added to the context bundle s list of listeners See link get Bundle get Bundle for a definition of context bundle param listener The framework listener to add exception java lang Illegal State Exception If the bundle context has stopped see Framework Event see Framework Listener public void add Framework Listener Framework Listener listener check Valid if Debug DEBUG Debug DEBUG EVENTS String listener Name listener get Class get Name Integer to Hex String listener hash Code NON NLS 1 Debug println add Framework Listener bundle listener Name NON NLS 1 NON NLS 2 NON NLS 3 synchronized framework framework Event if framework Event null framework Event new Event Listeners framework framework Event add Listener this this framework Event add Listener listener listener  FrameworkListener getBundle getBundle IllegalStateException FrameworkEvent FrameworkListener addFrameworkListener FrameworkListener checkValid DEBUG_EVENTS listenerName getClass getName toHexString hashCode addFrameworkListener listenerName frameworkEvent frameworkEvent frameworkEvent EventListeners frameworkEvent addListener frameworkEvent addListener
Remove a framework listener The listener is removed from the context bundle s list of listeners See link get Bundle get Bundle for a definition of context bundle p If this method is called with a listener which is not registered then this method does nothing param listener The framework listener to remove exception java lang Illegal State Exception If the bundle context has stopped public void remove Framework Listener Framework Listener listener check Valid if Debug DEBUG Debug DEBUG EVENTS String listener Name listener get Class get Name Integer to Hex String listener hash Code NON NLS 1 Debug println remove Framework Listener bundle listener Name NON NLS 1 NON NLS 2 NON NLS 3 if framework Event null synchronized framework framework Event framework Event remove Listener listener  getBundle getBundle IllegalStateException removeFrameworkListener FrameworkListener checkValid DEBUG_EVENTS listenerName getClass getName toHexString hashCode removeFrameworkListener listenerName frameworkEvent frameworkEvent frameworkEvent removeListener
Register a service with multiple names This method registers the given service object with the given properties under the given class names A link Service Registration Impl object is returned The link Service Registration Impl object is for the private use of the bundle registering the service and should not be shared with other bundles The registering bundle is defined to be the context bundle See link get Bundle for a definition of context bundle Other bundles can locate the service by using either the link get Service References get Service References or link get Service Reference get Service Reference method p A bundle can register a service object that implements the link Service Factory interface to have more flexiblity in providing service objects to different bundles p The following steps are followed to register a service ol li If the service parameter is not a link Service Factory an code Illegal Argument Exception code is thrown if the service parameter is not an code instanceof code all the classes named li The service is added to the framework s service registry and may now be used by other bundles li A link Service Event of type link Service Event REGISTERED is synchronously sent li A link Service Registration Impl object for this registration is returned ol param clazzes The class names under which the service can be located The class names in this array will be stored in the service s properties under the key object Class param service The service object or a link Service Factory object param properties The properties for this service The keys in the properties object must all be Strings Changes should not be made to this object after calling this method To update the service s properties call the link Service Registration Impl set Properties Service Registration set Properties method This parameter may be code null code if the service has no properties return A link Service Registration Impl object for use by the bundle registering the service to update the service s properties or to unregister the service exception java lang Illegal Argument Exception If one of the following is true ul li The service parameter is null li The service parameter is not a link Service Factory and is not an code instanceof code all the named classes in the clazzes parameter ul exception java lang Security Exception If the caller does not have link Service Permission permission to register the service for all the named classes and the Java runtime environment supports permissions exception java lang Illegal State Exception If the bundle context has stopped see Service Registration Impl see Service Factory public org osgi framework Service Registration register Service String clazzes Object service Dictionary properties check Valid if service null if Debug DEBUG Debug DEBUG SERVICES Debug println Service object is null NON NLS 1 throw new Null Pointer Exception Msg formatter get String SERVICE ARGUMENT NULL EXCEPTION NON NLS 1 int size clazzes length if size 0 if Debug DEBUG Debug DEBUG SERVICES Debug println Classes array is empty NON NLS 1 throw new Illegal Argument Exception Msg formatter get String SERVICE EMPTY CLASS LIST EXCEPTION NON NLS 1 copy the array so that changes to the original will not affect us String copy new String clazzes length for int i 0 i clazzes length i copy i new String clazzes i get Bytes clazzes copy check for Service Permissions framework check Register Service Permission clazzes if service instanceof Service Factory Package Admin Impl package Admin framework package Admin for int i 0 i size i Class clazz package Admin load Service Class clazzes i bundle if clazz null if Debug DEBUG Debug DEBUG SERVICES Debug println clazzes i class not found NON NLS 1 throw new Illegal Argument Exception Msg formatter get String SERVICE CLASS NOT FOUND EXCEPTION clazzes i NON NLS 1 if clazz is Instance service if Debug DEBUG Debug DEBUG SERVICES Debug println Service object is not an instanceof clazzes i NON NLS 1 throw new Illegal Argument Exception Msg formatter get String SERVICE NOT INSTANCEOF CLASS EXCEPTION clazzes i NON NLS 1 return create Service Registration clazzes service properties  ServiceRegistrationImpl ServiceRegistrationImpl getBundle getServiceReferences getServiceReferences getServiceReference getServiceReference ServiceFactory ServiceFactory IllegalArgumentException ServiceEvent ServiceEvent ServiceRegistrationImpl objectClass ServiceFactory ServiceRegistrationImpl setProperties ServiceRegistration setProperties ServiceRegistrationImpl IllegalArgumentException ServiceFactory SecurityException ServicePermission IllegalStateException ServiceRegistrationImpl ServiceFactory ServiceRegistration registerService checkValid DEBUG_SERVICES NullPointerException getString SERVICE_ARGUMENT_NULL_EXCEPTION DEBUG_SERVICES IllegalArgumentException getString SERVICE_EMPTY_CLASS_LIST_EXCEPTION getBytes ServicePermissions checkRegisterServicePermission ServiceFactory PackageAdminImpl packageAdmin packageAdmin packageAdmin loadServiceClass DEBUG_SERVICES IllegalArgumentException getString SERVICE_CLASS_NOT_FOUND_EXCEPTION isInstance DEBUG_SERVICES IllegalArgumentException getString SERVICE_NOT_INSTANCEOF_CLASS_EXCEPTION createServiceRegistration
Create a new Service Registration object This method is used so that it may be overridden by a secure implementation param clazzes The class names under which the service can be located param service The service object or a link Service Factory object param properties The properties for this service return A link Service Registration Impl object for use by the bundle protected Service Registration Impl create Service Registration String clazzes Object service Dictionary properties return new Service Registration Impl this clazzes service properties  ServiceRegistration ServiceFactory ServiceRegistrationImpl ServiceRegistrationImpl createServiceRegistration ServiceRegistrationImpl
Register a service with a single name This method registers the given service object with the given properties under the given class name p This method is otherwise identical to link register Service java lang String java lang Object java util Dictionary and is provided as a convenience when the service parameter will only be registered under a single class name see register Service java lang String java lang Object java util Dictionary public org osgi framework Service Registration register Service String clazz Object service Dictionary properties String clazzes new String clazz return register Service clazzes service properties  registerService registerService ServiceRegistration registerService registerService
Returns a list of tt Service Reference tt objects This method returns a list of tt Service Reference tt objects for services which implement and were registered under the specified class and match the specified filter criteria p The list is valid at the time of the call to this method however as the Framework is a very dynamic environment services can be modified or unregistered at anytime p tt filter tt is used to select the registered service whose properties objects contain keys and values which satisfy the filter See link Filter Impl for a description of the filter string syntax p If tt filter tt is tt null tt all registered services are considered to match the filter p If tt filter tt cannot be parsed an link Invalid Syntax Exception will be thrown with a human readable message where the filter became unparsable p The following steps are required to select a service ol li If the Java Runtime Environment supports permissions the caller is checked for the tt Service Permission tt to get the service with the specified class If the caller does not have the correct permission tt null tt is returned li If the filter string is not tt null tt the filter string is parsed and the set of registered services which satisfy the filter is produced If the filter string is tt null tt then all registered services are considered to satisfy the filter li If code clazz code is not tt null tt the set is further reduced to those services which are an tt instanceof tt and were registered under the specified class The complete list of classes of which a service is an instance and which were specified when the service was registered is available from the service s link Constants OBJECTCLASS property li An array of tt Service Reference tt to the selected services is returned ol param clazz The class name with which the service was registered or tt null tt for all services param filter The filter criteria return An array of tt Service Reference tt objects or tt null tt if no services are registered which satisfy the search exception Invalid Syntax Exception If tt filter tt contains an invalid filter string which cannot be parsed public org osgi framework Service Reference get Service References String clazz String filter throws Invalid Syntax Exception check Valid if Debug DEBUG Debug DEBUG SERVICES Debug println get Service References clazz filter NON NLS 1 NON NLS 2 NON NLS 3 return framework get Service References clazz filter  ServiceReference ServiceReference FilterImpl InvalidSyntaxException ServicePermission ServiceReference ServiceReference InvalidSyntaxException ServiceReference getServiceReferences InvalidSyntaxException checkValid DEBUG_SERVICES getServiceReferences getServiceReferences
Get a service reference Retrieves a link Service Reference Impl for a service which implements the named class p This reference is valid at the time of the call to this method but since the framework is a very dynamic environment services can be modified or unregistered at anytime p This method is provided as a convenience for when the caller is interested in any service which implements a named class This method is the same as calling link get Service References get Service References with a code null code filter string but only a single link Service Reference Impl is returned param clazz The class name which the service must implement return A link Service Reference Impl object or code null code if no services are registered which implement the named class see get Service References public org osgi framework Service Reference get Service Reference String clazz check Valid if Debug DEBUG Debug DEBUG SERVICES Debug println get Service Reference clazz NON NLS 1 NON NLS 2 try Service Reference references framework get Service References clazz null if references null int index 0 int length references length if length 1 if more than one service select highest ranking int rankings new int length int count 0 int max Ranking Integer MIN VALUE for int i 0 i length i int ranking Service Reference Impl references i get Ranking rankings i ranking if ranking max Ranking index i max Ranking ranking count 1 else if ranking max Ranking count if count 1 if still more than one service select lowest id long min Id Long MAX VALUE for int i 0 i length i if rankings i max Ranking long id Service Reference Impl references i get Id if id min Id index i min Id id return references index catch Invalid Syntax Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Invalid Syntax Exception w null filter e get Message NON NLS 1 Debug print Stack Trace e return null  ServiceReferenceImpl getServiceReferences getServiceReferences ServiceReferenceImpl ServiceReferenceImpl getServiceReferences ServiceReference getServiceReference checkValid DEBUG_SERVICES getServiceReference ServiceReference getServiceReferences maxRanking MIN_VALUE ServiceReferenceImpl getRanking maxRanking maxRanking maxRanking minId MAX_VALUE maxRanking ServiceReferenceImpl getId minId minId InvalidSyntaxException DEBUG_GENERAL InvalidSyntaxException getMessage printStackTrace
Get a service s service object Retrieves the service object for a service A bundle s use of a service is tracked by a use count Each time a service s service object is returned by link get Service the context bundle s use count for the service is incremented by one Each time the service is release by link unget Service the context bundle s use count for the service is decremented by one When a bundle s use count for a service drops to zero the bundle should no longer use the service See link get Bundle for a definition of context bundle p This method will always return code null code when the service associated with this reference has been unregistered p The following steps are followed to get the service object ol li If the service has been unregistered code null code is returned li The context bundle s use count for this service is incremented by one li If the context bundle s use count for the service is now one and the service was registered with a link Service Factory the link Service Factory get Service Service Factory get Service method is called to create a service object for the context bundle This service object is cached by the framework While the context bundle s use count for the service is greater than zero subsequent calls to get the services s service object for the context bundle will return the cached service object br If the service object returned by the link Service Factory is not an code instanceof code all the classes named when the service was registered or the link Service Factory throws an exception code null code is returned and a link Framework Event of type link Framework Event ERROR is broadcast li The service object for the service is returned ol param reference A reference to the service whose service object is desired return A service object for the service associated with this reference or code null code if the service is not registered exception java lang Security Exception If the caller does not have link Service Permission permission to get the service using at least one of the named classes the service was registered under and the Java runtime environment supports permissions exception java lang Illegal State Exception If the bundle context has stopped see unget Service see Service Factory public Object get Service org osgi framework Service Reference reference check Valid if services In Use null synchronized context Lock if services In Use null Cannot predict how many services a bundle will use start with a small table services In Use new Hashtable 10 Service Registration Impl registration Service Reference Impl reference registration framework check Get Service Permission registration clazzes return registration get Service Bundle Context Impl this  getService ungetService getBundle ServiceFactory ServiceFactory getService ServiceFactory getService ServiceFactory ServiceFactory FrameworkEvent FrameworkEvent SecurityException ServicePermission IllegalStateException ungetService ServiceFactory getService ServiceReference checkValid servicesInUse contextLock servicesInUse servicesInUse ServiceRegistrationImpl ServiceReferenceImpl checkGetServicePermission getService BundleContextImpl
Unget a service s service object Releases the service object for a service If the context bundle s use count for the service is zero this method returns code false code Otherwise the context bundle s use count for the service is decremented by one See link get Bundle for a definition of context bundle p The service s service object should no longer be used and all references to it should be destroyed when a bundle s use count for the service drops to zero p The following steps are followed to unget the service object ol li If the context bundle s use count for the service is zero or the service has been unregistered code false code is returned li The context bundle s use count for this service is decremented by one li If the context bundle s use count for the service is now zero and the service was registered with a link Service Factory the link Service Factory unget Service Service Factory unget Service method is called to release the service object for the context bundle li code true code is returned ol param reference A reference to the service to be released return code false code if the context bundle s use count for the service is zero or if the service has been unregistered otherwise code true code exception java lang Illegal State Exception If the bundle context has stopped see get Service see Service Factory public boolean unget Service org osgi framework Service Reference reference check Valid Service Registration Impl registration Service Reference Impl reference registration return registration unget Service Bundle Context Impl this  getBundle ServiceFactory ServiceFactory ungetService ServiceFactory ungetService IllegalStateException getService ServiceFactory ungetService ServiceReference checkValid ServiceRegistrationImpl ServiceReferenceImpl ungetService BundleContextImpl
Creates a code File code object for a file in the persistent storage area provided for the bundle by the framework If the adaptor does not have file system support this method will return code null code p A code File code object for the base directory of the persistent storage area provided for the context bundle by the framework can be obtained by calling this method with the empty string as the parameter See link get Bundle for a definition of context bundle p If the Java runtime environment supports permissions the framework the will ensure that the bundle has code java io File Permission code with actions read write execute delete for all files recursively in the persistent storage area provided for the context bundle by the framework param filename A relative name to the file to be accessed return A code File code object that represents the requested file or code null code if the adaptor does not have file system support exception java lang Illegal State Exception If the bundle context has stopped public File get Data File String filename check Valid return framework get Data File bundle filename  getBundle FilePermission IllegalStateException getDataFile checkValid getDataFile
Call bundle s Bundle Activator start This method is called by Bundle start Worker to start the bundle exception org osgi framework Bundle Exception if the bundle has a class that implements the Bundle Activator interface but Framework couldn t instantiate it or the Bundle Activator start method failed protected void start throws Bundle Exception activator bundle load Bundle Activator if activator null try start Activator activator catch Bundle Exception be activator null throw be activator completed successfully We must use this same activator object when we stop this bundle  BundleActivator startWorker BundleException BundleActivator BundleActivator BundleException loadBundleActivator startActivator BundleException
Access Controller do Privileged new Privileged Exception Action public Object run throws Exception if bundle Activator null Start the bundle synchronously bundle Activator start Bundle Context Impl this return null  AccessController doPrivileged PrivilegedExceptionAction bundleActivator bundleActivator BundleContextImpl
Calls the start method of a Bundle Activator param bundle Activator that activator to start protected void start Activator final Bundle Activator bundle Activator throws Bundle Exception try Access Controller do Privileged new Privileged Exception Action public Object run throws Exception if bundle Activator null Start the bundle synchronously bundle Activator start Bundle Context Impl this return null catch Throwable t if t instanceof Privileged Action Exception t Privileged Action Exception t get Exception if Debug DEBUG Debug DEBUG GENERAL Debug print Stack Trace t String clazz null clazz bundle Activator get Class get Name throw new Bundle Exception Msg formatter get String BUNDLE ACTIVATOR EXCEPTION new Object clazz start bundle get Symbolic Name null bundle get Bundle Id bundle get Symbolic Name t NON NLS 1 NON NLS 2 NON NLS 3  BundleActivator bundleActivator startActivator BundleActivator bundleActivator BundleException AccessController doPrivileged PrivilegedExceptionAction bundleActivator bundleActivator BundleContextImpl PrivilegedActionException PrivilegedActionException getException DEBUG_GENERAL printStackTrace bundleActivator getClass getName BundleException getString BUNDLE_ACTIVATOR_EXCEPTION getSymbolicName getBundleId getSymbolicName
Access Controller do Privileged new Privileged Exception Action public Object run throws Exception if activator null Stop the bundle synchronously activator stop Bundle Context Impl this return null  AccessController doPrivileged PrivilegedExceptionAction BundleContextImpl
Call bundle s Bundle Activator stop This method is called by Bundle stop Worker to stop the bundle exception org osgi framework Bundle Exception if the bundle has a class that implements the Bundle Activator interface and the Bundle Activator stop method failed protected void stop throws Bundle Exception try Access Controller do Privileged new Privileged Exception Action public Object run throws Exception if activator null Stop the bundle synchronously activator stop Bundle Context Impl this return null catch Throwable t if t instanceof Privileged Action Exception t Privileged Action Exception t get Exception if Debug DEBUG Debug DEBUG GENERAL Debug print Stack Trace t String clazz activator null activator get Class get Name NON NLS 1 throw new Bundle Exception Msg formatter get String BUNDLE ACTIVATOR EXCEPTION new Object clazz stop bundle get Symbolic Name null bundle get Bundle Id bundle get Symbolic Name t NON NLS 1 NON NLS 2 NON NLS 3 finally activator null  BundleActivator stopWorker BundleException BundleActivator BundleActivator BundleException AccessController doPrivileged PrivilegedExceptionAction BundleContextImpl PrivilegedActionException PrivilegedActionException getException DEBUG_GENERAL printStackTrace getClass getName BundleException getString BUNDLE_ACTIVATOR_EXCEPTION getSymbolicName getBundleId getSymbolicName
Provides a list of link Service Reference s for the services registered by this bundle or code null code if the bundle has no registered services p The list is valid at the time of the call to this method but the framework is a very dynamic environment and services can be modified or unregistered at anytime return An array of link Service Reference or code null code exception java lang Illegal State Exception If the bundle has been uninstalled see Service Registration Impl see Service Reference Impl protected Service Reference get Registered Services Service Reference services null synchronized framework service Registry services framework service Registry lookup Service References this if services null return null int removed 0 for int i services length 1 i 0 i Service Reference Impl ref Service Reference Impl services i String classes ref get Classes try test for permission to the classes framework check Get Service Permission classes catch Security Exception se services i null removed if removed 0 Service Reference temp services services new Service Reference temp length removed for int i temp length 1 i 0 i if temp i null removed else services i removed temp i return services  ServiceReference ServiceReference IllegalStateException ServiceRegistrationImpl ServiceReferenceImpl ServiceReference getRegisteredServices ServiceReference serviceRegistry serviceRegistry lookupServiceReferences ServiceReferenceImpl ServiceReferenceImpl getClasses checkGetServicePermission SecurityException ServiceReference ServiceReference
Provides a list of link Service Reference Impl s for the services this bundle is using or code null code if the bundle is not using any services A bundle is considered to be using a service if the bundle s use count for the service is greater than zero p The list is valid at the time of the call to this method but the framework is a very dynamic environment and services can be modified or unregistered at anytime return An array of link Service Reference Impl or code null code exception java lang Illegal State Exception If the bundle has been uninstalled see Service Reference Impl protected Service Reference Impl get Services In Use if services In Use null return null synchronized services In Use int size services In Use size if size 0 return null Service Reference Impl references new Service Reference Impl size int refcount 0 Enumeration enum services In Use keys for int i 0 i size i Service Reference Impl reference Service Reference Impl enum next Element try framework check Get Service Permission reference registration clazzes catch Security Exception se continue references refcount reference refcount if refcount size if refcount 0 return null Service Reference Impl refs references references new Service Reference Impl refcount System arraycopy refs 0 references 0 refcount return references  ServiceReferenceImpl ServiceReferenceImpl IllegalStateException ServiceReferenceImpl ServiceReferenceImpl getServicesInUse servicesInUse servicesInUse servicesInUse ServiceReferenceImpl ServiceReferenceImpl servicesInUse ServiceReferenceImpl ServiceReferenceImpl nextElement checkGetServicePermission SecurityException ServiceReferenceImpl ServiceReferenceImpl
Bottom level event dispatcher for the Bundle Context param original Listener listener object registered under param l listener to call may be filtered param action Event class type param object Event object public void dispatch Event Object original Listener Object l int action Object object save the bundle ref to a local variable to avoid interference from another thread closing this context Abstract Bundle tmp Bundle bundle try if is Valid if context still valid switch action case Framework BUNDLEEVENT case Framework BUNDLEEVENTSYNC Bundle Listener listener Bundle Listener l if Debug DEBUG Debug DEBUG EVENTS String listener Name listener get Class get Name Integer to Hex String listener hash Code NON NLS 1 Debug println dispatch Bundle Event tmp Bundle listener Name NON NLS 1 NON NLS 2 NON NLS 3 listener bundle Changed Bundle Event object break case Framework SERVICEEVENT Service Event event Service Event object if has Listen Service Permission event Service Listener listener Service Listener l if Debug DEBUG Debug DEBUG EVENTS String listener Name listener get Class get Name Integer to Hex String listener hash Code NON NLS 1 Debug println dispatch Service Event tmp Bundle listener Name NON NLS 1 NON NLS 2 NON NLS 3 listener service Changed event break case Framework FRAMEWORKEVENT Framework Listener listener Framework Listener l if Debug DEBUG Debug DEBUG EVENTS String listener Name listener get Class get Name Integer to Hex String listener hash Code NON NLS 1 Debug println dispatch Framework Event tmp Bundle listener Name NON NLS 1 NON NLS 2 NON NLS 3 listener framework Event Framework Event object break catch Throwable t if Debug DEBUG Debug DEBUG GENERAL Debug println Exception in bottom level event dispatcher t get Message NON NLS 1 Debug print Stack Trace t allow the adaptor to handle this unexpected error framework adaptor handle Runtime Error t publisherror if action Framework FRAMEWORKEVENT Framework Event event Framework Event object if event get Type Framework Event ERROR break publisherror avoid infinite loop framework publish Framework Event Framework Event ERROR tmp Bundle t  BundleContext originalListener dispatchEvent originalListener AbstractBundle tmpBundle isValid BundleListener BundleListener DEBUG_EVENTS listenerName getClass getName toHexString hashCode dispatchBundleEvent tmpBundle listenerName bundleChanged BundleEvent ServiceEvent ServiceEvent hasListenServicePermission ServiceListener ServiceListener DEBUG_EVENTS listenerName getClass getName toHexString hashCode dispatchServiceEvent tmpBundle listenerName serviceChanged FrameworkListener FrameworkListener DEBUG_EVENTS listenerName getClass getName toHexString hashCode dispatchFrameworkEvent tmpBundle listenerName frameworkEvent FrameworkEvent DEBUG_GENERAL getMessage printStackTrace handleRuntimeError FrameworkEvent FrameworkEvent getType FrameworkEvent publishFrameworkEvent FrameworkEvent tmpBundle
Check for permission to listen to a service protected boolean has Listen Service Permission Service Event event Protection Domain domain bundle get Protection Domain if domain null Service Reference Impl reference Service Reference Impl event get Service Reference String names reference registration clazzes int len names length for int i 0 i len i if domain implies new Service Permission names i Service Permission GET return true return false return true  hasListenServicePermission ServiceEvent ProtectionDomain getProtectionDomain ServiceReferenceImpl ServiceReferenceImpl getServiceReference ServicePermission ServicePermission
Construct a Filter object This filter object may be used to match a Service Reference or a Dictionary See Filter for a description of the filter string syntax param filter The filter string return A Filter object encapsulating the filter string exception Invalid Syntax Exception If the filter parameter contains an invalid filter string which cannot be parsed public org osgi framework Filter create Filter String filter throws Invalid Syntax Exception check Valid return new Filter Impl filter  ServiceReference InvalidSyntaxException createFilter InvalidSyntaxException checkValid FilterImpl
This method checks that the context is still valid If the context is no longer valid an Illegal State Exception is thrown exception java lang Illegal State Exception If the context bundle has stopped protected void check Valid if is Valid throw new Illegal State Exception Msg formatter get String BUNDLE CONTEXT INVALID EXCEPTION NON NLS 1  IllegalStateException IllegalStateException checkValid isValid IllegalStateException getString BUNDLE_CONTEXT_INVALID_EXCEPTION
This method checks that the context is still valid return true if the context is still valid false otherwise protected boolean is Valid return valid  isValid

param bundledata param framework throws Bundle Exception public Bundle Fragment Bundle Data bundledata Framework framework throws Bundle Exception super bundledata framework host null  BundleException BundleFragment BundleData BundleException
Load the bundle exception org osgi framework Bundle Exception protected void load throws Bundle Exception if Debug DEBUG Debug DEBUG GENERAL if state INSTALLED 0 Debug println Bundle load called when state INSTALLED this NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 if framework is Active Security Manager sm System get Security Manager if sm null Permission Collection collection framework permission Admin create Permission Collection this domain new Protection Domain null collection try bundledata open make sure the Bundle Data is open catch IO Exception e throw new Bundle Exception Msg formatter get String BUNDLE READ EXCEPTION e NON NLS 1  BundleException BundleException DEBUG_GENERAL printStackTrace isActive SecurityManager getSecurityManager PermissionCollection permissionAdmin createPermissionCollection ProtectionDomain BundleData IOException BundleException getString BUNDLE_READ_EXCEPTION
Changes the state from ACTIVE RESOVED to INSTALLED This is called when a host gets reloaded or unloaded This method must be called while holding the bundles lock return true if an exported package is in use i e it has been imported by a bundle protected boolean unresolve if Debug DEBUG Debug DEBUG GENERAL if state INSTALLED RESOLVED 0 Debug println Bundle reload called when state INSTALLED RESOLVED this NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 if framework is Active if host null if state RESOLVED state INSTALLED publish UNRESOLVED event here framework publish Bundle Event Bundle Event UNRESOLVED this host null else close the outgoing jarfile try this bundledata close catch IO Exception e Do Nothing return false  DEBUG_GENERAL printStackTrace isActive publishBundleEvent BundleEvent IOException
Reload from a new bundle This method must be called while holding the bundles lock param new Bundle Dummy Bundle which contains new data return true if an exported package is in use i e it has been imported by a bundle exception org osgi framework Bundle Exception protected boolean reload Abstract Bundle new Bundle throws Bundle Exception if Debug DEBUG Debug DEBUG GENERAL if state INSTALLED RESOLVED 0 Debug println Bundle reload called when state INSTALLED RESOLVED this NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 boolean exporting false if framework is Active if host null if state RESOLVED Unresolving the host will cause the fragment to unresolve exporting host unresolve if exporting close the outgoing jarfile try this bundledata close catch IO Exception e Do Nothing this bundledata new Bundle bundledata this bundledata set Bundle this return exporting  newBundle BundleException AbstractBundle newBundle BundleException DEBUG_GENERAL printStackTrace isActive IOException newBundle setBundle
Refresh the bundle This is called by Framework refresh Packages This method must be called while holding the bundles lock this loader unimport Packages must have already been called before calling this method exception org osgi framework Bundle Exception if an exported package is in use i e it has been imported by a bundle protected void refresh throws Bundle Exception if Debug DEBUG Debug DEBUG GENERAL if state UNINSTALLED INSTALLED RESOLVED 0 Debug println Bundle refresh called when state UNINSTALLED INSTALLED RESOLVED this NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 if state RESOLVED host null state INSTALLED Do not publish UNRESOLVED event here This is done by caller to resolve if appropriate manifest Localization null  refreshPackages unimportPackages BundleException BundleException DEBUG_GENERAL printStackTrace manifestLocalization
Unload the bundle This method must be called while holding the bundles lock return true if an exported package is in use i e it has been imported by a bundle protected boolean unload if Debug DEBUG Debug DEBUG GENERAL if state UNINSTALLED INSTALLED RESOLVED 0 Debug println Bundle unload called when state UNINSTALLED INSTALLED RESOLVED this NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 boolean exporting false if framework is Active if host null Bundle Host resume Host host if state RESOLVED Unresolving the host will cause the fragment to unresolve try exporting host unresolve catch Bundle Exception be framework publish Framework Event Framework Event ERROR this be if exporting domain null try this bundledata close catch IO Exception e Do Nothing We must resume the host now that we are unloaded framework resume Bundle resume Host else try this bundledata close catch IO Exception e Do Nothing return exporting  DEBUG_GENERAL printStackTrace isActive BundleHost resumeHost BundleException publishFrameworkEvent FrameworkEvent IOException resumeBundle resumeHost IOException
This method loads a class from the bundle param name the name of the desired Class param check Permission indicates whether a permission check should be done return the resulting Class exception java lang Class Not Found Exception if the class definition was not found protected Class load Class String name boolean check Permission throws Class Not Found Exception if check Permission framework check Admin Permission check Valid cannot load a class from a fragment because there is no classloader associated with fragments throw new Class Not Found Exception Msg formatter get String BUNDLE FRAGMENT CNFE name NON NLS 1  checkPermission ClassNotFoundException loadClass checkPermission ClassNotFoundException checkPermission checkAdminPermission checkValid ClassNotFoundException getString BUNDLE_FRAGMENT_CNFE
Find the specified resource in this bundle This bundle s class loader is called to search for the named resource If this bundle s state is tt INSTALLED tt then only this bundle will be searched for the specified resource Imported packages cannot be searched when a bundle has not been resolved param name The name of the resource See tt java lang Class Loader get Resource tt for a description of the format of a resource name return a URL to the named resource or tt null tt if the resource could not be found or if the caller does not have the tt Admin Permission tt and the Java Runtime Environment supports permissions exception java lang Illegal State Exception If this bundle has been uninstalled public URL get Resource String name check Valid cannot get a resource for a fragment because there is no classloader associated with fragments return null  ClassLoader getResource AdminPermission IllegalStateException getResource checkValid
Internal worker to start a bundle param persistent if true persistently record the bundle was started protected void start Worker boolean persistent throws Bundle Exception if framework active if state STARTING ACTIVE 0 return if state INSTALLED framework package Admin resolve Bundles if state RESOLVED throw new Bundle Exception get Resolution Failure Message if Debug DEBUG Debug DEBUG GENERAL Debug println Bundle Active sl framework start Level Manager get Start Level Bundle get Bundle Id sl get Start Level NON NLS 1 NON NLS 2 NON NLS 3 if get Start Level framework start Level Manager get Start Level if state UNINSTALLED throw new Bundle Exception Msg formatter get String BUNDLE UNINSTALLED EXCEPTION NON NLS 1 if framework active state ACTIVE if Debug DEBUG Debug DEBUG GENERAL Debug println started this NON NLS 1 framework publish Bundle Event Bundle Event STARTED this if persistent set Status Constants BUNDLE STARTED true  startWorker BundleException packageAdmin resolveBundles BundleException getResolutionFailureMessage DEBUG_GENERAL startLevelManager getStartLevel getBundleId getStartLevel getStartLevel startLevelManager getStartLevel BundleException getString BUNDLE_UNINSTALLED_EXCEPTION DEBUG_GENERAL publishBundleEvent BundleEvent setStatus BUNDLE_STARTED
Internal worker to stop a bundle param persistent if true persistently record the bundle was stopped protected void stop Worker boolean persistent throws Bundle Exception if persistent set Status Constants BUNDLE STARTED false if framework active if state STOPPING RESOLVED INSTALLED 0 return state RESOLVED if Debug DEBUG Debug DEBUG GENERAL Debug println stopped this NON NLS 1 framework publish Bundle Event Bundle Event STOPPED this  stopWorker BundleException setStatus BUNDLE_STARTED DEBUG_GENERAL publishBundleEvent BundleEvent
Provides a list of link Service Reference s for the services registered by this bundle or code null code if the bundle has no registered services p The list is valid at the time of the call to this method but the framework is a very dynamic environment and services can be modified or unregistered at anytime return An array of link Service Reference or code null code exception java lang Illegal State Exception If the bundle has been uninstalled see Service Registration Impl see Service Reference public Service Reference get Registered Services check Valid Fragments cannot have a Bundle Context and therefore cannot have any services registered return null  ServiceReference ServiceReference IllegalStateException ServiceRegistrationImpl ServiceReference ServiceReference getRegisteredServices checkValid BundleContext
Provides a list of link Service Reference s for the services this bundle is using or code null code if the bundle is not using any services A bundle is considered to be using a service if the bundle s use count for the service is greater than zero p The list is valid at the time of the call to this method but the framework is a very dynamic environment and services can be modified or unregistered at anytime return An array of link Service Reference or code null code exception java lang Illegal State Exception If the bundle has been uninstalled see Service Reference public Service Reference get Services In Use check Valid Fragments cannot have a Bundle Context and therefore cannot have any services in use return null  ServiceReference ServiceReference IllegalStateException ServiceReference ServiceReference getServicesInUse checkValid BundleContext
public org osgi framework Bundle get Host return host  getHost
public boolean is Fragment return true  isFragment
Sets the host for this fragment from the list of available Bundle Exporters If a matching host cannot be found then a resolve Exception is logged param value the Bundle Host to set the host to protected boolean set Host Bundle Host value host value if host null try host attach Fragment this catch Bundle Exception be framework publish Framework Event Framework Event ERROR host be return false return true  BundleExporters BundleHost setHost BundleHost attachFragment BundleException publishFrameworkEvent FrameworkEvent
public Bundle Loader get Bundle Loader Fragments cannot have a Bundle Loader return null  BundleLoader getBundleLoader BundleLoader
Return the current context for this bundle return Bundle Context for this bundle protected Bundle Context Impl get Context Fragments cannot have a Bundle Context return null  BundleContext BundleContextImpl getContext BundleContext

public Bundle Host Bundle Data bundledata Framework framework throws Bundle Exception super bundledata framework context null loader null fragments null  BundleHost BundleData BundleException
Load the bundle exception org osgi framework Bundle Exception protected void load throws Bundle Exception if Debug DEBUG Debug DEBUG GENERAL if state INSTALLED 0 Debug println Bundle load called when state INSTALLED this NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 if loader null Debug println Bundle load called when loader null this NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 if framework is Active Security Manager sm System get Security Manager if sm null Permission Collection collection framework permission Admin create Permission Collection this domain new Protection Domain null collection loader null  BundleException BundleException DEBUG_GENERAL printStackTrace printStackTrace isActive SecurityManager getSecurityManager PermissionCollection permissionAdmin createPermissionCollection ProtectionDomain
Changes the state from ACTIVE RESOVED to INSTALLED This is called when a fragment gets reloaded or unloaded This method must be called while holding the bundles lock return true if an exported package is in use i e it has been imported by a bundle exception org osgi framework Bundle Exception protected boolean unresolve throws Bundle Exception if Debug DEBUG Debug DEBUG GENERAL if state INSTALLED RESOLVED 0 Debug println Bundle reload called when state INSTALLED RESOLVED this NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 boolean exporting false if framework is Active if state RESOLVED suspend and acquire the state change lock if is Active boolean suspended framework suspend Bundle this true if suspended throw new Bundle Exception Msg formatter get String BUNDLE STATE CHANGE EXCEPTION NON NLS 1 else begin State Change Bundle Loader Proxy cur Proxy get Loader Proxy exporting cur Proxy in Use if exporting make sure the Bundle Loader is created so it can be added to the removal Pending list cur Proxy get Bundle Loader framework package Admin add Removal Pending cur Proxy else framework package Admin unexport Resources cur Proxy if loader null loader clear loader close framework bundles un Mark Dependancies cur Proxy unresolve Fragments loader null fragments null proxy null state INSTALLED publish UNRESOLVED event here framework publish Bundle Event Bundle Event UNRESOLVED this complete State Change else close the outgoing jarfile try this bundledata close catch IO Exception e Do Nothing return exporting  BundleException BundleException DEBUG_GENERAL printStackTrace isActive isActive suspendBundle BundleException getString BUNDLE_STATE_CHANGE_EXCEPTION beginStateChange BundleLoaderProxy curProxy getLoaderProxy curProxy inUse BundleLoader removalPending curProxy getBundleLoader packageAdmin addRemovalPending curProxy packageAdmin unexportResources curProxy unMarkDependancies curProxy unresolveFragments publishBundleEvent BundleEvent completeStateChange IOException
Reload from a new bundle This method must be called while holding the bundles lock param new Bundle Dummy Bundle which contains new data return true if an exported package is in use i e it has been imported by a bundle exception org osgi framework Bundle Exception protected boolean reload Abstract Bundle new Bundle throws Bundle Exception if Debug DEBUG Debug DEBUG GENERAL if state INSTALLED RESOLVED 0 Debug println Bundle reload called when state INSTALLED RESOLVED this NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 boolean exporting false if framework is Active if state RESOLVED Bundle Loader Proxy cur Proxy get Loader Proxy exporting cur Proxy in Use if exporting make sure the Bundle Loader is created so it can be added to the removal Pending list cur Proxy get Bundle Loader framework package Admin add Removal Pending cur Proxy else framework package Admin unexport Resources cur Proxy if loader null loader clear loader close framework bundles un Mark Dependancies cur Proxy state INSTALLED publish UNRESOLVED event here framework publish Bundle Event Bundle Event UNRESOLVED this loader null proxy null unresolve Fragments fragments null else close the outgoing jarfile try this bundledata close catch IO Exception e Do Nothing this bundledata new Bundle bundledata this bundledata set Bundle this return exporting  newBundle BundleException AbstractBundle newBundle BundleException DEBUG_GENERAL printStackTrace isActive BundleLoaderProxy curProxy getLoaderProxy curProxy inUse BundleLoader removalPending curProxy getBundleLoader packageAdmin addRemovalPending curProxy packageAdmin unexportResources curProxy unMarkDependancies curProxy publishBundleEvent BundleEvent unresolveFragments IOException newBundle setBundle
Unresolves all attached fragments This is called any time the host bundle is reloaded unloaded or is unresovled protected void unresolve Fragments if fragments null for int i 0 i fragments length i fragments i unresolve  unresolveFragments
Refresh the bundle This is called by Framework refresh Packages This method must be called while holding the bundles lock exception org osgi framework Bundle Exception if an exported package is in use i e it has been imported by a bundle protected void refresh throws Bundle Exception if Debug DEBUG Debug DEBUG GENERAL if state UNINSTALLED INSTALLED RESOLVED 0 Debug println Bundle reload called when state UNINSTALLED INSTALLED RESOLVED this NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 if state RESOLVED Bundle Loader Proxy cur Proxy get Loader Proxy framework package Admin unexport Resources cur Proxy if loader null loader clear loader close framework bundles un Mark Dependancies cur Proxy loader null proxy null fragments null state INSTALLED Do not publish UNRESOLVED event here This is done by caller to resolve if appropriate manifest Localization null  refreshPackages BundleException BundleException DEBUG_GENERAL printStackTrace BundleLoaderProxy curProxy getLoaderProxy packageAdmin unexportResources curProxy unMarkDependancies curProxy manifestLocalization
Unload the bundle This method must be called while holding the bundles lock return true if an exported package is in use i e it has been imported by a bundle protected boolean unload if Debug DEBUG Debug DEBUG GENERAL if state UNINSTALLED INSTALLED RESOLVED 0 Debug println Bundle unload called when state UNINSTALLED INSTALLED RESOLVED this NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 boolean exporting false if framework is Active if state RESOLVED Bundle Loader Proxy cur Proxy get Loader Proxy exporting cur Proxy in Use if exporting make sure the Bundle Loader is created so it can be added to the removal Pending list cur Proxy get Bundle Loader framework package Admin add Removal Pending cur Proxy else framework package Admin unexport Resources cur Proxy if loader null loader clear loader close framework bundles un Mark Dependancies cur Proxy state INSTALLED publish UNRESOLVED event here framework publish Bundle Event Bundle Event UNRESOLVED this loader null proxy null unresolve Fragments fragments null domain null else try this bundledata close catch IO Exception e Do Nothing return exporting  DEBUG_GENERAL printStackTrace isActive BundleLoaderProxy curProxy getLoaderProxy curProxy inUse BundleLoader removalPending curProxy getBundleLoader packageAdmin addRemovalPending curProxy packageAdmin unexportResources curProxy unMarkDependancies curProxy publishBundleEvent BundleEvent unresolveFragments IOException
This method loads a class from the bundle param name the name of the desired Class param check Permission indicates whether a permission check should be done return the resulting Class exception java lang Class Not Found Exception if the class definition was not found protected Class load Class String name boolean check Permission throws Class Not Found Exception check Valid if check Permission framework check Admin Permission check to see if the bundle is resolved if is Resolved framework package Admin resolve Bundles if is Resolved throw new Class Not Found Exception Msg formatter get String BUNDLE CNFE NOT RESOLVED get Location name NON NLS 1 if Debug DEBUG Debug DEBUG GENERAL if state STARTING ACTIVE STOPPING RESOLVED 0 Debug println Bundle load Class name called when state STARTING ACTIVE STOPPING RESOLVED this NON NLS 1 NON NLS 2 Debug print Stack Trace new Exception Stack trace NON NLS 1 get Bundle Loader if loader null if Debug DEBUG Debug DEBUG GENERAL Debug println Bundle load Class name called when loader null this NON NLS 1 NON NLS 2 Debug print Stack Trace new Exception Stack trace NON NLS 1 throw new Class Not Found Exception name return loader load Class name  checkPermission ClassNotFoundException loadClass checkPermission ClassNotFoundException checkValid checkPermission checkAdminPermission isResolved packageAdmin resolveBundles isResolved ClassNotFoundException getString BUNDLE_CNFE_NOT_RESOLVED getLocation DEBUG_GENERAL loadClass printStackTrace getBundleLoader DEBUG_GENERAL loadClass printStackTrace ClassNotFoundException loadClass
Find the specified resource in this bundle This bundle s class loader is called to search for the named resource If this bundle s state is tt INSTALLED tt then only this bundle will be searched for the specified resource Imported packages cannot be searched when a bundle has not been resolved param name The name of the resource See tt java lang Class Loader get Resource tt for a description of the format of a resource name return a URL to the named resource or tt null tt if the resource could not be found or if the caller does not have the tt Admin Permission tt and the Java Runtime Environment supports permissions exception java lang Illegal State Exception If this bundle has been uninstalled public URL get Resource String name check Valid framework check Admin Permission check to see if the bundle is resolved if is Resolved framework package Admin resolve Bundles if is Resolved return null get Bundle Loader if loader null if Debug DEBUG Debug DEBUG GENERAL Debug println Bundle get Resource name called when loader null this NON NLS 1 NON NLS 2 Debug print Stack Trace new Exception Stack trace NON NLS 1 return null return loader get Resource name  ClassLoader getResource AdminPermission IllegalStateException getResource checkValid checkAdminPermission isResolved packageAdmin resolveBundles isResolved getBundleLoader DEBUG_GENERAL getResource printStackTrace getResource
Internal worker to start a bundle param persistent if true persistently record the bundle was started protected void start Worker boolean persistent throws Bundle Exception long start 0 if framework active if state STARTING ACTIVE 0 return try if state INSTALLED framework package Admin resolve Bundles if state RESOLVED throw new Bundle Exception get Resolution Failure Message if Debug DEBUG Debug DEBUG GENERAL Debug println Bundle Active sl framework start Level Manager get Start Level Bundle get Bundle Id sl get Start Level NON NLS 1 NON NLS 2 NON NLS 3 if get Start Level framework start Level Manager get Start Level STARTUP TIMING Start here if Debug DEBUG if Debug MONITOR ACTIVATION Bundle Watcher bundle Stats framework adaptor get Bundle Watcher if bundle Stats null bundle Stats start Activation this if Debug DEBUG BUNDLE TIME start System current Time Millis System out println Starting get Symbolic Name NON NLS 1 state STARTING context create Context try context start if framework active state ACTIVE if Debug DEBUG Debug DEBUG GENERAL Debug println started this NON NLS 1 framework publish Bundle Event Bundle Event STARTED this catch Bundle Exception e context close context null state RESOLVED throw e if state UNINSTALLED context close context null throw new Bundle Exception Msg formatter get String BUNDLE UNINSTALLED EXCEPTION get Location NON NLS 1 finally if Debug DEBUG state ACTIVE if Debug MONITOR ACTIVATION Bundle Watcher bundle Stats framework adaptor get Bundle Watcher if bundle Stats null bundle Stats end Activation this if Debug DEBUG BUNDLE TIME System out println End starting get Symbolic Name System current Time Millis start NON NLS 1 NON NLS 2 if persistent set Status Constants BUNDLE STARTED true  startWorker BundleException packageAdmin resolveBundles BundleException getResolutionFailureMessage DEBUG_GENERAL startLevelManager getStartLevel getBundleId getStartLevel getStartLevel startLevelManager getStartLevel MONITOR_ACTIVATION BundleWatcher bundleStats getBundleWatcher bundleStats bundleStats startActivation DEBUG_BUNDLE_TIME currentTimeMillis getSymbolicName createContext DEBUG_GENERAL publishBundleEvent BundleEvent BundleException BundleException getString BUNDLE_UNINSTALLED_EXCEPTION getLocation MONITOR_ACTIVATION BundleWatcher bundleStats getBundleWatcher bundleStats bundleStats endActivation DEBUG_BUNDLE_TIME getSymbolicName currentTimeMillis setStatus BUNDLE_STARTED
Create a Bundle Context for this bundle return Bundle Context for this bundle protected Bundle Context Impl create Context return new Bundle Context Impl this  BundleContext BundleContext BundleContextImpl createContext BundleContextImpl
Return the current context for this bundle return Bundle Context for this bundle protected Bundle Context Impl get Context return context  BundleContext BundleContextImpl getContext
Internal worker to stop a bundle param persistent if true persistently record the bundle was stopped protected void stop Worker boolean persistent throws Bundle Exception if persistent set Status Constants BUNDLE STARTED false if framework active if state STOPPING RESOLVED INSTALLED 0 return state STOPPING try context stop finally context close context null check Valid state RESOLVED if Debug DEBUG Debug DEBUG GENERAL Debug println stopped this NON NLS 1 framework publish Bundle Event Bundle Event STOPPED this  stopWorker BundleException setStatus BUNDLE_STARTED checkValid DEBUG_GENERAL publishBundleEvent BundleEvent
Provides a list of link Service Reference Impl s for the services registered by this bundle or code null code if the bundle has no registered services p The list is valid at the time of the call to this method but the framework is a very dynamic environment and services can be modified or unregistered at anytime return An array of link Service Reference Impl or code null code exception java lang Illegal State Exception If the bundle has been uninstalled see Service Registration Impl see Service Reference Impl public org osgi framework Service Reference get Registered Services check Valid if context null return null return context get Registered Services  ServiceReferenceImpl ServiceReferenceImpl IllegalStateException ServiceRegistrationImpl ServiceReferenceImpl ServiceReference getRegisteredServices checkValid getRegisteredServices
Provides a list of link Service Reference Impl s for the services this bundle is using or code null code if the bundle is not using any services A bundle is considered to be using a service if the bundle s use count for the service is greater than zero p The list is valid at the time of the call to this method but the framework is a very dynamic environment and services can be modified or unregistered at anytime return An array of link Service Reference Impl or code null code exception java lang Illegal State Exception If the bundle has been uninstalled see Service Reference Impl public org osgi framework Service Reference get Services In Use check Valid if context null return null return context get Services In Use  ServiceReferenceImpl ServiceReferenceImpl IllegalStateException ServiceReferenceImpl ServiceReference getServicesInUse checkValid getServicesInUse
public org osgi framework Bundle get Fragments synchronized framework bundles if fragments null return null org osgi framework Bundle result new org osgi framework Bundle fragments length System arraycopy fragments 0 result 0 result length return result  getFragments
Attaches a fragment to this Bundle Host Fragments must be attached to the host by ID order If the Class Loader of the host is already created then the fragment must be attached to the host Class Loader param fragment The fragment bundle to attach return true if the fragment successfully attached false if the fragment could not be logically inserted at the end of the fragment chain protected void attach Fragment Bundle Fragment fragment throws Bundle Exception if fragments null fragments new Bundle Fragment fragment else boolean inserted false We must keep our fragments ordered by bundle ID or install order Bundle Fragment new Fragments new Bundle Fragment fragments length 1 for int i 0 i fragments length i if inserted fragment get Bundle Id fragments i get Bundle Id if the loader has already been created then we cannot attach a fragment into the middle of the fragment chain if loader null throw new Bundle Exception Msg formatter get String BUNDLE LOADER ATTACHMENT ERROR fragments i get Symbolic Name get Symbolic Name NON NLS 1 new Fragments i fragment inserted true new Fragments inserted i 1 i fragments i if inserted new Fragments new Fragments length 1 fragment fragments new Fragments If the Host Class Loader has exists then we must attach the fragment to the Class Loader if loader null loader attach Fragment fragment Secure Action get Properties  BundleHost ClassLoader ClassLoader attachFragment BundleFragment BundleException BundleFragment BundleFragment newFragments BundleFragment getBundleId getBundleId BundleException getString BUNDLE_LOADER_ATTACHMENT_ERROR getSymbolicName getSymbolicName newFragments newFragments newFragments newFragments newFragments ClassLoader ClassLoader attachFragment SecureAction getProperties
public Bundle Loader get Bundle Loader if loader null synchronized this if loader null try loader new Bundle Loader this get Bundle Description get Loader Proxy set Bundle Loader loader catch Bundle Exception e framework publish Framework Event Framework Event ERROR this e return null return loader  BundleLoader getBundleLoader BundleLoader getBundleDescription getLoaderProxy setBundleLoader BundleException publishFrameworkEvent FrameworkEvent
protected Bundle Loader Proxy get Loader Proxy if proxy null synchronized this if proxy null proxy new Bundle Loader Proxy this return proxy  BundleLoaderProxy getLoaderProxy BundleLoaderProxy

Returns the package name from the specified class name The returned package is dot seperated param name Name of a class return Dot separated package name or null if the class has no package name protected static String get Package Name String name if name null int index name last Index Of find last period in class name if index 0 return name substring 0 index return null  getPackageName lastIndexOf
Returns the package name from the specified resource name The returned package is dot seperated param name Name of a resource return Dot separated package name or null if the resource has no package name protected static String get Resource Package Name String name if name null check for leading slash int begin name length 1 name char At 0 1 0 int end name last Index Of index of last slash if end begin return name substring begin end replace return null  getResourcePackageName charAt lastIndexOf
Bundle runtime constructor This object is created when the bundle is loaded at framework launch or bundle install or update param bundle Bundle object for this loader param description the Bundle Description for this loader exception org osgi framework Bundle Exception protected Bundle Loader Bundle Host bundle org eclipse osgi service resolver Bundle Description description throws Bundle Exception this bundle bundle try bundle get Bundle Data open make sure the Bundle Data is open catch IO Exception e throw new Bundle Exception Msg formatter get String BUNDLE READ EXCEPTION e NON NLS 1 initialize description  BundleDescription BundleException BundleLoader BundleHost BundleDescription BundleException getBundleData BundleData IOException BundleException getString BUNDLE_READ_EXCEPTION
protected void initialize Bundle Description description has Dynamic Imports System Bundle Loader get System Packages null This is the fastest way to access to the description for fragments since the hostdescription get Fragments is slow org osgi framework Bundle fragment Objects bundle get Fragments Bundle Description fragments new Bundle Description fragment Objects null 0 fragment Objects length for int i 0 i fragments length i fragments i Abstract Bundle fragment Objects i get Bundle Description init the imported packages list taking the bundle TODO The state is likely to provide some helpers to do that add Imported Packages description get Packages and its fragments for int i 0 i fragments length i if fragments i is Resolved add Imported Packages fragments i get Packages init the require bundles list Need to account for optional bundles so bundles with no supplier should be skipped TODO The state is likely to provide some helpers to do that Bundle Specification required description get Required Bundles Array List bundles new Array List Arrays as List required null new Bundle Specification 0 required for int i 0 i fragments length i if fragments i is Resolved Bundle Specification fragment Requires fragments i get Required Bundles if fragment Requires null bundles add All Arrays as List fragment Requires if bundles size 0 Array List bound new Array List bundles size int reexported new int bundles size int reexport Index 0 for int i 0 i bundles size i Bundle Specification spec Bundle Specification bundles get i if spec is Resolved String bundle Key new String Buffer spec get Name append   append spec get Actual Version to String to String NON NLS 1 Bundle Loader Proxy loader Proxy Bundle Loader Proxy bundle framework package Admin exported Bundles get By Key bundle Key if loader Proxy null bound add loader Proxy if spec is Exported reexported reexport Index bound size 1 else If the bundle is not optional report an error here if spec is Optional Bundle Exception be new Bundle Exception Msg formatter get String BUNDLE MISSING LOADER bundle Key NON NLS 1 bundle framework publish Framework Event Framework Event ERROR bundle be required Bundles Bundle Loader Proxy bound to Array new Bundle Loader Proxy bound size if reexport Index 0 reexport Table new int reexport Index System arraycopy reexported 0 reexport Table 0 reexport Index init the provided packages String provides description get Provided Packages Array List packages new Array List Arrays as List required null new String 0 provides for int i 0 i fragments length i if fragments i is Resolved String fragment Provides fragments i get Provided Packages if fragment Provides null packages add All Arrays as List fragment Provides if packages size 0 provided Packages new Keyed Hash Set packages size for int i 0 i packages size i provided Packages add new Single Source Package String packages get i bundle get Loader Proxy init the dynamic imports tables try String spec bundle get Bundle Data get Dynamic Imports Manifest Element imports Manifest Element parse Header Constants DYNAMICIMPORT PACKAGE spec add Dynamic Import Package imports and its fragments for int i 0 i fragments length i if fragments i is Resolved spec Abstract Bundle fragment Objects i get Bundle Data get Dynamic Imports imports Manifest Element parse Header Constants DYNAMICIMPORT PACKAGE spec add Dynamic Import Package imports catch Bundle Exception e bundle framework publish Framework Event Framework Event ERROR bundle e  BundleDescription hasDynamicImports SystemBundleLoader getSystemPackages getFragments fragmentObjects getFragments BundleDescription BundleDescription fragmentObjects fragmentObjects AbstractBundle fragmentObjects getBundleDescription addImportedPackages getPackages isResolved addImportedPackages getPackages BundleSpecification getRequiredBundles ArrayList ArrayList asList BundleSpecification isResolved BundleSpecification fragmentRequires getRequiredBundles fragmentRequires addAll asList fragmentRequires ArrayList ArrayList reexportIndex BundleSpecification BundleSpecification isResolved bundleKey StringBuffer getName _ getActualVersion toString toString BundleLoaderProxy loaderProxy BundleLoaderProxy packageAdmin exportedBundles getByKey bundleKey loaderProxy loaderProxy isExported reexportIndex isOptional BundleException BundleException getString BUNDLE_MISSING_LOADER bundleKey publishFrameworkEvent FrameworkEvent requiredBundles BundleLoaderProxy toArray BundleLoaderProxy reexportIndex reexportTable reexportIndex reexportTable reexportIndex getProvidedPackages ArrayList ArrayList asList isResolved fragmentProvides getProvidedPackages fragmentProvides addAll asList fragmentProvides providedPackages KeyedHashSet providedPackages SingleSourcePackage getLoaderProxy getBundleData getDynamicImports ManifestElement ManifestElement parseHeader DYNAMICIMPORT_PACKAGE addDynamicImportPackage isResolved AbstractBundle fragmentObjects getBundleData getDynamicImports ManifestElement parseHeader DYNAMICIMPORT_PACKAGE addDynamicImportPackage BundleException publishFrameworkEvent FrameworkEvent
protected void initialize Fragment Abstract Bundle fragment throws Bundle Exception Bundle Description description fragment get Bundle Description if the fragment imports a package not already imported throw an exception Package Specification packages description get Packages if packages null packages length 0 for int i 0 i packages length i if imported Packages null imported Packages get By Key packages i get Name null throw new Bundle Exception Msg formatter get String BUNDLE FRAGMENT IMPORT CONFLICT new Object fragment get Location packages i get Name bundle get Location NON NLS 1 if the fragment requires a bundle not aready required throw an exception Bundle Specification frag Req Bundles description get Required Bundles if frag Req Bundles null frag Req Bundles length 0 if required Bundles null throw new Bundle Exception Msg formatter get String BUNDLE FRAGMENT REQUIRE CONFLICT new Object fragment get Location frag Req Bundles 0 get Name bundle get Location NON NLS 1 for int i 0 i frag Req Bundles length i boolean found false for int j 0 j required Bundles length j String frag Req Key new String Buffer frag Req Bundles i get Name append   append frag Req Bundles i get Actual Version to String to String NON NLS 1 if frag Req Key equals required Bundles j get Key found true if found throw new Bundle Exception Msg formatter get String BUNDLE FRAGMENT REQUIRE CONFLICT new Object fragment get Location frag Req Bundles i get Name bundle get Location NON NLS 1 if the fragment dynamically imports a package not aready dynamically imported throw an exception try String spec fragment get Bundle Data get Dynamic Imports Manifest Element imports Manifest Element parse Header Constants DYNAMICIMPORT PACKAGE spec if imports null imports length 0 for int i 0 i imports length i String name imports i get Value if is Dynamically Imported name throw new Bundle Exception Msg formatter get String BUNDLE FRAGMENT IMPORT CONFLICT new Object fragment get Location imports i bundle get Location NON NLS 1 catch Bundle Exception e bundle framework publish Framework Event Framework Event ERROR bundle e init the provided packages String provides description get Provided Packages if provides null if provided Packages null provided Packages new Keyed Hash Set provides length for int i 0 i provides length i if provided Packages get By Key provides i null provided Packages add new Single Source Package String provides i bundle get Loader Proxy  initializeFragment AbstractBundle BundleException BundleDescription getBundleDescription PackageSpecification getPackages importedPackages importedPackages getByKey getName BundleException getString BUNDLE_FRAGMENT_IMPORT_CONFLICT getLocation getName getLocation BundleSpecification fragReqBundles getRequiredBundles fragReqBundles fragReqBundles requiredBundles BundleException getString BUNDLE_FRAGMENT_REQUIRE_CONFLICT getLocation fragReqBundles getName getLocation fragReqBundles requiredBundles fragReqKey StringBuffer fragReqBundles getName _ fragReqBundles getActualVersion toString toString fragReqKey requiredBundles getKey BundleException getString BUNDLE_FRAGMENT_REQUIRE_CONFLICT getLocation fragReqBundles getName getLocation getBundleData getDynamicImports ManifestElement ManifestElement parseHeader DYNAMICIMPORT_PACKAGE getValue isDynamicallyImported BundleException getString BUNDLE_FRAGMENT_IMPORT_CONFLICT getLocation getLocation BundleException publishFrameworkEvent FrameworkEvent getProvidedPackages providedPackages providedPackages KeyedHashSet providedPackages getByKey providedPackages SingleSourcePackage getLoaderProxy
private void add Imported Packages Package Specification packages if packages null packages length 0 if imported Packages null imported Packages new Keyed Hash Set for int i 0 i packages length i Single Source Package packagesource Single Source Package bundle framework package Admin exported Packages get By Key packages i get Name if packagesource null imported Packages add packagesource  addImportedPackages PackageSpecification importedPackages importedPackages KeyedHashSet SingleSourcePackage SingleSourcePackage packageAdmin exportedPackages getByKey getName importedPackages
Close the the Bundle Loader protected void close if bundle null return imported Packages null if classloader null classloader close classloader null bundle null This indicates the Bundle Loader is destroyed  BundleLoader importedPackages BundleLoader
This method loads a class from the bundle The class is searched for in the same manner as it would if it was being loaded from a bundle i e all hosts fragments import required bundles and local resources are searched param name the name of the desired Class return the resulting Class exception java lang Class Not Found Exception if the class definition was not found protected Class load Class String name throws Class Not Found Exception return create Class Loader load Class name  ClassNotFoundException loadClass ClassNotFoundException createClassLoader loadClass
This method gets a resource from the bundle The resource is searched for in the same manner as it would if it was being loaded from a bundle i e all hosts fragments import required bundles and local resources are searched param name the name of the desired resource return the resulting resource URL or null if it does not exist protected URL get Resource String name return create Class Loader get Resource name  getResource createClassLoader getResource
Handle the lookup where provided classes can also be imported In this case the exporter need to be consulted protected Class require Class String name String package Name Class result null try result find Imported Class name package Name catch Import Class Not Found Exception e Capture the exception and return null because we want to continue the lookup return null if result null result find Local Class name return result  requireClass packageName findImportedClass packageName ImportClassNotFoundException findLocalClass
protected Bundle Class Loader create Class Loader if classloader null return classloader synchronized this if classloader null return classloader try String classpath get Class Path bundle Secure Action get Properties if classpath null classloader createBCL Previleged bundle get Protection Domain classpath else bundle framework publish Framework Event Framework Event ERROR bundle new Bundle Exception Msg formatter get String BUNDLE NO CLASSPATH MATCH NON NLS 1 catch Bundle Exception e bundle framework publish Framework Event Framework Event ERROR bundle e return classloader  BundleClassLoader createClassLoader getClassPath SecureAction getProperties createBCLPrevileged getProtectionDomain publishFrameworkEvent FrameworkEvent BundleException getString BUNDLE_NO_CLASSPATH_MATCH BundleException publishFrameworkEvent FrameworkEvent
Finds a class local to this bundle Only the classloader for this bundle is searched param name The name of the class to find return The loaded Class or null if the class is not found protected Class find Local Class String name if Debug DEBUG Debug DEBUG LOADER Debug println Bundle Loader this find Local Class name NON NLS 1 NON NLS 2 NON NLS 3 try Class clazz create Class Loader find Local Class name if Debug DEBUG Debug DEBUG LOADER clazz null Debug println Bundle Loader this found local class name NON NLS 1 NON NLS 2 return clazz catch Class Not Found Exception e return null  findLocalClass DEBUG_LOADER BundleLoader findLocalClass createClassLoader findLocalClass DEBUG_LOADER BundleLoader ClassNotFoundException
Finds the class for a bundle This method is used for delegation by the bundle s classloader public Class find Class String name throws Class Not Found Exception if is Closed throw new Class Not Found Exception name if Debug DEBUG Debug DEBUG LOADER Debug println Bundle Loader this load Bundle Class name NON NLS 1 NON NLS 2 NON NLS 3 String package Name get Package Name name Class result null if package Name null result find Imported Class name package Name Allow default package lookups from required bundles if result null result find Required Class name package Name if result null result find Local Class name if result null throw new Class Not Found Exception name return result  findClass ClassNotFoundException isClosed ClassNotFoundException DEBUG_LOADER BundleLoader loadBundleClass packageName getPackageName packageName findImportedClass packageName findRequiredClass packageName findLocalClass ClassNotFoundException
boolean is Closed return bundle null  isClosed
Finds the resource for a bundle This method is used for delegation by the bundle s classloader public URL find Resource String name if is Closed return null if name length 1 name char At 0 if name has a leading slash name name substring 1 remove leading slash before search try check Resource Permission catch Security Exception e try bundle framework check Admin Permission catch Security Exception ee return null String package Name get Resource Package Name name URL resource null if package Name null resource find Imported Resource name package Name Allow default package lookups from required bundles if resource null resource find Required Resource name package Name if resource null resource find Local Resource name return resource  findResource isClosed charAt checkResourcePermission SecurityException checkAdminPermission SecurityException packageName getResourcePackageName packageName findImportedResource packageName findRequiredResource packageName findLocalResource
Finds the resources for a bundle This method is used for delegation by the bundle s classloader public Enumeration find Resources String name throws IO Exception if is Closed return null if name length 1 name char At 0 if name has a leading slash name name substring 1 remove leading slash before search try check Resource Permission catch Security Exception e try bundle framework check Admin Permission catch Security Exception ee return null String package Name get Resource Package Name name Enumeration result null if package Name null result find Imported Resources name package Name Allow default package lookups from required bundles if result null result find Required Resources name package Name if result null result find Local Resources name return result  findResources IOException isClosed charAt checkResourcePermission SecurityException checkAdminPermission SecurityException packageName getResourcePackageName packageName findImportedResources packageName findRequiredResources packageName findLocalResources
Handle the lookup where provided resources can also be imported In this case the exporter need to be consulted protected URL require Resource String name String package Name URL result null try result find Imported Resource name package Name catch Import Resource Not Found Exception e Capture the exception and return null because we want to continue the lookup return null if result null result find Local Resource name return result  requireResource packageName findImportedResource packageName ImportResourceNotFoundException findLocalResource
return create Class Loader find Local Resource name return URL Access Controller do Privileged new Privileged Action public Object run return create Class Loader find Local Resource name  createClassLoader findLocalResource AccessController doPrivileged PrivilegedAction createClassLoader findLocalResource
Finds a resource local to this bundle Only the classloader for this bundle is searched param name The name of the resource to find return The URL to the resource or null if the resource is not found protected URL find Local Resource final String name if System get Security Manager null return create Class Loader find Local Resource name return URL Access Controller do Privileged new Privileged Action public Object run return create Class Loader find Local Resource name  findLocalResource getSecurityManager createClassLoader findLocalResource AccessController doPrivileged PrivilegedAction createClassLoader findLocalResource
Handle the lookup where provided resources can also be imported In this case the exporter need to be consulted protected Enumeration require Resources String name String package Name Enumeration result null try result find Imported Resources name package Name catch Import Resource Not Found Exception e Capture the exception and return null because we want to continue the lookup return null if result null result find Local Resources name return result  requireResources packageName findImportedResources packageName ImportResourceNotFoundException findLocalResources
Returns an Enumeration of UR Ls representing all the resources with the given name Only the classloader for this bundle is searched param name the resource name return an Enumeration of UR Ls for the resources protected Enumeration find Local Resources String name if name length 1 name char At 0 if name has a leading slash name name substring 1 try check Resource Permission catch Security Exception e return null return create Class Loader find Local Resources name  URLs URLs findLocalResources charAt checkResourcePermission SecurityException createClassLoader findLocalResources
Finds the object for a bundle This method is used for delegation by the bundle s classloader public Object find Object String object if is Closed return null if object length 1 object char At 0 if name has a leading slash object object substring 1 remove leading slash before search try check Resource Permission catch Security Exception e try bundle framework check Admin Permission catch Security Exception ee return null String package Name get Resource Package Name object Object result null if package Name null result find Imported Object object package Name Allow default package lookups from required bundles if result null result find Required Object object package Name if result null result find Local Object object return result  findObject isClosed charAt checkResourcePermission SecurityException checkAdminPermission SecurityException packageName getResourcePackageName packageName findImportedObject packageName findRequiredObject packageName findLocalObject
Handle the lookup where provided resources can also be imported In this case the exporter need to be consulted protected Object require Object String object String package Name Object result null try result find Imported Object object package Name catch Import Resource Not Found Exception e Capture the exception and return null because we want to continue the lookup return null if result null result find Local Object object return result  requireObject packageName findImportedObject packageName ImportResourceNotFoundException findLocalObject
protected Object find Local Object String object return create Class Loader find Local Object object  findLocalObject createClassLoader findLocalObject
return find Local Library name return String Access Controller do Privileged new Privileged Action public Object run return find Local Library name  findLocalLibrary AccessController doPrivileged PrivilegedAction findLocalLibrary
Returns the absolute path name of a native library param name the library name return the absolute path of the native library or null if not found public String find Library final String name if is Closed return null if System get Security Manager null return find Local Library name return String Access Controller do Privileged new Privileged Action public Object run return find Local Library name  findLibrary isClosed getSecurityManager findLocalLibrary AccessController doPrivileged PrivilegedAction findLocalLibrary
protected String find Local Library final String name String result bundle get Bundle Data find Library name if result null return result org osgi framework Bundle fragments bundle get Fragments if fragments null fragments length 0 return null look in fragments imports for int i 0 i fragments length i result Abstract Bundle fragments i get Bundle Data find Library name if result null return result return result  findLocalLibrary getBundleData findLibrary getFragments AbstractBundle getBundleData findLibrary
Return the bundle we are associated with protected Abstract Bundle get Bundle return bundle  AbstractBundle getBundle
else return Bundle Class Loader Access Controller do Privileged new Privileged Action public Object run return createBCL pd cp  BundleClassLoader AccessController doPrivileged PrivilegedAction
private Bundle Class Loader createBCL Previleged final Protection Domain pd final String cp Create the classloader as previleged code if security manager is present if System get Security Manager null return createBCL pd cp else return Bundle Class Loader Access Controller do Privileged new Privileged Action public Object run return createBCL pd cp  BundleClassLoader createBCLPrevileged ProtectionDomain getSecurityManager BundleClassLoader AccessController doPrivileged PrivilegedAction
private Bundle Class Loader createBCL final Protection Domain pd final String cp Bundle Class Loader bcl bundle get Bundle Data create Class Loader Bundle Loader this pd cp attach existing fragments to classloader org osgi framework Bundle fragments bundle get Fragments if fragments null for int i 0 i fragments length i Abstract Bundle fragment Abstract Bundle fragments i try bcl attach Fragment fragment get Bundle Data fragment domain get Class Path fragment Secure Action get Properties catch Bundle Exception be bundle framework publish Framework Event Framework Event ERROR bundle be finish the initialization of the classloader bcl initialize return bcl  BundleClassLoader ProtectionDomain BundleClassLoader getBundleData createClassLoader BundleLoader getFragments AbstractBundle AbstractBundle attachFragment getBundleData getClassPath SecureAction getProperties BundleException publishFrameworkEvent FrameworkEvent
Return a string representation of this loader return String public String to String Bundle Data result bundle get Bundle Data return result null Bundle Loader bundledata null result to String NON NLS 1  toString BundleData getBundleData BundleLoader toString
protected void check Resource Permission Security Manager sm System get Security Manager if sm null if resource Permission null resource Permission new Bundle Resource Permission bundle get Bundle Id sm check Permission resource Permission  checkResourcePermission SecurityManager getSecurityManager resourcePermission resourcePermission BundleResourcePermission getBundleId checkPermission resourcePermission
Get the Bundle Loader for the package if it is imported param pkgname The name of the package to import return Bundle Loader to load from or null if the package is not imported protected Bundle Loader get Package Exporter String pkgname if pkgname null return null if imported Packages null Package Source exporter Package Source imported Packages get By Key pkgname if exporter null return exporter get Supplier get Bundle Loader if is Dynamically Imported pkgname Package Source exporter Package Source bundle framework package Admin exported Packages get By Key pkgname if exporter null exporter get Supplier mark Used bundle get Loader Proxy imported Packages add exporter return exporter get Supplier get Bundle Loader return null  BundleLoader BundleLoader BundleLoader getPackageExporter importedPackages PackageSource PackageSource importedPackages getByKey getSupplier getBundleLoader isDynamicallyImported PackageSource PackageSource packageAdmin exportedPackages getByKey getSupplier markUsed getLoaderProxy importedPackages getSupplier getBundleLoader
Return true if the target package name matches a name in the Dynamic Import Package manifest header param pkgname The name of the requested class package return true if the package should be imported protected boolean is Dynamically Imported String pkgname must check for starts With java to satisfy R3 section 4 7 2 if pkgname starts With java NON NLS 1 return true quick shortcut check if has Dynamic Imports return false shortcut if dynamic Import Package All return true If including the system bundle packages by default dynamically import them Most OS Gi framework implementations assume the system bundle packages are on the VM classpath As a result some bundles neglect to import framework packages e g org osgi framework String system Packages System Bundle Loader get System Packages if system Packages null for int i 0 i system Packages length i if pkgname equals system Packages i return true match against specific names if dynamic Import Packages null for int i 0 i dynamic Import Packages length i if pkgname equals dynamic Import Packages i return true match against names with trailing wildcards if dynamic Import Package Stems null for int i 0 i dynamic Import Package Stems length i if pkgname starts With dynamic Import Package Stems i return true return false  DynamicImport isDynamicallyImported startsWith startsWith hasDynamicImports dynamicImportPackageAll OSGi systemPackages SystemBundleLoader getSystemPackages systemPackages systemPackages systemPackages dynamicImportPackages dynamicImportPackages dynamicImportPackages dynamicImportPackageStems dynamicImportPackageStems startsWith dynamicImportPackageStems
Find a class using the imported packages for this bundle Only the Import Class Loader is used for the search param name The name of the class to find return The loaded class or null if the class does not belong to a package that is imported by the bundle throws Import Class Not Found Exception If the class does belong to a package that is imported by the bundle but the class is not found protected Class find Imported Class String name String package Name throws Import Class Not Found Exception if Debug DEBUG Debug DEBUG LOADER Debug println Import Class Loader this find Imported Class name NON NLS 1 NON NLS 2 NON NLS 3 Class result null try Bundle Loader exporter get Package Exporter package Name if exporter null result exporter find Local Class name if result null throw new Import Class Not Found Exception name finally if result null if Debug DEBUG Debug DEBUG LOADER Debug println Import Class Loader this class name not found in imported package package Name NON NLS 1 NON NLS 2 NON NLS 3 else if Debug DEBUG Debug DEBUG LOADER Debug println Bundle Loader this found imported class name NON NLS 1 NON NLS 2 return result  ImportClassLoader ImportClassNotFoundException findImportedClass packageName ImportClassNotFoundException DEBUG_LOADER ImportClassLoader findImportedClass BundleLoader getPackageExporter packageName findLocalClass ImportClassNotFoundException DEBUG_LOADER ImportClassLoader packageName DEBUG_LOADER BundleLoader
protected void add Exported Providers For String package Name Array List result Keyed Hash Set visited if visited add bundle return See if we locally provide the package Package Source local get Provided Package package Name Must search required bundles that are exported first if required Bundles null int size reexport Table null 0 reexport Table length int reexport Index 0 for int i 0 i required Bundles length i if local null always add required bundles first if we locally provide the package This allows a bundle to provide a package from a required bundle without re exporting the whole required bundle required Bundles i get Bundle Loader add Exported Providers For package Name result visited else if reexport Index size reexport Table reexport Index i reexport Index required Bundles i get Bundle Loader add Exported Providers For package Name result visited now add the locally provided package if local null result add local get Supplier  addExportedProvidersFor packageName ArrayList KeyedHashSet PackageSource getProvidedPackage packageName requiredBundles reexportTable reexportTable reexportIndex requiredBundles requiredBundles getBundleLoader addExportedProvidersFor packageName reexportIndex reexportTable reexportIndex reexportIndex requiredBundles getBundleLoader addExportedProvidersFor packageName getSupplier
Gets the Package Source for the package name specified Only the required bundles are searched param package Name The name of the package to find the Package Source for return The loaded class or null if the class is not found protected Package Source get Providers For String package Name if package Name null package Name DEFAULT PACKAGE first look in the required packages cache if required Packages Cache null Package Source result Package Source required Packages Cache get By Key package Name if result null if result is Null Source return null else return result didn t find it in the cache search the actual required bundles if required Bundles null return null Keyed Hash Set visited new Keyed Hash Set false Array List result new Array List 3 for int i 0 i required Bundles length i Bundle Loader required Loader required Bundles i get Bundle Loader required Loader add Exported Providers For package Name result visited found some so cache the result for next time and return if required Packages Cache null required Packages Cache new Keyed Hash Set if result size 0 did not find it in our required bundles lets record the failure so we do not have to do the search again for this package required Packages Cache add new Null Package Source package Name return null else if result size 1 if there is just one source remember just the single source Bundle Loader Proxy proxy Bundle Loader Proxy result get 0 Package Source source proxy get Package Source package Name required Packages Cache add source return source else if there was more than one source build a multisource and cache that Bundle Loader Proxy bundles Bundle Loader Proxy result to Array new Bundle Loader Proxy result size Multi Source Package source new Multi Source Package package Name bundles required Packages Cache add source return source  PackageSource packageName PackageSource PackageSource getProvidersFor packageName packageName packageName DEFAULT_PACKAGE requiredPackagesCache PackageSource PackageSource requiredPackagesCache getByKey packageName isNullSource requiredBundles KeyedHashSet KeyedHashSet ArrayList ArrayList requiredBundles BundleLoader requiredLoader requiredBundles getBundleLoader requiredLoader addExportedProvidersFor packageName requiredPackagesCache requiredPackagesCache KeyedHashSet requiredPackagesCache NullPackageSource packageName BundleLoaderProxy BundleLoaderProxy PackageSource getPackageSource packageName requiredPackagesCache BundleLoaderProxy BundleLoaderProxy toArray BundleLoaderProxy MultiSourcePackage MultiSourcePackage packageName requiredPackagesCache
Find a class using the required bundles for this bundle Only the required bundles are used to search for the class param name The name of the class to find return The loaded class or null if the class is not found protected Class find Required Class String name String package Name if Debug DEBUG Debug DEBUG LOADER Debug println Import Class Loader this find Required Class name NON NLS 1 NON NLS 2 NON NLS 3 Package Source source get Providers For package Name if source null return null if source is Multivalued Bundle Loader Proxy bundles source get Suppliers for int i 0 i bundles length i Class result bundles i get Bundle Loader require Class name package Name if result null return result else return source get Supplier get Bundle Loader require Class name package Name return null  findRequiredClass packageName DEBUG_LOADER ImportClassLoader findRequiredClass PackageSource getProvidersFor packageName isMultivalued BundleLoaderProxy getSuppliers getBundleLoader requireClass packageName getSupplier getBundleLoader requireClass packageName
protected Package Source get Provided Package String name return provided Packages null null Package Source provided Packages get By Key name  PackageSource getProvidedPackage providedPackages PackageSource providedPackages getByKey
Find a resource using the imported packages for this bundle Only the Import Class Loader is used for the search param name The name of the resource to find return The URL of the resource or null if the resource does not belong to a package that is imported by the bundle throws Import Resource Not Found Exception If the resource does belong to a package that is imported by the bundle but the resource is not found protected URL find Imported Resource String name String package Name if Debug DEBUG Debug DEBUG LOADER Debug println Import Class Loader this find Imported Resource name NON NLS 1 NON NLS 2 NON NLS 3 Bundle Loader exporter get Package Exporter package Name if exporter null URL url exporter find Local Resource name if url null return url if Debug DEBUG Debug DEBUG LOADER Debug println Import Class Loader this resource name not found in imported package package Name NON NLS 1 NON NLS 2 NON NLS 3 throw new Import Resource Not Found Exception name return null  ImportClassLoader ImportResourceNotFoundException findImportedResource packageName DEBUG_LOADER ImportClassLoader findImportedResource BundleLoader getPackageExporter packageName findLocalResource DEBUG_LOADER ImportClassLoader packageName ImportResourceNotFoundException
Find a resource using the required bundles for this bundle Only the required bundles are used to search param name The name of the resource to find return The URL for the resource or null if the resource is not found protected URL find Required Resource String name String package Name if Debug DEBUG Debug DEBUG LOADER Debug println Import Class Loader this find Required Resource name NON NLS 1 NON NLS 2 NON NLS 3 Package Source source get Providers For package Name if source null return null if source is Multivalued Bundle Loader Proxy bundles source get Suppliers for int i 0 i bundles length i URL result bundles i get Bundle Loader require Resource name package Name if result null return result else return source get Supplier get Bundle Loader require Resource name package Name return null  findRequiredResource packageName DEBUG_LOADER ImportClassLoader findRequiredResource PackageSource getProvidersFor packageName isMultivalued BundleLoaderProxy getSuppliers getBundleLoader requireResource packageName getSupplier getBundleLoader requireResource packageName
Returns an Enumeration of UR Ls representing all the resources with the given name If the resource is in a package that is imported call the exporting bundle Otherwise return null param name the resource name return an Enumeration of UR Ls for the resources if the package is imported null otherwise protected Enumeration find Imported Resources String name String package Name if Debug DEBUG Debug DEBUG LOADER Debug println Import Class Loader this find Imported Resources name NON NLS 1 NON NLS 2 NON NLS 3 Bundle Loader exporter get Package Exporter package Name if exporter null return exporter find Local Resources name return null  URLs URLs findImportedResources packageName DEBUG_LOADER ImportClassLoader findImportedResources BundleLoader getPackageExporter packageName findLocalResources
Returns an Enumeration of UR Ls representing all the resources with the given name Find the resources using the required bundles for this bundle Only the required bundles are used to search If the resource is in a package that is imported call the exporting bundle Otherwise return null param name the resource name return an Enumeration of UR Ls for the resources if the package is imported null otherwise protected Enumeration find Required Resources String name String package Name if Debug DEBUG Debug DEBUG LOADER Debug println Import Class Loader this find Required Resources name NON NLS 1 NON NLS 2 NON NLS 3 Package Source source get Providers For package Name if source null return null if source is Multivalued Bundle Loader Proxy bundles source get Suppliers for int i 0 i bundles length i Enumeration result bundles i get Bundle Loader require Resources name package Name if result null return result else return source get Supplier get Bundle Loader require Resources name package Name return null  URLs URLs findRequiredResources packageName DEBUG_LOADER ImportClassLoader findRequiredResources PackageSource getProvidersFor packageName isMultivalued BundleLoaderProxy getSuppliers getBundleLoader requireResources packageName getSupplier getBundleLoader requireResources packageName
Find an object using the imported packages for this bundle Only the Import Class Loader is used for the search param object The name of the object to find return The Object or null if the object does not belong to a package that is imported by the bundle throws Import Resource Not Found Exception If the object does belong to a package that is imported by the bundle but the resource is not found protected Object find Imported Object String object String package Name if Debug DEBUG Debug DEBUG LOADER Debug println Import Class Loader this find Imported Object object NON NLS 1 NON NLS 2 NON NLS 3 Bundle Loader exporter get Package Exporter package Name if exporter null Object result exporter find Local Object object if result null return result if Debug DEBUG Debug DEBUG LOADER Debug println Import Class Loader this object object not found in imported package package Name NON NLS 1 NON NLS 2 NON NLS 3 throw new Import Resource Not Found Exception object return null  ImportClassLoader ImportResourceNotFoundException findImportedObject packageName DEBUG_LOADER ImportClassLoader findImportedObject BundleLoader getPackageExporter packageName findLocalObject DEBUG_LOADER ImportClassLoader packageName ImportResourceNotFoundException
Find an object using the required bundles for this bundle Only the required bundles are used to search param name The name of the object to find return The Object or null if the object is not found protected Object find Required Object String name String package Name if Debug DEBUG Debug DEBUG LOADER Debug println Import Class Loader this find Required Resource name NON NLS 1 NON NLS 2 NON NLS 3 Package Source source get Providers For package Name if source null return null if source is Multivalued Bundle Loader Proxy bundles source get Suppliers for int i 0 i bundles length i Object result bundles i get Bundle Loader require Object name package Name if result null return result else return source get Supplier get Bundle Loader require Object name package Name return null  findRequiredObject packageName DEBUG_LOADER ImportClassLoader findRequiredResource PackageSource getProvidersFor packageName isMultivalued BundleLoaderProxy getSuppliers getBundleLoader requireObject packageName getSupplier getBundleLoader requireObject packageName
Adds a list of Dynamic Import Package manifest elements to the dynamic import tables of this Bundle Loader Duplicate packages are checked and not added again This method is not thread safe Callers should ensure synchronization when calling this method param packages the Dynamic Import Package elements to add public void add Dynamic Import Package Manifest Element packages if packages null System Bundle Loader get System Packages null return has Dynamic Imports true make sure imported Packages is not null if imported Packages null imported Packages new Keyed Hash Set if packages null return int size packages length Array List stems if dynamic Import Package Stems null stems new Array List size else stems new Array List size dynamic Import Package Stems length for int i 0 i dynamic Import Package Stems length i stems add dynamic Import Package Stems i Array List names if dynamic Import Packages null names new Array List size else names new Array List size dynamic Import Packages length for int i 0 i dynamic Import Packages length i names add dynamic Import Packages i for int i 0 i size i String name packages i get Value if is Dynamically Imported name continue if name equals shortcut NON NLS 1 dynamic Import Package All true return if name ends With NON NLS 1 stems add name substring 0 name length 1 else names add name size stems size if size 0 dynamic Import Package Stems String stems to Array new String size size names size if size 0 dynamic Import Packages String names to Array new String size  DynamicImport BundleLoader DynamicImport addDynamicImportPackage ManifestElement SystemBundleLoader getSystemPackages hasDynamicImports importedPackages importedPackages importedPackages KeyedHashSet ArrayList dynamicImportPackageStems ArrayList ArrayList dynamicImportPackageStems dynamicImportPackageStems dynamicImportPackageStems ArrayList dynamicImportPackages ArrayList ArrayList dynamicImportPackages dynamicImportPackages dynamicImportPackages getValue isDynamicallyImported dynamicImportPackageAll endsWith dynamicImportPackageStems toArray dynamicImportPackages toArray
protected void clear provided Packages null required Bundles null imported Packages null dynamic Import Packages null dynamic Import Package Stems null  providedPackages requiredBundles importedPackages dynamicImportPackages dynamicImportPackageStems
protected void attach Fragment Bundle Fragment fragment Properties props throws Bundle Exception initialize Fragment fragment if classloader null return try String classpath get Class Path fragment props if classpath null classloader attach Fragment fragment get Bundle Data fragment domain classpath else bundle framework publish Framework Event Framework Event ERROR bundle new Bundle Exception Msg formatter get String BUNDLE NO CLASSPATH MATCH NON NLS 1 catch Bundle Exception e bundle framework publish Framework Event Framework Event ERROR bundle e  attachFragment BundleFragment BundleException initializeFragment getClassPath attachFragment getBundleData publishFrameworkEvent FrameworkEvent BundleException getString BUNDLE_NO_CLASSPATH_MATCH BundleException publishFrameworkEvent FrameworkEvent
protected String get Class Path Abstract Bundle bundle Properties props throws Bundle Exception String spec bundle get Bundle Data get Class Path Manifest Element classpath Elements Manifest Element parse Header Constants BUNDLE CLASSPATH spec return match Class Path classpath Elements props  getClassPath AbstractBundle BundleException getBundleData getClassPath ManifestElement classpathElements ManifestElement parseHeader BUNDLE_CLASSPATH matchClassPath classpathElements
protected String match Class Path Manifest Element classpath Properties props if classpath null if Debug DEBUG Debug DEBUG LOADER Debug println no classpath NON NLS 1 create default Bundle Class Path return new String NON NLS 1 Array List result new Array List classpath length for int i 0 i classpath length i Filter Impl filter try filter create Filter classpath i get Attribute Constants SELECTION FILTER ATTRIBUTE if filter null filter match props if Debug DEBUG Debug DEBUG LOADER Debug println found match for classpath entry classpath i get Value Components NON NLS 1 String match Paths classpath i get Value Components for int j 0 j match Paths length j result add match Paths j catch Invalid Syntax Exception e bundle framework publish Framework Event Framework Event ERROR bundle e return String result to Array new String result size  matchClassPath ManifestElement DEBUG_LOADER BundleClassPath ArrayList ArrayList FilterImpl createFilter getAttribute SELECTION_FILTER_ATTRIBUTE DEBUG_LOADER getValueComponents matchPaths getValueComponents matchPaths matchPaths InvalidSyntaxException publishFrameworkEvent FrameworkEvent toArray
protected Filter Impl create Filter String filter String throws Invalid Syntax Exception if filter String null return null int length filter String length if length 2 throw new Invalid Syntax Exception Msg formatter get String FILTER INVALID filter String NON NLS 1 return new Filter Impl filter String  FilterImpl createFilter filterString InvalidSyntaxException filterString filterString InvalidSyntaxException getString FILTER_INVALID filterString FilterImpl filterString

public Bundle Loader Proxy Bundle Host bundle this bundle bundle this symbolic Name bundle get Symbolic Name if this symbolic Name null this symbolic Name new String Buffer append bundle get Bundle Id append NOSYMBOLICNAME to String NON NLS 1 this version bundle get Version this key new String Buffer symbolic Name append   append this version to String to String NON NLS 1 this users new Keyed Hash Set false this pkg Sources new Keyed Hash Set false  BundleLoaderProxy BundleHost symbolicName getSymbolicName symbolicName symbolicName StringBuffer getBundleId toString getVersion StringBuffer symbolicName _ toString toString KeyedHashSet pkgSources KeyedHashSet
public Bundle Loader get Bundle Loader if loader null loader bundle get Bundle Loader return loader  BundleLoader getBundleLoader getBundleLoader
public Abstract Bundle get Bundle Host return bundle  AbstractBundle getBundleHost
public void set Bundle Loader Bundle Loader value loader value  setBundleLoader BundleLoader
public void mark Used Bundle Loader Proxy user only mark as used if the user is not our own bundle if user get Bundle Host bundle users add user  markUsed BundleLoaderProxy getBundleHost
public void un Mark Used Bundle Loader Proxy user users remove By Key user get Key  unMarkUsed BundleLoaderProxy removeByKey getKey
public int get Key Hash Code return key hash Code  getKeyHashCode hashCode
public boolean compare Keyed Element other if other instanceof Bundle Loader Proxy return false Bundle Loader Proxy other Loader Proxy Bundle Loader Proxy other return symbolic Name equals other Loader Proxy symbolic Name version equals other Loader Proxy version  KeyedElement BundleLoaderProxy BundleLoaderProxy otherLoaderProxy BundleLoaderProxy symbolicName otherLoaderProxy symbolicName otherLoaderProxy
public Object get Key return key  getKey
public void set Stale stale true  setStale
public boolean is Stale return stale  isStale
public boolean in Use return users size 0  inUse
public Abstract Bundle get Dependent Bundles Keyed Element proxy Loaders users elements Keyed Hash Set bundles new Keyed Hash Set proxy Loaders length false for int i 0 i proxy Loaders length i Bundle Loader Proxy loader Proxy Bundle Loader Proxy proxy Loaders i bundles add loader Proxy get Bundle Host Keyed Element elements bundles elements Abstract Bundle result new Abstract Bundle elements length System arraycopy elements 0 result 0 elements length return result  AbstractBundle getDependentBundles KeyedElement proxyLoaders KeyedHashSet KeyedHashSet proxyLoaders proxyLoaders BundleLoaderProxy loaderProxy BundleLoaderProxy proxyLoaders loaderProxy getBundleHost KeyedElement AbstractBundle AbstractBundle
public String to String String symbolic Name bundle get Symbolic Name String Buffer sb new String Buffer symbolic Name null bundle get Location symbolic Name sb append append Constants BUNDLE VERSION ATTRIBUTE NON NLS 1 sb append append version to String append NON NLS 1 NON NLS 2 return sb to String  toString symbolicName getSymbolicName StringBuffer StringBuffer symbolicName getLocation symbolicName BUNDLE_VERSION_ATTRIBUTE toString toString
protected void mark Dependencies if marked Used Dependencies bundle is Resolved return marked Used Dependencies true Bundle Description bundle Des bundle get Bundle Description if Debug DEBUG Debug DEBUG GENERAL if bundle Des null Debug println Bundle resolved called and get Bundle Description returned null this NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 Package Specification packages bundle Des get Packages Bundle Specification required Bundles bundle Des get Required Bundles Bundle Description frag Descriptions bundle Des get Fragments mark Used Packages packages mark Used Bundles required Bundles for int i 0 i frag Descriptions length i if frag Descriptions i is Resolved mark Used Packages frag Descriptions i get Packages mark Used Bundles frag Descriptions i get Required Bundles besure to create the Bundle Loader get Bundle Loader  markDependencies markedUsedDependencies isResolved markedUsedDependencies BundleDescription bundleDes getBundleDescription DEBUG_GENERAL bundleDes getBundleDescription printStackTrace PackageSpecification bundleDes getPackages BundleSpecification requiredBundles bundleDes getRequiredBundles BundleDescription fragDescriptions bundleDes getFragments markUsedPackages markUsedBundles requiredBundles fragDescriptions fragDescriptions isResolved markUsedPackages fragDescriptions getPackages markUsedBundles fragDescriptions getRequiredBundles BundleLoader getBundleLoader
private void mark Used Packages Package Specification packages if packages null for int i 0 i packages length i Single Source Package packagesource Single Source Package bundle framework package Admin exported Packages get By Key packages i get Name if packagesource null packagesource get Supplier mark Used this  markUsedPackages PackageSpecification SingleSourcePackage SingleSourcePackage packageAdmin exportedPackages getByKey getName getSupplier markUsed
private void mark Used Bundles Bundle Specification required Bundles if required Bundles null for int i 0 i required Bundles length i if required Bundles i is Resolved String bundle Key new String Buffer required Bundles i get Name append   append required Bundles i get Actual Version to String to String NON NLS 1 Bundle Loader Proxy loader Proxy Bundle Loader Proxy bundle framework package Admin exported Bundles get By Key bundle Key if loader Proxy null loader Proxy mark Used this  markUsedBundles BundleSpecification requiredBundles requiredBundles requiredBundles requiredBundles isResolved bundleKey StringBuffer requiredBundles getName _ requiredBundles getActualVersion toString toString BundleLoaderProxy loaderProxy BundleLoaderProxy packageAdmin exportedBundles getByKey bundleKey loaderProxy loaderProxy markUsed
public org osgi framework Bundle get Bundle if is Stale return null return bundle  getBundle isStale
public org osgi framework Bundle get Requiring Bundles if is Stale return null Keyed Element requiring Proxies users elements Array List requiring Bundles new Array List for int i 0 i requiring Proxies length i Bundle Loader Proxy requiring Proxy Bundle Loader Proxy requiring Proxies i Bundle Loader requiring Loader requiring Proxy get Bundle Loader Bundle Loader Proxy req Bundles requiring Loader required Bundles if req Bundles null for int j 0 j req Bundles length j if req Bundles j this requiring Bundles add requiring Proxy get Bundle Host return Abstract Bundle requiring Bundles to Array new Abstract Bundle requiring Bundles size  getRequiringBundles isStale KeyedElement requiringProxies ArrayList requiringBundles ArrayList requiringProxies BundleLoaderProxy requiringProxy BundleLoaderProxy requiringProxies BundleLoader requiringLoader requiringProxy getBundleLoader BundleLoaderProxy reqBundles requiringLoader requiredBundles reqBundles reqBundles reqBundles requiringBundles requiringProxy getBundleHost AbstractBundle requiringBundles toArray AbstractBundle requiringBundles
public String get Symbolic Name return symbolic Name  getSymbolicName symbolicName
public String get Version return version to String  getVersion toString
public boolean is Removal Pending return bundle framework package Admin removal Pending contains this  isRemovalPending packageAdmin removalPending
public Single Source Package get Package Source String pkg Name Single Source Package pkg Source Single Source Package pkg Sources get By Key pkg Name if pkg Source null synchronized pkg Sources pkg Source new Single Source Package pkg Name this pkg Sources add pkg Source return pkg Source  SingleSourcePackage getPackageSource pkgName SingleSourcePackage pkgSource SingleSourcePackage pkgSources getByKey pkgName pkgSource pkgSources pkgSource SingleSourcePackage pkgName pkgSources pkgSource pkgSource

Constructor for Bundle Native Code It reads bundle native code data from the manifest file protected Bundle Native Code Manifest Element element Abstract Bundle bundle this bundle bundle String native Paths element get Value Components for int i 0 i native Paths length i add Path native Paths i set Attribute element Constants BUNDLE NATIVECODE OSNAME set Attribute element Constants BUNDLE NATIVECODE PROCESSOR set Attribute element Constants BUNDLE NATIVECODE OSVERSION set Attribute element Constants BUNDLE NATIVECODE LANGUAGE set Attribute element Constants SELECTION FILTER ATTRIBUTE  BundleNativeCode BundleNativeCode ManifestElement AbstractBundle nativePaths getValueComponents nativePaths addPath nativePaths setAttribute BUNDLE_NATIVECODE_OSNAME setAttribute BUNDLE_NATIVECODE_PROCESSOR setAttribute BUNDLE_NATIVECODE_OSVERSION setAttribute BUNDLE_NATIVECODE_LANGUAGE setAttribute SELECTION_FILTER_ATTRIBUTE
private void set Attribute Manifest Element element String attribute String attr Values element get Attributes attribute if attr Values null for int i 0 i attr Values length i add Attribute attribute attr Values i  setAttribute ManifestElement attrValues getAttributes attrValues attrValues addAttribute attrValues
Returns the native code paths return Vector of String code paths public String get Paths if nativepaths null return null String paths new String nativepaths size nativepaths to Array paths return paths  getPaths toArray
add Path is used to add a new element to the list of native files param nativepath new native file protected void add Path String nativepath if nativepaths null nativepaths new Attribute nativepaths add Element nativepath  addPath addPath addElement
add Attribute is used to add the specification version string to the package description It is the only key supported at this time param key attribute key name param value attribute value name protected synchronized void add Attribute String key String value if key equals Constants BUNDLE NATIVECODE PROCESSOR if processor null processor new Attribute processor add Element alias Mapper alias Processor value return if key equals Constants BUNDLE NATIVECODE OSNAME if osname null osname new Attribute osname add Element alias Mapper aliasOS Name value return if key equals Constants BUNDLE NATIVECODE OSVERSION if osversion null osversion new Attribute osversion add Element new Version value return if key equals Constants SELECTION FILTER ATTRIBUTE if filter String null filter String value return if key equals Constants BUNDLE NATIVECODE LANGUAGE if language null language new Attribute language add Element value to Lower Case return  addAttribute addAttribute BUNDLE_NATIVECODE_PROCESSOR addElement aliasMapper aliasProcessor BUNDLE_NATIVECODE_OSNAME addElement aliasMapper aliasOSName BUNDLE_NATIVECODE_OSVERSION addElement SELECTION_FILTER_ATTRIBUTE filterString filterString BUNDLE_NATIVECODE_LANGUAGE addElement toLowerCase
Override to String Return a String representation of this object return String representation of the object public String to String int size nativepaths size String Buffer sb new String Buffer 50 size for int i 0 i size i if i 0 sb append sb append nativepaths element At i to String if processor null size processor size for int i 0 i size i sb append sb append Constants BUNDLE NATIVECODE PROCESSOR sb append sb append processor element At i to String if osname null size osname size for int i 0 i size i sb append sb append Constants BUNDLE NATIVECODE OSNAME sb append sb append osname element At i to String if osversion null size osversion size for int i 0 i size i sb append sb append Constants BUNDLE NATIVECODE OSVERSION sb append sb append osversion element At i to String if language null size language size for int i 0 i size i sb append sb append Constants BUNDLE NATIVECODE LANGUAGE sb append sb append language element At i to String return sb to String  toString toString StringBuffer StringBuffer elementAt toString BUNDLE_NATIVECODE_PROCESSOR elementAt toString BUNDLE_NATIVECODE_OSNAME elementAt toString BUNDLE_NATIVECODE_OSVERSION elementAt toString BUNDLE_NATIVECODE_LANGUAGE elementAt toString toString
Return the match value for the given processor and os name A higher value indicates a better match param processor processor name to match against param osname os name to match against return match value public int match ProcessorOS Name Filter String processor String osname if this processor null this osname null return 0 String other Processor alias Mapper alias Processor processor String otherOS Name String alias Mapper aliasOS Name osname if this processor equals other Processor this osname equals otherOS Name match Filter return 1 return 0  matchProcessorOSNameFilter otherProcessor aliasMapper aliasProcessor otherOSName aliasMapper aliasOSName otherProcessor otherOSName matchFilter
Return the higest matching value for the given os version that is less than or equal to the given os version param version os version to match against return version or null if no match public Version matchOS Version Version version if this osversion null return Version empty Version Version result null int size this osversion size for int i 0 i size i Version ver Version this osversion element At i int compare ver compare To version if compare 0 versions are equal best possible match return ver if compare 0 requested version current OS version if result null ver compare To result 0 result ver remember the highest version less than osversion return result  matchOSVersion emptyVersion elementAt compareTo compareTo
Return the match value for the given language A higher value indicates a better match param language language name to match against return match value public int match Language String language if this language null return 1 if this language equals language to Lower Case return 2 return 0  matchLanguage toLowerCase
public boolean match Filter if filter String null return true Filter Impl filter try filter new Filter Impl filter String catch Invalid Syntax Exception e Bundle Exception be new Bundle Exception Msg formatter get String BUNDLE NATIVECODE INVALID FILTER e NON NLS 1 bundle framework publish Framework Event Framework Event ERROR bundle be return false return filter match System get Properties  matchFilter filterString FilterImpl FilterImpl filterString InvalidSyntaxException BundleException BundleException getString BUNDLE_NATIVECODE_INVALID_FILTER publishFrameworkEvent FrameworkEvent getProperties
static class Attribute extends Vector Attribute constructor Attribute super 10 10 
Perform an OR operation on equals param obj Object to test against return true if at least one attribute is equal false otherwise public synchronized boolean equals Object obj for int i 0 i element Count i Object data element Data i if data instanceof String if element Data i equals obj return true else Enumeration e Vector data elements while e has More Elements if String e next Element equals obj return true return false  elementCount elementData elementData hasMoreElements nextElement
Add the object if it is not already in the vector param obj Object to add to the vector public synchronized void add Element Object obj if contains obj super add Element obj  addElement addElement

abstract class Bundle Permission Collection extends Permission Collection The Permission collection will unresolve the permissions in these packages param unresolved Packages A list of the package which have been unresolved as a result of a package Refresh  BundlePermissionCollection PermissionCollection unresolvedPackages packageRefresh

Constructs a new instance of this class Bundle Permissions Package Admin Impl package Admin super this package Admin package Admin  BundlePermissions PackageAdminImpl packageAdmin packageAdmin packageAdmin
Adds the argument to the collection parampermission java security Permission the permission to add to the collection public void add Permission permission if is Read Only throw new Security Exception Permission Collection collection synchronized collections collection find Collection permission if collection null collection new Permission Collection permission if permission instanceof All Permission all Permission collection collection add permission  isReadOnly SecurityException PermissionCollection findCollection newPermissionCollection AllPermission allPermission
Permission next find Next Permission public boolean has More Elements return next null  findNextPermission hasMoreElements
public Object next Element if next null throw new No Such Element Exception else Object answer next next find Next Permission return answer  nextElement NoSuchElementException findNextPermission
no permissions left to return it answers null private Permission find Next Permission Loop until we get a collection with at least one element while c null enum Map has More Elements c Permission Collection enum Map next Element enumC c elements if enumC has More Elements c null At this point c null if there are no more elements and otherwise is the first collection with a free element with enumC set up to return that element if c null no more elements so return null return null else Permission answer Permission enumC next Element if enumC has More Elements c null return answer  findNextPermission enumMap hasMoreElements PermissionCollection enumMap nextElement hasMoreElements nextElement hasMoreElements
Answers an enumeration of the permissions in the receiver return Enumeration the permissions in the receiver public Enumeration elements return new Enumeration Enumeration enum Map collections elements Permission Collection c Enumeration enumC Permission next find Next Permission public boolean has More Elements return next null public Object next Element if next null throw new No Such Element Exception else Object answer next next find Next Permission return answer This method is the important one It looks for and answers the next available permission If there are no permissions left to return it answers null private Permission find Next Permission Loop until we get a collection with at least one element while c null enum Map has More Elements c Permission Collection enum Map next Element enumC c elements if enumC has More Elements c null At this point c null if there are no more elements and otherwise is the first collection with a free element with enumC set up to return that element if c null no more elements so return null return null else Permission answer Permission enumC next Element if enumC has More Elements c null return answer  returnEnumeration enumMap PermissionCollection findNextPermission hasMoreElements nextElement NoSuchElementException findNextPermission findNextPermission enumMap hasMoreElements PermissionCollection enumMap nextElement hasMoreElements nextElement hasMoreElements
Find the appropriate permission collection to use for the given permission parampermission Permission the permission to find a collection for return Permission Collection the collection to use with the permission private Permission Collection find Collection Permission permission Class clazz permission get Class Permission Collection collection Permission Collection collections get clazz if collection null synchronized collections collection Permission Collection collections get clazz if collection null collection resolve Permissions permission return collection  returnPermissionCollection PermissionCollection findCollection getClass PermissionCollection PermissionCollection PermissionCollection resolvePermissions
This method will attempt to resolve unresolved permissions of the type of the specified permission This method should only be called while holding the collections lock param permission Permission whose type we shall attempt to resolve return A Permission Collection for the resolved permissions or tt null tt if the permissions cannot currently be resolved private Permission Collection resolve Permissions Permission permission Unresolved Permission Collection unresolved Collection Unresolved Permission Collection collections get Unresolved Permission class if unresolved Collection null String name permission get Class get Name Vector permissions unresolved Collection get Permissions name if permissions null Permission Collection collection null Class clazz We really need to resolve the permission by loading it only from the proper classloader i e the system classloader or and exporting bundle s classloader Otherwise there is a security hole clazz package Admin load Service Class name null if clazz null return null Enumeration enum permissions elements while enum has More Elements Permission resolved Unresolved Permission enum next Element resolve clazz if resolved null if collection null collection new Permission Collection resolved collection add resolved return collection return null  PermissionCollection PermissionCollection resolvePermissions UnresolvedPermissionCollection unresolvedCollection UnresolvedPermissionCollection UnresolvedPermission unresolvedCollection getClass getName unresolvedCollection getPermissions PermissionCollection packageAdmin loadServiceClass hasMoreElements UnresolvedPermission nextElement newPermissionCollection
Creates a Permission Collection suitable to hold the specified permission The created collection is added to the collections Hashtable This method should only be called while holding the collections lock private Permission Collection new Permission Collection Permission permission Permission Collection collection permission new Permission Collection if collection null collection new Permissions Hash collections put permission get Class collection return collection  PermissionCollection PermissionCollection newPermissionCollection PermissionCollection newPermissionCollection PermissionsHash getClass
Indicates whether the argument permission is implied by the permissions contained in the receiver returnboolean code true code if the argument permission is implied by the permissions in the receiver and code false code if it is not paramperm java security Permission the permission to check public boolean implies Permission perm if all Permission null all Permission implies perm return true Permission Collection collection find Collection perm if collection null return false return collection implies perm  allPermission allPermission PermissionCollection findCollection
The Permission collection will unresolve the permissions in these packages param unresolved Packages A list of the package which have been unresolved as a result of a package Refresh void unresolve Permissions Hashtable unresolved Packages synchronized collections int size collections size Class clazzes new Class size Enumeration enum collections keys for int i 0 i size i clazzes i Class enum next Element for int i 0 i size i Class clazz clazzes i String name clazz get Name int index name last Index Of find last period in class name if index 0 if unresolved Packages get name substring 0 index null if Debug DEBUG Debug DEBUG SECURITY Debug println Unresolving permission class name NON NLS 1 collections remove clazz  unresolvedPackages packageRefresh unresolvePermissions unresolvedPackages nextElement getName lastIndexOf unresolvedPackages DEBUG_SECURITY

public Bundle Repository int initial Capacity Package Admin Impl package Admin bundles By Install Order new Array List initial Capacity bundles By Id new Keyed Hash Set initial Capacity true bundles By Symbolic Name new Hash Map initial Capacity this package Admin package Admin  BundleRepository initialCapacity PackageAdminImpl packageAdmin bundlesByInstallOrder ArrayList initialCapacity bundlesById KeyedHashSet initialCapacity bundlesBySymbolicName HashMap initialCapacity packageAdmin packageAdmin
Gets a list of bundles ordered by install order return List of bundles by install order public List get Bundles return bundles By Install Order  getBundles bundlesByInstallOrder
Gets a bundle by its bundle Id param bundle Id return public Abstract Bundle get Bundle long bundle Id Long key new Long bundle Id return Abstract Bundle bundles By Id get By Key key  bundleId AbstractBundle getBundle bundleId bundleId AbstractBundle bundlesById getByKey
public Abstract Bundle get Bundles String symbolic Name return Abstract Bundle bundles By Symbolic Name get symbolic Name  AbstractBundle getBundles symbolicName AbstractBundle bundlesBySymbolicName symbolicName
public Abstract Bundle get Bundle String symbolic Name String version Abstract Bundle bundles Abstract Bundle bundles By Symbolic Name get symbolic Name if bundles null Version ver new Version version if bundles length 0 for int i 0 i bundles length i if bundles i get Version equals ver return bundles i return null  AbstractBundle getBundle symbolicName AbstractBundle AbstractBundle bundlesBySymbolicName symbolicName getVersion
public void add Abstract Bundle bundle bundles By Install Order add bundle bundles By Id add bundle String symbolic Name bundle get Symbolic Name if symbolic Name null Abstract Bundle bundles Abstract Bundle bundles By Symbolic Name get symbolic Name if bundles null making the initial capacity on this 1 since it should be rare that multiple version exist bundles new Abstract Bundle 1 bundles 0 bundle bundles By Symbolic Name put symbolic Name bundles return Array List list new Array List bundles length 1 find place to insert the bundle Version new Version bundle get Version boolean added false for int i 0 i bundles length i Abstract Bundle old Bundle bundles i Version old Version old Bundle get Version if added new Version match Greater Or Equal To old Version added true list add bundle list add old Bundle if added list add bundle bundles new Abstract Bundle list size list to Array bundles bundles By Symbolic Name put symbolic Name bundles  AbstractBundle bundlesByInstallOrder bundlesById symbolicName getSymbolicName symbolicName AbstractBundle AbstractBundle bundlesBySymbolicName symbolicName AbstractBundle bundlesBySymbolicName symbolicName ArrayList ArrayList newVersion getVersion AbstractBundle oldBundle oldVersion oldBundle getVersion newVersion matchGreaterOrEqualTo oldVersion oldBundle AbstractBundle toArray bundlesBySymbolicName symbolicName
public boolean remove Abstract Bundle bundle remove by bundle ID boolean found bundles By Id remove bundle if found return false remove by install order bundles By Install Order remove bundle remove by symbolic name String symbolic Name bundle get Symbolic Name if symbolic Name null return true Abstract Bundle bundles Abstract Bundle bundles By Symbolic Name get symbolic Name if bundles null return true found some bundles with the global name remove all references to the specified bundle int num Removed 0 for int i 0 i bundles length i if bundle bundles i num Removed bundles i null if num Removed 0 if bundles length num Removed 0 no bundles left in the array remove the array from the hash bundles By Symbolic Name remove symbolic Name else create a new array with the null entries removed Abstract Bundle new Bundles new Abstract Bundle bundles length num Removed int index Cnt 0 for int i 0 i bundles length i if bundles i null new Bundles index Cnt bundles i index Cnt bundles By Symbolic Name put symbolic Name new Bundles return true  AbstractBundle bundlesById bundlesByInstallOrder symbolicName getSymbolicName symbolicName AbstractBundle AbstractBundle bundlesBySymbolicName symbolicName numRemoved numRemoved numRemoved numRemoved bundlesBySymbolicName symbolicName AbstractBundle newBundles AbstractBundle numRemoved indexCnt newBundles indexCnt indexCnt bundlesBySymbolicName symbolicName newBundles
public void remove All Bundles bundles By Install Order clear bundles By Id new Keyed Hash Set bundles By Symbolic Name clear  removeAllBundles bundlesByInstallOrder bundlesById KeyedHashSet bundlesBySymbolicName
public void mark Dependancies Keyed Element elements bundles By Id elements for int i 0 i elements length i if elements i instanceof Bundle Host Bundle Host elements i get Loader Proxy mark Dependencies  markDependancies KeyedElement bundlesById BundleHost BundleHost getLoaderProxy markDependencies
public void un Mark Dependancies Bundle Loader Proxy user Keyed Element elements bundles By Id elements for int i 0 i elements length i if elements i instanceof Bundle Host Bundle Loader Proxy loader Proxy Bundle Host elements i get Loader Proxy loader Proxy un Mark Used user look in removal pending int size package Admin removal Pending size for int i 0 i size i Bundle Loader Proxy loader Proxy Bundle Loader Proxy package Admin removal Pending element At i loader Proxy un Mark Used user user marked Used Dependencies false  unMarkDependancies BundleLoaderProxy KeyedElement bundlesById BundleHost BundleLoaderProxy loaderProxy BundleHost getLoaderProxy loaderProxy unMarkUsed packageAdmin removalPending BundleLoaderProxy loaderProxy BundleLoaderProxy packageAdmin removalPending elementAt loaderProxy unMarkUsed markedUsedDependencies

Bundle Resource Permission long id super String value Of id this id id  BundleResourcePermission valueOf
Bundle Resource Permission String id super id this id Long parse Long id  BundleResourcePermission parseLong
Determines if the specified permission is implied by this object param p The target permission to interrogate return tt true tt if the specified permission is implied by this object tt false tt otherwise public boolean implies Permission p if p instanceof Bundle Resource Permission Bundle Resource Permission target Bundle Resource Permission p return this id target id return false  BundleResourcePermission BundleResourcePermission BundleResourcePermission
Returns the empty String public String get Actions return NON NLS 1  getActions
Determines the equality of two tt Bundle Resource Permission tt objects param obj The object to test for equality with this object return tt true tt if tt i obj i tt is a tt Bundle Resource Permission tt and has the same bundle id this object tt false tt otherwise public boolean equals Object obj if obj this return true if obj instanceof Bundle Resource Permission return false Bundle Resource Permission target Bundle Resource Permission obj return this id target id  BundleResourcePermission BundleResourcePermission BundleResourcePermission BundleResourcePermission BundleResourcePermission
Returns the hash code value for this object return A hash code value for this object public int hash Code return get Name hash Code  hashCode getName hashCode

private Input Stream in protected Bundle Source Input Stream in super null this in in  InputStream BundleSource InputStream
public void connect throws IO Exception connected true  IOException
public Input Stream get Input Stream throws IO Exception return in  InputStream getInputStream IOException

public Exported Package Impl Package Specification package Spec Bundle Loader Proxy supplier super package Spec get Name supplier Version version package Spec get Actual Version if version null this spec Version version to String  ExportedPackageImpl PackageSpecification packageSpec BundleLoaderProxy packageSpec getName packageSpec getActualVersion specVersion toString
public String get Name return get Id  getName getId
public org osgi framework Bundle get Exporting Bundle if supplier is Stale return null return supplier get Bundle Host  getExportingBundle isStale getBundleHost
public org osgi framework Bundle get Importing Bundles if supplier is Stale return null Abstract Bundle dependent Bundles supplier get Dependent Bundles Array List importing Bundles new Array List always add self importing Bundles add supplier get Bundle Host for int i 0 i dependent Bundles length i Abstract Bundle bundle dependent Bundles i Bundle Loader bundle Loader bundle get Bundle Loader check to make sure this package is really imported do not call bundle Loader get Package Exporter here because we do not want to cause the bundle to dynamically import any packages that may not have been referenced yet if bundle Loader imported Packages null bundle Loader imported Packages get By Key get Id null importing Bundles add bundle Abstract Bundle result new Abstract Bundle importing Bundles size importing Bundles to Array result return result  getImportingBundles isStale AbstractBundle dependentBundles getDependentBundles ArrayList importingBundles ArrayList importingBundles getBundleHost dependentBundles AbstractBundle dependentBundles BundleLoader bundleLoader getBundleLoader bundleLoader getPackageExporter bundleLoader importedPackages bundleLoader importedPackages getByKey getId importingBundles AbstractBundle AbstractBundle importingBundles importingBundles toArray
public String get Specification Version return spec Version  getSpecificationVersion specVersion
public boolean is Removal Pending Abstract Bundle bundle supplier get Bundle Host return bundle framework package Admin removal Pending contains supplier  isRemovalPending AbstractBundle getBundleHost packageAdmin removalPending
public String to String String Buffer result new String Buffer get Id if spec Version null result append append Constants PACKAGE SPECIFICATION VERSION NON NLS 1 result append append spec Version append NON NLS 1 NON NLS 2 return result to String  toString StringBuffer StringBuffer getId specVersion PACKAGE_SPECIFICATION_VERSION specVersion toString

Constructor param filterstring filter for this listener param listener real listener exception Invalid Syntax Exception if the filter is invalid protected Filtered Service Listener String filterstring Service Listener listener throws Invalid Syntax Exception filter new Filter Impl filterstring this listener listener  InvalidSyntaxException FilteredServiceListener ServiceListener InvalidSyntaxException FilterImpl
Receive notification that a service has had a change occur in it s lifecycle param event The Service Event public void service Changed Service Event event Service Reference Impl reference Service Reference Impl event get Service Reference if Debug DEBUG Debug DEBUG EVENTS String listener Name this get Class get Name Integer to Hex String this hash Code NON NLS 1 Debug println filter Service Event listener Name filter reference registration properties NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 if filter match reference if Debug DEBUG Debug DEBUG EVENTS String listener Name listener get Class get Name Integer to Hex String listener hash Code NON NLS 1 Debug println dispatch Filtered Service Event listener Name NON NLS 1 NON NLS 2 listener service Changed event  ServiceEvent serviceChanged ServiceEvent ServiceReferenceImpl ServiceReferenceImpl getServiceReference DEBUG_EVENTS listenerName getClass getName toHexString hashCode filterServiceEvent listenerName DEBUG_EVENTS listenerName getClass getName toHexString hashCode dispatchFilteredServiceEvent listenerName serviceChanged
Get the filter string used by this Filtered listener return The filter string used by this listener public String to String return filter to String  toString toString

Constructs a link Filter Impl object This filter object may be used to match a link Service Reference Impl or a Dictionary p If the filter cannot be parsed an link Invalid Syntax Exception will be thrown with a human readable message where the filter became unparsable param filter the filter string exception Invalid Syntax Exception If the filter parameter contains an invalid filter string that cannot be parsed public Filter Impl String filter throws Invalid Syntax Exception top Level true new Parser filter parse this  FilterImpl ServiceReferenceImpl InvalidSyntaxException InvalidSyntaxException FilterImpl InvalidSyntaxException topLevel
Filter using a service s properties The Filter is executed using the referenced service s properties param reference the reference to the service whose properties are used in the match return code true code if the service s properties match this filter code false code otherwise public boolean match org osgi framework Service Reference reference return match0 Service Reference Impl reference registration properties  ServiceReference ServiceReferenceImpl
Filter using a Dictionary The Filter is executed using the Dictionary s keys param dictionary the dictionary whose keys are used in the match return code true code if the Dictionary s keys match this filter code false code otherwise public boolean match Dictionary dictionary if dictionary null dictionary new Headers dictionary return match0 dictionary 
Returns this Filter object s filter string The filter string is normalized by removing whitespace which does not affect the meaning of the filter return filter string public String to String if this filter null String Buffer filter new String Buffer filter append switch operation case AND filter append Filter Impl filters Filter Impl value int size filters length for int i 0 i size i filter append filters i to String break case OR filter append Filter Impl filters Filter Impl value int size filters length for int i 0 i size i filter append filters i to String break case NOT filter append filter append value to String break case SUBSTRING filter append attr filter append String substrings String value int size substrings length for int i 0 i size i String substr substrings i if substr null filter append else xxx filter append encode Value substr break case EQUAL filter append attr filter append filter append encode Value value to String break case GREATER filter append attr filter append NON NLS 1 filter append encode Value value to String break case LESS filter append attr filter append NON NLS 1 filter append encode Value value to String break case APPROX filter append attr filter append NON NLS 1 filter append encode Value approx String value to String break case PRESENT filter append attr filter append NON NLS 1 break filter append if top Level only hold onto String object at toplevel this filter filter to String else return filter to String return this filter  toString StringBuffer StringBuffer FilterImpl FilterImpl toString FilterImpl FilterImpl toString toString encodeValue encodeValue toString encodeValue toString encodeValue toString encodeValue approxString toString topLevel toString toString
Compares this Filter object to another object param obj the object to compare return If the other object is a Filter object then returns code this to String equals obj to String code otherwise code false code public boolean equals Object obj if obj this return true if obj instanceof Filter Impl return false return this to String equals obj to String  toString toString FilterImpl toString toString
Returns the hash Code for this Filter object return The hash Code of the filter string i i e i code this to String hash Code code public int hash Code return this to String hash Code  hashCode hashCode toString hashCode hashCode toString hashCode
protected boolean top Level protected Filter Impl top Level false  topLevel FilterImpl topLevel
protected void set Filter int operation String attr Object value this operation operation this attr attr this value value  setFilter
Filter using a service s properties The Filter is executed using the referenced service s properties param reference A reference to the service whose properties are used in the match return If the service s properties match the filter return code true code Otherwise return code false code protected boolean match Service Reference Impl reference return match0 reference registration properties  ServiceReferenceImpl
Internal match routine Dictionary parameter must support case insensitive get param properties A dictionary whose keys are used in the match return If the Dictionary s keys match the filter return code true code Otherwise return code false code protected boolean match0 Dictionary properties switch operation case AND Filter Impl filters Filter Impl value int size filters length for int i 0 i size i if filters i match0 properties return false return true case OR Filter Impl filters Filter Impl value int size filters length for int i 0 i size i if filters i match0 properties return true return false case NOT Filter Impl filter Filter Impl value return filter match0 properties case SUBSTRING case EQUAL case GREATER case LESS case APPROX Object prop properties null null properties get attr return compare operation prop value case PRESENT if Debug DEBUG Debug DEBUG FILTER Debug println PRESENT attr NON NLS 1 NON NLS 2 Object prop properties null null properties get attr return prop null return false  FilterImpl FilterImpl FilterImpl FilterImpl FilterImpl FilterImpl DEBUG_FILTER
Encode the value string such that and are escaped param value unencoded value string return encoded value string protected static String encode Value String value boolean encoded false int inlen value length int outlen inlen 1 inlen 2 char output new char outlen value get Chars 0 inlen output inlen int cursor 0 for int i inlen i outlen i char c output i switch c case case case case output cursor cursor encoded true break output cursor c cursor return encoded new String output 0 cursor value  encodeValue getChars
protected boolean compare int operation Object value1 Object value2 if value1 null if Debug DEBUG Debug DEBUG FILTER Debug println compare value1 value2 NON NLS 1 NON NLS 2 NON NLS 3 return false if value1 instanceof String return compare String operation String value1 value2 Class clazz value1 get Class if clazz is Array Class type clazz get Component Type if type is Primitive return compare PrimitiveArray operation type value1 value2 else return compare ObjectArray operation Object value1 value2 if value1 instanceof Vector return compare Vector operation Vector value1 value2 if value1 instanceof Integer return compare Integer operation Integer value1 int Value value2 if value1 instanceof Long return compare Long operation Long value1 long Value value2 if value1 instanceof Byte return compare Byte operation Byte value1 byte Value value2 if value1 instanceof Short return compare Short operation Short value1 short Value value2 if value1 instanceof Character return compare Character operation Character value1 char Value value2 if value1 instanceof Float return compare Float operation Float value1 float Value value2 if value1 instanceof Double return compare Double operation Double value1 double Value value2 if value1 instanceof Boolean return compare Boolean operation Boolean value1 boolean Value value2 if value1 instanceof Comparable return compare Comparable operation Comparable value1 value2 if Debug DEBUG Debug DEBUG FILTER Debug println Type not supported NON NLS 1 return false  DEBUG_FILTER compare_String getClass isArray getComponentType isPrimitive compare_PrimitiveArray compare_ObjectArray compare_Vector compare_Integer intValue compare_Long longValue compare_Byte byteValue compare_Short shortValue compare_Character charValue compare_Float floatValue compare_Double doubleValue compare_Boolean booleanValue compare_Comparable DEBUG_FILTER
protected boolean compare Vector int operation Vector vector Object value2 int size vector size for int i 0 i size i if compare operation vector element At i value2 return true return false  compare_Vector elementAt
protected boolean compare ObjectArray int operation Object array Object value2 int size array length for int i 0 i size i if compare operation array i value2 return true return false  compare_ObjectArray
protected boolean compare PrimitiveArray int operation Class type Object primarray Object value2 if Integer TYPE is Assignable From type int array int primarray int size array length for int i 0 i size i if compare Integer operation array i value2 return true return false if Long TYPE is Assignable From type long array long primarray int size array length for int i 0 i size i if compare Long operation array i value2 return true return false if Byte TYPE is Assignable From type byte array byte primarray int size array length for int i 0 i size i if compare Byte operation array i value2 return true return false if Short TYPE is Assignable From type short array short primarray int size array length for int i 0 i size i if compare Short operation array i value2 return true return false if Character TYPE is Assignable From type char array char primarray int size array length for int i 0 i size i if compare Character operation array i value2 return true return false if Float TYPE is Assignable From type float array float primarray int size array length for int i 0 i size i if compare Float operation array i value2 return true return false if Double TYPE is Assignable From type double array double primarray int size array length for int i 0 i size i if compare Double operation array i value2 return true return false if Boolean TYPE is Assignable From type boolean array boolean primarray int size array length for int i 0 i size i if compare Boolean operation array i value2 return true return false return false  compare_PrimitiveArray isAssignableFrom compare_Integer isAssignableFrom compare_Long isAssignableFrom compare_Byte isAssignableFrom compare_Short isAssignableFrom compare_Character isAssignableFrom compare_Float isAssignableFrom compare_Double isAssignableFrom compare_Boolean
protected boolean compare String int operation String string Object value2 switch operation case SUBSTRING if Debug DEBUG Debug DEBUG FILTER Debug println SUBSTRING string value2 NON NLS 1 NON NLS 2 NON NLS 3 String substrings String value2 int pos 0 int size substrings length for int i 0 i size i String substr substrings i if i 1 size if this is not that last substr if substr null String substr2 substrings i 1 if substr2 null continue ignore first star else xxx if Debug DEBUG Debug DEBUG FILTER Debug println index Of substr2 pos NON NLS 1 NON NLS 2 NON NLS 3 int index string index Of substr2 pos if index 1 return false i pos index substr2 length else xxx int len substr length if Debug DEBUG Debug DEBUG FILTER Debug println region Matches pos substr NON NLS 1 NON NLS 2 NON NLS 3 if string region Matches pos substr 0 len pos len else return false else last substr if substr null return true else xxx if Debug DEBUG Debug DEBUG FILTER Debug println region Matches pos substr NON NLS 1 NON NLS 2 NON NLS 3 return string region Matches pos substr 0 substr length return true case EQUAL if Debug DEBUG Debug DEBUG FILTER Debug println EQUAL string value2 NON NLS 1 NON NLS 2 NON NLS 3 return string equals value2 case APPROX if Debug DEBUG Debug DEBUG FILTER Debug println APPROX string value2 NON NLS 1 NON NLS 2 NON NLS 3 string approx String string String string2 approx String String value2 return string equals Ignore Case string2 case GREATER if Debug DEBUG Debug DEBUG FILTER Debug println GREATER string value2 NON NLS 1 NON NLS 2 NON NLS 3 return string compare To String value2 0 case LESS if Debug DEBUG Debug DEBUG FILTER Debug println LESS string value2 NON NLS 1 NON NLS 2 NON NLS 3 return string compare To String value2 0 return false  compare_String DEBUG_FILTER DEBUG_FILTER indexOf indexOf DEBUG_FILTER regionMatches regionMatches DEBUG_FILTER regionMatches regionMatches DEBUG_FILTER DEBUG_FILTER approxString approxString equalsIgnoreCase DEBUG_FILTER compareTo DEBUG_FILTER compareTo
protected boolean compare Integer int operation int intval Object value2 int intval2 Integer parse Int String value2 trim switch operation case SUBSTRING if Debug DEBUG Debug DEBUG FILTER Debug println SUBSTRING intval value2 NON NLS 1 NON NLS 2 NON NLS 3 return false case EQUAL if Debug DEBUG Debug DEBUG FILTER Debug println EQUAL intval value2 NON NLS 1 NON NLS 2 NON NLS 3 return intval intval2 case APPROX if Debug DEBUG Debug DEBUG FILTER Debug println APPROX intval value2 NON NLS 1 NON NLS 2 NON NLS 3 return intval intval2 case GREATER if Debug DEBUG Debug DEBUG FILTER Debug println GREATER intval value2 NON NLS 1 NON NLS 2 NON NLS 3 return intval intval2 case LESS if Debug DEBUG Debug DEBUG FILTER Debug println LESS intval value2 NON NLS 1 NON NLS 2 NON NLS 3 return intval intval2 return false  compare_Integer parseInt DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER
protected boolean compare Long int operation long longval Object value2 long longval2 Long parse Long String value2 trim switch operation case SUBSTRING if Debug DEBUG Debug DEBUG FILTER Debug println SUBSTRING longval value2 NON NLS 1 NON NLS 2 NON NLS 3 return false case EQUAL if Debug DEBUG Debug DEBUG FILTER Debug println EQUAL longval value2 NON NLS 1 NON NLS 2 NON NLS 3 return longval longval2 case APPROX if Debug DEBUG Debug DEBUG FILTER Debug println APPROX longval value2 NON NLS 1 NON NLS 2 NON NLS 3 return longval longval2 case GREATER if Debug DEBUG Debug DEBUG FILTER Debug println GREATER longval value2 NON NLS 1 NON NLS 2 NON NLS 3 return longval longval2 case LESS if Debug DEBUG Debug DEBUG FILTER Debug println LESS longval value2 NON NLS 1 NON NLS 2 NON NLS 3 return longval longval2 return false  compare_Long parseLong DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER
protected boolean compare Byte int operation byte byteval Object value2 byte byteval2 Byte parse Byte String value2 trim switch operation case SUBSTRING if Debug DEBUG Debug DEBUG FILTER Debug println SUBSTRING byteval value2 NON NLS 1 NON NLS 2 NON NLS 3 return false case EQUAL if Debug DEBUG Debug DEBUG FILTER Debug println EQUAL byteval value2 NON NLS 1 NON NLS 2 NON NLS 3 return byteval byteval2 case APPROX if Debug DEBUG Debug DEBUG FILTER Debug println APPROX byteval value2 NON NLS 1 NON NLS 2 NON NLS 3 return byteval byteval2 case GREATER if Debug DEBUG Debug DEBUG FILTER Debug println GREATER byteval value2 NON NLS 1 NON NLS 2 NON NLS 3 return byteval byteval2 case LESS if Debug DEBUG Debug DEBUG FILTER Debug println LESS byteval value2 NON NLS 1 NON NLS 2 NON NLS 3 return byteval byteval2 return false  compare_Byte parseByte DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER
protected boolean compare Short int operation short shortval Object value2 short shortval2 Short parse Short String value2 trim switch operation case SUBSTRING if Debug DEBUG Debug DEBUG FILTER Debug println SUBSTRING shortval value2 NON NLS 1 NON NLS 2 NON NLS 3 return false case EQUAL if Debug DEBUG Debug DEBUG FILTER Debug println EQUAL shortval value2 NON NLS 1 NON NLS 2 NON NLS 3 return shortval shortval2 case APPROX if Debug DEBUG Debug DEBUG FILTER Debug println APPROX shortval value2 NON NLS 1 NON NLS 2 NON NLS 3 return shortval shortval2 case GREATER if Debug DEBUG Debug DEBUG FILTER Debug println GREATER shortval value2 NON NLS 1 NON NLS 2 NON NLS 3 return shortval shortval2 case LESS if Debug DEBUG Debug DEBUG FILTER Debug println LESS shortval value2 NON NLS 1 NON NLS 2 NON NLS 3 return shortval shortval2 return false  compare_Short parseShort DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER
protected boolean compare Character int operation char charval Object value2 char charval2 String value2 trim char At 0 switch operation case SUBSTRING if Debug DEBUG Debug DEBUG FILTER Debug println SUBSTRING charval value2 NON NLS 1 NON NLS 2 NON NLS 3 return false case EQUAL if Debug DEBUG Debug DEBUG FILTER Debug println EQUAL charval value2 NON NLS 1 NON NLS 2 NON NLS 3 return charval charval2 case APPROX if Debug DEBUG Debug DEBUG FILTER Debug println APPROX charval value2 NON NLS 1 NON NLS 2 NON NLS 3 return Character to Lower Case charval Character to Lower Case charval2 case GREATER if Debug DEBUG Debug DEBUG FILTER Debug println GREATER charval value2 NON NLS 1 NON NLS 2 NON NLS 3 return charval charval2 case LESS if Debug DEBUG Debug DEBUG FILTER Debug println LESS charval value2 NON NLS 1 NON NLS 2 NON NLS 3 return charval charval2 return false  compare_Character charAt DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER toLowerCase toLowerCase DEBUG_FILTER DEBUG_FILTER
protected boolean compare Boolean int operation boolean boolval Object value2 boolean boolval2 new Boolean String value2 trim boolean Value switch operation case SUBSTRING if Debug DEBUG Debug DEBUG FILTER Debug println SUBSTRING boolval value2 NON NLS 1 NON NLS 2 NON NLS 3 return false case EQUAL if Debug DEBUG Debug DEBUG FILTER Debug println EQUAL boolval value2 NON NLS 1 NON NLS 2 NON NLS 3 return boolval boolval2 case APPROX if Debug DEBUG Debug DEBUG FILTER Debug println APPROX boolval value2 NON NLS 1 NON NLS 2 NON NLS 3 return boolval boolval2 case GREATER if Debug DEBUG Debug DEBUG FILTER Debug println GREATER boolval value2 NON NLS 1 NON NLS 2 NON NLS 3 return boolval boolval2 case LESS if Debug DEBUG Debug DEBUG FILTER Debug println LESS boolval value2 NON NLS 1 NON NLS 2 NON NLS 3 return boolval boolval2 return false  compare_Boolean booleanValue DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER
protected boolean compare Float int operation float floatval Object value2 float floatval2 Float parse Float String value2 trim switch operation case SUBSTRING if Debug DEBUG Debug DEBUG FILTER Debug println SUBSTRING floatval value2 NON NLS 1 NON NLS 2 NON NLS 3 return false case EQUAL if Debug DEBUG Debug DEBUG FILTER Debug println EQUAL floatval value2 NON NLS 1 NON NLS 2 NON NLS 3 return floatval floatval2 case APPROX if Debug DEBUG Debug DEBUG FILTER Debug println APPROX floatval value2 NON NLS 1 NON NLS 2 NON NLS 3 return floatval floatval2 case GREATER if Debug DEBUG Debug DEBUG FILTER Debug println GREATER floatval value2 NON NLS 1 NON NLS 2 NON NLS 3 return floatval floatval2 case LESS if Debug DEBUG Debug DEBUG FILTER Debug println LESS floatval value2 NON NLS 1 NON NLS 2 NON NLS 3 return floatval floatval2 return false  compare_Float parseFloat DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER
protected boolean compare Double int operation double doubleval Object value2 double doubleval2 Double parse Double String value2 trim switch operation case SUBSTRING if Debug DEBUG Debug DEBUG FILTER Debug println SUBSTRING doubleval value2 NON NLS 1 NON NLS 2 NON NLS 3 return false case EQUAL if Debug DEBUG Debug DEBUG FILTER Debug println EQUAL doubleval value2 NON NLS 1 NON NLS 2 NON NLS 3 return doubleval doubleval2 case APPROX if Debug DEBUG Debug DEBUG FILTER Debug println APPROX doubleval value2 NON NLS 1 NON NLS 2 NON NLS 3 return doubleval doubleval2 case GREATER if Debug DEBUG Debug DEBUG FILTER Debug println GREATER doubleval value2 NON NLS 1 NON NLS 2 NON NLS 3 return doubleval doubleval2 case LESS if Debug DEBUG Debug DEBUG FILTER Debug println LESS doubleval value2 NON NLS 1 NON NLS 2 NON NLS 3 return doubleval doubleval2 return false  compare_Double parseDouble DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER DEBUG_FILTER
protected boolean compare Comparable int operation Comparable value1 Object value2 Constructor constructor try constructor value1 get Class get Constructor new Class value2 get Class catch No Such Method Exception e return false try value2 constructor new Instance new Object String value2 trim catch Illegal Access Exception e return false catch Invocation Target Exception e return false catch Instantiation Exception e return false switch operation case SUBSTRING if Debug DEBUG Debug DEBUG FILTER Debug println SUBSTRING value1 value2 NON NLS 1 NON NLS 2 NON NLS 3 return false case EQUAL if Debug DEBUG Debug DEBUG FILTER Debug println EQUAL value1 value2 NON NLS 1 NON NLS 2 NON NLS 3 return value1 compare To value2 0 case APPROX if Debug DEBUG Debug DEBUG FILTER Debug println APPROX value1 value2 NON NLS 1 NON NLS 2 NON NLS 3 return value1 compare To value2 0 case GREATER if Debug DEBUG Debug DEBUG FILTER Debug println GREATER value1 value2 NON NLS 1 NON NLS 2 NON NLS 3 return value1 compare To value2 0 case LESS if Debug DEBUG Debug DEBUG FILTER Debug println LESS value1 value2 NON NLS 1 NON NLS 2 NON NLS 3 return value1 compare To value2 0 return false  compare_Comparable getClass getConstructor getClass NoSuchMethodException newInstance IllegalAccessException InvocationTargetException InstantiationException DEBUG_FILTER DEBUG_FILTER compareTo DEBUG_FILTER compareTo DEBUG_FILTER compareTo DEBUG_FILTER compareTo
Map a string for an APPROX comparison This implementation removes white spaces This is the minimum implementation allowed by the OS Gi spec param input Input string return String ready for APPROX comparison protected static String approx String String input boolean changed false char output input to Char Array int length output length int cursor 0 for int i 0 i length i char c output i if Character is Whitespace c changed true continue output cursor c cursor return changed new String output 0 cursor input  OSGi approxString toCharArray isWhitespace
protected Parser String filterstring this filterstring filterstring filter filterstring to Char Array pos 0  toCharArray
protected void parse Filter Impl parent throws Invalid Syntax Exception try parse filter parent catch Array Index Out Of Bounds Exception e throw new Invalid Syntax Exception Msg formatter get String FILTER TERMINATED ABRUBTLY filterstring NON NLS 1 if pos filter length throw new Invalid Syntax Exception Msg formatter get String FILTER TRAILING CHARACTERS pos filterstring NON NLS 1  FilterImpl InvalidSyntaxException parse_filter ArrayIndexOutOfBoundsException InvalidSyntaxException getString FILTER_TERMINATED_ABRUBTLY InvalidSyntaxException getString FILTER_TRAILING_CHARACTERS
protected void parse filter Filter Impl parent throws Invalid Syntax Exception skip White Space if filter pos throw new Invalid Syntax Exception Msg formatter get String FILTER MISSING LEFTPAREN pos filterstring NON NLS 1 pos parse filtercomp parent skip White Space if filter pos throw new Invalid Syntax Exception Msg formatter get String FILTER MISSING RIGHTPAREN pos filterstring NON NLS 1 pos skip White Space  parse_filter FilterImpl InvalidSyntaxException skipWhiteSpace InvalidSyntaxException getString FILTER_MISSING_LEFTPAREN parse_filtercomp skipWhiteSpace InvalidSyntaxException getString FILTER_MISSING_RIGHTPAREN skipWhiteSpace
protected void parse filtercomp Filter Impl parent throws Invalid Syntax Exception skip White Space char c filter pos switch c case pos parse and parent break case pos parse or parent break case pos parse not parent break default parse item parent break  parse_filtercomp FilterImpl InvalidSyntaxException skipWhiteSpace parse_and parse_or parse_not parse_item
protected void parse and Filter Impl parent throws Invalid Syntax Exception skip White Space if filter pos throw new Invalid Syntax Exception Msg formatter get String FILTER MISSING LEFTPAREN pos filterstring NON NLS 1 Vector operands new Vector 10 10 while filter pos Filter Impl child new Filter Impl parse filter child operands add Element child int size operands size Filter Impl children new Filter Impl size operands copy Into children parent set Filter Filter Impl AND null children  parse_and FilterImpl InvalidSyntaxException skipWhiteSpace InvalidSyntaxException getString FILTER_MISSING_LEFTPAREN FilterImpl FilterImpl parse_filter addElement FilterImpl FilterImpl copyInto setFilter FilterImpl
protected void parse or Filter Impl parent throws Invalid Syntax Exception skip White Space if filter pos throw new Invalid Syntax Exception Msg formatter get String FILTER MISSING LEFTPAREN pos filterstring NON NLS 1 Vector operands new Vector 10 10 while filter pos Filter Impl child new Filter Impl parse filter child operands add Element child int size operands size Filter Impl children new Filter Impl size operands copy Into children parent set Filter Filter Impl OR null children  parse_or FilterImpl InvalidSyntaxException skipWhiteSpace InvalidSyntaxException getString FILTER_MISSING_LEFTPAREN FilterImpl FilterImpl parse_filter addElement FilterImpl FilterImpl copyInto setFilter FilterImpl
protected void parse not Filter Impl parent throws Invalid Syntax Exception skip White Space if filter pos throw new Invalid Syntax Exception Msg formatter get String FILTER MISSING LEFTPAREN pos filterstring NON NLS 1 Filter Impl child new Filter Impl parse filter child parent set Filter Filter Impl NOT null child  parse_not FilterImpl InvalidSyntaxException skipWhiteSpace InvalidSyntaxException getString FILTER_MISSING_LEFTPAREN FilterImpl FilterImpl parse_filter setFilter FilterImpl
protected void parse item Filter Impl parent throws Invalid Syntax Exception String attr parse attr skip White Space switch filter pos case if filter pos 1 pos 2 parent set Filter Filter Impl APPROX attr parse value return break case if filter pos 1 pos 2 parent set Filter Filter Impl GREATER attr parse value return break case if filter pos 1 pos 2 parent set Filter Filter Impl LESS attr parse value return break case if filter pos 1 int oldpos pos pos 2 skip White Space if filter pos parent set Filter Filter Impl PRESENT attr null return present pos oldpos pos Object string parse substring if string instanceof String parent set Filter Filter Impl EQUAL attr string else parent set Filter Filter Impl SUBSTRING attr string return throw new Invalid Syntax Exception Msg formatter get String FILTER INVALID OPERATOR pos filterstring NON NLS 1  parse_item FilterImpl InvalidSyntaxException parse_attr skipWhiteSpace setFilter FilterImpl parse_value setFilter FilterImpl parse_value setFilter FilterImpl parse_value skipWhiteSpace setFilter FilterImpl parse_substring setFilter FilterImpl setFilter FilterImpl InvalidSyntaxException getString FILTER_INVALID_OPERATOR
protected String parse attr throws Invalid Syntax Exception skip White Space int begin pos int end pos char c filter pos while index Of c 1 NON NLS 1 pos if Character is Whitespace c end pos c filter pos int length end begin if length 0 throw new Invalid Syntax Exception Msg formatter get String FILTER MISSING ATTR pos filterstring NON NLS 1 return new String filter begin length  parse_attr InvalidSyntaxException skipWhiteSpace indexOf isWhitespace InvalidSyntaxException getString FILTER_MISSING_ATTR
protected String parse value throws Invalid Syntax Exception String Buffer sb new String Buffer filter length pos parseloop while true char c filter pos switch c case break parseloop case throw new Invalid Syntax Exception Msg formatter get String FILTER INVALID VALUE pos filterstring NON NLS 1 case pos c filter pos fall through into default default sb append c pos break if sb length 0 throw new Invalid Syntax Exception Msg formatter get String FILTER MISSING VALUE pos filterstring NON NLS 1 return sb to String  parse_value InvalidSyntaxException StringBuffer StringBuffer InvalidSyntaxException getString FILTER_INVALID_VALUE InvalidSyntaxException getString FILTER_MISSING_VALUE toString
protected Object parse substring throws Invalid Syntax Exception String Buffer sb new String Buffer filter length pos Vector operands new Vector 10 10 parseloop while true char c filter pos switch c case if sb length 0 operands add Element sb to String break parseloop case throw new Invalid Syntax Exception Msg formatter get String FILTER INVALID VALUE pos filterstring NON NLS 1 case if sb length 0 operands add Element sb to String sb set Length 0 operands add Element null pos break case pos c filter pos fall through into default default sb append c pos break int size operands size if size 0 throw new Invalid Syntax Exception Msg formatter get String FILTER MISSING VALUE pos filterstring NON NLS 1 if size 1 Object single operands element At 0 if single null return single String strings new String size operands copy Into strings return strings  parse_substring InvalidSyntaxException StringBuffer StringBuffer addElement toString InvalidSyntaxException getString FILTER_INVALID_VALUE addElement toString setLength addElement InvalidSyntaxException getString FILTER_MISSING_VALUE elementAt copyInto
protected void skip White Space int length filter length while pos length Character is Whitespace filter pos pos  skipWhiteSpace isWhitespace

Constructor for the Framework instance This method initializes the framework to an unlaunched state public Framework Framework Adaptor adaptor initialize adaptor  FrameworkAdaptor
Initialize the framework to an unlaunched state This method is called by the Framework constructor protected void initialize Framework Adaptor adaptor long start System current Time Millis this adaptor adaptor active false install Security Manager if Debug DEBUG Debug DEBUG SECURITY Debug println Security Manager System get Security Manager NON NLS 1 Debug println Protection Domain of Framework class n this get Class get Protection Domain NON NLS 1 initialize the adaptor adaptor initialize this try adaptor initialize Storage adaptor compact Storage catch IO Exception e fatal error e print Stack Trace throw new Runtime Exception e get Message This must be done before calling any of the framework get Property methods initialize Properties adaptor get Properties initialize admin objects package Admin new Package Admin Impl this Security Manager sm System get Security Manager if sm null try permission Admin new Permission Admin Impl this adaptor get Permission Storage catch IO Exception e fatal error e print Stack Trace throw new Runtime Exception e get Message start Level Manager new Start Level Manager this create the event manager and top level event dispatchers event Manager new Event Manager Framework Event Dispatcher NON NLS 1 bundle Event new Event Listeners bundle Event Sync new Event Listeners service Event new Event Listeners framework Event new Event Listeners create the service registry serviceid 1 service Registry adaptor get Service Registry Initialize the install Lock there is no way of knowing what the initial size should be at most it will be the number of threads trying to install a bundle probably a very low number install Lock new Hashtable 10 create the system bundle create System Bundle install URL Stream Handler Factory URL setURL Stream Handler Factory new Stream Handler Factory system Bundle context adaptor install Content Handler Factory for OS Gi URL Stream Handler support URL Connection set Content Handler Factory new Content Handler Factory system Bundle context create bundle objects for all installed bundles Bundle Data bundle Datas adaptor get Installed Bundles bundles new Bundle Repository bundle Datas null 10 bundle Datas length 1 package Admin add the system bundle to the Bundle Repository bundles add system Bundle if bundle Datas null for int i 0 i bundle Datas length i Bundle Data bundledata Bundle Data bundle Datas i try Abstract Bundle bundle Abstract Bundle create Bundle bundledata this bundles add bundle catch Bundle Exception be This is not a fatal error Publish the framework event but since no log service is probably running we will also print a stack trace publish Framework Event Framework Event ERROR system Bundle be be print Stack Trace initialize package admin this must be done after the system bundle has been added to the state package Admin initialize system Bundle get Bundle Loader initialize the bundle loader in case someone accesses it directly if Debug DEBUG Debug DEBUG GENERAL System out println Initialize the framework System current Time Millis start NON NLS 1  FrameworkAdaptor currentTimeMillis installSecurityManager DEBUG_SECURITY SecurityManager getSecurityManager ProtectionDomain getClass getProtectionDomain initializeStorage compactStorage IOException printStackTrace RuntimeException getMessage getProperty initializeProperties getProperties packageAdmin PackageAdminImpl SecurityManager getSecurityManager permissionAdmin PermissionAdminImpl getPermissionStorage IOException printStackTrace RuntimeException getMessage startLevelManager StartLevelManager eventManager EventManager bundleEvent EventListeners bundleEventSync EventListeners serviceEvent EventListeners frameworkEvent EventListeners serviceRegistry getServiceRegistry installLock installLock createSystemBundle URLStreamHandlerFactory setURLStreamHandlerFactory StreamHandlerFactory systemBundle ContentHandlerFactory OSGi URLStreamHandler URLConnection setContentHandlerFactory ContentHandlerFactory systemBundle BundleData bundleDatas getInstalledBundles BundleRepository bundleDatas bundleDatas packageAdmin systemBundle bundleDatas bundleDatas BundleData BundleData bundleDatas AbstractBundle AbstractBundle createBundle BundleException publishFrameworkEvent FrameworkEvent systemBundle printStackTrace packageAdmin systemBundle getBundleLoader DEBUG_GENERAL currentTimeMillis
private void create System Bundle try system Bundle new System Bundle this Bundle Description new System Bundle adaptor get Platform Admin get Factory create Bundle Description system Bundle get Headers Constants SYSTEM BUNDLE LOCATION 0 NON NLS 1 if new System Bundle null throw new Bundle Exception Msg formatter get String OSGI SYSTEMBUNDLE DESCRIPTION ERROR NON NLS 1 State state adaptor get State Bundle Description old System Bundle state get Bundle 0 if old System Bundle null boolean different false if new System Bundle get Version null new System Bundle get Version equals old System Bundle get Version different true need to check to make sure the system bundle description is up to date in the state Package Specification old Packages old System Bundle get Packages Package Specification new Packages new System Bundle get Packages if old Packages length new Packages length for int i 0 i old Packages length i if old Packages i get Name equals new Packages i get Name Object old Version old Packages i get Version Range get Minimum Object new Version new Packages i get Version Range get Minimum if old Version null if new Version null different true break else if old Version equals new Version different true break else different true break else different true if different state remove Bundle 0 state add Bundle new System Bundle force resolution so packages are properly linked state resolve false else state add Bundle new System Bundle force resolution so packages are properly linked state resolve false System Bundle Loader clear System Packages Package Specification packages new System Bundle get Packages if packages null String system Packages new String packages length for int i 0 i packages length i Package Specification spec packages i if spec get Name equals Constants OSGI FRAMEWORK PACKAGE String version spec get Version Range get Minimum to String if version null properties put Constants FRAMEWORK VERSION version system Packages i spec get Name remember the system packages if System get Property Constants OSGI AUTOEXPORTSYSTEMPACKAGES null System Bundle Loader set System Packages system Packages catch Bundle Exception e fatal error e print Stack Trace throw new Runtime Exception Msg formatter get String OSGI SYSTEMBUNDLE CREATE EXCEPTION e get Message NON NLS 1  createSystemBundle systemBundle SystemBundle BundleDescription newSystemBundle getPlatformAdmin getFactory createBundleDescription systemBundle getHeaders SYSTEM_BUNDLE_LOCATION newSystemBundle BundleException getString OSGI_SYSTEMBUNDLE_DESCRIPTION_ERROR getState BundleDescription oldSystemBundle getBundle oldSystemBundle newSystemBundle getVersion newSystemBundle getVersion oldSystemBundle getVersion PackageSpecification oldPackages oldSystemBundle getPackages PackageSpecification newPackages newSystemBundle getPackages oldPackages newPackages oldPackages oldPackages getName newPackages getName oldVersion oldPackages getVersionRange getMinimum newVersion newPackages getVersionRange getMinimum oldVersion newVersion oldVersion newVersion removeBundle addBundle newSystemBundle addBundle newSystemBundle SystemBundleLoader clearSystemPackages PackageSpecification newSystemBundle getPackages systemPackages PackageSpecification getName OSGI_FRAMEWORK_PACKAGE getVersionRange getMinimum toString FRAMEWORK_VERSION systemPackages getName getProperty OSGI_AUTOEXPORTSYSTEMPACKAGES SystemBundleLoader setSystemPackages systemPackages BundleException printStackTrace RuntimeException getString OSGI_SYSTEMBUNDLE_CREATE_EXCEPTION getMessage
Initialize the System properties by copying properties from the adaptor properties object This method is called by the initialize method protected void initialize Properties Properties adaptor Properties properties System get Properties Enumeration enum adaptor Properties property Names while enum has More Elements String key String enum next Element if properties get Property key null properties put key adaptor Properties get Property key properties put Constants FRAMEWORK VENDOR Constants OSGI FRAMEWORK VENDOR properties put Constants FRAMEWORK VERSION Constants OSGI FRAMEWORK VERSION Needed for communication with Bundle Server properties put Constants OSGI IMPL VERSION KEY Constants OSGI IMPL VERSION String value properties get Property Constants FRAMEWORK PROCESSOR if value null value properties get Property Constants JVM OS ARCH if value null properties put Constants FRAMEWORK PROCESSOR value value properties get Property Constants FRAMEWORK OS NAME if value null value properties get Property Constants JVM OS NAME try String canonical Value String alias Mapper aliasOS Name value if canonical Value null value canonical Value catch Class Cast Exception ex A vector was returned from the alias mapper The alias mapped to more than one canonical value such as win32 for example if value null properties put Constants FRAMEWORK OS NAME value value properties get Property Constants FRAMEWORK OS VERSION if value null value properties get Property Constants JVM OS VERSION if value null int space value index Of if space 0 value value substring 0 space properties put Constants FRAMEWORK OS VERSION value value properties get Property Constants FRAMEWORK LANGUAGE if value null value properties get Property Constants JVM USER LANGUAGE set default locale for VM if value null properties put Constants FRAMEWORK LANGUAGE value String Tokenizer tokenizer new String Tokenizer value   NON NLS 1 int segments tokenizer count Tokens try switch segments case 2 Locale user Locale new Locale tokenizer next Token tokenizer next Token Locale set Default user Locale break case 3 user Locale new Locale tokenizer next Token tokenizer next Token tokenizer next Token Locale set Default user Locale break catch No Such Element Exception e fall through and use the default value properties get Property Constants FRAMEWORK EXECUTIONENVIRONMENT NON NLS 1 String j2me Config properties get Property Constants J2ME MICROEDITION CONFIGURATION String j2me Profile properties get Property Constants J2ME MICROEDITION PROFILES String Buffer ee new String Buffer value if j2me Config null j2me Config length 0 j2me Profile null j2me Profile length 0 int ic value index Of j2me Config if ic 0 ic j2me Config length value length value char At ic j2me Config length value starts With j2me Profile ic j2me Config length 1 if ee length 0 ee append NON NLS 1 ee append j2me Config append append j2me Profile properties put Constants FRAMEWORK EXECUTIONENVIRONMENT ee to String  initializeProperties adaptorProperties getProperties adaptorProperties propertyNames hasMoreElements nextElement getProperty adaptorProperties getProperty FRAMEWORK_VENDOR OSGI_FRAMEWORK_VENDOR FRAMEWORK_VERSION OSGI_FRAMEWORK_VERSION OSGI_IMPL_VERSION_KEY OSGI_IMPL_VERSION getProperty FRAMEWORK_PROCESSOR getProperty JVM_OS_ARCH FRAMEWORK_PROCESSOR getProperty FRAMEWORK_OS_NAME getProperty JVM_OS_NAME canonicalValue aliasMapper aliasOSName canonicalValue canonicalValue ClassCastException FRAMEWORK_OS_NAME getProperty FRAMEWORK_OS_VERSION getProperty JVM_OS_VERSION indexOf FRAMEWORK_OS_VERSION getProperty FRAMEWORK_LANGUAGE getProperty JVM_USER_LANGUAGE FRAMEWORK_LANGUAGE StringTokenizer StringTokenizer _ countTokens userLocale nextToken nextToken setDefault userLocale userLocale nextToken nextToken nextToken setDefault userLocale NoSuchElementException getProperty FRAMEWORK_EXECUTIONENVIRONMENT j2meConfig getProperty J2ME_MICROEDITION_CONFIGURATION j2meProfile getProperty J2ME_MICROEDITION_PROFILES StringBuffer StringBuffer j2meConfig j2meConfig j2meProfile j2meProfile indexOf j2meConfig j2meConfig charAt j2meConfig startsWith j2meProfile j2meConfig j2meConfig j2meProfile FRAMEWORK_EXECUTIONENVIRONMENT toString
This method return the state of the framework protected boolean is Active return active  isActive
This method is called to destory the framework instance public synchronized void close if active shutdown synchronized bundles List all Bundles bundles get Bundles int size all Bundles size for int i 0 i size i Abstract Bundle bundle Abstract Bundle all Bundles get i bundle close bundles remove All Bundles service Registry null if bundle Event null bundle Event remove All Listeners bundle Event null if bundle Event Sync null bundle Event Sync remove All Listeners bundle Event Sync null if service Event null service Event remove All Listeners service Event null if framework Event null framework Event remove All Listeners framework Event null if event Manager null event Manager close event Manager null permission Admin null package Admin null adaptor null  allBundles getBundles allBundles AbstractBundle AbstractBundle allBundles removeAllBundles serviceRegistry bundleEvent bundleEvent removeAllListeners bundleEvent bundleEventSync bundleEventSync removeAllListeners bundleEventSync serviceEvent serviceEvent removeAllListeners serviceEvent frameworkEvent frameworkEvent removeAllListeners frameworkEvent eventManager eventManager eventManager permissionAdmin packageAdmin
Start the framework When the framework is started The following actions occur 1 Event handling is enabled Events can now be delivered to listeners 2 All bundles which are recorded as started are started as described in the Bundle start method These bundles are the bundles that were started when the framework was last stopped Reports any exceptions that occur during startup using Framework Events 3 A Framework Event of type Framework Event STARTED is broadcast public synchronized void launch Return if framework already started if active return mark framework as started active true Resume systembundle try if Debug DEBUG Debug DEBUG GENERAL Debug println Trying to launch framework NON NLS 1 system Bundle resume catch Bundle Exception be if Debug DEBUG Debug DEBUG GENERAL Debug println Framework launch exception be get Message NON NLS 1 Debug print Stack Trace be get Nested Exception publish Framework Event Framework Event ERROR system Bundle be  FrameworkEvents FrameworkEvent FrameworkEvent DEBUG_GENERAL systemBundle BundleException DEBUG_GENERAL getMessage printStackTrace getNestedException publishFrameworkEvent FrameworkEvent systemBundle
Stop the framework When the framework is stopped The following actions occur 1 Suspend all started bundles as described in the Bundle stop method except that the bundle is recorded as started These bundles will be restarted when the framework is next started Reports any exceptions that occur during stopping using Framework Events 2 Event handling is disabled public synchronized void shutdown Return if framework already stopped if active return set the state of the System Bundle to STOPPING this must be done first according to section 4 19 2 from the OS Gi R3 spec system Bundle state Abstract Bundle STOPPING call the Framework Adaptor framework Stopping method first try adaptor framework Stopping system Bundle get Context catch Throwable t publish Framework Event Framework Event ERROR system Bundle t Suspend systembundle try if Debug DEBUG Debug DEBUG GENERAL Debug println Trying to shutdown Framework NON NLS 1 system Bundle suspend catch Bundle Exception be if Debug DEBUG Debug DEBUG GENERAL Debug println Framework shutdown exception be get Message NON NLS 1 Debug print Stack Trace be get Nested Exception publish Framework Event Framework Event ERROR system Bundle be try adaptor compact Storage catch IO Exception e publish Framework Event Framework Event ERROR system Bundle e mark framework as stopped active false  FrameworkEvents OSGi systemBundle AbstractBundle FrameworkAdaptor frameworkStopping frameworkStopping systemBundle getContext publishFrameworkEvent FrameworkEvent systemBundle DEBUG_GENERAL systemBundle BundleException DEBUG_GENERAL getMessage printStackTrace getNestedException publishFrameworkEvent FrameworkEvent systemBundle compactStorage IOException publishFrameworkEvent FrameworkEvent systemBundle
Create a new Bundle object param bundledata the Bundle Data of the Bundle to create public Abstract Bundle create Bundle Bundle Data bundledata throws Bundle Exception verify Execution Environment bundledata get Manifest return Abstract Bundle create Bundle bundledata this  BundleData AbstractBundle createBundle BundleData BundleException verifyExecutionEnvironment getManifest AbstractBundle createBundle
Verifies that the framework supports one of the required Execution Environments param manifest Bundle Manifest of the bundle to verify the Execution Enviroment for return boolean true if the required Execution Enviroment is available throws Bundle Exception if the framework does not support the required Execution Environment protected boolean verify Execution Environment Dictionary manifest throws Bundle Exception String header Value String manifest get Constants BUNDLE REQUIREDEXECUTIONENVIRONMENT If no required EE is in the manifest return true if header Value null return true Manifest Element bundle RequiredEE Manifest Element parse Header Constants BUNDLE REQUIREDEXECUTIONENVIRONMENT header Value if bundle RequiredEE length 0 return true String systemEE System get Property Constants FRAMEWORK EXECUTIONENVIRONMENT if systemEE null systemEE equals NON NLS 1 Manifest Element systemE Es Manifest Element parse Header Constants BUNDLE REQUIREDEXECUTIONENVIRONMENT systemEE for int i 0 i systemE Es length i for int j 0 j bundle RequiredEE length j if systemE Es i get Value equals bundle RequiredEE j get Value return true If we got here then no matching EE is available throw exception String Buffer bundleEE new String Buffer 25 for int i 0 i bundle RequiredEE length i if i 0 bundleEE append NON NLS 1 bundleEE append bundle RequiredEE i throw new Bundle Exception Msg formatter get String BUNDLE INSTALL REQUIRED EE EXCEPTION bundleEE to String NON NLS 1  BundleManifest BundleException verifyExecutionEnvironment BundleException headerValue BUNDLE_REQUIREDEXECUTIONENVIRONMENT headerValue ManifestElement bundleRequiredEE ManifestElement parseHeader BUNDLE_REQUIREDEXECUTIONENVIRONMENT headerValue bundleRequiredEE getProperty FRAMEWORK_EXECUTIONENVIRONMENT ManifestElement systemEEs ManifestElement parseHeader BUNDLE_REQUIREDEXECUTIONENVIRONMENT systemEEs bundleRequiredEE systemEEs getValue bundleRequiredEE getValue StringBuffer StringBuffer bundleRequiredEE bundleRequiredEE BundleException getString BUNDLE_INSTALL_REQUIRED_EE_EXCEPTION toString
Retrieve the value of the named environment property Values are provided for the following properties dl dt code org osgi framework version code dd The version of the framework dt code org osgi framework vendor code dd The vendor of this framework implementation dt code org osgi framework language code dd The language being used See ISO 639 for possible values dt code org osgi framework os name code dd The name of the operating system of the hosting computer dt code org osgi framework os version code dd The version number of the operating system of the hosting computer dt code org osgi framework processor code dd The name of the processor of the hosting computer dl p Note These last four properties are used by the code Bundle Native Code code manifest header s matching algorithm for selecting native code param key The name of the requested property return The value of the requested property or code null code if the property is undefined public String get Property String key return properties get Property key  NativeCode getProperty getProperty
Retrieve the value of the named environment property Values are provided for the following properties dl dt code org osgi framework version code dd The version of the framework dt code org osgi framework vendor code dd The vendor of this framework implementation dt code org osgi framework language code dd The language being used See ISO 639 for possible values dt code org osgi framework os name code dd The name of the operating system of the hosting computer dt code org osgi framework os version code dd The version number of the operating system of the hosting computer dt code org osgi framework processor code dd The name of the processor of the hosting computer dl p Note These last four properties are used by the code Bundle Native Code code manifest header s matching algorithm for selecting native code param key The name of the requested property param def A default value is the requested property is not present return The value of the requested property or the default value if the property is undefined protected String get Property String key String def return properties get Property key def  NativeCode getProperty getProperty
Set a system property param key The name of the property to set param value The value to set return The previous value of the property or null if the property was not previously set protected Object set Property String key String value return properties put key value  setProperty
return install Worker location new Privileged Exception Action public Object run throws Bundle Exception Map the identity to a URL Connection URL Connection source adaptor map Location ToURL Connection location call the worker to install the bundle return install Worker Privileged location source  installWorker PrivilegedExceptionAction BundleException URLConnection URLConnection mapLocationToURLConnection installWorkerPrivileged
Install a bundle from a location The bundle is obtained from the location parameter as interpreted by the framework in an implementation dependent way Typically location will most likely be a URL param location The location identifier of the bundle to install return The Bundle object of the installed bundle protected Abstract Bundle install Bundle final String location throws Bundle Exception if Debug DEBUG Debug DEBUG GENERAL Debug println install from location location NON NLS 1 return install Worker location new Privileged Exception Action public Object run throws Bundle Exception Map the identity to a URL Connection URL Connection source adaptor map Location ToURL Connection location call the worker to install the bundle return install Worker Privileged location source  AbstractBundle installBundle BundleException DEBUG_GENERAL installWorker PrivilegedExceptionAction BundleException URLConnection URLConnection mapLocationToURLConnection installWorkerPrivileged
return install Worker location new Privileged Exception Action public Object run throws Bundle Exception Map the Input Stream to a URL Connection URL Connection source new Bundle Source in call the worker to install the bundle return install Worker Privileged location source  installWorker PrivilegedExceptionAction BundleException InputStream URLConnection URLConnection BundleSource installWorkerPrivileged
Install a bundle from an Input Stream p This method performs all the steps listed in link install Bundle java lang String except the bundle s content will be read from the Input Stream The location identifier specified will be used as the identity of the bundle param location The location identifier of the bundle to install param in The Input Stream from which the bundle will be read return The Bundle of the installed bundle protected Abstract Bundle install Bundle final String location final Input Stream in throws Bundle Exception if Debug DEBUG Debug DEBUG GENERAL Debug println install from inputstream location in NON NLS 1 NON NLS 2 return install Worker location new Privileged Exception Action public Object run throws Bundle Exception Map the Input Stream to a URL Connection URL Connection source new Bundle Source in call the worker to install the bundle return install Worker Privileged location source  InputStream installBundle InputStream InputStream AbstractBundle installBundle InputStream BundleException DEBUG_GENERAL installWorker PrivilegedExceptionAction BundleException InputStream URLConnection URLConnection BundleSource installWorkerPrivileged
Worker method to install a bundle It obtains the reservation for the location and calls the specified action param location The location identifier of the bundle to install param action A Privileged Exception Action which calls the real worker return The link Abstract Bundle of the installed bundle exception Bundle Exception If the action throws an error protected Abstract Bundle install Worker String location Privileged Exception Action action throws Bundle Exception synchronized install Lock while true Check that the bundle is not already installed Abstract Bundle bundle get Bundle By Location location If already installed return bundle object if bundle null return bundle Thread current Thread current Thread Check for and make reservation Thread reservation Thread install Lock put location current if the location is not already reserved if reservation null we have made the reservation and can continue break the location was already reserved If the reservation is held by the current thread we have recursed to install the same bundle if current equals reservation throw new Bundle Exception Msg formatter get String BUNDLE INSTALL RECURSION EXCEPTION NON NLS 1 try wait for the reservation to be released install Lock wait catch Interrupted Exception e Don t call adaptor while holding the install lock try Abstract Bundle bundle Abstract Bundle Access Controller do Privileged action publish Bundle Event Bundle Event INSTALLED bundle return bundle catch Privileged Action Exception e throw Bundle Exception e get Exception finally synchronized install Lock release reservation install Lock remove location wake up all waiters install Lock notify All  PrivilegedExceptionAction AbstractBundle BundleException AbstractBundle installWorker PrivilegedExceptionAction BundleException installLock AbstractBundle getBundleByLocation currentThread installLock BundleException getString BUNDLE_INSTALL_RECURSION_EXCEPTION installLock InterruptedException AbstractBundle AbstractBundle AccessController doPrivileged publishBundleEvent BundleEvent PrivilegedActionException BundleException getException installLock installLock installLock notifyAll
Worker method to install a bundle It calls the Framework Adaptor object to install the bundle in persistent storage param location The location identifier of the bundle to install param source The URL Connection from which the bundle will be read return The link Abstract Bundle of the installed bundle exception Bundle Exception If the provided stream cannot be read protected Abstract Bundle install Worker Privileged String location URL Connection source throws Bundle Exception Bundle Operation storage adaptor install Bundle location source Abstract Bundle bundle try Bundle Data bundledata storage begin Check for a bundle already installed with the same Unique Id and version if bundledata get Symbolic Name null Abstract Bundle installed Bundle get Bundle By Symbolic Name bundledata get Symbolic Name bundledata get Version to String if installed Bundle null throw new Bundle Exception Msg formatter get String BUNDLE INSTALL SAME UNIQUEID new Object installed Bundle get Symbolic Name installed Bundle get Version to String installed Bundle get Location NON NLS 1 bundle create Bundle bundledata try Select the native code paths for the bundle this is not done by the adaptor because this should be a static algorithm spec ed by OS Gi that we do not allow to be adapted String nativepaths select Native Code bundle if nativepaths null bundledata install Native Code nativepaths bundle load storage commit false catch Bundle Exception be synchronized bundles bundle unload bundle close throw be bundle has been successfully installed bundles add bundle catch Bundle Exception e try storage undo catch Bundle Exception ee publish Framework Event Framework Event ERROR system Bundle ee throw e return bundle  FrameworkAdaptor URLConnection AbstractBundle BundleException AbstractBundle installWorkerPrivileged URLConnection BundleException BundleOperation installBundle AbstractBundle BundleData UniqueId getSymbolicName AbstractBundle installedBundle getBundleBySymbolicName getSymbolicName getVersion toString installedBundle BundleException getString BUNDLE_INSTALL_SAME_UNIQUEID installedBundle getSymbolicName installedBundle getVersion toString installedBundle getLocation createBundle OSGi selectNativeCode installNativeCode BundleException BundleException BundleException publishFrameworkEvent FrameworkEvent systemBundle
Selects a native code clause and return a list of the bundle entries for native code to be installed param bundle Bundle s manifest return Vector of Strings of the bundle entries to install or tt null tt if there are no native code clauses throws Bundle Exception If there is no suitable clause public String select Native Code org osgi framework Bundle bundle throws Bundle Exception String header Value String Abstract Bundle bundle get Bundle Data get Manifest get Constants BUNDLE NATIVECODE if header Value null return null Manifest Element elements Manifest Element parse Header Constants BUNDLE NATIVECODE header Value Bundle Native Code bundle Native Code new Bundle Native Code elements length Pass 1 perform processor osname filter matching If there is not a match on all three then the native code clause is not selected String processor get Property Constants FRAMEWORK PROCESSOR String osname get Property Constants FRAMEWORK OS NAME int length elements length boolean optional false if elements length 1 get Value equals NON NLS 1 optional true length int score new int length int matches 0 int maxresult 0 int index 0 for int i 0 i length i bundle Native Code i new Bundle Native Code elements i Abstract Bundle bundle int result bundle Native Code i match ProcessorOS Name Filter processor osname score i result if result 0 matches if result maxresult maxresult result index i switch matches case 0 return no Matches optional case 1 return bundle Native Code index get Paths default continue with next pass break Pass 2 perform osversion matching Version osversion try osversion new Version get Property Constants FRAMEWORK OS VERSION catch Exception e osversion Version empty Version matches 0 maxresult 0 Version best Version new Version elements length Version max Version Version empty Version for int i 0 i elements length i if score i 0 Bundle Native Code bnc bundle Native Code i Version result bnc matchOS Version osversion best Version i result if result null null is no match matches if result compare To max Version 0 max Version result index i switch matches case 0 return no Matches optional case 1 return bundle Native Code index get Paths default discard all but the highest result for int i 0 i elements length i Version result best Version i if result compare To max Version 0 score i 0 continue with next pass break Pass 3 perform language matching String language get Property Constants FRAMEWORK LANGUAGE matches 0 maxresult 0 for int i 0 i elements length i int result score i if result 0 Bundle Native Code bnc bundle Native Code i result bnc match Language language score i result if result 0 matches if result maxresult maxresult result index i switch matches case 0 return no Matches optional default return bundle Native Code index get Paths  BundleException selectNativeCode BundleException headerValue AbstractBundle getBundleData getManifest BUNDLE_NATIVECODE headerValue ManifestElement ManifestElement parseHeader BUNDLE_NATIVECODE headerValue BundleNativeCode bundleNativeCode BundleNativeCode getProperty FRAMEWORK_PROCESSOR getProperty FRAMEWORK_OS_NAME getValue bundleNativeCode BundleNativeCode AbstractBundle bundleNativeCode matchProcessorOSNameFilter noMatches bundleNativeCode getPaths getProperty FRAMEWORK_OS_VERSION emptyVersion bestVersion maxVersion emptyVersion BundleNativeCode bundleNativeCode matchOSVersion bestVersion compareTo maxVersion maxVersion noMatches bundleNativeCode getPaths bestVersion compareTo maxVersion getProperty FRAMEWORK_LANGUAGE BundleNativeCode bundleNativeCode matchLanguage noMatches bundleNativeCode getPaths
Retrieve the bundle that has the given unique identifier param id The identifier of the bundle to retrieve return A link Abstract Bundle object or code null code if the identifier doesn t match any installed bundle changed visibility to gain access through the adaptor public Abstract Bundle get Bundle long id synchronized bundles return bundles get Bundle id  AbstractBundle AbstractBundle getBundle getBundle
Retrieve the bundle that has the given symbolic name and version param symbolic Name The symbolic name of the bundle to retrieve param version The version of the bundle to retrieve return A link Abstract Bundle object or code null code if the identifier doesn t match any installed bundle protected Abstract Bundle get Bundle By Symbolic Name String symbolic Name String version synchronized bundles return bundles get Bundle symbolic Name version  symbolicName AbstractBundle AbstractBundle getBundleBySymbolicName symbolicName getBundle symbolicName
Retrieve the Bundle Repository of all installed bundles The list is valid at the time of the call to get Bundles but the framework is a very dynamic environment and bundles can be installed or uninstalled at anytime return The Bundle Repository protected Bundle Repository get Bundles return bundles  BundleRepository getBundles BundleRepository BundleRepository getBundles
Retrieve a list of all installed bundles The list is valid at the time of the call to get Bundle Alls but the framework is a very dynamic environment and bundles can be installed or uninstalled at anytime return An Array of link Abstract Bundle objects one object per installed bundle protected Abstract Bundle get All Bundles synchronized bundles List all Bundles bundles get Bundles int size all Bundles size if size 0 return null Abstract Bundle bundlelist new Abstract Bundle size all Bundles to Array bundlelist return bundlelist  getBundleAlls AbstractBundle AbstractBundle getAllBundles allBundles getBundles allBundles AbstractBundle AbstractBundle allBundles toArray
Resume a bundle param bundle Bundle to resume protected void resume Bundle Abstract Bundle bundle if bundle is Active if bundle is active return try int status bundle get Bundle Data get Status if status Constants BUNDLE STARTED 0 return if Debug DEBUG Debug DEBUG GENERAL Debug println Trying to start bundle bundle NON NLS 1 bundle resume catch Bundle Exception be if Debug DEBUG Debug DEBUG GENERAL Debug println Bundle resume exception be get Message NON NLS 1 Debug print Stack Trace be get Nested Exception publish Framework Event Framework Event ERROR bundle be  resumeBundle AbstractBundle isActive getBundleData getStatus BUNDLE_STARTED DEBUG_GENERAL BundleException DEBUG_GENERAL getMessage printStackTrace getNestedException publishFrameworkEvent FrameworkEvent
Suspend a bundle param bundle Bundle to suspend param lock true if state change lock should be held when returning from this method return true if bundle was active and is now suspended protected boolean suspend Bundle Abstract Bundle bundle boolean lock boolean changed false if bundle is Active bundle is Fragment if bundle is not active or is a fragment then do nothing return changed try if Debug DEBUG Debug DEBUG GENERAL Debug println Trying to suspend bundle bundle NON NLS 1 bundle suspend lock catch Bundle Exception be if Debug DEBUG Debug DEBUG GENERAL Debug println Bundle suspend exception be get Message NON NLS 1 Debug print Stack Trace be get Nested Exception publish Framework Event Framework Event ERROR bundle be if bundle is Active changed true return changed  suspendBundle AbstractBundle isActive isFragment DEBUG_GENERAL BundleException DEBUG_GENERAL getMessage printStackTrace getNestedException publishFrameworkEvent FrameworkEvent isActive
Locate an installed bundle with a given identity param location string for the bundle return Bundle object for bundle with the specified location or null if no bundle is installed with the specified location protected Abstract Bundle get Bundle By Location String location synchronized bundles this is not optimized do not think it will get called that much List all Bundles bundles get Bundles int size all Bundles size for int i 0 i size i Abstract Bundle bundle Abstract Bundle all Bundles get i if location equals bundle get Location return bundle return null  AbstractBundle getBundleByLocation allBundles getBundles allBundles AbstractBundle AbstractBundle allBundles getLocation
Locate an installed bundle with a given symbolic name param symbolic Name The symbolic name for the bundle return Bundle object for bundle with the specified Unique or null if no bundle is installed with the specified location protected Abstract Bundle get Bundle By Symbolic Name String symbolic Name synchronized bundles return bundles get Bundles symbolic Name  symbolicName AbstractBundle getBundleBySymbolicName symbolicName getBundles symbolicName
Returns a list of tt Service Reference tt objects This method returns a list of tt Service Reference tt objects for services which implement and were registered under the specified class and match the specified filter criteria p The list is valid at the time of the call to this method however as the Framework is a very dynamic environment services can be modified or unregistered at anytime p tt filter tt is used to select the registered service whose properties objects contain keys and values which satisfy the filter See link Filter Impl for a description of the filter string syntax p If tt filter tt is tt null tt all registered services are considered to match the filter p If tt filter tt cannot be parsed an link Invalid Syntax Exception will be thrown with a human readable message where the filter became unparsable p The following steps are required to select a service ol li If the Java Runtime Environment supports permissions the caller is checked for the tt Service Permission tt to get the service with the specified class If the caller does not have the correct permission tt null tt is returned li If the filter string is not tt null tt the filter string is parsed and the set of registered services which satisfy the filter is produced If the filter string is tt null tt then all registered services are considered to satisfy the filter li If code clazz code is not tt null tt the set is further reduced to those services which are an tt instanceof tt and were registered under the specified class The complete list of classes of which a service is an instance and which were specified when the service was registered is available from the service s link Constants OBJECTCLASS property li An array of tt Service Reference tt to the selected services is returned ol param clazz The class name with which the service was registered or tt null tt for all services param filterstring The filter criteria return An array of tt Service Reference tt objects or tt null tt if no services are registered which satisfy the search exception Invalid Syntax Exception If tt filter tt contains an invalid filter string which cannot be parsed protected Service Reference get Service References String clazz String filterstring throws Invalid Syntax Exception Filter Impl filter filterstring null null new Filter Impl filterstring Service Reference services null if clazz null try test for permission to get clazz check Get Service Permission clazz catch Security Exception se return null synchronized service Registry services service Registry lookup Service References clazz filter if services null return null if clazz null int removed 0 for int i services length 1 i 0 i Service Reference Impl ref Service Reference Impl services i String classes ref get Classes try test for permission to the classes check Get Service Permission classes catch Security Exception se services i null removed if removed 0 Service Reference temp services services new Service Reference temp length removed for int i temp length 1 i 0 i if temp i null removed else services i removed temp i return services  ServiceReference ServiceReference FilterImpl InvalidSyntaxException ServicePermission ServiceReference ServiceReference InvalidSyntaxException ServiceReference getServiceReferences InvalidSyntaxException FilterImpl FilterImpl ServiceReference checkGetServicePermission SecurityException serviceRegistry serviceRegistry lookupServiceReferences ServiceReferenceImpl ServiceReferenceImpl getClasses checkGetServicePermission SecurityException ServiceReference ServiceReference
Method to return the next available service id This method should be called while holding the registrations lock return next service id protected long get Next Service Id long id serviceid serviceid return id  getNextServiceId
protected File get Data File final Abstract Bundle bundle final String filename return File Access Controller do Privileged new Privileged Action public Object run return bundle get Bundle Data get Data File filename  getDataFile AbstractBundle AccessController doPrivileged PrivilegedAction getBundleData getDataFile
Creates a code File code object for a file in the persistent storage area provided for the bundle by the framework If the adaptor does not have file system support this method will return code null code p A code File code object for the base directory of the persistent storage area provided for the context bundle by the framework can be obtained by calling this method with the empty string as the parameter protected File get Data File final Abstract Bundle bundle final String filename return File Access Controller do Privileged new Privileged Action public Object run return bundle get Bundle Data get Data File filename  getDataFile AbstractBundle AccessController doPrivileged PrivilegedAction getBundleData getDataFile
Check for Admin Permission protected void check Admin Permission Security Manager sm System get Security Manager if sm null if admin Permission null admin Permission new Admin Permission sm check Permission admin Permission  AdminPermission checkAdminPermission SecurityManager getSecurityManager adminPermission adminPermission AdminPermission checkPermission adminPermission
Check for permission to register a service The caller must have permission for ALL names protected void check Register Service Permission String names Security Manager sm System get Security Manager if sm null int len names length for int i 0 i len i sm check Permission new Service Permission names i Service Permission REGISTER  checkRegisterServicePermission SecurityManager getSecurityManager checkPermission ServicePermission ServicePermission
Check for permission to get a service The caller must have permission for at least ONE name protected void check Get Service Permission String names Security Manager sm System get Security Manager if sm null Security Exception se null int len names length for int i 0 i len i try sm check Permission new Service Permission names i Service Permission GET return catch Security Exception e se e throw se  checkGetServicePermission SecurityManager getSecurityManager SecurityException checkPermission ServicePermission ServicePermission SecurityException
Check for permission to get a service protected void check Get Service Permission String name Security Manager sm System get Security Manager if sm null sm check Permission new Service Permission name Service Permission GET  checkGetServicePermission SecurityManager getSecurityManager checkPermission ServicePermission ServicePermission
This is necessary for running from a JXE otherwise the Security Manager is set much later than we would like protected void install Security Manager String security Manager System get Property java security manager NON NLS 1 if security Manager null Security Manager sm System get Security Manager if sm null if security Manager length 1 security Manager java lang Security Manager NON NLS 1 try Class clazz Class for Name security Manager sm Security Manager clazz new Instance if Debug DEBUG Debug DEBUG SECURITY Debug println Setting Security Manager to sm NON NLS 1 System set Security Manager sm return catch Class Not Found Exception e catch Class Cast Exception e catch Instantiation Exception e catch Illegal Access Exception e throw new No Class Def Found Error security Manager  SecurityManager installSecurityManager securityManager getProperty securityManager SecurityManager getSecurityManager securityManager securityManager SecurityManager forName securityManager SecurityManager newInstance DEBUG_SECURITY SecurityManager setSecurityManager ClassNotFoundException ClassCastException InstantiationException IllegalAccessException NoClassDefFoundError securityManager
else Access Controller do Privileged new Privileged Action public Object run publish Framework Event Privileged event return null  AccessController doPrivileged PrivilegedAction publishFrameworkEventPrivileged
Deliver a Framework Event param type Framework Event type param bundle Affected bundle param throwable Related exception or null public void publish Framework Event int type org osgi framework Bundle bundle Throwable throwable if framework Event null final Framework Event event new Framework Event type bundle throwable if System get Security Manager null publish Framework Event Privileged event else Access Controller do Privileged new Privileged Action public Object run publish Framework Event Privileged event return null  FrameworkEvent FrameworkEvent publishFrameworkEvent frameworkEvent FrameworkEvent FrameworkEvent getSecurityManager publishFrameworkEventPrivileged AccessController doPrivileged PrivilegedAction publishFrameworkEventPrivileged
public void publish Framework Event Privileged Framework Event event if the event is an error then it should be logged if event get Type Framework Event ERROR Framework Log framework Log adaptor get Framework Log if framework Log null framework Log log event queue to hold set of listeners Listener Queue listeners new Listener Queue event Manager queue to hold set of Bundle Contexts w listeners Listener Queue contexts new Listener Queue event Manager synchronize while building the listener list synchronized framework Event add set of Bundle Contexts w listeners to queue contexts queue Listeners framework Event this synchronously dispatch to populate listeners queue contexts dispatch Event Synchronous FRAMEWORKEVENT listeners dispatch event to set of listeners listeners dispatch Event Asynchronous FRAMEWORKEVENT event  publishFrameworkEventPrivileged FrameworkEvent getType FrameworkEvent FrameworkLog frameworkLog getFrameworkLog frameworkLog frameworkLog ListenerQueue ListenerQueue eventManager BundleContexts ListenerQueue ListenerQueue eventManager frameworkEvent BundleContexts queueListeners frameworkEvent dispatchEventSynchronous dispatchEventAsynchronous
else Access Controller do Privileged new Privileged Action public Object run publish Bundle Event Privileged event return null  AccessController doPrivileged PrivilegedAction publishBundleEventPrivileged
Deliver a Bundle Event to Synchronous Bundle Listeners synchronous and Bundle Listeners asynchronous param type Bundle Event type param bundle Affected bundle or null public void publish Bundle Event int type org osgi framework Bundle bundle if bundle Event Sync null bundle Event null final Bundle Event event new Bundle Event type bundle if System get Security Manager null publish Bundle Event Privileged event else Access Controller do Privileged new Privileged Action public Object run publish Bundle Event Privileged event return null  BundleEvent SynchronousBundleListeners BundleListeners BundleEvent publishBundleEvent bundleEventSync bundleEvent BundleEvent BundleEvent getSecurityManager publishBundleEventPrivileged AccessController doPrivileged PrivilegedAction publishBundleEventPrivileged
public void publish Bundle Event Privileged Bundle Event event We must collect the snapshots of the sync and async listeners BEFORE we dispatch the event Collect snapshot of Synchronous Bundle Listeners Listener Queue listeners Sync null if bundle Event Sync null queue to hold set of listeners listeners Sync new Listener Queue event Manager queue to hold set of Bundle Contexts w listeners Listener Queue contexts new Listener Queue event Manager synchronize while building the listener list synchronized bundle Event Sync add set of Bundle Contexts w listeners to queue contexts queue Listeners bundle Event Sync this synchronously dispatch to populate listeners queue contexts dispatch Event Synchronous BUNDLEEVENTSYNC listeners Sync Collect snapshot of Bundle Listeners Listener Queue listeners Async null if bundle Event null queue to hold set of listeners listeners Async new Listener Queue event Manager queue to hold set of Bundle Contexts w listeners Listener Queue contexts new Listener Queue event Manager synchronize while building the listener list synchronized bundle Event add set of Bundle Contexts w listeners to queue contexts queue Listeners bundle Event this synchronously dispatch to populate listeners queue contexts dispatch Event Synchronous BUNDLEEVENT listeners Async Dispatch Bundle Event to Synchronous Bundle Listeners if listeners Sync null listeners Sync dispatch Event Synchronous BUNDLEEVENTSYNC event Dispatch Bundle Event to Bundle Listeners if listeners Async null listeners Async dispatch Event Asynchronous BUNDLEEVENT event  publishBundleEventPrivileged BundleEvent SynchronousBundleListeners ListenerQueue listenersSync bundleEventSync listenersSync ListenerQueue eventManager BundleContexts ListenerQueue ListenerQueue eventManager bundleEventSync BundleContexts queueListeners bundleEventSync dispatchEventSynchronous listenersSync BundleListeners ListenerQueue listenersAsync bundleEvent listenersAsync ListenerQueue eventManager BundleContexts ListenerQueue ListenerQueue eventManager bundleEvent BundleContexts queueListeners bundleEvent dispatchEventSynchronous listenersAsync BundleEvent SynchronousBundleListeners listenersSync listenersSync dispatchEventSynchronous BundleEvent BundleListeners listenersAsync listenersAsync dispatchEventAsynchronous
else Access Controller do Privileged new Privileged Action public Object run publish Service Event Privileged event return null  AccessController doPrivileged PrivilegedAction publishServiceEventPrivileged
Deliver a Service Event param type Service Event type param reference Affected service reference public void publish Service Event int type org osgi framework Service Reference reference if service Event null final Service Event event new Service Event type reference if System get Security Manager null publish Service Event Privileged event else Access Controller do Privileged new Privileged Action public Object run publish Service Event Privileged event return null  ServiceEvent ServiceEvent publishServiceEvent ServiceReference serviceEvent ServiceEvent ServiceEvent getSecurityManager publishServiceEventPrivileged AccessController doPrivileged PrivilegedAction publishServiceEventPrivileged
public void publish Service Event Privileged Service Event event queue to hold set of listeners Listener Queue listeners new Listener Queue event Manager queue to hold set of Bundle Contexts w listeners Listener Queue contexts new Listener Queue event Manager synchronize while building the listener list synchronized service Event add set of Bundle Contexts w listeners to queue contexts queue Listeners service Event this synchronously dispatch to populate listeners queue contexts dispatch Event Synchronous SERVICEEVENT listeners dispatch event to set of listeners listeners dispatch Event Synchronous SERVICEEVENT event  publishServiceEventPrivileged ServiceEvent ListenerQueue ListenerQueue eventManager BundleContexts ListenerQueue ListenerQueue eventManager serviceEvent BundleContexts queueListeners serviceEvent dispatchEventSynchronous dispatchEventSynchronous
Top level event dispatcher for the framework param l Bundle Context for receiving bundle param lo Bundle Context for receiving bundle param action Event class type param object Listener Queue to populate public void dispatch Event Object l Object lo int action Object object try Bundle Context Impl context Bundle Context Impl l if context is Valid if context still valid Listener Queue queue Listener Queue object switch action case BUNDLEEVENT queue queue Listeners context bundle Event context break case BUNDLEEVENTSYNC queue queue Listeners context bundle Event Sync context break case SERVICEEVENT queue queue Listeners context service Event context break case FRAMEWORKEVENT queue queue Listeners context framework Event context break catch Throwable t if Debug DEBUG Debug DEBUG GENERAL Debug println Exception in Top level event dispatcher t get Message NON NLS 1 Debug print Stack Trace t allow the adaptor to handle this unexpected error adaptor handle Runtime Error t publisherror if action FRAMEWORKEVENT Framework Event event Framework Event object if event get Type Framework Event ERROR break publisherror avoid infinite loop Bundle Context Impl context Bundle Context Impl l publish Framework Event Framework Event ERROR context bundle t  BundleContext BundleContext ListenerQueue dispatchEvent BundleContextImpl BundleContextImpl isValid ListenerQueue ListenerQueue queueListeners bundleEvent queueListeners bundleEventSync queueListeners serviceEvent queueListeners frameworkEvent DEBUG_GENERAL getMessage printStackTrace handleRuntimeError FrameworkEvent FrameworkEvent getType FrameworkEvent BundleContextImpl BundleContextImpl publishFrameworkEvent FrameworkEvent
private String no Matches boolean optional throws Bundle Exception if optional return null throw new Bundle Exception Msg formatter get String BUNDLE NATIVECODE MATCH EXCEPTION NON NLS 1  noMatches BundleException BundleException getString BUNDLE_NATIVECODE_MATCH_EXCEPTION

The constructor It turns the cmdline string into a String Tokenizer and remembers the input parms public Framework Command Interpreter String cmdline Object command Providers Framework Console con tok new String Tokenizer cmdline this command Providers command Providers this con con this out con get Writer  StringTokenizer FrameworkCommandInterpreter commandProviders FrameworkConsole StringTokenizer commandProviders commandProviders getWriter
Get the next argument in the input E g if the commandline is hello world the  hello method will get world as the first argument return A string containing the next argument on the command line public String next Argument if tok null tok has More Elements return null String token tok next Token check for quotes int index token index Of if index 1 if we only have one quote find the second quote if index token last Index Of token tok next Token NON NLS 1 String Buffer buf new String Buffer token strip quotes while index 1 buf delete Char At index token buf to String index token index Of return buf to String return token  _hello nextArgument hasMoreElements nextToken indexOf lastIndexOf nextToken StringBuffer StringBuffer deleteCharAt toString indexOf toString
Execute a command line as if it came from the end user Searches the list of command providers using introspection until it finds one that contains a matching method It searches for a method with the name  cmd where cmd is the command to execute For example for a command of launch execute searches for a method called  launch param cmd The name of the command to execute return The object returned by the method executed public Object execute String cmd reset Line Count Object retval null handle more command here if cmd equals Ignore Case more NON NLS 1 try  more catch Exception e print Stack Trace e return retval handle disconnect command here if cmd equals Ignore Case disconnect con get Use Socket Stream NON NLS 1 try  disconnect catch Exception e print Stack Trace e return retval Class parameter Types new Class Command Interpreter class Object parameters new Object this boolean executed false int size command Providers length for int i 0 executed i size i try Object target command Providers i Method method target get Class get Method   cmd parameter Types NON NLS 1 retval method invoke target parameters executed true stop after the command has been found catch No Such Method Exception ite keep going maybe another command provider will be able to execute this command catch Invocation Target Exception ite executed true don t want to keep trying we found the method but got an error print Stack Trace ite get Target Exception catch Exception ee executed true don t want to keep trying we got an error we don t understand print Stack Trace ee if no command was found to execute display help for all registered command providers if executed for int i 0 i size i try Command Provider command Provider Command Provider command Providers i out print command Provider get Help out flush catch Exception ee print Stack Trace ee call help for the more command provided by this class out print get Help out flush return retval  _cmd _launch resetLineCount equalsIgnoreCase _more printStackTrace equalsIgnoreCase getUseSocketStream _disconnect printStackTrace parameterTypes CommandInterpreter commandProviders commandProviders getClass getMethod _ parameterTypes NoSuchMethodException InvocationTargetException printStackTrace getTargetException printStackTrace CommandProvider commandProvider CommandProvider commandProviders commandProvider getHelp printStackTrace getHelp
Answers the number of lines output to the console window should scroll without user interaction return The number of lines to scroll private int get Maximum Lines To Scroll return max Line Count  returnThe getMaximumLinesToScroll maxLineCount
Sets the number of lines output to the console window will scroll without user interaction p Note that this number does not include the line for the more prompt itself p If the number of lines is 0 then no more prompt is disabled paramlinesthe number of lines to scroll private void set Maximum Lines To Scroll int lines if lines 0 throw new Illegal Argument Exception Console Msg formatter get String CONSOLE LINES TO SCROLL NEGATIVE ERROR NON NLS 1 max Line Count lines  setMaximumLinesToScroll IllegalArgumentException ConsoleMsg getString CONSOLE_LINES_TO_SCROLL_NEGATIVE_ERROR maxLineCount
Resets the line counter for the more prompt private void reset Line Count current Line Count 0  resetLineCount currentLineCount
Prints a string to the output medium appended with newline character p This method does not increment the line counter for the more prompt param o the string to be printed private void printline Object o print o newline 
Prints an object to the outputstream param othe object to be printed public void print Object o synchronized out check4 More out print o out flush  check4More
Prints a empty line to the outputstream public void println println NON NLS 1 
Print a stack trace including nested exceptions param t The offending exception public void print Stack Trace Throwable t t print Stack Trace out Method methods t get Class get Methods int size methods length Class throwable Throwable class for int i 0 i size i Method method methods i if Modifier is Public method get Modifiers method get Name starts With get throwable is Assignable From method get Return Type method get Parameter Types length 0 NON NLS 1 try Throwable nested Throwable method invoke t null if nested null nested t out println Console Msg formatter get String CONSOLE NESTED EXCEPTION NON NLS 1 print Stack Trace nested catch Illegal Access Exception e catch Invocation Target Exception e  printStackTrace printStackTrace getClass getMethods isPublic getModifiers getName startsWith isAssignableFrom getReturnType getParameterTypes ConsoleMsg getString CONSOLE_NESTED_EXCEPTION printStackTrace IllegalAccessException InvocationTargetException
Prints an object to the output medium appended with newline character p If running on the target environment the user is prompted with more if more than the configured number of lines have been printed without user prompt This enables the user of the program to have control over scrolling p For this to work properly you should not embed n etc into the string paramothe object to be printed public void println Object o if o null return synchronized out check4 More printline o current Line Count current Line Count o to String length 80  check4More currentLineCount currentLineCount toString
Prints the given dictionary sorted by keys param dicthe dictionary to print param titlethe header to print above the key value pairs public void print Dictionary Dictionary dic String title if dic null return int count dic size String keys new String count Enumeration enum dic keys int i 0 while enum has More Elements keys i String enum next Element Util sort keys if title null println title for i 0 i count i println keys i dic get keys i NON NLS 1 NON NLS 2 println  printDictionary hasMoreElements nextElement
Prints the given bundle resource if it exists param bundlethe bundle containing the resource param resourcethe resource to print public void print Bundle Resource Abstract Bundle bundle String resource URL entry null entry bundle get Entry resource if entry null try println resource Input Stream in entry open Stream byte buffer new byte 1024 int read 0 try while read in read buffer 1 print new String buffer 0 read finally if in null try in close catch IO Exception e catch Exception e System err println Console Msg formatter get String CONSOLE ERROR READING RESOURCE resource NON NLS 1 else println Console Msg formatter get String CONSOLE RESOURCE NOT IN BUNDLE resource bundle to String NON NLS 1  printBundleResource AbstractBundle getEntry InputStream openStream IOException ConsoleMsg getString CONSOLE_ERROR_READING_RESOURCE ConsoleMsg getString CONSOLE_RESOURCE_NOT_IN_BUNDLE toString
Displays the more prompt if the max line count has been reached and waits for the operator to hit enter private void check4 More int max get Maximum Lines To Scroll if max 0 if current Line Count max out print Console Msg formatter get String CONSOLE MORE NON NLS 1 out flush con get Input wait for user entry reset Line Count Reset the line counter for the more prompt  check4More getMaximumLinesToScroll currentLineCount ConsoleMsg getString CONSOLE_MORE getInput resetLineCount
Answer a string may be as many lines as you like with help texts that explain the command public String get Help String Buffer help new String Buffer 256 help append newline help append Console Msg formatter get String CONSOLE HELP CONTROLLING CONSOLE HEADING NON NLS 1 help append newline help append tab help append more NON NLS 1 help append Console Msg formatter get String CONSOLE HELP MORE NON NLS 1 if con get Use Socket Stream help append newline help append tab help append disconnect NON NLS 1 help append Console Msg formatter get String CONSOLE HELP DISCONNECT NON NLS 1 return help to String  getHelp StringBuffer StringBuffer ConsoleMsg getString CONSOLE_HELP_CONTROLLING_CONSOLE_HEADING ConsoleMsg getString CONSOLE_HELP_MORE getUseSocketStream ConsoleMsg getString CONSOLE_HELP_DISCONNECT toString
Toggles the use of the more prompt for displayed output public void  more throws Exception if confirm Console Msg formatter get String CONSOLE CONFIRM MORE true NON NLS 1 int lines prompt newline Console Msg formatter get String CONSOLE MORE ENTER LINES 24 NON NLS 1 set Maximum Lines To Scroll lines else set Maximum Lines To Scroll 0  _more ConsoleMsg getString CONSOLE_CONFIRM_MORE ConsoleMsg getString CONSOLE_MORE_ENTER_LINES setMaximumLinesToScroll setMaximumLinesToScroll
private void  disconnect throws Exception if confirm Console Msg formatter get String CONSOLE CONFIRM DISCONNECT true NON NLS 1 con disconnect  _disconnect ConsoleMsg getString CONSOLE_CONFIRM_DISCONNECT
Prompts the user for confirmation paramstringthe message to present to the user to confirm paramdefault Answerthe default result return code true code if the user confirms code false code otherwise protected boolean confirm String string boolean default Answer synchronized out if string length 0 print string else print Console Msg formatter get String CONSOLE CONFIRM NON NLS 1 print Console Msg formatter get String CONSOLE CONFIRM VALUES NON NLS 1 NON NLS 2 if default Answer print Console Msg formatter get String CONSOLE Y NON NLS 1 NON NLS 2 else print Console Msg formatter get String CONSOLE N NON NLS 1 NON NLS 2 String input con get Input reset Line Count if input length 0 return default Answer return input to Lower Case char At 0 Console Msg formatter get String CONSOLE Y char At 0 NON NLS 1  paramdefaultAnswerthe defaultAnswer ConsoleMsg getString CONSOLE_CONFIRM ConsoleMsg getString CONSOLE_CONFIRM_VALUES defaultAnswer ConsoleMsg getString CONSOLE_Y ConsoleMsg getString CONSOLE_N getInput resetLineCount defaultAnswer toLowerCase charAt ConsoleMsg getString CONSOLE_Y charAt
Prompts the user for input from the input medium providing a default value paramstringthe message to present to the user paramdefault Answerthe string to use as a default return value return The user provided string or the default Answer if user provided string was empty protected String prompt String string String default Answer if string length 0 if default Answer length 0 String Buffer buf new String Buffer 256 buf append string buf append NON NLS 1 buf append Console Msg formatter get String CONSOLE PROMPT DEFAULT NON NLS 1 buf append NON NLS 1 buf append default Answer buf append NON NLS 1 print buf to String else print string String input con get Input reset Line Count if input length 0 return input return default Answer  paramdefaultAnswerthe returnThe defaultAnswer defaultAnswer defaultAnswer StringBuffer StringBuffer ConsoleMsg getString CONSOLE_PROMPT_DEFAULT defaultAnswer toString getInput resetLineCount defaultAnswer
Prompts the user for input of a positive integer paramstringthe message to present to the user paramdefault Answerthe integer to use as a default return value return The user provided integer or the default Answer if user provided an empty input protected int prompt String string int default Answer Integer i new Integer default Answer int answer for int j 0 j 3 j String s prompt string i to String try answer Integer parse Int s if answer 0 return answer catch Number Format Exception e println Console Msg formatter get String CONSOLE INVALID INPUT NON NLS 1 println Console Msg formatter get String CONSOLE TOO MUCH INVALID INPUT NON NLS 1 return default Answer  paramdefaultAnswerthe returnThe defaultAnswer defaultAnswer defaultAnswer toString parseInt NumberFormatException ConsoleMsg getString CONSOLE_INVALID_INPUT ConsoleMsg getString CONSOLE_TOO_MUCH_INVALID_INPUT defaultAnswer

Constructor It registers itself as a Command Provider with the highest ranking possible param osgi The current instance of OS Gi public Framework Command Provider OS Gi osgi this osgi osgi context osgi get Bundle Context sl Impl osgi framework start Level Manager Dictionary props new Hashtable props put Constants SERVICE RANKING new Integer Integer MAX VALUE context register Service Command Provider class get Name this props  CommandProvider OSGi FrameworkCommandProvider OSGi getBundleContext slImpl startLevelManager SERVICE_RANKING MAX_VALUE registerService CommandProvider getName
Answer a string may be as many lines as you like with help texts that explain the command This get Help method uses the Console Msg class to obtain the correct NLS data to display to the user return The help string public String get Help String Buffer help new String Buffer 1024 help append newline help append Console Msg formatter get String CONSOLE HELP VALID COMMANDS HEADER NON NLS 1 help append newline add Header CONSOLE HELP CONTROLLING FRAMEWORK HEADER help NON NLS 1 add Command launch CONSOLE HELP LAUNCH COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 add Command shutdown CONSOLE HELP SHUTDOWN COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 add Command close CONSOLE HELP CLOSE COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 add Command exit CONSOLE HELP EXIT COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 add Command gc CONSOLE HELP GC COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 add Command init CONSOLE HELP INIT COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 add Command setprop CONSOLE HELP KEYVALUE ARGUMENT DESCRIPTION CONSOLE HELP SETPROP COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 NON NLS 3 add Header CONSOLE HELP CONTROLLING BUNDLES HEADER help NON NLS 1 add Command install CONSOLE HELP INSTALL COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 add Command uninstall CONSOLE HELP UNINSTALL COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 add Command start CONSOLE HELP START COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 add Command stop CONSOLE HELP STOP COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 add Command refresh CONSOLE HELP REFRESH COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 add Command update CONSOLE HELP UPDATE COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 add Header CONSOLE HELP DISPLAYING STATUS HEADER help NON NLS 1 add Command status CONSOLE HELP STATUS COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 add Command ss CONSOLE HELP SS COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 add Command services CONSOLE HELP FILTER ARGUMENT DESCRIPTION CONSOLE HELP SERVICES COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 NON NLS 3 add Command packages CONSOLE HELP PACKAGES ARGUMENT DESCRIPTION CONSOLE HELP PACKAGES COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 NON NLS 3 add Command bundles CONSOLE HELP BUNDLES COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 add Command bundle CONSOLE HELP IDLOCATION ARGUMENT DESCRIPTION CONSOLE HELP BUNDLE COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 NON NLS 3 add Command headers CONSOLE HELP IDLOCATION ARGUMENT DESCRIPTION CONSOLE HELP HEADERS COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 NON NLS 3 add Command log CONSOLE HELP IDLOCATION ARGUMENT DESCRIPTION CONSOLE HELP LOG COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 NON NLS 3 add Header CONSOLE HELP EXTRAS HEADER help NON NLS 1 add Command exec CONSOLE HELP COMMAND ARGUMENT DESCRIPTION CONSOLE HELP EXEC COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 NON NLS 3 add Command fork CONSOLE HELP COMMAND ARGUMENT DESCRIPTION CONSOLE HELP FORK COMMAND DESCRIPTION help NON NLS 1 NON NLS 2 NON NLS 3 add Header STARTLEVEL HELP HEADING help NON NLS 1 add Command sl CONSOLE HELP OPTIONAL IDLOCATION ARGUMENT DESCRIPTION STARTLEVEL HELP SL help NON NLS 1 NON NLS 2 NON NLS 3 add Command setfwsl STARTLEVEL ARGUMENT DESCRIPTION STARTLEVEL HELP SETFWSL help NON NLS 1 NON NLS 2 NON NLS 3 add Command setbsl STARTLEVEL IDLOCATION ARGUMENT DESCRIPTION STARTLEVEL HELP SETBSL help NON NLS 1 NON NLS 2 NON NLS 3 add Command setibsl STARTLEVEL ARGUMENT DESCRIPTION STARTLEVEL HELP SETIBSL help NON NLS 1 NON NLS 2 NON NLS 3 return help to String  getHelp ConsoleMsg getHelp StringBuffer StringBuffer ConsoleMsg getString CONSOLE_HELP_VALID_COMMANDS_HEADER addHeader CONSOLE_HELP_CONTROLLING_FRAMEWORK_HEADER addCommand CONSOLE_HELP_LAUNCH_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_SHUTDOWN_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_CLOSE_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_EXIT_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_GC_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_INIT_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_KEYVALUE_ARGUMENT_DESCRIPTION CONSOLE_HELP_SETPROP_COMMAND_DESCRIPTION addHeader CONSOLE_HELP_CONTROLLING_BUNDLES_HEADER addCommand CONSOLE_HELP_INSTALL_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_UNINSTALL_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_START_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_STOP_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_REFRESH_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_UPDATE_COMMAND_DESCRIPTION addHeader CONSOLE_HELP_DISPLAYING_STATUS_HEADER addCommand CONSOLE_HELP_STATUS_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_SS_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_FILTER_ARGUMENT_DESCRIPTION CONSOLE_HELP_SERVICES_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_PACKAGES_ARGUMENT_DESCRIPTION CONSOLE_HELP_PACKAGES_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_BUNDLES_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_IDLOCATION_ARGUMENT_DESCRIPTION CONSOLE_HELP_BUNDLE_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_IDLOCATION_ARGUMENT_DESCRIPTION CONSOLE_HELP_HEADERS_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_IDLOCATION_ARGUMENT_DESCRIPTION CONSOLE_HELP_LOG_COMMAND_DESCRIPTION addHeader CONSOLE_HELP_EXTRAS_HEADER addCommand CONSOLE_HELP_COMMAND_ARGUMENT_DESCRIPTION CONSOLE_HELP_EXEC_COMMAND_DESCRIPTION addCommand CONSOLE_HELP_COMMAND_ARGUMENT_DESCRIPTION CONSOLE_HELP_FORK_COMMAND_DESCRIPTION addHeader STARTLEVEL_HELP_HEADING addCommand CONSOLE_HELP_OPTIONAL_IDLOCATION_ARGUMENT_DESCRIPTION STARTLEVEL_HELP_SL addCommand STARTLEVEL_ARGUMENT_DESCRIPTION STARTLEVEL_HELP_SETFWSL addCommand STARTLEVEL_IDLOCATION_ARGUMENT_DESCRIPTION STARTLEVEL_HELP_SETBSL addCommand STARTLEVEL_ARGUMENT_DESCRIPTION STARTLEVEL_HELP_SETIBSL toString
Private helper method for get Help Formats the help headers private void add Header String header String Buffer help help append NON NLS 1 help append Console Msg formatter get String header help append NON NLS 1 help append newline  getHelp addHeader StringBuffer ConsoleMsg getString
Private helper method for get Help Formats the command descriptions private void add Command String command String description String Buffer help help append tab help append command help append NON NLS 1 help append Console Msg formatter get String description help append newline  getHelp addCommand StringBuffer ConsoleMsg getString
Private helper method for get Help Formats the command descriptions with command arguements private void add Command String command String parameters String description String Buffer help help append tab help append command help append NON NLS 1 help append Console Msg formatter get String parameters help append NON NLS 1 help append Console Msg formatter get String description help append newline  getHelp addCommand StringBuffer ConsoleMsg getString ConsoleMsg getString
Handle the exit command Exit immediately System exit param intp A Command Interpreter object containing the command and it s arguments public void  exit Command Interpreter intp throws Exception intp println System exit 0  CommandInterpreter _exit CommandInterpreter
Handle the launch command Start the OS Gi framework param intp A Command Interpreter object containing the command and it s arguments public void  launch Command Interpreter intp throws Exception osgi launch  OSGi CommandInterpreter _launch CommandInterpreter
Handle the shutdown command Shutdown the OS Gi framework param intp A Command Interpreter object containing the command and it s arguments public void  shutdown Command Interpreter intp throws Exception osgi shutdown  OSGi CommandInterpreter _shutdown CommandInterpreter
Handle the start command s abbreviation Invoke  start param intp A Command Interpreter object containing the command and it s arguments public void  sta Command Interpreter intp throws Exception  start intp  _start CommandInterpreter _sta CommandInterpreter _start
Handle the start command Start the specified bundle s param intp A Command Interpreter object containing the command and it s arguments public void  start Command Interpreter intp throws Exception String next Arg intp next Argument if next Arg null intp println Console Msg formatter get String CONSOLE NO BUNDLE SPECIFIED ERROR NON NLS 1 while next Arg null Abstract Bundle bundle get Bundle From Token intp next Arg true if bundle null bundle start next Arg intp next Argument  CommandInterpreter _start CommandInterpreter nextArg nextArgument nextArg ConsoleMsg getString CONSOLE_NO_BUNDLE_SPECIFIED_ERROR nextArg AbstractBundle getBundleFromToken nextArg nextArg nextArgument
Handle the stop command s abbreviation Invoke  stop param intp A Command Interpreter object containing the command and it s arguments public void  sto Command Interpreter intp throws Exception  stop intp  _stop CommandInterpreter _sto CommandInterpreter _stop
Handle the stop command Stop the specified bundle s param intp A Command Interpreter object containing the command and it s arguments public void  stop Command Interpreter intp throws Exception String next Arg intp next Argument if next Arg null intp println Console Msg formatter get String CONSOLE NO BUNDLE SPECIFIED ERROR NON NLS 1 while next Arg null Abstract Bundle bundle get Bundle From Token intp next Arg true if bundle null bundle stop next Arg intp next Argument  CommandInterpreter _stop CommandInterpreter nextArg nextArgument nextArg ConsoleMsg getString CONSOLE_NO_BUNDLE_SPECIFIED_ERROR nextArg AbstractBundle getBundleFromToken nextArg nextArg nextArgument
Handle the install command s abbreviation Invoke  install param intp A Command Interpreter object containing the command and it s arguments public void  i Command Interpreter intp throws Exception  install intp  _install CommandInterpreter _i CommandInterpreter _install
Handle the install command Install and optionally start bundle from the given URL r n param intp A Command Interpreter object containing the command and it s arguments public void  install Command Interpreter intp throws Exception String url intp next Argument if url null intp println Console Msg formatter get String CONSOLE NOTHING TO INSTALL ERROR NON NLS 1 else Abstract Bundle bundle Abstract Bundle context install Bundle url intp print Console Msg formatter get String CONSOLE BUNDLE ID MESSAGE NON NLS 1 intp println new Long bundle get Bundle Id String next Arg intp next Argument if next Arg null String start next Arg to Lower Case if Launcher match Command start start 1 NON NLS 1 bundle start  CommandInterpreter _install CommandInterpreter nextArgument ConsoleMsg getString CONSOLE_NOTHING_TO_INSTALL_ERROR AbstractBundle AbstractBundle installBundle ConsoleMsg getString CONSOLE_BUNDLE_ID_MESSAGE getBundleId nextArg nextArgument nextArg nextArg toLowerCase matchCommand
Handle the update command s abbreviation Invoke  update param intp A Command Interpreter object containing the command and it s arguments public void  up Command Interpreter intp throws Exception  update intp  _update CommandInterpreter _up CommandInterpreter _update
Handle the update command Update the specified bundle s param intp A Command Interpreter object containing the command and it s arguments public void  update Command Interpreter intp throws Exception String token intp next Argument if token null intp println Console Msg formatter get String CONSOLE NO BUNDLE SPECIFIED ERROR NON NLS 1 while token null if equals token NON NLS 1 Abstract Bundle bundles Abstract Bundle context get Bundles int size bundles length if size 0 for int i 0 i size i Abstract Bundle bundle bundles i if bundle get Bundle Id 0 try bundle update catch Bundle Exception e intp print Stack Trace e else intp println Console Msg formatter get String CONSOLE NO INSTALLED BUNDLES ERROR NON NLS 1 else Abstract Bundle bundle get Bundle From Token intp token true if bundle null String source intp next Argument try if source null bundle update new URL source open Stream else bundle update catch Bundle Exception e intp print Stack Trace e token intp next Argument  CommandInterpreter _update CommandInterpreter nextArgument ConsoleMsg getString CONSOLE_NO_BUNDLE_SPECIFIED_ERROR AbstractBundle AbstractBundle getBundles AbstractBundle getBundleId BundleException printStackTrace ConsoleMsg getString CONSOLE_NO_INSTALLED_BUNDLES_ERROR AbstractBundle getBundleFromToken nextArgument openStream BundleException printStackTrace nextArgument
Handle the uninstall command s abbreviation Invoke  uninstall param intp A Command Interpreter object containing the command and it s arguments public void  un Command Interpreter intp throws Exception  uninstall intp  _uninstall CommandInterpreter _un CommandInterpreter _uninstall
Handle the uninstall command Uninstall the specified bundle s param intp A Command Interpreter object containing the command and it s arguments public void  uninstall Command Interpreter intp throws Exception String next Arg intp next Argument if next Arg null intp println Console Msg formatter get String CONSOLE NO BUNDLE SPECIFIED ERROR NON NLS 1 while next Arg null Abstract Bundle bundle get Bundle From Token intp next Arg true if bundle null bundle uninstall next Arg intp next Argument  CommandInterpreter _uninstall CommandInterpreter nextArg nextArgument nextArg ConsoleMsg getString CONSOLE_NO_BUNDLE_SPECIFIED_ERROR nextArg AbstractBundle getBundleFromToken nextArg nextArg nextArgument
Handle the status command s abbreviation Invoke  status param intp A Command Interpreter object containing the command and it s arguments public void  s Command Interpreter intp throws Exception  status intp  _status CommandInterpreter _s CommandInterpreter _status
Handle the status command Display installed bundles and registered services param intp A Command Interpreter object containing the command and it s arguments public void  status Command Interpreter intp throws Exception if osgi is Active intp println Console Msg formatter get String CONSOLE FRAMEWORK IS LAUNCHED MESSAGE NON NLS 1 else intp println Console Msg formatter get String CONSOLE FRAMEWORK IS SHUTDOWN MESSAGE NON NLS 1 intp println Abstract Bundle bundles Abstract Bundle context get Bundles int size bundles length if size 0 intp println Console Msg formatter get String CONSOLE NO INSTALLED BUNDLES ERROR NON NLS 1 return intp print Console Msg formatter get String CONSOLE ID NON NLS 1 intp print tab intp println Console Msg formatter get String CONSOLE BUNDLE LOCATION MESSAGE NON NLS 1 intp println Console Msg formatter get String CONSOLE STATE BUNDLE FILE NAME HEADER NON NLS 1 for int i 0 i size i Abstract Bundle bundle bundles i intp print new Long bundle get Bundle Id intp print tab intp println bundle get Location intp print NON NLS 1 intp print get State Name bundle get State intp println bundle bundledata Service Reference services Service Reference context get Service References null null if services null intp println Console Msg formatter get String CONSOLE REGISTERED SERVICES MESSAGE NON NLS 1 size services length for int i 0 i size i intp println services i  CommandInterpreter _status CommandInterpreter isActive ConsoleMsg getString CONSOLE_FRAMEWORK_IS_LAUNCHED_MESSAGE ConsoleMsg getString CONSOLE_FRAMEWORK_IS_SHUTDOWN_MESSAGE AbstractBundle AbstractBundle getBundles ConsoleMsg getString CONSOLE_NO_INSTALLED_BUNDLES_ERROR ConsoleMsg getString CONSOLE_ID ConsoleMsg getString CONSOLE_BUNDLE_LOCATION_MESSAGE ConsoleMsg getString CONSOLE_STATE_BUNDLE_FILE_NAME_HEADER AbstractBundle getBundleId getLocation getStateName getState ServiceReference ServiceReference getServiceReferences ConsoleMsg getString CONSOLE_REGISTERED_SERVICES_MESSAGE
Handle the services command s abbreviation Invoke  services param intp A Command Interpreter object containing the command and it s arguments public void  se Command Interpreter intp throws Exception  services intp  _services CommandInterpreter _se CommandInterpreter _services
Handle the services command Display registered service details param intp A Command Interpreter object containing the command and it s arguments public void  services Command Interpreter intp throws Exception String filter null String next Arg intp next Argument if next Arg null String Buffer buf new String Buffer while next Arg null buf append buf append next Arg next Arg intp next Argument filter buf to String Service Reference services Service Reference context get Service References null filter if services null int size services length if size 0 for int j 0 j size j Service Reference service services j intp println service intp print NON NLS 1 intp print Console Msg formatter get String CONSOLE REGISTERED BY BUNDLE MESSAGE NON NLS 1 intp print NON NLS 1 intp println service get Bundle Abstract Bundle users Abstract Bundle service get Using Bundles if users null intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE BUNDLES USING SERVICE MESSAGE NON NLS 1 for int k 0 k users length k intp print NON NLS 1 intp println users k else intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE NO BUNDLES USING SERVICE MESSAGE NON NLS 1 return intp println Console Msg formatter get String CONSOLE NO REGISTERED SERVICES MESSAGE NON NLS 1  CommandInterpreter _services CommandInterpreter nextArg nextArgument nextArg StringBuffer StringBuffer nextArg nextArg nextArg nextArgument toString ServiceReference ServiceReference getServiceReferences ServiceReference ConsoleMsg getString CONSOLE_REGISTERED_BY_BUNDLE_MESSAGE getBundle AbstractBundle AbstractBundle getUsingBundles ConsoleMsg getString CONSOLE_BUNDLES_USING_SERVICE_MESSAGE ConsoleMsg getString CONSOLE_NO_BUNDLES_USING_SERVICE_MESSAGE ConsoleMsg getString CONSOLE_NO_REGISTERED_SERVICES_MESSAGE
Handle the packages command s abbreviation Invoke  packages param intp A Command Interpreter object containing the command and it s arguments public void  p Command Interpreter intp throws Exception  packages intp  _packages CommandInterpreter _p CommandInterpreter _packages
Handle the packages command Display imported exported package details param intp A Command Interpreter object containing the command and it s arguments public void  packages Command Interpreter intp throws Exception org osgi framework Bundle bundle null String token intp next Argument if token null bundle get Bundle From Token intp token false org osgi framework Service Reference package Admin Ref context get Service Reference org osgi service packageadmin Package Admin NON NLS 1 if package Admin Ref null org osgi service packageadmin Package Admin package Admin org osgi service packageadmin Package Admin context get Service package Admin Ref if package Admin null try org osgi service packageadmin Exported Package packages null if token null bundle null org osgi service packageadmin Exported Package pkg package Admin get Exported Package token if pkg null packages new org osgi service packageadmin Exported Package pkg else packages package Admin get Exported Packages bundle if packages null intp println Console Msg formatter get String CONSOLE NO EXPORTED PACKAGES MESSAGE NON NLS 1 else for int i 0 i packages length i org osgi service packageadmin Exported Package pkg packages i intp print pkg boolean removal Pending pkg is Removal Pending if removal Pending intp print NON NLS 1 intp print Console Msg formatter get String CONSOLE REMOVAL PENDING MESSAGE NON NLS 1 intp println NON NLS 1 org osgi framework Bundle exporter pkg get Exporting Bundle if exporter null intp print NON NLS 1 intp print exporter intp println NON NLS 1 org osgi framework Bundle importers pkg get Importing Bundles for int j 0 j importers length j intp print NON NLS 1 intp print importers j intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE IMPORTS MESSAGE NON NLS 1 else intp print NON NLS 1 intp print Console Msg formatter get String CONSOLE STALE MESSAGE NON NLS 1 intp println NON NLS 1 finally context unget Service package Admin Ref else intp println Console Msg formatter get String CONSOLE NO EXPORTED PACKAGES NO PACKAGE ADMIN MESSAGE NON NLS 1  CommandInterpreter _packages CommandInterpreter nextArgument getBundleFromToken ServiceReference packageAdminRef getServiceReference PackageAdmin packageAdminRef PackageAdmin packageAdmin PackageAdmin getService packageAdminRef packageAdmin ExportedPackage ExportedPackage packageAdmin getExportedPackage ExportedPackage packageAdmin getExportedPackages ConsoleMsg getString CONSOLE_NO_EXPORTED_PACKAGES_MESSAGE ExportedPackage removalPending isRemovalPending removalPending ConsoleMsg getString CONSOLE_REMOVAL_PENDING_MESSAGE getExportingBundle getImportingBundles ConsoleMsg getString CONSOLE_IMPORTS_MESSAGE ConsoleMsg getString CONSOLE_STALE_MESSAGE ungetService packageAdminRef ConsoleMsg getString CONSOLE_NO_EXPORTED_PACKAGES_NO_PACKAGE_ADMIN_MESSAGE
Handle the bundles command Display details for all installed bundles param intp A Command Interpreter object containing the command and it s arguments public void  bundles Command Interpreter intp throws Exception Abstract Bundle bundles Abstract Bundle context get Bundles int size bundles length if size 0 intp println Console Msg formatter get String CONSOLE NO INSTALLED BUNDLES ERROR NON NLS 1 return for int i 0 i size i Abstract Bundle bundle bundles i long id bundle get Bundle Id intp println bundle intp print NON NLS 1 intp print Console Msg formatter get String CONSOLE ID MESSAGE String value Of id NON NLS 1 intp print NON NLS 1 intp print Console Msg formatter get String CONSOLE STATUS MESSAGE get State Name bundle get State NON NLS 1 if id 0 File data Root osgi framework get Data File bundle NON NLS 1 String root data Root null null data Root get Absolute Path intp print Console Msg formatter get String CONSOLE DATA ROOT MESSAGE root NON NLS 1 else intp println Service Reference services Service Reference bundle get Registered Services if services null intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE REGISTERED SERVICES MESSAGE NON NLS 1 for int j 0 j services length j intp print NON NLS 1 intp println services j else intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE NO REGISTERED SERVICES MESSAGE NON NLS 1 services Service Reference bundle get Services In Use if services null intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE SERVICES IN USE MESSAGE NON NLS 1 for int j 0 j services length j intp print NON NLS 1 intp println services j else intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE NO SERVICES IN USE MESSAGE NON NLS 1  CommandInterpreter _bundles CommandInterpreter AbstractBundle AbstractBundle getBundles ConsoleMsg getString CONSOLE_NO_INSTALLED_BUNDLES_ERROR AbstractBundle getBundleId ConsoleMsg getString CONSOLE_ID_MESSAGE valueOf ConsoleMsg getString CONSOLE_STATUS_MESSAGE getStateName getState dataRoot getDataFile dataRoot dataRoot getAbsolutePath ConsoleMsg getString CONSOLE_DATA_ROOT_MESSAGE ServiceReference ServiceReference getRegisteredServices ConsoleMsg getString CONSOLE_REGISTERED_SERVICES_MESSAGE ConsoleMsg getString CONSOLE_NO_REGISTERED_SERVICES_MESSAGE ServiceReference getServicesInUse ConsoleMsg getString CONSOLE_SERVICES_IN_USE_MESSAGE ConsoleMsg getString CONSOLE_NO_SERVICES_IN_USE_MESSAGE
Handle the bundle command s abbreviation Invoke  bundle param intp A Command Interpreter object containing the command and it s arguments public void  b Command Interpreter intp throws Exception  bundle intp  _bundle CommandInterpreter _b CommandInterpreter _bundle
Handle the bundle command Display details for the specified bundle s param intp A Command Interpreter object containing the command and it s arguments public void  bundle Command Interpreter intp throws Exception String next Arg intp next Argument if next Arg null intp println Console Msg formatter get String CONSOLE NO BUNDLE SPECIFIED ERROR NON NLS 1 while next Arg null Abstract Bundle bundle get Bundle From Token intp next Arg true if bundle null long id bundle get Bundle Id intp println bundle intp print NON NLS 1 intp print Console Msg formatter get String CONSOLE ID MESSAGE String value Of id NON NLS 1 intp print NON NLS 1 intp print Console Msg formatter get String CONSOLE STATUS MESSAGE get State Name bundle get State NON NLS 1 if id 0 File data Root osgi framework get Data File bundle NON NLS 1 String root data Root null null data Root get Absolute Path intp print Console Msg formatter get String CONSOLE DATA ROOT MESSAGE root NON NLS 1 else intp println Service Reference services Service Reference bundle get Registered Services if services null intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE REGISTERED SERVICES MESSAGE NON NLS 1 for int j 0 j services length j intp print NON NLS 1 intp println services j else intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE NO REGISTERED SERVICES MESSAGE NON NLS 1 services Service Reference bundle get Services In Use if services null intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE SERVICES IN USE MESSAGE NON NLS 1 for int j 0 j services length j intp print NON NLS 1 intp println services j else intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE NO SERVICES IN USE MESSAGE NON NLS 1 org osgi framework Service Reference package Admin Ref context get Service Reference org osgi service packageadmin Package Admin NON NLS 1 if package Admin Ref null org osgi service packageadmin Package Admin package Admin org osgi service packageadmin Package Admin context get Service package Admin Ref if package Admin null try org osgi service packageadmin Exported Package exportedpkgs package Admin get Exported Packages null if exportedpkgs null intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE NO EXPORTED PACKAGES MESSAGE NON NLS 1 intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE NO IMPORTED PACKAGES MESSAGE NON NLS 1 else boolean title true for int i 0 i exportedpkgs length i org osgi service packageadmin Exported Package exportedpkg exportedpkgs i if exportedpkg get Exporting Bundle bundle if title intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE EXPORTED PACKAGES MESSAGE NON NLS 1 title false intp print NON NLS 1 intp print exportedpkg if exportedpkg is Removal Pending intp println Console Msg formatter get String CONSOLE EXPORTED REMOVAL PENDING MESSAGE NON NLS 1 else intp println Console Msg formatter get String CONSOLE EXPORTED MESSAGE NON NLS 1 if title intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE NO EXPORTED PACKAGES MESSAGE NON NLS 1 title true for int i 0 i exportedpkgs length i org osgi service packageadmin Exported Package exportedpkg exportedpkgs i org osgi framework Bundle importers exportedpkg get Importing Bundles for int j 0 j importers length j if importers j bundle if title intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE IMPORTED PACKAGES MESSAGE NON NLS 1 title false intp print NON NLS 1 intp print exportedpkg org osgi framework Bundle exporter exportedpkg get Exporting Bundle if exporter null intp print NON NLS 1 intp print exporter intp println NON NLS 1 else intp print NON NLS 1 intp print Console Msg formatter get String CONSOLE STALE MESSAGE NON NLS 1 intp println NON NLS 1 break if title intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE NO IMPORTED PACKAGES MESSAGE NON NLS 1 intp print NON NLS 1 if package Admin get Bundle Type bundle Package Admin Impl BUNDLE TYPE FRAGMENT 0 org osgi framework Bundle hosts package Admin get Hosts bundle if hosts null intp println Console Msg formatter get String CONSOLE HOST MESSAGE NON NLS 1 for int i 0 i hosts length i intp print NON NLS 1 intp println hosts i else intp println Console Msg formatter get String CONSOLE NO HOST MESSAGE NON NLS 1 else org osgi framework Bundle fragments package Admin get Fragments bundle if fragments null intp println Console Msg formatter get String CONSOLE FRAGMENT MESSAGE NON NLS 1 for int i 0 i fragments length i intp print NON NLS 1 intp println fragments i else intp println Console Msg formatter get String CONSOLE NO FRAGMENT MESSAGE NON NLS 1 Providing Bundle named Class Spaces package Admin get Providing Bundles null Providing Bundle named Class Space null if named Class Spaces null for int i 0 i named Class Spaces length i if named Class Spaces i get Bundle bundle named Class Space named Class Spaces i break if named Class Space null intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE NO NAMED CLASS SPACES MESSAGE NON NLS 1 else intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE NAMED CLASS SPACE MESSAGE NON NLS 1 intp print NON NLS 1 intp print named Class Space if named Class Space is Removal Pending intp println Console Msg formatter get String CONSOLE REMOVAL PENDING MESSAGE NON NLS 1 else intp println Console Msg formatter get String CONSOLE PROVIDED MESSAGE NON NLS 1 title true for int i 0 i named Class Spaces length i if named Class Spaces i named Class Space continue org osgi framework Bundle dep Bundles named Class Spaces i get Requiring Bundles if dep Bundles null continue for int j 0 j dep Bundles length j if dep Bundles j bundle if title intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE REQUIRED BUNDLES MESSAGE NON NLS 1 title false intp print NON NLS 1 intp print named Class Spaces i org osgi framework Bundle provider named Class Spaces i get Bundle intp print NON NLS 1 intp print provider intp println NON NLS 1 if title intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE NO REQUIRED BUNDLES MESSAGE NON NLS 1 finally context unget Service package Admin Ref else intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE NO EXPORTED PACKAGES NO PACKAGE ADMIN MESSAGE NON NLS 1 Security Manager sm System get Security Manager if sm null Protection Domain domain bundle get Protection Domain intp println domain next Arg intp next Argument  CommandInterpreter _bundle CommandInterpreter nextArg nextArgument nextArg ConsoleMsg getString CONSOLE_NO_BUNDLE_SPECIFIED_ERROR nextArg AbstractBundle getBundleFromToken nextArg getBundleId ConsoleMsg getString CONSOLE_ID_MESSAGE valueOf ConsoleMsg getString CONSOLE_STATUS_MESSAGE getStateName getState dataRoot getDataFile dataRoot dataRoot getAbsolutePath ConsoleMsg getString CONSOLE_DATA_ROOT_MESSAGE ServiceReference ServiceReference getRegisteredServices ConsoleMsg getString CONSOLE_REGISTERED_SERVICES_MESSAGE ConsoleMsg getString CONSOLE_NO_REGISTERED_SERVICES_MESSAGE ServiceReference getServicesInUse ConsoleMsg getString CONSOLE_SERVICES_IN_USE_MESSAGE ConsoleMsg getString CONSOLE_NO_SERVICES_IN_USE_MESSAGE ServiceReference packageAdminRef getServiceReference PackageAdmin packageAdminRef PackageAdmin packageAdmin PackageAdmin getService packageAdminRef packageAdmin ExportedPackage packageAdmin getExportedPackages ConsoleMsg getString CONSOLE_NO_EXPORTED_PACKAGES_MESSAGE ConsoleMsg getString CONSOLE_NO_IMPORTED_PACKAGES_MESSAGE ExportedPackage getExportingBundle ConsoleMsg getString CONSOLE_EXPORTED_PACKAGES_MESSAGE isRemovalPending ConsoleMsg getString CONSOLE_EXPORTED_REMOVAL_PENDING_MESSAGE ConsoleMsg getString CONSOLE_EXPORTED_MESSAGE ConsoleMsg getString CONSOLE_NO_EXPORTED_PACKAGES_MESSAGE ExportedPackage getImportingBundles ConsoleMsg getString CONSOLE_IMPORTED_PACKAGES_MESSAGE getExportingBundle ConsoleMsg getString CONSOLE_STALE_MESSAGE ConsoleMsg getString CONSOLE_NO_IMPORTED_PACKAGES_MESSAGE packageAdmin getBundleType PackageAdminImpl BUNDLE_TYPE_FRAGMENT packageAdmin getHosts ConsoleMsg getString CONSOLE_HOST_MESSAGE ConsoleMsg getString CONSOLE_NO_HOST_MESSAGE packageAdmin getFragments ConsoleMsg getString CONSOLE_FRAGMENT_MESSAGE ConsoleMsg getString CONSOLE_NO_FRAGMENT_MESSAGE ProvidingBundle namedClassSpaces packageAdmin getProvidingBundles ProvidingBundle namedClassSpace namedClassSpaces namedClassSpaces namedClassSpaces getBundle namedClassSpace namedClassSpaces namedClassSpace ConsoleMsg getString CONSOLE_NO_NAMED_CLASS_SPACES_MESSAGE ConsoleMsg getString CONSOLE_NAMED_CLASS_SPACE_MESSAGE namedClassSpace namedClassSpace isRemovalPending ConsoleMsg getString CONSOLE_REMOVAL_PENDING_MESSAGE ConsoleMsg getString CONSOLE_PROVIDED_MESSAGE namedClassSpaces namedClassSpaces namedClassSpace depBundles namedClassSpaces getRequiringBundles depBundles depBundles depBundles ConsoleMsg getString CONSOLE_REQUIRED_BUNDLES_MESSAGE namedClassSpaces namedClassSpaces getBundle ConsoleMsg getString CONSOLE_NO_REQUIRED_BUNDLES_MESSAGE ungetService packageAdminRef ConsoleMsg getString CONSOLE_NO_EXPORTED_PACKAGES_NO_PACKAGE_ADMIN_MESSAGE SecurityManager getSecurityManager ProtectionDomain getProtectionDomain nextArg nextArgument
Handle the log command s abbreviation Invoke  log param intp A Command Interpreter object containing the command and it s arguments public void  l Command Interpreter intp throws Exception  log intp  _log CommandInterpreter _l CommandInterpreter _log
Handle the log command Display log entries param intp A Command Interpreter object containing the command and it s arguments public void  log Command Interpreter intp throws Exception long logid 1 String token intp next Argument if token null Abstract Bundle bundle get Bundle From Token intp token false if bundle null try logid Long parse Long token catch Number Format Exception e return else logid bundle get Bundle Id org osgi framework Service Reference logreader Ref context get Service Reference org osgi service log Log Reader Service NON NLS 1 if logreader Ref null Object logreader context get Service logreader Ref if logreader null try Enumeration logentries Enumeration logreader get Class get Method get Log null invoke logreader null NON NLS 1 if logentries has More Elements Object logentry logentries next Element Class clazz logentry get Class Method get Bundle clazz get Method get Bundle null NON NLS 1 Method get Level clazz get Method get Level null NON NLS 1 Method get Message clazz get Method get Message null NON NLS 1 Method get Service Reference clazz get Method get Service Reference null NON NLS 1 Method get Exception clazz get Method get Exception null NON NLS 1 while true Abstract Bundle bundle Abstract Bundle get Bundle invoke logentry null if logid 1 bundle null logid bundle get Bundle Id Integer level Integer get Level invoke logentry null switch level int Value case 4 intp print NON NLS 1 intp print Console Msg formatter get String CONSOLE DEBUG MESSAGE NON NLS 1 intp print NON NLS 1 break case 3 intp print NON NLS 1 intp print Console Msg formatter get String CONSOLE INFO MESSAGE NON NLS 1 intp print NON NLS 1 break case 2 intp print NON NLS 1 intp print Console Msg formatter get String CONSOLE WARNING MESSAGE NON NLS 1 intp print NON NLS 1 break case 1 intp print NON NLS 1 intp print Console Msg formatter get String CONSOLE ERROR MESSAGE NON NLS 1 intp print NON NLS 1 break default intp print NON NLS 1 intp print level intp print NON NLS 1 break if bundle null intp print NON NLS 1 intp print new Long bundle get Bundle Id intp print NON NLS 1 intp print get Message invoke logentry null intp print NON NLS 1 Service Reference Impl svcref Service Reference Impl get Service Reference invoke logentry null if svcref null intp print NON NLS 1 intp print Constants SERVICE ID intp print NON NLS 1 intp print svcref get Property Constants SERVICE ID to String intp println NON NLS 1 else if bundle null intp println bundle get Location else intp println Throwable t Throwable get Exception invoke logentry null if t null intp print Stack Trace t if logentries has More Elements logentry logentries next Element else break finally context unget Service logreader Ref return intp println Console Msg formatter get String CONSOLE LOGSERVICE NOT REGISTERED MESSAGE NON NLS 1  CommandInterpreter _log CommandInterpreter nextArgument AbstractBundle getBundleFromToken parseLong NumberFormatException getBundleId ServiceReference logreaderRef getServiceReference LogReaderService logreaderRef getService logreaderRef getClass getMethod getLog hasMoreElements nextElement getClass getBundle getMethod getBundle getLevel getMethod getLevel getMessage getMethod getMessage getServiceReference getMethod getServiceReference getException getMethod getException AbstractBundle AbstractBundle getBundle getBundleId getLevel intValue ConsoleMsg getString CONSOLE_DEBUG_MESSAGE ConsoleMsg getString CONSOLE_INFO_MESSAGE ConsoleMsg getString CONSOLE_WARNING_MESSAGE ConsoleMsg getString CONSOLE_ERROR_MESSAGE getBundleId getMessage ServiceReferenceImpl ServiceReferenceImpl getServiceReference SERVICE_ID getProperty SERVICE_ID toString getLocation getException printStackTrace hasMoreElements nextElement ungetService logreaderRef ConsoleMsg getString CONSOLE_LOGSERVICE_NOT_REGISTERED_MESSAGE
Handle the gc command Perform a garbage collection param intp A Command Interpreter object containing the command and it s arguments public void  gc Command Interpreter intp throws Exception long before Runtime get Runtime free Memory Let the finilizer finish its work and remove objects from its queue System gc asyncronous garbage collector might already run System gc to make sure it does a full gc call it twice System run Finalization try Thread sleep 100 catch Interrupted Exception e long after Runtime get Runtime free Memory intp print Console Msg formatter get String CONSOLE FREE MEMORY BEFORE GARBAGE COLLECTION MESSAGE NON NLS 1 intp println String value Of before intp print Console Msg formatter get String CONSOLE FREE MEMORY AFTER GARBAGE COLLECTION MESSAGE NON NLS 1 intp println String value Of after intp print Console Msg formatter get String CONSOLE MEMORY GAINED WITH GARBAGE COLLECTION MESSAGE NON NLS 1 intp println String value Of after before  CommandInterpreter _gc CommandInterpreter getRuntime freeMemory runFinalization InterruptedException getRuntime freeMemory ConsoleMsg getString CONSOLE_FREE_MEMORY_BEFORE_GARBAGE_COLLECTION_MESSAGE valueOf ConsoleMsg getString CONSOLE_FREE_MEMORY_AFTER_GARBAGE_COLLECTION_MESSAGE valueOf ConsoleMsg getString CONSOLE_MEMORY_GAINED_WITH_GARBAGE_COLLECTION_MESSAGE valueOf
Handle the init command Uninstall all bundles param intp A Command Interpreter object containing the command and it s arguments public void  init Command Interpreter intp throws Exception if osgi is Active intp print newline intp println Console Msg formatter get String CONSOLE FRAMEWORK LAUNCHED PLEASE SHUTDOWN MESSAGE NON NLS 1 return Abstract Bundle bundles Abstract Bundle context get Bundles int size bundles length if size 0 for int i 0 i size i Abstract Bundle bundle bundles i if bundle get Bundle Id 0 try bundle uninstall catch Bundle Exception e intp print Stack Trace e else intp println Console Msg formatter get String CONSOLE NO INSTALLED BUNDLES ERROR NON NLS 1  CommandInterpreter _init CommandInterpreter isActive ConsoleMsg getString CONSOLE_FRAMEWORK_LAUNCHED_PLEASE_SHUTDOWN_MESSAGE AbstractBundle AbstractBundle getBundles AbstractBundle getBundleId BundleException printStackTrace ConsoleMsg getString CONSOLE_NO_INSTALLED_BUNDLES_ERROR
Handle the close command Shutdown and exit param intp A Command Interpreter object containing the command and it s arguments public void  close Command Interpreter intp throws Exception intp println osgi close System exit 0  CommandInterpreter _close CommandInterpreter
Handle the refresh command s abbreviation Invoke  refresh param intp A Command Interpreter object containing the command and it s arguments public void  r Command Interpreter intp throws Exception  refresh intp  _refresh CommandInterpreter _r CommandInterpreter _refresh
Handle the refresh command Refresh the packages of the specified bundles param intp A Command Interpreter object containing the command and it s arguments public void  refresh Command Interpreter intp throws Exception org osgi framework Service Reference package Admin Ref context get Service Reference org osgi service packageadmin Package Admin NON NLS 1 if package Admin Ref null org osgi service packageadmin Package Admin package Admin org osgi service packageadmin Package Admin context get Service package Admin Ref if package Admin null try Abstract Bundle refresh null String token intp next Argument if token null Vector bundles new Vector while token null Abstract Bundle bundle get Bundle From Token intp token true if bundle null bundles add Element bundle token intp next Argument int size bundles size if size 0 intp println Console Msg formatter get String CONSOLE INVALID BUNDLE SPECIFICATION ERROR NON NLS 1 return refresh new Abstract Bundle size bundles copy Into refresh package Admin refresh Packages refresh finally context unget Service package Admin Ref else intp println Console Msg formatter get String CONSOLE CAN NOT REFRESH NO PACKAGE ADMIN ERROR NON NLS 1  CommandInterpreter _refresh CommandInterpreter ServiceReference packageAdminRef getServiceReference PackageAdmin packageAdminRef PackageAdmin packageAdmin PackageAdmin getService packageAdminRef packageAdmin AbstractBundle nextArgument AbstractBundle getBundleFromToken addElement nextArgument ConsoleMsg getString CONSOLE_INVALID_BUNDLE_SPECIFICATION_ERROR AbstractBundle copyInto packageAdmin refreshPackages ungetService packageAdminRef ConsoleMsg getString CONSOLE_CAN_NOT_REFRESH_NO_PACKAGE_ADMIN_ERROR
Executes the given system command in a separate system process and waits for it to finish param intp A Command Interpreter object containing the command and it s arguments public void  exec Command Interpreter intp throws Exception String command intp next Argument if command null intp println Console Msg formatter get String CONSOLE NO COMMAND SPECIFIED ERROR NON NLS 1 return Process p Runtime get Runtime exec command intp println Console Msg formatter get String CONSOLE STARTED IN MESSAGE command String value Of p NON NLS 1 int result p wait For intp println Console Msg formatter get String CONSOLE EXECUTED RESULT CODE MESSAGE command String value Of result NON NLS 1  CommandInterpreter _exec CommandInterpreter nextArgument ConsoleMsg getString CONSOLE_NO_COMMAND_SPECIFIED_ERROR getRuntime ConsoleMsg getString CONSOLE_STARTED_IN_MESSAGE valueOf waitFor ConsoleMsg getString CONSOLE_EXECUTED_RESULT_CODE_MESSAGE valueOf
Executes the given system command in a separate system process It does not wait for a result param intp A Command Interpreter object containing the command and it s arguments public void  fork Command Interpreter intp throws Exception String command intp next Argument if command null intp println Console Msg formatter get String CONSOLE NO COMMAND SPECIFIED ERROR NON NLS 1 return Process p Runtime get Runtime exec command intp println Console Msg formatter get String CONSOLE STARTED IN MESSAGE command String value Of p NON NLS 1  CommandInterpreter _fork CommandInterpreter nextArgument ConsoleMsg getString CONSOLE_NO_COMMAND_SPECIFIED_ERROR getRuntime ConsoleMsg getString CONSOLE_STARTED_IN_MESSAGE valueOf
Handle the headers command s abbreviation Invoke  headers param intp A Command Interpreter object containing the command and it s arguments public void  h Command Interpreter intp throws Exception  headers intp  _headers CommandInterpreter _h CommandInterpreter _headers
Handle the headers command Display headers for the specified bundle s param intp A Command Interpreter object containing the command and it s arguments public void  headers Command Interpreter intp throws Exception String next Arg intp next Argument if next Arg null intp println Console Msg formatter get String CONSOLE NO BUNDLE SPECIFIED ERROR NON NLS 1 while next Arg null Abstract Bundle bundle get Bundle From Token intp next Arg true if bundle null intp print Dictionary bundle get Headers Console Msg formatter get String CONSOLE BUNDLE HEADERS TITLE NON NLS 1 next Arg intp next Argument  CommandInterpreter _headers CommandInterpreter nextArg nextArgument nextArg ConsoleMsg getString CONSOLE_NO_BUNDLE_SPECIFIED_ERROR nextArg AbstractBundle getBundleFromToken nextArg printDictionary getHeaders ConsoleMsg getString CONSOLE_BUNDLE_HEADERS_TITLE nextArg nextArgument
Handles the props command s abbreviation Invokes  props param intp A Command Interpreter object containing the command and it s arguments public void  pr Command Interpreter intp throws Exception  props intp  _props CommandInterpreter _pr CommandInterpreter _props
Handles the  props command Prints the system properties sorted param intp A Command Interpreter object containing the command and it s arguments public void  props Command Interpreter intp throws Exception intp print Dictionary System get Properties Console Msg formatter get String CONSOLE SYSTEM PROPERTIES TITLE NON NLS 1  _props CommandInterpreter _props CommandInterpreter printDictionary getProperties ConsoleMsg getString CONSOLE_SYSTEM_PROPERTIES_TITLE
Handles the setprop command s abbreviation Invokes  setprop param intp A Command Interpreter object containing the command and it s arguments public void  setp Command Interpreter intp throws Exception  setprop intp  _setprop CommandInterpreter _setp CommandInterpreter _setprop
Handles the setprop command Sets the CDS property in the given argument param intp A Command Interpreter object containing the command and it s arguments public void  setprop Command Interpreter intp throws Exception String argument intp next Argument if argument null intp println Console Msg formatter get String CONSOLE NO PARAMETERS SPECIFIED TITLE NON NLS 1  props intp else Input Stream in new Byte Array Input Stream argument get Bytes try Properties sysprops System get Properties Properties newprops new Properties newprops load in intp println Console Msg formatter get String CONSOLE SETTING PROPERTIES TITLE NON NLS 1 Enumeration keys newprops property Names while keys has More Elements String key String keys next Element String value String newprops get key sysprops put key value intp println tab key value NON NLS 1 catch IO Exception e finally try in close catch IO Exception e  CommandInterpreter _setprop CommandInterpreter nextArgument ConsoleMsg getString CONSOLE_NO_PARAMETERS_SPECIFIED_TITLE _props InputStream ByteArrayInputStream getBytes getProperties ConsoleMsg getString CONSOLE_SETTING_PROPERTIES_TITLE propertyNames hasMoreElements nextElement IOException IOException
Prints the short version of the status For the long version use status param intp A Command Interpreter object containing the command and it s arguments public void  ss Command Interpreter intp throws Exception if osgi is Active intp println intp println Console Msg formatter get String CONSOLE FRAMEWORK IS LAUNCHED MESSAGE NON NLS 1 else intp println intp println Console Msg formatter get String CONSOLE FRAMEWORK IS SHUTDOWN MESSAGE NON NLS 1 Abstract Bundle bundles Abstract Bundle context get Bundles if bundles length 0 intp println Console Msg formatter get String CONSOLE NO INSTALLED BUNDLES ERROR NON NLS 1 else intp print newline intp print Console Msg formatter get String CONSOLE ID NON NLS 1 intp print tab intp print Console Msg formatter get String CONSOLE TYPE NON NLS 1 intp print tab intp println Console Msg formatter get String CONSOLE STATE BUNDLE TITLE NON NLS 1 for int i 0 i bundles length i Abstract Bundle b Abstract Bundle bundles i String type NON NLS 1 TODO need to determine the type intp println b get Bundle Id t type t get State Name b get State b NON NLS 1 NON NLS 2 if b is Fragment Abstract Bundle master Abstract Bundle b get Host if master null intp println t t Master master get Bundle Id NON NLS 1 else Abstract Bundle fragment org osgi framework Bundle fragments b get Fragments if fragments null for int f 0 f fragments length f fragment Abstract Bundle fragments f intp println t t Fragment fragment get Bundle Id NON NLS 1  CommandInterpreter _ss CommandInterpreter isActive ConsoleMsg getString CONSOLE_FRAMEWORK_IS_LAUNCHED_MESSAGE ConsoleMsg getString CONSOLE_FRAMEWORK_IS_SHUTDOWN_MESSAGE AbstractBundle AbstractBundle getBundles ConsoleMsg getString CONSOLE_NO_INSTALLED_BUNDLES_ERROR ConsoleMsg getString CONSOLE_ID ConsoleMsg getString CONSOLE_TYPE ConsoleMsg getString CONSOLE_STATE_BUNDLE_TITLE AbstractBundle AbstractBundle getBundleId getStateName getState isFragment AbstractBundle AbstractBundle getHost tMaster getBundleId AbstractBundle getFragments AbstractBundle tFragment getBundleId
Handles the threads command abbreviation Invokes  threads param intp A Command Interpreter object containing the command and it s arguments public void  t Command Interpreter intp throws Exception  threads intp  _threads CommandInterpreter _t CommandInterpreter _threads
Prints the information about the currently running threads in the embedded system param intp A Command Interpreter object containing the command and it s arguments public void  threads Command Interpreter intp throws Exception Thread Group thread Groups get Thread Groups Util sort thread Groups Thread Group tg get Top Thread Group Thread threads new Thread tg active Count int count tg enumerate threads true Util sort threads String Buffer sb new String Buffer 120 intp println intp println Console Msg formatter get String CONSOLE THREADGROUP TITLE NON NLS 1 for int i 0 i thread Groups length i tg thread Groups i int all tg active Count tg all Threads Count int local tg enumerate new Thread all false tg threads Count Thread Group p tg get Parent String parent p null none p get Name NON NLS 1 sb set Length 0 sb append Util to String simple Class Name tg 18 append append Util to String tg get Name 21 append append Util to String parent 16 append Util to String new Integer tg get Max Priority 3 append Util to String new Integer local 4 append append Util to String String value Of all 6 NON NLS 1 NON NLS 2 NON NLS 3 intp println sb to String intp print newline intp println Console Msg formatter get String CONSOLE THREADTYPE TITLE NON NLS 1 for int j 0 j count j Thread t threads j if t null sb set Length 0 sb append Util to String simple Class Name t 18 append append Util to String t get Name 21 append append Util to String t get Thread Group get Name 16 append Util to String new Integer t get Priority 3 NON NLS 1 NON NLS 2 intp println sb to String  CommandInterpreter _threads CommandInterpreter ThreadGroup threadGroups getThreadGroups threadGroups ThreadGroup getTopThreadGroup activeCount StringBuffer StringBuffer ConsoleMsg getString CONSOLE_THREADGROUP_TITLE threadGroups threadGroups activeCount allThreadsCount threadsCount ThreadGroup getParent getName setLength toString simpleClassName toString getName toString toString getMaxPriority toString toString valueOf toString ConsoleMsg getString CONSOLE_THREADTYPE_TITLE setLength toString simpleClassName toString getName toString getThreadGroup getName toString getPriority toString
Handles the sl startlevel command param intp A Command Interpreter object containing the command and it s arguments public void  sl Command Interpreter intp throws Exception if is Start Level Svc Present intp org osgi framework Bundle bundle null String token intp next Argument int value 0 if token null bundle get Bundle From Token intp token true if bundle null return if bundle null must want framework startlevel value sl Impl get Start Level intp println Console Msg formatter get String STARTLEVEL FRAMEWORK ACTIVE STARTLEVEL value NON NLS 1 else must want bundle startlevel value sl Impl get Bundle Start Level bundle intp println Console Msg formatter get String STARTLEVEL BUNDLE STARTLEVEL new Long bundle get Bundle Id new Integer value NON NLS 1  CommandInterpreter _sl CommandInterpreter isStartLevelSvcPresent nextArgument getBundleFromToken slImpl getStartLevel ConsoleMsg getString STARTLEVEL_FRAMEWORK_ACTIVE_STARTLEVEL slImpl getBundleStartLevel ConsoleMsg getString STARTLEVEL_BUNDLE_STARTLEVEL getBundleId
Handles the setfwsl set framework startlevel command param intp A Command Interpreter object containing the command and it s arguments public void  setfwsl Command Interpreter intp throws Exception if is Start Level Svc Present intp int value 0 String token intp next Argument if token null intp println Console Msg formatter get String STARTLEVEL NO STARTLEVEL GIVEN NON NLS 1 value sl Impl get Start Level intp println Console Msg formatter get String STARTLEVEL FRAMEWORK ACTIVE STARTLEVEL value NON NLS 1 else value this get Start Level From Token intp token if value 0 try sl Impl set Start Level value intp println Console Msg formatter get String STARTLEVEL FRAMEWORK ACTIVE STARTLEVEL value NON NLS 1 catch Illegal Argument Exception e intp println e get Message  CommandInterpreter _setfwsl CommandInterpreter isStartLevelSvcPresent nextArgument ConsoleMsg getString STARTLEVEL_NO_STARTLEVEL_GIVEN slImpl getStartLevel ConsoleMsg getString STARTLEVEL_FRAMEWORK_ACTIVE_STARTLEVEL getStartLevelFromToken slImpl setStartLevel ConsoleMsg getString STARTLEVEL_FRAMEWORK_ACTIVE_STARTLEVEL IllegalArgumentException getMessage
Handles the setbsl set bundle startlevel command param intp A Command Interpreter object containing the command and it s arguments public void  setbsl Command Interpreter intp throws Exception if is Start Level Svc Present intp String token Abstract Bundle bundle null token intp next Argument if token null intp println Console Msg formatter get String STARTLEVEL NO STARTLEVEL OR BUNDLE GIVEN NON NLS 1 return int newSL this get Start Level From Token intp token token intp next Argument if token null intp println Console Msg formatter get String STARTLEVEL NO STARTLEVEL OR BUNDLE GIVEN NON NLS 1 return while token null bundle get Bundle From Token intp token true if bundle null try sl Impl set Bundle Start Level bundle newSL intp println Console Msg formatter get String STARTLEVEL BUNDLE STARTLEVEL new Long bundle get Bundle Id new Integer newSL NON NLS 1 catch Illegal Argument Exception e intp println e get Message token intp next Argument  CommandInterpreter _setbsl CommandInterpreter isStartLevelSvcPresent AbstractBundle nextArgument ConsoleMsg getString STARTLEVEL_NO_STARTLEVEL_OR_BUNDLE_GIVEN getStartLevelFromToken nextArgument ConsoleMsg getString STARTLEVEL_NO_STARTLEVEL_OR_BUNDLE_GIVEN getBundleFromToken slImpl setBundleStartLevel ConsoleMsg getString STARTLEVEL_BUNDLE_STARTLEVEL getBundleId IllegalArgumentException getMessage nextArgument
Handles the setibsl set initial bundle startlevel command param intp A Command Interpreter object containing the command and it s arguments public void  setibsl Command Interpreter intp throws Exception if is Start Level Svc Present intp int value 0 String token intp next Argument if token null intp println Console Msg formatter get String STARTLEVEL NO STARTLEVEL GIVEN NON NLS 1 value sl Impl get Initial Bundle Start Level intp println Console Msg formatter get String STARTLEVEL INITIAL BUNDLE STARTLEVEL value NON NLS 1 else value this get Start Level From Token intp token if value 0 try sl Impl set Initial Bundle Start Level value intp println Console Msg formatter get String STARTLEVEL INITIAL BUNDLE STARTLEVEL value NON NLS 1 catch Illegal Argument Exception e intp println e get Message  CommandInterpreter _setibsl CommandInterpreter isStartLevelSvcPresent nextArgument ConsoleMsg getString STARTLEVEL_NO_STARTLEVEL_GIVEN slImpl getInitialBundleStartLevel ConsoleMsg getString STARTLEVEL_INITIAL_BUNDLE_STARTLEVEL getStartLevelFromToken slImpl setInitialBundleStartLevel ConsoleMsg getString STARTLEVEL_INITIAL_BUNDLE_STARTLEVEL IllegalArgumentException getMessage
public void  classSpaces Command Interpreter intp String token intp next Argument org osgi framework Service Reference package Admin Ref context get Service Reference org osgi service packageadmin Package Admin NON NLS 1 if package Admin Ref null org osgi service packageadmin Package Admin package Admin org osgi service packageadmin Package Admin context get Service package Admin Ref if package Admin null try org osgi service packageadmin Providing Bundle sym Bundles null sym Bundles package Admin get Providing Bundles token if sym Bundles null intp println Console Msg formatter get String CONSOLE NO NAMED CLASS SPACES MESSAGE NON NLS 1 else for int i 0 i sym Bundles length i org osgi service packageadmin Providing Bundle sym Bundle sym Bundles i intp print sym Bundle boolean removal Pending sym Bundle is Removal Pending if removal Pending intp print NON NLS 1 intp print Console Msg formatter get String CONSOLE REMOVAL PENDING MESSAGE NON NLS 1 intp println NON NLS 1 org osgi framework Bundle provider sym Bundle get Bundle if provider null intp print NON NLS 1 intp print provider intp println NON NLS 1 org osgi framework Bundle requiring sym Bundle get Requiring Bundles if requiring null for int j 0 j requiring length j intp print NON NLS 1 intp print requiring j intp print NON NLS 1 intp println Console Msg formatter get String CONSOLE REQUIRES MESSAGE NON NLS 1 else intp print NON NLS 1 intp print Console Msg formatter get String CONSOLE STALE MESSAGE NON NLS 1 intp println NON NLS 1 finally context unget Service package Admin Ref else intp println Console Msg formatter get String CONSOLE NO EXPORTED PACKAGES NO PACKAGE ADMIN MESSAGE NON NLS 1  _classSpaces CommandInterpreter nextArgument ServiceReference packageAdminRef getServiceReference PackageAdmin packageAdminRef PackageAdmin packageAdmin PackageAdmin getService packageAdminRef packageAdmin ProvidingBundle symBundles symBundles packageAdmin getProvidingBundles symBundles ConsoleMsg getString CONSOLE_NO_NAMED_CLASS_SPACES_MESSAGE symBundles ProvidingBundle symBundle symBundles symBundle removalPending symBundle isRemovalPending removalPending ConsoleMsg getString CONSOLE_REMOVAL_PENDING_MESSAGE symBundle getBundle symBundle getRequiringBundles ConsoleMsg getString CONSOLE_REQUIRES_MESSAGE ConsoleMsg getString CONSOLE_STALE_MESSAGE ungetService packageAdminRef ConsoleMsg getString CONSOLE_NO_EXPORTED_PACKAGES_NO_PACKAGE_ADMIN_MESSAGE
Checks for the presence of the Start Level Service Outputs a message if it is not present param intp The Command Interpreter object to be used to write to the console return true or false if service is present or not protected boolean is Start Level Svc Present Command Interpreter intp boolean retval false org osgi framework Service Reference sl Svc Ref context get Service Reference org osgi service startlevel Start Level NON NLS 1 if sl Svc Ref null org osgi service startlevel Start Level sl Svc org osgi service startlevel Start Level context get Service sl Svc Ref if sl Svc null retval true else intp println Console Msg formatter get String CONSOLE CAN NOT USE STARTLEVEL NO STARTLEVEL SVC ERROR NON NLS 1 return retval  StartLevel CommandInterpreter isStartLevelSvcPresent CommandInterpreter ServiceReference slSvcRef getServiceReference StartLevel slSvcRef StartLevel slSvc StartLevel getService slSvcRef slSvc ConsoleMsg getString CONSOLE_CAN_NOT_USE_STARTLEVEL_NO_STARTLEVEL_SVC_ERROR
Given a number retrieve the Bundle object with that id param intp The Command Interpreter param token A string containing a potential bundle it param error A boolean indicating whether or not to output a message return The requested Bundle object protected Abstract Bundle get Bundle From Token Command Interpreter intp String token boolean error Abstract Bundle bundle try long id Long parse Long token bundle Abstract Bundle context get Bundle id catch Number Format Exception nfe bundle Bundle Context Impl context get Bundle By Location token if bundle null error intp println Console Msg formatter get String CONSOLE CANNOT FIND BUNDLE ERROR token NON NLS 1 return bundle  CommandInterpreter AbstractBundle getBundleFromToken CommandInterpreter AbstractBundle parseLong AbstractBundle getBundle NumberFormatException BundleContextImpl getBundleByLocation ConsoleMsg getString CONSOLE_CANNOT_FIND_BUNDLE_ERROR
Given a string containing a startlevel value validate it and convert it to an int param intp A Command Interpreter object used for printing out error messages param value A string containing a potential startlevel return The start level or an int 0 if it was invalid protected int get Start Level From Token Command Interpreter intp String value int retval 1 try retval Integer parse Int value if Integer parse Int value 0 intp println Console Msg formatter get String STARTLEVEL POSITIVE INTEGER NON NLS 1 catch Number Format Exception nfe intp println Console Msg formatter get String STARTLEVEL POSITIVE INTEGER NON NLS 1 return retval  CommandInterpreter getStartLevelFromToken CommandInterpreter parseInt parseInt ConsoleMsg getString STARTLEVEL_POSITIVE_INTEGER NumberFormatException ConsoleMsg getString STARTLEVEL_POSITIVE_INTEGER
Given a state value return the string describing that state param state An int containing a state value return A String describing the state protected String get State Name int state switch state case Abstract Bundle UNINSTALLED return Console Msg formatter get String CONSOLE UNINSTALLED MESSAGE NON NLS 1 case Abstract Bundle INSTALLED return Console Msg formatter get String CONSOLE INSTALLED MESSAGE NON NLS 1 case Abstract Bundle RESOLVED return Console Msg formatter get String CONSOLE RESOLVED MESSAGE NON NLS 1 case Abstract Bundle STARTING return Console Msg formatter get String CONSOLE STARTING MESSAGE NON NLS 1 case Abstract Bundle STOPPING return Console Msg formatter get String CONSOLE STOPPING MESSAGE NON NLS 1 case Abstract Bundle ACTIVE return Console Msg formatter get String CONSOLE ACTIVE MESSAGE NON NLS 1 default return Integer to Hex String state  getStateName AbstractBundle ConsoleMsg getString CONSOLE_UNINSTALLED_MESSAGE AbstractBundle ConsoleMsg getString CONSOLE_INSTALLED_MESSAGE AbstractBundle ConsoleMsg getString CONSOLE_RESOLVED_MESSAGE AbstractBundle ConsoleMsg getString CONSOLE_STARTING_MESSAGE AbstractBundle ConsoleMsg getString CONSOLE_STOPPING_MESSAGE AbstractBundle ConsoleMsg getString CONSOLE_ACTIVE_MESSAGE toHexString
Answers all thread groups in the system return An array of all thread groups protected Thread Group get Thread Groups Thread Group tg get Top Thread Group Thread Group groups new Thread Group tg active Group Count int count tg enumerate groups true if count groups length return groups get rid of null entries Thread Group ngroups new Thread Group count System arraycopy groups 0 ngroups 0 count return ngroups  returnAn ThreadGroup getThreadGroups ThreadGroup getTopThreadGroup ThreadGroup ThreadGroup activeGroupCount ThreadGroup ThreadGroup
Answers the top level group of the current thread p It is the system or main thread group under which all user thread groups are allocated return The parent of all user thread groups protected Thread Group get Top Thread Group Thread Group top Group Thread current Thread get Thread Group if top Group null while top Group get Parent null top Group top Group get Parent return top Group  returnThe ThreadGroup getTopThreadGroup ThreadGroup topGroup currentThread getThreadGroup topGroup topGroup getParent topGroup topGroup getParent topGroup
Returns the simple class name of an object param o The object for which a class name is requested return The simple class name public String simple Class Name Object o java util String Tokenizer t new java util String Tokenizer o get Class get Name NON NLS 1 int ct t count Tokens for int i 1 i ct i t next Token return t next Token  returnThe simpleClassName StringTokenizer StringTokenizer getClass getName countTokens nextToken nextToken

Constructor for Framework Console It creates a service tracker to track Command Provider registrations The console Input Stream is set to System in and the console Print Stream is set to System out param osgi an instance of an osgi framework param args any arguments passed on the command line when Launcher is started public Framework Console OS Gi osgi String args get Default Streams this args args this osgi osgi initialize  FrameworkConsole CommandProvider InputStream PrintStream FrameworkConsole OSGi getDefaultStreams
Constructor for Framework Console It creates a service tracker to track Command Provider registrations The console Input Stream is set to System in and the console Print Stream is set to System out param osgi an instance of an osgi framework param args any arguments passed on the command line when Launcher is started public Framework Console OS Gi osgi int port String args get Socket Stream port this use Socket Stream true this port port this args args this osgi osgi initialize  FrameworkConsole CommandProvider InputStream PrintStream FrameworkConsole OSGi getSocketStream useSocketStream
Open streams for system in and system out private void get Default Streams in create Buffered Reader System in out create Print Writer System out  getDefaultStreams createBufferedReader createPrintWriter
Open a socket and create input and output streams param port number to listen on private void get Socket Stream int port try System out println Console Msg formatter get String CONSOLE LISTENING ON PORT port NON NLS 1 if ss null ss new Server Socket port scsg new Console Socket Getter ss scsg set Accept Connections true s scsg get Socket in create Buffered Reader s get Input Stream out create Print Writer s get Output Stream catch Unknown Host Exception uhe uhe print Stack Trace catch Exception e e print Stack Trace  getSocketStream ConsoleMsg getString CONSOLE_LISTENING_ON_PORT ServerSocket ConsoleSocketGetter setAcceptConnections getSocket createBufferedReader getInputStream createPrintWriter getOutputStream UnknownHostException printStackTrace printStackTrace
Return a Buffered Reader from an Input Stream Handle encoding param  in An Input Stream to wrap with a Buffered Reader return a Buffered Reader private Buffered Reader create Buffered Reader Input Stream  in Buffered Reader reader try reader new Buffered Reader new Input Stream Reader  in encoding catch Unsupported Encoding Exception uee if the encoding is not supported by the jvm punt and use whatever encodiing there is reader new Buffered Reader new Input Stream Reader  in return reader  BufferedReader InputStream _in InputStream BufferedReader BufferedReader BufferedReader createBufferedReader InputStream _in BufferedReader BufferedReader InputStreamReader _in UnsupportedEncodingException BufferedReader InputStreamReader _in
Return a Print Writer from an Output Stream Handle encoding param  out An Output Stream to wrap with a Print Writer return a Print Writer private Print Writer create Print Writer Output Stream  out Print Writer writer try writer new Print Writer new Buffered Writer new Output Stream Writer  out encoding true catch Unsupported Encoding Exception uee if the encoding is not supported by the jvm punt and use whatever encodiing there is writer new Print Writer new Buffered Writer new Output Stream Writer  out true return writer  PrintWriter OutputStream _out OutputStream PrintWriter PrintWriter PrintWriter createPrintWriter OutputStream _out PrintWriter PrintWriter BufferedWriter OutputStreamWriter _out UnsupportedEncodingException PrintWriter BufferedWriter OutputStreamWriter _out
Return the current output Print Writer return The currently active Print Writer public Print Writer get Writer return out  PrintWriter PrintWriter PrintWriter getWriter
Return the current input Buffered Reader return The currently active Buffered Reader public Buffered Reader get Reader return Buffered Reader in  BufferedReader BufferedReader BufferedReader getReader BufferedReader
Return if the Socket Steam telnet to the console is being used return Return if the Socket Steam is being used public boolean get Use Socket Stream return use Socket Stream  SocketSteam SocketSteam getUseSocketStream useSocketStream
Initialize common things system bundle context Service Tracker to track Command Provider registrations create OS Gi Command Provider object private void initialize context osgi get Bundle Context set up a service tracker to track Command Provider registrations cptracker new Command Provider Tracker context Command Provider class get Name this cptracker open register the OS Gi command provider osgicp new Framework Command Provider osgi  ServiceTracker CommandProvider OSGi CommandProvider getBundleContext CommandProvider CommandProviderTracker CommandProvider getName OSGi FrameworkCommandProvider
Begin doing the active part of the class code Starts up the console public void run try console args if use Socket Stream while true get Socket Stream port console catch IO Exception e e print Stack Trace out  useSocketStream getSocketStream IOException printStackTrace
Command Line Interface for OS Gi The method processes the initial commands and then reads and processes commands from the console Input Stream Command output is written to the console Print Stream The method will loop reading commands from the console Input Stream until end of file is reached This method will then return param args Initial set of commands to execute throws IO Exception public void console String args throws IO Exception first handle any args passed in from launch if args null for int i 0 i args length i docommand args i console  OSGi InputStream PrintStream InputStream IOException IOException
Command Line Interface for OS Gi The method processes the initial commands and then reads and processes commands from the console Input Stream Command output is written to the console Print Stream The method will loop reading commands from the console Input Stream until end of file is reached This method will then return throws IO Exception protected void console throws IO Exception Object lock new Object disconnect false wait to receive commands from console and handle them Buffered Reader br Buffered Reader in cache the console prompt String String console Prompt r n Console Msg formatter get String CONSOLE PROMPT NON NLS 1 NON NLS 2 while disconnect out print console Prompt out flush avoid waiting on input stream apparently generates contention with other native calls String cmdline null try synchronized lock while br ready lock wait 300 cmdline br read Line catch Interrupted Exception e do nothing probably got disconnected finally if cmdline null break docommand cmdline  OSGi InputStream PrintStream InputStream IOException IOException BufferedReader BufferedReader consolePrompt ConsoleMsg getString CONSOLE_PROMPT consolePrompt readLine InterruptedException
Process the args on the command line This method invokes a Command Interpreter to do the actual work param cmdline a string containing the command line arguments protected void docommand String cmdline if cmdline null cmdline length 0 Command Interpreter intcp new Framework Command Interpreter cmdline cptracker get Services this String command intcp next Argument if command null intcp execute command  CommandInterpreter CommandInterpreter FrameworkCommandInterpreter getServices nextArgument
Disconnects from console if use Socket Stream is set to true This will cause the console to close from a telnet session void disconnect throws IO Exception disconnect true out close in close s close  useSocketStream IOException
Reads a string from standard input until user hits the Enter key return The string read from the standard input without the newline character public String get Input String input try The buffered input reader on standard in input Buffered Reader in read Line catch IO Exception e input NON NLS 1 return input  returnThe getInput BufferedReader readLine IOException
Constructor sets the server and starts the thread to listen for connections param server a Server Socket to accept connections from Console Socket Getter Server Socket server this server server Thread t new Thread this Console Socket Getter NON NLS 1 t start  ServerSocket ConsoleSocketGetter ServerSocket ConsoleSocketGetter
public void run while true try socket ss accept if accept Connections Print Writer o create Print Writer socket get Output Stream o println Console Msg formatter get String CONSOLE TELNET CONNECTION REFUSED NON NLS 1 o println Console Msg formatter get String CONSOLE TELNET CURRENTLY USED NON NLS 1 o println Console Msg formatter get String CONSOLE TELNET ONE CLIENT ONLY NON NLS 1 o close socket close else synchronized lock lock notify catch Exception e e print Stack Trace  acceptConnections PrintWriter createPrintWriter getOutputStream ConsoleMsg getString CONSOLE_TELNET_CONNECTION_REFUSED ConsoleMsg getString CONSOLE_TELNET_CURRENTLY_USED ConsoleMsg getString CONSOLE_TELNET_ONE_CLIENT_ONLY printStackTrace
Method to get a socket connection from a client return Socket from a connected client public Socket get Socket throws Interrupted Exception wait for a socket to get assigned from the accepter thread synchronized lock lock wait set Accept Connections false return socket  getSocket InterruptedException setAcceptConnections
Method to indicate if connections are accepted or not If set to false then the clients will be notified that connections are not accepted public void set Accept Connections boolean accept Connections this accept Connections accept Connections  setAcceptConnections acceptConnections acceptConnections acceptConnections
Framework Console con Command Provider Tracker org osgi framework Bundle Context context String clazz Framework Console con super context clazz null this con con  FrameworkConsole CommandProviderTracker BundleContext FrameworkConsole
Default implementation of the tt Service Tracker Customizer adding Service tt method p This method is only called when this tt Service Tracker tt object has been constructed with a tt null tt tt Service Tracker Customizer tt argument The default implementation returns the result of calling tt get Service tt on the tt Bundle Context tt object with which this tt Service Tracker tt object was created passing the specified tt Service Reference tt object p This method can be overridden to customize the service object to be tracked for the service being added param reference Reference to service being added to this tt Service Tracker tt object return The service object to be tracked for the service added to this tt Service Tracker tt object public Object adding Service Service Reference reference Command Provider cp Command Provider super adding Service reference return cp  ServiceTrackerCustomizer addingService ServiceTracker ServiceTrackerCustomizer getService BundleContext ServiceTracker ServiceReference ServiceTracker ServiceTracker addingService ServiceReference CommandProvider CommandProvider addingService
Return an array of service objects for all services being tracked by this tt Service Tracker tt object The array is sorted primarily by descending Service Ranking and secondarily by ascending Service ID return Array of service objects or tt null tt if no service are being tracked public Object get Services Service Reference service Refs Service Reference super get Service References Util dsort service Refs 0 service Refs length Object service Objects new Object service Refs length for int i 0 i service Refs length i service Objects i Framework Console this context get Service service Refs i return service Objects  ServiceTracker getServices ServiceReference serviceRefs ServiceReference getServiceReferences serviceRefs serviceRefs serviceObjects serviceRefs serviceRefs serviceObjects FrameworkConsole getService serviceRefs serviceObjects

public interface Keyed Element public int get Key Hash Code  KeyedElement getKeyHashCode
public int get Key Hash Code public boolean compare Keyed Element other  getKeyHashCode KeyedElement
public boolean compare Keyed Element other public Object get Key  KeyedElement getKey

private int capacity public Keyed Hash Set this MINIMUM SIZE true  KeyedHashSet MINIMUM_SIZE
public Keyed Hash Set boolean replace this MINIMUM SIZE replace  KeyedHashSet MINIMUM_SIZE
public Keyed Hash Set int capacity this capacity true  KeyedHashSet
public Keyed Hash Set int capacity boolean replace elements new Keyed Element Math max MINIMUM SIZE capacity 2 this replace replace this capacity capacity  KeyedHashSet KeyedElement MINIMUM_SIZE
public Keyed Hash Set Keyed Hash Set original elements new Keyed Element original elements length System arraycopy original elements 0 elements 0 original elements length element Count original element Count replace original replace capacity original capacity  KeyedHashSet KeyedHashSet KeyedElement elementCount elementCount
Adds an element to this set If an element with the same key already exists replaces it depending on the replace flag return true if the element was added stored false otherwise public boolean add Keyed Element element int hash hash element search for an empty slot at the end of the array for int i hash i elements length i if elements i null elements i element element Count grow if necessary if should Grow expand return true if elements i compare element if replace elements i element return true else return false search for an empty slot at the beginning of the array for int i 0 i hash 1 i if elements i null elements i element element Count grow if necessary if should Grow expand return true if elements i compare element if replace elements i element return true else return false if we didn t find a free slot then try again with the expanded set expand return add element  KeyedElement elementCount shouldGrow elementCount shouldGrow
public void add All Keyed Element elements for int i 0 i elements length i add elements i  addAll KeyedElement
public boolean contains Keyed Element element return get element null  KeyedElement
public boolean contains Key Object key return get By Key key null  containsKey getByKey
public Keyed Element elements return Keyed Element elements new Keyed Element element Count  KeyedElement KeyedElement KeyedElement elementCount
public Object elements Object result int j 0 for int i 0 i elements length i Keyed Element element elements i if element null result j element return result  KeyedElement
The array isn t large enough so double its size and rehash all its current values protected void expand Keyed Element old Elements elements elements new Keyed Element elements length 2 int max Array Index elements length 1 for int i 0 i old Elements length i Keyed Element element old Elements i if element null int hash hash element while elements hash null hash if hash max Array Index hash 0 elements hash element  KeyedElement oldElements KeyedElement maxArrayIndex oldElements KeyedElement oldElements maxArrayIndex
Returns the set element with the given id or null if not found public Keyed Element get By Key Object key if element Count 0 return null int hash key Hash key search the last half of the array for int i hash i elements length i Keyed Element element elements i if element null return null if element get Key equals key return element search the beginning of the array for int i 0 i hash 1 i Keyed Element element elements i if element null return null if element get Key equals key return element nothing found so return null return null  KeyedElement getByKey elementCount keyHash KeyedElement getKey KeyedElement getKey
Returns the set element with the given id or null if not found public Keyed Element get Keyed Element key if element Count 0 return null int hash hash key search the last half of the array for int i hash i elements length i Keyed Element element elements i if element null return null if element compare key return element search the beginning of the array for int i 0 i hash 1 i Keyed Element element elements i if element null return null if element compare key return element nothing found so return null return null  KeyedElement KeyedElement elementCount KeyedElement KeyedElement
public boolean is Empty return element Count 0  isEmpty elementCount
The element at the given index has been removed so move elements to keep the set properly hashed protected void rehash To int an Index int target an Index int index an Index 1 if index elements length index 0 Keyed Element element elements index while element null int hash Index hash element boolean match if index target match hash Index target hash Index index else match hash Index target hash Index index if match elements target element target index index if index elements length index 0 element elements index elements target null  rehashTo anIndex anIndex anIndex KeyedElement hashIndex hashIndex hashIndex hashIndex hashIndex
public boolean remove By Key Object key if element Count 0 return false int hash key Hash key for int i hash i elements length i Keyed Element element elements i if element null return false if element get Key equals key rehash To i element Count return true for int i 0 i hash 1 i Keyed Element element elements i if element null return false if element get Key equals key rehash To i element Count return true return true  removeByKey elementCount keyHash KeyedElement getKey rehashTo elementCount KeyedElement getKey rehashTo elementCount
public boolean remove Keyed Element to Remove if element Count 0 return false int hash hash to Remove for int i hash i elements length i Keyed Element element elements i if element null return false if element compare to Remove rehash To i element Count return true for int i 0 i hash 1 i Keyed Element element elements i if element null return false if element compare to Remove rehash To i element Count return true return false  KeyedElement toRemove elementCount toRemove KeyedElement toRemove rehashTo elementCount KeyedElement toRemove rehashTo elementCount
private int hash Keyed Element element return Math abs element get Key Hash Code elements length  KeyedElement getKeyHashCode
private int key Hash Object key return Math abs key hash Code elements length  keyHash hashCode
public void remove All Keyed Element elements for int i 0 i elements length i remove elements i  removeAll KeyedElement
private boolean should Grow return element Count elements length 0 75  shouldGrow elementCount
public int size return element Count  elementCount
public String to String String Buffer result new String Buffer 100 result append NON NLS 1 boolean first true for int i 0 i elements length i if elements i null if first first false else result append NON NLS 1 result append elements i result append NON NLS 1 return result to String  toString StringBuffer StringBuffer toString
public int count Collisions int result 0 int last Hash 0 boolean found false for int i 0 i elements length i Keyed Element element elements i if element null found false else int hash hash element if found if last Hash hash result else found false else last Hash hash found true return result  countCollisions lastHash KeyedElement lastHash lastHash
public Iterator iterator return new Keyed Hash Set Iterator  KeyedHashSetIterator
private int found public boolean has Next return found element Count  hasNext elementCount
public Object next if has Next throw new No Such Element Exception while current Index elements length if elements current Index null found return elements current Index this would mean we have less elements than we thought throw new No Such Element Exception  hasNext NoSuchElementException currentIndex currentIndex currentIndex NoSuchElementException
public void remove as allowed by the API throw new Unsupported Operation Exception  UnsupportedOperationException
public void clear elements new Keyed Element Math max MINIMUM SIZE capacity 2 element Count 0  KeyedElement MINIMUM_SIZE elementCount

private Hashtable cache new Hashtable 5 public Manifest Localization Abstract Bundle bundle Dictionary raw Headers this bundle bundle this raw Headers raw Headers  ManifestLocalization AbstractBundle rawHeaders rawHeaders rawHeaders
protected Dictionary get Headers String locale String boolean default Locale false if locale String NON NLS 1 return raw Headers if locale String equals Locale get Default to String if default Locale Headers null return default Locale Headers else default Locale true try bundle check Valid catch Illegal State Exception ex return raw Headers Resource Bundle locale Properties null locale Properties get Resource Bundle locale String if locale Properties null return raw Headers Enumeration e this raw Headers keys Headers locale Headers new Headers this raw Headers size while e has More Elements String key String e next Element String value String this raw Headers get key if value starts With value length 1 NON NLS 1 String properties Key value substring 1 try String trans Value String locale Properties get Object properties Key value trans Value catch Missing Resource Exception ex Do nothing just use the raw value locale Headers set key value if default Locale default Locale Headers locale Headers return locale Headers  getHeaders localeString defaultLocale localeString rawHeaders localeString getDefault toString defaultLocaleHeaders defaultLocaleHeaders defaultLocale checkValid IllegalStateException rawHeaders ResourceBundle localeProperties localeProperties getResourceBundle localeString localeProperties rawHeaders rawHeaders localeHeaders rawHeaders hasMoreElements nextElement rawHeaders startsWith propertiesKey transValue localeProperties getObject propertiesKey transValue MissingResourceException localeHeaders defaultLocale defaultLocaleHeaders localeHeaders localeHeaders
private String buildNL Variants String nl Array List result new Array List int last Separator while last Separator nl last Index Of   1 result add nl if last Separator 1 nl nl substring 0 last Separator result add nl always add the default locale string result add NON NLS 1 return String result to Array new String result size  buildNLVariants ArrayList ArrayList lastSeparator lastSeparator lastIndexOf _ lastSeparator lastSeparator toArray
protected Resource Bundle get Resource Bundle String locale String String properties Location String raw Headers get Constants BUNDLE LOCALIZATION if properties Location null properties Location Constants BUNDLE LOCALIZATION DEFAULT BASENAME Bundle Resource Bundle result Bundle Resource Bundle cache get locale String if result null return Resource Bundle result is Empty null result String nl Varients buildNL Variants locale String Bundle Resource Bundle parent null for int i nl Varients length 1 i 0 i Bundle Resource Bundle varient Bundle Bundle Resource Bundle cache get nl Varients i URL varientURL find Resource properties Location nl Varients i equals nl Varients i   nl Varients i properties NON NLS 1 NON NLS 2 if varientURL null Input Stream resource Stream null try resource Stream varientURL open Stream varient Bundle new Localization Resource Bundle resource Stream catch IO Exception e ignore and continue finally if resource Stream null try resource Stream close catch IO Exception e3 Ignore exception if varient Bundle null varient Bundle new Empty Resouce Bundle if parent null varient Bundle set Parent Resource Bundle parent cache put nl Varients i varient Bundle parent varient Bundle result Bundle Resource Bundle cache get locale String return Resource Bundle result is Empty null result  ResourceBundle getResourceBundle localeString propertiesLocation rawHeaders BUNDLE_LOCALIZATION propertiesLocation propertiesLocation BUNDLE_LOCALIZATION_DEFAULT_BASENAME BundleResourceBundle BundleResourceBundle localeString ResourceBundle isEmpty nlVarients buildNLVariants localeString BundleResourceBundle nlVarients BundleResourceBundle varientBundle BundleResourceBundle nlVarients findResource propertiesLocation nlVarients nlVarients _ nlVarients InputStream resourceStream resourceStream openStream varientBundle LocalizationResourceBundle resourceStream IOException resourceStream resourceStream IOException varientBundle varientBundle EmptyResouceBundle varientBundle setParent ResourceBundle nlVarients varientBundle varientBundle BundleResourceBundle localeString ResourceBundle isEmpty
private URL find Resource String resource if bundle is Resolved Abstract Bundle bundle Host if bundle is Fragment if the bundle is a fragment look in the host first bundle Host Abstract Bundle bundle get Host else if the bundle is not a fragment look in the bundle itself then the attached fragments bundle Host bundle return find In Resolved resource bundle Host else return find In Bundle resource bundle  findResource isResolved AbstractBundle bundleHost isFragment bundleHost AbstractBundle getHost bundleHost findInResolved bundleHost findInBundle
private URL find In Resolved String file Path Abstract Bundle bundle Host URL result find In Bundle file Path bundle Host if result null return result return find In Fragments file Path bundle Host  findInResolved filePath AbstractBundle bundleHost findInBundle filePath bundleHost findInFragments filePath bundleHost
private URL find In Bundle String file Path Abstract Bundle search Bundle return search Bundle get Entry file Path  findInBundle filePath AbstractBundle searchBundle searchBundle getEntry filePath
private URL find In Fragments String file Path Abstract Bundle search Bundle org osgi framework Bundle fragments search Bundle get Fragments URL fileURL null for int i 0 fragments null i fragments length fileURL null i fileURL fragments i get Entry file Path return fileURL  findInFragments filePath AbstractBundle searchBundle searchBundle getFragments getEntry filePath
private abstract interface Bundle Resource Bundle void set Parent Resource Bundle parent  BundleResourceBundle setParent ResourceBundle
private abstract interface Bundle Resource Bundle void set Parent Resource Bundle parent boolean is Empty  BundleResourceBundle setParent ResourceBundle isEmpty
private class Localization Resource Bundle extends Property Resource Bundle implements Bundle Resource Bundle public Localization Resource Bundle Input Stream in throws IO Exception super in  LocalizationResourceBundle PropertyResourceBundle BundleResourceBundle LocalizationResourceBundle InputStream IOException
super in public void set Parent Resource Bundle parent super set Parent parent  setParent ResourceBundle setParent
super set Parent parent public boolean is Empty return false  setParent isEmpty
private class Empty Resouce Bundle extends Resource Bundle implements Bundle Resource Bundle public Enumeration get Keys return null  EmptyResouceBundle ResourceBundle BundleResourceBundle getKeys
return null protected Object handle Get Object String arg0 throws Missing Resource Exception return null  handleGetObject MissingResourceException
return null public void set Parent Resource Bundle parent super set Parent parent  setParent ResourceBundle setParent
public boolean is Empty if parent null return true return Bundle Resource Bundle parent is Empty  isEmpty BundleResourceBundle isEmpty

Bundle Loader Proxy suppliers Multi Source Package String id Bundle Loader Proxy suppliers this id id this suppliers suppliers  BundleLoaderProxy MultiSourcePackage BundleLoaderProxy
public Bundle Loader Proxy get Suppliers return suppliers  BundleLoaderProxy getSuppliers
public boolean is Multivalued return true  isMultivalued
public Bundle Loader Proxy get Supplier return null  BundleLoaderProxy getSupplier

public class Null Package Source extends Package Source public Null Package Source String name this id name  NullPackageSource PackageSource NullPackageSource
public Bundle Loader Proxy get Supplier return null  BundleLoaderProxy getSupplier
public boolean is Multivalued return false  isMultivalued
public Bundle Loader Proxy get Suppliers return null  BundleLoaderProxy getSuppliers
public boolean is Null Source return true  isNullSource
public String to String return id null NON NLS 1  toString

Constructs an OS Gi object with the specified Framework Adaptor This method creates an OS Gi framework param adaptor An adaptor object for the framework to use public OS Gi Framework Adaptor adaptor framework create Framework adaptor  OSGi FrameworkAdaptor OSGi OSGi FrameworkAdaptor createFramework
Destroy the OS Gi framework This method stops the framework if it has been started All resources associated with the framework are release and the OS Gi object is no longer usable public void close framework close  OSGi OSGi
Start the framework The framework is started as described in the OS Gi Framework specification public void launch framework launch  OSGi
Stop the framework The framework is stopped as described in the OS Gi Framework specification public void shutdown framework shutdown  OSGi
This method returns the state of the OS Gi framework return true of the framework is launched false if shutdown public boolean is Active return framework is Active  OSGi isActive isActive
Retrieve the Bundle Context for the system bundle return The system bundle s Bundle Context public org osgi framework Bundle Context get Bundle Context return framework system Bundle get Context  BundleContext BundleContext BundleContext getBundleContext systemBundle getContext
Create the internal framework object This method can be overridden to create a secure framework param adaptor Framework Adaptor object for the framework return New Framework object protected Framework create Framework Framework Adaptor adaptor return new Framework adaptor  FrameworkAdaptor createFramework FrameworkAdaptor
Display the banner to System out protected void display Banner System out println System out print Msg formatter get String ECLIPSE OSGI NAME NON NLS 1 System out print NON NLS 1 System out println Msg formatter get String ECLIPSE OSGI VERSION NON NLS 1 System out println System out println Msg formatter get String OSGI VERSION NON NLS 1 System out println System out println Msg formatter get String ECLIPSE COPYRIGHT NON NLS 1  displayBanner getString ECLIPSE_OSGI_NAME getString ECLIPSE_OSGI_VERSION getString OSGI_VERSION getString ECLIPSE_COPYRIGHT

Constructor param framework Framework object protected Package Admin Impl Framework framework this framework framework  PackageAdminImpl
protected void initialize check Service Class Source Boolean value Of System get Property Constants OSGI CHECKSERVICECLASSSOURCE true boolean Value NON NLS 1 restrict Service Classes Boolean value Of System get Property Constants OSGI RESTRICTSERVICECLASSES false boolean Value NON NLS 1 removal Pending new Vector 10 10 State state framework adaptor get State if state is Resolved state resolve false exported Packages new Keyed Hash Set false exported Bundles new Keyed Hash Set false  checkServiceClassSource valueOf getProperty OSGI_CHECKSERVICECLASSSOURCE booleanValue restrictServiceClasses valueOf getProperty OSGI_RESTRICTSERVICECLASSES booleanValue removalPending getState isResolved exportedPackages KeyedHashSet exportedBundles KeyedHashSet
private Keyed Hash Set get Exported Packages Keyed Hash Set package Set State state framework adaptor get State Package Specification package Specs state get Exported Packages for int i 0 i package Specs length i Bundle Description bundle Spec package Specs i get Supplier if bundle Spec null continue Abstract Bundle bundle framework get Bundle bundle Spec get Bundle Id if bundle null Bundle Exception be new Bundle Exception Msg formatter get String BUNDLE NOT IN FRAMEWORK bundle Spec NON NLS 1 framework publish Framework Event Framework Event ERROR framework system Bundle be continue check export permissions before getting the host we want to check the permissions of the fragment if bundle check Export Package Permission package Specs i get Name continue if we have a host then get the host bundle Host Specification host Spec bundle Spec get Host if host Spec null bundle Spec host Spec get Supplier if bundle Spec null continue bundle framework get Bundle bundle Spec get Bundle Id if bundle null Bundle Exception be new Bundle Exception Msg formatter get String BUNDLE NOT IN FRAMEWORK bundle Spec NON NLS 1 framework publish Framework Event Framework Event ERROR framework system Bundle be continue if bundle is Resolved bundle instanceof Bundle Host Exported Package Impl packagesource new Exported Package Impl package Specs i Bundle Host bundle get Loader Proxy package Set add packagesource return package Set  KeyedHashSet getExportedPackages KeyedHashSet packageSet getState PackageSpecification packageSpecs getExportedPackages packageSpecs BundleDescription bundleSpec packageSpecs getSupplier bundleSpec AbstractBundle getBundle bundleSpec getBundleId BundleException BundleException getString BUNDLE_NOT_IN_FRAMEWORK bundleSpec publishFrameworkEvent FrameworkEvent systemBundle checkExportPackagePermission packageSpecs getName HostSpecification hostSpec bundleSpec getHost hostSpec bundleSpec hostSpec getSupplier bundleSpec getBundle bundleSpec getBundleId BundleException BundleException getString BUNDLE_NOT_IN_FRAMEWORK bundleSpec publishFrameworkEvent FrameworkEvent systemBundle isResolved BundleHost ExportedPackageImpl ExportedPackageImpl packageSpecs BundleHost getLoaderProxy packageSet packageSet
private Keyed Hash Set get Exported Bundles Keyed Hash Set bundle Set State state framework adaptor get State Bundle Description bundle Descripts state get Resolved Bundles for int i 0 i bundle Descripts length i Bundle Description bundledes bundle Descripts i Abstract Bundle bundle framework get Bundle bundledes get Bundle Id if bundle null bundle is Resolved bundle get Symbolic Name null bundle instanceof Bundle Host bundle check Provide Bundle Permission bundle get Symbolic Name Bundle Loader Proxy loader Proxy Bundle Host bundle get Loader Proxy bundle Set add loader Proxy return bundle Set  KeyedHashSet getExportedBundles KeyedHashSet bundleSet getState BundleDescription bundleDescripts getResolvedBundles bundleDescripts BundleDescription bundleDescripts AbstractBundle getBundle getBundleId isResolved getSymbolicName BundleHost checkProvideBundlePermission getSymbolicName BundleLoaderProxy loaderProxy BundleHost getLoaderProxy bundleSet loaderProxy bundleSet
protected void cleanup This is only called when the framework is shutting down removal Pending null exported Packages null exported Bundles null  removalPending exportedPackages exportedBundles
protected void add Removal Pending Bundle Loader Proxy loader Proxy removal Pending add Element loader Proxy  addRemovalPending BundleLoaderProxy loaderProxy removalPending addElement loaderProxy
protected void delete Removal Pending Bundle Loader Proxy loader Proxy throws Bundle Exception boolean exporting loader Proxy in Use if exporting Reaching here is an internal error if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println Bundle Loader unexport Packager returned true loader Proxy NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 throw new Bundle Exception Msg formatter get String OSGI INTERNAL ERROR NON NLS 1 unexport Resources loader Proxy Bundle Loader loader loader Proxy get Bundle Loader loader clear loader close removal Pending remove loader Proxy  deleteRemovalPending BundleLoaderProxy loaderProxy BundleException loaderProxy inUse DEBUG_PACKAGEADMIN BundleLoader unexportPackager loaderProxy printStackTrace BundleException getString OSGI_INTERNAL_ERROR unexportResources loaderProxy BundleLoader loaderProxy getBundleLoader removalPending loaderProxy
Gets the packages exported by the specified bundle param bundle The bundle whose exported packages are to be returned or tt null tt if all the packages currently exported in the framework are to be returned If the specified bundle is the system bundle that is the bundle with id 0 this method returns all the packages on the system classpath whose name does not start with java In an environment where the exhaustive list of packages on the system classpath is not known in advance this method will return all currently known packages on the system classpath that is all packages on the system classpath that contains one or more classes that have been loaded return The array of packages exported by the specified bundle or tt null tt if the specified bundle has not exported any packages public org osgi service packageadmin Exported Package get Exported Packages org osgi framework Bundle bundle need to make sure the dependacies are marked before this call synchronized framework bundles framework bundles mark Dependancies Keyed Element elements exported Packages elements if bundle null Vector result new Vector for int i 0 i elements length i Exported Package Impl pkg Element Exported Package Impl elements i if pkg Element supplier get Bundle Host bundle result add pkg Element if result size 0 return null Exported Package Impl pkg Elements new Exported Package Impl result size return Exported Package result to Array pkg Elements else if elements length 0 return null Exported Package Impl pkg Elements new Exported Package Impl elements length System arraycopy elements 0 pkg Elements 0 pkg Elements length return pkg Elements  ExportedPackage getExportedPackages markDependancies KeyedElement exportedPackages ExportedPackageImpl pkgElement ExportedPackageImpl pkgElement getBundleHost pkgElement ExportedPackageImpl pkgElements ExportedPackageImpl ExportedPackage toArray pkgElements ExportedPackageImpl pkgElements ExportedPackageImpl pkgElements pkgElements pkgElements
Gets the Exported Package with the specified package name All exported packages will be checked for the specified name In an environment where the exhaustive list of packages on the system classpath is not known in advance this method attempts to see if the named package is on the system classpath This means that this method may discover an Exported Package that was not present in the list returned by tt get Exported Packages tt param package Name The name of the exported package to be returned return The exported package with the specified name or tt null tt if no expored package with that name exists public org osgi service packageadmin Exported Package get Exported Package String package Name need to make sure the dependacies are marked before this call synchronized framework bundles framework bundles mark Dependancies return Exported Package Impl exported Packages get By Key package Name  ExportedPackage ExportedPackage getExportedPackages packageName ExportedPackage getExportedPackage packageName markDependancies ExportedPackageImpl exportedPackages getByKey packageName
final Abstract Bundle bundles copy Thread refresh Secure Action create Thread new Runnable public void run refresh Packages bundles  AbstractBundle SecureAction createThread refreshPackages
Forces the update replacement or removal of packages exported by the specified bundles p If no bundles are specified this method will update or remove any packages exported by any bundles that were previously updated or uninstalled The technique by which this is accomplished may vary among different framework implementations One permissible implementation is to stop and restart the Framework p This method returns to the caller immediately and then performs the following steps in its own thread ol p li Compute a graph of bundles starting with the specified ones If no bundles are specified compute a graph of bundles starting with previously updated or uninstalled ones Any bundle that imports a package that is currently exported by a bundle in the graph is added to the graph The graph is fully constructed when there is no bundle outside the graph that imports a package from a bundle in the graph The graph may contain tt UNINSTALLED tt bundles that are currently still exporting packages p li Each bundle in the graph will be stopped as described in the tt Bundle stop tt method p li Each bundle in the graph that is in the tt RESOLVED tt state is moved to the tt INSTALLED tt state The effect of this step is that bundles in the graph are no longer tt RESOLVED tt p li Each bundle in the graph that is in the UNINSTALLED state is removed from the graph and is now completely removed from the framework p li Each bundle in the graph that was in the tt ACTIVE tt state prior to Step 2 is started as described in the tt Bundle start tt method causing all bundles required for the restart to be resolved It is possible that as a result of the previous steps packages that were previously exported no longer are Therefore some bundles may be unresolvable until another bundle offering a compatible package for export has been installed in the framework ol p For any exceptions that are thrown during any of these steps a tt Framework Event tt of type tt ERROR tt is broadcast containing the exception param input the bundles whose exported packages are to be updated or removed or tt null tt for all previously updated or uninstalled bundles exception Security Exception if the caller does not have the tt Admin Permission tt and the Java runtime environment supports permissions public void refresh Packages org osgi framework Bundle input framework check Admin Permission Abstract Bundle copy null if input null synchronized input int size input length copy new Abstract Bundle size System arraycopy input 0 copy 0 size final Abstract Bundle bundles copy Thread refresh Secure Action create Thread new Runnable public void run refresh Packages bundles Refresh Packages NON NLS 1 refresh start  FrameworkEvent SecurityException AdminPermission refreshPackages checkAdminPermission AbstractBundle AbstractBundle AbstractBundle SecureAction createThread refreshPackages
Worker routine called on a seperate thread to perform the actual work param refresh the list of bundles to refresh protected void refresh Packages Abstract Bundle refresh try Vector graph null synchronized framework bundles if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println refresh Packages Initialize graph NON NLS 1 make sure the dependencies are marked first framework bundles mark Dependancies graph compute Affected Bundles refresh get the state State state framework adaptor get State resolve the state state resolve false process the delta This will set the state of all the bundles in the graph process Delta graph Resume the suspended bundles outside of the synchronization block This will cause the bundles to be resolved using the most up to date generations of the bundles resume Bundles graph finally framework publish Framework Event Framework Event PACKAGES REFRESHED framework system Bundle null  refreshPackages AbstractBundle DEBUG_PACKAGEADMIN refreshPackages markDependancies computeAffectedBundles getState processDelta resumeBundles publishFrameworkEvent FrameworkEvent PACKAGES_REFRESHED systemBundle
private void resume Bundles Vector graph Abstract Bundle refresh new Abstract Bundle graph size boolean previously Resolved new boolean graph size graph copy Into refresh Util sort refresh 0 graph size if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println refresh Packages restart the bundles NON NLS 1 for int i 0 i refresh length i Abstract Bundle bundle Abstract Bundle refresh i if bundle is Resolved framework resume Bundle bundle  resumeBundles AbstractBundle AbstractBundle previouslyResolved copyInto DEBUG_PACKAGEADMIN refreshPackages AbstractBundle AbstractBundle isResolved resumeBundle
private void process Delta Vector graph Abstract Bundle refresh new Abstract Bundle graph size boolean previously Resolved new boolean graph size graph copy Into refresh Util sort refresh 0 graph size Vector notify new Vector try try Suspend each bundle and grab its state change lock if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println refresh Packages Suspend each bundle and acquire its state change lock NON NLS 1 for int i refresh length 1 i 0 i Abstract Bundle changed Bundle refresh i previously Resolved i changed Bundle is Resolved if changed Bundle is Active changed Bundle is Fragment boolean suspended framework suspend Bundle changed Bundle true if suspended throw new Bundle Exception Msg formatter get String BUNDLE STATE CHANGE EXCEPTION NON NLS 1 else changed Bundle begin State Change if Debug DEBUG Debug DEBUG PACKAGEADMIN if changed Bundle state Changing null Debug println Bundle state change lock is clear changed Bundle NON NLS 1 Debug print Stack Trace new Exception Stack trace NON NLS 1 Refresh the bundles which will unexport the packages This will move RESOLVED bundles to the INSTALLED state if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println refresh Packages refresh the bundles NON NLS 1 Unimport detached Bundle Loaders for bundles in the graph for int i removal Pending size 1 i 0 i Bundle Loader Proxy loader Proxy Bundle Loader Proxy removal Pending element At i if graph contains loader Proxy get Bundle Host framework bundles un Mark Dependancies loader Proxy for int i 0 i refresh length i Abstract Bundle changed Bundle refresh i changed Bundle refresh send out unresolved events if previously Resolved i framework publish Bundle Event Bundle Event UNRESOLVED changed Bundle Cleanup detached Bundle Loaders for bundles in the graph if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println refresh Packages unexport the removal pending packages NON NLS 1 for int i removal Pending size 1 i 0 i Bundle Loader Proxy loader Proxy Bundle Loader Proxy removal Pending element At i Abstract Bundle removed Bundle loader Proxy get Bundle Host if graph contains removed Bundle delete Removal Pending loader Proxy set the resolved bundles state List all Bundles framework bundles get Bundles int size all Bundles size for int i 0 i size i Abstract Bundle bundle Abstract Bundle all Bundles get i if bundle is Resolved continue Bundle Description bundle Des bundle get Bundle Description if bundle Des null if bundle Des is Resolved if bundle is Fragment Bundle Host host Bundle Host framework get Bundle bundle Des get Host get Supplier get Bundle Id if Bundle Fragment bundle set Host host bundle resolve bundle Des is Singleton else bundle resolve bundle Des is Singleton if bundle is Resolved notify add Element bundle update the exported package and bundle lists exported Packages get Exported Packages exported Packages exported Bundles get Exported Bundles exported Bundles finally Release the state change locks if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println refresh Packages release the state change locks NON NLS 1 for int i 0 i refresh length i Abstract Bundle changed Bundle refresh i changed Bundle complete State Change Take this opportunity to clean up the adaptor storage if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println refresh Packages clean up adaptor storage NON NLS 1 try framework adaptor compact Storage catch IO Exception e if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println refresh Packages exception e get Message NON NLS 1 Debug print Stack Trace e framework publish Framework Event Framework Event ERROR framework system Bundle new Bundle Exception Msg formatter get String BUNDLE REFRESH FAILURE e NON NLS 1 catch Bundle Exception e if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println refresh Packages exception e get Message NON NLS 1 Debug print Stack Trace e get Nested Exception framework publish Framework Event Framework Event ERROR framework system Bundle new Bundle Exception Msg formatter get String BUNDLE REFRESH FAILURE e NON NLS 1 send out any resolved unresolved events for int i 0 i notify size i Abstract Bundle changed Bundle Abstract Bundle notify element At i framework publish Bundle Event changed Bundle is Resolved Bundle Event RESOLVED Bundle Event UNRESOLVED changed Bundle  processDelta AbstractBundle AbstractBundle previouslyResolved copyInto DEBUG_PACKAGEADMIN refreshPackages AbstractBundle changedBundle previouslyResolved changedBundle isResolved changedBundle isActive changedBundle isFragment suspendBundle changedBundle BundleException getString BUNDLE_STATE_CHANGE_EXCEPTION changedBundle beginStateChange DEBUG_PACKAGEADMIN changedBundle stateChanging changedBundle printStackTrace DEBUG_PACKAGEADMIN refreshPackages BundleLoaders removalPending BundleLoaderProxy loaderProxy BundleLoaderProxy removalPending elementAt loaderProxy getBundleHost unMarkDependancies loaderProxy AbstractBundle changedBundle changedBundle previouslyResolved publishBundleEvent BundleEvent changedBundle BundleLoaders DEBUG_PACKAGEADMIN refreshPackages removalPending BundleLoaderProxy loaderProxy BundleLoaderProxy removalPending elementAt AbstractBundle removedBundle loaderProxy getBundleHost removedBundle deleteRemovalPending loaderProxy allBundles getBundles allBundles AbstractBundle AbstractBundle allBundles isResolved BundleDescription bundleDes getBundleDescription bundleDes bundleDes isResolved isFragment BundleHost BundleHost getBundle bundleDes getHost getSupplier getBundleId BundleFragment setHost bundleDes isSingleton bundleDes isSingleton isResolved addElement exportedPackages getExportedPackages exportedPackages exportedBundles getExportedBundles exportedBundles DEBUG_PACKAGEADMIN refreshPackages AbstractBundle changedBundle changedBundle completeStateChange DEBUG_PACKAGEADMIN refreshPackages compactStorage IOException DEBUG_PACKAGEADMIN refreshPackages getMessage printStackTrace publishFrameworkEvent FrameworkEvent systemBundle BundleException getString BUNDLE_REFRESH_FAILURE BundleException DEBUG_PACKAGEADMIN refreshPackages getMessage printStackTrace getNestedException publishFrameworkEvent FrameworkEvent systemBundle BundleException getString BUNDLE_REFRESH_FAILURE AbstractBundle changedBundle AbstractBundle elementAt publishBundleEvent changedBundle isResolved BundleEvent BundleEvent changedBundle
private void unresolve Permissions Vector bundles Hashtable packages All bundles must be notified of the unexported packages so that they may unresolve permissions if necessary This done after resolve bundles so that unresolved permissions can be immediately resolved if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println refresh Packages unresolve permissions NON NLS 1 int size bundles size for int i 0 i size i Abstract Bundle bundle Abstract Bundle bundles element At i bundle unresolve Permissions packages  unresolvePermissions DEBUG_PACKAGEADMIN refreshPackages AbstractBundle AbstractBundle elementAt unresolvePermissions
private Vector compute Affected Bundles Abstract Bundle refresh Vector graph new Vector if refresh null int size removal Pending size for int i 0 i size i Bundle Loader Proxy loader Proxy Bundle Loader Proxy removal Pending element At i Abstract Bundle bundle loader Proxy get Bundle Host if graph contains bundle if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println refresh bundle NON NLS 1 graph add Element bundle add in any dependents of the removal pending loader Abstract Bundle dependents loader Proxy get Dependent Bundles for int j 0 j dependents length j if graph contains dependents j graph add Element dependents j else for int i 0 i refresh length i Abstract Bundle bundle refresh i if bundle framework system Bundle continue if bundle is Fragment if it is a fragment then put the host in the graph Bundle Host host Bundle Host bundle get Host if host null if graph contains host graph add Element host if graph contains bundle if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println refresh bundle NON NLS 1 graph add Element bundle If there is nothing to do then return if graph size 0 if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println refresh Packages Empty graph NON NLS 1 return graph Complete graph if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println refresh Packages Complete graph NON NLS 1 boolean changed do changed false int size graph size for int i size 1 i 0 i Abstract Bundle bundle Abstract Bundle graph element At i if bundle is Fragment Bundle Loader Proxy loader Proxy Bundle Host bundle get Loader Proxy if loader Proxy null add any dependents Abstract Bundle dependents loader Proxy get Dependent Bundles for int j 0 j dependents length j if graph contains dependents j graph add Element dependents j changed true add in any fragments org osgi framework Bundle frags bundle get Fragments if frags null for int j 0 j frags length j if graph contains frags j graph add Element frags j changed true else add in the host Abstract Bundle host Abstract Bundle bundle get Host if host null if graph contains host graph add Element host changed true add in any singleton bundles if needed Abstract Bundle same Names framework bundles get Bundles bundle get Symbolic Name if same Names null same Names length 1 for int j 0 j same Names length j if same Names j bundle same Names j is Singleton graph contains same Names j graph add Element same Names j changed true look for the bundles in removal Pending list we always add removal Pending dependants here even if the removalpending bundle was not in the original list for int i removal Pending size 1 i 0 i Bundle Loader Proxy removed Loader Proxy Bundle Loader Proxy removal Pending element At i Abstract Bundle removed Bundle removed Loader Proxy get Bundle Host if graph contains removed Bundle graph add Element removed Bundle changed true Abstract Bundle dependents removed Loader Proxy get Dependent Bundles for int k 0 k dependents length k if graph contains dependents k graph add Element dependents k while changed return graph  computeAffectedBundles AbstractBundle removalPending BundleLoaderProxy loaderProxy BundleLoaderProxy removalPending elementAt AbstractBundle loaderProxy getBundleHost DEBUG_PACKAGEADMIN addElement AbstractBundle loaderProxy getDependentBundles addElement AbstractBundle systemBundle isFragment BundleHost BundleHost getHost addElement DEBUG_PACKAGEADMIN addElement DEBUG_PACKAGEADMIN refreshPackages DEBUG_PACKAGEADMIN refreshPackages AbstractBundle AbstractBundle elementAt isFragment BundleLoaderProxy loaderProxy BundleHost getLoaderProxy loaderProxy AbstractBundle loaderProxy getDependentBundles addElement getFragments addElement AbstractBundle AbstractBundle getHost addElement AbstractBundle sameNames getBundles getSymbolicName sameNames sameNames sameNames sameNames sameNames isSingleton sameNames addElement sameNames removalPending removalPending removalPending BundleLoaderProxy removedLoaderProxy BundleLoaderProxy removalPending elementAt AbstractBundle removedBundle removedLoaderProxy getBundleHost removedBundle addElement removedBundle AbstractBundle removedLoaderProxy getDependentBundles addElement
Sets all the bundles in the state that are resolved to the resolved state This should only be called when the framework is launching protected void set Resolved Bundles State state framework adaptor get State Bundle Description descriptions state get Bundles for int i 0 i descriptions length i long bundle Id descriptions i get Bundle Id Abstract Bundle bundle framework get Bundle bundle Id if bundle null Bundle Exception be new Bundle Exception Msg formatter get String BUNDLE NOT IN FRAMEWORK descriptions i NON NLS 1 framework publish Framework Event Framework Event ERROR framework system Bundle be if bundle framework system Bundle if descriptions i is Resolved if bundle is Fragment Bundle Host host Bundle Host framework get Bundle descriptions i get Host get Supplier get Bundle Id if Bundle Fragment bundle set Host host bundle resolve descriptions i is Singleton else bundle resolve descriptions i is Singleton exported Packages get Exported Packages exported Packages exported Bundles get Exported Bundles exported Bundles  setResolvedBundles getState BundleDescription getBundles bundleId getBundleId AbstractBundle getBundle bundleId BundleException BundleException getString BUNDLE_NOT_IN_FRAMEWORK publishFrameworkEvent FrameworkEvent systemBundle systemBundle isResolved isFragment BundleHost BundleHost getBundle getHost getSupplier getBundleId BundleFragment setHost isSingleton isSingleton exportedPackages getExportedPackages exportedPackages exportedBundles getExportedBundles exportedBundles
A permissible implementation of this method is to attempt to resolve all unresolved bundles installed in the framework That is what this method does param bundles the set of bundles to attempt to resolve public boolean resolve Bundles org osgi framework Bundle bundles resolve Bundles if bundles null synchronized framework bundles List bundle List framework bundles get Bundles bundles Bundle bundle List to Array new Abstract Bundle bundle List size for int i 0 i bundles length i if Abstract Bundle bundles i is Resolved return false return true  resolveBundles resolveBundles bundleList getBundles bundleList toArray AbstractBundle bundleList AbstractBundle isResolved
Attempt to resolve all unresolved bundles When this method returns all bundles are resolved that can be resolved A resolved bundle has exported and imported packages An unresolved bundle neither exports nor imports packages protected void resolve Bundles long start 0 if Debug DEBUG Debug DEBUG PACKAGEADMIN TIMING start System current Time Millis Resolve the bundles This will make there exported packages available if Debug DEBUG Debug DEBUG PACKAGEADMIN Debug println refresh Bundles resolve bundles NON NLS 1 Vector notify new Vector synchronized framework bundles boolean resolve Needed false List all Bundles framework bundles get Bundles int size all Bundles size first check to see if there is anything to resolve for int i 0 i size i if Abstract Bundle all Bundles get i is Resolved resolve Needed true if resolve Needed return get the state and resolve it framework adaptor get State resolve false for int i 0 i size i Abstract Bundle bundle Abstract Bundle all Bundles get i if bundle is Resolved bundle framework system Bundle continue Bundle Description changed Bundle Des bundle get Bundle Description if changed Bundle Des null framework publish Framework Event Framework Event ERROR bundle new Bundle Exception Msg formatter get String BUNDLE NOT IN STATE bundle get Location NON NLS 1 if changed Bundle Des is Resolved if bundle is Fragment Bundle Host host Bundle Host framework get Bundle changed Bundle Des get Host get Supplier get Bundle Id if Bundle Fragment bundle set Host host bundle resolve changed Bundle Des is Singleton else bundle resolve changed Bundle Des is Singleton if bundle is Resolved notify add bundle update the exported package and bundle lists exported Packages get Exported Packages exported Packages exported Bundles get Exported Bundles exported Bundles for int i 0 i notify size i Abstract Bundle bundle Abstract Bundle notify element At i if bundle null framework publish Bundle Event bundle is Resolved Bundle Event RESOLVED Bundle Event UNRESOLVED bundle if Debug DEBUG Debug DEBUG PACKAGEADMIN TIMING cumulative Time cumulative Time System current Time Millis start Debug Options get Default set Option Debug OPTION DEBUG PACKAGEADMIN TIMING value Long to String cumulative Time NON NLS 1  resolveBundles DEBUG_PACKAGEADMIN_TIMING currentTimeMillis DEBUG_PACKAGEADMIN refreshBundles resolveNeeded allBundles getBundles allBundles AbstractBundle allBundles isResolved resolveNeeded resolveNeeded getState AbstractBundle AbstractBundle allBundles isResolved systemBundle BundleDescription changedBundleDes getBundleDescription changedBundleDes publishFrameworkEvent FrameworkEvent BundleException getString BUNDLE_NOT_IN_STATE getLocation changedBundleDes isResolved isFragment BundleHost BundleHost getBundle changedBundleDes getHost getSupplier getBundleId BundleFragment setHost changedBundleDes isSingleton changedBundleDes isSingleton isResolved exportedPackages getExportedPackages exportedPackages exportedBundles getExportedBundles exportedBundles AbstractBundle AbstractBundle elementAt publishBundleEvent isResolved BundleEvent BundleEvent DEBUG_PACKAGEADMIN_TIMING cumulativeTime cumulativeTime currentTimeMillis DebugOptions getDefault setOption OPTION_DEBUG_PACKAGEADMIN_TIMING toString cumulativeTime
protected void unexport Resources Bundle Loader Proxy proxy Keyed Element bundles exported Bundles elements for int i 0 i bundles length i Bundle Loader Proxy loader Proxy Bundle Loader Proxy bundles i if loader Proxy proxy exported Bundles remove proxy Keyed Element packages exported Packages elements for int i 0 i packages length i Package Source source Package Source packages i Bundle Loader Proxy source Proxy source get Supplier if source Proxy proxy exported Packages remove source make the proxy stale proxy set Stale  unexportResources BundleLoaderProxy KeyedElement exportedBundles BundleLoaderProxy loaderProxy BundleLoaderProxy loaderProxy exportedBundles KeyedElement exportedPackages PackageSource PackageSource BundleLoaderProxy sourceProxy getSupplier sourceProxy exportedPackages setStale
protected Bundle Description get Bundle Descriptions Vector graph Array List result new Array List int size graph size for int i 0 i size i Abstract Bundle bundle Abstract Bundle graph element At i Bundle Description bundle Des bundle get Bundle Description if bundle Des null result add bundle Des return Bundle Description result to Array new Bundle Description result size  BundleDescription getBundleDescriptions ArrayList ArrayList AbstractBundle AbstractBundle elementAt BundleDescription bundleDes getBundleDescription bundleDes bundleDes BundleDescription toArray BundleDescription
public Providing Bundle get Providing Bundles String symbolic Name if exported Bundles null exported Bundles size 0 return null need to make sure the dependacies are marked before this call framework bundles mark Dependancies Keyed Element all Symbolic Bundles exported Bundles elements if symbolic Name null if all Symbolic Bundles length 0 return null Providing Bundle result new Providing Bundle all Symbolic Bundles length System arraycopy all Symbolic Bundles 0 result 0 result length return result else Array List result new Array List for int i 0 i all Symbolic Bundles length i Providing Bundle sym Bundle Providing Bundle all Symbolic Bundles i if sym Bundle get Symbolic Name equals symbolic Name result add sym Bundle return Providing Bundle result to Array new Providing Bundle result size  ProvidingBundle getProvidingBundles symbolicName exportedBundles exportedBundles markDependancies KeyedElement allSymbolicBundles exportedBundles symbolicName allSymbolicBundles ProvidingBundle ProvidingBundle allSymbolicBundles allSymbolicBundles ArrayList ArrayList allSymbolicBundles ProvidingBundle symBundle ProvidingBundle allSymbolicBundles symBundle getSymbolicName symbolicName symBundle ProvidingBundle toArray ProvidingBundle
public org osgi framework Bundle get Bundles String symbolic Name String version Range if symbolic Name null throw new Illegal Argument Exception Abstract Bundle bundles framework get Bundle By Symbolic Name symbolic Name if bundles null return null if version Range null Abstract Bundle result new Abstract Bundle bundles length System arraycopy bundles 0 result 0 result length return result This code depends on the array of bundles being in descending version order Array List result new Array List bundles length Version Range range new Version Range version Range for int i 0 i bundles length i if range is Included bundles i get Version result add bundles i if result size 0 return null else return Abstract Bundle result to Array new Abstract Bundle result size  getBundles symbolicName versionRange symbolicName IllegalArgumentException AbstractBundle getBundleBySymbolicName symbolicName versionRange AbstractBundle AbstractBundle ArrayList ArrayList VersionRange VersionRange versionRange isIncluded getVersion AbstractBundle toArray AbstractBundle
public org osgi framework Bundle get Fragments org osgi framework Bundle bundle return Abstract Bundle bundle get Fragments  getFragments AbstractBundle getFragments
public org osgi framework Bundle get Hosts org osgi framework Bundle bundle org osgi framework Bundle host Abstract Bundle bundle get Host if host null return null else return new org osgi framework Bundle host  getHosts AbstractBundle getHost
public int get Bundle Type org osgi framework Bundle bundle return Abstract Bundle bundle is Fragment Package Admin Impl BUNDLE TYPE FRAGMENT 0  getBundleType AbstractBundle isFragment PackageAdminImpl BUNDLE_TYPE_FRAGMENT
protected Class load Service Class String class Name Abstract Bundle bundle try first try the PARENT class space return framework adaptor get Bundle Class Loader Parent load Class class Name catch Class Not Found Exception e do nothing try exported packages try exported packages SERVICE class space String pkgname Bundle Loader get Package Name class Name if pkgname null Package Source exporter Package Source exported Packages get By Key pkgname if exporter null Class service Class exporter get Supplier get Bundle Loader find Local Class class Name if service Class null return service Class try bundle s PRIVATE class space if bundle null return null Bundle Loader loader bundle get Bundle Loader if check Service Class Source try return loader find Class class Name catch Class Not Found Exception e1 return null if restrict Service Classes cannot have a service class from a package that a bundle provides to a NAMED class space unless it is exported also if pkgname null pkgname Bundle Loader DEFAULT PACKAGE if loader get Provided Package pkgname null return null Class service Class loader find Local Class class Name if service Class null bundle get Bundle Id 0 return service Class return service Class get Class Loader loader create Class Loader service Class null  loadServiceClass className AbstractBundle getBundleClassLoaderParent loadClass className ClassNotFoundException BundleLoader getPackageName className PackageSource PackageSource exportedPackages getByKey serviceClass getSupplier getBundleLoader findLocalClass className serviceClass serviceClass BundleLoader getBundleLoader checkServiceClassSource findClass className ClassNotFoundException restrictServiceClasses BundleLoader DEFAULT_PACKAGE getProvidedPackage serviceClass findLocalClass className serviceClass getBundleId serviceClass serviceClass getClassLoader createClassLoader serviceClass

protected String id public String get Id return id  getId
public abstract boolean is Multivalued  isMultivalued
public abstract boolean is Multivalued public abstract Bundle Loader Proxy get Supplier  isMultivalued BundleLoaderProxy getSupplier
public abstract Bundle Loader Proxy get Supplier public abstract Bundle Loader Proxy get Suppliers  BundleLoaderProxy getSupplier BundleLoaderProxy getSuppliers
public abstract Bundle Loader Proxy get Suppliers public boolean compare Keyed Element other return id equals Package Source other get Id  BundleLoaderProxy getSuppliers KeyedElement PackageSource getId
public int get Key Hash Code return id hash Code  getKeyHashCode hashCode
public Object get Key return id  getKey
public boolean is Null Source return false  isNullSource

Construstor param framework Framework object protected Permission Admin Impl Framework framework Permission Storage storage this framework framework this storage storage default Default Permission Infos get Permission Infos Constants OSGI DEFAULT DEFAULT PERMISSIONS base Implied Permission Infos get Permission Infos Constants OSGI BASE IMPLIED PERMISSIONS if Debug DEBUG This is necessary to allow File get Absolute Path in debug statements int  length base Implied Permission Infos length Permission Info debug Base Implied Permission Infos new Permission Info  length 1 System arraycopy base Implied Permission Infos 0 debug Base Implied Permission Infos 0  length debug Base Implied Permission Infos  length new Permission Info java util Property Permission user dir read base Implied Permission Infos debug Base Implied Permission Infos if Debug DEBUG Debug DEBUG SECURITY Debug println Default default assigned bundle permissions NON NLS 1 if default Default Permission Infos null Debug println none NON NLS 1 else for int i 0 i default Default Permission Infos length i Debug println default Default Permission Infos i NON NLS 1 Debug println Base implied bundle permissions NON NLS 1 if base Implied Permission Infos null Debug println none NON NLS 1 else for int i 0 i base Implied Permission Infos length i Debug println base Implied Permission Infos i NON NLS 1 default Assigned Permissions new Bundle Combined Permissions null default Assigned Permissions set Assigned Permissions create Default Assigned Permissions get Default Permissions  PermissionAdminImpl PermissionStorage defaultDefaultPermissionInfos getPermissionInfos OSGI_DEFAULT_DEFAULT_PERMISSIONS baseImpliedPermissionInfos getPermissionInfos OSGI_BASE_IMPLIED_PERMISSIONS getAbsolutePath _length baseImpliedPermissionInfos PermissionInfo debugBaseImpliedPermissionInfos PermissionInfo _length baseImpliedPermissionInfos debugBaseImpliedPermissionInfos _length debugBaseImpliedPermissionInfos _length PermissionInfo PropertyPermission baseImpliedPermissionInfos debugBaseImpliedPermissionInfos DEBUG_SECURITY defaultDefaultPermissionInfos defaultDefaultPermissionInfos defaultDefaultPermissionInfos baseImpliedPermissionInfos baseImpliedPermissionInfos baseImpliedPermissionInfos defaultAssignedPermissions BundleCombinedPermissions defaultAssignedPermissions setAssignedPermissions createDefaultAssignedPermissions getDefaultPermissions
Gets the permissions assigned to the bundle with the specified location param location The location of the bundle whose permissions are to be returned return The permissions assigned to the bundle with the specified location or tt null tt if that bundle has not been assigned any permissions public Permission Info get Permissions String location if location null throw new Null Pointer Exception Permission Storage storage new org eclipse osgi framework util Secure Permission Storage this storage try String data storage get Permission Data location if Debug DEBUG Debug DEBUG SECURITY Debug println Getting permissions for location location NON NLS 1 if data null Debug println none NON NLS 1 else for int i 0 i data length i Debug println data i NON NLS 1 return make Permission Info data catch IO Exception e framework publish Framework Event Framework Event ERROR framework system Bundle e return null  PermissionInfo getPermissions NullPointerException PermissionStorage SecurePermissionStorage getPermissionData DEBUG_SECURITY makePermissionInfo IOException publishFrameworkEvent FrameworkEvent systemBundle
Assigns the specified permissions to the bundle with the specified location param location The location of the bundle that will be assigned the permissions param permissions The permissions to be assigned or tt null tt if the specified location is to be removed from the permission table exception Security Exception if the caller does not have the tt Admin Permission tt public void set Permissions String location Permission Info permissions framework check Admin Permission if location null throw new Null Pointer Exception Permission Storage storage new org eclipse osgi framework util Secure Permission Storage this storage try String data make Permission Data permissions if Debug DEBUG Debug DEBUG SECURITY Debug println Setting permissions for location location NON NLS 1 if data null Debug println none NON NLS 1 else for int i 0 i data length i Debug println data i NON NLS 1 storage set Permission Data location data catch IO Exception e framework publish Framework Event Framework Event ERROR framework system Bundle e return Abstract Bundle bundle framework get Bundle By Location location if bundle null bundle get Bundle Id 0 Protection Domain domain bundle get Protection Domain if domain null Bundle Combined Permissions combined Bundle Combined Permissions domain get Permissions if permissions null combined set Assigned Permissions default Assigned Permissions else combined set Assigned Permissions create Permissions permissions bundle  SecurityException AdminPermission setPermissions PermissionInfo checkAdminPermission NullPointerException PermissionStorage SecurePermissionStorage makePermissionData DEBUG_SECURITY setPermissionData IOException publishFrameworkEvent FrameworkEvent systemBundle AbstractBundle getBundleByLocation getBundleId ProtectionDomain getProtectionDomain BundleCombinedPermissions BundleCombinedPermissions getPermissions setAssignedPermissions defaultAssignedPermissions setAssignedPermissions createPermissions
Returns the bundle locations that have permissions assigned to them that is bundle locations for which an entry exists in the permission table return The locations of bundles that have been assigned any permissions or tt null tt if the permission table is empty public String get Locations Permission Storage storage new org eclipse osgi framework util Secure Permission Storage this storage try String locations storage get Locations return locations catch IO Exception e framework publish Framework Event Framework Event ERROR framework system Bundle e return null  getLocations PermissionStorage SecurePermissionStorage getLocations IOException publishFrameworkEvent FrameworkEvent systemBundle
Gets the default permissions p These are the permissions granted to any bundle that does not have permissions assigned to its location return The default permissions or tt null tt if default permissions have not been defined public Permission Info get Default Permissions Permission Storage storage new org eclipse osgi framework util Secure Permission Storage this storage try String data storage get Permission Data null if Debug DEBUG Debug DEBUG SECURITY Debug println Getting default permissions NON NLS 1 if data null Debug println none NON NLS 1 else for int i 0 i data length i Debug println data i NON NLS 1 return make Permission Info data catch IO Exception e framework publish Framework Event Framework Event ERROR framework system Bundle e return null  PermissionInfo getDefaultPermissions PermissionStorage SecurePermissionStorage getPermissionData DEBUG_SECURITY makePermissionInfo IOException publishFrameworkEvent FrameworkEvent systemBundle
Sets the default permissions p These are the permissions granted to any bundle that does not have permissions assigned to its location param permissions The default permissions exception Security Exception if the caller does not have the tt Admin Permission tt public void set Default Permissions Permission Info permissions framework check Admin Permission Permission Storage storage new org eclipse osgi framework util Secure Permission Storage this storage try String data make Permission Data permissions if Debug DEBUG Debug DEBUG SECURITY Debug println Setting default permissions NON NLS 1 if data null Debug println none NON NLS 1 else for int i 0 i data length i Debug println data i NON NLS 1 storage set Permission Data null data catch IO Exception e framework publish Framework Event Framework Event ERROR framework system Bundle e return default Assigned Permissions set Assigned Permissions create Default Assigned Permissions permissions  SecurityException AdminPermission setDefaultPermissions PermissionInfo checkAdminPermission PermissionStorage SecurePermissionStorage makePermissionData DEBUG_SECURITY setPermissionData IOException publishFrameworkEvent FrameworkEvent systemBundle defaultAssignedPermissions setAssignedPermissions createDefaultAssignedPermissions
Make a Permission Info array from an array of encoded permission Strings param data Array of encoded permission Strings return Array of Permission Info objects protected Permission Info make Permission Info String data if data null return null int size data length Permission Info permissions new Permission Info size for int i 0 i size i permissions i new Permission Info data i return permissions  PermissionInfo PermissionInfo PermissionInfo makePermissionInfo PermissionInfo PermissionInfo PermissionInfo
Make an array of encoded permission Strings from a Permission Info array param permissions Array of Permission Infor objects return Array of encoded permission Strings protected String make Permission Data Permission Info permissions if permissions null return null int size permissions length String data new String size for int i 0 i size i data i permissions i get Encoded return data  PermissionInfo PermissionInfor makePermissionData PermissionInfo getEncoded
This method is called by the Bundle object to create the Permission Collection used by the bundle s Protection Domain param bundle the bundle object return Bundle Combined Permission object with the bundle s dynamic permissions protected Permission Collection create Permission Collection Abstract Bundle bundle Bundle Permission Collection implied get Implied Permissions bundle Bundle Combined Permissions combined new Bundle Combined Permissions implied Bundle Permission Collection assigned get Assigned Permissions bundle combined set Assigned Permissions assigned return combined  PermissionCollection ProtectionDomain BundleCombinedPermission PermissionCollection createPermissionCollection AbstractBundle BundlePermissionCollection getImpliedPermissions BundleCombinedPermissions BundleCombinedPermissions BundlePermissionCollection getAssignedPermissions setAssignedPermissions
Creates the default assigned permissions for bundles that have no assigned permissions The default permissions are assigned via the Permission Admin service and may change dynamically return A Permission Collection of the default assigned permissions protected Bundle Permission Collection create Default Assigned Permissions Permission Info info if Debug DEBUG Debug DEBUG SECURITY Debug println Creating default assigned permissions NON NLS 1 if info null info default Default Permission Infos return create Permissions info null  PermissionAdmin PermissionCollection BundlePermissionCollection createDefaultAssignedPermissions PermissionInfo DEBUG_SECURITY defaultDefaultPermissionInfos createPermissions
Returns the assigned permissions for a bundle These permissions are assigned via the Permission Admin service and may change dynamically param bundle The bundle to create the permissions for return A Permission Collection of the assigned permissions protected Bundle Permission Collection get Assigned Permissions Abstract Bundle bundle String location bundle get Location Permission Info info get Permissions location if info null return default Assigned Permissions if Debug DEBUG Debug DEBUG SECURITY Debug println Creating assigned permissions for bundle NON NLS 1 return create Permissions info bundle  PermissionAdmin PermissionCollection BundlePermissionCollection getAssignedPermissions AbstractBundle getLocation PermissionInfo getPermissions defaultAssignedPermissions DEBUG_SECURITY createPermissions
Returns the implied permissions for a bundle These permissions never change param bundle The bundle to create the permissions for return A Permission Collection of the implied permissions protected Bundle Permission Collection get Implied Permissions Abstract Bundle bundle if Debug DEBUG Debug DEBUG SECURITY Debug println Creating implied permissions for bundle NON NLS 1 Bundle Permission Collection collection create Permissions base Implied Permission Infos bundle Permission permission new Bundle Resource Permission bundle get Bundle Id if Debug DEBUG Debug DEBUG SECURITY Debug println Created permission permission NON NLS 1 collection add permission return collection  PermissionCollection BundlePermissionCollection getImpliedPermissions AbstractBundle DEBUG_SECURITY BundlePermissionCollection createPermissions baseImpliedPermissionInfos BundleResourcePermission getBundleId DEBUG_SECURITY
Read the permissions from the specified resource return An array of Permission Info objects from the specified resource protected Permission Info get Permission Infos String resource Permission Info info null Input Stream in get Class get Resource As Stream resource if in null try Vector permissions new Vector Buffered Reader reader try reader new Buffered Reader new Input Stream Reader in UTF8 NON NLS 1 catch Unsupported Encoding Exception e reader new Buffered Reader new Input Stream Reader in while true String line reader read Line if line null EOF break line line trim if line length 0 line starts With line starts With comments NON NLS 1 NON NLS 2 continue try permissions add Element new Permission Info line catch Illegal Argument Exception iae incorrectly encoded permission framework publish Framework Event Framework Event ERROR framework system Bundle iae int size permissions size if size 0 info new Permission Info size permissions copy Into info catch IO Exception e finally try in close catch IO Exception ee return info  PermissionInfo PermissionInfo getPermissionInfos PermissionInfo InputStream getClass getResourceAsStream BufferedReader BufferedReader InputStreamReader UnsupportedEncodingException BufferedReader InputStreamReader readLine startsWith startsWith addElement PermissionInfo IllegalArgumentException publishFrameworkEvent FrameworkEvent systemBundle PermissionInfo copyInto IOException IOException
Create a Permission Collection from a Permission Info array param info Array of Permission Info objects param bundle The target bundle for the permissions return A Permission Collection containing Permission objects protected Bundle Permission Collection create Permissions Permission Info info final Abstract Bundle bundle Bundle Permission Collection collection new Bundle Permissions framework package Admin add the permissions int size info length for int i 0 i size i Permission Info perm info i String type perm get Type if type equals java io File Permission NON NLS 1 map File Permissions for relative names to the bundle s data area String name perm get Name if name equals ALL FILES NON NLS 1 File file new File name if file is Absolute relative name if bundle null default permissions continue no relative file permissions File target framework get Data File bundle name if target null no bundle data file area continue no relative file permissions perm new Permission Info type target get Path perm get Actions collection add create Permission perm return collection  PermissionCollection PermissionInfo PermissionInfo PermissionCollection BundlePermissionCollection createPermissions PermissionInfo AbstractBundle BundlePermissionCollection BundlePermissions packageAdmin PermissionInfo getType FilePermission FilePermissions getName isAbsolute getDataFile PermissionInfo getPath getActions createPermission
Create a Permission object from a Permission Info object If the type of the permission is not loadable from this object s classloader i e the system classloader then an Unresolved Permission is returned param info Description of the desired permission return A permission object protected Permission create Permission Permission Info info String type info get Type String name info get Name String actions info get Actions Unresolved Permission permission new Unresolved Permission type name actions try Only search the system classloader ours at this point Permission classes exported by bundles will be resolved later This is done so that permission classes exported by bundles may be easily unresolved during package Refresh Class clazz Class for Name type Permission resolved permission resolve clazz if resolved null if Debug DEBUG Debug DEBUG SECURITY Debug println Created permission resolved NON NLS 1 return resolved catch Class Not Found Exception e if Debug DEBUG Debug DEBUG SECURITY Debug println Created permission permission NON NLS 1 return permission  PermissionInfo UnresolvedPermission createPermission PermissionInfo getType getName getActions UnresolvedPermission UnresolvedPermission packageRefresh forName DEBUG_SECURITY ClassNotFoundException DEBUG_SECURITY

Constructs a new instance of this class public Permissions Hash super  PermissionsHash
Adds the argument to the collection paramperm java security Permission the permission to add to the collection exception Illegal State Exception if the collection is read only public void add Permission perm if is Read Only throw new Security Exception perms put perm perm  exceptionIllegalStateException isReadOnly SecurityException
Answers an enumeration of the permissions in the receiver return Enumeration the permissions in the receiver public Enumeration elements return perms keys  returnEnumeration
Indicates whether the argument permission is implied by the permissions contained in the receiver returnboolean code true code if the argument permission is implied by the permissions in the receiver and code false code if it is not paramperm java security Permission the permission to check public boolean implies Permission perm Permission p Permission perms get perm if p null p implies perm return true Enumeration enum elements while enum has More Elements if Permission enum next Element implies perm return true return false  hasMoreElements nextElement

Construct a reference protected Service Reference Impl Service Registration Impl registration this registration registration  ServiceReferenceImpl ServiceRegistrationImpl
Get the value of a service s property p This method will continue to return property values after the service has been unregistered This is so that references to unregistered service can be interrogated For example Service Reference objects stored in the log param key Name of the property return Value of the property or code null code if there is no property by that name public Object get Property String key return registration get Property key  ServiceReference getProperty getProperty
Get the list of key names for the service s properties p This method will continue to return the keys after the service has been unregistered This is so that references to unregistered service can be interrogated For example Service Reference objects stored in the log return The list of property key names public String get Property Keys return registration get Property Keys  ServiceReference getPropertyKeys getPropertyKeys
Return the bundle which registered the service p This method will always return code null code when the service has been unregistered This can be used to determine if the service has been unregistered return The bundle which registered the service public org osgi framework Bundle get Bundle return registration get Bundle  getBundle getBundle
Return the list of bundles which are using the service p This method will always return code null code when the service has been unregistered return The array of bundles using the service or null if no bundles are using the service see Bundle Context Impl get Service public org osgi framework Bundle get Using Bundles return registration get Using Bundles  BundleContextImpl getService getUsingBundles getUsingBundles
Return the classes under which the referenced service was registered return array of class names protected String get Classes return registration clazzes  getClasses
Return the serviceid of the Service Registration return service id of the service protected long get Id return registration serviceid  ServiceRegistration getId
Return the serviceranking of the Service Registration return service ranking of the service protected int get Ranking return registration serviceranking  ServiceRegistration getRanking
Returns a hash code value for the object return a hash code value for this object public int hash Code return registration hash Code  hashCode hashCode
Indicates whether some other object is equal to this one param obj the reference object with which to compare return code true code if this object is the same as the obj argument code false code otherwise public boolean equals Object obj if obj this return true if obj instanceof Service Reference Impl return false Service Reference Impl other Service Reference Impl obj return registration other registration  ServiceReferenceImpl ServiceReferenceImpl ServiceReferenceImpl
Return a string representation of this reference return String public String to String return registration to String  toString toString
Compares two service objects and returns an indication as to which is higher ranked based on service ranking and service ID The service with the higher service ranking as specified in its service ranking property is defined to be higher ranked If there is a tie in ranking the service with the lowest service ID as specified in its service id property that is the service that was registered first is returned This is the same algorithm used by Bundle Context get Service Reference returnint int 0 if this object s ranking and service id are equivalent int 0 if this object s ranking is lower than the argument s ranking or if the rankings are equal this object s service id is greater than the argument s service id int 0 if this object s ranking is higher than than the argument s ranking or if the rankings are equal this object s service id is less than the argument s service id paramobject an object to compare the receiver to exception Class Cast Exception if the argument can not be converted into something comparable with the receiver public int compare To Object object Service Reference Impl other Service Reference Impl object int compare this get Ranking other get Ranking if compare 0 rankings are equal check service id return int other get Id this get Id return compare  service_ID BundleContext getServiceReference exceptionClassCastException compareTo ServiceReferenceImpl ServiceReferenceImpl getRanking getRanking getId getId

Construct a Service Registration and register the service in the framework s service registry protected Service Registration Impl Bundle Context Impl context String clazzes Object service Dictionary properties this context context this bundle context bundle this framework context framework this clazzes clazzes must be set before calling create Properties this service service this contexts Using null this unregistered false this reference new Service Reference Impl this synchronized framework service Registry serviceid framework get Next Service Id must be set before calling create Properties this properties create Properties properties must be valid after unregister is called if Debug DEBUG Debug DEBUG SERVICES Debug println register Service bundle this NON NLS 1 NON NLS 2 NON NLS 3 framework service Registry publish Service context this must not hold the registrations lock when this event is published framework publish Service Event Service Event REGISTERED reference  ServiceRegistration ServiceRegistrationImpl BundleContextImpl createProperties contextsUsing ServiceReferenceImpl serviceRegistry getNextServiceId createProperties createProperties DEBUG_SERVICES registerService serviceRegistry publishService publishServiceEvent ServiceEvent
Unregister the service Remove a service registration from the framework s service registry All link Service Reference Impl objects for this registration can no longer be used to interact with the service p The following steps are followed to unregister a service ol li The service is removed from the framework s service registry so that it may no longer be used link Service Reference Impl s for the service may no longer be used to get a service object for the service li A link Service Event of type link Service Event UNREGISTERING is synchronously sent so that bundles using this service may release their use of the service li For each bundle whose use count for this service is greater than zero ol li The bundle s use count for this service is set to zero li If the service was registered with a link Service Factory the link Service Factory unget Service Service Factory unget Service method is called to release the service object for the bundle ol ol exception java lang Illegal State Exception If this Service Registration has already been unregistered see Bundle Context Impl unget Service public void unregister synchronized registration Lock if service null in the process of unregisterING throw new Illegal State Exception Msg formatter get String SERVICE ALREADY UNREGISTERED EXCEPTION NON NLS 1 remove this object from the service registry if Debug DEBUG Debug DEBUG SERVICES Debug println unregister Service bundle this NON NLS 1 NON NLS 2 NON NLS 3 synchronized framework service Registry framework service Registry unpublish Service context this service null mark unregisterING must not hold the registration Lock when this event is published framework publish Service Event Service Event UNREGISTERING reference we have published the Service Event now mark the service fully unregistered unregistered true int size 0 Bundle Context Impl users null synchronized registration Lock if contexts Using null size contexts Using size if size 0 if Debug DEBUG Debug DEBUG SERVICES Debug println unregister Service releasing users NON NLS 1 users Bundle Context Impl contexts Using to Array new Bundle Context Impl size must not hold the registration Lock while releasing services for int i 0 i size i release Service users i contexts Using null reference null mark registration dead context null These fields must be valid after unregister is called properties  ServiceReferenceImpl ServiceReferenceImpl ServiceEvent ServiceEvent ServiceFactory ServiceFactory ungetService ServiceFactory ungetService IllegalStateException ServiceRegistration BundleContextImpl ungetService registrationLock IllegalStateException getString SERVICE_ALREADY_UNREGISTERED_EXCEPTION DEBUG_SERVICES unregisterService serviceRegistry serviceRegistry unpublishService registrationLock publishServiceEvent ServiceEvent ServiceEvent BundleContextImpl registrationLock contextsUsing contextsUsing DEBUG_SERVICES unregisterService BundleContextImpl contextsUsing toArray BundleContextImpl registrationLock releaseService contextsUsing
Returns a link Service Reference Impl object for this registration The link Service Reference Impl object may be shared with other bundles exception java lang Illegal State Exception If this Service Registration has already been unregistered return A link Service Reference Impl object public org osgi framework Service Reference get Reference use reference instead of unregistered so that Service Factorys called by release Service after the registration is unregistered can get the Service Reference Note this technically may voilate the spec but makes more sense if reference null throw new Illegal State Exception Msg formatter get String SERVICE ALREADY UNREGISTERED EXCEPTION NON NLS 1 return reference  ServiceReferenceImpl ServiceReferenceImpl IllegalStateException ServiceRegistration ServiceReferenceImpl ServiceReference getReference ServiceFactorys releaseService ServiceReference IllegalStateException getString SERVICE_ALREADY_UNREGISTERED_EXCEPTION
Update the properties associated with this service p The key object Class cannot be modified by this method It s value is set when the service is registered p The following steps are followed to modify a service s properties ol li The service s properties are replaced with the provided properties li A link Service Event of type link Service Event MODIFIED is synchronously sent ol param props The properties for this service Changes should not be made to this object after calling this method To update the service s properties this method should be called again exception java lang Illegal State Exception If this Service Registration has already been unregistered exception Illegal Argument Exception If the tt properties tt parameter contains case variants of the same key name public void set Properties Dictionary props synchronized registration Lock if service null in the process of unregistering throw new Illegal State Exception Msg formatter get String SERVICE ALREADY UNREGISTERED EXCEPTION NON NLS 1 this properties create Properties props must not hold the registration Lock when this event is published framework publish Service Event Service Event MODIFIED reference  objectClass ServiceEvent ServiceEvent IllegalStateException ServiceRegistration IllegalArgumentException setProperties registrationLock IllegalStateException getString SERVICE_ALREADY_UNREGISTERED_EXCEPTION createProperties registrationLock publishServiceEvent ServiceEvent
Construct a properties object from the dictionary for this Service Registration param props The properties for this service return A Properties object for this Service Registration protected Properties create Properties Dictionary props Properties properties new Properties props properties set Property Constants OBJECTCLASS null remove user provided key if any properties set Property Constants OBJECTCLASS clazzes properties set Property Constants SERVICE ID null remove user provided key if any properties set Property Constants SERVICE ID new Long serviceid Object ranking properties get Property Constants SERVICE RANKING serviceranking ranking instanceof Integer Integer ranking int Value 0 return properties  ServiceRegistration ServiceRegistration createProperties setProperty setProperty setProperty SERVICE_ID setProperty SERVICE_ID getProperty SERVICE_RANKING intValue
Get the value of a service s property p This method will continue to return property values after the service has been unregistered This is so that references to unregistered service can be interrogated For example Service Reference objects stored in the log param key Name of the property return Value of the property or code null code if there is no property by that name protected Object get Property String key synchronized registration Lock return properties get Property key  ServiceReference getProperty registrationLock getProperty
Get the list of key names for the service s properties p This method will continue to return the keys after the service has been unregistered This is so that references to unregistered service can be interrogated For example Service Reference objects stored in the log return The list of property key names protected String get Property Keys synchronized registration Lock return properties get Property Keys  ServiceReference getPropertyKeys registrationLock getPropertyKeys
Return the bundle which registered the service p This method will always return code null code when the service has been unregistered This can be used to determine if the service has been unregistered return The bundle which registered the service protected Abstract Bundle get Bundle if reference null return null return bundle  AbstractBundle getBundle
Get a service object for the using Bundle Context param user Bundle Context using service return Service object protected Object get Service Bundle Context Impl user synchronized registration Lock if unregistered service unregistered return null if Debug DEBUG Debug DEBUG SERVICES Debug println get Service user bundle this NON NLS 1 NON NLS 2 NON NLS 3 Hashtable services In Use user services In Use Service Use use Service Use services In Use get reference if use null use new Service Use user this Object service use get Service if service null services In Use put reference use if contexts Using null contexts Using new Array List 10 contexts Using add user return service else return use get Service  BundleContext BundleContext getService BundleContextImpl registrationLock DEBUG_SERVICES getService servicesInUse servicesInUse ServiceUse ServiceUse servicesInUse ServiceUse getService servicesInUse contextsUsing contextsUsing ArrayList contextsUsing getService
Unget a service for the using Bundle Context param user Bundle Context using service return code false code if the context bundle s use count for the service is zero or if the service has been unregistered otherwise code true code protected boolean unget Service Bundle Context Impl user synchronized registration Lock if unregistered return false if Debug DEBUG Debug DEBUG SERVICES String bundle user bundle null user bundle to String NON NLS 1 Debug println unget Service bundle this NON NLS 1 NON NLS 2 NON NLS 3 Hashtable services In Use user services In Use if services In Use null Service Use use Service Use services In Use get reference if use null if use unget Service use count is now zero services In Use remove reference contexts Using remove user return true return false  BundleContext BundleContext ungetService BundleContextImpl registrationLock DEBUG_SERVICES toString ungetService servicesInUse servicesInUse servicesInUse ServiceUse ServiceUse servicesInUse ungetService servicesInUse contextsUsing
Release the service for the using Bundle Context param user Bundle Context using service protected void release Service Bundle Context Impl user synchronized registration Lock if reference null registration dead return if Debug DEBUG Debug DEBUG SERVICES String bundle user bundle null user bundle to String NON NLS 1 Debug println release Service bundle this NON NLS 1 NON NLS 2 NON NLS 3 Hashtable services In Use user services In Use if services In Use null Service Use use Service Use services In Use remove reference if use null use release Service contexts Using remove user  BundleContext BundleContext releaseService BundleContextImpl registrationLock DEBUG_SERVICES toString releaseService servicesInUse servicesInUse servicesInUse ServiceUse ServiceUse servicesInUse releaseService contextsUsing
Return the list of bundle which are using this service return Array of Bundles using this service protected Abstract Bundle get Using Bundles synchronized registration Lock if unregistered service unregistered return null if contexts Using null return null int size contexts Using size if size 0 return null Copy list of Bundle Context into an array of Bundle Abstract Bundle bundles new Abstract Bundle size for int i 0 i size i bundles i Bundle Context Impl contexts Using get i bundle return bundles  AbstractBundle getUsingBundles registrationLock contextsUsing contextsUsing BundleContext AbstractBundle AbstractBundle BundleContextImpl contextsUsing
Return a String representation of this object return String representation of this object public String to String String clazzes this clazzes int size clazzes length String Buffer sb new String Buffer 50 size sb append for int i 0 i size i if i 0 sb append NON NLS 1 sb append clazzes i sb append NON NLS 1 sb append properties return sb to String  toString StringBuffer StringBuffer toString
static class Properties extends Headers Create a properties object for the service param props The properties for this service private Properties int size Dictionary props super size 1 1 if props null synchronized props Enumeration enum props keys while enum has More Elements Object key enum next Element if key instanceof String String header String key set Property header props get header  hasMoreElements nextElement setProperty
Create a properties object for the service param props The properties for this service protected Properties Dictionary props this props null 2 Math max 2 props size props 
Get a clone of the value of a service s property param key header name return Clone of the value of the property or code null code if there is no property by that name protected Object get Property String key return clone Value get key  getProperty cloneValue
Get the list of key names for the service s properties return The list of property key names protected synchronized String get Property Keys int size size String keynames new String size Enumeration enum keys for int i 0 i size i keynames i String enum next Element return keynames  getPropertyKeys nextElement
Put a clone of the property value into this property object param key Name of property param value Value of property return previous property value protected synchronized Object set Property String key Object value return set key clone Value value  setProperty cloneValue
Attempt to clone the value if necessary and possible For some strange reason you can test to see of an Object is Cloneable but you can t call the clone method since it is protected on Object param value object to be cloned return cloned object or original object if we didn t clone it protected static Object clone Value Object value if value null if value instanceof String shortcut String return value Class clazz value get Class if clazz is Array Class type clazz get Component Type if type is Primitive if Integer TYPE is Assignable From type return int value clone if Long TYPE is Assignable From type return long value clone if Byte TYPE is Assignable From type return byte value clone if Short TYPE is Assignable From type return short value clone if Character TYPE is Assignable From type return char value clone if Float TYPE is Assignable From type return float value clone if Double TYPE is Assignable From type return double value clone if Boolean TYPE is Assignable From type return boolean value clone else non primitive array object return Object value clone else non array object try return clazz get Method clone null invoke value null NON NLS 1 catch Exception e clone is not a public method on value s class catch Error e JCL does not support reflection try some well known types if value instanceof Vector return Vector value clone if value instanceof Hashtable return Hashtable value clone return value  cloneValue getClass isArray getComponentType isPrimitive isAssignableFrom isAssignableFrom isAssignableFrom isAssignableFrom isAssignableFrom isAssignableFrom isAssignableFrom isAssignableFrom getMethod
public synchronized String to String String keys get Property Keys int size keys length String Buffer sb new String Buffer 20 size sb append int n 0 for int i 0 i size i String key keys i if key equals Constants OBJECTCLASS if n 0 sb append NON NLS 1 sb append key sb append sb append get key n sb append return sb to String  toString getPropertyKeys StringBuffer StringBuffer toString

Constructs a service use encapsulating the service object Objects of this class should be constrcuted while holding the registrations lock param context bundle getting the service param registration Service Registration of the service protected Service Use Bundle Context Impl context Service Registration Impl registration this context context this registration registration this use Count 0 Object service registration service if service instanceof Service Factory factory Service Factory service this service null else this factory null this service service  ServiceRegistration ServiceUse BundleContextImpl ServiceRegistrationImpl useCount ServiceFactory ServiceFactory
try service Access Controller do Privileged new Privileged Action public Object run return factory get Service context bundle registration  AccessController doPrivileged PrivilegedAction getService
Get a service s service object Retrieves the service object for a service A bundle s use of a service is tracked by a use count Each time a service s service object is returned by link get Service the context bundle s use count for the service is incremented by one Each time the service is release by link unget Service the context bundle s use count for the service is decremented by one When a bundle s use count for a service drops to zero the bundle should no longer use the service p The following steps are followed to get the service object ol li The context bundle s use count for this service is incremented by one li If the context bundle s use count for the service is now one and the service was registered with a link Service Factory the link Service Factory get Service Service Factory get Service method is called to create a service object for the context bundle This service object is cached by the framework While the context bundle s use count for the service is greater than zero subsequent calls to get the services s service object for the context bundle will return the cached service object br If the service object returned by the link Service Factory is not an code instanceof code all the classes named when the service was registered or the link Service Factory throws an exception code null code is returned and a link Framework Event of type link Framework Event ERROR is broadcast li The service object for the service is returned ol return A service object for the service associated with this reference protected Object get Service if use Count 0 factory null Abstract Bundle factorybundle registration context bundle Object service try service Access Controller do Privileged new Privileged Action public Object run return factory get Service context bundle registration catch Throwable t if Debug DEBUG Debug DEBUG SERVICES Debug println factory get Service exception t get Message NON NLS 1 Debug print Stack Trace t allow the adaptor to handle this unexpected error context framework adaptor handle Runtime Error t Bundle Exception be new Bundle Exception Msg formatter get String SERVICE FACTORY EXCEPTION factory get Class get Name get Service t NON NLS 1 NON NLS 2 context framework publish Framework Event Framework Event ERROR factorybundle be return null if service null if Debug DEBUG Debug DEBUG SERVICES Debug println factory get Service returned null NON NLS 1 Bundle Exception be new Bundle Exception Msg formatter get String SERVICE OBJECT NULL EXCEPTION factory get Class get Name NON NLS 1 context framework publish Framework Event Framework Event ERROR factorybundle be return null String clazzes registration clazzes int size clazzes length Package Admin Impl package Admin context framework package Admin for int i 0 i size i Class clazz package Admin load Service Class clazzes i factorybundle if clazz null if Debug DEBUG Debug DEBUG SERVICES Debug println clazzes i class not found NON NLS 1 Bundle Exception be new Bundle Exception Msg formatter get String SERVICE CLASS NOT FOUND EXCEPTION clazzes i NON NLS 1 context framework publish Framework Event Framework Event ERROR factorybundle be return null if clazz is Instance service if Debug DEBUG Debug DEBUG SERVICES Debug println Service object from Service Factory is not an instanceof clazzes i NON NLS 1 Bundle Exception be new Bundle Exception Msg formatter get String SERVICE NOT INSTANCEOF CLASS EXCEPTION factory get Class get Name clazzes i NON NLS 1 context framework publish Framework Event Framework Event ERROR factorybundle be return null this service service use Count return this service  getService ungetService ServiceFactory ServiceFactory getService ServiceFactory getService ServiceFactory ServiceFactory FrameworkEvent FrameworkEvent getService useCount AbstractBundle AccessController doPrivileged PrivilegedAction getService DEBUG_SERVICES getService getMessage printStackTrace handleRuntimeError BundleException BundleException getString SERVICE_FACTORY_EXCEPTION getClass getName getService publishFrameworkEvent FrameworkEvent DEBUG_SERVICES getService BundleException BundleException getString SERVICE_OBJECT_NULL_EXCEPTION getClass getName publishFrameworkEvent FrameworkEvent PackageAdminImpl packageAdmin packageAdmin packageAdmin loadServiceClass DEBUG_SERVICES BundleException BundleException getString SERVICE_CLASS_NOT_FOUND_EXCEPTION publishFrameworkEvent FrameworkEvent isInstance DEBUG_SERVICES ServiceFactory BundleException BundleException getString SERVICE_NOT_INSTANCEOF_CLASS_EXCEPTION getClass getName publishFrameworkEvent FrameworkEvent useCount
Access Controller do Privileged new Privileged Action public Object run factory unget Service context bundle registration service return null  AccessController doPrivileged PrivilegedAction ungetService
Unget a service s service object Releases the service object for a service If the context bundle s use count for the service is zero this method returns code false code Otherwise the context bundle s use count for the service is decremented by one p The service s service object should no longer be used and all references to it should be destroyed when a bundle s use count for the service drops to zero p The following steps are followed to unget the service object ol li If the context bundle s use count for the service is zero or the service has been unregistered code false code is returned li The context bundle s use count for this service is decremented by one li If the context bundle s use count for the service is now zero and the service was registered with a link Service Factory the link Service Factory unget Service Service Factory unget Service method is called to release the service object for the context bundle li code true code is returned ol return code true code if the context bundle s use count for the service is zero otherwise code false code protected boolean unget Service if use Count 0 return true use Count if use Count 0 if factory null try Access Controller do Privileged new Privileged Action public Object run factory unget Service context bundle registration service return null catch Throwable t if Debug DEBUG Debug DEBUG GENERAL Debug println factory unget Service exception NON NLS 1 Debug print Stack Trace t Abstract Bundle factorybundle registration context bundle Bundle Exception be new Bundle Exception Msg formatter get String SERVICE FACTORY EXCEPTION factory get Class get Name unget Service t NON NLS 1 NON NLS 2 context framework publish Framework Event Framework Event ERROR factorybundle be service null return true return false  ServiceFactory ServiceFactory ungetService ServiceFactory ungetService ungetService useCount useCount useCount AccessController doPrivileged PrivilegedAction ungetService DEBUG_GENERAL ungetService printStackTrace AbstractBundle BundleException BundleException getString SERVICE_FACTORY_EXCEPTION getClass getName ungetService publishFrameworkEvent FrameworkEvent
Access Controller do Privileged new Privileged Action public Object run factory unget Service context bundle registration service return null  AccessController doPrivileged PrivilegedAction ungetService
Release a service s service object ol li The bundle s use count for this service is set to zero li If the service was registered with a link Service Factory the link Service Factory unget Service Service Factory unget Service method is called to release the service object for the bundle ol protected void release Service if use Count 0 factory null try Access Controller do Privileged new Privileged Action public Object run factory unget Service context bundle registration service return null catch Throwable t if Debug DEBUG Debug DEBUG SERVICES Debug println factory unget Service exception NON NLS 1 Debug print Stack Trace t Abstract Bundle factorybundle registration context bundle Bundle Exception be new Bundle Exception Msg formatter get String SERVICE FACTORY EXCEPTION factory get Class get Name unget Service t NON NLS 1 NON NLS 2 context framework publish Framework Event Framework Event ERROR factorybundle be service null use Count 0  ServiceFactory ServiceFactory ungetService ServiceFactory ungetService releaseService useCount AccessController doPrivileged PrivilegedAction ungetService DEBUG_SERVICES ungetService printStackTrace AbstractBundle BundleException BundleException getString SERVICE_FACTORY_EXCEPTION getClass getName ungetService publishFrameworkEvent FrameworkEvent useCount

Bundle Loader Proxy supplier public Single Source Package String name Bundle Loader Proxy supplier this id name this supplier supplier  BundleLoaderProxy SingleSourcePackage BundleLoaderProxy
public Bundle Loader Proxy get Supplier return supplier  BundleLoaderProxy getSupplier
public boolean is Multivalued return false  isMultivalued
public Bundle Loader Proxy get Suppliers return new Bundle Loader Proxy supplier  BundleLoaderProxy getSuppliers BundleLoaderProxy
public String to String return id supplier NON NLS 1  toString

Creates a Start Level event regarding the specified bundle param type The type of startlevel event inc or dec param new Sl the ultimate requested startlevel we are on our way to param bundle The affected bundle or system bundle if it is for the framework public Start Level Event int type int new Sl Abstract Bundle bundle super bundle this type type this new Sl new Sl this bundle bundle  StartLevel newSl StartLevelEvent newSl AbstractBundle newSl newSl
public int get Type return this type  getType
public int get NewSL return this new Sl  getNewSL newSl
public Abstract Bundle get Bundle return this bundle  AbstractBundle getBundle

This constructor is called by the Start Level factory protected Start Level Impl Bundle owner Framework framework this owner owner this manager framework start Level Manager  StartLevel StartLevelImpl startLevelManager
Return the initial start level value that is assigned to a Bundle when it is first installed return The initial start level value for Bundles see set Initial Bundle Start Level public int get Initial Bundle Start Level return manager get Initial Bundle Start Level  setInitialBundleStartLevel getInitialBundleStartLevel getInitialBundleStartLevel
Set the initial start level value that is assigned to a Bundle when it is first installed p The initial bundle start level will be set to the specified start level The initial bundle start level value will be persistently recorded by the Framework p When a Bundle is installed via tt Bundle Context install Bundle tt it is assigned the initial bundle start level value p The default initial bundle start level value is 1 unless this method has been called to assign a different initial bundle start level value p This method does not change the start level values of installed bundles param startlevel The initial start level for newly installed bundles throws Illegal Argument Exception If the specified start level is less than or equal to zero throws Security Exception if the caller does not have the tt Admin Permission tt and the Java runtime environment supports permissions public void set Initial Bundle Start Level int startlevel manager set Initial Bundle Start Level startlevel  BundleContext installBundle IllegalArgumentException SecurityException AdminPermission setInitialBundleStartLevel setInitialBundleStartLevel
Return the active start level value of the Framework If the Framework is in the process of changing the start level this method must return the active start level if this differs from the requested start level return The active start level value of the Framework public int get Start Level return manager get Start Level  getStartLevel getStartLevel
Modify the active start level of the Framework p The Framework will move to the requested start level This method will return immediately to the caller and the start level change will occur asynchronously on another thread p If the specified start level is higher than the active start level the Framework will continue to increase the start level until the Framework has reached the specified start level starting bundles at each start level which are persistently marked to be started as described in the tt Bundle start tt method At each intermediate start level value on the way to and including the target start level the framework must ol li Change the active start level to the intermediate start level value li Start bundles at the intermediate start level in ascending order by tt Bundle get Bundle Id tt ol When this process completes after the specified start level is reached the Framework will broadcast a Framework event of type tt Framework Event STARTLEVEL CHANGED tt to announce it has moved to the specified start level p If the specified start level is lower than the active start level the Framework will continue to decrease the start level until the Framework has reached the specified start level stopping bundles at each start level as described in the tt Bundle stop tt method except that their persistently recorded state indicates that they must be restarted in the future At each intermediate start level value on the way to and including the specified start level the framework must ol li Stop bundles at the intermediate start level in descending order by tt Bundle get Bundle Id tt li Change the active start level to the intermediate start level value ol When this process completes after the specified start level is reached the Framework will broadcast a Framework event of type tt Framework Event STARTLEVEL CHANGED tt to announce it has moved to the specified start level p If the specified start level is equal to the active start level then no bundles are started or stopped however the Framework must broadcast a Framework event of type tt Framework Event STARTLEVEL CHANGED tt to announce it has finished moving to the specified start level This event may arrive before the this method return param newSL The requested start level for the Framework throws Illegal Argument Exception If the specified start level is less than or equal to zero throws Security Exception If the caller does not have the tt Admin Permission tt and the Java runtime environment supports permissions public void set Start Level int newSL manager set Start Level newSL owner  getBundleId FrameworkEvent STARTLEVEL_CHANGED getBundleId FrameworkEvent STARTLEVEL_CHANGED FrameworkEvent STARTLEVEL_CHANGED IllegalArgumentException SecurityException AdminPermission setStartLevel setStartLevel
Return the persistent state of the specified bundle p This method returns the persistent state of a bundle The persistent state of a bundle indicates whether a bundle is persistently marked to be started when it s start level is reached return tt true tt if the bundle is persistently marked to be started tt false tt if the bundle is not persistently marked to be started exception java lang Illegal Argument Exception If the specified bundle has been uninstalled public boolean is Bundle Persistently Started Bundle bundle return manager is Bundle Persistently Started bundle  IllegalArgumentException isBundlePersistentlyStarted isBundlePersistentlyStarted
Return the assigned start level value for the specified Bundle param bundle The target bundle return The start level value of the specified Bundle exception java lang Illegal Argument Exception If the specified bundle has been uninstalled public int get Bundle Start Level Bundle bundle return manager get Bundle Start Level bundle  IllegalArgumentException getBundleStartLevel getBundleStartLevel
Assign a start level value to the specified Bundle p The specified bundle will be assigned the specified start level The start level value assigned to the bundle will be persistently recorded by the Framework If the new start level for the bundle is lower than or equal to the active start level of the Framework the Framework will start the specified bundle as described in the tt Bundle start tt method if the bundle is persistently marked to be started The actual starting of this bundle must occur asynchronously If the new start level for the bundle is higher than the active start level of the Framework the Framework will stop the specified bundle as described in the tt Bundle stop tt method except that the persistently recorded state for the bundle indicates that the bundle must be restarted in the future The actual stopping of this bundle must occur asynchronously param bundle The target bundle param newSL The new start level for the specified Bundle throws Illegal Argument Exception If the specified bundle has been uninstalled or if the specified start level is less than or equal to zero or the specified bundle is the system bundle throws Security Exception if the caller does not have the tt Admin Permission tt and the Java runtime environment supports permissions public void set Bundle Start Level Bundle bundle int newSL manager set Bundle Start Level bundle newSL  IllegalArgumentException SecurityException AdminPermission setBundleStartLevel setBundleStartLevel

private static final Object lock new Object This constructor is called by the Framework protected Start Level Manager Framework framework Start Level Manager framework framework  StartLevelManager StartLevelManager
protected void initialize initial Bundle Start Level framework adaptor get Initial Bundle Start Level Set Framework Beginning Start Level Property String value framework get Property Constants OSGI FRAMEWORKBEGINNINGSTARTLEVEL if value null value Constants DEFAULT STARTLEVEL else try if Integer parse Int value 0 System err println Msg formatter get String PROPERTIES INVALID FW STARTLEVEL Constants DEFAULT STARTLEVEL NON NLS 1 value Constants DEFAULT STARTLEVEL catch Number Format Exception nfe System err println Msg formatter get String PROPERTIES INVALID FW STARTLEVEL Constants DEFAULT STARTLEVEL NON NLS 1 value Constants DEFAULT STARTLEVEL framework set Property Constants OSGI FRAMEWORKBEGINNINGSTARTLEVEL value framework Beginning Start Level Integer parse Int value create an event manager and a start level listener event Manager new Event Manager Start Level Event Dispatcher NON NLS 1 start Level Listeners new Event Listeners start Level Listeners add Listener this this  initialBundleStartLevel getInitialBundleStartLevel getProperty OSGI_FRAMEWORKBEGINNINGSTARTLEVEL DEFAULT_STARTLEVEL parseInt getString PROPERTIES_INVALID_FW_STARTLEVEL DEFAULT_STARTLEVEL DEFAULT_STARTLEVEL NumberFormatException getString PROPERTIES_INVALID_FW_STARTLEVEL DEFAULT_STARTLEVEL DEFAULT_STARTLEVEL setProperty OSGI_FRAMEWORKBEGINNINGSTARTLEVEL frameworkBeginningStartLevel parseInt eventManager EventManager startLevelListeners EventListeners startLevelListeners addListener
protected void cleanup event Manager close event Manager null start Level Listeners remove All Listeners start Level Listeners null  eventManager eventManager startLevelListeners removeAllListeners startLevelListeners
Return the initial start level value that is assigned to a Bundle when it is first installed return The initial start level value for Bundles see set Initial Bundle Start Level public int get Initial Bundle Start Level return initial Bundle Start Level  setInitialBundleStartLevel getInitialBundleStartLevel initialBundleStartLevel
Return the initial start level used when the framework is started return The framework start level public int get Framework Start Level return framework Beginning Start Level  getFrameworkStartLevel frameworkBeginningStartLevel
Set the initial start level value that is assigned to a Bundle when it is first installed p The initial bundle start level will be set to the specified start level The initial bundle start level value will be persistently recorded by the Framework p When a Bundle is installed via tt Bundle Context install Bundle tt it is assigned the initial bundle start level value p The default initial bundle start level value is 1 unless this method has been called to assign a different initial bundle start level value p This method does not change the start level values of installed bundles param startlevel The initial start level for newly installed bundles throws Illegal Argument Exception If the specified start level is less than or equal to zero throws Security Exception if the caller does not have the tt Admin Permission tt and the Java runtime environment supports permissions public void set Initial Bundle Start Level int startlevel framework check Admin Permission if startlevel 0 throw new Illegal Argument Exception initial Bundle Start Level startlevel framework adaptor set Initial Bundle Start Level startlevel  BundleContext installBundle IllegalArgumentException SecurityException AdminPermission setInitialBundleStartLevel checkAdminPermission IllegalArgumentException initialBundleStartLevel setInitialBundleStartLevel
Return the active start level value of the Framework If the Framework is in the process of changing the start level this method must return the active start level if this differs from the requested start level return The active start level value of the Framework public int get Start Level return activeSL  getStartLevel
Modify the active start level of the Framework p The Framework will move to the requested start level This method will return immediately to the caller and the start level change will occur asynchronously on another thread p If the specified start level is higher than the active start level the Framework will continue to increase the start level until the Framework has reached the specified start level starting bundles at each start level which are persistently marked to be started as described in the tt Bundle start tt method At each intermediate start level value on the way to and including the target start level the framework must ol li Change the active start level to the intermediate start level value li Start bundles at the intermediate start level in ascending order by tt Bundle get Bundle Id tt ol When this process completes after the specified start level is reached the Framework will broadcast a Framework event of type tt Framework Event STARTLEVEL CHANGED tt to announce it has moved to the specified start level p If the specified start level is lower than the active start level the Framework will continue to decrease the start level until the Framework has reached the specified start level stopping bundles at each start level as described in the tt Bundle stop tt method except that their persistently recorded state indicates that they must be restarted in the future At each intermediate start level value on the way to and including the specified start level the framework must ol li Stop bundles at the intermediate start level in descending order by tt Bundle get Bundle Id tt li Change the active start level to the intermediate start level value ol When this process completes after the specified start level is reached the Framework will broadcast a Framework event of type tt Framework Event STARTLEVEL CHANGED tt to announce it has moved to the specified start level p If the specified start level is equal to the active start level then no bundles are started or stopped however the Framework must broadcast a Framework event of type tt Framework Event STARTLEVEL CHANGED tt to announce it has finished moving to the specified start level This event may arrive before the this method return param newSL The requested start level for the Framework throws Illegal Argument Exception If the specified start level is less than or equal to zero throws Security Exception If the caller does not have the tt Admin Permission tt and the Java runtime environment supports permissions public void set Start Level int newSL org osgi framework Bundle caller Bundle if newSL 0 throw new Illegal Argument Exception Msg formatter get String STARTLEVEL EXCEPTION INVALID REQUESTED STARTLEVEL newSL NON NLS 1 NON NLS 2 framework check Admin Permission if Debug DEBUG Debug DEBUG STARTLEVEL Debug println Start Level Impl set Start Level newSL caller Bundle caller Bundle get Bundle Id NON NLS 1 NON NLS 2 issue Event new Start Level Event Start Level Event CHANGE FW SL newSL Abstract Bundle caller Bundle  getBundleId FrameworkEvent STARTLEVEL_CHANGED getBundleId FrameworkEvent STARTLEVEL_CHANGED FrameworkEvent STARTLEVEL_CHANGED IllegalArgumentException SecurityException AdminPermission setStartLevel callerBundle IllegalArgumentException getString STARTLEVEL_EXCEPTION_INVALID_REQUESTED_STARTLEVEL checkAdminPermission DEBUG_STARTLEVEL StartLevelImpl setStartLevel callerBundle callerBundle getBundleId issueEvent StartLevelEvent StartLevelEvent CHANGE_FW_SL AbstractBundle callerBundle
protected void set Start Level int newSL set Start Level newSL framework system Bundle  setStartLevel setStartLevel systemBundle
Internal method to allow the framework to be launched synchronously by calling the Start Level Listener worker calls directly This method does not return until all bundles that should be started are started protected void launch int startlevel do Set Start Level startlevel framework system Bundle  StartLevelListener doSetStartLevel systemBundle
Internal method to shut down the framework synchronously by setting the startlevel to zero and calling the Start Level Listener worker calls directly This method does not return until all bundles are stopped and the framework is shut down protected void shutdown do Set Start Level 0 framework system Bundle  StartLevelListener doSetStartLevel systemBundle
Internal worker method to set the startlevel param newSL start level value param caller Bundle the bundle initiating the change in start level private void do Set Start Level int newSL Abstract Bundle caller Bundle synchronized lock int tempSL activeSL if newSL tempSL for int i tempSL i newSL i if Debug DEBUG Debug DEBUG STARTLEVEL Debug println sync incrementing Startlevel from tempSL NON NLS 1 tempSL incFWSL i 1 caller Bundle else for int i tempSL i newSL i if Debug DEBUG Debug DEBUG STARTLEVEL Debug println sync decrementing Startlevel from tempSL NON NLS 1 tempSL decFWSL i 1 framework publish Framework Event Framework Event STARTLEVEL CHANGED caller Bundle null if Debug DEBUG Debug DEBUG STARTLEVEL Debug println Start Level Impl do Set Start Level STARTLEVEL CHANGED event published NON NLS 1  callerBundle doSetStartLevel AbstractBundle callerBundle DEBUG_STARTLEVEL callerBundle DEBUG_STARTLEVEL publishFrameworkEvent FrameworkEvent STARTLEVEL_CHANGED callerBundle DEBUG_STARTLEVEL StartLevelImpl doSetStartLevel STARTLEVEL_CHANGED
This method is used within the package to save the actual active startlevel value for the framework Externally the set Start Level method must be used param newSL the new startlevel to save protected void save Active Start Level int newSL synchronized lock activeSL newSL  setStartLevel saveActiveStartLevel
Return the persistent state of the specified bundle p This method returns the persistent state of a bundle The persistent state of a bundle indicates whether a bundle is persistently marked to be started when it s start level is reached return tt true tt if the bundle is persistently marked to be started tt false tt if the bundle is not persistently marked to be started exception java lang Illegal Argument Exception If the specified bundle has been uninstalled public boolean is Bundle Persistently Started org osgi framework Bundle bundle if bundle get State Abstract Bundle UNINSTALLED throw new Illegal Argument Exception Msg formatter get String BUNDLE UNINSTALLED EXCEPTION NON NLS 1 Abstract Bundle b Abstract Bundle bundle int status b get Bundle Data get Status return status org eclipse osgi framework internal core Constants BUNDLE STARTED Constants BUNDLE STARTED  IllegalArgumentException isBundlePersistentlyStarted getState AbstractBundle IllegalArgumentException getString BUNDLE_UNINSTALLED_EXCEPTION AbstractBundle AbstractBundle getBundleData getStatus BUNDLE_STARTED BUNDLE_STARTED
Return the assigned start level value for the specified Bundle param bundle The target bundle return The start level value of the specified Bundle exception java lang Illegal Argument Exception If the specified bundle has been uninstalled public int get Bundle Start Level org osgi framework Bundle bundle if bundle get State Abstract Bundle UNINSTALLED throw new Illegal Argument Exception Msg formatter get String BUNDLE UNINSTALLED EXCEPTION NON NLS 1 return Abstract Bundle bundle get Start Level  IllegalArgumentException getBundleStartLevel getState AbstractBundle IllegalArgumentException getString BUNDLE_UNINSTALLED_EXCEPTION AbstractBundle getStartLevel
Assign a start level value to the specified Bundle p The specified bundle will be assigned the specified start level The start level value assigned to the bundle will be persistently recorded by the Framework If the new start level for the bundle is lower than or equal to the active start level of the Framework the Framework will start the specified bundle as described in the tt Bundle start tt method if the bundle is persistently marked to be started The actual starting of this bundle must occur asynchronously If the new start level for the bundle is higher than the active start level of the Framework the Framework will stop the specified bundle as described in the tt Bundle stop tt method except that the persistently recorded state for the bundle indicates that the bundle must be restarted in the future The actual stopping of this bundle must occur asynchronously param bundle The target bundle param newSL The new start level for the specified Bundle throws Illegal Argument Exception If the specified bundle has been uninstalled or if the specified start level is less than or equal to zero or the specified bundle is the system bundle throws Security Exception if the caller does not have the tt Admin Permission tt and the Java runtime environment supports permissions public void set Bundle Start Level org osgi framework Bundle bundle int newSL String exception Text NON NLS 1 if bundle get Bundle Id 0 system bundle has id 0 exception Text Msg formatter get String STARTLEVEL CANT CHANGE SYSTEMBUNDLE STARTLEVEL NON NLS 1 else if bundle get State Abstract Bundle UNINSTALLED exception Text Msg formatter get String BUNDLE UNINSTALLED EXCEPTION NON NLS 1 else if newSL 0 exception Text Msg formatter get String STARTLEVEL EXCEPTION INVALID REQUESTED STARTLEVEL newSL NON NLS 1 NON NLS 2 if exception Text length 0 throw new Illegal Argument Exception exception Text try if the bundle s startlevel is not already at the requested startlevel if newSL org eclipse osgi framework internal core Abstract Bundle bundle get Start Level Abstract Bundle b Abstract Bundle bundle b get Bundle Data set Start Level newSL b get Bundle Data save framework check Admin Permission handle starting or stopping the bundle asynchronously issue Event new Start Level Event Start Level Event CHANGE BUNDLE SL newSL Abstract Bundle bundle catch IO Exception e framework publish Framework Event Framework Event ERROR bundle e  IllegalArgumentException SecurityException AdminPermission setBundleStartLevel exceptionText getBundleId exceptionText getString STARTLEVEL_CANT_CHANGE_SYSTEMBUNDLE_STARTLEVEL getState AbstractBundle exceptionText getString BUNDLE_UNINSTALLED_EXCEPTION exceptionText getString STARTLEVEL_EXCEPTION_INVALID_REQUESTED_STARTLEVEL exceptionText IllegalArgumentException exceptionText AbstractBundle getStartLevel AbstractBundle AbstractBundle getBundleData setStartLevel getBundleData checkAdminPermission issueEvent StartLevelEvent StartLevelEvent CHANGE_BUNDLE_SL AbstractBundle IOException publishFrameworkEvent FrameworkEvent
This method sends the Start Level Event to the Event Manager for dispatching param sle The event to be queued to the Event Manager private void issue Event Start Level Event sle queue to hold set of listeners Listener Queue queue new Listener Queue event Manager add set of Start Level Listeners to queue queue queue Listeners start Level Listeners this dispatch event to set of listeners queue dispatch Event Asynchronous sle get Type sle  StartLevelEvent EventManager issueEvent StartLevelEvent ListenerQueue ListenerQueue eventManager StartLevelListeners queueListeners startLevelListeners dispatchEventAsynchronous getType
This method is the call back that is called once for each listener This method must cast the Event Listener object to the appropriate listener class for the event type and call the appropriate listener method param listener This listener must be cast to the appropriate listener class for the events created by this source and the appropriate listener method must then be called param listener Object This is the optional object that was passed to Event Listeners add Listener when the listener was added to the Event Listeners param event Action This value was passed to the Listener Queue object via one of its dispatch Event method calls It can provide information such as which listener method to call so that this method can complete the delivery of the event to the listener param event Object This object was passed to the Listener Queue object via one of its dispatch Event method calls This object was created by the event source and is passed to this method It should contain all the necessary information such as what event object to pass so that this method can complete the delivery of the event to the listener public void dispatch Event Object listener Object listener Object int event Action Object event Object try switch event Action case Start Level Event CHANGE BUNDLE SL set BundleSL Start Level Event event Object break case Start Level Event CHANGE FW SL do Set Start Level Start Level Event event Object get NewSL Start Level Event event Object get Bundle break catch Throwable t allow the adaptor to handle this unexpected error framework adaptor handle Runtime Error t  EventListener listenerObject EventListeners addListener EventListeners eventAction ListenerQueue dispatchEvent eventObject ListenerQueue dispatchEvent dispatchEvent listenerObject eventAction eventObject eventAction StartLevelEvent CHANGE_BUNDLE_SL setBundleSL StartLevelEvent eventObject StartLevelEvent CHANGE_FW_SL doSetStartLevel StartLevelEvent eventObject getNewSL StartLevelEvent eventObject getBundle handleRuntimeError
Increment the active startlevel by one protected void incFWSL int activeSL Abstract Bundle caller Bundle if Debug DEBUG Debug DEBUG STARTLEVEL Debug println SLL incFWSL saving activeSL of activeSL NON NLS 1 framework start Level Manager save Active Start Level activeSL Abstract Bundle launch Bundle Repository bundles framework bundles launch get Installed Bundles bundles if activeSL 1 framework was not active Load all installed bundles load Installed Bundles launch attempt to resolve all bundles framework package Admin set Resolved Bundles Resume all bundles resume Bundles launch true publish the framework started event if Debug DEBUG Debug DEBUG STARTLEVEL Debug println SLL Framework started NON NLS 1 framework publish Framework Event Framework Event STARTED caller Bundle null else incrementing an already active framework resume Bundles launch false  AbstractBundle callerBundle DEBUG_STARTLEVEL startLevelManager saveActiveStartLevel AbstractBundle BundleRepository getInstalledBundles loadInstalledBundles packageAdmin setResolvedBundles resumeBundles DEBUG_STARTLEVEL publishFrameworkEvent FrameworkEvent callerBundle resumeBundles
Build an array of all installed bundles to be launch The returned array is sorted by increasing startlevel id order param bundles the bundles installed in the framework return A sorted array of bundles private Abstract Bundle get Installed Bundles Bundle Repository bundles make copy of bundles vector in case it is modified during launch Abstract Bundle installed Bundles synchronized bundles List all Bundles bundles get Bundles installed Bundles new Abstract Bundle all Bundles size all Bundles to Array installed Bundles sort bundle array in ascending startlevel bundle id order so that bundles are started in ascending order Util sort installed Bundles 0 installed Bundles length return installed Bundles  AbstractBundle getInstalledBundles BundleRepository AbstractBundle installedBundles allBundles getBundles installedBundles AbstractBundle allBundles allBundles toArray installedBundles installedBundles installedBundles installedBundles
Load all bundles in the list param installed Bundles a list of bundles to load private void load Installed Bundles Abstract Bundle installed Bundles for int i 0 i installed Bundles length i Abstract Bundle bundle installed Bundles i try if Debug DEBUG Debug DEBUG STARTLEVEL Debug println SLL Trying to load bundle bundle NON NLS 1 bundle load catch Bundle Exception be if Debug DEBUG Debug DEBUG STARTLEVEL Debug println SLL Bundle load exception be get Message NON NLS 1 Debug print Stack Trace be get Nested Exception framework publish Framework Event Framework Event ERROR bundle be  installedBundles loadInstalledBundles AbstractBundle installedBundles installedBundles AbstractBundle installedBundles DEBUG_STARTLEVEL BundleException DEBUG_STARTLEVEL getMessage printStackTrace getNestedException publishFrameworkEvent FrameworkEvent
Resume all bundles in the launch list param launch a list of Bundle Objects to launch param launchingFW tells whether or not to launch the framework system bundle private void resume Bundles Abstract Bundle launch boolean launchingFW if launchingFW Start the system bundle try framework system Bundle context start catch Bundle Exception be if Debug DEBUG Debug DEBUG STARTLEVEL Debug println SLL Bundle resume exception be get Message NON NLS 1 Debug print Stack Trace be get Nested Exception framework publish Framework Event Framework Event ERROR framework system Bundle be throw new Runtime Exception be get Message Resume all bundles that were previously started and whose startlevel is the active startlevel int fwsl framework start Level Manager get Start Level for int i 0 i launch length i int bsl launch i get Start Level if bsl fwsl skip bundles who should have already been started continue else if bsl fwsl if Debug DEBUG Debug DEBUG STARTLEVEL Debug println SLL Active sl fwsl Bundle launch i get Bundle Id sl bsl NON NLS 1 NON NLS 2 NON NLS 3 framework resume Bundle launch i else can stop resuming bundles since any remaining bundles have a greater startlevel than the framework active startlevel break framework system Bundle state Abstract Bundle ACTIVE  resumeBundles AbstractBundle systemBundle BundleException DEBUG_STARTLEVEL getMessage printStackTrace getNestedException publishFrameworkEvent FrameworkEvent systemBundle RuntimeException getMessage startLevelManager getStartLevel getStartLevel DEBUG_STARTLEVEL getBundleId resumeBundle systemBundle AbstractBundle
Decrement the active startlevel by one param activeSL the startlevel value to set the framework to protected void decFWSL int activeSL if Debug DEBUG Debug DEBUG STARTLEVEL Debug println SLL decFWSL saving activeSL of activeSL NON NLS 1 framework start Level Manager save Active Start Level activeSL Bundle Repository bundles framework bundles if activeSL 0 stopping the framework stop all running bundles suspend All Bundles bundles unload All Bundles bundles else just decrementing the active startlevel framework is not shutting down synchronized bundles get the list of installed bundles sorted by startlevel Abstract Bundle shutdown this get Installed Bundles bundles for int i shutdown length 1 i 0 i int bsl shutdown i get Start Level if bsl activeSL 1 don t need to mess with bundles with startlevel the previous active they should already have been stopped continue else if bsl activeSL don t need to keep going we ve stopped all we re going to stop break else if shutdown i is Active if bundle is active or starting then stop the bundle if Debug DEBUG Debug DEBUG STARTLEVEL Debug println SLL stopping bundle shutdown i get Bundle Id NON NLS 1 framework suspend Bundle shutdown i false  DEBUG_STARTLEVEL startLevelManager saveActiveStartLevel BundleRepository suspendAllBundles unloadAllBundles AbstractBundle getInstalledBundles getStartLevel isActive DEBUG_STARTLEVEL getBundleId suspendBundle
Suspends all bundles in the vector passed in param bundles list of Bundle objects to be suspended private void suspend All Bundles Bundle Repository bundles synchronized bundles boolean changed do changed false Abstract Bundle shutdown this get Installed Bundles bundles shutdown all running bundles for int i shutdown length 1 i 0 i Abstract Bundle bundle shutdown i if framework suspend Bundle bundle false if Debug DEBUG Debug DEBUG STARTLEVEL Debug println SLL stopped bundle bundle get Bundle Id NON NLS 1 changed true while changed try framework system Bundle context stop catch Bundle Exception sbe if Debug DEBUG Debug DEBUG STARTLEVEL Debug println SLL Bundle suspend exception sbe get Message NON NLS 1 Debug print Stack Trace sbe get Nested Exception framework publish Framework Event Framework Event ERROR framework system Bundle sbe framework system Bundle state Abstract Bundle STARTING  suspendAllBundles BundleRepository AbstractBundle getInstalledBundles AbstractBundle suspendBundle DEBUG_STARTLEVEL getBundleId systemBundle BundleException DEBUG_STARTLEVEL getMessage printStackTrace getNestedException publishFrameworkEvent FrameworkEvent systemBundle systemBundle AbstractBundle
Unloads all bundles in the vector passed in param bundles list of Bundle objects to be unloaded private void unload All Bundles Bundle Repository bundles synchronized bundles unload all installed bundles List all Bundles bundles get Bundles int size all Bundles size for int i 0 i size i Abstract Bundle bundle Abstract Bundle all Bundles get i if Debug DEBUG Debug DEBUG STARTLEVEL Debug println SLL Trying to unload bundle bundle NON NLS 1 try bundle refresh catch Bundle Exception e do nothing  unloadAllBundles BundleRepository allBundles getBundles allBundles AbstractBundle AbstractBundle allBundles DEBUG_STARTLEVEL BundleException
Set the bundle s startlevel to the new value This may cause the bundle to start or stop based on the active framework startlevel param start Level Event the event requesting change in bundle startlevel protected void set BundleSL Start Level Event start Level Event synchronized lock int activeSL framework start Level Manager get Start Level int newSL start Level Event get NewSL Abstract Bundle bundle start Level Event get Bundle int bundlestate bundle get State if Debug DEBUG Debug DEBUG STARTLEVEL Debug print SLL bundle active bundle is Active NON NLS 1 Debug print newSL newSL NON NLS 1 Debug println activeSL activeSL NON NLS 1 if bundle is Active newSL activeSL if Debug DEBUG Debug DEBUG STARTLEVEL Debug println SLL stopping bundle bundle get Bundle Id NON NLS 1 framework suspend Bundle bundle false else if bundle is Active newSL activeSL if Debug DEBUG Debug DEBUG STARTLEVEL Debug println SLL starting bundle bundle get Bundle Id NON NLS 1 framework resume Bundle bundle if Debug DEBUG Debug DEBUG STARTLEVEL Debug println SLL Bundle Startlevel set to newSL NON NLS 1  startLevelEvent setBundleSL StartLevelEvent startLevelEvent startLevelManager getStartLevel startLevelEvent getNewSL AbstractBundle startLevelEvent getBundle getState DEBUG_STARTLEVEL isActive isActive DEBUG_STARTLEVEL getBundleId suspendBundle isActive DEBUG_STARTLEVEL getBundleId resumeBundle DEBUG_STARTLEVEL
Returns a Start Level object created for each requesting bundle param owner bundle requested to get Start Level service pre caller Bundle null param registration Service Registration of the Start Level service pre s Reg null return Start Level object public Object get Service Bundle owner Service Registration registration return new Start Level Impl owner framework  StartLevel StartLevel callerBundle ServiceRegistration StartLevel sReg StartLevel getService ServiceRegistration StartLevelImpl
Does nothing as the Start Level bundle does not keep references to Start Level objects param owner bundle requesting to unget Start Level service param registration Service Registration of Start Level param service Service object already been got by this bundle public void unget Service Bundle owner Service Registration registration Object service  StartLevel StartLevel StartLevel ServiceRegistration StartLevel ungetService ServiceRegistration

Private System Bundle object constructor This method creates the System Bundle and its Bundle Context The System Bundle s state is set to STARTING This method is called when the framework is constructed param framework Framework this bundle is running in protected System Bundle Framework framework throws Bundle Exception super framework adaptor create System Bundle Data framework startlevel 0 means framework stopped state STARTING context create Context  SystemBundle SystemBundle BundleContext SystemBundle SystemBundle BundleException createSystemBundleData createContext
public Bundle Loader get Bundle Loader if loader null synchronized this if loader null try loader new System Bundle Loader this get Bundle Description catch Bundle Exception e framework publish Framework Event Framework Event ERROR this e return null return loader  BundleLoader getBundleLoader SystemBundleLoader getBundleDescription BundleException publishFrameworkEvent FrameworkEvent
Load the bundle This methods overrides the Bundle method and does nothing protected void load throws Bundle Exception Security Manager sm System get Security Manager if sm null domain get Class get Protection Domain  BundleException SecurityManager getSecurityManager getClass getProtectionDomain
Reload from a new bundle This methods overrides the Bundle method and does nothing param new Bundle return false protected boolean reload Abstract Bundle new Bundle throws Bundle Exception return false  newBundle AbstractBundle newBundle BundleException
Refresh the bundle This methods overrides the Bundle method and does nothing protected void refresh throws Bundle Exception  BundleException
Unload the bundle This methods overrides the Bundle method and does nothing return false protected boolean unload return false 
Close the the Bundle s file This method closes the Bundle Context for the System Bundle and sets the System Bundle s state to UNINSTALLED protected void close context close context null state UNINSTALLED  BundleContext SystemBundle SystemBundle
This method loads a class from the bundle param name the name of the desired Class param check Permission indicates whether a permission check should be done return the resulting Class exception java lang Class Not Found Exception if the class definition was not found protected Class load Class String name boolean check Permission throws Class Not Found Exception if check Permission framework check Admin Permission check Valid return Class for Name name  checkPermission ClassNotFoundException loadClass checkPermission ClassNotFoundException checkPermission checkAdminPermission checkValid forName
Find the specified resource in this bundle This methods returns null for the system bundle public URL get Resource String name return null  getResource
Indicate System Bundle is resolved protected boolean is Unresolved return false  SystemBundle isUnresolved
Start this bundle This methods overrides the Bundle method and does nothing public void start throws Bundle Exception framework check Admin Permission  BundleException checkAdminPermission
Start the System Bundle This method launches the framework protected void resume throws Bundle Exception initialize the startlevel service framework start Level Manager initialize framework start Level Manager launch framework start Level Manager get Framework Start Level  SystemBundle BundleException startLevelManager startLevelManager startLevelManager getFrameworkStartLevel
Thread shutdown Secure Action create Thread new Runnable public void run try framework shutdown catch Throwable t allow the adaptor to handle this unexpected error framework adaptor handle Runtime Error t  SecureAction createThread handleRuntimeError
Stop the framework This method spawns a thread which will call framework shutdown public void stop throws Bundle Exception framework check Admin Permission if state ACTIVE Thread shutdown Secure Action create Thread new Runnable public void run try framework shutdown catch Throwable t allow the adaptor to handle this unexpected error framework adaptor handle Runtime Error t System Bundle Shutdown NON NLS 1 shutdown start  BundleException checkAdminPermission SecureAction createThread handleRuntimeError
Stop the System Bundle This method shuts down the framework protected void suspend throws Bundle Exception framework start Level Manager shutdown framework start Level Manager cleanup clean up the exporting loaders framework package Admin cleanup if Debug DEBUG Debug DEBUG GENERAL Debug println Framework shutdown NON NLS 1  SystemBundle BundleException startLevelManager startLevelManager packageAdmin DEBUG_GENERAL
Thread restart Secure Action create Thread new Runnable public void run framework shutdown framework launch  SecureAction createThread
Update this bundle This method spawns a thread which will call framework shutdown followed by framework launch public void update throws Bundle Exception framework check Admin Permission if state ACTIVE Thread restart Secure Action create Thread new Runnable public void run framework shutdown framework launch System Bundle Update NON NLS 1 restart start  BundleException checkAdminPermission SecureAction createThread
Update this bundle from an Input Stream This methods overrides the Bundle method and does nothing param in The Input Stream from which to read the new bundle public void update Input Stream in throws Bundle Exception update try in close catch IO Exception e  InputStream InputStream InputStream BundleException IOException
Uninstall this bundle This methods overrides the Bundle method and throws an exception public void uninstall throws Bundle Exception framework check Admin Permission throw new Bundle Exception Msg formatter get String BUNDLE SYSTEMBUNDLE UNINSTALL EXCEPTION NON NLS 1  BundleException checkAdminPermission BundleException getString BUNDLE_SYSTEMBUNDLE_UNINSTALL_EXCEPTION
Determine whether the bundle has the requested permission This methods overrides the Bundle method and returns code true code param permission The requested permission return code true code public boolean has Permission Object permission if domain null if permission instanceof Permission return domain implies Permission permission return false return true  hasPermission
No work to do for the System Bundle param unresolved Packages A list of the package which have been unresolved as a result of a package Refresh protected void unresolve Permissions Hashtable unresolved Packages  SystemBundle unresolvedPackages packageRefresh unresolvePermissions unresolvedPackages
System Bundle can never have fragments public org osgi framework Bundle get Fragments return null  getFragments
override the check Permission methods to always return true protected boolean check Export Package Permission String pkg Name return true  checkExportPackagePermission pkgName
protected boolean check Fragment Bundle Permission String symbolic Name return true  checkFragmentBundlePermission symbolicName
protected boolean check Fragment Host Permission String symbolic Name return true  checkFragmentHostPermission symbolicName
protected boolean check Import Package Permission String pkg Name return true  checkImportPackagePermission pkgName
protected boolean check Permissions return true  checkPermissions
protected boolean check Provide Bundle Permission String symbolic Name return true  checkProvideBundlePermission symbolicName
protected boolean check Require Bundle Permission String symbolic Name return true  checkRequireBundlePermission symbolicName

protected Service Registration debug Options public System Bundle Activator  ServiceRegistration debugOptions SystemBundleActivator
public void start Bundle Context context throws Exception this context context bundle System Bundle context get Bundle framework bundle framework Framework Message Format set Context context if framework package Admin null package Admin register Constants OSGI PACKAGEADMIN NAME framework package Admin if framework permission Admin null permission Admin register Constants OSGI PERMISSIONADMIN NAME framework permission Admin if framework start Level Manager null start Level register Constants OSGI STARTLEVEL NAME framework start Level Manager Debug Options dbg Options null if dbg Options Debug Options get Default null debug Options register org eclipse osgi service debug Debug Options class get Name dbg Options Always call the adaptor framework Start at the end of this method framework adaptor framework Start context  BundleContext SystemBundle getBundle FrameworkMessageFormat setContext packageAdmin packageAdmin OSGI_PACKAGEADMIN_NAME packageAdmin permissionAdmin permissionAdmin OSGI_PERMISSIONADMIN_NAME permissionAdmin startLevelManager startLevel OSGI_STARTLEVEL_NAME startLevelManager DebugOptions dbgOptions dbgOptions DebugOptions getDefault debugOptions DebugOptions getName dbgOptions frameworkStart frameworkStart
public void stop Bundle Context context throws Exception Always call the adaptor framework Stop at the begining of this method framework adaptor framework Stop context if package Admin null package Admin unregister if permission Admin null permission Admin unregister if start Level null start Level unregister if debug Options null debug Options unregister framework null bundle null this context null Framework Message Format set Context null  BundleContext frameworkStop frameworkStop packageAdmin packageAdmin permissionAdmin permissionAdmin startLevel startLevel debugOptions debugOptions FrameworkMessageFormat setContext
Register a service object protected Service Registration register String name Object service Hashtable properties new Hashtable 7 Dictionary headers bundle get Headers properties put Constants SERVICE VENDOR headers get Constants BUNDLE VENDOR properties put Constants SERVICE RANKING new Integer Integer MAX VALUE properties put Constants SERVICE PID bundle get Bundle Id service get Class get Name NON NLS 1 return context register Service name service properties  ServiceRegistration getHeaders SERVICE_VENDOR BUNDLE_VENDOR SERVICE_RANKING MAX_VALUE SERVICE_PID getBundleId getClass getName registerService

static protected String system Packages null protected synchronized static void clear System Packages system Packages null  systemPackages clearSystemPackages systemPackages
protected static void set System Packages String value system Packages value  setSystemPackages systemPackages
protected static String get System Packages return system Packages  getSystemPackages systemPackages
param bundle The system bundle param description The Bundle Descrition for the system bundle throws Bundle Exception On any error protected System Bundle Loader Bundle Host bundle Bundle Description description throws Bundle Exception super bundle description this class Loader get Class get Class Loader  BundleDescrition BundleException SystemBundleLoader BundleHost BundleDescription BundleException classLoader getClass getClassLoader
The Class Loader that loads OS Gi framework classes is used to find the class public Class find Class String name throws Class Not Found Exception return class Loader load Class name  ClassLoader OSGi findClass ClassNotFoundException classLoader loadClass
This method will always return null public String find Library String name return null  findLibrary
The Class Loader that loads OS Gi framework classes is used to find the class protected Class find Local Class String name Class clazz null try clazz class Loader load Class name catch Class Not Found Exception e Do nothing will return null return clazz  ClassLoader OSGi findLocalClass classLoader loadClass ClassNotFoundException
The Class Loader that loads OS Gi framework classes is used to find the resource protected URL find Local Resource String name return class Loader get Resource name  ClassLoader OSGi findLocalResource classLoader getResource
The Class Loader that loads OS Gi framework classes is used to find the resource protected Enumeration find Local Resources String name try return class Loader get Resources name catch IO Exception e return null  ClassLoader OSGi findLocalResources classLoader getResources IOException
This is not supported by the System Bundle public Object find Object String object return null  findObject
This is not supported by the System Bundle protected Object find Local Object String object return null  findLocalObject
The Class Loader that loads OS Gi framework classes is used to find the resource public URL find Resource String name return class Loader get Resource name  ClassLoader OSGi findResource classLoader getResource
The Class Loader that loads OS Gi framework classes is used to find the resource public Enumeration find Resources String name throws IO Exception return class Loader get Resources name  ClassLoader OSGi findResources IOException classLoader getResources
Do nothing on a close protected void close Do nothing 

Constructs a new instance of this class with its type name and certificates set to the arguments by definition actions are ignored param type the type class of permission object paramname the name of the permission paramactions the actions Unresolved Permission String type String name String actions super type this name name this type type this actions actions  UnresolvedPermission
Compares the argument to the receiver and answers true if they represent the em same em object using a class specific comparison In this case the receiver and the object must have the same class permission name actions and certificates paramobjthe object to compare with this object return code true code if the object is the same as this object code false code if it is different from this object public boolean equals Object obj if this obj return true if obj instanceof Unresolved Permission return false Unresolved Permission perm Unresolved Permission obj return type equals perm type name equals perm name actions equals perm actions  UnresolvedPermission UnresolvedPermission UnresolvedPermission
Indicates whether the argument permission is implied by the receiver Unresolved Permission objects imply nothing because nothing is known about them yet returnboolean always replies false paramp java security Permission the permission to check public boolean implies Permission p return false  UnresolvedPermission
Answers a new Permission Collection for holding permissions of this class Answer null if any permission collection can be used returna new Permission Collection or null public Permission Collection new Permission Collection return new Unresolved Permission Collection  PermissionCollection PermissionCollection PermissionCollection newPermissionCollection UnresolvedPermissionCollection
Answers the actions associated with the receiver Since Unresolved Permission objects have no actions answer the empty string return String the actions associated with the receiver public String get Actions return NON NLS 1  UnresolvedPermission returnString getActions
Answers an integer hash code for the receiver Any two objects which answer code true code when passed to code equals code must answer the same value for this method returnint the receiver s hash public int hash Code return to String hash Code  hashCode toString hashCode
Answers a string containing a concise human readable description of the receiver return String a printable representation for the receiver public String to String return unresolved type name actions NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4  returnString toString
Permission resolve Class clazz if clazz get Name equals type try Constructor constructor clazz get Constructor constructor Args Permission permission Permission constructor new Instance new Object name actions if Debug DEBUG Debug DEBUG SECURITY Debug println Resolved this NON NLS 1 return permission catch Exception e Ignore any error trying to resolve the permission if Debug DEBUG Debug DEBUG SECURITY Debug println Exception trying to resolve permission NON NLS 1 Debug print Stack Trace e return null  getName getConstructor constructorArgs newInstance DEBUG_SECURITY DEBUG_SECURITY printStackTrace

Hashtable permissions new Hashtable 8 Unresolved Permission Collection super  UnresolvedPermissionCollection
public void add Permission permission if is Read Only throw new Illegal State Exception String name permission get Name Vector elements synchronized permissions elements Vector permissions get name if elements null elements new Vector 10 10 permissions put name elements elements add Element permission  isReadOnly IllegalStateException getName addElement
private Object find Next if v Enum null if v Enum has More Elements return v Enum next Element if p Enum has More Elements return null v Enum Vector p Enum next Element elements return v Enum next Element  findNext vEnum vEnum hasMoreElements vEnum nextElement pEnum hasMoreElements vEnum pEnum nextElement vEnum nextElement
public boolean has More Elements return next null  hasMoreElements
public Object next Element Object result next next find Next return result  nextElement findNext
public Enumeration elements return new Enumeration Enumeration v Enum p Enum permissions elements Object next find Next private Object find Next if v Enum null if v Enum has More Elements return v Enum next Element if p Enum has More Elements return null v Enum Vector p Enum next Element elements return v Enum next Element public boolean has More Elements return next null public Object next Element Object result next next find Next return result  vEnum pEnum findNext findNext vEnum vEnum hasMoreElements vEnum nextElement pEnum hasMoreElements vEnum pEnum nextElement vEnum nextElement hasMoreElements nextElement findNext
public boolean implies Permission permission return false 
Vector get Permissions String name return Vector permissions get name  getPermissions

public class Util Performs a quicksort of the given objects by their string representation in ascending order p param array The array of objects to sort public static void sort Object array qsort array 0 array length 1  arrayThe
Sorts the array of objects by their string representation in ascending order p This is a version of C A R Hoare s Quick Sort algorithm param arraythearray of objects to sort param startthe start index to begin sorting param stopthe end index to stop sorting exception Array Index Out Of Bounds Exception when code start 0 code or code end array length code public static void qsort Object array int start int stop if start stop return int left start left index int right stop right index Object temp for swapping arbitrarily establish a partition element as the midpoint of the array String mid String value Of array start stop 2 loop through the array until indices cross while left right find the first element that is smaller than the partition element from the left while left stop String value Of array left compare To mid 0 left find an element that is smaller than the partition element from the right while right start mid compare To String value Of array right 0 right if the indices have not crossed swap if left right temp array left array left array right array right temp left right sort the left partition if the right index has not reached the left side of array if start right qsort array start right sort the right partition if the left index has not reached the right side of array if left stop qsort array left stop  exceptionArrayIndexOutOfBoundsException valueOf valueOf compareTo compareTo valueOf
Sorts the specified range in the array in ascending order paramarraythe Object array to be sorted paramstartthe start index to sort paramendthe last 1 index to sort exception Class Cast Exception when an element in the array does not implement Comparable or elements cannot be compared to each other exception Illegal Argument Exception when code start end code exception Array Index Out Of Bounds Exception when code start 0 code or code end array size code public static void sort Object array int start int end int middle start end 2 if start 1 middle sort array start middle if middle 1 end sort array middle end if start 1 end return this case can only happen when this method is called by the user if Comparable array middle 1 compare To array middle 0 return if start 2 end Object temp array start array start array middle array middle temp return int i1 start i2 middle i3 0 Object merge new Object end start while i1 middle i2 end merge i3 Comparable array i1 compare To array i2 0 array i1 array i2 if i1 middle System arraycopy array i1 merge i3 middle i1 System arraycopy merge 0 array start i2 start  exceptionClassCastException exceptionIllegalArgumentException exceptionArrayIndexOutOfBoundsException compareTo compareTo
Sorts the specified range in the array in descending order paramarraythe Object array to be sorted paramstartthe start index to sort paramendthe last 1 index to sort exception Class Cast Exception when an element in the array does not implement Comparable or elements cannot be compared to each other exception Illegal Argument Exception when code start end code exception Array Index Out Of Bounds Exception when code start 0 code or code end array size code public static void dsort Object array int start int end first sort in ascending order sort array start end then swap the elements in the array swap array  exceptionClassCastException exceptionIllegalArgumentException exceptionArrayIndexOutOfBoundsException
Reverse the elements in the array paramarraythe Object array to be reversed public static void swap Object array int start 0 int end array length 1 while start end Object temp array start array start array end array end temp 
Returns a string representation of the object in the given length If the string representation of the given object is longer then it is truncated If it is shorter then it is padded with the blanks to the given total length If the given object is a number then the padding is done on the left otherwise on the right paramobjectthe object to convert paramlengththe length the output string public static String to String Object object int length boolean on Left object instanceof Number return to String object length on Left  toString onLeft toString onLeft
Returns a string representation of the object in the given length If the string representation of the given object is longer then it is truncated If it is shorter then it is padded to the left or right with the given character to the given total length paramobjectthe object to convert paramlengththe length the output string parampadthe pad character paramon Leftif code true code pad on the left otherwise an the right public static String to String Object object int length char pad boolean on Left String input String value Of object int size input length if size length int start on Left size length 0 return input substring start length String Buffer padding new String Buffer length size for int i size i length i padding append pad String Buffer string Buffer new String Buffer length if on Left string Buffer append padding to String string Buffer append input if on Left string Buffer append padding to String return string Buffer to String  paramonLeftif toString onLeft valueOf onLeft StringBuffer StringBuffer StringBuffer stringBuffer StringBuffer onLeft stringBuffer toString stringBuffer onLeft stringBuffer toString stringBuffer toString

Constructor for Default Adaptor This constructor parses the arguments passed and remembers them for later when initialize is called p No blank spaces should be used in the arguments to the Default Adaptor The options that Default Adaptor recognizes and handles are ul li b bundledir i directory name i b If a directory name is specified the adaptor should initialize to store bundles in that directory This arg should be enclosed in if it contains the character example bundledir c mydir li b reset b Resets the bundle storage by deleting the bundledir ul Any other arguments are ignored param args An array of strings containing arguments This object cannot be used until initialize is called public Default Adaptor String args if args null for int i 0 i args length i String arg args i if arg equals Ignore Case reset NON NLS 1 reset true else if arg index Of 1 NON NLS 1 String Tokenizer tok new String Tokenizer args i NON NLS 1 if tok count Tokens 2 String key tok next Token if key equals Ignore Case bundledir NON NLS 1 save file name for initialize Storage to use bundle Store tok next Token  DefaultAdaptor DefaultAdaptor DefaultAdaptor DefaultAdaptor equalsIgnoreCase indexOf StringTokenizer StringTokenizer countTokens nextToken equalsIgnoreCase initializeStorage bundleStore nextToken
public void initialize Event Publisher event Publisher super initialize event Publisher init Bundle Store Root Dir need to create the Framework Log very early framework Log create Framework Log state Manager create State Manager  EventPublisher eventPublisher eventPublisher initBundleStoreRootDir FrameworkLog frameworkLog createFrameworkLog stateManager createStateManager
Creates the State Manager for the adaptor return the State Manager protected State Manager create State Manager File state Location new File get Bundle Store Root Dir state NON NLS 1 state Manager new State Manager state Location State system State state Manager get System State if system State null return state Manager system State state Manager create System State Bundle Data installed Bundles get Installed Bundles if installed Bundles null return state Manager State Object Factory factory state Manager get Factory for int i 0 i installed Bundles length i Bundle Data to Add installed Bundles i try Dictionary manifest to Add get Manifest Bundle Description new Description factory create Bundle Description manifest to Add get Location to Add get BundleID system State add Bundle new Description catch Bundle Exception be just ignore bundle datas with invalid manifests we need the state resolved system State resolve return state Manager  StateManager StateManager StateManager createStateManager stateLocation getBundleStoreRootDir stateManager StateManager stateLocation systemState stateManager getSystemState systemState stateManager systemState stateManager createSystemState BundleData installedBundles getInstalledBundles installedBundles stateManager StateObjectFactory stateManager getFactory installedBundles BundleData toAdd installedBundles toAdd getManifest BundleDescription newDescription createBundleDescription toAdd getLocation toAdd getBundleID systemState addBundle newDescription BundleException systemState stateManager
Shutdown the State Manager for the adaptor This should persist the state for reading when create State Manager is called protected void shutdown State Manager try state Manager shutdown new File get Bundle Store Root Dir state NON NLS 1 catch IO Exception e framework Log log new Framework Event Framework Event ERROR context get Bundle e  StateManager createStateManager shutdownStateManager stateManager getBundleStoreRootDir IOException frameworkLog FrameworkEvent FrameworkEvent getBundle
protected Framework Log create Framework Log return new Default Log  FrameworkLog createFrameworkLog DefaultLog
Init the directory to store the bundles in Bundledir can be set in 3 different ways Priority is 1 OSGI Launcher command line adaptor argument 2 System property org eclipse osgi framework defaultadaptor bundledir could be specified with D when launching 3 osgi properties org eclipse osgi framework defaultadaptor bundledir property Bundledir will be stored back to adaptor properties which the framework will copy into the System properties protected void init Bundle Store Root Dir if bundle Store was not set by the constructor from the adaptor cmd line arg if bundle Store null check the system properties bundle Store System get Property BUNDLE STORE if bundle Store null check the osgi properties file but default to bundles bundle Store properties get Property BUNDLE STORE bundles NON NLS 1 bundle Store Root Dir new File bundle Store store bundle Store back into adaptor properties for others to see properties put BUNDLE STORE bundle Store Root Dir get Absolute Path  initBundleStoreRootDir bundleStore bundleStore bundleStore getProperty BUNDLE_STORE bundleStore bundleStore getProperty BUNDLE_STORE bundleStoreRootDir bundleStore bundleStore BUNDLE_STORE bundleStoreRootDir getAbsolutePath
protected void init Data Root Dir data Root Dir get Bundle Store Root Dir  initDataRootDir dataRootDir getBundleStoreRootDir
public File get Bundle Store Root Dir return bundle Store Root Dir  getBundleStoreRootDir bundleStoreRootDir
public File get Data Root Dir if data Root Dir null init Data Root Dir return data Root Dir  getDataRootDir dataRootDir initDataRootDir dataRootDir
Initialize the persistent storage p This method initializes the bundle persistent storage area If a dir was specified in the adaptor command line option then it is used If not if the property i org eclipse osgi framework defaultadaptor bundledir i is specifed its value will be used as the name of the bundle directory instead of tt bundles tt If reset was specified on the adaptor command line option then the storage will be cleared throws IO Exception If an error occurs initializing the storage public void initialize Storage throws IO Exception boolean makedir false File bundle Store get Bundle Store Root Dir if bundle Store exists if reset makedir true if rm bundle Store if Debug DEBUG Debug DEBUG GENERAL Debug println Could not remove directory bundle Store get Path NON NLS 1 else if bundle Store is Directory if Debug DEBUG Debug DEBUG GENERAL Debug println Exists but not a directory bundle Store get Path NON NLS 1 throw new IO Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION NON NLS 1 else makedir true if makedir if bundle Store mkdirs if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to create directory bundle Store get Path NON NLS 1 throw new IO Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION NON NLS 1 initialize Metadata  IOException initializeStorage IOException bundleStore getBundleStoreRootDir bundleStore bundleStore DEBUG_GENERAL bundleStore getPath bundleStore isDirectory DEBUG_GENERAL bundleStore getPath IOException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION bundleStore DEBUG_GENERAL bundleStore getPath IOException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION initializeMetadata
protected void initialize Metadata throws IO Exception fw Metadata new Meta Data get Meta Data File Framework metadata NON NLS 1 fw Metadata load next Id fw Metadata get Long METADATA ADAPTOR NEXTID 1 initial Bundle Start Level fw Metadata get Int METADATA ADAPTOR IBSL 1  initializeMetadata IOException fwMetadata MetaData getMetaDataFile fwMetadata nextId fwMetadata getLong METADATA_ADAPTOR_NEXTID initialBundleStartLevel fwMetadata getInt METADATA_ADAPTOR_IBSL
protected File get Meta Data File return new File get Bundle Store Root Dir framework NON NLS 1  getMetaDataFile getBundleStoreRootDir
This method cleans up storage in the specified directory and any subdirectories param directory The directory to clean see compact Storage private void compact File directory if Debug DEBUG Debug DEBUG GENERAL Debug println compact directory get Path NON NLS 1 NON NLS 2 String list directory list if list null return int len list length for int i 0 i len i if DATA DIR NAME equals list i continue do not examine the bundles data dir File target new File directory list i if the file is a directory if target is Directory continue File delete new File target delete NON NLS 1 and the directory is marked for delete if delete exists if rm fails to delete the directory and delete was removed if rm target delete exists try recreate delete File Output Stream out new File Output Stream delete out close catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to write delete get Path e get Message NON NLS 1 NON NLS 2 else compact target descend into directory  compactStorage DEBUG_GENERAL getPath DATA_DIR_NAME isDirectory FileOutputStream FileOutputStream IOException DEBUG_GENERAL getPath getMessage
Clean up the persistent storage p Cleans up any deferred deletions in persistent storage public void compact Storage compact get Bundle Store Root Dir  compactStorage getBundleStoreRootDir
see org eclipse osgi framework adaptor Framework Adaptor get Installed Bundles public Bundle Data get Installed Bundles String list get Bundle Store Root Dir list if list null return null Array List bundle Datas new Array List list length create bundle objects for all installed bundles for int i 0 i list length i try Default Bundle Data data long id 1 try id Long parse Long list i catch Number Format Exception nfe continue data Default Bundle Data get Element Factory create Bundle Data this id load Meta Data For data data initialize Existing Bundle if Debug DEBUG Debug DEBUG GENERAL Debug println Bundle Data created data NON NLS 1 bundle Datas add data catch Bundle Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to open Bundle list i e get Message NON NLS 1 NON NLS 2 Debug print Stack Trace e catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to open Bundle list i e get Message NON NLS 1 NON NLS 2 Debug print Stack Trace e return Bundle Data bundle Datas to Array new Bundle Data bundle Datas size  FrameworkAdaptor getInstalledBundles BundleData getInstalledBundles getBundleStoreRootDir ArrayList bundleDatas ArrayList DefaultBundleData parseLong NumberFormatException DefaultBundleData getElementFactory createBundleData loadMetaDataFor initializeExistingBundle DEBUG_GENERAL BundleData bundleDatas BundleException DEBUG_GENERAL getMessage printStackTrace IOException DEBUG_GENERAL getMessage printStackTrace BundleData bundleDatas toArray BundleData bundleDatas
Begin the operation on the bundle install update uninstall return Bundle Data object for the target bundle throws Bundle Exception If a failure occured modifiying peristent storage public org eclipse osgi framework adaptor Bundle Data begin throws Bundle Exception long id try Open Input Stream first to trigger prereq installs if any before allocating bundle id Input Stream in source get Input Stream URL sourceURL source getURL String protocol sourceURL null null sourceURL get Protocol try try id get Next Bundle Id catch IO Exception e throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION e NON NLS 1 data Default Bundle Data get Element Factory create Bundle Data Default Adaptor this id data set Location location data set Start Level get Initial Bundle Start Level if in instanceof Reference Input Stream URL reference Reference Input Stream in get Reference if file equals reference get Protocol NON NLS 1 throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR URL CREATE EXCEPTION reference NON NLS 1 data set Reference true data set File Name reference get Path data initialize New Bundle else File gen Dir data create Generation Dir if gen Dir exists throw new IO Exception Adaptor Msg formatter get String ADAPTOR DIRECTORY CREATE EXCEPTION gen Dir get Path NON NLS 1 String file Name map Location To Name location File out File new File gen Dir file Name if file equals protocol NON NLS 1 File in File new File source getURL get Path if in File is Directory copy Dir in File out File else read File in out File else read File in out File data set Reference false data set File Name file Name data initialize New Bundle finally try in close catch IO Exception e catch IO Exception ioe throw new Bundle Exception Adaptor Msg formatter get String BUNDLE READ EXCEPTION ioe NON NLS 1 return data  BundleData BundleException BundleData BundleException InputStream InputStream getInputStream getProtocol getNextBundleId IOException BundleException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION DefaultBundleData getElementFactory createBundleData DefaultAdaptor setLocation setStartLevel getInitialBundleStartLevel ReferenceInputStream ReferenceInputStream getReference getProtocol BundleException AdaptorMsg getString ADAPTOR_URL_CREATE_EXCEPTION setReference setFileName getPath initializeNewBundle genDir createGenerationDir genDir IOException AdaptorMsg getString ADAPTOR_DIRECTORY_CREATE_EXCEPTION genDir getPath fileName mapLocationToName outFile genDir fileName inFile getPath inFile isDirectory copyDir inFile outFile readFile outFile readFile outFile setReference setFileName fileName initializeNewBundle IOException IOException BundleException AdaptorMsg getString BUNDLE_READ_EXCEPTION
public void undo if data null try data close catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to close data e get Message NON NLS 1 NON NLS 2 if data null File bundle Dir data get Bundle Store Dir if rm bundle Dir mark this bundle to be deleted to ensure it is fully cleaned up on next restart File delete new File bundle Dir delete NON NLS 1 if delete exists try create delete File Output Stream out new File Output Stream delete out close catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to write delete get Path e get Message NON NLS 1 NON NLS 2  IOException DEBUG_GENERAL getMessage bundleDir getBundleStoreDir bundleDir bundleDir FileOutputStream FileOutputStream IOException DEBUG_GENERAL getPath getMessage
public void commit boolean postpone throws Bundle Exception try data save catch IO Exception e throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION e NON NLS 1 Bundle Description bundle Description state Manager get Factory create Bundle Description data get Manifest data get Location data get BundleID state Manager get System State add Bundle bundle Description  BundleException IOException BundleException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION BundleDescription bundleDescription stateManager getFactory createBundleDescription getManifest getLocation getBundleID stateManager getSystemState addBundle bundleDescription
Prepare to install a bundle from a URL Connection p To complete the install begin and then commit must be called on the returned code Bundle Operation code object If either of these methods throw a Bundle Exception or some other error occurs then undo must be called on the code Bundle Operation code object to undo the change to persistent storage param location Bundle location param source URL Connection from which the bundle may be read Any Input Streams returned from the source URL Connections get Input Stream must be closed by the code Bundle Operation code object return Bundle Operation object to be used to complete the install public Bundle Operation install Bundle final String location final URL Connection source return new Bundle Operation private Default Bundle Data data Begin the operation on the bundle install update uninstall return Bundle Data object for the target bundle throws Bundle Exception If a failure occured modifiying peristent storage public org eclipse osgi framework adaptor Bundle Data begin throws Bundle Exception long id try Open Input Stream first to trigger prereq installs if any before allocating bundle id Input Stream in source get Input Stream URL sourceURL source getURL String protocol sourceURL null null sourceURL get Protocol try try id get Next Bundle Id catch IO Exception e throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION e NON NLS 1 data Default Bundle Data get Element Factory create Bundle Data Default Adaptor this id data set Location location data set Start Level get Initial Bundle Start Level if in instanceof Reference Input Stream URL reference Reference Input Stream in get Reference if file equals reference get Protocol NON NLS 1 throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR URL CREATE EXCEPTION reference NON NLS 1 data set Reference true data set File Name reference get Path data initialize New Bundle else File gen Dir data create Generation Dir if gen Dir exists throw new IO Exception Adaptor Msg formatter get String ADAPTOR DIRECTORY CREATE EXCEPTION gen Dir get Path NON NLS 1 String file Name map Location To Name location File out File new File gen Dir file Name if file equals protocol NON NLS 1 File in File new File source getURL get Path if in File is Directory copy Dir in File out File else read File in out File else read File in out File data set Reference false data set File Name file Name data initialize New Bundle finally try in close catch IO Exception e catch IO Exception ioe throw new Bundle Exception Adaptor Msg formatter get String BUNDLE READ EXCEPTION ioe NON NLS 1 return data public void undo if data null try data close catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to close data e get Message NON NLS 1 NON NLS 2 if data null File bundle Dir data get Bundle Store Dir if rm bundle Dir mark this bundle to be deleted to ensure it is fully cleaned up on next restart File delete new File bundle Dir delete NON NLS 1 if delete exists try create delete File Output Stream out new File Output Stream delete out close catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to write delete get Path e get Message NON NLS 1 NON NLS 2 public void commit boolean postpone throws Bundle Exception try data save catch IO Exception e throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION e NON NLS 1 Bundle Description bundle Description state Manager get Factory create Bundle Description data get Manifest data get Location data get BundleID state Manager get System State add Bundle bundle Description  URLConnection BundleOperation BundleException BundleOperation URLConnection InputStreams URLConnections getInputStream BundleOperation BundleOperation BundleOperation installBundle URLConnection BundleOperation DefaultBundleData BundleData BundleException BundleData BundleException InputStream InputStream getInputStream getProtocol getNextBundleId IOException BundleException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION DefaultBundleData getElementFactory createBundleData DefaultAdaptor setLocation setStartLevel getInitialBundleStartLevel ReferenceInputStream ReferenceInputStream getReference getProtocol BundleException AdaptorMsg getString ADAPTOR_URL_CREATE_EXCEPTION setReference setFileName getPath initializeNewBundle genDir createGenerationDir genDir IOException AdaptorMsg getString ADAPTOR_DIRECTORY_CREATE_EXCEPTION genDir getPath fileName mapLocationToName outFile genDir fileName inFile getPath inFile isDirectory copyDir inFile outFile readFile outFile readFile outFile setReference setFileName fileName initializeNewBundle IOException IOException BundleException AdaptorMsg getString BUNDLE_READ_EXCEPTION IOException DEBUG_GENERAL getMessage bundleDir getBundleStoreDir bundleDir bundleDir FileOutputStream FileOutputStream IOException DEBUG_GENERAL getPath getMessage BundleException IOException BundleException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION BundleDescription bundleDescription stateManager getFactory createBundleDescription getManifest getLocation getBundleID stateManager getSystemState addBundle bundleDescription
Perform the change to persistent storage return Bundle object for the target bundle public org eclipse osgi framework adaptor Bundle Data begin throws Bundle Exception this data Default Bundle Data bundledata try Input Stream in source get Input Stream URL sourceURL source getURL String protocol sourceURL null null sourceURL get Protocol try if in instanceof Reference Input Stream Reference Input Stream ref In Reference Input Stream in URL reference ref In get Reference if file equals reference get Protocol NON NLS 1 throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR URL CREATE EXCEPTION reference NON NLS 1 check to make sure we are not just trying to update to the same directory reference This would be a no op String path reference get Path if path equals data get File Name throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR SAME REF UPDATE reference NON NLS 1 try new Data data next Generation reference get Path catch IO Exception e throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION e NON NLS 1 File bundle Generation Dir new Data create Generation Dir if bundle Generation Dir exists throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR DIRECTORY CREATE EXCEPTION bundle Generation Dir get Path NON NLS 1 new Data create Base Bundle File else try new Data data next Generation null catch IO Exception e throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION e NON NLS 1 File bundle Generation Dir new Data create Generation Dir if bundle Generation Dir exists throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR DIRECTORY CREATE EXCEPTION bundle Generation Dir get Path NON NLS 1 File out File new Data get Base File if file equals protocol NON NLS 1 File in File new File source getURL get Path if in File is Directory copy Dir in File out File else read File in out File else read File in out File new Data create Base Bundle File finally try in close catch IO Exception ee new Data load From Manifest catch IO Exception e throw new Bundle Exception Adaptor Msg formatter get String BUNDLE READ EXCEPTION e NON NLS 1 return new Data  BundleData BundleException DefaultBundleData InputStream getInputStream getProtocol ReferenceInputStream ReferenceInputStream refIn ReferenceInputStream refIn getReference getProtocol BundleException AdaptorMsg getString ADAPTOR_URL_CREATE_EXCEPTION getPath getFileName BundleException AdaptorMsg getString ADAPTOR_SAME_REF_UPDATE newData nextGeneration getPath IOException BundleException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION bundleGenerationDir newData createGenerationDir bundleGenerationDir BundleException AdaptorMsg getString ADAPTOR_DIRECTORY_CREATE_EXCEPTION bundleGenerationDir getPath newData createBaseBundleFile newData nextGeneration IOException BundleException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION bundleGenerationDir newData createGenerationDir bundleGenerationDir BundleException AdaptorMsg getString ADAPTOR_DIRECTORY_CREATE_EXCEPTION bundleGenerationDir getPath outFile newData getBaseFile inFile getPath inFile isDirectory copyDir inFile outFile readFile outFile readFile outFile newData createBaseBundleFile IOException newData loadFromManifest IOException BundleException AdaptorMsg getString BUNDLE_READ_EXCEPTION newData
Commit the change to persistent storage param postpone If true the bundle s persistent storage cannot be immediately reclaimed throws Bundle Exception If a failure occured modifiying peristent storage public void commit boolean postpone throws Bundle Exception try new Data save catch IO Exception e throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION e NON NLS 1 long bundle Id new Data get BundleID State system State state Manager get System State system State remove Bundle bundle Id Bundle Description new Description state Manager get Factory create Bundle Description new Data get Manifest new Data get Location bundle Id system State add Bundle new Description File original Generation Dir data create Generation Dir if postpone rm original Generation Dir mark this bundle to be deleted to ensure it is fully cleaned up on next restart File delete new File original Generation Dir delete NON NLS 1 if delete exists try create delete File Output Stream out new File Output Stream delete out close catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to write delete get Path e get Message NON NLS 1 NON NLS 2 event Publisher publish Framework Event Framework Event ERROR data get Bundle e  BundleException BundleException newData IOException BundleException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION bundleId newData getBundleID systemState stateManager getSystemState systemState removeBundle bundleId BundleDescription newDescription stateManager getFactory createBundleDescription newData getManifest newData getLocation bundleId systemState addBundle newDescription originalGenerationDir createGenerationDir originalGenerationDir originalGenerationDir FileOutputStream FileOutputStream IOException DEBUG_GENERAL getPath getMessage eventPublisher publishFrameworkEvent FrameworkEvent getBundle
Undo the change to persistent storage throws Bundle Exception If a failure occured modifiying peristent storage public void undo throws Bundle Exception if bundle File null bundle File close if new Data null File next Generation Dir new Data create Generation Dir if rm next Generation Dir delete downloaded bundle mark this bundle to be deleted to ensure it is fully cleaned up on next restart File delete new File next Generation Dir delete NON NLS 1 if delete exists try create delete File Output Stream out new File Output Stream delete out close catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to write delete get Path e get Message NON NLS 1 NON NLS 2  BundleException BundleException bundleFile bundleFile newData nextGenerationDir newData createGenerationDir nextGenerationDir nextGenerationDir FileOutputStream FileOutputStream IOException DEBUG_GENERAL getPath getMessage
Prepare to update a bundle from a URL Connection p To complete the update modify and then commit will be called on the returned Bundle Storage object If either of these methods throw a Bundle Exception or some other error occurs then undo will be called on the Bundle Storage object to undo the change to persistent storage param bundledata Bundle Data to update param source URL Connection from which the bundle may be read return Bundle Operation object to be used to complete the update public Bundle Operation update Bundle final org eclipse osgi framework adaptor Bundle Data bundledata final URL Connection source return new Bundle Operation private Default Bundle Data data private Default Bundle Data new Data Perform the change to persistent storage return Bundle object for the target bundle public org eclipse osgi framework adaptor Bundle Data begin throws Bundle Exception this data Default Bundle Data bundledata try Input Stream in source get Input Stream URL sourceURL source getURL String protocol sourceURL null null sourceURL get Protocol try if in instanceof Reference Input Stream Reference Input Stream ref In Reference Input Stream in URL reference ref In get Reference if file equals reference get Protocol NON NLS 1 throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR URL CREATE EXCEPTION reference NON NLS 1 check to make sure we are not just trying to update to the same directory reference This would be a no op String path reference get Path if path equals data get File Name throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR SAME REF UPDATE reference NON NLS 1 try new Data data next Generation reference get Path catch IO Exception e throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION e NON NLS 1 File bundle Generation Dir new Data create Generation Dir if bundle Generation Dir exists throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR DIRECTORY CREATE EXCEPTION bundle Generation Dir get Path NON NLS 1 new Data create Base Bundle File else try new Data data next Generation null catch IO Exception e throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION e NON NLS 1 File bundle Generation Dir new Data create Generation Dir if bundle Generation Dir exists throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR DIRECTORY CREATE EXCEPTION bundle Generation Dir get Path NON NLS 1 File out File new Data get Base File if file equals protocol NON NLS 1 File in File new File source getURL get Path if in File is Directory copy Dir in File out File else read File in out File else read File in out File new Data create Base Bundle File finally try in close catch IO Exception ee new Data load From Manifest catch IO Exception e throw new Bundle Exception Adaptor Msg formatter get String BUNDLE READ EXCEPTION e NON NLS 1 return new Data Commit the change to persistent storage param postpone If true the bundle s persistent storage cannot be immediately reclaimed throws Bundle Exception If a failure occured modifiying peristent storage public void commit boolean postpone throws Bundle Exception try new Data save catch IO Exception e throw new Bundle Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION e NON NLS 1 long bundle Id new Data get BundleID State system State state Manager get System State system State remove Bundle bundle Id Bundle Description new Description state Manager get Factory create Bundle Description new Data get Manifest new Data get Location bundle Id system State add Bundle new Description File original Generation Dir data create Generation Dir if postpone rm original Generation Dir mark this bundle to be deleted to ensure it is fully cleaned up on next restart File delete new File original Generation Dir delete NON NLS 1 if delete exists try create delete File Output Stream out new File Output Stream delete out close catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to write delete get Path e get Message NON NLS 1 NON NLS 2 event Publisher publish Framework Event Framework Event ERROR data get Bundle e Undo the change to persistent storage throws Bundle Exception If a failure occured modifiying peristent storage public void undo throws Bundle Exception if bundle File null bundle File close if new Data null File next Generation Dir new Data create Generation Dir if rm next Generation Dir delete downloaded bundle mark this bundle to be deleted to ensure it is fully cleaned up on next restart File delete new File next Generation Dir delete NON NLS 1 if delete exists try create delete File Output Stream out new File Output Stream delete out close catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to write delete get Path e get Message NON NLS 1 NON NLS 2  URLConnection BundleStorage BundleException BundleStorage BundleData URLConnection BundleOperation BundleOperation updateBundle BundleData URLConnection BundleOperation DefaultBundleData DefaultBundleData newData BundleData BundleException DefaultBundleData InputStream getInputStream getProtocol ReferenceInputStream ReferenceInputStream refIn ReferenceInputStream refIn getReference getProtocol BundleException AdaptorMsg getString ADAPTOR_URL_CREATE_EXCEPTION getPath getFileName BundleException AdaptorMsg getString ADAPTOR_SAME_REF_UPDATE newData nextGeneration getPath IOException BundleException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION bundleGenerationDir newData createGenerationDir bundleGenerationDir BundleException AdaptorMsg getString ADAPTOR_DIRECTORY_CREATE_EXCEPTION bundleGenerationDir getPath newData createBaseBundleFile newData nextGeneration IOException BundleException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION bundleGenerationDir newData createGenerationDir bundleGenerationDir BundleException AdaptorMsg getString ADAPTOR_DIRECTORY_CREATE_EXCEPTION bundleGenerationDir getPath outFile newData getBaseFile inFile getPath inFile isDirectory copyDir inFile outFile readFile outFile readFile outFile newData createBaseBundleFile IOException newData loadFromManifest IOException BundleException AdaptorMsg getString BUNDLE_READ_EXCEPTION newData BundleException BundleException newData IOException BundleException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION bundleId newData getBundleID systemState stateManager getSystemState systemState removeBundle bundleId BundleDescription newDescription stateManager getFactory createBundleDescription newData getManifest newData getLocation bundleId systemState addBundle newDescription originalGenerationDir createGenerationDir originalGenerationDir originalGenerationDir FileOutputStream FileOutputStream IOException DEBUG_GENERAL getPath getMessage eventPublisher publishFrameworkEvent FrameworkEvent getBundle BundleException BundleException bundleFile bundleFile newData nextGenerationDir newData createGenerationDir nextGenerationDir nextGenerationDir FileOutputStream FileOutputStream IOException DEBUG_GENERAL getPath getMessage
Perform the change to persistent storage return Bundle object for the target bundle throws Bundle Exception If a failure occured modifiying peristent storage public org eclipse osgi framework adaptor Bundle Data begin throws Bundle Exception this data Default Bundle Data bundledata return bundledata  BundleException BundleData BundleException DefaultBundleData
Commit the change to persistent storage param postpone If true the bundle s persistent storage cannot be immediately reclaimed throws Bundle Exception If a failure occured modifiying peristent storage public void commit boolean postpone throws Bundle Exception File bundle Dir data get Bundle Store Dir if postpone rm bundle Dir mark this bundle to be deleted to ensure it is fully cleaned up on next restart File delete new File bundle Dir delete NON NLS 1 if delete exists try create delete File Output Stream out new File Output Stream delete out close catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to write delete get Path e get Message NON NLS 1 NON NLS 2 state Manager get System State remove Bundle data get BundleID  BundleException BundleException bundleDir getBundleStoreDir bundleDir bundleDir FileOutputStream FileOutputStream IOException DEBUG_GENERAL getPath getMessage stateManager getSystemState removeBundle getBundleID
Undo the change to persistent storage throws Bundle Exception If a failure occured modifiying peristent storage public void undo throws Bundle Exception  BundleException BundleException
Prepare to uninstall a bundle p To complete the uninstall modify and then commit will be called on the returned Bundle Storage object If either of these methods throw a Bundle Exception or some other error occurs then undo will be called on the Bundle Storage object to undo the change to persistent storage param bundledata Bundle Data to uninstall return Bundle Operation object to be used to complete the uninstall public Bundle Operation uninstall Bundle final org eclipse osgi framework adaptor Bundle Data bundledata return new Bundle Operation private Default Bundle Data data Perform the change to persistent storage return Bundle object for the target bundle throws Bundle Exception If a failure occured modifiying peristent storage public org eclipse osgi framework adaptor Bundle Data begin throws Bundle Exception this data Default Bundle Data bundledata return bundledata Commit the change to persistent storage param postpone If true the bundle s persistent storage cannot be immediately reclaimed throws Bundle Exception If a failure occured modifiying peristent storage public void commit boolean postpone throws Bundle Exception File bundle Dir data get Bundle Store Dir if postpone rm bundle Dir mark this bundle to be deleted to ensure it is fully cleaned up on next restart File delete new File bundle Dir delete NON NLS 1 if delete exists try create delete File Output Stream out new File Output Stream delete out close catch IO Exception e if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to write delete get Path e get Message NON NLS 1 NON NLS 2 state Manager get System State remove Bundle data get BundleID Undo the change to persistent storage throws Bundle Exception If a failure occured modifiying peristent storage public void undo throws Bundle Exception  BundleStorage BundleException BundleStorage BundleData BundleOperation BundleOperation uninstallBundle BundleData BundleOperation DefaultBundleData BundleException BundleData BundleException DefaultBundleData BundleException BundleException bundleDir getBundleStoreDir bundleDir bundleDir FileOutputStream FileOutputStream IOException DEBUG_GENERAL getPath getMessage stateManager getSystemState removeBundle getBundleID BundleException BundleException
Returns the Permission Storage object which will be used to to manage the permission data p The Permission Storage object will store permission data in the permdata subdirectory of the bundle storage directory assigned by tt initialize Storage tt return The Permission Storage object for the Default Adaptor public org eclipse osgi framework adaptor Permission Storage get Permission Storage throws IO Exception if permission Store null synchronized this if permission Store null permission Store new Default Permission Storage this return permission Store  PermissionStorage PermissionStorage initializeStorage PermissionStorage DefaultAdaptor PermissionStorage getPermissionStorage IOException permissionStore permissionStore permissionStore DefaultPermissionStorage permissionStore
public void framework Start Bundle Context context throws Bundle Exception super framework Start context if framework Log null framework Log create Framework Log State state state Manager get System State Bundle Description system Bundle state get Bundle 0 if system Bundle null system Bundle is Resolved this would be a bug in the framework throw new Illegal State Exception  frameworkStart BundleContext BundleException frameworkStart frameworkLog frameworkLog createFrameworkLog stateManager getSystemState BundleDescription systemBundle getBundle systemBundle systemBundle isResolved IllegalStateException
public void framework Stop Bundle Context context throws Bundle Exception shutdown State Manager super framework Stop context framework Log close framework Log null  frameworkStop BundleContext BundleException shutdownStateManager frameworkStop frameworkLog frameworkLog
Register a service object protected Service Registration register String name Object service Bundle bundle Hashtable properties new Hashtable 7 Dictionary headers bundle get Headers properties put Constants SERVICE VENDOR headers get Constants BUNDLE VENDOR properties put Constants SERVICE RANKING new Integer Integer MAX VALUE properties put Constants SERVICE PID bundle get Bundle Id service get Class get Name NON NLS 1 return context register Service name service properties  ServiceRegistration getHeaders SERVICE_VENDOR BUNDLE_VENDOR SERVICE_RANKING MAX_VALUE SERVICE_PID getBundleId getClass getName registerService
This function performs the equivalent of rm r on a file or directory param file file or directory to delete return false is the specified files still exists true otherwise protected boolean rm File file if file exists if file is Directory String list file list int len list length for int i 0 i len i we are doing a lot of garbage collecting here rm new File file list i if Debug DEBUG Debug DEBUG GENERAL if file is Directory Debug println rmdir file get Path NON NLS 1 else Debug println rm file get Path NON NLS 1 boolean success file delete if Debug DEBUG Debug DEBUG GENERAL if success Debug println rm failed NON NLS 1 return success else return true  isDirectory DEBUG_GENERAL isDirectory getPath getPath DEBUG_GENERAL
public void set Initial Bundle Start Level int value super set Initial Bundle Start Level value try persist Initial Bundle Start Level value catch IO Exception e event Publisher publish Framework Event Framework Event ERROR context get Bundle e  setInitialBundleStartLevel setInitialBundleStartLevel persistInitialBundleStartLevel IOException eventPublisher publishFrameworkEvent FrameworkEvent getBundle
protected void persist Initial Bundle Start Level int value throws IO Exception fw Metadata set Int METADATA ADAPTOR IBSL value fw Metadata save  persistInitialBundleStartLevel IOException fwMetadata setInt METADATA_ADAPTOR_IBSL fwMetadata
Map a location string into a bundle name This methods treats the location string as a URL param location bundle location string return bundle name public String map Location To Name String location int end location index Of 0 query if end 1 end location index Of 0 fragment if end 1 end location length int begin location replace last Index Of end int colon location last Index Of end if colon begin begin colon return location substring begin 1 end  mapLocationToName indexOf indexOf lastIndexOf lastIndexOf
protected void persist Next BundleID long id throws IO Exception fw Metadata set Long METADATA ADAPTOR NEXTID next Id fw Metadata save  persistNextBundleID IOException fwMetadata setLong METADATA_ADAPTOR_NEXTID nextId fwMetadata
Return the next valid unused bundle id return Next valid unused bundle id throws IO Exception If there are no more unused bundle ids protected synchronized long get Next Bundle Id throws IO Exception while next Id Long MAX VALUE long id next Id next Id File bundle Dir new File get Bundle Store Root Dir String value Of id if bundle Dir exists continue persist Next BundleID id return id throw new IO Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION NON NLS 1  IOException getNextBundleId IOException nextId MAX_VALUE nextId nextId bundleDir getBundleStoreRootDir valueOf bundleDir persistNextBundleID IOException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION
public Adaptor Element Factory get Element Factory if element Factory null element Factory new Default Element Factory return element Factory  AdaptorElementFactory getElementFactory elementFactory elementFactory DefaultElementFactory elementFactory
public Framework Log get Framework Log return framework Log  FrameworkLog getFrameworkLog frameworkLog
public State get State return state Manager get System State  getState stateManager getSystemState
public Platform Admin get Platform Admin return state Manager  PlatformAdmin getPlatformAdmin stateManager
protected void load Meta Data For Default Bundle Data data throws IO Exception Meta Data bundle Meta Data new Meta Data new File data get Bundle Store Dir bundle Bundle metadata NON NLS 1 NON NLS 2 bundle Meta Data load data set Location bundle Meta Data get METADATA BUNDLE LOC null data set File Name bundle Meta Data get METADATA BUNDLE NAME null data set Generation bundle Meta Data get Int METADATA BUNDLE GEN 1 data set Native Paths bundle Meta Data get METADATA BUNDLE NCP null data set Start Level bundle Meta Data get Int METADATA BUNDLE ABSL 1 data set Status bundle Meta Data get Int METADATA BUNDLE STATUS 0 data set Reference bundle Meta Data get Boolean METADATA BUNDLE REF false if data get Generation 1 data get File Name null data get Location null throw new IO Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION NON NLS 1  loadMetaDataFor DefaultBundleData IOException MetaData bundleMetaData MetaData getBundleStoreDir bundleMetaData setLocation bundleMetaData METADATA_BUNDLE_LOC setFileName bundleMetaData METADATA_BUNDLE_NAME setGeneration bundleMetaData getInt METADATA_BUNDLE_GEN setNativePaths bundleMetaData METADATA_BUNDLE_NCP setStartLevel bundleMetaData getInt METADATA_BUNDLE_ABSL setStatus bundleMetaData getInt METADATA_BUNDLE_STATUS setReference bundleMetaData getBoolean METADATA_BUNDLE_REF getGeneration getFileName getLocation IOException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION
public void save Meta Data For Default Bundle Data data throws IO Exception Meta Data bundle Metadata new Meta Data new File data create Bundle Store Dir bundle Bundle metadata NON NLS 1 NON NLS 2 bundle Metadata load bundle Metadata set METADATA BUNDLE LOC data get Location bundle Metadata set METADATA BUNDLE NAME data get File Name bundle Metadata set Int METADATA BUNDLE GEN data get Generation String native Paths data get Native Paths String if native Paths null bundle Metadata set METADATA BUNDLE NCP native Paths bundle Metadata set Int METADATA BUNDLE ABSL data get Start Level bundle Metadata set Int METADATA BUNDLE STATUS data get Status bundle Metadata set Boolean METADATA BUNDLE REF data is Reference bundle Metadata save  saveMetaDataFor DefaultBundleData IOException MetaData bundleMetadata MetaData createBundleStoreDir bundleMetadata bundleMetadata METADATA_BUNDLE_LOC getLocation bundleMetadata METADATA_BUNDLE_NAME getFileName bundleMetadata setInt METADATA_BUNDLE_GEN getGeneration nativePaths getNativePathsString nativePaths bundleMetadata METADATA_BUNDLE_NCP nativePaths bundleMetadata setInt METADATA_BUNDLE_ABSL getStartLevel bundleMetadata setInt METADATA_BUNDLE_STATUS getStatus bundleMetadata setBoolean METADATA_BUNDLE_REF isReference bundleMetadata

Constructs a Default Bundle Data for the Default Adaptor param adaptor the Default Adaptor for this Default Bundle Data param id the Bundle ID for this Default Bundle Data public Default Bundle Data Default Adaptor adaptor long id super adaptor id init Bundle Store Dirs String value Of id  DefaultBundleData DefaultAdaptor DefaultAdaptor DefaultBundleData DefaultBundleData DefaultBundleData DefaultAdaptor initBundleStoreDirs valueOf
Read data from an existing directory This constructor is used by get Installed Bundles throws Number Format Exception if the directory is not a number the directory contains a delete file or the directory does not contain a bundle file throws IO Exception If an error occurs initializing the bundle data public void initialize Existing Bundle throws Bundle Exception IO Exception File delete new File get Bundle Store Dir delete NON NLS 1 and the directory is not marked for delete if delete exists throw new IO Exception create Base Bundle File load From Manifest  getInstalledBundles NumberFormatException IOException initializeExistingBundle BundleException IOException getBundleStoreDir IOException createBaseBundleFile loadFromManifest
public void initialize New Bundle throws IO Exception Bundle Exception create Base Bundle File load From Manifest  initializeNewBundle IOException BundleException createBaseBundleFile loadFromManifest
protected void init Bundle Store Dirs String bundleID set Bundle Store Dir new File Default Adaptor adaptor get Bundle Store Root Dir bundleID  initBundleStoreDirs setBundleStoreDir DefaultAdaptor getBundleStoreRootDir
Returns the absolute path name of a native library The Bundle Data Class Loader invokes this method to locate the native libraries that belong to classes loaded from this Bundle Data Returns null if the library does not exist in this Bundle Data param libname The name of the library to find the absolute path to return The absolute path name of the native library or null if the library does not exist public String find Library String libname String mapped Name System map Library Name libname String path null if Debug DEBUG Debug DEBUG LOADER Debug println mapped library name mapped Name NON NLS 1 path find Native Path mapped Name if path null if Debug DEBUG Debug DEBUG LOADER Debug println library does not exist mapped Name NON NLS 1 path find Native Path libname if Debug DEBUG Debug DEBUG LOADER Debug println returning library path NON NLS 1 return path  BundleData ClassLoader BundleData BundleData findLibrary mappedName mapLibraryName DEBUG_LOADER mappedName findNativePath mappedName DEBUG_LOADER mappedName findNativePath DEBUG_LOADER
protected String find Native Path String libname String path null if libname starts With NON NLS 1 libname libname String nativepaths get Native Paths if nativepaths null for int i 0 i nativepaths length i if nativepaths i ends With libname File native File base Bundle File get File nativepaths i path native File get Absolute Path return path  findNativePath startsWith getNativePaths endsWith nativeFile baseBundleFile getFile nativeFile getAbsolutePath
Installs the native code paths for this Bundle Data Each element of nativepaths must be installed for lookup when find Library is called param nativepaths The array of native code paths to install for the bundle throws Bundle Exception If any error occurs during install public void install Native Code String nativepaths throws Bundle Exception String Buffer sb new String Buffer for int i 0 i nativepaths length i extract the native code File native File base Bundle File get File nativepaths i if native File null throw new Bundle Exception Adaptor Msg formatter get String BUNDLE NATIVECODE EXCEPTION nativepaths i NON NLS 1 sb append nativepaths i if i nativepaths length 1 sb append NON NLS 1 if sb length 0 set Native Paths sb to String  BundleData findLibrary BundleException installNativeCode BundleException StringBuffer StringBuffer nativeFile baseBundleFile getFile nativeFile BundleException AdaptorMsg getString BUNDLE_NATIVECODE_EXCEPTION setNativePaths toString
protected void set Data Dir File dir Data this dir Data dir Data  setDataDir dirData dirData dirData
protected File get Data Dir return dir Data  getDataDir dirData
Return the bundle data directory Attempt to create the directory if it does not exist return Bundle data directory public File get Data File String path lazily initialize dir Data to prevent early access to instance location if get Data Dir null File data Root Default Adaptor adaptor get Data Root Dir if data Root null throw new Illegal State Exception Adaptor Msg formatter get String ADAPTOR DATA AREA NOT SET NON NLS 1 set Data Dir new File data Root id Default Adaptor DATA DIR NAME NON NLS 1 if get Data Dir exists get Data Dir mkdirs if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to create bundle data directory get Data Dir get Path NON NLS 1 return new File get Data Dir path  getDataFile dirData getDataDir dataRoot DefaultAdaptor getDataRootDir dataRoot IllegalStateException AdaptorMsg getString ADAPTOR_DATA_AREA_NOT_SET setDataDir dataRoot DefaultAdaptor DATA_DIR_NAME getDataDir getDataDir DEBUG_GENERAL getDataDir getPath getDataDir
Close all resources for this Bundle Data public void close throws IO Exception if base Bundle File null base Bundle File close  BundleData IOException baseBundleFile baseBundleFile
Opens all resource for this Bundle Data Reopens the Bundle Data if it was previosly closed public void open throws IO Exception base Bundle File open  BundleData BundleData IOException baseBundleFile
protected void load From Manifest throws IO Exception Bundle Exception get Manifest if manifest null throw new IO Exception Adaptor Msg formatter get String ADAPTOR ERROR GETTING MANIFEST get Location NON NLS 1 set Version new Version String manifest get Constants BUNDLE VERSION set Symbolic Name Abstract Bundle Data parse Symbolic Name manifest set Class Path String manifest get Constants BUNDLE CLASSPATH set Activator String manifest get Constants BUNDLE ACTIVATOR String host String manifest get Constants FRAGMENT HOST set Fragment host null set Execution Environment String manifest get Constants BUNDLE REQUIREDEXECUTIONENVIRONMENT set Dynamic Imports String manifest get Constants DYNAMICIMPORT PACKAGE  loadFromManifest IOException BundleException getManifest IOException AdaptorMsg getString ADAPTOR_ERROR_GETTING_MANIFEST getLocation setVersion BUNDLE_VERSION setSymbolicName AbstractBundleData parseSymbolicName setClassPath BUNDLE_CLASSPATH setActivator BUNDLE_ACTIVATOR FRAGMENT_HOST setFragment setExecutionEnvironment BUNDLE_REQUIREDEXECUTIONENVIRONMENT setDynamicImports DYNAMICIMPORT_PACKAGE
protected File get Generation Dir return new File get Bundle Store Dir String value Of get Generation  getGenerationDir getBundleStoreDir valueOf getGeneration
Return the bundle generation directory Attempt to create the directory if it does not exist return Bundle generation directory public File create Generation Dir File generation Dir get Generation Dir if generation Dir exists generation Dir mkdirs if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to create bundle generation directory generation Dir get Path NON NLS 1 return generation Dir  createGenerationDir generationDir getGenerationDir generationDir generationDir DEBUG_GENERAL generationDir getPath generationDir
Return the base File for the bundle Attempt to create the bundle generation directory if it does not exist return the base File object for the bundle protected File get Base File return is Reference new File get File Name new File create Generation Dir get File Name  getBaseFile isReference getFileName createGenerationDir getFileName
protected File get Bundle Store Dir return bundle Store Dir  getBundleStoreDir bundleStoreDir
protected void set Bundle Store Dir File bundle Store Dir this bundle Store Dir bundle Store Dir  setBundleStoreDir bundleStoreDir bundleStoreDir bundleStoreDir
Return the top level bundle directory return Top level bundle directory protected File create Bundle Store Dir if get Bundle Store Dir exists get Bundle Store Dir mkdirs if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to create bundle store directory get Bundle Store Dir get Path NON NLS 1 return get Bundle Store Dir  createBundleStoreDir getBundleStoreDir getBundleStoreDir DEBUG_GENERAL getBundleStoreDir getPath getBundleStoreDir
Save the bundle data in the data file throws IO Exception if a write error occurs public synchronized void save throws IO Exception Default Adaptor adaptor save Meta Data For this  IOException IOException DefaultAdaptor saveMetaDataFor
Return a copy of this object with the generation dependent fields updated to the next free generation level throws IO Exception If there are no more available generation levels protected Default Bundle Data next Generation String reference File throws IO Exception int next Generation get Generation while next Generation Integer MAX VALUE next Generation File next Dir Generation new File get Bundle Store Dir String value Of next Generation if next Dir Generation exists continue Default Bundle Data next try next Default Bundle Data clone catch Clone Not Supported Exception e this shouldn t happen since we are Cloneable throw new Internal Error next set Generation next Generation if reference File null next set Reference true next set File Name reference File else if next is Reference next set Reference false next set File Name Default Adaptor adaptor map Location To Name get Location null out the manifest to force it to be re read next manifest null return next throw new IO Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION NON NLS 1  IOException DefaultBundleData nextGeneration referenceFile IOException nextGeneration getGeneration nextGeneration MAX_VALUE nextGeneration nextDirGeneration getBundleStoreDir valueOf nextGeneration nextDirGeneration DefaultBundleData DefaultBundleData CloneNotSupportedException InternalError setGeneration nextGeneration referenceFile setReference setFileName referenceFile isReference setReference setFileName DefaultAdaptor mapLocationToName getLocation IOException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION
protected Bundle File create Base Bundle File throws IO Exception base Bundle File get Adaptor create Bundle File get Base File this return base Bundle File  BundleFile createBaseBundleFile IOException baseBundleFile getAdaptor createBundleFile getBaseFile baseBundleFile
public Bundle File get Base Bundle File return base Bundle File  BundleFile getBaseBundleFile baseBundleFile
public String to String return get Location  toString getLocation

Bundle Class Loader constructor param delegate The Class Loader Delegate for this Class Loader param domain The Protection Domain for this Class Loader param classpath An array of Bundle Class Path entries to use for loading classes and resources This is specified by the Bundle Class Path manifest entry param parent The parent Class Loader param bundledata The Bundle Data for this Class Loader public Default Class Loader Class Loader Delegate delegate Protection Domain domain String classpath Class Loader parent Abstract Bundle Data bundledata super delegate domain classpath parent this hostdata bundledata try hostdata open make sure the Bundle Data is open catch IO Exception e hostdata get Adaptor get Event Publisher publish Framework Event Framework Event ERROR hostdata get Bundle e  BundleClassLoader ClassLoaderDelegate ClassLoader ProtectionDomain ClassLoader ClassPath ClassPath ClassLoader BundleData ClassLoader DefaultClassLoader ClassLoaderDelegate ProtectionDomain ClassLoader AbstractBundleData BundleData IOException getAdaptor getEventPublisher publishFrameworkEvent FrameworkEvent getBundle
public void initialize classpath Entries build Classpath hostclasspath hostdata hostdomain  classpathEntries buildClasspath
Attaches the Bundle Data for a fragment to this Bundle Class Loader The Fragment Bundle Data resources must be appended to the end of this Bundle Class Loader s classpath Fragment Bundle Data resources must be searched ordered by Bundle ID s param bundledata The Bundle Data of the fragment param domain The Protection Domain of the resources of the fragment Any classes loaded from the fragment s Bundle Data must belong to this Protection Domain param classpath An array of Bundle Class Path entries to use for loading classes and resources This is specified by the Bundle Class Path manifest entry of the fragment public void attach Fragment org eclipse osgi framework adaptor Bundle Data bundledata Protection Domain domain String classpath Abstract Bundle Data abstractbundledata Abstract Bundle Data bundledata try bundledata open make sure the Bundle Data is open catch IO Exception e abstractbundledata get Adaptor get Event Publisher publish Framework Event Framework Event ERROR abstractbundledata get Bundle e Classpath Entry frag Entries build Classpath classpath abstractbundledata domain Fragment Classpath frag Classpath new Fragment Classpath frag Entries abstractbundledata domain insert Fragment frag Classpath  BundleData BundleClassLoader BundleData BundleClassLoader BundleData BundleData ProtectionDomain BundleData ProtectionDomain ClassPath ClassPath attachFragment BundleData ProtectionDomain AbstractBundleData AbstractBundleData BundleData IOException getAdaptor getEventPublisher publishFrameworkEvent FrameworkEvent getBundle ClasspathEntry fragEntries buildClasspath FragmentClasspath fragClasspath FragmentClasspath fragEntries insertFragment fragClasspath
Inserts a fragment classpath to into the list of fragments for this host Fragments are inserted into the list according to the fragment s Bundle ID param frag Classpath The Fragment Classpath to insert protected synchronized void insert Fragment Fragment Classpath frag Classpath if frag Classpaths null First fragment to attach Simply create the list and add the fragment frag Classpaths new Vector 10 frag Classpaths add Element frag Classpath return Find a place in the fragment list to insert this fragment int size frag Classpaths size long fragID frag Classpath bundledata get BundleID for int i 0 i size i long otherID Fragment Classpath frag Classpaths element At i bundledata get BundleID if fragID otherID frag Classpaths insert Element At frag Classpath i return This fragment has the highest ID put it at the end of the list frag Classpaths add Element frag Classpath  fragClasspath FragmentClasspath insertFragment FragmentClasspath fragClasspath fragClasspaths fragClasspaths fragClasspaths addElement fragClasspath fragClasspaths fragClasspath getBundleID FragmentClasspath fragClasspaths elementAt getBundleID fragClasspaths insertElementAt fragClasspath fragClasspaths addElement fragClasspath
Gets a Classpath Entry object for the specified Class Path entry param cp The Class Path entry to get the Classpath Entry for param bundledata The Bundle Data that the Class Path entry is for param domain The Protection Domain for the Class Path entry return The Classpath Entry object for the Class Path entry protected Classpath Entry get Classpath String cp Abstract Bundle Data bundledata Protection Domain domain Bundle File bundlefile null File file bundledata get Base Bundle File get File cp if file null file exists try bundlefile hostdata get Adaptor create Bundle File file bundledata catch IO Exception e bundledata get Adaptor get Event Publisher publish Framework Event Framework Event ERROR bundledata get Bundle e else if bundledata get Base Bundle File contains Dir cp the classpath entry is a directory in the bundle jar file bundlefile new Bundle File Nested Dir Bundle File bundledata get Base Bundle File cp if in dev mode try using the cp as an absolute path if bundlefile null Dev Class Path Helper in Development Mode file new File cp if file exists file is Absolute if the file exists and is absolute then create Bundle File for it try bundlefile hostdata get Adaptor create Bundle File file bundledata catch IO Exception e bundledata get Adaptor get Event Publisher publish Framework Event Framework Event ERROR bundledata get Bundle e if bundlefile null return create Class Path Entry bundlefile domain else return null  ClasspathEntry ClassPath ClassPath ClasspathEntry BundleData ClassPath ProtectionDomain ClassPath ClasspathEntry ClassPath ClasspathEntry getClasspath AbstractBundleData ProtectionDomain BundleFile getBaseBundleFile getFile getAdaptor createBundleFile IOException getAdaptor getEventPublisher publishFrameworkEvent FrameworkEvent getBundle getBaseBundleFile containsDir BundleFile NestedDirBundleFile getBaseBundleFile DevClassPathHelper inDevelopmentMode isAbsolute BundleFile getAdaptor createBundleFile IOException getAdaptor getEventPublisher publishFrameworkEvent FrameworkEvent getBundle createClassPathEntry
protected synchronized Class find Class String name throws Class Not Found Exception Class result find Loaded Class name if result null return result for int i 0 i classpath Entries length i if classpath Entries i null result find Class Impl name classpath Entries i if result null return result look in fragments if frag Classpaths null int size frag Classpaths size for int i 0 i size i Fragment Classpath fragCP Fragment Classpath frag Classpaths element At i for int j 0 j fragCP classpath Entries length j result find Class Impl name fragCP classpath Entries j if result null return result throw new Class Not Found Exception name  findClass ClassNotFoundException findLoadedClass classpathEntries classpathEntries findClassImpl classpathEntries fragClasspaths fragClasspaths FragmentClasspath FragmentClasspath fragClasspaths elementAt classpathEntries findClassImpl classpathEntries ClassNotFoundException
Finds a class in the Bundle File If a class is found then the class is defined using the Protection Domain bundledomain param name The name of the class to find param classpath Entry The Classpath Entry to find the class in return The loaded class object or null if the class is not found protected Class find Class Impl String name Classpath Entry classpath Entry if Debug DEBUG Debug DEBUG LOADER Debug println Bundle Class Loader hostdata find Class name NON NLS 1 NON NLS 2 NON NLS 3 String filename name replace concat class NON NLS 1 Bundle Entry entry classpath Entry get Bundle File get Entry filename if entry null return null Input Stream in try in entry get Input Stream catch IO Exception e return null int length int entry get Size byte classbytes int bytesread 0 int readcount if Debug DEBUG Debug DEBUG LOADER Debug println about to read length bytes from filename NON NLS 1 NON NLS 2 try try if length 0 classbytes new byte length readloop for bytesread length bytesread readcount readcount in read classbytes bytesread length bytesread if readcount 0 if we didn t read anything break readloop leave the loop else Bundle Entry does not know its own length length buffersize classbytes new byte length readloop while true for bytesread length bytesread readcount readcount in read classbytes bytesread length bytesread if readcount 0 if we didn t read anything break readloop leave the loop byte oldbytes classbytes length buffersize classbytes new byte length System arraycopy oldbytes 0 classbytes 0 bytesread catch IO Exception e if Debug DEBUG Debug DEBUG LOADER Debug println IO Exception reading filename from hostdata NON NLS 1 NON NLS 2 return null finally try in close catch IO Exception ee if Debug DEBUG Debug DEBUG LOADER Debug println read bytesread bytes from filename NON NLS 1 NON NLS 2 Debug println defining class name NON NLS 1 try return define Class name classbytes 0 bytesread classpath Entry catch Error e if Debug DEBUG Debug DEBUG LOADER Debug println error defining class name NON NLS 1 throw e  BundleFile ProtectionDomain classpathEntry ClasspathEntry findClassImpl ClasspathEntry classpathEntry DEBUG_LOADER BundleClassLoader findClass BundleEntry classpathEntry getBundleFile getEntry InputStream getInputStream IOException getSize DEBUG_LOADER BundleEntry IOException DEBUG_LOADER IOException IOException DEBUG_LOADER defineClass classpathEntry DEBUG_LOADER
protected Class define Class String name byte classbytes int off int len Classpath Entry classpath Entry throws Class Format Error if name null name starts With java NON NLS 1 To work around the security issue that prevents any other classloader except for the bootstrap classloader from loading packages that start with java name null return define Class name classbytes off len classpath Entry get Protection Domain  defineClass ClasspathEntry classpathEntry ClassFormatError startsWith defineClass classpathEntry getProtectionDomain
protected URL find Resource String name URL result null for int i 0 i classpath Entries length i if classpath Entries i null result find Resource Impl name classpath Entries i get Bundle File if result null return result look in fragments if frag Classpaths null int size frag Classpaths size for int i 0 i size i Fragment Classpath fragCP Fragment Classpath frag Classpaths element At i for int j 0 j fragCP classpath Entries length j result find Resource Impl name fragCP classpath Entries j get Bundle File if result null return result return null  findResource classpathEntries classpathEntries findResourceImpl classpathEntries getBundleFile fragClasspaths fragClasspaths FragmentClasspath FragmentClasspath fragClasspaths elementAt classpathEntries findResourceImpl classpathEntries getBundleFile
Looks in the specified Bundle File for the resource param name The name of the resource to find param bundlefile The Bundle File to look in return A URL to the resource or null if the resource does not exist protected URL find Resource Impl String name Bundle File bundlefile return bundlefile get ResourceURL name hostdata get BundleID  BundleFile BundleFile findResourceImpl BundleFile getResourceURL getBundleID
see org eclipse osgi framework adaptor Bundle Class Loader find Local Resources String public Enumeration find Local Resources String resource Vector resources new Vector 6 for int i 0 i classpath Entries length i if classpath Entries i null URL url find Resource Impl resource classpath Entries i get Bundle File if url null resources add Element url look in fragments if frag Classpaths null int size frag Classpaths size for int i 0 i size i Fragment Classpath fragCP Fragment Classpath frag Classpaths element At i for int j 0 j fragCP classpath Entries length j URL url find Resource Impl resource fragCP classpath Entries j get Bundle File if url null resources add Element url if resources size 0 return resources elements return null  BundleClassLoader findLocalResources findLocalResources classpathEntries classpathEntries findResourceImpl classpathEntries getBundleFile addElement fragClasspaths fragClasspaths FragmentClasspath FragmentClasspath fragClasspaths elementAt classpathEntries findResourceImpl classpathEntries getBundleFile addElement
public Object find Local Object String object Bundle Entry result null for int i 0 i classpath Entries length i if classpath Entries i null result find Object Impl object classpath Entries i get Bundle File if result null return result look in fragments if frag Classpaths null int size frag Classpaths size for int i 0 i size i Fragment Classpath fragCP Fragment Classpath frag Classpaths element At i for int j 0 j fragCP classpath Entries length j result find Object Impl object fragCP classpath Entries j get Bundle File if result null return result return null  findLocalObject BundleEntry classpathEntries classpathEntries findObjectImpl classpathEntries getBundleFile fragClasspaths fragClasspaths FragmentClasspath FragmentClasspath fragClasspaths elementAt classpathEntries findObjectImpl classpathEntries getBundleFile
protected Bundle Entry find Object Impl String object Bundle File bundle File return bundle File get Entry object  BundleEntry findObjectImpl BundleFile bundleFile bundleFile getEntry
Closes all the Bundle File objects for this Bundle Class Loader public void close do not close if we are shutting down if closed hostdata get Adaptor is Stopping return super close if classpath Entries null for int i 0 i classpath Entries length i if classpath Entries i null try if classpath Entries i get Bundle File hostdata get Base Bundle File classpath Entries i get Bundle File close catch IO Exception e hostdata get Adaptor get Event Publisher publish Framework Event Framework Event ERROR hostdata get Bundle e if frag Classpaths null int size frag Classpaths size for int i 0 i size i Fragment Classpath fragCP Fragment Classpath frag Classpaths element At i fragCP close  BundleFile BundleClassLoader getAdaptor isStopping classpathEntries classpathEntries classpathEntries classpathEntries getBundleFile getBaseBundleFile classpathEntries getBundleFile IOException getAdaptor getEventPublisher publishFrameworkEvent FrameworkEvent getBundle fragClasspaths fragClasspaths FragmentClasspath FragmentClasspath fragClasspaths elementAt
protected Classpath Entry build Classpath String classpath Abstract Bundle Data bundledata Protection Domain domain Array List result new Array List 10 If not in dev mode then just add the regular classpath entries and return if Dev Class Path Helper in Development Mode for int i 0 i classpath length i find Class Path Entry result classpath i bundledata domain return Classpath Entry result to Array new Classpath Entry result size Otherwise add the legacy entries for backwards compatibility and then for each classpath entry add the dev entries as spec d in the corresponding properties file If none are spec d add the classpath entry itself add Default Dev Entries result bundledata domain for int i 0 i classpath length i String dev Entries get Dev Entries classpath i bundledata if dev Entries null dev Entries length 0 for int j 0 j dev Entries length j find Class Path Entry result dev Entries j bundledata domain else find Class Path Entry result classpath i bundledata domain return Classpath Entry result to Array new Classpath Entry result size  ClasspathEntry buildClasspath AbstractBundleData ProtectionDomain ArrayList ArrayList DevClassPathHelper inDevelopmentMode findClassPathEntry ClasspathEntry toArray ClasspathEntry addDefaultDevEntries devEntries getDevEntries devEntries devEntries devEntries findClassPathEntry devEntries findClassPathEntry ClasspathEntry toArray ClasspathEntry
protected void add Default Dev Entries Array List result Abstract Bundle Data bundledata Protection Domain domain String dev Class Path Dev Class Path Helper get Dev Class Path bundledata get Symbolic Name if dev Class Path null return for int i 0 i dev Class Path length i find Class Path Entry result dev Class Path i bundledata domain  addDefaultDevEntries ArrayList AbstractBundleData ProtectionDomain devClassPath DevClassPathHelper getDevClassPath getSymbolicName devClassPath devClassPath findClassPathEntry devClassPath
protected void find Class Path Entry Array List result String entry Abstract Bundle Data bundledata Protection Domain domain if add Class Path Entry result entry bundledata domain if devCP null Bundle Exception be new Bundle Exception Msg formatter get String BUNDLE CLASSPATH ENTRY NOT FOUND EXCEPTION entry hostdata get Location bundledata get Adaptor get Event Publisher publish Framework Event Framework Event ERROR bundledata get Bundle be  findClassPathEntry ArrayList AbstractBundleData ProtectionDomain addClassPathEntry BundleException BundleException getString BUNDLE_CLASSPATH_ENTRY_NOT_FOUND_EXCEPTION getLocation getAdaptor getEventPublisher publishFrameworkEvent FrameworkEvent getBundle
protected boolean add Class Path Entry Array List result String entry Abstract Bundle Data bundledata Protection Domain domain if entry equals NON NLS 1 result add create Class Path Entry bundledata get Base Bundle File domain return true Object element get Classpath entry bundledata domain if element null result add element return true need to check in fragments for the classpath entry only check for fragments if the bundledata is the hostdata if frag Classpaths null hostdata bundledata int size frag Classpaths size for int i 0 i size i Fragment Classpath fragCP Fragment Classpath frag Classpaths element At i element get Classpath entry fragCP bundledata fragCP domain if element null result add element return true return false  addClassPathEntry ArrayList AbstractBundleData ProtectionDomain createClassPathEntry getBaseBundleFile getClasspath fragClasspaths fragClasspaths FragmentClasspath FragmentClasspath fragClasspaths elementAt getClasspath
protected String get Dev Entries String classpath Entry Abstract Bundle Data bundledata File prop Location bundledata get Base Bundle File get File classpath Entry properties NON NLS 1 if prop Location null return null try Input Stream in new File Input Stream prop Location try Properties dev Props new Properties dev Props load in return Dev Class Path Helper get Array From List dev Props get Property bin NON NLS 1 finally in close catch IO Exception e Bundle Exception be new Bundle Exception Adaptor Msg formatter get String BUNDLE CLASSPATH PROPERTIES ERROR prop Location e NON NLS 1 bundledata get Adaptor get Event Publisher publish Framework Event Framework Event ERROR bundledata get Bundle be return null  getDevEntries classpathEntry AbstractBundleData propLocation getBaseBundleFile getFile classpathEntry propLocation InputStream FileInputStream propLocation devProps devProps DevClassPathHelper getArrayFromList devProps getProperty IOException BundleException BundleException AdaptorMsg getString BUNDLE_CLASSPATH_PROPERTIES_ERROR propLocation getAdaptor getEventPublisher publishFrameworkEvent FrameworkEvent getBundle
Creates a Classpath Entry from a Bundle File and Protection Domain param bundlefile the Bundle File param domain the Protection Domain return the Classpath Entry protected Classpath Entry create Class Path Entry Bundle File bundlefile Protection Domain domain return new Classpath Entry bundlefile domain  ClasspathEntry BundleFile ProtectionDomain BundleFile ProtectionDomain ClasspathEntry ClasspathEntry createClassPathEntry BundleFile ProtectionDomain ClasspathEntry
protected Fragment Classpath Classpath Entry classpath Entries Abstract Bundle Data bundledata Protection Domain domain this classpath Entries classpath Entries this bundledata bundledata this domain domain  FragmentClasspath ClasspathEntry classpathEntries AbstractBundleData ProtectionDomain classpathEntries classpathEntries
protected void close for int i 0 i classpath Entries length i try if classpath Entries i get Bundle File bundledata get Base Bundle File classpath Entries i get Bundle File close catch IO Exception e bundledata get Adaptor get Event Publisher publish Framework Event Framework Event ERROR bundledata get Bundle e  classpathEntries classpathEntries getBundleFile getBaseBundleFile classpathEntries getBundleFile IOException getAdaptor getEventPublisher publishFrameworkEvent FrameworkEvent getBundle
protected Protection Domain domain protected Classpath Entry Bundle File bundlefile Protection Domain domain this bundlefile bundlefile this domain domain  ProtectionDomain ClasspathEntry BundleFile ProtectionDomain
public Bundle File get Bundle File return bundlefile  BundleFile getBundleFile
public Protection Domain get Protection Domain return domain  ProtectionDomain getProtectionDomain

public class Default Element Factory implements Adaptor Element Factory public Abstract Bundle Data create Bundle Data Abstract Framework Adaptor adaptor long id throws IO Exception return new Default Bundle Data Default Adaptor adaptor id  DefaultElementFactory AdaptorElementFactory AbstractBundleData createBundleData AbstractFrameworkAdaptor IOException DefaultBundleData DefaultAdaptor
public org eclipse osgi framework adaptor Bundle Class Loader create Class Loader Class Loader Delegate delegate Protection Domain domain String bundleclasspath Abstract Bundle Data data return new Default Class Loader delegate domain bundleclasspath data get Adaptor get Bundle Class Loader Parent data  BundleClassLoader createClassLoader ClassLoaderDelegate ProtectionDomain AbstractBundleData DefaultClassLoader getAdaptor getBundleClassLoaderParent

public class Default Log implements Framework Log public Default Log  DefaultLog FrameworkLog DefaultLog
public void log Framework Event framework Event  FrameworkEvent frameworkEvent
public void log Framework Log Entry log Entry  FrameworkLogEntry logEntry
public void set Writer Writer new Writer boolean append  setWriter newWriter
public void set File File new File boolean append throws IO Exception  setFile newFile IOException
public File get File return null  getFile
public void set Console Log boolean console Log  setConsoleLog consoleLog
public void close 

Constructor throws IO Exception If an error occurs initializing the object protected Default Permission Storage Default Adaptor adaptor throws IO Exception permission Dir new File adaptor get Bundle Store Root Dir permdata NON NLS 1 permission Files new Hashtable if permission Dir exists permission Dir mkdirs if Debug DEBUG Debug DEBUG GENERAL Debug println Unable to create directory permission Dir get Path NON NLS 1 throw new IO Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION NON NLS 1 default Data new File permission Dir default NON NLS 1 load Locations  IOException DefaultPermissionStorage DefaultAdaptor IOException permissionDir getBundleStoreRootDir permissionFiles permissionDir permissionDir DEBUG_GENERAL permissionDir getPath IOException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION defaultData permissionDir loadLocations
Returns the locations that have permission data assigned to them that is locations for which permission data exists in persistent storage return The locations that have permission data in persistent storage or tt null tt if there is no permission data in persistent storage throws IO Exception If a failure occurs accessing peristent storage public synchronized String get Locations throws IO Exception int size permission Files size if size 0 return null String locations new String size Enumeration enum permission Files keys for int i 0 i size i locations i String enum next Element return locations  IOException getLocations IOException permissionFiles permissionFiles nextElement
Gets the permission data assigned to the specified location param location The location whose permission data is to be returned return The permission data assigned to the specified location or tt null tt if that location has not been assigned any permission data throws IO Exception If a failure occurs accessing peristent storage public synchronized String get Permission Data String location throws IO Exception File file if location null file default Data else file File permission Files get location if file null return null try return read Data file catch File Not Found Exception e return null  IOException getPermissionData IOException defaultData permissionFiles readData FileNotFoundException
Assigns the specified permission data to the specified location param location The location that will be assigned the permissions param data The permission data to be assigned or tt null tt if the specified location is to be removed from persistent storaqe throws IO Exception If a failure occurs modifying peristent storage public synchronized void set Permission Data String location String data throws IO Exception File file if location null file default Data if data null Reliable File delete default Data else save default Data null data Save the value in persistent storage else file File permission Files get location if data null if file null return permission Files remove location Reliable File delete file else file save file location data Save the value in persistent storage permission Files put location file  IOException setPermissionData IOException defaultData ReliableFile defaultData defaultData permissionFiles permissionFiles ReliableFile permissionFiles
Load the locations for which permission data exists throws IO Exception If an error occurs reading the files protected void load Locations throws IO Exception String list permission Dir list int len list length for int i 0 i len i String name list i if name ends With Reliable File new Ext continue if name ends With Reliable File old Ext continue if name ends With Reliable File tmp Ext continue File file new File permission Dir name try String location read Location file if location null permission Files put location file catch File Not Found Exception e the file should have been there  IOException loadLocations IOException permissionDir endsWith ReliableFile newExt endsWith ReliableFile oldExt endsWith ReliableFile tmpExt permissionDir readLocation permissionFiles FileNotFoundException
Read the location from the specified file param file File to read the location from return Location from the file or null if the file is unknown throws IO Exception If an error occurs reading the file throws File Not Found Exception if the data file does not exist private String read Location File file throws IO Exception Data Input Stream in new Data Input Stream new Reliable File Input Stream file try int version in read Int switch version case PERMISSIONDATA VERSION 1 boolean location Present in read Boolean if location Present String location in readUTF return location break default throw new IO Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION NON NLS 1 finally in close return null  IOException FileNotFoundException readLocation IOException DataInputStream DataInputStream ReliableFileInputStream readInt PERMISSIONDATA_VERSION_1 locationPresent readBoolean locationPresent IOException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION
Read the permission data from the specified file param file File to read the permission data from throws IO Exception If an error occurs reading the file throws File Not Found Exception if the data file does not exist private String read Data File file throws IO Exception Data Input Stream in new Data Input Stream new Reliable File Input Stream file try int version in read Int switch version case PERMISSIONDATA VERSION 1 boolean location Present in read Boolean if location Present String location in readUTF int size in read Int String data new String size for int i 0 i size i data i in readUTF return data default throw new IO Exception Adaptor Msg formatter get String ADAPTOR STORAGE EXCEPTION NON NLS 1 finally in close  IOException FileNotFoundException readData IOException DataInputStream DataInputStream ReliableFileInputStream readInt PERMISSIONDATA_VERSION_1 locationPresent readBoolean locationPresent readInt IOException AdaptorMsg getString ADAPTOR_STORAGE_EXCEPTION
Save the permission data for the specified location This assumes an attempt has been made to load the specified location just prior to calling save protected File save File file String location String data throws IO Exception if file null we need to create a filename file File create Temp File perm permission Dir NON NLS 1 NON NLS 2 file delete delete the empty file int size data length Data Output Stream out new Data Output Stream new Reliable File Output Stream file try out write Int PERMISSIONDATA VERSION if location null out write Boolean false else out write Boolean true out writeUTF location out write Int size for int i 0 i size i out writeUTF data i finally out close return file  IOException createTempFile permissionDir DataOutputStream DataOutputStream ReliableFileOutputStream writeInt PERMISSIONDATA_VERSION writeBoolean writeBoolean writeInt

public static String get Dev Class Path String id String result null if id null dev Properties null String entry dev Properties get Property id if entry null result get Array From List entry if result null result dev Default Classpath return result  getDevClassPath devProperties devProperties getProperty getArrayFromList devDefaultClasspath
Returns the result of converting a list of comma separated tokens into an array return the array of string tokens param prop the initial comma separated string public static String get Array From List String prop if prop null prop trim equals NON NLS 1 return new String 0 Vector list new Vector String Tokenizer tokens new String Tokenizer prop NON NLS 1 while tokens has More Tokens String token tokens next Token trim if token equals NON NLS 1 list add Element token return list is Empty new String 0 String list to Array new String list size  getArrayFromList StringTokenizer StringTokenizer hasMoreTokens nextToken addElement isEmpty toArray
public static boolean in Development Mode return in Development Mode  inDevelopmentMode inDevelopmentMode
private static Properties load URL url Properties props new Properties try Input Stream is null try is url open Stream props load is finally is close catch IO Exception e TODO consider logging here return props  InputStream openStream IOException

Constructs a Meta Data object that uses the datafile to persistently store data param datafile The File object used to persistently load and store data param header The header to use when storing data persistently public Meta Data File datafile String header this datafile datafile this header header  MetaData MetaData
Gets the metadata value for the key param key the key of the metadata param def the default value to return if the key does not exist return the value of the metadata or null if the key does not exist and the specified default is null public String get String key String def return properties get Property key def  getProperty
Gets the integer value for the key param key the key of the metadata param def the default value to return if the key does not exist return the value of the metadata if the key does not exist or the value cannot be converted to an int value then the specified default value is returned public int get Int String key int def String result get key null if result null return def try return Integer parse Int result catch Number Format Exception nfe return def  getInt parseInt NumberFormatException
Gets the long value for the key param key the key of the metadata param def the default value to return if the key does not exist return the value of the metadata if the key does not exist or the value cannot be converted to an long value then the specified default value is returned public long get Long String key long def String result get key null if result null return def try return Long parse Long result catch Number Format Exception nfe return def  getLong parseLong NumberFormatException
Gets the boolean value for the key param key the key of the metadata param def the default value to return if the key does not exist return the value of the metadata if the key does not exist then the specified default value is returned public boolean get Boolean String key boolean def String result get key null if result null return def return Boolean value Of result boolean Value  getBoolean valueOf booleanValue
Sets the String value for a key param key the key of the metadata param val the value of the metadata public void set String key String val properties put key val 
Sets the int value for a key param key the key of the metadata param val the value of the metadata public void set Int String key int val properties put key Integer to String val  setInt toString
Sets the long value for a key param key the key of the metadata param val the value of the metadata public void set Long String key long val properties put key Long to String val  setLong toString
Sets the boolean value for a key param key the key of the metadata param val the value of the metadata public void set Boolean String key boolean val properties put key new Boolean val to String  setBoolean toString
Removes the metadata value with the specified key param key the key of the metadata to be removed public void remove String key properties remove key 
Saves the metadata to persistent storage throws IO Exception if there is a problem saving to persistent storage public void save throws IO Exception File Output Stream fos new File Output Stream datafile properties store fos header  IOException IOException FileOutputStream FileOutputStream
Loads the metadata from persistent storage throws IO Exception if there is a problem reading from persistent storage public void load throws IO Exception properties clear if datafile exists File Input Stream fis new File Input Stream datafile properties load fis fis close  IOException IOException FileInputStream FileInputStream
see Object to String public String to String return properties to String  toString toString toString

Constructor for a bundle protocol resource URL Stream Handler public Handler super  URLStreamHandler
public Handler Bundle Entry bundle Entry super bundle Entry  BundleEntry bundleEntry bundleEntry
protected Bundle Entry find Bundle Entry URL url Abstract Bundle bundle throws IO Exception Abstract Bundle Data bundle Data Abstract Bundle Data bundle get Bundle Data Bundle Entry entry bundle Data get Base Bundle File get Entry url get Path if entry null throw new File Not Found Exception url get Path return entry  BundleEntry findBundleEntry AbstractBundle IOException AbstractBundleData bundleData AbstractBundleData getBundleData BundleEntry bundleData getBaseBundleFile getEntry getPath FileNotFoundException getPath

Constructor for a bundle protocol resource URL Stream Handler public Handler super  URLStreamHandler
public Handler Bundle Entry bundle Entry super bundle Entry  BundleEntry bundleEntry bundleEntry
protected Bundle Entry find Bundle Entry URL url Abstract Bundle bundle throws IO Exception Bundle Loader bundle Loader bundle get Bundle Loader if bundle Loader null throw new File Not Found Exception url get Path Bundle Entry entry Bundle Entry bundle Loader find Object url get Path if entry null throw new File Not Found Exception url get Path return entry  BundleEntry findBundleEntry AbstractBundle IOException BundleLoader bundleLoader getBundleLoader bundleLoader FileNotFoundException getPath BundleEntry BundleEntry bundleLoader findObject getPath FileNotFoundException getPath

public Content Handler Factory Bundle Context context this context context proxies new Hashtable 5 We need to track content handler registrations content Handler Tracker new Service Tracker context content Handler Clazz null content Handler Tracker open  ContentHandlerFactory BundleContext contentHandlerTracker ServiceTracker contentHandlerClazz contentHandlerTracker
see java net Content Handler Factory create Content Handler String TODO method is too long consider reducing indentation returning quickly and moving complex steps to private methods public Content Handler create Content Handler String content Type first we check to see if there exists a built in content handler for this content type we can not overwrite built in Content Handlers String built In Handlers System get Property CONTENT HANDLER PKGS Class clazz null if built In Handlers null replace with a and all characters not allowed in a java class name with a   find all characters not allowed in java names String converted Content Type content Type replace   converted Content Type converted Content Type replace converted Content Type converted Content Type replace   String Tokenizer tok new String Tokenizer built In Handlers NON NLS 1 while tok has More Elements String Buffer name new String Buffer name append tok next Token name append NON NLS 1 name append converted Content Type try clazz Class for Name name to String if clazz null return null this class exists it is a built in handler let the JVM handle it catch Class Not Found Exception ex keep looking first check to see if the handler is in the cache Content Handler Proxy proxy Content Handler Proxy proxies get content Type if proxy null return proxy org osgi framework Service Reference service References content Handler Tracker get Service References if service References null for int i 0 i service References length i String content Handler String service References i get Property URL Constants URL CONTENT MIMETYPE if content Handler null for int j 0 j content Handler length j if content Handler j equals content Handler Content Handler handler Content Handler context get Service service References i proxy new Content Handler Proxy content Type service References i context proxies put content Type handler return proxy If we can t find the content handler in the service registry return Proxy with Default Content Handler set We need to do this because if we return null we won t get called again for this content type proxy new Content Handler Proxy content Type null context proxies put content Type proxy return proxy  ContentHandlerFactory createContentHandler ContentHandler createContentHandler contentType ContentHandlers builtInHandlers getProperty CONTENT_HANDLER_PKGS builtInHandlers _ convertedContentType contentType _ convertedContentType convertedContentType convertedContentType convertedContentType _ StringTokenizer StringTokenizer builtInHandlers hasMoreElements StringBuffer StringBuffer nextToken convertedContentType forName toString ClassNotFoundException ContentHandlerProxy ContentHandlerProxy contentType ServiceReference serviceReferences contentHandlerTracker getServiceReferences serviceReferences serviceReferences contentHandler serviceReferences getProperty URLConstants URL_CONTENT_MIMETYPE contentHandler contentHandler contentHandler contentHandler ContentHandler ContentHandler getService serviceReferences ContentHandlerProxy contentType serviceReferences contentType DefaultContentHandler ContentHandlerProxy contentType contentType

public Content Handler Proxy String content Type Service Reference reference Bundle Context context this context context this content Type content Type if reference null set New Handler reference get Rank reference In this case the proxy is constructed for a Content Handler that is not currently registered Use the Default Content Handler until a Content Handler for this mime type is registered else real Handler new Default Content Handler content Handler Service Tracker new Service Tracker context Content Handler class get Name this content Handler Service Tracker open  ContentHandlerProxy contentType ServiceReference BundleContext contentType contentType setNewHandler getRank DefaultContentHandler ContentHandler realHandler DefaultContentHandler contentHandlerServiceTracker ServiceTracker ContentHandler getName contentHandlerServiceTracker
private void set New Handler Service Reference reference int rank this content Handler Service Reference reference Object property reference get Property Constants SERVICE RANKING this ranking rank this real Handler Content Handler context get Service reference  setNewHandler ServiceReference contentHandlerServiceReference getProperty SERVICE_RANKING realHandler ContentHandler getService
see org osgi util tracker Service Tracker Customizer adding Service Service Reference public Object adding Service Service Reference reference check to see if our content Type is being registered by another service String content Types String reference get Property URL Constants URL CONTENT MIMETYPE for int i 0 i content Types length i if content Types i equals content Type If our content Type is registered by another service check the service ranking and switch URL Stream Handlers if nessecary int new Service Ranking get Rank reference int new Service Ranking Integer reference get Property Constants SERVICE RANKING int Value if new Service Ranking ranking set New Handler reference new Service Ranking return reference we don t want to continue hearing events about a Content Handler service not registered under our content Type return null  ServiceTrackerCustomizer addingService ServiceReference addingService ServiceReference contentType contentTypes getProperty URLConstants URL_CONTENT_MIMETYPE contentTypes contentTypes contentType contentType URLStreamHandlers newServiceRanking getRank newServiceRanking getProperty SERVICE_RANKING intValue newServiceRanking setNewHandler newServiceRanking ContentHandler contentType
see org osgi util tracker Service Tracker Customizer modified Service Service Reference Object public void modified Service Service Reference reference Object service int newrank get Rank reference if reference content Handler Service Reference if newrank ranking The Content Handler we are currently using has dropped it s ranking below a Content Handler registered for the same protocol We need to swap out Content Handlers this should get us the highest ranked service if available Service Reference new Reference content Handler Service Tracker get Service Reference if new Reference content Handler Service Reference new Reference null set New Handler new Reference Integer new Reference get Property Constants SERVICE RANKING int Value else if newrank ranking the service changed is another URL Handler that we are not currently using If it s ranking is higher we must swap it in set New Handler reference newrank  ServiceTrackerCustomizer modifiedService ServiceReference modifiedService ServiceReference getRank contentHandlerServiceReference ContentHandler ContentHandler ContentHandlers ServiceReference newReference contentHandlerServiceTracker getServiceReference newReference contentHandlerServiceReference newReference setNewHandler newReference newReference getProperty SERVICE_RANKING intValue URLHandler setNewHandler
see org osgi util tracker Service Tracker Customizer removed Service Service Reference Object public void removed Service Service Reference reference Object service check to see if our URL Stream Handler was unregistered If so look for a lower ranking URL Handler TODO invert test and return quickly to reduce indentation if reference content Handler Service Reference this should get us the highest ranking service left if available Service Reference new Reference content Handler Service Tracker get Service Reference if new Reference null set New Handler new Reference get Rank new Reference else ranking 1 real Handler new Default Content Handler  ServiceTrackerCustomizer removedService ServiceReference removedService ServiceReference URLStreamHandler URLHandler contentHandlerServiceReference ServiceReference newReference contentHandlerServiceTracker getServiceReference newReference setNewHandler newReference getRank newReference realHandler DefaultContentHandler
see java net Content Handler get Content URL Connection public Object get Content URL Connection u Conn throws IO Exception return real Handler get Content u Conn  ContentHandler getContent URLConnection getContent URLConnection uConn IOException realHandler getContent uConn
private int get Rank Service Reference reference Object property reference get Property Constants SERVICE RANKING return property instanceof Integer Integer property int Value 0  getRank ServiceReference getProperty SERVICE_RANKING intValue
see java net Content Handler get Content URL Connection public Object get Content URL Connection u Conn throws IO Exception return u Conn get Input Stream  ContentHandler getContent URLConnection getContent URLConnection uConn IOException uConn getInputStream

public class NullURL Stream Handler Service implements URL Stream Handler Service public URL Connection open Connection URL u throws IO Exception throw new MalformedURL Exception  NullURLStreamHandlerService URLStreamHandlerService URLConnection openConnection IOException MalformedURLException
public boolean equals URL url1 URL url2 throw new Illegal State Exception  IllegalStateException
public int get Default Port throw new Illegal State Exception  getDefaultPort IllegalStateException
public Inet Address get Host Address URL url throw new Illegal State Exception  InetAddress getHostAddress IllegalStateException
public int hash Code URL url throw new Illegal State Exception  hashCode IllegalStateException
public boolean hosts Equal URL url1 URL url2 throw new Illegal State Exception  hostsEqual IllegalStateException
public boolean same File URL url1 URL url2 throw new Illegal State Exception  sameFile IllegalStateException
public void setURL URL u String protocol String host int port String authority String user Info String file String query String ref throw new Illegal State Exception  userInfo IllegalStateException
public void setURL URL u String protocol String host int port String file String ref throw new Illegal State Exception  IllegalStateException
public String to External Form URL url throw new Illegal State Exception  toExternalForm IllegalStateException
public void parseURL URL Stream Handler Setter real Handler URL u String spec int start int limit throw new Illegal State Exception  URLStreamHandlerSetter realHandler IllegalStateException

public interface Protocol Activator public void start Bundle Context context Framework Adaptor adaptor  ProtocolActivator BundleContext FrameworkAdaptor

public class Handler extends URL Stream Handler public Handler  URLStreamHandler
protected URL Connection open Connection URL url throws IO Exception return new ReferenceURL Connection url  URLConnection openConnection IOException ReferenceURLConnection
protected void parseURL URL url String str int start int end if end start return String reference start end str substring start end url get Path setURL url url get Protocol null 1 null null reference null null  getPath getProtocol

protected URL reference protected ReferenceURL Connection URL url super url  ReferenceURLConnection
public synchronized void connect throws IO Exception if connected TODO assumes that reference UR Ls are always based on file UR Ls There are not solid usecases to the contrary Yet Construct the ref URL carefully so as to preserve UNC paths etc File file new File url get Path substring 5 URL ref file toURL if file exists throw new File Not Found Exception reference ref  IOException URLs URLs getPath FileNotFoundException
public boolean get Do Input return true  getDoInput
public boolean get Do Output return false  getDoOutput
public Input Stream get Input Stream throws IO Exception if connected connect return new Reference Input Stream reference  InputStream getInputStream IOException ReferenceInputStream

Create the factory param context Bundle Context for the system bundle public Stream Handler Factory Bundle Context context Framework Adaptor adaptor this context context this adaptor adaptor proxies new Hashtable 15 handler Tracker new Service Tracker context URLSTREAMHANDLERCLASS null handler Tracker open  BundleContext StreamHandlerFactory BundleContext FrameworkAdaptor handlerTracker ServiceTracker handlerTracker
Creates a new URL Stream Handler instance for the specified protocol param protocol The desired protocol return a URL Stream Handler for the specific protocol TODO consider refactoring this method it is too long public URL Stream Handler createURL Stream Handler String protocol first check for built in handlers String built In Handlers System get Property PROTOCOL HANDLER PKGS Class clazz null if built In Handlers null String Tokenizer tok new String Tokenizer built In Handlers NON NLS 1 while tok has More Elements String Buffer name new String Buffer name append tok next Token name append NON NLS 1 name append protocol name append Handler NON NLS 1 try clazz Class for Name name to String if clazz null return null this class exists it is a built in handler let the JVM handle it catch Class Not Found Exception ex keep looking internal protocol handlers String name INTERNAL PROTOCOL HANDLER PKG protocol Handler NON NLS 1 try clazz Class for Name name Now we checdk the service registry catch Class Not Found Exception e first check to see if the handler is in the cache URL Stream Handler Proxy handler URL Stream Handler Proxy proxies get protocol if handler null return handler TODO avoid deep nesting of control structures return early look through the service registry for a URL Stram Handler registered for this protocol org osgi framework Service Reference service References handler Tracker get Service References if service References null for int i 0 i service References length i String protocols String service References i get Property URL Constants URL HANDLER PROTOCOL if protocols null for int j 0 j protocols length j if protocols j equals protocol handler new URL Stream Handler Proxy protocol service References i context proxies put protocol handler return handler return null if clazz null return null try URL Stream Handler handler URL Stream Handler clazz new Instance if handler instanceof Protocol Activator Protocol Activator handler start context adaptor return handler catch Exception e return null  URLStreamHandler URLStreamHandler URLStreamHandler createURLStreamHandler builtInHandlers getProperty PROTOCOL_HANDLER_PKGS builtInHandlers StringTokenizer StringTokenizer builtInHandlers hasMoreElements StringBuffer StringBuffer nextToken forName toString ClassNotFoundException INTERNAL_PROTOCOL_HANDLER_PKG forName ClassNotFoundException URLStreamHandlerProxy URLStreamHandlerProxy URLStramHandler ServiceReference serviceReferences handlerTracker getServiceReferences serviceReferences serviceReferences serviceReferences getProperty URLConstants URL_HANDLER_PROTOCOL URLStreamHandlerProxy serviceReferences URLStreamHandler URLStreamHandler newInstance ProtocolActivator ProtocolActivator

public URL Stream Handler Proxy String protocol Service Reference reference Bundle Context context handler Registered true this context context this protocol protocol url Setter new URL Stream Handler Setter this set the ranking Object property reference get Property Constants SERVICE RANKING ranking property instanceof Integer Integer property int Value 0 this real Handler Service URL Stream Handler Service context get Service reference this url Stream Service Reference reference url Stream Handler Service Tracker new Service Tracker context Stream Handler Factory URLSTREAMHANDLERCLASS this url Stream Handler Service Tracker open  URLStreamHandlerProxy ServiceReference BundleContext handlerRegistered urlSetter URLStreamHandlerSetter getProperty SERVICE_RANKING intValue realHandlerService URLStreamHandlerService getService urlStreamServiceReference urlStreamHandlerServiceTracker ServiceTracker StreamHandlerFactory urlStreamHandlerServiceTracker
private void set New Handler Service Reference reference int rank this url Stream Service Reference reference this ranking rank this real Handler Service URL Stream Handler Service context get Service reference  setNewHandler ServiceReference urlStreamServiceReference realHandlerService URLStreamHandlerService getService
see java net URL Stream Handler equals URL URL protected boolean equals URL url1 URL url2 return real Handler Service equals url1 url2  URLStreamHandler realHandlerService
see java net URL Stream Handler get Default Port protected int get Default Port return real Handler Service get Default Port  URLStreamHandler getDefaultPort getDefaultPort realHandlerService getDefaultPort
see java net URL Stream Handler get Host Address URL protected Inet Address get Host Address URL url return real Handler Service get Host Address url  URLStreamHandler getHostAddress InetAddress getHostAddress realHandlerService getHostAddress
see java net URL Stream Handler hash Code URL protected int hash Code URL url return real Handler Service hash Code url  URLStreamHandler hashCode hashCode realHandlerService hashCode
see java net URL Stream Handler hosts Equal URL URL protected boolean hosts Equal URL url1 URL url2 return real Handler Service hosts Equal url1 url2  URLStreamHandler hostsEqual hostsEqual realHandlerService hostsEqual
see java net URL Stream Handler open Connection URL protected URL Connection open Connection URL url throws IO Exception return real Handler Service open Connection url  URLStreamHandler openConnection URLConnection openConnection IOException realHandlerService openConnection
see java net URL Stream Handler parseURL URL String int int protected void parseURL URL url String str int start int end real Handler Service parseURL url Setter url str start end  URLStreamHandler realHandlerService urlSetter
see java net URL Stream Handler same File URL URL protected boolean same File URL url1 URL url2 return real Handler Service same File url1 url2  URLStreamHandler sameFile sameFile realHandlerService sameFile
see java net URL Stream Handler to External Form URL protected String to External Form URL url return real Handler Service to External Form url  URLStreamHandler toExternalForm toExternalForm realHandlerService toExternalForm
see java net URL Stream Handler setURL URL String String int String String String String String public void setURL URL u String protocol String host int port String authority String user Info String file String query String ref super setURL u protocol host port authority user Info file query ref  URLStreamHandler userInfo userInfo
public void setURL URL url String protocol String host int port String file String ref using non deprecated URL Stream Handler setURL method setURL URL u String protocol String host int port String authority String user Info String file String query String ref super setURL url protocol host port null null file null ref  URLStreamHandler userInfo
see org osgi util tracker Service Tracker Customizer adding Service Service Reference public Object adding Service Service Reference reference check to see if our protocol is being registered by another service String protocols String reference get Property URL Constants URL HANDLER PROTOCOL for int i 0 i protocols length i if protocols i equals protocol If our protocol is registered by another service check the service ranking and switch URL Stream Handlers if nessecary Object property reference get Property Constants SERVICE RANKING int new Service Ranking property instanceof Integer Integer property int Value 0 if handler Registered set New Handler reference new Service Ranking handler Registered true if new Service Ranking ranking set New Handler reference new Service Ranking return reference we don t want to continue hearing events about a URL Stream Handler Service not registered under our protocol return null  ServiceTrackerCustomizer addingService ServiceReference addingService ServiceReference getProperty URLConstants URL_HANDLER_PROTOCOL URLStreamHandlers getProperty SERVICE_RANKING newServiceRanking intValue handlerRegistered setNewHandler newServiceRanking handlerRegistered newServiceRanking setNewHandler newServiceRanking URLStreamHandlerService
see org osgi util tracker Service Tracker Customizer modified Service Service Reference Object TODO return earlier avoid nesting of ifs check to see if the ranking has changed If so re select a new URL Handler public void modified Service Service Reference reference Object service int new Rank get Rank reference if reference url Stream Service Reference if new Rank ranking The URL Handler we are currently using has dropped it s ranking below a URL Handler registered for the same protocol We need to swap out URL Handlers this should get us the highest ranked service if available Service Reference new Reference url Stream Handler Service Tracker get Service Reference if new Reference url Stream Service Reference new Reference null set New Handler new Reference Integer new Reference get Property Constants SERVICE RANKING int Value else if new Rank ranking the service changed is another URL Handler that we are not currently using If it s ranking is higher we must swap it in set New Handler reference new Rank  ServiceTrackerCustomizer modifiedService ServiceReference URLHandler modifiedService ServiceReference newRank getRank urlStreamServiceReference newRank URLHandler URLHandler URLHandlers ServiceReference newReference urlStreamHandlerServiceTracker getServiceReference newReference urlStreamServiceReference newReference setNewHandler newReference newReference getProperty SERVICE_RANKING intValue newRank URLHandler setNewHandler newRank
see org osgi util tracker Service Tracker Customizer removed Service Service Reference Object public void removed Service Service Reference reference Object service check to see if our URL Stream Handler was unregistered If so look for a lower ranking URL Handler if reference url Stream Service Reference this should get us the highest ranking service left if available Service Reference new Reference url Stream Handler Service Tracker get Service Reference if new Reference null set New Handler new Reference get Rank new Reference else handler Registered false real Handler Service new NullURL Stream Handler Service ranking 1  ServiceTrackerCustomizer removedService ServiceReference removedService ServiceReference URLStreamHandler URLHandler urlStreamServiceReference ServiceReference newReference urlStreamHandlerServiceTracker getServiceReference newReference setNewHandler newReference getRank newReference handlerRegistered realHandlerService NullURLStreamHandlerService
private int get Rank Service Reference reference return Integer reference get Property Constants SERVICE RANKING int Value  getRank ServiceReference getProperty SERVICE_RANKING intValue

protected URL Stream Handler Proxy handler Proxy public URL Stream Handler Setter URL Stream Handler Proxy handler this handler Proxy handler  URLStreamHandlerProxy handlerProxy URLStreamHandlerSetter URLStreamHandlerProxy handlerProxy
see org osgi service url URL Stream Handler Setter setURL URL String String int String String deprecated public void setURL URL url String protocol String host int port String file String ref handler Proxy setURL url protocol host port file ref  URLStreamHandlerSetter handlerProxy
see org osgi service url URL Stream Handler Setter setURL URL String String int String String String String String public void setURL URL url String protocol String host int port String authority String user Info String path String query String ref handler Proxy setURL url protocol host port authority user Info path query ref  URLStreamHandlerSetter userInfo handlerProxy userInfo

Reliable File object factory This method is called by Reliable File Input Stream and Reliable File Output Stream to get a Reliable File object for a target file If the object is in the cache the cached copy is returned Otherwise a new Reliable File object is created and returned The use count of the returned Reliable File object is incremented param name Name of the target file return A Reliable File object for the target file throws IO Exception If the target file is a directory static Reliable File get Reliable File String name throws IO Exception return get Reliable File new File name  ReliableFile ReliableFileInputStream ReliableFileOutputStream ReliableFile ReliableFile ReliableFile ReliableFile IOException ReliableFile getReliableFile IOException getReliableFile
Reliable File object factory This method is called by Reliable File Input Stream and Reliable File Output Stream to get a Reliable File object for a target file If the object is in the cache the cached copy is returned Otherwise a new Reliable File object is created and returned The use count of the returned Reliable File object is incremented param file File object for the target file return A Reliable File object for the target file throws IO Exception If the target file is a directory static Reliable File get Reliable File File file throws IO Exception if file is Directory throw new File Not Found Exception file is a directory NON NLS 1 synchronized files Reliable File reliable Reliable File files get file if reliable null reliable new Reliable File file files put file reliable reliable use return reliable  ReliableFile ReliableFileInputStream ReliableFileOutputStream ReliableFile ReliableFile ReliableFile ReliableFile IOException ReliableFile getReliableFile IOException isDirectory FileNotFoundException ReliableFile ReliableFile ReliableFile
Decrement this object s use count If the use count drops to zero remove this object from the cache private void release synchronized files use if use 0 files remove org File  orgFile
Private constructor used by the static get Reliable File factory methods param file File object for the target file private Reliable File File file String name file get Path org File file Added a random number to the filename to avoid any chance of corruption if someone should create multiple writes to the same file PAL tmp File new File name new Random next Int 0x1000000 tmp Ext NON NLS 1 old File new File name old Ext new File new File name new Ext use 0 locked false version VERSION UNKNOWN append Crc null if aging Interval 1 aging Interval AGING INTERVAL DEFAULT String value System get Property MINIMUM AGING INTERVAL KEY if value null try int i Integer parse Int value if i 0 aging Interval i catch Number Format Exception nfe System err println Invalid property value for key MINIMUM AGING INTERVAL KEY NON NLS 1 NON NLS 2  getReliableFile ReliableFile getPath orgFile tmpFile nextInt tmpExt oldFile oldExt newFile newExt VERSION_UNKNOWN appendCrc agingInterval agingInterval AGING_INTERVAL_DEFAULT getProperty MINIMUM_AGING_INTERVAL_KEY parseInt agingInterval NumberFormatException MINIMUM_AGING_INTERVAL_KEY
Recovers the target file if necessary and returns an Input Stream object for reading the target file return An Input Stream object which can be used to read the target file throws IO Exception If an error occurs preparing the file synchronized Input Stream get Input Stream throws IO Exception try lock catch IO Exception e the lock request failed decrement the use count release throw e try Buffered Input Stream bis recover File if bis null return new File Input Stream org File get Path else return bis don t double read file from storage catch IO Exception e unlock release throw e  InputStream InputStream IOException InputStream getInputStream IOException IOException BufferedInputStream recoverFile FileInputStream orgFile getPath IOException
Close the target file for reading throws IO Exception If an error occurs closing the file This method does not need to be synchronized if it only calls release void close Input File throws IO Exception unlock release  IOException closeInputFile IOException
Recovers the target file if necessary and returns an Output Stream object for writing the target file return An Output Stream object which can be used to write the target file throws IO Exception If an error occurs preparing the file synchronized Output Stream get Output Stream boolean append throws IO Exception try lock catch IO Exception e the lock request failed decrement the use count release throw e try always recover file PAL this way we will never have a invalid file as a bak file Buffered Input Stream bis recover File Don t forget to close the input stream we won t need it any more if bis null bis close catch IO Exception e if append unlock release throw e otherwise go on try if append if org File exists int truncate if version VERSION 2 truncate 16 else truncate 0 cp org File tmp File truncate else if tmp File exists rm tmp File return new File Output Stream tmp File get Path append catch IO Exception e unlock release throw e  OutputStream OutputStream IOException OutputStream getOutputStream IOException IOException BufferedInputStream recoverFile IOException orgFile VERSION_2 orgFile tmpFile tmpFile tmpFile FileOutputStream tmpFile getPath IOException
Close the target file for reading throws IO Exception If an error occurs closing the file synchronized void close Output File throws IO Exception try boolean org Exists org File exists boolean new Exists new File exists fix for files being cached too often On some platforms seen on Windows XP QNX the data just written to a file can held in the filesystem cache If the file is written to too often then both the org File and old File data contents can be held in cache The problem is that the directory structure can be flushed before the data is flushed easily recreated on Windows XP then if power is lost then both the org File and old File contents are garbage To reduce the chances of this we will only move an org File to old File if it is older than N seconds This will greatly reduce the chances that both copies could be lost in the filesystem cache during a power off failure The net result is when a file is written several times in a short time frame we will move the original org File to old File then rewrite org File several times without changing old File PAL This problem is greatly reduced by calling java io File Output Stream getFD sync method before the close Now this time can be shortened considerably PAL boolean backup Org true long org Age System current Time Millis org File last Modified if org Age 0 org Age aging Interval backup Org false if new Exists shouldn t be possible but just in case PAL rm new File mv tmp File new File if org Exists if new Exists rm org File else if backup Org rm old File mv org File old File else org File is not old enough do not replace old File rm org File mv new File org File finally unlock release  IOException closeOutputFile IOException orgExists orgFile newExists newFile orgFile oldFile orgFile oldFile orgFile oldFile orgFile oldFile orgFile oldFile FileOutputStream backupOrg orgAge currentTimeMillis orgFile lastModified orgAge orgAge agingInterval backupOrg newExists newFile tmpFile newFile orgExists newExists orgFile backupOrg oldFile orgFile oldFile orgFile oldFile orgFile newFile orgFile
This method recovers the reliable file if necessary throws IO Exception If an error occurs recovering the file private Buffered Input Stream recover File throws IO Exception boolean org Exists org File exists boolean new Exists new File exists boolean old Exists old File exists Checksum org Crc null Checksum new Crc null Checksum old Crc null int org Version VERSION 2 int old Version VERSION 2 Buffered Input Stream org Bis null Buffered Input Stream new Bis null Buffered Input Stream old Bis null if new Exists new Crc get Checksum Calculator if not valid it doesn t exist ignore if it has a signature don t use it new Bis new Buffered Input Stream new File Input Stream new File new Exists is Valid Reliable File new Bis new Crc null if new Exists if not valid delete the unusable file rm new File always create org Crc account for case that new org old don t exist org Crc get Checksum Calculator if org Exists boolean org Has Sig new boolean 1 org Bis new Buffered Input Stream new File Input Stream org File boolean org Valid is Valid Reliable File org Bis org Crc org Has Sig if org Valid if old Exists old Crc get Checksum Calculator boolean old Has Sig new boolean 1 old Bis new Buffered Input Stream new File Input Stream old File boolean old Valid is Valid Reliable File old Bis old Crc old Has Sig if old Valid swap them old file is good org file is bad if tmp File exists rm tmp File if org Bis null org Bis close org Bis null if old Bis null old Bis close old Bis null mv org File tmp File mv old File org File mv tmp File old File org Version VERSION 2 old Version VERSION UNKNOWN else org is bad old is bad if org Has Sig 0 old Has Sig 0 org looks like text file old looks like text file use org File org Version VERSION PLAINTEXT old Version VERSION PLAINTEXT else if org Has Sig 0 old Has Sig 0 org is corrupt old file is text file use old file swap them if tmp File exists rm tmp File if org Bis null org Bis close org Bis null if old Bis null old Bis close old Bis null mv org File tmp File mv old File org File mv tmp File old File org Version VERSION PLAINTEXT old Version VERSION UNKNOWN else if org Has Sig 0 old Has Sig 0 both org old are corrupt not good if new Exists throw new IO Exception Reliable File is corrupt NON NLS 1 else allow new to replace org else if org Has Sig 0 old Has Sig 0 hmmmm org look like text file old is corrupt could happen if org is bad old is plain text they d get swapped else org is bad old doesn t exist if org Has Sig 0 if new Exists throw new IO Exception Reliable File is corrupt NON NLS 1 else new File is good restore it else else use org File must be hand made or old version org Version VERSION PLAINTEXT else else org File is good won t ever use old File else if old Exists no orig file yes old file check old file old Crc get Checksum Calculator boolean old Has Sig new boolean 1 old Bis new Buffered Input Stream new File Input Stream old File boolean old Valid is Valid Reliable File old Bis old Crc old Has Sig if old Valid if old Has Sig 0 old has signature but not valid if new Exists throw new IO Exception Reliable File is corrupt NON NLS 1 else allow new to become org else else file appears to be a text file use it old Version VERSION PLAINTEXT else else no problem use old File if new Exists if org Bis null org Bis close if old Bis null old Bis close if new Bis null new Bis close new Bis null if org Exists if old Exists rm old File mv org File old File mv new File org File append Crc new Crc version VERSION 2 must be a version2 file return new Bis else if old Exists org Exists if org Bis null org Bis close cp old File org File 0 append Crc old Crc version old Version return old Bis else if old Bis null old Bis close append Crc org Crc version org Version return org Bis  IOException BufferedInputStream recoverFile IOException orgExists orgFile newExists newFile oldExists oldFile orgCrc newCrc oldCrc orgVersion VERSION_2 oldVersion VERSION_2 BufferedInputStream orgBis BufferedInputStream newBis BufferedInputStream oldBis newExists newCrc getChecksumCalculator newBis BufferedInputStream FileInputStream newFile newExists isValidReliableFile newBis newCrc newExists newFile orgCrc orgCrc getChecksumCalculator orgExists orgHasSig orgBis BufferedInputStream FileInputStream orgFile orgValid isValidReliableFile orgBis orgCrc orgHasSig orgValid oldExists oldCrc getChecksumCalculator oldHasSig oldBis BufferedInputStream FileInputStream oldFile oldValid isValidReliableFile oldBis oldCrc oldHasSig oldValid tmpFile tmpFile orgBis orgBis orgBis oldBis oldBis oldBis orgFile tmpFile oldFile orgFile tmpFile oldFile orgVersion VERSION_2 oldVersion VERSION_UNKNOWN orgHasSig oldHasSig orgFile orgVersion VERSION_PLAINTEXT oldVersion VERSION_PLAINTEXT orgHasSig oldHasSig tmpFile tmpFile orgBis orgBis orgBis oldBis oldBis oldBis orgFile tmpFile oldFile orgFile tmpFile oldFile orgVersion VERSION_PLAINTEXT oldVersion VERSION_UNKNOWN orgHasSig oldHasSig newExists IOException ReliableFile orgHasSig oldHasSig orgHasSig newExists IOException ReliableFile newFile orgFile orgVersion VERSION_PLAINTEXT orgFile oldFile oldExists oldCrc getChecksumCalculator oldHasSig oldBis BufferedInputStream FileInputStream oldFile oldValid isValidReliableFile oldBis oldCrc oldHasSig oldValid oldHasSig newExists IOException ReliableFile oldVersion VERSION_PLAINTEXT oldFile newExists orgBis orgBis oldBis oldBis newBis newBis newBis orgExists oldExists oldFile orgFile oldFile newFile orgFile appendCrc newCrc VERSION_2 newBis oldExists orgExists orgBis orgBis oldFile orgFile appendCrc oldCrc oldVersion oldBis oldBis oldBis appendCrc orgCrc orgVersion orgBis
Lock the target file throws IO Exception If the file is already locked private void lock throws IO Exception if locked throw new File Not Found Exception file locked NON NLS 1 locked true  IOException IOException FileNotFoundException
Unlock the target file private void unlock locked false 
Rename a file param from The original file param to The new file name throws IO Exception If the rename failed private static void mv File from File to throws IO Exception if from rename To to throw new IO Exception rename failed NON NLS 1  IOException IOException renameTo IOException
Copy a file param from The original file param to The target file throws IO Exception If the copy failed private static void cp File from File to int truncate Size throws IO Exception File Input Stream in null File Output Stream out null try out new File Output Stream to int length int from length if truncate Size length length 0 else length truncate Size if length 0 if length CP BUF SIZE length CP BUF SIZE in new File Input Stream from byte buffer new byte length int size 0 int count while count in read buffer 0 length 0 if size count length count length size out write buffer 0 count size count in close in null out close out null catch IO Exception e close open streams if out null try out close catch IO Exception ee if in null try in close catch IO Exception ee throw e  IOException truncateSize IOException FileInputStream FileOutputStream FileOutputStream truncateSize truncateSize CP_BUF_SIZE CP_BUF_SIZE FileInputStream IOException IOException IOException
Delete a file param file The file to delete throws IO Exception If the delete failed private static void rm File file throws IO Exception if file exists file delete throw new IO Exception delete failed NON NLS 1  IOException IOException IOException
Answers a boolean indicating whether or not the specified reliable file exists on the underlying file system return code true code if the specified reliable file exists code false code otherwise public static boolean exists File file if file exists quick test return true String name file get Path return new File name old Ext exists new File name new Ext exists  getPath oldExt newExt
Returns the time that the file denoted by this abstract pathname was last modified return time the file was last modified see java io File last Modified public static long last Modified File file String name file get Path File new File new File name new Ext if new File exists return new File last Modified if file exists return file last Modified File old File new File name old Ext return old File last Modified  lastModified lastModified getPath newFile newExt newFile newFile lastModified lastModified oldFile oldExt oldFile lastModified
Delete this reliable file on the underlying file system throws IO Exception If the delete failed private synchronized void delete throws IO Exception try lock catch IO Exception e the lock request failed decrement the use count release throw e try rm old File rm org File rm new File rm tmp File finally unlock release  IOException IOException IOException oldFile orgFile newFile tmpFile
Delete the specified reliable file on the underlying file system return code true code if the specified reliable file was deleted code false code otherwise public static boolean delete File file try get Reliable File file delete return true catch IO Exception e return false  getReliableFile IOException
Returns the size of the Reliable File signature CRC at the end of the file This method should be called only after calling get Input Stream or get Output Stream methods return code int code size of the ReliableF Ile signature CRC appended to the end of the file throws IO Exception if get Input Stream or get Output Stream has not been called protected int get Signature Size throws IO Exception if version VERSION UNKNOWN throw new IO Exception Version is unknown NON NLS 1 if version VERSION 2 return 16 else return 0  ReliableFile getInputStream getOutputStream ReliableFIle IOException getInputStream getOutputStream getSignatureSize IOException VERSION_UNKNOWN IOException VERSION_2
Returns a Checksum object for the current file contents This method should be called only after calling get Input Stream or get Output Stream methods return Object implementing Checksum interface initialized to the current file contents throws IO Exception if get Input Stream or get Output Stream has not been called protected Checksum get File Checksum throws IO Exception if append Crc null throw new IO Exception Checksum is invalid NON NLS 1 return append Crc  getInputStream getOutputStream IOException getInputStream getOutputStream getFileChecksum IOException appendCrc IOException appendCrc
Create a checksum implementation used by Reliable File return Object implementing Checksum interface used to calculate a reliable file checksum protected static Checksum get Checksum Calculator Using CRC32 because Adler32 isn t in the jcl Gwp library return new CRC32  ReliableFile getChecksumCalculator jclGwp
Determine if a File is a valid Reliable File return code true code if the file is a valid Reliable File throws IO Exception If an error occurs verifying the file protected static boolean is Valid Reliable File Buffered Input Stream bis Checksum crc boolean contains Signature throws IO Exception if contains Signature null contains Signature 0 false bis mark bis available try int len bis available if len 16 if crc null byte data new byte 16 int num bis read data if num 0 crc update data 0 num return false len 16 if crc null crc get Checksum Calculator int pos 0 byte data new byte 8192 do if pos len break int read data length if pos read len read len pos int num bis read data 0 read if num 1 throw new IO Exception Unable to read entire file NON NLS 1 crc update data 0 num pos num while true byte sig new byte 16 int num bis read sig if num 16 throw new IO Exception Unable to read entire file NON NLS 1 int i int j for i 0 i 4 i if identifier1 i sig i crc update sig 0 16 update crc w sig bytes return false for i 0 j 12 i 4 i j if identifier2 i sig j crc update sig 0 16 update crc w sig bytes return false if contains Signature null contains Signature 0 true long crccmp Long value Of new String sig 4 8 16 long Value if crccmp crc get Value return true else do not update CRC return false finally bis reset  ReliableFile ReliableFile IOException isValidReliableFile BufferedInputStream containsSignature IOException containsSignature containsSignature getChecksumCalculator IOException IOException containsSignature containsSignature valueOf longValue getValue
protected static String int To Hex int l byte buffer new byte 8 int count 8 do int ch l 0xf if ch 9 ch ch 10 int a else ch int 0 buffer count byte ch l 4 while count 0 return new String buffer  intToHex

Constructs a new Reliable File Input Stream on the file named code name code If the file does not exist the code File Not Found Exception code is thrown The code name code may be absolute or relative to the System property code user dir code paramnamethe file on which to stream reads exception java io IO Exception If an error occurs opening the file public Reliable File Input Stream String name throws IO Exception this Reliable File get Reliable File name  ReliableFileInputStream FileNotFoundException IOException ReliableFileInputStream IOException ReliableFile getReliableFile
Constructs a new Reliable File Input Stream on the File code file code If the file does not exist the code File Not Found Exception code is thrown paramfilethe File on which to stream reads exception java io IO Exception If an error occurs opening the file public Reliable File Input Stream File file throws IO Exception this Reliable File get Reliable File file  ReliableFileInputStream FileNotFoundException IOException ReliableFileInputStream IOException ReliableFile getReliableFile
Private constructor used by other constructors paramreliablethe Reliable File on which to read exception java io IO Exception If an error occurs opening the file private Reliable File Input Stream Reliable File reliable throws IO Exception super reliable get Input Stream this reliable reliable sig Size reliable get Signature Size read Pos 0 length super available if sig Size length length 0 shouldn t ever happen else length sig Size  ReliableFile IOException ReliableFileInputStream ReliableFile IOException getInputStream sigSize getSignatureSize readPos sigSize sigSize
Closes this input stream and releases any system resources associated with the stream exception java io IO Exception If an error occurs closing the file public synchronized void close throws IO Exception if reliable null try super close finally reliable close Input File reliable null  IOException IOException closeInputFile
Override default Filter Input Stream method public synchronized int read byte b int off int len throws IO Exception if read Pos length return 1 int num super read b off len if num 1 if num read Pos length num length read Pos read Pos num return num  FilterInputStream IOException readPos readPos readPos readPos
Override default Filter Input Stream method public synchronized int read byte b throws IO Exception return read b 0 b length  FilterInputStream IOException
Override default Filter Input Stream method public synchronized int read throws IO Exception if read Pos length return 1 int num super read if num 1 read Pos return num  FilterInputStream IOException readPos readPos
Override default available method public synchronized int available throws IO Exception if read Pos length just in case return length read Pos else return 0  IOException readPos readPos
Override default skip method public synchronized long skip long n throws IO Exception long len super skip n if read Pos len length len length read Pos read Pos len return len  IOException readPos readPos readPos
Override default mark Supported method public boolean mark Supported return false  markSupported markSupported
Override default mark method public void mark int readlimit 
Override default reset method public void reset throws IO Exception throw new IO Exception reset not supported NON NLS 1  IOException IOException

Constructs a new Reliable File Output Stream on the File code file code If the file exists it is written over See the constructor which can append to the file if so desired paramfilethe File on which to stream reads exception java io IO Exception If an error occurs opening the file public Reliable File Output Stream File file throws IO Exception this Reliable File get Reliable File file false  ReliableFileOutputStream IOException ReliableFileOutputStream IOException ReliableFile getReliableFile
Constructs a new Reliable File Output Stream on the File code file code paramfilethe File on which to stream reads paramappenda boolean indicating whether or not to append to an existing file exception java io IO Exception If an error occurs opening the file public Reliable File Output Stream File file boolean append throws IO Exception this Reliable File get Reliable File file append  ReliableFileOutputStream IOException ReliableFileOutputStream IOException ReliableFile getReliableFile
Constructs a new Reliable File Output Stream on the file named code name code If the file exists it is written over See the constructor which can append to the file if so desired The code name code may be absolute or relative to the System property code user dir code paramnamethe file on which to stream writes exception java io IO Exception If an error occurs opening the file public Reliable File Output Stream String name throws IO Exception this Reliable File get Reliable File name false  ReliableFileOutputStream IOException ReliableFileOutputStream IOException ReliableFile getReliableFile
Constructs a new Reliable File Output Stream on the file named code name code The code name code may be absolute or relative to the System property code user dir code paramnamethe file on which to stream writes paramappenda boolean indicating whether or not to append to an existing file exception java io IO Exception If an error occurs opening the file public Reliable File Output Stream String name boolean append throws IO Exception this Reliable File get Reliable File name append  ReliableFileOutputStream IOException ReliableFileOutputStream IOException ReliableFile getReliableFile
Private constructor used by other constructors paramreliablethe Reliable File on which to read paramappenda boolean indicating whether or not to append to an existing file exception java io IO Exception If an error occurs opening the file private Reliable File Output Stream Reliable File reliable boolean append throws IO Exception super reliable get Output Stream append this reliable reliable if append crc reliable get File Checksum else crc Reliable File get Checksum Calculator  ReliableFile IOException ReliableFileOutputStream ReliableFile IOException getOutputStream getFileChecksum ReliableFile getChecksumCalculator
Closes this output stream and releases any system resources associated with this stream The general contract of code close code is that it closes the output stream A closed stream cannot perform output operations and cannot be reopened exception java io IO Exception If an error occurs closing the file public synchronized void close throws IO Exception if reliable null try tag on our signature and checksum out write Reliable File identifier1 byte crc Str Reliable File int To Hex int crc get Value get Bytes out write crc Str out write Reliable File identifier2 try out flush File Output Stream out getFD sync catch IO Exception e just ignore this Exception Debug e print Stack Trace super close finally reliable close Output File reliable null  IOException IOException ReliableFile crcStr ReliableFile intToHex getValue getBytes crcStr ReliableFile FileOutputStream IOException printStackTrace closeOutputFile
Override default Filter Output Stream method public void write byte b throws IO Exception this write b 0 b length  FilterOutputStream IOException
Override default Filter Output Stream method public void write byte b int off int len throws IO Exception out write b off len crc update b off len  FilterOutputStream IOException
Override default Filter Output Stream method public void write int b throws IO Exception out write b crc update byte b  FilterOutputStream IOException

main method for Launcher This method creates an Launcher object and kicks off the actual launch of a Framework instance param args The command line arguments public static void main String args new Launcher do It args  doIt
Default constructor Nothing at all to do here public Launcher 
Performs the actual launch based on the command line arguments param args The command line arguments protected void do It String args String console Args parse Args args Framework Adaptor adaptor null try adaptor do Adaptor catch Exception e System out println Msg formatter get String LAUNCHER ADAPTOR ERROR NON NLS 1 e print Stack Trace return OS Gi osgi doOS Gi adaptor if osgi null if console do Console osgi console Args else osgi launch  doIt consoleArgs parseArgs FrameworkAdaptor doAdaptor getString LAUNCHER_ADAPTOR_ERROR printStackTrace OSGi doOSGi doConsole consoleArgs
Parses the command line arguments and remembers them so they can be processed later param args The command line arguments return String Any arguments that should be passed to the console private String parse Args String args Vector console Args Vector new Vector for int i 0 i args length i boolean match false Have to check for args that may be contained in double quotes but broken up by spaces for example adaptor bundledir c my bundle dir reset should all be one arg but java breaks it into 3 args ignoring the quotes Must put it back together into one arg String fullarg args i int quoteidx fullarg index Of NON NLS 1 if quoteidx 0 if quoteidx fullarg last Index Of NON NLS 1 boolean stillparsing true i while i args length stillparsing fullarg fullarg args i NON NLS 1 i if quoteidx fullarg last Index Of NON NLS 1 stillparsing false else IDE can t pass double quotes due to known eclipse bug see Bugzilla 93201 Allowing for use of single quotes quoteidx fullarg index Of NON NLS 1 if quoteidx 0 if quoteidx fullarg last Index Of NON NLS 1 boolean stillparsing true i while i args length stillparsing fullarg fullarg args i NON NLS 1 i if quoteidx fullarg last Index Of NON NLS 1 stillparsing false fullarg fullarg replace Tokenizer tok new Tokenizer fullarg if tok has More Tokens String command tok get String NON NLS 1 String Tokenizer subtok new String Tokenizer command NON NLS 1 String subcommand subtok next Token to Lower Case if match Command console subcommand 4 NON NLS 1  console command match true if match Command adaptor subcommand 2 NON NLS 1  adaptor command match true if match false if the command doesn t match any of the known commands save it to pass to the console console Args Vector add Element fullarg convert arguments to be passed to console into a string array for the Console String console Args Array new String console Args Vector size Enumeration e console Args Vector elements for int i 0 i console Args Array length i console Args Array i String e next Element return console Args Array  parseArgs consoleArgsVector indexOf lastIndexOf lastIndexOf indexOf lastIndexOf lastIndexOf hasMoreTokens getString StringTokenizer StringTokenizer nextToken toLowerCase matchCommand _console matchCommand _adaptor consoleArgsVector addElement consoleArgsArray consoleArgsVector consoleArgsVector consoleArgsArray consoleArgsArray nextElement consoleArgsArray
public static boolean match Command String command String input int min Length if min Length 0 min Length command length int length input length if min Length length length min Length return command region Matches 0 input 0 length  matchCommand minLength minLength minLength minLength minLength regionMatches
Remembers that the console option has been requested protected void  console String command console true String Tokenizer tok new String Tokenizer command NON NLS 1 first token is always console String cmd tok next Token if tok has More Tokens console Port tok next Token  _console StringTokenizer StringTokenizer nextToken hasMoreTokens consolePort nextToken
Remembers that the adaptor option has been requested Parses off the adaptor class file name the adaptor file name and the size if they are there param command The rest of the adaptor parameter string that contains the class file name and possibly the adaptor file and file size protected void  adaptor String command Tokenizer tok new Tokenizer command first token is always adaptor String cmd tok get Token NON NLS 1 tok get Char advance to next token and next token is either adaptor class name or if we should use the default adaptor String adp tok get Token NON NLS 1 if adp length 0 adaptor Class Name adp The following tokens are arguments to be processed by the adaptor implementation class They may be enclosed in quotes Store them in a vector until we know how many there are Vector v new Vector parseloop while true tok get Char advance to next token String arg tok get String NON NLS 1 if arg null break parseloop else v add Element arg now that we know how many args there are move args from vector to String if v null int num Args v size adaptor Args new String num Args Enumeration e v elements for int i 0 i num Args i adaptor Args i String e next Element  _adaptor getToken getChar getToken adaptorClassName getChar getString addElement numArgs adaptorArgs numArgs numArgs adaptorArgs nextElement
Processes the adaptor command line argument Parses the arguments to get the adaptor class name the adaptor dir or filename and the adaptor file size return a Framework Adaptor object protected Framework Adaptor do Adaptor throws Exception Class adaptor Class Class for Name adaptor Class Name Class constructor Args new Class String class Constructor constructor adaptor Class get Constructor constructor Args return Framework Adaptor constructor new Instance new Object adaptor Args  FrameworkAdaptor FrameworkAdaptor doAdaptor adaptorClass forName adaptorClassName constructorArgs adaptorClass getConstructor constructorArgs FrameworkAdaptor newInstance adaptorArgs
Creates the OS Gi framework object param adaptor The Framework Adaptor object protected OS Gi doOS Gi Framework Adaptor adaptor return new OS Gi adaptor  OSGi FrameworkAdaptor OSGi doOSGi FrameworkAdaptor OSGi
Invokes the OS Gi Console on another thread param osgi The current OS Gi instance for the console to attach to param console Args An String array containing commands from the command line for the console to execute protected void do Console OS Gi osgi String console Args Constructor console Constructor Object osgiconsole Class parameter Types Object parameters try Class osgiconsole Class Class for Name osgi Console Clazz if console Port length 0 parameter Types new Class OS Gi class String class parameters new Object osgi console Args else parameter Types new Class OS Gi class int class String class parameters new Object osgi new Integer console Port console Args console Constructor osgiconsole Class get Constructor parameter Types osgiconsole console Constructor new Instance parameters Thread t new Thread Runnable osgiconsole OSGI CONSOLE COMPONENT NAME t start catch Number Format Exception nfe System err println Msg formatter get String LAUNCHER INVALID PORT console Port NON NLS 1 catch Exception ex inform About Missing Component OSGI CONSOLE COMPONENT NAME OSGI CONSOLE COMPONENT  OSGi OSGi consoleArgs doConsole OSGi consoleArgs consoleConstructor parameterTypes osgiconsoleClass forName osgiConsoleClazz consolePort parameterTypes OSGi consoleArgs parameterTypes OSGi consolePort consoleArgs consoleConstructor osgiconsoleClass getConstructor parameterTypes consoleConstructor newInstance OSGI_CONSOLE_COMPONENT_NAME NumberFormatException getString LAUNCHER_INVALID_PORT consolePort informAboutMissingComponent OSGI_CONSOLE_COMPONENT_NAME OSGI_CONSOLE_COMPONENT
Informs the user about a missing component param component The name of the component param jar The jar file that contains the component void inform About Missing Component String component String jar System out println System out print Msg formatter get String LAUNCHER COMPONENT MISSING component NON NLS 1 System out println Msg formatter get String LAUNCHER COMPONENT JAR jar NON NLS 1 System out println  informAboutMissingComponent getString LAUNCHER_COMPONENT_MISSING getString LAUNCHER_COMPONENT_JAR

Logs the information from a Framework Event to the Framework Log param framework Event The Framework Event to log  FrameworkEvent FrameworkLog frameworkEvent FrameworkEvent
Logs the Framework Log Entry to the Framework Log param log Entry The entry to log  FrameworkLogEntry FrameworkLog logEntry
Sets the current Writer used to log messages to the specified new Writer If append is set to true then the content of the current Writer will be appended to the new Writer if possible param new Writer The Writer to use for logging messages param append Indicates whether the content of the current Writer used for logging messages should be appended to the end of the new Writer  newWriter newWriter
Sets the current File used to log messages to a File Writer using the specified File If append is set to true then the content of the current Writer will be appended to the new File if possible param new File The File to create a new File Writer which will be used for logging messages param append Indicates whether the content of the current Writer used for logging messages should be appended to the end of the new File throws IO Exception if any problem occurs while constructing a File Writer from the new File If this exception is thrown the Framework Log will not be effected and will continue to use the current Writer to log messages  FileWriter newFile FileWriter IOException FileWriter newFile FrameworkLog
Returns the log File if it is set otherwise null is returned return the log File if it is set otherwise null is returned 
Sets the console log option If this is set then all logs will be logged to System out as well as the current Writer param console Log indicates whether to log to System out  consoleLog
Closes the Framework Log After the Framework Log is closed messages may no longer be logged to it  FrameworkLog FrameworkLog

public Framework Log Entry String entry String message int stack Code Throwable throwable Framework Log Entry children this entry entry this message message this stack Code stack Code this throwable throwable this children children  FrameworkLogEntry stackCode FrameworkLogEntry stackCode stackCode
return Returns the children public Framework Log Entry get Children return children  FrameworkLogEntry getChildren
return Returns the entry public String get Entry return entry  getEntry
return Returns the message public String get Message return message  getMessage
return Returns the stack Code public int get Stack Code return stack Code  stackCode getStackCode stackCode
return Returns the throwable public Throwable get Throwable return throwable  getThrowable

protected Locale locale public Message Format String bundle Name init bundle Name Locale get Default this get Class  MessageFormat bundleName bundleName getDefault getClass
public Message Format String bundle Name Locale locale init bundle Name locale this get Class  MessageFormat bundleName bundleName getClass
public Message Format String bundle Name Locale locale Class clazz init bundle Name locale clazz  MessageFormat bundleName bundleName
bundle Resource Bundle Access Controller do Privileged new Privileged Action public Object run Class Loader loader clazz get Class Loader if loader null loader Class Loader get System Class Loader try return Resource Bundle get Bundle bundle Name locale loader catch Missing Resource Exception e return null  ResourceBundle AccessController doPrivileged PrivilegedAction ClassLoader getClassLoader ClassLoader getSystemClassLoader ResourceBundle getBundle bundleName MissingResourceException
protected void init final String bundle Name final Locale locale final Class clazz bundle Resource Bundle Access Controller do Privileged new Privileged Action public Object run Class Loader loader clazz get Class Loader if loader null loader Class Loader get System Class Loader try return Resource Bundle get Bundle bundle Name locale loader catch Missing Resource Exception e return null this locale locale  bundleName ResourceBundle AccessController doPrivileged PrivilegedAction ClassLoader getClassLoader ClassLoader getSystemClassLoader ResourceBundle getBundle bundleName MissingResourceException
Return the Locale object used for this Message Format object return Locale of this object public Locale get Locale return locale  MessageFormat getLocale
Retrieves a message which has no arguments parammsg String the key to look up return String the message for that key in the system message bundle public String get String String msg if bundle null return msg try return bundle get String msg catch Missing Resource Exception e return msg  returnString getString getString MissingResourceException
Retrieves a message which takes 1 argument parammsg String the key to look up paramarg Object the object to insert in the formatted output return String the message for that key in the system message bundle public String get String String msg Object arg return get String msg new Object arg  returnString getString getString
Retrieves a message which takes 1 integer argument parammsg String the key to look up paramarg int the integer to insert in the formatted output return String the message for that key in the system message bundle public String get String String msg int arg return get String msg new Object Integer to String arg  returnString getString getString toString
Retrieves a message which takes 1 character argument parammsg String the key to look up paramarg char the character to insert in the formatted output return String the message for that key in the system message bundle public String get String String msg char arg return get String msg new Object String value Of arg  returnString getString getString valueOf
Retrieves a message which takes 2 arguments parammsg String the key to look up paramarg1 Object an object to insert in the formatted output paramarg2 Object another object to insert in the formatted output return String the message for that key in the system message bundle public String get String String msg Object arg1 Object arg2 return get String msg new Object arg1 arg2  returnString getString getString
Retrieves a message which takes several arguments parammsg String the key to look up paramargs Object the objects to insert in the formatted output return String the message for that key in the system message bundle public String get String String msg Object args String format msg if bundle null try format bundle get String msg catch Missing Resource Exception e return format format args  returnString getString getString MissingResourceException
Generates a formatted text string given a source string containing argument markers of the form arg Num where each arg Num must be in the range 0 9 The result is generated by inserting the to String of each argument into the position indicated in the string p To insert the character into the output use a single backslash character to escape it i e The character does not need to be escaped paramformat String the format to use when printing paramargs Object the arguments to use return String the formatted message public static String format String format Object args String Buffer answer new String Buffer String arg Strings new String args length for int i 0 i args length i arg Strings i args i null null args i to String NON NLS 1 int lastI 0 for int i format index Of 0 i 0 i format index Of lastI if i 0 format char At i 1 It s escaped just print and loop if i 1 answer append format substring lastI i 1 answer append lastI i 1 else It s a format character if i format length 3 Bad format just print and loop answer append format substring lastI format length lastI format length else int argnum byte Character digit format char At i 1 10 if argnum 0 format char At i 2 Bad format just print and loop answer append format substring lastI i 1 lastI i 1 else Got a good one answer append format substring lastI i if argnum arg Strings length answer append missing argument NON NLS 1 else answer append arg Strings argnum lastI i 3 if lastI format length answer append format substring lastI format length return answer to String  argNum argNum toString returnString StringBuffer StringBuffer argStrings argStrings toString indexOf indexOf charAt charAt charAt argStrings argStrings toString

Get the plugin Info if available or create it public Bundle Stats String plugin Id this plugin Id plugin Id  pluginInfo BundleStats pluginId pluginId pluginId
public long get Timestamp return timestamp  getTimestamp
public int get Activation Order return activation Order  getActivationOrder activationOrder
protected void activated Bundle Stats plugin plugins Activated add plugin  BundleStats pluginsActivated
public Bundle Stats get Activated By return activated By  BundleStats getActivatedBy activatedBy
public String get Plugin Id return plugin Id  getPluginId pluginId
public long get Startup Time return startup Time  getStartupTime startupTime
public long get Startup Method Time return startup Method Time  getStartupMethodTime startupMethodTime
public boolean is Startup Plugin return during Startup  isStartupPlugin duringStartup
public int get Class Load Count if Stats Manager MONITOR CLASSES return 0 Classloader Stats loader Classloader Stats get Loader plugin Id return loader null 0 loader get Class Load Count  getClassLoadCount StatsManager MONITOR_CLASSES ClassloaderStats ClassloaderStats getLoader pluginId getClassLoadCount
public long get Class Load Time if Stats Manager MONITOR CLASSES return 0 Classloader Stats loader Classloader Stats get Loader plugin Id return loader null 0 loader get Class Load Time  getClassLoadTime StatsManager MONITOR_CLASSES ClassloaderStats ClassloaderStats getLoader pluginId getClassLoadTime
public Array List get Plugins Activated return plugins Activated  ArrayList getPluginsActivated pluginsActivated
public long get Trace Start return trace Start  getTraceStart traceStart
public long get Trace End return trace End  getTraceEnd traceEnd
protected void set Timestamp long value timestamp value  setTimestamp
protected void set Activation Order int value activation Order value  setActivationOrder activationOrder
protected void set Trace Start long time trace Start time  setTraceStart traceStart
protected void set During Startup boolean value during Startup value  setDuringStartup duringStartup
protected void end Activation startup Time System current Time Millis timestamp  endActivation startupTime currentTimeMillis
protected void set Trace End long position trace End position  setTraceEnd traceEnd
protected void set Activated By Bundle Stats value activated By value  setActivatedBy BundleStats activatedBy

System out println Loaded NON NLS 1 Properties filters new Properties public Object put Object key Object value add Filters String key String value return null  addFilters
private static void initialize Trace Options create the trace file String filename Stats Manager TRACE FILENAME trace File new File filename trace File delete load the filters if Stats Manager TRACE CLASSES return filename Stats Manager TRACE FILTERS if filename null filename length 0 return try File filter File new File filename System out print Runtime tracing elements defined in filter File get Absolute Path NON NLS 1 NON NLS 2 Input Stream input new File Input Stream filter File System out println Loaded NON NLS 1 Properties filters new Properties public Object put Object key Object value add Filters String key String value return null try filters load input finally input close catch IO Exception e System out println No trace filters loaded NON NLS 1  initializeTraceOptions StatsManager TRACE_FILENAME traceFile traceFile StatsManager TRACE_CLASSES StatsManager TRACE_FILTERS filterFile filterFile getAbsolutePath InputStream FileInputStream filterFile addFilters IOException
protected static void add Filters String key String value String filters Stats Manager get Array From List value if plugins equals key NON NLS 1 plugin Filters add All Arrays as List filters if packages equals key NON NLS 1 package Filters add All Arrays as List filters  addFilters StatsManager getArrayFromList pluginFilters addAll asList packageFilters addAll asList
public static void start Loading Class String id String class Name find Loader id start Load Class class Name  startLoadingClass className findLoader startLoadClass className
get and create if does not exist private static Classloader Stats find Loader String id synchronized loaders Classloader Stats result Classloader Stats loaders get id if result null result new Classloader Stats id loaders put id result return result  ClassloaderStats findLoader ClassloaderStats ClassloaderStats ClassloaderStats
public static Stack get Class Stack return class Stack  getClassStack classStack
public static Classloader Stats get Loaders the parameter to to Array is of size zero for thread safety otherwise this could return an array with null entries if the map shrinks concurrently return Classloader Stats loaders values to Array new Classloader Stats 0  ClassloaderStats getLoaders toArray ClassloaderStats toArray ClassloaderStats
public static void end Loading Class String id String class Name boolean success find Loader id end Load Class class Name success  endLoadingClass className findLoader endLoadClass className
public static void loaded Bundle String id Resource Bundle Stats info find Loader id loaded Bundle info  loadedBundle ResourceBundleStats findLoader loadedBundle
public static Classloader Stats get Loader String id return Classloader Stats loaders get id  ClassloaderStats getLoader ClassloaderStats
public Classloader Stats String id this id id keep Traces plugin Filters contains id  ClassloaderStats keepTraces pluginFilters
public void add Base Classes String base Classes for int i 0 i base Classes length i String name base Classes i if classes get name null Class Stats value new Class Stats name this value to Base Class classes put name value  addBaseClasses baseClasses baseClasses baseClasses ClassStats ClassStats toBaseClass
private void loaded Bundle Resource Bundle Stats bundle bundles add bundle  loadedBundle ResourceBundleStats
public Array List get Bundles return bundles  ArrayList getBundles
private synchronized void start Load Class String name class Stack push find Class name  startLoadClass classStack findClass
internal method that return the existing class Stats or creates one private Class Stats find Class String name Class Stats result Class Stats classes get name return result null new Class Stats name this result  classStats ClassStats findClass ClassStats ClassStats ClassStats
private synchronized void end Load Class String name boolean success Class Stats current Class Stats class Stack pop if success failure Count return if current get Load Order 0 return classes put name current current set Load Order classes size current loading Done trace Load name current is there something on the load stack if so link them together if class Stack size 0 get the time spent loading cli and subtract its load time from the class that requires loading Class Stats previous Class Stats class Stack peek previous add Time Loading Others current get Time Loading current set Loaded By previous previous loaded current else loading Time loading Time current get Time Loading  endLoadClass ClassStats ClassStats classStack failureCount getLoadOrder setLoadOrder loadingDone traceLoad classStack ClassStats ClassStats classStack addTimeLoadingOthers getTimeLoading setLoadedBy loadingTime loadingTime getTimeLoading
private void trace Load String name Class Stats target Stack trace code if keep Traces boolean found false for int i 0 found i package Filters size i if name starts With String package Filters get i found true if found return Write the stack trace The position in the file are set to the corresponding class Stat object try target set Trace Start trace File length Print Writer output new Print Writer new File Output Stream trace File get Absolute Path true try output println Loading class name NON NLS 1 output println Class loading stack NON NLS 1 output println t name NON NLS 1 for int i class Stack size 1 i 0 i output println t Class Stats class Stack get i get Class Name NON NLS 1 output println Stack trace NON NLS 1 new Throwable print Stack Trace output finally output close target set Trace End trace File length catch File Not Found Exception e e print Stack Trace  traceLoad ClassStats keepTraces packageFilters startsWith packageFilters classStat setTraceStart traceFile PrintWriter PrintWriter FileOutputStream traceFile getAbsolutePath classStack ClassStats classStack getClassName printStackTrace setTraceEnd traceFile FileNotFoundException printStackTrace
public int get Class Load Count return classes size  getClassLoadCount
public long get Class Load Time return loading Time  getClassLoadTime loadingTime
public Class Stats get Classes the parameter to to Array is of size zero for thread safety otherwise this could return an array with null entries if the map shrinks concurrently return Class Stats classes values to Array new Class Stats 0  ClassStats getClasses toArray ClassStats toArray ClassStats
public String get Id return id  getId

public Class Stats String name Classloader Stats classloader class Name name timestamp System current Time Millis during Startup Stats Manager is Booting this classloader classloader  ClassStats ClassloaderStats className currentTimeMillis duringStartup StatsManager isBooting
public void set Load Order int order load Order order  setLoadOrder loadOrder
public void loading Done time Loading System current Time Millis timestamp  loadingDone timeLoading currentTimeMillis
public long get Time Loading return time Loading  getTimeLoading timeLoading
public long get Local Time Loading return time Loading time Loading Others  getLocalTimeLoading timeLoading timeLoadingOthers
public void add Time Loading Others long time time Loading Others time Loading Others time  addTimeLoadingOthers timeLoadingOthers timeLoadingOthers
public long get Trace Start return trace Start  getTraceStart traceStart
public long get Trace End return trace End  getTraceEnd traceEnd
public void set Trace Start long position trace Start position  setTraceStart traceStart
public void set Trace End long position trace End position  setTraceEnd traceEnd
public void loaded Class Stats child loaded add child  ClassStats
public void set Loaded By Class Stats parent loaded By parent  setLoadedBy ClassStats loadedBy
public Class Stats get Loaded By return loaded By  ClassStats getLoadedBy loadedBy
public Array List get Loaded Classes return loaded  ArrayList getLoadedClasses
public String get Class Name return class Name  getClassName className
public boolean is Startup Class return during Startup  isStartupClass duringStartup
public Classloader Stats get Classloader return classloader  ClassloaderStats getClassloader
public int get Load Order return load Order  getLoadOrder loadOrder
public long get Timestamp return timestamp  getTimestamp
public void to Base Class during Startup true load Order 2  toBaseClass duringStartup loadOrder

private long file Size 0 private static int size Of String value return 44 2 value length  fileSize sizeOf
private static int size Of Properties value return int Math round 44 16 value size 1 25 4 24 value size  sizeOf
public Resource Bundle Stats String plugin Id String file Name URL input this plugin Id plugin Id this file Name file Name initialize input  ResourceBundleStats pluginId fileName pluginId pluginId fileName fileName
public Resource Bundle Stats String plugin Id String file Name Resource Bundle bundle this plugin Id plugin Id this file Name file Name initialize bundle  ResourceBundleStats pluginId fileName ResourceBundle pluginId pluginId fileName fileName
Compute the size of bundle private void initialize Resource Bundle bundle for Enumeration enum bundle get Keys enum has More Elements String key String enum next Element key Size size Of key value Size size Of bundle get String key key Count  ResourceBundle getKeys hasMoreElements nextElement keySize sizeOf valueSize sizeOf getString keyCount
Compute the size of stream which represents a property file private void initialize URL url Input Stream stream null Properties props new Properties try try stream url open Stream file Size stream available props load stream for Iterator iter props key Set iterator iter has Next String key String iter next key Size size Of key value Size size Of props get Property key key Count hash Size size Of props finally if stream null stream close catch IO Exception e ignore exceptions as they will be handled when the stream is loaded for real See callers  InputStream openStream fileSize keySet hasNext keySize sizeOf valueSize sizeOf getProperty keyCount hashSize sizeOf IOException
public long get Hash Size return hash Size  getHashSize hashSize
public int get Key Count return key Count  getKeyCount keyCount
public String get Plugin Id return plugin Id  getPluginId pluginId
public int get Key Size return key Size  getKeySize keySize
public int get Value Size return value Size  getValueSize valueSize
public long get Total Size return key Size value Size hash Size  getTotalSize keySize valueSize hashSize
public String get File Name return file Name  getFileName fileName
public long get File Size return file Size  getFileSize fileSize

public static Stats Manager get Default if default Instance null default Instance new Stats Manager default Instance initialize return default Instance  StatsManager getDefault defaultInstance defaultInstance StatsManager defaultInstance defaultInstance
public static void set Debug Options Debug Options options Debug Options get Default may be null if debugging is not enabled if options null return MONITOR ACTIVATION options get Boolean Option OPTION MONITOR ACTIVATION false MONITOR CLASSES options get Boolean Option OPTION MONITOR CLASSES false MONITOR RESOURCES options get Boolean Option OPTION MONITOR RESOURCES false TRACE CLASSES options get Boolean Option OPTION TRACE CLASSES false TRACE BUNDLES options get Boolean Option OPTION TRACE BUNDLES false TRACE FILENAME options get Option OPTION TRACE FILENAME TRACE FILENAME TRACE FILTERS options get Option OPTION TRACE FILTERS TRACE FILTERS  setDebugOptions DebugOptions DebugOptions getDefault MONITOR_ACTIVATION getBooleanOption OPTION_MONITOR_ACTIVATION MONITOR_CLASSES getBooleanOption OPTION_MONITOR_CLASSES MONITOR_RESOURCES getBooleanOption OPTION_MONITOR_RESOURCES TRACE_CLASSES getBooleanOption OPTION_TRACE_CLASSES TRACE_BUNDLES getBooleanOption OPTION_TRACE_BUNDLES TRACE_FILENAME getOption OPTION_TRACE_FILENAME TRACE_FILENAME TRACE_FILTERS getOption OPTION_TRACE_FILTERS TRACE_FILTERS
public static void done Booting booting false  doneBooting
public static boolean is Booting return booting  isBooting
Returns the result of converting a list of comma separated tokens into an array return the array of string tokens param prop the initial comma separated string public static String get Array From List String prop if prop null prop trim equals NON NLS 1 return new String 0 Vector list new Vector String Tokenizer tokens new String Tokenizer prop NON NLS 1 while tokens has More Tokens String token tokens next Token trim if token equals NON NLS 1 list add Element token return list is Empty new String 0 String list to Array new String list size  getArrayFromList StringTokenizer StringTokenizer hasMoreTokens nextToken addElement isEmpty toArray
private void initialize add the system bundle Bundle Stats plugin find Plugin Framework Adaptor FRAMEWORK SYMBOLICNAME plugin set Timestamp System current Time Millis plugin set Activation Order plugins size plugin set During Startup booting  BundleStats findPlugin FrameworkAdaptor FRAMEWORK_SYMBOLICNAME setTimestamp currentTimeMillis setActivationOrder setDuringStartup
public void start Activation Bundle bundle should be called from a synchronized location to protect against concurrent updates Bundle Stats plugin find Plugin bundle get Symbolic Name plugin set Timestamp System current Time Millis plugin set Activation Order plugins size plugin set During Startup booting Stack activation Stack Stack activation Stacks get Thread current Thread if activation Stack null activation Stack new Stack activation Stacks put Thread current Thread activation Stack set the parentage of activation if activation Stack size 0 Bundle Stats activated By Bundle Stats activation Stack peek activated By activated plugin plugin set Activated By activated By activation Stack push plugin if TRACE BUNDLES true trace Activate bundle get Symbolic Name plugin  startActivation BundleStats findPlugin getSymbolicName setTimestamp currentTimeMillis setActivationOrder setDuringStartup activationStack activationStacks currentThread activationStack activationStack activationStacks currentThread activationStack activationStack BundleStats activatedBy BundleStats activationStack activatedBy setActivatedBy activatedBy activationStack TRACE_BUNDLES traceActivate getSymbolicName
public void end Activation Bundle plugin Id Stack activation Stack Stack activation Stacks get Thread current Thread should be called from a synchronized location to protect against concurrent updates Bundle Stats plugin Bundle Stats activation Stack pop plugin end Activation  endActivation pluginId activationStack activationStacks currentThread BundleStats BundleStats activationStack endActivation
private void trace Activate String id Bundle Stats plugin try Print Writer output new Print Writer new File Output Stream Classloader Stats trace File get Absolute Path true try long start Position Classloader Stats trace File length output println Activating plugin id NON NLS 1 output println Plugin activation stack NON NLS 1 Stack activation Stack Stack activation Stacks get Thread current Thread for int i activation Stack size 1 i 0 i output println t Bundle Stats activation Stack get i get Plugin Id NON NLS 1 output println Class loading stack NON NLS 1 Stack class Stack Classloader Stats get Class Stack for int i class Stack size 1 i 0 i output println t Class Stats class Stack get i get Class Name NON NLS 1 output println Stack trace NON NLS 1 new Throwable print Stack Trace output plugin set Trace Start start Position finally output close plugin set Trace End Classloader Stats trace File length catch IO Exception e e print Stack Trace  traceActivate BundleStats PrintWriter PrintWriter FileOutputStream ClassloaderStats traceFile getAbsolutePath startPosition ClassloaderStats traceFile activationStack activationStacks currentThread activationStack BundleStats activationStack getPluginId classStack ClassloaderStats getClassStack classStack ClassStats classStack getClassName printStackTrace setTraceStart startPosition setTraceEnd ClassloaderStats traceFile IOException printStackTrace
public Bundle Stats find Plugin String id Bundle Stats result Bundle Stats plugins get id try if result null result new Bundle Stats id plugins put id result catch Illegal Access Error e e print Stack Trace return result  BundleStats findPlugin BundleStats BundleStats BundleStats IllegalAccessError printStackTrace
public Bundle Stats get Plugins return Bundle Stats plugins values to Array new Bundle Stats plugins size  BundleStats getPlugins BundleStats toArray BundleStats
public Bundle Stats get Plugin String id return Bundle Stats plugins get id  BundleStats getPlugin BundleStats

private Framework Message Format String bundle Name Locale locale Class clazz super bundle Name locale clazz this bundle Name bundle Name this clazz clazz  FrameworkMessageFormat bundleName bundleName bundleName bundleName
protected void init final String bundle Name final Locale locale final Class clazz if system Entry Locator null super init bundle Name locale clazz return URL resourceURL system Entry Locator get Properties bundle Name locale if resourceURL null Input Stream resource Stream null try resource Stream resourceURL open Stream bundle new Property Resource Bundle resource Stream this locale locale return catch IO Exception e Do nothing will just call super below finally if resource Stream null try resource Stream close catch IO Exception e Ignore exception if we get here just call super super init bundle Name locale clazz  bundleName systemEntryLocator bundleName systemEntryLocator getProperties bundleName InputStream resourceStream resourceStream openStream PropertyResourceBundle resourceStream IOException resourceStream resourceStream IOException bundleName
private void init init bundle Name locale clazz  bundleName
static public synchronized void set Context Bundle Context context if context null if Framework Message Format context null listener null Framework Message Format context remove Service Listener listener Framework Message Format context null else if Framework Message Format context null Framework Message Format context context listener new Resource Finder Listener try Framework Message Format context add Service Listener listener objectclass org eclipse osgi service systembundle Entry Locator NON NLS 1 catch Invalid Syntax Exception e Do nothing this cannot happen  setContext BundleContext FrameworkMessageFormat FrameworkMessageFormat removeServiceListener FrameworkMessageFormat FrameworkMessageFormat FrameworkMessageFormat ResourceFinderListener FrameworkMessageFormat addServiceListener EntryLocator InvalidSyntaxException
static public synchronized Message Format get Message Format String bundle Name Framework Message Format msg Format new Framework Message Format bundle Name Locale get Default Framework Message Format class msg List add msg Format return msg Format  MessageFormat getMessageFormat bundleName FrameworkMessageFormat msgFormat FrameworkMessageFormat bundleName getDefault FrameworkMessageFormat msgList msgFormat msgFormat
static private synchronized void init Messages int size msg List size for int i 0 i size i Framework Message Format msg List get i init  initMessages msgList FrameworkMessageFormat msgList
public void service Changed Service Event event synchronized Framework Message Format class int event Type event get Type Service Reference sr event get Service Reference switch event Type case Service Event REGISTERED if system Entry Locator null resource Finder Ref sr system Entry Locator Entry Locator context get Service sr init Messages break case Service Event UNREGISTERING if sr equals resource Finder Ref system Entry Locator null init Messages context unget Service resource Finder Ref resource Finder Ref null break  serviceChanged ServiceEvent FrameworkMessageFormat eventType getType ServiceReference getServiceReference eventType ServiceEvent systemEntryLocator resourceFinderRef systemEntryLocator EntryLocator getService initMessages ServiceEvent resourceFinderRef systemEntryLocator initMessages ungetService resourceFinderRef resourceFinderRef

Create an empty Headers dictionary param initial Capacity The initial capacity of this Headers object public Headers int initial Capacity super headers new Hashtable initial Capacity values new Hashtable initial Capacity  initialCapacity initialCapacity initialCapacity initialCapacity
Create a Headers dictionary from a Dictionary param values The initial dictionary for this Headers object exception Illegal Argument Exception If a case variant of the key is in the dictionary parameter public Headers Dictionary values super headers new Hashtable values size this values values initialize headers dictionary Enumeration enum values keys while enum has More Elements Object key enum next Element if key instanceof String String header String key to Lower Case if headers put header key null if case variant already present throw new Illegal Argument Exception Msg formatter get String HEADER DUPLICATE KEY EXCEPTION header NON NLS 1  IllegalArgumentException hasMoreElements nextElement toLowerCase IllegalArgumentException getString HEADER_DUPLICATE_KEY_EXCEPTION
Case preserved keys public synchronized Enumeration keys return values keys 
Values public synchronized Enumeration elements return values elements 
Support case insensitivity for keys param key name public synchronized Object get Object key Object value values get key if value null key instanceof String Object key Lower headers get String key to Lower Case if key Lower null value values get key Lower return value  keyLower toLowerCase keyLower keyLower
Set a header value param key Key name param value Value of the key or null to remove key return the previous value to which the key was mapped or null if the key did not have a previous mapping exception Illegal Argument Exception If a case variant of the key is already present public synchronized Object set Object key Object value String header key instanceof String String key to Lower Case null if value null remove if header null String key key headers remove header if key null is String key in hashtable value values remove key else non String key value values remove key return value else put if header null String key Object old Key headers put header key if old Key null header equals old Key if case variant already present headers put header old Key put old case variant back throw new Illegal Argument Exception Msg formatter get String HEADER DUPLICATE KEY EXCEPTION header NON NLS 1 return values put key value  IllegalArgumentException toLowerCase oldKey oldKey oldKey oldKey IllegalArgumentException getString HEADER_DUPLICATE_KEY_EXCEPTION
Returns the number of entries distinct keys in this dictionary return the number of keys in this dictionary public synchronized int size return values size 
Tests if this dictionary maps no keys to value The general contract for the tt is Empty tt method is that the result is true if and only if this dictionary contains no entries return code true code if this dictionary maps no keys to values code false code otherwise public synchronized boolean is Empty return values is Empty  isEmpty isEmpty isEmpty
Always throws Unsupported Operation Exception param key header name param value header value throws Unsupported Operation Exception public Object put Object key Object value throw new Unsupported Operation Exception  UnsupportedOperationException UnsupportedOperationException UnsupportedOperationException
Always throws Unsupported Operation Exception param key header name throws Unsupported Operation Exception public Object remove Object key throw new Unsupported Operation Exception  UnsupportedOperationException UnsupportedOperationException UnsupportedOperationException
public String to String return values to String  toString toString
public static Headers parse Manifest Input Stream in throws Bundle Exception try Headers headers new Headers 10 Buffered Reader br try br new Buffered Reader new Input Stream Reader in UTF8 NON NLS 1 catch Unsupported Encoding Exception e br new Buffered Reader new Input Stream Reader in String header null String Buffer value new String Buffer 256 boolean first Line true while true String line br read Line The java util jar classes in JDK 1 3 use the value of the last encountered manifest header So we do the same to emulate this behavior We no longer throw a Bundle Exception for duplicate manifest headers if line null line length 0 EOF or empty line if first Line flush last line headers set header null remove old attribute if present headers set header value to String trim break done processing main attributes if line char At 0 continuation if first Line if no previous line throw new Bundle Exception Msg formatter get String MANIFEST INVALID SPACE line NON NLS 1 value append line substring 1 continue if first Line headers set header null remove old attribute if present headers set header value to String trim value set Length 0 clear String Buffer int colon line index Of if colon 1 no colon throw new Bundle Exception Msg formatter get String MANIFEST INVALID LINE NOCOLON line NON NLS 1 header line substring 0 colon trim value append line substring colon 1 first Line false return headers catch IO Exception e throw new Bundle Exception Msg formatter get String MANIFEST IOEXCEPTION e NON NLS 1 finally try in close catch IO Exception ee  parseManifest InputStream BundleException BufferedReader BufferedReader InputStreamReader UnsupportedEncodingException BufferedReader InputStreamReader StringBuffer StringBuffer firstLine readLine BundleException firstLine toString charAt firstLine BundleException getString MANIFEST_INVALID_SPACE firstLine toString setLength StringBuffer indexOf BundleException getString MANIFEST_INVALID_LINE_NOCOLON firstLine IOException BundleException getString MANIFEST_IOEXCEPTION IOException

else return String Access Controller do Privileged new Privileged Action public Object run return System get Property property  AccessController doPrivileged PrivilegedAction getProperty
public class Secure Action Returns a system property Same as calling System get Property String param property the property key return the value of the property or null if it does not exist public static String get Property final String property if System get Security Manager null return System get Property property else return String Access Controller do Privileged new Privileged Action public Object run return System get Property property  SecureAction getProperty getProperty getSecurityManager getProperty AccessController doPrivileged PrivilegedAction getProperty
else return String Access Controller do Privileged new Privileged Action public Object run return System get Property property def  AccessController doPrivileged PrivilegedAction getProperty
Returns a system property Same as calling System get Property String String param property the property key param def the default value if the property key does not exist return the value of the property or the def value if the property does not exist public static String get Property final String property final String def if System get Security Manager null return System get Property property def else return String Access Controller do Privileged new Privileged Action public Object run return System get Property property def  getProperty getProperty getSecurityManager getProperty AccessController doPrivileged PrivilegedAction getProperty
else return Properties Access Controller do Privileged new Privileged Action public Object run return System get Properties  AccessController doPrivileged PrivilegedAction getProperties
Returns the system properties Same as calling System get Properties return the system properties public static Properties get Properties if System get Security Manager null return System get Properties else return Properties Access Controller do Privileged new Privileged Action public Object run return System get Properties  getProperties getProperties getSecurityManager getProperties AccessController doPrivileged PrivilegedAction getProperties
try return File Input Stream Access Controller do Privileged new Privileged Exception Action public Object run throws File Not Found Exception return new File Input Stream file  FileInputStream AccessController doPrivileged PrivilegedExceptionAction FileNotFoundException FileInputStream
Creates a File Input Stream from a File Same as calling new File Input Stream File param file the File to craete a File Input Stream from return The File Input Stream throws File Not Found Exception if the File does not exist public static File Input Stream get File Input Stream final File file throws File Not Found Exception if System get Security Manager null return new File Input Stream file else try return File Input Stream Access Controller do Privileged new Privileged Exception Action public Object run throws File Not Found Exception return new File Input Stream file catch Privileged Action Exception e throw File Not Found Exception e get Exception  FileInputStream FileInputStream FileInputStream FileInputStream FileNotFoundException FileInputStream getFileInputStream FileNotFoundException getSecurityManager FileInputStream FileInputStream AccessController doPrivileged PrivilegedExceptionAction FileNotFoundException FileInputStream PrivilegedActionException FileNotFoundException getException
try return File Output Stream Access Controller do Privileged new Privileged Exception Action public Object run throws File Not Found Exception return new File Output Stream file get Absolute Path append  FileOutputStream AccessController doPrivileged PrivilegedExceptionAction FileNotFoundException FileOutputStream getAbsolutePath
Creates a File Input Stream from a File Same as calling new File Output Stream File boolean param file the File to create a File Output Stream from param append indicates if the Output Stream should append content return The File Output Stream throws File Not Found Exception if the File does not exist public static File Output Stream get File Output Stream final File file final boolean append throws File Not Found Exception if System get Security Manager null return new File Output Stream file get Absolute Path append else try return File Output Stream Access Controller do Privileged new Privileged Exception Action public Object run throws File Not Found Exception return new File Output Stream file get Absolute Path append catch Privileged Action Exception e throw File Not Found Exception e get Exception  FileInputStream FileOutputStream FileOutputStream OutputStream FileOutputStream FileNotFoundException FileOutputStream getFileOutputStream FileNotFoundException getSecurityManager FileOutputStream getAbsolutePath FileOutputStream AccessController doPrivileged PrivilegedExceptionAction FileNotFoundException FileOutputStream getAbsolutePath PrivilegedActionException FileNotFoundException getException
else return Thread Access Controller do Privileged new Privileged Action public Object run return new Thread target name  AccessController doPrivileged PrivilegedAction
Creates a new Thread from a Runnable Same as calling new Thread target name param target the Runnable to create the Thread from param name The name of the Thread return The new Thread public static Thread create Thread final Runnable target final String name if System get Security Manager null return new Thread target name else return Thread Access Controller do Privileged new Privileged Action public Object run return new Thread target name  createThread getSecurityManager AccessController doPrivileged PrivilegedAction

private static final int LOCATION 3 public Secure Permission Storage Permission Storage storage this storage storage  SecurePermissionStorage PermissionStorage
public Object run throws IO Exception switch action case GET return storage get Permission Data location case SET storage set Permission Data location data return null case LOCATION return storage get Locations throw new Unsupported Operation Exception  IOException getPermissionData setPermissionData getLocations UnsupportedOperationException
public String get Permission Data String location throws IO Exception this location location this action GET try return String Access Controller do Privileged this catch Privileged Action Exception e throw IO Exception e get Exception  getPermissionData IOException AccessController doPrivileged PrivilegedActionException IOException getException
public String get Locations throws IO Exception this action LOCATION try return String Access Controller do Privileged this catch Privileged Action Exception e throw IO Exception e get Exception  getLocations IOException AccessController doPrivileged PrivilegedActionException IOException getException
public void set Permission Data String location String data throws IO Exception this location location this data data this action SET try Access Controller do Privileged this catch Privileged Action Exception e throw IO Exception e get Exception  setPermissionData IOException AccessController doPrivileged PrivilegedActionException IOException getException

public Tokenizer String value this value value to Char Array max this value length cursor 0  toCharArray
private void skip White Space char val value int cur cursor for cur max cur char c val cur if c c t c n c r continue break cursor cur  skipWhiteSpace
public String get Token String terminals skip White Space char val value int cur cursor int begin cur for cur max cur char c val cur if terminals index Of c 1 break cursor cur int count cur begin if count 0 skip White Space while count 0 val begin count 1 val begin count 1 t count return new String val begin count return null  getToken skipWhiteSpace indexOf skipWhiteSpace
public String get String String terminals skip White Space char val value int cur cursor if cur max if val cur if a quoted string cur skip quote char c 0 int begin cur for cur max cur c val cur if c break int count cur begin if c cur cursor cur if count 0 skip White Space return new String val begin count else not a quoted string same as token int begin cur for cur max cur char c val cur if c but there could be a quoted string in the middle of the string cur cur skip Quoted String val cur else if terminals index Of c 1 break cursor cur int count cur begin if count 0 skip White Space while count 0 val begin count 1 val begin count 1 t count return new String val begin count return null  getString skipWhiteSpace skipWhiteSpace skipQuotedString indexOf skipWhiteSpace
private int skip Quoted String char val int cur cur skip quote char c 0 int begin cur for cur max cur c val cur if c break int count cur begin if c cur cursor cur if count 0 skip White Space return count  skipQuotedString skipWhiteSpace
public char get Char int cur cursor if cur max cursor cur 1 return value cur return 0 end of value  getChar
public boolean has More Tokens if cursor max return true return false  hasMoreTokens

private int type public Bundle Delta Impl Bundle Description bundle Description this bundle Description 0  BundleDeltaImpl BundleDescription bundleDescription bundleDescription
public Bundle Delta Impl Bundle Description bundle Description int type this bundle Description bundle Description this type type  BundleDeltaImpl BundleDescription bundleDescription bundleDescription bundleDescription
public Bundle Description get Bundle return bundle Description  BundleDescription getBundle bundleDescription
public int get Type return type  getType
public void set Type int type this type type  setType
public String to String return bundle Description get Symbolic Name   bundle Description get Version to Type String type NON NLS 1 NON NLS 2  toString bundleDescription getSymbolicName _ bundleDescription getVersion toTypeString
private static String to Type String int type String Buffer type Str new String Buffer if type Bundle Delta ADDED 0 type Str append ADDED NON NLS 1 if type Bundle Delta REMOVED 0 type Str append REMOVED NON NLS 1 if type Bundle Delta RESOLVED 0 type Str append RESOLVED NON NLS 1 if type Bundle Delta UNRESOLVED 0 type Str append UNRESOLVED NON NLS 1 if type Bundle Delta LINKAGE CHANGED 0 type Str append LINKAGE CHANGED NON NLS 1 if type Bundle Delta UPDATED 0 type Str append UPDATED NON NLS 1 if type Str length 0 type Str delete Char At type Str length 1 return type Str to String  toTypeString StringBuffer typeStr StringBuffer BundleDelta typeStr BundleDelta typeStr BundleDelta typeStr BundleDelta typeStr BundleDelta LINKAGE_CHANGED typeStr LINKAGE_CHANGED BundleDelta typeStr typeStr typeStr deleteCharAt typeStr typeStr toString

private Object user Object public Bundle Description Impl  userObject BundleDescriptionImpl
public String get Location return location  getLocation
public boolean is Resolved return state Bundle RESOLVED 0  isResolved
public State get Containing State return containing State  getContainingState containingState
public int get State return state  getState
public Version get Version return version  getVersion
public Bundle Description get Fragments if host null return new Bundle Description 0 return State Impl containing State get Fragments this  BundleDescription getFragments BundleDescription StateImpl containingState getFragments
public Host Specification get Host return host  HostSpecification getHost
public void set Containing State State value containing State value  setContainingState containingState
public void set Host Host Specification host this host host if host null Version Constraint Impl host set Bundle this  setHost HostSpecification VersionConstraintImpl setBundle
public void set Location String location this location location  setLocation
public void set Packages Package Specification packages this packages packages if packages null for int i 0 i packages length i Version Constraint Impl packages i set Bundle this  setPackages PackageSpecification VersionConstraintImpl setBundle
public void set Provided Packages String provided Packages this provided Packages provided Packages  setProvidedPackages providedPackages providedPackages providedPackages
public void set Required Bundles Bundle Specification required Bundles this required Bundles required Bundles if required Bundles null for int i 0 i required Bundles length i Version Constraint Impl required Bundles i set Bundle this  setRequiredBundles BundleSpecification requiredBundles requiredBundles requiredBundles requiredBundles requiredBundles VersionConstraintImpl requiredBundles setBundle
public void set State int state this state state  setState
public void set Symbolic Name String value this symbolic Name value  setSymbolicName symbolicName
public void set Version Version value version value  setVersion
public Package Specification get Packages if packages null return new Package Specification 0 return packages  PackageSpecification getPackages PackageSpecification
public String get Provided Packages if provided Packages null return new String 0 return provided Packages  getProvidedPackages providedPackages providedPackages
public Bundle Specification get Required Bundles if required Bundles null return new Bundle Specification 0 return required Bundles  BundleSpecification getRequiredBundles requiredBundles BundleSpecification requiredBundles
public Bundle Specification get Required Bundle String name if required Bundles null return null for int i 0 i required Bundles length i if required Bundles i get Name equals name return required Bundles i return null  BundleSpecification getRequiredBundle requiredBundles requiredBundles requiredBundles getName requiredBundles
TODO remove this method when we remove the deprecated API public String get Unique Id return get Symbolic Name  getUniqueId getSymbolicName
public String get Symbolic Name return symbolic Name  getSymbolicName symbolicName
public Package Specification get Package String name if packages null return null for int i 0 i packages length i if packages i get Name equals name return packages i return null  PackageSpecification getPackage getName
public String to String return get Symbolic Name   get Version NON NLS 1  toString getSymbolicName _ getVersion
public long get Bundle Id return bundle Id  getBundleId bundleId
public void set Bundle Id long bundle Id this bundle Id bundle Id  setBundleId bundleId bundleId bundleId
public Object get Key return new Long bundle Id  getKey bundleId
public boolean compare Keyed Element other if other instanceof Bundle Description Impl return false Bundle Description Impl other Bundle Description Bundle Description Impl other return bundle Id other Bundle Description bundle Id  KeyedElement BundleDescriptionImpl BundleDescriptionImpl otherBundleDescription BundleDescriptionImpl bundleId otherBundleDescription bundleId
public int get Key Hash Code return int bundle Id Integer MAX VALUE  getKeyHashCode bundleId MAX_VALUE
public boolean is Singleton return singleton  isSingleton
public void set Singleton boolean singleton this singleton singleton  setSingleton
public Object get User Object return user Object  getUserObject userObject
public void set User Object Object user Object this user Object user Object  setUserObject userObject userObject userObject
public int hash Code if symbolic Name null return int bundle Id Integer MAX VALUE return int bundle Id symbolic Name hash Code Integer MAX VALUE  hashCode symbolicName bundleId MAX_VALUE bundleId symbolicName hashCode MAX_VALUE
public boolean equals Object object if object instanceof Bundle Description return false Bundle Description other Bundle Description object TODO couldn t this just be location equals other get Location return this bundle Id other get Bundle Id this symbolic Name null other get Symbolic Name null this symbolic Name null this symbolic Name equals other get Symbolic Name  BundleDescription BundleDescription BundleDescription getLocation bundleId getBundleId symbolicName getSymbolicName symbolicName symbolicName getSymbolicName

public interface Bundle Installer public void install Bundle Bundle Description to Install throws Bundle Exception  BundleInstaller installBundle BundleDescription toInstall BundleException
public void install Bundle Bundle Description to Install throws Bundle Exception public void uninstall Bundle Bundle Description to Uninstall throws Bundle Exception  installBundle BundleDescription toInstall BundleException uninstallBundle BundleDescription toUninstall BundleException
public void uninstall Bundle Bundle Description to Uninstall throws Bundle Exception public void update Bundle Bundle Description to Refresh throws Bundle Exception  uninstallBundle BundleDescription toUninstall BundleException updateBundle BundleDescription toRefresh BundleException

private boolean optional public void set Exported boolean exported this exported exported  setExported
public void set Optional boolean optional this optional optional  setOptional
public boolean is Exported return exported  isExported
public boolean is Optional return optional  isOptional

Prevent class from being instantiated private Compute Node Order not allowed  ComputeNodeOrder
Creates a new vertex with the given id param id the vertex id public Vertex Object id this id id 
Creates a new empty directed graph object p After this graph s vertexes and edges are defined with code add Vertex code and code add Edge code call code freeze code to indicate that the graph is all there and then call code ids ByDFS Finish Time code to read off the vertexes ordered by DFS finish time p public Digraph super  addVertex addEdge idsByDFSFinishTime
Freezes this graph No more vertexes or edges can be added to this graph after this method is called Has no effect if the graph is already frozen public void freeze if initialized initialized true only perform depth first search once DFS 
Defines a new vertex with the given id The depth first search is performed in the relative order in which vertexes were added to the graph param id the id of the vertex exception Illegal Argument Exception if the vertex id is already defined or if the graph is frozen public void add Vertex Object id throws Illegal Argument Exception if initialized throw new Illegal Argument Exception Vertex vertex new Vertex id Object existing vertex Map put id vertex nip problems with duplicate vertexes in the bud if existing null throw new Illegal Argument Exception vertex List add vertex  IllegalArgumentException addVertex IllegalArgumentException IllegalArgumentException vertexMap IllegalArgumentException vertexList
Adds a new directed edge between the vertexes with the given ids Vertexes for the given ids must be defined beforehand with code add Vertex code The depth first search is performed in the relative order in which adjacent to vertexes were added to a given from index param from Id the id of the from vertex param to Id the id of the to vertex exception Illegal Argument Exception if either vertex is undefined or if the graph is frozen public void add Edge Object from Id Object to Id throws Illegal Argument Exception if initialized throw new Illegal Argument Exception Vertex from Vertex Vertex vertex Map get from Id Vertex to Vertex Vertex vertex Map get to Id ignore edges when one of the vertices is unknown if from Vertex null to Vertex null return from Vertex adjacent add to Vertex  addVertex fromId toId IllegalArgumentException addEdge fromId toId IllegalArgumentException IllegalArgumentException fromVertex vertexMap fromId toVertex vertexMap toId fromVertex toVertex fromVertex toVertex
Returns the ids of the vertexes in this graph ordered by depth first search finish time The graph must be frozen param increasing code true code if objects are to be arranged into increasing order of depth first search finish time and code false code if objects are to be arranged into decreasing order of depth first search finish time return the list of ids ordered by depth first search finish time element type code Object code exception Illegal Argument Exception if the graph is not frozen public List ids ByDFS Finish Time boolean increasing if initialized throw new Illegal Argument Exception int len vertex List size Object r new Object len for Iterator allV vertex List iterator allV has Next Vertex vertex Vertex allV next int f vertex finish Time note that finish times start at 1 not 0 if increasing r f 1 vertex id else r len f vertex id return Arrays as List r  IllegalArgumentException idsByDFSFinishTime IllegalArgumentException vertexList vertexList hasNext finishTime asList
Returns whether the graph contains cycles The graph must be frozen return code true code if this graph contains at least one cycle and code false code if this graph is cycle free exception Illegal Argument Exception if the graph is not frozen public boolean contains Cycles if initialized throw new Illegal Argument Exception return cycles  IllegalArgumentException containsCycles IllegalArgumentException
Returns the non trivial components of this graph A non trivial component is a set of 2 or more vertexes that were traversed together The graph must be frozen return the possibly empty list of non trivial components where each component is an array of ids element type code Object code exception Illegal Argument Exception if the graph is not frozen public List non Trivial Components if initialized throw new Illegal Argument Exception find the roots of each component Map Vertex List Object components Map components new Hash Map for Iterator it vertex List iterator it has Next Vertex vertex Vertex it next if vertex predecessor null this vertex is the root of a component if component is non trivial we will hit a child else find the root ancestor of this vertex Vertex root vertex while root predecessor null root root predecessor List component List components get root if component null component new Array List 2 component add root id components put root component component add vertex id List result new Array List components size for Iterator it components values iterator it has Next List component List it next if component size 1 result add component to Array return result  IllegalArgumentException nonTrivialComponents IllegalArgumentException HashMap vertexList hasNext ArrayList ArrayList hasNext toArray
Performs a depth first search of this graph and records interesting info with each vertex including DFS finish time Does not employ recursion private void DFS state machine rendition of the standard recursive DFS algorithm int state final int NEXT VERTEX 1 final int START DFS VISIT 2 final int NEXT ADJACENT 3 final int AFTER NEXTED DFS VISIT 4 use precomputed objects to avoid garbage final Integer NEXT VERTEX OBJECT new Integer NEXT VERTEX final Integer AFTER NEXTED DFS VISIT OBJECT new Integer AFTER NEXTED DFS VISIT initialize all vertex color initially Vertex WHITE all vertex predecessor initially null time 0 for a stack append to the end of an array based list List stack new Array List Math max 1 vertex List size Iterator all Adjacent null Vertex vertex null Iterator allV vertex List iterator state NEXT VERTEX next State Loop while true switch state case NEXT VERTEX on entry allV contains vertexes yet to be visited if allV has Next all done break next State Loop Vertex next Vertex Vertex allV next if next Vertex color Vertex WHITE stack add NEXT VERTEX OBJECT vertex next Vertex state START DFS VISIT continue next State Loop else state NEXT VERTEX continue next State Loop case START DFS VISIT on entry vertex contains the vertex to be visited top of stack is return code mark the vertex as discovered vertex color Vertex GREY all Adjacent vertex adjacent iterator state NEXT ADJACENT continue next State Loop case NEXT ADJACENT on entry all Adjacent contains adjacent vertexes to be visited vertex contains vertex being visited if all Adjacent has Next Vertex adj Vertex Vertex all Adjacent next if adj Vertex color Vertex WHITE explore edge from vertex to adj Vertex adj Vertex predecessor vertex stack add all Adjacent stack add vertex stack add AFTER NEXTED DFS VISIT OBJECT vertex adj Vertex state START DFS VISIT continue next State Loop if adj Vertex color Vertex GREY back edge grey means visit in progress cycles true state NEXT ADJACENT continue next State Loop else done exploring vertex vertex color Vertex BLACK time vertex finish Time time state Integer stack remove stack size 1 int Value continue next State Loop case AFTER NEXTED DFS VISIT on entry stack contains vertex and all Ajacent vertex Vertex stack remove stack size 1 all Adjacent Iterator stack remove stack size 1 state NEXT ADJACENT continue next State Loop  NEXT_VERTEX START_DFS_VISIT NEXT_ADJACENT AFTER_NEXTED_DFS_VISIT NEXT_VERTEX_OBJECT NEXT_VERTEX AFTER_NEXTED_DFS_VISIT_OBJECT AFTER_NEXTED_DFS_VISIT ArrayList vertexList allAdjacent vertexList NEXT_VERTEX nextStateLoop NEXT_VERTEX hasNext nextStateLoop nextVertex nextVertex NEXT_VERTEX_OBJECT nextVertex START_DFS_VISIT nextStateLoop NEXT_VERTEX nextStateLoop START_DFS_VISIT allAdjacent NEXT_ADJACENT nextStateLoop NEXT_ADJACENT allAdjacent allAdjacent hasNext adjVertex allAdjacent adjVertex adjVertex adjVertex allAdjacent AFTER_NEXTED_DFS_VISIT_OBJECT adjVertex START_DFS_VISIT nextStateLoop adjVertex NEXT_ADJACENT nextStateLoop finishTime intValue nextStateLoop AFTER_NEXTED_DFS_VISIT allAjacent allAdjacent NEXT_ADJACENT nextStateLoop
Sorts the given list of probject in a manner that honors the given project reference relationships That is if project A references project B then the resulting order will list B before A if possible For graphs that do not contain cycles the result is the same as a conventional topological sort For graphs containing cycles the order is based on ordering the strongly connected components of the graph This has the effect of keeping each knot of projects together without otherwise affecting the order of projects not involved in a cycle For a graph G the algorithm performs in O G space and time p When there is an arbitrary choice vertexes are ordered as supplied Arranged projects in descending alphabetical order generally results in an order that builds A before Z when there are no other constraints p p Ref Cormen Leiserson and Rivest it Introduction to Algorithms it Mc Graw Hill 1990 The strongly connected components algorithm is in section 23 5 p param projects a list of projects element type code I Project code param references a list of project references A B meaning that A references B element type code I Project code return an object describing the resulting project order public static Object compute Node Order Object objects Object references Step 1 Create the graph object final Digraph g1 new Digraph add vertexes for int i 0 i objects length i g1 add Vertex objects i add edges for int i 0 i references length i create an edge from q to p to cause q to come before p in eventual result g1 add Edge references i 1 references i 0 g1 freeze Step 2 Create the transposed graph This time define the vertexes in decreasing order of depth first finish time in g1 interchange to and from to reverse edges from g1 final Digraph g2 new Digraph add vertexes List resorted Vertexes g1 ids ByDFS Finish Time false for Iterator it resorted Vertexes iterator it has Next g2 add Vertex it next add edges for int i 0 i references length i g2 add Edge references i 0 references i 1 g2 freeze Step 3 Return the vertexes in increasing order of depth first finish time in g2 List sorted Project List g2 ids ByDFS Finish Time true Object ordered Nodes new Object sorted Project List size sorted Project List to Array ordered Nodes Object knots boolean has Cycles g2 contains Cycles if has Cycles List knot List g2 non Trivial Components knots Object knot List to Array new Object knot List size else knots new Object 0 for int i 0 i ordered Nodes length i objects i ordered Nodes i return knots  McGraw IProject IProject computeNodeOrder addVertex addEdge resortedVertexes idsByDFSFinishTime resortedVertexes hasNext addVertex addEdge sortedProjectList idsByDFSFinishTime orderedNodes sortedProjectList sortedProjectList toArray orderedNodes hasCycles containsCycles hasCycles knotList nonTrivialComponents knotList toArray knotList orderedNodes orderedNodes

public class Eclipse21 Selection Policy implements I Selection Policy public Set select Multiple Element Set element Set Set selected new Hash Set for Iterator requiring Iter element Set get Requiring iterator requiring Iter has Next Element Set requiring Node Element Set requiring Iter next Collection requiring Node Selected Versions requiring Node get Selected loop through the selected versions one if it is a non library plug in of this requiring plug in for Iterator requiring Versions Iter requiring Node Selected Versions iterator requiring Versions Iter has Next Element requiring Selected Version Element requiring Versions Iter next the selected version may not require this element set but it still can be selected Dependency requiring Selected Version Dependency requiring Selected Version get Dependency element Set get Id if requiring Selected Version Dependency null continue find the best version for this pre requisite Element best Version null for Iterator satisfied Iter element Set get Satisfied iterator satisfied Iter has Next Element satisfied Version Element satisfied Iter next boolean satisfies Dependency requiring Selected Version Dependency get Match Rule is Satisfied requiring Selected Version Dependency get User Object satisfied Version get Version Id if satisfies Dependency boolean better Than Best best Version null element Set get System compare satisfied Version get Version Id best Version get Version Id 0 if better Than Best best Version satisfied Version if best Version null selected add best Version if none of the versions are required or satisfy any selected re requisites pick the highest if selected is Empty Element best Version null for Iterator satisfied Iter element Set get Satisfied iterator satisfied Iter has Next Element satisfied Version Element satisfied Iter next boolean better Than Best best Version null element Set get System compare satisfied Version get Version Id best Version get Version Id 0 if better Than Best best Version satisfied Version selected Collections singleton best Version return selected  Eclipse21SelectionPolicy ISelectionPolicy selectMultiple ElementSet elementSet HashSet requiringIter elementSet getRequiring requiringIter hasNext ElementSet requiringNode ElementSet requiringIter requiringNodeSelectedVersions requiringNode getSelected requiringVersionsIter requiringNodeSelectedVersions requiringVersionsIter hasNext requiringSelectedVersion requiringVersionsIter requiringSelectedVersionDependency requiringSelectedVersion getDependency elementSet getId requiringSelectedVersionDependency bestVersion satisfiedIter elementSet getSatisfied satisfiedIter hasNext satisfiedVersion satisfiedIter satisfiesDependency requiringSelectedVersionDependency getMatchRule isSatisfied requiringSelectedVersionDependency getUserObject satisfiedVersion getVersionId satisfiesDependency betterThanBest bestVersion elementSet getSystem satisfiedVersion getVersionId bestVersion getVersionId betterThanBest bestVersion satisfiedVersion bestVersion bestVersion isEmpty bestVersion satisfiedIter elementSet getSatisfied satisfiedIter hasNext satisfiedVersion satisfiedIter betterThanBest bestVersion elementSet getSystem satisfiedVersion getVersionId bestVersion getVersionId betterThanBest bestVersion satisfiedVersion bestVersion
public Element select Single Element Set element Set none of its versions are required by other element sets so just pick the highest if element Set get Requiring is Empty otherwise pick the highest version Element highest null for Iterator satisfied Iter element Set get Satisfied iterator satisfied Iter has Next Element satisfied Version Element satisfied Iter next if highest null element Set get System compare satisfied Version get Version Id highest get Version Id 0 highest satisfied Version return highest let s pick the highest that satisfies all or the highest required Element highest null int highest Status 0 0 not required 1 satisfy some 2 satisfy all mandatory 3 satisfy all for Iterator satisfied Iter element Set get Satisfied iterator satisfied Iter has Next boolean satisfies All Mandatory true boolean satisfies All true boolean is Required false Element satisfied Version Element satisfied Iter next for Iterator requiring Iter element Set get Requiring iterator requiring Iter has Next Element Set requiring Node Element Set requiring Iter next Collection requiring Node Selected Versions requiring Node get Selected loop through the selected versions one if it is a non library plug in of this requiring plug in for Iterator requiring Versions Iter requiring Node Selected Versions iterator requiring Versions Iter has Next Element requiring Selected Version Element requiring Versions Iter next the selected version may not require this element set but it still can be selected Dependency requiring Selected Version Dep requiring Selected Version get Dependency element Set get Id if requiring Selected Version Dep null boolean satisfies Dependency requiring Selected Version Dep get Match Rule is Satisfied requiring Selected Version Dep get User Object satisfied Version get Version Id is Required satisfies Dependency satisfies All satisfies Dependency satisfies All Mandatory satisfies Dependency requiring Selected Version Dep is Optional int status satisfies All 3 satisfies All Mandatory 2 is Required 1 0 boolean higher Than Highest highest null element Set get System compare satisfied Version get Version Id highest get Version Id 0 if status highest Status status highest Status higher Than Highest highest satisfied Version highest Status status return highest  selectSingle ElementSet elementSet elementSet getRequiring isEmpty satisfiedIter elementSet getSatisfied satisfiedIter hasNext satisfiedVersion satisfiedIter elementSet getSystem satisfiedVersion getVersionId getVersionId satisfiedVersion highestStatus satisfiedIter elementSet getSatisfied satisfiedIter hasNext satisfiesAllMandatory satisfiesAll isRequired satisfiedVersion satisfiedIter requiringIter elementSet getRequiring requiringIter hasNext ElementSet requiringNode ElementSet requiringIter requiringNodeSelectedVersions requiringNode getSelected requiringVersionsIter requiringNodeSelectedVersions requiringVersionsIter hasNext requiringSelectedVersion requiringVersionsIter requiringSelectedVersionDep requiringSelectedVersion getDependency elementSet getId requiringSelectedVersionDep satisfiesDependency requiringSelectedVersionDep getMatchRule isSatisfied requiringSelectedVersionDep getUserObject satisfiedVersion getVersionId isRequired satisfiesDependency satisfiesAll satisfiesDependency satisfiesAllMandatory satisfiesDependency requiringSelectedVersionDep isOptional satisfiesAll satisfiesAllMandatory isRequired higherThanHighest elementSet getSystem satisfiedVersion getVersionId getVersionId highestStatus highestStatus higherThanHighest satisfiedVersion highestStatus

public class Eclipse30 Selection Policy implements I Selection Policy public Set select Multiple Element Set element Set Set selected new Hash Set pre select all elements that were previously resolved and are satisfied Collection previously Resolved Set element Set get Resolved for Iterator iter previously Resolved Set iterator iter has Next Element previously Resolved Element iter next if the previously resolved element is satisfied select it if element Set get Satisfied contains previously Resolved selected add previously Resolved may want to select others for Iterator requiring Iter element Set get Requiring iterator requiring Iter has Next Element Set requiring Node Element Set requiring Iter next Collection requiring Node Selected Versions requiring Node get Selected loop through the selected versions one if it is a non library plug in of this requiring plug in for Iterator requiring Versions Iter requiring Node Selected Versions iterator requiring Versions Iter has Next Element requiring Selected Version Element requiring Versions Iter next the selected version may not require this element set but it still can be selected Dependency requiring Selected Version Dependency requiring Selected Version get Dependency element Set get Id if requiring Selected Version Dependency null continue find the best version for this pre requisite Element best Version null for Iterator satisfied Iter element Set get Satisfied iterator satisfied Iter has Next Element satisfied Version Element satisfied Iter next boolean satisfies Dependency requiring Selected Version Dependency get Match Rule is Satisfied requiring Selected Version Dependency get User Object satisfied Version get Version Id if satisfies Dependency boolean better Than Best best Version null element Set get System compare satisfied Version get Version Id best Version get Version Id 0 if better Than Best best Version satisfied Version if best Version null selected add best Version if none of the versions are required or satisfy any selected re requisites pick the highest if selected is Empty Element best Version null for Iterator satisfied Iter element Set get Satisfied iterator satisfied Iter has Next Element satisfied Version Element satisfied Iter next boolean better Than Best best Version null element Set get System compare satisfied Version get Version Id best Version get Version Id 0 if better Than Best best Version satisfied Version selected Collections singleton best Version return selected  Eclipse30SelectionPolicy ISelectionPolicy selectMultiple ElementSet elementSet HashSet previouslyResolvedSet elementSet getResolved previouslyResolvedSet hasNext previouslyResolved elementSet getSatisfied previouslyResolved previouslyResolved requiringIter elementSet getRequiring requiringIter hasNext ElementSet requiringNode ElementSet requiringIter requiringNodeSelectedVersions requiringNode getSelected requiringVersionsIter requiringNodeSelectedVersions requiringVersionsIter hasNext requiringSelectedVersion requiringVersionsIter requiringSelectedVersionDependency requiringSelectedVersion getDependency elementSet getId requiringSelectedVersionDependency bestVersion satisfiedIter elementSet getSatisfied satisfiedIter hasNext satisfiedVersion satisfiedIter satisfiesDependency requiringSelectedVersionDependency getMatchRule isSatisfied requiringSelectedVersionDependency getUserObject satisfiedVersion getVersionId satisfiesDependency betterThanBest bestVersion elementSet getSystem satisfiedVersion getVersionId bestVersion getVersionId betterThanBest bestVersion satisfiedVersion bestVersion bestVersion isEmpty bestVersion satisfiedIter elementSet getSatisfied satisfiedIter hasNext satisfiedVersion satisfiedIter betterThanBest bestVersion elementSet getSystem satisfiedVersion getVersionId bestVersion getVersionId betterThanBest bestVersion satisfiedVersion bestVersion
public Element select Single Element Set element Set Collection previously Resolved Set element Set get Resolved we already have one element resolved if previously Resolved Set is Empty TODO need a cheaper way to obtain the single element Element previously Resolved Element previously Resolved Set iterator next if it is satisfied just return it if element Set get Satisfied contains previously Resolved return previously Resolved none of its versions are required by other element sets so just pick the highest if element Set get Requiring is Empty otherwise pick the highest version Element highest null for Iterator satisfied Iter element Set get Satisfied iterator satisfied Iter has Next Element satisfied Version Element satisfied Iter next if highest null element Set get System compare satisfied Version get Version Id highest get Version Id 0 highest satisfied Version return highest let s pick the highest that satisfies all or the highest required Element highest null int highest Status 0 0 not required 1 satisfy some 2 satisfy all mandatory 3 satisfy all for Iterator satisfied Iter element Set get Satisfied iterator satisfied Iter has Next boolean satisfies All Mandatory true boolean satisfies All true boolean is Required false Element satisfied Version Element satisfied Iter next for Iterator requiring Iter element Set get Requiring iterator requiring Iter has Next Element Set requiring Node Element Set requiring Iter next Collection requiring Node Selected Versions requiring Node get Selected loop through the selected versions one if it is a non library plug in of this requiring plug in for Iterator requiring Versions Iter requiring Node Selected Versions iterator requiring Versions Iter has Next Element requiring Selected Version Element requiring Versions Iter next the selected version may not require this element set but it still can be selected Dependency requiring Selected Version Dep requiring Selected Version get Dependency element Set get Id if requiring Selected Version Dep null boolean satisfies Dependency requiring Selected Version Dep get Match Rule is Satisfied requiring Selected Version Dep get User Object satisfied Version get Version Id is Required satisfies Dependency satisfies All satisfies Dependency satisfies All Mandatory satisfies Dependency requiring Selected Version Dep is Optional int status satisfies All 3 satisfies All Mandatory 2 is Required 1 0 boolean higher Than Highest highest null element Set get System compare satisfied Version get Version Id highest get Version Id 0 if status highest Status status highest Status higher Than Highest highest satisfied Version highest Status status return highest  selectSingle ElementSet elementSet previouslyResolvedSet elementSet getResolved previouslyResolvedSet isEmpty previouslyResolved previouslyResolvedSet elementSet getSatisfied previouslyResolved previouslyResolved elementSet getRequiring isEmpty satisfiedIter elementSet getSatisfied satisfiedIter hasNext satisfiedVersion satisfiedIter elementSet getSystem satisfiedVersion getVersionId getVersionId satisfiedVersion highestStatus satisfiedIter elementSet getSatisfied satisfiedIter hasNext satisfiesAllMandatory satisfiesAll isRequired satisfiedVersion satisfiedIter requiringIter elementSet getRequiring requiringIter hasNext ElementSet requiringNode ElementSet requiringIter requiringNodeSelectedVersions requiringNode getSelected requiringVersionsIter requiringNodeSelectedVersions requiringVersionsIter hasNext requiringSelectedVersion requiringVersionsIter requiringSelectedVersionDep requiringSelectedVersion getDependency elementSet getId requiringSelectedVersionDep satisfiesDependency requiringSelectedVersionDep getMatchRule isSatisfied requiringSelectedVersionDep getUserObject satisfiedVersion getVersionId isRequired satisfiesDependency satisfiesAll satisfiesDependency satisfiesAllMandatory satisfiesDependency requiringSelectedVersionDep isOptional satisfiesAll satisfiesAllMandatory isRequired higherThanHighest elementSet getSystem satisfiedVersion getVersionId getVersionId highestStatus highestStatus higherThanHighest satisfiedVersion highestStatus

private boolean reload Host public boolean reload Host return reload Host  reloadHost reloadHost reloadHost
public void set Reload Host boolean reload Host this reload Host reload Host  setReloadHost reloadHost reloadHost reloadHost
public boolean is Optional a fragment cannot exist without its master return false  isOptional
public Bundle Description get Suppliers Bundle Description supplier get Supplier return supplier null new Bundle Description 0 new Bundle Description supplier  BundleDescription getSuppliers BundleDescription getSupplier BundleDescription BundleDescription

private boolean export public boolean is Exported return export  isExported
public void set Export boolean export this export export  setExport
public String to String return super to String export exp imp NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4  toString toString

private State target public Read Only State State target this target target  ReadOnlyState
public boolean add Bundle Bundle Description description throw new Unsupported Operation Exception  addBundle BundleDescription UnsupportedOperationException
public void add State Change Listener State Change Listener listener int flags throw new Unsupported Operation Exception  addStateChangeListener StateChangeListener UnsupportedOperationException
public State Delta compare State state throws Bundle Exception return target compare state  StateDelta BundleException
public Bundle Description get Bundle long id return target get Bundle id  BundleDescription getBundle getBundle
public Bundle Description get Bundle String symbolic Name Version version return target get Bundle symbolic Name version  BundleDescription getBundle symbolicName getBundle symbolicName
public Bundle Description get Bundle By Location String location return target get Bundle By Location location  BundleDescription getBundleByLocation getBundleByLocation
public Bundle Description get Bundles return target get Bundles  BundleDescription getBundles getBundles
public Bundle Description get Bundles String symbolic Name return target get Bundles symbolic Name  BundleDescription getBundles symbolicName getBundles symbolicName
public State Delta get Changes return target get Changes  StateDelta getChanges getChanges
public Package Specification get Exported Packages return target get Exported Packages  PackageSpecification getExportedPackages getExportedPackages
public State Object Factory get Factory return target get Factory  StateObjectFactory getFactory getFactory
public Bundle Description get Resolved Bundles return target get Resolved Bundles  BundleDescription getResolvedBundles getResolvedBundles
public Resolver get Resolver return null  getResolver
public long get Time Stamp return target get Time Stamp  getTimeStamp getTimeStamp
public boolean is Empty return target is Empty  isEmpty isEmpty
public boolean is Resolved return target is Resolved  isResolved isResolved
public boolean remove Bundle Bundle Description bundle throw new Unsupported Operation Exception  removeBundle BundleDescription UnsupportedOperationException
public Bundle Description remove Bundle long bundle Id throw new Unsupported Operation Exception  BundleDescription removeBundle bundleId UnsupportedOperationException
public void remove State Change Listener State Change Listener listener throw new Unsupported Operation Exception  removeStateChangeListener StateChangeListener UnsupportedOperationException
public State Delta resolve throw new Unsupported Operation Exception  StateDelta UnsupportedOperationException
public State Delta resolve boolean incremental throw new Unsupported Operation Exception  StateDelta UnsupportedOperationException
public State Delta resolve Bundle Description discard throw new Unsupported Operation Exception  StateDelta BundleDescription UnsupportedOperationException
public void resolve Bundle Bundle Description bundle int status throw new Unsupported Operation Exception  resolveBundle BundleDescription UnsupportedOperationException
public void resolve Constraint Version Constraint constraint Version actual Version Bundle Description supplier throw new Unsupported Operation Exception  resolveConstraint VersionConstraint actualVersion BundleDescription UnsupportedOperationException
public void set Overrides Object value throw new Unsupported Operation Exception  setOverrides UnsupportedOperationException
public void set Resolver Resolver value throw new Unsupported Operation Exception  setResolver UnsupportedOperationException
public boolean update Bundle Bundle Description new Description throw new Unsupported Operation Exception  updateBundle BundleDescription newDescription UnsupportedOperationException

static class Bundle Version Comparator implements Comparator public int compare Object arg0 Object arg1 Version v1 Version arg0 Version v2 Version arg1 return v1 is Greater Than v2 1 v1 equals v2 0 1  BundleVersionComparator isGreaterThan
private final static class General Match Rule implements I Match Rule public boolean is Satisfied Object constraint Object available return Version Constraint constraint is Satisfied By Version available  GeneralMatchRule IMatchRule isSatisfied VersionConstraint isSatisfiedBy
public String to String return general NON NLS 1  toString
public static Element create Element Bundle Description bundle Description Dependency System system String name get Symbolic Name bundle Description Version version get Version bundle Description return system create Element name version create Prerequisites bundle Description system bundle Description is Singleton bundle Description  createElement BundleDescription bundleDescription DependencySystem getSymbolicName bundleDescription getVersion bundleDescription createElement createPrerequisites bundleDescription bundleDescription isSingleton bundleDescription
private static Version get Version Bundle Description bundle Description Version version bundle Description get Version if version null version Version empty Version return version  getVersion BundleDescription bundleDescription bundleDescription getVersion emptyVersion
private static String get Symbolic Name Bundle Description bundle Description String name bundle Description get Symbolic Name TODO do we still need to return the number as the name if there is no name if name null could not be null name Long to String bundle Description get Bundle Id return name  getSymbolicName BundleDescription bundleDescription bundleDescription getSymbolicName toString bundleDescription getBundleId
private static Dependency create Prerequisites Bundle Description bundle Desc Dependency System system Bundle Specification required bundle Desc get Required Bundles Host Specification host bundle Desc get Host int dependency Count required null 0 required length if host null dependency Count if dependency Count 0 return new Dependency 0 List prereqs new Array List dependency Count for int i 0 i required length i ignore if a bundle requires itself bug 48568 comment 2 if required i get Name equals bundle Desc get Symbolic Name prereqs add create Prerequisite system required i if host null prereqs add create Prerequisite system host return Dependency prereqs to Array new Dependency prereqs size  createPrerequisites BundleDescription bundleDesc DependencySystem BundleSpecification bundleDesc getRequiredBundles HostSpecification bundleDesc getHost dependencyCount dependencyCount dependencyCount ArrayList dependencyCount getName bundleDesc getSymbolicName createPrerequisite createPrerequisite toArray
private static Dependency create Prerequisite Dependency System system Version Constraint constraint boolean optional constraint instanceof Bundle Specification Bundle Specification constraint is Optional return system create Dependency constraint get Name GENERAL MATCHRULE optional constraint  createPrerequisite DependencySystem VersionConstraint BundleSpecification BundleSpecification isOptional createDependency getName GENERAL_MATCHRULE
public static Dependency System create Dependency System I Selection Policy policy return new Dependency System new Resolver Helper Bundle Version Comparator policy  DependencySystem createDependencySystem ISelectionPolicy DependencySystem ResolverHelper BundleVersionComparator
public static Dependency System build Dependency System State state I Selection Policy selection Policy Dependency System dependency System create Dependency System selection Policy Bundle Description bundles state get Bundles for int i 0 i bundles length i dependency System add Element Resolver Helper create Element bundles i dependency System return dependency System  DependencySystem buildDependencySystem ISelectionPolicy selectionPolicy DependencySystem dependencySystem createDependencySystem selectionPolicy BundleDescription getBundles dependencySystem addElement ResolverHelper createElement dependencySystem dependencySystem
public static void remove Bundle Description description Dependency System system system remove Element get Symbolic Name description get Version description  BundleDescription DependencySystem removeElement getSymbolicName getVersion
public static void add Bundle Description description Dependency System system system add Element create Element description system  BundleDescription DependencySystem addElement createElement
public static void unresolve Bundle Description bundle Dependency System system Element element system get Element get Symbolic Name bundle get Version bundle if element null system unresolve new Element element  BundleDescription DependencySystem getElement getSymbolicName getVersion
public static void update Bundle Description new Description Bundle Description existing Dependency System system system remove Element get Symbolic Name existing get Version existing system add Element create Element new Description system  BundleDescription newDescription BundleDescription DependencySystem removeElement getSymbolicName getVersion addElement createElement newDescription

public void resolve Bundle Description re Refresh unresolving the given bundles will force them to be re resolved for int i 0 i re Refresh length i unresolve Bundle re Refresh i resolve  BundleDescription reRefresh reRefresh unresolveBundle reRefresh
TODO need to devise a way to report problems a la I Status public synchronized void resolve if state null throw new Illegal State Exception RESOLVER NO STATE NON NLS 1 if dependencies null dependencies Resolver Helper build Dependency System state new Eclipse30 Selection Policy Resolution Delta delta null try resolving as many times as necessary to remove all cycles boolean success do success true try delta dependencies resolve catch Dependency System Cyclic System Exception e success false Object cycles e get Cycles disable all element sets involved in the cycle for int i 0 i cycles length i for int j 0 j cycles i length j Element Set cycles i j remove From Cycle while success process Inner Delta delta resolve Packages  IStatus IllegalStateException RESOLVER_NO_STATE ResolverHelper buildDependencySystem Eclipse30SelectionPolicy ResolutionDelta DependencySystem CyclicSystemException getCycles ElementSet removeFromCycle processInnerDelta resolvePackages
public void set State State new State to avoid infinite mutual recursion if state new State return if it was linked to a previous state unlink first if state null State old State state state null old State set Resolver null state new State if new State null state set Resolver this forget any dependency state created before flush  setState newState newState oldState oldState setResolver newState newState setResolver
private void process Inner Delta Resolution Delta delta now apply changes reported in the inner delta to the state Element Change changes delta get All Changes for int i 0 i changes length i Element element changes i get Element Bundle Description bundle Bundle Description element get User Object int kind changes i get Kind if kind Element Change RESOLVED 0 state resolve Bundle bundle Bundle RESOLVED resolve Constraints element else if kind Element Change UNRESOLVED 0 state resolve Bundle bundle Bundle INSTALLED else if kind Element Change LINKAGE CHANGED resolve Constraints element  processInnerDelta ResolutionDelta ElementChange getAllChanges getElement BundleDescription BundleDescription getUserObject getKind ElementChange resolveBundle resolveConstraints ElementChange resolveBundle ElementChange LINKAGE_CHANGED resolveConstraints
private void resolve Constraints Element element tells the state that some of the constraints have changed Dependency dependencies element get Dependencies for int j 0 j dependencies length j if dependencies j get Resolved Version Id null an optional requisite that was not resolved continue Version Constraint constraint Version Constraint dependencies j get User Object Version actual Version Version dependencies j get Resolved Version Id Bundle Description supplier state get Bundle constraint get Name actual Version state resolve Constraint constraint actual Version supplier  resolveConstraints getDependencies getResolvedVersionId VersionConstraint VersionConstraint getUserObject actualVersion getResolvedVersionId BundleDescription getBundle getName actualVersion resolveConstraint actualVersion
public void bundle Added Bundle Description bundle if dependencies null return Resolver Helper add bundle dependencies  bundleAdded BundleDescription ResolverHelper
public void bundle Removed Bundle Description bundle if dependencies null return Resolver Helper remove bundle dependencies  bundleRemoved BundleDescription ResolverHelper
public void bundle Updated Bundle Description new Description Bundle Description existing Description if dependencies null return Resolver Helper update new Description existing Description dependencies  bundleUpdated BundleDescription newDescription BundleDescription existingDescription ResolverHelper newDescription existingDescription
public State get State return state  getState
public void flush dependencies null 
private boolean resolve Packages attempt to resolve the proposed bundles Map available Packages boolean success int tries 0 do tries success true Bundle Description initial Bundles state get Resolved Bundles available Packages new Hash Map 11 do all exports first for int i 0 i initial Bundles length i Package Specification required initial Bundles i get Packages for int j 0 j required length j override previously exported package if any could preserve instead if required j is Exported Version to Export required j get Version Range get Minimum Package Specification existing Package Specification available Packages get required j get Name Version existing Version existing null null existing get Version Range get Minimum if existing Version null to Export null to Export is Greater Than existing Version available Packages put required j get Name required j now try to resolve imported packages for int i 0 i initial Bundles length i Package Specification required initial Bundles i get Packages for int j 0 j required length j Package Specification exported Package Specification available Packages get required j get Name Version exported Version exported null null exported get Version Range get Minimum if exported null required j is Satisfied By exported Version unresolve Requirement Chain initial Bundles i success false one missing import is enough to discard this bundle break while success now bind the exports imports Bundle Description resolved Bundles state get Resolved Bundles for int i 0 i resolved Bundles length i Package Specification required resolved Bundles i get Packages for int j 0 j required length j Package Specification exported Package Specification available Packages get required j get Name state resolve Constraint required j exported get Version Range get Minimum exported get Bundle return false if a at least one bundle was unresolved during this return tries 1  resolvePackages availablePackages BundleDescription initialBundles getResolvedBundles availablePackages HashMap initialBundles PackageSpecification initialBundles getPackages isExported toExport getVersionRange getMinimum PackageSpecification PackageSpecification availablePackages getName existingVersion getVersionRange getMinimum existingVersion toExport toExport isGreaterThan existingVersion availablePackages getName initialBundles PackageSpecification initialBundles getPackages PackageSpecification PackageSpecification availablePackages getName exportedVersion getVersionRange getMinimum isSatisfiedBy exportedVersion unresolveRequirementChain initialBundles BundleDescription resolvedBundles getResolvedBundles resolvedBundles PackageSpecification resolvedBundles getPackages PackageSpecification PackageSpecification availablePackages getName resolveConstraint getVersionRange getMinimum getBundle
private void unresolve Requirement Chain Bundle Description bundle if bundle is Resolved return state resolve Bundle bundle Bundle INSTALLED if bundle get Symbolic Name null return Element Set bundle Element Set dependencies get Element Set bundle get Symbolic Name Collection requiring bundle Element Set get Requiring Elements bundle get Version for Iterator requiring Iter requiring iterator requiring Iter has Next Element requiring Element Element requiring Iter next Bundle Description requiring Bundle state get Bundle String requiring Element get Id Version requiring Element get Version Id if requiring Bundle null unresolve Requirement Chain requiring Bundle  unresolveRequirementChain BundleDescription isResolved resolveBundle getSymbolicName ElementSet bundleElementSet getElementSet getSymbolicName bundleElementSet getRequiringElements getVersion requiringIter requiringIter hasNext requiringElement requiringIter BundleDescription requiringBundle getBundle requiringElement getId requiringElement getVersionId requiringBundle unresolveRequirementChain requiringBundle
private void unresolve Bundle Bundle Description bundle if bundle is Resolved return if dependencies null Resolver Helper unresolve bundle dependencies  unresolveBundle BundleDescription isResolved ResolverHelper

class State Builder static Bundle Description create Bundle Description Dictionary manifest String location throws Bundle Exception Bundle Description Impl result new Bundle Description Impl retrieve the symbolic name and the singleton status String symbolic Name Header String manifest get Constants BUNDLE SYMBOLICNAME if symbolic Name Header null Manifest Element symbolic Name Elements Manifest Element parse Header Constants BUNDLE SYMBOLICNAME symbolic Name Header if symbolic Name Elements length 0 result set Symbolic Name symbolic Name Elements 0 get Value result set Singleton true equals symbolic Name Elements 0 get Attribute Constants SINGLETON ATTRIBUTE NON NLS 1 retrieve other headers String version String manifest get Constants BUNDLE VERSION result set Version version null new Version version Version empty Version result set Location location Manifest Element host Manifest Element parse Header Constants FRAGMENT HOST String manifest get Constants FRAGMENT HOST if host null result set Host create Host Specification host 0 Manifest Element imports Manifest Element parse Header Constants IMPORT PACKAGE String manifest get Constants IMPORT PACKAGE Manifest Element exports Manifest Element parse Header Constants EXPORT PACKAGE String manifest get Constants EXPORT PACKAGE result set Packages create Packages exports imports Manifest Element provides Manifest Element parse Header Constants PROVIDE PACKAGE String manifest get Constants PROVIDE PACKAGE result set Provided Packages create Provided Packages provides Manifest Element requires Manifest Element parse Header Constants REQUIRE BUNDLE String manifest get Constants REQUIRE BUNDLE result set Required Bundles create Required Bundles requires return result  StateBuilder BundleDescription createBundleDescription BundleException BundleDescriptionImpl BundleDescriptionImpl symbolicNameHeader BUNDLE_SYMBOLICNAME symbolicNameHeader ManifestElement symbolicNameElements ManifestElement parseHeader BUNDLE_SYMBOLICNAME symbolicNameHeader symbolicNameElements setSymbolicName symbolicNameElements getValue setSingleton symbolicNameElements getAttribute SINGLETON_ATTRIBUTE BUNDLE_VERSION setVersion emptyVersion setLocation ManifestElement ManifestElement parseHeader FRAGMENT_HOST FRAGMENT_HOST setHost createHostSpecification ManifestElement ManifestElement parseHeader IMPORT_PACKAGE IMPORT_PACKAGE ManifestElement ManifestElement parseHeader EXPORT_PACKAGE EXPORT_PACKAGE setPackages createPackages ManifestElement ManifestElement parseHeader PROVIDE_PACKAGE PROVIDE_PACKAGE setProvidedPackages createProvidedPackages ManifestElement ManifestElement parseHeader REQUIRE_BUNDLE REQUIRE_BUNDLE setRequiredBundles createRequiredBundles
private static Bundle Specification create Required Bundles Manifest Element specs if specs null return null Bundle Specification result new Bundle Specification specs length for int i 0 i specs length i result i create Required Bundle specs i return result  BundleSpecification createRequiredBundles ManifestElement BundleSpecification BundleSpecification createRequiredBundle
private static Bundle Specification create Required Bundle Manifest Element spec Bundle Specification Impl result new Bundle Specification Impl result set Name spec get Value result set Version Range new Version Range spec get Attribute Constants BUNDLE VERSION ATTRIBUTE result set Exported spec get Attribute Constants REPROVIDE ATTRIBUTE null result set Optional spec get Attribute Constants OPTIONAL ATTRIBUTE null return result  BundleSpecification createRequiredBundle ManifestElement BundleSpecificationImpl BundleSpecificationImpl setName getValue setVersionRange VersionRange getAttribute BUNDLE_VERSION_ATTRIBUTE setExported getAttribute REPROVIDE_ATTRIBUTE setOptional getAttribute OPTIONAL_ATTRIBUTE
private static String create Provided Packages Manifest Element specs if specs null specs length 0 return null String result new String specs length for int i 0 i specs length i result i specs i get Value return result  createProvidedPackages ManifestElement getValue
private static Package Specification create Packages Manifest Element exported Manifest Element imported int capacity exported null 0 exported length imported null 0 imported length if capacity 0 return null Map packages new Hash Map capacity if imported null for int i 0 i imported length i packages put imported i get Value create Package imported i false if exported null for int i 0 i exported length i packages put exported i get Value create Package exported i true return Package Specification packages values to Array new Package Specification packages size  PackageSpecification createPackages ManifestElement ManifestElement HashMap getValue createPackage getValue createPackage PackageSpecification toArray PackageSpecification
private static Package Specification create Package Manifest Element spec boolean export Package Specification Impl result new Package Specification Impl result set Name spec get Value result set Version Range new Version Range spec get Attribute Constants PACKAGE SPECIFICATION VERSION result set Export export return result  PackageSpecification createPackage ManifestElement PackageSpecificationImpl PackageSpecificationImpl setName getValue setVersionRange VersionRange getAttribute PACKAGE_SPECIFICATION_VERSION setExport
private static Host Specification create Host Specification Manifest Element spec if spec null return null Host Specification Impl result new Host Specification Impl result set Name spec get Value result set Version Range new Version Range spec get Attribute Constants BUNDLE VERSION ATTRIBUTE result set Reload Host false NON NLS 1 return result  HostSpecification createHostSpecification ManifestElement HostSpecificationImpl HostSpecificationImpl setName getValue setVersionRange VersionRange getAttribute BUNDLE_VERSION_ATTRIBUTE setReloadHost

private Map changes new Hash Map public State Delta Impl State state this state state  HashMap StateDeltaImpl
public Bundle Delta get Changes return Bundle Delta changes values to Array new Bundle Delta changes size  BundleDelta getChanges BundleDelta toArray BundleDelta
public Bundle Delta get Changes int mask boolean exact List result new Array List for Iterator changes Iter changes values iterator changes Iter has Next Bundle Delta change Bundle Delta changes Iter next if mask change get Type exact change get Type mask mask result add change return Bundle Delta result to Array new Bundle Delta result size  BundleDelta getChanges ArrayList changesIter changesIter hasNext BundleDelta BundleDelta changesIter getType getType BundleDelta toArray BundleDelta
public State get State return state  getState
void record Bundle Added Bundle Description Impl added Object key added get Key Bundle Delta Impl change Bundle Delta Impl changes get key if change null changes put key new Bundle Delta Impl added Bundle Delta ADDED return if change get Type Bundle Delta REMOVED changes remove key return if change get Type Bundle Delta REMOVED 0 change set Type change get Type Bundle Delta REMOVED return change set Type change get Type Bundle Delta ADDED  recordBundleAdded BundleDescriptionImpl getKey BundleDeltaImpl BundleDeltaImpl BundleDeltaImpl BundleDelta getType BundleDelta getType BundleDelta setType getType BundleDelta setType getType BundleDelta
void record Bundle Updated Bundle Description Impl updated Object key updated get Key Bundle Delta Impl change Bundle Delta Impl changes get key if change null changes put key new Bundle Delta Impl updated Bundle Delta UPDATED return if change get Type Bundle Delta ADDED Bundle Delta REMOVED 0 return change set Type change get Type Bundle Delta UPDATED  recordBundleUpdated BundleDescriptionImpl getKey BundleDeltaImpl BundleDeltaImpl BundleDeltaImpl BundleDelta getType BundleDelta BundleDelta setType getType BundleDelta
void record Bundle Removed Bundle Description Impl removed Object key removed get Key Bundle Delta Impl change Bundle Delta Impl changes get key if change null changes put key new Bundle Delta Impl removed Bundle Delta REMOVED return if change get Type Bundle Delta ADDED changes remove key return if change get Type Bundle Delta ADDED 0 change set Type change get Type Bundle Delta ADDED return change set Type change get Type Bundle Delta REMOVED  recordBundleRemoved BundleDescriptionImpl getKey BundleDeltaImpl BundleDeltaImpl BundleDeltaImpl BundleDelta getType BundleDelta getType BundleDelta setType getType BundleDelta setType getType BundleDelta
void record Constraint Resolved Bundle Description Impl changed Linkage boolean optional Object key changed Linkage get Key Bundle Delta Impl change Bundle Delta Impl changes get key int new Type optional Bundle Delta OPTIONAL LINKAGE CHANGED Bundle Delta LINKAGE CHANGED LINKAGE CHANGED overrides OPTIONAL LINKAGE CHANGED but nothing else if change null new Type Bundle Delta LINKAGE CHANGED change get Type Bundle Delta OPTIONAL LINKAGE CHANGED changes put key new Bundle Delta Impl changed Linkage new Type  recordConstraintResolved BundleDescriptionImpl changedLinkage changedLinkage getKey BundleDeltaImpl BundleDeltaImpl newType BundleDelta OPTIONAL_LINKAGE_CHANGED BundleDelta LINKAGE_CHANGED LINKAGE_CHANGED OPTIONAL_LINKAGE_CHANGED newType BundleDelta LINKAGE_CHANGED getType BundleDelta OPTIONAL_LINKAGE_CHANGED BundleDeltaImpl changedLinkage newType
void record Bundle Resolved Bundle Description Impl resolved int status Object key resolved get Key Bundle Delta Impl change Bundle Delta Impl changes get key int new Type status Bundle RESOLVED Bundle Delta RESOLVED Bundle Delta UNRESOLVED if change null change new Bundle Delta Impl resolved new Type changes put key change return int current Type change get Type if new Type Bundle Delta RESOLVED current Type Bundle Delta UNRESOLVED new Type Bundle Delta UNRESOLVED current Type Bundle Delta RESOLVED changes remove key return new type will have only one of RESOLVED UNRESOLVED bits set new Type new Type current Type Bundle Delta RESOLVED Bundle Delta UNRESOLVED change set Type new Type  recordBundleResolved BundleDescriptionImpl getKey BundleDeltaImpl BundleDeltaImpl newType BundleDelta BundleDelta BundleDeltaImpl newType currentType getType newType BundleDelta currentType BundleDelta newType BundleDelta currentType BundleDelta newType newType currentType BundleDelta BundleDelta setType newType

see State Helper public Bundle Description get Dependent Bundles Bundle Description roots if roots null roots length 0 return new Bundle Description 0 Set remaining new Hash Set Arrays as List roots 0 get Containing State get Resolved Bundles Set reachable new Hash Set roots length put the roots in the graph for int i 0 i roots length i if roots i is Resolved reachable add roots i remaining remove roots i boolean changed do changed false start over each iteration for Iterator remaining Iter remaining iterator remaining Iter has Next Bundle Description candidate Bundle Description remaining Iter next if is Dependent candidate reachable reachable add candidate remaining Iter remove changed true while changed return Bundle Description reachable to Array new Bundle Description reachable size  StateHelper BundleDescription getDependentBundles BundleDescription BundleDescription HashSet asList getContainingState getResolvedBundles HashSet isResolved remainingIter remainingIter hasNext BundleDescription BundleDescription remainingIter isDependent remainingIter BundleDescription toArray BundleDescription
private boolean is Dependent Bundle Description candidate Set bundles is a fragment of any of them Host Specification candidate Host candidate get Host if candidate Host null candidate Host is Resolved bundles contains candidate Host get Supplier return true does require any of them Bundle Specification candidate Required candidate get Required Bundles for int i 0 i candidate Required length i if candidate Required i is Resolved bundles contains candidate Required i get Supplier return true does import any of their packages Package Specification candidate Packages candidate get Packages for int i 0 i candidate Packages length i if candidate Packages i is Resolved candidate Packages i get Supplier candidate bundles contains candidate Packages i get Supplier return true return false  isDependent BundleDescription HostSpecification candidateHost getHost candidateHost candidateHost isResolved candidateHost getSupplier BundleSpecification candidateRequired getRequiredBundles candidateRequired candidateRequired isResolved candidateRequired getSupplier PackageSpecification candidatePackages getPackages candidatePackages candidatePackages isResolved candidatePackages getSupplier candidatePackages getSupplier
see State Helper public Version Constraint get Unsatisfied Constraints Bundle Description bundle State containing State bundle get Containing State if containing State null it is a bug in the client to call this method when not attached to a state throw new Illegal State Exception Does not belong to a state NON NLS 1 List unsatisfied new Array List Host Specification host bundle get Host if host null if host is Resolved is Resolvable host unsatisfied add host Bundle Specification required Bundles bundle get Required Bundles for int i 0 i required Bundles length i if required Bundles i is Resolved is Resolvable required Bundles i unsatisfied add required Bundles i Package Specification packages bundle get Packages for int i 0 i packages length i if packages i is Resolved is Resolvable packages i unsatisfied add packages i return Version Constraint unsatisfied to Array new Version Constraint unsatisfied size  StateHelper VersionConstraint getUnsatisfiedConstraints BundleDescription containingState getContainingState containingState IllegalStateException ArrayList HostSpecification getHost isResolved isResolvable BundleSpecification requiredBundles getRequiredBundles requiredBundles requiredBundles isResolved isResolvable requiredBundles requiredBundles PackageSpecification getPackages isResolved isResolvable VersionConstraint toArray VersionConstraint
see State Helper public boolean is Resolvable Package Specification specification if specification is Exported return true Package Specification exported get Exported Package specification get Bundle get Containing State specification get Name null if exported null return false return specification is Satisfied By exported get Version Range get Minimum  StateHelper isResolvable PackageSpecification isExported PackageSpecification getExportedPackage getBundle getContainingState getName isSatisfiedBy getVersionRange getMinimum
see State Helper public boolean is Resolvable Bundle Specification specification return is Bundle Constraint Resolvable specification  StateHelper isResolvable BundleSpecification isBundleConstraintResolvable
see State Helper public boolean is Resolvable Host Specification specification return is Bundle Constraint Resolvable specification  StateHelper isResolvable HostSpecification isBundleConstraintResolvable
private boolean is Bundle Constraint Resolvable Version Constraint constraint Bundle Description available Bundles constraint get Bundle get Containing State get Bundles constraint get Name for int i 0 i available Bundles length i if available Bundles i is Resolved constraint is Satisfied By available Bundles i get Version return true return false  isBundleConstraintResolvable VersionConstraint BundleDescription availableBundles getBundle getContainingState getBundles getName availableBundles availableBundles isResolved isSatisfiedBy availableBundles getVersion
see State Helper public Package Specification get Exported Packages Bundle Description bundle if bundle is Resolved return new Package Specification 0 Package Specification all Packages bundle get Packages Package Specification exported new Package Specification all Packages length int exported Count 0 for int i 0 i all Packages length i if all Packages i is Exported all Packages i get Supplier bundle exported exported Count all Packages i if exported Count exported length Package Specification tmp Exported new Package Specification exported Count System arraycopy exported 0 tmp Exported 0 exported Count exported tmp Exported return exported  StateHelper PackageSpecification getExportedPackages BundleDescription isResolved PackageSpecification PackageSpecification allPackages getPackages PackageSpecification PackageSpecification allPackages exportedCount allPackages allPackages isExported allPackages getSupplier exportedCount allPackages exportedCount PackageSpecification tmpExported PackageSpecification exportedCount tmpExported exportedCount tmpExported
see State Helper public Package Specification get Exported Package State state String package Name Version version TODO why not use State get Exported Packages here Bundle Description resolved Bundles state get Resolved Bundles boolean ignore Version version null for int i 0 i resolved Bundles length i Package Specification packages resolved Bundles i get Packages for int j 0 j packages length j if packages j get Name equals package Name ignore Version packages j get Version Range get Minimum equals version packages j get Supplier null return packages j get Supplier get Package package Name return null  StateHelper PackageSpecification getExportedPackage packageName getExportedPackages BundleDescription resolvedBundles getResolvedBundles ignoreVersion resolvedBundles PackageSpecification resolvedBundles getPackages getName packageName ignoreVersion getVersionRange getMinimum getSupplier getSupplier getPackage packageName
public Object sort Bundles Bundle Description to Sort List references new Array List to Sort length for int i 0 i to Sort length i if to Sort i is Resolved build References to Sort i references return Compute Node Order compute Node Order to Sort Object references to Array new Object references size  sortBundles BundleDescription toSort ArrayList toSort toSort toSort isResolved buildReferences toSort ComputeNodeOrder computeNodeOrder toSort toArray
private void build References Bundle Description description List references Host Specification host description get Host it is a fragment if host null just create a dependency between fragment and host if host get Supplier null host get Supplier description references add new Object description host get Supplier else it is a host build References description description get Required Bundles references build References description description get Packages references Bundle Description fragments description get Fragments handles constraints contributed by fragments for int i 0 i fragments length i handles fragment s constraints as if they belonged to the host instead build References description fragments i get Required Bundles references build References description fragments i get Packages references  buildReferences BundleDescription HostSpecification getHost getSupplier getSupplier getSupplier buildReferences getRequiredBundles buildReferences getPackages BundleDescription getFragments buildReferences getRequiredBundles buildReferences getPackages
private void build References Bundle Description actual Version Constraint constraints List references for int i 0 i constraints length i Version Constraint constraint constraints i if constraint get Supplier null constraint get Supplier actual references add new Object actual constraint get Supplier  buildReferences BundleDescription VersionConstraint VersionConstraint getSupplier getSupplier getSupplier
public static State Helper get Instance return instance  StateHelper getInstance

private static long cumulative Time protected State Impl to prevent extra package instantiation  cumulativeTime StateImpl
public boolean add Bundle Bundle Description description if description get Location null throw new Illegal Argument Exception no location set NON NLS 1 if basic Add Bundle description return false resolved false get Delta record Bundle Added Bundle Description Impl description if resolver null resolver bundle Added description return true  addBundle BundleDescription getLocation IllegalArgumentException basicAddBundle getDelta recordBundleAdded BundleDescriptionImpl bundleAdded
public boolean update Bundle Bundle Description new Description Bundle Description Impl existing Bundle Description Impl bundle Descriptions get Bundle Description Impl new Description if existing null return false if bundle Descriptions remove existing return false resolved Bundles remove existing if basic Add Bundle new Description return false resolved false get Delta record Bundle Updated Bundle Description Impl new Description if resolver null resolver bundle Updated new Description existing return true  updateBundle BundleDescription newDescription BundleDescriptionImpl BundleDescriptionImpl bundleDescriptions BundleDescriptionImpl newDescription bundleDescriptions resolvedBundles basicAddBundle newDescription getDelta recordBundleUpdated BundleDescriptionImpl newDescription bundleUpdated newDescription
public Bundle Description remove Bundle String location Bundle Description to Remove get Bundle By Location location if to Remove null remove Bundle to Remove return null return to Remove  BundleDescription removeBundle BundleDescription toRemove getBundleByLocation toRemove removeBundle toRemove toRemove
public Bundle Description remove Bundle long bundle Id Bundle Description to Remove get Bundle bundle Id if to Remove null remove Bundle to Remove return null return to Remove  BundleDescription removeBundle bundleId BundleDescription toRemove getBundle bundleId toRemove removeBundle toRemove toRemove
public boolean remove Bundle Bundle Description to Remove if bundle Descriptions remove Keyed Element to Remove return false resolved Bundles remove Keyed Element to Remove resolved false get Delta record Bundle Removed Bundle Description Impl to Remove if resolver null resolver bundle Removed to Remove return true  removeBundle BundleDescription toRemove bundleDescriptions KeyedElement toRemove resolvedBundles KeyedElement toRemove getDelta recordBundleRemoved BundleDescriptionImpl toRemove bundleRemoved toRemove
public State Delta get Changes return get Delta  StateDelta getChanges getDelta
private State Delta Impl get Delta if changes null changes get New Delta return changes  StateDeltaImpl getDelta getNewDelta
private State Delta Impl get New Delta return new State Delta Impl this  StateDeltaImpl getNewDelta StateDeltaImpl
public Bundle Description get Bundles final String symbolic Name final List bundles new Array List for Iterator iter bundle Descriptions iterator iter has Next Bundle Description bundle Bundle Description iter next if symbolic Name equals bundle get Symbolic Name bundles add bundle return Bundle Description bundles to Array new Bundle Description bundles size  BundleDescription getBundles symbolicName ArrayList bundleDescriptions hasNext BundleDescription BundleDescription symbolicName getSymbolicName BundleDescription toArray BundleDescription
public Bundle Description get Bundles return Bundle Description bundle Descriptions elements new Bundle Description bundle Descriptions size  BundleDescription getBundles BundleDescription bundleDescriptions BundleDescription bundleDescriptions
public Bundle Description get Bundle long id return Bundle Description bundle Descriptions get By Key new Long id  BundleDescription getBundle BundleDescription bundleDescriptions getByKey
TODO this does not comply with the spec public Bundle Description get Bundle String name Version version Bundle Description bundles get Bundles for int i 0 i bundles length i if name equals bundles i get Symbolic Name bundles i get Version equals version return bundles i return null  BundleDescription getBundle BundleDescription getBundles getSymbolicName getVersion
public long get Time Stamp return time Stamp  getTimeStamp timeStamp
public boolean is Resolved return resolved is Empty  isResolved isEmpty
public void resolve Constraint Version Constraint constraint Version actual Version Bundle Description supplier Version Constraint Impl modifiable Version Constraint Impl constraint if modifiable get Actual Version actual Version modifiable get Supplier supplier modifiable set Actual Version actual Version modifiable set Supplier supplier if constraint instanceof Bundle Specification constraint instanceof Host Specification boolean optional constraint instanceof Bundle Specification Bundle Specification constraint is Optional get Delta record Constraint Resolved Bundle Description Impl constraint get Bundle optional  resolveConstraint VersionConstraint actualVersion BundleDescription VersionConstraintImpl VersionConstraintImpl getActualVersion actualVersion getSupplier setActualVersion actualVersion setSupplier BundleSpecification HostSpecification BundleSpecification BundleSpecification isOptional getDelta recordConstraintResolved BundleDescriptionImpl getBundle
public void resolve Bundle Bundle Description bundle int status Bundle Description Impl bundle set State status get Delta record Bundle Resolved Bundle Description Impl bundle status if status Bundle RESOLVED resolved Bundles add Keyed Element bundle else ensures no links are left unresolve Constraints bundle remove the bundle from the resolved pool resolved Bundles remove Keyed Element bundle  resolveBundle BundleDescription BundleDescriptionImpl setState getDelta recordBundleResolved BundleDescriptionImpl resolvedBundles KeyedElement unresolveConstraints resolvedBundles KeyedElement
private void unresolve Constraints Bundle Description bundle Host Specification host bundle get Host if host null Version Constraint Impl host unresolve Package Specification packages bundle get Packages for int i 0 i packages length i Version Constraint Impl packages i unresolve Bundle Specification required Bundles bundle get Required Bundles for int i 0 i required Bundles length i Version Constraint Impl required Bundles i unresolve  unresolveConstraints BundleDescription HostSpecification getHost VersionConstraintImpl PackageSpecification getPackages VersionConstraintImpl BundleSpecification requiredBundles getRequiredBundles requiredBundles VersionConstraintImpl requiredBundles
public Resolver get Resolver return resolver  getResolver
public void set Resolver Resolver new Resolver if resolver new Resolver return if resolver null Resolver old Resolver resolver resolver null old Resolver set State null resolver new Resolver if resolver null return resolver set State this  setResolver newResolver newResolver oldResolver oldResolver setState newResolver setState
private State Delta resolve boolean incremental Bundle Description re Resolve if resolver null throw new Illegal State Exception no resolver set NON NLS 1 long start 0 if State Manager DEBUG PLATFORM ADMIN RESOLVER start System current Time Millis if incremental flush if resolved re Resolve null return new State Delta Impl this if re Resolve null resolver resolve re Resolve else resolver resolve resolved true TODO need to fire events for listeners State Delta saved Changes changes null new State Delta Impl this changes changes new State Delta Impl this if State Manager DEBUG PLATFORM ADMIN RESOLVER cumulative Time cumulative Time System current Time Millis start Debug Options get Default set Option org eclipse core runtime adaptor resolver timing value Long to String cumulative Time NON NLS 1 return saved Changes  StateDelta BundleDescription reResolve IllegalStateException StateManager DEBUG_PLATFORM_ADMIN_RESOLVER currentTimeMillis reResolve StateDeltaImpl reResolve reResolve StateDelta savedChanges StateDeltaImpl StateDeltaImpl StateManager DEBUG_PLATFORM_ADMIN_RESOLVER cumulativeTime cumulativeTime currentTimeMillis DebugOptions getDefault setOption toString cumulativeTime savedChanges
private void flush resolver flush resolved false if resolved Bundles is Empty return for Iterator iter resolved Bundles iterator iter has Next Bundle Description Impl resolved Bundle Bundle Description Impl iter next resolved Bundle set State 0 resolved Bundles clear  resolvedBundles isEmpty resolvedBundles hasNext BundleDescriptionImpl resolvedBundle BundleDescriptionImpl resolvedBundle setState resolvedBundles
public State Delta resolve return resolve true null  StateDelta
public State Delta resolve boolean incremental return resolve incremental null  StateDelta
public State Delta resolve Bundle Description re Resolve return resolve true re Resolve  StateDelta BundleDescription reResolve reResolve
public void set Overrides Object value throw new Unsupported Operation Exception  setOverrides UnsupportedOperationException
public Bundle Description get Resolved Bundles return Bundle Description resolved Bundles elements new Bundle Description resolved Bundles size  BundleDescription getResolvedBundles BundleDescription resolvedBundles BundleDescription resolvedBundles
public void add State Change Listener State Change Listener listener int flags if listeners contains Key listener return listeners put listener new Integer flags  addStateChangeListener StateChangeListener containsKey
public void remove State Change Listener State Change Listener listener listeners remove listener  removeStateChangeListener StateChangeListener
public boolean is Empty return bundle Descriptions is Empty  isEmpty bundleDescriptions isEmpty
public void set Resolved boolean resolved this resolved resolved  setResolved
public boolean basic Add Bundle Bundle Description description Bundle Description Impl description set Containing State this return bundle Descriptions add Bundle Description Impl description  basicAddBundle BundleDescription BundleDescriptionImpl setContainingState bundleDescriptions BundleDescriptionImpl
void add Resolved Bundle Bundle Description Impl resolved resolved Bundles add resolved  addResolvedBundle BundleDescriptionImpl resolvedBundles
public Package Specification get Exported Packages final List all Exported Packages new Array List for Iterator iter resolved Bundles iterator iter has Next Bundle Description bundle Bundle Description iter next Package Specification bundle Packages bundle get Packages for int i 0 i bundle Packages length i if bundle Packages i is Exported bundle Packages i get Supplier bundle all Exported Packages add bundle Packages i return Package Specification all Exported Packages to Array new Package Specification all Exported Packages size  PackageSpecification getExportedPackages allExportedPackages ArrayList resolvedBundles hasNext BundleDescription BundleDescription PackageSpecification bundlePackages getPackages bundlePackages bundlePackages isExported bundlePackages getSupplier allExportedPackages bundlePackages PackageSpecification allExportedPackages toArray PackageSpecification allExportedPackages
public Bundle Description get Importing Bundles final Package Specification exported Package if exported Package is Resolved return null final List all Importing Bundles new Array List for Iterator iter resolved Bundles iterator iter has Next Bundle Description bundle Bundle Description iter next Package Specification bundle Packages bundle get Packages for int i 0 i bundle Packages length i if bundle Packages i get Name equals exported Package get Name bundle Packages i get Supplier exported Package get Bundle all Importing Bundles add bundle break return Bundle Description all Importing Bundles to Array new Bundle Description all Importing Bundles size  BundleDescription getImportingBundles PackageSpecification exportedPackage exportedPackage isResolved allImportingBundles ArrayList resolvedBundles hasNext BundleDescription BundleDescription PackageSpecification bundlePackages getPackages bundlePackages bundlePackages getName exportedPackage getName bundlePackages getSupplier exportedPackage getBundle allImportingBundles BundleDescription allImportingBundles toArray BundleDescription allImportingBundles
public Bundle Description get Fragments final Bundle Description host final List fragments new Array List for Iterator iter bundle Descriptions iterator iter has Next Bundle Description bundle Bundle Description iter next Host Specification host Spec bundle get Host if host Spec null host Spec get Supplier host fragments add bundle return Bundle Description fragments to Array new Bundle Description fragments size  BundleDescription getFragments BundleDescription ArrayList bundleDescriptions hasNext BundleDescription BundleDescription HostSpecification hostSpec getHost hostSpec hostSpec getSupplier BundleDescription toArray BundleDescription
public void set Time Stamp long new Time Stamp time Stamp new Time Stamp  setTimeStamp newTimeStamp timeStamp newTimeStamp
public State Object Factory get Factory return factory  StateObjectFactory getFactory
void set Factory State Object Factory factory this factory factory  setFactory StateObjectFactory
public Bundle Description get Bundle By Location String location for Iterator i bundle Descriptions iterator i has Next Bundle Description current Bundle Description i next if location equals current get Location return current return null  BundleDescription getBundleByLocation bundleDescriptions hasNext BundleDescription BundleDescription getLocation

private boolean cached State false public State Manager File state Location a negative timestamp means no timestamp checking this state Location 1  cachedState StateManager stateLocation stateLocation
public State Manager File state Location long expected Time Stamp factory new State Object Factory Impl read State state Location expected Time Stamp  StateManager stateLocation expectedTimeStamp StateObjectFactoryImpl readState stateLocation expectedTimeStamp
public void shutdown File state Location throws IO Exception write State state Location system State should not be set to null as when the framework is restarted from a shutdown state the system State variable will not be reset resulting in a null pointer exception system State null  stateLocation IOException writeState stateLocation systemState systemState systemState
private void read State File state Location long expected Time Stamp if state Location is File return if DEBUG READER read Startup Time System current Time Millis File Input Stream file Input try file Input new File Input Stream state Location catch File Not Found Exception e TODO log before bailing e print Stack Trace return Data Input Stream input null try input new Data Input Stream new Buffered Input Stream file Input 65536 system State factory read System State input expected Time Stamp problems in the cache corrupted stale don t create a state object if system State null return initialize System State cached State true catch IO Exception ioe TODO how do we log this ioe print Stack Trace finally if DEBUG READER System out println Time to read state System current Time Millis read Startup Time NON NLS 1  readState stateLocation expectedTimeStamp stateLocation isFile DEBUG_READER readStartupTime currentTimeMillis FileInputStream fileInput fileInput FileInputStream stateLocation FileNotFoundException printStackTrace DataInputStream DataInputStream BufferedInputStream fileInput systemState readSystemState expectedTimeStamp systemState initializeSystemState cachedState IOException printStackTrace DEBUG_READER currentTimeMillis readStartupTime
private void write State File state Location throws IO Exception if system State null return if cached State last Time Stamp system State get Time Stamp return Data Output Stream output new Data Output Stream new Buffered Output Stream new File Output Stream state Location factory write State system State output  writeState stateLocation IOException systemState cachedState lastTimeStamp systemState getTimeStamp DataOutputStream DataOutputStream BufferedOutputStream FileOutputStream stateLocation writeState systemState
public State Impl create System State system State factory create System State initialize System State return system State  StateImpl createSystemState systemState createSystemState initializeSystemState systemState
private void initialize System State system State set Resolver new Resolver Impl last Time Stamp system State get Time Stamp  initializeSystemState systemState setResolver ResolverImpl lastTimeStamp systemState getTimeStamp
public State Impl get System State return system State  StateImpl getSystemState systemState
public State get State boolean mutable return mutable factory create State system State new Read Only State system State  getState createState systemState ReadOnlyState systemState
public State get State return get State true  getState getState
public State Object Factory get Factory return factory  StateObjectFactory getFactory
public synchronized void commit State state throws Bundle Exception no installer have been provided commit not supported if installer null throw new Illegal Argument Exception Platform Admin commit not supported NON NLS 1 if state instanceof User State throw new Illegal Argument Exception Wrong state implementation NON NLS 1 if state get Time Stamp system State get Time Stamp throw new Bundle Exception State Msg formatter get String COMMIT INVALID TIMESTAMP NON NLS 1 State Delta delta state compare system State Bundle Delta changes delta get Changes for int i 0 i changes length i if changes i get Type Bundle Delta ADDED 0 installer install Bundle changes i get Bundle else if changes i get Type Bundle Delta REMOVED 0 installer uninstall Bundle changes i get Bundle else if changes i get Type Bundle Delta UPDATED 0 installer update Bundle changes i get Bundle else bug in State Delta get Changes  BundleException IllegalArgumentException PlatformAdmin UserState IllegalArgumentException getTimeStamp systemState getTimeStamp BundleException StateMsg getString COMMIT_INVALID_TIMESTAMP StateDelta systemState BundleDelta getChanges getType BundleDelta installBundle getBundle getType BundleDelta uninstallBundle getBundle getType BundleDelta updateBundle getBundle StateDelta getChanges
public Resolver get Resolver return new Resolver Impl  getResolver ResolverImpl
public State Helper get State Helper return State Helper Impl get Instance  StateHelper getStateHelper StateHelperImpl getInstance
public Bundle Installer get Installer return installer  BundleInstaller getInstaller
public void set Installer Bundle Installer installer this installer installer  setInstaller BundleInstaller

public Bundle Description create Bundle Description Dictionary manifest String location long id throws Bundle Exception Bundle Description Impl result result Bundle Description Impl State Builder create Bundle Description manifest location result set Bundle Id id return result  BundleDescription createBundleDescription BundleException BundleDescriptionImpl BundleDescriptionImpl StateBuilder createBundleDescription setBundleId
public Bundle Description create Bundle Description long id String symbolic Name Version version String location Bundle Specification required Host Specification host Package Specification packages String provided Packages boolean singleton Bundle Description Impl bundle new Bundle Description Impl bundle set Bundle Id id bundle set Symbolic Name symbolic Name bundle set Version version bundle set Location location bundle set Required Bundles required bundle set Packages packages bundle set Host host bundle set Provided Packages provided Packages bundle set Singleton singleton return bundle  BundleDescription createBundleDescription symbolicName BundleSpecification HostSpecification PackageSpecification providedPackages BundleDescriptionImpl BundleDescriptionImpl setBundleId setSymbolicName symbolicName setVersion setLocation setRequiredBundles setPackages setHost setProvidedPackages providedPackages setSingleton
public Bundle Description create Bundle Description long id String symbolic Name Version version String location Bundle Specification required Host Specification hosts Package Specification packages String provided Packages boolean singleton Host Specification host hosts null hosts length 0 null hosts 1 return create Bundle Description id symbolic Name version location required host packages provided Packages singleton  BundleDescription createBundleDescription symbolicName BundleSpecification HostSpecification PackageSpecification providedPackages HostSpecification createBundleDescription symbolicName providedPackages
public Bundle Description create Bundle Description Bundle Description original Bundle Description Impl bundle new Bundle Description Impl bundle set Bundle Id original get Bundle Id bundle set Symbolic Name original get Symbolic Name bundle set Version original get Version bundle set Location original get Location Bundle Specification original Required original get Required Bundles Bundle Specification new Required new Bundle Specification original Required length for int i 0 i new Required length i new Required i create Bundle Specification original Required i bundle set Required Bundles new Required Package Specification original Packages original get Packages Package Specification new Packages new Package Specification original Packages length for int i 0 i new Packages length i new Packages i create Package Specification original Packages i bundle set Packages new Packages if original get Host null bundle set Host create Host Specification original get Host String original Provided Packages original get Provided Packages String new Provided Packages new String original Provided Packages length System arraycopy original Provided Packages 0 new Provided Packages 0 original Provided Packages length bundle set Provided Packages new Provided Packages bundle set Singleton original is Singleton return bundle  BundleDescription createBundleDescription BundleDescription BundleDescriptionImpl BundleDescriptionImpl setBundleId getBundleId setSymbolicName getSymbolicName setVersion getVersion setLocation getLocation BundleSpecification originalRequired getRequiredBundles BundleSpecification newRequired BundleSpecification originalRequired newRequired newRequired createBundleSpecification originalRequired setRequiredBundles newRequired PackageSpecification originalPackages getPackages PackageSpecification newPackages PackageSpecification originalPackages newPackages newPackages createPackageSpecification originalPackages setPackages newPackages getHost setHost createHostSpecification getHost originalProvidedPackages getProvidedPackages newProvidedPackages originalProvidedPackages originalProvidedPackages newProvidedPackages originalProvidedPackages setProvidedPackages newProvidedPackages setSingleton isSingleton
public Bundle Specification create Bundle Specification String required Symbolic Name Version required Version byte matching Rule boolean export boolean optional Bundle Specification Impl bundle Spec new Bundle Specification Impl bundle Spec set Name required Symbolic Name set Version Range bundle Spec matching Rule required Version bundle Spec set Exported export bundle Spec set Optional optional return bundle Spec  BundleSpecification createBundleSpecification requiredSymbolicName requiredVersion matchingRule BundleSpecificationImpl bundleSpec BundleSpecificationImpl bundleSpec setName requiredSymbolicName setVersionRange bundleSpec matchingRule requiredVersion bundleSpec setExported bundleSpec setOptional bundleSpec
public Bundle Specification create Bundle Specification Bundle Specification original Bundle Specification Impl bundle Spec new Bundle Specification Impl bundle Spec set Name original get Name bundle Spec set Version Range original get Version Range bundle Spec set Exported original is Exported bundle Spec set Optional original is Optional return bundle Spec  BundleSpecification createBundleSpecification BundleSpecification BundleSpecificationImpl bundleSpec BundleSpecificationImpl bundleSpec setName getName bundleSpec setVersionRange getVersionRange bundleSpec setExported isExported bundleSpec setOptional isOptional bundleSpec
public Host Specification create Host Specification String host Symbolic Name Version host Version byte matching Rule boolean reload Host Host Specification Impl host Spec new Host Specification Impl host Spec set Name host Symbolic Name set Version Range host Spec matching Rule host Version host Spec set Reload Host reload Host return host Spec  HostSpecification createHostSpecification hostSymbolicName hostVersion matchingRule reloadHost HostSpecificationImpl hostSpec HostSpecificationImpl hostSpec setName hostSymbolicName setVersionRange hostSpec matchingRule hostVersion hostSpec setReloadHost reloadHost hostSpec
public Host Specification create Host Specification Host Specification original Host Specification Impl host Spec new Host Specification Impl host Spec set Name original get Name host Spec set Version Range original get Version Range host Spec set Reload Host original reload Host return host Spec  HostSpecification createHostSpecification HostSpecification HostSpecificationImpl hostSpec HostSpecificationImpl hostSpec setName getName hostSpec setVersionRange getVersionRange hostSpec setReloadHost reloadHost hostSpec
public Package Specification create Package Specification String package Name Version package Version boolean exported Package Specification Impl package Spec new Package Specification Impl package Spec set Name package Name package Spec set Version Range new Version Range package Version Version max Version package Spec set Export exported return package Spec  PackageSpecification createPackageSpecification packageName packageVersion PackageSpecificationImpl packageSpec PackageSpecificationImpl packageSpec setName packageName packageSpec setVersionRange VersionRange packageVersion maxVersion packageSpec setExport packageSpec
public Package Specification create Package Specification Package Specification original Package Specification Impl package Spec new Package Specification Impl package Spec set Name original get Name package Spec set Version Range original get Version Range package Spec set Export original is Exported return package Spec  PackageSpecification createPackageSpecification PackageSpecification PackageSpecificationImpl packageSpec PackageSpecificationImpl packageSpec setName getName packageSpec setVersionRange getVersionRange packageSpec setExport isExported packageSpec
public System State create System State System State state new System State state set Factory this return state  SystemState createSystemState SystemState SystemState setFactory
public State create State State Impl state new User State state set Factory this return state  createState StateImpl UserState setFactory
public State create State State original State Impl new State new User State new State set Factory this new State set Time Stamp original get Time Stamp Bundle Description bundles original get Bundles for int i 0 i bundles length i new State basic Add Bundle create Bundle Description bundles i new State set Resolved false return new State  createState StateImpl newState UserState newState setFactory newState setTimeStamp getTimeStamp BundleDescription getBundles newState basicAddBundle createBundleDescription newState setResolved newState
public System State read System State Data Input Stream stream long expected Time Stamp throws IO Exception State Reader reader new State Reader System State restored State new System State if reader load State restored State stream expected Time Stamp return null restored State set Factory this return restored State  SystemState readSystemState DataInputStream expectedTimeStamp IOException StateReader StateReader SystemState restoredState SystemState loadState restoredState expectedTimeStamp restoredState setFactory restoredState
public State read State Data Input Stream stream throws IO Exception State Reader reader new State Reader State Impl restored State State Impl create State if reader load State restored State stream return null return restored State  readState DataInputStream IOException StateReader StateReader StateImpl restoredState StateImpl createState loadState restoredState restoredState
public void write State State state Data Output Stream stream throws IO Exception if state get Factory this throw new Illegal Argument Exception State Writer writer new State Writer writer save State State Impl state stream  writeState DataOutputStream IOException getFactory IllegalArgumentException StateWriter StateWriter saveState StateImpl
private void set Version Range Version Constraint Impl constraint int matching Rule Version min Version if matching Rule NO MATCH matching Rule OTHER MATCH return if min Version null return switch matching Rule case QUALIFIER MATCH constraint set Version Range new Version Range min Version min Version break case MICRO MATCH Version max Version new Version min Version get Major Component min Version get Minor Component min Version get Micro Component 1 false NON NLS 1 constraint set Version Range new Version Range min Version max Version break case MINOR MATCH Version max Version new Version min Version get Major Component min Version get Minor Component 1 0 false NON NLS 1 constraint set Version Range new Version Range min Version max Version break case MAJOR MATCH Version max Version new Version min Version get Major Component 1 0 0 false NON NLS 1 constraint set Version Range new Version Range min Version max Version break case GREATER EQUAL MATCH constraint set Version Range new Version Range min Version Version max Version break  setVersionRange VersionConstraintImpl matchingRule minVersion matchingRule NO_MATCH matchingRule OTHER_MATCH minVersion matchingRule QUALIFIER_MATCH setVersionRange VersionRange minVersion minVersion MICRO_MATCH maxVersion minVersion getMajorComponent minVersion getMinorComponent minVersion getMicroComponent setVersionRange VersionRange minVersion maxVersion MINOR_MATCH maxVersion minVersion getMajorComponent minVersion getMinorComponent setVersionRange VersionRange minVersion maxVersion MAJOR_MATCH maxVersion minVersion getMajorComponent setVersionRange VersionRange minVersion maxVersion GREATER_EQUAL_MATCH setVersionRange VersionRange minVersion maxVersion

private int add To Object Table Object object object Table add object return the index of the object just added i e size 1 return object Table size 1  addToObjectTable objectTable objectTable
private boolean read State State Impl state Data Input Stream in long expected Timestamp throws IO Exception if in read Byte STATE CACHE VERSION return false byte tag read Tag in if tag OBJECT return false long timestamp Read in read Long if expected Timestamp 0 timestamp Read expected Timestamp return false add To Object Table state int length in read Int if length 0 return true for int i 0 i length i state basic Add Bundle read Bundle Description in state set Time Stamp timestamp Read state set Resolved in read Boolean if state is Resolved return true int resolved Length in read Int for int i 0 i resolved Length i state add Resolved Bundle read Bundle Description in return true  readState StateImpl DataInputStream expectedTimestamp IOException readByte STATE_CACHE_VERSION readTag timestampRead readLong expectedTimestamp timestampRead expectedTimestamp addToObjectTable readInt basicAddBundle readBundleDescription setTimeStamp timestampRead setResolved readBoolean isResolved resolvedLength readInt resolvedLength addResolvedBundle readBundleDescription
private Bundle Description Impl read Bundle Description Data Input Stream in throws IO Exception byte tag read Tag in if tag NULL return null if tag INDEX return Bundle Description Impl object Table get in read Int Bundle Description Impl result new Bundle Description Impl add To Object Table result result set Bundle Id in read Long result set Symbolic Name read String in false result set Location read String in false result set State in read Int result set Version read Version in result set Host read Host Spec in int package Count in read Int if package Count 0 Package Specification packages new Package Specification package Count for int i 0 i packages length i packages i read Package Spec in result set Packages packages int provided Package Count in read Int if provided Package Count 0 String provided Packages new String provided Package Count for int i 0 i provided Packages length i provided Packages i in readUTF result set Provided Packages provided Packages int required Bundle Count in read Int if required Bundle Count 0 Bundle Specification required Bundles new Bundle Specification required Bundle Count for int i 0 i required Bundles length i required Bundles i read Bundle Spec in result set Required Bundles required Bundles result set Singleton in read Boolean return result  BundleDescriptionImpl readBundleDescription DataInputStream IOException readTag BundleDescriptionImpl objectTable readInt BundleDescriptionImpl BundleDescriptionImpl addToObjectTable setBundleId readLong setSymbolicName readString setLocation readString setState readInt setVersion readVersion setHost readHostSpec packageCount readInt packageCount PackageSpecification PackageSpecification packageCount readPackageSpec setPackages providedPackageCount readInt providedPackageCount providedPackages providedPackageCount providedPackages providedPackages setProvidedPackages providedPackages requiredBundleCount readInt requiredBundleCount BundleSpecification requiredBundles BundleSpecification requiredBundleCount requiredBundles requiredBundles readBundleSpec setRequiredBundles requiredBundles setSingleton readBoolean
private Bundle Specification Impl read Bundle Spec Data Input Stream in throws IO Exception Bundle Specification Impl result new Bundle Specification Impl read Version Constraint result in result set Exported in read Boolean result set Optional in read Boolean return result  BundleSpecificationImpl readBundleSpec DataInputStream IOException BundleSpecificationImpl BundleSpecificationImpl readVersionConstraint setExported readBoolean setOptional readBoolean
private Package Specification Impl read Package Spec Data Input Stream in throws IO Exception Package Specification Impl result new Package Specification Impl read Version Constraint result in result set Export in read Boolean return result  PackageSpecificationImpl readPackageSpec DataInputStream IOException PackageSpecificationImpl PackageSpecificationImpl readVersionConstraint setExport readBoolean
private Host Specification Impl read Host Spec Data Input Stream in throws IO Exception byte tag read Tag in if tag NULL return null Host Specification Impl result new Host Specification Impl read Version Constraint result in result set Reload Host in read Boolean return result  HostSpecificationImpl readHostSpec DataInputStream IOException readTag HostSpecificationImpl HostSpecificationImpl readVersionConstraint setReloadHost readBoolean
called by readers for Version Constraint Impl subclasses private void read Version Constraint Version Constraint Impl version Data Input Stream in throws IO Exception version set Name read String in false version set Version Range read Version Range in version set Actual Version read Version in version set Supplier read Bundle Description in  VersionConstraintImpl readVersionConstraint VersionConstraintImpl DataInputStream IOException setName readString setVersionRange readVersionRange setActualVersion readVersion setSupplier readBundleDescription
private Version read Version Data Input Stream in throws IO Exception byte tag read Tag in if tag NULL return null if tag INDEX return Version object Table get in read Int int major Component in read Int int minor Component in read Int int service Component in read Int String qualifier Component read String in false boolean inclusive in read Boolean Version result new Version major Component minor Component service Component qualifier Component inclusive add To Object Table result return result  readVersion DataInputStream IOException readTag objectTable readInt majorComponent readInt minorComponent readInt serviceComponent readInt qualifierComponent readString readBoolean majorComponent minorComponent serviceComponent qualifierComponent addToObjectTable
private Version Range read Version Range Data Input Stream in throws IO Exception return new Version Range read Version in read Version in  VersionRange readVersionRange DataInputStream IOException VersionRange readVersion readVersion
public final boolean load State State Impl state Data Input Stream input long expected Timestamp throws IO Exception try return read State state input expected Timestamp finally input close  loadState StateImpl DataInputStream expectedTimestamp IOException readState expectedTimestamp
public final boolean load State State Impl state Data Input Stream input throws IO Exception return load State state input 1  loadState StateImpl DataInputStream IOException loadState
private String read String Data Input Stream in boolean intern throws IO Exception byte type in read Byte if type NULL return null if intern return in readUTF intern else return in readUTF  readString DataInputStream IOException readByte
private byte read Tag Data Input Stream in throws IO Exception return in read Byte  readTag DataInputStream IOException readByte

private int add To Object Table Object object object Table put object new Integer object Table size return the index of the object just added i e size 1 return object Table size 1  addToObjectTable objectTable objectTable objectTable
private int get From Object Table Object object if object Table null Object object Result object Table get object if object Result null return Integer object Result int Value return 1  getFromObjectTable objectTable objectResult objectTable objectResult objectResult intValue
private boolean write Prefix Object object Data Output Stream out throws IO Exception if write Index object out return true add this object to the object table first add To Object Table object out write Byte OBJECT return false  writePrefix DataOutputStream IOException writeIndex addToObjectTable writeByte
private void write State State Impl state Data Output Stream out throws IO Exception out write State Reader STATE CACHE VERSION if write Prefix state out return out write Long state get Time Stamp Bundle Description bundles state get Bundles out write Int bundles length if bundles length 0 return for int i 0 i bundles length i write Bundle Description Bundle Description Impl bundles i out out write Boolean state is Resolved if state is Resolved return Bundle Description resolved Bundles state get Resolved Bundles out write Int resolved Bundles length for int i 0 i resolved Bundles length i write Bundle Description Bundle Description Impl resolved Bundles i out  writeState StateImpl DataOutputStream IOException StateReader STATE_CACHE_VERSION writePrefix writeLong getTimeStamp BundleDescription getBundles writeInt writeBundleDescription BundleDescriptionImpl writeBoolean isResolved isResolved BundleDescription resolvedBundles getResolvedBundles writeInt resolvedBundles resolvedBundles writeBundleDescription BundleDescriptionImpl resolvedBundles
private void write Bundle Description Bundle Description Impl bundle Data Output Stream out throws IO Exception if write Prefix bundle out return out write Long bundle get Bundle Id write String Or Null bundle get Symbolic Name out write String Or Null bundle get Location out out write Int bundle get State write Version bundle get Version out write Host Spec Host Specification Impl bundle get Host out Package Specification packages bundle get Packages out write Int packages length for int i 0 i packages length i write Package Spec Package Specification Impl packages i out String provided Packages bundle get Provided Packages out write Int provided Packages length for int i 0 i provided Packages length i out writeUTF provided Packages i Bundle Specification required Bundles bundle get Required Bundles out write Int required Bundles length for int i 0 i required Bundles length i write Bundle Spec Bundle Specification Impl required Bundles i out out write Boolean bundle is Singleton  writeBundleDescription BundleDescriptionImpl DataOutputStream IOException writePrefix writeLong getBundleId writeStringOrNull getSymbolicName writeStringOrNull getLocation writeInt getState writeVersion getVersion writeHostSpec HostSpecificationImpl getHost PackageSpecification getPackages writeInt writePackageSpec PackageSpecificationImpl providedPackages getProvidedPackages writeInt providedPackages providedPackages providedPackages BundleSpecification requiredBundles getRequiredBundles writeInt requiredBundles requiredBundles writeBundleSpec BundleSpecificationImpl requiredBundles writeBoolean isSingleton
private void write Bundle Spec Bundle Specification Impl bundle Data Output Stream out throws IO Exception write Version Constraint bundle out out write Boolean bundle is Exported out write Boolean bundle is Optional  writeBundleSpec BundleSpecificationImpl DataOutputStream IOException writeVersionConstraint writeBoolean isExported writeBoolean isOptional
private void write Package Spec Package Specification Impl package Spec Data Output Stream out throws IO Exception write Version Constraint package Spec out out write Boolean package Spec is Exported  writePackageSpec PackageSpecificationImpl packageSpec DataOutputStream IOException writeVersionConstraint packageSpec writeBoolean packageSpec isExported
private void write Host Spec Host Specification Impl host Data Output Stream out throws IO Exception if host null out write Byte NULL return out write Byte OBJECT write Version Constraint host out out write Boolean host reload Host  writeHostSpec HostSpecificationImpl DataOutputStream IOException writeByte writeByte writeVersionConstraint writeBoolean reloadHost
called by writers for Version Constraint Impl subclasses private void write Version Constraint Version Constraint Impl version Data Output Stream out throws IO Exception write String Or Null version get Name out write Version Range version get Version Range out write Version version get Actual Version out write Bundle Description Bundle Description Impl version get Supplier out  VersionConstraintImpl writeVersionConstraint VersionConstraintImpl DataOutputStream IOException writeStringOrNull getName writeVersionRange getVersionRange writeVersion getActualVersion writeBundleDescription BundleDescriptionImpl getSupplier
private void write Version Version version Data Output Stream out throws IO Exception TODO should assess whether avoiding sharing versions would be good if write Prefix version out return out write Int version get Major Component out write Int version get Minor Component out write Int version get Micro Component write String Or Null version get Qualifier Component out out write Boolean version is Inclusive  writeVersion DataOutputStream IOException writePrefix writeInt getMajorComponent writeInt getMinorComponent writeInt getMicroComponent writeStringOrNull getQualifierComponent writeBoolean isInclusive
private void write Version Range Version Range version Range Data Output Stream out throws IO Exception write Version version Range get Minimum out write Version version Range get Maximum out  writeVersionRange VersionRange versionRange DataOutputStream IOException writeVersion versionRange getMinimum writeVersion versionRange getMaximum
private boolean write Index Object object Data Output Stream out throws IO Exception if object null out write Byte NULL return true int index get From Object Table object if index 1 return false out write Byte INDEX out write Int index return true  writeIndex DataOutputStream IOException writeByte getFromObjectTable writeByte writeInt
public void save State State Impl state Data Output Stream output throws IO Exception try write State state output finally output close  saveState StateImpl DataOutputStream IOException writeState
private void write String Or Null String string Data Output Stream out throws IO Exception if string null out write Byte NULL else out write Byte OBJECT out writeUTF string  writeStringOrNull DataOutputStream IOException writeByte writeByte

public class System State extends State Impl public boolean add Bundle Bundle Description description if super add Bundle description return false update Time Stamp return true  SystemState StateImpl addBundle BundleDescription addBundle updateTimeStamp
public boolean remove Bundle Bundle Description to Remove if super remove Bundle to Remove return false update Time Stamp return true  removeBundle BundleDescription toRemove removeBundle toRemove updateTimeStamp
public boolean update Bundle Bundle Description new Description if super remove Bundle new Description return false update Time Stamp return true  updateBundle BundleDescription newDescription removeBundle newDescription updateTimeStamp
private void update Time Stamp if time Stamp Long MAX VALUE time Stamp 0 time Stamp  updateTimeStamp timeStamp MAX_VALUE timeStamp timeStamp
public State Delta compare State state throws Bundle Exception we don t implement this no big deal the system state is private to the framework throw new Unsupported Operation Exception  StateDelta BundleException UnsupportedOperationException

public synchronized boolean add Bundle Bundle Description description if super add Bundle description return false added add description get Location return true  addBundle BundleDescription addBundle getLocation
public synchronized boolean remove Bundle Bundle Description description if super remove Bundle description return false removed add description get Location return true  removeBundle BundleDescription removeBundle getLocation
public boolean update Bundle Bundle Description new Description if super update Bundle new Description return false updated add new Description get Location return true  updateBundle BundleDescription newDescription updateBundle newDescription newDescription getLocation
public String get All Added return String added to Array new String added size  getAllAdded toArray
public String get All Removed return String removed to Array new String removed size  getAllRemoved toArray
public String get All Updated return String updated to Array new String updated size  getAllUpdated toArray
public State Delta compare State base State throws Bundle Exception Bundle Description current this get Bundles State Delta Impl delta new State Delta Impl this process additions and updates for int i 0 i current length i Bundle Description existing base State get Bundle By Location current i get Location if existing null delta record Bundle Added Bundle Description Impl current i else if updated contains current i get Location delta record Bundle Updated Bundle Description Impl current i process removals Bundle Description existing base State get Bundles for int i 0 i existing length i Bundle Description local get Bundle By Location existing i get Location if local null delta record Bundle Removed Bundle Description Impl existing i return delta  StateDelta baseState BundleException BundleDescription getBundles StateDeltaImpl StateDeltaImpl BundleDescription baseState getBundleByLocation getLocation recordBundleAdded BundleDescriptionImpl getLocation recordBundleUpdated BundleDescriptionImpl BundleDescription baseState getBundles BundleDescription getBundleByLocation getLocation recordBundleRemoved BundleDescriptionImpl

private Version actual Version public String get Name return name  actualVersion getName
public Version get Actual Version return actual Version  getActualVersion actualVersion
public Version Range get Version Range return version Range  VersionRange getVersionRange versionRange
public Bundle Description get Bundle return bundle  BundleDescription getBundle
public Bundle Description get Supplier return supplier  BundleDescription getSupplier
public boolean is Resolved return supplier null  isResolved
public void set Actual Version Version actual Version this actual Version actual Version  setActualVersion actualVersion actualVersion actualVersion
public void set Supplier Bundle Description supplier this supplier supplier  setSupplier BundleDescription
public void set Name String name this name name  setName
public void set Bundle Bundle Description bundle this bundle bundle  setBundle BundleDescription
public void set Version Range Version Range version Range this version Range version Range  setVersionRange VersionRange versionRange versionRange versionRange
public void unresolve actual Version null supplier null  actualVersion
public boolean is Satisfied By Version provided return version Range null true version Range is Included provided  isSatisfiedBy versionRange versionRange isIncluded
public String to String return name name version version Range NON NLS 1 NON NLS 2  toString versionRange

int write Id Entry int read Id int write Id this read Id read Id this write Id write Id  writeId readId writeId readId readId writeId writeId
int get Read Id return read Id  getReadId readId
int get Write Id return write Id  getWriteId writeId
void set Read Id int value read Id value  setReadId readId
void set Write Id int value write Id value  setWriteId writeId
Returns a new file manager for the area identified by the given base directory param base the directory holding the files to be managed param lock Mode the lock Mode to use for the given filemanager It can have one the 3 values none java io java nio and also supports null in which case the lock strategy will be the global one public File Manager File base String lock Mode this base base this lock Mode lock Mode this manager Root new File base MANAGER FOLDER this manager Root mkdir this table File new File manager Root TABLE FILE this lock File new File manager Root LOCK FILE  lockMode lockMode FileManager lockMode lockMode lockMode managerRoot MANAGER_FOLDER managerRoot tableFile managerRoot TABLE_FILE lockFile managerRoot LOCK_FILE
private void initialize Instance File throws IO Exception if instance File null return this instance File File create Temp File tmp instance manager Root NON NLS 1 NON NLS 2 this instance File delete On Exit instance Locker Basic Location create Locker instance File lock Mode instance Locker lock  initializeInstanceFile IOException instanceFile instanceFile createTempFile managerRoot instanceFile deleteOnExit instanceLocker BasicLocation createLocker instanceFile lockMode instanceLocker
private String get Absolute Path String file return new File base file get Absolute Path  getAbsolutePath getAbsolutePath
Add the given file name to the list of files managed by this location param file path of the file to manage throws IO Exception if there are any problems adding the given file to the manager public void add String file throws IO Exception if lock throw new IO Exception Eclipse Adaptor Msg formatter get String file Manager cannot Lock NON NLS 1 try update Table Entry entry Entry table get file if entry null table put file new Entry 0 1 save finally release  IOException IOException IOException EclipseAdaptorMsg getString fileManager cannotLock updateTable
Update the given target files with the content in the given source files The targets are file paths which are currently managed The sources are absolute or relative to the current working directory file paths containing the new content for the corresponding target param targets the target files to update param sources the new content for the target files throws IO Exception if there are any problems updating the given files public void update String targets String sources throws IO Exception if lock throw new IO Exception Eclipse Adaptor Msg formatter get String file Manager cannot Lock NON NLS 1 try update Table for int i 0 i targets length i String target targets i update target sources i save finally release  IOException IOException IOException EclipseAdaptorMsg getString fileManager cannotLock updateTable
Returns a list of all the file paths currently being managed return the file paths being managed public String get Files Set set table key Set String keys String set to Array new String set size String result new String keys length for int i 0 i keys length i result i new String keys i return result  getFiles keySet toArray
Returns the directory containing the files being managed by this file manager return the directory containing the managed files public File get Base return base  getBase
Returns the current numeric id appendage of the given file code file get Id file code 1 is returned if the given target file is not managed param target the managed file to access return the id of the file public int get Id String target Entry entry Entry table get target if entry null return 1 return entry get Read Id  getId getId getReadId
Attempts to lock the state of this manager and returns code true code if the lock could be acquired p Locking a manager is advisory only That is it does not prevent other applications from modifying the files managed by this manager p exception IO Exception if there was an unexpected problem while acquiring the lock private boolean lock throws IO Exception if locker null locker Basic Location create Locker lock File lock Mode if locker null throw new IO Exception Eclipse Adaptor Msg formatter get String file Manager cannot Lock NON NLS 1 return locker lock  IOException IOException BasicLocation createLocker lockFile lockMode IOException EclipseAdaptorMsg getString fileManager cannotLock
Returns the actual file location to use when reading the given managed file code null code can be returned if the given target is not managed and add is set to false param target the managed file to lookup param add indicate whether the file should be added to the manager if it is not managed throws IO Exception if the add flag is set to true and the addition of the file failed return the absolute file location to use for the given file or code null code if the given target is not managed public File lookup String target boolean add throws IO Exception Entry entry Entry table get target if entry null if add add target entry Entry table get target else return null return new File get Absolute Path target entry get Read Id  IOException IOException getAbsolutePath getReadId
private void move String source String target File original new File source its ok if the original does not exist The table entry will capture that fact There is no need to put something in the filesystem if original exists return original rename To new File target  renameTo
Saves the state of the file manager and releases any locks held private void release if locker null return locker release 
Removes the given file from management by this file manager param file the file to remove public void remove String file throws IO Exception The removal needs to be done eagerly so the value is effectively removed from the disktable Otherwise an update Table caused by an update could cause the file to readded to the local table if lock throw new IO Exception Eclipse Adaptor Msg formatter get String file Manager cannot Lock NON NLS 1 try update Table table remove file save finally release  IOException updateTable IOException EclipseAdaptorMsg getString fileManager cannotLock updateTable
private void update Table throws IO Exception if table File exists return long stamp table File last Modified if stamp table Stamp return initialize Instance File Properties disk Table new Properties try File Input Stream input new File Input Stream table File try disk Table load input finally input close catch IO Exception e throw e rethrow the exception we have nothing to add here table Stamp stamp for Enumeration e disk Table keys e has More Elements String file String e next Element String read Number disk Table get Property file if read Number null Entry entry Entry table get file int id Integer parse Int read Number if entry null table put file new Entry id id 1 else entry set Write Id id 1  updateTable IOException tableFile tableFile lastModified tableStamp initializeInstanceFile diskTable FileInputStream FileInputStream tableFile diskTable IOException tableStamp diskTable hasMoreElements nextElement readNumber diskTable getProperty readNumber parseInt readNumber setWriteId
private void save throws IO Exception if the table file has change on disk update our data structures then rewrite the file if table Stamp table File last Modified update Table Properties props new Properties for Enumeration e table keys e has More Elements String file String e next Element Entry entry Entry table get file String value Integer to String entry get Write Id 1 In the table we save the write number 1 because the read number can be totally different props put file value File Output Stream file Stream new File Output Stream table File try try props store file Stream safe table NON NLS 1 finally file Stream close catch IO Exception e throw new IO Exception Eclipse Adaptor Msg formatter get String file Manager could Not Save NON NLS 1  IOException tableStamp tableFile lastModified updateTable hasMoreElements nextElement toString getWriteId FileOutputStream fileStream FileOutputStream tableFile fileStream fileStream IOException IOException EclipseAdaptorMsg getString fileManager couldNotSave
private void update String target String source Entry entry Entry table get target int new Id entry get Write Id move get Absolute Path source get Absolute Path target new Id update the entry read and write ids should be the same since everything is in sync entry set Read Id new Id entry set Write Id new Id 1  newId getWriteId getAbsolutePath getAbsolutePath newId setReadId newId setWriteId newId
This methods remove all the temporary files that have been created by the file Manager This removal is only done if the instance of eclipse calling this method is the last instance using this file Manager throws IO Exception private void cleanup throws IO Exception Iterate through the temp files and delete them all except the one representing this filemanager String files manager Root list for int i 0 i files length i if files i ends With instance files i equals Ignore Case instance File get Name NON NLS 1 if new File manager Root files i delete false return If we are here it is because we are the last instance running After locking the table and getting its latest content remove all the backup files and change the table If the exception comes from lock another instance may have been started after we cleaned up therefore we abort if lock throw new IO Exception Eclipse Adaptor Msg formatter get String file Manager cannot Lock NON NLS 1 try update Table Collection managed Files table entry Set for Iterator iter managed Files iterator iter has Next Map Entry file Entry Map Entry iter next String file Name String file Entry get Key Entry info Entry file Entry get Value Because we are cleaning up we are giving up the values from our table and we must delete all the files that are not referenced by the table String read Id Integer to String info get Write Id 1 delete Copies file Name read Id catch IO Exception e If the exception comes from the update Table there has been a problem in reading the file If an exception occured in the save then the table won t be up to date throw e finally release  fileManager fileManager IOException IOException managerRoot endsWith equalsIgnoreCase instanceFile getName managerRoot IOException EclipseAdaptorMsg getString fileManager cannotLock updateTable managedFiles entrySet managedFiles hasNext fileEntry fileName fileEntry getKey fileEntry getValue readId toString getWriteId deleteCopies fileName readId IOException updateTable
private void delete Copies String file Name String exception Number String not To Delete file Name exception Number String files base list for int i 0 i files length i if files i starts With file Name files i equals not To Delete NON NLS 1 new File base files i delete  deleteCopies fileName exceptionNumber notToDelete fileName exceptionNumber startsWith fileName notToDelete
This methods declare the file Manager as closed From thereon the instance can no longer be used It is important to close the manager as it also cleanup old copies of the managed files public void close try cleanup catch IO Exception e Ignore and close instance Locker release instance File delete  fileManager IOException instanceLocker instanceFile
This methods opens the file Manager which loads the table in memory This method must be called before any operation on the filemanager param wait indicates if the open operation must wait in case of contention on the lock file public void open boolean wait throws IO Exception boolean locked lock if locked wait false throw new IO Exception Eclipse Adaptor Msg formatter get String file Manager cannot Lock NON NLS 1 wait for the lock to be released if locked do try Thread sleep 10 catch Interrupted Exception e Ignore the exception and keep waiting while lock try update Table finally release  fileManager IOException IOException EclipseAdaptorMsg getString fileManager cannotLock InterruptedException updateTable

public interface Location Returns true if this location allows a default value to be assigned return whether or not this location can assign a default value 
Returns the default value of this location if any code null code is returned if no default is avaliable Note that even locations which allow defaults may still return code null code return the default value for this location 
Returns the parent of this location or code null code if none is available return the parent of this location or code null code 
Returns the actual URL of this location If the location s value has been set that value is returned If the value is not set and the location allows defaults the value is set to the default and returned In all other cases code null code is returned return the URL for this location or code null code if none 
Returns true if this location has a value return whether or not the value is set 
Return true if this locaiton represents a read only location The read only character of a location is not in enforced in any way but rather expresses the intention of the location s creator return whether the location is read only 
Sets and optionally locks the location s value to the given URL If the location already has a value an exception is thrown If locking is requested and fails false is returned and the URL of this location is not set param value the value of this location param lock whether or not to lock this location return whether or not the location was successfully set and if requested locked throws Illegal State Exception if the location s value is already set  IllegalStateException
Attempts to lock this location with a canonical locking mechanism and returns code true code if the lock could be acquired Not all locations can be locked p Locking a location is advisory only That is it does not prevent other applications from modifying the same location p exception IO Exception if there was an unexpected problem while acquiring the lock  IOException
Releases the lock on this location If the location is not already locked no action is taken 

public interface Debug Options public boolean get Boolean Option String option boolean default Value  DebugOptions getBooleanOption defaultValue
public boolean get Boolean Option String option boolean default Value public abstract String get Option String option  getBooleanOption defaultValue getOption
public abstract String get Option String option public abstract String get Option String option String default Value  getOption getOption defaultValue
public abstract String get Option String option String default Value public abstract int get Integer Option String option int default Value  getOption defaultValue getIntegerOption defaultValue
public abstract int get Integer Option String option int default Value public abstract void set Option String option String value  getIntegerOption defaultValue setOption

Returns all command line arguments specified when the running framework was started return the array of command line arguments 
Returns the arguments consumed by the framework implementation itself Which arguments are consumed is implementation specific return the array of command line arguments consumed by the framework 
Returns the arguments not consumed by the framework implementation itself Which arguments are consumed is implementation specific return the array of command line arguments not consumed by the framework 
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  getProperty
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 
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  OS_UNKNOWN knownOSValues
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 
Returns true if the framework is in debug mode return whether or not the framework is in debug mode 
Returns true if the framework is in development mode return whether or not the framework is in development mode 

public interface Bundle Localization The get Localization method gets a Resource Bundle object for the given locale and bundle return A code Resource Bundle code object for the given bundle and locale If null is passed for the locale parameter the default locale is used  BundleLocalization getLocalization ResourceBundle ResourceBundle

private transient Throwable cause public Plugin Conversion Exception super  PluginConversionException
public Plugin Conversion Exception String message super message  PluginConversionException
public Plugin Conversion Exception String message Throwable cause super message this cause cause  PluginConversionException
public Plugin Conversion Exception Throwable cause this cause cause  PluginConversionException
public Throwable get Cause return cause  getCause

public interface Plugin Converter Converts a plug in fragment manifest at the given source base location a directory and generates a corresponding bundle manifest at the given default target locaton a file param plugin Base Location the base location for the plug in fragment manifest to be converted a directory e g the plug in install location param bundle Manifest Location the location for the bundle manifest to be generated including the file name param compatibility Manifest a boolean indicating if the manifest should contain headers to run in backward compatibility param target a string indicating the version of the runtime for which the manifest generated is targeted param analyse Jars a boolean indicating if the code jars of the given plugin must be analysed When set to false the provided package har return the generated manifest file location if a bundle manifest was successfully generated or already existed code null code otherwise  PluginConverter pluginBaseLocation bundleManifestLocation compatibilityManifest analyseJars
Converts a plug in fragment manifest at the given source base location a directory and generates a corresponding bundle manifest returned as a dictionary param plugin Base Location the base location for the plug in fragment manifest to be converted a directory e g the plug in install location param compatibility a boolean indicating if the manifest should contain headers to run in backward compatibility param target a string indicating the version of the runtime for which the manifest generated is targeted param analyse Jars a boolean indicating if the code jars of the given plugin must be analysed When set to false the provided package har return the generated manifest as a dictionary if a bundle manifest was successfully generated code null code otherwise  pluginBaseLocation analyseJars
Write the dictionary into the specified location param generation Location the location for the bundle manifest to be written param manifest To Write the dictionary to write into generation Location file param compatibility Manifest a boolean indicating if the file should contain headers to run with in backward compatibility throws Plugin Conversion Exception if an error occurs while writing the given manifest  generationLocation manifestToWrite generationLocation compatibilityManifest PluginConversionException

return 
Returns the type of change which occured The return value is composed of by bit wise masking the relevant flags from the set ADDED REMOVED CHANGED RESOLVED UNRESOLVED LINKAGE CHANGED Note that bundle start and stop state changes are not captured in the delta as they do not represent structural changes but rather transient runtime states return the type of change which occured  LINKAGE_CHANGED

public interface Bundle Description The location string for this bundle public String get Location  BundleDescription getLocation
Returns an array of package specifications defined by the Import Package and Export Package clauses Exported and imported packages can be told apart by checking the is Export flag see Package Specification is Exported return an array of package specifications  isExport PackageSpecification isExported
Returns an array of package specifications defined by the Provide Package clause return an array of package names 
Returns the package specification whose package name matches the given name The packages detailed in get Packages are searched for the given name param name the name of the package to look for return the package description for the discovered bundle or null if none could be found  getPackages
Returns an array of bundle specifications defined by the Require Bundle clause in this bundle return an array of bundle specifications 
Returns the bundle specification for the bundle with the given symbolic name in this bundle param name the symbolic name of the required bundle to look for return the discovered bunde specification or null if none could be found 
Returns symbolic name of the bundle return the symbolic name of this bundle 
Returns true if this bundle is resolved in its host state return 
Returns the state object which hosts this bundle null is returned if this bundle is not currently in a state return the state object which hosts this bundle 
Returns the framework state of this bundle The return value can be one of the valid states as defined in org osgi framwork Bundle or NONE as defined in Bundle Description return see org osgi framework Bundle  BundleDescription
Returns the version specification of for this bundle return the version specification for this bundle 
Returns the string representation of this bundle return String representation of this bundle 
Returns the host for this bundle null is returned if this bundle is not a fragment return 
Returns the numeric id of this bundle Typically a bundle description will only have a numeric id if it represents a bundle that is installed in a framework as the framework assigns the ids 1 is returned if the id is not known return the numeric id of this bundle description 
Returns all fragments known to this bundle regardless resolution status return an array of Bundle Descriptions containing all known fragments  BundleDescriptions
Returns the user object associated to this bundle description or code null code if none exists return the user object associated to this bundle description or code null code 
Returns whether this bundle is a singleton Singleton bundles require that at most one single version of the bundle can be resolved at a time p The existence of a single bundle marked as singleton causes all bundles with the same symbolic name to be treated as singletons as well p return code true code if this bundle is a singleton code false code otherwise 
Associates a user provided object to this bundle description or removes an existing association if code null code is provided The provided object is not interpreted in any ways by this bundle description param user Object an arbitrary object provided by the user or code null code  userObject

Returns whether or not this bundle specificiation is exported from the declaring bundle return whether this specification is exported 
Returns whether or not this bundle specificiation is optional return whether this specification is optional 

a fragment should force a reload of the host when attaching this should be removed This method should not be called public boolean reload Host  reloadHost
Returns an array of bundle descriptions which satisfy this host specification return the host bundles which satisfy this constraint 

Returns whether or not this package specificiation is exported from the declaring bundle return whether this specification is exported 

Returns a mutable state representing the current system The returned state will not be associated with any resolver p This is a convenience method fully equivalent to code get State true code p return a state representing the current framework TODO Why is the state not associated with any resolver  getState
Returns a state representing the current system If there is need to make changes to the returned state a mutable state must be requested Otherwise an immutable state should be requested In this case invoking any of the operations that could cause the state to be changed will throw an code java lang Unsupported Operation Exception code The returned state will not be associated with any resolver param mutable whether the returned state should mutable return a state representing the current framework TODO Why is the state not associated with any resolver  UnsupportedOperationException
Returns a state helper object State helpers provide convenience methods for manipulating states p A possible implementation for this method would provide the same single State Helper instance to all clients p return a state helper see State Helper  StateHelper StateHelper
Commit the differences between the current state and the given state The given state must return true from State is Resolved or an exception is thrown The resolved state is committed verbatim as is param state the future state of the framework throws Bundle Exception if the id of the given state does not match that of the current state or if the given state is not resolved  isResolved BundleException
Returns a resolver supplied by the system The returned resolver will not be associated with any state return a system resolver 
Returns a factory that knows how to create state objects such as bundle descriptions and the different types of version constraints return a state object factory 

Resolves the state associated with this resolver and returns an array of bundle deltas describing the changes The state and version bindings for the various bundles and packages in this state are updated and a array containing bundle deltas describing the changes returned p This method is intended to be called only by State objects in response to a user invocation of State resolve States will typically refuse to update their constituents see State resolve Bundle and State resolve Constraint if their resolve method is not currently being invoked p p Note the given state is destructively modified to reflect the results of resolution p  resolveBundle resolveConstraint
public void resolve public void resolve Bundle Description discard  BundleDescription
Flushes this resolver of any stored cached data it may be keeping to facilitate incremental processing on its associated state This is typicaly used when switching the resolver s state object 
Returns the state associated with this resolver A state can work with at most one resolver at any given time Similarly a resolver can work with at most one state at a time return the state for this resolver null is returned if the resolver does not have a state 
Sets the state associated with this resolver A state can work with at most one resolver at any given time Similarly a resolver can work with at most one state at a time p To ensure that this resolver and the given state are properly linked the following expression must be included in this method if the given state value is not identical to the result of this get State p pre if this get State value value set Resolver this pre  getState getState setResolver
Notifies the resolver a bundle has been added to the state param bundle 
Notifies the resolver a bundle has been removed from the state param bundle 
Notifies the resolver a bundle has been updated in the state param new Description the new description param existing Description the existing description  newDescription existingDescription

public interface State Adds the given bundle to this state param description the description to add return a boolean indicating whether the bundle was successfully added 
Returns a delta describing the differences between this state and the given state The given state is taken as the base so the absence of a bundle in this state is reported as a deletion etc p Note that the generated State Delta will contain Bundle Deltas with one of the following types Bundle Delta ADDED Bundle Delta REMOVED and Bundle Delta UPDATED p param base State the base state return a delta describing differences between this and the base state state  StateDelta BundleDeltas BundleDelta BundleDelta BundleDelta baseState
Removes a bundle description with the given bundle id param bundle Id the id of the bundle description to be removed return the removed bundle description or code null code if a bundle with the given id does not exist in this state  bundleId
Removes the given bundle description param bundle the bundle description to be removed return code true code if if the bundle description was removed code false code otherwise 
Updates an existing bundle description with the given description param bundle the bundle description to replace an existing one return code true code if if the bundle description was updated code false code otherwise 
Returns the delta representing the changes from the time this state was first captured until now return 
Returns descriptions for all bundles known to this state return the descriptions for all bundles known to this state 
Returns descriptor for all bundles known to this state return the descriptors for all bundles known to this state see Bundle Description get Bundle Id  BundleDescription getBundleId
Returns the bundle descriptor for the bundle with the given name and version null is returned if no such bundle is found in this state If the version argument is null then the bundle with the given name which is resolve and or has the highest version number is returned param symbolic Name symbolic name of the bundle to query param version version of the bundle to query null matches any bundle return the descriptor for the identified bundle  symbolicName
Returns the bundle descriptor for the bundle with the given location identifier null is returned if no such bundle is found in this state param location location identifier of the bundle to query return the descriptor for the identified bundle 
Returns the id of the state on which this state is based This correlates this state to the system state For example if Resolver get State returns state 4 but then some bundles are installed the system state id is updated By comparing 4 to the current system state id it is possible to detect if the the states are out of sync return the id of the state on which this state is based  getState
Returns true if there have been no modifications to this state since the last time resolve was called return whether or not this state has changed since last resolved 
Resolves the given version constraint with the given values The given constraint object is destructively modified to reflect its new resolved state Note that a constraint can be unresolved by passing null for both the actual version and the supplier p This method is intended to be used by resolvers in the process of determining which constraints are satisfied by which components p param constraint the version constraint to update param actual Version the version to which the constraint will be bound May be null if the constraint is to be unresolved param supplier the bundle that supplies the given version which satisfies the constraint May be null if the constraint is to be unresolved throws Illegal State Exception if this is not done during a call to code resolve code  actualVersion IllegalStateException
Sets whether or not the given bundle is selected in this state p This method is intended to be used by resolvers in the process of determining which constraints are satisfied by which components p param bundle the bundle to update param status whether or not the given bundle is selected TODO unclear what the valid status flags are what happens if this is called by someone other than the resolver 
Returns the resolver associated with this state A state can work with at most one resolver at any given time Similarly a resolver can work with at most one state at a time return the resolver for this state null is returned if the state does not have a resolver 
Sets the resolver associated with this state A state can work with at most one resolver at any given time Similarly a resolver can work with at most one state at a time p To ensure that this state and the given resovler are properly linked the following expression must be included in this method if the given resolver value is not identical to the result of this get Resolver pre if this get Resolver value value set State this pre p TODO what happens if you set the Resolver after some bundles have been added to the state but it is not resolved Should setting the resolver force a state to be unresolved  getResolver getResolver setState
Resolves the constraints contained in this state using the resolver currently associated with the state and returns a delta describing the changes in resolved states and dependencies in the state p Note that this method is typically implemented using pre this get Resolver resolve pre and is the preferred path for invoking resolution In particular states should refuse to perform updates see select and resolve Constraint if they are not currently involved in a resolution cycle p Note the given state is destructively modified to reflect the results of resolution p param incremental a flag controlling whether resolution should be incremental return a delta describing the changes in resolved state and interconnections  getResolver resolveConstraint
public State Delta resolve boolean incremental Same as State resolve true public State Delta resolve  StateDelta StateDelta
Resolves the constraints contained in this state using the resolver currently associated with the state in a incremental least perturbing mode and returns a delta describing the changes in resolved states and dependencies in the state param discard an array containing descriptions for bundles whose current resolution state should be forgotten return a delta describing the changes in resolved state and interconnections 
Sets the version overrides which are to be applied during the resolutoin of this state Version overrides allow external forces to refine override the version constraints setup by the components in the state param value TODO the exact form of this is not defined as yet 
Returns descriptions for all bundles currently resolved in this state return the descriptions for all bundles currently resolved in this state 
Adds the given listener for change events to this state Has no effect if an identical listener is already registered p The resolver associated with the state if implements State Change Listener receives all notifications for added removed bundlers for free p param listener the listener param flags the bit wise OR of all event types of interest to the listener see Bundle Delta for all available event types  StateChangeListener BundleDelta
Removes the given listener from the list of listeners Has no effect if an identical listener is not registered param listener the listener 
Returns whether this state is empty return code true code if this state is empty code false code otherwise 
Returns all exported packages in this state according to the OS Gi rules for resolution see org osgi service packageadmin Package Admin get Exported Packages Bundle  OSGi PackageAdmin getExportedPackages
Returns all bundle descriptions with the given bundle symbolic name param symbolic Name symbolic name of the bundles to query return the descriptors for all bundles known to this state with the specified symbolic name  symbolicName
Returns the factory that created this state return the state object factory that created this state 

private State Delta delta public State Change Event State Delta delta super delta get State this delta delta  StateDelta StateChangeEvent StateDelta getState
Returns a delta detailing changes to a state object return a state delta public State Delta get Delta return delta  StateDelta getDelta

public interface State Change Listener extends Event Listener public void state Changed State Change Event event  StateChangeListener EventListener stateChanged StateChangeEvent

public interface State Delta Returns an array of all the bundle deltas in this delta regardless of type return an array of bundle deltas  StateDelta
Returns an array of all the members of this delta which match the given flags If an exact match is requested then only delta members whose type exactly matches the given mask are included Otherwise all bundle deltas whose type s bit wise and with the mask is non zero are included param mask param exact return an array of bundle deltas matching the given match criteria 
Returns the state whose changes are represented by this delta return 

public interface State Helper Returns all bundles in the state depending on the given bundles The given bundles appear in the returned array param roots the initial set bundles return an array containing bundle descriptions for the given roots and all bundles in the state that depend on them  StateHelper
Returns all unsatisfied constraints in the given bundle Returns an empty array if no unsatisfied constraints can be found p Note that a bundle may have no unsatisfied constraints and still not be resolved p param bundle the bundle to examine return an array containing all unsatisfied constraints for the given bundle 
Returns whether the given package specification constraint is resolvable A package specification constraint may be resolvable but not resolved which means that the bundle that provides it has not been resolved for some other reason e g another constraint could not be resolved another version has been picked etc param constraint the package specification constraint to be examined return code true code if the constraint can be resolved code false code otherwise 
Returns whether the given bundle specification constraint is resolvable A bundle specification constraint may be resolvable but not resolved which means that the bundle that provides it has not been resolved for some other reason e g another constraint could not be resolved another version has been picked etc param constraint the bundle specification constraint to be examined return code true code if the constraint can be resolved code false code otherwise 
Returns whether the given host specification constraint is resolvable A host specification constraint may be resolvable but not resolved which means that the bundle that provides it has not been resolved for some other reason e g another constraint could not be resolved another version has been picked etc param constraint the host specification constraint to be examined return code true code if the constraint can be resolved code false code otherwise 
Returns all packages exported by the given bundle Returns an empty array if no packages are exported param bundle the bundle return all packages exported by the given bundle 
Returns the package specification corresponding to the given package name version that has been elected to be exported in the given state Returns code null code if none exists p In case a package version is not provided returns any version of the package that has been exported p param state the state param package Name the name of the package param version the version of the package can be code null code return  packageName
public Package Specification get Exported Package State state String package Name Version version Sorts the given array of strong resolved strong bundles in pre requisite order If A requires B A appears after B Fragments will appear after all of their hosts Constraints contributed by fragments will be treated as if contributed by theirs hosts affecting their position This is true even if the fragment does not appear in the given bundle array p Unresolved bundles are ignored p param to Sort an array of bundles to be sorted return any cycles found  PackageSpecification getExportedPackage packageName toSort

public interface State Object Factory Creates an empty state return the created state  StateObjectFactory
Creates a new state that is a copy of the given state The returned state will contain copies of all bundle descriptions in the given state No data pertaining to resolution is copied resolution status resolver etc param state a state to be copied return the created state 
Creates a bundle description from the given parameters param id id for the bundle param symbolic Name symbolic name for the bundle may be code null code param version version for the bundle may be code null code param location location for the bundle param required version constraints for all required bundles may be code null code param host version constraint specifying the host for the bundle to be created Should be code null code if the bundle is not a fragment param packages version constraints for all packages imported and exported may be code null code param provided Packages names of all provided packages may be code null code param singleton whether the bundle created should be a singleton return the created bundle description deprecated use another version of create Bundle Description  symbolicName providedPackages createBundleDescription
Creates a bundle description from the given parameters param id id for the bundle param symbolic Name symbolic name for the bundle may be code null code param version version for the bundle may be code null code param location location for the bundle param required version constraints for all required bundles may be code null code param hosts version constraints specifying the hosts for the bundle to be created may be code null code param packages version constraints for all packages imported and exported may be code null code param provided Packages names of all provided packages may be code null code param singleton whether the bundle created should be a singleton return the created bundle description  symbolicName providedPackages
Returns a bundle description based on the information in the supplied manifest dictionary The manifest should contain String keys and String values which correspond to proper OS Gi manifest headers and values param manifest a collection of OS Gi manifest headers and values param location the URL location of the bundle param id the id of the bundle return a bundle description derived from the given information throws Bundle Exception if an error occurs while reading the manifest  OSGi OSGi BundleException
Creates a bundle description that is a copy of the given description param original the bundle description to be copied return the created bundle description 
Creates a bundle specification from the given parameters param required Symbolic Name the symbolic name for the required bundle param required Version the required version may be code null code param match Rule the match rule param export whether the required bundle should be re exported param optional whether the constraint should be optional return the created bundle specification see Version Constraint for information on the available match rules  requiredSymbolicName requiredVersion matchRule VersionConstraint
Creates a bundle specification that is a copy of the given constraint param original the constraint to be copied return the created bundle specification 
Creates a host specification from the given parameters param host Symbolic Name the symbolic name for the host bundle param host Version the version for the host bundle may be code null code param match Rule the match rule param reload Host whether the host should be reloaded when the fragment is added removed return the created host specification see Version Constraint for information on the available match rules  hostSymbolicName hostVersion matchRule reloadHost VersionConstraint
Creates a host specification that is a copy of the given constraint param original the constraint to be copied return the created host specification 
Creates a package specification from the given parameters param package Name the package name param package Version the package version may be code null code param exported whether the constraint describes a exported package or imported package return the created package specification  packageName packageVersion
Creates a package specification that is a copy of the given constraint param original the constraint to be copied return the created package specification 
Persists the given state in the given output stream Closes the stream param state the state to be written param stream the stream where to write the state to throws IO Exception if an IO Exception happens while writing the state to the stream throws Illegal Argument Exception if the state provided was not created by this factory  IOException IOException IllegalArgumentException
Reads a persisted state from the given stream Closes the stream param stream the stream where to read the state from return the state read throws IO Exception if an IO Exception happens while reading the state from the stream  IOException IOException

Creates a plug in version identifier from a given Version param version public Version Version version this version major version minor version micro version qualifier version inclusive 
Creates a plug in version identifier from its components param major major component of the version identifier param minor minor component of the version identifier param micro micro update component of the version identifier public Version int major int minor int micro this major minor micro null 
Creates a plug in version identifier from its components param major major component of the version identifier param minor minor component of the version identifier param micro micro update component of the version identifier param qualifier qualifier component of the version identifier Qualifier characters that are not a letter or a digit are replaced public Version int major int minor int micro String qualifier throws Illegal Argument Exception this major minor micro qualifier true  IllegalArgumentException
Creates a plug in version identifier from its components param major major component of the version identifier param minor minor component of the version identifier param micro micro update component of the version identifier param qualifier qualifier component of the version identifier param inclusive inclusive property of the version identifier Qualifier characters that are not a letter or a digit are replaced public Version int major int minor int micro String qualifier boolean inclusive throws Illegal Argument Exception Do the test outside of the assert so that they Policy bind will not be evaluated each time including cases when we would have passed by the assert if major 0 throw new Illegal Argument Exception Negative major NON NLS 1 if minor 0 throw new Illegal Argument Exception Negative minor NON NLS 1 if micro 0 throw new Illegal Argument Exception Negative micro NON NLS 1 if qualifier null qualifier NON NLS 1 this major major this minor minor this micro micro this qualifier verify Qualifier qualifier this inclusive inclusive  IllegalArgumentException IllegalArgumentException IllegalArgumentException IllegalArgumentException verifyQualifier
Creates a plug in version identifier from the given string The string represenation consists of up to 4 tokens separated by decimal point For example the following are valid version identifiers as strings ul li code 0 0 0 code li li code 1 0 127564 code li li code 3 7 2 build 127J code li li code 1 9 code interpreted as code 1 9 0 code li li code 3 code interpreted as code 3 0 0 code li ul param version Id string representation of the version identifier Qualifier characters that are not a letter or a digit are replaced public Version String version Id this version Id true  versionId versionId versionId
Creates a plug in version identifier from the given string The string represenation consists of up to 4 tokens separated by decimal point For example the following are valid version identifiers as strings ul li code 0 0 0 code li li code 1 0 127564 code li li code 3 7 2 build 127J code li li code 1 9 code interpreted as code 1 9 0 code li li code 3 code interpreted as code 3 0 0 code li ul param version Id string representation of the version identifier Qualifier characters that are not a letter or a digit are replaced param inclusive inclusive property of the version identifier public Version String version Id boolean inclusive if version Id null version Id 0 0 0 NON NLS 1 Object parts parse Version version Id this major Integer parts 0 int Value this minor Integer parts 1 int Value this micro Integer parts 2 int Value this qualifier String parts 3 this inclusive inclusive  versionId versionId versionId versionId parseVersion versionId intValue intValue intValue
private static Object parse Version String version Id Do the test outside of the assert so that they Policy bind will not be evaluated each time including cases when we would have passed by the assert if version Id null throw new Illegal Argument Exception Null version string NON NLS 1 String s version Id trim if s equals NON NLS 1 throw new Illegal Argument Exception Empty version string NON NLS 1 if s starts With SEPARATOR throw new Illegal Argument Exception Invalid version format NON NLS 1 if s ends With SEPARATOR throw new Illegal Argument Exception Invalid version format NON NLS 1 if s index Of SEPARATOR SEPARATOR 1 throw new Illegal Argument Exception Invalid version format NON NLS 1 String Tokenizer st new String Tokenizer s SEPARATOR Vector elements new Vector 4 while st has More Tokens elements add Element st next Token int element Size elements size if element Size 0 throw new Illegal Argument Exception Invalid version format no token NON NLS 1 if element Size 4 throw new Illegal Argument Exception Invalid version format more than 4 tokens NON NLS 1 int numbers new int 3 try numbers 0 Integer parse Int String elements element At 0 if numbers 0 0 throw new Illegal Argument Exception Negative major NON NLS 1 catch Number Format Exception nfe throw new Illegal Argument Exception Invalid major NON NLS 1 try if element Size 2 numbers 1 Integer parse Int String elements element At 1 if numbers 1 0 throw new Illegal Argument Exception Negative minor NON NLS 1 else numbers 1 0 catch Number Format Exception nfe throw new Illegal Argument Exception Invalid minor NON NLS 1 try if element Size 3 numbers 2 Integer parse Int String elements element At 2 if numbers 2 0 throw new Illegal Argument Exception Invalid micro NON NLS 1 else numbers 2 0 catch Number Format Exception nfe throw new Illegal Argument Exception Invalid micro NON NLS 1 result is a 4 element array with the major minor micro and qualifier Object result new Object 4 result 0 new Integer numbers 0 result 1 new Integer numbers 1 result 2 new Integer numbers 2 if element Size 4 result 3 verify Qualifier String elements element At 3 else result 3 NON NLS 1 return result  parseVersion versionId versionId IllegalArgumentException versionId IllegalArgumentException startsWith IllegalArgumentException endsWith IllegalArgumentException indexOf IllegalArgumentException StringTokenizer StringTokenizer hasMoreTokens addElement nextToken elementSize elementSize IllegalArgumentException elementSize IllegalArgumentException parseInt elementAt IllegalArgumentException NumberFormatException IllegalArgumentException elementSize parseInt elementAt IllegalArgumentException NumberFormatException IllegalArgumentException elementSize parseInt elementAt IllegalArgumentException NumberFormatException IllegalArgumentException elementSize verifyQualifier elementAt
Compare version identifiers for equality Identifiers are equal if all of their components are equal param object an object to compare return whehter or not the two objects are equal public boolean equals Object object if object instanceof Version return false Version v Version object return v get Major Component major v get Minor Component minor v get Micro Component micro v get Qualifier Component equals qualifier  getMajorComponent getMinorComponent getMicroComponent getQualifierComponent
Returns a hash code value for the object return an integer which is a hash code value for this object public int hash Code int code major minor micro R1 0 result if qualifier equals NON NLS 1 return code else return code qualifier hash Code  hashCode hashCode
Returns the major incompatible component of this version identifier return the major version public int get Major Component return major  getMajorComponent
Returns the minor compatible component of this version identifier return the minor version public int get Minor Component return minor  getMinorComponent
Returns the micro level component of this version identifier return the micro level public int get Micro Component return micro  getMicroComponent
Returns the qualifier component of this version identifier return the qualifier public String get Qualifier Component return qualifier  getQualifierComponent
Returns whether this Version is inclusive when used as a Version Range minimum or maximum return code true code if this Version is inclusive code false code otherwise public boolean is Inclusive return inclusive  VersionRange isInclusive
Compares two version identifiers to see if this one is greater than or equal to the argument p A version identifier is considered to be greater than or equal if its major component is greater than the argument major component or the major components are equal and its minor component is greater than the argument minor component or the major and minor components are equal and its micro component is greater than the argument micro component or the major minor and micro components are equal and the qualifier component is greated than the argument qualifier component using lexicographic string comparison or all components are equal p deprecated use link Version Range param id the other version identifier return code true code is this version identifier is compatible with the given version identifier and code false code otherwise public boolean match Greater Or Equal To Version id if id null return false if major id get Major Component return true if major id get Major Component minor id get Minor Component return true if major id get Major Component minor id get Minor Component micro id get Micro Component return true if major id get Major Component minor id get Minor Component micro id get Micro Component qualifier compare To id get Qualifier Component 0 return true else return false  VersionRange matchGreaterOrEqualTo getMajorComponent getMajorComponent getMinorComponent getMajorComponent getMinorComponent getMicroComponent getMajorComponent getMinorComponent getMicroComponent compareTo getQualifierComponent
Compares two version identifiers for major match p A version identifier is considered to match on major if its major component equals to the argument major component and its minor component is greater than or equal to the argument minor component If the minor components are equal than the micro level of the version identifier must be greater than or equal to the micro level of the argument identifier If the micro levels are equal the two version identifiers are considered to be equivalent if this qualifier is greated or equal to the qualifier of the argument using lexicographic string comparison p deprecated use link Version Range param id the other version identifier return code true code is this version identifier is compatible with the given version identifier and code false code otherwise public boolean match Major Version id if id null return false if major id get Major Component return false if minor id get Minor Component return true if minor id get Minor Component return false if micro id get Micro Component return true if micro id get Micro Component return false if qualifier compare To id get Qualifier Component 0 return true else return false  VersionRange matchMajor getMajorComponent getMinorComponent getMinorComponent getMicroComponent getMicroComponent compareTo getQualifierComponent
Compares two version identifiers for equivalency p Two version identifiers are considered to be equivalent if their major and minor component equal and are at least at the same micro level as the argument If the micro levels are equal the two version identifiers are considered to be equivalent if this qualifier is greated or equal to the qualifier of the argument using lexicographic string comparison p deprecated use link Version Range param id the other version identifier return code true code is this version identifier is equivalent to the given version identifier and code false code otherwise public boolean match Minor Version id if id null return false if major id get Major Component return false if minor id get Minor Component return false if micro id get Micro Component return true if micro id get Micro Component return false if qualifier compare To id get Qualifier Component 0 return true else return false  VersionRange matchMinor getMajorComponent getMinorComponent getMicroComponent getMicroComponent compareTo getQualifierComponent
Compares two version identifiers for micro match p Two version identifiers are considered to micro match if their major minor and micro components equal and this qualifier is greated or equal to the qualifier of the argument using lexicographic string comparison p deprecated use link Version Range param id the other version identifier return code true code is this version identifier matches on micro to the given version identifier and code false code otherwise public boolean match Micro Version id if id null return false if major id get Major Component minor id get Minor Component micro id get Micro Component return false if qualifier compare To id get Qualifier Component 0 return true else return false  VersionRange matchMicro getMajorComponent getMinorComponent getMicroComponent compareTo getQualifierComponent
Compares two version identifiers for perfect equality p Two version identifiers are considered to be perfectly equal if their major minor micro and qualifier components are equal p deprecated use link Version Range param id the other version identifier return code true code is this version identifier is perfectly equal to the given version identifier and code false code otherwise public boolean match Qualifier Version id return equals id  VersionRange matchQualifier
Compares two version identifiers for order using multi decimal comparison param id the other version identifier return code true code is this version identifier is greater than the given version identifier and code false code otherwise public boolean is Greater Than Version id if id null if major 0 minor 0 micro 0 qualifier equals NON NLS 1 return false else return true if major id get Major Component return true if major id get Major Component return false if minor id get Minor Component return true if minor id get Minor Component return false if micro id get Micro Component return true if micro id get Micro Component return false if qualifier compare To id get Qualifier Component 0 return true else return false  isGreaterThan getMajorComponent getMajorComponent getMinorComponent getMinorComponent getMicroComponent getMicroComponent compareTo getQualifierComponent
Returns the string representation of this version identifier The result satisfies code vi equals new Plugin Version Identifier vi to String code return the string representation of this plug in version identifier public String to String String base major SEPARATOR minor SEPARATOR micro R1 0 result if qualifier equals NON NLS 1 return base else return base SEPARATOR qualifier  PluginVersionIdentifier toString toString
private static String verify Qualifier String s char chars s trim to Char Array boolean whitespace false for int i 0 i chars length i char c chars i if Character is Letter c Character is Digit c chars i whitespace true return whitespace new String chars s  verifyQualifier toCharArray isLetter isDigit
Compares this Version object with the specified Version object for order Returns a negative integer zero or a positive integer as this object is less than equal to or greater than the specified object p param o the Version object to be compared return a negative integer zero or a positive integer as this object is less than equal to or greater than the specified Version object throws Class Cast Exception if the specified object s type is not Version public int compare To Object o if o instanceof Version throw new Class Cast Exception if equals o return 0 if is Greater Than Version o return 1 return 1  ClassCastException compareTo ClassCastException isGreaterThan

Returns this constraint s name return this constraint s name 
Returns the actual version this constraint was resolved against or code null code if it is not resolved return the version this constraint was resolved against or code null code see is Resolved  isResolved
Returns the version range for this constraint return the version range for this constraint or code null code 
Returns the bundle that declares this constraint return a bundle description 
Returns the bundle that satisfies this constraint if it is resolved return a bundle description or code null code see is Resolved  isResolved
Returns whether this constraint is resolved A resolved constraint is guaranteed to have its supplier defined return code true code if this bundle is resolved code false code otherwise 
Returns whether this constraint could be satisfied by the given version This will depend on the required version the given version and the matching rule A constraint that does not declare a required version is satisfiable by any version param version a version to be tested against this constraint may be code null code return code true code if this constraint could be resolved code false code otherwise 

Constructs a Version Range with the specified min Version and max Version param min Version the minimum version of the range param max Version the maximum version of the range public Version Range Version min Version Version max Version this min Version min Version this max Version max Version  VersionRange minVersion maxVersion minVersion maxVersion VersionRange minVersion maxVersion minVersion minVersion maxVersion maxVersion
Constructs a Version Range from the given version Range String param version Range a version range String that specifies a range of versions public Version Range String version Range if version Range null version Range length 0 return version Range version Range trim if version Range char At 0 version Range char At 0 int comma version Range index Of if comma 0 throw new Illegal Argument Exception char last version Range char At version Range length 1 if last last throw new Illegal Argument Exception min Version new Version version Range substring 1 comma version Range char At 0 max Version new Version version Range substring comma 1 version Range length 1 last else min Version new Version version Range max Version Version max Version  VersionRange versionRange versionRange VersionRange versionRange versionRange versionRange versionRange versionRange versionRange charAt versionRange charAt versionRange indexOf IllegalArgumentException versionRange charAt versionRange IllegalArgumentException minVersion versionRange versionRange charAt maxVersion versionRange versionRange minVersion versionRange maxVersion maxVersion
Returns the minimum Version of this Version Range return the minimum Version of this Version Range public Version get Minimum return min Version  VersionRange VersionRange getMinimum minVersion
Returns the maximum Version of this Version Range return the maximum Version of this Version Range public Version get Maximum return max Version  VersionRange VersionRange getMaximum maxVersion
Returns whether the given version is included in this Version Range This will depend on the minimum and maximum versions of this Version Range and the given version param version a version to be tested for inclusion in this Version Range may be code null code return code true code if the version is include code false code otherwise public boolean is Included Version version Version min Required get Minimum if min Required null return true if version null return false Version max Required get Maximum null Version max Version get Maximum int min Check min Required is Inclusive 0 1 int max Check max Required is Inclusive 0 1 return version compare To min Required min Check version compare To max Required max Check  VersionRange VersionRange VersionRange isIncluded minRequired getMinimum minRequired maxRequired getMaximum maxVersion getMaximum minCheck minRequired isInclusive maxCheck maxRequired isInclusive compareTo minRequired minCheck compareTo maxRequired maxCheck
public boolean equals Object object if object instanceof Version Range return false Version Range vr Version Range object if min Version null vr get Minimum null if min Version equals vr get Minimum min Version is Inclusive vr get Minimum is Inclusive if max Version null vr get Maximum null if max Version equals vr get Maximum max Version is Inclusive vr get Maximum is Inclusive return true else return max Version vr get Maximum else return min Version vr get Minimum return false  VersionRange VersionRange VersionRange minVersion getMinimum minVersion getMinimum minVersion isInclusive getMinimum isInclusive maxVersion getMaximum maxVersion getMaximum maxVersion isInclusive getMaximum isInclusive maxVersion getMaximum minVersion getMinimum
public String to String if min Version null return Version empty Version to String if Version max Version equals max Version return min Version to String String Buffer result new String Buffer if min Version null result append min Version is Inclusive result append min Version result append result append max Version if max Version null result append max Version is Inclusive return result to String  toString minVersion emptyVersion toString maxVersion maxVersion minVersion toString StringBuffer StringBuffer minVersion minVersion isInclusive minVersion maxVersion maxVersion maxVersion isInclusive toString

Executes the block of code encapsulated by this runnable in the context of the given object and returns result The result may be code null code param context the context for evaluating the runnable return the result of evaluating the runnable in the given context throws Exception if there is a problem running this runnable 

public interface Entry Locator Returns the URL for the specified properies file and locale The value of null is returned if the properties file could not be found param basename the base name of the properties file to get param locale the locale to use when searching for the properites file return the URL for the properties file or null if one could not be found  EntryLocator

public interface URL Converter Converts a URL that uses a protocol of bundleentry or bundleresource into a URL that uses the file protocol The contents of the URL may be extracted into a cache on the file system in order to get a file URL param url The bundleentry or bundleresource URL to convert into a file URL return The converted file URL or the original URL passed in if it is not a bundleentry or bundleresource URL throws IO Exception if an error occurs during the conversion  URLConverter IOException
Converts a URL that uses a protocol of bundleentry or bundleresource into a URL that uses a local java protocol file jar etc param url The bundleentry or bundleresource URL to convert into a local URL return The converted file URL or the original URL passed in if it is not a bundleentry or bundleresource URL throws IO Exception if an error occurs during the conversion  IOException

Constructs an empty manifest element with no value or attributes protected Manifest Element  ManifestElement
Returns the value of the manifest element The value returned is the complete value up to the first attribute For example the following manifest element p test1 jar test2 jar test3 jar selection filter os name Windows XP p This manifest element has a value of test1 jar test2 jar test3 jar return the value of the manifest element public String get Value return value  getValue
Returns the value components of the manifest element The value components returned are the complete list of value components up to the first attribute For example the folowing manifest element p test1 jar test2 jar test3 jar selection filter os name Windows XP p This manifest element has the value components array test1 jar test2 jar test3 jar Each value component is delemited by a return the String of value components public String get Value Components return value Components  getValueComponents valueComponents
Returns the value for the specified attribute If the attribute has multiple values specified then the last value specified is returned For example the following manifest element p pre elementvalue myattr value1 myattr value2 pre p specifies two values for the attribute key myattr In this case value2 will be returned because it is the last value specified for the attribute myattr param key the attribute key to return the value for return the attribute value or null if the attribute does not exist public String get Attribute String key if attributes null return null Object result attributes get key if result null return null if result instanceof String return String result Array List value List Array List result return the last attribute value return String value List get value List size 1  getAttribute ArrayList valueList ArrayList valueList valueList
Returns an array of values for the specified attribute param key the attribute key to return the values for return the array of attribute values or null if the attribute does not exist public String get Attributes String key if attributes null return null Object result attributes get key if result null return null if result instanceof String return new String String result Array List value List Array List result return String value List to Array new String value List size  getAttributes ArrayList valueList ArrayList valueList toArray valueList
Returns the Enumeration of attribute keys for this manifest element return the Enumeration of attribute keys or null if none exist public Enumeration get Keys if attributes null return null return attributes keys  getKeys
Adds an attribute to this manifest element param key the key of the attribute param value the value of the attribute protected void add Attribute String key String value if attributes null attributes new Hashtable 7 Object cur Value attributes get key if cur Value null Array List new List create a list to contain multiple values if cur Value instanceof Array List new List Array List cur Value else new List new Array List 5 new List add cur Value new List add value attributes put key new List else attributes put key value  addAttribute curValue curValue ArrayList newList curValue ArrayList newList ArrayList curValue newList ArrayList newList curValue newList newList
Parses a manifest header value into an array of Manifest Elements Each Manifest Element returned will have a non null value returned by get Value param header the header name to parse This is only specified to provide error messages when the header value is invalid param value the header value to parse return the array of Manifest Elements that are represented by the header value null will be returned if the value specified is null or if the value does not parse into one or more Manifest Elements throws Bundle Exception if the header value is invalid public static Manifest Element parse Header String header String value throws Bundle Exception if value null return null Vector header Elements new Vector 10 10 Tokenizer tokenizer new Tokenizer value parseloop while true String next tokenizer get Token NON NLS 1 if next null throw new Bundle Exception Msg formatter get String MANIFEST INVALID HEADER EXCEPTION header value NON NLS 1 Array List header Values new Array List String Buffer header Value new String Buffer next header Values add next if Debug DEBUG Debug DEBUG MANIFEST Debug print paser Header next NON NLS 1 char c tokenizer get Char Header values may be a list of separated values Just append them all into one value until the first or while c next tokenizer get Token NON NLS 1 if next null throw new Bundle Exception Msg formatter get String MANIFEST INVALID HEADER EXCEPTION header value NON NLS 1 c tokenizer get Char if c more header Values add next header Value append append next NON NLS 1 if Debug DEBUG Debug DEBUG MANIFEST Debug print next NON NLS 1 found the header value create a manifest Element for it Manifest Element manifest Element new Manifest Element manifest Element value header Value to String manifest Element value Components String header Values to Array new String header Values size now add any attributes for the manifest Element while c String val tokenizer get String NON NLS 1 if val null throw new Bundle Exception Msg formatter get String MANIFEST INVALID HEADER EXCEPTION header value NON NLS 1 if Debug DEBUG Debug DEBUG MANIFEST Debug print next val NON NLS 1 NON NLS 2 try manifest Element add Attribute next val catch Exception e throw new Bundle Exception Msg formatter get String MANIFEST INVALID HEADER EXCEPTION header value e NON NLS 1 c tokenizer get Char if c more next tokenizer get Token NON NLS 1 if next null throw new Bundle Exception Msg formatter get String MANIFEST INVALID HEADER EXCEPTION header value NON NLS 1 c tokenizer get Char header Elements add Element manifest Element if Debug DEBUG Debug DEBUG MANIFEST Debug println NON NLS 1 if c another manifest element continue parseloop if c 0 end of value break parseloop throw new Bundle Exception Msg formatter get String MANIFEST INVALID HEADER EXCEPTION header value NON NLS 1 int size header Elements size if size 0 return null Manifest Element result new Manifest Element size header Elements copy Into result return result  ManifestElements ManifestElement getValue ManifestElements ManifestElements BundleException ManifestElement parseHeader BundleException headerElements getToken BundleException getString MANIFEST_INVALID_HEADER_EXCEPTION ArrayList headerValues ArrayList StringBuffer headerValue StringBuffer headerValues DEBUG_MANIFEST paserHeader getChar getToken BundleException getString MANIFEST_INVALID_HEADER_EXCEPTION getChar headerValues headerValue DEBUG_MANIFEST manifestElement ManifestElement manifestElement ManifestElement manifestElement headerValue toString manifestElement valueComponents headerValues toArray headerValues manifestElement getString BundleException getString MANIFEST_INVALID_HEADER_EXCEPTION DEBUG_MANIFEST manifestElement addAttribute BundleException getString MANIFEST_INVALID_HEADER_EXCEPTION getChar getToken BundleException getString MANIFEST_INVALID_HEADER_EXCEPTION getChar headerElements addElement manifestElement DEBUG_MANIFEST BundleException getString MANIFEST_INVALID_HEADER_EXCEPTION headerElements ManifestElement ManifestElement headerElements copyInto

public interface I Build extends I Writable Adds a new build entry This method can throw a Core Exception if the model is not editable param entry an entry to be added  IBuild IWritable CoreException
void add I Build Entry entry throws Core Exception Returns all the build entries in this object return an array of build entries  IBuildEntry CoreException
I Build Entry get Build Entries Returns the build entry with the specified name param the name of the desired entry return the entry object with the specified name or samp null samp if not found  IBuildEntry getBuildEntries
I Build Entry get Entry String name Removes a build entry This method can throw a Core Exception if the model is not editable param entry an entry to be removed  IBuildEntry getEntry CoreException

public static final String JARS EXTRA CLASSPATH jars extra classpath NON NLS 1 Adds the token to the list of token for this entry This method will throw a Core Exception if the model is not editable param token a name to be added to the list of tokens  JARS_EXTRA_CLASSPATH CoreException
void add Token String token throws Core Exception Returns a model that owns this entry return build properties model  addToken CoreException
I Build Model get Model Returns the name of this entry return the entry name  IBuildModel getModel
String get Name Returns an array of tokens for this entry return array of tokens  getName
Returns true if the provided token exists in this entry return true if the token exists in the entry 
boolean contains String token Removes the token from the list of tokens for this entry This method will throw a Core Exception if the model is not editable param token a name to be removed from the list of tokens  CoreException
void remove Token String token throws Core Exception Changes the name of the token without changing its position in the list This method will throw a Core Exception if the model is not editable param old Token the old token name param new Token the new token name  removeToken CoreException CoreException oldToken newToken
void rename Token String old Token String new Token throws Core Exception Sets the name of this build entry This method will throw a Core Exception if model is not editable param name the new name for the entry  renameToken oldToken newToken CoreException CoreException

public interface I Build Model extends I Model I Model Change Provider Returns the top level model object of this model return a build properties top level model object  IBuildModel IModel IModelChangeProvider
I Build get Build Returns the factory that should be used to create new instance of model objects return the build properties model factory  IBuild getBuild
I Build Model Factory get Factory Returns the location of the file used to create the model return the location of the build properties file or samp null samp if the file is in a workspace  IBuildModelFactory getFactory

public interface I Build Model Factory Creates a new build entry with the provided name return a new build properties entry instance  IBuildModelFactory

public interface I Base Model extends I Adaptable Releases all the data in this model and clears the state A disposed model can be returned to the normal state by reloading  IBaseModel IAdaptable
void dispose Tests if this model has been disposed Disposed model cannot be used until it is loaded reloaded return code true code if the model has been disposed 
boolean is Disposed Tests if this model can be modified Modification of a model that is not editable will result in Core Exception being thrown return code true code if this model can be modified  isDisposed CoreException
boolean is Editable Tests if this model valid When models are loaded from the file they may pass the syntax error checking and load all the model objects However some of the objects may contain invalid values that make the model unusable return code true code only if the model can be safely used in all computations  isEditable

public interface I Editable Tests whether the model marked as editable can be edited Even though a model is generally editable it can me marked as read only because some condition prevents it from changing state for example the underlying resource is locked While read only models can never be changed editable models can go in and out editable state during their life cycle return code true code if model can be modified code false code otherwise  IEditable
public boolean is Editable Tests whether the model has been changed from the last clean state return code true code if the model has been changed and need saving  isEditable
public boolean is Dirty Saves the model into the provided writer The assumption is that the model can be persisted in an ASCII output stream for example an XML file This method should clear the dirty flag when done param writer an object that should be used to write ASCII representation of the model  isDirty
public void save Print Writer writer Sets the dirty flag of the model This method is normally not intended to be used outside the model Most often a dirty model should be saved to clear the flag param dirty a new value for the dirty flag  PrintWriter

public interface I Editable Model extends I Editable Saves the editable model using the mechanism suitable for the concrete model implementation It is responsible for wrapping the code I Editable save Print Writer code operation and providing the print writer  IEditableModel IEditable IEditable PrintWriter

public static final String P ID id NON NLS 1 Returns a unique id of this object return the id of this object  P_ID
public String get Id Sets the id of this I Identifiable to the provided value This method will throw Core Exception if object is not editable param id a new id of this object  getId IIdentifiable CoreException

public interface I Model extends I Base Model Returns a string found in the resource bundle associated with this model for the provided key param key the name to use for bundle lookup return the string for the key in the resource bundle or the key itself if not found  IModel IBaseModel
String get Resource String String key Returns a workspace resource that this model is created from Load reload operations are not directly connected with the resource although they can be In some cases models will load from a buffer an editor document rather than a resource However the buffer will eventually be synced up with this resource p With the caveat of stepped loading all other properties of the underlying resource could be used directly path project etc return a workspace resource file that this model is associated with or samp null samp if the model is not created from a resource  getResourceString
public I Resource get Underlying Resource Tests if this model is loaded and can be used return code true code if the model has been loaded  IResource getUnderlyingResource
boolean is Loaded Tests if this model is in sync with the storage object it was loaded from Models loaded from resources are in sync if underlying resources are in sync Models loaded from files on the file systems are in sync if the time stamp matches the model time stamp return code true code if the model is in sync with the file system  isLoaded
boolean is In Sync Returns the last modification time stamp The model itself does not have the time stamp It is borrowed from the underlying physical object return the time stamp of the underlying physical object  isInSync
long get Time Stamp Loads the model directly from an underlying resource This method does nothing if this model has no underlying resource or if there is a buffer stage between the model and the resource throws Core Exception if errors are encountered during the loading  getTimeStamp CoreException
public void load throws Core Exception Loads the model from the provided input stream This method throws a Core Exception if errors are encountered during the loading Upon succesful load is Loaded should return samp true samp param source an input stream that should be parsed to load the model param out Of Sync if true time stamp will not be updated to maintain out of sync state of the model throws Core Exception if errors are encountered during the loading public void load Input Stream source boolean out Of Sync  CoreException CoreException isLoaded outOfSync CoreException InputStream outOfSync
throws Core Exception Reload is a version of load operation that has the following steps ul li Reset the model li Load the model li Fire world changed event ul Reload operation is used when a model that is already in use is invalidated by a change in the underlying buffer or resource Since we don t know the extent of the change the only safe thing to do is to reparse the buffer to sync up The event that is subsequently fired should be used by listeners to discard all caches and or fully refresh views that shows any portion of the model param source an input stream that should be parsed to load the model param out Of Sync if true time stamp will not be updated to maintain out of sync state of the model throws Core Exception if errors are encountered during the reloading public void reload Input Stream source boolean out Of Sync  CoreException outOfSync CoreException InputStream outOfSync
throws Core Exception Returns whether this model needs to react to changes in source and reconcile them Only model instances used in editors need to perform this task return code true code if this is a reconciling model code false code otherwise  CoreException

int CHANGE 3 Returns the provider that fired this event return the event provider 
public I Model Change Provider get Change Provider Returns an array of model objects that are affected by the change return array of affected objects  IModelChangeProvider getChangeProvider
public Object get Changed Objects Returns a name of the object s property that has been changed if change type is CHANGE return property that has been changed in the model object or samp null samp if type is not CHANGE or if more than one property has been changed  getChangedObjects
public String get Changed Property When model change is of type samp CHANGE samp this method is used to obtain the old value of the property before the change return the old value of the changed property  getChangedProperty
public Object get Old Value When model change is of type samp CHANGE samp this method is used to obtain the new value of the property after the change return the new value of the changed property  getOldValue
public Object get New Value Returns the type of change that occured in the model one of samp INSERT samp samp REMOVE samp samp CHANGE samp or samp WORLD CHANGED samp return type of change  getNewValue WORLD_CHANGED

public interface I Model Changed Listener Called when there is a change in the model this listener is registered with param event a change event that describes the kind of the model change  IModelChangedListener

public interface I Model Change Provider Adds the listener to the list of listeners that will be notified on model changes param listener a model change listener to be added  IModelChangeProvider
public void add Model Changed Listener I Model Changed Listener listener Delivers change event to all the registered listeners param event a change event that will be passed to all the listeners  addModelChangedListener IModelChangedListener
public void fire Model Changed I Model Changed Event event Notifies listeners that a property of a model object changed This is a utility method that will create a model event and fire it param object an affected model object param property name of the property that has changed param old Value the old value of the property param new Value the new value of the property public void fire Model Object Changed Object object String property  fireModelChanged IModelChangedEvent oldValue newValue fireModelObjectChanged
Object old Value Object new Value Takes the listener off the list of registered change listeners param listener a model change listener to be removed  oldValue newValue

public interface I Model Provider Registers a listener that will be notified about changes in the managed models param listener the listener that will be registered  IModelProvider
void add Model Provider Listener I Model Provider Listener listener Returns the model for the provided file resource param file the file resource we need the model for return the object that represents a structured representation of the file content  addModelProviderListener IModelProviderListener
public I Model get Model I File file Deregisters a listener from notification param listener the listener to be deregistered  IModel getModel IFile

int MODELS CHANGED 0x4 Returns the models that are added return the models that have been added or an empty array  MODELS_CHANGED
I Model get Added Models Returns the models that are removed return the models that have been removed or an empty array  IModel getAddedModels
I Model get Removed Models Returns the models that has changed return the models that has changed or an empty array  IModel getRemovedModels
I Model get Changed Models Returns the combination of flags indicating type of event In case of multiple changes flags are O Red together a combination of MODEL CHANGED MODEL ADDED MODEL REMOVED return the model change type  IModel getChangedModels ORed MODEL_CHANGED MODEL_ADDED MODEL_REMOVED
int get Event Types Returns the object that fired this event Object get Event Source  getEventTypes getEventSource

public interface I Model Provider Listener Notifies the listener that models have been changed in the model provider param event the event that specifies the type of change  IModelProviderListener

public interface I Source Object Returns the line in the source file where the source representation of this object starts or 1 if not known return the first line in the source file  ISourceObject
public int get Start Line Returns the line in the source file where the source representation of this object stops or 1 if not known return the last line in the source file  getStartLine

public interface I Writable Writes the ASCII representation of the writable into the provider writer The writable should use the provided indent to write the stream starting from the specified column number Indent string should be written to the writer after every new line param indent a string that should be added after each new line to maintain desired horizontal alignment param writer a writer to be used to write this object s textual representation  IWritable

private String changed Property The constructor of the event param provider the change provider param type the event type param objects the changed objects param changed Property or samp null samp if not applicable public Model Changed Event I Model Change Provider provider int type Object objects String changed Property this type type this provider provider this changed Objects objects this changed Property changed Property  changedProperty changedProperty ModelChangedEvent IModelChangeProvider changedProperty changedObjects changedProperty changedProperty
A costructor that should be used for changes of object properties param provider the event provider param object affected object param changed Property changed property of the affected object param old Value the value before the change param new Value the value after the change public Model Changed Event I Model Change Provider provider Object object String changed Property Object old Value Object new Value this type CHANGE this provider provider this changed Objects new Object object this changed Property changed Property this old Value old Value this new Value new Value  changedProperty oldValue newValue ModelChangedEvent IModelChangeProvider changedProperty oldValue newValue changedObjects changedProperty changedProperty oldValue oldValue newValue newValue
see I Model Changed Event get Change Provider public I Model Change Provider get Change Provider return provider  IModelChangedEvent getChangeProvider IModelChangeProvider getChangeProvider
see I Model Changed Event get Changed Objects public Object get Changed Objects return changed Objects  IModelChangedEvent getChangedObjects getChangedObjects changedObjects
see I Model Changed Event get Changed Property public String get Changed Property return changed Property  IModelChangedEvent getChangedProperty getChangedProperty changedProperty
The old property value return the value before the change public Object get Old Value return old Value  getOldValue oldValue
The new property value return the value after the change public Object get New Value return new Value  getNewValue newValue
see I Model Changed Event get Changed Type public int get Change Type return type  IModelChangedEvent getChangedType getChangeType

String P EXTENSION ORDER extension order NON NLS 1 Adds a new extension to this object This method will throw a Core Exception if model is not editable param extension the extension object  P_EXTENSION_ORDER extension_order CoreException
void add I Plugin Extension extension throws Core Exception param extension org eclipse pde ui model plugin I Plugin Extension void add I Plugin Extension Point extension throws Core Exception  IPluginExtension CoreException IPluginExtension IPluginExtensionPoint CoreException
void add I Plugin Extension Point extension throws Core Exception Returns extension points defined in this object return an array of extension point objects  IPluginExtensionPoint CoreException
I Plugin Extension Point get Extension Points Returns extensions defined in this object return an array of extension objects  IPluginExtensionPoint getExtensionPoints
I Plugin Extension get Extensions Removes an extension from this object This method will throw a Core Exception if the model is not editable param extension the extension object  IPluginExtension getExtensions CoreException
void remove I Plugin Extension extension throws Core Exception Removes an extension point from this object This method will throw a Core Exception if the model is not editable param extension Point the extension point object  IPluginExtension CoreException CoreException extensionPoint
void remove I Plugin Extension Point extension Point throws Core Exception Swaps the positions of the provided extensions in the list of extensions param e1 the first extension object param e2 the second extension object  IPluginExtensionPoint extensionPoint CoreException
void swap I Plugin Extension e1 I Plugin Extension e2 throws Core Exception Returns the position of the extension in the receiver param e the extension return the 0 based index of the extension in the receiver  IPluginExtension IPluginExtension CoreException

public interface I Extensions Model Factory Creates a new attribute instance for the provided element param element the parent element return the new attribute instance  IExtensionsModelFactory
I Plugin Attribute create Attribute I Plugin Element element Creates a new element instance for the provided parent param parent the parent element return the new element instance  IPluginAttribute createAttribute IPluginElement
I Plugin Element create Element I Plugin Object parent Creates a new extension instance return the new extension instance  IPluginElement createElement IPluginObject
I Plugin Extension create Extension Creates a new extension point instance return a new extension point  IPluginExtension createExtension

String P RULE match NON NLS 1 Returns the id of the plug in that is the target of this fragment return target plug in id  P_RULE
String get Plugin Id Returns the version of the plug in that is the target of this fragment return target plug in version  getPluginId
String get Plugin Version Returns an optional version match rule as defined in I Match Rule interface see I Match Rule  getPluginVersion IMatchRule IMatchRule
int get Rule Sets the id of the plug in that will be the target of this fragment param id the id of the referenced plug in exception org eclipse core runtime Core Exception attempts to modify a read only fragment will result in an exception  getRule CoreException
void set Plugin Id String id throws Core Exception Sets the version of the plug in that will be the target of this fragment param version the version of the referenced version exception org eclipse core runtime Core Exception attempts to modify a read only fragment will result in an exception  setPluginId CoreException CoreException
void set Plugin Version String version throws Core Exception Sets the optional version match rule as defined in I Match Rules This rule will be used when attempting to match the referenced plug in version param rule the match rule to be used when locating the referenced the plug in exception org eclipse core runtime Core Exception attempts to modify a read only fragment will result in an exception  setPluginVersion CoreException IMatchRules CoreException

public interface I Fragment Model extends I Plugin Model Base Returns a top level model object return a root model instance  IFragmentModel IPluginModelBase

Returns a plug in class name return plug in class name or samp null samp if not specified 
Sets the name of the plug in class This method will throw a Core Exception if the model is not editable param class Name the new class name  CoreException className

String P VALUE value NON NLS 1 Returns the value of this attribute return the string value of the attribute  P_VALUE
String get Value Sets the value of this attribute This method will throw a Core Exeption if the model is not editable param value the new attribute value  getValue CoreExeption

String P SCHEMA VERSION schema version NON NLS 1 Adds a new library to this plugin This method will throw a Core Exception if model is not editable param library the new library object  P_SCHEMA_VERSION CoreException
Adds a new plug in import to this plugin This method will throw a Core Exception if model is not editable param plugin Import the new import object  CoreException pluginImport
void add I Plugin Import plugin Import throws Core Exception Removes an import from the plugin This method will throw a Core Exception if the model is not editable param import the import object  IPluginImport pluginImport CoreException CoreException
void remove I Plugin Import plugin Import throws Core Exception Returns libraries referenced in this plug in return an array of libraries  IPluginImport pluginImport CoreException
I Plugin Library get Libraries Returns imports defined in this plug in return an array of import objects  IPluginLibrary getLibraries
I Plugin Import get Imports Returns a name of the plug in provider return plug in provider name  IPluginImport getImports
String get Provider Name Returns this plug in s version return the version of the plug in  getProviderName
String get Version Removes a library from the plugin This method will throw a Core Exception if the model is not editable param library the library object  getVersion CoreException
void remove I Plugin Library library throws Core Exception Sets the name of the plug in provider This method will throw a Core Exception if the model is not editable param provider Name the new provider name  IPluginLibrary CoreException CoreException providerName
void set Provider Name String provider Name throws Core Exception Sets the version of the plug in This method will throw a Core Exception if the model is not editable param version the new plug in version  setProviderName providerName CoreException CoreException
void set Version String version throws Core Exception Swaps the positions of the provided libraries in the list of libraries Libraries are looked up by the class loader in the order of declaration If two libraries contain classes with the same name library order will determine which one is encountered first param l1 the first library object param l2 the second library object  setVersion CoreException
Swaps the positions of the plug ins provided in in the dependency list This order is the one used used by the classloader when loading classes param l1 the first library object param l2 the second library object 
Returns version of the manifest grammar return version of the manifest grammer or samp null samp 
String get Schema Version Sets the R3 0 compatibility flag param schema Version version of the manifest grammar  getSchemaVersion schemaVersion

String P ATTRIBUTE attribute NON NLS 1 Creates an identical copy of this XML element The new element will share the same model and the parent return a copy of this element  P_ATTRIBUTE
I Plugin Element create Copy Returns an attribute object whose name matches the provided name param name the name of the attribute return the attribute object or samp null samp if not found  IPluginElement createCopy
I Plugin Attribute get Attribute String name Returns all attributes currently defined in this element return an array of attribute objects that belong to this element  IPluginAttribute getAttribute
I Plugin Attribute get Attributes Returns the number of attributes in this element return number of attributes defined in this element  IPluginAttribute getAttributes
int get Attribute Count Returns the body text of this element return body text of this element or samp null samp if not set  getAttributeCount
String get Text Returns the schema for this element p This information is exposed here as implementation side effect and should not be used by clients return the schema for this element or samp null samp if not found  getText
Object get Element Info Sets the attribute with the provided name to the provided value If attribute object is not found a new one will be created and its value set to the provided value This method will throw a Core Exception if the model is not editable param name the name of the attribute param value the value to be set  getElementInfo CoreException
void set Attribute String name String value throws Core Exception Sets the body text of this element to the provided value This method will throw a Core Exception if the model is not editable param text the new body text of this element  setAttribute CoreException CoreException

String P POINT point NON NLS 1 Returns the full Id of the extension point that this extension is plugged into  P_POINT
String get Point Returns the schema for the extension point that this extension is plugged into or samp null samp if not found p This method is an implementation detail schema object is not needed for clients outside PDE and should not be used  getPoint
Object get Schema Sets the value of the extension point Id This method will throw a Core Exception if this model is not editable param point the new extension point Id  getSchema CoreException

String P SCHEMA schema NON NLS 1 Returns the full extension point Id that is composed as plugin Id point Id This full Id will be used by extensions to reference this extension point return a full extension point Id  P_SCHEMA pluginId pointId
String get Full Id Returns the name of the extension point XML schema that defines this extension point return XML extension point schema file name  getFullId
String get Schema Sets the plug in relative name of the extension point schema file that describes this extension point This method will throw a Core Exception if the model is not editable  getSchema CoreException

String P OPTIONAL optional NON NLS 1 Tests whether the imported plug in is reexported for plug ins that will use this plug in return true if the required plug in libraries are reexported  P_OPTIONAL
boolean is Reexported Tests whether this import is optional Optional imports will not create an error condition when they cannot be resolved return true if this import is optional  isReexported
boolean is Optional Sets whether the libraries of the required plug in will be reexported This method will throw a Core Exception if the model is not editable param value true if reexporting is desired  isOptional CoreException
void set Reexported boolean value throws Core Exception Sets whether this import is optional Optional imports will not create an error condition when they cannot be resolved param value true if import is optional  setReexported CoreException

String RESOURCE resource NON NLS 1 Returns optional context filters that should be applied to calculate what classes to export from this library return an array of content filter strings 
Returns optional package prefixes that can be used to make library lookup faster return an array of package prefixes 
String get Packages Returns true if this library contains types that will be visible to other plug ins return true if there are exported types in the library  getPackages
boolean is Exported Returns true if all the types in this library will be visible to other plug ins return true if all the types are exported in the library  isExported
boolean is Fully Exported Returns a type of this library CODE or RESOURCE String get Type  isFullyExported getType
String get Type Sets the optional content filters for this library This method may throw a Core Exception if the model is not editable param filters an array of filter strings  getType CoreException
Export a particular package in a library This method may throw a Core Exception if the model is not editable param filter a package name  CoreException
Remove a package from the export list This method may throw a Core Exception if the model is not editable param filter a package name  CoreException
Sets the optional package prefixes for this library This method may throw a Core Exception if the model is not editable param packages an array of package prefixes  CoreException
void set Packages String packages throws Core Exception Sets whether types in this library will be visible to other plug ins This method may throw a Core Exception if the model is not editable  setPackages CoreException CoreException
void set Exported boolean value throws Core Exception Sets the library type Must be either CODE or RESOURCE throws Core Exception if the model is not editable  setExported CoreException CoreException

public interface I Plugin Model extends I Plugin Model Base Returns a top level model object return a root model instance  IPluginModel IPluginModelBase

public interface I Plugin Model Base extends I Shared Extensions Model I Model Change Provider return org eclipse pde ui model plugin I Plugin Base I Plugin Base create Plugin Base  IPluginModelBase ISharedExtensionsModel IModelChangeProvider IPluginBase IPluginBase createPluginBase
I Plugin Base create Plugin Base Returns an associated build properties model that works in conjunction with this model return the matching plugin jars model  IPluginBase createPluginBase
I Build Model get Build Model Returns a top level model object Equivalent to calling pre get Plugin Base true pre return a top level model object representing a plug in or a fragment  IBuildModel getBuildModel getPluginBase
I Plugin Base get Plugin Base Returns a top level model object param create If Missing if true root model object will be created if not defined return a top level model object  IPluginBase getPluginBase createIfMissing
I Plugin Base get Plugin Base boolean create If Missing Returns samp true samp if this model is currently enabled return true if the model is enabled  IPluginBase getPluginBase createIfMissing
boolean is Enabled Tests if this model is for the plug in fragment return code true code if the model is for the fragment code false code otherwise  isEnabled
boolean is Fragment Model Sets the enable state of the model param enabled the new enable state  isFragmentModel
void set Enabled boolean enabled Returns the factory that can be used to create new objects for this model return the plug in model factory  setEnabled
I Plugin Model Factory get Plugin Factory Returns the location where property file containing translations of names in this model can be found return the location of the property file with translations  IPluginModelFactory getPluginFactory
URL getNL Lookup Location Returns the bundle description of the plug in in case the plug in uses the new OS Gi bundle layout return bundle description if this is an OS Gi plug in or code null code if the plug in is in a classic format since 3 0  getNLLookupLocation OSGi OSGi
Bundle Description get Bundle Description Associates the bundle description of the plug in with this model in case the plug in uses the new OS Gi bundle layout param description bundle description to associate with this model since 3 0  BundleDescription getBundleDescription OSGi

public interface I Plugin Model Factory extends I Extensions Model Factory Creates a new plug in import return a new plug in import instance  IPluginModelFactory IExtensionsModelFactory
I Plugin Import create Import Creates a new library instance return a new library instance  IPluginImport createImport

String P NAME name NON NLS 1 Returns the model that owns this object return the model instance  P_NAME
I Shared Plugin Model get Model I Plugin Model Base get Plugin Model  ISharedPluginModel getModel IPluginModelBase getPluginModel
I Plugin Model Base get Plugin Model Returns the name of this model object return the object name  IPluginModelBase getPluginModel
Returns true if this object is currently part of a model It is useful to ignore modification events of objects that have not yet being added to the model or if they have been removed 
Set the value indicating whether the object is currently part of a model It is useful to ignore modification events of objects that have not yet being added to the model or if they have been removed 
Returns the translated name of this model object using the result of get Name call as a resource key return the translated name or the original name if not found  getName
Returns the parent of this model object return the object s parent 
I Plugin Object get Parent Returns the top level model object return the top level model object  IPluginObject getParent
I Plugin Base get Plugin Base Returns a string by locating the provided key in the resource bundle associated with the model param key the name to use for resource bundle lookup return value in the resource bundle for the provided key or the key itself if not found  IPluginBase getPluginBase
String get Resource String String key Chances the name of this model object This method may throw a Core Exception if the model is not editable param name the new object name  getResourceString CoreException
void set Name String name throws Core Exception Returns samp true samp if this object has all the required attributes set samp false samp otherwise return samp true samp if all the required attributes are set  setName CoreException

String P SIBLING ORDER sibling order NON NLS 1 Adds a child object at the specified index This method may throw a Core Exception if the model is not editable param index the location of the child param child the object to add  P_SIBLING_ORDER sibling_order CoreException
void add int index I Plugin Object child throws Core Exception Adds a child object This method may throw a Core Exception if the model is not editable param child the object to add  IPluginObject CoreException CoreException
void add I Plugin Object child throws Core Exception Returns the number of children currently owned by this parent return the number of children  IPluginObject CoreException
Returns the position of the child in this parent param child a child of this parent return a 0 based index of the child 
int get Index Of I Plugin Object child Swaps the position of of the provided siblings in the parent param child1 the first child param child2 the second child throws Core Exception thrown if the model is not editable  getIndexOf IPluginObject CoreException
void swap I Plugin Object child1 I Plugin Object child2 throws Core Exception Returns the children owned by this parent return an array of children  IPluginObject IPluginObject CoreException
I Plugin Object get Children Removes a child object This method may throw a Core Exception if the model is not editable param child the object to remove  IPluginObject getChildren CoreException

String P VERSION version NON NLS 1 Returns the required match for the imported plug in The choices are defined in I Match Rules interface see I Match Rules return the desired type of the import plug in match  P_VERSION IMatchRules IMatchRules
int get Match Returns the required version of the plug in return required version or samp null samp if not set  getMatch
String get Version Sets the match type for the require plug in This method will throw a Core Exception if the model is not editable see I Match Rules param match the desired match type  getVersion CoreException IMatchRules
void set Match int match throws Core Exception Sets the desired version of the required plug in This method will throw a Core Exception if the model is not editable param version the required import plug in version  setMatch CoreException CoreException

public interface I Shared Extensions Model extends I Shared Plugin Model Returns a top level model object Equivalent to calling pre get Plugin Base true pre return a top level model object representing a plug in or a fragment  ISharedExtensionsModel ISharedPluginModel getPluginBase
I Extensions get Extensions Returns a top level model object param create If Missing if true root model object will be created if not defined return a top level model object  IExtensions getExtensions createIfMissing

public interface I Shared Plugin Model extends I Model I Model Change Provider Returns a factory object that should be used to create new instances of the model objects  ISharedPluginModel IModel IModelChangeProvider
I Extensions Model Factory get Factory Returns a location of the file that was used to create this model This property is used only for external models return a location of the external model or samp null samp if the model is created from a resource  IExtensionsModelFactory getFactory

private I Project project public Base Project super  IProject BaseProject
protected void add To Build Spec String builderID throws Core Exception I Project Description description get Project get Description I Command builder Command get Builder Command description builderID if builder Command null Add a new build spec I Command command description new Command command set Builder Name builderID set Builder Command description command  addToBuildSpec CoreException IProjectDescription getProject getDescription ICommand builderCommand getBuilderCommand builderCommand ICommand newCommand setBuilderName setBuilderCommand
private I Command get Builder Command I Project Description description String builder Id throws Core Exception I Command commands description get Build Spec for int i 0 i commands length i if commands i get Builder Name equals builder Id return commands i return null  ICommand getBuilderCommand IProjectDescription builderId CoreException ICommand getBuildSpec getBuilderName builderId
public I Project get Project return project  IProject getProject
protected I Workspace get Workspace return PDE get Workspace  IWorkspace getWorkspace getWorkspace
protected void remove From Build Spec String builderID throws Core Exception I Project Description description get Project get Description I Command commands description get Build Spec for int i 0 i commands length i if commands i get Builder Name equals builderID I Command new Commands new I Command commands length 1 System arraycopy commands 0 new Commands 0 i System arraycopy commands i 1 new Commands i commands length i 1 description set Build Spec new Commands return  removeFromBuildSpec CoreException IProjectDescription getProject getDescription ICommand getBuildSpec getBuilderName ICommand newCommands ICommand newCommands newCommands setBuildSpec newCommands
private void set Builder Command I Project Description description I Command new Command throws Core Exception I Command old Commands description get Build Spec I Command old Builder Command get Builder Command description new Command get Builder Name I Command new Commands if old Builder Command null Add a build spec after other builders new Commands new I Command old Commands length 1 System arraycopy old Commands 0 new Commands 0 old Commands length new Commands old Commands length new Command else for int i 0 max old Commands length i max i if old Commands i old Builder Command old Commands i new Command break new Commands old Commands Commit the spec change into the project description set Build Spec new Commands get Project set Description description null  setBuilderCommand IProjectDescription ICommand newCommand CoreException ICommand oldCommands getBuildSpec ICommand oldBuilderCommand getBuilderCommand newCommand getBuilderName ICommand newCommands oldBuilderCommand newCommands ICommand oldCommands oldCommands newCommands oldCommands newCommands oldCommands newCommand oldCommands oldCommands oldBuilderCommand oldCommands newCommand newCommands oldCommands setBuildSpec newCommands getProject setDescription
public void set Project I Project project this project project  setProject IProject

public static List get Config Infos return config Infos  getConfigInfos configInfos
Starting point for script generation See subclass implementations for individual comments throws Core Exception  CoreException
Return a string with the given property name in the format pre property Name pre param property Name the name of the property return String public String get Property Format String property Name String Buffer sb new String Buffer sb append PROPERTY ASSIGNMENT PREFIX sb append property Name sb append PROPERTY ASSIGNMENT SUFFIX return sb to String  propertyName propertyName getPropertyFormat propertyName StringBuffer StringBuffer PROPERTY_ASSIGNMENT_PREFIX propertyName PROPERTY_ASSIGNMENT_SUFFIX toString
public static void set Config Info String spec throws Core Exception config Infos clear String configs Utils get Array From String With Blank spec NON NLS 1 config Infos new Array List configs length String os new String configs length String ws new String configs length String archs new String configs length for int i 0 i configs length i String config Elements Utils get Array From String With Blank configs i NON NLS 1 if config Elements length 3 I Status error new Status I Status ERROR IPDE Build Constants PI PDEBUILD IPDE Build Constants EXCEPTION CONFIG FORMAT Policy bind error config Wrong Format configs i null NON NLS 1 throw new Core Exception error Config a Config new Config configs i NON NLS 1 if a Config equals Config generic Config config Infos add Config generic Config else config Infos add a Config create a list of all ws os and arch to feed the Site Manager os i a Config get Os ws i a Config get Ws archs i a Config get Arch Site Manager setOS Utils get String From Array os NON NLS 1 Site Manager setWS Utils get String From Array ws NON NLS 1 Site Manager setOS Arch Utils get String From Array archs NON NLS 1  setConfigInfo CoreException configInfos getArrayFromStringWithBlank configInfos ArrayList configElements getArrayFromStringWithBlank configElements IStatus IStatus IPDEBuildConstants PI_PDEBUILD IPDEBuildConstants EXCEPTION_CONFIG_FORMAT configWrongFormat CoreException aConfig aConfig genericConfig configInfos genericConfig configInfos aConfig SiteManager aConfig getOs aConfig getWs aConfig getArch SiteManager getStringFromArray SiteManager getStringFromArray SiteManager setOSArch getStringFromArray
public void set Working Directory String location working Directory location  setWorkingDirectory workingDirectory
Return the file system location for the given plug in model object param model the plug in return String throws Core Exception if a valid file system location could not be constructed public String get Location Bundle Description model throws Core Exception return model get Location  CoreException getLocation BundleDescription CoreException getLocation
public static Properties read Properties String location String file Name int error Level throws Core Exception Properties result new Properties File file new File location file Name try Input Stream input new Buffered Input Stream new File Input Stream file try result load input finally input close catch File Not Found Exception e if error Level I Status INFO error Level I Status OK String message Policy bind exception missing File file to String NON NLS 1 Bundle Helper get Default get Log log new Status error Level PI PDEBUILD EXCEPTION READING FILE message null catch IO Exception e String message Policy bind exception reading File file to String NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION READING FILE message e return result  readProperties fileName errorLevel CoreException fileName InputStream BufferedInputStream FileInputStream FileNotFoundException errorLevel IStatus errorLevel IStatus missingFile toString BundleHelper getDefault getLog errorLevel PI_PDEBUILD EXCEPTION_READING_FILE IOException readingFile toString CoreException IStatus PI_PDEBUILD EXCEPTION_READING_FILE
public void open Script String script Location String script Name throws Core Exception if script null return try Output Stream script Stream new Buffered Output Stream new File Output Stream script Location script Name NON NLS 1 try script new Ant Script script Stream catch IO Exception e try script Stream close String message Policy bind exception writing File script Location script Name NON NLS 1 NON NLS 2 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING FILE message e catch IO Exception e1 Ignored catch File Not Found Exception e String message Policy bind exception writing File script Location script Name NON NLS 1 NON NLS 2 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING FILE message e  openScript scriptLocation scriptName CoreException OutputStream scriptStream BufferedOutputStream FileOutputStream scriptLocation scriptName AntScript scriptStream IOException scriptStream writingFile scriptLocation scriptName CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE IOException FileNotFoundException writingFile scriptLocation scriptName CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE
public void close Script script close  closeScript
public void set BuildingOS Gi boolean b buildingOS Gi b  setBuildingOSGi buildingOSGi
public static boolean is BuildingOS Gi return buildingOS Gi  isBuildingOSGi buildingOSGi
public static String get Working Directory return working Directory  getWorkingDirectory workingDirectory
public static String get Default Output Format return zip NON NLS 1  getDefaultOutputFormat
public static void set Output Format String format output Format format  setOutputFormat outputFormat
public static boolean get Default Embedded Source return false  getDefaultEmbeddedSource
public static void set Embedded Source boolean embed embedded Source embed  setEmbeddedSource embeddedSource
public static boolean get Force Update Jar Format return false  getForceUpdateJarFormat
public static void set Force Update Jar boolean force force Update Jar Format force  setForceUpdateJar forceUpdateJarFormat
public static String get Default Config Infos return NON NLS 1  getDefaultConfigInfos
public static boolean get Default BuildingOS Gi return true  getDefaultBuildingOSGi

Constructor for the class param out the output stream to write the script to throws IO Exception public Ant Script Output Stream out throws IO Exception this out out output new Print Writer new Output Stream Writer out UTF8 NON NLS 1 output println XML PROLOG  IOException AntScript OutputStream IOException PrintWriter OutputStreamWriter XML_PROLOG
Close the output stream public void close output flush output close introduced because sometimes the file was not closed try out close catch IO Exception e e print Stack Trace  IOException printStackTrace
Print an code antcall code task to the script This calls Ant on the given target which is located within the same build file param target the target of the ant call param inherit All code true code if the parameters should be pass to the called target param params table of parameters for the call public void print Ant Call Task String target String inherit All Map params print Tab output print antcall NON NLS 1 print Attribute target target true NON NLS 1 print Attribute inherit All inherit All false NON NLS 1 if params null output println NON NLS 1 else output println NON NLS 1 indent Set entries params entry Set for Iterator iter entries iterator iter has Next Map Entry entry Map Entry iter next print Param String entry get Key String entry get Value indent print Tab output println antcall NON NLS 1  inheritAll printAntCallTask inheritAll printTab printAttribute printAttribute inheritAll inheritAll entrySet hasNext printParam getKey getValue printTab
Print a code jar code Ant task to this script This jars together a group of files into a single file param jar File the destination file name param basedir the base directory public void print Jar Task String jar File String basedir print Tab output print jar NON NLS 1 print Attribute jarfile jar File true NON NLS 1 print Attribute basedir basedir false NON NLS 1 output println NON NLS 1  jarFile printJarTask jarFile printTab printAttribute jarFile printAttribute
Print the code available code Ant task to this script This task sets a property value if the given file exists at runtime param property the property to set param file the file to look for public void print Available Task String property String file print Tab output print available NON NLS 1 print Attribute property property true NON NLS 1 print Attribute file file false NON NLS 1 output println NON NLS 1  printAvailableTask printTab printAttribute printAttribute
Print an code ant code task to this script This calls Ant on the specified target contained in the specified Ant file with the given parameters param antfile the name of the Ant file which contains the target to run param dir the basedir for the target param target the name of the target param output Param filename to write the output to param inherit All code true code if the parameters should be passed on to the ant target param properties the table of properties public void print Ant Task String antfile String dir String target String output Param String inherit All Map properties print Tab output print ant NON NLS 1 print Attribute antfile antfile false NON NLS 1 print Attribute dir dir false NON NLS 1 print Attribute target target false NON NLS 1 print Attribute output output Param false NON NLS 1 print Attribute inherit All inherit All false NON NLS 1 if properties null output println NON NLS 1 else output println NON NLS 1 indent Set entries properties entry Set for Iterator iter entries iterator iter has Next Map Entry entry Map Entry iter next print Property String entry get Key String entry get Value indent print Tab output println ant NON NLS 1  outputParam inheritAll printAntTask outputParam inheritAll printTab printAttribute printAttribute printAttribute printAttribute outputParam printAttribute inheritAll inheritAll entrySet hasNext printProperty getKey getValue printTab
Print a code zip code task to this script param zipfile the destination file name param basedir the source directory to start the zip param files Only code true code if the resulting zip file should contain only files and not directories param update ndicates whether to update or overwrite the destination file if it already exists param file Sets the inclusion exclusion rules to use when zipping public void print Zip Task String zipfile String basedir boolean files Only boolean update File Set file Sets print Tab output print zip NON NLS 1 print Attribute zipfile zipfile true NON NLS 1 print Attribute basedir basedir false NON NLS 1 print Attribute filesonly files Only true false true NON NLS 1 NON NLS 2 NON NLS 3 print Attribute whenempty skip true NON NLS 1 NON NLS 2 print Attribute update update true false true NON NLS 1 NON NLS 2 NON NLS 3 if file Sets null output println NON NLS 1 else output println NON NLS 1 indent for int i 0 i file Sets length i if file Sets i null file Sets i print this indent print Tab output println zip NON NLS 1  filesOnly fileSets printZipTask filesOnly FileSet fileSets printTab printAttribute printAttribute printAttribute filesOnly printAttribute printAttribute fileSets fileSets fileSets fileSets printTab
public void print Tar Task String zipfile String basedir boolean files Only boolean update File Set file Sets print Tab output print tar NON NLS 1 print Attribute destfile zipfile true NON NLS 1 print Attribute basedir basedir false NON NLS 1 print Attribute compression gzip true NON NLS 1 NON NLS 2 if file Sets null output println NON NLS 1 else output println NON NLS 1 indent for int i 0 i file Sets length i if file Sets i null file Sets i print this indent print Tab output println tar NON NLS 1  printTarTask filesOnly FileSet fileSets printTab printAttribute printAttribute printAttribute fileSets fileSets fileSets fileSets printTab
Print an code arg code element to the Ant file param line protected void print Arg String line print Tab output print arg NON NLS 1 print Attribute line line false NON NLS 1 output println NON NLS 1  printArg printTab printAttribute
Print the given string to the Ant script param string the string to write to the file public void print String String string print Tab output println string  printString printTab
Print the given comment to the Ant script param comment the comment to write out public void print Comment String comment print Tab output print NON NLS 1 output print comment output println NON NLS 1  printComment printTab
Add the given name value attribute pair to the script Do not write the attribute if the value is code null code unless a code true code is specified indicating that it is mandatory param name the name of the attribute param value the value of the attribute or code null code param mandatory code true code if the attribute should be printed even if it is code null code protected void print Attribute String name String value boolean mandatory if mandatory value null value NON NLS 1 if value null output print NON NLS 1 output print name output print NON NLS 1 print Quotes value  printAttribute printQuotes
Print a code copy code task to the script The source file is specified by the code file code parameter The destination directory is specified by the code todir code parameter param file the source file param todir the destination directory param file Sets the inclusion exclusion rules to use when copying public void print Copy Task String file String todir File Set file Sets boolean fail On Error print Tab output print copy NON NLS 1 print Attribute file file false NON NLS 1 print Attribute todir todir false NON NLS 1 print Attribute failonerror fail On Error true false true NON NLS 1 NON NLS 2 NON NLS 3 if file Sets null output println NON NLS 1 else output println NON NLS 1 indent for int i 0 i file Sets length i file Sets i print this indent print Tab output println copy NON NLS 1  fileSets printCopyTask FileSet fileSets failOnError printTab printAttribute printAttribute printAttribute failOnError fileSets fileSets fileSets printTab
Print a code copy code tak to the script The source file is specified by the code file code parameter The destination file is specified by the code to File code parameter param file the source file param to File the destination file public void print Copy File Task String file String to File boolean overwrite print Tab output print copy NON NLS 1 print Attribute file file false NON NLS 1 print Attribute tofile to File false NON NLS 1 print Attribute overwrite overwrite true null false NON NLS 1 NON NLS 2 output println NON NLS 1  toFile toFile printCopyFileTask toFile printTab printAttribute printAttribute toFile printAttribute
Print a code delete code task to the Ant script At least one of code dir code or code file code is required unless some code file Sets code are present param dir the name of the directory to delete param file the name of the file to delete param file Sets the specification for the files to delete public void print Delete Task String dir String file File Set file Sets print Tab output print delete NON NLS 1 print Attribute dir dir false NON NLS 1 print Attribute file file false NON NLS 1 if file Sets null output println NON NLS 1 else output println NON NLS 1 indent for int i 0 i file Sets length i file Sets i print this indent print Tab output println delete NON NLS 1  fileSets fileSets printDeleteTask FileSet fileSets printTab printAttribute printAttribute fileSets fileSets fileSets printTab
Print an code exec code task to the Ant script param executable the program to execute param dir the working directory for the executable param line Args the arguments for the executable public void print Exec Task String executable String dir List line Args String os print Tab output print exec NON NLS 1 print Attribute executable executable true NON NLS 1 print Attribute dir dir false NON NLS 1 print Attribute os os false NON NLS 1 if line Args null line Args size 0 output println NON NLS 1 else output println NON NLS 1 indent for int i 0 i line Args size i print Arg String line Args get i indent print Tab output println exec NON NLS 1  lineArgs printExecTask lineArgs printTab printAttribute printAttribute printAttribute lineArgs lineArgs lineArgs printArg lineArgs printTab
Print a code mkdir code task to the Ant script param dir the name of the directory to create public void print Mkdir Task String dir print Tab output print mkdir NON NLS 1 print Attribute dir dir false NON NLS 1 output println NON NLS 1  printMkdirTask printTab printAttribute
Print an code echo code task to the Ant script param message the message to echo to the output public void print Echo Task String message print Tab output print echo NON NLS 1 print Attribute message message true NON NLS 1 output println NON NLS 1  printEchoTask printTab printAttribute
Print a code cvs code task to the Ant script param command the CVS command to run param cvs Root value for the CVSROOT variable param dest the destination directory for the checked out resources param module the module name to check out param tag the tag of the module to check out param quiet whether or not to print informational messages to the output param pass File the name of the password file public void printCVS Task String command String cvs Root String dest String module String tag String quiet String pass File print Tab output print cvs NON NLS 1 print Attribute command command false NON NLS 1 print Attribute cvs Root cvs Root false NON NLS 1 print Attribute dest dest false NON NLS 1 print Attribute package module false NON NLS 1 print Attribute tag tag false NON NLS 1 print Attribute quiet quiet false NON NLS 1 print Attribute passfile pass File false NON NLS 1 output println NON NLS 1  cvsRoot passFile printCVSTask cvsRoot passFile printTab printAttribute printAttribute cvsRoot cvsRoot printAttribute printAttribute printAttribute printAttribute printAttribute passFile
Print a code cvspass code task to the Ant script param cvs Root the name of the repository param password the password param pass File the name of the password file public void printCVS Pass Task String cvs Root String password String pass File print Tab output print cvspass NON NLS 1 print Attribute cvs Root cvs Root true NON NLS 1 print Attribute password password true NON NLS 1 print Attribute passfile pass File false NON NLS 1 output println NON NLS 1  cvsRoot passFile printCVSPassTask cvsRoot passFile printTab printAttribute cvsRoot cvsRoot printAttribute printAttribute passFile
Print a code param code tag to the Ant script param name the parameter name param value the parameter value protected void print Param String name String value print Tab output print param NON NLS 1 print Attribute name name true NON NLS 1 print Attribute value value true NON NLS 1 output println NON NLS 1  printParam printTab printAttribute printAttribute
Print a code project code tag to the Ant script param name the name of the project param target the name of default target param basedir the base directory for all the project s path calculations public void print Project Declaration String name String target String basedir output print project NON NLS 1 print Attribute name name false NON NLS 1 print Attribute default target true NON NLS 1 print Attribute basedir basedir false NON NLS 1 output println NON NLS 1 indent  printProjectDeclaration printAttribute printAttribute printAttribute
Print a code project code end tag to the Ant script public void print Project End indent print End Tag project NON NLS 1  printProjectEnd printEndTag
Print a code property code tag to the Ant script param name the property name param value the property value public void print Property String name String value print Tab output print property NON NLS 1 print Attribute name name true NON NLS 1 print Attribute value value true NON NLS 1 output println NON NLS 1  printProperty printTab printAttribute printAttribute
Print the given string to the Ant script within quotes param message the string to print protected void print Quotes String message output print NON NLS 1 output print message output print NON NLS 1  printQuotes
Print a start tag in the Ant script for the given element name param tag the name of the element public void print Start Tag String tag print Tab output print NON NLS 1 output print tag output println NON NLS 1  printStartTag printTab
Print an end tag in the Ant script for the given element name param tag the name of the element public void print End Tag String tag print Tab output print NON NLS 1 output print tag output println NON NLS 1  printEndTag printTab
Print the given number of tabs to the Ant script protected void print Tab for int i 0 i indent i output print t NON NLS 1  printTab
Print the given string to the Ant script followed by a carriage return param message the string to print public void println String message print Tab output println message  printTab
Print the given string to the Ant script param message public void print String message output print message 
Print a carriage return to the Ant script public void println output println 
Print the given task to the Ant script param task the task to print public void print I Task task task print this  ITask
Print a code target code tag to the Ant script param name the name of the target param depends a comma separated list of required targets param if Clause the name of the property that this target depends on param unless Clause the name of the property that this target cannot have param description a user readable description of this target public void print Target Declaration String name String depends String if Clause String unless Clause String description print Tab output print target NON NLS 1 print Attribute name name true NON NLS 1 print Attribute depends depends false NON NLS 1 print Attribute if if Clause false NON NLS 1 print Attribute unless unless Clause false NON NLS 1 print Attribute description description false NON NLS 1 output println NON NLS 1 indent  ifClause unlessClause printTargetDeclaration ifClause unlessClause printTab printAttribute printAttribute printAttribute ifClause printAttribute unlessClause printAttribute
Print a closing code target code tag to the script Indent the specified number of tabs public void print Target End indent print End Tag target NON NLS 1  printTargetEnd printEndTag
Print a code eclipse refresh Local code task to the script This task refreshes the specified resource in the workspace to the specified depth param resource the resource to refresh param depth one of code I Resource DEPTH ZERO code code I Resource DEPTH ONE code or code I Resource DEPTH INFINITY code public void print Refresh Local Task String resource String depth print Tab output print eclipse refresh Local NON NLS 1 print Attribute resource resource true NON NLS 1 print Attribute depth depth false NON NLS 1 output println NON NLS 1  refreshLocal IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITY printRefreshLocalTask printTab refreshLocal printAttribute printAttribute
public void print Chmod String dir String rights String files print Tab output print chmod perm rights NON NLS 1 NON NLS 2 output print dir dir NON NLS 1 NON NLS 2 output print includes files NON NLS 1 NON NLS 2 output println  printChmod printTab
public void print Get String source String destination String login String password boolean usetimestamp print Tab output print get NON NLS 1 print Attribute username login false NON NLS 1 print Attribute password password false NON NLS 1 print Attribute src source true NON NLS 1 print Attribute dest destination true NON NLS 1 print Attribute usetimestamp usetimestamp true null false NON NLS 1 NON NLS 2 output println NON NLS 1  printGet printTab printAttribute printAttribute printAttribute printAttribute printAttribute
public void printG Zip String source String destination print Tab output println gzip src source zipfile destination NON NLS 1 NON NLS 2 NON NLS 3  printGZip printTab
Print a code eclipse convert Task code task to the script This task convert a file path to an Eclipse resource or vice versa param to Convert the entry to convert param property Name the property where to store the result of the convertion param is Eclipse Resource true if to Convert refers to an eclipse resource public void print Convert Path Task String to Convert String property Name boolean is Eclipse Resource print Tab output print eclipse convert Path NON NLS 1 if is Eclipse Resource false print Attribute file System Path to Convert true NON NLS 1 else print Attribute resource Path to Convert true NON NLS 1 print Attribute property property Name true NON NLS 1 output println NON NLS 1  convertTask toConvert propertyName isEclipseResource toConvert printConvertPathTask toConvert propertyName isEclipseResource printTab convertPath isEclipseResource printAttribute fileSystemPath toConvert printAttribute resourcePath toConvert printAttribute propertyName
Print a code dirname code task to the script param property param file public void print Dir Name String property String file print Tab output print dirname NON NLS 1 print Attribute property property true NON NLS 1 print Attribute file file true NON NLS 1 output println NON NLS 1  printDirName printTab printAttribute printAttribute

Default constructor for the class public Condition this single Conditions new Array List 5 this nested Conditions new Array List 5  singleConditions ArrayList nestedConditions ArrayList
public Condition String type this this type type 
Add this Ant condition to the given Ant script param script the script to add the condition to protected void print Ant Script script if type null script indent script print Start Tag type for Iterator iterator single Conditions iterator iterator has Next script print String String iterator next for Iterator iterator nested Conditions iterator iterator has Next Condition condition Condition iterator next condition print script if type null script print End Tag type script indent  AntScript printStartTag singleConditions hasNext printString nestedConditions hasNext printEndTag
Add an equals condition to this Ant condition param arg1 the left hand side of the equals param arg2 the right hand side of the equals public void add Equals String arg1 String arg2 String Buffer condition new String Buffer condition append equals NON NLS 1 condition append arg1 NON NLS 1 condition append arg1 condition append NON NLS 1 condition append arg2 NON NLS 1 condition append arg2 condition append NON NLS 1 single Conditions add condition to String  addEquals StringBuffer StringBuffer singleConditions toString
Add the given condition to this Ant condition param condition the condition to add public void add Condition condition nested Conditions add condition  nestedConditions

Constructor for the condition param property param value param condition public Condition Task String property String value Condition condition this property property this value value this condition condition  ConditionTask
see I Task print Ant Script public void print Ant Script script script print Tab script print condition NON NLS 1 script print Attribute property property true NON NLS 1 script print Attribute value value false NON NLS 1 script println NON NLS 1 condition print script script println condition NON NLS 1  ITask AntScript AntScript printTab printAttribute printAttribute

Constructor for the file set param dir param defaultexcludes param includes param includesfile param excludes param excludesfile param casesensitive public File Set String dir String defaultexcludes String includes String includesfile String excludes String excludesfile String casesensitive this dir dir this defaultexcludes defaultexcludes this includes includes this includesfile includesfile this excludes excludes this excludesfile excludesfile this casesensitive casesensitive  FileSet
Print this fileset to the given Ant script param script the script to output to protected void print Ant Script script script print Tab script print fileset NON NLS 1 script print Attribute dir dir true NON NLS 1 script print Attribute defaultexcludes defaultexcludes false NON NLS 1 script print Attribute includes includes false NON NLS 1 script print Attribute includesfile includesfile false NON NLS 1 script print Attribute excludes excludes false NON NLS 1 script print Attribute excludesfile excludesfile false NON NLS 1 script print Attribute casesensitive casesensitive false NON NLS 1 script println NON NLS 1  AntScript printTab printAttribute printAttribute printAttribute printAttribute printAttribute printAttribute printAttribute

Print the information for this task to the given script Use the given tab index for indenting param script the script to print to 

Default constructor for the class public Javac Task super  JavacTask
see I Task print Ant Script public void print Ant Script script script print Tab script print javac NON NLS 1 script print Attribute destdir destdir false NON NLS 1 script print Attribute failonerror failonerror false NON NLS 1 script print Attribute verbose verbose false NON NLS 1 script print Attribute fork fork false NON NLS 1 script print Attribute debug debug false NON NLS 1 script print Attribute include Ant Runtime include Ant Runtime false NON NLS 1 script print Attribute bootclasspath bootclasspath false NON NLS 1 script print Attribute source source false NON NLS 1 script print Attribute target target false NON NLS 1 script println NON NLS 1 script indent if compile Args null script println compilerarg line compile Args NON NLS 1 NON NLS 2 script print Start Tag classpath NON NLS 1 script indent for Iterator iter classpath iterator iter has Next String path String iter next script print Tab script print pathelement NON NLS 1 script print Attribute path path false NON NLS 1 script print NON NLS 1 script println script indent script print End Tag classpath NON NLS 1 for int i 0 i srcdir length i script print Tab script print src path NON NLS 1 script print Quotes srcdir i script println NON NLS 1 script print End Tag javac NON NLS 1 script indent  ITask AntScript AntScript printTab printAttribute printAttribute printAttribute printAttribute printAttribute printAttribute includeAntRuntime includeAntRuntime printAttribute printAttribute printAttribute compileArgs compileArgs printStartTag hasNext printTab printAttribute printEndTag printTab printQuotes printEndTag
Set the javac task classpath attribute to be the given value param classpath the classpath attribute public void set Classpath List classpath this classpath classpath  setClasspath
Set the javac task boot classpath to be the given value param bootclasspath the boot classpath attribute public void set Boot Classpath String bootclasspath this bootclasspath bootclasspath  setBootClasspath
Set the javac task destination directory to be the given value param destdir the destination directory public void set Destdir String destdir this destdir destdir  setDestdir
Set the javac task fail On Error attribute to be the given value Valid values are code true code and code false code param failonerror either code true code or code false code public void set Fail On Error String failonerror this failonerror failonerror  failOnError setFailOnError
Set the javac task include Ant Runtime attribute to be the given value Valid values are code no code and code yes code param include either code no code or code yes code public void set Include Ant Runtime String include this include Ant Runtime include  includeAntRuntime setIncludeAntRuntime includeAntRuntime
Set the javac task source directory attribute to be the given value param srcdir the source directory public void set Srcdir String srcdir this srcdir srcdir  setSrcdir
Set the javac task verbose attribute to be the given value Valid values are code true code and code false code param verbose either code true code or code false code public void set Verbose String verbose this verbose verbose  setVerbose
Set the javac task fork attribute to be the given value Valid values are code true code and code false code param fork either code true code or code false code public void set Fork String fork this fork fork  setFork
Set the javac task debug attribute to be the given value Valid values are code on code and code off code param debug either code on code or code off code public void set Debug String debug this debug debug  setDebug
Set the javac task source attribute to be the given value param source either code 1 3 code or code 1 4 code public void set Source String source this source source  setSource
Set the javac task target attribute to be the given value param target either code 1 3 code or code 1 4 code public void set Target String target this target target  setTarget
public void set Compile Args String args this compile Args args  setCompileArgs compileArgs

param dir param file param defaultexcludes param includes param includesfile param excludes param excludesfile param prefix param casesensitive public Tar File Set String dir boolean file String defaultexcludes String includes String includesfile String excludes String excludesfile String prefix String casesensitive super dir file defaultexcludes includes includesfile excludes excludesfile prefix casesensitive  TarFileSet
protected void print Ant Script script script print Tab script print tarfileset NON NLS 1 if file script print Attribute file dir false NON NLS 1 else script print Attribute dir dir false NON NLS 1 script print Attribute defaultexcludes defaultexcludes false NON NLS 1 script print Attribute includes includes false NON NLS 1 script print Attribute includesfile includesfile false NON NLS 1 script print Attribute excludes excludes false NON NLS 1 script print Attribute excludesfile excludesfile false NON NLS 1 script print Attribute casesensitive casesensitive false NON NLS 1 if file script print Attribute fullpath prefix false NON NLS 1 else script print Attribute prefix prefix false NON NLS 1 script println NON NLS 1  AntScript printTab printAttribute printAttribute printAttribute printAttribute printAttribute printAttribute printAttribute printAttribute printAttribute printAttribute

param dir param defaultexcludes param includes param includesfile param excludes param excludesfile param casesensitive public Zip File Set String dir boolean file String defaultexcludes String includes String includesfile String excludes String excludesfile String prefix String casesensitive super dir defaultexcludes includes includesfile excludes excludesfile casesensitive this prefix prefix this file file  ZipFileSet
protected void print Ant Script script script print Tab script print zipfileset NON NLS 1 if file script print Attribute file dir false NON NLS 1 else script print Attribute dir dir false NON NLS 1 script print Attribute defaultexcludes defaultexcludes false NON NLS 1 script print Attribute includes includes false NON NLS 1 script print Attribute includesfile includesfile false NON NLS 1 script print Attribute excludes excludes false NON NLS 1 script print Attribute excludesfile excludesfile false NON NLS 1 script print Attribute casesensitive casesensitive false NON NLS 1 if file script print Attribute fullpath prefix false NON NLS 1 else script print Attribute prefix prefix false NON NLS 1 script println NON NLS 1  AntScript printTab printAttribute printAttribute printAttribute printAttribute printAttribute printAttribute printAttribute printAttribute printAttribute printAttribute

private String PROPERTY ECLIPSE FEATURES eclipse features NON NLS 1 public Assemble Config Script Generator super  PROPERTY_ECLIPSE_FEATURES AssembleConfigScriptGenerator
public void initialize String directory Name String script Name String feature Config configuration Information Collection element List Collection feature List Collection root File Providers throws Core Exception this directory directory Name this feature Id feature this config Info configuration Information this root File Providers root File Providers this features new I Feature feature List size feature List to Array this features this plugins new Bundle Description element List size this plugins Bundle Description element List to Array this plugins filename directory script Name null script Name get Filename NON NLS 1 try script new Ant Script new File Output Stream filename catch File Not Found Exception e TODO Log an error a file doesn t exist so we will create a new one catch IO Exception e String message Policy bind exception writing File filename NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING FILE message e load Post Processing Steps  directoryName scriptName configurationInformation elementList featureList rootFileProviders CoreException directoryName featureId configInfo configurationInformation rootFileProviders rootFileProviders IFeature featureList featureList toArray BundleDescription elementList BundleDescription elementList toArray scriptName scriptName getFilename AntScript FileOutputStream FileNotFoundException IOException writingFile CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE loadPostProcessingSteps
private void load Post Processing Steps throws Core Exception try plugins Post Processing Steps read Properties Abstract Script Generator get Working Directory DEFAULT PLUGINS POSTPROCESSINGSTEPS FILENAME DESCRIPTOR I Status INFO features Post Processing Steps read Properties Abstract Script Generator get Working Directory DEFAULT FEATURES POSTPROCESSINGSTEPS FILENAME DESCRIPTOR I Status INFO catch Core Exception e Ignore  loadPostProcessingSteps CoreException pluginsPostProcessingSteps readProperties AbstractScriptGenerator getWorkingDirectory DEFAULT_PLUGINS_POSTPROCESSINGSTEPS_FILENAME_DESCRIPTOR IStatus featuresPostProcessingSteps readProperties AbstractScriptGenerator getWorkingDirectory DEFAULT_FEATURES_POSTPROCESSINGSTEPS_FILENAME_DESCRIPTOR IStatus CoreException
public void generate throws Core Exception generate Prologue generate Initialization Steps generate Gather Bin Parts Calls if embedded Source generate Gather Source Calls generate Post Processing Steps if output Format equals Ignore Case folder NON NLS 1 if config Info get Os equals Ignore Case Constants OS MACOSX Platform getOS equals Constants OS WIN32 generate Tar Target generateG Zip Target else if output Format equals Ignore Case zip NON NLS 1 generate Zip Target else generate Ant Zip Target generate Epilogue  CoreException generatePrologue generateInitializationSteps generateGatherBinPartsCalls embeddedSource generateGatherSourceCalls generatePostProcessingSteps outputFormat equalsIgnoreCase configInfo getOs equalsIgnoreCase OS_MACOSX OS_WIN32 generateTarTarget generateGZipTarget outputFormat equalsIgnoreCase generateZipTarget generateAntZipTarget generateEpilogue
private void generate Gather Source Calls throws Core Exception Map properties new Hash Map 1 properties put PROPERTY DESTINATION TEMP FOLDER get Property Format PROPERTY ECLIPSE PLUGINS for int i 0 i plugins length i Bundle Description plugin plugins i String place To Gather get Location plugin script print Ant Task DEFAULT BUILD SCRIPT FILENAME Utils make Relative new Path place To Gather new Path working Directory toOS String TARGET GATHER SOURCES null null properties properties new Hash Map 1 properties put PROPERTY FEATURE BASE get Property Format PROPERTY ECLIPSE BASE for int i 0 i features length i I Feature feature features i String place To Gather feature getURL get Path int j place To Gather last Index Of DEFAULT FEATURE FILENAME DESCRIPTOR if j 1 place To Gather place To Gather substring 0 j script print Ant Task DEFAULT BUILD SCRIPT FILENAME Utils make Relative new Path place To Gather new Path working Directory toOS String TARGET GATHER SOURCES null null properties  generateGatherSourceCalls CoreException HashMap PROPERTY_DESTINATION_TEMP_FOLDER getPropertyFormat PROPERTY_ECLIPSE_PLUGINS BundleDescription placeToGather getLocation printAntTask DEFAULT_BUILD_SCRIPT_FILENAME makeRelative placeToGather workingDirectory toOSString TARGET_GATHER_SOURCES HashMap PROPERTY_FEATURE_BASE getPropertyFormat PROPERTY_ECLIPSE_BASE IFeature placeToGather getPath placeToGather lastIndexOf DEFAULT_FEATURE_FILENAME_DESCRIPTOR placeToGather placeToGather printAntTask DEFAULT_BUILD_SCRIPT_FILENAME makeRelative placeToGather workingDirectory toOSString TARGET_GATHER_SOURCES
private void generate Packaging Targets String file Name get Property Format PROPERTY SOURCE get Property Format PROPERTY ELEMENT NAME String file Exists get Property Format PROPERTY SOURCE get Property Format PROPERTY ELEMENT NAME  exists NON NLS 1 script print Comment Beginning of the jar Up task NON NLS 1 script print Target Declaration TARGET JARUP null null null Policy bind assemble jar Up NON NLS 1 script print Available Task file Exists file Name Map params new Hash Map 2 params put PROPERTY SOURCE get Property Format PROPERTY SOURCE params put PROPERTY ELEMENT NAME get Property Format PROPERTY ELEMENT NAME script print Ant Call Task TARGET JARING null params script print Target End script print Target Declaration TARGET JARING null file Exists null null script print Zip Task file Name jar file Name false false null NON NLS 1 script print Delete Task file Name null null script print Target End script print Comment End of the jar Up task NON NLS 1  generatePackagingTargets fileName getPropertyFormat PROPERTY_SOURCE getPropertyFormat PROPERTY_ELEMENT_NAME fileExists getPropertyFormat PROPERTY_SOURCE getPropertyFormat PROPERTY_ELEMENT_NAME _exists printComment jarUp printTargetDeclaration TARGET_JARUP jarUp printAvailableTask fileExists fileName HashMap PROPERTY_SOURCE getPropertyFormat PROPERTY_SOURCE PROPERTY_ELEMENT_NAME getPropertyFormat PROPERTY_ELEMENT_NAME printAntCallTask TARGET_JARING printTargetEnd printTargetDeclaration TARGET_JARING fileExists printZipTask fileName fileName printDeleteTask fileName printTargetEnd printComment jarUp
private void generateG Zip Target script println move file NON NLS 1 get Property Format PROPERTY ARCHIVE FULLPATH tofile NON NLS 1 get Property Format PROPERTY ASSEMBLY TMP NON NLS 1 get Property Format PROPERTY COLLECTING FOLDER tmp tar NON NLS 1 script printG Zip get Property Format PROPERTY ASSEMBLY TMP get Property Format PROPERTY COLLECTING FOLDER tmp tar NON NLS 1 NON NLS 2 get Property Format PROPERTY ARCHIVE FULLPATH List args new Array List 2 args add rf NON NLS 1 args add get Property Format PROPERTY ASSEMBLY TMP script print Exec Task rm null args null NON NLS 1  generateGZipTarget getPropertyFormat PROPERTY_ARCHIVE_FULLPATH getPropertyFormat PROPERTY_ASSEMBLY_TMP getPropertyFormat PROPERTY_COLLECTING_FOLDER printGZip getPropertyFormat PROPERTY_ASSEMBLY_TMP getPropertyFormat PROPERTY_COLLECTING_FOLDER getPropertyFormat PROPERTY_ARCHIVE_FULLPATH ArrayList getPropertyFormat PROPERTY_ASSEMBLY_TMP printExecTask
private void generate Prologue script print Project Declaration Assemble feature Id TARGET MAIN null NON NLS 1 script print Property PROPERTY ARCHIVE NAME compute Archive Name script print Property PROPERTY OS config Info get Os script print Property PROPERTY WS config Info get Ws script print Property PROPERTY ARCH config Info get Arch script print Property PROPERTY ASSEMBLY TMP get Property Format PROPERTY BUILD DIRECTORY tmp NON NLS 1 script print Property PROPERTY ECLIPSE BASE get Property Format PROPERTY ASSEMBLY TMP get Property Format PROPERTY COLLECTING FOLDER NON NLS 1 NON NLS 2 script print Property PROPERTY ECLIPSE PLUGINS get Property Format PROPERTY ECLIPSE BASE DEFAULT PLUGIN LOCATION script print Property PROPERTY ECLIPSE FEATURES get Property Format PROPERTY ECLIPSE BASE DEFAULT FEATURE LOCATION script print Property PROPERTY ARCHIVE FULLPATH get Property Format PROPERTY BASEDIR get Property Format PROPERTY BUILD LABEL get Property Format PROPERTY ARCHIVE NAME NON NLS 1 NON NLS 2 generate Packaging Targets script print Target Declaration TARGET MAIN null null null null  generatePrologue printProjectDeclaration featureId TARGET_MAIN printProperty PROPERTY_ARCHIVE_NAME computeArchiveName printProperty PROPERTY_OS configInfo getOs printProperty PROPERTY_WS configInfo getWs printProperty PROPERTY_ARCH configInfo getArch printProperty PROPERTY_ASSEMBLY_TMP getPropertyFormat PROPERTY_BUILD_DIRECTORY printProperty PROPERTY_ECLIPSE_BASE getPropertyFormat PROPERTY_ASSEMBLY_TMP getPropertyFormat PROPERTY_COLLECTING_FOLDER printProperty PROPERTY_ECLIPSE_PLUGINS getPropertyFormat PROPERTY_ECLIPSE_BASE DEFAULT_PLUGIN_LOCATION printProperty PROPERTY_ECLIPSE_FEATURES getPropertyFormat PROPERTY_ECLIPSE_BASE DEFAULT_FEATURE_LOCATION printProperty PROPERTY_ARCHIVE_FULLPATH getPropertyFormat PROPERTY_BASEDIR getPropertyFormat PROPERTY_BUILD_LABEL getPropertyFormat PROPERTY_ARCHIVE_NAME generatePackagingTargets printTargetDeclaration TARGET_MAIN
private void generate Initialization Steps if Bundle Helper get Default is Debugging script print Echo Task basedir get Property Format PROPERTY BASEDIR NON NLS 1 script print Echo Task assembly Temp Dir get Property Format PROPERTY ASSEMBLY TMP NON NLS 1 script print Echo Task eclipse base get Property Format PROPERTY ECLIPSE BASE NON NLS 1 script print Echo Task collecting Folder get Property Format PROPERTY COLLECTING FOLDER NON NLS 1 script print Echo Task archive Prefix get Property Format PROPERTY ARCHIVE PREFIX NON NLS 1 script println condition property PROPERTY PLUGIN ARCHIVE PREFIX value DEFAULT PLUGIN LOCATION NON NLS 1 NON NLS 2 NON NLS 3 script println t equals arg1 get Property Format PROPERTY ARCHIVE PREFIX arg2 trim true NON NLS 1 NON NLS 2 NON NLS 3 script println condition NON NLS 1 script print Property PROPERTY PLUGIN ARCHIVE PREFIX get Property Format PROPERTY ARCHIVE PREFIX DEFAULT PLUGIN LOCATION script println script println condition property PROPERTY FEATURE ARCHIVE PREFIX value DEFAULT FEATURE LOCATION NON NLS 1 NON NLS 2 NON NLS 3 script println t equals arg1 get Property Format PROPERTY ARCHIVE PREFIX arg2 trim true NON NLS 1 NON NLS 2 NON NLS 3 script println condition NON NLS 1 script print Property PROPERTY FEATURE ARCHIVE PREFIX get Property Format PROPERTY ARCHIVE PREFIX DEFAULT FEATURE LOCATION script println if folder equals Ignore Case output Format NON NLS 1 script print Delete Task get Property Format PROPERTY ASSEMBLY TMP null null script print Dir Name PROPERTY ARCHIVE PARENT get Property Format PROPERTY ARCHIVE FULLPATH script print Mkdir Task get Property Format PROPERTY ARCHIVE PARENT script print Mkdir Task get Property Format PROPERTY ASSEMBLY TMP script print Mkdir Task get Property Format PROPERTY BUILD LABEL  generateInitializationSteps BundleHelper getDefault isDebugging printEchoTask getPropertyFormat PROPERTY_BASEDIR printEchoTask assemblyTempDir getPropertyFormat PROPERTY_ASSEMBLY_TMP printEchoTask getPropertyFormat PROPERTY_ECLIPSE_BASE printEchoTask collectingFolder getPropertyFormat PROPERTY_COLLECTING_FOLDER printEchoTask archivePrefix getPropertyFormat PROPERTY_ARCHIVE_PREFIX PROPERTY_PLUGIN_ARCHIVE_PREFIX DEFAULT_PLUGIN_LOCATION getPropertyFormat PROPERTY_ARCHIVE_PREFIX printProperty PROPERTY_PLUGIN_ARCHIVE_PREFIX getPropertyFormat PROPERTY_ARCHIVE_PREFIX DEFAULT_PLUGIN_LOCATION PROPERTY_FEATURE_ARCHIVE_PREFIX DEFAULT_FEATURE_LOCATION getPropertyFormat PROPERTY_ARCHIVE_PREFIX printProperty PROPERTY_FEATURE_ARCHIVE_PREFIX getPropertyFormat PROPERTY_ARCHIVE_PREFIX DEFAULT_FEATURE_LOCATION equalsIgnoreCase outputFormat printDeleteTask getPropertyFormat PROPERTY_ASSEMBLY_TMP printDirName PROPERTY_ARCHIVE_PARENT getPropertyFormat PROPERTY_ARCHIVE_FULLPATH printMkdirTask getPropertyFormat PROPERTY_ARCHIVE_PARENT printMkdirTask getPropertyFormat PROPERTY_ASSEMBLY_TMP printMkdirTask getPropertyFormat PROPERTY_BUILD_LABEL
private void generate Post Processing Steps throws Core Exception for int i 0 i plugins length i Bundle Description plugin plugins i if force Update Jar Format Force the update Jar if it is asked as an output format plugins Post Processing Steps put plugin get Symbolic Name UPDATEJAR generate Post Processing Steps plugin get Symbolic Name plugin get Version to String BUNDLE for int i 0 i features length i I Feature feature features i if force Update Jar Format Force the update Jar if it is asked as an output format features Post Processing Steps put feature get Versioned Identifier get Identifier UPDATEJAR generate Post Processing Steps feature get Versioned Identifier get Identifier feature get Versioned Identifier get Version to String FEATURE  generatePostProcessingSteps CoreException BundleDescription forceUpdateJarFormat updateJar pluginsPostProcessingSteps getSymbolicName generatePostProcessingSteps getSymbolicName getVersion toString IFeature forceUpdateJarFormat updateJar featuresPostProcessingSteps getVersionedIdentifier getIdentifier generatePostProcessingSteps getVersionedIdentifier getIdentifier getVersionedIdentifier getVersion toString
private void generate Gather Bin Parts Calls throws Core Exception Map properties new Hash Map 1 properties put PROPERTY DESTINATION TEMP FOLDER get Property Format PROPERTY ECLIPSE PLUGINS for int i 0 i plugins length i Bundle Description plugin plugins i String place To Gather get Location plugin script print Ant Task DEFAULT BUILD SCRIPT FILENAME Utils make Relative new Path place To Gather new Path working Directory toOS String TARGET GATHER BIN PARTS null null properties properties new Hash Map 1 properties put PROPERTY FEATURE BASE get Property Format PROPERTY ECLIPSE BASE for int i 0 i features length i I Feature feature features i String place To Gather feature getURL get Path int j place To Gather last Index Of DEFAULT FEATURE FILENAME DESCRIPTOR if j 1 place To Gather place To Gather substring 0 j script print Ant Task DEFAULT BUILD SCRIPT FILENAME Utils make Relative new Path place To Gather new Path working Directory toOS String TARGET GATHER BIN PARTS null null properties This will generate gather bin parts call to features that provides files for the root properties new Hash Map 1 properties put PROPERTY FEATURE BASE get Property Format PROPERTY ECLIPSE BASE for Iterator iter root File Providers iterator iter has Next I Feature feature I Feature iter next String place To Gather feature getURL get Path int j place To Gather last Index Of DEFAULT FEATURE FILENAME DESCRIPTOR if j 1 place To Gather place To Gather substring 0 j script print Ant Task DEFAULT BUILD SCRIPT FILENAME Utils make Relative new Path place To Gather new Path working Directory toOS String TARGET GATHER BIN PARTS null null properties  generateGatherBinPartsCalls CoreException HashMap PROPERTY_DESTINATION_TEMP_FOLDER getPropertyFormat PROPERTY_ECLIPSE_PLUGINS BundleDescription placeToGather getLocation printAntTask DEFAULT_BUILD_SCRIPT_FILENAME makeRelative placeToGather workingDirectory toOSString TARGET_GATHER_BIN_PARTS HashMap PROPERTY_FEATURE_BASE getPropertyFormat PROPERTY_ECLIPSE_BASE IFeature placeToGather getPath placeToGather lastIndexOf DEFAULT_FEATURE_FILENAME_DESCRIPTOR placeToGather placeToGather printAntTask DEFAULT_BUILD_SCRIPT_FILENAME makeRelative placeToGather workingDirectory toOSString TARGET_GATHER_BIN_PARTS HashMap PROPERTY_FEATURE_BASE getPropertyFormat PROPERTY_ECLIPSE_BASE rootFileProviders hasNext IFeature IFeature placeToGather getPath placeToGather lastIndexOf DEFAULT_FEATURE_FILENAME_DESCRIPTOR placeToGather placeToGather printAntTask DEFAULT_BUILD_SCRIPT_FILENAME makeRelative placeToGather workingDirectory toOSString TARGET_GATHER_BIN_PARTS
generate the appropriate post Processing Call private void generate Post Processing Steps String name String version byte type String style String get Final Shape name version type 1 if FOLDER equals Ignore Case style return if FILE equals Ignore Case style generate Jar Up Call name version type return  postProcessingCall generatePostProcessingSteps getFinalShape equalsIgnoreCase equalsIgnoreCase generateJarUpCall
Get the unpack clause from the feature xml private String get Plugin Unpack Clause String name String version for int i 0 i features length i I Plugin Entry entries features i get Plugin Entries Only plugin being built needs to be considered for int j 0 j entries length j if entries j get Versioned Identifier get Identifier equals name return org eclipse update core Plugin Entry entries j is Unpack FLAT UPDATEJAR return FLAT  getPluginUnpackClause IPluginEntry getPluginEntries getVersionedIdentifier getIdentifier PluginEntry isUnpack
private Object get Final Shape String name String version byte type String style get Plugin Unpack Clause name version Properties current Properties type BUNDLE plugins Post Processing Steps features Post Processing Steps if current Properties size 0 String style From File current Properties get Property name if style From File null style From File current Properties get Property DEFAULT FINAL SHAPE style style From File if FLAT equals Ignore Case style do nothing return new Object name   version FOLDER if UPDATEJAR equals Ignore Case style return new Object name   version jar FILE NON NLS 1 return new Object name   version FOLDER  getFinalShape getPluginUnpackClause currentProperties pluginsPostProcessingSteps featuresPostProcessingSteps currentProperties styleFromFile currentProperties getProperty styleFromFile styleFromFile currentProperties getProperty DEFAULT_FINAL_SHAPE styleFromFile equalsIgnoreCase _ equalsIgnoreCase _ _
private void generate Jar Up Call String name String version byte type Map properties new Hash Map 2 properties put PROPERTY SOURCE type BUNDLE get Property Format PROPERTY ECLIPSE PLUGINS get Property Format PROPERTY ECLIPSE FEATURES properties put PROPERTY ELEMENT NAME name   version script print Ant Call Task TARGET JARUP null properties  generateJarUpCall HashMap PROPERTY_SOURCE getPropertyFormat PROPERTY_ECLIPSE_PLUGINS getPropertyFormat PROPERTY_ECLIPSE_FEATURES PROPERTY_ELEMENT_NAME _ printAntCallTask TARGET_JARUP
private void generate Epilogue script print Target End script print Project End script close  generateEpilogue printTargetEnd printProjectEnd
public String get Filename return get Target Name xml NON NLS 1  getFilename getTargetName
public String get Target Name return DEFAULT ASSEMBLE NAME feature Id equals feature Id config Info equals Config generic Config config Info to String Replacing Any ANY STRING NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 NON NLS 6  getTargetName DEFAULT_ASSEMBLE_NAME featureId featureId configInfo genericConfig configInfo toStringReplacingAny ANY_STRING
private void generate Zip Target final int parameter Size 15 List parameters new Array List parameter Size 1 for int i 0 i plugins length i parameters add get Property Format PROPERTY PLUGIN ARCHIVE PREFIX String get Final Shape plugins i get Symbolic Name plugins i get Version to String BUNDLE 0 if i parameter Size 0 create Zip Exec Command parameters parameters clear if parameters is Empty create Zip Exec Command parameters parameters clear if parameters is Empty create Zip Exec Command parameters parameters clear for int i 0 i features length i parameters add get Property Format PROPERTY FEATURE ARCHIVE PREFIX String get Final Shape features i get Versioned Identifier get Identifier features i get Versioned Identifier get Version to String FEATURE 0 if i parameter Size 0 create Zip Exec Command parameters parameters clear if parameters is Empty create Zip Exec Command parameters parameters clear create Zip Root File Command  generateZipTarget parameterSize ArrayList parameterSize getPropertyFormat PROPERTY_PLUGIN_ARCHIVE_PREFIX getFinalShape getSymbolicName getVersion toString parameterSize createZipExecCommand isEmpty createZipExecCommand isEmpty createZipExecCommand getPropertyFormat PROPERTY_FEATURE_ARCHIVE_PREFIX getFinalShape getVersionedIdentifier getIdentifier getVersionedIdentifier getVersion toString parameterSize createZipExecCommand isEmpty createZipExecCommand createZipRootFileCommand
Zip the root files private void create Zip Root File Command if root File Providers size 0 return List parameters new Array List 1 parameters add r q zipargs get Property Format PROPERTY ARCHIVE FULLPATH NON NLS 1 NON NLS 2 NON NLS 3 script print Exec Task zip get Property Format PROPERTY ECLIPSE BASE config Info to String Replacing Any ANY STRING parameters null NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4  createZipRootFileCommand rootFileProviders ArrayList getPropertyFormat PROPERTY_ARCHIVE_FULLPATH printExecTask getPropertyFormat PROPERTY_ECLIPSE_BASE configInfo toStringReplacingAny ANY_STRING
private void create Zip Exec Command List parameters parameters add 0 r q get Property Format PROPERTY ZIP ARGS get Property Format PROPERTY ARCHIVE FULLPATH NON NLS 1 NON NLS 2 script print Exec Task zip get Property Format PROPERTY ASSEMBLY TMP parameters null NON NLS 1 NON NLS 2 NON NLS 3  createZipExecCommand getPropertyFormat PROPERTY_ZIP_ARGS getPropertyFormat PROPERTY_ARCHIVE_FULLPATH printExecTask getPropertyFormat PROPERTY_ASSEMBLY_TMP
protected String compute Archive Name return feature Id get Property Format PROPERTY BUILD ID PARAM config Info equals Config generic Config config Info to String Replacing Any ANY STRING zip NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5  computeArchiveName featureId getPropertyFormat PROPERTY_BUILD_ID_PARAM configInfo genericConfig configInfo toStringReplacingAny ANY_STRING
public void generate Tar Target This task only support creation of archive with eclipse at the root Need to do the copy using cp because of the link List parameters new Array List 2 if root File Providers size 0 parameters add r get Property Format PROPERTY ASSEMBLY TMP get Property Format PROPERTY COLLECTING FOLDER config Info to String Replacing Any ANY STRING get Property Format PROPERTY COLLECTING FOLDER get Property Format PROPERTY ASSEMBLY TMP NON NLS 1 NON NLS 2 script print Exec Task cp get Property Format PROPERTY BASEDIR parameters null NON NLS 1 parameters clear parameters add rf get Property Format PROPERTY ASSEMBLY TMP get Property Format PROPERTY COLLECTING FOLDER config Info to String Replacing Any ANY STRING NON NLS 1 NON NLS 2 script print Exec Task rm get Property Format PROPERTY BASEDIR parameters null NON NLS 1 parameters clear parameters add cvf get Property Format PROPERTY ARCHIVE FULLPATH get Property Format PROPERTY ARCHIVE PREFIX NON NLS 1 script print Exec Task tar get Property Format PROPERTY ASSEMBLY TMP parameters null NON NLS 1  generateTarTarget ArrayList rootFileProviders getPropertyFormat PROPERTY_ASSEMBLY_TMP getPropertyFormat PROPERTY_COLLECTING_FOLDER configInfo toStringReplacingAny ANY_STRING getPropertyFormat PROPERTY_COLLECTING_FOLDER getPropertyFormat PROPERTY_ASSEMBLY_TMP printExecTask getPropertyFormat PROPERTY_BASEDIR getPropertyFormat PROPERTY_ASSEMBLY_TMP getPropertyFormat PROPERTY_COLLECTING_FOLDER configInfo toStringReplacingAny ANY_STRING printExecTask getPropertyFormat PROPERTY_BASEDIR getPropertyFormat PROPERTY_ARCHIVE_FULLPATH getPropertyFormat PROPERTY_ARCHIVE_PREFIX printExecTask getPropertyFormat PROPERTY_ASSEMBLY_TMP
private void generate Ant Zip Target File Set files Plugins new File Set plugins length for int i 0 i plugins length i Object shape get Final Shape plugins i get Symbolic Name plugins i get Version to String BUNDLE files Plugins i new Zip File Set get Property Format PROPERTY ECLIPSE BASE DEFAULT PLUGIN LOCATION String shape 0 shape 1 FILE null null null null null get Property Format PROPERTY PLUGIN ARCHIVE PREFIX String shape 0 null if plugins length 0 script print Zip Task get Property Format PROPERTY ARCHIVE FULLPATH null false true files Plugins File Set files Features new File Set features length for int i 0 i features length i Object shape get Final Shape features i get Versioned Identifier get Identifier features i get Versioned Identifier get Version to String FEATURE files Features i new Zip File Set get Property Format PROPERTY ECLIPSE BASE DEFAULT FEATURE LOCATION String shape 0 shape 1 FILE null null null null null get Property Format PROPERTY FEATURE ARCHIVE PREFIX String shape 0 null if features length 0 script print Zip Task get Property Format PROPERTY ARCHIVE FULLPATH null false true files Features if root File Providers size 0 return File Set root Files new File Set 1 root Files 0 new Zip File Set get Property Format PROPERTY ECLIPSE BASE config Info to String Replacing Any ANY STRING get Property Format PROPERTY COLLECTING FOLDER false null null null null get Property Format PROPERTY ARCHIVE PREFIX null NON NLS 1 NON NLS 2 script print Zip Task get Property Format PROPERTY ARCHIVE FULLPATH null false true root Files  generateAntZipTarget FileSet filesPlugins FileSet getFinalShape getSymbolicName getVersion toString filesPlugins ZipFileSet getPropertyFormat PROPERTY_ECLIPSE_BASE DEFAULT_PLUGIN_LOCATION getPropertyFormat PROPERTY_PLUGIN_ARCHIVE_PREFIX printZipTask getPropertyFormat PROPERTY_ARCHIVE_FULLPATH filesPlugins FileSet filesFeatures FileSet getFinalShape getVersionedIdentifier getIdentifier getVersionedIdentifier getVersion toString filesFeatures ZipFileSet getPropertyFormat PROPERTY_ECLIPSE_BASE DEFAULT_FEATURE_LOCATION getPropertyFormat PROPERTY_FEATURE_ARCHIVE_PREFIX printZipTask getPropertyFormat PROPERTY_ARCHIVE_FULLPATH filesFeatures rootFileProviders FileSet rootFiles FileSet rootFiles ZipFileSet getPropertyFormat PROPERTY_ECLIPSE_BASE configInfo toStringReplacingAny ANY_STRING getPropertyFormat PROPERTY_COLLECTING_FOLDER getPropertyFormat PROPERTY_ARCHIVE_PREFIX printZipTask getPropertyFormat PROPERTY_ARCHIVE_FULLPATH rootFiles

public Assemble Script Generator String directory Assembly Information assemblage Information String feature Id String script Filename throws Core Exception this directory directory this assemblage Information assemblage Information this feature Id feature Id String filename directory script Filename null DEFAULT ASSEMBLE NAME feature Id DEFAULT ASSEMBLE ALL script Filename NON NLS 1 NON NLS 2 NON NLS 3 try script new Ant Script new File Output Stream filename catch File Not Found Exception e ignore this exception catch IO Exception e String message Policy bind exception writing File filename NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING FILE message e  AssembleScriptGenerator AssemblyInformation assemblageInformation featureId scriptFilename CoreException assemblageInformation assemblageInformation featureId featureId scriptFilename DEFAULT_ASSEMBLE_NAME featureId DEFAULT_ASSEMBLE_ALL scriptFilename AntScript FileOutputStream FileNotFoundException IOException writingFile CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE
public void generate throws Core Exception try script print Project Declaration Assemble All Config of feature Id TARGET MAIN null NON NLS 1 generate Main Target script print Project End finally script close  CoreException printProjectDeclaration featureId TARGET_MAIN generateMainTarget printProjectEnd
private void generate Main Target throws Core Exception script print Target Declaration TARGET MAIN null null null null for Iterator iter get Config Infos iterator iter has Next generate Assemble Config File Target Call Config iter next script print Target End  generateMainTarget CoreException printTargetDeclaration TARGET_MAIN getConfigInfos hasNext generateAssembleConfigFileTargetCall printTargetEnd
protected void generate Assemble Config File Target Call Config a Config throws Core Exception generate the script for a configuration config Script Generator initialize directory null feature Id a Config assemblage Information get Plugins a Config assemblage Information get Features a Config assemblage Information get Root File Providers a Config config Script Generator generate Map params new Hash Map 1 params put assemble Script Name config Script Generator get Filename NON NLS 1 script print Ant Task get Property Format DEFAULT CUSTOM TARGETS null config Script Generator get Target Name null null params  generateAssembleConfigFileTargetCall aConfig CoreException configScriptGenerator featureId aConfig assemblageInformation getPlugins aConfig assemblageInformation getFeatures aConfig assemblageInformation getRootFileProviders aConfig configScriptGenerator HashMap assembleScriptName configScriptGenerator getFilename printAntTask getPropertyFormat DEFAULT_CUSTOM_TARGETS configScriptGenerator getTargetName
public void set Config Generator Assemble Config Script Generator generator config Script Generator generator  setConfigGenerator AssembleConfigScriptGenerator configScriptGenerator

public Assembly Information Initialize the content of the assembly information with the configurations for Iterator iter Abstract Script Generator get Config Infos iterator iter has Next assemble Information put iter next new Assembly Level Config Info  AssemblyInformation AbstractScriptGenerator getConfigInfos hasNext assembleInformation AssemblyLevelConfigInfo
public void add Feature Config config I Feature feature Assembly Level Config Info entry Assembly Level Config Info assemble Information get config entry add Feature feature  addFeature IFeature AssemblyLevelConfigInfo AssemblyLevelConfigInfo assembleInformation addFeature
public void remove Feature Config config I Feature feature Assembly Level Config Info entry Assembly Level Config Info assemble Information get config entry remove Feature feature  removeFeature IFeature AssemblyLevelConfigInfo AssemblyLevelConfigInfo assembleInformation removeFeature
public void add Plugin Config config Bundle Description plugin Assembly Level Config Info entry Assembly Level Config Info assemble Information get config entry add Plugin plugin  addPlugin BundleDescription AssemblyLevelConfigInfo AssemblyLevelConfigInfo assembleInformation addPlugin
public Collection get Plugins Config config return Assembly Level Config Info assemble Information get config get Plugins  getPlugins AssemblyLevelConfigInfo assembleInformation getPlugins
public Collection get Features Config config return Assembly Level Config Info assemble Information get config get Features  getFeatures AssemblyLevelConfigInfo assembleInformation getFeatures
public boolean copy Root File Config config return Assembly Level Config Info assemble Information get config has Root File  copyRootFile AssemblyLevelConfigInfo assembleInformation hasRootFile
public Collection get Root File Providers Config config return Assembly Level Config Info assemble Information get config get Root File Provider  getRootFileProviders AssemblyLevelConfigInfo assembleInformation getRootFileProvider
public void add Root File Provider Config config I Feature feature Assembly Level Config Info assemble Information get config add Root File Provider feature  addRootFileProvider IFeature AssemblyLevelConfigInfo assembleInformation addRootFileProvider
public void add Root File Provider I Feature feature for Iterator iter root File Providers iterator iter has Next Build Time Feature feature Descriptor Build Time Feature iter next if Build Time Feature feature get Feature Identifier equals feature Descriptor get Feature Identifier Build Time Feature feature get Feature Version equals feature Descriptor get Feature Version return root File Providers add feature  addRootFileProvider IFeature rootFileProviders hasNext BuildTimeFeature featureDescriptor BuildTimeFeature BuildTimeFeature getFeatureIdentifier featureDescriptor getFeatureIdentifier BuildTimeFeature getFeatureVersion featureDescriptor getFeatureVersion rootFileProviders
public Collection get Root File Provider return root File Providers  getRootFileProvider rootFileProviders
public boolean has Root File return root File Providers size 0  hasRootFile rootFileProviders
public Collection get Features return features  getFeatures
public Collection get Plugins return plugins  getPlugins
public void add Feature I Feature feature for Iterator iter features iterator iter has Next Build Time Feature feature Descriptor Build Time Feature iter next if Build Time Feature feature get Feature Identifier equals feature Descriptor get Feature Identifier Build Time Feature feature get Feature Version equals feature Descriptor get Feature Version return features add feature  addFeature IFeature hasNext BuildTimeFeature featureDescriptor BuildTimeFeature BuildTimeFeature getFeatureIdentifier featureDescriptor getFeatureIdentifier BuildTimeFeature getFeatureVersion featureDescriptor getFeatureVersion
public void add Plugin Bundle Description plugin plugins add plugin  addPlugin BundleDescription
public void remove Feature I Feature feature for Iterator iter features iterator iter has Next Build Time Feature feature Descriptor Build Time Feature iter next if Build Time Feature feature get Feature Identifier equals feature Descriptor get Feature Identifier Build Time Feature feature get Feature Version equals feature Descriptor get Feature Version features remove feature Descriptor return  removeFeature IFeature hasNext BuildTimeFeature featureDescriptor BuildTimeFeature BuildTimeFeature getFeatureIdentifier featureDescriptor getFeatureIdentifier BuildTimeFeature getFeatureVersion featureDescriptor getFeatureVersion featureDescriptor

public class Build Activator extends Plugin public void start Bundle Context ctx throws Exception new Bundle Helper ctx  BuildActivator BundleContext BundleHelper
public void stop Bundle Context ctx throws Exception Bundle Helper close  BundleContext BundleHelper

private Set compiled Elements The elements we are compiling abstract protected Properties get Build Properties throws Core Exception  compiledElements getBuildProperties CoreException
abstract protected Properties get Build Properties throws Core Exception public void set Dev Entries String entries dev Entries new Dev Class Path Helper entries  getBuildProperties CoreException setDevEntries devEntries DevClassPathHelper
public void set Dev Entries Dev Class Path Helper entries dev Entries entries  setDevEntries DevClassPathHelper devEntries
Return the path of the plugins TODO Do we need to add support for features or do we simply consider one list of URL It is just a matter of style return URL protected String get Plugin Path return plugin Path  getPluginPath pluginPath
Sets the plugin Path param path public void set Plugin Path String path plugin Path path  pluginPath setPluginPath pluginPath
Return a build time site referencing things to be built param refresh indicate if a refresh must be performed Although this flag is set to true a new site is not rebuild if the urls of the site did not changed return throws Core Exception public Build Time Site get Site boolean refresh throws Core Exception if site Factory null refresh false return Build Time Site site Factory create Site if site Factory null refresh true site Factory new Build Time Site Factory try site Factory set Site Paths get Paths catch MalformedURL Exception e String message Policy bind error incorrect Directory Entry NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION MALFORMED URL message e return Build Time Site site Factory create Site  CoreException BuildTimeSite getSite CoreException siteFactory BuildTimeSite siteFactory createSite siteFactory siteFactory BuildTimeSiteFactory siteFactory setSitePaths getPaths MalformedURLException incorrectDirectoryEntry CoreException IStatus PI_PDEBUILD EXCEPTION_MALFORMED_URL BuildTimeSite siteFactory createSite
Method get Paths return URL private String get Paths throws MalformedURL Exception if plugin Path null return plugin Path return new String working Directory  getPaths getPaths MalformedURLException pluginPath pluginPath workingDirectory
public void set Build Site Factory Build Time Site Factory site Factory this site Factory site Factory  setBuildSiteFactory BuildTimeSiteFactory siteFactory siteFactory siteFactory
param buf param start param target return int protected int scan String Buffer buf int start String target return scan buf start new String target  StringBuffer
param buf param start param targets return int protected int scan String Buffer buf int start String targets for int i start i buf length i for int j 0 j targets length j if i buf length targets j length String match buf substring i i targets j length if targets j equals match return i return 1  StringBuffer
Return a buffer containing the contents of the file at the specified location param target the file return String Buffer throws IO Exception protected String Buffer read File File target throws IO Exception return read File new File Input Stream target  StringBuffer IOException StringBuffer readFile IOException readFile FileInputStream
protected String Buffer read File Input Stream stream throws IO Exception Input Stream Reader reader new Input Stream Reader new Buffered Input Stream stream String Buffer result new String Buffer char buf new char 4096 int count try count reader read buf 0 buf length while count 1 result append buf 0 count count reader read buf 0 buf length finally try reader close catch IO Exception e ignore exceptions here return result  StringBuffer readFile InputStream IOException InputStreamReader InputStreamReader BufferedInputStream StringBuffer StringBuffer IOException
Custom build scripts should have their version number matching the version number defined by the feature plugin fragment descriptor This is a best effort job so do not worry if the expected tags were not found and just return without modifying the file param build File param property Name param version throws Core Exception throws IO Exception protected void update Version File build File String property Name String version throws Core Exception IO Exception String Buffer buffer read File build File int pos scan buffer 0 property Name if pos 1 return pos scan buffer pos value NON NLS 1 if pos 1 return int begin scan buffer pos NON NLS 1 if begin 1 return begin int end scan buffer begin NON NLS 1 if end 1 return String current Version buffer substring begin end String new Version   version NON NLS 1 if current Version equals new Version return buffer replace begin end new Version Utils transfer Streams new Byte Array Input Stream buffer to String get Bytes new File Output Stream build File  buildFile propertyName CoreException IOException updateVersion buildFile propertyName CoreException IOException StringBuffer readFile buildFile propertyName currentVersion newVersion _ currentVersion newVersion newVersion transferStreams ByteArrayInputStream toString getBytes FileOutputStream buildFile
Method select Configs Return a list containing all the configurations that are valid for the element param element return List public List select Configs I Platform Environment element List result new Array List get Config Infos if element getOS null element getOS equals Config ANY for Iterator iter result iterator iter has Next Config config Config iter next if config get Os equals element getOS iter remove if element getWS null element getWS equals Config ANY for Iterator iter result iterator iter has Next Config config Config iter next if config get Ws equals element getWS iter remove if element getOS Arch null element getOS Arch equals Config ANY for Iterator iter result iterator iter has Next Config config Config iter next if config get Arch equals element getOS Arch iter remove return result  selectConfigs selectConfigs IPlatformEnvironment ArrayList getConfigInfos hasNext getOs hasNext getWs getOSArch getOSArch hasNext getArch getOSArch
public Set get Compiled Elements if compiled Elements null compiled Elements new Hash Set return compiled Elements  getCompiledElements compiledElements compiledElements HashSet compiledElements
Sets the compiled Elements param compiled Elements The compiled Elements to set public void set Compiled Elements Set compiled Elements this compiled Elements compiled Elements  compiledElements compiledElements compiledElements setCompiledElements compiledElements compiledElements compiledElements

private Model Build Script Generator generator public ClasspathComputer2 1 Model Build Script Generator model Generator this generator model Generator  ModelBuildScriptGenerator ClasspathComputer2_1 ModelBuildScriptGenerator modelGenerator modelGenerator
Compute the classpath for the given jar The path returned conforms to Parent Self Prerequisite param model the plugin containing the jar compiled param jar the jar for which the classpath is being compiled return String the classpath throws Core Exception public List get Classpath Bundle Description model Model Build Script Generator Compiled Entry jar throws Core Exception List classpath new Array List 20 List plugin Chain new Array List 10 String location generator get Location model PARENT add Plugin get Plugin PI BOOT null classpath location SELF add Self model jar classpath location plugin Chain PREREQUISITE add Prerequisites model classpath location plugin Chain return classpath  CoreException getClasspath BundleDescription ModelBuildScriptGenerator CompiledEntry CoreException ArrayList pluginChain ArrayList getLocation addPlugin getPlugin PI_BOOT addSelf pluginChain addPrerequisites pluginChain
Add the specified plugin including its jars and its fragments param plugin param classpath param location throws Core Exception private void add Plugin Bundle Description plugin List classpath String location throws Core Exception add Runtime Libraries plugin classpath location add Fragments Libraries plugin classpath location  CoreException addPlugin BundleDescription CoreException addRuntimeLibraries addFragmentsLibraries
Add the runtime libraries for the specified plugin param model param classpath param base Location throws Core Exception private void add Runtime Libraries Bundle Description model List classpath String base Location throws Core Exception String libraries get Classpath Entries model String root generator get Location model I Path base Utils make Relative new Path root new Path base Location Properties model Props get Build Properties For model for int i 0 i libraries length i add Dev Entries model base Location classpath Utils get Array From String generator get Build Properties get Property PROPERTY OUTPUT PREFIX libraries i add Path And Check model get Symbolic Name base libraries i model Props classpath  baseLocation CoreException addRuntimeLibraries BundleDescription baseLocation CoreException getClasspathEntries getLocation IPath makeRelative baseLocation modelProps getBuildPropertiesFor addDevEntries baseLocation getArrayFromString getBuildProperties getProperty PROPERTY_OUTPUT_PREFIX addPathAndCheck getSymbolicName modelProps
Return the plug in model object from the plug in registry for the given plug in identifier and version If the plug in is not in the registry then throw an exception param id the plug in identifier param version the plug in version return Bundle Description throws Core Exception if the specified plug in version does not exist in the registry private Bundle Description get Plugin String id String version throws Core Exception return generator get Site false get Registry get Resolved Bundle id version  BundleDescription CoreException BundleDescription getPlugin CoreException getSite getRegistry getResolvedBundle
Add all fragments of the given plugin param plugin param classpath param base Location throws Core Exception private void add Fragments Libraries Bundle Description plugin List classpath String base Location throws Core Exception if plugin is not a plugin it s a fragment and there is no fragment for a fragment So we return Bundle Description fragments plugin get Fragments if fragments null return for int i 0 i fragments length i if fragments i generator get Model continue add Plugin Libraries To Fragment Locations plugin fragments i classpath base Location add Runtime Libraries fragments i classpath base Location  baseLocation CoreException addFragmentsLibraries BundleDescription baseLocation CoreException BundleDescription getFragments getModel addPluginLibrariesToFragmentLocations baseLocation addRuntimeLibraries baseLocation
There are cases where the plug in only declares a library but the real JAR is under a fragment location This method gets all the plugin libraries and place them in the possible fragment location param plugin param fragment param classpath param base Location throws Core Exception private void add Plugin Libraries To Fragment Locations Bundle Description plugin Bundle Description fragment List classpath String base Location throws Core Exception TODO This methods causes the addition of a lot of useless entries See bug 35544 If we reintroduce the test below we reintroduce the problem 35544 if fragment get Runtime null return String libraries get Classpath Entries plugin String root generator get Location fragment I Path base Utils make Relative new Path root new Path base Location Properties model Props get Build Properties For fragment for int i 0 i libraries length i add Path And Check fragment get Symbolic Name base libraries i model Props classpath  baseLocation CoreException addPluginLibrariesToFragmentLocations BundleDescription BundleDescription baseLocation CoreException getRuntime getClasspathEntries getLocation IPath makeRelative baseLocation modelProps getBuildPropertiesFor addPathAndCheck getSymbolicName modelProps
private Properties get Build Properties For Bundle Description bundle try return Abstract Script Generator read Properties generator get Location bundle PROPERTIES FILE I Status OK catch Core Exception e ignore return null  getBuildPropertiesFor BundleDescription AbstractScriptGenerator readProperties getLocation PROPERTIES_FILE IStatus CoreException
classpath The classpath in which we want to add this path private void add Path And Check String plugin Id I Path base Path String library Name Properties model Properties List classpath String path base Path append library Name to String path generator replace Variables path plugin Id null false generator get Compiled Elements contains plugin Id if generator get Compiled Elements contains plugin Id if model Properties null model Properties get Property source library Name null NON NLS 1 path generator get Property Format PROPERTY BUILD RESULT FOLDER path if classpath contains path classpath add path  addPathAndCheck pluginId IPath basePath libraryName modelProperties basePath libraryName toString replaceVariables pluginId getCompiledElements pluginId getCompiledElements pluginId modelProperties modelProperties getProperty libraryName getPropertyFormat PROPERTY_BUILD_RESULT_FOLDER
private void add Self Bundle Description model Model Build Script Generator Compiled Entry jar List classpath String location List plugin Chain throws Core Exception If model is a fragment we need to add in the classpath the plugin to which it is related Host Specification host model get Host if host null add Plugin And Prerequisites host get Supplier classpath location plugin Chain Add the libraries Properties model Properties generator get Build Properties String jar Order String model Properties get PROPERTY JAR ORDER if jar Order null if no jar order was specified in build properties we add all the libraries but the current one based on the order specified by the plugin xml Both library that we compile and jar provided are processed String libraries get Classpath Entries model if libraries null for int i 0 i libraries length i String library Name libraries i if jar get Name false equals library Name continue boolean is Source model Properties get Property PROPERTY SOURCE PREFIX library Name null if is Source add Dev Entries model location classpath Utils get Array From String model Properties get Property PROPERTY OUTPUT PREFIX library Name Potential pb here there maybe a nasty case where the libraries variable may refer to something which is part of the base but xx will replace it by the xx instead of basexx The solution is for the user to use the explicitly set the content of its build property file add Path And Check model get Symbolic Name Path EMPTY library Name model Properties classpath else otherwise we add all the predecessor jars String order Utils get Array From String jar Order for int i 0 i order length i if order i equals jar get Name false break add Dev Entries model location classpath Utils get Array From String String model Properties get PROPERTY OUTPUT PREFIX order i add Path And Check model get Symbolic Name Path EMPTY order i model Properties classpath Then we add all the pure libraries the one that does not contain source String libraries get Classpath Entries model for int i 0 i libraries length i String library Name libraries i if model Properties get PROPERTY SOURCE PREFIX library Name null Potential pb if the pure library is something that is being compiled which is supposetly not the case but who knows the user will get basexx instead of ws add Path And Check model get Symbolic Name Path EMPTY library Name model Properties classpath add extra classpath if it exists this code is kept for backward compatibility String extra Classpath String model Properties get PROPERTY JAR EXTRA CLASSPATH if extra Classpath null String extra Utils get Array From String extra Classpath NON NLS 1 for int i 0 i extra length i Potential pb if the path refers to something that is being compiled which is supposetly not the case but who knows the user will get basexx instead of ws add Path And Check null new Path compute Extra Path extra i location model Properties classpath NON NLS 1 add extra classpath if it is specified for the given jar String jar Specific Extra Classpath jar get Extra Classpath for int i 0 i jar Specific Extra Classpath length i Potential pb if the path refers to something that is being compiled which is supposetly not the case but who knows the user will get basexx instead of ws add Path And Check null new Path compute Extra Path jar Specific Extra Classpath i location model Properties classpath NON NLS 1  addSelf BundleDescription ModelBuildScriptGenerator CompiledEntry pluginChain CoreException HostSpecification getHost addPluginAndPrerequisites getSupplier pluginChain modelProperties getBuildProperties jarOrder modelProperties PROPERTY_JAR_ORDER jarOrder getClasspathEntries libraryName getName libraryName isSource modelProperties getProperty PROPERTY_SOURCE_PREFIX libraryName isSource addDevEntries getArrayFromString modelProperties getProperty PROPERTY_OUTPUT_PREFIX libraryName addPathAndCheck getSymbolicName libraryName modelProperties getArrayFromString jarOrder getName addDevEntries getArrayFromString modelProperties PROPERTY_OUTPUT_PREFIX addPathAndCheck getSymbolicName modelProperties getClasspathEntries libraryName modelProperties PROPERTY_SOURCE_PREFIX libraryName addPathAndCheck getSymbolicName libraryName modelProperties extraClasspath modelProperties PROPERTY_JAR_EXTRA_CLASSPATH extraClasspath getArrayFromString extraClasspath addPathAndCheck computeExtraPath modelProperties jarSpecificExtraClasspath getExtraClasspath jarSpecificExtraClasspath addPathAndCheck computeExtraPath jarSpecificExtraClasspath modelProperties
Convenience method that compute the relative classpath of extra classpath entries param url a url param location location used as a base location to compute the relative path return String the relative path throws Core Exception private String compute Extra Path String url String location throws Core Exception String relative Path null String urlfragments Utils get Array From String url NON NLS 1 A valid platform url for a plugin has a leat 3 segments if urlfragments length 2 urlfragments 0 equals PlatformURL Handler PROTOCOL PlatformURL Handler PROTOCOL SEPARATOR String model Location null if urlfragments 1 equals Ignore Case PlatformURL Plugin Connection PLUGIN model Location generator get Location generator get Site false get Registry get Resolved Bundle urlfragments 2 if urlfragments 1 equals Ignore Case PlatformURL Fragment Connection FRAGMENT model Location generator get Location generator get Site false get Registry get Resolved Bundle urlfragments 2 if urlfragments 1 equals Ignore Case resource NON NLS 1 String message Policy bind exception url generator get Properties File Name url NON NLS 1 NON NLS 2 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION MALFORMED URL message null if model Location null for int i 3 i urlfragments length i if i 3 model Location urlfragments i else model Location urlfragments i NON NLS 1 return relative Path Utils make Relative new Path model Location new Path location toOS String Then it s just a regular URL or just something that will be added at the end of the classpath for backward compatibility try URL extraURL new URL url try relative Path Utils make Relative new Path Platform resolve extraURL get File new Path location toOS String catch IO Exception e String message Policy bind exception url generator get Properties File Name url NON NLS 1 NON NLS 2 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION MALFORMED URL message e catch MalformedURL Exception e String message Policy bind exception url PROPERTIES FILE url NON NLS 1 NON NLS 2 throw new Core Exception new Status I Status ERROR PI PDEBUILD IPDE Build Constants EXCEPTION MALFORMED URL message e return relative Path  CoreException computeExtraPath CoreException relativePath getArrayFromString PlatformURLHandler PlatformURLHandler PROTOCOL_SEPARATOR modelLocation equalsIgnoreCase PlatformURLPluginConnection modelLocation getLocation getSite getRegistry getResolvedBundle equalsIgnoreCase PlatformURLFragmentConnection modelLocation getLocation getSite getRegistry getResolvedBundle equalsIgnoreCase getPropertiesFileName CoreException IStatus PI_PDEBUILD EXCEPTION_MALFORMED_URL modelLocation modelLocation modelLocation relativePath makeRelative modelLocation toOSString relativePath makeRelative getFile toOSString IOException getPropertiesFileName CoreException IStatus PI_PDEBUILD EXCEPTION_MALFORMED_URL MalformedURLException PROPERTIES_FILE CoreException IStatus PI_PDEBUILD IPDEBuildConstants EXCEPTION_MALFORMED_URL relativePath
Add the prerequisite of a given plugin target private void add Prerequisites Bundle Description target List classpath String base Location List plugin Chain throws Core Exception if plugin Chain contains target if target get Plugin PI RUNTIME null return String cycle String NON NLS 1 for Iterator iter plugin Chain iterator iter has Next cycle String iter next to String NON NLS 1 cycle String target to String String message Policy bind error plugin Cycle cycle String NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION CLASSPATH CYCLE message null The first prerequisite is ALWAYS runtime if target get Plugin PI RUNTIME null add Plugin And Prerequisites get Plugin PI RUNTIME null classpath base Location plugin Chain add libraries from pre requisite plug ins Don t worry about the export flag as all required plugins may be required for compilation Bundle Description requires PDE State get Dependent Bundles target if requires null plugin Chain add target for int i 0 i requires length i Bundle Description plugin get Plugin requires i get Symbolic Name requires i get Version to String if plugin null add Plugin And Prerequisites plugin classpath base Location plugin Chain plugin Chain remove target  addPrerequisites BundleDescription baseLocation pluginChain CoreException pluginChain getPlugin PI_RUNTIME cycleString pluginChain hasNext cycleString toString cycleString toString pluginCycle cycleString CoreException IStatus PI_PDEBUILD EXCEPTION_CLASSPATH_CYCLE getPlugin PI_RUNTIME addPluginAndPrerequisites getPlugin PI_RUNTIME baseLocation pluginChain BundleDescription PDEState getDependentBundles pluginChain BundleDescription getPlugin getSymbolicName getVersion toString addPluginAndPrerequisites baseLocation pluginChain pluginChain
The plugin Chain parameter is used to keep track of possible cycles If prerequisite is already present in the chain it is not included in the classpath param target the plugin for which we are going to introduce param classpath param base Location param plugin Chain throws Core Exception private void add Plugin And Prerequisites Bundle Description target List classpath String base Location List plugin Chain throws Core Exception add Plugin target classpath base Location add Prerequisites target classpath base Location plugin Chain  pluginChain baseLocation pluginChain CoreException addPluginAndPrerequisites BundleDescription baseLocation pluginChain CoreException addPlugin baseLocation addPrerequisites baseLocation pluginChain
param model param base Location param classpath throws Core Exception private void add Dev Entries Bundle Description model String base Location List classpath String jar Specific Entries throws Core Exception if generator dev Entries null jar Specific Entries null jar Specific Entries length 0 return String entries if jar Specific Entries is given then it overrides dev Entries if jar Specific Entries null jar Specific Entries length 0 entries jar Specific Entries else entries generator dev Entries get Dev Class Path model get Symbolic Name I Path root Utils make Relative new Path generator get Location model new Path base Location for int i 0 i entries length i add Path And Check model get Symbolic Name root entries i null classpath  baseLocation CoreException addDevEntries BundleDescription baseLocation jarSpecificEntries CoreException devEntries jarSpecificEntries jarSpecificEntries jarSpecificEntries devEntries jarSpecificEntries jarSpecificEntries jarSpecificEntries devEntries getDevClassPath getSymbolicName IPath makeRelative getLocation baseLocation addPathAndCheck getSymbolicName
Return the jar name from the classpath private String get Classpath Entries Bundle Description bundle throws Core Exception return generator get Classpath Entries bundle  getClasspathEntries BundleDescription CoreException getClasspathEntries

private Model Build Script Generator generator public ClasspathComputer3 0 Model Build Script Generator model Generator this generator model Generator  ModelBuildScriptGenerator ClasspathComputer3_0 ModelBuildScriptGenerator modelGenerator modelGenerator
Compute the classpath for the given jar The path returned conforms to Parent Prerequisite Self param model the plugin containing the jar compiled param jar the jar for which the classpath is being compiled return String the classpath throws Core Exception public List get Classpath Bundle Description model Model Build Script Generator Compiled Entry jar throws Core Exception List classpath new Array List 20 List plugin Chain new Array List 10 The list of plugins added to detect cycle String location generator get Location model Set added Plugins new Hash Set 10 The set of all the plugins already added to the classpath this allows for optimization PREREQUISITE add Prerequisites model classpath location plugin Chain added Plugins SELF add Self model jar classpath location plugin Chain added Plugins return classpath  CoreException getClasspath BundleDescription ModelBuildScriptGenerator CompiledEntry CoreException ArrayList pluginChain ArrayList getLocation addedPlugins HashSet addPrerequisites pluginChain addedPlugins addSelf pluginChain addedPlugins
Add the specified plugin including its jars and its fragments param plugin param classpath param location throws Core Exception private void add Plugin Bundle Description plugin List classpath String location throws Core Exception add Runtime Libraries plugin classpath location add Fragments Libraries plugin classpath location  CoreException addPlugin BundleDescription CoreException addRuntimeLibraries addFragmentsLibraries
Add the runtime libraries for the specified plugin param model param classpath param base Location throws Core Exception private void add Runtime Libraries Bundle Description model List classpath String base Location throws Core Exception String libraries get Classpath Entries model String root generator get Location model I Path base Utils make Relative new Path root new Path base Location Properties model Props get Build Properties For model for int i 0 i libraries length i add Dev Entries model base Location classpath Utils get Array From String generator get Build Properties get Property PROPERTY OUTPUT PREFIX libraries i add Path And Check model get Symbolic Name base libraries i model Props classpath  baseLocation CoreException addRuntimeLibraries BundleDescription baseLocation CoreException getClasspathEntries getLocation IPath makeRelative baseLocation modelProps getBuildPropertiesFor addDevEntries baseLocation getArrayFromString getBuildProperties getProperty PROPERTY_OUTPUT_PREFIX addPathAndCheck getSymbolicName modelProps
Add all fragments of the given plugin param plugin param classpath param base Location throws Core Exception private void add Fragments Libraries Bundle Description plugin List classpath String base Location throws Core Exception if plugin is not a plugin it s a fragment and there is no fragment for a fragment So we return Bundle Description fragments plugin get Fragments if fragments null return for int i 0 i fragments length i if fragments i generator get Model continue add Plugin Libraries To Fragment Locations plugin fragments i classpath base Location add Runtime Libraries fragments i classpath base Location  baseLocation CoreException addFragmentsLibraries BundleDescription baseLocation CoreException BundleDescription getFragments getModel addPluginLibrariesToFragmentLocations baseLocation addRuntimeLibraries baseLocation
There are cases where the plug in only declares a library but the real JAR is under a fragment location This method gets all the plugin libraries and place them in the possible fragment location param plugin param fragment param classpath param base Location throws Core Exception private void add Plugin Libraries To Fragment Locations Bundle Description plugin Bundle Description fragment List classpath String base Location throws Core Exception TODO This methods causes the addition of a lot of useless entries See bug 35544 If we reintroduce the test below we reintroduce the problem 35544 if fragment get Runtime null return String libraries get Classpath Entries plugin String root generator get Location fragment I Path base Utils make Relative new Path root new Path base Location Properties model Props get Build Properties For fragment for int i 0 i libraries length i add Path And Check fragment get Symbolic Name base libraries i model Props classpath  baseLocation CoreException addPluginLibrariesToFragmentLocations BundleDescription BundleDescription baseLocation CoreException getRuntime getClasspathEntries getLocation IPath makeRelative baseLocation modelProps getBuildPropertiesFor addPathAndCheck getSymbolicName modelProps
private Properties get Build Properties For Bundle Description bundle try Properties bundle Properties Abstract Script Generator read Properties generator get Location bundle PROPERTIES FILE I Status OK if Utils is String In generator get Classpath Entries bundle Model Build Script Generator DOT String source Folder bundle Properties get Property PROPERTY SOURCE PREFIX Model Build Script Generator DOT if source Folder null bundle Properties set Property PROPERTY SOURCE PREFIX Model Build Script Generator EXPANDED DOT source Folder bundle Properties remove PROPERTY SOURCE PREFIX Model Build Script Generator DOT String output Value bundle Properties get Property PROPERTY OUTPUT PREFIX Model Build Script Generator DOT if output Value null bundle Properties set Property PROPERTY OUTPUT PREFIX Model Build Script Generator EXPANDED DOT output Value bundle Properties remove PROPERTY OUTPUT PREFIX Model Build Script Generator DOT catch Core Exception e ignore return null  getBuildPropertiesFor BundleDescription bundleProperties AbstractScriptGenerator readProperties getLocation PROPERTIES_FILE IStatus isStringIn getClasspathEntries ModelBuildScriptGenerator sourceFolder bundleProperties getProperty PROPERTY_SOURCE_PREFIX ModelBuildScriptGenerator sourceFolder bundleProperties setProperty PROPERTY_SOURCE_PREFIX ModelBuildScriptGenerator EXPANDED_DOT sourceFolder bundleProperties PROPERTY_SOURCE_PREFIX ModelBuildScriptGenerator outputValue bundleProperties getProperty PROPERTY_OUTPUT_PREFIX ModelBuildScriptGenerator outputValue bundleProperties setProperty PROPERTY_OUTPUT_PREFIX ModelBuildScriptGenerator EXPANDED_DOT outputValue bundleProperties PROPERTY_OUTPUT_PREFIX ModelBuildScriptGenerator CoreException
classpath The classpath in which we want to add this path private void add Path And Check String plugin Id I Path base Path String library Name Properties model Properties List classpath String path base Path append library Name to String path generator replace Variables path plugin Id null false generator get Compiled Elements contains plugin Id if generator get Compiled Elements contains plugin Id if model Properties null model Properties get Property I Build Properties Constants PROPERTY SOURCE PREFIX library Name null NON NLS 1 path generator get Property Format PROPERTY BUILD RESULT FOLDER path if classpath contains path classpath add path  addPathAndCheck pluginId IPath basePath libraryName modelProperties basePath libraryName toString replaceVariables pluginId getCompiledElements pluginId getCompiledElements pluginId modelProperties modelProperties getProperty IBuildPropertiesConstants PROPERTY_SOURCE_PREFIX libraryName getPropertyFormat PROPERTY_BUILD_RESULT_FOLDER
private void add Self Bundle Description model Model Build Script Generator Compiled Entry jar List classpath String location List plugin Chain Set added Plugins throws Core Exception If model is a fragment we need to add in the classpath the plugin to which it is related Host Specification host model get Host if host null add Plugin And Prerequisites host get Supplier classpath location plugin Chain added Plugins Add the libraries Properties model Properties generator get Build Properties String jar Order String model Properties get PROPERTY JAR ORDER if jar Order null if no jar order was specified in build properties we add all the libraries but the current one based on the order specified by the plugin xml Both library that we compile and jar provided are processed String libraries get Classpath Entries model if libraries null for int i 0 i libraries length i String library Name libraries i if jar get Name false equals library Name continue boolean is Source model Properties get Property PROPERTY SOURCE PREFIX library Name null if is Source add Dev Entries model location classpath Utils get Array From String model Properties get Property PROPERTY OUTPUT PREFIX library Name Potential pb here there maybe a nasty case where the libraries variable may refer to something which is part of the base but xx will replace it by the xx instead of basexx The solution is for the user to use the explicitly set the content of its build property file add Path And Check model get Symbolic Name Path EMPTY library Name model Properties classpath else otherwise we add all the predecessor jars String order Utils get Array From String jar Order for int i 0 i order length i if order i equals jar get Name false break add Dev Entries model location classpath Utils get Array From String String model Properties get PROPERTY OUTPUT PREFIX order i add Path And Check model get Symbolic Name Path EMPTY order i model Properties classpath Then we add all the pure libraries the one that does not contain source String libraries get Classpath Entries model for int i 0 i libraries length i String library Name libraries i if model Properties get PROPERTY SOURCE PREFIX library Name null Potential pb if the pure library is something that is being compiled which is supposetly not the case but who knows the user will get basexx instead of ws add Path And Check model get Symbolic Name Path EMPTY library Name model Properties classpath add extra classpath if it exists this code is kept for backward compatibility String extra Classpath String model Properties get PROPERTY JAR EXTRA CLASSPATH if extra Classpath null String extra Utils get Array From String extra Classpath NON NLS 1 for int i 0 i extra length i Potential pb if the path refers to something that is being compiled which is supposetly not the case but who knows the user will get basexx instead of ws add Path And Check null new Path compute Extra Path extra i location model Properties classpath NON NLS 1 add extra classpath if it is specified for the given jar String jar Specific Extra Classpath jar get Extra Classpath for int i 0 i jar Specific Extra Classpath length i Potential pb if the path refers to something that is being compiled which is supposetly not the case but who knows the user will get basexx instead of ws add Path And Check null new Path compute Extra Path jar Specific Extra Classpath i location model Properties classpath NON NLS 1  addSelf BundleDescription ModelBuildScriptGenerator CompiledEntry pluginChain addedPlugins CoreException HostSpecification getHost addPluginAndPrerequisites getSupplier pluginChain addedPlugins modelProperties getBuildProperties jarOrder modelProperties PROPERTY_JAR_ORDER jarOrder getClasspathEntries libraryName getName libraryName isSource modelProperties getProperty PROPERTY_SOURCE_PREFIX libraryName isSource addDevEntries getArrayFromString modelProperties getProperty PROPERTY_OUTPUT_PREFIX libraryName addPathAndCheck getSymbolicName libraryName modelProperties getArrayFromString jarOrder getName addDevEntries getArrayFromString modelProperties PROPERTY_OUTPUT_PREFIX addPathAndCheck getSymbolicName modelProperties getClasspathEntries libraryName modelProperties PROPERTY_SOURCE_PREFIX libraryName addPathAndCheck getSymbolicName libraryName modelProperties extraClasspath modelProperties PROPERTY_JAR_EXTRA_CLASSPATH extraClasspath getArrayFromString extraClasspath addPathAndCheck computeExtraPath modelProperties jarSpecificExtraClasspath getExtraClasspath jarSpecificExtraClasspath addPathAndCheck computeExtraPath jarSpecificExtraClasspath modelProperties
Convenience method that compute the relative classpath of extra classpath entries param url a url param location location used as a base location to compute the relative path return String the relative path throws Core Exception private String compute Extra Path String url String location throws Core Exception String relative Path null String urlfragments Utils get Array From String url NON NLS 1 A valid platform url for a plugin has a leat 3 segments if urlfragments length 2 urlfragments 0 equals PlatformURL Handler PROTOCOL PlatformURL Handler PROTOCOL SEPARATOR String model Location null if urlfragments 1 equals Ignore Case PlatformURL Plugin Connection PLUGIN model Location generator get Location generator get Site false get Registry get Resolved Bundle urlfragments 2 if urlfragments 1 equals Ignore Case PlatformURL Fragment Connection FRAGMENT model Location generator get Location generator get Site false get Registry get Resolved Bundle urlfragments 2 if urlfragments 1 equals Ignore Case resource NON NLS 1 String message Policy bind exception url generator get Properties File Name url NON NLS 1 NON NLS 2 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION MALFORMED URL message null if model Location null for int i 3 i urlfragments length i if i 3 model Location urlfragments i else model Location urlfragments i NON NLS 1 return relative Path Utils make Relative new Path model Location new Path location toOS String Then it s just a regular URL or just something that will be added at the end of the classpath for backward compatibility try URL extraURL new URL url try relative Path Utils make Relative new Path Platform resolve extraURL get File new Path location toOS String catch IO Exception e String message Policy bind exception url generator get Properties File Name url NON NLS 1 NON NLS 2 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION MALFORMED URL message e catch MalformedURL Exception e relative Path url TODO remove this backward compatibility support for as soon as we go to 2 2 and put back the exception String message Policy bind exception url PROPERTIES FILE url NON NLS 1 NON NLS 2 throw new Core Exception new Status I Status ERROR PI PDEBUILD IPDE Build Constants EXCEPTION MALFORMED URL message e return relative Path  CoreException computeExtraPath CoreException relativePath getArrayFromString PlatformURLHandler PlatformURLHandler PROTOCOL_SEPARATOR modelLocation equalsIgnoreCase PlatformURLPluginConnection modelLocation getLocation getSite getRegistry getResolvedBundle equalsIgnoreCase PlatformURLFragmentConnection modelLocation getLocation getSite getRegistry getResolvedBundle equalsIgnoreCase getPropertiesFileName CoreException IStatus PI_PDEBUILD EXCEPTION_MALFORMED_URL modelLocation modelLocation modelLocation relativePath makeRelative modelLocation toOSString relativePath makeRelative getFile toOSString IOException getPropertiesFileName CoreException IStatus PI_PDEBUILD EXCEPTION_MALFORMED_URL MalformedURLException relativePath PROPERTIES_FILE CoreException IStatus PI_PDEBUILD IPDEBuildConstants EXCEPTION_MALFORMED_URL relativePath
Add the prerequisite of a given plugin target private void add Prerequisites Bundle Description target List classpath String base Location List plugin Chain Set added Plugins throws Core Exception if plugin Chain contains target String cycle String NON NLS 1 for Iterator iter plugin Chain iterator iter has Next cycle String iter next to String NON NLS 1 cycle String target to String String message Policy bind error plugin Cycle cycle String NON NLS 1 throw new Core Exception new Status I Status ERROR IPDE Build Constants PI PDEBUILD EXCEPTION CLASSPATH CYCLE message null if added Plugins contains target the plugins we are considering has already been added return add libraries from pre requisite plug ins Don t worry about the export flag as all required plugins may be required for compilation Bundle Description requires PDE State get Dependent Bundles target plugin Chain add target for int i 0 i requires length i add Plugin And Prerequisites requires i classpath base Location plugin Chain added Plugins plugin Chain remove target added Plugins add target  addPrerequisites BundleDescription baseLocation pluginChain addedPlugins CoreException pluginChain cycleString pluginChain hasNext cycleString toString cycleString toString pluginCycle cycleString CoreException IStatus IPDEBuildConstants PI_PDEBUILD EXCEPTION_CLASSPATH_CYCLE addedPlugins BundleDescription PDEState getDependentBundles pluginChain addPluginAndPrerequisites baseLocation pluginChain addedPlugins pluginChain addedPlugins
The plugin Chain parameter is used to keep track of possible cycles If prerequisite is already present in the chain it is not included in the classpath param target the plugin for which we are going to introduce param classpath param base Location param plugin Chain param added Plugins throws Core Exception private void add Plugin And Prerequisites Bundle Description target List classpath String base Location List plugin Chain Set added Plugins throws Core Exception add Plugin target classpath base Location add Prerequisites target classpath base Location plugin Chain added Plugins  pluginChain baseLocation pluginChain addedPlugins CoreException addPluginAndPrerequisites BundleDescription baseLocation pluginChain addedPlugins CoreException addPlugin baseLocation addPrerequisites baseLocation pluginChain addedPlugins
param model param base Location param classpath throws Core Exception private void add Dev Entries Bundle Description model String base Location List classpath String jar Specific Entries throws Core Exception if generator dev Entries null jar Specific Entries null jar Specific Entries length 0 return String entries if jar Specific Entries is given then it overrides dev Entries if jar Specific Entries null jar Specific Entries length 0 entries jar Specific Entries else entries generator dev Entries get Dev Class Path model get Symbolic Name I Path root Utils make Relative new Path generator get Location model new Path base Location for int i 0 i entries length i add Path And Check model get Symbolic Name root entries i null classpath  baseLocation CoreException addDevEntries BundleDescription baseLocation jarSpecificEntries CoreException devEntries jarSpecificEntries jarSpecificEntries jarSpecificEntries devEntries jarSpecificEntries jarSpecificEntries jarSpecificEntries devEntries getDevClassPath getSymbolicName IPath makeRelative getLocation baseLocation addPathAndCheck getSymbolicName
Return the jar name from the classpath private String get Classpath Entries Bundle Description bundle throws Core Exception return generator get Classpath Entries bundle  getClasspathEntries BundleDescription CoreException getClasspathEntries

public Dev Class Path Helper String dev Info Check the osgi dev property to see if dev classpath entries have been defined String osgi Dev dev Info if osgi Dev null try in Development Mode true URL location new URL osgi Dev dev Properties load location dev Default Classpath Utils get Array From String dev Properties get Property NON NLS 1 catch MalformedURL Exception e dev Default Classpath Utils get Array From String osgi Dev  DevClassPathHelper devInfo osgiDev devInfo osgiDev inDevelopmentMode osgiDev devProperties devDefaultClasspath getArrayFromString devProperties getProperty MalformedURLException devDefaultClasspath getArrayFromString osgiDev
public String get Dev Class Path String id String result null if id null dev Properties null String entry dev Properties get Property id if entry null result Utils get Array From String entry if result null result dev Default Classpath return result  getDevClassPath devProperties devProperties getProperty getArrayFromString devDefaultClasspath
public boolean in Development Mode return in Development Mode  inDevelopmentMode inDevelopmentMode
private static Properties load URL url Properties props new Properties try Input Stream is null try is url open Stream props load is finally is close catch IO Exception e String message Policy bind exception missing File url to External Form NON NLS 1 Bundle Helper get Default get Log log new Status I Status WARNING IPDE Build Constants PI PDEBUILD IPDE Build Constants EXCEPTION READING FILE message null return props  InputStream openStream IOException missingFile toExternalForm BundleHelper getDefault getLog IStatus IPDEBuildConstants PI_PDEBUILD IPDEBuildConstants EXCEPTION_READING_FILE

private String extra Plugins new String 0 public Feature Build Script Generator super  extraPlugins FeatureBuildScriptGenerator
Constructor Feature Build Script Generator public Feature Build Script Generator String feature Id String version Id Assembly Information information Gathering throws Core Exception if feature Id null String message Policy bind error missing Feature Id NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION FEATURE MISSING message null this feature Identifier feature Id this searched Version version Id assembly Data information Gathering  FeatureBuildScriptGenerator FeatureBuildScriptGenerator featureId versionId AssemblyInformation informationGathering CoreException featureId missingFeatureId CoreException IStatus PI_PDEBUILD EXCEPTION_FEATURE_MISSING featureIdentifier featureId searchedVersion versionId assemblyData informationGathering
Returns a list of Bundle Description objects representing the elements delivered by the feature return List of Bundle Description throws Core Exception protected List compute Elements throws Core Exception List result new Array List 5 I Plugin Entry plugin List feature get Plugin Entries for int i 0 i plugin List length i I Plugin Entry entry plugin List i Versioned Identifier identifier entry get Versioned Identifier Bundle Description model If we ask for 0 0 0 the call to the registry must have null as a parameter String version Requested identifier get Version to String model get Site false get Registry get Resolved Bundle identifier get Identifier version Requested if model null get Build Properties contains Key GENERATION SOURCE PLUGIN PREFIX identifier get Identifier generate Embedded Source identifier get Identifier model get Site false get Registry get Resolved Bundle identifier get Identifier version Requested if model null String message Policy bind exception missing Plugin entry get Versioned Identifier to String NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION PLUGIN MISSING message null else result add model collect Element To Assemble plugin List i collect Source Plugins plugin List i model return result  BundleDescription BundleDescription CoreException computeElements CoreException ArrayList IPluginEntry pluginList getPluginEntries pluginList IPluginEntry pluginList VersionedIdentifier getVersionedIdentifier BundleDescription versionRequested getVersion toString getSite getRegistry getResolvedBundle getIdentifier versionRequested getBuildProperties containsKey GENERATION_SOURCE_PLUGIN_PREFIX getIdentifier generateEmbeddedSource getIdentifier getSite getRegistry getResolvedBundle getIdentifier versionRequested missingPlugin getVersionedIdentifier toString CoreException IStatus PI_PDEBUILD EXCEPTION_PLUGIN_MISSING collectElementToAssemble pluginList collectSourcePlugins pluginList
private void generate Embedded Source String plugin Id throws Core Exception Feature Build Script Generator feature Generator new Feature Build Script Generator Utils get Array From String get Build Properties get Property GENERATION SOURCE PLUGIN PREFIX plugin Id 0 null assembly Data feature Generator set Generate Included Features false feature Generator set Analyse Children analyse Plugins feature Generator set Source Feature Generation true feature Generator set Extra Plugins Utils get Array From String get Build Properties get Property GENERATION SOURCE PLUGIN PREFIX plugin Id feature Generator set Binary Feature Generation false feature Generator set Script Generation false feature Generator set Plugin Path plugin Path feature Generator set Build Site Factory site Factory feature Generator set Dev Entries dev Entries feature Generator set Compiled Elements get Compiled Elements feature Generator set Source To Gather source To Gather feature Generator set Source Plugin Only true feature Generator set BuildingOS Gi is BuildingOS Gi feature Generator generate  generateEmbeddedSource pluginId CoreException FeatureBuildScriptGenerator featureGenerator FeatureBuildScriptGenerator getArrayFromString getBuildProperties getProperty GENERATION_SOURCE_PLUGIN_PREFIX pluginId assemblyData featureGenerator setGenerateIncludedFeatures featureGenerator setAnalyseChildren analysePlugins featureGenerator setSourceFeatureGeneration featureGenerator setExtraPlugins getArrayFromString getBuildProperties getProperty GENERATION_SOURCE_PLUGIN_PREFIX pluginId featureGenerator setBinaryFeatureGeneration featureGenerator setScriptGeneration featureGenerator setPluginPath pluginPath featureGenerator setBuildSiteFactory siteFactory featureGenerator setDevEntries devEntries featureGenerator setCompiledElements getCompiledElements featureGenerator setSourceToGather sourceToGather featureGenerator setSourcePluginOnly featureGenerator setBuildingOSGi isBuildingOSGi featureGenerator
public void set Source Plugin Only boolean b source Plugin Only b  setSourcePluginOnly sourcePluginOnly
private void collect Source Plugins I Plugin Entry plugin Entry Bundle Description model if source Feature Generation return The generic entry may not be part of the configuration we are building however the code for a non platform specific plugin still needs to go into a generic source plugin if plugin Entry getOS null plugin Entry getWS null plugin Entry getOS Arch null source To Gather add Element Entry Config generic Config model return Here we fan the plugins into the source fragment where they should go List correct Configs select Configs plugin Entry for Iterator iter correct Configs iterator iter has Next source To Gather add Element Entry Config iter next model  collectSourcePlugins IPluginEntry pluginEntry BundleDescription sourceFeatureGeneration pluginEntry pluginEntry pluginEntry getOSArch sourceToGather addElementEntry genericConfig correctConfigs selectConfigs pluginEntry correctConfigs hasNext sourceToGather addElementEntry
Set the boolean for whether or not children scripts should be generated param generate code true code if the children scripts should be generated code false code otherwise public void set Analyse Children boolean generate analyse Plugins generate  setAnalyseChildren analysePlugins
see Abstract Script Generator generate public void generate throws Core Exception String message if working Directory null message Policy bind error missing Install Location NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION BUILDDIRECTORY LOCATION MISSING message null NON NLS 1 initialize Variables if the feature defines its own custom script we do not generate a new one but we do try to update the version number String custom String get Build Properties get PROPERTY CUSTOM if TRUE equals Ignore Case custom NON NLS 1 File build File new File feature Root Location DEFAULT BUILD SCRIPT FILENAME try update Version build File PROPERTY FEATURE VERSION SUFFIX feature get Versioned Identifier get Version to String catch IO Exception e message Policy bind exception write Script build File to String NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING SCRIPT message e return if source Feature Generation generate Source Feature if analyse Plugins generate Children Scripts if source Feature Generation add Source Fragments To Feature write Source Feature if source Plugin Only collect Element To Assemble feature Do the recursive generation of build files for the features required by the current feature if analyse Included Features generate Included Feature Build File if source Feature Generation generate Source Feature Scripts if script Generation open Script feature Root Location DEFAULT BUILD SCRIPT FILENAME try generate Build Script finally close Script  AbstractScriptGenerator CoreException workingDirectory missingInstallLocation CoreException IStatus PI_PDEBUILD EXCEPTION_BUILDDIRECTORY_LOCATION_MISSING initializeVariables getBuildProperties PROPERTY_CUSTOM equalsIgnoreCase buildFile featureRootLocation DEFAULT_BUILD_SCRIPT_FILENAME updateVersion buildFile PROPERTY_FEATURE_VERSION_SUFFIX getVersionedIdentifier getVersion toString IOException writeScript buildFile toString CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_SCRIPT sourceFeatureGeneration generateSourceFeature analysePlugins generateChildrenScripts sourceFeatureGeneration addSourceFragmentsToFeature writeSourceFeature sourcePluginOnly collectElementToAssemble analyseIncludedFeatures generateIncludedFeatureBuildFile sourceFeatureGeneration generateSourceFeatureScripts scriptGeneration openScript featureRootLocation DEFAULT_BUILD_SCRIPT_FILENAME generateBuildScript closeScript
protected void generate Included Feature Build File throws Core Exception I Included Feature Reference referenced Features feature get Included Feature References for int i 0 i referenced Features length i String feature Id Included Feature Reference Model referenced Features i get Feature Identifier If the feature which is included is a source feature then instead of calling the generation of the featureID we are calling the generation of the corresponding binary feature but without generating the scripts set binary Feature Generation to false boolean do Source Feature Generation get Build Properties contains Key GENERATION SOURCE FEATURE PREFIX feature Id Feature Build Script Generator generator new Feature Build Script Generator do Source Feature Generation true Utils get Array From String get Build Properties get Property GENERATION SOURCE FEATURE PREFIX feature Id 0 feature Id null assembly Data If we are generating a source feature we don t want to go recursively generator set Generate Included Features do Source Feature Generation false true generator set Analyse Children analyse Plugins generator set Source Feature Generation do Source Feature Generation generator set Binary Feature Generation do Source Feature Generation We don t want to regenerate the scripts for the binary feature we are reading to build the source feature generator set Script Generation do Source Feature Generation false true if do Source Feature Generation generator set Extra Plugins Utils get Array From String get Build Properties get Property GENERATION SOURCE FEATURE PREFIX feature Id generator set Plugin Path plugin Path generator set Build Site Factory site Factory generator set Dev Entries dev Entries generator set Compiled Elements get Compiled Elements generator set Source To Gather new Source Feature Information generator set BuildingOS Gi is BuildingOS Gi generator generate  generateIncludedFeatureBuildFile CoreException IIncludedFeatureReference referencedFeatures getIncludedFeatureReferences referencedFeatures featureId IncludedFeatureReferenceModel referencedFeatures getFeatureIdentifier binaryFeatureGeneration doSourceFeatureGeneration getBuildProperties containsKey GENERATION_SOURCE_FEATURE_PREFIX featureId FeatureBuildScriptGenerator FeatureBuildScriptGenerator doSourceFeatureGeneration getArrayFromString getBuildProperties getProperty GENERATION_SOURCE_FEATURE_PREFIX featureId featureId assemblyData setGenerateIncludedFeatures doSourceFeatureGeneration setAnalyseChildren analysePlugins setSourceFeatureGeneration doSourceFeatureGeneration setBinaryFeatureGeneration doSourceFeatureGeneration setScriptGeneration doSourceFeatureGeneration doSourceFeatureGeneration setExtraPlugins getArrayFromString getBuildProperties getProperty GENERATION_SOURCE_FEATURE_PREFIX featureId setPluginPath pluginPath setBuildSiteFactory siteFactory setDevEntries devEntries setCompiledElements getCompiledElements setSourceToGather SourceFeatureInformation setBuildingOSGi isBuildingOSGi
protected void set Extra Plugins String plugins extra Plugins plugins  setExtraPlugins extraPlugins
Main call for generating the script throws Core Exception private void generate Build Script throws Core Exception if Bundle Helper get Default is Debugging System out println Generating feature feature Full Name NON NLS 1 generate Prologue generate All Plugins Target generate All Features Target generate Update Feature File generate All Children Target generate Children Target generate Build Jars Target generate Build Zips Target generate Build Update Jar Target generate Gather Bin Parts Target generate Zip Distribution Whole Target generate Zip Sources Target generate Zip Logs Target generate Clean Target generate Refresh Target generate Gather Sources Target generate Gather Logs Target generate Epilogue  CoreException generateBuildScript CoreException BundleHelper getDefault isDebugging featureFullName generatePrologue generateAllPluginsTarget generateAllFeaturesTarget generateUpdateFeatureFile generateAllChildrenTarget generateChildrenTarget generateBuildJarsTarget generateBuildZipsTarget generateBuildUpdateJarTarget generateGatherBinPartsTarget generateZipDistributionWholeTarget generateZipSourcesTarget generateZipLogsTarget generateCleanTarget generateRefreshTarget generateGatherSourcesTarget generateGatherLogsTarget generateEpilogue
Method generate Gather Source Used to enable the recursive call of gathering the sources for the features private void generate Gather Sources Target throws Core Exception script print Target Declaration TARGET GATHER SOURCES null null null null Map params new Hash Map 2 params put PROPERTY DESTINATION TEMP FOLDER get Property Format PROPERTY FEATURE TEMP FOLDER DEFAULT PLUGIN LOCATION source Feature Full Name Versionned src NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 params put PROPERTY TARGET TARGET GATHER SOURCES script print Ant Call Task TARGET CHILDREN null params script print Target End  generateGatherSource generateGatherSourcesTarget CoreException printTargetDeclaration TARGET_GATHER_SOURCES HashMap PROPERTY_DESTINATION_TEMP_FOLDER getPropertyFormat PROPERTY_FEATURE_TEMP_FOLDER DEFAULT_PLUGIN_LOCATION sourceFeatureFullNameVersionned PROPERTY_TARGET TARGET_GATHER_SOURCES printAntCallTask TARGET_CHILDREN printTargetEnd
Method generate Gather Source Used to enable the recursive call of gathering the sources for the features private void generate Gather Logs Target script println script print Target Declaration TARGET GATHER LOGS TARGET INIT null null null script print Mkdir Task feature Temp Folder Map params new Hash Map 1 params put PROPERTY TARGET TARGET GATHER LOGS params put PROPERTY DESTINATION TEMP FOLDER new Path feature Temp Folder append DEFAULT PLUGIN LOCATION to String NON NLS 1 script print Ant Call Task TARGET ALL CHILDREN false params NON NLS 1 script print Target End  generateGatherSource generateGatherLogsTarget printTargetDeclaration TARGET_GATHER_LOGS TARGET_INIT printMkdirTask featureTempFolder HashMap PROPERTY_TARGET TARGET_GATHER_LOGS PROPERTY_DESTINATION_TEMP_FOLDER featureTempFolder DEFAULT_PLUGIN_LOCATION toString printAntCallTask TARGET_ALL_CHILDREN printTargetEnd
private void generate Update Feature File script print Target Declaration TARGET UPDATE FEATURE FILE TARGET INIT null null null script print Target End  generateUpdateFeatureFile printTargetDeclaration TARGET_UPDATE_FEATURE_FILE TARGET_INIT printTargetEnd
Add the code build zips code target to the given Ant script throws Core Exception private void generate Build Zips Target throws Core Exception String Buffer zips new String Buffer Properties props get Build Properties for Iterator iterator props entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String key String entry get Key if key starts With PROPERTY SOURCE PREFIX key ends With PROPERTY ZIP SUFFIX String zip Name key substring PROPERTY SOURCE PREFIX length zips append NON NLS 1 zips append zip Name generate Zip Individual Target zip Name String entry get Value script println script print Target Declaration TARGET BUILD ZIPS TARGET INIT zips to String null null null Map params new Hash Map 2 params put PROPERTY TARGET TARGET BUILD ZIPS script print Ant Call Task TARGET ALL CHILDREN null params script print Target End  CoreException generateBuildZipsTarget CoreException StringBuffer StringBuffer getBuildProperties entrySet hasNext getKey startsWith PROPERTY_SOURCE_PREFIX endsWith PROPERTY_ZIP_SUFFIX zipName PROPERTY_SOURCE_PREFIX zipName generateZipIndividualTarget zipName getValue printTargetDeclaration TARGET_BUILD_ZIPS TARGET_INIT toString HashMap PROPERTY_TARGET TARGET_BUILD_ZIPS printAntCallTask TARGET_ALL_CHILDREN printTargetEnd
Add a code zip code target to the given Ant script param zip Name the name of the zip file to create param source the directory name to read the files from throws Core Exception private void generate Zip Individual Target String zip Name String source throws Core Exception script println script print Target Declaration zip Name TARGET INIT null null null script print Zip Task get Property Format PROPERTY BASEDIR zip Name get Property Format PROPERTY BASEDIR source false false null NON NLS 1 NON NLS 2 script print Target End  zipName CoreException generateZipIndividualTarget zipName CoreException printTargetDeclaration zipName TARGET_INIT printZipTask getPropertyFormat PROPERTY_BASEDIR zipName getPropertyFormat PROPERTY_BASEDIR printTargetEnd
Add the code clean code target to the given Ant script throws Core Exception private void generate Clean Target throws Core Exception script println script print Target Declaration TARGET CLEAN TARGET INIT null null Policy bind build feature clean feature Identifier NON NLS 1 script print Delete Task null get Property Format PROPERTY FEATURE DESTINATION feature Full Name jar null NON NLS 1 NON NLS 2 script print Delete Task null get Property Format PROPERTY FEATURE DESTINATION feature Full Name bin dist zip null NON NLS 1 NON NLS 2 script print Delete Task null get Property Format PROPERTY FEATURE DESTINATION feature Full Name log zip null NON NLS 1 NON NLS 2 script print Delete Task null get Property Format PROPERTY FEATURE DESTINATION feature Full Name src zip null NON NLS 1 NON NLS 2 script print Delete Task feature Temp Folder null null Map params new Hash Map 2 params put PROPERTY TARGET TARGET CLEAN script print Ant Call Task TARGET ALL CHILDREN null params script print Target End  CoreException generateCleanTarget CoreException printTargetDeclaration TARGET_CLEAN TARGET_INIT featureIdentifier printDeleteTask getPropertyFormat PROPERTY_FEATURE_DESTINATION featureFullName printDeleteTask getPropertyFormat PROPERTY_FEATURE_DESTINATION featureFullName printDeleteTask getPropertyFormat PROPERTY_FEATURE_DESTINATION featureFullName printDeleteTask getPropertyFormat PROPERTY_FEATURE_DESTINATION featureFullName printDeleteTask featureTempFolder HashMap PROPERTY_TARGET TARGET_CLEAN printAntCallTask TARGET_ALL_CHILDREN printTargetEnd
Add the code zip logs code target to the given Ant script private void generate Zip Logs Target script println script print Target Declaration TARGET ZIP LOGS TARGET INIT null null null script print Delete Task feature Temp Folder null null script print Mkdir Task feature Temp Folder Map params new Hash Map 1 params put PROPERTY INCLUDE CHILDREN true NON NLS 1 params put PROPERTY TARGET TARGET GATHER LOGS params put PROPERTY DESTINATION TEMP FOLDER new Path feature Temp Folder append DEFAULT PLUGIN LOCATION to String NON NLS 1 script print Ant Call Task TARGET ALL CHILDREN false params NON NLS 1 I Path destination new Path get Property Format PROPERTY FEATURE DESTINATION append feature Full Name log zip NON NLS 1 script print Zip Task destination to String feature Temp Folder true false null script print Delete Task feature Temp Folder null null script print Target End  generateZipLogsTarget printTargetDeclaration TARGET_ZIP_LOGS TARGET_INIT printDeleteTask featureTempFolder printMkdirTask featureTempFolder HashMap PROPERTY_INCLUDE_CHILDREN PROPERTY_TARGET TARGET_GATHER_LOGS PROPERTY_DESTINATION_TEMP_FOLDER featureTempFolder DEFAULT_PLUGIN_LOCATION toString printAntCallTask TARGET_ALL_CHILDREN IPath getPropertyFormat PROPERTY_FEATURE_DESTINATION featureFullName printZipTask toString featureTempFolder printDeleteTask featureTempFolder printTargetEnd
Add the code zip sources code target to the given Ant script protected void generate Zip Sources Target script println script print Target Declaration TARGET ZIP SOURCES TARGET INIT null null null script print Delete Task feature Temp Folder null null script print Mkdir Task feature Temp Folder Map params new Hash Map 1 params put PROPERTY INCLUDE CHILDREN true NON NLS 1 params put PROPERTY TARGET TARGET GATHER SOURCES params put PROPERTY DESTINATION TEMP FOLDER feature Temp Folder DEFAULT PLUGIN LOCATION source Feature Full Name Versionned src NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 script print Ant Call Task TARGET ALL CHILDREN null params script print Zip Task get Property Format PROPERTY FEATURE DESTINATION feature Full Name src zip feature Temp Folder true false null NON NLS 1 NON NLS 2 script print Delete Task feature Temp Folder null null script print Target End  generateZipSourcesTarget printTargetDeclaration TARGET_ZIP_SOURCES TARGET_INIT printDeleteTask featureTempFolder printMkdirTask featureTempFolder HashMap PROPERTY_INCLUDE_CHILDREN PROPERTY_TARGET TARGET_GATHER_SOURCES PROPERTY_DESTINATION_TEMP_FOLDER featureTempFolder DEFAULT_PLUGIN_LOCATION sourceFeatureFullNameVersionned printAntCallTask TARGET_ALL_CHILDREN printZipTask getPropertyFormat PROPERTY_FEATURE_DESTINATION featureFullName featureTempFolder printDeleteTask featureTempFolder printTargetEnd
Add the code gather bin parts code target to the given Ant script throws Core Exception private void generate Gather Bin Parts Target throws Core Exception script println script print Target Declaration TARGET GATHER BIN PARTS TARGET INIT PROPERTY FEATURE BASE null null Map params new Hash Map 1 params put PROPERTY TARGET TARGET GATHER BIN PARTS params put PROPERTY DESTINATION TEMP FOLDER new Path get Property Format PROPERTY FEATURE BASE append DEFAULT PLUGIN LOCATION to String NON NLS 1 script print Ant Call Task TARGET CHILDREN null params String include String get Build Properties get PROPERTY BIN INCLUDES String exclude String get Build Properties get PROPERTY BIN EXCLUDES String root get Property Format PROPERTY FEATURE BASE feature Folder Name NON NLS 1 TODO Ugly handling to not create the feature folder if nothing is being gathered if Abstract Script Generator output Format equals Ignore Case folder include null NON NLS 1 script print Mkdir Task root if Abstract Script Generator output Format equals Ignore Case antzip NON NLS 1 script print Mkdir Task root if Abstract Script Generator output Format equals Ignore Case zip include null NON NLS 1 script print Mkdir Task root if include null if include null exclude null File Set file Set new File Set get Property Format PROPERTY BASEDIR null include null exclude null null script print Copy Task null root new File Set file Set true Generate the parameters for the Id Replacer String feature Version Info NON NLS 1 Here we get all the included features independently of the config being built so the version numbers in the feature can be replaced I Included Feature Reference included Features feature get Raw Included Feature References for int i 0 i included Features length i String version Id included Features i get Versioned Identifier get Version to String I Feature included Feature get Site false find Feature included Features i get Versioned Identifier get Identifier version Id true Versioned Identifier included Feature Version Id included Feature get Versioned Identifier feature Version Info included Feature Version Id get Identifier included Feature Version Id get Version to String String plugin Version Info NON NLS 1 Here we get all the included plugins independently of the config being built so the version numbers in the feature can be replaced I Plugin Entry plugins Included feature get Raw Plugin Entries for int i 0 i plugins Included length i Versioned Identifier identifier plugins Included i get Versioned Identifier Bundle Description model If we ask for 0 0 0 the call to the registry must have null as a parameter String version Requested identifier get Version to String String entry Identifier identifier get Identifier model get Site false get Registry get Resolved Bundle entry Identifier version Requested if model null plugin Version Info entry Identifier model get Version script println eclipse id Replacer feature File Path root DEFAULT FEATURE FILENAME DESCRIPTOR self Version feature get Versioned Identifier get Version feature Ids feature Version Info plugin Ids plugin Version Info NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 generate Root Files And Permissions Calls script print Target End generate Root Files And Permissions  CoreException generateGatherBinPartsTarget CoreException printTargetDeclaration TARGET_GATHER_BIN_PARTS TARGET_INIT PROPERTY_FEATURE_BASE HashMap PROPERTY_TARGET TARGET_GATHER_BIN_PARTS PROPERTY_DESTINATION_TEMP_FOLDER getPropertyFormat PROPERTY_FEATURE_BASE DEFAULT_PLUGIN_LOCATION toString printAntCallTask TARGET_CHILDREN getBuildProperties PROPERTY_BIN_INCLUDES getBuildProperties PROPERTY_BIN_EXCLUDES getPropertyFormat PROPERTY_FEATURE_BASE featureFolderName AbstractScriptGenerator outputFormat equalsIgnoreCase printMkdirTask AbstractScriptGenerator outputFormat equalsIgnoreCase printMkdirTask AbstractScriptGenerator outputFormat equalsIgnoreCase printMkdirTask FileSet fileSet FileSet getPropertyFormat PROPERTY_BASEDIR printCopyTask FileSet fileSet featureVersionInfo IIncludedFeatureReference includedFeatures getRawIncludedFeatureReferences includedFeatures versionId includedFeatures getVersionedIdentifier getVersion toString IFeature includedFeature getSite findFeature includedFeatures getVersionedIdentifier getIdentifier versionId VersionedIdentifier includedFeatureVersionId includedFeature getVersionedIdentifier featureVersionInfo includedFeatureVersionId getIdentifier includedFeatureVersionId getVersion toString pluginVersionInfo IPluginEntry pluginsIncluded getRawPluginEntries pluginsIncluded VersionedIdentifier pluginsIncluded getVersionedIdentifier BundleDescription versionRequested getVersion toString entryIdentifier getIdentifier getSite getRegistry getResolvedBundle entryIdentifier versionRequested pluginVersionInfo entryIdentifier getVersion idReplacer featureFilePath DEFAULT_FEATURE_FILENAME_DESCRIPTOR selfVersion getVersionedIdentifier getVersion featureIds featureVersionInfo pluginIds pluginVersionInfo generateRootFilesAndPermissionsCalls printTargetEnd generateRootFilesAndPermissions
private void generate Root Files And Permissions Calls script print Ant Call Task TARGET ROOTFILES PREFIX get Property Format PROPERTY OS   get Property Format PROPERTY WS   get Property Format PROPERTY ARCH null null  generateRootFilesAndPermissionsCalls printAntCallTask TARGET_ROOTFILES_PREFIX getPropertyFormat PROPERTY_OS _ getPropertyFormat PROPERTY_WS _ getPropertyFormat PROPERTY_ARCH
private void generate Root Files And Permissions throws Core Exception for Iterator iter get Config Infos iterator iter has Next Config a Config Config iter next script print Target Declaration TARGET ROOTFILES PREFIX a Config to String   null null null null NON NLS 1 NON NLS 2 generate Copy Root Files a Config generate Permissions a Config script print Target End  generateRootFilesAndPermissions CoreException getConfigInfos hasNext aConfig printTargetDeclaration TARGET_ROOTFILES_PREFIX aConfig toString _ generateCopyRootFiles aConfig generatePermissions aConfig printTargetEnd
private void generate Copy Root Files Config a Config throws Core Exception String config Name String base List get Build Properties get Property ROOT NON NLS 1 NON NLS 2 String file List get Build Properties get Property ROOT PREFIX a Config to String NON NLS 1 NON NLS 2 NON NLS 3 file List file List length 0 file List base List NON NLS 1 NON NLS 2 if file List equals NON NLS 1 return assembly Data add Root File Provider a Config feature config Name a Config to String Replacing Any ANY STRING NON NLS 1 script print Mkdir Task get Property Format PROPERTY FEATURE BASE config Name get Property Format PROPERTY COLLECTING FOLDER NON NLS 1 NON NLS 2 String files Utils get Array From String file List NON NLS 1 File Set file Set new File Set files length for int i 0 i files length i String from Dir get Property Format PROPERTY BASEDIR NON NLS 1 String file files i if file starts With absolute NON NLS 1 file file substring 9 from Dir NON NLS 1 if file starts With file NON NLS 1 I Path target new Path file substring 5 file Set i new File Set from Dir target remove Last Segments 1 null target last Segment null null null null else file Set i new File Set from Dir file null null null null null NON NLS 1 script print Copy Task null get Property Format PROPERTY FEATURE BASE config Name get Property Format PROPERTY COLLECTING FOLDER file Set true  generateCopyRootFiles aConfig CoreException configName baseList getBuildProperties getProperty fileList getBuildProperties getProperty ROOT_PREFIX aConfig toString fileList fileList fileList baseList fileList assemblyData addRootFileProvider aConfig configName aConfig toStringReplacingAny ANY_STRING printMkdirTask getPropertyFormat PROPERTY_FEATURE_BASE configName getPropertyFormat PROPERTY_COLLECTING_FOLDER getArrayFromString fileList FileSet fileSet FileSet fromDir getPropertyFormat PROPERTY_BASEDIR startsWith fromDir startsWith IPath fileSet FileSet fromDir removeLastSegments lastSegment fileSet FileSet fromDir printCopyTask getPropertyFormat PROPERTY_FEATURE_BASE configName getPropertyFormat PROPERTY_COLLECTING_FOLDER fileSet
private void generate Permissions Config a Config throws Core Exception String config Infix a Config to String NON NLS 1 Properties feature Properties get Build Properties String prefix Permissions ROOT PREFIX config Infix PERMISSIONS String prefix Links ROOT PREFIX config Infix LINK String common Permissions ROOT PREFIX PERMISSIONS String common Links ROOT PREFIX LINK for Iterator iter feature Properties entry Set iterator iter has Next Map Entry permission Map Entry iter next String instruction String permission get Key String parameters String permission get Value if instruction starts With prefix Permissions generate Chmod Instruction get Property Format PROPERTY FEATURE BASE config Infix get Property Format PROPERTY COLLECTING FOLDER instruction substring prefix Permissions length parameters NON NLS 1 NON NLS 2 continue if instruction starts With prefix Links generate Link Instruction get Property Format PROPERTY FEATURE BASE config Infix get Property Format PROPERTY COLLECTING FOLDER parameters continue if instruction starts With common Permissions generate Chmod Instruction get Property Format PROPERTY FEATURE BASE config Infix get Property Format PROPERTY COLLECTING FOLDER instruction substring common Permissions length parameters continue if instruction starts With common Links generate Link Instruction get Property Format PROPERTY FEATURE BASE config Infix get Property Format PROPERTY COLLECTING FOLDER parameters continue  generatePermissions aConfig CoreException configInfix aConfig toString featureProperties getBuildProperties prefixPermissions ROOT_PREFIX configInfix prefixLinks ROOT_PREFIX configInfix commonPermissions ROOT_PREFIX commonLinks ROOT_PREFIX featureProperties entrySet hasNext getKey getValue startsWith prefixPermissions generateChmodInstruction getPropertyFormat PROPERTY_FEATURE_BASE configInfix getPropertyFormat PROPERTY_COLLECTING_FOLDER prefixPermissions startsWith prefixLinks generateLinkInstruction getPropertyFormat PROPERTY_FEATURE_BASE configInfix getPropertyFormat PROPERTY_COLLECTING_FOLDER startsWith commonPermissions generateChmodInstruction getPropertyFormat PROPERTY_FEATURE_BASE configInfix getPropertyFormat PROPERTY_COLLECTING_FOLDER commonPermissions startsWith commonLinks generateLinkInstruction getPropertyFormat PROPERTY_FEATURE_BASE configInfix getPropertyFormat PROPERTY_COLLECTING_FOLDER
private void generate Chmod Instruction String dir String rights String files if rights equals EXECUTABLE rights 755 NON NLS 1 script print Chmod dir rights files  generateChmodInstruction printChmod
private void generate Link Instruction String dir String files String links Utils get Array From String files NON NLS 1 List arguments new Array List 2 for int i 0 i links length i 2 arguments add s NON NLS 1 arguments add links i arguments add links i 1 script print Exec Task ln dir arguments Linux NON NLS 1 NON NLS 2 arguments clear  generateLinkInstruction getArrayFromString ArrayList printExecTask
Add the code build update jar code target to the given script private void generate Build Update Jar Target script println script print Target Declaration TARGET BUILD UPDATE JAR TARGET INIT null null Policy bind build feature build Update Jar feature Identifier NON NLS 1 Map params new Hash Map 1 params put PROPERTY TARGET TARGET BUILD UPDATE JAR script print Ant Call Task TARGET ALL CHILDREN null params script print Property PROPERTY FEATURE BASE feature Temp Folder script print Delete Task feature Temp Folder null null script print Mkdir Task feature Temp Folder params clear params put PROPERTY FEATURE BASE feature Temp Folder params put PROPERTY OS feature getOS null Config ANY feature getOS params put PROPERTY WS feature getWS null Config ANY feature getWS params put PROPERTY ARCH feature getOS Arch null Config ANY feature getOS Arch params put PROPERTY NL feature getNL null Config ANY feature getNL Be sure to call the gather with children turned off The only way to do this is to clear all inherited values Must remember to setup anything that is really expected script print Ant Call Task TARGET GATHER BIN PARTS false params NON NLS 1 script print Jar Task get Property Format PROPERTY FEATURE DESTINATION feature Full Name jar feature Temp Folder feature Folder Name NON NLS 1 NON NLS 2 NON NLS 3 script print Delete Task feature Temp Folder null null script print Target End  generateBuildUpdateJarTarget printTargetDeclaration TARGET_BUILD_UPDATE_JAR TARGET_INIT buildUpdateJar featureIdentifier HashMap PROPERTY_TARGET TARGET_BUILD_UPDATE_JAR printAntCallTask TARGET_ALL_CHILDREN printProperty PROPERTY_FEATURE_BASE featureTempFolder printDeleteTask featureTempFolder printMkdirTask featureTempFolder PROPERTY_FEATURE_BASE featureTempFolder PROPERTY_OS PROPERTY_WS PROPERTY_ARCH getOSArch getOSArch PROPERTY_NL printAntCallTask TARGET_GATHER_BIN_PARTS printJarTask getPropertyFormat PROPERTY_FEATURE_DESTINATION featureFullName featureTempFolder featureFolderName printDeleteTask featureTempFolder printTargetEnd
Add the code zip distribution code target to the given Ant script Zip up the whole feature protected void generate Zip Distribution Whole Target script println script print Target Declaration TARGET ZIP DISTRIBUTION TARGET INIT null null Policy bind build feature zips feature Identifier NON NLS 1 script print Delete Task feature Temp Folder null null script print Mkdir Task feature Temp Folder Map params new Hash Map 1 params put PROPERTY FEATURE BASE feature Temp Folder params put PROPERTY INCLUDE CHILDREN TRUE NON NLS 1 params put PROPERTY OS feature getOS null Config ANY feature getOS params put PROPERTY WS feature getWS null Config ANY feature getWS params put PROPERTY ARCH feature getOS Arch null Config ANY feature getOS Arch params put PROPERTY NL feature getNL null Config ANY feature getNL script print Ant Call Task TARGET GATHER BIN PARTS null params script print Zip Task get Property Format PROPERTY FEATURE DESTINATION feature Full Name bin dist zip feature Temp Folder false false null NON NLS 1 NON NLS 2 script print Delete Task feature Temp Folder null null script print Target End  generateZipDistributionWholeTarget printTargetDeclaration TARGET_ZIP_DISTRIBUTION TARGET_INIT featureIdentifier printDeleteTask featureTempFolder printMkdirTask featureTempFolder HashMap PROPERTY_FEATURE_BASE featureTempFolder PROPERTY_INCLUDE_CHILDREN PROPERTY_OS PROPERTY_WS PROPERTY_ARCH getOSArch getOSArch PROPERTY_NL printAntCallTask TARGET_GATHER_BIN_PARTS printZipTask getPropertyFormat PROPERTY_FEATURE_DESTINATION featureFullName featureTempFolder printDeleteTask featureTempFolder printTargetEnd
Executes a given target in all children s script files private void generate All Children Target String Buffer depends new String Buffer depends append TARGET INIT depends append depends append TARGET ALL FEATURES depends append depends append TARGET ALL PLUGINS depends append depends append TARGET UPDATE FEATURE FILE script println script print Target Declaration TARGET ALL CHILDREN depends to String null null null script print Target End  generateAllChildrenTarget StringBuffer StringBuffer TARGET_INIT TARGET_ALL_FEATURES TARGET_ALL_PLUGINS TARGET_UPDATE_FEATURE_FILE printTargetDeclaration TARGET_ALL_CHILDREN toString printTargetEnd
Target responsible for delegating target calls to plug in s build xml scripts Plugins are sorted according to the requires chain Fragments are inserted afterward throws Core Exception protected void generate All Plugins Target throws Core Exception List plugins compute Elements plugins Utils extract Plugins get Site false get Registry get Sorted Bundles plugins script println script print Target Declaration TARGET ALL PLUGINS TARGET INIT null null null Set written Calls new Hash Set plugins size for Iterator iter plugins iterator iter has Next Bundle Description current Bundle Description iter next Get the os ws arch to pass as a parameter to the plugin if written Calls contains current continue written Calls add current I Plugin Entry entries Utils get Plugin Entry feature current get Symbolic Name false for int j 0 j entries length j List list select Configs entries j if list size 0 continue Map params null Config a Matching Config Config list get 0 params new Hash Map 3 if a Matching Config get Os equals Config ANY params put PROPERTY OS a Matching Config get Os if a Matching Config get Ws equals Config ANY params put PROPERTY WS a Matching Config get Ws if a Matching Config get Arch equals Config ANY params put PROPERTY ARCH a Matching Config get Arch I Path location Utils make Relative new Path get Location current new Path feature Root Location script print Ant Task DEFAULT BUILD SCRIPT FILENAME location to String get Property Format PROPERTY TARGET null null params script print Target End  CoreException generateAllPluginsTarget CoreException computeElements extractPlugins getSite getRegistry getSortedBundles printTargetDeclaration TARGET_ALL_PLUGINS TARGET_INIT writtenCalls HashSet hasNext BundleDescription BundleDescription writtenCalls writtenCalls IPluginEntry getPluginEntry getSymbolicName selectConfigs aMatchingConfig HashMap aMatchingConfig getOs PROPERTY_OS aMatchingConfig getOs aMatchingConfig getWs PROPERTY_WS aMatchingConfig getWs aMatchingConfig getArch PROPERTY_ARCH aMatchingConfig getArch IPath makeRelative getLocation featureRootLocation printAntTask DEFAULT_BUILD_SCRIPT_FILENAME toString getPropertyFormat PROPERTY_TARGET printTargetEnd
private void generate All Features Target throws Core Exception script print Target Declaration TARGET ALL FEATURES TARGET INIT null null null if analyse Included Features I Included Feature Reference features feature get Included Feature References for int i 0 i features length i String feature Id features i get Versioned Identifier get Identifier String version Id features i get Versioned Identifier get Version to String I Feature included Feature get Site false find Feature feature Id version Id false String included Feature Directory included Feature getURL get Path int j included Feature Directory last Index Of DEFAULT FEATURE FILENAME DESCRIPTOR if j 1 included Feature Directory included Feature Directory substring 0 j I Path location location Utils make Relative new Path included Feature Directory new Path feature Root Location script print Ant Task DEFAULT BUILD SCRIPT FILENAME location to String get Property Format PROPERTY TARGET null null null script print Target End  generateAllFeaturesTarget CoreException printTargetDeclaration TARGET_ALL_FEATURES TARGET_INIT analyseIncludedFeatures IIncludedFeatureReference getIncludedFeatureReferences featureId getVersionedIdentifier getIdentifier versionId getVersionedIdentifier getVersion toString IFeature includedFeature getSite findFeature featureId versionId includedFeatureDirectory includedFeature getPath includedFeatureDirectory lastIndexOf DEFAULT_FEATURE_FILENAME_DESCRIPTOR includedFeatureDirectory includedFeatureDirectory IPath makeRelative includedFeatureDirectory featureRootLocation printAntTask DEFAULT_BUILD_SCRIPT_FILENAME toString getPropertyFormat PROPERTY_TARGET printTargetEnd
Just ends the script private void generate Epilogue script println script print Project End  generateEpilogue printProjectEnd
Defines the XML declaration Ant project and init target private void generate Prologue script print Project Declaration feature get Versioned Identifier get Identifier TARGET BUILD UPDATE JAR NON NLS 1 script println script print Target Declaration TARGET INIT null null null null script print Property PROPERTY FEATURE TEMP FOLDER get Property Format PROPERTY BASEDIR PROPERTY FEATURE TEMP FOLDER NON NLS 1 script print Property PROPERTY FEATURE DESTINATION get Property Format PROPERTY BASEDIR script print Target End  generatePrologue printProjectDeclaration getVersionedIdentifier getIdentifier TARGET_BUILD_UPDATE_JAR printTargetDeclaration TARGET_INIT printProperty PROPERTY_FEATURE_TEMP_FOLDER getPropertyFormat PROPERTY_BASEDIR PROPERTY_FEATURE_TEMP_FOLDER printProperty PROPERTY_FEATURE_DESTINATION getPropertyFormat PROPERTY_BASEDIR printTargetEnd
throws Core Exception private void generate Children Scripts throws Core Exception List plugins compute Elements generate Models Utils extract Plugins get Site false get Registry get Sorted Bundles plugins  CoreException generateChildrenScripts CoreException computeElements generateModels extractPlugins getSite getRegistry getSortedBundles
param models throws Core Exception private void generate Models List models throws Core Exception if script Generation false return if binary Feature false models is Empty return for Iterator iterator models iterator iterator has Next Bundle Description model Bundle Description iterator next Model Build Script Generator generator new Model Build Script Generator generator set Build Site Factory site Factory generator set Compiled Elements get Compiled Elements generator set Model model set Model has to be called before configure Persistent Properties because it reads the model s properties generator set Feature Generator this generator set Plugin Path get Plugin Path generator set BuildingOS Gi is BuildingOS Gi generator set Dev Entries dev Entries generator generate  CoreException generateModels CoreException scriptGeneration binaryFeature isEmpty hasNext BundleDescription BundleDescription ModelBuildScriptGenerator ModelBuildScriptGenerator setBuildSiteFactory siteFactory setCompiledElements getCompiledElements setModel setModel configurePersistentProperties setFeatureGenerator setPluginPath getPluginPath setBuildingOSGi isBuildingOSGi setDevEntries devEntries
Set this object s feature id to be the given value param featureID the feature id throws Core Exception if the given feature id is code null code public void set Feature String featureID throws Core Exception if featureID null String message Policy bind error missing Feature Id NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION FEATURE MISSING message null this feature Identifier featureID  CoreException setFeature CoreException missingFeatureId CoreException IStatus PI_PDEBUILD EXCEPTION_FEATURE_MISSING featureIdentifier
private void initialize Variables throws Core Exception feature get Site false find Feature feature Identifier searched Version true if feature Root Location null feature Root Location feature getURL get Path int i feature Root Location last Index Of DEFAULT FEATURE FILENAME DESCRIPTOR if i 1 feature Root Location feature Root Location substring 0 i feature Full Name feature get Versioned Identifier to String feature Folder Name DEFAULT FEATURE LOCATION feature Full Name NON NLS 1 source Feature Full Name compute Source Feature Name feature false source Feature Full Name Versionned compute Source Feature Name feature true feature Temp Folder get Property Format PROPERTY FEATURE TEMP FOLDER  initializeVariables CoreException getSite findFeature featureIdentifier searchedVersion featureRootLocation featureRootLocation getPath featureRootLocation lastIndexOf DEFAULT_FEATURE_FILENAME_DESCRIPTOR featureRootLocation featureRootLocation featureFullName getVersionedIdentifier toString featureFolderName DEFAULT_FEATURE_LOCATION featureFullName sourceFeatureFullName computeSourceFeatureName sourceFeatureFullNameVersionned computeSourceFeatureName featureTempFolder getPropertyFormat PROPERTY_FEATURE_TEMP_FOLDER
private String compute Source Feature Name I Feature feature For Name boolean with Number throws Core Exception String source Feature Name get Build Properties get Property PROPERTY SOURCE FEATURE NAME if source Feature Name null source Feature Name feature For Name get Versioned Identifier get Identifier source NON NLS 1 return source Feature Name with Number   feature For Name get Versioned Identifier get Version to String NON NLS 1 NON NLS 2  computeSourceFeatureName IFeature featureForName withNumber CoreException sourceFeatureName getBuildProperties getProperty PROPERTY_SOURCE_FEATURE_NAME sourceFeatureName sourceFeatureName featureForName getVersionedIdentifier getIdentifier sourceFeatureName withNumber _ featureForName getVersionedIdentifier getVersion toString
Return a properties object constructed from the build properties file for the given feature If no file exists then an empty properties object is returned return Properties the feature s build properties throws Core Exception see Feature protected Properties get Build Properties throws Core Exception if build Properties null build Properties read Properties feature Root Location PROPERTIES FILE I Status WARNING return build Properties  CoreException getBuildProperties CoreException buildProperties buildProperties readProperties featureRootLocation PROPERTIES_FILE IStatus buildProperties
Add the code children code target to the given Ant script Delegates some target call to all template only if the property include Children is set private void generate Children Target script println script print Target Declaration TARGET CHILDREN null PROPERTY INCLUDE CHILDREN null null script print Ant Call Task TARGET ALL CHILDREN null null script print Target End  includeChildren generateChildrenTarget printTargetDeclaration TARGET_CHILDREN PROPERTY_INCLUDE_CHILDREN printAntCallTask TARGET_ALL_CHILDREN printTargetEnd
Add the code build jars code target to the given Ant script throws Core Exception private void generate Build Jars Target throws Core Exception script println script print Target Declaration TARGET BUILD JARS TARGET INIT null null Policy bind build feature build Jars feature Identifier NON NLS 1 Map params new Hash Map 1 params put PROPERTY TARGET TARGET BUILD JARS script print Ant Call Task TARGET ALL CHILDREN null params script print Target End script println script print Target Declaration TARGET BUILD SOURCES TARGET INIT null null null params clear params put PROPERTY TARGET TARGET BUILD SOURCES script print Ant Call Task TARGET ALL CHILDREN null params script print Target End  CoreException generateBuildJarsTarget CoreException printTargetDeclaration TARGET_BUILD_JARS TARGET_INIT buildJars featureIdentifier HashMap PROPERTY_TARGET TARGET_BUILD_JARS printAntCallTask TARGET_ALL_CHILDREN printTargetEnd printTargetDeclaration TARGET_BUILD_SOURCES TARGET_INIT PROPERTY_TARGET TARGET_BUILD_SOURCES printAntCallTask TARGET_ALL_CHILDREN printTargetEnd
Add the code refresh code target to the given Ant script private void generate Refresh Target script println script print Target Declaration TARGET REFRESH TARGET INIT PROPERTY ECLIPSE RUNNING null Policy bind build feature refresh feature Identifier NON NLS 1 script print Convert Path Task new Path feature Root Location remove Last Segments 0 toOS String replace PROPERTY RESOURCE PATH false script print Refresh Local Task get Property Format PROPERTY RESOURCE PATH infinite NON NLS 1 Map params new Hash Map 2 params put PROPERTY TARGET TARGET REFRESH script print Ant Call Task TARGET ALL CHILDREN null params script print Target End  generateRefreshTarget printTargetDeclaration TARGET_REFRESH TARGET_INIT PROPERTY_ECLIPSE_RUNNING featureIdentifier printConvertPathTask featureRootLocation removeLastSegments toOSString PROPERTY_RESOURCE_PATH printRefreshLocalTask getPropertyFormat PROPERTY_RESOURCE_PATH HashMap PROPERTY_TARGET TARGET_REFRESH printAntCallTask TARGET_ALL_CHILDREN printTargetEnd
public void set Generate Included Features boolean recursive Generation analyse Included Features recursive Generation  setGenerateIncludedFeatures recursiveGeneration analyseIncludedFeatures recursiveGeneration
protected void collect Element To Assemble I Feature feature To Collect throws Core Exception if assembly Data null get Build Properties get PROPERTY BIN INCLUDES null return List correct Configs select Configs feature To Collect Here we could sort if the feature is a common one or not by comparing the size of correct Configs for Iterator iter correct Configs iterator iter has Next Config config Config iter next assembly Data add Feature config feature  collectElementToAssemble IFeature featureToCollect CoreException assemblyData getBuildProperties PROPERTY_BIN_INCLUDES correctConfigs selectConfigs featureToCollect correctConfigs correctConfigs hasNext assemblyData addFeature
Method generate Source Feature private void generate Source Feature throws Core Exception Feature feature Example Feature feature source Feature create Source Feature feature Example associate Extra Plugins source Plugin create Source Plugin generate Source Fragment  generateSourceFeature generateSourceFeature CoreException featureExample sourceFeature createSourceFeature featureExample associateExtraPlugins sourcePlugin createSourcePlugin generateSourceFragment
private void generate Source Fragment throws Core Exception Map fragments source To Gather get Element Entries for Iterator iter fragments entry Set iterator iter has Next Map Entry fragment Info Map Entry iter next Config config Info Config fragment Info get Key if config Info equals Config generic Config continue Plugin Entry source Fragment new Plugin Entry String source Fragment Id source Feature get Feature Identifier config Info to String NON NLS 1 NON NLS 2 source Fragment set Plugin Identifier source Fragment Id source Fragment set Plugin Version source Feature get Feature Version source Fragment setOS config Info get Os source Fragment setWS config Info get Ws source Fragment set Arch config Info get Arch source Fragment is Fragment true source Feature add Plugin Entry Model source Fragment create Source Fragment source Fragment source Plugin  generateSourceFragment CoreException sourceToGather getElementEntries entrySet hasNext fragmentInfo configInfo fragmentInfo getKey configInfo genericConfig PluginEntry sourceFragment PluginEntry sourceFragmentId sourceFeature getFeatureIdentifier configInfo toString sourceFragment setPluginIdentifier sourceFragmentId sourceFragment setPluginVersion sourceFeature getFeatureVersion sourceFragment configInfo getOs sourceFragment configInfo getWs sourceFragment setArch configInfo getArch sourceFragment isFragment sourceFeature addPluginEntryModel sourceFragment createSourceFragment sourceFragment sourcePlugin
Add the relevant source fragments to the source feature private void add Source Fragments To Feature throws Core Exception Map fragments source To Gather get Element Entries for Iterator iter fragments entry Set iterator iter has Next Map Entry fragment Info Map Entry iter next Config config Info Config fragment Info get Key if config Info equals Config generic Config continue Set source List Set fragment Info get Value if source List size 0 continue Plugin Entry source Fragment new Plugin Entry String source Fragment Id source Feature get Feature Identifier config Info to String NON NLS 1 NON NLS 2 source Fragment set Plugin Identifier source Fragment Id source Fragment set Plugin Version source Feature get Feature Version source Fragment setOS config Info get Os source Fragment setWS config Info get Ws source Fragment set Arch config Info get Arch source Fragment is Fragment true source Feature add Plugin Entry Model source Fragment create Source Fragment source Fragment source Plugin  addSourceFragmentsToFeature CoreException sourceToGather getElementEntries entrySet hasNext fragmentInfo configInfo fragmentInfo getKey configInfo genericConfig sourceList fragmentInfo getValue sourceList PluginEntry sourceFragment PluginEntry sourceFragmentId sourceFeature getFeatureIdentifier configInfo toString sourceFragment setPluginIdentifier sourceFragmentId sourceFragment setPluginVersion sourceFeature getFeatureVersion sourceFragment configInfo getOs sourceFragment configInfo getWs sourceFragment setArch configInfo getArch sourceFragment isFragment sourceFeature addPluginEntryModel sourceFragment createSourceFragment sourceFragment sourcePlugin
private void generate Source Feature Scripts throws Core Exception Feature Build Script Generator source Script Generator new Feature Build Script Generator source Feature Full Name null assembly Data source Script Generator set Generate Included Features false source Script Generator set Analyse Children true source Script Generator set Source To Gather source To Gather source Script Generator set Binary Feature Generation true source Script Generator set Source Feature Generation false source Script Generator set Script Generation true source Script Generator set Plugin Path plugin Path source Script Generator set Build Site Factory site Factory source Script Generator set Dev Entries dev Entries source Script Generator set Compiled Elements get Compiled Elements source Script Generator set Source Plugin Only source Plugin Only source Script Generator set BuildingOS Gi is BuildingOS Gi source Script Generator generate  generateSourceFeatureScripts CoreException FeatureBuildScriptGenerator sourceScriptGenerator FeatureBuildScriptGenerator sourceFeatureFullName assemblyData sourceScriptGenerator setGenerateIncludedFeatures sourceScriptGenerator setAnalyseChildren sourceScriptGenerator setSourceToGather sourceToGather sourceScriptGenerator setBinaryFeatureGeneration sourceScriptGenerator setSourceFeatureGeneration sourceScriptGenerator setScriptGeneration sourceScriptGenerator setPluginPath pluginPath sourceScriptGenerator setBuildSiteFactory siteFactory sourceScriptGenerator setDevEntries devEntries sourceScriptGenerator setCompiledElements getCompiledElements sourceScriptGenerator setSourcePluginOnly sourcePluginOnly sourceScriptGenerator setBuildingOSGi isBuildingOSGi sourceScriptGenerator
Add extra plugins into the given feature private void associate Extra Plugins throws Core Exception for int i 1 i extra Plugins length i Bundle Description model see if we have a plug in or a fragment model get Site false get Registry get Resolved Bundle extra Plugins i starts With plugin extra Plugins i substring 7 extra Plugins i substring 8 NON NLS 1 if model null String message Policy bind exception missing Plugin extra Plugins i NON NLS 1 Bundle Helper get Default get Log log new Status I Status WARNING extra Plugins i EXCEPTION PLUGIN MISSING message null continue Plugin Entry entry new Plugin Entry entry set Plugin Identifier model get Symbolic Name entry set Plugin Version model get Version to String source Feature add Plugin Entry Model entry  associateExtraPlugins CoreException extraPlugins BundleDescription getSite getRegistry getResolvedBundle extraPlugins startsWith extraPlugins extraPlugins missingPlugin extraPlugins BundleHelper getDefault getLog IStatus extraPlugins EXCEPTION_PLUGIN_MISSING PluginEntry PluginEntry setPluginIdentifier getSymbolicName setPluginVersion getVersion toString sourceFeature addPluginEntryModel
Method create Source Plugin private Plugin Entry create Source Plugin throws Core Exception Create an object representing the plugin Plugin Entry result new Plugin Entry String source Plugin Id source Feature get Feature Identifier result set Plugin Identifier source Plugin Id result set Plugin Version source Feature get Feature Version source Feature add Plugin Entry Model result create the directory for the plugin I Path source Plugin DirURL new Path working Directory DEFAULT PLUGIN LOCATION get Source Plugin Name result false NON NLS 1 NON NLS 2 File source Plugin Dir source Plugin DirURL to File source Plugin Dir mkdir Create the plugin xml String Buffer buffer Path template PluginXML new Path templates plugin DEFAULT PLUGIN FILENAME DESCRIPTOR NON NLS 1 URL template PluginURL Bundle Helper get Default find template PluginXML if template PluginURL null I Status status new Status I Status WARNING PI PDEBUILD IPDE Build Constants EXCEPTION READING FILE Policy bind error reading Directory template PluginURL to External Form null NON NLS 1 Bundle Helper get Default get Log log status return null try buffer read File template PluginURL open Stream NON NLS 1 catch IO Exception e1 String message Policy bind exception reading File template PluginURL to External Form NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION READING FILE message e1 int begin Id scan buffer 0 REPLACED PLUGIN ID buffer replace begin Id begin Id REPLACED PLUGIN ID length result get Plugin Identifier set the version number begin Id scan buffer begin Id REPLACED PLUGIN VERSION buffer replace begin Id begin Id REPLACED PLUGIN VERSION length result get Plugin Version try Utils transfer Streams new Byte Array Input Stream buffer to String get Bytes new File Output Stream source Plugin DirURL append DEFAULT PLUGIN FILENAME DESCRIPTOR toOS String catch IO Exception e1 String message Policy bind exception reading File template PluginURL to External Form NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION READING FILE message e1 Collection copied Files Utils copy Files feature Root Location source Template Plugin source Plugin Dir get Absolute Path NON NLS 1 NON NLS 2 If a build properties file already exist then we use it supposing it is correct File build Property source Plugin DirURL append PROPERTIES FILE to File if build Property exists copied Files add DEFAULT PLUGIN FILENAME DESCRIPTOR Because the plugin xml is not copied we need to add it to the file copied Files add src zip NON NLS 1 Properties source Build Properties new Properties source Build Properties put PROPERTY BIN INCLUDES Utils get String From Collection copied Files NON NLS 1 source Build Properties put SOURCE PLUGIN ATTRIBUTE true NON NLS 1 try Output Stream build File new Buffered Output Stream new File Output Stream build Property try source Build Properties store build File null NON NLS 1 finally build File close catch File Not Found Exception e String message Policy bind exception writing File build Property get Absolute Path NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING FILE message e catch IO Exception e String message Policy bind exception writing File build Property get Absolute Path NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING FILE message e get Site false get Registry add Bundle source Plugin Dir return result  createSourcePlugin PluginEntry createSourcePlugin CoreException PluginEntry PluginEntry sourcePluginId sourceFeature getFeatureIdentifier setPluginIdentifier sourcePluginId setPluginVersion sourceFeature getFeatureVersion sourceFeature addPluginEntryModel IPath sourcePluginDirURL workingDirectory DEFAULT_PLUGIN_LOCATION getSourcePluginName sourcePluginDir sourcePluginDirURL toFile sourcePluginDir StringBuffer templatePluginXML DEFAULT_PLUGIN_FILENAME_DESCRIPTOR templatePluginURL BundleHelper getDefault templatePluginXML templatePluginURL IStatus IStatus PI_PDEBUILD IPDEBuildConstants EXCEPTION_READING_FILE readingDirectory templatePluginURL toExternalForm BundleHelper getDefault getLog readFile templatePluginURL openStream IOException readingFile templatePluginURL toExternalForm CoreException IStatus PI_PDEBUILD EXCEPTION_READING_FILE beginId REPLACED_PLUGIN_ID beginId beginId REPLACED_PLUGIN_ID getPluginIdentifier beginId beginId REPLACED_PLUGIN_VERSION beginId beginId REPLACED_PLUGIN_VERSION getPluginVersion transferStreams ByteArrayInputStream toString getBytes FileOutputStream sourcePluginDirURL DEFAULT_PLUGIN_FILENAME_DESCRIPTOR toOSString IOException readingFile templatePluginURL toExternalForm CoreException IStatus PI_PDEBUILD EXCEPTION_READING_FILE copiedFiles copyFiles featureRootLocation sourceTemplatePlugin sourcePluginDir getAbsolutePath buildProperty sourcePluginDirURL PROPERTIES_FILE toFile buildProperty copiedFiles DEFAULT_PLUGIN_FILENAME_DESCRIPTOR copiedFiles sourceBuildProperties sourceBuildProperties PROPERTY_BIN_INCLUDES getStringFromCollection copiedFiles sourceBuildProperties SOURCE_PLUGIN_ATTRIBUTE OutputStream buildFile BufferedOutputStream FileOutputStream buildProperty sourceBuildProperties buildFile buildFile FileNotFoundException writingFile buildProperty getAbsolutePath CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE IOException writingFile buildProperty getAbsolutePath CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE getSite getRegistry addBundle sourcePluginDir
private void create Source Fragment Plugin Entry fragment Plugin Entry plugin throws Core Exception create the directory for the plugin Path source Fragment DirURL new Path working Directory DEFAULT PLUGIN LOCATION get Source Plugin Name fragment false NON NLS 1 NON NLS 2 File source Fragment Dir new File source Fragment DirURL toOS String source Fragment Dir mkdir try read the content of the template file Path fragment Path new Path templates fragment DEFAULT FRAGMENT FILENAME DESCRIPTOR NON NLS 1 URL template Location Bundle Helper get Default find fragment Path if template Location null I Status status new Status I Status WARNING PI PDEBUILD IPDE Build Constants EXCEPTION READING FILE Policy bind error reading Directory fragment Path to String null NON NLS 1 Bundle Helper get Default get Log log status return String Buffer buffer read File template Location open Stream NON NLS 1 Set the Id of the fragment int begin Id scan buffer 0 REPLACED FRAGMENT ID buffer replace begin Id begin Id REPLACED FRAGMENT ID length fragment get Plugin Identifier set the version number begin Id scan buffer begin Id REPLACED FRAGMENT VERSION buffer replace begin Id begin Id REPLACED FRAGMENT VERSION length fragment get Plugin Version Set the Id of the plugin for the fragment begin Id scan buffer begin Id REPLACED PLUGIN ID buffer replace begin Id begin Id REPLACED PLUGIN ID length plugin get Plugin Identifier set the version number of the plugin to which the fragment is attached to begin Id scan buffer begin Id REPLACED PLUGIN VERSION buffer replace begin Id begin Id REPLACED PLUGIN VERSION length plugin get Plugin Version Utils transfer Streams new Byte Array Input Stream buffer to String get Bytes new File Output Stream source Fragment DirURL append DEFAULT FRAGMENT FILENAME DESCRIPTOR toOS String Collection copied Files Utils copy Files feature Root Location source Template Fragment source Fragment Dir get Absolute Path NON NLS 1 NON NLS 2 File build Property source Fragment DirURL append PROPERTIES FILE to File if build Property exists If a build properties file already exist then we don t override it copied Files add DEFAULT FRAGMENT FILENAME DESCRIPTOR Because the fragment xml is not copied we need to add it to the file copied Files add src NON NLS 1 Properties source Build Properties new Properties source Build Properties put PROPERTY BIN INCLUDES Utils get String From Collection copied Files NON NLS 1 source Build Properties put source Plugin true NON NLS 1 NON NLS 2 try Output Stream build File new Buffered Output Stream new File Output Stream build Property try source Build Properties store build File null NON NLS 1 finally build File close catch File Not Found Exception e String message Policy bind exception writing File build Property get Absolute Path NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING FILE message e catch IO Exception e String message Policy bind exception writing File build Property get Absolute Path NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING FILE message e catch IO Exception e String message Policy bind exception writing File source Fragment Dir get Name NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING FILE message null get Site false get Registry add Bundle source Fragment Dir  createSourceFragment PluginEntry PluginEntry CoreException sourceFragmentDirURL workingDirectory DEFAULT_PLUGIN_LOCATION getSourcePluginName sourceFragmentDir sourceFragmentDirURL toOSString sourceFragmentDir fragmentPath DEFAULT_FRAGMENT_FILENAME_DESCRIPTOR templateLocation BundleHelper getDefault fragmentPath templateLocation IStatus IStatus PI_PDEBUILD IPDEBuildConstants EXCEPTION_READING_FILE readingDirectory fragmentPath toString BundleHelper getDefault getLog StringBuffer readFile templateLocation openStream beginId REPLACED_FRAGMENT_ID beginId beginId REPLACED_FRAGMENT_ID getPluginIdentifier beginId beginId REPLACED_FRAGMENT_VERSION beginId beginId REPLACED_FRAGMENT_VERSION getPluginVersion beginId beginId REPLACED_PLUGIN_ID beginId beginId REPLACED_PLUGIN_ID getPluginIdentifier beginId beginId REPLACED_PLUGIN_VERSION beginId beginId REPLACED_PLUGIN_VERSION getPluginVersion transferStreams ByteArrayInputStream toString getBytes FileOutputStream sourceFragmentDirURL DEFAULT_FRAGMENT_FILENAME_DESCRIPTOR toOSString copiedFiles copyFiles featureRootLocation sourceTemplateFragment sourceFragmentDir getAbsolutePath buildProperty sourceFragmentDirURL PROPERTIES_FILE toFile buildProperty copiedFiles DEFAULT_FRAGMENT_FILENAME_DESCRIPTOR copiedFiles sourceBuildProperties sourceBuildProperties PROPERTY_BIN_INCLUDES getStringFromCollection copiedFiles sourceBuildProperties sourcePlugin OutputStream buildFile BufferedOutputStream FileOutputStream buildProperty sourceBuildProperties buildFile buildFile FileNotFoundException writingFile buildProperty getAbsolutePath CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE IOException writingFile buildProperty getAbsolutePath CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE IOException writingFile sourceFragmentDir getName CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE getSite getRegistry addBundle sourceFragmentDir
public String get Source Plugin Name Plugin Entry plugin boolean version Suffix return plugin get Plugin Identifier version Suffix   plugin get Plugin Version NON NLS 1 NON NLS 2  getSourcePluginName PluginEntry versionSuffix getPluginIdentifier versionSuffix _ getPluginVersion
public void set Feature Root Location String feature Location this feature Root Location feature Location  setFeatureRootLocation featureLocation featureRootLocation featureLocation
Method set Source To Gather param source To Gather public void set Source To Gather Source Feature Information source To Gather this source To Gather source To Gather  setSourceToGather sourceToGather setSourceToGather SourceFeatureInformation sourceToGather sourceToGather sourceToGather
Sets the source Feature Generation param source Feature Generation The source Feature Generation to set public void set Source Feature Generation boolean source Feature Generation this source Feature Generation source Feature Generation  sourceFeatureGeneration sourceFeatureGeneration sourceFeatureGeneration setSourceFeatureGeneration sourceFeatureGeneration sourceFeatureGeneration sourceFeatureGeneration
Sets the binary Feature Generation param binary Feature Generation The binary Feature Generation to set public void set Binary Feature Generation boolean binary Feature Generation this binary Feature binary Feature Generation  binaryFeatureGeneration binaryFeatureGeneration binaryFeatureGeneration setBinaryFeatureGeneration binaryFeatureGeneration binaryFeature binaryFeatureGeneration
Sets the script Generation param script Generation The script Generation to set public void set Script Generation boolean script Generation this script Generation script Generation  scriptGeneration scriptGeneration scriptGeneration setScriptGeneration scriptGeneration scriptGeneration scriptGeneration
Returns the source Feature Generation return boolean public boolean is Source Feature Generation return source Feature Generation  sourceFeatureGeneration isSourceFeatureGeneration sourceFeatureGeneration
protected void collect Element To Assemble I Plugin Entry entry To Collect throws Core Exception if assembly Data null return List correct Configs select Configs entry To Collect String version Requested entry To Collect get Versioned Identifier get Version to String Bundle Description effective Plugin null effective Plugin get Site false get Registry get Resolved Bundle entry To Collect get Versioned Identifier get Identifier version Requested for Iterator iter correct Configs iterator iter has Next assembly Data add Plugin Config iter next effective Plugin  collectElementToAssemble IPluginEntry entryToCollect CoreException assemblyData correctConfigs selectConfigs entryToCollect versionRequested entryToCollect getVersionedIdentifier getVersion toString BundleDescription effectivePlugin effectivePlugin getSite getRegistry getResolvedBundle entryToCollect getVersionedIdentifier getIdentifier versionRequested correctConfigs hasNext assemblyData addPlugin effectivePlugin
Create a feature object representing a source feature based on the feature Example private Feature create Source Feature Feature feature Example throws Core Exception Feature result new Feature result set Feature Identifier compute Source Feature Name feature Example false result set Feature Version feature Example get Versioned Identifier get Version to String result set Label feature Example get Label Non Localized result set Provider feature Example get Provider Non Localized result set ImageURL String feature Example get ImageURL String result set Install Handler Model feature Example get Install Handler Model result set Description Model feature Example get Description Model result set Copyright Model feature Example get Copyright Model result set License Model feature Example get License Model result set Update Site Entry Model feature Example get Update Site Entry Model URL Entry Model site Entries feature Example get Discovery Site Entry Models result set Discovery Site Entry Models site Entries null site Entries length 0 null site Entries result setOS feature Example getOS result set Arch feature Example getOS Arch result setWS feature Example getWS return result  featureExample createSourceFeature featureExample CoreException setFeatureIdentifier computeSourceFeatureName featureExample setFeatureVersion featureExample getVersionedIdentifier getVersion toString setLabel featureExample getLabelNonLocalized setProvider featureExample getProviderNonLocalized setImageURLString featureExample getImageURLString setInstallHandlerModel featureExample getInstallHandlerModel setDescriptionModel featureExample getDescriptionModel setCopyrightModel featureExample getCopyrightModel setLicenseModel featureExample getLicenseModel setUpdateSiteEntryModel featureExample getUpdateSiteEntryModel URLEntryModel siteEntries featureExample getDiscoverySiteEntryModels setDiscoverySiteEntryModels siteEntries siteEntries siteEntries featureExample setArch featureExample getOSArch featureExample
private void write Source Feature throws Core Exception String source Feature Dir working Directory DEFAULT FEATURE LOCATION source Feature Full Name NON NLS 1 NON NLS 2 File source Dir new File source Feature Dir source Dir mkdir write the source feature to the feature xml File file new File source Feature Dir DEFAULT FEATURE FILENAME DESCRIPTOR NON NLS 1 try Source Feature Writer writer new Source Feature Writer new File Output Stream file source Feature this try writer print Feature finally writer close catch IO Exception e String message Policy bind error creating Feature source Feature get Feature Identifier NON NLS 1 throw new Core Exception new Status I Status OK PI PDEBUILD EXCEPTION WRITING FILE message e Collection copied Files Utils copy Files feature Root Location source Template Feature source Feature Dir NON NLS 1 NON NLS 2 File build Property new File source Feature Dir PROPERTIES FILE NON NLS 1 if build Property exists If a build properties file already exist then we don t override it get Site false add Feature Reference Model source Dir return copied Files add DEFAULT FEATURE FILENAME DESCRIPTOR Because the feature xml is not copied we need to add it to the file Properties source Build Properties new Properties source Build Properties put PROPERTY BIN INCLUDES Utils get String From Collection copied Files NON NLS 1 Output Stream output null try output new File Output Stream build Property try source Build Properties store output null NON NLS 1 finally output close catch File Not Found Exception e String message Policy bind exception writing File build Property get Absolute Path NON NLS 1 NON NLS 2 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING FILE message e catch IO Exception e String message Policy bind exception writing File build Property get Absolute Path NON NLS 1 NON NLS 2 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING FILE message e get Site false add Feature Reference Model source Dir  writeSourceFeature CoreException sourceFeatureDir workingDirectory DEFAULT_FEATURE_LOCATION sourceFeatureFullName sourceDir sourceFeatureDir sourceDir sourceFeatureDir DEFAULT_FEATURE_FILENAME_DESCRIPTOR SourceFeatureWriter SourceFeatureWriter FileOutputStream sourceFeature printFeature IOException creatingFeature sourceFeature getFeatureIdentifier CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE copiedFiles copyFiles featureRootLocation sourceTemplateFeature sourceFeatureDir buildProperty sourceFeatureDir PROPERTIES_FILE buildProperty getSite addFeatureReferenceModel sourceDir copiedFiles DEFAULT_FEATURE_FILENAME_DESCRIPTOR sourceBuildProperties sourceBuildProperties PROPERTY_BIN_INCLUDES getStringFromCollection copiedFiles OutputStream FileOutputStream buildProperty sourceBuildProperties FileNotFoundException writingFile buildProperty getAbsolutePath CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE IOException writingFile buildProperty getAbsolutePath CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE getSite addFeatureReferenceModel sourceDir

public interface I Classpath Computer public List get Classpath Bundle Description model Model Build Script Generator Compiled Entry jar throws Core Exception  IClasspathComputer getClasspath BundleDescription ModelBuildScriptGenerator CompiledEntry CoreException

protected Compiled Entry String entry Name String entry Source String entry Output String entry Extra Classpath byte entry Type this name entry Name this source entry Source this output entry Output this extra Classpath entry Extra Classpath this type entry Type  CompiledEntry entryName entrySource entryOutput entryExtraClasspath entryType entryName entrySource entryOutput extraClasspath entryExtraClasspath entryType
protected String get Name boolean resolved if resolved return name if resolved Name null resolved Name replace Variables name true return resolved Name  getName resolvedName resolvedName replaceVariables resolvedName
protected String get Source return source  getSource
public String get Output return output  getOutput
public String get Extra Classpath return extra Classpath  getExtraClasspath extraClasspath
public byte get Type return type  getType
see Abstract Script Generator generate public void generate throws Core Exception String message if model null message Policy bind error missing Element NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION ELEMENT MISSING message null If the the plugin we want to generate is a source plugin and the feature that required the generation of this plugin is not being asked to build the source we want to leave This is particularly usefull for the case of the pde source building at least for now since the source of pde is not in a feature if feature Generator null feature Generator is Source Feature Generation false feature Generator get Build Properties contains Key GENERATION SOURCE PLUGIN PREFIX model get Symbolic Name return if Abstract Script Generator is BuildingOS Gi check Boot And Runtime initialize Variables if Bundle Helper get Default is Debugging System out println Generating plugin model get Symbolic Name NON NLS 1 String custom String get Build Properties get PROPERTY CUSTOM if custom null custom equals Ignore Case true NON NLS 1 update Existing Script return open Script get Location model build Script File Name try generate Build Script finally close Script  AbstractScriptGenerator CoreException missingElement CoreException IStatus PI_PDEBUILD EXCEPTION_ELEMENT_MISSING featureGenerator featureGenerator isSourceFeatureGeneration featureGenerator getBuildProperties containsKey GENERATION_SOURCE_PLUGIN_PREFIX getSymbolicName AbstractScriptGenerator isBuildingOSGi checkBootAndRuntime initializeVariables BundleHelper getDefault isDebugging getSymbolicName getBuildProperties PROPERTY_CUSTOM equalsIgnoreCase updateExistingScript openScript getLocation buildScriptFileName generateBuildScript closeScript
Check that boot and runtime are available otherwise throws an exception because the build will fail private void check Boot And Runtime throws Core Exception if get Site false get Registry get Resolved Bundle PI BOOT null I Status status new Status I Status ERROR PI PDEBUILD EXCEPTION PLUGIN MISSING Policy bind exception missing Plugin PI BOOT null NON NLS 1 throw new Core Exception status if get Site false get Registry get Resolved Bundle PI RUNTIME null I Status status new Status I Status ERROR PI PDEBUILD EXCEPTION PLUGIN MISSING Policy bind exception missing Plugin PI RUNTIME null NON NLS 1 throw new Core Exception status  checkBootAndRuntime CoreException getSite getRegistry getResolvedBundle PI_BOOT IStatus IStatus PI_PDEBUILD EXCEPTION_PLUGIN_MISSING missingPlugin PI_BOOT CoreException getSite getRegistry getResolvedBundle PI_RUNTIME IStatus IStatus PI_PDEBUILD EXCEPTION_PLUGIN_MISSING missingPlugin PI_RUNTIME CoreException
private void initialize Variables throws Core Exception full Name model get Symbolic Name   model get Version NON NLS 1 plugin Zip Destination PLUGIN DESTINATION full Name zip NON NLS 1 NON NLS 2 plugin Update Jar Destination PLUGIN DESTINATION full Name jar NON NLS 1 NON NLS 2 String classpath Info get Classpath Entries model if binary Plugin special Dot Processing classpath Info  initializeVariables CoreException fullName getSymbolicName _ getVersion pluginZipDestination PLUGIN_DESTINATION fullName pluginUpdateJarDestination PLUGIN_DESTINATION fullName classpathInfo getClasspathEntries binaryPlugin specialDotProcessing classpathInfo
protected static boolean find And Replace Dot String classpath Info for int i 0 i classpath Info length i if DOT equals classpath Info i classpath Info i EXPANDED DOT return true return false  findAndReplaceDot classpathInfo classpathInfo classpathInfo classpathInfo EXPANDED_DOT
private void special Dot Processing String classpath Info throws Core Exception if find And Replace Dot classpath Info String source Folder get Build Properties get Property PROPERTY SOURCE PREFIX DOT if source Folder null get Build Properties set Property PROPERTY SOURCE PREFIX EXPANDED DOT source Folder get Build Properties remove PROPERTY SOURCE PREFIX DOT String output Value get Build Properties get Property PROPERTY OUTPUT PREFIX DOT if output Value null get Build Properties set Property PROPERTY OUTPUT PREFIX EXPANDED DOT output Value get Build Properties remove PROPERTY OUTPUT PREFIX DOT String build Order get Build Properties get Property PROPERTY JAR ORDER if build Order null String order Utils get Array From String build Order for int i 0 i order length i if order i equals DOT order i EXPANDED DOT get Build Properties set Property PROPERTY JAR ORDER Utils get String From Array order NON NLS 1 String extra Entries get Build Properties get Property PROPERTY EXTRAPATH PREFIX if extra Entries null get Build Properties set Property PROPERTY EXTRAPATH PREFIX EXPANDED DOT extra Entries String include String get Build Properties get Property PROPERTY BIN INCLUDES if include String null String includes Utils get Array From String include String for int i 0 i includes length i if includes i equals DOT includes i null get Build Properties set Property PROPERTY BIN INCLUDES Utils get String From Array includes NON NLS 1 dot On The Classpath true  specialDotProcessing classpathInfo CoreException findAndReplaceDot classpathInfo sourceFolder getBuildProperties getProperty PROPERTY_SOURCE_PREFIX sourceFolder getBuildProperties setProperty PROPERTY_SOURCE_PREFIX EXPANDED_DOT sourceFolder getBuildProperties PROPERTY_SOURCE_PREFIX outputValue getBuildProperties getProperty PROPERTY_OUTPUT_PREFIX outputValue getBuildProperties setProperty PROPERTY_OUTPUT_PREFIX EXPANDED_DOT outputValue getBuildProperties PROPERTY_OUTPUT_PREFIX buildOrder getBuildProperties getProperty PROPERTY_JAR_ORDER buildOrder getArrayFromString buildOrder EXPANDED_DOT getBuildProperties setProperty PROPERTY_JAR_ORDER getStringFromArray extraEntries getBuildProperties getProperty PROPERTY_EXTRAPATH_PREFIX extraEntries getBuildProperties setProperty PROPERTY_EXTRAPATH_PREFIX EXPANDED_DOT extraEntries includeString getBuildProperties getProperty PROPERTY_BIN_INCLUDES includeString getArrayFromString includeString getBuildProperties setProperty PROPERTY_BIN_INCLUDES getStringFromArray dotOnTheClasspath
Main call for generating the script throws Core Exception private void generate Build Script throws Core Exception generate Prologue generate Build Update Jar Target if get Build Properties get Property SOURCE PLUGIN null null generate Build Jars Target model else generate Build Jars Target For Source Gathering generate Empty Build Sources Target generate Gather Bin Parts Target generate Build Zips Target generate Gather Sources Target generate Gather Log Target generate Clean Target generate Refresh Target generate Zip Plugin Target generate Epilogue  CoreException generateBuildScript CoreException generatePrologue generateBuildUpdateJarTarget getBuildProperties getProperty SOURCE_PLUGIN generateBuildJarsTarget generateBuildJarsTargetForSourceGathering generateEmptyBuildSourcesTarget generateGatherBinPartsTarget generateBuildZipsTarget generateGatherSourcesTarget generateGatherLogTarget generateCleanTarget generateRefreshTarget generateZipPluginTarget generateEpilogue
Method generate Empty Build Source Target private void generate Empty Build Sources Target script print Target Declaration TARGET BUILD SOURCES null null null null script print Target End  generateEmptyBuildSourceTarget generateEmptyBuildSourcesTarget printTargetDeclaration TARGET_BUILD_SOURCES printTargetEnd
Method generate Build Jars Target For Source Gathering private void generate Build Jars Target For Source Gathering throws Core Exception script print Target Declaration TARGET BUILD JARS null null null null compiled Jar Names new Array List 0 I Plugin Entry entry Utils get Plugin Entry feature Generator feature model get Symbolic Name false 0 Config config Info if entry getOS null entry getWS null entry getOS Arch null config Info Config generic Config else config Info new Config entry getOS entry getWS entry getOS Arch Set plugins To Gather Source From Set feature Generator source To Gather get Element Entries get config Info if plugins To Gather Source From null for Iterator iter plugins To Gather Source From iterator iter has Next Bundle Description plugin Bundle Description iter next if plugin get Symbolic Name equals model get Symbolic Name We are not trying to gather the source from ourself since we are generated and we know we don t have source continue The two steps are required because some plugins xerces junit don t build their source the source already comes zipped I Path location Utils make Relative new Path get Location plugin new Path get Location model script print Ant Task location append build Script File Name to String location toOS String TARGET BUILD SOURCES null null null Hash Map params new Hash Map 1 params put PROPERTY DESTINATION TEMP FOLDER get Property Format PROPERTY BASEDIR src NON NLS 1 script print Ant Task location append build Script File Name to String location toOS String TARGET GATHER SOURCES null null params script print Target End  generateBuildJarsTargetForSourceGathering generateBuildJarsTargetForSourceGathering CoreException printTargetDeclaration TARGET_BUILD_JARS compiledJarNames ArrayList IPluginEntry getPluginEntry featureGenerator getSymbolicName configInfo getOSArch configInfo genericConfig configInfo getOSArch pluginsToGatherSourceFrom featureGenerator sourceToGather getElementEntries configInfo pluginsToGatherSourceFrom pluginsToGatherSourceFrom hasNext BundleDescription BundleDescription getSymbolicName getSymbolicName IPath makeRelative getLocation getLocation printAntTask buildScriptFileName toString toOSString TARGET_BUILD_SOURCES HashMap HashMap PROPERTY_DESTINATION_TEMP_FOLDER getPropertyFormat PROPERTY_BASEDIR printAntTask buildScriptFileName toString toOSString TARGET_GATHER_SOURCES printTargetEnd
Add the code clean code target to the given Ant script throws Core Exception private void generate Clean Target throws Core Exception script println Properties properties get Build Properties Compiled Entry available Jars extract Entries To Compile properties script print Target Declaration TARGET CLEAN TARGET INIT null null Policy bind build plugin clean model get Symbolic Name NON NLS 1 if binary Plugin for int i 0 i available Jars length i String jar Name available Jars i get Name true if available Jars i type Compiled Entry JAR script print Delete Task null getJAR Location jar Name null else script print Delete Task getJAR Location jar Name null null script print Delete Task null getSRC Location jar Name null script print Delete Task null plugin Update Jar Destination null script print Delete Task null plugin Zip Destination null script print Delete Task get Property Format IXML Constants PROPERTY TEMP FOLDER null null script print Target End  CoreException generateCleanTarget CoreException getBuildProperties CompiledEntry availableJars extractEntriesToCompile printTargetDeclaration TARGET_CLEAN TARGET_INIT getSymbolicName binaryPlugin availableJars jarName availableJars getName availableJars CompiledEntry printDeleteTask getJARLocation jarName printDeleteTask getJARLocation jarName printDeleteTask getSRCLocation jarName printDeleteTask pluginUpdateJarDestination printDeleteTask pluginZipDestination printDeleteTask getPropertyFormat IXMLConstants PROPERTY_TEMP_FOLDER printTargetEnd
Add the code gather logs code target to the given Ant script throws Core Exception private void generate Gather Log Target throws Core Exception script println script print Target Declaration TARGET GATHER LOGS TARGET INIT PROPERTY DESTINATION TEMP FOLDER null null I Path base Destination new Path get Property Format PROPERTY DESTINATION TEMP FOLDER base Destination base Destination append full Name List destinations new Array List 5 Properties properties get Build Properties Compiled Entry available Jars extract Entries To Compile properties for int i 0 i available Jars length i String name available Jars i get Name true I Path destination base Destination append name remove Last Segments 1 remove the jar name if destinations contains destination script print Mkdir Task destination to String destinations add destination script print Copy Task get TempJAR Folder Location name log destination to String null false NON NLS 1 script print Target End  CoreException generateGatherLogTarget CoreException printTargetDeclaration TARGET_GATHER_LOGS TARGET_INIT PROPERTY_DESTINATION_TEMP_FOLDER IPath baseDestination getPropertyFormat PROPERTY_DESTINATION_TEMP_FOLDER baseDestination baseDestination fullName ArrayList getBuildProperties CompiledEntry availableJars extractEntriesToCompile availableJars availableJars getName IPath baseDestination removeLastSegments printMkdirTask toString printCopyTask getTempJARFolderLocation toString printTargetEnd
param zip Name param source throws Core Exception private void generate Zip Individual Target String zip Name String source throws Core Exception script println script print Target Declaration zip Name TARGET INIT null null null I Path root new Path get Property Format IXML Constants PROPERTY BASEDIR script print Zip Task root append zip Name to String root append source to String false false null script print Target End  zipName CoreException generateZipIndividualTarget zipName CoreException printTargetDeclaration zipName TARGET_INIT IPath getPropertyFormat IXMLConstants PROPERTY_BASEDIR printZipTask zipName toString toString printTargetEnd
Add the code gather sources code target to the given Ant script throws Core Exception private void generate Gather Sources Target throws Core Exception script println script print Target Declaration TARGET GATHER SOURCES TARGET INIT PROPERTY DESTINATION TEMP FOLDER null null if binary Plugin I Path base Destination new Path get Property Format PROPERTY DESTINATION TEMP FOLDER base Destination base Destination append full Name List destinations new Array List 5 Properties properties get Build Properties Compiled Entry available Jars extract Entries To Compile properties for int i 0 i available Jars length i String jar available Jars i get Name true I Path destination base Destination append jar remove Last Segments 1 remove the jar name if destinations contains destination script print Mkdir Task destination to String destinations add destination script print Copy Task getSRC Location jar destination to String null false String include String get Build Properties get PROPERTY SRC INCLUDES String exclude String get Build Properties get PROPERTY SRC EXCLUDES if include null exclude null File Set file Set new File Set get Property Format PROPERTY BASEDIR null include null exclude null null script print Copy Task null base Destination to String new File Set file Set false script print Target End  CoreException generateGatherSourcesTarget CoreException printTargetDeclaration TARGET_GATHER_SOURCES TARGET_INIT PROPERTY_DESTINATION_TEMP_FOLDER binaryPlugin IPath baseDestination getPropertyFormat PROPERTY_DESTINATION_TEMP_FOLDER baseDestination baseDestination fullName ArrayList getBuildProperties CompiledEntry availableJars extractEntriesToCompile availableJars availableJars getName IPath baseDestination removeLastSegments printMkdirTask toString printCopyTask getSRCLocation toString getBuildProperties PROPERTY_SRC_INCLUDES getBuildProperties PROPERTY_SRC_EXCLUDES FileSet fileSet FileSet getPropertyFormat PROPERTY_BASEDIR printCopyTask baseDestination toString FileSet fileSet printTargetEnd
private boolean contains Star Dot Jar String strings for int i 0 i strings length i if strings i ends With jar NON NLS 1 return true return false  containsStarDotJar endsWith
Add the code gather bin parts code target to the given Ant script throws Core Exception private void generate Gather Bin Parts Target throws Core Exception script println script print Target Declaration TARGET GATHER BIN PARTS TARGET INIT PROPERTY DESTINATION TEMP FOLDER null null I Path destination new Path get Property Format PROPERTY DESTINATION TEMP FOLDER destination destination append full Name String root destination to String script print Mkdir Task root List destinations new Array List 5 destinations add destination String include String get Build Properties get PROPERTY BIN INCLUDES String exclude String get Build Properties get PROPERTY BIN EXCLUDES if binary Plugin Copy only the jars that has been compiled and are listed in the includes String split Includes Utils get Array From String include boolean all Jars contains Star Dot Jar split Includes String file Set Values new String compiled Jar Names size int count 0 for Iterator iter compiled Jar Names iterator iter has Next Compiled Entry entry Compiled Entry iter next String formated Name entry get Name false entry get Type Compiled Entry FOLDER NON NLS 1 NON NLS 2 if all Jars Utils is String In split Includes formated Name file Set Values count formated Name continue if count 0 File Set file Set new File Set get Property Format PROPERTY BUILD RESULT FOLDER null Utils get String From Array file Set Values null replace Variables exclude true null null NON NLS 1 script print Copy Task null root new File Set file Set true if dot On The Classpath File Set file Set new File Set get Property Format PROPERTY BUILD RESULT FOLDER EXPANDED DOT null null null null null NON NLS 1 script print Copy Task null root new File Set file Set true General copy of the files listed in the includes if include null exclude null File Set file Set new File Set get Property Format PROPERTY BASEDIR null replace Variables include true null replace Variables exclude true null null script print Copy Task null root new File Set file Set true generate Permission Properties root genarate Id Replacement Call destination to String script print Target End  CoreException generateGatherBinPartsTarget CoreException printTargetDeclaration TARGET_GATHER_BIN_PARTS TARGET_INIT PROPERTY_DESTINATION_TEMP_FOLDER IPath getPropertyFormat PROPERTY_DESTINATION_TEMP_FOLDER fullName toString printMkdirTask ArrayList getBuildProperties PROPERTY_BIN_INCLUDES getBuildProperties PROPERTY_BIN_EXCLUDES binaryPlugin splitIncludes getArrayFromString allJars containsStarDotJar splitIncludes fileSetValues compiledJarNames compiledJarNames hasNext CompiledEntry CompiledEntry formatedName getName getType CompiledEntry allJars isStringIn splitIncludes formatedName fileSetValues formatedName FileSet fileSet FileSet getPropertyFormat PROPERTY_BUILD_RESULT_FOLDER getStringFromArray fileSetValues replaceVariables printCopyTask FileSet fileSet dotOnTheClasspath FileSet fileSet FileSet getPropertyFormat PROPERTY_BUILD_RESULT_FOLDER EXPANDED_DOT printCopyTask FileSet fileSet FileSet fileSet FileSet getPropertyFormat PROPERTY_BASEDIR replaceVariables replaceVariables printCopyTask FileSet fileSet generatePermissionProperties genarateIdReplacementCall toString printTargetEnd
private void genarate Id Replacement Call String location throws Core Exception String qualifier get Build Properties get Property PROPERTY QUALIFIER if qualifier null return script print eclipse version Replacer path location version model get Version NON NLS 1 NON NLS 2 NON NLS 3  genarateIdReplacementCall CoreException getBuildProperties getProperty PROPERTY_QUALIFIER versionReplacer getVersion
private void generate Permission Properties String directory throws Core Exception get Permission Properties for Iterator iter permission Properties entry Set iterator iter has Next Map Entry permission Map Entry iter next String instruction String permission get Key String parameters String permission get Value int index if index instruction index Of PERMISSIONS 1 generate Chmod Instruction directory instruction substring index PERMISSIONS length 1 parameters continue if instruction starts With LINK generate Link Instruction directory parameters  generatePermissionProperties CoreException getPermissionProperties permissionProperties entrySet hasNext getKey getValue indexOf generateChmodInstruction startsWith generateLinkInstruction
private void generate Chmod Instruction String dir String rights String files TO CHECK We only consider rights specified with numbers if rights equals EXECUTABLE rights 755 NON NLS 1 script print Chmod dir rights files  generateChmodInstruction printChmod
private void generate Link Instruction String dir String files String links Utils get Array From String files NON NLS 1 List arguments new Array List 2 for int i 0 i links length i 2 arguments add links i arguments add links i 1 script print Exec Task ln s dir arguments Linux NON NLS 1 NON NLS 2 arguments clear  generateLinkInstruction getArrayFromString ArrayList printExecTask
protected Properties get Permission Properties throws Core Exception if permission Properties null permission Properties read Properties get Location model PERMISSIONS FILE I Status INFO return permission Properties  getPermissionProperties CoreException permissionProperties permissionProperties readProperties getLocation PERMISSIONS_FILE IStatus permissionProperties
Add the code zip plugin code target to the given Ant script throws Core Exception private void generate Zip Plugin Target throws Core Exception script println script print Target Declaration TARGET ZIP PLUGIN TARGET INIT null null Policy bind build plugin zip Plugin model get Symbolic Name NON NLS 1 script print Delete Task get Property Format PROPERTY TEMP FOLDER null null script print Mkdir Task get Property Format PROPERTY TEMP FOLDER script print Ant Call Task TARGET BUILD JARS null null script print Ant Call Task TARGET BUILD SOURCES null null Map params new Hash Map 1 params put PROPERTY DESTINATION TEMP FOLDER get Property Format PROPERTY TEMP FOLDER NON NLS 1 script print Ant Call Task TARGET GATHER BIN PARTS null params script print Ant Call Task TARGET GATHER SOURCES null params File Set file Set new File Set get Property Format PROPERTY TEMP FOLDER null bin log null null null null NON NLS 1 script print Delete Task null null new File Set file Set script print Zip Task plugin Zip Destination get Property Format PROPERTY TEMP FOLDER true false null script print Delete Task get Property Format PROPERTY TEMP FOLDER null null script print Target End  CoreException generateZipPluginTarget CoreException printTargetDeclaration TARGET_ZIP_PLUGIN TARGET_INIT zipPlugin getSymbolicName printDeleteTask getPropertyFormat PROPERTY_TEMP_FOLDER printMkdirTask getPropertyFormat PROPERTY_TEMP_FOLDER printAntCallTask TARGET_BUILD_JARS printAntCallTask TARGET_BUILD_SOURCES HashMap PROPERTY_DESTINATION_TEMP_FOLDER getPropertyFormat PROPERTY_TEMP_FOLDER printAntCallTask TARGET_GATHER_BIN_PARTS printAntCallTask TARGET_GATHER_SOURCES FileSet fileSet FileSet getPropertyFormat PROPERTY_TEMP_FOLDER printDeleteTask FileSet fileSet printZipTask pluginZipDestination getPropertyFormat PROPERTY_TEMP_FOLDER printDeleteTask getPropertyFormat PROPERTY_TEMP_FOLDER printTargetEnd
Add the code build update jar code target to the given Ant script private void generate Build Update Jar Target script println script print Target Declaration TARGET BUILD UPDATE JAR TARGET INIT null null Policy bind build plugin build Update Jar model get Symbolic Name NON NLS 1 script print Delete Task get Property Format PROPERTY TEMP FOLDER null null script print Mkdir Task get Property Format PROPERTY TEMP FOLDER script print Ant Call Task TARGET BUILD JARS null null Map params new Hash Map 1 params put PROPERTY DESTINATION TEMP FOLDER get Property Format PROPERTY TEMP FOLDER NON NLS 1 script print Ant Call Task TARGET GATHER BIN PARTS null params script print Zip Task plugin Update Jar Destination get Property Format PROPERTY TEMP FOLDER full Name false false null NON NLS 1 script print Delete Task get Property Format PROPERTY TEMP FOLDER null null script print Target End  generateBuildUpdateJarTarget printTargetDeclaration TARGET_BUILD_UPDATE_JAR TARGET_INIT buildUpdateJar getSymbolicName printDeleteTask getPropertyFormat PROPERTY_TEMP_FOLDER printMkdirTask getPropertyFormat PROPERTY_TEMP_FOLDER printAntCallTask TARGET_BUILD_JARS HashMap PROPERTY_DESTINATION_TEMP_FOLDER getPropertyFormat PROPERTY_TEMP_FOLDER printAntCallTask TARGET_GATHER_BIN_PARTS printZipTask pluginUpdateJarDestination getPropertyFormat PROPERTY_TEMP_FOLDER fullName printDeleteTask getPropertyFormat PROPERTY_TEMP_FOLDER printTargetEnd
Add the code refresh code target to the given Ant script private void generate Refresh Target throws Core Exception script println script print Target Declaration TARGET REFRESH TARGET INIT PROPERTY ECLIPSE RUNNING null Policy bind build plugin refresh NON NLS 1 script print Convert Path Task new Path get Location model remove Last Segments 0 toOS String replace PROPERTY RESOURCE PATH false script print Refresh Local Task get Property Format PROPERTY RESOURCE PATH infinite NON NLS 1 script print Target End  generateRefreshTarget CoreException printTargetDeclaration TARGET_REFRESH TARGET_INIT PROPERTY_ECLIPSE_RUNNING printConvertPathTask getLocation removeLastSegments toOSString PROPERTY_RESOURCE_PATH printRefreshLocalTask getPropertyFormat PROPERTY_RESOURCE_PATH printTargetEnd
End the script by closing the project element private void generate Epilogue script println script print Project End  generateEpilogue printProjectEnd
Defines the XML declaration Ant project and targets init and init Template private void generate Prologue script print Project Declaration model get Symbolic Name TARGET BUILD JARS DOT NON NLS 1 script println script print Property PROPERTY BOOTCLASSPATH NON NLS 1 script print Property PROPERTY BASE WS get Property Format PROPERTY WS script print Property PROPERTY BASE OS get Property Format PROPERTY OS script print Property PROPERTY BASE ARCH get Property Format PROPERTY ARCH script print Property PROPERTY BASE NL get Property Format PROPERTY NL script print Property PROPERTY JAVAC FAIL ON ERROR false NON NLS 1 script print Property PROPERTY JAVAC DEBUG INFO on NON NLS 1 script print Property PROPERTY JAVAC VERBOSE true NON NLS 1 script print Property PROPERTY JAVAC SOURCE 1 3 NON NLS 1 script print Property PROPERTY JAVAC TARGET 1 2 NON NLS 1 script print Property PROPERTY JAVAC COMPILERARG NON NLS 1 script println script print Target Declaration TARGET INIT TARGET PROPERTIES null null null script println condition property PROPERTY PLUGIN TEMP value get Property Format PROPERTY BUILD TEMP DEFAULT PLUGIN LOCATION NON NLS 1 NON NLS 2 NON NLS 3 script println t isset property PROPERTY BUILD TEMP NON NLS 1 NON NLS 2 script println condition NON NLS 1 script print Property PROPERTY PLUGIN TEMP get Property Format PROPERTY BASEDIR script println condition property PROPERTY BUILD RESULT FOLDER value get Property Format PROPERTY PLUGIN TEMP new Path model get Location last Segment NON NLS 1 NON NLS 2 NON NLS 3 script println t isset property PROPERTY BUILD TEMP NON NLS 1 NON NLS 2 script println condition NON NLS 1 script print Property PROPERTY BUILD RESULT FOLDER get Property Format PROPERTY BASEDIR script print Property PROPERTY TEMP FOLDER get Property Format PROPERTY BASEDIR PROPERTY TEMP FOLDER script print Property PROPERTY PLUGIN DESTINATION get Property Format PROPERTY BASEDIR script print Target End script println script print Target Declaration TARGET PROPERTIES null PROPERTY ECLIPSE RUNNING null null script print Property PROPERTY BUILD COMPILER JDT COMPILER ADAPTER script print Target End  initTemplate generatePrologue printProjectDeclaration getSymbolicName TARGET_BUILD_JARS printProperty PROPERTY_BOOTCLASSPATH printProperty PROPERTY_BASE_WS getPropertyFormat PROPERTY_WS printProperty PROPERTY_BASE_OS getPropertyFormat PROPERTY_OS printProperty PROPERTY_BASE_ARCH getPropertyFormat PROPERTY_ARCH printProperty PROPERTY_BASE_NL getPropertyFormat PROPERTY_NL printProperty PROPERTY_JAVAC_FAIL_ON_ERROR printProperty PROPERTY_JAVAC_DEBUG_INFO printProperty PROPERTY_JAVAC_VERBOSE printProperty PROPERTY_JAVAC_SOURCE printProperty PROPERTY_JAVAC_TARGET printProperty PROPERTY_JAVAC_COMPILERARG printTargetDeclaration TARGET_INIT TARGET_PROPERTIES PROPERTY_PLUGIN_TEMP getPropertyFormat PROPERTY_BUILD_TEMP DEFAULT_PLUGIN_LOCATION PROPERTY_BUILD_TEMP printProperty PROPERTY_PLUGIN_TEMP getPropertyFormat PROPERTY_BASEDIR PROPERTY_BUILD_RESULT_FOLDER getPropertyFormat PROPERTY_PLUGIN_TEMP getLocation lastSegment PROPERTY_BUILD_TEMP printProperty PROPERTY_BUILD_RESULT_FOLDER getPropertyFormat PROPERTY_BASEDIR printProperty PROPERTY_TEMP_FOLDER getPropertyFormat PROPERTY_BASEDIR PROPERTY_TEMP_FOLDER printProperty PROPERTY_PLUGIN_DESTINATION getPropertyFormat PROPERTY_BASEDIR printTargetEnd printTargetDeclaration TARGET_PROPERTIES PROPERTY_ECLIPSE_RUNNING printProperty PROPERTY_BUILD_COMPILER JDT_COMPILER_ADAPTER printTargetEnd
Sets the Plugin Model to generate script from param model throws Core Exception public void set Model Bundle Description model throws Core Exception if model null String message Policy bind error missing Element NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION ELEMENT MISSING message null this model model if get Build Properties size 0 get Compiled Elements add model get Symbolic Name else binary Plugin true build Properties put I Build Properties Constants PROPERTY BIN INCLUDES NON NLS 1 build Properties put I Build Properties Constants PROPERTY BIN EXCLUDES project classpath build xml NON NLS 1  PluginModel CoreException setModel BundleDescription CoreException missingElement CoreException IStatus PI_PDEBUILD EXCEPTION_ELEMENT_MISSING getBuildProperties getCompiledElements getSymbolicName binaryPlugin buildProperties IBuildPropertiesConstants PROPERTY_BIN_INCLUDES buildProperties IBuildPropertiesConstants PROPERTY_BIN_EXCLUDES
Sets model to generate scripts from param model Id throws Core Exception public void set Model Id String model Id throws Core Exception Bundle Description new Model get Model model Id if new Model null String message Policy bind exception missing Element model Id NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION ELEMENT MISSING message null set Model new Model  modelId CoreException setModelId modelId CoreException BundleDescription newModel getModel modelId newModel missingElement modelId CoreException IStatus PI_PDEBUILD EXCEPTION_ELEMENT_MISSING setModel newModel
Add the code build zips code target to the given Ant script throws Core Exception private void generate Build Zips Target throws Core Exception String Buffer zips new String Buffer Properties props get Build Properties for Iterator iterator props entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String key String entry get Key if key starts With PROPERTY SOURCE PREFIX key ends With PROPERTY ZIP SUFFIX String zip Name key substring PROPERTY SOURCE PREFIX length zips append zips append zip Name generate Zip Individual Target zip Name String entry get Value script println script print Target Declaration TARGET BUILD ZIPS TARGET INIT zips to String null null null script print Target End  CoreException generateBuildZipsTarget CoreException StringBuffer StringBuffer getBuildProperties entrySet hasNext getKey startsWith PROPERTY_SOURCE_PREFIX endsWith PROPERTY_ZIP_SUFFIX zipName PROPERTY_SOURCE_PREFIX zipName generateZipIndividualTarget zipName getValue printTargetDeclaration TARGET_BUILD_ZIPS TARGET_INIT toString printTargetEnd
Sets the feature Generator param feature Generator The feature Generator to set public void set Feature Generator Feature Build Script Generator feature Generator this feature Generator feature Generator  featureGenerator featureGenerator featureGenerator setFeatureGenerator FeatureBuildScriptGenerator featureGenerator featureGenerator featureGenerator
Add the build jars target to the given Ant script using the specified plug in model param plugin Model the plug in model to reference throws Core Exception private void generate Build Jars Target Bundle Description plugin Model throws Core Exception Properties properties get Build Properties Compiled Entry available Jars binary Plugin new Compiled Entry 0 extract Entries To Compile properties compiled Jar Names new Array List available Jars length Map jars new Hash Map available Jars length for int i 0 i available Jars length i jars put available Jars i get Name false available Jars i Put the jars in a correct compile order String jar Order String get Build Properties get PROPERTY JAR ORDER I Classpath Computer classpath if Abstract Script Generator is BuildingOS Gi classpath new ClasspathComputer3 0 this else classpath new ClasspathComputer2 1 this if jar Order null String order Utils get Array From String jar Order for int i 0 i order length i Compiled Entry jar Compiled Entry jars get order i if jar null continue compiled Jar Names add jar generate Compilation Target classpath get Classpath plugin Model jar jar generateSRC Target jar jars remove order i for Iterator iterator jars values iterator iterator has Next Compiled Entry jar Compiled Entry iterator next compiled Jar Names add jar generate Compilation Target classpath get Classpath plugin Model jar jar generateSRC Target jar script println script print Target Declaration TARGET BUILD JARS TARGET INIT null null Policy bind build plugin build Jars plugin Model get Symbolic Name NON NLS 1 for Iterator iter compiled Jar Names iterator iter has Next String name Compiled Entry iter next get Name false script print Available Task name replace Variables getJAR Location name true script print Ant Call Task name null null script print Target End script println script print Target Declaration TARGET BUILD SOURCES TARGET INIT null null null for Iterator iter compiled Jar Names iterator iter has Next String jar Name Compiled Entry iter next get Name false String src Name getSRC Name jar Name script print Available Task src Name getSRC Location jar Name script print Ant Call Task src Name null null script print Target End  pluginModel CoreException generateBuildJarsTarget BundleDescription pluginModel CoreException getBuildProperties CompiledEntry availableJars binaryPlugin CompiledEntry extractEntriesToCompile compiledJarNames ArrayList availableJars HashMap availableJars availableJars availableJars getName availableJars jarOrder getBuildProperties PROPERTY_JAR_ORDER IClasspathComputer AbstractScriptGenerator isBuildingOSGi ClasspathComputer3_0 ClasspathComputer2_1 jarOrder getArrayFromString jarOrder CompiledEntry CompiledEntry compiledJarNames generateCompilationTarget getClasspath pluginModel generateSRCTarget hasNext CompiledEntry CompiledEntry compiledJarNames generateCompilationTarget getClasspath pluginModel generateSRCTarget printTargetDeclaration TARGET_BUILD_JARS TARGET_INIT buildJars pluginModel getSymbolicName compiledJarNames hasNext CompiledEntry getName printAvailableTask replaceVariables getJARLocation printAntCallTask printTargetEnd printTargetDeclaration TARGET_BUILD_SOURCES TARGET_INIT compiledJarNames hasNext jarName CompiledEntry getName srcName getSRCName jarName printAvailableTask srcName getSRCLocation jarName printAntCallTask srcName printTargetEnd
Add the jar target to the given Ant script using the given classpath and jar as parameters param classpath the classpath for the jar command param entry throws Core Exception private void generate Compilation Target List classpath Compiled Entry entry throws Core Exception script println String name entry get Name false script print Target Declaration name TARGET INIT null entry get Name true Policy bind build plugin jar name NON NLS 1 String destdir get TempJAR Folder Location entry get Name true script print Delete Task destdir null null script print Mkdir Task destdir script print Comment compile the source code NON NLS 1 Javac Task javac new Javac Task javac set Classpath classpath javac set Boot Classpath get Property Format PROPERTY BOOTCLASSPATH javac set Destdir destdir javac set Fail On Error get Property Format PROPERTY JAVAC FAIL ON ERROR javac set Debug get Property Format PROPERTY JAVAC DEBUG INFO javac set Verbose get Property Format PROPERTY JAVAC VERBOSE javac set Include Ant Runtime no NON NLS 1 javac set Source get Property Format PROPERTY JAVAC SOURCE javac set Target get Property Format PROPERTY JAVAC TARGET javac set Compile Args get Property Format PROPERTY JAVAC COMPILERARG String sources entry get Source javac set Srcdir sources script print javac script print Comment Copy necessary resources NON NLS 1 File Set file Sets new File Set sources length for int i 0 i sources length i file Sets i new File Set sources i null null null java package htm null null NON NLS 1 script print Copy Task null destdir file Sets true String jar Location getJAR Location entry get Name true script print Mkdir Task new Path jar Location remove Last Segments 1 to String if entry get Type Compiled Entry FOLDER File Set bin Folder new File Set new File Set destdir null null null null null null script print Copy Task null jar Location bin Folder true else script print Jar Task jar Location destdir script print Delete Task destdir null null script print Target End  CoreException generateCompilationTarget CompiledEntry CoreException getName printTargetDeclaration TARGET_INIT getName getTempJARFolderLocation getName printDeleteTask printMkdirTask printComment JavacTask JavacTask setClasspath setBootClasspath getPropertyFormat PROPERTY_BOOTCLASSPATH setDestdir setFailOnError getPropertyFormat PROPERTY_JAVAC_FAIL_ON_ERROR setDebug getPropertyFormat PROPERTY_JAVAC_DEBUG_INFO setVerbose getPropertyFormat PROPERTY_JAVAC_VERBOSE setIncludeAntRuntime setSource getPropertyFormat PROPERTY_JAVAC_SOURCE setTarget getPropertyFormat PROPERTY_JAVAC_TARGET setCompileArgs getPropertyFormat PROPERTY_JAVAC_COMPILERARG getSource setSrcdir printComment FileSet fileSets FileSet fileSets FileSet printCopyTask fileSets jarLocation getJARLocation getName printMkdirTask jarLocation removeLastSegments toString getType CompiledEntry FileSet binFolder FileSet FileSet printCopyTask jarLocation binFolder printJarTask jarLocation printDeleteTask printTargetEnd
param properties return JAR protected Compiled Entry extract Entries To Compile Properties properties List result new Array List 5 int prefix Length PROPERTY SOURCE PREFIX length for Iterator iterator properties entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String key String entry get Key if key starts With PROPERTY SOURCE PREFIX continue key key substring prefix Length String source Utils get Array From String String entry get Value String output Utils get Array From String properties get Property PROPERTY OUTPUT PREFIX key String extra Classpath Utils get Array From String properties get Property PROPERTY EXTRAPATH PREFIX key Compiled Entry new Entry new Compiled Entry key source output extra Classpath key ends With PROPERTY JAR SUFFIX Compiled Entry JAR Compiled Entry FOLDER result add new Entry return Compiled Entry result to Array new Compiled Entry result size  CompiledEntry extractEntriesToCompile ArrayList prefixLength PROPERTY_SOURCE_PREFIX entrySet hasNext getKey startsWith PROPERTY_SOURCE_PREFIX prefixLength getArrayFromString getValue getArrayFromString getProperty PROPERTY_OUTPUT_PREFIX extraClasspath getArrayFromString getProperty PROPERTY_EXTRAPATH_PREFIX CompiledEntry newEntry CompiledEntry extraClasspath endsWith PROPERTY_JAR_SUFFIX CompiledEntry CompiledEntry newEntry CompiledEntry toArray CompiledEntry
Add the src target to the given Ant script param jar throws Core Exception private void generateSRC Target Compiled Entry jar throws Core Exception script println String name jar get Name false String src Name getSRC Name name script print Target Declaration src Name TARGET INIT null src Name null String sources jar get Source filter Non Existing Source Folders sources File Set file Sets new File Set sources length int count 0 for int i 0 i sources length i if sources i null file Sets count new File Set sources i null java null null null null NON NLS 1 String src Location getSRC Location name script print Mkdir Task new Path src Location remove Last Segments 1 to String if count 0 script print Zip Task src Location null false false file Sets script print Target End  CoreException generateSRCTarget CompiledEntry CoreException getName srcName getSRCName printTargetDeclaration srcName TARGET_INIT srcName getSource filterNonExistingSourceFolders FileSet fileSets FileSet fileSets FileSet srcLocation getSRCLocation printMkdirTask srcLocation removeLastSegments toString printZipTask srcLocation fileSets printTargetEnd
private void filter Non Existing Source Folders String sources File plugin Root try plugin Root new File get Location model catch Core Exception e Bundle Helper get Default get Log log e get Status return for int i 0 i sources length i File file new File plugin Root sources i if file exists sources i null I Status status new Status I Status WARNING PI PDEBUILD EXCEPTION SOURCE LOCATION MISSING Policy bind warning cannot Locate Source file get Absolute Path null NON NLS 1 Bundle Helper get Default get Log log status  filterNonExistingSourceFolders pluginRoot pluginRoot getLocation CoreException BundleHelper getDefault getLog getStatus pluginRoot IStatus IStatus PI_PDEBUILD EXCEPTION_SOURCE_LOCATION_MISSING cannotLocateSource getAbsolutePath BundleHelper getDefault getLog
Return the name of the zip file for the source for the jar with the given name param jar Name the name of the jar file return String protected String getSRC Location String jar Name return getJAR Location getSRC Name jar Name  jarName getSRCLocation jarName getJARLocation getSRCName jarName
Return the location for a temporary file for the jar file with the given name param jar Name the name of the jar file return String protected String get TempJAR Folder Location String jar Name I Path destination new Path get Property Format PROPERTY TEMP FOLDER destination destination append jar Name bin NON NLS 1 return destination to String  jarName getTempJARFolderLocation jarName IPath getPropertyFormat PROPERTY_TEMP_FOLDER jarName toString
Return the full location of the jar file param jar Name the name of the jar file return String protected String getJAR Location String jar Name return new Path get Property Format PROPERTY BUILD RESULT FOLDER append jar Name to String  jarName getJARLocation jarName getPropertyFormat PROPERTY_BUILD_RESULT_FOLDER jarName toString
protected String get Classpath Entries Bundle Description looked Up Model throws Core Exception return String get Site false get Registry get Extra Data get new Long looked Up Model get Bundle Id  getClasspathEntries BundleDescription lookedUpModel CoreException getSite getRegistry getExtraData lookedUpModel getBundleId
protected Properties get Build Properties throws Core Exception if build Properties null return build Properties read Properties model get Location properties File Name I Status WARNING return build Properties  getBuildProperties CoreException buildProperties buildProperties readProperties getLocation propertiesFileName IStatus buildProperties
Return the name of the zip file for the source from the given jar name param jar Name the name of the jar file return String protected String getSRC Name String jar Name if jar Name ends With jar NON NLS 1 return jar Name substring 0 jar Name length 4 src zip NON NLS 1 return jar Name replace src zip NON NLS 1  jarName getSRCName jarName jarName endsWith jarName jarName jarName
If the model defines its own custom script we do not generate a new one but we do try to update the version number private void update Existing Script throws Core Exception String root get Location model File build File new File root build Script File Name try update Version build File PROPERTY VERSION SUFFIX model get Version to String catch IO Exception e String message Policy bind exception write Script build File to String NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING SCRIPT message e return  updateExistingScript CoreException getLocation buildFile buildScriptFileName updateVersion buildFile PROPERTY_VERSION_SUFFIX getVersion toString IOException writeScript buildFile toString CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_SCRIPT
Substitute the value of an element description variable variables that are found in files like plugin xml e g ws by an Ant property param source String return String protected String replace Variables String source String boolean compiled Element if source String null return null int i 1 String result source String while i result index Of DESCRIPTION VARIABLE WS 0 result result substring 0 i ws get Property Format compiled Element PROPERTY WS PROPERTY BASE WS result substring i DESCRIPTION VARIABLE WS length NON NLS 1 while i result index Of DESCRIPTION VARIABLE OS 0 result result substring 0 i os get Property Format compiled Element PROPERTY OS PROPERTY BASE OS result substring i DESCRIPTION VARIABLE OS length NON NLS 1 while i result index Of DESCRIPTION VARIABLE ARCH 0 result result substring 0 i arch get Property Format compiled Element PROPERTY ARCH PROPERTY BASE ARCH result substring i DESCRIPTION VARIABLE OS length NON NLS 1 while i result index Of DESCRIPTION VARIABLE NL 0 result result substring 0 i nl get Property Format compiled Element PROPERTY NL PROPERTY BASE NL result substring i DESCRIPTION VARIABLE NL length NON NLS 1 return result  sourceString replaceVariables sourceString compiledElement sourceString sourceString indexOf DESCRIPTION_VARIABLE_WS getPropertyFormat compiledElement PROPERTY_WS PROPERTY_BASE_WS DESCRIPTION_VARIABLE_WS indexOf DESCRIPTION_VARIABLE_OS getPropertyFormat compiledElement PROPERTY_OS PROPERTY_BASE_OS DESCRIPTION_VARIABLE_OS indexOf DESCRIPTION_VARIABLE_ARCH getPropertyFormat compiledElement PROPERTY_ARCH PROPERTY_BASE_ARCH DESCRIPTION_VARIABLE_OS indexOf DESCRIPTION_VARIABLE_NL getPropertyFormat compiledElement PROPERTY_NL PROPERTY_BASE_NL DESCRIPTION_VARIABLE_NL
public Bundle Description get Model return model  BundleDescription getModel
public String get Properties File Name return properties File Name  getPropertiesFileName propertiesFileName
public void set Properties File Name String property File Name this properties File Name property File Name  setPropertiesFileName propertyFileName propertiesFileName propertyFileName
public String get Build Script File Name return build Script File Name  getBuildScriptFileName buildScriptFileName
public void set Build Script File Name String build Script File Name this build Script File Name build Script File Name  setBuildScriptFileName buildScriptFileName buildScriptFileName buildScriptFileName
Returns the model object which is associated with the given identifier Returns code null code if the model object cannot be found param model Id the identifier of the model object to lookup return the model object or code null code protected Bundle Description get Model String model Id throws Core Exception return get Site false get Registry get Resolved Bundle model Id  modelId BundleDescription getModel modelId CoreException getSite getRegistry getResolvedBundle modelId

throws Core Exception public void generate throws Core Exception List plugins new Array List 5 List features new Array List 5 sort Elements features plugins It is not required to filter in the two first generate Models since it is only for the building of a single plugin generate Models plugins generate Features features  CoreException CoreException ArrayList ArrayList sortElements generateModels generateModels generateFeatures
Separate elements by kind protected void sort Elements List features List plugins for int i 0 i elements length i int index elements i index Of String type elements i substring 0 index String element elements i substring index 1 if type equals plugin type equals fragment NON NLS 1 NON NLS 2 plugins add element else if type equals feature NON NLS 1 features add element  sortElements indexOf
param models throws Core Exception protected void generate Models List models throws Core Exception for Iterator iterator models iterator iterator has Next Model Build Script Generator generator new Model Build Script Generator Filtering is not required here since we are only generating the build for a plugin or a fragment String model String iterator next generator set Model Id model generator generate  CoreException generateModels CoreException hasNext ModelBuildScriptGenerator ModelBuildScriptGenerator setModelId
param features throws Core Exception protected void generate Features List features throws Core Exception for Iterator i features iterator i has Next Assembly Information assemblage Information null assemblage Information new Assembly Information String feature Id String i next String version Id null int version Position feature Id index Of NON NLS 1 if version Position 1 version Id feature Id substring version Position 1 feature Id feature Id substring 0 version Position Feature Build Script Generator generator new Feature Build Script Generator feature Id version Id assemblage Information generator set Generate Included Features this recursive Generation generator set Analyse Children this children generator set Source Feature Generation false generator set Binary Feature Generation true generator set Script Generation true generator set Plugin Path plugin Path generator set Build Site Factory null generator set Dev Entries dev Entries generator set Source To Gather new Source Feature Information generator set Compiled Elements generator get Compiled Elements generator set BuildingOS Gi is BuildingOS Gi generator generate if generate Assemble Script true Assemble Script Generator assembler new Assemble Script Generator working Directory assemblage Information feature Id null assembler generate  CoreException generateFeatures CoreException hasNext AssemblyInformation assemblageInformation assemblageInformation AssemblyInformation featureId versionId versionPosition featureId indexOf versionPosition versionId featureId versionPosition featureId featureId versionPosition FeatureBuildScriptGenerator FeatureBuildScriptGenerator featureId versionId assemblageInformation setGenerateIncludedFeatures recursiveGeneration setAnalyseChildren setSourceFeatureGeneration setBinaryFeatureGeneration setScriptGeneration setPluginPath pluginPath setBuildSiteFactory setDevEntries devEntries setSourceToGather SourceFeatureInformation setCompiledElements getCompiledElements setBuildingOSGi isBuildingOSGi generateAssembleScript AssembleScriptGenerator AssembleScriptGenerator workingDirectory assemblageInformation featureId
public void set Generate Archive boolean generate Archive this generate Archive generate Archive  setGenerateArchive generateArchive generateArchive generateArchive
param children public void set Children boolean children this children children  setChildren
param dev Entries public void set Dev Entries String dev Entries if dev Entries null this dev Entries new Dev Class Path Helper dev Entries  devEntries setDevEntries devEntries devEntries devEntries DevClassPathHelper devEntries
param elements public void set Elements String elements this elements elements  setElements
public void set Plugin Path String plugin Path throws Core Exception this plugin Path plugin Path  setPluginPath pluginPath CoreException pluginPath pluginPath
Sets the recursive Generation param recursive Generation The recursive Generation to set public void set Recursive Generation boolean recursive Generation this recursive Generation recursive Generation  recursiveGeneration recursiveGeneration recursiveGeneration setRecursiveGeneration recursiveGeneration recursiveGeneration recursiveGeneration
param generate Assemble Script The generate Assemble Script to set public void set Generate Assemble Script boolean generate Assemble Script this generate Assemble Script generate Assemble Script  generateAssembleScript generateAssembleScript setGenerateAssembleScript generateAssembleScript generateAssembleScript generateAssembleScript

private boolean debug false public static Bundle Helper get Default return default Instance  BundleHelper getDefault defaultInstance
static void close if default Instance null default Instance context null default Instance bundle null default Instance null  defaultInstance defaultInstance defaultInstance defaultInstance
Bundle Helper Bundle Context context throws Runtime Exception if default Instance null throw new Runtime Exception Can not instantiate bundle helper NON NLS 1 this context context default Instance this bundle context get Bundle debug true equals Ignore Case Platform get Debug Option IPDE Build Constants PI PDEBUILD debug NON NLS 1 NON NLS 2  BundleHelper BundleContext RuntimeException defaultInstance RuntimeException defaultInstance getBundle equalsIgnoreCase getDebugOption IPDEBuildConstants PI_PDEBUILD
public final URL find I Path path return Find Support find bundle path null  IPath FindSupport
public final URL find I Path path Map override return Find Support find bundle path override  IPath FindSupport
public final I Log get Log return Platform get Log bundle  ILog getLog getLog
public final I Path get State Location throws Illegal State Exception return Platform get State Location get Default bundle  IPath getStateLocation IllegalStateException getStateLocation getDefault
public final Input Stream open Stream I Path file throws IO Exception return Find Support open Stream bundle file false  InputStream openStream IPath IOException FindSupport openStream
public final Input Stream open Stream I Path file boolean localized throws IO Exception return Find Support open Stream bundle file localized  InputStream openStream IPath IOException FindSupport openStream
public String to String return bundle get Symbolic Name  toString getSymbolicName
public Bundle get Bundle return bundle  getBundle
public Object acquire Service String service Name Service Reference reference context get Service Reference service Name if reference null return null return context get Service reference  acquireService serviceName ServiceReference getServiceReference serviceName getService
public boolean is Debugging return debug  isDebugging

public Config String os String ws String arch this ws ws this os os this arch arch 
public Config String config this config 0 config 1 config 2 
public Config String config this Utils get Array From String With Blank config NON NLS 1  getArrayFromStringWithBlank
public String get Arch return arch  getArch
public String get Os return os  getOs
public String get Ws return ws  getWs
public boolean equals Object config if this config return true if config instanceof Config return false Config a Config Config config if os equals Ignore Case a Config os return false if ws equals Ignore Case a Config ws return false if arch equals Ignore Case a Config arch return false return true  aConfig equalsIgnoreCase aConfig equalsIgnoreCase aConfig equalsIgnoreCase aConfig
public int hash Code return os hash Code ws hash Code arch hash Code  hashCode hashCode hashCode hashCode
public String to String return to String   NON NLS 1  toString toString _
public String to String String separator return os separator ws separator arch  toString
public String to String Replacing Any String separator String value if value null return NON NLS 1 String new Os os String new Ws ws String new Arch arch if os ANY new Os value if ws ANY new Ws value if arch ANY new Arch value return new Os separator new Ws separator new Arch  toStringReplacingAny newOs newWs newArch newOs newWs newArch newOs newWs newArch
public static Config generic Config if generic Config null generic Config new Config ANY ANY ANY return generic Config  genericConfig genericConfig genericConfig genericConfig

public static int get Flag Type String flag Id if flag Id equals S CREATE DOCS return BOOLEAN if flag Id equals S DOC FOLDER return STRING return MARKER  getFlagType flagId flagId S_CREATE_DOCS flagId S_DOC_FOLDER
public static int get Flag String flag Id Preferences pref PDE get Default get Plugin Preferences return pref get Int flag Id  getFlag flagId getDefault getPluginPreferences getInt flagId
public static boolean get Boolean String flag Id Preferences pref PDE get Default get Plugin Preferences return pref get Boolean flag Id  getBoolean flagId getDefault getPluginPreferences getBoolean flagId
public static String get String String flag Id Preferences pref PDE get Default get Plugin Preferences return pref get String flag Id  getString flagId getDefault getPluginPreferences getString flagId
public static int get Default Flag String flag Id Preferences pref PDE get Default get Plugin Preferences return pref get Default Int flag Id  getDefaultFlag flagId getDefault getPluginPreferences getDefaultInt flagId
public static String get Default String String flag Id Preferences pref PDE get Default get Plugin Preferences return pref get Default String flag Id  getDefaultString flagId getDefault getPluginPreferences getDefaultString flagId
public static boolean get Default Boolean String flag Id Preferences pref PDE get Default get Plugin Preferences return pref get Default Boolean flag Id  getDefaultBoolean flagId getDefault getPluginPreferences getDefaultBoolean flagId
public static void set Flag String flag Id int value Preferences pref PDE get Default get Plugin Preferences pref set Value flag Id value  setFlag flagId getDefault getPluginPreferences setValue flagId
public static void set Boolean String flag Id boolean value Preferences pref PDE get Default get Plugin Preferences pref set Value flag Id value  setBoolean flagId getDefault getPluginPreferences setValue flagId
public static void set String String flag Id String value Preferences pref PDE get Default get Plugin Preferences pref set Value flag Id value  setString flagId getDefault getPluginPreferences setValue flagId
public static void initialize Defaults Preferences pref PDE get Default get Plugin Preferences pref set Default P UNRESOLVED IMPORTS WARNING pref set Default P UNRESOLVED EX POINTS WARNING pref set Default P UNKNOWN ELEMENT WARNING pref set Default P UNKNOWN ATTRIBUTE WARNING pref set Default P ILLEGAL ATT VALUE WARNING pref set Default P UNKNOWN CLASS IGNORE pref set Default P UNKNOWN RESOURCE IGNORE pref set Default P NO REQUIRED ATT WARNING pref set Default S CREATE DOCS false pref set Default S DOC FOLDER doc NON NLS 1 pref set Default S OPEN TAGS WARNING pref set Default S FORBIDDEN END TAGS WARNING pref set Default S OPTIONAL END TAGS IGNORE pref set Default F UNRESOLVED PLUGINS WARNING pref set Default F UNRESOLVED FEATURES WARNING  initializeDefaults getDefault getPluginPreferences setDefault P_UNRESOLVED_IMPORTS setDefault P_UNRESOLVED_EX_POINTS setDefault P_UNKNOWN_ELEMENT setDefault P_UNKNOWN_ATTRIBUTE setDefault P_ILLEGAL_ATT_VALUE setDefault P_UNKNOWN_CLASS setDefault P_UNKNOWN_RESOURCE setDefault P_NO_REQUIRED_ATT setDefault S_CREATE_DOCS setDefault S_DOC_FOLDER setDefault S_OPEN_TAGS setDefault S_FORBIDDEN_END_TAGS setDefault S_OPTIONAL_END_TAGS setDefault F_UNRESOLVED_PLUGINS setDefault F_UNRESOLVED_FEATURES
public static boolean is Group Active int group Preferences pref PDE get Default get Plugin Preferences String flag Ids get Flags group for int i 0 i flag Ids length i String flag Id flag Ids i if pref get Int flag Id IGNORE return true return false  isGroupActive getDefault getPluginPreferences flagIds getFlags flagIds flagId flagIds getInt flagId
public static String get Flags int group return flags group  getFlags
public static void save PDE get Default save Plugin Preferences  getDefault savePluginPreferences

private String name public I Plugin Base get Members return members  IPluginBase getMembers
void set Members I Plugin Base members this members members  setMembers IPluginBase
public String get Name return name  getName
public void set Name String name this name name  setName
public String to String return name  toString

private static final String KEY LOOP NAME Builders Dependency Loop Finder loop Name NON NLS 1 public static Dependency Loop find Loops I Plugin root return find Loops root null  KEY_LOOP_NAME DependencyLoopFinder loopName DependencyLoop findLoops IPlugin findLoops
public static Dependency Loop find Loops I Plugin root I Plugin candidates return find Loops root candidates false  DependencyLoop findLoops IPlugin IPlugin findLoops
public static Dependency Loop find Loops I Plugin root I Plugin candidates boolean only Candidates Vector loops new Vector Vector path new Vector find Loops loops path root candidates only Candidates new Vector return Dependency Loop loops to Array new Dependency Loop loops size  DependencyLoop findLoops IPlugin IPlugin onlyCandidates findLoops onlyCandidates DependencyLoop toArray DependencyLoop
private static void find Loops Vector loops Vector path I Plugin subroot I Plugin candidates boolean only Candidates Vector explored Plugins if path size 0 test the path so far is the subroot the same as root if yes that s it I Plugin root I Plugin path element At 0 if is Equivalent root subroot our loop Dependency Loop loop new Dependency Loop loop set Members I Plugin path to Array new I Plugin path size String pattern PDE get Resource String KEY LOOP NAME int no loops size 1 loop set Name PDE get Formatted Message pattern no NON NLS 1 loops add loop return is the subroot the same as any other node if yes abort local loop that is not ours for int i 1 i path size i I Plugin node I Plugin path element At i if is Equivalent subroot node local loop return Vector new Path path size 0 Vector path clone path new Path add subroot if only Candidates I Plugin Import iimports subroot get Imports for int i 0 i iimports length i I Plugin Import iimport iimports i String id iimport get Id Be paranoid if id null continue if explored Plugins contains id is plugin in list of non loop yielding plugins Commenting linear lookup was very slow when called from here We will use model manager instead because it has a hash table lookup that is much faster I Plugin child PDE Core get Default find Plugin id I Plugin child find Plugin id if child null number of loops before traversing plugin int old Loop Size loops size find Loops loops new Path child null false explored Plugins number of loops after traversing plugin int new Loops Size loops size if old Loop Size new Loops Size no change in number of loops no loops from going to this node skip next time explored Plugins add id if candidates null for int i 0 i candidates length i I Plugin candidate candidates i number of loops before traversing plugin int old Loop Size loops size find Loops loops new Path candidate null false explored Plugins number of loops after traversing plugin int new Loops Size loops size if old Loop Size new Loops Size no change in number of loops no loops from going to this node skip next time explored Plugins add candidate get Id  findLoops IPlugin IPlugin onlyCandidates exploredPlugins IPlugin IPlugin elementAt isEquivalent DependencyLoop DependencyLoop setMembers IPlugin toArray IPlugin getResourceString KEY_LOOP_NAME setName getFormattedMessage IPlugin IPlugin elementAt isEquivalent newPath newPath onlyCandidates IPluginImport getImports IPluginImport getId exploredPlugins IPlugin PDECore getDefault findPlugin IPlugin findPlugin oldLoopSize findLoops newPath exploredPlugins newLoopsSize oldLoopSize newLoopsSize exploredPlugins IPlugin oldLoopSize findLoops newPath exploredPlugins newLoopsSize oldLoopSize newLoopsSize exploredPlugins getId
private static I Plugin find Plugin String id I Plugin Model Base child Model PDE Core get Default get Model Manager find Plugin id null 0 if child Model null child Model instanceof I Plugin Model return null return I Plugin child Model get Plugin Base  IPlugin findPlugin IPluginModelBase childModel PDECore getDefault getModelManager findPlugin childModel childModel IPluginModel IPlugin childModel getPluginBase
private static boolean is Equivalent I Plugin left I Plugin right return left get Id equals right get Id  isEquivalent IPlugin IPlugin getId getId

class Delta Visitor implements I Resource Delta Visitor private I Progress Monitor monitor public Delta Visitor I Progress Monitor monitor this monitor monitor  DeltaVisitor IResourceDeltaVisitor IProgressMonitor DeltaVisitor IProgressMonitor
public boolean visit I Resource Delta delta I Resource resource delta get Resource if resource instanceof I Project Only check projects with plugin nature I Project project I Project resource return is Interesting Project project if resource instanceof I Folder return true if resource instanceof I File see if this is it I File candidate I File resource if is Schema File candidate That s it but only check it if it has been added or changed if delta get Kind I Resource Delta REMOVED compile File candidate monitor return true else remove Output File candidate monitor return false  IResourceDelta IResource getResource IProject IProject IProject isInterestingProject IFolder IFile IFile IFile isSchemaFile getKind IResourceDelta compileFile removeOutputFile
public Extension Point Schema Builder super transformer new Schema Transformer cssURL null  ExtensionPointSchemaBuilder SchemaTransformer
protected I Project build int kind Map args I Progress Monitor monitor throws Core Exception I Resource Delta delta null if kind FULL BUILD delta get Delta get Project if delta null kind FULL BUILD Full build I Project project get Project if is Interesting Project project return null compile Schemas In project monitor else delta accept new Delta Visitor monitor return null  IProject IProgressMonitor CoreException IResourceDelta FULL_BUILD getDelta getProject FULL_BUILD IProject getProject isInterestingProject compileSchemasIn DeltaVisitor
private boolean is Interesting Project I Project project if PDE has Plugin Nature project return false if Workspace Model Manager is Binary Plugin Project project return false This is it a plug in project that is not external or binary return true  isInterestingProject IProject hasPluginNature WorkspaceModelManager isBinaryPluginProject
private void compile File I File file I Progress Monitor monitor String message PDE get Formatted Message BUILDERS SCHEMA COMPILING file get Full Path to String monitor sub Task message Schema Handler reporter new Schema Handler file String output File Name get Output File Name file I Workspace workspace file get Workspace Path output Path new Path output File Name try Input Stream source file get Contents false String Writer string Writer new String Writer Print Writer pwriter new Print Writer string Writer File Schema Descriptor desc new File Schema Descriptor file transform desc source pwriter reporter cssURL string Writer close if reporter get Error Count 0 Compiler Flags get Boolean Compiler Flags S CREATE DOCS String doc Location get Doc Location ensure Folders Exist file get Project doc Location I File output File workspace get Root get File output Path Byte Array Input Stream target new Byte Array Input Stream string Writer to String get Bytes UTF8 NON NLS 1 if workspace get Root exists output Path the file does not exist create it output File create target true monitor else output File set Contents target true false monitor generate CSS files if necessary schema css is default below I Path path file get Project get Full Path append get Doc Location output Path Path path append Schema Transformer get SchemaCSS Name I File schemaCSS File workspace get Root get File output Path string Writer new String Writer pwriter new Print Writer string Writer if addCSS output Path pwriter if schemaCSS File exists schemaCSS File delete true false null string Writer close target new Byte Array Input Stream string Writer to String get Bytes UTF8 NON NLS 1 schemaCSS File create target true monitor generate CSS files if necessary book css is default below if getCSSURL null output Path Path path append Schema Transformer get PlatformCSS Name else output Path new Path getCSSURL get Path output Path Path path append output Path to File get Name I File css File workspace get Root get File output Path string Writer new String Writer pwriter new Print Writer string Writer if addCSS output Path pwriter if css File exists css File delete true false null string Writer close target new Byte Array Input Stream string Writer to String get Bytes UTF8 NON NLS 1 css File create target true monitor catch Unsupported Encoding Exception e PDE log Exception e catch Core Exception e PDE log Exception e catch IO Exception e PDE log Exception e monitor sub Task PDE get Resource String BUILDERS UPDATING monitor done  compileFile IFile IProgressMonitor getFormattedMessage BUILDERS_SCHEMA_COMPILING getFullPath toString subTask SchemaHandler SchemaHandler outputFileName getOutputFileName IWorkspace getWorkspace outputPath outputFileName InputStream getContents StringWriter stringWriter StringWriter PrintWriter PrintWriter stringWriter FileSchemaDescriptor FileSchemaDescriptor stringWriter getErrorCount CompilerFlags getBoolean CompilerFlags S_CREATE_DOCS docLocation getDocLocation ensureFoldersExist getProject docLocation IFile outputFile getRoot getFile outputPath ByteArrayInputStream ByteArrayInputStream stringWriter toString getBytes getRoot outputPath outputFile outputFile setContents IPath getProject getFullPath getDocLocation outputPath SchemaTransformer getSchemaCSSName IFile schemaCSSFile getRoot getFile outputPath stringWriter StringWriter PrintWriter stringWriter outputPath schemaCSSFile schemaCSSFile stringWriter ByteArrayInputStream stringWriter toString getBytes schemaCSSFile outputPath SchemaTransformer getPlatformCSSName outputPath getPath outputPath outputPath toFile getName IFile cssFile getRoot getFile outputPath stringWriter StringWriter PrintWriter stringWriter outputPath cssFile cssFile stringWriter ByteArrayInputStream stringWriter toString getBytes cssFile UnsupportedEncodingException logException CoreException logException IOException logException subTask getResourceString BUILDERS_UPDATING
private boolean addCSS Path output Path Print Writer pwriter File css File if output Path to File get Name equals Schema Transformer get PlatformCSS Name I Plugin Descriptor descriptor I Plugin Descriptor Platform get Plugin Registry get Plugin Descriptor Schema Transformer PLATFORM PLUGIN DOC if descriptor null return false css File new File Boot Loader get InstallURL get File plugins NON NLS 1 descriptor to String File separator Schema Transformer get PlatformCSS Name else if output Path to File get Name equals Schema Transformer get SchemaCSS Name I Plugin Descriptor descriptor I Plugin Descriptor Platform get Plugin Registry get Plugin Descriptor Schema Transformer PLATFORM PLUGIN DOC if descriptor null return false css File new File Boot Loader get InstallURL get File plugins NON NLS 1 descriptor to String File separator Schema Transformer get SchemaCSS Name else if getCSSURL null return false css File new File getCSSURL get File try File Reader freader new File Reader css File Buffered Reader breader new Buffered Reader freader while breader ready pwriter println breader read Line breader close freader close return true catch Exception e do nothing if problem with css as it will only affect formatting may want to log this error in the future return false  outputPath PrintWriter cssFile outputPath toFile getName SchemaTransformer getPlatformCSSName IPluginDescriptor IPluginDescriptor getPluginRegistry getPluginDescriptor SchemaTransformer PLATFORM_PLUGIN_DOC cssFile BootLoader getInstallURL getFile toString SchemaTransformer getPlatformCSSName outputPath toFile getName SchemaTransformer getSchemaCSSName IPluginDescriptor IPluginDescriptor getPluginRegistry getPluginDescriptor SchemaTransformer PLATFORM_PLUGIN_DOC cssFile BootLoader getInstallURL getFile toString SchemaTransformer getSchemaCSSName cssFile getFile FileReader FileReader cssFile BufferedReader BufferedReader readLine
private void ensure Folders Exist I Project project String path Name throws Core Exception I Path path new Path path Name I Container parent project for int i 0 i path segment Count i String segment path segment i I Folder folder parent get Folder new Path segment if folder exists folder create true true null parent folder  ensureFoldersExist IProject pathName CoreException IPath pathName IContainer segmentCount IFolder getFolder
private void compile Schemas In I Container container I Progress Monitor monitor throws Core Exception monitor sub Task PDE get Resource String BUILDERS SCHEMA COMPILING SCHEMAS I Resource members container members for int i 0 i members length i I Resource member members i if member instanceof I Container compile Schemas In I Container member monitor else if member instanceof I File is Schema File I File member compile File I File member monitor monitor done  compileSchemasIn IContainer IProgressMonitor CoreException subTask getResourceString BUILDERS_SCHEMA_COMPILING_SCHEMAS IResource IResource IContainer compileSchemasIn IContainer IFile isSchemaFile IFile compileFile IFile
public String get Doc Location return Compiler Flags get String Compiler Flags S DOC FOLDER  getDocLocation CompilerFlags getString CompilerFlags S_DOC_FOLDER
private String get Output File Name I File file String file Name file get Name int dot file Name last Index Of String page Name file Name substring 0 dot html NON NLS 1 String mangled Plugin Id get Mangled Plugin Id file if mangled Plugin Id null page Name mangled Plugin Id   page Name NON NLS 1 I Path path file get Project get Full Path append get Doc Location append page Name return path to String  getOutputFileName IFile fileName getName fileName lastIndexOf pageName fileName mangledPluginId getMangledPluginId mangledPluginId pageName mangledPluginId _ pageName IPath getProject getFullPath getDocLocation pageName toString
private String get Mangled Plugin Id I File file I Project project file get Project I Model model PDE Core get Default get Model Manager find Model project if model instanceof I Plugin Model Base I Plugin Base plugin I Plugin Model Base model get Plugin Base if plugin null String id plugin get Id return id replace   return null  getMangledPluginId IFile IProject getProject IModel PDECore getDefault getModelManager findModel IPluginModelBase IPluginBase IPluginModelBase getPluginBase getId _
public URL getCSSURL return cssURL 
public void setCSSURL String url try cssURL new URL url catch MalformedURL Exception e PDE log Exception e  MalformedURLException logException
public void setCSSURL URL url cssURL url 
private boolean is Schema File I File file return exsd equals file get File Extension NON NLS 1  isSchemaFile IFile getFileExtension
private void remove Output File I File file I Progress Monitor monitor String output File Name get Output File Name file String message PDE get Formatted Message BUILDERS SCHEMA REMOVING output File Name monitor sub Task message I Workspace workspace file get Workspace I Path path new Path output File Name if workspace get Root exists path I File output File workspace get Root get File path if output File null try output File delete true true monitor catch Core Exception e PDE log Exception e monitor done  removeOutputFile IFile IProgressMonitor outputFileName getOutputFileName getFormattedMessage BUILDERS_SCHEMA_REMOVING outputFileName subTask IWorkspace getWorkspace IPath outputFileName getRoot IFile outputFile getRoot getFile outputFile outputFile CoreException logException
protected void startup On Initialize super startup On Initialize  startupOnInitialize startupOnInitialize
private void transform I Schema Descriptor desc Input Stream input Print Writer output Schema Handler reporter URL cssURL transformer transform desc input output reporter cssURL  ISchemaDescriptor InputStream PrintWriter SchemaHandler

class Delta Visitor implements I Resource Delta Visitor private I Progress Monitor monitor public Delta Visitor I Progress Monitor monitor this monitor monitor  DeltaVisitor IResourceDeltaVisitor IProgressMonitor DeltaVisitor IProgressMonitor
public boolean visit I Resource Delta delta I Resource resource delta get Resource if resource instanceof I Project Only check projects with feature nature I Project project I Project resource try return project has Nature PDE FEATURE NATURE catch Core Exception e PDE log Exception e return false if resource instanceof I File see if this is it I File candidate I File resource if is Manifest File candidate That s it but only check it if it has been added or changed if delta get Kind I Resource Delta REMOVED check File candidate monitor return true return true  IResourceDelta IResource getResource IProject IProject IProject hasNature FEATURE_NATURE CoreException logException IFile IFile IFile isManifestFile getKind IResourceDelta checkFile
class Reference Delta Visitor implements I Resource Delta Visitor private boolean interesting Change public Reference Delta Visitor  ReferenceDeltaVisitor IResourceDeltaVisitor interestingChange ReferenceDeltaVisitor
public boolean is Interesting Change return interesting Change  isInterestingChange interestingChange
public boolean visit I Resource Delta delta I Resource resource delta get Resource if resource instanceof I Project Only check projects with plugin nature I Project project I Project resource return PDE has Feature Nature project if resource instanceof I File see if this is it I File candidate I File resource if is Manifest File candidate interesting Change true return false return true  IResourceDelta IResource getResource IProject IProject IProject hasFeatureNature IFile IFile IFile isManifestFile interestingChange
public Feature Consistency Checker super  FeatureConsistencyChecker
protected I Project build int kind Map args I Progress Monitor monitor throws Core Exception if PDE Core get Default get Bundle get State Bundle ACTIVE monitor is Canceled return new I Project 0 I Resource Delta delta null I Project project get Project if kind FULL BUILD delta get Delta project if delta null kind FULL BUILD Full build check Project project monitor else delta accept new Delta Visitor monitor return new I Project 0  IProject IProgressMonitor CoreException PDECore getDefault getBundle getState isCanceled IProject IResourceDelta IProject getProject FULL_BUILD getDelta FULL_BUILD checkProject DeltaVisitor IProject
private void check Project I Project project I Progress Monitor monitor I File file project get File feature xml NON NLS 1 if file exists check File file monitor  checkProject IProject IProgressMonitor IFile getFile checkFile
private void check File I File file I Progress Monitor monitor String message PDE get Formatted Message BUILDERS VERIFYING file get Full Path to String monitor sub Task message Plugin Error Reporter reporter new Plugin Error Reporter file ValidatingSAX Parser parse file reporter true if reporter get Error Count 0 validate Feature file reporter monitor sub Task PDE get Resource String BUILDERS UPDATING monitor done  checkFile IFile IProgressMonitor getFormattedMessage BUILDERS_VERIFYING getFullPath toString subTask PluginErrorReporter PluginErrorReporter ValidatingSAXParser getErrorCount validateFeature subTask getResourceString BUILDERS_UPDATING
private boolean is Manifest File I File file return file get Parent equals file get Project file get Name to Lower Case equals feature xml NON NLS 1  isManifestFile IFile getParent getProject getName toLowerCase
private boolean is Valid Reference I Feature Plugin plugin String id plugin get Id if id null id trim length 0 Model Entry entry PDE Core get Default get Model Manager find Entry id if entry null if plugin is Fragment return entry get Active Model instanceof I Fragment Model return entry get Active Model instanceof I Plugin Model return false  isValidReference IFeaturePlugin getId ModelEntry PDECore getDefault getModelManager findEntry isFragment getActiveModel IFragmentModel getActiveModel IPluginModel
private boolean is Valid Reference I Feature Child child Workspace Model Manager manager PDE Core get Default get Workspace Model Manager I Feature Model models manager get Feature Models for int i 0 i models length i I Feature Model model models i if model get Feature get Id equals child get Id return true return false  isValidReference IFeatureChild WorkspaceModelManager PDECore getDefault getWorkspaceModelManager IFeatureModel getFeatureModels IFeatureModel getFeature getId getId
private void validate Feature I File file Plugin Error Reporter reporter Workspace Feature Model model new Workspace Feature Model file model load if model is Loaded I Feature feature model get Feature validate Required Attributes feature reporter if reporter get Error Count 0 return test Plugin References feature reporter test Feature References feature reporter  validateFeature IFile PluginErrorReporter WorkspaceFeatureModel WorkspaceFeatureModel isLoaded IFeature getFeature validateRequiredAttributes getErrorCount testPluginReferences testFeatureReferences
private void test Plugin References I Feature feature Plugin Error Reporter reporter I Feature Plugin plugins feature get Plugins int flag Compiler Flags get Flag Compiler Flags F UNRESOLVED PLUGINS if flag Compiler Flags IGNORE return for int i 0 i plugins length i I Feature Plugin plugin plugins i if is Valid Reference plugin false String message PDE get Formatted Message BUILDERS FEATURE REFERENCE plugin get Label reporter report message get Line plugin flag  testPluginReferences IFeature PluginErrorReporter IFeaturePlugin getPlugins CompilerFlags getFlag CompilerFlags F_UNRESOLVED_PLUGINS CompilerFlags IFeaturePlugin isValidReference getFormattedMessage BUILDERS_FEATURE_REFERENCE getLabel getLine
private void test Feature References I Feature feature Plugin Error Reporter reporter I Feature Child included feature get Included Features int flag Compiler Flags get Flag Compiler Flags F UNRESOLVED FEATURES if flag Compiler Flags IGNORE return for int i 0 i included length i I Feature Child child included i if is Valid Reference child false String message PDE get Formatted Message BUILDERS FEATURE FREFERENCE child get Id reporter report message get Line child flag  testFeatureReferences IFeature PluginErrorReporter IFeatureChild getIncludedFeatures CompilerFlags getFlag CompilerFlags F_UNRESOLVED_FEATURES CompilerFlags IFeatureChild isValidReference getFormattedMessage BUILDERS_FEATURE_FREFERENCE getId getLine
private void validate Required Attributes I Feature feature Plugin Error Reporter reporter assert Not Null id NON NLS 1 feature NON NLS 1 get Line feature feature get Id reporter assert Not Null version NON NLS 1 feature NON NLS 1 get Line feature feature get Version reporter I Feature Child children feature get Included Features for int i 0 i children length i I Feature Child child children i assert Not Null id NON NLS 1 includes NON NLS 1 get Line child child get Id reporter assert Not Null version NON NLS 1 includes NON NLS 1 get Line child child get Version reporter I Feature Plugin plugins feature get Plugins for int i 0 i plugins length i I Feature Plugin plugin plugins i assert Not Null id NON NLS 1 plugin NON NLS 1 get Line plugin plugin get Id reporter assert Not Null version NON NLS 1 plugin NON NLS 1 get Line plugin plugin get Version reporter I Feature Data data feature get Data for int i 0 i data length i I Feature Data entry data i assert Not Null id NON NLS 1 data NON NLS 1 get Line entry entry get Id reporter I Feature Import fimports feature get Imports for int i 0 i fimports length i I Feature Import fimport fimports i if fimport get Type I Feature Import PLUGIN assert Not Null plugin NON NLS 1 import NON NLS 1 get Line fimport fimport get Id reporter  validateRequiredAttributes IFeature PluginErrorReporter assertNotNull getLine getId assertNotNull getLine getVersion IFeatureChild getIncludedFeatures IFeatureChild assertNotNull getLine getId assertNotNull getLine getVersion IFeaturePlugin getPlugins IFeaturePlugin assertNotNull getLine getId assertNotNull getLine getVersion IFeatureData getData IFeatureData assertNotNull getLine getId IFeatureImport getImports IFeatureImport getType IFeatureImport assertNotNull getLine getId
private static int get Line I Feature Object object int line 1 if object instanceof I Source Object line I Source Object object get Start Line return line  getLine IFeatureObject ISourceObject ISourceObject getStartLine
private static void assert Not Null String att String el int line String value Plugin Error Reporter reporter if value null String message PDE get Formatted Message Builders manifest missing Required NON NLS 1 new String att el reporter report Error message line  assertNotNull PluginErrorReporter getFormattedMessage missingRequired reportError

public interface I Marker Factory I Marker create Marker I File file throws Core Exception  IMarkerFactory IMarker createMarker IFile CoreException

public interface I Schema Transformer public void transform I Schema Descriptor desc Input Stream schema Print Writer output Schema Handler reporter  ISchemaTransformer ISchemaDescriptor InputStream PrintWriter SchemaHandler
public void transform I Schema Descriptor desc Input Stream schema Print Writer output Schema Handler reporter public void transform I Schema Descriptor desc Input Stream schema Print Writer output Schema Handler reporter URL cssURL  ISchemaDescriptor InputStream PrintWriter SchemaHandler ISchemaDescriptor InputStream PrintWriter SchemaHandler

class Delta Visitor implements I Resource Delta Visitor private I Progress Monitor monitor public Delta Visitor I Progress Monitor monitor this monitor monitor  DeltaVisitor IResourceDeltaVisitor IProgressMonitor DeltaVisitor IProgressMonitor
public boolean visit I Resource Delta delta I Resource resource delta get Resource if resource instanceof I Project Only check projects with plugin nature I Project project I Project resource return project is Open PDE has Plugin Nature project if resource instanceof I File see if this is it I File candidate I File resource if is Manifest File candidate That s it but only check it if it has been added or changed if delta get Kind I Resource Delta REMOVED check File candidate monitor return false else if ignore Java Changes is Java File candidate java Delta true return false return true  IResourceDelta IResource getResource IProject IProject IProject isOpen hasPluginNature IFile IFile IFile isManifestFile getKind IResourceDelta checkFile ignoreJavaChanges isJavaFile javaDelta
class Reference Delta Visitor implements I Resource Delta Visitor private boolean interesting Change public Reference Delta Visitor  ReferenceDeltaVisitor IResourceDeltaVisitor interestingChange ReferenceDeltaVisitor
public boolean is Interesting Change return interesting Change  isInterestingChange interestingChange
public boolean visit I Resource Delta delta I Resource resource delta get Resource if resource instanceof I Project Only check projects with plugin nature I Project project I Project resource return project is Open PDE has Plugin Nature project if resource instanceof I File see if this is it I File candidate I File resource if is Manifest File candidate interesting Change true return false return true  IResourceDelta IResource getResource IProject IProject IProject isOpen hasPluginNature IFile IFile IFile isManifestFile interestingChange
public Manifest Consistency Checker super  ManifestConsistencyChecker
protected I Project build int kind Map args I Progress Monitor monitor throws Core Exception if PDE Core get Default get Bundle get State Bundle ACTIVE monitor is Canceled return new I Project 0 I Project project get Project file Compiled false java Delta false ignore Java Changes Compiler Flags get Flag Compiler Flags P UNKNOWN CLASS Compiler Flags IGNORE Ignore binary plug in projects if Workspace Model Manager is Binary Plugin Project project return null I Resource Delta delta null if kind FULL BUILD delta get Delta get Project if delta null kind FULL BUILD check This Project project monitor else process Delta delta monitor I Project interesting Projects null Compute interesting projects I Plugin Model Base this Model PDE Core get Default get Model Manager find Model project if this Model null interesting Projects compute Interesting Projects this Model If not compiled already see if there are interesting changes in referenced projects that may cause us to compile if file Compiled kind FULL BUILD interesting Projects null check Interesting Project Deltas project interesting Projects monitor return interesting Projects  IProject IProgressMonitor CoreException PDECore getDefault getBundle getState isCanceled IProject IProject getProject fileCompiled javaDelta ignoreJavaChanges CompilerFlags getFlag CompilerFlags P_UNKNOWN_CLASS CompilerFlags WorkspaceModelManager isBinaryPluginProject IResourceDelta FULL_BUILD getDelta getProject FULL_BUILD checkThisProject processDelta IProject interestingProjects IPluginModelBase thisModel PDECore getDefault getModelManager findModel thisModel interestingProjects computeInterestingProjects thisModel fileCompiled FULL_BUILD interestingProjects checkInterestingProjectDeltas interestingProjects interestingProjects
private void check This Project I Project project I Progress Monitor monitor if PDE has Plugin Nature project return I Path path project get Full Path append plugin xml NON NLS 1 I Workspace workspace project get Workspace I File file workspace get Root get File path if file exists check File file monitor else path project get Full Path append fragment xml NON NLS 1 file workspace get Root get File path if file exists check File file monitor  checkThisProject IProject IProgressMonitor hasPluginNature IPath getFullPath IWorkspace getWorkspace IFile getRoot getFile checkFile getFullPath getRoot getFile checkFile
private void check Interesting Project Deltas I Project project I Project interesting Projects I Progress Monitor monitor throws Core Exception although we didn t have any changes we care about in this project there may be changes in referenced projects that affect us Reference Delta Visitor rvisitor new Reference Delta Visitor for int i 0 i interesting Projects length i I Project interesting Project interesting Projects i I Resource Delta delta get Delta interesting Project if delta null there is a delta here delta accept rvisitor if rvisitor is Interesting Change break if rvisitor is Interesting Change At least one interesting project has a change Need to check the file check This Project project monitor  checkInterestingProjectDeltas IProject IProject interestingProjects IProgressMonitor CoreException ReferenceDeltaVisitor ReferenceDeltaVisitor interestingProjects IProject interestingProject interestingProjects IResourceDelta getDelta interestingProject isInterestingChange isInterestingChange checkThisProject
private void process Delta I Resource Delta delta I Progress Monitor monitor throws Core Exception java Delta false delta accept new Delta Visitor monitor if java Delta I Project project get Project I File file project get File plugin xml NON NLS 1 if file exists file project get File fragment xml NON NLS 1 if file exists check File file monitor  processDelta IResourceDelta IProgressMonitor CoreException javaDelta DeltaVisitor javaDelta IProject getProject IFile getFile getFile checkFile
private void check File I File file I Progress Monitor monitor Plugin Error Reporter reporter new Plugin Error Reporter file if Workspace Model Manager is Binary Plugin Project file get Project monitor is Canceled return String message PDE get Formatted Message BUILDERS VERIFYING file get Full Path to String monitor sub Task message ValidatingSAX Parser parse file reporter I File bundle Manifest file get Project get File META INF MANIFEST MF NON NLS 1 boolean bundle bundle Manifest exists if reporter get Error Count 0 if is Fragment file validate Fragment file reporter bundle monitor else validate Plugin file reporter bundle monitor monitor sub Task PDE get Resource String BUILDERS UPDATING monitor done file Compiled true  checkFile IFile IProgressMonitor PluginErrorReporter PluginErrorReporter WorkspaceModelManager isBinaryPluginProject getProject isCanceled getFormattedMessage BUILDERS_VERIFYING getFullPath toString subTask ValidatingSAXParser IFile bundleManifest getProject getFile bundleManifest getErrorCount isFragment validateFragment validatePlugin subTask getResourceString BUILDERS_UPDATING fileCompiled
private boolean is Fragment I File file String name file get Name to Lower Case return name equals fragment xml NON NLS 1  isFragment IFile getName toLowerCase
private boolean is Manifest File I File file if file get Parent instanceof I Folder return false String name file get Name to Lower Case return name equals plugin xml name equals fragment xml NON NLS 1 NON NLS 2  isManifestFile IFile getParent IFolder getName toLowerCase
private boolean is Java File I File file String name file get Name to Lower Case return name ends With java NON NLS 1  isJavaFile IFile getName toLowerCase endsWith
protected void startup On Initialize super startup On Initialize  startupOnInitialize startupOnInitialize
private void validate Plugin I File file Plugin Error Reporter reporter boolean bundle I Progress Monitor monitor Workspace Plugin Model model new Workspace Plugin Model file model load if model is Loaded Test the version I Plugin plugin model get Plugin if bundle validate Required Attributes plugin reporter if reporter get Error Count 0 if bundle validate Version plugin reporter validate Values plugin reporter bundle monitor model dispose  validatePlugin IFile PluginErrorReporter IProgressMonitor WorkspacePluginModel WorkspacePluginModel isLoaded IPlugin getPlugin validateRequiredAttributes getErrorCount validateVersion validateValues
private void validate Fragment I File file Plugin Error Reporter reporter boolean bundle I Progress Monitor monitor Workspace Fragment Model model new Workspace Fragment Model file model load if model is Loaded Test the version Test if plugin exists I Fragment fragment model get Fragment if bundle validate Required Attributes fragment reporter if reporter get Error Count 0 if bundle validate Version fragment reporter String plugin Id fragment get Plugin Id String plugin Version fragment get Plugin Version int match fragment get Rule I Plugin plugin PDE Core get Default find Plugin plugin Id plugin Version match if plugin null broken fragment link String args plugin Id plugin Version String message PDE get Formatted Message BUILDERS FRAGMENT BROKEN LINK args int line 1 if fragment instanceof I Source Object line I Source Object fragment get Start Line reporter report Error message line validate Values fragment reporter bundle monitor model dispose  validateFragment IFile PluginErrorReporter IProgressMonitor WorkspaceFragmentModel WorkspaceFragmentModel isLoaded IFragment getFragment validateRequiredAttributes getErrorCount validateVersion pluginId getPluginId pluginVersion getPluginVersion getRule IPlugin PDECore getDefault findPlugin pluginId pluginVersion pluginId pluginVersion getFormattedMessage BUILDERS_FRAGMENT_BROKEN_LINK ISourceObject ISourceObject getStartLine reportError validateValues
private I Project compute Interesting Projects I Plugin Model Base model I Plugin Base plugin model get Plugin Base if plugin null return null Plugin Model Manager model Manager PDE Core get Default get Model Manager Array List projects new Array List Add all projects for imported plug ins that are in the workspace I Plugin Import iimports plugin get Imports for int i 0 i iimports length i I Plugin Import iimport iimports i if iimport get Id null continue I Plugin Model Base import Model model Manager find Plugin iimport get Id iimport get Version iimport get Match add Interesting Project iimport get Id import Model projects If fragment also add the referenced plug in if in the workspace if model is Fragment Model I Fragment fragment I Fragment plugin if fragment get Plugin Id null fragment get Plugin Version null I Plugin Model Base ref Plugin model Manager find Plugin fragment get Plugin Id fragment get Plugin Version fragment get Rule add Interesting Project fragment get Plugin Id ref Plugin projects return I Project projects to Array new I Project projects size  IProject computeInterestingProjects IPluginModelBase IPluginBase getPluginBase PluginModelManager modelManager PDECore getDefault getModelManager ArrayList ArrayList IPluginImport getImports IPluginImport getId IPluginModelBase importModel modelManager findPlugin getId getVersion getMatch addInterestingProject getId importModel isFragmentModel IFragment IFragment getPluginId getPluginVersion IPluginModelBase refPlugin modelManager findPlugin getPluginId getPluginVersion getRule addInterestingProject getPluginId refPlugin IProject toArray IProject
private void add Interesting Project String id I Plugin Model Base model Array List list if model null model is Enabled if model get Underlying Resource null list add model get Underlying Resource get Project else I Project missing Project PDE Core get Workspace get Root get Project id list add missing Project  addInterestingProject IPluginModelBase ArrayList isEnabled getUnderlyingResource getUnderlyingResource getProject IProject missingProject PDECore getWorkspace getRoot getProject missingProject
private void validate Version I Plugin Base plugin Base Plugin Error Reporter reporter String version plugin Base get Version if version null version NON NLS 1 try Plugin Version Identifier pvi new Plugin Version Identifier version pvi to String catch Throwable e String message PDE get Formatted Message BUILDERS VERSION FORMAT version int line 1 if plugin Base instanceof I Source Object line I Source Object plugin Base get Start Line reporter report Error message line  validateVersion IPluginBase pluginBase PluginErrorReporter pluginBase getVersion PluginVersionIdentifier PluginVersionIdentifier toString getFormattedMessage BUILDERS_VERSION_FORMAT pluginBase ISourceObject ISourceObject pluginBase getStartLine reportError
private void validate Values I Plugin Base plugin Base Plugin Error Reporter reporter boolean bundle I Progress Monitor monitor if Compiler Flags is Group Active Compiler Flags PLUGIN FLAGS return if bundle Validate requires validate Requires plugin Base reporter Compiler Flags get Flag Compiler Flags P UNRESOLVED IMPORTS Validate extensions validate Extensions plugin Base reporter monitor  validateValues IPluginBase pluginBase PluginErrorReporter IProgressMonitor CompilerFlags isGroupActive CompilerFlags PLUGIN_FLAGS validateRequires pluginBase CompilerFlags getFlag CompilerFlags P_UNRESOLVED_IMPORTS validateExtensions pluginBase
private void validate Required Attributes I Plugin Base plugin Base Plugin Error Reporter reporter validate name id version String root Name plugin NON NLS 1 if plugin Base instanceof I Fragment I Fragment fragment I Fragment plugin Base root Name fragment NON NLS 1 assert Not Null plugin id root Name get Line fragment fragment NON NLS 1 get Plugin Id reporter assert Not Null plugin version root Name get Line fragment NON NLS 1 fragment get Plugin Version reporter assert Not Null name root Name get Line plugin Base plugin Base NON NLS 1 get Name reporter assert Not Null id root Name get Line plugin Base plugin Base get Id NON NLS 1 reporter assert Not Null version root Name get Line plugin Base plugin Base NON NLS 1 get Version reporter validate libraries I Plugin Library libraries plugin Base get Libraries for int i 0 i libraries length i I Plugin Library library libraries i assert Not Null name library get Line library library NON NLS 1 NON NLS 2 get Name reporter validate imports I Plugin Import iimports plugin Base get Imports for int i 0 i iimports length i I Plugin Import iimport iimports i assert Not Null plugin import get Line iimport NON NLS 1 NON NLS 2 iimport get Id reporter validate extensions I Plugin Extension extensions plugin Base get Extensions for int i 0 i extensions length i I Plugin Extension extension extensions i assert Not Null point extension get Line extension extension NON NLS 1 NON NLS 2 get Point reporter validate extension points I Plugin Extension Point expoints plugin Base get Extension Points for int i 0 i expoints length i I Plugin Extension Point expoint expoints i assert Not Null id extension point get Line expoint expoint NON NLS 1 NON NLS 2 get Id reporter assert Not Null name extension point get Line expoint expoint NON NLS 1 NON NLS 2 get Name reporter  validateRequiredAttributes IPluginBase pluginBase PluginErrorReporter rootName pluginBase IFragment IFragment IFragment pluginBase rootName assertNotNull rootName getLine getPluginId assertNotNull rootName getLine getPluginVersion assertNotNull rootName getLine pluginBase pluginBase getName assertNotNull rootName getLine pluginBase pluginBase getId assertNotNull rootName getLine pluginBase pluginBase getVersion IPluginLibrary pluginBase getLibraries IPluginLibrary assertNotNull getLine getName IPluginImport pluginBase getImports IPluginImport assertNotNull getLine getId IPluginExtension pluginBase getExtensions IPluginExtension assertNotNull getLine getPoint IPluginExtensionPoint pluginBase getExtensionPoints IPluginExtensionPoint assertNotNull getLine getId assertNotNull getLine getName
private static void assert Not Null String att String el int line String value Plugin Error Reporter reporter if value null String message PDE get Formatted Message Builders manifest missing Required new String att el NON NLS 1 reporter report Error message line  assertNotNull PluginErrorReporter getFormattedMessage missingRequired reportError
private void validate Requires I Plugin Base plugin Base Plugin Error Reporter reporter int flag Try to find the plug ins if flag Compiler Flags IGNORE return I Plugin Import imports plugin Base get Imports for int i 0 i imports length i I Plugin Import iimport imports i if imports i is Optional PDE Core get Default find Plugin iimport get Id iimport get Version iimport get Match null reporter report PDE get Formatted Message Builders Manifest dependency iimport get Id NON NLS 1 get Line iimport flag  validateRequires IPluginBase pluginBase PluginErrorReporter CompilerFlags IPluginImport pluginBase getImports IPluginImport isOptional PDECore getDefault findPlugin getId getVersion getMatch getFormattedMessage getId getLine
private void validate Extensions I Plugin Base plugin Base Plugin Error Reporter reporter I Progress Monitor monitor I Plugin Extension extensions plugin Base get Extensions Schema Marker Factory factory new Schema Marker Factory for int i 0 i extensions length i if monitor is Canceled break I Plugin Extension extension extensions i I Plugin Extension Point point PDE Core get Default find Extension Point extension get Point if point null int flag Compiler Flags get Flag Compiler Flags P UNRESOLVED EX POINTS if flag Compiler Flags IGNORE reporter report PDE get Formatted Message Builders Manifest ex point extension get Point NON NLS 1 get Line extension flag else I Schema schema PDE Core get Default get Schema Registry get Schema extension get Point if schema null factory set Point extension get Point reporter set Marker Factory factory validate Extension Content extension schema reporter monitor reporter set Marker Factory null  validateExtensions IPluginBase pluginBase PluginErrorReporter IProgressMonitor IPluginExtension pluginBase getExtensions SchemaMarkerFactory SchemaMarkerFactory isCanceled IPluginExtension IPluginExtensionPoint PDECore getDefault findExtensionPoint getPoint CompilerFlags getFlag CompilerFlags P_UNRESOLVED_EX_POINTS CompilerFlags getFormattedMessage getPoint getLine ISchema PDECore getDefault getSchemaRegistry getSchema getPoint setPoint getPoint setMarkerFactory validateExtensionContent setMarkerFactory
private void validate Extension Content I Plugin Extension extension I Schema schema Plugin Error Reporter reporter I Progress Monitor monitor I Plugin Object elements extension get Children for int i 0 i elements length i if monitor is Canceled break I Plugin Element element I Plugin Element elements i validate Element element schema reporter  validateExtensionContent IPluginExtension ISchema PluginErrorReporter IProgressMonitor IPluginObject getChildren isCanceled IPluginElement IPluginElement validateElement
private void validate Content Model I Plugin Parent parent I Schema Element element Info Plugin Error Reporter reporter if Compiler Flags get Flag Compiler Flags P UNKNOWN ELEMENT Compiler Flags IGNORE return I Plugin Object children parent get Children I Schema Type type element Info get Type Compare the content model defined in the type to the actual content of this parent Errors should be Elements that should not appear according to the content model Elements that appear too few or too many times No elements when the type requires some Elements in the wrong order Hash Set allowed Elements new Hash Set compute Allowed Elements type allowed Elements for int i 0 i children length i I Plugin Element child I Plugin Element children i String name child get Name if allowed Elements contains name Invalid reporter report PDE get Formatted Message Builders Manifest child new String NON NLS 1 child get Name parent get Name get Line child Compiler Flags get Flag Compiler Flags P UNKNOWN ELEMENT  validateContentModel IPluginParent ISchemaElement elementInfo PluginErrorReporter CompilerFlags getFlag CompilerFlags P_UNKNOWN_ELEMENT CompilerFlags IPluginObject getChildren ISchemaType elementInfo getType HashSet allowedElements HashSet computeAllowedElements allowedElements IPluginElement IPluginElement getName allowedElements getFormattedMessage getName getName getLine CompilerFlags getFlag CompilerFlags P_UNKNOWN_ELEMENT
private void compute Allowed Elements I Schema Type type Hash Set element Set if type instanceof I Schema Complex Type I Schema Complex Type complex Type I Schema Complex Type type I Schema Compositor compositor complex Type get Compositor if compositor null compute Allowed Elements compositor element Set I Schema Attribute attrs complex Type get Attributes for int i 0 i attrs length i if attrs i get Kind I Schema Attribute JAVA element Set add attrs i get Name  computeAllowedElements ISchemaType HashSet elementSet ISchemaComplexType ISchemaComplexType complexType ISchemaComplexType ISchemaCompositor complexType getCompositor computeAllowedElements elementSet ISchemaAttribute complexType getAttributes getKind ISchemaAttribute elementSet getName
private void compute Allowed Elements I Schema Compositor compositor Hash Set element Set I Schema Object children compositor get Children for int i 0 i children length i I Schema Object child children i if child instanceof I Schema Object Reference I Schema Object Reference ref I Schema Object Reference child I Schema Element ref Element I Schema Element ref get Referenced Object if ref Element null element Set add ref Element get Name else if child instanceof I Schema Compositor compute Allowed Elements I Schema Compositor child element Set  computeAllowedElements ISchemaCompositor HashSet elementSet ISchemaObject getChildren ISchemaObject ISchemaObjectReference ISchemaObjectReference ISchemaObjectReference ISchemaElement refElement ISchemaElement getReferencedObject refElement elementSet refElement getName ISchemaCompositor computeAllowedElements ISchemaCompositor elementSet
private void validate Element I Plugin Element element I Schema schema Plugin Error Reporter reporter I Schema Element schema Element schema find Element element get Name boolean valid schema Element null boolean executable Element false I Schema Element parent Schema schema find Element element get Parent get Name if schema Element null if parent Schema null I Schema Attribute attr parent Schema get Attribute element get Name if attr null attr get Kind I Schema Attribute JAVA valid true executable Element true if valid int flag Compiler Flags get Flag Compiler Flags P UNKNOWN ELEMENT if flag Compiler Flags IGNORE reporter report PDE get Formatted Message Builders Manifest element element get Name NON NLS 1 get Line element flag else if executable Element validate Java element get Attribute class parent Schema NON NLS 1 get Attribute element get Name reporter return else I Plugin Attribute atts element get Attributes validate Existing Attributes atts schema Element reporter validate Required Attributes element schema Element reporter if schema Element null validate Content Model element schema Element reporter I Plugin Object children element get Children for int i 0 i children length i I Plugin Element child I Plugin Element children i need to validate if this child can appear here according to the parent type validate Element child schema reporter  validateElement IPluginElement ISchema PluginErrorReporter ISchemaElement schemaElement findElement getName schemaElement executableElement ISchemaElement parentSchema findElement getParent getName schemaElement parentSchema ISchemaAttribute parentSchema getAttribute getName getKind ISchemaAttribute executableElement CompilerFlags getFlag CompilerFlags P_UNKNOWN_ELEMENT CompilerFlags getFormattedMessage getName getLine executableElement validateJava getAttribute parentSchema getAttribute getName IPluginAttribute getAttributes validateExistingAttributes schemaElement validateRequiredAttributes schemaElement schemaElement validateContentModel schemaElement IPluginObject getChildren IPluginElement IPluginElement validateElement
private void validate Existing Attributes I Plugin Attribute atts I Schema Element schema Element Plugin Error Reporter reporter for int i 0 i atts length i I Plugin Attribute att atts i I Schema Attribute att Info schema Element get Attribute att get Name if att Info null int flag Compiler Flags get Flag Compiler Flags P UNKNOWN ATTRIBUTE if flag Compiler Flags IGNORE reporter report PDE get Formatted Message Builders Manifest attribute att get Name NON NLS 1 get Line att get Parent flag else validate Attribute att att Info reporter  validateExistingAttributes IPluginAttribute ISchemaElement schemaElement PluginErrorReporter IPluginAttribute ISchemaAttribute attInfo schemaElement getAttribute getName attInfo CompilerFlags getFlag CompilerFlags P_UNKNOWN_ATTRIBUTE CompilerFlags getFormattedMessage getName getLine getParent validateAttribute attInfo
private void validate Attribute I Plugin Attribute att I Schema Attribute att Info Plugin Error Reporter reporter I Schema Simple Type type att Info get Type I Schema Restriction restriction type get Restriction if restriction null validate Restriction att restriction reporter int kind att Info get Kind if kind I Schema Attribute JAVA validate Java att att Info reporter else if kind I Schema Attribute RESOURCE validate Resource att att Info reporter else if type get Name equals boolean NON NLS 1 validate Boolean att reporter  validateAttribute IPluginAttribute ISchemaAttribute attInfo PluginErrorReporter ISchemaSimpleType attInfo getType ISchemaRestriction getRestriction validateRestriction attInfo getKind ISchemaAttribute validateJava attInfo ISchemaAttribute validateResource attInfo getName validateBoolean
private void validate Restriction I Plugin Attribute att I Schema Restriction restriction Plugin Error Reporter reporter if Compiler Flags get Flag Compiler Flags P ILLEGAL ATT VALUE Compiler Flags IGNORE return Object children restriction get Children String value att get Value for int i 0 i children length i Object child children i if child instanceof I Schema Enumeration I Schema Enumeration enum I Schema Enumeration child if enum get Name equals value return reporter report PDE get Formatted Message Builders Manifest att value NON NLS 1 new String value att get Name get Line att get Parent Compiler Flags get Flag Compiler Flags P ILLEGAL ATT VALUE  validateRestriction IPluginAttribute ISchemaRestriction PluginErrorReporter CompilerFlags getFlag CompilerFlags P_ILLEGAL_ATT_VALUE CompilerFlags getChildren getValue ISchemaEnumeration ISchemaEnumeration ISchemaEnumeration getName getFormattedMessage getName getLine getParent CompilerFlags getFlag CompilerFlags P_ILLEGAL_ATT_VALUE
private void validate Boolean I Plugin Attribute att Plugin Error Reporter reporter if Compiler Flags get Flag Compiler Flags P ILLEGAL ATT VALUE Compiler Flags IGNORE return String value att get Value if value equals Ignore Case true NON NLS 1 return if value equals Ignore Case false NON NLS 1 return reporter report PDE get Formatted Message Builders Manifest att value NON NLS 1 new String value att get Name get Line att get Parent Compiler Flags get Flag Compiler Flags P ILLEGAL ATT VALUE  validateBoolean IPluginAttribute PluginErrorReporter CompilerFlags getFlag CompilerFlags P_ILLEGAL_ATT_VALUE CompilerFlags getValue equalsIgnoreCase equalsIgnoreCase getFormattedMessage getName getLine getParent CompilerFlags getFlag CompilerFlags P_ILLEGAL_ATT_VALUE
private void validate Java I Plugin Attribute att I Schema Attribute att Info Plugin Error Reporter reporter if Compiler Flags get Flag Compiler Flags P UNKNOWN CLASS Compiler Flags IGNORE return String q Name att get Value I Project project att get Model get Underlying Resource get Project I Java Project java Project Java Core create project try be careful people have the option to use the format fullqualified Name static Method int index q Name index Of NON NLS 1 if index 1 q Name q Name substring 0 index if java Project find Type q Name null reporter report PDE get Formatted Message Builders Manifest class new String q Name NON NLS 1 att get Name get Line att get Parent Compiler Flags get Flag Compiler Flags P UNKNOWN CLASS catch Java Model Exception e  validateJava IPluginAttribute ISchemaAttribute attInfo PluginErrorReporter CompilerFlags getFlag CompilerFlags P_UNKNOWN_CLASS CompilerFlags qName getValue IProject getModel getUnderlyingResource getProject IJavaProject javaProject JavaCore fullqualifiedName staticMethod qName indexOf qName qName javaProject findType qName getFormattedMessage qName getName getLine getParent CompilerFlags getFlag CompilerFlags P_UNKNOWN_CLASS JavaModelException
private void validate Resource I Plugin Attribute att I Schema Attribute att Info Plugin Error Reporter reporter if Compiler Flags get Flag Compiler Flags P UNKNOWN RESOURCE Compiler Flags IGNORE return String path att get Value I Project project att get Model get Underlying Resource get Project I Resource resource project find Member new Path path if resource null reporter report PDE get Formatted Message Builders Manifest resource new String path NON NLS 1 att get Name get Line att get Parent Compiler Flags get Flag Compiler Flags P UNKNOWN RESOURCE  validateResource IPluginAttribute ISchemaAttribute attInfo PluginErrorReporter CompilerFlags getFlag CompilerFlags P_UNKNOWN_RESOURCE CompilerFlags getValue IProject getModel getUnderlyingResource getProject IResource findMember getFormattedMessage getName getLine getParent CompilerFlags getFlag CompilerFlags P_UNKNOWN_RESOURCE
private void validate Required Attributes I Plugin Element element I Schema Element schema Element Plugin Error Reporter reporter if Compiler Flags get Flag Compiler Flags P NO REQUIRED ATT Compiler Flags IGNORE return I Schema Attribute att Infos schema Element get Attributes for int i 0 i att Infos length i I Schema Attribute att Info att Infos i if att Info get Use I Schema Attribute REQUIRED boolean valid element get Attribute att Info get Name null if valid att Info get Kind I Schema Attribute JAVA I Plugin Object children element get Children for int j 0 j children length j if att Info get Name equals children j get Name valid true break if valid reporter report PDE get Formatted Message Builders Manifest required att Info get Name NON NLS 1 get Line element Compiler Flags get Flag Compiler Flags P NO REQUIRED ATT  validateRequiredAttributes IPluginElement ISchemaElement schemaElement PluginErrorReporter CompilerFlags getFlag CompilerFlags P_NO_REQUIRED_ATT CompilerFlags ISchemaAttribute attInfos schemaElement getAttributes attInfos ISchemaAttribute attInfo attInfos attInfo getUse ISchemaAttribute getAttribute attInfo getName attInfo getKind ISchemaAttribute IPluginObject getChildren attInfo getName getName getFormattedMessage attInfo getName getLine CompilerFlags getFlag CompilerFlags P_NO_REQUIRED_ATT
private static int get Line I Plugin Object object int line 1 if object instanceof I Source Object line I Source Object object get Start Line return line  getLine IPluginObject ISourceObject ISourceObject getStartLine

class Default Marker Factory implements I Marker Factory public I Marker create Marker I File file throws Core Exception return file create Marker I Marker PROBLEM  DefaultMarkerFactory IMarkerFactory IMarker createMarker IFile CoreException createMarker IMarker
public Plugin Error Reporter  PluginErrorReporter
public Plugin Error Reporter I File file error Count 0 this file file if file null remove File Markers default Marker Factory new Default Marker Factory marker Factory default Marker Factory  PluginErrorReporter IFile errorCount removeFileMarkers defaultMarkerFactory DefaultMarkerFactory markerFactory defaultMarkerFactory
public I File get File return file  IFile getFile
public void set Marker Factory I Marker Factory factory if factory null marker Factory factory else marker Factory default Marker Factory  setMarkerFactory IMarkerFactory markerFactory markerFactory defaultMarkerFactory
private void add Marker String message int line Number int severity boolean fatal try I Marker marker marker Factory create Marker file marker set Attribute I Marker MESSAGE message marker set Attribute I Marker SEVERITY severity if line Number 1 marker set Attribute I Marker LINE NUMBER line Number catch Core Exception e PDE Core log Exception e  addMarker lineNumber IMarker markerFactory createMarker setAttribute IMarker setAttribute IMarker lineNumber setAttribute IMarker LINE_NUMBER lineNumber CoreException PDECore logException
private void add Marker SAX Parse Exception e int severity boolean fatal add Marker e get Message e get Line Number severity fatal  addMarker SAXParseException addMarker getMessage getLineNumber
public void error SAX Parse Exception exception throws SAX Exception if file null add Marker exception I Marker SEVERITY ERROR false error Count  SAXParseException SAXException addMarker IMarker SEVERITY_ERROR errorCount
error Count public void fatal Error SAX Parse Exception exception throws SAX Exception if file null add Marker exception I Marker SEVERITY ERROR true error Count  errorCount fatalError SAXParseException SAXException addMarker IMarker SEVERITY_ERROR errorCount
error Count public int get Error Count return error Count  errorCount getErrorCount errorCount
private void remove File Markers try file delete Markers I Marker PROBLEM false I Resource DEPTH ZERO file delete Markers Schema Marker Factory MARKER ID false I Resource DEPTH ZERO catch Core Exception e PDE Core log Exception e  removeFileMarkers deleteMarkers IMarker IResource DEPTH_ZERO deleteMarkers SchemaMarkerFactory MARKER_ID IResource DEPTH_ZERO CoreException PDECore logException
public void report Error String message report Error message 1  reportError reportError
public void report String message int line int severity if severity Compiler Flags ERROR report Error message line else if severity Compiler Flags WARNING report Warning message line  CompilerFlags reportError CompilerFlags reportWarning
public void report Error String message int line error Count if file null add Marker message line I Marker SEVERITY ERROR false  reportError errorCount addMarker IMarker SEVERITY_ERROR
public void report Warning String message report Warning message 1  reportWarning reportWarning
public void report Warning String message int line add Marker message line I Marker SEVERITY WARNING false  reportWarning addMarker IMarker SEVERITY_WARNING
public void warning SAX Parse Exception exception throws SAX Exception add Marker exception I Marker SEVERITY WARNING false  SAXParseException SAXException addMarker IMarker SEVERITY_WARNING

public Schema Handler I File file super file create Text Document file f Line Table new Hashtable  SchemaHandler IFile createTextDocument fLineTable
public void start Element String uri String local Name String q Name Attributes attributes throws SAX Exception Element element f Document create Element q Name for int i 0 i attributes get Length i element set Attribute attributes getQ Name i attributes get Value i Integer line Number new Integer f Locator get Line Number try line Number get Correct Start Line q Name catch Bad Location Exception e Integer range new Integer line Number new Integer 1 f Line Table put element range if f Root Element null f Root Element element else Element f Element Stack peek append Child element f Element Stack push element  startElement localName qName SAXException fDocument createElement qName getLength setAttribute getQName getValue lineNumber fLocator getLineNumber lineNumber getCorrectStartLine qName BadLocationException lineNumber fLineTable fRootElement fRootElement fElementStack appendChild fElementStack
public void end Element String arg0 String arg1 String arg2 throws SAX Exception Integer range Integer f Line Table get f Element Stack pop range 1 new Integer f Locator get Line Number  endElement SAXException fLineTable fElementStack fLocator getLineNumber
see org xml sax helpers Default Handler set Document Locator org xml sax Locator public void set Document Locator Locator locator f Locator locator  DefaultHandler setDocumentLocator setDocumentLocator fLocator
public void start Document throws SAX Exception Document Builder Factory factory Document Builder Factory new Instance try f Document factory new Document Builder new Document catch Parser Configuration Exception e  startDocument SAXException DocumentBuilderFactory DocumentBuilderFactory newInstance fDocument newDocumentBuilder newDocument ParserConfigurationException
see org xml sax helpers Default Handler end Document public void end Document throws SAX Exception f Document append Child f Root Element  DefaultHandler endDocument endDocument SAXException fDocument appendChild fRootElement
public void characters char characters int offset int length throws SAX Exception String Buffer buff new String Buffer for int i 0 i length i buff append characters offset i Text text f Document create Text Node buff to String if f Root Element null f Document append Child text else Element f Element Stack peek append Child text  SAXException StringBuffer StringBuffer fDocument createTextNode toString fRootElement fDocument appendChild fElementStack appendChild
public Node get Document Element if f Document null Element doc Element f Document get Document Element if doc Element null doc Element normalize return doc Element return null  getDocumentElement fDocument docElement fDocument getDocumentElement docElement docElement docElement
public Hashtable get Line Table return f Line Table  getLineTable fLineTable
private void create Text Document I File file try Buffered Reader reader new Buffered Reader new File Reader file get Location toOS String String Buffer buffer new String Buffer while reader ready String line reader read Line if line null buffer append line buffer append System get Property line separator NON NLS 1 f Text Document new Document buffer to String f Find Replace Adapter new Find Replace Document Adapter f Text Document reader close catch File Not Found Exception e catch IO Exception e  createTextDocument IFile BufferedReader BufferedReader FileReader getLocation toOSString StringBuffer StringBuffer readLine getProperty fTextDocument toString fFindReplaceAdapter FindReplaceDocumentAdapter fTextDocument FileNotFoundException IOException
private Integer get Correct Start Line String element Name throws Bad Location Exception int line Number f Locator get Line Number int col Number f Locator get Column Number if col Number 0 col Number get Last Char Column line Number int offset f Text Document get Line Offset line Number 1 col Number 1 I Region region f Find Replace Adapter find offset element Name false false false false NON NLS 1 return new Integer f Text Document get Line Of Offset region get Offset 1  getCorrectStartLine elementName BadLocationException lineNumber fLocator getLineNumber colNumber fLocator getColumnNumber colNumber colNumber getLastCharColumn lineNumber fTextDocument getLineOffset lineNumber colNumber IRegion fFindReplaceAdapter elementName fTextDocument getLineOfOffset getOffset
private int get Last Char Column int line throws Bad Location Exception String line Delimiter f Text Document get Line Delimiter line 1 int line Delimiter Length line Delimiter null line Delimiter length 0 return f Text Document get Line Length line 1 line Delimiter Length  getLastCharColumn BadLocationException lineDelimiter fTextDocument getLineDelimiter lineDelimiterLength lineDelimiter lineDelimiter fTextDocument getLineLength lineDelimiterLength

private String point public Schema Marker Factory  SchemaMarkerFactory
public Schema Marker Factory String point this point point  SchemaMarkerFactory
public void set Point String point this point point  setPoint
see org eclipse pde internal builders I Marker Factory create Marker org eclipse core resources I File public I Marker create Marker I File file throws Core Exception I Marker marker file create Marker MARKER ID marker set Attribute point point NON NLS 1 return marker  IMarkerFactory createMarker IFile IMarker createMarker IFile CoreException IMarker createMarker MARKER_ID setAttribute

private void append Attlist Print Writer out I Schema Attribute att int max Width add three spaces out print p class code id dtd nbsp nbsp out print p class code id dtd Attlist NON NLS 1 add name out print att get Name fill spaces to align data type int delta max Width att get Name length for int i 0 i delta 1 i out print nbsp NON NLS 1 add data type I Schema Simple Type type att get Type I Schema Restriction restriction null boolean choices false if type null restriction type get Restriction String type Name type null type get Name to Lower Case string NON NLS 1 if type Name equals boolean NON NLS 1 out print true false NON NLS 1 choices true else if restriction null append Restriction restriction out choices true else out print CDATA NON NLS 1 add use if att get Use I Schema Attribute REQUIRED if choices out print REQUIRED NON NLS 1 else if att get Use I Schema Attribute DEFAULT out print att get Value NON NLS 1 NON NLS 2 else if choices out print IMPLIED NON NLS 1  appendAttlist PrintWriter ISchemaAttribute maxWidth dtdAttlist getName maxWidth getName ISchemaSimpleType getType ISchemaRestriction getRestriction typeName getName toLowerCase typeName appendRestriction getUse ISchemaAttribute getUse ISchemaAttribute getValue
private void append Restriction I Schema Restriction restriction Print Writer out if restriction instanceof Choice Restriction Choice Restriction cr Choice Restriction restriction String choices cr get Choices As Strings out print NON NLS 1 for int i 0 i choices length i if i 0 out print NON NLS 1 out print choices i out print NON NLS 1  appendRestriction ISchemaRestriction PrintWriter ChoiceRestriction ChoiceRestriction ChoiceRestriction getChoicesAsStrings
private int calculate Max Attribute Width I Schema Attribute attributes int width 0 for int i 0 i attributes length i I Schema Attribute att attributes i width Math max width att get Name length return width  calculateMaxAttributeWidth ISchemaAttribute ISchemaAttribute getName
private boolean is Pre End String text int loc if loc 5 text length return false String tag text substring loc loc 6 if tag to Lower Case equals pre NON NLS 1 return true return false  isPreEnd toLowerCase
private boolean is Pre Start String text int loc if loc 4 text length return false String tag text substring loc loc 5 if tag to Lower Case equals pre NON NLS 1 return true return false  isPreStart toLowerCase
public void transform I Schema Descriptor desc Input Stream is Print Writer out Schema Handler reporter transform desc is out reporter null  ISchemaDescriptor InputStream PrintWriter SchemaHandler
public void transform I Schema Descriptor desc Input Stream is Print Writer out Schema Handler reporter URL cssURL ValidatingSAX Parser parse is reporter Node root reporter get Document Element if root null reporter get Error Count 0 return Schema schema new Schema desc desc get SchemaURL schema traverse Document Tree root reporter get Line Table if verify Schema schema reporter verify Sections schema reporter Compiler Flags get Boolean Compiler Flags S CREATE DOCS transform out schema cssURL GENERATE DOC  ISchemaDescriptor InputStream PrintWriter SchemaHandler ValidatingSAXParser getDocumentElement getErrorCount getSchemaURL traverseDocumentTree getLineTable verifySchema verifySections CompilerFlags getBoolean CompilerFlags S_CREATE_DOCS GENERATE_DOC
private boolean verify Schema Schema schema Plugin Error Reporter reporter if schema is Loaded false return false if schema is Valid false return false check File Type reporter get File reporter I Schema Element elements schema get Elements int errors 0 for int i 0 i elements length i I Schema Element element elements i I Schema Attribute attributes element get Attributes for int j 0 j attributes length j I Schema Attribute attribute attributes j errors verify Attribute element attribute reporter return errors 0  verifySchema PluginErrorReporter isLoaded isValid checkFileType getFile ISchemaElement getElements ISchemaElement ISchemaAttribute getAttributes ISchemaAttribute verifyAttribute
private void check File Type I File file Plugin Error Reporter reporter String name file get Name int dot name last Index Of if dot 1 String ext name substring dot 1 if ext equals Ignore Case xsd NON NLS 1 String message PDE get Resource String KEY DEPRECATED TYPE reporter report Warning message  checkFileType IFile PluginErrorReporter getName lastIndexOf equalsIgnoreCase getResourceString KEY_DEPRECATED_TYPE reportWarning
private int verify Attribute I Schema Element element I Schema Attribute attribute Plugin Error Reporter reporter int errors 0 I Schema Type type attribute get Type String message String args new String element get Name attribute get Name int line 1 if attribute instanceof I Source Object line I Source Object attribute get Start Line if attribute get Kind I Schema Attribute STRING if type null if type get Name equals boolean NON NLS 1 message PDE get Formatted Message KEY BOOLEAN INVALID args this kind cannot have boolean type reporter report Error message line errors if type instanceof Schema Simple Type Schema Simple Type type get Restriction null should not have restriction message PDE get Formatted Message KEY RESTRICTION INVALID args reporter report Error message line errors if attribute get Kind I Schema Attribute JAVA if attribute get Based On null based On makes no sense message PDE get Formatted Message KEY BASED ON INVALID args reporter report Error message line errors if type null type get Name equals boolean NON NLS 1 if type instanceof Schema Simple Type Schema Simple Type type get Restriction null should not have restriction message PDE get Formatted Message KEY RESTRICTION INVALID args reporter report Error message line errors if attribute get Use I Schema Attribute DEFAULT if attribute get Value null value makes no sense without default use message PDE get Formatted Message KEY VALUE WITHOUT DEFAULT args reporter report Error message line errors else if attribute get Value null there must be a value set for this use message PDE get Formatted Message KEY DEFAULT WITHOUT VALUE args reporter report Error message line errors return errors  verifyAttribute ISchemaElement ISchemaAttribute PluginErrorReporter ISchemaType getType getName getName ISourceObject ISourceObject getStartLine getKind ISchemaAttribute getName getFormattedMessage KEY_BOOLEAN_INVALID reportError SchemaSimpleType SchemaSimpleType getRestriction getFormattedMessage KEY_RESTRICTION_INVALID reportError getKind ISchemaAttribute getBasedOn basedOn getFormattedMessage KEY_BASED_ON_INVALID reportError getName SchemaSimpleType SchemaSimpleType getRestriction getFormattedMessage KEY_RESTRICTION_INVALID reportError getUse ISchemaAttribute getValue getFormattedMessage KEY_VALUE_WITHOUT_DEFAULT reportError getValue getFormattedMessage KEY_DEFAULT_WITHOUT_VALUE reportError
public static String get SchemaCSS Name return schema css NON NLS 1  getSchemaCSSName
return schema css NON NLS 1 public static String get PlatformCSS Name return book css NON NLS 1  getPlatformCSSName
public void addCSS Print Writer out URL cssURL byte css Purpose File css File if cssURL null if css Purpose GENERATE DOC out println default platform documentation stylesheets NON NLS 1 out println link rel stylesheet type text css href get PlatformCSS Name out println style import url get PlatformCSS Name style NON NLS 1 NON NLS 2 return else if css Purpose BUILD out println default platform documentation stylesheets NON NLS 1 out println link rel stylesheet type text css href get PlatformCSS Name out println style import url get PlatformCSS Name style NON NLS 1 NON NLS 2 return else css Purpose is TEMP I Plugin Descriptor descriptor I Plugin Descriptor Platform get Plugin Registry get Plugin Descriptor PLATFORM PLUGIN DOC if descriptor null return css File new File Boot Loader get InstallURL get File plugins NON NLS 1 descriptor to String File separator get PlatformCSS Name else css File new File cssURL get File if css Purpose GENERATE DOC out println custom platform documentation stylesheets NON NLS 1 out println link rel stylesheet type text css href css File get Name out println style import url css File get Name style NON NLS 1 NON NLS 2 return else if css Purpose BUILD out println custom platform documentation stylesheets NON NLS 1 out println link rel stylesheet type text css href cssURL to String out println style import url cssURL to String style NON NLS 1 NON NLS 2 return try File tempCSS File File create Temp File book css NON NLS 1 NON NLS 2 tempCSS File delete On Exit File Reader freader new File Reader css File Buffered Reader breader new Buffered Reader freader Print Writer pwriter new Print Writer new File Output Stream tempCSS File while breader ready pwriter println breader read Line out println temporary documentation stylesheets NON NLS 1 out println link rel stylesheet type text css href tempCSS File get Name out println style import url tempCSS File get Name style NON NLS 1 NON NLS 2 pwriter close breader close freader close catch Exception e do nothing if problem with css as it will only affect formatting may want to log this error in the future  PrintWriter cssPurpose cssFile cssPurpose GENERATE_DOC getPlatformCSSName getPlatformCSSName cssPurpose getPlatformCSSName getPlatformCSSName cssPurpose IPluginDescriptor IPluginDescriptor getPluginRegistry getPluginDescriptor PLATFORM_PLUGIN_DOC cssFile BootLoader getInstallURL getFile toString getPlatformCSSName cssFile getFile cssPurpose GENERATE_DOC cssFile getName cssFile getName cssPurpose toString toString tempCSSFile createTempFile tempCSSFile deleteOnExit FileReader FileReader cssFile BufferedReader BufferedReader PrintWriter PrintWriter FileOutputStream tempCSSFile readLine tempCSSFile getName tempCSSFile getName
public void transform Print Writer out I Schema schema transform out schema null TEMP  PrintWriter ISchema
public void transform Print Writer out I Schema schema URL cssURL byte css Purpose out println DOCTYPE HTML PUBLIC W3C DTD HTML 4 0 Transitional EN NON NLS 1 out print HEAD NON NLS 1 out println meta http equiv Content Type content text html charset iso 8859 1 NON NLS 1 addCSS out cssURL css Purpose add Schema Style out css Purpose out println HEAD NON NLS 1 out println HTML NON NLS 1 out println BODY NON NLS 1 out println H1 CENTER schema get Name CENTER H1 NON NLS 1 NON NLS 2 out println p p NON NLS 1 out print h6 class Caption Fig Column id header Identifier h6 NON NLS 1 out print schema get Qualified Point Id out println p p NON NLS 1 transform Section out schema Since I Document Section SINCE NON NLS 1 transform Description out schema out println p h6 class Caption Fig Column id header Configuration Markup h6 p NON NLS 1 transform Markup out schema transform Section out schema Examples I Document Section EXAMPLES NON NLS 1 transform Section out schema API Information NON NLS 1 I Document Section API INFO transform Section out schema Supplied Implementation NON NLS 1 I Document Section IMPLEMENTATION out println br NON NLS 1 out println p class note id copyright NON NLS 1 transform Section out schema I Document Section COPYRIGHT out println p NON NLS 1 out println BODY NON NLS 1 out println HTML NON NLS 1  PrintWriter ISchema cssPurpose cssPurpose addSchemaStyle cssPurpose getName CaptionFigColumn getQualifiedPointId transformSection IDocumentSection transformDescription CaptionFigColumn transformMarkup transformSection IDocumentSection transformSection IDocumentSection API_INFO transformSection IDocumentSection transformSection IDocumentSection
private void add Schema Style Print Writer out byte css Purpose try switch css Purpose case TEMP I Plugin Descriptor descriptor I Plugin Descriptor Platform get Plugin Registry get Plugin Descriptor PLATFORM PLUGIN DOC if descriptor null return addCSS out new URL Boot Loader get InstallURL plugins descriptor to String File separator get SchemaCSS Name css Purpose NON NLS 1 break case GENERATE DOC out println default schema documentation stylesheets NON NLS 1 out println link rel stylesheet type text css href get SchemaCSS Name out println style import url get SchemaCSS Name style NON NLS 1 NON NLS 2 break case BUILD out println default schema documentation stylesheets NON NLS 1 out println link rel stylesheet type text css href get SchemaCSS Name defect 43227 out println style import url get SchemaCSS Name style NON NLS 1 NON NLS 2 break default break catch MalformedURL Exception e do nothing  addSchemaStyle PrintWriter cssPurpose cssPurpose IPluginDescriptor IPluginDescriptor getPluginRegistry getPluginDescriptor PLATFORM_PLUGIN_DOC BootLoader getInstallURL toString getSchemaCSSName cssPurpose GENERATE_DOC getSchemaCSSName getSchemaCSSName getSchemaCSSName getSchemaCSSName MalformedURLException
private void transform Description Print Writer out I Schema schema out println p NON NLS 1 out print h6 class Caption Fig Column id header Description h6 NON NLS 1 transform Text out schema get Description I Schema Include includes schema get Includes for int i 0 i includes length i I Schema ischema includes i get Included Schema if ischema null out println p NON NLS 1 transform Text out ischema get Description out println p NON NLS 1  transformDescription PrintWriter ISchema CaptionFigColumn transformText getDescription ISchemaInclude getIncludes ISchema getIncludedSchema transformText getDescription
private void transform Element Print Writer out I Schema Element element String name element get Name String dtd element getDTD Representation true String name Link a name e name name a NON NLS 1 NON NLS 2 NON NLS 3 out print p class code id dtd lt ELEMENT NON NLS 1 name Link NON NLS 1 dtd out println gt p NON NLS 1 I Schema Attribute attributes element get Attributes if attributes length 0 out println p class code id dtd lt ATTLIST NON NLS 1 name p NON NLS 1 int max Width calculate Max Attribute Width element get Attributes for int i 0 i attributes length i append Attlist out attributes i max Width out println gt p NON NLS 1 out println p p NON NLS 1 inserted desc here for element String description element get Description if description null description trim length 0 out println p class Config Markup id element Desc NON NLS 1 transform Text out description out println p NON NLS 1 end of inserted desc for element if attributes length 0 out println br br NON NLS 1 return else if description null description trim length 0 out println br NON NLS 1 out println ul class Config Markup id attlist Desc NON NLS 1 for int i 0 i attributes length i I Schema Attribute att attributes i if name equals extension NON NLS 1 if att get Description null att get Description trim length 0 continue out print li b att get Name b NON NLS 1 NON NLS 2 transform Text out att get Description out println li NON NLS 1 out println ul NON NLS 1 adding spaces for new shifted view out print br NON NLS 1  transformElement PrintWriter ISchemaElement getName getDTDRepresentation nameLink nameLink ISchemaAttribute getAttributes maxWidth calculateMaxAttributeWidth getAttributes appendAttlist maxWidth getDescription ConfigMarkup elementDesc transformText ConfigMarkup attlistDesc ISchemaAttribute getDescription getDescription getName transformText getDescription
private void transform Markup Print Writer out I Schema schema I Schema Element elements schema get Resolved Elements for int i 0 i elements length i I Schema Element element elements i transform Element out element if elements length 0 I Schema Element last Element elements elements length 1 if last Element get Attribute Count 0 last Element get Description null out print br br  transformMarkup PrintWriter ISchema ISchemaElement getResolvedElements ISchemaElement transformElement ISchemaElement lastElement lastElement getAttributeCount lastElement getDescription
private void transform Section Print Writer out I Schema schema String section Id transform Section out schema null section Id  transformSection PrintWriter ISchema sectionId transformSection sectionId
private Document Section find Section I Document Section sections String section Id for int i 0 i sections length i if sections i get Section Id equals section Id return Document Section sections i return null  DocumentSection findSection IDocumentSection sectionId getSectionId sectionId DocumentSection
private boolean optional End Tag String tag for int i 0 i optional End Tag Keys length i if tag equals Ignore Case optional End Tag Keys i return true return false  optionalEndTag optionalEndTagKeys equalsIgnoreCase optionalEndTagKeys
private boolean forbidden End Tag String tag for int i 0 i forbidden End Tag Keys length i if tag equals Ignore Case forbidden End Tag Keys i return true return false  forbiddenEndTag forbiddenEndTagKeys equalsIgnoreCase forbiddenEndTagKeys
private boolean verify Description String desc Platform Object container Plugin Error Reporter reporter boolean open Tag false is Pre false boolean flag Forbidden Compiler Flags get Flag Compiler Flags S FORBIDDEN END TAGS Compiler Flags IGNORE boolean flag Optional Compiler Flags get Flag Compiler Flags S OPTIONAL END TAGS Compiler Flags IGNORE boolean flag General Compiler Flags get Flag Compiler Flags S OPEN TAGS Compiler Flags IGNORE Stack tag Stack new Stack Stack line Stack new Stack int linenum 1 if desc null desc trim length 0 return false String Tokenizer text new String Tokenizer desc true NON NLS 1 while text count Tokens 0 String next text next Token if next equals NON NLS 1 open Tag true if text has More Tokens String tag text next Token String temp Tag tag tag tag trim ignore eol char if tag index Of n 1 tag tag replace n int loc tag index Of NON NLS 1 int loc End tag last Index Of NON NLS 1 trim all attributes if existing i e color blue ignore opened tag if it is empty ends itself or is a comment if tag equals Ignore Case NON NLS 1 loc End tag length 1 text has More Tokens text next Token equals NON NLS 1 tag index Of 0 NON NLS 1 text has More Tokens text next Token equals NON NLS 1 open Tag false linenum get Line Break Count temp Tag continue tag loc 1 tag tag substring 0 loc if loc End 0 assert it is not an end tag if tag equals Ignore Case pre is Pre NON NLS 1 is Pre true tag Stack push tag line Stack push new Integer linenum else if is Pre if forbidden End Tag tag tag Stack push tag line Stack push new Integer linenum else tag tag substring 1 take off prefix and all existing attributes if is Pre if tag equals Ignore Case pre NON NLS 1 is Pre false tag Stack pop line Stack pop else open Tag false linenum get Line Break Count temp Tag continue else if tag Stack is Empty tag Stack peek to String equals Ignore Case tag tag Stack pop line Stack pop else if forbidden End Tag tag if flag Forbidden report FORBIDDEN NON NLS 1 tag NON NLS 1 linenum container reporter else if tag Stack is Empty tag Stack search tag 1 if flag General report GENERAL NON NLS 1 tag NON NLS 1 linenum container reporter else top of stack has general tag that has not been given an end tag int search tag Stack search tag do if flag General while search 1 optional End Tag tag Stack peek to String tag Stack pop line Stack pop search else while search 1 optional End Tag tag Stack peek to String report GENERAL NON NLS 1 tag Stack pop to String Integer line Stack pop int Value container reporter search if flag Optional while search 1 optional End Tag tag Stack peek to String tag Stack pop line Stack pop search else while search 1 optional End Tag tag Stack peek to String report OPTIONAL NON NLS 1 tag Stack pop to String Integer line Stack pop int Value container reporter search if search 1 tag Stack pop line Stack pop search while search 0 if text has More Tokens text next Token equals NON NLS 1 open Tag false else if flag General if loc End 1 report OPEN TAG NON NLS 1 null NON NLS 1 linenum container reporter else report OPEN TAG NON NLS 1 null NON NLS 1 linenum container reporter open Tag false linenum get Line Break Count temp Tag else linenum get Line Break Count next if open Tag report OPEN TAG null linenum container reporter NON NLS 1 NON NLS 2 while tag Stack is Empty if optional End Tag tag Stack peek to String if flag Optional tag Stack pop line Stack pop else report OPTIONAL NON NLS 1 tag Stack pop to String Integer line Stack pop int Value container reporter else if flag General tag Stack pop line Stack pop else report GENERAL NON NLS 1 tag Stack pop to String Integer line Stack pop int Value container reporter return false  verifyDescription PlatformObject PluginErrorReporter openTag isPre flagForbidden CompilerFlags getFlag CompilerFlags S_FORBIDDEN_END_TAGS CompilerFlags flagOptional CompilerFlags getFlag CompilerFlags S_OPTIONAL_END_TAGS CompilerFlags flagGeneral CompilerFlags getFlag CompilerFlags S_OPEN_TAGS CompilerFlags tagStack lineStack StringTokenizer StringTokenizer countTokens nextToken openTag hasMoreTokens nextToken tempTag indexOf indexOf locEnd lastIndexOf equalsIgnoreCase locEnd hasMoreTokens nextToken indexOf hasMoreTokens nextToken openTag getLineBreakCount tempTag locEnd equalsIgnoreCase isPre isPre tagStack lineStack isPre forbiddenEndTag tagStack lineStack isPre equalsIgnoreCase isPre tagStack lineStack openTag getLineBreakCount tempTag tagStack isEmpty tagStack toString equalsIgnoreCase tagStack lineStack forbiddenEndTag flagForbidden tagStack isEmpty tagStack flagGeneral tagStack flagGeneral optionalEndTag tagStack toString tagStack lineStack optionalEndTag tagStack toString tagStack toString lineStack intValue flagOptional optionalEndTag tagStack toString tagStack lineStack optionalEndTag tagStack toString tagStack toString lineStack intValue tagStack lineStack hasMoreTokens nextToken openTag flagGeneral locEnd OPEN_TAG OPEN_TAG openTag getLineBreakCount tempTag getLineBreakCount openTag OPEN_TAG tagStack isEmpty optionalEndTag tagStack toString flagOptional tagStack lineStack tagStack toString lineStack intValue flagGeneral tagStack lineStack tagStack toString lineStack intValue
private boolean report String err Type String err Tag int linenum Platform Object container Plugin Error Reporter reporter if container instanceof Schema Object if err Tag equals NON NLS 1 reporter report PDE get Resource String REPORT UNMATCHED Schema Object container get Start Line linenum Compiler Flags get Flag Compiler Flags S OPEN TAGS return Compiler Flags get Flag Compiler Flags S OPEN TAGS Compiler Flags ERROR else if err Type equals FORBIDDEN NON NLS 1 reporter report PDE get Formatted Message REPORT FORBIDDEN err Tag Schema Object container get Start Line linenum Compiler Flags get Flag Compiler Flags S FORBIDDEN END TAGS return Compiler Flags get Flag Compiler Flags S FORBIDDEN END TAGS Compiler Flags ERROR else if err Type equals OPTIONAL NON NLS 1 reporter report PDE get Formatted Message REPORT OPTIONAL err Tag Schema Object container get Start Line linenum Compiler Flags get Flag Compiler Flags S OPTIONAL END TAGS return Compiler Flags get Flag Compiler Flags S OPTIONAL END TAGS Compiler Flags ERROR else if err Type equals OPEN TAG NON NLS 1 reporter report PDE get Resource String REPORT OPEN Schema Object container get Start Line linenum Compiler Flags get Flag Compiler Flags S OPEN TAGS return Compiler Flags get Flag Compiler Flags S OPEN TAGS Compiler Flags ERROR else reporter report PDE get Formatted Message REPORT GENERAL err Tag Schema Object container get Start Line linenum Compiler Flags get Flag Compiler Flags S OPEN TAGS return Compiler Flags get Flag Compiler Flags S OPEN TAGS Compiler Flags ERROR else i e if container instanceof Schema if err Tag equals NON NLS 1 reporter report PDE get Resource String REPORT UNMATCHED Schema container get Overview Start Line linenum Compiler Flags get Flag Compiler Flags S OPEN TAGS return Compiler Flags get Flag Compiler Flags S OPEN TAGS Compiler Flags ERROR else if err Type equals FORBIDDEN NON NLS 1 reporter report PDE get Formatted Message REPORT FORBIDDEN err Tag Schema container get Overview Start Line linenum Compiler Flags get Flag Compiler Flags S FORBIDDEN END TAGS return Compiler Flags get Flag Compiler Flags S FORBIDDEN END TAGS Compiler Flags ERROR else if err Type equals OPTIONAL NON NLS 1 reporter report PDE get Formatted Message REPORT OPTIONAL err Tag Schema container get Overview Start Line linenum Compiler Flags get Flag Compiler Flags S OPTIONAL END TAGS return Compiler Flags get Flag Compiler Flags S OPTIONAL END TAGS Compiler Flags ERROR else if err Type equals OPEN TAG NON NLS 1 reporter report PDE get Resource String REPORT OPEN Schema container get Overview Start Line linenum Compiler Flags get Flag Compiler Flags S OPEN TAGS return Compiler Flags get Flag Compiler Flags S OPEN TAGS Compiler Flags ERROR else reporter report PDE get Formatted Message REPORT GENERAL err Tag Schema container get Overview Start Line linenum Compiler Flags get Flag Compiler Flags S OPEN TAGS return Compiler Flags get Flag Compiler Flags S OPEN TAGS Compiler Flags ERROR  errType errTag PlatformObject PluginErrorReporter SchemaObject errTag getResourceString REPORT_UNMATCHED SchemaObject getStartLine CompilerFlags getFlag CompilerFlags S_OPEN_TAGS CompilerFlags getFlag CompilerFlags S_OPEN_TAGS CompilerFlags errType getFormattedMessage REPORT_FORBIDDEN errTag SchemaObject getStartLine CompilerFlags getFlag CompilerFlags S_FORBIDDEN_END_TAGS CompilerFlags getFlag CompilerFlags S_FORBIDDEN_END_TAGS CompilerFlags errType getFormattedMessage REPORT_OPTIONAL errTag SchemaObject getStartLine CompilerFlags getFlag CompilerFlags S_OPTIONAL_END_TAGS CompilerFlags getFlag CompilerFlags S_OPTIONAL_END_TAGS CompilerFlags errType OPEN_TAG getResourceString REPORT_OPEN SchemaObject getStartLine CompilerFlags getFlag CompilerFlags S_OPEN_TAGS CompilerFlags getFlag CompilerFlags S_OPEN_TAGS CompilerFlags getFormattedMessage REPORT_GENERAL errTag SchemaObject getStartLine CompilerFlags getFlag CompilerFlags S_OPEN_TAGS CompilerFlags getFlag CompilerFlags S_OPEN_TAGS CompilerFlags errTag getResourceString REPORT_UNMATCHED getOverviewStartLine CompilerFlags getFlag CompilerFlags S_OPEN_TAGS CompilerFlags getFlag CompilerFlags S_OPEN_TAGS CompilerFlags errType getFormattedMessage REPORT_FORBIDDEN errTag getOverviewStartLine CompilerFlags getFlag CompilerFlags S_FORBIDDEN_END_TAGS CompilerFlags getFlag CompilerFlags S_FORBIDDEN_END_TAGS CompilerFlags errType getFormattedMessage REPORT_OPTIONAL errTag getOverviewStartLine CompilerFlags getFlag CompilerFlags S_OPTIONAL_END_TAGS CompilerFlags getFlag CompilerFlags S_OPTIONAL_END_TAGS CompilerFlags errType OPEN_TAG getResourceString REPORT_OPEN getOverviewStartLine CompilerFlags getFlag CompilerFlags S_OPEN_TAGS CompilerFlags getFlag CompilerFlags S_OPEN_TAGS CompilerFlags getFormattedMessage REPORT_GENERAL errTag getOverviewStartLine CompilerFlags getFlag CompilerFlags S_OPEN_TAGS CompilerFlags getFlag CompilerFlags S_OPEN_TAGS CompilerFlags
private boolean verify Sections I Schema schema Plugin Error Reporter reporter if Compiler Flags get Flag Compiler Flags S OPEN TAGS Compiler Flags IGNORE Compiler Flags get Flag Compiler Flags S FORBIDDEN END TAGS Compiler Flags IGNORE Compiler Flags get Flag Compiler Flags S OPTIONAL END TAGS Compiler Flags IGNORE return true boolean has Error false Document Section section null String section Ids Document Section API INFO Document Section EXAMPLES Document Section IMPLEMENTATION Document Section P DESCRIPTION Document Section COPYRIGHT Document Section SINCE for int i 0 i section Ids length i section find Section schema get Document Sections section Ids i if section null String desc section get Description has Error verify Description desc section reporter true has Error has Error verify Description schema get Description Schema schema reporter true has Error return has Error  verifySections ISchema PluginErrorReporter CompilerFlags getFlag CompilerFlags S_OPEN_TAGS CompilerFlags CompilerFlags getFlag CompilerFlags S_FORBIDDEN_END_TAGS CompilerFlags CompilerFlags getFlag CompilerFlags S_OPTIONAL_END_TAGS CompilerFlags hasError DocumentSection sectionIds DocumentSection API_INFO DocumentSection DocumentSection DocumentSection P_DESCRIPTION DocumentSection DocumentSection sectionIds findSection getDocumentSections sectionIds getDescription hasError verifyDescription hasError hasError verifyDescription getDescription hasError hasError
private void transform Section Print Writer out I Schema schema String title String section Id I Document Section section find Section schema get Document Sections section Id if section null return String description section get Description if description null description trim length 0 return if title null out print h6 class Caption Fig Column id header title h6 NON NLS 1 NON NLS 2 transform Text out description out println out println p p NON NLS 1 out println  transformSection PrintWriter ISchema sectionId IDocumentSection findSection getDocumentSections sectionId getDescription CaptionFigColumn transformText
private void transform Text Print Writer out String text if text null return boolean preformatted false boolean in Tag false boolean in Cstring false for int i 0 i text length i char c text char At i if c if is Pre Start text i out print pre NON NLS 1 i 4 preformatted true continue if is Pre End text i out print pre NON NLS 1 i 5 preformatted false in Tag false in Cstring false continue if preformatted switch c case in Tag true out print p class code id tag NON NLS 1 out print lt NON NLS 1 break case out print gt NON NLS 1 out print p NON NLS 1 in Tag false in Cstring false break case out print amp NON NLS 1 break case out print apos NON NLS 1 break case if in Tag if in Cstring out print quot NON NLS 1 out print p NON NLS 1 out print p class code id tag NON NLS 1 in Cstring false else in Cstring true out print p class code id cstring NON NLS 1 out print quot NON NLS 1 break default out print c else out print c  transformText PrintWriter inTag inCstring charAt isPreStart isPreEnd inTag inCstring inTag inTag inCstring inTag inCstring inCstring inCstring
public int get Line Break Count String tag String Tokenizer tokenizer new String Tokenizer tag n true NON NLS 1 int token 0 while tokenizer has More Tokens if tokenizer next Token equals n NON NLS 1 token return token  getLineBreakCount StringTokenizer StringTokenizer hasMoreTokens nextToken

class Delta Visitor implements I Resource Delta Visitor private I Progress Monitor monitor public Delta Visitor I Progress Monitor monitor this monitor monitor  DeltaVisitor IResourceDeltaVisitor IProgressMonitor DeltaVisitor IProgressMonitor
public boolean visit I Resource Delta delta I Resource resource delta get Resource if resource instanceof I Project Only check projects with feature nature I Project project I Project resource try return project has Nature PDE SITE NATURE catch Core Exception e PDE log Exception e return false if resource instanceof I File see if this is it I File candidate I File resource if is Site File candidate That s it but only check it if it has been added or changed if delta get Kind I Resource Delta REMOVED check File candidate monitor return true return true  IResourceDelta IResource getResource IProject IProject IProject hasNature SITE_NATURE CoreException logException IFile IFile IFile isSiteFile getKind IResourceDelta checkFile
public Update Site Builder super  UpdateSiteBuilder
protected I Project build int kind Map args I Progress Monitor monitor throws Core Exception I Resource Delta delta null if kind FULL BUILD delta get Delta get Project if delta null kind FULL BUILD Full build I Project project get Project I File file project get File site xml NON NLS 1 if file exists check File file monitor else delta accept new Delta Visitor monitor return null  IProject IProgressMonitor CoreException IResourceDelta FULL_BUILD getDelta getProject FULL_BUILD IProject getProject IFile getFile checkFile DeltaVisitor
private void check File I File file I Progress Monitor monitor String message PDE get Formatted Message BUILDERS VERIFYING file get Full Path to String monitor sub Task message Plugin Error Reporter reporter new Plugin Error Reporter file ValidatingSAX Parser parse file reporter true if reporter get Error Count 0 validate File file reporter monitor sub Task PDE get Resource String BUILDERS UPDATING monitor done  checkFile IFile IProgressMonitor getFormattedMessage BUILDERS_VERIFYING getFullPath toString subTask PluginErrorReporter PluginErrorReporter ValidatingSAXParser getErrorCount validateFile subTask getResourceString BUILDERS_UPDATING
private boolean is Site File I File file return file get Parent equals file get Project file get Name to Lower Case equals site xml NON NLS 1  isSiteFile IFile getParent getProject getName toLowerCase
private void validate File I File file Plugin Error Reporter reporter Workspace Site Model model new Workspace Site Model file model load if model is Loaded I Site site model get Site if site null validate Required Attributes site reporter  validateFile IFile PluginErrorReporter WorkspaceSiteModel WorkspaceSiteModel isLoaded ISite getSite validateRequiredAttributes
private void validate Required Attributes I Site site Plugin Error Reporter reporter I Site Feature features site get Features for int i 0 i features length i I Site Feature feature features i assert Not Null url NON NLS 1 feature NON NLS 1 get Line feature feature getURL reporter I Site Category categories feature get Categories for int j 0 j categories length j I Site Category category categories j assert Not Null name NON NLS 1 category NON NLS 1 get Line category category get Name reporter I Site Archive archives site get Archives for int i 0 i archives length i I Site Archive archive archives i assert Not Null path NON NLS 1 archive NON NLS 1 get Line archive archive get Path reporter assert Not Null url NON NLS 1 archive NON NLS 1 get Line archive archive getURL reporter I Site Category Definition defs site get Category Definitions for int i 0 i defs length i I Site Category Definition def defs i assert Not Null name NON NLS 1 category def NON NLS 1 get Line def def get Name reporter assert Not Null label NON NLS 1 category def NON NLS 1 get Line def def get Label reporter  validateRequiredAttributes ISite PluginErrorReporter ISiteFeature getFeatures ISiteFeature assertNotNull getLine ISiteCategory getCategories ISiteCategory assertNotNull getLine getName ISiteArchive getArchives ISiteArchive assertNotNull getLine getPath assertNotNull getLine ISiteCategoryDefinition getCategoryDefinitions ISiteCategoryDefinition assertNotNull getLine getName assertNotNull getLine getLabel
private static int get Line I Site Object object int line 1 if object instanceof I Source Object line I Source Object object get Start Line return line  getLine ISiteObject ISourceObject ISourceObject getStartLine
private static void assert Not Null String att String el int line String value Plugin Error Reporter reporter if value null String message PDE get Formatted Message Builders manifest missing Required NON NLS 1 new String att el reporter report Error message line  assertNotNull PluginErrorReporter getFormattedMessage missingRequired reportError

public static void parse I File file Plugin Error Reporter reporter boolean use System Id try if use System Id parse file reporter return Input Source source new Input Source file get Contents URL dtd Location PDE Core get Default get Descriptor get InstallURL source set System Id dtd Location to String get Parser parse source reporter catch SAX Exception e catch Parser Configuration Exception e catch IO Exception e catch Core Exception e  IFile PluginErrorReporter useSystemId useSystemId InputSource InputSource getContents dtdLocation PDECore getDefault getDescriptor getInstallURL setSystemId dtdLocation toString getParser SAXException ParserConfigurationException IOException CoreException
public static void parse I File file Plugin Error Reporter reporter try parse file get Contents reporter catch Core Exception e  IFile PluginErrorReporter getContents CoreException
public static void parse Input Stream is Plugin Error Reporter reporter try get Parser parse is reporter catch Exception e  InputStream PluginErrorReporter getParser
private static SAX Parser get Parser throws Parser Configuration Exception SAX Exception if f Factory null f Factory SAX Parser Factory new Instance return f Factory newSAX Parser  SAXParser getParser ParserConfigurationException SAXException fFactory fFactory SAXParserFactory newInstance fFactory newSAXParser

public Feature Writer Output Stream out Feature feature Feature Build Script Generator generator throws IO Exception super out this feature feature this generator generator  FeatureWriter OutputStream FeatureBuildScriptGenerator IOException
public void print Feature throws Core Exception print Feature Declaration print Install Handler print Description print Copyright print License printURL print Includes print Requires print Plugins print Data end Tag feature NON NLS 1 super close  printFeature CoreException printFeatureDeclaration printInstallHandler printDescription printCopyright printLicense printIncludes printRequires printPlugins printData endTag
public void print Feature Declaration parameters clear parameters put id feature get Feature Identifier NON NLS 1 parameters put version feature get Versioned Identifier get Version to String NON NLS 1 parameters put label feature get Label Non Localized NON NLS 1 parameters put provider name feature get Provider Non Localized NON NLS 1 parameters put image feature get ImageURL String NON NLS 1 parameters put os feature getOS NON NLS 1 parameters put arch feature getOS Arch NON NLS 1 parameters put ws feature getWS NON NLS 1 parameters put nl feature getNL NON NLS 1 parameters put colocation affinity feature get Affinity Feature NON NLS 1 parameters put primary new Boolean feature is Primary NON NLS 1 parameters put application feature get Application NON NLS 1 start Tag feature parameters true NON NLS 1  printFeatureDeclaration getFeatureIdentifier getVersionedIdentifier getVersion toString getLabelNonLocalized getProviderNonLocalized getImageURLString getOSArch getAffinityFeature isPrimary getApplication startTag
public void print Install Handler if feature get Install Handler Entry null return parameters clear parameters put library feature get Install Handler Model get Library NON NLS 1 parameters put handler feature get Install Handler Model get Handler Name NON NLS 1 start Tag install handler parameters NON NLS 1 end Tag install handler NON NLS 1  printInstallHandler getInstallHandlerEntry getInstallHandlerModel getLibrary getInstallHandlerModel getHandlerName startTag endTag
public void print Description if feature get Description Model null return parameters clear parameters put url feature get Description Model getURL String NON NLS 1 start Tag description parameters true NON NLS 1 print Tabulation println feature get Description Model get Annotation Non Localized end Tag description NON NLS 1  printDescription getDescriptionModel getDescriptionModel getURLString startTag printTabulation getDescriptionModel getAnnotationNonLocalized endTag
private void print Copyright if feature get Copyright Model null return parameters clear parameters put url feature get Copyright Model getURL String NON NLS 1 start Tag copyright parameters true NON NLS 1 print Tabulation println feature get Copyright Model get Annotation Non Localized end Tag copyright NON NLS 1  printCopyright getCopyrightModel getCopyrightModel getURLString startTag printTabulation getCopyrightModel getAnnotationNonLocalized endTag
public void print License if feature get License Model null return parameters clear parameters put url feature get License Model getURL String NON NLS 1 start Tag license parameters true NON NLS 1 print Tabulation println feature get License Model get Annotation Non Localized end Tag license NON NLS 1  printLicense getLicenseModel getLicenseModel getURLString startTag printTabulation getLicenseModel getAnnotationNonLocalized endTag
public void printURL if feature get Update Site Entry Model null feature get Discovery Site Entry Models length 0 parameters clear start Tag url null NON NLS 1 if feature get Update Site Entry Model null parameters clear parameters put url feature get Update Site Entry Model getURL String NON NLS 1 parameters put label feature get Update Site Entry Model get Annotation Non Localized NON NLS 1 print Tag update parameters true true true NON NLS 1 URL Entry Model site Entries feature get Discovery Site Entry Models for int i 0 i site Entries length i parameters clear parameters put url site Entries i getURL String NON NLS 1 parameters put label site Entries i get Annotation Non Localized NON NLS 1 print Tag discovery parameters true true true NON NLS 1 end Tag url NON NLS 1  getUpdateSiteEntryModel getDiscoverySiteEntryModels startTag getUpdateSiteEntryModel getUpdateSiteEntryModel getURLString getUpdateSiteEntryModel getAnnotationNonLocalized printTag URLEntryModel siteEntries getDiscoverySiteEntryModels siteEntries siteEntries getURLString siteEntries getAnnotationNonLocalized printTag endTag
public void print Includes throws Core Exception I Included Feature Reference features feature get Raw Included Feature References for int i 0 i features length i parameters clear try parameters put id features i get Versioned Identifier get Identifier NON NLS 1 I Feature tmp Feature generator get Site false find Feature features i get Versioned Identifier get Identifier null true parameters put version tmp Feature get Versioned Identifier get Version to String NON NLS 1 catch Core Exception e String message Policy bind exception missing Feature features i get Versioned Identifier get Identifier NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION FEATURE MISSING message null print Tag includes parameters true true true NON NLS 1  printIncludes CoreException IIncludedFeatureReference getRawIncludedFeatureReferences getVersionedIdentifier getIdentifier IFeature tmpFeature getSite findFeature getVersionedIdentifier getIdentifier tmpFeature getVersionedIdentifier getVersion toString CoreException missingFeature getVersionedIdentifier getIdentifier CoreException IStatus PI_PDEBUILD EXCEPTION_FEATURE_MISSING printTag
private void print Requires throws Core Exception if feature get Import Models length 0 return start Tag requires null NON NLS 1 print Imports end Tag requires NON NLS 1  printRequires CoreException getImportModels startTag printImports endTag
private void print Imports throws Core Exception I Import imports feature get Raw Imports for int i 0 i imports length i parameters clear if imports i get Kind I Import KIND PLUGIN parameters put plugin imports i get Versioned Identifier get Identifier NON NLS 1 parameters put version imports i get Versioned Identifier get Version to String NON NLS 1 else The import refers to a feature parameters put feature imports i get Versioned Identifier get Identifier NON NLS 1 parameters put version imports i get Versioned Identifier get Version to String NON NLS 1 parameters put match get String For Matching Rule imports i get Rule NON NLS 1 print Tag import parameters true true true NON NLS 1  printImports CoreException IImport getRawImports getKind IImport KIND_PLUGIN getVersionedIdentifier getIdentifier getVersionedIdentifier getVersion toString getVersionedIdentifier getIdentifier getVersionedIdentifier getVersion toString getStringForMatchingRule getRule printTag
Method get String For Matching Rule param rule Number private String get String For Matching Rule int rule Number switch rule Number case 1 return perfect NON NLS 1 case 2 return equivalent NON NLS 1 case 3 return compatible NON NLS 1 case 4 return greater Or Equal NON NLS 1 case 0 default return NON NLS 1  getStringForMatchingRule ruleNumber getStringForMatchingRule ruleNumber ruleNumber greaterOrEqual
public void print Plugins throws Core Exception I Plugin Entry plugins feature get Raw Plugin Entries for int i 0 i plugins length i parameters clear parameters put id plugins i get Versioned Identifier get Identifier NON NLS 1 String version Requested plugins i get Versioned Identifier get Version to String Bundle Description effective Plugin null try effective Plugin generator get Site false get Registry get Resolved Bundle plugins i get Versioned Identifier get Identifier version Requested catch Core Exception e String message Policy bind exception missing Plugin plugins i get Versioned Identifier to String NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION PLUGIN MISSING message null if effective Plugin null String message Policy bind exception missing Plugin plugins i get Versioned Identifier to String NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION PLUGIN MISSING message null parameters put version effective Plugin get Version NON NLS 1 parameters put fragment new Boolean plugins i is Fragment NON NLS 1 parameters put os plugins i getOS NON NLS 1 parameters put arch plugins i getOS Arch NON NLS 1 parameters put ws plugins i getWS NON NLS 1 parameters put nl plugins i getNL NON NLS 1 parameters put download size new Long plugins i get Download Size 1 plugins i get Download Size 0 NON NLS 1 parameters put install size new Long plugins i get Install Size 1 plugins i get Install Size 0 NON NLS 1 print Tag plugin parameters true true true NON NLS 1  printPlugins CoreException IPluginEntry getRawPluginEntries getVersionedIdentifier getIdentifier versionRequested getVersionedIdentifier getVersion toString BundleDescription effectivePlugin effectivePlugin getSite getRegistry getResolvedBundle getVersionedIdentifier getIdentifier versionRequested CoreException missingPlugin getVersionedIdentifier toString CoreException IStatus PI_PDEBUILD EXCEPTION_PLUGIN_MISSING effectivePlugin missingPlugin getVersionedIdentifier toString CoreException IStatus PI_PDEBUILD EXCEPTION_PLUGIN_MISSING effectivePlugin getVersion isFragment getOSArch getDownloadSize getDownloadSize getInstallSize getInstallSize printTag
private void print Data I Non Plugin Entry entries feature get Non Plugin Entries for int i 0 i entries length i parameters put id entries i get Identifier NON NLS 1 parameters put os entries i getOS NON NLS 1 parameters put arch entries i getOS Arch NON NLS 1 parameters put ws entries i getWS NON NLS 1 parameters put nl entries i getNL NON NLS 1 parameters put download size new Long entries i get Download Size 1 entries i get Download Size 0 NON NLS 1 parameters put install size new Long entries i get Install Size 1 entries i get Install Size 0 NON NLS 1 print Tag data parameters true true true NON NLS 1  printData INonPluginEntry getNonPluginEntries getIdentifier getOSArch getDownloadSize getDownloadSize getInstallSize getInstallSize printTag

private String script Name public Fetch Script Generator super  scriptName FetchScriptGenerator
public Fetch Script Generator String element throws Core Exception set Element element  FetchScriptGenerator CoreException setElement
public void set Element String element throws Core Exception this element element  setElement CoreException
see Abstract Script Generator generate public void generate throws Core Exception map Infos process Map File Entry element if map Infos null I Status warning new Status I Status WARNING PI PDEBUILD WARNING ELEMENT NOT FETCHED Policy bind error fetching Failed element null NON NLS 1 Bundle Helper get Default get Log log warning return script Name FETCH FILE PREFIX map Infos get ELEMENT xml NON NLS 1 open Script working Directory script Name try generate Fetch Script finally close Script if recursive Generation map Infos get TYPE equals feature NON NLS 1 generate Fetch Files For Included Features save Repository Versions  AbstractScriptGenerator CoreException mapInfos processMapFileEntry mapInfos IStatus IStatus PI_PDEBUILD WARNING_ELEMENT_NOT_FETCHED fetchingFailed BundleHelper getDefault getLog scriptName FETCH_FILE_PREFIX mapInfos openScript workingDirectory scriptName generateFetchScript closeScript recursiveGeneration mapInfos generateFetchFilesForIncludedFeatures saveRepositoryVersions
private void save Repository Versions Properties properties String file Name throws Core Exception try Input Stream input new Buffered Input Stream new File Input Stream working Directory file Name NON NLS 1 try properties load input finally input close catch IO Exception e ignore the exception the same may not exist try Output Stream os new Buffered Output Stream new File Output Stream working Directory file Name try properties store os null finally os close catch IO Exception e String message Policy bind exception writing File directory Location DEFAULT PLUGIN VERSION FILENAME DESCRIPTOR NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING FILE message null  saveRepositoryVersions fileName CoreException InputStream BufferedInputStream FileInputStream workingDirectory fileName IOException OutputStream BufferedOutputStream FileOutputStream workingDirectory fileName IOException writingFile directoryLocation DEFAULT_PLUGIN_VERSION_FILENAME_DESCRIPTOR CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE
private void save Repository Versions throws Core Exception save Repository Versions repository Plugin Versions DEFAULT PLUGIN VERSION FILENAME DESCRIPTOR save Repository Versions repository Feature Versions DEFAULT FEATURE VERSION FILENAME DESCRIPTOR  saveRepositoryVersions CoreException saveRepositoryVersions repositoryPluginVersions DEFAULT_PLUGIN_VERSION_FILENAME_DESCRIPTOR saveRepositoryVersions repositoryFeatureVersions DEFAULT_FEATURE_VERSION_FILENAME_DESCRIPTOR
Method generate Fetch Files For Required Features private void generate Fetch Files For Included Features throws Core Exception I Included Feature Reference referenced Features Feature feature get Feature Included for int i 0 i referenced Features length i String feature Id referenced Features i get Versioned Identifier get Identifier if feature Properties contains Key GENERATION SOURCE FEATURE PREFIX feature Id continue Fetch Script Generator generator new Fetch Script Generator feature feature Id NON NLS 1 generator set Directory Location directory Location generator set Fetch Children fetch Children generator set Cvs Pass File Location cvs Pass File Location generator set Recursive Generation recursive Generation generator set Fetch Tag fetch Tag generator repository Plugin Versions repository Plugin Versions generator generate  generateFetchFilesForRequiredFeatures generateFetchFilesForIncludedFeatures CoreException IIncludedFeatureReference referencedFeatures getFeatureIncluded referencedFeatures featureId referencedFeatures getVersionedIdentifier getIdentifier featureProperties containsKey GENERATION_SOURCE_FEATURE_PREFIX featureId FetchScriptGenerator FetchScriptGenerator featureId setDirectoryLocation directoryLocation setFetchChildren fetchChildren setCvsPassFileLocation cvsPassFileLocation setRecursiveGeneration recursiveGeneration setFetchTag fetchTag repositoryPluginVersions repositoryPluginVersions
Main call for generating the script throws Core Exception protected void generate Fetch Script throws Core Exception generate Prologue generate Fetch Target generate Fetch Element Target if map Infos get TYPE equals feature NON NLS 1 NON NLS 2 generate Fetch Plugins Target generate Fetch Recusively Target generate Get FromCVS Target generate Epilogue  CoreException generateFetchScript CoreException generatePrologue generateFetchTarget generateFetchElementTarget mapInfos generateFetchPluginsTarget generateFetchRecusivelyTarget generateGetFromCVSTarget generateEpilogue
protected void generate Fetch Target throws Core Exception CONDITION Here we could check the values contained in the header of the file However it will require to have either generic value or to be sure that the value can be omitted This would be necessary for the top level feature script println script print Target Declaration TARGET FETCH null null null null script print Ant Call Task TARGET FETCH ELEMENT null null if map Infos get TYPE equals feature NON NLS 1 NON NLS 2 script print Ant Call Task TARGET FETCH PLUGINS null null script print Ant Call Task TARGET FETCH RECURSIVELY null null script print Target End  generateFetchTarget CoreException printTargetDeclaration TARGET_FETCH printAntCallTask TARGET_FETCH_ELEMENT mapInfos printAntCallTask TARGET_FETCH_PLUGINS printAntCallTask TARGET_FETCH_RECURSIVELY printTargetEnd
protected void generate Fetch Element Target script print Target Declaration TARGET FETCH ELEMENT null FEATURE ONLY null null try generate Fetch Entry element false catch Core Exception e I Status status new Status I Status ERROR PI PDEBUILD WARNING ELEMENT NOT FETCHED Policy bind error fetching Failed element null NON NLS 1 Bundle Helper get Default get Log log status script print Target End  generateFetchElementTarget printTargetDeclaration TARGET_FETCH_ELEMENT FEATURE_ONLY generateFetchEntry CoreException IStatus IStatus PI_PDEBUILD WARNING_ELEMENT_NOT_FETCHED fetchingFailed BundleHelper getDefault getLog printTargetEnd
protected void generate Fetch Plugins Target throws Core Exception script print Target Declaration TARGET FETCH PLUGINS null FEATURE AND PLUGINS null null retrieve Feature String map Infos get ELEMENT String map Infos get CVSROOT String map Infos get TAG String map Infos get PASSWORD String map Infos get PATH NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 1 NON NLS 5 generate Children Fetch Script script print Target End  generateFetchPluginsTarget CoreException printTargetDeclaration TARGET_FETCH_PLUGINS FEATURE_AND_PLUGINS retrieveFeature mapInfos mapInfos mapInfos mapInfos mapInfos generateChildrenFetchScript printTargetEnd
Decompose the elements constituting a Map file entry The values are returned in a Map code null code is returned if the entry does not exist param entry return Map throws Core Exception private Map process Map File Entry String entry throws Core Exception Map entry Infos new Hash Map 5 String cvs Info getCVS Info entry if cvs Info null String message Policy bind error missing Directory Entry entry NON NLS 1 Bundle Helper get Default get Log log new Status I Status ERROR PI PDEBUILD EXCEPTION ENTRY MISSING message null return null String cvs Fields Utils get Array From String With Blank cvs Info NON NLS 1 if cvs Fields length 2 String message Policy bind error incorrect Directory Entry element NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION ENTRY MISSING message null entry Infos put TAG fetch Tag length 0 cvs Fields 0 fetch Tag NON NLS 1 entry Infos put CVSROOT cvs Fields 1 NON NLS 1 entry Infos put PASSWORD cvs Fields length 2 cvs Fields 2 equals cvs Fields 2 null NON NLS 1 NON NLS 2 entry Infos put PATH cvs Fields length 3 cvs Fields 3 equals cvs Fields 3 null NON NLS 1 NON NLS 2 int index entry index Of NON NLS 1 entry Infos put TYPE entry substring 0 index NON NLS 1 entry Infos put ELEMENT entry substring index 1 NON NLS 1 return entry Infos  CoreException processMapFileEntry CoreException entryInfos HashMap cvsInfo getCVSInfo cvsInfo missingDirectoryEntry BundleHelper getDefault getLog IStatus PI_PDEBUILD EXCEPTION_ENTRY_MISSING cvsFields getArrayFromStringWithBlank cvsInfo cvsFields incorrectDirectoryEntry CoreException IStatus PI_PDEBUILD EXCEPTION_ENTRY_MISSING entryInfos fetchTag cvsFields fetchTag entryInfos cvsFields entryInfos cvsFields cvsFields cvsFields entryInfos cvsFields cvsFields cvsFields indexOf entryInfos entryInfos entryInfos
protected void generate Fetch Recusively Target throws Core Exception script print Target Declaration TARGET FETCH RECURSIVELY null FEATURES RECURSIVELY null null I Included Feature Reference compiled Features Feature feature get Feature Included for int i 0 i compiled Features length i String feature Id compiled Features i get Versioned Identifier get Identifier if feature Properties contains Key GENERATION SOURCE FEATURE PREFIX feature Id String extra Elements To Fetch Utils get Array From String feature Properties get Property GENERATION SOURCE FEATURE PREFIX feature Id NON NLS 1 for int j 1 j extra Elements To Fetch length j generate Fetch Entry extra Elements To Fetch j false continue script print Ant Task get Property Format PROPERTY BUILD DIRECTORY FETCH FILE PREFIX feature Id xml null TARGET FETCH null null null NON NLS 1 script print Target End  generateFetchRecusivelyTarget CoreException printTargetDeclaration TARGET_FETCH_RECURSIVELY FEATURES_RECURSIVELY IIncludedFeatureReference compiledFeatures getFeatureIncluded compiledFeatures featureId compiledFeatures getVersionedIdentifier getIdentifier featureProperties containsKey GENERATION_SOURCE_FEATURE_PREFIX featureId extraElementsToFetch getArrayFromString featureProperties getProperty GENERATION_SOURCE_FEATURE_PREFIX featureId extraElementsToFetch generateFetchEntry extraElementsToFetch printAntTask getPropertyFormat PROPERTY_BUILD_DIRECTORY FETCH_FILE_PREFIX featureId TARGET_FETCH printTargetEnd
protected void generate Fetch Entry String entry boolean xml File Only throws Core Exception Map map File Entry map Infos if entry equals element map File Entry process Map File Entry entry if map File Entry null return String password String map File Entry get PASSWORD if password null script printCVS Pass Task String map File Entry get CVSROOT password cvs Pass File Location NON NLS 1 String type String map File Entry get TYPE String location get Element Location type Map params new Hash Map 5 We directly export the CVS content into the correct directory params put destination map File Entry get ELEMENT NON NLS 1 NON NLS 2 params put TAG map File Entry get TAG NON NLS 1 NON NLS 2 params put CVSROOT map File Entry get CVSROOT NON NLS 1 NON NLS 2 params put quiet quiet NON NLS 1 NON NLS 2 String cvs Package String map File Entry get PATH null String map File Entry get ELEMENT String map File Entry get PATH NON NLS 1 NON NLS 2 NON NLS 3 String full Location null if type equals feature NON NLS 1 full Location location String map File Entry get ELEMENT DEFAULT FEATURE FILENAME DESCRIPTOR NON NLS 1 NON NLS 2 NON NLS 3 params put file To Check full Location NON NLS 1 cvs Package xml File Only DEFAULT FEATURE FILENAME DESCRIPTOR NON NLS 1 NON NLS 2 repository Feature Versions put map File Entry get ELEMENT map File Entry get TAG else if type equals plugin NON NLS 1 full Location location String map File Entry get ELEMENT DEFAULT PLUGIN FILENAME DESCRIPTOR NON NLS 1 NON NLS 2 NON NLS 3 params put file To Check full Location NON NLS 1 cvs Package xml File Only DEFAULT PLUGIN FILENAME DESCRIPTOR NON NLS 1 NON NLS 2 repository Plugin Versions put map File Entry get ELEMENT map File Entry get TAG else if type equals fragment NON NLS 1 full Location location String map File Entry get ELEMENT DEFAULT FRAGMENT FILENAME DESCRIPTOR NON NLS 1 NON NLS 2 NON NLS 3 params put file To Check full Location NON NLS 1 cvs Package xml File Only DEFAULT FRAGMENT FILENAME DESCRIPTOR NON NLS 1 NON NLS 2 repository Plugin Versions put map File Entry get ELEMENT map File Entry get TAG params put package cvs Package NON NLS 1 This call create a new property for every feature plugins or fragments that we must check the existence of script print Available Task full Location full Location script print Ant Task script Name get Property Format PROPERTY BUILD DIRECTORY type equals feature DEFAULT FEATURE LOCATION DEFAULT PLUGIN LOCATION TARGET GET FROM CVS null null params NON NLS 1 NON NLS 2 NON NLS 3  generateFetchEntry xmlFileOnly CoreException mapFileEntry mapInfos mapFileEntry processMapFileEntry mapFileEntry mapFileEntry printCVSPassTask mapFileEntry cvsPassFileLocation mapFileEntry getElementLocation HashMap mapFileEntry mapFileEntry mapFileEntry cvsPackage mapFileEntry mapFileEntry mapFileEntry fullLocation fullLocation mapFileEntry DEFAULT_FEATURE_FILENAME_DESCRIPTOR fileToCheck fullLocation cvsPackage xmlFileOnly DEFAULT_FEATURE_FILENAME_DESCRIPTOR repositoryFeatureVersions mapFileEntry mapFileEntry fullLocation mapFileEntry DEFAULT_PLUGIN_FILENAME_DESCRIPTOR fileToCheck fullLocation cvsPackage xmlFileOnly DEFAULT_PLUGIN_FILENAME_DESCRIPTOR repositoryPluginVersions mapFileEntry mapFileEntry fullLocation mapFileEntry DEFAULT_FRAGMENT_FILENAME_DESCRIPTOR fileToCheck fullLocation cvsPackage xmlFileOnly DEFAULT_FRAGMENT_FILENAME_DESCRIPTOR repositoryPluginVersions mapFileEntry mapFileEntry cvsPackage printAvailableTask fullLocation fullLocation printAntTask scriptName getPropertyFormat PROPERTY_BUILD_DIRECTORY DEFAULT_FEATURE_LOCATION DEFAULT_PLUGIN_LOCATION TARGET_GET_FROM_CVS
protected void generate Get FromCVS Target script print Target Declaration TARGET GET FROM CVS null null file To Check null NON NLS 1 script printCVS Task export d destination r tag package cvs Root null null null quiet null NON NLS 1 NON NLS 2 NON NLS 3 script print Target End  generateGetFromCVSTarget printTargetDeclaration TARGET_GET_FROM_CVS fileToCheck printCVSTask cvsRoot printTargetEnd
Helper method to control for what locations a mkdir Ant task was already generated so we can reduce replication param location protected void generate Mkdirs String location if mkdir Locations contains location return mkdir Locations add location script print Mkdir Task location  generateMkdirs mkdirLocations mkdirLocations printMkdirTask
throws Core Exception protected void generate Children Fetch Script throws Core Exception I Plugin Entry all Children feature get Raw Plugin Entries I Plugin Entry compiled Children feature get Plugin Entries for int i 0 i all Children length i String element Id all Children i get Versioned Identifier get Identifier We are not fetching the elements that are said to be generated but we are fetching some elements that can be associated if feature Properties contains Key GENERATION SOURCE PLUGIN PREFIX element Id String extra Elements To Fetch Utils get Array From String feature Properties get Property GENERATION SOURCE PLUGIN PREFIX element Id NON NLS 1 for int j 1 j extra Elements To Fetch length j generate Fetch Entry extra Elements To Fetch j false continue if all Children i is Fragment generate Fetch Entry fragment element Id Utils is In compiled Children all Children i NON NLS 1 else generate Fetch Entry plugin element Id Utils is In compiled Children all Children i NON NLS 1  CoreException generateChildrenFetchScript CoreException IPluginEntry allChildren getRawPluginEntries IPluginEntry compiledChildren getPluginEntries allChildren elementId allChildren getVersionedIdentifier getIdentifier featureProperties containsKey GENERATION_SOURCE_PLUGIN_PREFIX elementId extraElementsToFetch getArrayFromString featureProperties getProperty GENERATION_SOURCE_PLUGIN_PREFIX elementId extraElementsToFetch generateFetchEntry extraElementsToFetch allChildren isFragment generateFetchEntry elementId isIn compiledChildren allChildren generateFetchEntry elementId isIn compiledChildren allChildren
Return the feature object for the feature with the given info Generate an Ant script which will retrieve the feature xml file from CVS and then call the feature object constructor from Update param element Name the feature to retrieve param cvs Root the root in CVS param tag the CVS tag param password the CVS password throws Core Exception protected void retrieve Feature String element Name String cvs Root String tag String password String path throws Core Exception Generate a temporary Ant script which retrieves the feature xml for this feature from CVS File root new File working Directory File target new File root DEFAULT RETRIEVE FILENAME DESCRIPTOR NON NLS 1 try Ant Script retrieve new Ant Script new File Output Stream target try retrieve print Project Declaration Retrieve Feature main NON NLS 1 NON NLS 2 NON NLS 3 retrieve print Target Declaration TARGET MAIN null null null null NON NLS 1 I Path module Feature File I Path module Feature Properties if path null module Feature File new Path path append DEFAULT FEATURE FILENAME DESCRIPTOR module Feature Properties new Path path append PROPERTIES FILE else module Feature File new Path element Name append DEFAULT FEATURE FILENAME DESCRIPTOR module Feature Properties new Path element Name append PROPERTIES FILE if password null retrieve printCVS Pass Task cvs Root password cvs Pass File Location retrieve printCVS Task export r tag module Feature File to String cvs Root null null null true null NON NLS 1 NON NLS 2 NON NLS 3 retrieve printCVS Task export r tag module Feature Properties to String cvs Root null null null true null NON NLS 1 NON NLS 2 NON NLS 3 retrieve print Target End retrieve print Project End finally retrieve close catch IO Exception e String message Policy bind exception write Script target to String NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING SCRIPT message e Run the Ant script to go to and retrieve the feature xml Call the Update code to construct the feature object to return try Ant Runner runner new Ant Runner runner set Build File Location target get Absolute Path runner run Feature Executable Factory factory new Feature Executable Factory File feature Folder new File root path null element Name path feature Feature factory create Feature feature Folder toURL null null We only delete here so if an exception is thrown the user can still see the retrieve xml target delete feature Properties new Properties Input Stream feature Stream new File Input Stream new File root path null element Name path PROPERTIES FILE feature Properties load feature Stream feature Stream close clear feature Folder if feature null String message Policy bind exception missing Feature element Name NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION FEATURE MISSING message null catch Exception e String message Policy bind error fetching Feature element Name NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION FEATURE MISSING message e  elementName cvsRoot CoreException retrieveFeature elementName cvsRoot CoreException workingDirectory DEFAULT_RETRIEVE_FILENAME_DESCRIPTOR AntScript AntScript FileOutputStream printProjectDeclaration RetrieveFeature printTargetDeclaration TARGET_MAIN IPath moduleFeatureFile IPath moduleFeatureProperties moduleFeatureFile DEFAULT_FEATURE_FILENAME_DESCRIPTOR moduleFeatureProperties PROPERTIES_FILE moduleFeatureFile elementName DEFAULT_FEATURE_FILENAME_DESCRIPTOR moduleFeatureProperties elementName PROPERTIES_FILE printCVSPassTask cvsRoot cvsPassFileLocation printCVSTask moduleFeatureFile toString cvsRoot printCVSTask moduleFeatureProperties toString cvsRoot printTargetEnd printProjectEnd IOException writeScript toString CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_SCRIPT AntRunner AntRunner setBuildFileLocation getAbsolutePath FeatureExecutableFactory FeatureExecutableFactory featureFolder elementName createFeature featureFolder featureProperties InputStream featureStream FileInputStream elementName PROPERTIES_FILE featureProperties featureStream featureStream featureFolder missingFeature elementName CoreException IStatus PI_PDEBUILD EXCEPTION_FEATURE_MISSING fetchingFeature elementName CoreException IStatus PI_PDEBUILD EXCEPTION_FEATURE_MISSING
Deletes all the files and directories from the given root down inclusive Returns false if we could not delete some file or an exception occurred at any point in the deletion Even if an exception occurs a best effort is made to continue deleting param root return boolean public static boolean clear File root boolean result true if root is Directory String list root list for some unknown reason list can return null Just skip the children If it does if list null for int i 0 i list length i result clear new java io File root list i try if root exists result root delete catch Exception e ignore any exceptions result false return result  isDirectory
param type return String protected String get Element Location String type I Path location new Path get Property Format PROPERTY BUILD DIRECTORY if type equals feature NON NLS 1 location location append DEFAULT FEATURE LOCATION else location location append DEFAULT PLUGIN LOCATION return location to String  getElementLocation IPath getPropertyFormat PROPERTY_BUILD_DIRECTORY DEFAULT_FEATURE_LOCATION DEFAULT_PLUGIN_LOCATION toString
Get information stored in the directory file param element Name return String throws Core Exception protected String getCVS Info String element Name throws Core Exception if directory null directory read Properties directory Location I Status ERROR NON NLS 1 return directory get Property element Name  elementName CoreException getCVSInfo elementName CoreException readProperties directoryLocation IStatus getProperty elementName
Defines the XML declaration and Ant project protected void generate Prologue script println script print Comment Fetch script for element NON NLS 1 script println script print Project Declaration Fetch Script TARGET FETCH null NON NLS 1 NON NLS 2 script print Property PROPERTY QUIET true NON NLS 1  generatePrologue printComment printProjectDeclaration FetchScript TARGET_FETCH printProperty PROPERTY_QUIET
Just ends the script protected void generate Epilogue script println script print Project End  generateEpilogue printProjectEnd
Set the directory location to be the given value param directory Location public void set Directory Location String directory Location this directory Location directory Location  directoryLocation setDirectoryLocation directoryLocation directoryLocation directoryLocation
Sets whether children of the current element should be fetched param fetch Children public void set Fetch Children boolean fetch Children this fetch Children fetch Children  fetchChildren setFetchChildren fetchChildren fetchChildren fetchChildren
Sets the CVS tag to use when fetching This overrides whatever is in the directory database This is typically used when doing a nightly build by setting the tag to HEAD param value a string CVS tag public void set Fetch Tag String value fetch Tag value  setFetchTag fetchTag
Sets the CVS password file location to be the given value param cvs Pass File Location the CVS password file location public void set Cvs Pass File Location String cvs Pass File Location this cvs Pass File Location cvs Pass File Location  cvsPassFileLocation setCvsPassFileLocation cvsPassFileLocation cvsPassFileLocation cvsPassFileLocation
public void set Recursive Generation boolean recursive Generation this recursive Generation recursive Generation  setRecursiveGeneration recursiveGeneration recursiveGeneration recursiveGeneration

private void display Debug Info if Bundle Helper get Default is Debugging return System out println Configuration config to String NON NLS 1 System out println Filters filters null Utils get String From Array filters NONE NON NLS 1 NON NLS 2 NON NLS 3 System out println Component filter component Filter null Utils get String From Array component Filter NONE NON NLS 1 NON NLS 2 NON NLS 3 System out println Map location map Location NON NLS 1  displayDebugInfo BundleHelper getDefault isDebugging toString getStringFromArray componentFilter getStringFromArray componentFilter mapLocation
public void generate throws Core Exception config Config get Config Infos get 0 collected Files NON NLS 1 display Debug Info open Script working Directory DEFAULT FETCH SCRIPT FILENAME generate Prologue try process Map File write Directory generate Epilogue finally close Script  CoreException getConfigInfos collectedFiles displayDebugInfo openScript workingDirectory DEFAULT_FETCH_SCRIPT_FILENAME generatePrologue processMapFile writeDirectory generateEpilogue closeScript
private void generate Prologue script print Project Declaration Packager File fetcher TARGET MAIN NON NLS 1 NON NLS 2 script println script print Target Declaration TARGET MAIN null null null null  generatePrologue printProjectDeclaration TARGET_MAIN printTargetDeclaration TARGET_MAIN
private void generate Epilogue script print Target End script print Project End script close  generateEpilogue printTargetEnd printProjectEnd
public void generate Fetch File For String file Name String baseurl String login Info String login null String password null String login password Utils get Array From String login Info NON NLS 1 if login password length 2 login login password 0 password login password 1 else I Status status new Status I Status WARNING PI PDEBUILD 1 Policy bind warning missing Password file Name null NON NLS 1 Bundle Helper get Default get Log log status script print Get baseurl file Name get Property Format PROPERTY DOWNLOAD DIRECTORY file Name login password true  generateFetchFileFor fileName loginInfo login_password getArrayFromString loginInfo login_password login_password login_password IStatus IStatus PI_PDEBUILD missingPassword fileName BundleHelper getDefault getLog printGet fileName getPropertyFormat PROPERTY_DOWNLOAD_DIRECTORY fileName
public void set Content Filter String filters this filters Utils get Array From String With Blank filters NON NLS 1  setContentFilter getArrayFromStringWithBlank
public void set Map Location String map Location this map Location map Location  setMapLocation mapLocation mapLocation mapLocation
private void write Directory throws Core Exception selected Files new Properties selected Files put config to String collected Files NON NLS 1 try Output Stream stream new Buffered Output Stream new File Output Stream working Directory DEFAULT PACKAGER DIRECTORY FILENAME DESCRIPTOR NON NLS 1 try selected Files store stream null finally stream close catch File Not Found Exception e String message Policy bind exception writing File working Directory DEFAULT PACKAGER DIRECTORY FILENAME DESCRIPTOR NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING FILE message e catch IO Exception e String message Policy bind exception writing File working Directory DEFAULT PACKAGER DIRECTORY FILENAME DESCRIPTOR NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING FILE message e  writeDirectory CoreException selectedFiles selectedFiles toString collectedFiles OutputStream BufferedOutputStream FileOutputStream workingDirectory DEFAULT_PACKAGER_DIRECTORY_FILENAME_DESCRIPTOR selectedFiles FileNotFoundException writingFile workingDirectory DEFAULT_PACKAGER_DIRECTORY_FILENAME_DESCRIPTOR CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE IOException writingFile workingDirectory DEFAULT_PACKAGER_DIRECTORY_FILENAME_DESCRIPTOR CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE
private void process Map File throws Core Exception final int URL 0 final int CONFIGS 1 final int DIRECTORY 2 final int FILTERS 3 final int COMPONENT 4 map Content read Properties map Location I Status ERROR NON NLS 1 for Iterator iter map Content entry Set iterator iter has Next Map Entry map Entry Map Entry iter next String file Name String map Entry get Key String file Description Utils get Array From String With Blank String map Entry get Value ENTRY SEPARATOR if file Description length 4 String message Policy bind error incorrect Directory Entry String map Entry get Key String map Entry get Value NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION ENTRY MISSING message null check if the entry can be used for the current config String user Infos NON NLS 1 try user Infos new URL file Description URL get User Info catch MalformedURL Exception e I Status status new Status I Status ERROR PI PDEBUILD EXCEPTION MALFORMED URL Policy bind exception url file Description URL e NON NLS 1 throw new Core Exception status if filter By Config file Description CONFIGS filter By Filter file Description FILTERS filter By Component Name file Description length 4 file Description COMPONENT UNKNOWN generate Fetch File For file Name file Description URL user Infos collected Files file Name file Description DIRECTORY equals file Description DIRECTORY NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 else if Bundle Helper get Default is Debugging I Status status new Status I Status INFO PI PDEBUILD WARNING ELEMENT NOT FETCHED Policy bind error fetching Failed file Description DIRECTORY null NON NLS 1 Bundle Helper get Default get Log log status  processMapFile CoreException mapContent readProperties mapLocation IStatus mapContent entrySet hasNext mapEntry fileName mapEntry getKey fileDescription getArrayFromStringWithBlank mapEntry getValue ENTRY_SEPARATOR fileDescription incorrectDirectoryEntry mapEntry getKey mapEntry getValue CoreException IStatus PI_PDEBUILD EXCEPTION_ENTRY_MISSING userInfos userInfos fileDescription getUserInfo MalformedURLException IStatus IStatus PI_PDEBUILD EXCEPTION_MALFORMED_URL fileDescription CoreException filterByConfig fileDescription filterByFilter fileDescription filterByComponentName fileDescription fileDescription generateFetchFileFor fileName fileDescription userInfos collectedFiles fileName fileDescription fileDescription BundleHelper getDefault isDebugging IStatus IStatus PI_PDEBUILD WARNING_ELEMENT_NOT_FETCHED fetchingFailed fileDescription BundleHelper getDefault getLog
When no filter is specified on the entry or there is no filtering then the file is fetched private boolean filter By Filter String filter String if filters length 0 return true String entry Filters Utils get Array From String With Blank filter String NON NLS 1 if entry Filters length 0 return true for int i 0 i entry Filters length i for int j 0 j filters length j if filters j equals entry Filters i return true return false  filterByFilter filterString entryFilters getArrayFromStringWithBlank filterString entryFilters entryFilters entryFilters
Return true if the entry Configs match the config we are packaging private boolean filter By Config String entry Config String String entry Configs Utils get Array From String With Blank entry Config String FILTER SEPARATOR if entry Configs length 0 config equals Config generic Config return true for int i 0 i entry Configs length i Config a Config new Config entry Configs i if a Config equals config a Config equals Config generic Config return true return false  entryConfigs filterByConfig entryConfigString entryConfigs getArrayFromStringWithBlank entryConfigString FILTER_SEPARATOR entryConfigs genericConfig entryConfigs aConfig entryConfigs aConfig aConfig genericConfig
Return true if the component Name is listed in the component filter or if no filter is specified private boolean filter By Component Name String component Name if component Name equals UNKNOWN component Filter null return true for int i 0 i component Filter length i if component Filter i equals Ignore Case component Name component Filter i equals Ignore Case UNKNOWN return true return false  componentName filterByComponentName componentName componentName componentFilter componentFilter componentFilter equalsIgnoreCase componentName componentFilter equalsIgnoreCase
public void set Component Filter String component Filer this component Filter Utils get Array From String With Blank component Filer NON NLS 1  setComponentFilter componentFiler componentFilter getArrayFromStringWithBlank componentFiler

private String ignored Features public Packager Build Script Generator super  ignoredFeatures PackagerBuildScriptGenerator
public Packager Build Script Generator String feature Id Assembly Information assemblage Information throws Core Exception super feature Id null assemblage Information  PackagerBuildScriptGenerator featureId AssemblyInformation assemblageInformation CoreException featureId assemblageInformation
public void run throws Core Exception Assembly Information assemblage Information new Assembly Information for int i 0 i feature List length i Feature Build Script Generator generator new Packager Build Script Generator feature List i assemblage Information generator set Generate Included Features true generator set Analyse Children true generator set Source Feature Generation false generator set Binary Feature Generation true generator set Script Generation false generator set Plugin Path plugin Path generator set Build Site Factory site Factory generator set Dev Entries dev Entries generator set Compiled Elements get Compiled Elements generator set BuildingOS Gi is BuildingOS Gi set Feature feature List i generator generate remove Ignored Features assemblage Information Packaging Config Script Generator config Assembler new Packaging Config Script Generator Config config Config get Config Infos get 0 config Assembler initialize working Directory DEFAULT ASSEMBLE FILENAME config assemblage Information get Plugins config assemblage Information get Features config assemblage Information get Root File Providers config NON NLS 1 Here the last arg is true because we do not have the root info while packaging config Assembler set Packaging Properties Location packaging Properties Location config Assembler root Files root Files config Assembler root Dirs root Dirs config Assembler set Output output Format config Assembler generate  CoreException AssemblyInformation assemblageInformation AssemblyInformation featureList FeatureBuildScriptGenerator PackagerBuildScriptGenerator featureList assemblageInformation setGenerateIncludedFeatures setAnalyseChildren setSourceFeatureGeneration setBinaryFeatureGeneration setScriptGeneration setPluginPath pluginPath setBuildSiteFactory siteFactory setDevEntries devEntries setCompiledElements getCompiledElements setBuildingOSGi isBuildingOSGi setFeature featureList removeIgnoredFeatures assemblageInformation PackagingConfigScriptGenerator configAssembler PackagingConfigScriptGenerator getConfigInfos configAssembler workingDirectory DEFAULT_ASSEMBLE_FILENAME assemblageInformation getPlugins assemblageInformation getFeatures assemblageInformation getRootFileProviders configAssembler setPackagingPropertiesLocation packagingPropertiesLocation configAssembler rootFiles rootFiles configAssembler rootDirs rootDirs configAssembler setOutput outputFormat configAssembler
private void remove Ignored Features Assembly Information to Assemble if ignored Features null return for int i 0 i ignored Features length i try to Assemble remove Feature Config get Config Infos get 0 get Site false find Feature ignored Features i null true catch Core Exception e Ignore  removeIgnoredFeatures AssemblyInformation toAssemble ignoredFeatures ignoredFeatures toAssemble removeFeature getConfigInfos getSite findFeature ignoredFeatures CoreException
protected void generate Included Feature Build File throws Core Exception I Included Feature Reference referenced Features feature get Included Feature References for int i 0 i referenced Features length i String feature Id Included Feature Reference Model referenced Features i get Feature Identifier Feature Build Script Generator generator new Packager Build Script Generator feature Id assembly Data generator set Generate Included Features true generator set Analyse Children true generator set Source Feature Generation false generator set Binary Feature Generation true generator set Script Generation false generator set Plugin Path plugin Path generator set Build Site Factory site Factory generator set Dev Entries dev Entries generator set Compiled Elements get Compiled Elements generator set BuildingOS Gi is BuildingOS Gi try generator generate catch Core Exception exception If the referenced feature is not optional there is a real problem and the exception is re thrown if exception get Status get Code EXCEPTION FEATURE MISSING referenced Features i is Optional throw exception  generateIncludedFeatureBuildFile CoreException IIncludedFeatureReference referencedFeatures getIncludedFeatureReferences referencedFeatures featureId IncludedFeatureReferenceModel referencedFeatures getFeatureIdentifier FeatureBuildScriptGenerator PackagerBuildScriptGenerator featureId assemblyData setGenerateIncludedFeatures setAnalyseChildren setSourceFeatureGeneration setBinaryFeatureGeneration setScriptGeneration setPluginPath pluginPath setBuildSiteFactory siteFactory setDevEntries devEntries setCompiledElements getCompiledElements setBuildingOSGi isBuildingOSGi CoreException getStatus getCode EXCEPTION_FEATURE_MISSING referencedFeatures isOptional
public void set Property File String property File packaging Properties Location property File  setPropertyFile propertyFile packagingPropertiesLocation propertyFile
public void set Feature List String features feature List Utils get Array From String features NON NLS 1  setFeatureList featureList getArrayFromString
public void set Root Files String root Files this root Files root Files  setRootFiles rootFiles rootFiles rootFiles
public void set Root Dirs String root Dirs this root Dirs root Dirs  setRootDirs rootDirs rootDirs rootDirs
public void set Output String format TODO To rename this output Format format  setOutput outputFormat
public void set Ignored Features String features ignored Features features  setIgnoredFeatures ignoredFeatures
protected void collect Element To Assemble I Feature feature To Collect throws Core Exception if assembly Data null return List correct Configs select Configs feature To Collect Here we could sort if the feature is a common one or not by comparing the size of correct Configs for Iterator iter correct Configs iterator iter has Next Config config Config iter next assembly Data add Feature config feature  collectElementToAssemble IFeature featureToCollect CoreException assemblyData correctConfigs selectConfigs featureToCollect correctConfigs correctConfigs hasNext assemblyData addFeature

public void generate throws Core Exception generate Prologue generate Main Target generate Assemble Target generate Epilogue  CoreException generatePrologue generateMainTarget generateAssembleTarget generateEpilogue
private void generate Prologue script print Project Declaration Package feature Id TARGET MAIN null NON NLS 1 script print Property PROPERTY ARCHIVE NAME compute Archive Name  generatePrologue printProjectDeclaration featureId TARGET_MAIN printProperty PROPERTY_ARCHIVE_NAME computeArchiveName
private void generate Main Target script print Target Declaration TARGET MAIN null null null null if Bundle Helper get Default is Debugging script print Echo Task PROPERTY BASEDIR get Property Format PROPERTY BASEDIR NON NLS 1 script print Echo Task tmp Dir get Property Format temp Directory NON NLS 1 NON NLS 2 script print Echo Task PROPERTY COLLECTING FOLDER get Property Format PROPERTY COLLECTING FOLDER NON NLS 1 script print Echo Task PROPERTY ARCHIVE PREFIX get Property Format PROPERTY ARCHIVE PREFIX NON NLS 1 script print Echo Task PROPERTY ECLIPSE BASE get Property Format PROPERTY ECLIPSE BASE NON NLS 1 script print Echo Task PROPERTY ASSEMBLY TMP get Property Format PROPERTY ASSEMBLY TMP NON NLS 1 script print Echo Task PROPERTY DESTINATION TEMP FOLDER get Property Format PROPERTY DESTINATION TEMP FOLDER NON NLS 1 script println condition property PROPERTY PLUGIN ARCHIVE PREFIX value DEFAULT PLUGIN LOCATION NON NLS 1 NON NLS 2 NON NLS 3 script println t equals arg1 get Property Format PROPERTY ARCHIVE PREFIX arg2 trim true NON NLS 1 NON NLS 2 NON NLS 3 script println condition NON NLS 1 script print Property PROPERTY PLUGIN ARCHIVE PREFIX get Property Format PROPERTY ARCHIVE PREFIX DEFAULT PLUGIN LOCATION script println script println condition property PROPERTY FEATURE ARCHIVE PREFIX value DEFAULT FEATURE LOCATION NON NLS 1 NON NLS 2 NON NLS 3 script println t equals arg1 get Property Format PROPERTY ARCHIVE PREFIX arg2 trim true NON NLS 1 NON NLS 2 NON NLS 3 script println condition NON NLS 1 script print Property PROPERTY FEATURE ARCHIVE PREFIX get Property Format PROPERTY ARCHIVE PREFIX DEFAULT FEATURE LOCATION Map parameters new Hash Map 1 parameters put assemble Script Name filename NON NLS 1 TODO Improve the name handling script print Ant Task get Property Format DEFAULT CUSTOM TARGETS null assemble config Info to String Replacing Any ANY STRING xml null null parameters NON NLS 1 NON NLS 2 NON NLS 3 script print Target End  generateMainTarget printTargetDeclaration TARGET_MAIN BundleHelper getDefault isDebugging printEchoTask PROPERTY_BASEDIR getPropertyFormat PROPERTY_BASEDIR printEchoTask tmpDir getPropertyFormat tempDirectory printEchoTask PROPERTY_COLLECTING_FOLDER getPropertyFormat PROPERTY_COLLECTING_FOLDER printEchoTask PROPERTY_ARCHIVE_PREFIX getPropertyFormat PROPERTY_ARCHIVE_PREFIX printEchoTask PROPERTY_ECLIPSE_BASE getPropertyFormat PROPERTY_ECLIPSE_BASE printEchoTask PROPERTY_ASSEMBLY_TMP getPropertyFormat PROPERTY_ASSEMBLY_TMP printEchoTask PROPERTY_DESTINATION_TEMP_FOLDER getPropertyFormat PROPERTY_DESTINATION_TEMP_FOLDER PROPERTY_PLUGIN_ARCHIVE_PREFIX DEFAULT_PLUGIN_LOCATION getPropertyFormat PROPERTY_ARCHIVE_PREFIX printProperty PROPERTY_PLUGIN_ARCHIVE_PREFIX getPropertyFormat PROPERTY_ARCHIVE_PREFIX DEFAULT_PLUGIN_LOCATION PROPERTY_FEATURE_ARCHIVE_PREFIX DEFAULT_FEATURE_LOCATION getPropertyFormat PROPERTY_ARCHIVE_PREFIX printProperty PROPERTY_FEATURE_ARCHIVE_PREFIX getPropertyFormat PROPERTY_ARCHIVE_PREFIX DEFAULT_FEATURE_LOCATION HashMap assembleScriptName printAntTask getPropertyFormat DEFAULT_CUSTOM_TARGETS configInfo toStringReplacingAny ANY_STRING printTargetEnd
private void generate Assemble Target throws Core Exception script print Target Declaration assemble null null null null NON NLS 1 if output equals Ignore Case tar Gz NON NLS 1 generate Ant Tar Target else if output equals Ignore Case ant Zip NON NLS 1 generate Ant Zip Target else if output equals Ignore Case folder NON NLS 1 generate Folder Target else By default use zip exe generate Zip Root Files generate Zip List args new Array List 2 args add R NON NLS 1 args add 700 NON NLS 1 args add NON NLS 1 script print Exec Task chmod get Property Format temp Directory get Property Format PROPERTY COLLECTING FOLDER args Linux NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 script print Delete Task get Property Format temp Directory get Property Format PROPERTY COLLECTING FOLDER null NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 script print Target End  generateAssembleTarget CoreException printTargetDeclaration equalsIgnoreCase tarGz generateAntTarTarget equalsIgnoreCase antZip generateAntZipTarget equalsIgnoreCase generateFolderTarget generateZipRootFiles generateZip ArrayList printExecTask getPropertyFormat tempDirectory getPropertyFormat PROPERTY_COLLECTING_FOLDER printDeleteTask getPropertyFormat tempDirectory getPropertyFormat PROPERTY_COLLECTING_FOLDER printTargetEnd
private void generate Zip Root Files String file List packaging Properties get Property root NON NLS 1 NON NLS 2 if config Info equals Config generic Config file List file List length 0 packaging Properties get Property root config Info to String NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 String files Utils get Array From String file List NON NLS 1 List parameters new Array List 1 for int i 0 i files length i String file files i if file starts With file NON NLS 1 I Path target new Path file substring 5 file target remove Last Segments 1 toOS String parameters add get Property Format PROPERTY ARCHIVE PREFIX file NON NLS 1 create Zip Exec Command parameters parameters clear  generateZipRootFiles fileList packagingProperties getProperty configInfo genericConfig fileList fileList packagingProperties getProperty configInfo toString getArrayFromString fileList ArrayList startsWith IPath removeLastSegments toOSString getPropertyFormat PROPERTY_ARCHIVE_PREFIX createZipExecCommand
private void generate Zip throws Core Exception final int parameter Size 15 List parameters new Array List parameter Size 1 for int i 0 i plugins length i parameters add get Property Format PROPERTY PLUGIN ARCHIVE PREFIX plugins i get Symbolic Name   plugins i get Version NON NLS 1 NON NLS 2 NON NLS 3 if i parameter Size 0 create Zip Exec Command parameters parameters clear if parameters is Empty create Zip Exec Command parameters parameters clear if parameters is Empty create Zip Exec Command parameters parameters clear for int i 0 i features length i parameters add get Property Format PROPERTY FEATURE ARCHIVE PREFIX features i get Versioned Identifier to String NON NLS 1 NON NLS 2 if i parameter Size 0 create Zip Exec Command parameters parameters clear if parameters is Empty create Zip Exec Command parameters parameters clear  generateZip CoreException parameterSize ArrayList parameterSize getPropertyFormat PROPERTY_PLUGIN_ARCHIVE_PREFIX getSymbolicName _ getVersion parameterSize createZipExecCommand isEmpty createZipExecCommand isEmpty createZipExecCommand getPropertyFormat PROPERTY_FEATURE_ARCHIVE_PREFIX getVersionedIdentifier toString parameterSize createZipExecCommand isEmpty createZipExecCommand
private void create Zip Exec Command List parameters parameters add 0 r q get Property Format PROPERTY ZIP ARGS get Property Format PROPERTY ARCHIVE NAME NON NLS 1 NON NLS 2 script print Exec Task zip get Property Format temp Directory parameters null NON NLS 1 NON NLS 2 NON NLS 3  createZipExecCommand getPropertyFormat PROPERTY_ZIP_ARGS getPropertyFormat PROPERTY_ARCHIVE_NAME printExecTask getPropertyFormat tempDirectory
private void generate Epilogue script print Project End script close  generateEpilogue printProjectEnd
public void set Packaging Properties Location String packaging Properties Location throws Core Exception packaging Properties new Properties if packaging Properties Location null packaging Properties Location equals NON NLS 1 return Input Stream property Stream null try property Stream new Buffered Input Stream new File Input Stream packaging Properties Location try packaging Properties load new Buffered Input Stream property Stream finally property Stream close catch File Not Found Exception e String message Policy bind exception reading File packaging Properties Location NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION READING FILE message e catch IO Exception e String message Policy bind exception reading File packaging Properties Location NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION READING FILE message e  setPackagingPropertiesLocation packagingPropertiesLocation CoreException packagingProperties packagingPropertiesLocation packagingPropertiesLocation InputStream propertyStream propertyStream BufferedInputStream FileInputStream packagingPropertiesLocation packagingProperties BufferedInputStream propertyStream propertyStream FileNotFoundException readingFile packagingPropertiesLocation CoreException IStatus PI_PDEBUILD EXCEPTION_READING_FILE IOException readingFile packagingPropertiesLocation CoreException IStatus PI_PDEBUILD EXCEPTION_READING_FILE
private boolean is Folder Path plugin Location return plugin Location to File is Directory  isFolder pluginLocation pluginLocation toFile isDirectory
private void generate Ant Tar Target int index 0 File Set files new File Set plugins length features length root Files length root Dirs length if files length 0 return for int i 0 i plugins length i Path plugin Location new Path plugins i get Location boolean is Folder is Folder plugin Location files index new Tar File Set plugin Location toOS String is Folder null null null null null get Property Format PROPERTY PLUGIN ARCHIVE PREFIX plugin Location last Segment null for int i 0 i features length i I Path feature Location new Path features i getURL get Path Here we assume that all the features are local feature Location feature Location remove Last Segments 1 files index new Tar File Set feature Location toOS String false null null null null null get Property Format PROPERTY FEATURE ARCHIVE PREFIX feature Location last Segment null if root File Providers size 0 File Set files Correct Size new File Set plugins length features length System arraycopy files 0 files Correct Size 0 plugins length features length script print Tar Task get Property Format PROPERTY ARCHIVE FULLPATH null false true files return for int i 0 i root Files length i I Path file Path new Path root Files i files index new Tar File Set file Path toOS String true null null null null null get Property Format PROPERTY ARCHIVE PREFIX file Path last Segment null for int i 0 i root Dirs length i I Path dir Path new Path root Dirs i files index new Tar File Set dir Path toOS String false null null null null null get Property Format PROPERTY ARCHIVE PREFIX dir Path last Segment null script print Tar Task get Property Format PROPERTY ARCHIVE FULLPATH null false true files  generateAntTarTarget FileSet FileSet rootFiles rootDirs pluginLocation getLocation isFolder isFolder pluginLocation TarFileSet pluginLocation toOSString isFolder getPropertyFormat PROPERTY_PLUGIN_ARCHIVE_PREFIX pluginLocation lastSegment IPath featureLocation getPath featureLocation featureLocation removeLastSegments TarFileSet featureLocation toOSString getPropertyFormat PROPERTY_FEATURE_ARCHIVE_PREFIX featureLocation lastSegment rootFileProviders FileSet filesCorrectSize FileSet filesCorrectSize printTarTask getPropertyFormat PROPERTY_ARCHIVE_FULLPATH rootFiles IPath filePath rootFiles TarFileSet filePath toOSString getPropertyFormat PROPERTY_ARCHIVE_PREFIX filePath lastSegment rootDirs IPath dirPath rootDirs TarFileSet dirPath toOSString getPropertyFormat PROPERTY_ARCHIVE_PREFIX dirPath lastSegment printTarTask getPropertyFormat PROPERTY_ARCHIVE_FULLPATH
private void generate Ant Zip Target int index 0 File Set files new File Set plugins length features length root Files length root Dirs length if files length 0 return for int i 0 i plugins length i Path plugin Location new Path plugins i get Location boolean is Folder is Folder plugin Location files index new Zip File Set plugin Location toOS String is Folder null null null null null get Property Format PROPERTY PLUGIN ARCHIVE PREFIX plugin Location last Segment null for int i 0 i features length i I Path feature Location new Path features i getURL get Path Here we assume that all the features are local feature Location feature Location remove Last Segments 1 files index new Zip File Set feature Location toOS String false null null null null null get Property Format PROPERTY FEATURE ARCHIVE PREFIX feature Location last Segment null if root File Providers size 0 File Set files Correct Size new File Set plugins length features length System arraycopy files 0 files Correct Size 0 plugins length features length script print Tar Task get Property Format PROPERTY ARCHIVE FULLPATH null false true files return for int i 0 i root Files length i I Path file Path new Path root Files i files index new Zip File Set file Path toOS String true null null null null null get Property Format PROPERTY ARCHIVE PREFIX file Path last Segment null for int i 0 i root Dirs length i I Path dir Path new Path root Dirs i files index new Zip File Set dir Path toOS String false null null null null null get Property Format PROPERTY ARCHIVE PREFIX dir Path last Segment null script print Zip Task get Property Format PROPERTY ARCHIVE FULLPATH null false true files  generateAntZipTarget FileSet FileSet rootFiles rootDirs pluginLocation getLocation isFolder isFolder pluginLocation ZipFileSet pluginLocation toOSString isFolder getPropertyFormat PROPERTY_PLUGIN_ARCHIVE_PREFIX pluginLocation lastSegment IPath featureLocation getPath featureLocation featureLocation removeLastSegments ZipFileSet featureLocation toOSString getPropertyFormat PROPERTY_FEATURE_ARCHIVE_PREFIX featureLocation lastSegment rootFileProviders FileSet filesCorrectSize FileSet filesCorrectSize printTarTask getPropertyFormat PROPERTY_ARCHIVE_FULLPATH rootFiles IPath filePath rootFiles ZipFileSet filePath toOSString getPropertyFormat PROPERTY_ARCHIVE_PREFIX filePath lastSegment rootDirs IPath dirPath rootDirs ZipFileSet dirPath toOSString getPropertyFormat PROPERTY_ARCHIVE_PREFIX dirPath lastSegment printZipTask getPropertyFormat PROPERTY_ARCHIVE_FULLPATH
private void generate Folder Target for int i 0 i plugins length i Path plugin Location new Path plugins i get Location boolean is Folder is Folder plugin Location if is Folder script print Copy Task null get Property Format PROPERTY ASSEMBLY TMP get Property Format PROPERTY PLUGIN ARCHIVE PREFIX plugin Location last Segment new File Set new File Set plugin Location toOS String null null null null null null false else script print Copy Task plugin Location toOS String get Property Format PROPERTY ASSEMBLY TMP get Property Format PROPERTY PLUGIN ARCHIVE PREFIX plugin Location last Segment null false for int i 0 i features length i I Path feature Location new Path features i getURL get Path Here we assume that all the features are local feature Location feature Location remove Last Segments 1 script print Copy Task null get Property Format PROPERTY ASSEMBLY TMP get Property Format PROPERTY FEATURE ARCHIVE PREFIX feature Location last Segment new File Set new File Set feature Location toOS String null null null null null null false for int i 0 i root Files length i I Path file Path new Path root Files i script print Copy Task file Path toOS String get Property Format PROPERTY ASSEMBLY TMP get Property Format PROPERTY ARCHIVE PREFIX null false for int i 0 i root Dirs length i I Path dir Path new Path root Dirs i script print Copy Task null get Property Format PROPERTY ASSEMBLY TMP get Property Format PROPERTY ARCHIVE PREFIX dir Path last Segment new File Set new File Set dir Path toOS String null null null null null null false  generateFolderTarget pluginLocation getLocation isFolder isFolder pluginLocation isFolder printCopyTask getPropertyFormat PROPERTY_ASSEMBLY_TMP getPropertyFormat PROPERTY_PLUGIN_ARCHIVE_PREFIX pluginLocation lastSegment FileSet FileSet pluginLocation toOSString printCopyTask pluginLocation toOSString getPropertyFormat PROPERTY_ASSEMBLY_TMP getPropertyFormat PROPERTY_PLUGIN_ARCHIVE_PREFIX pluginLocation lastSegment IPath featureLocation getPath featureLocation featureLocation removeLastSegments printCopyTask getPropertyFormat PROPERTY_ASSEMBLY_TMP getPropertyFormat PROPERTY_FEATURE_ARCHIVE_PREFIX featureLocation lastSegment FileSet FileSet featureLocation toOSString rootFiles IPath filePath rootFiles printCopyTask filePath toOSString getPropertyFormat PROPERTY_ASSEMBLY_TMP getPropertyFormat PROPERTY_ARCHIVE_PREFIX rootDirs IPath dirPath rootDirs printCopyTask getPropertyFormat PROPERTY_ASSEMBLY_TMP getPropertyFormat PROPERTY_ARCHIVE_PREFIX dirPath lastSegment FileSet FileSet dirPath toOSString
public void root Files String root Files this root Files root Files  rootFiles rootFiles rootFiles rootFiles
public void root Dirs String root Dirs this root Dirs root Dirs  rootDirs rootDirs rootDirs rootDirs
public void set Output String output Format this output output Format  setOutput outputFormat outputFormat

public void generate throws Core Exception prepare Generation open Script working Directory DEFAULT UNZIPPER FILENAME DESCRIPTOR try generate Prologue generate Uncompression Commands generate Epilogue finally close Script  CoreException prepareGeneration openScript workingDirectory DEFAULT_UNZIPPER_FILENAME_DESCRIPTOR generatePrologue generateUncompressionCommands generateEpilogue closeScript
private void prepare Generation if packaging Properties Location null return Properties packaging Properties new Properties Input Stream property Stream null try property Stream new Buffered Input Stream new File Input Stream packaging Properties Location try packaging Properties load new Buffered Input Stream property Stream finally property Stream close catch File Not Found Exception e String message Policy bind exception reading File packaging Properties Location NON NLS 1 Log throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION READING FILE message e catch IO Exception e String message Policy bind exception reading File packaging Properties Location NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION READING FILE message e unzip Order Utils get Array From String With Blank packaging Properties get Property unzip Order NON NLS 1 NON NLS 2 NON NLS 3  prepareGeneration packagingPropertiesLocation packagingProperties InputStream propertyStream propertyStream BufferedInputStream FileInputStream packagingPropertiesLocation packagingProperties BufferedInputStream propertyStream propertyStream FileNotFoundException readingFile packagingPropertiesLocation CoreException IStatus PI_PDEBUILD EXCEPTION_READING_FILE IOException readingFile packagingPropertiesLocation CoreException IStatus PI_PDEBUILD EXCEPTION_READING_FILE unzipOrder getArrayFromStringWithBlank packagingProperties getProperty unzipOrder
private void generate Epilogue script print Target End script println script print Project End  generateEpilogue printTargetEnd printProjectEnd
private void generate Prologue script println config Info Config get Config Infos get 0 script print Comment Unzip script for config Info to String NON NLS 1 NON NLS 2 script println script print Project Declaration Unzipper TARGET MAIN NON NLS 1 NON NLS 2 script print Target Declaration TARGET MAIN null null null null  generatePrologue configInfo getConfigInfos printComment configInfo toString printProjectDeclaration TARGET_MAIN printTargetDeclaration TARGET_MAIN
private void generate Uncompression Commands throws Core Exception zips List read Properties working Directory directory Location I Status ERROR NON NLS 1 List to Unzip With Order new Array List unzip Order length String zip Entries zips List get Property Config generic Config to String NON NLS 1 NON NLS 2 if config Info equals Config generic Config zip Entries zip Entries length 0 zips List get Property config Info to String NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 String all Zip Entries Utils get Array From String zip Entries NON NLS 1 for int i 0 i all Zip Entries length i String entry Detail Utils get Array From String all Zip Entries i NON NLS 1 if entry Detail 1 equals NON NLS 1 script print Mkdir Task temp Directory entry Detail 1 NON NLS 1 if delayed entry Detail 0 to Unzip With Order add entry Detail continue generate Uncompress entry Detail Deal with the entries that have a specific order for int i 0 i unzip Order length i for Iterator iter to Unzip With Order iterator iter has Next String entry String iter next if entry 0 starts With unzip Order i generate Uncompress entry iter remove  generateUncompressionCommands CoreException zipsList readProperties workingDirectory directoryLocation IStatus toUnzipWithOrder ArrayList unzipOrder zipEntries zipsList getProperty genericConfig toString configInfo genericConfig zipEntries zipEntries zipsList getProperty configInfo toString allZipEntries getArrayFromString zipEntries allZipEntries entryDetail getArrayFromString allZipEntries entryDetail printMkdirTask tempDirectory entryDetail entryDetail toUnzipWithOrder entryDetail generateUncompress entryDetail unzipOrder toUnzipWithOrder hasNext startsWith unzipOrder generateUncompress
private void generate Uncompress String entry Detail if entry Detail 0 ends With zip NON NLS 1 generate Unzip entry Detail return if entry Detail 0 ends With tar gz entry Detail 0 ends With tar NON NLS 1 NON NLS 2 generate Untar entry Detail  generateUncompress entryDetail entryDetail endsWith generateUnzip entryDetail entryDetail endsWith entryDetail endsWith generateUntar entryDetail
private boolean delayed String file Name for int i 0 i unzip Order length i if file Name starts With unzip Order i return true return false  fileName unzipOrder fileName startsWith unzipOrder
private void generate Unzip String entry Detail List parameters new Array List 1 parameters add o X unzip Args NON NLS 1 parameters add get Property Format download Directory entry Detail 0 NON NLS 1 NON NLS 2 script print Exec Task unzip temp Directory entry Detail 1 parameters null NON NLS 1 NON NLS 2  generateUnzip entryDetail ArrayList unzipArgs getPropertyFormat downloadDirectory entryDetail printExecTask tempDirectory entryDetail
private void generate Untar String entry Detail List parameters new Array List 2 parameters add entry Detail 0 ends With gz z pxvf NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 parameters add get Property Format download Directory entry Detail 0 NON NLS 1 NON NLS 2 script print Exec Task tar temp Directory entry Detail 1 parameters null NON NLS 1 NON NLS 2  generateUntar entryDetail ArrayList entryDetail endsWith getPropertyFormat downloadDirectory entryDetail printExecTask tempDirectory entryDetail
public void set Directory Location String filename directory Location filename  setDirectoryLocation directoryLocation
Set the property file containing information about packaging param property File the path to a property file public void set Property File String property File packaging Properties Location property File  propertyFile setPropertyFile propertyFile packagingPropertiesLocation propertyFile

Lookup the message with the given ID in this catalog public static String bind String id return bind id String null 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string public static String bind String id String binding return bind id new String binding 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings public static String bind String id String binding1 String binding2 return bind id new String binding1 binding2 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string values public static String bind String id String bindings if id null return No message available NON NLS 1 String message null try message bundle get String id catch Missing Resource Exception e If we got an exception looking for the message fail gracefully by just returning the id we were looking for In most cases this is semi informative so is not too bad return Missing message id in bundle Name NON NLS 1 NON NLS 2 if bindings null return message return Message Format format message bindings  getString MissingResourceException bundleName MessageFormat
Return a progress monitor for the given monitor Ensures that the resulting monitor is not code null code param monitor the monitor to wrap or code null code return I Progress Monitor public static I Progress Monitor monitor For I Progress Monitor monitor if monitor null return new Null Progress Monitor return monitor  IProgressMonitor IProgressMonitor monitorFor IProgressMonitor NullProgressMonitor
Create a sub progress monitor with the given units of work for the given monitor param monitor the parent monitor or code null code param ticks the number of units of work return I Progress Monitor public static I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks  IProgressMonitor IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor
Create a sub progress monitor with the given number of units of work and in the given style for the specified parent monitor param monitor the parent monitor or code null code param ticks the number of units of work param style the style of the sub progress monitor return I Progress Monitor public static I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks int style if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks style  IProgressMonitor IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor
Print a debug message to the console If the given boolean is code true code then pre pend the message with the current date public static void debug boolean include Date String message if include Date message new Date System current Time Millis to String message NON NLS 1 System out println message  includeDate includeDate currentTimeMillis toString

public class Build Time Feature extends Feature public I Included Feature Reference get Raw Included Feature References return get Feature Included  BuildTimeFeature IIncludedFeatureReference getRawIncludedFeatureReferences getFeatureIncluded

public I Feature create Feature URL url I Site site I Progress Monitor p throws Core Exception Feature feature null Input Stream feature Stream null if url null return create Feature site try TODO Feature Executable Content Provider is a non API class I Feature Content Provider content Provider new Feature Executable Content Provider url URL non ResolvedURL content Provider get Feature Manifest Reference null asURL URL resolvedURL URL Encoder encode non ResolvedURL feature Stream resolvedURL open Stream feature Feature this parse Feature feature Stream String new Version Qualifier Replacer replace Qualifier In Version feature get Feature Version feature get Feature Identifier Abstract Script Generator read Properties new Path url get File remove Last Segments 1 toOS String PROPERTIES FILE I Status OK get Property PROPERTY QUALIFIER Build Time Site site get Feature Versions if new Version null Build Time Feature feature set Feature Version new Version feature set Site site feature set Feature Content Provider content Provider feature resolve url url catch Core Exception e String message Policy bind error creating Feature url to String NON NLS 1 Bundle Helper get Default get Log log new Status I Status ERROR PI PDEBUILD EXCEPTION FEATURE PARSE message e throw e catch Exception e String message Policy bind exception reading File url to String NON NLS 1 Status status new Status I Status ERROR PI PDEBUILD EXCEPTION FEATURE MISSING message e Bundle Helper get Default get Log log status Logging here because the caller consumes Core Exceptions throw new Core Exception status finally try if feature Stream null feature Stream close catch IO Exception e return feature  IFeature createFeature ISite IProgressMonitor CoreException InputStream featureStream createFeature FeatureExecutableContentProvider IFeatureContentProvider contentProvider FeatureExecutableContentProvider nonResolvedURL contentProvider getFeatureManifestReference URLEncoder nonResolvedURL featureStream openStream parseFeature featureStream newVersion QualifierReplacer replaceQualifierInVersion getFeatureVersion getFeatureIdentifier AbstractScriptGenerator readProperties getFile removeLastSegments toOSString PROPERTIES_FILE IStatus getProperty PROPERTY_QUALIFIER BuildTimeSite getFeatureVersions newVersion BuildTimeFeature setFeatureVersion newVersion setSite setFeatureContentProvider contentProvider CoreException creatingFeature toString BundleHelper getDefault getLog IStatus PI_PDEBUILD EXCEPTION_FEATURE_PARSE readingFile toString IStatus PI_PDEBUILD EXCEPTION_FEATURE_MISSING BundleHelper getDefault getLog CoreExceptions CoreException featureStream featureStream IOException
private I Feature create Feature I Site site throws Core Exception Feature feature null TODO Feature Executable Content Provider is a non API class I Feature Content Provider content Provider new Feature Executable Content Provider null feature Feature create Feature Model feature set Site site feature set Feature Content Provider content Provider return feature  IFeature createFeature ISite CoreException FeatureExecutableContentProvider IFeatureContentProvider contentProvider FeatureExecutableContentProvider createFeatureModel setSite setFeatureContentProvider contentProvider
public Feature Model create Feature Model return new Build Time Feature  FeatureModel createFeatureModel BuildTimeFeature

public Properties get Feature Versions if repository Versions null repository Versions new Properties try Input Stream input new Buffered Input Stream new File Input Stream Abstract Script Generator get Working Directory DEFAULT FEATURE VERSION FILENAME DESCRIPTOR try repository Versions load input finally input close catch IO Exception e Ignore return repository Versions  getFeatureVersions repositoryVersions repositoryVersions InputStream BufferedInputStream FileInputStream AbstractScriptGenerator getWorkingDirectory DEFAULT_FEATURE_VERSION_FILENAME_DESCRIPTOR repositoryVersions IOException repositoryVersions
public PDE State get Registry throws Core Exception if state null create the registry according to the site where the code to compile is and a existing installation of eclipse Build Time Site Content Provider content Provider Build Time Site Content Provider get Site Content Provider if Abstract Script Generator is BuildingOS Gi state new PDE State else state new Plugin Registry Converter state add Bundles content Provider get Plugin Paths state resolve State Bundle Description all Bundles state get State get Bundles Bundle Description resolved Bundles state get State get Resolved Bundles if all Bundles length resolved Bundles length return state Multi Status errors new Multi Status IPDE Build Constants PI PDEBUILD 1 Policy bind exception registry Resolution null NON NLS 1 Bundle Description all state get State get Bundles State Helper helper Platform get Platform Admin get State Helper for int i 0 i all length i if all i is Resolved Version Constraint unsatisfied Constraints helper get Unsatisfied Constraints all i for int j 0 j unsatisfied Constraints length j String message get Resolution Failure Message unsatisfied Constraints j errors add new Status I Status WARNING all i get Symbolic Name I Status WARNING message null Bundle Helper get Default get Log log errors if state get State is Resolved state state resolve true return state  PDEState getRegistry CoreException BuildTimeSiteContentProvider contentProvider BuildTimeSiteContentProvider getSiteContentProvider AbstractScriptGenerator isBuildingOSGi PDEState PluginRegistryConverter addBundles contentProvider getPluginPaths resolveState BundleDescription allBundles getState getBundles BundleDescription resolvedBundles getState getResolvedBundles allBundles resolvedBundles MultiStatus MultiStatus IPDEBuildConstants PI_PDEBUILD registryResolution BundleDescription getState getBundles StateHelper getPlatformAdmin getStateHelper isResolved VersionConstraint unsatisfiedConstraints getUnsatisfiedConstraints unsatisfiedConstraints getResolutionFailureMessage unsatisfiedConstraints IStatus getSymbolicName IStatus BundleHelper getDefault getLog getState isResolved
public String get Resolution Failure Message Version Constraint unsatisfied if unsatisfied is Resolved throw new Illegal Argument Exception if unsatisfied instanceof Package Specification return Policy bind unsatisfied import display Version Constraint unsatisfied NON NLS 1 if unsatisfied instanceof Bundle Specification if Bundle Specification unsatisfied is Optional return Policy bind unsatisfied optional Bundle display Version Constraint unsatisfied NON NLS 1 return Policy bind unsatisfied required display Version Constraint unsatisfied NON NLS 1 return Policy bind unsatisfied host display Version Constraint unsatisfied NON NLS 1  getResolutionFailureMessage VersionConstraint isResolved IllegalArgumentException PackageSpecification displayVersionConstraint BundleSpecification BundleSpecification isOptional optionalBundle displayVersionConstraint displayVersionConstraint displayVersionConstraint
private String display Version Constraint Version Constraint constraint Version Range version Spec constraint get Version Range if version Spec null return constraint get Name return constraint get Name   version Spec  displayVersionConstraint VersionConstraint VersionRange versionSpec getVersionRange versionSpec getName getName _ versionSpec
public I Feature find Feature String feature Id String version Id boolean throws Exception throws Core Exception I Site Feature Reference features get Feature References if GENERIC VERSION NUMBER equals version Id version Id null for int i 0 i features length i if features i get Versioned Identifier get Identifier equals feature Id if version Id null features i get Versioned Identifier get Version to String equals version Id return features i get Feature null int qualifier Idx 1 if version Id null qualifier Idx version Id index Of I Build Properties Constants PROPERTY QUALIFIER 1 Version version To Match new Version version Id substring 0 qualifier Idx for int i 0 i features length i if features i get Versioned Identifier get Identifier equals feature Id new Version features i get Versioned Identifier get Version to String match Minor version To Match return features i get Feature null if throws Exception String message Policy bind exception missing Feature feature Id NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION FEATURE MISSING message null else return null  IFeature findFeature featureId versionId throwsException CoreException ISiteFeatureReference getFeatureReferences GENERIC_VERSION_NUMBER versionId versionId getVersionedIdentifier getIdentifier featureId versionId getVersionedIdentifier getVersion toString versionId getFeature qualifierIdx versionId qualifierIdx versionId indexOf IBuildPropertiesConstants PROPERTY_QUALIFIER versionToMatch versionId qualifierIdx getVersionedIdentifier getIdentifier featureId getVersionedIdentifier getVersion toString matchMinor versionToMatch getFeature throwsException missingFeature featureId CoreException IStatus PI_PDEBUILD EXCEPTION_FEATURE_MISSING
public void add Feature Reference Model File featureXML URL featureURL Site Feature Reference Model feature Ref if featureXML exists Here we could not use toURL on current Feature Dir because the URL has a slash after the colons file c foo whereas the plugins don t have it file d eclipse plugins and this causes problems later to compare UR Ls and compute relative paths try featureURL new URL file featureXML get Absolute Path NON NLS 1 feature Ref new Site Feature Reference feature Ref set Site Model this feature Ref setURL String featureURL to External Form feature Ref set Type Build Time Feature Factory BUILDTIME FEATURE FACTORY ID add Feature Reference Model feature Ref catch MalformedURL Exception e Bundle Helper get Default get Log log new Status I Status WARNING PI PDEBUILD WARNING MISSING SOURCE Policy bind warning cannot Locate Source featureXML get Absolute Path e NON NLS 1  addFeatureReferenceModel SiteFeatureReferenceModel featureRef currentFeatureDir URLs getAbsolutePath featureRef SiteFeatureReference featureRef setSiteModel featureRef setURLString toExternalForm featureRef setType BuildTimeFeatureFactory BUILDTIME_FEATURE_FACTORY_ID addFeatureReferenceModel featureRef MalformedURLException BundleHelper getDefault getLog IStatus PI_PDEBUILD WARNING_MISSING_SOURCE cannotLocateSource getAbsolutePath

public Build Time Site Content Provider String urls String installed BaseURL super null this installed BaseURL installed BaseURL this urls urls  BuildTimeSiteContentProvider installedBaseURL installedBaseURL installedBaseURL
Returns the URL where an eclipse install can be provided Can be null return URL public String get Installed BaseURL return installed BaseURL  getInstalledBaseURL installedBaseURL
public Collection get Plugin Paths Collection plugins To Compile find PluginXML urls if installed BaseURL null plugins To Compile add All find PluginXML Plugin Path Finder get Plugin Paths installed BaseURL plugins To Compile add All find PluginXML new String installed BaseURL return plugins To Compile  getPluginPaths pluginsToCompile findPluginXML installedBaseURL pluginsToCompile addAll findPluginXML PluginPathFinder getPluginPaths installedBaseURL pluginsToCompile addAll findPluginXML installedBaseURL pluginsToCompile
public URL getURL throw new Runtime Exception  RuntimeException
For every entry return all the children of this entry is it is named plugins otherwise return the entry itself private Collection find PluginXML String location Collection collected Elements new Array List 10 for int i 0 i location length i File f new File location i DEFAULT PLUGIN LOCATION if f exists collected Elements add All Arrays as List f list Files else collected Elements add new File location i return collected Elements  findPluginXML collectedElements ArrayList DEFAULT_PLUGIN_LOCATION collectedElements addAll asList listFiles collectedElements collectedElements

Create a build time site using the site Paths and the installed Base Location Note that the site object is not recomputed if no change has been done return I Site throws Core Exception public I Site create Site throws Core Exception if site null urls Changed false return site urls Changed false site Site create Site Map Model Here we find the features in the UR Ls Collection featureXM Ls find FeatureXM Ls If an installed base is provided we need to look at it String installed BaseURL null if installed Base Location null installed Base Location equals NON NLS 1 if new File installed Base Location exists String message Policy bind error incorrect Directory Entry installed Base Location NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION READ DIRECTORY message null installed BaseURL installed Base Location NON NLS 1 Collection installed Features Utils find Files installed Base Location DEFAULT FEATURE LOCATION DEFAULT FEATURE FILENAME DESCRIPTOR if installed Features null featureXM Ls add All installed Features Search the features in the links String link Paths Plugin Path Finder get Plugin Paths installed BaseURL for int i 0 i link Paths length i Collection found Features Utils find Files link Paths i DEFAULT FEATURE LOCATION DEFAULT FEATURE FILENAME DESCRIPTOR if found Features null featureXM Ls add All found Features URL featureURL Site Feature Reference Model feature Ref for Iterator iter featureXM Ls iterator iter has Next File featureXML File iter next if featureXML exists Here we could not use toURL on current Feature Dir because the URL has a slash after the colons file c foo whereas the plugins don t have it file d eclipse plugins and this causes problems later to compare UR Ls and compute relative paths try featureURL new URL file featureXML get Absolute Path NON NLS 1 feature Ref create Feature Reference Model feature Ref set Site Model site feature Ref setURL String featureURL to External Form feature Ref set Type Build Time Feature Factory BUILDTIME FEATURE FACTORY ID site add Feature Reference Model feature Ref catch MalformedURL Exception e Bundle Helper get Default get Log log new Status I Status WARNING PI PDEBUILD WARNING MISSING SOURCE Policy bind warning cannot Locate Source featureXML get Absolute Path e NON NLS 1 I Site Content Provider content Provider new Build Time Site Content Provider site Paths installed BaseURL site set Site Content Provider content Provider content Provider set Site site return site  sitePaths installedBaseLocation ISite CoreException ISite createSite CoreException urlsChanged urlsChanged createSiteMapModel URLs featureXMLs findFeatureXMLs installedBaseURL installedBaseLocation installedBaseLocation installedBaseLocation incorrectDirectoryEntry installedBaseLocation CoreException IStatus PI_PDEBUILD EXCEPTION_READ_DIRECTORY installedBaseURL installedBaseLocation installedFeatures findFiles installedBaseLocation DEFAULT_FEATURE_LOCATION DEFAULT_FEATURE_FILENAME_DESCRIPTOR installedFeatures featureXMLs addAll installedFeatures linkPaths PluginPathFinder getPluginPaths installedBaseURL linkPaths foundFeatures findFiles linkPaths DEFAULT_FEATURE_LOCATION DEFAULT_FEATURE_FILENAME_DESCRIPTOR foundFeatures featureXMLs addAll foundFeatures SiteFeatureReferenceModel featureRef featureXMLs hasNext currentFeatureDir URLs getAbsolutePath featureRef createFeatureReferenceModel featureRef setSiteModel featureRef setURLString toExternalForm featureRef setType BuildTimeFeatureFactory BUILDTIME_FEATURE_FACTORY_ID addFeatureReferenceModel featureRef MalformedURLException BundleHelper getDefault getLog IStatus PI_PDEBUILD WARNING_MISSING_SOURCE cannotLocateSource getAbsolutePath ISiteContentProvider contentProvider BuildTimeSiteContentProvider sitePaths installedBaseURL setSiteContentProvider contentProvider contentProvider setSite
This method MUST not be called The given URL is a pointer to the location of a site xml file which describes our site and we don t have this file public I Site create Site URL url throws Core Exception Invalid Site Type Exception String message Policy bind error incorrect Directory Entry NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION READ DIRECTORY message null  ISite createSite CoreException InvalidSiteTypeException incorrectDirectoryEntry CoreException IStatus PI_PDEBUILD EXCEPTION_READ_DIRECTORY
public Site Model create Site Map Model return new Build Time Site  SiteModel createSiteMapModel BuildTimeSite
public static void set Installed Base Site String installed Base Site Build Time Site Factory installed Base Location installed Base Site  setInstalledBaseSite installedBaseSite BuildTimeSiteFactory installedBaseLocation installedBaseSite
public void set Site Paths String urls if site Paths null site Paths urls urls Changed true return Check if urls are not the same than site Paths int i 0 boolean found true while found i site Paths length found false for int j 0 j urls length j if site Paths i equals urls j found true break i if found site Paths urls urls Changed true  setSitePaths sitePaths sitePaths urlsChanged sitePaths sitePaths sitePaths sitePaths urlsChanged
Look for the feature xml files and return a collection of java io File objects which point to their locations Only look in directories which are direct descendants of the features directory do not do an infinite depth look up private Collection find FeatureXM Ls Collection features new Array List for int i 0 i site Paths length i Collection found Features Utils find Files site Paths i DEFAULT FEATURE LOCATION DEFAULT FEATURE FILENAME DESCRIPTOR if found Features null features add All found Features return features  findFeatureXMLs ArrayList sitePaths foundFeatures findFiles sitePaths DEFAULT_FEATURE_LOCATION DEFAULT_FEATURE_FILENAME_DESCRIPTOR foundFeatures addAll foundFeatures

private Hash Map bundle Classpaths protected long get Next Id return id  HashMap bundleClasspaths getNextId
public PDE State factory Platform get Platform Admin get Factory state factory create State state set Resolver Platform get Platform Admin get Resolver id 0 bundle Classpaths new Hash Map load Plugin Version File  PDEState getPlatformAdmin getFactory createState setResolver getPlatformAdmin getResolver bundleClasspaths HashMap loadPluginVersionFile
public State Object Factory get Factory return factory  StateObjectFactory getFactory
public void add Bundle Description Bundle Description to Add state add Bundle to Add  addBundleDescription BundleDescription toAdd addBundle toAdd
private Plugin Converter acquire Plugin Converter throws Exception return Plugin Converter Bundle Helper get Default acquire Service Plugin Converter class get Name  PluginConverter acquirePluginConverter PluginConverter BundleHelper getDefault acquireService PluginConverter getName
Add a bundle to the state updating the version number public boolean add Bundle Dictionary enhanced Manifest File bundle Location update Version Number enhanced Manifest try Bundle Description descriptor descriptor factory create Bundle Description enhanced Manifest bundle Location get Absolute Path get Next Id bundle Classpaths put new Long descriptor get Bundle Id get Classpath enhanced Manifest state add Bundle descriptor catch Bundle Exception e I Status status new Status I Status WARNING IPDE Build Constants PI PDEBUILD EXCEPTION STATE PROBLEM Policy bind exception state Addition String enhanced Manifest get Constants BUNDLE NAME e NON NLS 1 Bundle Helper get Default get Log log status return false return true  addBundle enhancedManifest bundleLocation updateVersionNumber enhancedManifest BundleDescription createBundleDescription enhancedManifest bundleLocation getAbsolutePath getNextId bundleClasspaths getBundleId getClasspath enhancedManifest addBundle BundleException IStatus IStatus IPDEBuildConstants PI_PDEBUILD EXCEPTION_STATE_PROBLEM stateAddition enhancedManifest BUNDLE_NAME BundleHelper getDefault getLog
private String get Classpath Dictionary manifest String full Classpath String manifest get Constants BUNDLE CLASSPATH String result new String 0 try if full Classpath null Manifest Element classpath Entries classpath Entries Manifest Element parse Header Constants BUNDLE CLASSPATH full Classpath result new String classpath Entries length for int i 0 i classpath Entries length i result i classpath Entries i get Value catch Bundle Exception e Ignore return result  getClasspath fullClasspath BUNDLE_CLASSPATH fullClasspath ManifestElement classpathEntries classpathEntries ManifestElement parseHeader BUNDLE_CLASSPATH fullClasspath classpathEntries classpathEntries classpathEntries getValue BundleException
private void load Plugin Version File repository Versions new Properties try Input Stream input new Buffered Input Stream new File Input Stream Abstract Script Generator get Working Directory DEFAULT PLUGIN VERSION FILENAME DESCRIPTOR try repository Versions load input finally input close catch IO Exception e Ignore  loadPluginVersionFile repositoryVersions InputStream BufferedInputStream FileInputStream AbstractScriptGenerator getWorkingDirectory DEFAULT_PLUGIN_VERSION_FILENAME_DESCRIPTOR repositoryVersions IOException
public boolean add Bundle File bundle Location Dictionary manifest manifest load Manifest bundle Location if manifest null return false try String symbolic Header String manifest get Constants BUNDLE SYMBOLICNAME if symbolic Header null Manifest Element parse Header Constants BUNDLE SYMBOLICNAME symbolic Header 0 get Value equals org eclipse osgi NON NLS 1 manifest put Constants BUNDLE CLASSPATH findOS Gi Jars bundle Location has Qualifier bundle Location manifest catch Bundle Exception e should not happen since we know the header return add Bundle manifest bundle Location  addBundle bundleLocation loadManifest bundleLocation symbolicHeader BUNDLE_SYMBOLICNAME symbolicHeader ManifestElement parseHeader BUNDLE_SYMBOLICNAME symbolicHeader getValue BUNDLE_CLASSPATH findOSGiJars bundleLocation hasQualifier bundleLocation BundleException addBundle bundleLocation
private String findOS Gi Jars File bundle Location String eclipse Properies eclipse properties NON NLS 1 Input Stream manifest Stream null try URL manifest Location null if bundle Location get Name ends With jar NON NLS 1 manifest Location new URL jar file bundle Location eclipse Properies NON NLS 1 NON NLS 2 manifest Stream manifest Location open Stream else manifest Stream new File Input Stream new File bundle Location eclipse Properies catch IO Exception e ignore Properties properties new Properties try properties load manifest Stream manifest Stream close catch IO Exception e1 Ignore String osgi Path properties get Property osgi framework Class Path NON NLS 1 if osgi Path null osgi Path core jar console jar osgi jar resolver jar default Adaptor jar eclipse Adaptor jar NON NLS 1 return osgi Path  findOSGiJars bundleLocation eclipseProperies InputStream manifestStream manifestLocation bundleLocation getName endsWith manifestLocation bundleLocation eclipseProperies manifestStream manifestLocation openStream manifestStream FileInputStream bundleLocation eclipseProperies IOException manifestStream manifestStream IOException osgiPath getProperty frameworkClassPath osgiPath osgiPath defaultAdaptor eclipseAdaptor osgiPath
private void update Version Number Dictionary manifest String new Version Qualifier Replacer replace Qualifier In Version String manifest get Constants BUNDLE VERSION String manifest get Constants BUNDLE SYMBOLICNAME String manifest get PROPERTY QUALIFIER repository Versions if new Version null manifest put Constants BUNDLE VERSION new Version  updateVersionNumber newVersion QualifierReplacer replaceQualifierInVersion BUNDLE_VERSION BUNDLE_SYMBOLICNAME PROPERTY_QUALIFIER repositoryVersions newVersion BUNDLE_VERSION newVersion
param bundle Location param manifest throws Bundle Exception private void has Qualifier File bundle Location Dictionary manifest throws Bundle Exception Manifest Element version Info Manifest Element parse Header Constants BUNDLE VERSION String manifest get Constants BUNDLE VERSION if version Info null if version Info 0 get Value ends With PROPERTY QUALIFIER try String qualifier Info Abstract Script Generator read Properties bundle Location get Absolute Path IPDE Build Constants PROPERTIES FILE I Status INFO get Property PROPERTY QUALIFIER TODO Log a warning when no qualifier has been found in the manifest manifest put PROPERTY QUALIFIER qualifier Info catch Core Exception e1 Ignore  bundleLocation BundleException hasQualifier bundleLocation BundleException ManifestElement versionInfo ManifestElement parseHeader BUNDLE_VERSION BUNDLE_VERSION versionInfo versionInfo getValue endsWith PROPERTY_QUALIFIER qualifierInfo AbstractScriptGenerator readProperties bundleLocation getAbsolutePath IPDEBuildConstants PROPERTIES_FILE IStatus getProperty PROPERTY_QUALIFIER PROPERTY_QUALIFIER qualifierInfo CoreException
private Dictionary load Manifest File bundle Location Input Stream manifest Stream null try URL manifest Location null if bundle Location get Name ends With jar NON NLS 1 manifest Location new URL jar file bundle Location Jar File MANIFEST NAME NON NLS 1 NON NLS 2 manifest Stream manifest Location open Stream else manifest Stream new File Input Stream new File bundle Location Jar File MANIFEST NAME catch IO Exception e ignore if manifest Stream null Plugin Converter converter try converter acquire Plugin Converter return converter convert Manifest bundle Location false Abstract Build Script Generator is BuildingOS Gi null 2 1 false NON NLS 1 catch Plugin Conversion Exception convert Exception if bundle Location get Name equals feature xml NON NLS 1 return null I Status status new Status I Status WARNING PI PDEBUILD 0 Policy bind exception error Converting bundle Location get Absolute Path convert Exception NON NLS 1 Bundle Helper get Default get Log log status return null catch Exception service Exception I Status status new Status I Status WARNING PI PDEBUILD 0 Policy bind exception cannot Acquire Service Plugin converter service Exception NON NLS 1 NON NLS 2 Bundle Helper get Default get Log log status return null try Manifest m new Manifest manifest Stream Properties properties manifest To Properties m get Main Attributes Add dot on the classpath if none has been specified String classpath String properties get Constants BUNDLE CLASSPATH if classpath null properties put Constants BUNDLE CLASSPATH NON NLS 1 return properties catch IO Exception e return null finally try manifest Stream close catch IO Exception e1 Ignore  loadManifest bundleLocation InputStream manifestStream manifestLocation bundleLocation getName endsWith manifestLocation bundleLocation JarFile MANIFEST_NAME manifestStream manifestLocation openStream manifestStream FileInputStream bundleLocation JarFile MANIFEST_NAME IOException manifestStream PluginConverter acquirePluginConverter convertManifest bundleLocation AbstractBuildScriptGenerator isBuildingOSGi PluginConversionException convertException bundleLocation getName IStatus IStatus PI_PDEBUILD errorConverting bundleLocation getAbsolutePath convertException BundleHelper getDefault getLog serviceException IStatus IStatus PI_PDEBUILD cannotAcquireService serviceException BundleHelper getDefault getLog manifestStream manifestToProperties getMainAttributes BUNDLE_CLASSPATH BUNDLE_CLASSPATH IOException manifestStream IOException
private Properties manifest To Properties Attributes d Iterator iter d key Set iterator Properties result new Properties while iter has Next Attributes Name key Attributes Name iter next result put key to String d get key return result  manifestToProperties keySet hasNext toString
public void add Bundles Collection bundles for Iterator iter bundles iterator iter has Next File bundle File iter next add Bundle bundle  addBundles hasNext addBundle
public void resolve State state resolve false  resolveState
public State get State return state  getState
public Bundle Description get Dependent Bundles String bundle Id Version version Bundle Description root state get Bundle bundle Id version return get Dependent Bundles root  BundleDescription getDependentBundles bundleId BundleDescription getBundle bundleId getDependentBundles
This methods return the bundle Descriptions to which imports have been bound to param root return public static Bundle Description get Imported Bundles Bundle Description root if root null return new Bundle Description 0 Package Specification packages root get Packages Array List resolved Imported new Array List packages length for int i 0 i packages length i if packages i is Exported packages i is Resolved resolved Imported contains packages i get Supplier resolved Imported add packages i get Supplier Bundle Description result new Bundle Description resolved Imported size return Bundle Description resolved Imported to Array result  bundleDescriptions BundleDescription getImportedBundles BundleDescription BundleDescription PackageSpecification getPackages ArrayList resolvedImported ArrayList isExported isResolved resolvedImported getSupplier resolvedImported getSupplier BundleDescription BundleDescription resolvedImported BundleDescription resolvedImported toArray
This methods return the bundle Descriptions to which required bundles have been bound to param root return public static Bundle Description get Required Bundles Bundle Description root if root null return new Bundle Description 0 Bundle Specification required root get Required Bundles Array List resolved Required new Array List required length for int i 0 i required length i if required i is Resolved resolved Required contains required i get Supplier resolved Required add required i get Supplier Bundle Description result new Bundle Description resolved Required size return Bundle Description resolved Required to Array result  bundleDescriptions BundleDescription getRequiredBundles BundleDescription BundleDescription BundleSpecification getRequiredBundles ArrayList resolvedRequired ArrayList isResolved resolvedRequired getSupplier resolvedRequired getSupplier BundleDescription BundleDescription resolvedRequired BundleDescription resolvedRequired toArray
public Bundle Description get Resolved Bundle String bundle Id String version if IPDE Build Constants GENERIC VERSION NUMBER equals version version null return get Resolved Bundle bundle Id Bundle Description description get State get Bundle bundle Id new Version version if description null description is Resolved return description int qualifier Idx 1 if qualifier Idx version index Of I Build Properties Constants PROPERTY QUALIFIER 1 Bundle Description bundles get State get Bundles bundle Id Version version To Match new Version version substring 0 qualifier Idx for int i 0 i bundles length i if bundles i get Version match Minor version To Match return bundles i return null  BundleDescription getResolvedBundle bundleId IPDEBuildConstants GENERIC_VERSION_NUMBER getResolvedBundle bundleId BundleDescription getState getBundle bundleId isResolved qualifierIdx qualifierIdx indexOf IBuildPropertiesConstants PROPERTY_QUALIFIER BundleDescription getState getBundles bundleId versionToMatch qualifierIdx getVersion matchMinor versionToMatch
public Bundle Description get Resolved Bundle String bundle Id Bundle Description description get State get Bundles bundle Id if description null return null for int i 0 i description length i if description i is Resolved return description i return null  BundleDescription getResolvedBundle bundleId BundleDescription getState getBundles bundleId isResolved
public static Bundle Description get Dependent Bundles Bundle Description root Bundle Description imported get Imported Bundles root Bundle Description required get Required Bundles root Bundle Description dependents new Bundle Description imported length required length System arraycopy imported 0 dependents 0 imported length System arraycopy required 0 dependents imported length required length return dependents  BundleDescription getDependentBundles BundleDescription BundleDescription getImportedBundles BundleDescription getRequiredBundles BundleDescription BundleDescription
public static Bundle Description get Dependent Bundles With Fragments Bundle Description root Bundle Description imported get Imported Bundles root Bundle Description imported By Fragments get Imported By Fragments root Bundle Description required get Required Bundles root Bundle Description required By Fragments get Required By Fragments root Bundle Description dependents new Bundle Description imported length imported By Fragments length required length required By Fragments length System arraycopy imported 0 dependents 0 imported length System arraycopy imported By Fragments 0 dependents imported length imported By Fragments length System arraycopy required 0 dependents imported length imported By Fragments length required length System arraycopy required By Fragments 0 dependents imported length imported By Fragments length required length required By Fragments length return dependents  BundleDescription getDependentBundlesWithFragments BundleDescription BundleDescription getImportedBundles BundleDescription importedByFragments getImportedByFragments BundleDescription getRequiredBundles BundleDescription requiredByFragments getRequiredByFragments BundleDescription BundleDescription importedByFragments requiredByFragments importedByFragments importedByFragments importedByFragments requiredByFragments importedByFragments requiredByFragments
public static Bundle Description get Imported By Fragments Bundle Description root Bundle Description fragments root get Fragments List imported By Fragments new Array List for int i 0 i fragments length i if fragments i is Resolved continue merge imported By Fragments get Imported Bundles fragments i Bundle Description result new Bundle Description imported By Fragments size return Bundle Description imported By Fragments to Array result  BundleDescription getImportedByFragments BundleDescription BundleDescription getFragments importedByFragments ArrayList isResolved importedByFragments getImportedBundles BundleDescription BundleDescription importedByFragments BundleDescription importedByFragments toArray
public static Bundle Description get Required By Fragments Bundle Description root Bundle Description fragments root get Fragments List imported By Fragments new Array List for int i 0 i fragments length i if fragments i is Resolved continue merge imported By Fragments get Required Bundles fragments i Bundle Description result new Bundle Description imported By Fragments size return Bundle Description imported By Fragments to Array result  BundleDescription getRequiredByFragments BundleDescription BundleDescription getFragments importedByFragments ArrayList isResolved importedByFragments getRequiredBundles BundleDescription BundleDescription importedByFragments BundleDescription importedByFragments toArray
public static void merge List source Bundle Description to Add for int i 0 i to Add length i if source contains to Add i source add to Add i  BundleDescription toAdd toAdd toAdd toAdd
public Properties load Property File In Map to Merge File location Properties result new Properties result put All to Merge try Input Stream property Stream new Buffered Input Stream new File Input Stream new File location PROPERTIES FILE try result load property Stream finally property Stream close catch Exception e ignore because compiled plug ins do not have such files return result  loadPropertyFileIn toMerge putAll toMerge InputStream propertyStream BufferedInputStream FileInputStream PROPERTIES_FILE propertyStream propertyStream
public Hash Map get Extra Data return bundle Classpaths  HashMap getExtraData bundleClasspaths
public List get Sorted Bundles return Utils compute Prerequisite Order Arrays as List get State get Resolved Bundles  getSortedBundles computePrerequisiteOrder asList getState getResolvedBundles

public class Plugin Path Finder public static File get Link Files String platform Home File file new File platform Home I Path SEPARATOR links NON NLS 1 File link Files null if file exists file is Directory link Files file list Files return link Files  PluginPathFinder getLinkFiles platformHome platformHome IPath linkFiles isDirectory linkFiles listFiles linkFiles
public static String get Path String platform Home File file String prefix new Path platform Home remove Last Segments 1 to String Properties properties new Properties try File Input Stream fis new File Input Stream file properties load fis fis close String path properties get Property path NON NLS 1 if path null if new Path path is Absolute path prefix I Path SEPARATOR path path I Path SEPARATOR eclipse NON NLS 1 if new File path exists return path catch IO Exception e return null  getPath platformHome platformHome removeLastSegments toString FileInputStream FileInputStream getProperty isAbsolute IPath IPath IOException
public static String get Plugin Paths String platform Home Array List result new Array List File link Files get Link Files platform Home if link Files null for int i 0 i link Files length i String path get Path platform Home link Files i if path null result add path return String result to Array new String result size  getPluginPaths platformHome ArrayList ArrayList linkFiles getLinkFiles platformHome linkFiles linkFiles getPath platformHome linkFiles toArray

private URL remove InvalidUR Ls URL files URL validUR Ls new URL files length int validURL 0 for int i 0 i files length i if files i to External Form ends With feature xml files i to External Form ends With MANIFEST MF NON NLS 1 NON NLS 2 validUR Ls validURL files i if files length validURL return validUR Ls URL result new URL validURL System arraycopy validUR Ls 0 result 0 validURL return result  removeInvalidURLs validURLs toExternalForm endsWith toExternalForm endsWith validURLs validURLs validURLs
private Plugin Registry Model get Plugin Registry URL files throws Core Exception if registry null files remove InvalidUR Ls files create the registry according to the site where the code to compile is and a existing installation of eclipse Multi Status problems new Multi Status IPDE Build Constants PI PDEBUILD EXCEPTION MODEL PARSE Policy bind exception plugin Parse null NON NLS 1 Factory factory new Factory problems registry Plugin Registry Model parse Plugins files factory registry resolve true false I Status status factory get Status if status isOK throw new Core Exception status return registry  PluginRegistryModel getPluginRegistry CoreException removeInvalidURLs MultiStatus MultiStatus IPDEBuildConstants PI_PDEBUILD EXCEPTION_MODEL_PARSE pluginParse PluginRegistryModel parsePlugins IStatus getStatus CoreException
public void add Registry To State Plugin Model plugins registry get Plugins Plugin Fragment Model fragments registry get Fragments for int i 0 i plugins length i Bundle Description bd state get Factory create Bundle Description get Next Id plugins i get Plugin Id new Version plugins i get Version plugins i get Location create Bundle Specification plugins i get Requires Host Specification null null null true String libs create Classpath plugins i get Runtime Properties manifest new Properties if libs null manifest put Constants BUNDLE CLASSPATH libs load Property File In manifest new File fragments i get Location bd set User Object manifest add Bundle Description bd for int i 0 i fragments length i Host Specification host state get Factory create Host Specification fragments i get Plugin Id new Version fragments i get Plugin Version fragments i get Match false Bundle Description bd state get Factory create Bundle Description get Next Id fragments i get Id new Version fragments i get Version fragments i get Location create Bundle Specification fragments i get Requires new Host Specification host null null true String libs create Classpath fragments i get Runtime Properties manifest new Properties if libs null manifest put Constants BUNDLE CLASSPATH libs load Property File In manifest new File fragments i get Location bd set User Object manifest add Bundle Description bd  addRegistryToState PluginModel getPlugins PluginFragmentModel getFragments BundleDescription getFactory createBundleDescription getNextId getPluginId getVersion getLocation createBundleSpecification getRequires HostSpecification createClasspath getRuntime BUNDLE_CLASSPATH loadPropertyFileIn getLocation setUserObject addBundleDescription HostSpecification getFactory createHostSpecification getPluginId getPluginVersion getMatch BundleDescription getFactory createBundleDescription getNextId getId getVersion getLocation createBundleSpecification getRequires HostSpecification createClasspath getRuntime BUNDLE_CLASSPATH loadPropertyFileIn getLocation setUserObject addBundleDescription
protected Bundle Specification create Bundle Specification Plugin Prerequisite Model prereqs if prereqs null return new Bundle Specification 0 Bundle Specification specs new Bundle Specification prereqs length for int i 0 i prereqs length i specs i state get Factory create Bundle Specification prereqs i get Plugin new Version prereqs i get Version prereqs i get Match Byte prereqs i get Export prereqs i get Optional return specs  BundleSpecification createBundleSpecification PluginPrerequisiteModel BundleSpecification BundleSpecification BundleSpecification getFactory createBundleSpecification getPlugin getVersion getMatchByte getExport getOptional
private String create Classpath Library Model libs if libs null libs length 0 return null String result NON NLS 1 for int i 0 i libs length i result libs i get Name i libs length 1 NON NLS 1 NON NLS 2 return result  createClasspath LibraryModel getName
public void add Bundles Collection bundles try get Plugin Registry Utils asURL bundles catch Core Exception e I Status status new Status I Status ERROR IPDE Build Constants PI PDEBUILD EXCEPTION STATE PROBLEM Policy bind exception registry Resolution e NON NLS 1 Bundle Helper get Default get Log log status for Iterator iter bundles iterator iter has Next File bundle File iter next add Bundle bundle  addBundles getPluginRegistry CoreException IStatus IStatus IPDEBuildConstants PI_PDEBUILD EXCEPTION_STATE_PROBLEM registryResolution BundleHelper getDefault getLog hasNext addBundle

public static String replace Qualifier In Version String version String id String replace Tag Properties new Versions if replace Tag null return null if version ends With DOT QUALIFIER return null String new Qualifier null if replace Tag equals Ignore Case PROPERTY CONTEXT if new Versions size 0 Skip the lookp in the file if there is no entries new Qualifier String new Versions get id if new Qualifier null new Qualifier new Versions get Property DEFAULT MATCH ALL if new Qualifier null new Qualifier get Date new Qualifier new Qualifier else if replace Tag equals Ignore Case PROPERTY NONE new Qualifier NON NLS 1 else new Qualifier replace Tag return version replace First DOT QUALIFIER new Qualifier  replaceQualifierInVersion replaceTag newVersions replaceTag endsWith DOT_QUALIFIER newQualifier replaceTag equalsIgnoreCase PROPERTY_CONTEXT newVersions newQualifier newVersions newQualifier newQualifier newVersions getProperty DEFAULT_MATCH_ALL newQualifier newQualifier getDate newQualifier newQualifier replaceTag equalsIgnoreCase PROPERTY_NONE newQualifier newQualifier replaceTag replaceFirst DOT_QUALIFIER newQualifier
private static String get Date final String empty NON NLS 1 int month Nbr Calendar get Instance get Calendar MONTH 1 String month month Nbr 10 0 empty month Nbr NON NLS 1 int day Nbr Calendar get Instance get Calendar DAY OF MONTH String day day Nbr 10 0 empty day Nbr NON NLS 1 int hour Nbr Calendar get Instance get Calendar HOUR OF DAY String hour hour Nbr 10 0 empty hour Nbr NON NLS 1 int minute Nbr Calendar get Instance get Calendar MINUTE String minute minute Nbr 10 0 empty minute Nbr NON NLS 1 return empty Calendar get Instance get Calendar YEAR month day hour minute NON NLS 1  getDate monthNbr getInstance monthNbr monthNbr dayNbr getInstance DAY_OF_MONTH dayNbr dayNbr hourNbr getInstance HOUR_OF_DAY hourNbr hourNbr minuteNbr getInstance minuteNbr minuteNbr getInstance

public Source Feature Information Initialize the content of the assembly information with the configurations for Iterator iter Abstract Script Generator get Config Infos iterator iter has Next Config config Config iter next source Feature Information put config new Hash Set source Feature Information put Config generic Config new Hash Set 2  SourceFeatureInformation AbstractScriptGenerator getConfigInfos hasNext sourceFeatureInformation HashSet sourceFeatureInformation genericConfig HashSet
public void add Element Entry Config config Bundle Description plugin Set entry Set source Feature Information get config entry add plugin  addElementEntry BundleDescription sourceFeatureInformation
public Map get Element Entries return source Feature Information  getElementEntries sourceFeatureInformation

public class Source Feature Writer extends Feature Writer public Source Feature Writer Output Stream out Feature feature Feature Build Script Generator generator throws IO Exception super out feature generator  SourceFeatureWriter FeatureWriter SourceFeatureWriter OutputStream FeatureBuildScriptGenerator IOException
public void print Includes Map parameters new Hash Map TO CHECK Here we should have the raw list I Included Feature Reference features feature get Feature Included for int i 0 i features length i parameters clear try parameters put id features i get Versioned Identifier get Identifier NON NLS 1 parameters put version features i get Versioned Identifier get Version NON NLS 1 catch Core Exception e e print Stack Trace TO CHECK better handling of exception print Tag includes parameters true true true NON NLS 1  printIncludes HashMap IIncludedFeatureReference getFeatureIncluded getVersionedIdentifier getIdentifier getVersionedIdentifier getVersion CoreException printStackTrace printTag

Set the directory where the packaging will occur param working Location the location throws MalformedURL Exception public void set Working Directory String working Location throws MalformedURL Exception generator set Working Directory working Location  workingLocation MalformedURLException setWorkingDirectory workingLocation MalformedURLException setWorkingDirectory workingLocation
Set the features to assemble param feature List a comma separated list of features to package public void set Feature List String feature List throws Build Exception generator set Feature List feature List  featureList setFeatureList featureList BuildException setFeatureList featureList
Set the configuration for which the assembling is being done param config Info a configuration throws Core Exception public void set Config Info String config Info throws Core Exception Abstract Script Generator set Config Info config Info  configInfo CoreException setConfigInfo configInfo CoreException AbstractScriptGenerator setConfigInfo configInfo
Set the location where to find features plugins and fragments param base Location a comma separated list of paths public void set Base Location String base Location throws Build Exception String locations Utils get Array From String base Location generator set Plugin Path locations  baseLocation setBaseLocation baseLocation BuildException getArrayFromString baseLocation setPluginPath
public void execute throws Build Exception try generator run catch Core Exception e throw new Build Exception e  BuildException CoreException BuildException
Set the property file containing information about packaging param property File the path to a property file public void set Package Property File String property File generator set Property File property File  propertyFile setPackagePropertyFile propertyFile setPropertyFile propertyFile

see org apache tools ant Task execute public void execute throws Build Exception try if this elements null String message Policy bind error missing Element NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION ELEMENT MISSING message null read Directory Print Writer output new Print Writer new File Output Stream destination try List entries new Array List 20 for int i 0 i elements length i collect Entries entries elements i generate Prologue output generate Entries output entries finally output close catch Exception e throw new Build Exception e  BuildException missingElement CoreException IStatus PI_PDEBUILD EXCEPTION_ELEMENT_MISSING readDirectory PrintWriter PrintWriter FileOutputStream ArrayList collectEntries generatePrologue generateEntries BuildException
param output protected void generate Prologue Print Writer output output print Build Manifest for NON NLS 1 output println build Name output println output println The format of this file is NON NLS 1 output println type element CVS tag NON NLS 1 output println String id get Build Id if id null output print PROPERTY BUILD ID NON NLS 1 output println id String type get Build Type if type null output print PROPERTY BUILD TYPE NON NLS 1 output println type String qualifier get Build Qualifier if qualifier null output print PROPERTY BUILD QUALIFIER NON NLS 1 output println qualifier output println  generatePrologue PrintWriter buildName getBuildId PROPERTY_BUILD_ID getBuildType PROPERTY_BUILD_TYPE getBuildQualifier PROPERTY_BUILD_QUALIFIER
return String protected String get Build Id if build Id null build Id get Project get Property PROPERTY BUILD ID return build Id  getBuildId buildId buildId getProject getProperty PROPERTY_BUILD_ID buildId
return String protected String get Build Qualifier if build Qualifier null build Qualifier get Project get Property PROPERTY BUILD QUALIFIER return build Qualifier  getBuildQualifier buildQualifier buildQualifier getProject getProperty PROPERTY_BUILD_QUALIFIER buildQualifier
return String protected String get Build Type if build Type null build Type get Project get Property PROPERTY BUILD TYPE return build Type  getBuildType buildType buildType getProject getProperty PROPERTY_BUILD_TYPE buildType
param output param entries throws Core Exception protected void generate Entries Print Writer output List entries throws Core Exception Collections sort entries for Iterator iterator entries iterator iterator has Next String entry String iterator next output println entry  CoreException generateEntries PrintWriter CoreException hasNext
Collects all the elements that are part of this build protected void collect Entries List entries String entry throws Core Exception String cvs Info directory get Property entry if cvs Info null String message Policy bind error missing Directory Entry entry NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION ENTRY MISSING message null int index entry index Of String type entry substring 0 index String element entry substring index 1 if type equals plugin type equals fragment NON NLS 1 NON NLS 2 String cvs Fields Utils get Array From String cvs Info String tag cvs Fields 0 String Buffer sb new String Buffer sb append entry sb append NON NLS 1 sb append tag entries add sb to String else if children type equals feature NON NLS 1 Feature feature read Feature element collect Children Entries entries feature  collectEntries CoreException cvsInfo getProperty cvsInfo missingDirectoryEntry CoreException IStatus PI_PDEBUILD EXCEPTION_ENTRY_MISSING indexOf cvsFields getArrayFromString cvsInfo cvsFields StringBuffer StringBuffer toString readFeature collectChildrenEntries
param entries param feature throws Core Exception protected void collect Children Entries List entries Feature feature throws Core Exception I Plugin Entry plugin Entries feature get Plugin Entries for int i 0 i plugin Entries length i String element Id plugin Entries i get Versioned Identifier get Identifier if plugin Entries i is Fragment collect Entries entries fragment element Id NON NLS 1 else collect Entries entries plugin element Id NON NLS 1  CoreException collectChildrenEntries CoreException IPluginEntry pluginEntries getPluginEntries pluginEntries elementId pluginEntries getVersionedIdentifier getIdentifier pluginEntries isFragment collectEntries elementId collectEntries elementId
param element return Feature throws Core Exception protected Feature read Feature String element throws Core Exception I Path root new Path install Location root root append DEFAULT FEATURE LOCATION root root append element try Feature Executable Factory factory new Feature Executable Factory return Feature factory create Feature root to File toURL null null catch Exception e String message Policy bind error creating Feature element NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION FEATURE MISSING message e  CoreException readFeature CoreException IPath installLocation DEFAULT_FEATURE_LOCATION FeatureExecutableFactory FeatureExecutableFactory createFeature toFile creatingFeature CoreException IStatus PI_PDEBUILD EXCEPTION_FEATURE_MISSING
Sets the install Location public void set Install String install Location this install Location install Location  installLocation setInstall installLocation installLocation installLocation
Reads directory file at the directory Location protected void read Directory throws Core Exception try directory new Properties File file new File directory Location Input Stream is new File Input Stream file try directory load is finally is close catch IO Exception e String message Policy bind error reading Directory directory Location NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION READ DIRECTORY message e  directoryLocation readDirectory CoreException directoryLocation InputStream FileInputStream IOException readingDirectory directoryLocation CoreException IStatus PI_PDEBUILD EXCEPTION_READ_DIRECTORY
param directory public void set Directory String directory directory Location directory  setDirectory directoryLocation
param value public void set Elements String value elements Utils get Array From String value  setElements getArrayFromString
Sets the full location of the manifest file public void set Destination String value destination value  setDestination
Whether children of this element should be taken into account public void set Children boolean children this children children  setChildren
param value public void set Build Name String value build Name value  setBuildName buildName
Sets the build Id public void set Build Id String build Id this build Id build Id  buildId setBuildId buildId buildId buildId
Sets the build Qualifier public void set Build Qualifier String build Qualifier this build Qualifier build Qualifier  buildQualifier setBuildQualifier buildQualifier buildQualifier buildQualifier
Sets the build Type public void set Build Type String build Type this build Type build Type  buildType setBuildType buildType buildType buildType

Set the boolean value indicating whether or not children scripts should be generated param children code true code if child scripts should be generated and code false code otherwise since 3 0 public void set Children boolean children generator set Children children  setChildren setChildren
Set the development entries for the compile classpath to be the givenvalue param dev Entries the classpath dev entries public void set Dev Entries String dev Entries generator set Dev Entries dev Entries  devEntries setDevEntries devEntries setDevEntries devEntries
Set the plug in path to be the given value param plugin Path the plug in path public void set Plugin Path String plugin Path throws Core Exception generator set Plugin Path Utils get Array From String plugin Path  pluginPath setPluginPath pluginPath CoreException setPluginPath getArrayFromString pluginPath
Set the source elements for the script to be the given value param elements the source elements for the script public void set Elements String elements generator set Elements Utils get Array From String elements  setElements setElements getArrayFromString
public void execute throws Build Exception try run catch Core Exception e throw new Build Exception e  BuildException CoreException BuildException
public void run throws Core Exception generator generate  CoreException
Set the folder in which the build will occur param build Directory the location where the build will occur since 3 0 public void set Build Directory String build Directory throws MalformedURL Exception generator set Working Directory build Directory  buildDirectory setBuildDirectory buildDirectory MalformedURLException setWorkingDirectory buildDirectory
Set the folder in which the build will occur param install Location the location where the build will occur deprecated see link set Build Directory String public void set Install String install Location generator set Working Directory install Location  installLocation setBuildDirectory setInstall installLocation setWorkingDirectory installLocation
Set the boolean value indicating whether or not the build scripts should be generated for nested features The default is set to true param recursive Generation code true code if the scripts for the nested features should be generated and code false code otherwise since 3 0 public void set Recursive Generation boolean recursive Generation generator set Recursive Generation recursive Generation  recursiveGeneration setRecursiveGeneration recursiveGeneration setRecursiveGeneration recursiveGeneration
Set the configuration for which the script should be generated The default is set to be configuration independent param config Info an ampersand separated list of configuration for example win32 win32 x86 macoxs carbon ppc throws Core Exception since 3 0 public void set Config Info String config Info throws Core Exception Abstract Script Generator set Config Info config Info  configInfo CoreException setConfigInfo configInfo CoreException AbstractScriptGenerator setConfigInfo configInfo
Set a location that contains plugins and features required by plugins and features for which build scripts are being generated param base Location a path to a folder since 3 0 public void set Base Location String base Location Build Time Site Factory set Installed Base Site base Location  baseLocation setBaseLocation baseLocation BuildTimeSiteFactory setInstalledBaseSite baseLocation
Set the boolean value indicating whether or not the plug ins and features for which scripts are being generated target eclipse 3 0 or greater The default is set to true This property is experimental and is likely to be renamed in the future param osgi code true code if the scripts are generated for eclipse 3 0 or greated and code false code otherwise since 3 0 public void set BuildingOS Gi boolean osgi generator set BuildingOS Gi osgi  setBuildingOSGi setBuildingOSGi
Set the folder in which the build will occur p Note This API is experimental p param install Location the location where the build will occur public void set Working Directory String install Location throws MalformedURL Exception generator set Working Directory install Location  installLocation setWorkingDirectory installLocation MalformedURLException setWorkingDirectory installLocation

Set the folder in which the scripts will be generated param working Directory the location where the scripts will be generated public void set Working Directory String working Directory file Fetcher set Working Directory working Directory  workingDirectory setWorkingDirectory workingDirectory fileFetcher setWorkingDirectory workingDirectory
Set the configuration for which the script should be generated The default is set to be configuration independent param config Info an ampersand separated list of configuration for example win32 win32 x86 macoxs carbon ppc throws Core Exception public void set Config Info String config throws Core Exception Abstract Script Generator set Config Info config  configInfo CoreException setConfigInfo CoreException AbstractScriptGenerator setConfigInfo
Set the filters used to select the content type of the components to be downloaded The values are matched against values from the map param filter a comma separated list of content public void set Content Filter String filter file Fetcher set Content Filter filter  setContentFilter fileFetcher setContentFilter
Set the filters used to select the components to be downloaded The values are matched against values from the map param components a comma separated list of components public void set Component Filter String components file Fetcher set Component Filter components  setComponentFilter fileFetcher setComponentFilter
Set the path the a packager map file param map Location path the a packager map file public void set Map String map Location file Fetcher set Map Location map Location  mapLocation setMap mapLocation fileFetcher setMapLocation mapLocation
public void execute throws Build Exception try file Fetcher generate catch Core Exception e throw new Build Exception e  BuildException fileFetcher CoreException BuildException

Default constructor this class public Fetch Task generator new Fetch Script Generator  FetchTask FetchScriptGenerator
Set the boolean value indicating whether or not the fetch scripts should be generated for the children of the elements The default is set to code true code param children code true code if the children scripts should be generated and code false code otherwise since 3 0 public void set Children boolean children generator set Fetch Children children  setChildren setFetchChildren
Set the location for the CVS password file param cvs Pass File Location the location of the password file public void set Cvs Pass File String cvs Pass File Location generator set Cvs Pass File Location cvs Pass File Location  cvsPassFileLocation setCvsPassFile cvsPassFileLocation setCvsPassFileLocation cvsPassFileLocation
The path to a directory file param directory Location the location of a directory file public void set Directory String directory Location generator set Directory Location directory Location  directoryLocation setDirectory directoryLocation setDirectoryLocation directoryLocation
param element public void set Elements String element try generator set Element element catch Core Exception e throw new Build Exception e  setElements setElement CoreException BuildException
Overrides the tags provided in directory file by the given value param value the tag to be fetched since 3 0 public void set Fetch Tag String value generator set Fetch Tag value  setFetchTag setFetchTag
Set the folder in which the scripts will be generated and in which the plugins and features will be fetched param build Directory the location where the scripts will be generated and the files fetched since 3 0 public void set Build Directory String build Directory generator set Working Directory build Directory  buildDirectory setBuildDirectory buildDirectory setWorkingDirectory buildDirectory
Set the folder in which the scripts will be generated and in which the plugins and features will be fetched param install Location the location where the scripts will be generated and the files fetched deprecated see link set Build Directory String public void set Install String install Location generator set Working Directory install Location  installLocation setBuildDirectory setInstall installLocation setWorkingDirectory installLocation
public void execute throws Build Exception try generator generate catch Core Exception e throw new Build Exception e  BuildException CoreException BuildException
Set the boolean value indicating whether or not the fetch scripts should be generated for nested features The default is set to true param recursive Generation code true code if the scripts for the nested features should be generated and code false code otherwise since 3 0 public void set Recursive Generation boolean recursive Generation generator set Recursive Generation recursive Generation  recursiveGeneration setRecursiveGeneration recursiveGeneration setRecursiveGeneration recursiveGeneration
Set the configuration for which the script should be generated The default is set to be configuration independent param config Info an ampersand separated list of configuration for example win32 win32 x86 macoxs carbon ppc throws Core Exception since 3 0 public void set Config Info String config Info throws Core Exception Abstract Script Generator set Config Info config Info  configInfo CoreException setConfigInfo configInfo CoreException AbstractScriptGenerator setConfigInfo configInfo

public void execute File root new File path if root exists root is File root get Name equals MANIFEST call Manifest Modifier path return File found File new File root PLUGIN if found File exists found File is File call Plugin Version Modifier found File get Absolute Path PLUGIN found File new File root FRAGMENT if found File exists found File is File call Plugin Version Modifier found File get Absolute Path FRAGMENT found File new File root MANIFEST if found File exists found File is File call Manifest Modifier found File get Absolute Path  isFile getName callManifestModifier foundFile foundFile foundFile isFile callPluginVersionModifier foundFile getAbsolutePath foundFile foundFile foundFile isFile callPluginVersionModifier foundFile getAbsolutePath foundFile foundFile foundFile isFile callManifestModifier foundFile getAbsolutePath
private void call Plugin Version Modifier String path String input Plugin Version Replace Task modifier new Plugin Version Replace Task modifier set Project get Project modifier set Plugin File Path path modifier set Version Number version modifier set Input input modifier execute  callPluginVersionModifier PluginVersionReplaceTask PluginVersionReplaceTask setProject getProject setPluginFilePath setVersionNumber setInput
private void call Manifest Modifier String path Manifest Modifier modifier new Manifest Modifier modifier set Project get Project modifier set Manifest Location path modifier set Key Value Bundle Version version NON NLS 1 modifier execute  callManifestModifier ManifestModifier ManifestModifier setProject getProject setManifestLocation setKeyValue
Set the path where the file to be replaced is contained param location path to the folder containing the file that needs to be replaced or the file path public void set Path String location this path location  setPath
Set the new version param version the version that will be set in the manifest file public void set Version String version this version version  setVersion

The location of a feature xml file param path public void set Feature File Path String path feature File Path path  setFeatureFilePath featureFilePath
The value with which the current version of the feature will be replaced param version public void set Self Version String version self Version version  setSelfVersion selfVersion
Set the values to use when replacing a generic value used in a plugin reference Note all the plugin Ids that have a generic number into the feature xml must be listed in param values param param values a comma separated list alternating plugin Id and version Number For example org eclipse pde build 2 1 0 org eclipse core resources 1 2 0 public void set Plugin Ids String values plugin Ids new Hash Map 10 for String Tokenizer tokens new String Tokenizer values COMMA tokens has More Tokens NON NLS 1 String token tokens next Token trim String id EMPTY if token equals EMPTY id token String version EMPTY token tokens next Token trim if token equals EMPTY version token plugin Ids put id version  pluginIds pluginId versionNumber setPluginIds pluginIds HashMap StringTokenizer StringTokenizer hasMoreTokens nextToken nextToken pluginIds
Set the values to use when replacing a generic value used in a feature reference Note that all the feature Ids that have a generic number into the feature xml must be liste in param values param param values public void set Feature Ids String values feature Ids new Hash Map 10 for String Tokenizer tokens new String Tokenizer values COMMA tokens has More Tokens NON NLS 1 String token tokens next Token trim String id EMPTY if token equals EMPTY id token String version EMPTY token tokens next Token trim if token equals EMPTY version token feature Ids put id version  featureIds setFeatureIds featureIds HashMap StringTokenizer StringTokenizer hasMoreTokens nextToken nextToken featureIds
public void execute String Buffer buffer null try buffer read File new File feature File Path catch IO Exception e throw new Build Exception e Skip feature declaration because it contains the word plugin int start Feature scan buffer 0 FEATURE if start Feature 1 return int end Feature scan buffer start Feature 1 NON NLS 1 if self Version null int start Version Word scan buffer start Feature 1 VERSION if start Version Word end Feature int start Version Id scan buffer start Version Word 1 BACKSLASH int end Version Id scan buffer start Version Id 1 BACKSLASH buffer replace start Version Id 1 end Version Id self Version int start Element end Feature int start Id 0 while true int start Plugin scan buffer start Element 1 PLUGIN int start Include scan buffer start Element 1 INCLUDES if start Plugin 1 start Include 1 break int found Element 1 boolean is Plugin false Find which a plugin or a feature is referenced first if start Plugin 1 start Include 1 found Element start Plugin 1 start Plugin start Include is Plugin start Plugin 1 true false else if start Plugin start Include found Element start Plugin is Plugin true else found Element start Include is Plugin false start Id scan buffer found Element ID if start Id 1 break int start Element Id scan buffer start Id 1 BACKSLASH int end Element Id scan buffer start Element Id 1 BACKSLASH char element Id new char end Element Id start Element Id 1 buffer get Chars start Element Id 1 end Element Id element Id 0 int start Version Word scan buffer end Element Id 1 VERSION int start Version Id scan buffer start Version Word 1 BACKSLASH int end Version Id scan buffer start Version Id 1 BACKSLASH char version Id new char end Version Id start Version Id 1 buffer get Chars start Version Id 1 end Version Id version Id 0 if new String version Id equals GENERIC VERSION NUMBER new String version Id ends With DOT QUALIFIER start Element start Version Id continue start Version Id String replacement Version null if is Plugin replacement Version String plugin Ids get new String element Id else replacement Version String feature Ids get new String element Id if replacement Version null System err println Could not find new String element Id NON NLS 1 else buffer replace start Version Id end Version Id replacement Version start Element start Version Id try transfer Streams new Byte Array Input Stream buffer to String get Bytes new File Output Stream feature File Path catch File Not Found Exception e ignore catch IO Exception e throw new Build Exception e  StringBuffer readFile featureFilePath IOException BuildException startFeature startFeature endFeature startFeature selfVersion startVersionWord startFeature startVersionWord endFeature startVersionId startVersionWord endVersionId startVersionId startVersionId endVersionId selfVersion startElement endFeature startId startPlugin startElement startInclude startElement startPlugin startInclude foundElement isPlugin startPlugin startInclude foundElement startPlugin startPlugin startInclude isPlugin startPlugin startPlugin startInclude foundElement startPlugin isPlugin foundElement startInclude isPlugin startId foundElement startId startElementId startId endElementId startElementId elementId endElementId startElementId getChars startElementId endElementId elementId startVersionWord endElementId startVersionId startVersionWord endVersionId startVersionId versionId endVersionId startVersionId getChars startVersionId endVersionId versionId versionId GENERIC_VERSION_NUMBER versionId endsWith DOT_QUALIFIER startElement startVersionId startVersionId replacementVersion isPlugin replacementVersion pluginIds elementId replacementVersion featureIds elementId replacementVersion elementId startVersionId endVersionId replacementVersion startElement startVersionId transferStreams ByteArrayInputStream toString getBytes FileOutputStream featureFilePath FileNotFoundException IOException BuildException
private int scan String Buffer buf int start String target Name return scan buf start new String target Name  StringBuffer targetName targetName
private int scan String Buffer buf int start String targets for int i start i buf length i for int j 0 j targets length j if i buf length targets j length String match buf substring i i targets j length if targets j equals match return i return 1  StringBuffer
private String Buffer read File File target Name throws IO Exception Input Stream Reader reader new Input Stream Reader new Buffered Input Stream new File Input Stream target Name String Buffer result new String Buffer char buf new char 4096 int count try count reader read buf 0 buf length while count 1 result append buf 0 count count reader read buf 0 buf length finally try reader close catch IO Exception e ignore exceptions here return result  StringBuffer readFile targetName IOException InputStreamReader InputStreamReader BufferedInputStream FileInputStream targetName StringBuffer StringBuffer IOException
private static void transfer Streams Input Stream source Output Stream destination throws IO Exception source new Buffered Input Stream source destination new Buffered Output Stream destination try byte buffer new byte 8192 while true int bytes Read 1 if bytes Read source read buffer 1 break destination write buffer 0 bytes Read finally try source close catch IO Exception e ignore try destination close catch IO Exception e ignore  transferStreams InputStream OutputStream IOException BufferedInputStream BufferedOutputStream bytesRead bytesRead bytesRead IOException IOException

Indicate new values to add to the manifest The format of the parameter is key value key value If a value is specified to null the key will be removed from the manifest param values public void set Key Value String values String Tokenizer tokenizer new String Tokenizer values DELIM false while tokenizer has More Elements String key tokenizer next Token String value tokenizer next Token if value equals null NON NLS 1 value null new Values put key value  setKeyValue StringTokenizer StringTokenizer hasMoreElements nextToken nextToken newValues
public void execute load Manifest apply Changes write Manifest  loadManifest applyChanges writeManifest
private void write Manifest Output Stream os null try os new Buffered Output Stream new File Output Stream manifest Location try manifest write os finally os close catch IO Exception e1 new Build Exception Problem writing the content of the manifest manifest Location NON NLS 1  writeManifest OutputStream BufferedOutputStream FileOutputStream manifestLocation IOException BuildException manifestLocation
private void apply Changes for Iterator iter new Values entry Set iterator iter has Next Map Entry entry Map Entry iter next String key String entry get Key String value String entry get Value if value null remove Attribute key else change Value key value  applyChanges newValues entrySet hasNext getKey getValue removeAttribute changeValue
private void load Manifest try Input Stream is new Buffered Input Stream new File Input Stream manifest Location try manifest new Manifest is finally is close catch IO Exception e new Build Exception Problem reading the content of the manifest manifest Location NON NLS 1  loadManifest InputStream BufferedInputStream FileInputStream manifestLocation IOException BuildException manifestLocation
private void change Value String key String value log key key becomes value Project MSG VERBOSE manifest get Main Attributes put new Attributes Name key value  changeValue MSG_VERBOSE getMainAttributes
private void remove Attribute String key log key key removed Project MSG VERBOSE manifest get Main Attributes remove new Attributes Name key  removeAttribute MSG_VERBOSE getMainAttributes
param path public void set Manifest Location String path manifest Location path  setManifestLocation manifestLocation

The location of a fragment xml or plugin xml file param path public void set Plugin File Path String path plugin File Path path  setPluginFilePath pluginFilePath
Set the new version param version the version that will be set in the manifest file public void set Version Number String qualifier new Version qualifier  setVersionNumber newVersion
Set the type of the file param input public void set Input String input if input equals Ignore Case fragment xml NON NLS 1 plugin false  setInput equalsIgnoreCase
public void execute String Buffer buffer null try buffer read File new File plugin File Path catch IO Exception e throw new Build Exception e Find the word plugin or fragment int start Plugin if plugin start Plugin scan buffer 0 PLUGIN else start Plugin scan buffer 0 FRAGMENT if start Plugin 1 return int end Plugin scan buffer start Plugin 1 NON NLS 1 Find the version tag in the plugin header int version Attr scan buffer start Plugin VERSION if version Attr 1 version Attr end Plugin return Extract the version id and replace it int start Version Id scan buffer version Attr 1 BACKSLASH int end Version Id scan buffer start Version Id 1 BACKSLASH start Version Id buffer replace start Version Id end Version Id new Version try transfer Streams new Byte Array Input Stream buffer to String get Bytes new File Output Stream plugin File Path catch File Not Found Exception e ignore catch IO Exception e throw new Build Exception e  StringBuffer readFile pluginFilePath IOException BuildException startPlugin startPlugin startPlugin startPlugin endPlugin startPlugin versionAttr startPlugin versionAttr versionAttr endPlugin startVersionId versionAttr endVersionId startVersionId startVersionId startVersionId endVersionId newVersion transferStreams ByteArrayInputStream toString getBytes FileOutputStream pluginFilePath FileNotFoundException IOException BuildException
private int scan String Buffer buf int start String target Name return scan buf start new String target Name  StringBuffer targetName targetName
private int scan String Buffer buf int start String targets for int i start i buf length i for int j 0 j targets length j if i buf length targets j length String match buf substring i i targets j length if targets j equals match return i return 1  StringBuffer
private String Buffer read File File target Name throws IO Exception Input Stream Reader reader new Input Stream Reader new Buffered Input Stream new File Input Stream target Name String Buffer result new String Buffer char buf new char 4096 int count try count reader read buf 0 buf length while count 1 result append buf 0 count count reader read buf 0 buf length finally try reader close catch IO Exception e ignore exceptions here return result  StringBuffer readFile targetName IOException InputStreamReader InputStreamReader BufferedInputStream FileInputStream targetName StringBuffer StringBuffer IOException
private static void transfer Streams Input Stream source Output Stream destination throws IO Exception source new Buffered Input Stream source destination new Buffered Output Stream destination try byte buffer new byte 8192 while true int bytes Read 1 if bytes Read source read buffer 1 break destination write buffer 0 bytes Read finally try source close catch IO Exception e ignore try destination close catch IO Exception e ignore  transferStreams InputStream OutputStream IOException BufferedInputStream BufferedOutputStream bytesRead bytesRead bytesRead IOException IOException

public void execute throws Build Exception try generator generate catch Core Exception e throw new Build Exception e  BuildException CoreException BuildException
Set the name of the file listing all the files that must be unzipped param file Name public void set Zips Directory String filename generator set Directory Location filename  fileName setZipsDirectory setDirectoryLocation
Set the folder in which the scripts will be generated param build Directory the location where the scripts will be generated and the files fetched public void set Working Directory String install Location throws MalformedURL Exception generator set Working Directory install Location  buildDirectory setWorkingDirectory installLocation MalformedURLException setWorkingDirectory installLocation
Set the configuration for which the script should be generated The default is set to be configuration independent param config Info an ampersand separated list of configuration for example win32 win32 x86 macoxs carbon ppc throws Core Exception public void set Config Info String config Info throws Build Exception try Abstract Script Generator set Config Info config Info catch Core Exception e throw new Build Exception e  configInfo CoreException setConfigInfo configInfo BuildException AbstractScriptGenerator setConfigInfo configInfo CoreException BuildException
Set the property file containing information about packaging param property File the path to a property file public void set Package Property File String property File generator set Property File property File  propertyFile setPackagePropertyFile propertyFile setPropertyFile propertyFile

public final class Utils implements IPDE Build Constants Convert a list of tokens into an array The list separator has to be specified public static String get Array From String String list String separator if list null list trim equals NON NLS 1 return new String 0 List result new Array List for String Tokenizer tokens new String Tokenizer list separator tokens has More Tokens String token tokens next Token trim if token equals NON NLS 1 result add token return String result to Array new String result size  IPDEBuildConstants getArrayFromString ArrayList StringTokenizer StringTokenizer hasMoreTokens nextToken toArray
Convert a list of tokens into an array The list separator has to be specified The spcecificity of this method is that it returns an empty element when to same separators are following each others For example the string a b returns the following array a b public static String get Array From String With Blank String list String separator if list null list trim length 0 return new String 0 List result new Array List boolean previous Was Separator true for String Tokenizer tokens new String Tokenizer list separator true tokens has More Tokens String token tokens next Token trim if token equals separator if previous Was Separator result add NON NLS 1 previous Was Separator true else result add token previous Was Separator false return String result to Array new String result size  getArrayFromStringWithBlank ArrayList previousWasSeparator StringTokenizer StringTokenizer hasMoreTokens nextToken previousWasSeparator previousWasSeparator previousWasSeparator toArray
Return a string array constructed from the given list of comma separated tokens param list the list to convert return the array of strings public static String get Array From String String list return get Array From String list NON NLS 1  getArrayFromString getArrayFromString
Converts an array of strings into an array of UR Ls param target return URL throws Core Exception public static URL asURL String target throws Core Exception if target null return null try URL result new URL target length for int i 0 i target length i result i new URL target i return result catch MalformedURL Exception e throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION MALFORMED URL e get Message e  URLs CoreException CoreException MalformedURLException CoreException IStatus PI_PDEBUILD EXCEPTION_MALFORMED_URL getMessage
public static URL asURL Collection target throws Core Exception if target null return null try URL result new URL target size int i 0 for Iterator iter target iterator iter has Next result i File iter next toURL return result catch MalformedURL Exception e throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION MALFORMED URL e get Message e  CoreException hasNext MalformedURLException CoreException IStatus PI_PDEBUILD EXCEPTION_MALFORMED_URL getMessage
Return a string which is a concatination of each member of the given collection separated by the given separator param collection the collection to concatinate param separator the separator to use return String public static String get String From Collection Collection collection String separator String Buffer result new String Buffer boolean first true for Iterator i collection iterator i has Next if first first false else result append separator result append i next return result to String  getStringFromCollection StringBuffer StringBuffer hasNext toString
Return a string which is a concatination of each member of the given array separated by the given separator param values the array to concatinate param separator the separator to use return String public static String get String From Array String values String separator String Buffer result new String Buffer for int i 0 i values length i if i 0 result append separator result append values i return result to String  getStringFromArray StringBuffer StringBuffer toString
param counts return List protected static List find Root Nodes Map counts List result new Array List 5 for Iterator i counts key Set iterator i has Next Object node i next int count Integer counts get node int Value if count 0 result add node return result  findRootNodes ArrayList keySet hasNext intValue
Helper method to ensure an array is converted into an Array List param args return List public static Array List get Array List Object args We could be using Arrays as List here but it does not specify what kind of list it will return We do need a list that implements the method List remove int and Array List does Array List result new Array List args length for int i 0 i args length i result add args i return result  ArrayList ArrayList getArrayList asList ArrayList ArrayList ArrayList
Return a path which is equivalent to the given location relative to the specified base path param location the location to convert param base the base path return I Path public static I Path make Relative I Path location I Path base if location get Device null location get Device equals Ignore Case base get Device return location int base Count base segment Count int count base matching First Segments location String temp NON NLS 1 for int j 0 j base Count count j temp NON NLS 1 return new Path temp append location remove First Segments count  IPath IPath makeRelative IPath IPath getDevice getDevice equalsIgnoreCase getDevice baseCount segmentCount matchingFirstSegments baseCount removeFirstSegments
Transfers all available bytes from the given input stream to the given output stream Regardless of failure this method closes both streams param source param destination throws IO Exception public static void transfer Streams Input Stream source Output Stream destination throws IO Exception source new Buffered Input Stream source destination new Buffered Output Stream destination try byte buffer new byte 8192 while true int bytes Read 1 if bytes Read source read buffer 1 break destination write buffer 0 bytes Read finally try source close catch IO Exception e ignore try destination close catch IO Exception e ignore  IOException transferStreams InputStream OutputStream IOException BufferedInputStream BufferedOutputStream bytesRead bytesRead bytesRead IOException IOException
public static I Plugin Entry get Plugin Entry I Feature feature String plugin Id boolean raw I Plugin Entry plugins if raw plugins feature get Raw Plugin Entries else plugins feature get Plugin Entries List found Entries new Array List 5 for int i 0 i plugins length i if plugins i get Versioned Identifier get Identifier equals plugin Id found Entries add plugins i return I Plugin Entry found Entries to Array new I Plugin Entry found Entries size  IPluginEntry getPluginEntry IFeature pluginId IPluginEntry getRawPluginEntries getPluginEntries foundEntries ArrayList getVersionedIdentifier getIdentifier pluginId foundEntries IPluginEntry foundEntries toArray IPluginEntry foundEntries
if feature Directory Content i is Directory File feature Files feature Directory Content i list Files new Filename Filter public boolean accept File dir String name return name equals filename  featureDirectoryContent isDirectory featureFiles featureDirectoryContent listFiles FilenameFilter
Return a collection of File the result can be null public static Collection find Files String from String foldername final String filename if from is a file which name match filename then simply return the file File root new File from if root is File root get Name equals filename Collection coll new Array List 1 coll add root return coll String feature Directory from foldername NON NLS 1 Collection collected Elements new Array List 10 File feature Directory Content new File feature Directory list Files if feature Directory Content null return null for int i 0 i feature Directory Content length i if feature Directory Content i is Directory File feature Files feature Directory Content i list Files new Filename Filter public boolean accept File dir String name return name equals filename if feature Files length 0 collected Elements add feature Files 0 return collected Elements  findFiles isFile getName ArrayList featureDirectory collectedElements ArrayList featureDirectoryContent featureDirectory listFiles featureDirectoryContent featureDirectoryContent featureDirectoryContent isDirectory featureFiles featureDirectoryContent listFiles FilenameFilter featureFiles collectedElements featureFiles collectedElements
public static boolean is In I Plugin Entry array I Plugin Entry element for int i 0 i array length i if array i get Versioned Identifier equals element get Versioned Identifier return true return false  isIn IPluginEntry IPluginEntry getVersionedIdentifier getVersionedIdentifier
public static Collection copy Files String from Dir String to Dir throws Core Exception File template Location new File from Dir Collection copied Files new Array List if template Location exists File files template Location list Files if files null for int i 0 i files length i if files i is Directory continue File Input Stream input Stream null File Output Stream output Stream null try input Stream new File Input Stream files i catch File Not Found Exception e String message Policy bind exception missing File files i get Absolute Path NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION READING FILE message e String file To Copy to Dir files i get Name NON NLS 1 try output Stream new File Output Stream file To Copy catch File Not Found Exception e String message Policy bind exception missing File file To Copy NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION READING FILE message e try Utils transfer Streams input Stream output Stream copied Files add files i get Name catch IO Exception e String message Policy bind exception writing File file To Copy NON NLS 1 throw new Core Exception new Status I Status ERROR PI PDEBUILD EXCEPTION WRITING FILE message e return copied Files  copyFiles fromDir toDir CoreException templateLocation fromDir copiedFiles ArrayList templateLocation templateLocation listFiles isDirectory FileInputStream inputStream FileOutputStream outputStream inputStream FileInputStream FileNotFoundException missingFile getAbsolutePath CoreException IStatus PI_PDEBUILD EXCEPTION_READING_FILE fileToCopy toDir getName outputStream FileOutputStream fileToCopy FileNotFoundException missingFile fileToCopy CoreException IStatus PI_PDEBUILD EXCEPTION_READING_FILE transferStreams inputStream outputStream copiedFiles getName IOException writingFile fileToCopy CoreException IStatus PI_PDEBUILD EXCEPTION_WRITING_FILE copiedFiles
Object to Relation Object from Object to this from from this to to 
public String to String return from to String to null to to String NON NLS 1 NON NLS 2  toString toString toString
public static List extract Plugins List initial List List to Extract TODO This algorithm needs to be improved if initial List size to Extract size return initial List List result new Array List to Extract size for Iterator iter initial List iterator iter has Next Object element iter next if to Extract contains element result add element if result size to Extract size break return result  extractPlugins initialList toExtract initialList toExtract initialList ArrayList toExtract initialList hasNext toExtract toExtract
public static List compute Prerequisite Order List plugins List prereqs new Array List plugins size List fragments new Array List create a collection of directed edges from plugin to prereq for Iterator iter plugins iterator iter has Next Bundle Description current Bundle Description iter next if current get Host null fragments add current continue boolean found false Bundle Description prereq List PDE State get Dependent Bundles current for int j 0 j prereq List length j ensure that we only include values from the original set if plugins contains prereq List j found true prereqs add new Relation current prereq List j if we didn t find any prereqs for this plugin add a null prereq to ensure the value is in the output if found prereqs add new Relation current null The fragments needs to added relatively to their host and to their own prerequisite bug 43244 for Iterator iter fragments iterator iter has Next Bundle Description current Bundle Description iter next if plugins contains current get Host get Bundle prereqs add new Relation current current get Host get Supplier else Bundle Helper get Default get Log log new Status I Status WARNING IPDE Build Constants PI PDEBUILD EXCEPTION GENERIC Policy bind exception host Not Found current get Symbolic Name null NON NLS 1 Bundle Description prereq List PDE State get Dependent Bundles current for int j 0 j prereq List length j ensure that we only include values from the original set if plugins contains prereq List j prereqs add new Relation current prereq List j do a topological sort insert the fragments into the sorted elements return compute Node Order prereqs  computePrerequisiteOrder ArrayList ArrayList hasNext BundleDescription BundleDescription getHost BundleDescription prereqList PDEState getDependentBundles prereqList prereqList prereqList hasNext BundleDescription BundleDescription getHost getBundle getHost getSupplier BundleHelper getDefault getLog IStatus IPDEBuildConstants PI_PDEBUILD EXCEPTION_GENERIC hostNotFound getSymbolicName BundleDescription prereqList PDEState getDependentBundles prereqList prereqList prereqList computeNodeOrder
protected static List compute Node Order List edges Map counts compute Counts edges List nodes new Array List counts size while counts is Empty List roots find Root Nodes counts if roots is Empty break for Iterator i roots iterator i has Next counts remove i next nodes add All roots remove Arcs edges roots counts return nodes  computeNodeOrder computeCounts ArrayList isEmpty findRootNodes isEmpty hasNext addAll removeArcs
protected static Map compute Counts List mappings Map counts new Hash Map 5 for int i 0 i mappings size i Object from Relation mappings get i from Integer from Count Integer counts get from Object to Relation mappings get i to if to null counts put from new Integer 0 else if Integer counts get to null counts put to new Integer 0 from Count from Count null new Integer 1 new Integer from Count int Value 1 counts put from from Count return counts  computeCounts HashMap fromCount fromCount fromCount fromCount intValue fromCount
protected static void remove Arcs List edges List roots Map counts for Iterator j roots iterator j has Next Object root j next for int i 0 i edges size i if root equals Relation edges get i to Object input Relation edges get i from Integer count Integer counts get input if count null counts put input new Integer count int Value 1  removeArcs hasNext intValue
public static boolean is String In String searched String to Search for int i 0 i searched length i if to Search starts With searched i return true return false  isStringIn toSearch toSearch startsWith

public XML Writer Output Stream output throws Unsupported Encoding Exception super new Output Stream Writer output UTF8 NON NLS 1 tab 0 println XML VERSION  XMLWriter OutputStream UnsupportedEncodingException OutputStreamWriter XML_VERSION
public void end Tag String name tab print Tag name null  endTag printTag
public void print Simple Tag String name Object value if value null return print Tag name null true false false print get Escaped String value Of value print Tag name null false true false  printSimpleTag printTag getEscaped valueOf printTag
public void print Tabulation for int i 0 i tab i super print t  printTabulation
public void print Tag String name Map parameters print Tag name parameters true true false  printTag printTag
public void print Tag String name Map parameters boolean should Tab boolean new Line boolean close String Buffer sb new String Buffer sb append NON NLS 1 sb append name if parameters null for Enumeration enum Collections enumeration parameters key Set enum has More Elements sb append NON NLS 1 String key String enum next Element if parameters get key null sb append key sb append NON NLS 1 sb append get Escaped String value Of parameters get key sb append NON NLS 1 if close sb append NON NLS 1 else sb append NON NLS 1 if should Tab print Tabulation if new Line println sb to String else print sb to String  printTag shouldTab newLine StringBuffer StringBuffer keySet hasMoreElements nextElement getEscaped valueOf shouldTab printTabulation newLine toString toString
public void start Tag String name Map parameters start Tag name parameters true  startTag startTag
public void start Tag String name Map parameters boolean new Line print Tag name parameters true new Line false tab  startTag newLine printTag newLine
private static void append Escaped Char String Buffer buffer char c buffer append get Replacement c  appendEscapedChar StringBuffer getReplacement
public static String get Escaped String s String Buffer result new String Buffer s length 10 for int i 0 i s length i append Escaped Char result s char At i return result to String  getEscaped StringBuffer StringBuffer appendEscapedChar charAt toString
private static String get Replacement char c Encode special XML characters into the equivalent character references These five are defined by default for all XML documents switch c case return lt NON NLS 1 case return gt NON NLS 1 case return quot NON NLS 1 case return apos NON NLS 1 case return amp NON NLS 1 default return String value Of c  getReplacement valueOf

private long time Stamp public Abstract Model super listeners Collections synchronized List new Array List  timeStamp AbstractModel synchronizedList ArrayList
listeners Collections synchronized List new Array List public void add Model Changed Listener I Model Changed Listener listener listeners add listener  synchronizedList ArrayList addModelChangedListener IModelChangedListener
public void transfer Listeners To I Model Change Provider Extension target I Model Changed Listener Filter filter Array List removed new Array List for int i 0 i listeners size i I Model Changed Listener listener I Model Changed Listener listeners get i if filter null filter accept listener target add Model Changed Listener listener removed add listener listeners remove All removed  transferListenersTo IModelChangeProviderExtension IModelChangedListenerFilter ArrayList ArrayList IModelChangedListener IModelChangedListener addModelChangedListener removeAll
protected NL Resource Helper createNL Resource Helper return null  NLResourceHelper createNLResourceHelper
public void dispose if nl Helper null nl Helper dispose nl Helper null disposed true  nlHelper nlHelper nlHelper
public void fire Model Changed I Model Changed Event event I Model Changed Listener list I Model Changed Listener listeners to Array new I Model Changed Listener listeners size for int i 0 i list length i I Model Changed Listener listener list i listener model Changed event  fireModelChanged IModelChangedEvent IModelChangedListener IModelChangedListener toArray IModelChangedListener IModelChangedListener modelChanged
public void fire Model Object Changed Object object String property Object old Value Object new Value fire Model Changed new Model Changed Event this object property old Value new Value  fireModelObjectChanged oldValue newValue fireModelChanged ModelChangedEvent oldValue newValue
public String get Resource String String key if nl Helper null nl Helper createNL Resource Helper if nl Helper null return key if key null return NON NLS 1 return nl Helper get Resource String key  getResourceString nlHelper nlHelper createNLResourceHelper nlHelper nlHelper getResourceString
return nl Helper get Resource String key public I Resource get Underlying Resource return null  nlHelper getResourceString IResource getUnderlyingResource
protected boolean is In Sync File local File if local File exists return false if local File last Modified get Time Stamp return false return true return local File last Modified get Time Stamp  isInSync localFile localFile localFile lastModified getTimeStamp localFile lastModified getTimeStamp
public boolean is Valid return is Disposed is Loaded  isValid isDisposed isLoaded
public final long get Time Stamp return time Stamp  getTimeStamp timeStamp
protected abstract void update Time Stamp  updateTimeStamp
protected abstract void update Time Stamp protected void update Time Stamp File local File if local File exists this time Stamp local File last Modified  updateTimeStamp updateTimeStamp localFile localFile timeStamp localFile lastModified
public boolean is Disposed return disposed  isDisposed
return disposed public boolean is Loaded return loaded  isLoaded
public void set Loaded boolean loaded this loaded loaded  setLoaded
public void remove Model Changed Listener I Model Changed Listener listener listeners remove listener  removeModelChangedListener IModelChangedListener
public void throw Parse Errors Exception Throwable e throws Core Exception Status status new Status I Status ERROR PDE Core get Plugin Id I Status OK PDE Core get Resource String KEY ERROR e throw new Core Exception status  throwParseErrorsException CoreException IStatus PDECore getPluginId IStatus PDECore getResourceString KEY_ERROR CoreException
protected SAX Parser get Sax Parser throws Parser Configuration Exception SAX Exception Factory Configuration Error return SAX Parser Factory new Instance newSAX Parser  SAXParser getSaxParser ParserConfigurationException SAXException FactoryConfigurationError SAXParserFactory newInstance newSAXParser

class Binary Move Delete Hook implements I Move Delete Hook see org eclipse core resources team I Move Delete Hook delete File org eclipse core resources team I Resource Tree org eclipse core resources I File int org eclipse core runtime I Progress Monitor public boolean delete File I Resource Tree tree I File file int update Flags I Progress Monitor monitor if is Binary Resource file true tree failed create Problem Status else tree standard Delete File file update Flags monitor return true  BinaryMoveDeleteHook IMoveDeleteHook IMoveDeleteHook deleteFile IResourceTree IFile IProgressMonitor deleteFile IResourceTree IFile updateFlags IProgressMonitor isBinaryResource createProblemStatus standardDeleteFile updateFlags
see org eclipse core resources team I Move Delete Hook delete Folder org eclipse core resources team I Resource Tree org eclipse core resources I Folder int org eclipse core runtime I Progress Monitor public boolean delete Folder I Resource Tree tree I Folder folder int update Flags I Progress Monitor monitor if is Binary Resource folder true tree failed create Problem Status else tree standard Delete Folder folder update Flags monitor return true  IMoveDeleteHook deleteFolder IResourceTree IFolder IProgressMonitor deleteFolder IResourceTree IFolder updateFlags IProgressMonitor isBinaryResource createProblemStatus standardDeleteFolder updateFlags
see org eclipse core resources team I Move Delete Hook delete Project org eclipse core resources team I Resource Tree org eclipse core resources I Project int org eclipse core runtime I Progress Monitor public boolean delete Project I Resource Tree tree I Project project int update Flags I Progress Monitor monitor return false  IMoveDeleteHook deleteProject IResourceTree IProject IProgressMonitor deleteProject IResourceTree IProject updateFlags IProgressMonitor
see org eclipse core resources team I Move Delete Hook move File org eclipse core resources team I Resource Tree org eclipse core resources I File org eclipse core resources I File int org eclipse core runtime I Progress Monitor public boolean move File I Resource Tree tree I File source I File destination int update Flags I Progress Monitor monitor if is Binary Resource source false tree failed create Problem Status else tree standard Move File source destination update Flags monitor return true  IMoveDeleteHook moveFile IResourceTree IFile IFile IProgressMonitor moveFile IResourceTree IFile IFile updateFlags IProgressMonitor isBinaryResource createProblemStatus standardMoveFile updateFlags
see org eclipse core resources team I Move Delete Hook move Folder org eclipse core resources team I Resource Tree org eclipse core resources I Folder org eclipse core resources I Folder int org eclipse core runtime I Progress Monitor public boolean move Folder I Resource Tree tree I Folder source I Folder destination int update Flags I Progress Monitor monitor if is Binary Resource source false tree failed create Problem Status else tree standard Move Folder source destination update Flags monitor return true  IMoveDeleteHook moveFolder IResourceTree IFolder IFolder IProgressMonitor moveFolder IResourceTree IFolder IFolder updateFlags IProgressMonitor isBinaryResource createProblemStatus standardMoveFolder updateFlags
see org eclipse core resources team I Move Delete Hook move Project org eclipse core resources team I Resource Tree org eclipse core resources I Project org eclipse core resources I Project Description int org eclipse core runtime I Progress Monitor public boolean move Project I Resource Tree tree I Project source I Project Description description int update Flags I Progress Monitor monitor return false  IMoveDeleteHook moveProject IResourceTree IProject IProjectDescription IProgressMonitor moveProject IResourceTree IProject IProjectDescription updateFlags IProgressMonitor
implements I File Modification Validator see org eclipse core resources I File Modification Validator validate Edit org eclipse core resources I File java lang Object public I Status validate Edit I File files Object context for int i 0 i files length i if is Binary Resource files i false return create Problem Status return createOK Status  IFileModificationValidator IFileModificationValidator validateEdit IFile IStatus validateEdit IFile isBinaryResource createProblemStatus createOKStatus
see org eclipse core resources I File Modification Validator validate Save org eclipse core resources I File public I Status validate Save I File file if is Binary Resource file false return create Problem Status return createOK Status  IFileModificationValidator validateSave IFile IStatus validateSave IFile isBinaryResource createProblemStatus createOKStatus
public Binary Repository Provider move Delete Hook new Binary Move Delete Hook file Modification Validator new Binary File Modification Validator  BinaryRepositoryProvider moveDeleteHook BinaryMoveDeleteHook fileModificationValidator BinaryFileModificationValidator
see org eclipse team core Repository Provider configure Project public void configure Project throws Core Exception I Project project get Project project set Persistent Property PDE Core EXTERNAL PROJECT PROPERTY PDE Core EXTERNAL PROJECT VALUE  RepositoryProvider configureProject configureProject CoreException IProject getProject setPersistentProperty PDECore EXTERNAL_PROJECT_PROPERTY PDECore EXTERNAL_PROJECT_VALUE
see org eclipse core resources I Project Nature deconfigure public void deconfigure throws Core Exception I Project project get Project project set Persistent Property PDE Core EXTERNAL PROJECT PROPERTY null  IProjectNature CoreException IProject getProject setPersistentProperty PDECore EXTERNAL_PROJECT_PROPERTY
see org eclipse team core Repository Provider get File Modification Validator public I File Modification Validator get File Modification Validator return file Modification Validator  RepositoryProvider getFileModificationValidator IFileModificationValidator getFileModificationValidator fileModificationValidator
see org eclipse team core Repository Provider getID public String getID return PDE Core BINARY REPOSITORY PROVIDER  RepositoryProvider PDECore BINARY_REPOSITORY_PROVIDER
see org eclipse team core Repository Provider get Move Delete Hook public I Move Delete Hook get Move Delete Hook return move Delete Hook  RepositoryProvider getMoveDeleteHook IMoveDeleteHook getMoveDeleteHook moveDeleteHook
private boolean is Binary Resource I Resource resource boolean exclude Project Children I Container parent resource get Parent Test for resource links if exclude Project Children parent instanceof I Project if resource is Linked return true Test for resources that are in linked folders while parent instanceof I Folder I Folder folder I Folder parent if folder is Linked return true parent folder get Parent return false  isBinaryResource IResource excludeProjectChildren IContainer getParent excludeProjectChildren IProject isLinked IFolder IFolder IFolder isLinked getParent
private I Status create Problem Status String message PDE Core get Resource String Binary Repository Provider veto NON NLS 1 return new Status I Status ERROR PDE Core PLUGIN ID I Status OK message null  IStatus createProblemStatus PDECore getResourceString BinaryRepositoryProvider IStatus PDECore PLUGIN_ID IStatus
private I Status createOK Status return new Status I Status OK PDE Core PLUGIN ID I Status OK NON NLS 1 null  IStatus createOKStatus IStatus PDECore PLUGIN_ID IStatus
public boolean can Handle Linked Resources return true  canHandleLinkedResources

protected Vector entries new Vector public Build 
public void add I Build Entry entry throws Core Exception ensure Model Editable entries add entry Build Entry entry set In The Model true get Model fire Model Changed new Model Changed Event get Model I Model Changed Event INSERT new Object entry null  IBuildEntry CoreException ensureModelEditable BuildEntry setInTheModel getModel fireModelChanged ModelChangedEvent getModel IModelChangedEvent
public I Build Entry get Build Entries I Build Entry result new I Build Entry entries size entries copy Into result return result  IBuildEntry getBuildEntries IBuildEntry IBuildEntry copyInto
public I Build Entry get Entry String name for int i 0 i entries size i I Build Entry entry I Build Entry entries element At i if entry get Name equals name return entry return null  IBuildEntry getEntry IBuildEntry IBuildEntry elementAt getName
public void process Entry String name String value Build Entry entry Build Entry get Model get Factory create Entry name entries add entry entry process Entry value  processEntry BuildEntry BuildEntry getModel getFactory createEntry processEntry
public void remove I Build Entry entry throws Core Exception ensure Model Editable entries remove entry get Model fire Model Changed new Model Changed Event get Model I Model Changed Event REMOVE new Object entry null  IBuildEntry CoreException ensureModelEditable getModel fireModelChanged ModelChangedEvent getModel IModelChangedEvent
new Model Changed Event get Model I Model Changed Event REMOVE new Object entry null public void reset entries clear  ModelChangedEvent getModel IModelChangedEvent
public void write String indent Print Writer writer for int i 0 i entries size i I Build Entry entry I Build Entry entries element At i entry write writer NON NLS 1  PrintWriter IBuildEntry IBuildEntry elementAt

private Vector tokens new Vector private String name public Build Entry String name this name name  BuildEntry
public void add Token String token throws Core Exception ensure Model Editable tokens add token get Model fire Model Changed new Model Changed Event get Model I Model Changed Event INSERT new Object token null  addToken CoreException ensureModelEditable getModel fireModelChanged ModelChangedEvent getModel IModelChangedEvent
new Object token null public String get Name return name  getName
public String get Tokens String result new String tokens size tokens copy Into result return result  getTokens copyInto
return result public boolean contains String token return tokens contains token 
void process Entry String value String Tokenizer stok new String Tokenizer value NON NLS 1 while stok has More Tokens String token stok next Token token token trim tokens add token  processEntry StringTokenizer StringTokenizer hasMoreTokens nextToken
public void remove Token String token throws Core Exception ensure Model Editable tokens remove token get Model fire Model Changed new Model Changed Event get Model I Model Changed Event REMOVE new Object token null  removeToken CoreException ensureModelEditable getModel fireModelChanged ModelChangedEvent getModel IModelChangedEvent
public void rename Token String old Name String new Name throws Core Exception ensure Model Editable for int i 0 i tokens size i if tokens element At i to String equals old Name tokens set Element At new Name i break get Model fire Model Changed new Model Changed Event get Model I Model Changed Event CHANGE new Object old Name null  renameToken oldName newName CoreException ensureModelEditable elementAt toString oldName setElementAt newName getModel fireModelChanged ModelChangedEvent getModel IModelChangedEvent oldName
public void set Name String name throws Core Exception ensure Model Editable String old Value this name this name name get Model fire Model Object Changed this P NAME old Value name  setName CoreException ensureModelEditable oldValue getModel fireModelObjectChanged P_NAME oldValue
get Model fire Model Object Changed this P NAME old Value name public String to String return name  getModel fireModelObjectChanged P_NAME oldValue toString
return name public void write String indent Print Writer writer Properties Util write Key Value Pair indent name tokens elements writer  PrintWriter PropertiesUtil writeKeyValuePair
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P NAME set Name new Value null new Value to String null  restoreProperty oldValue newValue CoreException P_NAME setName newValue newValue toString

public I Build get Build if is Loaded false load return build  IBuild getBuild isLoaded
public I Build get Build boolean create If Missing if build null create If Missing build new Build build set Model this loaded true return get Build  IBuild getBuild createIfMissing createIfMissing setModel getBuild
public I Build Model Factory get Factory if factory null factory new Build Model Factory this return factory  IBuildModelFactory getFactory BuildModelFactory
return factory public String get Install Location return null  getInstallLocation
return null public boolean is Fragment return fragment  isFragment
return fragment public abstract void load 
public abstract void load public void load Input Stream source boolean out Of Sync Properties properties new Properties try properties load source if out Of Sync update Time Stamp catch IO Exception e PDE Core log Exception e return build new Build build set Model this for Enumeration names properties property Names names has More Elements String name names next Element to String build process Entry name String properties get name loaded true  InputStream outOfSync outOfSync updateTimeStamp IOException PDECore logException setModel propertyNames hasMoreElements nextElement toString processEntry
public void reload Input Stream source boolean out Of Sync if build null build reset else build new Build build set Model this load source out Of Sync fire Model Changed new Model Changed Event this I Model Changed Event WORLD CHANGED new Object 0 null  InputStream outOfSync setModel outOfSync fireModelChanged ModelChangedEvent IModelChangedEvent WORLD_CHANGED
null public void set Fragment boolean value fragment value  setFragment
fragment value public boolean is Reconciling Model return false  isReconcilingModel

private I Build Model model public Build Model Factory I Build Model model this model model  IBuildModel BuildModelFactory IBuildModel
public I Build Entry create Entry String name Build Entry entry new Build Entry name entry set Model model return entry  IBuildEntry createEntry BuildEntry BuildEntry setModel

private boolean in The Model public Build Object  inTheModel BuildObject
public boolean is In The Model return in The Model  isInTheModel inTheModel
return in The Model public void set In The Model boolean in The Model this in The Model in The Model  inTheModel setInTheModel inTheModel inTheModel inTheModel
protected void ensure Model Editable throws Core Exception if model is Editable throw Core Exception PDE Core get Resource String Build Object read Only Exception NON NLS 1  ensureModelEditable CoreException isEditable throwCoreException PDECore getResourceString BuildObject readOnlyException
public I Build Model get Model return model  IBuildModel getModel
return model void set Model I Build Model new Model model new Model  setModel IBuildModel newModel newModel
protected void throw Core Exception String message throws Core Exception Status status new Status I Status ERROR PDE Core get Plugin Id I Status OK message null throw new Core Exception status  throwCoreException CoreException IStatus PDECore getPluginId IStatus CoreException
throw new Core Exception status public void restore Property String name Object old Value Object new Value throws Core Exception  CoreException restoreProperty oldValue newValue CoreException

private String install Location public External Build Model String install Location this install Location install Location  installLocation ExternalBuildModel installLocation installLocation installLocation
this install Location install Location public String get Install Location return install Location  installLocation installLocation getInstallLocation installLocation
return install Location public boolean is Editable return false  installLocation isEditable
public void load String location get Full Path try URL url new URL location Input Stream stream url open Stream load stream false stream close catch IO Exception e build new Build build set Model this loaded true  getFullPath InputStream openStream IOException setModel
protected void update Time Stamp File file new File get Full Path update Time Stamp file  updateTimeStamp getFullPath updateTimeStamp
private String get Full Path String file Name build properties NON NLS 1 return get Install Location File separator file Name  getFullPath fileName getInstallLocation fileName
public boolean is In Sync File file new File get Full Path return is In Sync file  isInSync getFullPath isInSync
public void set Install Location String new Install Location install Location new Install Location  setInstallLocation newInstallLocation installLocation newInstallLocation

public interface I Build Object boolean is In The Model  IBuildObject isInTheModel
public interface I Build Object boolean is In The Model void set In The Model boolean in The Model  IBuildObject isInTheModel setInTheModel inTheModel

private boolean editable true public Workspace Build Model I File file set File file  WorkspaceBuildModel IFile setFile
set File file public void fire Model Changed I Model Changed Event event set Dirty event get Change Type I Model Changed Event WORLD CHANGED super fire Model Changed event  setFile fireModelChanged IModelChangedEvent setDirty getChangeType IModelChangedEvent WORLD_CHANGED fireModelChanged
public String get Contents String Writer swriter new String Writer Print Writer writer new Print Writer swriter save writer writer flush try swriter close catch IO Exception e return swriter to String  getContents StringWriter StringWriter PrintWriter PrintWriter IOException toString
return swriter to String public I File get File return file  toString IFile getFile
return file public I Resource get Underlying Resource return file  IResource getUnderlyingResource
return file public boolean is Dirty return dirty  isDirty
return dirty public boolean is Editable return editable  isEditable
public void load if file null return if file exists Input Stream stream null boolean out Of Sync false try stream file get Contents false catch Core Exception e out Of Sync true if out Of Sync try stream file get Contents true catch Core Exception e return try load stream out Of Sync stream close catch IO Exception e PDE Core log Exception e else build new Build build set Model this loaded true  InputStream outOfSync getContents CoreException outOfSync outOfSync getContents CoreException outOfSync IOException PDECore logException setModel
public boolean is In Sync return is In Sync file get Location to File  isInSync isInSync getLocation toFile
protected void update Time Stamp update Time Stamp file get Location to File  updateTimeStamp updateTimeStamp getLocation toFile
public void save if file null return try String contents get Contents Byte Array Input Stream stream new Byte Array Input Stream contents get Bytes 8859 1 NON NLS 1 if file exists file set Contents stream false false null else file create stream false null stream close catch Core Exception e PDE Core log Exception e catch IO Exception e  getContents ByteArrayInputStream ByteArrayInputStream getBytes 8859_1 setContents CoreException PDECore logException IOException
public void save Print Writer writer get Build write writer NON NLS 1 dirty false  PrintWriter getBuild
dirty false public void set Dirty boolean new Dirty dirty new Dirty  setDirty newDirty newDirty
dirty new Dirty public void set Editable boolean new Editable editable new Editable  newDirty setEditable newEditable newEditable
editable new Editable public void set File I File new File file new File set Editable file is Read Only false  newEditable setFile IFile newFile newFile setEditable isReadOnly

public void set Header String key String value Object old Value f Properties get key if value null value trim length 0 f Properties remove key else f Properties put key value get Model fire Model Object Changed this key old Value value  setHeader oldValue fProperties fProperties fProperties getModel fireModelObjectChanged oldValue
see org eclipse pde internal core ibundle I Bundle get Header java lang String public String get Header String key return String f Properties get key  IBundle getHeader getHeader fProperties
public void load Properties properties f Properties properties  fProperties

public class Bundle Fragment extends Bundle Plugin Base implements I Bundle Fragment public String get Plugin Id return parse Single Valued Header Constants FRAGMENT HOST  BundleFragment BundlePluginBase IBundleFragment getPluginId parseSingleValuedHeader FRAGMENT_HOST
public String get Plugin Version String version get Attribute Constants FRAGMENT HOST Constants BUNDLE VERSION ATTRIBUTE Version Range version Range new Version Range version if version Range null return version Range get Minimum null version Range get Minimum to String version return version  getPluginVersion getAttribute FRAGMENT_HOST BUNDLE_VERSION_ATTRIBUTE VersionRange versionRange VersionRange versionRange versionRange getMinimum versionRange getMinimum toString
public int get Rule String version get Attribute Constants FRAGMENT HOST Constants BUNDLE VERSION ATTRIBUTE Version Range version Range new Version Range version return Plugin Base get Match Rule version Range  getRule getAttribute FRAGMENT_HOST BUNDLE_VERSION_ATTRIBUTE VersionRange versionRange VersionRange PluginBase getMatchRule versionRange
public void set Plugin Id String id throws Core Exception I Bundle bundle get Bundle if bundle null String old Value get Plugin Id bundle set Header Constants FRAGMENT HOST write Fragment Host id get Plugin Version model fire Model Object Changed this P PLUGIN ID old Value id  setPluginId CoreException IBundle getBundle oldValue getPluginId setHeader FRAGMENT_HOST writeFragmentHost getPluginVersion fireModelObjectChanged P_PLUGIN_ID oldValue
public void set Plugin Version String version throws Core Exception I Bundle bundle get Bundle if bundle null String old Value get Plugin Version bundle set Header Constants FRAGMENT HOST write Fragment Host get Plugin Id version model fire Model Object Changed this P PLUGIN VERSION old Value version  setPluginVersion CoreException IBundle getBundle oldValue getPluginVersion setHeader FRAGMENT_HOST writeFragmentHost getPluginId fireModelObjectChanged P_PLUGIN_VERSION oldValue
see org eclipse pde core plugin I Fragment set Rule int public void set Rule int rule throws Core Exception  IFragment setRule setRule CoreException
private String write Fragment Host String id String version String Buffer buffer new String Buffer if id null buffer append id if version null version trim length 0 buffer append Constants BUNDLE VERSION ATTRIBUTE version trim NON NLS 1 NON NLS 2 NON NLS 3 return buffer to String  writeFragmentHost StringBuffer StringBuffer BUNDLE_VERSION_ATTRIBUTE toString

public I Plugin Base create Plugin Base Bundle Fragment bfragment new Bundle Fragment bfragment set Model this return bfragment  IPluginBase createPluginBase BundleFragment BundleFragment setModel
see org eclipse pde core plugin I Fragment Model get Fragment public I Fragment get Fragment return I Fragment get Plugin Base  IFragmentModel getFragment IFragment getFragment IFragment getPluginBase
see org eclipse pde core plugin I Plugin Model Base is Fragment Model public boolean is Fragment Model return true  IPluginModelBase isFragmentModel isFragmentModel

private Bundle f Bundle public Bundle Model f Bundle new Bundle f Bundle set Model this  fBundle BundleModel fBundle fBundle setModel
public I Bundle get Bundle if is Loaded load return f Bundle  IBundle getBundle isLoaded fBundle
public String get Install Location return null  getInstallLocation
public abstract void load 
public abstract void load public boolean is Fragment Model return f Bundle get Header Constants FRAGMENT HOST null  isFragmentModel fBundle getHeader FRAGMENT_HOST
public void load Input Stream source boolean out Of Sync try Manifest m new Manifest source f Bundle load manifest To Properties m get Main Attributes if out Of Sync update Time Stamp catch IO Exception e finally  InputStream outOfSync fBundle manifestToProperties getMainAttributes outOfSync updateTimeStamp IOException
private Properties manifest To Properties Attributes d Iterator iter d key Set iterator Properties result new Properties while iter has Next Attributes Name key Attributes Name iter next result put key to String d get key return result  manifestToProperties keySet hasNext toString
public void reload Input Stream source boolean out Of Sync load source out Of Sync fire Model Changed new Model Changed Event this I Model Changed Event WORLD CHANGED new Object 0 null  InputStream outOfSync outOfSync fireModelChanged ModelChangedEvent IModelChangedEvent WORLD_CHANGED
see org eclipse pde core I Model is Reconciling Model public boolean is Reconciling Model return false  IModel isReconcilingModel isReconcilingModel

private I Bundle Model model public Bundle Object  IBundleModel BundleObject
protected void ensure Model Editable throws Core Exception if model is Editable throw Core Exception PDE Core get Resource String Bundle Object read Only Exception NON NLS 1  ensureModelEditable CoreException isEditable throwCoreException PDECore getResourceString BundleObject readOnlyException
public I Bundle Model get Model return model  IBundleModel getModel
return model public void set Model I Bundle Model new Model model new Model  setModel IBundleModel newModel newModel
protected void throw Core Exception String message throws Core Exception Status status new Status I Status ERROR PDE Core get Plugin Id I Status OK message null throw new Core Exception status  throwCoreException CoreException IStatus PDECore getPluginId IStatus CoreException

see org eclipse pde core plugin I Plugin get Class Name public String get Class Name return parse Single Valued Header get Class Header  IPlugin getClassName getClassName parseSingleValuedHeader getClassHeader
public void set Class Name String class Name throws Core Exception I Bundle bundle get Bundle if bundle null String old get Class Name bundle set Header get Class Header class Name model fire Model Object Changed this P CLASS NAME old class Name  setClassName className CoreException IBundle getBundle getClassName setHeader getClassHeader className fireModelObjectChanged P_CLASS_NAME className
private String get Class Header boolean compatibility Mode false I Plugin Import imports get Imports for int i 0 i imports length i I Plugin Import iimport imports i String id iimport get Id if id equals org eclipse core runtime compatibility NON NLS 1 compatibility Mode true break return compatibility Mode Plugin Class Constants BUNDLE ACTIVATOR NON NLS 1  getClassHeader compatibilityMode IPluginImport getImports IPluginImport getId compatibilityMode compatibilityMode BUNDLE_ACTIVATOR

private Array List imports public void reset libraries null imports null  ArrayList
public String get Schema Version return 3 0 NON NLS 1  getSchemaVersion
public void set Schema Version String value throws Core Exception  setSchemaVersion CoreException
public void model Changed I Model Changed Event event if event get Change Type Model Changed Event WORLD CHANGED if event get Change Provider equals model get Bundle Model reset get Model fire Model Changed event else if event get Change Provider equals model get Bundle Model get Model fire Model Changed event  modelChanged IModelChangedEvent getChangeType ModelChangedEvent WORLD_CHANGED getChangeProvider getBundleModel getModel fireModelChanged getChangeProvider getBundleModel getModel fireModelChanged
public I Bundle get Bundle if model null I Bundle Model bmodel model get Bundle Model return bmodel null bmodel get Bundle null return null  IBundle getBundle IBundleModel getBundleModel getBundle
public I Shared Plugin Model get Model return model  ISharedPluginModel getModel
void set Model I Bundle Plugin Model Base model this model model  setModel IBundlePluginModelBase
public I Extensions get Extensions Root if model null I Shared Extensions Model emodel model get Extensions Model return emodel null emodel get Extensions null return null  IExtensions getExtensionsRoot ISharedExtensionsModel getExtensionsModel getExtensions
public void add I Plugin Library library throws Core Exception if libraries null libraries add library I Bundle bundle get Bundle if bundle null bundle set Header Constants BUNDLE CLASSPATH write Libraries fire Structure Changed library true  IPluginLibrary CoreException IBundle getBundle setHeader BUNDLE_CLASSPATH writeLibraries fireStructureChanged
public void remove I Plugin Library library throws Core Exception if libraries null libraries remove library I Bundle bundle get Bundle if bundle null bundle set Header Constants BUNDLE CLASSPATH write Libraries fire Structure Changed library false  IPluginLibrary CoreException IBundle getBundle setHeader BUNDLE_CLASSPATH writeLibraries fireStructureChanged
private String write Libraries String Buffer buffer new String Buffer if libraries null for int i 0 i libraries size i I Plugin Library library I Plugin Library libraries get i buffer append library get Name if i libraries size 1 buffer append NON NLS 1 return buffer to String  writeLibraries StringBuffer StringBuffer IPluginLibrary IPluginLibrary getName toString
public void add I Plugin Import plugin Import throws Core Exception if imports null imports add plugin Import update Imports fire Structure Changed plugin Import true  IPluginImport pluginImport CoreException pluginImport updateImports fireStructureChanged pluginImport
private String write Imports String Buffer buffer new String Buffer if imports null for int i 0 i imports size i I Plugin Import iimport I Plugin Import imports get i buffer append iimport get Id if iimport is Optional buffer append Constants OPTIONAL ATTRIBUTE true NON NLS 1 NON NLS 2 if iimport is Reexported buffer append Constants REPROVIDE ATTRIBUTE true NON NLS 1 NON NLS 2 String version iimport get Version if version null version trim length 0 buffer append Constants BUNDLE VERSION ATTRIBUTE version trim NON NLS 1 NON NLS 2 NON NLS 3 if i imports size 1 buffer append System get Property line separator NON NLS 1 NON NLS 2 NON NLS 3 return buffer to String  writeImports StringBuffer StringBuffer IPluginImport IPluginImport getId isOptional OPTIONAL_ATTRIBUTE isReexported REPROVIDE_ATTRIBUTE getVersion BUNDLE_VERSION_ATTRIBUTE getProperty toString
public void remove I Plugin Import plugin Import throws Core Exception if imports null imports remove plugin Import update Imports fire Structure Changed plugin Import false  IPluginImport pluginImport CoreException pluginImport updateImports fireStructureChanged pluginImport
public I Plugin Library get Libraries I Bundle bundle get Bundle if bundle null return new I Plugin Library 0 if libraries null libraries new Array List String value bundle get Header Constants BUNDLE CLASSPATH if value null try Manifest Element elements Manifest Element parse Header Constants BUNDLE CLASSPATH value for int i 0 i elements length i Plugin Library library new Plugin Library library set Model get Model library set In The Model true library set Parent this library load elements i get Value libraries add library catch Bundle Exception e return I Plugin Library libraries to Array new I Plugin Library libraries size  IPluginLibrary getLibraries IBundle getBundle IPluginLibrary ArrayList getHeader BUNDLE_CLASSPATH ManifestElement ManifestElement parseHeader BUNDLE_CLASSPATH PluginLibrary PluginLibrary setModel getModel setInTheModel setParent getValue BundleException IPluginLibrary toArray IPluginLibrary
public I Plugin Import get Imports if imports null imports new Array List Bundle Description description model get Bundle Description if description null Bundle Specification required description get Required Bundles for int i 0 i required length i Plugin Import import Element new Plugin Import import Element set Model get Model import Element set In The Model true import Element set Parent this imports add import Element import Element load required i Bundle Description imported PDE State Helper get Imported Bundles description for int i 0 i imported length i Plugin Import import Element new Plugin Import import Element set Model get Model import Element set In The Model true import Element set Parent this imports add import Element import Element load imported i else I Bundle bundle get Bundle if bundle null try String value bundle get Header Constants REQUIRE BUNDLE if value null Manifest Element elements Manifest Element parse Header Constants REQUIRE BUNDLE value for int i 0 i elements length i Plugin Import import Element new Plugin Import import Element set Model get Model import Element set In The Model true import Element set Parent this imports add import Element import Element load elements i catch Bundle Exception e return I Plugin Import imports to Array new I Plugin Import imports size  IPluginImport getImports ArrayList BundleDescription getBundleDescription BundleSpecification getRequiredBundles PluginImport importElement PluginImport importElement setModel getModel importElement setInTheModel importElement setParent importElement importElement BundleDescription PDEStateHelper getImportedBundles PluginImport importElement PluginImport importElement setModel getModel importElement setInTheModel importElement setParent importElement importElement IBundle getBundle getHeader REQUIRE_BUNDLE ManifestElement ManifestElement parseHeader REQUIRE_BUNDLE PluginImport importElement PluginImport importElement setModel getModel importElement setInTheModel importElement setParent importElement importElement BundleException IPluginImport toArray IPluginImport
see org eclipse pde core plugin I Plugin Base get Provider Name public String get Provider Name return parse Single Valued Header Constants BUNDLE VENDOR  IPluginBase getProviderName getProviderName parseSingleValuedHeader BUNDLE_VENDOR
protected String parse Single Valued Header String header I Bundle bundle get Bundle if bundle null return null String value bundle get Header header if value null return null try Manifest Element elements Manifest Element parse Header header value if elements length 0 return elements 0 get Value catch Bundle Exception e return null  parseSingleValuedHeader IBundle getBundle getHeader ManifestElement ManifestElement parseHeader getValue BundleException
protected String get Attribute String header String attribute I Bundle bundle get Bundle if bundle null return null String value bundle get Header header if value null return null try Manifest Element elements Manifest Element parse Header header value if elements length 0 return elements 0 get Attribute attribute catch Bundle Exception e return null  getAttribute IBundle getBundle getHeader ManifestElement ManifestElement parseHeader getAttribute BundleException
public void set Provider Name String provider Name throws Core Exception I Bundle bundle get Bundle if bundle null String old get Provider Name bundle set Header Constants BUNDLE VENDOR provider Name model fire Model Object Changed this I Plugin Base P PROVIDER old provider Name  setProviderName providerName CoreException IBundle getBundle getProviderName setHeader BUNDLE_VENDOR providerName fireModelObjectChanged IPluginBase P_PROVIDER providerName
public String get Version Bundle Description desc model get Bundle Description if desc null Version version desc get Version if version null return version to String else return null return parse Single Valued Header Constants BUNDLE VERSION  getVersion BundleDescription getBundleDescription getVersion toString parseSingleValuedHeader BUNDLE_VERSION
public void set Version String version throws Core Exception I Bundle bundle get Bundle if bundle null String old get Version bundle set Header Constants BUNDLE VERSION version model fire Model Object Changed this I Plugin Base P VERSION old version  setVersion CoreException IBundle getBundle getVersion setHeader BUNDLE_VERSION fireModelObjectChanged IPluginBase P_VERSION
public void swap I Plugin Library l1 I Plugin Library l2 throws Core Exception if libraries null int index1 libraries index Of l1 int index2 libraries index Of l2 libraries set index1 l2 libraries set index2 l1 I Bundle bundle get Bundle if bundle null bundle set Header Constants BUNDLE CLASSPATH write Libraries model fire Model Object Changed this P IMPORT ORDER l1 l2  IPluginLibrary IPluginLibrary CoreException indexOf indexOf IBundle getBundle setHeader BUNDLE_CLASSPATH writeLibraries fireModelObjectChanged P_IMPORT_ORDER
protected void fire Structure Changed Object object boolean added int type added I Model Changed Event INSERT I Model Changed Event REMOVE model fire Model Changed new Model Changed Event model type new Object object null  fireStructureChanged IModelChangedEvent IModelChangedEvent fireModelChanged ModelChangedEvent
public void add I Plugin Extension extension throws Core Exception I Extensions extensions get Extensions Root if extensions null return extensions add extension  IPluginExtension CoreException IExtensions getExtensionsRoot
public void add I Plugin Extension Point point throws Core Exception I Extensions extensions get Extensions Root if extensions null return extensions add point  IPluginExtensionPoint CoreException IExtensions getExtensionsRoot
public I Plugin Extension Point get Extension Points I Extensions extensions get Extensions Root if extensions null return new I Plugin Extension Point 0 return extensions get Extension Points  IPluginExtensionPoint getExtensionPoints IExtensions getExtensionsRoot IPluginExtensionPoint getExtensionPoints
public I Plugin Extension get Extensions I Extensions extensions get Extensions Root if extensions null return new I Plugin Extension 0 return extensions get Extensions  IPluginExtension getExtensions IExtensions getExtensionsRoot IPluginExtension getExtensions
public int get Index Of I Plugin Extension e I Extensions extensions get Extensions Root if extensions null return 1 return extensions get Index Of e  getIndexOf IPluginExtension IExtensions getExtensionsRoot getIndexOf
public void remove I Plugin Extension extension throws Core Exception I Extensions extensions get Extensions Root if extensions null extensions remove extension  IPluginExtension CoreException IExtensions getExtensionsRoot
public void remove I Plugin Extension Point extension Point throws Core Exception I Extensions extensions get Extensions Root if extensions null extensions remove extension Point  IPluginExtensionPoint extensionPoint CoreException IExtensions getExtensionsRoot extensionPoint
public void swap I Plugin Extension e1 I Plugin Extension e2 throws Core Exception I Extensions extensions get Extensions Root if extensions null extensions swap e1 e2  IPluginExtension IPluginExtension CoreException IExtensions getExtensionsRoot
public void swap I Plugin Import import1 I Plugin Import import2 throws Core Exception if imports null int index1 imports index Of import1 int index2 imports index Of import2 imports set index1 import2 imports set index2 import1 update Imports model fire Model Object Changed this P IMPORT ORDER import1 import2  IPluginImport IPluginImport CoreException indexOf indexOf updateImports fireModelObjectChanged P_IMPORT_ORDER
public String get Id Bundle Description desc model get Bundle Description if desc null return desc get Symbolic Name return parse Single Valued Header Constants BUNDLE SYMBOLICNAME  getId BundleDescription getBundleDescription getSymbolicName parseSingleValuedHeader BUNDLE_SYMBOLICNAME
public void set Id String id throws Core Exception I Bundle bundle get Bundle if bundle null String old get Id String Buffer buffer new String Buffer id String singleton get Attribute Constants BUNDLE SYMBOLICNAME Constants SINGLETON ATTRIBUTE if singleton null singleton trim length 0 buffer append Constants SINGLETON ATTRIBUTE singleton trim NON NLS 1 NON NLS 2 bundle set Header Constants BUNDLE SYMBOLICNAME buffer to String model fire Model Object Changed this I Plugin Base P ID old id  setId CoreException IBundle getBundle getId StringBuffer StringBuffer getAttribute BUNDLE_SYMBOLICNAME SINGLETON_ATTRIBUTE SINGLETON_ATTRIBUTE setHeader BUNDLE_SYMBOLICNAME toString fireModelObjectChanged IPluginBase P_ID
see org eclipse pde core plugin I Plugin Object get Plugin Model public I Plugin Model Base get Plugin Model return model  IPluginObject getPluginModel IPluginModelBase getPluginModel
see org eclipse pde core plugin I Plugin Object get Name public String get Name return parse Single Valued Header Constants BUNDLE NAME  IPluginObject getName getName parseSingleValuedHeader BUNDLE_NAME
public void set Name String name throws Core Exception I Bundle bundle get Bundle if bundle null String old get Name bundle set Header Constants BUNDLE NAME name model fire Model Object Changed this I Plugin Base P NAME old name  setName CoreException IBundle getBundle getName setHeader BUNDLE_NAME fireModelObjectChanged IPluginBase P_NAME
public void update Imports I Bundle bundle get Bundle if bundle null bundle set Header Constants REQUIRE BUNDLE write Imports  updateImports IBundle getBundle setHeader REQUIRE_BUNDLE writeImports
public void update Libraries I Bundle bundle get Bundle if bundle null bundle set Header Constants BUNDLE CLASSPATH write Libraries  updateLibraries IBundle getBundle setHeader BUNDLE_CLASSPATH writeLibraries
see org eclipse pde core plugin I Plugin Object is In The Model public boolean is In The Model return model null  IPluginObject isInTheModel isInTheModel
see org eclipse pde core plugin I Plugin Object get Translated Name public String get Translated Name return get Name  IPluginObject getTranslatedName getTranslatedName getName
see org eclipse pde core plugin I Plugin Object get Parent public I Plugin Object get Parent return null  IPluginObject getParent IPluginObject getParent
see org eclipse pde core plugin I Plugin Object get Plugin Base public I Plugin Base get Plugin Base return this  IPluginObject getPluginBase IPluginBase getPluginBase
see org eclipse pde core plugin I Plugin Object get Resource String java lang String public String get Resource String String key return key  IPluginObject getResourceString getResourceString
public boolean is Valid I Extensions extensions get Extensions Root return get Bundle null get Bundle get Header Constants BUNDLE SYMBOLICNAME null extensions null extensions is Valid  isValid IExtensions getExtensionsRoot getBundle getBundle getHeader BUNDLE_SYMBOLICNAME isValid
java io Print Writer public void write String indent Print Writer writer  PrintWriter PrintWriter
see org eclipse pde core plugin I Plugin Object set In The Model boolean public void set In The Model boolean in Model  IPluginObject setInTheModel setInTheModel inModel

public I Plugin Base create Plugin Base Bundle Plugin bplugin new Bundle Plugin bplugin set Model this return bplugin  IPluginBase createPluginBase BundlePlugin BundlePlugin setModel
see org eclipse pde core plugin I Plugin Model get Plugin public I Plugin get Plugin return I Plugin get Plugin Base  IPluginModel getPlugin IPlugin getPlugin IPlugin getPluginBase
see org eclipse pde core plugin I Plugin Model Base is Fragment Model public boolean is Fragment Model return false  IPluginModelBase isFragmentModel isFragmentModel

private Bundle Description f Bundle Description private boolean enabled public Bundle Plugin Model Base get Plugin Base  BundleDescription fBundleDescription BundlePluginModelBase getPluginBase
see org eclipse pde internal core ibundle I Bundle Plugin Model Base get Bundle Model public I Bundle Model get Bundle Model return f Bundle Model  IBundlePluginModelBase getBundleModel IBundleModel getBundleModel fBundleModel
return f Bundle Model public I Resource get Underlying Resource return f Bundle Model get Underlying Resource  fBundleModel IResource getUnderlyingResource fBundleModel getUnderlyingResource
see org eclipse pde internal core ibundle I Bundle Plugin Model Base get Extensions Model public I Shared Extensions Model get Extensions Model return f Extensions Model  IBundlePluginModelBase getExtensionsModel ISharedExtensionsModel getExtensionsModel fExtensionsModel
public void dispose if f Bundle Model null if f Bundle Plugin Base null f Bundle Model remove Model Changed Listener f Bundle Plugin Base f Bundle Model dispose f Bundle Model null if f Extensions Model null if f Bundle Plugin Base null f Extensions Model remove Model Changed Listener f Bundle Plugin Base f Extensions Model dispose f Extensions Model null super dispose  fBundleModel fBundlePluginBase fBundleModel removeModelChangedListener fBundlePluginBase fBundleModel fBundleModel fExtensionsModel fBundlePluginBase fExtensionsModel removeModelChangedListener fBundlePluginBase fExtensionsModel fExtensionsModel
public void save if f Bundle Model null f Bundle Model instanceof I Editable Model I Editable Model emodel I Editable Model f Bundle Model if emodel is Dirty emodel save if f Extensions Model null f Extensions Model instanceof I Editable Model I Editable Model emodel I Editable Model f Extensions Model if emodel is Dirty emodel save  fBundleModel fBundleModel IEditableModel IEditableModel IEditableModel fBundleModel isDirty fExtensionsModel fExtensionsModel IEditableModel IEditableModel IEditableModel fExtensionsModel isDirty
public void set Bundle Model I Bundle Model bundle Model if f Bundle Model null f Bundle Plugin Base null f Bundle Model remove Model Changed Listener f Bundle Plugin Base f Bundle Model bundle Model if f Bundle Model null f Bundle Plugin Base null bundle Model add Model Changed Listener f Bundle Plugin Base  setBundleModel IBundleModel bundleModel fBundleModel fBundlePluginBase fBundleModel removeModelChangedListener fBundlePluginBase fBundleModel bundleModel fBundleModel fBundlePluginBase bundleModel addModelChangedListener fBundlePluginBase
public void set Extensions Model I Shared Extensions Model extensions Model if f Extensions Model null f Bundle Plugin Base null f Extensions Model remove Model Changed Listener f Bundle Plugin Base f Extensions Model extensions Model if extensions Model null f Bundle Plugin Base null extensions Model add Model Changed Listener f Bundle Plugin Base  setExtensionsModel ISharedExtensionsModel extensionsModel fExtensionsModel fBundlePluginBase fExtensionsModel removeModelChangedListener fBundlePluginBase fExtensionsModel extensionsModel extensionsModel fBundlePluginBase extensionsModel addModelChangedListener fBundlePluginBase
see org eclipse pde core plugin I Plugin Model Base get Build Model public I Build Model get Build Model return f Build Model  IPluginModelBase getBuildModel IBuildModel getBuildModel fBuildModel
return f Build Model public void set Build Model I Build Model build Model f Build Model build Model  fBuildModel setBuildModel IBuildModel buildModel fBuildModel buildModel
see org eclipse pde core plugin I Plugin Model Base get Plugin Base public I Plugin Base get Plugin Base return get Plugin Base true  IPluginModelBase getPluginBase IPluginBase getPluginBase getPluginBase
return get Plugin Base true public I Extensions get Extensions return get Plugin Base  getPluginBase IExtensions getExtensions getPluginBase
public void fire Model Changed I Model Changed Event event super fire Model Changed event Object objects event get Changed Objects if objects null objects length 0 if objects 0 instanceof I Plugin Import Bundle Plugin Base f Bundle Plugin Base update Imports else if objects 0 instanceof I Plugin Library Bundle Plugin Base f Bundle Plugin Base update Libraries  fireModelChanged IModelChangedEvent fireModelChanged getChangedObjects IPluginImport BundlePluginBase fBundlePluginBase updateImports IPluginLibrary BundlePluginBase fBundlePluginBase updateLibraries
public I Plugin Base get Plugin Base boolean create If Missing if f Bundle Plugin Base null create If Missing f Bundle Plugin Base Bundle Plugin Base create Plugin Base if f Bundle Model null f Bundle Model add Model Changed Listener f Bundle Plugin Base loaded true return f Bundle Plugin Base  IPluginBase getPluginBase createIfMissing fBundlePluginBase createIfMissing fBundlePluginBase BundlePluginBase createPluginBase fBundleModel fBundleModel addModelChangedListener fBundlePluginBase fBundlePluginBase
return f Bundle Plugin Base public I Extensions get Extensions boolean create If Missing return get Plugin Base create If Missing  fBundlePluginBase IExtensions getExtensions createIfMissing getPluginBase createIfMissing
see org eclipse pde core plugin I Plugin Model Base get Plugin Factory public I Plugin Model Factory get Plugin Factory return this  IPluginModelBase getPluginFactory IPluginModelFactory getPluginFactory
public I Extensions Model Factory get Factory if f Extensions Model null return f Extensions Model get Factory return null  IExtensionsModelFactory getFactory fExtensionsModel fExtensionsModel getFactory
public String get Install Location if f Bundle Model null return f Bundle Model get Install Location return null  getInstallLocation fBundleModel fBundleModel getInstallLocation
return null public URL getNL Lookup Location return null  getNLLookupLocation
see org eclipse pde core I Model get Resource String java lang String public String get Resource String String key return key  IModel getResourceString getResourceString
public boolean is Editable if f Bundle Model null f Bundle Model is Editable false return false if f Extensions Model null f Extensions Model is Editable false return false return true  isEditable fBundleModel fBundleModel isEditable fExtensionsModel fExtensionsModel isEditable
see org eclipse pde core I Model is In Sync public boolean is In Sync return f Bundle Model null f Bundle Model is In Sync f Extensions Model null f Extensions Model is In Sync  IModel isInSync isInSync fBundleModel fBundleModel isInSync fExtensionsModel fExtensionsModel isInSync
see org eclipse pde core I Model is Valid public boolean is Valid return f Bundle Model null f Bundle Model is Valid f Extensions Model null f Extensions Model is Valid  IModel isValid isValid fBundleModel fBundleModel isValid fExtensionsModel fExtensionsModel isValid
see org eclipse pde core I Model load public void load throws Core Exception  IModel CoreException
see org eclipse pde core I Model load java io Input Stream boolean public void load Input Stream source boolean out Of Sync throws Core Exception  IModel InputStream InputStream outOfSync CoreException
see org eclipse pde core I Model reload java io Input Stream boolean public void reload Input Stream source boolean out Of Sync throws Core Exception  IModel InputStream InputStream outOfSync CoreException
return Returns the enabled public boolean is Enabled return enabled  isEnabled
param enabled The enabled to set public void set Enabled boolean enabled this enabled enabled  setEnabled
see org eclipse pde internal core Abstract Model update Time Stamp protected void update Time Stamp  AbstractModel updateTimeStamp updateTimeStamp
public I Plugin Import create Import Plugin Import iimport new Plugin Import iimport set Model this iimport set Parent get Plugin Base return iimport  IPluginImport createImport PluginImport PluginImport setModel setParent getPluginBase
public I Plugin Library create Library Plugin Library library new Plugin Library library set Model this library set Parent get Plugin Base return library  IPluginLibrary createLibrary PluginLibrary PluginLibrary setModel setParent getPluginBase
public I Plugin Attribute create Attribute I Plugin Element element if f Extensions Model null return f Extensions Model get Factory create Attribute element return null  IPluginAttribute createAttribute IPluginElement fExtensionsModel fExtensionsModel getFactory createAttribute
public I Plugin Element create Element I Plugin Object parent if f Extensions Model null return f Extensions Model get Factory create Element parent return null  IPluginElement createElement IPluginObject fExtensionsModel fExtensionsModel getFactory createElement
public I Plugin Extension create Extension if f Extensions Model null return f Extensions Model get Factory create Extension return null  IPluginExtension createExtension fExtensionsModel fExtensionsModel getFactory createExtension
public I Plugin Extension Point create Extension Point if f Extensions Model null return f Extensions Model get Factory create Extension Point return null  IPluginExtensionPoint createExtensionPoint fExtensionsModel fExtensionsModel getFactory createExtensionPoint
see org eclipse pde core I Model is Reconciling Model public boolean is Reconciling Model return false  IModel isReconcilingModel isReconcilingModel
return false public boolean is Bundle Model return true  isBundleModel
see org eclipse pde core plugin I Plugin Model Base get Bundle Description public Bundle Description get Bundle Description return f Bundle Description  IPluginModelBase getBundleDescription BundleDescription getBundleDescription fBundleDescription
see org eclipse pde core plugin I Plugin Model Base set Bundle Description org eclipse osgi service resolver Bundle Description public void set Bundle Description Bundle Description description f Bundle Description description  IPluginModelBase setBundleDescription BundleDescription setBundleDescription BundleDescription fBundleDescription
public boolean is Dirty if f Bundle Model null f Bundle Model instanceof I Editable I Editable f Bundle Model is Dirty return true if f Extensions Model null f Extensions Model instanceof I Editable I Editable f Extensions Model is Dirty return true return false  isDirty fBundleModel fBundleModel IEditable IEditable fBundleModel isDirty fExtensionsModel fExtensionsModel IEditable IEditable fExtensionsModel isDirty
see org eclipse pde core I Editable save java io Print Writer public void save Print Writer writer Does nothing individual models are saved instead  IEditable PrintWriter PrintWriter
see org eclipse pde core I Editable set Dirty boolean public void set Dirty boolean dirty does nothing  IEditable setDirty setDirty

private boolean editable true public Workspace Bundle Model I File file set File file  WorkspaceBundleModel IFile setFile
set File file public void fire Model Changed I Model Changed Event event set Dirty event get Change Type I Model Changed Event WORLD CHANGED super fire Model Changed event  setFile fireModelChanged IModelChangedEvent setDirty getChangeType IModelChangedEvent WORLD_CHANGED fireModelChanged
public String get Contents String Writer swriter new String Writer Print Writer writer new Print Writer swriter save writer writer flush try swriter close catch IO Exception e return swriter to String  getContents StringWriter StringWriter PrintWriter PrintWriter IOException toString
return swriter to String public I File get File return file  toString IFile getFile
return file public I Resource get Underlying Resource return file  IResource getUnderlyingResource
public String get Install Location return file get Project get Location toOS String  getInstallLocation getProject getLocation toOSString
public boolean is Dirty return dirty  isDirty
return dirty public boolean is Editable return editable  isEditable
public void load if file null return if file exists Input Stream stream null boolean out Of Sync false try stream file get Contents false catch Core Exception e out Of Sync true if out Of Sync try stream file get Contents true catch Core Exception e return try load stream out Of Sync stream close catch IO Exception e PDE Core log Exception e  InputStream outOfSync getContents CoreException outOfSync outOfSync getContents CoreException outOfSync IOException PDECore logException
public boolean is In Sync return is In Sync file get Location to File  isInSync isInSync getLocation toFile
protected void update Time Stamp update Time Stamp file get Location to File  updateTimeStamp updateTimeStamp getLocation toFile
public void save if file null return try String contents get Contents Byte Array Input Stream stream new Byte Array Input Stream contents get Bytes 8859 1 NON NLS 1 if file exists file set Contents stream false false null else file create stream false null stream close catch Core Exception e PDE Core log Exception e catch IO Exception e  getContents ByteArrayInputStream ByteArrayInputStream getBytes 8859_1 setContents CoreException PDECore logException IOException
public void save Print Writer writer dirty false  PrintWriter
dirty false public void set Dirty boolean new Dirty dirty new Dirty  setDirty newDirty newDirty
dirty new Dirty public void set Editable boolean new Editable editable new Editable  newDirty setEditable newEditable newEditable
editable new Editable public void set File I File new File file new File set Editable file is Read Only false  newEditable setFile IFile newFile newFile setEditable isReadOnly
see org eclipse pde internal core ibundle I Bundle Model get Factory public I Bundle Model Factory get Factory return null  IBundleModel getFactory IBundleModelFactory getFactory

private String label private String value public Choice String value String label this value value this label label 
public String get Value return value  getValue
return value public String get Label return label  getLabel
return label public String to String return label  toString

public static void set Classpath I Plugin Model Base model I Progress Monitor monitor throws Core Exception Vector result new Vector monitor begin Task 3 NON NLS 1 add own libraries source add Source And Libraries model result monitor worked 1 result add create Container Entry monitor worked 1 add JRE result add createJRE Entry monitor worked 1 I Classpath Entry entries I Classpath Entry result to Array new I Classpath Entry result size I Java Project java Project Java Core create model get Underlying Resource get Project I Java Model Status validation Java Conventions validate Classpath java Project entries java Project get Output Location if validation isOK PDE Core log Error Message validation get Message throw new Core Exception validation java Project set Raw Classpath entries monitor monitor done  setClasspath IPluginModelBase IProgressMonitor CoreException beginTask addSourceAndLibraries createContainerEntry createJREEntry IClasspathEntry IClasspathEntry toArray IClasspathEntry IJavaProject javaProject JavaCore getUnderlyingResource getProject IJavaModelStatus JavaConventions validateClasspath javaProject javaProject getOutputLocation PDECore logErrorMessage getMessage CoreException javaProject setRawClasspath
private static void compute Plugin Entries I Plugin Model Base model Vector result I Progress Monitor monitor try Hash Set already Added new Hash Set if model is Fragment Model add Parent Plugin I Fragment model get Plugin Base result already Added add dependencies I Plugin Import dependencies model get Plugin Base get Imports for int i 0 i dependencies length i I Plugin Import dependency dependencies i I Plugin plugin PDE Core get Default find Plugin dependency get Id dependency get Version dependency get Match if plugin null add Dependency plugin dependency is Reexported result already Added if monitor null monitor worked 1 add Extra Classpath Entries model result add implicit dependencies add Implicit Dependencies model get Plugin Base get Id model get Plugin Base get Schema Version result already Added if monitor null monitor worked 1 catch Core Exception e  computePluginEntries IPluginModelBase IProgressMonitor HashSet alreadyAdded HashSet isFragmentModel addParentPlugin IFragment getPluginBase alreadyAdded IPluginImport getPluginBase getImports IPluginImport IPlugin PDECore getDefault findPlugin getId getVersion getMatch addDependency isReexported alreadyAdded addExtraClasspathEntries addImplicitDependencies getPluginBase getId getPluginBase getSchemaVersion alreadyAdded CoreException
private static void add Extra Classpath Entries I Plugin Model Base model Vector result throws Core Exception I Build build get Build model I Build Entry entry build null null build get Entry I Build Entry JARS EXTRA CLASSPATH if entry null return String tokens entry get Tokens for int i 0 i tokens length i String device new Path tokens i get Device I Path path null if device null path new Path model get Underlying Resource get Project get Name path path append tokens i else if device equals platform NON NLS 1 path new Path tokens i if path segment Count 1 path segment 0 equals plugin NON NLS 1 path path set Device null path path remove First Segments 1 if path null I Resource resource PDE Core get Workspace get Root find Member path if resource null resource instanceof I File I Classpath Entry new Entry Java Core new Library Entry resource get Full Path null null I Project project resource get Project if project has Nature Java Core NATURE ID I Java Project j Project Java Core create project I Classpath Entry entries j Project get Raw Classpath for int j 0 j entries length j if entries j get Entry Kind I Classpath Entry CPE LIBRARY entries j get Content Kind I Package Fragment Root K BINARY entries j get Path equals resource get Full Path new Entry Java Core new Library Entry entries j get Path entries j get Source Attachment Path entries j get Source Attachment Root Path break if result contains new Entry result add new Entry  addExtraClasspathEntries IPluginModelBase CoreException IBuild getBuild IBuildEntry getEntry IBuildEntry JARS_EXTRA_CLASSPATH getTokens getDevice IPath getUnderlyingResource getProject getName segmentCount setDevice removeFirstSegments IResource PDECore getWorkspace getRoot findMember IFile IClasspathEntry newEntry JavaCore newLibraryEntry getFullPath IProject getProject hasNature JavaCore NATURE_ID IJavaProject jProject JavaCore IClasspathEntry jProject getRawClasspath getEntryKind IClasspathEntry CPE_LIBRARY getContentKind IPackageFragmentRoot K_BINARY getPath getFullPath newEntry JavaCore newLibraryEntry getPath getSourceAttachmentPath getSourceAttachmentRootPath newEntry newEntry
public static I Classpath Entry compute Plugin Entries I Plugin Model Base model Vector result new Vector compute Plugin Entries model result null return I Classpath Entry result to Array new I Classpath Entry result size  IClasspathEntry computePluginEntries IPluginModelBase computePluginEntries IClasspathEntry toArray IClasspathEntry
private static void add Dependency I Plugin plugin boolean is Exported Vector result Hash Set already Added throws Core Exception if already Added add plugin return I Resource resource plugin get Model get Underlying Resource if resource null I Project project resource get Project if project has Nature Java Core NATURE ID I Classpath Entry entry Java Core new Project Entry project get Full Path is Exported if result contains entry result add entry return I Plugin Library libraries plugin get Libraries for int i 0 i libraries length i if I Plugin Library RESOURCE equals libraries i get Type libraries i is Exported continue I Classpath Entry entry create Library Entry libraries i is Exported if entry null result contains entry result add entry I Plugin Import imports plugin get Imports for int i 0 i imports length i I Plugin Import dependency imports i if dependency is Reexported I Plugin imported Plugin PDE Core get Default find Plugin dependency get Id dependency get Version dependency get Match if imported Plugin null add Dependency imported Plugin is Exported result already Added  addDependency IPlugin isExported HashSet alreadyAdded CoreException alreadyAdded IResource getModel getUnderlyingResource IProject getProject hasNature JavaCore NATURE_ID IClasspathEntry JavaCore newProjectEntry getFullPath isExported IPluginLibrary getLibraries IPluginLibrary getType isExported IClasspathEntry createLibraryEntry isExported IPluginImport getImports IPluginImport isReexported IPlugin importedPlugin PDECore getDefault findPlugin getId getVersion getMatch importedPlugin addDependency importedPlugin isExported alreadyAdded
private static boolean isOS Gi Runtime return PDE Core get Default get Model Manager isOS Gi Runtime  isOSGiRuntime PDECore getDefault getModelManager isOSGiRuntime
protected static void add Implicit Dependencies String id String schema Version Vector result Hash Set already Added throws Core Exception if isOS Gi Runtime schema Version null id equals org eclipse core boot NON NLS 1 id equals org apache xerces NON NLS 1 id starts With org eclipse swt NON NLS 1 return if schema Version null isOS Gi Runtime if id equals org eclipse core runtime NON NLS 1 I Plugin plugin PDE Core get Default find Plugin org eclipse core runtime compatibility NON NLS 1 if plugin null add Dependency plugin false result already Added else I Plugin plugin PDE Core get Default find Plugin org eclipse core boot NON NLS 1 if plugin null add Dependency plugin false result already Added if id equals org eclipse core runtime NON NLS 1 plugin PDE Core get Default find Plugin org eclipse core runtime NON NLS 1 if plugin null add Dependency plugin false result already Added  addImplicitDependencies schemaVersion HashSet alreadyAdded CoreException isOSGiRuntime schemaVersion startsWith schemaVersion isOSGiRuntime IPlugin PDECore getDefault findPlugin addDependency alreadyAdded IPlugin PDECore getDefault findPlugin addDependency alreadyAdded PDECore getDefault findPlugin addDependency alreadyAdded
public static I Classpath Entry createJRE Entry return Java Core new Container Entry new Path org eclipse jdt launching JRE CONTAINER NON NLS 1  IClasspathEntry createJREEntry JavaCore newContainerEntry JRE_CONTAINER
public static void add Libraries I Plugin Model Base model boolean unconditionally Export Vector result I Plugin Library libraries model get Plugin Base get Libraries for int i 0 i libraries length i I Classpath Entry entry create Library Entry libraries i unconditionally Export if entry null result contains entry result add entry  addLibraries IPluginModelBase unconditionallyExport IPluginLibrary getPluginBase getLibraries IClasspathEntry createLibraryEntry unconditionallyExport
private static void add Parent Plugin I Fragment fragment Vector result Hash Set already Added throws Core Exception I Plugin parent PDE Core get Default find Plugin fragment get Plugin Id fragment get Plugin Version fragment get Rule if parent null add Dependency parent false result already Added I Plugin Import imports parent get Imports for int i 0 i imports length i if imports i is Reexported I Plugin plugin PDE Core get Default find Plugin imports i get Id imports i get Version imports i get Match if plugin null add Dependency plugin false result already Added  addParentPlugin IFragment HashSet alreadyAdded CoreException IPlugin PDECore getDefault findPlugin getPluginId getPluginVersion getRule addDependency alreadyAdded IPluginImport getImports isReexported IPlugin PDECore getDefault findPlugin getId getVersion getMatch addDependency alreadyAdded
private static void add Source And Libraries I Plugin Model Base model Vector result throws Core Exception I Project project model get Underlying Resource get Project I Plugin Library libraries model get Plugin Base get Libraries I Build build get Build model for int i 0 i libraries length i I Plugin Library library libraries i if I Plugin Library RESOURCE equals library get Type continue I Build Entry build Entry build null null build get Entry source library get Name NON NLS 1 if build Entry null String folders build Entry get Tokens for int k 0 k folders length k I Path path project get Full Path append folders k if project find Member folders k null I Classpath Entry entry Java Core new Source Entry path if result contains entry result add entry else add Source Folder folders k project result else I Classpath Entry entry create Library Entry library library is Exported if entry null result contains entry result add entry keep existing source folders if they don t nest with new folders I Classpath Entry entries Java Core create project get Raw Classpath for int i 0 i entries length i I Classpath Entry entry entries i if entry get Entry Kind I Classpath Entry CPE SOURCE if result contains entry boolean do Add true for int j 0 j result size j I Path path I Classpath Entry result get j get Path if path is Prefix Of entry get Path entry get Path is Prefix Of path do Add false break if do Add result add entry  addSourceAndLibraries IPluginModelBase CoreException IProject getUnderlyingResource getProject IPluginLibrary getPluginBase getLibraries IBuild getBuild IPluginLibrary IPluginLibrary getType IBuildEntry buildEntry getEntry getName buildEntry buildEntry getTokens IPath getFullPath findMember IClasspathEntry JavaCore newSourceEntry addSourceFolder IClasspathEntry createLibraryEntry isExported IClasspathEntry JavaCore getRawClasspath IClasspathEntry getEntryKind IClasspathEntry CPE_SOURCE doAdd IPath IClasspathEntry getPath isPrefixOf getPath getPath isPrefixOf doAdd doAdd
protected static void add Source Folder String name I Project project Vector result throws Core Exception Core Utility create Folder project get Folder name true true null I Classpath Entry entry Java Core new Source Entry project get Full Path append name if result contains entry result add entry  addSourceFolder IProject CoreException CoreUtility createFolder getFolder IClasspathEntry JavaCore newSourceEntry getFullPath
Creates a new instance of the classpath container entry for the given project param project public static I Classpath Entry create Container Entry return Java Core new Container Entry new Path PDE Core CLASSPATH CONTAINER ID  IClasspathEntry createContainerEntry JavaCore newContainerEntry PDECore CLASSPATH_CONTAINER_ID
private static I Classpath Entry create Library Entry I Plugin Library library boolean exported try String name library get Name String expanded Name expand Library Name name I Plugin Model Base model library get Plugin Model I Path path get Path model expanded Name if path null if model is Fragment Model contains Variables name return null model resolve Library In Fragments library expanded Name if model null return null path get Path model expanded Name return Java Core new Library Entry path get Source Annotation model expanded Name null exported catch Core Exception e return null  IClasspathEntry createLibraryEntry IPluginLibrary getName expandedName expandLibraryName IPluginModelBase getPluginModel IPath getPath expandedName isFragmentModel containsVariables resolveLibraryInFragments expandedName getPath expandedName JavaCore newLibraryEntry getSourceAnnotation expandedName CoreException
public static boolean contains Variables String name return name index Of os 1 NON NLS 1 name index Of ws 1 NON NLS 1 name index Of nl 1 NON NLS 1 name index Of arch 1 NON NLS 1  containsVariables indexOf indexOf indexOf indexOf
public static String expand Library Name String source if source null source length 0 return NON NLS 1 if source index Of ws 1 NON NLS 1 source source replace All ws NON NLS 1 ws I Path SEPARATOR Target Platform getWS NON NLS 1 if source index Of os 1 NON NLS 1 source source replace All os NON NLS 1 os I Path SEPARATOR Target Platform getOS NON NLS 1 if source index Of nl 1 NON NLS 1 source source replace All nl NON NLS 1 nl I Path SEPARATOR Target Platform getNL NON NLS 1 if source index Of arch 1 NON NLS 1 source source replace All arch NON NLS 1 arch I Path SEPARATOR Target Platform getOS Arch NON NLS 1 return source  expandLibraryName indexOf replaceAll IPath TargetPlatform indexOf replaceAll IPath TargetPlatform indexOf replaceAll IPath TargetPlatform indexOf replaceAll IPath TargetPlatform getOSArch
protected static I Build get Build I Plugin Model Base model throws Core Exception I Build Model build Model model get Build Model if build Model null I Project project model get Underlying Resource get Project I File build File project get File build properties NON NLS 1 if build File exists build Model new Workspace Build Model build File build Model load return build Model null build Model get Build null  IBuild getBuild IPluginModelBase CoreException IBuildModel buildModel getBuildModel buildModel IProject getUnderlyingResource getProject IFile buildFile getFile buildFile buildModel WorkspaceBuildModel buildFile buildModel buildModel buildModel getBuild
private static I Path get Source Annotation I Plugin Model Base model String library Name throws Core Exception I Path path null int dot library Name last Index Of if dot 1 String zip Name library Name substring 0 dot src zip NON NLS 1 path get Path model zip Name if path null Source Location Manager manager PDE Core get Default get Source Location Manager path manager find Path model get Plugin Base new Path zip Name return path  IPath getSourceAnnotation IPluginModelBase libraryName CoreException IPath libraryName lastIndexOf zipName libraryName getPath zipName SourceLocationManager PDECore getDefault getSourceLocationManager findPath getPluginBase zipName
private static I Plugin Model Base resolve Library In Fragments I Plugin Library library String library Name I Fragment fragments PDE Core get Default find Fragments For library get Plugin Base get Id library get Plugin Base get Version for int i 0 i fragments length i I Path path get Path fragments i get Plugin Model library Name if path null return fragments i get Plugin Model the following case is to account for cases when a plugin like org eclipse swt win32 is checked out from cvs i e it has no library and org eclipse swt is not in the workspace we have to find the external swt win32 fragment to locate the ws swt jar if fragments i get Model get Underlying Resource null Model Entry entry PDE Core get Default get Model Manager find Entry fragments i get Id I Plugin Model Base model entry get External Model if model null model instanceof I Fragment Model path get Path model library Name if path null return model return null  IPluginModelBase resolveLibraryInFragments IPluginLibrary libraryName IFragment PDECore getDefault findFragmentsFor getPluginBase getId getPluginBase getVersion IPath getPath getPluginModel libraryName getPluginModel getModel getUnderlyingResource ModelEntry PDECore getDefault getModelManager findEntry getId IPluginModelBase getExternalModel IFragmentModel getPath libraryName
private static I Path get Path I Plugin Model Base model String library Name I Resource resource model get Underlying Resource if resource null I Resource jar File resource get Project find Member library Name if jar File null return jar File get Full Path else File file new File model get Install Location library Name if file exists return new Path file get Absolute Path return null  IPath getPath IPluginModelBase libraryName IResource getUnderlyingResource IResource jarFile getProject findMember libraryName jarFile jarFile getFullPath getInstallLocation libraryName getAbsolutePath

public static void add Nature To Project I Project proj String nature Id I Progress Monitor monitor throws Core Exception I Project Description description proj get Description String prev Natures description get Nature Ids String new Natures new String prev Natures length 1 System arraycopy prev Natures 0 new Natures 0 prev Natures length new Natures prev Natures length nature Id description set Nature Ids new Natures proj set Description description monitor  addNatureToProject IProject natureId IProgressMonitor CoreException IProjectDescription getDescription prevNatures getNatureIds newNatures prevNatures prevNatures newNatures prevNatures newNatures prevNatures natureId setNatureIds newNatures setDescription
public static void create Folder I Folder folder boolean force boolean local I Progress Monitor monitor throws Core Exception if folder exists I Container parent folder get Parent if parent instanceof I Folder create Folder I Folder parent force local monitor folder create force local monitor  createFolder IFolder IProgressMonitor CoreException IContainer getParent IFolder createFolder IFolder
public static void create Project I Project project I Path location I Progress Monitor monitor throws Core Exception if Platform get Location equals location I Project Description desc project get Workspace new Project Description project get Name desc set Location location project create desc monitor else project create monitor  createProject IProject IPath IProgressMonitor CoreException getLocation IProjectDescription getWorkspace newProjectDescription getName setLocation

see Classpath Variable Initializer initialize String public void initialize String variable reset Eclipse Home Variable  ClasspathVariableInitializer resetEclipseHomeVariable
public static void reset Eclipse Home Variable try Preferences pref PDE Core get Default get Plugin Preferences String platform Home pref get String I Core Constants PLATFORM PATH Java Core set Classpath Variable PDE Core ECLIPSE HOME VARIABLE new Path platform Home null catch Core Exception e  resetEclipseHomeVariable PDECore getDefault getPluginPreferences platformHome getString ICoreConstants PLATFORM_PATH JavaCore setClasspathVariable PDECore ECLIPSE_HOME_VARIABLE platformHome CoreException

Constructor for Entry File Adapter param parent param file public Entry File Adapter Model Entry entry File file I File Adapter Factory factory super null file factory this entry entry  EntryFileAdapter EntryFileAdapter ModelEntry IFileAdapterFactory
public Model Entry get Entry return entry  ModelEntry getEntry

Constructor for Required Plugins Classpath Container public External Java Search Classpath Container Searchable Plugins Manager manager this manager manager  RequiredPluginsClasspathContainer ExternalJavaSearchClasspathContainer SearchablePluginsManager
see org eclipse jdt core I Classpath Container get Classpath Entries public I Classpath Entry get Classpath Entries if manager null return new I Classpath Entry 0 if entries null try entries manager compute Container Classpath Entries catch Core Exception e PDE Core log Exception e entries verify With Attachment Manager entries return entries  IClasspathContainer getClasspathEntries IClasspathEntry getClasspathEntries IClasspathEntry computeContainerClasspathEntries CoreException PDECore logException verifyWithAttachmentManager
see org eclipse jdt core I Classpath Container get Description public String get Description return PDE Core get Resource String External Java Search Classpath Container description NON NLS 1  IClasspathContainer getDescription getDescription PDECore getResourceString ExternalJavaSearchClasspathContainer

Constructor for Required Plugins Initializer public External Java Search Initializer super  RequiredPluginsInitializer ExternalJavaSearchInitializer
see org eclipse jdt core Classpath Container Initializer initialize I Path I Java Project public void initialize I Path container Path I Java Project java Project throws Core Exception Plugin Model Manager manager PDE Core get Default get Model Manager Searchable Plugins Manager search Manager manager get Searchable Plugins Manager search Manager update Classpath Container java Project  ClasspathContainerInitializer IPath IJavaProject IPath containerPath IJavaProject javaProject CoreException PluginModelManager PDECore getDefault getModelManager SearchablePluginsManager searchManager getSearchablePluginsManager searchManager updateClasspathContainer javaProject

private boolean f Initialized false public External Model Manager f Models Collections synchronized List new Array List f Fragment Models Collections synchronized List new Array List  fInitialized ExternalModelManager fModels synchronizedList ArrayList fFragmentModels synchronizedList ArrayList
public static String compute Default Platform Path URL installURL Platform get Install Location getURL I Path ppath new Path installURL get File remove Trailing Separator return get Correct Path ppath toOS String  computeDefaultPlatformPath getInstallLocation IPath getFile removeTrailingSeparator getCorrectPath toOSString
private static String get Correct Path String path String Buffer buf new String Buffer for int i 0 i path length i char c path char At i if Platform getOS equals win32 NON NLS 1 if i 0 c continue Some V Ms may return 20 instead of a space if c i 2 path length char c1 path char At i 1 char c2 path char At i 2 if c1 2 c2 0 i 2 buf append NON NLS 1 continue buf append c return buf to String  getCorrectPath StringBuffer StringBuffer charAt VMs charAt charAt toString
return buf to String public static I Path get Eclipse Home Preferences preferences PDE Core get Default get Plugin Preferences return new Path preferences get String I Core Constants PLATFORM PATH  toString IPath getEclipseHome PDECore getDefault getPluginPreferences getString ICoreConstants PLATFORM_PATH
public void add Model Provider Listener I Model Provider Listener listener f Listeners add listener  addModelProviderListener IModelProviderListener fListeners
private Vector create Saved List String saved Vector result new Vector String Tokenizer stok new String Tokenizer saved while stok has More Tokens result add stok next Token return result  createSavedList StringTokenizer StringTokenizer hasMoreTokens nextToken
private void enable All for int i 0 i f Models size i I Plugin Model f Models get i set Enabled true for int i 0 i f Fragment Models size i I Fragment Model f Fragment Models get i set Enabled true  enableAll fModels IPluginModel fModels setEnabled fFragmentModels IFragmentModel fFragmentModels setEnabled
public void fire Model Provider Event I Model Provider Event e for Iterator iter f Listeners iterator iter has Next I Model Provider Listener listener I Model Provider Listener iter next listener models Changed e  fireModelProviderEvent IModelProviderEvent fListeners hasNext IModelProviderListener IModelProviderListener modelsChanged
public I Plugin Model Base get All Models load Models new Null Progress Monitor I Plugin Model Base all Models new I Plugin Model Base f Models size f Fragment Models size System arraycopy f Models to Array 0 all Models 0 f Models size System arraycopy f Fragment Models to Array 0 all Models f Models size f Fragment Models size return all Models  IPluginModelBase getAllModels loadModels NullProgressMonitor IPluginModelBase allModels IPluginModelBase fModels fFragmentModels fModels toArray allModels fModels fFragmentModels toArray allModels fModels fFragmentModels allModels
private void initialize All Models Preferences pref PDE Core get Default get Plugin Preferences String saved pref get String I Core Constants CHECKED PLUGINS if saved equals I Core Constants VALUE SAVED ALL enable All else if saved equals I Core Constants VALUE SAVED NONE Vector list create Saved List saved for int i 0 i f Models size i I Plugin Model model I Plugin Model f Models get i model set Enabled list contains model get Plugin get Id for int i 0 i f Fragment Models size i I Fragment Model fmodel I Fragment Model f Fragment Models get i fmodel set Enabled list contains fmodel get Fragment get Id  initializeAllModels PDECore getDefault getPluginPreferences getString ICoreConstants CHECKED_PLUGINS ICoreConstants VALUE_SAVED_ALL enableAll ICoreConstants VALUE_SAVED_NONE createSavedList fModels IPluginModel IPluginModel fModels setEnabled getPlugin getId fFragmentModels IFragmentModel IFragmentModel fFragmentModels setEnabled getFragment getId
private synchronized void load Models I Progress Monitor monitor if f Initialized return f State new PDE State Preferences pref PDE Core get Default get Plugin Preferences URL plugin Paths Plugin Path Finder get Plugin Paths pref get String I Core Constants PLATFORM PATH I Plugin Model Base resolved Target Platform Registry Loader load Models plugin Paths true f State monitor for int i 0 i resolved length i if resolved i instanceof I Plugin Model f Models add resolved i else f Fragment Models add resolved i initialize All Models f Initialized true  loadModels IProgressMonitor fInitialized fState PDEState PDECore getDefault getPluginPreferences pluginPaths PluginPathFinder getPluginPaths getString ICoreConstants PLATFORM_PATH IPluginModelBase TargetPlatformRegistryLoader loadModels pluginPaths fState IPluginModel fModels fFragmentModels initializeAllModels fInitialized
public void remove Model Provider Listener I Model Provider Listener listener f Listeners remove listener  removeModelProviderListener IModelProviderListener fListeners
public void reset PDE State state I Plugin Model Base new Models f State state PDE Core get Default get Model Manager add Workspace Bundles To State f Models clear f Fragment Models clear for int i 0 i new Models length i if new Models i instanceof I Plugin Model f Models add new Models i else f Fragment Models add new Models i  PDEState IPluginModelBase newModels fState PDECore getDefault getModelManager addWorkspaceBundlesToState fModels fFragmentModels newModels newModels IPluginModel fModels newModels fFragmentModels newModels
public void shutdown int disabled 0 String Buffer saved new String Buffer for int i 0 i f Models size i I Plugin Model model I Plugin Model f Models get i if model is Enabled disabled 1 if saved length 0 saved append NON NLS 1 saved append model get Plugin get Id for int i 0 i f Fragment Models size i I Fragment Model fmodel I Fragment Model f Fragment Models get i if fmodel is Enabled disabled 1 if saved length 0 saved append NON NLS 1 saved append fmodel get Fragment get Id Preferences pref PDE Core get Default get Plugin Preferences if disabled 0 pref set Value I Core Constants CHECKED PLUGINS I Core Constants VALUE SAVED ALL else if disabled f Models size f Fragment Models size pref set Value I Core Constants CHECKED PLUGINS I Core Constants VALUE SAVED NONE else pref set Value I Core Constants CHECKED PLUGINS saved to String PDE Core get Default save Plugin Preferences  StringBuffer StringBuffer fModels IPluginModel IPluginModel fModels isEnabled getPlugin getId fFragmentModels IFragmentModel IFragmentModel fFragmentModels isEnabled getFragment getId PDECore getDefault getPluginPreferences setValue ICoreConstants CHECKED_PLUGINS ICoreConstants VALUE_SAVED_ALL fModels fFragmentModels setValue ICoreConstants CHECKED_PLUGINS ICoreConstants VALUE_SAVED_NONE setValue ICoreConstants CHECKED_PLUGINS toString PDECore getDefault savePluginPreferences
public PDE State get State load Models new Null Progress Monitor return f State  PDEState getState loadModels NullProgressMonitor fState

private boolean enabled true public Abstract Feature Model super  AbstractFeatureModel
public I Feature get Feature if feature null Feature f new Feature f model this this feature f return feature  IFeature getFeature
public I Feature Model Factory get Factory if factory null factory new Feature Factory this return factory  IFeatureModelFactory getFactory FeatureFactory
return factory public String get Install Location return null  getInstallLocation
return null public boolean is Editable return true  isEditable
return true public boolean is Enabled return enabled  isEnabled
public void load Input Stream stream boolean out Of Sync throws Core Exception try SAX Parser parser get Sax Parser Input Source source new Input Source stream URL dtd Location PDE Core get Default get Descriptor get InstallURL source set System Id dtd Location to String XML Default Handler handler new XML Default Handler parser set Property http xml org sax properties lexical handler handler NON NLS 1 parser parse stream handler process Document handler get Document handler get Line Table loaded true if out Of Sync update Time Stamp catch SAX Exception e catch Exception e PDE Core log Exception e  InputStream outOfSync CoreException SAXParser getSaxParser InputSource InputSource dtdLocation PDECore getDefault getDescriptor getInstallURL setSystemId dtdLocation toString XMLDefaultHandler XMLDefaultHandler setProperty processDocument getDocument getLineTable outOfSync updateTimeStamp SAXException PDECore logException
public boolean is Valid if is Loaded return false I Feature feature get Feature return feature null feature is Valid  isValid isLoaded IFeature getFeature isValid
private void process Document Document doc Hashtable line Table Node root Node doc get Document Element if feature null feature new Feature feature model this else feature reset feature parse root Node line Table  processDocument lineTable rootNode getDocumentElement rootNode lineTable
public void reload Input Stream stream boolean out Of Sync throws Core Exception if feature null feature reset load stream out Of Sync fire Model Changed new Model Changed Event this I Model Changed Event WORLD CHANGED new Object feature null  InputStream outOfSync CoreException outOfSync fireModelChanged ModelChangedEvent IModelChangedEvent WORLD_CHANGED
null public void set Enabled boolean enabled this enabled enabled  setEnabled
this enabled enabled public boolean is Reconciling Model return false  isReconcilingModel

private String location see Abstract Model update Time Stamp protected void update Time Stamp  AbstractModel updateTimeStamp updateTimeStamp
see I Model is In Sync public boolean is In Sync return true  IModel isInSync isInSync
public boolean is Editable return false  isEditable
see I Model load public void load throws Core Exception  IModel CoreException
public void set Install Location String location this location location  setInstallLocation
this location location public String get Install Location return location  getInstallLocation

public void add Plugins I Feature Plugin new Plugins throws Core Exception ensure Model Editable for int i 0 i new Plugins length i plugins add new Plugins i Feature Plugin new Plugins i set In The Model true fire Structure Changed new Plugins I Model Changed Event INSERT  addPlugins IFeaturePlugin newPlugins CoreException ensureModelEditable newPlugins newPlugins FeaturePlugin newPlugins setInTheModel fireStructureChanged newPlugins IModelChangedEvent
public void add Data I Feature Data new Data throws Core Exception ensure Model Editable for int i 0 i new Data length i data add new Data i Feature Data new Data i set In The Model true fire Structure Changed new Data I Model Changed Event INSERT  addData IFeatureData newData CoreException ensureModelEditable newData newData FeatureData newData setInTheModel fireStructureChanged newData IModelChangedEvent
public void add Included Features I Feature Child features throws Core Exception ensure Model Editable for int i 0 i features length i children add features i Feature Child features i set In The Model true fire Structure Changed features I Model Changed Event INSERT  addIncludedFeatures IFeatureChild CoreException ensureModelEditable FeatureChild setInTheModel fireStructureChanged IModelChangedEvent
public void add Imports I Feature Import iimports throws Core Exception ensure Model Editable for int i 0 i iimports length i imports add iimports i Feature Import iimports i set In The Model true fire Structure Changed iimports I Model Changed Event INSERT  addImports IFeatureImport CoreException ensureModelEditable FeatureImport setInTheModel fireStructureChanged IModelChangedEvent
public I Feature Plugin get Plugins I Feature Plugin result new I Feature Plugin plugins size plugins copy Into result return result  IFeaturePlugin getPlugins IFeaturePlugin IFeaturePlugin copyInto
public I Feature Data get Data I Feature Data result new I Feature Data data size data copy Into result return result  IFeatureData getData IFeatureData IFeatureData copyInto
public I Feature Child get Included Features I Feature Child result new I Feature Child children size children copy Into result return result  IFeatureChild getIncludedFeatures IFeatureChild IFeatureChild copyInto
public I Feature Import get Imports I Feature Import result new I Feature Import imports size imports copy Into result return result  IFeatureImport getImports IFeatureImport IFeatureImport copyInto
return result public String get Provider Name return provider Name  getProviderName providerName
public String get Plugin return plugin  getPlugin
public I Plugin Model Base get Referenced Model I Feature Plugin reference Workspace Model Manager mng PDE Core get Default get Workspace Model Manager I Plugin Model Base models null if reference is Fragment models mng get Fragment Models else models mng get Plugin Models for int i 0 i models length i I Plugin Base base models i get Plugin Base if base get Id equals reference get Id return models i return null  IPluginModelBase getReferencedModel IFeaturePlugin WorkspaceModelManager PDECore getDefault getWorkspaceModelManager IPluginModelBase isFragment getFragmentModels getPluginModels IPluginBase getPluginBase getId getId
return null public I FeatureURL getURL return url  IFeatureURL
return url public I Feature Install Handler get Install Handler return handler  IFeatureInstallHandler getInstallHandler
public I Feature Info get Feature Info int index return infos index  IFeatureInfo getFeatureInfo
public boolean is Primary return primary  isPrimary
public boolean is Exclusive return exclusive  isExclusive
protected void parse Node node Hashtable line Table super parse node line Table provider Name get Node Attribute node provider name NON NLS 1 plugin get Node Attribute node plugin NON NLS 1 os get Node Attribute node os NON NLS 1 ws get Node Attribute node ws NON NLS 1 nl get Node Attribute node nl NON NLS 1 arch get Node Attribute node arch NON NLS 1 image Name get Node Attribute node image NON NLS 1 colocation Affinity get Node Attribute node colocation affinity NON NLS 1 application get Node Attribute node application NON NLS 1 primary get Boolean Attribute node primary NON NLS 1 exclusive get Boolean Attribute node exclusive NON NLS 1 Node List children node get Child Nodes valid true for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE String tag child get Node Name to Lower Case if tag equals description NON NLS 1 I Feature Info info get Model get Factory create Info I Feature INFO DESCRIPTION Feature Info info set In The Model true Feature Info info parse child line Table infos I Feature INFO DESCRIPTION info else if tag equals license NON NLS 1 I Feature Info info get Model get Factory create Info I Feature INFO LICENSE Feature Info info set In The Model true Feature Info info parse child line Table infos I Feature INFO LICENSE info else if tag equals copyright NON NLS 1 I Feature Info info get Model get Factory create Info I Feature INFO COPYRIGHT Feature Info info set In The Model true Feature Info info parse child line Table infos I Feature INFO COPYRIGHT info else if tag equals url NON NLS 1 if url null url get Model get Factory createURL FeatureURL url set In The Model true FeatureURL url parse child line Table else if tag equals requires NON NLS 1 parse Requires child line Table else if tag equals install handler NON NLS 1 I Feature Install Handler handler get Model get Factory create Install Handler Feature Install Handler handler parse child line Table Feature Install Handler handler set In The Model true this handler handler else if tag equals plugin NON NLS 1 I Feature Plugin plugin get Model get Factory create Plugin Feature Plugin plugin parse child line Table Feature Plugin plugin set In The Model true plugins add plugin else if tag equals data NON NLS 1 I Feature Data new Data get Model get Factory create Data Feature Data new Data parse child line Table Feature Data new Data set In The Model true data add new Data else if tag equals includes NON NLS 1 I Feature Child new Child get Model get Factory create Child Feature Child new Child parse child line Table Feature Child new Child set In The Model true this children add new Child valid has Required Attributes  lineTable lineTable providerName getNodeAttribute getNodeAttribute getNodeAttribute getNodeAttribute getNodeAttribute getNodeAttribute imageName getNodeAttribute colocationAffinity getNodeAttribute getNodeAttribute getBooleanAttribute getBooleanAttribute NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName toLowerCase IFeatureInfo getModel getFactory createInfo IFeature INFO_DESCRIPTION FeatureInfo setInTheModel FeatureInfo lineTable IFeature INFO_DESCRIPTION IFeatureInfo getModel getFactory createInfo IFeature INFO_LICENSE FeatureInfo setInTheModel FeatureInfo lineTable IFeature INFO_LICENSE IFeatureInfo getModel getFactory createInfo IFeature INFO_COPYRIGHT FeatureInfo setInTheModel FeatureInfo lineTable IFeature INFO_COPYRIGHT getModel getFactory setInTheModel lineTable parseRequires lineTable IFeatureInstallHandler getModel getFactory createInstallHandler FeatureInstallHandler lineTable FeatureInstallHandler setInTheModel IFeaturePlugin getModel getFactory createPlugin FeaturePlugin lineTable FeaturePlugin setInTheModel IFeatureData newData getModel getFactory createData FeatureData newData lineTable FeatureData newData setInTheModel newData IFeatureChild newChild getModel getFactory createChild FeatureChild newChild lineTable FeatureChild newChild setInTheModel newChild hasRequiredAttributes
private void parse Requires Node node Hashtable line Table Node List children node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE if child get Node Name equals Ignore Case import NON NLS 1 I Feature Import iimport get Model get Factory create Import Feature Import iimport parse child line Table Feature Import iimport set In The Model true imports add iimport  parseRequires lineTable NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName equalsIgnoreCase IFeatureImport getModel getFactory createImport FeatureImport lineTable FeatureImport setInTheModel
public void compute Imports throws Core Exception I Feature Import removed null if imports size 0 Array List list new Array List for int i 0 i imports size i I Feature Import iimport I Feature Import imports get i if iimport get Type I Feature Import FEATURE list add iimport if list size 0 imports remove All list removed I Feature Import list to Array new I Feature Import list size imports clear if removed null fire Structure Changed removed I Model Changed Event REMOVE Create full import list for int i 0 i plugins size i I Feature Plugin fp I Feature Plugin plugins get i I Plugin Base plugin PDE Core get Default find Plugin fp get Id fp get Version 0 if plugin null add Plugin Imports plugin Find plug ins that satisfy requirements within this feature Whatever remains will be feature external requirements Vector input Imports Vector imports clone for int i 0 i input Imports size i I Feature Import iimport I Feature Import input Imports get i I Feature Plugin local find Feature Plugin iimport get Id iimport get Version iimport get Match if local null imports remove iimport if imports size 0 I Feature Import added I Feature Import imports to Array new I Feature Import imports size fire Structure Changed added I Model Changed Event INSERT  computeImports CoreException IFeatureImport ArrayList ArrayList IFeatureImport IFeatureImport getType IFeatureImport removeAll IFeatureImport toArray IFeatureImport fireStructureChanged IModelChangedEvent IFeaturePlugin IFeaturePlugin IPluginBase PDECore getDefault findPlugin getId getVersion addPluginImports inputImports inputImports IFeatureImport IFeatureImport inputImports IFeaturePlugin findFeaturePlugin getId getVersion getMatch IFeatureImport IFeatureImport toArray IFeatureImport fireStructureChanged IModelChangedEvent
private void add Plugin Imports I Plugin Base plugin throws Core Exception I Plugin Import plugin Imports plugin get Imports for int i 0 i plugin Imports length i I Plugin Import plugin Import plugin Imports i String id plugin Import get Id String version plugin Import get Version int match plugin Import get Match Don t add duplicates if find Import id version match null continue I Feature Import iimport get Model get Factory create Import iimport set Id id iimport set Version version iimport set Match match Feature Import iimport set In The Model true imports add iimport I Plugin p PDE Core get Default find Plugin plugin Import get Id plugin Import get Version plugin Import get Match Feature Import iimport set Plugin p if p null add Plugin Imports p  addPluginImports IPluginBase CoreException IPluginImport pluginImports getImports pluginImports IPluginImport pluginImport pluginImports pluginImport getId pluginImport getVersion pluginImport getMatch findImport IFeatureImport getModel getFactory createImport setId setVersion setMatch FeatureImport setInTheModel IPlugin PDECore getDefault findPlugin pluginImport getId pluginImport getVersion pluginImport getMatch FeatureImport setPlugin addPluginImports
private I Feature Import find Import String id String version int match for int i 0 i imports size i I Feature Import iimport I Feature Import imports get i if iimport get Id equals id if version null return iimport if version equals iimport get Version match iimport get Match return iimport return null  IFeatureImport findImport IFeatureImport IFeatureImport getId getVersion getMatch
private I Feature Plugin find Feature Plugin String id String version int match for int i 0 i plugins size i I Feature Plugin fp I Feature Plugin plugins get i String pid fp get Id String pversion fp get Version if PDE Core compare id version pid pversion match return fp return null  IFeaturePlugin findFeaturePlugin IFeaturePlugin IFeaturePlugin getId getVersion PDECore
public void remove Plugins I Feature Plugin removed throws Core Exception ensure Model Editable for int i 0 i removed length i plugins remove removed i Feature Plugin removed i set In The Model false fire Structure Changed removed I Model Changed Event REMOVE  removePlugins IFeaturePlugin CoreException ensureModelEditable FeaturePlugin setInTheModel fireStructureChanged IModelChangedEvent
public void remove Data I Feature Data removed throws Core Exception ensure Model Editable for int i 0 i removed length i data remove removed i Feature Data removed i set In The Model false fire Structure Changed removed I Model Changed Event REMOVE  removeData IFeatureData CoreException ensureModelEditable FeatureData setInTheModel fireStructureChanged IModelChangedEvent
public void remove Included Features I Feature Child features throws Core Exception ensure Model Editable for int i 0 i features length i children remove features i Feature Child features i set In The Model false fire Structure Changed features I Model Changed Event REMOVE  removeIncludedFeatures IFeatureChild CoreException ensureModelEditable FeatureChild setInTheModel fireStructureChanged IModelChangedEvent
public void remove Imports I Feature Import iimports throws Core Exception ensure Model Editable for int i 0 i iimports length i imports remove iimports i Feature Import iimports i set In The Model false fire Structure Changed iimports I Model Changed Event REMOVE  removeImports IFeatureImport CoreException ensureModelEditable FeatureImport setInTheModel fireStructureChanged IModelChangedEvent
public String getOS return os 
public String getWS return ws 
public String getNL return nl 
public String get Arch return arch  getArch
public String get Colocation Affinity return colocation Affinity  getColocationAffinity colocationAffinity
public String get Application return application  getApplication
public void setOS String os throws Core Exception ensure Model Editable Object old Value this os this os os fire Property Changed P OS old Value os  CoreException ensureModelEditable oldValue firePropertyChanged P_OS oldValue
public void setWS String ws throws Core Exception ensure Model Editable Object old Value this ws this ws ws fire Property Changed P WS old Value ws  CoreException ensureModelEditable oldValue firePropertyChanged P_WS oldValue
public void setNL String nl throws Core Exception ensure Model Editable Object old Value this nl this nl nl fire Property Changed P NL old Value nl  CoreException ensureModelEditable oldValue firePropertyChanged P_NL oldValue
public void set Arch String arch throws Core Exception ensure Model Editable Object old Value this arch this arch arch fire Property Changed P ARCH old Value arch  setArch CoreException ensureModelEditable oldValue firePropertyChanged P_ARCH oldValue
public void set Primary boolean new Value throws Core Exception if this primary new Value return ensure Model Editable Boolean old Value this primary Boolean TRUE Boolean FALSE this primary new Value fire Property Changed P PRIMARY old Value new Value Boolean TRUE Boolean FALSE  setPrimary newValue CoreException newValue ensureModelEditable oldValue newValue firePropertyChanged P_PRIMARY oldValue newValue
public void set Exclusive boolean new Value throws Core Exception if this exclusive new Value return ensure Model Editable Boolean old Value this exclusive Boolean TRUE Boolean FALSE this exclusive new Value fire Property Changed P EXCLUSIVE old Value new Value Boolean TRUE Boolean FALSE  setExclusive newValue CoreException newValue ensureModelEditable oldValue newValue firePropertyChanged P_EXCLUSIVE oldValue newValue
public void set Colocation Affinity String new Value throws Core Exception ensure Model Editable Object old Value this colocation Affinity this colocation Affinity new Value fire Property Changed P COLLOCATION AFFINITY old Value new Value  setColocationAffinity newValue CoreException ensureModelEditable oldValue colocationAffinity colocationAffinity newValue firePropertyChanged P_COLLOCATION_AFFINITY oldValue newValue
public void set Application String new Value throws Core Exception ensure Model Editable Object old Value this application this application new Value fire Property Changed P APPLICATION old Value new Value  setApplication newValue CoreException ensureModelEditable oldValue newValue firePropertyChanged P_APPLICATION oldValue newValue
public void set Provider Name String provider Name throws Core Exception ensure Model Editable Object old Value this provider Name this provider Name provider Name fire Property Changed P PROVIDER old Value provider Name  setProviderName providerName CoreException ensureModelEditable oldValue providerName providerName providerName firePropertyChanged P_PROVIDER oldValue providerName
public void set Plugin String plugin throws Core Exception ensure Model Editable Object old Value this plugin this plugin plugin fire Property Changed P PLUGIN old Value plugin  setPlugin CoreException ensureModelEditable oldValue firePropertyChanged P_PLUGIN oldValue
public void setURL I FeatureURL url throws Core Exception ensure Model Editable Object old Value this url if this url null FeatureURL this url set In The Model false this url url fire Property Changed P URL old Value url  IFeatureURL CoreException ensureModelEditable oldValue setInTheModel firePropertyChanged P_URL oldValue
public void set Install Handler I Feature Install Handler handler throws Core Exception ensure Model Editable Object old Value this handler if this handler null Feature Install Handler this handler set In The Model false this handler handler fire Property Changed P INSTALL HANDLER old Value handler  setInstallHandler IFeatureInstallHandler CoreException ensureModelEditable oldValue FeatureInstallHandler setInTheModel firePropertyChanged P_INSTALL_HANDLER oldValue
public void set Feature Info I Feature Info info int index throws Core Exception ensure Model Editable Object old Value infos index if old Value null Feature Info old Value set In The Model true infos index info String property switch index case INFO DESCRIPTION property P DESCRIPTION break case INFO LICENSE property P LICENSE break case INFO COPYRIGHT property P COPYRIGHT break default return fire Property Changed property old Value info  setFeatureInfo IFeatureInfo CoreException ensureModelEditable oldValue oldValue FeatureInfo oldValue setInTheModel INFO_DESCRIPTION P_DESCRIPTION INFO_LICENSE P_LICENSE INFO_COPYRIGHT P_COPYRIGHT firePropertyChanged oldValue
Sets the image Name param image Name The image Name to set public void set Image Name String image Name throws Core Exception ensure Model Editable Object old Value this image Name this image Name image Name fire Property Changed P IMAGE old Value image Name  imageName imageName imageName setImageName imageName CoreException ensureModelEditable oldValue imageName imageName imageName firePropertyChanged P_IMAGE oldValue imageName
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P OS setOS String new Value else if name equals P WS setWS String new Value else if name equals P NL setNL String new Value else if name equals P ARCH set Arch String new Value else if name equals P COLLOCATION AFFINITY set Colocation Affinity String new Value else if name equals P APPLICATION set Application String new Value else if name equals P PRIMARY set Primary new Value null Boolean new Value boolean Value false else if name equals P EXCLUSIVE set Exclusive new Value null Boolean new Value boolean Value false else if name equals P PROVIDER set Provider Name String new Value else if name equals P PLUGIN set Plugin String new Value else if name equals P URL setURL I FeatureURL new Value else if name equals P INSTALL HANDLER set Install Handler I Feature Install Handler new Value else if name equals P DESCRIPTION set Feature Info I Feature Info new Value INFO DESCRIPTION else if name equals P LICENSE set Feature Info I Feature Info new Value INFO LICENSE else if name equals P COPYRIGHT set Feature Info I Feature Info new Value INFO COPYRIGHT else if name equals P IMAGE set Image Name String new Value else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_OS newValue P_WS newValue P_NL newValue P_ARCH setArch newValue P_COLLOCATION_AFFINITY setColocationAffinity newValue P_APPLICATION setApplication newValue P_PRIMARY setPrimary newValue newValue booleanValue P_EXCLUSIVE setExclusive newValue newValue booleanValue P_PROVIDER setProviderName newValue P_PLUGIN setPlugin newValue P_URL IFeatureURL newValue P_INSTALL_HANDLER setInstallHandler IFeatureInstallHandler newValue P_DESCRIPTION setFeatureInfo IFeatureInfo newValue INFO_DESCRIPTION P_LICENSE setFeatureInfo IFeatureInfo newValue INFO_LICENSE P_COPYRIGHT setFeatureInfo IFeatureInfo newValue INFO_COPYRIGHT P_IMAGE setImageName newValue restoreProperty oldValue newValue
public void reset super reset data clear plugins clear imports clear children clear url null provider Name null plugin null os null ws null nl null arch null infos 0 null infos 1 null infos 2 null primary false exclusive false colocation Affinity null application null valid false  providerName colocationAffinity
public boolean is Valid return valid  isValid
private boolean has Required Attributes Verify that all the required attributes are defined if id null return false if version null return false for int i 0 i children size i I Feature Child child I Feature Child children element At i if child get Id null child get Version null return false for int i 0 i plugins size i I Feature Plugin plugin I Feature Plugin plugins element At i if plugin get Id null plugin get Version null return false for int i 0 i data size i I Feature Data entry I Feature Data data element At i if entry get Id null return false for int i 0 i imports size i I Feature Import iimport I Feature Import imports element At i if iimport get Id null return false return true  hasRequiredAttributes IFeatureChild IFeatureChild elementAt getId getVersion IFeaturePlugin IFeaturePlugin elementAt getId getVersion IFeatureData IFeatureData elementAt getId IFeatureImport IFeatureImport elementAt getId
public void write String indent Print Writer writer writer print indent feature NON NLS 1 String indent2 indent INDENT String indenta indent INDENT INDENT write If Defined indenta writer id get Id NON NLS 1 write If Defined indenta writer label get Writable String get Label NON NLS 1 write If Defined indenta writer version get Version NON NLS 1 write If Defined indenta writer provider name NON NLS 1 get Writable String provider Name write If Defined indenta writer plugin NON NLS 1 get Plugin write If Defined indenta writer os os NON NLS 1 write If Defined indenta writer ws ws NON NLS 1 write If Defined indenta writer nl nl NON NLS 1 write If Defined indenta writer arch arch NON NLS 1 if image Name null write If Defined indenta writer image get Writable String image Name NON NLS 1 if is Primary writer println writer print indenta primary true NON NLS 1 if is Exclusive writer println writer print indenta exclusive true NON NLS 1 write If Defined indenta writer colocation affinity colocation Affinity NON NLS 1 write If Defined indenta writer application application NON NLS 1 writer println NON NLS 1 if handler null writer println handler write indent2 writer for int i 0 i 3 i I Feature Info info infos i if info null info is Empty info write indent2 writer if url null writer println url write indent2 writer for int i 0 i children size i I Feature Child child I Feature Child children element At i writer println child write indent2 writer if imports size 0 writer println writer println indent2 requires NON NLS 1 for int i 0 i imports size i I Feature Import iimport I Feature Import imports get i iimport write indenta writer writer println indent2 requires NON NLS 1 for int i 0 i plugins size i I Feature Plugin plugin I Feature Plugin plugins element At i writer println plugin write indent2 writer for int i 0 i data size i I Feature Data entry I Feature Data data element At i writer println entry write indent2 writer writer println writer println indent feature NON NLS 1  PrintWriter writeIfDefined getId writeIfDefined getWritableString getLabel writeIfDefined getVersion writeIfDefined getWritableString providerName writeIfDefined getPlugin writeIfDefined writeIfDefined writeIfDefined writeIfDefined imageName writeIfDefined getWritableString imageName isPrimary isExclusive writeIfDefined colocationAffinity writeIfDefined IFeatureInfo isEmpty IFeatureChild IFeatureChild elementAt IFeatureImport IFeatureImport IFeaturePlugin IFeaturePlugin elementAt IFeatureData IFeatureData elementAt
private void write If Defined String indent Print Writer writer String att Name String att Value if att Value null att Value trim length 0 return writer println writer print indent att Name att Value NON NLS 1 NON NLS 2  writeIfDefined PrintWriter attName attValue attValue attValue attName attValue
Gets the image Name return Returns a String public String get Image Name return image Name  imageName getImageName imageName

protected void reset super reset version null optional false name null search Location ROOT match NONE os null ws null arch null  searchLocation
protected void parse Node node Hashtable line Table super parse node line Table bind Source Location node line Table version get Node Attribute node version NON NLS 1 name get Node Attribute node name NON NLS 1 optional get Boolean Attribute node optional NON NLS 1 os get Node Attribute node os NON NLS 1 ws get Node Attribute node ws NON NLS 1 arch get Node Attribute node arch NON NLS 1 String match Name get Node Attribute node match NON NLS 1 if match Name null for int i 0 i RULE NAME TABLE length i if match Name equals RULE NAME TABLE i match i break String search Location Name get Node Attribute node search location NON NLS 1 if search Location Name null search Location Name get Node Attribute node search location NON NLS 1 if search Location Name null if search Location Name equals root NON NLS 1 search Location ROOT else if search Location Name equals self NON NLS 1 search Location SELF else if search Location Name equals both NON NLS 1 search Location BOTH hook With Workspace  lineTable lineTable bindSourceLocation lineTable getNodeAttribute getNodeAttribute getBooleanAttribute getNodeAttribute getNodeAttribute getNodeAttribute matchName getNodeAttribute matchName RULE_NAME_TABLE matchName RULE_NAME_TABLE searchLocationName getNodeAttribute search_location searchLocationName searchLocationName getNodeAttribute searchLocationName searchLocationName searchLocation searchLocationName searchLocation searchLocationName searchLocation hookWithWorkspace
public void load From I Feature feature id feature get Id version feature get Version optional false name feature get Label this feature feature  loadFrom IFeature getId getVersion getLabel
see I Feature Child get Version public String get Version return version  IFeatureChild getVersion getVersion
public boolean is Optional return optional  isOptional
public String get Name return name  getName
public int get Search Location return search Location  getSearchLocation searchLocation
public int get Match return match  getMatch
public String getOS return os 
public String getWS return ws 
public String get Arch return arch  getArch
public I Feature get Referenced Feature if feature null hook With Workspace return feature  IFeature getReferencedFeature hookWithWorkspace
public void hook With Workspace I Feature Model models PDE Core get Default get Workspace Model Manager get Feature Models for int i 0 i models length i I Feature feature models i get Feature if feature null feature get Id equals get Id if version null feature get Version equals version this feature feature break  hookWithWorkspace IFeatureModel PDECore getDefault getWorkspaceModelManager getFeatureModels IFeature getFeature getId getId getVersion
see I Feature Child set Version String public void set Version String version throws Core Exception ensure Model Editable Object old Value this version this version version fire Property Changed P VERSION old Value version hook With Workspace  IFeatureChild setVersion setVersion CoreException ensureModelEditable oldValue firePropertyChanged P_VERSION oldValue hookWithWorkspace
public void set Name String name throws Core Exception ensure Model Editable Object old Value this name this name name fire Property Changed P NAME old Value name  setName CoreException ensureModelEditable oldValue firePropertyChanged P_NAME oldValue
public void set Match int match throws Core Exception ensure Model Editable Integer old Value new Integer this match this match match fire Property Changed P MATCH old Value new Integer match  setMatch CoreException ensureModelEditable oldValue firePropertyChanged P_MATCH oldValue
public void set Search Location int search Location throws Core Exception ensure Model Editable Integer old Value new Integer this search Location this search Location search Location fire Property Changed P SEARCH LOCATION old Value new Integer search Location  setSearchLocation searchLocation CoreException ensureModelEditable oldValue searchLocation searchLocation searchLocation firePropertyChanged P_SEARCH_LOCATION oldValue searchLocation
public void set Optional boolean optional throws Core Exception ensure Model Editable Object old Value new Boolean this optional this optional optional fire Property Changed P NAME old Value new Boolean optional  setOptional CoreException ensureModelEditable oldValue firePropertyChanged P_NAME oldValue
public void setOS String os throws Core Exception ensure Model Editable Object old Value this os this os os fire Property Changed P OS old Value os  CoreException ensureModelEditable oldValue firePropertyChanged P_OS oldValue
public void setWS String ws throws Core Exception ensure Model Editable Object old Value this ws this ws ws fire Property Changed P WS old Value ws  CoreException ensureModelEditable oldValue firePropertyChanged P_WS oldValue
public void set Arch String arch throws Core Exception ensure Model Editable Object old Value this arch this arch arch fire Property Changed P ARCH old Value arch  setArch CoreException ensureModelEditable oldValue firePropertyChanged P_ARCH oldValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P VERSION set Version String new Value else if name equals P OPTIONAL set Optional Boolean new Value boolean Value else if name equals P NAME set Name String new Value else if name equals P MATCH set Match new Value null Integer new Value int Value NONE else if name equals P OS setOS String new Value else if name equals P WS setWS String new Value else if name equals P ARCH set Arch String new Value else if name equals P SEARCH LOCATION set Search Location new Value null Integer new Value int Value ROOT else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_VERSION setVersion newValue P_OPTIONAL setOptional newValue booleanValue P_NAME setName newValue P_MATCH setMatch newValue newValue intValue P_OS newValue P_WS newValue P_ARCH setArch newValue P_SEARCH_LOCATION setSearchLocation newValue newValue intValue restoreProperty oldValue newValue
public void set Id String id throws Core Exception super set Id id hook With Workspace  setId CoreException setId hookWithWorkspace
see I Writable write String Print Writer public void write String indent Print Writer writer writer print indent includes NON NLS 1 String indent2 indent Feature INDENT Feature INDENT if get Id null writer println writer print indent2 id get Id NON NLS 1 NON NLS 2 if get Version null writer println writer print indent2 version get Version NON NLS 1 NON NLS 2 if get Name null writer println writer print indent2 name get Name NON NLS 1 NON NLS 2 if is Optional writer println writer print indent2 optional true NON NLS 1 if match NONE writer println writer print indent2 match RULE NAME TABLE match NON NLS 1 NON NLS 2 if getOS null writer println writer print indent2 os getOS NON NLS 1 NON NLS 2 if getWS null writer println writer print indent2 ws getWS NON NLS 1 NON NLS 2 if get Arch null writer println writer print indent2 arch get Arch NON NLS 1 NON NLS 2 if search Location ROOT writer println String value search Location SELF self both NON NLS 1 NON NLS 2 writer print indent2 search location value NON NLS 1 NON NLS 2 writer println NON NLS 1  IWritable PrintWriter PrintWriter getId getId getVersion getVersion getName getName isOptional RULE_NAME_TABLE getArch getArch searchLocation searchLocation search_location

private long install Size public Feature Data  installSize FeatureData
protected void reset super reset os null ws null nl null arch null download Size 0 install Size 0  downloadSize installSize
public boolean exists String location get Model get Install Location if location starts With file NON NLS 1 location location substring 5 File file new File location File separator get Id return file exists  getModel getInstallLocation startsWith getId
protected void parse Node node Hashtable line Table super parse node line Table bind Source Location node line Table os get Node Attribute node os NON NLS 1 ws get Node Attribute node ws NON NLS 1 nl get Node Attribute node nl NON NLS 1 arch get Node Attribute node arch NON NLS 1 download Size get Integer Attribute node download size NON NLS 1 install Size get Integer Attribute node install size NON NLS 1  lineTable lineTable bindSourceLocation lineTable getNodeAttribute getNodeAttribute getNodeAttribute getNodeAttribute downloadSize getIntegerAttribute installSize getIntegerAttribute
protected void write Attributes String indent2 Print Writer writer if get Id null writer println writer print indent2 id get Id NON NLS 1 NON NLS 2 if getOS null writer println writer print indent2 os getOS NON NLS 1 NON NLS 2 if getWS null writer println writer print indent2 ws getWS NON NLS 1 NON NLS 2 if getNL null writer println writer print indent2 nl getNL NON NLS 1 NON NLS 2 if get Arch null writer println writer print indent2 arch get Arch NON NLS 1 NON NLS 2 writer println writer print indent2 download size get Download Size NON NLS 1 NON NLS 2 writer println writer print indent2 install size get Install Size NON NLS 1 NON NLS 2  writeAttributes PrintWriter getId getId getArch getArch getDownloadSize getInstallSize
public void write String indent Print Writer writer writer print indent data NON NLS 1 String indent2 indent Feature INDENT Feature INDENT write Attributes indent2 writer writer println NON NLS 1 writer println indent data  PrintWriter writeAttributes
Gets the os return Returns a String public String getOS return os 
Sets the os param os The os to set public void setOS String os throws Core Exception ensure Model Editable Object old Value this os this os os fire Property Changed P OS old Value os  CoreException ensureModelEditable oldValue firePropertyChanged P_OS oldValue
Gets the ws return Returns a String public String getWS return ws 
Sets the ws param ws The ws to set public void setWS String ws throws Core Exception ensure Model Editable Object old Value this ws this ws ws fire Property Changed P WS old Value ws  CoreException ensureModelEditable oldValue firePropertyChanged P_WS oldValue
Gets the nl return Returns a String public String getNL return nl 
Sets the nl param nl The nl to set public void setNL String nl throws Core Exception ensure Model Editable Object old Value this nl this nl nl fire Property Changed P NL old Value nl  CoreException ensureModelEditable oldValue firePropertyChanged P_NL oldValue
Gets the arch return Returns a String public String get Arch return arch  getArch
Sets the arch param arch The arch to set public void set Arch String arch throws Core Exception ensure Model Editable Object old Value this arch this arch arch fire Property Changed P ARCH old Value arch  setArch CoreException ensureModelEditable oldValue firePropertyChanged P_ARCH oldValue
Gets the download Size return Returns a int public long get Download Size return download Size  downloadSize getDownloadSize downloadSize
Sets the download Size param download Size The download Size to set public void set Download Size long download Size throws Core Exception ensure Model Editable Object old Value new Long this download Size this download Size download Size fire Property Changed P DOWNLOAD SIZE old Value new Long download Size  downloadSize downloadSize downloadSize setDownloadSize downloadSize CoreException ensureModelEditable oldValue downloadSize downloadSize downloadSize firePropertyChanged P_DOWNLOAD_SIZE oldValue downloadSize
Gets the install Size return Returns a int public long get Install Size return install Size  installSize getInstallSize installSize
Sets the install Size param install Size The install Size to set public void set Install Size long install Size throws Core Exception ensure Model Editable Object old Value new Long this install Size this install Size install Size fire Property Changed P INSTALL SIZE old Value new Long install Size  installSize installSize installSize setInstallSize installSize CoreException ensureModelEditable oldValue installSize installSize installSize firePropertyChanged P_INSTALL_SIZE oldValue installSize
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P OS setOS String new Value else if name equals P WS setWS String new Value else if name equals P NL setNL String new Value else if name equals P ARCH set Arch String new Value else if name equals P DOWNLOAD SIZE set Download Size new Value null Integer new Value int Value 0 else if name equals P INSTALL SIZE set Install Size new Value null Integer new Value int Value 0 else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_OS newValue P_WS newValue P_NL newValue P_ARCH setArch newValue P_DOWNLOAD_SIZE setDownloadSize newValue newValue intValue P_INSTALL_SIZE setInstallSize newValue newValue intValue restoreProperty oldValue newValue
public String get Label return get Id  getLabel getId
public String to String return get Label  toString getLabel

private I Feature Model model public Feature Factory I Feature Model model this model model  IFeatureModel FeatureFactory IFeatureModel
public I Feature Plugin create Plugin Feature Plugin plugin new Feature Plugin plugin model model plugin parent model get Feature return plugin  IFeaturePlugin createPlugin FeaturePlugin FeaturePlugin getFeature
public I Feature Data create Data Feature Data data new Feature Data data model model data parent model get Feature return data  IFeatureData createData FeatureData FeatureData getFeature
public I Feature Child create Child Feature Child child new Feature Child child model model child parent model get Feature return child  IFeatureChild createChild FeatureChild FeatureChild getFeature
public I Feature Import create Import Feature Import iimport new Feature Import iimport model model iimport parent model get Feature return iimport  IFeatureImport createImport FeatureImport FeatureImport getFeature
public I FeatureURL createURL FeatureURL url new FeatureURL url model model url parent model get Feature return url  IFeatureURL getFeature
public I Feature Install Handler create Install Handler Feature Install Handler handler new Feature Install Handler handler model model handler parent model get Feature return handler  IFeatureInstallHandler createInstallHandler FeatureInstallHandler FeatureInstallHandler getFeature
public I Feature Info create Info int index Feature Info info new Feature Info index info model model info parent model get Feature return info  IFeatureInfo createInfo FeatureInfo FeatureInfo getFeature
public I FeatureURL Element createURL Element I FeatureURL parent int element Type FeatureURL Element element new FeatureURL Element element Type element model model element parent parent return element  IFeatureURLElement createURLElement IFeatureURL elementType FeatureURLElement FeatureURLElement elementType

private String arch public Feature Import  FeatureImport
public I Plugin get Plugin return plugin  IPlugin getPlugin
public I Feature get Feature return feature  IFeature getFeature
public int get Id Match return id Match  getIdMatch idMatch
public void set Plugin I Plugin plugin this plugin plugin  setPlugin IPlugin
public void set Feature I Feature feature this feature feature  setFeature IFeature
public String getOS return os 
public String getWS return ws 
public String get Arch return arch  getArch
protected void reset super reset patch false type PLUGIN match NONE id Match PERFECT arch null os null ws null  idMatch
protected void parse Node node Hashtable line Table super parse node line Table bind Source Location node line Table this id get Node Attribute node plugin NON NLS 1 if id null type PLUGIN else this id get Node Attribute node feature NON NLS 1 if id null type FEATURE this os get Node Attribute node os NON NLS 1 this ws get Node Attribute node ws NON NLS 1 this arch get Node Attribute node arch NON NLS 1 String mvalue get Node Attribute node match NON NLS 1 if mvalue null mvalue length 0 String choices RULE NAME TABLE for int i 0 i choices length i if mvalue equals Ignore Case choices i match i break mvalue get Node Attribute node id match NON NLS 1 if mvalue null mvalue length 0 if mvalue equals Ignore Case RULE PREFIX id Match PREFIX patch get Boolean Attribute node patch NON NLS 1 if id null if type PLUGIN set Plugin PDE Core get Default find Plugin id get Version match else set Feature PDE Core get Default find Feature id get Version match  lineTable lineTable bindSourceLocation lineTable getNodeAttribute getNodeAttribute getNodeAttribute getNodeAttribute getNodeAttribute getNodeAttribute RULE_NAME_TABLE equalsIgnoreCase getNodeAttribute equalsIgnoreCase RULE_PREFIX idMatch getBooleanAttribute setPlugin PDECore getDefault findPlugin getVersion setFeature PDECore getDefault findFeature getVersion
public void load From I Feature feature reset this feature feature type FEATURE id feature get Id version feature get Version  loadFrom IFeature getId getVersion
public int get Match return match  getMatch
public void set Match int match throws Core Exception ensure Model Editable Integer old Value new Integer this match this match match fire Property Changed P MATCH old Value new Integer match  setMatch CoreException ensureModelEditable oldValue firePropertyChanged P_MATCH oldValue
public void set Id Match int id Match throws Core Exception ensure Model Editable Integer old Value new Integer this id Match this id Match id Match fire Property Changed P ID MATCH old Value new Integer id Match  setIdMatch idMatch CoreException ensureModelEditable oldValue idMatch idMatch idMatch firePropertyChanged P_ID_MATCH oldValue idMatch
public int get Type return type  getType
public void set Type int type throws Core Exception ensure Model Editable Integer old Value new Integer this type this type type fire Property Changed P TYPE old Value new Integer type  setType CoreException ensureModelEditable oldValue firePropertyChanged P_TYPE oldValue
public boolean is Patch return patch  isPatch
public void set Patch boolean patch throws Core Exception ensure Model Editable Boolean old Value new Boolean this patch this patch patch fire Property Changed P PATCH old Value new Boolean patch  setPatch CoreException ensureModelEditable oldValue firePropertyChanged P_PATCH oldValue
public void setOS String os throws Core Exception ensure Model Editable String old Value this os this os os fire Property Changed P OS old Value os  CoreException ensureModelEditable oldValue firePropertyChanged P_OS oldValue
public void setWS String ws throws Core Exception ensure Model Editable String old Value this ws this ws ws fire Property Changed P WS old Value ws  CoreException ensureModelEditable oldValue firePropertyChanged P_WS oldValue
public void set Arch String arch throws Core Exception ensure Model Editable String old Value this arch this arch arch fire Property Changed P ARCH old Value arch  setArch CoreException ensureModelEditable oldValue firePropertyChanged P_ARCH oldValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P MATCH set Match new Value null Integer new Value int Value 0 else if name equals P ID MATCH set Id Match new Value null Integer new Value int Value 0 else if name equals P TYPE set Type new Value null Integer new Value int Value PLUGIN else if name equals P PATCH set Patch new Value null Boolean new Value boolean Value false else if name equals P OS setOS String new Value else if name equals P WS setWS String new Value else if name equals P ARCH set Arch String new Value else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_MATCH setMatch newValue newValue intValue P_ID_MATCH setIdMatch newValue newValue intValue P_TYPE setType newValue newValue intValue P_PATCH setPatch newValue newValue booleanValue P_OS newValue P_WS newValue P_ARCH setArch newValue restoreProperty oldValue newValue
public void write String indent Print Writer writer String type Att type FEATURE feature plugin NON NLS 1 NON NLS 2 writer print indent import type Att get Id NON NLS 1 NON NLS 2 NON NLS 3 if get Version null writer print version get Version NON NLS 1 NON NLS 2 if patch match NONE writer print match RULE NAME TABLE match NON NLS 1 NON NLS 2 if id Match PREFIX writer print id match prefix NON NLS 1 if os null writer print os getOS NON NLS 1 NON NLS 2 if ws null writer print ws getWS NON NLS 1 NON NLS 2 if arch null writer print arch get Arch NON NLS 1 NON NLS 2 if patch writer print patch true NON NLS 1 writer println NON NLS 1  PrintWriter typeAtt typeAtt getId getVersion getVersion RULE_NAME_TABLE idMatch getArch
public String to String if plugin null return plugin get Translated Name else if feature null return feature get Label return get Id  toString getTranslatedName getLabel getId

private int index public Feature Info int index this index index  FeatureInfo
public int get Index return index  getIndex
private String get Tag return I Feature INFO TAGS index  getTag IFeature INFO_TAGS
see I Feature Info getURL public String getURL return url  IFeatureInfo
see I Feature Info get Description public String get Description return description  IFeatureInfo getDescription getDescription
public void setURL String url throws Core Exception ensure Model Editable Object old Value this url this url url fire Property Changed P URL old Value url  CoreException ensureModelEditable oldValue firePropertyChanged P_URL oldValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P DESC set Description new Value null new Value to String null else if name equals P URL setURL new Value null new Value to String null else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_DESC setDescription newValue newValue toString P_URL newValue newValue toString restoreProperty oldValue newValue
public void set Description String description throws Core Exception ensure Model Editable Object old Value this description this description description fire Property Changed P DESC old Value description  setDescription CoreException ensureModelEditable oldValue firePropertyChanged P_DESC oldValue
protected void parse Node node Hashtable line Table bind Source Location node line Table url get Node Attribute node url NON NLS 1 Node first Child node get First Child if first Child null description get Normalized Text first Child get Node Value  lineTable bindSourceLocation lineTable getNodeAttribute firstChild getFirstChild firstChild getNormalizedText firstChild getNodeValue
public void write String indent Print Writer writer String indent2 indent Feature INDENT String desc description null get Writable String description trim null writer println writer print indent get Tag NON NLS 1 if url null writer print url url NON NLS 1 NON NLS 2 writer println NON NLS 1 if desc null writer println indent2 desc writer println indent get Tag NON NLS 1 NON NLS 2  PrintWriter getWritableString getTag getTag
public boolean is Empty if url null return false String desc description null description trim null if desc null desc length 0 return false return true  isEmpty
public String to String switch index case I Feature INFO DESCRIPTION return PDE Core get Resource String KEY INFO DESCRIPTION case I Feature INFO LICENSE return PDE Core get Resource String KEY INFO LICENSE case I Feature INFO COPYRIGHT return PDE Core get Resource String KEY INFO COPYRIGHT return super to String  toString IFeature INFO_DESCRIPTION PDECore getResourceString KEY_INFO_DESCRIPTION IFeature INFO_LICENSE PDECore getResourceString KEY_INFO_LICENSE IFeature INFO_COPYRIGHT PDECore getResourceString KEY_INFO_COPYRIGHT toString

see I Feature Install Handler getURL public URL getURL return url  IFeatureInstallHandler
see I Feature Install Handler get Library public String get Library return library  IFeatureInstallHandler getLibrary getLibrary
see I Feature Install Handler get Class Name public String get Handler Name return handler Name  IFeatureInstallHandler getClassName getHandlerName handlerName
public void setURL URL url throws Core Exception ensure Model Editable Object old Value this url this url url fire Property Changed P URL old Value url  CoreException ensureModelEditable oldValue firePropertyChanged P_URL oldValue
public void set Library String library throws Core Exception ensure Model Editable Object old Value this library this library library fire Property Changed P LIBRARY old Value library  setLibrary CoreException ensureModelEditable oldValue firePropertyChanged P_LIBRARY oldValue
public void set Handler Name String handler Name throws Core Exception ensure Model Editable Object old Value this handler Name this handler Name handler Name fire Property Changed P HANDLER NAME old Value handler Name  setHandlerName handlerName CoreException ensureModelEditable oldValue handlerName handlerName handlerName firePropertyChanged P_HANDLER_NAME oldValue handlerName
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P URL setURL URL new Value else if name equals P LIBRARY set Library String new Value else if name equals P HANDLER NAME set Handler Name String new Value else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_URL newValue P_LIBRARY setLibrary newValue P_HANDLER_NAME setHandlerName newValue restoreProperty oldValue newValue
protected void parse Node node Hashtable line Table bind Source Location node line Table String url Name get Node Attribute node url NON NLS 1 if url Name null try url new URL url Name catch MalformedURL Exception e library get Node Attribute node library NON NLS 1 handler Name get Node Attribute node handler NON NLS 1  lineTable bindSourceLocation lineTable urlName getNodeAttribute urlName urlName MalformedURLException getNodeAttribute handlerName getNodeAttribute
public void write String indent Print Writer writer writer print indent install handler NON NLS 1 if url null writer print url url to String NON NLS 1 NON NLS 2 if library null writer print library library NON NLS 1 NON NLS 2 if handler Name null writer print handler handler Name NON NLS 1 NON NLS 2 writer println NON NLS 1 writer println indent install handler  PrintWriter toString handlerName handlerName

protected int range void set In The Model boolean value in The Model value  setInTheModel inTheModel
public boolean is In The Model return in The Model  isInTheModel inTheModel
protected void ensure Model Editable throws Core Exception if model is Editable throw Core Exception PDE Core get Resource String Feature Object read Only Change NON NLS 1  ensureModelEditable CoreException isEditable throwCoreException PDECore getResourceString FeatureObject readOnlyChange
protected void fire Property Changed String property Object old Value Object new Value fire Property Changed this property old Value new Value  firePropertyChanged oldValue newValue firePropertyChanged oldValue newValue
protected void fire Property Changed I Feature Object object String property Object old Value Object new Value if model is Editable model instanceof I Model Change Provider I Model Change Provider provider I Model Change Provider model provider fire Model Object Changed object property old Value new Value  firePropertyChanged IFeatureObject oldValue newValue isEditable IModelChangeProvider IModelChangeProvider IModelChangeProvider fireModelObjectChanged oldValue newValue
protected void fire Structure Changed I Feature Object child int change Type fire Structure Changed new I Feature Object child change Type  fireStructureChanged IFeatureObject changeType fireStructureChanged IFeatureObject changeType
protected void fire Structure Changed I Feature Object children int change Type I Feature Model model get Model if model is Editable model instanceof I Model Change Provider I Model Change Provider provider I Model Change Provider model provider fire Model Changed new Model Changed Event provider change Type children null  fireStructureChanged IFeatureObject changeType IFeatureModel getModel isEditable IModelChangeProvider IModelChangeProvider IModelChangeProvider fireModelChanged ModelChangedEvent changeType
public I Feature get Feature return model get Feature  IFeature getFeature getFeature
return model get Feature public String get Label return label  getFeature getLabel
public String get Translatable Label if label null return NON NLS 1 return model get Resource String label  getTranslatableLabel getResourceString
return model get Resource String label public I Feature Model get Model return model  getResourceString IFeatureModel getModel
String get Node Attribute Node node String name Node attribute node get Attributes get Named Item name if attribute null return attribute get Node Value return null  getNodeAttribute getAttributes getNamedItem getNodeValue
int get Integer Attribute Node node String name String value get Node Attribute node name if value null try return Integer parse Int value catch Number Format Exception e return 0  getIntegerAttribute getNodeAttribute parseInt NumberFormatException
boolean get Boolean Attribute Node node String name String value get Node Attribute node name if value null return value equals Ignore Case true NON NLS 1 return false  getBooleanAttribute getNodeAttribute equalsIgnoreCase
protected String get Normalized Text String source String result source replace t result result trim return result boolean skip false String Buffer buff new String Buffer for int i 0 i result length i char c result char At i if c n skip true else if c if skip continue else skip false buff append c return buff to String  getNormalizedText StringBuffer StringBuffer charAt toString
public I Feature Object get Parent return parent  IFeatureObject getParent
protected void parse Node node Hashtable line Table label get Node Attribute node label NON NLS 1  lineTable getNodeAttribute
protected void reset label null 
public void set Label String new Label throws Core Exception ensure Model Editable Object old Value this label label new Label fire Property Changed P LABEL old Value new Label  setLabel newLabel CoreException ensureModelEditable oldValue newLabel firePropertyChanged P_LABEL oldValue newLabel
protected void throw Core Exception String message throws Core Exception Status status new Status I Status ERROR PDE Core get Plugin Id I Status OK message null Core Exception ce new Core Exception status ce fill In Stack Trace throw ce  throwCoreException CoreException IStatus PDECore getPluginId IStatus CoreException CoreException fillInStackTrace
public static String get Writable String String source if source null return NON NLS 1 String Buffer buf new String Buffer for int i 0 i source length i char c source char At i switch c case buf append amp NON NLS 1 break case buf append lt NON NLS 1 break case buf append gt NON NLS 1 break case buf append apos NON NLS 1 break case buf append quot NON NLS 1 break default buf append c break return buf to String  getWritableString StringBuffer StringBuffer charAt toString
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P LABEL set Label new Value null new Value to String null  restoreProperty oldValue newValue CoreException P_LABEL setLabel newValue newValue toString
public void write String indent Print Writer writer  PrintWriter
public void write String indent Print Writer writer public void set Model I Feature Model model this model model  PrintWriter setModel IFeatureModel
public void set Parent I Feature Object parent this parent parent  setParent IFeatureObject
void bind Source Location Node node Map line Table Integer lines Integer line Table get node if lines null range new int 2 range 0 lines 0 int Value range 1 lines 1 int Value  bindSourceLocation lineTable lineTable intValue intValue
public int get Start Line if range null return 1 return range 0  getStartLine
public int get Stop Line if range null return 1 return range 1  getStopLine

private String version public Feature Plugin  FeaturePlugin
protected void reset super reset version null fragment false 
public boolean is Fragment return fragment  isFragment
public I Plugin Base get Plugin Base return plugin Base  IPluginBase getPluginBase pluginBase
return plugin Base public String get Version return version  pluginBase getVersion
public void set Version String version throws Core Exception ensure Model Editable Object old Value this version this version version fire Property Changed this P VERSION old Value version  setVersion CoreException ensureModelEditable oldValue firePropertyChanged P_VERSION oldValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P VERSION set Version new Value null new Value to String null else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_VERSION setVersion newValue newValue toString restoreProperty oldValue newValue
public void set Fragment boolean fragment throws Core Exception ensure Model Editable this fragment fragment  setFragment CoreException ensureModelEditable
protected void parse Node node Hashtable line Table super parse node line Table version get Node Attribute node version NON NLS 1 String f get Node Attribute node fragment NON NLS 1 if f null f equals Ignore Case true NON NLS 1 fragment true if id null version null hook With Workspace  lineTable lineTable getNodeAttribute getNodeAttribute equalsIgnoreCase hookWithWorkspace
public void hook With Workspace Plugin Model Manager manager PDE Core get Default get Model Manager Model Entry entry manager find Entry id if entry null I Plugin Model Base model entry get Active Model if fragment model instanceof I Fragment Model plugin Base model get Plugin Base else if fragment model instanceof I Plugin Model plugin Base model get Plugin Base  hookWithWorkspace PluginModelManager PDECore getDefault getModelManager ModelEntry findEntry IPluginModelBase getActiveModel IFragmentModel pluginBase getPluginBase IPluginModel pluginBase getPluginBase
public void load From I Plugin Base plugin id plugin get Id label plugin get Translated Name version plugin get Version fragment plugin instanceof I Fragment this plugin Base plugin  loadFrom IPluginBase getId getTranslatedName getVersion IFragment pluginBase
public void write String indent Print Writer writer writer print indent plugin NON NLS 1 String indent2 indent Feature INDENT Feature INDENT write Attributes indent2 writer if get Version null writer println writer print indent2 version get Version NON NLS 1 NON NLS 2 if is Fragment writer println writer print indent2 fragment true NON NLS 1 writer println NON NLS 1 writer println indent plugin  PrintWriter writeAttributes getVersion getVersion isFragment
public String get Label if plugin Base null return plugin Base get Translated Name String name super get Label if name null name get Id return name  getLabel pluginBase pluginBase getTranslatedName getLabel getId
public String to String return get Label  toString getLabel

public void add Discovery I FeatureURL Element discovery throws Core Exception ensure Model Editable discoveries add discovery FeatureURL Element discovery set In The Model true fire Structure Changed discovery I Model Changed Event INSERT  addDiscovery IFeatureURLElement CoreException ensureModelEditable FeatureURLElement setInTheModel fireStructureChanged IModelChangedEvent
public void add Update I FeatureURL Element update throws Core Exception ensure Model Editable updates add update FeatureURL Element update set In The Model true fire Structure Changed update I Model Changed Event INSERT  addUpdate IFeatureURLElement CoreException ensureModelEditable FeatureURLElement setInTheModel fireStructureChanged IModelChangedEvent
public I FeatureURL Element get Discoveries I FeatureURL Element result new I FeatureURL Element discoveries size discoveries copy Into result return result  IFeatureURLElement getDiscoveries IFeatureURLElement IFeatureURLElement copyInto
public I FeatureURL Element get Updates I FeatureURL Element result new I FeatureURL Element updates size updates copy Into result return result  IFeatureURLElement getUpdates IFeatureURLElement IFeatureURLElement copyInto
protected void parse Node node Hashtable line Table Node List children node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE String tag child get Node Name to Lower Case int url Type 1 if tag equals update NON NLS 1 url Type I FeatureURL Element UPDATE else if tag equals discovery NON NLS 1 url Type I FeatureURL Element DISCOVERY if url Type 1 I FeatureURL Element element get Model get Factory createURL Element this url Type FeatureURL Element element parse child line Table if url Type I FeatureURL Element UPDATE FeatureURL Element element set In The Model true updates add element else if url Type I FeatureURL Element DISCOVERY FeatureURL Element element set In The Model true discoveries add element  lineTable NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName toLowerCase urlType urlType IFeatureURLElement urlType IFeatureURLElement urlType IFeatureURLElement getModel getFactory createURLElement urlType FeatureURLElement lineTable urlType IFeatureURLElement FeatureURLElement setInTheModel urlType IFeatureURLElement FeatureURLElement setInTheModel
public void remove Discovery I FeatureURL Element discovery throws Core Exception ensure Model Editable discoveries remove discovery FeatureURL Element discovery set In The Model false fire Structure Changed discovery I Model Changed Event REMOVE  removeDiscovery IFeatureURLElement CoreException ensureModelEditable FeatureURLElement setInTheModel fireStructureChanged IModelChangedEvent
public void remove Update I FeatureURL Element update throws Core Exception ensure Model Editable FeatureURL Element update set In The Model false updates remove update fire Structure Changed update I Model Changed Event REMOVE  removeUpdate IFeatureURLElement CoreException ensureModelEditable FeatureURLElement setInTheModel fireStructureChanged IModelChangedEvent
public void write String indent Print Writer writer writer println indent url NON NLS 1 String indent2 indent Feature INDENT for int i 0 i updates size i I FeatureURL Element element I FeatureURL Element updates element At i element write indent2 writer for int i 0 i discoveries size i I FeatureURL Element element I FeatureURL Element discoveries element At i element write indent2 writer writer println indent url NON NLS 1  PrintWriter IFeatureURLElement IFeatureURLElement elementAt IFeatureURLElement IFeatureURLElement elementAt

private URL url public FeatureURL Element int element Type this element Type element Type  FeatureURLElement elementType elementType elementType
this element Type element Type public FeatureURL Element int element Type URL url this element Type element Type this url url  elementType elementType FeatureURLElement elementType elementType elementType
this url url public int get Element Type return element Type  getElementType elementType
return element Type public URL getURL return url  elementType
return url public int get Site Type return site Type  getSiteType siteType
protected void parse Node node Hashtable line Table super parse node line Table bind Source Location node line Table String url Name get Node Attribute node url NON NLS 1 try url new URL url Name catch MalformedURL Exception e String type Name get Node Attribute node type NON NLS 1 if type Name null type Name equals web NON NLS 1 site Type WEB SITE  lineTable lineTable bindSourceLocation lineTable urlName getNodeAttribute urlName MalformedURLException typeName getNodeAttribute typeName typeName siteType WEB_SITE
public void setURL URL url throws Core Exception ensure Model Editable Object old Value this url this url url fire Property Changed this P URL old Value url  CoreException ensureModelEditable oldValue firePropertyChanged P_URL oldValue
public void set Site Type int type throws Core Exception ensure Model Editable Integer old Value new Integer this site Type this site Type type fire Property Changed this P URL old Value new Integer type  setSiteType CoreException ensureModelEditable oldValue siteType siteType firePropertyChanged P_URL oldValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P URL setURL URL new Value else if name equals P SITE TYPE set Site Type Integer new Value int Value else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_URL newValue P_SITE_TYPE setSiteType newValue intValue restoreProperty oldValue newValue
public String to String if label null return label if url null return url to String return super to String  toString toString toString
public void write String indent Print Writer writer String tag null switch element Type case UPDATE tag update NON NLS 1 break case DISCOVERY tag discovery NON NLS 1 break if tag null return writer print indent tag NON NLS 1 if label null writer print label get Writable String label NON NLS 1 NON NLS 2 if url null writer print url get Writable String url to String NON NLS 1 NON NLS 2 if site Type WEB SITE writer print type web NON NLS 1 writer println NON NLS 1  PrintWriter elementType getWritableString getWritableString toString siteType WEB_SITE

protected String id public String get Id return id  getId
protected void parse Node node Hashtable line Table super parse node line Table id get Node Attribute node id NON NLS 1  lineTable lineTable getNodeAttribute
public void set Id String id throws Core Exception ensure Model Editable Object old Value this id this id id fire Property Changed this P ID old Value id  setId CoreException ensureModelEditable oldValue firePropertyChanged P_ID oldValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P ID set Id new Value null new Value to String null else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_ID setId newValue newValue toString restoreProperty oldValue newValue
protected void reset super reset id null 

protected String version public String get Version return version  getVersion
protected void parse Node node Hashtable line Table super parse node line Table version get Node Attribute node version NON NLS 1  lineTable lineTable getNodeAttribute
public void set Version String version throws Core Exception ensure Model Editable Object old Value this version this version version fire Property Changed this P VERSION old Value version  setVersion CoreException ensureModelEditable oldValue firePropertyChanged P_VERSION oldValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P VERSION set Version new Value null new Value to String null else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_VERSION setVersion newValue newValue toString restoreProperty oldValue newValue
protected void reset super reset version null 

private boolean editable true public Workspace Feature Model super  WorkspaceFeatureModel
super public Workspace Feature Model I File file set File file  WorkspaceFeatureModel IFile setFile
set File file public void fire Model Changed I Model Changed Event event set Dirty event get Change Type I Model Changed Event WORLD CHANGED super fire Model Changed event  setFile fireModelChanged IModelChangedEvent setDirty getChangeType IModelChangedEvent WORLD_CHANGED fireModelChanged
protected NL Resource Helper createNL Resource Helper try I Path path file get Location remove Last Segments 1 String install Location path toOS String if install Location starts With file false NON NLS 1 install Location file install Location NON NLS 1 URL url new URL install Location NON NLS 1 String name feature NON NLS 1 NL Resource Helper helper new NL Resource Helper name new URL url helper set File file return helper catch MalformedURL Exception e return null  NLResourceHelper createNLResourceHelper IPath getLocation removeLastSegments installLocation toOSString installLocation startsWith installLocation installLocation installLocation NLResourceHelper NLResourceHelper setFile MalformedURLException
public String get Contents String Writer swriter new String Writer Print Writer writer new Print Writer swriter loaded true save writer writer flush try swriter close catch IO Exception e return swriter to String  getContents StringWriter StringWriter PrintWriter PrintWriter IOException toString
return swriter to String public I File get File return file  toString IFile getFile
return file public String get Install Location return file get Parent get Location toOS String  getInstallLocation getParent getLocation toOSString
return file get Parent get Location toOS String public I Resource get Underlying Resource return file  getParent getLocation toOSString IResource getUnderlyingResource
return file public boolean is Dirty return dirty  isDirty
return dirty public boolean is Editable return editable  isEditable
public boolean is In Sync return is In Sync file get Location to File  isInSync isInSync getLocation toFile
protected void update Time Stamp update Time Stamp file get Location to File  updateTimeStamp updateTimeStamp getLocation toFile
public void load if file null return if file exists boolean out Of Sync false Input Stream stream null try stream file get Contents false catch Core Exception e out Of Sync true try stream file get Contents true catch Core Exception ex return try load stream out Of Sync stream close catch Core Exception e catch IO Exception e PDE Core log Exception e else this feature new Feature feature model this loaded true  outOfSync InputStream getContents CoreException outOfSync getContents CoreException outOfSync CoreException IOException PDECore logException
public void save if file null return try String contents get Contents Byte Array Input Stream stream new Byte Array Input Stream contents get Bytes UTF8 NON NLS 1 if file exists file set Contents stream false false null else file create stream false null stream close catch Core Exception e PDE Core log Exception e catch IO Exception e  getContents ByteArrayInputStream ByteArrayInputStream getBytes setContents CoreException PDECore logException IOException
public void save Print Writer writer if is Loaded writer println xml version 1 0 encoding UTF 8 NON NLS 1 writer println DOCTYPE feature SYSTEM dtd feature dtd feature write writer NON NLS 1 set Dirty false  PrintWriter isLoaded setDirty
set Dirty false public void set Dirty boolean dirty this dirty dirty  setDirty setDirty
this dirty dirty public void set Editable boolean new Editable editable new Editable  setEditable newEditable newEditable
editable new Editable public void set File I File new File file new File set Editable new File is Read Only false  newEditable setFile IFile newFile newFile setEditable newFile isReadOnly

Constructor for File Adapter public File Adapter File Adapter parent File file I File Adapter Factory factory this file file this parent parent this factory factory  FileAdapter FileAdapter FileAdapter IFileAdapterFactory
public boolean is Manifest String file Name file get Name return file Name equals plugin xml file Name equals fragment xml file Name equals Ignore Case manifest mf NON NLS 1 NON NLS 2 NON NLS 3  isManifest fileName getName fileName fileName fileName equalsIgnoreCase
return file Name equals plugin xml file Name equals fragment xml file Name equals Ignore Case manifest mf NON NLS 1 NON NLS 2 NON NLS 3 public boolean is Schema String file Name file get Name to Lower Case return file Name ends With mxsd file Name ends With exsd NON NLS 1 NON NLS 2  fileName fileName fileName equalsIgnoreCase isSchema fileName getName toLowerCase fileName endsWith fileName endsWith
public File Adapter get Parent return parent  FileAdapter getParent
public void set Editor Id String editor Id this editor Id editor Id  setEditorId editorId editorId editorId
public String get Editor Id return editor Id  getEditorId editorId
public File get File return file  getFile
public boolean is Directory return file is Directory  isDirectory isDirectory
public boolean has Children if file is Directory false return false if children null create Children return children length 0  hasChildren isDirectory createChildren
public Object get Children if file is Directory children null create Children return children null children new Object 0  getChildren isDirectory createChildren
private void create Children File files file list Files children new Object files length for int i 0 i files length i if factory null children i new File Adapter this files i null else children i factory create Adapter Child this files i  createChildren listFiles FileAdapter createAdapterChild

public interface I Bundle void set Header String key String value  IBundle setHeader
void set Header String key String value String get Header String key  setHeader getHeader

public interface I Bundle Model extends I Model I Model Change Provider Returns the top level model object of this model return an object containing the manifest headers  IBundleModel IModel IModelChangeProvider
I Bundle get Bundle Returns the location of the file used to create the model return the location of the manifest file or samp null samp if the file is in a workspace  IBundle getBundle
public String get Install Location Tests whether this is a model of a fragment bundle return code true code if this is a fragment model code false code otherwise  getInstallLocation

Creates a new manifest header return a new manifest header instance 
Creates a new manifest header param key the manifest header key param value the manifest header value return a new manifest header instance 

public interface I Bundle Plugin Model Base extends I Plugin Model Base I Editable Returns the underlying OS Gi bundle model object if bundle manifest is present return OS Gi bundle model or code null code if bundle manifest is not present  IBundlePluginModelBase IPluginModelBase IEditable OSGi OSGi
I Bundle Model get Bundle Model Returns the model that is responsible for tracking extensions and extension points Typically this content is stored in plugin xml file return extensions model or code null code if not present  IBundleModel getBundleModel
I Shared Extensions Model get Extensions Model Sets the bundle manifest model for this adapter All calls related to data that is normally stored in this model e g plug in ID plug in name provider name etc will be delegated to it if not code null code param bundle Model the bundle model to use in this adapter or code null code if there is no bundle model  ISharedExtensionsModel getExtensionsModel bundleModel
void set Bundle Model I Bundle Model bundle Model Sets the extensions model for this adapter All the calls related to extensions and extension points will be delegated to this model if not code null code param extensions Model the model that stores extensions and extension points  setBundleModel IBundleModel bundleModel extensionsModel
void set Extensions Model I Shared Extensions Model extensions Model Factory method for creating a new import object This is important for maintaining the adapter because code I Plugin Base code returns an array of code I Plugin Import code objects for dependency information return a newly created import object  setExtensionsModel ISharedExtensionsModel extensionsModel IPluginBase IPluginImport
I Plugin Import create Import Factory method for creating a new runtime object This is important for maintaining the adapter because code I Plugin Base code returns an array of code I Plugin Library code objects for runtime information return a newly created plug in library object  IPluginImport createImport IPluginBase IPluginLibrary
I Plugin Library create Library Saves the adapter by delegating the operation to the underlying models that need saving  IPluginLibrary createLibrary

public interface I Bundle Plugin Model Provider Returns the parent bundle plug in model if the provider belongs to it return the parent bundle plug in model or code null code if the provider does not have a bundle plug in model parent  IBundlePluginModelProvider

public interface I Manifest Header Returns the header key String get Key  IManifestHeader getKey
String get Key Returns the header value String get Value  getKey getValue
Sets the name of the header This method will throw a Core Exception if the model is not editable param key the header key  CoreException
Sets the value of the header This method will throw a Core Exception if the model is not editable param value the header value  CoreException

static final String P ARCH arch NON NLS 1 String getOS  P_ARCH
String getOS String getWS 
String getOS String getWS String get Arch  getArch
String get Arch void setOS String os throws Core Exception  getArch CoreException
void setOS String os throws Core Exception void setWS String ws throws Core Exception  CoreException CoreException
void setOS String os throws Core Exception void setWS String ws throws Core Exception void set Arch String arch throws Core Exception  CoreException CoreException setArch CoreException

description copyright license NON NLS 1 NON NLS 2 NON NLS 3 Adds a plug in reference to this feature This method may throw a Core Exception if the model is not editable param reference a plug in reference to add  CoreException
public void add Plugins I Feature Plugin plugins throws Core Exception Adds a data reference to this feature This method may throw a Core Exception if the model is not editable param entries a data entries to add  addPlugins IFeaturePlugin CoreException CoreException
Adds included feature to this feature This method may throw a Core Exception if the model is not editable param features features to include public void add Included Features I Feature Child features  CoreException addIncludedFeatures IFeatureChild
Remove included feature from this feature This method may throw a Core Exception if the model is not editable param features included features to remove public void remove Included Features I Feature Child features  CoreException removeIncludedFeatures IFeatureChild
Adds a required plug in reference to this feature This method may throw a Core Exception if the model is not editable param reference a required plug in reference to add  CoreException
public void add Imports I Feature Import imports throws Core Exception Returns references to plug ins in this feature return an array of plug in references in this feature  addImports IFeatureImport CoreException
public I Feature Plugin get Plugins Returns references to data in this feature return an array of data references in this feature  IFeaturePlugin getPlugins
Returns references to required plug ins in this feature return an array of plug in references in this feature 
Returns references to included features return an array of feature references included in this feature 
Returns a feature provider name return the feature provider name or samp null samp if not set 
public String get Provider Name Returns a feature image name return the feature image name or samp null samp if not set  getProviderName
public String get Image Name I Plugin Model Base get Referenced Model I Feature Plugin reference  getImageName IPluginModelBase getReferencedModel IFeaturePlugin
I Plugin Model Base get Referenced Model I Feature Plugin reference Returns a feature URL model object return the feature URL model object or samp null samp if not set  IPluginModelBase getReferencedModel IFeaturePlugin
public I FeatureURL getURL public I Feature Install Handler get Install Handler  IFeatureURL IFeatureInstallHandler getInstallHandler
public I Feature Install Handler get Install Handler public void set Install Handler I Feature Install Handler handler throws Core Exception  IFeatureInstallHandler getInstallHandler setInstallHandler IFeatureInstallHandler CoreException
throws Core Exception public I Feature Info get Feature Info int index  CoreException IFeatureInfo getFeatureInfo
public I Feature Info get Feature Info int index public void set Feature Info I Feature Info info int index throws Core Exception  IFeatureInfo getFeatureInfo setFeatureInfo IFeatureInfo CoreException
Removes a plug in reference from this feature This method may throw a Core Exception if the model is not editable param plugin a plug in reference to remove  CoreException
public void remove Plugins I Feature Plugin plugins throws Core Exception Removes a data reference from this feature This method may throw a Core Exception if the model is not editable param entries data entries to remove  removePlugins IFeaturePlugin CoreException CoreException
public void remove Data I Feature Data entries throws Core Exception Removes a required plug in reference from this feature This method may throw a Core Exception if the model is not editable param iimport a required plug in reference to add  removeData IFeatureData CoreException CoreException
public void remove Imports I Feature Import imports throws Core Exception Sets the provider name of this feature This method may throw a Core Exception if the model is not editable param the new provider name  removeImports IFeatureImport CoreException CoreException
public void set Provider Name String provider Name throws Core Exception Sets the image name of this feature This method may throw a Core Exception if the model is not editable param the new image name  setProviderName providerName CoreException CoreException
public void set Image Name String image Name throws Core Exception Sets the URL model object of this feature param url The URL model object  setImageName imageName CoreException
public void setURL I FeatureURL url throws Core Exception public void compute Imports throws Core Exception  IFeatureURL CoreException computeImports CoreException
public void compute Imports throws Core Exception public String getNL  computeImports CoreException
public String getNL public void setNL String nl throws Core Exception  CoreException
public void setNL String nl throws Core Exception boolean is Primary  CoreException isPrimary
boolean is Primary public void set Primary boolean value throws Core Exception  isPrimary setPrimary CoreException
public void set Primary boolean value throws Core Exception boolean is Exclusive  setPrimary CoreException isExclusive
boolean is Exclusive public void set Exclusive boolean value throws Core Exception  isExclusive setExclusive CoreException
public void set Exclusive boolean value throws Core Exception String get Plugin  setExclusive CoreException getPlugin
String get Plugin void set Plugin String value throws Core Exception  getPlugin setPlugin CoreException
void set Plugin String value throws Core Exception String get Colocation Affinity  setPlugin CoreException getColocationAffinity
String get Colocation Affinity void set Colocation Affinity String value throws Core Exception  getColocationAffinity setColocationAffinity CoreException
String get Colocation Affinity void set Colocation Affinity String value throws Core Exception String get Application  getColocationAffinity setColocationAffinity CoreException getApplication
void set Colocation Affinity String value throws Core Exception String get Application void set Application String value throws Core Exception  setColocationAffinity CoreException getApplication setApplication CoreException
void set Application String value throws Core Exception boolean is Valid  setApplication CoreException isValid

int BOTH 2 String get Version  getVersion
String get Version void set Version String version throws Core Exception  getVersion setVersion CoreException
String get Version void set Version String version throws Core Exception boolean is Optional  getVersion setVersion CoreException isOptional
void set Version String version throws Core Exception boolean is Optional void set Optional boolean optional throws Core Exception  setVersion CoreException isOptional setOptional CoreException
boolean is Optional void set Optional boolean optional throws Core Exception String get Name  isOptional setOptional CoreException getName
void set Optional boolean optional throws Core Exception String get Name void set Name String name throws Core Exception  setOptional CoreException getName setName CoreException
String get Name void set Name String name throws Core Exception int get Search Location  getName setName CoreException getSearchLocation
void set Name String name throws Core Exception int get Search Location void set Search Location int location throws Core Exception  setName CoreException getSearchLocation setSearchLocation CoreException
int get Search Location void set Search Location int location throws Core Exception int get Match  getSearchLocation setSearchLocation CoreException getMatch
void set Search Location int location throws Core Exception int get Match void set Match int match throws Core Exception  setSearchLocation CoreException getMatch setMatch CoreException

public interface I Feature Data extends I Feature Entry Tests if the library that this object points to exists in the project  IFeatureData IFeatureEntry

String P INSTALL SIZE p install size NON NLS 1 Returns a comma separated list of the operating systems this plug in supports public String getOS  P_INSTALL_SIZE p_install_size
public String getOS Returns a comma separated list of the window systems this plug in supports public String getWS 
public String getWS Returns a comma separated list of the locales this plug in supports public String getNL 
public String getNL Returns a comma separated list of the architecture this plug in supports public String get Arch  getArch
public String get Arch Returns estimated download size of this plug in public long get Download Size  getArch getDownloadSize
public long get Download Size Returns estimated size of this plug in when installed public long get Install Size  getDownloadSize getInstallSize
public long get Install Size Sets a comma separated list of the operating systems this plug in supports public void setOS String os throws Core Exception  getInstallSize CoreException
public void setOS String os throws Core Exception Sets a comma separated list of the window systems this plug in supports public void setWS String ws throws Core Exception  CoreException CoreException
public void setWS String ws throws Core Exception Sets a comma separated list of the locales this plug in supports public void setNL String nl throws Core Exception  CoreException CoreException
public void setNL String nl throws Core Exception Sets a comma separated list of the archiecture this plug in supports public void set Arch String arch throws Core Exception  CoreException setArch CoreException
public void set Arch String arch throws Core Exception Sets the estimated download size of this plug in public void set Download Size long size throws Core Exception  setArch CoreException setDownloadSize CoreException
public void set Download Size long size throws Core Exception Sets the estimated size of this plug in when installed public void set Install Size long size throws Core Exception  setDownloadSize CoreException setInstallSize CoreException

int FEATURE 1 int get Type  getType
int get Type void set Type int type throws Core Exception  getType setType CoreException
void set Type int type throws Core Exception boolean is Patch  setType CoreException isPatch
boolean is Patch void set Patch boolean patch throws Core Exception  isPatch setPatch CoreException
void set Patch boolean patch throws Core Exception int get Id Match  setPatch CoreException getIdMatch
int get Id Match void set Id Match int id Match throws Core Exception  getIdMatch setIdMatch idMatch CoreException

String P DESC p desc NON NLS 1 public String getURL  P_DESC p_desc
public String getURL public String get Description  getDescription
public String get Description public void setURL String url throws Core Exception  getDescription CoreException
public void setURL String url throws Core Exception public void set Description String desc throws Core Exception  CoreException setDescription CoreException
public void set Description String desc throws Core Exception public boolean is Empty  setDescription CoreException isEmpty
public boolean is Empty public int get Index  isEmpty getIndex

String P HANDLER NAME handler Name NON NLS 1 public URL getURL  P_HANDLER_NAME handlerName
public URL getURL public String get Library  getLibrary
public URL getURL public String get Library public String get Handler Name  getLibrary getHandlerName
public String get Handler Name public void setURL URL url throws Core Exception  getHandlerName CoreException
public void setURL URL url throws Core Exception public void set Library String library throws Core Exception  CoreException setLibrary CoreException
public void setURL URL url throws Core Exception public void set Library String library throws Core Exception public void set Handler Name String handler Name throws Core Exception  CoreException setLibrary CoreException setHandlerName handlerName CoreException

public interface I Feature Model extends I Model I Model Change Provider Returns the top level model object return top level model object of the feature model  IFeatureModel IModel IModelChangeProvider
public I Feature get Feature Returns the factory that should be used to create new instances of model objects return feature model factory  IFeature getFeature
I Feature Model Factory get Factory Returns install location of the feature xml file in case of external files return install location for external files or samp null samp for models based on workspace resources  IFeatureModelFactory getFactory
public String get Install Location Tests whether this model is enabled return samp true samp if the model is enabled  getInstallLocation
public boolean is Enabled Enables or disables this model param enabled the new enable state  isEnabled

public interface I Feature Model Factory Creates a new plug in model object return new instance of the feature plug in object  IFeatureModelFactory
I Feature Plugin create Plugin Creates a new data model object return new instance of the feature data object  IFeaturePlugin createPlugin
I Feature Data create Data Creates a new feature child object return new instance of the feature child object  IFeatureData createData
I Feature Child create Child Creates a new import model object return new instance of the feature import object  IFeatureChild createChild
I Feature Import create Import Creates a new feature URL instance return a new feature URL instance  IFeatureImport createImport
I FeatureURL createURL Creates a new feature install handler return a new feature install handler  IFeatureURL
I Feature Install Handler create Install Handler public I Feature Info create Info int info  IFeatureInstallHandler createInstallHandler IFeatureInfo createInfo
public I Feature Info create Info int info Creates a new instance of a feature URL element for the provided URL parent and the type return a new URL element instance  IFeatureInfo createInfo

String P LABEL label NON NLS 1 Returns the top level feature model object return root feature object  P_LABEL
public I Feature get Feature Returns the label of this feature model object return feature object label  IFeature getFeature
String get Label Returns the feature model that owns this model object return the feature model  getLabel
I Feature Model get Model boolean is In The Model  IFeatureModel getModel isInTheModel
boolean is In The Model Returns the parent of this model object return the model object parent  isInTheModel
public I Feature Object get Parent Sets the new label of this model object This method may throw a Core Exception if the model is not editable param label the new label  IFeatureObject getParent CoreException

public interface I Feature Plugin extends I Feature Object I Versionable I Feature Entry Returns whether this is a reference to a fragment return samp true samp if this is a fragment samp false samp otherwise  IFeaturePlugin IFeatureObject IVersionable IFeatureEntry

public interface I FeatureURL extends I Feature Object Add a URL element that should be used to discover new Eclipse features This method may throw a Core Exception if the model is not editable param discovery a new discovery URL element  IFeatureURL IFeatureObject CoreException
public void add Discovery I FeatureURL Element discovery throws Core Exception Add a URL element that should be used to update Eclipse features This method may throw a Core Exception if the model is not editable param update a new update URL element  addDiscovery IFeatureURLElement CoreException CoreException
public void add Update I FeatureURL Element update throws Core Exception Return all URL elements that can be used to discover new Eclipse features return an array of URL features  addUpdate IFeatureURLElement CoreException
public I FeatureURL Element get Discoveries Return all URL elements that can be used to update new Eclipse features return an array of URL features  IFeatureURLElement getDiscoveries
public I FeatureURL Element get Updates Remove a URL element that should be used to discover new Eclipse features This method may throw a Core Exception if the model is not editable param discovery a discovery URL element to remove  IFeatureURLElement getUpdates CoreException
public void remove Discovery I FeatureURL Element discovery throws Core Exception Remove a URL element that should be used to update new Eclipse features This method may throw a Core Exception if the model is not editable param update an update URL element to remove  removeDiscovery IFeatureURLElement CoreException CoreException

public static final String P SITE TYPE site Type NON NLS 1 Returns the type of this URL element UPDATE or DISCOVERY public int get Element Type  P_SITE_TYPE siteType getElementType
Returns the type of the site with the specified URL return UPDATE SITE or WEB SITE  UPDATE_SITE WEB_SITE
public int get Site Type Returns the URL of this element return the URL  getSiteType
public URL getURL Sets the URL of this element This method will throw a Core Exception if the model is not editable param url the new URL  CoreException
public void setURL URL url throws Core Exception Sets the type of the site with the specified URL param UPDATE SITE or WEB SITE  CoreException UPDATE_SITE WEB_SITE

public static final String P VERSION version NON NLS 1 Returns a version of this object return the version of this object  P_VERSION
public String get Version Sets the version of this I Versonable to the provided value This method will throw Core Exception if object is not editable param version a new version of this object  getVersion IVersonable CoreException

public interface I File Adapter Factory public Object create Adapter Child File Adapter parent File file  IFileAdapterFactory createAdapterChild FileAdapter

public interface I Model Changed Listener Filter Tests if the listener should be accepted param listener the listener to test return code true code if the listener should pass the filter code false code otherwise  IModelChangedListenerFilter

public interface I Model Change Provider Extension extends I Model Change Provider Passes all the listeners to the target change provider param target the target provider param filter if not code null code the filter will be used to filter listeners that need to be transfered Listeners that do not pass the filter will be exempt from the transfer  IModelChangeProviderExtension IModelChangeProvider

public interface I Plugin Model Listener public void models Changed Plugin Model Delta delta  IPluginModelListener modelsChanged PluginModelDelta

String SINCE since NON NLS 1 Returns the Id of this section public String get Section Id  getSectionId

public static final String kind Table string java resource NON NLS 1 NON NLS 2 NON NLS 3 Returns optional name of the Java type this type must be based on only for JAVA kind public String get Based On  kindTable getBasedOn
public String get Based On Returns the kind of this attribute s value STRING JAVA or RESOURCE public int get Kind  getBasedOn getKind

public interface I Meta Element Returns a property attribute name whose value should be used to load element icon in the UI For example if icon property is set to icon and the element has an icon attribute that represents icon path relative to the plug in an attempt will be made to load that icon  IMetaElement
public String get Icon Property Returns a property attribute name whose value should be used to represent this element in the UI For example if this value is samp null samp and the name of the element is wizard that will be showing in the UI However if label property is set to name and the element has a name attribute whose value is Import Wizard that value will be used in the UI instead of wizard  getIconProperty

public interface I Plugin Location Provider Returns the path relative to the plug in with the provided id param plugin Id the identifier of the plug in for which a location is needed param relative Path the path relative to the plug in with the provided id return the resolved path or code null code if plug in with the required id cannot be found  IPluginLocationProvider pluginId relativePath

int REFRESH RENAME 3 Returns a reference to a schema element defined in this schema or samp null samp if not found param name name of the element to find  REFRESH_RENAME
I Schema Element find Element String name Returns an array of schema elements that can be children of the provided schema element The information is computed based on the grammar rules in this schema The computation ignores number of occurances of each element Therefore it will always return the same result even if there could be only one element of a certain type in the document and it already exists param element the parent element that is used for the calculation return an array of elements that can appear as children of the provided element according to the grammar of this schema  ISchemaElement findElement
I Schema Element get Candidate Children I Schema Element element Returns an array of document sections that are defined in this schema return an array of sections in this schema  ISchemaElement getCandidateChildren ISchemaElement
I Document Section get Document Sections Returns a number of elements with global scope defined in this schema return number of global elements  IDocumentSection getDocumentSections
public int get Element Count Returns a total number of elements after the included schemas have been resolved and their elements added to the list return the total number of elements including external schemas  getElementCount
public int get Resolved Element Count Returns an array of elements with the global scope defined in this schema return an array of global elements  getResolvedElementCount
public I Schema Element get Elements Returns an array of elements with the global scope defined in this schema and all the included schemas return an expanded array of global elements  ISchemaElement getElements
public I Schema Element get Resolved Elements Returns an Id of the extension point that is defined in this schema return extension point Id of this schema  ISchemaElement getResolvedElements
public String get Qualified Point Id public String get Point Id  getQualifiedPointId getPointId
public String get Point Id public void set Point Id String point Id throws Core Exception  getPointId setPointId pointId CoreException
public String get Point Id public void set Point Id String point Id throws Core Exception public String get Plugin Id  getPointId setPointId pointId CoreException getPluginId
public void set Point Id String point Id throws Core Exception public String get Plugin Id public void set Plugin Id String plugin Id throws Core Exception  setPointId pointId CoreException getPluginId setPluginId pluginId CoreException
public void set Plugin Id String plugin Id throws Core Exception Returns an object that holds a reference to this schema Descriptors are responsible for loading and disposing schema objects and could be implemented in various ways depending on whether the schema is defined inside the workspace or is referenced externally return schema descriptor that holds this schema  setPluginId pluginId CoreException
public I Schema Descriptor get Schema Descriptor Returns a URL that defines this schema s location return a URL that points to this schema s location  ISchemaDescriptor getSchemaDescriptor
public URL getURL Returns a list of elements that correspond to the samp include samp statements in the schema file Included schemas are incorporated into the model and references can be made to elements in the included files return an array of included schema elements or a zero size array if none 

public static final String use Table optional required default NON NLS 1 NON NLS 2 NON NLS 3 Returns the type of this attribute Attributes can only have simple types  useTable
public I Schema Simple Type get Type Returns the use mode of this attribute OPTIONAL REQUIRED or DEFAULT public int get Use  ISchemaSimpleType getType getUse
public int get Use Returns the default value of this attribute when use clause is DEFAULT public Object get Value  getUse getValue

public interface I Schema Attribute Provider Returns an attribute definition if one with the matching name is found in this provider return attribute object or samp null samp if none with the matching name is found  ISchemaAttributeProvider
public I Schema Attribute get Attribute String name public int get Attribute Count  ISchemaAttribute getAttribute getAttributeCount
public I Schema Attribute get Attribute String name public int get Attribute Count public I Schema Attribute get Attributes  ISchemaAttribute getAttribute getAttributeCount ISchemaAttribute getAttributes

public interface I Schema Complex Type extends I Schema Type I Schema Attribute Provider I Writable A complex type can have one root compositor return root complex type compositor  ISchemaComplexType ISchemaType ISchemaAttributeProvider IWritable
public I Schema Compositor get Compositor Returns whether the content of the element that owns this type can mix child elements and text return true if element can mix text and other elements  ISchemaCompositor getCompositor

all choice sequence group NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 Returns the number of children of this compositor return number of compositor children 
public int get Child Count Returns children of this compositor return compositor children  getChildCount
public I Schema Object get Children Returns a flag that defines how the children of this compositors should be treated when computing type grammar one of ALL CHOICE GROUP SEQUENCE return compositor kind value  ISchemaObject getChildren

public interface I Schema Descriptor extends I Plugin Location Provider Returns identifier of the extension point defined in this schema return id of the schema extension point  ISchemaDescriptor IPluginLocationProvider
public String get Point Id Returns the schema object If schema has not been loaded or has been previously disposed this method will load it before returning return a loaded schema object  getPointId
I Schema get Schema Returns the URL of the schema XML file return the URL of the schema XML file  ISchema getSchema
Tests if the descriptor is created outside the registry return code true code if the descriptor is outside the registry code false code otherwise 

public interface I Schema Element extends I Schema Object I Schema Repeatable I Schema Attribute Provider I Meta Element Returns an approximate representation of this element s content model in DTD form The resulting representation may not be accurate because XML schema is more powerful and provides for grammar definitions that are not possible with DT Ds param add Links if true the representation will contain HTML tags for quick access to referenced elements return DTD approximation of this element s grammar  ISchemaElement ISchemaObject ISchemaRepeatable ISchemaAttributeProvider IMetaElement DTDs addLinks
String getDTD Representation boolean add Links Returns type object that represents the type defined in this element The type can be simple defining an element that can only contain text or complex with attributes and or compositors  getDTDRepresentation addLinks

String P LOCATION location NON NLS 1 String get Location  P_LOCATION getLocation
String get Location void set Location String location throws Core Exception  getLocation setLocation CoreException
String get Location void set Location String location throws Core Exception I Schema get Included Schema  getLocation setLocation CoreException ISchema getIncludedSchema
void set Location String location throws Core Exception I Schema get Included Schema void dispose  setLocation CoreException ISchema getIncludedSchema

public static final String P NAME name NON NLS 1 Returns text associated with this schema object Typically it is annotation that will be used to compose the reference HTML documentation The text may contain HTML tags  P_NAME
public String get Description Returns the presentation name of this schema object public String get Name  getDescription getName
public String get Name Returns the parent of this schema object I Schema Object get Parent  getName ISchemaObject getParent
I Schema Object get Parent void set Parent I Schema Object parent  ISchemaObject getParent setParent ISchemaObject
void set Parent I Schema Object parent Returns the schema object to which this object belongs public I Schema get Schema  setParent ISchemaObject ISchema getSchema

public interface I Schema Object Reference Returns a name of this reference return reference object name  ISchemaObjectReference
public String get Name Returns a schema object that is referenced by this object return referenced schema object  getName
public I Schema Object get Referenced Object Returns a real Java class of the referenced object return Java class of the referenced object  ISchemaObject getReferencedObject
public Class get Referenced Object Class Associates this reference with a schema object param referenced Object associates this reference with the object it references  getReferencedObjectClass referencedObject

public interface I Schema Repeatable Returns maximal number of occurences of the object in the instance document return maximal number of occurences in the document  ISchemaRepeatable
public int get Max Occurs Returns minimal number of occurences of the object in the instance document return minimal number of occurences in the document  getMaxOccurs

public interface I Schema Restriction extends I Schema Object Returns the simple type to which this restriction applies return simple type to which this restriciton applies  ISchemaRestriction ISchemaObject
public I Schema Simple Type get Base Type Returns children of this restriction Actual types of the children depend on the restriction itself return restriction children objects  ISchemaSimpleType getBaseType
public Object get Children Tests if the provided value belongs to the value set defined by this restriction return true if the provided value is valid for this restriction  getChildren
boolean is Value Valid Object value Associates this restriction with the simple type object param base Type type object that owns this restriction  isValueValid baseType

public interface I Schema Simple Type extends I Schema Type I Writable Returns the restriction that narrows the value space of this type return restriction for this simple type or samp null samp if there is no restriction  ISchemaSimpleType ISchemaType IWritable

public interface I Schema Type Returns the logical name of this type return name of the type  ISchemaType
public String get Name Returns the schema object in which this type is defined return the top level schema object  getName
public I Schema get Schema public void set Schema I Schema schema  ISchema getSchema setSchema ISchema

String P DESCRIPTION description NON NLS 1 void set Type String type throws Core Exception  P_DESCRIPTION setType CoreException
void set Type String type throws Core Exception String get Type  setType CoreException getType
String get Type void setURL String url throws Core Exception  getType CoreException
void setURL String url throws Core Exception String getURL  CoreException
String getURL I Site Description get Description  ISiteDescription getDescription
I Site Description get Description void set Description I Site Description description throws Core Exception  ISiteDescription getDescription setDescription ISiteDescription CoreException
void set Description I Site Description description throws Core Exception void add Features I Site Feature features throws Core Exception  setDescription ISiteDescription CoreException addFeatures ISiteFeature CoreException
void add Features I Site Feature features throws Core Exception void add Archives I Site Archive archives throws Core Exception  addFeatures ISiteFeature CoreException addArchives ISiteArchive CoreException
void add Features I Site Feature features throws Core Exception void add Archives I Site Archive archives throws Core Exception void add Category Definitions I Site Category Definition defs throws Core Exception  addFeatures ISiteFeature CoreException addArchives ISiteArchive CoreException addCategoryDefinitions ISiteCategoryDefinition CoreException
throws Core Exception void remove Features I Site Feature features throws Core Exception  CoreException removeFeatures ISiteFeature CoreException
void remove Features I Site Feature features throws Core Exception void remove Archives I Site Archive archives throws Core Exception  removeFeatures ISiteFeature CoreException removeArchives ISiteArchive CoreException
void remove Features I Site Feature features throws Core Exception void remove Archives I Site Archive archives throws Core Exception void remove Category Definitions I Site Category Definition defs throws Core Exception  removeFeatures ISiteFeature CoreException removeArchives ISiteArchive CoreException removeCategoryDefinitions ISiteCategoryDefinition CoreException
throws Core Exception I Site Feature get Features  CoreException ISiteFeature getFeatures
I Site Feature get Features I Site Archive get Archives  ISiteFeature getFeatures ISiteArchive getArchives
I Site Feature get Features I Site Archive get Archives I Site Category Definition get Category Definitions  ISiteFeature getFeatures ISiteArchive getArchives ISiteCategoryDefinition getCategoryDefinitions
I Site Archive get Archives I Site Category Definition get Category Definitions boolean is Valid  ISiteArchive getArchives ISiteCategoryDefinition getCategoryDefinitions isValid

String P URL url NON NLS 1 String P PATH path NON NLS 1 String getURL  P_URL P_PATH
String P PATH path NON NLS 1 String getURL void setURL String url throws Core Exception  P_PATH CoreException
String getURL void setURL String url throws Core Exception String get Path  CoreException getPath
void setURL String url throws Core Exception String get Path void set Path String path throws Core Exception  CoreException getPath setPath CoreException

String P SCRUB OUTPUT scrub output NON NLS 1 I Path get Plugin Location  P_SCRUB_OUTPUT IPath getPluginLocation
I Path get Plugin Location I Path get Feature Location  IPath getPluginLocation IPath getFeatureLocation
I Path get Plugin Location I Path get Feature Location boolean get Scrub Output  IPath getPluginLocation IPath getFeatureLocation getScrubOutput
I Path get Feature Location boolean get Scrub Output boolean is Autobuild  IPath getFeatureLocation getScrubOutput isAutobuild
boolean get Scrub Output boolean is Autobuild void set Autobuild boolean value throws Core Exception  getScrubOutput isAutobuild setAutobuild CoreException
boolean is Autobuild void set Autobuild boolean value throws Core Exception void set Scrub Output boolean value throws Core Exception  isAutobuild setAutobuild CoreException setScrubOutput CoreException
void set Autobuild boolean value throws Core Exception void set Scrub Output boolean value throws Core Exception boolean get Show Console  setAutobuild CoreException setScrubOutput CoreException getShowConsole
void set Scrub Output boolean value throws Core Exception boolean get Show Console void set Show Console boolean value throws Core Exception  setScrubOutput CoreException getShowConsole setShowConsole CoreException
void set Show Console boolean value throws Core Exception void add Features I Site Build Feature features throws Core Exception  setShowConsole CoreException addFeatures ISiteBuildFeature CoreException
void add Features I Site Build Feature features throws Core Exception void remove Features I Site Build Feature features throws Core Exception  addFeatures ISiteBuildFeature CoreException removeFeatures ISiteBuildFeature CoreException
void add Features I Site Build Feature features throws Core Exception void remove Features I Site Build Feature features throws Core Exception I Site Build Feature get Features  addFeatures ISiteBuildFeature CoreException removeFeatures ISiteBuildFeature CoreException ISiteBuildFeature getFeatures
void remove Features I Site Build Feature features throws Core Exception I Site Build Feature get Features void reset References  removeFeatures ISiteBuildFeature CoreException ISiteBuildFeature getFeatures resetReferences

public interface I Site Build Feature extends I Versionable I Site Build Object I Feature get Referenced Feature  ISiteBuildFeature IVersionable ISiteBuildObject IFeature getReferencedFeature
public interface I Site Build Feature extends I Versionable I Site Build Object I Feature get Referenced Feature void set Referenced Feature I Feature feature  ISiteBuildFeature IVersionable ISiteBuildObject IFeature getReferencedFeature setReferencedFeature IFeature
I Feature get Referenced Feature void set Referenced Feature I Feature feature String get TargetURL  IFeature getReferencedFeature setReferencedFeature IFeature getTargetURL

public interface I Site Build Model extends I Model I Model Change Provider Returns the top level model object return top level model object of the site model  ISiteBuildModel IModel IModelChangeProvider
I Site Build get Site Build I Site Build create Site Build  ISiteBuild getSiteBuild ISiteBuild createSiteBuild
I Site Build create Site Build I Site Build Feature create Feature  ISiteBuild createSiteBuild ISiteBuildFeature createFeature
I Site Build Feature create Feature Returns install location of the site xml file in case of external files return install location for external files or samp null samp for models based on workspace resources  ISiteBuildFeature createFeature

public interface I Site Build Object extends I Writable I Adaptable Serializable Returns the top level site model object return root feature object  ISiteBuildObject IWritable IAdaptable
public I Site Build get Site Build Returns the site model that owns this model object return the site model  ISiteBuild getSiteBuild
I Site Build Model get Model boolean is In The Model  ISiteBuildModel getModel isInTheModel
boolean is In The Model Returns the parent of this model object return the model object parent  isInTheModel

String P NAME name NON NLS 1 String get Name  P_NAME getName
String get Name void set Name String name throws Core Exception  getName setName CoreException
void set Name String name throws Core Exception I Site Category Definition get Definition  setName CoreException ISiteCategoryDefinition getDefinition

String P NAME name NON NLS 1 String P DESCRIPTION description NON NLS 1 String get Name  P_NAME P_DESCRIPTION getName
String P DESCRIPTION description NON NLS 1 String get Name void set Name String name throws Core Exception  P_DESCRIPTION getName setName CoreException
String get Name void set Name String name throws Core Exception I Site Description get Description  getName setName CoreException ISiteDescription getDescription
void set Name String name throws Core Exception I Site Description get Description void set Description I Site Description description throws Core Exception  setName CoreException ISiteDescription getDescription setDescription ISiteDescription CoreException

String P TEXT text NON NLS 1 String getURL  P_TEXT
String getURL String get Text  getText
String get Text void setURL String url throws Core Exception  getText CoreException
void setURL String url throws Core Exception void set Text String text throws Core Exception  CoreException setText CoreException

String P ARCH arch NON NLS 1 String P PATCH patch NON NLS 1 void add Categories I Site Category categories throws Core Exception  P_ARCH P_PATCH addCategories ISiteCategory CoreException
String P PATCH patch NON NLS 1 void add Categories I Site Category categories throws Core Exception void remove Categories I Site Category categories throws Core Exception  P_PATCH addCategories ISiteCategory CoreException removeCategories ISiteCategory CoreException
void add Categories I Site Category categories throws Core Exception void remove Categories I Site Category categories throws Core Exception I Site Category get Categories  addCategories ISiteCategory CoreException removeCategories ISiteCategory CoreException ISiteCategory getCategories
void remove Categories I Site Category categories throws Core Exception I Site Category get Categories String get Type  removeCategories ISiteCategory CoreException ISiteCategory getCategories getType
I Site Category get Categories String get Type String getURL  ISiteCategory getCategories getType
String get Type String getURL String getOS  getType
String getURL String getOS String getNL 
String getOS String getNL String get Arch  getArch
String getNL String get Arch String getWS  getArch
String get Arch String getWS boolean is Patch  getArch isPatch
String getWS boolean is Patch void set Type String type throws Core Exception  isPatch setType CoreException
boolean is Patch void set Type String type throws Core Exception void setURL String url throws Core Exception  isPatch setType CoreException CoreException
void set Type String type throws Core Exception void setURL String url throws Core Exception void setOS String os throws Core Exception  setType CoreException CoreException CoreException
void setURL String url throws Core Exception void setOS String os throws Core Exception void setWS String ws throws Core Exception  CoreException CoreException CoreException
void setOS String os throws Core Exception void setWS String ws throws Core Exception void set Arch String arch throws Core Exception  CoreException CoreException setArch CoreException
void setWS String ws throws Core Exception void set Arch String arch throws Core Exception void setNL String nl throws Core Exception  CoreException setArch CoreException CoreException
void set Arch String arch throws Core Exception void setNL String nl throws Core Exception void set Is Patch boolean patch throws Core Exception  setArch CoreException CoreException setIsPatch CoreException
void setNL String nl throws Core Exception void set Is Patch boolean patch throws Core Exception I File get Archive File  CoreException setIsPatch CoreException IFile getArchiveFile

public interface I Site Model extends I Model I Model Change Provider Returns the top level model object return top level model object of the site model  ISiteModel IModel IModelChangeProvider
public I Site get Site Returns the factory that should be used to create new instances of model objects return feature model factory  ISite getSite
I Site Model Factory get Factory Returns install location of the site xml file in case of external files return install location for external files or samp null samp for models based on workspace resources  ISiteModelFactory getFactory
public String get Install Location Tests whether this model is enabled return samp true samp if the model is enabled  getInstallLocation
public boolean is Enabled Enables or disables this model param enabled the new enable state  isEnabled
public void set Enabled boolean enabled public I Site Build Model get Build Model  setEnabled ISiteBuildModel getBuildModel
public I Site Build Model get Build Model public void set Build Model I Site Build Model model  ISiteBuildModel getBuildModel setBuildModel ISiteBuildModel

public interface I Site Model Factory Creates a new plug in model object return new instance of the feature plug in object  ISiteModelFactory
I Site create Site Creates a new data model object return new instance of the feature data object  ISite createSite
I Site Feature create Feature Creates a new feature child object return new instance of the feature child object  ISiteFeature createFeature
I Site Category create Category I Site Feature feature Creates a new import model object return new instance of the feature import object  ISiteCategory createCategory ISiteFeature
I Site Category Definition create Category Definition Creates a new feature URL instance return a new feature URL instance  ISiteCategoryDefinition createCategoryDefinition
I Site Description create Description I Site Object parent Creates a new feature install handler return a new feature install handler  ISiteDescription createDescription ISiteObject

String P LABEL label NON NLS 1 Returns the top level site model object return root feature object  P_LABEL
public I Site get Site Returns the label of this feature model object return feature object label  ISite getSite
String get Label Returns the site model that owns this model object return the site model  getLabel
I Site Model get Model boolean is In The Model  ISiteModel getModel isInTheModel
boolean is In The Model Returns the parent of this model object return the model object parent  isInTheModel
public I Site Object get Parent Sets the new label of this model object This method may throw a Core Exception if the model is not editable param label the new label  ISiteObject getParent CoreException
void set Label String label throws Core Exception Returns true if this object as all the required attributes set false otherwise  setLabel CoreException

private Plugin Model Manager manager public Model Entry Plugin Model Manager manager String id this manager manager this id id  PluginModelManager ModelEntry PluginModelManager
public I Plugin Model Base get Active Model if mode AUTOMATIC if workspace Model null return workspace Model return external Model else return mode WORKSPACE workspace Model external Model  IPluginModelBase getActiveModel workspaceModel workspaceModel externalModel workspaceModel externalModel
public String get Id return id  getId
public Object get Children if workspace Model null external Model null String location external Model get Install Location File file new File location File Adapter adapter new Entry File Adapter this file manager get File Adapter Factory return adapter get Children return new Object 0  getChildren workspaceModel externalModel externalModel getInstallLocation FileAdapter EntryFileAdapter getFileAdapterFactory getChildren
public boolean is In Java Search return in Java Search  isInJavaSearch inJavaSearch
void set In Java Search boolean value this in Java Search value  setInJavaSearch inJavaSearch
public void set Workspace Model I Plugin Model Base model this workspace Model model classpath Container null  setWorkspaceModel IPluginModelBase workspaceModel classpathContainer
public void set External Model I Plugin Model Base model this external Model model classpath Container null  setExternalModel IPluginModelBase externalModel classpathContainer
classpath Container null public I Plugin Model Base get Workspace Model return workspace Model  classpathContainer IPluginModelBase getWorkspaceModel workspaceModel
public I Plugin Model Base get External Model return external Model  IPluginModelBase getExternalModel externalModel
return external Model public boolean is Empty return workspace Model null external Model null  externalModel isEmpty workspaceModel externalModel
public Required Plugins Classpath Container get Classpath Container if classpath Container null classpath Container new Required Plugins Classpath Container workspace Model return classpath Container  RequiredPluginsClasspathContainer getClasspathContainer classpathContainer classpathContainer RequiredPluginsClasspathContainer workspaceModel classpathContainer
public void update Classpath Container boolean force boolean do Check Classpath throws Core Exception if should Update Classpath Container force do Check Classpath I Project project workspace Model get Underlying Resource get Project I Java Project java Projects new I Java Project Java Core create project I Classpath Container containers new I Classpath Container get Classpath Container I Path path new Path PDE Core CLASSPATH CONTAINER ID try get Classpath Container reset Java Core set Classpath Container path java Projects containers null catch Operation Canceled Exception e get Classpath Container reset throw e  updateClasspathContainer doCheckClasspath CoreException shouldUpdateClasspathContainer doCheckClasspath IProject workspaceModel getUnderlyingResource getProject IJavaProject javaProjects IJavaProject JavaCore IClasspathContainer IClasspathContainer getClasspathContainer IPath PDECore CLASSPATH_CONTAINER_ID getClasspathContainer JavaCore setClasspathContainer javaProjects OperationCanceledException getClasspathContainer
public boolean should Update Classpath Container boolean force boolean do Check Classpath throws Core Exception if workspace Model null return false I Project project workspace Model get Underlying Resource get Project if project has Nature Java Core NATURE ID return false if do Check Classpath workspace Model is Loaded uses Containers Java Core create project return false if force classpath Container null Required Plugins Classpath Container container get Classpath Container container reset return true  shouldUpdateClasspathContainer doCheckClasspath CoreException workspaceModel IProject workspaceModel getUnderlyingResource getProject hasNature JavaCore NATURE_ID doCheckClasspath workspaceModel isLoaded usesContainers JavaCore classpathContainer RequiredPluginsClasspathContainer getClasspathContainer
private boolean uses Containers I Java Project j Project throws Core Exception I Classpath Entry entries j Project get Raw Classpath for int i 0 i entries length i I Classpath Entry entry entries i if entry get Entry Kind I Classpath Entry CPE CONTAINER entry get Path equals new Path PDE Core CLASSPATH CONTAINER ID return true return true  usesContainers IJavaProject jProject CoreException IClasspathEntry jProject getRawClasspath IClasspathEntry getEntryKind IClasspathEntry CPE_CONTAINER getPath PDECore CLASSPATH_CONTAINER_ID
public static void update Unknown Classpath Container I Java Project java Project throws Core Exception if java Project null return I Path path new Path PDE Core CLASSPATH CONTAINER ID Java Core set Classpath Container path new I Java Project java Project new I Classpath Container new Required Plugins Classpath Container null null  updateUnknownClasspathContainer IJavaProject javaProject CoreException javaProject IPath PDECore CLASSPATH_CONTAINER_ID JavaCore setClasspathContainer IJavaProject javaProject IClasspathContainer RequiredPluginsClasspathContainer
public boolean is Affected I Plugin Base changed Plugins Array List old Ids if workspace Model null workspace Model is Loaded return false I Plugin Base plugin workspace Model get Plugin Base for int i 0 i changed Plugins length i I Plugin Base changed Plugin changed Plugins i String id changed Plugin get Id if id null return false if plugin get Id equals id return true if is Required plugin changed Plugin return true for int i 0 i old Ids size i String old Id String old Ids get i if plugin get Id equals old Id return true if is Required plugin old Id return true return false  isAffected IPluginBase changedPlugins ArrayList oldIds workspaceModel workspaceModel isLoaded IPluginBase workspaceModel getPluginBase changedPlugins IPluginBase changedPlugin changedPlugins changedPlugin getId getId isRequired changedPlugin oldIds oldId oldIds getId oldId isRequired oldId
private boolean is Required I Plugin Base plugin I Plugin Base changed Plugin if changed Plugin instanceof I Fragment return false return get Required Ids plugin contains changed Plugin get Id  isRequired IPluginBase IPluginBase changedPlugin changedPlugin IFragment getRequiredIds changedPlugin getId
private boolean is Required I Plugin Base plugin String changed Id return get Required Ids plugin contains changed Id  isRequired IPluginBase changedId getRequiredIds changedId
private Hash Set get Required Ids I Plugin Base plugin Hash Set set new Hash Set if plugin instanceof I Fragment add Parent Plugin I Fragment plugin get Plugin Id set I Plugin Import imports plugin get Imports for int i 0 i imports length i add Dependency imports i get Id set String id plugin get Id if manager isOS Gi Runtime id starts With org eclipse swt NON NLS 1 id equals org eclipse core boot NON NLS 1 id equals org apache xerces NON NLS 1 set add org eclipse core boot NON NLS 1 set add org eclipse core runtime NON NLS 1 try I Build build Classpath Util Core get Build plugin get Plugin Model I Build Entry entry build null null build get Entry I Build Entry JARS EXTRA CLASSPATH if entry null String tokens entry get Tokens for int i 0 i tokens length i I Path path new Path tokens i String device path get Device if device null if path segment Count 1 path segment 0 equals NON NLS 1 set add path segment 1 else if device equals platform NON NLS 1 if path segment Count 1 path segment 0 equals plugin NON NLS 1 set add path segment 1 catch Core Exception e return set  HashSet getRequiredIds IPluginBase HashSet HashSet IFragment addParentPlugin IFragment getPluginId IPluginImport getImports addDependency getId getId isOSGiRuntime startsWith IBuild ClasspathUtilCore getBuild getPluginModel IBuildEntry getEntry IBuildEntry JARS_EXTRA_CLASSPATH getTokens IPath getDevice segmentCount segmentCount CoreException
private void add Dependency String id Hash Set set if id null set add id return Model Entry entry manager find Entry id if entry null I Plugin Base plugin entry get Active Model get Plugin Base I Plugin Import imports plugin get Imports for int i 0 i imports length i if imports i is Reexported add Dependency imports i get Id set  addDependency HashSet ModelEntry findEntry IPluginBase getActiveModel getPluginBase IPluginImport getImports isReexported addDependency getId
private void add Parent Plugin String id Hash Set set if id null set add id return Model Entry entry manager find Entry id if entry null I Plugin Base plugin entry get Active Model get Plugin Base I Plugin Import imports plugin get Imports for int i 0 i imports length i add Dependency imports i get Id set  addParentPlugin HashSet ModelEntry findEntry IPluginBase getActiveModel getPluginBase IPluginImport getImports addDependency getId

public Model Provider Event Object source int types I Model added I Model removed I Model changed this source source this types types this added added this removed removed this changed changed  ModelProviderEvent IModel IModel IModel
public I Model get Added Models return added null new I Model 0 added  IModel getAddedModels IModel
public I Model get Removed Models return removed null new I Model 0 removed  IModel getRemovedModels IModel
public I Model get Changed Models return changed null new I Model 0 changed  IModel getChangedModels IModel
public int get Event Types return types  getEventTypes
public Object get Event Source return source  getEventSource

public NL Resource Helper String name URL locations try Input Stream stream get Resource Stream name locations if stream null bundle new Property Resource Bundle stream stream close catch IO Exception e  NLResourceHelper InputStream getResourceStream PropertyResourceBundle IOException
public void dispose bundle null 
private Input Stream get Resource Stream String name URL locations URL Class Loader resource Loader new URL Class Loader locations String Tokenizer tokenizer new String Tokenizer Platform getNL   NON NLS 1 String language tokenizer next Token String country tokenizer has More Tokens tokenizer next Token NON NLS 1 String variant tokenizer has More Tokens tokenizer next Token NON NLS 1 String suffix1   language   country   variant NON NLS 1 NON NLS 2 NON NLS 3 String suffix2   language   country NON NLS 1 NON NLS 2 String suffix3   language NON NLS 1 String suffix4 NON NLS 1 String suffices new String suffix1 suffix2 suffix3 suffix4 Input Stream stream null for int i 0 i suffices length i stream resource Loader get Resource As Stream name suffices i properties NON NLS 1 if stream null break return stream  InputStream getResourceStream URLClassLoader resourceLoader URLClassLoader StringTokenizer StringTokenizer _ nextToken hasMoreTokens nextToken hasMoreTokens nextToken _ _ _ _ _ _ InputStream resourceLoader getResourceAsStream
public String get Resource String String value String s value trim if s starts With KEY PREFIX return s if s starts With KEY DOUBLE PREFIX return s substring 1 int ix s index Of NON NLS 1 String key ix 1 s s substring 0 ix String dflt ix 1 s s substring ix 1 if bundle null return dflt try return bundle get String key substring 1 catch Missing Resource Exception e return dflt  getResourceString startsWith KEY_PREFIX startsWith KEY_DOUBLE_PREFIX indexOf getString MissingResourceException

protected I Classpath Entry entries public void reset entries null  IClasspathEntry
protected I Classpath Entry verify With Attachment Manager I Classpath Entry entries Source Attachment Manager manager PDE Core get Default get Source Attachment Manager if manager is Empty return entries I Classpath Entry new Entries new I Classpath Entry entries length for int i 0 i entries length i I Classpath Entry entry entries i new Entries i entry if entry get Entry Kind I Classpath Entry CPE LIBRARY Source Attachment Manager Source Attachment Entry saentry manager find Entry entry get Path if saentry null I Classpath Entry new Entry Java Core new Library Entry entry get Path saentry get Attachment Path saentry get Attachment Root Path entry is Exported new Entries i new Entry return new Entries  IClasspathEntry verifyWithAttachmentManager IClasspathEntry SourceAttachmentManager PDECore getDefault getSourceAttachmentManager isEmpty IClasspathEntry newEntries IClasspathEntry IClasspathEntry newEntries getEntryKind IClasspathEntry CPE_LIBRARY SourceAttachmentManager SourceAttachmentEntry findEntry getPath IClasspathEntry newEntry JavaCore newLibraryEntry getPath getAttachmentPath getAttachmentRootPath isExported newEntries newEntry newEntries
see org eclipse jdt core I Classpath Container get Kind public int get Kind return K APPLICATION  IClasspathContainer getKind getKind K_APPLICATION
see org eclipse jdt core I Classpath Container get Path public I Path get Path return new Path PDE Core CLASSPATH CONTAINER ID  IClasspathContainer getPath IPath getPath PDECore CLASSPATH_CONTAINER_ID

public static boolean compare String id1 String version1 String id2 String version2 int match if id1 equals id2 return false if version1 null return true if version2 null return false Plugin Version Identifier pid1 null Plugin Version Identifier pid2 null try pid1 new Plugin Version Identifier version1 pid2 new Plugin Version Identifier version2 catch Runtime Exception e something is wrong with either try direct comparison return version2 equals version1 switch match case I Match Rules NONE case I Match Rules COMPATIBLE if pid2 is Compatible With pid1 return true break case I Match Rules EQUIVALENT if pid2 is Equivalent To pid1 return true break case I Match Rules PERFECT if pid2 is Perfect pid1 return true break case I Match Rules GREATER OR EQUAL if pid2 is Greater Or Equal To pid1 return true break return false  PluginVersionIdentifier PluginVersionIdentifier PluginVersionIdentifier PluginVersionIdentifier RuntimeException IMatchRules IMatchRules isCompatibleWith IMatchRules isEquivalentTo IMatchRules isPerfect IMatchRules GREATER_OR_EQUAL isGreaterOrEqualTo
public static PDE Core get Default return inst  PDECore getDefault
return inst public static String get Formatted Message String key String arg String text get Resource String key return java text Message Format format text new Object arg  getFormattedMessage getResourceString MessageFormat
return java text Message Format format text new Object arg public static String get Formatted Message String key String args String text get Resource String key return java text Message Format format text args  MessageFormat getFormattedMessage getResourceString MessageFormat
return java text Message Format format text args static I Path get Install Location return new Path inst get Descriptor get InstallURL get File  MessageFormat IPath getInstallLocation getDescriptor getInstallURL getFile
return new Path inst get Descriptor get InstallURL get File public static String get Plugin Id return inst get Descriptor get Unique Identifier  getDescriptor getInstallURL getFile getPluginId getDescriptor getUniqueIdentifier
public static String get Resource String String key Resource Bundle bundle inst get Resource Bundle if bundle null try String bundle String bundle get String key return bundle String return bundle String catch Missing Resource Exception e default actions is to return key which is OK return key  getResourceString ResourceBundle getResourceBundle bundleString getString bundleString bundleString MissingResourceException
return key public static I Workspace get Workspace return Resources Plugin get Workspace  IWorkspace getWorkspace ResourcesPlugin getWorkspace
public static void log I Status status Resources Plugin get Plugin get Log log status  IStatus ResourcesPlugin getPlugin getLog
public static void log Throwable e if e instanceof Invocation Target Exception e Invocation Target Exception e get Target Exception I Status status null if e instanceof Core Exception status Core Exception e get Status else status new Status I Status ERROR get Plugin Id I Status OK e get Message e log status  InvocationTargetException InvocationTargetException getTargetException IStatus CoreException CoreException getStatus IStatus getPluginId IStatus getMessage
public static void log Error Message String message log new Status I Status ERROR get Plugin Id I Status ERROR message null  logErrorMessage IStatus getPluginId IStatus
public static void log Exception Throwable e log Exception e null  logException logException
public static void log Exception Throwable e String message if e instanceof Invocation Target Exception e Invocation Target Exception e get Target Exception I Status status null if e instanceof Core Exception status Core Exception e get Status else if message null message e get Message if message null message e to String status new Status I Status ERROR get Plugin Id I Status OK message e Resources Plugin get Plugin get Log log status  logException InvocationTargetException InvocationTargetException getTargetException IStatus CoreException CoreException getStatus getMessage toString IStatus getPluginId IStatus ResourcesPlugin getPlugin getLog
public PDE Core I Plugin Descriptor descriptor super descriptor inst this try resource Bundle Resource Bundle get Bundle org eclipse pde internal core pderesources NON NLS 1 catch Missing Resource Exception x resource Bundle null  PDECore IPluginDescriptor resourceBundle ResourceBundle getBundle MissingResourceException resourceBundle
public I Plugin Extension Point find Extension Point String fullID if fullID null fullID length 0 return null separate plugin ID first int last Dot fullID last Index Of if last Dot 1 return null String pluginID fullID substring 0 last Dot I Plugin plugin find Plugin pluginID if plugin null return null String pointID fullID substring last Dot 1 I Plugin Extension Point points plugin get Extension Points for int i 0 i points length i I Plugin Extension Point point points i if point get Id equals pointID return point return null  IPluginExtensionPoint findExtensionPoint lastDot lastIndexOf lastDot lastDot IPlugin findPlugin lastDot IPluginExtensionPoint getExtensionPoints IPluginExtensionPoint getId
private I Feature find Feature I Feature Model models String id String version int match for int i 0 i models length i I Feature Model model models i I Feature feature model get Feature String pid feature get Id String pversion feature get Version if compare id version pid pversion match return feature return null  IFeature findFeature IFeatureModel IFeatureModel IFeature getFeature getId getVersion
public I Feature find Feature String id return find Feature id null I Match Rules NONE  IFeature findFeature findFeature IMatchRules
public I Feature find Feature String id String version int match Workspace Model Manager manager get Workspace Model Manager return find Feature manager get Feature Models id version match  IFeature findFeature WorkspaceModelManager getWorkspaceModelManager findFeature getFeatureModels
public I Fragment find Fragments For String id String version I Fragment Model models get Model Manager get Fragments Array List list new Array List for int i 0 i models length i if models i is Enabled continue I Fragment fragment models i get Fragment if compare fragment get Plugin Id fragment get Plugin Version id version fragment get Rule list add fragment return I Fragment list to Array new I Fragment list size  IFragment findFragmentsFor IFragmentModel getModelManager getFragments ArrayList ArrayList isEnabled IFragment getFragment getPluginId getPluginVersion getRule IFragment toArray IFragment
public I Plugin find Plugin String id return find Plugin id null 0  IPlugin findPlugin findPlugin
public I Plugin find Plugin String id String version int match I Plugin Model model get Model Manager find Plugin Model id return model null model is Enabled model get Plugin null  IPlugin findPlugin IPluginModel getModelManager findPluginModel isEnabled getPlugin
public External Model Manager get External Model Manager initialize Models return external Model Manager  ExternalModelManager getExternalModelManager initializeModels externalModelManager
return external Model Manager public Plugin Model Manager get Model Manager initialize Models return model Manager  externalModelManager PluginModelManager getModelManager initializeModels modelManager
public Resource Bundle get Resource Bundle return resource Bundle  ResourceBundle getResourceBundle resourceBundle
public Schema Registry get Schema Registry if schema Registry null schema Registry new Schema Registry return schema Registry  SchemaRegistry getSchemaRegistry schemaRegistry schemaRegistry SchemaRegistry schemaRegistry
public Source Attachment Manager get Source Attachment Manager if source Attachment Manager null source Attachment Manager new Source Attachment Manager return source Attachment Manager  SourceAttachmentManager getSourceAttachmentManager sourceAttachmentManager sourceAttachmentManager SourceAttachmentManager sourceAttachmentManager
public Source Location Manager get Source Location Manager if source Location Manager null source Location Manager new Source Location Manager return source Location Manager  SourceLocationManager getSourceLocationManager sourceLocationManager sourceLocationManager SourceLocationManager sourceLocationManager
public Tracing Options Manager get Tracing Options Manager if tracing Options Manager null tracing Options Manager new Tracing Options Manager return tracing Options Manager  TracingOptionsManager getTracingOptionsManager tracingOptionsManager tracingOptionsManager TracingOptionsManager tracingOptionsManager
return tracing Options Manager public Workspace Model Manager get Workspace Model Manager initialize Models return workspace Model Manager  tracingOptionsManager WorkspaceModelManager getWorkspaceModelManager initializeModels workspaceModelManager
see org eclipse core runtime Plugin initialize Default Plugin Preferences protected void initialize Default Plugin Preferences Preferences preferences get Plugin Preferences preferences set Default I Core Constants TARGET MODE I Core Constants VALUE USE THIS preferences set Default I Core Constants CHECKED PLUGINS I Core Constants VALUE SAVED ALL if preferences get String I Core Constants TARGET MODE equals I Core Constants VALUE USE THIS preferences set Value I Core Constants PLATFORM PATH External Model Manager compute Default Platform Path else preferences set Default I Core Constants PLATFORM PATH External Model Manager compute Default Platform Path set defaults for the target environment variables preferences set Default OS Platform getOS preferences set Default WS Platform getWS preferences set Default NL Locale get Default to String preferences set Default ARCH Platform getOS Arch  initializeDefaultPluginPreferences initializeDefaultPluginPreferences getPluginPreferences setDefault ICoreConstants TARGET_MODE ICoreConstants VALUE_USE_THIS setDefault ICoreConstants CHECKED_PLUGINS ICoreConstants VALUE_SAVED_ALL getString ICoreConstants TARGET_MODE ICoreConstants VALUE_USE_THIS setValue ICoreConstants PLATFORM_PATH ExternalModelManager computeDefaultPlatformPath setDefault ICoreConstants PLATFORM_PATH ExternalModelManager computeDefaultPlatformPath setDefault setDefault setDefault getDefault toString setDefault getOSArch
private synchronized void initialize Models if model Manager null external Model Manager null workspace Model Manager null return external Model Manager new External Model Manager workspace Model Manager new Workspace Model Manager model Manager new Plugin Model Manager model Manager connect workspace Model Manager external Model Manager  initializeModels modelManager externalModelManager workspaceModelManager externalModelManager ExternalModelManager workspaceModelManager WorkspaceModelManager modelManager PluginModelManager modelManager workspaceModelManager externalModelManager
public void release Platform if tracker null return tracker close tracker null  releasePlatform
public Platform Admin acquire Platform if tracker null tracker new Service Tracker context Platform Admin class get Name null tracker open Platform Admin result Platform Admin tracker get Service while result null try tracker wait For Service 1000 result Platform Admin tracker get Service catch Interrupted Exception ie return result  PlatformAdmin acquirePlatform ServiceTracker PlatformAdmin getName PlatformAdmin PlatformAdmin getService waitForService PlatformAdmin getService InterruptedException
public void start Bundle Context context throws Exception super start context this context context  BundleContext
public Bundle Context get Bundle Context return this context  BundleContext getBundleContext
public void shutdown throws Core Exception PDE Core get Default save Plugin Preferences if schema Registry null schema Registry shutdown schema Registry null if model Manager null model Manager shutdown model Manager null if external Model Manager null external Model Manager shutdown external Model Manager null if workspace Model Manager null workspace Model Manager shutdown workspace Model Manager null super shutdown  CoreException PDECore getDefault savePluginPreferences schemaRegistry schemaRegistry schemaRegistry modelManager modelManager modelManager externalModelManager externalModelManager externalModelManager workspaceModelManager workspaceModelManager workspaceModelManager

public static void convert ToOSGI Format I Project project String filename I Progress Monitor monitor throws Core Exception try File output File new File project get Location append META INF MANIFEST MF toOS String NON NLS 1 File input File new File project get Location append filename toOS String Service Tracker tracker new Service Tracker PDE Core get Default get Bundle Context Plugin Converter class get Name null tracker open Plugin Converter converter Plugin Converter tracker get Service converter convert Manifest input File output File false null true project refresh Local I Resource DEPTH INFINITE null tracker close catch Plugin Conversion Exception e catch Core Exception e finally monitor done  convertToOSGIFormat IProject IProgressMonitor CoreException outputFile getLocation toOSString inputFile getLocation toOSString ServiceTracker ServiceTracker PDECore getDefault getBundleContext PluginConverter getName PluginConverter PluginConverter getService convertManifest inputFile outputFile refreshLocal IResource DEPTH_INFINITE PluginConversionException CoreException

private Plugin Converter f Converter null protected long get Next Id return f Id  PluginConverter fConverter getNextId fId
public PDE State f State Object Factory Platform get Platform Admin get Factory f State f State Object Factory create State f State set Resolver Platform get Platform Admin get Resolver f Id 0 f Bundle Classpaths new Hash Map  PDEState fStateObjectFactory getPlatformAdmin getFactory fState fStateObjectFactory createState fState setResolver getPlatformAdmin getResolver fId fBundleClasspaths HashMap
public State Object Factory get Factory return f State Object Factory  StateObjectFactory getFactory fStateObjectFactory
public void add Bundle Description Bundle Description to Add f State add Bundle to Add  addBundleDescription BundleDescription toAdd fState addBundle toAdd
private Plugin Converter acquire Plugin Converter throws Exception if f Converter null Service Tracker tracker new Service Tracker PDE Core get Default get Bundle Context Plugin Converter class get Name null tracker open f Converter Plugin Converter tracker get Service tracker close return f Converter  PluginConverter acquirePluginConverter fConverter ServiceTracker ServiceTracker PDECore getDefault getBundleContext PluginConverter getName fConverter PluginConverter getService fConverter
public Bundle Description add Bundle Dictionary manifest File bundle Location try Bundle Description descriptor f State Object Factory create Bundle Description manifest bundle Location get Absolute Path get Next Id f Bundle Classpaths put new Long descriptor get Bundle Id manifest f State add Bundle descriptor return descriptor catch Bundle Exception e return null  BundleDescription addBundle bundleLocation BundleDescription fStateObjectFactory createBundleDescription bundleLocation getAbsolutePath getNextId fBundleClasspaths getBundleId fState addBundle BundleException
public Bundle Description add Bundle File bundle Location Dictionary manifest manifest load Manifest bundle Location if manifest null manifest get Constants BUNDLE SYMBOLICNAME null return null return add Bundle manifest bundle Location  BundleDescription addBundle bundleLocation loadManifest bundleLocation BUNDLE_SYMBOLICNAME addBundle bundleLocation
private Dictionary load Manifest File bundle Location Input Stream manifest Stream null try URL manifest Location null if bundle Location get Name ends With jar NON NLS 1 manifest Location new URL jar file bundle Location Jar File MANIFEST NAME NON NLS 1 NON NLS 2 manifest Stream manifest Location open Stream else manifest Stream new File Input Stream new File bundle Location Jar File MANIFEST NAME catch IO Exception e if manifest Stream null try Plugin Converter converter acquire Plugin Converter return converter convert Manifest bundle Location false get Target Mode false catch Exception e1 return null try Manifest m new Manifest manifest Stream return manifest To Properties m get Main Attributes catch IO Exception e PDE Core log new Status I Status ERROR PDE Core PLUGIN ID I Status ERROR PDE Core get Resource String PDE State invalid Format bundle Location to String null NON NLS 1 return null finally try manifest Stream close catch IO Exception e1 Ignore  loadManifest bundleLocation InputStream manifestStream manifestLocation bundleLocation getName endsWith manifestLocation bundleLocation JarFile MANIFEST_NAME manifestStream manifestLocation openStream manifestStream FileInputStream bundleLocation JarFile MANIFEST_NAME IOException manifestStream PluginConverter acquirePluginConverter convertManifest bundleLocation getTargetMode manifestStream manifestToProperties getMainAttributes IOException PDECore IStatus PDECore PLUGIN_ID IStatus PDECore getResourceString PDEState invalidFormat bundleLocation toString manifestStream IOException
private Properties manifest To Properties Attributes d Iterator iter d key Set iterator Properties result new Properties while iter has Next Attributes Name key Attributes Name iter next result put key to String d get key return result  manifestToProperties keySet hasNext toString
public void add Bundles Collection bundles for Iterator iter bundles iterator iter has Next File bundle File iter next add Bundle bundle  addBundles hasNext addBundle
public State Delta resolve State return f State resolve false  StateDelta resolveState fState
public void resolve State boolean incremental f State resolve incremental  resolveState fState
public void remove Bundle Description Bundle Description description f State remove Bundle description  removeBundleDescription BundleDescription fState removeBundle
public State get State return f State  getState fState
public Bundle Description get Dependent Bundles String bundle Id Version version Bundle Description root f State get Bundle bundle Id version return PDE State Helper get Dependent Bundles root  BundleDescription getDependentBundles bundleId BundleDescription fState getBundle bundleId PDEStateHelper getDependentBundles
public Bundle Description get Resolved Bundle String bundle Id String version if version null return get Resolved Bundle bundle Id Bundle Description description get State get Bundle bundle Id new Version version if description is Resolved return description return null  BundleDescription getResolvedBundle bundleId getResolvedBundle bundleId BundleDescription getState getBundle bundleId isResolved
public Bundle Description get Resolved Bundle String bundle Id Bundle Description description get State get Bundles bundle Id if description null return null for int i 0 i description length i if description i is Resolved return description i return null  BundleDescription getResolvedBundle bundleId BundleDescription getState getBundles bundleId isResolved
return null public Hash Map get Extra Data return f Bundle Classpaths  HashMap getExtraData fBundleClasspaths
public Dictionary get Manifest long bundleID return Dictionary f Bundle Classpaths get new Long bundleID  getManifest fBundleClasspaths
public void set Target Mode String mode f Target Mode mode  setTargetMode fTargetMode
public String get Target Mode return f Target Mode  getTargetMode fTargetMode

public class PDE State Helper public static Bundle Description get Dependent Bundles Bundle Description root Bundle Description imported get Imported Bundles root Import Package Bundle Description required get Required Bundles root require bundle import from plugin xml Bundle Description dependents new Bundle Description imported length required length System arraycopy imported 0 dependents 0 imported length System arraycopy required 0 dependents imported length required length return dependents  PDEStateHelper BundleDescription getDependentBundles BundleDescription BundleDescription getImportedBundles BundleDescription getRequiredBundles BundleDescription BundleDescription
public static Bundle Description get Dependent Bundles With Fragments Bundle Description root Bundle Description imported get Imported Bundles root Bundle Description imported By Fragments get Imported By Fragments root Bundle Description required get Required Bundles root Bundle Description required By Fragments get Required By Fragments root Bundle Description dependents new Bundle Description imported length imported By Fragments length required length required By Fragments length System arraycopy imported 0 dependents 0 imported length System arraycopy imported By Fragments 0 dependents imported length imported By Fragments length System arraycopy required 0 dependents imported length imported By Fragments length required length System arraycopy required By Fragments 0 dependents imported length imported By Fragments length required length required By Fragments length return dependents  BundleDescription getDependentBundlesWithFragments BundleDescription BundleDescription getImportedBundles BundleDescription importedByFragments getImportedByFragments BundleDescription getRequiredBundles BundleDescription requiredByFragments getRequiredByFragments BundleDescription BundleDescription importedByFragments requiredByFragments importedByFragments importedByFragments importedByFragments requiredByFragments importedByFragments requiredByFragments
public static Bundle Description get Imported By Fragments Bundle Description root Bundle Description fragments root get Fragments List imported By Fragments new Array List for int i 0 i fragments length i if fragments i is Resolved continue merge imported By Fragments get Imported Bundles fragments i Bundle Description result new Bundle Description imported By Fragments size return Bundle Description imported By Fragments to Array result  BundleDescription getImportedByFragments BundleDescription BundleDescription getFragments importedByFragments ArrayList isResolved importedByFragments getImportedBundles BundleDescription BundleDescription importedByFragments BundleDescription importedByFragments toArray
public static Bundle Description get Required By Fragments Bundle Description root Bundle Description fragments root get Fragments List imported By Fragments new Array List for int i 0 i fragments length i if fragments i is Resolved continue merge imported By Fragments get Required Bundles fragments i Bundle Description result new Bundle Description imported By Fragments size return Bundle Description imported By Fragments to Array result  BundleDescription getRequiredByFragments BundleDescription BundleDescription getFragments importedByFragments ArrayList isResolved importedByFragments getRequiredBundles BundleDescription BundleDescription importedByFragments BundleDescription importedByFragments toArray
public static void merge List source Bundle Description to Add for int i 0 i to Add length i if source contains to Add i source add to Add i  BundleDescription toAdd toAdd toAdd toAdd
public static String get Classpath Dictionary manifest String full Classpath String manifest get Constants BUNDLE CLASSPATH String result new String 0 try if full Classpath null Manifest Element classpath Entries Manifest Element parse Header Constants BUNDLE CLASSPATH full Classpath result new String classpath Entries length for int i 0 i classpath Entries length i result i classpath Entries i get Value catch Bundle Exception e return result  getClasspath fullClasspath BUNDLE_CLASSPATH fullClasspath ManifestElement classpathEntries ManifestElement parseHeader BUNDLE_CLASSPATH fullClasspath classpathEntries classpathEntries classpathEntries getValue BundleException
This methods return the bundle Descriptions to which imports have been bound to param bundle Id param version return public static Bundle Description get Imported Bundles Bundle Description root if root null return new Bundle Description 0 Package Specification packages root get Packages Array List resolved Imported new Array List packages length for int i 0 i packages length i if packages i is Exported packages i is Resolved resolved Imported contains packages i get Supplier resolved Imported add packages i get Supplier Bundle Description result new Bundle Description resolved Imported size return Bundle Description resolved Imported to Array result  bundleDescriptions bundleId BundleDescription getImportedBundles BundleDescription BundleDescription PackageSpecification getPackages ArrayList resolvedImported ArrayList isExported isResolved resolvedImported getSupplier resolvedImported getSupplier BundleDescription BundleDescription resolvedImported BundleDescription resolvedImported toArray
This methods return the bundle Descriptions to which required bundles have been bound to param bundle Id param version return public static Bundle Description get Required Bundles Bundle Description root if root null return new Bundle Description 0 Bundle Specification required root get Required Bundles Array List resolved Required new Array List required length for int i 0 i required length i if required i is Resolved resolved Required contains required i get Supplier resolved Required add required i get Supplier Bundle Description result new Bundle Description resolved Required size return Bundle Description resolved Required to Array result  bundleDescriptions bundleId BundleDescription getRequiredBundles BundleDescription BundleDescription BundleSpecification getRequiredBundles ArrayList resolvedRequired ArrayList isResolved resolvedRequired getSupplier resolvedRequired getSupplier BundleDescription BundleDescription resolvedRequired BundleDescription resolvedRequired toArray

private String link File Name null private Site Entry  linkFileName SiteEntry
private Site Entry URL url I Site Policy policy Platform Configuration parent if url null throw new Illegal Argument Exception if policy null throw new Illegal Argument Exception if parent null throw new Illegal Argument Exception this url url this policy policy this parent parent this features null this plugins null this resolvedURL this url if url get Protocol equals PlatformURL Handler PROTOCOL try resolvedURL resolve PlatformURL url 19536 catch IO Exception e will use the baseline URL  SiteEntry ISitePolicy PlatformConfiguration IllegalArgumentException IllegalArgumentException IllegalArgumentException getProtocol PlatformURLHandler resolvePlatformURL IOException
see I Site Entry getURL public URL getURL return url  ISiteEntry
see I Site Entry get Site Policy public I Site Policy get Site Policy return policy  ISiteEntry getSitePolicy ISitePolicy getSitePolicy
public synchronized void set Site Policy I Site Policy policy if policy null throw new Illegal Argument Exception this policy policy  setSitePolicy ISitePolicy IllegalArgumentException
see I Site Entry get Features public String get Features return get Detected Features  ISiteEntry getFeatures getFeatures getDetectedFeatures
public String get Plugins I Site Policy policy get Site Policy if policy get Type I Site Policy USER INCLUDE return policy get List if policy get Type I Site Policy USER EXCLUDE Array List detected Plugins new Array List Arrays as List get Detected Plugins String excluded Plugins policy get List for int i 0 i excluded Plugins length i if detected Plugins contains excluded Plugins i detected Plugins remove excluded Plugins i return String detected Plugins to Array new String 0 bad policy type return new String 0  getPlugins ISitePolicy getSitePolicy getType ISitePolicy USER_INCLUDE getList getType ISitePolicy USER_EXCLUDE ArrayList detectedPlugins ArrayList asList getDetectedPlugins excludedPlugins getList excludedPlugins detectedPlugins excludedPlugins detectedPlugins excludedPlugins detectedPlugins toArray
public long get Change Stamp if change Stamp Is Valid compute Change Stamp return change Stamp  getChangeStamp changeStampIsValid computeChangeStamp changeStamp
public long get Features Change Stamp if features Change Stamp Is Valid compute Features Change Stamp return features Change Stamp  getFeaturesChangeStamp featuresChangeStampIsValid computeFeaturesChangeStamp featuresChangeStamp
public long get Plugins Change Stamp if plugins Change Stamp Is Valid compute Plugins Change Stamp return plugins Change Stamp  getPluginsChangeStamp pluginsChangeStampIsValid computePluginsChangeStamp pluginsChangeStamp
see I Site Entry is Updateable public boolean is Updateable return updateable  ISiteEntry isUpdateable isUpdateable
see I Site Entry is Natively Linked public boolean is Natively Linked return is Externally Linked Site  ISiteEntry isNativelyLinked isNativelyLinked isExternallyLinkedSite
private String detect Features invalidate stamps we are doing discovery change Stamp Is Valid false features Change Stamp Is Valid false parent change Stamp Is Valid false parent features Change Stamp Is Valid false features new Array List if supports Detection resolvedURL return new String 0 locate feature entries on site File site Root new File resolvedURL get File replace File separator Char File root new File site Root FEATURES String list root list String path File plugin for int i 0 list null i list length i path list i File separator FEATURE XML plugin new File root path if plugin exists continue features add FEATURES path replace File separator Char NON NLS 1 if DEBUG debug resolvedURL to String located features size feature s NON NLS 1 NON NLS 2 return String features to Array new String 0  detectFeatures changeStampIsValid featuresChangeStampIsValid changeStampIsValid featuresChangeStampIsValid ArrayList supportsDetection siteRoot getFile separatorChar siteRoot FEATURE_XML separatorChar toString toArray
private String detect Plugins invalidate stamps we are doing discovery change Stamp Is Valid false plugins Change Stamp Is Valid false parent change Stamp Is Valid false parent plugins Change Stamp Is Valid false plugins new Array List if supports Detection resolvedURL return new String 0 locate plugin entries on site File root new File resolvedURL get File replace File separator Char PLUGINS String list root list String path File plugin for int i 0 list null i list length i path list i File separator PLUGIN XML plugin new File root path if plugin exists path list i File separator FRAGMENT XML plugin new File root path if plugin exists continue plugins add PLUGINS path replace File separator Char NON NLS 1 if DEBUG debug resolvedURL to String located plugins size plugin s NON NLS 1 NON NLS 2 return String plugins to Array new String 0  detectPlugins changeStampIsValid pluginsChangeStampIsValid changeStampIsValid pluginsChangeStampIsValid ArrayList supportsDetection getFile separatorChar PLUGIN_XML FRAGMENT_XML separatorChar toString toArray
private synchronized String get Detected Features if features null return detect Features else return String features to Array new String 0  getDetectedFeatures detectFeatures toArray
private synchronized String get Detected Plugins if plugins null return detect Plugins else return String plugins to Array new String 0  getDetectedPlugins detectPlugins toArray
private URL get ResolvedURL return resolvedURL  getResolvedURL
private void compute Change Stamp compute Features Change Stamp compute Plugins Change Stamp change Stamp resolvedURL hash Code features Change Stamp plugins Change Stamp change Stamp Is Valid true  computeChangeStamp computeFeaturesChangeStamp computePluginsChangeStamp changeStamp hashCode featuresChangeStamp pluginsChangeStamp changeStampIsValid
private synchronized void compute Features Change Stamp if features Change Stamp Is Valid return long start 0 if DEBUG start new Date get Time String features get Features features Change Stamp compute Stamp features features Change Stamp Is Valid true if DEBUG long end new Date get Time debug resolvedURL to String feature stamp features Change Stamp features Change Stamp last Features Change Stamp no changes was last Features Change Stamp in end start ms NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 NON NLS 6  computeFeaturesChangeStamp featuresChangeStampIsValid getTime getFeatures featuresChangeStamp computeStamp featuresChangeStampIsValid getTime toString featuresChangeStamp featuresChangeStamp lastFeaturesChangeStamp lastFeaturesChangeStamp
private synchronized void compute Plugins Change Stamp if plugins Change Stamp Is Valid return long start 0 if DEBUG start new Date get Time String plugins get Plugins plugins Change Stamp compute Stamp plugins plugins Change Stamp Is Valid true if DEBUG long end new Date get Time debug resolvedURL to String plugin stamp plugins Change Stamp plugins Change Stamp last Plugins Change Stamp no changes was last Plugins Change Stamp in end start ms NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 NON NLS 6  computePluginsChangeStamp pluginsChangeStampIsValid getTime getPlugins pluginsChangeStamp computeStamp pluginsChangeStampIsValid getTime toString pluginsChangeStamp pluginsChangeStamp lastPluginsChangeStamp lastPluginsChangeStamp
private long compute Stamp String targets long result 0 if supports Detection resolvedURL NOTE this path should not be executed until we support running from an arbitrary URL in particular from http server For now just compute stamp across the list of names Eventually when general UR Ls are supported we need to do better factor in at least the existence of the target However given this code executes early on the startup sequence we need to be extremely mindful of performance issues for int i 0 i targets length i result targets i hash Code if DEBUG debug WARNING computing stamp using URL hashcodes only NON NLS 1 else compute stamp across local targets String root Path resolvedURL get File replace File separator Char if root Path ends With File separator root Path File separator File root File new File root Path if root File exists File f null for int i 0 i targets length i f new File root File targets i if f exists result f get Absolute Path hash Code f last Modified f length return result  computeStamp supportsDetection URLs hashCode rootPath getFile separatorChar rootPath endsWith rootPath rootFile rootPath rootFile rootFile getAbsolutePath hashCode lastModified
private boolean is Externally Linked Site return link File Name null link File Name trim equals NON NLS 1  isExternallyLinkedSite linkFileName linkFileName
private synchronized void refresh reset computed values Will be updated on next access last Features Change Stamp features Change Stamp last Plugins Change Stamp plugins Change Stamp change Stamp Is Valid false features Change Stamp Is Valid false plugins Change Stamp Is Valid false features null plugins null  lastFeaturesChangeStamp featuresChangeStamp lastPluginsChangeStamp pluginsChangeStamp changeStampIsValid featuresChangeStampIsValid pluginsChangeStampIsValid
private String list private Site Policy  SitePolicy
private Site Policy int type String list if type I Site Policy USER INCLUDE type I Site Policy USER EXCLUDE throw new Illegal Argument Exception this type type if list null this list new String 0 else this list list  SitePolicy ISitePolicy USER_INCLUDE ISitePolicy USER_EXCLUDE IllegalArgumentException
see I Site Policy get Type public int get Type return type  ISitePolicy getType getType
see I Site Policy get List public String get List return list  ISitePolicy getList getList
public synchronized void set List String list if list null this list new String 0 else this list list  setList
private Feature Entry String id String version String plugin Identifier String plugin Version boolean primary String application URL root if id null throw new Illegal Argument Exception this id id this version version this plugin Version plugin Version this plugin Identifier plugin Identifier this primary primary this application application this root root null new URL 0 root  FeatureEntry pluginIdentifier pluginVersion IllegalArgumentException pluginVersion pluginVersion pluginIdentifier pluginIdentifier
private Feature Entry String id String version String plugin Version boolean primary String application URL root this id version id plugin Version primary application root  FeatureEntry pluginVersion pluginVersion
see I Feature Entry get Feature Identifier public String get Feature Identifier return id  IFeatureEntry getFeatureIdentifier getFeatureIdentifier
see I Feature Entry get Feature Version public String get Feature Version return version  IFeatureEntry getFeatureVersion getFeatureVersion
see I Feature Entry get Feature Plugin Version public String get Feature Plugin Version return plugin Version  IFeatureEntry getFeaturePluginVersion getFeaturePluginVersion pluginVersion
see I Feature Entry get Feature Application public String get Feature Application return application  IFeatureEntry getFeatureApplication getFeatureApplication
see I Feature Entry get Feature RootUR Ls public URL get Feature RootUR Ls return root  IFeatureEntry getFeatureRootURLs getFeatureRootURLs
see I Feature Entry can Be Primary public boolean can Be Primary return primary  IFeatureEntry canBePrimary canBePrimary
see I Feature Entry get Feature Plugin Identifier public String get Feature Plugin Identifier return plugin Identifier  IFeatureEntry getFeaturePluginIdentifier getFeaturePluginIdentifier pluginIdentifier
code false code otherwise public boolean select String entry 
code false code otherwise public boolean select String element Hash Map attributes  HashMap
public Parser File file try load new File Input Stream file catch Exception e continue actual parsing will report errors  FileInputStream
public Parser URL url try load url open Stream catch Exception e continue actual parsing will report errors  openStream
public Hash Map get Element Selector selector if selector null return null String element for int i 0 i elements size i make pre parse selector call element String elements get i if selector select element parse selected entry Hash Map attributes new Hash Map String element Name int j parse out element name for j 0 j element length j if Character is Whitespace element char At j break if j element length element Name element else element Name element substring 0 j element element substring j parse out attributes String Tokenizer t new String Tokenizer element NON NLS 1 boolean is Key true String key NON NLS 1 while t has More Tokens String token t next Token trim if token equals NON NLS 1 collect key value pairs if is Key key token is Key false else attributes put key token is Key true make post parse selector call if selector select element Name attributes attributes put element element Name NON NLS 1 return attributes return null  HashMap getElement HashMap HashMap elementName isWhitespace charAt elementName elementName StringTokenizer StringTokenizer isKey hasMoreTokens nextToken isKey isKey isKey elementName elementName
private void load Input Stream is if is null return read file String Buffer xml new String Buffer 4096 char iobuf new char 4096 Input Stream Reader r null try r new Input Stream Reader is int len r read iobuf 0 iobuf length while len 1 xml append iobuf 0 len len r read iobuf 0 iobuf length catch Exception e return finally if r null try r close catch IO Exception e ignore parse out element tokens String xml String xml to String String Tokenizer t new String Tokenizer xml String NON NLS 1 while t has More Tokens String token t next Token trim if token equals NON NLS 1 elements add token  InputStream StringBuffer StringBuffer InputStreamReader InputStreamReader IOException xmlString toString StringTokenizer StringTokenizer xmlString hasMoreTokens nextToken
public Boot Descriptor String id String version String libs URL dir this id id this version version this libs libs this dir dir  BootDescriptor
public String get Id return id  getId
public String get Version return version  getVersion
public String get Libraries return libs  getLibraries
public URL get Plugin DirectoryURL return dir  getPluginDirectoryURL
private Platform Configuration String config Arg String meta Path URL plugin Path throws IO Exception this sites new Hash Map this external Link Sites new Hash Map this cfgd Features new Hash Map this boot Plugins new Hash Map Determine configuration URL to use based on command line argument URL configURL null if config Arg null config Arg trim equals NON NLS 1 configURL new URL config Arg initialize configuration boolean create Root Site plugin Path null initialize Current configURL meta Path create Root Site merge in any plugin path entries converted to site s if plugin Path null update Configuration From Plugins plugin Path pick up any first time default settings relative to install location load Initialization Attributes Detect external links These are soft link to additional sites The link files are usually provided by external installation programs They are located relative to this configuration URL configure External Links Validate sites in the configuration Causes any sites that do not exist to be removed from the configuration validate Sites compute differences between configuration and actual content of the sites base sites and link sites compute Change Stamp determine which plugins we will use to start the rest of the kernel need to get core runtime matching the executing core boot and xerces matching the selected core runtime locate Default Plugins  PlatformConfiguration configArg metaPath pluginPath IOException HashMap externalLinkSites HashMap cfgdFeatures HashMap bootPlugins HashMap configArg configArg configArg createRootSite pluginPath initializeCurrent metaPath createRootSite pluginPath updateConfigurationFromPlugins pluginPath loadInitializationAttributes configureExternalLinks validateSites computeChangeStamp locateDefaultPlugins
Platform Configuration URL url throws IO Exception this sites new Hash Map this external Link Sites new Hash Map this cfgd Features new Hash Map this boot Plugins new Hash Map initialize url  PlatformConfiguration IOException HashMap externalLinkSites HashMap cfgdFeatures HashMap bootPlugins HashMap
see I Platform Configuration create Site Entry URL I Site Policy public I Site Entry create Site Entry URL url I Site Policy policy return new Platform Configuration Site Entry url policy this  IPlatformConfiguration createSiteEntry ISitePolicy ISiteEntry createSiteEntry ISitePolicy PlatformConfiguration SiteEntry
see I Platform Configuration create Site Policy int String public I Site Policy create Site Policy int type String list return new Platform Configuration Site Policy type list  IPlatformConfiguration createSitePolicy ISitePolicy createSitePolicy PlatformConfiguration SitePolicy
see I Platform Configuration create Feature Entry String String String boolean String URL public I Feature Entry create Feature Entry String id String version String plugin Version boolean primary String application URL root return new Platform Configuration Feature Entry id version plugin Version primary application root  IPlatformConfiguration createFeatureEntry IFeatureEntry createFeatureEntry pluginVersion PlatformConfiguration FeatureEntry pluginVersion
String boolean String URL public I Feature Entry create Feature Entry String id String version String plugin Identifier String plugin Version boolean primary String application URL root return new Platform Configuration Feature Entry id version plugin Identifier plugin Version primary application root  IFeatureEntry createFeatureEntry pluginIdentifier pluginVersion PlatformConfiguration FeatureEntry pluginIdentifier pluginVersion
see I Platform Configuration configure Site I Site Entry public void configure Site I Site Entry entry configure Site entry false  IPlatformConfiguration configureSite ISiteEntry configureSite ISiteEntry configureSite
public synchronized void configure Site I Site Entry entry boolean replace if entry null return URL url entry getURL if url null return String key url to External Form if sites contains Key key replace return sites put key entry  configureSite ISiteEntry toExternalForm containsKey
public synchronized void unconfigure Site I Site Entry entry if entry null return URL url entry getURL if url null return String key url to External Form sites remove key  unconfigureSite ISiteEntry toExternalForm
public I Site Entry get Configured Sites if sites size 0 return new I Site Entry 0 return I Site Entry sites values to Array new I Site Entry 0  ISiteEntry getConfiguredSites ISiteEntry ISiteEntry toArray ISiteEntry
public I Site Entry find Configured Site URL url if url null return null String key url to External Form I Site Entry result I Site Entry sites get key try if result null retry with decoded URL string result I Site Entry sites get URL Decoder decode key null catch Unsupported Encoding Exception e return result  ISiteEntry findConfiguredSite toExternalForm ISiteEntry ISiteEntry ISiteEntry URLDecoder UnsupportedEncodingException
public synchronized void configure Feature Entry I Feature Entry entry if entry null return String key entry get Feature Identifier if key null return cfgd Features put key entry  configureFeatureEntry IFeatureEntry getFeatureIdentifier cfgdFeatures
public synchronized void unconfigure Feature Entry I Feature Entry entry if entry null return String key entry get Feature Identifier if key null return cfgd Features remove key  unconfigureFeatureEntry IFeatureEntry getFeatureIdentifier cfgdFeatures
public I Feature Entry get Configured Feature Entries if cfgd Features size 0 return new I Feature Entry 0 return I Feature Entry cfgd Features values to Array new I Feature Entry 0  IFeatureEntry getConfiguredFeatureEntries cfgdFeatures IFeatureEntry IFeatureEntry cfgdFeatures toArray IFeatureEntry
public I Feature Entry find Configured Feature Entry String id if id null return null return I Feature Entry cfgd Features get id  IFeatureEntry findConfiguredFeatureEntry IFeatureEntry cfgdFeatures
see I Platform Configuration get Configuration Location public URL get Configuration Location return config Location  IPlatformConfiguration getConfigurationLocation getConfigurationLocation configLocation
public long get Change Stamp if change Stamp Is Valid compute Change Stamp return change Stamp  getChangeStamp changeStampIsValid computeChangeStamp changeStamp
public long get Features Change Stamp if features Change Stamp Is Valid compute Features Change Stamp return features Change Stamp  getFeaturesChangeStamp featuresChangeStampIsValid computeFeaturesChangeStamp featuresChangeStamp
public long get Plugins Change Stamp if plugins Change Stamp Is Valid compute Plugins Change Stamp return plugins Change Stamp  getPluginsChangeStamp pluginsChangeStampIsValid computePluginsChangeStamp pluginsChangeStamp
public String get Application Identifier if cmd Initialize we are running post install initialization Force running of the reconciler return RECONCILER APP if features Change Stamp last Features Change Stamp we have detected feature changes see if we need to reconcile boolean update cmd No Update cmd Update if update return RECONCILER APP normal startup run specified application return get Application Identifier Internal  getApplicationIdentifier cmdInitialize RECONCILER_APP featuresChangeStamp lastFeaturesChangeStamp cmdNoUpdate cmdUpdate RECONCILER_APP getApplicationIdentifierInternal
private String get Application Identifier Internal if cmd Application null application was specified return cmd Application else if feature was not specified use the default feature String feature cmd Feature if feature null feature default Feature lookup application for feature specified or defaulted if feature null I Feature Entry fe find Configured Feature Entry feature if fe null if fe get Feature Application null return fe get Feature Application return hardcoded default if we failed return DEFAULT FEATURE APPLICATION  getApplicationIdentifierInternal cmdApplication cmdApplication cmdFeature defaultFeature IFeatureEntry findConfiguredFeatureEntry getFeatureApplication getFeatureApplication DEFAULT_FEATURE_APPLICATION
public String get Primary Feature Identifier if cmd Feature null feature was specified on command line return cmd Feature feature was not specified on command line if default Feature null return default Feature return customized default if set else return DEFAULT FEATURE ID return hardcoded default  getPrimaryFeatureIdentifier cmdFeature cmdFeature defaultFeature defaultFeature DEFAULT_FEATURE_ID
public URL get Plugin Path Array List path new Array List if DEBUG debug computed plug in path NON NLS 1 I Site Entry sites get Configured Sites URL pathURL for int i 0 i sites length i String plugins sites i get Plugins for int j 0 j plugins length j try pathURL new URL Site Entry sites i get ResolvedURL plugins j path add pathURL if DEBUG debug pathURL to String NON NLS 1 catch MalformedURL Exception e skip entry if DEBUG debug bad URL e NON NLS 1 return URL path to Array new URL 0  getPluginPath ArrayList ArrayList ISiteEntry getConfiguredSites getPlugins SiteEntry getResolvedURL toString MalformedURLException toArray
see I Platform Configuration get Bootstrap Plugin Identifiers public String get Bootstrap Plugin Identifiers return BOOTSTRAP PLUGINS  IPlatformConfiguration getBootstrapPluginIdentifiers getBootstrapPluginIdentifiers BOOTSTRAP_PLUGINS
public void set Bootstrap Plugin Location String id URL location String ids get Bootstrap Plugin Identifiers for int i 0 i ids length i if ids i equals id boot Plugins put id location to External Form break  setBootstrapPluginLocation getBootstrapPluginIdentifiers bootPlugins toExternalForm
see I Platform Configuration is Updateable public boolean is Updateable return true  IPlatformConfiguration isUpdateable isUpdateable
see I Platform Configuration is Transient public boolean is Transient return transient Config  IPlatformConfiguration isTransient isTransient transientConfig
see I Platform Configuration is Transient boolean public void is Transient boolean value if this Boot Loader get Current Platform Configuration transient Config value  IPlatformConfiguration isTransient isTransient BootLoader getCurrentPlatformConfiguration transientConfig
public synchronized void refresh Reset computed values Will be lazily refreshed on next access I Site Entry sites get Configured Sites for int i 0 i sites length i reset site entry Site Entry sites i refresh reset configuration entry last Features Change Stamp features Change Stamp change Stamp Is Valid false features Change Stamp Is Valid false plugins Change Stamp Is Valid false  ISiteEntry getConfiguredSites SiteEntry lastFeaturesChangeStamp featuresChangeStamp changeStampIsValid featuresChangeStampIsValid pluginsChangeStampIsValid
see I Platform Configuration save public void save throws IO Exception if is Updateable save config Location  IPlatformConfiguration IOException isUpdateable configLocation
public synchronized void save URL url throws IO Exception if url null throw new IO Exception Unable to save No URL is specified NON NLS 1 Print Writer w null Output Stream os null if url get Protocol equals file NON NLS 1 not a file protocol attempt to save to the URL URL Connection uc url open Connection uc set Do Output true os uc get Output Stream w new Print Writer os try write w finally w close else file protocol do safe i o File cfig File new File url get File replace File separator Char File cfig Dir cfig File get Parent File if cfig Dir null cfig Dir mkdirs first save the file as temp File cfig Tmp new File cfig File get Absolute Path CONFIG FILE TEMP SUFFIX os new File Output Stream cfig Tmp w new Print Writer os try write w finally w close make sure we actually succeeded saving the whole configuration Input Stream is new File Input Stream cfig Tmp Properties tmp Props new Properties try tmp Props load is if EOF equals tmp Props get Property EOF throw new IO Exception Unable to save cfig Tmp get Absolute Path NON NLS 1 finally is close make the saved config the active one File cfig Bak new File cfig File get Absolute Path CONFIG FILE BAK SUFFIX cfig Bak delete may have old bak due to prior failure if cfig File exists cfig File rename To cfig Bak at this point we have old config if existed as bak and the new config as tmp boolean ok cfig Tmp rename To cfig File if ok at this point we have the new config activated and the old config if it existed as bak cfig Bak delete clean up else this codepath represents a tiny failure window The load processing on startup will detect missing config and will attempt to start with tmp latest then bak the previous We can also end up here if we failed to rename the current config to bak In that case we will restart with the previous state throw new IO Exception Unable to save cfig Tmp get Absolute Path NON NLS 1  IOException IOException PrintWriter OutputStream getProtocol URLConnection openConnection setDoOutput getOutputStream PrintWriter cfigFile getFile separatorChar cfigDir cfigFile getParentFile cfigDir cfigDir cfigTmp cfigFile getAbsolutePath CONFIG_FILE_TEMP_SUFFIX FileOutputStream cfigTmp PrintWriter InputStream FileInputStream cfigTmp tmpProps tmpProps tmpProps getProperty IOException cfigTmp getAbsolutePath cfigBak cfigFile getAbsolutePath CONFIG_FILE_BAK_SUFFIX cfigBak cfigFile cfigFile renameTo cfigBak cfigTmp renameTo cfigFile cfigBak IOException cfigTmp getAbsolutePath
public Boot Descriptor get Plugin Boot Descriptor String id return the plugin descriptor for the specified plugin This method is used during boot processing to obtain information about kernel plugins whose class loaders must be created prior to the plugin registry being available ie loaders needed to create the plugin registry if RUNTIME PLUGIN ID equals id return runtime Descriptor else return null  BootDescriptor getPluginBootDescriptor RUNTIME_PLUGIN_ID runtimeDescriptor
static Platform Configuration get Current return current Platform Configuration  PlatformConfiguration getCurrent currentPlatformConfiguration
Create and initialize the current platform configuration param cmd Args command line arguments startup and boot arguments are already consumed param r10plugins plugin path URL as passed on the Boot Loader run or Boot Loader startup method Supported for R1 0 compatibility param r10apps application identifies as passed on the Boot Loader run method Supported for R1 0 compatibility param meta Path path to the platform metadata area static synchronized String startup String cmd Args URL r10plugins String r10app String meta Path URL installURL throws Exception Platform Configuration installURL installURL if Boot Loader was invoked directly rather than via Main it is possible to have the plugin path and application set in 2 ways 1 via an explicit argument on the invocation method or 2 via a command line argument passed into this method as the argument String If specified the explicit values are used even if the command line arguments were specified as well cmd Plugins r10plugins R1 0 compatibility cmd Application r10app R1 0 compatibility process command line arguments String passthru Args process Command Line cmd Args if cmd Dev cmd No Update true force noupdate when in dev mode eg PDE create current configuration if current Platform Configuration null current Platform Configuration new Platform Configuration cmd Configuration meta Path cmd Plugins check if we will be forcing reconciliation passthru Args check For Feature Changes passthru Args current Platform Configuration check if we should indicate new changes passthru Args check For New Updates current Platform Configuration passthru Args return passthru Args  cmdArgs BootLoader BootLoader BootLoader metaPath cmdArgs metaPath PlatformConfiguration BootLoader cmdPlugins cmdApplication passthruArgs processCommandLine cmdArgs cmdDev cmdNoUpdate currentPlatformConfiguration currentPlatformConfiguration PlatformConfiguration cmdConfiguration metaPath cmdPlugins passthruArgs checkForFeatureChanges passthruArgs currentPlatformConfiguration passthruArgs checkForNewUpdates currentPlatformConfiguration passthruArgs passthruArgs
static synchronized void shutdown throws IO Exception save platform configuration Platform Configuration config get Current if config null try config save catch IO Exception e if DEBUG debug Unable to save configuration e to String NON NLS 1 will recover on next startup config clear Configuration Lock  IOException PlatformConfiguration getCurrent IOException toString clearConfigurationLock
private synchronized void initialize Current URL url String meta Path boolean create Root Site throws IO Exception FIXME commented out for now Remove if not needed boolean concurrent Use false if cmd Initialize we are running post install initialization install command line argument Ignore any configuration URL passed in Force the configuration to be saved in the install location Allow an existing configuration to be re initialized url new URL get InstallURL CONFIG FILE if we fail here return exception FIXME commented out for now Remove if not needed I left the call to get Configuration Lock in just in case calling it has useful side effect If not then it can be removed too concurrent Use get Configuration Lock url get Configuration Lock url reset Initialization Configuration url 20111 if create Root Site configure Site get Root Site if DEBUG debug Initializing configuration url to String NON NLS 1 config Location url verify Path config Location return if url null configuration URL was specified Use it if exists or create one in specified location check concurrent use lock FIXME might not need this method call get Configuration Lock url try loading the configuration try load url if DEBUG debug Using configuration url to String NON NLS 1 catch IO Exception e cmd First Use true if create Root Site configure Site get Root Site if DEBUG debug Creating configuration url to String NON NLS 1 config Location url verify Path config Location return else configuration URL was not specified Default behavior is to look for configuration in the workspace meta area If not found look for pre initialized configuration in the installation location If it is found it is used as the initial configuration Otherwise a new configuration is created In either case the resulting configuration is written into the default state area The default state area is computed as follows 1 We store the config state relative to the eclipse directory if possible 2 If this directory is read only OR if shared install is desired using command line argument shared we store the state in user home eclipse application id   version where user home is unique for each local user and application id is the one defined in eclipseproduct marker file If eclipseproduct does not exist use eclipse as the application id if we fail here return exception URL default StateURL get Default State Location URL cfigURL new URL default StateURL CONFIG FILE check concurrent use lock FIXME might not need this method call get Configuration Lock cfigURL if we can load it use it try load cfigURL config Location cfigURL verify Path config Location if DEBUG debug Using configuration config Location to String NON NLS 1 return catch IO Exception e cmd First Use true we are creating new configuration failed to load see if we can find pre initialized configuration Don t attempt this initialization when self hosting is unpredictable if create Root Site try url new URL get InstallURL CONFIG FILE load url pre initialized config loaded OK copy any remaining update metadata Only copy if the default config location is not the install location if get InstallURL default StateURL copy Initialized State get InstallURL default StateURL get File CONFIG DIR config Location cfigURL config in default location is the right URL verify Path config Location if DEBUG debug Using configuration config Location to String NON NLS 1 debug Initialized from url to String NON NLS 1 return catch IO Exception e continue if load failed initialize with default site info if create Root Site configure Site get Root Site config Location cfigURL verify Path config Location if DEBUG debug Creating configuration config Location to String NON NLS 1 return  initializeCurrent metaPath createRootSite IOException concurrentUse cmdInitialize getInstallURL CONFIG_FILE getConfigurationLock concurrentUse getConfigurationLock getConfigurationLock resetInitializationConfiguration createRootSite configureSite getRootSite toString configLocation verifyPath configLocation getConfigurationLock toString IOException cmdFirstUse createRootSite configureSite getRootSite toString configLocation verifyPath configLocation _ defaultStateURL getDefaultStateLocation defaultStateURL CONFIG_FILE getConfigurationLock configLocation verifyPath configLocation configLocation toString IOException cmdFirstUse createRootSite getInstallURL CONFIG_FILE getInstallURL defaultStateURL copyInitializedState getInstallURL defaultStateURL getFile CONFIG_DIR configLocation verifyPath configLocation configLocation toString toString IOException createRootSite configureSite getRootSite configLocation verifyPath configLocation configLocation toString
private synchronized void initialize URL url throws IO Exception if url null if DEBUG debug Creating empty configuration object NON NLS 1 return load url config Location url if DEBUG debug Using configuration config Location to String NON NLS 1  IOException configLocation configLocation toString
private I Site Entry get Root Site create default site entry for the root I Site Policy default Policy create Site Policy DEFAULT POLICY TYPE DEFAULT POLICY LIST URL siteURL null try siteURL new URL PlatformURL Handler PROTOCOL PlatformURL Handler PROTOCOL SEPARATOR base NON NLS 1 NON NLS 2 NON NLS 3 try using platform relative URL catch MalformedURL Exception e siteURL get InstallURL ensure we come up use absolute file URL I Site Entry default Site create Site Entry siteURL default Policy return default Site  ISiteEntry getRootSite ISitePolicy defaultPolicy createSitePolicy DEFAULT_POLICY_TYPE DEFAULT_POLICY_LIST PlatformURLHandler PlatformURLHandler PROTOCOL_SEPARATOR MalformedURLException getInstallURL ISiteEntry defaultSite createSiteEntry defaultPolicy defaultSite
private void reset Initialization Configuration URL url throws IO Exception 20111 if supports Detection url return can t do URL resolved resolve PlatformURL url File init Cfg new File resolved get File replace File separator Char File init Dir init Cfg get Parent File reset Initialization Location init Dir  resetInitializationConfiguration IOException supportsDetection resolvePlatformURL initCfg getFile separatorChar initDir initCfg getParentFile resetInitializationLocation initDir
private void reset Initialization Location File dir 20111 if dir null dir exists dir is Directory return File list dir list Files for int i 0 i list length i if list i is Directory reset Initialization Location list i list i delete  resetInitializationLocation isDirectory listFiles isDirectory resetInitializationLocation
private boolean get Configuration Lock URL url if configuration In Workspace url return false if url get Protocol equals file NON NLS 1 return false verify Path url String cfg Name url get File replace File separator Char String lock Name cfg Name CONFIG FILE LOCK SUFFIX cfg Lock File new File lock Name if the lock file already exists try to delete assume failure means another eclipse has it open if cfg Lock File exists cfg Lock File delete OK so far open the lock file so other instances will fail try cfg Lock FileRAF new Random Access File cfg Lock File rw NON NLS 1 cfg Lock FileRAF write Byte 0 catch IO Exception e return false  getConfigurationLock configurationInWorkspace getProtocol verifyPath cfgName getFile separatorChar lockName cfgName CONFIG_FILE_LOCK_SUFFIX cfgLockFile lockName cfgLockFile cfgLockFile cfgLockFileRAF RandomAccessFile cfgLockFile cfgLockFileRAF writeByte IOException
private void clear Configuration Lock try if cfg Lock FileRAF null cfg Lock FileRAF close cfg Lock FileRAF null catch IO Exception e ignore if cfg Lock File null cfg Lock File delete cfg Lock File null  clearConfigurationLock cfgLockFileRAF cfgLockFileRAF cfgLockFileRAF IOException cfgLockFile cfgLockFile cfgLockFile
private boolean configuration In Workspace URL url the configuration file is now in the workspace so return true return true  configurationInWorkspace
private void compute Change Stamp compute Features Change Stamp compute Plugins Change Stamp change Stamp features Change Stamp plugins Change Stamp change Stamp Is Valid true  computeChangeStamp computeFeaturesChangeStamp computePluginsChangeStamp changeStamp featuresChangeStamp pluginsChangeStamp changeStampIsValid
private void compute Features Change Stamp if features Change Stamp Is Valid return long result 0 I Site Entry sites get Configured Sites for int i 0 i sites length i result sites i get Features Change Stamp features Change Stamp result features Change Stamp Is Valid true  computeFeaturesChangeStamp featuresChangeStampIsValid ISiteEntry getConfiguredSites getFeaturesChangeStamp featuresChangeStamp featuresChangeStampIsValid
private void compute Plugins Change Stamp if plugins Change Stamp Is Valid return long result 0 I Site Entry sites get Configured Sites for int i 0 i sites length i result sites i get Plugins Change Stamp plugins Change Stamp result plugins Change Stamp Is Valid true  computePluginsChangeStamp pluginsChangeStampIsValid ISiteEntry getConfiguredSites getPluginsChangeStamp pluginsChangeStamp pluginsChangeStampIsValid
private void configure External Links URL linkURL get InstallURL if supports Detection linkURL return try linkURL new URL linkURL LINKS NON NLS 1 catch MalformedURL Exception e skip bad links if DEBUG debug Unable to obtain link URL NON NLS 1 return File link Dir new File linkURL get File File links link Dir list Files if links null links length 0 if DEBUG debug No links detected in linkURL to External Form NON NLS 1 return for int i 0 i links length i if links i is Directory continue if DEBUG debug Link file links i get Absolute Path NON NLS 1 Properties props new Properties File Input Stream is null try is new File Input Stream links i props load is configure External Link Sites links i props catch IO Exception e skip bad links if DEBUG debug unable to load link file e NON NLS 1 continue finally if is null try is close catch IO Exception e ignore  configureExternalLinks getInstallURL supportsDetection MalformedURLException linkDir getFile linkDir listFiles toExternalForm isDirectory getAbsolutePath FileInputStream FileInputStream configureExternalLinkSites IOException IOException
private void configure External Link Sites File link File Properties props String path props get Property LINK PATH if path null if DEBUG debug no path definition NON NLS 1 return String link boolean updateable true URL siteURL Site Entry link Site I Site Policy link Site Policy create Site Policy DEFAULT POLICY TYPE DEFAULT POLICY LIST parse out link information if path starts With LINK READ NON NLS 1 updateable false link path substring 2 trim else if path starts With LINK READ WRITE NON NLS 1 link path substring 3 trim else link path make sure we have a valid link specification try if link ends With File separator link File separator File target new File link ECLIPSE link file target get Absolute Path replace File separator Char NON NLS 1 if link ends With NON NLS 1 link sites must be directories NON NLS 1 siteURL new URL link catch MalformedURL Exception e ignore bad links if DEBUG debug bad URL e NON NLS 1 return process the link link Site Site Entry external Link Sites get siteURL if link Site null we already have a site for this link target update it if needed link Site updateable updateable link Site link File Name link File get Absolute Path else this is a link to a new target so create site for it link Site Site Entry create Site Entry siteURL link Site Policy link Site updateable updateable link Site link File Name link File get Absolute Path configure the new site NOTE duplicates are not replaced first one in wins configure Site link Site if DEBUG debug updateable R W R O siteURL to String NON NLS 1 NON NLS 2 NON NLS 3  configureExternalLinkSites linkFile getProperty LINK_PATH SiteEntry linkSite ISitePolicy linkSitePolicy createSitePolicy DEFAULT_POLICY_TYPE DEFAULT_POLICY_LIST startsWith LINK_READ startsWith LINK_READ_WRITE endsWith getAbsolutePath separatorChar endsWith MalformedURLException linkSite SiteEntry externalLinkSites linkSite linkSite linkSite linkFileName linkFile getAbsolutePath linkSite SiteEntry createSiteEntry linkSitePolicy linkSite linkSite linkFileName linkFile getAbsolutePath configureSite linkSite toString
private void update Configuration From Plugins URL file throws IO Exception get the actual plugin path URL plugin Path Platform Configuration Utils get Plugin Path file if plugin Path null plugin Path length 0 return create a temp configuration and populate it based on plugin path Platform Configuration temp Config new Platform Configuration URL null for int i 0 i plugin Path length i String entry plugin Path i to External Form String site Portion String plugin Portion int ix if entry ends With NON NLS 1 assume directory path in the form site plugins look for ix find Entry Separator entry 2 second from end site Portion entry substring 0 ix 1 plugin Portion entry substring ix 1 if plugin Portion equals plugins NON NLS 1 continue unsupported entry skip it fragments are handled plugin Portion null else assume full path in the form site plugins Dir some plugin plugin xml look for ix find Entry Separator entry 3 third from end site Portion entry substring 0 ix 1 plugin Portion entry substring ix 1 if ix 1 continue bad entry skip it URL siteURL null try siteURL new URL site Portion if siteURL get Protocol equals file NON NLS 1 File sf new File siteURL get File String sfn sf get Absolute Path replace File separator Char if sfn ends With NON NLS 1 sfn NON NLS 1 siteURL new URL file sfn NON NLS 1 catch MalformedURL Exception e continue bad entry skip it configure existing site or create a new one for the entry I Site Entry site temp Config find Configured Site siteURL I Site Policy policy if site null new site if plugin Portion null policy temp Config create Site Policy I Site Policy USER EXCLUDE null else policy temp Config create Site Policy I Site Policy USER INCLUDE new String plugin Portion site temp Config create Site Entry siteURL policy temp Config configure Site site else existing site policy site get Site Policy if policy get Type I Site Policy USER EXCLUDE continue redundant entry skip it if plugin Portion null directory entry change policy to exclusion with empty list policy temp Config create Site Policy I Site Policy USER EXCLUDE null else explicit entry add it to the inclusion list Array List list new Array List Arrays as List policy get List list add plugin Portion policy temp Config create Site Policy I Site Policy USER INCLUDE String list to Array new String 0 site set Site Policy policy merge resulting site s into the specified configuration I Site Entry temp Sites temp Config get Configured Sites for int i 0 i temp Sites length i configure Site temp Sites i true replace  updateConfigurationFromPlugins IOException pluginPath PlatformConfigurationUtils getPluginPath pluginPath pluginPath PlatformConfiguration tempConfig PlatformConfiguration pluginPath pluginPath toExternalForm sitePortion pluginPortion endsWith findEntrySeparator sitePortion pluginPortion pluginPortion pluginPortion pluginsDir findEntrySeparator sitePortion pluginPortion sitePortion getProtocol getFile getAbsolutePath separatorChar endsWith MalformedURLException ISiteEntry tempConfig findConfiguredSite ISitePolicy pluginPortion tempConfig createSitePolicy ISitePolicy USER_EXCLUDE tempConfig createSitePolicy ISitePolicy USER_INCLUDE pluginPortion tempConfig createSiteEntry tempConfig configureSite getSitePolicy getType ISitePolicy USER_EXCLUDE pluginPortion tempConfig createSitePolicy ISitePolicy USER_EXCLUDE ArrayList ArrayList asList getList pluginPortion tempConfig createSitePolicy ISitePolicy USER_INCLUDE toArray setSitePolicy ISiteEntry tempSites tempConfig getConfiguredSites tempSites configureSite tempSites
private void validate Sites check to see if all sites are valid Remove any sites that do not exist Site Entry list Site Entry sites values to Array new Site Entry 0 for int i 0 i list length i URL siteURL list i get ResolvedURL if supports Detection siteURL continue File site Root new File siteURL get File replace File separator Char if site Root exists unconfigure Site list i if DEBUG debug Site siteURL does not exist removing from configuration NON NLS 1 NON NLS 2  validateSites SiteEntry SiteEntry toArray SiteEntry getResolvedURL supportsDetection siteRoot getFile separatorChar siteRoot unconfigureSite
private void copy Initialized State URL source String target String dir try if source get Protocol equals file NON NLS 1 return need to be able to do dir copy new File source get File new File target dir catch IO Exception e this is an optimistic copy If we fail the state will be reconciled when the update manager is triggered  copyInitializedState getProtocol getFile IOException
private void copy File src Dir File tgt Dir String extra Path throws IO Exception File src new File src Dir extra Path File tgt new File tgt Dir extra Path if src is Directory copy content of directories tgt mkdir String list src list if list null return for int i 0 i list length i copy src Dir tgt Dir extra Path File separator list i else copy individual files File Input Stream is null File Output Stream os null try is new File Input Stream src os new File Output Stream tgt byte buff new byte 1024 int count is read buff while count 1 os write buff 0 count count is read buff catch IO Exception e continue update reconciler will have to reconstruct state finally if is null try is close catch IO Exception e ignore if os null try os close catch IO Exception e ignore  srcDir tgtDir extraPath IOException srcDir extraPath tgtDir extraPath isDirectory srcDir tgtDir extraPath FileInputStream FileOutputStream FileInputStream FileOutputStream IOException IOException IOException
private void load URL url throws IO Exception if url null throw new IO Exception Unable to load URL NON NLS 1 try to load saved configuration file watch for failed prior save Properties props null IO Exception original Exception null try props load Properties url null try to load config file catch IO Exception e1 original Exception e1 try props load Properties url CONFIG FILE TEMP SUFFIX check for failures on save catch IO Exception e2 try props load Properties url CONFIG FILE BAK SUFFIX check for failures on save catch IO Exception e3 throw original Exception we tried but no config here check version String v props get Property CFG VERSION if VERSION equals v the state is invalid delete any files under the directory bug 33493 reset Update Manager State url throw new IO Exception Bad version v NON NLS 1 load simple properties default Feature load Attribute props CFG FEATURE ENTRY DEFAULT null String flag load Attribute props CFG TRANSIENT null if flag null if flag equals true NON NLS 1 transient Config true else transient Config false String stamp load Attribute props CFG FEATURE STAMP null if stamp null try last Features Change Stamp Long parse Long stamp catch Number Format Exception e ignore bad attribute load bootstrap entries String ids get Bootstrap Plugin Identifiers for int i 0 i ids length i boot Plugins put ids i load Attribute props CFG BOOT PLUGIN ids i null NON NLS 1 load feature entries I Feature Entry fe load Feature Entry props CFG FEATURE ENTRY 0 null NON NLS 1 for int i 1 fe null i configure Feature Entry fe fe load Feature Entry props CFG FEATURE ENTRY i null NON NLS 1 load site properties Site Entry root Site Entry get Root Site String root Url String root getURL to External Form Site Entry se Site Entry load Site props CFG SITE 0 null NON NLS 1 for int i 1 se null i check if we are forcing first use processing with an existing platform cfg In this case ignore site entry that represents the platform install and use a root site entry in its place This ensures we do not get messed up by an exclusion list that is read from the prior state if cmd First Use root Url String equals se getURL to External Form se root if se is Externally Linked Site configure Site se else remember external link site state but do not configure at this point external Link Sites put se getURL se se Site Entry load Site props CFG SITE i null NON NLS 1  IOException IOException IOException originalException loadProperties IOException originalException loadProperties CONFIG_FILE_TEMP_SUFFIX IOException loadProperties CONFIG_FILE_BAK_SUFFIX IOException originalException getProperty CFG_VERSION resetUpdateManagerState IOException defaultFeature loadAttribute CFG_FEATURE_ENTRY_DEFAULT loadAttribute CFG_TRANSIENT transientConfig transientConfig loadAttribute CFG_FEATURE_STAMP lastFeaturesChangeStamp parseLong NumberFormatException getBootstrapPluginIdentifiers bootPlugins loadAttribute CFG_BOOT_PLUGIN IFeatureEntry loadFeatureEntry CFG_FEATURE_ENTRY configureFeatureEntry loadFeatureEntry CFG_FEATURE_ENTRY SiteEntry SiteEntry getRootSite rootUrlString toExternalForm SiteEntry SiteEntry loadSite CFG_SITE cmdFirstUse rootUrlString toExternalForm isExternallyLinkedSite configureSite externalLinkSites SiteEntry loadSite CFG_SITE
private Properties load Properties URL url String suffix throws IO Exception figure out what we will be loading if suffix null suffix equals NON NLS 1 url new URL url get Protocol url get Host url get Port url get File suffix try to load saved configuration file Properties props new Properties Input Stream is null try is url open Stream props load is check to see if we have complete config file if EOF equals props get Property EOF throw new IO Exception Unable to load NON NLS 1 finally if is null try is close catch IO Exception e ignore return props  loadProperties IOException getProtocol getHost getPort getFile InputStream openStream getProperty IOException IOException
private I Site Entry load Site Properties props String name I Site Entry dflt String url String load Attribute props name CFG URL null NON NLS 1 if url String null return dflt URL url null try url new URL url String catch MalformedURL Exception e return dflt int policy Type String policy List String type String load Attribute props name CFG POLICY null NON NLS 1 if type String null policy Type DEFAULT POLICY TYPE policy List DEFAULT POLICY LIST else int i for i 0 i CFG POLICY TYPE length i if type String equals CFG POLICY TYPE i break if i CFG POLICY TYPE length policy Type DEFAULT POLICY TYPE policy List DEFAULT POLICY LIST else policy Type i policy List load List Attribute props name CFG LIST new String 0 NON NLS 1 I Site Policy sp create Site Policy policy Type policy List Site Entry site Site Entry create Site Entry url sp String stamp load Attribute props name CFG FEATURE STAMP null NON NLS 1 if stamp null try site last Features Change Stamp Long parse Long stamp catch Number Format Exception e ignore bad attribute stamp load Attribute props name CFG PLUGIN STAMP null NON NLS 1 if stamp null try site last Plugins Change Stamp Long parse Long stamp catch Number Format Exception e ignore bad attribute String flag load Attribute props name CFG UPDATEABLE null NON NLS 1 if flag null if flag equals true NON NLS 1 site updateable true else site updateable false String linkname load Attribute props name CFG LINK FILE null NON NLS 1 if linkname null linkname equals NON NLS 1 site link File Name linkname replace File separator Char return site  ISiteEntry loadSite ISiteEntry urlString loadAttribute CFG_URL urlString urlString MalformedURLException policyType policyList typeString loadAttribute CFG_POLICY typeString policyType DEFAULT_POLICY_TYPE policyList DEFAULT_POLICY_LIST CFG_POLICY_TYPE typeString CFG_POLICY_TYPE CFG_POLICY_TYPE policyType DEFAULT_POLICY_TYPE policyList DEFAULT_POLICY_LIST policyType policyList loadListAttribute CFG_LIST ISitePolicy createSitePolicy policyType policyList SiteEntry SiteEntry createSiteEntry loadAttribute CFG_FEATURE_STAMP lastFeaturesChangeStamp parseLong NumberFormatException loadAttribute CFG_PLUGIN_STAMP lastPluginsChangeStamp parseLong NumberFormatException loadAttribute CFG_UPDATEABLE loadAttribute CFG_LINK_FILE linkFileName separatorChar
private I Feature Entry load Feature Entry Properties props String name I Feature Entry dflt String id load Attribute props name CFG FEATURE ENTRY ID null NON NLS 1 if id null return dflt String version load Attribute props name CFG FEATURE ENTRY VERSION null NON NLS 1 String plugin Version load Attribute props name CFG FEATURE ENTRY PLUGIN VERSION null NON NLS 1 if plugin Version null plugin Version version String plugin Identifier load Attribute props name CFG FEATURE ENTRY PLUGIN IDENTIFIER null NON NLS 1 if plugin Identifier null plugin Identifier id String application load Attribute props name CFG FEATURE ENTRY APPLICATION null NON NLS 1 Array List root List new Array List get install locations String root String load Attribute props name CFG FEATURE ENTRY ROOT 0 null NON NLS 1 NON NLS 2 for int i 1 root String null i try URL root Entry new URL root String root List add root Entry catch MalformedURL Exception e skip bad entries root String load Attribute props name CFG FEATURE ENTRY ROOT i null NON NLS 1 NON NLS 2 URL roots URL root List to Array new URL 0 get primary flag boolean primary false String flag load Attribute props name CFG FEATURE ENTRY PRIMARY null NON NLS 1 if flag null if flag equals true NON NLS 1 primary true return create Feature Entry id version plugin Identifier plugin Version primary application roots  IFeatureEntry loadFeatureEntry IFeatureEntry loadAttribute CFG_FEATURE_ENTRY_ID loadAttribute CFG_FEATURE_ENTRY_VERSION pluginVersion loadAttribute CFG_FEATURE_ENTRY_PLUGIN_VERSION pluginVersion pluginVersion pluginIdentifier loadAttribute CFG_FEATURE_ENTRY_PLUGIN_IDENTIFIER pluginIdentifier pluginIdentifier loadAttribute CFG_FEATURE_ENTRY_APPLICATION ArrayList rootList ArrayList rootString loadAttribute CFG_FEATURE_ENTRY_ROOT rootString rootEntry rootString rootList rootEntry MalformedURLException rootString loadAttribute CFG_FEATURE_ENTRY_ROOT rootList toArray loadAttribute CFG_FEATURE_ENTRY_PRIMARY createFeatureEntry pluginIdentifier pluginVersion
private String load List Attribute Properties props String name String dflt Array List list new Array List String value load Attribute props name 0 null NON NLS 1 if value null return dflt for int i 1 value null i load List Attribute Segment list value value load Attribute props name i null NON NLS 1 return String list to Array new String 0  loadListAttribute ArrayList ArrayList loadAttribute loadListAttributeSegment loadAttribute toArray
private void load List Attribute Segment Array List list String value if value null return String Tokenizer tokens new String Tokenizer value NON NLS 1 String token while tokens has More Tokens token tokens next Token trim if token equals NON NLS 1 list add token return  loadListAttributeSegment ArrayList StringTokenizer StringTokenizer hasMoreTokens nextToken
private String load Attribute Properties props String name String dflt String prop props get Property name if prop null return dflt else return prop trim  loadAttribute getProperty
private void load Initialization Attributes look for the product initialization file relative to the install location URL url get InstallURL load any initialization attributes These are the default settings for key attributes eg default primary feature supplied by the packaging team They are always reloaded on startup to pick up any changes due to native updates Properties init Props new Properties Input Stream is null try URL initURL new URL url CONFIG FILE INIT is initURL open Stream init Props load is if DEBUG debug Defaults from initURL to External Form NON NLS 1 catch IO Exception e return could not load default settings finally if is null try is close catch IO Exception e ignore use default settings if supplied String init Id load Attribute init Props INIT DEFAULT FEATURE ID null if init Id null String application load Attribute init Props INIT DEFAULT FEATURE APPLICATION null String init Plugin Id load Attribute init Props INIT DEFAULT PLUGIN ID null if init Plugin Id null init Plugin Id init Id I Feature Entry fe find Configured Feature Entry init Id if fe null bug 26896 setup optimistic reconciliation if the primary feature has changed or is new cmd First Use true create entry if not exists fe create Feature Entry init Id null init Plugin Id null true application null else update existing entry with new info fe create Feature Entry init Id fe get Feature Version fe get Feature Plugin Identifier fe get Feature Plugin Version fe can Be Primary application fe get Feature RootUR Ls configure Feature Entry fe default Feature init Id if DEBUG debug Default primary feature default Feature NON NLS 1 if application null debug Default application application NON NLS 1  loadInitializationAttributes getInstallURL initProps InputStream CONFIG_FILE_INIT openStream initProps toExternalForm IOException IOException initId loadAttribute initProps INIT_DEFAULT_FEATURE_ID initId loadAttribute initProps INIT_DEFAULT_FEATURE_APPLICATION initPluginId loadAttribute initProps INIT_DEFAULT_PLUGIN_ID initPluginId initPluginId initId IFeatureEntry findConfiguredFeatureEntry initId cmdFirstUse createFeatureEntry initId initPluginId createFeatureEntry initId getFeatureVersion getFeaturePluginIdentifier getFeaturePluginVersion canBePrimary getFeatureRootURLs configureFeatureEntry defaultFeature initId defaultFeature
private void write Print Writer w write header w println new Date to String NON NLS 1 write Attribute w CFG VERSION VERSION if transient Config write Attribute w CFG TRANSIENT true NON NLS 1 w println NON NLS 1 write global attributes write Attribute w CFG STAMP Long to String get Change Stamp write Attribute w CFG FEATURE STAMP Long to String get Features Change Stamp write Attribute w CFG PLUGIN STAMP Long to String get Plugins Change Stamp write out bootstrap entries String ids get Bootstrap Plugin Identifiers for int i 0 i ids length i String location String boot Plugins get ids i if location null write Attribute w CFG BOOT PLUGIN ids i location NON NLS 1 write out feature entries w println NON NLS 1 write Attribute w CFG FEATURE ENTRY DEFAULT default Feature I Feature Entry feats get Configured Feature Entries for int i 0 i feats length i write Feature Entry w CFG FEATURE ENTRY Integer to String i feats i NON NLS 1 write out site entries Site Entry list Site Entry sites values to Array new Site Entry 0 for int i 0 i list length i write Site w CFG SITE Integer to String i list i NON NLS 1 write end of file marker write Attribute w EOF EOF  PrintWriter toString writeAttribute CFG_VERSION transientConfig writeAttribute CFG_TRANSIENT writeAttribute CFG_STAMP toString getChangeStamp writeAttribute CFG_FEATURE_STAMP toString getFeaturesChangeStamp writeAttribute CFG_PLUGIN_STAMP toString getPluginsChangeStamp getBootstrapPluginIdentifiers bootPlugins writeAttribute CFG_BOOT_PLUGIN writeAttribute CFG_FEATURE_ENTRY_DEFAULT defaultFeature IFeatureEntry getConfiguredFeatureEntries writeFeatureEntry CFG_FEATURE_ENTRY toString SiteEntry SiteEntry toArray SiteEntry writeSite CFG_SITE toString writeAttribute
private void write Site Print Writer w String id Site Entry entry write site separator w println NON NLS 1 write out site settings write Attribute w id CFG URL entry getURL to String NON NLS 1 write Attribute w id CFG STAMP Long to String entry get Change Stamp NON NLS 1 write Attribute w id CFG FEATURE STAMP Long to String entry get Features Change Stamp NON NLS 1 write Attribute w id CFG PLUGIN STAMP Long to String entry get Plugins Change Stamp NON NLS 1 write Attribute w id CFG UPDATEABLE entry updateable true false NON NLS 1 NON NLS 2 NON NLS 3 if entry link File Name null entry link File Name trim equals NON NLS 1 write Attribute w id CFG LINK FILE entry link File Name trim replace File separator Char NON NLS 1 write out site policy int type entry get Site Policy get Type String type String CFG POLICY TYPE UNKNOWN try type String CFG POLICY TYPE type catch Index Out Of Bounds Exception e ignore bad attribute write Attribute w id CFG POLICY type String NON NLS 1 write List Attribute w id CFG LIST entry get Site Policy get List NON NLS 1  writeSite PrintWriter SiteEntry writeAttribute CFG_URL toString writeAttribute CFG_STAMP toString getChangeStamp writeAttribute CFG_FEATURE_STAMP toString getFeaturesChangeStamp writeAttribute CFG_PLUGIN_STAMP toString getPluginsChangeStamp writeAttribute CFG_UPDATEABLE linkFileName linkFileName writeAttribute CFG_LINK_FILE linkFileName separatorChar getSitePolicy getType typeString CFG_POLICY_TYPE_UNKNOWN typeString CFG_POLICY_TYPE IndexOutOfBoundsException writeAttribute CFG_POLICY typeString writeListAttribute CFG_LIST getSitePolicy getList
private void write Feature Entry Print Writer w String id I Feature Entry entry write feature entry separator w println NON NLS 1 write out feature entry settings write Attribute w id CFG FEATURE ENTRY ID entry get Feature Identifier NON NLS 1 if entry can Be Primary write Attribute w id CFG FEATURE ENTRY PRIMARY true NON NLS 1 NON NLS 2 write Attribute w id CFG FEATURE ENTRY VERSION entry get Feature Version NON NLS 1 if entry get Feature Version null entry get Feature Version equals entry get Feature Plugin Version write Attribute w id CFG FEATURE ENTRY PLUGIN VERSION entry get Feature Plugin Version NON NLS 1 if entry get Feature Identifier null entry get Feature Identifier equals entry get Feature Plugin Identifier write Attribute w id CFG FEATURE ENTRY PLUGIN IDENTIFIER entry get Feature Plugin Identifier NON NLS 1 write Attribute w id CFG FEATURE ENTRY APPLICATION entry get Feature Application NON NLS 1 URL roots entry get Feature RootUR Ls for int i 0 i roots length i write our as individual attributes is easier for Main java to read write Attribute w id CFG FEATURE ENTRY ROOT i roots i to External Form NON NLS 1 NON NLS 2  writeFeatureEntry PrintWriter IFeatureEntry writeAttribute CFG_FEATURE_ENTRY_ID getFeatureIdentifier canBePrimary writeAttribute CFG_FEATURE_ENTRY_PRIMARY writeAttribute CFG_FEATURE_ENTRY_VERSION getFeatureVersion getFeatureVersion getFeatureVersion getFeaturePluginVersion writeAttribute CFG_FEATURE_ENTRY_PLUGIN_VERSION getFeaturePluginVersion getFeatureIdentifier getFeatureIdentifier getFeaturePluginIdentifier writeAttribute CFG_FEATURE_ENTRY_PLUGIN_IDENTIFIER getFeaturePluginIdentifier writeAttribute CFG_FEATURE_ENTRY_APPLICATION getFeatureApplication getFeatureRootURLs writeAttribute CFG_FEATURE_ENTRY_ROOT toExternalForm
private void write List Attribute Print Writer w String id String list if list null list length 0 return String value NON NLS 1 int list Len 0 int list Index 0 for int i 0 i list length i if list Len 0 value NON NLS 1 else value NON NLS 1 value list i if list Len CFG LIST LENGTH write Attribute w id Integer to String list Index value NON NLS 1 list Len 0 if list Len 0 write Attribute w id Integer to String list Index value NON NLS 1  writeListAttribute PrintWriter listLen listIndex listLen listLen CFG_LIST_LENGTH writeAttribute toString listIndex listLen listLen writeAttribute toString listIndex
private void write Attribute Print Writer w String id String value if value null value trim equals NON NLS 1 return w println id escaped Value value NON NLS 1  writeAttribute PrintWriter escapedValue
private String escaped Value String value if required escape property values as uXXXX String Buffer buf new String Buffer value length 2 assume expansion by less than factor of 2 for int i 0 i value length i char character value char At i if character character t character r character n character f handle characters requiring leading buf append buf append character else if character 0x0020 character 0x007e handle characters outside base range encoded buf append buf append u buf append HEX character 12 0xF first nibble buf append HEX character 8 0xF second nibble buf append HEX character 4 0xF third nibble buf append HEX character 0xF fourth nibble else handle base characters buf append character return buf to String  escapedValue StringBuffer StringBuffer charAt toString
private static String check For Feature Changes String args Platform Configuration cfg String original cfg get Application Identifier Internal String actual cfg get Application Identifier if original equals actual base startup of specified application return args else Will run reconciler Re insert application argument with original app and optionally force first use processing int new Arg Cnt cmd First Use 3 2 String new Args new String args length new Arg Cnt new Args 0 CMD APPLICATION new Args 1 original if cmd First Use new Args 2 CMD FIRSTUSE System arraycopy args 0 new Args new Arg Cnt args length if DEBUG debug triggering reconciliation NON NLS 1 return new Args  checkForFeatureChanges PlatformConfiguration getApplicationIdentifierInternal getApplicationIdentifier newArgCnt cmdFirstUse newArgs newArgCnt newArgs CMD_APPLICATION newArgs cmdFirstUse newArgs CMD_FIRSTUSE newArgs newArgCnt newArgs
private static String check For New Updates I Platform Configuration cfg String args try URL markerURL new URL cfg get Configuration Location CHANGES MARKER File marker new File markerURL get File if marker exists return args indicate new Updates marker delete String new Args new String args length 1 new Args 0 CMD NEW UPDATES System arraycopy args 0 new Args 1 args length return new Args catch MalformedURL Exception e return args  checkForNewUpdates IPlatformConfiguration getConfigurationLocation CHANGES_MARKER getFile newUpdates newArgs newArgs CMD_NEW_UPDATES newArgs newArgs MalformedURLException
private static String process Command Line String args throws Exception int config Args new int 100 config Args 0 1 need to initialize the first element to something that could not be an index int config Arg Index 0 for int i 0 i args length i boolean found false check for args without parameters i e a flag arg look for forced first use processing triggered by stale bootstrap information if args i equals Ignore Case CMD FIRSTUSE cmd First Use true found true look for the update flag if args i equals Ignore Case CMD UPDATE cmd Update true found true look for the no update flag if args i equals Ignore Case CMD NO UPDATE cmd No Update true found true look for the initialization flag if args i equals Ignore Case CMD INITIALIZE cmd Initialize true continue do not remove from command line look for the development mode flag triggers no update if args i equals Ignore Case CMD DEV cmd Dev true continue do not remove from command line if found config Args config Arg Index i continue check for args with parameters If we are at the last argument or if the next one has a as the first character then we can t have an arg with a parm so continue if i args length 1 args i 1 starts With NON NLS 1 continue String arg args i look for the platform configuration to use if args i 1 equals Ignore Case CMD CONFIGURATION found true cmd Configuration arg look for the feature to use for customization if args i 1 equals Ignore Case CMD FEATURE found true cmd Feature arg look for the application to run Only use the value from the command line if the application identifier was not explicitly passed on Boot Loader run invocation if args i 1 equals Ignore Case CMD APPLICATION found true if cmd Application null cmd Application arg R1 0 compatibility look for the plugins location to use Only use the value from the command line if the plugins location was not explicitly passed on Boot Loader run or Boot Loader startup invocation if args i 1 equals Ignore Case CMD PLUGINS found true if the arg can be made into a URL use it Otherwise assume that it is a file path so make a file URL try if cmd Plugins null cmd Plugins new URL arg catch MalformedURL Exception e try cmd Plugins new URL file arg replace File separator Char NON NLS 1 catch MalformedURL Exception e2 throw e rethrow original exception done checking for args Remember where an arg was found if found config Args config Arg Index i 1 config Args config Arg Index i remove all the arguments consumed by this argument parsing if config Arg Index 0 return args String pass Thru Args new String args length config Arg Index config Arg Index 0 int j 0 for int i 0 i args length i if i config Args config Arg Index config Arg Index else pass Thru Args j args i return pass Thru Args  processCommandLine configArgs configArgs configArgIndex equalsIgnoreCase CMD_FIRSTUSE cmdFirstUse equalsIgnoreCase CMD_UPDATE cmdUpdate equalsIgnoreCase CMD_NO_UPDATE cmdNoUpdate equalsIgnoreCase CMD_INITIALIZE cmdInitialize equalsIgnoreCase CMD_DEV cmdDev configArgs configArgIndex startsWith equalsIgnoreCase CMD_CONFIGURATION cmdConfiguration equalsIgnoreCase CMD_FEATURE cmdFeature BootLoader equalsIgnoreCase CMD_APPLICATION cmdApplication cmdApplication BootLoader BootLoader equalsIgnoreCase CMD_PLUGINS cmdPlugins cmdPlugins MalformedURLException cmdPlugins separatorChar MalformedURLException configArgs configArgIndex configArgs configArgIndex configArgIndex passThruArgs configArgIndex configArgIndex configArgs configArgIndex configArgIndex passThruArgs passThruArgs
private static int find Entry Separator String path Entry int cnt for int i path Entry length 1 i 0 i if path Entry char At i if cnt 0 return i return 1  findEntrySeparator pathEntry pathEntry pathEntry charAt
private static boolean supports Detection URL url String protocol url get Protocol if protocol equals file NON NLS 1 return true else if protocol equals PlatformURL Handler PROTOCOL URL resolved null try resolved resolve PlatformURL url 19536 catch IO Exception e return false we tried but failed to resolve the platform URL return resolved get Protocol equals file NON NLS 1 else return false  supportsDetection getProtocol PlatformURLHandler resolvePlatformURL IOException getProtocol
private static void verify Path URL url String protocol url get Protocol String path null if protocol equals file NON NLS 1 path url get File else if protocol equals PlatformURL Handler PROTOCOL URL resolved null try resolved resolve PlatformURL url 19536 if resolved get Protocol equals file NON NLS 1 path resolved get File catch IO Exception e continue if path null File dir new File path get Parent File if dir null dir mkdirs  verifyPath getProtocol getFile PlatformURLHandler resolvePlatformURL getProtocol getFile IOException getParentFile
private static URL resolve PlatformURL URL url throws IO Exception 19536 if url get Protocol equals PlatformURL Handler PROTOCOL URL Connection connection url open Connection if connection instanceof PlatformURL Connection url PlatformURL Connection connection get ResolvedURL else connection new PlatformURL Base Connection url url PlatformURL Connection connection get ResolvedURL url get InstallURL return url  resolvePlatformURL IOException getProtocol PlatformURLHandler URLConnection openConnection PlatformURLConnection PlatformURLConnection getResolvedURL PlatformURLBaseConnection PlatformURLConnection getResolvedURL getInstallURL
private static void debug String s System out println Platform Config s NON NLS 1  PlatformConfig
private void reset Update Manager State URL url throws IO Exception 20111 if supports Detection url return can t do find directory where the platform configuration file is URL resolved resolve PlatformURL url File init Cfg new File resolved get File replace File separator Char File init Dir init Cfg get Parent File Find the Update Manager State directory if init Dir null init Dir exists init Dir is Directory return String temp init Cfg get Name metadata NON NLS 1 File UM Dir new File init Dir temp Attempt to rename it if UM Dir null UM Dir exists UM Dir is Directory return Date now new Date boolean renamed UM Dir rename To new File init Dir temp now get Time if renamed reset Initialization Location UM Dir  resetUpdateManagerState IOException supportsDetection resolvePlatformURL initCfg getFile separatorChar initDir initCfg getParentFile initDir initDir initDir isDirectory initCfg getName UMDir initDir UMDir UMDir UMDir isDirectory UMDir renameTo initDir getTime resetInitializationLocation UMDir
private static URL get InstallURL return installURL  getInstallURL
private URL get Default State Location throws IO Exception 1 We store the config state relative to the eclipse directory if possible 2 If this directory is read only we store the state in user home eclipse application id   version where user home is unique for each local user and application id is the one defined in eclipseproduct marker file If eclipseproduct does not exist use eclipse as the application id URL installURL get InstallURL File install Dir new File installURL get File if file equals installURL get Protocol install Dir can Write NON NLS 1 if DEBUG debug Using the installation directory NON NLS 1 return installURL else if DEBUG debug Using the user home location NON NLS 1 String app Name ECLIPSE NON NLS 1 File eclipse Product new File install Dir PRODUCT SITE MARKER if eclipse Product exists Properties props new Properties props load new File Input Stream eclipse Product String app Id props get Property PRODUCT SITE ID if app Id null app Id trim length 0 app Id ECLIPSE String app Version props get Property PRODUCT SITE VERSION if app Version null app Version trim length 0 app Version NON NLS 1 app Name File separator app Id   app Version NON NLS 1 String user Home System get Property user home NON NLS 1 File config Dir new File user Home app Name config Dir mkdirs return config Dir toURL  getDefaultStateLocation IOException _ getInstallURL installDir getFile getProtocol installDir canWrite appName eclipseProduct installDir PRODUCT_SITE_MARKER eclipseProduct FileInputStream eclipseProduct appId getProperty PRODUCT_SITE_ID appId appId appId appVersion getProperty PRODUCT_SITE_VERSION appVersion appVersion appVersion appName appId _ appVersion userHome getProperty configDir userHome appName configDir configDir

public static URL get Plugin Path URL plugin Path Location R1 0 compatibility Input Stream input null first try and see if the given plugin path location exists if plugin Path Location null return null try input plugin Path Location open Stream catch IO Exception e fall through if the given path was null or did not exist look for a plugin path definition in the install location if input null try URL url new URL PlatformURL Base Connection PLATFORM URL STRING PLUGIN PATH input url open Stream catch MalformedURL Exception e fall through catch IO Exception e fall through nothing was found at the supplied location or in the install location if input null return null if we found a plugin path definition somewhere so read it and close the location URL result null try try result read Plugin Path input finally input close catch IO Exception e let it return null on failure to read return result  getPluginPath pluginPathLocation InputStream pluginPathLocation pluginPathLocation openStream IOException PlatformURLBaseConnection PLATFORM_URL_STRING PLUGIN_PATH openStream MalformedURLException IOException readPluginPath IOException
private static URL read Plugin Path Input Stream input Properties ini new Properties try ini load input catch IO Exception e return null Vector result new Vector 5 for Enumeration groups ini property Names groups has More Elements String group String groups next Element for String Tokenizer entries new String Tokenizer ini get Property group entries has More Elements NON NLS 1 String entry String entries next Element if entry equals NON NLS 1 try result add Element new URL entry catch MalformedURL Exception e return URL result to Array new URL result size  readPluginPath InputStream IOException propertyNames hasMoreElements nextElement StringTokenizer StringTokenizer getProperty hasMoreElements nextElement addElement MalformedURLException toArray

protected Vector extension Points new Vector public Abstract Extensions  extensionPoints AbstractExtensions
public void add I Plugin Extension extension throws Core Exception ensure Model Editable extensions add Element extension Plugin Extension extension set In The Model true Plugin Extension extension set Parent this fire Structure Changed extension I Model Changed Event INSERT  IPluginExtension CoreException ensureModelEditable addElement PluginExtension setInTheModel PluginExtension setParent fireStructureChanged IModelChangedEvent
public void add I Plugin Extension Point extension Point throws Core Exception ensure Model Editable extension Points add Element extension Point Plugin Extension Point extension Point set In The Model true Plugin Extension Point extension Point set Parent this fire Structure Changed extension Point I Model Changed Event INSERT  IPluginExtensionPoint extensionPoint CoreException ensureModelEditable extensionPoints addElement extensionPoint PluginExtensionPoint extensionPoint setInTheModel PluginExtensionPoint extensionPoint setParent fireStructureChanged extensionPoint IModelChangedEvent
public I Plugin Extension Point get Extension Points I Plugin Extension Point result new I Plugin Extension Point extension Points size extension Points copy Into result return result  IPluginExtensionPoint getExtensionPoints IPluginExtensionPoint IPluginExtensionPoint extensionPoints extensionPoints copyInto
public I Plugin Extension get Extensions I Plugin Extension result new I Plugin Extension extensions size extensions copy Into result return result  IPluginExtension getExtensions IPluginExtension IPluginExtension copyInto
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P EXTENSION ORDER swap I Plugin Extension old Value I Plugin Extension new Value return super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_EXTENSION_ORDER IPluginExtension oldValue IPluginExtension newValue restoreProperty oldValue newValue
public void load I Extensions src Extensions add Array To Vector extensions src Extensions get Extensions add Array To Vector extension Points src Extensions get Extension Points  IExtensions srcExtensions addArrayToVector srcExtensions getExtensions addArrayToVector extensionPoints srcExtensions getExtensionPoints
protected void add Array To Vector Vector vector Object array for int i 0 i array length i Object obj array i if obj instanceof Plugin Object Plugin Object obj set Parent this vector add obj  addArrayToVector PluginObject PluginObject setParent
protected void process Child Node child Hashtable line Table String name child get Node Name to Lower Case if name equals extension NON NLS 1 Plugin Extension extension new Plugin Extension extension set Model get Model extension set Parent this extensions add extension extension set In The Model true extension load child line Table else if name equals extension point NON NLS 1 Plugin Extension Point point new Plugin Extension Point point set Model get Model point set Parent this point set In The Model true extension Points add point point load child line Table  processChild lineTable getNodeName toLowerCase PluginExtension PluginExtension setModel getModel setParent setInTheModel lineTable PluginExtensionPoint PluginExtensionPoint setModel getModel setParent setInTheModel extensionPoints lineTable
public void remove I Plugin Extension extension throws Core Exception ensure Model Editable extensions remove Element extension Plugin Extension extension set In The Model false fire Structure Changed extension Model Changed Event REMOVE  IPluginExtension CoreException ensureModelEditable removeElement PluginExtension setInTheModel fireStructureChanged ModelChangedEvent
public void remove I Plugin Extension Point extension Point throws Core Exception ensure Model Editable extension Points remove Element extension Point Plugin Extension Point extension Point set In The Model false fire Structure Changed extension Point Model Changed Event REMOVE  IPluginExtensionPoint extensionPoint CoreException ensureModelEditable extensionPoints removeElement extensionPoint PluginExtensionPoint extensionPoint setInTheModel fireStructureChanged extensionPoint ModelChangedEvent
public void reset extensions new Vector extension Points new Vector  extensionPoints
public int get Extension Count return extensions size  getExtensionCount
public int get Index Of I Plugin Extension e return extensions index Of e  getIndexOf IPluginExtension indexOf
public void swap I Plugin Extension e1 I Plugin Extension e2 throws Core Exception ensure Model Editable int index1 extensions index Of e1 int index2 extensions index Of e2 if index1 1 index2 1 throw Core Exception PDE Core get Resource String Abstract Extensions extensions Not Found Exception NON NLS 1 extensions set Element At e1 index2 extensions set Element At e2 index1 fire Property Changed this P EXTENSION ORDER e1 e2  IPluginExtension IPluginExtension CoreException ensureModelEditable indexOf indexOf throwCoreException PDECore getResourceString AbstractExtensions extensionsNotFoundException setElementAt setElementAt firePropertyChanged P_EXTENSION_ORDER
protected void write Children String indent String tag Object children Print Writer writer writer println indent tag NON NLS 1 NON NLS 2 for int i 0 i children length i I Plugin Object obj I Plugin Object children i obj write indent writer NON NLS 1 writer println indent tag NON NLS 1 NON NLS 2  writeChildren PrintWriter IPluginObject IPluginObject
protected boolean has Required Attributes validate extensions for int i 0 i extensions size i I Plugin Extension extension I Plugin Extension extensions get i if extension is Valid return false validate extension points for int i 0 i extension Points size i I Plugin Extension Point expoint I Plugin Extension Point extension Points get i if expoint is Valid return false return true  hasRequiredAttributes IPluginExtension IPluginExtension isValid extensionPoints IPluginExtensionPoint IPluginExtensionPoint extensionPoints isValid

protected Extensions extensions public Abstract Extensions Model super  AbstractExtensionsModel
public I Extensions Model Factory get Factory return this  IExtensionsModelFactory getFactory
protected Extensions create Extensions Extensions extensions new Extensions extensions set Model this return extensions  createExtensions setModel
public I Extensions get Extensions return get Extensions true  IExtensions getExtensions getExtensions
public I Extensions get Extensions boolean create If Missing if extensions null create If Missing extensions create Extensions loaded true return extensions  IExtensions getExtensions createIfMissing createIfMissing createExtensions
public abstract URL getNL Lookup Location  getNLLookupLocation
public abstract URL getNL Lookup Location protected URL getNL Lookup Locations URL locations getNL Lookup Location return locations  getNLLookupLocation getNLLookupLocations getNLLookupLocation
public synchronized void load Input Stream stream boolean out Of Sync throws Core Exception if extensions null extensions Extensions create Extensions extensions set Model this extensions reset loaded false try SAX Parser parser get Sax Parser XML Default Handler handler new XML Default Handler parser set Property http xml org sax properties lexical handler handler NON NLS 1 parser parse stream handler process Document handler get Document handler get Line Table loaded true if out Of Sync update Time Stamp catch Exception e  InputStream outOfSync CoreException createExtensions setModel SAXParser getSaxParser XMLDefaultHandler XMLDefaultHandler setProperty processDocument getDocument getLineTable outOfSync updateTimeStamp
private void process Document Document doc Hashtable line Table Node extensions Node doc get Document Element extensions load extensions Node line Table  processDocument lineTable extensionsNode getDocumentElement extensionsNode lineTable
public void reload Input Stream stream boolean out Of Sync throws Core Exception load stream out Of Sync fire Model Changed new Model Changed Event this I Model Changed Event WORLD CHANGED new Object extensions null  InputStream outOfSync CoreException outOfSync fireModelChanged ModelChangedEvent IModelChangedEvent WORLD_CHANGED
null protected abstract void update Time Stamp  updateTimeStamp
public I Plugin Attribute create Attribute I Plugin Element element Plugin Attribute attribute new Plugin Attribute attribute set Model this attribute set Parent element return attribute  IPluginAttribute createAttribute IPluginElement PluginAttribute PluginAttribute setModel setParent
public I Plugin Element create Element I Plugin Object parent Plugin Element element new Plugin Element element set Model this element set Parent parent return element  IPluginElement createElement IPluginObject PluginElement PluginElement setModel setParent
public I Plugin Extension create Extension Plugin Extension extension new Plugin Extension extension set Parent get Extensions extension set Model this return extension  IPluginExtension createExtension PluginExtension PluginExtension setParent getExtensions setModel
public I Plugin Extension Point create Extension Point Plugin Extension Point extension Point new Plugin Extension Point extension Point set Model this extension Point set Parent get Extensions return extension Point  IPluginExtensionPoint createExtensionPoint PluginExtensionPoint extensionPoint PluginExtensionPoint extensionPoint setModel extensionPoint setParent getExtensions extensionPoint
public boolean is Valid if is Loaded return false if extensions null return false return extensions is Valid  isValid isLoaded isValid
return extensions is Valid public boolean is Reconciling Model return false  isValid isReconcilingModel

private Bundle Description f Bundle Description public Abstract Plugin Model Base super  BundleDescription fBundleDescription AbstractPluginModelBase
public abstract I Plugin Base create Plugin Base  IPluginBase createPluginBase
public abstract I Plugin Base create Plugin Base public I Extensions create Extensions return create Plugin Base  IPluginBase createPluginBase IExtensions createExtensions createPluginBase
public I Extensions Model Factory get Factory return this  IExtensionsModelFactory getFactory
public I Plugin Model Factory get Plugin Factory return this  IPluginModelFactory getPluginFactory
public I Plugin Base get Plugin Base return get Plugin Base true  IPluginBase getPluginBase getPluginBase
public I Plugin Base get Plugin Base boolean create If Missing if plugin Base null create If Missing plugin Base Plugin Base create Plugin Base loaded true return plugin Base  IPluginBase getPluginBase createIfMissing pluginBase createIfMissing pluginBase PluginBase createPluginBase pluginBase
public I Extensions get Extensions return get Plugin Base  IExtensions getExtensions getPluginBase
return get Plugin Base public I Extensions get Extensions boolean create If Missing return get Plugin Base create If Missing  getPluginBase IExtensions getExtensions createIfMissing getPluginBase createIfMissing
return get Plugin Base create If Missing public boolean is Enabled return enabled  getPluginBase createIfMissing isEnabled
return enabled public boolean is Fragment Model return false  isFragmentModel
public abstract URL getNL Lookup Location  getNLLookupLocation
protected URL getNL Lookup Locations URL this Location getNL Lookup Location if is Fragment Model if this Location null return new URL this Location else return new URL 0 else URL fragment Locations get Fragment Locations URL locations new URL this Location null 1 0 fragment Locations length if this Location null locations 0 this Location for int i 1 i locations length i locations i fragment Locations i 1 return locations  getNLLookupLocations thisLocation getNLLookupLocation isFragmentModel thisLocation thisLocation fragmentLocations getFragmentLocations thisLocation fragmentLocations thisLocation thisLocation fragmentLocations
protected URL get Fragment Locations Vector result new Vector if plugin Base null String id plugin Base get Id String version plugin Base get Version add Matching Fragments PDE Core get Default find Fragments For id version result URL locations new URL result size result copy Into locations return locations  getFragmentLocations pluginBase pluginBase getId pluginBase getVersion addMatchingFragments PDECore getDefault findFragmentsFor copyInto
private void add Matching Fragments I Fragment fragments Vector result for int i 0 i fragments length i I Fragment fragment fragments i URL location I Fragment Model fragment get Model getNL Lookup Location if location null continue I Plugin Library libraries fragment get Libraries for int j 0 j libraries length j try result add new URL location libraries j get Name catch MalformedURL Exception e  addMatchingFragments IFragment IFragment IFragmentModel getModel getNLLookupLocation IPluginLibrary getLibraries getName MalformedURLException
public void load Input Stream stream boolean out Of Sync throws Core Exception if plugin Base null plugin Base Plugin Base create Plugin Base plugin Base set Model this plugin Base reset loaded false try SAX Parser parser get Sax Parser XML Default Handler handler new XML Default Handler parser set Property http xml org sax properties lexical handler handler NON NLS 1 parser parse stream handler process Document handler get Document handler get Line Table loaded true if out Of Sync update Time Stamp catch Exception e  InputStream outOfSync CoreException pluginBase pluginBase PluginBase createPluginBase pluginBase setModel pluginBase SAXParser getSaxParser XMLDefaultHandler XMLDefaultHandler setProperty processDocument getDocument getLineTable outOfSync updateTimeStamp
private void process Document Document doc Hashtable line Table String schema Version process Schema Version doc System out println Schema Version schema Version Node plugin Node doc get Document Element plugin Base load plugin Node schema Version line Table  processDocument lineTable schemaVersion processSchemaVersion schemaVersion pluginNode getDocumentElement pluginBase pluginNode schemaVersion lineTable
private String process Schema Version Document doc Node List children doc get Child Nodes for int i 0 i children get Length i Node node children item i if node get Node Type Node PROCESSING INSTRUCTION NODE Processing Instruction pi Processing Instruction node String target pi get Target if target equals eclipse NON NLS 1 String data pi get Data if data null data data trim to Lower Case int loc data index Of if loc 1 String key data substring 0 loc if key equals version NON NLS 1 int start loc 1 if data char At start start int end data length 1 if data char At end end return data substring start end 1 return null  processSchemaVersion NodeList getChildNodes getLength getNodeType PROCESSING_INSTRUCTION_NODE ProcessingInstruction ProcessingInstruction getTarget getData toLowerCase indexOf charAt charAt
public void reload Input Stream stream boolean out Of Sync throws Core Exception load stream out Of Sync fire Model Changed new Model Changed Event this I Model Changed Event WORLD CHANGED new Object plugin Base null  InputStream outOfSync CoreException outOfSync fireModelChanged ModelChangedEvent IModelChangedEvent WORLD_CHANGED pluginBase
null public void set Enabled boolean new Enabled enabled new Enabled  setEnabled newEnabled newEnabled
public String to String I Plugin Base plugin Base get Plugin Base if plugin Base null return plugin Base get Translated Name return super to String  toString IPluginBase pluginBase getPluginBase pluginBase pluginBase getTranslatedName toString
protected abstract void update Time Stamp  updateTimeStamp
public I Plugin Attribute create Attribute I Plugin Element element Plugin Attribute attribute new Plugin Attribute attribute set Model this attribute set Parent element return attribute  IPluginAttribute createAttribute IPluginElement PluginAttribute PluginAttribute setModel setParent
public I Plugin Element create Element I Plugin Object parent Plugin Element element new Plugin Element element set Model this element set Parent parent return element  IPluginElement createElement IPluginObject PluginElement PluginElement setModel setParent
public I Plugin Extension create Extension Plugin Extension extension new Plugin Extension extension set Parent get Plugin Base extension set Model this return extension  IPluginExtension createExtension PluginExtension PluginExtension setParent getPluginBase setModel
public I Plugin Extension Point create Extension Point Plugin Extension Point extension Point new Plugin Extension Point extension Point set Model this extension Point set Parent get Plugin Base return extension Point  IPluginExtensionPoint createExtensionPoint PluginExtensionPoint extensionPoint PluginExtensionPoint extensionPoint setModel extensionPoint setParent getPluginBase extensionPoint
public I Plugin Import create Import Plugin Import iimport new Plugin Import iimport set Model this iimport set Parent get Plugin Base return iimport  IPluginImport createImport PluginImport PluginImport setModel setParent getPluginBase
public I Plugin Library create Library Plugin Library library new Plugin Library library set Model this library set Parent get Plugin Base return library  IPluginLibrary createLibrary PluginLibrary PluginLibrary setModel setParent getPluginBase
public boolean is Valid if is Loaded return false if plugin Base null return false return plugin Base is Valid  isValid isLoaded pluginBase pluginBase isValid
public boolean is Reconciling Model return reconciling Model  isReconcilingModel reconcilingModel
public void set Reconciling Model boolean reconciling Model this reconciling Model reconciling Model  setReconcilingModel reconcilingModel reconcilingModel reconcilingModel
this reconciling Model reconciling Model public boolean is Bundle Model return false  reconcilingModel reconcilingModel isBundleModel
see org eclipse pde core I Model dispose public void dispose f Bundle Description null super dispose  IModel fBundleDescription
see org eclipse pde core plugin I Plugin Model Base get Bundle Description public Bundle Description get Bundle Description return f Bundle Description  IPluginModelBase getBundleDescription BundleDescription getBundleDescription fBundleDescription
see org eclipse pde core plugin I Plugin Model Base set Bundle Description org eclipse osgi service resolver Bundle Description public void set Bundle Description Bundle Description description f Bundle Description description  IPluginModelBase setBundleDescription BundleDescription setBundleDescription BundleDescription fBundleDescription

public static final String P ATTRIBUTE VALUE att value NON NLS 1 private Object attribute public Attribute Changed Event I Model Change Provider provider Object element Object attribute String old Value String new Value super provider element P ATTRIBUTE VALUE old Value new Value this attribute attribute  P_ATTRIBUTE_VALUE att_value AttributeChangedEvent IModelChangeProvider oldValue newValue P_ATTRIBUTE_VALUE oldValue newValue
public Object get Chaged Attribute return attribute  getChagedAttribute

private boolean f Is Fragment public Extensions  fIsFragment
void load Extensions src Plugin Base range src Plugin Base range super load src Plugin Base valid has Required Attributes  srcPluginBase srcPluginBase srcPluginBase hasRequiredAttributes
valid has Required Attributes public void load I Plugin Base src Plugin Base this load src Plugin Base  hasRequiredAttributes IPluginBase srcPluginBase srcPluginBase
void load Node node Hashtable line Table bind Source Location node line Table Node List children node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE process Child child line Table valid has Required Attributes  lineTable bindSourceLocation lineTable NodeList getChildNodes getLength getNodeType ELEMENT_NODE processChild lineTable hasRequiredAttributes
public void reset super reset valid false 
public boolean is Valid return valid  isValid
public void write String indent Print Writer writer writer println xml version 1 0 encoding UTF 8 NON NLS 1 writer print f Is Fragment fragment plugin NON NLS 1 NON NLS 2 writer println String first Indent NON NLS 1 Object children get Extension Points if children length 0 writer println for int i 0 i children length i I Plugin Extension Point children i write first Indent writer add extensions children get Extensions if children length 0 writer println for int i 0 i children length i I Plugin Extension children i write first Indent writer writer println writer println f Is Fragment fragment plugin NON NLS 1 NON NLS 2  PrintWriter fIsFragment firstIndent getExtensionPoints IPluginExtensionPoint firstIndent getExtensions IPluginExtension firstIndent fIsFragment
public void set Is Fragment boolean is Fragment f Is Fragment is Fragment  setIsFragment isFragment fIsFragment isFragment

public Extensions Parser I Shared Plugin Model model super f Extension Points new Vector f Extensions new Vector f Model model  ExtensionsParser ISharedPluginModel fExtensionPoints fExtensions fModel
public void processing Instruction String target String data throws SAX Exception if eclipse equals target NON NLS 1 f Is Legacy false  processingInstruction SAXException fIsLegacy
public void start Element String uri String local Name String q Name Attributes attributes throws SAX Exception if f Open Elements null if q Name equals plugin q Name equals fragment NON NLS 1 NON NLS 2 f Open Elements new Stack else if f Open Elements size 0 if q Name equals extension NON NLS 1 create Extension attributes else if q Name equals extension point NON NLS 1 create Extension Point attributes else create Element q Name attributes  startElement localName qName SAXException fOpenElements qName qName fOpenElements fOpenElements qName createExtension qName createExtensionPoint createElement qName
param attributes private void create Extension Attributes attributes Plugin Extension extension new Plugin Extension if extension load attributes f Locator get Line Number extension set Model f Model extension set In The Model true f Extensions add extension String point extension get Point if org eclipse pde core source equals point org eclipse core runtime products equals point NON NLS 1 NON NLS 2 f Open Elements push extension  createExtension PluginExtension PluginExtension fLocator getLineNumber setModel fModel setInTheModel fExtensions getPoint fOpenElements
param attributes private void create Extension Point Attributes attributes Plugin Extension Point ext Point new Plugin Extension Point if ext Point load attributes f Locator get Line Number ext Point set Model f Model ext Point set In The Model true f Extension Points add ext Point  createExtensionPoint PluginExtensionPoint extPoint PluginExtensionPoint extPoint fLocator getLineNumber extPoint setModel fModel extPoint setInTheModel fExtensionPoints extPoint
private void create Element String tag Name Attributes attributes Plugin Element element new Plugin Element Plugin Parent parent Plugin Parent f Open Elements peek element set Parent parent element set In The Model true element set Model f Model element load tag Name attributes parent append Child element f Open Elements push element  createElement tagName PluginElement PluginElement PluginParent PluginParent fOpenElements setParent setInTheModel setModel fModel tagName appendChild fOpenElements
public void end Element String uri String local Name String q Name throws SAX Exception if f Open Elements null f Open Elements is Empty f Open Elements pop  endElement localName qName SAXException fOpenElements fOpenElements isEmpty fOpenElements
see org xml sax helpers Default Handler set Document Locator org xml sax Locator public void set Document Locator Locator locator f Locator locator  DefaultHandler setDocumentLocator setDocumentLocator fLocator
public boolean is Legacy return f Is Legacy  isLegacy fIsLegacy
public Vector get Extensions return f Extensions  getExtensions fExtensions
public Vector get Extension Points return f Extension Points  getExtensionPoints fExtensionPoints

implements I Fragment Model public External Fragment Model super  IFragmentModel ExternalFragmentModel
public I Plugin Base create Plugin Base Plugin Base base new Fragment base set Model this return base  IPluginBase createPluginBase PluginBase setModel
return base public I Fragment get Fragment return I Fragment get Plugin Base  IFragment getFragment IFragment getPluginBase
return I Fragment get Plugin Base public boolean is Fragment Model return true  IFragment getPluginBase isFragmentModel
protected File get File return new File get Install Location File separator fragment xml NON NLS 1  getFile getInstallLocation

public class External Plugin Model extends External Plugin Model Base implements I Plugin Model public External Plugin Model super  ExternalPluginModel ExternalPluginModelBase IPluginModel ExternalPluginModel
public I Plugin Base create Plugin Base Plugin Base base new Plugin base set Model this return base  IPluginBase createPluginBase PluginBase setModel
return base public I Plugin get Plugin return I Plugin get Plugin Base  IPlugin getPlugin IPlugin getPluginBase
protected File get File return new File get Install Location File separator plugin xml NON NLS 1  getFile getInstallLocation

private transient I Build Model build Model public External Plugin Model Base super  IBuildModel buildModel ExternalPluginModelBase
super protected NL Resource Helper createNL Resource Helper String name is Fragment Model fragment plugin NON NLS 1 NON NLS 2 return new NL Resource Helper name getNL Lookup Locations  NLResourceHelper createNLResourceHelper isFragmentModel NLResourceHelper getNLLookupLocations
public URL getNL Lookup Location String install Location get Install Location if install Location starts With file false NON NLS 1 install Location file install Location NON NLS 1 try URL url new URL install Location NON NLS 1 return url catch MalformedURL Exception e return null  getNLLookupLocation installLocation getInstallLocation installLocation startsWith installLocation installLocation installLocation MalformedURLException
public I Build Model get Build Model if build Model null build Model new External Build Model get Install Location External Build Model build Model load return build Model  IBuildModel getBuildModel buildModel buildModel ExternalBuildModel getInstallLocation ExternalBuildModel buildModel buildModel
protected abstract File get File  getFile
protected abstract File get File public String get Install Location return install Location  getFile getInstallLocation installLocation
return install Location public boolean is Editable return false  installLocation isEditable
public void load File file get File if file null return if file exists try Input Stream stream new File Input Stream file load stream false stream close catch Core Exception e catch IO Exception e PDE Core log Exception e else plugin Base Plugin Base create Plugin Base plugin Base set Model this loaded true  getFile InputStream FileInputStream CoreException IOException PDECore logException pluginBase PluginBase createPluginBase pluginBase setModel
public void load Bundle Description description PDE State state Plugin Base plugin Base Plugin Base get Plugin Base if plugin Base null plugin Base Plugin Base create Plugin Base this plugin Base plugin Base else plugin Base reset I Path path new Path description get Location String device path get Device if device null path path set Device device to Upper Case set Install Location path toOS String set Bundle Description description plugin Base load description state update Time Stamp loaded true  BundleDescription PDEState PluginBase pluginBase PluginBase getPluginBase pluginBase pluginBase PluginBase createPluginBase pluginBase pluginBase pluginBase IPath getLocation getDevice setDevice toUpperCase setInstallLocation toOSString setBundleDescription pluginBase updateTimeStamp
public boolean is In Sync return is In Sync get Local File  isInSync isInSync getLocalFile
private File get Local File File file new File get Install Location META INF MANIFEST MF NON NLS 1 if file exists String manifest is Fragment Model fragment xml plugin xml NON NLS 1 NON NLS 2 file new File get Install Location manifest return file  getLocalFile getInstallLocation isFragmentModel getInstallLocation
protected void update Time Stamp update Time Stamp get Local File  updateTimeStamp updateTimeStamp getLocalFile
public void set Install Location String new Install Location install Location new Install Location  setInstallLocation newInstallLocation installLocation newInstallLocation

private int rule I Match Rules NONE public Fragment  IMatchRules
public Fragment public String get Plugin Id return plugin Id  getPluginId pluginId
return plugin Id public String get Plugin Version return plugin Version  pluginId getPluginVersion pluginVersion
return plugin Version public int get Rule return rule  pluginVersion getRule
protected boolean has Required Attributes if plugin Id null plugin Version null return false return super has Required Attributes  hasRequiredAttributes pluginId pluginVersion hasRequiredAttributes
void load Bundle Description bundle Description PDE State state Host Specification host bundle Description get Host this plugin Id host get Name Version Range version Range host get Version Range if version Range null this plugin Version version Range get Minimum null version Range get Minimum to String null this rule Plugin Base get Match Rule version Range super load bundle Description state  BundleDescription bundleDescription PDEState HostSpecification bundleDescription getHost pluginId getName VersionRange versionRange getVersionRange versionRange pluginVersion versionRange getMinimum versionRange getMinimum toString PluginBase getMatchRule versionRange bundleDescription
public void load I Plugin Base src Plugin Base plugin Id Fragment src Plugin Base plugin Id plugin Version Fragment src Plugin Base plugin Version rule Fragment src Plugin Base rule super load src Plugin Base  IPluginBase srcPluginBase pluginId srcPluginBase pluginId pluginVersion srcPluginBase pluginVersion srcPluginBase srcPluginBase
void load Node node String schema Version Hashtable line Table this plugin Id get Node Attribute node plugin id NON NLS 1 this plugin Version get Node Attribute node plugin version NON NLS 1 String match get Node Attribute node match NON NLS 1 if match null String table I Match Rules RULE NAME TABLE for int i 0 i table length i if match equals Ignore Case table i this rule i break super load node schema Version line Table  schemaVersion lineTable pluginId getNodeAttribute pluginVersion getNodeAttribute getNodeAttribute IMatchRules RULE_NAME_TABLE equalsIgnoreCase schemaVersion lineTable
public void reset plugin Id NON NLS 1 plugin Version NON NLS 1 rule I Match Rules NONE super reset  pluginId pluginVersion IMatchRules
public void set Plugin Id String new Plugin Id throws Core Exception ensure Model Editable String old Value this plugin Id plugin Id new Plugin Id fire Property Changed P PLUGIN ID old Value plugin Id  setPluginId newPluginId CoreException ensureModelEditable oldValue pluginId pluginId newPluginId firePropertyChanged P_PLUGIN_ID oldValue pluginId
public void set Plugin Version String new Plugin Version throws Core Exception ensure Model Editable String old Value this plugin Version plugin Version new Plugin Version fire Property Changed P PLUGIN VERSION old Value plugin Version  setPluginVersion newPluginVersion CoreException ensureModelEditable oldValue pluginVersion pluginVersion newPluginVersion firePropertyChanged P_PLUGIN_VERSION oldValue pluginVersion
public void set Rule int rule throws Core Exception ensure Model Editable Integer old Value new Integer this rule this rule rule fire Property Changed P RULE old Value new Integer rule  setRule CoreException ensureModelEditable oldValue firePropertyChanged P_RULE oldValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P PLUGIN ID set Plugin Id new Value null new Value to String null return if name equals P PLUGIN VERSION set Plugin Version new Value null new Value to String null return if name equals P RULE set Rule Integer new Value int Value return super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_PLUGIN_ID setPluginId newValue newValue toString P_PLUGIN_VERSION setPluginVersion newValue newValue toString P_RULE setRule newValue intValue restoreProperty oldValue newValue
public void write String indent Print Writer writer writer println xml version 1 0 encoding UTF 8 NON NLS 1 if get Schema Version null writer println eclipse version get Schema Version NON NLS 1 NON NLS 2 writer print fragment NON NLS 1 if get Id null writer println writer print id get Id NON NLS 1 NON NLS 2 if get Name null writer println writer print name get Writable String get Name NON NLS 1 NON NLS 2 if get Version null writer println writer print version get Version NON NLS 1 NON NLS 2 if get Provider Name null writer println writer print provider name get Writable String get Provider Name NON NLS 1 NON NLS 2 if get Plugin Id null writer println writer print plugin id get Plugin Id NON NLS 1 NON NLS 2 if get Plugin Version null writer println writer print plugin version get Plugin Version NON NLS 1 NON NLS 2 if get Rule I Match Rules NONE writer println writer print match I Match Rules RULE NAME TABLE get Rule NON NLS 1 NON NLS 2 writer println NON NLS 1 writer println String first Indent NON NLS 1 add runtime Object children get Libraries if children length 0 write Children first Indent runtime children writer NON NLS 1 writer println add requires children get Imports if children length 0 write Children first Indent requires children writer NON NLS 1 writer println children get Extension Points if children length 0 for int i 0 i children length i I Plugin Extension Point children i write first Indent writer writer println add extensions children get Extensions for int i 0 i children length i I Plugin Extension children i write first Indent writer writer println fragment NON NLS 1  PrintWriter getSchemaVersion getSchemaVersion getId getId getName getWritableString getName getVersion getVersion getProviderName getWritableString getProviderName getPluginId getPluginId getPluginVersion getPluginVersion getRule IMatchRules IMatchRules RULE_NAME_TABLE getRule firstIndent getLibraries writeChildren firstIndent getImports writeChildren firstIndent getExtensionPoints IPluginExtensionPoint firstIndent getExtensions IPluginExtension firstIndent

protected String id public Identifiable Plugin Object  IdentifiablePluginObject
public Identifiable Plugin Object public String get Id return id  IdentifiablePluginObject getId
public void set Id String id throws Core Exception ensure Model Editable String old Value this id this id id fire Property Changed P ID old Value id  setId CoreException ensureModelEditable oldValue firePropertyChanged P_ID oldValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P ID set Id new Value null new Value to String null return super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_ID setId newValue newValue toString restoreProperty oldValue newValue

private I Plugin Import iimport public Import Object super  IPluginImport ImportObject
super public Import Object I Plugin Import iimport super iimport get Id this iimport iimport  ImportObject IPluginImport getId
this iimport iimport public Import Object I Plugin Import iimport I Plugin plugin super plugin this iimport iimport  ImportObject IPluginImport IPlugin
this iimport iimport public I Plugin Import get Import return iimport  IPluginImport getImport
public boolean equals Object object if object instanceof Import Object Import Object io Import Object object if iimport equals io get Import return true return false  ImportObject ImportObject ImportObject getImport
return false public void write String indent Print Writer writer iimport write indent writer  PrintWriter
public Object get Adapter Class key if key equals I Source Object class if iimport instanceof I Source Object return iimport return super get Adapter key  getAdapter ISourceObject ISourceObject getAdapter

private int kind 0 public Plugin Model Delta  PluginModelDelta
public int get Kind return kind  getKind
return kind public Model Entry get Added Entries return get Entries added  ModelEntry getAddedEntries getEntries
return get Entries added public Model Entry get Removed Entries return get Entries removed  getEntries ModelEntry getRemovedEntries getEntries
return get Entries removed public Model Entry get Changed Entries return get Entries changed  getEntries ModelEntry getChangedEntries getEntries
private Model Entry get Entries Array List list if list null return new Model Entry 0 return Model Entry list to Array new Model Entry list size  ModelEntry getEntries ArrayList ModelEntry ModelEntry toArray ModelEntry
void add Entry Model Entry entry int type switch type case ADDED added add Entry added entry break case REMOVED removed add Entry removed entry break case CHANGED changed add Entry changed entry break kind type  addEntry ModelEntry addEntry addEntry addEntry
private Array List add Entry Array List list Model Entry entry if list null list new Array List list add entry return list  ArrayList addEntry ArrayList ModelEntry ArrayList

public Plugin Model Manager provider Listener new I Model Provider Listener public void models Changed I Model Provider Event e handle Models Changed e  PluginModelManager providerListener IModelProviderListener modelsChanged IModelProviderEvent handleModelsChanged
public Plugin Model Manager provider Listener new I Model Provider Listener public void models Changed I Model Provider Event e handle Models Changed e listeners new Array List searchable Plugins Manager new Searchable Plugins Manager this  PluginModelManager providerListener IModelProviderListener modelsChanged IModelProviderEvent handleModelsChanged ArrayList searchablePluginsManager SearchablePluginsManager
public boolean isOS Gi Runtime try Model Entry entry find Entry org eclipse platform NON NLS 1 if entry null I Plugin Model Base model entry get Active Model I Resource resource model get Underlying Resource int version new Plugin Version Identifier model get Plugin Base get Version get Major Component if resource null version 3 I Project project resource get Project if project has Nature Java Core NATURE ID I Java Project j Project Java Core create project I Package Fragment Root roots j Project get Package Fragment Roots for int i 0 i roots length i if roots i get Kind I Package Fragment Root K SOURCE return false if project get File startup jar exists NON NLS 1 return false catch Exception e return find Entry OSGI RUNTIME null  isOSGiRuntime ModelEntry findEntry IPluginModelBase getActiveModel IResource getUnderlyingResource PluginVersionIdentifier getPluginBase getVersion getMajorComponent IProject getProject hasNature JavaCore NATURE_ID IJavaProject jProject JavaCore IPackageFragmentRoot jProject getPackageFragmentRoots getKind IPackageFragmentRoot K_SOURCE getFile findEntry OSGI_RUNTIME
public Object get Adapter Class key return null  getAdapter
public void add Plugin Model Listener I Plugin Model Listener listener if listeners contains listener listeners add listener  addPluginModelListener IPluginModelListener
public void remove Plugin Model Listener I Plugin Model Listener listener if listeners contains listener listeners remove listener  removePluginModelListener IPluginModelListener
public boolean is Empty return get Entry Table is Empty  isEmpty getEntryTable isEmpty
public Model Entry get Entries Collection values get Entry Table values return Model Entry values to Array new Model Entry values size  ModelEntry getEntries getEntryTable ModelEntry toArray ModelEntry
public I Plugin Model Base get Plugins Collection values get Entry Table values Array List result new Array List for Iterator iter values iterator iter has Next Model Entry entry Model Entry iter next I Plugin Model Base model entry get Active Model if model is Enabled result add model return I Plugin Model Base result to Array new I Plugin Model Base result size  IPluginModelBase getPlugins getEntryTable ArrayList ArrayList hasNext ModelEntry ModelEntry IPluginModelBase getActiveModel isEnabled IPluginModelBase toArray IPluginModelBase
public I Plugin Model get Plugins Only Collection values get Entry Table values Array List result new Array List for Iterator iter values iterator iter has Next Model Entry entry Model Entry iter next I Plugin Model Base model entry get Active Model if model is Enabled model instanceof I Plugin Model result add model return I Plugin Model result to Array new I Plugin Model result size  IPluginModel getPluginsOnly getEntryTable ArrayList ArrayList hasNext ModelEntry ModelEntry IPluginModelBase getActiveModel isEnabled IPluginModel IPluginModel toArray IPluginModel
public I Fragment Model get Fragments Collection values get Entry Table values Array List result new Array List for Iterator iter values iterator iter has Next Model Entry entry Model Entry iter next I Plugin Model Base model entry get Active Model if model instanceof I Fragment Model result add model return I Fragment Model result to Array new I Fragment Model result size  IFragmentModel getFragments getEntryTable ArrayList ArrayList hasNext ModelEntry ModelEntry IPluginModelBase getActiveModel IFragmentModel IFragmentModel toArray IFragmentModel
public Model Entry find Entry I Project project Map map get Entry Table I Plugin Model Base model workspace Manager get Workspace Plugin Model project if model null return null String id model get Plugin Base get Id if id null id length 0 return null return Model Entry map get id  ModelEntry findEntry IProject getEntryTable IPluginModelBase workspaceManager getWorkspacePluginModel getPluginBase getId ModelEntry
public I Plugin Model Base find Model I Project project Model Entry entry find Entry project return entry null entry get Active Model null  IPluginModelBase findModel IProject ModelEntry findEntry getActiveModel
public Model Entry find Entry String id if id null return null return Model Entry get Entry Table get id  ModelEntry findEntry ModelEntry getEntryTable
public I Plugin Model Base find Model String id Model Entry entry find Entry id return entry null null entry get Active Model  IPluginModelBase findModel ModelEntry findEntry getActiveModel
public I Plugin Model Base find Plugin String id String version int match return find Model id  IPluginModelBase findPlugin findModel
public I Plugin Model find Plugin Model String id I Plugin Model Base model find Model id return model null model instanceof I Plugin Model I Plugin Model model null  IPluginModel findPluginModel IPluginModelBase findModel IPluginModel IPluginModel
public I Fragment Model find Fragment Model String id I Plugin Model Base model find Model id return model null model instanceof I Fragment Model I Fragment Model model null  IFragmentModel findFragmentModel IPluginModelBase findModel IFragmentModel IFragmentModel
private void handle Models Changed I Model Provider Event e Plugin Model Delta delta new Plugin Model Delta Array List changed Plugins new Array List Array List old Ids new Array List boolean java Search Affected false if e get Event Types I Model Provider Event MODELS REMOVED 0 I Model removed e get Removed Models for int i 0 i removed length i if removed i instanceof I Plugin Model Base continue I Plugin Model Base model I Plugin Model Base removed i I Plugin Base plugin model get Plugin Base Model Entry entry update Table plugin get Id model false delta if entry null if model get Underlying Resource null entry is In Java Search java Search Affected true changed Plugins add plugin if e get Event Types I Model Provider Event MODELS ADDED 0 I Model added e get Added Models for int i 0 i added length i if added i instanceof I Plugin Model Base continue I Plugin Model Base model I Plugin Model Base added i I Plugin Base plugin model get Plugin Base Model Entry entry update Table plugin get Id model true delta if entry null if model get Underlying Resource null entry is In Java Search java Search Affected true changed Plugins add plugin if e get Event Types I Model Provider Event MODELS CHANGED 0 I Model changed e get Changed Models for int i 0 i changed length i if changed i instanceof I Plugin Model Base continue I Plugin Model Base model I Plugin Model Base changed i boolean workspace model get Underlying Resource null update Bundle Description model I Plugin Base plugin model get Plugin Base String id plugin get Id if id null Model Entry entry Model Entry get Entry Table get plugin get Id String old Id null if entry null if workspace model entry get Workspace Model Two possible cases 1 wrong slot id changed 2 correct slot but plugin bundle change e vice versa if is Bundle Plugin Swap model entry if entry is In Java Search java Search Affected true delta add Entry entry Plugin Model Delta CHANGED else old Id handle Id Change id model entry delta else if workspace entry is In Java Search java Search Affected true delta add Entry entry Plugin Model Delta CHANGED changed Plugins add plugin else if workspace model change entry does not exist must be id change old Id handle Id Change id model null delta changed Plugins add plugin if old Id null old Ids add old Id update Affected Entries I Plugin Base changed Plugins to Array new I Plugin Base changed Plugins size old Ids if java Search Affected searchable Plugins Manager update Classpath Container fire Delta delta  handleModelsChanged IModelProviderEvent PluginModelDelta PluginModelDelta ArrayList changedPlugins ArrayList ArrayList oldIds ArrayList javaSearchAffected getEventTypes IModelProviderEvent MODELS_REMOVED IModel getRemovedModels IPluginModelBase IPluginModelBase IPluginModelBase IPluginBase getPluginBase ModelEntry updateTable getId getUnderlyingResource isInJavaSearch javaSearchAffected changedPlugins getEventTypes IModelProviderEvent MODELS_ADDED IModel getAddedModels IPluginModelBase IPluginModelBase IPluginModelBase IPluginBase getPluginBase ModelEntry updateTable getId getUnderlyingResource isInJavaSearch javaSearchAffected changedPlugins getEventTypes IModelProviderEvent MODELS_CHANGED IModel getChangedModels IPluginModelBase IPluginModelBase IPluginModelBase getUnderlyingResource updateBundleDescription IPluginBase getPluginBase getId ModelEntry ModelEntry getEntryTable getId oldId getWorkspaceModel isBundlePluginSwap isInJavaSearch javaSearchAffected addEntry PluginModelDelta oldId handleIdChange isInJavaSearch javaSearchAffected addEntry PluginModelDelta changedPlugins oldId handleIdChange changedPlugins oldId oldIds oldId updateAffectedEntries IPluginBase changedPlugins toArray IPluginBase changedPlugins oldIds javaSearchAffected searchablePluginsManager updateClasspathContainer fireDelta
private boolean is Bundle Plugin Swap I Plugin Model Base model Model Entry entry I Plugin Model Base workspace Model entry get Workspace Model if workspace Model null return false boolean swap false if model instanceof I Bundle Plugin Model Base workspace Model instanceof I Bundle Plugin Model Base swap true else if model instanceof I Bundle Plugin Model Base workspace Model instanceof I Bundle Plugin Model Base swap true if swap entry set Workspace Model model return swap  isBundlePluginSwap IPluginModelBase ModelEntry IPluginModelBase workspaceModel getWorkspaceModel workspaceModel IBundlePluginModelBase workspaceModel IBundlePluginModelBase IBundlePluginModelBase workspaceModel IBundlePluginModelBase setWorkspaceModel
private Model Entry find Old Entry I Plugin Model Base model Collection values get Entry Table values for Iterator iter values iterator iter has Next Model Entry entry Model Entry iter next I Plugin Model Base candidate entry get Workspace Model if model candidate return entry return null  ModelEntry findOldEntry IPluginModelBase getEntryTable hasNext ModelEntry ModelEntry IPluginModelBase getWorkspaceModel
private String handle Id Change String new Id I Plugin Model Base model Model Entry new Entry Plugin Model Delta delta Model Entry old Entry find Old Entry model String old Id null we must remove the model from the old entry if old Entry null old Entry set Workspace Model null if old Entry is Empty remove the old entry completely get Entry Table remove old Entry get Id delta add Entry old Entry Plugin Model Delta REMOVED else just notify that the old entry has changed delta add Entry old Entry Plugin Model Delta CHANGED old Id old Entry get Id add the model to the new entry if does not exist create if new Entry null change the workspace model of the new entry new Entry set Workspace Model model delta add Entry new Entry Plugin Model Delta CHANGED else create the new entry new Entry new Model Entry this new Id get Entry Table put new Id new Entry delta add Entry new Entry Plugin Model Delta ADDED return old Id  handleIdChange newId IPluginModelBase ModelEntry newEntry PluginModelDelta ModelEntry oldEntry findOldEntry oldId oldEntry oldEntry setWorkspaceModel oldEntry isEmpty getEntryTable oldEntry getId addEntry oldEntry PluginModelDelta addEntry oldEntry PluginModelDelta oldId oldEntry getId newEntry newEntry setWorkspaceModel addEntry newEntry PluginModelDelta newEntry ModelEntry newId getEntryTable newId newEntry addEntry newEntry PluginModelDelta oldId
private Model Entry update Table String id I Plugin Model Base model boolean added Plugin Model Delta delta boolean workspace model get Underlying Resource null if id null return null Map entries get Entry Table Model Entry entry Model Entry entries get id int kind 0 if added entry null entry new Model Entry this id entries put id entry kind Plugin Model Delta ADDED try entry update Classpath Container false true catch Core Exception e if added if workspace entry set Workspace Model model else entry set External Model model else if entry null if workspace entry set Workspace Model null else entry set External Model null if entry is Empty entries remove id kind Plugin Model Delta REMOVED if workspace PDE State state external Manager get State if added add Workspace Bundle To State model state else remove Workspace Bundle From State model state state resolve State true if kind 0 kind Plugin Model Delta CHANGED delta add Entry entry kind return entry  ModelEntry updateTable IPluginModelBase PluginModelDelta getUnderlyingResource getEntryTable ModelEntry ModelEntry ModelEntry PluginModelDelta updateClasspathContainer CoreException setWorkspaceModel setExternalModel setWorkspaceModel setExternalModel isEmpty PluginModelDelta PDEState externalManager getState addWorkspaceBundleToState removeWorkspaceBundleFromState resolveState PluginModelDelta addEntry
private void update Affected Entries I Plugin Base changed Plugins Array List old Ids Reset classpath containers for affected entries Model Entry entries get Entries Map map new Hash Map for int i 0 i entries length i Model Entry entry entries i if entry is Affected changed Plugins old Ids try if entry should Update Classpath Container true true I Project proj entry get Workspace Model get Underlying Resource get Project entry get Classpath Container reset map put Java Core create proj entry get Classpath Container catch Core Exception e if map size 0 try I Java Project j Projects I Java Project map key Set to Array new I Java Project map size I Classpath Container containers I Classpath Container map values to Array new I Classpath Container map size Java Core set Classpath Container new Path PDE Core CLASSPATH CONTAINER ID j Projects containers null catch Java Model Exception e  updateAffectedEntries IPluginBase changedPlugins ArrayList oldIds ModelEntry getEntries HashMap ModelEntry isAffected changedPlugins oldIds shouldUpdateClasspathContainer IProject getWorkspaceModel getUnderlyingResource getProject getClasspathContainer JavaCore getClasspathContainer CoreException IJavaProject jProjects IJavaProject keySet toArray IJavaProject IClasspathContainer IClasspathContainer toArray IClasspathContainer JavaCore setClasspathContainer PDECore CLASSPATH_CONTAINER_ID jProjects JavaModelException
private synchronized void initialize Table if f Entries null return f Entries Collections synchronized Map new Tree Map I Plugin Model Base models external Manager get All Models add To Table models false models workspace Manager get All Models add To Table models true add Workspace Bundles To State searchable Plugins Manager initialize  initializeTable fEntries fEntries synchronizedMap TreeMap IPluginModelBase externalManager getAllModels addToTable workspaceManager getAllModels addToTable addWorkspaceBundlesToState searchablePluginsManager
This way there are no partial reads private Map get Entry Table initialize Table return f Entries  getEntryTable initializeTable fEntries
public void add Workspace Bundles To State I Plugin Model Base models workspace Manager get All Models PDE State state external Manager get State for int i 0 i models length i add Workspace Bundle To State models i state state resolve State true  addWorkspaceBundlesToState IPluginModelBase workspaceManager getAllModels PDEState externalManager getState addWorkspaceBundleToState resolveState
private void add Workspace Bundle To State I Plugin Model Base model PDE State state if model instanceof I Bundle Plugin Model Base return String id model get Plugin Base get Id if id null return Model Entry entry find Entry id if entry null return I Plugin Model Base external entry get External Model if external null Bundle Description desc external get Bundle Description state remove Bundle Description desc if model get Bundle Description null state remove Bundle Description model get Bundle Description model set Bundle Description state add Bundle new File model get Install Location  addWorkspaceBundleToState IPluginModelBase PDEState IBundlePluginModelBase getPluginBase getId ModelEntry findEntry IPluginModelBase getExternalModel BundleDescription getBundleDescription removeBundleDescription getBundleDescription removeBundleDescription getBundleDescription setBundleDescription addBundle getInstallLocation
private void remove Workspace Bundle From State I Plugin Model Base model PDE State state Bundle Description description model get Bundle Description if description null return state remove Bundle Description description String id model get Plugin Base get Id if id null return Model Entry entry find Entry id if entry null return I Plugin Model Base external entry get External Model if external null Bundle Description desc external get Bundle Description state add Bundle Description desc  removeWorkspaceBundleFromState IPluginModelBase PDEState BundleDescription getBundleDescription removeBundleDescription getPluginBase getId ModelEntry findEntry IPluginModelBase getExternalModel BundleDescription getBundleDescription addBundleDescription
private void update Bundle Description I Plugin Model Base model Bundle Description description model get Bundle Description if description null return PDE State state external Manager get State state remove Bundle Description description Bundle Description new Desc state add Bundle new File model get Install Location model set Bundle Description new Desc state resolve State true  updateBundleDescription IPluginModelBase BundleDescription getBundleDescription PDEState externalManager getState removeBundleDescription BundleDescription newDesc addBundle getInstallLocation setBundleDescription newDesc resolveState
private void add To Table I Plugin Model Base pmodels boolean workspace for int i 0 i pmodels length i add To Table pmodels i workspace  addToTable IPluginModelBase addToTable
private void add To Table I Plugin Model Base model boolean workspace String id model get Plugin Base get Id if id null return Map entries get Entry Table Model Entry entry Model Entry entries get id if entry null entry new Model Entry this id entries put id entry if workspace entry set Workspace Model model else entry set External Model model  addToTable IPluginModelBase getPluginBase getId getEntryTable ModelEntry ModelEntry ModelEntry setWorkspaceModel setExternalModel
private void fire Delta Plugin Model Delta delta Object entries listeners to Array for int i 0 i entries length i I Plugin Model Listener entries i models Changed delta  fireDelta PluginModelDelta toArray IPluginModelListener modelsChanged
public void connect Workspace Model Manager wm External Model Manager em external Manager em workspace Manager wm external Manager add Model Provider Listener provider Listener workspace Manager add Model Provider Listener provider Listener  WorkspaceModelManager ExternalModelManager externalManager workspaceManager externalManager addModelProviderListener providerListener workspaceManager addModelProviderListener providerListener
public void shutdown if workspace Manager null workspace Manager remove Model Provider Listener provider Listener if external Manager null external Manager remove Model Provider Listener provider Listener searchable Plugins Manager shutdown  workspaceManager workspaceManager removeModelProviderListener providerListener externalManager externalManager removeModelProviderListener providerListener searchablePluginsManager
public void set In Java Search Model Entry entries boolean value I Progress Monitor monitor throws Core Exception Plugin Model Delta delta new Plugin Model Delta for int i 0 i entries length i Model Entry entry entries i if entry is In Java Search value entry set In Java Search value delta add Entry entry Plugin Model Delta CHANGED if delta get Kind 0 searchable Plugins Manager persist States monitor fire Delta delta  setInJavaSearch ModelEntry IProgressMonitor CoreException PluginModelDelta PluginModelDelta ModelEntry isInJavaSearch setInJavaSearch addEntry PluginModelDelta getKind searchablePluginsManager persistStates fireDelta
void searchable Plugins Removed Model Entry entries get Entries Plugin Model Delta delta new Plugin Model Delta for int i 0 i entries length i Model Entry entry entries i if entry is In Java Search entry set In Java Search false delta add Entry entry Plugin Model Delta CHANGED if delta get Kind 0 fire Delta delta  searchablePluginsRemoved ModelEntry getEntries PluginModelDelta PluginModelDelta ModelEntry isInJavaSearch setInJavaSearch addEntry PluginModelDelta getKind fireDelta
public I File Adapter Factory get File Adapter Factory return searchable Plugins Manager  IFileAdapterFactory getFileAdapterFactory searchablePluginsManager
return Returns the searchable Plugins Manager public Searchable Plugins Manager get Searchable Plugins Manager initialize Table return searchable Plugins Manager  searchablePluginsManager SearchablePluginsManager getSearchablePluginsManager initializeTable searchablePluginsManager

private static String get Path String platform Home File file String prefix new Path platform Home remove Last Segments 1 to String Properties properties new Properties try File Input Stream fis new File Input Stream file properties load fis fis close String path properties get Property path NON NLS 1 if path null if new Path path is Absolute path prefix Path SEPARATOR path path Path SEPARATOR eclipse Path SEPARATOR plugins NON NLS 1 NON NLS 2 if new File path exists return path catch IO Exception e return null  getPath platformHome platformHome removeLastSegments toString FileInputStream FileInputStream getProperty isAbsolute IOException
private static File get Sites String platform Home Array List sites new Array List sites add new File platform Home plugins NON NLS 1 File link Files new File platform Home Path SEPARATOR links list Files NON NLS 1 if link Files null for int i 0 i link Files length i String path get Path platform Home link Files i if path null sites add new File path return File sites to Array new File sites size  getSites platformHome ArrayList ArrayList platformHome linkFiles platformHome listFiles linkFiles linkFiles getPath platformHome linkFiles toArray
public static URL get Plugin Paths String platform Home File file new File platform Home configuration org eclipse update platform xml NON NLS 1 if file exists try I Platform Configuration config Configurator Utils get Platform Configuration file toURL return get Configured Sites platform Home config catch MalformedURL Exception e catch IO Exception e return scan Locations get Sites platform Home  getPluginPaths platformHome platformHome IPlatformConfiguration ConfiguratorUtils getPlatformConfiguration getConfiguredSites platformHome MalformedURLException IOException scanLocations getSites platformHome
private static URL get Configured Sites String platform Home I Platform Configuration configuration URL install Plugins scan Locations new File new File platform Home plugins NON NLS 1 URL extension Plugins get ExtensionUR Ls configuration URL all new URL install Plugins length extension Plugins length System arraycopy install Plugins 0 all 0 install Plugins length System arraycopy extension Plugins 0 all install Plugins length extension Plugins length return all  getConfiguredSites platformHome IPlatformConfiguration installPlugins scanLocations platformHome extensionPlugins getExtensionURLs installPlugins extensionPlugins installPlugins installPlugins extensionPlugins installPlugins extensionPlugins
private static URL get ExtensionUR Ls I Platform Configuration config Array List extension Plugins new Array List I Platform Configuration I Site Entry sites config get Configured Sites for int i 0 i sites length i URL url sites i getURL if file equals Ignore Case url get Protocol NON NLS 1 String plugins sites i get Plugins for int j 0 j plugins length j try extension Plugins add new File url get File plugins j toURL catch MalformedURL Exception e return URL extension Plugins to Array new URL extension Plugins size  getExtensionURLs IPlatformConfiguration ArrayList extensionPlugins ArrayList IPlatformConfiguration ISiteEntry getConfiguredSites equalsIgnoreCase getProtocol getPlugins extensionPlugins getFile MalformedURLException extensionPlugins toArray extensionPlugins
public static URL scan Locations File sites Array List result new Array List for int i 0 i sites length i if sites i exists continue File children sites i list Files if children null for int j 0 j children length j try result add children j toURL catch MalformedURL Exception e return URL result to Array new URL result size  scanLocations ArrayList ArrayList listFiles MalformedURLException toArray

private String class Name public Plugin  className
public String get Class Name return class Name  getClassName className
public I Plugin get Plugin return this  IPlugin getPlugin
void load Bundle Description bundle Description PDE State state Dictionary manifest state get Manifest bundle Description get Bundle Id this class Name String manifest get Constants BUNDLE ACTIVATOR super load bundle Description state  BundleDescription bundleDescription PDEState getManifest bundleDescription getBundleId className BUNDLE_ACTIVATOR bundleDescription
public void load I Plugin Base src Plugin Base Plugin Base base Plugin Base src Plugin Base this load base  IPluginBase srcPluginBase PluginBase PluginBase srcPluginBase
void load Plugin Base src Plugin Base class Name Plugin src Plugin Base class Name super load src Plugin Base  PluginBase srcPluginBase className srcPluginBase className srcPluginBase
void load Node node String schema Version Hashtable line Table this class Name get Node Attribute node class NON NLS 1 super load node schema Version line Table  schemaVersion lineTable className getNodeAttribute schemaVersion lineTable
public void reset class Name null super reset  className
public void set Class Name String new Class Name throws Core Exception ensure Model Editable String old Value class Name class Name new Class Name fire Property Changed P CLASS NAME old Value class Name  setClassName newClassName CoreException ensureModelEditable oldValue className className newClassName firePropertyChanged P_CLASS_NAME oldValue className
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P CLASS NAME set Class Name new Value null new Value to String null return super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_CLASS_NAME setClassName newValue newValue toString restoreProperty oldValue newValue
public void write String indent Print Writer writer writer println xml version 1 0 encoding UTF 8 NON NLS 1 if get Schema Version null writer println eclipse version get Schema Version NON NLS 1 NON NLS 2 writer print plugin NON NLS 1 if get Id null writer println writer print id get Id NON NLS 1 NON NLS 2 if get Name null writer println writer print name get Writable String get Name NON NLS 1 NON NLS 2 if get Version null writer println writer print version get Version NON NLS 1 NON NLS 2 if get Provider Name null writer println writer print provider name NON NLS 1 get Writable String get Provider Name NON NLS 1 if get Class Name null writer println writer print class get Class Name NON NLS 1 NON NLS 2 writer println NON NLS 1 writer println String first Indent NON NLS 1 add runtime Object children get Libraries if children length 0 write Children first Indent runtime children writer NON NLS 1 writer println add requires children get Imports if children length 0 write Children first Indent requires children writer NON NLS 1 writer println children get Extension Points for int i 0 i children length i I Plugin Extension Point children i write first Indent writer if children length 0 writer println add extensions children get Extensions for int i 0 i children length i I Plugin Extension children i write first Indent writer if children length 0 writer println writer println plugin NON NLS 1  PrintWriter getSchemaVersion getSchemaVersion getId getId getName getWritableString getName getVersion getVersion getProviderName getWritableString getProviderName getClassName getClassName firstIndent getLibraries writeChildren firstIndent getImports writeChildren firstIndent getExtensionPoints IPluginExtensionPoint firstIndent getExtensions IPluginExtension firstIndent

private transient I Schema Attribute attribute Info public Plugin Attribute  ISchemaAttribute attributeInfo PluginAttribute
Plugin Attribute I Plugin Attribute attribute set Model attribute get Model set Parent attribute get Parent this name attribute get Name this value attribute get Value this attribute Info Plugin Attribute attribute get Attribute Info  PluginAttribute IPluginAttribute setModel getModel setParent getParent getName getValue attributeInfo PluginAttribute getAttributeInfo
this attribute Info Plugin Attribute attribute get Attribute Info public Object clone return new Plugin Attribute this  attributeInfo PluginAttribute getAttributeInfo PluginAttribute
public boolean equals Object obj if obj this return true if obj null return false if obj instanceof I Plugin Attribute I Plugin Attribute target I Plugin Attribute obj if target get Model equals get Model return false if string Equal With Null get Name target get Name string Equal With Null get Value target get Value return true return false  IPluginAttribute IPluginAttribute IPluginAttribute getModel getModel stringEqualWithNull getName getName stringEqualWithNull getValue getValue
public I Schema Attribute get Attribute Info if attribute Info null I Schema schema attribute Info get Schema if schema is Disposed attribute Info null if attribute Info null Plugin Element element Plugin Element get Parent I Schema Element element Info I Schema Element element get Element Info if element Info null attribute Info element Info get Attribute get Name return attribute Info  ISchemaAttribute getAttributeInfo attributeInfo ISchema attributeInfo getSchema isDisposed attributeInfo attributeInfo PluginElement PluginElement getParent ISchemaElement elementInfo ISchemaElement getElementInfo elementInfo attributeInfo elementInfo getAttribute getName attributeInfo
return attribute Info public String get Value return value  attributeInfo getValue
void load String name String value this name name this value value 
void load Node node Hashtable line Table this name node get Node Name this value node get Node Value if get Parent instanceof I Source Object I Source Object pobj I Source Object get Parent int start pobj get Start Line int stop pobj get Stop Line if start 1 stop 1 range new int start stop  lineTable getNodeName getNodeValue getParent ISourceObject ISourceObject ISourceObject getParent getStartLine getStopLine
public void set Attribute Info I Schema Attribute new Attribute Info attribute Info new Attribute Info  setAttributeInfo ISchemaAttribute newAttributeInfo attributeInfo newAttributeInfo
public void set Value String new Value throws Core Exception ensure Model Editable String old Value this value this value new Value Attribute Changed Event e new Attribute Changed Event get Model get Parent this old Value new Value fire Model Changed e  setValue newValue CoreException ensureModelEditable oldValue newValue AttributeChangedEvent AttributeChangedEvent getModel getParent oldValue newValue fireModelChanged
public void write String indent Print Writer writer if value null return writer print indent writer print get Name get Writable String value NON NLS 1 NON NLS 2  PrintWriter getName getWritableString

private boolean valid public Plugin Base  PluginBase
public Plugin Base public String get Schema Version return schema Version  PluginBase getSchemaVersion schemaVersion
public void set Schema Version String schema Version throws Core Exception ensure Model Editable String old Value this schema Version this schema Version schema Version fire Property Changed P SCHEMA VERSION old Value schema Version  setSchemaVersion schemaVersion CoreException ensureModelEditable oldValue schemaVersion schemaVersion schemaVersion firePropertyChanged P_SCHEMA_VERSION oldValue schemaVersion
public void add I Plugin Library library throws Core Exception ensure Model Editable libraries add Element library Plugin Library library set In The Model true Plugin Library library set Parent this fire Structure Changed library I Model Changed Event INSERT  IPluginLibrary CoreException ensureModelEditable addElement PluginLibrary setInTheModel PluginLibrary setParent fireStructureChanged IModelChangedEvent
public void add I Plugin Import iimport throws Core Exception ensure Model Editable Plugin Import iimport set In The Model true Plugin Import iimport set Parent this imports add Element iimport fire Structure Changed iimport I Model Changed Event INSERT  IPluginImport CoreException ensureModelEditable PluginImport setInTheModel PluginImport setParent addElement fireStructureChanged IModelChangedEvent
public I Plugin Library get Libraries I Plugin Library result new I Plugin Library libraries size libraries copy Into result return result  IPluginLibrary getLibraries IPluginLibrary IPluginLibrary copyInto
public I Plugin Import get Imports I Plugin Import result new I Plugin Import imports size imports copy Into result return result  IPluginImport getImports IPluginImport IPluginImport copyInto
return result public I Plugin Base get Plugin Base return this  IPluginBase getPluginBase
return this public String get Provider Name return provider Name  getProviderName providerName
return provider Name public String get Version return version  providerName getVersion
return version public String get Id return id  getId
void load Bundle Description bundle Description PDE State state this id bundle Description get Symbolic Name this version bundle Description get Version to String Dictionary manifest state get Manifest bundle Description get Bundle Id this name String manifest get Constants BUNDLE NAME this provider Name String manifest get Constants BUNDLE VENDOR load Runtime bundle Description state load Imports bundle Description String filename bundle Description get Host null plugin xml fragment xml NON NLS 1 NON NLS 2 File file new File get Model get Install Location filename if file exists try SAX Parser parser get Sax Parser Extensions Parser handler new Extensions Parser get Model parser parse new File Input Stream file handler load Extensions handler get Extensions load Extension Points handler get Extension Points schema Version handler is Legacy null 3 0 NON NLS 1 catch Exception e  BundleDescription bundleDescription PDEState bundleDescription getSymbolicName bundleDescription getVersion toString getManifest bundleDescription getBundleId BUNDLE_NAME providerName BUNDLE_VENDOR loadRuntime bundleDescription loadImports bundleDescription bundleDescription getHost getModel getInstallLocation SAXParser getSaxParser ExtensionsParser ExtensionsParser getModel FileInputStream loadExtensions getExtensions loadExtensionPoints getExtensionPoints schemaVersion isLegacy
private void load Extensions Vector collected for int i 0 i collected size i Plugin Extension extension Plugin Extension collected get i extension set Parent this this extensions add extension  loadExtensions PluginExtension PluginExtension setParent
private void load Extension Points Vector collected for int i 0 i collected size i Plugin Extension Point ext Point Plugin Extension Point collected get i ext Point set Parent this this extension Points add ext Point  loadExtensionPoints PluginExtensionPoint extPoint PluginExtensionPoint extPoint setParent extensionPoints extPoint
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P ID set Id new Value null new Value to String null return if name equals P VERSION set Version new Value null new Value to String null return if name equals P PROVIDER set Provider Name new Value null new Value to String null return if name equals P LIBRARY ORDER swap I Plugin Library old Value I Plugin Library new Value return if name equals P SCHEMA VERSION set Schema Version new Value null new Value to String null return super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_ID setId newValue newValue toString P_VERSION setVersion newValue newValue toString P_PROVIDER setProviderName newValue newValue toString P_LIBRARY_ORDER IPluginLibrary oldValue IPluginLibrary newValue P_SCHEMA_VERSION setSchemaVersion newValue newValue toString restoreProperty oldValue newValue
public void load I Plugin Base src Plugin Base Plugin Base base Plugin Base src Plugin Base range base range id base id name base name provider Name base provider Name version base version schema Version base schema Version super load src Plugin Base add Array To Vector imports src Plugin Base get Imports add Array To Vector libraries src Plugin Base get Libraries valid has Required Attributes  IPluginBase srcPluginBase PluginBase PluginBase srcPluginBase providerName providerName schemaVersion schemaVersion srcPluginBase addArrayToVector srcPluginBase getImports addArrayToVector srcPluginBase getLibraries hasRequiredAttributes
void load Node node Hashtable line Table  lineTable
void load Node node String schema Version Hashtable line Table bind Source Location node line Table this schema Version schema Version this id get Node Attribute node id NON NLS 1 this name get Node Attribute node name NON NLS 1 this provider Name get Node Attribute node provider name NON NLS 1 if provider Name null this provider Name get Node Attribute node vendor NON NLS 1 this version get Node Attribute node version NON NLS 1 Node List children node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE process Child child line Table valid has Required Attributes  schemaVersion lineTable bindSourceLocation lineTable schemaVersion schemaVersion getNodeAttribute getNodeAttribute providerName getNodeAttribute providerName providerName getNodeAttribute getNodeAttribute NodeList getChildNodes getLength getNodeType ELEMENT_NODE processChild lineTable hasRequiredAttributes
void load Runtime Bundle Description description PDE State state Dictionary dictionary state get Manifest description get Bundle Id if dictionary null String library Names PDE State Helper get Classpath dictionary for int i 0 i library Names length i Plugin Library library new Plugin Library library set Model get Model library set In The Model true library set Parent this library load library Names i libraries add library  loadRuntime BundleDescription PDEState getManifest getBundleId libraryNames PDEStateHelper getClasspath libraryNames PluginLibrary PluginLibrary setModel getModel setInTheModel setParent libraryNames
void load Runtime Node node Hashtable line Table Node List children node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE child get Node Name to Lower Case equals library NON NLS 1 Plugin Library library new Plugin Library library set Model get Model library set In The Model true library set Parent this libraries add library library load child line Table  loadRuntime lineTable NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName toLowerCase PluginLibrary PluginLibrary setModel getModel setInTheModel setParent lineTable
void load Imports Bundle Description description Bundle Specification required description get Required Bundles for int i 0 i required length i Plugin Import import Element new Plugin Import import Element set Model get Model import Element set In The Model true import Element set Parent this imports add import Element import Element load required i Bundle Description imported PDE State Helper get Imported Bundles description for int i 0 i imported length i Plugin Import import Element new Plugin Import import Element set Model get Model import Element set In The Model true import Element set Parent this imports add import Element import Element load imported i  loadImports BundleDescription BundleSpecification getRequiredBundles PluginImport importElement PluginImport importElement setModel getModel importElement setInTheModel importElement setParent importElement importElement BundleDescription PDEStateHelper getImportedBundles PluginImport importElement PluginImport importElement setModel getModel importElement setInTheModel importElement setParent importElement importElement
void load Imports Node node Hashtable line Table Node List children node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE child get Node Name to Lower Case equals import NON NLS 1 Plugin Import import Element new Plugin Import import Element set Model get Model import Element set In The Model true import Element set Parent this imports add import Element import Element load child line Table  loadImports lineTable NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName toLowerCase PluginImport importElement PluginImport importElement setModel getModel importElement setInTheModel importElement setParent importElement importElement lineTable
protected void process Child Node child Hashtable line Table String name child get Node Name to Lower Case if name equals runtime NON NLS 1 load Runtime child line Table else if name equals requires NON NLS 1 load Imports child line Table else super process Child child line Table  processChild lineTable getNodeName toLowerCase loadRuntime lineTable loadImports lineTable processChild lineTable
public void remove I Plugin Library library throws Core Exception ensure Model Editable libraries remove Element library Plugin Library library set In The Model false fire Structure Changed library Model Changed Event REMOVE  IPluginLibrary CoreException ensureModelEditable removeElement PluginLibrary setInTheModel fireStructureChanged ModelChangedEvent
public void remove I Plugin Import iimport throws Core Exception ensure Model Editable imports remove Element iimport Plugin Import iimport set In The Model false fire Structure Changed iimport Model Changed Event REMOVE  IPluginImport CoreException ensureModelEditable removeElement PluginImport setInTheModel fireStructureChanged ModelChangedEvent
public void reset libraries new Vector imports new Vector provider Name null schema Version null version NON NLS 1 this name NON NLS 1 this id NON NLS 1 if get Model null get Model get Underlying Resource null this id get Model get Underlying Resource get Project get Name this name this id this version 0 0 0 NON NLS 1 super reset valid false  providerName schemaVersion getModel getModel getUnderlyingResource getModel getUnderlyingResource getProject getName
public void set Provider Name String provider Name throws Core Exception ensure Model Editable String old Value this provider Name this provider Name provider Name fire Property Changed P PROVIDER old Value provider Name  setProviderName providerName CoreException ensureModelEditable oldValue providerName providerName providerName firePropertyChanged P_PROVIDER oldValue providerName
public void set Version String new Version throws Core Exception ensure Model Editable String old Value version version new Version fire Property Changed P VERSION old Value version  setVersion newVersion CoreException ensureModelEditable oldValue newVersion firePropertyChanged P_VERSION oldValue
public void set Id String new Id throws Core Exception ensure Model Editable String old Value id id new Id fire Property Changed P ID old Value id  setId newId CoreException ensureModelEditable oldValue newId firePropertyChanged P_ID oldValue
public void internal Set Version String new Version version new Version  internalSetVersion newVersion newVersion
public void swap I Plugin Library l1 I Plugin Library l2 throws Core Exception ensure Model Editable int index1 libraries index Of l1 int index2 libraries index Of l2 if index1 1 index2 1 throw Core Exception PDE Core get Resource String Plugin Base libraries Not Found Exception NON NLS 1 libraries set Element At l1 index2 libraries set Element At l2 index1 fire Property Changed this P LIBRARY ORDER l1 l2  IPluginLibrary IPluginLibrary CoreException ensureModelEditable indexOf indexOf throwCoreException PDECore getResourceString PluginBase librariesNotFoundException setElementAt setElementAt firePropertyChanged P_LIBRARY_ORDER
public void swap I Plugin Import import1 I Plugin Import import2 throws Core Exception ensure Model Editable int index1 imports index Of import1 int index2 imports index Of import2 if index1 1 index2 1 throw Core Exception PDE Core get Resource String Plugin Base imports Not Found Exception NON NLS 1 imports set Element At import1 index2 imports set Element At import2 index1 fire Property Changed this P IMPORT ORDER import1 import2  IPluginImport IPluginImport CoreException ensureModelEditable indexOf indexOf throwCoreException PDECore getResourceString PluginBase importsNotFoundException setElementAt setElementAt firePropertyChanged P_IMPORT_ORDER
public boolean is Valid return valid  isValid
protected boolean has Required Attributes if name null return false if id null return false if version null return false validate libraries for int i 0 i libraries size i I Plugin Library library I Plugin Library libraries get i if library is Valid return false validate imports for int i 0 i imports size i I Plugin Import iimport I Plugin Import imports get i if iimport is Valid return false return super has Required Attributes  hasRequiredAttributes IPluginLibrary IPluginLibrary isValid IPluginImport IPluginImport isValid hasRequiredAttributes
return super has Required Attributes protected SAX Parser get Sax Parser throws Parser Configuration Exception SAX Exception Factory Configuration Error return SAX Parser Factory new Instance newSAX Parser  hasRequiredAttributes SAXParser getSaxParser ParserConfigurationException SAXException FactoryConfigurationError SAXParserFactory newInstance newSAXParser
public static int get Match Rule Version Range version Range if version Range null version Range get Minimum null return I Match Rules NONE Version minimum version Range get Minimum Version maximum version Range get Maximum null Version max Version version Range get Maximum if maximum equals Version max Version return I Match Rules GREATER OR EQUAL else if minimum equals maximum return I Match Rules PERFECT else if minimum is Inclusive maximum is Inclusive return I Match Rules NONE no real match rule for this else if minimum get Major Component maximum get Major Component 1 return I Match Rules COMPATIBLE else if minimum get Major Component maximum get Major Component return I Match Rules NONE no real match rule for this else if minimum get Minor Component maximum get Minor Component 1 return I Match Rules EQUIVALENT else if minimum get Minor Component maximum get Minor Component return I Match Rules NONE no real match rule for this else if minimum get Micro Component maximum get Micro Component 1 return I Match Rules PERFECT this is as close as we got return I Match Rules NONE no real match rule for this  getMatchRule VersionRange versionRange versionRange versionRange getMinimum IMatchRules versionRange getMinimum versionRange getMaximum maxVersion versionRange getMaximum maxVersion IMatchRules GREATER_OR_EQUAL IMatchRules isInclusive isInclusive IMatchRules getMajorComponent getMajorComponent IMatchRules getMajorComponent getMajorComponent IMatchRules getMinorComponent getMinorComponent IMatchRules getMinorComponent getMinorComponent IMatchRules getMicroComponent getMicroComponent IMatchRules IMatchRules

private Hashtable attributes new Hashtable public Plugin Element  PluginElement
Plugin Element Plugin Element element set Model element get Model set Parent element get Parent this name element get Name I Plugin Attribute atts element get Attributes for int i 0 i atts length i Plugin Attribute att Plugin Attribute atts i attributes put att get Name att clone this text element get Text this element Info I Schema Element element get Element Info  PluginElement PluginElement setModel getModel setParent getParent getName IPluginAttribute getAttributes PluginAttribute PluginAttribute getName getText elementInfo ISchemaElement getElementInfo
public boolean equals Object obj if obj this return true if obj null return false if obj instanceof I Plugin Element I Plugin Element target I Plugin Element obj if target get Model equals get Model return false if target get Attribute Count get Attribute Count return false I Plugin Attribute tatts target get Attributes for int i 0 i tatts length i I Plugin Attribute tatt tatts i if tatt equals attributes get tatt get Name false return false return super equals obj return false  IPluginElement IPluginElement IPluginElement getModel getModel getAttributeCount getAttributeCount IPluginAttribute getAttributes IPluginAttribute getName
public I Plugin Element create Copy return new Plugin Element this  IPluginElement createCopy PluginElement
return new Plugin Element this public I Plugin Attribute get Attribute String name return I Plugin Attribute attributes get name  PluginElement IPluginAttribute getAttribute IPluginAttribute
public I Plugin Attribute get Attributes Collection values attributes values I Plugin Attribute result new I Plugin Attribute values size return I Plugin Attribute values to Array result  IPluginAttribute getAttributes IPluginAttribute IPluginAttribute IPluginAttribute toArray
return I Plugin Attribute values to Array result public int get Attribute Count return attributes size  IPluginAttribute toArray getAttributeCount
public Object get Element Info if element Info null I Schema schema element Info get Schema if schema is Disposed element Info null if element Info null I Plugin Object parent get Parent while parent null parent instanceof I Plugin Extension parent parent get Parent if parent null Plugin Extension extension Plugin Extension parent I Schema schema I Schema extension get Schema if schema null element Info schema find Element get Name return element Info  getElementInfo elementInfo ISchema elementInfo getSchema isDisposed elementInfo elementInfo IPluginObject getParent IPluginExtension getParent PluginExtension PluginExtension ISchema ISchema getSchema elementInfo findElement getName elementInfo
return element Info public String get Text return text  elementInfo getText
void load String tag Name Attributes attributes this name tag Name for int i 0 i attributes get Length i I Plugin Attribute att get Model get Factory create Attribute this Plugin Attribute att load attributes getQ Name i attributes get Value i this attributes put attributes getQ Name i att  tagName tagName getLength IPluginAttribute getModel getFactory createAttribute PluginAttribute getQName getValue getQName
public void reconnect super reconnect reconnect Attributes  reconnectAttributes
private void reconnect Attributes for Enumeration enum attributes elements enum has More Elements Plugin Attribute att Plugin Attribute enum next Element att set Model get Model att set Parent this att set In The Model true  reconnectAttributes hasMoreElements PluginAttribute PluginAttribute nextElement setModel getModel setParent setInTheModel
void load Node node Hashtable line Table this name node get Node Name Named Node Map attributes node get Attributes bind Source Location node line Table for int i 0 i attributes get Length i Node attribute attributes item i I Plugin Attribute att get Model get Factory create Attribute this Plugin Attribute att load attribute line Table Plugin Attribute att set In The Model true this attributes put attribute get Node Name att Node List children node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE Plugin Element child Element new Plugin Element child Element set Model get Model child Element set In The Model true this children add child Element child Element set Parent this child Element load child line Table else if child get Node Type Node TEXT NODE child get Node Value null String text child get Node Value text text trim if is Not Empty text this text text  lineTable getNodeName NamedNodeMap getAttributes bindSourceLocation lineTable getLength IPluginAttribute getModel getFactory createAttribute PluginAttribute lineTable PluginAttribute setInTheModel getNodeName NodeList getChildNodes getLength getNodeType ELEMENT_NODE PluginElement childElement PluginElement childElement setModel getModel childElement setInTheModel childElement childElement setParent childElement lineTable getNodeType TEXT_NODE getNodeValue getNodeValue isNotEmpty
public void remove Attribute String name throws Core Exception ensure Model Editable Plugin Attribute att Plugin Attribute attributes remove name String old Value att get Value if att null att set In The Model false fire Property Changed P ATTRIBUTE old Value null  removeAttribute CoreException ensureModelEditable PluginAttribute PluginAttribute oldValue getValue setInTheModel firePropertyChanged P_ATTRIBUTE oldValue
public void replace Attributes Hashtable new Attributes throws Core Exception ensure Model Editable Object old Value attributes set Attributes In The Model attributes false attributes new Attributes set Attributes In The Model new Attributes true fire Property Changed P ATTRIBUTES old Value attributes  replaceAttributes newAttributes CoreException ensureModelEditable oldValue setAttributesInTheModel newAttributes setAttributesInTheModel newAttributes firePropertyChanged P_ATTRIBUTES oldValue
private void set Attributes In The Model Hashtable table boolean value if table null for Enumeration enum table elements enum has More Elements Plugin Attribute att Plugin Attribute enum next Element att set In The Model value  setAttributesInTheModel hasMoreElements PluginAttribute PluginAttribute nextElement setInTheModel
public void set Attribute String name String value throws Core Exception ensure Model Editable if value null remove Attribute name return I Plugin Attribute attribute I Plugin Attribute get Attribute name if attribute null attribute get Model get Factory create Attribute this attribute set Name name attributes put name attribute Plugin Attribute attribute set In The Model true attribute set Value value  setAttribute CoreException ensureModelEditable removeAttribute IPluginAttribute IPluginAttribute getAttribute getModel getFactory createAttribute setName PluginAttribute setInTheModel setValue
public void restore Property String name Object old Value Object new Value throws Core Exception super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException restoreProperty oldValue newValue
public void set Element Info I Schema Element new Element Info element Info new Element Info if element Info null for Enumeration atts attributes elements atts has More Elements Plugin Attribute att Plugin Attribute atts next Element att set Attribute Info null  setElementInfo ISchemaElement newElementInfo elementInfo newElementInfo elementInfo hasMoreElements PluginAttribute PluginAttribute nextElement setAttributeInfo
public void set Text String new Text throws Core Exception ensure Model Editable String old Value text text new Text fire Property Changed P TEXT old Value text  setText newText CoreException ensureModelEditable oldValue newText firePropertyChanged P_TEXT oldValue
public void write String indent Print Writer writer writer print indent writer print get Name NON NLS 1 String new Indent indent ATTRIBUTE SHIFT if attributes is Empty false writer println for Iterator iter attributes values iterator iter has Next I Plugin Attribute attribute I Plugin Attribute iter next attribute write new Indent writer if iter has Next writer println writer println NON NLS 1 new Indent indent ELEMENT SHIFT I Plugin Object children get Children for int i 0 i children length i I Plugin Element element I Plugin Element children i element write new Indent writer if get Text null writer println new Indent get Writable String get Text writer println indent get Name NON NLS 1 NON NLS 2  PrintWriter getName newIndent ATTRIBUTE_SHIFT isEmpty hasNext IPluginAttribute IPluginAttribute newIndent hasNext newIndent ELEMENT_SHIFT IPluginObject getChildren IPluginElement IPluginElement newIndent getText newIndent getWritableString getText getName

private transient I Schema schema public Plugin Extension  ISchema PluginExtension
public Plugin Extension public String get Point return point  PluginExtension getPoint
public boolean is Valid return point null  isValid
public Object get Schema if schema null Schema Registry registry PDE Core get Default get Schema Registry schema registry get Schema point else if schema is Disposed schema null return schema  getSchema SchemaRegistry PDECore getDefault getSchemaRegistry getSchema isDisposed
boolean load Attributes attributes int line String point attributes get Value point NON NLS 1 if point null point length 0 return false this point point this id attributes get Value id NON NLS 1 this name attributes get Value name NON NLS 1 range new int line line return true  getValue getValue getValue
void load Node node Hashtable line Table this id get Node Attribute node id NON NLS 1 this name get Node Attribute node name NON NLS 1 this point get Node Attribute node point NON NLS 1 Node List children node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE Plugin Element child Element new Plugin Element child Element set Model get Model child Element set In The Model true child Element set Parent this this children add child Element child Element load child line Table bind Source Location node line Table  lineTable getNodeAttribute getNodeAttribute getNodeAttribute NodeList getChildNodes getLength getNodeType ELEMENT_NODE PluginElement childElement PluginElement childElement setModel getModel childElement setInTheModel childElement setParent childElement childElement lineTable bindSourceLocation lineTable
public boolean equals Object obj if obj this return true if obj null return false if obj instanceof I Plugin Extension I Plugin Extension target I Plugin Extension obj Objects from the same model must be binary equal if target get Model equals get Model return false if string Equal With Null target get Id get Id return false if string Equal With Null target get Name get Name return false if string Equal With Null target get Point get Point return false Children return super equals obj return false  IPluginExtension IPluginExtension IPluginExtension getModel getModel stringEqualWithNull getId getId stringEqualWithNull getName getName stringEqualWithNull getPoint getPoint
public void set Point String point throws Core Exception ensure Model Editable String old Value this point this point point fire Property Changed P POINT old Value point  setPoint CoreException ensureModelEditable oldValue firePropertyChanged P_POINT oldValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P POINT set Point new Value null new Value to String null return super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_POINT setPoint newValue newValue toString restoreProperty oldValue newValue
public String to String if get Name null return get Name return get Point  toString getName getName getPoint
public void write String indent Print Writer writer writer print indent writer print extension NON NLS 1 String att Indent indent Plugin Element ATTRIBUTE SHIFT if get Id null writer println writer print att Indent id get Id NON NLS 1 NON NLS 2 if get Name null writer println writer print att Indent name get Writable String get Name NON NLS 1 NON NLS 2 if get Point null writer println writer print att Indent point get Point NON NLS 1 NON NLS 2 writer println NON NLS 1 I Plugin Object children get Children for int i 0 i children length i I Plugin Element child I Plugin Element children i child write indent Plugin Element ELEMENT SHIFT writer writer println indent extension NON NLS 1  PrintWriter attIndent PluginElement ATTRIBUTE_SHIFT getId attIndent getId getName attIndent getWritableString getName getPoint attIndent getPoint IPluginObject getChildren IPluginElement IPluginElement PluginElement ELEMENT_SHIFT

static final String ID SEPARATOR NON NLS 1 public Plugin Extension Point  ID_SEPARATOR PluginExtensionPoint
public boolean is Valid return id null  isValid
public String get Full Id I Plugin Base plugin Base get Plugin Model get Plugin Base String id plugin Base get Id if plugin Base instanceof I Fragment id I Fragment plugin Base get Plugin Id return id ID SEPARATOR get Id  getFullId IPluginBase pluginBase getPluginModel getPluginBase pluginBase getId pluginBase IFragment IFragment pluginBase getPluginId ID_SEPARATOR getId
return id ID SEPARATOR get Id public String get Schema return schema  ID_SEPARATOR getId getSchema
boolean load Attributes attributes int line String id attributes get Value id NON NLS 1 if id null id length 0 return false this id id String name attributes get Value name NON NLS 1 if name null name length 0 return false this name name this schema attributes get Value schema NON NLS 1 this range new int line line return true  getValue getValue getValue
void load Node node Hashtable line Table this id get Node Attribute node id NON NLS 1 this name get Node Attribute node name NON NLS 1 this schema get Node Attribute node schema NON NLS 1 bind Source Location node line Table  lineTable getNodeAttribute getNodeAttribute getNodeAttribute bindSourceLocation lineTable
public boolean equals Object obj if obj this return true if obj instanceof I Plugin Extension Point I Plugin Extension Point target I Plugin Extension Point obj Objects from the same model must be binary equal if target get Model equals get Model return false if string Equal With Null target get Id get Id string Equal With Null target get Name get Name string Equal With Null target get Schema get Schema return true return false  IPluginExtensionPoint IPluginExtensionPoint IPluginExtensionPoint getModel getModel stringEqualWithNull getId getId stringEqualWithNull getName getName stringEqualWithNull getSchema getSchema
public void set Schema String new Schema throws Core Exception ensure Model Editable String old Value this schema schema new Schema fire Property Changed P SCHEMA old Value schema  setSchema newSchema CoreException ensureModelEditable oldValue newSchema firePropertyChanged P_SCHEMA oldValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P SCHEMA set Schema new Value null new Value to String null return super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_SCHEMA setSchema newValue newValue toString restoreProperty oldValue newValue
public void write String indent Print Writer writer writer print indent writer print extension point NON NLS 1 if get Id null writer print id get Writable String get Id NON NLS 1 NON NLS 2 if get Name null writer print name get Writable String get Name NON NLS 1 NON NLS 2 if get Schema null writer print schema get Schema NON NLS 1 NON NLS 2 writer println NON NLS 1  PrintWriter getId getWritableString getId getName getWritableString getName getSchema getSchema

private String version public Plugin Import  PluginImport
public boolean is Valid return get Id null  isValid getId
public int get Match return match  getMatch
public String get Version return version  getVersion
public boolean is Reexported return reexported  isReexported
public boolean is Optional return optional  isOptional
public void load Bundle Description description this id description get Symbolic Name  BundleDescription getSymbolicName
public void load Manifest Element element this id element get Value this optional true equals element get Attribute Constants OPTIONAL ATTRIBUTE NON NLS 1 this reexported true equals element get Attribute Constants REPROVIDE ATTRIBUTE NON NLS 1 String bundle Version element get Attribute Constants BUNDLE VERSION ATTRIBUTE if bundle Version null Version Range version Range new Version Range bundle Version this version version Range get Minimum null version Range get Minimum to String null this match Plugin Base get Match Rule version Range  ManifestElement getValue getAttribute OPTIONAL_ATTRIBUTE getAttribute REPROVIDE_ATTRIBUTE bundleVersion getAttribute BUNDLE_VERSION_ATTRIBUTE bundleVersion VersionRange versionRange VersionRange bundleVersion versionRange getMinimum versionRange getMinimum toString PluginBase getMatchRule versionRange
public void load Bundle Specification import Model this id import Model get Name this reexported import Model is Exported this optional import Model is Optional Version Range version Range import Model get Version Range if version Range null this version version Range get Minimum null version Range get Minimum to String null match Plugin Base get Match Rule version Range range new int 0 0  BundleSpecification importModel importModel getName importModel isExported importModel isOptional VersionRange versionRange importModel getVersionRange versionRange versionRange getMinimum versionRange getMinimum toString PluginBase getMatchRule versionRange
public boolean equals Object obj if obj this return true if obj null return false if obj instanceof I Plugin Import I Plugin Import target I Plugin Import obj Objects from the same model must be binary equal if target get Model equals get Model return false if target get Id equals get Id target is Reexported is Reexported string Equal With Null target get Version get Version target get Match get Match target is Optional is Optional return true return false  IPluginImport IPluginImport IPluginImport getModel getModel getId getId isReexported isReexported stringEqualWithNull getVersion getVersion getMatch getMatch isOptional isOptional
void load Node node Hashtable line Table String id get Node Attribute node plugin NON NLS 1 String export get Node Attribute node export NON NLS 1 String option get Node Attribute node optional NON NLS 1 String version get Node Attribute node version NON NLS 1 String match get Node Attribute node match NON NLS 1 boolean reexport export null export to Lower Case equals true NON NLS 1 boolean optional option null option to Lower Case equals true NON NLS 1 this match NONE if match null String lmatch match to Lower Case if lmatch equals exact NON NLS 1 lmatch RULE EQUIVALENT for int i 0 i RULE NAME TABLE length i if lmatch equals RULE NAME TABLE i this match i break this version version this id id this reexported reexport this optional optional bind Source Location node line Table  lineTable getNodeAttribute getNodeAttribute getNodeAttribute getNodeAttribute getNodeAttribute toLowerCase toLowerCase toLowerCase RULE_EQUIVALENT RULE_NAME_TABLE RULE_NAME_TABLE bindSourceLocation lineTable
public void set Match int match throws Core Exception ensure Model Editable Integer old Value new Integer this match this match match fire Property Changed P MATCH old Value new Integer match  setMatch CoreException ensureModelEditable oldValue firePropertyChanged P_MATCH oldValue
public void set Reexported boolean value throws Core Exception ensure Model Editable Boolean old Value new Boolean reexported this reexported value fire Property Changed P REEXPORTED old Value new Boolean value  setReexported CoreException ensureModelEditable oldValue firePropertyChanged P_REEXPORTED oldValue
public void set Optional boolean value throws Core Exception ensure Model Editable Boolean old Value new Boolean this optional this optional value fire Property Changed P OPTIONAL old Value new Boolean value  setOptional CoreException ensureModelEditable oldValue firePropertyChanged P_OPTIONAL oldValue
public void set Version String version throws Core Exception ensure Model Editable String old Value this version this version version fire Property Changed P VERSION old Value version  setVersion CoreException ensureModelEditable oldValue firePropertyChanged P_VERSION oldValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P MATCH set Match Integer new Value int Value return if name equals P REEXPORTED set Reexported Boolean new Value boolean Value return if name equals P OPTIONAL set Optional Boolean new Value boolean Value return if name equals P VERSION set Version new Value null new Value to String null return super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_MATCH setMatch newValue intValue P_REEXPORTED setReexported newValue booleanValue P_OPTIONAL setOptional newValue booleanValue P_VERSION setVersion newValue newValue toString restoreProperty oldValue newValue
public void write String indent Print Writer writer writer print indent writer print import plugin get Id NON NLS 1 NON NLS 2 if is Reexported writer print export true NON NLS 1 if is Optional writer print optional true NON NLS 1 if version null version length 0 writer print version version NON NLS 1 NON NLS 2 if match NONE String match Value RULE NAME TABLE match writer print match match Value NON NLS 1 NON NLS 2 writer println NON NLS 1  PrintWriter getId isReexported isOptional matchValue RULE_NAME_TABLE matchValue

private static final int GROUP COUNT Integer MAX VALUE public Plugin Library  GROUP_COUNT MAX_VALUE PluginLibrary
public boolean is Valid return name null  isValid
return name null public String get Content Filters return content Filters  getContentFilters contentFilters
see org eclipse pde core plugin I Plugin Library add Content Filter java lang String public void add Content Filter String filter throws Core Exception  IPluginLibrary addContentFilter addContentFilter CoreException
see org eclipse pde core plugin I Plugin Library remove Content Filter java lang String public void remove Content Filter String filter throws Core Exception  IPluginLibrary removeContentFilter removeContentFilter CoreException
public void remove Content Filter String filter throws Core Exception public String get Packages return packages  removeContentFilter CoreException getPackages
return packages public boolean is Exported return exported  isExported
return exported public boolean is Fully Exported return exported content Filters null content Filters length 0  isFullyExported contentFilters contentFilters
public String get Type return type  getType
public void load String name this name name this exported true 
void load Node node Hashtable line Table this name get Node Attribute node name NON NLS 1 this type get Node Attribute node type NON NLS 1 Node List children node get Child Nodes Vector exports new Vector Vector prefixes new Vector boolean all false for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE String tag child get Node Name to Lower Case if tag equals export NON NLS 1 String ename get Node Attribute child name NON NLS 1 if ename null ename ename trim if ename equals NON NLS 1 all true else exports add ename else if tag equals packages NON NLS 1 String ename get Node Attribute child prefixes NON NLS 1 if ename null ename ename trim String Tokenizer stok new String Tokenizer ename NON NLS 1 while stok has More Tokens prefixes add stok next Token if exports size 0 content Filters new String exports size exports copy Into content Filters if prefixes size 0 packages new String prefixes size prefixes copy Into packages exported all exports size 0 bind Source Location node line Table  lineTable getNodeAttribute getNodeAttribute NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName toLowerCase getNodeAttribute getNodeAttribute StringTokenizer StringTokenizer hasMoreTokens nextToken contentFilters copyInto contentFilters copyInto bindSourceLocation lineTable
public void set Content Filters String filters throws Core Exception ensure Model Editable Array List old Value create Array List content Filters content Filters filters fire Property Changed P CONTENT FILTERS old Value create Array List filters  setContentFilters CoreException ensureModelEditable ArrayList oldValue createArrayList contentFilters contentFilters firePropertyChanged P_CONTENT_FILTERS oldValue createArrayList
public void set Packages String packages throws Core Exception ensure Model Editable Array List old Value create Array List this packages this packages packages fire Property Changed P PACKAGES old Value create Array List packages  setPackages CoreException ensureModelEditable ArrayList oldValue createArrayList firePropertyChanged P_PACKAGES oldValue createArrayList
public void set Exported boolean value throws Core Exception ensure Model Editable Boolean old Value new Boolean this exported this exported value fire Property Changed P EXPORTED old Value new Boolean value  setExported CoreException ensureModelEditable oldValue firePropertyChanged P_EXPORTED oldValue
public void set Type String type throws Core Exception ensure Model Editable String old Value this type this type type fire Property Changed P TYPE old Value type  setType CoreException ensureModelEditable oldValue firePropertyChanged P_TYPE oldValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P CONTENT FILTERS Array List list Array List new Value if list null set Content Filters String list to Array new String list size else set Content Filters null return if name equals P PACKAGES Array List list Array List new Value if list null set Packages String list to Array new String list size else set Packages null return if name equals P EXPORTED set Exported Boolean new Value boolean Value return if name equals P TYPE set Type new Value null new Value to String null return super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_CONTENT_FILTERS ArrayList ArrayList newValue setContentFilters toArray setContentFilters P_PACKAGES ArrayList ArrayList newValue setPackages toArray setPackages P_EXPORTED setExported newValue booleanValue P_TYPE setType newValue newValue toString restoreProperty oldValue newValue
private Array List create Array List String array if array null return null Array List list new Array List for int i 0 i array length i list add array i return list  ArrayList createArrayList ArrayList ArrayList
public void write String indent Print Writer writer writer print indent writer print library name get Name NON NLS 1 NON NLS 2 if type null writer print type type NON NLS 1 NON NLS 2 if is Exported false packages null writer println NON NLS 1 else writer println NON NLS 1 String indent2 indent NON NLS 1 if is Exported if is Fully Exported writer println indent2 export name NON NLS 1 else for int i 0 i content Filters length i writer println indent2 export name NON NLS 1 content Filters i NON NLS 1 if packages null Array List groups compute Package Groups packages for int i 0 i groups size i writer println indent2 packages prefixes NON NLS 1 String groups get i NON NLS 1 writer println indent library NON NLS 1  PrintWriter getName isExported isExported isFullyExported contentFilters contentFilters ArrayList computePackageGroups
private Array List compute Package Groups String packages String Buffer buff new String Buffer Array List list new Array List int counter 0 for int i 0 i packages length i counter if counter 1 buff append NON NLS 1 buff append packages i if counter GROUP COUNT counter 0 list add buff to String buff delete 0 buff length if counter 0 list add buff to String return list  ArrayList computePackageGroups StringBuffer StringBuffer ArrayList ArrayList GROUP_COUNT toString toString

private boolean in The Model public Plugin Object  inTheModel PluginObject
public Plugin Object public boolean is Valid return true  PluginObject isValid
protected void ensure Model Editable throws Core Exception if model is Editable throw Core Exception PDE Core get Resource String Plugin Object read Only Change NON NLS 1  ensureModelEditable CoreException isEditable throwCoreException PDECore getResourceString PluginObject readOnlyChange
public void set In The Model boolean value in The Model value  setInTheModel inTheModel
public boolean is In The Model return in The Model  isInTheModel inTheModel
protected void fire Property Changed String property Object old Value Object new Value fire Property Changed this property old Value new Value  firePropertyChanged oldValue newValue firePropertyChanged oldValue newValue
protected void fire Property Changed I Plugin Object object String property Object old Value Object new Value if model is Editable model instanceof I Model Change Provider I Model Change Provider provider I Model Change Provider model provider fire Model Object Changed object property old Value new Value  firePropertyChanged IPluginObject oldValue newValue isEditable IModelChangeProvider IModelChangeProvider IModelChangeProvider fireModelObjectChanged oldValue newValue
protected void fire Structure Changed I Plugin Object child int change Type I Model model get Model if model is Editable model instanceof I Model Change Provider I Model Changed Event e new Model Changed Event I Model Change Provider model change Type new Object child null fire Model Changed e  fireStructureChanged IPluginObject changeType IModel getModel isEditable IModelChangeProvider IModelChangedEvent ModelChangedEvent IModelChangeProvider changeType fireModelChanged
protected void fire Model Changed I Model Changed Event e I Model model get Model if model is Editable model instanceof I Model Change Provider I Model Change Provider provider I Model Change Provider model provider fire Model Changed e  fireModelChanged IModelChangedEvent IModel getModel isEditable IModelChangeProvider IModelChangeProvider IModelChangeProvider fireModelChanged
public I Shared Plugin Model get Model return model  ISharedPluginModel getModel
public I Plugin Model Base get Plugin Model if model instanceof I Bundle Plugin Model Provider return I Bundle Plugin Model Provider model get Bundle Plugin Model return model instanceof I Plugin Model Base I Plugin Model Base model null  IPluginModelBase getPluginModel IBundlePluginModelProvider IBundlePluginModelProvider getBundlePluginModel IPluginModelBase IPluginModelBase
public String get Name return name  getName
public String get Translated Name if translated Name null model is Editable return translated Name if translated Name null name null model null translated Name model get Resource String name return translated Name  getTranslatedName translatedName isEditable translatedName translatedName translatedName getResourceString translatedName
String get Node Attribute Node node String name Node attribute node get Attributes get Named Item name if attribute null return attribute get Node Value return null  getNodeAttribute getAttributes getNamedItem getNodeValue
return null public I Plugin Object get Parent return parent  IPluginObject getParent
return parent public I Plugin Base get Plugin Base I Plugin Model Base plugin Model get Plugin Model return plugin Model null plugin Model get Plugin Base null  IPluginBase getPluginBase IPluginModelBase pluginModel getPluginModel pluginModel pluginModel getPluginBase
return plugin Model null plugin Model get Plugin Base null public String get Resource String String key return model get Resource String key  pluginModel pluginModel getPluginBase getResourceString getResourceString
static boolean is Not Empty String text for int i 0 i text length i if Character is Whitespace text char At i false return true return false  isNotEmpty isWhitespace charAt
return false abstract void load Node node Hashtable line Table  lineTable
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P NAME set Name new Value null new Value to String null  restoreProperty oldValue newValue CoreException P_NAME setName newValue newValue toString
public void set Model I Shared Plugin Model model this model model translated Name null  setModel ISharedPluginModel translatedName
public void set Name String name throws Core Exception ensure Model Editable String old Value this name this name name fire Property Changed P NAME old Value name  setName CoreException ensureModelEditable oldValue firePropertyChanged P_NAME oldValue
fire Property Changed P NAME old Value name public void set Parent I Plugin Object parent this parent parent  firePropertyChanged P_NAME oldValue setParent IPluginObject
protected void throw Core Exception String message throws Core Exception Status status new Status I Status ERROR PDE Core get Plugin Id I Status OK message null Core Exception ce new Core Exception status ce fill In Stack Trace throw ce  throwCoreException CoreException IStatus PDECore getPluginId IStatus CoreException CoreException fillInStackTrace
public String to String if name null return name return super to String  toString toString
public Vector add Comments Node node Vector result for Node prev node get Previous Sibling prev null prev prev get Previous Sibling if prev get Node Type Node TEXT NODE continue if prev instanceof Comment String comment prev get Node Value if result null result new Vector result add 0 comment else break return result  addComments getPreviousSibling getPreviousSibling getNodeType TEXT_NODE getNodeValue
void write Comments Print Writer writer Vector source if source null return for int i 0 i source size i String comment String source element At i writer println comment NON NLS 1 NON NLS 2  writeComments PrintWriter elementAt
protected boolean string Equal With Null String a String b return a null b null a null b null a equals b  stringEqualWithNull
public String get Writable String String source String Buffer buf new String Buffer for int i 0 i source length i char c source char At i switch c case buf append amp NON NLS 1 break case buf append lt NON NLS 1 break case buf append gt NON NLS 1 break case buf append apos NON NLS 1 break case buf append quot NON NLS 1 break default buf append c break return buf to String  getWritableString StringBuffer StringBuffer charAt toString
protected void bind Source Location Node node Map line Table Integer lines Integer line Table get node if lines null range new int 2 range 0 lines 0 int Value range 1 lines 1 int Value  bindSourceLocation lineTable lineTable intValue intValue
public int get Start Line if range null return 1 return range 0  getStartLine
public int get Stop Line if range null return 1 return range 1  getStopLine

protected Vector children new Vector public Plugin Parent  PluginParent
public void add int index I Plugin Object child throws Core Exception ensure Model Editable children add index child post Add child  IPluginObject CoreException ensureModelEditable postAdd
public void add I Plugin Object child throws Core Exception ensure Model Editable children add child post Add child  IPluginObject CoreException ensureModelEditable postAdd
void append Child I Plugin Element child children add child  appendChild IPluginElement
protected void post Add I Plugin Object child Plugin Object child set In The Model true Plugin Object child set Parent this fire Structure Changed child I Model Changed Event INSERT  postAdd IPluginObject PluginObject setInTheModel PluginObject setParent fireStructureChanged IModelChangedEvent
public int get Child Count return children size  getChildCount
public boolean equals Object obj if this obj return true if obj null return false if obj instanceof I Plugin Parent I Plugin Parent target I Plugin Parent obj if target get Child Count get Child Count return false I Plugin Object tchildren target get Children for int i 0 i tchildren length i I Plugin Object tchild tchildren i if tchild equals children get i false return false return true return false  IPluginParent IPluginParent IPluginParent getChildCount getChildCount IPluginObject getChildren IPluginObject
public int get Index Of I Plugin Object child return children index Of child  getIndexOf IPluginObject indexOf
public void swap I Plugin Object child1 I Plugin Object child2 throws Core Exception ensure Model Editable int index1 children index Of child1 int index2 children index Of child2 if index1 1 index2 1 throw Core Exception PDE Core get Resource String Plugin Parent siblings Not Found Exception NON NLS 1 children set Element At child1 index2 children set Element At child2 index1 fire Property Changed this P SIBLING ORDER child1 child2  IPluginObject IPluginObject CoreException ensureModelEditable indexOf indexOf throwCoreException PDECore getResourceString PluginParent siblingsNotFoundException setElementAt setElementAt firePropertyChanged P_SIBLING_ORDER
public I Plugin Object get Children I Plugin Object result new I Plugin Object children size children copy Into result return result  IPluginObject getChildren IPluginObject IPluginObject copyInto
public void remove I Plugin Object child throws Core Exception ensure Model Editable children remove Element child Plugin Object child set In The Model false fire Structure Changed child Model Changed Event REMOVE  IPluginObject CoreException ensureModelEditable removeElement PluginObject setInTheModel fireStructureChanged ModelChangedEvent
public void reconnect for int i 0 i children size i Plugin Object child Plugin Object children get i child set Model get Model child set Parent this if child instanceof Plugin Parent Plugin Parent child reconnect  PluginObject PluginObject setModel getModel setParent PluginParent PluginParent

private transient I Plugin plugin public Plugin Reference  IPlugin PluginReference
public Plugin Reference String id this id id if id null plugin PDE Core get Default find Plugin id  PluginReference PDECore getDefault findPlugin
plugin PDE Core get Default find Plugin id public Plugin Reference I Plugin plugin this id plugin get Id this plugin plugin  PDECore getDefault findPlugin PluginReference IPlugin getId
this plugin plugin public String get Id return id  getId
public I Plugin get Plugin if plugin null id null plugin PDE Core get Default find Plugin id return plugin  IPlugin getPlugin PDECore getDefault findPlugin
public String to String if plugin null return plugin get Translated Name return id null id NON NLS 1  toString getTranslatedName
return id null id NON NLS 1 public boolean is Resolved return plugin null  isResolved

protected NL Resource Helper createNL Resource Helper String name file get Name equals plugin xml plugin fragment NON NLS 1 NON NLS 2 NON NLS 3 NL Resource Helper helper new NL Resource Helper name getNL Lookup Locations helper set File file return helper  NLResourceHelper createNLResourceHelper getName NLResourceHelper NLResourceHelper getNLLookupLocations setFile
public URL getNL Lookup Location I Path path file get Location remove Last Segments 1 String install Location path toOS String if install Location starts With file false NON NLS 1 install Location file install Location NON NLS 1 try URL url new URL install Location NON NLS 1 return url catch MalformedURL Exception e return null  getNLLookupLocation IPath getLocation removeLastSegments installLocation toOSString installLocation startsWith installLocation installLocation installLocation MalformedURLException
public Workspace Extensions Model I File file set File file  WorkspaceExtensionsModel IFile setFile
public void fire Model Changed I Model Changed Event event dirty true super fire Model Changed event  fireModelChanged IModelChangedEvent fireModelChanged
public String get Contents String Writer swriter new String Writer Print Writer writer new Print Writer swriter save writer writer flush try swriter close catch IO Exception e return swriter to String  getContents StringWriter StringWriter PrintWriter PrintWriter IOException toString
return swriter to String public I File get File return file  toString IFile getFile
public String get Install Location return file get Parent get Location toOS String  getInstallLocation getParent getLocation toOSString
public I Resource get Underlying Resource return file  IResource getUnderlyingResource
public boolean is In Sync if file null return true I Path path file get Location if path null return false return super is In Sync path to File  isInSync IPath getLocation isInSync toFile
public boolean is Dirty return dirty  isDirty
return dirty public boolean is Editable return editable  isEditable
public void dispose super dispose 
public void load if file null return if file exists Input Stream stream null boolean out Of Sync false try stream file get Contents false catch Core Exception e out Of Sync true if out Of Sync try stream file get Contents true catch Core Exception e return try load stream out Of Sync stream close catch Core Exception e catch IO Exception e PDE Core log Exception e else get Extensions true loaded true  InputStream outOfSync getContents CoreException outOfSync outOfSync getContents CoreException outOfSync CoreException IOException PDECore logException getExtensions
protected void update Time Stamp update Time Stamp file get Location to File  updateTimeStamp updateTimeStamp getLocation toFile
public void save if file null return try String contents get Contents Byte Array Input Stream stream new Byte Array Input Stream contents get Bytes UTF8 NON NLS 1 if file exists file set Contents stream false false null else file create stream false null stream close catch Core Exception e PDE Core log Exception e catch IO Exception e  getContents ByteArrayInputStream ByteArrayInputStream getBytes setContents CoreException PDECore logException IOException
public void save Print Writer writer if is Loaded extensions write writer NON NLS 1 dirty false  PrintWriter isLoaded
dirty false public void set Dirty boolean dirty this dirty dirty  setDirty
this dirty dirty public void set Editable boolean new Editable editable new Editable  setEditable newEditable newEditable
editable new Editable public void set File I File new File file new File set Editable new File is Read Only false  newEditable setFile IFile newFile newFile setEditable newFile isReadOnly
protected Extensions create Extensions Extensions extensions super create Extensions extensions set Is Fragment file get Name equals fragment xml NON NLS 1 return extensions  createExtensions createExtensions setIsFragment getName
see java lang Object to String public String to String return file get Name  toString toString getName
public void set Bundle Model I Bundle Plugin Model Base model f Bundle Model model  setBundleModel IBundlePluginModelBase fBundleModel
public I Bundle Plugin Model Base get Bundle Plugin Model return f Bundle Model  IBundlePluginModelBase getBundlePluginModel fBundleModel

public class Workspace Fragment Model extends Workspace Plugin Model Base implements I Fragment Model public Workspace Fragment Model org eclipse core resources I File file super file  WorkspaceFragmentModel WorkspacePluginModelBase IFragmentModel WorkspaceFragmentModel IFile
public I Plugin Base create Plugin Base Fragment fragment new Fragment fragment set Model this return fragment  IPluginBase createPluginBase setModel
return fragment public I Fragment get Fragment return I Fragment get Plugin Base  IFragment getFragment IFragment getPluginBase
return I Fragment get Plugin Base public boolean is Fragment Model return true  IFragment getPluginBase isFragmentModel

public class Workspace Plugin Model extends Workspace Plugin Model Base implements I Plugin Model public Workspace Plugin Model org eclipse core resources I File file super file  WorkspacePluginModel WorkspacePluginModelBase IPluginModel WorkspacePluginModel IFile
public I Plugin Base create Plugin Base Plugin plugin new Plugin plugin set Model this return plugin  IPluginBase createPluginBase setModel
return plugin public I Plugin get Plugin return I Plugin get Plugin Base  IPlugin getPlugin IPlugin getPluginBase

protected NL Resource Helper createNL Resource Helper String name is Fragment Model fragment plugin NON NLS 1 NON NLS 2 NL Resource Helper helper new NL Resource Helper name getNL Lookup Locations helper set File file return helper  NLResourceHelper createNLResourceHelper isFragmentModel NLResourceHelper NLResourceHelper getNLLookupLocations setFile
public URL getNL Lookup Location I Path path file get Location remove Last Segments 1 String install Location path toOS String if install Location starts With file false NON NLS 1 install Location file install Location NON NLS 1 try URL url new URL install Location NON NLS 1 return url catch MalformedURL Exception e return null  getNLLookupLocation IPath getLocation removeLastSegments installLocation toOSString installLocation startsWith installLocation installLocation installLocation MalformedURLException
public Workspace Plugin Model Base I File file set File file set Enabled true  WorkspacePluginModelBase IFile setFile setEnabled
set Enabled true public void fire Model Changed I Model Changed Event event dirty true super fire Model Changed event  setEnabled fireModelChanged IModelChangedEvent fireModelChanged
super fire Model Changed event public I Build Model get Build Model return build Model  fireModelChanged IBuildModel getBuildModel buildModel
public String get Contents String Writer swriter new String Writer Print Writer writer new Print Writer swriter save writer writer flush try swriter close catch IO Exception e return swriter to String  getContents StringWriter StringWriter PrintWriter PrintWriter IOException toString
return swriter to String public I File get File return file  toString IFile getFile
return file public String get Install Location return file get Parent get Location toOS String  getInstallLocation getParent getLocation toOSString
public I Resource get Underlying Resource return file  IResource getUnderlyingResource
public boolean is In Sync if file null return true I Path path file get Location if path null return false return super is In Sync path to File  isInSync IPath getLocation isInSync toFile
public boolean is Dirty return dirty  isDirty
return dirty public boolean is Editable return editable  isEditable
public void dispose super dispose 
public void load if file null return if file exists Input Stream stream null boolean out Of Sync false try stream file get Contents false catch Core Exception e out Of Sync true if out Of Sync try stream file get Contents true catch Core Exception e return try load stream out Of Sync stream close catch Core Exception e catch IO Exception e PDE Core log Exception e else plugin Base Plugin Base create Plugin Base plugin Base set Model this loaded true  InputStream outOfSync getContents CoreException outOfSync outOfSync getContents CoreException outOfSync CoreException IOException PDECore logException pluginBase PluginBase createPluginBase pluginBase setModel
protected void update Time Stamp update Time Stamp file get Location to File  updateTimeStamp updateTimeStamp getLocation toFile
public void save if file null return try String contents get Contents Byte Array Input Stream stream new Byte Array Input Stream contents get Bytes UTF8 NON NLS 1 if file exists file set Contents stream false false null else file create stream false null stream close catch Core Exception e PDE Core log Exception e catch IO Exception e  getContents ByteArrayInputStream ByteArrayInputStream getBytes setContents CoreException PDECore logException IOException
public void save Print Writer writer if is Loaded plugin Base write writer NON NLS 1 dirty false  PrintWriter isLoaded pluginBase
dirty false public void set Build Model I Build Model new Build Model build Model new Build Model  setBuildModel IBuildModel newBuildModel buildModel newBuildModel
build Model new Build Model public void set Dirty boolean dirty this dirty dirty  buildModel newBuildModel setDirty
this dirty dirty public void set Editable boolean new Editable editable new Editable  setEditable newEditable newEditable
editable new Editable public void set File I File new File file new File set Editable new File is Read Only false  newEditable setFile IFile newFile newFile setEditable newFile isReadOnly

Constructor for Required Plugins Classpath Container public Required Plugins Classpath Container I Plugin Model Base model this model model  RequiredPluginsClasspathContainer RequiredPluginsClasspathContainer IPluginModelBase
see org eclipse jdt core I Classpath Container get Classpath Entries public I Classpath Entry get Classpath Entries if model null return new I Classpath Entry 0 if entries null entries Classpath Util Core compute Plugin Entries model entries verify With Attachment Manager entries return entries  IClasspathContainer getClasspathEntries IClasspathEntry getClasspathEntries IClasspathEntry ClasspathUtilCore computePluginEntries verifyWithAttachmentManager
see org eclipse jdt core I Classpath Container get Description public String get Description return PDE Core get Resource String Required Plugins Classpath Container description NON NLS 1  IClasspathContainer getDescription getDescription PDECore getResourceString RequiredPluginsClasspathContainer

Constructor for Required Plugins Initializer public Required Plugins Initializer super  RequiredPluginsInitializer RequiredPluginsInitializer
see org eclipse jdt core Classpath Container Initializer initialize I Path I Java Project public void initialize I Path container Path I Java Project java Project throws Core Exception I Project project java Project get Project Model Entry entry PDE Core get Default get Model Manager find Entry project if entry null Model Entry update Unknown Classpath Container java Project else entry update Classpath Container true false  ClasspathContainerInitializer IPath IJavaProject IPath containerPath IJavaProject javaProject CoreException IProject javaProject getProject ModelEntry PDECore getDefault getModelManager findEntry ModelEntry updateUnknownClasspathContainer javaProject updateClasspathContainer

protected Schema schema public Abstract Schema Descriptor super  AbstractSchemaDescriptor
public I Path get Plugin Relative Path String plugin Id I Path path return null  IPath getPluginRelativePath pluginId IPath
protected Schema create Schema URL url get SchemaURL if url null return null return new Schema this url  createSchema getSchemaURL
public void dispose if schema null schema is Disposed false schema dispose schema null  isDisposed
public I Schema get Schema if schema null load Schema return schema  ISchema getSchema loadSchema
protected void load Schema schema create Schema if schema null schema load  loadSchema createSchema
public void reload if schema null schema reload 
public boolean is Standalone return false  isStandalone
public abstract boolean is Enabled  isEnabled

public static final String P CHOICES choices NON NLS 1 public Choice Restriction I Schema schema super schema   choice   NON NLS 1  P_CHOICES ChoiceRestriction ISchema __choice__
public Choice Restriction Choice Restriction source this source get Schema children new Vector Object choices source get Children for int i 0 i choices length i children add new Schema Enumeration this I Schema Enumeration choices i get Name  ChoiceRestriction ChoiceRestriction getSchema getChildren SchemaEnumeration ISchemaEnumeration getName
public I Schema Simple Type get Base Type return base Type  ISchemaSimpleType getBaseType baseType
public Object get Children if children null Object result new Object children size children copy Into result return result else return new Object 0  getChildren copyInto
public String get Choices As Strings if children null return new String 0 Vector result new Vector for int i 0 i children size i I Schema Enumeration enum I Schema Enumeration children get i result add Element enum get Name String choices new String result size result copy Into choices return choices  getChoicesAsStrings ISchemaEnumeration ISchemaEnumeration addElement getName copyInto
public I Schema Object get Parent if base Type null return base Type get Schema return super get Parent  ISchemaObject getParent baseType baseType getSchema getParent
public boolean is Value Valid java lang Object value if children null return false String svalue value to String for int i 0 i children size i I Schema Enumeration enum I Schema Enumeration children get i if enum get Name equals svalue return true return false  isValueValid toString ISchemaEnumeration ISchemaEnumeration getName
return false public void set Base Type I Schema Simple Type base Type this base Type base Type  setBaseType ISchemaSimpleType baseType baseType baseType
public void set Children Vector children Vector old Value this children this children children if get Parent null get Schema fire Model Object Changed this P CHOICES old Value children  setChildren oldValue getParent getSchema fireModelObjectChanged P_CHOICES oldValue
public String to String if children null return NON NLS 1 String Buffer buffer new String Buffer for int i 0 i children size i Object child children get i if child instanceof I Schema Enumeration I Schema Enumeration enum I Schema Enumeration child if i 0 buffer append NON NLS 1 buffer append enum get Name return buffer to String  toString StringBuffer StringBuffer ISchemaEnumeration ISchemaEnumeration ISchemaEnumeration getName toString
public void write String indent Print Writer writer write Comments writer writer println indent restriction base base Type get Name NON NLS 1 NON NLS 2 for int i 0 i children size i Object child children get i if child instanceof I Schema Enumeration I Schema Enumeration enum I Schema Enumeration child enum write indent Schema INDENT writer writer println indent restriction NON NLS 1  PrintWriter writeComments baseType getName ISchemaEnumeration ISchemaEnumeration ISchemaEnumeration

public abstract class Development Schema Descriptor extends Abstract Schema Descriptor Returns a location of the plug in given the plug in ID The plug in can be either workspace or external this is handled by the model manager public I Path get Plugin Relative Path String plugin Id I Path path Plugin Model Manager manager PDE Core get Default get Model Manager Model Entry entry manager find Entry plugin Id if entry null return null I Plugin Model Base model entry get Active Model if model null return null String location model get Install Location I Path schema Path new Path location append path if schema Path to File exists return schema Path File source File get Source Location File model path if source File null source File exists return new Path source File get Absolute Path return null  DevelopmentSchemaDescriptor AbstractSchemaDescriptor IPath getPluginRelativePath pluginId IPath PluginModelManager PDECore getDefault getModelManager ModelEntry findEntry pluginId IPluginModelBase getActiveModel getInstallLocation IPath schemaPath schemaPath toFile schemaPath sourceFile getSourceLocationFile sourceFile sourceFile sourceFile getAbsolutePath
private File get Source Location File I Plugin Model Base model I Path path Source Location Manager source Manager PDE Core get Default get Source Location Manager return source Manager find Source File model get Plugin Base path  getSourceLocationFile IPluginModelBase IPath SourceLocationManager sourceManager PDECore getDefault getSourceLocationManager sourceManager findSourceFile getPluginBase

private String section Id public Document Section I Schema Object parent String section Id String name super parent name this section Id section Id  sectionId DocumentSection ISchemaObject sectionId sectionId sectionId
this section Id section Id public String get Section Id return section Id  sectionId sectionId getSectionId sectionId
public void write String indent Print Writer writer write Comments writer String indent2 indent Schema INDENT String indent3 indent2 Schema INDENT writer println indent annotation NON NLS 1 writer println indent2 app Info NON NLS 1 writer println indent3 meta section type section Id NON NLS 1 NON NLS 2 writer println indent2 app Info NON NLS 1 writer println indent2 documentation NON NLS 1 writer println indent3 get Writable Description writer println indent2 documentation NON NLS 1 writer println indent annotation NON NLS 1  PrintWriter writeComments appInfo sectionId appInfo getWritableDescription

private boolean dirty public Editable Schema String plugin Id String point Id String name super plugin Id point Id name  EditableSchema pluginId pointId pluginId pointId
super plugin Id point Id name public Editable Schema I Schema Descriptor schema Descriptor java net URL url super schema Descriptor url  pluginId pointId EditableSchema ISchemaDescriptor schemaDescriptor schemaDescriptor
public void fire Model Changed I Model Changed Event event if is Notification Enabled dirty true super fire Model Changed event  fireModelChanged IModelChangedEvent isNotificationEnabled fireModelChanged
super fire Model Changed event public boolean is Dirty return dirty  fireModelChanged isDirty
return dirty public boolean is Editable return true  isEditable
return true public void save Print Writer writer this write writer NON NLS 1 dirty false  PrintWriter
dirty false public void set Dirty boolean new Dirty dirty new Dirty  setDirty newDirty newDirty

private boolean enabled public External Schema Descriptor I Plugin Extension Point info this info info full Id info get Full Id  ExternalSchemaDescriptor IPluginExtensionPoint fullId getFullId
public External Schema Descriptor File file String full Id boolean enabled this file file this full Id full Id this enabled enabled  ExternalSchemaDescriptor fullId fullId fullId
public String get Point Id return full Id  getPointId fullId
private File get Install Location File I Plugin Model Base model info get Plugin Model String install Location model get Install Location File separator return new File install Location info get Schema  getInstallLocationFile IPluginModelBase getPluginModel installLocation getInstallLocation installLocation getSchema
private File get Source Location File Source Location Manager source Manager PDE Core get Default get Source Location Manager return source Manager find Source File info get Plugin Base new Path info get Schema  getSourceLocationFile SourceLocationManager sourceManager PDECore getDefault getSourceLocationManager sourceManager findSourceFile getPluginBase getSchema
public URL get SchemaURL try if file null return new URL file file get Path NON NLS 1 File install File get Install Location File if install File null install File exists return new URL file install File get Path NON NLS 1 File source Location File get Source Location File if source Location File null source Location File exists return new URL file source Location File get Path NON NLS 1 catch MalformedURL Exception e return null  getSchemaURL getPath installFile getInstallLocationFile installFile installFile installFile getPath sourceLocationFile getSourceLocationFile sourceLocationFile sourceLocationFile sourceLocationFile getPath MalformedURLException
public boolean is Enabled return info null info get Plugin Model is Enabled enabled  isEnabled getPluginModel isEnabled

private I File file public File Schema Descriptor I File file this file file  IFile FileSchemaDescriptor IFile
protected Schema create Schema URL url get SchemaURL if url null return null return new Editable Schema this url  createSchema getSchemaURL EditableSchema
return new Editable Schema this url public I File get File return file  EditableSchema IFile getFile
public String get Point Id I Project project file get Project String project Name project get Name String file Name file get Name int dot Loc file Name last Index Of return project Name file Name substring 0 dot Loc NON NLS 1  getPointId IProject getProject projectName getName fileName getName dotLoc fileName lastIndexOf projectName fileName dotLoc
public URL get SchemaURL try return new URL file file get Project get Location remove Last Segments 1 file get Full Path to String return new URL file file get Location toOS String NON NLS 1 catch MalformedURL Exception e return null  getSchemaURL getProject getLocation removeLastSegments getFullPath toString getLocation toOSString MalformedURLException
public boolean is Enabled return true  isEnabled

public Included Schema Descriptor I Schema Descriptor parent String schema Location this parent parent this schema Location schema Location try url computeURL parent parent get SchemaURL schema Location catch MalformedURL Exception e  IncludedSchemaDescriptor ISchemaDescriptor schemaLocation schemaLocation schemaLocation getSchemaURL schemaLocation MalformedURLException
public I File get File if parent instanceof File Schema Descriptor File Schema Descriptor fparent File Schema Descriptor parent I File parent File fparent get File if parent File null return null I Path parent Path parent File get Project Relative Path I Path child Path parent Path remove Last Segments 1 append schema Location return parent File get Project get File child Path return null  IFile getFile FileSchemaDescriptor FileSchemaDescriptor FileSchemaDescriptor IFile parentFile getFile parentFile IPath parentPath parentFile getProjectRelativePath IPath childPath parentPath removeLastSegments schemaLocation parentFile getProject getFile childPath
public static URL computeURL I Plugin Location Provider location Provider URL parentURL String schema Location throws MalformedURL Exception if schema Location starts With schema NON NLS 1 plugin relative location String rem schema Location substring 9 extract plug in ID I Path path new Path rem String plugin Id path segment 0 path path remove First Segments 1 the resulting path is relative to the plug in Use location provider to find the referenced plug in location if location Provider null I Path included Location location Provider get Plugin Relative Path plugin Id path if included Location null return null return new URL parentURL get Protocol parentURL get Host included Location to String else return null else parent relative location I Path path new Path parentURL get Path path path remove Last Segments 1 append schema Location return new URL parentURL get Protocol parentURL get Host path to String  IPluginLocationProvider locationProvider schemaLocation MalformedURLException schemaLocation startsWith schemaLocation IPath pluginId removeFirstSegments locationProvider IPath includedLocation locationProvider getPluginRelativePath pluginId includedLocation getProtocol getHost includedLocation toString IPath getPath removeLastSegments schemaLocation getProtocol getHost toString
see org eclipse pde internal core schema Abstract Schema Descriptor is Enabled public boolean is Enabled return true  AbstractSchemaDescriptor isEnabled isEnabled
see org eclipse pde internal core ischema I Schema Descriptor get Point Id public String get Point Id int dot Loc schema Location last Index Of if dot Loc 1 return schema Location substring 0 dot Loc return null  ISchemaDescriptor getPointId getPointId dotLoc schemaLocation lastIndexOf dotLoc schemaLocation dotLoc
see org eclipse pde internal core ischema I Schema Descriptor get SchemaURL public URL get SchemaURL return url  ISchemaDescriptor getSchemaURL getSchemaURL

private int max Occurs 1 public Repeatable Schema Object I Schema Object parent String name super parent name  maxOccurs RepeatableSchemaObject ISchemaObject
super parent name public int get Max Occurs return max Occurs  getMaxOccurs maxOccurs
return max Occurs public int get Min Occurs return min Occurs  maxOccurs getMinOccurs minOccurs
return min Occurs public boolean is Required return min Occurs 0  minOccurs isRequired minOccurs
return min Occurs 0 public boolean is Unbounded return max Occurs Integer MAX VALUE  minOccurs isUnbounded maxOccurs MAX_VALUE
public void set Max Occurs int new Max Occurs Integer old Value new Integer max Occurs max Occurs new Max Occurs get Schema fire Model Object Changed this P MAX OCCURS old Value new Integer max Occurs  setMaxOccurs newMaxOccurs oldValue maxOccurs maxOccurs newMaxOccurs getSchema fireModelObjectChanged P_MAX_OCCURS oldValue maxOccurs
public void set Min Occurs int new Min Occurs Integer old Value new Integer min Occurs min Occurs new Min Occurs get Schema fire Model Object Changed this P MIN OCCURS old Value new Integer min Occurs  setMinOccurs newMinOccurs oldValue minOccurs minOccurs newMinOccurs getSchema fireModelObjectChanged P_MIN_OCCURS oldValue minOccurs

private int start Line end Line public Schema String plugin Id String point Id String name this plugin Id plugin Id this point Id point Id this name name  startLine endLine pluginId pointId pluginId pluginId pointId pointId
this name name public Schema I Schema Descriptor schema Descriptor URL url this schema Descriptor schema Descriptor this url url  ISchemaDescriptor schemaDescriptor schemaDescriptor schemaDescriptor
public void add Document Section I Document Section doc Section doc Sections add Element doc Section fire Model Changed new Model Changed Event this Model Changed Event INSERT new Object doc Section null  addDocumentSection IDocumentSection docSection docSections addElement docSection fireModelChanged ModelChangedEvent ModelChangedEvent docSection
new Object doc Section null public void add Element I Schema Element element add Element element null  docSection addElement ISchemaElement addElement
public void add Element I Schema Element element I Schema Element after Element int index 1 if after Element null index elements index Of after Element if index 1 elements add index 1 element else elements add element fire Model Changed new Model Changed Event this Model Changed Event INSERT new Object element null  addElement ISchemaElement ISchemaElement afterElement afterElement indexOf afterElement fireModelChanged ModelChangedEvent ModelChangedEvent
public void add Include I Schema Include include if includes null includes new Vector includes add include fire Model Changed new Model Changed Event this Model Changed Event INSERT new Object include null  addInclude ISchemaInclude fireModelChanged ModelChangedEvent ModelChangedEvent
public void remove Include I Schema Include include if includes null return includes remove include fire Model Changed new Model Changed Event this Model Changed Event REMOVE new Object include null  removeInclude ISchemaInclude fireModelChanged ModelChangedEvent ModelChangedEvent
new Object include null public void add Model Changed Listener I Model Changed Listener listener listeners add Element listener  addModelChangedListener IModelChangedListener addElement
private void collect Elements I Schema Compositor compositor Vector result Object children compositor get Children for int i 0 i children length i Object child children i if child instanceof I Schema Compositor collect Elements I Schema Compositor child result else if child instanceof I Schema Object Reference I Schema Object Reference ref I Schema Object Reference child Object referenced ref get Referenced Object if referenced instanceof I Schema Element result add Element referenced  collectElements ISchemaCompositor getChildren ISchemaCompositor collectElements ISchemaCompositor ISchemaObjectReference ISchemaObjectReference ISchemaObjectReference getReferencedObject ISchemaElement addElement
public void dispose if includes null for int i 0 i includes size i I Schema Include include I Schema Include includes get i include dispose reset disposed true  ISchemaInclude ISchemaInclude
public I Schema Element find Element String name if is Loaded load for int i 0 i elements size i I Schema Element element I Schema Element elements element At i if element get Name equals name return element if includes null for int i 0 i includes size i I Schema Include include I Schema Include includes get i I Schema ischema include get Included Schema if ischema null continue I Schema Element element ischema find Element name if element null return element return null  ISchemaElement findElement isLoaded ISchemaElement ISchemaElement elementAt getName ISchemaInclude ISchemaInclude ISchema getIncludedSchema ISchemaElement findElement
public void fire Model Changed I Model Changed Event event if notification Enabled return for Iterator iter listeners iterator iter has Next I Model Changed Listener listener I Model Changed Listener iter next listener model Changed event  fireModelChanged IModelChangedEvent notificationEnabled hasNext IModelChangedListener IModelChangedListener modelChanged
public void fire Model Object Changed Object object String property Object old Value Object new Value fire Model Changed new Model Changed Event this object property old Value new Value  fireModelObjectChanged oldValue newValue fireModelChanged ModelChangedEvent oldValue newValue
private String get Attribute Node node String name Named Node Map map node get Attributes Node att Node map get Named Item name if att Node null String value att Node get Node Value if value length 0 return value return null  getAttribute NamedNodeMap getAttributes attNode getNamedItem attNode attNode getNodeValue
public I Schema Element get Candidate Children I Schema Element element Vector candidates new Vector I Schema Type type element get Type if type instanceof I Schema Complex Type I Schema Compositor compositor I Schema Complex Type type get Compositor if compositor null collect Elements compositor candidates I Schema Element result new I Schema Element candidates size candidates copy Into result return result  ISchemaElement getCandidateChildren ISchemaElement ISchemaType getType ISchemaComplexType ISchemaCompositor ISchemaComplexType getCompositor collectElements ISchemaElement ISchemaElement copyInto
return result public String get Description return description  getDescription
return description public boolean is Valid return valid  isValid
public I Document Section get Document Sections I Document Section result new I Document Section doc Sections size doc Sections copy Into result return result  IDocumentSection getDocumentSections IDocumentSection IDocumentSection docSections docSections copyInto
return result public int get Element Count return elements size  getElementCount
public int get Resolved Element Count int local Count get Element Count if includes null return local Count int total Count local Count for int i 0 i includes size i I Schema Include include I Schema Include includes get i I Schema schema include get Included Schema if schema null continue total Count schema get Resolved Element Count return total Count  getResolvedElementCount localCount getElementCount localCount totalCount localCount ISchemaInclude ISchemaInclude ISchema getIncludedSchema totalCount getResolvedElementCount totalCount
public I Schema Element get Elements if is Loaded load I Schema Element result new I Schema Element elements size elements copy Into result return result  ISchemaElement getElements isLoaded ISchemaElement ISchemaElement copyInto
public I Schema Element get Resolved Elements if includes null return get Elements if is Loaded load Vector result Vector elements clone for int i 0 i includes size i I Schema Include include I Schema Include includes get i I Schema schema include get Included Schema if schema null continue I Schema Element ielements schema get Elements for int j 0 j ielements length j result add ielements j return I Schema Element result to Array new I Schema Element result size  ISchemaElement getResolvedElements getElements isLoaded ISchemaInclude ISchemaInclude ISchema getIncludedSchema ISchemaElement getElements ISchemaElement toArray ISchemaElement
public I Schema Include get Includes if includes null return new I Schema Include 0 return I Schema Include includes to Array new I Schema Include includes size  ISchemaInclude getIncludes ISchemaInclude ISchemaInclude toArray ISchemaInclude
size public String get Name return name  getName
private String get Normalized Text String source String result source replace t result result trim return result boolean skip false String Buffer buff new String Buffer for int i 0 i result length i char c result char At i if c n skip true else if c if skip continue else skip false buff append c return buff to String  getNormalizedText StringBuffer StringBuffer charAt toString
public I Schema Object get Parent return null  ISchemaObject getParent
return null public void set Parent I Schema Object obj  setParent ISchemaObject
public String get Qualified Point Id return schema Descriptor null schema Descriptor get Point Id internal Id return plugin Id point Id NON NLS 1  getQualifiedPointId schemaDescriptor schemaDescriptor getPointId internalId pluginId pointId
return plugin Id point Id NON NLS 1 public String get Plugin Id return plugin Id  pluginId pointId getPluginId pluginId
return plugin Id public String get Point Id return point Id  pluginId getPointId pointId
return point Id public I Schema get Schema return this  pointId ISchema getSchema
return this public I Schema Descriptor get Schema Descriptor return schema Descriptor  ISchemaDescriptor getSchemaDescriptor schemaDescriptor
return schema Descriptor public URL getURL return url  schemaDescriptor
return url public boolean is Disposed return disposed  isDisposed
return disposed public boolean is Editable return false  isEditable
return false public boolean is Loaded return loaded  isLoaded
return loaded public boolean is Notification Enabled return notification Enabled  isNotificationEnabled notificationEnabled
public void load try Input Stream source getURL open Stream load source source close catch File Not Found Exception e loaded false catch IO Exception e PDE Core log Exception e  InputStream openStream FileNotFoundException IOException PDECore logException
public void load Input Stream stream try SAX Parser parser SAX Parser Factory new Instance newSAX Parser XML Default Handler handler new XML Default Handler parser set Property http xml org sax properties lexical handler NON NLS 1 handler parser parse stream handler traverse Document Tree handler get Document Element handler get Line Table catch SAX Exception e ignore parse errors loaded will be false anyway catch Exception e PDE Core log Exception e  InputStream SAXParser SAXParserFactory newInstance newSAXParser XMLDefaultHandler XMLDefaultHandler setProperty traverseDocumentTree getDocumentElement getLineTable SAXException PDECore logException
private I Schema Attribute process Attribute I Schema Element element Node element Node String aname get Attribute element Node name NON NLS 1 String atype get Attribute element Node type NON NLS 1 String ause get Attribute element Node use NON NLS 1 String avalue get Attribute element Node value NON NLS 1 I Schema Simple Type type null if atype null type I Schema Simple Type resolve Type Reference atype Schema Attribute attribute new Schema Attribute element aname attribute bind Source Location element Node line Table attribute add Comments element Node if ause null int use I Schema Attribute OPTIONAL if ause equals required NON NLS 1 use I Schema Attribute REQUIRED else if ause equals optional NON NLS 1 use I Schema Attribute OPTIONAL else if ause equals default NON NLS 1 use I Schema Attribute DEFAULT attribute set Use use if avalue null attribute set Value avalue Node List children element Node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE String tag child get Node Name if tag equals annotation NON NLS 1 process Attribute Annotation attribute child else if tag equals simple Type NON NLS 1 process Attribute Simple Type attribute child if type null attribute get Type null attribute set Type type return attribute  ISchemaAttribute processAttribute ISchemaElement elementNode getAttribute elementNode getAttribute elementNode getAttribute elementNode getAttribute elementNode ISchemaSimpleType ISchemaSimpleType resolveTypeReference SchemaAttribute SchemaAttribute bindSourceLocation elementNode lineTable addComments elementNode ISchemaAttribute ISchemaAttribute ISchemaAttribute ISchemaAttribute setUse setValue NodeList elementNode getChildNodes getLength getNodeType ELEMENT_NODE getNodeName processAttributeAnnotation simpleType processAttributeSimpleType getType setType
private void process Attribute Annotation Schema Attribute element Node node Node List children node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE if child get Node Name equals documentation NON NLS 1 element set Description get Normalized Text child get First Child get Node Value else if child get Node Name equals app Info NON NLS 1 Node List infos child get Child Nodes for int j 0 j infos get Length j Node meta infos item j if meta get Node Type Node ELEMENT NODE if meta get Node Name equals meta attribute NON NLS 1 element set Kind process Kind get Attribute meta kind NON NLS 1 element set Based On get Attribute meta based On NON NLS 1  processAttributeAnnotation SchemaAttribute NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName setDescription getNormalizedText getFirstChild getNodeValue getNodeName appInfo NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName setKind processKind getAttribute setBasedOn getAttribute basedOn
private Schema Simple Type process Attribute Restriction Schema Attribute attribute Node node Node List children node get Child Nodes if children get Length 0 return null String base Name get Attribute node base NON NLS 1 if base Name equals string false NON NLS 1 return new Schema Simple Type attribute get Schema string NON NLS 1 Schema Simple Type type new Schema Simple Type attribute get Schema base Name Vector items new Vector for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE if child get Node Name equals enumeration NON NLS 1 I Schema Enumeration enum process Enumeration attribute get Schema child if enum null items add Element enum Choice Restriction restriction new Choice Restriction attribute get Schema restriction set Children items type set Restriction restriction return type  SchemaSimpleType processAttributeRestriction SchemaAttribute NodeList getChildNodes getLength baseName getAttribute baseName SchemaSimpleType getSchema SchemaSimpleType SchemaSimpleType getSchema baseName getLength getNodeType ELEMENT_NODE getNodeName ISchemaEnumeration processEnumeration getSchema addElement ChoiceRestriction ChoiceRestriction getSchema setChildren setRestriction
private void process Attribute Simple Type Schema Attribute attribute Node node Node List children node get Child Nodes if children get Length 0 return Schema Simple Type type null for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE if child get Node Name equals restriction NON NLS 1 type process Attribute Restriction attribute child if type null attribute set Type type  processAttributeSimpleType SchemaAttribute NodeList getChildNodes getLength SchemaSimpleType getLength getNodeType ELEMENT_NODE getNodeName processAttributeRestriction setType
private Schema Complex Type process Complex Type I Schema Element owner Node type Node String aname get Attribute type Node name NON NLS 1 String amixed get Attribute type Node mixed NON NLS 1 Schema Complex Type complex Type new Schema Complex Type this aname if amixed null amixed equals true NON NLS 1 complex Type set Mixed true Node List children type Node get Child Nodes I Schema Compositor compositor null for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE if child get Node Name equals attribute NON NLS 1 complex Type add Attribute process Attribute owner child else I Schema Object object process Compositor Child owner child I Schema Compositor ROOT if object instanceof I Schema Compositor compositor null compositor I Schema Compositor object complex Type set Compositor compositor return complex Type  SchemaComplexType processComplexType ISchemaElement typeNode getAttribute typeNode getAttribute typeNode SchemaComplexType complexType SchemaComplexType complexType setMixed NodeList typeNode getChildNodes ISchemaCompositor getLength getNodeType ELEMENT_NODE getNodeName complexType addAttribute processAttribute ISchemaObject processCompositorChild ISchemaCompositor ISchemaCompositor ISchemaCompositor complexType setCompositor complexType
private I Schema Compositor process Compositor I Schema Object parent Node node int type Schema Compositor compositor new Schema Compositor parent type compositor add Comments node Node List children node get Child Nodes int min Occurs 1 int max Occurs 1 String amin Occurs get Attribute node min Occurs NON NLS 1 String amax Occurs get Attribute node max Occurs NON NLS 1 if amin Occurs null min Occurs Integer value Of amin Occurs int Value if amax Occurs null if amax Occurs equals unbounded NON NLS 1 max Occurs Integer MAX VALUE else max Occurs Integer value Of amax Occurs int Value compositor set Min Occurs min Occurs compositor set Max Occurs max Occurs for int i 0 i children get Length i Node child children item i I Schema Object object process Compositor Child compositor child type if object null compositor add Child object return compositor  ISchemaCompositor processCompositor ISchemaObject SchemaCompositor SchemaCompositor addComments NodeList getChildNodes minOccurs maxOccurs aminOccurs getAttribute minOccurs amaxOccurs getAttribute maxOccurs aminOccurs minOccurs valueOf aminOccurs intValue amaxOccurs amaxOccurs maxOccurs MAX_VALUE maxOccurs valueOf amaxOccurs intValue setMinOccurs minOccurs setMaxOccurs maxOccurs getLength ISchemaObject processCompositorChild addChild
private I Schema Object process Compositor Child I Schema Object parent Node child int parent Kind String tag child get Node Name if tag equals element NON NLS 1 return process Element parent child sequence element group choice sequence if tag equals sequence parent Kind I Schema Compositor ALL NON NLS 1 return process Compositor parent child I Schema Compositor SEQUENCE choice element group choice sequence if tag equals choice parent Kind I Schema Compositor ALL NON NLS 1 return process Compositor parent child I Schema Compositor CHOICE all element if tag equals all NON NLS 1 parent Kind I Schema Compositor ROOT parent Kind I Schema Compositor GROUP return process Compositor parent child I Schema Compositor ALL group all choice sequence if tag equals group NON NLS 1 parent Kind I Schema Compositor CHOICE parent Kind I Schema Compositor SEQUENCE return process Compositor parent child I Schema Compositor GROUP return null  ISchemaObject processCompositorChild ISchemaObject parentKind getNodeName processElement parentKind ISchemaCompositor processCompositor ISchemaCompositor parentKind ISchemaCompositor processCompositor ISchemaCompositor parentKind ISchemaCompositor parentKind ISchemaCompositor processCompositor ISchemaCompositor parentKind ISchemaCompositor parentKind ISchemaCompositor processCompositor ISchemaCompositor
private I Schema Element process Element I Schema Object parent Node element Node String aname get Attribute element Node name NON NLS 1 String atype get Attribute element Node type NON NLS 1 String aref get Attribute element Node ref NON NLS 1 int min Occurs 1 int max Occurs 1 String amin Occurs get Attribute element Node min Occurs NON NLS 1 String amax Occurs get Attribute element Node max Occurs NON NLS 1 if amin Occurs null min Occurs Integer value Of amin Occurs int Value if amax Occurs null if amax Occurs equals unbounded NON NLS 1 max Occurs Integer MAX VALUE else max Occurs Integer value Of amax Occurs int Value if aref null Reference Schema Element Reference reference new Schema Element Reference I Schema Compositor parent aref reference add Comments element Node reference set Min Occurs min Occurs reference set Max Occurs max Occurs references add Element reference reference bind Source Location element Node line Table return reference I Schema Type type null if atype null type resolve Type Reference atype Schema Element element new Schema Element parent aname element bind Source Location element Node line Table element add Comments element Node element set Min Occurs min Occurs element set Max Occurs max Occurs Node List children element Node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE String tag child get Node Name if type null tag equals complex Type NON NLS 1 type process Complex Type element child if tag equals attribute process Attribute element child else if tag equals annotation NON NLS 1 process Element Annotation element child element set Type type return element  ISchemaElement processElement ISchemaObject elementNode getAttribute elementNode getAttribute elementNode getAttribute elementNode minOccurs maxOccurs aminOccurs getAttribute elementNode minOccurs amaxOccurs getAttribute elementNode maxOccurs aminOccurs minOccurs valueOf aminOccurs intValue amaxOccurs amaxOccurs maxOccurs MAX_VALUE maxOccurs valueOf amaxOccurs intValue SchemaElementReference SchemaElementReference ISchemaCompositor addComments elementNode setMinOccurs minOccurs setMaxOccurs maxOccurs addElement bindSourceLocation elementNode lineTable ISchemaType resolveTypeReference SchemaElement SchemaElement bindSourceLocation elementNode lineTable addComments elementNode setMinOccurs minOccurs setMaxOccurs maxOccurs NodeList elementNode getChildNodes getLength getNodeType ELEMENT_NODE getNodeName complexType processComplexType processAttribute processElementAnnotation setType
private void process Element Annotation Schema Element element Node node Node List children node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE if child get Node Name equals documentation NON NLS 1 element set Description get Normalized Text child get First Child get Node Value else if child get Node Name equals app Info NON NLS 1 Node List infos child get Child Nodes for int j 0 j infos get Length j Node meta infos item j if meta get Node Type Node ELEMENT NODE if meta get Node Name equals meta element NON NLS 1 element set Label Property get Attribute meta label Attribute NON NLS 1 element set Icon Property get Attribute meta icon NON NLS 1 if element get Icon Property null element set Icon Property get Attribute meta icon Name NON NLS 1  processElementAnnotation SchemaElement NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName setDescription getNormalizedText getFirstChild getNodeValue getNodeName appInfo NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName setLabelProperty getAttribute labelAttribute setIconProperty getAttribute getIconProperty setIconProperty getAttribute iconName
private I Schema Enumeration process Enumeration I Schema schema Node node String name get Attribute node value NON NLS 1 Schema Enumeration enum new Schema Enumeration schema name enum bind Source Location node line Table enum add Comments node return enum  ISchemaEnumeration processEnumeration ISchema getAttribute SchemaEnumeration SchemaEnumeration bindSourceLocation lineTable addComments
private int process Kind String name if name null if name equals java NON NLS 1 return Schema Attribute JAVA if name equals resource NON NLS 1 return Schema Attribute RESOURCE return Schema Attribute STRING  processKind SchemaAttribute SchemaAttribute SchemaAttribute
void set Source Location Node node if line Table null return Integer lines Integer line Table get node if lines null start Line lines 0 int Value end Line lines 1 int Value else start Line 1 end Line 1  setSourceLocation lineTable lineTable startLine intValue endLine intValue startLine endLine
public int get Overview Start Line return start Line  getOverviewStartLine startLine
return start Line public int get Overview End Line return end Line  startLine getOverviewEndLine endLine
private void process Schema Annotation Node node Node List children node get Child Nodes String section overview NON NLS 1 String section Name Overview NON NLS 1 for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE if child get Node Name equals documentation NON NLS 1 String text get Normalized Text child get First Child get Node Value if section null if section equals overview NON NLS 1 set Description text set Source Location child else Document Section sec new Document Section this section section Name sec bind Source Location child line Table sec set Description text doc Sections add Element sec else if child get Node Name equals app Info NON NLS 1 Node List infos child get Child Nodes for int j 0 j infos get Length j Node meta infos item j if meta get Node Type Node ELEMENT NODE if meta get Node Name equals meta schema NON NLS 1 section overview NON NLS 1 set Name get Attribute meta name NON NLS 1 plugin Id get Attribute meta plugin NON NLS 1 point Id get Attribute meta id NON NLS 1 valid true else if meta get Node Name equals meta section NON NLS 1 section get Attribute meta type NON NLS 1 section Name get Attribute meta name NON NLS 1 if section Name null section Name section  processSchemaAnnotation NodeList getChildNodes sectionName getLength getNodeType ELEMENT_NODE getNodeName getNormalizedText getFirstChild getNodeValue setDescription setSourceLocation DocumentSection DocumentSection sectionName bindSourceLocation lineTable setDescription docSections addElement getNodeName appInfo NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName setName getAttribute pluginId getAttribute pointId getAttribute getNodeName getAttribute sectionName getAttribute sectionName sectionName
private void process Include Node node String location get Attribute node schema Location NON NLS 1 Schema Include include new Schema Include this location if includes null includes new Vector includes add include  processInclude getAttribute schemaLocation SchemaInclude SchemaInclude
includes add include public void reload reload null 
public void reload Input Stream is set Notification Enabled false reset if is null load is else load set Notification Enabled true if is Loaded fire Model Changed new Model Changed Event this I Model Changed Event WORLD CHANGED new Object 0 null  InputStream setNotificationEnabled setNotificationEnabled isLoaded fireModelChanged ModelChangedEvent IModelChangedEvent WORLD_CHANGED
public void remove Document Section I Document Section doc Section doc Sections remove Element doc Section fire Model Changed new Model Changed Event this Model Changed Event REMOVE new Object doc Section null  removeDocumentSection IDocumentSection docSection docSections removeElement docSection fireModelChanged ModelChangedEvent ModelChangedEvent docSection
public void remove Element I Schema Element element elements remove Element element fire Model Changed new Model Changed Event this Model Changed Event REMOVE new Object element null  removeElement ISchemaElement removeElement fireModelChanged ModelChangedEvent ModelChangedEvent
new Object element null public void remove Model Changed Listener I Model Changed Listener listener listeners remove Element listener  removeModelChangedListener IModelChangedListener removeElement
private void reset line Table null elements new Vector doc Sections new Vector includes null point Id null plugin Id null references null description null name null valid false  lineTable docSections pointId pluginId
private void resolve Element Reference I Schema Object Reference reference I Schema Element element List get Resolved Elements for int i 0 i element List length i I Schema Element element element List i if element instanceof I Schema Object Reference element get Name equals reference get Name Link reference set Referenced Object element break  resolveElementReference ISchemaObjectReference ISchemaElement elementList getResolvedElements elementList ISchemaElement elementList ISchemaObjectReference getName getName setReferencedObject
private void resolve Reference I Schema Object Reference reference Class clazz reference get Referenced Object Class if clazz equals I Schema Element class resolve Element Reference reference  resolveReference ISchemaObjectReference getReferencedObjectClass ISchemaElement resolveElementReference
private void resolve References Vector references for int i 0 i references size i I Schema Object Reference reference I Schema Object Reference references element At i resolve Reference reference  resolveReferences ISchemaObjectReference ISchemaObjectReference elementAt resolveReference
private Schema Type resolve Type Reference String type Name for now create a simple type return new Schema Simple Type this type Name  SchemaType resolveTypeReference typeName SchemaSimpleType typeName
public void set Description String new Description String old Value description description new Description fire Model Object Changed this P DESCRIPTION old Value description  setDescription newDescription oldValue newDescription fireModelObjectChanged P_DESCRIPTION oldValue
public void set Name String new Name if new Name null new Name NON NLS 1 String old Value name name new Name fire Model Object Changed this P NAME old Value name  setName newName newName newName oldValue newName fireModelObjectChanged P_NAME oldValue
public void set Plugin Id String new Id String old Value plugin Id plugin Id new Id fire Model Object Changed this P PLUGIN old Value new Id  setPluginId newId oldValue pluginId pluginId newId fireModelObjectChanged P_PLUGIN oldValue newId
public void set Point Id String new Id String old Value point Id point Id new Id fire Model Object Changed this P POINT old Value new Id  setPointId newId oldValue pointId pointId newId fireModelObjectChanged P_POINT oldValue newId
fire Model Object Changed this P POINT old Value new Id public void set Notification Enabled boolean new Notification Enabled notification Enabled new Notification Enabled  fireModelObjectChanged P_POINT oldValue newId setNotificationEnabled newNotificationEnabled notificationEnabled newNotificationEnabled
notification Enabled new Notification Enabled public String to String return name  notificationEnabled newNotificationEnabled toString
public void traverse Document Tree Node root Hashtable line Table this line Table line Table Node List children root get Child Nodes references new Vector for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE String node Name child get Node Name to Lower Case if node Name equals element NON NLS 1 I Schema Element element process Element this child elements add Element element else if node Name equals annotation NON NLS 1 process Schema Annotation child else if node Name equals include NON NLS 1 process Include child loaded true if references size 0 resolve References references references null this line Table null  traverseDocumentTree lineTable lineTable lineTable NodeList getChildNodes getLength getNodeType ELEMENT_NODE nodeName getNodeName toLowerCase nodeName ISchemaElement processElement addElement nodeName processSchemaAnnotation nodeName processInclude resolveReferences lineTable
this line Table null public void update References For I Schema Element element update References For element I Schema REFRESH RENAME  lineTable updateReferencesFor ISchemaElement updateReferencesFor ISchema REFRESH_RENAME
public void update References For I Schema Element element int kind for int i 0 i elements size i I Schema Element el I Schema Element elements element At i if el equals element continue I Schema Type type el get Type if type instanceof I Schema Complex Type Schema Compositor compositor Schema Compositor I Schema Complex Type type get Compositor if compositor null compositor update References For element kind  updateReferencesFor ISchemaElement ISchemaElement ISchemaElement elementAt ISchemaType getType ISchemaComplexType SchemaCompositor SchemaCompositor ISchemaComplexType getCompositor updateReferencesFor
public void write String indent Print Writer writer String point Id this get Qualified Point Id int loc point Id last Index Of String plugin Id NON NLS 1 if loc 1 plugin Id point Id substring 0 loc point Id point Id substring loc 1 writer println xml version 1 0 encoding UTF 8 NON NLS 1 writer println Schema file written by PDE NON NLS 1 writer println schema target Namespace plugin Id NON NLS 1 NON NLS 2 String indent2 INDENT INDENT String indent3 indent2 INDENT writer println indent annotation NON NLS 1 writer println indent2 app Info NON NLS 1 writer print indent3 meta schema plugin plugin Id NON NLS 1 NON NLS 2 writer print id point Id NON NLS 1 NON NLS 2 writer println name get Name NON NLS 1 NON NLS 2 writer println indent2 app Info NON NLS 1 writer println indent2 documentation NON NLS 1 writer println indent3 Schema Object get Writable Description get Description writer println indent2 documentation NON NLS 1 writer println INDENT annotation NON NLS 1 writer println add includes if defined if includes null for int i 0 i includes size i I Schema Include include I Schema Include includes get i include write INDENT writer writer println add elements for int i 0 i elements size i I Schema Element element I Schema Element elements element At i element write INDENT writer writer println add document sections for int i 0 i doc Sections size i I Document Section section I Document Section doc Sections element At i section write INDENT writer writer println writer println schema NON NLS 1  PrintWriter pointId getQualifiedPointId pointId lastIndexOf pluginId pluginId pointId pointId pointId targetNamespace pluginId appInfo pluginId pointId getName appInfo SchemaObject getWritableDescription getDescription ISchemaInclude ISchemaInclude ISchemaElement ISchemaElement elementAt docSections IDocumentSection IDocumentSection docSections elementAt

public Schema Attribute I Schema Attribute att String new Name super att get Parent new Name kind att get Kind use att get Use value att get Value type new Schema Simple Type att get Type based On att get Based On  SchemaAttribute ISchemaAttribute newName getParent newName getKind getUse getValue SchemaSimpleType getType basedOn getBasedOn
based On att get Based On public Schema Attribute I Schema Object parent String name super parent name  basedOn getBasedOn SchemaAttribute ISchemaObject
super parent name public String get Based On return based On  getBasedOn basedOn
return based On public int get Kind return kind  basedOn getKind
return kind public I Schema Simple Type get Type return type  ISchemaSimpleType getType
return type public int get Use return use  getUse
return use public Object get Value return value  getValue
return value public String get Value Filter return value Filter  getValueFilter valueFilter
public void set Based On String new Based On String old Value based On based On new Based On get Schema fire Model Object Changed this P BASED ON old Value based On verify Properties  setBasedOn newBasedOn oldValue basedOn basedOn newBasedOn getSchema fireModelObjectChanged P_BASED_ON oldValue basedOn verifyProperties
public void set Kind int new Kind Integer old Value new Integer kind kind new Kind get Schema fire Model Object Changed this P KIND old Value new Integer kind verify Properties  setKind newKind oldValue newKind getSchema fireModelObjectChanged P_KIND oldValue verifyProperties
public void set Type I Schema Simple Type new Type Object old Value type type new Type get Schema fire Model Object Changed this P TYPE old Value type verify Properties  setType ISchemaSimpleType newType oldValue newType getSchema fireModelObjectChanged P_TYPE oldValue verifyProperties
public void set Parent I Schema Object obj super set Parent obj if type null type set Schema get Schema  setParent ISchemaObject setParent setSchema getSchema
public void set Use int new Use Integer old Value new Integer use use new Use get Schema fire Model Object Changed this P USE old Value new Integer use verify Properties  setUse newUse oldValue newUse getSchema fireModelObjectChanged P_USE oldValue verifyProperties
public void set Value String value String old Value String this value this value value get Schema fire Model Object Changed this P VALUE old Value value verify Properties  setValue oldValue getSchema fireModelObjectChanged P_VALUE oldValue verifyProperties
public void set Value Filter String value Filter String old Value this value Filter this value Filter value Filter get Schema fire Model Object Changed this P VALUE FILTER old Value value Filter  setValueFilter valueFilter oldValue valueFilter valueFilter valueFilter getSchema fireModelObjectChanged P_VALUE_FILTER oldValue valueFilter
private void verify Properties if verifying return verifying true check if the current combination of properties make sense if kind STRING type must be string and no restriction ensure String Type ensure No Restriction if kind JAVA based On makes no sense set Based On null if type null type get Name equals boolean NON NLS 1 no restriction for boolean ensure No Restriction if use DEFAULT value makes no sense without default use set Value null verifying false  verifyProperties ensureStringType ensureNoRestriction basedOn setBasedOn getName ensureNoRestriction setValue
private void ensure String Type if type null type get Name equals boolean NON NLS 1 set Type new Schema Simple Type get Schema string NON NLS 1  ensureStringType getName setType SchemaSimpleType getSchema
private void ensure No Restriction if type instanceof Schema Simple Type Schema Simple Type type get Restriction null Schema Simple Type simple Type Schema Simple Type type simple Type set Restriction null set Type simple Type  ensureNoRestriction SchemaSimpleType SchemaSimpleType getRestriction SchemaSimpleType simpleType SchemaSimpleType simpleType setRestriction setType simpleType
public void write String indent Print Writer writer write Comments writer boolean annotation false I Schema Simple Type type I Schema Simple Type get Type String type Name type get Name writer print indent writer print attribute name get Name NON NLS 1 NON NLS 2 if type get Restriction null writer print type type Name NON NLS 1 NON NLS 2 String use String null switch get Use case OPTIONAL don t write default setting use String optional break case DEFAULT use String default NON NLS 1 break case REQUIRED use String required NON NLS 1 break if use String null writer print use use String NON NLS 1 NON NLS 2 if value null writer print value value NON NLS 1 NON NLS 2 String documentation get Writable Description if documentation null this get Based On null get Kind STRING Add annotation annotation true writer println NON NLS 1 String ann Indent indent Schema INDENT String indent2 ann Indent Schema INDENT String indent3 indent2 Schema INDENT writer print ann Indent writer println annotation NON NLS 1 if documentation null writer println indent2 documentation NON NLS 1 writer println indent3 documentation writer println indent2 documentation NON NLS 1 if get Based On null get Kind STRING writer println indent2 app Info NON NLS 1 writer print indent3 meta attribute NON NLS 1 String kind Value null switch get Kind case JAVA kind Value java NON NLS 1 break case RESOURCE kind Value resource NON NLS 1 break if kind Value null writer print kind kind Value NON NLS 1 NON NLS 2 if get Based On null writer print based On get Based On NON NLS 1 NON NLS 2 writer println NON NLS 1 writer println indent2 app Info NON NLS 1 writer println ann Indent annotation NON NLS 1 if type get Restriction null type write indent Schema INDENT writer if annotation type get Restriction null writer println indent attribute NON NLS 1 else writer println NON NLS 1  PrintWriter writeComments ISchemaSimpleType ISchemaSimpleType getType typeName getName getName getRestriction typeName useString getUse useString useString useString useString useString getWritableDescription getBasedOn getKind annIndent annIndent annIndent getBasedOn getKind appInfo kindValue getKind kindValue kindValue kindValue kindValue getBasedOn basedOn getBasedOn appInfo annIndent getRestriction getRestriction

private Vector attributes new Vector public Schema Complex Type I Schema schema this schema null  SchemaComplexType ISchema
this schema null public Schema Complex Type I Schema schema String type Name super schema type Name null type Name   anonymous   NON NLS 1  SchemaComplexType ISchema typeName typeName typeName __anonymous__
super schema type Name null type Name   anonymous   NON NLS 1 public void add Attribute I Schema Attribute attribute add Attribute attribute null  typeName typeName __anonymous__ addAttribute ISchemaAttribute addAttribute
public void add Attribute I Schema Attribute attribute I Schema Attribute after Sibling int index 1 if after Sibling null index attributes index Of after Sibling if index 1 attributes add index 1 attribute else attributes add Element attribute get Schema fire Model Changed new Model Changed Event get Schema Model Changed Event INSERT new Object attribute null  addAttribute ISchemaAttribute ISchemaAttribute afterSibling afterSibling indexOf afterSibling addElement getSchema fireModelChanged ModelChangedEvent getSchema ModelChangedEvent
public I Schema Attribute get Attribute String name for int i 0 i attributes size i I Schema Attribute attribute I Schema Attribute attributes element At i if attribute get Name equals name return attribute return null  ISchemaAttribute getAttribute ISchemaAttribute ISchemaAttribute elementAt getName
public int get Attribute Count return attributes size  getAttributeCount
public I Schema Attribute get Attributes I Schema Attribute result new I Schema Attribute attributes size attributes copy Into result return result  ISchemaAttribute getAttributes ISchemaAttribute ISchemaAttribute copyInto
return result public I Schema Compositor get Compositor return compositor  ISchemaCompositor getCompositor
return compositor public boolean is Mixed return mixed  isMixed
public void remove Attribute I Schema Attribute attribute attributes remove Element attribute get Schema fire Model Changed new Model Changed Event get Schema Model Changed Event REMOVE new Object attribute null  removeAttribute ISchemaAttribute removeElement getSchema fireModelChanged ModelChangedEvent getSchema ModelChangedEvent
public void set Compositor I Schema Compositor new Compositor Object old Value compositor compositor new Compositor get Schema fire Model Object Changed this P COMPOSITOR old Value compositor  setCompositor ISchemaCompositor newCompositor oldValue newCompositor getSchema fireModelObjectChanged P_COMPOSITOR oldValue
compositor public void set Mixed boolean new Mixed mixed new Mixed  setMixed newMixed newMixed
public void write String indent Print Writer writer writer println indent complex Type NON NLS 1 String indent2 indent Schema INDENT Schema Compositor compositor Schema Compositor get Compositor if compositor null compositor write indent2 writer for int i 0 i attributes size i I Schema Attribute attribute I Schema Attribute attributes element At i attribute write indent2 writer writer println indent complex Type NON NLS 1  PrintWriter complexType SchemaCompositor SchemaCompositor getCompositor ISchemaAttribute ISchemaAttribute elementAt complexType

public Schema Compositor I Schema Object parent int kind super parent NON NLS 1 this kind kind switch kind case ALL name PDE Core get Resource String Schema Compositor all NON NLS 1 break case CHOICE name PDE Core get Resource String Schema Compositor choice NON NLS 1 break case GROUP name PDE Core get Resource String Schema Compositor group NON NLS 1 break case SEQUENCE name PDE Core get Resource String Schema Compositor sequence NON NLS 1 break  SchemaCompositor ISchemaObject PDECore getResourceString SchemaCompositor PDECore getResourceString SchemaCompositor PDECore getResourceString SchemaCompositor PDECore getResourceString SchemaCompositor
public Schema Compositor I Schema Object parent String id int kind super parent id this kind kind  SchemaCompositor ISchemaObject
public void add Child I Schema Object child children add Element child child set Parent this get Schema fire Model Changed new Model Changed Event get Schema Model Changed Event INSERT new Object child null  addChild ISchemaObject addElement setParent getSchema fireModelChanged ModelChangedEvent getSchema ModelChangedEvent
null public int get Child Count return children size  getChildCount
public I Schema Object get Children I Schema Object result new I Schema Object children size children copy Into result return result  ISchemaObject getChildren ISchemaObject ISchemaObject copyInto
public void set Parent I Schema Object parent super set Parent parent for int i 0 i children size i I Schema Object child I Schema Object children get i child set Parent this  setParent ISchemaObject setParent ISchemaObject ISchemaObject setParent
public int get Kind return kind  getKind
public void remove Child I Schema Object child children remove Element child get Schema fire Model Changed new Model Changed Event get Schema Model Changed Event REMOVE new Object child null  removeChild ISchemaObject removeElement getSchema fireModelChanged ModelChangedEvent getSchema ModelChangedEvent
public void set Kind int kind if this kind kind Integer old Value new Integer this kind this kind kind switch kind case ALL name PDE Core get Resource String Schema Compositor all NON NLS 1 break case CHOICE name PDE Core get Resource String Schema Compositor choice NON NLS 1 break case GROUP name PDE Core get Resource String Schema Compositor group NON NLS 1 break case SEQUENCE name PDE Core get Resource String Schema Compositor sequence NON NLS 1 break get Schema fire Model Object Changed this P KIND old Value new Integer kind  setKind oldValue PDECore getResourceString SchemaCompositor PDECore getResourceString SchemaCompositor PDECore getResourceString SchemaCompositor PDECore getResourceString SchemaCompositor getSchema fireModelObjectChanged P_KIND oldValue
public void update References For I Schema Element element int kind for int i 0 i children size i Object child children element At i if child instanceof Schema Element Reference Schema Element Reference ref Schema Element Reference child String ref Name ref get Reference Name switch kind case I Schema REFRESH ADD if element get Name equals ref Name ref set Referenced Object element get Schema fire Model Object Changed ref null null null break case I Schema REFRESH DELETE if element get Name equals ref Name ref set Referenced Object null get Schema fire Model Object Changed ref null null null break case I Schema REFRESH RENAME Using the object comparison try to resolve and set the name if there is a match This is done to repair the reference when the referenced object s name changes if ref get Referenced Element element ref set Reference Name element get Name Also handle the case where rename will satisfy a previously broken reference else if element get Name equals ref Name ref set Referenced Object element get Schema fire Model Object Changed ref null null null break else Schema Compositor compositor Schema Compositor child compositor update References For element kind  updateReferencesFor ISchemaElement elementAt SchemaElementReference SchemaElementReference SchemaElementReference refName getReferenceName ISchema REFRESH_ADD getName refName setReferencedObject getSchema fireModelObjectChanged ISchema REFRESH_DELETE getName refName setReferencedObject getSchema fireModelObjectChanged ISchema REFRESH_RENAME getReferencedElement setReferenceName getName getName refName setReferencedObject getSchema fireModelObjectChanged SchemaCompositor SchemaCompositor updateReferencesFor
public void write String indent Print Writer writer write Comments writer String tag null switch kind case ALL tag all NON NLS 1 break case CHOICE tag choice NON NLS 1 break case GROUP tag group NON NLS 1 break case SEQUENCE tag sequence NON NLS 1 break if tag null return writer print indent tag NON NLS 1 if get Min Occurs 1 get Max Occurs 1 String min get Min Occurs NON NLS 1 String max get Max Occurs Integer MAX VALUE unbounded NON NLS 1 get Max Occurs NON NLS 1 writer print min Occurs min max Occurs max NON NLS 1 NON NLS 2 NON NLS 3 writer println NON NLS 1 String indent2 indent Schema INDENT for int i 0 i children size i Object obj children element At i if obj instanceof I Writable I Writable obj write indent2 writer writer println indent tag NON NLS 1 NON NLS 2  PrintWriter writeComments getMinOccurs getMaxOccurs getMinOccurs getMaxOccurs MAX_VALUE getMaxOccurs minOccurs maxOccurs elementAt IWritable IWritable

private String icon Name public Schema Element I Schema Object parent String name super parent name  iconName SchemaElement ISchemaObject
private String calculate Child Representation I Schema Object object boolean add Links String child NON NLS 1 if object instanceof I Schema Compositor child calculate Compositor Representation I Schema Compositor object add Links if child equals EMPTY child length 0 NON NLS 1 child child NON NLS 1 NON NLS 2 else child object get Name if add Links child a href e child child a NON NLS 1 NON NLS 2 NON NLS 3 int min Occurs 1 int max Occurs 1 if object instanceof I Schema Repeatable min Occurs I Schema Repeatable object get Min Occurs max Occurs I Schema Repeatable object get Max Occurs if min Occurs 0 if max Occurs 1 child NON NLS 1 else child NON NLS 1 else if min Occurs 1 if max Occurs 1 child NON NLS 1 return child  calculateChildRepresentation ISchemaObject addLinks ISchemaCompositor calculateCompositorRepresentation ISchemaCompositor addLinks getName addLinks minOccurs maxOccurs ISchemaRepeatable minOccurs ISchemaRepeatable getMinOccurs maxOccurs ISchemaRepeatable getMaxOccurs minOccurs maxOccurs minOccurs maxOccurs
private String calculate Compositor Representation I Schema Compositor compositor boolean add Links int kind compositor get Kind I Schema Object children compositor get Children if children length 0 return EMPTY NON NLS 1 String text kind I Schema Compositor GROUP NON NLS 1 NON NLS 2 for int i 0 i children length i I Schema Object object I Schema Object children i String child calculate Child Representation object add Links text child if i children length 1 if kind I Schema Compositor SEQUENCE text NON NLS 1 else if kind I Schema Compositor CHOICE text NON NLS 1 if kind I Schema Compositor GROUP text NON NLS 1 return text  calculateCompositorRepresentation ISchemaCompositor addLinks getKind ISchemaObject getChildren ISchemaCompositor ISchemaObject ISchemaObject calculateChildRepresentation addLinks ISchemaCompositor ISchemaCompositor ISchemaCompositor
public I Schema Attribute get Attribute String name if type null type instanceof I Schema Complex Type return I Schema Complex Type type get Attribute name return null  ISchemaAttribute getAttribute ISchemaComplexType ISchemaComplexType getAttribute
public int get Attribute Count if type null type instanceof I Schema Complex Type return I Schema Complex Type type get Attribute Count return 0  getAttributeCount ISchemaComplexType ISchemaComplexType getAttributeCount
public I Schema Attribute get Attributes if type null type instanceof I Schema Complex Type return I Schema Complex Type type get Attributes return new I Schema Attribute 0  ISchemaAttribute getAttributes ISchemaComplexType ISchemaComplexType getAttributes ISchemaAttribute
public String getDTD Representation boolean add Links String text NON NLS 1 if type null text EMPTY NON NLS 1 else if type instanceof I Schema Complex Type I Schema Complex Type complex Type I Schema Complex Type type I Schema Compositor compositor complex Type get Compositor if compositor null text calculate Child Representation compositor add Links else text EMPTY NON NLS 1 else text CDATA NON NLS 1 if text length 0 if text equals EMPTY text char At 0 NON NLS 1 text text NON NLS 1 NON NLS 2 return text  getDTDRepresentation addLinks ISchemaComplexType ISchemaComplexType complexType ISchemaComplexType ISchemaCompositor complexType getCompositor calculateChildRepresentation addLinks charAt
return text public String get Icon Property return icon Name  getIconProperty iconName
return icon Name public String get Label Property return label Property  iconName getLabelProperty labelProperty
return label Property public I Schema Type get Type return type  labelProperty ISchemaType getType
public void set Parent I Schema Object parent super set Parent parent if type null type set Schema get Schema if type instanceof I Schema Complex Type I Schema Complex Type ctype I Schema Complex Type type I Schema Compositor comp ctype get Compositor if comp null comp set Parent this if get Attribute Count 0 I Schema Attribute atts get Attributes for int i 0 i atts length i I Schema Attribute att atts i att set Parent this  setParent ISchemaObject setParent setSchema getSchema ISchemaComplexType ISchemaComplexType ISchemaComplexType ISchemaCompositor getCompositor setParent getAttributeCount ISchemaAttribute getAttributes ISchemaAttribute setParent
public void set Icon Property String new Icon Name String old Value icon Name icon Name new Icon Name get Schema fire Model Object Changed this P ICON NAME old Value icon Name  setIconProperty newIconName oldValue iconName iconName newIconName getSchema fireModelObjectChanged P_ICON_NAME oldValue iconName
public void set Label Property String label Property String old Value this label Property this label Property label Property get Schema fire Model Object Changed this P LABEL PROPERTY old Value label Property  setLabelProperty labelProperty oldValue labelProperty labelProperty labelProperty getSchema fireModelObjectChanged P_LABEL_PROPERTY oldValue labelProperty
public void set Type I Schema Type new Type Object old Value type type new Type get Schema fire Model Object Changed this P TYPE old Value type  setType ISchemaType newType oldValue newType getSchema fireModelObjectChanged P_TYPE oldValue
public void write String indent Print Writer writer write Comments writer writer print indent element name get Name NON NLS 1 NON NLS 2 I Schema Type type get Type if type instanceof Schema Simple Type writer print type type get Name NON NLS 1 NON NLS 2 writer println NON NLS 1 String indent2 indent Schema INDENT String real Description get Writable Description if real Description length 0 real Description null if real Description null icon Name null label Property null String indent3 indent2 Schema INDENT String indent4 indent3 Schema INDENT writer println indent2 annotation NON NLS 1 if icon Name null label Property null writer println indent3 app Info NON NLS 1 writer print indent4 meta element NON NLS 1 if label Property null writer print label Attribute label Property NON NLS 1 NON NLS 2 if icon Name null writer print icon icon Name NON NLS 1 NON NLS 2 writer println NON NLS 1 writer println indent3 app Info NON NLS 1 if real Description null writer println indent3 documentation NON NLS 1 if get Description null writer println indent4 real Description writer println indent3 documentation NON NLS 1 writer println indent2 annotation NON NLS 1 if type instanceof Schema Complex Type Schema Complex Type complex Type Schema Complex Type type complex Type write indent2 writer writer println indent element NON NLS 1  PrintWriter writeComments getName ISchemaType getType SchemaSimpleType getName realDescription getWritableDescription realDescription realDescription realDescription iconName labelProperty iconName labelProperty appInfo labelProperty labelAttribute labelProperty iconName iconName appInfo realDescription getDescription realDescription SchemaComplexType SchemaComplexType complexType SchemaComplexType complexType

private int range public Schema Element Reference I Schema Compositor compositor String ref reference Name ref this compositor compositor  SchemaElementReference ISchemaCompositor referenceName
this compositor compositor public I Schema Attribute get Attribute String name return get Referenced Element get Attribute name  ISchemaAttribute getAttribute getReferencedElement getAttribute
return get Referenced Element get Attribute name public int get Attribute Count return get Referenced Element get Attribute Count  getReferencedElement getAttribute getAttributeCount getReferencedElement getAttributeCount
return get Referenced Element get Attribute Count public I Schema Attribute get Attributes return get Referenced Element get Attributes  getReferencedElement getAttributeCount ISchemaAttribute getAttributes getReferencedElement getAttributes
return get Referenced Element get Attributes public I Schema Compositor get Compositor return compositor  getReferencedElement getAttributes ISchemaCompositor getCompositor
return compositor public java lang String get Description return get Referenced Element get Description  getDescription getReferencedElement getDescription
return get Referenced Element get Description public String getDTD Representation boolean add Links return get Referenced Element getDTD Representation add Links  getReferencedElement getDescription getDTDRepresentation addLinks getReferencedElement getDTDRepresentation addLinks
public java lang String get Icon Property return get Referenced Element get Icon Property  getIconProperty getReferencedElement getIconProperty
return get Referenced Element get Icon Property public String get Label Property return get Referenced Element get Label Property  getReferencedElement getIconProperty getLabelProperty getReferencedElement getLabelProperty
return get Referenced Element get Label Property public int get Max Occurs return max Occurs  getReferencedElement getLabelProperty getMaxOccurs maxOccurs
return max Occurs public int get Min Occurs return min Occurs  maxOccurs getMinOccurs minOccurs
return min Occurs public String get Name return reference Name  minOccurs getName referenceName
return reference Name public I Schema Object get Parent return compositor  referenceName ISchemaObject getParent
public void set Parent I Schema Object parent  setParent ISchemaObject
protected I Schema Element get Referenced Element return element  ISchemaElement getReferencedElement
return element public I Schema Object get Referenced Object return element  ISchemaObject getReferencedObject
return element public Class get Referenced Object Class return I Schema Element class  getReferencedObjectClass ISchemaElement
return I Schema Element class public String get Reference Name return reference Name  ISchemaElement getReferenceName referenceName
public I Schema get Schema if element null I Schema schema element get Schema if schema null I Schema Descriptor desc schema get Schema Descriptor if desc instanceof Included Schema Descriptor return schema if compositor null return compositor get Schema return null  ISchema getSchema ISchema getSchema ISchemaDescriptor getSchemaDescriptor IncludedSchemaDescriptor getSchema
return null public I Schema Type get Type return get Referenced Element get Type  ISchemaType getType getReferencedElement getType
return get Referenced Element get Type public boolean is Linked return get Referenced Object null  getReferencedElement getType isLinked getReferencedObject
return get Referenced Object null public void set Compositor I Schema Compositor new Compositor compositor new Compositor  getReferencedObject setCompositor ISchemaCompositor newCompositor newCompositor
public void set Max Occurs int new Max Occurs Integer old Value new Integer max Occurs max Occurs new Max Occurs I Schema schema get Schema if schema null schema fire Model Object Changed this P MAX OCCURS old Value new Integer max Occurs  setMaxOccurs newMaxOccurs oldValue maxOccurs maxOccurs newMaxOccurs ISchema getSchema fireModelObjectChanged P_MAX_OCCURS oldValue maxOccurs
public void set Min Occurs int new Min Occurs Integer old Value new Integer min Occurs min Occurs new Min Occurs I Schema schema get Schema if schema null schema fire Model Object Changed this P MIN OCCURS old Value new Integer min Occurs  setMinOccurs newMinOccurs oldValue minOccurs minOccurs newMinOccurs ISchema getSchema fireModelObjectChanged P_MIN_OCCURS oldValue minOccurs
public void set Referenced Object I Schema Object referenced Object if referenced Object instanceof I Schema Element this element I Schema Element referenced Object else this element null  setReferencedObject ISchemaObject referencedObject referencedObject ISchemaElement ISchemaElement referencedObject
public void set Reference Name String name String old Value this reference Name this reference Name name I Schema schema get Schema if schema null schema fire Model Object Changed this P REFERENCE NAME old Value name  setReferenceName oldValue referenceName referenceName ISchema getSchema fireModelObjectChanged P_REFERENCE_NAME oldValue
public void write String indent Print Writer writer write Comments writer writer print indent element NON NLS 1 writer print ref get Reference Name NON NLS 1 NON NLS 2 if get Min Occurs 1 get Max Occurs 1 String min get Min Occurs NON NLS 1 String max get Max Occurs Integer MAX VALUE unbounded NON NLS 1 get Max Occurs NON NLS 1 writer print min Occurs min max Occurs max NON NLS 1 NON NLS 2 NON NLS 3 writer println NON NLS 1  PrintWriter writeComments getReferenceName getMinOccurs getMaxOccurs getMinOccurs getMaxOccurs MAX_VALUE getMaxOccurs minOccurs maxOccurs
public void add Comments Node node comments add Comments node comments  addComments addComments
public Vector add Comments Node node Vector result for Node prev node get Previous Sibling prev null prev prev get Previous Sibling if prev get Node Type Node TEXT NODE continue if prev instanceof Comment String comment prev get Node Value if result null result new Vector result add comment else break return result  addComments getPreviousSibling getPreviousSibling getNodeType TEXT_NODE getNodeValue
void write Comments Print Writer writer write Comments writer comments  writeComments PrintWriter writeComments
void write Comments Print Writer writer Vector source if source null return for int i 0 i source size i String comment String source element At i writer println comment NON NLS 1 NON NLS 2  writeComments PrintWriter elementAt
public int get Start Line return range null 1 range 0  getStartLine
public int get Stop Line return range null 1 range 1  getStopLine
void bind Source Location Node node Hashtable line Table if line Table null return Integer data Integer line Table get node if data null range new int data 0 int Value data 1 int Value  bindSourceLocation lineTable lineTable lineTable intValue intValue

public class Schema Enumeration extends Schema Object implements I Schema Enumeration public Schema Enumeration I Schema Object parent String name super parent name  SchemaEnumeration SchemaObject ISchemaEnumeration SchemaEnumeration ISchemaObject
public void write String indent Print Writer writer write Comments writer writer println indent enumeration value get Name NON NLS 1 NON NLS 2 String description get Description if description null description trim if description null description length 0 String indent2 indent Schema INDENT String indent3 indent2 Schema INDENT writer println indent2 annotation NON NLS 1 writer println indent3 documentation NON NLS 1 writer println indent3 description writer println indent3 documentation NON NLS 1 writer println indent2 annotation NON NLS 1 writer println indent enumeration NON NLS 1  PrintWriter writeComments getName getDescription

private boolean internal public Schema Include I Schema Object parent String location super parent location this location location  SchemaInclude ISchemaObject
see org eclipse pde internal core ischema I Schema Include get Location public String get Location return location  ISchemaInclude getLocation getLocation
see org eclipse pde internal core ischema I Schema Include set Location java lang String public void set Location String location throws Core Exception String old Value String this location this location location included Schema null get Schema fire Model Object Changed this P LOCATION old Value location  ISchemaInclude setLocation setLocation CoreException oldValue includedSchema getSchema fireModelObjectChanged P_LOCATION oldValue
see org eclipse pde core I Writable write java lang String java io Print Writer public void write String indent Print Writer writer writer print indent writer println include schema Location location NON NLS 1 NON NLS 2  IWritable PrintWriter PrintWriter schemaLocation
public I Schema get Included Schema if included Schema null included Schema is Disposed included Schema null if included Schema null load it relative to the parent schema I Schema Descriptor descriptor get Schema get Schema Descriptor if descriptor null descriptor is Standalone included Schema PDE Core get Default get Schema Registry get Included Schema descriptor location internal false else URL url get Schema getURL if url null included Schema create Internal Schema descriptor url location if included Schema null internal true return included Schema  ISchema getIncludedSchema includedSchema includedSchema isDisposed includedSchema includedSchema ISchemaDescriptor getSchema getSchemaDescriptor isStandalone includedSchema PDECore getDefault getSchemaRegistry getIncludedSchema getSchema includedSchema createInternalSchema includedSchema includedSchema
private I Schema create Internal Schema I Plugin Location Provider location Provider URL parentURL String location try URL schemaURL Included Schema Descriptor computeURL location Provider parentURL location Schema ischema new Schema null schemaURL ischema load return ischema catch MalformedURL Exception e return null  ISchema createInternalSchema IPluginLocationProvider locationProvider IncludedSchemaDescriptor locationProvider MalformedURLException
public void dispose if internal included Schema null included Schema is Disposed included Schema dispose included Schema null internal false  includedSchema includedSchema isDisposed includedSchema includedSchema

private int range public Schema Object I Schema Object parent String name this parent parent this name name  SchemaObject ISchemaObject
this name name public String get Description return description  getDescription
return description public java lang String get Name return name  getName
return name public I Schema Object get Parent return parent  ISchemaObject getParent
public void set Parent I Schema Object parent this parent parent  setParent ISchemaObject
public I Schema get Schema I Schema Object object this while object get Parent null object object get Parent return I Schema object  ISchema getSchema ISchemaObject getParent getParent ISchema
return I Schema object public String get Writable Description return get Writable Description get Description  ISchema getWritableDescription getWritableDescription getDescription
public static String get Writable Description String input if input null return NON NLS 1 String result input trim String Buffer buf new String Buffer for int i 0 i result length i char c result char At i switch c case buf append lt NON NLS 1 break case buf append gt NON NLS 1 break case buf append amp NON NLS 1 break case buf append apos NON NLS 1 break case buf append quot NON NLS 1 break default buf append c return buf to String  getWritableDescription StringBuffer StringBuffer charAt toString
public void set Description String new Description String old Value description description new Description get Schema fire Model Object Changed this P DESCRIPTION old Value description  setDescription newDescription oldValue newDescription getSchema fireModelObjectChanged P_DESCRIPTION oldValue
public void set Name String new Name String old Value name name new Name get Schema fire Model Object Changed this P NAME old Value name  setName newName oldValue newName getSchema fireModelObjectChanged P_NAME oldValue
public String to String if name null return name return super to String  toString toString
public void add Comments Node node comments add Comments node comments  addComments addComments
public Vector add Comments Node node Vector result for Node prev node get Previous Sibling prev null prev prev get Previous Sibling if prev get Node Type Node TEXT NODE continue if prev instanceof Comment String comment prev get Node Value if result null result new Vector result add comment else break return result  addComments getPreviousSibling getPreviousSibling getNodeType TEXT_NODE getNodeValue
void write Comments Print Writer writer write Comments writer comments  writeComments PrintWriter writeComments
void write Comments Print Writer writer Vector source if source null return for int i 0 i source size i String comment String source element At i writer println comment NON NLS 1 NON NLS 2  writeComments PrintWriter elementAt
public int get Start Line if range null return 1 return range 0  getStartLine
public int get Stop Line if range null return 1 return range 1  getStopLine
void bind Source Location Node node Hashtable line Table if line Table null return Integer lines Integer line Table get node if lines null range new int lines 0 int Value lines 1 int Value  bindSourceLocation lineTable lineTable lineTable intValue intValue

private Vector dirty Workspace Models public Schema Registry  dirtyWorkspaceModels SchemaRegistry
private void add Extension Point I File file I Project project file get Project I Plugin Model Base model PDE Core get Default get Model Manager find Model project if model null return I Plugin Extension Point points model get Plugin Base get Extension Points if points length 0 return for int i 0 i points length i I Plugin Extension Point point points i I Path path project get Full Path String schema Arg point get Schema if schema Arg null continue path path append schema Arg I File schema File file get Workspace get Root get File path if file equals schema File The extension point is referencing this file and it is now added OK to add the descriptor File Schema Descriptor sd new File Schema Descriptor file workspace Descriptors put point get Full Id sd return  addExtensionPoint IFile IProject getProject IPluginModelBase PDECore getDefault getModelManager findModel IPluginExtensionPoint getPluginBase getExtensionPoints IPluginExtensionPoint IPath getFullPath schemaArg getSchema schemaArg schemaArg IFile schemaFile getWorkspace getRoot getFile schemaFile FileSchemaDescriptor FileSchemaDescriptor workspaceDescriptors getFullId
private Abstract Schema Descriptor get Schema Descriptor String extension Point Id ensure Current Abstract Schema Descriptor descriptor Abstract Schema Descriptor workspace Descriptors get extension Point Id if descriptor null try external descriptor Abstract Schema Descriptor external Descriptors get extension Point Id if descriptor null descriptor is Enabled return descriptor return null  AbstractSchemaDescriptor getSchemaDescriptor extensionPointId ensureCurrent AbstractSchemaDescriptor AbstractSchemaDescriptor workspaceDescriptors extensionPointId AbstractSchemaDescriptor externalDescriptors extensionPointId isEnabled
private void ensure Current if workspace Descriptors null initialize Descriptors if dirty Workspace Models null dirty Workspace Models size 0 update Workspace Descriptors  ensureCurrent workspaceDescriptors initializeDescriptors dirtyWorkspaceModels dirtyWorkspaceModels updateWorkspaceDescriptors
public I Schema get Schema String extension Point Id Abstract Schema Descriptor descriptor get Schema Descriptor extension Point Id if descriptor null return null return descriptor get Schema  ISchema getSchema extensionPointId AbstractSchemaDescriptor getSchemaDescriptor extensionPointId getSchema
public I Schema get Included Schema I Schema Descriptor parent String schema Location ensure Current Hashtable descriptors null if parent instanceof File Schema Descriptor descriptors workspace Descriptors else if parent instanceof External Schema Descriptor descriptors external Descriptors if descriptors null return null try URL url Included Schema Descriptor computeURL parent parent get SchemaURL schema Location String key url to String I Schema Descriptor desc I Schema Descriptor descriptors get key if desc null desc new Included Schema Descriptor parent schema Location descriptors put key desc return desc get Schema catch MalformedURL Exception e return null  ISchema getIncludedSchema ISchemaDescriptor schemaLocation ensureCurrent FileSchemaDescriptor workspaceDescriptors ExternalSchemaDescriptor externalDescriptors IncludedSchemaDescriptor getSchemaURL schemaLocation toString ISchemaDescriptor ISchemaDescriptor IncludedSchemaDescriptor schemaLocation getSchema MalformedURLException
private void initialize Descriptors workspace Descriptors new Hashtable external Descriptors new Hashtable Check workspace plug ins load Workspace Descriptors Check external plug ins load External Descriptors Register for further changes PDE Core get Default get Workspace Model Manager add Model Provider Listener this PDE Core get Workspace add Resource Change Listener this  initializeDescriptors workspaceDescriptors externalDescriptors loadWorkspaceDescriptors loadExternalDescriptors PDECore getDefault getWorkspaceModelManager addModelProviderListener PDECore getWorkspace addResourceChangeListener
private void load External Descriptors External Model Manager registry PDE Core get Default get External Model Manager I Plugin Model Base models registry get All Models for int i 0 i models length i I Plugin Extension Point points models i get Plugin Base get Extension Points for int j 0 j points length j I Plugin Extension Point point points j if point get Schema null External Schema Descriptor desc new External Schema Descriptor point external Descriptors put point get Full Id desc  loadExternalDescriptors ExternalModelManager PDECore getDefault getExternalModelManager IPluginModelBase getAllModels IPluginExtensionPoint getPluginBase getExtensionPoints IPluginExtensionPoint getSchema ExternalSchemaDescriptor ExternalSchemaDescriptor externalDescriptors getFullId
private void load Workspace Descriptor I Plugin Model Base model I Plugin Base plugin Info model get Plugin Base I Plugin Extension Point points plugin Info get Extension Points for int j 0 j points length j I Plugin Extension Point point points j if point get Schema null Object schema File get Schema File point if schema File instanceof I File File Schema Descriptor desc new File Schema Descriptor I File schema File workspace Descriptors put point get Full Id desc else if schema File instanceof File External Schema Descriptor desc new External Schema Descriptor File schema File point get Full Id true workspace Descriptors put point get Full Id desc  loadWorkspaceDescriptor IPluginModelBase IPluginBase pluginInfo getPluginBase IPluginExtensionPoint pluginInfo getExtensionPoints IPluginExtensionPoint getSchema schemaFile getSchemaFile schemaFile IFile FileSchemaDescriptor FileSchemaDescriptor IFile schemaFile workspaceDescriptors getFullId schemaFile ExternalSchemaDescriptor ExternalSchemaDescriptor schemaFile getFullId workspaceDescriptors getFullId
private void load Workspace Descriptors Workspace Model Manager manager PDE Core get Default get Workspace Model Manager I Plugin Model models manager get Plugin Models for int i 0 i models length i I Plugin Model model models i load Workspace Descriptor model I Fragment Model fmodels manager get Fragment Models for int i 0 i fmodels length i I Fragment Model fmodel fmodels i load Workspace Descriptor fmodel  loadWorkspaceDescriptors WorkspaceModelManager PDECore getDefault getWorkspaceModelManager IPluginModel getPluginModels IPluginModel loadWorkspaceDescriptor IFragmentModel getFragmentModels IFragmentModel loadWorkspaceDescriptor
private void load Workspace Descriptors I Plugin Model Base model I Plugin Base plugin Info model get Plugin Base I Plugin Extension Point points plugin Info get Extension Points for int j 0 j points length j I Plugin Extension Point point points j if point get Schema null Object schema File get Schema File point if schema File instanceof I File File Schema Descriptor desc new File Schema Descriptor I File schema File workspace Descriptors put point get Full Id desc else if schema File instanceof File External Schema Descriptor desc new External Schema Descriptor File schema File point get Full Id true workspace Descriptors put point get Full Id desc  loadWorkspaceDescriptors IPluginModelBase IPluginBase pluginInfo getPluginBase IPluginExtensionPoint pluginInfo getExtensionPoints IPluginExtensionPoint getSchema schemaFile getSchemaFile schemaFile IFile FileSchemaDescriptor FileSchemaDescriptor IFile schemaFile workspaceDescriptors getFullId schemaFile ExternalSchemaDescriptor ExternalSchemaDescriptor schemaFile getFullId workspaceDescriptors getFullId
private Object get Schema File I Plugin Extension Point point if point get Schema null return null I Plugin Model Base model point get Plugin Model I File plugin File I File model get Underlying Resource I Path path plugin File get Project get Full Path path path append point get Schema I File schema File plugin File get Workspace get Root get File path if schema File exists return schema File Does not exist in the plug in itself try source location Source Location Manager source Manager PDE Core get Default get Source Location Manager return source Manager find Source File model get Plugin Base new Path point get Schema  getSchemaFile IPluginExtensionPoint getSchema IPluginModelBase getPluginModel IFile pluginFile IFile getUnderlyingResource IPath pluginFile getProject getFullPath getSchema IFile schemaFile pluginFile getWorkspace getRoot getFile schemaFile schemaFile SourceLocationManager sourceManager PDECore getDefault getSourceLocationManager sourceManager findSourceFile getPluginBase getSchema
public void models Changed I Model Provider Event e int type e get Event Types if type I Model Provider Event MODELS ADDED 0 I Model added e get Added Models for int i 0 i added length i I Model model added i if model instanceof I Plugin Model Base continue load Workspace Descriptors I Plugin Model Base model if type I Model Provider Event MODELS REMOVED 0 I Model removed e get Removed Models for int i 0 i removed length i I Model model removed i if model instanceof I Plugin Model Base continue remove Workspace Descriptors I Plugin Model Base model if type I Model Provider Event MODELS CHANGED 0 I Model changed e get Changed Models if dirty Workspace Models null dirty Workspace Models new Vector for int i 0 i changed length i I Model model changed i if model instanceof I Plugin Model Base continue dirty Workspace Models add I Plugin Model Base model  modelsChanged IModelProviderEvent getEventTypes IModelProviderEvent MODELS_ADDED IModel getAddedModels IModel IPluginModelBase loadWorkspaceDescriptors IPluginModelBase IModelProviderEvent MODELS_REMOVED IModel getRemovedModels IModel IPluginModelBase removeWorkspaceDescriptors IPluginModelBase IModelProviderEvent MODELS_CHANGED IModel getChangedModels dirtyWorkspaceModels dirtyWorkspaceModels IModel IPluginModelBase dirtyWorkspaceModels IPluginModelBase
private void remove Extension Point I File file for Enumeration enum workspace Descriptors keys enum has More Elements String key String enum next Element Object desc workspace Descriptors get key if desc instanceof File Schema Descriptor File Schema Descriptor fd File Schema Descriptor desc if fd get File equals file workspace Descriptors remove key fd dispose return if desc instanceof Included Schema Descriptor Included Schema Descriptor id Included Schema Descriptor desc if file equals id get File workspace Descriptors remove key id dispose return  removeExtensionPoint IFile workspaceDescriptors hasMoreElements nextElement workspaceDescriptors FileSchemaDescriptor FileSchemaDescriptor FileSchemaDescriptor getFile workspaceDescriptors IncludedSchemaDescriptor IncludedSchemaDescriptor IncludedSchemaDescriptor getFile workspaceDescriptors
private void remove Workspace Descriptors I Plugin Model Base model I Plugin Base plugin Info model get Plugin Base I Project project model get Underlying Resource get Project I Plugin Extension Point points plugin Info get Extension Points for int i 0 i points length i I Plugin Extension Point point points i Object desc Obj workspace Descriptors get point get Full Id if desc Obj null desc Obj instanceof File Schema Descriptor File Schema Descriptor desc File Schema Descriptor desc Obj I File schema File desc get File if project equals schema File get Project same project remove workspace Descriptors remove point get Full Id Also remove all included descriptors from the same project for Enumeration enum workspace Descriptors keys enum has More Elements String key String enum next Element Object desc workspace Descriptors get key if desc instanceof Included Schema Descriptor Included Schema Descriptor id Included Schema Descriptor desc I File file id get File if file null file get Project equals project workspace Descriptors remove key id dispose  removeWorkspaceDescriptors IPluginModelBase IPluginBase pluginInfo getPluginBase IProject getUnderlyingResource getProject IPluginExtensionPoint pluginInfo getExtensionPoints IPluginExtensionPoint descObj workspaceDescriptors getFullId descObj descObj FileSchemaDescriptor FileSchemaDescriptor FileSchemaDescriptor descObj IFile schemaFile getFile schemaFile getProject workspaceDescriptors getFullId workspaceDescriptors hasMoreElements nextElement workspaceDescriptors IncludedSchemaDescriptor IncludedSchemaDescriptor IncludedSchemaDescriptor IFile getFile getProject workspaceDescriptors
public void resource Changed I Resource Change Event event if event get Type I Resource Change Event POST CHANGE I Resource Delta delta event get Delta if delta null try delta accept this catch Core Exception e PDE Core log Exception e  resourceChanged IResourceChangeEvent getType IResourceChangeEvent POST_CHANGE IResourceDelta getDelta CoreException PDECore logException
public void shutdown if workspace Descriptors null return dispose Descriptors workspace Descriptors dispose Descriptors external Descriptors workspace Descriptors null external Descriptors null dirty Workspace Models null PDE Core get Default get Workspace Model Manager remove Model Provider Listener this PDE Core get Workspace remove Resource Change Listener this  workspaceDescriptors disposeDescriptors workspaceDescriptors disposeDescriptors externalDescriptors workspaceDescriptors externalDescriptors dirtyWorkspaceModels PDECore getDefault getWorkspaceModelManager removeModelProviderListener PDECore getWorkspace removeResourceChangeListener
private void dispose Descriptors Hashtable descriptors for Iterator iter descriptors values iterator iter has Next Abstract Schema Descriptor desc Abstract Schema Descriptor iter next desc dispose descriptors clear  disposeDescriptors hasNext AbstractSchemaDescriptor AbstractSchemaDescriptor
private void update Extension Point I File file for Iterator iter workspace Descriptors values iterator iter has Next Abstract Schema Descriptor sd Abstract Schema Descriptor iter next I File schema File null if sd instanceof File Schema Descriptor schema File File Schema Descriptor sd get File else if sd instanceof Included Schema Descriptor schema File Included Schema Descriptor sd get File if schema File null schema File equals file sd dispose break  updateExtensionPoint IFile workspaceDescriptors hasNext AbstractSchemaDescriptor AbstractSchemaDescriptor IFile schemaFile FileSchemaDescriptor schemaFile FileSchemaDescriptor getFile IncludedSchemaDescriptor schemaFile IncludedSchemaDescriptor getFile schemaFile schemaFile
private void update Workspace Descriptors for int i 0 i dirty Workspace Models size i I Plugin Model Base model I Plugin Model Base dirty Workspace Models element At i update Workspace Descriptors model dirty Workspace Models clear  updateWorkspaceDescriptors dirtyWorkspaceModels IPluginModelBase IPluginModelBase dirtyWorkspaceModels elementAt updateWorkspaceDescriptors dirtyWorkspaceModels
dirty Workspace Models clear private void update Workspace Descriptors I Plugin Model Base model remove Workspace Descriptors model load Workspace Descriptors model  dirtyWorkspaceModels updateWorkspaceDescriptors IPluginModelBase removeWorkspaceDescriptors loadWorkspaceDescriptors
public boolean visit I Resource Delta delta throws Core Exception I Resource resource delta get Resource if resource instanceof I File I File file I File resource String file Name file get Name to Lower Case if file Name ends With exsd file Name ends With mxsd NON NLS 1 NON NLS 2 return true if Workspace Model Manager is Plugin Project file get Project false return true if delta get Kind I Resource Delta CHANGED if I Resource Delta CONTENT delta get Flags 0 update Extension Point file else if delta get Kind I Resource Delta ADDED add Extension Point file else if delta get Kind I Resource Delta REMOVED remove Extension Point file return true  IResourceDelta CoreException IResource getResource IFile IFile IFile fileName getName toLowerCase fileName endsWith fileName endsWith WorkspaceModelManager isPluginProject getProject getKind IResourceDelta IResourceDelta getFlags updateExtensionPoint getKind IResourceDelta addExtensionPoint getKind IResourceDelta removeExtensionPoint

public static final String P RESTRICTION restriction NON NLS 1 public Schema Simple Type I Schema schema String type Name super schema type Name  P_RESTRICTION SchemaSimpleType ISchema typeName typeName
public Schema Simple Type I Schema Simple Type type super type get Schema type get Name I Schema Restriction rest type get Restriction if rest null if rest instanceof Choice Restriction restriction new Choice Restriction Choice Restriction rest restriction set Base Type this  SchemaSimpleType ISchemaSimpleType getSchema getName ISchemaRestriction getRestriction ChoiceRestriction ChoiceRestriction ChoiceRestriction setBaseType
public I Schema Restriction get Restriction return restriction  ISchemaRestriction getRestriction
public void set Schema I Schema schema super set Schema schema if restriction null restriction set Parent schema  setSchema ISchema setSchema setParent
public void set Restriction I Schema Restriction restriction Object old Value this restriction this restriction restriction if restriction null restriction set Base Type this get Schema fire Model Object Changed this P RESTRICTION old Value restriction  setRestriction ISchemaRestriction oldValue setBaseType getSchema fireModelObjectChanged P_RESTRICTION oldValue
public void write String indent Print Writer writer writer println indent simple Type NON NLS 1 if restriction null restriction write indent Schema INDENT writer writer println indent simple Type NON NLS 1  PrintWriter simpleType simpleType

transient private I Schema schema public Schema Type I Schema schema String type Name this schema schema name type Name  ISchema SchemaType ISchema typeName typeName
name type Name public String get Name return name  typeName getName
return name public I Schema get Schema return schema  ISchema getSchema
public void set Schema I Schema schema this schema schema  setSchema ISchema
public String to String return name  toString

private I Storage storage public Storage Schema Descriptor I Storage storage this storage storage  IStorage StorageSchemaDescriptor IStorage
public URL get SchemaURL return null  getSchemaURL
public String get Point Id if schema null return null return schema get Qualified Point Id  getPointId getQualifiedPointId
protected void load Schema schema new Schema this null try Input Stream stream storage get Contents schema load storage get Contents stream close catch Core Exception e PDE Core log Exception e catch IO Exception e PDE Core log Exception e  loadSchema InputStream getContents getContents CoreException PDECore logException IOException PDECore logException
public void reload if schema null schema reload 
public boolean is Enabled return true  isEnabled

class Listener implements I Element Changed Listener public void element Changed Element Changed Event e if e get Type Element Changed Event POST CHANGE handle Delta e get Delta  IElementChangedListener elementChanged ElementChangedEvent getType ElementChangedEvent POST_CHANGE handleDelta getDelta
private String get Proxy Project Name return PROXY PROJECT NAME  getProxyProjectName PROXY_PROJECT_NAME
public Searchable Plugins Manager Plugin Model Manager manager this manager manager element Listener new Listener  SearchablePluginsManager PluginModelManager elementListener
public void initialize initialize Proxy Project if proxy Project null return I Project project proxy Project get Project I File proxy File project get File PROXY FILE NAME initialize States proxy File Java Core add Element Changed Listener element Listener  initializeProxyProject proxyProject IProject proxyProject getProject IFile proxyFile getFile PROXY_FILE_NAME initializeStates proxyFile JavaCore addElementChangedListener elementListener
public void shutdown Java Core remove Element Changed Listener element Listener  JavaCore removeElementChangedListener elementListener
private void initialize Proxy Project I Project project PDE Core get Workspace get Root get Project get Proxy Project Name if project null return proxy Project Java Core create project  initializeProxyProject IProject PDECore getWorkspace getRoot getProject getProxyProjectName proxyProject JavaCore
private void initialize States I File proxy File if proxy File exists false return Properties properties new Properties try Input Stream stream proxy File get Contents true properties load stream stream close String value properties get Property KEY if value null return Array List ids new Array List String Tokenizer stok new String Tokenizer value NON NLS 1 for stok has More Tokens ids add stok next Token initialize States ids catch IO Exception e catch Core Exception e  initializeStates IFile proxyFile proxyFile InputStream proxyFile getContents getProperty ArrayList ArrayList StringTokenizer StringTokenizer hasMoreTokens nextToken initializeStates IOException CoreException
private void initialize States Array List ids for int i 0 i ids size i String id String ids get i Model Entry entry manager find Entry id if entry null entry set In Java Search true  initializeStates ArrayList ModelEntry findEntry setInJavaSearch
public void persist States I Progress Monitor monitor throws Core Exception Model Entry entries manager get Entries String Buffer buffer new String Buffer monitor begin Task PDE Core get Resource String Searchable Plugins Manager saving 3 NON NLS 1 int counter 0 for int i 0 i entries length i Model Entry entry entries i if entry is In Java Search if counter 0 buffer append NON NLS 1 buffer append entry get Id create Proxy Project monitor if proxy Project null return monitor worked 1 I File file proxy Project get Project get File PROXY FILE NAME persist States file buffer to String new Sub Progress Monitor monitor 1 update Classpath Container  persistStates IProgressMonitor CoreException ModelEntry getEntries StringBuffer StringBuffer beginTask PDECore getResourceString SearchablePluginsManager ModelEntry isInJavaSearch getId createProxyProject proxyProject IFile proxyProject getProject getFile PROXY_FILE_NAME persistStates toString SubProgressMonitor updateClasspathContainer
public void update Classpath Container if proxy Project null return try update Classpath Container proxy Project catch Core Exception e PDE Core log Exception e  updateClasspathContainer proxyProject updateClasspathContainer proxyProject CoreException PDECore logException
public void update Classpath Container I Java Project project throws Core Exception I Java Project java Projects new I Java Project project I Classpath Container containers new I Classpath Container get Classpath Container I Path path new Path PDE Core JAVA SEARCH CONTAINER ID try get Classpath Container reset Java Core set Classpath Container path java Projects containers null catch Operation Canceled Exception e get Classpath Container reset throw e  updateClasspathContainer IJavaProject CoreException IJavaProject javaProjects IJavaProject IClasspathContainer IClasspathContainer getClasspathContainer IPath PDECore JAVA_SEARCH_CONTAINER_ID getClasspathContainer JavaCore setClasspathContainer javaProjects OperationCanceledException getClasspathContainer
public External Java Search Classpath Container get Classpath Container if classpath Container null classpath Container new External Java Search Classpath Container this return classpath Container  ExternalJavaSearchClasspathContainer getClasspathContainer classpathContainer classpathContainer ExternalJavaSearchClasspathContainer classpathContainer
public I Classpath Entry compute Container Classpath Entries throws Core Exception Vector result new Vector Model Entry entries manager get Entries for int i 0 i entries length i Model Entry entry entries i Vector entry Result new Vector if entry get Workspace Model null We used to skip workspace models before If we add them as references scoped searches will work according to bug 52667 I Project eproject entry get Workspace Model get Underlying Resource get Project if eproject has Nature Java Core NATURE ID I Classpath Entry pentry Java Core new Project Entry eproject get Full Path entry Result add pentry else if entry is In Java Search false continue I Plugin Model Base model entry get External Model if model null continue Classpath Util Core add Libraries model false entry Result add Unique Entries result entry Result return I Classpath Entry result to Array new I Classpath Entry result size  IClasspathEntry computeContainerClasspathEntries CoreException ModelEntry getEntries ModelEntry entryResult getWorkspaceModel IProject getWorkspaceModel getUnderlyingResource getProject hasNature JavaCore NATURE_ID IClasspathEntry JavaCore newProjectEntry getFullPath entryResult isInJavaSearch IPluginModelBase getExternalModel ClasspathUtilCore addLibraries entryResult addUniqueEntries entryResult IClasspathEntry toArray IClasspathEntry
private void compute Classpath Model Entry entries I Java Project project I Progress Monitor monitor throws Core Exception Array List list new Array List The project has the dynamic classpath container for searchable entries JRE list add Java Core new Container Entry new Path PDE Core JAVA SEARCH CONTAINER ID list add Classpath Util Core createJRE Entry try project set Raw Classpath I Classpath Entry list to Array new I Classpath Entry list size monitor catch Java Model Exception e throw Core Exception e  computeClasspath ModelEntry IJavaProject IProgressMonitor CoreException ArrayList ArrayList JavaCore newContainerEntry PDECore JAVA_SEARCH_CONTAINER_ID ClasspathUtilCore createJREEntry setRawClasspath IClasspathEntry toArray IClasspathEntry JavaModelException throwCoreException
private void add Unique Entries Vector result Vector local Result Vector result Copy Vector result clone for int i 0 i local Result size i I Classpath Entry local Entry I Classpath Entry local Result get i boolean duplicate false for int j 0 j result Copy size j I Classpath Entry entry I Classpath Entry result Copy get j if entry get Entry Kind local Entry get Entry Kind entry get Content Kind local Entry get Content Kind entry get Path equals local Entry get Path duplicate true break if duplicate result add local Entry  addUniqueEntries localResult resultCopy localResult IClasspathEntry localEntry IClasspathEntry localResult resultCopy IClasspathEntry IClasspathEntry resultCopy getEntryKind localEntry getEntryKind getContentKind localEntry getContentKind getPath localEntry getPath localEntry
private void persist States I File file String value I Progress Monitor monitor throws Core Exception Properties properties new Properties properties set Property KEY value try Byte Array Output Stream out Stream new Byte Array Output Stream properties store out Stream NON NLS 1 out Stream flush out Stream close Byte Array Input Stream in Stream new Byte Array Input Stream out Stream to Byte Array if file exists file set Contents in Stream true false monitor else file create in Stream true monitor in Stream close catch IO Exception e throw Core Exception e  persistStates IFile IProgressMonitor CoreException setProperty ByteArrayOutputStream outStream ByteArrayOutputStream outStream outStream outStream ByteArrayInputStream inStream ByteArrayInputStream outStream toByteArray setContents inStream inStream inStream IOException throwCoreException
private void throw Core Exception Throwable e throws Core Exception I Status status new Status I Status ERROR PDE Core PLUGIN ID I Status OK e get Message e throw new Core Exception status  throwCoreException CoreException IStatus IStatus PDECore PLUGIN_ID IStatus getMessage CoreException
private void create Proxy Project I Progress Monitor monitor I Project project PDE Core get Workspace get Root get Project get Proxy Project Name if project exists return monitor begin Task 5 NON NLS 1 try project create new Sub Progress Monitor monitor 1 project open new Sub Progress Monitor monitor 1 Core Utility add Nature To Project project Java Core NATURE ID new Sub Progress Monitor monitor 1 proxy Project Java Core create project proxy Project set Output Location project get Full Path new Sub Progress Monitor monitor 1 compute Classpath manager get Entries proxy Project new Sub Progress Monitor monitor 1 catch Core Exception e  createProxyProject IProgressMonitor IProject PDECore getWorkspace getRoot getProject getProxyProjectName beginTask SubProgressMonitor SubProgressMonitor CoreUtility addNatureToProject JavaCore NATURE_ID SubProgressMonitor proxyProject JavaCore proxyProject setOutputLocation getFullPath SubProgressMonitor computeClasspath getEntries proxyProject SubProgressMonitor CoreException
private boolean handle Delta I Java Element Delta delta Object element delta get Element if element instanceof I Java Model I Java Element Delta project Deltas delta get Affected Children for int i 0 i project Deltas length i if handle Delta project Deltas i break return true if delta get Element instanceof I Java Project I Java Project project I Java Project delta get Element if project equals proxy Project delta get Kind I Java Element Delta REMOVED manager searchable Plugins Removed proxy Project null return true return false  handleDelta IJavaElementDelta getElement IJavaModel IJavaElementDelta projectDeltas getAffectedChildren projectDeltas handleDelta projectDeltas getElement IJavaProject IJavaProject IJavaProject getElement proxyProject getKind IJavaElementDelta searchablePluginsRemoved proxyProject
public Object create Adapter Child File Adapter parent File file if file is Directory false String name file get Name to Lower Case if name ends With jar NON NLS 1 I Package Fragment Root root find Package Fragment Root file get Absolute Path if root null return root return new File Adapter parent file this  createAdapterChild FileAdapter isDirectory getName toLowerCase endsWith IPackageFragmentRoot findPackageFragmentRoot getAbsolutePath FileAdapter
private I Package Fragment Root find Package Fragment Root String absolute Path if proxy Project null return null I Path jar Path new Path absolute Path try I Package Fragment Root roots proxy Project get All Package Fragment Roots for int i 0 i roots length i I Package Fragment Root root roots i I Path path root get Path if path equals jar Path return root catch Java Model Exception e return null  IPackageFragmentRoot findPackageFragmentRoot absolutePath proxyProject IPath jarPath absolutePath IPackageFragmentRoot proxyProject getAllPackageFragmentRoots IPackageFragmentRoot IPath getPath jarPath JavaModelException
public I Java Project get Proxy Project return proxy Project  IJavaProject getProxyProject proxyProject

public interface I Plugin Search Result Collector void accept I Plugin Object match  IPluginSearchResultCollector IPluginObject
void accept I Plugin Object match void done  IPluginObject
void done Plugin Search Operation get Operation  PluginSearchOperation getOperation
Plugin Search Operation get Operation void search Started  PluginSearchOperation getOperation searchStarted
void search Started void set Operation Plugin Search Operation operation  searchStarted setOperation PluginSearchOperation
void set Operation Plugin Search Operation operation void set Progress Monitor I Progress Monitor monitor  setOperation PluginSearchOperation setProgressMonitor IProgressMonitor

private Plugin Search Scope search Scope public String get Search String return search String  PluginSearchScope searchScope getSearchString searchString
public boolean is Case Sensitive return case Sensitive  isCaseSensitive caseSensitive
public void set Case Sensitive boolean value case Sensitive value  setCaseSensitive caseSensitive
public void set Search String String name search String name  setSearchString searchString
public int get Search Element return search Element  getSearchElement searchElement
public void set Search Element int element search Element element  setSearchElement searchElement
public int get Search Limit return search Limit  getSearchLimit searchLimit
public void set Search Limit int limit search Limit limit  setSearchLimit searchLimit
public Plugin Search Scope get Search Scope return search Scope  PluginSearchScope getSearchScope searchScope
public void set Search Scope Plugin Search Scope scope search Scope scope  setSearchScope PluginSearchScope searchScope

public Plugin Search Operation Plugin Search Input input I Plugin Search Result Collector collector this input input this collector collector collector set Operation this this string Matcher new String Matcher input get Search String input is Case Sensitive false  PluginSearchOperation PluginSearchInput IPluginSearchResultCollector setOperation stringMatcher StringMatcher getSearchString isCaseSensitive
public void execute I Progress Monitor monitor I Plugin Model Base entries input get Search Scope get Matching Models collector search Started collector set Progress Monitor monitor monitor begin Task entries length NON NLS 1 try for int i 0 i entries length i I Plugin Model Base candidate entries i visit candidate monitor worked 1 finally monitor done collector done  IProgressMonitor IPluginModelBase getSearchScope getMatchingModels searchStarted setProgressMonitor beginTask IPluginModelBase
private void visit I Plugin Model Base model Array List matches find Match model for int i 0 i matches size i collector accept I Plugin Object matches get i  IPluginModelBase ArrayList findMatch IPluginObject
private Array List find Match I Plugin Model Base model Array List result new Array List int search Limit input get Search Limit switch input get Search Element case Plugin Search Input ELEMENT PLUGIN if search Limit Plugin Search Input LIMIT REFERENCES find Plugin Declaration model result if search Limit Plugin Search Input LIMIT DECLARATIONS find Plugin References model result break case Plugin Search Input ELEMENT FRAGMENT find Fragment Declaration model result break case Plugin Search Input ELEMENT EXTENSION POINT if search Limit Plugin Search Input LIMIT REFERENCES find Extension Point Declarations model result if search Limit Plugin Search Input LIMIT DECLARATIONS find Extension Point References model result break return result  ArrayList findMatch IPluginModelBase ArrayList ArrayList searchLimit getSearchLimit getSearchElement PluginSearchInput ELEMENT_PLUGIN searchLimit PluginSearchInput LIMIT_REFERENCES findPluginDeclaration searchLimit PluginSearchInput LIMIT_DECLARATIONS findPluginReferences PluginSearchInput ELEMENT_FRAGMENT findFragmentDeclaration PluginSearchInput ELEMENT_EXTENSION_POINT searchLimit PluginSearchInput LIMIT_REFERENCES findExtensionPointDeclarations searchLimit PluginSearchInput LIMIT_DECLARATIONS findExtensionPointReferences
private void find Fragment Declaration I Plugin Model Base model Array List result I Plugin Base plugin Base model get Plugin Base if plugin Base instanceof I Fragment string Matcher match plugin Base get Id result add plugin Base  findFragmentDeclaration IPluginModelBase ArrayList IPluginBase pluginBase getPluginBase pluginBase IFragment stringMatcher pluginBase getId pluginBase
private void find Plugin Declaration I Plugin Model Base model Array List result I Plugin Base plugin Base model get Plugin Base if plugin Base instanceof I Plugin string Matcher match plugin Base get Id result add plugin Base  findPluginDeclaration IPluginModelBase ArrayList IPluginBase pluginBase getPluginBase pluginBase IPlugin stringMatcher pluginBase getId pluginBase
private void find Plugin References I Plugin Model Base model Array List result I Plugin Base plugin Base model get Plugin Base if plugin Base instanceof I Fragment if string Matcher match I Fragment plugin Base get Plugin Id result add plugin Base I Plugin Import imports plugin Base get Imports for int i 0 i imports length i if string Matcher match imports i get Id result add imports i  findPluginReferences IPluginModelBase ArrayList IPluginBase pluginBase getPluginBase pluginBase IFragment stringMatcher IFragment pluginBase getPluginId pluginBase IPluginImport pluginBase getImports stringMatcher getId
private void find Extension Point Declarations I Plugin Model Base model Array List result I Plugin Extension Point extension Points model get Plugin Base get Extension Points for int i 0 i extension Points length i if string Matcher match extension Points i get Full Id result add extension Points i  findExtensionPointDeclarations IPluginModelBase ArrayList IPluginExtensionPoint extensionPoints getPluginBase getExtensionPoints extensionPoints stringMatcher extensionPoints getFullId extensionPoints
private void find Extension Point References I Plugin Model Base model Array List result I Plugin Extension extensions model get Plugin Base get Extensions for int i 0 i extensions length i if string Matcher match extensions i get Point result add extensions i  findExtensionPointReferences IPluginModelBase ArrayList IPluginExtension getPluginBase getExtensions stringMatcher getPoint

Create a scope object with the provided arguments param workspace Scope one of SCOPE WORKSPACE SCOPE SELECTION SCOPE WORKING SETS param external Scope one of EXTERNAL SCOPE NONE EXTERNAL SCOPE ENABLED EXTERNAL SCOPE ALL param working Sets goes with SCOPE WORKING SETS otherwise null public Plugin Search Scope int workspace Scope int external Scope Hash Set selected Resources this workspace Scope workspace Scope this external Scope external Scope this selected Resources selected Resources  workspaceScope SCOPE_WORKSPACE SCOPE_SELECTION SCOPE_WORKING_SETS externalScope EXTERNAL_SCOPE_NONE EXTERNAL_SCOPE_ENABLED EXTERNAL_SCOPE_ALL workingSets SCOPE_WORKING_SETS PluginSearchScope workspaceScope externalScope HashSet selectedResources workspaceScope workspaceScope externalScope externalScope selectedResources selectedResources
Creates a default scope object that will return all the entries in the Plugin Search Scope It is equivalent to workspace scope being set to Workspace and external scope being set to Only Enabled public Plugin Search Scope this SCOPE WORKSPACE EXTERNAL SCOPE ENABLED null  PluginSearchScope PluginSearchScope SCOPE_WORKSPACE EXTERNAL_SCOPE_ENABLED
private void add External Model I Plugin Model Base candidate Array List result if external Scope EXTERNAL SCOPE ALL result add candidate else if external Scope EXTERNAL SCOPE ENABLED candidate is Enabled result add candidate  addExternalModel IPluginModelBase ArrayList externalScope EXTERNAL_SCOPE_ALL externalScope EXTERNAL_SCOPE_ENABLED isEnabled
private void add Workspace Model I Plugin Model Base candidate Array List result if workspace Scope SCOPE WORKSPACE result add candidate else if selected Resources contains candidate get Underlying Resource result add candidate  addWorkspaceModel IPluginModelBase ArrayList workspaceScope SCOPE_WORKSPACE selectedResources getUnderlyingResource
public I Plugin Model Base get Matching Models Array List result new Array List Plugin Model Manager model Manager PDE Core get Default get Model Manager Model Entry entries model Manager get Entries for int i 0 i entries length i I Plugin Model Base candidate entries i get Active Model if candidate get Underlying Resource null add Workspace Model candidate result else add External Model candidate result return I Plugin Model Base result to Array new I Plugin Model Base result size  IPluginModelBase getMatchingModels ArrayList ArrayList PluginModelManager modelManager PDECore getDefault getModelManager ModelEntry modelManager getEntries IPluginModelBase getActiveModel getUnderlyingResource addWorkspaceModel addExternalModel IPluginModelBase toArray IPluginModelBase

protected transient Site Build site Build public Abstract Site Build Model  SiteBuild siteBuild AbstractSiteBuildModel
public I Site Build get Site Build if site Build null Site Build s new Site Build s model this this site Build s return site Build  ISiteBuild getSiteBuild siteBuild SiteBuild SiteBuild siteBuild siteBuild
public I Site Build create Site Build Site Build s new Site Build s model this s parent null return s  ISiteBuild createSiteBuild SiteBuild SiteBuild
public I Site Build Feature create Feature Site Build Feature f new Site Build Feature f model this f parent get Site Build return f  ISiteBuildFeature createFeature SiteBuildFeature SiteBuildFeature getSiteBuild
public String get Install Location return null  getInstallLocation
return null public boolean is Editable return true  isEditable
return true public boolean is Enabled return true  isEnabled
public void load Input Stream stream boolean out Of Sync throws Core Exception try SAX Parser parser get Sax Parser XML Default Handler handler new XML Default Handler parser set Property http xml org sax properties lexical handler handler NON NLS 1 parser parse stream handler process Document handler get Document loaded true if out Of Sync update Time Stamp catch Exception e throw Parse Errors Exception e  InputStream outOfSync CoreException SAXParser getSaxParser XMLDefaultHandler XMLDefaultHandler setProperty processDocument getDocument outOfSync updateTimeStamp throwParseErrorsException
private void process Document Document doc Node root Node doc get Document Element if site Build null site Build new Site Build site Build model this else site Build reset site Build parse root Node  processDocument rootNode getDocumentElement siteBuild siteBuild SiteBuild siteBuild siteBuild siteBuild rootNode
public void reload Input Stream stream boolean out Of Sync throws Core Exception if site Build null site Build reset load stream out Of Sync fire Model Changed new Model Changed Event this I Model Changed Event WORLD CHANGED new Object site Build null  InputStream outOfSync CoreException siteBuild siteBuild outOfSync fireModelChanged ModelChangedEvent IModelChangedEvent WORLD_CHANGED siteBuild
null public boolean is Reconciling Model return false  isReconcilingModel

private I Site Build Model site Build Model public Abstract Site Model super  ISiteBuildModel siteBuildModel AbstractSiteModel
public I Site get Site if site null Site s new Site s model this this site s return site  ISite getSite
return site public I Site Build Model get Build Model return site Build Model  ISiteBuildModel getBuildModel siteBuildModel
return site Build Model public void set Build Model I Site Build Model build Model this site Build Model build Model  siteBuildModel setBuildModel ISiteBuildModel buildModel siteBuildModel buildModel
public I Site Model Factory get Factory if factory null factory new Site Model Factory this return factory  ISiteModelFactory getFactory SiteModelFactory
return factory public String get Install Location return null  getInstallLocation
return null public boolean is Editable return true  isEditable
return true public boolean is Enabled return enabled  isEnabled
return enabled public boolean is Valid if is Loaded site null return false return site is Valid  isValid isLoaded isValid
public void load Input Stream stream boolean out Of Sync throws Core Exception try SAX Parser parser get Sax Parser XML Default Handler handler new XML Default Handler Input Source source new Input Source stream URL dtd Location PDE Core get Default get Descriptor get InstallURL source set System Id dtd Location to String parser set Property http xml org sax properties lexical handler handler NON NLS 1 parser parse source handler process Document handler get Document handler get Line Table loaded true if out Of Sync update Time Stamp catch Exception e PDE Core log Exception e  InputStream outOfSync CoreException SAXParser getSaxParser XMLDefaultHandler XMLDefaultHandler InputSource InputSource dtdLocation PDECore getDefault getDescriptor getInstallURL setSystemId dtdLocation toString setProperty processDocument getDocument getLineTable outOfSync updateTimeStamp PDECore logException
private void process Document Document doc Hashtable line Table Node root Node doc get Document Element if site null site new Site site model this else site reset site parse root Node line Table  processDocument lineTable rootNode getDocumentElement rootNode lineTable
public void reload Input Stream stream boolean out Of Sync throws Core Exception if site null site reset load stream out Of Sync fire Model Changed new Model Changed Event this I Model Changed Event WORLD CHANGED new Object site null  InputStream outOfSync CoreException outOfSync fireModelChanged ModelChangedEvent IModelChangedEvent WORLD_CHANGED
null public void set Enabled boolean enabled this enabled enabled  setEnabled
this enabled enabled public boolean is Reconciling Model return false  isReconcilingModel

protected String id public String get Id return id  getId
protected void parse Node node Hashtable line Table super parse node line Table id get Node Attribute node id NON NLS 1  lineTable lineTable getNodeAttribute
public boolean is Valid return id null  isValid
public void set Id String id throws Core Exception ensure Model Editable Object old Value this id this id id fire Property Changed this P ID old Value id  setId CoreException ensureModelEditable oldValue firePropertyChanged P_ID oldValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P ID set Id new Value null new Value to String null else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_ID setId newValue newValue toString restoreProperty oldValue newValue
protected void reset super reset id null 

see org eclipse pde internal core isite I Site set Type java lang String public void set Type String type throws Core Exception ensure Model Editable Object old Value this type this type type fire Property Changed P TYPE old Value type  ISite setType setType CoreException ensureModelEditable oldValue firePropertyChanged P_TYPE oldValue
see org eclipse pde internal core isite I Site get Type public String get Type return type  ISite getType getType
see org eclipse pde internal core isite I Site setURL java net URL public void setURL String url throws Core Exception ensure Model Editable Object old Value this type this url url fire Property Changed P TYPE old Value url  ISite CoreException ensureModelEditable oldValue firePropertyChanged P_TYPE oldValue
see org eclipse pde internal core isite I Site getURL public String getURL return url  ISite
see org eclipse pde internal core isite I Site get Description public I Site Description get Description return description  ISite getDescription ISiteDescription getDescription
see org eclipse pde internal core isite I Site set Description org eclipse pde internal core isite I Site Description public void set Description I Site Description description throws Core Exception ensure Model Editable Object old Value this description this description description fire Property Changed P TYPE old Value description  ISite setDescription ISiteDescription setDescription ISiteDescription CoreException ensureModelEditable oldValue firePropertyChanged P_TYPE oldValue
see org eclipse pde internal core isite I Site add Features org eclipse pde internal core isite I Site Feature public void add Features I Site Feature new Features throws Core Exception ensure Model Editable for int i 0 i new Features length i I Site Feature feature new Features i Site Feature feature set In The Model true features add new Features i fire Structure Changed new Features I Model Changed Event INSERT  ISite addFeatures ISiteFeature addFeatures ISiteFeature newFeatures CoreException ensureModelEditable newFeatures ISiteFeature newFeatures SiteFeature setInTheModel newFeatures fireStructureChanged newFeatures IModelChangedEvent
see org eclipse pde internal core isite I Site add Archives org eclipse pde internal core isite I Site Archive public void add Archives I Site Archive archs throws Core Exception ensure Model Editable for int i 0 i archs length i I Site Archive archive archs i Site Archive archive set In The Model true archives add archs i fire Structure Changed archs I Model Changed Event INSERT  ISite addArchives ISiteArchive addArchives ISiteArchive CoreException ensureModelEditable ISiteArchive SiteArchive setInTheModel fireStructureChanged IModelChangedEvent
see org eclipse pde internal core isite I Site add Category Definitions org eclipse pde internal core isite I Site Category Definition public void add Category Definitions I Site Category Definition defs throws Core Exception ensure Model Editable for int i 0 i defs length i I Site Category Definition def defs i Site Category Definition def set In The Model true category Defs add defs i fire Structure Changed defs I Model Changed Event INSERT  ISite addCategoryDefinitions ISiteCategoryDefinition addCategoryDefinitions ISiteCategoryDefinition CoreException ensureModelEditable ISiteCategoryDefinition SiteCategoryDefinition setInTheModel categoryDefs fireStructureChanged IModelChangedEvent
see org eclipse pde internal core isite I Site remove Features org eclipse pde internal core isite I Site Feature public void remove Features I Site Feature new Features throws Core Exception ensure Model Editable for int i 0 i new Features length i I Site Feature feature new Features i Site Feature feature set In The Model false features remove new Features i fire Structure Changed new Features I Model Changed Event REMOVE  ISite removeFeatures ISiteFeature removeFeatures ISiteFeature newFeatures CoreException ensureModelEditable newFeatures ISiteFeature newFeatures SiteFeature setInTheModel newFeatures fireStructureChanged newFeatures IModelChangedEvent
see org eclipse pde internal core isite I Site remove Archives org eclipse pde internal core isite I Site Archive public void remove Archives I Site Archive archs throws Core Exception ensure Model Editable for int i 0 i archs length i I Site Archive archive archs i Site Archive archive set In The Model false archives remove archs i fire Structure Changed archs I Model Changed Event REMOVE  ISite removeArchives ISiteArchive removeArchives ISiteArchive CoreException ensureModelEditable ISiteArchive SiteArchive setInTheModel fireStructureChanged IModelChangedEvent
see org eclipse pde internal core isite I Site remove Category Definitions org eclipse pde internal core isite I Site Category Definition public void remove Category Definitions I Site Category Definition defs throws Core Exception ensure Model Editable for int i 0 i defs length i I Site Category Definition def defs i Site Category Definition def set In The Model false category Defs remove defs i fire Structure Changed defs I Model Changed Event REMOVE  ISite removeCategoryDefinitions ISiteCategoryDefinition removeCategoryDefinitions ISiteCategoryDefinition CoreException ensureModelEditable ISiteCategoryDefinition SiteCategoryDefinition setInTheModel categoryDefs fireStructureChanged IModelChangedEvent
see org eclipse pde internal core isite I Site get Features public I Site Feature get Features return I Site Feature features to Array new I Site Feature features size  ISite getFeatures ISiteFeature getFeatures ISiteFeature toArray ISiteFeature
see org eclipse pde internal core isite I Site get Archives public I Site Archive get Archives return I Site Archive archives to Array new I Site Archive archives size  ISite getArchives ISiteArchive getArchives ISiteArchive toArray ISiteArchive
see org eclipse pde internal core isite I Site get Category Definitions public I Site Category Definition get Category Definitions return I Site Category Definition category Defs to Array new I Site Category Definition category Defs size  ISite getCategoryDefinitions ISiteCategoryDefinition getCategoryDefinitions ISiteCategoryDefinition categoryDefs toArray ISiteCategoryDefinition categoryDefs
protected void reset archives clear category Defs clear features clear description null type null url null  categoryDefs
protected void parse Node node Hashtable line Table type get Node Attribute node type NON NLS 1 url get Node Attribute node url NON NLS 1 bind Source Location node line Table Node List children node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE parse Child child line Table  lineTable getNodeAttribute getNodeAttribute bindSourceLocation lineTable NodeList getChildNodes getLength getNodeType ELEMENT_NODE parseChild lineTable
protected void parse Child Node child Hashtable line Table String tag child get Node Name to Lower Case if tag equals feature NON NLS 1 I Site Feature feature get Model get Factory create Feature Site Feature feature parse child line Table Site Feature feature set In The Model true features add feature else if tag equals archive NON NLS 1 I Site Archive archive get Model get Factory create Archive Site Archive archive parse child line Table Site Archive archive set In The Model true archives add archive else if tag equals category def NON NLS 1 I Site Category Definition def get Model get Factory create Category Definition Site Category Definition def parse child line Table Site Category Definition def set In The Model true category Defs add def else if tag equals description NON NLS 1 if description null return description get Model get Factory create Description this Site Description description parse child line Table Site Description description set In The Model true  parseChild lineTable getNodeName toLowerCase ISiteFeature getModel getFactory createFeature SiteFeature lineTable SiteFeature setInTheModel ISiteArchive getModel getFactory createArchive SiteArchive lineTable SiteArchive setInTheModel ISiteCategoryDefinition getModel getFactory createCategoryDefinition SiteCategoryDefinition lineTable SiteCategoryDefinition setInTheModel categoryDefs getModel getFactory createDescription SiteDescription lineTable SiteDescription setInTheModel
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P TYPE set Type new Value null new Value to String null else if name equals P URL setURL new Value null new Value to String null else if name equals P DESCRIPTION new Value instanceof I Site Description set Description I Site Description new Value else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_TYPE setType newValue newValue toString P_URL newValue newValue toString P_DESCRIPTION newValue ISiteDescription setDescription ISiteDescription newValue restoreProperty oldValue newValue
public void write String indent Print Writer writer writer print indent site NON NLS 1 String indent2 indent INDENT String indenta indent INDENT INDENT write If Defined indenta writer type get Type NON NLS 1 write If Defined indenta writer url getURL NON NLS 1 writer println NON NLS 1 if description null writer println description write indent2 writer write Children indent2 features writer write Children indent2 archives writer write Children indent2 category Defs writer writer println indent site NON NLS 1  PrintWriter writeIfDefined getType writeIfDefined writeChildren writeChildren writeChildren categoryDefs
public boolean is Valid for int i 0 i features size i I Site Feature feature I Site Feature features get i if feature is Valid return false for int i 0 i archives size i I Site Archive archive I Site Archive archives get i if archive is Valid return false for int i 0 i category Defs size i I Site Category Definition def I Site Category Definition category Defs get i if def is Valid return false return true  isValid ISiteFeature ISiteFeature isValid ISiteArchive ISiteArchive isValid categoryDefs ISiteCategoryDefinition ISiteCategoryDefinition categoryDefs isValid
private void write Children String indent Vector children Print Writer writer for int i 0 i children size i I Writable writable I Writable children get i writable write indent writer  writeChildren PrintWriter IWritable IWritable
private void write If Defined String indent Print Writer writer String att Name String att Value if att Value null return writer println writer print indent att Name att Value NON NLS 1 NON NLS 2  writeIfDefined PrintWriter attName attValue attValue attName attValue

private String path public boolean is Valid return url null path null  isValid
public String getURL return url 
public void setURL String url throws Core Exception ensure Model Editable Object old Value this url this url url fire Property Changed P URL old Value url  CoreException ensureModelEditable oldValue firePropertyChanged P_URL oldValue
fire Property Changed P URL old Value url public String get Path return path  firePropertyChanged P_URL oldValue getPath
public void set Path String path throws Core Exception ensure Model Editable Object old Value this path this path path fire Property Changed P PATH old Value path  setPath CoreException ensureModelEditable oldValue firePropertyChanged P_PATH oldValue
public void reset super reset url null path null 
protected void parse Node node Hashtable line Table super parse node line Table path get Node Attribute node path NON NLS 1 url get Node Attribute node url NON NLS 1 bind Source Location node line Table  lineTable lineTable getNodeAttribute getNodeAttribute bindSourceLocation lineTable
public void write String indent Print Writer writer writer print indent writer print archive NON NLS 1 if path null writer print path path NON NLS 1 NON NLS 2 if url null writer print url url NON NLS 1 NON NLS 2 writer println NON NLS 1  PrintWriter
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P PATH set Path new Value null new Value to String null else if name equals P URL setURL new Value null new Value to String null else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_PATH setPath newValue newValue toString P_URL newValue newValue toString restoreProperty oldValue newValue

see org eclipse pde internal core isite I Site get Type public I Path get Plugin Location return plugin Location  ISite getType IPath getPluginLocation pluginLocation
see org eclipse pde internal core isite I Site get Type public I Path get Feature Location return feature Location  ISite getType IPath getFeatureLocation featureLocation
public void set Autobuild boolean value throws Core Exception ensure Model Editable Object old Value new Boolean this autobuild this autobuild value fire Property Changed P AUTOBUILD old Value new Boolean value  setAutobuild CoreException ensureModelEditable oldValue firePropertyChanged P_AUTOBUILD oldValue
public boolean is Autobuild return autobuild  isAutobuild
public void set Scrub Output boolean value throws Core Exception ensure Model Editable Object old Value new Boolean this scrub Output this scrub Output value fire Property Changed P AUTOBUILD old Value new Boolean value  setScrubOutput CoreException ensureModelEditable oldValue scrubOutput scrubOutput firePropertyChanged P_AUTOBUILD oldValue
public boolean get Scrub Output return scrub Output  getScrubOutput scrubOutput
public void set Show Console boolean value throws Core Exception ensure Model Editable Object old Value new Boolean this use Console this use Console value fire Property Changed P SHOW CONSOLE old Value new Boolean value  setShowConsole CoreException ensureModelEditable oldValue useConsole useConsole firePropertyChanged P_SHOW_CONSOLE oldValue
public boolean get Show Console return use Console  getShowConsole useConsole
see org eclipse pde internal core isite I Site add Features org eclipse pde internal core isite I Site Feature public void add Features I Site Build Feature new Features throws Core Exception ensure Model Editable for int i 0 i new Features length i I Site Build Feature feature new Features i Site Build Feature feature set In The Model true features add new Features i fire Structure Changed new Features I Model Changed Event INSERT  ISite addFeatures ISiteFeature addFeatures ISiteBuildFeature newFeatures CoreException ensureModelEditable newFeatures ISiteBuildFeature newFeatures SiteBuildFeature setInTheModel newFeatures fireStructureChanged newFeatures IModelChangedEvent
see org eclipse pde internal core isite I Site remove Features org eclipse pde internal core isite I Site Feature public void remove Features I Site Build Feature new Features throws Core Exception ensure Model Editable for int i 0 i new Features length i I Site Build Feature feature new Features i Site Build Feature feature set In The Model false features remove new Features i fire Structure Changed new Features I Model Changed Event REMOVE  ISite removeFeatures ISiteFeature removeFeatures ISiteBuildFeature newFeatures CoreException ensureModelEditable newFeatures ISiteBuildFeature newFeatures SiteBuildFeature setInTheModel newFeatures fireStructureChanged newFeatures IModelChangedEvent
see org eclipse pde internal core isite I Site get Features public I Site Build Feature get Features return I Site Build Feature features to Array new I Site Build Feature features size  ISite getFeatures ISiteBuildFeature getFeatures ISiteBuildFeature toArray ISiteBuildFeature
protected void reset features clear use Console false autobuild false scrub Output false  useConsole scrubOutput
protected void parse Node node String value get Node Attribute node plugin location NON NLS 1 autobuild get Boolean Attribute node autobuild NON NLS 1 scrub Output get Boolean Attribute node scrub output NON NLS 1 use Console get Boolean Attribute node use console NON NLS 1 Node List children node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE parse Child child  getNodeAttribute getBooleanAttribute scrubOutput getBooleanAttribute useConsole getBooleanAttribute NodeList getChildNodes getLength getNodeType ELEMENT_NODE parseChild
protected void parse Child Node child String tag child get Node Name to Lower Case if tag equals feature NON NLS 1 I Site Build Feature feature get Model create Feature Site Build Feature feature parse child Site Build Feature feature set In The Model true features add feature  parseChild getNodeName toLowerCase ISiteBuildFeature getModel createFeature SiteBuildFeature SiteBuildFeature setInTheModel
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P AUTOBUILD set Autobuild new Value null Boolean new Value boolean Value false else if name equals P SCRUB OUTPUT set Scrub Output new Value null Boolean new Value boolean Value false else if name equals P SHOW CONSOLE set Show Console new Value null Boolean new Value boolean Value false else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_AUTOBUILD setAutobuild newValue newValue booleanValue P_SCRUB_OUTPUT setScrubOutput newValue newValue booleanValue P_SHOW_CONSOLE setShowConsole newValue newValue booleanValue restoreProperty oldValue newValue
public void write String indent Print Writer writer writer print indent site build NON NLS 1 String indent2 indent INDENT String indenta indent INDENT INDENT write If Defined indenta writer autobuild autobuild true false NON NLS 1 NON NLS 2 NON NLS 3 write If Defined indenta writer scrub output scrub Output true false NON NLS 1 NON NLS 2 NON NLS 3 write If Defined indenta writer use console use Console true false NON NLS 1 NON NLS 2 NON NLS 3 writer println NON NLS 1 write Children indent2 features writer writer println indent site build NON NLS 1  PrintWriter writeIfDefined writeIfDefined scrubOutput writeIfDefined useConsole writeChildren
private void write Children String indent Vector children Print Writer writer for int i 0 i children size i I Writable writable I Writable children get i writable write indent writer  writeChildren PrintWriter IWritable IWritable
public void reset References for int i 0 i features size i I Site Build Feature sbfeature I Site Build Feature features get i sbfeature set Referenced Feature null  resetReferences ISiteBuildFeature ISiteBuildFeature setReferencedFeature
private void write If Defined String indent Print Writer writer String att Name String att Value if att Value null return writer println writer print indent att Name att Value NON NLS 1 NON NLS 2  writeIfDefined PrintWriter attName attValue attValue attName attValue

see org eclipse pde internal core isite I Site Feature get Type public String get Id return id  ISiteFeature getType getId
see org eclipse pde internal core isite I Site Feature getURL public String get Version return version  ISiteFeature getVersion
see org eclipse pde internal core isite I Site Feature set Type java lang String public void set Id String id throws Core Exception ensure Model Editable Object old Value this id this id id fire Property Changed P ID old Value id  ISiteFeature setType setId CoreException ensureModelEditable oldValue firePropertyChanged P_ID oldValue
public void set Version String version throws Core Exception ensure Model Editable Object old Value this version this version version fire Property Changed P VERSION old Value version  setVersion CoreException ensureModelEditable oldValue firePropertyChanged P_VERSION oldValue
protected void parse Node node id get Node Attribute node id NON NLS 1 version get Node Attribute node version NON NLS 1  getNodeAttribute getNodeAttribute
public I Feature get Referenced Feature if feature null Workspace Model Manager manager PDE Core get Default get Workspace Model Manager I Feature Model models manager get Feature Models for int i 0 i models length i I Feature Model model models i I Feature feature model get Feature if feature get Id equals id feature get Version equals version this feature feature break look it up return feature  IFeature getReferencedFeature WorkspaceModelManager PDECore getDefault getWorkspaceModelManager IFeatureModel getFeatureModels IFeatureModel IFeature getFeature getId getVersion
public void set Referenced Feature I Feature feature this feature feature if feature null id feature get Id version feature get Version  setReferencedFeature IFeature getId getVersion
protected void reset id null version null feature null 
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P ID set Id new Value null new Value to String null else if name equals P VERSION set Version new Value null new Value to String null else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_ID setId newValue newValue toString P_VERSION setVersion newValue newValue toString restoreProperty oldValue newValue
see org eclipse pde core I Writable write java lang String java io Print Writer public void write String indent Print Writer writer writer print indent writer print feature NON NLS 1 if id null writer print id id NON NLS 1 NON NLS 2 if version null writer print version version NON NLS 1 NON NLS 2 writer println NON NLS 1  IWritable PrintWriter PrintWriter
public String get TargetURL I Site Build site Build get Site Build I Path feature Location site Build get Feature Location String jar id   version jar NON NLS 1 NON NLS 2 return feature Location append jar to String  getTargetURL ISiteBuild siteBuild getSiteBuild IPath featureLocation siteBuild getFeatureLocation _ featureLocation toString

boolean in The Model void set In The Model boolean value in The Model value  inTheModel setInTheModel inTheModel
public boolean is In The Model return in The Model  isInTheModel inTheModel
protected void ensure Model Editable throws Core Exception if model is Editable throw Core Exception PDE Core get Resource String Site Build Object read Only Exception NON NLS 1  ensureModelEditable CoreException isEditable throwCoreException PDECore getResourceString SiteBuildObject readOnlyException
protected void fire Property Changed String property Object old Value Object new Value fire Property Changed this property old Value new Value  firePropertyChanged oldValue newValue firePropertyChanged oldValue newValue
protected void fire Property Changed I Site Build Object object String property Object old Value Object new Value if model is Editable model instanceof I Model Change Provider I Model Change Provider provider I Model Change Provider model provider fire Model Object Changed object property old Value new Value  firePropertyChanged ISiteBuildObject oldValue newValue isEditable IModelChangeProvider IModelChangeProvider IModelChangeProvider fireModelObjectChanged oldValue newValue
protected void fire Structure Changed I Site Build Object child int change Type fire Structure Changed new I Site Build Object child change Type  fireStructureChanged ISiteBuildObject changeType fireStructureChanged ISiteBuildObject changeType
protected void fire Structure Changed I Site Build Object children int change Type I Site Build Model model get Model if model is Editable model instanceof I Model Change Provider I Model Change Provider provider I Model Change Provider model provider fire Model Changed new Model Changed Event provider change Type children null  fireStructureChanged ISiteBuildObject changeType ISiteBuildModel getModel isEditable IModelChangeProvider IModelChangeProvider IModelChangeProvider fireModelChanged ModelChangedEvent changeType
public I Site Build get Site Build return model get Site Build  ISiteBuild getSiteBuild getSiteBuild
public I Site Build Model get Model return model  ISiteBuildModel getModel
String get Node Attribute Node node String name Named Node Map atts node get Attributes Node attribute null if atts null attribute atts get Named Item name if attribute null return attribute get Node Value return null  getNodeAttribute NamedNodeMap getAttributes getNamedItem getNodeValue
int get Integer Attribute Node node String name String value get Node Attribute node name if value null try return Integer parse Int value catch Number Format Exception e return 0  getIntegerAttribute getNodeAttribute parseInt NumberFormatException
boolean get Boolean Attribute Node node String name String value get Node Attribute node name if value null return value equals Ignore Case true NON NLS 1 return false  getBooleanAttribute getNodeAttribute equalsIgnoreCase
public I Site Build Object get Parent return parent  ISiteBuildObject getParent
protected void reset 
protected void throw Core Exception String message throws Core Exception Status status new Status I Status ERROR PDE Core get Plugin Id I Status OK message null throw new Core Exception status  throwCoreException CoreException IStatus PDECore getPluginId IStatus CoreException
public static String get Writable String String source if source null return NON NLS 1 String Buffer buf new String Buffer for int i 0 i source length i char c source char At i switch c case buf append amp NON NLS 1 break case buf append lt NON NLS 1 break case buf append gt NON NLS 1 break case buf append apos NON NLS 1 break case buf append quot NON NLS 1 break default buf append c break return buf to String  getWritableString StringBuffer StringBuffer charAt toString
public void restore Property String name Object old Value Object new Value throws Core Exception  restoreProperty oldValue newValue CoreException
public void write String indent Print Writer writer  PrintWriter
public void set Model I Site Build Model model this model model  setModel ISiteBuildModel
public void set Parent I Site Build Object parent this parent parent  setParent ISiteBuildObject

private String name see org eclipse pde internal core isite I Site Category get Name public String get Name return name  ISiteCategory getName getName
public boolean is Valid return name null  isValid
protected void parse Node node Hashtable line Table name get Node Attribute node name NON NLS 1 bind Source Location node line Table  lineTable getNodeAttribute bindSourceLocation lineTable
protected void reset name null 
see org eclipse pde internal core isite I Site Category set Name java lang String public void set Name String name throws Core Exception ensure Model Editable Object old Value this name this name name fire Property Changed P NAME old Value name  ISiteCategory setName setName CoreException ensureModelEditable oldValue firePropertyChanged P_NAME oldValue
public void write String indent Print Writer writer writer print indent writer print category NON NLS 1 if name null writer print name name NON NLS 1 NON NLS 2 writer println NON NLS 1  PrintWriter
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P NAME set Name new Value null new Value to String null else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_NAME setName newValue newValue toString restoreProperty oldValue newValue
public I Site Category Definition get Definition I Site site get Site I Site Category Definition definitions site get Category Definitions for int i 0 i definitions length i I Site Category Definition def definitions i if def get Name equals get Name return def return null  ISiteCategoryDefinition getDefinition ISite getSite ISiteCategoryDefinition getCategoryDefinitions ISiteCategoryDefinition getName getName

see org eclipse pde internal core isite I Site Category Definition get Name public String get Name return name  ISiteCategoryDefinition getName getName
public boolean is Valid return name null get Label null  isValid getLabel
see org eclipse pde internal core isite I Site Category Definition set Name java lang String public void set Name String name throws Core Exception ensure Model Editable Object old Value this name this name name fire Property Changed P NAME old Value name  ISiteCategoryDefinition setName setName CoreException ensureModelEditable oldValue firePropertyChanged P_NAME oldValue
see org eclipse pde internal core isite I Site Category Definition get Description public I Site Description get Description return description  ISiteCategoryDefinition getDescription ISiteDescription getDescription
see org eclipse pde internal core isite I Site Category Definition set Description org eclipse pde internal core isite I Site Description public void set Description I Site Description description throws Core Exception ensure Model Editable Object old Value this description this description description fire Property Changed P DESCRIPTION old Value description  ISiteCategoryDefinition setDescription ISiteDescription setDescription ISiteDescription CoreException ensureModelEditable oldValue firePropertyChanged P_DESCRIPTION oldValue
protected void reset super reset name null description null 
protected void parse Node node Hashtable line Table super parse node line Table bind Source Location node line Table name get Node Attribute node name NON NLS 1 Node List children node get Child Nodes for int i 0 i children get Length i Node child Node children item i if child get Node Type Node ELEMENT NODE child get Node Name equals Ignore Case description NON NLS 1 description get Model get Factory create Description this Site Description description parse child line Table Site Description description set In The Model true break  lineTable lineTable bindSourceLocation lineTable getNodeAttribute NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName equalsIgnoreCase getModel getFactory createDescription SiteDescription lineTable SiteDescription setInTheModel
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P NAME set Name new Value null new Value to String null else if name equals P DESCRIPTION new Value instanceof I Site Description set Description I Site Description new Value else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_NAME setName newValue newValue toString P_DESCRIPTION newValue ISiteDescription setDescription ISiteDescription newValue restoreProperty oldValue newValue
public void write String indent Print Writer writer writer print indent writer print category def NON NLS 1 if name null writer print name name NON NLS 1 NON NLS 2 if label null writer print label label NON NLS 1 NON NLS 2 if description null writer println NON NLS 1 description write indent Site INDENT writer writer println indent category def NON NLS 1 else writer println NON NLS 1  PrintWriter

see org eclipse pde internal core isite I Site Description getURL public String getURL return url  ISiteDescription
see org eclipse pde internal core isite I Site Description get Text public String get Text return text  ISiteDescription getText getText
see org eclipse pde internal core isite I Site Description setURL java net URL public void setURL String url throws Core Exception ensure Model Editable Object old Value this url this url url fire Property Changed P URL old Value url  ISiteDescription CoreException ensureModelEditable oldValue firePropertyChanged P_URL oldValue
see org eclipse pde internal core isite I Site Description set Text java lang String public void set Text String text throws Core Exception ensure Model Editable Object old Value this text this text text fire Property Changed P TEXT old Value text  ISiteDescription setText setText CoreException ensureModelEditable oldValue firePropertyChanged P_TEXT oldValue
protected void reset url null text null 
protected void parse Node node Hashtable line Table url get Node Attribute node url NON NLS 1 bind Source Location node line Table Node List children node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node TEXT NODE Node first Child node get First Child if first Child null text get Normalized Text first Child get Node Value break  lineTable getNodeAttribute bindSourceLocation lineTable NodeList getChildNodes getLength getNodeType TEXT_NODE firstChild getFirstChild firstChild getNormalizedText firstChild getNodeValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P URL setURL new Value null new Value to String null else if name equals P TEXT set Text new Value null new Value to String null else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_URL newValue newValue toString P_TEXT setText newValue newValue toString restoreProperty oldValue newValue
public void write String indent Print Writer writer writer print indent writer print description NON NLS 1 if url null writer print url url NON NLS 1 NON NLS 2 writer println NON NLS 1 if text null writer println indent Site INDENT get Normalized Text text writer println indent description NON NLS 1  PrintWriter getNormalizedText
writer println indent description NON NLS 1 public boolean is Valid return true  isValid

public boolean is Valid if f Url null return false for int i 0 i f Categories size i I Site Category category I Site Category f Categories get i if category is Valid return false return true  isValid fUrl fCategories ISiteCategory ISiteCategory fCategories isValid
see org eclipse pde internal core isite I Site Feature add Categories org eclipse pde internal core isite I Site Category public void add Categories I Site Category new Categories throws Core Exception ensure Model Editable for int i 0 i new Categories length i I Site Category category new Categories i Site Category category set In The Model true f Categories add new Categories i fire Structure Changed new Categories I Model Changed Event INSERT  ISiteFeature addCategories ISiteCategory addCategories ISiteCategory newCategories CoreException ensureModelEditable newCategories ISiteCategory newCategories SiteCategory setInTheModel fCategories newCategories fireStructureChanged newCategories IModelChangedEvent
see org eclipse pde internal core isite I Site Feature remove Categories org eclipse pde internal core isite I Site Category public void remove Categories I Site Category new Categories throws Core Exception ensure Model Editable for int i 0 i new Categories length i I Site Category category new Categories i Site Category category set In The Model false f Categories remove new Categories i fire Structure Changed new Categories I Model Changed Event REMOVE  ISiteFeature removeCategories ISiteCategory removeCategories ISiteCategory newCategories CoreException ensureModelEditable newCategories ISiteCategory newCategories SiteCategory setInTheModel fCategories newCategories fireStructureChanged newCategories IModelChangedEvent
see org eclipse pde internal core isite I Site Feature get Categories public I Site Category get Categories return I Site Category f Categories to Array new I Site Category f Categories size  ISiteFeature getCategories ISiteCategory getCategories ISiteCategory fCategories toArray ISiteCategory fCategories
see org eclipse pde internal core isite I Site Feature get Type public String get Type return f Type  ISiteFeature getType getType fType
see org eclipse pde internal core isite I Site Feature getURL public String getURL return f Url  ISiteFeature fUrl
see org eclipse pde internal core isite I Site Feature set Type java lang String public void set Type String type throws Core Exception ensure Model Editable Object old Value this f Type this f Type type fire Property Changed P TYPE old Value f Type  ISiteFeature setType setType CoreException ensureModelEditable oldValue fType fType firePropertyChanged P_TYPE oldValue fType
see org eclipse pde internal core isite I Site Feature setURL java net URL public void setURL String url throws Core Exception ensure Model Editable Object old Value this f Url this f Url url fire Property Changed P TYPE old Value url  ISiteFeature CoreException ensureModelEditable oldValue fUrl fUrl firePropertyChanged P_TYPE oldValue
protected void parse Node node Hashtable line Table super parse node line Table bind Source Location node line Table f Type get Node Attribute node type NON NLS 1 f Url get Node Attribute node url NON NLS 1 fOS get Node Attribute node os NON NLS 1 fNL get Node Attribute node nl NON NLS 1 fWS get Node Attribute node ws NON NLS 1 f Arch get Node Attribute node arch NON NLS 1 String value get Node Attribute node patch NON NLS 1 f Is Patch value null value equals true NON NLS 1 Node List children node get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node ELEMENT NODE child get Node Name equals Ignore Case category NON NLS 1 Site Category category Site Category get Model get Factory create Category this Site Category category parse child line Table Site Category category set In The Model true f Categories add category  lineTable lineTable bindSourceLocation lineTable fType getNodeAttribute fUrl getNodeAttribute getNodeAttribute getNodeAttribute getNodeAttribute fArch getNodeAttribute getNodeAttribute fIsPatch NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName equalsIgnoreCase SiteCategory SiteCategory getModel getFactory createCategory SiteCategory lineTable SiteCategory setInTheModel fCategories
protected void reset super reset f Type null f Url null fOS null fWS null f Arch null fNL null f Is Patch false f Categories clear  fType fUrl fArch fIsPatch fCategories
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P TYPE set Type new Value null new Value to String null else if name equals P URL setURL new Value null new Value to String null else if name equals P ARCH set Arch new Value null new Value to String null else if name equals P NL setNL new Value null new Value to String null else if name equals P OS setOS new Value null new Value to String null else if name equals P WS setWS new Value null new Value to String null else if name equals P PATCH set Is Patch Boolean new Value boolean Value else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_TYPE setType newValue newValue toString P_URL newValue newValue toString P_ARCH setArch newValue newValue toString P_NL newValue newValue toString P_OS newValue newValue toString P_WS newValue newValue toString P_PATCH setIsPatch newValue booleanValue restoreProperty oldValue newValue
see org eclipse pde core I Writable write java lang String java io Print Writer public void write String indent Print Writer writer writer print indent writer print feature NON NLS 1 if f Type null writer print type f Type NON NLS 1 NON NLS 2 if f Url null writer print url f Url NON NLS 1 NON NLS 2 if id null writer print id get Id NON NLS 1 NON NLS 2 if version null writer print version get Version NON NLS 1 NON NLS 2 if label null writer print label get Label NON NLS 1 NON NLS 2 if fOS null writer print os fOS NON NLS 1 NON NLS 2 if fWS null writer print ws fWS NON NLS 1 NON NLS 2 if fNL null writer print nl fNL NON NLS 1 NON NLS 2 if f Arch null writer print arch f Arch NON NLS 1 NON NLS 2 if f Is Patch writer print patch true NON NLS 1 if f Categories size 0 writer println NON NLS 1 String indent2 indent NON NLS 1 for int i 0 i f Categories size i I Site Category category I Site Category f Categories get i category write indent2 writer writer println indent feature NON NLS 1 else writer println NON NLS 1  IWritable PrintWriter PrintWriter fType fType fUrl fUrl getId getVersion getLabel fArch fArch fIsPatch fCategories fCategories ISiteCategory ISiteCategory fCategories
public I File get Archive File if f Url null return null I Resource resource get Model get Underlying Resource if resource null return null I Project project resource get Project I File file project get File new Path f Url if file exists return file return null  IFile getArchiveFile fUrl IResource getModel getUnderlyingResource IProject getProject IFile getFile fUrl
see org eclipse pde internal core isite I Site Feature getOS public String getOS return fOS  ISiteFeature
see org eclipse pde internal core isite I Site Feature getNL public String getNL return fNL  ISiteFeature
see org eclipse pde internal core isite I Site Feature get Arch public String get Arch return f Arch  ISiteFeature getArch getArch fArch
see org eclipse pde internal core isite I Site Feature getWS public String getWS return fWS  ISiteFeature
public void setOS String os throws Core Exception ensure Model Editable Object old Value fOS fOS os fire Property Changed P OS old Value fOS  CoreException ensureModelEditable oldValue firePropertyChanged P_OS oldValue
public void setWS String ws throws Core Exception ensure Model Editable Object old Value fWS fWS ws fire Property Changed P WS old Value fWS  CoreException ensureModelEditable oldValue firePropertyChanged P_WS oldValue
public void set Arch String arch throws Core Exception ensure Model Editable Object old Value f Arch f Arch arch fire Property Changed P ARCH old Value f Arch  setArch CoreException ensureModelEditable oldValue fArch fArch firePropertyChanged P_ARCH oldValue fArch
public void setNL String nl throws Core Exception ensure Model Editable Object old Value fNL fNL nl fire Property Changed P NL old Value fNL  CoreException ensureModelEditable oldValue firePropertyChanged P_NL oldValue
see org eclipse pde internal core isite I Site Feature is Patch public boolean is Patch return f Is Patch  ISiteFeature isPatch isPatch fIsPatch
public void set Is Patch boolean patch throws Core Exception ensure Model Editable Object old Value new Boolean f Is Patch f Is Patch patch fire Property Changed P PATCH old Value new Boolean f Is Patch  setIsPatch CoreException ensureModelEditable oldValue fIsPatch fIsPatch firePropertyChanged P_PATCH oldValue fIsPatch

public class Site Model Factory implements I Site Model Factory private I Site Model model public Site Model Factory I Site Model model this model model  SiteModelFactory ISiteModelFactory ISiteModel SiteModelFactory ISiteModel
see org eclipse pde internal core isite I Site Model Factory create Site public I Site create Site Site site new Site site model model site parent null return site  ISiteModelFactory createSite ISite createSite
see org eclipse pde internal core isite I Site Model Factory create Feature public I Site Feature create Feature Site Feature feature new Site Feature feature model model feature parent model get Site return feature  ISiteModelFactory createFeature ISiteFeature createFeature SiteFeature SiteFeature getSite
see org eclipse pde internal core isite I Site Model Factory create Category public I Site Category create Category I Site Feature feature Site Category category new Site Category category model model category parent feature return category  ISiteModelFactory createCategory ISiteCategory createCategory ISiteFeature SiteCategory SiteCategory
see org eclipse pde internal core isite I Site Model Factory create Category Definition public I Site Category Definition create Category Definition Site Category Definition def new Site Category Definition def model model def parent model get Site return def  ISiteModelFactory createCategoryDefinition ISiteCategoryDefinition createCategoryDefinition SiteCategoryDefinition SiteCategoryDefinition getSite
see org eclipse pde internal core isite I Site Model Factory create Description public I Site Description create Description I Site Object parent Site Description desc new Site Description desc model model desc parent parent return desc  ISiteModelFactory createDescription ISiteDescription createDescription ISiteObject SiteDescription SiteDescription
see org eclipse pde internal core isite I Site Model Factory create Archive public I Site Archive create Archive Site Archive archive new Site Archive archive model model archive parent model get Site return archive  ISiteModelFactory createArchive ISiteArchive createArchive SiteArchive SiteArchive getSite

protected int range void set In The Model boolean value in The Model value  setInTheModel inTheModel
public boolean is In The Model return in The Model  isInTheModel inTheModel
protected void ensure Model Editable throws Core Exception if model is Editable throw Core Exception PDE Core get Resource String Site Object read Only Change NON NLS 1  ensureModelEditable CoreException isEditable throwCoreException PDECore getResourceString SiteObject readOnlyChange
protected void fire Property Changed String property Object old Value Object new Value fire Property Changed this property old Value new Value  firePropertyChanged oldValue newValue firePropertyChanged oldValue newValue
protected void fire Property Changed I Site Object object String property Object old Value Object new Value if model is Editable model instanceof I Model Change Provider I Model Change Provider provider I Model Change Provider model provider fire Model Object Changed object property old Value new Value  firePropertyChanged ISiteObject oldValue newValue isEditable IModelChangeProvider IModelChangeProvider IModelChangeProvider fireModelObjectChanged oldValue newValue
protected void fire Structure Changed I Site Object child int change Type fire Structure Changed new I Site Object child change Type  fireStructureChanged ISiteObject changeType fireStructureChanged ISiteObject changeType
protected void fire Structure Changed I Site Object children int change Type I Site Model model get Model if model is Editable model instanceof I Model Change Provider I Model Change Provider provider I Model Change Provider model provider fire Model Changed new Model Changed Event provider change Type children null  fireStructureChanged ISiteObject changeType ISiteModel getModel isEditable IModelChangeProvider IModelChangeProvider IModelChangeProvider fireModelChanged ModelChangedEvent changeType
public I Site get Site return model get Site  ISite getSite getSite
return model get Site public String get Label return label  getSite getLabel
public String get Translatable Label if label null return NON NLS 1 return model get Resource String label  getTranslatableLabel getResourceString
return model get Resource String label public I Site Model get Model return model  getResourceString ISiteModel getModel
String get Node Attribute Node node String name Named Node Map atts node get Attributes Node attribute null if atts null attribute atts get Named Item name if attribute null return attribute get Node Value return null  getNodeAttribute NamedNodeMap getAttributes getNamedItem getNodeValue
int get Integer Attribute Node node String name String value get Node Attribute node name if value null try return Integer parse Int value catch Number Format Exception e return 0  getIntegerAttribute getNodeAttribute parseInt NumberFormatException
boolean get Boolean Attribute Node node String name String value get Node Attribute node name if value null return value equals Ignore Case true NON NLS 1 return false  getBooleanAttribute getNodeAttribute equalsIgnoreCase
protected String get Normalized Text String source String result source replace t result result trim return result  getNormalizedText
public I Site Object get Parent return parent  ISiteObject getParent
protected void parse Node node Hashtable line Table label get Node Attribute node label NON NLS 1  lineTable getNodeAttribute
protected void reset label null 
public void set Label String new Label throws Core Exception ensure Model Editable Object old Value this label label new Label fire Property Changed P LABEL old Value new Label  setLabel newLabel CoreException ensureModelEditable oldValue newLabel firePropertyChanged P_LABEL oldValue newLabel
protected void throw Core Exception String message throws Core Exception Status status new Status I Status ERROR PDE Core get Plugin Id I Status OK message null Core Exception ce new Core Exception status ce fill In Stack Trace throw ce  throwCoreException CoreException IStatus PDECore getPluginId IStatus CoreException CoreException fillInStackTrace
public static String get Writable String String source if source null return NON NLS 1 String Buffer buf new String Buffer for int i 0 i source length i char c source char At i switch c case buf append amp NON NLS 1 break case buf append lt NON NLS 1 break case buf append gt NON NLS 1 break case buf append apos NON NLS 1 break case buf append quot NON NLS 1 break default buf append c break return buf to String  getWritableString StringBuffer StringBuffer charAt toString
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P LABEL set Label new Value null new Value to String null  restoreProperty oldValue newValue CoreException P_LABEL setLabel newValue newValue toString
public void write String indent Print Writer writer  PrintWriter
public void write String indent Print Writer writer public void set Model I Site Model model this model model  PrintWriter setModel ISiteModel
public void set Parent I Site Object parent this parent parent  setParent ISiteObject
void bind Source Location Node node Map line Table Integer lines Integer line Table get node if lines null range new int 2 range 0 lines 0 int Value range 1 lines 1 int Value  bindSourceLocation lineTable lineTable intValue intValue
public int get Start Line if range null return 1 return range 0  getStartLine
public int get Stop Line if range null return 1 return range 1  getStopLine

protected String version public String get Version return version  getVersion
protected void parse Node node Hashtable line Table super parse node line Table version get Node Attribute node version NON NLS 1  lineTable lineTable getNodeAttribute
public void set Version String version throws Core Exception ensure Model Editable Object old Value this version this version version fire Property Changed this P VERSION old Value version  setVersion CoreException ensureModelEditable oldValue firePropertyChanged P_VERSION oldValue
public void restore Property String name Object old Value Object new Value throws Core Exception if name equals P VERSION set Version new Value null new Value to String null else super restore Property name old Value new Value  restoreProperty oldValue newValue CoreException P_VERSION setVersion newValue newValue toString restoreProperty oldValue newValue
protected void reset super reset version null 

private boolean editable true public Workspace Site Build Model  WorkspaceSiteBuildModel
public Workspace Site Build Model public Workspace Site Build Model I File file set File file  WorkspaceSiteBuildModel WorkspaceSiteBuildModel IFile setFile
set File file public void fire Model Changed I Model Changed Event event dirty true super fire Model Changed event  setFile fireModelChanged IModelChangedEvent fireModelChanged
public String get Contents String Writer swriter new String Writer Print Writer writer new Print Writer swriter loaded true save writer writer flush try swriter close catch IO Exception e return swriter to String  getContents StringWriter StringWriter PrintWriter PrintWriter IOException toString
public I File get File return file  IFile getFile
public String get Install Location return file get Parent get Location toOS String  getInstallLocation getParent getLocation toOSString
return file get Parent get Location toOS String public I Resource get Underlying Resource return file  getParent getLocation toOSString IResource getUnderlyingResource
return file public boolean is Dirty return dirty  isDirty
return dirty public boolean is Editable return editable  isEditable
public boolean is In Sync return is In Sync file get Location to File  isInSync isInSync getLocation toFile
protected void update Time Stamp update Time Stamp file get Location to File  updateTimeStamp updateTimeStamp getLocation toFile
public void load if file null return if file exists boolean out Of Sync false Input Stream stream null try stream file get Contents false catch Core Exception e out Of Sync true try stream file get Contents true catch Core Exception ex return try load stream out Of Sync stream close catch Core Exception e catch IO Exception e PDE Core log Exception e else this site Build new Site Build site Build model this loaded true  outOfSync InputStream getContents CoreException outOfSync getContents CoreException outOfSync CoreException IOException PDECore logException siteBuild SiteBuild siteBuild
public void save if file null return try String contents get Contents Byte Array Input Stream stream new Byte Array Input Stream contents get Bytes UTF8 NON NLS 1 if file exists file set Contents stream false false null else create Folder file null file create stream false null stream close catch Core Exception e PDE Core log Exception e catch IO Exception e  getContents ByteArrayInputStream ByteArrayInputStream getBytes setContents createFolder CoreException PDECore logException IOException
public void save Print Writer writer if is Loaded writer println xml version 1 0 encoding UTF 8 NON NLS 1 site Build write writer NON NLS 1 dirty false  PrintWriter isLoaded siteBuild
private void create Folder I File file I Progress Monitor monitor throws Core Exception if file exists return I Project project file get Project I Path path file get Project Relative Path for int i path segment Count 1 i 0 i I Folder folder project get Folder path remove Last Segments i if folder exists folder create true true monitor  createFolder IFile IProgressMonitor CoreException IProject getProject IPath getProjectRelativePath segmentCount IFolder getFolder removeLastSegments
public void set Dirty boolean dirty this dirty dirty  setDirty
this dirty dirty public void set Editable boolean new Editable editable new Editable  setEditable newEditable newEditable
editable new Editable public void set File I File new File file new File  newEditable setFile IFile newFile newFile

private boolean editable true public Workspace Site Model super  WorkspaceSiteModel
super public Workspace Site Model I File file set File file  WorkspaceSiteModel IFile setFile
set File file public void fire Model Changed I Model Changed Event event set Dirty event get Change Type I Model Changed Event WORLD CHANGED super fire Model Changed event  setFile fireModelChanged IModelChangedEvent setDirty getChangeType IModelChangedEvent WORLD_CHANGED fireModelChanged
protected NL Resource Helper createNL Resource Helper try I Path path file get Location remove Last Segments 1 String install Location path toOS String if install Location starts With file false NON NLS 1 install Location file install Location NON NLS 1 URL url new URL install Location NON NLS 1 String name site NON NLS 1 NL Resource Helper helper new NL Resource Helper name new URL url return helper catch MalformedURL Exception e return null  NLResourceHelper createNLResourceHelper IPath getLocation removeLastSegments installLocation toOSString installLocation startsWith installLocation installLocation installLocation NLResourceHelper NLResourceHelper MalformedURLException
public String get Contents String Writer swriter new String Writer Print Writer writer new Print Writer swriter loaded true save writer writer flush try swriter close catch IO Exception e return swriter to String  getContents StringWriter StringWriter PrintWriter PrintWriter IOException toString
return swriter to String public I File get File return file  toString IFile getFile
return file public String get Install Location return file get Parent get Location toOS String  getInstallLocation getParent getLocation toOSString
return file get Parent get Location toOS String public I Resource get Underlying Resource return file  getParent getLocation toOSString IResource getUnderlyingResource
return file public boolean is Dirty return f Dirty  isDirty fDirty
return f Dirty public boolean is Editable return editable  fDirty isEditable
public boolean is In Sync return is In Sync file get Location to File  isInSync isInSync getLocation toFile
protected void update Time Stamp update Time Stamp file get Location to File  updateTimeStamp updateTimeStamp getLocation toFile
public void load if file null return if file exists boolean out Of Sync false Input Stream stream null try stream file get Contents false catch Core Exception e out Of Sync true try stream file get Contents true catch Core Exception ex return try load stream out Of Sync stream close catch Core Exception e catch IO Exception e PDE Core log Exception e else this site new Site site model this loaded true  outOfSync InputStream getContents CoreException outOfSync getContents CoreException outOfSync CoreException IOException PDECore logException
public void save if file null return try String contents get Contents Byte Array Input Stream stream new Byte Array Input Stream contents get Bytes UTF8 NON NLS 1 if file exists file set Contents stream false false null else file create stream false null stream close catch Core Exception e PDE Core log Exception e catch IO Exception e  getContents ByteArrayInputStream ByteArrayInputStream getBytes setContents CoreException PDECore logException IOException
public void save Print Writer writer if is Loaded writer println xml version 1 0 encoding UTF 8 NON NLS 1 writer println DOCTYPE site SYSTEM dtd site dtd site write writer NON NLS 1 set Dirty false  PrintWriter isLoaded setDirty
set Dirty false public void set Dirty boolean dirty f Dirty dirty  setDirty setDirty fDirty
f Dirty dirty public void set Editable boolean new Editable editable new Editable  fDirty setEditable newEditable newEditable
editable new Editable public void set File I File new File file new File  newEditable setFile IFile newFile newFile

public Source Attachment Entry I Path entry Path I Path attachment Path I Path attachment Root Path this entry Path entry Path this attachment Path attachment Path this attachment Root Path attachment Root Path  SourceAttachmentEntry IPath entryPath IPath attachmentPath IPath attachmentRootPath entryPath entryPath attachmentPath attachmentPath attachmentRootPath attachmentRootPath
public I Path get Entry Path return entry Path  IPath getEntryPath entryPath
return entry Path public I Path get Attachment Path return attachment Path  entryPath IPath getAttachmentPath attachmentPath
public I Path get Attachment Root Path return attachment Root Path  IPath getAttachmentRootPath attachmentRootPath
Constructor for Source Attachement Manager public Source Attachment Manager entries new Hashtable initialize  SourceAttachementManager SourceAttachmentManager
public boolean is Empty return entries is Empty  isEmpty isEmpty
public Source Attachment Entry find Entry I Path entry Path return Source Attachment Entry entries get entry Path  SourceAttachmentEntry findEntry IPath entryPath SourceAttachmentEntry entryPath
public void add Entry I Path library Path I Path attachment Path I Path attachment Root Path entries put library Path new Source Attachment Entry library Path attachment Path attachment Root Path  addEntry IPath libraryPath IPath attachmentPath IPath attachmentRootPath libraryPath SourceAttachmentEntry libraryPath attachmentPath attachmentRootPath
private String get File Name I Path state Location PDE Core get Default get State Location I Path state File state Location append source Attachements properties NON NLS 1 return state File toOS String  getFileName IPath stateLocation PDECore getDefault getStateLocation IPath stateFile stateLocation sourceAttachements stateFile toOSString
private void initialize String file Name get File Name Properties properties new Properties try File Input Stream fis new File Input Stream file Name properties load fis parse Properties properties fis close catch IO Exception e  fileName getFileName FileInputStream FileInputStream fileName parseProperties IOException
private void parse Properties Properties properties String platform Path properties get Property KEY PLATFORM PATH if platform Path null return I Path old Platform Path new Path platform Path I Path current Platform Path External Model Manager get Eclipse Home If the saved entries are for a different platform path discard them if old Platform Path equals current Platform Path false return for Enumeration enum properties keys enum has More Elements String key String enum next Element if key starts With entry NON NLS 1 parse Entry Property properties get Property key  parseProperties platformPath getProperty KEY_PLATFORM_PATH platformPath IPath oldPlatformPath platformPath IPath currentPlatformPath ExternalModelManager getEclipseHome oldPlatformPath currentPlatformPath hasMoreElements nextElement startsWith parseEntryProperty getProperty
private void parse Entry Property String value int semi value index Of String library value substring 0 semi String paths value substring semi 1 semi paths index Of NON NLS 1 String att att Root null if semi 1 att paths substring 0 semi att Root paths substring semi 1 else att paths add Entry new Path library new Path att att Root null new Path att Root null  parseEntryProperty indexOf indexOf attRoot attRoot addEntry attRoot attRoot
public void save String file Name get File Name Properties properties new Properties I Path platform Path External Model Manager get Eclipse Home properties set Property KEY PLATFORM PATH platform Path toOS String int i 0 for Enumeration enum entries keys enum has More Elements I Path entry Path I Path enum next Element Source Attachment Entry entry Source Attachment Entry entries get entry Path String library entry get Entry Path toOS String String value if entry get Attachment Root Path null value library entry get Attachment Path toOS String entry get Attachment Root Path toOS String NON NLS 1 NON NLS 2 else value library entry get Attachment Path toOS String NON NLS 1 i properties set Property entry i value NON NLS 1 try File Output Stream fos new File Output Stream file Name properties store fos User defined source attachments NON NLS 1 fos flush fos close catch IO Exception e  fileName getFileName IPath platformPath ExternalModelManager getEclipseHome setProperty KEY_PLATFORM_PATH platformPath toOSString hasMoreElements IPath entryPath IPath nextElement SourceAttachmentEntry SourceAttachmentEntry entryPath getEntryPath toOSString getAttachmentRootPath getAttachmentPath toOSString getAttachmentRootPath toOSString getAttachmentPath toOSString setProperty FileOutputStream FileOutputStream fileName IOException

private boolean enabled public Source Location I Path path boolean enabled this path path this enabled enabled  SourceLocation IPath
public I Path get Path return path  IPath getPath
public void set Path I Path path this path path  setPath IPath
public boolean is User Defined return user Defined  isUserDefined userDefined
public void set User Defined boolean user Defined this user Defined user Defined  setUserDefined userDefined userDefined userDefined
public String to String return path toOS String  toString toOSString
Gets the enabled return Returns a boolean public boolean is Enabled return enabled  isEnabled
Sets the enabled param enabled The enabled to set public void set Enabled boolean enabled this enabled enabled  setEnabled
public boolean equals Object obj if obj instanceof Source Location Source Location object Source Location obj return object get Path equals path return false  SourceLocation SourceLocation SourceLocation getPath

class Search Result Search Result Source Location loc File file this loc loc this file file  SearchResult SearchResult SourceLocation
public Array List get User Location Array initialize User Locations return f User Locations  ArrayList getUserLocationArray initializeUserLocations fUserLocations
public Source Location get User Locations initialize User Locations return get Locations f User Locations  SourceLocation getUserLocations initializeUserLocations getLocations fUserLocations
public Source Location get Extension Locations initialize Extension Locations return get Locations f Extension Locations  SourceLocation getExtensionLocations initializeExtensionLocations getLocations fExtensionLocations
private Source Location get Locations Array List list return Source Location list to Array new Source Location list size  SourceLocation getLocations ArrayList SourceLocation toArray SourceLocation
public File find Source File I Plugin Base plugin Base I Path source Path I Status status Plugin Version Identifier validate Version plugin Base get Version if status get Severity I Status OK return null I Path relative Path get Relative Path plugin Base source Path Search Result result find Source Location plugin Base relative Path return result null result file null  findSourceFile IPluginBase pluginBase IPath sourcePath IStatus PluginVersionIdentifier validateVersion pluginBase getVersion getSeverity IStatus IPath relativePath getRelativePath pluginBase sourcePath SearchResult findSourceLocation pluginBase relativePath
public I Path find Path I Plugin Base plugin Base I Path source Path I Status status Plugin Version Identifier validate Version plugin Base get Version if status get Severity I Status OK return null I Path relative Path get Relative Path plugin Base source Path Search Result result find Source Location plugin Base relative Path return result null null result loc get Path append relative Path  IPath findPath IPluginBase pluginBase IPath sourcePath IStatus PluginVersionIdentifier validateVersion pluginBase getVersion getSeverity IStatus IPath relativePath getRelativePath pluginBase sourcePath SearchResult findSourceLocation pluginBase relativePath getPath relativePath
private I Path get Relative Path I Plugin Base plugin Base I Path source Path Plugin Version Identifier vid new Plugin Version Identifier plugin Base get Version String plugin Dir plugin Base get Id   vid to String NON NLS 1 I Path location Relative Path new Path plugin Dir return location Relative Path append source Path  IPath getRelativePath IPluginBase pluginBase IPath sourcePath PluginVersionIdentifier PluginVersionIdentifier pluginBase getVersion pluginDir pluginBase getId _ toString IPath locationRelativePath pluginDir locationRelativePath sourcePath
public Search Result find Source Location I Plugin Base plugin Base I Path relative Path initialize Search Result result find Source File f Extension Locations relative Path return result null result find Source File f User Locations relative Path  SearchResult findSourceLocation IPluginBase pluginBase IPath relativePath SearchResult findSourceFile fExtensionLocations relativePath findSourceFile fUserLocations relativePath
private Search Result find Source File Array List list I Path source Path for int i 0 i list size i Source Location location Source Location list get i if location is Enabled false continue Search Result result find Source Path location source Path if result null return result return null  SearchResult findSourceFile ArrayList IPath sourcePath SourceLocation SourceLocation isEnabled SearchResult findSourcePath sourcePath
private Search Result find Source Path Source Location location I Path source Path I Path location Path location get Path I Path full Path location Path append source Path File file full Path to File return file exists new Search Result location file null  SearchResult findSourcePath SourceLocation IPath sourcePath IPath locationPath getPath IPath fullPath locationPath sourcePath fullPath toFile SearchResult
private void initialize initialize User Locations initialize Extension Locations  initializeUserLocations initializeExtensionLocations
private void initialize User Locations f User Locations clear String pref PDE Core get Default get Plugin Preferences get String P SOURCE LOCATIONS if pref length 0 parse Saved Source Locations pref f User Locations  initializeUserLocations fUserLocations PDECore getDefault getPluginPreferences getString P_SOURCE_LOCATIONS parseSavedSourceLocations fUserLocations
private Source Location parse Source Location String text String path boolean enabled try text text trim int comma Index text last Index Of enabled text char At comma Index 1 t int at Loc text index Of path at Loc 1 text substring 0 comma Index text substring at Loc 1 comma Index catch Runtime Exception e return null return new Source Location new Path path enabled  SourceLocation parseSourceLocation commaIndex lastIndexOf charAt commaIndex atLoc indexOf atLoc commaIndex atLoc commaIndex RuntimeException SourceLocation
private void initialize Extension Locations f Extension Locations clear String pref PDE Core get Default get Plugin Preferences get String P EXT LOCATIONS Source Location stored Locations get Saved Source Locations pref Model Entry entries PDE Core get Default get Model Manager get Entries for int i 0 i entries length i process Extensions entries i false for int i 0 i f Extension Locations size i Source Location location Source Location f Extension Locations get i location set Enabled get Saved State location get Path stored Locations  initializeExtensionLocations fExtensionLocations PDECore getDefault getPluginPreferences getString P_EXT_LOCATIONS SourceLocation storedLocations getSavedSourceLocations ModelEntry PDECore getDefault getModelManager getEntries processExtensions fExtensionLocations SourceLocation SourceLocation fExtensionLocations setEnabled getSavedState getPath storedLocations
private boolean get Saved State I Path path Source Location list for int i 0 i list length i Source Location saved list i if path equals saved get Path return saved is Enabled return true  getSavedState IPath SourceLocation SourceLocation getPath isEnabled
private void parse Saved Source Locations String text Array List entries text text replace File path Separator Char String Tokenizer stok new String Tokenizer text NON NLS 1 while stok has More Tokens String token stok next Token Source Location location parse Source Location token if location null entries add location  parseSavedSourceLocations ArrayList pathSeparatorChar StringTokenizer StringTokenizer hasMoreTokens nextToken SourceLocation parseSourceLocation
private Source Location get Saved Source Locations String text if text null text length 0 return new Source Location 0 Array List entries new Array List parse Saved Source Locations text entries return Source Location entries to Array new Source Location entries size  SourceLocation getSavedSourceLocations SourceLocation ArrayList ArrayList parseSavedSourceLocations SourceLocation toArray SourceLocation
private void process Extensions Model Entry entry boolean use External I Plugin Model Base model use External entry get External Model entry get Active Model if model null return I Plugin Extension extensions model get Plugin Base get Extensions for int j 0 j extensions length j I Plugin Extension extension extensions j String point extension get Point if point null continue if point equals PDE Core get Plugin Id source NON NLS 1 int orig Length f Extension Locations size process Extension extension if f Extension Locations size orig Length model get Underlying Resource null process Extensions entry true  processExtensions ModelEntry useExternal IPluginModelBase useExternal getExternalModel getActiveModel IPluginExtension getPluginBase getExtensions IPluginExtension getPoint PDECore getPluginId origLength fExtensionLocations processExtension fExtensionLocations origLength getUnderlyingResource processExtensions
private void process Extension I Plugin Extension extension I Plugin Object children extension get Children for int j 0 j children length j if children j get Name equals location NON NLS 1 I Plugin Element element I Plugin Element children j String path Value element get Attribute path get Value NON NLS 1 I Resource resource extension get Model get Underlying Resource I Path path if resource null resource is Linked path resource get Location remove Last Segments 1 append path Value else path new Path extension get Model get Install Location append path Value if path to File exists Source Location location new Source Location path true location set User Defined false if f Extension Locations contains location f Extension Locations add location  processExtension IPluginExtension IPluginObject getChildren getName IPluginElement IPluginElement pathValue getAttribute getValue IResource getModel getUnderlyingResource IPath isLinked getLocation removeLastSegments pathValue getModel getInstallLocation pathValue toFile SourceLocation SourceLocation setUserDefined fExtensionLocations fExtensionLocations

private I Path path public Local Site I Path path this path path plugins new Array List  IPath LocalSite IPath ArrayList
public I Path get Path return path  IPath getPath
public URL getURL throws MalformedURL Exception return new URL file path add Trailing Separator to String NON NLS 1  MalformedURLException addTrailingSeparator toString
public void add I Plugin Model Base model plugins add model  IPluginModelBase
public String get Relative Plugin List String list new String plugins size for int i 0 i plugins size i I Plugin Model Base model I Plugin Model Base plugins get i I Path location get Plugin Location model defect 37319 if location segment Count 2 location location remove First Segments location segment Count 2 if PDE Core get Default get Model Manager isOS Gi Runtime location location append model is Fragment Model fragment xml NON NLS 1 plugin xml NON NLS 1 31489 entry must be relative list i location set Device null make Relative to String return list  getRelativePluginList IPluginModelBase IPluginModelBase IPath getPluginLocation segmentCount removeFirstSegments segmentCount PDECore getDefault getModelManager isOSGiRuntime isFragmentModel setDevice makeRelative toString
public static File create Properties File throws Core Exception return create Properties File get Visible Models null  createPropertiesFile CoreException createPropertiesFile getVisibleModels
public static String create Plugin Path throws Core Exception return create Plugin Path get Visible Models  createPluginPath CoreException createPluginPath getVisibleModels
public static String create Plugin Path I Plugin Model Base models throws Core Exception String paths new String models length for int i 0 i models length i I Plugin Model Base model models i paths i createURL model return paths  createPluginPath IPluginModelBase CoreException IPluginModelBase
private static I Plugin Model Base get Visible Models Vector result new Vector Plugin Model Manager manager PDE Core get Default get Model Manager add From List result manager get Plugins I Plugin Model Base array I Plugin Model Base result to Array new I Plugin Model Base result size return array  IPluginModelBase getVisibleModels PluginModelManager PDECore getDefault getModelManager addFromList getPlugins IPluginModelBase IPluginModelBase toArray IPluginModelBase
private static void add From List Vector result I Plugin Model Base list for int i 0 i list length i I Plugin Model Base model list i if model is Enabled result add list i  addFromList IPluginModelBase IPluginModelBase isEnabled
public static File create Properties File I Plugin Model Base plugins I Path data throws Core Exception try String data Suffix create Data Suffix data I Path state Path PDE Core get Default get State Location String file Name plugin path properties NON NLS 1 File dir new File state Path toOS String if data Suffix length 0 dir new File dir data Suffix if dir exists dir mkdir File plugin File new File dir file Name Properties properties new Properties for int i 0 i plugins length i I Plugin Model Base curr plugins i String key get Key curr if key null properties set Property key createURL curr File Output Stream fos null try fos new File Output Stream plugin File properties store fos null finally if fos null fos close return plugin File catch IO Exception e throw new Core Exception new Status I Status ERROR PDE Core get Plugin Id I Status ERROR e get Message e  createPropertiesFile IPluginModelBase IPath CoreException dataSuffix createDataSuffix IPath statePath PDECore getDefault getStateLocation fileName plugin_path statePath toOSString dataSuffix dataSuffix pluginFile fileName IPluginModelBase getKey setProperty FileOutputStream FileOutputStream pluginFile pluginFile IOException CoreException IStatus PDECore getPluginId IStatus getMessage
public static void create Platform Configuration Area Tree Map plugin Map File config Dir String primary Feature Id Hash Map auto Start Plugins throws Core Exception try if PDE Core get Default get Model Manager isOS Gi Runtime create Config Ini File config Dir plugin Map primary Feature Id auto Start Plugins if plugin Map contains Key org eclipse update configurator NON NLS 1 save Platform Configuration Boot Loader get Platform Configuration null config Dir plugin Map primary Feature Id else save Platform Configuration new Platform Configuration null new File config Dir platform cfg plugin Map primary Feature Id NON NLS 1 catch Core Exception e Rethrow throw e catch Exception e Wrap everything else in a core exception String message e get Message if message null message length 0 message PDE Core get Resource String Target Platform exception Thrown NON NLS 1 throw new Core Exception new Status I Status ERROR PDE Core get Plugin Id I Status ERROR message e  createPlatformConfigurationArea TreeMap pluginMap configDir primaryFeatureId HashMap autoStartPlugins CoreException PDECore getDefault getModelManager isOSGiRuntime createConfigIniFile configDir pluginMap primaryFeatureId autoStartPlugins pluginMap containsKey savePlatformConfiguration BootLoader getPlatformConfiguration configDir pluginMap primaryFeatureId savePlatformConfiguration PlatformConfiguration configDir pluginMap primaryFeatureId CoreException getMessage PDECore getResourceString TargetPlatform exceptionThrown CoreException IStatus PDECore getPluginId IStatus
private static void create Config Ini File File config Dir Tree Map plugin Map String primary Feature Id Hash Map auto Start Plugins if config Dir exists config Dir mkdirs File file new File config Dir config ini NON NLS 1 try File Output Stream stream new File Output Stream file Output Stream Writer writer new Output Stream Writer stream 8859 1 NON NLS 1 Buffered Writer b Writer new Buffered Writer writer b Writer write Eclipse Runtime Configuration File NON NLS 1 b Writer new Line b Writer write osgi install area file External Model Manager get Eclipse Home to String NON NLS 1 b Writer new Line if primary Feature Id null String splash Path get BundleURL primary Feature Id plugin Map if splash Path null int index primary Feature Id last Index Of if index 1 String id primary Feature Id substring 0 index splash Path get BundleURL id plugin Map if splash Path null b Writer write osgi splash Path splash Path NON NLS 1 b Writer new Line b Writer write osgi configuration cascaded false NON NLS 1 b Writer new Line b Writer write osgi framework get BundleURL org eclipse osgi plugin Map NON NLS 1 NON NLS 2 b Writer new Line Iterator iter auto Start Plugins key Set iterator String Buffer buffer new String Buffer while iter has Next String id iter next to String String url get BundleURL id plugin Map if url null continue buffer append reference url NON NLS 1 Integer integer Integer auto Start Plugins get id if integer int Value 0 buffer append integer int Value start NON NLS 1 NON NLS 2 if iter has Next buffer append NON NLS 1 if auto Start Plugins contains Key org eclipse update configurator NON NLS 1 plugin Map contains Key org eclipse update configurator NON NLS 1 iter plugin Map key Set iterator while iter has Next String id iter next to String if org eclipse osgi equals id auto Start Plugins contains Key id NON NLS 1 continue String url get BundleURL id plugin Map if url null continue if buffer length 0 buffer append NON NLS 1 buffer append reference url NON NLS 1 if buffer length 0 b Writer write osgi bundles buffer to String NON NLS 1 b Writer new Line b Writer write osgi bundles default Start Level 4 NON NLS 1 b Writer new Line b Writer write eof eof NON NLS 1 b Writer flush b Writer close catch IO Exception e PDE Core log Exception e  createConfigIniFile configDir TreeMap pluginMap primaryFeatureId HashMap autoStartPlugins configDir configDir configDir FileOutputStream FileOutputStream OutputStreamWriter OutputStreamWriter 8859_1 BufferedWriter bWriter BufferedWriter bWriter bWriter newLine bWriter ExternalModelManager getEclipseHome toString bWriter newLine primaryFeatureId splashPath getBundleURL primaryFeatureId pluginMap splashPath primaryFeatureId lastIndexOf primaryFeatureId splashPath getBundleURL pluginMap splashPath bWriter splashPath splashPath bWriter newLine bWriter bWriter newLine bWriter getBundleURL pluginMap bWriter newLine autoStartPlugins keySet StringBuffer StringBuffer hasNext toString getBundleURL pluginMap autoStartPlugins intValue intValue hasNext autoStartPlugins containsKey pluginMap containsKey pluginMap keySet hasNext toString autoStartPlugins containsKey getBundleURL pluginMap bWriter toString bWriter newLine bWriter defaultStartLevel bWriter newLine bWriter bWriter bWriter IOException PDECore logException
private static String get BundleURL String id Tree Map plugin Map I Plugin Model Base model I Plugin Model Base plugin Map get id if model null return null String location model get Install Location I Resource resource model get Underlying Resource if resource null if model instanceof I Bundle Plugin Model Base location resource get Location remove Last Segments 2 to String else location resource get Location remove Last Segments 1 to String return file new Path location add Trailing Separator to String NON NLS 1  getBundleURL TreeMap pluginMap IPluginModelBase IPluginModelBase pluginMap getInstallLocation IResource getUnderlyingResource IBundlePluginModelBase getLocation removeLastSegments toString getLocation removeLastSegments toString addTrailingSeparator toString
private static void save Platform Configuration I Platform Configuration platform Configuration File config File Tree Map plugin Map String primary Feature Id throws IO Exception Core Exception MalformedURL Exception Array List sites new Array List Compute local sites Iterator iter plugin Map values iterator while iter has Next I Plugin Model Base model I Plugin Model Base iter next I Path site Path get Transient Site Path model add To Site site Path model sites I Plugin Model Base boot Model I Plugin Model Base plugin Map get BOOT ID URL configURL new URL file config File get Path NON NLS 1 create Configuration Entries platform Configuration boot Model sites create Feature Entries platform Configuration plugin Map primary Feature Id platform Configuration refresh platform Configuration save configURL if boot Model null String version boot Model get Plugin Base get Version if version null Plugin Version Identifier boot Vid new Plugin Version Identifier version Plugin Version Identifier break Vid new Plugin Version Identifier 2 0 3 NON NLS 1 if break Vid is Greater Than boot Vid Platform configuration version changed in 2 1 but the same fix is in 2 0 3 Must switch back to configuration 1 0 for older configurations repair Configuration Version configURL  savePlatformConfiguration IPlatformConfiguration platformConfiguration configFile TreeMap pluginMap primaryFeatureId IOException CoreException MalformedURLException ArrayList ArrayList pluginMap hasNext IPluginModelBase IPluginModelBase IPath sitePath getTransientSitePath addToSite sitePath IPluginModelBase bootModel IPluginModelBase pluginMap BOOT_ID configFile getPath createConfigurationEntries platformConfiguration bootModel createFeatureEntries platformConfiguration pluginMap primaryFeatureId platformConfiguration platformConfiguration bootModel bootModel getPluginBase getVersion PluginVersionIdentifier bootVid PluginVersionIdentifier PluginVersionIdentifier breakVid PluginVersionIdentifier breakVid isGreaterThan bootVid repairConfigurationVersion
private static I Path get Transient Site Path I Plugin Model Base model boolean bundle false if model instanceof Bundle Plugin Model Base bundle true I Resource resource model get Underlying Resource if resource null I Path real Path resource get Location return real Path remove Last Segments bundle 4 3 else external TODO we may need to do something for external bundle paths here I Path path new Path model get Install Location return path remove Last Segments 2  IPath getTransientSitePath IPluginModelBase BundlePluginModelBase IResource getUnderlyingResource IPath realPath getLocation realPath removeLastSegments IPath getInstallLocation removeLastSegments
private static void repair Configuration Version URL url throws IO Exception File file new File url get File if file exists Properties p new Properties File Input Stream fis new File Input Stream file p load fis p set Property version 1 0 NON NLS 1 NON NLS 2 fis close File Output Stream fos new File Output Stream file p store fos new Date to String fos close  repairConfigurationVersion IOException getFile FileInputStream FileInputStream setProperty FileOutputStream FileOutputStream toString
private static void add To Site I Path path I Plugin Model Base model Array List sites for int i 0 i sites size i Local Site local Site Local Site sites get i if local Site get Path equals path local Site add model return First time add site Local Site local Site new Local Site path local Site add model sites add local Site  addToSite IPath IPluginModelBase ArrayList LocalSite localSite LocalSite localSite getPath localSite LocalSite localSite LocalSite localSite localSite
private static void create Configuration Entries I Platform Configuration config I Plugin Model Base boot Model Array List sites throws Core Exception MalformedURL Exception for int i 0 i sites size i Local Site local Site Local Site sites get i String plugins local Site get Relative Plugin List int policy I Platform Configuration I Site Policy USER INCLUDE I Platform Configuration I Site Policy site Policy config create Site Policy policy plugins I Platform Configuration I Site Entry site Entry config create Site Entry local Site getURL site Policy config configure Site site Entry if PDE Core get Default get Model Manager isOS Gi Runtime Set boot location I Path boot Path get Plugin Location boot Model URL bootURL new URL file boot Path toOS String NON NLS 1 config set Bootstrap Plugin Location BOOT ID bootURL config is Transient true  createConfigurationEntries IPlatformConfiguration IPluginModelBase bootModel ArrayList CoreException MalformedURLException LocalSite localSite LocalSite localSite getRelativePluginList IPlatformConfiguration ISitePolicy USER_INCLUDE IPlatformConfiguration ISitePolicy sitePolicy createSitePolicy IPlatformConfiguration ISiteEntry siteEntry createSiteEntry localSite sitePolicy configureSite siteEntry PDECore getDefault getModelManager isOSGiRuntime IPath bootPath getPluginLocation bootModel bootPath toOSString setBootstrapPluginLocation BOOT_ID isTransient
private static I Path get Plugin Location I Plugin Model Base model String location model get Install Location I Resource resource model get Underlying Resource if resource null if model instanceof I Bundle Plugin Model Base location resource get Location remove Last Segments 2 toOS String else location resource get Location remove Last Segments 1 toOS String return new Path location add Trailing Separator  IPath getPluginLocation IPluginModelBase getInstallLocation IResource getUnderlyingResource IBundlePluginModelBase getLocation removeLastSegments toOSString getLocation removeLastSegments toOSString addTrailingSeparator
private static void create Feature Entries I Platform Configuration config Tree Map plugin Map String primary Feature Id throws MalformedURL Exception I Path target Path External Model Manager get Eclipse Home if primary Feature Id null return We have primary feature Id I Feature Model feature Model load Primary Feature Model target Path primary Feature Id if feature Model null return I Feature feature feature Model get Feature String feature Version feature get Version String plugin Id primary Feature Id I Plugin Model Base primary Plugin I Plugin Model Base plugin Map get plugin Id if primary Plugin null return I Path plugin Path get Plugin Location primary Plugin URL pluginURL new URL file plugin Path to String NON NLS 1 URL root new URL pluginURL I Platform Configuration I Feature Entry feature Entry config create Feature Entry primary Feature Id feature Version plugin Id primary Plugin get Plugin Base get Version true null root config configure Feature Entry feature Entry feature Model dispose  createFeatureEntries IPlatformConfiguration TreeMap pluginMap primaryFeatureId MalformedURLException IPath targetPath ExternalModelManager getEclipseHome primaryFeatureId IFeatureModel featureModel loadPrimaryFeatureModel targetPath primaryFeatureId featureModel IFeature featureModel getFeature featureVersion getVersion pluginId primaryFeatureId IPluginModelBase primaryPlugin IPluginModelBase pluginMap pluginId primaryPlugin IPath pluginPath getPluginLocation primaryPlugin pluginPath toString IPlatformConfiguration IFeatureEntry featureEntry createFeatureEntry primaryFeatureId featureVersion pluginId primaryPlugin getPluginBase getVersion configureFeatureEntry featureEntry featureModel
private static I Feature Model load Primary Feature Model I Path target Path String feature Id File main Feature Dir target Path append features to File NON NLS 1 if main Feature Dir exists false main Feature Dir is Directory return null File feature Dirs main Feature Dir list Files Plugin Version Identifier best Vid null File best Dir null for int i 0 i feature Dirs length i File feature Dir feature Dirs i String name feature Dir get Name if feature Dir is Directory name starts With feature Id int loc name last Index Of   NON NLS 1 if loc 1 continue String version name substring loc 1 Plugin Version Identifier vid new Plugin Version Identifier version if best Vid null vid is Greater Than best Vid best Vid vid best Dir feature Dir if best Vid null return null We have a feature and know the version File manifest new File best Dir feature xml NON NLS 1 External Feature Model model new External Feature Model model set Install Location best Dir get Absolute Path Input Stream stream null boolean error false try stream new File Input Stream manifest model load stream false catch Exception e error true if stream null try stream close catch IO Exception e if error model is Loaded return null return model  IFeatureModel loadPrimaryFeatureModel IPath targetPath featureId mainFeatureDir targetPath toFile mainFeatureDir mainFeatureDir isDirectory featureDirs mainFeatureDir listFiles PluginVersionIdentifier bestVid bestDir featureDirs featureDir featureDirs featureDir getName featureDir isDirectory startsWith featureId lastIndexOf _ PluginVersionIdentifier PluginVersionIdentifier bestVid isGreaterThan bestVid bestVid bestDir featureDir bestVid bestDir ExternalFeatureModel ExternalFeatureModel setInstallLocation bestDir getAbsolutePath InputStream FileInputStream IOException isLoaded
private static String get Key I Plugin Model Base model if model is Loaded return model get Plugin Base get Id I Resource resource model get Underlying Resource if resource null return resource get Project get Name return model get Install Location  getKey IPluginModelBase isLoaded getPluginBase getId IResource getUnderlyingResource getProject getName getInstallLocation
private static String create Data Suffix I Path data if data null return NON NLS 1 String suffix data toOS String replace file and device separators with underscores suffix suffix replace File separator Char   return suffix replace    createDataSuffix IPath toOSString separatorChar _ _
private static String createURL I Plugin Model Base model return get Plugin Location model add Trailing Separator to String  IPluginModelBase getPluginLocation addTrailingSeparator toString
public static String getOS return get Property OS  getProperty
public static String getWS return get Property WS  getProperty
public static String getNL return get Property NL  getProperty
public static String getOS Arch return get Property ARCH  getOSArch getProperty
private static String get Property String key return PDE Core get Default get Plugin Preferences get String key  getProperty PDECore getDefault getPluginPreferences getString
private static Choice get Known Choices String values Choice choices new Choice values length for int i 0 i choices length i choices i new Choice values i values i return choices  getKnownChoices
public static Choice getOS Choices return get Known Choices Boot Loader knownOS Values  getOSChoices getKnownChoices BootLoader knownOSValues
public static Choice getWS Choices return get Known Choices Boot Loader knownWS Values  getWSChoices getKnownChoices BootLoader knownWSValues
public static Choice getNL Choices Locale locales Locale get Available Locales Choice choices new Choice locales length for int i 0 i locales length i Locale locale locales i choices i new Choice locale to String locale to String locale get Display Name NON NLS 1 return choices  getNLChoices getAvailableLocales toString toString getDisplayName
public static Choice get Arch Choices return get Known Choices Boot Loader knownOS Arch Values  getArchChoices getKnownChoices BootLoader knownOSArchValues

External Model Manager scanning Problems NON NLS 1 private static String get Mode URL urls String target Mode 2 1 NON NLS 1 for int i 0 i urls length i if urls i get File index Of org eclipse osgi 1 NON NLS 1 target Mode null return target Mode  ExternalModelManager scanningProblems getMode targetMode getFile indexOf targetMode targetMode
public static void load URL urls PDE State state I Progress Monitor monitor String target Mode get Mode urls state set Target Mode target Mode monitor begin Task urls length NON NLS 1 for int i 0 i urls length i state add Bundle new File urls i get File monitor worked 1  PDEState IProgressMonitor targetMode getMode setTargetMode targetMode beginTask addBundle getFile
public static I Plugin Model Base load Models URL urls boolean resolve PDE State state I Progress Monitor monitor if monitor null monitor new Null Progress Monitor monitor begin Task PDE Core get Resource String Target Platform Registry Loader parsing 10 NON NLS 1 load urls state new Sub Progress Monitor monitor 8 state resolve State monitor worked 1 if resolve log Resolution Errors state get State Bundle Description bundle Descriptions resolve state get State get Resolved Bundles state get State get Bundles I Plugin Model Base models new I Plugin Model Base bundle Descriptions length for int i 0 i bundle Descriptions length i monitor sub Task bundle Descriptions i get Symbolic Name models i create Model From Description bundle Descriptions i state monitor done return models  IPluginModelBase loadModels PDEState IProgressMonitor NullProgressMonitor beginTask PDECore getResourceString TargetPlatformRegistryLoader SubProgressMonitor resolveState logResolutionErrors getState BundleDescription bundleDescriptions getState getResolvedBundles getState getBundles IPluginModelBase IPluginModelBase bundleDescriptions bundleDescriptions subTask bundleDescriptions getSymbolicName createModelFromDescription bundleDescriptions
private static void log Resolution Errors State state Multi Status errors new Multi Status PDE Core get Plugin Id 1 PDE Core get Resource String KEY SCANNING PROBLEMS null State Helper helper acquire State Helper Bundle Description all state get Bundles for int i 0 i all length i if all i is Resolved Version Constraint unsatisfied Constraints helper get Unsatisfied Constraints all i if unsatisfied Constraints length 0 Bundle Description active Bundle find Active Bundle state all i get Symbolic Name if active Bundle null String message PDE Core get Formatted Message ECLIPSE IGNORE all i get Location NON NLS 1 errors add new Status I Status ERROR all i get Symbolic Name I Status WARNING message null else String message PDE Core get Formatted Message ECLIPSE OTHER VERSION new String all i get Location active Bundle get Location NON NLS 1 errors add new Status I Status INFO all i get Symbolic Name I Status INFO message null else for int j 0 j unsatisfied Constraints length j String message get Resolution Failure Message unsatisfied Constraints j errors add new Status I Status WARNING all i get Symbolic Name I Status WARNING message null if errors get Children length 0 PDE Core log errors  logResolutionErrors MultiStatus MultiStatus PDECore getPluginId PDECore getResourceString KEY_SCANNING_PROBLEMS StateHelper acquireStateHelper BundleDescription getBundles isResolved VersionConstraint unsatisfiedConstraints getUnsatisfiedConstraints unsatisfiedConstraints BundleDescription activeBundle findActiveBundle getSymbolicName activeBundle PDECore getFormattedMessage ECLIPSE_IGNORE getLocation IStatus getSymbolicName IStatus PDECore getFormattedMessage ECLIPSE_OTHER_VERSION getLocation activeBundle getLocation IStatus getSymbolicName IStatus unsatisfiedConstraints getResolutionFailureMessage unsatisfiedConstraints IStatus getSymbolicName IStatus getChildren PDECore
private static Bundle Description find Active Bundle State state String symbolic Name Bundle Description bundles state get Bundles symbolic Name for int i 0 i bundles length i if bundles i is Resolved return bundles i return null  BundleDescription findActiveBundle symbolicName BundleDescription getBundles symbolicName isResolved
public static String get Resolution Failure Message Version Constraint unsatisfied if unsatisfied is Resolved throw new Illegal Argument Exception if unsatisfied instanceof Package Specification return PDE Core get Formatted Message ECLIPSE MISSING IMPORTED PACKAGE to String unsatisfied NON NLS 1 if unsatisfied instanceof Bundle Specification if Bundle Specification unsatisfied is Optional return PDE Core get Formatted Message ECLIPSE MISSING OPTIONAL REQUIRED BUNDLE to String unsatisfied NON NLS 1 return PDE Core get Formatted Message ECLIPSE MISSING REQUIRED BUNDLE to String unsatisfied NON NLS 1 return PDE Core get Formatted Message ECLIPSE MISSING HOST to String unsatisfied NON NLS 1  getResolutionFailureMessage VersionConstraint isResolved IllegalArgumentException PackageSpecification PDECore getFormattedMessage ECLIPSE_MISSING_IMPORTED_PACKAGE toString BundleSpecification BundleSpecification isOptional PDECore getFormattedMessage ECLIPSE_MISSING_OPTIONAL_REQUIRED_BUNDLE toString PDECore getFormattedMessage ECLIPSE_MISSING_REQUIRED_BUNDLE toString PDECore getFormattedMessage ECLIPSE_MISSING_HOST toString
private static String to String Version Constraint constraint Version Range version Range constraint get Version Range if version Range null version Range get Minimum null return constraint get Name return constraint get Name   version Range  toString VersionConstraint VersionRange versionRange getVersionRange versionRange versionRange getMinimum getName getName _ versionRange
public static I Plugin Model Base load Models URL urls boolean resolve I Progress Monitor monitor PDE State state new PDE State return load Models urls resolve state monitor  IPluginModelBase loadModels IProgressMonitor PDEState PDEState loadModels
param description return private static I Plugin Model Base create Model From Description Bundle Description description PDE State state External Plugin Model Base model null if description get Host null model new External Plugin Model else model new External Fragment Model model load description state return model  IPluginModelBase createModelFromDescription BundleDescription PDEState ExternalPluginModelBase getHost ExternalPluginModel ExternalFragmentModel
private static State Helper acquire State Helper return PDE Core get Default acquire Platform get State Helper  StateHelper acquireStateHelper PDECore getDefault acquirePlatform getStateHelper

private Properties template public Tracing Options Manager super  TracingOptionsManager
private void create Template template new Properties I Plugin Model Base models PDE Core get Default get Model Manager get Plugins for int i 0 i models length i add To Template models i  createTemplate IPluginModelBase PDECore getDefault getModelManager getPlugins addToTemplate
private void add To Template I Plugin Model Base model Properties model Options get Options model if model Options null return for Enumeration enum model Options keys enum has More Elements String key enum next Element to String String value model Options get Property key if key null value null template set Property key value  addToTemplate IPluginModelBase modelOptions getOptions modelOptions modelOptions hasMoreElements nextElement toString modelOptions getProperty setProperty
private Properties get Options I Plugin Model Base model Input Stream stream open Input Stream model if stream null Properties model Options new Properties try model Options load stream stream close return model Options catch IO Exception e return null  getOptions IPluginModelBase InputStream openInputStream modelOptions modelOptions modelOptions IOException
public Hashtable get Template Table String plugin Id if template null create Template Hashtable defaults new Hashtable for Enumeration enum template keys enum has More Elements String key enum next Element to String if belongs To key plugin Id defaults put key template get key return defaults  getTemplateTable pluginId createTemplate hasMoreElements nextElement toString belongsTo pluginId
private boolean belongs To String option String plugin Id I Path path new Path option String first Segment path segment 0 return plugin Id equals Ignore Case first Segment  belongsTo pluginId IPath firstSegment pluginId equalsIgnoreCase firstSegment
public Properties get Tracing Options Map stored Options Start with the fresh template from plugins Properties defaults get Tracing Template Copy if stored Options null Load stored values but only for existing keys Iterator iter stored Options key Set iterator while iter has Next String key iter next to String if defaults contains Key key defaults set Property key String stored Options get key return defaults  getTracingOptions storedOptions getTracingTemplateCopy storedOptions storedOptions keySet hasNext toString containsKey setProperty storedOptions
public Properties get Tracing Template Copy if template null create Template return Properties template clone  getTracingTemplateCopy createTemplate
public static boolean is Traceable I Plugin Model Base model if model get Underlying Resource null I Project project model get Underlying Resource get Project I Path path project get Full Path append options NON NLS 1 I File file project get Workspace get Root get File path return file exists else String location model get Install Location String file Name location File separator options NON NLS 1 File file new File file Name return file exists  isTraceable IPluginModelBase getUnderlyingResource IProject getUnderlyingResource getProject IPath getFullPath IFile getWorkspace getRoot getFile getInstallLocation fileName fileName
private Input Stream open Input Stream I Plugin Model Base model if model get Underlying Resource null I Project project model get Underlying Resource get Project I Path path project get Full Path append options NON NLS 1 I File file project get Workspace get Root get File path if file exists try return file get Contents catch Core Exception e else String file Name model get Install Location File separator options NON NLS 1 File file new File file Name try return new File Input Stream file catch File Not Found Exception e return null  InputStream openInputStream IPluginModelBase getUnderlyingResource IProject getUnderlyingResource getProject IPath getFullPath IFile getWorkspace getRoot getFile getContents CoreException fileName getInstallLocation fileName FileInputStream FileNotFoundException
public void reset template null 
private void save String file Name Properties properties try File Output Stream stream new File Output Stream file Name properties store stream Master Tracing Options NON NLS 1 stream flush stream close catch IO Exception e PDE Core log Exception e  fileName FileOutputStream FileOutputStream fileName IOException PDECore logException
public void save String filename Map map Hash Set selected Properties properties get Tracing Options map for Enumeration enum properties keys enum has More Elements String key enum next Element to String Path path new Path key if path segment Count 1 selected contains path segment 0 to String properties remove key save filename properties  HashSet getTracingOptions hasMoreElements nextElement toString segmentCount toString
public void save String filename Map map save filename get Tracing Options map  getTracingOptions

public static String create Writable Name String source if source index Of 1 return source has blanks String Buffer writable Name new String Buffer for int i 0 i source length i char c source char At i if c writable Name append NON NLS 1 else writable Name append c return writable Name to String  createWritableName indexOf StringBuffer writableName StringBuffer charAt writableName writableName writableName toString
public static String create Escaped Value String value if required escape property values as uXXXX String Buffer buf new String Buffer value length 2 assume expansion by less than factor of 2 for int i 0 i value length i char character value char At i if character character t character r character n character f handle characters requiring leading buf append buf append character else if character 0x0020 character 0x007e handle characters outside base range encoded buf append buf append u buf append HEX character 12 0xF first nibble buf append HEX character 8 0xF second nibble buf append HEX character 4 0xF third nibble buf append HEX character 0xF fourth nibble else handle base characters buf append character return buf to String  createEscapedValue StringBuffer StringBuffer charAt toString
public static void write Key Value Pair String indent String name String value Print Writer writer String writable Name create Writable Name name writer print writable Name NON NLS 1 writer println Properties Util create Escaped Value value  writeKeyValuePair PrintWriter writableName createWritableName writableName PropertiesUtil createEscapedValue
public static void write Key Value Pair String indent String name Enumeration tokens Print Writer writer String writable Name create Writable Name name writer print writable Name NON NLS 1 if tokens has More Elements writer println return int indent Length name length 3 for tokens has More Elements String token tokens next Element to String writer print Properties Util create Escaped Value token if tokens has More Elements writer println NON NLS 1 for int j 0 j indent Length j writer print NON NLS 1 else writer println NON NLS 1  writeKeyValuePair PrintWriter writableName createWritableName writableName hasMoreElements indentLength hasMoreElements nextElement toString PropertiesUtil createEscapedValue hasMoreElements indentLength
public static String write Key Value Pair String name String tokens String Buffer buffer new String Buffer buffer append create Writable Name name buffer append NON NLS 1 int indent Length name length 3 for int i 0 i tokens length i buffer append create Escaped Value tokens i if i tokens length 1 buffer append System get Property line separator NON NLS 1 NON NLS 2 for int j 0 j indent Length j buffer append NON NLS 1 buffer append System get Property line separator NON NLS 1 return buffer to String  writeKeyValuePair StringBuffer StringBuffer createWritableName indentLength createEscapedValue getProperty indentLength getProperty toString

int start inclusive int end exclusive public Position int start int end this start start this end end 
this end end public int get Start return start  getStart
return start public int get End return end  getEnd
String Matcher constructor takes in a String object that is a simple pattern which may contain for 0 and many characters and for exactly one character Literal and characters must be escaped in the pattern e g means literal etc Escaping any other character including the escape character itself just results in that character in the pattern e g a means a and means If invoking the String Matcher with string literals in Java don t forget escape characters are represented by param pattern the pattern to match text against param ignore Case if true case is ignored param ignore Wild Cards if true wild cards and their escape sequences are ignored everything is taken literally public String Matcher String pattern boolean ignore Case boolean ignore Wild Cards f Ignore Case ignore Case f Ignore Wild Cards ignore Wild Cards set Pattern pattern  StringMatcher StringMatcher ignoreCase ignoreWildCards StringMatcher ignoreCase ignoreWildCards fIgnoreCase ignoreCase fIgnoreWildCards ignoreWildCards setPattern
public void set Pattern String pattern if pattern null throw new Illegal Argument Exception f Pattern pattern f Length pattern length f Has Leading Star false f Has Trailing Star false f Bound 0 f Segments null if f Ignore Wild Cards parse No Wild Cards else parse Wild Cards  setPattern IllegalArgumentException fPattern fLength fHasLeadingStar fHasTrailingStar fBound fSegments fIgnoreWildCards parseNoWildCards parseWildCards
Find the first occurrence of the pattern between code start code inclusive and code end code exclusive param code text code the String object to search in param code start code the starting index of the search range inclusive param code end code the ending index of the search range exclusive return an code String Matcher Position code object that keeps the starting inclusive and ending positions exclusive of the first occurrence of the pattern in the specified range of the text return null if not found or subtext is empty start end A pair of zeros is returned if pattern is empty string Note that for pattern like abc with leading and trailing stars position of abc is returned For a pattern like in text abcdf 1 3 is returned public String Matcher Position find String text int start int end if text null throw new Illegal Argument Exception int tlen text length if start 0 start 0 if end tlen end tlen if end 0 start end return null if f Length 0 return new Position start start if f Ignore Wild Cards int x pos In text start end if x 0 return null return new Position x x f Length int seg Count f Segments length if seg Count 0 pattern contains only s return new Position start end int cur Pos start int match Start 1 int i for i 0 i seg Count cur Pos end i String current f Segments i int next Match reg Exp Pos In text cur Pos end current if next Match 0 return null if i 0 match Start next Match cur Pos next Match current length if i seg Count return null return new Position match Start cur Pos  StringMatcher StringMatcher IllegalArgumentException fLength fIgnoreWildCards posIn fLength segCount fSegments segCount curPos matchStart segCount curPos fSegments nextMatch regExpPosIn curPos nextMatch matchStart nextMatch curPos nextMatch segCount matchStart curPos
match the given code text code with the pattern return true if matched eitherwise false param code text code a String object public boolean match String text return match text 0 text length 
Given the starting inclusive and the ending exclusive positions in the code text code determine if the given substring matches with a Pattern return true if the specified portion of the text matches the pattern param String code text code a String object that contains the substring to match param int code start code marks the starting position inclusive of the substring param int code end code marks the ending index exclusive of the substring public boolean match String text int start int end if null text throw new Illegal Argument Exception if start end return false if f Ignore Wild Cards return end start f Length f Pattern region Matches f Ignore Case 0 text start f Length int seg Count f Segments length if seg Count 0 f Has Leading Star f Has Trailing Star pattern contains only s return true if start end return f Length 0 if f Length 0 return start end int tlen text length if start 0 start 0 if end tlen end tlen int t Cur Pos start int bound end f Bound if bound 0 return false int i 0 String current f Segments i int seg Length current length process first segment if f Has Leading Star if reg Exp Region Matches text start current 0 seg Length return false else i t Cur Pos t Cur Pos seg Length if f Segments length 1 f Has Leading Star f Has Trailing Star only one segment to match no wildcards specified return t Cur Pos end process middle segments while i seg Count current f Segments i int current Match int k current index Of f Single Wild Card if k 0 current Match text Pos In text t Cur Pos end current if current Match 0 return false else current Match reg Exp Pos In text t Cur Pos end current if current Match 0 return false t Cur Pos current Match current length i process final segment if f Has Trailing Star t Cur Pos end int clen current length return reg Exp Region Matches text end clen current 0 clen return i seg Count  aPattern IllegalArgumentException fIgnoreWildCards fLength fPattern regionMatches fIgnoreCase fLength segCount fSegments segCount fHasLeadingStar fHasTrailingStar fLength fLength tCurPos fBound fSegments segLength fHasLeadingStar regExpRegionMatches segLength tCurPos tCurPos segLength fSegments fHasLeadingStar fHasTrailingStar tCurPos segCount fSegments currentMatch indexOf fSingleWildCard currentMatch textPosIn tCurPos currentMatch currentMatch regExpPosIn tCurPos currentMatch tCurPos currentMatch fHasTrailingStar tCurPos regExpRegionMatches segCount
This method parses the given pattern into segments seperated by wildcard characters Since wildcards are not being used in this case the pattern consists of a single segment private void parse No Wild Cards f Segments new String 1 f Segments 0 f Pattern f Bound f Length  parseNoWildCards fSegments fSegments fPattern fBound fLength
Parses the given pattern into segments seperated by wildcard characters param p a String object that is a simple regular expression with and or private void parse Wild Cards if f Pattern starts With NON NLS 1 f Has Leading Star true if f Pattern ends With NON NLS 1 make sure it s not an escaped wildcard if f Length 1 f Pattern char At f Length 2 f Has Trailing Star true Vector temp new Vector int pos 0 String Buffer buf new String Buffer while pos f Length char c f Pattern char At pos switch c case if pos f Length buf append c else char next f Pattern char At pos if it s an escape sequence if next next next buf append next else not an escape sequence just insert literally buf append c buf append next break case if buf length 0 new segment temp add Element buf to String f Bound buf length buf set Length 0 break case append special character representing single match wildcard buf append f Single Wild Card break default buf append c add last buffer to segment list if buf length 0 temp add Element buf to String f Bound buf length f Segments new String temp size temp copy Into f Segments  parseWildCards fPattern startsWith fHasLeadingStar fPattern endsWith fLength fPattern charAt fLength fHasTrailingStar StringBuffer StringBuffer fLength fPattern charAt fLength fPattern charAt addElement toString fBound setLength fSingleWildCard addElement toString fBound fSegments copyInto fSegments
param code text code a string which contains no wildcard param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive return the starting index in the text of the pattern or 1 if not found protected int pos In String text int start int end no wild card in pattern int max end f Length if f Ignore Case int i text index Of f Pattern start if i 1 i max return 1 return i for int i start i max i if text region Matches true i f Pattern 0 f Length return i return 1  posIn fLength fIgnoreCase indexOf fPattern regionMatches fPattern fLength
param code text code a simple regular expression that may only contain s param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a simple regular expression that may contains param code case Ignored code wether the pattern is not casesensitive return the starting index in the text of the pattern or 1 if not found protected int reg Exp Pos In String text int start int end String p int plen p length int max end plen for int i start i max i if reg Exp Region Matches text i p 0 plen return i return 1  caseIgnored regExpPosIn regExpRegionMatches
return boolean param code text code a String to match param code start code int that indicates the starting index of match inclusive param code end code int that indicates the ending index of match exclusive param code p code String String a simple regular expression that may contain param code ignore Case code boolean indicating wether code p code is case sensitive protected boolean reg Exp Region Matches String text int t Start String p int p Start int plen while plen 0 char tchar text char At t Start char pchar p char At p Start process wild cards if f Ignore Wild Cards skip single wild cards if pchar f Single Wild Card continue if pchar tchar continue if f Ignore Case if Character to Upper Case tchar Character to Upper Case pchar continue comparing after converting to upper case doesn t handle all cases also compare after converting to lower case if Character to Lower Case tchar Character to Lower Case pchar continue return false return true  ignoreCase regExpRegionMatches tStart pStart charAt tStart charAt pStart fIgnoreWildCards fSingleWildCard fIgnoreCase toUpperCase toUpperCase toLowerCase toLowerCase
param code text code the string to match param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a string that has no wildcard param code ignore Case code boolean indicating wether code p code is case sensitive return the starting index in the text of the pattern or 1 if not found protected int text Pos In String text int start int end String p int plen p length int max end plen if f Ignore Case int i text index Of p start if i 1 i max return 1 return i for int i start i max i if text region Matches true i p 0 plen return i return 1  ignoreCase textPosIn fIgnoreCase indexOf regionMatches

int type public Model Change I Model model boolean added this model model this type added I Model Provider Event MODELS ADDED I Model Provider Event MODELS REMOVED  ModelChange IModel IModelProviderEvent MODELS_ADDED IModelProviderEvent MODELS_REMOVED
I Model Provider Event MODELS REMOVED public Model Change I Model model this model model this type I Model Provider Event MODELS CHANGED  IModelProviderEvent MODELS_REMOVED ModelChange IModel IModelProviderEvent MODELS_CHANGED
public static boolean is Plugin Project I Project project if project is Open return has Bundle Manifest project has Plugin Manifest project has Fragment Manifest project return false  isPluginProject IProject isOpen hasBundleManifest hasPluginManifest hasFragmentManifest
public static boolean has Bundle Manifest I Project project return project exists new Path META INF MANIFEST MF NON NLS 1  hasBundleManifest IProject
public static boolean has Plugin Manifest I Project project return project exists new Path plugin xml NON NLS 1  hasPluginManifest IProject
public static boolean has Fragment Manifest I Project project return project exists new Path fragment xml NON NLS 1  hasFragmentManifest IProject
public static boolean has Feature Manifest I Project project return project exists new Path feature xml NON NLS 1  hasFeatureManifest IProject
public static boolean is Feature Project I Project project if project is Open return project exists new Path feature xml NON NLS 1 return false  isFeatureProject IProject isOpen
public static boolean is Binary Plugin Project I Project project if is Plugin Project project try String binary project get Persistent Property PDE Core EXTERNAL PROJECT PROPERTY if binary null Repository Provider provider Repository Provider get Provider project return provider null provider instanceof Binary Repository Provider catch Core Exception e PDE Core log Exception e return false  isBinaryPluginProject IProject isPluginProject getPersistentProperty PDECore EXTERNAL_PROJECT_PROPERTY RepositoryProvider RepositoryProvider getProvider BinaryRepositoryProvider CoreException PDECore logException
public static boolean is Java Plugin Project I Project project if is Plugin Project project try if project has Nature Java Core NATURE ID return true catch Core Exception e return false  isJavaPluginProject IProject isPluginProject hasNature JavaCore NATURE_ID CoreException
public static boolean is Unshared Plugin Project I Project project return Repository Provider get Provider project null is Binary Plugin Project project  isUnsharedPluginProject IProject RepositoryProvider getProvider isBinaryPluginProject
public Workspace Model Manager super  WorkspaceModelManager
see org eclipse pde core I Workspace Model Manager get All Editable Models Unused java lang Class public boolean get All Editable Models Unused Class model Class return true  IWorkspaceModelManager getAllEditableModelsUnused getAllEditableModelsUnused modelClass
private I Model get Workspace Model I Project project initialize Workspace Models if has Feature Manifest project return get Workspace Model project f Feature Models if has Bundle Manifest project I Model model I Model f Models get project return model null model I Model f Fragment Models get project if has Plugin Manifest project return I Model f Models get project if has Fragment Manifest project return I Model f Fragment Models get project return null  IModel getWorkspaceModel IProject initializeWorkspaceModels hasFeatureManifest getWorkspaceModel fFeatureModels hasBundleManifest IModel IModel fModels IModel fFragmentModels hasPluginManifest IModel fModels hasFragmentManifest IModel fFragmentModels
public I Plugin Model Base get Workspace Plugin Model I Project project I Model model get Workspace Model project return model instanceof I Plugin Model Base I Plugin Model Base model null  IPluginModelBase getWorkspacePluginModel IProject IModel getWorkspaceModel IPluginModelBase IPluginModelBase
public I Feature Model get Feature Model I Project project I Model model get Workspace Model project return model instanceof I Feature Model I Feature Model model null  IFeatureModel getFeatureModel IProject IModel getWorkspaceModel IFeatureModel IFeatureModel
private void handle File Delta I Resource Delta delta I File file I File delta get Resource if file get Name equals options NON NLS 1 PDE Core get Default get Tracing Options Manager reset return if file get Name equals build properties is Plugin Project file get Project NON NLS 1 fire Models Changed new I Model get Workspace Model file get Project return if is Supported File file return int kind delta get Kind switch kind case I Resource Delta ADDED handle File Added file break case I Resource Delta REMOVED handle File Removed file break case I Resource Delta CHANGED handle File Changed file delta break  handleFileDelta IResourceDelta IFile IFile getResource getName PDECore getDefault getTracingOptionsManager getName isPluginProject getProject fireModelsChanged IModel getWorkspaceModel getProject isSupportedFile getKind IResourceDelta handleFileAdded IResourceDelta handleFileRemoved IResourceDelta handleFileChanged
private void handle File Added I File file I Model model get Workspace Model file if model null remove Workspace Model file get Project add Workspace Model file get Project true  handleFileAdded IFile IModel getWorkspaceModel removeWorkspaceModel getProject addWorkspaceModel getProject
private void handle File Removed I File file I Model model get Workspace Model file String file Name file get Name to Lower Case if model null if model instanceof I Bundle Plugin Model Base I Bundle Plugin Model Base b Model I Bundle Plugin Model Base model if file Name equals plugin xml file Name equals fragment xml NON NLS 1 NON NLS 2 b Model set Extensions Model null else remove Workspace Model file get Project if b Model get Extensions Model null switch To Plugin Mode b Model else remove Workspace Model file get Project  handleFileRemoved IFile IModel getWorkspaceModel fileName getName toLowerCase IBundlePluginModelBase IBundlePluginModelBase bModel IBundlePluginModelBase fileName fileName bModel setExtensionsModel removeWorkspaceModel getProject bModel getExtensionsModel switchToPluginMode bModel removeWorkspaceModel getProject
private void switch To Plugin Mode I Bundle Plugin Model Base b Model I Plugin Model Base model null I Project project b Model get Underlying Resource get Project if b Model instanceof I Bundle Plugin Model model create Workspace Plugin Model project get File plugin xml NON NLS 1 else model create Workspace Fragment Model project get File fragment xml NON NLS 1 if model null model get Plugin Base get Id null if model instanceof I Plugin Model f Models put project model else f Fragment Models put project model if f Changed Models null f Changed Models new Array List f Changed Models add new Model Change model true  switchToPluginMode IBundlePluginModelBase bModel IPluginModelBase IProject bModel getUnderlyingResource getProject bModel IBundlePluginModel createWorkspacePluginModel getFile createWorkspaceFragmentModel getFile getPluginBase getId IPluginModel fModels fFragmentModels fChangedModels fChangedModels ArrayList fChangedModels ModelChange
private void handle File Changed I File file I Resource Delta delta I Model model get Workspace Model file if model null handle File Added file return if I Resource Delta CONTENT delta get Flags 0 if model instanceof I Bundle Plugin Model Base if is Bundle Manifest File file load Model I Bundle Plugin Model Base model get Bundle Model true else load Model I Bundle Plugin Model Base model get Extensions Model true else load Model model true if model instanceof I Plugin Model Base String id I Plugin Model Base model get Plugin Base get Id if id null id length 0 return overwrite old model if one exists add a new model if none already existed add Workspace Model file get Project true fire Models Changed new I Model model  handleFileChanged IFile IResourceDelta IModel getWorkspaceModel handleFileAdded IResourceDelta getFlags IBundlePluginModelBase isBundleManifestFile loadModel IBundlePluginModelBase getBundleModel loadModel IBundlePluginModelBase getExtensionsModel loadModel IPluginModelBase IPluginModelBase getPluginBase getId addWorkspaceModel getProject fireModelsChanged IModel
public void fire Models Changed I Model models Model Provider Event event new Model Provider Event this I Model Provider Event MODELS CHANGED null null models fire Model Provider Event event  fireModelsChanged IModel ModelProviderEvent ModelProviderEvent IModelProviderEvent MODELS_CHANGED fireModelProviderEvent
private boolean is Supported File I File file if is Bundle Manifest File file return true String name file get Name to Lower Case if name equals plugin xml name equals fragment xml NON NLS 1 NON NLS 2 name equals feature xml NON NLS 1 return false I Path expected Path file get Project get Full Path append name return expected Path equals file get Full Path  isSupportedFile IFile isBundleManifestFile getName toLowerCase IPath expectedPath getProject getFullPath expectedPath getFullPath
private boolean is Bundle Manifest File I File file I Path path file get Project Relative Path return path segment Count 2 path segment 0 equals META INF NON NLS 1 path segment 1 equals MANIFEST MF NON NLS 1  isBundleManifestFile IFile IPath getProjectRelativePath segmentCount
private I Model get Workspace Model I File file I Project project file get Project if is Bundle Manifest File file I Model model I Model f Models get project return model null model I Model f Fragment Models get project I Path path file get Project Relative Path if path equals new Path plugin xml NON NLS 1 return I Model f Models get project if path equals new Path fragment xml NON NLS 1 return I Model f Fragment Models get project if path equals new Path feature xml NON NLS 1 return get Workspace Model file get Project f Feature Models return null  IModel getWorkspaceModel IFile IProject getProject isBundleManifestFile IModel IModel fModels IModel fFragmentModels IPath getProjectRelativePath IModel fModels IModel fFragmentModels getWorkspaceModel getProject fFeatureModels
private I Model get Workspace Model I Project project List models for int i 0 i models size i I Model model I Model models get i I File file I File model get Underlying Resource if file get Project equals project return model return null  IModel getWorkspaceModel IProject IModel IModel IFile IFile getUnderlyingResource getProject
public I Plugin Model Base get All Models initialize Workspace Models Array List result new Array List Iterator iter f Models values iterator while iter has Next result add iter next iter f Fragment Models values iterator while iter has Next result add iter next return I Plugin Model Base result to Array new I Plugin Model Base result size  IPluginModelBase getAllModels initializeWorkspaceModels ArrayList ArrayList fModels hasNext fFragmentModels hasNext IPluginModelBase toArray IPluginModelBase
see org eclipse pde core I Model Provider remove Model Provider Listener org eclipse pde core I Model Provider Listener public void remove Model Provider Listener I Model Provider Listener listener f Listeners remove listener  IModelProvider removeModelProviderListener IModelProviderListener removeModelProviderListener IModelProviderListener fListeners
see org eclipse pde core I Model Provider add Model Provider Listener org eclipse pde core I Model Provider Listener public void add Model Provider Listener I Model Provider Listener listener f Listeners add listener  IModelProvider addModelProviderListener IModelProviderListener addModelProviderListener IModelProviderListener fListeners
public void resource Changed I Resource Change Event event switch event get Type case I Resource Change Event POST CHANGE handle Resource Delta event get Delta process Model Changes break case I Resource Change Event PRE CLOSE I Project project I Project event get Resource remove Workspace Model project process Model Changes break  resourceChanged IResourceChangeEvent getType IResourceChangeEvent POST_CHANGE handleResourceDelta getDelta processModelChanges IResourceChangeEvent PRE_CLOSE IProject IProject getResource removeWorkspaceModel processModelChanges
param project private void remove Workspace Model I Project project I Model model null if f Models contains Key project model I Model f Models remove project else if f Fragment Models contains Key project model I Model f Fragment Models remove project else model get Workspace Model project f Feature Models if model null f Feature Models remove model if model null if model instanceof I Plugin Model Base PDE Core get Default get Tracing Options Manager reset if f Changed Models null f Changed Models new Array List f Changed Models add new Model Change model false  removeWorkspaceModel IProject IModel fModels containsKey IModel fModels fFragmentModels containsKey IModel fFragmentModels getWorkspaceModel fFeatureModels fFeatureModels IPluginModelBase PDECore getDefault getTracingOptionsManager fChangedModels fChangedModels ArrayList fChangedModels ModelChange
param delta private void handle Resource Delta I Resource Delta delta try delta accept this catch Core Exception e PDE Core log Exception e  handleResourceDelta IResourceDelta CoreException PDECore logException
public boolean visit I Resource Delta delta throws Core Exception if delta null I Resource resource delta get Resource if resource instanceof I Project I Project project I Project resource if delta get Kind I Resource Delta ADDED project is Open delta get Flags I Resource Delta OPEN 0 add Workspace Model project true return false else if delta get Kind I Resource Delta REMOVED remove Workspace Model project return false return true else if resource instanceof I File handle File Delta delta else if resource instanceof I Folder return resource get Name equals META INF NON NLS 1 return true  IResourceDelta CoreException IResource getResource IProject IProject IProject getKind IResourceDelta isOpen getFlags IResourceDelta addWorkspaceModel getKind IResourceDelta removeWorkspaceModel IFile handleFileDelta IFolder getName
private synchronized void initialize Workspace Models if f Initialized f Models Locked return f Models Locked true f Models Collections synchronized Map new Hash Map f Fragment Models Collections synchronized Map new Hash Map f Feature Models Collections synchronized List new Array List I Workspace workspace PDE Core get Workspace I Project projects workspace get Root get Projects must do plugins fragments before features for int i 0 i projects length i I Project project projects i if is Plugin Project project continue add Workspace Model project false must do features after plugins fragments for int i 0 i projects length i I Project project projects i if is Feature Project project continue add Workspace Model project false workspace add Resource Change Listener this I Resource Change Event PRE CLOSE Java Core add Pre Processing Resource Changed Listener this f Models Locked false f Initialized true  initializeWorkspaceModels fInitialized fModelsLocked fModelsLocked fModels synchronizedMap HashMap fFragmentModels synchronizedMap HashMap fFeatureModels synchronizedList ArrayList IWorkspace PDECore getWorkspace IProject getRoot getProjects IProject isPluginProject addWorkspaceModel IProject isFeatureProject addWorkspaceModel addResourceChangeListener IResourceChangeEvent PRE_CLOSE JavaCore addPreProcessingResourceChangedListener fModelsLocked fInitialized
param project return private I Feature Model create Feature Model I File file if file exists return null Workspace Feature Model model new Workspace Feature Model file load Model model false return model  IFeatureModel createFeatureModel IFile WorkspaceFeatureModel WorkspaceFeatureModel loadModel
private I Plugin Model Base create Plugin Model I Project project if has Bundle Manifest project return create Workspace Bundle Model project get File META INF MANIFEST MF NON NLS 1 if has Plugin Manifest project return create Workspace Plugin Model project get File plugin xml NON NLS 1 return create Workspace Fragment Model project get File fragment xml NON NLS 1  IPluginModelBase createPluginModel IProject hasBundleManifest createWorkspaceBundleModel getFile hasPluginManifest createWorkspacePluginModel getFile createWorkspaceFragmentModel getFile
param file return private I Plugin Model Base create Workspace Plugin Model I File file if file exists return null Workspace Plugin Model model new Workspace Plugin Model file load Model model false return model  IPluginModelBase createWorkspacePluginModel IFile WorkspacePluginModel WorkspacePluginModel loadModel
param file return private I Plugin Model Base create Workspace Fragment Model I File file if file exists return null Workspace Fragment Model model new Workspace Fragment Model file load Model model false return model  IPluginModelBase createWorkspaceFragmentModel IFile WorkspaceFragmentModel WorkspaceFragmentModel loadModel
param file return private I Plugin Model Base create Workspace Bundle Model I File file if file exists return null PDE State state PDE Core get Default get External Model Manager get State Bundle Description desc state add Bundle new File file get Location remove Last Segments 2 to String if desc null return null if desc get Symbolic Name null desc get Symbolic Name length 0 return null Workspace Bundle Model model new Workspace Bundle Model file load Model model false I Bundle Plugin Model Base bmodel null boolean fragment model is Fragment Model if fragment bmodel new Bundle Fragment Model else bmodel new Bundle Plugin Model bmodel set Enabled true bmodel set Bundle Model model bmodel set Bundle Description desc I File efile file get Project get File fragment fragment xml plugin xml NON NLS 1 NON NLS 2 if efile exists Workspace Extensions Model ext Model new Workspace Extensions Model efile load Model ext Model false bmodel set Extensions Model ext Model ext Model set Bundle Model bmodel return bmodel  IPluginModelBase createWorkspaceBundleModel IFile PDEState PDECore getDefault getExternalModelManager getState BundleDescription addBundle getLocation removeLastSegments toString getSymbolicName getSymbolicName WorkspaceBundleModel WorkspaceBundleModel loadModel IBundlePluginModelBase isFragmentModel BundleFragmentModel BundlePluginModel setEnabled setBundleModel setBundleDescription IFile getProject getFile WorkspaceExtensionsModel extModel WorkspaceExtensionsModel loadModel extModel setExtensionsModel extModel extModel setBundleModel
private void load Model I Model model boolean reload I File file I File model get Underlying Resource Input Stream stream null boolean out Of Sync false try stream file get Contents false catch Core Exception e out Of Sync true try stream file get Contents true catch Core Exception e2 PDE Core log Exception e return try if reload model reload stream out Of Sync else model load stream out Of Sync stream close catch Exception e PDE Core log Exception e  loadModel IModel IFile IFile getUnderlyingResource InputStream outOfSync getContents CoreException outOfSync getContents CoreException PDECore logException outOfSync outOfSync PDECore logException
param project private void add Workspace Model I Project project boolean notify I Model model null if is Plugin Project project model create Plugin Model project if model null if model instanceof I Fragment Model f Fragment Models put project model else f Models put project model if notify if f Changed Models null f Changed Models new Array List f Changed Models add new Model Change model true if project get File options exists NON NLS 1 PDE Core get Default get Tracing Options Manager reset else if is Feature Project project model create Feature Model project get File feature xml NON NLS 1 if model null f Feature Models add model  addWorkspaceModel IProject IModel isPluginProject createPluginModel IFragmentModel fFragmentModels fModels fChangedModels fChangedModels ArrayList fChangedModels ModelChange getFile PDECore getDefault getTracingOptionsManager isFeatureProject createFeatureModel getFile fFeatureModels
see org eclipse pde core I Model Manager get Plugin Models public I Plugin Model get Plugin Models initialize Workspace Models return I Plugin Model f Models values to Array new I Plugin Model f Models size  IModelManager getPluginModels IPluginModel getPluginModels initializeWorkspaceModels IPluginModel fModels toArray IPluginModel fModels
see org eclipse pde core I Model Manager get Fragment Models public I Fragment Model get Fragment Models initialize Workspace Models return I Fragment Model f Fragment Models values to Array new I Fragment Model f Fragment Models size  IModelManager getFragmentModels IFragmentModel getFragmentModels initializeWorkspaceModels IFragmentModel fFragmentModels toArray IFragmentModel fFragmentModels
see org eclipse pde core I Model Manager get Feature Models public I Feature Model get Feature Models initialize Workspace Models return I Feature Model f Feature Models to Array new I Feature Model f Feature Models size  IModelManager getFeatureModels IFeatureModel getFeatureModels initializeWorkspaceModels IFeatureModel fFeatureModels toArray IFeatureModel fFeatureModels
public I Fragment get Fragments For String plugin Id String version initialize Workspace Models Array List result new Array List Iterator iter f Fragment Models values iterator while iter has Next I Fragment fragment I Fragment Model iter next get Fragment if PDE Core compare fragment get Plugin Id fragment get Plugin Version plugin Id version fragment get Rule result add fragment return I Fragment result to Array new I Fragment result size  IFragment getFragmentsFor pluginId initializeWorkspaceModels ArrayList ArrayList fFragmentModels hasNext IFragment IFragmentModel getFragment PDECore getPluginId getPluginVersion pluginId getRule IFragment toArray IFragment
see org eclipse pde core I Model Manager shutdown public void shutdown PDE Core get Workspace remove Resource Change Listener this Java Core remove Pre Processing Resource Changed Listener this  IModelManager PDECore getWorkspace removeResourceChangeListener JavaCore removePreProcessingResourceChangedListener
public I Model get Model I File file String name file get Name to Lower Case I Project project file get Project if is Plugin Project project has Bundle Manifest project file get Project Relative Path equals new Path META INF MANIFEST MF NON NLS 1 return new Workspace Bundle Model file if name equals plugin xml NON NLS 1 TODO support this if has Bundle Manifest project return new Workspace Extensions Model file return new Workspace Plugin Model file if name equals fragment xml NON NLS 1 TODO support this if has Bundle Manifest project return new Workspace Extensions Model file return new Workspace Fragment Model file if name equals build properties NON NLS 1 return new Workspace Build Model file if name equals feature xml NON NLS 1 return new Workspace Feature Model file if name equals site xml NON NLS 1 return new Workspace Site Model file if name equals PDE Core SITEBUILD PROPERTIES return new Workspace Site Build Model file return null  IModel getModel IFile getName toLowerCase IProject getProject isPluginProject hasBundleManifest getProjectRelativePath WorkspaceBundleModel hasBundleManifest WorkspaceExtensionsModel WorkspacePluginModel hasBundleManifest WorkspaceExtensionsModel WorkspaceFragmentModel WorkspaceBuildModel WorkspaceFeatureModel WorkspaceSiteModel PDECore SITEBUILD_PROPERTIES WorkspaceSiteBuildModel
private void process Model Changes if f Changed Models null return if f Changed Models size 0 f Changed Models null return Vector added new Vector Vector removed new Vector Vector changed new Vector for int i 0 i f Changed Models size i Model Change change Model Change f Changed Models get i switch change type case I Model Provider Event MODELS ADDED added add change model break case I Model Provider Event MODELS REMOVED removed add change model break case I Model Provider Event MODELS CHANGED changed add change model I Model added Array added size 0 I Model added to Array new I Model added size I Model null I Model removed Array removed size 0 I Model removed to Array new I Model removed size I Model null I Model changed Array changed size 0 I Model changed to Array new I Model changed size I Model null int type 0 if added Array null type I Model Provider Event MODELS ADDED if removed Array null type I Model Provider Event MODELS REMOVED if changed Array null type I Model Provider Event MODELS CHANGED f Changed Models null if type 0 final Model Provider Event event new Model Provider Event this type added Array removed Array changed Array fire Model Provider Event event  processModelChanges fChangedModels fChangedModels fChangedModels fChangedModels ModelChange ModelChange fChangedModels IModelProviderEvent MODELS_ADDED IModelProviderEvent MODELS_REMOVED IModelProviderEvent MODELS_CHANGED IModel addedArray IModel toArray IModel IModel IModel removedArray IModel toArray IModel IModel IModel changedArray IModel toArray IModel IModel addedArray IModelProviderEvent MODELS_ADDED removedArray IModelProviderEvent MODELS_REMOVED changedArray IModelProviderEvent MODELS_CHANGED fChangedModels ModelProviderEvent ModelProviderEvent addedArray removedArray changedArray fireModelProviderEvent
private void fire Model Provider Event Model Provider Event event for Iterator iter f Listeners iterator iter has Next I Model Provider Listener iter next models Changed event  fireModelProviderEvent ModelProviderEvent fListeners hasNext IModelProviderListener modelsChanged

private Stack f Element Stack new Stack public XML Default Handler f Line Table new Hashtable  fElementStack XMLDefaultHandler fLineTable
public void start Element String uri String local Name String q Name Attributes attributes throws SAX Exception Element element f Document create Element q Name for int i 0 i attributes get Length i element set Attribute attributes getQ Name i attributes get Value i Integer line Number new Integer f Locator get Line Number Integer range new Integer line Number new Integer 1 f Line Table put element range if f Root Element null f Root Element element else Element f Element Stack peek append Child element f Element Stack push element  startElement localName qName SAXException fDocument createElement qName getLength setAttribute getQName getValue lineNumber fLocator getLineNumber lineNumber fLineTable fRootElement fRootElement fElementStack appendChild fElementStack
public void end Element String uri String local Name String q Name throws SAX Exception Integer range Integer f Line Table get f Element Stack pop range 1 new Integer f Locator get Line Number  endElement localName qName SAXException fLineTable fElementStack fLocator getLineNumber
see org xml sax helpers Default Handler set Document Locator org xml sax Locator public void set Document Locator Locator locator f Locator locator  DefaultHandler setDocumentLocator setDocumentLocator fLocator
public void start Document throws SAX Exception Document Builder Factory factory Document Builder Factory new Instance try f Document factory new Document Builder new Document catch Parser Configuration Exception e  startDocument SAXException DocumentBuilderFactory DocumentBuilderFactory newInstance fDocument newDocumentBuilder newDocument ParserConfigurationException
see org xml sax helpers Default Handler end Document public void end Document throws SAX Exception f Document append Child f Root Element  DefaultHandler endDocument endDocument SAXException fDocument appendChild fRootElement
see org xml sax helpers Default Handler processing Instruction java lang String java lang String public void processing Instruction String target String data throws SAX Exception f Document append Child f Document create Processing Instruction target data  DefaultHandler processingInstruction processingInstruction SAXException fDocument appendChild fDocument createProcessingInstruction
public void characters char characters int start int length throws SAX Exception String Buffer buff new String Buffer for int i 0 i length i buff append characters start i Text text f Document create Text Node buff to String if f Root Element null f Document append Child text else Element f Element Stack peek append Child text  SAXException StringBuffer StringBuffer fDocument createTextNode toString fRootElement fDocument appendChild fElementStack appendChild
public Node get Document Element f Document get Document Element normalize return f Document get Document Element  getDocumentElement fDocument getDocumentElement fDocument getDocumentElement
public org w3c dom Document get Document f Document get Document Element normalize return f Document  getDocument fDocument getDocumentElement fDocument
public Hashtable get Line Table return f Line Table  getLineTable fLineTable
see org xml sax ext Lexical Handler endCDATA public void endCDATA throws SAX Exception  LexicalHandler SAXException
see org xml sax ext Lexical Handler endDTD public void endDTD throws SAX Exception  LexicalHandler SAXException
see org xml sax ext Lexical Handler startCDATA public void startCDATA throws SAX Exception  LexicalHandler SAXException
public void comment char ch int start int length throws SAX Exception String Buffer buffer new String Buffer for int i 0 i length i buffer append ch start i Comment comment f Document create Comment buffer to String if f Root Element null f Element Stack is Empty f Document append Child comment else Element f Element Stack peek append Child comment  SAXException StringBuffer StringBuffer fDocument createComment toString fRootElement fElementStack isEmpty fDocument appendChild fElementStack appendChild
see org xml sax ext Lexical Handler end Entity java lang String public void end Entity String name throws SAX Exception  LexicalHandler endEntity endEntity SAXException
see org xml sax ext Lexical Handler start Entity java lang String public void start Entity String name throws SAX Exception  LexicalHandler startEntity startEntity SAXException
see org xml sax ext Lexical Handler startDTD java lang String java lang String java lang String public void startDTD String name String public Id String system Id throws SAX Exception  LexicalHandler publicId systemId SAXException

public class Feature Project extends Base Project public Feature Project super  FeatureProject BaseProject FeatureProject
super public void configure throws Core Exception add To Build Spec PDE FEATURE BUILDER ID  CoreException addToBuildSpec FEATURE_BUILDER_ID
add To Build Spec PDE FEATURE BUILDER ID public void deconfigure throws Core Exception remove From Build Spec PDE FEATURE BUILDER ID  addToBuildSpec FEATURE_BUILDER_ID CoreException removeFromBuildSpec FEATURE_BUILDER_ID

Runs a set of tests as defined by the given command line args This is the platform application entry point see I Platform Runnable public Object run Object arguments throws Exception String args process Command Line String arguments Remote Plugin Test Runner main args return null  IPlatformRunnable processCommandLine RemotePluginTestRunner
public static boolean deltas Enabled return deltas  deltasEnabled
protected String process Command Line String args int config Args new int 100 config Args 0 1 need to initialize the first element to something that could not be an index int config Arg Index 0 for int i 0 i args length i boolean found false check for args without parameters i e a flag arg see if we should be logging deltas if args i equals Ignore Case deltas NON NLS 1 found true deltas true if found config Args config Arg Index i continue check for args with parameters if i args length 1 args i 1 starts With NON NLS 1 continue done checking for args Remember where an arg was found if found config Args config Arg Index i 1 config Args config Arg Index i remove all the arguments consumed by this argument parsing if config Arg Index 0 return args String pass Thru Args new String args length config Arg Index config Arg Index 0 int j 0 for int i 0 i args length i if i config Args config Arg Index config Arg Index else pass Thru Args j args i return pass Thru Args  processCommandLine configArgs configArgs configArgIndex equalsIgnoreCase configArgs configArgIndex startsWith configArgs configArgIndex configArgs configArgIndex configArgIndex passThruArgs configArgIndex configArgIndex configArgs configArgIndex configArgIndex passThruArgs passThruArgs

w get Shell get Display async Exec new Runnable public void run started 0 true Remote Plugin Test Runner main String args workbench close  getShell getDisplay asyncExec RemotePluginTestRunner
workbench add Window Listener new I Window Listener public void window Opened I Workbench Window w if started 0 return w get Shell get Display async Exec new Runnable public void run started 0 true Remote Plugin Test Runner main String args workbench close  addWindowListener IWindowListener windowOpened IWorkbenchWindow getShell getDisplay asyncExec RemotePluginTestRunner
public void window Activated I Workbench Window window  windowActivated IWorkbenchWindow
public void window Activated I Workbench Window window public void window Deactivated I Workbench Window window  windowActivated IWorkbenchWindow windowDeactivated IWorkbenchWindow
public void window Deactivated I Workbench Window window public void window Closed I Workbench Window window  windowDeactivated IWorkbenchWindow windowClosed IWorkbenchWindow
public Object run final Object args throws Exception I Platform Runnable object get Application String args Assert assert Not Null object Assert assert True object instanceof I Workbench final I Workbench workbench I Workbench object the started flag is used so that we only run tests when the window is opened for the first time only final boolean started false workbench add Window Listener new I Window Listener public void window Opened I Workbench Window w if started 0 return w get Shell get Display async Exec new Runnable public void run started 0 true Remote Plugin Test Runner main String args workbench close public void window Activated I Workbench Window window public void window Deactivated I Workbench Window window public void window Closed I Workbench Window window return I Platform Runnable workbench run args  IPlatformRunnable getApplication assertNotNull assertTrue IWorkbench IWorkbench IWorkbench addWindowListener IWindowListener windowOpened IWorkbenchWindow getShell getDisplay asyncExec RemotePluginTestRunner windowActivated IWorkbenchWindow windowDeactivated IWorkbenchWindow windowClosed IWorkbenchWindow IPlatformRunnable
private I Platform Runnable get Application String args throws Core Exception I Extension extension Platform get Plugin Registry get Extension Platform PI RUNTIME Platform PT APPLICATIONS DEFAULT APP PRE 3 0 Assert assert Not Null extension If the extension does not have the correct grammar return null Otherwise return the application object I Configuration Element elements extension get Configuration Elements if elements length 0 I Configuration Element runs elements 0 get Children run NON NLS 1 if runs length 0 Object runnable runs 0 create Executable Extension class NON NLS 1 if runnable instanceof I Platform Runnable return I Platform Runnable runnable return null  IPlatformRunnable getApplication CoreException IExtension getPluginRegistry getExtension PI_RUNTIME PT_APPLICATIONS DEFAULT_APP_PRE_3_0 assertNotNull IConfigurationElement getConfigurationElements IConfigurationElement getChildren createExecutableExtension IPlatformRunnable IPlatformRunnable

public PdeJ Unit Plugin I Plugin Descriptor descriptor super descriptor inst this try resource Bundle Resource Bundle get Bundle org eclipse pde internal junit runtime junitresources NON NLS 1 catch Missing Resource Exception x resource Bundle null  PdeJUnitPlugin IPluginDescriptor resourceBundle ResourceBundle getBundle MissingResourceException resourceBundle
public static PdeJ Unit Plugin get Default return inst  PdeJUnitPlugin getDefault
public static String get Formatted Message String key String arg String text get Resource String key return java text Message Format format text new Object arg  getFormattedMessage getResourceString MessageFormat
public static String get Formatted Message String key String args String text get Resource String key return java text Message Format format text args  getFormattedMessage getResourceString MessageFormat
static I Path get Install Location return new Path inst get Descriptor get InstallURL get File  IPath getInstallLocation getDescriptor getInstallURL getFile
public static String get Plugin Id return inst get Descriptor get Unique Identifier  getPluginId getDescriptor getUniqueIdentifier
public static String get Resource String String key Resource Bundle bundle inst get Resource Bundle if bundle null try String bundle String bundle get String key return bundle String catch Missing Resource Exception e return key  getResourceString ResourceBundle getResourceBundle bundleString getString bundleString MissingResourceException
public Resource Bundle get Resource Bundle return resource Bundle  ResourceBundle getResourceBundle resourceBundle

The main entry point Supported arguments in addition to the ones supported by Remote Test Runner pre testpluginname the name of the plugin containing the tests pre see Remote Test Runner public static void main String args Remote Plugin Test Runner test Runner new Remote Plugin Test Runner test Runner init args test Runner run  RemoteTestRunner RemoteTestRunner RemotePluginTestRunner testRunner RemotePluginTestRunner testRunner testRunner
Returns the Plugin class loader of the plugin containing the test see Remote Plugin Test Runner get Class Loader protected Class Loader get Class Loader if Platform get Plugin Registry get Plugin Descriptor f Test Plugin Name null return Platform get Plugin Registry get Plugin Descriptor f Test Plugin Name get Plugin Class Loader throw new Illegal Argument Exception PdeJ Unit Plugin get Resource String Remote Plugin Test Runner no Classloader NON NLS 1 NON NLS 1 f Test Plugin Name  RemotePluginTestRunner getClassLoader ClassLoader getClassLoader getPluginRegistry getPluginDescriptor fTestPluginName getPluginRegistry getPluginDescriptor fTestPluginName getPluginClassLoader IllegalArgumentException PdeJUnitPlugin getResourceString RemotePluginTestRunner noClassloader fTestPluginName
protected void init String args default Init args set Test Plugin Name args  defaultInit setTestPluginName
protected void set Test Plugin Name String args for int i 0 i args length i if args i to Lower Case equals testpluginname NON NLS 1 if i args length 1 f Test Plugin Name args i 1 return throw new Illegal Argument Exception PdeJ Unit Plugin get Formatted Message Remote Plugin Test Runner no Param NON NLS 1 testpluginname NON NLS 1  setTestPluginName toLowerCase fTestPluginName IllegalArgumentException PdeJUnitPlugin getFormattedMessage RemotePluginTestRunner noParam

public Object run final Object args throws Exception I Platform Runnable application get Application String args Assert assert Not Null application f Testable Object PlatformUI get Testable Object f Testable Object set Test Harness this return application run args  IPlatformRunnable getApplication assertNotNull fTestableObject getTestableObject fTestableObject setTestHarness
private I Platform Runnable get Application String args throws Core Exception Find the name of the application as specified by the PDE J Unit launcher If no application is specified the 3 0 default workbench application is returned I Extension extension Platform get Plugin Registry get Extension Platform PI RUNTIME Platform PT APPLICATIONS get Application To Run args Assert assert Not Null extension If the extension does not have the correct grammar return null Otherwise return the application object I Configuration Element elements extension get Configuration Elements if elements length 0 I Configuration Element runs elements 0 get Children run NON NLS 1 if runs length 0 Object runnable runs 0 create Executable Extension class NON NLS 1 if runnable instanceof I Platform Runnable return I Platform Runnable runnable return null  IPlatformRunnable getApplication CoreException JUnit IExtension getPluginRegistry getExtension PI_RUNTIME PT_APPLICATIONS getApplicationToRun assertNotNull IConfigurationElement getConfigurationElements IConfigurationElement getChildren createExecutableExtension IPlatformRunnable IPlatformRunnable
private String get Application To Run String args for int i 0 i args length i if args i equals product NON NLS 1 return Platform get Product get Application if args i equals test Application i args length 1 NON NLS 1 return args i 1 return DEFAULT APP 3 0  getApplicationToRun getProduct getApplication testApplication DEFAULT_APP_3_0
f Testable Object testing Starting f Testable Object run Test new Runnable public void run Remote Plugin Test Runner main Platform get Command Line Args  fTestableObject testingStarting fTestableObject runTest RemotePluginTestRunner getCommandLineArgs
public void run Tests f Testable Object testing Starting f Testable Object run Test new Runnable public void run Remote Plugin Test Runner main Platform get Command Line Args f Testable Object testing Finished  runTests fTestableObject testingStarting fTestableObject runTest RemotePluginTestRunner getCommandLineArgs fTestableObject testingFinished

public PDE I Plugin Descriptor descriptor super descriptor inst this try resource Bundle Resource Bundle get Bundle org eclipse pde internal pderesources NON NLS 1 catch Missing Resource Exception x log x resource Bundle null  IPluginDescriptor resourceBundle ResourceBundle getBundle MissingResourceException resourceBundle
public static boolean has Plugin Nature I Project project Be flexible with 1 0 I Ds check all combinations try return project has Nature PLUGIN NATURE catch Core Exception e log e return false  hasPluginNature IProject IDs hasNature PLUGIN_NATURE CoreException
public static boolean has Feature Nature I Project project Be flexible with 1 0 I Ds check all combinations try return project has Nature FEATURE NATURE catch Core Exception e log e return false  hasFeatureNature IProject IDs hasNature FEATURE_NATURE CoreException
public static PDE get Default return inst  getDefault
public static String get Formatted Message String key String args String text get Resource String key return java text Message Format format text args  getFormattedMessage getResourceString MessageFormat
return java text Message Format format text args public static String get Formatted Message String key String arg String text get Resource String key return java text Message Format format text new Object arg  MessageFormat getFormattedMessage getResourceString MessageFormat
return java text Message Format format text new Object arg static I Path get Install Location return new Path get Default get Descriptor get InstallURL get File  MessageFormat IPath getInstallLocation getDefault getDescriptor getInstallURL getFile
return new Path get Default get Descriptor get InstallURL get File public static String get Plugin Id return get Default get Descriptor get Unique Identifier  getDefault getDescriptor getInstallURL getFile getPluginId getDefault getDescriptor getUniqueIdentifier
return get Default get Descriptor get Unique Identifier public Resource Bundle get Resource Bundle return resource Bundle  getDefault getDescriptor getUniqueIdentifier ResourceBundle getResourceBundle resourceBundle
public static String get Resource String String key Resource Bundle bundle get Default get Resource Bundle if bundle null try String bundle String bundle get String key return bundle String catch Missing Resource Exception e default actions is to return key which is OK return key  getResourceString ResourceBundle getDefault getResourceBundle bundleString getString bundleString MissingResourceException
public static I Workspace get Workspace return Resources Plugin get Workspace  IWorkspace getWorkspace ResourcesPlugin getWorkspace
return Resources Plugin get Workspace public static void log I Status status Resources Plugin get Plugin get Log log status  ResourcesPlugin getWorkspace IStatus ResourcesPlugin getPlugin getLog
public static void log Error Message String message log new Status I Status ERROR get Plugin Id I Status ERROR message null  logErrorMessage IStatus getPluginId IStatus
public static void log Exception Throwable e final String title String message if e instanceof Invocation Target Exception e Invocation Target Exception e get Target Exception I Status status null if e instanceof Core Exception status Core Exception e get Status else if message null message e get Message if message null message e to String status new Status I Status ERROR get Plugin Id I Status OK message e Resources Plugin get Plugin get Log log status  logException InvocationTargetException InvocationTargetException getTargetException IStatus CoreException CoreException getStatus getMessage toString IStatus getPluginId IStatus ResourcesPlugin getPlugin getLog
public static void log Exception Throwable e log Exception e null null  logException logException
public static void log Throwable e if e instanceof Invocation Target Exception e Invocation Target Exception e get Target Exception I Status status null if e instanceof Core Exception status Core Exception e get Status else status new Status I Status ERROR get Plugin Id I Status OK e get Message e log status  InvocationTargetException InvocationTargetException getTargetException IStatus CoreException CoreException getStatus IStatus getPluginId IStatus getMessage
log status public void startup throws Core Exception super startup Compiler Flags initialize Defaults  CoreException CompilerFlags initializeDefaults

public class Plugin Project extends Base Project Plugin Project constructor comment public Plugin Project super  PluginProject BaseProject PluginProject PluginProject
public void configure throws Core Exception add To Build Spec PDE MANIFEST BUILDER ID add To Build Spec PDE SCHEMA BUILDER ID  CoreException addToBuildSpec MANIFEST_BUILDER_ID addToBuildSpec SCHEMA_BUILDER_ID
public void deconfigure throws Core Exception remove From Build Spec PDE MANIFEST BUILDER ID remove From Build Spec PDE SCHEMA BUILDER ID  CoreException removeFromBuildSpec MANIFEST_BUILDER_ID removeFromBuildSpec SCHEMA_BUILDER_ID

param parent Shell shell in which dialog is displayed protected Event Details Dialog Shell parent Shell I Adaptable selection I Selection Provider provider super parent Shell label Provider new Log View Label Provider this provider Table Tree Viewer provider this entry Log Entry selection set Shell Style SWT MODELESS SWT MIN SWT MAX SWT RESIZE SWT CLOSE SWT BORDER SWT TITLE clipboard new Clipboard parent Shell get Display initialize create Images collator Collator get Instance read Configuration  parentShell EventDetailsDialog parentShell IAdaptable ISelectionProvider parentShell labelProvider LogViewLabelProvider TableTreeViewer LogEntry setShellStyle parentShell getDisplay createImages getInstance readConfiguration
private void initialize element Num get Parent Element Num total Element Count provider get Table Tree get Table get Item Count get Visible Children Count parent Entry Log Entry entry get Parent entry if is Child entry set Entry Children parent Entry reset Child Index  elementNum getParentElementNum totalElementCount getTableTree getTable getItemCount getVisibleChildrenCount parentEntry LogEntry getParent isChild setEntryChildren parentEntry resetChildIndex
private void reset Child Index for int i 0 i entry Children length i if entry Children i get Message equals entry get Message entry Children i get Date equals entry get Date entry Children i get Plugin Id equals entry get Plugin Id entry Children i get Severity entry get Severity entry Children i get Severity Text equals entry get Severity Text child Index i break  resetChildIndex entryChildren entryChildren getMessage getMessage entryChildren getDate getDate entryChildren getPluginId getPluginId entryChildren getSeverity getSeverity entryChildren getSeverityText getSeverityText childIndex
private void create Images img Copy Enabled PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG TOOL COPY create Image true img Next Disabled PDE Runtime Plugin Images DESC NEXT EVENT DISABLED create Image true img Prev Disabled PDE Runtime Plugin Images DESC PREV EVENT DISABLED create Image true img Prev Enabled PDE Runtime Plugin Images DESC PREV EVENT create Image true img Next Enabled PDE Runtime Plugin Images DESC NEXT EVENT create Image true  createImages imgCopyEnabled getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_TOOL_COPY createImage imgNextDisabled PDERuntimePluginImages DESC_NEXT_EVENT_DISABLED createImage imgPrevDisabled PDERuntimePluginImages DESC_PREV_EVENT_DISABLED createImage imgPrevEnabled PDERuntimePluginImages DESC_PREV_EVENT createImage imgNextEnabled PDERuntimePluginImages DESC_NEXT_EVENT createImage
private boolean is Child Log Entry entry return entry get Parent entry null  isChild LogEntry getParent
public boolean is Open return is Open  isOpen isOpen
public int open is Open true if sash Weights null int width get Sash Form get Client Area width if width 100 0 width 100 else width width 2 sash Weights new int width get Sash Form get Client Area width width get Sash Form set Weights sash Weights return super open  isOpen sashWeights getSashForm getClientArea sashWeights getSashForm getClientArea getSashForm setWeights sashWeights
public boolean close store Settings is Open false img Copy Enabled dispose img Next Enabled dispose img Prev Enabled dispose return super close  storeSettings isOpen imgCopyEnabled imgNextEnabled imgPrevEnabled
public void create super create dialog location if dialog Location null get Shell set Location dialog Location dialog size if dialog Size null get Shell set Size dialog Size else get Shell set Size 500 550 apply Dialog Font button Bar get Button I Dialog Constants OK ID set Focus  dialogLocation getShell setLocation dialogLocation dialogSize getShell setSize dialogSize getShell setSize applyDialogFont buttonBar getButton IDialogConstants OK_ID setFocus
protected void button Pressed int button Id if I Dialog Constants OK ID button Id ok Pressed else if I Dialog Constants CANCEL ID button Id cancel Pressed else if I Dialog Constants BACK ID button Id back Pressed else if I Dialog Constants NEXT ID button Id next Pressed else if COPY ID button Id copy Pressed  buttonPressed buttonId IDialogConstants OK_ID buttonId okPressed IDialogConstants CANCEL_ID buttonId cancelPressed IDialogConstants BACK_ID buttonId backPressed IDialogConstants NEXT_ID buttonId nextPressed COPY_ID buttonId copyPressed
protected void back Pressed if is Child entry if child Index 0 child Index entry entry Children child Index else entry parent Entry else if element Num 1 0 element Num 1 entry Log Entry provider get Element At element Num set Entry Selection In Table  backPressed isChild childIndex childIndex entryChildren childIndex parentEntry elementNum elementNum LogEntry getElementAt elementNum setEntrySelectionInTable
protected void next Pressed if is Child entry child Index entry Children length 1 child Index entry entry Children child Index else if element Num 1 total Element Count element Num 1 entry Log Entry provider get Element At element Num else at end of list but can branch into child elements bug 58083 set Entry Children entry entry entry Children 0 set Entry Selection In Table  nextPressed isChild childIndex entryChildren childIndex entryChildren childIndex elementNum totalElementCount elementNum LogEntry getElementAt elementNum setEntryChildren entryChildren setEntrySelectionInTable
protected void copy Pressed String Writer writer new String Writer Print Writer pwriter new Print Writer writer entry write pwriter pwriter flush String text Version writer to String try pwriter close writer close catch IO Exception e set the clipboard contents clipboard set Contents new Object text Version new Transfer Text Transfer get Instance  copyPressed StringWriter StringWriter PrintWriter PrintWriter textVersion toString IOException setContents textVersion TextTransfer getInstance
public void set Comparator Comparator comparator this comparator comparator update Properties  setComparator updateProperties
comparator new Comparator public int compare Object e1 Object e2 try Simple Date Format formatter new Simple Date Format MMM dd yyyy HH mm ss SS NON NLS 1 Date date1 formatter parse Log Entry e1 get Date Date date2 formatter parse Log Entry e2 get Date if sort Order ASCENDING return date1 before date2 1 1 return date1 after date2 1 1 catch Parse Exception e return 0  SimpleDateFormat SimpleDateFormat LogEntry getDate LogEntry getDate sortOrder ParseException
comparator new Comparator public int compare Object e1 Object e2 Log Entry entry1 Log Entry e1 Log Entry entry2 Log Entry e2 return collator compare entry1 get Plugin Id entry2 get Plugin Id sort Order  LogEntry LogEntry LogEntry LogEntry getPluginId getPluginId sortOrder
comparator new Comparator public int compare Object e1 Object e2 Log Entry entry1 Log Entry e1 Log Entry entry2 Log Entry e2 return collator compare entry1 get Message entry2 get Message sort Order  LogEntry LogEntry LogEntry LogEntry getMessage getMessage sortOrder
private void set Comparator byte sort Type final int sort Order if sort Type Log View DATE comparator new Comparator public int compare Object e1 Object e2 try Simple Date Format formatter new Simple Date Format MMM dd yyyy HH mm ss SS NON NLS 1 Date date1 formatter parse Log Entry e1 get Date Date date2 formatter parse Log Entry e2 get Date if sort Order ASCENDING return date1 before date2 1 1 return date1 after date2 1 1 catch Parse Exception e return 0 else if sort Type Log View PLUGIN comparator new Comparator public int compare Object e1 Object e2 Log Entry entry1 Log Entry e1 Log Entry entry2 Log Entry e2 return collator compare entry1 get Plugin Id entry2 get Plugin Id sort Order else comparator new Comparator public int compare Object e1 Object e2 Log Entry entry1 Log Entry e1 Log Entry entry2 Log Entry e2 return collator compare entry1 get Message entry2 get Message sort Order  setComparator sortType sortOrder sortType LogView SimpleDateFormat SimpleDateFormat LogEntry getDate LogEntry getDate sortOrder ParseException sortType LogView LogEntry LogEntry LogEntry LogEntry getPluginId getPluginId sortOrder LogEntry LogEntry LogEntry LogEntry getMessage getMessage sortOrder
public void reset Selection I Adaptable selected Entry byte sort Type int sort Order set Comparator sort Type sort Order reset Selection selected Entry  resetSelection IAdaptable selectedEntry sortType sortOrder setComparator sortType sortOrder resetSelection selectedEntry
public void reset Selection I Adaptable selected Entry if entry equals selected Entry element Num get Parent Element Num update Properties return entry Log Entry selected Entry initialize update Properties  resetSelection IAdaptable selectedEntry selectedEntry elementNum getParentElementNum updateProperties LogEntry selectedEntry updateProperties
public void reset Buttons back Button set Enabled false next Button set Enabled false  resetButtons backButton setEnabled nextButton setEnabled
private void set Entry Selection In Table I Selection selection new Structured Selection entry provider set Selection selection  setEntrySelectionInTable ISelection StructuredSelection setSelection
public void update Properties if is Child entry parent Entry Log Entry entry get Parent entry set Entry Children parent Entry reset Child Index total Element Count provider get Table Tree get Table get Item Count get Visible Children Count date Label set Text entry get Date severity Image Label set Image label Provider get Column Image entry 1 severity Label set Text entry get Severity Text msg Text set Text entry get Message String stack entry get Stack if stack null stack Trace Text set Text stack else stack Trace Text set Text PDE Runtime Plugin get Resource String EVENT NO STACK Log Session session entry get Session if session null session get Session Data null session Data Text set Text session get Session Data update Buttons  updateProperties isChild parentEntry LogEntry getParent setEntryChildren parentEntry resetChildIndex totalElementCount getTableTree getTable getItemCount getVisibleChildrenCount dateLabel setText getDate severityImageLabel setImage labelProvider getColumnImage severityLabel setText getSeverityText msgText setText getMessage getStack stackTraceText setText stackTraceText setText PDERuntimePlugin getResourceString EVENT_NO_STACK LogSession getSession getSessionData sessionDataText setText getSessionData updateButtons
private void update Buttons boolean is At End element Num total Element Count 1 if is Child entry back Button set Enabled true boolean is Last Child child Index entry Children length 1 next Button set Enabled is Last Child is At End entry has Children else back Button set Enabled element Num 0 next Button set Enabled is At End entry has Children  updateButtons isAtEnd elementNum totalElementCount isChild backButton setEnabled isLastChild childIndex entryChildren nextButton setEnabled isLastChild isAtEnd hasChildren backButton setEnabled elementNum nextButton setEnabled isAtEnd hasChildren
private void set Entry Children Log Entry parent Object children parent get Children parent if comparator null Arrays sort children comparator entry Children new Log Entry children length System arraycopy children 0 entry Children 0 children length  setEntryChildren LogEntry getChildren entryChildren LogEntry entryChildren
private int get Parent Element Num Log Entry item Entry Log Entry I Structured Selection provider get Selection get First Element item Entry get Root Entry item Entry for int i 0 i provider get Table Tree get Item Count i try Log Entry little Entry Log Entry provider get Element At i if item Entry equals little Entry return i catch Exception e return 0  getParentElementNum LogEntry itemEntry LogEntry IStructuredSelection getSelection getFirstElement itemEntry getRootEntry itemEntry getTableTree getItemCount LogEntry littleEntry LogEntry getElementAt itemEntry littleEntry
private Log Entry get Root Entry Log Entry entry if is Child entry return entry return get Root Entry Log Entry entry get Parent entry  LogEntry getRootEntry LogEntry isChild getRootEntry LogEntry getParent
return get Root Entry Log Entry entry get Parent entry public Sash Form get Sash Form return sash Form  getRootEntry LogEntry getParent SashForm getSashForm sashForm
private int get Visible Children Count Object elements provider get Visible Expanded Elements Log Entry expanded Elements new Log Entry elements length System arraycopy elements 0 expanded Elements 0 elements length int count 0 for int i 0 i expanded Elements length i count expanded Elements i get Children expanded Elements i length return count  getVisibleChildrenCount getVisibleExpandedElements LogEntry expandedElements LogEntry expandedElements expandedElements expandedElements getChildren expandedElements
protected Control create Dialog Area Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 1 container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH container set Layout Data gd create Details Section container create Sash Form container create Stack Section get Sash Form create Session Section get Sash Form update Properties Dialog apply Dialog Font container return container  createDialogArea GridLayout GridLayout numColumns setLayout GridData GridData GridData FILL_BOTH setLayoutData createDetailsSection createSashForm createStackSection getSashForm createSessionSection getSashForm updateProperties applyDialogFont
private void create Sash Form Composite parent sash Form new Sash Form parent SWT VERTICAL Grid Layout layout new Grid Layout layout margin Height layout margin Width 0 sash Form set Layout layout sash Form set Layout Data new Grid Data Grid Data FILL BOTH  createSashForm sashForm SashForm GridLayout GridLayout marginHeight marginWidth sashForm setLayout sashForm setLayoutData GridData GridData FILL_BOTH
private void create Toolbar Button Bar Composite parent Composite comp new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width layout margin Height 0 layout num Columns 1 comp set Layout layout comp set Layout Data new Grid Data Grid Data FILL VERTICAL Composite container new Composite comp SWT NONE layout new Grid Layout layout margin Width 0 layout margin Height 10 layout num Columns 1 container set Layout layout container set Layout Data new Grid Data Grid Data FILL BOTH back Button create Button container I Dialog Constants BACK ID false NON NLS 1 Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 3 gd vertical Span 1 back Button set Layout Data gd back Button set Tool Tip Text PDE Runtime Plugin get Resource String EVENT PREVIOUS back Button set Image img Prev Enabled next Button create Button container I Dialog Constants NEXT ID false NON NLS 1 gd new Grid Data gd horizontal Span 3 gd vertical Span 1 next Button set Layout Data gd next Button set Tool Tip Text PDE Runtime Plugin get Resource String EVENT NEXT next Button set Image img Next Enabled copy Button create Button container COPY ID false NON NLS 1 gd new Grid Data gd horizontal Span 3 gd vertical Span 1 copy Button set Layout Data gd copy Button set Image img Copy Enabled copy Button set Tool Tip Text PDE Runtime Plugin get Resource String EVENT COPY  createToolbarButtonBar GridLayout GridLayout marginWidth marginHeight numColumns setLayout setLayoutData GridData GridData FILL_VERTICAL GridLayout marginWidth marginHeight numColumns setLayout setLayoutData GridData GridData FILL_BOTH backButton createButton IDialogConstants BACK_ID GridData GridData GridData FILL_HORIZONTAL horizontalSpan verticalSpan backButton setLayoutData backButton setToolTipText PDERuntimePlugin getResourceString EVENT_PREVIOUS backButton setImage imgPrevEnabled nextButton createButton IDialogConstants NEXT_ID GridData horizontalSpan verticalSpan nextButton setLayoutData nextButton setToolTipText PDERuntimePlugin getResourceString EVENT_NEXT nextButton setImage imgNextEnabled copyButton createButton COPY_ID GridData horizontalSpan verticalSpan copyButton setLayoutData copyButton setImage imgCopyEnabled copyButton setToolTipText PDERuntimePlugin getResourceString EVENT_COPY
protected void create Buttons For Button Bar Composite parent create OK button only by default create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL
private void create Details Section Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 container set Layout layout container set Layout Data new Grid Data Grid Data FILL HORIZONTAL create Text Section container create Toolbar Button Bar container  createDetailsSection GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_HORIZONTAL createTextSection createToolbarButtonBar
private void create Text Section Composite parent Composite text Container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 layout margin Height layout margin Width 0 text Container set Layout layout text Container set Layout Data new Grid Data Grid Data FILL HORIZONTAL Label label new Label text Container SWT NONE label set Text PDE Runtime Plugin get Resource String Event Details Dialog date NON NLS 1 date Label new Label text Container SWT NULL Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 date Label set Layout Data gd label new Label text Container SWT NONE label set Text PDE Runtime Plugin get Resource String Event Details Dialog severity NON NLS 1 severity Image Label new Label text Container SWT NULL severity Label new Label text Container SWT NULL gd new Grid Data Grid Data FILL HORIZONTAL severity Label set Layout Data gd label new Label text Container SWT NONE label set Text PDE Runtime Plugin get Resource String Event Details Dialog message NON NLS 1 gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING label set Layout Data gd msg Text new Text text Container SWT MULTI SWT V SCROLL SWT WRAP SWT BORDER msg Text set Editable false gd new Grid Data Grid Data FILL BOTH Grid Data VERTICAL ALIGN BEGINNING Grid Data GRAB VERTICAL gd horizontal Span 2 gd vertical Span 8 gd grab Excess Vertical Space true msg Text set Layout Data gd  createTextSection textContainer GridLayout GridLayout numColumns marginHeight marginWidth textContainer setLayout textContainer setLayoutData GridData GridData FILL_HORIZONTAL textContainer setText PDERuntimePlugin getResourceString EventDetailsDialog dateLabel textContainer GridData GridData GridData FILL_HORIZONTAL horizontalSpan dateLabel setLayoutData textContainer setText PDERuntimePlugin getResourceString EventDetailsDialog severityImageLabel textContainer severityLabel textContainer GridData GridData FILL_HORIZONTAL severityLabel setLayoutData textContainer setText PDERuntimePlugin getResourceString EventDetailsDialog GridData GridData VERTICAL_ALIGN_BEGINNING setLayoutData msgText textContainer V_SCROLL msgText setEditable GridData GridData FILL_BOTH GridData VERTICAL_ALIGN_BEGINNING GridData GRAB_VERTICAL horizontalSpan verticalSpan grabExcessVerticalSpace msgText setLayoutData
private void create Stack Section Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 6 container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint 100 container set Layout Data gd Label label new Label container SWT NULL label set Text PDE Runtime Plugin get Resource String Event Details Dialog exception NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 3 label set Layout Data gd stack Trace Text new Text container SWT MULTI SWT V SCROLL SWT H SCROLL SWT BORDER gd new Grid Data Grid Data FILL BOTH Grid Data GRAB HORIZONTAL gd grab Excess Horizontal Space true stack Trace Text set Layout Data gd stack Trace Text set Editable false  createStackSection GridLayout GridLayout marginHeight marginWidth setLayout GridData GridData GridData FILL_BOTH heightHint setLayoutData setText PDERuntimePlugin getResourceString EventDetailsDialog GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData stackTraceText V_SCROLL H_SCROLL GridData GridData FILL_BOTH GridData GRAB_HORIZONTAL grabExcessHorizontalSpace stackTraceText setLayoutData stackTraceText setEditable
private void create Session Section Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 6 container set Layout layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd height Hint 100 container set Layout Data gd Label line new Label container SWT SEPARATOR SWT HORIZONTAL gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd width Hint 1 line set Layout Data gd Label label new Label container SWT NONE label set Text PDE Runtime Plugin get Resource String Event Details Dialog session NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL label set Layout Data gd session Data Text new Text container SWT BORDER SWT V SCROLL SWT H SCROLL gd new Grid Data Grid Data FILL BOTH Grid Data GRAB HORIZONTAL gd grab Excess Horizontal Space true session Data Text set Layout Data gd session Data Text set Editable false  createSessionSection GridLayout GridLayout marginHeight marginWidth setLayout GridData GridData GridData FILL_HORIZONTAL heightHint setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL widthHint setLayoutData setText PDERuntimePlugin getResourceString EventDetailsDialog GridData GridData FILL_HORIZONTAL setLayoutData sessionDataText V_SCROLL H_SCROLL GridData GridData FILL_BOTH GridData GRAB_HORIZONTAL grabExcessHorizontalSpace sessionDataText setLayoutData sessionDataText setEditable
Stores the current state in the dialog settings since 2 0 private void store Settings write Configuration  storeSettings writeConfiguration
Returns the dialog settings object used to share state between several event detail dialogs return the dialog settings to be used private I Dialog Settings get Dialog Settings I Dialog Settings settings PDE Runtime Plugin get Default get Dialog Settings dialog Settings settings get Section get Class get Name if dialog Settings null dialog Settings settings add New Section get Class get Name return dialog Settings  IDialogSettings getDialogSettings IDialogSettings PDERuntimePlugin getDefault getDialogSettings dialogSettings getSection getClass getName dialogSettings dialogSettings addNewSection getClass getName dialogSettings
Initializes itself from the dialog settings with the same state as at the previous invocation private void read Configuration I Dialog Settings s get Dialog Settings try int x s get Int x NON NLS 1 int y s get Int y NON NLS 1 dialog Location new Point x y x s get Int width NON NLS 1 y s get Int height NON NLS 1 dialog Size new Point x y sash Weights new int 2 sash Weights 0 s get Int sash Width1 NON NLS 1 sash Weights 1 s get Int sash Width2 NON NLS 1 catch Number Format Exception e dialog Location null dialog Size null sash Weights null  readConfiguration IDialogSettings getDialogSettings getInt getInt dialogLocation getInt getInt dialogSize sashWeights sashWeights getInt sashWidth1 sashWeights getInt sashWidth2 NumberFormatException dialogLocation dialogSize sashWeights
private void write Configuration I Dialog Settings s get Dialog Settings Point location get Shell get Location s put x location x NON NLS 1 s put y location y NON NLS 1 Point size get Shell get Size s put width size x NON NLS 1 s put height size y NON NLS 1 sash Weights get Sash Form get Weights s put sash Width1 sash Weights 0 NON NLS 1 s put sash Width2 sash Weights 1 NON NLS 1  writeConfiguration IDialogSettings getDialogSettings getShell getLocation getShell getSize sashWeights getSashForm getWeights sashWidth1 sashWeights sashWidth2 sashWeights

private Comparator comparator Creates a new action for opening a property dialog on the elements from the given selection provider param shell the shell in which the dialog will open param provider the selection provider whose elements the property dialog will describe public Event Details Dialog Action Shell shell I Selection Provider provider super provider Workbench Messages get String Property Dialog text NON NLS 1 Assert is Not Null shell this shell shell this provider provider set Tool Tip Text Workbench Help set Help  EventDetailsDialogAction ISelectionProvider WorkbenchMessages getString PropertyDialog isNotNull setToolTipText WorkbenchHelp setHelp
public boolean reset Selection byte sort Type int sort Order I Adaptable element I Adaptable get Structured Selection get First Element if element null return false if property Dialog null property Dialog is Open property Dialog reset Selection element sort Type sort Order return true return false  resetSelection sortType sortOrder IAdaptable IAdaptable getStructuredSelection getFirstElement propertyDialog propertyDialog isOpen propertyDialog resetSelection sortType sortOrder
public void reset Selection I Adaptable element I Adaptable get Structured Selection get First Element if element null return if property Dialog null property Dialog is Open property Dialog reset Selection element  resetSelection IAdaptable IAdaptable getStructuredSelection getFirstElement propertyDialog propertyDialog isOpen propertyDialog resetSelection
public void reset Dialog Buttons if property Dialog null property Dialog is Open property Dialog reset Buttons  resetDialogButtons propertyDialog propertyDialog isOpen propertyDialog resetButtons
public void set Comparator Comparator comparator this comparator comparator  setComparator
public void run if property Dialog null property Dialog is Open reset Selection return get initial selection I Adaptable element I Adaptable get Structured Selection get First Element if element null return property Dialog new Event Details Dialog shell element provider property Dialog create property Dialog get Shell set Text PDE Runtime Plugin get Resource String Event Details Dialog title NON NLS 1 property Dialog set Comparator comparator property Dialog open  propertyDialog propertyDialog isOpen resetSelection IAdaptable IAdaptable getStructuredSelection getFirstElement propertyDialog EventDetailsDialog propertyDialog propertyDialog getShell setText PDERuntimePlugin getResourceString EventDetailsDialog propertyDialog setComparator propertyDialog

private I Memento memento public Filter Dialog Shell parent Shell I Memento memento super parent Shell this memento memento  IMemento FilterDialog parentShell IMemento parentShell
protected Control create Dialog Area Composite parent Composite container Composite super create Dialog Area parent create Event Types Group container create Limit Section container create Session Section container Dialog apply Dialog Font container return container  createDialogArea createDialogArea createEventTypesGroup createLimitSection createSessionSection applyDialogFont
private void create Event Types Group Composite parent Group group new Group parent SWT NONE group set Layout new Grid Layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 275 group set Layout Data gd group set Text PDE Runtime Plugin get Resource String Log View Filter Dialog event Types NON NLS 1 info Button new Button group SWT CHECK info Button set Text PDE Runtime Plugin get Resource String Log View Filter Dialog information NON NLS 1 info Button set Selection memento get String Log View P LOG INFO equals true NON NLS 1 warning Button new Button group SWT CHECK warning Button set Text PDE Runtime Plugin get Resource String Log View Filter Dialog warning NON NLS 1 warning Button set Selection memento get String Log View P LOG WARNING equals true NON NLS 1 error Button new Button group SWT CHECK error Button set Text PDE Runtime Plugin get Resource String Log View Filter Dialog error NON NLS 1 error Button set Selection memento get String Log View P LOG ERROR equals true NON NLS 1  createEventTypesGroup setLayout GridLayout GridData GridData GridData FILL_HORIZONTAL widthHint setLayoutData setText PDERuntimePlugin getResourceString LogView FilterDialog eventTypes infoButton infoButton setText PDERuntimePlugin getResourceString LogView FilterDialog infoButton setSelection getString LogView P_LOG_INFO warningButton warningButton setText PDERuntimePlugin getResourceString LogView FilterDialog warningButton setSelection getString LogView P_LOG_WARNING errorButton errorButton setText PDERuntimePlugin getResourceString LogView FilterDialog errorButton setSelection getString LogView P_LOG_ERROR
private void create Limit Section Composite parent Composite comp new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 comp set Layout layout comp set Layout Data new Grid Data Grid Data FILL HORIZONTAL limit new Button comp SWT CHECK limit set Text PDE Runtime Plugin get Resource String Log View Filter Dialog limit To NON NLS 1 limit set Selection memento get String Log View P USE LIMIT equals true NON NLS 1 limit add Selection Listener new Selection Adapter public void widget Selected Selection Event e limit Text set Enabled Button e get Source get Selection limit Text new Text comp SWT BORDER limit Text add Modify Listener new Modify Listener public void modify Text Modify Event e try if ok Button null return Integer parse Int limit Text get Text ok Button set Enabled true catch Number Format Exception e1 ok Button set Enabled false limit Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL limit Text set Text memento get String Log View P LOG LIMIT limit Text set Enabled limit get Selection  createLimitSection GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_HORIZONTAL setText PDERuntimePlugin getResourceString LogView FilterDialog limitTo setSelection getString LogView P_USE_LIMIT addSelectionListener SelectionAdapter widgetSelected SelectionEvent limitText setEnabled getSource getSelection limitText limitText addModifyListener ModifyListener modifyText ModifyEvent okButton parseInt limitText getText okButton setEnabled NumberFormatException okButton setEnabled limitText setLayoutData GridData GridData FILL_HORIZONTAL limitText setText getString LogView P_LOG_LIMIT limitText setEnabled getSelection
private void create Session Section Composite parent Composite container new Composite parent SWT NONE container set Layout new Grid Layout container set Layout Data new Grid Data Grid Data FILL HORIZONTAL Label label new Label container SWT NONE label set Text PDE Runtime Plugin get Resource String Log View Filter Dialog events Logged NON NLS 1 show All Button new Button container SWT RADIO show All Button set Text PDE Runtime Plugin get Resource String Log View Filter Dialog all Sessions NON NLS 1 Grid Data gd new Grid Data gd horizontal Indent 20 show All Button set Layout Data gd Button button new Button container SWT RADIO button set Text PDE Runtime Plugin get Resource String Log View Filter Dialog recent Session NON NLS 1 gd new Grid Data gd horizontal Indent 20 button set Layout Data gd if memento get String Log View P SHOW ALL SESSIONS equals true NON NLS 1 show All Button set Selection true else button set Selection true  createSessionSection setLayout GridLayout setLayoutData GridData GridData FILL_HORIZONTAL setText PDERuntimePlugin getResourceString LogView FilterDialog eventsLogged showAllButton showAllButton setText PDERuntimePlugin getResourceString LogView FilterDialog allSessions GridData GridData horizontalIndent showAllButton setLayoutData setText PDERuntimePlugin getResourceString LogView FilterDialog recentSession GridData horizontalIndent setLayoutData getString LogView P_SHOW_ALL_SESSIONS showAllButton setSelection setSelection
protected void create Buttons For Button Bar Composite parent ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
protected void ok Pressed memento put String Log View P LOG INFO info Button get Selection true false NON NLS 1 NON NLS 2 memento put String Log View P LOG WARNING warning Button get Selection true false NON NLS 1 NON NLS 2 memento put String Log View P LOG ERROR error Button get Selection true false NON NLS 1 NON NLS 2 memento put String Log View P LOG LIMIT limit Text get Text memento put String Log View P USE LIMIT limit get Selection true false NON NLS 1 NON NLS 2 memento put String Log View P SHOW ALL SESSIONS show All Button get Selection true false NON NLS 1 NON NLS 2 super ok Pressed  okPressed putString LogView P_LOG_INFO infoButton getSelection putString LogView P_LOG_WARNING warningButton getSelection putString LogView P_LOG_ERROR errorButton getSelection putString LogView P_LOG_LIMIT limitText getText putString LogView P_USE_LIMIT getSelection putString LogView P_SHOW_ALL_SESSIONS showAllButton getSelection okPressed

private Log Session session public Log Entry  LogSession LogEntry
public Log Session get Session return session  LogSession getSession
void set Session Log Session session this session session  setSession LogSession
public Log Entry I Status status process Status status  LogEntry IStatus processStatus
process Status status public int get Severity return severity  processStatus getSeverity
public boolean isOK return severity I Status OK  IStatus
return severity I Status OK public int get Code return code  IStatus getCode
return code public String get Plugin Id return plugin Id  getPluginId pluginId
return plugin Id public String get Message return message  pluginId getMessage
return message public String get Stack return stack  getStack
return stack public String get Date return date  getDate
return date public String get Severity Text return get Severity Text severity  getSeverityText getSeverityText
return get Severity Text severity public boolean has Children return children null children size 0  getSeverityText hasChildren
return children null children size 0 public String to String return get Severity Text  toString getSeverityText
see I Workbench Adapter get Children Object public Object get Children Object parent if children null return new Object 0 return children to Array  IWorkbenchAdapter getChildren getChildren toArray
see I Workbench Adapter get Image Descriptor Object public Image Descriptor get Image Descriptor Object arg0 return null  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor
see I Workbench Adapter get Label Object public String get Label Object obj return get Severity Text  IWorkbenchAdapter getLabel getLabel getSeverityText
see I Workbench Adapter get Parent Object public Object get Parent Object obj return parent  IWorkbenchAdapter getParent getParent
void set Parent Log Entry parent this parent parent  setParent LogEntry
private String get Severity Text int severity switch severity case I Status ERROR return PDE Runtime Plugin get Resource String KEY ERROR case I Status WARNING return PDE Runtime Plugin get Resource String KEY WARNING case I Status INFO return PDE Runtime Plugin get Resource String KEY INFO return NON NLS 1  getSeverityText IStatus PDERuntimePlugin getResourceString KEY_ERROR IStatus PDERuntimePlugin getResourceString KEY_WARNING IStatus PDERuntimePlugin getResourceString KEY_INFO
int process Log Line String line boolean root ENTRY pluginID severity code date SUBENTRY depth pluginID severity code date String Tokenizer stok new String Tokenizer line true NON NLS 1 String Buffer date Buffer new String Buffer int date Count 5 int depth 0 for int i 0 stok has More Tokens String token stok next Token if i date Count date Buffer append token continue else if token equals NON NLS 1 continue switch i case 0 entry or subentry if root i 2 else i break case 1 depth depth parse Integer token i break case 2 plugin Id token i break case 3 severity severity parse Integer token i break case 4 code code parse Integer token i break date date Buffer to String trim return depth  processLogLine StringTokenizer StringTokenizer StringBuffer dateBuffer StringBuffer dateCount hasMoreTokens nextToken dateCount dateBuffer parseInteger pluginId parseInteger parseInteger dateBuffer toString
private int parse Integer String token try return Integer parse Int token catch Number Format Exception e return 0  parseInteger parseInt NumberFormatException
void set Stack String stack this stack stack  setStack
this stack stack void set Message String message this message message  setMessage
private void process Status I Status status plugin Id status get Plugin severity status get Severity code status get Code Date Format formatter new Simple Date Format MMM dd yyyy HH mm ss SS NON NLS 1 date formatter format new Date message status get Message Throwable throwable status get Exception if throwable null String Writer swriter new String Writer Print Writer pwriter new Print Writer swriter throwable print Stack Trace pwriter pwriter flush pwriter close stack swriter to String I Status schildren status get Children if schildren length 0 children new Array List for int i 0 i schildren length i Log Entry child new Log Entry schildren i add Child child  processStatus IStatus pluginId getPlugin getSeverity getCode DateFormat SimpleDateFormat getMessage getException StringWriter StringWriter PrintWriter PrintWriter printStackTrace toString IStatus getChildren ArrayList LogEntry LogEntry addChild
void add Child Log Entry child if children null children new Array List children add child child set Parent this  addChild LogEntry ArrayList setParent
public void write Print Writer writer writer print get Severity Text if date null writer print NON NLS 1 writer print get Date if message null writer print NON NLS 1 writer print get Message writer println if stack null writer println stack  PrintWriter getSeverityText getDate getMessage

public static void parse Large File File file Array List entries I Memento memento Array List parents new Array List Log Entry current null Log Session session null int writer State UNKNOWN STATE String Writer swriter null Print Writer writer null int state UNKNOWN STATE current Session null Random Access File random null try random new Random Access File file r NON NLS 1 random seek file length MAX FILE LENGTH for String line random read Line if line null break line line trim if line length 0 continue if line starts With SESSION NON NLS 1 state SESSION STATE else if line starts With ENTRY NON NLS 1 state ENTRY STATE else if line starts With SUBENTRY NON NLS 1 state SUBENTRY STATE else if line starts With MESSAGE NON NLS 1 state MESSAGE STATE else if line starts With STACK NON NLS 1 state STACK STATE else state TEXT STATE if state TEXT STATE if writer null writer println line continue if writer null if writer State STACK STATE current null current set Stack swriter to String else if writer State SESSION STATE session null session set Session Data swriter to String else if writer State MESSAGE STATE current null String message current get Message swriter to String message message trim current set Message message writer State UNKNOWN STATE swriter null writer close writer null if state STACK STATE swriter new String Writer writer new Print Writer swriter true writer State STACK STATE else if state SESSION STATE session new Log Session session process Log Line line swriter new String Writer writer new Print Writer swriter true writer State SESSION STATE update Current Session session if current Session equals session memento get String Log View P SHOW ALL SESSIONS equals true NON NLS 1 entries clear else if state ENTRY STATE Log Entry entry new Log Entry entry set Session session entry process Log Line line true set New Parent parents entry 0 current entry add Entry current entries memento false else if state SUBENTRY STATE Log Entry entry new Log Entry entry set Session session int depth entry process Log Line line false set New Parent parents entry depth current entry Log Entry parent Log Entry parents get depth 1 parent add Child entry else if state MESSAGE STATE swriter new String Writer writer new Print Writer swriter true String message NON NLS 1 if line length 8 message line substring 9 trim message message trim if current null current set Message message writer State MESSAGE STATE catch File Not Found Exception e catch IO Exception e finally try if random null random close catch IO Exception e1  parseLargeFile ArrayList IMemento ArrayList ArrayList LogEntry LogSession writerState UNKNOWN_STATE StringWriter PrintWriter UNKNOWN_STATE currentSession RandomAccessFile RandomAccessFile MAX_FILE_LENGTH readLine startsWith SESSION_STATE startsWith ENTRY_STATE startsWith SUBENTRY_STATE startsWith MESSAGE_STATE startsWith STACK_STATE TEXT_STATE TEXT_STATE writerState STACK_STATE setStack toString writerState SESSION_STATE setSessionData toString writerState MESSAGE_STATE getMessage toString setMessage writerState UNKNOWN_STATE STACK_STATE StringWriter PrintWriter writerState STACK_STATE SESSION_STATE LogSession processLogLine StringWriter PrintWriter writerState SESSION_STATE updateCurrentSession currentSession getString LogView P_SHOW_ALL_SESSIONS ENTRY_STATE LogEntry LogEntry setSession processLogLine setNewParent addEntry SUBENTRY_STATE LogEntry LogEntry setSession processLogLine setNewParent LogEntry LogEntry addChild MESSAGE_STATE StringWriter PrintWriter setMessage writerState MESSAGE_STATE FileNotFoundException IOException IOException
public static void parse Log File File file Array List entries I Memento memento Array List parents new Array List Log Entry current null Log Session session null int writer State UNKNOWN STATE String Writer swriter null Print Writer writer null int state UNKNOWN STATE current Session null Buffered Reader reader null try reader new Buffered Reader new Input Stream Reader new File Input Stream file UTF 8 NON NLS 1 while reader ready String line reader read Line if line null continue line line trim if line length 0 continue if line starts With SESSION NON NLS 1 state SESSION STATE else if line starts With ENTRY NON NLS 1 state ENTRY STATE else if line starts With SUBENTRY NON NLS 1 state SUBENTRY STATE else if line starts With MESSAGE NON NLS 1 state MESSAGE STATE else if line starts With STACK NON NLS 1 state STACK STATE else state TEXT STATE if state TEXT STATE if writer null writer println line continue if writer null if writer State STACK STATE current null current set Stack swriter to String else if writer State SESSION STATE session null session set Session Data swriter to String else if writer State MESSAGE STATE current null String message current get Message swriter to String message message trim current set Message message writer State UNKNOWN STATE swriter null writer close writer null if state STACK STATE swriter new String Writer writer new Print Writer swriter true writer State STACK STATE else if state SESSION STATE session new Log Session session process Log Line line swriter new String Writer writer new Print Writer swriter true writer State SESSION STATE update Current Session session if current Session equals session memento get String Log View P SHOW ALL SESSIONS equals true NON NLS 1 entries clear else if state ENTRY STATE Log Entry entry new Log Entry entry set Session session entry process Log Line line true set New Parent parents entry 0 current entry add Entry current entries memento false else if state SUBENTRY STATE Log Entry entry new Log Entry entry set Session session int depth entry process Log Line line false set New Parent parents entry depth current entry Log Entry parent Log Entry parents get depth 1 parent add Child entry else if state MESSAGE STATE swriter new String Writer writer new Print Writer swriter true String message NON NLS 1 if line length 8 message line substring 9 trim message message trim if current null current set Message message writer State MESSAGE STATE catch File Not Found Exception e catch IO Exception e finally try if reader null reader close catch IO Exception e1  parseLogFile ArrayList IMemento ArrayList ArrayList LogEntry LogSession writerState UNKNOWN_STATE StringWriter PrintWriter UNKNOWN_STATE currentSession BufferedReader BufferedReader InputStreamReader FileInputStream readLine startsWith SESSION_STATE startsWith ENTRY_STATE startsWith SUBENTRY_STATE startsWith MESSAGE_STATE startsWith STACK_STATE TEXT_STATE TEXT_STATE writerState STACK_STATE setStack toString writerState SESSION_STATE setSessionData toString writerState MESSAGE_STATE getMessage toString setMessage writerState UNKNOWN_STATE STACK_STATE StringWriter PrintWriter writerState STACK_STATE SESSION_STATE LogSession processLogLine StringWriter PrintWriter writerState SESSION_STATE updateCurrentSession currentSession getString LogView P_SHOW_ALL_SESSIONS ENTRY_STATE LogEntry LogEntry setSession processLogLine setNewParent addEntry SUBENTRY_STATE LogEntry LogEntry setSession processLogLine setNewParent LogEntry LogEntry addChild MESSAGE_STATE StringWriter PrintWriter setMessage writerState MESSAGE_STATE FileNotFoundException IOException IOException
private static void update Current Session Log Session session if current Session null current Session session return Date current Date current Session get Date Date session Date session get Date if current Date null session Date null current Session session else if current Date null session Date null current Session session else if current Date null session Date null session Date after current Date current Session session  updateCurrentSession LogSession currentSession currentSession currentDate currentSession getDate sessionDate getDate currentDate sessionDate currentSession currentDate sessionDate currentSession currentDate sessionDate sessionDate currentDate currentSession
public static void add Entry Log Entry current Array List entries I Memento memento boolean use Current Session int severity current get Severity boolean do Add true switch severity case I Status INFO do Add memento get String Log View P LOG INFO equals true NON NLS 1 break case I Status WARNING do Add memento get String Log View P LOG WARNING equals true NON NLS 1 break case I Status ERROR do Add memento get String Log View P LOG ERROR equals true NON NLS 1 break if do Add if use Current Session current set Session current Session entries add 0 current if memento get String Log View P USE LIMIT equals true NON NLS 1 entries size memento get Integer Log View P LOG LIMIT int Value entries remove entries size 1  addEntry LogEntry ArrayList IMemento useCurrentSession getSeverity doAdd IStatus doAdd getString LogView P_LOG_INFO IStatus doAdd getString LogView P_LOG_WARNING IStatus doAdd getString LogView P_LOG_ERROR doAdd useCurrentSession setSession currentSession getString LogView P_USE_LIMIT getInteger LogView P_LOG_LIMIT intValue
private static void set New Parent Array List parents Log Entry entry int depth if depth 1 parents size parents add entry else parents set depth entry  setNewParent ArrayList LogEntry
public static void reset current Session null  currentSession

Constructor for Log Session public Log Session  LogSession LogSession
public Date get Date return date  getDate
public void set Date String date String Simple Date Format formatter new Simple Date Format MMM dd yyyy HH mm ss SS NON NLS 1 try date formatter parse date String catch Parse Exception e  setDate dateString SimpleDateFormat SimpleDateFormat dateString ParseException
public String get Session Data return session Data  getSessionData sessionData
void set Session Data String data this session Data data  setSessionData sessionData
public void process Log Line String line String Tokenizer tokenizer new String Tokenizer line if tokenizer count Tokens 6 tokenizer next Token String Buffer date Buffer new String Buffer for int i 0 i 4 i date Buffer append tokenizer next Token date Buffer append NON NLS 1 set Date date Buffer to String trim  processLogLine StringTokenizer StringTokenizer countTokens nextToken StringBuffer dateBuffer StringBuffer dateBuffer nextToken dateBuffer setDate dateBuffer toString

public static final String P LOG LIMIT limit NON NLS 1 public static final String P USE LIMIT use Limit NON NLS 1 public static final String P SHOW ALL SESSIONS all Sessions NON NLS 1  P_LOG_LIMIT P_USE_LIMIT useLimit P_SHOW_ALL_SESSIONS allSessions
private static final String P COLUMN 1 column1 NON NLS 1 private static final String P COLUMN 2 column2 NON NLS 1 private static final String P COLUMN 3 column3 NON NLS 1 private static final String P COLUMN 4 column4 NON NLS 1 public static final String P ACTIVATE activate NON NLS 1 private int MESSAGE ORDER 1 private int PLUGIN ORDER 1 private int DATE ORDER 1 public static byte MESSAGE 0x0  P_COLUMN_1 P_COLUMN_2 P_COLUMN_3 P_COLUMN_4 P_ACTIVATE MESSAGE_ORDER PLUGIN_ORDER DATE_ORDER
public static byte PLUGIN 0x1 public static byte DATE 0x2 private static int ASCENDING 1 private static int DESCENDING 1 private Action clear Action private Action copy Action  clearAction copyAction
private Action export Action private Action import Action private Action activate View Action private Action properties Action private Action view Log Action private Action filter Action private Clipboard clipboard private I Memento memento private File input File private String directory  exportAction importAction activateViewAction propertiesAction viewLogAction filterAction IMemento inputFile
private Table Column column1 private Table Column column2 private Table Column column3 private Table Column column4 private static Font bold Font private Comparator comparator private Collator collator hover text private boolean can Open Text Shell private Text text Label  TableColumn TableColumn TableColumn TableColumn boldFont canOpenTextShell textLabel
private boolean first Event true public Log View logs new Array List  firstEvent LogView ArrayList
input File Platform get Log File Location to File  inputFile getLogFileLocation toFile
read Log File Table Tree table Tree new Table Tree parent SWT FULL SELECTION table Tree set Layout Data new Grid Data Grid Data FILL BOTH create Columns table Tree get Table create Viewer table Tree create Popup Menu Manager table Tree make Actions table Tree get Table fill Tool Bar  readLogFile TableTree tableTree TableTree FULL_SELECTION tableTree setLayoutData GridData GridData FILL_BOTH createColumns tableTree getTable createViewer tableTree createPopupMenuManager tableTree makeActions tableTree getTable fillToolBar
Workbench Help set Help table Tree I Help Context Ids LOG VIEW table Tree Viewer get Table Tree get Table set Tool Tip Text NON NLS 1 initialize Fonts  WorkbenchHelp setHelp tableTree IHelpContextIds LOG_VIEW tableTreeViewer getTableTree getTable setToolTipText initializeFonts
apply Fonts  applyFonts
private void initialize Fonts Font table Font table Tree Viewer get Table Tree get Font Font Data font Data List table Font get Font Data  initializeFonts tableFont tableTreeViewer getTableTree getFont FontData fontDataList tableFont getFontData
Font Data font Data List table Font get Font Data Font Data font Data if font Data List length 0  FontData fontDataList tableFont getFontData FontData fontData fontDataList
get Site set Selection Provider table Tree Viewer clipboard new Clipboard table Tree get Display Workbench Help set Help table Tree I Help Context Ids LOG VIEW table Tree Viewer get Table Tree get Table set Tool Tip Text NON NLS 1 initialize Fonts apply Fonts private void initialize Fonts Font table Font table Tree Viewer get Table Tree get Font Font Data font Data List table Font get Font Data Font Data font Data if font Data List length 0 font Data font Data List 0  getSite setSelectionProvider tableTreeViewer tableTree getDisplay WorkbenchHelp setHelp tableTree IHelpContextIds LOG_VIEW tableTreeViewer getTableTree getTable setToolTipText initializeFonts applyFonts initializeFonts tableFont tableTreeViewer getTableTree getFont FontData fontDataList tableFont getFontData FontData fontData fontDataList fontData fontDataList
font Data set Style SWT BOLD bold Font new Font table Tree Viewer get Table Tree get Display font Data  fontData setStyle boldFont tableTreeViewer getTableTree getDisplay fontData
font Data new Font Data font Data set Style SWT BOLD bold Font new Font table Tree Viewer get Table Tree get Display font Data  fontData FontData fontData setStyle boldFont tableTreeViewer getTableTree getDisplay fontData
if table Tree Viewer null table Tree Viewer get Table Tree is Disposed return int max table Tree Viewer get Table Tree get Item Count int index 0 table Index 0 while index max Log Entry entry Log Entry table Tree Viewer get Element At index if entry null  tableTreeViewer tableTreeViewer getTableTree isDisposed tableTreeViewer getTableTree getItemCount tableIndex LogEntry LogEntry tableTreeViewer getElementAt
table Tree Viewer get Table Tree get Items index set Font bold Font table Index apply Child Fonts entry table Index else table Tree Viewer get Table Tree get Items index set Font table Tree Viewer get Table Tree get Font  tableTreeViewer getTableTree getItems setFont boldFont tableIndex applyChildFonts tableIndex tableTreeViewer getTableTree getItems setFont tableTreeViewer getTableTree getFont
private int apply Child Fonts Log Entry parent int index if table Tree Viewer get Expanded State parent parent has Children return index Log Entry children get Entry Children parent for int i 0 i children length i index  applyChildFonts LogEntry tableTreeViewer getExpandedState hasChildren LogEntry getEntryChildren
Set all rows where the table Tree Item has children to have a b bold b font private void apply Fonts if table Tree Viewer null table Tree Viewer get Table Tree is Disposed return int max table Tree Viewer get Table Tree get Item Count int index 0 table Index 0 while index max Log Entry entry Log Entry table Tree Viewer get Element At index if entry null return if entry has Children table Tree Viewer get Table Tree get Items index set Font bold Font table Index apply Child Fonts entry table Index else table Tree Viewer get Table Tree get Items index set Font table Tree Viewer get Table Tree get Font index table Index private int apply Child Fonts Log Entry parent int index if table Tree Viewer get Expanded State parent parent has Children return index Log Entry children get Entry Children parent for int i 0 i children length i index if children i has Children Table Item table Item get Table Item index if table Item null table Item set Font bold Font index apply Child Fonts children i index else  tableTreeItem applyFonts tableTreeViewer tableTreeViewer getTableTree isDisposed tableTreeViewer getTableTree getItemCount tableIndex LogEntry LogEntry tableTreeViewer getElementAt hasChildren tableTreeViewer getTableTree getItems setFont boldFont tableIndex applyChildFonts tableIndex tableTreeViewer getTableTree getItems setFont tableTreeViewer getTableTree getFont tableIndex applyChildFonts LogEntry tableTreeViewer getExpandedState hasChildren LogEntry getEntryChildren hasChildren TableItem tableItem getTableItem tableItem tableItem setFont boldFont applyChildFonts
return index 
Object entry Children parent get Children parent if comparator null Arrays sort entry Children comparator  entryChildren getChildren entryChildren
return table Items index  tableItems
private void fill Tool Bar I Action Bars bars get View Site get Action Bars bars set Global Action Handler Action Factory COPY get Id copy Action  fillToolBar IActionBars getViewSite getActionBars setGlobalActionHandler ActionFactory getId copyAction
tool Bar Manager add import Action tool Bar Manager add new Separator  toolBarManager importAction toolBarManager
tool Bar Manager add read Log Action tool Bar Manager add new Separator  toolBarManager readLogAction toolBarManager
mgr add activate View Action  activateViewAction
table Tree Viewer new Table Tree Viewer table Tree table Tree Viewer set Content Provider new Log View Content Provider this table Tree Viewer set Label Provider new Log View Label Provider table Tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e handle Selection Changed e get Selection if properties Action is Enabled Event Details Dialog Action properties Action reset Selection table Tree Viewer add Double Click Listener new I Double Click Listener  tableTreeViewer TableTreeViewer tableTree tableTreeViewer setContentProvider LogViewContentProvider tableTreeViewer setLabelProvider LogViewLabelProvider tableTreeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged getSelection propertiesAction isEnabled EventDetailsDialogAction propertiesAction resetSelection tableTreeViewer addDoubleClickListener IDoubleClickListener
Table Item table Item get Table Item index if table Item null table Item set Font table Tree Viewer get Table Tree get Font return index private Log Entry get Entry Children Log Entry parent Object entry Children parent get Children parent if comparator null Arrays sort entry Children comparator Log Entry children new Log Entry entry Children length System arraycopy entry Children 0 children 0 entry Children length return children private Table Item get Table Item int index Table Item table Items table Tree Viewer get Table Tree get Table get Items if index table Items length 1 return null return table Items index private void fill Tool Bar I Action Bars bars get View Site get Action Bars bars set Global Action Handler Action Factory COPY get Id copy Action I Tool Bar Manager tool Bar Manager bars get Tool Bar Manager tool Bar Manager add export Action tool Bar Manager add import Action tool Bar Manager add new Separator tool Bar Manager add clear Action tool Bar Manager add delete Log Action tool Bar Manager add view Log Action tool Bar Manager add read Log Action tool Bar Manager add new Separator I Menu Manager mgr bars get Menu Manager mgr add filter Action mgr add new Separator mgr add activate View Action private void create Viewer Table Tree table Tree table Tree Viewer new Table Tree Viewer table Tree table Tree Viewer set Content Provider new Log View Content Provider this table Tree Viewer set Label Provider new Log View Label Provider table Tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e handle Selection Changed e get Selection if properties Action is Enabled Event Details Dialog Action properties Action reset Selection table Tree Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event Event Details Dialog Action properties Action set Comparator comparator properties Action run  TableItem tableItem getTableItem tableItem tableItem setFont tableTreeViewer getTableTree getFont LogEntry getEntryChildren LogEntry entryChildren getChildren entryChildren LogEntry LogEntry entryChildren entryChildren entryChildren TableItem getTableItem TableItem tableItems tableTreeViewer getTableTree getTable getItems tableItems tableItems fillToolBar IActionBars getViewSite getActionBars setGlobalActionHandler ActionFactory getId copyAction IToolBarManager toolBarManager getToolBarManager toolBarManager exportAction toolBarManager importAction toolBarManager toolBarManager clearAction toolBarManager deleteLogAction toolBarManager viewLogAction toolBarManager readLogAction toolBarManager IMenuManager getMenuManager filterAction activateViewAction createViewer TableTree tableTree tableTreeViewer TableTreeViewer tableTree tableTreeViewer setContentProvider LogViewContentProvider tableTreeViewer setLabelProvider LogViewLabelProvider tableTreeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged getSelection propertiesAction isEnabled EventDetailsDialogAction propertiesAction resetSelection tableTreeViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent EventDetailsDialogAction propertiesAction setComparator propertiesAction
table Tree Viewer add Tree Listener new I Tree Viewer Listener public void tree Collapsed Tree Expansion Event event apply Fonts  tableTreeViewer addTreeListener ITreeViewerListener treeCollapsed TreeExpansionEvent applyFonts
add Mouse Listeners table Tree Viewer set Input Platform class  addMouseListeners tableTreeViewer setInput
public void tree Expanded Tree Expansion Event event apply Fonts add Mouse Listeners table Tree Viewer set Input Platform class private void create Popup Menu Manager Table Tree table Tree Menu Manager popup Menu Manager new Menu Manager I Menu Listener listener new I Menu Listener public void menu About To Show I Menu Manager mng fill Context Menu mng popup Menu Manager add Menu Listener listener  treeExpanded TreeExpansionEvent applyFonts addMouseListeners tableTreeViewer setInput createPopupMenuManager TableTree tableTree MenuManager popupMenuManager MenuManager IMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu popupMenuManager addMenuListener
Menu menu popup Menu Manager create Context Menu table Tree table Tree set Menu menu private void create Columns Table table column0 new Table Column table SWT NULL column0 set Text NON NLS 1 column1 new Table Column table SWT NULL column1 set Text PDE Runtime Plugin get Resource String Log View column severity NON NLS 1 column2 new Table Column table SWT NULL column2 set Text PDE Runtime Plugin get Resource String Log View column message NON NLS 1  popupMenuManager createContextMenu tableTree tableTree setMenu createColumns TableColumn setText TableColumn setText PDERuntimePlugin getResourceString LogView TableColumn setText PDERuntimePlugin getResourceString LogView
column2 add Selection Listener new Selection Adapter public void widget Selected Selection Event e MESSAGE ORDER 1 Viewer Sorter sorter get Viewer Sorter MESSAGE table Tree Viewer set Sorter sorter collator sorter get Collator boolean is Comparator Set Event Details Dialog Action properties Action reset Selection MESSAGE MESSAGE ORDER set Comparator MESSAGE if is Comparator Set Event Details Dialog Action properties Action set Comparator comparator  addSelectionListener SelectionAdapter widgetSelected SelectionEvent MESSAGE_ORDER ViewerSorter getViewerSorter tableTreeViewer setSorter getCollator isComparatorSet EventDetailsDialogAction propertiesAction resetSelection MESSAGE_ORDER setComparator isComparatorSet EventDetailsDialogAction propertiesAction setComparator
apply Fonts column3 new Table Column table SWT NULL column3 set Text PDE Runtime Plugin get Resource String Log View column plugin NON NLS 1  applyFonts TableColumn setText PDERuntimePlugin getResourceString LogView
column3 add Selection Listener new Selection Adapter public void widget Selected Selection Event e PLUGIN ORDER 1 Viewer Sorter sorter get Viewer Sorter PLUGIN table Tree Viewer set Sorter sorter collator sorter get Collator boolean is Comparator Set Event Details Dialog Action properties Action  addSelectionListener SelectionAdapter widgetSelected SelectionEvent PLUGIN_ORDER ViewerSorter getViewerSorter tableTreeViewer setSorter getCollator isComparatorSet EventDetailsDialogAction propertiesAction
reset Selection PLUGIN PLUGIN ORDER set Comparator PLUGIN if is Comparator Set Event Details Dialog Action properties Action set Comparator comparator apply Fonts  resetSelection PLUGIN_ORDER setComparator isComparatorSet EventDetailsDialogAction propertiesAction setComparator applyFonts
column4 new Table Column table SWT NULL column4 set Text PDE Runtime Plugin get Resource String Log View column date NON NLS 1  TableColumn setText PDERuntimePlugin getResourceString LogView
public void widget Selected Selection Event e if DATE ORDER ASCENDING DATE ORDER DESCENDING  widgetSelected SelectionEvent DATE_ORDER DATE_ORDER
column4 add Selection Listener new Selection Adapter public void widget Selected Selection Event e if DATE ORDER ASCENDING DATE ORDER DESCENDING else  addSelectionListener SelectionAdapter widgetSelected SelectionEvent DATE_ORDER DATE_ORDER
Viewer Sorter sorter get Viewer Sorter DATE table Tree Viewer set Sorter sorter collator sorter get Collator  ViewerSorter getViewerSorter tableTreeViewer setSorter getCollator
DATE ORDER ASCENDING Viewer Sorter sorter get Viewer Sorter DATE table Tree Viewer set Sorter sorter collator sorter get Collator boolean is Comparator Set Event Details Dialog Action properties Action reset Selection DATE DATE ORDER set Comparator DATE if is Comparator Set Event Details Dialog Action properties Action set Comparator comparator apply Fonts  DATE_ORDER ViewerSorter getViewerSorter tableTreeViewer setSorter getCollator isComparatorSet EventDetailsDialogAction propertiesAction resetSelection DATE_ORDER setComparator isComparatorSet EventDetailsDialogAction propertiesAction setComparator applyFonts
Table Layout tlayout new Table Layout tlayout add Column Data new Column Pixel Data 21 tlayout add Column Data new Column Pixel Data memento get Integer P COLUMN 1  TableLayout TableLayout addColumnData ColumnPixelData addColumnData ColumnPixelData getInteger P_COLUMN_1
tlayout add Column Data new Column Pixel Data memento get Integer P COLUMN 2 int Value tlayout add Column Data new Column Pixel Data memento get Integer P COLUMN 3 int Value tlayout add Column Data new Column Pixel Data memento get Integer P COLUMN 4  addColumnData ColumnPixelData getInteger P_COLUMN_2 intValue addColumnData ColumnPixelData getInteger P_COLUMN_3 intValue addColumnData ColumnPixelData getInteger P_COLUMN_4
table set Layout tlayout table set Header Visible true  setLayout setHeaderVisible
private void make Actions Table table  makeActions
properties Action set Tool Tip Text PDE Runtime Plugin get Resource String Log View properties tooltip NON NLS 1 properties Action set Enabled false clear Action new Action PDE Runtime Plugin get Resource String Log View clear NON NLS 1 public void run handle Clear  propertiesAction setToolTipText PDERuntimePlugin getResourceString LogView propertiesAction setEnabled clearAction PDERuntimePlugin getResourceString LogView handleClear
properties Action new Event Details Dialog Action table get Shell table Tree Viewer properties Action set Image Descriptor PDE Runtime Plugin Images DESC PROPERTIES properties Action set Disabled Image Descriptor PDE Runtime Plugin Images DESC PROPERTIES DISABLED properties Action set Tool Tip Text PDE Runtime Plugin get Resource String Log View properties tooltip NON NLS 1 properties Action set Enabled false clear Action new Action PDE Runtime Plugin get Resource String Log View clear NON NLS 1 public void run handle Clear clear Action set Image Descriptor PDE Runtime Plugin Images DESC CLEAR  propertiesAction EventDetailsDialogAction getShell tableTreeViewer propertiesAction setImageDescriptor PDERuntimePluginImages DESC_PROPERTIES propertiesAction setDisabledImageDescriptor PDERuntimePluginImages DESC_PROPERTIES_DISABLED propertiesAction setToolTipText PDERuntimePlugin getResourceString LogView propertiesAction setEnabled clearAction PDERuntimePlugin getResourceString LogView handleClear clearAction setImageDescriptor PDERuntimePluginImages DESC_CLEAR
clear Action set Disabled Image Descriptor PDE Runtime Plugin Images DESC CLEAR DISABLED clear Action set Tool Tip Text PDE Runtime Plugin  clearAction setDisabledImageDescriptor PDERuntimePluginImages DESC_CLEAR_DISABLED clearAction setToolTipText PDERuntimePlugin
get Resource String Log View clear tooltip NON NLS 1 clear Action set Text PDE Runtime Plugin get Resource String Log View clear NON NLS 1  getResourceString LogView clearAction setText PDERuntimePlugin getResourceString LogView
get Resource String Log View read Log restore NON NLS 1 public void run input File Platform get Log File Location to File reload Log  getResourceString LogView readLog inputFile getLogFileLocation toFile reloadLog
read Log Action set Tool Tip Text PDE Runtime Plugin get Resource String Log View read Log restore tooltip NON NLS 1 read Log Action set Image Descriptor PDE Runtime Plugin Images DESC READ LOG read Log Action set Disabled Image Descriptor PDE Runtime Plugin Images DESC READ LOG DISABLED delete Log Action new Action PDE Runtime Plugin get Resource String Log View delete NON NLS 1 public void run do Delete Log  readLogAction setToolTipText PDERuntimePlugin getResourceString LogView readLog readLogAction setImageDescriptor PDERuntimePluginImages DESC_READ_LOG readLogAction setDisabledImageDescriptor PDERuntimePluginImages DESC_READ_LOG_DISABLED deleteLogAction PDERuntimePlugin getResourceString LogView doDeleteLog
delete Log Action set Tool Tip Text PDE Runtime Plugin get Resource String Log View delete tooltip NON NLS 1 delete Log Action set Image Descriptor PDE Runtime Plugin Images DESC REMOVE LOG delete Log Action  deleteLogAction setToolTipText PDERuntimePlugin getResourceString LogView deleteLogAction setImageDescriptor PDERuntimePluginImages DESC_REMOVE_LOG deleteLogAction
delete Log Action set Enabled input File exists input File equals Platform get Log File Location to File copy Action new Action PDE Runtime Plugin get Resource String Log View copy NON NLS 1 public void run copy To Clipboard table Tree Viewer get Selection copy Action set Image Descriptor PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG TOOL COPY filter Action new Action PDE Runtime Plugin get Resource String Log View filter NON NLS 1 public void run handle Filter  deleteLogAction setEnabled inputFile inputFile getLogFileLocation toFile copyAction PDERuntimePlugin getResourceString LogView copyToClipboard tableTreeViewer getSelection copyAction setImageDescriptor getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_TOOL_COPY filterAction PDERuntimePlugin getResourceString LogView handleFilter
filter Action set Tool Tip Text PDE Runtime Plugin get Resource String Log View filter NON NLS 1 filter Action set Image Descriptor PDE Runtime Plugin Images DESC FILTER filter Action set Disabled Image Descriptor PDE Runtime Plugin Images DESC FILTER DISABLED export Action new Action PDE Runtime Plugin get Resource String Log View export NON NLS 1 public void run  filterAction setToolTipText PDERuntimePlugin getResourceString LogView filterAction setImageDescriptor PDERuntimePluginImages DESC_FILTER filterAction setDisabledImageDescriptor PDERuntimePluginImages DESC_FILTER_DISABLED exportAction PDERuntimePlugin getResourceString LogView
export Action set Tool Tip Text PDE Runtime Plugin get Resource String Log View export tooltip NON NLS 1 export Action set Image Descriptor PDE Runtime Plugin Images DESC EXPORT export Action set Disabled Image Descriptor PDE Runtime Plugin Images DESC EXPORT DISABLED  exportAction setToolTipText PDERuntimePlugin getResourceString LogView exportAction setImageDescriptor PDERuntimePluginImages DESC_EXPORT exportAction setDisabledImageDescriptor PDERuntimePluginImages DESC_EXPORT_DISABLED
handle Export export Action set Tool Tip Text PDE Runtime Plugin get Resource String Log View export tooltip NON NLS 1 export Action set Image Descriptor PDE Runtime Plugin Images DESC EXPORT export Action set Disabled Image Descriptor PDE Runtime Plugin Images DESC EXPORT DISABLED import Action new Action PDE Runtime Plugin get Resource String Log View import NON NLS 1 public void run handle Import  handleExport exportAction setToolTipText PDERuntimePlugin getResourceString LogView exportAction setImageDescriptor PDERuntimePluginImages DESC_EXPORT exportAction setDisabledImageDescriptor PDERuntimePluginImages DESC_EXPORT_DISABLED importAction PDERuntimePlugin getResourceString LogView handleImport
public void run if input File exists  inputFile
import Action set Tool Tip Text PDE Runtime Plugin get Resource String Log View import tooltip NON NLS 1 import Action set Image Descriptor PDE Runtime Plugin Images DESC IMPORT import Action set Disabled Image Descriptor PDE Runtime Plugin Images DESC IMPORT DISABLED activate View Action new Action PDE Runtime Plugin get Resource String Log View activate NON NLS 1 public void run activate View Action set Checked memento get String P ACTIVATE equals true NON NLS 1 view Log Action new Action PDE Runtime Plugin get Resource String Log View view current Log NON NLS 1 public void run if input File exists if input File length Log Reader MAX FILE LENGTH  importAction setToolTipText PDERuntimePlugin getResourceString LogView importAction setImageDescriptor PDERuntimePluginImages DESC_IMPORT importAction setDisabledImageDescriptor PDERuntimePluginImages DESC_IMPORT_DISABLED activateViewAction PDERuntimePlugin getResourceString LogView activateViewAction setChecked getString P_ACTIVATE viewLogAction PDERuntimePlugin getResourceString LogView currentLog inputFile inputFile LogReader MAX_FILE_LENGTH
Open Log Dialog open Dialog new Open Log Dialog get View Site get Shell input File open Dialog create  OpenLogDialog openDialog OpenLogDialog getViewSite getShell inputFile openDialog
open Dialog open else boolean can Launch Program launch input File get Absolute Path  openDialog canLaunch inputFile getAbsolutePath
if can Launch Program p Program find Program txt NON NLS 1 if p null p execute input File get Absolute Path else Open Log Dialog open Dialog new Open Log Dialog get View Site get Shell input File open Dialog create open Dialog open  canLaunch findProgram inputFile getAbsolutePath OpenLogDialog openDialog OpenLogDialog getViewSite getShell inputFile openDialog openDialog
view Log Action set Image Descriptor PDE Runtime Plugin Images DESC OPEN LOG  viewLogAction setImageDescriptor PDERuntimePluginImages DESC_OPEN_LOG
view Log Action set Disabled Image Descriptor PDE Runtime Plugin Images DESC OPEN LOG DISABLED view Log Action set Enabled input File exists  viewLogAction setDisabledImageDescriptor PDERuntimePluginImages DESC_OPEN_LOG_DISABLED viewLogAction setEnabled inputFile
get Resource String Log View view current Log tooltip NON NLS 1 public void dispose Platform remove Log Listener this clipboard dispose Log Reader reset  getResourceString LogView currentLog removeLogListener LogReader
super dispose 
dialog set Filter Extensions new String log NON NLS 1 if directory null dialog set Filter Path directory  setFilterExtensions setFilterPath
view Log Action set Tool Tip Text PDE Runtime Plugin get Resource String Log View view current Log tooltip NON NLS 1 public void dispose Platform remove Log Listener this clipboard dispose Log Reader reset bold Font dispose super dispose private void handle Import File Dialog dialog new File Dialog get View Site get Shell dialog set Filter Extensions new String log NON NLS 1 if directory null dialog set Filter Path directory String path dialog open  viewLogAction setToolTipText PDERuntimePlugin getResourceString LogView currentLog removeLogListener LogReader boldFont handleImport FileDialog FileDialog getViewSite getShell setFilterExtensions setFilterPath
directory input File get Parent I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception  inputFile getParent IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException
begin Task PDE Runtime Plugin get Resource String Log View operation importing I Progress Monitor UNKNOWN NON NLS 1 read Log File  beginTask PDERuntimePlugin getResourceString LogView IProgressMonitor readLogFile
Progress Monitor Dialog pmd new Progress Monitor Dialog get View Site get Shell try pmd run true true op catch Invocation Target Exception e catch Interrupted Exception e  ProgressMonitorDialog ProgressMonitorDialog getViewSite getShell InvocationTargetException InterruptedException
input File new Path path to File directory input File get Parent I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task PDE Runtime Plugin get Resource String Log View operation importing I Progress Monitor UNKNOWN NON NLS 1 read Log File Progress Monitor Dialog pmd new Progress Monitor Dialog get View Site get Shell try pmd run true true op catch Invocation Target Exception e catch Interrupted Exception e finally  inputFile toFile inputFile getParent IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask PDERuntimePlugin getResourceString LogView IProgressMonitor readLogFile ProgressMonitorDialog ProgressMonitorDialog getViewSite getShell InvocationTargetException InterruptedException
read Log Action set Text PDE Runtime Plugin get Resource String Log View read Log reload NON NLS 1 read Log Action set Tool Tip Text PDE Runtime Plugin  readLogAction setText PDERuntimePlugin getResourceString LogView readLog readLogAction setToolTipText PDERuntimePlugin

IBM Corporation initial API and implementation package org eclipse pde internal runtime logview 
package org eclipse pde internal runtime logview 
import org eclipse jface viewers 
import org eclipse jface viewers public class Log View Content Provider  LogViewContentProvider
public class Log View Content Provider implements I Tree Content Provider I Structured Content Provider  LogViewContentProvider ITreeContentProvider IStructuredContentProvider
implements I Tree Content Provider I Structured Content Provider private Log View log View  ITreeContentProvider IStructuredContentProvider LogView logView
public Log View Content Provider Log View log View  LogViewContentProvider LogView logView
public Log View Content Provider Log View log View this log View log View  LogViewContentProvider LogView logView logView logView

import org eclipse core runtime I Status import org eclipse jface viewers import org eclipse pde internal runtime PDE Runtime Plugin Images  IStatus PDERuntimePluginImages
import org eclipse swt graphics Image public class Log View Label Provider extends Label Provider  LogViewLabelProvider LabelProvider
implements I Table Label Provider private Image info Image private Image error Image private Image warning Image private Image error With Stack Image public Log View Label Provider  ITableLabelProvider infoImage errorImage warningImage errorWithStackImage LogViewLabelProvider
error Image PDE Runtime Plugin Images DESC ERROR ST OBJ create Image warning Image PDE Runtime Plugin Images DESC WARNING ST OBJ create Image info Image PDE Runtime Plugin Images DESC INFO ST OBJ create Image error With Stack Image PDE Runtime Plugin Images DESC ERROR STACK OBJ create Image public void dispose  errorImage PDERuntimePluginImages DESC_ERROR_ST_OBJ createImage warningImage PDERuntimePluginImages DESC_WARNING_ST_OBJ createImage infoImage PDERuntimePluginImages DESC_INFO_ST_OBJ createImage errorWithStackImage PDERuntimePluginImages DESC_ERROR_STACK_OBJ createImage

public Open Log Dialog Shell parent Shell File log File super parent Shell this log File log File set Shell Style SWT DIALOG TRIM SWT RESIZE SWT MAX SWT MIN SWT MODELESS  OpenLogDialog parentShell logFile parentShell logFile logFile setShellStyle DIALOG_TRIM
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text PDE Runtime Plugin get Resource String Open Log Dialog title NON NLS 1 read Configuration  configureShell newShell configureShell newShell newShell setText PDERuntimePlugin getResourceString OpenLogDialog readConfiguration
non Javadoc Method declared on Dialog protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants CLOSE ID I Dialog Constants CLOSE LABEL true  createButtonsForButtonBar createButton IDialogConstants CLOSE_ID IDialogConstants CLOSE_LABEL
public void create super create dialog location if dialog Location null get Shell set Location dialog Location dialog size if dialog Size null get Shell set Size dialog Size else get Shell set Size DEFAULT WIDTH DEFAULT HEIGHT get Button I Dialog Constants CLOSE ID set Focus  dialogLocation getShell setLocation dialogLocation dialogSize getShell setSize dialogSize getShell setSize DEFAULT_WIDTH DEFAULT_HEIGHT getButton IDialogConstants CLOSE_ID setFocus
protected Control create Dialog Area Composite parent Composite outer Composite super create Dialog Area parent Text text new Text outer SWT MULTI SWT BORDER SWT READ ONLY SWT V SCROLL SWT NO FOCUS SWT H SCROLL text set Background parent get Display get System Color SWT COLOR LIST BACKGROUND Grid Data grid Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN FILL grid Data grab Excess Vertical Space true grid Data grab Excess Horizontal Space true text set Layout Data grid Data text set Text get Log Summary return outer  createDialogArea createDialogArea READ_ONLY V_SCROLL NO_FOCUS H_SCROLL setBackground getDisplay getSystemColor COLOR_LIST_BACKGROUND GridData gridData GridData GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_FILL gridData grabExcessVerticalSpace gridData grabExcessHorizontalSpace setLayoutData gridData setText getLogSummary
private String get Log Summary String Writer out new String Writer Print Writer writer new Print Writer out if log File length Log Reader MAX FILE LENGTH read Large File With Monitor writer else read File With Monitor writer writer close return out to String  getLogSummary StringWriter StringWriter PrintWriter PrintWriter logFile LogReader MAX_FILE_LENGTH readLargeFileWithMonitor readFileWithMonitor toString
protected void button Pressed int button Id if button Id I Dialog Constants CLOSE ID store Settings close super button Pressed button Id  buttonPressed buttonId buttonId IDialogConstants CLOSE_ID storeSettings buttonPressed buttonId
configuration handling Stores the current state in the dialog settings since 2 0 private void store Settings write Configuration  storeSettings writeConfiguration
Returns the dialog settings object used to share state between several event detail dialogs return the dialog settings to be used private I Dialog Settings get Dialog Settings I Dialog Settings settings PDE Runtime Plugin get Default get Dialog Settings dialog Settings settings get Section get Class get Name if dialog Settings null dialog Settings settings add New Section get Class get Name return dialog Settings  IDialogSettings getDialogSettings IDialogSettings PDERuntimePlugin getDefault getDialogSettings dialogSettings getSection getClass getName dialogSettings dialogSettings addNewSection getClass getName dialogSettings
Initializes itself from the dialog settings with the same state as at the previous invocation private void read Configuration I Dialog Settings s get Dialog Settings try int x s get Int x NON NLS 1 int y s get Int y NON NLS 1 dialog Location new Point x y x s get Int width NON NLS 1 y s get Int height NON NLS 1 dialog Size new Point x y catch Number Format Exception e dialog Location null dialog Size null  readConfiguration IDialogSettings getDialogSettings getInt getInt dialogLocation getInt getInt dialogSize NumberFormatException dialogLocation dialogSize
private void write Configuration I Dialog Settings s get Dialog Settings Point location get Shell get Location s put x location x NON NLS 1 s put y location y NON NLS 1 Point size get Shell get Size s put width size x NON NLS 1 s put height size y NON NLS 1  writeConfiguration IDialogSettings getDialogSettings getShell getLocation getShell getSize
reading file within MAX FILE LENGTH size private void read File Print Writer writer throws File Not Found Exception IO Exception Buffered Reader b Reader new Buffered Reader new File Reader log File while b Reader ready writer println b Reader read Line  MAX_FILE_LENGTH readFile PrintWriter FileNotFoundException IOException BufferedReader bReader BufferedReader FileReader logFile bReader bReader readLine
reading large files private void read Large File Print Writer writer throws File Not Found Exception IO Exception Random Access File random null boolean has Started false try random new Random Access File log File r NON NLS 1 random seek log File length Log Reader MAX FILE LENGTH for String line random read Line if line null break line line trim if line length 0 continue if has Started line starts With ENTRY line starts With SESSION NON NLS 1 NON NLS 2 has Started true if has Started writer println line continue finally try if random null random close catch IO Exception e1  readLargeFile PrintWriter FileNotFoundException IOException RandomAccessFile hasStarted RandomAccessFile logFile logFile LogReader MAX_FILE_LENGTH readLine hasStarted startsWith startsWith hasStarted hasStarted IOException
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task PDE Runtime Plugin get Resource String Open Log Dialog message I Progress Monitor UNKNOWN NON NLS 1 try read Large File writer catch IO Exception e writer println PDE Runtime Plugin get Resource String Open Log Dialog cannot Display NON NLS 1  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask PDERuntimePlugin getResourceString OpenLogDialog IProgressMonitor readLargeFile IOException PDERuntimePlugin getResourceString OpenLogDialog cannotDisplay
private void read Large File With Monitor final Print Writer writer I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task PDE Runtime Plugin get Resource String Open Log Dialog message I Progress Monitor UNKNOWN NON NLS 1 try read Large File writer catch IO Exception e writer println PDE Runtime Plugin get Resource String Open Log Dialog cannot Display NON NLS 1 Progress Monitor Dialog dialog new Progress Monitor Dialog get Parent Shell try dialog run true true runnable catch Invocation Target Exception e catch Interrupted Exception e  readLargeFileWithMonitor PrintWriter IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask PDERuntimePlugin getResourceString OpenLogDialog IProgressMonitor readLargeFile IOException PDERuntimePlugin getResourceString OpenLogDialog cannotDisplay ProgressMonitorDialog ProgressMonitorDialog getParentShell InvocationTargetException InterruptedException
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task PDE Runtime Plugin get Resource String Open Log Dialog message I Progress Monitor UNKNOWN NON NLS 1 try read File writer catch IO Exception e writer println PDE Runtime Plugin get Resource String Open Log Dialog cannot Display NON NLS 1  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask PDERuntimePlugin getResourceString OpenLogDialog IProgressMonitor readFile IOException PDERuntimePlugin getResourceString OpenLogDialog cannotDisplay
private void read File With Monitor final Print Writer writer I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task PDE Runtime Plugin get Resource String Open Log Dialog message I Progress Monitor UNKNOWN NON NLS 1 try read File writer catch IO Exception e writer println PDE Runtime Plugin get Resource String Open Log Dialog cannot Display NON NLS 1 Progress Monitor Dialog dialog new Progress Monitor Dialog get Parent Shell try dialog run true true runnable catch Invocation Target Exception e catch Interrupted Exception e  readFileWithMonitor PrintWriter IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask PDERuntimePlugin getResourceString OpenLogDialog IProgressMonitor readFile IOException PDERuntimePlugin getResourceString OpenLogDialog cannotDisplay ProgressMonitorDialog ProgressMonitorDialog getParentShell InvocationTargetException InterruptedException

import org eclipse swt graphics 
public class Overlay Icon extends Composite Image Descriptor static final int DEFAULT WIDTH 16 static final int DEFAULT HEIGHT 16  OverlayIcon CompositeImageDescriptor DEFAULT_WIDTH DEFAULT_HEIGHT
private Point f Size null private Image Descriptor f Base private Image Descriptor f Overlays  fSize ImageDescriptor fBase ImageDescriptor fOverlays
public Overlay Icon Image Descriptor base Image Descriptor overlays f Base base if f Base null f Base Image Descriptor get Missing Image Descriptor f Overlays overlays f Size new Point DEFAULT WIDTH DEFAULT HEIGHT  OverlayIcon ImageDescriptor ImageDescriptor fBase fBase fBase ImageDescriptor getMissingImageDescriptor fOverlays fSize DEFAULT_WIDTH DEFAULT_HEIGHT
public Overlay Icon Image Descriptor base Image Descriptor overlays Point size f Base base if f Base null f Base Image Descriptor get Missing Image Descriptor f Overlays overlays f Size size protected void draw Bottom Left Image Descriptor overlays if overlays null  OverlayIcon ImageDescriptor ImageDescriptor fBase fBase fBase ImageDescriptor getMissingImageDescriptor fOverlays fSize drawBottomLeft ImageDescriptor
return int length overlays length int x 0 for int i 0 i 3 i if i length overlays i null Image Data id overlays i get Image Data  ImageData getImageData
draw Image id x get Size y id height x id width protected void draw Bottom Right Image Descriptor overlays if overlays null  drawImage getSize drawBottomRight ImageDescriptor
if overlays null return int length overlays length 

import org eclipse core runtime I Path import org eclipse core runtime I Plugin Descriptor import org eclipse core runtime Path import org eclipse core runtime Platform import org eclipse pde internal runtime registry Plugin Object Adapter import org eclipse pde internal runtime registry Registry Property Source Factory  IPath IPluginDescriptor PluginObjectAdapter RegistryPropertySourceFactory
import org eclipse pde internal runtime registry Registry Property Source Factory import org eclipse swt widgets Shell import org eclipse ui I Workbench Page  RegistryPropertySourceFactory IWorkbenchPage
import org eclipse ui I Workbench Page import org eclipse ui I Workbench Window  IWorkbenchPage IWorkbenchWindow
import org eclipse ui I Workbench Window import org eclipse ui plugin AbstractUI Plugin import org osgi framework Bundle Context  IWorkbenchWindow AbstractUIPlugin BundleContext
import org osgi framework Bundle Context  BundleContext
public class PDE Runtime Plugin extends AbstractUI Plugin  PDERuntimePlugin AbstractUIPlugin
private static PDE Runtime Plugin inst private Resource Bundle resource Bundle  PDERuntimePlugin ResourceBundle resourceBundle
private Resource Bundle resource Bundle private Bundle Context context  ResourceBundle resourceBundle BundleContext
public PDE Runtime Plugin I Plugin Descriptor descriptor super descriptor inst this try resource Bundle  PDERuntimePlugin IPluginDescriptor resourceBundle
Resource Bundle get Bundle org eclipse pde internal runtime pderuntimeresources NON NLS 1 catch Missing Resource Exception x  ResourceBundle getBundle MissingResourceException
catch Missing Resource Exception x resource Bundle null  MissingResourceException resourceBundle
public static I Workbench Page get Active Page  IWorkbenchPage getActivePage
public static Shell get Active Workbench Shell return get Active Workbench Window get Shell  getActiveWorkbenchShell getActiveWorkbenchWindow getShell
public static I Workbench Window get Active Workbench Window  IWorkbenchWindow getActiveWorkbenchWindow

create PATH LCL properties gif NON NLS 1 public static final Image Descriptor DESC OPEN LOG  PATH_LCL ImageDescriptor DESC_OPEN_LOG
create PATH LCL open log gif NON NLS 1 public static final Image Descriptor DESC OPEN LOG DISABLED  PATH_LCL open_log ImageDescriptor DESC_OPEN_LOG_DISABLED
create PATH LCL DISABLED open log gif NON NLS 1 public static final Image Descriptor DESC PROPERTIES DISABLED create PATH LCL DISABLED properties gif NON NLS 1 public static final Image Descriptor DESC REFRESH  PATH_LCL_DISABLED open_log ImageDescriptor DESC_PROPERTIES_DISABLED PATH_LCL_DISABLED ImageDescriptor DESC_REFRESH
create PATH LCL refresh gif NON NLS 1 public static final Image Descriptor DESC REFRESH DISABLED  PATH_LCL ImageDescriptor DESC_REFRESH_DISABLED

IBM Corporation initial API and implementation 
package org eclipse pde internal runtime registry import org eclipse core runtime I Configuration Element public class Configuration Element Adapter extends Parent Adapter  IConfigurationElement ConfigurationElementAdapter ParentAdapter

package org eclipse pde internal runtime registry 
import java util Vector import org eclipse core runtime I Configuration Element import org eclipse ui views properties  IConfigurationElement
import org eclipse ui views properties public class Configuration Element Property Source extends Registry Property Source  ConfigurationElementPropertySource RegistryPropertySource

IBM Corporation initial API and implementation 
package org eclipse pde internal runtime registry import org eclipse core runtime public class Extension Adapter extends Parent Adapter  ExtensionAdapter ParentAdapter

IBM Corporation initial API and implementation 
package org eclipse pde internal runtime registry import org eclipse core runtime public class Extension Point Adapter extends Parent Adapter  ExtensionPointAdapter ParentAdapter

import java util Vector 
import org eclipse core runtime I Extension Point import org eclipse pde internal runtime PDE Runtime Plugin import org eclipse ui views properties  IExtensionPoint PDERuntimePlugin
public class Extension Point Property Source extends Registry Property Source private I Extension Point extension Point public static final String P NAME name NON NLS 1  ExtensionPointPropertySource RegistryPropertySource IExtensionPoint extensionPoint P_NAME

import org eclipse core runtime I Extension  IExtension
import org eclipse pde internal runtime PDE Runtime Plugin import org eclipse ui views properties public class Extension Property Source extends Registry Property Source  PDERuntimePlugin ExtensionPropertySource RegistryPropertySource
private I Extension extension public static final String P NAME name NON NLS 1 public static final String P ID id NON NLS 1 public static final String P POINT point NON NLS 1  IExtension P_NAME P_ID P_POINT

package org eclipse pde internal runtime registry 
package org eclipse pde internal runtime registry 
C eclipse source Build src Included 3 0 plugins org eclipse pde runtime src org eclipse pde internal runtime registry I Plugin Folder java sourceBuild srcIncluded IPluginFolder

import org eclipse core runtime I Library  ILibrary
import org eclipse pde internal runtime PDE Runtime Plugin import org eclipse ui views properties public class Library Property Source extends Registry Property Source  PDERuntimePlugin LibraryPropertySource RegistryPropertySource
private I Library library public static final String P PATH path NON NLS 1 public static final String KEY PATH Registry View libraryPR path NON NLS 1 public static final String KEY EXPORTED Registry View libraryPR exported NON NLS 1  ILibrary P_PATH KEY_PATH RegistryView KEY_EXPORTED RegistryView

Contributors IBM Corporation initial API and implementation 
IBM Corporation initial API and implementation 
package org eclipse pde internal runtime registry 

IBM Corporation initial API and implementation 
package org eclipse pde internal runtime registry 

import org eclipse ui views properties 
public class Plugin Property Source extends Registry Property Source private I Plugin Descriptor pd public static final String P INSTALL URL installURL NON NLS 1 public static final String P NAME name NON NLS 1 public static final String P ID id NON NLS 1  PluginPropertySource RegistryPropertySource IPluginDescriptor P_INSTALL_URL P_NAME P_ID
public static final String P PROVIDER provider NON NLS 1 public static final String P VERSION version NON NLS 1 public static final String P ACTIVATED activated NON NLS 1 public static final String KEY ACTIVATED Registry View pluginPR activated NON NLS 1 public static final String KEY INSTALL URL Registry View pluginPR installURL NON NLS 1 public static final String KEY NAME Registry View pluginPR name NON NLS 1 public static final String KEY ID Registry View pluginPR id NON NLS 1 public static final String KEY PROVIDER NAME Registry View pluginPR provider Name NON NLS 1  P_PROVIDER P_VERSION P_ACTIVATED KEY_ACTIVATED RegistryView KEY_INSTALL_URL RegistryView KEY_NAME RegistryView KEY_ID RegistryView KEY_PROVIDER_NAME RegistryView providerName

public static final String P VERSION version NON NLS 1 public static final String P EXPORTED exported NON NLS 1 public static final String P MATCH match NON NLS 1  P_VERSION P_EXPORTED P_MATCH
public static final String P MATCH match NON NLS 1 public static final String P OPTIONAL optional NON NLS 1 public static final String KEY EXPORTED Registry View prerequisitePR exported NON NLS 1 public static final String KEY ID Registry View prerequisitePR id NON NLS 1 public static final String KEY MATCH Registry View prerequisitePR match NON NLS 1 public static final String KEY VERSION Registry View prerequisitePR version NON NLS 1 public static final String KEY OPTIONAL Registry View prerequisitePR optional NON NLS 1 public static final String KEY MATCHED COMPATIBLE Registry View prerequisitePR matched Compatible NON NLS 1 public static final String KEY MATCHED EXACT  P_MATCH P_OPTIONAL KEY_EXPORTED RegistryView KEY_ID RegistryView KEY_MATCH RegistryView KEY_VERSION RegistryView KEY_OPTIONAL RegistryView KEY_MATCHED_COMPATIBLE RegistryView matchedCompatible KEY_MATCHED_EXACT
public static final String KEY MATCHED EQUIVALENT Registry View prerequisitePR matched Equivalent NON NLS 1 public static final String KEY MATCHED GREATER OR EQUAL Registry View prerequisitePR matched Greater Or Equal NON NLS 1 public static final String KEY MATCHED PERFECT Registry View prerequisitePR matched Perfect NON NLS 1 public Prerequisite Property Source I Plugin Prerequisite prereq this prereq prereq public I Property Descriptor get Property Descriptors Vector result new Vector result add Element new Property Descriptor P EXPORTED  KEY_MATCHED_EQUIVALENT RegistryView matchedEquivalent KEY_MATCHED_GREATER_OR_EQUAL RegistryView matchedGreaterOrEqual KEY_MATCHED_PERFECT RegistryView matchedPerfect PrerequisitePropertySource IPluginPrerequisite IPropertyDescriptor getPropertyDescriptors addElement PropertyDescriptor P_EXPORTED

public static final String REGISTRY ORIENTATION Registry View orientation NON NLS 1 public static final String KEY COLLAPSE ALL LABEL Registry View collapse All label NON NLS 1  REGISTRY_ORIENTATION RegistryView KEY_COLLAPSE_ALL_LABEL RegistryView collapseAll
public static final String KEY COLLAPSE ALL TOOLTIP Registry View collapse All tooltip NON NLS 1 public static final int VERTICAL ORIENTATION 1  KEY_COLLAPSE_ALL_TOOLTIP RegistryView collapseAll VERTICAL_ORIENTATION
public static final int VERTICAL ORIENTATION 1 public static final int HORIZONTAL ORIENTATION 2 public static final int SINGLE PANE ORIENTATION 3  VERTICAL_ORIENTATION HORIZONTAL_ORIENTATION SINGLE_PANE_ORIENTATION
private Tree Viewer tree Viewer private I Memento memento  TreeViewer treeViewer IMemento
private I Memento memento private static int orientation private int horizontal Sash Weight  IMemento horizontalSashWeight
private int vertical Sash Weight private static final int DEFAULT SASH WEIGHTS 13 6  verticalSashWeight DEFAULT_SASH_WEIGHTS
menus and action items private Action refresh Action private Action show Plugins Action private Action collapse All Action  refreshAction showPluginsAction collapseAllAction
private Action toggle View Action private Drill Down Adapter drill Down Adapter attributes view  toggleViewAction DrillDownAdapter drillDownAdapter
private Label f Property Label private Label f Property Image private Property Sheet Page f Property Sheet  fPropertyLabel fPropertyImage PropertySheetPage fPropertySheet
customized Drill Down Adapter which modifies enabled state of showing active inactive plug ins action see Bug 58467 class Registry Drill Down Adapter extends Drill Down Adapter public Registry Drill Down Adapter Tree Viewer tree super tree  DrillDownAdapter RegistryDrillDownAdapter DrillDownAdapter RegistryDrillDownAdapter TreeViewer
public void go Back super go Back show Plugins Action set Enabled can Go Home  goBack goBack showPluginsAction setEnabled canGoHome
public void go Home super go Home show Plugins Action set Enabled can Go Home  goHome goHome showPluginsAction setEnabled canGoHome
show Plugins Action set Enabled can Go Home  showPluginsAction setEnabled canGoHome
public void go Into super go Into show Plugins Action set Enabled can Go Home public void go Back super go Back show Plugins Action set Enabled can Go Home public void go Home super go Home show Plugins Action set Enabled can Go Home public void go Into Object new Input super go Into new Input show Plugins Action set Enabled can Go Home public Registry Browser super  goInto goInto showPluginsAction setEnabled canGoHome goBack goBack showPluginsAction setEnabled canGoHome goHome goHome showPluginsAction setEnabled canGoHome goInto newInput goInto newInput showPluginsAction setEnabled canGoHome RegistryBrowser
public void init I View Site site I Memento memento throws Part Init Exception super init site memento if memento null this memento XML Memento create Write Root REGISTRYVIEW NON NLS 1 else this memento memento initialize Memento orientation this memento get Integer REGISTRY ORIENTATION int Value  IViewSite IMemento PartInitException XMLMemento createWriteRoot initializeMemento getInteger REGISTRY_ORIENTATION intValue
private void initialize Memento if memento get String SHOW RUNNING PLUGINS null memento put String SHOW RUNNING PLUGINS true NON NLS 1 if memento get String Toggle Properties Action SHOW PROPERTIES SHEET null memento put String Toggle Properties Action SHOW PROPERTIES SHEET true NON NLS 1 if memento get Integer REGISTRY ORIENTATION null memento put Integer REGISTRY ORIENTATION HORIZONTAL ORIENTATION  initializeMemento getString SHOW_RUNNING_PLUGINS putString SHOW_RUNNING_PLUGINS getString TogglePropertiesAction SHOW_PROPERTIES_SHEET putString TogglePropertiesAction SHOW_PROPERTIES_SHEET getInteger REGISTRY_ORIENTATION putInteger REGISTRY_ORIENTATION HORIZONTAL_ORIENTATION
public void dispose Platform get Extension Registry remove Registry Change Listener this PDE Runtime Plugin get Default get Bundle Context remove Bundle Listener this super dispose  getExtensionRegistry removeRegistryChangeListener PDERuntimePlugin getDefault getBundleContext removeBundleListener
public void create Part Control Composite parent  createPartControl
create the sash form that will contain the tree viewer text viewer f Sash Form new Sash Form parent SWT HORIZONTAL  fSashForm SashForm
f Sash Form new Sash Form parent SWT HORIZONTAL f Sash Form set Layout new Grid Layout f Sash Form set Layout Data new Grid Data Grid Data FILL BOTH  fSashForm SashForm fSashForm setLayout GridLayout fSashForm setLayoutData GridData GridData FILL_BOTH
f Sash Form set Layout Data new Grid Data Grid Data FILL BOTH set Sash Form f Sash Form make Actions create Tree Viewer create Attributes Viewer fill Tool Bar  fSashForm setLayoutData GridData GridData FILL_BOTH setSashForm fSashForm makeActions createTreeViewer createAttributesViewer fillToolBar
set View Orientation orientation Platform get Extension Registry add Registry Change Listener this PDE Runtime Plugin get Default get Bundle Context add Bundle Listener this private void create Tree Viewer  setViewOrientation getExtensionRegistry addRegistryChangeListener PDERuntimePlugin getDefault getBundleContext addBundleListener createTreeViewer
Tree tree new Tree get Sash Form SWT FLAT tree Viewer new Tree Viewer tree  getSashForm treeViewer TreeViewer
tree Viewer new Tree Viewer tree boolean show Running memento get String SHOW RUNNING PLUGINS equals true true false NON NLS 1  treeViewer TreeViewer showRunning getString SHOW_RUNNING_PLUGINS
tree Viewer set Input new Plugin Object Adapter Platform get Plugin Registry tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Object selection I Structured Selection event get Selection get First Element update Attributes View selection tree Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event Object selection I Structured Selection event get Selection get First Element  treeViewer setInput PluginObjectAdapter getPluginRegistry treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection getSelection getFirstElement updateAttributesView treeViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent IStructuredSelection getSelection getFirstElement
set Label Provider new Registry Browser Label Provider tree Viewer tree Viewer set Use Hashlookup true tree Viewer set Sorter new Viewer Sorter tree Viewer set Input new Plugin Object Adapter Platform get Plugin Registry tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Object selection I Structured Selection event get Selection get First Element update Attributes View selection tree Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event Object selection I Structured Selection event get Selection get First Element update Attributes View selection  setLabelProvider RegistryBrowserLabelProvider treeViewer treeViewer setUseHashlookup treeViewer setSorter ViewerSorter treeViewer setInput PluginObjectAdapter getPluginRegistry treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection getSelection getFirstElement updateAttributesView treeViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent IStructuredSelection getSelection getFirstElement updateAttributesView
Workbench Help set Help tree Viewer get Control I Help Context Ids REGISTRY VIEW get View Site set Selection Provider tree Viewer Menu Manager popup Menu Manager new Menu Manager I Menu Listener listener new I Menu Listener public void menu About To Show I Menu Manager mng  WorkbenchHelp setHelp treeViewer getControl IHelpContextIds REGISTRY_VIEW getViewSite setSelectionProvider treeViewer MenuManager popupMenuManager MenuManager IMenuListener IMenuListener menuAboutToShow IMenuManager
tree Viewer set Expanded State selection tree Viewer get Expanded State selection Workbench Help set Help tree Viewer get Control I Help Context Ids REGISTRY VIEW get View Site set Selection Provider tree Viewer Menu Manager popup Menu Manager new Menu Manager I Menu Listener listener new I Menu Listener public void menu About To Show I Menu Manager mng fill Context Menu mng  treeViewer setExpandedState treeViewer getExpandedState WorkbenchHelp setHelp treeViewer getControl IHelpContextIds REGISTRY_VIEW getViewSite setSelectionProvider treeViewer MenuManager popupMenuManager MenuManager IMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu
popup Menu Manager add Menu Listener listener Menu menu popup Menu Manager create Context Menu tree tree set Menu menu  popupMenuManager addMenuListener popupMenuManager createContextMenu setMenu
popup Menu Manager set Remove All When Shown true popup Menu Manager add Menu Listener listener Menu menu popup Menu Manager create Context Menu tree tree set Menu menu  popupMenuManager setRemoveAllWhenShown popupMenuManager addMenuListener popupMenuManager createContextMenu setMenu
Composite composite new Composite get Sash Form SWT FLAT Grid Layout layout new Grid Layout layout margin Width layout margin Height 2  getSashForm GridLayout GridLayout marginWidth marginHeight
layout make Columns Equal Width false composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH  makeColumnsEqualWidth setLayout setLayoutData GridData GridData FILL_BOTH
popup Menu Manager set Remove All When Shown true popup Menu Manager add Menu Listener listener Menu menu popup Menu Manager create Context Menu tree tree set Menu menu add attributes viewer protected void create Attributes Viewer Composite composite new Composite get Sash Form SWT FLAT Grid Layout layout new Grid Layout layout margin Width layout margin Height 2 layout num Columns 2 layout make Columns Equal Width false composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH f Property Image new Label composite SWT NONE Grid Data gd new Grid Data Grid Data FILL gd width Hint 20 f Property Image set Layout Data gd f Property Label new Label composite SWT NULL f Property Label set Layout Data new Grid Data Grid Data FILL HORIZONTAL  popupMenuManager setRemoveAllWhenShown popupMenuManager addMenuListener popupMenuManager createContextMenu setMenu createAttributesViewer getSashForm GridLayout GridLayout marginWidth marginHeight numColumns makeColumnsEqualWidth setLayout setLayoutData GridData GridData FILL_BOTH fPropertyImage GridData GridData GridData widthHint fPropertyImage setLayoutData fPropertyLabel fPropertyLabel setLayoutData GridData GridData FILL_HORIZONTAL
add property sheet protected void create Property Sheet Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width layout margin Height 0 composite set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH gd horizontal Span 2 composite set Layout Data gd f Property Sheet new Property Sheet Page f Property Sheet create Control composite  createPropertySheet GridLayout GridLayout marginWidth marginHeight setLayout GridData GridData GridData FILL_BOTH horizontalSpan setLayoutData fPropertySheet PropertySheetPage fPropertySheet createControl
f Property Sheet get Control set Layout Data gd f Property Sheet make Contributions new Menu Manager new Tool Bar Manager null  fPropertySheet getControl setLayoutData fPropertySheet makeContributions MenuManager ToolBarManager
private void fill Tool Bar drill Down Adapter new Registry Drill Down Adapter tree Viewer I Action Bars bars get View Site get Action Bars I Tool Bar Manager mng bars get Tool Bar Manager drill Down Adapter add Navigation Actions mng mng add refresh Action mng add new Separator  fillToolBar drillDownAdapter RegistryDrillDownAdapter treeViewer IActionBars getViewSite getActionBars IToolBarManager getToolBarManager drillDownAdapter addNavigationActions refreshAction
mng add collapse All Action I Menu Manager mgr bars get Menu Manager mgr add toggle View Action 0 mgr add toggle View Action 1 mgr add toggle View Action 2  collapseAllAction IMenuManager getMenuManager toggleViewAction toggleViewAction toggleViewAction

import org eclipse jface viewers import org eclipse osgi util import org osgi framework 
import org osgi framework public class Registry Browser Content Provider implements  RegistryBrowserContentProvider
implements org eclipse jface viewers I Tree Content Provider private Hashtable plugin Map new Hashtable  ITreeContentProvider pluginMap
private Hashtable plugin Map new Hashtable private boolean show Running public boolean is In Extension Set  pluginMap showRunning isInExtensionSet
public boolean is In Extension Set private Tree Viewer viewer  isInExtensionSet TreeViewer
class Plugin Folder implements I Plugin Folder  PluginFolder IPluginFolder
private int id I Plugin Descriptor pd private Object children public Plugin Folder I Plugin Descriptor pd int id  IPluginDescriptor PluginFolder IPluginDescriptor
this pd pd this id id public I Plugin Descriptor get Plugin Descriptor  IPluginDescriptor getPluginDescriptor
public I Plugin Descriptor get Plugin Descriptor return pd  IPluginDescriptor getPluginDescriptor
return pd public Object get Children  getChildren
public Object get Children if children null children get Folder Children pd id return children public int get Folder Id return id public Object get Adapter Class key return null public Registry Browser Content Provider Tree Viewer viewer boolean show Running super this viewer viewer this show Running show Running protected Plugin Object Adapter create Adapter Object object int id if id I Plugin Folder F EXTENSIONS return new Extension Adapter object if id I Plugin Folder F EXTENSION POINTS return new Extension Point Adapter object return new Plugin Object Adapter object protected Object create Plugin Folders I Plugin Descriptor pd Object array new Object 4 array 0 new Plugin Folder pd I Plugin Folder F IMPORTS array 1 new Plugin Folder pd I Plugin Folder F LIBRARIES array 2 new Plugin Folder pd I Plugin Folder F EXTENSION POINTS array 3 new Plugin Folder pd I Plugin Folder F EXTENSIONS return array  getChildren getFolderChildren getFolderId getAdapter RegistryBrowserContentProvider TreeViewer showRunning showRunning showRunning PluginObjectAdapter createAdapter IPluginFolder F_EXTENSIONS ExtensionAdapter IPluginFolder F_EXTENSION_POINTS ExtensionPointAdapter PluginObjectAdapter createPluginFolders IPluginDescriptor PluginFolder IPluginFolder F_IMPORTS PluginFolder IPluginFolder F_LIBRARIES PluginFolder IPluginFolder F_EXTENSION_POINTS PluginFolder IPluginFolder F_EXTENSIONS
public void dispose public Object get Elements Object element return get Children element public Object get Children Object element if element null return null if element instanceof Extension Adapter return Extension Adapter element get Children is In Extension Set false if element instanceof Extension Point Adapter return Extension Point Adapter element get Children return get Non Duplicate Label Children element if element instanceof Configuration Element Adapter  getElements getChildren getChildren ExtensionAdapter ExtensionAdapter getChildren isInExtensionSet ExtensionPointAdapter ExtensionPointAdapter getChildren getNonDuplicateLabelChildren ConfigurationElementAdapter
return Configuration Element Adapter element get Children if element instanceof Plugin Object Adapter element Plugin Object Adapter element get Object  ConfigurationElementAdapter getChildren PluginObjectAdapter PluginObjectAdapter getObject
if element equals Platform get Plugin Registry Object plugins get Plugins Platform get Plugin Registry if plugins null return new Object 0 if show Running Array List result List new Array List for int i 0 i plugins length i if plugins i instanceof Plugin Object Adapter Object object Plugin Object Adapter plugins i get Object if object instanceof I Plugin Descriptor I Plugin Descriptor object is Plugin Activated result List add plugins i  getPluginRegistry getPlugins getPluginRegistry showRunning ArrayList resultList ArrayList PluginObjectAdapter PluginObjectAdapter getObject IPluginDescriptor IPluginDescriptor isPluginActivated resultList
return result List to Array new Object result List size  resultList toArray resultList
return plugins 
if element instanceof I Plugin Descriptor  IPluginDescriptor
if element instanceof I Plugin Descriptor I Plugin Descriptor desc I Plugin Descriptor element Object folders Object plugin Map get desc  IPluginDescriptor IPluginDescriptor IPluginDescriptor pluginMap
Object folders Object plugin Map get desc get Unique Identifier  pluginMap getUniqueIdentifier

import org eclipse pde internal runtime PDE Runtime Plugin import org eclipse pde internal runtime PDE Runtime Plugin Images import org eclipse swt graphics Image public class Registry Browser Label Provider extends Label Provider private Image plugin Image private Image active Plugin Image private Image library Image private Image runtime Image private Image generic Tag Image  PDERuntimePlugin PDERuntimePluginImages RegistryBrowserLabelProvider LabelProvider pluginImage activePluginImage libraryImage runtimeImage genericTagImage
private Image extension Image private Image extensions Image private static final String KEY IMPORTS Registry View folders imports NON NLS 1 private static final String KEY LIBRARIES Registry View folders libraries NON NLS 1 private static final String KEY EXPOINTS Registry View folders extension Points NON NLS 1  extensionImage extensionsImage KEY_IMPORTS RegistryView KEY_LIBRARIES RegistryView KEY_EXPOINTS RegistryView extensionPoints
private static final String KEY EXTENSIONS Registry View folders extensions NON NLS 1 private Image extension Point Image private Image extension Points Image private Image requires Image private Image req Plugin Image private Tree Viewer viewer public Registry Browser Label Provider Tree Viewer viewer this viewer viewer plugin Image PDE Runtime Plugin Images DESC PLUGIN OBJ create Image req Plugin Image PDE Runtime Plugin Images DESC REQ PLUGIN OBJ create Image extension Point Image PDE Runtime Plugin Images DESC EXT POINT OBJ create Image extension Points Image PDE Runtime Plugin Images DESC EXT POINTS OBJ create Image extension Image PDE Runtime Plugin Images DESC EXTENSION OBJ create Image extensions Image PDE Runtime Plugin Images DESC EXTENSIONS OBJ create Image requires Image PDE Runtime Plugin Images DESC REQ PLUGINS OBJ create Image library Image PDE Runtime Plugin Images DESC JAVA LIB OBJ create Image generic Tag Image PDE Runtime Plugin Images DESC GENERIC XML OBJ create Image runtime Image PDE Runtime Plugin Images DESC RUNTIME OBJ create Image  KEY_EXTENSIONS RegistryView extensionPointImage extensionPointsImage requiresImage reqPluginImage TreeViewer RegistryBrowserLabelProvider TreeViewer pluginImage PDERuntimePluginImages DESC_PLUGIN_OBJ createImage reqPluginImage PDERuntimePluginImages DESC_REQ_PLUGIN_OBJ createImage extensionPointImage PDERuntimePluginImages DESC_EXT_POINT_OBJ createImage extensionPointsImage PDERuntimePluginImages DESC_EXT_POINTS_OBJ createImage extensionImage PDERuntimePluginImages DESC_EXTENSION_OBJ createImage extensionsImage PDERuntimePluginImages DESC_EXTENSIONS_OBJ createImage requiresImage PDERuntimePluginImages DESC_REQ_PLUGINS_OBJ createImage libraryImage PDERuntimePluginImages DESC_JAVA_LIB_OBJ createImage genericTagImage PDERuntimePluginImages DESC_GENERIC_XML_OBJ createImage runtimeImage PDERuntimePluginImages DESC_RUNTIME_OBJ createImage
Image Descriptor active Plugin Desc new Overlay Icon PDE Runtime Plugin Images DESC PLUGIN OBJ new Image Descriptor PDE Runtime Plugin Images DESC RUN CO active Plugin Image active Plugin Desc create Image public void dispose plugin Image dispose active Plugin Image dispose req Plugin Image dispose extension Point Image dispose extension Points Image dispose extension Image dispose extensions Image dispose requires Image dispose library Image dispose generic Tag Image dispose runtime Image dispose public Image get Image Object element if element instanceof Plugin Object Adapter element Plugin Object Adapter element get Object if element instanceof I Plugin Descriptor I Plugin Descriptor pd I Plugin Descriptor element boolean active pd is Plugin Activated return active active Plugin Image plugin Image  ImageDescriptor activePluginDesc OverlayIcon PDERuntimePluginImages DESC_PLUGIN_OBJ ImageDescriptor PDERuntimePluginImages DESC_RUN_CO activePluginImage activePluginDesc createImage pluginImage activePluginImage reqPluginImage extensionPointImage extensionPointsImage extensionImage extensionsImage requiresImage libraryImage genericTagImage runtimeImage getImage PluginObjectAdapter PluginObjectAdapter getObject IPluginDescriptor IPluginDescriptor IPluginDescriptor isPluginActivated activePluginImage pluginImage

IBM Corporation initial API and implementation package org eclipse pde internal runtime registry 
package org eclipse pde internal runtime registry 
import java util Vector 
C eclipse source Build src Included 3 0 plugins org eclipse pde runtime src org eclipse pde internal runtime registry Registry Property Source java sourceBuild srcIncluded RegistryPropertySource
import org eclipse ui views properties 
import org eclipse ui views properties public abstract class Registry Property Source implements I Property Source  RegistryPropertySource IPropertySource

IBM Corporation initial API and implementation package org eclipse pde internal runtime registry 
package org eclipse pde internal runtime registry 
import org eclipse core runtime import org eclipse ui views properties I Property Source public class Registry Property Source Factory implements I Adapter Factory public Object get Adapter Object adaptable Object Class adapter Type if adapter Type equals I Property Source class return get Property Source adaptable Object return null public java lang Class get Adapter List return new Class I Property Source class  IPropertySource RegistryPropertySourceFactory IAdapterFactory getAdapter adaptableObject adapterType adapterType IPropertySource getPropertySource adaptableObject getAdapterList IPropertySource

public Toggle Properties Action Registry Browser view int orientation super AS RADIO BUTTON NON NLS 1 set Registry Browser view set Orientation orientation if orientation Registry Browser VERTICAL ORIENTATION set Text PDE Runtime Plugin get Resource String USE VERTICAL ORIENTATION NON NLS 1 set Tool Tip Text PDE Runtime Plugin get Resource String USE VERTICAL ORIENTATION TOOLTIP NON NLS 1 set Description PDE Runtime Plugin get Resource String USE VERTICAL ORIENTATION DESC NON NLS 1 set Image Descriptor PDE Runtime Plugin Images DESC VERTICAL VIEW set Disabled Image Descriptor PDE Runtime Plugin Images DESC VERTICAL VIEW DISABLED else if orientation Registry Browser HORIZONTAL ORIENTATION set Text PDE Runtime Plugin get Resource String USE HORIZONTAL ORIENTATION NON NLS 1 set Tool Tip Text PDE Runtime Plugin get Resource String USE HORIZONTAL ORIENTATION TOOLTIP NON NLS 1 set Description PDE Runtime Plugin get Resource String USE HORIZONTAL ORIENTATION DESC NON NLS 1 set Image Descriptor PDE Runtime Plugin Images DESC HORIZONTAL VIEW set Disabled Image Descriptor PDE Runtime Plugin Images DESC HORIZONTAL VIEW DISABLED else set Text PDE Runtime Plugin get Resource String SHOW PROPERTIES SHEET set Tool Tip Text PDE Runtime Plugin get Resource String SHOW PROPERTIES SHEET TOOLTIP NON NLS 1 set Description PDE Runtime Plugin get Resource String SHOW PROPERTIES SHEET DESC NON NLS 1 set Image Descriptor PDE Runtime Plugin Images DESC HIDE PANE  TogglePropertiesAction RegistryBrowser AS_RADIO_BUTTON setRegistryBrowser setOrientation RegistryBrowser VERTICAL_ORIENTATION setText PDERuntimePlugin getResourceString USE_VERTICAL_ORIENTATION setToolTipText PDERuntimePlugin getResourceString USE_VERTICAL_ORIENTATION_TOOLTIP setDescription PDERuntimePlugin getResourceString USE_VERTICAL_ORIENTATION_DESC setImageDescriptor PDERuntimePluginImages DESC_VERTICAL_VIEW setDisabledImageDescriptor PDERuntimePluginImages DESC_VERTICAL_VIEW_DISABLED RegistryBrowser HORIZONTAL_ORIENTATION setText PDERuntimePlugin getResourceString USE_HORIZONTAL_ORIENTATION setToolTipText PDERuntimePlugin getResourceString USE_HORIZONTAL_ORIENTATION_TOOLTIP setDescription PDERuntimePlugin getResourceString USE_HORIZONTAL_ORIENTATION_DESC setImageDescriptor PDERuntimePluginImages DESC_HORIZONTAL_VIEW setDisabledImageDescriptor PDERuntimePluginImages DESC_HORIZONTAL_VIEW_DISABLED setText PDERuntimePlugin getResourceString SHOW_PROPERTIES_SHEET setToolTipText PDERuntimePlugin getResourceString SHOW_PROPERTIES_SHEET_TOOLTIP setDescription PDERuntimePlugin getResourceString SHOW_PROPERTIES_SHEET_DESC setImageDescriptor PDERuntimePluginImages DESC_HIDE_PANE
see org eclipse jface action I Action run public void run called when menu pressed get Registry Browser set View Orientation get Orientation  IAction getRegistryBrowser setViewOrientation getOrientation
private Registry Browser get Registry Browser return f Viewer  RegistryBrowser getRegistryBrowser fViewer
private void set Registry Browser Registry Browser view f Viewer view  setRegistryBrowser RegistryBrowser fViewer
private void set Orientation int orientation f Orientation orientation  setOrientation fOrientation
public int get Orientation return f Orientation  getOrientation fOrientation

public class Site Project extends Base Project public Site Project super  SiteProject BaseProject SiteProject
super public void configure throws Core Exception add To Build Spec PDE SITE BUILDER ID  CoreException addToBuildSpec SITE_BUILDER_ID
add To Build Spec PDE SITE BUILDER ID public void deconfigure throws Core Exception remove From Build Spec PDE SITE BUILDER ID  addToBuildSpec SITE_BUILDER_ID CoreException removeFromBuildSpec SITE_BUILDER_ID

protected I File f Manifest File public void set Active Part I Action action I Workbench Part target Part  IFile fManifestFile setActivePart IAction IWorkbenchPart targetPart
I Workspace Runnable wop new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception try do Build monitor catch Invocation Target Exception e PDE Plugin log Exception e  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException doBuild InvocationTargetException PDEPlugin logException
I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor I Workspace Runnable wop new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception try do Build monitor catch Invocation Target Exception e PDE Plugin log Exception e try PDE Plugin get Workspace run wop monitor catch Core Exception e PDE Plugin log Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException doBuild InvocationTargetException PDEPlugin logException PDEPlugin getWorkspace CoreException PDEPlugin logException
public void run I Action action if f Manifest File exists return I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor I Workspace Runnable wop new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception try do Build monitor catch Invocation Target Exception e PDE Plugin log Exception e try PDE Plugin get Workspace run wop monitor catch Core Exception e PDE Plugin log Exception e try PlatformUI get Workbench get Progress Service run InUI PDE Plugin get Active Workbench Window op PDE Plugin get Workspace get Root catch Interrupted Exception e catch Invocation Target Exception e PDE Plugin log Exception e  IAction fManifestFile IRunnableWithProgress IRunnableWithProgress IProgressMonitor IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException doBuild InvocationTargetException PDEPlugin logException PDEPlugin getWorkspace CoreException PDEPlugin logException getWorkbench getProgressService runInUI PDEPlugin getActiveWorkbenchWindow PDEPlugin getWorkspace getRoot InterruptedException InvocationTargetException PDEPlugin logException
public void selection Changed I Action action I Selection selection if selection instanceof I Structured Selection Object obj I Structured Selection selection get First Element if obj null obj instanceof I File this f Manifest File I File obj  selectionChanged IAction ISelection IStructuredSelection IStructuredSelection getFirstElement IFile fManifestFile IFile
private void do Build I Progress Monitor monitor throws Core Exception Invocation Target Exception monitor begin Task PDE Plugin get Resource String Build Action Validate 4 NON NLS 1 if ensure Valid f Manifest File monitor monitor done return monitor worked 1 monitor set Task Name PDE Plugin get Resource String Build Action Generate NON NLS 1 make Scripts monitor monitor worked 1 monitor set Task Name PDE Plugin get Resource String Build Action Update NON NLS 1 refresh Local monitor monitor worked 1 set Default Values monitor worked 1  doBuild IProgressMonitor CoreException InvocationTargetException beginTask PDEPlugin getResourceString BuildAction ensureValid fManifestFile setTaskName PDEPlugin getResourceString BuildAction makeScripts setTaskName PDEPlugin getResourceString BuildAction refreshLocal setDefaultValues
protected abstract void make Scripts I Progress Monitor monitor throws Invocation Target Exception Core Exception  makeScripts IProgressMonitor InvocationTargetException CoreException
public static boolean ensure Valid I File file I Progress Monitor monitor throws Core Exception Force the build if autobuild is off I Project project file get Project if project get Workspace is Auto Building String builderID feature xml equals file get Name PDE FEATURE BUILDER ID PDE MANIFEST BUILDER ID NON NLS 1 project build Incremental Project Builder INCREMENTAL BUILD builderID null monitor if has Errors file There are errors against this file abort Message Dialog open Error null PDE Plugin get Resource String Build Action Error Dialog Title NON NLS 1 PDE Plugin get Resource String Build Action Error Dialog Message NON NLS 1 return false return true  ensureValid IFile IProgressMonitor CoreException IProject getProject getWorkspace isAutoBuilding getName FEATURE_BUILDER_ID MANIFEST_BUILDER_ID IncrementalProjectBuilder INCREMENTAL_BUILD hasErrors MessageDialog openError PDEPlugin getResourceString BuildAction ErrorDialog PDEPlugin getResourceString BuildAction ErrorDialog
public static boolean has Errors I File file throws Core Exception I Marker markers file find Markers I Marker PROBLEM true I Resource DEPTH ZERO for int i 0 i markers length i Object att markers i get Attribute I Marker SEVERITY if att null att instanceof Integer if Integer att int Value I Marker SEVERITY ERROR return true return false  hasErrors IFile CoreException IMarker findMarkers IMarker IResource DEPTH_ZERO getAttribute IMarker intValue IMarker SEVERITY_ERROR
protected void refresh Local I Progress Monitor monitor throws Core Exception I Project project f Manifest File get Project project refresh Local I Resource DEPTH ONE monitor I File file project get File dev properties NON NLS 1 if file exists file delete true false monitor project refresh Local I Resource DEPTH ONE monitor  refreshLocal IProgressMonitor CoreException IProject fManifestFile getProject refreshLocal IResource DEPTH_ONE IFile getFile refreshLocal IResource DEPTH_ONE
private void set Default Values I Project project f Manifest File get Project I File generated File I File project find Member build xml NON NLS 1 if generated File null return try List configs Ant Launch Shortcut find Existing Launch Configurations generated File I Launch Configuration Working Copy launch Copy if configs size 0 I Launch Configuration config Ant Launch Shortcut create Default Launch Configuration generated File launch Copy config get Working Copy else launch Copy I Launch Configuration configs get 0 get Working Copy if launch Copy null return Map properties new Hash Map properties launch Copy get Attribute I Ant Launch Configuration Constants ATTR ANT PROPERTIES properties properties put IXML Constants PROPERTY BASE WS Target Platform getWS properties put IXML Constants PROPERTY BASE OS Target Platform getOS properties put IXML Constants PROPERTY BASE ARCH Target Platform getOS Arch properties put IXML Constants PROPERTY BASE NL Target Platform getNL properties put eclipse running true NON NLS 1 NON NLS 2 I Preference Store store PDE Plugin get Default get Preference Store properties put IXML Constants PROPERTY JAVAC FAIL ON ERROR store get String PROP JAVAC FAIL ON ERROR properties put IXML Constants PROPERTY JAVAC DEBUG INFO store get Boolean PROP JAVAC DEBUG INFO on off NON NLS 1 NON NLS 2 properties put IXML Constants PROPERTY JAVAC VERBOSE store get String PROP JAVAC VERBOSE Preferences pref Java Core get Plugin get Plugin Preferences properties put IXML Constants PROPERTY JAVAC SOURCE pref get String Java Core COMPILER SOURCE properties put IXML Constants PROPERTY JAVAC TARGET pref get String Java Core COMPILER CODEGEN TARGET PLATFORM properties put IXML Constants PROPERTY BOOTCLASSPATH get Boot Classpath launch Copy set Attribute I Ant Launch Configuration Constants ATTR ANT PROPERTIES properties launch Copy set Attribute I Java Launch Configuration Constants ATTR VM INSTALL NAME String null launch Copy set Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE String null launch Copy do Save catch Core Exception e  setDefaultValues IProject fManifestFile getProject IFile generatedFile IFile findMember generatedFile AntLaunchShortcut findExistingLaunchConfigurations generatedFile ILaunchConfigurationWorkingCopy launchCopy ILaunchConfiguration AntLaunchShortcut createDefaultLaunchConfiguration generatedFile launchCopy getWorkingCopy launchCopy ILaunchConfiguration getWorkingCopy launchCopy HashMap launchCopy getAttribute IAntLaunchConfigurationConstants ATTR_ANT_PROPERTIES IXMLConstants PROPERTY_BASE_WS TargetPlatform IXMLConstants PROPERTY_BASE_OS TargetPlatform IXMLConstants PROPERTY_BASE_ARCH TargetPlatform getOSArch IXMLConstants PROPERTY_BASE_NL TargetPlatform IPreferenceStore PDEPlugin getDefault getPreferenceStore IXMLConstants PROPERTY_JAVAC_FAIL_ON_ERROR getString PROP_JAVAC_FAIL_ON_ERROR IXMLConstants PROPERTY_JAVAC_DEBUG_INFO getBoolean PROP_JAVAC_DEBUG_INFO IXMLConstants PROPERTY_JAVAC_VERBOSE getString PROP_JAVAC_VERBOSE JavaCore getPlugin getPluginPreferences IXMLConstants PROPERTY_JAVAC_SOURCE getString JavaCore COMPILER_SOURCE IXMLConstants PROPERTY_JAVAC_TARGET getString JavaCore COMPILER_CODEGEN_TARGET_PLATFORM IXMLConstants PROPERTY_BOOTCLASSPATH getBootClasspath launchCopy setAttribute IAntLaunchConfigurationConstants ATTR_ANT_PROPERTIES launchCopy setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_NAME launchCopy setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE launchCopy doSave CoreException
public static String get Boot Classpath String Buffer buffer new String Buffer Library Location locations Java Runtime get Library Locations Java Runtime get DefaultVM Install for int i 0 i locations length i buffer append locations i get System Library Path toOS String if i locations length 1 buffer append NON NLS 1 return buffer to String  getBootClasspath StringBuffer StringBuffer LibraryLocation JavaRuntime getLibraryLocations JavaRuntime getDefaultVMInstall getSystemLibraryPath toOSString toString

protected void make Scripts I Progress Monitor monitor throws Invocation Target Exception Core Exception Array List paths new Array List I Feature Model models PDE Core get Default get Workspace Model Manager get Feature Models for int i 0 i models length i paths add models i get Install Location Path SEPARATOR feature xml NON NLS 1 if models i get Underlying Resource equals f Manifest File model models i String plugins Target Platform create Plugin Path String features String paths to Array new String paths size String all new String plugins length paths size System arraycopy plugins 0 all 0 plugins length System arraycopy features 0 all plugins length features length Build Script Generator generator new Build Script Generator generator set BuildingOS Gi PDE Core get Default get Model Manager isOS Gi Runtime generator set Children true Build Script Generator set Embedded Source Abstract Script Generator get Default Embedded Source String url Classpath Helper get Dev Entries Properties f Manifest File get Project get Location add Trailing Separator to String dev properties false NON NLS 1 generator set Dev Entries url generator set Working Directory f Manifest File get Project get Location toOS String Build Script Generator set Output Format Abstract Script Generator get Default Output Format Build Script Generator set Config Info Abstract Script Generator get Default Config Infos generator set Elements new String feature model get Feature get Id NON NLS 1 generator set Plugin Path all generator set Generate Assemble Script false generator generate  makeScripts IProgressMonitor InvocationTargetException CoreException ArrayList ArrayList IFeatureModel PDECore getDefault getWorkspaceModelManager getFeatureModels getInstallLocation getUnderlyingResource fManifestFile TargetPlatform createPluginPath toArray BuildScriptGenerator BuildScriptGenerator setBuildingOSGi PDECore getDefault getModelManager isOSGiRuntime setChildren BuildScriptGenerator setEmbeddedSource AbstractScriptGenerator getDefaultEmbeddedSource ClasspathHelper getDevEntriesProperties fManifestFile getProject getLocation addTrailingSeparator toString setDevEntries setWorkingDirectory fManifestFile getProject getLocation toOSString BuildScriptGenerator setOutputFormat AbstractScriptGenerator getDefaultOutputFormat BuildScriptGenerator setConfigInfo AbstractScriptGenerator getDefaultConfigInfos setElements getFeature getId setPluginPath setGenerateAssembleScript
private void refresh Local I Feature feature I Progress Monitor monitor throws Core Exception I Feature Plugin references feature get Plugins for int i 0 i references length i I Plugin Model Base refmodel feature get Referenced Model references i if refmodel null refmodel get Underlying Resource get Project refresh Local I Resource DEPTH ONE monitor  refreshLocal IFeature IProgressMonitor CoreException IFeaturePlugin getPlugins IPluginModelBase getReferencedModel getUnderlyingResource getProject refreshLocal IResource DEPTH_ONE
protected void refresh Local I Progress Monitor monitor throws Core Exception super refresh Local monitor refresh Local model get Feature monitor  refreshLocal IProgressMonitor CoreException refreshLocal refreshLocal getFeature

protected void make Scripts I Progress Monitor monitor throws Invocation Target Exception Core Exception Model Build Script Generator generator new Model Build Script Generator Model Build Script Generator set Output Format Abstract Script Generator get Default Output Format Model Build Script Generator set Embedded Source Abstract Script Generator get Default Embedded Source Model Build Script Generator set Force Update Jar Abstract Script Generator get Force Update Jar Format Model Build Script Generator set Config Info Abstract Script Generator get Default Config Infos I Project project f Manifest File get Project generator set Working Directory project get Location toOS String String url Classpath Helper get Dev Entries Properties project get Location add Trailing Separator to String dev properties false NON NLS 1 generator set Dev Entries new Dev Class Path Helper url generator set Plugin Path Target Platform create Plugin Path generator set BuildingOS Gi PDE Core get Default get Model Manager isOS Gi Runtime try I Plugin Model Base model PDE Core get Default get Model Manager find Model project if model null generator set Model Id model get Plugin Base get Id generator generate catch Core Exception e throw new Invocation Target Exception e  makeScripts IProgressMonitor InvocationTargetException CoreException ModelBuildScriptGenerator ModelBuildScriptGenerator ModelBuildScriptGenerator setOutputFormat AbstractScriptGenerator getDefaultOutputFormat ModelBuildScriptGenerator setEmbeddedSource AbstractScriptGenerator getDefaultEmbeddedSource ModelBuildScriptGenerator setForceUpdateJar AbstractScriptGenerator getForceUpdateJarFormat ModelBuildScriptGenerator setConfigInfo AbstractScriptGenerator getDefaultConfigInfos IProject fManifestFile getProject setWorkingDirectory getLocation toOSString ClasspathHelper getDevEntriesProperties getLocation addTrailingSeparator toString setDevEntries DevClassPathHelper setPluginPath TargetPlatform createPluginPath setBuildingOSGi PDECore getDefault getModelManager isOSGiRuntime IPluginModelBase PDECore getDefault getModelManager findModel setModelId getPluginBase getId CoreException InvocationTargetException

see org eclipse ui I Object Action Delegate set Active Part org eclipse jface action I Action org eclipse ui I Workbench Part public void set Active Part I Action action I Workbench Part target Part  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart
public void run I Action action if f Build Model null return I Site Build Feature sb Features f Build Model get Site Build get Features I Feature Model models get Feature Models sb Features if models length 0 Build Site Job job new Build Site Job models f SiteXML get Project f Build Model job set User true job schedule job set Property I Progress Constants ICON PROPERTY PDE Plugin Images DESC SITE OBJ  IAction fBuildModel ISiteBuildFeature sbFeatures fBuildModel getSiteBuild getFeatures IFeatureModel getFeatureModels sbFeatures BuildSiteJob BuildSiteJob fSiteXML getProject fBuildModel setUser setProperty IProgressConstants ICON_PROPERTY PDEPluginImages DESC_SITE_OBJ
private I Feature Model get Feature Models I Site Build Feature sb Features Array List list new Array List for int i 0 i sb Features length i I Feature feature sb Features i get Referenced Feature if feature null continue I Feature Model model feature get Model if model null model get Underlying Resource null list add model return I Feature Model list to Array new I Feature Model list size  IFeatureModel getFeatureModels ISiteBuildFeature sbFeatures ArrayList ArrayList sbFeatures IFeature sbFeatures getReferencedFeature IFeatureModel getModel getUnderlyingResource IFeatureModel toArray IFeatureModel
public void selection Changed I Action action I Selection selection f Build Model null if selection instanceof I Structured Selection Object obj I Structured Selection selection get First Element if obj null obj instanceof I File f SiteXML I File obj I Project project f SiteXML get Project Workspace Model Manager manager PDE Core get Default get Workspace Model Manager I Resource build File project find Member new Path PDE Core SITEBUILD DIR append PDE Core SITEBUILD PROPERTIES if build File null build File instanceof I File f Build Model I Site Build Model manager get Model I File build File try f Build Model load catch Core Exception e  selectionChanged IAction ISelection fBuildModel IStructuredSelection IStructuredSelection getFirstElement IFile fSiteXML IFile IProject fSiteXML getProject WorkspaceModelManager PDECore getDefault getWorkspaceModelManager IResource buildFile findMember PDECore SITEBUILD_DIR PDECore SITEBUILD_PROPERTIES buildFile buildFile IFile fBuildModel ISiteBuildModel getModel IFile buildFile fBuildModel CoreException

public Build Site Job I Feature Model models I Project project I Site Build Model build Model super EXPORT AS UPDATE JARS false project get Location toOS String null models f Site Project project set Rule Multi Rule combine f Site Project get Rule  BuildSiteJob IFeatureModel IProject ISiteBuildModel buildModel EXPORT_AS_UPDATE_JARS getLocation toOSString fSiteProject setRule MultiRule fSiteProject getRule
protected I Status run I Progress Monitor monitor touch Site monitor I Status status super run monitor refresh monitor return status  IStatus IProgressMonitor touchSite IStatus
private void touch Site I Progress Monitor monitor File file new File f Site Project get Location toOS String site xml NON NLS 1 file set Last Modified System current Time Millis  touchSite IProgressMonitor fSiteProject getLocation toOSString setLastModified currentTimeMillis
private void refresh I Progress Monitor monitor try f Site Project refresh Local I Resource DEPTH INFINITE monitor catch Core Exception e  IProgressMonitor fSiteProject refreshLocal IResource DEPTH_INFINITE CoreException
see org eclipse pde internal ui wizards exports Feature Export Job get Log Found Message protected String get Log Found Message return PDE Plugin get Resource String Build Site Job message NON NLS 1  FeatureExportJob getLogFoundMessage getLogFoundMessage PDEPlugin getResourceString BuildSiteJob

public static String get Dev Entries Properties String file Name boolean check Excluded File file new File file Name if file exists File directory file get Parent File if directory null directory exists directory is File directory mkdirs Properties properties new Properties Workspace Model Manager manager PDE Core get Default get Workspace Model Manager I Plugin Model Base models manager get All Models for int i 0 i models length i String id models i get Plugin Base get Id if id null continue String entry write Entry get Output Folders models i check Excluded if entry length 0 properties put id entry try File Output Stream stream new File Output Stream file Name properties store stream NON NLS 1 stream flush stream close return new URL file file Name to String NON NLS 1 catch IO Exception e PDE Core log Exception e return get Dev Entries check Excluded  getDevEntriesProperties fileName checkExcluded fileName getParentFile isFile WorkspaceModelManager PDECore getDefault getWorkspaceModelManager IPluginModelBase getAllModels getPluginBase getId writeEntry getOutputFolders checkExcluded FileOutputStream FileOutputStream fileName fileName toString IOException PDECore logException getDevEntries checkExcluded
public static String get Dev Entries boolean check Excluded Workspace Model Manager manager PDE Core get Default get Workspace Model Manager I Plugin Model Base models manager get All Models Array List list new Array List for int i 0 i models length i String id models i get Plugin Base get Id if id null id trim length 0 continue I Path paths get Output Folders models i check Excluded for int j 0 j paths length j list add paths j String entry write Entry I Path list to Array new I Path list size return entry length 0 entry bin NON NLS 1  getDevEntries checkExcluded WorkspaceModelManager PDECore getDefault getWorkspaceModelManager IPluginModelBase getAllModels ArrayList ArrayList getPluginBase getId IPath getOutputFolders checkExcluded writeEntry IPath toArray IPath
private static String write Entry I Path paths String Buffer buffer new String Buffer for int i 0 i paths length i buffer append paths i to String if i paths length 1 buffer append NON NLS 1 return buffer to String  writeEntry IPath StringBuffer StringBuffer toString toString
private static I Path get Output Folders I Plugin Model Base model boolean check Excluded Array List result new Array List I Project project model get Underlying Resource get Project try if project has Nature Java Core NATURE ID I Java Project j Project Java Core create project List excluded get Folders To Exclude project check Excluded I Path path j Project get Output Location if path null excluded contains path add Path result project path I Classpath Entry entries j Project get Raw Classpath for int i 0 i entries length i if entries i get Content Kind I Package Fragment Root K SOURCE entries i get Entry Kind I Classpath Entry CPE SOURCE path entries i get Output Location if path null excluded contains path add Path result project path catch Java Model Exception e catch Core Exception e return I Path result to Array new I Path result size  IPath getOutputFolders IPluginModelBase checkExcluded ArrayList ArrayList IProject getUnderlyingResource getProject hasNature JavaCore NATURE_ID IJavaProject jProject JavaCore getFoldersToExclude checkExcluded IPath jProject getOutputLocation addPath IClasspathEntry jProject getRawClasspath getContentKind IPackageFragmentRoot K_SOURCE getEntryKind IClasspathEntry CPE_SOURCE getOutputLocation addPath JavaModelException CoreException IPath toArray IPath
private static void add Path Array List result I Project project I Path path if path get Device null if path segment Count 1 if path segment 0 equals project get Name path path remove First Segments 1 if path segment Count 0 path new Path NON NLS 1 if result contains path result add path  addPath ArrayList IProject IPath getDevice segmentCount getName removeFirstSegments segmentCount
private static List get Folders To Exclude I Project project boolean check Excluded Array List list new Array List if check Excluded I Eclipse Preferences pref new Project Scope project get Node PDE Core PLUGIN ID if pref null String bin Excludes pref get PDE Core SELFHOSTING BIN EXLCUDES NON NLS 1 String Tokenizer tokenizer new String Tokenizer bin Excludes NON NLS 1 while tokenizer has More Tokens list add new Path tokenizer next Token trim return list  getFoldersToExclude IProject checkExcluded ArrayList ArrayList checkExcluded IEclipsePreferences ProjectScope getNode PDECore PLUGIN_ID binExcludes PDECore SELFHOSTING_BIN_EXLCUDES StringTokenizer StringTokenizer binExcludes hasMoreTokens nextToken

class Duplicate Status Validator public I Status validate String text if libraries null libraries length 0 return new Status I Status OK PDE Plugin get Plugin Id I Status OK NON NLS 1 null if text ends With jar NON NLS 1 text text jar NON NLS 1 for int i 0 i libraries length i if libraries i equals text return new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR PDE Plugin get Resource String Build Editor Runtime Info Section duplicate Library NON NLS 1 null return new Status I Status OK PDE Plugin get Plugin Id I Status OK NON NLS 1 null  DuplicateStatusValidator IStatus IStatus PDEPlugin getPluginId IStatus endsWith IStatus PDEPlugin getPluginId IStatus PDEPlugin getResourceString BuildEditor RuntimeInfoSection duplicateLibrary IStatus PDEPlugin getPluginId IStatus
class Table Content Provider extends Default Content Provider implements I Structured Content Provider public Object get Elements Object input if input instanceof I Plugin Model Base return I Plugin Model Base input get Plugin Base get Libraries return new Object 0  TableContentProvider DefaultContentProvider IStructuredContentProvider getElements IPluginModelBase IPluginModelBase getPluginBase getLibraries
class Table Label Provider extends Label Provider implements I Table Label Provider public String get Column Text Object obj int index return I Plugin Library obj get Name  TableLabelProvider LabelProvider ITableLabelProvider getColumnText IPluginLibrary getName
public Image get Column Image Object obj int index return lib Image  getColumnImage libImage
public Add Library Dialog Shell shell String libraries I Plugin Model Base model super shell set Library Names libraries set Plugin Model model initialize Images initialize Validator set Status Line Above Buttons true  AddLibraryDialog IPluginModelBase setLibraryNames setPluginModel initializeImages initializeValidator setStatusLineAboveButtons
public void set Plugin Model I Plugin Model Base model this model model  setPluginModel IPluginModelBase
private void initialize Images PDE Label Provider provider PDE Plugin get Default get Label Provider lib Image provider get PDE Plugin Images DESC JAVA LIB OBJ  initializeImages PDELabelProvider PDEPlugin getDefault getLabelProvider libImage PDEPluginImages DESC_JAVA_LIB_OBJ
public void set Library Names String libraries this libraries libraries  setLibraryNames
protected Control create Dialog Area Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 1 layout margin Width 10 layout margin Height 10 container set Layout layout container set Layout Data new Grid Data Grid Data FILL BOTH Label label new Label container SWT NULL label set Text PDE Plugin get Resource String Build Editor Add Library Dialog label NON NLS 1 label set Layout Data new Grid Data Grid Data FILL HORIZONTAL text new Text container SWT SINGLE SWT BORDER text add Modify Listener new Modify Listener public void modify Text Modify Event e update Status validator validate text get Text text set Layout Data new Grid Data Grid Data FILL HORIZONTAL Table table new Table container SWT FULL SELECTION SWT BORDER table set Layout Data new Grid Data Grid Data FILL BOTH library Viewer new Table Viewer table library Viewer set Content Provider new Table Content Provider library Viewer set Label Provider new Table Label Provider library Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e I Selection sel e get Selection I Plugin Library obj I Plugin Library I Structured Selection sel get First Element text set Text obj null obj get Name NON NLS 1 library Viewer set Input model return container  createDialogArea GridLayout GridLayout numColumns marginWidth marginHeight setLayout setLayoutData GridData GridData FILL_BOTH setText PDEPlugin getResourceString BuildEditor AddLibraryDialog setLayoutData GridData GridData FILL_HORIZONTAL addModifyListener ModifyListener modifyText ModifyEvent updateStatus getText setLayoutData GridData GridData FILL_HORIZONTAL FULL_SELECTION setLayoutData GridData GridData FILL_BOTH libraryViewer TableViewer libraryViewer setContentProvider TableContentProvider libraryViewer setLabelProvider TableLabelProvider libraryViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection IPluginLibrary IPluginLibrary IStructuredSelection getFirstElement setText getName libraryViewer setInput
public int open text set Text init text select All return super open  setText selectAll
protected void compute Result  computeResult
public String get New Name return new Name  getNewName newName
see org eclipse jface dialogs Dialog ok Pressed protected void ok Pressed new Name text get Text super ok Pressed  okPressed okPressed newName getText okPressed
private void initialize Validator this validator new Duplicate Status Validator  initializeValidator DuplicateStatusValidator

public Bin Section Build Page page Composite parent super page parent get Section set Text PDE Plugin get Resource String SECTION TITLE get Section set Description PDE Plugin get Resource String SECTION DESC  BinSection BuildPage getSection setText PDEPlugin getResourceString SECTION_TITLE getSection setDescription PDEPlugin getResourceString SECTION_DESC
protected void initialize Check State super initialize Check State I Build build f Build Model get Build I Build Entry bin Incl build get Entry I Build Properties Constants PROPERTY BIN INCLUDES I Build Entry bin Excl build get Entry I Build Properties Constants PROPERTY BIN EXCLUDES if bin Incl null return super initialize Check State bin Incl bin Excl  initializeCheckState initializeCheckState IBuild fBuildModel getBuild IBuildEntry binIncl getEntry IBuildPropertiesConstants PROPERTY_BIN_INCLUDES IBuildEntry binExcl getEntry IBuildPropertiesConstants PROPERTY_BIN_EXCLUDES binIncl initializeCheckState binIncl binExcl
protected void delete Folder Children From Entries I Folder folder I Build build f Build Model get Build I Build Entry bin Incl build get Entry I Build Properties Constants PROPERTY BIN INCLUDES I Build Entry bin Excl build get Entry I Build Properties Constants PROPERTY BIN EXCLUDES String parent Folder get Resource Folder Name folder get Project Relative Path to String remove Children bin Incl parent Folder remove Children bin Excl parent Folder  deleteFolderChildrenFromEntries IFolder IBuild fBuildModel getBuild IBuildEntry binIncl getEntry IBuildPropertiesConstants PROPERTY_BIN_INCLUDES IBuildEntry binExcl getEntry IBuildPropertiesConstants PROPERTY_BIN_EXCLUDES parentFolder getResourceFolderName getProjectRelativePath toString removeChildren binIncl parentFolder removeChildren binExcl parentFolder
protected void handle Build Check State Change boolean was Top Parent Checked I Resource resource f Parent Resource String resource Name f Parent Resource get Project Relative Path to String I Build build f Build Model get Build I Build Entry includes build get Entry I Build Properties Constants PROPERTY BIN INCLUDES I Build Entry excludes build get Entry I Build Properties Constants PROPERTY BIN EXCLUDES resource Name handle Resource Folder resource resource Name if is Checked handle Check includes excludes resource Name resource was Top Parent Checked I Build Properties Constants PROPERTY BIN INCLUDES else handle Uncheck includes excludes resource Name resource I Build Properties Constants PROPERTY BIN EXCLUDES delete Empty Entries f Parent Resource f Original Resource null  handleBuildCheckStateChange wasTopParentChecked IResource fParentResource resourceName fParentResource getProjectRelativePath toString IBuild fBuildModel getBuild IBuildEntry getEntry IBuildPropertiesConstants PROPERTY_BIN_INCLUDES IBuildEntry getEntry IBuildPropertiesConstants PROPERTY_BIN_EXCLUDES resourceName handleResourceFolder resourceName isChecked handleCheck resourceName wasTopParentChecked IBuildPropertiesConstants PROPERTY_BIN_INCLUDES handleUncheck resourceName IBuildPropertiesConstants PROPERTY_BIN_EXCLUDES deleteEmptyEntries fParentResource fOriginalResource
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event WORLD CHANGED mark Stale Object change Object event get Changed Objects 0 if change Object instanceof I Build Entry I Build Entry change Object get Name equals I Build Properties Constants PROPERTY BIN EXCLUDES I Build Entry change Object get Name equals I Build Properties Constants PROPERTY BIN INCLUDES return if f Parent Resource null f Original Resource null f Original Resource null f Parent Resource null initialize Check State return if f Parent Resource null f Original Resource null if event get Changed Property null event get Changed Property equals I Build Properties Constants PROPERTY BIN INCLUDES if event get Old Value null event get New Value null adding token I File file f Project get File new Path event get New Value to String if file exists return f Parent Resource f Original Resource file is Checked true else if event get Old Value null event get New Value null removing token I File file f Project get File new Path event get Old Value to String if file exists return f Parent Resource f Original Resource file is Checked false else return return f Tree Viewer set Checked f Parent Resource is Checked f Tree Viewer set Grayed f Original Resource false f Tree Viewer set Parents Grayed f Parent Resource true set Parents Checked f Parent Resource f Tree Viewer set Grayed f Parent Resource false if f Parent Resource instanceof I Folder f Tree Viewer set Subtree Checked f Parent Resource is Checked set Children Grayed f Parent Resource false while f Original Resource equals f Parent Resource f Tree Viewer set Checked f Original Resource is Checked f Original Resource f Original Resource get Parent f Parent Resource null f Original Resource null  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale changeObject getChangedObjects changeObject IBuildEntry IBuildEntry changeObject getName IBuildPropertiesConstants PROPERTY_BIN_EXCLUDES IBuildEntry changeObject getName IBuildPropertiesConstants PROPERTY_BIN_INCLUDES fParentResource fOriginalResource fOriginalResource fParentResource initializeCheckState fParentResource fOriginalResource getChangedProperty getChangedProperty IBuildPropertiesConstants PROPERTY_BIN_INCLUDES getOldValue getNewValue IFile fProject getFile getNewValue toString fParentResource fOriginalResource isChecked getOldValue getNewValue IFile fProject getFile getOldValue toString fParentResource fOriginalResource isChecked fTreeViewer setChecked fParentResource isChecked fTreeViewer setGrayed fOriginalResource fTreeViewer setParentsGrayed fParentResource setParentsChecked fParentResource fTreeViewer setGrayed fParentResource fParentResource IFolder fTreeViewer setSubtreeChecked fParentResource isChecked setChildrenGrayed fParentResource fOriginalResource fParentResource fTreeViewer setChecked fOriginalResource isChecked fOriginalResource fOriginalResource getParent fParentResource fOriginalResource

param accepted Types The types accepted by the validator param allow Multiple Selection If set to code true code the validator allows multiple selection public Element Selection Validator Class accepted Types boolean allow Multiple Selection Assert is Not Null accepted Types f Accepted Types accepted Types f Allow Multiple Selection allow Multiple Selection  acceptedTypes allowMultipleSelection ElementSelectionValidator acceptedTypes allowMultipleSelection isNotNull acceptedTypes fAcceptedTypes acceptedTypes fAllowMultipleSelection allowMultipleSelection
public I Status validate Object elements if is Valid elements return new Status I Status OK PDE Plugin get Plugin Id I Status OK NON NLS 1 null return new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR NON NLS 1 null  IStatus isValid IStatus PDEPlugin getPluginId IStatus IStatus PDEPlugin getPluginId IStatus
private boolean is Of Accepted Type Object o for int i 0 i f Accepted Types length i if f Accepted Types i is Instance o return true return false  isOfAcceptedType fAcceptedTypes fAcceptedTypes isInstance
private boolean is Valid Object selection if selection length 0 return false if f Allow Multiple Selection selection length 1 return false for int i 0 i selection length i Object o selection i if is Of Accepted Type o return false return true  isValid fAllowMultipleSelection isOfAcceptedType
implements I Structured Content Provider public Object get Elements Object parent if parent instanceof I Build Model I Build build I Build Model parent get Build I Build Entry entry build get Entry I Build Properties Constants PROPERTY JAR EXTRA CLASSPATH if entry null return entry get Tokens return new Object 0  IStructuredContentProvider getElements IBuildModel IBuild IBuildModel getBuild IBuildEntry getEntry IBuildPropertiesConstants PROPERTY_JAR_EXTRA_CLASSPATH getTokens
extends Label Provider implements I Table Label Provider public String get Column Text Object obj int index return obj to String  LabelProvider ITableLabelProvider getColumnText toString
return obj to String public Image get Column Image Object obj int index I Shared Images shared Images PlatformUI get Workbench get Shared Images return shared Images get Image I Shared Images IMG OBJ FILE  toString getColumnImage ISharedImages sharedImages getWorkbench getSharedImages sharedImages getImage ISharedImages IMG_OBJ_FILE
public Build Classpath Section PDE Form Page page Composite parent super page parent Section DESCRIPTION Section TWISTIE new String PDE Plugin get Resource String SECTION ADD PDE Plugin get Resource String SECTION REMOVE null null get Section set Text PDE Plugin get Resource String SECTION TITLE get Section set Description PDE Plugin get Resource String SECTION DESC initialize  BuildClasspathSection PDEFormPage PDEPlugin getResourceString SECTION_ADD PDEPlugin getResourceString SECTION_REMOVE getSection setText PDEPlugin getResourceString SECTION_TITLE getSection setDescription PDEPlugin getResourceString SECTION_DESC
private I Build Model get Build Model Input Context context get Page getPDE Editor get Context Manager find Context Build Input Context CONTEXT ID if context null return null return I Build Model context get Model  IBuildModel getBuildModel InputContext getPage getPDEEditor getContextManager findContext BuildInputContext CONTEXT_ID IBuildModel getModel
public void initialize get Build Model add Model Changed Listener this I Build Entry entry get Build Model get Build get Entry I Build Properties Constants PROPERTY JAR EXTRA CLASSPATH get Section set Expanded entry null entry get Tokens length 0  getBuildModel addModelChangedListener IBuildEntry getBuildModel getBuild getEntry IBuildPropertiesConstants PROPERTY_JAR_EXTRA_CLASSPATH getSection setExpanded getTokens
public void create Client Section section Form Toolkit toolkit Composite container create Client Container section 2 toolkit create Viewer Part Control container SWT FULL SELECTION 2 toolkit Editable Table Part table Part get Table Part table Part set Editable true f Table Viewer table Part get Table Viewer f Table Viewer set Content Provider new Table Content Provider f Table Viewer set Label Provider new Table Label Provider f Table Viewer set Input get Build Model toolkit paint Borders For container enable Section true section set Client container  createClient FormToolkit createClientContainer createViewerPartControl FULL_SELECTION EditableTablePart tablePart getTablePart tablePart setEditable fTableViewer tablePart getTableViewer fTableViewer setContentProvider TableContentProvider fTableViewer setLabelProvider TableLabelProvider fTableViewer setInput getBuildModel paintBordersFor enableSection setClient
Action action new Action PDE Plugin get Resource String SECTION ADD public void run handle New  PDEPlugin getResourceString SECTION_ADD handleNew
action new Action PDE Plugin get Resource String SECTION REMOVE public void run handle Delete  PDEPlugin getResourceString SECTION_REMOVE handleDelete
protected void fill Context Menu I Menu Manager manager I Selection selection f Table Viewer get Selection add NEW action Action action new Action PDE Plugin get Resource String SECTION ADD public void run handle New action set Enabled f Enabled manager add action manager add new Separator add DELETE action action new Action PDE Plugin get Resource String SECTION REMOVE public void run handle Delete action set Enabled selection is Empty f Enabled manager add action get Page getPDE Editor get Contributor context Menu About To Show manager false  fillContextMenu IMenuManager ISelection fTableViewer getSelection PDEPlugin getResourceString SECTION_ADD handleNew setEnabled fEnabled PDEPlugin getResourceString SECTION_REMOVE handleDelete setEnabled isEmpty fEnabled getPage getPDEEditor getContributor contextMenuAboutToShow
public void dispose I Build Model model get Build Model if model null model remove Model Changed Listener this super dispose  IBuildModel getBuildModel removeModelChangedListener
public void refresh f Table Viewer refresh  fTableViewer
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id if f Enabled handle Delete return true return false  doGlobalAction actionId actionId ActionFactory getId fEnabled handleDelete
public void enable Section boolean enable f Enabled enable Editable Table Part table Part get Table Part table Part set Button Enabled 1 enable f Table Viewer get Selection is Empty table Part set Button Enabled 0 enable  enableSection fEnabled EditableTablePart tablePart getTablePart tablePart setButtonEnabled fTableViewer getSelection isEmpty tablePart setButtonEnabled
protected void selection Changed I Structured Selection selection get Page getPDE Editor set Selection selection get Table Part set Button Enabled 1 selection null selection size 0 f Enabled  selectionChanged IStructuredSelection getPage getPDEEditor setSelection getTablePart setButtonEnabled fEnabled
private void handle Delete Object selection I Structured Selection f Table Viewer get Selection get First Element f Old Selection I Structured Selection f Table Viewer get Selection int index f Table Viewer get Table get Selection Index if selection null selection instanceof String I Build build get Build Model get Build I Build Entry entry build get Entry I Build Properties Constants PROPERTY JAR EXTRA CLASSPATH if entry null try entry remove Token selection to String String tokens entry get Tokens if tokens length 0 build remove entry else if tokens length index f Current Selection new Structured Selection tokens index else f Current Selection new Structured Selection tokens index 1 catch Core Exception e PDE Plugin log Exception e  handleDelete IStructuredSelection fTableViewer getSelection getFirstElement fOldSelection IStructuredSelection fTableViewer getSelection fTableViewer getTable getSelectionIndex IBuild getBuildModel getBuild IBuildEntry getEntry IBuildPropertiesConstants PROPERTY_JAR_EXTRA_CLASSPATH removeToken toString getTokens fCurrentSelection StructuredSelection fCurrentSelection StructuredSelection CoreException PDEPlugin logException
private void initialize Dialog Settings Element Tree Selection Dialog dialog Class accepted Classes new Class I File class dialog set Validator new Element Selection Validator accepted Classes true dialog set Title PDE Plugin get Resource String Build Editor Classpath Section jars Title NON NLS 1 dialog set Message PDE Plugin get Resource String Build Editor Classpath Section jars Desc NON NLS 1 dialog add Filter new JAR File Filter dialog set Input PDE Plugin get Workspace get Root dialog set Sorter new Resource Sorter Resource Sorter NAME dialog set Initial Selection get Build Model get Underlying Resource get Project  initializeDialogSettings ElementTreeSelectionDialog acceptedClasses IFile setValidator ElementSelectionValidator acceptedClasses setTitle PDEPlugin getResourceString BuildEditor ClasspathSection jarsTitle setMessage PDEPlugin getResourceString BuildEditor ClasspathSection jarsDesc addFilter JARFileFilter setInput PDEPlugin getWorkspace getRoot setSorter ResourceSorter ResourceSorter setInitialSelection getBuildModel getUnderlyingResource getProject
private void handle New Element Tree Selection Dialog dialog new Element Tree Selection Dialog get Section get Shell new Workbench Label Provider new Workbench Content Provider initialize Dialog Settings dialog if dialog open Element Tree Selection Dialog OK Object elements dialog get Result for int i 0 i elements length i I Resource elem I Resource elements i String token Name get Relative Path Token Name elem add Classpath Token token Name f Current Selection new Structured Selection token Name f Old Selection null  handleNew ElementTreeSelectionDialog ElementTreeSelectionDialog getSection getShell WorkbenchLabelProvider WorkbenchContentProvider initializeDialogSettings ElementTreeSelectionDialog getResult IResource IResource tokenName getRelativePathTokenName addClasspathToken tokenName fCurrentSelection StructuredSelection tokenName fOldSelection
private void add Classpath Token String token Name I Build Model model get Build Model I Build Entry entry model get Build get Entry I Build Properties Constants PROPERTY JAR EXTRA CLASSPATH try if entry null entry model get Factory create Entry I Build Properties Constants PROPERTY JAR EXTRA CLASSPATH model get Build add entry if entry contains token Name entry add Token token Name catch Core Exception e PDE Plugin log Exception e  addClasspathToken tokenName IBuildModel getBuildModel IBuildEntry getBuild getEntry IBuildPropertiesConstants PROPERTY_JAR_EXTRA_CLASSPATH getFactory createEntry IBuildPropertiesConstants PROPERTY_JAR_EXTRA_CLASSPATH getBuild tokenName addToken tokenName CoreException PDEPlugin logException
private String get Relative Path Token Name I Resource elem I Path path elem get Full Path I Path project Path get Build Model get Underlying Resource get Project get Full Path int same Segments path matching First Segments project Path if same Segments 0 return path remove First Segments same Segments to String else return path to String NON NLS 1  getRelativePathTokenName IResource IPath getFullPath IPath projectPath getBuildModel getUnderlyingResource getProject getFullPath sameSegments matchingFirstSegments projectPath sameSegments removeFirstSegments sameSegments toString toString
protected void button Selected int index switch index case 0 handle New break case 1 handle Delete break default break  buttonSelected handleNew handleDelete
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event WORLD CHANGED mark Stale else if event get Change Type I Model Changed Event INSERT else if event get Change Type I Model Changed Event REMOVE else if event get Change Type I Model Changed Event CHANGE Object change Object event get Changed Objects 0 if change Object instanceof I Build Entry I Build Entry change Object get Name equals I Build Entry JARS EXTRA CLASSPATH if f Old Selection null f Table Viewer refresh f Table Viewer set Selection f Current Selection else f Table Viewer remove f Old Selection f Table Viewer refresh f Table Viewer set Selection f Current Selection  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale getChangeType IModelChangedEvent getChangeType IModelChangedEvent getChangeType IModelChangedEvent changeObject getChangedObjects changeObject IBuildEntry IBuildEntry changeObject getName IBuildEntry JARS_EXTRA_CLASSPATH fOldSelection fTableViewer fTableViewer setSelection fCurrentSelection fTableViewer fOldSelection fTableViewer fTableViewer setSelection fCurrentSelection

public Object get Elements Object parent if parent instanceof I Project try return I Project parent members catch Core Exception e PDE Plugin log Exception e return new Object 0  getElements IProject IProject CoreException PDEPlugin logException
see org eclipse jface viewers I Tree Content Provider get Children java lang Object public Object get Children Object parent try if parent instanceof I Folder return I Folder parent members catch Core Exception e PDE Plugin log Exception e return new Object 0  ITreeContentProvider getChildren getChildren IFolder IFolder CoreException PDEPlugin logException
public Object get Folder Children Object parent I Resource members null try if parent instanceof I Folder return new Object 0 members I Folder parent members Array List results new Array List for int i 0 i members length i if members i get Type I Resource FOLDER results add members i return results to Array catch Core Exception e PDE Plugin log Exception e return new Object 0  getFolderChildren IResource IFolder IFolder ArrayList ArrayList getType IResource toArray CoreException PDEPlugin logException
see org eclipse jface viewers I Tree Content Provider get Parent java lang Object public Object get Parent Object element if element null element instanceof I Resource return I Resource element get Parent return null  ITreeContentProvider getParent getParent IResource IResource getParent
see org eclipse jface viewers I Tree Content Provider has Children java lang Object public boolean has Children Object element if element instanceof I Folder return get Children element length 0 return false  ITreeContentProvider hasChildren hasChildren IFolder getChildren
protected void create Viewer Part Control Composite parent int style int span Form Toolkit toolkit Menu Manager popup Menu Manager new Menu Manager I Menu Listener listener new I Menu Listener public void menu About To Show I Menu Manager mng fill Context Menu mng popup Menu Manager add Menu Listener listener popup Menu Manager set Remove All When Shown true Control control f Tree Viewer get Control Menu menu popup Menu Manager create Context Menu control control set Menu menu  createViewerPartControl FormToolkit MenuManager popupMenuManager MenuManager IMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu popupMenuManager addMenuListener popupMenuManager setRemoveAllWhenShown fTreeViewer getControl popupMenuManager createContextMenu setMenu
protected void fill Context Menu I Menu Manager manager manager add get Page getPDE Editor get Contributor get Revert Action get Page getPDE Editor get Contributor context Menu About To Show manager false  fillContextMenu IMenuManager getPage getPDEEditor getContributor getRevertAction getPage getPDEEditor getContributor contextMenuAboutToShow
private I Build Model get Build Model Input Context context get Page getPDE Editor get Context Manager find Context Build Input Context CONTEXT ID return I Build Model context get Model  IBuildModel getBuildModel InputContext getPage getPDEEditor getContextManager findContext BuildInputContext CONTEXT_ID IBuildModel getModel
public Build Contents Section PDE Form Page page Composite parent super page parent Section DESCRIPTION new String 0 PDE Plugin get Workspace add Resource Change Listener this  BuildContentsSection PDEFormPage PDEPlugin getWorkspace addResourceChangeListener
public void run if element instanceof I File I File file I File event get Element handle Check State Changed file event get Checked else if element instanceof I Folder I Folder folder I Folder event get Element handle Check State Changed folder event get Checked  IFile IFile IFile getElement handleCheckStateChanged getChecked IFolder IFolder IFolder getElement handleCheckStateChanged getChecked
public void check State Changed final Check State Changed Event event final Object element event get Element Busy Indicator show While section get Display new Runnable public void run if element instanceof I File I File file I File event get Element handle Check State Changed file event get Checked else if element instanceof I Folder I Folder folder I Folder event get Element handle Check State Changed folder event get Checked  checkStateChanged CheckStateChangedEvent getElement BusyIndicator showWhile getDisplay IFile IFile IFile getElement handleCheckStateChanged getChecked IFolder IFolder IFolder getElement handleCheckStateChanged getChecked
public void create Client final Section section Form Toolkit toolkit Composite container create Client Container section 2 toolkit f Build Model get Build Model if f Build Model get Underlying Resource null f Project f Build Model get Underlying Resource get Project Grid Layout layout new Grid Layout layout margin Height layout margin Width 2 container set Layout layout f Tree Viewer new Checkbox Tree Viewer toolkit create Tree container SWT CHECK f Tree Viewer set Content Provider new Tree Content Provider f Tree Viewer set Label Provider new Workbench Label Provider f Tree Viewer set Auto Expand Level 0 f Tree Viewer add Check State Listener new I Check State Listener public void check State Changed final Check State Changed Event event final Object element event get Element Busy Indicator show While section get Display new Runnable public void run if element instanceof I File I File file I File event get Element handle Check State Changed file event get Checked else if element instanceof I Folder I Folder folder I Folder event get Element handle Check State Changed folder event get Checked Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint 100 gd width Hint 100 f Tree Viewer get Tree set Layout Data gd initialize initialize Check State toolkit paint Borders For container create Viewer Part Control container SWT FULL SELECTION 2 toolkit section set Client container  createClient FormToolkit createClientContainer fBuildModel getBuildModel fBuildModel getUnderlyingResource fProject fBuildModel getUnderlyingResource getProject GridLayout GridLayout marginHeight marginWidth setLayout fTreeViewer CheckboxTreeViewer createTree fTreeViewer setContentProvider TreeContentProvider fTreeViewer setLabelProvider WorkbenchLabelProvider fTreeViewer setAutoExpandLevel fTreeViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getElement BusyIndicator showWhile getDisplay IFile IFile IFile getElement handleCheckStateChanged getChecked IFolder IFolder IFolder getElement handleCheckStateChanged getChecked GridData GridData GridData FILL_BOTH heightHint widthHint fTreeViewer getTree setLayoutData initializeCheckState paintBordersFor createViewerPartControl FULL_SELECTION setClient
public void enable Section boolean enable f Tree Viewer get Tree set Enabled enable  enableSection fTreeViewer getTree setEnabled
protected void handle Check State Changed I Resource resource boolean checked f Original Resource resource is Checked checked boolean was Top Parent Checked f Tree Viewer get Checked f Original Resource get Parent if is Checked resource handle All Unselected resource resource get Name f Parent Resource resource handle Build Check State Change was Top Parent Checked  handleCheckStateChanged IResource fOriginalResource isChecked wasTopParentChecked fTreeViewer getChecked fOriginalResource getParent isChecked handleAllUnselected getName fParentResource handleBuildCheckStateChange wasTopParentChecked
protected I Resource handle All Unselected I Resource resource String name I Resource parent resource get Parent if parent resource get Project return resource try boolean uncheck true I Resource members I Folder parent members for int i 0 i members length i if f Tree Viewer get Checked members i members i get Name equals name uncheck false if uncheck return handle All Unselected parent parent get Name return resource catch Core Exception e PDE Plugin log Exception e return null  IResource handleAllUnselected IResource IResource getParent getProject IResource IFolder fTreeViewer getChecked getName handleAllUnselected getName CoreException PDEPlugin logException
protected void set Children Grayed I Resource folder boolean is Gray f Tree Viewer set Grayed folder is Gray if Tree Content Provider f Tree Viewer get Content Provider has Children folder Object members Tree Content Provider f Tree Viewer get Content Provider get Folder Children folder for int i 0 i members length i set Children Grayed I Folder members i is Gray  setChildrenGrayed IResource isGray fTreeViewer setGrayed isGray TreeContentProvider fTreeViewer getContentProvider hasChildren TreeContentProvider fTreeViewer getContentProvider getFolderChildren setChildrenGrayed IFolder isGray
protected void set Parents Checked I Resource resource if resource get Parent resource get Project f Tree Viewer set Checked resource get Parent true set Parents Checked resource get Parent  setParentsChecked IResource getParent getProject fTreeViewer setChecked getParent setParentsChecked getParent
removes all child resources of the specified folder from build entries param folder current folder being modified in tree note does not remove folder itself 
protected abstract void delete Folder Children From Entries I Folder folder protected void initialize Check State uncheck All  deleteFolderChildrenFromEntries IFolder initializeCheckState uncheckAll
public void run if f Tree Viewer get Tree is Disposed return Vector file Ext new Vector String incl Tokens excl Tokens new String 0 if f Project null includes null return incl Tokens includes get Tokens if excludes null excl Tokens excludes get Tokens Set temp new Tree Set for int i 0 i incl Tokens length i temp add incl Tokens i for int i 0 i excl Tokens length i temp add excl Tokens i Iterator iter temp iterator while iter has Next String resource iter next to String boolean is Included includes contains resource if resource last Index Of Path SEPARATOR resource length 1 I Folder folder f Project get Folder resource f Tree Viewer set Subtree Checked folder is Included f Tree Viewer set Parents Grayed folder true if is Included folder exists set Parents Checked folder f Tree Viewer set Grayed folder false else if resource starts With NON NLS 1 if is Included file Ext add resource substring 2 else I File file f Project get File resource f Tree Viewer set Checked file is Included f Tree Viewer set Parents Grayed file true if is Included file exists f Tree Viewer set Grayed file false set Parents Checked file if file Ext size 0 return try I Resource members f Project members for int i 0 i members length i if members i instanceof I Folder file Ext contains members i get File Extension f Tree Viewer set Checked members i includes contains NON NLS 1 members i get File Extension catch Core Exception e PDE Plugin log Exception e  fTreeViewer getTree isDisposed fileExt inclTokens exclTokens fProject inclTokens getTokens exclTokens getTokens TreeSet inclTokens inclTokens exclTokens exclTokens hasNext toString isIncluded lastIndexOf IFolder fProject getFolder fTreeViewer setSubtreeChecked isIncluded fTreeViewer setParentsGrayed isIncluded setParentsChecked fTreeViewer setGrayed startsWith isIncluded fileExt IFile fProject getFile fTreeViewer setChecked isIncluded fTreeViewer setParentsGrayed isIncluded fTreeViewer setGrayed setParentsChecked fileExt IResource fProject IFolder fileExt getFileExtension fTreeViewer setChecked getFileExtension CoreException PDEPlugin logException
protected void initialize Check State final I Build Entry includes final I Build Entry excludes f Tree Viewer get Tree get Display async Exec new Runnable public void run if f Tree Viewer get Tree is Disposed return Vector file Ext new Vector String incl Tokens excl Tokens new String 0 if f Project null includes null return incl Tokens includes get Tokens if excludes null excl Tokens excludes get Tokens Set temp new Tree Set for int i 0 i incl Tokens length i temp add incl Tokens i for int i 0 i excl Tokens length i temp add excl Tokens i Iterator iter temp iterator while iter has Next String resource iter next to String boolean is Included includes contains resource if resource last Index Of Path SEPARATOR resource length 1 I Folder folder f Project get Folder resource f Tree Viewer set Subtree Checked folder is Included f Tree Viewer set Parents Grayed folder true if is Included folder exists set Parents Checked folder f Tree Viewer set Grayed folder false else if resource starts With NON NLS 1 if is Included file Ext add resource substring 2 else I File file f Project get File resource f Tree Viewer set Checked file is Included f Tree Viewer set Parents Grayed file true if is Included file exists f Tree Viewer set Grayed file false set Parents Checked file if file Ext size 0 return try I Resource members f Project members for int i 0 i members length i if members i instanceof I Folder file Ext contains members i get File Extension f Tree Viewer set Checked members i includes contains NON NLS 1 members i get File Extension catch Core Exception e PDE Plugin log Exception e  initializeCheckState IBuildEntry IBuildEntry fTreeViewer getTree getDisplay asyncExec fTreeViewer getTree isDisposed fileExt inclTokens exclTokens fProject inclTokens getTokens exclTokens getTokens TreeSet inclTokens inclTokens exclTokens exclTokens hasNext toString isIncluded lastIndexOf IFolder fProject getFolder fTreeViewer setSubtreeChecked isIncluded fTreeViewer setParentsGrayed isIncluded setParentsChecked fTreeViewer setGrayed startsWith isIncluded fileExt IFile fProject getFile fTreeViewer setChecked isIncluded fTreeViewer setParentsGrayed isIncluded fTreeViewer setGrayed setParentsChecked fileExt IResource fProject IFolder fileExt getFileExtension fTreeViewer setChecked getFileExtension CoreException PDEPlugin logException
protected abstract void handle Build Check State Change boolean was Top Parent Checked  handleBuildCheckStateChange wasTopParentChecked
protected void handle Check I Build Entry includes I Build Entry excludes String resource Name I Resource resource boolean was Top Parent Checked String PROPERTY INCLUDES try if includes null includes f Build Model get Factory create Entry PROPERTY INCLUDES I Build build f Build Model get Build build add includes if was Top Parent Checked includes contains resource Name is Valid Include Entry includes excludes resource resource Name includes add Token resource Name if excludes null excludes contains resource Name excludes remove Token resource Name catch Core Exception e PDE Plugin log Exception e  handleCheck IBuildEntry IBuildEntry resourceName IResource wasTopParentChecked PROPERTY_INCLUDES fBuildModel getFactory createEntry PROPERTY_INCLUDES IBuild fBuildModel getBuild wasTopParentChecked resourceName isValidIncludeEntry resourceName addToken resourceName resourceName removeToken resourceName CoreException PDEPlugin logException
protected boolean is Valid Include Entry I Build Entry includes I Build Entry excludes I Resource resource String resource Name if excludes null return true I Path res Path resource get Project Relative Path while res Path segment Count 1 res Path res Path remove Last Segments 1 if includes contains res Path to String Path SEPARATOR return false else if excludes null excludes contains res Path to String Path SEPARATOR return true return excludes contains resource Name  isValidIncludeEntry IBuildEntry IBuildEntry IResource resourceName IPath resPath getProjectRelativePath resPath segmentCount resPath resPath removeLastSegments resPath toString resPath toString resourceName
protected void handle Uncheck I Build Entry includes I Build Entry excludes String resource Name I Resource resource String PROPERTY EXCLUDES try if f Tree Viewer get Checked resource get Parent if excludes null excludes f Build Model get Factory create Entry PROPERTY EXCLUDES I Build build f Build Model get Build build add excludes if excludes contains resource Name includes null includes contains resource Name true excludes add Token resource Name if includes null if includes contains resource Name includes remove Token resource Name if includes contains resource get File Extension NON NLS 1 I Resource members f Project members for int i 0 i members length i if members i instanceof I Folder members i get Name equals resource get Name resource get File Extension equals members i get File Extension includes add Token members i get Name I Build Entry libraries Build Util get Build Libraries f Build Model get Build get Build Entries if resource get File Extension equals jar NON NLS 1 libraries length 0 for int j 0 j libraries length j String lib Name libraries j get Name substring 7 I Path path f Project get File lib Name get Project Relative Path if path segment Count 1 includes contains lib Name lib Name equals resource get Name includes add Token lib Name includes remove Token resource get File Extension NON NLS 1 catch Core Exception e PDE Plugin log Exception e  handleUncheck IBuildEntry IBuildEntry resourceName IResource PROPERTY_EXCLUDES fTreeViewer getChecked getParent fBuildModel getFactory createEntry PROPERTY_EXCLUDES IBuild fBuildModel getBuild resourceName resourceName addToken resourceName resourceName removeToken resourceName getFileExtension IResource fProject IFolder getName getName getFileExtension getFileExtension addToken getName IBuildEntry BuildUtil getBuildLibraries fBuildModel getBuild getBuildEntries getFileExtension libName getName IPath fProject getFile libName getProjectRelativePath segmentCount libName libName getName addToken libName removeToken getFileExtension CoreException PDEPlugin logException
protected String get Resource Folder Name String resource Name return resource Name Path SEPARATOR  getResourceFolderName resourceName resourceName
param resource file folder being modified in tree param resource Name name file folder return relative path of folder if resource is folder otherwise return resource Name protected String handle Resource Folder I Resource resource String resource Name if resource instanceof I Folder delete Folder Children From Entries I Folder resource return get Resource Folder Name resource Name return resource Name  resourceName resourceName handleResourceFolder IResource resourceName IFolder deleteFolderChildrenFromEntries IFolder getResourceFolderName resourceName resourceName
public void initialize if f Tree Viewer get Input null f Tree Viewer set Use Hashlookup true f Tree Viewer set Input f Project f Build Model add Model Changed Listener this  fTreeViewer getInput fTreeViewer setUseHashlookup fTreeViewer setInput fProject fBuildModel addModelChangedListener
public void dispose f Build Model remove Model Changed Listener this PDE Plugin get Workspace remove Resource Change Listener this super dispose  fBuildModel removeModelChangedListener PDEPlugin getWorkspace removeResourceChangeListener
protected void delete Empty Entries I Build build f Build Model get Build I Build Entry entries build get Entry I Build Properties Constants PROPERTY BIN EXCLUDES build get Entry I Build Properties Constants PROPERTY BIN INCLUDES build get Entry I Build Properties Constants PROPERTY SRC EXCLUDES build get Entry I Build Properties Constants PROPERTY SRC INCLUDES try for int i 0 i entries length i if entries i null entries i get Tokens length 0 build remove entries i catch Core Exception e PDE Plugin log Exception e  deleteEmptyEntries IBuild fBuildModel getBuild IBuildEntry getEntry IBuildPropertiesConstants PROPERTY_BIN_EXCLUDES getEntry IBuildPropertiesConstants PROPERTY_BIN_INCLUDES getEntry IBuildPropertiesConstants PROPERTY_SRC_EXCLUDES getEntry IBuildPropertiesConstants PROPERTY_SRC_INCLUDES getTokens CoreException PDEPlugin logException
public Checkbox Tree Viewer get Tree Viewer return f Tree Viewer  CheckboxTreeViewer getTreeViewer fTreeViewer
protected I Selection get Viewer Selection return get Tree Viewer get Selection  ISelection getViewerSelection getTreeViewer getSelection
public void refresh initialize Check State super refresh  initializeCheckState
public void uncheck All f Tree Viewer set Checked Elements new Object 0  uncheckAll fTreeViewer setCheckedElements
protected void remove Children I Build Entry entry String parent Folder try if entry null String tokens entry get Tokens for int i 0 i tokens length i if tokens i index Of Path SEPARATOR 1 tokens i starts With parent Folder tokens i equals parent Folder entry remove Token tokens i catch Core Exception e PDE Plugin log Exception e  removeChildren IBuildEntry parentFolder getTokens indexOf startsWith parentFolder parentFolder removeToken CoreException PDEPlugin logException
public void resource Changed I Resource Change Event event if f Tree Viewer get Control is Disposed return f Do Refresh false I Resource Delta delta event get Delta try if delta null delta accept this if f Do Refresh async Refresh f Do Refresh false catch Core Exception e  resourceChanged IResourceChangeEvent fTreeViewer getControl isDisposed fDoRefresh IResourceDelta getDelta fDoRefresh asyncRefresh fDoRefresh CoreException
public boolean visit I Resource Delta delta throws Core Exception I Resource resource delta get Resource if resource instanceof I File resource instanceof I Folder resource get Project equals f Build Model get Underlying Resource get Project if delta get Kind I Resource Delta ADDED delta get Kind I Resource Delta REMOVED f Do Refresh true return false return true  IResourceDelta CoreException IResource getResource IFile IFolder getProject fBuildModel getUnderlyingResource getProject getKind IResourceDelta getKind IResourceDelta fDoRefresh
public void run if f Tree Viewer get Control is Disposed f Tree Viewer refresh true initialize Check State  fTreeViewer getControl isDisposed fTreeViewer initializeCheckState
private void async Refresh Control control f Tree Viewer get Control if control is Disposed control get Display async Exec new Runnable public void run if f Tree Viewer get Control is Disposed f Tree Viewer refresh true initialize Check State  asyncRefresh fTreeViewer getControl isDisposed getDisplay asyncExec fTreeViewer getControl isDisposed fTreeViewer initializeCheckState
see org eclipse pde internal ui editor Table Section selection Changed org eclipse jface viewers I Structured Selection protected void selection Changed I Structured Selection selection get Page getPDE Editor set Selection selection  TableSection selectionChanged IStructuredSelection selectionChanged IStructuredSelection getPage getPDEEditor setSelection
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event WORLD CHANGED mark Stale Object change Object event get Changed Objects 0 if change Object instanceof I Build Entry I Build Entry change Object get Name equals I Build Properties Constants PROPERTY BIN EXCLUDES I Build Entry change Object get Name equals I Build Properties Constants PROPERTY BIN INCLUDES I Build Entry change Object get Name equals I Build Properties Constants PROPERTY SRC EXCLUDES I Build Entry change Object get Name equals I Build Properties Constants PROPERTY SRC INCLUDES return if f Parent Resource null f Original Resource null f Original Resource null f Parent Resource null initialize Check State return if f Parent Resource null f Original Resource null event get Changed Property null event get Changed Property equals I Build Properties Constants PROPERTY BIN INCLUDES return f Tree Viewer set Checked f Parent Resource is Checked f Tree Viewer set Grayed f Original Resource false f Tree Viewer set Parents Grayed f Parent Resource true set Parents Checked f Parent Resource f Tree Viewer set Grayed f Parent Resource false if f Parent Resource instanceof I Folder f Tree Viewer set Subtree Checked f Parent Resource is Checked set Children Grayed f Parent Resource false while f Original Resource equals f Parent Resource f Tree Viewer set Checked f Original Resource is Checked f Original Resource f Original Resource get Parent f Parent Resource null f Original Resource null  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale changeObject getChangedObjects changeObject IBuildEntry IBuildEntry changeObject getName IBuildPropertiesConstants PROPERTY_BIN_EXCLUDES IBuildEntry changeObject getName IBuildPropertiesConstants PROPERTY_BIN_INCLUDES IBuildEntry changeObject getName IBuildPropertiesConstants PROPERTY_SRC_EXCLUDES IBuildEntry changeObject getName IBuildPropertiesConstants PROPERTY_SRC_INCLUDES fParentResource fOriginalResource fOriginalResource fParentResource initializeCheckState fParentResource fOriginalResource getChangedProperty getChangedProperty IBuildPropertiesConstants PROPERTY_BIN_INCLUDES fTreeViewer setChecked fParentResource isChecked fTreeViewer setGrayed fOriginalResource fTreeViewer setParentsGrayed fParentResource setParentsChecked fParentResource fTreeViewer setGrayed fParentResource fParentResource IFolder fTreeViewer setSubtreeChecked fParentResource isChecked setChildrenGrayed fParentResource fOriginalResource fParentResource fTreeViewer setChecked fOriginalResource isChecked fOriginalResource fOriginalResource getParent fParentResource fOriginalResource

public class Build Editor extends Multi Source Editor public Build Editor  BuildEditor MultiSourceEditor BuildEditor
protected void create Resource Contexts Input Context Manager manager I File Editor Input input I File file input get File manager put Context input new Build Input Context this input true manager monitor File file  createResourceContexts InputContextManager IFileEditorInput IFile getFile putContext BuildInputContext monitorFile
protected Input Context Manager create Input Context Manager Build Input Context Manager manager new Build Input Context Manager this manager set Undo Manager new Build Undo Manager this return manager  InputContextManager createInputContextManager BuildInputContextManager BuildInputContextManager setUndoManager BuildUndoManager
public void monitored File Added I File file String name file get Name if name equals Ignore Case build properties NON NLS 1 if input Context Manager has Context Build Input Context CONTEXT ID I Editor Input in new File Editor Input file input Context Manager put Context in new Build Input Context this in false  monitoredFileAdded IFile getName equalsIgnoreCase inputContextManager hasContext BuildInputContext CONTEXT_ID IEditorInput FileEditorInput inputContextManager putContext BuildInputContext
public boolean monitored File Removed I File file TODO may need to check with the user if there are unsaved changes in the model for the file that just got removed under us return true  monitoredFileRemoved IFile
return true public void context Added Input Context context add Source Page context get Id  contextAdded InputContext addSourcePage getId
public void context Removed Input Context context if context is Primary close true return I Form Page page find Page context get Id if page null remove Page context get Id  contextRemoved InputContext isPrimary IFormPage findPage getId removePage getId
protected void create System File Contexts Input Context Manager manager System File Editor Input input manager put Context input new Build Input Context this input true  createSystemFileContexts InputContextManager SystemFileEditorInput putContext BuildInputContext
protected void create Storage Contexts Input Context Manager manager I Storage Editor Input input manager put Context input new Build Input Context this input true  createStorageContexts InputContextManager IStorageEditorInput putContext BuildInputContext
public boolean can Copy I Selection selection return true  canCopy ISelection
protected void add Pages try if get Editor Input instanceof I File Editor Input add Page new Build Page this catch Part Init Exception e PDE Plugin log Exception e add Source Page Build Input Context CONTEXT ID  addPages getEditorInput IFileEditorInput addPage BuildPage PartInitException PDEPlugin logException addSourcePage BuildInputContext CONTEXT_ID
protected String compute Initial Page Id String first Page Id super compute Initial Page Id if first Page Id null Input Context primary input Context Manager get Primary Context if primary get Id equals Build Input Context CONTEXT ID first Page Id Build Page PAGE ID if first Page Id null first Page Id Build Page PAGE ID return first Page Id  computeInitialPageId firstPageId computeInitialPageId firstPageId InputContext inputContextManager getPrimaryContext getId BuildInputContext CONTEXT_ID firstPageId BuildPage PAGE_ID firstPageId firstPageId BuildPage PAGE_ID firstPageId
see org eclipse pde internal ui neweditor Multi Source Editor createXML Source Page org eclipse pde internal ui neweditor PDE Form Editor java lang String java lang String protected PDE Source Page create Source Page PDE Form Editor editor String title String name String context Id return new Build Source Page editor title name  MultiSourceEditor createXMLSourcePage PDEFormEditor PDESourcePage createSourcePage PDEFormEditor contextId BuildSourcePage
protected I Content Outline Page create Content Outline return new Build Outline Page this  IContentOutlinePage createContentOutline BuildOutlinePage
protected I Property Sheet Page get Property Sheet PDE Form Page page return null  IPropertySheetPage getPropertySheet PDEFormPage
public String get Title return super get Title  getTitle getTitle
protected boolean is Model Correct Object model return model null I Build Model model is Valid false  isModelCorrect IBuildModel isValid
protected boolean has Known Types try Transfer Data types get Clipboard get Available Types Transfer transfers new Transfer Text Transfer get Instance RTF Transfer get Instance for int i 0 i types length i for int j 0 j transfers length j if transfers j is Supported Type types i return true catch SWT Error e return false  hasKnownTypes TransferData getClipboard getAvailableTypes TextTransfer getInstance RTFTransfer getInstance isSupportedType SWTError
public Object get Adapter Class key No property sheet needed block super if key equals I Property Sheet Page class return null return super get Adapter key  getAdapter IPropertySheetPage getAdapter

public class Build Editor Contributor extends PDE Form Editor Contributor public Build Editor Contributor super Build NON NLS 1  BuildEditorContributor PDEFormEditorContributor BuildEditorContributor
super Build NON NLS 1 protected boolean has Known Types Clipboard clipboard return true  hasKnownTypes

private Hash Map f Operation Table new Hash Map public Build Input Context PDE Form Editor editor I Editor Input input boolean primary super editor input primary create  HashMap fOperationTable HashMap BuildInputContext PDEFormEditor IEditorInput
see org eclipse pde internal ui neweditor context Input Context get Char Set protected String get Default Charset return ISO 8859 1 NON NLS 1  InputContext getCharSet getDefaultCharset
protected I Base Model create Model I Editor Input input throws Core Exception Build Model model null if input instanceof I Storage Editor Input boolean is Reconciling input instanceof I File Editor Input I Document document get Document Provider get Document input model new Build Model document is Reconciling if input instanceof I File Editor Input I File file I File Editor Input input get File model set Underlying Resource file model set Charset file get Charset else if input instanceof System File Editor Input File file File System File Editor Input input get Adapter File class model set Install Location file get Parent model set Charset get Default Charset model load return model  IBaseModel createModel IEditorInput CoreException BuildModel IStorageEditorInput isReconciling IFileEditorInput IDocument getDocumentProvider getDocument BuildModel isReconciling IFileEditorInput IFile IFileEditorInput getFile setUnderlyingResource setCharset getCharset SystemFileEditorInput SystemFileEditorInput getAdapter setInstallLocation getParent setCharset getDefaultCharset
see org eclipse pde internal ui neweditor Input Context get Id public String get Id return CONTEXT ID  InputContext getId getId CONTEXT_ID
protected void add Text Edit Operation Array List ops I Model Changed Event event Object objects event get Changed Objects if objects null for int i 0 i objects length i Object object objects i I Document Key key I Document Key object Text Edit op Text Edit f Operation Table get key if op null f Operation Table remove key ops remove op switch event get Change Type case I Model Changed Event REMOVE delete Key key ops break case I Model Changed Event INSERT insert Key key ops break case I Model Changed Event CHANGE modify Key key ops default break  addTextEditOperation ArrayList IModelChangedEvent getChangedObjects IDocumentKey IDocumentKey TextEdit TextEdit fOperationTable fOperationTable getChangeType IModelChangedEvent deleteKey IModelChangedEvent insertKey IModelChangedEvent modifyKey
private void insert Key I Document Key key Array List ops I Document doc get Document Provider get Document get Input Insert Edit op new Insert Edit doc get Length key write f Operation Table put key op ops add op  insertKey IDocumentKey ArrayList IDocument getDocumentProvider getDocument getInput InsertEdit InsertEdit getLength fOperationTable
private void delete Key I Document Key key Array List ops if key get Offset 0 Text Edit op new Delete Edit key get Offset key get Length f Operation Table put key op ops add op  deleteKey IDocumentKey ArrayList getOffset TextEdit DeleteEdit getOffset getLength fOperationTable
private void modify Key I Document Key key Array List ops if key get Offset 1 insert Key key ops else Text Edit op new Replace Edit key get Offset key get Length key write f Operation Table put key op ops add op  modifyKey IDocumentKey ArrayList getOffset insertKey TextEdit ReplaceEdit getOffset getLength fOperationTable
public void do Revert f Edit Operations clear f Operation Table clear Abstract Editing Model model Abstract Editing Model get Model model reconciled model get Document  doRevert fEditOperations fOperationTable AbstractEditingModel AbstractEditingModel getModel getDocument

public class Build Input Context Manager extends Input Context Manager public Build Input Context Manager PDE Form Editor editor super editor  BuildInputContextManager InputContextManager BuildInputContextManager PDEFormEditor
public I Base Model get Aggregate Model return find Build Model  IBaseModel getAggregateModel findBuildModel
private I Base Model find Build Model Input Context bcontext find Context Build Input Context CONTEXT ID if bcontext null return bcontext get Model else return null  IBaseModel findBuildModel InputContext findContext BuildInputContext CONTEXT_ID getModel

public class Build Outline Page extends Form Outline Page param editor public Build Outline Page PDE Form Editor editor super editor  BuildOutlinePage FormOutlinePage BuildOutlinePage PDEFormEditor
protected Object get Children Object parent if parent instanceof PDE Form Page PDE Form Page page PDE Form Page parent I Build Model model I Build Model page get Model if model is Valid I Build build model get Build if page get Id equals Build Page PAGE ID return build get Build Entries return new Object 0  getChildren PDEFormPage PDEFormPage PDEFormPage IBuildModel IBuildModel getModel isValid IBuild getBuild getId BuildPage PAGE_ID getBuildEntries
protected String get Parent Page Id Object item String page Id null if item instanceof I Build Entry page Id Build Page PAGE ID if page Id null return page Id return super get Parent Page Id item  getParentPageId pageId IBuildEntry pageId BuildPage PAGE_ID pageId pageId getParentPageId

private Button custom Button public Build Page Form Editor editor super editor PAGE ID PDE Plugin get Resource String Build Page name NON NLS 1  customButton BuildPage FormEditor PAGE_ID PDEPlugin getResourceString BuildPage
custom Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean is Custom custom Button get Selection I Build Entry custom Entry get Custom Build Entry set Custom Entry Value custom Entry is Custom handle Custom Check State is Custom  customButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent isCustom customButton getSelection IBuildEntry customEntry getCustomBuildEntry setCustomEntryValue customEntry isCustom handleCustomCheckState isCustom
protected void create Form Content I Managed Form mform super create Form Content mform Form Toolkit toolkit mform get Toolkit Grid Layout layout new Grid Layout Scrolled Form form mform get Form form set Text PDE Plugin get Resource String FORM TITLE layout num Columns 2 layout margin Width 10 layout horizontal Spacing 15 layout vertical Spacing 10 layout make Columns Equal Width true form get Body set Layout layout custom Button toolkit create Button form get Body get Custom Text SWT CHECK custom Button set Alignment SWT LEFT Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 1 custom Button set Layout Data gd Label label toolkit create Label form get Body null gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 1 label set Layout Data gd custom Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean is Custom custom Button get Selection I Build Entry custom Entry get Custom Build Entry set Custom Entry Value custom Entry is Custom handle Custom Check State is Custom runtime Section new Runtime Info Section this form get Body gd new Grid Data Grid Data FILL BOTH gd horizontal Span 2 runtime Section get Section set Layout Data gd bin Section new Bin Section this form get Body gd new Grid Data Grid Data FILL BOTH bin Section get Section set Layout Data gd src Section new Src Section this form get Body gd new Grid Data Grid Data FILL BOTH src Section get Section set Layout Data gd classpath Section new Build Classpath Section this form get Body gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING gd horizontal Span 2 gd width Hint 100 gd height Hint 100 classpath Section get Section set Layout Data gd mform add Part runtime Section mform add Part src Section mform add Part bin Section mform add Part classpath Section handle Custom Check State get Custom Selection Workbench Help set Help form I Help Context Ids BUILD PAGE  createFormContent IManagedForm createFormContent FormToolkit getToolkit GridLayout GridLayout ScrolledForm getForm setText PDEPlugin getResourceString FORM_TITLE numColumns marginWidth horizontalSpacing verticalSpacing makeColumnsEqualWidth getBody setLayout customButton createButton getBody getCustomText customButton setAlignment GridData GridData GridData FILL_HORIZONTAL horizontalSpan customButton setLayoutData createLabel getBody GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData customButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent isCustom customButton getSelection IBuildEntry customEntry getCustomBuildEntry setCustomEntryValue customEntry isCustom handleCustomCheckState isCustom runtimeSection RuntimeInfoSection getBody GridData GridData FILL_BOTH horizontalSpan runtimeSection getSection setLayoutData binSection BinSection getBody GridData GridData FILL_BOTH binSection getSection setLayoutData srcSection SrcSection getBody GridData GridData FILL_BOTH srcSection getSection setLayoutData classpathSection BuildClasspathSection getBody GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING horizontalSpan widthHint heightHint classpathSection getSection setLayoutData addPart runtimeSection addPart srcSection addPart binSection addPart classpathSection handleCustomCheckState getCustomSelection WorkbenchHelp setHelp IHelpContextIds BUILD_PAGE
private I Build Model get Build Model Input Context context getPDE Editor get Context Manager find Context Build Input Context CONTEXT ID return I Build Model context get Model  IBuildModel getBuildModel InputContext getPDEEditor getContextManager findContext BuildInputContext CONTEXT_ID IBuildModel getModel
private I Build Entry get Custom Build Entry I Build Model build Model get Build Model I Build Entry custom Entry build Model get Build get Entry I Build Properties Constants PROPERTY CUSTOM if custom Entry null return custom Entry try custom Entry build Model get Factory create Entry I Build Properties Constants PROPERTY CUSTOM build Model get Build add custom Entry catch Core Exception e PDE Plugin log Exception e return custom Entry  IBuildEntry getCustomBuildEntry IBuildModel buildModel getBuildModel IBuildEntry customEntry buildModel getBuild getEntry IBuildPropertiesConstants PROPERTY_CUSTOM customEntry customEntry customEntry buildModel getFactory createEntry IBuildPropertiesConstants PROPERTY_CUSTOM buildModel getBuild customEntry CoreException PDEPlugin logException customEntry
private boolean get Custom Selection I Build Model model get Build Model I Build build model get Build I Build Entry custom Entry build get Entry I Build Properties Constants PROPERTY CUSTOM if custom Entry null custom Entry get Tokens length 0 return false return custom Entry get Tokens 0 equals true NON NLS 1  getCustomSelection IBuildModel getBuildModel IBuild getBuild IBuildEntry customEntry getEntry IBuildPropertiesConstants PROPERTY_CUSTOM customEntry customEntry getTokens customEntry getTokens
private void handle Custom Check State boolean is Custom custom Button set Selection is Custom enable All Sections is Custom  handleCustomCheckState isCustom customButton setSelection isCustom enableAllSections isCustom
public void enable All Sections boolean enable runtime Section enable Section enable bin Section enable Section enable src Section enable Section enable classpath Section enable Section enable  enableAllSections runtimeSection enableSection binSection enableSection srcSection enableSection classpathSection enableSection
private void set Custom Entry Value I Build Entry custom Entry boolean is Custom String tokens custom Entry get Tokens try if tokens length 0 for int i 0 i tokens length i custom Entry remove Token tokens i if is Custom custom Entry add Token true NON NLS 1 else get Build Model get Build remove custom Entry catch Core Exception e PDE Plugin log Exception e  setCustomEntryValue IBuildEntry customEntry isCustom customEntry getTokens customEntry removeToken isCustom customEntry addToken getBuildModel getBuild customEntry CoreException PDEPlugin logException
private String get Custom Text return PDE Plugin get Resource String Build Page custom NON NLS 1  getCustomText PDEPlugin getResourceString BuildPage

implements I Tree Content Provider public Object get Children Object parent return new Object 0  ITreeContentProvider getChildren
return new Object 0 public boolean has Children Object parent return false  hasChildren
public Object get Parent Object child if child instanceof I Build Entry return I Build Entry child get Model return null  getParent IBuildEntry IBuildEntry getModel
public Object get Elements Object parent if parent instanceof I Build Model I Build Model model I Build Model parent I Build build model get Build return build get Build Entries return new Object 0  getElements IBuildModel IBuildModel IBuildModel IBuild getBuild getBuildEntries
class Build Label Provider extends Label Provider public String get Text Object obj if obj instanceof I Build Entry return I Build Entry obj get Name return super get Text obj  BuildLabelProvider LabelProvider getText IBuildEntry IBuildEntry getName getText
public Image get Image Object obj if obj instanceof I Build Entry return PDE Plugin get Default get Label Provider get PDE Plugin Images DESC BUILD VAR OBJ return null  getImage IBuildEntry PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_BUILD_VAR_OBJ
public Build Source Page PDE Form Editor editor String id String title super editor id title  BuildSourcePage PDEFormEditor
protected I Label Provider create Outline Label Provider return new Build Label Provider  ILabelProvider createOutlineLabelProvider BuildLabelProvider
protected I Tree Content Provider create Outline Content Provider return new Build Outline Content Provider  ITreeContentProvider createOutlineContentProvider BuildOutlineContentProvider

public class Build Undo Manager extends Model Undo Manager public Build Undo Manager PDE Form Editor editor super editor set Undo Level Limit 30  BuildUndoManager ModelUndoManager BuildUndoManager PDEFormEditor setUndoLevelLimit
protected String get Page Id Object obj if obj instanceof I Build Entry return Build Page PAGE ID return null  getPageId IBuildEntry BuildPage PAGE_ID
protected void execute I Model Changed Event event boolean undo Object elements event get Changed Objects int type event get Change Type String property Name event get Changed Property I Build Model model I Build Model event get Change Provider switch type case I Model Changed Event INSERT if undo execute Remove model elements else execute Add model elements break case I Model Changed Event REMOVE if undo execute Add model elements else execute Remove model elements break case I Model Changed Event CHANGE if undo execute Change elements 0 property Name event get New Value event get Old Value else execute Change elements 0 property Name event get Old Value event get New Value  IModelChangedEvent getChangedObjects getChangeType propertyName getChangedProperty IBuildModel IBuildModel getChangeProvider IModelChangedEvent executeRemove executeAdd IModelChangedEvent executeAdd executeRemove IModelChangedEvent executeChange propertyName getNewValue getOldValue executeChange propertyName getOldValue getNewValue
private void execute Add I Build Model model Object elements I Build build model get Build try for int i 0 i elements length i Object element elements i if element instanceof I Build Entry build add I Build Entry element catch Core Exception e PDE Plugin log Exception e  executeAdd IBuildModel IBuild getBuild IBuildEntry IBuildEntry CoreException PDEPlugin logException
private void execute Remove I Build Model model Object elements I Build build model get Build try for int i 0 i elements length i Object element elements i if element instanceof I Build Entry build remove I Build Entry element catch Core Exception e PDE Plugin log Exception e  executeRemove IBuildModel IBuild getBuild IBuildEntry IBuildEntry CoreException PDEPlugin logException
private void execute Change Object element String property Name Object old Value Object new Value if element instanceof Build Object Build Object bobj Build Object element try bobj restore Property property Name old Value new Value catch Core Exception e PDE Plugin log Exception e  executeChange propertyName oldValue newValue BuildObject BuildObject BuildObject restoreProperty propertyName oldValue newValue CoreException PDEPlugin logException
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event CHANGE Object obj event get Changed Objects 0 if obj instanceof I Build Object I Build Object bobj I Build Object event get Changed Objects 0 Ignore events from objects that are not yet in the model if bobj instanceof I Build bobj is In The Model false return super model Changed event  modelChanged IModelChangedEvent getChangeType IModelChangedEvent getChangedObjects IBuildObject IBuildObject IBuildObject getChangedObjects IBuild isInTheModel modelChanged

public static I Build Entry get Build Libraries I Build Entry entries Vector temp new Vector for int i 0 i entries length i if entries i get Name starts With I Build Entry JAR PREFIX temp add entries i I Build Entry result new I Build Entry temp size temp copy Into result return result  IBuildEntry getBuildLibraries IBuildEntry getName startsWith IBuildEntry JAR_PREFIX IBuildEntry IBuildEntry copyInto

private Hash Set f Paths public JAR File Filter f Paths new Hash Set  HashSet fPaths JARFileFilter fPaths HashSet
public JAR File Filter Hash Set names f Paths names  JARFileFilter HashSet fPaths
public boolean select Viewer viewer Object parent Object element if element instanceof I File return is File Valid I File element get Project Relative Path if element instanceof I Container i e I Project I Folder try I Resource resources I Container element members for int i 0 i resources length i if select viewer parent resources i return true catch Core Exception e PDE Plugin log Exception e return false  IFile isFileValid IFile getProjectRelativePath IContainer IProject IFolder IResource IContainer CoreException PDEPlugin logException
public boolean is File Valid I Path path String ext path get File Extension if is Path Valid path ext null ext length 0 return ext equals jar Ext return false  isFileValid IPath getFileExtension isPathValid jarExt
public boolean is Path Valid I Path path return f Paths contains path  isPathValid IPath fPaths

class Rename Action extends Action public Rename Action super PDE Plugin get Resource String Editable Table Part rename Action NON NLS 1  RenameAction RenameAction PDEPlugin getResourceString EditableTablePart renameAction
public void run do Rename  doRename
class Part Adapter extends Table Part public Part Adapter String button Labels super button Labels  PartAdapter TablePart PartAdapter buttonLabels buttonLabels
public void selection Changed I Structured Selection selection if selection size 0 Runtime Info Section this selection Changed selection  selectionChanged IStructuredSelection RuntimeInfoSection selectionChanged
public void handle Double Click I Structured Selection selection Runtime Info Section this handle Double Click selection  handleDoubleClick IStructuredSelection RuntimeInfoSection handleDoubleClick
public void button Selected Button button int index if get Viewer f Library Part get Viewer switch index case 0 handle New break case 2 handle Up break case 3 handle Down break else if get Viewer f Folder Part get Viewer if index 0 handle New Folder else button get Shell set Default Button null  buttonSelected getViewer fLibraryPart getViewer handleNew handleUp handleDown getViewer fFolderPart getViewer handleNewFolder getShell setDefaultButton
public Object get Elements Object parent if parent instanceof I Build Model I Build build I Build Model parent get Build I Build Entry jar Order Entry build get Entry I Build Properties Constants PROPERTY JAR ORDER I Build Entry libraries Build Util get Build Libraries build get Build Entries if jar Order Entry null return libraries Vector lib List new Vector String tokens jar Order Entry get Tokens for int i 0 i tokens length i I Build Entry entry build get Entry I Build Entry JAR PREFIX tokens i if entry null lib List add entry for int i 0 i libraries length i if lib List contains libraries i lib List add libraries i return I Build Entry lib List to Array new I Build Entry lib List size return new Object 0  getElements IBuildModel IBuild IBuildModel getBuild IBuildEntry jarOrderEntry getEntry IBuildPropertiesConstants PROPERTY_JAR_ORDER IBuildEntry BuildUtil getBuildLibraries getBuildEntries jarOrderEntry libList jarOrderEntry getTokens IBuildEntry getEntry IBuildEntry JAR_PREFIX libList libList libList IBuildEntry libList toArray IBuildEntry libList
public String get Column Text Object obj int index String name I Build Entry obj get Name if name starts With I Build Entry JAR PREFIX return name substring I Build Entry JAR PREFIX length return name  getColumnText IBuildEntry getName startsWith IBuildEntry JAR_PREFIX IBuildEntry JAR_PREFIX
public Image get Column Image Object obj int index PDE Label Provider provider PDE Plugin get Default get Label Provider return provider get PDE Plugin Images DESC JAVA LIB OBJ  getColumnImage PDELabelProvider PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_JAVA_LIB_OBJ
public boolean has Children Object element Object children get Children element for int i 0 i children length i if children i instanceof I Folder return true return false  hasChildren getChildren IFolder
I Structured Content Provider public Object get Elements Object parent return parent instanceof I Build Entry I Build Entry parent get Tokens new Object 0  IStructuredContentProvider getElements IBuildEntry IBuildEntry getTokens
I Table Label Provider public String get Column Text Object obj int index return obj to String  ITableLabelProvider getColumnText toString
public Image get Column Image Object obj int index I Shared Images shared Images PlatformUI get Workbench get Shared Images return shared Images get Image I Shared Images IMG OBJ FOLDER  getColumnImage ISharedImages sharedImages getWorkbench getSharedImages sharedImages getImage ISharedImages IMG_OBJ_FOLDER
public Runtime Info Section PDE Form Page page Composite parent super page parent Section DESCRIPTION get Section set Text PDE Plugin get Resource String SECTION TITLE get Section set Description PDE Plugin get Resource String SECTION DESC get Build Model add Model Changed Listener this create Client get Section page get Managed Form get Toolkit PDE Plugin get Default get Label Provider connect this  RuntimeInfoSection PDEFormPage getSection setText PDEPlugin getResourceString SECTION_TITLE getSection setDescription PDEPlugin getResourceString SECTION_DESC getBuildModel addModelChangedListener createClient getSection getManagedForm getToolkit PDEPlugin getDefault getLabelProvider
private I Build Model get Build Model Input Context context get Page getPDE Editor get Context Manager find Context Build Input Context CONTEXT ID if context null return null return I Build Model context get Model  IBuildModel getBuildModel InputContext getPage getPDEEditor getContextManager findContext BuildInputContext CONTEXT_ID IBuildModel getModel
protected void handle Lib In Bin Build boolean is Selected String lib Name I Build Model model get Build Model I Build Entry bin Incl model get Build get Entry I Build Properties Constants PROPERTY BIN INCLUDES I Project project model get Underlying Resource get Project I Path lib Path project get File lib Name get Project Relative Path try if bin Incl null is Selected return if bin Incl null bin Incl model get Factory create Entry I Build Properties Constants PROPERTY BIN INCLUDES model get Build add bin Incl if is Selected lib Path segment Count 1 bin Incl contains jar NON NLS 1 add All Jars To Bin Includes bin Incl project model else if is Selected lib Path segment Count 1 I Path parent lib Path remove Last Segments 1 String parent Path parent to String Path SEPARATOR if bin Incl contains parent Path project exists parent bin Incl remove Token parent Path else if parent segment Count 1 parent parent remove Last Segments 1 parent Path parent to String Path SEPARATOR if bin Incl contains parent Path project exists parent bin Incl remove Token parent Path if is Selected bin Incl contains lib Name bin Incl add Token lib Name else if is Selected bin Incl contains lib Name bin Incl remove Token lib Name catch Core Exception e PDE Plugin log Exception e  handleLibInBinBuild isSelected libName IBuildModel getBuildModel IBuildEntry binIncl getBuild getEntry IBuildPropertiesConstants PROPERTY_BIN_INCLUDES IProject getUnderlyingResource getProject IPath libPath getFile libName getProjectRelativePath binIncl isSelected binIncl binIncl getFactory createEntry IBuildPropertiesConstants PROPERTY_BIN_INCLUDES getBuild binIncl isSelected libPath segmentCount binIncl addAllJarsToBinIncludes binIncl isSelected libPath segmentCount IPath libPath removeLastSegments parentPath toString binIncl parentPath binIncl removeToken parentPath segmentCount removeLastSegments parentPath toString binIncl parentPath binIncl removeToken parentPath isSelected binIncl libName binIncl addToken libName isSelected binIncl libName binIncl removeToken libName CoreException PDEPlugin logException
protected void add All Jars To Bin Includes I Build Entry bin Incl I Project project I Build Model model try I Resource members project members for int i 0 i members length i if members i instanceof I Folder members i get File Extension equals jar NON NLS 1 bin Incl add Token members i get Name I Build Entry libraries Build Util get Build Libraries model get Build get Build Entries if libraries length 0 for int j 0 j libraries length j String library Name libraries j get Name substring 7 I Path path project get File library Name get Project Relative Path if path segment Count 1 bin Incl contains library Name bin Incl add Token library Name bin Incl remove Token jar NON NLS 1 catch Core Exception e PDE Plugin log Exception e  addAllJarsToBinIncludes IBuildEntry binIncl IProject IBuildModel IResource IFolder getFileExtension binIncl addToken getName IBuildEntry BuildUtil getBuildLibraries getBuild getBuildEntries libraryName getName IPath getFile libraryName getProjectRelativePath segmentCount binIncl libraryName binIncl addToken libraryName binIncl removeToken CoreException PDEPlugin logException
private void set Output Entry Tokens Set output Folders I Build Entry output Entry Iterator iter output Folders iterator try while iter has Next String output Folder iter next to String if output Folder ends With Path SEPARATOR NON NLS 1 output Folder output Folder concat Path SEPARATOR NON NLS 1 if output Entry contains output Folder to String output Entry add Token output Folder to String catch Core Exception e PDE Plugin log Exception e  setOutputEntryTokens outputFolders IBuildEntry outputEntry outputFolders hasNext outputFolder toString outputFolder endsWith outputFolder outputFolder outputEntry outputFolder toString outputEntry addToken outputFolder toString CoreException PDEPlugin logException
private I Package Fragment Root compute Source Folders Array List folders new Array List I Build Model build Model get Build Model I Project project build Model get Underlying Resource get Project try if project has Nature Java Core NATURE ID I Java Project j Project Java Core create project I Package Fragment Root roots j Project get Package Fragment Roots for int i 0 i roots length i if roots i get Kind I Package Fragment Root K SOURCE folders add roots i catch Java Model Exception e PDE Plugin log Exception e catch Core Exception e PDE Plugin log Exception e return I Package Fragment Root folders to Array new I Package Fragment Root folders size  IPackageFragmentRoot computeSourceFolders ArrayList ArrayList IBuildModel buildModel getBuildModel IProject buildModel getUnderlyingResource getProject hasNature JavaCore NATURE_ID IJavaProject jProject JavaCore IPackageFragmentRoot jProject getPackageFragmentRoots getKind IPackageFragmentRoot K_SOURCE JavaModelException PDEPlugin logException CoreException PDEPlugin logException IPackageFragmentRoot toArray IPackageFragmentRoot
f Include Library Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Lib In Bin Build f Include Library Button get Selection f Current Library get Name substring 7  fIncludeLibraryButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLibInBinBuild fIncludeLibraryButton getSelection fCurrentLibrary getName
public void create Client Section section Form Toolkit toolkit Composite container toolkit create Composite section Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height layout margin Width 0 layout make Columns Equal Width true container set Layout layout create Left Section container toolkit create Right Section container toolkit f Include Library Button toolkit create Button container PDE Plugin get Resource String JAR INCLUDE SWT CHECK Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 f Include Library Button set Layout Data gd f Include Library Button set Visible false f Include Library Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Lib In Bin Build f Include Library Button get Selection f Current Library get Name substring 7 toolkit paint Borders For container section set Client container  createClient FormToolkit createComposite GridLayout GridLayout numColumns marginHeight marginWidth makeColumnsEqualWidth setLayout createLeftSection createRightSection fIncludeLibraryButton createButton PDEPlugin getResourceString JAR_INCLUDE GridData GridData GridData FILL_HORIZONTAL horizontalSpan fIncludeLibraryButton setLayoutData fIncludeLibraryButton setVisible fIncludeLibraryButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLibInBinBuild fIncludeLibraryButton getSelection fCurrentLibrary getName paintBordersFor setClient
menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager fill Library Context Menu manager  menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager fillLibraryContextMenu
private void create Left Section Composite parent Form Toolkit toolkit Composite container toolkit create Composite parent Grid Layout layout new Grid Layout layout margin Height layout margin Width 2 layout num Columns 2 container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint 100 container set Layout Data gd f Library Part new Part Adapter new String PDE Plugin get Resource String SECTION NEW null PDE Plugin get Resource String SECTION UP PDE Plugin get Resource String SECTION DOWN f Library Part create Control container SWT FULL SELECTION 2 toolkit f Library Viewer Table Viewer f Library Part get Viewer f Library Viewer set Content Provider new Library Content Provider f Library Viewer set Label Provider new Library Label Provider f Library Part set Button Enabled 2 false f Library Part set Button Enabled 3 false f Library Viewer set Input get Build Model toolkit paint Borders For container Menu Manager menu Mgr new Menu Manager Popup Menu NON NLS 1 menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager fill Library Context Menu manager f Library Viewer get Control set Menu menu Mgr create Context Menu f Library Viewer get Control  createLeftSection FormToolkit createComposite GridLayout GridLayout marginHeight marginWidth numColumns setLayout GridData GridData GridData FILL_BOTH widthHint setLayoutData fLibraryPart PartAdapter PDEPlugin getResourceString SECTION_NEW PDEPlugin getResourceString SECTION_UP PDEPlugin getResourceString SECTION_DOWN fLibraryPart createControl FULL_SELECTION fLibraryViewer TableViewer fLibraryPart getViewer fLibraryViewer setContentProvider LibraryContentProvider fLibraryViewer setLabelProvider LibraryLabelProvider fLibraryPart setButtonEnabled fLibraryPart setButtonEnabled fLibraryViewer setInput getBuildModel paintBordersFor MenuManager menuMgr MenuManager PopupMenu menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager fillLibraryContextMenu fLibraryViewer getControl setMenu menuMgr createContextMenu fLibraryViewer getControl
menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager fill Folder Viewer Context Menu manager  menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager fillFolderViewerContextMenu
private void create Right Section Composite parent Form Toolkit toolkit Composite container toolkit create Composite parent Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height layout margin Width 2 container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint 100 container set Layout Data gd f Folder Part new Part Adapter new String PDE Plugin get Resource String JSECTION NEW f Folder Part create Control container SWT FULL SELECTION 2 toolkit f Folder Viewer Table Viewer f Folder Part get Viewer f Folder Viewer set Content Provider new Folder Content Provider f Folder Viewer set Label Provider new Folder Label Provider toolkit paint Borders For container Menu Manager menu Mgr new Menu Manager Popup Menu NON NLS 1 menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager fill Folder Viewer Context Menu manager f Folder Viewer get Control set Menu menu Mgr create Context Menu f Folder Viewer get Control  createRightSection FormToolkit createComposite GridLayout GridLayout numColumns marginHeight marginWidth setLayout GridData GridData GridData FILL_BOTH widthHint setLayoutData fFolderPart PartAdapter PDEPlugin getResourceString JSECTION_NEW fFolderPart createControl FULL_SELECTION fFolderViewer TableViewer fFolderPart getViewer fFolderViewer setContentProvider FolderContentProvider fFolderViewer setLabelProvider FolderLabelProvider paintBordersFor MenuManager menuMgr MenuManager PopupMenu menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager fillFolderViewerContextMenu fFolderViewer getControl setMenu menuMgr createContextMenu fFolderViewer getControl
get Resource String POPUP NEW FOLDER public void run handle New Folder  getResourceString POPUP_NEW_FOLDER handleNewFolder
get Resource String POPUP DELETE public void run handle Delete Folder  getResourceString POPUP_DELETE handleDeleteFolder
protected void fill Folder Viewer Context Menu I Menu Manager manager I Selection selection f Folder Viewer get Selection if f Current Library null Action new Action new Action PDE Plugin get Resource String POPUP NEW FOLDER public void run handle New Folder new Action set Enabled f Enabled manager add new Action manager add new Separator Action delete Action new Action PDE Plugin get Resource String POPUP DELETE public void run handle Delete Folder delete Action set Enabled selection is Empty f Enabled manager add delete Action defect 19550 get Page getPDE Editor get Contributor context Menu About To Show manager false  fillFolderViewerContextMenu IMenuManager ISelection fFolderViewer getSelection fCurrentLibrary newAction PDEPlugin getResourceString POPUP_NEW_FOLDER handleNewFolder newAction setEnabled fEnabled newAction deleteAction PDEPlugin getResourceString POPUP_DELETE handleDeleteFolder deleteAction setEnabled isEmpty fEnabled deleteAction getPage getPDEEditor getContributor contextMenuAboutToShow
get Resource String POPUP NEW LIBRARY public void run handle New  getResourceString POPUP_NEW_LIBRARY handleNew
get Resource String POPUP DELETE public void run handle Delete  getResourceString POPUP_DELETE handleDelete
protected void fill Library Context Menu I Menu Manager manager I Selection selection f Library Viewer get Selection Action new Action new Action PDE Plugin get Resource String POPUP NEW LIBRARY public void run handle New new Action set Enabled f Enabled manager add new Action manager add new Separator I Action rename Action new Rename Action rename Action set Enabled selection is Empty f Enabled manager add rename Action Action delete Action new Action PDE Plugin get Resource String POPUP DELETE public void run handle Delete delete Action set Enabled selection is Empty f Enabled manager add delete Action get Page getPDE Editor get Contributor context Menu About To Show manager false  fillLibraryContextMenu IMenuManager ISelection fLibraryViewer getSelection newAction PDEPlugin getResourceString POPUP_NEW_LIBRARY handleNew newAction setEnabled fEnabled newAction IAction renameAction RenameAction renameAction setEnabled isEmpty fEnabled renameAction deleteAction PDEPlugin getResourceString POPUP_DELETE handleDelete deleteAction setEnabled isEmpty fEnabled deleteAction getPage getPDEEditor getContributor contextMenuAboutToShow
protected void entry Modified I Build Entry old Entry String new Value final I Build Entry entry old Entry I Build Model build Model get Build Model I Build build build Model get Build String old Name entry get Name substring 7 try if new Value equals entry get Name return if new Value starts With I Build Entry JAR PREFIX new Value I Build Entry JAR PREFIX new Value if new Value ends With jar NON NLS 1 new Value new Value jar NON NLS 1 jars compile order I Build Entry temp Entry build get Entry I Build Properties Constants PROPERTY JAR ORDER if temp Entry null temp Entry contains old Name temp Entry rename Token old Name new Value substring 7 output source folder jar temp Entry build get Entry I Build Properties Constants PROPERTY OUTPUT PREFIX old Name if temp Entry null temp Entry set Name I Build Properties Constants PROPERTY OUTPUT PREFIX new Value substring 7 bin includes temp Entry build get Entry I Build Properties Constants PROPERTY BIN INCLUDES if temp Entry null temp Entry contains old Name temp Entry rename Token old Name new Value substring 7 bin excludes temp Entry build get Entry I Build Properties Constants PROPERTY BIN EXCLUDES if temp Entry null temp Entry contains old Name temp Entry rename Token old Name new Value substring 7 rename entry set Name new Value catch Core Exception e PDE Plugin log Exception e  entryModified IBuildEntry oldEntry newValue IBuildEntry oldEntry IBuildModel buildModel getBuildModel IBuild buildModel getBuild oldName getName newValue getName newValue startsWith IBuildEntry JAR_PREFIX newValue IBuildEntry JAR_PREFIX newValue newValue endsWith newValue newValue IBuildEntry tempEntry getEntry IBuildPropertiesConstants PROPERTY_JAR_ORDER tempEntry tempEntry oldName tempEntry renameToken oldName newValue tempEntry getEntry IBuildPropertiesConstants PROPERTY_OUTPUT_PREFIX oldName tempEntry tempEntry setName IBuildPropertiesConstants PROPERTY_OUTPUT_PREFIX newValue tempEntry getEntry IBuildPropertiesConstants PROPERTY_BIN_INCLUDES tempEntry tempEntry oldName tempEntry renameToken oldName newValue tempEntry getEntry IBuildPropertiesConstants PROPERTY_BIN_EXCLUDES tempEntry tempEntry oldName tempEntry renameToken oldName newValue setName newValue CoreException PDEPlugin logException
public void expand To Object object f Library Viewer set Selection new Structured Selection object true  expandTo fLibraryViewer setSelection StructuredSelection
public void handle Double Click I Structured Selection selection do Rename  handleDoubleClick IStructuredSelection doRename
public void enable Section boolean enable f Enabled enable f Library Part set Button Enabled 0 enable f Library Part set Button Enabled 2 false f Library Part set Button Enabled 3 false f Include Library Button set Enabled enable f Folder Part set Button Enabled 0 enable f Library Viewer get Selection is Empty  enableSection fEnabled fLibraryPart setButtonEnabled fLibraryPart setButtonEnabled fLibraryPart setButtonEnabled fIncludeLibraryButton setEnabled fFolderPart setButtonEnabled fLibraryViewer getSelection isEmpty
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id if f Enabled if f Library Viewer get Control is Focus Control handle Delete else handle Delete Folder return true return false  doGlobalAction actionId actionId ActionFactory getId fEnabled fLibraryViewer getControl isFocusControl handleDelete handleDeleteFolder
private void do Rename I Structured Selection selection I Structured Selection f Library Viewer get Selection if selection size 1 I Build Entry entry I Build Entry selection get First Element String old Name entry get Name substring 7 Rename Dialog dialog new Rename Dialog f Library Viewer get Control get Shell old Name dialog create dialog get Shell set Text PDE Plugin get Resource String Editable Table Part rename Title NON NLS 1 dialog get Shell set Size 300 150 if dialog open Dialog OK entry Modified entry dialog get New Name  doRename IStructuredSelection IStructuredSelection fLibraryViewer getSelection IBuildEntry IBuildEntry getFirstElement oldName getName RenameDialog RenameDialog fLibraryViewer getControl getShell oldName getShell setText PDEPlugin getResourceString EditableTablePart renameTitle getShell setSize entryModified getNewName
public void dispose I Build Model build Model get Build Model if build Model null build Model remove Model Changed Listener this PDE Plugin get Default get Label Provider disconnect this super dispose  IBuildModel buildModel getBuildModel buildModel buildModel removeModelChangedListener PDEPlugin getDefault getLabelProvider
private void refresh Output Keys if is Java Project return I Package Fragment Root source Folders compute Source Folders String jar Folders f Current Library get Tokens I Package Fragment Root source Folder I Classpath Entry entry I Path output Path Set output Folders try output Folders new Hash Set for int j 0 j jar Folders length j source Folder get Source Folder jar Folders j source Folders if source Folder null entry source Folder get Raw Classpath Entry output Path entry get Output Location if output Path null output Folders add bin NON NLS 1 else output Path output Path remove First Segments 1 output Folders add output Path to String if output Folders size 0 String lib Name f Current Library get Name substring 7 I Build Model build Model get Build Model I Build build build Model get Build String output Name I Build Properties Constants PROPERTY OUTPUT PREFIX lib Name I Build Entry output Entry build get Entry output Name if output Entry null output Entry build Model get Factory create Entry output Name build add output Entry set Output Entry Tokens output Folders output Entry catch Java Model Exception e PDE Plugin log Exception e catch Core Exception e PDE Plugin log Exception e  refreshOutputKeys isJavaProject IPackageFragmentRoot sourceFolders computeSourceFolders jarFolders fCurrentLibrary getTokens IPackageFragmentRoot sourceFolder IClasspathEntry IPath outputPath outputFolders outputFolders HashSet jarFolders sourceFolder getSourceFolder jarFolders sourceFolders sourceFolder sourceFolder getRawClasspathEntry outputPath getOutputLocation outputPath outputFolders outputPath outputPath removeFirstSegments outputFolders outputPath toString outputFolders libName fCurrentLibrary getName IBuildModel buildModel getBuildModel IBuild buildModel getBuild outputName IBuildPropertiesConstants PROPERTY_OUTPUT_PREFIX libName IBuildEntry outputEntry getEntry outputName outputEntry outputEntry buildModel getFactory createEntry outputName outputEntry setOutputEntryTokens outputFolders outputEntry JavaModelException PDEPlugin logException CoreException PDEPlugin logException
private boolean is Java Project try I Build Model build Model get Build Model I Project project build Model get Underlying Resource get Project return project has Nature Java Core NATURE ID catch Core Exception e return false  isJavaProject IBuildModel buildModel getBuildModel IProject buildModel getUnderlyingResource getProject hasNature JavaCore NATURE_ID CoreException
private boolean is Read Only I Build Model model get Build Model if model instanceof I Editable return I Editable model is Editable return true  isReadOnly IBuildModel getBuildModel IEditable IEditable isEditable
private void update I Build Entry variable f Current Library variable f Folder Viewer set Input f Current Library f Folder Part set Button Enabled 0 is Read Only f Enabled variable null  IBuildEntry fCurrentLibrary fFolderViewer setInput fCurrentLibrary fFolderPart setButtonEnabled isReadOnly fEnabled
protected void selection Changed I Structured Selection selection Object item selection get First Element get Page getPDE Editor set Selection selection if item instanceof I Build Entry update I Build Entry item update Directional Buttons f Include Library Button set Visible true String name I Build Entry item get Name if name starts With I Build Entry JAR PREFIX name name substring I Build Entry JAR PREFIX length f Include Library Button set Selection is Jar Included name  selectionChanged IStructuredSelection getFirstElement getPage getPDEEditor setSelection IBuildEntry IBuildEntry updateDirectionalButtons fIncludeLibraryButton setVisible IBuildEntry getName startsWith IBuildEntry JAR_PREFIX IBuildEntry JAR_PREFIX fIncludeLibraryButton setSelection isJarIncluded
protected void update Directional Buttons Table table f Library Viewer get Table Table Item selection table get Selection boolean has Selection selection length 0 boolean can Move table get Item Count 1 f Library Part set Button Enabled 2 can Move has Selection table get Selection Index 0 f Library Part set Button Enabled 3 can Move has Selection table get Selection Index table get Item Count 1  updateDirectionalButtons fLibraryViewer getTable TableItem getSelection hasSelection canMove getItemCount fLibraryPart setButtonEnabled canMove hasSelection getSelectionIndex fLibraryPart setButtonEnabled canMove hasSelection getSelectionIndex getItemCount
private boolean is Jar Included String lib Name I Build Model model get Build Model I Project project model get Underlying Resource get Project I Path lib Path project get File lib Name get Project Relative Path I Build Entry bin Incl model get Build get Entry I Build Properties Constants PROPERTY BIN INCLUDES I Build Entry bin Excl model get Build get Entry I Build Properties Constants PROPERTY BIN EXCLUDES if bin Incl null return false if lib Path segment Count 1 return bin Incl contains lib Name bin Incl contains jar NON NLS 1 else if bin Incl contains lib Name return true else if bin Excl null bin Excl contains lib Name return false else return is Parent Included lib Path bin Incl bin Excl  isJarIncluded libName IBuildModel getBuildModel IProject getUnderlyingResource getProject IPath libPath getFile libName getProjectRelativePath IBuildEntry binIncl getBuild getEntry IBuildPropertiesConstants PROPERTY_BIN_INCLUDES IBuildEntry binExcl getBuild getEntry IBuildPropertiesConstants PROPERTY_BIN_EXCLUDES binIncl libPath segmentCount binIncl libName binIncl binIncl libName binExcl binExcl libName isParentIncluded libPath binIncl binExcl
protected boolean is Parent Included I Path lib Path I Build Entry bin Incl I Build Entry bin Excl while lib Path segment Count 1 lib Path lib Path remove Last Segments 1 if bin Incl contains lib Path to String Path SEPARATOR return true else if bin Excl null bin Excl contains lib Path to String Path SEPARATOR return false return false  isParentIncluded IPath libPath IBuildEntry binIncl IBuildEntry binExcl libPath segmentCount libPath libPath removeLastSegments binIncl libPath toString binExcl binExcl libPath toString
public void refresh f Library Viewer refresh f Folder Viewer refresh f Library Viewer set Selection null f Folder Viewer set Input null f Folder Part set Button Enabled 0 false f Include Library Button set Visible false update Directional Buttons super refresh  fLibraryViewer fFolderViewer fLibraryViewer setSelection fFolderViewer setInput fFolderPart setButtonEnabled fIncludeLibraryButton setVisible updateDirectionalButtons
protected String get Library Names String lib Names new String f Library Viewer get Table get Item Count for int i 0 i lib Names length i lib Names i f Library Viewer get Table get Item i get Text return lib Names  getLibraryNames libNames fLibraryViewer getTable getItemCount libNames libNames fLibraryViewer getTable getItem getText libNames
public void run I Build Model build Model get Build Model I Build build build Model get Build Add Library Dialog dialog new Add Library Dialog get Section get Shell lib Names plugin Model Base dialog create dialog get Shell set Text PDE Plugin get Resource String Runtime Info Section add Entry NON NLS 1 dialog get Shell set Size 300 350 try if dialog open Dialog OK String name dialog get New Name if name ends With jar NON NLS 1 name name jar NON NLS 1 String key Name name if key Name starts With I Build Entry JAR PREFIX key Name I Build Entry JAR PREFIX name if name starts With I Build Entry JAR PREFIX name name substring 7 handle Lib In Bin Build true name add library to jars compile order I Build Entry jar Order Entry build get Entry I Build Properties Constants PROPERTY JAR ORDER if jar Order Entry null jar Order Entry get Build Model get Factory create Entry I Build Properties Constants PROPERTY JAR ORDER jar Order Entry add Token name build add jar Order Entry else jar Order Entry add Token name end of jars compile order addition I Build Entry library build Model get Factory create Entry key Name build add library catch Core Exception e PDE Plugin log Exception e  IBuildModel buildModel getBuildModel IBuild buildModel getBuild AddLibraryDialog AddLibraryDialog getSection getShell libNames pluginModelBase getShell setText PDEPlugin getResourceString RuntimeInfoSection addEntry getShell setSize getNewName endsWith keyName keyName startsWith IBuildEntry JAR_PREFIX keyName IBuildEntry JAR_PREFIX startsWith IBuildEntry JAR_PREFIX handleLibInBinBuild IBuildEntry jarOrderEntry getEntry IBuildPropertiesConstants PROPERTY_JAR_ORDER jarOrderEntry jarOrderEntry getBuildModel getFactory createEntry IBuildPropertiesConstants PROPERTY_JAR_ORDER jarOrderEntry addToken jarOrderEntry jarOrderEntry addToken IBuildEntry buildModel getFactory createEntry keyName CoreException PDEPlugin logException
protected void handle New final String lib Names get Library Names I Base Model pmodel get Page get Model final I Plugin Model Base plugin Model Base pmodel instanceof I Plugin Model Base I Plugin Model Base pmodel null Busy Indicator show While f Library Viewer get Table get Display new Runnable public void run I Build Model build Model get Build Model I Build build build Model get Build Add Library Dialog dialog new Add Library Dialog get Section get Shell lib Names plugin Model Base dialog create dialog get Shell set Text PDE Plugin get Resource String Runtime Info Section add Entry NON NLS 1 dialog get Shell set Size 300 350 try if dialog open Dialog OK String name dialog get New Name if name ends With jar NON NLS 1 name name jar NON NLS 1 String key Name name if key Name starts With I Build Entry JAR PREFIX key Name I Build Entry JAR PREFIX name if name starts With I Build Entry JAR PREFIX name name substring 7 handle Lib In Bin Build true name add library to jars compile order I Build Entry jar Order Entry build get Entry I Build Properties Constants PROPERTY JAR ORDER if jar Order Entry null jar Order Entry get Build Model get Factory create Entry I Build Properties Constants PROPERTY JAR ORDER jar Order Entry add Token name build add jar Order Entry else jar Order Entry add Token name end of jars compile order addition I Build Entry library build Model get Factory create Entry key Name build add library catch Core Exception e PDE Plugin log Exception e  handleNew libNames getLibraryNames IBaseModel getPage getModel IPluginModelBase pluginModelBase IPluginModelBase IPluginModelBase BusyIndicator showWhile fLibraryViewer getTable getDisplay IBuildModel buildModel getBuildModel IBuild buildModel getBuild AddLibraryDialog AddLibraryDialog getSection getShell libNames pluginModelBase getShell setText PDEPlugin getResourceString RuntimeInfoSection addEntry getShell setSize getNewName endsWith keyName keyName startsWith IBuildEntry JAR_PREFIX keyName IBuildEntry JAR_PREFIX startsWith IBuildEntry JAR_PREFIX handleLibInBinBuild IBuildEntry jarOrderEntry getEntry IBuildPropertiesConstants PROPERTY_JAR_ORDER jarOrderEntry jarOrderEntry getBuildModel getFactory createEntry IBuildPropertiesConstants PROPERTY_JAR_ORDER jarOrderEntry addToken jarOrderEntry jarOrderEntry addToken IBuildEntry buildModel getFactory createEntry keyName CoreException PDEPlugin logException
private I Package Fragment Root get Source Folder String folder Name I Package Fragment Root source Folders for int i 0 i source Folders length i if source Folders i get Path remove First Segments 1 equals new Path folder Name return source Folders i return null  IPackageFragmentRoot getSourceFolder folderName IPackageFragmentRoot sourceFolders sourceFolders sourceFolders getPath removeFirstSegments folderName sourceFolders
protected void handle Delete int index f Library Viewer get Table get Selection Index if index 1 String lib Name f Library Viewer get Table get Item index get Text I Build build get Build Model get Build try jars compile order I Build Entry entry build get Entry I Build Properties Constants PROPERTY JAR ORDER if entry null entry remove Token lib Name output source folder jar entry build get Entry I Build Properties Constants PROPERTY OUTPUT PREFIX lib Name if entry null build remove entry bin includes entry build get Entry I Build Properties Constants PROPERTY BIN INCLUDES if entry null entry contains lib Name entry remove Token lib Name bin excludes entry build get Entry I Build Properties Constants PROPERTY BIN EXCLUDES if entry null entry contains lib Name entry remove Token lib Name build remove build get Entry I Build Entry JAR PREFIX lib Name catch Core Exception e PDE Plugin log Exception e  handleDelete fLibraryViewer getTable getSelectionIndex libName fLibraryViewer getTable getItem getText IBuild getBuildModel getBuild IBuildEntry getEntry IBuildPropertiesConstants PROPERTY_JAR_ORDER removeToken libName getEntry IBuildPropertiesConstants PROPERTY_OUTPUT_PREFIX libName getEntry IBuildPropertiesConstants PROPERTY_BIN_INCLUDES libName removeToken libName getEntry IBuildPropertiesConstants PROPERTY_BIN_EXCLUDES libName removeToken libName getEntry IBuildEntry JAR_PREFIX libName CoreException PDEPlugin logException
private void handle Delete Folder int index f Folder Viewer get Table get Selection Index Object object I Structured Selection f Folder Viewer get Selection get First Element if object null String lib Key f Current Library get Name I Build Entry entry get Build Model get Build get Entry lib Key if entry null try String tokens entry get Tokens if tokens length index 1 f Current Selection new Structured Selection tokens index 1 else f Current Selection null f Current Library entry entry remove Token String object catch Core Exception e PDE Plugin log Exception e  handleDeleteFolder fFolderViewer getTable getSelectionIndex IStructuredSelection fFolderViewer getSelection getFirstElement libKey fCurrentLibrary getName IBuildEntry getBuildModel getBuild getEntry libKey getTokens fCurrentSelection StructuredSelection fCurrentSelection fCurrentLibrary removeToken CoreException PDEPlugin logException
public boolean select Viewer viewer Object parent Element Object element if element instanceof I Project return I Project element equals project return element instanceof I Folder  parentElement IProject IProject IFolder
public I Status validate Object selection if selection null selection length 1 selection 0 instanceof I Folder return new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR null NON NLS 1 String lib Key f Current Library get Name I Build Entry entry get Build Model get Build get Entry lib Key String folder Path I Folder selection 0 get Project Relative Path add Trailing Separator to String if entry null entry contains folder Path return new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR PDE Plugin get Resource String Build Editor Runtime Info Section duplicate Folder NON NLS 1 null return new Status I Status OK PDE Plugin get Plugin Id I Status OK null NON NLS 1  IStatus IFolder IStatus PDEPlugin getPluginId IStatus libKey fCurrentLibrary getName IBuildEntry getBuildModel getBuild getEntry libKey folderPath IFolder getProjectRelativePath addTrailingSeparator toString folderPath IStatus PDEPlugin getPluginId IStatus PDEPlugin getResourceString BuildEditor RuntimeInfoSection duplicateFolder IStatus PDEPlugin getPluginId IStatus
private void handle New Folder I File file I File get Build Model get Underlying Resource final I Project project file get Project Folder Selection Dialog dialog new Folder Selection Dialog PDE Plugin get Active Workbench Shell new Workbench Label Provider new Jars New Content Provider dialog set Input project get Workspace dialog add Filter new Viewer Filter public boolean select Viewer viewer Object parent Element Object element if element instanceof I Project return I Project element equals project return element instanceof I Folder dialog set Allow Multiple false dialog set Title PDE Plugin get Resource String Manifest Editor Jars Section dialog Title NON NLS 1 dialog set Message PDE Plugin get Resource String Manifest Editor Jars Section dialog Message NON NLS 1 dialog set Validator new I Selection Status Validator public I Status validate Object selection if selection null selection length 1 selection 0 instanceof I Folder return new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR null NON NLS 1 String lib Key f Current Library get Name I Build Entry entry get Build Model get Build get Entry lib Key String folder Path I Folder selection 0 get Project Relative Path add Trailing Separator to String if entry null entry contains folder Path return new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR PDE Plugin get Resource String Build Editor Runtime Info Section duplicate Folder NON NLS 1 null return new Status I Status OK PDE Plugin get Plugin Id I Status OK null NON NLS 1 if dialog open Folder Selection Dialog OK try I Folder folder I Folder dialog get First Result String folder Path folder get Project Relative Path add Trailing Separator to String I Build Model build Model get Build Model String lib Key f Current Library get Name I Build Entry entry build Model get Build get Entry lib Key f Current Selection new Structured Selection folder Path entry add Token folder Path refresh Output Keys catch Core Exception e PDE Plugin log Exception e  handleNewFolder IFile IFile getBuildModel getUnderlyingResource IProject getProject FolderSelectionDialog FolderSelectionDialog PDEPlugin getActiveWorkbenchShell WorkbenchLabelProvider JarsNewContentProvider setInput getWorkspace addFilter ViewerFilter parentElement IProject IProject IFolder setAllowMultiple setTitle PDEPlugin getResourceString ManifestEditor JarsSection dialogTitle setMessage PDEPlugin getResourceString ManifestEditor JarsSection dialogMessage setValidator ISelectionStatusValidator IStatus IFolder IStatus PDEPlugin getPluginId IStatus libKey fCurrentLibrary getName IBuildEntry getBuildModel getBuild getEntry libKey folderPath IFolder getProjectRelativePath addTrailingSeparator toString folderPath IStatus PDEPlugin getPluginId IStatus PDEPlugin getResourceString BuildEditor RuntimeInfoSection duplicateFolder IStatus PDEPlugin getPluginId IStatus FolderSelectionDialog IFolder IFolder getFirstResult folderPath getProjectRelativePath addTrailingSeparator toString IBuildModel buildModel getBuildModel libKey fCurrentLibrary getName IBuildEntry buildModel getBuild getEntry libKey fCurrentSelection StructuredSelection folderPath addToken folderPath refreshOutputKeys CoreException PDEPlugin logException
protected void handle Down int index f Library Viewer get Table get Selection Index String item1 I Build Entry f Library Viewer get Element At index get Name substring 7 String item2 I Build Entry f Library Viewer get Element At index 1 get Name substring 7 update Jars Compile Order item1 item2  handleDown fLibraryViewer getTable getSelectionIndex IBuildEntry fLibraryViewer getElementAt getName IBuildEntry fLibraryViewer getElementAt getName updateJarsCompileOrder
protected void handle Up int index f Library Viewer get Table get Selection Index String item1 I Build Entry f Library Viewer get Element At index get Name substring 7 String item2 I Build Entry f Library Viewer get Element At index 1 get Name substring 7 update Jars Compile Order item1 item2  handleUp fLibraryViewer getTable getSelectionIndex IBuildEntry fLibraryViewer getElementAt getName IBuildEntry fLibraryViewer getElementAt getName updateJarsCompileOrder
public void update Jars Compile Order String library1 String library2 I Build Model model get Build Model I Build build model get Build I Build Entry jar Order Entry build get Entry I Build Properties Constants PROPERTY JAR ORDER try if jar Order Entry null jar Order Entry model get Factory create Entry I Build Properties Constants PROPERTY JAR ORDER build add jar Order Entry else String tokens jar Order Entry get Tokens for int i 0 i tokens length i jar Order Entry remove Token tokens i int num Lib f Library Viewer get Table get Item Count String names new String num Lib for int i 0 i num Lib i String name I Build Entry f Library Viewer get Element At i get Name substring 7 if name equals library1 name library2 else if name equals library2 name library1 names i name for int i 0 i num Lib i jar Order Entry add Token names i catch Core Exception e PDE Plugin log Exception e  updateJarsCompileOrder IBuildModel getBuildModel IBuild getBuild IBuildEntry jarOrderEntry getEntry IBuildPropertiesConstants PROPERTY_JAR_ORDER jarOrderEntry jarOrderEntry getFactory createEntry IBuildPropertiesConstants PROPERTY_JAR_ORDER jarOrderEntry jarOrderEntry getTokens jarOrderEntry removeToken numLib fLibraryViewer getTable getItemCount numLib numLib IBuildEntry fLibraryViewer getElementAt getName numLib jarOrderEntry addToken CoreException PDEPlugin logException
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event WORLD CHANGED mark Stale Object change Object event get Changed Objects 0 String key Name event get Changed Property int type event get Change Type check if model change applies to this section if change Object instanceof I Build Entry I Build Entry change Object get Name starts With I Build Entry JAR PREFIX I Build Entry change Object get Name equals I Build Properties Constants PROPERTY JAR ORDER I Build Entry change Object get Name equals I Build Properties Constants PROPERTY BIN INCLUDES return final I Build Entry entry I Build Entry change Object if key Name null key Name equals I Build Properties Constants PROPERTY BIN INCLUDES if f Current Library null return if event get Old Value null event get New Value null added removed token boolean is In Bin Build entry contains f Current Library get Name substring 7 f Include Library Button set Selection is In Bin Build return if type I Model Changed Event INSERT account for new key f Library Viewer refresh if f Current Selection null f Library Viewer set Selection f Current Selection f Include Library Button set Selection true update Directional Buttons else f Folder Part set Button Enabled 0 false f Library Viewer set Selection null f Folder Viewer set Input null f Include Library Button set Visible false else if type I Model Changed Event REMOVE account for key removal f Library Viewer remove entry f Library Viewer refresh f Folder Part set Button Enabled 0 false f Library Viewer set Selection null f Folder Viewer set Input null f Include Library Button set Visible false else if key Name null key Name starts With I Build Entry JAR PREFIX modification to source libname jar renaming token if event get Old Value null event get New Value null f Library Viewer update entry null return else add remove source folder refresh if f Current Selection null f Folder Viewer set Selection f Current Selection update Directional Buttons else f Folder Part set Button Enabled 0 false f Library Viewer set Selection null f Folder Viewer set Input null f Include Library Button set Visible false if f Current Library null update f Current Library else if key Name null key Name equals I Build Properties Constants PROPERTY JAR ORDER account for change in jars compile order if event get New Value null event get Old Value null removing token from jars compile order do nothing return if event get Old Value null event get New Value null renaming token from jars compile order do nothing return f Library Viewer refresh if f Current Library null f Library Viewer set Selection new Structured Selection f Current Library update Directional Buttons  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale changeObject getChangedObjects keyName getChangedProperty getChangeType changeObject IBuildEntry IBuildEntry changeObject getName startsWith IBuildEntry JAR_PREFIX IBuildEntry changeObject getName IBuildPropertiesConstants PROPERTY_JAR_ORDER IBuildEntry changeObject getName IBuildPropertiesConstants PROPERTY_BIN_INCLUDES IBuildEntry IBuildEntry changeObject keyName keyName IBuildPropertiesConstants PROPERTY_BIN_INCLUDES fCurrentLibrary getOldValue getNewValue isInBinBuild fCurrentLibrary getName fIncludeLibraryButton setSelection isInBinBuild IModelChangedEvent fLibraryViewer fCurrentSelection fLibraryViewer setSelection fCurrentSelection fIncludeLibraryButton setSelection updateDirectionalButtons fFolderPart setButtonEnabled fLibraryViewer setSelection fFolderViewer setInput fIncludeLibraryButton setVisible IModelChangedEvent fLibraryViewer fLibraryViewer fFolderPart setButtonEnabled fLibraryViewer setSelection fFolderViewer setInput fIncludeLibraryButton setVisible keyName keyName startsWith IBuildEntry JAR_PREFIX getOldValue getNewValue fLibraryViewer fCurrentSelection fFolderViewer setSelection fCurrentSelection updateDirectionalButtons fFolderPart setButtonEnabled fLibraryViewer setSelection fFolderViewer setInput fIncludeLibraryButton setVisible fCurrentLibrary fCurrentLibrary keyName keyName IBuildPropertiesConstants PROPERTY_JAR_ORDER getNewValue getOldValue getOldValue getNewValue fLibraryViewer fCurrentLibrary fLibraryViewer setSelection StructuredSelection fCurrentLibrary updateDirectionalButtons

public Src Section Build Page page Composite parent super page parent get Section set Text PDE Plugin get Resource String SECTION TITLE get Section set Description PDE Plugin get Resource String SECTION DESC  SrcSection BuildPage getSection setText PDEPlugin getResourceString SECTION_TITLE getSection setDescription PDEPlugin getResourceString SECTION_DESC
protected void initialize Check State super initialize Check State I Build build f Build Model get Build I Build Entry src Incl build get Entry I Build Properties Constants PROPERTY SRC INCLUDES I Build Entry src Excl build get Entry I Build Properties Constants PROPERTY SRC EXCLUDES if src Incl null return super initialize Check State src Incl src Excl  initializeCheckState initializeCheckState IBuild fBuildModel getBuild IBuildEntry srcIncl getEntry IBuildPropertiesConstants PROPERTY_SRC_INCLUDES IBuildEntry srcExcl getEntry IBuildPropertiesConstants PROPERTY_SRC_EXCLUDES srcIncl initializeCheckState srcIncl srcExcl
protected void delete Folder Children From Entries I Folder folder I Build build f Build Model get Build I Build Entry src Incl build get Entry I Build Properties Constants PROPERTY SRC INCLUDES I Build Entry src Excl build get Entry I Build Properties Constants PROPERTY SRC EXCLUDES String parent Folder get Resource Folder Name folder get Project Relative Path to String remove Children src Incl parent Folder remove Children src Excl parent Folder  deleteFolderChildrenFromEntries IFolder IBuild fBuildModel getBuild IBuildEntry srcIncl getEntry IBuildPropertiesConstants PROPERTY_SRC_INCLUDES IBuildEntry srcExcl getEntry IBuildPropertiesConstants PROPERTY_SRC_EXCLUDES parentFolder getResourceFolderName getProjectRelativePath toString removeChildren srcIncl parentFolder removeChildren srcExcl parentFolder
protected void handle Build Check State Change boolean was Top Parent Checked I Resource resource f Parent Resource String resource Name f Parent Resource get Full Path remove First Segments 1 to String I Build build f Build Model get Build I Build Entry includes build get Entry I Build Properties Constants PROPERTY SRC INCLUDES I Build Entry excludes build get Entry I Build Properties Constants PROPERTY SRC EXCLUDES resource Name handle Resource Folder resource resource Name if is Checked handle Check includes excludes resource Name resource was Top Parent Checked I Build Properties Constants PROPERTY SRC INCLUDES else handle Uncheck includes excludes resource Name resource I Build Properties Constants PROPERTY SRC EXCLUDES delete Empty Entries  handleBuildCheckStateChange wasTopParentChecked IResource fParentResource resourceName fParentResource getFullPath removeFirstSegments toString IBuild fBuildModel getBuild IBuildEntry getEntry IBuildPropertiesConstants PROPERTY_SRC_INCLUDES IBuildEntry getEntry IBuildPropertiesConstants PROPERTY_SRC_EXCLUDES resourceName handleResourceFolder resourceName isChecked handleCheck resourceName wasTopParentChecked IBuildPropertiesConstants PROPERTY_SRC_INCLUDES handleUncheck resourceName IBuildPropertiesConstants PROPERTY_SRC_EXCLUDES deleteEmptyEntries

public interface I Input Context Listener Informs the listener that a new context has been added This should result in a new source tab param context  IInputContextListener
void context Added Input Context context Informs the listener that the context has been removed This should result in removing the source tab param context  contextAdded InputContext
void context Removed Input Context context Informs the listener that a monitored file has been added param monitored File the file we were monitoring  contextRemoved InputContext monitoredFile
void monitored File Added I File monitored File Informs the listener that a monitored file has been removed param monitored File return code true code if it is OK to remove the associated context code false code otherwise  monitoredFileAdded IFile monitoredFile monitoredFile

class Element Listener implements I Element State Listener public void element Content About To Be Replaced Object element  ElementListener IElementStateListener elementContentAboutToBeReplaced
public void element Content About To Be Replaced Object element public void element Content Replaced Object element do Revert  elementContentAboutToBeReplaced elementContentReplaced doRevert
do Revert public void element Deleted Object element  doRevert elementDeleted
public void element Deleted Object element public void element Dirty State Changed Object element boolean is Dirty must Synchronize true  elementDeleted elementDirtyStateChanged isDirty mustSynchronize
must Synchronize true public void element Moved Object original Element Object moved Element editor close true  mustSynchronize elementMoved originalElement movedElement
public Input Context PDE Form Editor editor I Editor Input input boolean primary this editor editor this input input set Primary primary  InputContext PDEFormEditor IEditorInput setPrimary
set Primary primary public abstract String get Id  setPrimary getId
public abstract String get Id public I Editor Input get Input return input  getId IEditorInput getInput
return input public PDE Form Editor get Editor return editor  PDEFormEditor getEditor
return editor public I Base Model get Model return model  IBaseModel getModel
return model public I Document Provider get Document Provider return document Provider  IDocumentProvider getDocumentProvider documentProvider
document Provider new File Document Provider public I Document create Document Object element throws Core Exception I Document document super create Document element if document null I Document Partitioner partitioner create Document Partitioner if partitioner null partitioner connect document document set Document Partitioner partitioner return document  documentProvider FileDocumentProvider IDocument createDocument CoreException IDocument createDocument IDocumentPartitioner createDocumentPartitioner setDocumentPartitioner
protected I Document Provider create Document Provider I Editor Input input I Document Provider document Provider null if input instanceof I File Editor Input document Provider new File Document Provider public I Document create Document Object element throws Core Exception I Document document super create Document element if document null I Document Partitioner partitioner create Document Partitioner if partitioner null partitioner connect document document set Document Partitioner partitioner return document else if input instanceof System File Editor Input return new System File Document Provider create Document Partitioner get Default Charset else if input instanceof I Storage Editor Input document Provider new Storage Document Provider create Document Partitioner get Default Charset return document Provider  IDocumentProvider createDocumentProvider IEditorInput IDocumentProvider documentProvider IFileEditorInput documentProvider FileDocumentProvider IDocument createDocument CoreException IDocument createDocument IDocumentPartitioner createDocumentPartitioner setDocumentPartitioner SystemFileEditorInput SystemFileDocumentProvider createDocumentPartitioner getDefaultCharset IStorageEditorInput documentProvider StorageDocumentProvider createDocumentPartitioner getDefaultCharset documentProvider
protected I Document Partitioner create Document Partitioner return null  IDocumentPartitioner createDocumentPartitioner
protected abstract String get Default Charset  getDefaultCharset
protected abstract String get Default Charset protected abstract I Base Model create Model I Editor Input input throws Core Exception  getDefaultCharset IBaseModel createModel IEditorInput CoreException
model Listener new I Model Changed Listener public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED if editor get Last Dirty State editor fire Save Needed input true if f Is Source Mode I Model Change Provider provider e get Change Provider if provider instanceof I Editing Model this is to guard against false notifications when a revert operation is performed focus is taken away from a Form Entry and a text edit operation is falsely requested if I Editing Model provider is Dirty add Text Edit Operation f Edit Operations e  modelListener IModelChangedListener modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED getLastDirtyState fireSaveNeeded fIsSourceMode IModelChangeProvider getChangeProvider IEditingModel FormEntry IEditingModel isDirty addTextEditOperation fEditOperations
protected void create document Provider create Document Provider input if document Provider null return try document Provider connect input model create Model input if model instanceof I Model Change Provider model Listener new I Model Changed Listener public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED if editor get Last Dirty State editor fire Save Needed input true if f Is Source Mode I Model Change Provider provider e get Change Provider if provider instanceof I Editing Model this is to guard against false notifications when a revert operation is performed focus is taken away from a Form Entry and a text edit operation is falsely requested if I Editing Model provider is Dirty add Text Edit Operation f Edit Operations e I Model Change Provider model add Model Changed Listener model Listener I Annotation Model amodel document Provider get Annotation Model input if amodel null amodel connect document Provider get Document input element Listener new Element Listener document Provider add Element State Listener element Listener catch Core Exception e PDE Plugin log Exception e  documentProvider createDocumentProvider documentProvider documentProvider createModel IModelChangeProvider modelListener IModelChangedListener modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED getLastDirtyState fireSaveNeeded fIsSourceMode IModelChangeProvider getChangeProvider IEditingModel FormEntry IEditingModel isDirty addTextEditOperation fEditOperations IModelChangeProvider addModelChangedListener modelListener IAnnotationModel documentProvider getAnnotationModel documentProvider getDocument elementListener ElementListener documentProvider addElementStateListener elementListener CoreException PDEPlugin logException
public synchronized boolean validate Edit if validated if input instanceof I File Editor Input I File file I File Editor Input input get File if file is Read Only Shell shell editor get Editor Site get Shell I Status validate Status PDE Plugin get Workspace validate Edit new I File file shell validated true to prevent loops if validate Status get Severity I Status OK Error Dialog open Error shell editor get Title null validate Status return validate Status get Severity I Status OK return true  validateEdit IFileEditorInput IFile IFileEditorInput getFile isReadOnly getEditorSite getShell IStatus validateStatus PDEPlugin getWorkspace validateEdit IFile validateStatus getSeverity IStatus ErrorDialog openError getTitle validateStatus validateStatus getSeverity IStatus
public void do Save I Progress Monitor monitor Workspace Modify Operation op new Workspace Modify Operation public void execute final I Progress Monitor monitor throws Core Exception flush Model document Provider get Document input document Provider save Document monitor input document Provider get Document input true try document Provider about To Change input op run monitor document Provider changed input catch Interrupted Exception x catch Invocation Target Exception x PDE Plugin log Exception x Removed unnecessary usage of workspace modify operation as per defect 62225 try I Document doc document Provider get Document input document Provider about To Change input flush Model doc document Provider save Document monitor input doc true document Provider changed input validated false catch Core Exception e PDE Plugin log Exception e  doSave IProgressMonitor WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException flushModel documentProvider getDocument documentProvider saveDocument documentProvider getDocument documentProvider aboutToChange documentProvider InterruptedException InvocationTargetException PDEPlugin logException IDocument documentProvider getDocument documentProvider aboutToChange flushModel documentProvider saveDocument documentProvider CoreException PDEPlugin logException
protected abstract void add Text Edit Operation Array List ops I Model Changed Event event  addTextEditOperation ArrayList IModelChangedEvent
protected void flush Model I Document doc if f Edit Operations size 0 try Multi Text Edit edit new Multi Text Edit for int i 0 i f Edit Operations size i insert edit Text Edit f Edit Operations get i if model instanceof I Editing Model I Editing Model model set Stale true edit apply doc f Edit Operations clear if model instanceof I Editable I Editable model set Dirty false catch Malformed Tree Exception e PDE Plugin log Exception e catch Bad Location Exception e PDE Plugin log Exception e  flushModel IDocument fEditOperations MultiTextEdit MultiTextEdit fEditOperations TextEdit fEditOperations IEditingModel IEditingModel setStale fEditOperations IEditable IEditable setDirty MalformedTreeException PDEPlugin logException BadLocationException PDEPlugin logException
protected static void insert Text Edit parent Text Edit edit if parent has Children parent add Child edit if edit instanceof Move Source Edit parent add Child Move Source Edit edit get Target Edit return Text Edit children parent get Children First dive down to find the right parent for int i 0 i children length i Text Edit child children i if covers child edit insert child edit return We have the right parent Now check if some of the children have to be moved under the new edit since it is covering it for int i children length 1 i 0 i Text Edit child children i if covers edit child parent remove Child i edit add Child child parent add Child edit if edit instanceof Move Source Edit parent add Child Move Source Edit edit get Target Edit  TextEdit TextEdit hasChildren addChild MoveSourceEdit addChild MoveSourceEdit getTargetEdit TextEdit getChildren TextEdit TextEdit removeChild addChild addChild MoveSourceEdit addChild MoveSourceEdit getTargetEdit
protected static boolean covers Text Edit this Edit Text Edit other Edit if this Edit get Length 0 an insertion point can t cover anything return false int this Offset this Edit get Offset int this End this Edit get Exclusive End if other Edit get Length 0 int other Offset other Edit get Offset return this Offset other Offset other Offset this End else int other Offset other Edit get Offset int other End other Edit get Exclusive End return this Offset other Offset other End this End  TextEdit thisEdit TextEdit otherEdit thisEdit getLength thisOffset thisEdit getOffset thisEnd thisEdit getExclusiveEnd otherEdit getLength otherOffset otherEdit getOffset thisOffset otherOffset otherOffset thisEnd otherOffset otherEdit getOffset otherEnd otherEdit getExclusiveEnd thisOffset otherOffset otherEnd thisEnd
public boolean must Save if f Is Source Mode if model instanceof I Editable if I Editable model is Dirty return true return document Provider can Save Document input  mustSave fIsSourceMode IEditable IEditable isDirty documentProvider canSaveDocument
public void dispose I Annotation Model amodel document Provider get Annotation Model input if amodel null amodel disconnect document Provider get Document input document Provider remove Element State Listener element Listener document Provider disconnect input if model Listener null model instanceof I Model Change Provider I Model Change Provider model remove Model Changed Listener model Listener if undo Manager null undo Manager disconnect I Model Change Provider model if model null model dispose  IAnnotationModel documentProvider getAnnotationModel documentProvider getDocument documentProvider removeElementStateListener elementListener documentProvider modelListener IModelChangeProvider IModelChangeProvider removeModelChangedListener modelListener undoManager undoManager IModelChangeProvider
return Returns the primary public boolean is Primary return primary  isPrimary
param primary The primary to set public void set Primary boolean primary this primary primary  setPrimary
public boolean set Source Editing Mode boolean source Mode f Is Source Mode source Mode if source Mode entered source editing mode in this mode this context s document will be edited directly in the source editor All changes in the model are caused by reconciliation and should not be fired to the world flush Model document Provider get Document input must Synchronize true return true else leaving source editing mode if the document has been modified while in this mode fire the world changed event from the model to cause all the model listeners to become stale return synchronize Model If Needed  setSourceEditingMode sourceMode fIsSourceMode sourceMode sourceMode flushModel documentProvider getDocument mustSynchronize synchronizeModelIfNeeded
private boolean synchronize Model If Needed if must Synchronize boolean result synchronize Model document Provider get Document input must Synchronize false return result return true  synchronizeModelIfNeeded mustSynchronize synchronizeModel documentProvider getDocument mustSynchronize
public void do Revert must Synchronize true synchronize Model If Needed if model instanceof I Editable I Editable model set Dirty false  doRevert mustSynchronize synchronizeModelIfNeeded IEditable IEditable setDirty
public boolean is In Source Mode return f Is Source Mode  isInSourceMode fIsSourceMode
public boolean is Model Correct synchronize Model If Needed return model null model is Valid false  isModelCorrect synchronizeModelIfNeeded isValid
protected boolean synchronize Model I Document doc return true  synchronizeModel IDocument
public boolean matches I Resource resource if input instanceof I File Editor Input I File Editor Input finput I File Editor Input input I File file finput get File if file equals resource return true return false  IResource IFileEditorInput IFileEditorInput IFileEditorInput IFile getFile
return Returns the validated public boolean is Validated return validated  isValidated
param validated The validated to set public void set Validated boolean validated this validated validated  setValidated

private I Model Undo Manager undo Manager public Input Context Manager PDE Form Editor editor this editor editor input Contexts new Hashtable listeners new Array List PDE Plugin get Workspace add Resource Change Listener this I Resource Change Event POST CHANGE  IModelUndoManager undoManager InputContextManager PDEFormEditor inputContexts ArrayList PDEPlugin getWorkspace addResourceChangeListener IResourceChangeEvent POST_CHANGE
public void add Input Context Listener I Input Context Listener listener if listeners contains listener listeners add listener  addInputContextListener IInputContextListener
listeners add listener public void remove Input Context Listener I Input Context Listener listener listeners remove listener  removeInputContextListener IInputContextListener
public void dispose PDE Plugin get Workspace remove Resource Change Listener this dispose input contexts for Enumeration enum input Contexts elements enum has More Elements Input Context context Input Context enum next Element unhook Undo context context dispose input Contexts clear undo Manager null  PDEPlugin getWorkspace removeResourceChangeListener inputContexts hasMoreElements InputContext InputContext nextElement unhookUndo inputContexts undoManager
Saves dirty contexts param monitor public void save I Progress Monitor monitor for Enumeration enum input Contexts elements enum has More Elements Input Context context Input Context enum next Element if context must Save context do Save monitor  IProgressMonitor inputContexts hasMoreElements InputContext InputContext nextElement mustSave doSave
public I Project get Common Project for Enumeration enum input Contexts elements enum has More Elements Input Context context Input Context enum next Element I Editor Input input context get Input if input instanceof I File Editor Input return I File Editor Input input get File get Project return null  IProject getCommonProject inputContexts hasMoreElements InputContext InputContext nextElement IEditorInput getInput IFileEditorInput IFileEditorInput getFile getProject
return null public boolean has Context String id return find Context id null  hasContext findContext
public Input Context find Context String id for Enumeration enum input Contexts elements enum has More Elements Input Context context Input Context enum next Element if context get Id equals id return context return null  InputContext findContext inputContexts hasMoreElements InputContext InputContext nextElement getId
public Input Context find Context I Resource resource for Enumeration enum input Contexts elements enum has More Elements Input Context context Input Context enum next Element if context matches resource return context return null  InputContext findContext IResource inputContexts hasMoreElements InputContext InputContext nextElement
return null public I Base Model get Aggregate Model return null  IBaseModel getAggregateModel
return null public Input Context get Context I Editor Input input return Input Context input Contexts get input  InputContext getContext IEditorInput InputContext inputContexts
return Input Context input Contexts get input public void put Context I Editor Input input Input Context context input Contexts put input context fire Context Change context true  InputContext inputContexts putContext IEditorInput InputContext inputContexts fireContextChange
public Input Context get Primary Context for Enumeration enum input Contexts elements enum has More Elements Input Context context Input Context enum next Element if context is Primary return context return null  InputContext getPrimaryContext inputContexts hasMoreElements InputContext InputContext nextElement isPrimary
public Input Context get Invalid Contexts Array List result new Array List for Enumeration enum input Contexts elements enum has More Elements Input Context context Input Context enum next Element if context is Model Correct false result add context return Input Context result to Array new Input Context result size  InputContext getInvalidContexts ArrayList ArrayList inputContexts hasMoreElements InputContext InputContext nextElement isModelCorrect InputContext toArray InputContext
public boolean is Dirty for Enumeration enum input Contexts elements enum has More Elements Input Context context Input Context enum next Element if context must Save return true return false  isDirty inputContexts hasMoreElements InputContext InputContext nextElement mustSave
public void monitor File I File file if monitored Files null monitored Files new Array List monitored Files add file  monitorFile IFile monitoredFiles monitoredFiles ArrayList monitoredFiles
delta accept new I Resource Delta Visitor public boolean visit I Resource Delta delta int kind delta get Kind I Resource resource delta get Resource if resource instanceof I File if kind I Resource Delta ADDED async Structure Changed I File resource true else if kind I Resource Delta REMOVED async Structure Changed I File resource false return false return true  IResourceDeltaVisitor IResourceDelta getKind IResource getResource IFile IResourceDelta asyncStructureChanged IFile IResourceDelta asyncStructureChanged IFile
public void resource Changed I Resource Change Event event I Resource Delta delta event get Delta try delta accept new I Resource Delta Visitor public boolean visit I Resource Delta delta int kind delta get Kind I Resource resource delta get Resource if resource instanceof I File if kind I Resource Delta ADDED async Structure Changed I File resource true else if kind I Resource Delta REMOVED async Structure Changed I File resource false return false return true catch Core Exception e PDE Plugin log Exception e  resourceChanged IResourceChangeEvent IResourceDelta getDelta IResourceDeltaVisitor IResourceDelta getKind IResource getResource IFile IResourceDelta asyncStructureChanged IFile IResourceDelta asyncStructureChanged IFile CoreException PDEPlugin logException
return editor get Editor Site get Shell get Display async Exec new Runnable public void run structure Changed file added  getEditorSite getShell getDisplay asyncExec structureChanged
private void async Structure Changed final I File file final boolean added if editor null editor get Editor Site null return editor get Editor Site get Shell get Display async Exec new Runnable public void run structure Changed file added  asyncStructureChanged IFile getEditorSite getEditorSite getShell getDisplay asyncExec structureChanged
private void structure Changed I File file boolean added if monitored Files null return for int i 0 i monitored Files size i I File ifile I File monitored Files get i if ifile equals file if added fire Structure Change file true else fire Structure Change file false remove Context file  structureChanged IFile monitoredFiles monitoredFiles IFile IFile monitoredFiles fireStructureChange fireStructureChange removeContext
private void remove Context I File file for Enumeration enum input Contexts elements enum has More Elements Input Context context Input Context enum next Element I Editor Input input context get Input if input instanceof I File Editor Input I File Editor Input file Input I File Editor Input input if file equals file Input get File input Contexts remove input fire Context Change context false return  removeContext IFile inputContexts hasMoreElements InputContext InputContext nextElement IEditorInput getInput IFileEditorInput IFileEditorInput fileInput IFileEditorInput fileInput getFile inputContexts fireContextChange
protected void fire Structure Change I File file boolean added for int i 0 i listeners size i I Input Context Listener listener I Input Context Listener listeners get i if added listener monitored File Added file else listener monitored File Removed file  fireStructureChange IFile IInputContextListener IInputContextListener monitoredFileAdded monitoredFileRemoved
protected void fire Context Change Input Context context boolean added for int i 0 i listeners size i I Input Context Listener listener I Input Context Listener listeners get i if added listener context Added context else listener context Removed context if added hook Undo context else unhook Undo context  fireContextChange InputContext IInputContextListener IInputContextListener contextAdded contextRemoved hookUndo unhookUndo
unhook Undo context public void undo if undo Manager null undo Manager is Undoable undo Manager undo  unhookUndo undoManager undoManager isUndoable undoManager
public void redo if undo Manager null undo Manager is Redoable undo Manager redo  undoManager undoManager isRedoable undoManager
private void hook Undo Input Context context if undo Manager null return I Base Model model context get Model if model instanceof I Model Change Provider undo Manager connect I Model Change Provider model  hookUndo InputContext undoManager IBaseModel getModel IModelChangeProvider undoManager IModelChangeProvider
private void unhook Undo Input Context context if undo Manager null return I Base Model model context get Model if model instanceof I Model Change Provider undo Manager disconnect I Model Change Provider model  unhookUndo InputContext undoManager IBaseModel getModel IModelChangeProvider undoManager IModelChangeProvider
return Returns the undo Manager public I Model Undo Manager get Undo Manager return undo Manager  undoManager IModelUndoManager getUndoManager undoManager
param undo Manager The undo Manager to set public void set Undo Manager I Model Undo Manager undo Manager this undo Manager undo Manager  undoManager undoManager setUndoManager IModelUndoManager undoManager undoManager undoManager

public abstract class UTF8 Input Context extends Input Context param editor param input public UTF8 Input Context PDE Form Editor editor I Editor Input input boolean primary super editor input primary  UTF8InputContext InputContext UTF8InputContext PDEFormEditor IEditorInput
protected String get Default Charset return UTF 8 NON NLS 1  getDefaultCharset

param editor param input public XML Input Context PDE Form Editor editor I Editor Input input boolean primary super editor input primary  XMLInputContext PDEFormEditor IEditorInput
protected I Document Partitioner create Document Partitioner Default Partitioner partitioner new Default Partitioner new XML Partition Scanner new String XML Partition Scanner XML TAG XML Partition Scanner XML COMMENT return partitioner  IDocumentPartitioner createDocumentPartitioner DefaultPartitioner DefaultPartitioner XMLPartitionScanner XMLPartitionScanner XML_TAG XMLPartitionScanner XML_COMMENT
protected void add Text Edit Operation Array List ops I Model Changed Event event Object objects event get Changed Objects if objects null for int i 0 i objects length i Object object objects i switch event get Change Type case I Model Changed Event REMOVE if object instanceof I Document Node remove Node I Document Node object ops break case I Model Changed Event INSERT if object instanceof I Document Node insert Node I Document Node object ops break case I Model Changed Event CHANGE if object instanceof I Document Node I Document Node node I Document Node object I Document Attribute attr node get Document Attribute event get Changed Property if attr null add Attribute Operation attr ops event else if event get Old Value instanceof I Document Text Node add Element Content Operation I Document Text Node event get Old Value ops else if event get Old Value instanceof I Document Node event get New Value instanceof I Document Node swapping of nodes modify Node node ops event default break  addTextEditOperation ArrayList IModelChangedEvent getChangedObjects getChangeType IModelChangedEvent IDocumentNode removeNode IDocumentNode IModelChangedEvent IDocumentNode insertNode IDocumentNode IModelChangedEvent IDocumentNode IDocumentNode IDocumentNode IDocumentAttribute getDocumentAttribute getChangedProperty addAttributeOperation getOldValue IDocumentTextNode addElementContentOperation IDocumentTextNode getOldValue getOldValue IDocumentNode getNewValue IDocumentNode modifyNode
private void remove Node I Document Node node Array List ops delete previous op on this node if any Text Edit old Text Edit f Operation Table get node if old null ops remove old f Operation Table remove node Text Edit old Move Text Edit f Move Operations get node if old Move null ops remove old Move f Move Operations remove node if node has an offset delete it if node get Offset 1 Create a delete op for this node Text Edit op get Delete Node Operation node ops add op f Operation Table put node op else if old null old Move null No previous op on this non offset node just rewrite highest ancestor with an offset insert Node node ops  removeNode IDocumentNode ArrayList TextEdit TextEdit fOperationTable fOperationTable TextEdit oldMove TextEdit fMoveOperations oldMove oldMove fMoveOperations getOffset TextEdit getDeleteNodeOperation fOperationTable oldMove insertNode
private void insert Node I Document Node node Array List ops Text Edit op null node get Highest Node To Be Written node if node get Parent Node null op new Insert Edit 0 node write true else if node get Offset 1 this is an element that was of the form element it now needs to be broken up into element new element op new Replace Edit node get Offset node get Length node write false else try to insert after last sibling that has an offset op insert After Sibling node insert as first child of its parent if op null op insert As First Child node Text Edit old Text Edit f Operation Table get node if old null ops remove old ops add op f Operation Table put node op  insertNode IDocumentNode ArrayList TextEdit getHighestNodeToBeWritten getParentNode InsertEdit getOffset ReplaceEdit getOffset getLength insertAfterSibling insertAsFirstChild TextEdit TextEdit fOperationTable fOperationTable
private Insert Edit insert After Sibling I Document Node node I Document Node sibling node get Previous Sibling for if sibling null break if sibling get Offset 1 node set Line Indent sibling get Line Indent return new Insert Edit sibling get Offset sibling get Length System get Property line separator node write true NON NLS 1 sibling sibling get Previous Sibling return null  InsertEdit insertAfterSibling IDocumentNode IDocumentNode getPreviousSibling getOffset setLineIndent getLineIndent InsertEdit getOffset getLength getProperty getPreviousSibling
private Insert Edit insert As First Child I Document Node node int offset node get Parent Node get Offset int length get Next Position get Document Provider get Document get Input offset node set Line Indent node get Parent Node get Line Indent 3 return new Insert Edit offset length 1 System get Property line separator node write true NON NLS 1  InsertEdit insertAsFirstChild IDocumentNode getParentNode getOffset getNextPosition getDocumentProvider getDocument getInput setLineIndent getParentNode getLineIndent InsertEdit getProperty
private void modify Node I Document Node node Array List ops I Model Changed Event event I Document Node old Node I Document Node event get Old Value I Document Node new Node I Document Node event get New Value I Document Node node1 old Node get Previous Sibling null old Node equals new Node get Previous Sibling old Node new Node I Document Node node2 node1 equals old Node new Node old Node if node1 get Offset 0 node2 get Offset 2 Text Edit op Text Edit f Operation Table get node1 if op null node 1 has no rule so node 2 has no rule therefore rewrite parent ancestor insert Node node ops else swap order of insert operations Text Edit op2 Text Edit f Operation Table get node2 ops set ops index Of op op2 ops set ops index Of op2 op else if node1 get Offset 1 node2 get Offset 1 both nodes have offsets so create a move target source combo operation I Region region get Move Region node1 Move Source Edit source new Move Source Edit region get Offset region get Length region get Move Region node2 source set Target Edit new Move Target Edit region get Offset Move Source Edit op Move Source Edit f Move Operations get node1 if op null ops set ops index Of op source else op Move Source Edit f Move Operations get node2 if op null op get Target Edit get Offset source get Offset f Move Operations remove node2 ops remove op return ops add source f Move Operations put node1 source else one node with offset the other without offset Delete reinsert the one without offset insert Node node1 get Offset 0 node1 node2 ops  modifyNode IDocumentNode ArrayList IModelChangedEvent IDocumentNode oldNode IDocumentNode getOldValue IDocumentNode newNode IDocumentNode getNewValue IDocumentNode oldNode getPreviousSibling oldNode newNode getPreviousSibling oldNode newNode IDocumentNode oldNode newNode oldNode getOffset getOffset TextEdit TextEdit fOperationTable insertNode TextEdit TextEdit fOperationTable indexOf indexOf getOffset getOffset IRegion getMoveRegion MoveSourceEdit MoveSourceEdit getOffset getLength getMoveRegion setTargetEdit MoveTargetEdit getOffset MoveSourceEdit MoveSourceEdit fMoveOperations indexOf MoveSourceEdit fMoveOperations getTargetEdit getOffset getOffset fMoveOperations fMoveOperations insertNode getOffset
private I Region get Move Region I Document Node node int offset node get Offset int length node get Length int i 1 try I Document doc get Document Provider get Document get Input for i char ch doc get offset i 1 to Char Array 0 if Character is Whitespace ch i 1 break catch Bad Location Exception e return new Region offset i length i  IRegion getMoveRegion IDocumentNode getOffset getLength IDocument getDocumentProvider getDocument getInput toCharArray isWhitespace BadLocationException
private void add Attribute Operation I Document Attribute attr Array List ops I Model Changed Event event int offset attr get Value Offset Object new Value event get New Value Object changed Object attr Text Edit op null if offset 1 if new Value null new Value to String length 0 int length attr get Value Offset attr get Value Length 1 attr get Name Offset op get Attribute Delete Edit Operation attr get Name Offset length else op new Replace Edit offset attr get Value Length get Writable String event get New Value to String if op null I Document Node node attr get Enclosing Element I Document doc get Document Provider get Document get Input if node get Offset 1 changed Object node int len get Next Position doc node get Offset op new Replace Edit node get Offset len 1 node write Shallow should Terminate Element doc node get Offset len else insert Node node ops return Text Edit old Op Text Edit f Operation Table get changed Object if old Op null ops remove old Op ops add op f Operation Table put changed Object op  addAttributeOperation IDocumentAttribute ArrayList IModelChangedEvent getValueOffset newValue getNewValue changedObject TextEdit newValue newValue toString getValueOffset getValueLength getNameOffset getAttributeDeleteEditOperation getNameOffset ReplaceEdit getValueLength getWritableString getNewValue toString IDocumentNode getEnclosingElement IDocument getDocumentProvider getDocument getInput getOffset changedObject getNextPosition getOffset ReplaceEdit getOffset writeShallow shouldTerminateElement getOffset insertNode TextEdit oldOp TextEdit fOperationTable changedObject oldOp oldOp fOperationTable changedObject
private void add Element Content Operation I Document Text Node text Node Array List ops Text Edit op null Object changed Object text Node if text Node get Offset 1 String new Text get Writable String text Node get Text op new Replace Edit text Node get Offset text Node get Length new Text else I Document Node parent text Node get Enclosing Element if parent get Offset 1 I Document doc get Document Provider get Document get Input try String end Chars doc get parent get Offset parent get Length 2 2 if equals end Chars NON NLS 1 parent element is of the form element rewrite it insert Node parent ops return catch Bad Location Exception e add text as first child changed Object parent String Buffer buffer new String Buffer System get Property line separator NON NLS 1 for int i 0 i parent get Line Indent i buffer append NON NLS 1 buffer append get Writable String text Node get Text NON NLS 1 int offset parent get Offset int length get Next Position doc offset op new Insert Edit offset length 1 buffer to String else insert Node parent ops return Text Edit old Op Text Edit f Operation Table get changed Object if old Op null ops remove old Op ops add op f Operation Table put changed Object op  addElementContentOperation IDocumentTextNode textNode ArrayList TextEdit changedObject textNode textNode getOffset newText getWritableString textNode getText ReplaceEdit textNode getOffset textNode getLength newText IDocumentNode textNode getEnclosingElement getOffset IDocument getDocumentProvider getDocument getInput endChars getOffset getLength endChars insertNode BadLocationException changedObject StringBuffer StringBuffer getProperty getLineIndent getWritableString textNode getText getOffset getNextPosition InsertEdit toString insertNode TextEdit oldOp TextEdit fOperationTable changedObject oldOp oldOp fOperationTable changedObject
private boolean should Terminate Element I Document doc int offset try return doc get offset 1 1 to Char Array 0 catch Bad Location Exception e return false  shouldTerminateElement IDocument toCharArray BadLocationException
private int get Next Position I Document doc int offset char ch int i 0 try for i 0 i offset doc get Length i if ch doc get offset i 1 to Char Array 0 break catch Bad Location Exception e return i  getNextPosition IDocument getLength toCharArray BadLocationException
private Delete Edit get Attribute Delete Edit Operation int offset int length try I Document doc get Document Provider get Document get Input for char ch doc get offset length 1 to Char Array 0 if Character is Whitespace ch break length 1 catch Bad Location Exception e return new Delete Edit offset length  DeleteEdit getAttributeDeleteEditOperation IDocument getDocumentProvider getDocument getInput toCharArray isWhitespace BadLocationException DeleteEdit
private Delete Edit get Delete Node Operation I Document Node node int offset node get Offset int length node get Length int indent 0 try I Document doc get Document Provider get Document get Input int line doc get Line Of Offset offset length for char ch doc get offset length 1 to Char Array 0 if doc get Line Of Offset offset length line Character is Whitespace ch length 1 break length 1 for indent 1 indent node get Line Indent indent char ch doc get offset indent 1 to Char Array 0 if Character is Whitespace ch indent 1 break System out println get Document Provider get Document get Input get offset indent length indent catch Bad Location Exception e return new Delete Edit offset indent length indent  DeleteEdit getDeleteNodeOperation IDocumentNode getOffset getLength IDocument getDocumentProvider getDocument getInput getLineOfOffset toCharArray getLineOfOffset isWhitespace getLineIndent toCharArray isWhitespace getDocumentProvider getDocument getInput BadLocationException DeleteEdit
param node return private I Document Node get Highest Node To Be Written I Document Node node I Document Node parent node get Parent Node if parent null return node if parent get Offset 1 I Document doc get Document Provider get Document get Input try String end Chars doc get parent get Offset parent get Length 2 2 return equals end Chars parent node NON NLS 1 catch Bad Location Exception e return node return get Highest Node To Be Written parent  IDocumentNode getHighestNodeToBeWritten IDocumentNode IDocumentNode getParentNode getOffset IDocument getDocumentProvider getDocument getInput endChars getOffset getLength endChars BadLocationException getHighestNodeToBeWritten
protected void flush Model I Document doc remove Unnecessary Operations if f Operation Table size 1 Object object f Operation Table key Set iterator next if object instanceof I Document Node f Edit Operations get 0 instanceof Insert Edit if I Document Node object get Parent Node null doc set I Document Node object write true f Operation Table clear f Edit Operations clear return reorder Insert Edits f Edit Operations f Operation Table clear f Move Operations clear super flush Model doc  flushModel IDocument removeUnnecessaryOperations fOperationTable fOperationTable keySet IDocumentNode fEditOperations InsertEdit IDocumentNode getParentNode IDocumentNode fOperationTable fEditOperations reorderInsertEdits fEditOperations fOperationTable fMoveOperations flushModel
protected abstract void reorder Insert Edits Array List ops  reorderInsertEdits ArrayList
protected void remove Unnecessary Operations Iterator iter f Operation Table values iterator while iter has Next Object object iter next if object instanceof I Document Node I Document Node node I Document Node object if node get Offset 1 I Document Attribute attrs node get Node Attributes for int i 0 i attrs length i Object op f Operation Table remove attrs i if op null f Edit Operations remove op I Document Text Node text Node node get Text Node if text Node null Object op f Operation Table remove text Node if op null f Edit Operations remove op  removeUnnecessaryOperations fOperationTable hasNext IDocumentNode IDocumentNode IDocumentNode getOffset IDocumentAttribute getNodeAttributes fOperationTable fEditOperations IDocumentTextNode textNode getTextNode textNode fOperationTable textNode fEditOperations
public String get Writable String String source String Buffer buf new String Buffer for int i 0 i source length i char c source char At i switch c case buf append amp NON NLS 1 break case buf append lt NON NLS 1 break case buf append gt NON NLS 1 break case buf append apos NON NLS 1 break case buf append quot NON NLS 1 break default buf append c break return buf to String  getWritableString StringBuffer StringBuffer charAt toString
protected Hash Map get Operation Table return f Operation Table  HashMap getOperationTable fOperationTable

private Composite control public Empty Outline Page  EmptyOutlinePage
see org eclipse ui part I Page create Control org eclipse swt widgets Composite public void create Control Composite parent control new Composite parent SWT NULL  IPage createControl createControl
see org eclipse ui part I Page dispose public void dispose  IPage
see org eclipse ui part I Page get Control public Control get Control return control  IPage getControl getControl
see org eclipse ui part I Page set Action Bars org eclipse ui I Action Bars public void set Action Bars I Action Bars action Bars  IPage setActionBars IActionBars setActionBars IActionBars actionBars
see org eclipse ui part I Page set Focus public void set Focus  IPage setFocus setFocus
see org eclipse jface viewers I Selection Provider add Selection Changed Listener org eclipse jface viewers I Selection Changed Listener public void add Selection Changed Listener I Selection Changed Listener listener  ISelectionProvider addSelectionChangedListener ISelectionChangedListener addSelectionChangedListener ISelectionChangedListener
public I Selection get Selection return new I Selection public boolean is Empty return true  ISelection getSelection ISelection isEmpty
public I Selection get Selection return new I Selection public boolean is Empty return true  ISelection getSelection ISelection isEmpty
see org eclipse jface viewers I Selection Provider remove Selection Changed Listener org eclipse jface viewers I Selection Changed Listener public void remove Selection Changed Listener I Selection Changed Listener listener  ISelectionProvider removeSelectionChangedListener ISelectionChangedListener removeSelectionChangedListener ISelectionChangedListener
see org eclipse jface viewers I Selection Provider set Selection org eclipse jface viewers I Selection public void set Selection I Selection selection  ISelectionProvider setSelection ISelection setSelection ISelection

implements I Structured Content Provider public Object get Elements Object parent if parent instanceof I Feature return I Feature parent get Data return new Object 0  IStructuredContentProvider getElements IFeature IFeature getData
public Data Section Feature Advanced Page page Composite parent super page parent Section DESCRIPTION new String PDE Plugin get Resource String KEY NEW get Section set Text PDE Plugin get Resource String SECTION TITLE get Section set Description PDE Plugin get Resource String SECTION DESC get Table Part set Editable false set Collapsable true I Feature Model model I Feature Model page get Model I Feature feature model get Feature set Collapsed feature get Data length 0  DataSection FeatureAdvancedPage PDEPlugin getResourceString KEY_NEW getSection setText PDEPlugin getResourceString SECTION_TITLE getSection setDescription PDEPlugin getResourceString SECTION_DESC getTablePart setEditable setCollapsable IFeatureModel IFeatureModel getModel IFeature getFeature setCollapsed getData
public void commit boolean on Save super commit on Save  onSave onSave
public void create Client Section section Form Toolkit toolkit Composite container create Client Container section 2 toolkit Grid Layout layout Grid Layout container get Layout layout vertical Spacing 9 create Viewer Part Control container SWT MULTI 2 toolkit Table Part table Part get Table Part data Viewer table Part get Table Viewer data Viewer set Content Provider new Plugin Content Provider data Viewer set Label Provider PDE Plugin get Default get Label Provider toolkit paint Borders For container make Actions section set Client container initialize  createClient FormToolkit createClientContainer GridLayout GridLayout getLayout verticalSpacing createViewerPartControl TablePart tablePart getTablePart dataViewer tablePart getTableViewer dataViewer setContentProvider PluginContentProvider dataViewer setLabelProvider PDEPlugin getDefault getLabelProvider paintBordersFor makeActions setClient
protected void handle Double Click I Structured Selection selection open Action run  handleDoubleClick IStructuredSelection openAction
protected void button Selected int index if index 0 handle New  buttonSelected handleNew
public void dispose I Feature Model model I Feature Model get Page get Model if model null model remove Model Changed Listener this Workspace Model Manager mng PDE Core get Default get Workspace Model Manager mng remove Model Provider Listener this super dispose  IFeatureModel IFeatureModel getPage getModel removeModelChangedListener WorkspaceModelManager PDECore getDefault getWorkspaceModelManager removeModelProviderListener
public boolean set Form Input Object object if object instanceof I Feature Data data Viewer set Selection new Structured Selection object true return true return false  setFormInput IFeatureData dataViewer setSelection StructuredSelection
protected void fill Context Menu I Menu Manager manager manager add open Action manager add new Separator manager add new Action manager add delete Action manager add new Separator get Page getPDE Editor get Contributor context Menu About To Show manager manager add new Separator manager add properties Action  fillContextMenu IMenuManager openAction newAction deleteAction getPage getPDEEditor getContributor contextMenuAboutToShow propertiesAction
Busy Indicator show While data Viewer get Table get Display new Runnable public void run Resource Selection Dialog dialog new Resource Selection Dialog data Viewer get Table get Shell folder null dialog open Object result dialog get Result process New Result model folder result  BusyIndicator showWhile dataViewer getTable getDisplay ResourceSelectionDialog ResourceSelectionDialog dataViewer getTable getShell getResult processNewResult
private void handle New final I Feature Model model I Feature Model get Page get Model I Resource resource model get Underlying Resource final I Container folder resource get Parent Busy Indicator show While data Viewer get Table get Display new Runnable public void run Resource Selection Dialog dialog new Resource Selection Dialog data Viewer get Table get Shell folder null dialog open Object result dialog get Result process New Result model folder result  handleNew IFeatureModel IFeatureModel getPage getModel IResource getUnderlyingResource IContainer getParent BusyIndicator showWhile dataViewer getTable getDisplay ResourceSelectionDialog ResourceSelectionDialog dataViewer getTable getShell getResult processNewResult
private void process New Result I Feature Model model I Container folder Object result if result null result length 0 return I Path folder Path folder get Project Relative Path Array List entries new Array List for int i 0 i result length i Object item result i if item instanceof I File I File file I File item I Path file Path file get Project Relative Path int matching file Path matching First Segments folder Path I Path relative Path file Path remove First Segments matching entries add relative Path if entries size 0 try I Feature Data array new I Feature Data entries size for int i 0 i array length i I Feature Data data model get Factory create Data I Path path I Path entries get i data set Id path to String array i data model get Feature add Data array catch Core Exception e PDE Plugin log Exception e  processNewResult IFeatureModel IContainer IPath folderPath getProjectRelativePath ArrayList ArrayList IFile IFile IFile IPath filePath getProjectRelativePath filePath matchingFirstSegments folderPath IPath relativePath filePath removeFirstSegments relativePath IFeatureData IFeatureData IFeatureData getFactory createData IPath IPath setId toString getFeature addData CoreException PDEPlugin logException
private void handle Select All I Structured Content Provider provider I Structured Content Provider data Viewer get Content Provider Object elements provider get Elements data Viewer get Input Structured Selection ssel new Structured Selection elements data Viewer set Selection ssel  handleSelectAll IStructuredContentProvider IStructuredContentProvider dataViewer getContentProvider getElements dataViewer getInput StructuredSelection StructuredSelection dataViewer setSelection
private void handle Delete I Structured Selection ssel I Structured Selection data Viewer get Selection if ssel is Empty return I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature try I Feature Data removed new I Feature Data ssel size int i 0 for Iterator iter ssel iterator iter has Next I Feature Data iobj I Feature Data iter next removed i iobj feature remove Data removed catch Core Exception e PDE Plugin log Exception e  handleDelete IStructuredSelection IStructuredSelection dataViewer getSelection isEmpty IFeatureModel IFeatureModel getPage getModel IFeature getFeature IFeatureData IFeatureData hasNext IFeatureData IFeatureData removeData CoreException PDEPlugin logException
if action Id equals Action Factory DELETE get Id Busy Indicator show While data Viewer get Table get Display new Runnable public void run handle Delete  actionId ActionFactory getId BusyIndicator showWhile dataViewer getTable getDisplay handleDelete
if action Id equals Action Factory SELECT ALL get Id Busy Indicator show While data Viewer get Table get Display new Runnable public void run handle Select All  actionId ActionFactory SELECT_ALL getId BusyIndicator showWhile dataViewer getTable getDisplay handleSelectAll
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id Busy Indicator show While data Viewer get Table get Display new Runnable public void run handle Delete return true if action Id equals Action Factory SELECT ALL get Id Busy Indicator show While data Viewer get Table get Display new Runnable public void run handle Select All return true if action Id equals Action Factory CUT get Id delete here and let the editor transfer the selection to the clipboard handle Delete return false if action Id equals Action Factory PASTE get Id do Paste return true return false  doGlobalAction actionId actionId ActionFactory getId BusyIndicator showWhile dataViewer getTable getDisplay handleDelete actionId ActionFactory SELECT_ALL getId BusyIndicator showWhile dataViewer getTable getDisplay handleSelectAll actionId ActionFactory getId handleDelete actionId ActionFactory getId doPaste
return false protected void selection Changed I Structured Selection selection get Page getPDE Editor set Selection selection  selectionChanged IStructuredSelection getPage getPDEEditor setSelection
public void initialize I Feature Model model I Feature Model get Page get Model refresh get Table Part set Button Enabled 0 model is Editable model add Model Changed Listener this Workspace Model Manager mng PDE Core get Default get Workspace Model Manager mng add Model Provider Listener this  IFeatureModel IFeatureModel getPage getModel getTablePart setButtonEnabled isEditable addModelChangedListener WorkspaceModelManager PDECore getDefault getWorkspaceModelManager addModelProviderListener
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED mark Stale return else Object obj e get Changed Objects 0 if obj instanceof I Feature Data obj instanceof I Feature Plugin if e get Change Type I Model Changed Event CHANGE data Viewer update obj null else if e get Change Type I Model Changed Event INSERT data Viewer add e get Changed Objects else if e get Change Type I Model Changed Event REMOVE data Viewer remove e get Changed Objects  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale getChangedObjects IFeatureData IFeaturePlugin getChangeType IModelChangedEvent dataViewer getChangeType IModelChangedEvent dataViewer getChangedObjects getChangeType IModelChangedEvent dataViewer getChangedObjects
I Model model I Model get Page get Model new Action new Action public void run handle New  IModel IModel getPage getModel newAction handleNew
public void run Busy Indicator show While data Viewer get Table get Display new Runnable public void run handle Delete  BusyIndicator showWhile dataViewer getTable getDisplay handleDelete
delete Action new Action public void run Busy Indicator show While data Viewer get Table get Display new Runnable public void run handle Delete  deleteAction BusyIndicator showWhile dataViewer getTable getDisplay handleDelete
private void make Actions I Model model I Model get Page get Model new Action new Action public void run handle New new Action set Text PDE Plugin get Resource String POPUP NEW new Action set Enabled model is Editable delete Action new Action public void run Busy Indicator show While data Viewer get Table get Display new Runnable public void run handle Delete delete Action set Enabled model is Editable delete Action set Text PDE Plugin get Resource String POPUP DELETE open Action new Open Reference Action data Viewer properties Action new Properties Action get Page getPDE Editor  makeActions IModel IModel getPage getModel newAction handleNew newAction setText PDEPlugin getResourceString POPUP_NEW newAction setEnabled isEditable deleteAction BusyIndicator showWhile dataViewer getTable getDisplay handleDelete deleteAction setEnabled isEditable deleteAction setText PDEPlugin getResourceString POPUP_DELETE openAction OpenReferenceAction dataViewer propertiesAction PropertiesAction getPage getPDEEditor
public void models Changed I Model Provider Event event mark Stale  modelsChanged IModelProviderEvent markStale
public void set Focus if data Viewer null data Viewer get Table set Focus  setFocus dataViewer dataViewer getTable setFocus
public void refresh I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature data Viewer set Input feature super refresh  IFeatureModel IFeatureModel getPage getModel IFeature getFeature dataViewer setInput
see org eclipse pde internal ui editor Structured Viewer Section can Paste Object Object protected boolean can Paste Object target Object objects for int i 0 i objects length i if objects i instanceof Feature Plugin objects i instanceof Feature Data return false return true  StructuredViewerSection canPaste canPaste FeaturePlugin FeatureData
see org eclipse pde internal ui editor Structured Viewer Section do Paste protected void do Paste Clipboard clipboard get Page getPDE Editor get Clipboard Model Data Transfer model Transfer Model Data Transfer get Instance Object objects Object clipboard get Contents model Transfer if objects null do Paste null objects  StructuredViewerSection doPaste doPaste getPage getPDEEditor getClipboard ModelDataTransfer modelTransfer ModelDataTransfer getInstance getContents modelTransfer doPaste
see org eclipse pde internal ui editor Structured Viewer Section do Paste Object Object protected void do Paste Object target Object objects I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature Feature Data f Data new Feature Data objects length try for int i 0 i objects length i if objects i instanceof Feature Data objects i instanceof Feature Plugin Feature Data fd Feature Data objects i fd set Model model fd set Parent feature f Data i fd feature add Data f Data catch Core Exception e PDE Plugin log Exception e  StructuredViewerSection doPaste doPaste IFeatureModel IFeatureModel getPage getModel IFeature getFeature FeatureData fData FeatureData FeatureData FeaturePlugin FeatureData FeatureData setModel setParent fData addData fData CoreException PDEPlugin logException

private Feature Editor active Editor private I File feature File public Editor Build Feature Action set Text PDE Plugin get Resource String LABEL  FeatureEditor activeEditor IFile featureFile EditorBuildFeatureAction setText PDEPlugin getResourceString
try I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor active Editor do Save monitor  IRunnableWithProgress IRunnableWithProgress IProgressMonitor activeEditor doSave
private void ensure Content Saved if active Editor is Dirty try I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor active Editor do Save monitor PlatformUI get Workbench get Progress Service run InUI PDE Plugin get Active Workbench Window op PDE Plugin get Workspace get Root catch Invocation Target Exception e PDE Plugin log Exception e catch Interrupted Exception e  ensureContentSaved activeEditor isDirty IRunnableWithProgress IRunnableWithProgress IProgressMonitor activeEditor doSave getWorkbench getProgressService runInUI PDEPlugin getActiveWorkbenchWindow PDEPlugin getWorkspace getRoot InvocationTargetException PDEPlugin logException InterruptedException
public void run ensure Content Saved Feature Export Wizard wizard new Feature Export Wizard I Structured Selection selection if feature File null selection new Structured Selection feature File else selection new Structured Selection wizard init PlatformUI get Workbench selection Wizard Dialog wd new Resizable Wizard Dialog PDE Plugin get Active Workbench Shell wizard wd create wd open  ensureContentSaved FeatureExportWizard FeatureExportWizard IStructuredSelection featureFile StructuredSelection featureFile StructuredSelection getWorkbench WizardDialog ResizableWizardDialog PDEPlugin getActiveWorkbenchShell
public void set Active Editor Feature Editor editor this active Editor editor I Feature Model model I Feature Model editor get Aggregate Model feature File I File model get Underlying Resource set Enabled model is Editable  setActiveEditor FeatureEditor activeEditor IFeatureModel IFeatureModel getAggregateModel featureFile IFile getUnderlyingResource setEnabled isEditable

private Image error Image public Feature Adapter Factory error Image PDE Plugin Images DESC ERROR ST OBJ create Image  errorImage FeatureAdapterFactory errorImage PDEPluginImages DESC_ERROR_ST_OBJ createImage
error Image PDE Plugin Images DESC ERROR ST OBJ create Image public void dispose error Image dispose  errorImage PDEPluginImages DESC_ERROR_ST_OBJ createImage errorImage
public Object get Adapter Object adaptable Object Class adapter Type if adapter Type equals I Property Source class return get Properties adaptable Object return null  getAdapter adaptableObject adapterType adapterType IPropertySource getProperties adaptableObject
return null public Class get Adapter List return new Class I Property Source class  getAdapterList IPropertySource
private I Property Source get Properties Object object if object instanceof I FeatureURL Element return getURL Properties I FeatureURL Element object if object instanceof I Feature Plugin return get Reference Properties I Feature Plugin object if object instanceof I Feature Data return get Data Properties I Feature Data object if object instanceof I Feature Child return get Child Properties I Feature Child object return null  IPropertySource getProperties IFeatureURLElement getURLProperties IFeatureURLElement IFeaturePlugin getReferenceProperties IFeaturePlugin IFeatureData getDataProperties IFeatureData IFeatureChild getChildProperties IFeatureChild
return null private I Property Source get Reference Properties I Feature Plugin ref return new Reference Property Source ref error Image  IPropertySource getReferenceProperties IFeaturePlugin ReferencePropertySource errorImage
return new Reference Property Source ref error Image private I Property Source getURL Properties I FeatureURL Element element return new URL Element Property Source element  ReferencePropertySource errorImage IPropertySource getURLProperties IFeatureURLElement URLElementPropertySource
private I Property Source get Data Properties I Feature Data data return new Feature Entry Property Source data  IPropertySource getDataProperties IFeatureData FeatureEntryPropertySource
private I Property Source get Child Properties I Feature Child child return new Feature Child Property Source child  IPropertySource getChildProperties IFeatureChild FeatureChildPropertySource

private Handler Section handler Section public Feature Advanced Page PDE Form Editor editor String title super editor PAGE ID title  HandlerSection handlerSection FeatureAdvancedPage PDEFormEditor PAGE_ID
protected void create Form Content I Managed Form managed Form super create Form Content managed Form Scrolled Form form managed Form get Form Form Toolkit toolkit managed Form get Toolkit Grid Layout layout new Grid Layout form get Body set Layout layout layout num Columns 2 layout make Columns Equal Width true layout margin Width 10 layout horizontal Spacing 15 layout vertical Spacing 15 Grid Data gd Composite left toolkit create Composite form get Body layout new Grid Layout layout margin Width layout margin Height 0 left set Layout layout gd new Grid Data Grid Data FILL BOTH left set Layout Data gd Composite right toolkit create Composite form get Body layout new Grid Layout layout margin Width layout margin Height 0 right set Layout layout gd new Grid Data Grid Data FILL BOTH right set Layout Data gd included Section new Included Features Section this left gd new Grid Data Grid Data FILL BOTH included Section get Section set Layout Data gd data Section new Data Section this right gd new Grid Data Grid Data FILL BOTH data Section get Section set Layout Data gd handler Section new Handler Section this right gd new Grid Data Grid Data FILL BOTH handler Section get Section set Layout Data gd managed Form add Part included Section managed Form add Part data Section managed Form add Part handler Section Workbench Help set Help form get Body I Help Context Ids MANIFEST FEATURE ADVANCED initialize  createFormContent IManagedForm managedForm createFormContent managedForm ScrolledForm managedForm getForm FormToolkit managedForm getToolkit GridLayout GridLayout getBody setLayout numColumns makeColumnsEqualWidth marginWidth horizontalSpacing verticalSpacing GridData createComposite getBody GridLayout marginWidth marginHeight setLayout GridData GridData FILL_BOTH setLayoutData createComposite getBody GridLayout marginWidth marginHeight setLayout GridData GridData FILL_BOTH setLayoutData includedSection IncludedFeaturesSection GridData GridData FILL_BOTH includedSection getSection setLayoutData dataSection DataSection GridData GridData FILL_BOTH dataSection getSection setLayoutData handlerSection HandlerSection GridData GridData FILL_BOTH handlerSection getSection setLayoutData managedForm addPart includedSection managedForm addPart dataSection managedForm addPart handlerSection WorkbenchHelp setHelp getBody IHelpContextIds MANIFEST_FEATURE_ADVANCED
public void initialize get Managed Form get Form set Text PDE Plugin get Resource String KEY HEADING  getManagedForm getForm setText PDEPlugin getResourceString KEY_HEADING

private final static String P ARCH arch NON NLS 1 public Feature Child Property Source I Feature Child child super child  P_ARCH FeatureChildPropertySource IFeatureChild
protected void create Property Descriptors descriptors new Vector Property Descriptor desc create Text Property Descriptor P ID PDE Plugin get Resource String KEY ID descriptors add Element desc desc create Text Property Descriptor P VERSION PDE Plugin get Resource String KEY VERSION descriptors add Element desc desc create Text Property Descriptor P NAME PDE Plugin get Resource String KEY NAME descriptors add Element desc desc create Choice Property Descriptor P MATCH PDE Plugin get Resource String KEY MATCH I Match Rules RULE NAME TABLE descriptors add Element desc desc create Choice Property Descriptor P OPTIONAL PDE Plugin get Resource String KEY OPTIONAL new String false true NON NLS 1 NON NLS 2 descriptors add Element desc desc create Choice Property Descriptor P SEARCH LOCATION PDE Plugin get Resource String KEY SEARCH LOCATION new String root self both NON NLS 1 NON NLS 2 NON NLS 3 descriptors add Element desc Hiding this support for 2 1 desc create Choice Property Descriptor P OS P OS Target Platform getOS Choices descriptors add Element desc desc create Choice Property Descriptor P WS P WS Target Platform getWS Choices descriptors add Element desc desc create Choice Property Descriptor P ARCH P ARCH Target Platform get Arch Choices descriptors add Element desc  createPropertyDescriptors PropertyDescriptor createTextPropertyDescriptor P_ID PDEPlugin getResourceString KEY_ID addElement createTextPropertyDescriptor P_VERSION PDEPlugin getResourceString KEY_VERSION addElement createTextPropertyDescriptor P_NAME PDEPlugin getResourceString KEY_NAME addElement createChoicePropertyDescriptor P_MATCH PDEPlugin getResourceString KEY_MATCH IMatchRules RULE_NAME_TABLE addElement createChoicePropertyDescriptor P_OPTIONAL PDEPlugin getResourceString KEY_OPTIONAL addElement createChoicePropertyDescriptor P_SEARCH_LOCATION PDEPlugin getResourceString KEY_SEARCH_LOCATION addElement createChoicePropertyDescriptor P_OS P_OS TargetPlatform getOSChoices addElement createChoicePropertyDescriptor P_WS P_WS TargetPlatform getWSChoices addElement createChoicePropertyDescriptor P_ARCH P_ARCH TargetPlatform getArchChoices addElement
public I Feature Child get Child return I Feature Child object  IFeatureChild getChild IFeatureChild
public I Property Descriptor get Property Descriptors if descriptors null create Property Descriptors return to Descriptor Array descriptors  IPropertyDescriptor getPropertyDescriptors createPropertyDescriptors toDescriptorArray
public Object get Property Value Object name if name equals P ID return get Nonzero Value get Child get Id if name equals P VERSION return get Nonzero Value get Child get Version if name equals P OPTIONAL return get Child is Optional new Integer 1 new Integer 0 if name equals P NAME return get Child get Name if name equals P SEARCH LOCATION int loc get Child get Search Location return new Integer loc if name equals P MATCH return new Integer get Child get Match if name equals P OS return get Child getOS if name equals P WS return get Child getWS if name equals P ARCH return get Child get Arch return null  getPropertyValue P_ID getNonzeroValue getChild getId P_VERSION getNonzeroValue getChild getVersion P_OPTIONAL getChild isOptional P_NAME getChild getName P_SEARCH_LOCATION getChild getSearchLocation P_MATCH getChild getMatch P_OS getChild P_WS getChild P_ARCH getChild getArch
private String get Nonzero Value Object obj return obj null obj to String NON NLS 1  getNonzeroValue toString
public void set Element I Feature Entry entry object entry  setElement IFeatureEntry
public void set Property Value Object name Object value String svalue value to String String real Value svalue null svalue length 0 null svalue try if name equals P ID get Child set Id real Value else if name equals P VERSION get Child set Version real Value else if name equals P NAME get Child set Name real Value else if name equals P OPTIONAL Integer index Integer value get Child set Optional index int Value 1 else if name equals P MATCH Integer index Integer value get Child set Match index int Value else if name equals P SEARCH LOCATION Integer index Integer value get Child set Search Location index int Value else if name equals P OS get Child setOS real Value else if name equals P WS get Child setWS real Value else if name equals P ARCH get Child set Arch real Value catch Core Exception e PDE Plugin log Exception e  setPropertyValue toString realValue P_ID getChild setId realValue P_VERSION getChild setVersion realValue P_NAME getChild setName realValue P_OPTIONAL getChild setOptional intValue P_MATCH getChild setMatch intValue P_SEARCH_LOCATION getChild setSearchLocation intValue P_OS getChild realValue P_WS getChild realValue P_ARCH getChild setArch realValue CoreException PDEPlugin logException

public static final String INFO PAGE TITLE Feature Editor Info Page title NON NLS 1 public Feature Editor  INFO_PAGE_TITLE FeatureEditor InfoPage FeatureEditor
protected void create Resource Contexts Input Context Manager manager I File Editor Input input I File file input get File I Project project file get Project I File build File null I File feature File null String name file get Name to Lower Case if name equals feature xml NON NLS 1 feature File file build File project get File build properties NON NLS 1 else if name equals build properties NON NLS 1 build File file feature File create Feature File project if feature File exists File Editor Input in new File Editor Input feature File manager put Context in new Feature Input Context this in file feature File if build File exists File Editor Input in new File Editor Input build File manager put Context in new Build Input Context this in file build File manager monitor File feature File manager monitor File build File  createResourceContexts InputContextManager IFileEditorInput IFile getFile IProject getProject IFile buildFile IFile featureFile getName toLowerCase featureFile buildFile getFile buildFile featureFile createFeatureFile featureFile FileEditorInput FileEditorInput featureFile putContext FeatureInputContext featureFile buildFile FileEditorInput FileEditorInput buildFile putContext BuildInputContext buildFile monitorFile featureFile monitorFile buildFile
protected Input Context Manager create Input Context Manager Feature Input Context Manager manager new Feature Input Context Manager this manager set Undo Manager new Feature Undo Manager this return manager  InputContextManager createInputContextManager FeatureInputContextManager FeatureInputContextManager setUndoManager FeatureUndoManager
public void monitored File Added I File file String name file get Name if name equals Ignore Case feature xml NON NLS 1 I Editor Input in new File Editor Input file input Context Manager put Context in new Feature Input Context this in false else if name equals Ignore Case build properties NON NLS 1 if input Context Manager has Context Build Input Context CONTEXT ID I Editor Input in new File Editor Input file input Context Manager put Context in new Build Input Context this in false  monitoredFileAdded IFile getName equalsIgnoreCase IEditorInput FileEditorInput inputContextManager putContext FeatureInputContext equalsIgnoreCase inputContextManager hasContext BuildInputContext CONTEXT_ID IEditorInput FileEditorInput inputContextManager putContext BuildInputContext
public boolean monitored File Removed I File file TODO may need to check with the user if there are unsaved changes in the model for the file that just got removed under us return true  monitoredFileRemoved IFile
return true public void context Added Input Context context add Source Page context get Id  contextAdded InputContext addSourcePage getId
public void context Removed Input Context context if context is Primary close true return I Form Page page find Page context get Id if page null remove Page context get Id  contextRemoved InputContext isPrimary IFormPage findPage getId removePage getId
protected void create System File Contexts Input Context Manager manager System File Editor Input input File file File input get Adapter File class File build File null File feature File null String name file get Name to Lower Case if name equals feature xml NON NLS 1 feature File file File dir file get Parent File build File new File dir build properties NON NLS 1 else if name equals build properties NON NLS 1 build File file File dir file get Parent File feature File create Feature File dir if feature File exists System File Editor Input in new System File Editor Input feature File manager put Context in new Feature Input Context this in file feature File if build File exists System File Editor Input in new System File Editor Input build File manager put Context in new Build Input Context this in file build File  createSystemFileContexts InputContextManager SystemFileEditorInput getAdapter buildFile featureFile getName toLowerCase featureFile getParentFile buildFile buildFile getParentFile featureFile createFeatureFile featureFile SystemFileEditorInput SystemFileEditorInput featureFile putContext FeatureInputContext featureFile buildFile SystemFileEditorInput SystemFileEditorInput buildFile putContext BuildInputContext buildFile
private File create Feature File File dir File plugin File new File dir plugin xml NON NLS 1 return plugin File  createFeatureFile pluginFile pluginFile
return plugin File private I File create Feature File I Project project I File feature File project get File feature xml NON NLS 1 return feature File  pluginFile IFile createFeatureFile IProject IFile featureFile getFile featureFile
protected void create Storage Contexts Input Context Manager manager I Storage Editor Input input String name input get Name to Lower Case if name equals build properties NON NLS 1 manager put Context input new Build Input Context this input true else if name starts With feature xml NON NLS 1 manager put Context input new Feature Input Context this input true  createStorageContexts InputContextManager IStorageEditorInput getName toLowerCase putContext BuildInputContext startsWith putContext FeatureInputContext
public boolean can Copy I Selection selection return true  canCopy ISelection
protected void add Pages try add Page new Feature Form Page this PDE Plugin get Resource String FEATURE PAGE TITLE add Page new Info Form Page this PDE Plugin get Resource String INFO PAGE TITLE add Page new Feature Reference Page this PDE Plugin get Resource String REFERENCE PAGE TITLE add Page new Feature Advanced Page this PDE Plugin get Resource String ADVANCED PAGE TITLE if input Context Manager has Context Build Input Context CONTEXT ID add Page new Build Page this catch Part Init Exception e PDE Plugin log Exception e add Source Page Feature Input Context CONTEXT ID add Source Page Build Input Context CONTEXT ID  addPages addPage FeatureFormPage PDEPlugin getResourceString FEATURE_PAGE_TITLE addPage InfoFormPage PDEPlugin getResourceString INFO_PAGE_TITLE addPage FeatureReferencePage PDEPlugin getResourceString REFERENCE_PAGE_TITLE addPage FeatureAdvancedPage PDEPlugin getResourceString ADVANCED_PAGE_TITLE inputContextManager hasContext BuildInputContext CONTEXT_ID addPage BuildPage PartInitException PDEPlugin logException addSourcePage FeatureInputContext CONTEXT_ID addSourcePage BuildInputContext CONTEXT_ID
protected String compute Initial Page Id String first Page Id super compute Initial Page Id if first Page Id null Input Context primary input Context Manager get Primary Context if primary get Id equals Feature Input Context CONTEXT ID first Page Id Feature Form Page PAGE ID if first Page Id null first Page Id Feature Form Page PAGE ID return first Page Id  computeInitialPageId firstPageId computeInitialPageId firstPageId InputContext inputContextManager getPrimaryContext getId FeatureInputContext CONTEXT_ID firstPageId FeatureFormPage PAGE_ID firstPageId firstPageId FeatureFormPage PAGE_ID firstPageId
protected PDE Source Page create Source Page PDE Form Editor editor String title String name String context Id if context Id equals Feature Input Context CONTEXT ID return new Feature Source Page editor title name if context Id equals Build Input Context CONTEXT ID return new Build Source Page editor title name return super create Source Page editor title name context Id  PDESourcePage createSourcePage PDEFormEditor contextId contextId FeatureInputContext CONTEXT_ID FeatureSourcePage contextId BuildInputContext CONTEXT_ID BuildSourcePage createSourcePage contextId
protected I Content Outline Page create Content Outline return new Feature Outline Page this  IContentOutlinePage createContentOutline FeatureOutlinePage
protected I Property Sheet Page get Property Sheet PDE Form Page page return null  IPropertySheetPage getPropertySheet PDEFormPage
public String get Title if is Model Correct get Aggregate Model return super get Title I Feature Model model I Feature Model get Aggregate Model String name get Title Text model get Feature if name null return super get Title return model get Resource String name  getTitle isModelCorrect getAggregateModel getTitle IFeatureModel IFeatureModel getAggregateModel getTitleText getFeature getTitle getResourceString
public String get Title Property I Preference Store store PDE Plugin get Default get Preference Store String pref store get String I Preference Constants PROP SHOW OBJECTS if pref null pref equals I Preference Constants VALUE USE NAMES return I Feature P LABEL else return I Feature P ID  getTitleProperty IPreferenceStore PDEPlugin getDefault getPreferenceStore getString IPreferenceConstants PROP_SHOW_OBJECTS IPreferenceConstants VALUE_USE_NAMES IFeature P_LABEL IFeature P_ID
private String get Title Text I Feature feature I Preference Store store PDE Plugin get Default get Preference Store String pref store get String I Preference Constants PROP SHOW OBJECTS if pref null pref equals I Preference Constants VALUE USE NAMES return feature get Label else return feature get Id  getTitleText IFeature IPreferenceStore PDEPlugin getDefault getPreferenceStore getString IPreferenceConstants PROP_SHOW_OBJECTS IPreferenceConstants VALUE_USE_NAMES getLabel getId
protected boolean is Model Correct Object model return model null I Feature Model model is Valid false  isModelCorrect IFeatureModel isValid
protected boolean has Known Types try Transfer Data types get Clipboard get Available Types Transfer transfers new Transfer Text Transfer get Instance RTF Transfer get Instance for int i 0 i types length i for int j 0 j transfers length j if transfers j is Supported Type types i return true catch SWT Error e return false  hasKnownTypes TransferData getClipboard getAvailableTypes TextTransfer getInstance RTFTransfer getInstance isSupportedType SWTError
public Object get Adapter Class key No property sheet needed block super if key equals I Property Sheet Page class return null return super get Adapter key  getAdapter IPropertySheetPage getAdapter

private Editor Build Feature Action build Action private Synchronize Versions Action synchronize Action public Feature Editor Contributor super Feature NON NLS 1  EditorBuildFeatureAction buildAction SynchronizeVersionsAction synchronizeAction FeatureEditorContributor
public void context Menu About To Show I Menu Manager mng super context Menu About To Show mng mng add new Separator mng add synchronize Action mng add build Action  contextMenuAboutToShow IMenuManager contextMenuAboutToShow synchronizeAction buildAction
mng add build Action public Action get Build Action return build Action  buildAction getBuildAction buildAction
return build Action public Action get Synchronize Action return synchronize Action  buildAction getSynchronizeAction synchronizeAction
protected void make Actions super make Actions build Action new Editor Build Feature Action synchronize Action new Synchronize Versions Action  makeActions makeActions buildAction EditorBuildFeatureAction synchronizeAction SynchronizeVersionsAction
public void set Active Editor I Editor Part target Editor super set Active Editor target Editor build Action set Active Editor Feature Editor target Editor synchronize Action set Active Editor Feature Editor target Editor  setActiveEditor IEditorPart targetEditor setActiveEditor targetEditor buildAction setActiveEditor FeatureEditor targetEditor synchronizeAction setActiveEditor FeatureEditor targetEditor
synchronize Action set Active Editor Feature Editor target Editor protected boolean has Known Types Clipboard clipboard return true  synchronizeAction setActiveEditor FeatureEditor targetEditor hasKnownTypes

private final static String P DOWNLOAD SIZE download size NON NLS 1 public Feature Entry Property Source I Feature Entry entry super entry  P_DOWNLOAD_SIZE FeatureEntryPropertySource IFeatureEntry
protected void create Property Descriptors descriptors new Vector Property Descriptor desc new Property Descriptor P ID PDE Plugin get Resource String KEY ID descriptors add Element desc desc create Text Property Descriptor P INSTALL SIZE PDE Plugin get Resource String KEY INSTALL SIZE descriptors add Element desc desc create Text Property Descriptor P DOWNLOAD SIZE PDE Plugin get Resource String KEY DOWNLOAD SIZE descriptors add Element desc desc create Choice Property Descriptor P OS P OS getOS Choices descriptors add Element desc desc create Choice Property Descriptor P WS P WS getWS Choices descriptors add Element desc desc create Choice Property Descriptor P NL P NL getNL Choices descriptors add Element desc desc create Choice Property Descriptor P ARCH P ARCH get Arch Choices descriptors add Element desc  createPropertyDescriptors PropertyDescriptor PropertyDescriptor P_ID PDEPlugin getResourceString KEY_ID addElement createTextPropertyDescriptor P_INSTALL_SIZE PDEPlugin getResourceString KEY_INSTALL_SIZE addElement createTextPropertyDescriptor P_DOWNLOAD_SIZE PDEPlugin getResourceString KEY_DOWNLOAD_SIZE addElement createChoicePropertyDescriptor P_OS P_OS getOSChoices addElement createChoicePropertyDescriptor P_WS P_WS getWSChoices addElement createChoicePropertyDescriptor P_NL P_NL getNLChoices addElement createChoicePropertyDescriptor P_ARCH P_ARCH getArchChoices addElement
public I Feature Entry get Entry return I Feature Entry object  IFeatureEntry getEntry IFeatureEntry
public I Property Descriptor get Property Descriptors if descriptors null create Property Descriptors return to Descriptor Array descriptors  IPropertyDescriptor getPropertyDescriptors createPropertyDescriptors toDescriptorArray
private Property Descriptor create Choice Property Descriptor String name String display Name Choice choices return new Portability Choice Descriptor name display Name choices is Editable  PropertyDescriptor createChoicePropertyDescriptor displayName PortabilityChoiceDescriptor displayName isEditable
public Object get Property Value Object name if name equals P ID return get Entry get Id if name equals P INSTALL SIZE long install Size get Entry get Install Size if install Size 1 return NON NLS 1 else return install Size NON NLS 1 if name equals P DOWNLOAD SIZE long download Size get Entry get Download Size if download Size 1 return NON NLS 1 else return download Size NON NLS 1 if name equals P OS return get Entry getOS if name equals P WS return get Entry getWS if name equals P NL return get Entry getNL if name equals P ARCH return get Entry get Arch return null  getPropertyValue P_ID getEntry getId P_INSTALL_SIZE installSize getEntry getInstallSize installSize installSize P_DOWNLOAD_SIZE downloadSize getEntry getDownloadSize downloadSize downloadSize P_OS getEntry P_WS getEntry P_NL getEntry P_ARCH getEntry getArch
return null public void set Element I Feature Entry entry object entry  setElement IFeatureEntry
public void set Property Value Object name Object value String svalue value to String String real Value svalue null svalue length 0 null svalue try if name equals P OS get Entry setOS real Value else if name equals P WS get Entry setWS real Value else if name equals P NL get Entry setNL real Value else if name equals P ARCH get Entry set Arch real Value else if name equals P DOWNLOAD SIZE long lvalue get Long real Value get Entry set Download Size lvalue else if name equals P INSTALL SIZE long lvalue get Long real Value get Entry set Install Size lvalue catch Core Exception e PDE Plugin log Exception e  setPropertyValue toString realValue P_OS getEntry realValue P_WS getEntry realValue P_NL getEntry realValue P_ARCH getEntry setArch realValue P_DOWNLOAD_SIZE getLong realValue getEntry setDownloadSize P_INSTALL_SIZE getLong realValue getEntry setInstallSize CoreException PDEPlugin logException
private long get Long String svalue if svalue null return 1 try return Long parse Long svalue catch Number Format Exception e return 1  getLong parseLong NumberFormatException
public static Choice getOS Choices return Target Platform getOS Choices  getOSChoices TargetPlatform getOSChoices
public static Choice getWS Choices return Target Platform getWS Choices  getWSChoices TargetPlatform getWSChoices
public static Choice get Arch Choices return Target Platform get Arch Choices  getArchChoices TargetPlatform getArchChoices
public static Choice getNL Choices return Target Platform getNL Choices  getNLChoices TargetPlatform getNLChoices

private Portability Section portability Section public Feature Form Page PDE Form Editor editor String title super editor PAGE ID title  PortabilitySection portabilitySection FeatureFormPage PDEFormEditor PAGE_ID
protected void create Form Content I Managed Form managed Form super create Form Content managed Form Scrolled Form form managed Form get Form Grid Layout layout new Grid Layout form get Body set Layout layout layout num Columns 2 layout margin Width 10 layout horizontal Spacing 15 layout vertical Spacing 15 Grid Data gd spec Section new Feature Spec Section this form get Body gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING spec Section get Section set Layout Data gd url Section new URL Section this form get Body gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN FILL url Section get Section set Layout Data gd portability Section new Portability Section this form get Body gd new Grid Data Grid Data FILL BOTH portability Section get Section set Layout Data gd managed Form add Part spec Section managed Form add Part url Section managed Form add Part portability Section Workbench Help set Help form get Body I Help Context Ids MANIFEST FEATURE OVERVIEW initialize  createFormContent IManagedForm managedForm createFormContent managedForm ScrolledForm managedForm getForm GridLayout GridLayout getBody setLayout numColumns marginWidth horizontalSpacing verticalSpacing GridData specSection FeatureSpecSection getBody GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING specSection getSection setLayoutData urlSection URLSection getBody GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_FILL urlSection getSection setLayoutData portabilitySection PortabilitySection getBody GridData GridData FILL_BOTH portabilitySection getSection setLayoutData managedForm addPart specSection managedForm addPart urlSection managedForm addPart portabilitySection WorkbenchHelp setHelp getBody IHelpContextIds MANIFEST_FEATURE_OVERVIEW
public void initialize I Feature Model model I Feature Model get Model I Feature feature model get Feature get Managed Form get Form set Text model get Resource String feature get Label  IFeatureModel IFeatureModel getModel IFeature getFeature getManagedForm getForm setText getResourceString getLabel

public static final String CONTEXT ID feature context NON NLS 1 param editor param input param primary public Feature Input Context PDE Form Editor editor I Editor Input input boolean primary super editor input primary create  CONTEXT_ID FeatureInputContext PDEFormEditor IEditorInput
see org eclipse pde internal ui neweditor context Input Context get Id public String get Id return CONTEXT ID  InputContext getId getId CONTEXT_ID
protected I Base Model create Model I Editor Input input throws Core Exception if input instanceof I File Editor Input return create Resource Model I File Editor Input input if input instanceof I Storage Editor Input return create Storage Model I Storage Editor Input input return null  IBaseModel createModel IEditorInput CoreException IFileEditorInput createResourceModel IFileEditorInput IStorageEditorInput createStorageModel IStorageEditorInput
private I Base Model create Resource Model I File Editor Input input throws Core Exception I File file input get File Workspace Feature Model model new Workspace Feature Model file model load return model  IBaseModel createResourceModel IFileEditorInput CoreException IFile getFile WorkspaceFeatureModel WorkspaceFeatureModel
private I Base Model create Storage Model I Storage Editor Input input throws Core Exception Input Stream stream null I Storage storage input get Storage try stream storage get Contents catch Core Exception e PDE Plugin log Exception e return null External Feature Model model new External Feature Model model set Install Location NON NLS 1 try model load stream false catch Core Exception e Errors in the file return null finally try stream close catch IO Exception e return model  IBaseModel createStorageModel IStorageEditorInput CoreException InputStream IStorage getStorage getContents CoreException PDEPlugin logException ExternalFeatureModel ExternalFeatureModel setInstallLocation CoreException IOException
see org eclipse pde internal ui neweditor context Input Context add Text Edit Operation java util Array List org eclipse pde core I Model Changed Event protected void add Text Edit Operation Array List ops I Model Changed Event event  InputContext addTextEditOperation ArrayList IModelChangedEvent addTextEditOperation ArrayList IModelChangedEvent
protected void flush Model I Document doc if model is dirty flush its content into the document so that the source editor will pick up the changes if get Model instanceof I Editable return I Editable editable Model I Editable get Model if editable Model is Dirty false return try String Writer swriter new String Writer Print Writer writer new Print Writer swriter editable Model save writer writer flush swriter close doc set swriter to String catch IO Exception e PDE Plugin log Exception e  flushModel IDocument getModel IEditable IEditable editableModel IEditable getModel editableModel isDirty StringWriter StringWriter PrintWriter PrintWriter editableModel toString IOException PDEPlugin logException
protected boolean synchronize Model I Document doc I Feature Model model I Feature Model get Model boolean clean Model true String text doc get try Input Stream stream new Byte Array Input Stream text get Bytes UTF8 NON NLS 1 try model reload stream false catch Core Exception e clean Model false try stream close catch IO Exception e catch Unsupported Encoding Exception e PDE Plugin log Exception e return clean Model  synchronizeModel IDocument IFeatureModel IFeatureModel getModel cleanModel InputStream ByteArrayInputStream getBytes CoreException cleanModel IOException UnsupportedEncodingException PDEPlugin logException cleanModel
see org eclipse pde internal ui neweditor context XML Input Context reorder Insert Edits java util Array List protected void reorder Insert Edits Array List ops  XMLInputContext reorderInsertEdits ArrayList reorderInsertEdits ArrayList

public class Feature Input Context Manager extends Input Context Manager public Feature Input Context Manager PDE Form Editor editor super editor  FeatureInputContextManager InputContextManager FeatureInputContextManager PDEFormEditor
public I Base Model get Aggregate Model return find Feature Model  IBaseModel getAggregateModel findFeatureModel
private I Base Model find Feature Model Input Context fcontext find Context Feature Input Context CONTEXT ID if fcontext null return fcontext get Model else return null  IBaseModel findFeatureModel InputContext findContext FeatureInputContext CONTEXT_ID getModel

Constructor for Feature Match Section param form Page public Feature Match Section PDE Form Page form Page Composite parent super form Page parent false  FeatureMatchSection formPage FeatureMatchSection PDEFormPage formPage formPage
patch Button set Selection false patch Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Patch Change patch Button get Selection  patchButton setSelection patchButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handlePatchChange patchButton getSelection
public void create Client Section section Form Toolkit toolkit super create Client section toolkit Composite client Composite section get Client patch Button toolkit create Button client PDE Plugin get Resource String Feature Match Section patch SWT CHECK NON NLS 1 Grid Data gd new Grid Data gd horizontal Span 2 patch Button set Layout Data gd patch Button set Enabled false patch Button set Selection false patch Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Patch Change patch Button get Selection  createClient FormToolkit createClient getClient patchButton createButton PDEPlugin getResourceString FeatureMatchSection GridData GridData horizontalSpan patchButton setLayoutData patchButton setEnabled patchButton setSelection patchButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handlePatchChange patchButton getSelection
private void handle Patch Change boolean patch if current Import null I Feature Import iimport I Feature Import current Import if iimport get Type I Feature Import FEATURE try iimport set Patch patch catch Core Exception e PDE Plugin log Exception e if multi Selection null for Iterator iter multi Selection iterator iter has Next I Feature Import iimport I Feature Import iter next try iimport set Patch patch catch Core Exception e PDE Plugin log Exception e break  handlePatchChange currentImport IFeatureImport IFeatureImport currentImport getType IFeatureImport setPatch CoreException PDEPlugin logException multiSelection multiSelection hasNext IFeatureImport IFeatureImport setPatch CoreException PDEPlugin logException
protected void update I Structured Selection selection super update selection if patch Button null return if selection is Empty update I Feature Import null return if selection get First Element instanceof I Feature Import return if selection size 1 update I Feature Import selection get First Element return int ntrue 0 nfalse 0 for Iterator iter selection iterator iter has Next I Feature Import iimport I Feature Import iter next if iimport get Type I Feature Import FEATURE if iimport is Patch ntrue else nfalse patch Button set Enabled is Editable ntrue 0 nfalse 0 patch Button set Selection ntrue 0  IStructuredSelection patchButton isEmpty IFeatureImport getFirstElement IFeatureImport IFeatureImport getFirstElement hasNext IFeatureImport IFeatureImport getType IFeatureImport isPatch patchButton setEnabled isEditable patchButton setSelection
protected void update I Plugin Reference reference super update reference if patch Button null return I Feature Import fimport I Feature Import reference if fimport null fimport get Type I Feature Import PLUGIN patch Button set Selection false patch Button set Enabled false return patch Button set Enabled get Page get Model is Editable patch Button set Selection fimport is Patch  IPluginReference patchButton IFeatureImport IFeatureImport getType IFeatureImport patchButton setSelection patchButton setEnabled patchButton setEnabled getPage getModel isEditable patchButton setSelection isPatch

class Content Provider extends Basic Content Provider public Object get Children Object parent I Feature Model model I Feature Model editor get Aggregate Model if model is Valid if parent instanceof Feature Form Page return getUR Ls if parent instanceof Info Form Page return get Infos if parent instanceof Feature Reference Page return new Object referenced Plugins required Plugins if parent equals required Plugins return get Imports if parent equals referenced Plugins return get References return super get Children parent  ContentProvider BasicContentProvider getChildren IFeatureModel IFeatureModel getAggregateModel isValid FeatureFormPage getURLs InfoFormPage getInfos FeatureReferencePage referencedPlugins requiredPlugins requiredPlugins getImports referencedPlugins getReferences getChildren
public Object get Parent Object child String page Id get Parent Page Id child if page Id null return editor find Page page Id return super get Parent child  getParent pageId getParentPageId pageId findPage pageId getParent
public Feature Outline Page PDE Form Editor editor super editor Image folder Image PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJ FOLDER required Plugins new Named Element PDE Plugin get Resource String KEY REQUIRED PLUGINS folder Image referenced Plugins new Named Element PDE Plugin get Resource String KEY REFERENCED PLUGINS folder Image  FeatureOutlinePage PDEFormEditor folderImage getWorkbench getSharedImages getImage ISharedImages IMG_OBJ_FOLDER requiredPlugins NamedElement PDEPlugin getResourceString KEY_REQUIRED_PLUGINS folderImage referencedPlugins NamedElement PDEPlugin getResourceString KEY_REFERENCED_PLUGINS folderImage
get Resource String KEY REFERENCED PLUGINS folder Image protected I Tree Content Provider create Content Provider return new Content Provider  getResourceString KEY_REFERENCED_PLUGINS folderImage ITreeContentProvider createContentProvider ContentProvider
public void create Control Composite parent super create Control parent I Feature Model model I Feature Model editor get Aggregate Model model add Model Changed Listener this  createControl createControl IFeatureModel IFeatureModel getAggregateModel addModelChangedListener
public void dispose super dispose I Feature Model model I Feature Model editor get Aggregate Model model remove Model Changed Listener this  IFeatureModel IFeatureModel getAggregateModel removeModelChangedListener
public String get Parent Page Id Object item if item instanceof I FeatureURL Element return Feature Form Page PAGE ID if item equals required Plugins item equals referenced Plugins item instanceof I Feature Plugin item instanceof I Feature Import return Feature Reference Page PAGE ID if item instanceof I Feature Info return Info Form Page PAGE ID if item instanceof I Feature Data return Feature Advanced Page PAGE ID return super get Parent Page Id item  getParentPageId IFeatureURLElement FeatureFormPage PAGE_ID requiredPlugins referencedPlugins IFeaturePlugin IFeatureImport FeatureReferencePage PAGE_ID IFeatureInfo InfoFormPage PAGE_ID IFeatureData FeatureAdvancedPage PAGE_ID getParentPageId
private Object get Infos I Feature Model model I Feature Model editor get Aggregate Model I Feature feature model get Feature Vector result new Vector for int i 0 i 3 i I Feature Info info feature get Feature Info i if info null result add info return result to Array  getInfos IFeatureModel IFeatureModel getAggregateModel IFeature getFeature IFeatureInfo getFeatureInfo toArray
private Object get References I Feature Model model I Feature Model editor get Aggregate Model I Feature feature model get Feature return feature get Plugins  getReferences IFeatureModel IFeatureModel getAggregateModel IFeature getFeature getPlugins
private Object get Imports I Feature Model model I Feature Model editor get Aggregate Model I Feature feature model get Feature return feature get Imports  getImports IFeatureModel IFeatureModel getAggregateModel IFeature getFeature getImports
private Object getUR Ls I Feature Model model I Feature Model editor get Aggregate Model I Feature feature model get Feature I FeatureURL url feature getURL if url null return new Object 0 I FeatureURL Element updates url get Updates I FeatureURL Element discoveries url get Discoveries int size updates length discoveries length Object result new Object size System arraycopy updates 0 result 0 updates length System arraycopy discoveries 0 result updates length discoveries length return result  getURLs IFeatureModel IFeatureModel getAggregateModel IFeature getFeature IFeatureURL IFeatureURLElement getUpdates IFeatureURLElement getDiscoveries
public Object get Parent Object object if object instanceof I Feature Plugin return referenced Plugins if object instanceof I Feature Import return required Plugins return editor find Page get Parent Page Id object  getParent IFeaturePlugin referencedPlugins IFeatureImport requiredPlugins findPage getParentPageId
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event WORLD CHANGED tree Viewer refresh return Object object event get Changed Objects 0 if object instanceof I Feature if event get Change Type I Model Changed Event CHANGE String property event get Changed Property if property equals I Feature P DESCRIPTION property equals I Feature P COPYRIGHT property equals I Feature P LICENSE I Form Page page editor find Page Info Form Page PAGE ID tree Viewer refresh page return if object instanceof I Feature Import object instanceof I Feature Info object instanceof I Feature Plugin object instanceof I Feature Data object instanceof I FeatureURL Element if event get Change Type I Model Changed Event CHANGE tree Viewer update object null else find the parent Object parent null parent get Parent object if parent null if event get Change Type I Model Changed Event INSERT tree Viewer add parent event get Changed Objects else tree Viewer remove event get Changed Objects else tree Viewer refresh tree Viewer expand All  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED treeViewer getChangedObjects IFeature getChangeType IModelChangedEvent getChangedProperty IFeature P_DESCRIPTION IFeature P_COPYRIGHT IFeature P_LICENSE IFormPage findPage InfoFormPage PAGE_ID treeViewer IFeatureImport IFeatureInfo IFeaturePlugin IFeatureData IFeatureURLElement getChangeType IModelChangedEvent treeViewer getParent getChangeType IModelChangedEvent treeViewer getChangedObjects treeViewer getChangedObjects treeViewer treeViewer expandAll

protected I Feature Object object public Feature Property Source I Feature Object object this object object  IFeatureObject FeaturePropertySource IFeatureObject
protected Property Descriptor create Text Property Descriptor String name String display Name if is Editable return new Modified Text Property Descriptor name display Name else return new Property Descriptor name display Name  PropertyDescriptor createTextPropertyDescriptor displayName isEditable ModifiedTextPropertyDescriptor displayName PropertyDescriptor displayName
Property Descriptor desc new Combo Box Property Descriptor name display Name choices desc set Label Provider new Label Provider public String get Text Object obj Integer index Integer obj return choices index int Value  PropertyDescriptor ComboBoxPropertyDescriptor displayName setLabelProvider LabelProvider getText intValue
protected Property Descriptor create Choice Property Descriptor String name String display Name final String choices if is Editable Property Descriptor desc new Combo Box Property Descriptor name display Name choices desc set Label Provider new Label Provider public String get Text Object obj Integer index Integer obj return choices index int Value return desc else return new Property Descriptor name display Name  PropertyDescriptor createChoicePropertyDescriptor displayName isEditable PropertyDescriptor ComboBoxPropertyDescriptor displayName setLabelProvider LabelProvider getText intValue PropertyDescriptor displayName
return new Property Descriptor name display Name public Object get Editable Value return null  PropertyDescriptor displayName getEditableValue
return null public boolean is Editable return object get Model is Editable  isEditable getModel isEditable
return object get Model is Editable public boolean is Property Set Object property return false  getModel isEditable isPropertySet
return false public void reset Property Value Object property  resetPropertyValue
protected I Property Descriptor to Descriptor Array Vector result I Property Descriptor array new I Property Descriptor result size result copy Into array return array  IPropertyDescriptor toDescriptorArray IPropertyDescriptor IPropertyDescriptor copyInto

private Feature Match Section match Section param editor param title public Feature Reference Page PDE Form Editor editor String title super editor PAGE ID title  FeatureMatchSection matchSection FeatureReferencePage PDEFormEditor PAGE_ID
protected void create Form Content I Managed Form managed Form super create Form Content managed Form Scrolled Form form managed Form get Form Form Toolkit toolkit managed Form get Toolkit Grid Layout layout new Grid Layout form get Body set Layout layout layout num Columns 2 layout make Columns Equal Width true layout margin Width 10 layout horizontal Spacing 15 layout vertical Spacing 15 Grid Data gd Composite left toolkit create Composite form get Body layout new Grid Layout layout margin Width layout margin Height 0 left set Layout layout gd new Grid Data Grid Data FILL BOTH left set Layout Data gd Composite right toolkit create Composite form get Body layout new Grid Layout layout margin Width layout margin Height 0 right set Layout layout gd new Grid Data Grid Data FILL BOTH right set Layout Data gd plugin Section new Plugin Section this left gd new Grid Data Grid Data FILL BOTH plugin Section get Section set Layout Data gd requires Section new Requires Section this right gd new Grid Data Grid Data FILL BOTH requires Section get Section set Layout Data gd match Section new Feature Match Section this right gd new Grid Data Grid Data FILL HORIZONTAL match Section get Section set Layout Data gd String title PDE Plugin get Resource String KEY P TITLE String desc PDE Plugin get Resource String KEY P DESC portability Section new Portability Section page title desc true control portability Section create Control right factory gd new Grid Data Grid Data FILL HORIZONTAL control set Layout Data gd managed Form add Part plugin Section managed Form add Part requires Section managed Form add Part match Section register Section portability Section Workbench Help set Help form get Body I Help Context Ids MANIFEST FEATURE CONTENT initialize  createFormContent IManagedForm managedForm createFormContent managedForm ScrolledForm managedForm getForm FormToolkit managedForm getToolkit GridLayout GridLayout getBody setLayout numColumns makeColumnsEqualWidth marginWidth horizontalSpacing verticalSpacing GridData createComposite getBody GridLayout marginWidth marginHeight setLayout GridData GridData FILL_BOTH setLayoutData createComposite getBody GridLayout marginWidth marginHeight setLayout GridData GridData FILL_BOTH setLayoutData pluginSection PluginSection GridData GridData FILL_BOTH pluginSection getSection setLayoutData requiresSection RequiresSection GridData GridData FILL_BOTH requiresSection getSection setLayoutData matchSection FeatureMatchSection GridData GridData FILL_HORIZONTAL matchSection getSection setLayoutData PDEPlugin getResourceString KEY_P_TITLE PDEPlugin getResourceString KEY_P_DESC portabilitySection PortabilitySection portabilitySection createControl GridData GridData FILL_HORIZONTAL setLayoutData managedForm addPart pluginSection managedForm addPart requiresSection managedForm addPart matchSection registerSection portabilitySection WorkbenchHelp setHelp getBody IHelpContextIds MANIFEST_FEATURE_CONTENT
initialize public void initialize get Managed Form get Form set Text PDE Plugin get Resource String KEY HEADING  getManagedForm getForm setText PDEPlugin getResourceString KEY_HEADING

public class Feature Source Page extends XML Source Page public Feature Source Page PDE Form Editor editor String id String title super editor id title  FeatureSourcePage XMLSourcePage FeatureSourcePage PDEFormEditor
super editor id title protected I Label Provider create Outline Label Provider return null  ILabelProvider createOutlineLabelProvider
return null protected I Tree Content Provider create Outline Content Provider return null  ITreeContentProvider createOutlineContentProvider
return null protected void outline Selection Changed Selection Changed Event e  outlineSelectionChanged SelectionChangedEvent
protected I Content Outline Page create Outline Page TODO remove this method when the above three stubs are implemented return null  IContentOutlinePage createOutlinePage

public Feature Spec Section Feature Form Page page Composite parent super page parent Section DESCRIPTION get Section set Text PDE Plugin get Resource String SECTION TITLE get Section set Description PDE Plugin get Resource String SECTION DESC create Client get Section page get Managed Form get Toolkit  FeatureSpecSection FeatureFormPage getSection setText PDEPlugin getResourceString SECTION_TITLE getSection setDescription PDEPlugin getResourceString SECTION_DESC createClient getSection getManagedForm getToolkit
public void commit boolean on Save title Text commit provider Text commit plugin Text commit id Text commit version Text commit image Text commit Not needed this is done directly in the button selection listener try feature set Primary primary Button get Selection feature set Exclusive exclusive Button get Selection catch Core Exception e PDE Plugin log Exception e super commit on Save  onSave titleText providerText pluginText idText versionText imageText setPrimary primaryButton getSelection setExclusive exclusiveButton getSelection CoreException PDEPlugin logException onSave
id Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try feature set Id text get Value catch Core Exception e PDE Plugin log Exception e  idText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setId getValue CoreException PDEPlugin logException
title Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try feature set Label text get Value catch Core Exception e PDE Plugin log Exception e get Page get Managed Form get Form set Text model get Resource String feature get Label Feature Editor get Page get Editor update Title  titleText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setLabel getValue CoreException PDEPlugin logException getPage getManagedForm getForm setText getResourceString getLabel FeatureEditor getPage getEditor updateTitle
version Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text if verify Set Version feature text get Value false warn Bad Version Format text get Value text set Value feature get Version  versionText setFormEntryListener FormEntryAdapter textValueChanged FormEntry verifySetVersion getValue warnBadVersionFormat getValue setValue getVersion
provider Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try feature set Provider Name get Non Null Value text get Value catch Core Exception e PDE Plugin log Exception e  providerText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setProviderName getNonNullValue getValue CoreException PDEPlugin logException
plugin Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try feature set Plugin get Non Null Value text get Value catch Core Exception e PDE Plugin log Exception e  pluginText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setPlugin getNonNullValue getValue CoreException PDEPlugin logException
image Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try feature set Image Name get Non Null Value text get Value catch Core Exception e PDE Plugin log Exception e  imageText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setImageName getNonNullValue getValue CoreException PDEPlugin logException
public void browse Button Selected Form Entry entry handle Browse Image  browseButtonSelected FormEntry handleBrowseImage
primary Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e try if block Notification feature set Primary primary Button get Selection catch Core Exception ex PDE Plugin log Exception ex  primaryButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent blockNotification setPrimary primaryButton getSelection CoreException PDEPlugin logException
exclusive Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e try if block Notification feature set Exclusive exclusive Button get Selection catch Core Exception ex PDE Plugin log Exception ex  exclusiveButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent blockNotification setExclusive exclusiveButton getSelection CoreException PDEPlugin logException
SWT PUSH create Jar Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Create Jar  createJarButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleCreateJar
SWT PUSH synchronize Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Synchronize  synchronizeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSynchronize
public void create Client Section section Form Toolkit toolkit Composite container toolkit create Composite section Grid Layout layout new Grid Layout layout num Columns 3 layout vertical Spacing 9 layout horizontal Spacing 6 container set Layout layout final I Feature Model model I Feature Model get Page get Model final I Feature feature model get Feature id Text new Form Entry container toolkit PDE Plugin get Resource String SECTION ID null false id Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try feature set Id text get Value catch Core Exception e PDE Plugin log Exception e title Text new Form Entry container toolkit PDE Plugin get Resource String SECTION NAME null false title Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try feature set Label text get Value catch Core Exception e PDE Plugin log Exception e get Page get Managed Form get Form set Text model get Resource String feature get Label Feature Editor get Page get Editor update Title version Text new Form Entry container toolkit PDE Plugin get Resource String SECTION VERSION null false version Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text if verify Set Version feature text get Value false warn Bad Version Format text get Value text set Value feature get Version provider Text new Form Entry container toolkit PDE Plugin get Resource String SECTION PROVIDER null false provider Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try feature set Provider Name get Non Null Value text get Value catch Core Exception e PDE Plugin log Exception e plugin Text new Form Entry container toolkit PDE Plugin get Resource String SECTION PLUGIN null false plugin Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try feature set Plugin get Non Null Value text get Value catch Core Exception e PDE Plugin log Exception e image Text new Form Entry container toolkit PDE Plugin get Resource String SECTION IMAGE PDE Plugin get Resource String SECTION BROWSE false image Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try feature set Image Name get Non Null Value text get Value catch Core Exception e PDE Plugin log Exception e public void browse Button Selected Form Entry entry handle Browse Image Grid Data gd Grid Data id Text get Text get Layout Data gd width Hint 150 Composite check Container toolkit create Composite container gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 3 check Container set Layout Data gd Grid Layout blayout new Grid Layout check Container set Layout blayout blayout num Columns 2 blayout margin Width 0 blayout margin Height 0 primary Button toolkit create Button check Container PDE Plugin get Resource String SECTION PRIMARY SWT CHECK gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 3 primary Button set Layout Data gd primary Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e try if block Notification feature set Primary primary Button get Selection catch Core Exception ex PDE Plugin log Exception ex exclusive Button toolkit create Button check Container PDE Plugin get Resource String SECTION EXCLUSIVE SWT CHECK gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 3 exclusive Button set Layout Data gd exclusive Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e try if block Notification feature set Exclusive exclusive Button get Selection catch Core Exception ex PDE Plugin log Exception ex Composite button Container toolkit create Composite container gd new Grid Data Grid Data HORIZONTAL ALIGN END gd horizontal Span 3 button Container set Layout Data gd blayout new Grid Layout button Container set Layout blayout blayout make Columns Equal Width true blayout num Columns 2 blayout margin Width 0 create Jar Button toolkit create Button button Container PDE Plugin get Resource String SECTION CREATE JAR SWT PUSH create Jar Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Create Jar gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING create Jar Button set Layout Data gd synchronize Button toolkit create Button button Container PDE Plugin get Resource String SECTION SYNCHRONIZE SWT PUSH synchronize Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Synchronize gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING synchronize Button set Layout Data gd toolkit paint Borders For container section set Client container initialize  createClient FormToolkit createComposite GridLayout GridLayout numColumns verticalSpacing horizontalSpacing setLayout IFeatureModel IFeatureModel getPage getModel IFeature getFeature idText FormEntry PDEPlugin getResourceString SECTION_ID idText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setId getValue CoreException PDEPlugin logException titleText FormEntry PDEPlugin getResourceString SECTION_NAME titleText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setLabel getValue CoreException PDEPlugin logException getPage getManagedForm getForm setText getResourceString getLabel FeatureEditor getPage getEditor updateTitle versionText FormEntry PDEPlugin getResourceString SECTION_VERSION versionText setFormEntryListener FormEntryAdapter textValueChanged FormEntry verifySetVersion getValue warnBadVersionFormat getValue setValue getVersion providerText FormEntry PDEPlugin getResourceString SECTION_PROVIDER providerText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setProviderName getNonNullValue getValue CoreException PDEPlugin logException pluginText FormEntry PDEPlugin getResourceString SECTION_PLUGIN pluginText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setPlugin getNonNullValue getValue CoreException PDEPlugin logException imageText FormEntry PDEPlugin getResourceString SECTION_IMAGE PDEPlugin getResourceString SECTION_BROWSE imageText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setImageName getNonNullValue getValue CoreException PDEPlugin logException browseButtonSelected FormEntry handleBrowseImage GridData GridData idText getText getLayoutData widthHint checkContainer createComposite GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan checkContainer setLayoutData GridLayout GridLayout checkContainer setLayout numColumns marginWidth marginHeight primaryButton createButton checkContainer PDEPlugin getResourceString SECTION_PRIMARY GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan primaryButton setLayoutData primaryButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent blockNotification setPrimary primaryButton getSelection CoreException PDEPlugin logException exclusiveButton createButton checkContainer PDEPlugin getResourceString SECTION_EXCLUSIVE GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan exclusiveButton setLayoutData exclusiveButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent blockNotification setExclusive exclusiveButton getSelection CoreException PDEPlugin logException buttonContainer createComposite GridData GridData HORIZONTAL_ALIGN_END horizontalSpan buttonContainer setLayoutData GridLayout buttonContainer setLayout makeColumnsEqualWidth numColumns marginWidth createJarButton createButton buttonContainer PDEPlugin getResourceString SECTION_CREATE_JAR createJarButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleCreateJar GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING createJarButton setLayoutData synchronizeButton createButton buttonContainer PDEPlugin getResourceString SECTION_SYNCHRONIZE synchronizeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSynchronize GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING synchronizeButton setLayoutData paintBordersFor setClient
private String get Non Null Value String value return value length 0 value null  getNonNullValue
private boolean verify Set Version I Feature feature String value try Plugin Version Identifier pvi new Plugin Version Identifier value feature set Version pvi to String catch Exception e return false return true  verifySetVersion IFeature PluginVersionIdentifier PluginVersionIdentifier setVersion toString
private void warn Bad Version Format String text Message Dialog open Error PDE Plugin get Active Workbench Shell PDE Plugin get Resource String KEY BAD VERSION TITLE PDE Plugin get Resource String KEY BAD VERSION MESSAGE  warnBadVersionFormat MessageDialog openError PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString KEY_BAD_VERSION_TITLE PDEPlugin getResourceString KEY_BAD_VERSION_MESSAGE
public void dispose I Feature Model model I Feature Model get Page get Model if model null model remove Model Changed Listener this super dispose  IFeatureModel IFeatureModel getPage getModel removeModelChangedListener
Feature Editor Contributor get Page getPDE Editor get Contributor Busy Indicator show While create Jar Button get Display new Runnable public void run contributor get Build Action run  FeatureEditorContributor getPage getPDEEditor getContributor BusyIndicator showWhile createJarButton getDisplay getBuildAction
private void handle Create Jar final Feature Editor Contributor contributor Feature Editor Contributor get Page getPDE Editor get Contributor Busy Indicator show While create Jar Button get Display new Runnable public void run contributor get Build Action run  handleCreateJar FeatureEditorContributor FeatureEditorContributor getPage getPDEEditor getContributor BusyIndicator showWhile createJarButton getDisplay getBuildAction
Feature Editor Contributor get Page getPDE Editor get Contributor Busy Indicator show While synchronize Button get Display new Runnable public void run contributor get Synchronize Action run  FeatureEditorContributor getPage getPDEEditor getContributor BusyIndicator showWhile synchronizeButton getDisplay getSynchronizeAction
private void handle Synchronize final Feature Editor Contributor contributor Feature Editor Contributor get Page getPDE Editor get Contributor Busy Indicator show While synchronize Button get Display new Runnable public void run contributor get Synchronize Action run  handleSynchronize FeatureEditorContributor FeatureEditorContributor getPage getPDEEditor getContributor BusyIndicator showWhile synchronizeButton getDisplay getSynchronizeAction
Busy Indicator show While primary Button get Display new Runnable public void run Resource Selection Dialog dialog new Resource Selection Dialog primary Button get Shell project null dialog open Object result dialog get Result if result null result length 0 return I Resource resource I Resource result 0 accept Image resource  BusyIndicator showWhile primaryButton getDisplay ResourceSelectionDialog ResourceSelectionDialog primaryButton getShell getResult IResource IResource acceptImage
private void handle Browse Image final I Feature Model model I Feature Model get Page get Model I Resource resource model get Underlying Resource final I Project project resource get Project Busy Indicator show While primary Button get Display new Runnable public void run Resource Selection Dialog dialog new Resource Selection Dialog primary Button get Shell project null dialog open Object result dialog get Result if result null result length 0 return I Resource resource I Resource result 0 accept Image resource  handleBrowseImage IFeatureModel IFeatureModel getPage getModel IResource getUnderlyingResource IProject getProject BusyIndicator showWhile primaryButton getDisplay ResourceSelectionDialog ResourceSelectionDialog primaryButton getShell getResult IResource IResource acceptImage
private void accept Image I Resource resource I Path path resource get Project Relative Path image Text set Value path to String  acceptImage IResource IPath getProjectRelativePath imageText setValue toString
public void initialize I Feature Model model I Feature Model get Page get Model refresh if model is Editable false id Text get Text set Editable false title Text get Text set Editable false version Text get Text set Editable false provider Text get Text set Editable false plugin Text get Text set Editable false image Text get Text set Editable false primary Button set Enabled false exclusive Button set Enabled false create Jar Button set Enabled false synchronize Button set Enabled false image Text get Button set Enabled false model add Model Changed Listener this  IFeatureModel IFeatureModel getPage getModel isEditable idText getText setEditable titleText getText setEditable versionText getText setEditable providerText getText setEditable pluginText getText setEditable imageText getText setEditable primaryButton setEnabled exclusiveButton setEnabled createJarButton setEnabled synchronizeButton setEnabled imageText getButton setEnabled addModelChangedListener
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED mark Stale return if e get Change Type I Model Changed Event CHANGE Object objs e get Changed Objects if objs length 0 objs 0 instanceof I Feature mark Stale  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale getChangeType IModelChangedEvent getChangedObjects IFeature markStale
public void set Focus if id Text null id Text get Text set Focus  setFocus idText idText getText setFocus
private void set If Defined Form Entry form Text String value if value null form Text set Value value true  setIfDefined FormEntry formText formText setValue
public void refresh block Notification true I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature set If Defined id Text feature get Id set If Defined title Text feature get Label get Page get Managed Form get Form set Text model get Resource String feature get Label set If Defined version Text feature get Version set If Defined provider Text feature get Provider Name set If Defined plugin Text feature get Plugin set If Defined image Text feature get Image Name primary Button set Selection feature is Primary exclusive Button set Selection feature is Exclusive super refresh block Notification false  blockNotification IFeatureModel IFeatureModel getPage getModel IFeature getFeature setIfDefined idText getId setIfDefined titleText getLabel getPage getManagedForm getForm setText getResourceString getLabel setIfDefined versionText getVersion setIfDefined providerText getProviderName setIfDefined pluginText getPlugin setIfDefined imageText getImageName primaryButton setSelection isPrimary exclusiveButton setSelection isExclusive blockNotification
public void cancel Edit id Text cancel Edit title Text cancel Edit version Text cancel Edit provider Text cancel Edit plugin Text cancel Edit image Text cancel Edit super cancel Edit  cancelEdit idText cancelEdit titleText cancelEdit versionText cancelEdit providerText cancelEdit pluginText cancelEdit imageText cancelEdit cancelEdit
see org eclipse update ui forms internal Form Section can Paste Clipboard public boolean can Paste Clipboard clipboard Transfer Data types clipboard get Available Types Transfer transfers new Transfer Text Transfer get Instance RTF Transfer get Instance for int i 0 i types length i for int j 0 j transfers length j if transfers j is Supported Type types i return true return false  FormSection canPaste canPaste TransferData getAvailableTypes TextTransfer getInstance RTFTransfer getInstance isSupportedType

public class Feature Undo Manager extends Model Undo Manager public Feature Undo Manager PDE Form Editor editor super editor set Undo Level Limit 30  FeatureUndoManager ModelUndoManager FeatureUndoManager PDEFormEditor setUndoLevelLimit
protected String get Page Id Object obj if obj instanceof I Feature obj instanceof I FeatureURL return Feature Form Page PAGE ID if obj instanceof I Feature Plugin obj instanceof I Feature Import return Feature Reference Page PAGE ID if obj instanceof I Feature Data obj instanceof I Feature Child return Feature Advanced Page PAGE ID return null  getPageId IFeature IFeatureURL FeatureFormPage PAGE_ID IFeaturePlugin IFeatureImport FeatureReferencePage PAGE_ID IFeatureData IFeatureChild FeatureAdvancedPage PAGE_ID
protected void execute I Model Changed Event event boolean undo Object elements event get Changed Objects int type event get Change Type String property Name event get Changed Property I Feature Model model I Feature Model event get Change Provider switch type case I Model Changed Event INSERT if undo execute Remove model elements else execute Add model elements break case I Model Changed Event REMOVE if undo execute Add model elements else execute Remove model elements break case I Model Changed Event CHANGE if undo execute Change elements 0 property Name event get New Value event get Old Value else execute Change elements 0 property Name event get Old Value event get New Value  IModelChangedEvent getChangedObjects getChangeType propertyName getChangedProperty IFeatureModel IFeatureModel getChangeProvider IModelChangedEvent executeRemove executeAdd IModelChangedEvent executeAdd executeRemove IModelChangedEvent executeChange propertyName getNewValue getOldValue executeChange propertyName getOldValue getNewValue
private void execute Add I Feature Model model Object elements I Feature feature model get Feature try for int i 0 i elements length i Object element elements i if element instanceof I Feature Plugin feature add Plugins new I Feature Plugin I Feature Plugin element else if element instanceof I Feature Data feature add Data new I Feature Data I Feature Data element else if element instanceof I Feature Import feature add Imports new I Feature Import I Feature Import element else if element instanceof I Feature Child feature add Included Features new I Feature Child I Feature Child element catch Core Exception e PDE Plugin log Exception e  executeAdd IFeatureModel IFeature getFeature IFeaturePlugin addPlugins IFeaturePlugin IFeaturePlugin IFeatureData addData IFeatureData IFeatureData IFeatureImport addImports IFeatureImport IFeatureImport IFeatureChild addIncludedFeatures IFeatureChild IFeatureChild CoreException PDEPlugin logException
private void execute Remove I Feature Model model Object elements I Feature feature model get Feature try for int i 0 i elements length i Object element elements i if element instanceof I Feature Plugin feature remove Plugins new I Feature Plugin I Feature Plugin element else if element instanceof I Feature Data feature remove Data new I Feature Data I Feature Data element else if element instanceof I Feature Import feature remove Imports new I Feature Import I Feature Import element else if element instanceof I Feature Child feature remove Included Features new I Feature Child I Feature Child element catch Core Exception e PDE Plugin log Exception e  executeRemove IFeatureModel IFeature getFeature IFeaturePlugin removePlugins IFeaturePlugin IFeaturePlugin IFeatureData removeData IFeatureData IFeatureData IFeatureImport removeImports IFeatureImport IFeatureImport IFeatureChild removeIncludedFeatures IFeatureChild IFeatureChild CoreException PDEPlugin logException
private void execute Change Object element String property Name Object old Value Object new Value if element instanceof Feature Object Feature Object pobj Feature Object element try pobj restore Property property Name old Value new Value catch Core Exception e PDE Plugin log Exception e  executeChange propertyName oldValue newValue FeatureObject FeatureObject FeatureObject restoreProperty propertyName oldValue newValue CoreException PDEPlugin logException
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event CHANGE Object obj event get Changed Objects 0 if obj instanceof I Feature Object I Feature Object fobj I Feature Object event get Changed Objects 0 Ignore events from objects that are not yet in the model if fobj instanceof I Feature fobj is In The Model false return super model Changed event  modelChanged IModelChangedEvent getChangeType IModelChangedEvent getChangedObjects IFeatureObject IFeatureObject IFeatureObject getChangedObjects IFeature isInTheModel modelChanged

public Handler Section Feature Advanced Page page Composite parent super page parent Section DESCRIPTION get Section set Text PDE Plugin get Resource String SECTION TITLE get Section set Description PDE Plugin get Resource String SECTION DESC set Collapsable true I Feature Model model I Feature Model page get Model I Feature feature model get Feature set Collapsed feature get Install Handler null create Client get Section page get Managed Form get Toolkit  HandlerSection FeatureAdvancedPage getSection setText PDEPlugin getResourceString SECTION_TITLE getSection setDescription PDEPlugin getResourceString SECTION_DESC setCollapsable IFeatureModel IFeatureModel getModel IFeature getFeature setCollapsed getInstallHandler createClient getSection getManagedForm getToolkit
public boolean can Paste Clipboard clipboard Transfer Data types clipboard get Available Types Transfer transfers new Transfer Text Transfer get Instance RTF Transfer get Instance for int i 0 i types length i for int j 0 j transfers length j if transfers j is Supported Type types i return true return false  canPaste TransferData getAvailableTypes TextTransfer getInstance RTFTransfer getInstance isSupportedType
public void commit boolean on Save url Text commit library Text commit handler Text commit super commit on Save  onSave urlText libraryText handlerText onSave
url Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try setURL feature text get Value catch Core Exception e PDE Plugin log Exception e  urlText setFormEntryListener FormEntryAdapter textValueChanged FormEntry getValue CoreException PDEPlugin logException
library Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try set Library feature text get Value catch Core Exception e PDE Plugin log Exception e  libraryText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setLibrary getValue CoreException PDEPlugin logException
handler Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try set Handler feature text get Value catch Core Exception e PDE Plugin log Exception e  handlerText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setHandler getValue CoreException PDEPlugin logException
public void create Client Section section Form Toolkit toolkit Composite container toolkit create Composite section Grid Layout layout new Grid Layout layout num Columns 2 layout vertical Spacing 9 layout horizontal Spacing 6 container set Layout layout I Feature Model model I Feature Model get Page get Model final I Feature feature model get Feature url Text new Form Entry container toolkit PDE Plugin get Resource String SECTION URL null false url Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try setURL feature text get Value catch Core Exception e PDE Plugin log Exception e library Text new Form Entry container toolkit PDE Plugin get Resource String SECTION LIBRARY null false library Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try set Library feature text get Value catch Core Exception e PDE Plugin log Exception e handler Text new Form Entry container toolkit PDE Plugin get Resource String SECTION HANDLER null false handler Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try set Handler feature text get Value catch Core Exception e PDE Plugin log Exception e toolkit paint Borders For container section set Client container initialize  createClient FormToolkit createComposite GridLayout GridLayout numColumns verticalSpacing horizontalSpacing setLayout IFeatureModel IFeatureModel getPage getModel IFeature getFeature urlText FormEntry PDEPlugin getResourceString SECTION_URL urlText setFormEntryListener FormEntryAdapter textValueChanged FormEntry getValue CoreException PDEPlugin logException libraryText FormEntry PDEPlugin getResourceString SECTION_LIBRARY libraryText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setLibrary getValue CoreException PDEPlugin logException handlerText FormEntry PDEPlugin getResourceString SECTION_HANDLER handlerText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setHandler getValue CoreException PDEPlugin logException paintBordersFor setClient
private void setURL I Feature feature String value throws Core Exception I Feature Install Handler handler get Handler feature try URL url new URL value handler setURL url catch MalformedURL Exception e Message Dialog open Error get Page get Editor get Editor Site get Shell PDE Plugin get Resource String Handler Section feature Editor NON NLS 1 PDE Plugin get Formatted Message Handler Section invalid value NON NLS 1 set If Defined url Text handler getURL  IFeature CoreException IFeatureInstallHandler getHandler MalformedURLException MessageDialog openError getPage getEditor getEditorSite getShell PDEPlugin getResourceString HandlerSection featureEditor PDEPlugin getFormattedMessage HandlerSection setIfDefined urlText
private void set Library I Feature feature String value throws Core Exception I Feature Install Handler handler get Handler feature handler set Library value  setLibrary IFeature CoreException IFeatureInstallHandler getHandler setLibrary
handler set Library value private void set Handler I Feature feature String value throws Core Exception I Feature Install Handler handler get Handler feature handler set Handler Name value  setLibrary setHandler IFeature CoreException IFeatureInstallHandler getHandler setHandlerName
private I Feature Install Handler get Handler I Feature feature throws Core Exception I Feature Install Handler handler feature get Install Handler if handler null handler feature get Model get Factory create Install Handler feature set Install Handler handler return handler  IFeatureInstallHandler getHandler IFeature CoreException IFeatureInstallHandler getInstallHandler getModel getFactory createInstallHandler setInstallHandler
public void dispose I Feature Model model I Feature Model get Page get Model if model null model remove Model Changed Listener this super dispose  IFeatureModel IFeatureModel getPage getModel removeModelChangedListener
public void initialize I Feature Model model I Feature Model get Page get Model refresh if model is Editable false url Text get Text set Editable false library Text get Text set Editable false handler Text get Text set Editable false model add Model Changed Listener this  IFeatureModel IFeatureModel getPage getModel isEditable urlText getText setEditable libraryText getText setEditable handlerText getText setEditable addModelChangedListener
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED mark Stale  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale
public void set Focus if url Text null url Text get Text set Focus  setFocus urlText urlText getText setFocus
private void set If Defined Form Entry form Text Object value if value null form Text set Value value to String true else form Text set Value null true  setIfDefined FormEntry formText formText setValue toString formText setValue
public void refresh I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature I Feature Install Handler handler feature get Install Handler if handler null set If Defined url Text handler getURL set If Defined library Text handler get Library set If Defined handler Text handler get Handler Name super refresh  IFeatureModel IFeatureModel getPage getModel IFeature getFeature IFeatureInstallHandler getInstallHandler setIfDefined urlText setIfDefined libraryText getLibrary setIfDefined handlerText getHandlerName
public void cancel Edit url Text cancel Edit library Text cancel Edit handler Text cancel Edit super cancel Edit  cancelEdit urlText cancelEdit libraryText cancelEdit handlerText cancelEdit cancelEdit

implements I Structured Content Provider public Object get Elements Object parent if parent instanceof I Feature return I Feature parent get Included Features return new Object 0  IStructuredContentProvider getElements IFeature IFeature getIncludedFeatures
public Included Features Section Feature Advanced Page page Composite parent super page parent Section DESCRIPTION new String PDE Plugin get Resource String KEY NEW get Section set Text PDE Plugin get Resource String SECTION TITLE get Section set Description PDE Plugin get Resource String SECTION DESC get Table Part set Editable false set Collapsable true I Feature Model model I Feature Model page get Model I Feature feature model get Feature set Collapsed feature get Data length 0  IncludedFeaturesSection FeatureAdvancedPage PDEPlugin getResourceString KEY_NEW getSection setText PDEPlugin getResourceString SECTION_TITLE getSection setDescription PDEPlugin getResourceString SECTION_DESC getTablePart setEditable setCollapsable IFeatureModel IFeatureModel getModel IFeature getFeature setCollapsed getData
public void commit boolean on Save super commit on Save  onSave onSave
public void create Client Section section Form Toolkit toolkit Composite container create Client Container section 2 toolkit Grid Layout layout Grid Layout container get Layout layout vertical Spacing 9 create Viewer Part Control container SWT MULTI 2 toolkit Table Part table Part get Table Part includes Viewer table Part get Table Viewer includes Viewer set Content Provider new Included Features Content Provider includes Viewer set Label Provider PDE Plugin get Default get Label Provider includes Viewer set Sorter List Util NAME SORTER toolkit paint Borders For container make Actions section set Client container initialize  createClient FormToolkit createClientContainer GridLayout GridLayout getLayout verticalSpacing createViewerPartControl TablePart tablePart getTablePart includesViewer tablePart getTableViewer includesViewer setContentProvider IncludedFeaturesContentProvider includesViewer setLabelProvider PDEPlugin getDefault getLabelProvider includesViewer setSorter ListUtil NAME_SORTER paintBordersFor makeActions setClient
protected void handle Double Click I Structured Selection selection open Action run  handleDoubleClick IStructuredSelection openAction
protected void button Selected int index if index 0 handle New  buttonSelected handleNew
public void dispose I Feature Model model I Feature Model get Page get Model if model null model remove Model Changed Listener this Workspace Model Manager mng PDE Core get Default get Workspace Model Manager mng remove Model Provider Listener this super dispose  IFeatureModel IFeatureModel getPage getModel removeModelChangedListener WorkspaceModelManager PDECore getDefault getWorkspaceModelManager removeModelProviderListener
public boolean set Form Input Object object if object instanceof I Feature Child includes Viewer set Selection new Structured Selection object true return true return false  setFormInput IFeatureChild includesViewer setSelection StructuredSelection
protected void fill Context Menu I Menu Manager manager manager add open Action manager add new Separator manager add new Action manager add delete Action manager add new Separator get Page getPDE Editor get Contributor context Menu About To Show manager manager add new Separator manager add properties Action  fillContextMenu IMenuManager openAction newAction deleteAction getPage getPDEEditor getContributor contextMenuAboutToShow propertiesAction
Busy Indicator show While includes Viewer get Table get Display new Runnable public void run Include Features Wizard wizard new Include Features Wizard model Wizard Dialog dialog new Wizard Dialog includes Viewer get Table get Shell wizard dialog open  BusyIndicator showWhile includesViewer getTable getDisplay IncludeFeaturesWizard IncludeFeaturesWizard WizardDialog WizardDialog includesViewer getTable getShell
private void handle New final I Feature Model model I Feature Model get Page get Model Busy Indicator show While includes Viewer get Table get Display new Runnable public void run Include Features Wizard wizard new Include Features Wizard model Wizard Dialog dialog new Wizard Dialog includes Viewer get Table get Shell wizard dialog open  handleNew IFeatureModel IFeatureModel getPage getModel BusyIndicator showWhile includesViewer getTable getDisplay IncludeFeaturesWizard IncludeFeaturesWizard WizardDialog WizardDialog includesViewer getTable getShell
private void handle Select All I Structured Content Provider provider I Structured Content Provider includes Viewer get Content Provider Object elements provider get Elements includes Viewer get Input Structured Selection ssel new Structured Selection elements includes Viewer set Selection ssel  handleSelectAll IStructuredContentProvider IStructuredContentProvider includesViewer getContentProvider getElements includesViewer getInput StructuredSelection StructuredSelection includesViewer setSelection
private void handle Delete I Structured Selection ssel I Structured Selection includes Viewer get Selection if ssel is Empty return I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature try I Feature Child removed new I Feature Child ssel size int i 0 for Iterator iter ssel iterator iter has Next I Feature Child iobj I Feature Child iter next removed i iobj feature remove Included Features removed catch Core Exception e PDE Plugin log Exception e  handleDelete IStructuredSelection IStructuredSelection includesViewer getSelection isEmpty IFeatureModel IFeatureModel getPage getModel IFeature getFeature IFeatureChild IFeatureChild hasNext IFeatureChild IFeatureChild removeIncludedFeatures CoreException PDEPlugin logException
if action Id equals Action Factory DELETE get Id Busy Indicator show While includes Viewer get Table get Display new Runnable public void run handle Delete  actionId ActionFactory getId BusyIndicator showWhile includesViewer getTable getDisplay handleDelete
if action Id equals Action Factory SELECT ALL get Id Busy Indicator show While includes Viewer get Table get Display new Runnable public void run handle Select All  actionId ActionFactory SELECT_ALL getId BusyIndicator showWhile includesViewer getTable getDisplay handleSelectAll
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id Busy Indicator show While includes Viewer get Table get Display new Runnable public void run handle Delete return true if action Id equals Action Factory SELECT ALL get Id Busy Indicator show While includes Viewer get Table get Display new Runnable public void run handle Select All return true if action Id equals Action Factory CUT get Id delete here and let the editor transfer the selection to the clipboard handle Delete return false if action Id equals Action Factory PASTE get Id do Paste return true return false  doGlobalAction actionId actionId ActionFactory getId BusyIndicator showWhile includesViewer getTable getDisplay handleDelete actionId ActionFactory SELECT_ALL getId BusyIndicator showWhile includesViewer getTable getDisplay handleSelectAll actionId ActionFactory getId handleDelete actionId ActionFactory getId doPaste
return false protected void selection Changed I Structured Selection selection get Page getPDE Editor set Selection selection  selectionChanged IStructuredSelection getPage getPDEEditor setSelection
public void initialize I Feature Model model I Feature Model get Page get Model refresh get Table Part set Button Enabled 0 model is Editable model add Model Changed Listener this Workspace Model Manager mng PDE Core get Default get Workspace Model Manager mng add Model Provider Listener this  IFeatureModel IFeatureModel getPage getModel getTablePart setButtonEnabled isEditable addModelChangedListener WorkspaceModelManager PDECore getDefault getWorkspaceModelManager addModelProviderListener
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED mark Stale return else Object obj e get Changed Objects 0 if obj instanceof I Feature Child if e get Change Type I Model Changed Event CHANGE includes Viewer update obj null else if e get Change Type I Model Changed Event INSERT includes Viewer add e get Changed Objects else if e get Change Type I Model Changed Event REMOVE includes Viewer remove e get Changed Objects  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale getChangedObjects IFeatureChild getChangeType IModelChangedEvent includesViewer getChangeType IModelChangedEvent includesViewer getChangedObjects getChangeType IModelChangedEvent includesViewer getChangedObjects
I Model model I Model get Page get Model new Action new Action public void run handle New  IModel IModel getPage getModel newAction handleNew
public void run Busy Indicator show While includes Viewer get Table get Display new Runnable public void run handle Delete  BusyIndicator showWhile includesViewer getTable getDisplay handleDelete
delete Action new Action public void run Busy Indicator show While includes Viewer get Table get Display new Runnable public void run handle Delete  deleteAction BusyIndicator showWhile includesViewer getTable getDisplay handleDelete
private void make Actions I Model model I Model get Page get Model new Action new Action public void run handle New new Action set Text PDE Plugin get Resource String POPUP NEW new Action set Enabled model is Editable delete Action new Action public void run Busy Indicator show While includes Viewer get Table get Display new Runnable public void run handle Delete delete Action set Enabled model is Editable delete Action set Text PDE Plugin get Resource String POPUP DELETE open Action new Open Reference Action includes Viewer properties Action new Properties Action get Page getPDE Editor  makeActions IModel IModel getPage getModel newAction handleNew newAction setText PDEPlugin getResourceString POPUP_NEW newAction setEnabled isEditable deleteAction BusyIndicator showWhile includesViewer getTable getDisplay handleDelete deleteAction setEnabled isEditable deleteAction setText PDEPlugin getResourceString POPUP_DELETE openAction OpenReferenceAction includesViewer propertiesAction PropertiesAction getPage getPDEEditor
public void models Changed I Model Provider Event event I Model added event get Added Models I Model removed event get Removed Models I Model changed event get Changed Models if has Feature Models added has Feature Models removed has Feature Models changed mark Stale  modelsChanged IModelProviderEvent IModel getAddedModels IModel getRemovedModels IModel getChangedModels hasFeatureModels hasFeatureModels hasFeatureModels markStale
private boolean has Feature Models I Model models I Feature Model this Model I Feature Model get Page get Model if this Model null return false I Feature this Feature this Model get Feature if this Feature null return false if models null return false if models length 0 return false for int i 0 i models length i if models i instanceof I Feature Model I Feature feature I Feature Model models i get Feature if feature get Id equals this Feature get Id continue return true return false  hasFeatureModels IModel IFeatureModel thisModel IFeatureModel getPage getModel thisModel IFeature thisFeature thisModel getFeature thisFeature IFeatureModel IFeature IFeatureModel getFeature getId thisFeature getId
public void set Focus if includes Viewer null includes Viewer get Table set Focus  setFocus includesViewer includesViewer getTable setFocus
public void refresh I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature includes Viewer set Input feature super refresh  IFeatureModel IFeatureModel getPage getModel IFeature getFeature includesViewer setInput
see org eclipse pde internal ui editor Structured Viewer Section can Paste Clipboard public boolean can Paste Clipboard clipboard Object objects Object clipboard get Contents Model Data Transfer get Instance if objects null objects length 0 return can Paste null objects return false  StructuredViewerSection canPaste canPaste getContents ModelDataTransfer getInstance canPaste
see org eclipse pde internal ui editor Structured Viewer Section can Paste Object Object protected boolean can Paste Object target Object objects for int i 0 i objects length i if objects i instanceof Feature Child return false return true  StructuredViewerSection canPaste canPaste FeatureChild
see org eclipse pde internal ui editor Structured Viewer Section do Paste protected void do Paste Clipboard clipboard get Page getPDE Editor get Clipboard Model Data Transfer model Transfer Model Data Transfer get Instance Object objects Object clipboard get Contents model Transfer if objects null do Paste null objects  StructuredViewerSection doPaste doPaste getPage getPDEEditor getClipboard ModelDataTransfer modelTransfer ModelDataTransfer getInstance getContents modelTransfer doPaste
see org eclipse pde internal ui editor Structured Viewer Section do Paste Object Object protected void do Paste Object target Object objects I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature Feature Child f Children new Feature Child objects length try for int i 0 i objects length i if objects i instanceof Feature Child Feature Child f Child Feature Child objects i f Child set Model model f Child set Parent feature f Child hook With Workspace f Children i f Child feature add Included Features f Children catch Core Exception e PDE Plugin log Exception e  StructuredViewerSection doPaste doPaste IFeatureModel IFeatureModel getPage getModel IFeature getFeature FeatureChild fChildren FeatureChild FeatureChild FeatureChild fChild FeatureChild fChild setModel fChild setParent fChild hookWithWorkspace fChildren fChild addIncludedFeatures fChildren CoreException PDEPlugin logException

public Include Features Wizard I Feature Model model this model model set Default Page Image Descriptor PDE Plugin Images DESC NEWPPRJ WIZ set Dialog Settings PDE Plugin get Default get Dialog Settings set Needs Progress Monitor true  IncludeFeaturesWizard IFeatureModel setDefaultPageImageDescriptor PDEPluginImages DESC_NEWPPRJ_WIZ setDialogSettings PDEPlugin getDefault getDialogSettings setNeedsProgressMonitor
public void add Pages main Page new Include Features Wizard Page model add Page main Page set Window Title main Page get Title  addPages mainPage IncludeFeaturesWizardPage addPage mainPage setWindowTitle mainPage getTitle
public boolean perform Finish return main Page finish  performFinish mainPage

extends Default Content Provider implements I Structured Content Provider public Object get Elements Object parent return get Choices  DefaultContentProvider IStructuredContentProvider getElements getChoices
class Table Part extends Wizard Checkbox Table Part public Table Part super PDE Plugin get Resource String KEY FEATURES  TablePart WizardCheckboxTablePart TablePart PDEPlugin getResourceString KEY_FEATURES
super PDE Plugin get Resource String KEY FEATURES public void update Counter int count super update Counter count set Page Complete count 0  PDEPlugin getResourceString KEY_FEATURES updateCounter updateCounter setPageComplete
protected Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit Structured Viewer viewer super create Structured Viewer parent style toolkit viewer set Sorter List Util FEATURE SORTER return viewer  StructuredViewer createStructuredViewer FormToolkit StructuredViewer createStructuredViewer setSorter ListUtil FEATURE_SORTER
public Include Features Wizard Page I Feature Model model super Include Features Page NON NLS 1 this model model set Title PDE Plugin get Resource String KEY TITLE set Description PDE Plugin get Resource String KEY DESC set Page Complete false checkbox Table Part new Table Part PDE Plugin get Default get Label Provider connect this  IncludeFeaturesWizardPage IFeatureModel IncludeFeaturesPage setTitle PDEPlugin getResourceString KEY_TITLE setDescription PDEPlugin getResourceString KEY_DESC setPageComplete checkboxTablePart TablePart PDEPlugin getDefault getLabelProvider
public void dispose PDE Plugin get Default get Label Provider disconnect this super dispose  PDEPlugin getDefault getLabelProvider
public void create Control Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 container set Layout layout create Plugin List container initialize set Control container Dialog apply Dialog Font container Workbench Help set Help container I Help Context Ids FEATURE INCLUDED FEATURES WIZARD  createControl GridLayout GridLayout numColumns setLayout createPluginList setControl applyDialogFont WorkbenchHelp setHelp IHelpContextIds FEATURE_INCLUDED_FEATURES_WIZARD
plugin Viewer add Filter new Viewer Filter public boolean select Viewer v Object parent Object object if object instanceof I Feature Model I Feature Model model I Feature Model object return is On The List model return true  pluginViewer addFilter ViewerFilter IFeatureModel IFeatureModel IFeatureModel isOnTheList
protected void create Plugin List Composite parent checkbox Table Part create Control parent plugin Viewer checkbox Table Part get Table Viewer plugin Viewer set Content Provider new Plugin Content Provider plugin Viewer set Label Provider PDE Plugin get Default get Label Provider plugin Viewer add Filter new Viewer Filter public boolean select Viewer v Object parent Object object if object instanceof I Feature Model I Feature Model model I Feature Model object return is On The List model return true Grid Data gd Grid Data checkbox Table Part get Control get Layout Data gd height Hint 300  createPluginList checkboxTablePart createControl pluginViewer checkboxTablePart getTableViewer pluginViewer setContentProvider PluginContentProvider pluginViewer setLabelProvider PDEPlugin getDefault getLabelProvider pluginViewer addFilter ViewerFilter IFeatureModel IFeatureModel IFeatureModel isOnTheList GridData GridData checkboxTablePart getControl getLayoutData heightHint
private boolean is On The List I Feature Model candidate I Feature Child features model get Feature get Included Features I Feature cfeature candidate get Feature if is This Model cfeature return true for int i 0 i features length i I Feature Child child features i if child get Id equals cfeature get Id child get Version equals cfeature get Version return true return false  isOnTheList IFeatureModel IFeatureChild getFeature getIncludedFeatures IFeature getFeature isThisModel IFeatureChild getId getId getVersion getVersion
private boolean is This Model I Feature cfeature I Feature this Feature this model get Feature return cfeature get Id equals this Feature get Id cfeature get Version equals this Feature get Version  isThisModel IFeature IFeature thisFeature getFeature getId thisFeature getId getVersion thisFeature getVersion
public void init I Workbench workbench  IWorkbench
private void initialize plugin Viewer set Input model get Feature checkbox Table Part set Selection new Object 0  pluginViewer setInput getFeature checkboxTablePart setSelection
private Object get Choices Workspace Model Manager mng PDE Core get Default get Workspace Model Manager return mng get Feature Models  getChoices WorkspaceModelManager PDECore getDefault getWorkspaceModelManager getFeatureModels
I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try do Add candidates monitor catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException doAdd CoreException InvocationTargetException
public boolean finish final Object candidates checkbox Table Part get Selection I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try do Add candidates monitor catch Core Exception e throw new Invocation Target Exception e try get Container run false false op catch Interrupted Exception e return false catch Invocation Target Exception e PDE Plugin log Exception e return false return true  checkboxTablePart getSelection IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException doAdd CoreException InvocationTargetException getContainer InterruptedException InvocationTargetException PDEPlugin logException
private void do Add Object candidates I Progress Monitor monitor throws Core Exception monitor begin Task PDE Plugin get Resource String KEY ADDING candidates length 1 I Feature feature model get Feature I Feature Child added new I Feature Child candidates length for int i 0 i candidates length i I Feature Model candidate I Feature Model candidates i String name candidate get Feature get Label monitor sub Task candidate get Resource String name Feature Child child Feature Child model get Factory create Child child load From candidate get Feature added i child monitor worked 1 monitor sub Task NON NLS 1 monitor set Task Name PDE Plugin get Resource String KEY UPDATING feature add Included Features added monitor worked 1  doAdd IProgressMonitor CoreException beginTask PDEPlugin getResourceString KEY_ADDING IFeature getFeature IFeatureChild IFeatureChild IFeatureModel IFeatureModel getFeature getLabel subTask getResourceString FeatureChild FeatureChild getFactory createChild loadFrom getFeature subTask setTaskName PDEPlugin getResourceString KEY_UPDATING addIncludedFeatures

private Info Section info Section param editor param title public Info Form Page PDE Form Editor editor String title super editor PAGE ID title  InfoSection infoSection InfoFormPage PDEFormEditor PAGE_ID
protected void create Form Content I Managed Form managed Form super create Form Content managed Form Scrolled Form form managed Form get Form Grid Layout layout new Grid Layout form get Body set Layout layout layout margin Width 10 Grid Data gd info Section new Info Section this form get Body color Manager gd new Grid Data Grid Data FILL BOTH info Section get Section set Layout Data gd managed Form add Part info Section Workbench Help set Help form get Body I Help Context Ids MANIFEST FEATURE INFO initialize  createFormContent IManagedForm managedForm createFormContent managedForm ScrolledForm managedForm getForm GridLayout GridLayout getBody setLayout marginWidth GridData infoSection InfoSection getBody colorManager GridData GridData FILL_BOTH infoSection getSection setLayoutData managedForm addPart infoSection WorkbenchHelp setHelp getBody IHelpContextIds MANIFEST_FEATURE_INFO
initialize public void dispose color Manager dispose super dispose  colorManager
super dispose public void initialize get Managed Form get Form set Text PDE Plugin get Resource String KEY TITLE  getManagedForm getForm setText PDEPlugin getResourceString KEY_TITLE

public Info Section PDE Form Page page Composite parent I Color Manager color Manager super page parent Section DESCRIPTION Section NO TITLE false String description PDE Plugin get Resource String SECTION DESC get Section set Description description source Configuration new XML Configuration color Manager document new Document partitioner new Default Partitioner new XML Partition Scanner new String XML Partition Scanner XML TAG XML Partition Scanner XML COMMENT partitioner connect document document set Document Partitioner partitioner create Client get Section page get Managed Form get Toolkit  InfoSection PDEFormPage IColorManager colorManager NO_TITLE PDEPlugin getResourceString SECTION_DESC getSection setDescription sourceConfiguration XMLConfiguration colorManager DefaultPartitioner XMLPartitionScanner XMLPartitionScanner XML_TAG XMLPartitionScanner XML_COMMENT setDocumentPartitioner createClient getSection getManagedForm getToolkit
public void commit boolean on Save handle Apply if on Save reset Button set Enabled false super commit on Save  onSave handleApply onSave resetButton setEnabled onSave
tab Folder add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Tab Selection  tabFolder addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateTabSelection
url Text toolkit create Text container null SWT SINGLE url Text add Modify Listener new Modify Listener public void modify Text Modify Event e info Modified  urlText createText urlText addModifyListener ModifyListener modifyText ModifyEvent infoModified
source Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Selection event get Selection  sourceViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateSelection getSelection
apply Button set Layout Data gd apply Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Apply  applyButton setLayoutData applyButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleApply
reset Button set Layout Data gd reset Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Reset  resetButton setLayoutData resetButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleReset
public void create Client Section section Form Toolkit toolkit Composite container toolkit create Composite section Grid Layout layout new Grid Layout layout num Columns 3 layout margin Width 2 layout margin Height 5 layout vertical Spacing 8 container set Layout layout Grid Data gd toolkit create Label container null tab Folder new C Tab Folder container SWT FLAT SWT TOP toolkit adapt tab Folder true true gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 tab Folder set Layout Data gd gd height Hint 2 toolkit get Colors initialize Section Tool Bar Colors Color selected Color1 toolkit get Colors get Color Form Colors TB BG Color selected Color2 toolkit get Colors get Color Form Colors TB GBG tab Folder set Selection Background new Color selected Color1 selected Color2 toolkit get Colors get Background new int 50 100 true tab Folder add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Tab Selection Label label toolkit create Label container PDE Plugin get Resource String KEY URL label set Foreground toolkit get Colors get Color Form Colors TITLE url Text toolkit create Text container null SWT SINGLE url Text add Modify Listener new Modify Listener public void modify Text Modify Event e info Modified gd new Grid Data Grid Data FILL HORIZONTAL url Text set Layout Data gd toolkit create Label container null label toolkit create Label container PDE Plugin get Resource String KEY TEXT label set Foreground toolkit get Colors get Color Form Colors TITLE gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING label set Layout Data gd int styles SWT MULTI SWT WRAP SWT V SCROLL SWT H SCROLL source Viewer new Source Viewer container null styles source Viewer configure source Configuration source Viewer set Document document source Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Selection event get Selection Styled Text styled Text source Viewer get Text Widget styled Text set Font J Face Resources get Text Font styled Text set Menu get Page getPDE Editor get Context Menu styled Text set Data Form Toolkit KEY DRAW BORDER Form Toolkit TEXT BORDER if SWT get Platform equals motif false NON NLS 1 toolkit paint Borders For container Control children container get Children Control control children children length 1 gd new Grid Data Grid Data FILL BOTH Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL gd width Hint 600 gd height Hint 600 gd width Hint 50 gd height Hint 50 control set Layout Data gd Composite button Container toolkit create Composite container layout new Grid Layout layout margin Height 0 layout margin Width 0 button Container set Layout layout gd new Grid Data Grid Data FILL VERTICAL button Container set Layout Data gd apply Button toolkit create Button button Container PDE Plugin get Resource String KEY APPLY SWT PUSH apply Button set Enabled false gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING apply Button set Layout Data gd apply Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Apply reset Button toolkit create Button button Container PDE Plugin get Resource String KEY RESET SWT PUSH reset Button set Enabled false gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING reset Button set Layout Data gd reset Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Reset create Tabs section set Client container initialize if tab Folder get Item Count 0 tab Folder set Selection 0 update Tab Selection  createClient FormToolkit createComposite GridLayout GridLayout numColumns marginWidth marginHeight verticalSpacing setLayout GridData createLabel tabFolder CTabFolder tabFolder GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan tabFolder setLayoutData heightHint getColors initializeSectionToolBarColors selectedColor1 getColors getColor FormColors TB_BG selectedColor2 getColors getColor FormColors TB_GBG tabFolder setSelectionBackground selectedColor1 selectedColor2 getColors getBackground tabFolder addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateTabSelection createLabel PDEPlugin getResourceString KEY_URL setForeground getColors getColor FormColors urlText createText urlText addModifyListener ModifyListener modifyText ModifyEvent infoModified GridData GridData FILL_HORIZONTAL urlText setLayoutData createLabel createLabel PDEPlugin getResourceString KEY_TEXT setForeground getColors getColor FormColors GridData GridData VERTICAL_ALIGN_BEGINNING setLayoutData V_SCROLL H_SCROLL sourceViewer SourceViewer sourceViewer sourceConfiguration sourceViewer setDocument sourceViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateSelection getSelection StyledText styledText sourceViewer getTextWidget styledText setFont JFaceResources getTextFont styledText setMenu getPage getPDEEditor getContextMenu styledText setData FormToolkit KEY_DRAW_BORDER FormToolkit TEXT_BORDER getPlatform paintBordersFor getChildren GridData GridData FILL_BOTH GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL widthHint heightHint widthHint heightHint setLayoutData buttonContainer createComposite GridLayout marginHeight marginWidth buttonContainer setLayout GridData GridData FILL_VERTICAL buttonContainer setLayoutData applyButton createButton buttonContainer PDEPlugin getResourceString KEY_APPLY applyButton setEnabled GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING applyButton setLayoutData applyButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleApply resetButton createButton buttonContainer PDEPlugin getResourceString KEY_RESET resetButton setEnabled GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING resetButton setLayoutData resetButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleReset createTabs setClient tabFolder getItemCount tabFolder setSelection updateTabSelection
private void update Selection I Selection selection get Page getPDE Editor set Selection selection  updateSelection ISelection getPage getPDEEditor setSelection
public boolean do Global Action String action Id if action Id equals Action Factory CUT get Id source Viewer do Operation Source Viewer CUT return true else if action Id equals Action Factory COPY get Id source Viewer do Operation Source Viewer COPY return true else if action Id equals Action Factory PASTE get Id source Viewer do Operation Source Viewer PASTE return true else if action Id equals Action Factory DELETE get Id source Viewer do Operation Source Viewer DELETE return true else if action Id equals Action Factory UNDO get Id source Viewer do Operation Source Viewer UNDO return true else if action Id equals Action Factory REDO get Id source Viewer do Operation Source Viewer REDO return true return false  doGlobalAction actionId actionId ActionFactory getId sourceViewer doOperation SourceViewer actionId ActionFactory getId sourceViewer doOperation SourceViewer actionId ActionFactory getId sourceViewer doOperation SourceViewer actionId ActionFactory getId sourceViewer doOperation SourceViewer actionId ActionFactory getId sourceViewer doOperation SourceViewer actionId ActionFactory getId sourceViewer doOperation SourceViewer
public boolean set Form Input Object input if input instanceof I Feature Info I Feature Info info I Feature Info input int index info get Index if index 1 tab Folder set Selection index update Editor Input input false return true return false  setFormInput IFeatureInfo IFeatureInfo IFeatureInfo getIndex tabFolder setSelection updateEditorInput
private void handle Apply handle Apply null tab Folder get Selection Index  handleApply handleApply tabFolder getSelectionIndex
private void handle Apply I Feature Info info int index String url Name url Text get Text String text document get update Info Text info url Name text index apply Button set Enabled false reset Button set Enabled false update Tab Image tab Folder get Selection  handleApply IFeatureInfo urlName urlText getText updateInfoText urlName applyButton setEnabled resetButton setEnabled updateTabImage tabFolder getSelection
private void update Info Text I Feature Info target Info String url Text String text int index String url null if url Text length 0 url url Text try I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature I Feature Info info target Info if info null info feature get Feature Info index if target Info null info null info model get Factory create Info index feature set Feature Info info index info setURL url info set Description text catch Core Exception e  updateInfoText IFeatureInfo targetInfo urlText urlText urlText IFeatureModel IFeatureModel getPage getModel IFeature getFeature IFeatureInfo targetInfo getFeatureInfo targetInfo getFactory createInfo setFeatureInfo setDescription CoreException
protected void fill Context Menu I Menu Manager manager get Page getPDE Editor get Contributor context Menu About To Show manager  fillContextMenu IMenuManager getPage getPDEEditor getContributor contextMenuAboutToShow
private void handle Reset update Editor Input element false update Tab Image tab Folder get Selection  handleReset updateEditorInput updateTabImage tabFolder getSelection
I Feature Model feature Model I Feature Model get Page get Model document add Document Listener new I Document Listener public void document Changed Document Event e info Modified  IFeatureModel featureModel IFeatureModel getPage getModel addDocumentListener IDocumentListener documentChanged DocumentEvent infoModified
info Modified public void document About To Be Changed Document Event e  infoModified documentAboutToBeChanged DocumentEvent
public void initialize I Feature Model feature Model I Feature Model get Page get Model document add Document Listener new I Document Listener public void document Changed Document Event e info Modified public void document About To Be Changed Document Event e url Text set Editable feature Model is Editable source Viewer get Text Widget set Editable feature Model is Editable feature Model add Model Changed Listener this update Editor Input feature Model get Feature get Feature Info 0 false  IFeatureModel featureModel IFeatureModel getPage getModel addDocumentListener IDocumentListener documentChanged DocumentEvent infoModified documentAboutToBeChanged DocumentEvent urlText setEditable featureModel isEditable sourceViewer getTextWidget setEditable featureModel isEditable featureModel addModelChangedListener updateEditorInput featureModel getFeature getFeatureInfo
public void dispose I Feature Model feature Model I Feature Model get Page get Model feature Model remove Model Changed Listener this super dispose  IFeatureModel featureModel IFeatureModel getPage getModel featureModel removeModelChangedListener
private void info Modified I Feature Model feature Model I Feature Model get Page get Model if ignore Change feature Model instanceof I Editable mark Dirty apply Button set Enabled true reset Button set Enabled true  infoModified IFeatureModel featureModel IFeatureModel getPage getModel ignoreChange featureModel IEditable markDirty applyButton setEnabled resetButton setEnabled
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED mark Stale  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale
public void refresh I Feature Model model I Feature Model get Page get Model int index tab Folder get Selection Index I Feature Info info model get Feature get Feature Info index element null element Index 1 update Editor Input info false super refresh  IFeatureModel IFeatureModel getPage getModel tabFolder getSelectionIndex IFeatureInfo getFeature getFeatureInfo elementIndex updateEditorInput
private void create Tabs I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature add Tab PDE Plugin get Resource String KEY INFO DESCRIPTION feature get Feature Info 0 add Tab PDE Plugin get Resource String KEY INFO COPYRIGHT feature get Feature Info 1 add Tab PDE Plugin get Resource String KEY INFO LICENSE feature get Feature Info 2  createTabs IFeatureModel IFeatureModel getPage getModel IFeature getFeature addTab PDEPlugin getResourceString KEY_INFO_DESCRIPTION getFeatureInfo addTab PDEPlugin getResourceString KEY_INFO_COPYRIGHT getFeatureInfo addTab PDEPlugin getResourceString KEY_INFO_LICENSE getFeatureInfo
private void add Tab String label I Feature Info info C Tab Item item new C Tab Item tab Folder SWT NULL item set Text label item set Data info update Tab Image item  addTab IFeatureInfo CTabItem CTabItem tabFolder setText setData updateTabImage
private void update Tab Image C Tab Item item if item null return I Feature Info info I Feature Info item get Data if info null return item set Image PDE Plugin get Default get Label Provider get Image info  updateTabImage CTabItem IFeatureInfo IFeatureInfo getData setImage PDEPlugin getDefault getLabelProvider getImage
private void update Tab Selection I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature int index tab Folder get Selection Index I Feature Info info feature get Feature Info index update Editor Input info true  updateTabSelection IFeatureModel IFeatureModel getPage getModel IFeature getFeature tabFolder getSelectionIndex IFeatureInfo getFeatureInfo updateEditorInput
public void set Focus source Viewer get Text Widget set Focus update Selection source Viewer get Selection  setFocus sourceViewer getTextWidget setFocus updateSelection sourceViewer getSelection
private void commit Previous I Feature Info previous I Feature Info element handle Apply previous element Index  commitPrevious IFeatureInfo IFeatureInfo handleApply elementIndex
public void update Editor Input Object input boolean commit Previous if is Dirty commit Previous element null element input commit Previous ignore Change true String text NON NLS 1 String url null if input instanceof I Feature Info I Feature Info info I Feature Info input text info get Description url info getURL if text null text NON NLS 1 else text Text Util create Multi Line text 60 false document set text if url null url Text set Text NON NLS 1 else url Text set Text url to String apply Button set Enabled false reset Button set Enabled false element input element Index tab Folder get Selection Index ignore Change false  updateEditorInput commitPrevious isDirty commitPrevious commitPrevious ignoreChange IFeatureInfo IFeatureInfo IFeatureInfo getDescription TextUtil createMultiLine urlText setText urlText setText toString applyButton setEnabled resetButton setEnabled elementIndex tabFolder getSelectionIndex ignoreChange
public boolean can Paste Clipboard clipboard return source Viewer can Do Operation Source Viewer PASTE  canPaste sourceViewer canDoOperation SourceViewer

public New Feature Plugin Wizard Page I Feature Model model super model false set Title PDE Plugin get Resource String KEY TITLE set Description PDE Plugin get Resource String KEY DESC  NewFeaturePluginWizardPage IFeatureModel setTitle PDEPlugin getResourceString KEY_TITLE setDescription PDEPlugin getResourceString KEY_DESC
protected boolean is On The List I Plugin Model Base candidate I Plugin Base plugin candidate get Plugin Base I Feature Plugin fplugins model get Feature get Plugins for int i 0 i fplugins length i I Feature Plugin fplugin fplugins i if fplugin get Id equals plugin get Id return true return false  isOnTheList IPluginModelBase IPluginBase getPluginBase IFeaturePlugin getFeature getPlugins IFeaturePlugin getId getId
protected void do Add Object candidates I Progress Monitor monitor throws Core Exception monitor begin Task PDE Plugin get Resource String KEY ADDING candidates length 1 I Feature feature model get Feature I Feature Plugin added new I Feature Plugin candidates length for int i 0 i candidates length i I Plugin Model Base candidate I Plugin Model Base candidates i monitor sub Task candidate get Plugin Base get Translated Name Feature Plugin fplugin Feature Plugin model get Factory create Plugin fplugin load From candidate get Plugin Base added i fplugin monitor worked 1 monitor sub Task NON NLS 1 monitor set Task Name PDE Plugin get Resource String KEY UPDATING feature add Plugins added monitor worked 1  doAdd IProgressMonitor CoreException beginTask PDEPlugin getResourceString KEY_ADDING IFeature getFeature IFeaturePlugin IFeaturePlugin IPluginModelBase IPluginModelBase subTask getPluginBase getTranslatedName FeaturePlugin FeaturePlugin getFactory createPlugin loadFrom getPluginBase subTask setTaskName PDEPlugin getResourceString KEY_UPDATING addPlugins
public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Help Context Ids FEATURE ADD PACKAGED WIZARD  createControl createControl WorkbenchHelp setHelp getControl IHelpContextIds FEATURE_ADD_PACKAGED_WIZARD

public New Feature Require Wizard Page I Feature Model model super model true set Title PDE Plugin get Resource String KEY TITLE set Description PDE Plugin get Resource String KEY DESC  NewFeatureRequireWizardPage IFeatureModel setTitle PDEPlugin getResourceString KEY_TITLE setDescription PDEPlugin getResourceString KEY_DESC
protected boolean is On The List I Plugin Model Base candidate I Plugin Base plugin candidate get Plugin Base if candidate is Fragment Model return true I Feature Import imports model get Feature get Imports for int i 0 i imports length i I Feature Import fimport imports i if plugin get Id equals fimport get Id return true don t show plug ins that are listed in this feature I Feature Plugin fplugins model get Feature get Plugins for int i 0 i fplugins length i I Feature Plugin fplugin fplugins i if plugin get Id equals fplugin get Id return true return false  isOnTheList IPluginModelBase IPluginBase getPluginBase isFragmentModel IFeatureImport getFeature getImports IFeatureImport getId getId IFeaturePlugin getFeature getPlugins IFeaturePlugin getId getId
protected void do Add Object candidates I Progress Monitor monitor throws Core Exception monitor begin Task PDE Plugin get Resource String KEY ADDING candidates length 1 I Feature feature model get Feature Array List added new Array List for int i 0 i candidates length i I Plugin Model Base candidate I Plugin Model Base candidates i I Plugin Base plugin Base candidate get Plugin Base if candidate is Fragment Model continue monitor sub Task plugin Base get Translated Name Feature Import fimport Feature Import model get Factory create Import fimport set Plugin I Plugin candidate get Plugin Base fimport set Id plugin Base get Id added add fimport monitor worked 1 monitor sub Task NON NLS 1 monitor set Task Name PDE Plugin get Resource String KEY UPDATING feature add Imports I Feature Import added to Array new I Feature Import added size monitor worked 1  doAdd IProgressMonitor CoreException beginTask PDEPlugin getResourceString KEY_ADDING IFeature getFeature ArrayList ArrayList IPluginModelBase IPluginModelBase IPluginBase pluginBase getPluginBase isFragmentModel subTask pluginBase getTranslatedName FeatureImport FeatureImport getFactory createImport setPlugin IPlugin getPluginBase setId pluginBase getId subTask setTaskName PDEPlugin getResourceString KEY_UPDATING addImports IFeatureImport toArray IFeatureImport
public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Help Context Ids FEATURE ADD REQUIRED WIZARD  createControl createControl WorkbenchHelp setHelp getControl IHelpContextIds FEATURE_ADD_REQUIRED_WIZARD

public static final String LABEL Actions open label NON NLS 1 public Open Reference Action I Selection Provider provider super provider PDE Plugin get Resource String LABEL  OpenReferenceAction ISelectionProvider PDEPlugin getResourceString
public void run I Structured Selection sel I Structured Selection get Selection Object obj sel get First Element I File file null if obj instanceof Feature Plugin Feature Plugin reference Feature Plugin obj I Plugin Base plugin Base reference get Plugin Base if plugin Base null file I File plugin Base get Model get Underlying Resource else if obj instanceof I Feature Data I Feature Data data I Feature Data obj String id data get Id I Resource resource data get Model get Underlying Resource if resource null I Project project resource get Project file project get File id else if obj instanceof I Site Build Feature I Site Build Feature sfeature I Site Build Feature obj I Feature feature sfeature get Referenced Feature if feature null file I File feature get Model get Underlying Resource if file null file exists I Workbench Page page PDE Plugin get Active Page try IDE open Editor page file true catch Part Init Exception e  IStructuredSelection IStructuredSelection getSelection getFirstElement IFile FeaturePlugin FeaturePlugin FeaturePlugin IPluginBase pluginBase getPluginBase pluginBase IFile pluginBase getModel getUnderlyingResource IFeatureData IFeatureData IFeatureData getId IResource getModel getUnderlyingResource IProject getProject getFile ISiteBuildFeature ISiteBuildFeature ISiteBuildFeature IFeature getReferencedFeature IFile getModel getUnderlyingResource IWorkbenchPage PDEPlugin getActivePage openEditor PartInitException
public void selection Changed I Structured Selection selection set Enabled selection is Empty  selectionChanged IStructuredSelection setEnabled isEmpty

private boolean fragment public Plugin Reference I Feature Plugin reference I Plugin Model Base model this reference reference this model model  PluginReference IFeaturePlugin IPluginModelBase
this model model public I Plugin Model Base get Model return model  IPluginModelBase getModel
return model public I Feature Plugin get Reference return reference  IFeaturePlugin getReference
return reference public boolean is Fragment return fragment  isFragment
public boolean is In Sync if model null return false if reference null return true if reference get Id equals model get Plugin Base get Id return false if reference get Version equals model get Plugin Base get Version return false return true  isInSync getId getPluginBase getId getVersion getPluginBase getVersion
return true public boolean is Unresolved return false  isUnresolved
return false public void set Fragment boolean new Fragment fragment new Fragment  setFragment newFragment newFragment
fragment new Fragment public void set Model I Plugin Model Base new Model model new Model  newFragment setModel IPluginModelBase newModel newModel
model new Model public void set Reference I Feature Plugin new Reference reference new Reference  newModel setReference IFeaturePlugin newReference newReference
reference new Reference public String to String String name model get Plugin Base get Name return model get Resource String name  newReference toString getPluginBase getName getResourceString

implements I Structured Content Provider public Object get Elements Object parent if parent instanceof I Feature return I Feature parent get Plugins return new Object 0  IStructuredContentProvider getElements IFeature IFeature getPlugins
public Plugin Section Feature Reference Page page Composite parent super page parent Section DESCRIPTION new String PDE Plugin get Resource String KEY NEW get Section set Text PDE Plugin get Resource String PLUGIN TITLE get Section set Description PDE Plugin get Resource String PLUGIN DESC get Table Part set Editable false  PluginSection FeatureReferencePage PDEPlugin getResourceString KEY_NEW getSection setText PDEPlugin getResourceString PLUGIN_TITLE getSection setDescription PDEPlugin getResourceString PLUGIN_DESC getTablePart setEditable
public void commit boolean on Save super commit on Save  onSave onSave
public void create Client Section section Form Toolkit toolkit Composite container create Client Container section 2 toolkit Grid Layout layout Grid Layout container get Layout layout vertical Spacing 9 create Viewer Part Control container SWT MULTI 2 toolkit Table Part table Part get Table Part plugin Viewer table Part get Table Viewer plugin Viewer set Content Provider new Plugin Content Provider plugin Viewer set Label Provider PDE Plugin get Default get Label Provider plugin Viewer set Sorter List Util NAME SORTER toolkit paint Borders For container make Actions section set Client container initialize  createClient FormToolkit createClientContainer GridLayout GridLayout getLayout verticalSpacing createViewerPartControl TablePart tablePart getTablePart pluginViewer tablePart getTableViewer pluginViewer setContentProvider PluginContentProvider pluginViewer setLabelProvider PDEPlugin getDefault getLabelProvider pluginViewer setSorter ListUtil NAME_SORTER paintBordersFor makeActions setClient
protected void handle Double Click I Structured Selection selection open Action run  handleDoubleClick IStructuredSelection openAction
protected void button Selected int index if index 0 handle New  buttonSelected handleNew
public void dispose I Feature Model model I Feature Model get Page get Model if model null model remove Model Changed Listener this Workspace Model Manager mng PDE Core get Default get Workspace Model Manager mng remove Model Provider Listener this super dispose  IFeatureModel IFeatureModel getPage getModel removeModelChangedListener WorkspaceModelManager PDECore getDefault getWorkspaceModelManager removeModelProviderListener
public boolean set Form Input Object object if object instanceof I Feature Plugin plugin Viewer set Selection new Structured Selection object true return true return false  setFormInput IFeaturePlugin pluginViewer setSelection StructuredSelection
protected void fill Context Menu I Menu Manager manager manager add open Action add new manager add new Separator manager add new Action manager add delete Action add delete get Page getPDE Editor get Contributor context Menu About To Show manager manager add new Separator manager add properties Action  fillContextMenu IMenuManager openAction newAction deleteAction getPage getPDEEditor getContributor contextMenuAboutToShow propertiesAction
Busy Indicator show While plugin Viewer get Table get Display new Runnable public void run New Feature Plugin Wizard Page page new New Feature Plugin Wizard Page model Reference Wizard wizard new Reference Wizard model page Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create dialog open  BusyIndicator showWhile pluginViewer getTable getDisplay NewFeaturePluginWizardPage NewFeaturePluginWizardPage ReferenceWizard ReferenceWizard WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell
private void handle New final I Feature Model model I Feature Model get Page get Model Busy Indicator show While plugin Viewer get Table get Display new Runnable public void run New Feature Plugin Wizard Page page new New Feature Plugin Wizard Page model Reference Wizard wizard new Reference Wizard model page Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create dialog open  handleNew IFeatureModel IFeatureModel getPage getModel BusyIndicator showWhile pluginViewer getTable getDisplay NewFeaturePluginWizardPage NewFeaturePluginWizardPage ReferenceWizard ReferenceWizard WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell
private void handle Select All I Structured Content Provider provider I Structured Content Provider plugin Viewer get Content Provider Object elements provider get Elements plugin Viewer get Input Structured Selection ssel new Structured Selection elements plugin Viewer set Selection ssel  handleSelectAll IStructuredContentProvider IStructuredContentProvider pluginViewer getContentProvider getElements pluginViewer getInput StructuredSelection StructuredSelection pluginViewer setSelection
private void handle Delete I Structured Selection ssel I Structured Selection plugin Viewer get Selection if ssel is Empty return I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature try I Feature Plugin removed new I Feature Plugin ssel size int i 0 for Iterator iter ssel iterator iter has Next I Feature Plugin iobj I Feature Plugin iter next removed i iobj feature remove Plugins removed catch Core Exception e PDE Plugin log Exception e  handleDelete IStructuredSelection IStructuredSelection pluginViewer getSelection isEmpty IFeatureModel IFeatureModel getPage getModel IFeature getFeature IFeaturePlugin IFeaturePlugin hasNext IFeaturePlugin IFeaturePlugin removePlugins CoreException PDEPlugin logException
if action Id equals Action Factory DELETE get Id Busy Indicator show While plugin Viewer get Table get Display new Runnable public void run handle Delete  actionId ActionFactory getId BusyIndicator showWhile pluginViewer getTable getDisplay handleDelete
if action Id equals Action Factory SELECT ALL get Id Busy Indicator show While plugin Viewer get Table get Display new Runnable public void run handle Select All  actionId ActionFactory SELECT_ALL getId BusyIndicator showWhile pluginViewer getTable getDisplay handleSelectAll
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id Busy Indicator show While plugin Viewer get Table get Display new Runnable public void run handle Delete return true if action Id equals Action Factory CUT get Id delete here and let the editor transfer the selection to the clipboard handle Delete return false if action Id equals Action Factory PASTE get Id do Paste return true if action Id equals Action Factory SELECT ALL get Id Busy Indicator show While plugin Viewer get Table get Display new Runnable public void run handle Select All return true return false  doGlobalAction actionId actionId ActionFactory getId BusyIndicator showWhile pluginViewer getTable getDisplay handleDelete actionId ActionFactory getId handleDelete actionId ActionFactory getId doPaste actionId ActionFactory SELECT_ALL getId BusyIndicator showWhile pluginViewer getTable getDisplay handleSelectAll
return false protected void selection Changed I Structured Selection selection get Page getPDE Editor set Selection selection  selectionChanged IStructuredSelection getPage getPDEEditor setSelection
public void initialize I Feature Model model I Feature Model get Page get Model refresh get Table Part set Button Enabled 0 model is Editable model add Model Changed Listener this Workspace Model Manager mng PDE Core get Default get Workspace Model Manager mng add Model Provider Listener this  IFeatureModel IFeatureModel getPage getModel getTablePart setButtonEnabled isEditable addModelChangedListener WorkspaceModelManager PDECore getDefault getWorkspaceModelManager addModelProviderListener
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED mark Stale return else Object obj e get Changed Objects 0 if obj instanceof I Feature Plugin if e get Change Type I Model Changed Event CHANGE plugin Viewer update obj null else if e get Change Type I Model Changed Event INSERT plugin Viewer add e get Changed Objects else if e get Change Type I Model Changed Event REMOVE plugin Viewer remove e get Changed Objects  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale getChangedObjects IFeaturePlugin getChangeType IModelChangedEvent pluginViewer getChangeType IModelChangedEvent pluginViewer getChangedObjects getChangeType IModelChangedEvent pluginViewer getChangedObjects
I Model model I Model get Page get Model new Action new Action public void run handle New  IModel IModel getPage getModel newAction handleNew
public void run Busy Indicator show While plugin Viewer get Table get Display new Runnable public void run handle Delete  BusyIndicator showWhile pluginViewer getTable getDisplay handleDelete
delete Action new Action public void run Busy Indicator show While plugin Viewer get Table get Display new Runnable public void run handle Delete  deleteAction BusyIndicator showWhile pluginViewer getTable getDisplay handleDelete
private void make Actions I Model model I Model get Page get Model new Action new Action public void run handle New new Action set Text PDE Plugin get Resource String POPUP NEW new Action set Enabled model is Editable delete Action new Action public void run Busy Indicator show While plugin Viewer get Table get Display new Runnable public void run handle Delete delete Action set Text PDE Plugin get Resource String POPUP DELETE delete Action set Enabled model is Editable open Action new Open Reference Action plugin Viewer properties Action new Properties Action get Page getPDE Editor  makeActions IModel IModel getPage getModel newAction handleNew newAction setText PDEPlugin getResourceString POPUP_NEW newAction setEnabled isEditable deleteAction BusyIndicator showWhile pluginViewer getTable getDisplay handleDelete deleteAction setText PDEPlugin getResourceString POPUP_DELETE deleteAction setEnabled isEditable openAction OpenReferenceAction pluginViewer propertiesAction PropertiesAction getPage getPDEEditor
public void models Changed I Model Provider Event event I Model added event get Added Models I Model removed event get Removed Models I Model changed event get Changed Models if has Plugin Models added has Plugin Models removed has Plugin Models changed mark Stale  modelsChanged IModelProviderEvent IModel getAddedModels IModel getRemovedModels IModel getChangedModels hasPluginModels hasPluginModels hasPluginModels markStale
private boolean has Plugin Models I Model models if models null return false if models length 0 return false for int i 0 i models length i if models i instanceof I Plugin Model Base return true return false  hasPluginModels IModel IPluginModelBase
public void set Focus if plugin Viewer null plugin Viewer get Table set Focus  setFocus pluginViewer pluginViewer getTable setFocus
public void refresh I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature plugin Viewer set Input feature super refresh  IFeatureModel IFeatureModel getPage getModel IFeature getFeature pluginViewer setInput
see org eclipse pde internal ui editor Structured Viewer Section can Paste Clipboard public boolean can Paste Clipboard clipboard Object objects Object clipboard get Contents Model Data Transfer get Instance if objects null objects length 0 return can Paste null objects return false  StructuredViewerSection canPaste canPaste getContents ModelDataTransfer getInstance canPaste
see org eclipse pde internal ui editor Structured Viewer Section can Paste Object Object protected boolean can Paste Object target Object objects for int i 0 i objects length i if objects i instanceof Feature Plugin return false return true  StructuredViewerSection canPaste canPaste FeaturePlugin
see org eclipse pde internal ui editor Structured Viewer Section do Paste protected void do Paste Clipboard clipboard get Page getPDE Editor get Clipboard Object objects Object clipboard get Contents Model Data Transfer get Instance if objects null can Paste null objects do Paste null objects  StructuredViewerSection doPaste doPaste getPage getPDEEditor getClipboard getContents ModelDataTransfer getInstance canPaste doPaste
see org eclipse pde internal ui editor Structured Viewer Section do Paste Object Object protected void do Paste Object target Object objects I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature Feature Plugin f Plugins new Feature Plugin objects length try for int i 0 i objects length i Feature Plugin f Plugin Feature Plugin objects i f Plugin set Model model f Plugin set Parent feature f Plugin hook With Workspace f Plugins i f Plugin feature add Plugins f Plugins catch Core Exception e PDE Plugin log Exception e  StructuredViewerSection doPaste doPaste IFeatureModel IFeatureModel getPage getModel IFeature getFeature FeaturePlugin fPlugins FeaturePlugin FeaturePlugin fPlugin FeaturePlugin fPlugin setModel fPlugin setParent fPlugin hookWithWorkspace fPlugins fPlugin addPlugins fPlugins CoreException PDEPlugin logException

public Portability Choice Cell Editor Composite parent Choice choices super parent this choices choices  PortabilityChoiceCellEditor
protected Control create Contents Composite cell label new Label cell SWT LEFT label set Font cell get Font label set Background cell get Background return label  createContents setFont getFont setBackground getBackground
protected Object open Dialog Box Control cell Editor Window String value String get Value Portability Choices Dialog dialog new Portability Choices Dialog PDE Plugin get Active Workbench Shell choices value dialog create dialog get Shell set Text PDE Plugin get Resource String KEY TITLE dialog get Shell set Size 300 400 int result dialog open if result Portability Choices Dialog OK return dialog get Value return value  openDialogBox cellEditorWindow getValue PortabilityChoicesDialog PortabilityChoicesDialog PDEPlugin getActiveWorkbenchShell getShell setText PDEPlugin getResourceString KEY_TITLE getShell setSize PortabilityChoicesDialog getValue
protected void update Contents Object value if value null label set Text value to String else label set Text NON NLS 1  updateContents setText toString setText

public Portability Choice Descriptor String name String display Name Choice choices boolean read Only super name display Name this read Only read Only this choices choices  PortabilityChoiceDescriptor displayName readOnly displayName readOnly readOnly
this choices choices public Cell Editor create Property Editor Composite parent if read Only return null return new Portability Choice Cell Editor parent choices  CellEditor createPropertyEditor readOnly PortabilityChoiceCellEditor
public boolean is Compatible With I Property Descriptor another Property if get Always Incompatible return false if another Property instanceof Portability Choice Descriptor Portability Choice Descriptor spd Portability Choice Descriptor another Property Compare Name if spd get Id equals get Id return false Compare Display Name if spd get Display Name equals get Display Name return false Compare Category if get Category null if spd get Category null return false else if get Category equals spd get Category return false Nothing was different return true return false  isCompatibleWith IPropertyDescriptor anotherProperty getAlwaysIncompatible anotherProperty PortabilityChoiceDescriptor PortabilityChoiceDescriptor PortabilityChoiceDescriptor anotherProperty getId getId DisplayName getDisplayName getDisplayName getCategory getCategory getCategory getCategory

class Content Provider extends Default Table Provider public Object get Elements Object parent return choices  ContentProvider DefaultTableProvider getElements
extends Label Provider implements I Table Label Provider public String get Column Text Object obj int index return Choice obj get Label  LabelProvider ITableLabelProvider getColumnText getLabel
public Image get Column Image Object obj int index return null  getColumnImage
public Portability Choices Dialog Shell shell Choice choices String value super shell this value value this choices choices checkbox Table Part new Wizard Checkbox Table Part PDE Plugin get Resource String KEY CHOICES  PortabilityChoicesDialog checkboxTablePart WizardCheckboxTablePart PDEPlugin getResourceString KEY_CHOICES
protected void create Buttons For Button Bar Composite parent create OK and Cancel buttons by default create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
protected Control create Dialog Area Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width layout margin Height 9 container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH container set Layout Data gd checkbox Table Part create Control container choice Viewer checkbox Table Part get Table Viewer choice Viewer set Content Provider new Content Provider choice Viewer set Label Provider new Choice Label Provider gd Grid Data checkbox Table Part get Control get Layout Data gd width Hint 300 gd height Hint 350 initialize Workbench Help set Help container I Help Context Ids FEATURE PORTABILITY WIZARD return container  createDialogArea GridLayout GridLayout numColumns marginWidth marginHeight setLayout GridData GridData GridData FILL_BOTH setLayoutData checkboxTablePart createControl choiceViewer checkboxTablePart getTableViewer choiceViewer setContentProvider ContentProvider choiceViewer setLabelProvider ChoiceLabelProvider GridData checkboxTablePart getControl getLayoutData widthHint heightHint WorkbenchHelp setHelp IHelpContextIds FEATURE_PORTABILITY_WIZARD
return container public String get Value return value  getValue
protected void initialize choice Viewer set Input PDE Plugin get Default if value null Vector selected new Vector String Tokenizer stok new String Tokenizer value NON NLS 1 while stok has More Elements String tok stok next Token Choice choice find Choice tok if choice null selected add choice checkbox Table Part set Selection selected to Array else checkbox Table Part select All false  choiceViewer setInput PDEPlugin getDefault StringTokenizer StringTokenizer hasMoreElements nextToken findChoice checkboxTablePart setSelection toArray checkboxTablePart selectAll
private Choice find Choice String value for int i 0 i choices length i Choice choice choices i if choice get Value equals Ignore Case value return choice return null  findChoice getValue equalsIgnoreCase
protected void ok Pressed value compute New Value super ok Pressed  okPressed computeNewValue okPressed
private String compute New Value Object checked checkbox Table Part get Selection if checked length 0 return NON NLS 1 String Buffer buf new String Buffer for int i 0 i checked length i Choice choice Choice checked i if i 0 buf append NON NLS 1 buf append choice get Value return buf to String  computeNewValue checkboxTablePart getSelection StringBuffer StringBuffer getValue toString

public Portability Section Feature Form Page page Composite parent this page parent PDE Plugin get Resource String SECTION TITLE PDE Plugin get Resource String SECTION DESC Section TWISTIE  PortabilitySection FeatureFormPage PDEPlugin getResourceString SECTION_TITLE PDEPlugin getResourceString SECTION_DESC
public Portability Section PDE Form Page page Composite parent String title String desc int toggle Style super page parent Section DESCRIPTION toggle Style this react To Selections toggle Style SWT NULL get Section set Text title get Section set Description desc if react To Selections I Feature Model model I Feature Model page get Model I Feature feature model get Feature get Section set Expanded feature getOS null feature getWS null feature getNL null feature get Arch null create Client get Section page get Managed Form get Toolkit  PortabilitySection PDEFormPage toggleStyle toggleStyle reactToSelections toggleStyle getSection setText getSection setDescription reactToSelections IFeatureModel IFeatureModel getModel IFeature getFeature getSection setExpanded getArch createClient getSection getManagedForm getToolkit
public boolean can Paste Clipboard clipboard Transfer Data types clipboard get Available Types Transfer transfers new Transfer Text Transfer get Instance RTF Transfer get Instance for int i 0 i types length i for int j 0 j transfers length j if transfers j is Supported Type types i return true return false  canPaste TransferData getAvailableTypes TextTransfer getInstance RTFTransfer getInstance isSupportedType
public void commit boolean on Save os Text commit ws Text commit if nl Text null nl Text commit arch Text commit super commit on Save  onSave osText wsText nlText nlText archText onSave
os Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try apply Value I Environment P OS text get Value catch Core Exception e PDE Plugin log Exception e  osText setFormEntryListener FormEntryAdapter textValueChanged FormEntry applyValue IEnvironment P_OS getValue CoreException PDEPlugin logException
new Runnable public void run Choice choices Reference Property Source getOS Choices open Portability Choice Dialog os Text choices  ReferencePropertySource getOSChoices openPortabilityChoiceDialog osText
public void browse Button Selected Form Entry entry Busy Indicator show While os Text get Text get Display new Runnable public void run Choice choices Reference Property Source getOS Choices open Portability Choice Dialog os Text choices  browseButtonSelected FormEntry BusyIndicator showWhile osText getText getDisplay ReferencePropertySource getOSChoices openPortabilityChoiceDialog osText
ws Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try apply Value I Environment P WS text get Value catch Core Exception e PDE Plugin log Exception e  wsText setFormEntryListener FormEntryAdapter textValueChanged FormEntry applyValue IEnvironment P_WS getValue CoreException PDEPlugin logException
new Runnable public void run Choice choices Reference Property Source getWS Choices open Portability Choice Dialog ws Text choices  ReferencePropertySource getWSChoices openPortabilityChoiceDialog wsText
public void browse Button Selected Form Entry entry Busy Indicator show While ws Text get Text get Display new Runnable public void run Choice choices Reference Property Source getWS Choices open Portability Choice Dialog ws Text choices  browseButtonSelected FormEntry BusyIndicator showWhile wsText getText getDisplay ReferencePropertySource getWSChoices openPortabilityChoiceDialog wsText
nl Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try apply Value I Feature P NL text get Value catch Core Exception e PDE Plugin log Exception e  nlText setFormEntryListener FormEntryAdapter textValueChanged FormEntry applyValue IFeature P_NL getValue CoreException PDEPlugin logException
new Runnable public void run Choice choices Reference Property Source getNL Choices open Portability Choice Dialog nl Text choices  ReferencePropertySource getNLChoices openPortabilityChoiceDialog nlText
public void browse Button Selected Form Entry entry Busy Indicator show While nl Text get Text get Display new Runnable public void run Choice choices Reference Property Source getNL Choices open Portability Choice Dialog nl Text choices  browseButtonSelected FormEntry BusyIndicator showWhile nlText getText getDisplay ReferencePropertySource getNLChoices openPortabilityChoiceDialog nlText
arch Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try apply Value I Environment P ARCH text get Value catch Core Exception e PDE Plugin log Exception e  archText setFormEntryListener FormEntryAdapter textValueChanged FormEntry applyValue IEnvironment P_ARCH getValue CoreException PDEPlugin logException
new Runnable public void run Choice choices Reference Property Source get Arch Choices open Portability Choice Dialog arch Text choices  ReferencePropertySource getArchChoices openPortabilityChoiceDialog archText
public void browse Button Selected Form Entry entry Busy Indicator show While arch Text get Text get Display new Runnable public void run Choice choices Reference Property Source get Arch Choices open Portability Choice Dialog arch Text choices  browseButtonSelected FormEntry BusyIndicator showWhile archText getText getDisplay ReferencePropertySource getArchChoices openPortabilityChoiceDialog archText
public void create Client Section section Form Toolkit toolkit Composite container toolkit create Composite section Grid Layout layout new Grid Layout layout num Columns 3 layout vertical Spacing 9 layout horizontal Spacing 6 container set Layout layout String edit Label PDE Plugin get Resource String SECTION EDIT os Text new Form Entry container toolkit PDE Plugin get Resource String SECTION OS edit Label false os Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try apply Value I Environment P OS text get Value catch Core Exception e PDE Plugin log Exception e public void browse Button Selected Form Entry entry Busy Indicator show While os Text get Text get Display new Runnable public void run Choice choices Reference Property Source getOS Choices open Portability Choice Dialog os Text choices limit Text Width os Text ws Text new Form Entry container toolkit PDE Plugin get Resource String SECTION WS edit Label false ws Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try apply Value I Environment P WS text get Value catch Core Exception e PDE Plugin log Exception e public void browse Button Selected Form Entry entry Busy Indicator show While ws Text get Text get Display new Runnable public void run Choice choices Reference Property Source getWS Choices open Portability Choice Dialog ws Text choices limit Text Width ws Text if react To Selections nl Text new Form Entry container toolkit PDE Plugin get Resource String SECTION NL edit Label false nl Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try apply Value I Feature P NL text get Value catch Core Exception e PDE Plugin log Exception e public void browse Button Selected Form Entry entry Busy Indicator show While nl Text get Text get Display new Runnable public void run Choice choices Reference Property Source getNL Choices open Portability Choice Dialog nl Text choices limit Text Width nl Text arch Text new Form Entry container toolkit PDE Plugin get Resource String SECTION ARCH edit Label false arch Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text try apply Value I Environment P ARCH text get Value catch Core Exception e PDE Plugin log Exception e public void browse Button Selected Form Entry entry Busy Indicator show While arch Text get Text get Display new Runnable public void run Choice choices Reference Property Source get Arch Choices open Portability Choice Dialog arch Text choices limit Text Width arch Text toolkit paint Borders For container section set Client container  createClient FormToolkit createComposite GridLayout GridLayout numColumns verticalSpacing horizontalSpacing setLayout editLabel PDEPlugin getResourceString SECTION_EDIT osText FormEntry PDEPlugin getResourceString SECTION_OS editLabel osText setFormEntryListener FormEntryAdapter textValueChanged FormEntry applyValue IEnvironment P_OS getValue CoreException PDEPlugin logException browseButtonSelected FormEntry BusyIndicator showWhile osText getText getDisplay ReferencePropertySource getOSChoices openPortabilityChoiceDialog osText limitTextWidth osText wsText FormEntry PDEPlugin getResourceString SECTION_WS editLabel wsText setFormEntryListener FormEntryAdapter textValueChanged FormEntry applyValue IEnvironment P_WS getValue CoreException PDEPlugin logException browseButtonSelected FormEntry BusyIndicator showWhile wsText getText getDisplay ReferencePropertySource getWSChoices openPortabilityChoiceDialog wsText limitTextWidth wsText reactToSelections nlText FormEntry PDEPlugin getResourceString SECTION_NL editLabel nlText setFormEntryListener FormEntryAdapter textValueChanged FormEntry applyValue IFeature P_NL getValue CoreException PDEPlugin logException browseButtonSelected FormEntry BusyIndicator showWhile nlText getText getDisplay ReferencePropertySource getNLChoices openPortabilityChoiceDialog nlText limitTextWidth nlText archText FormEntry PDEPlugin getResourceString SECTION_ARCH editLabel archText setFormEntryListener FormEntryAdapter textValueChanged FormEntry applyValue IEnvironment P_ARCH getValue CoreException PDEPlugin logException browseButtonSelected FormEntry BusyIndicator showWhile archText getText getDisplay ReferencePropertySource getArchChoices openPortabilityChoiceDialog archText limitTextWidth archText paintBordersFor setClient
private void limit Text Width Form Entry entry Grid Data gd Grid Data entry get Text get Layout Data if react To Selections gd width Hint 30 else gd width Hint 150  limitTextWidth FormEntry GridData GridData getText getLayoutData reactToSelections widthHint widthHint
private void open Portability Choice Dialog Form Entry text Choice choices String value text get Value Portability Choices Dialog dialog new Portability Choices Dialog PDE Plugin get Active Workbench Shell choices value dialog create dialog get Shell set Text PDE Plugin get Resource String KEY DIALOG TITLE dialog get Shell set Size 300 400 int result dialog open if result Portability Choices Dialog OK value dialog get Value text set Value value  openPortabilityChoiceDialog FormEntry getValue PortabilityChoicesDialog PortabilityChoicesDialog PDEPlugin getActiveWorkbenchShell getShell setText PDEPlugin getResourceString KEY_DIALOG_TITLE getShell setSize PortabilityChoicesDialog getValue setValue
private I Feature get Feature I Feature Model model I Feature Model get Page get Model return model get Feature  IFeature getFeature IFeatureModel IFeatureModel getPage getModel getFeature
private void apply Value String property String value throws Core Exception if react To Selections if current Input null return for Iterator iter current Input iterator iter has Next I Environment env I Environment iter next apply Value env property value else apply Value get Feature property value  applyValue CoreException reactToSelections currentInput currentInput hasNext IEnvironment IEnvironment applyValue applyValue getFeature
private void set Value String property if react To Selections if current Input null clear Field property else if current Input size 1 set Value I Environment current Input get First Element property else I Environment leader null String lvalue null for Iterator iter current Input iterator iter has Next I Environment next I Environment iter next if leader null String nvalue get Value next property if nvalue null break leader next lvalue nvalue else String nvalue get Value next property if nvalue null lvalue equals nvalue leader null break if leader null clear Field property else set Value leader property else set Value get Feature property  setValue reactToSelections currentInput clearField currentInput setValue IEnvironment currentInput getFirstElement IEnvironment currentInput hasNext IEnvironment IEnvironment getValue getValue clearField setValue setValue getFeature
private String get Value I Environment obj String property if property equals I Environment P OS return obj getOS if property equals I Environment P WS return obj getWS if property equals I Environment P ARCH return obj get Arch return null  getValue IEnvironment IEnvironment P_OS IEnvironment P_WS IEnvironment P_ARCH getArch
private void apply Value I Environment obj String property String value throws Core Exception if property equals I Feature P NL I Feature obj setNL value else if property equals I Feature P OS obj setOS value else if property equals I Feature P WS obj setWS value else if property equals I Feature P ARCH obj set Arch value  applyValue IEnvironment CoreException IFeature P_NL IFeature IFeature P_OS IFeature P_WS IFeature P_ARCH setArch
private void set Value I Environment obj String property if property equals I Feature P NL set If Defined nl Text I Feature obj getNL else if property equals I Feature P OS set If Defined os Text obj getOS else if property equals I Feature P WS set If Defined ws Text obj getWS else if property equals I Feature P ARCH set If Defined arch Text obj get Arch  setValue IEnvironment IFeature P_NL setIfDefined nlText IFeature IFeature P_OS setIfDefined osText IFeature P_WS setIfDefined wsText IFeature P_ARCH setIfDefined archText getArch
public void dispose I Feature Model model I Feature Model get Page get Model if model null model remove Model Changed Listener this super dispose  IFeatureModel IFeatureModel getPage getModel removeModelChangedListener
public void initialize I Feature Model model I Feature Model get Page get Model enable For Input model is Editable refresh model add Model Changed Listener this  IFeatureModel IFeatureModel getPage getModel enableForInput isEditable addModelChangedListener
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED mark Stale  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale
public void set Focus if os Text null os Text get Text set Focus  setFocus osText osText getText setFocus
private void set If Defined Form Entry form Text String value form Text set Value value true  setIfDefined FormEntry formText formText setValue
private void enable For Input boolean enable os Text get Text set Editable enable ws Text get Text set Editable enable if nl Text null nl Text get Text set Editable enable arch Text get Text set Editable enable os Text get Button set Enabled enable ws Text get Button set Enabled enable if nl Text null nl Text get Button set Enabled enable arch Text get Button set Enabled enable  enableForInput osText getText setEditable wsText getText setEditable nlText nlText getText setEditable archText getText setEditable osText getButton setEnabled wsText getButton setEnabled nlText nlText getButton setEnabled archText getButton setEnabled
private void clear Fields os Text set Value null true ws Text set Value null true if nl Text null nl Text set Value null true arch Text set Value null true  clearFields osText setValue wsText setValue nlText nlText setValue archText setValue
private void clear Field String property if property equals I Environment P OS os Text set Value null true else if property equals I Environment P WS ws Text set Value null true else if property equals I Environment P ARCH arch Text set Value null true  clearField IEnvironment P_OS osText setValue IEnvironment P_WS wsText setValue IEnvironment P_ARCH archText setValue
public void refresh if react To Selections current Input null clear Fields enable For Input false super refresh return enable For Input true set Value I Environment P OS set Value I Environment P WS set Value I Environment P ARCH if nl Text null set Value I Feature P NL super refresh  reactToSelections currentInput clearFields enableForInput enableForInput setValue IEnvironment P_OS setValue IEnvironment P_WS setValue IEnvironment P_ARCH nlText setValue IFeature P_NL
public void selection Changed I Form Part part I Selection selection if selection instanceof I Structured Selection current Input I Structured Selection selection if current Input is Empty current Input null else current Input null refresh  selectionChanged IFormPart ISelection IStructuredSelection currentInput IStructuredSelection currentInput isEmpty currentInput currentInput
public void cancel Edit os Text cancel Edit ws Text cancel Edit nl Text cancel Edit arch Text cancel Edit super cancel Edit  cancelEdit osText cancelEdit wsText cancelEdit nlText cancelEdit archText cancelEdit cancelEdit

public class Version Provider extends Label Provider public Image get Image Object obj String original Version get Original Version I Feature Plugin ref get Plugin Reference boolean in Sync ref get Version equals original Version return in Sync null error Image  VersionProvider LabelProvider getImage originalVersion getOriginalVersion IFeaturePlugin getPluginReference inSync getVersion originalVersion inSync errorImage
public Reference Property Source I Feature Plugin reference Image error Image super reference this error Image error Image  ReferencePropertySource IFeaturePlugin errorImage errorImage errorImage
private String get Original Version I Plugin Base plugin Base get Plugin Base if plugin Base null return NON NLS 1 return plugin Base get Version  getOriginalVersion IPluginBase pluginBase getPluginBase pluginBase pluginBase getVersion
private I Plugin Base get Plugin Base if plugin Base null I Feature Plugin reference get Plugin Reference if reference get Model get Underlying Resource null return null String id reference get Id Workspace Model Manager manager PDE Core get Default get Workspace Model Manager I Plugin Model Base models null if reference is Fragment models manager get Fragment Models else models manager get Plugin Models for int i 0 i models length i I Plugin Model Base model Base models i I Plugin Base candidate model Base get Plugin Base if candidate get Id equals id plugin Base candidate break return plugin Base  IPluginBase getPluginBase pluginBase IFeaturePlugin getPluginReference getModel getUnderlyingResource getId WorkspaceModelManager PDECore getDefault getWorkspaceModelManager IPluginModelBase isFragment getFragmentModels getPluginModels IPluginModelBase modelBase IPluginBase modelBase getPluginBase getId pluginBase pluginBase
return plugin Base public I Feature Plugin get Plugin Reference return I Feature Plugin object  pluginBase IFeaturePlugin getPluginReference IFeaturePlugin
protected void create Property Descriptors super create Property Descriptors Property Descriptor desc desc new Property Descriptor P NAME PDE Plugin get Resource String KEY NAME descriptors add Element desc desc create Text Property Descriptor P VERSION PDE Plugin get Resource String KEY VERSION desc set Label Provider new Version Provider descriptors add Element desc desc new Property Descriptor P REF VERSION PDE Plugin get Resource String KEY ORIGINAL VERSION  createPropertyDescriptors createPropertyDescriptors PropertyDescriptor PropertyDescriptor P_NAME PDEPlugin getResourceString KEY_NAME addElement createTextPropertyDescriptor P_VERSION PDEPlugin getResourceString KEY_VERSION setLabelProvider VersionProvider addElement PropertyDescriptor P_REF_VERSION PDEPlugin getResourceString KEY_ORIGINAL_VERSION
public Object get Property Value Object name if name equals P NAME return get Plugin Reference get Label if name equals P VERSION return get Plugin Reference get Version if name equals P REF VERSION return get Original Version return super get Property Value name  getPropertyValue P_NAME getPluginReference getLabel P_VERSION getPluginReference getVersion P_REF_VERSION getOriginalVersion getPropertyValue
return super get Property Value name public void set Element I Feature Plugin plugin object plugin  getPropertyValue setElement IFeaturePlugin
public void set Property Value Object name Object value String svalue value to String String real Value svalue null svalue length 0 null svalue try if name equals P NAME get Plugin Reference set Label real Value else if name equals P VERSION get Plugin Reference set Version real Value else super set Property Value name value catch Core Exception e PDE Plugin log Exception e  setPropertyValue toString realValue P_NAME getPluginReference setLabel realValue P_VERSION getPluginReference setVersion realValue setPropertyValue CoreException PDEPlugin logException

public Reference Wizard I Feature Model model Reference Wizard Page page set Default Page Image Descriptor PDE Plugin Images DESC NEWPPRJ WIZ set Dialog Settings PDE Plugin get Default get Dialog Settings set Needs Progress Monitor true set Window Title page get Title this page page  ReferenceWizard IFeatureModel ReferenceWizardPage setDefaultPageImageDescriptor PDEPluginImages DESC_NEWPPRJ_WIZ setDialogSettings PDEPlugin getDefault getDialogSettings setNeedsProgressMonitor setWindowTitle getTitle
public void add Pages add Page page  addPages addPage
public boolean perform Finish return page finish  performFinish

extends Default Content Provider implements I Structured Content Provider public Object get Elements Object parent return get Choices  DefaultContentProvider IStructuredContentProvider getElements getChoices
class Table Part extends Wizard Checkbox Table Part public Table Part super PDE Plugin get Resource String KEY PLUGINS  TablePart WizardCheckboxTablePart TablePart PDEPlugin getResourceString KEY_PLUGINS
super PDE Plugin get Resource String KEY PLUGINS public void update Counter int count super update Counter count set Page Complete count 0  PDEPlugin getResourceString KEY_PLUGINS updateCounter updateCounter setPageComplete
protected Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit Structured Viewer viewer super create Structured Viewer parent style toolkit viewer set Sorter List Util PLUGIN SORTER return viewer  StructuredViewer createStructuredViewer FormToolkit StructuredViewer createStructuredViewer setSorter ListUtil PLUGIN_SORTER
public Reference Wizard Page I Feature Model model boolean include External super new Feature Plugin Page NON NLS 1 this model model set Page Complete false checkbox Table Part new Table Part PDE Plugin get Default get Label Provider connect this this include External include External  ReferenceWizardPage IFeatureModel includeExternal newFeaturePluginPage setPageComplete checkboxTablePart TablePart PDEPlugin getDefault getLabelProvider includeExternal includeExternal
public void dispose PDE Plugin get Default get Label Provider disconnect this super dispose  PDEPlugin getDefault getLabelProvider
public void create Control Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 container set Layout layout create Plugin List container initialize set Control container Dialog apply Dialog Font container  createControl GridLayout GridLayout numColumns setLayout createPluginList setControl applyDialogFont
protected void create Plugin List Composite parent checkbox Table Part create Control parent plugin Viewer checkbox Table Part get Table Viewer plugin Viewer set Content Provider new Plugin Content Provider plugin Viewer set Label Provider PDE Plugin get Default get Label Provider plugin Viewer add Filter new Viewer Filter public boolean select Viewer v Object parent Object object if object instanceof I Plugin Model Base I Plugin Model Base model I Plugin Model Base object return is On The List model return true plugin Viewer set Sorter List Util PLUGIN SORTER Grid Data gd Grid Data checkbox Table Part get Control get Layout Data gd height Hint 300  createPluginList checkboxTablePart createControl pluginViewer checkboxTablePart getTableViewer pluginViewer setContentProvider PluginContentProvider pluginViewer setLabelProvider PDEPlugin getDefault getLabelProvider pluginViewer addFilter ViewerFilter IPluginModelBase IPluginModelBase IPluginModelBase isOnTheList pluginViewer setSorter ListUtil PLUGIN_SORTER GridData GridData checkboxTablePart getControl getLayoutData heightHint
protected abstract boolean is On The List I Plugin Model Base candidate  isOnTheList IPluginModelBase
protected abstract boolean is On The List I Plugin Model Base candidate public void init I Workbench workbench  isOnTheList IPluginModelBase IWorkbench
private void initialize plugin Viewer set Input model get Feature checkbox Table Part set Selection new Object 0  pluginViewer setInput getFeature checkboxTablePart setSelection
private Object get All Choices Plugin Model Manager pmng PDE Core get Default get Model Manager return pmng get Plugins  getAllChoices PluginModelManager PDECore getDefault getModelManager getPlugins
private Object get Choices if include External return get All Choices Workspace Model Manager mng PDE Core get Default get Workspace Model Manager I Plugin Model plugins mng get Plugin Models I Fragment Model fragments mng get Fragment Models Object choices new Object plugins length fragments length System arraycopy plugins 0 choices 0 plugins length System arraycopy fragments 0 choices plugins length fragments length return choices  getChoices includeExternal getAllChoices WorkspaceModelManager PDECore getDefault getWorkspaceModelManager IPluginModel getPluginModels IFragmentModel getFragmentModels
I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try do Add candidates monitor catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException doAdd CoreException InvocationTargetException
public boolean finish final Object candidates checkbox Table Part get Selection I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try do Add candidates monitor catch Core Exception e throw new Invocation Target Exception e try get Container run false false op catch Interrupted Exception e return false catch Invocation Target Exception e PDE Plugin log Exception e return false return true  checkboxTablePart getSelection IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException doAdd CoreException InvocationTargetException getContainer InterruptedException InvocationTargetException PDEPlugin logException
protected abstract void do Add Object candidates I Progress Monitor monitor throws Core Exception  doAdd IProgressMonitor CoreException

public Required Features Wizard I Feature Model model this model model set Default Page Image Descriptor PDE Plugin Images DESC NEWPPRJ WIZ set Dialog Settings PDE Plugin get Default get Dialog Settings set Needs Progress Monitor true  RequiredFeaturesWizard IFeatureModel setDefaultPageImageDescriptor PDEPluginImages DESC_NEWPPRJ_WIZ setDialogSettings PDEPlugin getDefault getDialogSettings setNeedsProgressMonitor
public void add Pages main Page new Required Features Wizard Page model add Page main Page set Window Title main Page get Title  addPages mainPage RequiredFeaturesWizardPage addPage mainPage setWindowTitle mainPage getTitle
public boolean perform Finish return main Page finish  performFinish mainPage

extends Default Content Provider implements I Structured Content Provider public Object get Elements Object parent return get Choices  DefaultContentProvider IStructuredContentProvider getElements getChoices
class Table Part extends Wizard Checkbox Table Part public Table Part super PDE Plugin get Resource String KEY FEATURES  TablePart WizardCheckboxTablePart TablePart PDEPlugin getResourceString KEY_FEATURES
super PDE Plugin get Resource String KEY FEATURES public void update Counter int count super update Counter count set Page Complete count 0  PDEPlugin getResourceString KEY_FEATURES updateCounter updateCounter setPageComplete
protected Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit Structured Viewer viewer super create Structured Viewer parent style toolkit viewer set Sorter List Util FEATURE SORTER return viewer  StructuredViewer createStructuredViewer FormToolkit StructuredViewer createStructuredViewer setSorter ListUtil FEATURE_SORTER
public Required Features Wizard Page I Feature Model model super Required Features Page NON NLS 1 this model model set Title PDE Plugin get Resource String KEY TITLE set Description PDE Plugin get Resource String KEY DESC set Page Complete false checkbox Table Part new Table Part PDE Plugin get Default get Label Provider connect this  RequiredFeaturesWizardPage IFeatureModel RequiredFeaturesPage setTitle PDEPlugin getResourceString KEY_TITLE setDescription PDEPlugin getResourceString KEY_DESC setPageComplete checkboxTablePart TablePart PDEPlugin getDefault getLabelProvider
public void dispose PDE Plugin get Default get Label Provider disconnect this super dispose  PDEPlugin getDefault getLabelProvider
public void create Control Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 container set Layout layout create Plugin List container initialize set Control container Dialog apply Dialog Font container Workbench Help set Help container I Help Context Ids FEATURE INCLUDED FEATURES WIZARD  createControl GridLayout GridLayout numColumns setLayout createPluginList setControl applyDialogFont WorkbenchHelp setHelp IHelpContextIds FEATURE_INCLUDED_FEATURES_WIZARD
plugin Viewer add Filter new Viewer Filter public boolean select Viewer v Object parent Object object if object instanceof I Feature Model I Feature Model model I Feature Model object return is On The List model return true  pluginViewer addFilter ViewerFilter IFeatureModel IFeatureModel IFeatureModel isOnTheList
protected void create Plugin List Composite parent checkbox Table Part create Control parent plugin Viewer checkbox Table Part get Table Viewer plugin Viewer set Content Provider new Plugin Content Provider plugin Viewer set Label Provider PDE Plugin get Default get Label Provider plugin Viewer add Filter new Viewer Filter public boolean select Viewer v Object parent Object object if object instanceof I Feature Model I Feature Model model I Feature Model object return is On The List model return true Grid Data gd Grid Data checkbox Table Part get Control get Layout Data gd height Hint 300  createPluginList checkboxTablePart createControl pluginViewer checkboxTablePart getTableViewer pluginViewer setContentProvider PluginContentProvider pluginViewer setLabelProvider PDEPlugin getDefault getLabelProvider pluginViewer addFilter ViewerFilter IFeatureModel IFeatureModel IFeatureModel isOnTheList GridData GridData checkboxTablePart getControl getLayoutData heightHint
private boolean is On The List I Feature Model candidate I Feature Import imports model get Feature get Imports I Feature cfeature candidate get Feature if is This Model cfeature return true for int i 0 i imports length i I Feature Import iimport imports i if iimport get Type I Feature Import PLUGIN continue if iimport get Id equals cfeature get Id iimport get Version equals cfeature get Version return true return false  isOnTheList IFeatureModel IFeatureImport getFeature getImports IFeature getFeature isThisModel IFeatureImport getType IFeatureImport getId getId getVersion getVersion
private boolean is This Model I Feature cfeature I Feature this Feature this model get Feature return cfeature get Id equals this Feature get Id cfeature get Version equals this Feature get Version  isThisModel IFeature IFeature thisFeature getFeature getId thisFeature getId getVersion thisFeature getVersion
public void init I Workbench workbench  IWorkbench
private void initialize plugin Viewer set Input model get Feature checkbox Table Part set Selection new Object 0  pluginViewer setInput getFeature checkboxTablePart setSelection
private Object get Choices Workspace Model Manager mng PDE Core get Default get Workspace Model Manager return mng get Feature Models  getChoices WorkspaceModelManager PDECore getDefault getWorkspaceModelManager getFeatureModels
I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try do Add candidates monitor catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException doAdd CoreException InvocationTargetException
public boolean finish final Object candidates checkbox Table Part get Selection I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try do Add candidates monitor catch Core Exception e throw new Invocation Target Exception e try get Container run false false op catch Interrupted Exception e return false catch Invocation Target Exception e PDE Plugin log Exception e return false return true  checkboxTablePart getSelection IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException doAdd CoreException InvocationTargetException getContainer InterruptedException InvocationTargetException PDEPlugin logException
private void do Add Object candidates I Progress Monitor monitor throws Core Exception monitor begin Task PDE Plugin get Resource String KEY ADDING candidates length 1 I Feature feature model get Feature I Feature Import added new I Feature Import candidates length for int i 0 i candidates length i I Feature Model candidate I Feature Model candidates i String name candidate get Feature get Label monitor sub Task candidate get Resource String name Feature Import iimport Feature Import model get Factory create Import iimport load From candidate get Feature added i iimport monitor worked 1 monitor sub Task NON NLS 1 monitor set Task Name PDE Plugin get Resource String KEY UPDATING feature add Imports added monitor worked 1  doAdd IProgressMonitor CoreException beginTask PDEPlugin getResourceString KEY_ADDING IFeature getFeature IFeatureImport IFeatureImport IFeatureModel IFeatureModel getFeature getLabel subTask getResourceString FeatureImport FeatureImport getFactory createImport loadFrom getFeature subTask setTaskName PDEPlugin getResourceString KEY_UPDATING addImports

implements I Structured Content Provider public Object get Elements Object parent if parent instanceof I Feature return I Feature parent get Imports return new Object 0  IStructuredContentProvider getElements IFeature IFeature getImports
public Requires Section Feature Reference Page page Composite parent super page parent Section DESCRIPTION new String PDE Plugin get Resource String KEY NEW PLUGIN BUTTON PDE Plugin get Resource String KEY NEW FEATURE BUTTON null PDE Plugin get Resource String KEY COMPUTE get Section set Text PDE Plugin get Resource String KEY TITLE get Section set Description PDE Plugin get Resource String KEY DESC get Table Part set Editable false  RequiresSection FeatureReferencePage PDEPlugin getResourceString KEY_NEW_PLUGIN_BUTTON PDEPlugin getResourceString KEY_NEW_FEATURE_BUTTON PDEPlugin getResourceString KEY_COMPUTE getSection setText PDEPlugin getResourceString KEY_TITLE getSection setDescription PDEPlugin getResourceString KEY_DESC getTablePart setEditable
public void commit boolean on Save super commit on Save  onSave onSave
delete Action new Action public void run handle Delete  deleteAction handleDelete
public void create Client Section section Form Toolkit toolkit Composite container create Client Container section 2 toolkit sync Button toolkit create Button container PDE Plugin get Resource String KEY SYNC BUTTON SWT CHECK sync Button set Selection true Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 sync Button set Layout Data gd create Viewer Part Control container SWT MULTI 2 toolkit Table Part table Part get Table Part plugin Viewer table Part get Table Viewer plugin Viewer set Content Provider new Import Content Provider plugin Viewer set Sorter List Util NAME SORTER plugin Viewer set Label Provider PDE Plugin get Default get Label Provider delete Action new Action public void run handle Delete delete Action set Text PDE Plugin get Resource String KEY DELETE toolkit paint Borders For container section set Client container initialize  createClient FormToolkit createClientContainer syncButton createButton PDEPlugin getResourceString KEY_SYNC_BUTTON syncButton setSelection GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan syncButton setLayoutData createViewerPartControl TablePart tablePart getTablePart pluginViewer tablePart getTableViewer pluginViewer setContentProvider ImportContentProvider pluginViewer setSorter ListUtil NAME_SORTER pluginViewer setLabelProvider PDEPlugin getDefault getLabelProvider deleteAction handleDelete deleteAction setText PDEPlugin getResourceString KEY_DELETE paintBordersFor setClient
protected void button Selected int index switch index case 0 handle New Plugin break case 1 handle New Feature break case 2 break case 3 recompute Imports break  buttonSelected handleNewPlugin handleNewFeature recomputeImports
show While plugin Viewer get Table get Display new Runnable public void run New Feature Require Wizard Page page new New Feature Require Wizard Page model Reference Wizard wizard new Reference Wizard model page Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create dialog open  showWhile pluginViewer getTable getDisplay NewFeatureRequireWizardPage NewFeatureRequireWizardPage ReferenceWizard ReferenceWizard WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell
private void handle New Plugin final I Feature Model model I Feature Model get Page get Model Busy Indicator show While plugin Viewer get Table get Display new Runnable public void run New Feature Require Wizard Page page new New Feature Require Wizard Page model Reference Wizard wizard new Reference Wizard model page Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create dialog open  handleNewPlugin IFeatureModel IFeatureModel getPage getModel BusyIndicator showWhile pluginViewer getTable getDisplay NewFeatureRequireWizardPage NewFeatureRequireWizardPage ReferenceWizard ReferenceWizard WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell
show While plugin Viewer get Table get Display new Runnable public void run Required Features Wizard wizard new Required Features Wizard model Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create dialog open  showWhile pluginViewer getTable getDisplay RequiredFeaturesWizard RequiredFeaturesWizard WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell
private void handle New Feature final I Feature Model model I Feature Model get Page get Model Busy Indicator show While plugin Viewer get Table get Display new Runnable public void run Required Features Wizard wizard new Required Features Wizard model Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create dialog open  handleNewFeature IFeatureModel IFeatureModel getPage getModel BusyIndicator showWhile pluginViewer getTable getDisplay RequiredFeaturesWizard RequiredFeaturesWizard WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell
private void handle Delete I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature I Structured Selection selection I Structured Selection plugin Viewer get Selection if selection is Empty return try I Feature Import deleted new I Feature Import selection size int i 0 for Iterator iter selection iterator iter has Next I Feature Import iimport I Feature Import iter next deleted i iimport feature remove Imports deleted catch Core Exception e PDE Plugin log Exception e  handleDelete IFeatureModel IFeatureModel getPage getModel IFeature getFeature IStructuredSelection IStructuredSelection pluginViewer getSelection isEmpty IFeatureImport IFeatureImport hasNext IFeatureImport IFeatureImport removeImports CoreException PDEPlugin logException
private void handle Select All I Structured Content Provider provider I Structured Content Provider plugin Viewer get Content Provider Object elements provider get Elements plugin Viewer get Input Structured Selection ssel new Structured Selection elements plugin Viewer set Selection ssel  handleSelectAll IStructuredContentProvider IStructuredContentProvider pluginViewer getContentProvider getElements pluginViewer getInput StructuredSelection StructuredSelection pluginViewer setSelection
public void dispose I Feature Model model I Feature Model get Page get Model if model null model remove Model Changed Listener this Workspace Model Manager mng PDE Core get Default get Workspace Model Manager mng remove Model Provider Listener this super dispose  IFeatureModel IFeatureModel getPage getModel removeModelChangedListener WorkspaceModelManager PDECore getDefault getWorkspaceModelManager removeModelProviderListener
plugin Viewer get Table get Display new Runnable public void run handle Delete  pluginViewer getTable getDisplay handleDelete
plugin Viewer get Table get Display new Runnable public void run handle Select All  pluginViewer getTable getDisplay handleSelectAll
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id Busy Indicator show While plugin Viewer get Table get Display new Runnable public void run handle Delete return true if action Id equals Action Factory CUT get Id delete here and let the editor transfer the selection to the clipboard handle Delete return false if action Id equals Action Factory PASTE get Id do Paste return true if action Id equals Action Factory SELECT ALL get Id Busy Indicator show While plugin Viewer get Table get Display new Runnable public void run handle Select All return true return false  doGlobalAction actionId actionId ActionFactory getId BusyIndicator showWhile pluginViewer getTable getDisplay handleDelete actionId ActionFactory getId handleDelete actionId ActionFactory getId doPaste actionId ActionFactory SELECT_ALL getId BusyIndicator showWhile pluginViewer getTable getDisplay handleSelectAll
public void expand To Object object if object instanceof I Feature Import Structured Selection ssel new Structured Selection object plugin Viewer set Selection ssel  expandTo IFeatureImport StructuredSelection StructuredSelection pluginViewer setSelection
protected void fill Context Menu I Menu Manager manager manager add open Action manager add properties Action manager add new Separator I Structured Selection selection Structured Selection plugin Viewer get Selection if selection is Empty manager add delete Action manager add new Separator get Page getPDE Editor get Contributor context Menu About To Show manager  fillContextMenu IMenuManager openAction propertiesAction IStructuredSelection StructuredSelection pluginViewer getSelection isEmpty deleteAction getPage getPDEEditor getContributor contextMenuAboutToShow
protected void selection Changed I Structured Selection selection get Page getPDE Editor set Selection selection get Page get Managed Form fire Selection Changed this selection  selectionChanged IStructuredSelection getPage getPDEEditor setSelection getPage getManagedForm fireSelectionChanged
public void initialize I Feature Model model I Feature Model get Page get Model refresh if model is Editable false get Table Part set Button Enabled 0 false get Table Part set Button Enabled 1 false get Table Part set Button Enabled 3 false sync Button set Enabled false model add Model Changed Listener this Workspace Model Manager mng PDE Core get Default get Workspace Model Manager mng add Model Provider Listener this  IFeatureModel IFeatureModel getPage getModel isEditable getTablePart setButtonEnabled getTablePart setButtonEnabled getTablePart setButtonEnabled syncButton setEnabled addModelChangedListener WorkspaceModelManager PDECore getDefault getWorkspaceModelManager addModelProviderListener
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED mark Stale return else if e get Change Type I Model Changed Event CHANGE Object obj e get Changed Objects 0 if obj instanceof I Feature Import plugin Viewer refresh obj else Object obj e get Changed Objects 0 if obj instanceof I Feature Import if e get Change Type I Model Changed Event INSERT plugin Viewer add e get Changed Objects else plugin Viewer remove e get Changed Objects else if obj instanceof I Feature Plugin if sync Button get Selection recompute Imports  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale getChangeType IModelChangedEvent getChangedObjects IFeatureImport pluginViewer getChangedObjects IFeatureImport getChangeType IModelChangedEvent pluginViewer getChangedObjects pluginViewer getChangedObjects IFeaturePlugin syncButton getSelection recomputeImports
private void recompute Imports I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature try feature compute Imports catch Core Exception e PDE Plugin log Exception e  recomputeImports IFeatureModel IFeatureModel getPage getModel IFeature getFeature computeImports CoreException PDEPlugin logException
public void models Changed I Model Provider Event event I Model added event get Added Models I Model removed event get Removed Models I Model changed event get Changed Models if has Plugin Models added has Plugin Models removed has Plugin Models changed mark Stale  modelsChanged IModelProviderEvent IModel getAddedModels IModel getRemovedModels IModel getChangedModels hasPluginModels hasPluginModels hasPluginModels markStale
private boolean has Plugin Models I Model models if models null return false if models length 0 return false for int i 0 i models length i if models i instanceof I Plugin Model Base return true return false  hasPluginModels IModel IPluginModelBase
public void set Focus if plugin Viewer null plugin Viewer get Table set Focus  setFocus pluginViewer pluginViewer getTable setFocus
public void refresh I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature plugin Viewer set Input feature super refresh  IFeatureModel IFeatureModel getPage getModel IFeature getFeature pluginViewer setInput
see org eclipse pde internal ui editor Structured Viewer Section can Paste Clipboard public boolean can Paste Clipboard clipboard Object objects Object clipboard get Contents Model Data Transfer get Instance if objects null objects length 0 return can Paste null objects return false  StructuredViewerSection canPaste canPaste getContents ModelDataTransfer getInstance canPaste
see org eclipse pde internal ui editor Structured Viewer Section can Paste Object Object protected boolean can Paste Object target Object objects for int i 0 i objects length i if objects i instanceof Feature Import return false return true  StructuredViewerSection canPaste canPaste FeatureImport
see org eclipse pde internal ui editor Structured Viewer Section do Paste protected void do Paste Clipboard clipboard get Page getPDE Editor get Clipboard Object objects Object clipboard get Contents Model Data Transfer get Instance if objects null can Paste null objects do Paste null objects  StructuredViewerSection doPaste doPaste getPage getPDEEditor getClipboard getContents ModelDataTransfer getInstance canPaste doPaste
see org eclipse pde internal ui editor Structured Viewer Section do Paste Object Object protected void do Paste Object target Object objects I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature I Feature Import imports new I Feature Import objects length try for int i 0 i objects length i Feature Import f Import Feature Import objects i f Import set Model model f Import set Parent feature reconnect Reference f Import imports i f Import feature add Imports imports catch Core Exception e PDE Plugin log Exception e  StructuredViewerSection doPaste doPaste IFeatureModel IFeatureModel getPage getModel IFeature getFeature IFeatureImport IFeatureImport FeatureImport fImport FeatureImport fImport setModel fImport setParent reconnectReference fImport fImport addImports CoreException PDEPlugin logException
private void reconnect Reference Feature Import f Import if f Import get Type I Feature Import FEATURE f Import set Feature PDE Core get Default find Feature f Import get Id f Import get Version f Import get Match else Plugin plugin Plugin f Import get Plugin if plugin get Plugin Base instanceof Fragment I Fragment Model fragments PDE Core get Default get Workspace Model Manager get Fragment Models for int i 0 i fragments length i I Fragment fragment fragments i get Fragment if fragment get Id equals plugin get Id if plugin get Version null fragment get Version equals plugin get Version plugin set Model fragment get Model return else plugin set Model PDE Core get Default find Plugin plugin get Id plugin get Version 0 get Model  reconnectReference FeatureImport fImport fImport getType IFeatureImport fImport setFeature PDECore getDefault findFeature fImport getId fImport getVersion fImport getMatch fImport getPlugin getPluginBase IFragmentModel PDECore getDefault getWorkspaceModelManager getFragmentModels IFragment getFragment getId getId getVersion getVersion getVersion setModel getModel setModel PDECore getDefault findPlugin getId getVersion getModel

public static final String DIALOG MESSAGE Feature Editor models In Use message NON NLS 1 private Feature Editor active Editor public Synchronize Versions Action set Text PDE Plugin get Resource String LABEL  DIALOG_MESSAGE FeatureEditor modelsInUse FeatureEditor activeEditor SynchronizeVersionsAction setText PDEPlugin getResourceString
try I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor active Editor do Save monitor  IRunnableWithProgress IRunnableWithProgress IProgressMonitor activeEditor doSave
private void ensure Content Saved if active Editor is Dirty try I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor active Editor do Save monitor PlatformUI get Workbench get Progress Service run InUI PDE Plugin get Active Workbench Window op PDE Plugin get Workspace get Root catch Invocation Target Exception e PDE Plugin log Exception e catch Interrupted Exception e  ensureContentSaved activeEditor isDirty IRunnableWithProgress IRunnableWithProgress IProgressMonitor activeEditor doSave getWorkbench getProgressService runInUI PDEPlugin getActiveWorkbenchWindow PDEPlugin getWorkspace getRoot InvocationTargetException PDEPlugin logException InterruptedException
private boolean ensure Editors Closed Class model Class I Plugin Model Base class boolean result PDE Core get Default get Workspace Model Manager get All Editable Models Unused model Class if result Message Dialog open Error PDE Plugin get Active Workbench Shell PDE Plugin get Resource String DIALOG TITLE PDE Plugin get Resource String DIALOG MESSAGE return result  ensureEditorsClosed modelClass IPluginModelBase PDECore getDefault getWorkspaceModelManager getAllEditableModelsUnused modelClass MessageDialog openError PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString DIALOG_TITLE PDEPlugin getResourceString DIALOG_MESSAGE
public void run ensure Content Saved if ensure Editors Closed return Synchronize Versions Wizard wizard new Synchronize Versions Wizard active Editor Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog open  ensureContentSaved ensureEditorsClosed SynchronizeVersionsWizard SynchronizeVersionsWizard activeEditor WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell
public void set Active Editor Feature Editor editor this active Editor editor I Model model I Model editor get Aggregate Model set Enabled model is Editable  setActiveEditor FeatureEditor activeEditor IModel IModel getAggregateModel setEnabled isEditable

public Synchronize Versions Wizard Feature Editor feature Editor set Default Page Image Descriptor PDE Plugin Images DESC NEWFTRPRJ WIZ set Dialog Settings PDE Plugin get Default get Dialog Settings set Needs Progress Monitor true set Window Title PDE Plugin get Resource String KEY WTITLE this feature Editor feature Editor  SynchronizeVersionsWizard FeatureEditor featureEditor setDefaultPageImageDescriptor PDEPluginImages DESC_NEWFTRPRJ_WIZ setDialogSettings PDEPlugin getDefault getDialogSettings setNeedsProgressMonitor setWindowTitle PDEPlugin getResourceString KEY_WTITLE featureEditor featureEditor
this feature Editor feature Editor public void add Pages main Page new Synchronize Versions Wizard Page feature Editor add Page main Page  featureEditor featureEditor addPages mainPage SynchronizeVersionsWizardPage featureEditor addPage mainPage
add Page main Page public boolean perform Finish return main Page finish  addPage mainPage performFinish mainPage

public Synchronize Versions Wizard Page Feature Editor feature Editor super feature Jar NON NLS 1 set Title PDE Plugin get Resource String PAGE TITLE set Description PDE Plugin get Resource String PAGE DESC this feature Editor feature Editor  SynchronizeVersionsWizardPage FeatureEditor featureEditor featureJar setTitle PDEPlugin getResourceString PAGE_TITLE setDescription PDEPlugin getResourceString PAGE_DESC featureEditor featureEditor
public void create Control Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout container set Layout layout Group group new Group container SWT SHADOW ETCHED IN Grid Data gd new Grid Data Grid Data FILL HORIZONTAL layout new Grid Layout group set Layout layout group set Layout Data gd group set Text PDE Plugin get Resource String KEY GROUP use Component Button new Button group SWT RADIO use Component Button set Text PDE Plugin get Resource String KEY USE COMPONENT gd new Grid Data Grid Data FILL HORIZONTAL use Component Button set Layout Data gd use Plugins Button new Button group SWT RADIO use Plugins Button set Text PDE Plugin get Resource String KEY USE PLUGINS gd new Grid Data Grid Data FILL HORIZONTAL use Plugins Button set Layout Data gd use References Button new Button group SWT RADIO use References Button set Text PDE Plugin get Resource String KEY USE REFERENCES gd new Grid Data Grid Data FILL HORIZONTAL use References Button set Layout Data gd set Control container Dialog apply Dialog Font container load Settings Workbench Help set Help container I Help Context Ids FEATURE SYNCHRONIZE VERSIONS  createControl GridLayout GridLayout setLayout SHADOW_ETCHED_IN GridData GridData GridData FILL_HORIZONTAL GridLayout setLayout setLayoutData setText PDEPlugin getResourceString KEY_GROUP useComponentButton useComponentButton setText PDEPlugin getResourceString KEY_USE_COMPONENT GridData GridData FILL_HORIZONTAL useComponentButton setLayoutData usePluginsButton usePluginsButton setText PDEPlugin getResourceString KEY_USE_PLUGINS GridData GridData FILL_HORIZONTAL usePluginsButton setLayoutData useReferencesButton useReferencesButton setText PDEPlugin getResourceString KEY_USE_REFERENCES GridData GridData FILL_HORIZONTAL useReferencesButton setLayoutData setControl applyDialogFont loadSettings WorkbenchHelp setHelp IHelpContextIds FEATURE_SYNCHRONIZE_VERSIONS
private Workspace Plugin Model Base find Fragment String id I Plugin Model Base models PDE Core get Default get Workspace Model Manager get Fragment Models return find Workspace Model Base models id  WorkspacePluginModelBase findFragment IPluginModelBase PDECore getDefault getWorkspaceModelManager getFragmentModels findWorkspaceModelBase
return find Workspace Model Base models id private Workspace Plugin Model Base find Model String id I Plugin Model Base models PDE Core get Default get Workspace Model Manager get Plugin Models return find Workspace Model Base models id  findWorkspaceModelBase WorkspacePluginModelBase findModel IPluginModelBase PDECore getDefault getWorkspaceModelManager getPluginModels findWorkspaceModelBase
private I Feature Plugin find Plugin Reference String id I Feature Model model I Feature Model feature Editor get Aggregate Model I Feature Plugin references model get Feature get Plugins for int i 0 i references length i if references i get Id equals id return references i return null  IFeaturePlugin findPluginReference IFeatureModel IFeatureModel featureEditor getAggregateModel IFeaturePlugin getFeature getPlugins getId
private Workspace Plugin Model Base find Workspace Model Base I Plugin Model Base models String id for int i 0 i models length i I Plugin Model Base model Base models i if model Base instanceof Workspace Plugin Model Base model Base get Plugin Base get Id equals id return Workspace Plugin Model Base model Base return null  WorkspacePluginModelBase findWorkspaceModelBase IPluginModelBase IPluginModelBase modelBase modelBase WorkspacePluginModelBase modelBase getPluginBase getId WorkspacePluginModelBase modelBase
I Runnable With Progress operation new Workspace Modify Operation public void execute I Progress Monitor monitor try run Operation mode monitor catch Core Exception e PDE Plugin log Exception e catch Invocation Target Exception e PDE Plugin log Exception e finally monitor done  IRunnableWithProgress WorkspaceModifyOperation IProgressMonitor runOperation CoreException PDEPlugin logException InvocationTargetException PDEPlugin logException
public boolean finish final int mode save Settings I Runnable With Progress operation new Workspace Modify Operation public void execute I Progress Monitor monitor try run Operation mode monitor catch Core Exception e PDE Plugin log Exception e catch Invocation Target Exception e PDE Plugin log Exception e finally monitor done try get Container run false true operation catch Invocation Target Exception e PDE Plugin log Exception e return false catch Interrupted Exception e return false return true  saveSettings IRunnableWithProgress WorkspaceModifyOperation IProgressMonitor runOperation CoreException PDEPlugin logException InvocationTargetException PDEPlugin logException getContainer InvocationTargetException PDEPlugin logException InterruptedException
private void force Version String target Version I Plugin Model Base model Base throws Core Exception I File file I File model Base get Underlying Resource Workspace Model Manager model Provider PDE Core get Default get Workspace Model Manager Workspace Plugin Model Base model Workspace Plugin Model Base model Provider get Model file model load if model is Loaded I Plugin Base base model get Plugin Base base set Version target Version if base instanceof I Fragment also fix target plug in version I Fragment fragment I Fragment base I Feature Plugin ref find Plugin Reference fragment get Plugin Id if ref null fragment set Plugin Version target Version model save if base instanceof I Plugin I Plugin local PDE Core get Default find Plugin base get Id if local null local get Model get Underlying Resource null local get Model get Underlying Resource equals file Plugin Base local internal Set Version base get Version  forceVersion targetVersion IPluginModelBase modelBase CoreException IFile IFile modelBase getUnderlyingResource WorkspaceModelManager modelProvider PDECore getDefault getWorkspaceModelManager WorkspacePluginModelBase WorkspacePluginModelBase modelProvider getModel isLoaded IPluginBase getPluginBase setVersion targetVersion IFragment IFragment IFragment IFeaturePlugin findPluginReference getPluginId setPluginVersion targetVersion IPlugin IPlugin PDECore getDefault findPlugin getId getModel getUnderlyingResource getModel getUnderlyingResource PluginBase internalSetVersion getVersion
private void load Settings I Dialog Settings settings get Dialog Settings if settings get PROP SYNCHRO MODE null int mode settings get Int PROP SYNCHRO MODE switch mode case USE FEATURE use Component Button set Selection true break case USE PLUGINS use Plugins Button set Selection true break case USE REFERENCES use References Button set Selection true break else use Component Button set Selection true  loadSettings IDialogSettings getDialogSettings PROP_SYNCHRO_MODE getInt PROP_SYNCHRO_MODE USE_FEATURE useComponentButton setSelection USE_PLUGINS usePluginsButton setSelection USE_REFERENCES useReferencesButton setSelection useComponentButton setSelection
private void run Operation int mode I Progress Monitor monitor throws Core Exception Invocation Target Exception Workspace Feature Model model Workspace Feature Model feature Editor get Aggregate Model I Feature feature model get Feature I Feature Plugin plugins feature get Plugins int size plugins length monitor begin Task PDE Plugin get Resource String KEY SYNCHRONIZING size for int i 0 i plugins length i synchronize Version mode feature get Version plugins i monitor model fire Model Changed new Model Changed Event model I Model Changed Event WORLD CHANGED null null  runOperation IProgressMonitor CoreException InvocationTargetException WorkspaceFeatureModel WorkspaceFeatureModel featureEditor getAggregateModel IFeature getFeature IFeaturePlugin getPlugins beginTask PDEPlugin getResourceString KEY_SYNCHRONIZING synchronizeVersion getVersion fireModelChanged ModelChangedEvent IModelChangedEvent WORLD_CHANGED
private int save Settings I Dialog Settings settings get Dialog Settings int mode USE FEATURE if use Plugins Button get Selection mode USE PLUGINS else if use References Button get Selection mode USE REFERENCES settings put PROP SYNCHRO MODE mode return mode  saveSettings IDialogSettings getDialogSettings USE_FEATURE usePluginsButton getSelection USE_PLUGINS useReferencesButton getSelection USE_REFERENCES PROP_SYNCHRO_MODE
private void synchronize Version int mode String feature Version I Feature Plugin ref I Progress Monitor monitor throws Core Exception String id ref get Id Workspace Plugin Model Base model Base null if ref is Fragment model Base find Fragment id else model Base find Model id if model Base null return if mode USE PLUGINS String base Version model Base get Plugin Base get Version if ref get Version equals base Version false ref set Version base Version else String target Version feature Version if mode USE REFERENCES target Version ref get Version else ref set Version target Version String base Version model Base get Plugin Base get Version if target Version equals base Version false force Version target Version model Base if mode USE FEATURE ref set Version target Version monitor worked 1  synchronizeVersion featureVersion IFeaturePlugin IProgressMonitor CoreException getId WorkspacePluginModelBase modelBase isFragment modelBase findFragment modelBase findModel modelBase USE_PLUGINS baseVersion modelBase getPluginBase getVersion getVersion baseVersion setVersion baseVersion targetVersion featureVersion USE_REFERENCES targetVersion getVersion setVersion targetVersion baseVersion modelBase getPluginBase getVersion targetVersion baseVersion forceVersion targetVersion modelBase USE_FEATURE setVersion targetVersion

private final static String site Types update web NON NLS 1 NON NLS 2 public URL Element Property Source I FeatureURL Element element super element  siteTypes URLElementPropertySource IFeatureURLElement
public org eclipse pde internal core ifeature I FeatureURL Element get Element return I FeatureURL Element object  IFeatureURLElement getElement IFeatureURLElement
public I Property Descriptor get Property Descriptors if descriptors null descriptors new Vector Property Descriptor desc new Property Descriptor P TYPE PDE Plugin get Resource String KEY TYPE descriptors add Element desc desc create Text Property Descriptor P LABEL PDE Plugin get Resource String KEY LABEL descriptors add Element desc desc create Text Property Descriptor P URL PDE Plugin get Resource String KEY URL descriptors add Element desc desc create Choice Property Descriptor P SITE TYPE PDE Plugin get Resource String KEY SITE TYPE site Types descriptors add Element desc return to Descriptor Array descriptors  IPropertyDescriptor getPropertyDescriptors PropertyDescriptor PropertyDescriptor P_TYPE PDEPlugin getResourceString KEY_TYPE addElement createTextPropertyDescriptor P_LABEL PDEPlugin getResourceString KEY_LABEL addElement createTextPropertyDescriptor P_URL PDEPlugin getResourceString KEY_URL addElement createChoicePropertyDescriptor P_SITE_TYPE PDEPlugin getResourceString KEY_SITE_TYPE siteTypes addElement toDescriptorArray
public Object get Property Value Object name if name equals P TYPE return element Types get Element get Element Type if name equals P LABEL return get Element get Label if name equals P URL return get Element getURL to String if name equals P SITE TYPE return new Integer get Element get Site Type return null  getPropertyValue P_TYPE elementTypes getElement getElementType P_LABEL getElement getLabel P_URL getElement toString P_SITE_TYPE getElement getSiteType
return null public void set Element I FeatureURL Element new Element object new Element  setElement IFeatureURLElement newElement newElement
public void set Property Value Object name Object value String svalue value to String String real Value svalue null svalue length 0 null svalue try if name equals P URL try URL url null if real Value null url new URL real Value get Element setURL url catch MalformedURL Exception e else if name equals P LABEL get Element set Label real Value else if name equals P SITE TYPE Integer ivalue Integer value get Element set Site Type ivalue int Value catch Core Exception e PDE Plugin log Exception e  setPropertyValue toString realValue P_URL realValue realValue getElement MalformedURLException P_LABEL getElement setLabel realValue P_SITE_TYPE getElement setSiteType intValue CoreException PDEPlugin logException

int type URL Folder int type this type type  URLFolder
I FeatureURL getURL I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature return feature getURL  IFeatureURL IFeatureModel IFeatureModel getPage getModel IFeature getFeature
extends Default Content Provider implements I Tree Content Provider public boolean has Children Object parent return get Children parent length 0  DefaultContentProvider ITreeContentProvider hasChildren getChildren
public Object get Children Object parent if parent instanceof I FeatureURL return folders if parent instanceof URL Folder URL Folder folder URL Folder parent I FeatureURL url folder getURL if url null if folder type I FeatureURL Element UPDATE return url get Updates if folder type I FeatureURL Element DISCOVERY return url get Discoveries return new Object 0  getChildren IFeatureURL URLFolder URLFolder URLFolder IFeatureURL IFeatureURLElement getUpdates IFeatureURLElement getDiscoveries
public Object get Parent Object child if child instanceof URL Folder return URL Folder child getURL if child instanceof I FeatureURL Element I FeatureURL Element element I FeatureURL Element child if element get Element Type I FeatureURL Element UPDATE return folders 0 else return folders 1 return null  getParent URLFolder URLFolder IFeatureURLElement IFeatureURLElement IFeatureURLElement getElementType IFeatureURLElement
return null public Object get Elements Object parent return folders  getElements
class URL Label Provider extends Label Provider public String get Text Object obj if obj instanceof URL Folder URL Folder folder URL Folder obj if folder type I FeatureURL Element UPDATE return PDE Plugin get Resource String KEY UPDATE URLS if folder type I FeatureURL Element DISCOVERY return PDE Plugin get Resource String KEY DISCOVERY URLS return super get Text obj  URLLabelProvider LabelProvider getText URLFolder URLFolder URLFolder IFeatureURLElement PDEPlugin getResourceString KEY_UPDATE_URLS IFeatureURLElement PDEPlugin getResourceString KEY_DISCOVERY_URLS getText
public Image get Image Object obj if obj instanceof URL Folder return url Folder Image if obj instanceof I FeatureURL Element return url Image return null  getImage URLFolder urlFolderImage IFeatureURLElement urlImage
public URL Section Feature Form Page page Composite parent super page parent Section DESCRIPTION get Section set Text PDE Plugin get Resource String SECTION TITLE get Section set Description PDE Plugin get Resource String SECTION DESC PDE Label Provider provider PDE Plugin get Default get Label Provider url Image provider get PDE Plugin Images DESC LINK OBJ url Folder Image provider get PDE Plugin Images DESC LINKS OBJ create Client get Section page get Managed Form get Toolkit  URLSection FeatureFormPage getSection setText PDEPlugin getResourceString SECTION_TITLE getSection setDescription PDEPlugin getResourceString SECTION_DESC PDELabelProvider PDEPlugin getDefault getLabelProvider urlImage PDEPluginImages DESC_LINK_OBJ urlFolderImage PDEPluginImages DESC_LINKS_OBJ createClient getSection getManagedForm getToolkit
create Client get Section page get Managed Form get Toolkit public void commit boolean on Save super commit on Save  createClient getSection getManagedForm getToolkit onSave onSave
url Tree set Auto Expand Level Tree Viewer ALL LEVELS url Tree add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e get Page getPDE Editor set Selection e get Selection  urlTree setAutoExpandLevel TreeViewer ALL_LEVELS urlTree addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getPage getPDEEditor setSelection getSelection
url Tree add Double Click Listener new I Double Click Listener public void double Click Double Click Event event properties Action run  urlTree addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent propertiesAction
Menu Manager popup Menu Manager new Menu Manager I Menu Listener listener new I Menu Listener public void menu About To Show I Menu Manager mng fill Context Menu mng  MenuManager popupMenuManager MenuManager IMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu
public void create Client Section section Form Toolkit toolkit Composite container toolkit create Composite section Grid Layout layout new Grid Layout container set Layout layout Tree tree toolkit create Tree container SWT NULL url Tree new Tree Viewer tree url Tree set Content Provider new URL Content Provider url Tree set Label Provider new URL Label Provider url Tree set Auto Expand Level Tree Viewer ALL LEVELS url Tree add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e get Page getPDE Editor set Selection e get Selection url Tree add Double Click Listener new I Double Click Listener public void double Click Double Click Event event properties Action run Menu Manager popup Menu Manager new Menu Manager I Menu Listener listener new I Menu Listener public void menu About To Show I Menu Manager mng fill Context Menu mng popup Menu Manager add Menu Listener listener popup Menu Manager set Remove All When Shown true Menu menu popup Menu Manager create Context Menu url Tree get Tree url Tree get Tree set Menu menu Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint 100 tree set Layout Data gd toolkit paint Borders For container properties Action new Properties Action get Page getPDE Editor section set Client container initialize  createClient FormToolkit createComposite GridLayout GridLayout setLayout createTree urlTree TreeViewer urlTree setContentProvider URLContentProvider urlTree setLabelProvider URLLabelProvider urlTree setAutoExpandLevel TreeViewer ALL_LEVELS urlTree addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getPage getPDEEditor setSelection getSelection urlTree addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent propertiesAction MenuManager popupMenuManager MenuManager IMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu popupMenuManager addMenuListener popupMenuManager setRemoveAllWhenShown popupMenuManager createContextMenu urlTree getTree urlTree getTree setMenu GridData GridData GridData FILL_BOTH heightHint setLayoutData paintBordersFor propertiesAction PropertiesAction getPage getPDEEditor setClient
public void dispose I Feature Model model I Feature Model get Page get Model if model null model remove Model Changed Listener this super dispose  IFeatureModel IFeatureModel getPage getModel removeModelChangedListener
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id handle Delete return true if action Id equals Action Factory CUT get Id delete here and let the editor transfer the selection to the clipboard handle Delete return false if action Id equals Action Factory PASTE get Id do Paste return true return false  doGlobalAction actionId actionId ActionFactory getId handleDelete actionId ActionFactory getId handleDelete actionId ActionFactory getId doPaste
return false public boolean set Form Input Object object url Tree set Selection new Structured Selection object true return true  setFormInput urlTree setSelection StructuredSelection
Action update Url new Action PDE Plugin get Resource String POPUP UPDATE URL public void run handle NewURL I FeatureURL Element UPDATE  updateUrl PDEPlugin getResourceString POPUP_UPDATE_URL handleNewURL IFeatureURLElement
submenu add update Url Action discovery Url new Action PDE Plugin get Resource String POPUP DISCOVERY URL public void run handle NewURL I FeatureURL Element DISCOVERY  updateUrl discoveryUrl PDEPlugin getResourceString POPUP_DISCOVERY_URL handleNewURL IFeatureURLElement
manager add new Separator Action delete Action new Action PDE Plugin get Resource String POPUP DELETE public void run handle Delete  deleteAction PDEPlugin getResourceString POPUP_DELETE handleDelete
private void fill Context Menu I Menu Manager manager I Model model I Model get Page get Model I Selection selection url Tree get Selection Object object I Structured Selection selection get First Element Menu Manager submenu new Menu Manager PDE Plugin get Resource String POPUP NEW Action update Url new Action PDE Plugin get Resource String POPUP UPDATE URL public void run handle NewURL I FeatureURL Element UPDATE update Url set Enabled model is Editable submenu add update Url Action discovery Url new Action PDE Plugin get Resource String POPUP DISCOVERY URL public void run handle NewURL I FeatureURL Element DISCOVERY discovery Url set Enabled model is Editable submenu add discovery Url manager add submenu if object null object instanceof I FeatureURL Element manager add new Separator Action delete Action new Action PDE Plugin get Resource String POPUP DELETE public void run handle Delete delete Action set Enabled model is Editable manager add delete Action manager add new Separator get Page getPDE Editor get Contributor context Menu About To Show manager manager add new Separator manager add properties Action  fillContextMenu IMenuManager IModel IModel getPage getModel ISelection urlTree getSelection IStructuredSelection getFirstElement MenuManager MenuManager PDEPlugin getResourceString POPUP_NEW updateUrl PDEPlugin getResourceString POPUP_UPDATE_URL handleNewURL IFeatureURLElement updateUrl setEnabled isEditable updateUrl discoveryUrl PDEPlugin getResourceString POPUP_DISCOVERY_URL handleNewURL IFeatureURLElement discoveryUrl setEnabled isEditable discoveryUrl IFeatureURLElement deleteAction PDEPlugin getResourceString POPUP_DELETE handleDelete deleteAction setEnabled isEditable deleteAction getPage getPDEEditor getContributor contextMenuAboutToShow propertiesAction
private void handle Delete Object object I Structured Selection url Tree get Selection get First Element if object null object instanceof I FeatureURL Element I FeatureURL Element url Element I FeatureURL Element object I Feature feature url Element get Feature I FeatureURL url feature getURL try if url Element get Element Type I FeatureURL Element UPDATE url remove Update url Element else url remove Discovery url Element catch Core Exception e PDE Plugin log Exception e  handleDelete IStructuredSelection urlTree getSelection getFirstElement IFeatureURLElement IFeatureURLElement urlElement IFeatureURLElement IFeature urlElement getFeature IFeatureURL urlElement getElementType IFeatureURLElement removeUpdate urlElement removeDiscovery urlElement CoreException PDEPlugin logException
private void handle NewURL int type I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature I FeatureURL url feature getURL if url null url model get Factory createURL try feature setURL url catch Core Exception e return try I FeatureURL Element element model get Factory createURL Element url type String label type I FeatureURL Element UPDATE PDE Plugin get Resource String NEW UPDATE SITE PDE Plugin get Resource String NEW DISCOVERY SITE element set Label label element setURL new URL PDE Plugin get Resource String NEW URL if type I FeatureURL Element UPDATE url add Update element else url add Discovery element catch Core Exception e PDE Plugin log Exception e catch MalformedURL Exception e PDE Plugin log Exception e  handleNewURL IFeatureModel IFeatureModel getPage getModel IFeature getFeature IFeatureURL getFactory CoreException IFeatureURLElement getFactory createURLElement IFeatureURLElement PDEPlugin getResourceString NEW_UPDATE_SITE PDEPlugin getResourceString NEW_DISCOVERY_SITE setLabel PDEPlugin getResourceString NEW_URL IFeatureURLElement addUpdate addDiscovery CoreException PDEPlugin logException MalformedURLException PDEPlugin logException
public void initialize I Feature Model model I Feature Model get Page get Model refresh model add Model Changed Listener this  IFeatureModel IFeatureModel getPage getModel addModelChangedListener
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED mark Stale return else Object obj e get Changed Objects 0 if obj instanceof I FeatureURL Element if e get Change Type I Model Changed Event INSERT Object parent null I FeatureURL Element element I FeatureURL Element obj if element get Element Type I FeatureURL Element UPDATE parent folders 0 else parent folders 1 url Tree add parent element url Tree set Selection new Structured Selection element true else if e get Change Type I Model Changed Event REMOVE url Tree remove obj else url Tree update obj null  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale getChangedObjects IFeatureURLElement getChangeType IModelChangedEvent IFeatureURLElement IFeatureURLElement getElementType IFeatureURLElement urlTree urlTree setSelection StructuredSelection getChangeType IModelChangedEvent urlTree urlTree
public void set Focus  setFocus
public void refresh I Feature Model model I Feature Model get Page get Model url Tree set Input model super refresh  IFeatureModel IFeatureModel getPage getModel urlTree setInput
see org eclipse pde internal ui editor Structured Viewer Section can Paste Clipboard public boolean can Paste Clipboard clipboard I Structured Selection ssel I Structured Selection url Tree get Selection if ssel size 1 return false Object target ssel get First Element if target instanceof URL Folder Object objects Object clipboard get Contents Model Data Transfer get Instance if objects null objects length 0 return can Paste URL Folder target objects return false  StructuredViewerSection canPaste canPaste IStructuredSelection IStructuredSelection urlTree getSelection getFirstElement URLFolder getContents ModelDataTransfer getInstance canPaste URLFolder
see org eclipse pde internal ui editor Structured Viewer Section can Paste Object Object protected boolean can Paste URL Folder target Object objects for int i 0 i objects length i if objects i instanceof FeatureURL Element FeatureURL Element objects i get Element Type target type return false return true  StructuredViewerSection canPaste canPaste URLFolder FeatureURLElement FeatureURLElement getElementType
see org eclipse pde internal ui editor Structured Viewer Section do Paste protected void do Paste I Structured Selection ssel I Structured Selection url Tree get Selection if ssel size 1 return Object target ssel get First Element if target instanceof URL Folder Clipboard clipboard get Page getPDE Editor get Clipboard Object objects Object clipboard get Contents Model Data Transfer get Instance if objects null do Paste URL Folder target objects  StructuredViewerSection doPaste doPaste IStructuredSelection IStructuredSelection urlTree getSelection getFirstElement URLFolder getPage getPDEEditor getClipboard getContents ModelDataTransfer getInstance doPaste URLFolder
see org eclipse pde internal ui editor Structured Viewer Section do Paste Object Object protected void do Paste URL Folder target Object objects I Feature Model model I Feature Model get Page get Model I Feature feature model get Feature for int i 0 i objects length i if objects i instanceof FeatureURL Element FeatureURL Element element FeatureURL Element objects i if element get Element Type target type element set Model model element set Parent feature try if target type I FeatureURL Element UPDATE feature getURL add Update element else feature getURL add Discovery element catch Core Exception e PDE Core log Exception e  StructuredViewerSection doPaste doPaste URLFolder IFeatureModel IFeatureModel getPage getModel IFeature getFeature FeatureURLElement FeatureURLElement FeatureURLElement getElementType setModel setParent IFeatureURLElement addUpdate addDiscovery CoreException PDECore logException

protected I Action Bars action Bars public Form Entry Adapter I Context Part context Part this context Part null  IActionBars actionBars FormEntryAdapter IContextPart contextPart contextPart
this context Part null public Form Entry Adapter I Context Part context Part I Action Bars action Bars this context Part context Part this action Bars action Bars  contextPart FormEntryAdapter IContextPart contextPart IActionBars actionBars contextPart contextPart actionBars actionBars
this action Bars action Bars public void focus Gained Form Entry entry context Part get Page getPDE Editor get Contributor update Selectable Actions new Structured Selection  actionBars actionBars focusGained FormEntry contextPart getPage getPDEEditor getContributor updateSelectableActions StructuredSelection
see org eclipse pde internal ui newparts I Form Entry Listener text Dirty org eclipse pde internal ui newparts Form Entry public void text Dirty Form Entry entry context Part fire Save Needed  IFormEntryListener textDirty FormEntry textDirty FormEntry contextPart fireSaveNeeded
see org eclipse pde internal ui newparts I Form Entry Listener text Value Changed org eclipse pde internal ui newparts Form Entry public void text Value Changed Form Entry entry  IFormEntryListener textValueChanged FormEntry textValueChanged FormEntry
see org eclipse pde internal ui newparts I Form Entry Listener browse Button Selected org eclipse pde internal ui newparts Form Entry public void browse Button Selected Form Entry entry  IFormEntryListener browseButtonSelected FormEntry browseButtonSelected FormEntry
public void link Entered Hyperlink Event e if action Bars null return I Status Line Manager mng action Bars get Status Line Manager mng set Message e get Label  linkEntered HyperlinkEvent actionBars IStatusLineManager actionBars getStatusLineManager setMessage getLabel
public void link Exited Hyperlink Event e if action Bars null return I Status Line Manager mng action Bars get Status Line Manager mng set Message null  linkExited HyperlinkEvent actionBars IStatusLineManager actionBars getStatusLineManager setMessage
see org eclipse ui forms events Hyperlink Listener link Activated org eclipse ui forms events Hyperlink Event public void link Activated Hyperlink Event e  HyperlinkListener linkActivated HyperlinkEvent linkActivated HyperlinkEvent

implements I Tree Content Provider public Object get Elements Object obj return get Pages  ITreeContentProvider getElements getPages
return get Pages public Object get Children Object obj return Form Outline Page this get Children obj  getPages getChildren FormOutlinePage getChildren
return Form Outline Page this get Children obj public boolean has Children Object obj return get Children obj length 0  FormOutlinePage getChildren hasChildren getChildren
return get Children obj length 0 public Object get Parent Object obj return null  getChildren getParent
public class Basic Label Provider extends Label Provider public String get Text Object obj if obj instanceof I Form Page return I Form Page obj get Title return PDE Plugin get Default get Label Provider get Text obj  BasicLabelProvider LabelProvider getText IFormPage IFormPage getTitle PDEPlugin getDefault getLabelProvider getText
public Image get Image Object obj if obj instanceof I Form Page return PDE Plugin get Default get Label Provider get PDE Plugin Images DESC PAGE OBJ return PDE Plugin get Default get Label Provider get Image obj  getImage IFormPage PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_PAGE_OBJ PDEPlugin getDefault getLabelProvider getImage
protected PDE Form Editor editor public Form Outline Page PDE Form Editor editor this editor editor  PDEFormEditor FormOutlinePage PDEFormEditor
this editor editor protected I Tree Content Provider create Content Provider return new Basic Content Provider  ITreeContentProvider createContentProvider BasicContentProvider
public void create Control Composite parent Tree widget new Tree parent SWT MULTI SWT H SCROLL SWT V SCROLL tree Viewer new Tree Viewer widget tree Viewer add Selection Changed Listener this tree Viewer set Content Provider create Content Provider tree Viewer set Label Provider create Label Provider tree Viewer set Auto Expand Level Tree Viewer ALL LEVELS tree Viewer set Use Hashlookup true tree Viewer set Input editor I Base Model model editor get Aggregate Model if model instanceof I Model Change Provider I Model Change Provider model add Model Changed Listener this  createControl H_SCROLL V_SCROLL treeViewer TreeViewer treeViewer addSelectionChangedListener treeViewer setContentProvider createContentProvider treeViewer setLabelProvider createLabelProvider treeViewer setAutoExpandLevel TreeViewer ALL_LEVELS treeViewer setUseHashlookup treeViewer setInput IBaseModel getAggregateModel IModelChangeProvider IModelChangeProvider addModelChangedListener
I Model Change Provider model add Model Changed Listener this protected I Label Provider create Label Provider return new Basic Label Provider  IModelChangeProvider addModelChangedListener ILabelProvider createLabelProvider BasicLabelProvider
public void dispose super dispose I Base Model model editor get Aggregate Model if model instanceof I Model Change Provider I Model Change Provider model remove Model Changed Listener this  IBaseModel getAggregateModel IModelChangeProvider IModelChangeProvider removeModelChangedListener
public Control get Control return tree Viewer null tree Viewer get Control null  getControl treeViewer treeViewer getControl
private Object get Pages Array List form Pages new Array List I Form Page pages editor get Pages for int i 0 i pages length i if pages i is Editor false form Pages add pages i return form Pages to Array  getPages ArrayList formPages ArrayList IFormPage getPages isEditor formPages formPages toArray
public void model Changed I Model Changed Event event I Form Page page editor get Active Page Instance stale true if page is Editor false refresh  modelChanged IModelChangedEvent IFormPage getActivePageInstance isEditor
public void refresh if stale tree Viewer refresh tree Viewer expand All stale false  treeViewer treeViewer expandAll
protected String get Parent Page Id Object item if item instanceof I Form Page return I Form Page item get Id return null  getParentPageId IFormPage IFormPage getId
protected Object get Children Object parent return new Object 0  getChildren
public void selection Changed Object item I Form Page page editor get Active Page Instance String id get Parent Page Id item I Form Page new Page null if id null page null page get Id equals id new Page editor set Active Page id I Form Page reveal Page new Page null new Page page if reveal Page null item instanceof I Form Page reveal Page select Reveal item  selectionChanged IFormPage getActivePageInstance getParentPageId IFormPage newPage getId newPage setActivePage IFormPage revealPage newPage newPage revealPage IFormPage revealPage selectReveal
public void selection Changed Selection Changed Event event I Selection selection event get Selection if selection is Empty false selection instanceof I Structured Selection I Structured Selection ssel I Structured Selection selection Object item ssel get First Element selection Changed item fire Selection Changed selection  selectionChanged SelectionChangedEvent ISelection getSelection isEmpty IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement selectionChanged fireSelectionChanged
fire Selection Changed selection public void set Focus if tree Viewer null tree Viewer get Tree set Focus  fireSelectionChanged setFocus treeViewer treeViewer getTree setFocus
public I Selection get Selection if tree Viewer null return Structured Selection EMPTY return tree Viewer get Selection  ISelection getSelection treeViewer StructuredSelection treeViewer getSelection

public class Generic Source Page extends PDE Source Page param editor param id param title public Generic Source Page PDE Form Editor editor String id String title super editor id title  GenericSourcePage PDESourcePage GenericSourcePage PDEFormEditor
see org eclipse pde internal ui neweditor PDE Source Page create Outline Label Provider protected I Label Provider create Outline Label Provider return null  PDESourcePage createOutlineLabelProvider ILabelProvider createOutlineLabelProvider
see org eclipse pde internal ui neweditor PDE Source Page create Outline Content Provider protected I Tree Content Provider create Outline Content Provider return null  PDESourcePage createOutlineContentProvider ITreeContentProvider createOutlineContentProvider
see org eclipse pde internal ui neweditor PDE Source Page outline Selection Changed org eclipse jface viewers Selection Changed Event protected void outline Selection Changed Selection Changed Event e  PDESourcePage outlineSelectionChanged SelectionChangedEvent outlineSelectionChanged SelectionChangedEvent
protected void outline Selection Changed Selection Changed Event e protected I Content Outline Page create Outline Page return null  outlineSelectionChanged SelectionChangedEvent IContentOutlinePage createOutlinePage

public interface I Context Part extends I Model Changed Listener boolean is Editable  IContextPart IModelChangedListener isEditable
public interface I Context Part extends I Model Changed Listener boolean is Editable PDE Form Page get Page  IContextPart IModelChangedListener isEditable PDEFormPage getPage
boolean is Editable PDE Form Page get Page String get Context Id  isEditable PDEFormPage getPage getContextId
PDE Form Page get Page String get Context Id void fire Save Needed  PDEFormPage getPage getContextId fireSaveNeeded
String get Context Id void fire Save Needed void cancel Edit  getContextId fireSaveNeeded cancelEdit

public interface I Model Undo Manager Connects to the change provider Until disconnecting the manager will keep model changes in the operation stack and will be able to revert or reapply these changes in the source model param provider the model change provider to connect to  IModelUndoManager
public void connect I Model Change Provider provider Disconnects from the change provider Upon disconnecting the manager will no longer be able to revert or reapply changes in the source model param provider the model change provider to disconnect from  IModelChangeProvider
public void disconnect I Model Change Provider provider Tests whether the current operation in the undo stack can be reverted return true if the current operation can be undone  IModelChangeProvider
public boolean is Undoable Tests whether the current operation in the undo stack can be reapplied return true if the current operation can be redone  isUndoable
public boolean is Redoable Reverts the current operation in the undo stack and decrements the stack pointer  isRedoable
public void undo Reapplies the next operation in the undo stack and sets the stack pointer to that operation 
public void redo Sets the depth of the undo stack param limit number of levels in the undo stack 
public void set Undo Level Limit int limit Temporarily suspends undo manager param ignore if true model changes reported by the model change provider will be ignore until this property is set to samp false samp again  setUndoLevelLimit
public void set Ignore Changes boolean ignore Connects the undo manager with the undo and redo actions in the workbench part using the manager The manager uses these objects to enable or disable the actions according to the state of the undo stack and the current location of the stack pointer param undo Action the action in the workbench part that performs the undo operation param redo Action the action in the workbench part that performs the redo operation  setIgnoreChanges undoAction redoAction

class Key Value Source Viewer Configuration extends Source Viewer Configuration public I Reconciler get Reconciler I Source Viewer source Viewer Reconciling Strategy strategy new Reconciling Strategy strategy add Participant I Reconciling Participant get Input Context get Model strategy add Participant Source Outline Page get Content Outline Mono Reconciler reconciler new Mono Reconciler strategy false reconciler set Delay 500 return reconciler  KeyValueSourceViewerConfiguration SourceViewerConfiguration IReconciler getReconciler ISourceViewer sourceViewer ReconcilingStrategy ReconcilingStrategy addParticipant IReconcilingParticipant getInputContext getModel addParticipant SourceOutlinePage getContentOutline MonoReconciler MonoReconciler setDelay
public Key Value Source Page PDE Form Editor editor String id String title super editor id title set Source Viewer Configuration new Key Value Source Viewer Configuration  KeyValueSourcePage PDEFormEditor setSourceViewerConfiguration KeyValueSourceViewerConfiguration
return new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 I Document Key key1 I Document Key e1 I Document Key key2 I Document Key e2 return key1 get Offset key2 get Offset 1 1  ViewerSorter IDocumentKey IDocumentKey IDocumentKey IDocumentKey getOffset getOffset
protected Viewer Sorter create Viewer Sorter return new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 I Document Key key1 I Document Key e1 I Document Key key2 I Document Key e2 return key1 get Offset key2 get Offset 1 1  ViewerSorter createViewerSorter ViewerSorter IDocumentKey IDocumentKey IDocumentKey IDocumentKey getOffset getOffset
protected void outline Selection Changed Selection Changed Event event I Selection selection event get Selection if selection instanceof I Structured Selection I Structured Selection structured Selection I Structured Selection selection Object first structured Selection get First Element if first instanceof I Document Key set Highlight Range I Document Key first else reset Highlight Range  outlineSelectionChanged SelectionChangedEvent ISelection getSelection IStructuredSelection IStructuredSelection structuredSelection IStructuredSelection structuredSelection getFirstElement IDocumentKey setHighlightRange IDocumentKey resetHighlightRange
public void set Highlight Range I Document Key key I Source Viewer source Viewer get Source Viewer if source Viewer null return I Document document source Viewer get Document if document null return int offset key get Offset int length key get Length set Highlight Range offset length true source Viewer set Selected Range offset key get Name length  setHighlightRange IDocumentKey ISourceViewer sourceViewer getSourceViewer sourceViewer IDocument sourceViewer getDocument getOffset getLength setHighlightRange sourceViewer setSelectedRange getName

private Link Handler link Handler class Link Handler implements I Hyperlink Listener public void link Activated Hyperlink Event e do Link Activated Hyperlink e widget  LinkHandler linkHandler LinkHandler IHyperlinkListener linkActivated HyperlinkEvent doLinkActivated
do Link Activated Hyperlink e widget public void link Entered Hyperlink Event e do Enter Hyperlink e widget  doLinkActivated linkEntered HyperlinkEvent doEnter
do Enter Hyperlink e widget public void link Exited Hyperlink Event e do Exit Hyperlink e widget  doEnter linkExited HyperlinkEvent doExit
param page param parent param style public Link Section PDE Form Page page Composite parent int style super page parent style Form Toolkit toolkit page get Managed Form get Toolkit link Handler new Link Handler create Client get Section toolkit  LinkSection PDEFormPage FormToolkit getManagedForm getToolkit linkHandler LinkHandler createClient getSection
protected void create Client Section section Form Toolkit toolkit container toolkit create Composite section Grid Layout layout new Grid Layout layout num Columns 2 container set Layout layout section set Client container link Container toolkit create Composite container link Container set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout link Layout new Grid Layout link Layout margin Width 0 link Layout margin Height 0 link Layout vertical Spacing 0 link Container set Layout link Layout  createClient FormToolkit createComposite GridLayout GridLayout numColumns setLayout setClient linkContainer createComposite linkContainer setLayoutData GridData GridData FILL_BOTH GridLayout linkLayout GridLayout linkLayout marginWidth linkLayout marginHeight linkLayout verticalSpacing linkContainer setLayout linkLayout
Busy Indicator show While get Section get Display new Runnable public void run get Page get Editor set Active Page more Page Id  BusyIndicator showWhile getSection getDisplay getPage getEditor setActivePage morePageId
more Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e Busy Indicator show While get Section get Display new Runnable public void run get Page get Editor set Active Page more Page Id  moreButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent BusyIndicator showWhile getSection getDisplay getPage getEditor setActivePage morePageId
private void create More Button more Button get Managed Form get Toolkit create Button container More NON NLS 1 SWT PUSH more Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e Busy Indicator show While get Section get Display new Runnable public void run get Page get Editor set Active Page more Page Id more Button set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING  createMoreButton moreButton getManagedForm getToolkit createButton moreButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent BusyIndicator showWhile getSection getDisplay getPage getEditor setActivePage morePageId moreButton setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING
public void add Object links for int i 0 i links length i create Link links i update More State link Container get Children length link Number Limit reflow  createLink updateMoreState linkContainer getChildren linkNumberLimit
public void remove Object links for int i 0 i links length i dispose Link links i update More State link Container get Children length link Number Limit reflow  disposeLink updateMoreState linkContainer getChildren linkNumberLimit
private void dispose Link Object obj Hyperlink link find obj if link null link dispose  disposeLink
private Hyperlink find Object object Control children link Container get Children for int i 0 i children length i Control child children i if child get Data equals object return Hyperlink child return null  linkContainer getChildren getData
public void update Object links for int i 0 i links length i update links i reflow 
private void update Object object Hyperlink link find object if link null update link object 
private void update Hyperlink hyperlink Object object String text label Provider null label Provider get Text object object to String Image image label Provider null label Provider get Image object null String tooltip label Provider null label Provider get Tool Tip Text object text hyperlink set Text text hyperlink set Tool Tip Text tooltip if hyperlink instanceof Image Hyperlink Image Hyperlink hyperlink set Image image reflow  labelProvider labelProvider getText toString labelProvider labelProvider getImage labelProvider labelProvider getToolTipText setText setToolTipText ImageHyperlink ImageHyperlink setImage
public void refresh dispose old links Control children link Container get Children for int i 0 i children length i children i dispose create Links reflow  linkContainer getChildren createLinks
private void reflow link Container layout container layout get Managed Form reflow true  linkContainer getManagedForm
private void create Links if content Provider null return Object objects content Provider get Elements get Managed Form get Input for int i 0 i objects length i if i link Number Limit break create Link objects i if objects length link Number Limit get Managed Form get Toolkit create Label link Container SWT NULL NON NLS 1 update More State objects length link Number Limit  createLinks contentProvider contentProvider getElements getManagedForm getInput linkNumberLimit createLink linkNumberLimit getManagedForm getToolkit createLabel linkContainer updateMoreState linkNumberLimit
private void update More State boolean need More if need More more Button null create More Button else if need More more Button null more Button dispose more Button null  updateMoreState needMore needMore moreButton createMoreButton needMore moreButton moreButton moreButton
private void create Link Object object Image image label Provider null label Provider get Image object null Hyperlink hyperlink if image null hyperlink get Managed Form get Toolkit create Image Hyperlink link Container SWT NULL Image Hyperlink hyperlink set Image image else hyperlink get Managed Form get Toolkit create Hyperlink link Container null SWT NULL update hyperlink object hyperlink set Data object hyperlink add Hyperlink Listener link Handler  createLink labelProvider labelProvider getImage getManagedForm getToolkit createImageHyperlink linkContainer ImageHyperlink setImage getManagedForm getToolkit createHyperlink linkContainer setData addHyperlinkListener linkHandler
private void do Enter Hyperlink link String status Text label Provider null label Provider get Status Text link get Data link get Text get Page get Editor Site get Action Bars get Status Line Manager set Message status Text  doEnter statusText labelProvider labelProvider getStatusText getData getText getPage getEditorSite getActionBars getStatusLineManager setMessage statusText
set Message status Text private void do Exit Hyperlink link get Page get Editor Site get Action Bars get Status Line Manager set Message null  setMessage statusText doExit getPage getEditorSite getActionBars getStatusLineManager setMessage
set Message null protected void do Link Activated Hyperlink link Object object link get Data get Page get Editor set Active Page more Page Id object  setMessage doLinkActivated getData getPage getEditor setActivePage morePageId
get Page get Editor set Active Page more Page Id object public void set More Page Id String id this more Page Id id  getPage getEditor setActivePage morePageId setMorePageId morePageId
this more Page Id id public void set Link Number Limit int limit this link Number Limit limit  morePageId setLinkNumberLimit linkNumberLimit
this link Number Limit limit public void set Content Provider I Structured Content Provider content Provider this content Provider content Provider  linkNumberLimit setContentProvider IStructuredContentProvider contentProvider contentProvider contentProvider
this content Provider content Provider public void set Label Provider I Link Label Provider provider this label Provider provider  contentProvider contentProvider setLabelProvider ILinkLabelProvider labelProvider

private static final int TYPEID register Type TYPE NAME public static Model Data Transfer get Instance return instance  registerType TYPE_NAME ModelDataTransfer getInstance
Constructor for Model Data Transfer public Model Data Transfer super  ModelDataTransfer ModelDataTransfer
Method declared on Transfer protected int get Type Ids return new int TYPEID  getTypeIds
return the list of type names protected String get Type Names return new String TYPE NAME  getTypeNames TYPE_NAME
protected void java To Native Object data Transfer Data transfer Data if data instanceof Object return Object objects Object data int count objects length try Byte Array Output Stream out new Byte Array Output Stream Object Output Stream object Out new Object Output Stream out write the number of resources object Out write Int count write each object for int i 0 i objects length i object Out write Object objects i cleanup object Out close out close byte bytes out to Byte Array super java To Native bytes transfer Data catch IO Exception e it s best to send nothing if there were problems System out println e  javaToNative TransferData transferData ByteArrayOutputStream ByteArrayOutputStream ObjectOutputStream objectOut ObjectOutputStream objectOut writeInt objectOut writeObject objectOut toByteArray javaToNative transferData IOException
protected Object native To Java Transfer Data transfer Data byte bytes byte super native To Java transfer Data if bytes null return null try Object Input Stream in new Object Input Stream new Byte Array Input Stream bytes int count in read Int Object objects new Object count for int i 0 i count i objects i in read Object in close return objects catch Class Not Found Exception e return null catch IO Exception e return null  nativeToJava TransferData transferData nativeToJava transferData ObjectInputStream ObjectInputStream ByteArrayInputStream readInt readObject ClassNotFoundException IOException

private PDE Form Editor editor public Model Undo Manager PDE Form Editor editor this editor editor operations new Vector  PDEFormEditor ModelUndoManager PDEFormEditor
see I Model Undo Manager connect I Model Change Provider public void connect I Model Change Provider provider provider add Model Changed Listener this if operations null initialize  IModelUndoManager IModelChangeProvider IModelChangeProvider addModelChangedListener
see I Model Undo Manager disconnect I Model Change Provider public void disconnect I Model Change Provider provider provider remove Model Changed Listener this  IModelUndoManager IModelChangeProvider IModelChangeProvider removeModelChangedListener
private void initialize operations new Vector cursor 1 update Actions  updateActions
see I Model Undo Manager is Undoable public boolean is Undoable return cursor 0  IModelUndoManager isUndoable isUndoable
see I Model Undo Manager is Redoable public boolean is Redoable if operations null initialize return cursor 1 operations size  IModelUndoManager isRedoable isRedoable
public void undo I Model Changed Event op get Current Operation if op null return ignore Changes true open Related Page op execute op true cursor update Actions ignore Changes false  IModelChangedEvent getCurrentOperation ignoreChanges openRelatedPage updateActions ignoreChanges
public void redo cursor I Model Changed Event op get Current Operation if op null return ignore Changes true open Related Page op execute op false ignore Changes false update Actions  IModelChangedEvent getCurrentOperation ignoreChanges openRelatedPage ignoreChanges updateActions
protected abstract String get Page Id Object object  getPageId
protected abstract String get Page Id Object object protected abstract void execute I Model Changed Event op boolean undo  getPageId IModelChangedEvent
private void open Related Page I Model Changed Event op Object obj op get Changed Objects 0 String page Id get Page Id obj if page Id null I Form Page cpage editor get Active Page Instance I Form Page new Page editor find Page page Id if cpage new Page editor set Active Page new Page get Id  openRelatedPage IModelChangedEvent getChangedObjects pageId getPageId pageId IFormPage getActivePageInstance IFormPage newPage findPage pageId newPage setActivePage newPage getId
public void model Changed I Model Changed Event event if ignore Changes return if event get Change Type I Model Changed Event WORLD CHANGED initialize return add Operation event  modelChanged IModelChangedEvent ignoreChanges getChangeType IModelChangedEvent WORLD_CHANGED addOperation
private I Model Changed Event get Current Operation if cursor 1 cursor operations size return null return I Model Changed Event operations get cursor  IModelChangedEvent getCurrentOperation IModelChangedEvent
private I Model Changed Event get Next Operation int peek Cursor cursor 1 if peek Cursor operations size return null return I Model Changed Event operations get peek Cursor  IModelChangedEvent getNextOperation peekCursor peekCursor IModelChangedEvent peekCursor
private void add Operation I Model Changed Event operation operations add operation int size operations size if size undo Level Limit int extra size undo Level Limit trim for int i 0 i extra i operations remove i cursor operations size 1 update Actions  addOperation IModelChangedEvent undoLevelLimit undoLevelLimit updateActions
public void set Actions I Action undo Action I Action redo Action this undo Action undo Action this redo Action redo Action update Actions  setActions IAction undoAction IAction redoAction undoAction undoAction redoAction redoAction updateActions
private void update Actions if undo Action null redo Action null undo Action set Enabled is Undoable undo Action set Text get Undo Text redo Action set Enabled is Redoable redo Action set Text get Redo Text  updateActions undoAction redoAction undoAction setEnabled isUndoable undoAction setText getUndoText redoAction setEnabled isRedoable redoAction setText getRedoText
private String get Undo Text I Model Changed Event op get Current Operation if op null return PDE Plugin get Resource String KEY NO UNDO else String op Text get Operation Text op return PDE Plugin get Formatted Message KEY UNDO op Text  getUndoText IModelChangedEvent getCurrentOperation PDEPlugin getResourceString KEY_NO_UNDO opText getOperationText PDEPlugin getFormattedMessage KEY_UNDO opText
private String get Redo Text I Model Changed Event op get Next Operation if op null return PDE Plugin get Resource String KEY NO REDO else String op Text get Operation Text op return PDE Plugin get Formatted Message KEY REDO op Text  getRedoText IModelChangedEvent getNextOperation PDEPlugin getResourceString KEY_NO_REDO opText getOperationText PDEPlugin getFormattedMessage KEY_REDO opText
private String get Operation Text I Model Changed Event op String op Text NON NLS 1 switch op get Change Type case I Model Changed Event INSERT op Text PDE Plugin get Resource String KEY OP ADD break case I Model Changed Event REMOVE op Text PDE Plugin get Resource String KEY OP REMOVE break case I Model Changed Event CHANGE op Text PDE Plugin get Resource String KEY OP CHANGE break return op Text  getOperationText IModelChangedEvent opText getChangeType IModelChangedEvent opText PDEPlugin getResourceString KEY_OP_ADD IModelChangedEvent opText PDEPlugin getResourceString KEY_OP_REMOVE IModelChangedEvent opText PDEPlugin getResourceString KEY_OP_CHANGE opText
public void set Undo Level Limit int limit this undo Level Limit limit  setUndoLevelLimit undoLevelLimit
public void set Ignore Changes boolean ignore this ignore Changes ignore  setIgnoreChanges ignoreChanges

public class Modified Text Property Descriptor extends Text Property Descriptor public Modified Text Property Descriptor String name String display Name super name display Name  ModifiedTextPropertyDescriptor TextPropertyDescriptor ModifiedTextPropertyDescriptor displayName displayName
public Cell Editor create Property Editor Composite parent Cell Editor editor new Modified Text Cell Editor parent if get Validator null editor set Validator get Validator return editor  CellEditor createPropertyEditor CellEditor ModifiedTextCellEditor getValidator setValidator getValidator

public abstract class Multi Source Editor extends PDE Form Editor protected void add Source Page String context Id Input Context context input Context Manager find Context context Id if context null return PDE Source Page source Page Don t duplicate if find Page context Id null return source Page create Source Page this context Id context get Input get Name context get Id source Page set Input Context context try add Page source Page context get Input catch Part Init Exception e PDE Plugin log Exception e  MultiSourceEditor PDEFormEditor addSourcePage contextId InputContext inputContextManager findContext contextId PDESourcePage sourcePage findPage contextId sourcePage createSourcePage contextId getInput getName getId sourcePage setInputContext addPage sourcePage getInput PartInitException PDEPlugin logException
protected void remove Page String page Id I Form Page page find Page page Id if page null return if page is Dirty need to ask the user about this else remove Page page get Index if page is Editor page dispose  removePage pageId IFormPage findPage pageId isDirty removePage getIndex isEditor
protected PDE Source Page create Source Page PDE Form Editor editor String title String name String context Id return new Generic Source Page editor title name  PDESourcePage createSourcePage PDEFormEditor contextId GenericSourcePage

see I Model Undo Manager connect I Model Change Provider public void connect I Model Change Provider provider  IModelUndoManager IModelChangeProvider IModelChangeProvider
see I Model Undo Manager disconnect I Model Change Provider public void disconnect I Model Change Provider provider  IModelUndoManager IModelChangeProvider IModelChangeProvider
see I Model Undo Manager is Undoable public boolean is Undoable return false  IModelUndoManager isUndoable isUndoable
see I Model Undo Manager is Redoable public boolean is Redoable return false  IModelUndoManager isRedoable isRedoable
see I Model Undo Manager undo public void undo  IModelUndoManager
see I Model Undo Manager redo public void redo  IModelUndoManager
see I Model Undo Manager set Undo Level Limit int public void set Undo Level Limit int limit  IModelUndoManager setUndoLevelLimit setUndoLevelLimit
see I Model Undo Manager set Ignore Changes boolean public void set Ignore Changes boolean ignore  IModelUndoManager setIgnoreChanges setIgnoreChanges
public void set Actions I Action undo Action I Action redo Action if undo Action null undo Action set Enabled false if redo Action null redo Action set Enabled false  setActions IAction undoAction IAction redoAction undoAction undoAction setEnabled redoAction redoAction setEnabled

public abstract class PDE Details extends Abstract Form Part implements I Details Page I Context Part public PDE Details  PDEDetails AbstractFormPart IDetailsPage IContextPart PDEDetails
public boolean can Paste Clipboard clipboard return true  canPaste
public boolean do Global Action String action Id return false  doGlobalAction actionId
protected void mark Details Part Control control control set Data part this NON NLS 1  markDetailsPart setData
protected void create Spacer Form Toolkit toolkit Composite parent int span Label spacer toolkit create Label parent NON NLS 1 Grid Data gd new Grid Data gd horizontal Span span spacer set Layout Data gd  createSpacer FormToolkit createLabel GridData GridData horizontalSpan setLayoutData
spacer set Layout Data gd public void cancel Edit super refresh  setLayoutData cancelEdit

private static class PDE Multi Page Editor Site extends Multi Page Editor Site public PDE Multi Page Editor Site Multi Page Editor Part multi Page Editor I Editor Part editor super multi Page Editor editor  PDEMultiPageEditorSite MultiPageEditorSite PDEMultiPageEditorSite MultiPageEditorPart multiPageEditor IEditorPart multiPageEditor
public I Editor Action Bar Contributor get Action Bar Contributor PDE Form Editor editor PDE Form Editor get Multi Page Editor PDE Form Editor Contributor contributor editor get Contributor return contributor get Source Contributor  IEditorActionBarContributor getActionBarContributor PDEFormEditor PDEFormEditor getMultiPageEditor PDEFormEditorContributor getContributor getSourceContributor
public PDE Form Editor PDE Plugin get Default get Label Provider connect this input Context Manager create Input Context Manager  PDEFormEditor PDEPlugin getDefault getLabelProvider inputContextManager createInputContextManager
We must override nested site creation so that we properly pass the source editor contributor when asked protected I Editor Site create Site I Editor Part editor return new PDE Multi Page Editor Site this editor  IEditorSite createSite IEditorPart PDEMultiPageEditorSite
return new PDE Multi Page Editor Site this editor public I Project get Common Project return input Context Manager get Common Project  PDEMultiPageEditorSite IProject getCommonProject inputContextManager getCommonProject
public I Base Model get Aggregate Model if input Context Manager null return input Context Manager get Aggregate Model return null  IBaseModel getAggregateModel inputContextManager inputContextManager getAggregateModel
return null protected abstract Input Context Manager create Input Context Manager  InputContextManager createInputContextManager
protected abstract Input Context Manager create Input Context Manager Tests whether this editor has a context with a provided id The test can be used to check whether to add certain pages param context Id return code true code if provided context is present code false code otherwise public boolean has Input Context String context Id return input Context Manager has Context context Id  InputContextManager createInputContextManager contextId hasInputContext contextId inputContextManager hasContext contextId
return input Context Manager has Context context Id public Input Context Manager get Context Manager return input Context Manager  inputContextManager hasContext contextId InputContextManager getContextManager inputContextManager
protected void create Input Contexts Input Context Manager context Manager I Editor Input input get Editor Input if input instanceof I File Editor Input resource find the project create Resource Contexts context Manager I File Editor Input input else if input instanceof System File Editor Input system file find the file system folder create System File Contexts context Manager System File Editor Input input else if input instanceof I Storage Editor Input create Storage Contexts context Manager I Storage Editor Input input else if input instanceof I Location Provider I Path path I Location Provider input get Path input File file path to File System File Editor Input sinput new System File Editor Input file create System File Contexts context Manager sinput  createInputContexts InputContextManager contextManager IEditorInput getEditorInput IFileEditorInput createResourceContexts contextManager IFileEditorInput SystemFileEditorInput createSystemFileContexts contextManager SystemFileEditorInput IStorageEditorInput createStorageContexts contextManager IStorageEditorInput ILocationProvider IPath ILocationProvider getPath toFile SystemFileEditorInput SystemFileEditorInput createSystemFileContexts contextManager
protected abstract void create Resource Contexts Input Context Manager contexts I File Editor Input input  createResourceContexts InputContextManager IFileEditorInput
protected abstract void create Resource Contexts Input Context Manager contexts I File Editor Input input protected abstract void create System File Contexts Input Context Manager contexts System File Editor Input input  createResourceContexts InputContextManager IFileEditorInput createSystemFileContexts InputContextManager SystemFileEditorInput
protected abstract void create System File Contexts Input Context Manager contexts System File Editor Input input protected abstract void create Storage Contexts Input Context Manager contexts I Storage Editor Input input  createSystemFileContexts InputContextManager SystemFileEditorInput createStorageContexts InputContextManager IStorageEditorInput
see org eclipse ui forms editor Form Editor create Toolkit org eclipse swt widgets Display protected Form Toolkit create Toolkit Display display Create a toolkit that shares colors between editors return new Form Toolkit PDE Plugin get Default get Form Colors display  FormEditor createToolkit FormToolkit createToolkit FormToolkit PDEPlugin getDefault getFormColors
Menu Manager manager new Menu Manager I Menu Listener listener new I Menu Listener public void menu About To Show I Menu Manager manager context Menu About To Show manager  MenuManager MenuManager IMenuListener IMenuListener menuAboutToShow IMenuManager contextMenuAboutToShow
protected void create Pages clipboard new Clipboard get Container get Display Menu Manager manager new Menu Manager I Menu Listener listener new I Menu Listener public void menu About To Show I Menu Manager manager context Menu About To Show manager manager set Remove All When Shown true manager add Menu Listener listener context Menu manager create Context Menu get Container get Container set Menu context Menu create Input Contexts input Context Manager super create Pages input Context Manager add Input Context Listener this String page To Show compute Initial Page Id if page To Show null set Active Page page To Show update Title  createPages getContainer getDisplay MenuManager MenuManager IMenuListener IMenuListener menuAboutToShow IMenuManager contextMenuAboutToShow setRemoveAllWhenShown addMenuListener contextMenu createContextMenu getContainer getContainer setMenu contextMenu createInputContexts inputContextManager createPages inputContextManager addInputContextListener pageToShow computeInitialPageId pageToShow setActivePage pageToShow updateTitle
protected void page Change int new Page Index super page Change new Page Index I Form Page page get Active Page Instance update Content Outline page update Property Sheet page if page null last Active Page Id page get Id  pageChange newPageIndex pageChange newPageIndex IFormPage getActivePageInstance updateContentOutline updatePropertySheet lastActivePageId getId
last Active Page Id page get Id public Clipboard get Clipboard return clipboard  lastActivePageId getId getClipboard
protected void context Menu About To Show I Menu Manager manager PDE Form Editor Contributor contributor get Contributor I Form Page page get Active Page Instance if page instanceof PDE Form Page PDE Form Page page context Menu About To Show manager if contributor null contributor context Menu About To Show manager  contextMenuAboutToShow IMenuManager PDEFormEditorContributor getContributor IFormPage getActivePageInstance PDEFormPage PDEFormPage contextMenuAboutToShow contextMenuAboutToShow
contributor context Menu About To Show manager public PDE Form Editor Contributor get Contributor return PDE Form Editor Contributor get Editor Site get Action Bar Contributor  contextMenuAboutToShow PDEFormEditorContributor getContributor PDEFormEditorContributor getEditorSite getActionBarContributor
protected String compute Initial Page Id String first Page Id null String stored First Page Id load Default Page if stored First Page Id null first Page Id stored First Page Id else if Editor Preference Page get Use Source Page first Page Id get Source Page Id Regardless what is the stored value use source page if model is not valid String invalid Context Id get First Invalid Context Id if invalid Context Id null return invalid Context Id return first Page Id  computeInitialPageId firstPageId storedFirstPageId loadDefaultPage storedFirstPageId firstPageId storedFirstPageId EditorPreferencePage getUseSourcePage firstPageId getSourcePageId invalidContextId getFirstInvalidContextId invalidContextId invalidContextId firstPageId
private String get Source Page Id Input Context context input Context Manager get Primary Context if context null return context get Id return null  getSourcePageId InputContext inputContextManager getPrimaryContext getId
private String get First Invalid Context Id Input Context invalid Contexts input Context Manager get Invalid Contexts if invalid Contexts length 0 return null If primary context is among the invalid ones return that for int i 0 i invalid Contexts length i if invalid Contexts i is Primary return invalid Contexts i get Id Return the first one return invalid Contexts 0 get Id  getFirstInvalidContextId InputContext invalidContexts inputContextManager getInvalidContexts invalidContexts invalidContexts invalidContexts isPrimary invalidContexts getId invalidContexts getId
public String get Title if input Context Manager null return super get Title Input Context context input Context Manager get Primary Context if context null return super get Title return context get Input get Name  getTitle inputContextManager getTitle InputContext inputContextManager getPrimaryContext getTitle getInput getName
public void update Title fire Property Change I Workbench Part PROP TITLE  updateTitle firePropertyChange IWorkbenchPart PROP_TITLE
public String get Title Property return NON NLS 1  getTitleProperty
public void do Save I Progress Monitor monitor commit Form Pages true input Context Manager save monitor editor Dirty State Changed  doSave IProgressMonitor commitFormPages inputContextManager editorDirtyStateChanged
public void do Revert I Form Page current Page get Active Page Instance if current Page null current Page instanceof PDE Form Page PDE Form Page current Page cancel Edit I Form Page pages get Pages for int i 0 i pages length i if pages i instanceof PDE Source Page PDE Source Page page PDE Source Page pages i Input Context context input Context Manager find Context page get Id context set Blocked true page do Revert To Saved context set Blocked false editor Dirty State Changed  doRevert IFormPage currentPage getActivePageInstance currentPage currentPage PDEFormPage PDEFormPage currentPage cancelEdit IFormPage getPages PDESourcePage PDESourcePage PDESourcePage InputContext inputContextManager findContext getId setBlocked doRevertToSaved setBlocked editorDirtyStateChanged
public void do Revert I Editor Input input I Form Page current Page get Active Page Instance if current Page null current Page instanceof PDE Form Page PDE Form Page current Page cancel Edit Input Context context input Context Manager get Context input I Form Page page find Page context get Id if page null page instanceof PDE Source Page PDE Source Page spage PDE Source Page page spage do Revert To Saved editor Dirty State Changed  doRevert IEditorInput IFormPage currentPage getActivePageInstance currentPage currentPage PDEFormPage PDEFormPage currentPage cancelEdit InputContext inputContextManager getContext IFormPage findPage getId PDESourcePage PDESourcePage PDESourcePage doRevertToSaved editorDirtyStateChanged
private void commit Form Pages boolean on Save I Form Page pages get Pages for int i 0 i pages length i I Form Page page pages i I Managed Form mform page get Managed Form if mform null mform is Dirty mform commit true  commitFormPages onSave IFormPage getPages IFormPage IManagedForm getManagedForm isDirty
see org eclipse ui I Saveable Part do Save As public void do Save As  ISaveablePart doSaveAs doSaveAs
see org eclipse ui I Saveable Part is Save As Allowed public boolean is Save As Allowed return false  ISaveablePart isSaveAsAllowed isSaveAsAllowed
private void store Default Page I Editor Input input get Editor Input String page Id last Active Page Id if page Id null return if input instanceof I File Editor Input I File file I File Editor Input input get File if file null set the settings on the resouce try file set Persistent Property IPDEUI Constants DEFAULT EDITOR PAGE KEY NEW page Id catch Core Exception e else if input instanceof System File Editor Input File file File System File Editor Input input get Adapter File class if file null return I Dialog Settings section get Settings Section section put file get Path page Id  storeDefaultPage IEditorInput getEditorInput pageId lastActivePageId pageId IFileEditorInput IFile IFileEditorInput getFile setPersistentProperty IPDEUIConstants DEFAULT_EDITOR_PAGE_KEY_NEW pageId CoreException SystemFileEditorInput SystemFileEditorInput getAdapter IDialogSettings getSettingsSection getPath pageId
private String load Default Page I Editor Input input get Editor Input if input instanceof I File Editor Input load the setting from the resource I File file I File Editor Input input get File try return file get Persistent Property IPDEUI Constants DEFAULT EDITOR PAGE KEY NEW catch Core Exception e return null else if input instanceof System File Editor Input File file File System File Editor Input input get Adapter File class if file null return null I Dialog Settings section get Settings Section String key file get Path return section get key return null  loadDefaultPage IEditorInput getEditorInput IFileEditorInput IFile IFileEditorInput getFile getPersistentProperty IPDEUIConstants DEFAULT_EDITOR_PAGE_KEY_NEW CoreException SystemFileEditorInput SystemFileEditorInput getAdapter IDialogSettings getSettingsSection getPath
public void dispose store Default Page set Selection new Structured Selection PDE Plugin get Default get Label Provider disconnect this if clipboard null clipboard dispose clipboard null super dispose input Context Manager dispose input Context Manager null  storeDefaultPage setSelection StructuredSelection PDEPlugin getDefault getLabelProvider inputContextManager inputContextManager
input Context Manager null public boolean is Dirty last Dirty State compute Dirty State return last Dirty State  inputContextManager isDirty lastDirtyState computeDirtyState lastDirtyState
private boolean compute Dirty State I Form Page page get Active Page Instance if page null page is Dirty input Context Manager null input Context Manager is Dirty return true return super is Dirty  computeDirtyState IFormPage getActivePageInstance isDirty inputContextManager inputContextManager isDirty isDirty
public boolean get Last Dirty State return last Dirty State  getLastDirtyState lastDirtyState
public void fire Save Needed String context Id boolean notify if context Id null return Input Context context input Context Manager find Context context Id if context null fire Save Needed context get Input notify  fireSaveNeeded contextId contextId InputContext inputContextManager findContext contextId fireSaveNeeded getInput
public void fire Save Needed I Editor Input input boolean notify if notify editor Dirty State Changed if is Dirty validate Edit input  fireSaveNeeded IEditorInput editorDirtyStateChanged isDirty validateEdit
public void editor Dirty State Changed super editor Dirty State Changed PDE Form Editor Contributor contributor get Contributor if contributor null contributor update Actions  editorDirtyStateChanged editorDirtyStateChanged PDEFormEditorContributor getContributor updateActions
if context validate Edit get Site get Shell get Display async Exec new Runnable public void run do Revert context get Input context set Validated false  validateEdit getSite getShell getDisplay asyncExec doRevert getInput setValidated
private void validate Edit I Editor Input input final Input Context context input Context Manager get Context input if context validate Edit get Site get Shell get Display async Exec new Runnable public void run do Revert context get Input context set Validated false  validateEdit IEditorInput InputContext inputContextManager getContext validateEdit getSite getShell getDisplay asyncExec doRevert getInput setValidated
private I Dialog Settings get Settings Section store the setting in dialog settings I Dialog Settings root PDE Plugin get Default get Dialog Settings I Dialog Settings section root get Section multi page editor NON NLS 1 if section null section root add New Section multi page editor NON NLS 1 return section  IDialogSettings getSettingsSection IDialogSettings PDEPlugin getDefault getDialogSettings IDialogSettings getSection addNewSection
public void goto Marker I Marker marker I Resource resource marker get Resource Input Context context input Context Manager find Context resource if context null return I Form Page page set Active Page context get Id IDE goto Marker page marker  gotoMarker IMarker IResource getResource InputContext inputContextManager findContext IFormPage setActivePage getId gotoMarker
public void open To Object obj I Marker marker TODO hack until the move to the new search PDE Source Page source Page PDE Source Page set Active Page Plugin Input Context CONTEXT ID if source Page null source Page select Reveal marker if Editor Preference Page get Use Source Page get Editor Input instanceof System File Editor Input if marker null I Resource resource marker get Resource Input Context context get Context Manager find Context resource if context null PDE Source Page source Page PDE Source Page set Active Page context get Id source Page select Reveal marker else select Reveal obj  openTo IMarker PDESourcePage sourcePage PDESourcePage setActivePage PluginInputContext CONTEXT_ID sourcePage sourcePage selectReveal EditorPreferencePage getUseSourcePage getEditorInput SystemFileEditorInput IResource getResource InputContext getContextManager findContext PDESourcePage sourcePage PDESourcePage setActivePage getId sourcePage selectReveal selectReveal
public void set Selection I Selection selection get Site get Selection Provider set Selection selection get Contributor update Selectable Actions selection  setSelection ISelection getSite getSelectionProvider setSelection getContributor updateSelectableActions
get Contributor update Selectable Actions selection public I Selection get Selection return get Site get Selection Provider get Selection  getContributor updateSelectableActions ISelection getSelection getSite getSelectionProvider getSelection
public Object get Adapter Class key if key equals I Content Outline Page class return get Content Outline if key equals I Property Sheet Page class return get Property Sheet if key equals I Goto Marker class return this return super get Adapter key  getAdapter IContentOutlinePage getContentOutline IPropertySheetPage getPropertySheet IGotoMarker getAdapter
return super get Adapter key public Menu get Context Menu return context Menu  getAdapter getContextMenu contextMenu
public PDE Multi Page Content Outline get Content Outline if content Outline null content Outline is Disposed content Outline new PDE Multi Page Content Outline update Content Outline get Active Page Instance return content Outline  PDEMultiPageContentOutline getContentOutline contentOutline contentOutline isDisposed contentOutline PDEMultiPageContentOutline updateContentOutline getActivePageInstance contentOutline
public PDE Multi Page Property Sheet get Property Sheet if property Sheet null property Sheet is Disposed property Sheet new PDE Multi Page Property Sheet update Property Sheet get Active Page Instance return property Sheet  PDEMultiPagePropertySheet getPropertySheet propertySheet propertySheet isDisposed propertySheet PDEMultiPagePropertySheet updatePropertySheet getActivePageInstance propertySheet
protected I Content Outline Page get Form Outline if form Outline null form Outline create Content Outline return form Outline  IContentOutlinePage getFormOutline formOutline formOutline createContentOutline formOutline
return form Outline protected I Content Outline Page create Content Outline return new Form Outline Page this  formOutline IContentOutlinePage createContentOutline FormOutlinePage
private void update Content Outline I Form Page page if content Outline null return I Content Outline Page outline null if page instanceof PDE Source Page outline PDE Source Page page get Content Outline else outline get Form Outline if outline instanceof Form Outline Page Form Outline Page outline refresh content Outline set Page Active outline  updateContentOutline IFormPage contentOutline IContentOutlinePage PDESourcePage PDESourcePage getContentOutline getFormOutline FormOutlinePage FormOutlinePage contentOutline setPageActive
content Outline set Page Active outline protected I Property Sheet Page get Property Sheet PDE Form Page page return page get Property Sheet Page  contentOutline setPageActive IPropertySheetPage getPropertySheet PDEFormPage getPropertySheetPage
void update Property Sheet I Form Page page if property Sheet null return if page instanceof PDE Form Page I Property Sheet Page property Sheet Page get Property Sheet PDE Form Page page if property Sheet Page null property Sheet set Page Active property Sheet Page else property Sheet set Default Page Active  updatePropertySheet IFormPage propertySheet PDEFormPage IPropertySheetPage propertySheetPage getPropertySheet PDEFormPage propertySheetPage propertySheet setPageActive propertySheetPage propertySheet setDefaultPageActive
package I Form Page get Pages Array List form Pages new Array List for int i 0 i pages size i Object page pages get i if page instanceof I Form Page form Pages add page return I Form Page form Pages to Array new I Form Page form Pages size  IFormPage getPages ArrayList formPages ArrayList IFormPage formPages IFormPage formPages toArray IFormPage formPages
protected void perform Global Action String id preserve selection I Selection selection get Selection boolean handled PDE Form Page get Active Page Instance perform Global Action id if handled I Form Page page get Active Page Instance if page instanceof PDE Form Page if id equals Action Factory UNDO get Id input Context Manager undo return if id equals Action Factory REDO get Id input Context Manager redo return if id equals Action Factory CUT get Id id equals Action Factory COPY get Id copy To Clipboard selection return  performGlobalAction ISelection getSelection PDEFormPage getActivePageInstance performGlobalAction IFormPage getActivePageInstance PDEFormPage ActionFactory getId inputContextManager ActionFactory getId inputContextManager ActionFactory getId ActionFactory getId copyToClipboard
private void copy To Clipboard I Selection selection Object objects null String text Version null if selection instanceof I Structured Selection I Structured Selection ssel I Structured Selection selection if ssel null ssel size 0 return objects ssel to Array String Writer writer new String Writer Print Writer pwriter new Print Writer writer Class obj Class null for int i 0 i objects length i Object obj objects i if obj Class null obj Class obj get Class else if obj Class equals obj get Class false return if obj instanceof I Writable I Writable obj write pwriter NON NLS 1 pwriter flush text Version writer to String try pwriter close writer close catch IO Exception e else if selection instanceof I Text Selection text Version I Text Selection selection get Text if text Version null text Version length 0 objects null return set the clipboard contents Object o null Transfer t null if objects null o new Object text Version t new Transfer Text Transfer get Instance else if text Version null text Version length 0 o new Object objects t new Transfer Model Data Transfer get Instance else o new Object objects text Version t new Transfer Model Data Transfer get Instance Text Transfer get Instance clipboard set Contents o t  copyToClipboard ISelection textVersion IStructuredSelection IStructuredSelection IStructuredSelection toArray StringWriter StringWriter PrintWriter PrintWriter objClass objClass objClass getClass objClass getClass IWritable IWritable textVersion toString IOException ITextSelection textVersion ITextSelection getText textVersion textVersion textVersion TextTransfer getInstance textVersion textVersion ModelDataTransfer getInstance textVersion ModelDataTransfer getInstance TextTransfer getInstance setContents
public boolean can Paste From Clipboard I Form Page page get Active Page Instance if page instanceof PDE Form Page return PDE Form Page page can Paste get Clipboard return false  canPasteFromClipboard IFormPage getActivePageInstance PDEFormPage PDEFormPage canPaste getClipboard
public boolean can Copy I Selection selection if selection null return false if selection instanceof I Structured Selection return selection is Empty if selection instanceof I Text Selection I Text Selection text Selection I Text Selection selection return text Selection get Length 0 return false  canCopy ISelection IStructuredSelection isEmpty ITextSelection ITextSelection textSelection ITextSelection textSelection getLength
void update Undo I Action undo Action I Action redo Action I Model Undo Manager undo Manager input Context Manager get Undo Manager if undo Manager null undo Manager set Actions undo Action redo Action  updateUndo IAction undoAction IAction redoAction IModelUndoManager undoManager inputContextManager getUndoManager undoManager undoManager setActions undoAction redoAction

class Global Action extends Action implements I Update private String id public Global Action String id this id id  GlobalAction IUpdate GlobalAction
this id id public void run editor perform Global Action id update Selectable Actions editor get Selection  performGlobalAction updateSelectableActions getSelection
update Selectable Actions editor get Selection public void update get Action Bars update Action Bars  updateSelectableActions getSelection getActionBars updateActionBars
class Clipboard Action extends Global Action public Clipboard Action String id super id set Enabled false  ClipboardAction GlobalAction ClipboardAction setEnabled
set Enabled false public void selection Changed I Selection selection  setEnabled selectionChanged ISelection
public boolean is Editable if editor null return false I Base Model model editor get Aggregate Model if model instanceof I Editable return I Editable model is Editable return false  isEditable IBaseModel getAggregateModel IEditable IEditable isEditable
class Cut Action extends Clipboard Action public Cut Action super Action Factory CUT get Id set Text PDE Plugin get Resource String ACTIONS CUT  CutAction ClipboardAction CutAction ActionFactory getId setText PDEPlugin getResourceString ACTIONS_CUT
set Text PDE Plugin get Resource String ACTIONS CUT public void selection Changed I Selection selection set Enabled is Editable editor can Copy selection  setText PDEPlugin getResourceString ACTIONS_CUT selectionChanged ISelection setEnabled isEditable canCopy
class Copy Action extends Clipboard Action public Copy Action super Action Factory COPY get Id set Text PDE Plugin get Resource String ACTIONS COPY  CopyAction ClipboardAction CopyAction ActionFactory getId setText PDEPlugin getResourceString ACTIONS_COPY
set Text PDE Plugin get Resource String ACTIONS COPY public void selection Changed I Selection selection set Enabled editor can Copy selection  setText PDEPlugin getResourceString ACTIONS_COPY selectionChanged ISelection setEnabled canCopy
class Paste Action extends Clipboard Action public Paste Action super Action Factory PASTE get Id set Text PDE Plugin get Resource String ACTIONS PASTE selection Changed null  PasteAction ClipboardAction PasteAction ActionFactory getId setText PDEPlugin getResourceString ACTIONS_PASTE selectionChanged
selection Changed null public void selection Changed I Selection selection set Enabled is Editable editor can Paste From Clipboard  selectionChanged selectionChanged ISelection setEnabled isEditable canPasteFromClipboard
class Save Action extends Action implements I Update public Save Action  SaveAction IUpdate SaveAction
public Save Action public void run if editor null PDE Plugin get Active Page save Editor editor false  SaveAction PDEPlugin getActivePage saveEditor
public void update if editor null set Enabled editor is Dirty else set Enabled false  setEnabled isDirty setEnabled
class Revert Action extends Action implements I Update public Revert Action  RevertAction IUpdate RevertAction
public Revert Action public void run if editor null editor do Revert  RevertAction doRevert
public void update if editor null set Enabled editor is Dirty else set Enabled false  setEnabled isDirty setEnabled
public PDE Form Editor Contributor String menu Name source Contributor new Text Editor Action Contributor make Actions  PDEFormEditorContributor menuName sourceContributor TextEditorActionContributor makeActions
public I Editor Action Bar Contributor get Source Contributor return source Contributor  IEditorActionBarContributor getSourceContributor sourceContributor
return source Contributor private void add Global Action String id Global Action action new Global Action id add Global Action id action  sourceContributor addGlobalAction GlobalAction GlobalAction addGlobalAction
add Global Action id action private void add Global Action String id Action action global Actions put id action  addGlobalAction addGlobalAction globalActions
public void add Clipboard Actions I Menu Manager mng mng add cut Action mng add copy Action mng add paste Action mng add new Separator mng add revert Action  addClipboardActions IMenuManager cutAction copyAction pasteAction revertAction
mng add revert Action public void context Menu About To Show I Menu Manager mng context Menu About To Show mng true  revertAction contextMenuAboutToShow IMenuManager contextMenuAboutToShow
public void context Menu About To Show I Menu Manager mng boolean add Clipboard if editor null update Selectable Actions editor get Selection if add Clipboard add Clipboard Actions mng mng add save Action  contextMenuAboutToShow IMenuManager addClipboard updateSelectableActions getSelection addClipboard addClipboardActions saveAction
mng add save Action public void contribute To Menu I Menu Manager mm  saveAction contributeToMenu IMenuManager
public void contribute To Menu I Menu Manager mm public void contribute To Status Line I Status Line Manager slm  contributeToMenu IMenuManager contributeToStatusLine IStatusLineManager
public void contribute To Status Line I Status Line Manager slm public void contribute To Tool Bar I Tool Bar Manager tbm  contributeToStatusLine IStatusLineManager contributeToToolBar IToolBarManager
public void contribute To Tool Bar I Tool Bar Manager tbm public void contribute To Cool Bar I Cool Bar Manager cbm  contributeToToolBar IToolBarManager contributeToCoolBar ICoolBarManager
public void dispose source Contributor dispose source Action Bars dispose super dispose  sourceContributor sourceActionBars
public void init I Action Bars bars super init bars source Action Bars new Sub Action Bars bars source Contributor init source Action Bars  IActionBars sourceActionBars SubActionBars sourceContributor sourceActionBars
public PDE Form Editor get Editor return editor  PDEFormEditor getEditor
return editor public I Action get Global Action String id return I Action global Actions get id  IAction getGlobalAction IAction globalActions
return I Action global Actions get id public I Action get Save Action return save Action  IAction globalActions IAction getSaveAction saveAction
return save Action public I Action get Revert Action return revert Action  saveAction IAction getRevertAction revertAction
return revert Action public I Status Line Manager get Status Line Manager return get Action Bars get Status Line Manager  revertAction IStatusLineManager getStatusLineManager getActionBars getStatusLineManager
protected void make Actions clipboard actions cut Action new Cut Action copy Action new Copy Action paste Action new Paste Action add Global Action Action Factory CUT get Id cut Action add Global Action Action Factory COPY get Id copy Action add Global Action Action Factory PASTE get Id paste Action add Global Action Action Factory DELETE get Id undo redo add Global Action Action Factory UNDO get Id add Global Action Action Factory REDO get Id select find add Global Action Action Factory SELECT ALL get Id add Global Action Action Factory FIND get Id bookmark add Global Action IDE Action Factory BOOKMARK get Id save revert save Action new Save Action save Action set Text PDE Plugin get Resource String ACTIONS SAVE revert Action new Revert Action revert Action set Text PDE Plugin get Resource String ACTIONS REVERT  makeActions cutAction CutAction copyAction CopyAction pasteAction PasteAction addGlobalAction ActionFactory getId cutAction addGlobalAction ActionFactory getId copyAction addGlobalAction ActionFactory getId pasteAction addGlobalAction ActionFactory getId addGlobalAction ActionFactory getId addGlobalAction ActionFactory getId addGlobalAction ActionFactory SELECT_ALL getId addGlobalAction ActionFactory getId addGlobalAction IDEActionFactory getId saveAction SaveAction saveAction setText PDEPlugin getResourceString ACTIONS_SAVE revertAction RevertAction revertAction setText PDEPlugin getResourceString ACTIONS_REVERT
public void set Active Editor I Editor Part target Editor if editor null editor update Undo null null if target Editor instanceof PDE Source Page Fixing the goto line problem the action is thinking that source page is a standalone editor and tries to activate it 19361 PDE Source Page page PDE Source Page target Editor PDE Plugin get Active Page activate page get Editor return if target Editor instanceof PDE Form Editor this editor PDE Form Editor target Editor else return editor update Undo get Global Action Action Factory UNDO get Id get Global Action Action Factory REDO get Id I Editor Part page editor get Active Editor set Active Page page update Selectable Actions editor get Selection  setActiveEditor IEditorPart targetEditor updateUndo targetEditor PDESourcePage PDESourcePage PDESourcePage targetEditor PDEPlugin getActivePage getEditor targetEditor PDEFormEditor PDEFormEditor targetEditor updateUndo getGlobalAction ActionFactory getId getGlobalAction ActionFactory getId IEditorPart getActiveEditor setActivePage updateSelectableActions getSelection
public void set Active Page I Editor Part new Editor if editor null return I Form Page old Page page I Form Page new Page editor get Active Page Instance this page new Page if new Page null return update Actions if old Page null old Page is Editor false new Page is Editor false get Action Bars update Action Bars return PDE Source Page source Page null if new Page instanceof PDE Source Page source Page PDE Source Page new Page if source Page null source Page equals old Page return source Contributor set Active Editor source Page set Source Action Bars Active source Page null  setActivePage IEditorPart newEditor IFormPage oldPage IFormPage newPage getActivePageInstance newPage newPage updateActions oldPage oldPage isEditor newPage isEditor getActionBars updateActionBars PDESourcePage sourcePage newPage PDESourcePage sourcePage PDESourcePage newPage sourcePage sourcePage oldPage sourceContributor setActiveEditor sourcePage setSourceActionBarsActive sourcePage
private void set Source Action Bars Active boolean active I Action Bars root Bars get Action Bars root Bars clear Global Action Handlers PlatformUI get Workbench get Command Support remove Handler Submissions new Array List root Bars update Action Bars if active source Action Bars activate Map handlers source Action Bars get Global Action Handlers if handlers null Set keys handlers key Set for Iterator iter keys iterator iter has Next String id String iter next root Bars set Global Action Handler id I Action handlers get id else source Action Bars deactivate register Global Action Handlers root Bars update Action Bars  setSourceActionBarsActive IActionBars rootBars getActionBars rootBars clearGlobalActionHandlers getWorkbench getCommandSupport removeHandlerSubmissions ArrayList rootBars updateActionBars sourceActionBars sourceActionBars getGlobalActionHandlers keySet hasNext rootBars setGlobalActionHandler IAction sourceActionBars registerGlobalActionHandlers rootBars updateActionBars
private void register Global Action Handlers register Global Action Action Factory DELETE get Id register Global Action Action Factory UNDO get Id register Global Action Action Factory REDO get Id register Global Action Action Factory CUT get Id register Global Action Action Factory COPY get Id register Global Action Action Factory PASTE get Id register Global Action Action Factory SELECT ALL get Id register Global Action Action Factory FIND get Id hook revert get Action Bars set Global Action Handler Action Factory REVERT get Id revert Action  registerGlobalActionHandlers registerGlobalAction ActionFactory getId registerGlobalAction ActionFactory getId registerGlobalAction ActionFactory getId registerGlobalAction ActionFactory getId registerGlobalAction ActionFactory getId registerGlobalAction ActionFactory getId registerGlobalAction ActionFactory SELECT_ALL getId registerGlobalAction ActionFactory getId getActionBars setGlobalActionHandler ActionFactory getId revertAction
get Action Bars set Global Action Handler Action Factory REVERT get Id revert Action private void register Global Action String id I Action action get Global Action id get Action Bars set Global Action Handler id action  getActionBars setGlobalActionHandler ActionFactory getId revertAction registerGlobalAction IAction getGlobalAction getActionBars setGlobalActionHandler
get Action Bars set Global Action Handler id action public void update Actions save Action update revert Action update  getActionBars setGlobalActionHandler updateActions saveAction revertAction
public void update Selectable Actions I Selection selection if editor null cut Action selection Changed selection copy Action selection Changed selection paste Action selection Changed selection  updateSelectableActions ISelection cutAction selectionChanged copyAction selectionChanged pasteAction selectionChanged

public abstract class PDE Form Page extends Form Page param editor param id param title public PDE Form Page Form Editor editor String id String title super editor id title  PDEFormPage FormPage PDEFormPage FormEditor
public void run Busy Indicator show While form get Display new Runnable public void run Workbench Help display Help Resource href  BusyIndicator showWhile getDisplay WorkbenchHelp displayHelpResource
Action help Action new Action help NON NLS 1 public void run Busy Indicator show While form get Display new Runnable public void run Workbench Help display Help Resource href  helpAction BusyIndicator showWhile getDisplay WorkbenchHelp displayHelpResource
protected void create Form Content I Managed Form managed Form final Scrolled Form form managed Form get Form form set Background Image PDE Plugin get Default get Label Provider get PDE Plugin Images DESC FORM BANNER final String href get Help Resource if href null I Tool Bar Manager manager form get Tool Bar Manager Action help Action new Action help NON NLS 1 public void run Busy Indicator show While form get Display new Runnable public void run Workbench Help display Help Resource href help Action set Tool Tip Text PDE Plugin get Resource String PDE Form Page help NON NLS 1 help Action set Image Descriptor PDE Plugin Images DESC HELP manager add help Action form update Tool Bar  createFormContent IManagedForm managedForm ScrolledForm managedForm getForm setBackgroundImage PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_FORM_BANNER getHelpResource IToolBarManager getToolBarManager helpAction BusyIndicator showWhile getDisplay WorkbenchHelp displayHelpResource helpAction setToolTipText PDEPlugin getResourceString PDEFormPage helpAction setImageDescriptor PDEPluginImages DESC_HELP helpAction updateToolBar
public PDE Form Editor getPDE Editor return PDE Form Editor get Editor  PDEFormEditor getPDEEditor PDEFormEditor getEditor
return PDE Form Editor get Editor protected String get Help Resource return null  PDEFormEditor getEditor getHelpResource
return null public I Base Model get Model return getPDE Editor get Aggregate Model  IBaseModel getModel getPDEEditor getAggregateModel
return getPDE Editor get Aggregate Model public void context Menu About To Show I Menu Manager menu  getPDEEditor getAggregateModel contextMenuAboutToShow IMenuManager
protected Control get Focus Control Control control get Managed Form get Form if control null control is Disposed return null Display display control get Display Control focus Control display get Focus Control if focus Control null focus Control is Disposed return null return focus Control  getFocusControl getManagedForm getForm isDisposed getDisplay focusControl getFocusControl focusControl focusControl isDisposed focusControl
public boolean perform Global Action String action Id Control focus Control get Focus Control if focus Control null return false if can Perform Directly action Id focus Control return true Abstract Form Part focus Part get Focus Section if focus Part null if focus Part instanceof PDE Section return PDE Section focus Part do Global Action action Id if focus Part instanceof PDE Details return PDE Details focus Part do Global Action action Id return false  performGlobalAction actionId focusControl getFocusControl focusControl canPerformDirectly actionId focusControl AbstractFormPart focusPart getFocusSection focusPart focusPart PDESection PDESection focusPart doGlobalAction actionId focusPart PDEDetails PDEDetails focusPart doGlobalAction actionId
public boolean can Paste Clipboard clipboard Abstract Form Part focus Part get Focus Section if focus Part null if focus Part instanceof PDE Section return PDE Section focus Part can Paste clipboard if focus Part instanceof PDE Details return PDE Details focus Part can Paste clipboard return false  canPaste AbstractFormPart focusPart getFocusSection focusPart focusPart PDESection PDESection focusPart canPaste focusPart PDEDetails PDEDetails focusPart canPaste
private Abstract Form Part get Focus Section Control focus Control get Focus Control if focus Control null return null Composite parent focus Control get Parent Abstract Form Part target Part null while parent null Object data parent get Data part NON NLS 1 if data null data instanceof Abstract Form Part target Part Abstract Form Part data break parent parent get Parent return target Part  AbstractFormPart getFocusSection focusControl getFocusControl focusControl focusControl getParent AbstractFormPart targetPart getData AbstractFormPart targetPart AbstractFormPart getParent targetPart
return target Part public I Property Sheet Page get Property Sheet Page return null  targetPart IPropertySheetPage getPropertySheetPage
protected boolean can Perform Directly String id Control control if control instanceof Text Text text Text control if id equals Action Factory CUT get Id text cut return true if id equals Action Factory COPY get Id text copy return true if id equals Action Factory PASTE get Id text paste return true if id equals Action Factory SELECT ALL get Id text select All return true if id equals Action Factory DELETE get Id int count text get Selection Count if count 0 int caret Pos text get Caret Position text set Selection caret Pos caret Pos 1 text insert NON NLS 1 return true return false  canPerformDirectly ActionFactory getId ActionFactory getId ActionFactory getId ActionFactory SELECT_ALL getId selectAll ActionFactory getId getSelectionCount caretPos getCaretPosition setSelection caretPos caretPos
public void cancel Edit I Form Part parts get Managed Form get Parts for int i 0 i parts length i I Form Part part parts i if part instanceof I Context Part I Context Part part cancel Edit  cancelEdit IFormPart getManagedForm getParts IFormPart IContextPart IContextPart cancelEdit

private PDE Form Page page public PDE Master Details Block PDE Form Page page this page page  PDEFormPage PDEMasterDetailsBlock PDEFormPage
public PDE Form Page get Page return page  PDEFormPage getPage
protected abstract PDE Section create Master Section I Managed Form managed Form Composite parent  PDESection createMasterSection IManagedForm managedForm
protected void create Master Part final I Managed Form managed Form Composite parent PDE Section section create Master Section managed Form parent managed Form add Part section Section sc section get Section sc margin Width 5 sc margin Height 5  createMasterPart IManagedForm managedForm PDESection createMasterSection managedForm managedForm addPart getSection marginWidth marginHeight
Action haction new Action hor Action AS RADIO BUTTON NON NLS 1 public void run sash Form set Orientation SWT HORIZONTAL form reflow true  AS_RADIO_BUTTON sashForm setOrientation
Action vaction new Action ver Action AS RADIO BUTTON NON NLS 1 public void run sash Form set Orientation SWT VERTICAL form reflow true  AS_RADIO_BUTTON sashForm setOrientation
protected void create Tool Bar Actions I Managed Form managed Form final Scrolled Form form managed Form get Form Action haction new Action hor Action AS RADIO BUTTON NON NLS 1 public void run sash Form set Orientation SWT HORIZONTAL form reflow true haction set Checked true haction set Tool Tip Text PDE Plugin get Resource String Details Block horizontal NON NLS 1 haction set Image Descriptor PDE Plugin Images DESC HORIZONTAL haction set Disabled Image Descriptor PDE Plugin Images DESC HORIZONTAL DISABLED Action vaction new Action ver Action AS RADIO BUTTON NON NLS 1 public void run sash Form set Orientation SWT VERTICAL form reflow true vaction set Checked false vaction set Tool Tip Text PDE Plugin get Resource String Details Block vertical NON NLS 1 vaction set Image Descriptor PDE Plugin Images DESC VERTICAL vaction set Disabled Image Descriptor PDE Plugin Images DESC VERTICAL DISABLED form get Tool Bar Manager add haction form get Tool Bar Manager add vaction  createToolBarActions IManagedForm managedForm ScrolledForm managedForm getForm AS_RADIO_BUTTON sashForm setOrientation setChecked setToolTipText PDEPlugin getResourceString DetailsBlock setImageDescriptor PDEPluginImages DESC_HORIZONTAL setDisabledImageDescriptor PDEPluginImages DESC_HORIZONTAL_DISABLED AS_RADIO_BUTTON sashForm setOrientation setChecked setToolTipText PDEPlugin getResourceString DetailsBlock setImageDescriptor PDEPluginImages DESC_VERTICAL setDisabledImageDescriptor PDEPluginImages DESC_VERTICAL_DISABLED getToolBarManager getToolBarManager

private I Action Bars action Bars public PDE Multi Page Content Outline listeners new Array List  IActionBars actionBars PDEMultiPageContentOutline ArrayList
public void add Focus Listener Focus Listener listener  addFocusListener FocusListener
public void add Focus Listener Focus Listener listener public void add Selection Changed Listener I Selection Changed Listener listener listeners add listener  addFocusListener FocusListener addSelectionChangedListener ISelectionChangedListener
listeners add listener public void create Control Composite parent pagebook new Page Book parent SWT NONE  createControl PageBook
public void dispose if pagebook null pagebook is Disposed pagebook dispose if empty Page null empty Page dispose empty Page null pagebook null listeners null  isDisposed emptyPage emptyPage emptyPage
public boolean is Disposed return listeners null  isDisposed
public Control get Control return pagebook  getControl
return pagebook public Page Book get Pagebook return pagebook  PageBook getPagebook
return pagebook public I Selection get Selection return selection  ISelection getSelection
public void make Contributions I Menu Manager menu Manager I Tool Bar Manager tool Bar Manager I Status Line Manager status Line Manager  makeContributions IMenuManager menuManager IToolBarManager toolBarManager IStatusLineManager statusLineManager
I Status Line Manager status Line Manager public void remove Focus Listener Focus Listener listener  IStatusLineManager statusLineManager removeFocusListener FocusListener
public void remove Focus Listener Focus Listener listener public void remove Selection Changed Listener I Selection Changed Listener listener listeners remove listener  removeFocusListener FocusListener removeSelectionChangedListener ISelectionChangedListener
listeners remove listener public void selection Changed Selection Changed Event event set Selection event get Selection  selectionChanged SelectionChangedEvent setSelection getSelection
public void set Action Bars I Action Bars action Bars this action Bars action Bars if current Page null set Page Active current Page  setActionBars IActionBars actionBars actionBars actionBars currentPage setPageActive currentPage
set Page Active current Page public I Action Bars get Action Bars return action Bars  setPageActive currentPage IActionBars getActionBars actionBars
return action Bars public void set Focus if current Page null current Page set Focus  actionBars setFocus currentPage currentPage setFocus
private I Content Outline Page get Empty Page if empty Page null empty Page new Empty Outline Page return empty Page  IContentOutlinePage getEmptyPage emptyPage emptyPage EmptyOutlinePage emptyPage
public void set Page Active I Content Outline Page page if page null page get Empty Page if current Page null current Page remove Selection Changed Listener this page add Selection Changed Listener this this current Page page if pagebook null still not being made return Control control page get Control if control null control is Disposed first time page create Control pagebook page set Action Bars get Action Bars control page get Control pagebook show Page control this current Page page  setPageActive IContentOutlinePage getEmptyPage currentPage currentPage removeSelectionChangedListener addSelectionChangedListener currentPage getControl isDisposed createControl setActionBars getActionBars getControl showPage currentPage
Set the selection public void set Selection I Selection selection this selection selection Selection Changed Event e new Selection Changed Event this selection for int i 0 i listeners size i I Selection Changed Listener listeners get i selection Changed e  setSelection ISelection SelectionChangedEvent SelectionChangedEvent ISelectionChangedListener selectionChanged

Sub Action Bars bars void set Bars Active boolean active if active bars activate else bars deactivate  SubActionBars setBarsActive
public PDE Multi Page Property Sheet default Page new Property Sheet Page  PDEMultiPagePropertySheet defaultPage PropertySheetPage
public void create Control Composite parent pagebook new Page Book parent SWT NULL default Page create Control pagebook if current Page null set Page Active current Page  createControl PageBook defaultPage createControl currentPage setPageActive currentPage
private Page Rec create Page Rec I Property Sheet Page page if action Bars null return null Page Rec rec new Page Rec rec page page rec bars new Sub Action Bars action Bars get Page Control page page set Action Bars rec bars rec Map put page rec return rec  PageRec createPageRec IPropertySheetPage actionBars PageRec PageRec SubActionBars actionBars getPageControl setActionBars recMap
public void dispose update Action Bars if pagebook null pagebook is Disposed pagebook dispose pagebook null disposed true  updateActionBars isDisposed
public boolean is Disposed return disposed  isDisposed
public Control get Control return pagebook  getControl
public void close Active Editor if current Page null return  closeActiveEditor currentPage
private Control get Page Control I Property Sheet Page page Control control page get Control if control null control is Disposed first time page create Control pagebook control page get Control return control  getPageControl IPropertySheetPage getControl isDisposed createControl getControl
return control public void selection Changed I Workbench Part part I Selection sel if current Page null current Page selection Changed part sel  selectionChanged IWorkbenchPart ISelection currentPage currentPage selectionChanged
public void set Action Bars I Action Bars bars this action Bars bars create Page Rec default Page if current Page null Page Rec rec create Page Rec current Page set Page Active rec update Action Bars  setActionBars IActionBars actionBars createPageRec defaultPage currentPage PageRec createPageRec currentPage setPageActive updateActionBars
public void set Default Page Active set Page Active default Page  setDefaultPageActive setPageActive defaultPage
set Page Active default Page public void set Focus if current Page null current Page set Focus  setPageActive defaultPage setFocus currentPage currentPage setFocus
private void set Page Active Page Rec page Rec I Property Sheet Page page page Rec page Control control get Page Control page pagebook show Page control page Rec set Bars Active true  setPageActive PageRec pageRec IPropertySheetPage pageRec getPageControl showPage pageRec setBarsActive
public void set Page Active I Property Sheet Page page I Property Sheet Page old Page current Page this current Page page if pagebook null still not being made return if old Page null Page Rec old Rec Page Rec rec Map get old Page if old Rec null old Rec set Bars Active false Page Rec rec Page Rec rec Map get page if rec null rec create Page Rec page if rec null set Page Active rec update Action Bars  setPageActive IPropertySheetPage IPropertySheetPage oldPage currentPage currentPage oldPage PageRec oldRec PageRec recMap oldPage oldRec oldRec setBarsActive PageRec PageRec recMap createPageRec setPageActive updateActionBars
private void update Action Bars refresh Global Action Handlers action Bars update Action Bars  updateActionBars refreshGlobalActionHandlers actionBars updateActionBars
private void refresh Global Action Handlers Clear old actions action Bars clear Global Action Handlers Set new actions if rec Map null current Page null return Page Rec active Rec Page Rec rec Map get current Page Map new Action Handlers active Rec bars get Global Action Handlers if new Action Handlers null Set keys new Action Handlers entry Set Iterator iter keys iterator while iter has Next Map Entry entry Map Entry iter next action Bars set Global Action Handler String entry get Key I Action entry get Value  refreshGlobalActionHandlers actionBars clearGlobalActionHandlers recMap currentPage PageRec activeRec PageRec recMap currentPage newActionHandlers activeRec getGlobalActionHandlers newActionHandlers newActionHandlers entrySet hasNext actionBars setGlobalActionHandler getKey IAction getValue

public static final int CLIENT VSPACING 4 private PDE Form Page page public PDE Section PDE Form Page page Composite parent int style this page parent style true  CLIENT_VSPACING PDEFormPage PDESection PDEFormPage
param section public PDE Section PDE Form Page page Composite parent int style boolean title Bar super parent page get Managed Form get Toolkit title Bar Section TITLE BAR style style this page page initialize page get Managed Form get Section client Vertical Spacing CLIENT VSPACING get Section set Data part this NON NLS 1 create Client get Section page get Managed Form get Toolkit  PDESection PDEFormPage titleBar getManagedForm getToolkit titleBar TITLE_BAR getManagedForm getSection clientVerticalSpacing CLIENT_VSPACING getSection setData createClient getSection getManagedForm getToolkit
protected abstract void create Client Section section Form Toolkit toolkit  createClient FormToolkit
protected abstract void create Client Section section Form Toolkit toolkit public PDE Form Page get Page return page  createClient FormToolkit PDEFormPage getPage
public boolean do Global Action String action Id return false  doGlobalAction actionId
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED mark Stale  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale
public String get Context Id return null  getContextId
public void fire Save Needed mark Dirty if get Context Id null get Page getPDE Editor fire Save Needed get Context Id false  fireSaveNeeded markDirty getContextId getPage getPDEEditor fireSaveNeeded getContextId
get Page getPDE Editor fire Save Needed get Context Id false public boolean is Editable return get Page getPDE Editor get Aggregate Model is Editable  getPage getPDEEditor fireSaveNeeded getContextId isEditable getPage getPDEEditor getAggregateModel isEditable
return get Page getPDE Editor get Aggregate Model is Editable public boolean can Paste Clipboard clipboard return false  getPage getPDEEditor getAggregateModel isEditable canPaste
return false public void cancel Edit super refresh  cancelEdit

public PDE Source Page PDE Form Editor editor String id String title this id id initialize editor set Preference Store PDE Plugin get Default get Preference Store set Range Indicator new Default Range Indicator  PDESourcePage PDEFormEditor setPreferenceStore PDEPlugin getDefault getPreferenceStore setRangeIndicator DefaultRangeIndicator
see org eclipse ui forms editor I Form Page initialize org eclipse ui forms editor Form Editor public void initialize Form Editor editor this editor PDE Form Editor editor  IFormPage FormEditor FormEditor PDEFormEditor
public void dispose if outline Page null outline Page dispose outline Page null super dispose  outlinePage outlinePage outlinePage
protected void editor Saved super editor Saved  editorSaved editorSaved
protected abstract I Label Provider create Outline Label Provider  ILabelProvider createOutlineLabelProvider
protected abstract I Label Provider create Outline Label Provider protected abstract I Tree Content Provider create Outline Content Provider  ILabelProvider createOutlineLabelProvider ITreeContentProvider createOutlineContentProvider
protected abstract I Label Provider create Outline Label Provider protected abstract I Tree Content Provider create Outline Content Provider protected abstract void outline Selection Changed Selection Changed Event e  ILabelProvider createOutlineLabelProvider ITreeContentProvider createOutlineContentProvider outlineSelectionChanged SelectionChangedEvent
protected abstract I Tree Content Provider create Outline Content Provider protected abstract void outline Selection Changed Selection Changed Event e protected Viewer Sorter create Viewer Sorter return null  ITreeContentProvider createOutlineContentProvider outlineSelectionChanged SelectionChangedEvent ViewerSorter createViewerSorter
create Viewer Sorter outline add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event outline Selection Changed event  createViewerSorter addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent outlineSelectionChanged
protected I Content Outline Page create Outline Page Source Outline Page outline new Source Outline Page I Editing Model get Input Context get Model create Outline Label Provider create Outline Content Provider create Viewer Sorter outline add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event outline Selection Changed event get Selection Provider add Selection Changed Listener outline return outline  IContentOutlinePage createOutlinePage SourceOutlinePage SourceOutlinePage IEditingModel getInputContext getModel createOutlineLabelProvider createOutlineContentProvider createViewerSorter addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent outlineSelectionChanged getSelectionProvider addSelectionChangedListener
public I Content Outline Page get Content Outline if outline Page null outline Page create Outline Page return outline Page  IContentOutlinePage getContentOutline outlinePage outlinePage createOutlinePage outlinePage
see org eclipse ui forms editor I Form Page get Editor public Form Editor get Editor return editor  IFormPage getEditor FormEditor getEditor
see org eclipse ui forms editor I Form Page get Managed Form public I Managed Form get Managed Form not a form page return null  IFormPage getManagedForm IManagedForm getManagedForm
protected void fire Property Change int type if type PROP DIRTY editor fire Save Needed get Editor Input true else super fire Property Change type  firePropertyChange PROP_DIRTY fireSaveNeeded getEditorInput firePropertyChange
see org eclipse ui forms editor I Form Page set Active boolean public void set Active boolean active input Context set Source Editing Mode active  IFormPage setActive setActive inputContext setSourceEditingMode
public boolean can Leave The Page return true  canLeaveThePage
see org eclipse ui forms editor I Form Page is Active public boolean is Active return this equals editor get Active Page Instance  IFormPage isActive isActive getActivePageInstance
public void create Part Control Composite parent super create Part Control parent Control children parent get Children control children children length 1 Workbench Help set Help control I Help Context Ids MANIFEST SOURCE PAGE  createPartControl createPartControl getChildren WorkbenchHelp setHelp IHelpContextIds MANIFEST_SOURCE_PAGE
see org eclipse ui forms editor I Form Page get Part Control public Control get Part Control return control  IFormPage getPartControl getPartControl
see org eclipse ui forms editor I Form Page get Id public String get Id return id  IFormPage getId getId
see org eclipse ui forms editor I Form Page get Index public int get Index return index  IFormPage getIndex getIndex
see org eclipse ui forms editor I Form Page set Index int public void set Index int index this index index  IFormPage setIndex setIndex
see org eclipse ui forms editor I Form Page is Source public boolean is Editor return true  IFormPage isSource isEditor
return Returns the input Context public Input Context get Input Context return input Context  inputContext InputContext getInputContext inputContext
param input Context The input Context to set public void set Input Context Input Context input Context this input Context input Context set Document Provider input Context get Document Provider  inputContext inputContext setInputContext InputContext inputContext inputContext inputContext setDocumentProvider inputContext getDocumentProvider
public boolean select Reveal Object object if object instanceof I Marker IDE goto Marker this I Marker object return true return false  selectReveal IMarker gotoMarker IMarker

private String no Items Text PDE Plugin get Resource String Alert Section default no Alerts NON NLS 1 param page param parent param style public Alert Section PDE Form Page page Composite parent super page parent Section TWISTIE Section EXPANDED create Client get Section page get Editor get Toolkit  noItemsText PDEPlugin getResourceString AlertSection noAlerts AlertSection PDEFormPage createClient getSection getEditor getToolkit
protected void create Client Section section Form Toolkit toolkit section set Text PDE Plugin get Resource String Alert Section title NON NLS 1 toolkit create Composite Separator section text toolkit create Form Text section true text set Image warning PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJS WARN TSK NON NLS 1 text set Image error PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJS ERROR TSK NON NLS 1 section set Client text  createClient FormToolkit setText PDEPlugin getResourceString AlertSection createCompositeSeparator createFormText setImage getWorkbench getSharedImages getImage ISharedImages IMG_OBJS_WARN_TSK setImage getWorkbench getSharedImages getImage ISharedImages IMG_OBJS_ERROR_TSK setClient
section set Client text public void refresh text set Text get Alerts true false super refresh  setClient setText getAlerts
private String get Alerts String Buffer buf new String Buffer buf append form buf append li style image value warning a This plug in has a version that is not compatible with the target platform a li buf append li style image value warning a This plug in does not have build properties file and cannot be deployed properly a li buf append li style image value error a You realize of course that coding in this plug in is pretty pathetic don t you a li buf append form return buf to String return no Items Text  getAlerts StringBuffer StringBuffer toString noItemsText

public Body Text Section Extensions Page page Composite parent super page parent Section TWISTIE get Section set Text PDE Plugin get Resource String SECTION TITLE create Client get Section page get Managed Form get Toolkit  BodyTextSection ExtensionsPage getSection setText PDEPlugin getResourceString SECTION_TITLE createClient getSection getManagedForm getToolkit
private void update Title boolean has Contents String title if has Contents title PDE Plugin get Resource String SECTION TITLE FULL else title PDE Plugin get Resource String SECTION TITLE if get Section get Text equals title get Section set Text title get Section layout  updateTitle hasContents hasContents PDEPlugin getResourceString SECTION_TITLE_FULL PDEPlugin getResourceString SECTION_TITLE getSection getText getSection setText getSection
text add Modify Listener new Modify Listener public void modify Text Modify Event e if block Notification return mark Dirty apply Button set Enabled true reset Button set Enabled true  addModifyListener ModifyListener modifyText ModifyEvent blockNotification markDirty applyButton setEnabled resetButton setEnabled
text add Focus Listener new Focus Adapter public void focus Gained Focus Event e get Page getPDE Editor get Contributor update Selectable Actions new Structured Selection  addFocusListener FocusAdapter focusGained FocusEvent getPage getPDEEditor getContributor updateSelectableActions StructuredSelection
apply Button set Layout Data gd apply Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Apply  applyButton setLayoutData applyButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleApply
reset Button set Layout Data gd reset Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Reset  resetButton setLayoutData resetButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleReset
public void create Client Section section Form Toolkit toolkit Grid Data gd Composite container toolkit create Composite section Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 2 layout margin Width 2 container set Layout layout text text toolkit create Text container NON NLS 1 SWT MULTI SWT WRAP SWT V SCROLL text set Editable false gd new Grid Data Grid Data FILL BOTH text set Layout Data gd text add Modify Listener new Modify Listener public void modify Text Modify Event e if block Notification return mark Dirty apply Button set Enabled true reset Button set Enabled true text add Focus Listener new Focus Adapter public void focus Gained Focus Event e get Page getPDE Editor get Contributor update Selectable Actions new Structured Selection Composite button Container toolkit create Composite container layout new Grid Layout layout margin Height 0 button Container set Layout layout gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING Grid Data VERTICAL ALIGN FILL button Container set Layout Data gd add buttons apply Button toolkit create Button button Container PDE Plugin get Resource String KEY APPLY SWT PUSH gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING apply Button set Layout Data gd apply Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Apply reset Button toolkit create Button button Container PDE Plugin get Resource String KEY RESET SWT PUSH gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING reset Button set Layout Data gd reset Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Reset if SWT get Platform equals motif false NON NLS 1 toolkit paint Borders For container section set Client container initialize  createClient FormToolkit GridData createComposite GridLayout GridLayout numColumns marginHeight marginWidth setLayout createText V_SCROLL setEditable GridData GridData FILL_BOTH setLayoutData addModifyListener ModifyListener modifyText ModifyEvent blockNotification markDirty applyButton setEnabled resetButton setEnabled addFocusListener FocusAdapter focusGained FocusEvent getPage getPDEEditor getContributor updateSelectableActions StructuredSelection buttonContainer createComposite GridLayout marginHeight buttonContainer setLayout GridData GridData HORIZONTAL_ALIGN_BEGINNING GridData VERTICAL_ALIGN_FILL buttonContainer setLayoutData applyButton createButton buttonContainer PDEPlugin getResourceString KEY_APPLY GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING applyButton setLayoutData applyButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleApply resetButton createButton buttonContainer PDEPlugin getResourceString KEY_RESET GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING resetButton setLayoutData resetButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleReset getPlatform paintBordersFor setClient
public void dispose I Plugin Model Base model I Plugin Model Base get Page get Model if model null model remove Model Changed Listener this super dispose  IPluginModelBase IPluginModelBase getPage getModel removeModelChangedListener
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id handle Delete return true if action Id equals Action Factory CUT get Id delete here and let the editor transfer the selection to the clipboard handle Delete return false if action Id equals Action Factory SELECT ALL get Id text select All return true if action Id equals Action Factory COPY get Id text copy return true if action Id equals Action Factory PASTE get Id text paste return true return false  doGlobalAction actionId actionId ActionFactory getId handleDelete actionId ActionFactory getId handleDelete actionId ActionFactory SELECT_ALL getId selectAll actionId ActionFactory getId actionId ActionFactory getId
private void handle Delete text cut  handleDelete
private void handle Apply try if current Element null current Element set Text text get Text length 0 text get Text NON NLS 1 catch Core Exception e PDE Plugin log Exception e apply Button set Enabled false  handleApply currentElement currentElement setText getText getText CoreException PDEPlugin logException applyButton setEnabled
public void commit boolean on Save handle Apply if on Save reset Button set Enabled false super commit on Save  onSave handleApply onSave resetButton setEnabled onSave
private void handle Reset update Text current Element reset Button set Enabled false apply Button set Enabled false  handleReset updateText currentElement resetButton setEnabled applyButton setEnabled
public void initialize I Plugin Model Base model I Plugin Model Base get Page get Model model add Model Changed Listener this text set Editable model is Editable update Input  IPluginModelBase IPluginModelBase getPage getModel addModelChangedListener setEditable isEditable updateInput
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event WORLD CHANGED return  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED
public void selection Changed I Form Part part I Selection selection Object change Object I Structured Selection selection get First Element if current Element null current Element change Object return if change Object instanceof I Plugin Element this current Element I Plugin Element change Object else current Element null update Input  selectionChanged IFormPart ISelection changeObject IStructuredSelection getFirstElement currentElement currentElement changeObject changeObject IPluginElement currentElement IPluginElement changeObject currentElement updateInput
private void update Input apply Button set Enabled false reset Button set Enabled false update Text current Element text set Editable is Editable current Element null  updateInput applyButton setEnabled resetButton setEnabled updateText currentElement setEditable isEditable currentElement
private void update Text I Plugin Element element String body Text element null element get Text null block Notification true text set Text body Text null body Text length 0 body Text NON NLS 1 apply Button set Enabled false reset Button set Enabled false update Title body Text null body Text length 0 block Notification false  updateText IPluginElement bodyText getText blockNotification setText bodyText bodyText bodyText applyButton setEnabled resetButton setEnabled updateTitle bodyText bodyText blockNotification
block Notification false public boolean can Paste Clipboard clipboard return true  blockNotification canPaste

private Hash Map f Operation Table new Hash Map param editor param input public Bundle Input Context PDE Form Editor editor I Editor Input input boolean primary super editor input primary create  HashMap fOperationTable HashMap BundleInputContext PDEFormEditor IEditorInput
protected I Base Model create Model I Editor Input input throws Core Exception Bundle Model model null if input instanceof I Storage Editor Input boolean is Reconciling input instanceof I File Editor Input I Document document get Document Provider get Document input model new Bundle Model document is Reconciling if input instanceof I File Editor Input I File file I File Editor Input input get File model set Underlying Resource file model set Charset file get Charset else if input instanceof System File Editor Input File file File System File Editor Input input get Adapter File class model set Install Location file get Parent model set Charset get Default Charset model load return model  IBaseModel createModel IEditorInput CoreException BundleModel IStorageEditorInput isReconciling IFileEditorInput IDocument getDocumentProvider getDocument BundleModel isReconciling IFileEditorInput IFile IFileEditorInput getFile setUnderlyingResource setCharset getCharset SystemFileEditorInput SystemFileEditorInput getAdapter setInstallLocation getParent setCharset getDefaultCharset
see org eclipse pde internal ui neweditor Input Context get Id public String get Id return CONTEXT ID  InputContext getId getId CONTEXT_ID
protected void add Text Edit Operation Array List ops I Model Changed Event event Object objects event get Changed Objects if objects null for int i 0 i objects length i Object object objects i if object instanceof Manifest Header Manifest Header header Manifest Header object Text Edit op Text Edit f Operation Table get header if op null f Operation Table remove header ops remove op if header get Value null header get Value trim length 0 delete Key header ops else modify Key header ops  addTextEditOperation ArrayList IModelChangedEvent getChangedObjects ManifestHeader ManifestHeader ManifestHeader TextEdit TextEdit fOperationTable fOperationTable getValue getValue deleteKey modifyKey
see org eclipse pde internal ui neweditor context Input Context get Move Operations protected Text Edit get Move Operations return new Text Edit 0  InputContext getMoveOperations TextEdit getMoveOperations TextEdit
private void insert Key I Document Key key Array List ops I Document doc get Document Provider get Document get Input int offset doc get Length for int i doc get Number Of Lines 1 i 0 i try if doc get doc get Line Offset i doc get Line Length i trim length 0 break offset doc get Line Offset i catch Bad Location Exception e Insert Edit op new Insert Edit offset key write System get Property line separator NON NLS 1 f Operation Table put key op ops add op  insertKey IDocumentKey ArrayList IDocument getDocumentProvider getDocument getInput getLength getNumberOfLines getLineOffset getLineLength getLineOffset BadLocationException InsertEdit InsertEdit getProperty fOperationTable
private void delete Key I Document Key key Array List ops if key get Offset 0 Text Edit op new Delete Edit key get Offset key get Length f Operation Table put key op ops add op  deleteKey IDocumentKey ArrayList getOffset TextEdit DeleteEdit getOffset getLength fOperationTable
private void modify Key I Document Key key Array List ops if key get Offset 1 insert Key key ops else Text Edit op new Replace Edit key get Offset key get Length key write System get Property line separator NON NLS 1 f Operation Table put key op ops add op  modifyKey IDocumentKey ArrayList getOffset insertKey TextEdit ReplaceEdit getOffset getLength getProperty fOperationTable
public void do Revert f Edit Operations clear f Operation Table clear Abstract Editing Model model Abstract Editing Model get Model model reconciled model get Document  doRevert fEditOperations fOperationTable AbstractEditingModel AbstractEditingModel getModel getDocument

class Bundle Outline Content Provider extends Default Content Provider implements I Tree Content Provider public Object get Children Object parent return new Object 0  BundleOutlineContentProvider DefaultContentProvider ITreeContentProvider getChildren
return new Object 0 public boolean has Children Object parent return false  hasChildren
return false public Object get Parent Object child return null  getParent
public Object get Elements Object parent if parent instanceof Bundle Model Bundle Model model Bundle Model parent Dictionary manifest Bundle model get Bundle get Headers Object keys new Object manifest size int i 0 for Enumeration enum manifest keys enum has More Elements keys i manifest get enum next Element return keys return new Object 0  getElements BundleModel BundleModel BundleModel getBundle getHeaders hasMoreElements nextElement
class Bundle Label Provider extends Label Provider public String get Text Object obj if obj instanceof Manifest Header return Manifest Header obj get Name return super get Text obj  BundleLabelProvider LabelProvider getText ManifestHeader ManifestHeader getName getText
public Image get Image Object obj if obj instanceof Manifest Header return PDE Plugin get Default get Label Provider get PDE Plugin Images DESC BUILD VAR OBJ return null  getImage ManifestHeader PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_BUILD_VAR_OBJ
public Bundle Source Page PDE Form Editor editor String id String title super editor id title  BundleSourcePage PDEFormEditor
protected I Label Provider create Outline Label Provider return new Bundle Label Provider  ILabelProvider createOutlineLabelProvider BundleLabelProvider
protected I Tree Content Provider create Outline Content Provider return new Bundle Outline Content Provider  ITreeContentProvider createOutlineContentProvider BundleOutlineContentProvider

private Match Section match Section param editor param id param title public Dependencies Page Form Editor editor super editor PAGE ID PDE Plugin get Resource String Dependencies Page tab Name NON NLS 1  MatchSection matchSection DependenciesPage FormEditor PAGE_ID PDEPlugin getResourceString DependenciesPage tabName
protected void create Form Content I Managed Form managed Form super create Form Content managed Form Scrolled Form form managed Form get Form form set Text PDE Plugin get Resource String Dependencies Page title NON NLS 1 Composite body form get Body Grid Layout layout new Grid Layout layout num Columns 2 layout make Columns Equal Width true layout margin Width 10 layout vertical Spacing 20 layout horizontal Spacing 10 body set Layout layout add requires requires Section new Requires Section this body Grid Data gd new Grid Data Grid Data FILL BOTH gd vertical Span 3 requires Section get Section set Layout Data gd managed Form add Part requires Section Add match match Section new Match Section this body true gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING match Section get Section set Layout Data gd managed Form add Part match Section match Section set Osgi Mode is Osgi Mode Dependency Analysis Section analysis Section new Dependency Analysis Section this body gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING analysis Section get Section set Layout Data gd managed Form add Part analysis Section Input Context Manager context Manager getPDE Editor get Context Manager context Manager add Input Context Listener this  createFormContent IManagedForm managedForm createFormContent managedForm ScrolledForm managedForm getForm setText PDEPlugin getResourceString DependenciesPage getBody GridLayout GridLayout numColumns makeColumnsEqualWidth marginWidth verticalSpacing horizontalSpacing setLayout requiresSection RequiresSection GridData GridData GridData FILL_BOTH verticalSpan requiresSection getSection setLayoutData managedForm addPart requiresSection matchSection MatchSection GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING matchSection getSection setLayoutData managedForm addPart matchSection matchSection setOsgiMode isOsgiMode DependencyAnalysisSection analysisSection DependencyAnalysisSection GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING analysisSection getSection setLayoutData managedForm addPart analysisSection InputContextManager contextManager getPDEEditor getContextManager contextManager addInputContextListener
public void context Menu About To Show I Menu Manager manager I Resource resource I Plugin Model Base get Model get Underlying Resource if resource null Workspace Model Manager is Java Plugin Project resource get Project manager add requires Section get Buildpath Action manager add new Separator  contextMenuAboutToShow IMenuManager IResource IPluginModelBase getModel getUnderlyingResource WorkspaceModelManager isJavaPluginProject getProject requiresSection getBuildpathAction
private boolean is Osgi Mode return get Model instanceof I Bundle Plugin Model Base  isOsgiMode getModel IBundlePluginModelBase
see org eclipse pde internal ui editor context I Input Context Listener context Added org eclipse pde internal ui editor context Input Context public void context Added Input Context context if context get Id equals Bundle Input Context CONTEXT ID match Section set Osgi Mode true  IInputContextListener contextAdded InputContext contextAdded InputContext getId BundleInputContext CONTEXT_ID matchSection setOsgiMode
public void context Removed Input Context context if context get Id equals Bundle Input Context CONTEXT ID match Section set Osgi Mode false  contextRemoved InputContext getId BundleInputContext CONTEXT_ID matchSection setOsgiMode
see org eclipse pde internal ui editor context I Input Context Listener monitored File Added org eclipse core resources I File public void monitored File Added I File monitored File  IInputContextListener monitoredFileAdded IFile monitoredFileAdded IFile monitoredFile
see org eclipse pde internal ui editor context I Input Context Listener monitored File Removed org eclipse core resources I File public boolean monitored File Removed I File monitored File return false  IInputContextListener monitoredFileRemoved IFile monitoredFileRemoved IFile monitoredFile

private Import Object f Selected Dependency param page param parent param style public Dependency Analysis Section PDE Form Page page Composite parent super page parent Section TWISTIE Section EXPANDED create Client get Section page get Editor get Toolkit  ImportObject fSelectedDependency DependencyAnalysisSection PDEFormPage createClient getSection getEditor getToolkit
public void selection Changed I Form Part part I Selection selection if selection null selection is Empty f Selected Dependency null else I Structured Selection ssel I Structured Selection selection f Selected Dependency Import Object ssel get First Element  selectionChanged IFormPart ISelection isEmpty fSelectedDependency IStructuredSelection IStructuredSelection fSelectedDependency ImportObject getFirstElement
private String get Form Text boolean editable get Page get Model is Editable if get Page get Model instanceof I Plugin Model if editable return PDE Plugin get Resource String Dependency Analysis Section plugin editable NON NLS 1 return PDE Plugin get Resource String Dependency Analysis Section plugin not Editable NON NLS 1 else if editable return PDE Plugin get Resource String Dependency Analysis Section fragment editable NON NLS 1 return PDE Plugin get Resource String Dependency Analysis Section fragment not Editable NON NLS 1  getFormText getPage getModel isEditable getPage getModel IPluginModel PDEPlugin getResourceString DependencyAnalysisSection PDEPlugin getResourceString DependencyAnalysisSection notEditable PDEPlugin getResourceString DependencyAnalysisSection PDEPlugin getResourceString DependencyAnalysisSection notEditable
form Text add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e if e get Href equals extent NON NLS 1 do Find Plugins else if e get Href equals unused NON NLS 1 do Find Unused Dependencies else if e get Href equals loops NON NLS 1 do Find Loops else if e get Href equals references NON NLS 1 do Find References  formText addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent getHref doFindPlugins getHref doFindUnusedDependencies getHref doFindLoops getHref doFindReferences
protected void create Client Section section Form Toolkit toolkit section set Text PDE Plugin get Resource String Dependency Analysis Section title NON NLS 1 toolkit create Composite Separator section form Text toolkit create Form Text section true form Text set Text get Form Text true false PDE Label Provider lp PDE Plugin get Default get Label Provider form Text set Image loops lp get PDE Plugin Images DESC LOOP OBJ NON NLS 1 form Text set Image search lp get PDE Plugin Images DESC PSEARCH OBJ NON NLS 1 form Text add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e if e get Href equals extent NON NLS 1 do Find Plugins else if e get Href equals unused NON NLS 1 do Find Unused Dependencies else if e get Href equals loops NON NLS 1 do Find Loops else if e get Href equals references NON NLS 1 do Find References section set Client form Text  createClient FormToolkit setText PDEPlugin getResourceString DependencyAnalysisSection createCompositeSeparator formText createFormText formText setText getFormText PDELabelProvider PDEPlugin getDefault getLabelProvider formText setImage PDEPluginImages DESC_LOOP_OBJ formText setImage PDEPluginImages DESC_PSEARCH_OBJ formText addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent getHref doFindPlugins getHref doFindUnusedDependencies getHref doFindLoops getHref doFindReferences setClient formText
protected void do Find Loops I Base Model model get Page get Model if model instanceof I Plugin Model I Plugin plugin I Plugin Model model get Plugin Dependency Loop loops Dependency Loop Finder find Loops plugin if loops length 0 Message Dialog open Information PDE Plugin get Active Workbench Shell PDE Plugin get Resource String Dependency Analysis Section loops PDE Plugin get Resource String Dependency Analysis Section no Cycles NON NLS 1 NON NLS 2 else Loop Dialog dialog new Loop Dialog PDE Plugin get Active Workbench Shell loops dialog open  doFindLoops IBaseModel getPage getModel IPluginModel IPlugin IPluginModel getPlugin DependencyLoop DependencyLoopFinder findLoops MessageDialog openInformation PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString DependencyAnalysisSection PDEPlugin getResourceString DependencyAnalysisSection noCycles LoopDialog LoopDialog PDEPlugin getActiveWorkbenchShell
protected void do Find Plugins if f Selected Dependency null new Dependency Extent Action f Selected Dependency get Import run  doFindPlugins fSelectedDependency DependencyExtentAction fSelectedDependency getImport
protected void do Find Unused Dependencies I Base Model model get Page get Model if model instanceof I Plugin Model Base new Unused Dependencies Action I Plugin Model Base model run  doFindUnusedDependencies IBaseModel getPage getModel IPluginModelBase UnusedDependenciesAction IPluginModelBase
private void do Find References I Base Model model get Page get Model if model instanceof I Plugin Model new Find References Action I Plugin Model model get Plugin run else if model instanceof I Fragment Model I Fragment fragment I Fragment Model model get Fragment String id fragment get Plugin Id Model Entry entry PDE Core get Default get Model Manager find Entry id if entry null I Plugin Model Base plugin Model entry get Active Model new Find Declarations Action plugin Model get Plugin Base run else Message Dialog open Information PDE Plugin get Active Workbench Shell PDE Plugin get Resource String PDE Plugin get Resource String Dependency Analysis Section references NON NLS 1 PDE Plugin get Resource String PDE Plugin get Resource String Dependency Analysis Section no References Found NON NLS 1  doFindReferences IBaseModel getPage getModel IPluginModel FindReferencesAction IPluginModel getPlugin IFragmentModel IFragment IFragmentModel getFragment getPluginId ModelEntry PDECore getDefault getModelManager findEntry IPluginModelBase pluginModel getActiveModel FindDeclarationsAction pluginModel getPluginBase MessageDialog openInformation PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString PDEPlugin getResourceString DependencyAnalysisSection PDEPlugin getResourceString PDEPlugin getResourceString DependencyAnalysisSection noReferencesFound

I Structured Content Provider public Object get Elements Object parent if parent instanceof I Model return get Provided Packages else if parent instanceof I Plugin Library String filters I Plugin Library parent get Content Filters return filters null new Object 0 filters return new Object 0  IStructuredContentProvider getElements IModel getProvidedPackages IPluginLibrary IPluginLibrary getContentFilters
implements I Table Label Provider public String get Column Text Object obj int index return obj to String  ITableLabelProvider getColumnText toString
return obj to String public Image get Column Image Object obj int index return JavaUI get Shared Images get Image I Shared Images IMG OBJS PACKAGE  toString getColumnImage getSharedImages getImage ISharedImages IMG_OBJS_PACKAGE
public Export Section PDE Form Page form Page Composite parent super form Page parent Section DESCRIPTION new String PDE Plugin get Resource String KEY ADD PDE Plugin get Resource String KEY REMOVE get Section set Text PDE Plugin get Resource String SECTION TITLE get Section set Description PDE Plugin get Resource String SECTION DESC handle Default Button false  ExportSection PDEFormPage formPage formPage PDEPlugin getResourceString KEY_ADD PDEPlugin getResourceString KEY_REMOVE getSection setText PDEPlugin getResourceString SECTION_TITLE getSection setDescription PDEPlugin getResourceString SECTION_DESC handleDefaultButton
f Full Export Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e try if f Current Library null f Current Library set Exported f Full Export Button get Selection get Table Part set Button Enabled 0 f Full Export Button get Selection get Table Part set Button Enabled 1 false catch Core Exception e1  fFullExportButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fCurrentLibrary fCurrentLibrary setExported fFullExportButton getSelection getTablePart setButtonEnabled fFullExportButton getSelection getTablePart setButtonEnabled CoreException
public void create Client Section section Form Toolkit toolkit Composite container toolkit create Composite section container set Layout new Grid Layout String label PDE Plugin get Resource String KEY FULL EXPORT f Full Export Button toolkit create Button container label SWT RADIO f Full Export Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Full Export Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e try if f Current Library null f Current Library set Exported f Full Export Button get Selection get Table Part set Button Enabled 0 f Full Export Button get Selection get Table Part set Button Enabled 1 false catch Core Exception e1 label PDE Plugin get Resource String KEY SELECTED EXPORT f Selected Export Button toolkit create Button container label SWT RADIO f Selected Export Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Package Export Container toolkit create Composite container f Package Export Container set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout layout new Grid Layout layout margin Width 2 layout margin Height 2 layout num Columns 2 f Package Export Container set Layout layout create Name Table f Package Export Container toolkit update null is Bundle Mode initialize section set Client container  createClient FormToolkit createComposite setLayout GridLayout PDEPlugin getResourceString KEY_FULL_EXPORT fFullExportButton createButton fFullExportButton setLayoutData GridData GridData FILL_HORIZONTAL fFullExportButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fCurrentLibrary fCurrentLibrary setExported fFullExportButton getSelection getTablePart setButtonEnabled fFullExportButton getSelection getTablePart setButtonEnabled CoreException PDEPlugin getResourceString KEY_SELECTED_EXPORT fSelectedExportButton createButton fSelectedExportButton setLayoutData GridData GridData FILL_HORIZONTAL fPackageExportContainer createComposite fPackageExportContainer setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout marginWidth marginHeight numColumns fPackageExportContainer setLayout createNameTable fPackageExportContainer isBundleMode setClient
private void create Name Table Composite parent Form Toolkit toolkit Editable Table Part table Part get Table Part table Part set Editable get Page get Model is Editable create Viewer Part Control parent SWT FULL SELECTION 2 toolkit f Package Export Viewer table Part get Table Viewer f Package Export Viewer set Content Provider new Table Content Provider f Package Export Viewer set Label Provider new Table Label Provider f Package Export Viewer set Sorter new Viewer Sorter toolkit paint Borders For parent  createNameTable FormToolkit EditableTablePart tablePart getTablePart tablePart setEditable getPage getModel isEditable createViewerPartControl FULL_SELECTION fPackageExportViewer tablePart getTableViewer fPackageExportViewer setContentProvider TableContentProvider fPackageExportViewer setLabelProvider TableLabelProvider fPackageExportViewer setSorter ViewerSorter paintBordersFor
toolkit paint Borders For parent protected void selection Changed I Structured Selection selection Object item selection get First Element get Table Part set Button Enabled 1 item null  paintBordersFor selectionChanged IStructuredSelection getFirstElement getTablePart setButtonEnabled
protected void button Selected int index if index 0 handle Add else if index 1 handle Delete  buttonSelected handleAdd handleDelete
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id handle Delete return true return false  doGlobalAction actionId actionId ActionFactory getId handleDelete
public void dispose I Plugin Model Base model I Plugin Model Base get Page get Model if model null model remove Model Changed Listener this Input Context Manager context Manager get Page getPDE Editor get Context Manager if context Manager null context Manager remove Input Context Listener this super dispose  IPluginModelBase IPluginModelBase getPage getModel removeModelChangedListener InputContextManager contextManager getPage getPDEEditor getContextManager contextManager contextManager removeInputContextListener
super dispose protected void fill Context Menu I Menu Manager manager get Page getPDE Editor get Contributor context Menu About To Show manager  fillContextMenu IMenuManager getPage getPDEEditor getContributor contextMenuAboutToShow
private void handle Add I Plugin Model Base model I Plugin Model Base get Page get Model I Project project model get Underlying Resource get Project try if project has Nature Java Core NATURE ID String names if is Bundle Mode names get Provided Packages else names f Current Library get Content Filters Vector existing new Vector if names null for int i 0 i names length i existing add names i I Label Provider label Provider new Java Element Label Provider Package Selection Dialog dialog new Package Selection Dialog f Package Export Viewer get Table get Shell label Provider Java Core create project existing if dialog open Package Selection Dialog OK Object elements dialog get Result if is Bundle Mode add Provided Packages elements else for int i 0 i elements length i I Package Fragment fragment I Package Fragment elements i f Current Library add Content Filter fragment get Element Name label Provider dispose catch Core Exception e  handleAdd IPluginModelBase IPluginModelBase getPage getModel IProject getUnderlyingResource getProject hasNature JavaCore NATURE_ID isBundleMode getProvidedPackages fCurrentLibrary getContentFilters ILabelProvider labelProvider JavaElementLabelProvider PackageSelectionDialog PackageSelectionDialog fPackageExportViewer getTable getShell labelProvider JavaCore PackageSelectionDialog getResult isBundleMode addProvidedPackages IPackageFragment IPackageFragment fCurrentLibrary addContentFilter getElementName labelProvider CoreException
private void handle Delete I Structured Selection ssel I Structured Selection f Package Export Viewer get Selection Object items ssel to Array try if is Bundle Mode remove Provided Packages items else for int i 0 i items length i f Current Library remove Content Filter items i to String catch Core Exception e  handleDelete IStructuredSelection IStructuredSelection fPackageExportViewer getSelection toArray isBundleMode removeProvidedPackages fCurrentLibrary removeContentFilter toString CoreException
public void initialize I Plugin Model Base model I Plugin Model Base get Page get Model model add Model Changed Listener this Input Context Manager context Manager get Page getPDE Editor get Context Manager if context Manager null context Manager add Input Context Listener this if is Bundle Mode get Bundle Model add Model Changed Listener this  IPluginModelBase IPluginModelBase getPage getModel addModelChangedListener InputContextManager contextManager getPage getPDEEditor getContextManager contextManager contextManager addInputContextListener isBundleMode getBundleModel addModelChangedListener
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED if f Current Library null update null is Bundle Mode mark Stale return refresh  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED fCurrentLibrary isBundleMode markStale
public void refresh update f Current Library is Bundle Mode super refresh  fCurrentLibrary isBundleMode
public void selection Changed I Form Part source I Selection selection if selection null selection is Empty update null is Bundle Mode I Structured Selection ssel I Structured Selection selection if ssel get First Element instanceof I Plugin Library update I Plugin Library ssel get First Element is Bundle Mode  selectionChanged IFormPart ISelection isEmpty isBundleMode IStructuredSelection IStructuredSelection getFirstElement IPluginLibrary IPluginLibrary getFirstElement isBundleMode
private boolean is Read Only I Base Model model get Page get Model if model instanceof I Editable return I Editable model is Editable return true  isReadOnly IBaseModel getPage getModel IEditable IEditable isEditable
return true private boolean is Bundle Mode return get Page get Model instanceof I Bundle Plugin Model Base  isBundleMode getPage getModel IBundlePluginModelBase
private void update I Plugin Library library boolean bundle Mode f Current Library library Don t do anything else if we are in the bundle mode if bundle Mode update In Bundle Mode return if library null f Full Export Button set Enabled false f Full Export Button set Selection false f Selected Export Button set Enabled false f Selected Export Button set Selection false f Package Export Viewer set Input new Object 0 get Table Part set Button Enabled 0 false get Table Part set Button Enabled 1 false return f Full Export Button set Enabled is Read Only f Selected Export Button set Enabled is Read Only f Full Export Button set Selection library is Fully Exported f Selected Export Button set Selection library is Fully Exported f Package Export Viewer set Input library get Table Part set Button Enabled 1 false get Table Part set Button Enabled 0 f Selected Export Button get Selection  IPluginLibrary bundleMode fCurrentLibrary bundleMode updateInBundleMode fFullExportButton setEnabled fFullExportButton setSelection fSelectedExportButton setEnabled fSelectedExportButton setSelection fPackageExportViewer setInput getTablePart setButtonEnabled getTablePart setButtonEnabled fFullExportButton setEnabled isReadOnly fSelectedExportButton setEnabled isReadOnly fFullExportButton setSelection isFullyExported fSelectedExportButton setSelection isFullyExported fPackageExportViewer setInput getTablePart setButtonEnabled getTablePart setButtonEnabled fSelectedExportButton getSelection
private void update In Bundle Mode get Table Part set Button Enabled 1 false get Table Part set Button Enabled 0 true f Full Export Button set Enabled false f Full Export Button set Selection false f Selected Export Button set Enabled false f Selected Export Button set Selection true f Package Export Viewer set Input get Page get Model  updateInBundleMode getTablePart setButtonEnabled getTablePart setButtonEnabled fFullExportButton setEnabled fFullExportButton setSelection fSelectedExportButton setEnabled fSelectedExportButton setSelection fPackageExportViewer setInput getPage getModel
private String get Provided Packages I Bundle Model model get Bundle Model I Bundle bundle model get Bundle if bundle null return new String 0 String value bundle get Header Constants PROVIDE PACKAGE if value null return new String 0 try Manifest Element result Manifest Element parse Header Constants PROVIDE PACKAGE value String names new String result length for int i 0 i result length i names i result i get Value return names catch Bundle Exception e return new String 0  getProvidedPackages IBundleModel getBundleModel IBundle getBundle getHeader PROVIDE_PACKAGE ManifestElement ManifestElement parseHeader PROVIDE_PACKAGE getValue BundleException
private void add Provided Packages Object names String current get Provided Packages Object new Names if current length 0 new Names names else new Names new Object current length names length System arraycopy current 0 new Names 0 current length System arraycopy names 0 new Names current length names length set Provided Packages new Names  addProvidedPackages getProvidedPackages newNames newNames newNames newNames newNames setProvidedPackages newNames
private void remove Provided Packages Object removed String current get Provided Packages Array List result new Array List for int i 0 i current length i String name current i boolean skip false for int j 0 j removed length j if name equals removed j skip true break if skip continue result add name set Provided Packages result to Array  removeProvidedPackages getProvidedPackages ArrayList ArrayList setProvidedPackages toArray
I Bundle Model get Bundle Model Input Context Manager context Manager get Page getPDE Editor get Context Manager if context Manager null return null Input Context context context Manager find Context Bundle Input Context CONTEXT ID if context null return I Bundle Model context get Model return null  IBundleModel getBundleModel InputContextManager contextManager getPage getPDEEditor getContextManager contextManager InputContext contextManager findContext BundleInputContext CONTEXT_ID IBundleModel getModel
private void set Provided Packages Object names String Buffer buf new String Buffer for int i 0 i names length i String name if names i instanceof I Package Fragment name I Package Fragment names i get Element Name else name names i to String buf append name if i names length 1 buf append System get Property line separator NON NLS 1 NON NLS 2 NON NLS 3 I Bundle Model model get Bundle Model I Bundle bundle model get Bundle if bundle null return bundle set Header Constants PROVIDE PACKAGE buf to String  setProvidedPackages StringBuffer StringBuffer IPackageFragment IPackageFragment getElementName toString getProperty IBundleModel getBundleModel IBundle getBundle setHeader PROVIDE_PACKAGE toString
see org eclipse pde internal ui editor context I Input Context Listener context Added org eclipse pde internal ui editor context Input Context public void context Added Input Context context if context get Id equals Bundle Input Context CONTEXT ID bundle Mode Changed I Bundle Model context get Model true  IInputContextListener contextAdded InputContext contextAdded InputContext getId BundleInputContext CONTEXT_ID bundleModeChanged IBundleModel getModel
see org eclipse pde internal ui editor context I Input Context Listener context Removed org eclipse pde internal ui editor context Input Context public void context Removed Input Context context if context get Id equals Bundle Input Context CONTEXT ID bundle Mode Changed I Bundle Model context get Model false  IInputContextListener contextRemoved InputContext contextRemoved InputContext getId BundleInputContext CONTEXT_ID bundleModeChanged IBundleModel getModel
private void bundle Mode Changed I Bundle Model model boolean added if added update f Current Library true model add Model Changed Listener this else model remove Model Changed Listener this update f Current Library false  bundleModeChanged IBundleModel fCurrentLibrary addModelChangedListener removeModelChangedListener fCurrentLibrary
see org eclipse pde internal ui editor context I Input Context Listener monitored File Added org eclipse core resources I File public void monitored File Added I File monitored File  IInputContextListener monitoredFileAdded IFile monitoredFileAdded IFile monitoredFile
see org eclipse pde internal ui editor context I Input Context Listener monitored File Removed org eclipse core resources I File public boolean monitored File Removed I File monitored File return false  IInputContextListener monitoredFileRemoved IFile monitoredFileRemoved IFile monitoredFile

PDE Plugin get Resource String Extension Details extension Point Links NON NLS 1 public Extension Details  PDEPlugin getResourceString ExtensionDetails extensionPointLinks ExtensionDetails
id set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry entry if input null try input set Id id get Value catch Core Exception e PDE Plugin log Exception e  setFormEntryListener FormEntryAdapter textValueChanged FormEntry setId getValue CoreException PDEPlugin logException
name set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry entry if input null try input set Name name get Value catch Core Exception e PDE Plugin log Exception e  setFormEntryListener FormEntryAdapter textValueChanged FormEntry setName getValue CoreException PDEPlugin logException
point set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry entry if input null try input set Point point get Value catch Core Exception e PDE Plugin log Exception e  setFormEntryListener FormEntryAdapter textValueChanged FormEntry setPoint getValue CoreException PDEPlugin logException
rtext add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e if e get Href equals search NON NLS 1 Find Declarations Action find Declarations Action new Find Declarations Action input find Declarations Action run else if input null input get Point null return I Plugin Extension Point point PDE Core get Default find Extension Point input get Point if point null Show Description Action show Desc Action new Show Description Action point show Desc Action run else show No Extension Point Message  addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent getHref FindDeclarationsAction findDeclarationsAction FindDeclarationsAction findDeclarationsAction getPoint IPluginExtensionPoint PDECore getDefault findExtensionPoint getPoint ShowDescriptionAction showDescAction ShowDescriptionAction showDescAction showNoExtensionPointMessage
public void create Contents Composite parent Table Wrap Layout layout new Table Wrap Layout Form Toolkit toolkit get Managed Form get Toolkit boolean painted Border toolkit get Border Style SWT BORDER layout top Margin 0 layout left Margin 5 layout right Margin 0 layout bottom Margin 0 parent set Layout layout Section section toolkit create Section parent Section TITLE BAR Section DESCRIPTION section client Vertical Spacing PDE Section CLIENT VSPACING section margin Height 5 section margin Width 5 section set Text PDE Plugin get Resource String Extension Details title NON NLS 1 section set Description PDE Plugin get Resource String Extension Details desc NON NLS 1 Table Wrap Data td new Table Wrap Data Table Wrap Data FILL Table Wrap Data TOP td grab Horizontal true section set Layout Data td toolkit create Composite Separator section Composite client toolkit create Composite section Grid Layout glayout new Grid Layout glayout margin Width glayout margin Height 2 painted Border 2 0 glayout num Columns 2 if painted Border glayout vertical Spacing 7 client set Layout glayout Grid Data gd new Grid Data gd horizontal Span 2 id new Form Entry client toolkit PDE Plugin get Resource String Extension Details id null false NON NLS 1 id set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry entry if input null try input set Id id get Value catch Core Exception e PDE Plugin log Exception e name new Form Entry client toolkit PDE Plugin get Resource String Extension Details name null false NON NLS 1 name set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry entry if input null try input set Name name get Value catch Core Exception e PDE Plugin log Exception e point new Form Entry client toolkit PDE Plugin get Resource String Extension Details point null false NON NLS 1 point set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry entry if input null try input set Point point get Value catch Core Exception e PDE Plugin log Exception e create Spacer toolkit client 2 rtext toolkit create Form Text parent true td new Table Wrap Data Table Wrap Data FILL Table Wrap Data TOP td grab Horizontal true td indent 10 rtext set Layout Data td rtext set Image desc PDE Plugin get Default get Label Provider get PDE Plugin Images DESC DOC SECTION OBJ NON NLS 1 rtext set Image search PDE Plugin get Default get Label Provider get PDE Plugin Images DESC PSEARCH OBJ NON NLS 1 rtext add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e if e get Href equals search NON NLS 1 Find Declarations Action find Declarations Action new Find Declarations Action input find Declarations Action run else if input null input get Point null return I Plugin Extension Point point PDE Core get Default find Extension Point input get Point if point null Show Description Action show Desc Action new Show Description Action point show Desc Action run else show No Extension Point Message rtext set Text RTEXT DATA true false id set Editable is Editable name set Editable is Editable point set Editable is Editable toolkit paint Borders For client section set Client client I Plugin Model Base model I Plugin Model Base get Page get Model model add Model Changed Listener this mark Details Part section  createContents TableWrapLayout TableWrapLayout FormToolkit getManagedForm getToolkit paintedBorder getBorderStyle topMargin leftMargin rightMargin bottomMargin setLayout createSection TITLE_BAR clientVerticalSpacing PDESection CLIENT_VSPACING marginHeight marginWidth setText PDEPlugin getResourceString ExtensionDetails setDescription PDEPlugin getResourceString ExtensionDetails TableWrapData TableWrapData TableWrapData TableWrapData grabHorizontal setLayoutData createCompositeSeparator createComposite GridLayout GridLayout marginWidth marginHeight paintedBorder numColumns paintedBorder verticalSpacing setLayout GridData GridData horizontalSpan FormEntry PDEPlugin getResourceString ExtensionDetails setFormEntryListener FormEntryAdapter textValueChanged FormEntry setId getValue CoreException PDEPlugin logException FormEntry PDEPlugin getResourceString ExtensionDetails setFormEntryListener FormEntryAdapter textValueChanged FormEntry setName getValue CoreException PDEPlugin logException FormEntry PDEPlugin getResourceString ExtensionDetails setFormEntryListener FormEntryAdapter textValueChanged FormEntry setPoint getValue CoreException PDEPlugin logException createSpacer createFormText TableWrapData TableWrapData TableWrapData grabHorizontal setLayoutData setImage PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_DOC_SECTION_OBJ setImage PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_PSEARCH_OBJ addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent getHref FindDeclarationsAction findDeclarationsAction FindDeclarationsAction findDeclarationsAction getPoint IPluginExtensionPoint PDECore getDefault findExtensionPoint getPoint ShowDescriptionAction showDescAction ShowDescriptionAction showDescAction showNoExtensionPointMessage setText RTEXT_DATA setEditable isEditable setEditable isEditable setEditable isEditable paintBordersFor setClient IPluginModelBase IPluginModelBase getPage getModel addModelChangedListener markDetailsPart
public void selection Changed I Form Part part I Selection selection I Structured Selection ssel I Structured Selection selection if ssel size 1 input I Plugin Extension ssel get First Element else input null update  selectionChanged IFormPart ISelection IStructuredSelection IStructuredSelection IPluginExtension getFirstElement
private void update id set Value input null input get Id null true name set Value input null input get Name null true point set Value input null input get Point null true  setValue getId setValue getName setValue getPoint
public void cancel Edit id cancel Edit name cancel Edit point cancel Edit super cancel Edit  cancelEdit cancelEdit cancelEdit cancelEdit cancelEdit
public void commit boolean on Save id commit name commit point commit super commit on Save  onSave onSave
see org eclipse ui forms I Details Page set Focus public void set Focus id get Text set Focus  IDetailsPage setFocus setFocus getText setFocus
public void dispose I Plugin Model Base model I Plugin Model Base get Page get Model if model null model remove Model Changed Listener this super dispose  IPluginModelBase IPluginModelBase getPage getModel removeModelChangedListener
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event CHANGE Object obj e get Changed Objects 0 if obj equals input refresh  modelChanged IModelChangedEvent getChangeType IModelChangedEvent getChangedObjects
see org eclipse ui forms I Details Page refresh public void refresh update super refresh  IDetailsPage
public void fire Save Needed mark Dirty PDE Form Page page PDE Form Page get Managed Form get Container page getPDE Editor fire Save Needed get Context Id false  fireSaveNeeded markDirty PDEFormPage PDEFormPage getManagedForm getContainer getPDEEditor fireSaveNeeded getContextId
see org eclipse pde internal ui neweditor I Context Part get Context Id public String get Context Id return Plugin Input Context CONTEXT ID  IContextPart getContextId getContextId PluginInputContext CONTEXT_ID
return Plugin Input Context CONTEXT ID public PDE Form Page get Page return PDE Form Page get Managed Form get Container  PluginInputContext CONTEXT_ID PDEFormPage getPage PDEFormPage getManagedForm getContainer
return PDE Form Page get Managed Form get Container public boolean is Editable return get Page getPDE Editor get Aggregate Model is Editable  PDEFormPage getManagedForm getContainer isEditable getPage getPDEEditor getAggregateModel isEditable
private void show No Extension Point Message String title PDE Plugin get Resource String Extension Details no Point title NON NLS 1 String message PDE Plugin get Formatted Message Show Description Action no Point desc input get Point NON NLS 1 Message Dialog open Warning PDE Plugin get Active Workbench Shell title message  showNoExtensionPointMessage PDEPlugin getResourceString ExtensionDetails noPoint PDEPlugin getFormattedMessage ShowDescriptionAction noPoint getPoint MessageDialog openWarning PDEPlugin getActiveWorkbenchShell

private Section section public Extension Element Details I Schema Element schema Element this schema Element schema Element rows new Array List  ExtensionElementDetails ISchemaElement schemaElement schemaElement schemaElement ArrayList
rows new Array List public String get Context Id return Plugin Input Context CONTEXT ID  ArrayList getContextId PluginInputContext CONTEXT_ID
return Plugin Input Context CONTEXT ID public void fire Save Needed mark Dirty get Page getPDE Editor fire Save Needed get Context Id false  PluginInputContext CONTEXT_ID fireSaveNeeded markDirty getPage getPDEEditor fireSaveNeeded getContextId
get Page getPDE Editor fire Save Needed get Context Id false public PDE Form Page get Page return PDE Form Page get Managed Form get Container  getPage getPDEEditor fireSaveNeeded getContextId PDEFormPage getPage PDEFormPage getManagedForm getContainer
return PDE Form Page get Managed Form get Container public boolean is Editable return get Page getPDE Editor get Aggregate Model is Editable  PDEFormPage getManagedForm getContainer isEditable getPage getPDEEditor getAggregateModel isEditable
public void create Contents Composite parent Table Wrap Layout layout new Table Wrap Layout layout top Margin 0 layout left Margin 5 layout right Margin 0 layout bottom Margin 0 parent set Layout layout Form Toolkit toolkit get Managed Form get Toolkit section toolkit create Section parent Section TITLE BAR Section DESCRIPTION section client Vertical Spacing PDE Section CLIENT VSPACING section margin Height 5 section margin Width 5 section set Text PDE Plugin get Resource String Extension Element Details title NON NLS 1 section set Description PDE Plugin get Resource String Extension Element Details desc NON NLS 1 Table Wrap Data td new Table Wrap Data Table Wrap Data FILL Table Wrap Data TOP td grab Horizontal true section set Layout Data td toolkit create Composite Separator section Composite client toolkit create Composite section Grid Layout glayout new Grid Layout boolean painted Border toolkit get Border Style SWT BORDER glayout margin Width glayout margin Height 2 painted Border 2 0 int span 2 glayout num Columns span if painted Border glayout vertical Spacing 7 client set Layout glayout if schema Element null I Schema Attribute atts schema Element get Attributes Compute horizontal span for int i 0 i atts length i if atts i get Kind I Schema Attribute JAVA atts i get Kind I Schema Attribute RESOURCE span 3 break glayout num Columns span Add required attributes first for int i 0 i atts length i if atts i get Use I Schema Attribute REQUIRED rows add create Attribute Row atts i client toolkit span Add the rest for int i 0 i atts length i if atts i get Use I Schema Attribute REQUIRED rows add create Attribute Row atts i client toolkit span create Spacer toolkit client span else no schema delay until input is set toolkit paint Borders For client section set Client client mark Details Part section  createContents TableWrapLayout TableWrapLayout topMargin leftMargin rightMargin bottomMargin setLayout FormToolkit getManagedForm getToolkit createSection TITLE_BAR clientVerticalSpacing PDESection CLIENT_VSPACING marginHeight marginWidth setText PDEPlugin getResourceString ExtensionElementDetails setDescription PDEPlugin getResourceString ExtensionElementDetails TableWrapData TableWrapData TableWrapData TableWrapData grabHorizontal setLayoutData createCompositeSeparator createComposite GridLayout GridLayout paintedBorder getBorderStyle marginWidth marginHeight paintedBorder numColumns paintedBorder verticalSpacing setLayout schemaElement ISchemaAttribute schemaElement getAttributes getKind ISchemaAttribute getKind ISchemaAttribute numColumns getUse ISchemaAttribute createAttributeRow getUse ISchemaAttribute createAttributeRow createSpacer paintBordersFor setClient markDetailsPart
private Extension Attribute Row create Attribute Row I Schema Attribute att Composite parent Form Toolkit toolkit int span Extension Attribute Row row if att get Kind I Schema Attribute JAVA row new Class Attribute Row this att else if att get Kind I Schema Attribute RESOURCE row new Resource Attribute Row this att else I Schema Simple Type type att get Type if type get Name equals boolean NON NLS 1 row new Boolean Attribute Row this att else I Schema Restriction restriction type get Restriction if restriction null row new Choice Attribute Row this att else row new Text Attribute Row this att row create Contents parent toolkit span return row  ExtensionAttributeRow createAttributeRow ISchemaAttribute FormToolkit ExtensionAttributeRow getKind ISchemaAttribute ClassAttributeRow getKind ISchemaAttribute ResourceAttributeRow ISchemaSimpleType getType getName BooleanAttributeRow ISchemaRestriction getRestriction ChoiceAttributeRow TextAttributeRow createContents
private Extension Attribute Row create Attribute Row I Plugin Attribute att Composite parent Form Toolkit toolkit int span Extension Attribute Row row row new Text Attribute Row this att row create Contents parent toolkit span return row  ExtensionAttributeRow createAttributeRow IPluginAttribute FormToolkit ExtensionAttributeRow TextAttributeRow createContents
public void selection Changed I Form Part master Part I Selection selection I Structured Selection ssel I Structured Selection selection if ssel size 1 input I Plugin Element ssel get First Element else input null update  selectionChanged IFormPart masterPart ISelection IStructuredSelection IStructuredSelection IPluginElement getFirstElement
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event CHANGE Object obj e get Changed Objects 0 if obj equals input refresh  modelChanged IModelChangedEvent getChangeType IModelChangedEvent getChangedObjects
private void update update Description if schema Element null update Rows for int i 0 i rows size i Extension Attribute Row row Extension Attribute Row rows get i row set Input input  updateDescription schemaElement updateRows ExtensionAttributeRow ExtensionAttributeRow setInput
private void update Rows if input null return I Plugin Attribute atts input get Attributes Form Toolkit toolkit get Managed Form get Toolkit boolean rows Added false for int i 0 i atts length i if has Attribute atts i get Name rows add create Attribute Row atts i Composite section get Client toolkit 2 rows Added true if rows Added Composite section get Client layout true section layout true section get Parent layout true reflow  updateRows IPluginAttribute getAttributes FormToolkit getManagedForm getToolkit rowsAdded hasAttribute getName createAttributeRow getClient rowsAdded rowsAdded getClient getParent
private void reflow Composite parent section get Parent while parent null if parent instanceof Shared Scrolled Composite Shared Scrolled Composite parent reflow true return parent parent get Parent  getParent SharedScrolledComposite SharedScrolledComposite getParent
private boolean has Attribute String att Name for int i 0 i rows size i Extension Attribute Row row Extension Attribute Row rows get i if row get Name equals att Name return true return false  hasAttribute attName ExtensionAttributeRow ExtensionAttributeRow getName attName
private void update Description if input null String iname input get Name section set Description PDE Plugin get Formatted Message Extension Element Details set Desc iname NON NLS 1 else section set Description PDE Plugin get Resource String Extension Element Details set Selected Desc NON NLS 1 section layout  updateDescription getName setDescription PDEPlugin getFormattedMessage ExtensionElementDetails setDesc setDescription PDEPlugin getResourceString ExtensionElementDetails setSelectedDesc
public void commit boolean on Save for int i 0 i rows size i Extension Attribute Row row Extension Attribute Row rows get i row commit super commit on Save  onSave ExtensionAttributeRow ExtensionAttributeRow onSave
see org eclipse ui forms I Details Page set Focus public void set Focus if rows size 0 Extension Attribute Row rows get 0 set Focus  IDetailsPage setFocus setFocus ExtensionAttributeRow setFocus
public void dispose for int i 0 i rows size i Extension Attribute Row row Extension Attribute Row rows get i row dispose I Plugin Model Base model I Plugin Model Base get Page get Model if model null model remove Model Changed Listener this super dispose  ExtensionAttributeRow ExtensionAttributeRow IPluginModelBase IPluginModelBase getPage getModel removeModelChangedListener
see org eclipse ui forms I Details Page refresh public void refresh update super refresh  IDetailsPage

private static final String SCHEMA RTEXT DATA PDE Plugin get Resource String Extension Point Details schema Links NON NLS 1 private static final String NO SCHEMA RTEXT DATA PDE Plugin get Resource String Extension Point Details no Schema Links NON NLS 1 public Extension Point Details  SCHEMA_RTEXT_DATA PDEPlugin getResourceString ExtensionPointDetails schemaLinks NO_SCHEMA_RTEXT_DATA PDEPlugin getResourceString ExtensionPointDetails noSchemaLinks ExtensionPointDetails
public Extension Point Details public String get Context Id return Plugin Input Context CONTEXT ID  ExtensionPointDetails getContextId PluginInputContext CONTEXT_ID
return Plugin Input Context CONTEXT ID public void fire Save Needed mark Dirty get Page getPDE Editor fire Save Needed get Context Id false  PluginInputContext CONTEXT_ID fireSaveNeeded markDirty getPage getPDEEditor fireSaveNeeded getContextId
get Page getPDE Editor fire Save Needed get Context Id false public PDE Form Page get Page return PDE Form Page get Managed Form get Container  getPage getPDEEditor fireSaveNeeded getContextId PDEFormPage getPage PDEFormPage getManagedForm getContainer
return PDE Form Page get Managed Form get Container public boolean is Editable return get Page getPDE Editor get Aggregate Model is Editable  PDEFormPage getManagedForm getContainer isEditable getPage getPDEEditor getAggregateModel isEditable
f Id Entry set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry entry if f Input null try f Input set Id f Id Entry get Value catch Core Exception e PDE Plugin log Exception e  fIdEntry setFormEntryListener FormEntryAdapter textValueChanged FormEntry fInput fInput setId fIdEntry getValue CoreException PDEPlugin logException
f Name Entry set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry entry if f Input null try f Input set Name f Name Entry get Value catch Core Exception e PDE Plugin log Exception e  fNameEntry setFormEntryListener FormEntryAdapter textValueChanged FormEntry fInput fInput setName fNameEntry getValue CoreException PDEPlugin logException
f Schema Entry set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry entry if f Input null try f Input set Schema f Schema Entry get Value catch Core Exception e PDE Plugin log Exception e update Rich Text  fSchemaEntry setFormEntryListener FormEntryAdapter textValueChanged FormEntry fInput fInput setSchema fSchemaEntry getValue CoreException PDEPlugin logException updateRichText
public void link Activated Hyperlink Event e I Project project get Page getPDE Editor get Common Project if f Schema Entry get Value null f Schema Entry get Value length 0 generate Schema return I File file project get File f Schema Entry get Value if file exists open Schema File file else generate Schema  linkActivated HyperlinkEvent IProject getPage getPDEEditor getCommonProject fSchemaEntry getValue fSchemaEntry getValue generateSchema IFile getFile fSchemaEntry getValue openSchemaFile generateSchema
dialog add Filter new Viewer Filter public boolean select Viewer viewer Object parent Object element if element instanceof I File String ext I File element get Full Path get File Extension return ext equals exsd ext equals mxsd NON NLS 1 NON NLS 2 else if element instanceof I Container i e I Project I Folder try I Resource resources I Container element members for int i 0 i resources length i if select viewer parent resources i return true catch Core Exception e PDE Plugin log Exception e return false  addFilter ViewerFilter IFile IFile getFullPath getFileExtension IContainer IProject IFolder IResource IContainer CoreException PDEPlugin logException
dialog set Validator new I Selection Status Validator public I Status validate Object selection I Plugin Model Base model I Plugin Model Base get Page getPDE Editor get Aggregate Model String plugin Name model get Plugin Base get Id if selection null selection length 1 selection 0 instanceof I File return new Status I Status ERROR plugin Name I Status ERROR PDE Plugin get Resource String Manifest Editor Extension Point Details validate error Status NON NLS 1 null I File file I File selection 0 String ext file get Full Path get File Extension if ext equals exsd ext equals mxsd NON NLS 1 NON NLS 2 return new Status I Status OK plugin Name I Status OK null NON NLS 1 return new Status I Status ERROR plugin Name I Status ERROR PDE Plugin get Resource String Manifest Editor Extension Point Details validate error Status NON NLS 1 null  setValidator ISelectionStatusValidator IStatus IPluginModelBase IPluginModelBase getPage getPDEEditor getAggregateModel pluginName getPluginBase getId IFile IStatus pluginName IStatus PDEPlugin getResourceString ManifestEditor ExtensionPointDetails errorStatus IFile IFile getFullPath getFileExtension IStatus pluginName IStatus IStatus pluginName IStatus PDEPlugin getResourceString ManifestEditor ExtensionPointDetails errorStatus
public void browse Button Selected Form Entry entry final I Project project get Page getPDE Editor get Common Project Element Tree Selection Dialog dialog new Element Tree Selection Dialog PDE Plugin get Active Workbench Shell new Workbench Label Provider new Workbench Content Provider dialog set Title PDE Plugin get Resource String Manifest Editor Extension Point Details schema Location title NON NLS 1 dialog set Message PDE Plugin get Resource String Manifest Editor Extension Point Details schema Location desc NON NLS 1 dialog set Double Click Selects false dialog set Allow Multiple false dialog add Filter new Viewer Filter public boolean select Viewer viewer Object parent Object element if element instanceof I File String ext I File element get Full Path get File Extension return ext equals exsd ext equals mxsd NON NLS 1 NON NLS 2 else if element instanceof I Container i e I Project I Folder try I Resource resources I Container element members for int i 0 i resources length i if select viewer parent resources i return true catch Core Exception e PDE Plugin log Exception e return false dialog set Validator new I Selection Status Validator public I Status validate Object selection I Plugin Model Base model I Plugin Model Base get Page getPDE Editor get Aggregate Model String plugin Name model get Plugin Base get Id if selection null selection length 1 selection 0 instanceof I File return new Status I Status ERROR plugin Name I Status ERROR PDE Plugin get Resource String Manifest Editor Extension Point Details validate error Status NON NLS 1 null I File file I File selection 0 String ext file get Full Path get File Extension if ext equals exsd ext equals mxsd NON NLS 1 NON NLS 2 return new Status I Status OK plugin Name I Status OK null NON NLS 1 return new Status I Status ERROR plugin Name I Status ERROR PDE Plugin get Resource String Manifest Editor Extension Point Details validate error Status NON NLS 1 null dialog set Double Click Selects true dialog set Status Line Above Buttons true dialog set Input project dialog set Sorter new Resource Sorter Resource Sorter NAME String file Path f Schema Entry get Value if file Path null file Path length 0 project exists new Path file Path dialog set Initial Selection project get File new Path file Path else dialog set Initial Selection null if dialog open Element Tree Selection Dialog OK Object elements dialog get Result if elements length 0 I Resource elem I Resource elements 0 f Schema Entry set Value elem get Project Relative Path to String  browseButtonSelected FormEntry IProject getPage getPDEEditor getCommonProject ElementTreeSelectionDialog ElementTreeSelectionDialog PDEPlugin getActiveWorkbenchShell WorkbenchLabelProvider WorkbenchContentProvider setTitle PDEPlugin getResourceString ManifestEditor ExtensionPointDetails schemaLocation setMessage PDEPlugin getResourceString ManifestEditor ExtensionPointDetails schemaLocation setDoubleClickSelects setAllowMultiple addFilter ViewerFilter IFile IFile getFullPath getFileExtension IContainer IProject IFolder IResource IContainer CoreException PDEPlugin logException setValidator ISelectionStatusValidator IStatus IPluginModelBase IPluginModelBase getPage getPDEEditor getAggregateModel pluginName getPluginBase getId IFile IStatus pluginName IStatus PDEPlugin getResourceString ManifestEditor ExtensionPointDetails errorStatus IFile IFile getFullPath getFileExtension IStatus pluginName IStatus IStatus pluginName IStatus PDEPlugin getResourceString ManifestEditor ExtensionPointDetails errorStatus setDoubleClickSelects setStatusLineAboveButtons setInput setSorter ResourceSorter ResourceSorter filePath fSchemaEntry getValue filePath filePath filePath setInitialSelection getFile filePath setInitialSelection ElementTreeSelectionDialog getResult IResource IResource fSchemaEntry setValue getProjectRelativePath toString
f Rich Text add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e if e get Href equals search NON NLS 1 Find References Action plugin References Action new Find References Action f Input plugin References Action run else Show Description Action show Desc Action new Show Description Action f Input show Desc Action run  fRichText addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent getHref FindReferencesAction pluginReferencesAction FindReferencesAction fInput pluginReferencesAction ShowDescriptionAction showDescAction ShowDescriptionAction fInput showDescAction
public void create Contents Composite parent Table Wrap Layout layout new Table Wrap Layout layout top Margin 0 layout left Margin 5 layout right Margin 0 layout bottom Margin 0 parent set Layout layout Form Toolkit toolkit get Managed Form get Toolkit Section section toolkit create Section parent Section DESCRIPTION Section TITLE BAR section client Vertical Spacing PDE Section CLIENT VSPACING section margin Height 5 section margin Width 5 section set Text PDE Plugin get Resource String Extension Point Details title NON NLS 1 section set Description PDE Plugin get Resource String Extension Point Details desc NON NLS 1 Table Wrap Data td new Table Wrap Data Table Wrap Data FILL Table Wrap Data TOP td grab Horizontal true section set Layout Data td toolkit create Composite Separator section Composite client toolkit create Composite section Grid Layout glayout new Grid Layout boolean painted Border toolkit get Border Style SWT BORDER glayout margin Width glayout margin Height 2 painted Border 2 0 glayout num Columns 3 if painted Border glayout vertical Spacing 7 client set Layout glayout Grid Data gd new Grid Data gd horizontal Span 3 f Id Entry new Form Entry client toolkit PDE Plugin get Resource String Extension Point Details id null false NON NLS 1 f Id Entry set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry entry if f Input null try f Input set Id f Id Entry get Value catch Core Exception e PDE Plugin log Exception e f Name Entry new Form Entry client toolkit PDE Plugin get Resource String Extension Point Details name null false NON NLS 1 f Name Entry set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry entry if f Input null try f Input set Name f Name Entry get Value catch Core Exception e PDE Plugin log Exception e boolean editable get Page get Model is Editable f Schema Entry new Form Entry client toolkit PDE Plugin get Resource String Extension Point Details schema PDE Plugin get Resource String Extension Point Details browse editable NON NLS 1 NON NLS 2 f Schema Entry set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry entry if f Input null try f Input set Schema f Schema Entry get Value catch Core Exception e PDE Plugin log Exception e update Rich Text public void link Activated Hyperlink Event e I Project project get Page getPDE Editor get Common Project if f Schema Entry get Value null f Schema Entry get Value length 0 generate Schema return I File file project get File f Schema Entry get Value if file exists open Schema File file else generate Schema public void browse Button Selected Form Entry entry final I Project project get Page getPDE Editor get Common Project Element Tree Selection Dialog dialog new Element Tree Selection Dialog PDE Plugin get Active Workbench Shell new Workbench Label Provider new Workbench Content Provider dialog set Title PDE Plugin get Resource String Manifest Editor Extension Point Details schema Location title NON NLS 1 dialog set Message PDE Plugin get Resource String Manifest Editor Extension Point Details schema Location desc NON NLS 1 dialog set Double Click Selects false dialog set Allow Multiple false dialog add Filter new Viewer Filter public boolean select Viewer viewer Object parent Object element if element instanceof I File String ext I File element get Full Path get File Extension return ext equals exsd ext equals mxsd NON NLS 1 NON NLS 2 else if element instanceof I Container i e I Project I Folder try I Resource resources I Container element members for int i 0 i resources length i if select viewer parent resources i return true catch Core Exception e PDE Plugin log Exception e return false dialog set Validator new I Selection Status Validator public I Status validate Object selection I Plugin Model Base model I Plugin Model Base get Page getPDE Editor get Aggregate Model String plugin Name model get Plugin Base get Id if selection null selection length 1 selection 0 instanceof I File return new Status I Status ERROR plugin Name I Status ERROR PDE Plugin get Resource String Manifest Editor Extension Point Details validate error Status NON NLS 1 null I File file I File selection 0 String ext file get Full Path get File Extension if ext equals exsd ext equals mxsd NON NLS 1 NON NLS 2 return new Status I Status OK plugin Name I Status OK null NON NLS 1 return new Status I Status ERROR plugin Name I Status ERROR PDE Plugin get Resource String Manifest Editor Extension Point Details validate error Status NON NLS 1 null dialog set Double Click Selects true dialog set Status Line Above Buttons true dialog set Input project dialog set Sorter new Resource Sorter Resource Sorter NAME String file Path f Schema Entry get Value if file Path null file Path length 0 project exists new Path file Path dialog set Initial Selection project get File new Path file Path else dialog set Initial Selection null if dialog open Element Tree Selection Dialog OK Object elements dialog get Result if elements length 0 I Resource elem I Resource elements 0 f Schema Entry set Value elem get Project Relative Path to String create Spacer toolkit client 2 f Rich Text toolkit create Form Text parent true td new Table Wrap Data Table Wrap Data FILL Table Wrap Data TOP td grab Horizontal true td indent 10 f Rich Text set Layout Data td f Rich Text set Image schema PDE Plugin get Default get Label Provider get NON NLS 1 PDE Plugin Images DESC SCHEMA OBJ f Rich Text set Image desc PDE Plugin get Default get Label Provider get NON NLS 1 PDE Plugin Images DESC DOC SECTION OBJ f Rich Text set Image search PDE Plugin get Default get Label Provider get NON NLS 1 PDE Plugin Images DESC PSEARCH OBJ f Rich Text add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e if e get Href equals search NON NLS 1 Find References Action plugin References Action new Find References Action f Input plugin References Action run else Show Description Action show Desc Action new Show Description Action f Input show Desc Action run f Id Entry set Editable is Editable f Name Entry set Editable is Editable f Schema Entry set Editable is Editable toolkit paint Borders For client section set Client client I Plugin Model Base model I Plugin Model Base get Page get Model model add Model Changed Listener this mark Details Part section  createContents TableWrapLayout TableWrapLayout topMargin leftMargin rightMargin bottomMargin setLayout FormToolkit getManagedForm getToolkit createSection TITLE_BAR clientVerticalSpacing PDESection CLIENT_VSPACING marginHeight marginWidth setText PDEPlugin getResourceString ExtensionPointDetails setDescription PDEPlugin getResourceString ExtensionPointDetails TableWrapData TableWrapData TableWrapData TableWrapData grabHorizontal setLayoutData createCompositeSeparator createComposite GridLayout GridLayout paintedBorder getBorderStyle marginWidth marginHeight paintedBorder numColumns paintedBorder verticalSpacing setLayout GridData GridData horizontalSpan fIdEntry FormEntry PDEPlugin getResourceString ExtensionPointDetails fIdEntry setFormEntryListener FormEntryAdapter textValueChanged FormEntry fInput fInput setId fIdEntry getValue CoreException PDEPlugin logException fNameEntry FormEntry PDEPlugin getResourceString ExtensionPointDetails fNameEntry setFormEntryListener FormEntryAdapter textValueChanged FormEntry fInput fInput setName fNameEntry getValue CoreException PDEPlugin logException getPage getModel isEditable fSchemaEntry FormEntry PDEPlugin getResourceString ExtensionPointDetails PDEPlugin getResourceString ExtensionPointDetails fSchemaEntry setFormEntryListener FormEntryAdapter textValueChanged FormEntry fInput fInput setSchema fSchemaEntry getValue CoreException PDEPlugin logException updateRichText linkActivated HyperlinkEvent IProject getPage getPDEEditor getCommonProject fSchemaEntry getValue fSchemaEntry getValue generateSchema IFile getFile fSchemaEntry getValue openSchemaFile generateSchema browseButtonSelected FormEntry IProject getPage getPDEEditor getCommonProject ElementTreeSelectionDialog ElementTreeSelectionDialog PDEPlugin getActiveWorkbenchShell WorkbenchLabelProvider WorkbenchContentProvider setTitle PDEPlugin getResourceString ManifestEditor ExtensionPointDetails schemaLocation setMessage PDEPlugin getResourceString ManifestEditor ExtensionPointDetails schemaLocation setDoubleClickSelects setAllowMultiple addFilter ViewerFilter IFile IFile getFullPath getFileExtension IContainer IProject IFolder IResource IContainer CoreException PDEPlugin logException setValidator ISelectionStatusValidator IStatus IPluginModelBase IPluginModelBase getPage getPDEEditor getAggregateModel pluginName getPluginBase getId IFile IStatus pluginName IStatus PDEPlugin getResourceString ManifestEditor ExtensionPointDetails errorStatus IFile IFile getFullPath getFileExtension IStatus pluginName IStatus IStatus pluginName IStatus PDEPlugin getResourceString ManifestEditor ExtensionPointDetails errorStatus setDoubleClickSelects setStatusLineAboveButtons setInput setSorter ResourceSorter ResourceSorter filePath fSchemaEntry getValue filePath filePath filePath setInitialSelection getFile filePath setInitialSelection ElementTreeSelectionDialog getResult IResource IResource fSchemaEntry setValue getProjectRelativePath toString createSpacer fRichText createFormText TableWrapData TableWrapData TableWrapData grabHorizontal fRichText setLayoutData fRichText setImage PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_SCHEMA_OBJ fRichText setImage PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_DOC_SECTION_OBJ fRichText setImage PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_PSEARCH_OBJ fRichText addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent getHref FindReferencesAction pluginReferencesAction FindReferencesAction fInput pluginReferencesAction ShowDescriptionAction showDescAction ShowDescriptionAction fInput showDescAction fIdEntry setEditable isEditable fNameEntry setEditable isEditable fSchemaEntry setEditable isEditable paintBordersFor setClient IPluginModelBase IPluginModelBase getPage getModel addModelChangedListener markDetailsPart
public void dispose I Plugin Model Base model I Plugin Model Base get Page get Model if model null model remove Model Changed Listener this super dispose  IPluginModelBase IPluginModelBase getPage getModel removeModelChangedListener
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event CHANGE Object obj e get Changed Objects 0 if obj equals f Input refresh  modelChanged IModelChangedEvent getChangeType IModelChangedEvent getChangedObjects fInput
private void update f Id Entry set Value f Input null f Input get Id null f Input get Id NON NLS 1 true f Name Entry set Value f Input null f Input get Name null f Input get Name true NON NLS 1 f Schema Entry set Value f Input null f Input get Schema null f Input get Schema true NON NLS 1 update Rich Text  fIdEntry setValue fInput fInput getId fInput getId fNameEntry setValue fInput fInput getName fInput getName fSchemaEntry setValue fInput fInput getSchema fInput getSchema updateRichText
public void cancel Edit f Id Entry cancel Edit f Name Entry cancel Edit f Schema Entry cancel Edit update Rich Text super cancel Edit  cancelEdit fIdEntry cancelEdit fNameEntry cancelEdit fSchemaEntry cancelEdit updateRichText cancelEdit
private void update Rich Text boolean has Schema f Schema Entry get Value length 0 if has Schema f Rich Text Data SCHEMA RTEXT DATA return if has Schema f Rich Text Data NO SCHEMA RTEXT DATA return f Rich Text Data has Schema SCHEMA RTEXT DATA NO SCHEMA RTEXT DATA f Rich Text set Text f Rich Text Data true false get Managed Form get Form reflow true  updateRichText hasSchema fSchemaEntry getValue hasSchema fRichTextData SCHEMA_RTEXT_DATA hasSchema fRichTextData NO_SCHEMA_RTEXT_DATA fRichTextData hasSchema SCHEMA_RTEXT_DATA NO_SCHEMA_RTEXT_DATA fRichText setText fRichTextData getManagedForm getForm
d async Exec new Runnable public void run try String editor Id PDE Plugin SCHEMA EDITOR ID ww get Active Page open Editor new File Editor Input file editor Id catch Part Init Exception e PDE Plugin log Exception e  asyncExec editorId PDEPlugin SCHEMA_EDITOR_ID getActivePage openEditor FileEditorInput editorId PartInitException PDEPlugin logException
private void open Schema File final I File file final I Workbench Window ww PDE Plugin get Active Workbench Window Display d ww get Shell get Display d async Exec new Runnable public void run try String editor Id PDE Plugin SCHEMA EDITOR ID ww get Active Page open Editor new File Editor Input file editor Id catch Part Init Exception e PDE Plugin log Exception e  openSchemaFile IFile IWorkbenchWindow PDEPlugin getActiveWorkbenchWindow getShell getDisplay asyncExec editorId PDEPlugin SCHEMA_EDITOR_ID getActivePage openEditor FileEditorInput editorId PartInitException PDEPlugin logException
show While get Page get Part Control get Display new Runnable public void run New Schema File Wizard wizard new New Schema File Wizard project f Input true Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create SWT Util set Dialog Size dialog 400 450 if dialog open Wizard Dialog OK update  showWhile getPage getPartControl getDisplay NewSchemaFileWizard NewSchemaFileWizard fInput WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell SWTUtil setDialogSize WizardDialog
private void generate Schema final I Project project get Page getPDE Editor get Common Project Busy Indicator show While get Page get Part Control get Display new Runnable public void run New Schema File Wizard wizard new New Schema File Wizard project f Input true Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create SWT Util set Dialog Size dialog 400 450 if dialog open Wizard Dialog OK update  generateSchema IProject getPage getPDEEditor getCommonProject BusyIndicator showWhile getPage getPartControl getDisplay NewSchemaFileWizard NewSchemaFileWizard fInput WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell SWTUtil setDialogSize WizardDialog
public void selection Changed I Form Part master Part I Selection selection I Structured Selection ssel I Structured Selection selection if ssel size 1 f Input I Plugin Extension Point ssel get First Element else f Input null update  selectionChanged IFormPart masterPart ISelection IStructuredSelection IStructuredSelection fInput IPluginExtensionPoint getFirstElement fInput
public void commit boolean on Save f Id Entry commit f Name Entry commit f Schema Entry commit super commit on Save  onSave fIdEntry fNameEntry fSchemaEntry onSave
see org eclipse ui forms I Details Page set Focus public void set Focus f Id Entry get Text set Focus  IDetailsPage setFocus setFocus fIdEntry getText setFocus
see org eclipse ui forms I Details Page refresh public void refresh update super refresh  IDetailsPage

private Extension Points Block block public class Extension Points Block extends PDE Master Details Block public Extension Points Block super Extension Points Page this  ExtensionPointsBlock ExtensionPointsBlock PDEMasterDetailsBlock ExtensionPointsBlock ExtensionPointsPage
protected PDE Section create Master Section I Managed Form managed Form Composite parent extension Points Section new Extension Points Section get Page parent return extension Points Section  PDESection createMasterSection IManagedForm managedForm extensionPointsSection ExtensionPointsSection getPage extensionPointsSection
details Part set Page Provider new I Details Page Provider public Object get Page Key Object object if object instanceof I Plugin Extension Point return I Plugin Extension Point class return object get Class  detailsPart setPageProvider IDetailsPageProvider getPageKey IPluginExtensionPoint IPluginExtensionPoint getClass
public I Details Page get Page Object key if key equals I Plugin Extension Point class return new Extension Point Details return null  IDetailsPage getPage IPluginExtensionPoint ExtensionPointDetails
protected void register Pages Details Part details Part details Part set Page Provider new I Details Page Provider public Object get Page Key Object object if object instanceof I Plugin Extension Point return I Plugin Extension Point class return object get Class public I Details Page get Page Object key if key equals I Plugin Extension Point class return new Extension Point Details return null  registerPages DetailsPart detailsPart detailsPart setPageProvider IDetailsPageProvider getPageKey IPluginExtensionPoint IPluginExtensionPoint getClass IDetailsPage getPage IPluginExtensionPoint ExtensionPointDetails
param editor param id param title public Extension Points Page Form Editor editor super editor PAGE ID PDE Plugin get Resource String Extension Points Page tab Name NON NLS 1 block new Extension Points Block  ExtensionPointsPage FormEditor PAGE_ID PDEPlugin getResourceString ExtensionPointsPage tabName ExtensionPointsBlock
protected void create Form Content I Managed Form managed Form super create Form Content managed Form Scrolled Form form managed Form get Form form set Text PDE Plugin get Resource String Extension Points Page title NON NLS 1 block create Content managed Form extension Points Section fire Selection  createFormContent IManagedForm managedForm createFormContent managedForm ScrolledForm managedForm getForm setText PDEPlugin getResourceString ExtensionPointsPage createContent managedForm extensionPointsSection fireSelection

I Structured Content Provider public Object get Elements Object parent I Plugin Model Base model I Plugin Model Base get Page get Model I Plugin Base plugin Base model get Plugin Base if plugin Base null return plugin Base get Extension Points return new Object 0  IStructuredContentProvider getElements IPluginModelBase IPluginModelBase getPage getModel IPluginBase pluginBase getPluginBase pluginBase pluginBase getExtensionPoints
public Extension Points Section PDE Form Page page Composite parent super page parent Section DESCRIPTION new String PDE Plugin get Resource String SECTION NEW get Section set Text PDE Plugin get Resource String SECTION TITLE get Section set Description PDE Plugin get Resource String SECTION DESC handle Default Button false get Table Part set Editable false  ExtensionPointsSection PDEFormPage PDEPlugin getResourceString SECTION_NEW getSection setText PDEPlugin getResourceString SECTION_TITLE getSection setDescription PDEPlugin getResourceString SECTION_DESC handleDefaultButton getTablePart setEditable
public void create Client Section section Form Toolkit toolkit Composite container create Client Container section 2 toolkit Table Part table Part get Table Part create Viewer Part Control container SWT MULTI 2 toolkit point Table table Part get Table Viewer point Table set Content Provider new Table Content Provider point Table set Label Provider PDE Plugin get Default get Label Provider toolkit paint Borders For container section set Client container point Table set Input get Page select First Extension Point I Base Model model get Page get Model if model instanceof I Model Change Provider I Model Change Provider model add Model Changed Listener this table Part set Button Enabled 0 model is Editable  createClient FormToolkit createClientContainer TablePart tablePart getTablePart createViewerPartControl pointTable tablePart getTableViewer pointTable setContentProvider TableContentProvider pointTable setLabelProvider PDEPlugin getDefault getLabelProvider paintBordersFor setClient pointTable setInput getPage selectFirstExtensionPoint IBaseModel getPage getModel IModelChangeProvider IModelChangeProvider addModelChangedListener tablePart setButtonEnabled isEditable
private void select First Extension Point Table table point Table get Table Table Item items table get Items if items length 0 return Table Item first Item items 0 Object obj first Item get Data point Table set Selection new Structured Selection obj  selectFirstExtensionPoint pointTable getTable TableItem getItems TableItem firstItem firstItem getData pointTable setSelection StructuredSelection
point Table set Selection new Structured Selection obj void fire Selection point Table set Selection point Table get Selection  pointTable setSelection StructuredSelection fireSelection pointTable setSelection pointTable getSelection
public void dispose I Base Model model get Page get Model if model instanceof I Model Change Provider I Model Change Provider model remove Model Changed Listener this super dispose  IBaseModel getPage getModel IModelChangeProvider IModelChangeProvider removeModelChangedListener
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id handle Delete return true if action Id equals Action Factory CUT get Id delete here and let the editor transfer the selection to the clipboard handle Delete return false if action Id equals Action Factory PASTE get Id do Paste return true return false  doGlobalAction actionId actionId ActionFactory getId handleDelete actionId ActionFactory getId handleDelete actionId ActionFactory getId doPaste
public void refresh point Table refresh get Managed Form fire Selection Changed this point Table get Selection super refresh  pointTable getManagedForm fireSelectionChanged pointTable getSelection
public boolean set Form Input Object object if object instanceof I Plugin Extension Point point Table set Selection new Structured Selection object true return true return false  setFormInput IPluginExtensionPoint pointTable setSelection StructuredSelection
protected void selection Changed I Structured Selection selection get Page getPDE Editor set Selection selection super selection Changed selection  selectionChanged IStructuredSelection getPage getPDEEditor setSelection selectionChanged
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event WORLD CHANGED mark Stale return Object change Object event get Changed Objects 0 if change Object instanceof I Plugin Extension Point if event get Change Type I Model Changed Event INSERT point Table add change Object point Table set Selection new Structured Selection change Object true point Table get Table set Focus else if event get Change Type I Model Changed Event REMOVE point Table remove change Object else point Table update change Object null  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale changeObject getChangedObjects changeObject IPluginExtensionPoint getChangeType IModelChangedEvent pointTable changeObject pointTable setSelection StructuredSelection changeObject pointTable getTable setFocus getChangeType IModelChangedEvent pointTable changeObject pointTable changeObject
new Action PDE Plugin get Resource String POPUP NEW EXTENSION POINT public void run handle New  PDEPlugin getResourceString POPUP_NEW_EXTENSION_POINT handleNew
new Action PDE Plugin get Resource String POPUP OPEN SCHEMA public void run handle Open Schema point  PDEPlugin getResourceString POPUP_OPEN_SCHEMA handleOpenSchema
new Action PDE Plugin get Resource String POPUP DELETE public void run I Plugin Base plugin point get Plugin Base try plugin remove point catch Core Exception e  PDEPlugin getResourceString POPUP_DELETE IPluginBase getPluginBase CoreException
protected void fill Context Menu I Menu Manager manager I Selection selection point Table get Selection Action new Action new Action PDE Plugin get Resource String POPUP NEW EXTENSION POINT public void run handle New new Action set Enabled is Editable manager add new Action if selection is Empty Object object I Structured Selection selection get First Element final I Plugin Extension Point point I Plugin Extension Point object if point get Schema null final I Editor Input input get Page get Editor get Editor Input if input instanceof I File Editor Input input instanceof System File Editor Input Action open Schema Action new Action PDE Plugin get Resource String POPUP OPEN SCHEMA public void run handle Open Schema point manager add open Schema Action manager add new Separator Action delete Action new Action PDE Plugin get Resource String POPUP DELETE public void run I Plugin Base plugin point get Plugin Base try plugin remove point catch Core Exception e delete Action set Enabled is Editable manager add delete Action get Page getPDE Editor get Contributor context Menu About To Show manager manager add new Separator if selection is Empty Plugin Search Action Group action Group new Plugin Search Action Group action Group set Context new Action Context selection action Group fill Context Menu manager  fillContextMenu IMenuManager ISelection pointTable getSelection newAction PDEPlugin getResourceString POPUP_NEW_EXTENSION_POINT handleNew newAction setEnabled isEditable newAction isEmpty IStructuredSelection getFirstElement IPluginExtensionPoint IPluginExtensionPoint getSchema IEditorInput getPage getEditor getEditorInput IFileEditorInput SystemFileEditorInput openSchemaAction PDEPlugin getResourceString POPUP_OPEN_SCHEMA handleOpenSchema openSchemaAction deleteAction PDEPlugin getResourceString POPUP_DELETE IPluginBase getPluginBase CoreException deleteAction setEnabled isEditable deleteAction getPage getPDEEditor getContributor contextMenuAboutToShow isEmpty PluginSearchActionGroup actionGroup PluginSearchActionGroup actionGroup setContext ActionContext actionGroup fillContextMenu
protected void button Selected int index if index 0 handle New  buttonSelected handleNew
private void handle Delete Object object I Structured Selection point Table get Selection get First Element if object null object instanceof I Plugin Extension Point I Plugin Extension Point ep I Plugin Extension Point object I Plugin Base plugin ep get Plugin Base try plugin remove ep catch Core Exception e PDE Plugin log Exception e  handleDelete IStructuredSelection pointTable getSelection getFirstElement IPluginExtensionPoint IPluginExtensionPoint IPluginExtensionPoint IPluginBase getPluginBase CoreException PDEPlugin logException
show While point Table get Table get Display new Runnable public void run New Extension Point Wizard wizard new New Extension Point Wizard project I Plugin Model Base get Page get Model Manifest Editor get Page getPDE Editor Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create SWT Util set Dialog Size dialog 400 450 dialog open  showWhile pointTable getTable getDisplay NewExtensionPointWizard NewExtensionPointWizard IPluginModelBase getPage getModel ManifestEditor getPage getPDEEditor WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell SWTUtil setDialogSize
private void handle New I File file I File Editor Input get Page getPDE Editor get Editor Input get File final I Project project file get Project Busy Indicator show While point Table get Table get Display new Runnable public void run New Extension Point Wizard wizard new New Extension Point Wizard project I Plugin Model Base get Page get Model Manifest Editor get Page getPDE Editor Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create SWT Util set Dialog Size dialog 400 450 dialog open  handleNew IFile IFileEditorInput getPage getPDEEditor getEditorInput getFile IProject getProject BusyIndicator showWhile pointTable getTable getDisplay NewExtensionPointWizard NewExtensionPointWizard IPluginModelBase getPage getModel ManifestEditor getPage getPDEEditor WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell SWTUtil setDialogSize
show While point Table get Table get Display new Runnable public void run try page open Editor input IPDEUI Constants SCHEMA EDITOR ID catch Part Init Exception e PDE Plugin log Exception e  showWhile pointTable getTable getDisplay openEditor IPDEUIConstants SCHEMA_EDITOR_ID PartInitException PDEPlugin logException
private void handle Open Schema I Plugin Extension Point point String schema point get Schema I Model model point get Model I Resource resource model get Underlying Resource final I Workbench Page page PDE Plugin get Active Page final I Editor Input input if resource null I Project project resource get Project I File file project get File schema input new File Editor Input file else I Plugin Model Base pmodel I Plugin Model Base model String location pmodel get Install Location if location starts With file NON NLS 1 location location substring 5 File file new File location File separator schema if file exists false try source location Source Location Manager manager PDE Core get Default get Source Location Manager file manager find Source File point get Plugin Base new Path schema input new System File Editor Input file Busy Indicator show While point Table get Table get Display new Runnable public void run try page open Editor input IPDEUI Constants SCHEMA EDITOR ID catch Part Init Exception e PDE Plugin log Exception e  handleOpenSchema IPluginExtensionPoint getSchema IModel getModel IResource getUnderlyingResource IWorkbenchPage PDEPlugin getActivePage IEditorInput IProject getProject IFile getFile FileEditorInput IPluginModelBase IPluginModelBase getInstallLocation startsWith SourceLocationManager PDECore getDefault getSourceLocationManager findSourceFile getPluginBase SystemFileEditorInput BusyIndicator showWhile pointTable getTable getDisplay openEditor IPDEUIConstants SCHEMA_EDITOR_ID PartInitException PDEPlugin logException
protected void do Paste Object target Object objects I Plugin Model Base model I Plugin Model Base get Page get Model I Plugin Base plugin model get Plugin Base try for int i 0 i objects length i Object obj objects i if obj instanceof I Plugin Extension Point Plugin Extension Point point Plugin Extension Point obj point set Model model point set Parent plugin plugin add point catch Core Exception e PDE Plugin log Exception e  doPaste IPluginModelBase IPluginModelBase getPage getModel IPluginBase getPluginBase IPluginExtensionPoint PluginExtensionPoint PluginExtensionPoint setModel setParent CoreException PDEPlugin logException
protected boolean can Paste Object target Object objects if objects 0 instanceof I Plugin Extension Point return true return false  canPaste IPluginExtensionPoint

public class Extensions Block extends PDE Master Details Block implements I Details Page Provider public Extensions Block super Extensions Page this  ExtensionsBlock PDEMasterDetailsBlock IDetailsPageProvider ExtensionsBlock ExtensionsPage
protected PDE Section create Master Section I Managed Form managed Form Composite parent section new Extensions Section get Page parent return section  PDESection createMasterSection IManagedForm managedForm ExtensionsSection getPage
protected void register Pages Details Part details Part details Part set Page Limit 10 register static page for the extensions details Part register Page I Plugin Extension class new Extension Details register a dynamic provider for elements details Part set Page Provider this  registerPages DetailsPart detailsPart detailsPart setPageLimit detailsPart registerPage IPluginExtension ExtensionDetails detailsPart setPageProvider
public Object get Page Key Object object if object instanceof I Plugin Extension return I Plugin Extension class if object instanceof I Plugin Element I Schema Element element Extensions Section get Schema Element I Plugin Element object if element null return element no element construct one I Plugin Element pelement I Plugin Element object String ename pelement get Name I Plugin Extension extension Extensions Section get Extension I Plugin Parent pelement get Parent return extension get Point ename NON NLS 1 return object get Class  getPageKey IPluginExtension IPluginExtension IPluginElement ISchemaElement ExtensionsSection getSchemaElement IPluginElement IPluginElement IPluginElement getName IPluginExtension ExtensionsSection getExtension IPluginParent getParent getPoint getClass
public I Details Page get Page Object object if object instanceof I Schema Element return new Extension Element Details I Schema Element object if object instanceof String return new Extension Element Details null return null  IDetailsPage getPage ISchemaElement ExtensionElementDetails ISchemaElement ExtensionElementDetails
final Scrolled Form form managed Form get Form Action collapse Action new Action col NON NLS 1 public void run section handle Collapse All  ScrolledForm managedForm getForm collapseAction handleCollapseAll
protected void create Tool Bar Actions I Managed Form managed Form final Scrolled Form form managed Form get Form Action collapse Action new Action col NON NLS 1 public void run section handle Collapse All collapse Action set Tool Tip Text PDE Plugin get Resource String Extensions Page collapse All NON NLS 1 collapse Action set Image Descriptor PDE Plugin Images DESC COLLAPSE ALL form get Tool Bar Manager add collapse Action super create Tool Bar Actions managed Form  createToolBarActions IManagedForm managedForm ScrolledForm managedForm getForm collapseAction handleCollapseAll collapseAction setToolTipText PDEPlugin getResourceString ExtensionsPage collapseAll collapseAction setImageDescriptor PDEPluginImages DESC_COLLAPSE_ALL getToolBarManager collapseAction createToolBarActions managedForm
param editor param id param title public Extensions Page Form Editor editor super editor PAGE ID PDE Plugin get Resource String Extensions Page tab Name NON NLS 1 block new Extensions Block  ExtensionsPage FormEditor PAGE_ID PDEPlugin getResourceString ExtensionsPage tabName ExtensionsBlock
protected void create Form Content I Managed Form managed Form super create Form Content managed Form Scrolled Form form managed Form get Form form set Text PDE Plugin get Resource String Extensions Page title NON NLS 1 block create Content managed Form Body Text Section body Text Section new Body Text Section this form get Body Grid Data gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING body Text Section get Section set Layout Data gd body Text Section get Section margin Width 5 managed Form add Part body Text Section refire selection section fire Selection  createFormContent IManagedForm managedForm createFormContent managedForm ScrolledForm managedForm getForm setText PDEPlugin getResourceString ExtensionsPage createContent managedForm BodyTextSection bodyTextSection BodyTextSection getBody GridData GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING bodyTextSection getSection setLayoutData bodyTextSection getSection marginWidth managedForm addPart bodyTextSection fireSelection

I Tree Content Provider public Object get Children Object parent Object children null if parent instanceof I Plugin Base children I Plugin Base parent get Extensions else if parent instanceof I Plugin Extension children I Plugin Extension parent get Children else if parent instanceof I Plugin Element children I Plugin Element parent get Children if children null children new Object 0 return children  ITreeContentProvider getChildren IPluginBase IPluginBase getExtensions IPluginExtension IPluginExtension getChildren IPluginElement IPluginElement getChildren
return children public boolean has Children Object parent return get Children parent length 0  hasChildren getChildren
public Object get Parent Object child if child instanceof I Plugin Extension return I Plugin Model Base get Page get Model get Plugin Base if child instanceof I Plugin Object return I Plugin Object child get Parent return null  getParent IPluginExtension IPluginModelBase getPage getModel getPluginBase IPluginObject IPluginObject getParent
return null public Object get Elements Object parent return get Children parent  getElements getChildren
class Extension Label Provider extends Label Provider public String get Text Object obj return resolve Object Name obj  ExtensionLabelProvider LabelProvider getText resolveObjectName
return resolve Object Name obj public Image get Image Object obj return resolve Object Image obj  resolveObjectName getImage resolveObjectImage
public Extensions Section PDE Form Page page Composite parent super page parent 0 new String PDE Plugin get Resource String SECTION NEW PDE Plugin get Resource String SECTION EDIT null PDE Plugin get Resource String SECTION UP PDE Plugin get Resource String SECTION DOWN get Section set Text PDE Plugin get Resource String SECTION TITLE plugin Info Registry PDE Core get Default get External Model Manager handle Default Button false  ExtensionsSection PDEFormPage PDEPlugin getResourceString SECTION_NEW PDEPlugin getResourceString SECTION_EDIT PDEPlugin getResourceString SECTION_UP PDEPlugin getResourceString SECTION_DOWN getSection setText PDEPlugin getResourceString SECTION_TITLE pluginInfoRegistry PDECore getDefault getExternalModelManager handleDefaultButton
private static void add Items For Extension With Schema Menu Manager menu I Plugin Extension extension I Plugin Parent parent I Schema schema get Schema extension String tag Name parent extension extension parent get Name NON NLS 1 I Schema Element element Info schema find Element tag Name if element Info null return I Schema Element candidates schema get Candidate Children element Info for int i 0 i candidates length i I Schema Element candidate Info candidates i Action action new New Element Action candidate Info parent menu add action  addItemsForExtensionWithSchema MenuManager IPluginExtension IPluginParent ISchema getSchema tagName getName ISchemaElement elementInfo findElement tagName elementInfo ISchemaElement getCandidateChildren elementInfo ISchemaElement candidateInfo NewElementAction candidateInfo
private static I Schema get Schema I Plugin Extension extension String point extension get Point Schema Registry registry PDE Core get Default get Schema Registry return registry get Schema point  ISchema getSchema IPluginExtension getPoint SchemaRegistry PDECore getDefault getSchemaRegistry getSchema
static I Schema Element get Schema Element I Plugin Element element I Plugin Object parent element get Parent while parent null parent instanceof I Plugin Extension parent parent get Parent if parent null I Schema schema get Schema I Plugin Extension parent if schema null return schema find Element element get Name return null  ISchemaElement getSchemaElement IPluginElement IPluginObject getParent IPluginExtension getParent ISchema getSchema IPluginExtension findElement getName
public void create Client Section section Form Toolkit toolkit initialize Images Composite container create Client Container section 2 toolkit Tree Part tree Part get Tree Part create Viewer Part Control container SWT MULTI 2 toolkit extension Tree tree Part get Tree Viewer extension Tree set Content Provider new Extension Content Provider extension Tree set Label Provider new Extension Label Provider drill Down Adapter new Drill Down Adapter extension Tree toolkit paint Borders For container section set Client container initialize I Plugin Model Base get Page get Model  createClient FormToolkit initializeImages createClientContainer TreePart treePart getTreePart createViewerPartControl extensionTree treePart getTreeViewer extensionTree setContentProvider ExtensionContentProvider extensionTree setLabelProvider ExtensionLabelProvider drillDownAdapter DrillDownAdapter extensionTree paintBordersFor setClient IPluginModelBase getPage getModel
protected void selection Changed I Structured Selection selection get Page getPDE Editor set Selection selection update Up Down Buttons selection get First Element get Tree Part set Button Enabled 1 is Selection Editable selection  selectionChanged IStructuredSelection getPage getPDEEditor setSelection updateUpDownButtons getFirstElement getTreePart setButtonEnabled isSelectionEditable
protected void handle Double Click I Structured Selection selection Properties Action action new Properties Action get Form Page get Editor action run  handleDoubleClick IStructuredSelection PropertiesAction PropertiesAction getFormPage getEditor
protected void button Selected int index switch index case 0 handle New break case 1 handle Edit break case 2 blank break case 3 handle Move true break case 4 handle Move false break  buttonSelected handleNew handleEdit handleMove handleMove
public void dispose editor Wizards null I Plugin Model Base model I Plugin Model Base get Page getPDE Editor get Aggregate Model if model null model remove Model Changed Listener this super dispose  editorWizards IPluginModelBase IPluginModelBase getPage getPDEEditor getAggregateModel removeModelChangedListener
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id handle Delete return true if action Id equals Action Factory CUT get Id delete here and let the editor transfer the selection to the clipboard handle Delete return false if action Id equals Action Factory PASTE get Id do Paste return true return false  doGlobalAction actionId actionId ActionFactory getId handleDelete actionId ActionFactory getId handleDelete actionId ActionFactory getId doPaste
public boolean set Form Input Object object if object instanceof I Plugin Extension object instanceof I Plugin Element extension Tree set Selection new Structured Selection object true return true return false  setFormInput IPluginExtension IPluginElement extensionTree setSelection StructuredSelection
multiple Action del Action new Action public void run handle Delete  delAction handleDelete
protected void fill Context Menu I Menu Manager manager I Selection selection extension Tree get Selection I Structured Selection ssel I Structured Selection selection I Menu Manager new Menu null if ssel size 1 Object object ssel get First Element if object instanceof I Plugin Parent I Plugin Parent parent I Plugin Parent object if parent get Model get Underlying Resource null new Menu fill Context Menu get Page parent manager manager add new Separator else if ssel size 1 multiple Action del Action new Action public void run handle Delete del Action set Text PDE Plugin get Resource String POPUP DELETE manager add del Action manager add new Separator del Action set Enabled is Editable if new Menu null new Menu new Menu Manager PDE Plugin get Resource String POPUP NEW manager add new Menu if new Menu is Empty new Menu add new Separator new Menu add new Extension Action manager add new Separator drill Down Adapter add Navigation Actions manager manager add new Separator manager add collapse All Action manager add new Separator get Page getPDE Editor get Contributor add Clipboard Actions manager get Page getPDE Editor get Contributor context Menu About To Show manager false if ssel size 1 manager add new Separator Object object ssel get First Element if object instanceof I Plugin Extension Plugin Search Action Group action Group new Plugin Search Action Group action Group set Context new Action Context selection action Group fill Context Menu manager manager add new Separator manager add new Properties Action get Form Page get Editor  fillContextMenu IMenuManager ISelection extensionTree getSelection IStructuredSelection IStructuredSelection IMenuManager newMenu getFirstElement IPluginParent IPluginParent IPluginParent getModel getUnderlyingResource newMenu fillContextMenu getPage delAction handleDelete delAction setText PDEPlugin getResourceString POPUP_DELETE delAction delAction setEnabled isEditable newMenu newMenu MenuManager PDEPlugin getResourceString POPUP_NEW newMenu newMenu isEmpty newMenu newMenu newExtensionAction drillDownAdapter addNavigationActions collapseAllAction getPage getPDEEditor getContributor addClipboardActions getPage getPDEEditor getContributor contextMenuAboutToShow getFirstElement IPluginExtension PluginSearchActionGroup actionGroup PluginSearchActionGroup actionGroup setContext ActionContext actionGroup fillContextMenu PropertiesAction getFormPage getEditor
static I Menu Manager fill Context Menu PDE Form Page page final I Plugin Parent parent I Menu Manager manager return fill Context Menu page parent manager false  IMenuManager fillContextMenu PDEFormPage IPluginParent IMenuManager fillContextMenu
static I Menu Manager fill Context Menu PDE Form Page page final I Plugin Parent parent I Menu Manager manager boolean add Sibling Items return fill Context Menu page parent manager add Sibling Items true  IMenuManager fillContextMenu PDEFormPage IPluginParent IMenuManager addSiblingItems fillContextMenu addSiblingItems
get Resource String POPUP DELETE public void run try I Plugin Object parents Parent parent get Parent if parent instanceof I Plugin Extension I Plugin Base plugin I Plugin Base parents Parent plugin remove I Plugin Extension parent else I Plugin Parent parent Element I Plugin Parent parent get Parent parent Element remove parent catch Core Exception e  getResourceString POPUP_DELETE IPluginObject parentsParent getParent IPluginExtension IPluginBase IPluginBase parentsParent IPluginExtension IPluginParent parentElement IPluginParent getParent parentElement CoreException
static I Menu Manager fill Context Menu PDE Form Page page final I Plugin Parent parent I Menu Manager manager boolean add Sibling Items boolean full Menu Menu Manager menu new Menu Manager PDE Plugin get Resource String POPUP NEW I Plugin Extension extension get Extension parent I Schema schema get Schema extension if schema null menu add new New Element Action null parent else add Items For Extension With Schema menu extension parent if add Sibling Items I Plugin Object parents Parent parent get Parent if parents Parent instanceof I Plugin Extension I Plugin Parent pparent I Plugin Parent parents Parent menu add new Separator add Items For Extension With Schema menu extension pparent manager add menu manager add new Separator if full Menu Action delete Action new Action PDE Plugin get Resource String POPUP DELETE public void run try I Plugin Object parents Parent parent get Parent if parent instanceof I Plugin Extension I Plugin Base plugin I Plugin Base parents Parent plugin remove I Plugin Extension parent else I Plugin Parent parent Element I Plugin Parent parent get Parent parent Element remove parent catch Core Exception e delete Action set Enabled page get Model is Editable manager add delete Action return menu  IMenuManager fillContextMenu PDEFormPage IPluginParent IMenuManager addSiblingItems fullMenu MenuManager MenuManager PDEPlugin getResourceString POPUP_NEW IPluginExtension getExtension ISchema getSchema NewElementAction addItemsForExtensionWithSchema addSiblingItems IPluginObject parentsParent getParent parentsParent IPluginExtension IPluginParent IPluginParent parentsParent addItemsForExtensionWithSchema fullMenu deleteAction PDEPlugin getResourceString POPUP_DELETE IPluginObject parentsParent getParent IPluginExtension IPluginBase IPluginBase parentsParent IPluginExtension IPluginParent parentElement IPluginParent getParent parentElement CoreException deleteAction setEnabled getModel isEditable deleteAction
static I Plugin Extension get Extension I Plugin Parent parent while parent null parent instanceof I Plugin Extension parent I Plugin Parent parent get Parent return I Plugin Extension parent  IPluginExtension getExtension IPluginParent IPluginExtension IPluginParent getParent IPluginExtension
private void handle Delete I Structured Selection sel I Structured Selection extension Tree get Selection if sel is Empty return for Iterator iter sel iterator iter has Next I Plugin Object object I Plugin Object iter next try if object instanceof I Plugin Element I Plugin Element ee I Plugin Element object I Plugin Parent parent I Plugin Parent ee get Parent parent remove ee else if object instanceof I Plugin Extension I Plugin Extension extension I Plugin Extension object I Plugin Base plugin extension get Plugin Base plugin remove extension catch Core Exception e PDE Plugin log Exception e  handleDelete IStructuredSelection IStructuredSelection extensionTree getSelection isEmpty hasNext IPluginObject IPluginObject IPluginElement IPluginElement IPluginElement IPluginParent IPluginParent getParent IPluginExtension IPluginExtension IPluginExtension IPluginBase getPluginBase CoreException PDEPlugin logException
Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard protected void finish Pressed Manifest Editor get Page get Editor ensure Plugin Context Presence super finish Pressed  WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell finishPressed ManifestEditor getPage getEditor ensurePluginContextPresence finishPressed
new Runnable public void run New Extension Wizard wizard new New Extension Wizard project I Plugin Model Base get Page get Model Manifest Editor get Page getPDE Editor Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard protected void finish Pressed Manifest Editor get Page get Editor ensure Plugin Context Presence super finish Pressed dialog create SWT Util set Dialog Size dialog 500 500 dialog open  NewExtensionWizard NewExtensionWizard IPluginModelBase getPage getModel ManifestEditor getPage getPDEEditor WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell finishPressed ManifestEditor getPage getEditor ensurePluginContextPresence finishPressed SWTUtil setDialogSize
private void handle New final I Project project get Page getPDE Editor get Common Project Busy Indicator show While extension Tree get Tree get Display new Runnable public void run New Extension Wizard wizard new New Extension Wizard project I Plugin Model Base get Page get Model Manifest Editor get Page getPDE Editor Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard protected void finish Pressed Manifest Editor get Page get Editor ensure Plugin Context Presence super finish Pressed dialog create SWT Util set Dialog Size dialog 500 500 dialog open  handleNew IProject getPage getPDEEditor getCommonProject BusyIndicator showWhile extensionTree getTree getDisplay NewExtensionWizard NewExtensionWizard IPluginModelBase getPage getModel ManifestEditor getPage getPDEEditor WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell finishPressed ManifestEditor getPage getEditor ensurePluginContextPresence finishPressed SWTUtil setDialogSize
new Runnable public void run Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create SWT Util set Dialog Size dialog 500 500 dialog open  WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell SWTUtil setDialogSize
private void handle Edit I Configuration Element element I Structured Selection selection I Project project get Page getPDE Editor get Common Project I Plugin Model Base model I Plugin Model Base get Page get Model try final I Extension Editor Wizard wizard I Extension Editor Wizard element create Executable Extension class NON NLS 1 wizard init project model selection Busy Indicator show While extension Tree get Tree get Display new Runnable public void run Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create SWT Util set Dialog Size dialog 500 500 dialog open catch Core Exception e PDE Plugin log Exception e  handleEdit IConfigurationElement IStructuredSelection IProject getPage getPDEEditor getCommonProject IPluginModelBase IPluginModelBase getPage getModel IExtensionEditorWizard IExtensionEditorWizard createExecutableExtension BusyIndicator showWhile extensionTree getTree getDisplay WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell SWTUtil setDialogSize CoreException PDEPlugin logException
new Runnable public void run Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create SWT Util set Dialog Size dialog 500 500 dialog open  WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell SWTUtil setDialogSize
private void handle Edit final I Structured Selection selection I Structured Selection extension Tree get Selection Array List editor Wizards get Editor Wizards selection if editor Wizards null return if editor Wizards size 1 open the wizard directly handle Edit I Configuration Element editor Wizards get 0 selection else I Project project get Page getPDE Editor get Common Project I Plugin Model Base model I Plugin Model Base get Page get Model final Extension Editor Wizard wizard new Extension Editor Wizard project model selection Busy Indicator show While extension Tree get Tree get Display new Runnable public void run Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create SWT Util set Dialog Size dialog 500 500 dialog open  handleEdit IStructuredSelection IStructuredSelection extensionTree getSelection ArrayList editorWizards getEditorWizards editorWizards editorWizards handleEdit IConfigurationElement editorWizards IProject getPage getPDEEditor getCommonProject IPluginModelBase IPluginModelBase getPage getModel ExtensionEditorWizard ExtensionEditorWizard BusyIndicator showWhile extensionTree getTree getDisplay WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell SWTUtil setDialogSize
private Array List get Editor Wizards I Structured Selection selection if selection size 1 return null Object obj selection get First Element String point Id null if obj instanceof I Plugin Extension point Id I Plugin Extension obj get Point else if obj instanceof I Plugin Element I Plugin Object parent I Plugin Element obj get Parent while parent null if parent instanceof I Plugin Extension point Id I Plugin Extension parent get Point break parent parent get Parent if point Id null return null if editor Wizards null load Extension Wizards return Array List editor Wizards get point Id  ArrayList getEditorWizards IStructuredSelection getFirstElement pointId IPluginExtension pointId IPluginExtension getPoint IPluginElement IPluginObject IPluginElement getParent IPluginExtension pointId IPluginExtension getPoint getParent pointId editorWizards loadExtensionWizards ArrayList editorWizards pointId
private void load Extension Wizards editor Wizards new Hashtable I Configuration Element elements Platform get Extension Registry get Configuration Elements For org eclipse pde ui new Extension NON NLS 1 for int i 0 i elements length i I Configuration Element element elements i if element get Name equals editor Wizard NON NLS 1 String point Id element get Attribute point NON NLS 1 if point Id null continue Array List list Array List editor Wizards get point Id if list null list new Array List editor Wizards put point Id list list add element  loadExtensionWizards editorWizards IConfigurationElement getExtensionRegistry getConfigurationElementsFor newExtension IConfigurationElement getName editorWizard pointId getAttribute pointId ArrayList ArrayList editorWizards pointId ArrayList editorWizards pointId
private boolean is Selection Editable I Structured Selection selection if get Page get Model is Editable return false return get Editor Wizards selection null  isSelectionEditable IStructuredSelection getPage getModel isEditable getEditorWizards
return get Editor Wizards selection null void handle Collapse All get Tree Part get Tree Viewer collapse All  getEditorWizards handleCollapseAll getTreePart getTreeViewer collapseAll
model add Model Changed Listener this new Extension Action new Action public void run handle New  addModelChangedListener newExtensionAction handleNew
new Extension Action set Enabled editable collapse All Action new Action public void run handle Collapse All  newExtensionAction setEnabled collapseAllAction handleCollapseAll
public void initialize I Plugin Model Base model extension Tree set Input model get Plugin Base select First Extension boolean editable model is Editable Tree Part tree Part get Tree Part tree Part set Button Enabled 0 editable tree Part set Button Enabled 1 false tree Part set Button Enabled 3 false tree Part set Button Enabled 4 false model add Model Changed Listener this new Extension Action new Action public void run handle New new Extension Action set Text PDE Plugin get Resource String POPUP NEW EXTENSION new Extension Action set Image Descriptor PDE Plugin Images DESC EXTENSION OBJ new Extension Action set Enabled editable collapse All Action new Action public void run handle Collapse All collapse All Action set Text PDE Plugin get Resource String POPUP COLLAPSE ALL  IPluginModelBase extensionTree setInput getPluginBase selectFirstExtension isEditable TreePart treePart getTreePart treePart setButtonEnabled treePart setButtonEnabled treePart setButtonEnabled treePart setButtonEnabled addModelChangedListener newExtensionAction handleNew newExtensionAction setText PDEPlugin getResourceString POPUP_NEW_EXTENSION newExtensionAction setImageDescriptor PDEPluginImages DESC_EXTENSION_OBJ newExtensionAction setEnabled collapseAllAction handleCollapseAll collapseAllAction setText PDEPlugin getResourceString POPUP_COLLAPSE_ALL
private void select First Extension Tree tree extension Tree get Tree Tree Item items tree get Items if items length 0 return Tree Item first Item items 0 Object obj first Item get Data extension Tree set Selection new Structured Selection obj  selectFirstExtension extensionTree getTree TreeItem getItems TreeItem firstItem firstItem getData extensionTree setSelection StructuredSelection
extension Tree set Selection new Structured Selection obj void fire Selection extension Tree set Selection extension Tree get Selection  extensionTree setSelection StructuredSelection fireSelection extensionTree setSelection extensionTree getSelection
public void initialize Images PDE Label Provider provider PDE Plugin get Default get Label Provider extension Image provider get PDE Plugin Images DESC EXTENSION OBJ generic Element Image provider get PDE Plugin Images DESC GENERIC XML OBJ  initializeImages PDELabelProvider PDEPlugin getDefault getLabelProvider extensionImage PDEPluginImages DESC_EXTENSION_OBJ genericElementImage PDEPluginImages DESC_GENERIC_XML_OBJ
public void refresh I Plugin Model Base model I Plugin Model Base get Page get Model extension Tree set Input model get Plugin Base select First Extension get Managed Form fire Selection Changed Extensions Section this extension Tree get Selection super refresh  IPluginModelBase IPluginModelBase getPage getModel extensionTree setInput getPluginBase selectFirstExtension getManagedForm fireSelectionChanged ExtensionsSection extensionTree getSelection
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event WORLD CHANGED mark Stale return Object change Object event get Changed Objects 0 if change Object instanceof I Plugin Base event get Change Type I Model Changed Event CHANGE event get Changed Property equals I Plugin Base P EXTENSION ORDER I Structured Selection sel I Structured Selection extension Tree get Selection I Plugin Extension extension I Plugin Extension sel get First Element extension Tree refresh extension Tree set Selection new Structured Selection extension return if change Object instanceof I Plugin Extension change Object instanceof I Plugin Element I Plugin Element change Object get Parent instanceof I Plugin Parent I Plugin Object pobj I Plugin Object change Object I Plugin Object parent change Object instanceof I Plugin Extension I Plugin Model Base get Page get Model get Plugin Base pobj get Parent if event get Change Type I Model Changed Event INSERT extension Tree add parent pobj extension Tree set Selection new Structured Selection change Object true extension Tree get Tree set Focus defect 16606 update property sheet async Resend Selection get Page get Selection else if event get Change Type I Model Changed Event REMOVE extension Tree remove pobj else if event get Changed Property equals I Plugin Parent P SIBLING ORDER I Structured Selection sel I Structured Selection extension Tree get Selection I Plugin Object child I Plugin Object sel get First Element extension Tree refresh child get Parent extension Tree set Selection new Structured Selection child else extension Tree update change Object null if extension Tree get Tree is Focus Control I Selection sel get Form Page get Selection if sel null sel instanceof I Structured Selection I Structured Selection ssel I Structured Selection sel if ssel is Empty ssel get First Element equals change Object update property sheet async Resend Selection sel  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale changeObject getChangedObjects changeObject IPluginBase getChangeType IModelChangedEvent getChangedProperty IPluginBase P_EXTENSION_ORDER IStructuredSelection IStructuredSelection extensionTree getSelection IPluginExtension IPluginExtension getFirstElement extensionTree extensionTree setSelection StructuredSelection changeObject IPluginExtension changeObject IPluginElement IPluginElement changeObject getParent IPluginParent IPluginObject IPluginObject changeObject IPluginObject changeObject IPluginExtension IPluginModelBase getPage getModel getPluginBase getParent getChangeType IModelChangedEvent extensionTree extensionTree setSelection StructuredSelection changeObject extensionTree getTree setFocus asyncResendSelection getPage getSelection getChangeType IModelChangedEvent extensionTree getChangedProperty IPluginParent P_SIBLING_ORDER IStructuredSelection IStructuredSelection extensionTree getSelection IPluginObject IPluginObject getFirstElement extensionTree getParent extensionTree setSelection StructuredSelection extensionTree changeObject extensionTree getTree isFocusControl ISelection getFormPage getSelection IStructuredSelection IStructuredSelection IStructuredSelection isEmpty getFirstElement changeObject asyncResendSelection
private Image resolve Object Image Object obj if obj instanceof I Plugin Extension return extension Image Image element Image generic Element Image if obj instanceof I Plugin Element I Plugin Element element I Plugin Element obj Image custom Image get Custom Image element if custom Image null element Image custom Image String body Text element get Text boolean has Body Text body Text null body Text length 0 if has Body Text element Image PDE Plugin get Default get Label Provider get element Image PDE Label Provider F EDIT return element Image  resolveObjectImage IPluginExtension extensionImage elementImage genericElementImage IPluginElement IPluginElement IPluginElement customImage getCustomImage customImage elementImage customImage bodyText getText hasBodyText bodyText bodyText hasBodyText elementImage PDEPlugin getDefault getLabelProvider elementImage PDELabelProvider F_EDIT elementImage
static Image get Custom Image I Plugin Element element if is Storage Model element return null I Schema Element element Info get Schema Element element if element Info null element Info get Icon Property null String icon Property element Info get Icon Property I Plugin Attribute att element get Attribute icon Property String icon Path null if att null att get Value null icon Path att get Value if icon Path null OK we have an icon path relative to the plug in return get Image From Plugin element icon Path return null  getCustomImage IPluginElement isStorageModel ISchemaElement elementInfo getSchemaElement elementInfo elementInfo getIconProperty iconProperty elementInfo getIconProperty IPluginAttribute getAttribute iconProperty iconPath getValue iconPath getValue iconPath getImageFromPlugin iconPath
return null private static boolean is Storage Model I Plugin Object object I Plugin Model Base model Base object get Plugin Model return model Base get Install Location null  isStorageModel IPluginObject IPluginModelBase modelBase getPluginModel modelBase getInstallLocation
private static Image get Image From Plugin I Plugin Element element String icon Path Name I Plugin Model Base model element get Plugin Model if model null return null 39283 ignore icon paths that point at plugin properties if icon Path Name starts With NON NLS 1 return null URL modelURL null String path model get Install Location I Resource resource model get Underlying Resource if resource null I Path real Path resource get Location remove Last Segments 1 path real Path toOS String try if path starts With file NON NLS 1 path file path NON NLS 1 modelURL new URL path File separator return PDE Plugin get Default get Label Provider get Image FromURL modelURL icon Path Name catch MalformedURL Exception e return null  getImageFromPlugin IPluginElement iconPathName IPluginModelBase getPluginModel iconPathName startsWith getInstallLocation IResource getUnderlyingResource IPath realPath getLocation removeLastSegments realPath toOSString startsWith PDEPlugin getDefault getLabelProvider getImageFromURL iconPathName MalformedURLException
private String resolve Object Name Object obj return resolve Object Name get Schema Registry plugin Info Registry obj  resolveObjectName resolveObjectName getSchemaRegistry pluginInfoRegistry
private Schema Registry get Schema Registry if schema Registry null schema Registry PDE Core get Default get Schema Registry return schema Registry  SchemaRegistry getSchemaRegistry schemaRegistry schemaRegistry PDECore getDefault getSchemaRegistry schemaRegistry
public static String resolve Object Name Schema Registry schema Registry External Model Manager plugin Info Registry Object obj boolean full Names PDE Plugin is Full Name Mode Enabled if obj instanceof I Plugin Extension I Plugin Extension extension I Plugin Extension obj if full Names return extension get Point if extension get Name null return extension get Translated Name I Schema schema schema Registry get Schema extension get Point try extension point schema definition if schema null exists return schema get Name return extension get Point else if obj instanceof I Plugin Element I Plugin Element element I Plugin Element obj String base Name element get Name String full Name null I Schema Element element Info get Schema Element element I Plugin Attribute label Att null if element Info null element Info get Label Property null label Att element get Attribute element Info get Label Property if label Att null try some hard coded attributes that are used frequently for int i 0 i COMMON LABEL PROPERTIES length i label Att element get Attribute COMMON LABEL PROPERTIES i if label Att null break if label Att null Last try if there is only one attribute use that if element get Attribute Count 1 label Att element get Attributes 0 if label Att null label Att get Value null full Name strip Shortcuts label Att get Value full Name element get Resource String full Name if full Names return full Name null full Name base Name else return full Name null full Name base Name NON NLS 1 NON NLS 2 base Name return obj to String  resolveObjectName SchemaRegistry schemaRegistry ExternalModelManager pluginInfoRegistry fullNames PDEPlugin isFullNameModeEnabled IPluginExtension IPluginExtension IPluginExtension fullNames getPoint getName getTranslatedName ISchema schemaRegistry getSchema getPoint getName getPoint IPluginElement IPluginElement IPluginElement baseName getName fullName ISchemaElement elementInfo getSchemaElement IPluginAttribute labelAtt elementInfo elementInfo getLabelProperty labelAtt getAttribute elementInfo getLabelProperty labelAtt COMMON_LABEL_PROPERTIES labelAtt getAttribute COMMON_LABEL_PROPERTIES labelAtt labelAtt getAttributeCount labelAtt getAttributes labelAtt labelAtt getValue fullName stripShortcuts labelAtt getValue fullName getResourceString fullName fullNames fullName fullName baseName fullName fullName baseName baseName toString
return obj to String public void set Focus if extension Tree null extension Tree get Tree set Focus  toString setFocus extensionTree extensionTree getTree setFocus
public static String strip Shortcuts String input String Buffer output new String Buffer for int i 0 i input length i char c input char At i if c continue else if c break output append c return output to String  stripShortcuts StringBuffer StringBuffer charAt toString
protected boolean can Paste Object target Object objects if objects 0 instanceof I Plugin Extension return true if objects 0 instanceof I Plugin Element target instanceof I Plugin Parent return true return false  canPaste IPluginExtension IPluginElement IPluginParent
protected void do Paste Object target Object objects I Plugin Model Base model I Plugin Model Base get Page get Model I Plugin Base plugin model get Plugin Base try for int i 0 i objects length i Object obj objects i if obj instanceof I Plugin Extension I Plugin Extension extension I Plugin Extension obj plugin add extension Plugin Parent extension reconnect else if obj instanceof I Plugin Element target instanceof I Plugin Parent I Plugin Element element I Plugin Element obj I Plugin Parent target add element if element instanceof Plugin Parent Plugin Parent element reconnect catch Core Exception e PDE Plugin log Exception e  doPaste IPluginModelBase IPluginModelBase getPage getModel IPluginBase getPluginBase IPluginExtension IPluginExtension IPluginExtension PluginParent IPluginElement IPluginParent IPluginElement IPluginElement IPluginParent PluginParent PluginParent CoreException PDEPlugin logException
private void handle Move boolean up I Structured Selection sel I Structured Selection extension Tree get Selection I Plugin Object object I Plugin Object sel get First Element if object instanceof I Plugin Element I Plugin Parent parent I Plugin Parent object get Parent I Plugin Object children parent get Children int index parent get Index Of object int new Index up index 1 index 1 I Plugin Object child2 children new Index try parent swap object child2 catch Core Exception e PDE Plugin log Exception e else if object instanceof I Plugin Extension I Plugin Extension extension I Plugin Extension object I Plugin Base plugin I Plugin Base extension get Plugin Base I Plugin Extension extensions plugin get Extensions int index plugin get Index Of extension int new Index up index 1 index 1 I Plugin Extension e2 extensions new Index try plugin swap extension e2 catch Core Exception e PDE Plugin log Exception e  handleMove IStructuredSelection IStructuredSelection extensionTree getSelection IPluginObject IPluginObject getFirstElement IPluginElement IPluginParent IPluginParent getParent IPluginObject getChildren getIndexOf newIndex IPluginObject newIndex CoreException PDEPlugin logException IPluginExtension IPluginExtension IPluginExtension IPluginBase IPluginBase getPluginBase IPluginExtension getExtensions getIndexOf newIndex IPluginExtension newIndex CoreException PDEPlugin logException
private void update Up Down Buttons Object item if get Page get Model is Editable false return boolean up Enabled false boolean down Enabled false if item null if item instanceof I Plugin Element I Plugin Element element I Plugin Element item I Plugin Parent parent I Plugin Parent element get Parent check up int index parent get Index Of element if index 0 up Enabled true if index parent get Child Count 1 down Enabled true else if item instanceof I Plugin Extension I Plugin Extension extension I Plugin Extension item I Extensions extensions I Extensions extension get Parent int index extensions get Index Of extension int size extensions get Extensions length if index 0 up Enabled true if index size 1 down Enabled true get Tree Part set Button Enabled 3 up Enabled get Tree Part set Button Enabled 4 down Enabled  updateUpDownButtons getPage getModel isEditable upEnabled downEnabled IPluginElement IPluginElement IPluginElement IPluginParent IPluginParent getParent getIndexOf upEnabled getChildCount downEnabled IPluginExtension IPluginExtension IPluginExtension IExtensions IExtensions getParent getIndexOf getExtensions upEnabled downEnabled getTreePart setButtonEnabled upEnabled getTreePart setButtonEnabled downEnabled

private Combo Part f Match Combo param page param parent param style public General Info Section PDE Form Page page Composite parent super page parent Section DESCRIPTION create Client get Section page get Editor get Toolkit  ComboPart fMatchCombo GeneralInfoSection PDEFormPage createClient getSection getEditor getToolkit
protected void create Client Section section Form Toolkit toolkit section set Text PDE Plugin get Resource String Manifest Editor Plugin Spec Section title NON NLS 1 Table Wrap Data td new Table Wrap Data Table Wrap Data FILL Table Wrap Data TOP td grab Horizontal true section set Layout Data td if is Fragment section set Description PDE Plugin get Resource String Manifest Editor Plugin Spec Section fdesc NON NLS 1 else section set Description PDE Plugin get Resource String Manifest Editor Plugin Spec Section desc NON NLS 1 Composite client toolkit create Composite section Grid Layout layout new Grid Layout layout margin Width toolkit get Border Style SWT NULL 0 2 if is Fragment layout num Columns 2 else layout num Columns 3 client set Layout layout section set Client client I Action Bars action Bars get Page getPDE Editor get Editor Site get Action Bars createID Entry client toolkit action Bars create Version Entry client toolkit action Bars create Name Entry client toolkit action Bars create Provider Entry client toolkit action Bars if is Fragment create PluginID Entry client toolkit action Bars create Plugin Version Entry client toolkit action Bars create Match Combo client toolkit action Bars if is Bundle Mode f Match Label set Visible false f Match Combo get Control set Visible false else create Class Entry client toolkit action Bars toolkit paint Borders For client I Base Model model get Page get Model if model instanceof I Model Change Provider I Model Change Provider model add Model Changed Listener this Input Context Manager manager get Page getPDE Editor get Context Manager manager add Input Context Listener this  createClient FormToolkit setText PDEPlugin getResourceString ManifestEditor PluginSpecSection TableWrapData TableWrapData TableWrapData TableWrapData grabHorizontal setLayoutData isFragment setDescription PDEPlugin getResourceString ManifestEditor PluginSpecSection setDescription PDEPlugin getResourceString ManifestEditor PluginSpecSection createComposite GridLayout GridLayout marginWidth getBorderStyle isFragment numColumns numColumns setLayout setClient IActionBars actionBars getPage getPDEEditor getEditorSite getActionBars createIDEntry actionBars createVersionEntry actionBars createNameEntry actionBars createProviderEntry actionBars isFragment createPluginIDEntry actionBars createPluginVersionEntry actionBars createMatchCombo actionBars isBundleMode fMatchLabel setVisible fMatchCombo getControl setVisible createClassEntry actionBars paintBordersFor IBaseModel getPage getModel IModelChangeProvider IModelChangeProvider addModelChangedListener InputContextManager getPage getPDEEditor getContextManager addInputContextListener
public String get Context Id if get Plugin Base instanceof I Bundle Plugin Base return Bundle Input Context CONTEXT ID return Plugin Input Context CONTEXT ID  getContextId getPluginBase IBundlePluginBase BundleInputContext CONTEXT_ID PluginInputContext CONTEXT_ID
return Plugin Input Context CONTEXT ID private I Plugin Base get Plugin Base I Base Model model get Page getPDE Editor get Aggregate Model return I Plugin Model Base model get Plugin Base  PluginInputContext CONTEXT_ID IPluginBase getPluginBase IBaseModel getPage getPDEEditor getAggregateModel IPluginModelBase getPluginBase
private void createID Entry Composite client Form Toolkit toolkit I Action Bars action Bars f Id Entry new Form Entry client toolkit PDE Plugin get Resource String General Info Section id null false NON NLS 1 f Id Entry set Form Entry Listener new Form Entry Adapter this action Bars public void text Value Changed Form Entry entry try get Plugin Base set Id entry get Value catch Core Exception e PDE Plugin log Exception e f Id Entry set Editable is Editable  createIDEntry FormToolkit IActionBars actionBars fIdEntry FormEntry PDEPlugin getResourceString GeneralInfoSection fIdEntry setFormEntryListener FormEntryAdapter actionBars textValueChanged FormEntry getPluginBase setId getValue CoreException PDEPlugin logException fIdEntry setEditable isEditable
private void create Version Entry Composite client Form Toolkit toolkit I Action Bars action Bars f Version Entry new Form Entry client toolkit PDE Plugin get Resource String General Info Section version null false NON NLS 1 f Version Entry set Form Entry Listener new Form Entry Adapter this action Bars public void text Value Changed Form Entry entry try get Plugin Base set Version entry get Value catch Core Exception e PDE Plugin log Exception e f Version Entry set Editable is Editable  createVersionEntry FormToolkit IActionBars actionBars fVersionEntry FormEntry PDEPlugin getResourceString GeneralInfoSection fVersionEntry setFormEntryListener FormEntryAdapter actionBars textValueChanged FormEntry getPluginBase setVersion getValue CoreException PDEPlugin logException fVersionEntry setEditable isEditable
private void create Name Entry Composite client Form Toolkit toolkit I Action Bars action Bars f Name Entry new Form Entry client toolkit PDE Plugin get Resource String General Info Section name null false NON NLS 1 f Name Entry set Form Entry Listener new Form Entry Adapter this action Bars public void text Value Changed Form Entry entry try get Plugin Base set Name entry get Value catch Core Exception e PDE Plugin log Exception e f Name Entry set Editable is Editable  createNameEntry FormToolkit IActionBars actionBars fNameEntry FormEntry PDEPlugin getResourceString GeneralInfoSection fNameEntry setFormEntryListener FormEntryAdapter actionBars textValueChanged FormEntry getPluginBase setName getValue CoreException PDEPlugin logException fNameEntry setEditable isEditable
private void create Provider Entry Composite client Form Toolkit toolkit I Action Bars action Bars f Provider Entry new Form Entry client toolkit PDE Plugin get Resource String General Info Section provider null NON NLS 1 false f Provider Entry set Form Entry Listener new Form Entry Adapter this action Bars public void text Value Changed Form Entry entry try get Plugin Base set Provider Name entry get Value catch Core Exception e PDE Plugin log Exception e f Provider Entry set Editable is Editable  createProviderEntry FormToolkit IActionBars actionBars fProviderEntry FormEntry PDEPlugin getResourceString GeneralInfoSection fProviderEntry setFormEntryListener FormEntryAdapter actionBars textValueChanged FormEntry getPluginBase setProviderName getValue CoreException PDEPlugin logException fProviderEntry setEditable isEditable
private void create Class Entry Composite client Form Toolkit toolkit I Action Bars action Bars boolean editable get Page get Model is Editable f Class Entry new Form Entry client toolkit PDE Plugin get Resource String General Info Section class PDE Plugin get Resource String General Info Section browse NON NLS 1 NON NLS 2 editable f Class Entry set Form Entry Listener new Form Entry Adapter this action Bars public void text Value Changed Form Entry entry try I Plugin get Plugin Base set Class Name entry get Value catch Core Exception e PDE Plugin log Exception e public void link Activated Hyperlink Event e String value f Class Entry get Value value trim Non Alpha Chars value if value length 0 does Class Exist value do Open Class else Java Attribute Value java Att Val create Java Attribute Value Java Attribute Wizard wizard new Java Attribute Wizard java Att Val Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create SWT Util set Dialog Size dialog 400 500 int result dialog open if result Wizard Dialog OK String new Value wizard get Class Name With Args f Class Entry set Value new Value public void browse Button Selected Form Entry entry do Open Selection Dialog f Class Entry set Editable is Editable  createClassEntry FormToolkit IActionBars actionBars getPage getModel isEditable fClassEntry FormEntry PDEPlugin getResourceString GeneralInfoSection PDEPlugin getResourceString GeneralInfoSection fClassEntry setFormEntryListener FormEntryAdapter actionBars textValueChanged FormEntry IPlugin getPluginBase setClassName getValue CoreException PDEPlugin logException linkActivated HyperlinkEvent fClassEntry getValue trimNonAlphaChars doesClassExist doOpenClass JavaAttributeValue javaAttVal createJavaAttributeValue JavaAttributeWizard JavaAttributeWizard javaAttVal WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell SWTUtil setDialogSize WizardDialog newValue getClassNameWithArgs fClassEntry setValue newValue browseButtonSelected FormEntry doOpenSelectionDialog fClassEntry setEditable isEditable
private String trim Non Alpha Chars String value value value trim while value length 0 Character is Letter value char At 0 value value substring 1 value length int loc value index Of NON NLS 1 if loc 1 loc 0 value value substring 0 loc else if loc 0 value NON NLS 1 return value  trimNonAlphaChars isLetter charAt indexOf
private boolean does Class Exist String class Name I Project project get Page getPDE Editor get Common Project String path class Name replace java NON NLS 1 try if project has Nature Java Core NATURE ID I Java Project java Project Java Core create project I Java Element result java Project find Element new Path path return result null else I Resource resource project find Member new Path path return resource null catch Java Model Exception e return false catch Core Exception e return false  doesClassExist className IProject getPage getPDEEditor getCommonProject className hasNature JavaCore NATURE_ID IJavaProject javaProject JavaCore IJavaElement javaProject findElement IResource findMember JavaModelException CoreException
private Java Attribute Value create Java Attribute Value I Project project get Page getPDE Editor get Common Project I Plugin Model Base model I Plugin Model Base get Page get Model String value f Class Entry get Value return new Java Attribute Value project model null value  JavaAttributeValue createJavaAttributeValue IProject getPage getPDEEditor getCommonProject IPluginModelBase IPluginModelBase getPage getModel fClassEntry getValue JavaAttributeValue
private void create PluginID Entry Composite parent Form Toolkit toolkit I Action Bars action Bars Hyperlink link toolkit create Hyperlink parent PDE Plugin get Resource String General Info Section plugin Id NON NLS 1 SWT NULL link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e Manifest Editor open Plugin Editor f Plugin Id Text get Text Composite client toolkit create Composite parent Grid Layout layout new Grid Layout layout margin Width layout margin Height 0 layout make Columns Equal Width false layout num Columns 2 client set Layout layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 1 client set Layout Data gd f Plugin Id Text toolkit create Text client SWT SINGLE NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 20 f Plugin Id Text set Layout Data gd f Plugin Id Text set Editable is Editable f Plugin Id Text add Modify Listener new Modify Listener public void modify Text Modify Event e try if I Fragment get Plugin Base get Plugin Id equals f Plugin Id Text get Text I Fragment get Plugin Base set Plugin Id f Plugin Id Text get Text catch Core Exception e1 PDE Plugin log Exception e1 Button button toolkit create Button client PDE Plugin get Resource String General Info Section browse SWT PUSH NON NLS 1 button add Selection Listener new Selection Adapter public void widget Selected Selection Event e Plugin Selection Dialog dialog new Plugin Selection Dialog get Section get Shell false false dialog create if dialog open Plugin Selection Dialog OK try I Plugin Model model I Plugin Model dialog get First Result I Plugin plugin model get Plugin f Plugin Id Text set Text plugin get Id I Fragment get Plugin Base set Plugin Id plugin get Id f Plugin Version Entry set Value plugin get Version true I Fragment get Plugin Base set Plugin Version plugin get Version catch Core Exception e1 PDE Plugin log Exception e1 button set Enabled is Editable  createPluginIDEntry FormToolkit IActionBars actionBars createHyperlink PDEPlugin getResourceString GeneralInfoSection pluginId addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent ManifestEditor openPluginEditor fPluginIdText getText createComposite GridLayout GridLayout marginWidth marginHeight makeColumnsEqualWidth numColumns setLayout GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData fPluginIdText createText GridData GridData FILL_HORIZONTAL widthHint fPluginIdText setLayoutData fPluginIdText setEditable isEditable fPluginIdText addModifyListener ModifyListener modifyText ModifyEvent IFragment getPluginBase getPluginId fPluginIdText getText IFragment getPluginBase setPluginId fPluginIdText getText CoreException PDEPlugin logException createButton PDEPlugin getResourceString GeneralInfoSection addSelectionListener SelectionAdapter widgetSelected SelectionEvent PluginSelectionDialog PluginSelectionDialog getSection getShell PluginSelectionDialog IPluginModel IPluginModel getFirstResult IPlugin getPlugin fPluginIdText setText getId IFragment getPluginBase setPluginId getId fPluginVersionEntry setValue getVersion IFragment getPluginBase setPluginVersion getVersion CoreException PDEPlugin logException setEnabled isEditable
private void create Plugin Version Entry Composite client Form Toolkit toolkit I Action Bars action Bars f Plugin Version Entry new Form Entry client toolkit PDE Plugin get Resource String General Info Section plugin Version null false NON NLS 1 f Plugin Version Entry set Form Entry Listener new Form Entry Adapter this action Bars public void text Value Changed Form Entry entry try I Fragment get Plugin Base set Plugin Version entry get Value catch Core Exception e PDE Plugin log Exception e f Plugin Version Entry set Editable is Editable  createPluginVersionEntry FormToolkit IActionBars actionBars fPluginVersionEntry FormEntry PDEPlugin getResourceString GeneralInfoSection pluginVersion fPluginVersionEntry setFormEntryListener FormEntryAdapter actionBars textValueChanged FormEntry IFragment getPluginBase setPluginVersion getValue CoreException PDEPlugin logException fPluginVersionEntry setEditable isEditable
private void create Match Combo Composite client Form Toolkit toolkit I Action Bars action Bars f Match Label toolkit create Label client PDE Plugin get Resource String KEY MATCH f Match Label set Foreground toolkit get Colors get Color Form Colors TITLE f Match Combo new Combo Part f Match Combo create Control client toolkit SWT READ ONLY Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd width Hint 20 gd grab Excess Horizontal Space true f Match Combo get Control set Layout Data gd String items new String NON NLS 1 PDE Plugin get Resource String KEY MATCH EQUIVALENT PDE Plugin get Resource String KEY MATCH COMPATIBLE PDE Plugin get Resource String KEY MATCH PERFECT PDE Plugin get Resource String KEY MATCH GREATER f Match Combo set Items items f Match Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event event int match f Match Combo get Selection Index try I Fragment get Plugin Base set Rule match catch Core Exception e PDE Plugin log Exception e f Match Combo get Control set Enabled is Editable  createMatchCombo FormToolkit IActionBars actionBars fMatchLabel createLabel PDEPlugin getResourceString KEY_MATCH fMatchLabel setForeground getColors getColor FormColors fMatchCombo ComboPart fMatchCombo createControl READ_ONLY GridData GridData GridData HORIZONTAL_ALIGN_FILL widthHint grabExcessHorizontalSpace fMatchCombo getControl setLayoutData PDEPlugin getResourceString KEY_MATCH_EQUIVALENT PDEPlugin getResourceString KEY_MATCH_COMPATIBLE PDEPlugin getResourceString KEY_MATCH_PERFECT PDEPlugin getResourceString KEY_MATCH_GREATER fMatchCombo setItems fMatchCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent fMatchCombo getSelectionIndex IFragment getPluginBase setRule CoreException PDEPlugin logException fMatchCombo getControl setEnabled isEditable
public void commit boolean on Save f Id Entry commit f Name Entry commit f Provider Entry commit if is Fragment f Plugin Version Entry commit else f Class Entry commit super commit on Save  onSave fIdEntry fNameEntry fProviderEntry isFragment fPluginVersionEntry fClassEntry onSave
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED mark Stale return refresh if e get Change Type I Model Changed Event CHANGE Object obj e get Changed Objects 0 if obj instanceof I Plugin Base String property e get Changed Property if property null property equals get Page getPDE Editor get Title Property get Page getPDE Editor update Title  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale getChangeType IModelChangedEvent getChangedObjects IPluginBase getChangedProperty getPage getPDEEditor getTitleProperty getPage getPDEEditor updateTitle
public void refresh I Plugin Model Base model I Plugin Model Base get Page getPDE Editor get Context Manager get Aggregate Model I Plugin Base plugin Base model get Plugin Base f Id Entry set Value plugin Base get Id true f Name Entry set Value plugin Base get Name true f Version Entry set Value plugin Base get Version true f Provider Entry set Value plugin Base get Provider Name true if is Fragment I Fragment fragment I Fragment plugin Base f Plugin Id Text set Text fragment get Plugin Id f Plugin Version Entry set Value fragment get Plugin Version true if is Bundle Mode f Match Combo select fragment get Rule else I Plugin plugin I Plugin plugin Base f Class Entry set Value plugin get Class Name true get Page getPDE Editor update Title super refresh  IPluginModelBase IPluginModelBase getPage getPDEEditor getContextManager getAggregateModel IPluginBase pluginBase getPluginBase fIdEntry setValue pluginBase getId fNameEntry setValue pluginBase getName fVersionEntry setValue pluginBase getVersion fProviderEntry setValue pluginBase getProviderName isFragment IFragment IFragment pluginBase fPluginIdText setText getPluginId fPluginVersionEntry setValue getPluginVersion isBundleMode fMatchCombo getRule IPlugin IPlugin pluginBase fClassEntry setValue getClassName getPage getPDEEditor updateTitle
public void cancel Edit f Id Entry cancel Edit f Name Entry cancel Edit f Version Entry cancel Edit f Provider Entry cancel Edit if is Fragment f Plugin Version Entry cancel Edit else f Class Entry cancel Edit super cancel Edit  cancelEdit fIdEntry cancelEdit fNameEntry cancelEdit fVersionEntry cancelEdit fProviderEntry cancelEdit isFragment fPluginVersionEntry cancelEdit fClassEntry cancelEdit cancelEdit
public void dispose I Base Model model get Page get Model if model instanceof I Model Change Provider I Model Change Provider model remove Model Changed Listener this Input Context Manager manager get Page getPDE Editor get Context Manager if manager null manager remove Input Context Listener this super dispose  IBaseModel getPage getModel IModelChangeProvider IModelChangeProvider removeModelChangedListener InputContextManager getPage getPDEEditor getContextManager removeInputContextListener
private void do Open Class String name f Class Entry get Text get Text name trim Non Alpha Chars name I Project project get Page getPDE Editor get Common Project String path name replace java NON NLS 1 try if project has Nature Java Core NATURE ID I Java Project java Project Java Core create project I Java Element result java Project find Element new Path path JavaUI open In Editor result else I Resource resource project find Member new Path path if resource null resource instanceof I File I Workbench Page page PDE Plugin get Active Page IDE open Editor page I File resource true catch Part Init Exception e PDE Plugin log Exception e catch Java Model Exception e nothing Display get Current beep catch Core Exception e PDE Plugin log Exception e  doOpenClass fClassEntry getText getText trimNonAlphaChars IProject getPage getPDEEditor getCommonProject hasNature JavaCore NATURE_ID IJavaProject javaProject JavaCore IJavaElement javaProject findElement openInEditor IResource findMember IFile IWorkbenchPage PDEPlugin getActivePage openEditor IFile PartInitException PDEPlugin logException JavaModelException getCurrent CoreException PDEPlugin logException
private void do Open Selection Dialog try Shell shell PDE Plugin get Active Workbench Shell I Resource resource get Plugin Base get Model get Underlying Resource I Project project resource null null resource get Project if project null Selection Dialog dialog JavaUI create Type Dialog shell PlatformUI get Workbench get Progress Service get Search Scope project I Java Element Search Constants CONSIDER CLASSES false NON NLS 1 dialog set Title PDE Plugin get Resource String General Info Section selection Title NON NLS 1 if dialog open Selection Dialog OK I Type type I Type dialog get Result 0 f Class Entry set Value type get Fully Qualified Name catch Core Exception e  doOpenSelectionDialog PDEPlugin getActiveWorkbenchShell IResource getPluginBase getModel getUnderlyingResource IProject getProject SelectionDialog createTypeDialog getWorkbench getProgressService getSearchScope IJavaElementSearchConstants CONSIDER_CLASSES setTitle PDEPlugin getResourceString GeneralInfoSection selectionTitle SelectionDialog IType IType getResult fClassEntry setValue getFullyQualifiedName CoreException
private I Java Search Scope get Search Scope I Project project I Java Project j Project Java Core create project return Search Engine create Java Search Scope get Direct Roots j Project  IJavaSearchScope getSearchScope IProject IJavaProject jProject JavaCore SearchEngine createJavaSearchScope getDirectRoots jProject
private I Package Fragment Root get Direct Roots I Java Project project Array List result new Array List try I Package Fragment Root roots project get Package Fragment Roots for int i 0 i roots length i if roots i get Kind I Package Fragment Root K SOURCE roots i is Archive roots i is External result add roots i catch Java Model Exception e return I Package Fragment Root result to Array new I Package Fragment Root result size  IPackageFragmentRoot getDirectRoots IJavaProject ArrayList ArrayList IPackageFragmentRoot getPackageFragmentRoots getKind IPackageFragmentRoot K_SOURCE isArchive isExternal JavaModelException IPackageFragmentRoot toArray IPackageFragmentRoot
private boolean is Fragment I Plugin Model Base model I Plugin Model Base get Page getPDE Editor get Context Manager get Aggregate Model return model is Fragment Model  isFragment IPluginModelBase IPluginModelBase getPage getPDEEditor getContextManager getAggregateModel isFragmentModel
see org eclipse pde internal ui editor context I Input Context Listener context Added org eclipse pde internal ui editor context Input Context public void context Added Input Context context if context get Id equals Bundle Input Context CONTEXT ID bundle Mode Changed I Bundle Model context get Model true  IInputContextListener contextAdded InputContext contextAdded InputContext getId BundleInputContext CONTEXT_ID bundleModeChanged IBundleModel getModel
see org eclipse pde internal ui editor context I Input Context Listener context Removed org eclipse pde internal ui editor context Input Context public void context Removed Input Context context if context get Id equals Bundle Input Context CONTEXT ID bundle Mode Changed I Bundle Model context get Model false  IInputContextListener contextRemoved InputContext contextRemoved InputContext getId BundleInputContext CONTEXT_ID bundleModeChanged IBundleModel getModel
private void bundle Mode Changed I Bundle Model model boolean added if f Match Combo null f Match Label set Visible added f Match Combo get Control set Visible added  bundleModeChanged IBundleModel fMatchCombo fMatchLabel setVisible fMatchCombo getControl setVisible
private boolean is Bundle Mode Input Context Manager icm get Page getPDE Editor get Context Manager return icm find Context Bundle Input Context CONTEXT ID null  isBundleMode InputContextManager getPage getPDEEditor getContextManager findContext BundleInputContext CONTEXT_ID
see org eclipse pde internal ui editor context I Input Context Listener monitored File Added org eclipse core resources I File public void monitored File Added I File monitored File  IInputContextListener monitoredFileAdded IFile monitoredFileAdded IFile monitoredFile
see org eclipse pde internal ui editor context I Input Context Listener monitored File Removed org eclipse core resources I File public boolean monitored File Removed I File monitored File return false  IInputContextListener monitoredFileRemoved IFile monitoredFileRemoved IFile monitoredFile
public boolean can Paste Clipboard clipboard Display d get Section get Display Control c d get Focus Control if c instanceof Text return true return false  canPaste getSection getDisplay getFocusControl

param accepted Types The types accepted by the validator param allow Multiple Selection If set to code true code the validator allows multiple selection public Jar Selection Validator Class accepted Types boolean allow Multiple Selection Assert is Not Null accepted Types f Accepted Types accepted Types f Allow Multiple Selection allow Multiple Selection  acceptedTypes allowMultipleSelection JarSelectionValidator acceptedTypes allowMultipleSelection isNotNull acceptedTypes fAcceptedTypes acceptedTypes fAllowMultipleSelection allowMultipleSelection
public I Status validate Object elements if is Valid Selection elements return new Status I Status OK PDE Plugin get Plugin Id I Status OK NON NLS 1 null return new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR NON NLS 1 null  IStatus isValidSelection IStatus PDEPlugin getPluginId IStatus IStatus PDEPlugin getPluginId IStatus
private boolean is Valid Selection Object selection if selection length 0 return false if f Allow Multiple Selection selection length 1 return false for int i 0 i selection length i Object o selection i if is Valid o return false return true  isValidSelection fAllowMultipleSelection isValid
public boolean is Valid Object element for int i 0 i f Accepted Types length i if f Accepted Types i is Instance element return true return false  isValid fAcceptedTypes fAcceptedTypes isInstance

public Java Attribute Value I Project project I Plugin Model Base model I Schema Attribute att Info String class Name super project class Name this att Info att Info this model model  JavaAttributeValue IProject IPluginModelBase ISchemaAttribute attInfo className className attInfo attInfo
this model model public I Schema Attribute get Attribute Info return att Info  ISchemaAttribute getAttributeInfo attInfo
return att Info public I Plugin Model Base get Model return model  attInfo IPluginModelBase getModel
return model public String get Class Name return get String Value  getClassName getStringValue

private Java Attribute Wizard Page main Page private static String STORE SECTION Java Attribute Wizard NON NLS 1 public Java Attribute Wizard Java Attribute Value value this value get Project value get Model value get Attribute Info value get Class Name  JavaAttributeWizardPage mainPage STORE_SECTION JavaAttributeWizard JavaAttributeWizard JavaAttributeValue getProject getModel getAttributeInfo getClassName
public Java Attribute Wizard I Project project I Plugin Model Base model I Schema Attribute att Info String class Name this class Name class Name this model model this project project this att Info att Info set Default Page Image Descriptor PDE Plugin Images DESC NEWPPRJ WIZ I Dialog Settings master Settings PDE Plugin get Default get Dialog Settings set Dialog Settings get Settings Section master Settings set Window Title PDE Plugin get Resource String Java Attribute Wizard wtitle NON NLS 1 set Needs Progress Monitor true  JavaAttributeWizard IProject IPluginModelBase ISchemaAttribute attInfo className className className attInfo attInfo setDefaultPageImageDescriptor PDEPluginImages DESC_NEWPPRJ_WIZ IDialogSettings masterSettings PDEPlugin getDefault getDialogSettings setDialogSettings getSettingsSection masterSettings setWindowTitle PDEPlugin getResourceString JavaAttributeWizard setNeedsProgressMonitor
private I Dialog Settings get Settings Section I Dialog Settings master I Dialog Settings setting master get Section STORE SECTION if setting null setting master add New Section STORE SECTION return setting  IDialogSettings getSettingsSection IDialogSettings IDialogSettings getSection STORE_SECTION addNewSection STORE_SECTION
public void add Pages main Page new Java Attribute Wizard Page project model att Info class Name add Page main Page main Page init  addPages mainPage JavaAttributeWizardPage attInfo className addPage mainPage mainPage
I Runnable With Progress op new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception Invocation Target Exception Interrupted Exception main Page create Type monitor I Resource resource main Page get Modified Resource if resource null select And Reveal resource if project has Nature Java Core NATURE ID I Java Project j Project Java Core create project I Java Element j Element j Project find Element resource get Project Relative Path remove First Segments 1 if j Element null JavaUI open In Editor j Element else if resource instanceof I File I Workbench Page page PDE Plugin get Active Page IDE open Editor page I File resource true  IRunnableWithProgress WorkspaceModifyOperation IProgressMonitor CoreException InvocationTargetException InterruptedException mainPage createType IResource mainPage getModifiedResource selectAndReveal hasNature JavaCore NATURE_ID IJavaProject jProject JavaCore IJavaElement jElement jProject findElement getProjectRelativePath removeFirstSegments jElement openInEditor jElement IFile IWorkbenchPage PDEPlugin getActivePage openEditor IFile
public boolean perform Finish if main Page get Package Text null main Page get Package Text length 0 class Name main Page get Package Text NON NLS 1 main Page get Type Name else class Name main Page get Type Name class Args main Page get Class Args I Runnable With Progress op new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception Invocation Target Exception Interrupted Exception main Page create Type monitor I Resource resource main Page get Modified Resource if resource null select And Reveal resource if project has Nature Java Core NATURE ID I Java Project j Project Java Core create project I Java Element j Element j Project find Element resource get Project Relative Path remove First Segments 1 if j Element null JavaUI open In Editor j Element else if resource instanceof I File I Workbench Page page PDE Plugin get Active Page IDE open Editor page I File resource true try get Container run false true op catch Invocation Target Exception e PDE Plugin log Exception e catch Interrupted Exception e PDE Plugin log Exception e return true  performFinish mainPage getPackageText mainPage getPackageText className mainPage getPackageText mainPage getTypeName className mainPage getTypeName classArgs mainPage getClassArgs IRunnableWithProgress WorkspaceModifyOperation IProgressMonitor CoreException InvocationTargetException InterruptedException mainPage createType IResource mainPage getModifiedResource selectAndReveal hasNature JavaCore NATURE_ID IJavaProject jProject JavaCore IJavaElement jElement jProject findElement getProjectRelativePath removeFirstSegments jElement openInEditor jElement IFile IWorkbenchPage PDEPlugin getActivePage openEditor IFile getContainer InvocationTargetException PDEPlugin logException InterruptedException PDEPlugin logException
return true protected void select And Reveal I Resource new Resource Basic New Resource Wizard select And Reveal new Resource PDE Plugin get Active Workbench Window  selectAndReveal IResource newResource BasicNewResourceWizard selectAndReveal newResource PDEPlugin getActiveWorkbenchWindow
get Active Workbench Window protected I Scheduling Rule get Scheduling Rule return main Page get Modified Resource  getActiveWorkbenchWindow ISchedulingRule getSchedulingRule mainPage getModifiedResource
return main Page get Modified Resource public String get Class Name return class Name  mainPage getModifiedResource getClassName className
public String get Class Name With Args if class Args null class Args length 0 return class Name class Args NON NLS 1 return get Class Name  getClassNameWithArgs classArgs classArgs className classArgs getClassName

I Package Fragment package Fragment public Initial Class Properties this super Class Type null this super Class Name NON NLS 1 this interface Name null this interface Type null this class Name null this class Args null this package Name null this package Fragment null this package Fragment Root null  IPackageFragment packageFragment InitialClassProperties superClassType superClassName interfaceName interfaceType className classArgs packageName packageFragment packageFragmentRoot
public Java Attribute Wizard Page I Project project I Plugin Model Base model I Schema Attribute att Info String class Name super this class Name class Name this model model this project project this att Info att Info try if project has Nature Java Core NATURE ID this java Project Java Core create project else this java Project null catch Core Exception e PDE Plugin log Exception e initial Values new Initial Class Properties initial Values class Name class Name  JavaAttributeWizardPage IProject IPluginModelBase ISchemaAttribute attInfo className className className attInfo attInfo hasNature JavaCore NATURE_ID javaProject JavaCore javaProject CoreException PDEPlugin logException initialValues InitialClassProperties initialValues className className
public Object get Value return new Java Attribute Value project model att Info class Name  getValue JavaAttributeValue attInfo className
return new Java Attribute Value project model att Info class Name public void init initialize Expected Values initialize Wizard Page  JavaAttributeValue attInfo className initializeExpectedValues initializeWizardPage
protected void initialize Wizard Page set Package Fragment Root initial Values package Fragment Root true set Package Fragment initial Values package Fragment true set Enclosing Type null true set Enclosing Type Selection false true set Type Name initial Values class Name true set Super Class initial Values super Class Name true if initial Values interface Name null Array List interfaces new Array List interfaces add initial Values interface Name set Super Interfaces interfaces true boolean has Super Class initial Values super Class Name null initial Values super Class Name length 0 boolean has Interface initial Values interface Name null initial Values interface Name length 0 set Method Stub Selection false has Super Class has Interface has Super Class true  initializeWizardPage setPackageFragmentRoot initialValues packageFragmentRoot setPackageFragment initialValues packageFragment setEnclosingType setEnclosingTypeSelection setTypeName initialValues className setSuperClass initialValues superClassName initialValues interfaceName ArrayList ArrayList initialValues interfaceName setSuperInterfaces hasSuperClass initialValues superClassName initialValues superClassName hasInterface initialValues interfaceName initialValues interfaceName setMethodStubSelection hasSuperClass hasInterface hasSuperClass
private I Type find Type For Name String type Name throws Java Model Exception if type Name null type Name length 0 return null I Type type null String file Name type Name replace java NON NLS 1 I Java Element element java Project find Element new Path file Name if element null return null if element instanceof I Class File type I Class File element get Type else if element instanceof I Compilation Unit I Type types I Compilation Unit element get Types type types 0 return type  IType findTypeForName typeName JavaModelException typeName typeName IType fileName typeName IJavaElement javaProject findElement fileName IClassFile IClassFile getType ICompilationUnit IType ICompilationUnit getTypes
private void initialize Expected Values source folder name package name class name int loc class Name index Of NON NLS 1 if loc 1 if loc class Name length initial Values class Args class Name substring loc 1 class Name length class Name class Name substring 0 loc if loc 0 initial Values class Name class Name substring 0 loc else if loc 0 initial Values class Name NON NLS 1 f Class Name Status Java Conventions validate Java Type Name initial Values class Name loc class Name last Index Of if loc 1 initial Values package Name class Name substring 0 loc initial Values class Name class Name substring loc 1 f Package Name Status Java Conventions validate Package Name initial Values package Name f Class Name Status Java Conventions validate Java Type Name initial Values class Name if java Project null return try if initial Values package Fragment Root null I Package Fragment Root src Entry Dft null I Package Fragment Root roots java Project get Package Fragment Roots for int i 0 i roots length i if roots i get Kind I Package Fragment Root K SOURCE src Entry Dft roots i break if src Entry Dft null initial Values package Fragment Root src Entry Dft else initial Values package Fragment Root java Project get Package Fragment Root java Project get Resource if initial Values package Fragment null initial Values package Fragment Root null initial Values package Name null initial Values package Name length 0 I Folder package Folder project get Folder initial Values package Name initial Values package Fragment initial Values package Fragment Root get Package Fragment package Folder get Project Relative Path toOS String superclass and interface if att Info null initial Values super Class Name org eclipse core runtime Plugin NON NLS 1 I Plugin Import imports model get Plugin Base get Imports for int i 0 i imports length i if imports i get Id equals org eclipse ui NON NLS 1 initial Values super Class Name org eclipse ui plugin AbstractUI Plugin NON NLS 1 break initial Values super Class Type find Type For Name initial Values super Class Name return String schema Based On att Info get Based On if schema Based On null schema Based On length 0 initial Values super Class Name java lang Object NON NLS 1 initial Values super Class Type find Type For Name initial Values super Class Name return int del schema Based On index Of if del 1 initial Values super Class Name schema Based On substring 0 del initial Values super Class Type find Type For Name initial Values super Class Name initial Values interface Name schema Based On substring del 1 initial Values interface Type find Type For Name initial Values interface Name else int schema Loc schema Based On last Index Of NON NLS 1 if schema Loc 1 schema Loc schema Based On length I Type type find Type For Name schema Based On if type null type is Interface initial Values interface Name schema Based On initial Values interface Type type else if type null type is Class initial Values super Class Name schema Based On initial Values super Class Type type catch Java Model Exception e PDE Plugin log Exception e  initializeExpectedValues className indexOf className initialValues classArgs className className className className initialValues className className initialValues className fClassNameStatus JavaConventions validateJavaTypeName initialValues className className lastIndexOf initialValues packageName className initialValues className className fPackageNameStatus JavaConventions validatePackageName initialValues packageName fClassNameStatus JavaConventions validateJavaTypeName initialValues className javaProject initialValues packageFragmentRoot IPackageFragmentRoot srcEntryDft IPackageFragmentRoot javaProject getPackageFragmentRoots getKind IPackageFragmentRoot K_SOURCE srcEntryDft srcEntryDft initialValues packageFragmentRoot srcEntryDft initialValues packageFragmentRoot javaProject getPackageFragmentRoot javaProject getResource initialValues packageFragment initialValues packageFragmentRoot initialValues packageName initialValues packageName IFolder packageFolder getFolder initialValues packageName initialValues packageFragment initialValues packageFragmentRoot getPackageFragment packageFolder getProjectRelativePath toOSString attInfo initialValues superClassName IPluginImport getPluginBase getImports getId initialValues superClassName AbstractUIPlugin initialValues superClassType findTypeForName initialValues superClassName schemaBasedOn attInfo getBasedOn schemaBasedOn schemaBasedOn initialValues superClassName initialValues superClassType findTypeForName initialValues superClassName schemaBasedOn indexOf initialValues superClassName schemaBasedOn initialValues superClassType findTypeForName initialValues superClassName initialValues interfaceName schemaBasedOn initialValues interfaceType findTypeForName initialValues interfaceName schemaLoc schemaBasedOn lastIndexOf schemaLoc schemaLoc schemaBasedOn IType findTypeForName schemaBasedOn isInterface initialValues interfaceName schemaBasedOn initialValues interfaceType isClass initialValues superClassName schemaBasedOn initialValues superClassType JavaModelException PDEPlugin logException
public void set Visible boolean visible super set Visible visible policy wizards are not allowed to come up with an error message in this wizard some fields may need initial validation and thus potentially start with an error message if f Class Name Status null f Class Name Status isOK update Status f Class Name Status if f Package Name Status null f Package Name Status isOK update Status f Package Name Status  setVisible setVisible fClassNameStatus fClassNameStatus updateStatus fClassNameStatus fPackageNameStatus fPackageNameStatus updateStatus fPackageNameStatus
public String get Class Args if initial Values class Args null return NON NLS 1 return initial Values class Args  getClassArgs initialValues classArgs initialValues classArgs

class Rename Action extends Action public Rename Action super PDE Plugin get Resource String Editable Table Part rename Action NON NLS 1  RenameAction RenameAction PDEPlugin getResourceString EditableTablePart renameAction
super PDE Plugin get Resource String Editable Table Part rename Action NON NLS 1 public void run do Rename  PDEPlugin getResourceString EditableTablePart renameAction doRename
class Library Filter extends JAR File Filter public Library Filter Hash Set set super set  LibraryFilter JARFileFilter LibraryFilter HashSet
public boolean select Viewer viewer Object parent Object element if element instanceof I Folder return is Path Valid I Folder element get Project Relative Path if element instanceof I File return is File Valid I File element get Project Relative Path return false  IFolder isPathValid IFolder getProjectRelativePath IFile isFileValid IFile getProjectRelativePath
class Library Selection Validator extends Jar Selection Validator public Library Selection Validator Class accepted Types boolean allow Multiple Selection super accepted Types allow Multiple Selection  LibrarySelectionValidator JarSelectionValidator LibrarySelectionValidator acceptedTypes allowMultipleSelection acceptedTypes allowMultipleSelection
public boolean is Valid Object element if element instanceof I Folder return true return super is Valid element  isValid IFolder isValid
extends Default Content Provider implements I Structured Content Provider public Object get Elements Object parent I Plugin Model Base model I Plugin Model Base get Page get Model return model get Plugin Base get Libraries  DefaultContentProvider IStructuredContentProvider getElements IPluginModelBase IPluginModelBase getPage getModel getPluginBase getLibraries
public Library Section PDE Form Page page Composite parent super page parent Section DESCRIPTION new String PDE Plugin get Resource String SECTION NEW PDE Plugin get Resource String SECTION ADD PDE Plugin get Resource String SECTION UP PDE Plugin get Resource String SECTION DOWN get Section set Text PDE Plugin get Resource String SECTION TITLE I Plugin Model Base model I Plugin Model Base page getPDE Editor get Aggregate Model boolean fragment model is Fragment Model if fragment get Section set Description PDE Plugin get Resource String SECTION FDESC else get Section set Description PDE Plugin get Resource String SECTION DESC  LibrarySection PDEFormPage PDEPlugin getResourceString SECTION_NEW PDEPlugin getResourceString SECTION_ADD PDEPlugin getResourceString SECTION_UP PDEPlugin getResourceString SECTION_DOWN getSection setText PDEPlugin getResourceString SECTION_TITLE IPluginModelBase IPluginModelBase getPDEEditor getAggregateModel isFragmentModel getSection setDescription PDEPlugin getResourceString SECTION_FDESC getSection setDescription PDEPlugin getResourceString SECTION_DESC
public void create Client Section section Form Toolkit toolkit Composite container create Client Container section 2 toolkit Editable Table Part table Part get Table Part I Model model I Model get Page get Model table Part set Editable model is Editable create Viewer Part Control container SWT FULL SELECTION 2 toolkit library Table table Part get Table Viewer library Table set Content Provider new Table Content Provider library Table set Label Provider PDE Plugin get Default get Label Provider toolkit paint Borders For container table Part set Button Enabled 2 false table Part set Button Enabled 3 false section set Client container initialize  createClient FormToolkit createClientContainer EditableTablePart tablePart getTablePart IModel IModel getPage getModel tablePart setEditable isEditable createViewerPartControl FULL_SELECTION libraryTable tablePart getTableViewer libraryTable setContentProvider TableContentProvider libraryTable setLabelProvider PDEPlugin getDefault getLabelProvider paintBordersFor tablePart setButtonEnabled tablePart setButtonEnabled setClient
protected void selection Changed I Structured Selection selection get Page getPDE Editor set Selection selection if get Page get Model is Editable update Directional Buttons  selectionChanged IStructuredSelection getPage getPDEEditor setSelection getPage getModel isEditable updateDirectionalButtons
protected void button Selected int index switch index case 0 handle New break case 1 handle Add break case 2 handle Up break case 3 handle Down break  buttonSelected handleNew handleAdd handleUp handleDown
commit false library Table get Table get Display async Exec new Runnable public void run library Table update library null  libraryTable getTable getDisplay asyncExec libraryTable
protected void entry Modified Object entry String new Value Item item Item entry final I Plugin Library library I Plugin Library item get Data try if new Value equals library get Name return library set Name new Value mark Dirty commit false library Table get Table get Display async Exec new Runnable public void run library Table update library null catch Core Exception e PDE Plugin log Exception e  entryModified newValue IPluginLibrary IPluginLibrary getData newValue getName setName newValue markDirty libraryTable getTable getDisplay asyncExec libraryTable CoreException PDEPlugin logException
public void dispose I Plugin Model Base model I Plugin Model Base get Page get Model if model null model remove Model Changed Listener this super dispose  IPluginModelBase IPluginModelBase getPage getModel removeModelChangedListener
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id handle Delete return true if action Id equals Action Factory CUT get Id delete here and let the editor transfer the selection to the clipboard handle Delete return false if action Id equals Action Factory PASTE get Id do Paste return true return false  doGlobalAction actionId actionId ActionFactory getId handleDelete actionId ActionFactory getId handleDelete actionId ActionFactory getId doPaste
public boolean set Form Input Object object if object instanceof I Plugin Library library Table set Selection new Structured Selection object true return true return false  setFormInput IPluginLibrary libraryTable setSelection StructuredSelection
Action new Action new Action PDE Plugin get Resource String POPUP NEW LIBRARY public void run handle Add  newAction PDEPlugin getResourceString POPUP_NEW_LIBRARY handleAdd
Action delete Action new Action PDE Plugin get Resource String POPUP DELETE public void run handle Delete  deleteAction PDEPlugin getResourceString POPUP_DELETE handleDelete
protected void fill Context Menu I Menu Manager manager I Model model I Model get Page get Model I Selection selection library Table get Selection Action new Action new Action PDE Plugin get Resource String POPUP NEW LIBRARY public void run handle Add new Action set Enabled model is Editable manager add new Action if selection is Empty manager add new Separator rename Action new Rename Action rename Action set Enabled model is Editable manager add rename Action Action delete Action new Action PDE Plugin get Resource String POPUP DELETE public void run handle Delete delete Action set Enabled model is Editable manager add delete Action get Page getPDE Editor get Contributor context Menu About To Show manager  fillContextMenu IMenuManager IModel IModel getPage getModel ISelection libraryTable getSelection newAction PDEPlugin getResourceString POPUP_NEW_LIBRARY handleAdd newAction setEnabled isEditable newAction isEmpty renameAction RenameAction renameAction setEnabled isEditable renameAction deleteAction PDEPlugin getResourceString POPUP_DELETE handleDelete deleteAction setEnabled isEditable deleteAction getPage getPDEEditor getContributor contextMenuAboutToShow
private void handle Delete Object object I Structured Selection library Table get Selection get First Element if object null object instanceof I Plugin Library I Plugin Library ep I Plugin Library object I Plugin Base plugin ep get Plugin Base try plugin remove ep catch Core Exception e PDE Plugin log Exception e  handleDelete IStructuredSelection libraryTable getSelection getFirstElement IPluginLibrary IPluginLibrary IPluginLibrary IPluginBase getPluginBase CoreException PDEPlugin logException
private void handle Down Table table get Table Part get Table Viewer get Table int index table get Selection Index if index table get Item Count 1 return swap index index 1  handleDown getTablePart getTableViewer getTable getSelectionIndex getItemCount
private void handle Up int index get Table Part get Table Viewer get Table get Selection Index if index 1 return swap index index 1  handleUp getTablePart getTableViewer getTable getSelectionIndex
public void swap int index1 int index2 Table table get Table Part get Table Viewer get Table I Plugin Library l1 I Plugin Library table get Item index1 get Data I Plugin Library l2 I Plugin Library table get Item index2 get Data try I Plugin Model Base model I Plugin Model Base get Page get Model I Plugin Base plugin Base model get Plugin Base plugin Base swap l1 l2 refresh update Directional Buttons catch Core Exception e PDE Plugin log Exception e  getTablePart getTableViewer getTable IPluginLibrary IPluginLibrary getItem getData IPluginLibrary IPluginLibrary getItem getData IPluginModelBase IPluginModelBase getPage getModel IPluginBase pluginBase getPluginBase pluginBase updateDirectionalButtons CoreException PDEPlugin logException
private void handle New I Plugin Model Base model I Plugin Model Base get Page get Model New Runtime Library Dialog dialog new New Runtime Library Dialog get Page get Site get Shell model get Plugin Base get Libraries dialog create dialog get Shell set Text PDE Plugin get Resource String NEW LIBRARY ENTRY SWT Util set Dialog Size dialog 250 175 if dialog open Dialog OK String lib Name dialog get Library Name if lib Name null lib Name length 0 return try I Plugin Library library model get Plugin Factory create Library library set Name lib Name library set Exported true model get Plugin Base add library catch Core Exception e PDE Plugin log Exception e  handleNew IPluginModelBase IPluginModelBase getPage getModel NewRuntimeLibraryDialog NewRuntimeLibraryDialog getPage getSite getShell getPluginBase getLibraries getShell setText PDEPlugin getResourceString NEW_LIBRARY_ENTRY SWTUtil setDialogSize libName getLibraryName libName libName IPluginLibrary getPluginFactory createLibrary setName libName setExported getPluginBase CoreException PDEPlugin logException
private void handle Add Element Tree Selection Dialog dialog new Element Tree Selection Dialog get Page get Site get Shell new Workbench Label Provider new Workbench Content Provider Class accepted Classes new Class I File class dialog set Validator new Library Selection Validator accepted Classes true dialog set Title PDE Plugin get Resource String Build Editor Classpath Section jars Title NON NLS 1 dialog set Message PDE Plugin get Resource String Library Section jars Message NON NLS 1 I Plugin Library libraries I Plugin Model Base get Page get Model get Plugin Base get Libraries Hash Set set new Hash Set for int i 0 i libraries length i set add new Path Classpath Util Core expand Library Name libraries i get Name dialog add Filter new Library Filter set dialog set Input I Model get Page get Model get Underlying Resource get Project dialog set Sorter new Resource Sorter Resource Sorter NAME if dialog open Element Tree Selection Dialog OK Object elements dialog get Result I Plugin Model Base model I Plugin Model Base get Page get Model for int i 0 i elements length i I Resource elem I Resource elements i I Path path elem get Project Relative Path if elem instanceof I Folder path path add Trailing Separator I Plugin Library library model get Plugin Factory create Library try library set Name path to String library set Exported true model get Plugin Base add library catch Core Exception e PDE Plugin log Exception e  handleAdd ElementTreeSelectionDialog ElementTreeSelectionDialog getPage getSite getShell WorkbenchLabelProvider WorkbenchContentProvider acceptedClasses IFile setValidator LibrarySelectionValidator acceptedClasses setTitle PDEPlugin getResourceString BuildEditor ClasspathSection jarsTitle setMessage PDEPlugin getResourceString LibrarySection jarsMessage IPluginLibrary IPluginModelBase getPage getModel getPluginBase getLibraries HashSet HashSet ClasspathUtilCore expandLibraryName getName addFilter LibraryFilter setInput IModel getPage getModel getUnderlyingResource getProject setSorter ResourceSorter ResourceSorter ElementTreeSelectionDialog getResult IPluginModelBase IPluginModelBase getPage getModel IResource IResource IPath getProjectRelativePath IFolder addTrailingSeparator IPluginLibrary getPluginFactory createLibrary setName toString setExported getPluginBase CoreException PDEPlugin logException
public void initialize I Plugin Model Base model I Plugin Model Base get Page get Model library Table set Input model get Plugin Base get Table Part set Button Enabled 0 model is Editable get Table Part set Button Enabled 1 model is Editable get Table Part set Button Enabled 2 false get Table Part set Button Enabled 3 false model add Model Changed Listener this  IPluginModelBase IPluginModelBase getPage getModel libraryTable setInput getPluginBase getTablePart setButtonEnabled isEditable getTablePart setButtonEnabled isEditable getTablePart setButtonEnabled getTablePart setButtonEnabled addModelChangedListener
public void refresh library Table set Selection null library Table refresh super refresh  libraryTable setSelection libraryTable
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event WORLD CHANGED mark Stale return Object change Object event get Changed Objects 0 if change Object instanceof I Plugin Library if event get Change Type I Model Changed Event INSERT library Table add change Object else if event get Change Type I Model Changed Event REMOVE library Table remove change Object else if event get Changed Property null library Table update change Object null else if change Object equals library Table get Input mark Stale else if change Object instanceof I Plugin Element I Plugin Element change Object get Parent instanceof I Plugin Library library Table update I Plugin Element change Object get Parent null  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale changeObject getChangedObjects changeObject IPluginLibrary getChangeType IModelChangedEvent libraryTable changeObject getChangeType IModelChangedEvent libraryTable changeObject getChangedProperty libraryTable changeObject changeObject libraryTable getInput markStale changeObject IPluginElement IPluginElement changeObject getParent IPluginLibrary libraryTable IPluginElement changeObject getParent
public void set Focus library Table get Table set Focus  setFocus libraryTable getTable setFocus
private void update Directional Buttons Table table library Table get Table Table Item selection table get Selection boolean has Selection selection length 0 boolean can Move table get Item Count 1 Table Part table Part get Table Part table Part set Button Enabled 2 can Move has Selection table get Selection Index 0 table Part set Button Enabled 3 can Move has Selection table get Selection Index table get Item Count 1  updateDirectionalButtons libraryTable getTable TableItem getSelection hasSelection canMove getItemCount TablePart tablePart getTablePart tablePart setButtonEnabled canMove hasSelection getSelectionIndex tablePart setButtonEnabled canMove hasSelection getSelectionIndex getItemCount
protected void do Paste Object target Object objects I Plugin Model Base model I Plugin Model Base get Page get Model I Plugin Base plugin model get Plugin Base try for int i 0 i objects length i Object obj objects i if obj instanceof I Plugin Library Plugin Library library Plugin Library obj library set Model model library set Parent plugin plugin add library catch Core Exception e PDE Plugin log Exception e  doPaste IPluginModelBase IPluginModelBase getPage getModel IPluginBase getPluginBase IPluginLibrary PluginLibrary PluginLibrary setModel setParent CoreException PDEPlugin logException
protected boolean can Paste Object target Object objects if objects 0 instanceof I Plugin Library return true return false  canPaste IPluginLibrary
private void do Rename Table Viewer viewer get Table Part get Table Viewer I Structured Selection selection I Structured Selection viewer get Selection if selection size 1 is Editable Object obj selection get First Element String old Name NON NLS 1 if obj instanceof I Plugin Library old Name I Plugin Library obj get Name I Plugin Model Base model I Plugin Model Base get Page get Model I Plugin Library libraries model get Plugin Base get Libraries String lib Names new String libraries length for int i 0 i lib Names length i lib Names i libraries i get Name Rename Dialog dialog new Rename Dialog get Table Part get Control get Shell false lib Names old Name dialog create dialog get Shell set Text PDE Plugin get Resource String Editable Table Part rename Title NON NLS 1 SWT Util set Dialog Size dialog 300 150 if dialog open Dialog OK entry Modified do Find Item obj dialog get New Name  doRename TableViewer getTablePart getTableViewer IStructuredSelection IStructuredSelection getSelection isEditable getFirstElement oldName IPluginLibrary oldName IPluginLibrary getName IPluginModelBase IPluginModelBase getPage getModel IPluginLibrary getPluginBase getLibraries libNames libNames libNames getName RenameDialog RenameDialog getTablePart getControl getShell libNames oldName getShell setText PDEPlugin getResourceString EditableTablePart renameTitle SWTUtil setDialogSize entryModified doFindItem getNewName
private Widget do Find Item Object element Table Item children get Table Part get Table Viewer get Table get Items for int i 0 i children length i Table Item item children i Object data item get Data if data null data equals element return item return null  doFindItem TableItem getTablePart getTableViewer getTable getItems TableItem getData

public Object get Children Object parent Element if parent Element instanceof Dependency Loop return Dependency Loop parent Element get Members return new Object 0  getChildren parentElement parentElement DependencyLoop DependencyLoop parentElement getMembers
see org eclipse jface viewers I Tree Content Provider get Parent java lang Object public Object get Parent Object element return null  ITreeContentProvider getParent getParent
see org eclipse jface viewers I Tree Content Provider has Children java lang Object public boolean has Children Object element return element instanceof Dependency Loop  ITreeContentProvider hasChildren hasChildren DependencyLoop
see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return f Loops  IStructuredContentProvider getElements getElements inputElement fLoops
public Image get Image Object element if element instanceof Dependency Loop return f Loop Image return PDE Plugin get Default get Label Provider get Image element  getImage DependencyLoop fLoopImage PDEPlugin getDefault getLabelProvider getImage
see org eclipse jface viewers Label Provider get Text java lang Object public String get Text Object element return PDE Plugin get Default get Label Provider get Text element  LabelProvider getText getText PDEPlugin getDefault getLabelProvider getText
public Loop Dialog Shell parent Shell Dependency Loop loops super parent Shell f Loops loops PDE Label Provider provider PDE Plugin get Default get Label Provider f Loop Image provider get PDE Plugin Images DESC LOOP OBJ  LoopDialog parentShell DependencyLoop parentShell fLoops PDELabelProvider PDEPlugin getDefault getLabelProvider fLoopImage PDEPluginImages DESC_LOOP_OBJ
protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL
protected Control create Dialog Area Composite parent Composite container Composite super create Dialog Area parent Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width layout margin Height 9 container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint 300 gd height Hint 300 container set Layout Data gd f Loop Viewer new Tree Viewer container f Loop Viewer set Content Provider new Content Provider f Loop Viewer set Label Provider new Loop Label Provider Tree tree f Loop Viewer get Tree gd new Grid Data Grid Data FILL BOTH tree set Layout Data gd f Loop Viewer set Input PDE Plugin get Default f Loop Viewer expand All get Shell set Text PDE Plugin get Resource String Loop Dialog title NON NLS 1 return container  createDialogArea createDialogArea GridLayout GridLayout numColumns marginWidth marginHeight setLayout GridData GridData GridData FILL_BOTH widthHint heightHint setLayoutData fLoopViewer TreeViewer fLoopViewer setContentProvider ContentProvider fLoopViewer setLabelProvider LoopLabelProvider fLoopViewer getTree GridData GridData FILL_BOTH setLayoutData fLoopViewer setInput PDEPlugin getDefault fLoopViewer expandAll getShell setText PDEPlugin getResourceString LoopDialog

public class Manifest Editor extends Multi Source Editor protected void create Resource Contexts Input Context Manager manager I File Editor Input input I File file input get File I Project project file get Project I File manifest File null I File build File null I File plugin File null boolean fragment false String name file get Name to Lower Case if name equals manifest mf NON NLS 1 manifest File file build File project get File build properties NON NLS 1 plugin File create Plugin File project else if name equals build properties NON NLS 1 build File file plugin File create Plugin File project manifest File project get File META INF MANIFEST MF NON NLS 1 else if name equals plugin xml name equals fragment xml NON NLS 1 NON NLS 2 plugin File file fragment name equals fragment xml NON NLS 1 build File project get File build properties NON NLS 1 manifest File project get File META INF MANIFEST MF NON NLS 1 if manifest File exists I Editor Input in new File Editor Input manifest File manager put Context in new Bundle Input Context this in file manifest File if plugin File exists File Editor Input in new File Editor Input plugin File manager put Context in new Plugin Input Context this in file plugin File fragment if build File exists File Editor Input in new File Editor Input build File manager put Context in new Build Input Context this in file build File manager monitor File manifest File manager monitor File plugin File manager monitor File build File  ManifestEditor MultiSourceEditor createResourceContexts InputContextManager IFileEditorInput IFile getFile IProject getProject IFile manifestFile IFile buildFile IFile pluginFile getName toLowerCase manifestFile buildFile getFile pluginFile createPluginFile buildFile pluginFile createPluginFile manifestFile getFile pluginFile buildFile getFile manifestFile getFile manifestFile IEditorInput FileEditorInput manifestFile putContext BundleInputContext manifestFile pluginFile FileEditorInput FileEditorInput pluginFile putContext PluginInputContext pluginFile buildFile FileEditorInput FileEditorInput buildFile putContext BuildInputContext buildFile monitorFile manifestFile monitorFile pluginFile monitorFile buildFile
protected Input Context Manager create Input Context Manager Plugin Input Context Manager manager new Plugin Input Context Manager this manager set Undo Manager new Plugin Undo Manager this return manager  InputContextManager createInputContextManager PluginInputContextManager PluginInputContextManager setUndoManager PluginUndoManager
public void monitored File Added I File file String name file get Name if name equals Ignore Case MANIFEST MF NON NLS 1 if input Context Manager has Context Bundle Input Context CONTEXT ID I Editor Input in new File Editor Input file input Context Manager put Context in new Bundle Input Context this in false else if name equals Ignore Case plugin xml NON NLS 1 if input Context Manager has Context Plugin Input Context CONTEXT ID I Editor Input in new File Editor Input file input Context Manager put Context in new Plugin Input Context this in false false else if name equals Ignore Case fragment xml NON NLS 1 if input Context Manager has Context Plugin Input Context CONTEXT ID I Editor Input in new File Editor Input file input Context Manager put Context in new Plugin Input Context this in false true else if name equals Ignore Case build properties NON NLS 1 if input Context Manager has Context Bundle Input Context CONTEXT ID I Editor Input in new File Editor Input file input Context Manager put Context in new Build Input Context this in false  monitoredFileAdded IFile getName equalsIgnoreCase inputContextManager hasContext BundleInputContext CONTEXT_ID IEditorInput FileEditorInput inputContextManager putContext BundleInputContext equalsIgnoreCase inputContextManager hasContext PluginInputContext CONTEXT_ID IEditorInput FileEditorInput inputContextManager putContext PluginInputContext equalsIgnoreCase inputContextManager hasContext PluginInputContext CONTEXT_ID IEditorInput FileEditorInput inputContextManager putContext PluginInputContext equalsIgnoreCase inputContextManager hasContext BundleInputContext CONTEXT_ID IEditorInput FileEditorInput inputContextManager putContext BuildInputContext
public void ensure Plugin Context Presence if input Context Manager has Context Plugin Input Context CONTEXT ID return I Project project input Context Manager get Common Project I File file project get File plugin xml NON NLS 1 Workspace Plugin Model model new Workspace Plugin Model file I Plugin Base plugin Base model get Plugin Base true try plugin Base set Schema Version 3 0 NON NLS 1 catch Core Exception e model save I Editor Input in new File Editor Input file input Context Manager put Context in new Plugin Input Context this in false false  ensurePluginContextPresence inputContextManager hasContext PluginInputContext CONTEXT_ID IProject inputContextManager getCommonProject IFile getFile WorkspacePluginModel WorkspacePluginModel IPluginBase pluginBase getPluginBase pluginBase setSchemaVersion CoreException IEditorInput FileEditorInput inputContextManager putContext PluginInputContext
public boolean monitored File Removed I File file TODO may need to check with the user if there are unsaved changes in the model for the file that just got removed under us return true  monitoredFileRemoved IFile
public void context Added Input Context context add Source Page context get Id try if context get Id equals Build Page PAGE ID add Page new Build Page this catch Part Init Exception e PDE Plugin log Exception e  contextAdded InputContext addSourcePage getId getId BuildPage PAGE_ID addPage BuildPage PartInitException PDEPlugin logException
public void context Removed Input Context context if context is Primary close true return I Form Page page find Page context get Id if page null remove Page context get Id if context get Id equals Build Input Context CONTEXT ID remove Page Build Page PAGE ID  contextRemoved InputContext isPrimary IFormPage findPage getId removePage getId getId BuildInputContext CONTEXT_ID removePage BuildPage PAGE_ID
protected void create System File Contexts Input Context Manager manager System File Editor Input input File file File input get Adapter File class File manifest File null File build File null File plugin File null String name file get Name to Lower Case if name equals manifest mf NON NLS 1 manifest File file File dir file get Parent File get Parent File build File new File dir build properties NON NLS 1 plugin File create Plugin File dir else if name equals build properties NON NLS 1 build File file File dir file get Parent File plugin File create Plugin File dir manifest File new File dir META INF MANIFEST MF NON NLS 1 else if name equals plugin xml name equals fragment xml NON NLS 1 NON NLS 2 plugin File file File dir file get Parent File build File new File dir build properties NON NLS 1 manifest File new File dir META INF MANIFEST MF NON NLS 1 if manifest File exists I Editor Input in new System File Editor Input manifest File manager put Context in new Bundle Input Context this in file manifest File if plugin File exists System File Editor Input in new System File Editor Input plugin File manager put Context in new Plugin Input Context this in file plugin File name equals fragment xml NON NLS 1 if build File exists System File Editor Input in new System File Editor Input build File manager put Context in new Build Input Context this in file build File  createSystemFileContexts InputContextManager SystemFileEditorInput getAdapter manifestFile buildFile pluginFile getName toLowerCase manifestFile getParentFile getParentFile buildFile pluginFile createPluginFile buildFile getParentFile pluginFile createPluginFile manifestFile pluginFile getParentFile buildFile manifestFile manifestFile IEditorInput SystemFileEditorInput manifestFile putContext BundleInputContext manifestFile pluginFile SystemFileEditorInput SystemFileEditorInput pluginFile putContext PluginInputContext pluginFile buildFile SystemFileEditorInput SystemFileEditorInput buildFile putContext BuildInputContext buildFile
private File create Plugin File File dir File plugin File new File dir plugin xml NON NLS 1 if plugin File exists plugin File new File dir fragment xml NON NLS 1 return plugin File  createPluginFile pluginFile pluginFile pluginFile pluginFile
private I File create Plugin File I Project project I File plugin File project get File plugin xml NON NLS 1 if plugin File exists plugin File project get File fragment xml NON NLS 1 return plugin File  IFile createPluginFile IProject IFile pluginFile getFile pluginFile pluginFile getFile pluginFile
protected void create Storage Contexts Input Context Manager manager I Storage Editor Input input String name input get Name to Lower Case if name starts With manifest mf NON NLS 1 manager put Context input new Bundle Input Context this input true else if name starts With build properties NON NLS 1 manager put Context input new Build Input Context this input true else if name starts With plugin xml NON NLS 1 manager put Context input new Plugin Input Context this input true false else if name starts With fragment xml NON NLS 1 manager put Context input new Plugin Input Context this input true true  createStorageContexts InputContextManager IStorageEditorInput getName toLowerCase startsWith putContext BundleInputContext startsWith putContext BuildInputContext startsWith putContext PluginInputContext startsWith putContext PluginInputContext
protected void context Menu About To Show I Menu Manager manager super context Menu About To Show manager  contextMenuAboutToShow IMenuManager contextMenuAboutToShow
public boolean can Copy I Selection selection return true  canCopy ISelection
protected void add Pages try add Page new Overview Page this add Page new Dependencies Page this add Page new Runtime Page this add Page new Extensions Page this add Page new Extension Points Page this if input Context Manager has Context Build Input Context CONTEXT ID add Page new Build Page this catch Part Init Exception e PDE Plugin log Exception e add Source Page Bundle Input Context CONTEXT ID add Source Page Plugin Input Context CONTEXT ID add Source Page Build Input Context CONTEXT ID  addPages addPage OverviewPage addPage DependenciesPage addPage RuntimePage addPage ExtensionsPage addPage ExtensionPointsPage inputContextManager hasContext BuildInputContext CONTEXT_ID addPage BuildPage PartInitException PDEPlugin logException addSourcePage BundleInputContext CONTEXT_ID addSourcePage PluginInputContext CONTEXT_ID addSourcePage BuildInputContext CONTEXT_ID
protected String compute Initial Page Id String first Page Id super compute Initial Page Id if first Page Id null Input Context primary input Context Manager get Primary Context boolean is Bundle input Context Manager has Context Bundle Input Context CONTEXT ID if primary get Id equals Build Input Context CONTEXT ID first Page Id Build Page PAGE ID else if primary get Id equals Plugin Input Context CONTEXT ID if is Bundle first Page Id Extensions Page PAGE ID else first Page Id Overview Page PAGE ID if first Page Id null first Page Id Overview Page PAGE ID return first Page Id  computeInitialPageId firstPageId computeInitialPageId firstPageId InputContext inputContextManager getPrimaryContext isBundle inputContextManager hasContext BundleInputContext CONTEXT_ID getId BuildInputContext CONTEXT_ID firstPageId BuildPage PAGE_ID getId PluginInputContext CONTEXT_ID isBundle firstPageId ExtensionsPage PAGE_ID firstPageId OverviewPage PAGE_ID firstPageId firstPageId OverviewPage PAGE_ID firstPageId
protected PDE Source Page create Source Page PDE Form Editor editor String title String name String context Id if context Id equals Plugin Input Context CONTEXT ID return new Manifest Source Page editor title name if context Id equals Build Input Context CONTEXT ID return new Build Source Page editor title name if context Id equals Bundle Input Context CONTEXT ID return new Bundle Source Page editor title name return super create Source Page editor title name context Id  PDESourcePage createSourcePage PDEFormEditor contextId contextId PluginInputContext CONTEXT_ID ManifestSourcePage contextId BuildInputContext CONTEXT_ID BuildSourcePage contextId BundleInputContext CONTEXT_ID BundleSourcePage createSourcePage contextId
protected I Content Outline Page create Content Outline return new Manifest Outline Page this  IContentOutlinePage createContentOutline ManifestOutlinePage
public Object get Adapter Class key No property sheet needed block super if key equals I Property Sheet Page class return null return super get Adapter key  getAdapter IPropertySheetPage getAdapter
return super get Adapter key public static void open Plugin Editor String plugin Id open Plugin Editor plugin Id null  getAdapter openPluginEditor pluginId openPluginEditor pluginId
public static void open Plugin Editor String plugin Id Object object I Plugin plugin To Open PDE Core get Default find Plugin plugin Id if plugin To Open null open Plugin Editor plugin To Open object else Display get Current beep  openPluginEditor pluginId IPlugin pluginToOpen PDECore getDefault findPlugin pluginId pluginToOpen openPluginEditor pluginToOpen getCurrent
public static void open Plugin Editor I Plugin Base plugin open Plugin Editor plugin null  openPluginEditor IPluginBase openPluginEditor
public static void open Plugin Editor I Plugin Base plugin Object object open Plugin Editor plugin object null  openPluginEditor IPluginBase openPluginEditor
public static void open Plugin Editor I Plugin Base plugin Object object I Marker marker I Editor Part editor null I Shared Plugin Model model plugin get Model I Resource underlying Resource null if model instanceof I Bundle Plugin Model Base underlying Resource I Bundle Plugin Model Base model get Extensions Model get Underlying Resource else underlying Resource plugin get Model get Underlying Resource if underlying Resource null editor open External Plugin plugin else editor open Workspace Plugin I File underlying Resource plugin instanceof I Fragment if editor instanceof Manifest Editor editor null object null Manifest Editor editor open To object marker  openPluginEditor IPluginBase IMarker IEditorPart ISharedPluginModel getModel IResource underlyingResource IBundlePluginModelBase underlyingResource IBundlePluginModelBase getExtensionsModel getUnderlyingResource underlyingResource getModel getUnderlyingResource underlyingResource openExternalPlugin openWorkspacePlugin IFile underlyingResource IFragment ManifestEditor ManifestEditor openTo
private static I Editor Part open Workspace Plugin I File plugin File boolean fragment String editor Id PDE Plugin MANIFEST EDITOR ID try File Editor Input input new File Editor Input plugin File return PDE Plugin get Active Page open Editor input editor Id catch Part Init Exception e PDE Plugin log Exception e return null  IEditorPart openWorkspacePlugin IFile pluginFile editorId PDEPlugin MANIFEST_EDITOR_ID FileEditorInput FileEditorInput pluginFile PDEPlugin getActivePage openEditor editorId PartInitException PDEPlugin logException
private static Manifest Editor open External Plugin I Plugin Base plugin Info boolean is Fragment plugin Info get Plugin Model is Fragment Model String manifest is Fragment fragment xml NON NLS 1 plugin xml NON NLS 1 String file Name plugin Info get Model get Install Location File separator manifest File file new File file Name if file exists try System File Editor Input input new System File Editor Input file return Manifest Editor PDE Plugin get Active Page open Editor input IPDEUI Constants MANIFEST EDITOR ID catch Part Init Exception e PDE Plugin log Exception e return null  ManifestEditor openExternalPlugin IPluginBase pluginInfo isFragment pluginInfo getPluginModel isFragmentModel isFragment fileName pluginInfo getModel getInstallLocation fileName SystemFileEditorInput SystemFileEditorInput ManifestEditor PDEPlugin getActivePage openEditor IPDEUIConstants MANIFEST_EDITOR_ID PartInitException PDEPlugin logException
public String get Title I Plugin Model Base model I Plugin Model Base get Aggregate Model if model null model is Valid return super get Title String text get Title Text model get Plugin Base if text null return super get Title return model get Resource String text  getTitle IPluginModelBase IPluginModelBase getAggregateModel isValid getTitle getTitleText getPluginBase getTitle getResourceString
public String get Title Property I Preference Store store PDE Plugin get Default get Preference Store String pref store get String I Preference Constants PROP SHOW OBJECTS if pref null pref equals I Preference Constants VALUE USE NAMES return I Plugin Base P NAME else return I Plugin Base P ID  getTitleProperty IPreferenceStore PDEPlugin getDefault getPreferenceStore getString IPreferenceConstants PROP_SHOW_OBJECTS IPreferenceConstants VALUE_USE_NAMES IPluginBase P_NAME IPluginBase P_ID
private String get Title Text I Plugin Base plugin Base I Preference Store store PDE Plugin get Default get Preference Store String pref store get String I Preference Constants PROP SHOW OBJECTS if pref null pref equals I Preference Constants VALUE USE NAMES return plugin Base get Name else return plugin Base get Id  getTitleText IPluginBase pluginBase IPreferenceStore PDEPlugin getDefault getPreferenceStore getString IPreferenceConstants PROP_SHOW_OBJECTS IPreferenceConstants VALUE_USE_NAMES pluginBase getName pluginBase getId

public class Manifest Editor Contributor extends PDE Form Editor Contributor public Manifest Editor Contributor super Plugin NON NLS 1  ManifestEditorContributor PDEFormEditorContributor ManifestEditorContributor

public class Manifest Outline Page extends Form Outline Page param editor public Manifest Outline Page PDE Form Editor editor super editor  ManifestOutlinePage FormOutlinePage ManifestOutlinePage PDEFormEditor
protected Object get Children Object parent if parent instanceof PDE Form Page PDE Form Page page PDE Form Page parent I Plugin Model Base model I Plugin Model Base page get Model I Build Model build Model get Build Model if model is Valid I Plugin Base plugin Base model get Plugin Base if page get Id equals Dependencies Page PAGE ID return plugin Base get Imports if page get Id equals Runtime Page PAGE ID return plugin Base get Libraries if page get Id equals Extensions Page PAGE ID return plugin Base get Extensions if page get Id equals Extension Points Page PAGE ID return plugin Base get Extension Points if build Model null build Model is Valid if page get Id equals Build Page PAGE ID return build Model get Build get Build Entries return new Object 0  getChildren PDEFormPage PDEFormPage PDEFormPage IPluginModelBase IPluginModelBase getModel IBuildModel buildModel getBuildModel isValid IPluginBase pluginBase getPluginBase getId DependenciesPage PAGE_ID pluginBase getImports getId RuntimePage PAGE_ID pluginBase getLibraries getId ExtensionsPage PAGE_ID pluginBase getExtensions getId ExtensionPointsPage PAGE_ID pluginBase getExtensionPoints buildModel buildModel isValid getId BuildPage PAGE_ID buildModel getBuild getBuildEntries
protected String get Parent Page Id Object item String page Id null if item instanceof I Plugin Import page Id Dependencies Page PAGE ID else if item instanceof I Plugin Library page Id Runtime Page PAGE ID else if item instanceof I Plugin Extension page Id Extensions Page PAGE ID else if item instanceof I Plugin Extension Point page Id Extension Points Page PAGE ID else if item instanceof I Build Entry page Id Build Page PAGE ID if page Id null return page Id return super get Parent Page Id item  getParentPageId pageId IPluginImport pageId DependenciesPage PAGE_ID IPluginLibrary pageId RuntimePage PAGE_ID IPluginExtension pageId ExtensionsPage PAGE_ID IPluginExtensionPoint pageId ExtensionPointsPage PAGE_ID IBuildEntry pageId BuildPage PAGE_ID pageId pageId getParentPageId
private I Build Model get Build Model Input Context context editor get Context Manager find Context Build Input Context CONTEXT ID if context null return I Build Model context get Model return null  IBuildModel getBuildModel InputContext getContextManager findContext BuildInputContext CONTEXT_ID IBuildModel getModel

private PDE Label Provider f Provider public Outline Label Provider f Provider PDE Plugin get Default get Label Provider  PDELabelProvider fProvider OutlineLabelProvider fProvider PDEPlugin getDefault getLabelProvider
public String get Text Object obj if obj f Libraries return PDE Plugin get Resource String Manifest Source Page libraries NON NLS 1 if obj f Imports return PDE Plugin get Resource String Manifest Source Page dependencies NON NLS 1 if obj f Extension Points return PDE Plugin get Resource String Manifest Source Page extension Points NON NLS 1 if obj f Extensions return PDE Plugin get Resource String Manifest Source Page extensions NON NLS 1 return f Provider get Text obj  getText fLibraries PDEPlugin getResourceString ManifestSourcePage fImports PDEPlugin getResourceString ManifestSourcePage fExtensionPoints PDEPlugin getResourceString ManifestSourcePage extensionPoints fExtensions PDEPlugin getResourceString ManifestSourcePage fProvider getText
public Image get Image Object obj if obj f Libraries return f Provider get PDE Plugin Images DESC RUNTIME OBJ if obj f Imports return f Provider get PDE Plugin Images DESC REQ PLUGINS OBJ if obj f Extension Points return f Provider get PDE Plugin Images DESC EXT POINTS OBJ if obj f Extensions return f Provider get PDE Plugin Images DESC EXTENSIONS OBJ Image image f Provider get Image obj int flags I Document Node obj is Error Node PDE Label Provider F ERROR 0 return flags 0 image f Provider get image flags  getImage fLibraries fProvider PDEPluginImages DESC_RUNTIME_OBJ fImports fProvider PDEPluginImages DESC_REQ_PLUGINS_OBJ fExtensionPoints fProvider PDEPluginImages DESC_EXT_POINTS_OBJ fExtensions fProvider PDEPluginImages DESC_EXTENSIONS_OBJ fProvider getImage IDocumentNode isErrorNode PDELabelProvider F_ERROR fProvider
public Object get Children Object parent Plugin Model Base model Plugin Model Base get Input Context get Model Array List result new Array List if parent instanceof I Plugin Base I Plugin Base plugin Base I Plugin Base parent if plugin Base get Libraries length 0 result add f Libraries if plugin Base get Imports length 0 result add f Imports if plugin Base get Extension Points length 0 result add f Extension Points if plugin Base get Extensions length 0 result add f Extensions return result to Array if parent f Libraries return model get Plugin Base get Libraries if parent f Imports return model get Plugin Base get Imports if parent f Extension Points return model get Plugin Base get Extension Points if parent f Extensions return model get Plugin Base get Extensions return new Object 0  getChildren PluginModelBase PluginModelBase getInputContext getModel ArrayList ArrayList IPluginBase IPluginBase pluginBase IPluginBase pluginBase getLibraries fLibraries pluginBase getImports fImports pluginBase getExtensionPoints fExtensionPoints pluginBase getExtensions fExtensions toArray fLibraries getPluginBase getLibraries fImports getPluginBase getImports fExtensionPoints getPluginBase getExtensionPoints fExtensions getPluginBase getExtensions
public Object get Parent Object element if element instanceof I Document Node return I Document Node element get Parent Node return null  getParent IDocumentNode IDocumentNode getParentNode
public boolean has Children Object element if element instanceof I Plugin Base return I Document Node element get Child Nodes length 0 return element f Libraries element f Imports element f Extension Points element f Extensions  hasChildren IPluginBase IDocumentNode getChildNodes fLibraries fImports fExtensionPoints fExtensions
public Object get Elements Object input Element if input Element instanceof I Plugin Model Base return new Object I Plugin Model Base input Element get Plugin Base return new Object 0  getElements inputElement inputElement IPluginModelBase IPluginModelBase inputElement getPluginBase
public Manifest Source Page PDE Form Editor editor String id String title super editor id title  ManifestSourcePage PDEFormEditor
see org eclipse pde internal ui neweditor XML Source Page dispose public void dispose super dispose  XMLSourcePage
protected I Label Provider create Outline Label Provider return new Outline Label Provider  ILabelProvider createOutlineLabelProvider OutlineLabelProvider
return new Outline Label Provider protected I Tree Content Provider create Outline Content Provider return new Content Provider  OutlineLabelProvider ITreeContentProvider createOutlineContentProvider ContentProvider
protected void outline Selection Changed Selection Changed Event event I Selection selection event get Selection if selection instanceof I Structured Selection I Structured Selection structured Selection I Structured Selection selection Object first structured Selection get First Element if first instanceof I Document Node first instanceof I Plugin Base set Highlight Range I Document Node first else reset Highlight Range  outlineSelectionChanged SelectionChangedEvent ISelection getSelection IStructuredSelection IStructuredSelection structuredSelection IStructuredSelection structuredSelection getFirstElement IDocumentNode IPluginBase setHighlightRange IDocumentNode resetHighlightRange
public void set Highlight Range I Document Node node I Source Viewer source Viewer get Source Viewer if source Viewer null return I Document document source Viewer get Document if document null return int offset node get Offset int length node get Length set Highlight Range offset length 1 1 length true source Viewer set Selected Range offset 1 node getXML Tag Name length  setHighlightRange IDocumentNode ISourceViewer sourceViewer getSourceViewer sourceViewer IDocument sourceViewer getDocument getOffset getLength setHighlightRange sourceViewer setSelectedRange getXMLTagName

public static final String KEY VERSION TITLE Manifest Editor Plugin Spec Section version Title NON NLS 1 param form Page param parent param add Reexport public Match Section PDE Form Page form Page Composite parent boolean add Reexport super form Page parent Section DESCRIPTION get Section set Text PDE Plugin get Resource String Match Section title NON NLS 1 get Section set Description PDE Plugin get Resource String Match Section desc NON NLS 1 this add Reexport add Reexport create Client get Section form Page get Editor get Toolkit  KEY_VERSION_TITLE ManifestEditor PluginSpecSection versionTitle formPage addReexport MatchSection PDEFormPage formPage addReexport formPage getSection setText PDEPlugin getResourceString MatchSection getSection setDescription PDEPlugin getResourceString MatchSection addReexport addReexport createClient getSection formPage getEditor getToolkit
create Client get Section form Page get Editor get Toolkit public Match Section PDE Form Page form Page Composite parent this form Page parent true  createClient getSection formPage getEditor getToolkit MatchSection PDEFormPage formPage formPage
public void commit boolean on Save if is Dirty false return if current Import null multi Selection null version Text get Text is Enabled version Text commit String value version Text get Value int match I Plugin Import NONE if value null value length 0 apply Version value match get Match apply Match match super commit on Save  onSave isDirty currentImport multiSelection versionText getText isEnabled versionText versionText getValue IPluginImport applyVersion getMatch applyMatch onSave
super commit on Save public void cancel Edit version Text cancel Edit super cancel Edit  onSave cancelEdit versionText cancelEdit cancelEdit
get Editor get Editor Site get Action Bars public void text Value Changed Form Entry text try String value text get Value if value null value length 0 if is Osgi Mode Plugin Version Identifier pvi new Plugin Version Identifier text get Value String formatted pvi to String text set Value formatted true apply Version formatted else apply Version value else apply Version null catch Throwable e text set Value current Import get Version true String message PDE Plugin get Resource String KEY VERSION FORMAT Message Dialog open Error PDE Plugin get Active Workbench Shell PDE Plugin get Resource String KEY VERSION TITLE message  getEditor getEditorSite getActionBars textValueChanged FormEntry getValue isOsgiMode PluginVersionIdentifier PluginVersionIdentifier getValue toString setValue applyVersion applyVersion applyVersion setValue currentImport getVersion PDEPlugin getResourceString KEY_VERSION_FORMAT MessageDialog openError PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString KEY_VERSION_TITLE
public void text Dirty Form Entry text if block Changes return mark Dirty block Changes true if is Osgi Mode reset Match Combo current Import block Changes false  textDirty FormEntry blockChanges markDirty blockChanges isOsgiMode resetMatchCombo currentImport blockChanges
match Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e if block Changes apply Match match Combo get Selection Index  matchCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent blockChanges applyMatch matchCombo getSelectionIndex
public void create Client Section section Form Toolkit toolkit toolkit create Composite Separator section Composite container toolkit create Composite section Grid Layout layout new Grid Layout layout num Columns 2 layout vertical Spacing 9 layout margin Width layout margin Height 2 container set Layout layout if add Reexport create Optional Button toolkit container create Reexport Button toolkit container version Text new Form Entry container toolkit PDE Plugin get Resource String KEY VERSION null false version Text set Form Entry Listener new Form Entry Adapter this get Page get Editor get Editor Site get Action Bars public void text Value Changed Form Entry text try String value text get Value if value null value length 0 if is Osgi Mode Plugin Version Identifier pvi new Plugin Version Identifier text get Value String formatted pvi to String text set Value formatted true apply Version formatted else apply Version value else apply Version null catch Throwable e text set Value current Import get Version true String message PDE Plugin get Resource String KEY VERSION FORMAT Message Dialog open Error PDE Plugin get Active Workbench Shell PDE Plugin get Resource String KEY VERSION TITLE message public void text Dirty Form Entry text if block Changes return mark Dirty block Changes true if is Osgi Mode reset Match Combo current Import block Changes false match Label toolkit create Label container PDE Plugin get Resource String KEY RULE match Label set Foreground toolkit get Colors get Color Form Colors TITLE match Combo new Combo Part match Combo create Control container toolkit SWT READ ONLY match Combo add PDE Plugin get Resource String KEY NONE match Combo add PDE Plugin get Resource String KEY EQUIVALENT match Combo add PDE Plugin get Resource String KEY COMPATIBLE match Combo add PDE Plugin get Resource String KEY PERFECT match Combo add PDE Plugin get Resource String KEY GREATER match Combo pack match Combo get Control set Layout Data new Grid Data Grid Data FILL HORIZONTAL match Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e if block Changes apply Match match Combo get Selection Index toolkit paint Borders For container initialize update I Plugin Reference null section set Client container  createClient FormToolkit createCompositeSeparator createComposite GridLayout GridLayout numColumns verticalSpacing marginWidth marginHeight setLayout addReexport createOptionalButton createReexportButton versionText FormEntry PDEPlugin getResourceString KEY_VERSION versionText setFormEntryListener FormEntryAdapter getPage getEditor getEditorSite getActionBars textValueChanged FormEntry getValue isOsgiMode PluginVersionIdentifier PluginVersionIdentifier getValue toString setValue applyVersion applyVersion applyVersion setValue currentImport getVersion PDEPlugin getResourceString KEY_VERSION_FORMAT MessageDialog openError PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString KEY_VERSION_TITLE textDirty FormEntry blockChanges markDirty blockChanges isOsgiMode resetMatchCombo currentImport blockChanges matchLabel createLabel PDEPlugin getResourceString KEY_RULE matchLabel setForeground getColors getColor FormColors matchCombo ComboPart matchCombo createControl READ_ONLY matchCombo PDEPlugin getResourceString KEY_NONE matchCombo PDEPlugin getResourceString KEY_EQUIVALENT matchCombo PDEPlugin getResourceString KEY_COMPATIBLE matchCombo PDEPlugin getResourceString KEY_PERFECT matchCombo PDEPlugin getResourceString KEY_GREATER matchCombo matchCombo getControl setLayoutData GridData GridData FILL_HORIZONTAL matchCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent blockChanges applyMatch matchCombo getSelectionIndex paintBordersFor IPluginReference setClient
private void create Reexport Button Form Toolkit toolkit Composite container reexport Button toolkit create Button container PDE Plugin get Resource String KEY REEXPORT SWT CHECK reexport Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e if block Changes return if current Import instanceof I Plugin Import return if current Import null try I Plugin Import iimport I Plugin Import current Import iimport set Reexported reexport Button get Selection catch Core Exception ex PDE Plugin log Exception ex Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 reexport Button set Layout Data gd  createReexportButton FormToolkit reexportButton createButton PDEPlugin getResourceString KEY_REEXPORT reexportButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent blockChanges currentImport IPluginImport currentImport IPluginImport IPluginImport currentImport setReexported reexportButton getSelection CoreException PDEPlugin logException GridData GridData GridData FILL_HORIZONTAL horizontalSpan reexportButton setLayoutData
private void create Optional Button Form Toolkit toolkit Composite container optional Button toolkit create Button container PDE Plugin get Resource String KEY OPTIONAL SWT CHECK optional Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e if block Changes return if current Import instanceof I Plugin Import return if current Import null try I Plugin Import iimport I Plugin Import current Import ignore Model Events true iimport set Optional optional Button get Selection ignore Model Events false catch Core Exception ex PDE Plugin log Exception ex Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 optional Button set Layout Data gd  createOptionalButton FormToolkit optionalButton createButton PDEPlugin getResourceString KEY_OPTIONAL optionalButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent blockChanges currentImport IPluginImport currentImport IPluginImport IPluginImport currentImport ignoreModelEvents setOptional optionalButton getSelection ignoreModelEvents CoreException PDEPlugin logException GridData GridData GridData FILL_HORIZONTAL horizontalSpan optionalButton setLayoutData
private void apply Version String version try if current Import null current Import set Version version else if multi Selection null for Iterator iter multi Selection iterator iter has Next I Plugin Reference reference I Plugin Reference iter next reference set Version version catch Core Exception ex PDE Plugin log Exception ex  applyVersion currentImport currentImport setVersion multiSelection multiSelection hasNext IPluginReference IPluginReference setVersion CoreException PDEPlugin logException
private void apply Match int match try if current Import null current Import set Match match else if multi Selection null for Iterator iter multi Selection iterator iter has Next I Plugin Reference reference I Plugin Reference iter next reference set Match match catch Core Exception ex PDE Plugin log Exception ex  applyMatch currentImport currentImport setMatch multiSelection multiSelection hasNext IPluginReference IPluginReference setMatch CoreException PDEPlugin logException
private int get Match return match Combo get Selection Index  getMatch matchCombo getSelectionIndex
public boolean can Paste Clipboard clipboard Transfer Data types clipboard get Available Types Transfer transfers new Transfer Text Transfer get Instance RTF Transfer get Instance for int i 0 i types length i for int j 0 j transfers length j if transfers j is Supported Type types i return true return false  canPaste TransferData getAvailableTypes TextTransfer getInstance RTFTransfer getInstance isSupportedType
public void dispose I Model model I Model get Page get Model if model instanceof I Model Change Provider I Model Change Provider model remove Model Changed Listener this super dispose  IModel IModel getPage getModel IModelChangeProvider IModelChangeProvider removeModelChangedListener
private void initialize I Base Model model get Page get Model if model instanceof I Model Change Provider I Model Change Provider model add Model Changed Listener this update Mode  IBaseModel getPage getModel IModelChangeProvider IModelChangeProvider addModelChangedListener updateMode
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event REMOVE Object obj e get Changed Objects 0 if obj equals current Import update I Plugin Reference null else if e get Change Type I Model Changed Event CHANGE Object object e get Changed Objects 0 if object equals current Import update current Import  modelChanged IModelChangedEvent getChangeType IModelChangedEvent getChangedObjects currentImport IPluginReference getChangeType IModelChangedEvent getChangedObjects currentImport currentImport
public void selection Changed I Form Part part I Selection selection I Structured Selection ssel I Structured Selection selection if ssel size 1 Object change Object I Structured Selection selection get First Element I Plugin Reference input null if change Object instanceof Import Object input Import Object change Object get Import else if change Object instanceof I Plugin Reference input I Plugin Reference change Object update input else update ssel  selectionChanged IFormPart ISelection IStructuredSelection IStructuredSelection changeObject IStructuredSelection getFirstElement IPluginReference changeObject ImportObject ImportObject changeObject getImport changeObject IPluginReference IPluginReference changeObject
private void reset Match Combo I Plugin Reference iimport String text version Text get Text get Text boolean enable is Editable text length 0 match Combo get Control set Enabled enable set Match Combo iimport  resetMatchCombo IPluginReference versionText getText getText isEditable matchCombo getControl setEnabled setMatchCombo
set Match Combo iimport private void set Match Combo I Plugin Reference iimport int match iimport null iimport get Match I Match Rules NONE match Combo select match  setMatchCombo setMatchCombo IPluginReference getMatch IMatchRules matchCombo
protected void update I Structured Selection selection block Changes true current Import null int size selection size if size 0 version Text set Value null true boolean enable State false version Text get Text set Editable enable State match Combo get Control set Enabled enable State match Combo set Text NON NLS 1 block Changes false return if multi Selection null multi Selection equals selection is Editable commit false multi Selection selection version Text get Text set Editable is Editable if size 1 I Plugin Reference ref I Plugin Reference selection get First Element version Text set Value ref get Version reset Match Combo ref else version Text set Value NON NLS 1 match Combo get Control set Enabled true set Match Combo null block Changes false  IStructuredSelection blockChanges currentImport versionText setValue enableState versionText getText setEditable enableState matchCombo getControl setEnabled enableState matchCombo setText blockChanges multiSelection multiSelection isEditable multiSelection versionText getText setEditable isEditable IPluginReference IPluginReference getFirstElement versionText setValue getVersion resetMatchCombo versionText setValue matchCombo getControl setEnabled setMatchCombo blockChanges
protected void update I Plugin Reference iimport block Changes true if iimport null if add Reexport optional Button set Selection false optional Button set Enabled false reexport Button set Selection false reexport Button set Enabled false version Text set Value null true boolean enable State false version Text get Text set Editable enable State match Combo get Control set Enabled enable State match Combo set Text NON NLS 1 current Import null block Changes false return if current Import null iimport equals current Import is Editable commit false current Import iimport if current Import instanceof I Plugin Import I Plugin Import pimport I Plugin Import current Import optional Button set Enabled is Editable optional Button set Selection pimport is Optional reexport Button set Enabled is Editable reexport Button set Selection pimport is Reexported version Text get Text set Editable is Editable version Text set Value current Import get Version reset Match Combo current Import block Changes false  IPluginReference blockChanges addReexport optionalButton setSelection optionalButton setEnabled reexportButton setSelection reexportButton setEnabled versionText setValue enableState versionText getText setEditable enableState matchCombo getControl setEnabled enableState matchCombo setText currentImport blockChanges currentImport currentImport isEditable currentImport currentImport IPluginImport IPluginImport IPluginImport currentImport optionalButton setEnabled isEditable optionalButton setSelection isOptional reexportButton setEnabled isEditable reexportButton setSelection isReexported versionText getText setEditable isEditable versionText setValue currentImport getVersion resetMatchCombo currentImport blockChanges
return Returns the osgi Mode public boolean is Osgi Mode return osgi Mode  osgiMode isOsgiMode osgiMode
param osgi Mode The osgi Mode to set public void set Osgi Mode boolean osgi Mode this osgi Mode osgi Mode update Mode  osgiMode osgiMode setOsgiMode osgiMode osgiMode osgiMode updateMode
private void update Mode hide the match combo match Label set Visible is Osgi Mode match Combo get Control set Visible is Osgi Mode  updateMode matchLabel setVisible isOsgiMode matchCombo getControl setVisible isOsgiMode

public New Element Action I Schema Element element Info I Plugin Parent parent this counters PDE Plugin get Default get Default Name Counters this element Info element Info this project project this parent parent set Text get Element Name set Image Descriptor PDE Plugin Images DESC GENERIC XML OBJ I Resource resource parent get Model get Underlying Resource if resource null project resource get Project set Enabled parent get Model is Editable  NewElementAction ISchemaElement elementInfo IPluginParent PDEPlugin getDefault getDefaultNameCounters elementInfo elementInfo setText getElementName setImageDescriptor PDEPluginImages DESC_GENERIC_XML_OBJ IResource getModel getUnderlyingResource getProject setEnabled getModel isEditable
public String create Default Class Name I Schema Attribute att Info int counter String tag att Info get Parent get Name String project Name project get Name String package Name project Name String expected Type att Info get Based On String class Name NON NLS 1 if expected Type null String Buffer buf new String Buffer tag buf set Char At 0 Character to Upper Case tag char At 0 class Name buf to String else package will be the same as the plugin ID class name will be generated based on the required interface class Name expected Type int dot Loc class Name last Index Of if dot Loc 1 class Name class Name substring dot Loc 1 if class Name length 2 class Name char At 0 I Character is Upper Case class Name char At 1 class Name class Name substring 1 class Name counter return package Name class Name NON NLS 1  createDefaultClassName ISchemaAttribute attInfo attInfo getParent getName projectName getName packageName projectName expectedType attInfo getBasedOn className expectedType StringBuffer StringBuffer setCharAt toUpperCase charAt className toString className expectedType dotLoc className lastIndexOf dotLoc className className dotLoc className className charAt isUpperCase className charAt className className className packageName className
public String create Default Name I Schema Attribute att Info int counter if att Info get Type get Name equals boolean NON NLS 1 return true NON NLS 1 String tag att Info get Parent get Name return project get Name tag counter NON NLS 1  createDefaultName ISchemaAttribute attInfo attInfo getType getName attInfo getParent getName getName
return project get Name tag counter NON NLS 1 private String get Counter Key I Schema Element element Info return element Info get Schema get Qualified Point Id element Info get Name NON NLS 1  getName getCounterKey ISchemaElement elementInfo elementInfo getSchema getQualifiedPointId elementInfo getName
return element Info get Schema get Qualified Point Id element Info get Name NON NLS 1 private String get Element Name return element Info null element Info get Name UNKNOWN ELEMENT TAG  elementInfo getSchema getQualifiedPointId elementInfo getName getElementName elementInfo elementInfo getName UNKNOWN_ELEMENT_TAG
private void initialize Required Attribute I Plugin Element element I Schema Attribute att Info int counter throws Core Exception String value null if att Info get Kind I Schema Attribute JAVA value create Default Class Name att Info counter else value create Default Name att Info counter element set Attribute att Info get Name value  initializeRequiredAttribute IPluginElement ISchemaAttribute attInfo CoreException attInfo getKind ISchemaAttribute createDefaultClassName attInfo createDefaultName attInfo setAttribute attInfo getName
private void initialize Required Attributes I Plugin Element element throws Core Exception I Schema Element element Info I Schema Element I Plugin Element element get Element Info if element Info null return String counter Key get Counter Key element Info Integer counter Integer counters get counter Key if counter null counter new Integer 1 else counter new Integer counter int Value 1 counters put counter Key counter I Schema Attribute attributes element Info get Attributes for int i 0 i attributes length i I Schema Attribute att Info attributes i if att Info get Use I Schema Attribute REQUIRED continue initialize Required Attribute element att Info counter int Value  initializeRequiredAttributes IPluginElement CoreException ISchemaElement elementInfo ISchemaElement IPluginElement getElementInfo elementInfo counterKey getCounterKey elementInfo counterKey intValue counterKey ISchemaAttribute elementInfo getAttributes ISchemaAttribute attInfo attInfo getUse ISchemaAttribute initializeRequiredAttribute attInfo intValue
public void run I Plugin Element new Element parent get Model get Factory create Element parent try new Element set Name get Element Name initialize Required Attributes new Element parent add new Element catch Core Exception e PDE Plugin log Exception e  IPluginElement newElement getModel getFactory createElement newElement setName getElementName initializeRequiredAttributes newElement newElement CoreException PDEPlugin logException

class Duplicate Status Validator public I Status validate String text if libraries null libraries length 0 return new Status I Status OK PDE Plugin get Plugin Id I Status OK NON NLS 1 null if library Set contains new Path Classpath Util Core expand Library Name text return new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR PDE Plugin get Resource String Manifest Editor Runtime Library Dialog validation Error NON NLS 1 null return new Status I Status OK PDE Plugin get Plugin Id I Status OK NON NLS 1 null  DuplicateStatusValidator IStatus IStatus PDEPlugin getPluginId IStatus librarySet ClasspathUtilCore expandLibraryName IStatus PDEPlugin getPluginId IStatus PDEPlugin getResourceString ManifestEditor RuntimeLibraryDialog validationError IStatus PDEPlugin getPluginId IStatus
public New Runtime Library Dialog Shell parent I Plugin Library libraries super parent this libraries libraries this validator new Duplicate Status Validator library Set new Hash Set for int i 0 i libraries length i library Set add new Path Classpath Util Core expand Library Name libraries i get Name set Status Line Above Buttons true  NewRuntimeLibraryDialog IPluginLibrary DuplicateStatusValidator librarySet HashSet librarySet ClasspathUtilCore expandLibraryName getName setStatusLineAboveButtons
see org eclipse ui dialogs Selection Status Dialog compute Result protected void compute Result  SelectionStatusDialog computeResult computeResult
protected Control create Dialog Area Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height layout margin Width 8 layout num Columns 1 layout make Columns Equal Width false container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH container set Layout Data gd Label library Label new Label container SWT NULL gd new Grid Data Grid Data FILL HORIZONTAL library Label set Layout Data gd library Label set Text PDE Plugin get Resource String Manifest Editor Runtime Library Dialog label NON NLS 1 library Text new Text container SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL library Text set Layout Data gd library Text set Text PDE Plugin get Resource String Manifest Editor Runtime Library Dialog default NON NLS 1 library Text add Modify Listener new Modify Listener public void modify Text Modify Event e update Status validator validate library Text get Text apply Dialog Font container return container  createDialogArea GridLayout GridLayout marginHeight marginWidth numColumns makeColumnsEqualWidth setLayout GridData GridData GridData FILL_BOTH setLayoutData libraryLabel GridData GridData FILL_HORIZONTAL libraryLabel setLayoutData libraryLabel setText PDEPlugin getResourceString ManifestEditor RuntimeLibraryDialog libraryText GridData GridData FILL_HORIZONTAL libraryText setLayoutData libraryText setText PDEPlugin getResourceString ManifestEditor RuntimeLibraryDialog libraryText addModifyListener ModifyListener modifyText ModifyEvent updateStatus libraryText getText applyDialogFont
public int open library Text set Text library jar NON NLS 1 library Text set Selection 0 library Text get Text length 4 return super open  libraryText setText libraryText setSelection libraryText getText
return super open public String get Library Name return library Name  getLibraryName libraryName
see org eclipse ui dialogs Selection Status Dialog ok Pressed protected void ok Pressed library Name library Text get Text super ok Pressed  SelectionStatusDialog okPressed okPressed libraryName libraryText getText okPressed

private Plugin Export Action f Export Action param editor param id param title public Overview Page Form Editor editor super editor PAGE ID PDE Plugin get Resource String Overview Page tab Name NON NLS 1  PluginExportAction fExportAction OverviewPage FormEditor PAGE_ID PDEPlugin getResourceString OverviewPage tabName
super editor PAGE ID PDE Plugin get Resource String Overview Page tab Name NON NLS 1 protected String get Help Resource return PDE Plugin get Resource String Overview Page help manifest NON NLS 1  PAGE_ID PDEPlugin getResourceString OverviewPage tabName getHelpResource PDEPlugin getResourceString OverviewPage
protected void create Form Content I Managed Form managed Form super create Form Content managed Form Scrolled Form form managed Form get Form Form Toolkit toolkit managed Form get Toolkit form set Text PDE Plugin get Resource String Manifest Editor Overview Page title NON NLS 1 fill Body managed Form toolkit managed Form refresh  createFormContent IManagedForm managedForm createFormContent managedForm ScrolledForm managedForm getForm FormToolkit managedForm getToolkit setText PDEPlugin getResourceString ManifestEditor OverviewPage fillBody managedForm managedForm
private void fill Body I Managed Form managed Form Form Toolkit toolkit Composite body managed Form get Form get Body Table Wrap Layout layout new Table Wrap Layout layout bottom Margin 10 layout top Margin 5 layout left Margin 10 layout right Margin 10 layout num Columns 2 layout vertical Spacing 20 layout horizontal Spacing 10 body set Layout layout alerts create Alert Section managed Form body toolkit sections create General Info Section managed Form body toolkit create Content Section managed Form body toolkit create Testing Section managed Form body toolkit create Deploying Section managed Form body toolkit  fillBody IManagedForm managedForm FormToolkit managedForm getForm getBody TableWrapLayout TableWrapLayout bottomMargin topMargin leftMargin rightMargin numColumns verticalSpacing horizontalSpacing setLayout createAlertSection managedForm createGeneralInfoSection managedForm createContentSection managedForm createTestingSection managedForm createDeployingSection managedForm
section get Section set Layout Data td private void create General Info Section I Managed Form managed Form Composite parent Form Toolkit toolkit managed Form add Part new General Info Section this parent  getSection setLayoutData createGeneralInfoSection IManagedForm managedForm FormToolkit managedForm addPart GeneralInfoSection
private void create Content Section I Managed Form managed Form Composite parent Form Toolkit toolkit Section section create Static Section parent toolkit Form Text text if is Fragment section set Text PDE Plugin get Resource String Manifest Editor Content Section ftitle NON NLS 1 text create Client section fcontent Text toolkit else section set Text PDE Plugin get Resource String Manifest Editor Content Section title NON NLS 1 text create Client section content Text toolkit PDE Label Provider lp PDE Plugin get Default get Label Provider text set Image page lp get PDE Plugin Images DESC PAGE OBJ NON NLS 1 PDE Label Provider F EDIT  createContentSection IManagedForm managedForm FormToolkit createStaticSection FormText isFragment setText PDEPlugin getResourceString ManifestEditor ContentSection createClient fcontentText setText PDEPlugin getResourceString ManifestEditor ContentSection createClient contentText PDELabelProvider PDEPlugin getDefault getLabelProvider setImage PDEPluginImages DESC_PAGE_OBJ PDELabelProvider F_EDIT
info set Background section get Title Bar Gradient Background info add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e Workbench Help display Help Resource PDE Plugin get Resource String Overview Page help pde Running NON NLS 1  setBackground getTitleBarGradientBackground addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent WorkbenchHelp displayHelpResource PDEPlugin getResourceString OverviewPage pdeRunning
private void create Testing Section I Managed Form managed Form Composite parent Form Toolkit toolkit Section section create Static Section parent toolkit section set Text PDE Plugin get Resource String Manifest Editor Testing Section title NON NLS 1 Image Hyperlink info new Image Hyperlink section SWT NULL toolkit adapt info true true Image image PDE Plugin get Default get Label Provider get PDE Plugin Images DESC HELP info set Image image info set Background section get Title Bar Gradient Background info add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e Workbench Help display Help Resource PDE Plugin get Resource String Overview Page help pde Running NON NLS 1 section set Text Client info Form Text text if is Fragment text create Client section ftesting Text toolkit else text create Client section testing Text toolkit PDE Label Provider lp PDE Plugin get Default get Label Provider text set Image run lp get PDE Plugin Images DESC RUN EXC NON NLS 1 text set Image debug lp get PDE Plugin Images DESC DEBUG EXC NON NLS 1 text set Image workbench lp NON NLS 1 get PDE Plugin Images DESC WORKBENCH LAUNCHER WIZ  createTestingSection IManagedForm managedForm FormToolkit createStaticSection setText PDEPlugin getResourceString ManifestEditor TestingSection ImageHyperlink ImageHyperlink PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_HELP setImage setBackground getTitleBarGradientBackground addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent WorkbenchHelp displayHelpResource PDEPlugin getResourceString OverviewPage pdeRunning setTextClient FormText isFragment createClient ftestingText createClient testingText PDELabelProvider PDEPlugin getDefault getLabelProvider setImage PDEPluginImages DESC_RUN_EXC setImage PDEPluginImages DESC_DEBUG_EXC setImage PDEPluginImages DESC_WORKBENCH_LAUNCHER_WIZ
info set Image image info add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e Workbench Help display Help Resource PDE Plugin get Resource String Overview Page help deploy NON NLS 1  setImage addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent WorkbenchHelp displayHelpResource PDEPlugin getResourceString OverviewPage
private void create Deploying Section I Managed Form managed Form Composite parent Form Toolkit toolkit Section section create Static Section parent toolkit section set Text PDE Plugin get Resource String Manifest Editor Deploying Section title NON NLS 1 Image Hyperlink info new Image Hyperlink section SWT NULL toolkit adapt info true true Image image PDE Plugin get Default get Label Provider get PDE Plugin Images DESC HELP info set Image image info add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e Workbench Help display Help Resource PDE Plugin get Resource String Overview Page help deploy NON NLS 1 info set Background section get Title Bar Gradient Background section set Text Client info if is Fragment create Client section fdeploying Text toolkit else create Client section deploying Text toolkit  createDeployingSection IManagedForm managedForm FormToolkit createStaticSection setText PDEPlugin getResourceString ManifestEditor DeployingSection ImageHyperlink ImageHyperlink PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_HELP setImage addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent WorkbenchHelp displayHelpResource PDEPlugin getResourceString OverviewPage setBackground getTitleBarGradientBackground setTextClient isFragment createClient fdeployingText createClient deployingText
private Section create Static Section Composite parent Form Toolkit toolkit Section section toolkit create Section parent Section TITLE BAR section client Vertical Spacing PDE Section CLIENT VSPACING toolkit create Composite Separator section return section  createStaticSection FormToolkit createSection TITLE_BAR clientVerticalSpacing PDESection CLIENT_VSPACING createCompositeSeparator
private Form Text create Client Section section String content Form Toolkit toolkit Form Text text toolkit create Form Text section true try text set Text content true false catch SWT Exception e text set Text e get Message false false section set Client text section set Layout Data new Table Wrap Data Table Wrap Data FILL GRAB text add Hyperlink Listener this return text  FormText createClient FormToolkit FormText createFormText setText SWTException setText getMessage setClient setLayoutData TableWrapData TableWrapData FILL_GRAB addHyperlinkListener
private boolean is Fragment I Plugin Model Base model I Plugin Model Base getPDE Editor get Context Manager get Aggregate Model return model is Fragment Model  isFragment IPluginModelBase IPluginModelBase getPDEEditor getContextManager getAggregateModel isFragmentModel
public void link Activated Hyperlink Event e String href String e get Href try page references if href equals dependencies NON NLS 1 get Editor set Active Page Dependencies Page PAGE ID else if href equals runtime NON NLS 1 get Editor set Active Page Runtime Page PAGE ID else if href equals extensions NON NLS 1 get Editor set Active Page Extensions Page PAGE ID else if href equals ex points NON NLS 1 get Editor set Active Page Extension Points Page PAGE ID else if href equals build NON NLS 1 get Editor set Active Page Build Page PAGE ID else if href equals action run NON NLS 1 get Launch Shortcut run else if href equals action debug NON NLS 1 get Launch Shortcut debug else if href equals export NON NLS 1 get Export Action run  linkActivated HyperlinkEvent getHref getEditor setActivePage DependenciesPage PAGE_ID getEditor setActivePage RuntimePage PAGE_ID getEditor setActivePage ExtensionsPage PAGE_ID getEditor setActivePage ExtensionPointsPage PAGE_ID getEditor setActivePage BuildPage PAGE_ID getLaunchShortcut getLaunchShortcut getExportAction
public void link Entered Hyperlink Event e I Status Line Manager mng get Editor get Editor Site get Action Bars get Status Line Manager mng set Message e get Label  linkEntered HyperlinkEvent IStatusLineManager getEditor getEditorSite getActionBars getStatusLineManager setMessage getLabel
public void link Exited Hyperlink Event e I Status Line Manager mng get Editor get Editor Site get Action Bars get Status Line Manager mng set Message null  linkExited HyperlinkEvent IStatusLineManager getEditor getEditorSite getActionBars getStatusLineManager setMessage
private Runtime Workbench Shortcut get Launch Shortcut if f Launch Shortcut null f Launch Shortcut new Runtime Workbench Shortcut return f Launch Shortcut  RuntimeWorkbenchShortcut getLaunchShortcut fLaunchShortcut fLaunchShortcut RuntimeWorkbenchShortcut fLaunchShortcut
private Plugin Export Action get Export Action if f Export Action null f Export Action new Plugin Export Action PDE Form Editor get Editor return f Export Action  PluginExportAction getExportAction fExportAction fExportAction PluginExportAction PDEFormEditor getEditor fExportAction

public static final String PACKAGE MESSAGE Package Selection Dialog label NON NLS 1 public Package Selection Dialog Shell parent I Label Provider renderer I Java Project j Project this parent renderer j Project new Vector  PACKAGE_MESSAGE PackageSelectionDialog PackageSelectionDialog ILabelProvider IJavaProject jProject jProject
param parent param renderer public Package Selection Dialog Shell parent I Label Provider renderer I Java Project j Project Vector existing Packages super parent renderer set Elements j Project existing Packages set Multiple Selection true set Message PDE Plugin get Resource String PACKAGE MESSAGE  PackageSelectionDialog ILabelProvider IJavaProject jProject existingPackages setElements jProject existingPackages setMultipleSelection setMessage PDEPlugin getResourceString PACKAGE_MESSAGE
private void set Elements I Java Project j Project Vector existing Packages Hash Map map new Hash Map try I Package Fragment Root roots get Roots j Project for int i 0 i roots length i I Java Element children roots i get Children for int j 0 j children length j I Package Fragment fragment I Package Fragment children j if fragment has Children existing Packages contains fragment get Element Name map put fragment get Element Name fragment catch Java Model Exception e set Elements map values to Array  setElements IJavaProject jProject existingPackages HashMap HashMap IPackageFragmentRoot getRoots jProject IJavaElement getChildren IPackageFragment IPackageFragment hasChildren existingPackages getElementName getElementName JavaModelException setElements toArray
private I Package Fragment Root get Roots I Java Project j Project Array List result new Array List try I Package Fragment Root roots j Project get Package Fragment Roots for int i 0 i roots length i if roots i get Kind I Package Fragment Root K SOURCE roots i is Archive roots i is External result add roots i catch Java Model Exception e return I Package Fragment Root result to Array new I Package Fragment Root result size  IPackageFragmentRoot getRoots IJavaProject jProject ArrayList ArrayList IPackageFragmentRoot jProject getPackageFragmentRoots getKind IPackageFragmentRoot K_SOURCE isArchive isExternal JavaModelException IPackageFragmentRoot toArray IPackageFragmentRoot
protected Control create Dialog Area Composite parent Control control super create Dialog Area parent get Shell set Text PDE Plugin get Resource String Package Selection Dialog title NON NLS 1 return control  createDialogArea createDialogArea getShell setText PDEPlugin getResourceString PackageSelectionDialog

implements I Structured Content Provider public Object get Elements Object parent return get Exceptions  IStructuredContentProvider getElements getExceptions
implements I Table Label Provider public String get Column Text Object obj int index return obj to String  ITableLabelProvider getColumnText toString
return obj to String public Image get Column Image Object obj int index return JavaUI get Shared Images get Image I Shared Images IMG OBJS PACKAGE  toString getColumnImage getSharedImages getImage ISharedImages IMG_OBJS_PACKAGE
public Plugin Activation Section PDE Form Page page Composite parent super page parent Section DESCRIPTION new String PDE Plugin get Resource String Manifest Editor OS Gi Section add NON NLS 1 PDE Plugin get Resource String Manifest Editor OS Gi Section remove NON NLS 1 get Section set Text PDE Plugin get Resource String Plugin Activation Section title NON NLS 1 get Section set Description PDE Plugin get Resource String Plugin Activation Section desc NON NLS 1  PluginActivationSection PDEFormPage PDEPlugin getResourceString ManifestEditor OSGiSection PDEPlugin getResourceString ManifestEditor OSGiSection getSection setText PDEPlugin getResourceString PluginActivationSection getSection setDescription PDEPlugin getResourceString PluginActivationSection
private void update f Do Activate Button set Enabled is Editable f Do Activate Button set Selection is Auto Start f Do Not Activate Button set Selection is Auto Start f Do Not Activate Button set Enabled is Editable enable Buttons  fDoActivateButton setEnabled isEditable fDoActivateButton setSelection isAutoStart fDoNotActivateButton setSelection isAutoStart fDoNotActivateButton setEnabled isEditable enableButtons
private boolean is Auto Start Manifest Element element get Manifest Element return element null true false equals element get Value NON NLS 1  isAutoStart ManifestElement getManifestElement getValue
private String get Exceptions Manifest Element element get Manifest Element if element null return new String 0 String exceptions element get Attribute exceptions NON NLS 1 if exceptions null return new String 0 Array List tokens new Array List String Tokenizer tok new String Tokenizer exceptions NON NLS 1 while tok has More Tokens tokens add tok next Token trim return String tokens to Array new String tokens size  getExceptions ManifestElement getManifestElement getAttribute ArrayList ArrayList StringTokenizer StringTokenizer hasMoreTokens nextToken toArray
private Manifest Element get Manifest Element I Bundle Model model get Bundle Model if model null String value model get Bundle get Header ECLIPSE AUTOSTART if value null try Manifest Element elements Manifest Element parse Header ECLIPSE AUTOSTART value if elements null elements length 0 return elements 0 catch Bundle Exception e return null  ManifestElement getManifestElement IBundleModel getBundleModel getBundle getHeader ECLIPSE_AUTOSTART ManifestElement ManifestElement parseHeader ECLIPSE_AUTOSTART BundleException
see org eclipse pde internal ui neweditor PDE Section is Editable public boolean is Editable return get Page get Model is Editable get Bundle Model null  PDESection isEditable isEditable getPage getModel isEditable getBundleModel
public void dispose Input Context Manager context Manager get Page getPDE Editor get Context Manager if context Manager null context Manager remove Input Context Listener this I Bundle Model model get Bundle Model if model null model remove Model Changed Listener this f Bold Font dispose super dispose  InputContextManager contextManager getPage getPDEEditor getContextManager contextManager contextManager removeInputContextListener IBundleModel getBundleModel removeModelChangedListener fBoldFont
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id handle Remove return true return false  doGlobalAction actionId actionId ActionFactory getId handleRemove
protected void fill Context Menu I Menu Manager manager get Page getPDE Editor get Contributor context Menu About To Show manager  fillContextMenu IMenuManager getPage getPDEEditor getContributor contextMenuAboutToShow
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event WORLD CHANGED mark Stale return if event get Changed Property equals ECLIPSE AUTOSTART refresh  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale getChangedProperty ECLIPSE_AUTOSTART
public void refresh f Exceptions Table Viewer refresh f Do Activate Button set Selection is Auto Start f Do Not Activate Button set Selection is Auto Start super refresh  fExceptionsTableViewer fDoActivateButton setSelection isAutoStart fDoNotActivateButton setSelection isAutoStart
private void initialize Fonts Font Data font Data get Section get Font get Font Data Font Data data if font Data length 0 data font Data 0 else data new Font Data data set Style SWT BOLD f Bold Font new Font get Section get Display font Data  initializeFonts FontData fontData getSection getFont getFontData FontData fontData fontData FontData setStyle fBoldFont getSection getDisplay fontData
manifest Link add Hyperlink Listener new I Hyperlink Listener public void link Activated Hyperlink Event e try get Page get Editor do Save null I Plugin Model Base model I Plugin Model Base get Page getPDE Editor get Aggregate Model PDE Plugin Converter convert ToOSGI Format model get Underlying Resource get Project model is Fragment Model fragment xml NON NLS 1 plugin xml new Null Progress Monitor NON NLS 1 catch Core Exception e1  manifestLink addHyperlinkListener IHyperlinkListener linkActivated HyperlinkEvent getPage getEditor doSave IPluginModelBase IPluginModelBase getPage getPDEEditor getAggregateModel PDEPluginConverter convertToOSGIFormat getUnderlyingResource getProject isFragmentModel NullProgressMonitor CoreException
public void link Exited Hyperlink Event e  linkExited HyperlinkEvent
public void link Exited Hyperlink Event e public void link Entered Hyperlink Event e  linkExited HyperlinkEvent linkEntered HyperlinkEvent
f Do Activate Button set Layout Data gd f Do Activate Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e write Header  fDoActivateButton setLayoutData fDoActivateButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent writeHeader
f Do Not Activate Button set Layout Data gd f Do Not Activate Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e write Header  fDoNotActivateButton setLayoutData fDoNotActivateButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent writeHeader
protected void create Client Section section Form Toolkit toolkit initialize Fonts Composite main Container toolkit create Composite section Grid Layout layout new Grid Layout layout margin Height layout margin Width 0 layout vertical Spacing 5 main Container set Layout layout main Container set Layout Data new Grid Data Grid Data FILL BOTH create new manifest part if get Page getPDE Editor get Aggregate Model is Editable top Book new Page Book main Container SWT NULL create a blank container that will be used to hide the text and the link when not needed blank Container toolkit create Composite top Book blank Container set Layout new Grid Layout Label label toolkit create Label blank Container null Grid Data gd new Grid Data gd height Hint 1 gd width Hint 1 label set Layout Data gd top Container toolkit create Composite top Book layout new Grid Layout layout margin Height layout margin Width 2 layout num Columns 2 layout make Columns Equal Width false top Container set Layout layout toolkit create Label top Container PDE Plugin get Resource String Plugin Activation Section manifest Required NON NLS 1 Hyperlink manifest Link toolkit create Hyperlink top Container PDE Plugin get Resource String Plugin Activation Section create Manifest SWT NULL NON NLS 1 manifest Link add Hyperlink Listener new I Hyperlink Listener public void link Activated Hyperlink Event e try get Page get Editor do Save null I Plugin Model Base model I Plugin Model Base get Page getPDE Editor get Aggregate Model PDE Plugin Converter convert ToOSGI Format model get Underlying Resource get Project model is Fragment Model fragment xml NON NLS 1 plugin xml new Null Progress Monitor NON NLS 1 catch Core Exception e1 public void link Exited Hyperlink Event e public void link Entered Hyperlink Event e bundle Mode Changed get Context Id equals Bundle Input Context CONTEXT ID Bottom parts Activation Rule Exceptions Composite bottom Container toolkit create Composite main Container layout new Grid Layout layout make Columns Equal Width true layout margin Height layout margin Width 0 layout num Columns 2 bottom Container set Layout layout bottom Container set Layout Data new Grid Data Grid Data FILL BOTH Activation rule part Composite rule Container toolkit create Composite bottom Container layout new Grid Layout layout margin Height layout margin Width 2 rule Container set Layout layout rule Container set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING Label activate Label toolkit create Label rule Container PDE Plugin get Resource String Plugin Activation Section rule NON NLS 1 activate Label set Font f Bold Font f Do Activate Button toolkit create Button rule Container PDE Plugin get Resource String Plugin Activation Section activate SWT RADIO NON NLS 1 Grid Data gd new Grid Data gd horizontal Indent 5 f Do Activate Button set Layout Data gd f Do Activate Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e write Header auto activate should be set to true by default with empty exceptions package list f Do Not Activate Button toolkit create Button rule Container PDE Plugin get Resource String Plugin Activation Section no Activate SWT RADIO NON NLS 1 gd new Grid Data gd horizontal Indent 5 f Do Not Activate Button set Layout Data gd f Do Not Activate Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e write Header Exceptions part Composite exceptions Container toolkit create Composite bottom Container layout new Grid Layout layout margin Width layout margin Height 2 layout vertical Spacing 3 exceptions Container set Layout layout exceptions Container set Layout Data new Grid Data Grid Data FILL BOTH Label exception Label toolkit create Label exceptions Container PDE Plugin get Resource String Plugin Activation Section exception title NON NLS 1 exception Label set Font f Bold Font exception Label set Layout Data new Grid Data Grid Data FILL HORIZONTAL Label label toolkit create Label exceptions Container PDE Plugin get Resource String Plugin Activation Section exception desc NON NLS 1 SWT WRAP gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 225 label set Layout Data gd Composite exceptions Pkg Container toolkit create Composite exceptions Container layout new Grid Layout layout margin Width layout margin Height 0 layout num Columns 2 exceptions Pkg Container set Layout layout exceptions Pkg Container set Layout Data new Grid Data Grid Data FILL BOTH create Viewer Part Control exceptions Pkg Container SWT FULL SELECTION 2 toolkit f Exceptions Table Viewer get Table Part get Table Viewer f Exceptions Table Viewer set Content Provider new Table Content Provider f Exceptions Table Viewer set Label Provider new Table Label Provider f Exceptions Table Viewer set Input get Bundle Model toolkit paint Borders For exceptions Container section set Client main Container I Bundle Model model get Bundle Model if model null model add Model Changed Listener this Input Context Manager context Manager get Page getPDE Editor get Context Manager if context Manager null context Manager add Input Context Listener this update  createClient FormToolkit initializeFonts mainContainer createComposite GridLayout GridLayout marginHeight marginWidth verticalSpacing mainContainer setLayout mainContainer setLayoutData GridData GridData FILL_BOTH getPage getPDEEditor getAggregateModel isEditable topBook PageBook mainContainer blankContainer createComposite topBook blankContainer setLayout GridLayout createLabel blankContainer GridData GridData heightHint widthHint setLayoutData topContainer createComposite topBook GridLayout marginHeight marginWidth numColumns makeColumnsEqualWidth topContainer setLayout createLabel topContainer PDEPlugin getResourceString PluginActivationSection manifestRequired manifestLink createHyperlink topContainer PDEPlugin getResourceString PluginActivationSection createManifest manifestLink addHyperlinkListener IHyperlinkListener linkActivated HyperlinkEvent getPage getEditor doSave IPluginModelBase IPluginModelBase getPage getPDEEditor getAggregateModel PDEPluginConverter convertToOSGIFormat getUnderlyingResource getProject isFragmentModel NullProgressMonitor CoreException linkExited HyperlinkEvent linkEntered HyperlinkEvent bundleModeChanged getContextId BundleInputContext CONTEXT_ID bottomContainer createComposite mainContainer GridLayout makeColumnsEqualWidth marginHeight marginWidth numColumns bottomContainer setLayout bottomContainer setLayoutData GridData GridData FILL_BOTH ruleContainer createComposite bottomContainer GridLayout marginHeight marginWidth ruleContainer setLayout ruleContainer setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING activateLabel createLabel ruleContainer PDEPlugin getResourceString PluginActivationSection activateLabel setFont fBoldFont fDoActivateButton createButton ruleContainer PDEPlugin getResourceString PluginActivationSection GridData GridData horizontalIndent fDoActivateButton setLayoutData fDoActivateButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent writeHeader fDoNotActivateButton createButton ruleContainer PDEPlugin getResourceString PluginActivationSection noActivate GridData horizontalIndent fDoNotActivateButton setLayoutData fDoNotActivateButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent writeHeader exceptionsContainer createComposite bottomContainer GridLayout marginWidth marginHeight verticalSpacing exceptionsContainer setLayout exceptionsContainer setLayoutData GridData GridData FILL_BOTH exceptionLabel createLabel exceptionsContainer PDEPlugin getResourceString PluginActivationSection exceptionLabel setFont fBoldFont exceptionLabel setLayoutData GridData GridData FILL_HORIZONTAL createLabel exceptionsContainer PDEPlugin getResourceString PluginActivationSection GridData GridData FILL_HORIZONTAL widthHint setLayoutData exceptionsPkgContainer createComposite exceptionsContainer GridLayout marginWidth marginHeight numColumns exceptionsPkgContainer setLayout exceptionsPkgContainer setLayoutData GridData GridData FILL_BOTH createViewerPartControl exceptionsPkgContainer FULL_SELECTION fExceptionsTableViewer getTablePart getTableViewer fExceptionsTableViewer setContentProvider TableContentProvider fExceptionsTableViewer setLabelProvider TableLabelProvider fExceptionsTableViewer setInput getBundleModel paintBordersFor exceptionsContainer setClient mainContainer IBundleModel getBundleModel addModelChangedListener InputContextManager contextManager getPage getPDEEditor getContextManager contextManager contextManager addInputContextListener
update protected void enable Buttons get Table Part set Button Enabled 0 is Editable get Table Part set Button Enabled 1 false  enableButtons getTablePart setButtonEnabled isEditable getTablePart setButtonEnabled
protected void button Selected int index if index 0 handle Add else if index 1 handle Remove  buttonSelected handleAdd handleRemove
private void handle Add I Plugin Model Base model I Plugin Model Base get Page get Model I Project project model get Underlying Resource get Project try if project has Nature Java Core NATURE ID Table Item existing Packages f Exceptions Table Viewer get Table get Items Vector existing new Vector for int i 0 i existing Packages length i existing add existing Packages i get Text I Label Provider label Provider new Java Element Label Provider Package Selection Dialog dialog new Package Selection Dialog f Exceptions Table Viewer get Table get Shell label Provider Java Core create project existing if dialog open Package Selection Dialog OK Object elements dialog get Result for int i 0 i elements length i f Exceptions Table Viewer add I Package Fragment elements i get Element Name write Header label Provider dispose catch Core Exception e  handleAdd IPluginModelBase IPluginModelBase getPage getModel IProject getUnderlyingResource getProject hasNature JavaCore NATURE_ID TableItem existingPackages fExceptionsTableViewer getTable getItems existingPackages existingPackages getText ILabelProvider labelProvider JavaElementLabelProvider PackageSelectionDialog PackageSelectionDialog fExceptionsTableViewer getTable getShell labelProvider JavaCore PackageSelectionDialog getResult fExceptionsTableViewer IPackageFragment getElementName writeHeader labelProvider CoreException
private void write Header String Buffer buffer new String Buffer buffer append f Do Activate Button get Selection true false NON NLS 1 NON NLS 2 Table Item items f Exceptions Table Viewer get Table get Items if items length 0 buffer append exceptions NON NLS 1 for int i 0 i items length i if i 0 buffer append NON NLS 1 buffer append items i get Data to String if i items length 1 buffer append System get Property line separator NON NLS 1 NON NLS 2 if items length 0 buffer append NON NLS 1 get Bundle Model get Bundle set Header ECLIPSE AUTOSTART buffer to String  writeHeader StringBuffer StringBuffer fDoActivateButton getSelection TableItem fExceptionsTableViewer getTable getItems getData toString getProperty getBundleModel getBundle setHeader ECLIPSE_AUTOSTART toString
private void handle Remove I Structured Selection ssel I Structured Selection f Exceptions Table Viewer get Selection Object items ssel to Array for int i 0 i items length i f Exceptions Table Viewer remove items i write Header  handleRemove IStructuredSelection IStructuredSelection fExceptionsTableViewer getSelection toArray fExceptionsTableViewer writeHeader
see org eclipse pde internal ui neweditor Table Section selection Changed org eclipse jface viewers I Structured Selection protected void selection Changed I Structured Selection selection get Table Part set Button Enabled 1 selection null selection is Empty  TableSection selectionChanged IStructuredSelection selectionChanged IStructuredSelection getTablePart setButtonEnabled isEmpty
public String get Context Id if get Plugin Base instanceof I Bundle Plugin Base return Bundle Input Context CONTEXT ID return Plugin Input Context CONTEXT ID  getContextId getPluginBase IBundlePluginBase BundleInputContext CONTEXT_ID PluginInputContext CONTEXT_ID
return Plugin Input Context CONTEXT ID private I Plugin Base get Plugin Base I Base Model model get Page getPDE Editor get Aggregate Model return I Plugin Model Base model get Plugin Base  PluginInputContext CONTEXT_ID IPluginBase getPluginBase IBaseModel getPage getPDEEditor getAggregateModel IPluginModelBase getPluginBase
private I Bundle Model get Bundle Model Input Context context get Page getPDE Editor get Context Manager find Context Bundle Input Context CONTEXT ID return context null I Bundle Model context get Model null  IBundleModel getBundleModel InputContext getPage getPDEEditor getContextManager findContext BundleInputContext CONTEXT_ID IBundleModel getModel
public void context Added Input Context context if context get Id equals Bundle Input Context CONTEXT ID return bundle added remove the text for manifest creation and enable controls bundle Mode Changed true  contextAdded InputContext getId BundleInputContext CONTEXT_ID bundleModeChanged
public void context Removed Input Context context if context get Id equals Bundle Input Context CONTEXT ID return bundle removed add the text for manifest creation and disable controls bundle Mode Changed false  contextRemoved InputContext getId BundleInputContext CONTEXT_ID bundleModeChanged
private void bundle Mode Changed boolean added if added get Page get Model is Editable top Book show Page blank Container else top Book show Page top Container if f Do Activate Button null update top Book get Parent layout get Managed Form reflow true f Exceptions Table Viewer set Input get Bundle Model  bundleModeChanged getPage getModel isEditable topBook showPage blankContainer topBook showPage topContainer fDoActivateButton topBook getParent getManagedForm fExceptionsTableViewer setInput getBundleModel
see org eclipse pde internal ui editor context I Input Context Listener monitored File Added org eclipse core resources I File public void monitored File Added I File monitored File  IInputContextListener monitoredFileAdded IFile monitoredFileAdded IFile monitoredFile
see org eclipse pde internal ui editor context I Input Context Listener monitored File Removed org eclipse core resources I File public boolean monitored File Removed I File monitored File return false  IInputContextListener monitoredFileRemoved IFile monitoredFileRemoved IFile monitoredFile

public class Plugin Export Action extends Action private PDE Form Editor f Editor public Plugin Export Action PDE Form Editor editor f Editor editor  PluginExportAction PDEFormEditor fEditor PluginExportAction PDEFormEditor fEditor
f Editor editor public Plugin Export Action  fEditor PluginExportAction
try I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor f Editor do Save monitor  IRunnableWithProgress IRunnableWithProgress IProgressMonitor fEditor doSave
private void ensure Content Saved if f Editor is Dirty try I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor f Editor do Save monitor PlatformUI get Workbench get Progress Service run InUI PDE Plugin get Active Workbench Window op PDE Plugin get Workspace get Root catch Invocation Target Exception e PDE Plugin log Exception e catch Interrupted Exception e  ensureContentSaved fEditor isDirty IRunnableWithProgress IRunnableWithProgress IProgressMonitor fEditor doSave getWorkbench getProgressService runInUI PDEPlugin getActiveWorkbenchWindow PDEPlugin getWorkspace getRoot InvocationTargetException PDEPlugin logException InterruptedException
public void run if f Editor null ensure Content Saved Plugin Export Wizard wizard new Plugin Export Wizard I Structured Selection selection I Resource resource null if f Editor null resource I Model f Editor get Aggregate Model get Underlying Resource if resource null selection new Structured Selection resource else selection new Structured Selection wizard init PlatformUI get Workbench selection Wizard Dialog wd new Resizable Wizard Dialog PDE Plugin get Active Workbench Shell wizard wd create wd get Shell set Size 450 600 int result wd open notify Result result Wizard Dialog OK  fEditor ensureContentSaved PluginExportWizard PluginExportWizard IStructuredSelection IResource fEditor IModel fEditor getAggregateModel getUnderlyingResource StructuredSelection StructuredSelection getWorkbench WizardDialog ResizableWizardDialog PDEPlugin getActiveWorkbenchShell getShell setSize notifyResult WizardDialog

private boolean f Is Fragment param editor param input public Plugin Input Context PDE Form Editor editor I Editor Input input boolean primary boolean is Fragment super editor input primary f Is Fragment is Fragment create  fIsFragment PluginInputContext PDEFormEditor IEditorInput isFragment fIsFragment isFragment
protected I Base Model create Model I Editor Input input throws Core Exception boolean has Bundle get Editor get Context Manager has Context Bundle Input Context CONTEXT ID Plugin Model Base model null if input instanceof I Storage Editor Input boolean is Reconciling input instanceof I File Editor Input I Document document get Document Provider get Document input if f Is Fragment model new Fragment Model document is Reconciling else model new Plugin Model document is Reconciling if input instanceof I File Editor Input I File file I File Editor Input input get File model set Underlying Resource file model set Charset file get Charset else if input instanceof System File Editor Input File file File System File Editor Input input get Adapter File class model set Install Location file get Parent model set Charset get Default Charset else model set Charset get Default Charset model load return model  IBaseModel createModel IEditorInput CoreException hasBundle getEditor getContextManager hasContext BundleInputContext CONTEXT_ID PluginModelBase IStorageEditorInput isReconciling IFileEditorInput IDocument getDocumentProvider getDocument fIsFragment FragmentModel isReconciling PluginModel isReconciling IFileEditorInput IFile IFileEditorInput getFile setUnderlyingResource setCharset getCharset SystemFileEditorInput SystemFileEditorInput getAdapter setInstallLocation getParent setCharset getDefaultCharset setCharset getDefaultCharset
see org eclipse pde internal ui neweditor Input Context get Id public String get Id return CONTEXT ID  InputContext getId getId CONTEXT_ID
return CONTEXT ID public boolean is Fragment return f Is Fragment  CONTEXT_ID isFragment fIsFragment
protected void reorder Insert Edits Array List ops Hash Map map get Operation Table Iterator iter map key Set iterator Text Edit runtime Insert null Text Edit requires Insert null Array List extension Point Inserts new Array List Array List extension Inserts new Array List while iter has Next Object object iter next if object instanceof I Document Node I Document Node node I Document Node object if node get Parent Node instanceof Plugin Base Node Text Edit edit Text Edit map get node if edit instanceof Insert Edit if node getXML Tag Name equals runtime NON NLS 1 runtime Insert edit else if node getXML Tag Name equals requires NON NLS 1 requires Insert edit else if node getXML Tag Name equals extension NON NLS 1 extension Inserts add edit else if node getXML Tag Name equals extension point NON NLS 1 extension Point Inserts add edit for int i 0 i ops size i Text Edit edit Text Edit ops get i if edit instanceof Insert Edit if extension Point Inserts contains edit ops remove edit ops add 0 edit if requires Insert null ops remove requires Insert ops add 0 requires Insert if runtime Insert null ops remove runtime Insert ops add 0 runtime Insert  reorderInsertEdits ArrayList HashMap getOperationTable keySet TextEdit runtimeInsert TextEdit requiresInsert ArrayList extensionPointInserts ArrayList ArrayList extensionInserts ArrayList hasNext IDocumentNode IDocumentNode IDocumentNode getParentNode PluginBaseNode TextEdit TextEdit InsertEdit getXMLTagName runtimeInsert getXMLTagName requiresInsert getXMLTagName extensionInserts getXMLTagName extensionPointInserts TextEdit TextEdit InsertEdit extensionPointInserts requiresInsert requiresInsert requiresInsert runtimeInsert runtimeInsert runtimeInsert
public void do Revert f Edit Operations clear f Operation Table clear f Move Operations clear Abstract Editing Model model Abstract Editing Model get Model model reconciled model get Document  doRevert fEditOperations fOperationTable fMoveOperations AbstractEditingModel AbstractEditingModel getModel getDocument

private Bundle Plugin Model Base bmodel public Plugin Input Context Manager PDE Form Editor editor super editor  BundlePluginModelBase PluginInputContextManager PDEFormEditor
public I Base Model get Aggregate Model if bmodel null return bmodel return find Plugin Model  IBaseModel getAggregateModel findPluginModel
public I Model get Plugin Model if bmodel null return bmodel get Extensions Model return find Plugin Model  IModel getPluginModel getExtensionsModel findPluginModel
protected void fire Context Change Input Context context boolean added super fire Context Change context added if context get Id equals Bundle Input Context CONTEXT ID if added bundle arriving bundle Added context else bundle going away bundle Removed context else if context get Id equals Build Input Context CONTEXT ID if added build Added context else build Removed context else if context get Id equals Plugin Input Context CONTEXT ID if added plugin Added context else plugin Removed context  fireContextChange InputContext fireContextChange getId BundleInputContext CONTEXT_ID bundleAdded bundleRemoved getId BuildInputContext CONTEXT_ID buildAdded buildRemoved getId PluginInputContext CONTEXT_ID pluginAdded pluginRemoved
private void bundle Added Input Context bundle Context I Bundle Model model I Bundle Model bundle Context get Model if model is Fragment Model bmodel new Bundle Fragment Model else bmodel new Bundle Plugin Model bmodel set Bundle Model model sync Extensions  bundleAdded InputContext bundleContext IBundleModel IBundleModel bundleContext getModel isFragmentModel BundleFragmentModel BundlePluginModel setBundleModel syncExtensions
private void sync Extensions I Model emodel find Plugin Model if emodel null emodel instanceof I Shared Extensions Model bmodel set Extensions Model I Shared Extensions Model emodel transfer Listeners emodel bmodel else bmodel set Extensions Model null  syncExtensions IModel findPluginModel ISharedExtensionsModel setExtensionsModel ISharedExtensionsModel transferListeners setExtensionsModel
private I Model find Plugin Model Input Context pcontext find Context Plugin Input Context CONTEXT ID if pcontext null return I Model pcontext get Model else return null  IModel findPluginModel InputContext findContext PluginInputContext CONTEXT_ID IModel getModel
private void bundle Removed Input Context bundle Context if bmodel null Bundle Plugin Model Base preserved bmodel bmodel null I Model emodel find Plugin Model if emodel null transfer Listeners preserved emodel  bundleRemoved InputContext bundleContext BundlePluginModelBase IModel findPluginModel transferListeners
smodel transfer Listeners To tmodel new I Model Changed Listener Filter public boolean accept I Model Changed Listener listener if listener instanceof I Form Part listener instanceof Form Outline Page return true return false  transferListenersTo IModelChangedListenerFilter IModelChangedListener IFormPart FormOutlinePage
private void transfer Listeners I Model source I Model target if source instanceof I Model Change Provider Extension target instanceof I Model Change Provider Extension I Model Change Provider Extension smodel I Model Change Provider Extension source I Model Change Provider Extension tmodel I Model Change Provider Extension target first fire one last event to all the listeners to refresh smodel fire Model Changed new Model Changed Event smodel I Model Changed Event WORLD CHANGED null null now pass the listener to the target model smodel transfer Listeners To tmodel new I Model Changed Listener Filter public boolean accept I Model Changed Listener listener if listener instanceof I Form Part listener instanceof Form Outline Page return true return false  transferListeners IModel IModel IModelChangeProviderExtension IModelChangeProviderExtension IModelChangeProviderExtension IModelChangeProviderExtension IModelChangeProviderExtension IModelChangeProviderExtension fireModelChanged ModelChangedEvent IModelChangedEvent WORLD_CHANGED transferListenersTo IModelChangedListenerFilter IModelChangedListener IFormPart FormOutlinePage
private void plugin Added Input Context plugin Context if bmodel null sync Extensions  pluginAdded InputContext pluginContext syncExtensions
sync Extensions private void plugin Removed Input Context plugin Context if bmodel null sync Extensions  syncExtensions pluginRemoved InputContext pluginContext syncExtensions
sync Extensions private void build Added Input Context build Context  syncExtensions buildAdded InputContext buildContext
private void build Added Input Context build Context private void build Removed Input Context build Context  buildAdded InputContext buildContext buildRemoved InputContext buildContext

public class Plugin Undo Manager extends Model Undo Manager public Plugin Undo Manager PDE Form Editor editor super editor set Undo Level Limit 30  PluginUndoManager ModelUndoManager PluginUndoManager PDEFormEditor setUndoLevelLimit
protected String get Page Id Object obj if obj instanceof I Plugin Base return Overview Page PAGE ID if obj instanceof I Plugin Import return Dependencies Page PAGE ID if obj instanceof I Plugin Library obj instanceof I Plugin Element I Plugin Element obj get Parent instanceof I Plugin Library return Runtime Page PAGE ID if obj instanceof I Plugin Extension obj instanceof I Plugin Element I Plugin Element obj get Parent instanceof I Plugin Parent obj instanceof I Plugin Attribute return Extensions Page PAGE ID if obj instanceof I Plugin Extension Point return Extension Points Page PAGE ID return null  getPageId IPluginBase OverviewPage PAGE_ID IPluginImport DependenciesPage PAGE_ID IPluginLibrary IPluginElement IPluginElement getParent IPluginLibrary RuntimePage PAGE_ID IPluginExtension IPluginElement IPluginElement getParent IPluginParent IPluginAttribute ExtensionsPage PAGE_ID IPluginExtensionPoint ExtensionPointsPage PAGE_ID
protected void execute I Model Changed Event event boolean undo Object elements event get Changed Objects int type event get Change Type String property Name event get Changed Property I Model Change Provider model I Model Change Provider event get Change Provider switch type case I Model Changed Event INSERT if undo execute Remove model elements else execute Add model elements break case I Model Changed Event REMOVE if undo execute Add model elements else execute Remove model elements break case I Model Changed Event CHANGE if event instanceof Attribute Changed Event execute Attribute Change Attribute Changed Event event undo else if undo execute Change elements 0 property Name event get New Value event get Old Value else execute Change elements 0 property Name event get Old Value event get New Value  IModelChangedEvent getChangedObjects getChangeType propertyName getChangedProperty IModelChangeProvider IModelChangeProvider getChangeProvider IModelChangedEvent executeRemove executeAdd IModelChangedEvent executeAdd executeRemove IModelChangedEvent AttributeChangedEvent executeAttributeChange AttributeChangedEvent executeChange propertyName getNewValue getOldValue executeChange propertyName getOldValue getNewValue
private void execute Add I Model Change Provider model Object elements I Plugin Base plugin Base null I Build build null if model instanceof I Plugin Model Base plugin Base I Plugin Model Base model get Plugin Base if model instanceof I Build Model build I Build Model model get Build try for int i 0 i elements length i Object element elements i if element instanceof I Plugin Import plugin Base add I Plugin Import element else if element instanceof I Plugin Library plugin Base add I Plugin Library element else if element instanceof I Plugin Extension Point plugin Base add I Plugin Extension Point element else if element instanceof I Plugin Extension plugin Base add I Plugin Extension element else if element instanceof I Plugin Element I Plugin Element e I Plugin Element element Object parent e get Parent if parent instanceof Plugin Library Node e instanceof Plugin Element Node Plugin Library Node parent add Content Filter Plugin Element Node e else if parent instanceof I Plugin Parent I Plugin Parent parent add e else if element instanceof I Build Entry I Build Entry e I Build Entry element build add e catch Core Exception e PDE Plugin log Exception e  executeAdd IModelChangeProvider IPluginBase pluginBase IBuild IPluginModelBase pluginBase IPluginModelBase getPluginBase IBuildModel IBuildModel getBuild IPluginImport pluginBase IPluginImport IPluginLibrary pluginBase IPluginLibrary IPluginExtensionPoint pluginBase IPluginExtensionPoint IPluginExtension pluginBase IPluginExtension IPluginElement IPluginElement IPluginElement getParent PluginLibraryNode PluginElementNode PluginLibraryNode addContentFilter PluginElementNode IPluginParent IPluginParent IBuildEntry IBuildEntry IBuildEntry CoreException PDEPlugin logException
private void execute Remove I Model Change Provider model Object elements I Plugin Base plugin Base null I Build build null if model instanceof I Plugin Model Base plugin Base I Plugin Model Base model get Plugin Base if model instanceof I Build Model build I Build Model model get Build try for int i 0 i elements length i Object element elements i if element instanceof I Plugin Import plugin Base remove I Plugin Import element else if element instanceof I Plugin Library plugin Base remove I Plugin Library element else if element instanceof I Plugin Extension Point plugin Base remove I Plugin Extension Point element else if element instanceof I Plugin Extension plugin Base remove I Plugin Extension element else if element instanceof I Plugin Element I Plugin Element e I Plugin Element element Object parent e get Parent if parent instanceof Plugin Library Node e instanceof Plugin Element Node Plugin Library Node parent remove Content Filter Plugin Element Node e else if parent instanceof I Plugin Parent I Plugin Parent parent remove e else if element instanceof I Build Entry I Build Entry e I Build Entry element build remove e catch Core Exception e PDE Plugin log Exception e  executeRemove IModelChangeProvider IPluginBase pluginBase IBuild IPluginModelBase pluginBase IPluginModelBase getPluginBase IBuildModel IBuildModel getBuild IPluginImport pluginBase IPluginImport IPluginLibrary pluginBase IPluginLibrary IPluginExtensionPoint pluginBase IPluginExtensionPoint IPluginExtension pluginBase IPluginExtension IPluginElement IPluginElement IPluginElement getParent PluginLibraryNode PluginElementNode PluginLibraryNode removeContentFilter PluginElementNode IPluginParent IPluginParent IBuildEntry IBuildEntry IBuildEntry CoreException PDEPlugin logException
private void execute Attribute Change Attribute Changed Event e boolean undo Plugin Element element Plugin Element e get Changed Objects 0 Plugin Attribute att Plugin Attribute e get Chaged Attribute Object old Value e get Old Value Object new Value e get New Value try if undo element set Attribute att get Name old Value to String else element set Attribute att get Name new Value to String catch Core Exception ex PDE Plugin log Exception ex  executeAttributeChange AttributeChangedEvent PluginElement PluginElement getChangedObjects PluginAttribute PluginAttribute getChagedAttribute oldValue getOldValue newValue getNewValue setAttribute getName oldValue toString setAttribute getName newValue toString CoreException PDEPlugin logException
private void execute Change Object element String property Name Object old Value Object new Value if element instanceof Plugin Object Plugin Object pobj Plugin Object element try pobj restore Property property Name old Value new Value catch Core Exception e PDE Plugin log Exception e else if element instanceof Build Object Build Object bobj Build Object element try bobj restore Property property Name old Value new Value catch Core Exception e PDE Plugin log Exception e else if element instanceof Plugin Object Node Plugin Object Node node Plugin Object Node element String new String new Value null new Value to String null node setXML Attribute property Name new String  executeChange propertyName oldValue newValue PluginObject PluginObject PluginObject restoreProperty propertyName oldValue newValue CoreException PDEPlugin logException BuildObject BuildObject BuildObject restoreProperty propertyName oldValue newValue CoreException PDEPlugin logException PluginObjectNode PluginObjectNode PluginObjectNode newString newValue newValue toString setXMLAttribute propertyName newString
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event CHANGE Object changed Object event get Changed Objects 0 if changed Object instanceof I Plugin Object I Plugin Object obj I Plugin Object event get Changed Objects 0 Ignore events from objects that are not yet in the model if obj instanceof I Plugin Base obj is In The Model false return if changed Object instanceof I Build Object I Build Object obj I Build Object event get Changed Objects 0 Ignore events from objects that are not yet in the model if obj is In The Model false return super model Changed event  modelChanged IModelChangedEvent getChangeType IModelChangedEvent changedObject getChangedObjects changedObject IPluginObject IPluginObject IPluginObject getChangedObjects IPluginBase isInTheModel changedObject IBuildObject IBuildObject IBuildObject getChangedObjects isInTheModel modelChanged

class Import Content Provider extends Default Table Provider public Object get Elements Object parent if imports null create Import Objects return imports to Array  ImportContentProvider DefaultTableProvider getElements createImportObjects toArray
private void create Import Objects imports new Vector I Plugin Model Base model I Plugin Model Base get Page get Model I Plugin Import iimports model get Plugin Base get Imports for int i 0 i iimports length i I Plugin Import iimport iimports i imports add new Import Object iimport  createImportObjects IPluginModelBase IPluginModelBase getPage getModel IPluginImport getPluginBase getImports IPluginImport ImportObject
public Requires Section Dependencies Page page Composite parent super page parent Section DESCRIPTION new String PDE Plugin get Resource String Requires Section add null PDE Plugin get Resource String Requires Section up PDE Plugin get Resource String Requires Section down NON NLS 1 NON NLS 2 NON NLS 3 get Section set Text PDE Plugin get Resource String Requires Section title NON NLS 1 boolean fragment I Plugin Model Base get Page get Model is Fragment Model if fragment get Section set Description PDE Plugin get Resource String Requires Section f Desc NON NLS 1 else get Section set Description PDE Plugin get Resource String Requires Section desc NON NLS 1 get Table Part set Editable false  RequiresSection DependenciesPage PDEPlugin getResourceString RequiresSection PDEPlugin getResourceString RequiresSection PDEPlugin getResourceString RequiresSection getSection setText PDEPlugin getResourceString RequiresSection IPluginModelBase getPage getModel isFragmentModel getSection setDescription PDEPlugin getResourceString RequiresSection fDesc getSection setDescription PDEPlugin getResourceString RequiresSection getTablePart setEditable
public void create Client Section section Form Toolkit toolkit Composite container create Client Container section 2 toolkit create Viewer Part Control container SWT SINGLE 2 toolkit Table Part table Part get Table Part import Table table Part get Table Viewer import Table set Content Provider new Import Content Provider import Table set Label Provider PDE Plugin get Default get Label Provider toolkit paint Borders For container make Actions section set Client container initialize  createClient FormToolkit createClientContainer createViewerPartControl TablePart tablePart getTablePart importTable tablePart getTableViewer importTable setContentProvider ImportContentProvider importTable setLabelProvider PDEPlugin getDefault getLabelProvider paintBordersFor makeActions setClient
protected void selection Changed I Structured Selection sel get Page getPDE Editor set Selection sel if get Page get Model is Editable update Directional Buttons  selectionChanged IStructuredSelection getPage getPDEEditor setSelection getPage getModel isEditable updateDirectionalButtons
private void update Directional Buttons Table table get Table Part get Table Viewer get Table Table Item selection table get Selection boolean has Selection selection length 0 boolean can Move table get Item Count 1 Table Part table Part get Table Part table Part set Button Enabled 2 can Move has Selection table get Selection Index 0 table Part set Button Enabled 3 can Move has Selection table get Selection Index table get Item Count 1  updateDirectionalButtons getTablePart getTableViewer getTable TableItem getSelection hasSelection canMove getItemCount TablePart tablePart getTablePart tablePart setButtonEnabled canMove hasSelection getSelectionIndex tablePart setButtonEnabled canMove hasSelection getSelectionIndex getItemCount
protected void handle Double Click I Structured Selection sel handle Open sel  handleDoubleClick IStructuredSelection handleOpen
protected void button Selected int index switch index case 0 handle New break case 2 handle Up break case 3 handle Down  buttonSelected handleNew handleUp handleDown
public void dispose I Plugin Model Base model I Plugin Model Base get Page get Model if model null model remove Model Changed Listener this PDE Core get Default get Workspace Model Manager remove Model Provider Listener this PDE Core get Default get External Model Manager remove Model Provider Listener this super dispose  IPluginModelBase IPluginModelBase getPage getModel removeModelChangedListener PDECore getDefault getWorkspaceModelManager removeModelProviderListener PDECore getDefault getExternalModelManager removeModelProviderListener
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id handle Delete return true if action Id equals Action Factory CUT get Id delete here and let the editor transfer the selection to the clipboard handle Delete return false if action Id equals Action Factory PASTE get Id do Paste return true return false  doGlobalAction actionId actionId ActionFactory getId handleDelete actionId ActionFactory getId handleDelete actionId ActionFactory getId doPaste
see org eclipse pde internal ui editor Structured Viewer Section do Paste protected void do Paste  StructuredViewerSection doPaste doPaste
public boolean set Form Input Object object if object instanceof I Plugin Import Import Object iobj new Import Object I Plugin Import object import Table set Selection new Structured Selection iobj true return true return false  setFormInput IPluginImport ImportObject ImportObject IPluginImport importTable setSelection StructuredSelection
protected void fill Context Menu I Menu Manager manager I Selection selection import Table get Selection manager add new Action if selection is Empty manager add open Action manager add new Separator get Page context Menu About To Show manager if selection is Empty manager add delete Action get Page getPDE Editor get Contributor context Menu About To Show manager manager add new Separator Plugin Search Action Group action Group new Plugin Search Action Group action Group set Context new Action Context selection action Group fill Context Menu manager if I Model get Page get Model get Underlying Resource null manager add new Unused Dependencies Action I Plugin Model Base get Page get Model  fillContextMenu IMenuManager ISelection importTable getSelection newAction isEmpty openAction getPage contextMenuAboutToShow isEmpty deleteAction getPage getPDEEditor getContributor contextMenuAboutToShow PluginSearchActionGroup actionGroup PluginSearchActionGroup actionGroup setContext ActionContext actionGroup fillContextMenu IModel getPage getModel getUnderlyingResource UnusedDependenciesAction IPluginModelBase getPage getModel
private void handle Open I Selection sel if sel instanceof I Structured Selection I Structured Selection ssel I Structured Selection sel if ssel size 1 handle Open ssel get First Element  handleOpen ISelection IStructuredSelection IStructuredSelection IStructuredSelection handleOpen getFirstElement
private void handle Open Object obj if obj instanceof Import Object I Plugin plugin Import Object obj get Plugin if plugin null Manifest Editor open Plugin Editor plugin  handleOpen ImportObject IPlugin ImportObject getPlugin ManifestEditor openPluginEditor
private void handle Delete I Structured Selection ssel I Structured Selection import Table get Selection if ssel is Empty return I Plugin Model Base model I Plugin Model Base get Page get Model I Plugin Base plugin Base model get Plugin Base try for Iterator iter ssel iterator iter has Next Import Object iobj Import Object iter next plugin Base remove iobj get Import catch Core Exception e PDE Plugin log Exception e refresh  handleDelete IStructuredSelection IStructuredSelection importTable getSelection isEmpty IPluginModelBase IPluginModelBase getPage getModel IPluginBase pluginBase getPluginBase hasNext ImportObject ImportObject pluginBase getImport CoreException PDEPlugin logException
private void handle New I Plugin Model Base model I Plugin Model Base get Page get Model Plugin Selection Dialog dialog new Plugin Selection Dialog PDE Plugin get Active Workbench Shell get Available Plugins model true dialog create if dialog open Plugin Selection Dialog OK Object models dialog get Result for int i 0 i models length i try I Plugin Model candidate I Plugin Model models i I Plugin Import import Node model get Plugin Factory create Import import Node set Id candidate get Plugin get Id model get Plugin Base add import Node catch Core Exception e  handleNew IPluginModelBase IPluginModelBase getPage getModel PluginSelectionDialog PluginSelectionDialog PDEPlugin getActiveWorkbenchShell getAvailablePlugins PluginSelectionDialog getResult IPluginModel IPluginModel IPluginImport importNode getPluginFactory createImport importNode setId getPlugin getId getPluginBase importNode CoreException
private void handle Up int index get Table Part get Table Viewer get Table get Selection Index if index 1 return swap index index 1  handleUp getTablePart getTableViewer getTable getSelectionIndex
private void handle Down Table table get Table Part get Table Viewer get Table int index table get Selection Index if index table get Item Count 1 return swap index index 1  handleDown getTablePart getTableViewer getTable getSelectionIndex getItemCount
public void swap int index1 int index2 Table table get Table Part get Table Viewer get Table I Plugin Import dep1 Import Object table get Item index1 get Data get Import I Plugin Import dep2 Import Object table get Item index2 get Data get Import try I Plugin Model Base model I Plugin Model Base get Page get Model I Plugin Base plugin Base model get Plugin Base plugin Base swap dep1 dep2 catch Core Exception e PDE Plugin log Exception e  getTablePart getTableViewer getTable IPluginImport ImportObject getItem getData getImport IPluginImport ImportObject getItem getData getImport IPluginModelBase IPluginModelBase getPage getModel IPluginBase pluginBase getPluginBase pluginBase CoreException PDEPlugin logException
private I Plugin Model Base get Available Plugins I Plugin Model Base model I Plugin Model Base plugins PDE Core get Default get Model Manager get Plugins Only Hash Set existing Imports Plugin Selection Dialog get Existing Imports model get Plugin Base Array List result new Array List for int i 0 i plugins length i if existing Imports contains plugins i get Plugin Base get Id result add plugins i return I Plugin Model Base result to Array new I Plugin Model Base result size  IPluginModelBase getAvailablePlugins IPluginModelBase IPluginModelBase PDECore getDefault getModelManager getPluginsOnly HashSet existingImports PluginSelectionDialog getExistingImports getPluginBase ArrayList ArrayList existingImports getPluginBase getId IPluginModelBase toArray IPluginModelBase
public void initialize I Plugin Model Base model I Plugin Model Base get Page get Model import Table set Input model get Plugin Base get Table Part set Button Enabled 0 model is Editable get Table Part set Button Enabled 2 false get Table Part set Button Enabled 3 false model add Model Changed Listener this PDE Core get Default get Workspace Model Manager add Model Provider Listener this PDE Core get Default get External Model Manager add Model Provider Listener this new Action set Enabled model is Editable delete Action set Enabled model is Editable buildpath Action set Enabled model is Editable  IPluginModelBase IPluginModelBase getPage getModel importTable setInput getPluginBase getTablePart setButtonEnabled isEditable getTablePart setButtonEnabled getTablePart setButtonEnabled addModelChangedListener PDECore getDefault getWorkspaceModelManager addModelProviderListener PDECore getDefault getExternalModelManager addModelProviderListener newAction setEnabled isEditable deleteAction setEnabled isEditable buildpathAction setEnabled isEditable
private void make Actions new Action new Action PDE Plugin get Resource String Requires Section add NON NLS 1 public void run handle New  makeActions newAction PDEPlugin getResourceString RequiresSection handleNew
open Action new Action PDE Plugin get Resource String Requires Section open NON NLS 1 public void run handle Open import Table get Selection  openAction PDEPlugin getResourceString RequiresSection handleOpen importTable getSelection
delete Action new Action PDE Plugin get Resource String Requires Section delete NON NLS 1 public void run handle Delete  deleteAction PDEPlugin getResourceString RequiresSection handleDelete
buildpath Action new Action PDE Plugin get Resource String Requires Section compute NON NLS 1 public void run Object model get Page get Model if model instanceof I Plugin Model Base compute Build Path I Plugin Model Base model true  buildpathAction PDEPlugin getResourceString RequiresSection getPage getModel IPluginModelBase computeBuildPath IPluginModelBase
private void make Actions new Action new Action PDE Plugin get Resource String Requires Section add NON NLS 1 public void run handle New open Action new Action PDE Plugin get Resource String Requires Section open NON NLS 1 public void run handle Open import Table get Selection delete Action new Action PDE Plugin get Resource String Requires Section delete NON NLS 1 public void run handle Delete buildpath Action new Action PDE Plugin get Resource String Requires Section compute NON NLS 1 public void run Object model get Page get Model if model instanceof I Plugin Model Base compute Build Path I Plugin Model Base model true  makeActions newAction PDEPlugin getResourceString RequiresSection handleNew openAction PDEPlugin getResourceString RequiresSection handleOpen importTable getSelection deleteAction PDEPlugin getResourceString RequiresSection handleDelete buildpathAction PDEPlugin getResourceString RequiresSection getPage getModel IPluginModelBase computeBuildPath IPluginModelBase
public void refresh imports null import Table refresh super refresh  importTable
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event WORLD CHANGED mark Stale return if event get Changed Property I Plugin Base P IMPORT ORDER refresh update Directional Buttons return Object change Object event get Changed Objects 0 if change Object instanceof I Plugin Import I Plugin Import iimport I Plugin Import change Object if event get Change Type I Model Changed Event INSERT Import Object iobj new Import Object iimport imports add iobj import Table add iobj import Table set Selection new Structured Selection iobj true import Table get Table set Focus else Import Object iobj find Import Object iimport if iobj null if event get Change Type I Model Changed Event REMOVE imports remove iobj import Table remove iobj else import Table update iobj null else import Table update I Structured Selection import Table get Selection to Array null  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale getChangedProperty IPluginBase P_IMPORT_ORDER updateDirectionalButtons changeObject getChangedObjects changeObject IPluginImport IPluginImport IPluginImport changeObject getChangeType IModelChangedEvent ImportObject ImportObject importTable importTable setSelection StructuredSelection importTable getTable setFocus ImportObject findImportObject getChangeType IModelChangedEvent importTable importTable importTable IStructuredSelection importTable getSelection toArray
if control is Disposed control get Display async Exec new Runnable public void run if control is Disposed import Table refresh  isDisposed getDisplay asyncExec isDisposed importTable
public void models Changed I Model Provider Event e imports null final Control control import Table get Control if control is Disposed control get Display async Exec new Runnable public void run if control is Disposed import Table refresh  modelsChanged IModelProviderEvent importTable getControl isDisposed getDisplay asyncExec isDisposed importTable
private Import Object find Import Object I Plugin Import iimport if imports null return null for int i 0 i imports size i Import Object iobj Import Object imports get i if iobj get Import equals iimport return iobj return null  ImportObject findImportObject IPluginImport ImportObject ImportObject getImport
I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception monitor begin Task PDE Plugin get Resource String Requires Section update 1 NON NLS 1 try if save get Page get Editor is Dirty get Page get Editor do Save monitor Classpath Util Core set Classpath model monitor monitor worked 1 catch Core Exception e throw new Invocation Target Exception e finally monitor done  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException beginTask PDEPlugin getResourceString RequiresSection getPage getEditor isDirty getPage getEditor doSave ClasspathUtilCore setClasspath CoreException InvocationTargetException
private void compute Build Path final I Plugin Model Base model final boolean save I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception monitor begin Task PDE Plugin get Resource String Requires Section update 1 NON NLS 1 try if save get Page get Editor is Dirty get Page get Editor do Save monitor Classpath Util Core set Classpath model monitor monitor worked 1 catch Core Exception e throw new Invocation Target Exception e finally monitor done try PlatformUI get Workbench get Progress Service run InUI PDE Plugin get Active Workbench Window op PDE Plugin get Workspace get Root catch Interrupted Exception e PDE Plugin log Exception e catch Invocation Target Exception e PDE Plugin log Exception e get Target Exception  computeBuildPath IPluginModelBase IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException beginTask PDEPlugin getResourceString RequiresSection getPage getEditor isDirty getPage getEditor doSave ClasspathUtilCore setClasspath CoreException InvocationTargetException getWorkbench getProgressService runInUI PDEPlugin getActiveWorkbenchWindow PDEPlugin getWorkspace getRoot InterruptedException PDEPlugin logException InvocationTargetException PDEPlugin logException getTargetException
public void set Focus if import Table null import Table get Table set Focus  setFocus importTable importTable getTable setFocus
Action get Buildpath Action return buildpath Action  getBuildpathAction buildpathAction

private String string Value public Resource Attribute Value I Project project String string Value this project project this string Value string Value  stringValue ResourceAttributeValue IProject stringValue stringValue stringValue
this string Value string Value public I Project get Project return project  stringValue stringValue IProject getProject
return project public String get String Value return string Value  getStringValue stringValue
return string Value public String to String return get String Value  stringValue toString getStringValue

private Button button param att public Boolean Attribute Row I Context Part part I Schema Attribute att super part att  BooleanAttributeRow IContextPart ISchemaAttribute
button set Layout Data gd button add Selection Listener new Selection Adapter public void widget Selected Selection Event e if block Notification mark Dirty update Text  setLayoutData addSelectionListener SelectionAdapter widgetSelected SelectionEvent blockNotification markDirty updateText
public void create Contents Composite parent Form Toolkit toolkit int span create Label parent toolkit button toolkit create Button parent SWT CHECK NON NLS 1 Grid Data gd new Grid Data gd horizontal Indent 10 gd horizontal Span span 1 gd horizontal Span span button set Layout Data gd button add Selection Listener new Selection Adapter public void widget Selected Selection Event e if block Notification mark Dirty update Text button set Enabled part is Editable  createContents FormToolkit createLabel createButton GridData GridData horizontalIndent horizontalSpan horizontalSpan setLayoutData addSelectionListener SelectionAdapter widgetSelected SelectionEvent blockNotification markDirty updateText setEnabled isEditable
protected void update block Notification true String value get Value boolean state value null value to Lower Case equals true NON NLS 1 if value null check the default I Schema Attribute att get Attribute if att get Use I Schema Attribute DEFAULT Object dvalue att get Value if dvalue null dvalue equals true NON NLS 1 state true button set Selection state update Text block Notification false  blockNotification getValue toLowerCase ISchemaAttribute getAttribute getUse ISchemaAttribute getValue setSelection updateText blockNotification
private void update Text String value get Value boolean state button get Selection if value null button set Text state true false NON NLS 1 NON NLS 2 else button set Text NON NLS 1  updateText getValue getSelection setText setText
public void commit if dirty input null try input set Attribute get Name button get Selection true NON NLS 1 false NON NLS 1 dirty false catch Core Exception e PDE Plugin log Exception e  setAttribute getName getSelection CoreException PDEPlugin logException
public void set Focus button set Focus  setFocus setFocus

private Combo Part combo param att public Choice Attribute Row I Context Part part I Schema Attribute att super part att  ComboPart ChoiceAttributeRow IContextPart ISchemaAttribute
combo get Control set Layout Data gd combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e if block Notification mark Dirty  getControl setLayoutData addSelectionListener SelectionAdapter widgetSelected SelectionEvent blockNotification markDirty
public void create Contents Composite parent Form Toolkit toolkit int span create Label parent toolkit combo new Combo Part combo create Control parent toolkit SWT READ ONLY I Schema Simple Type type get Attribute get Type I Schema Restriction restriction type get Restriction if restriction null Object rchildren restriction get Children if get Use I Schema Attribute REQUIRED combo add NON NLS 1 for int i 0 i rchildren length i Object rchild rchildren i if rchild instanceof I Schema Enumeration combo add I Schema Enumeration rchild get Name Grid Data gd new Grid Data span 2 Grid Data FILL HORIZONTAL Grid Data HORIZONTAL ALIGN FILL gd width Hint 20 gd horizontal Span span 1 combo get Control set Layout Data gd combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e if block Notification mark Dirty combo get Control set Enabled part is Editable  createContents FormToolkit createLabel ComboPart createControl READ_ONLY ISchemaSimpleType getAttribute getType ISchemaRestriction getRestriction getChildren getUse ISchemaAttribute ISchemaEnumeration ISchemaEnumeration getName GridData GridData GridData FILL_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL widthHint horizontalSpan getControl setLayoutData addSelectionListener SelectionAdapter widgetSelected SelectionEvent blockNotification markDirty getControl setEnabled isEditable
protected void update block Notification true String value get Value combo set Text value null value NON NLS 1 block Notification false dirty false  blockNotification getValue setText blockNotification
public void commit if dirty input null try String selection combo get Selection if selection length 0 selection null input set Attribute get Name selection dirty false catch Core Exception e PDE Plugin log Exception e  getSelection setAttribute getName CoreException PDEPlugin logException
public void set Focus combo get Control set Focus  setFocus getControl setFocus

import org eclipse ui ide IDE public class Class Attribute Row extends Reference Attribute Row public Class Attribute Row I Context Part part I Schema Attribute att super part att  ClassAttributeRow ReferenceAttributeRow ClassAttributeRow IContextPart ISchemaAttribute
super part att protected boolean is Reference Model return part get Page get Model is Editable  isReferenceModel getPage getModel isEditable
protected void open Reference String name text get Text name trim Non Alpha Chars name String path name replace java NON NLS 1 I Project project part get Page getPDE Editor get Common Project try if project has Nature Java Core NATURE ID I Java Project java Project Java Core create project I Java Element result java Project find Element new Path path if result null JavaUI open In Editor result else Java Attribute Value value create Java Attribute Value Java Attribute Wizard wizard new Java Attribute Wizard value Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create SWT Util set Dialog Size dialog 400 500 int d Result dialog open if d Result Wizard Dialog OK path wizard get Class Name replace java NON NLS 1 text set Text wizard get Class Name With Args result java Project find Element new Path path if result null JavaUI open In Editor result else I Resource resource project find Member new Path path if resource null resource instanceof I File I Workbench Page page PDE Plugin get Active Page IDE open Editor page I File resource true else Java Attribute Value value create Java Attribute Value Java Attribute Wizard wizard new Java Attribute Wizard value Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create SWT Util set Dialog Size dialog 400 500 int d Result dialog open if d Result Wizard Dialog OK String new Value wizard get Class Name path new Value replace java NON NLS 1 text set Text new Value resource project find Member new Path path if resource null resource instanceof I File I Workbench Page page PDE Plugin get Active Page IDE open Editor page I File resource true catch Part Init Exception e PDE Plugin log Exception e catch Java Model Exception e nothing Display get Current beep catch Core Exception e PDE Plugin log Exception e  openReference getText trimNonAlphaChars IProject getPage getPDEEditor getCommonProject hasNature JavaCore NATURE_ID IJavaProject javaProject JavaCore IJavaElement javaProject findElement openInEditor JavaAttributeValue createJavaAttributeValue JavaAttributeWizard JavaAttributeWizard WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell SWTUtil setDialogSize dResult dResult WizardDialog getClassName setText getClassNameWithArgs javaProject findElement openInEditor IResource findMember IFile IWorkbenchPage PDEPlugin getActivePage openEditor IFile JavaAttributeValue createJavaAttributeValue JavaAttributeWizard JavaAttributeWizard WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell SWTUtil setDialogSize dResult dResult WizardDialog newValue getClassName newValue setText newValue findMember IFile IWorkbenchPage PDEPlugin getActivePage openEditor IFile PartInitException PDEPlugin logException JavaModelException getCurrent CoreException PDEPlugin logException
protected void browse Busy Indicator show While text get Display new Runnable public void run do Open Selection Dialog  BusyIndicator showWhile getDisplay doOpenSelectionDialog
protected void browse Busy Indicator show While text get Display new Runnable public void run do Open Selection Dialog  BusyIndicator showWhile getDisplay doOpenSelectionDialog
private Java Attribute Value create Java Attribute Value I Project project part get Page getPDE Editor get Common Project I Plugin Model Base model I Plugin Model Base part get Page get Model String value text get Text return new Java Attribute Value project model get Attribute value  JavaAttributeValue createJavaAttributeValue IProject getPage getPDEEditor getCommonProject IPluginModelBase IPluginModelBase getPage getModel getText JavaAttributeValue getAttribute
private void do Open Selection Dialog try Shell shell PDE Plugin get Active Workbench Shell I Resource resource get Plugin Base get Model get Underlying Resource I Project project resource null null resource get Project if project null Selection Dialog dialog JavaUI create Type Dialog shell PlatformUI get Workbench get Progress Service Search Engine create Workspace Scope I Java Element Search Constants CONSIDER CLASSES false NON NLS 1 dialog set Title PDE Plugin get Resource String Class Attribute Row dialog Title NON NLS 1 if dialog open Selection Dialog OK I Type type I Type dialog get Result 0 text set Text type get Fully Qualified Name catch Core Exception e  doOpenSelectionDialog PDEPlugin getActiveWorkbenchShell IResource getPluginBase getModel getUnderlyingResource IProject getProject SelectionDialog createTypeDialog getWorkbench getProgressService SearchEngine createWorkspaceScope IJavaElementSearchConstants CONSIDER_CLASSES setTitle PDEPlugin getResourceString ClassAttributeRow dialogTitle SelectionDialog IType IType getResult setText getFullyQualifiedName CoreException
private I Plugin Base get Plugin Base I Base Model model part get Page getPDE Editor get Aggregate Model return I Plugin Model Base model get Plugin Base  IPluginBase getPluginBase IBaseModel getPage getPDEEditor getAggregateModel IPluginModelBase getPluginBase
private String trim Non Alpha Chars String value value value trim while value length 0 Character is Letter value char At 0 value value substring 1 value length int loc value index Of NON NLS 1 if loc 1 loc 0 value value substring 0 loc else if loc 0 value NON NLS 1 return value  trimNonAlphaChars isLetter charAt indexOf

protected boolean dirty public Extension Attribute Row I Context Part part I Schema Attribute att this part part this att att  ExtensionAttributeRow IContextPart ISchemaAttribute
public Extension Attribute Row I Context Part part I Plugin Attribute att this part part this att att  ExtensionAttributeRow IContextPart IPluginAttribute
public I Schema Attribute get Attribute return att instanceof I Schema Attribute I Schema Attribute att null  ISchemaAttribute getAttribute ISchemaAttribute ISchemaAttribute
public String get Name if att instanceof I Schema Attribute return I Schema Attribute att get Name else return I Plugin Attribute att get Name  getName ISchemaAttribute ISchemaAttribute getName IPluginAttribute getName
protected int get Use if att instanceof I Schema Attribute return I Schema Attribute att get Use return I Schema Attribute OPTIONAL  getUse ISchemaAttribute ISchemaAttribute getUse ISchemaAttribute
protected String get Description if att instanceof I Schema Attribute return I Schema Attribute att get Description return NON NLS 1  getDescription ISchemaAttribute ISchemaAttribute getDescription
protected String get Value String value NON NLS 1 if input null I Plugin Attribute patt input get Attribute get Name if patt null value patt get Value return value  getValue IPluginAttribute getAttribute getName getValue
protected String get Property Label String label get Name if get Use I Schema Attribute REQUIRED label NON NLS 1 else label NON NLS 1 return label  getPropertyLabel getName getUse ISchemaAttribute
protected void create Label Composite parent Form Toolkit toolkit Label label toolkit create Label parent get Property Label SWT NULL label set Foreground toolkit get Colors get Color Form Colors TITLE label set Tool Tip Text get Tool Tip Text  createLabel FormToolkit createLabel getPropertyLabel setForeground getColors getColor FormColors setToolTipText getToolTipText
protected String get Tool Tip Text String text get Description if text null return null int dot text index Of if dot 1 String Buffer buf new String Buffer boolean in Tag false for int i 0 i text length i char c text char At i if in Tag if c in Tag false continue else if c in Tag true continue else if c if i text length 1 char c2 text char At i 1 if c2 c2 t c2 n break buf append c return buf to String else return text  getToolTipText getDescription indexOf StringBuffer StringBuffer inTag charAt inTag inTag inTag charAt toString
public abstract void create Contents Composite parent Form Toolkit toolkit int span  createContents FormToolkit
public abstract void create Contents Composite parent Form Toolkit toolkit int span protected abstract void update  createContents FormToolkit
protected abstract void update public abstract void commit 
public abstract void commit public abstract void set Focus  setFocus
public abstract void set Focus public boolean is Dirty return dirty  setFocus isDirty
protected void mark Dirty dirty true part fire Save Needed  markDirty fireSaveNeeded
public void dispose 
public void set Input I Plugin Element input this input input update  setInput IPluginElement
update protected I Project get Project return part get Page getPDE Editor get Common Project  IProject getProject getPage getPDEEditor getCommonProject

public abstract class Reference Attribute Row extends Text Attribute Row param att public Reference Attribute Row I Context Part part I Schema Attribute att super part att  ReferenceAttributeRow TextAttributeRow ReferenceAttributeRow IContextPart ISchemaAttribute
SWT NULL link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e if is Reference Model open Reference  addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent isReferenceModel openReference
protected void create Label Composite parent Form Toolkit toolkit Hyperlink link toolkit create Hyperlink parent get Property Label SWT NULL link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e if is Reference Model open Reference link set Tool Tip Text get Tool Tip Text  createLabel FormToolkit createHyperlink getPropertyLabel addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent isReferenceModel openReference setToolTipText getToolTipText
link set Tool Tip Text get Tool Tip Text protected boolean is Reference Model return I Plugin Model Base part get Page get Model get Install Location null  setToolTipText getToolTipText isReferenceModel IPluginModelBase getPage getModel getInstallLocation
Button button toolkit create Button parent PDE Plugin get Resource String Reference Attribute Row browse SWT PUSH NON NLS 1 button add Selection Listener new Selection Adapter public void widget Selected Selection Event e if is Reference Model browse  createButton PDEPlugin getResourceString ReferenceAttributeRow addSelectionListener SelectionAdapter widgetSelected SelectionEvent isReferenceModel
public void create Contents Composite parent Form Toolkit toolkit int span super create Contents parent toolkit span Button button toolkit create Button parent PDE Plugin get Resource String Reference Attribute Row browse SWT PUSH NON NLS 1 button add Selection Listener new Selection Adapter public void widget Selected Selection Event e if is Reference Model browse button set Enabled part is Editable  createContents FormToolkit createContents createButton PDEPlugin getResourceString ReferenceAttributeRow addSelectionListener SelectionAdapter widgetSelected SelectionEvent isReferenceModel setEnabled isEditable
protected Grid Data create Grid Data int span Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 20 return gd  GridData createGridData GridData GridData GridData FILL_HORIZONTAL widthHint
return gd protected abstract void open Reference  openReference
protected abstract void open Reference protected abstract void browse  openReference

public class Resource Attribute Row extends Reference Attribute Row public Resource Attribute Row I Context Part part I Schema Attribute att super part att  ResourceAttributeRow ReferenceAttributeRow ResourceAttributeRow IContextPart ISchemaAttribute
see org eclipse pde internal ui neweditor plugin Reference Attribute Row open Reference protected boolean is Reference Model return part get Page get Model is Editable  ReferenceAttributeRow openReference isReferenceModel getPage getModel isEditable
protected void open Reference I File file get File if file null file exists try IDE open Editor PDE Plugin get Active Page file true catch Part Init Exception e PDE Plugin log Exception e else Display get Current beep  openReference IFile getFile openEditor PDEPlugin getActivePage PartInitException PDEPlugin logException getCurrent
private I File get File String value text get Text if value length 0 return null I Path path get Project get Full Path append value return get Project get Workspace get Root get File path  IFile getFile getText IPath getProject getFullPath getProject getWorkspace getRoot getFile
dialog add Filter new Viewer Filter public boolean select Viewer viewer Object parent Element Object element if element instanceof I Project return I Project element equals project return true  addFilter ViewerFilter parentElement IProject IProject
dialog set Validator new I Selection Status Validator public I Status validate Object selection if selection null selection length 0 selection 0 instanceof I File return new Status I Status OK PDE Plugin get Plugin Id I Status OK null NON NLS 1 else return new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR null NON NLS 1  setValidator ISelectionStatusValidator IStatus IFile IStatus PDEPlugin getPluginId IStatus IStatus PDEPlugin getPluginId IStatus
protected void browse final I Project project part get Page getPDE Editor get Common Project Element Tree Selection Dialog dialog new Element Tree Selection Dialog PDE Plugin get Active Workbench Shell new Workbench Label Provider new Workbench Content Provider dialog set Input project get Workspace I File file get File if file null dialog set Initial Selection file dialog add Filter new Viewer Filter public boolean select Viewer viewer Object parent Element Object element if element instanceof I Project return I Project element equals project return true dialog set Allow Multiple false dialog set Title PDE Plugin get Resource String Resource Attribute Cell Editor title NON NLS 1 dialog set Message PDE Plugin get Resource String Resource Attribute Cell Editor message NON NLS 1 dialog set Validator new I Selection Status Validator public I Status validate Object selection if selection null selection length 0 selection 0 instanceof I File return new Status I Status OK PDE Plugin get Plugin Id I Status OK null NON NLS 1 else return new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR null NON NLS 1 if dialog open Element Tree Selection Dialog OK file I File dialog get First Result String value file get Project Relative Path to String text set Text value  IProject getPage getPDEEditor getCommonProject ElementTreeSelectionDialog ElementTreeSelectionDialog PDEPlugin getActiveWorkbenchShell WorkbenchLabelProvider WorkbenchContentProvider setInput getWorkspace IFile getFile setInitialSelection addFilter ViewerFilter parentElement IProject IProject setAllowMultiple setTitle PDEPlugin getResourceString ResourceAttributeCellEditor setMessage PDEPlugin getResourceString ResourceAttributeCellEditor setValidator ISelectionStatusValidator IStatus IFile IStatus PDEPlugin getPluginId IStatus IStatus PDEPlugin getPluginId IStatus ElementTreeSelectionDialog IFile getFirstResult getProjectRelativePath toString setText

protected Text text param att public Text Attribute Row I Context Part part I Schema Attribute att super part att  TextAttributeRow IContextPart ISchemaAttribute
public Text Attribute Row I Context Part part I Plugin Attribute att super part att  TextAttributeRow IContextPart IPluginAttribute
text set Layout Data create Grid Data span text add Modify Listener new Modify Listener public void modify Text Modify Event e if block Notification mark Dirty  setLayoutData createGridData addModifyListener ModifyListener modifyText ModifyEvent blockNotification markDirty
public void create Contents Composite parent Form Toolkit toolkit int span create Label parent toolkit text toolkit create Text parent SWT SINGLE NON NLS 1 text set Layout Data create Grid Data span text add Modify Listener new Modify Listener public void modify Text Modify Event e if block Notification mark Dirty text set Editable part is Editable  createContents FormToolkit createLabel createText setLayoutData createGridData addModifyListener ModifyListener modifyText ModifyEvent blockNotification markDirty setEditable isEditable
protected Grid Data create Grid Data int span Grid Data gd new Grid Data span 2 Grid Data FILL HORIZONTAL Grid Data HORIZONTAL ALIGN FILL gd width Hint 20 gd horizontal Span span 1 return gd  GridData createGridData GridData GridData GridData FILL_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL widthHint horizontalSpan
protected void update block Notification true text set Text get Value block Notification false  blockNotification setText getValue blockNotification
public void commit if dirty input null String value text get Text try input set Attribute get Name value dirty false catch Core Exception e PDE Plugin log Exception e  getText setAttribute getName CoreException PDEPlugin logException
public void set Focus text set Focus  setFocus setFocus

private Plugin Activation Section osgi Section public Runtime Page Form Editor editor super editor PAGE ID PDE Plugin get Resource String Runtime Page tab Name NON NLS 1  PluginActivationSection osgiSection RuntimePage FormEditor PAGE_ID PDEPlugin getResourceString RuntimePage tabName
protected void create Form Content I Managed Form mform super create Form Content mform Scrolled Form form mform get Form form set Text PDE Plugin get Resource String Manifest Editor Runtime Form title NON NLS 1 Grid Layout layout new Grid Layout form get Body set Layout layout layout num Columns 2 layout margin Width 10 layout horizontal Spacing 10 layout vertical Spacing 20 layout make Columns Equal Width true library Section new Library Section this form get Body library Section get Section set Layout Data new Grid Data Grid Data FILL BOTH export Section new Export Section this form get Body export Section get Section set Layout Data new Grid Data Grid Data FILL BOTH boolean fragment I Plugin Model Base getPDE Editor get Aggregate Model is Fragment Model if fragment osgi Section new Plugin Activation Section this form get Body Grid Data gd new Grid Data Grid Data FILL BOTH gd horizontal Span 2 osgi Section get Section set Layout Data gd mform add Part library Section mform add Part export Section if fragment mform add Part osgi Section if fragment Workbench Help set Help form I Help Context Ids MANIFEST FRAGMENT RUNTIME else Workbench Help set Help form I Help Context Ids MANIFEST PLUGIN RUNTIME  createFormContent IManagedForm createFormContent ScrolledForm getForm setText PDEPlugin getResourceString ManifestEditor RuntimeForm GridLayout GridLayout getBody setLayout numColumns marginWidth horizontalSpacing verticalSpacing makeColumnsEqualWidth librarySection LibrarySection getBody librarySection getSection setLayoutData GridData GridData FILL_BOTH exportSection ExportSection getBody exportSection getSection setLayoutData GridData GridData FILL_BOTH IPluginModelBase getPDEEditor getAggregateModel isFragmentModel osgiSection PluginActivationSection getBody GridData GridData GridData FILL_BOTH horizontalSpan osgiSection getSection setLayoutData addPart librarySection addPart exportSection addPart osgiSection WorkbenchHelp setHelp IHelpContextIds MANIFEST_FRAGMENT_RUNTIME WorkbenchHelp setHelp IHelpContextIds MANIFEST_PLUGIN_RUNTIME

private PDE Form Editor editor public Properties Action PDE Form Editor editor this editor editor set Text PDE Plugin get Resource String LABEL set Image Descriptor PDE Plugin Images DESC PROPERTIES set Disabled Image Descriptor PDE Plugin Images DESC PROPERTIES DISABLED  PDEFormEditor PropertiesAction PDEFormEditor setText PDEPlugin getResourceString setImageDescriptor PDEPluginImages DESC_PROPERTIES setDisabledImageDescriptor PDEPluginImages DESC_PROPERTIES_DISABLED
public void run try String view Id I Page Layout ID PROP SHEET I Workbench Page perspective PDE Plugin get Active Page I View Part view perspective show View view Id editor update Property Sheet editor get Active Page Instance perspective activate editor perspective bring To Top view catch Part Init Exception e PDE Plugin log Exception e  viewId IPageLayout ID_PROP_SHEET IWorkbenchPage PDEPlugin getActivePage IViewPart showView viewId updatePropertySheet getActivePageInstance bringToTop PartInitException PDEPlugin logException

class Value Validator implements I Cell Editor Validator public String is Valid Object value String svalue value to String I Schema Attribute att I Schema Attribute get Source Object I Schema Simple Type type att get Type if type get Name equals boolean NON NLS 1 if svalue equals true svalue equals false NON NLS 1 NON NLS 2 return PDE Plugin get Resource String Attribute Property Source assert Boolean NON NLS 1 else if type get Name equals string NON NLS 1 type get Restriction null I Schema Restriction restriction type get Restriction if restriction is Value Valid svalue false return PDE Plugin get Formatted Message Attribute Property Source invalid Restriction svalue NON NLS 1 return null  ValueValidator ICellEditorValidator isValid toString ISchemaAttribute ISchemaAttribute getSourceObject ISchemaSimpleType getType getName PDEPlugin getResourceString AttributePropertySource assertBoolean getName getRestriction ISchemaRestriction getRestriction isValueValid PDEPlugin getFormattedMessage AttributePropertySource invalidRestriction
public Attribute Property Source org eclipse pde internal core ischema I Schema Attribute att super att  AttributePropertySource ISchemaAttribute
public Object do Clone I Schema Attribute att I Schema Attribute get Source Object Schema Element element Schema Element att get Parent String value PDE Plugin get Formatted Message KEY COPY OF att get Name Schema Attribute att2 new Schema Attribute att value Schema Complex Type element get Type add Attribute att2 return att2  doClone ISchemaAttribute ISchemaAttribute getSourceObject SchemaElement SchemaElement getParent PDEPlugin getFormattedMessage KEY_COPY_OF getName SchemaAttribute SchemaAttribute SchemaComplexType getType addAttribute
return att2 public Object get Editable Value return null  getEditableValue
private int get Index Of String value String table for int i 0 i table length i if value equals table i return i return 0  getIndexOf
public I Property Descriptor get Property Descriptors if descriptors null descriptors new Vector Property Descriptor cdesc create Combo Box Property Descriptor P USE PDE Plugin get Resource String KEY USE I Schema Attribute use Table if cdesc instanceof Combo Box Property Descriptor Combo Box Property Descriptor cdesc set Label Provider new Combo Provider P USE I Schema Attribute use Table descriptors add Element cdesc cdesc create Combo Box Property Descriptor P KIND PDE Plugin get Resource String KEY KIND I Schema Attribute kind Table if cdesc instanceof Combo Box Property Descriptor Combo Box Property Descriptor cdesc set Label Provider new Combo Provider P KIND I Schema Attribute kind Table descriptors add Element cdesc cdesc create Combo Box Property Descriptor P TYPE PDE Plugin get Resource String KEY TYPE type Table if cdesc instanceof Combo Box Property Descriptor Combo Box Property Descriptor cdesc set Label Provider new Combo Provider P TYPE type Table descriptors add Element cdesc cdesc new Type Restriction Descriptor P RESTRICTION PDE Plugin get Resource String KEY RESTRICTION is Editable descriptors add Element cdesc cdesc create Text Property Descriptor P VALUE PDE Plugin get Resource String KEY VALUE cdesc set Validator new Value Validator descriptors add Element cdesc Property Descriptor desc create Text Property Descriptor P BASED ON PDE Plugin get Resource String KEY BASED ON descriptors add Element desc desc create Text Property Descriptor P NAME PDE Plugin get Resource String KEY NAME descriptors add Element desc return to Descriptor Array descriptors  IPropertyDescriptor getPropertyDescriptors PropertyDescriptor createComboBoxPropertyDescriptor P_USE PDEPlugin getResourceString KEY_USE ISchemaAttribute useTable ComboBoxPropertyDescriptor ComboBoxPropertyDescriptor setLabelProvider ComboProvider P_USE ISchemaAttribute useTable addElement createComboBoxPropertyDescriptor P_KIND PDEPlugin getResourceString KEY_KIND ISchemaAttribute kindTable ComboBoxPropertyDescriptor ComboBoxPropertyDescriptor setLabelProvider ComboProvider P_KIND ISchemaAttribute kindTable addElement createComboBoxPropertyDescriptor P_TYPE PDEPlugin getResourceString KEY_TYPE typeTable ComboBoxPropertyDescriptor ComboBoxPropertyDescriptor setLabelProvider ComboProvider P_TYPE typeTable addElement TypeRestrictionDescriptor P_RESTRICTION PDEPlugin getResourceString KEY_RESTRICTION isEditable addElement createTextPropertyDescriptor P_VALUE PDEPlugin getResourceString KEY_VALUE setValidator ValueValidator addElement PropertyDescriptor createTextPropertyDescriptor P_BASED_ON PDEPlugin getResourceString KEY_BASED_ON addElement createTextPropertyDescriptor P_NAME PDEPlugin getResourceString KEY_NAME addElement toDescriptorArray
public Object get Property Value Object name I Schema Attribute att I Schema Attribute get Source Object if name equals P RESTRICTION return att get Type get Restriction if name equals P VALUE return get Nonzero Value att get Value if name equals P BASED ON return get Nonzero Value att get Based On if name equals P NAME return get Nonzero Value att get Name if is Editable if name equals P USE return new Integer att get Use if name equals P KIND return new Integer att get Kind if name equals P TYPE return new Integer get Index Of att get Type get Name type Table else if name equals P USE return I Schema Attribute use Table att get Use if name equals P KIND return I Schema Attribute kind Table att get Kind if name equals P TYPE return att get Type get Name return NON NLS 1  getPropertyValue ISchemaAttribute ISchemaAttribute getSourceObject P_RESTRICTION getType getRestriction P_VALUE getNonzeroValue getValue P_BASED_ON getNonzeroValue getBasedOn P_NAME getNonzeroValue getName isEditable P_USE getUse P_KIND getKind P_TYPE getIndexOf getType getName typeTable P_USE ISchemaAttribute useTable getUse P_KIND ISchemaAttribute kindTable getKind P_TYPE getType getName
public boolean is Cloneable I Schema Attribute att I Schema Attribute get Source Object if att get Parent get Name equals extension NON NLS 1 return false return true  isCloneable ISchemaAttribute ISchemaAttribute getSourceObject getParent getName
return true public boolean is Property Set Object property return false  isPropertySet
return false public void reset Property Value Object property  resetPropertyValue
public void set Property Value Object name Object value Schema Attribute att Schema Attribute get Source Object if value instanceof Integer int index Integer value int Value if name equals P USE att set Use index else if name equals P KIND att set Kind index else if name equals P TYPE att set Type new Schema Simple Type att get Schema type Table index if att get Value null att set Value null else if name equals P RESTRICTION I Schema Restriction restriction I Schema Restriction value if restriction null restriction get Children length 0 restriction null if att get Type instanceof Schema Simple Type Schema Simple Type type Schema Simple Type att get Type type set Restriction restriction att set Type type else if value instanceof String String svalue String value if name equals P VALUE att set Value svalue else if name equals P BASED ON att set Based On svalue else if name equals P NAME att set Name svalue  setPropertyValue SchemaAttribute SchemaAttribute getSourceObject intValue P_USE setUse P_KIND setKind P_TYPE setType SchemaSimpleType getSchema typeTable getValue setValue P_RESTRICTION ISchemaRestriction ISchemaRestriction getChildren getType SchemaSimpleType SchemaSimpleType SchemaSimpleType getType setRestriction setType P_VALUE setValue P_BASED_ON setBasedOn P_NAME setName

public static final String KEY KIND Schema Editor CompositorPR kind NON NLS 1 public Compositor Property Source I Schema Compositor obj super obj  KEY_KIND SchemaEditor CompositorPropertySource ISchemaCompositor
public I Property Descriptor get Property Descriptors if descriptors null descriptors Vector super get Property Descriptors Vector Property Descriptor cdesc create Combo Box Property Descriptor P KIND PDE Plugin get Resource String KEY KIND I Schema Compositor kind Table if cdesc instanceof Combo Box Property Descriptor Combo Box Property Descriptor cdesc set Label Provider new Combo Provider P KIND I Schema Compositor kind Table descriptors add Element cdesc return to Descriptor Array descriptors  IPropertyDescriptor getPropertyDescriptors getPropertyDescriptorsVector PropertyDescriptor createComboBoxPropertyDescriptor P_KIND PDEPlugin getResourceString KEY_KIND ISchemaCompositor kindTable ComboBoxPropertyDescriptor ComboBoxPropertyDescriptor setLabelProvider ComboProvider P_KIND ISchemaCompositor kindTable addElement toDescriptorArray
public Object get Property Value Object name I Schema Compositor compositor I Schema Compositor get Source Object if name equals P KIND return new Integer compositor get Kind return super get Property Value name  getPropertyValue ISchemaCompositor ISchemaCompositor getSourceObject P_KIND getKind getPropertyValue
public void set Property Value String name Object value Schema Compositor compositor Schema Compositor get Source Object if name equals P KIND compositor set Kind Integer value int Value else super set Property Value name value  setPropertyValue SchemaCompositor SchemaCompositor getSourceObject P_KIND setKind intValue setPropertyValue

public Description Section PDE Form Page page Composite parent I Color Manager color Manager super page parent Section DESCRIPTION get Section set Text PDE Plugin get Resource String SECTION TITLE get Section set Description PDE Plugin get Resource String SECTION DESC source Configuration new XML Configuration color Manager document new Document partitioner new Default Partitioner new XML Partition Scanner new String XML Partition Scanner XML TAG XML Partition Scanner XML COMMENT partitioner connect document document set Document Partitioner partitioner create Client get Section page get Managed Form get Toolkit  DescriptionSection PDEFormPage IColorManager colorManager getSection setText PDEPlugin getResourceString SECTION_TITLE getSection setDescription PDEPlugin getResourceString SECTION_DESC sourceConfiguration XMLConfiguration colorManager DefaultPartitioner XMLPartitionScanner XMLPartitionScanner XML_TAG XMLPartitionScanner XML_COMMENT setDocumentPartitioner createClient getSection getManagedForm getToolkit
create Client get Section page get Managed Form get Toolkit private void check For Pending Changes if apply Button is Enabled handle Apply  createClient getSection getManagedForm getToolkit checkForPendingChanges applyButton isEnabled handleApply
public void commit boolean on Save handle Apply if on Save reset Button set Enabled false super commit on Save  onSave handleApply onSave resetButton setEnabled onSave
source Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Selection event get Selection  sourceViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateSelection getSelection
styled Text set Menu get Page getPDE Editor get Context Menu styled Text add Focus Listener new Focus Adapter public void focus Gained Focus Event e update Selection source Viewer get Selection  styledText setMenu getPage getPDEEditor getContextMenu styledText addFocusListener FocusAdapter focusGained FocusEvent updateSelection sourceViewer getSelection
apply Button set Layout Data gd apply Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Apply  applyButton setLayoutData applyButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleApply
reset Button set Layout Data gd reset Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Reset  resetButton setLayoutData resetButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleReset
public void create Client Section section Form Toolkit toolkit Composite container toolkit create Composite section Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width 2 container set Layout layout Grid Data gd int styles SWT MULTI SWT WRAP SWT V SCROLL SWT H SCROLL source Viewer new Source Viewer container null styles source Viewer configure source Configuration source Viewer set Document document source Viewer set Editable is Editable source Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Selection event get Selection Control styled Text source Viewer get Text Widget styled Text set Font J Face Resources get Font Registry get J Face Resources TEXT FONT if SWT get Platform equals motif false NON NLS 1 toolkit paint Borders For container styled Text set Data Form Toolkit KEY DRAW BORDER Form Toolkit TEXT BORDER Control children container get Children Control control children children length 1 gd new Grid Data Grid Data FILL BOTH gd width Hint 200 gd height Hint 64 control set Layout Data gd styled Text set Menu get Page getPDE Editor get Context Menu styled Text add Focus Listener new Focus Adapter public void focus Gained Focus Event e update Selection source Viewer get Selection Composite button Container toolkit create Composite container layout new Grid Layout layout margin Height 0 button Container set Layout layout gd new Grid Data Grid Data FILL VERTICAL button Container set Layout Data gd apply Button toolkit create Button button Container PDE Plugin get Resource String KEY APPLY SWT PUSH apply Button set Enabled false gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING apply Button set Layout Data gd apply Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Apply reset Button toolkit create Button button Container PDE Plugin get Resource String KEY RESET SWT PUSH reset Button set Enabled false gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING reset Button set Layout Data gd reset Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Reset section set Client container initialize  createClient FormToolkit createComposite GridLayout GridLayout numColumns marginWidth setLayout GridData V_SCROLL H_SCROLL sourceViewer SourceViewer sourceViewer sourceConfiguration sourceViewer setDocument sourceViewer setEditable isEditable sourceViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateSelection getSelection styledText sourceViewer getTextWidget styledText setFont JFaceResources getFontRegistry JFaceResources TEXT_FONT getPlatform paintBordersFor styledText setData FormToolkit KEY_DRAW_BORDER FormToolkit TEXT_BORDER getChildren GridData GridData FILL_BOTH widthHint heightHint setLayoutData styledText setMenu getPage getPDEEditor getContextMenu styledText addFocusListener FocusAdapter focusGained FocusEvent updateSelection sourceViewer getSelection buttonContainer createComposite GridLayout marginHeight buttonContainer setLayout GridData GridData FILL_VERTICAL buttonContainer setLayoutData applyButton createButton buttonContainer PDEPlugin getResourceString KEY_APPLY applyButton setEnabled GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING applyButton setLayoutData applyButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleApply resetButton createButton buttonContainer PDEPlugin getResourceString KEY_RESET resetButton setEnabled GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING resetButton setLayoutData resetButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleReset setClient
private void update Selection I Selection selection get Page getPDE Editor set Selection selection  updateSelection ISelection getPage getPDEEditor setSelection
public boolean do Global Action String action Id if action Id equals Action Factory CUT get Id source Viewer do Operation Source Viewer CUT return true else if action Id equals Action Factory COPY get Id source Viewer do Operation Source Viewer COPY return true else if action Id equals Action Factory PASTE get Id source Viewer do Operation Source Viewer PASTE return true else if action Id equals Action Factory SELECT ALL get Id source Viewer do Operation Source Viewer SELECT ALL return true else if action Id equals Action Factory DELETE get Id source Viewer do Operation Source Viewer DELETE return true else if action Id equals Action Factory UNDO get Id source Viewer do Operation Source Viewer UNDO return true else if action Id equals Action Factory REDO get Id source Viewer do Operation Source Viewer REDO return true return false  doGlobalAction actionId actionId ActionFactory getId sourceViewer doOperation SourceViewer actionId ActionFactory getId sourceViewer doOperation SourceViewer actionId ActionFactory getId sourceViewer doOperation SourceViewer actionId ActionFactory SELECT_ALL getId sourceViewer doOperation SourceViewer SELECT_ALL actionId ActionFactory getId sourceViewer doOperation SourceViewer actionId ActionFactory getId sourceViewer doOperation SourceViewer actionId ActionFactory getId sourceViewer doOperation SourceViewer
return false protected void fill Context Menu I Menu Manager manager get Page getPDE Editor get Contributor context Menu About To Show manager  fillContextMenu IMenuManager getPage getPDEEditor getContributor contextMenuAboutToShow
private void handle Apply if element null if element schema Schema schema set Description document get else Schema Object element set Description document get apply Button set Enabled false reset Button set Enabled false  handleApply setDescription SchemaObject setDescription applyButton setEnabled resetButton setEnabled
reset Button set Enabled false private void handle Reset update Document  resetButton setEnabled handleReset updateDocument
document add Document Listener new I Document Listener public void document Changed Document Event e if ignore Change schema instanceof I Editable mark Dirty apply Button set Enabled true reset Button set Enabled true  addDocumentListener IDocumentListener documentChanged DocumentEvent ignoreChange IEditable markDirty applyButton setEnabled resetButton setEnabled
reset Button set Enabled true public void document About To Be Changed Document Event e  resetButton setEnabled documentAboutToBeChanged DocumentEvent
public void initialize schema I Schema get Page get Model element schema update Document document add Document Listener new I Document Listener public void document Changed Document Event e if ignore Change schema instanceof I Editable mark Dirty apply Button set Enabled true reset Button set Enabled true public void document About To Be Changed Document Event e  ISchema getPage getModel updateDocument addDocumentListener IDocumentListener documentChanged DocumentEvent ignoreChange IEditable markDirty applyButton setEnabled resetButton setEnabled documentAboutToBeChanged DocumentEvent
public boolean is Editable return editable  isEditable
public void selection Changed I Form Part part I Selection selection check For Pending Changes if part instanceof Element Section return Object change Object I Structured Selection selection get First Element element I Schema Object change Object if element null element schema update Document  selectionChanged IFormPart ISelection checkForPendingChanges ElementSection changeObject IStructuredSelection getFirstElement ISchemaObject changeObject updateDocument
update Document public void set Focus source Viewer get Text Widget set Focus  updateDocument setFocus sourceViewer getTextWidget setFocus
source Viewer get Text Widget set Focus public void set Editable boolean new Editable editable new Editable  sourceViewer getTextWidget setFocus setEditable newEditable newEditable
public void update Document ignore Change true String text element get Description if text null text NON NLS 1 else text Text Util create Multi Line text 60 false document set text reset Button set Enabled false apply Button set Enabled false ignore Change false I Schema Object eobj element if element instanceof I Schema Attribute eobj element get Parent source Viewer set Editable eobj get Name equals extension false  updateDocument ignoreChange getDescription TextUtil createMultiLine resetButton setEnabled applyButton setEnabled ignoreChange ISchemaObject ISchemaAttribute getParent sourceViewer setEditable getName
public boolean can Paste Clipboard clipboard return source Viewer can Do Operation Source Viewer PASTE  canPaste sourceViewer canDoOperation SourceViewer

public Doc Section PDE Form Page page Composite parent I Color Manager color Manager super page parent Section DESCRIPTION Section NO TITLE false String description PDE Plugin get Resource String SECTION DESC get Section set Description description source Configuration new XML Configuration color Manager document new Document partitioner new Default Partitioner new XML Partition Scanner new String XML Partition Scanner XML TAG XML Partition Scanner XML COMMENT partitioner connect document document set Document Partitioner partitioner get Section client Vertical Spacing 3 create Client get Section page get Managed Form get Toolkit  DocSection PDEFormPage IColorManager colorManager NO_TITLE PDEPlugin getResourceString SECTION_DESC getSection setDescription sourceConfiguration XMLConfiguration colorManager DefaultPartitioner XMLPartitionScanner XMLPartitionScanner XML_TAG XMLPartitionScanner XML_COMMENT setDocumentPartitioner getSection clientVerticalSpacing createClient getSection getManagedForm getToolkit
public void commit boolean on Save handle Apply if on Save reset Button set Enabled false super commit on Save  onSave handleApply onSave resetButton setEnabled onSave
tab Folder add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Tab Selection  tabFolder addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateTabSelection
source Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Selection event get Selection  sourceViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateSelection getSelection
apply Button set Layout Data gd apply Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Apply  applyButton setLayoutData applyButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleApply
reset Button set Layout Data gd reset Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Reset  resetButton setLayoutData resetButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleReset
public void create Client Section section Form Toolkit toolkit Composite container toolkit create Composite section Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width 2 layout margin Height 5 layout vertical Spacing 8 container set Layout layout Grid Data gd schema I Schema get Page get Model tab Folder new C Tab Folder container SWT FLAT SWT TOP toolkit adapt tab Folder true true gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 gd height Hint 2 tab Folder set Layout Data gd toolkit get Colors initialize Section Tool Bar Colors Color selected Color1 toolkit get Colors get Color Form Colors TB BG Color selected Color2 toolkit get Colors get Color Form Colors TB GBG tab Folder set Selection Background new Color selected Color1 selected Color2 toolkit get Colors get Background new int 50 100 true tab Folder add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Tab Selection int styles SWT MULTI SWT WRAP SWT V SCROLL SWT H SCROLL source Viewer new Source Viewer container null styles source Viewer configure source Configuration source Viewer set Document document source Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Selection event get Selection Styled Text styled Text source Viewer get Text Widget styled Text set Font J Face Resources get Text Font styled Text set Menu get Page getPDE Editor get Context Menu styled Text set Data Form Toolkit KEY DRAW BORDER Form Toolkit TEXT BORDER if SWT get Platform equals motif false NON NLS 1 toolkit paint Borders For container Control children container get Children Control control children children length 1 gd new Grid Data Grid Data FILL BOTH gd width Hint 50 gd height Hint 50 control set Layout Data gd Composite button Container toolkit create Composite container layout new Grid Layout layout margin Height 0 layout margin Width 0 button Container set Layout layout gd new Grid Data Grid Data FILL VERTICAL button Container set Layout Data gd apply Button toolkit create Button button Container PDE Plugin get Resource String KEY APPLY SWT PUSH apply Button set Enabled false gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING apply Button set Layout Data gd apply Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Apply reset Button toolkit create Button button Container PDE Plugin get Resource String KEY RESET SWT PUSH reset Button set Enabled false gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING reset Button set Layout Data gd reset Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Reset create Tabs section set Client container initialize if tab Folder get Item Count 0 tab Folder set Selection 0 update Tab Selection  createClient FormToolkit createComposite GridLayout GridLayout numColumns marginWidth marginHeight verticalSpacing setLayout GridData ISchema getPage getModel tabFolder CTabFolder tabFolder GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan heightHint tabFolder setLayoutData getColors initializeSectionToolBarColors selectedColor1 getColors getColor FormColors TB_BG selectedColor2 getColors getColor FormColors TB_GBG tabFolder setSelectionBackground selectedColor1 selectedColor2 getColors getBackground tabFolder addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateTabSelection V_SCROLL H_SCROLL sourceViewer SourceViewer sourceViewer sourceConfiguration sourceViewer setDocument sourceViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateSelection getSelection StyledText styledText sourceViewer getTextWidget styledText setFont JFaceResources getTextFont styledText setMenu getPage getPDEEditor getContextMenu styledText setData FormToolkit KEY_DRAW_BORDER FormToolkit TEXT_BORDER getPlatform paintBordersFor getChildren GridData GridData FILL_BOTH widthHint heightHint setLayoutData buttonContainer createComposite GridLayout marginHeight marginWidth buttonContainer setLayout GridData GridData FILL_VERTICAL buttonContainer setLayoutData applyButton createButton buttonContainer PDEPlugin getResourceString KEY_APPLY applyButton setEnabled GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING applyButton setLayoutData applyButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleApply resetButton createButton buttonContainer PDEPlugin getResourceString KEY_RESET resetButton setEnabled GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING resetButton setLayoutData resetButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleReset createTabs setClient tabFolder getItemCount tabFolder setSelection updateTabSelection
public boolean do Global Action String action Id if action Id equals Action Factory CUT get Id source Viewer do Operation Source Viewer CUT return true else if action Id equals Action Factory COPY get Id source Viewer do Operation Source Viewer COPY return true else if action Id equals Action Factory PASTE get Id source Viewer do Operation Source Viewer PASTE return true else if action Id equals Action Factory SELECT ALL get Id source Viewer do Operation Source Viewer SELECT ALL return true else if action Id equals Action Factory DELETE get Id source Viewer do Operation Source Viewer DELETE return true else if action Id equals Action Factory UNDO get Id source Viewer do Operation Source Viewer UNDO return true else if action Id equals Action Factory REDO get Id source Viewer do Operation Source Viewer REDO return true return false  doGlobalAction actionId actionId ActionFactory getId sourceViewer doOperation SourceViewer actionId ActionFactory getId sourceViewer doOperation SourceViewer actionId ActionFactory getId sourceViewer doOperation SourceViewer actionId ActionFactory SELECT_ALL getId sourceViewer doOperation SourceViewer SELECT_ALL actionId ActionFactory getId sourceViewer doOperation SourceViewer actionId ActionFactory getId sourceViewer doOperation SourceViewer actionId ActionFactory getId sourceViewer doOperation SourceViewer
protected void fill Context Menu I Menu Manager manager get Page getPDE Editor get Contributor context Menu About To Show manager  fillContextMenu IMenuManager getPage getPDEEditor getContributor contextMenuAboutToShow
public boolean set Form Input Object input int index 1 if input instanceof I Schema index 0 else if input instanceof I Document Section I Document Section sections schema get Document Sections for int i 0 i sections length i I Document Section section sections i if section equals input index i 1 break if index 1 tab Folder set Selection index update Editor Input input return true  setFormInput ISchema IDocumentSection IDocumentSection getDocumentSections IDocumentSection tabFolder setSelection updateEditorInput
private String get Topic Name Object object if object instanceof I Schema return PDE Plugin get Resource String KEY TOPIC OVERVIEW else if object instanceof I Document Section I Document Section section I Document Section object String section Id section get Section Id if section Id equals I Document Section EXAMPLES return PDE Plugin get Resource String KEY TOPIC EXAMPLES if section Id equals I Document Section SINCE return PDE Plugin get Resource String KEY TOPIC SINCE if section Id equals I Document Section IMPLEMENTATION return PDE Plugin get Resource String KEY TOPIC IMPLEMENTATION if section Id equals I Document Section API INFO return PDE Plugin get Resource String KEY TOPIC API if section Id equals I Document Section COPYRIGHT return PDE Plugin get Resource String KEY TOPIC COPYRIGHT return NON NLS 1  getTopicName ISchema PDEPlugin getResourceString KEY_TOPIC_OVERVIEW IDocumentSection IDocumentSection IDocumentSection sectionId getSectionId sectionId IDocumentSection PDEPlugin getResourceString KEY_TOPIC_EXAMPLES sectionId IDocumentSection PDEPlugin getResourceString KEY_TOPIC_SINCE sectionId IDocumentSection PDEPlugin getResourceString KEY_TOPIC_IMPLEMENTATION sectionId IDocumentSection API_INFO PDEPlugin getResourceString KEY_TOPIC_API sectionId IDocumentSection PDEPlugin getResourceString KEY_TOPIC_COPYRIGHT
private void handle Apply if element null if element instanceof I Schema Schema element set Description document get else Schema Object element set Description document get update Tab Image tab Folder get Selection apply Button set Enabled false reset Button set Enabled false  handleApply ISchema setDescription SchemaObject setDescription updateTabImage tabFolder getSelection applyButton setEnabled resetButton setEnabled
reset Button set Enabled false private void handle Reset update Editor Input element update Tab Image tab Folder get Selection  resetButton setEnabled handleReset updateEditorInput updateTabImage tabFolder getSelection
document add Document Listener new I Document Listener public void document Changed Document Event e if ignore Change schema is Editable mark Dirty apply Button set Enabled true reset Button set Enabled true  addDocumentListener IDocumentListener documentChanged DocumentEvent ignoreChange isEditable markDirty applyButton setEnabled resetButton setEnabled
reset Button set Enabled true public void document About To Be Changed Document Event e  resetButton setEnabled documentAboutToBeChanged DocumentEvent
public void initialize source Viewer set Editable schema is Editable document add Document Listener new I Document Listener public void document Changed Document Event e if ignore Change schema is Editable mark Dirty apply Button set Enabled true reset Button set Enabled true public void document About To Be Changed Document Event e update Editor Input schema schema add Model Changed Listener this  sourceViewer setEditable isEditable addDocumentListener IDocumentListener documentChanged DocumentEvent ignoreChange isEditable markDirty applyButton setEnabled resetButton setEnabled documentAboutToBeChanged DocumentEvent updateEditorInput addModelChangedListener
public void dispose schema remove Model Changed Listener this super dispose  removeModelChangedListener
private void create Tabs I Document Section sections schema get Document Sections add Tab schema for int i 0 i sections length i I Document Section section sections i add Tab section  createTabs IDocumentSection getDocumentSections addTab IDocumentSection addTab
public void check For Pending Changes if apply Button is Enabled handle Apply  checkForPendingChanges applyButton isEnabled handleApply
private void add Tab I Schema Object section String label get Topic Name section C Tab Item item new C Tab Item tab Folder SWT NULL item set Text label item set Data section update Tab Image item  addTab ISchemaObject getTopicName CTabItem CTabItem tabFolder setText setData updateTabImage
private void update Tab Image C Tab Item item if item null return I Schema Object section I Schema Object item get Data if section null return item set Image PDE Plugin get Default get Label Provider get Image section  updateTabImage CTabItem ISchemaObject ISchemaObject getData setImage PDEPlugin getDefault getLabelProvider getImage
private void update Tab Selection int index tab Folder get Selection Index if schema is Editable is Dirty handle Apply if index 0 update Editor Input schema else I Document Section sections schema get Document Sections update Editor Input sections index 1  updateTabSelection tabFolder getSelectionIndex isEditable isDirty handleApply updateEditorInput IDocumentSection getDocumentSections updateEditorInput
public void set Focus source Viewer get Text Widget set Focus update Selection source Viewer get Selection  setFocus sourceViewer getTextWidget setFocus updateSelection sourceViewer getSelection
private void update Selection I Selection selection get Page getPDE Editor set Selection selection  updateSelection ISelection getPage getPDEEditor setSelection
public void update Editor Input Object input ignore Change true String text NON NLS 1 if input instanceof I Schema Object text I Schema Object input get Description if text null text NON NLS 1 else text Text Util create Multi Line text 60 false document set text apply Button set Enabled false reset Button set Enabled false element input ignore Change false  updateEditorInput ignoreChange ISchemaObject ISchemaObject getDescription TextUtil createMultiLine applyButton setEnabled resetButton setEnabled ignoreChange
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED mark Stale  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale
public void refresh int item Count tab Folder get Item Count I Document Section sections schema get Document Sections if item Count sections length 1 sections added or removed reload combo dispose All Tabs create Tabs get Page get Managed Form get Form reflow true update Editor Input schema else int index tab Folder get Selection Index if index 0 update Editor Input schema else update Editor Input sections index 1 super refresh  itemCount tabFolder getItemCount IDocumentSection getDocumentSections itemCount disposeAllTabs createTabs getPage getManagedForm getForm updateEditorInput tabFolder getSelectionIndex updateEditorInput updateEditorInput
private void dispose All Tabs C Tab Item items tab Folder get Items for int i 0 i items length i items i dispose  disposeAllTabs CTabItem tabFolder getItems
public boolean can Paste Clipboard clipboard return source Viewer can Do Operation Source Viewer PASTE  canPaste sourceViewer canDoOperation SourceViewer

class Label Attribute Validator implements I Cell Editor Validator public String is Valid Object value String svalue value to String if is Valid Attribute svalue false return PDE Plugin get Formatted Message KEY INVALID svalue return null  LabelAttributeValidator ICellEditorValidator isValid toString isValidAttribute PDEPlugin getFormattedMessage KEY_INVALID
public Element Property Source I Schema Element extension super extension  ElementPropertySource ISchemaElement
super extension private void fix References Schema Element element Schema element get Schema update References For element  fixReferences SchemaElement getSchema updateReferencesFor
Schema element get Schema update References For element public Object get Editable Value return null  getSchema updateReferencesFor getEditableValue
public I Property Descriptor get Property Descriptors if descriptors null descriptors new Vector Property Descriptor desc create Text Property Descriptor P LABEL ATTRIBUTE PDE Plugin get Resource String KEY LABEL ATTRIBUTE desc set Validator new Label Attribute Validator descriptors add Element desc desc create Text Property Descriptor P ICON PDE Plugin get Resource String KEY ICON descriptors add Element desc desc create Text Property Descriptor P NAME PDE Plugin get Resource String KEY NAME descriptors add Element desc return to Descriptor Array descriptors  IPropertyDescriptor getPropertyDescriptors PropertyDescriptor createTextPropertyDescriptor P_LABEL_ATTRIBUTE PDEPlugin getResourceString KEY_LABEL_ATTRIBUTE setValidator LabelAttributeValidator addElement createTextPropertyDescriptor P_ICON PDEPlugin getResourceString KEY_ICON addElement createTextPropertyDescriptor P_NAME PDEPlugin getResourceString KEY_NAME addElement toDescriptorArray
public Object get Property Value Object name I Schema Element element I Schema Element get Source Object if name equals P LABEL ATTRIBUTE return get Nonzero Value element get Label Property if name equals P ICON return get Nonzero Value element get Icon Property if name equals P NAME return get Nonzero Value element get Name return NON NLS 1  getPropertyValue ISchemaElement ISchemaElement getSourceObject P_LABEL_ATTRIBUTE getNonzeroValue getLabelProperty P_ICON getNonzeroValue getIconProperty P_NAME getNonzeroValue getName
return NON NLS 1 public boolean is Property Set Object property return false  isPropertySet
private boolean is Valid Attribute String name if name null name length 0 return true I Schema Element element I Schema Element get Source Object return element get Attribute name null  isValidAttribute ISchemaElement ISchemaElement getSourceObject getAttribute
return element get Attribute name null public void reset Property Value Object property  getAttribute resetPropertyValue
public void reset Property Value Object property public void set Property Value Object name Object value Schema Element element Schema Element get Source Object String svalue String value if name equals P LABEL ATTRIBUTE element set Label Property svalue else if name equals P ICON element set Icon Property svalue else if name equals P NAME element set Name svalue fix References element  resetPropertyValue setPropertyValue SchemaElement SchemaElement getSourceObject P_LABEL_ATTRIBUTE setLabelProperty P_ICON setIconProperty P_NAME setName fixReferences

extends Default Content Provider implements I Tree Content Provider public Object get Elements Object object Schema schema Schema object return schema get Elements  DefaultContentProvider ITreeContentProvider getElements getElements
public Object get Children Object parent if parent instanceof I Schema Element return I Schema Element parent get Attributes return new Object 0  getChildren ISchemaElement ISchemaElement getAttributes
public Object get Parent Object child if child instanceof I Schema Object return I Schema Object child get Parent return null  getParent ISchemaObject ISchemaObject getParent
return null public boolean has Children Object parent return get Children parent length 0  hasChildren getChildren
public Element Section PDE Form Page page Composite parent super page parent Section DESCRIPTION new String PDE Plugin get Resource String SECTION NEW ELEMENT PDE Plugin get Resource String SECTION NEW ATTRIBUTE get Section set Text PDE Plugin get Resource String SECTION TITLE get Section set Description PDE Plugin get Resource String SECTION DESC  ElementSection PDEFormPage PDEPlugin getResourceString SECTION_NEW_ELEMENT PDEPlugin getResourceString SECTION_NEW_ATTRIBUTE getSection setText PDEPlugin getResourceString SECTION_TITLE getSection setDescription PDEPlugin getResourceString SECTION_DESC
public void create Client Section section Form Toolkit toolkit Composite container create Client Container section 2 toolkit create Tree container toolkit toolkit paint Borders For container properties Action new Properties Action get Page getPDE Editor section set Client container initialize  createClient FormToolkit createClientContainer createTree paintBordersFor propertiesAction PropertiesAction getPage getPDEEditor setClient
private void create Tree Composite container Form Toolkit toolkit Tree Part tree Part get Tree Part create Viewer Part Control container SWT MULTI 2 toolkit tree Viewer tree Part get Tree Viewer tree Viewer set Auto Expand Level Tree Viewer ALL LEVELS tree Viewer set Content Provider new Content Provider tree Viewer set Label Provider PDE Plugin get Default get Label Provider init Drag And Drop  createTree FormToolkit TreePart treePart getTreePart createViewerPartControl treeViewer treePart getTreeViewer treeViewer setAutoExpandLevel TreeViewer ALL_LEVELS treeViewer setContentProvider ContentProvider treeViewer setLabelProvider PDEPlugin getDefault getLabelProvider initDragAndDrop
private void init Drag And Drop clipboard new Clipboard tree Viewer get Control get Display int ops DND DROP COPY DND DROP MOVE Transfer transfers new Transfer Model Data Transfer get Instance Text Transfer get Instance tree Viewer add Drag Support ops transfers new Element Section Drag Adapter I Selection Provider tree Viewer this tree Viewer add Drop Support ops DND DROP DEFAULT transfers new Element Section Drop Adapter this  initDragAndDrop treeViewer getControl getDisplay DROP_COPY DROP_MOVE ModelDataTransfer getInstance TextTransfer getInstance treeViewer addDragSupport ElementSectionDragAdapter ISelectionProvider treeViewer treeViewer addDropSupport DROP_DEFAULT ElementSectionDropAdapter
Tree Viewer get Tree Viewer return tree Viewer  TreeViewer getTreeViewer treeViewer
protected void button Selected int index if index 0 handle New Element else if index 1 handle New Attribute  buttonSelected handleNewElement handleNewAttribute
public void dispose schema remove Model Changed Listener this if clipboard null clipboard dispose clipboard null super dispose  removeModelChangedListener
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id I Selection sel tree Viewer get Selection Object obj I Structured Selection sel get First Element if obj null handle Delete obj return true if action Id equals Action Factory CUT get Id delete here and let the editor transfer the selection to the clipboard I Selection sel tree Viewer get Selection Object obj I Structured Selection sel get First Element if obj null handle Delete obj return false if action Id equals Action Factory PASTE get Id do Paste return true return false  doGlobalAction actionId actionId ActionFactory getId ISelection treeViewer getSelection IStructuredSelection getFirstElement handleDelete actionId ActionFactory getId ISelection treeViewer getSelection IStructuredSelection getFirstElement handleDelete actionId ActionFactory getId doPaste
public boolean set Form Input Object object if object instanceof I Schema Element object instanceof I Schema Attribute tree Viewer set Selection new Structured Selection object true return true return false  setFormInput ISchemaElement ISchemaAttribute treeViewer setSelection StructuredSelection
manager add new Separator Action delete Action new Action public void run handle Delete I Structured Selection selection  deleteAction handleDelete IStructuredSelection
protected void fill Context Menu I Menu Manager manager final I Selection selection tree Viewer get Selection final Object object I Structured Selection selection get First Element Menu Manager submenu new Menu Manager PDE Plugin get Resource String POPUP NEW if object null object instanceof Schema Element new Element Action set Schema schema new Element Action set Enabled schema is Editable submenu add new Element Action if object null Schema Element element if object instanceof Schema Element element Schema Element object else element Schema Element Schema Attribute object get Parent if element get Name equals extension false NON NLS 1 new Attribute Action set Element element new Attribute Action set Enabled schema is Editable submenu add new Attribute Action manager add submenu if selection is Empty if object instanceof Schema Element Schema Element object get Name equals extension NON NLS 1 false manager add new Separator Action delete Action new Action public void run handle Delete I Structured Selection selection delete Action set Text PDE Plugin get Resource String POPUP DELETE delete Action set Enabled schema is Editable manager add delete Action get Page getPDE Editor get Contributor context Menu About To Show manager manager add new Separator manager add properties Action  fillContextMenu IMenuManager ISelection treeViewer getSelection IStructuredSelection getFirstElement MenuManager MenuManager PDEPlugin getResourceString POPUP_NEW SchemaElement newElementAction setSchema newElementAction setEnabled isEditable newElementAction SchemaElement SchemaElement SchemaElement SchemaElement SchemaAttribute getParent getName newAttributeAction setElement newAttributeAction setEnabled isEditable newAttributeAction isEmpty SchemaElement SchemaElement getName deleteAction handleDelete IStructuredSelection deleteAction setText PDEPlugin getResourceString POPUP_DELETE deleteAction setEnabled isEditable deleteAction getPage getPDEEditor getContributor contextMenuAboutToShow propertiesAction
private void handle Delete I Structured Selection selection for Iterator iter selection iterator iter has Next handle Delete iter next  handleDelete IStructuredSelection hasNext handleDelete
void handle Delete Object object I Schema Object sobject I Schema Object object I Schema Object parent sobject get Parent if sobject instanceof I Schema Element Schema schema Schema parent schema remove Element I Schema Element sobject schema update References For I Schema Element sobject I Schema REFRESH DELETE else if sobject instanceof I Schema Attribute Schema Element element Schema Element parent Schema Complex Type type Schema Complex Type element get Type type remove Attribute I Schema Attribute sobject  handleDelete ISchemaObject ISchemaObject ISchemaObject getParent ISchemaElement removeElement ISchemaElement updateReferencesFor ISchemaElement ISchema REFRESH_DELETE ISchemaAttribute SchemaElement SchemaElement SchemaComplexType SchemaComplexType getType removeAttribute ISchemaAttribute
private void handle New Attribute Object object I Structured Selection tree Viewer get Selection get First Element if object null Schema Element element if object instanceof Schema Element element Schema Element object else element Schema Element Schema Attribute object get Parent if element get Name equals extension false NON NLS 1 new Attribute Action set Element element new Attribute Action run  handleNewAttribute IStructuredSelection treeViewer getSelection getFirstElement SchemaElement SchemaElement SchemaElement SchemaElement SchemaAttribute getParent getName newAttributeAction setElement newAttributeAction
private void handle New Element new Element Action set Schema schema new Element Action run  handleNewElement newElementAction setSchema newElementAction
public void initialize this schema Schema get Page get Model tree Viewer set Input schema schema add Model Changed Listener this get Tree Part set Button Enabled 0 schema is Editable get Tree Part set Button Enabled 1 false  getPage getModel treeViewer setInput addModelChangedListener getTreePart setButtonEnabled isEditable getTreePart setButtonEnabled
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED mark Stale return Object obj e get Changed Objects 0 if obj instanceof I Schema Object Reference return if obj instanceof I Schema Element obj instanceof I Schema Attribute if e get Change Type I Model Changed Event CHANGE tree Viewer update obj null else if e get Change Type I Model Changed Event INSERT I Schema Object sobj I Schema Object obj I Schema Object parent sobj get Parent tree Viewer add parent sobj tree Viewer set Selection new Structured Selection obj true else if e get Change Type I Model Changed Event REMOVE I Schema Object sobj I Schema Object obj I Schema Object parent sobj get Parent tree Viewer remove obj tree Viewer set Selection new Structured Selection parent true  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale getChangedObjects ISchemaObjectReference ISchemaElement ISchemaAttribute getChangeType IModelChangedEvent treeViewer getChangeType IModelChangedEvent ISchemaObject ISchemaObject ISchemaObject getParent treeViewer treeViewer setSelection StructuredSelection getChangeType IModelChangedEvent ISchemaObject ISchemaObject ISchemaObject getParent treeViewer treeViewer setSelection StructuredSelection
public void refresh tree Viewer refresh super refresh  treeViewer
protected void selection Changed I Structured Selection selection get Page get Managed Form fire Selection Changed this selection get Page getPDE Editor set Selection selection update Buttons  selectionChanged IStructuredSelection getPage getManagedForm fireSelectionChanged getPage getPDEEditor setSelection updateButtons
public void set Focus tree Viewer get Tree set Focus get Page getPDE Editor set Selection tree Viewer get Selection  setFocus treeViewer getTree setFocus getPage getPDEEditor setSelection treeViewer getSelection
private void update Buttons if schema is Editable false return Object object I Structured Selection tree Viewer get Selection get First Element I Schema Object sobject I Schema Object object boolean can Add Attribute false if sobject null String name sobject get Name if sobject instanceof I Schema Element if name equals extension false NON NLS 1 can Add Attribute true else if sobject instanceof I Schema Attribute I Schema Element element I Schema Element sobject get Parent if element get Name equals extension false NON NLS 1 can Add Attribute true get Tree Part set Button Enabled 1 can Add Attribute  updateButtons isEditable IStructuredSelection treeViewer getSelection getFirstElement ISchemaObject ISchemaObject canAddAttribute getName ISchemaElement canAddAttribute ISchemaAttribute ISchemaElement ISchemaElement getParent getName canAddAttribute getTreePart setButtonEnabled canAddAttribute
public void do Paste Object target Object objects for int i 0 i objects length i Object object objects i Object real Target get Real Target target object Object sibling get Sibling target object if real Target null continue do Paste real Target sibling object  doPaste realTarget getRealTarget getSibling realTarget doPaste realTarget
private Object get Sibling Object target Object object if target instanceof I Schema Element object instanceof I Schema Element return target if target instanceof I Schema Attribute object instanceof I Schema Attribute return target return null  getSibling ISchemaElement ISchemaElement ISchemaAttribute ISchemaAttribute
private Object get Real Target Object target Object object if object instanceof I Schema Element return schema if object instanceof I Schema Attribute if target instanceof I Schema Attribute add it to the parent of the selected attribute return I Schema Attribute target get Parent if target instanceof I Schema Element return target return null  getRealTarget ISchemaElement ISchemaAttribute ISchemaAttribute ISchemaAttribute getParent ISchemaElement
private void do Paste Object real Target Object sibling Object object if object instanceof I Schema Element Schema Element element Schema Element object element set Parent schema schema add Element element I Schema Element sibling schema update References For element I Schema REFRESH ADD else if object instanceof I Schema Attribute Schema Element element Schema Element real Target Schema Attribute attribute Schema Attribute object attribute set Parent element I Schema Type type element get Type Schema Complex Type complex Type null if type instanceof I Schema Complex Type complex Type new Schema Complex Type element get Schema element set Type complex Type else complex Type Schema Complex Type type complex Type add Attribute attribute I Schema Attribute sibling  doPaste realTarget ISchemaElement SchemaElement SchemaElement setParent addElement ISchemaElement updateReferencesFor ISchema REFRESH_ADD ISchemaAttribute SchemaElement SchemaElement realTarget SchemaAttribute SchemaAttribute setParent ISchemaType getType SchemaComplexType complexType ISchemaComplexType complexType SchemaComplexType getSchema setType complexType complexType SchemaComplexType complexType addAttribute ISchemaAttribute
protected boolean can Paste Object target Object objects for int i 0 i objects length i Object obj objects i Attributes can only paste into elements if obj instanceof I Schema Attribute if target instanceof I Schema Attribute target instanceof I Schema Element continue else if obj instanceof I Schema Element continue return false return true  canPaste ISchemaAttribute ISchemaAttribute ISchemaElement ISchemaElement
return true protected void handle Double Click I Structured Selection selection properties Action run  handleDoubleClick IStructuredSelection propertiesAction

Navigator Drag Action constructor comment public Element Section Drag Adapter I Selection Provider provider Element Section section selection Provider provider this section section  NavigatorDragAction ElementSectionDragAdapter ISelectionProvider ElementSection selectionProvider
Returns the data to be transferred in a drag and drop operation public void drag Set Data Drag Source Event event if event doit false return if Model Data Transfer get Instance is Supported Type event data Type event data get Selected Model Objects drag Data event data return if Text Transfer get Instance is Supported Type event data Type event data create Textual Representation I Structured Selection selection Provider get Selection drag Data null return  dragSetData DragSourceEvent ModelDataTransfer getInstance isSupportedType dataType getSelectedModelObjects dragData TextTransfer getInstance isSupportedType dataType createTextualRepresentation IStructuredSelection selectionProvider getSelection dragData
static String create Textual Representation I Structured Selection sel String Buffer buf new String Buffer for Iterator iter sel iterator iter has Next String name iter next to String buf append name buf append NON NLS 1 return buf to String  createTextualRepresentation IStructuredSelection StringBuffer StringBuffer hasNext toString toString
All selection must be named model objects public void drag Start Drag Source Event event Workaround for 1GEUS9V Drag Source drag Source Drag Source event widget Control control drag Source get Control if control control get Display get Focus Control event doit false return event doit can Drag  dragStart DragSourceEvent DragSource dragSource DragSource dragSource getControl getDisplay getFocusControl canDrag
public void drag Finished Drag Source Event event if event doit false drag Data null return if event detail DND DROP MOVE I Schema Object objects I Schema Object drag Data for int i 0 i objects length i I Schema Object obj objects i section handle Delete obj drag Data null  dragFinished DragSourceEvent dragData DROP_MOVE ISchemaObject ISchemaObject dragData ISchemaObject handleDelete dragData
private boolean can Drag return can Copy I Structured Selection selection Provider get Selection  canDrag canCopy IStructuredSelection selectionProvider getSelection
static boolean can Copy I Structured Selection selection Object prev null for Iterator iter selection iterator iter has Next Object obj iter next if obj instanceof I Schema Object return false if prev null if prev get Class equals obj get Class false return false else prev obj return true  canCopy IStructuredSelection hasNext ISchemaObject getClass getClass
private I Schema Object get Selected Model Objects return create Object Representation I Structured Selection selection Provider get Selection  ISchemaObject getSelectedModelObjects createObjectRepresentation IStructuredSelection selectionProvider getSelection
static I Schema Object create Object Representation I Structured Selection selection Array List objects new Array List for Iterator iter selection iterator iter has Next Object obj iter next if obj instanceof I Schema Object objects add obj else return new I Schema Object 0 return I Schema Object objects to Array new I Schema Object objects size  ISchemaObject createObjectRepresentation IStructuredSelection ArrayList ArrayList hasNext ISchemaObject ISchemaObject ISchemaObject toArray ISchemaObject

private Element Section section public Element Section Drop Adapter Element Section section super section get Tree Viewer this section section  ElementSection ElementSectionDropAdapter ElementSection getTreeViewer
see org eclipse jface viewers Viewer Drop Adapter perform Drop java lang Object public boolean perform Drop Object data if data instanceof Object section do Paste get Current Target Object data return true return false  ViewerDropAdapter performDrop performDrop doPaste getCurrentTarget
see org eclipse jface viewers Viewer Drop Adapter validate Drop java lang Object int org eclipse swt dnd Transfer Data public boolean validate Drop Object target int operation Transfer Data transfer Type current Transfer transfer Type if current Transfer null Model Data Transfer get Instance is Supported Type current Transfer return validate Target return false  ViewerDropAdapter validateDrop TransferData validateDrop TransferData transferType currentTransfer transferType currentTransfer ModelDataTransfer getInstance isSupportedType currentTransfer validateTarget
private boolean validate Target Object target get Current Target if target null target instanceof I Schema Object return true else return false  validateTarget getCurrentTarget ISchemaObject

add Button set Enabled false add Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Add  addButton setEnabled addButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAdd
delete Button set Enabled false delete Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Delete  deleteButton setEnabled deleteButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleDelete
text add Modify Listener new Modify Listener public void modify Text Modify Event e String item text get Text boolean can Add true if item length 0 choice List index Of item 1 can Add false add Button set Enabled can Add  addModifyListener ModifyListener modifyText ModifyEvent getText canAdd choiceList indexOf canAdd addButton setEnabled canAdd
text add Listener SWT Traverse new Listener public void handle Event Event e handle Add e doit false  addListener handleEvent handleAdd
choice List add Selection Listener new Selection Adapter public void widget Selected Selection Event e delete Button set Enabled choice List get Selection Count 0 if choice List get Selection Count 1 text set Text choice List get Selection 0  choiceList addSelectionListener SelectionAdapter widgetSelected SelectionEvent deleteButton setEnabled choiceList getSelectionCount choiceList getSelectionCount setText choiceList getSelection
public Control create Control Composite parent Composite container new Composite parent SWT NULL container set Layout new Grid Layout Composite top new Composite container SWT NULL Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 2 top set Layout layout top set Layout Data new Grid Data Grid Data FILL HORIZONTAL Label label new Label top SWT NULL label set Text PDE Plugin get Resource String KEY NEW CHOICE Grid Data gd new Grid Data gd horizontal Span 2 label set Layout Data gd text new Text top SWT SINGLE SWT BORDER text set Layout Data new Grid Data Grid Data FILL HORIZONTAL add Button new Button top SWT PUSH add Button set Text PDE Plugin get Resource String KEY ADD add Button set Enabled false add Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Add add Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END SWT Util set Button Dimension Hint add Button Composite bottom new Composite container SWT NULL bottom set Layout Data new Grid Data Grid Data FILL BOTH layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 2 bottom set Layout layout label new Label bottom SWT NULL gd new Grid Data gd horizontal Span 2 label set Layout Data gd label set Text PDE Plugin get Resource String KEY CHOICES choice List new List bottom SWT MULTI SWT BORDER SWT H SCROLL SWT V SCROLL choice List set Layout Data new Grid Data Grid Data FILL BOTH delete Button new Button bottom SWT PUSH delete Button set Text PDE Plugin get Resource String KEY REMOVE delete Button set Enabled false delete Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Delete delete Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END SWT Util set Button Dimension Hint delete Button text add Modify Listener new Modify Listener public void modify Text Modify Event e String item text get Text boolean can Add true if item length 0 choice List index Of item 1 can Add false add Button set Enabled can Add text add Listener SWT Traverse new Listener public void handle Event Event e handle Add e doit false choice List add Selection Listener new Selection Adapter public void widget Selected Selection Event e delete Button set Enabled choice List get Selection Count 0 if choice List get Selection Count 1 text set Text choice List get Selection 0 this control container return container  createControl setLayout GridLayout GridLayout GridLayout marginHeight marginWidth numColumns setLayout setLayoutData GridData GridData FILL_HORIZONTAL setText PDEPlugin getResourceString KEY_NEW_CHOICE GridData GridData horizontalSpan setLayoutData setLayoutData GridData GridData FILL_HORIZONTAL addButton addButton setText PDEPlugin getResourceString KEY_ADD addButton setEnabled addButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAdd addButton setLayoutData GridData GridData HORIZONTAL_ALIGN_END SWTUtil setButtonDimensionHint addButton setLayoutData GridData GridData FILL_BOTH GridLayout marginHeight marginWidth numColumns setLayout GridData horizontalSpan setLayoutData setText PDEPlugin getResourceString KEY_CHOICES choiceList H_SCROLL V_SCROLL choiceList setLayoutData GridData GridData FILL_BOTH deleteButton deleteButton setText PDEPlugin getResourceString KEY_REMOVE deleteButton setEnabled deleteButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleDelete deleteButton setLayoutData GridData GridData HORIZONTAL_ALIGN_END SWTUtil setButtonDimensionHint deleteButton addModifyListener ModifyListener modifyText ModifyEvent getText canAdd choiceList indexOf canAdd addButton setEnabled canAdd addListener handleEvent handleAdd choiceList addSelectionListener SelectionAdapter widgetSelected SelectionEvent deleteButton setEnabled choiceList getSelectionCount choiceList getSelectionCount setText choiceList getSelection
return container public Class get Compatible Restriction Class return Choice Restriction class  getCompatibleRestrictionClass ChoiceRestriction
return Choice Restriction class public org eclipse swt widgets Control get Control return control  ChoiceRestriction getControl
public I Schema Restriction get Restriction Choice Restriction restriction new Choice Restriction I Schema null String items choice List get Items if items length 0 Vector enums new Vector for int i 0 i items length i Schema Enumeration enum new Schema Enumeration restriction items i enums add Element enum restriction set Children enums return restriction  ISchemaRestriction getRestriction ChoiceRestriction ChoiceRestriction ISchema choiceList getItems SchemaEnumeration SchemaEnumeration addElement setChildren
private void handle Add String item text get Text trim if item length 0 return choice List add item choice List set Selection new String item text set Text NON NLS 1 delete Button set Enabled true  handleAdd getText choiceList choiceList setSelection setText deleteButton setEnabled
private void handle Delete String selection choice List get Selection choice List set Redraw false for int i 0 i selection length i choice List remove selection i choice List set Redraw true delete Button set Enabled false  handleDelete choiceList getSelection choiceList setRedraw choiceList choiceList setRedraw deleteButton setEnabled
public void initialize I Schema Restriction restriction if restriction null Object children restriction get Children for int i 0 i children length i Object child children i if child instanceof I Schema Enumeration choice List add child to String  ISchemaRestriction getChildren ISchemaEnumeration choiceList toString

class Min Validator implements I Cell Editor Validator public String is Valid Object value String svalue value to String try int ivalue Integer parse Int svalue return is Min Occurs Valid ivalue catch Number Format Exception e return PDE Plugin get Resource String Grammar Property Source min Occurs Format NON NLS 1  MinValidator ICellEditorValidator isValid toString parseInt isMinOccursValid NumberFormatException PDEPlugin getResourceString GrammarPropertySource minOccursFormat
class Max Validator implements I Cell Editor Validator public String is Valid Object value String svalue value to String if svalue equals unbounded NON NLS 1 return is Max Occurs Valid Integer MAX VALUE try int ivalue Integer parse Int svalue return is Max Occurs Valid ivalue catch Number Format Exception e return PDE Plugin get Resource String Grammar Property Source max Occurs Format NON NLS 1  MaxValidator ICellEditorValidator isValid toString isMaxOccursValid MAX_VALUE parseInt isMaxOccursValid NumberFormatException PDEPlugin getResourceString GrammarPropertySource maxOccursFormat
protected String is Min Occurs Valid int ivalue if ivalue 0 return PDE Plugin get Resource String Grammar Property Source min Occurs Value NON NLS 1 return null  isMinOccursValid PDEPlugin getResourceString GrammarPropertySource minOccursValue
protected String is Max Occurs Valid int ivalue if ivalue 0 return PDE Plugin get Resource String Grammar Property Source max Occurs Value NON NLS 1 return null  isMaxOccursValid PDEPlugin getResourceString GrammarPropertySource maxOccursValue
public Grammar Property Source I Schema Repeatable obj super obj  GrammarPropertySource ISchemaRepeatable
super obj public Object get Editable Value return null  getEditableValue
protected String get Max Occurs I Schema Repeatable obj if obj get Max Occurs Integer MAX VALUE return unbounded NON NLS 1 return Integer to String obj get Max Occurs  getMaxOccurs ISchemaRepeatable getMaxOccurs MAX_VALUE toString getMaxOccurs
return Integer to String obj get Max Occurs protected String get Min Occurs I Schema Repeatable obj return Integer to String obj get Min Occurs  toString getMaxOccurs getMinOccurs ISchemaRepeatable toString getMinOccurs
public I Property Descriptor get Property Descriptors if descriptors null descriptors get Property Descriptors Vector return to Descriptor Array descriptors  IPropertyDescriptor getPropertyDescriptors getPropertyDescriptorsVector toDescriptorArray
protected Vector get Property Descriptors Vector Vector result new Vector Property Descriptor desc create Text Property Descriptor P MIN OCCURS min Occurs NON NLS 1 desc set Validator new Min Validator result add Element desc desc create Text Property Descriptor P MAX OCCURS max Occurs NON NLS 1 desc set Validator new Max Validator result add Element desc return result  getPropertyDescriptorsVector PropertyDescriptor createTextPropertyDescriptor P_MIN_OCCURS minOccurs setValidator MinValidator addElement createTextPropertyDescriptor P_MAX_OCCURS maxOccurs setValidator MaxValidator addElement
public Object get Property Value Object name I Schema Repeatable obj I Schema Repeatable get Source Object if name equals P MIN OCCURS return get Min Occurs obj if name equals P MAX OCCURS return get Max Occurs obj return null  getPropertyValue ISchemaRepeatable ISchemaRepeatable getSourceObject P_MIN_OCCURS getMinOccurs P_MAX_OCCURS getMaxOccurs
return null public boolean is Property Set Object property return false  isPropertySet
public int parse Value Object value String svalue String value if svalue equals unbounded NON NLS 1 return Integer MAX VALUE try return Integer parse Int svalue to String catch Number Format Exception e PDE Plugin log Exception e return 1  parseValue MAX_VALUE parseInt toString NumberFormatException PDEPlugin logException
return 1 public void reset Property Value Object property  resetPropertyValue
public void set Property Value Object name Object value I Schema Repeatable obj I Schema Repeatable get Source Object if name equals P MIN OCCURS int ivalue parse Value value if obj instanceof Repeatable Schema Object Repeatable Schema Object obj set Min Occurs ivalue else if obj instanceof Schema Element Reference Schema Element Reference obj set Min Occurs ivalue else if name equals P MAX OCCURS int ivalue parse Value value if obj instanceof Repeatable Schema Object Repeatable Schema Object obj set Max Occurs ivalue else if obj instanceof Schema Element Reference Schema Element Reference obj set Max Occurs ivalue  setPropertyValue ISchemaRepeatable ISchemaRepeatable getSourceObject P_MIN_OCCURS parseValue RepeatableSchemaObject RepeatableSchemaObject setMinOccurs SchemaElementReference SchemaElementReference setMinOccurs P_MAX_OCCURS parseValue RepeatableSchemaObject RepeatableSchemaObject setMaxOccurs SchemaElementReference SchemaElementReference setMaxOccurs

implements I Tree Content Provider public Object get Children Object parent Object children null if parent instanceof I Schema Element parent instanceof Schema Element Reference I Schema Type type I Schema Element parent get Type if type instanceof I Schema Complex Type Object compositor I Schema Complex Type type get Compositor if compositor null children new Object 1 children 0 compositor else if parent instanceof I Schema Compositor children I Schema Compositor parent get Children if children null children new Object 0 return children  ITreeContentProvider getChildren ISchemaElement SchemaElementReference ISchemaType ISchemaElement getType ISchemaComplexType ISchemaComplexType getCompositor ISchemaCompositor ISchemaCompositor getChildren
return children public boolean has Children Object parent return get Children parent length 0  hasChildren getChildren
return get Children parent length 0 public Object get Parent Object child return null  getChildren getParent
return null public Object get Elements Object parent return get Children parent  getElements getChildren
class Grammar Label Provider extends Label Provider public String get Text Object o return PDE Plugin get Default get Label Provider get Text o  GrammarLabelProvider LabelProvider getText PDEPlugin getDefault getLabelProvider getText
public Image get Image Object o if o instanceof I Schema Object Reference I Schema Object Reference ref I Schema Object Reference o int flags ref get Referenced Object null PDE Label Provider F ERROR 0 return PDE Plugin get Default get Label Provider get PDE Plugin Images DESC ELREF SC OBJ flags return PDE Plugin get Default get Label Provider get Image o  getImage ISchemaObjectReference ISchemaObjectReference ISchemaObjectReference getReferencedObject PDELabelProvider F_ERROR PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_ELREF_SC_OBJ PDEPlugin getDefault getLabelProvider getImage
public Grammar Section PDE Form Page page Composite parent super page parent Section DESCRIPTION get Section set Text PDE Plugin get Resource String SECTION TITLE get Section set Description PDE Plugin get Resource String SECTION DESC create Client get Section page get Managed Form get Toolkit  GrammarSection PDEFormPage getSection setText PDEPlugin getResourceString SECTION_TITLE getSection setDescription PDEPlugin getResourceString SECTION_DESC createClient getSection getManagedForm getToolkit
public void create Client Section section Form Toolkit toolkit Composite container toolkit create Composite section Grid Layout layout new Grid Layout layout margin Width layout margin Height 2 layout vertical Spacing toolkit get Border Style SWT BORDER 0 1 container set Layout layout Control tree create Tree container toolkit Grid Data gd new Grid Data Grid Data FILL BOTH if SWT get Platform equals motif false gd height Hint 150 gd width Hint 200 tree set Layout Data gd dtd Label toolkit create Text container NON NLS 1 SWT WRAP SWT V SCROLL SWT MULTI dtd Label set Data Form Toolkit KEY DRAW BORDER Form Toolkit TREE BORDER dtd Label set Editable false dtd Label set Foreground toolkit get Colors get Color Form Colors TITLE gd new Grid Data Grid Data FILL BOTH dtd Label set Layout Data gd updateDTD Label null toolkit paint Borders For container section set Client container initialize  createClient FormToolkit createComposite GridLayout GridLayout marginWidth marginHeight verticalSpacing getBorderStyle setLayout createTree GridData GridData GridData FILL_BOTH getPlatform heightHint widthHint setLayoutData dtdLabel createText V_SCROLL dtdLabel setData FormToolkit KEY_DRAW_BORDER FormToolkit TREE_BORDER dtdLabel setEditable dtdLabel setForeground getColors getColor FormColors GridData GridData FILL_BOTH dtdLabel setLayoutData updateDTDLabel paintBordersFor setClient
tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e get Page getPDE Editor set Selection e get Selection  treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getPage getPDEEditor setSelection getSelection
Menu Manager popup Menu Manager new Menu Manager I Menu Listener listener new I Menu Listener public void menu About To Show I Menu Manager mng fill Context Menu mng  MenuManager popupMenuManager MenuManager IMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu
private Control create Tree Composite parent Form Toolkit toolkit Tree tree toolkit create Tree parent SWT SINGLE tree Viewer new Tree Viewer tree tree Viewer set Label Provider new Grammar Label Provider tree Viewer set Content Provider new Grammar Content Provider tree Viewer set Auto Expand Level 999 tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e get Page getPDE Editor set Selection e get Selection Menu Manager popup Menu Manager new Menu Manager I Menu Listener listener new I Menu Listener public void menu About To Show I Menu Manager mng fill Context Menu mng popup Menu Manager set Remove All When Shown true popup Menu Manager add Menu Listener listener Menu menu popup Menu Manager create Context Menu tree tree set Menu menu return tree  createTree FormToolkit createTree treeViewer TreeViewer treeViewer setLabelProvider GrammarLabelProvider treeViewer setContentProvider GrammarContentProvider treeViewer setAutoExpandLevel treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getPage getPDEEditor setSelection getSelection MenuManager popupMenuManager MenuManager IMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu popupMenuManager setRemoveAllWhenShown popupMenuManager addMenuListener popupMenuManager createContextMenu setMenu
public void dispose I Schema schema I Schema get Page get Model schema remove Model Changed Listener this super dispose  ISchema ISchema getPage getModel removeModelChangedListener
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id I Selection sel tree Viewer get Selection Object obj I Structured Selection sel get First Element if obj null handle Delete obj return true return false  doGlobalAction actionId actionId ActionFactory getId ISelection treeViewer getSelection IStructuredSelection getFirstElement handleDelete
manager add new Separator Action delete Action new Action public void run handle Delete object  deleteAction handleDelete
protected void fill Context Menu I Menu Manager manager I Selection selection tree Viewer get Selection final Object object I Structured Selection selection get First Element I Schema Element source Element I Schema Element tree Viewer get Input if source Element null I Schema schema source Element get Schema Menu Manager submenu new Menu Manager PDE Plugin get Resource String POPUP NEW Menu Manager cmenu new Menu Manager PDE Plugin get Resource String SECTION COMPOSITOR cmenu add new New Compositor Action source Element object I Schema Compositor ALL cmenu add new New Compositor Action source Element object I Schema Compositor CHOICE cmenu add new New Compositor Action source Element object I Schema Compositor SEQUENCE cmenu add new New Compositor Action source Element object I Schema Compositor GROUP submenu add cmenu if schema get Resolved Element Count 1 object null object instanceof Schema Compositor Menu Manager ref Menu new Menu Manager PDE Plugin get Resource String SECTION REFERENCE I Schema Element elements schema get Resolved Elements for int i 0 i elements length i I Schema Element element elements i if element source Element continue ref Menu add new New Reference Action source Element object element submenu add ref Menu if object null object instanceof Schema Compositor manager add submenu if object null manager add new Separator Action delete Action new Action public void run handle Delete object delete Action set Text PDE Plugin get Resource String POPUP DELETE delete Action set Enabled schema is Editable manager add delete Action get Page getPDE Editor get Contributor context Menu About To Show manager manager add new Separator manager add new Properties Action get Page getPDE Editor  fillContextMenu IMenuManager ISelection treeViewer getSelection IStructuredSelection getFirstElement ISchemaElement sourceElement ISchemaElement treeViewer getInput sourceElement ISchema sourceElement getSchema MenuManager MenuManager PDEPlugin getResourceString POPUP_NEW MenuManager MenuManager PDEPlugin getResourceString SECTION_COMPOSITOR NewCompositorAction sourceElement ISchemaCompositor NewCompositorAction sourceElement ISchemaCompositor NewCompositorAction sourceElement ISchemaCompositor NewCompositorAction sourceElement ISchemaCompositor getResolvedElementCount SchemaCompositor MenuManager refMenu MenuManager PDEPlugin getResourceString SECTION_REFERENCE ISchemaElement getResolvedElements ISchemaElement sourceElement refMenu NewReferenceAction sourceElement refMenu SchemaCompositor deleteAction handleDelete deleteAction setText PDEPlugin getResourceString POPUP_DELETE deleteAction setEnabled isEditable deleteAction getPage getPDEEditor getContributor contextMenuAboutToShow PropertiesAction getPage getPDEEditor
private void handle Delete Object object if object instanceof Schema Compositor Schema Compositor compositor Schema Compositor object I Schema Object parent compositor get Parent if parent instanceof I Schema Element root Schema Element element Schema Element parent Schema Complex Type complex Type Schema Complex Type element get Type if complex Type get Attribute Count 0 element set Type new Schema Simple Type element get Schema string NON NLS 1 else complex Type set Compositor null else if parent instanceof Schema Compositor Schema Compositor parent remove Child compositor else if object instanceof Schema Element Reference Schema Compositor compositor Schema Compositor Schema Element Reference object get Compositor compositor remove Child Schema Element Reference object  handleDelete SchemaCompositor SchemaCompositor SchemaCompositor ISchemaObject getParent ISchemaElement SchemaElement SchemaElement SchemaComplexType complexType SchemaComplexType getType complexType getAttributeCount setType SchemaSimpleType getSchema complexType setCompositor SchemaCompositor SchemaCompositor removeChild SchemaElementReference SchemaCompositor SchemaCompositor SchemaElementReference getCompositor removeChild SchemaElementReference
public void initialize I Schema schema I Schema get Page get Model schema add Model Changed Listener this  ISchema ISchema getPage getModel addModelChangedListener
tree Viewer get Tree get Display async Exec new Runnable public void run tree Viewer set Selection new Structured Selection sobj true  treeViewer getTree getDisplay asyncExec treeViewer setSelection StructuredSelection
tree Viewer get Tree get Display async Exec new Runnable public void run tree Viewer set Selection new Structured Selection compositor true  treeViewer getTree getDisplay asyncExec treeViewer setSelection StructuredSelection
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED mark Stale return Object obj e get Changed Objects 0 if obj instanceof I Schema Compositor obj instanceof I Schema Object Reference final I Schema Object sobj I Schema Object obj I Schema Object parent sobj get Parent if e get Change Type I Model Changed Event CHANGE tree Viewer update sobj null else if e get Change Type I Model Changed Event INSERT tree Viewer add parent sobj tree Viewer get Tree get Display async Exec new Runnable public void run tree Viewer set Selection new Structured Selection sobj true else if e get Change Type I Model Changed Event REMOVE tree Viewer remove sobj tree Viewer set Selection new Structured Selection parent true else if obj instanceof I Schema Complex Type first compositor added removed tree Viewer refresh if e get Change Type I Model Changed Event INSERT I Schema Complex Type type I Schema Complex Type obj final I Schema Compositor compositor type get Compositor tree Viewer get Tree get Display async Exec new Runnable public void run tree Viewer set Selection new Structured Selection compositor true else if obj instanceof I Schema Element if e get Change Type I Model Changed Event CHANGE e get Changed Property Schema Element P TYPE tree Viewer refresh updateDTD Label I Schema Object tree Viewer get Input  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale getChangedObjects ISchemaCompositor ISchemaObjectReference ISchemaObject ISchemaObject ISchemaObject getParent getChangeType IModelChangedEvent treeViewer getChangeType IModelChangedEvent treeViewer treeViewer getTree getDisplay asyncExec treeViewer setSelection StructuredSelection getChangeType IModelChangedEvent treeViewer treeViewer setSelection StructuredSelection ISchemaComplexType treeViewer getChangeType IModelChangedEvent ISchemaComplexType ISchemaComplexType ISchemaCompositor getCompositor treeViewer getTree getDisplay asyncExec treeViewer setSelection StructuredSelection ISchemaElement getChangeType IModelChangedEvent getChangedProperty SchemaElement P_TYPE treeViewer updateDTDLabel ISchemaObject treeViewer getInput
updateDTD Label I Schema Object tree Viewer get Input public void refresh tree Viewer refresh super refresh  updateDTDLabel ISchemaObject treeViewer getInput treeViewer
public void selection Changed I Form Part part I Selection selection if part instanceof Element Section return Object change Object I Structured Selection selection get First Element if change Object instanceof I Schema Attribute change Object I Schema Attribute change Object get Parent if change Object tree Viewer get Input return I Schema Object element I Schema Object change Object updateDTD Label element tree Viewer set Input change Object  selectionChanged IFormPart ISelection ElementSection changeObject IStructuredSelection getFirstElement changeObject ISchemaAttribute changeObject ISchemaAttribute changeObject getParent changeObject treeViewer getInput ISchemaObject ISchemaObject changeObject updateDTDLabel treeViewer setInput changeObject
private void updateDTD Label I Schema Object object String prefix PDE Plugin get Resource String KEY DTD n NON NLS 1 String text NON NLS 1 if object null I Schema Element element I Schema Element object text element getDTD Representation false dtd Label set Text prefix text  updateDTDLabel ISchemaObject PDEPlugin getResourceString KEY_DTD ISchemaElement ISchemaElement getDTDRepresentation dtdLabel setText

public interface I Cloneable Property Source public Object do Clone  ICloneablePropertySource doClone
public interface I Cloneable Property Source public Object do Clone boolean is Cloneable  ICloneablePropertySource doClone isCloneable

public interface I Restriction Page public Control create Control Composite parent  IRestrictionPage createControl
public interface I Restriction Page public Control create Control Composite parent public Class get Compatible Restriction Class  IRestrictionPage createControl getCompatibleRestrictionClass
public Control create Control Composite parent public Class get Compatible Restriction Class public Control get Control  createControl getCompatibleRestrictionClass getControl
public Class get Compatible Restriction Class public Control get Control public I Schema Restriction get Restriction  getCompatibleRestrictionClass getControl ISchemaRestriction getRestriction
public Control get Control public I Schema Restriction get Restriction public void initialize I Schema Restriction restriction  getControl ISchemaRestriction getRestriction ISchemaRestriction

public New Attribute Action set Text PDE Plugin get Resource String KEY LABEL set Image Descriptor PDE Plugin Images DESC ATT IMPL OBJ set Tool Tip Text PDE Plugin get Resource String KEY TOOLTIP  NewAttributeAction setText PDEPlugin getResourceString KEY_LABEL setImageDescriptor PDEPluginImages DESC_ATT_IMPL_OBJ setToolTipText PDEPlugin getResourceString KEY_TOOLTIP
set Tool Tip Text PDE Plugin get Resource String KEY TOOLTIP public org eclipse pde internal core schema Schema Element get Element return element  setToolTipText PDEPlugin getResourceString KEY_TOOLTIP SchemaElement getElement
private String get Initial Name Hashtable counters PDE Plugin get Default get Default Name Counters Integer counter Integer counters get NAME COUNTER KEY if counter null counter new Integer 1 else counter new Integer counter int Value 1 counters put NAME COUNTER KEY counter return PDE Plugin get Formatted Message KEY INITIAL NAME counter int Value NON NLS 1  getInitialName PDEPlugin getDefault getDefaultNameCounters NAME_COUNTER_KEY intValue NAME_COUNTER_KEY PDEPlugin getFormattedMessage KEY_INITIAL_NAME intValue
public void run String name get Initial Name Schema Attribute att new Schema Attribute element name att set Type new Schema Simple Type element get Schema string NON NLS 1 I Schema Type type element get Type Schema Complex Type complex Type null if type instanceof I Schema Complex Type complex Type new Schema Complex Type element get Schema element set Type complex Type else complex Type Schema Complex Type type complex Type add Attribute att  getInitialName SchemaAttribute SchemaAttribute setType SchemaSimpleType getSchema ISchemaType getType SchemaComplexType complexType ISchemaComplexType complexType SchemaComplexType getSchema setType complexType complexType SchemaComplexType complexType addAttribute
complex Type add Attribute att public void set Element org eclipse pde internal core schema Schema Element new Element element new Element  complexType addAttribute setElement SchemaElement newElement newElement

public New Compositor Action I Schema Element source Object object int kind this source source this object object this kind kind set Text I Schema Compositor kind Table kind NON NLS 1 set Tool Tip Text PDE Plugin get Formatted Message KEY TOOLTIP I Schema Compositor kind Table kind Image Descriptor desc null switch kind case I Schema Compositor ALL desc PDE Plugin Images DESC ALL SC OBJ break case I Schema Compositor GROUP desc PDE Plugin Images DESC GROUP SC OBJ break case I Schema Compositor SEQUENCE desc PDE Plugin Images DESC SEQ SC OBJ break case I Schema Compositor CHOICE desc PDE Plugin Images DESC CHOICE SC OBJ break set Image Descriptor desc set Enabled source get Schema is Editable  NewCompositorAction ISchemaElement setText ISchemaCompositor kindTable setToolTipText PDEPlugin getFormattedMessage KEY_TOOLTIP ISchemaCompositor kindTable ImageDescriptor ISchemaCompositor PDEPluginImages DESC_ALL_SC_OBJ ISchemaCompositor PDEPluginImages DESC_GROUP_SC_OBJ ISchemaCompositor PDEPluginImages DESC_SEQ_SC_OBJ ISchemaCompositor PDEPluginImages DESC_CHOICE_SC_OBJ setImageDescriptor setEnabled getSchema isEditable
public void run Schema Compositor compositor new Schema Compositor source kind if object null first time Schema Complex Type type null Schema Element element Schema Element source if element get Type instanceof Schema Complex Type type Schema Complex Type element get Type type set Compositor compositor else type new Schema Complex Type source get Schema type set Compositor compositor Schema Element source set Type type else if object instanceof Schema Compositor Schema Compositor object add Child compositor else if object instanceof Schema Element Reference I Schema Compositor comp Schema Element Reference object get Compositor Schema Compositor comp add Child compositor  SchemaCompositor SchemaCompositor SchemaComplexType SchemaElement SchemaElement getType SchemaComplexType SchemaComplexType getType setCompositor SchemaComplexType getSchema setCompositor SchemaElement setType SchemaCompositor SchemaCompositor addChild SchemaElementReference ISchemaCompositor SchemaElementReference getCompositor SchemaCompositor addChild

public New Element Action set Text PDE Plugin get Resource String KEY LABEL set Image Descriptor PDE Plugin Images DESC GEL SC OBJ set Tool Tip Text PDE Plugin get Resource String KEY TOOLTIP  NewElementAction setText PDEPlugin getResourceString KEY_LABEL setImageDescriptor PDEPluginImages DESC_GEL_SC_OBJ setToolTipText PDEPlugin getResourceString KEY_TOOLTIP
private String get Initial Name Hashtable counters PDE Plugin get Default get Default Name Counters Integer counter Integer counters get NAME COUNTER KEY if counter null counter new Integer 1 else counter new Integer counter int Value 1 counters put NAME COUNTER KEY counter return PDE Plugin get Formatted Message KEY INITIAL NAME counter int Value NON NLS 1  getInitialName PDEPlugin getDefault getDefaultNameCounters NAME_COUNTER_KEY intValue NAME_COUNTER_KEY PDEPlugin getFormattedMessage KEY_INITIAL_NAME intValue
counter int Value NON NLS 1 public org eclipse pde internal core schema Schema get Schema return schema  intValue getSchema
public void run String name get Initial Name Schema Element element new Schema Element schema name element set Type new Schema Simple Type schema string NON NLS 1 schema add Element element schema update References For element Schema REFRESH ADD  getInitialName SchemaElement SchemaElement setType SchemaSimpleType addElement updateReferencesFor REFRESH_ADD
schema update References For element Schema REFRESH ADD public void set Schema Schema new Schema schema new Schema  updateReferencesFor REFRESH_ADD setSchema newSchema newSchema

public New Reference Action I Schema Element source Object object I Schema Element referenced Element this object object this referenced Element referenced Element set Text referenced Element get Name Image Descriptor desc PDE Plugin Images DESC ELREF SC OBJ set Image Descriptor desc set Enabled source get Schema is Editable  NewReferenceAction ISchemaElement ISchemaElement referencedElement referencedElement referencedElement setText referencedElement getName ImageDescriptor PDEPluginImages DESC_ELREF_SC_OBJ setImageDescriptor setEnabled getSchema isEditable
public void run if object null object instanceof Schema Compositor Schema Compositor parent Schema Compositor object Schema Element Reference reference new Schema Element Reference parent referenced Element get Name reference set Referenced Object referenced Element parent add Child reference  SchemaCompositor SchemaCompositor SchemaCompositor SchemaElementReference SchemaElementReference referencedElement getName setReferencedObject referencedElement addChild

private Control control public Control create Control Composite parent control new Composite parent SWT NULL return control  createControl
return control public Class get Compatible Restriction Class return null  getCompatibleRestrictionClass
return null public org eclipse swt widgets Control get Control return control  getControl
return control public I Schema Restriction get Restriction return new Choice Restriction I Schema null  ISchemaRestriction getRestriction ChoiceRestriction ISchema
return new Choice Restriction I Schema null public void initialize I Schema Restriction restriction  ChoiceRestriction ISchema ISchemaRestriction

public class Reference Property Source extends Grammar Property Source public Reference Property Source Schema Element Reference obj super obj  ReferencePropertySource GrammarPropertySource ReferencePropertySource SchemaElementReference
protected String is Min Occurs Valid int ivalue String status super is Min Occurs Valid ivalue if status null is In All if ivalue 0 ivalue 1 return PDE Plugin get Resource String Reference Property Source min Occurs value NON NLS 1 return status  isMinOccursValid isMinOccursValid isInAll PDEPlugin getResourceString ReferencePropertySource minOccurs
protected String is Max Occurs Valid int ivalue String status super is Max Occurs Valid ivalue if status null is In All if ivalue 1 return PDE Plugin get Resource String Reference Property Source max Occurs value NON NLS 1 return status  isMaxOccursValid isMaxOccursValid isInAll PDEPlugin getResourceString ReferencePropertySource maxOccurs
private boolean is In All I Schema Compositor compositor get Reference get Compositor return compositor null compositor get Kind I Schema Compositor ALL  isInAll ISchemaCompositor getReference getCompositor getKind ISchemaCompositor
protected Schema Element Reference get Reference return Schema Element Reference get Source Object  SchemaElementReference getReference SchemaElementReference getSourceObject

public Object get Adapter Object adaptable Object Class adapter Type if adapter Type equals I Property Source class return get Properties adaptable Object return null  getAdapter adaptableObject adapterType adapterType IPropertySource getProperties adaptableObject
return null public java lang Class get Adapter List return new Class I Property Source class  getAdapterList IPropertySource
protected Attribute Property Source get Attribute Properties I Schema Attribute att if attribute Property Source null attribute Property Source new Attribute Property Source att else attribute Property Source set Source Object att return attribute Property Source  AttributePropertySource getAttributeProperties ISchemaAttribute attributePropertySource attributePropertySource AttributePropertySource attributePropertySource setSourceObject attributePropertySource
protected Element Property Source get Element Properties I Schema Element element if element Property Source null element Property Source new Element Property Source element else element Property Source set Source Object element return element Property Source  ElementPropertySource getElementProperties ISchemaElement elementPropertySource elementPropertySource ElementPropertySource elementPropertySource setSourceObject elementPropertySource
private I Property Source get Properties Object object if object instanceof I Schema Element object instanceof I Schema Object Reference return get Element Properties I Schema Element object if object instanceof I Schema Attribute return get Attribute Properties I Schema Attribute object if object instanceof I Schema Repeatable return get Repeatable Properties I Schema Repeatable object return null  IPropertySource getProperties ISchemaElement ISchemaObjectReference getElementProperties ISchemaElement ISchemaAttribute getAttributeProperties ISchemaAttribute ISchemaRepeatable getRepeatableProperties ISchemaRepeatable
protected Grammar Property Source get Repeatable Properties I Schema Repeatable obj if obj instanceof I Schema Compositor return new Compositor Property Source I Schema Compositor obj if obj instanceof Schema Element Reference return new Reference Property Source Schema Element Reference obj return null  GrammarPropertySource getRepeatableProperties ISchemaRepeatable ISchemaCompositor CompositorPropertySource ISchemaCompositor SchemaElementReference ReferencePropertySource SchemaElementReference

public class Schema Content Provider implements I Tree Content Provider public Schema Content Provider super  SchemaContentProvider ITreeContentProvider SchemaContentProvider
super public void dispose 
public void dispose public Object get Children Object element return new Object 0  getChildren
return new Object 0 public Object get Elements Object element return new Object 0  getElements
return new Object 0 public Object get Parent Object element return null  getParent
return null public boolean has Children Object element return false  hasChildren
return false public void input Changed org eclipse jface viewers Viewer viewer java lang Object old Input java lang Object new Input  inputChanged oldInput newInput
public void input Changed org eclipse jface viewers Viewer viewer java lang Object old Input java lang Object new Input public boolean is Deleted java lang Object element return false  inputChanged oldInput newInput isDeleted

Schema Editor pending doc Message NON NLS 1 public Schema Doc Page PDE Form Editor editor super editor PAGE ID PDE Plugin get Resource String PAGE TITLE  SchemaEditor docMessage SchemaDocPage PDEFormEditor PAGE_ID PDEPlugin getResourceString PAGE_TITLE
see org eclipse pde internal ui editor PDE Form Page becomes Invisible I Form Page public void set Active boolean active if active get Managed Form commit false super set Active active  PDEFormPage becomesInvisible IFormPage setActive getManagedForm setActive
protected void create Form Content I Managed Form managed Form super create Form Content managed Form Scrolled Form form managed Form get Form Grid Layout layout new Grid Layout layout margin Width 10 layout horizontal Spacing 15 layout set Margin Width form get Body set Layout layout Grid Data gd doc Section new Doc Section this form get Body color Manager gd new Grid Data Grid Data FILL BOTH doc Section get Section set Layout Data gd managed Form add Part doc Section Workbench Help set Help form get Body I Help Context Ids SCHEMA EDITOR DOC form set Text PDE Plugin get Resource String FORM TITLE  createFormContent IManagedForm managedForm createFormContent managedForm ScrolledForm managedForm getForm GridLayout GridLayout marginWidth horizontalSpacing setMarginWidth getBody setLayout GridData docSection DocSection getBody colorManager GridData GridData FILL_BOTH docSection getSection setLayoutData managedForm addPart docSection WorkbenchHelp setHelp getBody IHelpContextIds SCHEMA_EDITOR_DOC setText PDEPlugin getResourceString FORM_TITLE
public void dispose color Manager dispose super dispose  colorManager
public void update Editor Input Object obj doc Section update Editor Input obj  updateEditorInput docSection updateEditorInput
public boolean select Reveal Object object doc Section check For Pending Changes return super select Reveal object  selectReveal docSection checkForPendingChanges selectReveal

protected static char fg Brackets public Schema Double Click Strategy super  fgBrackets SchemaDoubleClickStrategy
public void double Clicked I Text Viewer part f Pos part get Selected Range x if f Pos 0 return f Text part if select Comment select Word  doubleClicked ITextViewer fPos getSelectedRange fPos fText selectComment selectWord
protected boolean match Comment I Document doc f Text get Document try int pos f Pos char c while pos 0 c doc get Char pos if Character is Whitespace c c break pos if c return false f Start Pos pos pos f Pos int length doc get Length c while pos length c doc get Char pos if Character is Whitespace c c break pos if c return false f End Pos pos return true catch Bad Location Exception x return false  matchComment IDocument fText getDocument fPos getChar isWhitespace fStartPos fPos getLength getChar isWhitespace fEndPos BadLocationException
protected boolean match Word I Document doc f Text get Document try int pos f Pos char c while pos 0 c doc get Char pos if Character is Java Identifier Part c break pos f Start Pos pos pos f Pos int length doc get Length while pos length c doc get Char pos if Character is Java Identifier Part c break pos f End Pos pos return true catch Bad Location Exception x return false  matchWord IDocument fText getDocument fPos getChar isJavaIdentifierPart fStartPos fPos getLength getChar isJavaIdentifierPart fEndPos BadLocationException
protected boolean select Comment if match Comment f Text set Selected Range f Start Pos 1 f End Pos return true return false  selectComment matchComment fText setSelectedRange fStartPos fEndPos
return false protected void select Word if match Word f Text set Selected Range f Start Pos 1 f End Pos  selectWord matchWord fText setSelectedRange fStartPos fEndPos

protected void create Resource Contexts Input Context Manager manager I File Editor Input input I File file input get File I File Editor Input in new File Editor Input file manager put Context in new Schema Input Context this in true manager monitor File file  createResourceContexts InputContextManager IFileEditorInput IFile getFile IFileEditorInput FileEditorInput putContext SchemaInputContext monitorFile
protected Input Context Manager create Input Context Manager Schema Input Context Manager context Manager new Schema Input Context Manager this context Manager set Undo Manager new Schema Undo Manager this return context Manager  InputContextManager createInputContextManager SchemaInputContextManager contextManager SchemaInputContextManager contextManager setUndoManager SchemaUndoManager contextManager
public boolean can Copy I Selection selection return true  canCopy ISelection
protected boolean has Known Types try Transfer Data types get Clipboard get Available Types Transfer transfers new Transfer Text Transfer get Instance RTF Transfer get Instance for int i 0 i types length i for int j 0 j transfers length j if transfers j is Supported Type types i return true catch SWT Error e return false  hasKnownTypes TransferData getClipboard getAvailableTypes TextTransfer getInstance RTFTransfer getInstance isSupportedType SWTError
public void monitored File Added I File file String name file get Name if name equals Ignore Case site xml I Editor Input in new File Editor Input file input Context Manager put Context in new Site Input Context this in false  monitoredFileAdded IFile getName equalsIgnoreCase IEditorInput FileEditorInput inputContextManager putContext SiteInputContext
public boolean monitored File Removed I File file TODO may need to check with the user if there are unsaved changes in the model for the file that just got removed under us return true  monitoredFileRemoved IFile
public void context Added Input Context context add Source Page context get Id  contextAdded InputContext addSourcePage getId
public void context Removed Input Context context if context is Primary close true return I Form Page page find Page context get Id if page null remove Page context get Id  contextRemoved InputContext isPrimary IFormPage findPage getId removePage getId
protected void create System File Contexts Input Context Manager manager System File Editor Input input manager put Context input new Schema Input Context this input true  createSystemFileContexts InputContextManager SystemFileEditorInput putContext SchemaInputContext
protected void create Storage Contexts Input Context Manager manager I Storage Editor Input input manager put Context input new Schema Input Context this input true  createStorageContexts InputContextManager IStorageEditorInput putContext SchemaInputContext
protected void context Menu About To Show I Menu Manager manager super context Menu About To Show manager  contextMenuAboutToShow IMenuManager contextMenuAboutToShow
void preview Reference Document I Schema schema I Schema get Aggregate Model if preview Action null preview Action new Show Description Action schema else preview Action set Schema schema preview Action run  previewReferenceDocument ISchema ISchema getAggregateModel previewAction previewAction ShowDescriptionAction previewAction setSchema previewAction
protected void add Pages try add Page new Schema Form Page this add Page new Schema Doc Page this catch Part Init Exception e PDE Plugin log Exception e add Source Page Schema Input Context CONTEXT ID  addPages addPage SchemaFormPage addPage SchemaDocPage PartInitException PDEPlugin logException addSourcePage SchemaInputContext CONTEXT_ID
protected String compute Initial Page Id String first Page Id super compute Initial Page Id if first Page Id null Input Context primary input Context Manager get Primary Context if primary get Id equals Schema Input Context CONTEXT ID first Page Id Schema Form Page PAGE ID if first Page Id null first Page Id Schema Form Page PAGE ID return first Page Id  computeInitialPageId firstPageId computeInitialPageId firstPageId InputContext inputContextManager getPrimaryContext getId SchemaInputContext CONTEXT_ID firstPageId SchemaFormPage PAGE_ID firstPageId firstPageId SchemaFormPage PAGE_ID firstPageId
see org eclipse pde internal ui neweditor Multi Source Editor createXML Source Page org eclipse pde internal ui neweditor PDE Form Editor java lang String java lang String protected PDE Source Page create Source Page PDE Form Editor editor String title String name String context Id return new Schema Source Page editor title name  MultiSourceEditor createXMLSourcePage PDEFormEditor PDESourcePage createSourcePage PDEFormEditor contextId SchemaSourcePage
protected I Content Outline Page create Content Outline return new Schema Form Outline Page this  IContentOutlinePage createContentOutline SchemaFormOutlinePage

class Preview Action extends Action public Preview Action  PreviewAction PreviewAction
Busy Indicator show While SWT Util get Standard Display new Runnable public void run schema Editor preview Reference Document  BusyIndicator showWhile SWTUtil getStandardDisplay schemaEditor previewReferenceDocument
public void run if get Editor null final Schema Editor schema Editor Schema Editor get Editor Busy Indicator show While SWT Util get Standard Display new Runnable public void run schema Editor preview Reference Document  getEditor SchemaEditor schemaEditor SchemaEditor getEditor BusyIndicator showWhile SWTUtil getStandardDisplay schemaEditor previewReferenceDocument
public Schema Editor Contributor super Schema NON NLS 1  SchemaEditorContributor
protected boolean has Known Types Clipboard clipboard return true  hasKnownTypes
public void context Menu About To Show I Menu Manager mm boolean add Clipboard super context Menu About To Show mm add Clipboard mm add new Separator mm add preview Action  contextMenuAboutToShow IMenuManager addClipboard contextMenuAboutToShow addClipboard previewAction
public Action get Preview Action return preview Action  getPreviewAction previewAction
protected void make Actions super make Actions preview Action new Preview Action preview Action set Text PDE Plugin get Resource String Schema Editor Contributor preview Action NON NLS 1  makeActions makeActions previewAction PreviewAction previewAction setText PDEPlugin getResourceString SchemaEditorContributor previewAction

private Object topics public Object get Children Object parent I Schema schema I Schema editor get Aggregate Model if schema is Valid if parent instanceof Schema Form Page return get Markup if parent instanceof I Schema Element return get Attributes I Schema Element parent if parent instanceof Schema Doc Page return get Topics return super get Children parent  getChildren ISchema ISchema getAggregateModel isValid SchemaFormPage getMarkup ISchemaElement getAttributes ISchemaElement SchemaDocPage getTopics getChildren
class Outline Label Provider extends Basic Label Provider public String get Text Object obj String label get Object Label obj if label null return label return super get Text obj  OutlineLabelProvider BasicLabelProvider getText getObjectLabel getText
public Image get Image Object obj Image image PDE Plugin get Default get Label Provider get Image obj if image null return image return super get Image obj  getImage PDEPlugin getDefault getLabelProvider getImage getImage
public Schema Form Outline Page PDE Form Editor editor super editor  SchemaFormOutlinePage PDEFormEditor
protected Object create Topics I Schema schema I Schema editor get Aggregate Model I Document Section sections schema get Document Sections Object result new Object sections length 1 result 0 schema for int i 1 i sections length i result i sections i 1 return result  createTopics ISchema ISchema getAggregateModel IDocumentSection getDocumentSections
Object get Attributes I Schema Element element I Schema Type type element get Type if type instanceof I Schema Complex Type return I Schema Complex Type type get Attributes return new Object 0  getAttributes ISchemaElement ISchemaType getType ISchemaComplexType ISchemaComplexType getAttributes
return new Object 0 Object get Markup I Schema schema I Schema editor get Aggregate Model return schema get Elements  getMarkup ISchema ISchema getAggregateModel getElements
String get Object Label Object obj if obj instanceof I Schema return PDE Plugin get Resource String Doc Section KEY TOPIC OVERVIEW if obj instanceof I Document Section I Document Section section I Document Section obj String section Id section get Section Id if section Id equals I Document Section EXAMPLES return PDE Plugin get Resource String Doc Section KEY TOPIC EXAMPLES if section Id equals I Document Section SINCE return PDE Plugin get Resource String Doc Section KEY TOPIC SINCE if section Id equals I Document Section IMPLEMENTATION return PDE Plugin get Resource String Doc Section KEY TOPIC IMPLEMENTATION if section Id equals I Document Section API INFO return PDE Plugin get Resource String Doc Section KEY TOPIC API if section Id equals I Document Section COPYRIGHT return PDE Plugin get Resource String Doc Section KEY TOPIC COPYRIGHT return null  getObjectLabel ISchema PDEPlugin getResourceString DocSection KEY_TOPIC_OVERVIEW IDocumentSection IDocumentSection IDocumentSection sectionId getSectionId sectionId IDocumentSection PDEPlugin getResourceString DocSection KEY_TOPIC_EXAMPLES sectionId IDocumentSection PDEPlugin getResourceString DocSection KEY_TOPIC_SINCE sectionId IDocumentSection PDEPlugin getResourceString DocSection KEY_TOPIC_IMPLEMENTATION sectionId IDocumentSection API_INFO PDEPlugin getResourceString DocSection KEY_TOPIC_API sectionId IDocumentSection PDEPlugin getResourceString DocSection KEY_TOPIC_COPYRIGHT
Object get Topics if topics null topics create Topics return topics  getTopics createTopics
protected String get Parent Page Id Object item if item instanceof I Schema Element item instanceof I Schema Attribute return Schema Form Page PAGE ID if item instanceof I Document Section item instanceof I Schema return Schema Doc Page PAGE ID return super get Parent Page Id item  getParentPageId ISchemaElement ISchemaAttribute SchemaFormPage PAGE_ID IDocumentSection ISchema SchemaDocPage PAGE_ID getParentPageId
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event WORLD CHANGED topics null tree Viewer refresh return Object object event get Changed Objects 0 if event get Change Type I Model Changed Event CHANGE tree Viewer update object null else find the parent Object parent null if object instanceof I Schema Object parent I Schema Object object get Parent if parent null if parent instanceof I Schema parent form Page get Editor get Page Schema Editor DEFINITION PAGE tree Viewer refresh parent tree Viewer expand To Level parent 2 else tree Viewer refresh tree Viewer expand All  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED treeViewer getChangedObjects getChangeType IModelChangedEvent treeViewer ISchemaObject ISchemaObject getParent ISchema formPage getEditor getPage SchemaEditor DEFINITION_PAGE treeViewer treeViewer expandToLevel treeViewer treeViewer expandAll

private I Color Manager color Manager new Color Manager public Schema Form Page PDE Form Editor editor super editor PAGE ID PDE Plugin get Resource String PAGE TITLE  IColorManager colorManager ColorManager SchemaFormPage PDEFormEditor PAGE_ID PDEPlugin getResourceString PAGE_TITLE
protected void create Form Content I Managed Form managed Form super create Form Content managed Form Scrolled Form form managed Form get Form Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width 10 layout horizontal Spacing 15 form get Body set Layout layout Grid Data gd schema Spec Section new Schema Spec Section this form get Body gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING schema Spec Section get Section set Layout Data gd grammar Section new Grammar Section this form get Body gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN FILL gd vertical Span 2 grammar Section get Section set Layout Data gd element Section new Element Section this form get Body gd new Grid Data Grid Data FILL BOTH element Section get Section set Layout Data gd description Section new Description Section this form get Body color Manager gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING gd horizontal Span 2 gd height Hint 150 description Section get Section set Layout Data gd managed Form add Part schema Spec Section managed Form add Part element Section managed Form add Part grammar Section managed Form add Part description Section Workbench Help set Help form get Body I Help Context Ids SCHEMA EDITOR MAIN initialize  createFormContent IManagedForm managedForm createFormContent managedForm ScrolledForm managedForm getForm GridLayout GridLayout numColumns marginWidth horizontalSpacing getBody setLayout GridData schemaSpecSection SchemaSpecSection getBody GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING schemaSpecSection getSection setLayoutData grammarSection GrammarSection getBody GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_FILL verticalSpan grammarSection getSection setLayoutData elementSection ElementSection getBody GridData GridData FILL_BOTH elementSection getSection setLayoutData descriptionSection DescriptionSection getBody colorManager GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING horizontalSpan heightHint descriptionSection getSection setLayoutData managedForm addPart schemaSpecSection managedForm addPart elementSection managedForm addPart grammarSection managedForm addPart descriptionSection WorkbenchHelp setHelp getBody IHelpContextIds SCHEMA_EDITOR_MAIN
public void initialize I Schema schema I Schema get Model get Managed Form get Form set Text schema get Name schema add Model Changed Listener this  ISchema ISchema getModel getManagedForm getForm setText getName addModelChangedListener
public void dispose I Schema schema I Schema get Model color Manager dispose if schema null schema remove Model Changed Listener this super dispose  ISchema ISchema getModel colorManager removeModelChangedListener
public I Property Sheet Page get Property Sheet Page if property Sheet Page null property Sheet Page new Schema Property Sheet return property Sheet Page  IPropertySheetPage getPropertySheetPage propertySheetPage propertySheetPage SchemaPropertySheet propertySheetPage
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event WORLD CHANGED I Schema schema I Schema get Model get Managed Form get Form set Text schema get Name  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED ISchema ISchema getModel getManagedForm getForm setText getName

public static final String CONTEXT ID schema context NON NLS 1 param editor param input param primary public Schema Input Context PDE Form Editor editor I Editor Input input boolean primary super editor input primary create  CONTEXT_ID SchemaInputContext PDEFormEditor IEditorInput
see org eclipse pde internal ui neweditor context Input Context get Id public String get Id return CONTEXT ID  InputContext getId getId CONTEXT_ID
protected I Base Model create Model I Editor Input input throws Core Exception if input instanceof System File Editor Input return create External Model System File Editor Input input if input instanceof I File Editor Input if input instanceof I Storage Editor Input return create Storage Model I Storage Editor Input input return null I File file I File Editor Input input get File File Schema Descriptor sd new File Schema Descriptor file I Schema schema sd get Schema if schema is Valid false return null if schema instanceof Editable Schema Editable Schema schema set Notification Enabled true return schema  IBaseModel createModel IEditorInput CoreException SystemFileEditorInput createExternalModel SystemFileEditorInput IFileEditorInput IStorageEditorInput createStorageModel IStorageEditorInput IFile IFileEditorInput getFile FileSchemaDescriptor FileSchemaDescriptor ISchema getSchema isValid EditableSchema EditableSchema setNotificationEnabled
private I Base Model create External Model System File Editor Input input File file File input get Adapter File class External Schema Descriptor sd new External Schema Descriptor file false NON NLS 1 I Schema schema sd get Schema if schema is Valid false return null if schema instanceof Editable Schema Editable Schema schema set Notification Enabled true return schema  IBaseModel createExternalModel SystemFileEditorInput getAdapter ExternalSchemaDescriptor ExternalSchemaDescriptor ISchema getSchema isValid EditableSchema EditableSchema setNotificationEnabled
private I Base Model create Storage Model I Storage Editor Input input try I Storage storage input get Storage Storage Schema Descriptor sd new Storage Schema Descriptor storage I Schema schema sd get Schema if schema is Valid false return null return schema catch Core Exception e PDE Plugin log Exception e return null  IBaseModel createStorageModel IStorageEditorInput IStorage getStorage StorageSchemaDescriptor StorageSchemaDescriptor ISchema getSchema isValid CoreException PDEPlugin logException
see org eclipse pde internal ui neweditor context Input Context add Text Edit Operation java util Array List org eclipse pde core I Model Changed Event protected void add Text Edit Operation Array List ops I Model Changed Event event  InputContext addTextEditOperation ArrayList IModelChangedEvent addTextEditOperation ArrayList IModelChangedEvent
protected void flush Model I Document doc if model is dirty flush its content into the document so that the source editor will pick up the changes if get Model instanceof I Editable return I Editable editable Model I Editable get Model if editable Model is Dirty false return try String Writer swriter new String Writer Print Writer writer new Print Writer swriter editable Model save writer writer flush swriter close doc set swriter to String catch IO Exception e PDE Plugin log Exception e  flushModel IDocument getModel IEditable IEditable editableModel IEditable getModel editableModel isDirty StringWriter StringWriter PrintWriter PrintWriter editableModel toString IOException PDEPlugin logException
protected boolean synchronize Model I Document doc Schema schema Schema get Model if schema null return false String text doc get try Input Stream stream new Byte Array Input Stream text get Bytes UTF8 NON NLS 1 schema reload stream if schema instanceof I Editable I Editable schema set Dirty false try stream close catch IO Exception e catch Unsupported Encoding Exception e PDE Plugin log Exception e return false return true  synchronizeModel IDocument getModel InputStream ByteArrayInputStream getBytes IEditable IEditable setDirty IOException UnsupportedEncodingException PDEPlugin logException
see org eclipse pde internal ui neweditor context XML Input Context reorder Insert Edits java util Array List protected void reorder Insert Edits Array List ops  XMLInputContext reorderInsertEdits ArrayList reorderInsertEdits ArrayList

public class Schema Input Context Manager extends Input Context Manager public Schema Input Context Manager PDE Form Editor editor super editor  SchemaInputContextManager InputContextManager SchemaInputContextManager PDEFormEditor
public I Base Model get Aggregate Model return find Schema  IBaseModel getAggregateModel findSchema
private I Base Model find Schema Input Context scontext find Context Schema Input Context CONTEXT ID if scontext null return scontext get Model else return null  IBaseModel findSchema InputContext findContext SchemaInputContext CONTEXT_ID getModel

private String property private String table public Combo Provider String property String table this property property this table table  ComboProvider
this table table public String get Text Object obj Integer index Integer get Property Value property return table index int Value  getText getPropertyValue intValue
public Schema Object Property Source Object object this source Object object  SchemaObjectPropertySource sourceObject
protected Property Descriptor create Combo Box Property Descriptor String id String name String choices if is Editable return new Combo Box Property Descriptor id name choices else return new Property Descriptor id name  PropertyDescriptor createComboBoxPropertyDescriptor isEditable ComboBoxPropertyDescriptor PropertyDescriptor
protected Property Descriptor create Text Property Descriptor String id String name if is Editable return new Modified Text Property Descriptor id name else return new Property Descriptor id name  PropertyDescriptor createTextPropertyDescriptor isEditable ModifiedTextPropertyDescriptor PropertyDescriptor
protected Object get Nonzero Value Object value if value null return value return NON NLS 1  getNonzeroValue
return NON NLS 1 public java lang Object get Source Object return source Object  getSourceObject sourceObject
public boolean is Editable I Schema Object schema Object I Schema Object get Source Object I Schema schema schema Object get Schema return schema null schema is Editable false  isEditable ISchemaObject schemaObject ISchemaObject getSourceObject ISchema schemaObject getSchema isEditable
return schema null schema is Editable false public void set Source Object java lang Object new Source Object source Object new Source Object  isEditable setSourceObject newSourceObject sourceObject newSourceObject
protected I Property Descriptor to Descriptor Array Vector result I Property Descriptor array new I Property Descriptor result size result copy Into array return array  IPropertyDescriptor toDescriptorArray IPropertyDescriptor IPropertyDescriptor copyInto

protected I Selection current Selection private I Workbench Part part public Schema Property Sheet make Schema Actions  ISelection currentSelection IWorkbenchPart SchemaPropertySheet makeSchemaActions
table Tree add Selection Listener new Selection Adapter public void widget Selected Selection Event e Table Tree Item items table Tree get Selection I Property Sheet Entry entry null if items length 0 entry I Property Sheet Entry items 0 get Data update Actions entry  tableTree addSelectionListener SelectionAdapter widgetSelected SelectionEvent TableTreeItem tableTree getSelection IPropertySheetEntry IPropertySheetEntry getData updateActions
public void create Control Composite parent super create Control parent final Table Tree table Tree Table Tree get Control table Tree add Selection Listener new Selection Adapter public void widget Selected Selection Event e Table Tree Item items table Tree get Selection I Property Sheet Entry entry null if items length 0 entry I Property Sheet Entry items 0 get Data update Actions entry  createControl createControl TableTree tableTree TableTree getControl tableTree addSelectionListener SelectionAdapter widgetSelected SelectionEvent TableTreeItem tableTree getSelection IPropertySheetEntry IPropertySheetEntry getData updateActions
public void disable Actions clone Action set Enabled false  disableActions cloneAction setEnabled
clone Action set Enabled false public void fill Local Tool Bar I Tool Bar Manager tool Bar Manager tool Bar Manager add new Separator tool Bar Manager add clone Action  cloneAction setEnabled fillLocalToolBar IToolBarManager toolBarManager toolBarManager toolBarManager cloneAction
public I Property Sheet Entry get Selected Entry Table Tree table Tree Table Tree get Control Table Tree Item items table Tree get Selection I Property Sheet Entry entry null if items length 0 entry I Property Sheet Entry items 0 get Data return entry  IPropertySheetEntry getSelectedEntry TableTree tableTree TableTree getControl TableTreeItem tableTree getSelection IPropertySheetEntry IPropertySheetEntry getData
protected void handle Clone Object input null if current Selection instanceof I Structured Selection input I Structured Selection current Selection get First Element I Property Source source null if input instanceof I Adaptable source I Property Source I Adaptable input get Adapter I Property Source class if source instanceof I Cloneable Property Source Object new Input I Cloneable Property Source source do Clone if new Input null selection Changed part new Structured Selection new Input  handleClone currentSelection IStructuredSelection IStructuredSelection currentSelection getFirstElement IPropertySource IAdaptable IPropertySource IAdaptable getAdapter IPropertySource ICloneablePropertySource newInput ICloneablePropertySource doClone newInput selectionChanged StructuredSelection newInput
public void make Contributions I Menu Manager menu Manager I Tool Bar Manager tool Bar Manager I Status Line Manager status Line Manager super make Contributions menu Manager tool Bar Manager status Line Manager fill Local Tool Bar tool Bar Manager  makeContributions IMenuManager menuManager IToolBarManager toolBarManager IStatusLineManager statusLineManager makeContributions menuManager toolBarManager statusLineManager fillLocalToolBar toolBarManager
protected void make Schema Actions clone Action new Action PDE Plugin get Resource String CLONE LABEL public void run handle Clone  makeSchemaActions cloneAction PDEPlugin getResourceString CLONE_LABEL handleClone
protected void make Schema Actions clone Action new Action PDE Plugin get Resource String CLONE LABEL public void run handle Clone clone Action set Image Descriptor PDE Plugin Images DESC CLONE ATT clone Action set Disabled Image Descriptor PDE Plugin Images DESC CLONE ATT DISABLED clone Action set Tool Tip Text PDE Plugin get Resource String CLONE TOOLTIP clone Action set Enabled false  makeSchemaActions cloneAction PDEPlugin getResourceString CLONE_LABEL handleClone cloneAction setImageDescriptor PDEPluginImages DESC_CLONE_ATT cloneAction setDisabledImageDescriptor PDEPluginImages DESC_CLONE_ATT_DISABLED cloneAction setToolTipText PDEPlugin getResourceString CLONE_TOOLTIP cloneAction setEnabled
public void selection Changed I Workbench Part part I Selection sel super selection Changed part sel this part part current Selection sel update Actions  selectionChanged IWorkbenchPart ISelection selectionChanged currentSelection updateActions
protected void update Actions Object input null if current Selection instanceof I Structured Selection input I Structured Selection current Selection get First Element I Property Source source null if input instanceof I Adaptable source I Property Source I Adaptable input get Adapter I Property Source class update Actions source  updateActions currentSelection IStructuredSelection IStructuredSelection currentSelection getFirstElement IPropertySource IAdaptable IPropertySource IAdaptable getAdapter IPropertySource updateActions
protected void update Actions I Property Source source if source instanceof I Cloneable Property Source clone Action set Enabled I Cloneable Property Source source is Cloneable else clone Action set Enabled false  updateActions IPropertySource ICloneablePropertySource cloneAction setEnabled ICloneablePropertySource isCloneable cloneAction setEnabled

public class Schema Source Page extends XML Source Page public Schema Source Page PDE Form Editor editor String id String title super editor id title  SchemaSourcePage XMLSourcePage SchemaSourcePage PDEFormEditor
public I Content Outline Page create Content Outline Page return null return new Schema Source Outline Page get Editor Input get Document Provider this  IContentOutlinePage createContentOutlinePage SchemaSourceOutlinePage getEditorInput getDocumentProvider
protected void editor Context Menu About To Show I Menu Manager menu super editor Context Menu About To Show menu menu add new Separator Schema Editor Contributor contributor Schema Editor Contributor PDE Form Editor get Editor get Contributor menu add contributor get Preview Action  editorContextMenuAboutToShow IMenuManager editorContextMenuAboutToShow SchemaEditorContributor SchemaEditorContributor PDEFormEditor getEditor getContributor getPreviewAction
menu add contributor get Preview Action protected I Label Provider create Outline Label Provider return null  getPreviewAction ILabelProvider createOutlineLabelProvider
return null protected I Tree Content Provider create Outline Content Provider return null  ITreeContentProvider createOutlineContentProvider
return null protected void outline Selection Changed Selection Changed Event e  outlineSelectionChanged SelectionChangedEvent
protected I Content Outline Page create Outline Page TODO remove this method when the above three stubs are implemented return null  IContentOutlinePage createOutlinePage

private Form Entry name Text public Schema Spec Section Schema Form Page page Composite parent super page parent Section DESCRIPTION Section TWISTIE get Section set Text PDE Plugin get Resource String SECTION TITLE get Section set Description PDE Plugin get Resource String SECTION DESC create Client get Section page get Managed Form get Toolkit  FormEntry nameText SchemaSpecSection SchemaFormPage getSection setText PDEPlugin getResourceString SECTION_TITLE getSection setDescription PDEPlugin getResourceString SECTION_DESC createClient getSection getManagedForm getToolkit
public void commit boolean on Save plugin Text commit point Text commit name Text commit super commit on Save  onSave pluginText pointText nameText onSave
public void cancel Edit plugin Text cancel Edit point Text cancel Edit name Text cancel Edit super cancel Edit  cancelEdit pluginText cancelEdit pointText cancelEdit nameText cancelEdit cancelEdit
get Resource String SECTION PLUGIN null false plugin Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text schema set Plugin Id text get Value  getResourceString SECTION_PLUGIN pluginText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setPluginId getValue
get Resource String SECTION POINT null false point Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text schema set Point Id text get Value  getResourceString SECTION_POINT pointText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setPointId getValue
get Resource String SECTION NAME null false name Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text schema set Name text get Value get Page get Managed Form get Form set Text schema get Name  getResourceString SECTION_NAME nameText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setName getValue getPage getManagedForm getForm setText getName
public void create Client Section section Form Toolkit toolkit Composite container toolkit create Composite section Grid Layout layout new Grid Layout layout num Columns 2 layout vertical Spacing 9 layout horizontal Spacing 6 container set Layout layout final Schema schema Schema get Page get Model plugin Text new Form Entry container toolkit PDE Plugin get Resource String SECTION PLUGIN null false plugin Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text schema set Plugin Id text get Value point Text new Form Entry container toolkit PDE Plugin get Resource String SECTION POINT null false point Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text schema set Point Id text get Value name Text new Form Entry container toolkit PDE Plugin get Resource String SECTION NAME null false name Text set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text schema set Name text get Value get Page get Managed Form get Form set Text schema get Name Grid Data gd Grid Data point Text get Text get Layout Data gd width Hint 150 toolkit paint Borders For container section set Client container initialize  createClient FormToolkit createComposite GridLayout GridLayout numColumns verticalSpacing horizontalSpacing setLayout getPage getModel pluginText FormEntry PDEPlugin getResourceString SECTION_PLUGIN pluginText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setPluginId getValue pointText FormEntry PDEPlugin getResourceString SECTION_POINT pointText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setPointId getValue nameText FormEntry PDEPlugin getResourceString SECTION_NAME nameText setFormEntryListener FormEntryAdapter textValueChanged FormEntry setName getValue getPage getManagedForm getForm setText getName GridData GridData pointText getText getLayoutData widthHint paintBordersFor setClient
public void dispose I Schema schema I Schema get Page get Model if schema null schema remove Model Changed Listener this super dispose  ISchema ISchema getPage getModel removeModelChangedListener
public void initialize I Schema schema I Schema get Page get Model refresh if schema instanceof I Editable plugin Text get Text set Enabled false point Text get Text set Enabled false name Text get Text set Enabled false schema add Model Changed Listener this  ISchema ISchema getPage getModel IEditable pluginText getText setEnabled pointText getText setEnabled nameText getText setEnabled addModelChangedListener
public void set Focus if point Text null point Text get Text set Focus  setFocus pointText pointText getText setFocus
private void set If Defined Form Entry form Text String value if value null form Text set Value value true  setIfDefined FormEntry formText formText setValue
public void refresh I Schema schema I Schema get Page get Model set If Defined plugin Text schema get Plugin Id set If Defined point Text schema get Point Id set If Defined name Text schema get Name get Page get Managed Form get Form set Text schema get Name super refresh  ISchema ISchema getPage getModel setIfDefined pluginText getPluginId setIfDefined pointText getPointId setIfDefined nameText getName getPage getManagedForm getForm setText getName

private static final String KEY TYPE RESTRICTION TITLE Restriction Dialog wtitle NON NLS 1 protected Type Restriction Cell Editor Composite parent super parent  KEY_TYPE_RESTRICTION_TITLE RestrictionDialog TypeRestrictionCellEditor
protected Control create Contents Composite cell label new Label cell SWT LEFT label set Font cell get Font label set Background cell get Background return label  createContents setFont getFont setBackground getBackground
protected Object open Dialog Box Control cell Editor Window Object value get Value Type Restriction Dialog dialog new Type Restriction Dialog cell Editor Window get Shell I Schema Restriction value dialog create SWT Util set Dialog Size dialog 300 350 dialog get Shell set Text PDE Plugin get Resource String KEY TYPE RESTRICTION TITLE int result dialog open if result Type Restriction Dialog OK value dialog get Value return value  openDialogBox cellEditorWindow getValue TypeRestrictionDialog TypeRestrictionDialog cellEditorWindow getShell ISchemaRestriction SWTUtil setDialogSize getShell setText PDEPlugin getResourceString KEY_TYPE_RESTRICTION_TITLE TypeRestrictionDialog getValue
protected void update Contents Object value if value null label set Text value to String else label set Text NON NLS 1  updateContents setText toString setText

private boolean read Only false public Type Restriction Descriptor String name String display Name boolean read Only super name display Name this read Only read Only  readOnly TypeRestrictionDescriptor displayName readOnly displayName readOnly readOnly
this read Only read Only public Cell Editor create Property Editor Composite parent if read Only return null return new Type Restriction Cell Editor parent  readOnly readOnly CellEditor createPropertyEditor readOnly TypeRestrictionCellEditor
public boolean is Compatible With I Property Descriptor another Property if get Always Incompatible return false if another Property instanceof Type Restriction Descriptor Type Restriction Descriptor spd Type Restriction Descriptor another Property Compare Name if spd get Id equals get Id return false Compare Display Name if spd get Display Name equals get Display Name return false Compare Category if get Category null if spd get Category null return false else if get Category equals spd get Category return false Nothing was different return true return false  isCompatibleWith IPropertyDescriptor anotherProperty getAlwaysIncompatible anotherProperty TypeRestrictionDescriptor TypeRestrictionDescriptor TypeRestrictionDescriptor anotherProperty getId getId DisplayName getDisplayName getDisplayName getCategory getCategory getCategory getCategory

public Type Restriction Dialog Shell shell I Schema Restriction restriction super shell if restriction null restriction get Children length 0 this restriction restriction  TypeRestrictionDialog ISchemaRestriction getChildren
protected void create Buttons For Button Bar Composite parent create OK and Cancel buttons by default create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
initialize Type Combo type Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Type Selection  initializeTypeCombo typeCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleTypeSelection
protected Control create Dialog Area Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH container set Layout Data gd Label label new Label container SWT NULL label set Text PDE Plugin get Resource String KEY RESTRICTION TYPE gd new Grid Data label set Layout Data gd type Combo new Combo container SWT DROP DOWN SWT READ ONLY initialize Type Combo type Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Type Selection gd new Grid Data Grid Data FILL HORIZONTAL type Combo set Layout Data gd gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 label new Label container SWT SEPARATOR SWT HORIZONTAL SWT SHADOW OUT label set Layout Data gd gd new Grid Data Grid Data FILL BOTH gd horizontal Span 2 page Book new Page Book container SWT NULL page Book set Layout Data gd initialize Pages Workbench Help set Help container I Help Context Ids SCHEMA TYPE RESTRICTION return container  createDialogArea GridLayout GridLayout numColumns setLayout GridData GridData GridData FILL_BOTH setLayoutData setText PDEPlugin getResourceString KEY_RESTRICTION_TYPE GridData setLayoutData typeCombo DROP_DOWN READ_ONLY initializeTypeCombo typeCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleTypeSelection GridData GridData FILL_HORIZONTAL typeCombo setLayoutData GridData GridData FILL_HORIZONTAL horizontalSpan SHADOW_OUT setLayoutData GridData GridData FILL_BOTH horizontalSpan pageBook PageBook pageBook setLayoutData initializePages WorkbenchHelp setHelp IHelpContextIds SCHEMA_TYPE_RESTRICTION
return container public Object get Value return restriction  getValue
private void handle Type Selection String selection type Combo get Item type Combo get Selection Index I Restriction Page page I Restriction Page pages get selection page Book show Page page get Control  handleTypeSelection typeCombo getItem typeCombo getSelectionIndex IRestrictionPage IRestrictionPage pageBook showPage getControl
protected void initialize Pages I Restriction Page page I Restriction Page page To Show null String type To Show null page new No Restriction Page page create Control page Book pages put T NONE page if restriction null page To Show page type To Show T NONE page new Enumeration Restriction Page page create Control page Book pages put T ENUMERATION page if restriction null page get Compatible Restriction Class is Instance restriction page To Show page type To Show T ENUMERATION page To Show initialize restriction type Combo set Text type To Show page Book show Page page To Show get Control  initializePages IRestrictionPage IRestrictionPage pageToShow typeToShow NoRestrictionPage createControl pageBook T_NONE pageToShow typeToShow T_NONE EnumerationRestrictionPage createControl pageBook T_ENUMERATION getCompatibleRestrictionClass isInstance pageToShow typeToShow T_ENUMERATION pageToShow typeCombo setText typeToShow pageBook showPage pageToShow getControl
page Book show Page page To Show get Control protected void initialize Type Combo type Combo set Items type Choices  pageBook showPage pageToShow getControl initializeTypeCombo typeCombo setItems typeChoices
protected void ok Pressed String selected Restriction type Choices type Combo get Selection Index I Restriction Page page I Restriction Page pages get selected Restriction restriction page get Restriction super ok Pressed  okPressed selectedRestriction typeChoices typeCombo getSelectionIndex IRestrictionPage IRestrictionPage selectedRestriction getRestriction okPressed

private Archive Section f Archive Section public Archive Page PDE Form Editor editor super editor PAGE ID PDE Plugin get Resource String Archive Page name NON NLS 1  ArchiveSection fArchiveSection ArchivePage PDEFormEditor PAGE_ID PDEPlugin getResourceString ArchivePage
protected void create Form Content I Managed Form mform Scrolled Form form mform get Form Grid Layout layout new Grid Layout layout vertical Spacing 10 form get Body set Layout layout f Desc Section new Description Section this form get Body f Desc Section get Section set Layout Data new Grid Data Grid Data FILL BOTH f Archive Section new Archive Section this form get Body f Archive Section get Section set Layout Data new Grid Data Grid Data FILL BOTH mform add Part f Desc Section mform add Part f Archive Section Workbench Help set Help form get Body I Help Context Ids MANIFEST SITE OVERVIEW form set Text PDE Plugin get Resource String Archive Page title NON NLS 1  createFormContent IManagedForm ScrolledForm getForm GridLayout GridLayout verticalSpacing getBody setLayout fDescSection DescriptionSection getBody fDescSection getSection setLayoutData GridData GridData FILL_BOTH fArchiveSection ArchiveSection getBody fArchiveSection getSection setLayoutData GridData GridData FILL_BOTH addPart fDescSection addPart fArchiveSection WorkbenchHelp setHelp getBody IHelpContextIds MANIFEST_SITE_OVERVIEW setText PDEPlugin getResourceString ArchivePage

class Folder Provider extends Workbench Content Provider public boolean has Children Object element Object children get Children element for int i 0 i children length i if children i instanceof I Folder return true return false  FolderProvider WorkbenchContentProvider hasChildren getChildren IFolder
implements I Structured Content Provider public Object get Elements Object parent I Site Model model I Site Model parent return model get Site get Archives  IStructuredContentProvider getElements ISiteModel ISiteModel getSite getArchives
I Table Label Provider public String get Column Text Object obj int index I Site Archive archive I Site Archive obj switch index case 0 return archive get Path case 1 return archive getURL return NON NLS 1  ITableLabelProvider getColumnText ISiteArchive ISiteArchive getPath
return NON NLS 1 public Image get Column Image Object obj int index return null  getColumnImage
param form Page public Archive Section PDE Form Page form Page Composite parent super form Page parent Section DESCRIPTION get Section set Text PDE Plugin get Resource String Site Editor Archive Section header NON NLS 1 get Section set Description PDE Plugin get Resource String Site Editor Archive Section instruction NON NLS 1 create Client get Section form Page get Managed Form get Toolkit  formPage ArchiveSection PDEFormPage formPage formPage getSection setText PDEPlugin getResourceString SiteEditor ArchiveSection getSection setDescription PDEPlugin getResourceString SiteEditor ArchiveSection createClient getSection formPage getManagedForm getToolkit
public void create Client Section section Form Toolkit toolkit f Model I Site Model get Page get Model f Model add Model Changed Listener this f Build Model f Model get Build Model if f Build Model null f Build Model add Model Changed Listener this Composite container toolkit create Composite section Grid Layout layout new Grid Layout layout horizontal Spacing 9 layout num Columns 2 container set Layout layout container set Layout Data new Grid Data Grid Data FILL BOTH create Table container toolkit create Table Viewer create Buttons container toolkit toolkit paint Borders For container section set Client container initialize  createClient FormToolkit fModel ISiteModel getPage getModel fModel addModelChangedListener fBuildModel fModel getBuildModel fBuildModel fBuildModel addModelChangedListener createComposite GridLayout GridLayout horizontalSpacing numColumns setLayout setLayoutData GridData GridData FILL_BOTH createTable createTableViewer createButtons paintBordersFor setClient
private void create Buttons Composite parent Form Toolkit toolkit Composite container toolkit create Composite parent Grid Layout layout new Grid Layout layout margin Height 10 container set Layout layout container set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING f Add Button toolkit create Button container PDE Plugin get Resource String Site Editor add SWT PUSH NON NLS 1 f Add Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Add Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e show Dialog null f Edit Button toolkit create Button container PDE Plugin get Resource String Site Editor edit SWT PUSH NON NLS 1 f Edit Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Edit Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Structured Selection ssel I Structured Selection f Viewer get Selection if ssel null ssel size 1 show Dialog I Site Archive ssel get First Element f Remove Button toolkit create Button container PDE Plugin get Resource String Site Editor remove SWT PUSH NON NLS 1 f Remove Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Remove Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Delete f Remove Button set Enabled false f Edit Button set Enabled false toolkit paint Borders For container  createButtons FormToolkit createComposite GridLayout GridLayout marginHeight setLayout setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING fAddButton createButton PDEPlugin getResourceString SiteEditor fAddButton setLayoutData GridData GridData FILL_HORIZONTAL fAddButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent showDialog fEditButton createButton PDEPlugin getResourceString SiteEditor fEditButton setLayoutData GridData GridData FILL_HORIZONTAL fEditButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent IStructuredSelection IStructuredSelection fViewer getSelection showDialog ISiteArchive getFirstElement fRemoveButton createButton PDEPlugin getResourceString SiteEditor fRemoveButton setLayoutData GridData GridData FILL_HORIZONTAL fRemoveButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleDelete fRemoveButton setEnabled fEditButton setEnabled paintBordersFor
private void create Table Composite container Form Toolkit toolkit f Table toolkit create Table container SWT FULL SELECTION Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint 100 f Table set Layout Data gd Table Column col1 new Table Column f Table SWT NULL col1 set Text PDE Plugin get Resource String Site Editor Archive Section col1 NON NLS 1 Table Column col2 new Table Column f Table SWT NULL col2 set Text PDE Plugin get Resource String Site Editor Archive Section col2 NON NLS 1 Table Layout tlayout new Table Layout tlayout add Column Data new Column Weight Data 50 200 tlayout add Column Data new Column Weight Data 50 200 f Table set Layout tlayout f Table set Header Visible true f Table set Lines Visible true create Context Menu f Table  createTable FormToolkit fTable createTable FULL_SELECTION GridData GridData GridData FILL_BOTH heightHint fTable setLayoutData TableColumn TableColumn fTable setText PDEPlugin getResourceString SiteEditor ArchiveSection TableColumn TableColumn fTable setText PDEPlugin getResourceString SiteEditor ArchiveSection TableLayout TableLayout addColumnData ColumnWeightData addColumnData ColumnWeightData fTable setLayout fTable setHeaderVisible fTable setLinesVisible createContextMenu fTable
f Viewer set Input get Page get Model f Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Selection Changed  fViewer setInput getPage getModel fViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged
private void create Table Viewer f Viewer new Table Viewer f Table f Viewer set Content Provider new Content Provider f Viewer set Label Provider new Archive Label Provider f Viewer set Input get Page get Model f Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Selection Changed  createTableViewer fViewer TableViewer fTable fViewer setContentProvider ContentProvider fViewer setLabelProvider ArchiveLabelProvider fViewer setInput getPage getModel fViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged
private void handle Selection Changed I Selection selection f Viewer get Selection if selection null selection instanceof I Structured Selection I Structured Selection ssel I Structured Selection selection f Remove Button set Enabled ssel size 0 f Edit Button set Enabled ssel size 1 else f Remove Button set Enabled false f Edit Button set Enabled false  handleSelectionChanged ISelection fViewer getSelection IStructuredSelection IStructuredSelection IStructuredSelection fRemoveButton setEnabled fEditButton setEnabled fRemoveButton setEnabled fEditButton setEnabled
Busy Indicator show While f Table get Display new Runnable public void run New Archive Dialog dialog new New Archive Dialog f Table get Shell model archive dialog create SWT Util set Dialog Size dialog 400 1 dialog open  BusyIndicator showWhile fTable getDisplay NewArchiveDialog NewArchiveDialog fTable getShell SWTUtil setDialogSize
private void show Dialog final I Site Archive archive final I Site Model model I Site Model get Page get Model Busy Indicator show While f Table get Display new Runnable public void run New Archive Dialog dialog new New Archive Dialog f Table get Shell model archive dialog create SWT Util set Dialog Size dialog 400 1 dialog open  showDialog ISiteArchive ISiteModel ISiteModel getPage getModel BusyIndicator showWhile fTable getDisplay NewArchiveDialog NewArchiveDialog fTable getShell SWTUtil setDialogSize
private void handle Delete try I Selection selection f Viewer get Selection if selection null selection instanceof I Structured Selection I Structured Selection ssel I Structured Selection selection if ssel size 0 I Site Archive array I Site Archive ssel to List to Array new I Site Archive ssel size I Site site I Site Model get Page get Model get Site site remove Archives array catch Core Exception e  handleDelete ISelection fViewer getSelection IStructuredSelection IStructuredSelection IStructuredSelection ISiteArchive ISiteArchive toList toArray ISiteArchive ISite ISiteModel getPage getModel getSite removeArchives CoreException
if action Id equals Action Factory DELETE get Id Busy Indicator show While f Table get Display new Runnable public void run handle Delete  actionId ActionFactory getId BusyIndicator showWhile fTable getDisplay handleDelete
public boolean do Global Action String action Id if action Id equals Action Factory DELETE get Id Busy Indicator show While f Table get Display new Runnable public void run handle Delete return true return false  doGlobalAction actionId actionId ActionFactory getId BusyIndicator showWhile fTable getDisplay handleDelete
return false public void refresh f Viewer refresh super refresh  fViewer
super refresh public void initialize refresh 
refresh public void model Changed I Model Changed Event e mark Stale  modelChanged IModelChangedEvent markStale
private void create Context Menu Control control Menu Manager popup Menu Manager new Menu Manager I Menu Listener listener new I Menu Listener public void menu About To Show I Menu Manager mng mng add new Action PDE Plugin get Resource String Site Editor remove NON NLS 1 public void run do Global Action Action Factory DELETE get Id mng add new Separator PDE Form Editor Contributor contributor get Page getPDE Editor get Contributor contributor context Menu About To Show mng popup Menu Manager add Menu Listener listener popup Menu Manager set Remove All When Shown true control set Menu popup Menu Manager create Context Menu control  createContextMenu MenuManager popupMenuManager MenuManager IMenuListener IMenuListener menuAboutToShow IMenuManager PDEPlugin getResourceString SiteEditor doGlobalAction ActionFactory getId PDEFormEditorContributor getPage getPDEEditor getContributor contextMenuAboutToShow popupMenuManager addMenuListener popupMenuManager setRemoveAllWhenShown setMenu popupMenuManager createContextMenu
public void commit boolean on Save if on Save f Build Model instanceof Workspace Site Build Model Workspace Site Build Model f Build Model is Dirty Workspace Site Build Model f Build Model save  onSave onSave fBuildModel WorkspaceSiteBuildModel WorkspaceSiteBuildModel fBuildModel isDirty WorkspaceSiteBuildModel fBuildModel

public Base New Dialog Shell shell I Site Model site Model I Site Object site Object super shell this site Model site Model this site Object site Object  BaseNewDialog ISiteModel siteModel ISiteObject siteObject siteModel siteModel siteObject siteObject
protected void create Buttons For Button Bar Composite parent super create Buttons For Button Bar parent dialog Changed  createButtonsForButtonBar createButtonsForButtonBar dialogChanged
public I Site Object get Site Object return site Object  ISiteObject getSiteObject siteObject
public I Site Model get Site Model return site Model  ISiteModel getSiteModel siteModel
protected I Dialog Settings get Dialog Settings String section Name I Dialog Settings master PDE Plugin get Default get Dialog Settings I Dialog Settings section master get Section section Name if section null section master add New Section section Name return section  IDialogSettings getDialogSettings sectionName IDialogSettings PDEPlugin getDefault getDialogSettings IDialogSettings getSection sectionName addNewSection sectionName
protected Control create Dialog Area Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height layout margin Width 10 container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH container set Layout Data gd create Entries container if site Object null initialize Fields Modify Listener listener new Modify Listener public void modify Text Modify Event e dialog Changed hook Listeners listener set Title get Dialog Title Dialog apply Dialog Font container Workbench Help set Help container get Help Id return container  createDialogArea GridLayout GridLayout numColumns marginHeight marginWidth setLayout GridData GridData GridData FILL_BOTH setLayoutData createEntries siteObject initializeFields ModifyListener ModifyListener modifyText ModifyEvent dialogChanged hookListeners setTitle getDialogTitle applyDialogFont WorkbenchHelp setHelp getHelpId
protected abstract String get Dialog Title  getDialogTitle
protected abstract String get Dialog Title protected abstract String get Help Id  getDialogTitle getHelpId
protected abstract String get Dialog Title protected abstract String get Help Id protected abstract void create Entries Composite container  getDialogTitle getHelpId createEntries
protected abstract String get Help Id protected abstract void create Entries Composite container protected abstract void hook Listeners Modify Listener listener  getHelpId createEntries hookListeners ModifyListener
protected abstract void create Entries Composite container protected abstract void hook Listeners Modify Listener listener protected abstract void dialog Changed  createEntries hookListeners ModifyListener dialogChanged
protected abstract void hook Listeners Modify Listener listener protected abstract void dialog Changed protected abstract String get Empty Error Message  hookListeners ModifyListener dialogChanged getEmptyErrorMessage
protected void initialize Fields if site Model is Editable false ok Button set Enabled false  initializeFields siteModel isEditable okButton setEnabled
protected void set If Defined Text text String value if value null text set Text value  setIfDefined setText
protected I Status get Empty Error Status if error Status null error Status create Error Status get Empty Error Message return error Status  IStatus getEmptyErrorStatus errorStatus errorStatus createErrorStatus getEmptyErrorMessage errorStatus
protected I Status getOK Status if ok Status null ok Status new Status I Status OK PDE Plugin get Plugin Id I Status OK NON NLS 1 null return ok Status  IStatus getOKStatus okStatus okStatus IStatus PDEPlugin getPluginId IStatus okStatus
protected I Status create Error Status String message return new Status I Status ERROR PDE Plugin get Plugin Id I Status OK message null  IStatus createErrorStatus IStatus PDEPlugin getPluginId IStatus
protected void ok Pressed execute super ok Pressed  okPressed okPressed
protected abstract void execute 

public Built Features Wizard I Site Build Model model this model model set Default Page Image Descriptor PDE Plugin Images DESC NEWPPRJ WIZ set Dialog Settings PDE Plugin get Default get Dialog Settings set Needs Progress Monitor true set Window Title PDE Plugin get Resource String Built Features Wizard title NON NLS 1  BuiltFeaturesWizard ISiteBuildModel setDefaultPageImageDescriptor PDEPluginImages DESC_NEWPPRJ_WIZ setDialogSettings PDEPlugin getDefault getDialogSettings setNeedsProgressMonitor setWindowTitle PDEPlugin getResourceString BuiltFeaturesWizard
public void add Pages main Page new Built Features Wizard Page model add Page main Page  addPages mainPage BuiltFeaturesWizardPage addPage mainPage
public boolean perform Finish return main Page finish  performFinish mainPage

extends Default Content Provider implements I Structured Content Provider public Object get Elements Object parent return get Choices  DefaultContentProvider IStructuredContentProvider getElements getChoices
class Table Part extends Wizard Checkbox Table Part public Table Part super PDE Plugin get Resource String Build Feature Wizard Page label NON NLS 1  TablePart WizardCheckboxTablePart TablePart PDEPlugin getResourceString BuildFeatureWizardPage
super PDE Plugin get Resource String Build Feature Wizard Page label NON NLS 1 public void update Counter int count super update Counter count set Page Complete count 0  PDEPlugin getResourceString BuildFeatureWizardPage updateCounter updateCounter setPageComplete
protected Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit Structured Viewer viewer super create Structured Viewer parent style toolkit viewer set Sorter List Util FEATURE SORTER return viewer  StructuredViewer createStructuredViewer FormToolkit StructuredViewer createStructuredViewer setSorter ListUtil FEATURE_SORTER
public Built Features Wizard Page I Site Build Model model super Built Features Wizard Page NON NLS 1 this model model set Title PDE Plugin get Resource String Build Feature Wizard Page title NON NLS 1 set Description PDE Plugin get Resource String Build Feature Wizard Page desc NON NLS 1 set Page Complete false checkbox Table Part new Table Part PDE Plugin get Default get Label Provider connect this  BuiltFeaturesWizardPage ISiteBuildModel BuiltFeaturesWizardPage setTitle PDEPlugin getResourceString BuildFeatureWizardPage setDescription PDEPlugin getResourceString BuildFeatureWizardPage setPageComplete checkboxTablePart TablePart PDEPlugin getDefault getLabelProvider
public void dispose PDE Plugin get Default get Label Provider disconnect this super dispose  PDEPlugin getDefault getLabelProvider
public void create Control Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 container set Layout layout create Plugin List container initialize set Control container Dialog apply Dialog Font container Workbench Help set Help container I Help Context Ids FEATURE INCLUDED FEATURES WIZARD  createControl GridLayout GridLayout numColumns setLayout createPluginList setControl applyDialogFont WorkbenchHelp setHelp IHelpContextIds FEATURE_INCLUDED_FEATURES_WIZARD
feature Viewer add Filter new Viewer Filter public boolean select Viewer v Object parent Object object if object instanceof I Feature Model I Feature Model model I Feature Model object return is On The List model return true  featureViewer addFilter ViewerFilter IFeatureModel IFeatureModel IFeatureModel isOnTheList
protected void create Plugin List Composite parent checkbox Table Part create Control parent feature Viewer checkbox Table Part get Table Viewer feature Viewer set Content Provider new Plugin Content Provider feature Viewer set Label Provider PDE Plugin get Default get Label Provider feature Viewer add Filter new Viewer Filter public boolean select Viewer v Object parent Object object if object instanceof I Feature Model I Feature Model model I Feature Model object return is On The List model return true Grid Data gd Grid Data checkbox Table Part get Control get Layout Data gd height Hint 300  createPluginList checkboxTablePart createControl featureViewer checkboxTablePart getTableViewer featureViewer setContentProvider PluginContentProvider featureViewer setLabelProvider PDEPlugin getDefault getLabelProvider featureViewer addFilter ViewerFilter IFeatureModel IFeatureModel IFeatureModel isOnTheList GridData GridData checkboxTablePart getControl getLayoutData heightHint
private boolean is On The List I Feature Model candidate I Site Build Feature features model get Site Build get Features I Feature cfeature candidate get Feature for int i 0 i features length i I Site Build Feature bfeature features i if bfeature get Id equals cfeature get Id bfeature get Version equals cfeature get Version return true return false  isOnTheList IFeatureModel ISiteBuildFeature getSiteBuild getFeatures IFeature getFeature ISiteBuildFeature getId getId getVersion getVersion
public void init I Workbench workbench  IWorkbench
private void initialize feature Viewer set Input model get Site Build checkbox Table Part set Selection new Object 0  featureViewer setInput getSiteBuild checkboxTablePart setSelection
private Object get Choices Workspace Model Manager mng PDE Core get Default get Workspace Model Manager return mng get Feature Models  getChoices WorkspaceModelManager PDECore getDefault getWorkspaceModelManager getFeatureModels
I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try do Add candidates monitor catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException doAdd CoreException InvocationTargetException
public boolean finish final Object candidates checkbox Table Part get Selection I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try do Add candidates monitor catch Core Exception e throw new Invocation Target Exception e try get Container run false false op catch Interrupted Exception e return false catch Invocation Target Exception e PDE Plugin log Exception e return false return true  checkboxTablePart getSelection IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException doAdd CoreException InvocationTargetException getContainer InterruptedException InvocationTargetException PDEPlugin logException
private void do Add Object candidates I Progress Monitor monitor throws Core Exception monitor begin Task PDE Plugin get Resource String Build Feature Wizard Page adding NON NLS 1 candidates length 1 I Site Build site Build model get Site Build I Site Build Feature added new I Site Build Feature candidates length for int i 0 i candidates length i I Feature Model candidate I Feature Model candidates i String name candidate get Feature get Label monitor sub Task candidate get Resource String name Site Build Feature child Site Build Feature model create Feature child set Referenced Feature candidate get Feature added i child monitor worked 1 monitor sub Task NON NLS 1 monitor set Task Name PDE Plugin get Resource String Build Feature Wizard Page updating NON NLS 1 site Build add Features added monitor worked 1  doAdd IProgressMonitor CoreException beginTask PDEPlugin getResourceString BuildFeatureWizardPage ISiteBuild siteBuild getSiteBuild ISiteBuildFeature ISiteBuildFeature IFeatureModel IFeatureModel getFeature getLabel subTask getResourceString SiteBuildFeature SiteBuildFeature createFeature setReferencedFeature getFeature subTask setTaskName PDEPlugin getResourceString BuildFeatureWizardPage siteBuild addFeatures

I Tree Content Provider public Object get Elements Object input Element I Site model I Site input Element Array List result new Array List I Site Category Definition cat Defs model get Category Definitions for int i 0 i cat Defs length i result add cat Defs i I Site Feature features model get Features for int i 0 i features length i if features i get Categories length 0 result add new Site Feature Adapter null features i return result to Array  ITreeContentProvider getElements inputElement ISite ISite inputElement ArrayList ArrayList ISiteCategoryDefinition catDefs getCategoryDefinitions catDefs catDefs ISiteFeature getFeatures getCategories SiteFeatureAdapter toArray
public Object get Children Object parent if parent instanceof I Site Category Definition I Site Category Definition cat Def I Site Category Definition parent I Site Feature features f Model get Site get Features Hash Set result new Hash Set for int i 0 i features length i I Site Category cats features i get Categories for int j 0 j cats length j if cats j get Definition null cats j get Definition equals cat Def result add new Site Feature Adapter cats j get Name features i return result to Array return new Object 0  getChildren ISiteCategoryDefinition ISiteCategoryDefinition catDef ISiteCategoryDefinition ISiteFeature fModel getSite getFeatures HashSet HashSet ISiteCategory getCategories getDefinition getDefinition catDef SiteFeatureAdapter getName toArray
return new Object 0 public Object get Parent Object element return null  getParent
public boolean has Children Object element if element instanceof I Site Category Definition I Site Category Definition cat Def I Site Category Definition element I Site Feature features f Model get Site get Features for int i 0 i features length i I Site Category cats features i get Categories for int j 0 j cats length j if cats j get Definition null cats j get Definition equals cat Def return true return false  hasChildren ISiteCategoryDefinition ISiteCategoryDefinition catDef ISiteCategoryDefinition ISiteFeature fModel getSite getFeatures ISiteCategory getCategories getDefinition getDefinition catDef
private Image site Feature Image private Image cat Def Image public Category Label Provider site Feature Image PDE Plugin Images DESC FEATURE OBJ create Image cat Def Image PDE Plugin Images DESC CATEGORY OBJ create Image  siteFeatureImage catDefImage CategoryLabelProvider siteFeatureImage PDEPluginImages DESC_FEATURE_OBJ createImage catDefImage PDEPluginImages DESC_CATEGORY_OBJ createImage
public Image get Image Object element if element instanceof I Site Category Definition return cat Def Image if element instanceof Site Feature Adapter return site Feature Image return super get Image element  getImage ISiteCategoryDefinition catDefImage SiteFeatureAdapter siteFeatureImage getImage
public String get Text Object element if element instanceof I Site Category Definition return I Site Category Definition element get Name if element instanceof Site Feature Adapter I Site Feature feature Site Feature Adapter element feature if feature get Id null feature get Version null return feature get Id feature get Version NON NLS 1 NON NLS 2 return feature getURL return super get Text element  getText ISiteCategoryDefinition ISiteCategoryDefinition getName SiteFeatureAdapter ISiteFeature SiteFeatureAdapter getId getVersion getId getVersion getText
public void dispose super dispose cat Def Image dispose site Feature Image dispose  catDefImage siteFeatureImage
public Category Section PDE Form Page form Page Composite parent super form Page parent Section DESCRIPTION new String PDE Plugin get Resource String Category Section new NON NLS 1 get Section set Text PDE Plugin get Resource String Category Section title NON NLS 1 get Section set Description PDE Plugin get Resource String Category Section desc NON NLS 1  CategorySection PDEFormPage formPage formPage PDEPlugin getResourceString CategorySection getSection setText PDEPlugin getResourceString CategorySection getSection setDescription PDEPlugin getResourceString CategorySection
f Category Viewer public void drag Enter Drop Target Event event if event detail DND DROP DEFAULT if event operations DND DROP LINK 0 event detail DND DROP LINK else event detail DND DROP MOVE  fCategoryViewer dragEnter DropTargetEvent DROP_DEFAULT DROP_LINK DROP_LINK DROP_MOVE
public void drag Operation Changed Drop Target Event event if event detail DND DROP DEFAULT if event operations DND DROP LINK 0 event detail DND DROP LINK else event detail DND DROP MOVE  dragOperationChanged DropTargetEvent DROP_DEFAULT DROP_LINK DROP_LINK DROP_MOVE
public boolean perform Drop Object data if data instanceof Object return false Object target get Current Target int op get Current Operation Object objects Object data if op DND DROP LINK for int i 0 i objects length i if objects i instanceof I Site Build Feature link Feature I Site Build Feature objects i target return true else if objects length 0 objects 0 instanceof Site Feature Adapter if op DND DROP COPY copy Feature Site Feature Adapter objects 0 target else move Feature Site Feature Adapter objects 0 target return true return false  performDrop getCurrentTarget getCurrentOperation DROP_LINK ISiteBuildFeature linkFeature ISiteBuildFeature SiteFeatureAdapter DROP_COPY copyFeature SiteFeatureAdapter moveFeature SiteFeatureAdapter
public boolean validate Drop Object target int operation Transfer Data transfer Type if target null operation DND DROP COPY return false return target instanceof I Site Category Definition target null  validateDrop TransferData transferType DROP_COPY ISiteCategoryDefinition
transfers new Drag Source Listener public void drag Start Drag Source Event event I Structured Selection ssel I Structured Selection f Category Viewer get Selection if ssel null ssel is Empty ssel get First Element instanceof I Site Category Definition event doit false  DragSourceListener dragStart DragSourceEvent IStructuredSelection IStructuredSelection fCategoryViewer getSelection isEmpty getFirstElement ISiteCategoryDefinition
public void drag Set Data Drag Source Event event I Structured Selection ssel I Structured Selection f Category Viewer get Selection event data ssel to Array  dragSetData DragSourceEvent IStructuredSelection IStructuredSelection fCategoryViewer getSelection toArray
event data ssel to Array public void drag Finished Drag Source Event event  toArray dragFinished DragSourceEvent
public void create Client Section section Form Toolkit toolkit f Model I Site Model get Page get Model f Model add Model Changed Listener this Composite container create Client Container section 2 toolkit create Viewer Part Control container SWT SINGLE 2 toolkit f Category Tree Part get Tree Part f Category Viewer f Category Tree Part get Tree Viewer f Category Viewer set Content Provider new Category Content Provider f Category Viewer set Label Provider new Category Label Provider f Category Viewer set Input f Model get Site int ops DND DROP COPY DND DROP MOVE DND DROP LINK DND DROP DEFAULT Transfer transfers new Transfer Model Data Transfer get Instance f Category Viewer add Drop Support ops transfers new Viewer Drop Adapter f Category Viewer public void drag Enter Drop Target Event event if event detail DND DROP DEFAULT if event operations DND DROP LINK 0 event detail DND DROP LINK else event detail DND DROP MOVE public void drag Operation Changed Drop Target Event event if event detail DND DROP DEFAULT if event operations DND DROP LINK 0 event detail DND DROP LINK else event detail DND DROP MOVE public boolean perform Drop Object data if data instanceof Object return false Object target get Current Target int op get Current Operation Object objects Object data if op DND DROP LINK for int i 0 i objects length i if objects i instanceof I Site Build Feature link Feature I Site Build Feature objects i target return true else if objects length 0 objects 0 instanceof Site Feature Adapter if op DND DROP COPY copy Feature Site Feature Adapter objects 0 target else move Feature Site Feature Adapter objects 0 target return true return false public boolean validate Drop Object target int operation Transfer Data transfer Type if target null operation DND DROP COPY return false return target instanceof I Site Category Definition target null f Category Viewer add Drag Support DND DROP MOVE DND DROP COPY transfers new Drag Source Listener public void drag Start Drag Source Event event I Structured Selection ssel I Structured Selection f Category Viewer get Selection if ssel null ssel is Empty ssel get First Element instanceof I Site Category Definition event doit false public void drag Set Data Drag Source Event event I Structured Selection ssel I Structured Selection f Category Viewer get Selection event data ssel to Array public void drag Finished Drag Source Event event toolkit paint Borders For container section set Client container initialize  createClient FormToolkit fModel ISiteModel getPage getModel fModel addModelChangedListener createClientContainer createViewerPartControl fCategoryTreePart getTreePart fCategoryViewer fCategoryTreePart getTreeViewer fCategoryViewer setContentProvider CategoryContentProvider fCategoryViewer setLabelProvider CategoryLabelProvider fCategoryViewer setInput fModel getSite DROP_COPY DROP_MOVE DROP_LINK DROP_DEFAULT ModelDataTransfer getInstance fCategoryViewer addDropSupport ViewerDropAdapter fCategoryViewer dragEnter DropTargetEvent DROP_DEFAULT DROP_LINK DROP_LINK DROP_MOVE dragOperationChanged DropTargetEvent DROP_DEFAULT DROP_LINK DROP_LINK DROP_MOVE performDrop getCurrentTarget getCurrentOperation DROP_LINK ISiteBuildFeature linkFeature ISiteBuildFeature SiteFeatureAdapter DROP_COPY copyFeature SiteFeatureAdapter moveFeature SiteFeatureAdapter validateDrop TransferData transferType DROP_COPY ISiteCategoryDefinition fCategoryViewer addDragSupport DROP_MOVE DROP_COPY DragSourceListener dragStart DragSourceEvent IStructuredSelection IStructuredSelection fCategoryViewer getSelection isEmpty getFirstElement ISiteCategoryDefinition dragSetData DragSourceEvent IStructuredSelection IStructuredSelection fCategoryViewer getSelection toArray dragFinished DragSourceEvent paintBordersFor setClient
private void link Feature I Site Build Feature sb Feature Object target try I Site Feature feature Feature Section find Matching Site Feature f Model sb Feature if feature null feature Feature Section create Site Feature f Model sb Feature f Model get Site add Features new I Site Feature feature if target null target instanceof I Site Category Definition add Category feature false I Site Category Definition target catch Core Exception e  linkFeature ISiteBuildFeature sbFeature ISiteFeature FeatureSection findMatchingSiteFeature fModel sbFeature FeatureSection createSiteFeature fModel sbFeature fModel getSite addFeatures ISiteFeature ISiteCategoryDefinition addCategory ISiteCategoryDefinition CoreException
private void copy Feature Site Feature Adapter adapter Object target if adapter category null move Feature adapter target else if target instanceof I Site Category Definition if find Real Feature adapter feature null add Category adapter feature true I Site Category Definition target link Feature find Build Feature adapter feature I Site Category Definition target else if target null link Feature find Build Feature adapter feature null  copyFeature SiteFeatureAdapter moveFeature ISiteCategoryDefinition findRealFeature addCategory ISiteCategoryDefinition linkFeature findBuildFeature ISiteCategoryDefinition linkFeature findBuildFeature
private I Site Build Feature find Build Feature I Site Feature feature if feature null return null I Site Build Feature build Features f Model get Build Model get Site Build get Features for int i 0 i build Features length i if build Features i get TargetURL equals feature getURL return build Features i return null  ISiteBuildFeature findBuildFeature ISiteFeature ISiteBuildFeature buildFeatures fModel getBuildModel getSiteBuild getFeatures buildFeatures buildFeatures getTargetURL buildFeatures
private void add Category I Site Feature a Feature boolean is Copy I Site Category Definition target try I Site Feature feature is Copy find Real Feature a Feature a Feature if feature null return I Site Category Definition cat Def target I Site Category cats feature get Categories int j 0 for j cats length j if cats j get Name equals cat Def get Name break if j cats length I Site Category cat f Model get Factory create Category feature cat set Name cat Def get Name feature add Categories new I Site Category cat catch Core Exception e  addCategory ISiteFeature aFeature isCopy ISiteCategoryDefinition ISiteFeature isCopy findRealFeature aFeature aFeature ISiteCategoryDefinition catDef ISiteCategory getCategories getName catDef getName ISiteCategory fModel getFactory createCategory setName catDef getName addCategories ISiteCategory CoreException
private void move Feature Site Feature Adapter adapter Object target if adapter category null remove Category adapter feature true adapter category if target instanceof I Site Category Definition add Category adapter feature true I Site Category Definition target else if target null link Feature find Build Feature adapter feature null  moveFeature SiteFeatureAdapter removeCategory ISiteCategoryDefinition addCategory ISiteCategoryDefinition linkFeature findBuildFeature
protected void button Selected int index switch index case 0 handle Add Category Definition  buttonSelected handleAddCategoryDefinition
protected void handle Double Click I Structured Selection ssel Object selected ssel get First Element if selected instanceof I Site Category Definition handle Edit Category Definition else if selected instanceof Site Feature Adapter handle Edit Feature Properties Site Feature Adapter selected  handleDoubleClick IStructuredSelection getFirstElement ISiteCategoryDefinition handleEditCategoryDefinition SiteFeatureAdapter handleEditFeatureProperties SiteFeatureAdapter
new Runnable public void run Feature Properties Dialog dialog new Feature Properties Dialog f Category Viewer get Control get Shell f Model feature dialog create if dialog open Feature Properties Dialog OK  FeaturePropertiesDialog FeaturePropertiesDialog fCategoryViewer getControl getShell fModel FeaturePropertiesDialog
private void handle Edit Feature Properties Site Feature Adapter adapter final I Site Feature feature adapter feature Busy Indicator show While f Category Viewer get Control get Display new Runnable public void run Feature Properties Dialog dialog new Feature Properties Dialog f Category Viewer get Control get Shell f Model feature dialog create if dialog open Feature Properties Dialog OK  handleEditFeatureProperties SiteFeatureAdapter ISiteFeature BusyIndicator showWhile fCategoryViewer getControl getDisplay FeaturePropertiesDialog FeaturePropertiesDialog fCategoryViewer getControl getShell fModel FeaturePropertiesDialog
protected void selection Changed I Structured Selection selection get Page getPDE Editor set Selection selection  selectionChanged IStructuredSelection getPage getPDEEditor setSelection
private void handle Edit Category Definition I Structured Selection ssel I Structured Selection f Category Viewer get Selection if ssel null ssel size 1 show Category Dialog I Site Category Definition ssel get First Element  handleEditCategoryDefinition IStructuredSelection IStructuredSelection fCategoryViewer getSelection showCategoryDialog ISiteCategoryDefinition getFirstElement
show Category Dialog I Site Category Definition ssel get First Element private void handle Add Category Definition show Category Dialog null  showCategoryDialog ISiteCategoryDefinition getFirstElement handleAddCategoryDefinition showCategoryDialog
private boolean handle Remove I Structured Selection ssel I Structured Selection f Category Viewer get Selection Object object ssel get First Element if object null return true if object instanceof I Site Category Definition return handle Remove Category Definition I Site Category Definition object return handle Remove Site Feature Adapter Site Feature Adapter object  handleRemove IStructuredSelection IStructuredSelection fCategoryViewer getSelection getFirstElement ISiteCategoryDefinition handleRemoveCategoryDefinition ISiteCategoryDefinition handleRemoveSiteFeatureAdapter SiteFeatureAdapter
private boolean handle Remove Category Definition I Site Category Definition cat Def try Object children Category Content Provider f Category Viewer get Content Provider get Children cat Def for int i 0 i children length i Site Feature Adapter adapter Site Feature Adapter children i I Site Category cats adapter feature get Categories for int j 0 j cats length j if adapter category equals cats j get Name adapter feature remove Categories new I Site Category cats j if adapter feature get Categories length 0 f Model get Site remove Features new I Site Feature adapter feature f Model get Site remove Category Definitions new I Site Category Definition cat Def return true catch Core Exception e return false  handleRemoveCategoryDefinition ISiteCategoryDefinition catDef CategoryContentProvider fCategoryViewer getContentProvider getChildren catDef SiteFeatureAdapter SiteFeatureAdapter ISiteCategory getCategories getName removeCategories ISiteCategory getCategories fModel getSite removeFeatures ISiteFeature fModel getSite removeCategoryDefinitions ISiteCategoryDefinition catDef CoreException
private boolean handle Remove Site Feature Adapter Site Feature Adapter adapter try I Site Feature feature adapter feature if adapter category null f Model get Site remove Features new I Site Feature feature else remove Category feature false adapter category if feature get Categories length 0 f Model get Site remove Features new I Site Feature feature return true catch Core Exception e return false  handleRemoveSiteFeatureAdapter SiteFeatureAdapter ISiteFeature fModel getSite removeFeatures ISiteFeature removeCategory getCategories fModel getSite removeFeatures ISiteFeature CoreException
private void remove Category I Site Feature a Feature boolean is Copy String cat Name try I Site Feature feature is Copy find Real Feature a Feature a Feature if feature null return I Site Category cats feature get Categories for int i 0 i cats length i if cat Name equals cats i get Name feature remove Categories new I Site Category cats i catch Core Exception e  removeCategory ISiteFeature aFeature isCopy catName ISiteFeature isCopy findRealFeature aFeature aFeature ISiteCategory getCategories catName getName removeCategories ISiteCategory CoreException
private I Site Feature find Real Feature I Site Feature a Copy I Site Feature features f Model get Site get Features for int i 0 i features length i if features i getURL equals a Copy getURL return features i return null  ISiteFeature findRealFeature ISiteFeature aCopy ISiteFeature fModel getSite getFeatures aCopy
new Runnable public void run New Category Definition Dialog dialog new New Category Definition Dialog f Category Viewer get Control get Shell f Model def dialog create if dialog open New Category Definition Dialog OK  NewCategoryDefinitionDialog NewCategoryDefinitionDialog fCategoryViewer getControl getShell fModel NewCategoryDefinitionDialog
private void show Category Dialog final I Site Category Definition def Busy Indicator show While f Category Viewer get Control get Display new Runnable public void run New Category Definition Dialog dialog new New Category Definition Dialog f Category Viewer get Control get Shell f Model def dialog create if dialog open New Category Definition Dialog OK  showCategoryDialog ISiteCategoryDefinition BusyIndicator showWhile fCategoryViewer getControl getDisplay NewCategoryDefinitionDialog NewCategoryDefinitionDialog fCategoryViewer getControl getShell fModel NewCategoryDefinitionDialog
public void dispose super dispose f Model remove Model Changed Listener this  fModel removeModelChangedListener
add new Action PDE Plugin get Resource String Site Editor remove NON NLS 1 public void run do Global Action Action Factory DELETE get Id  PDEPlugin getResourceString SiteEditor doGlobalAction ActionFactory getId
manager add new Action PDE Plugin get Resource String Site Editor properties NON NLS 1 public void run handle Double Click I Structured Selection f Category Viewer get Selection  PDEPlugin getResourceString SiteEditor handleDoubleClick IStructuredSelection fCategoryViewer getSelection
protected void fill Context Menu I Menu Manager manager manager add new Action PDE Plugin get Resource String Site Editor remove NON NLS 1 public void run do Global Action Action Factory DELETE get Id get Page getPDE Editor get Contributor context Menu About To Show manager manager add new Separator manager add new Action PDE Plugin get Resource String Site Editor properties NON NLS 1 public void run handle Double Click I Structured Selection f Category Viewer get Selection  fillContextMenu IMenuManager PDEPlugin getResourceString SiteEditor doGlobalAction ActionFactory getId getPage getPDEEditor getContributor contextMenuAboutToShow PDEPlugin getResourceString SiteEditor handleDoubleClick IStructuredSelection fCategoryViewer getSelection
public boolean do Global Action String action Id if action Id equals Action Factory CUT get Id handle Remove return false if action Id equals Action Factory PASTE get Id do Paste return true return action Id equals Action Factory DELETE get Id handle Remove false  doGlobalAction actionId actionId ActionFactory getId handleRemove actionId ActionFactory getId doPaste actionId ActionFactory getId handleRemove
false public void refresh f Category Viewer refresh super refresh  fCategoryViewer
public void model Changed I Model Changed Event e if e get Change Type I Model Changed Event WORLD CHANGED mark Stale return refresh  modelChanged IModelChangedEvent getChangeType IModelChangedEvent WORLD_CHANGED markStale
public void initialize refresh 
protected void do Paste Object target Object objects try for int i 0 i objects length i if objects i instanceof I Site Build Feature link Feature I Site Build Feature objects i target else if objects i instanceof Site Feature Adapter copy Feature Site Feature Adapter objects i target else if objects i instanceof I Site Category Definition f Model get Site add Category Definitions new I Site Category Definition I Site Category Definition objects i catch Core Exception e  doPaste ISiteBuildFeature linkFeature ISiteBuildFeature SiteFeatureAdapter copyFeature SiteFeatureAdapter ISiteCategoryDefinition fModel getSite addCategoryDefinitions ISiteCategoryDefinition ISiteCategoryDefinition CoreException
protected boolean can Paste Object target Object objects if target null target instanceof I Site Category Definition for int i 0 i objects length i if objects i instanceof I Site Build Feature objects i instanceof Site Feature Adapter return true if objects i instanceof I Site Category Definition String name I Site Category Definition objects i get Name I Site Category Definition defs f Model get Site get Category Definitions for int j 0 j defs length j I Site Category Definition def defs j String dname def get Name if dname null dname equals name return false return true return false  canPaste ISiteCategoryDefinition ISiteBuildFeature SiteFeatureAdapter ISiteCategoryDefinition ISiteCategoryDefinition getName ISiteCategoryDefinition fModel getSite getCategoryDefinitions ISiteCategoryDefinition getName

private Form Entry f Desc Entry public Description Section PDE Form Page page Composite parent super page parent Section DESCRIPTION get Section set Text PDE Plugin get Resource String Site Editor Description Section header NON NLS 1 get Section set Description PDE Plugin get Resource String Site Editor Description Section desc NON NLS 1 create Client get Section page get Managed Form get Toolkit  FormEntry fDescEntry DescriptionSection PDEFormPage getSection setText PDEPlugin getResourceString SiteEditor DescriptionSection getSection setDescription PDEPlugin getResourceString SiteEditor DescriptionSection createClient getSection getManagedForm getToolkit
public void commit boolean on Save fURL Entry commit f Desc Entry commit super commit on Save  onSave fURLEntry fDescEntry onSave
null false fURL Entry set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text set DescriptionURL text get Value  fURLEntry setFormEntryListener FormEntryAdapter textValueChanged FormEntry setDescriptionURL getValue
f Desc Entry get Text set Layout Data new Grid Data Grid Data FILL BOTH f Desc Entry set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text set Description Text text get Value  fDescEntry getText setLayoutData GridData GridData FILL_BOTH fDescEntry setFormEntryListener FormEntryAdapter textValueChanged FormEntry setDescriptionText getValue
public void create Client Section section Form Toolkit toolkit Composite container toolkit create Composite section Grid Layout layout new Grid Layout layout num Columns 2 layout vertical Spacing 10 container set Layout layout fURL Entry new Form Entry container toolkit PDE Plugin get Resource String Site Editor Description Section url Label NON NLS 1 null false fURL Entry set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text set DescriptionURL text get Value f Desc Entry new Form Entry container toolkit PDE Plugin get Resource String Site Editor Description Section desc Label NON NLS 1 SWT WRAP SWT MULTI f Desc Entry get Text set Layout Data new Grid Data Grid Data FILL BOTH f Desc Entry set Form Entry Listener new Form Entry Adapter this public void text Value Changed Form Entry text set Description Text text get Value toolkit paint Borders For container section set Client container initialize  createClient FormToolkit createComposite GridLayout GridLayout numColumns verticalSpacing setLayout fURLEntry FormEntry PDEPlugin getResourceString SiteEditor DescriptionSection urlLabel fURLEntry setFormEntryListener FormEntryAdapter textValueChanged FormEntry setDescriptionURL getValue fDescEntry FormEntry PDEPlugin getResourceString SiteEditor DescriptionSection descLabel fDescEntry getText setLayoutData GridData GridData FILL_BOTH fDescEntry setFormEntryListener FormEntryAdapter textValueChanged FormEntry setDescriptionText getValue paintBordersFor setClient
private void set DescriptionURL String text I Site Model model I Site Model get Page get Model I Site site model get Site I Site Description description site get Description boolean defined false if description null description model get Factory create Description null defined true try description setURL text if defined site set Description description catch Core Exception e PDE Plugin log Exception e  setDescriptionURL ISiteModel ISiteModel getPage getModel ISite getSite ISiteDescription getDescription getFactory createDescription setDescription CoreException PDEPlugin logException
private void set Description Text String text I Site Model model I Site Model get Page get Model I Site site model get Site I Site Description description site get Description boolean defined false if description null description model get Factory create Description null defined true try description set Text text if defined site set Description description catch Core Exception e PDE Plugin log Exception e  setDescriptionText ISiteModel ISiteModel getPage getModel ISite getSite ISiteDescription getDescription getFactory createDescription setText setDescription CoreException PDEPlugin logException
public void dispose I Site Model model I Site Model get Page get Model if model null model remove Model Changed Listener this super dispose  ISiteModel ISiteModel getPage getModel removeModelChangedListener
public void initialize I Site Model model I Site Model get Page get Model refresh model add Model Changed Listener this  ISiteModel ISiteModel getPage getModel addModelChangedListener
model add Model Changed Listener this public void model Changed I Model Changed Event e mark Stale  addModelChangedListener modelChanged IModelChangedEvent markStale
mark Stale public void set Focus if fURL Entry null fURL Entry get Text set Focus  markStale setFocus fURLEntry fURLEntry getText setFocus
private void set If Defined Form Entry form Text String value if value null form Text set Value value true  setIfDefined FormEntry formText formText setValue
public void refresh I Site Model model I Site Model get Page get Model I Site site model get Site set If Defined fURL Entry site get Description null site get Description getURL null set If Defined f Desc Entry site get Description null site get Description get Text null super refresh  ISiteModel ISiteModel getPage getModel ISite getSite setIfDefined fURLEntry getDescription getDescription setIfDefined fDescEntry getDescription getDescription getText
public void cancel Edit fURL Entry cancel Edit f Desc Entry cancel Edit super cancel Edit  cancelEdit fURLEntry cancelEdit fDescEntry cancelEdit cancelEdit
see org eclipse update ui forms internal Form Section can Paste Clipboard public boolean can Paste Clipboard clipboard Transfer Data types clipboard get Available Types Transfer transfers new Transfer Text Transfer get Instance RTF Transfer get Instance for int i 0 i types length i for int j 0 j transfers length j if transfers j is Supported Type types i return true return false  FormSection canPaste canPaste TransferData getAvailableTypes TextTransfer getInstance RTFTransfer getInstance isSupportedType

param shell param site Model param site Object public Feature Properties Dialog Shell shell I Site Model site Model I Site Feature site Object super shell site Model site Object  siteModel siteObject FeaturePropertiesDialog ISiteModel siteModel ISiteFeature siteObject siteModel siteObject
see org eclipse pde internal ui editor site Base New Dialog get Dialog Title protected String get Dialog Title return PDE Plugin get Resource String Feature Properties Dialog title NON NLS 1  BaseNewDialog getDialogTitle getDialogTitle PDEPlugin getResourceString FeaturePropertiesDialog
see org eclipse pde internal ui editor site Base New Dialog get Help Id protected String get Help Id return null  BaseNewDialog getHelpId getHelpId
protected void create Entries Composite container I Site Feature feature I Site Feature get Site Object Label label new Label container SWT NONE label set Text PDE Plugin get Resource String Feature Properties Dialog url NON NLS 1 fURL Text new Text container SWT SINGLE SWT BORDER Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 250 fURL Text set Layout Data gd set If Defined fURL Text feature getURL label new Label container SWT NONE label set Text PDE Plugin get Resource String Feature Properties Dialog id NON NLS 1 f Id Text new Text container SWT SINGLE SWT BORDER f Id Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Id Text set Enabled false set If Defined f Id Text feature get Id label new Label container SWT NONE label set Text PDE Plugin get Resource String Feature Properties Dialog version NON NLS 1 f Version Text new Text container SWT SINGLE SWT BORDER f Version Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Version Text set Enabled false set If Defined f Version Text feature get Version label new Label container SWT NONE label set Text PDE Plugin get Resource String Feature Properties Dialog label NON NLS 1 f Label Text new Text container SWT SINGLE SWT BORDER f Label Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL set If Defined f Label Text feature get Label label new Label container SWT NONE label set Text PDE Plugin get Resource String Feature Properties Dialog type NON NLS 1 f Type Text new Text container SWT SINGLE SWT BORDER f Type Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL set If Defined f Type Text feature get Type label new Label container SWT NONE label set Text PDE Plugin get Resource String Feature Properties Dialog os NON NLS 1 fOS Text new Text container SWT SINGLE SWT BORDER fOS Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL set If Defined fOS Text feature getOS label new Label container SWT NONE label set Text PDE Plugin get Resource String Feature Properties Dialog ws NON NLS 1 fWS Text new Text container SWT SINGLE SWT BORDER fWS Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL set If Defined fWS Text feature getWS label new Label container SWT NONE label set Text PDE Plugin get Resource String Feature Properties Dialog nl NON NLS 1 fNL Text new Text container SWT SINGLE SWT BORDER fNL Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL set If Defined fNL Text feature getNL label new Label container SWT NONE label set Text PDE Plugin get Resource String Feature Properties Dialog arch NON NLS 1 f Arch Text new Text container SWT SINGLE SWT BORDER f Arch Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL set If Defined f Arch Text feature get Arch f Is Patch new Button container SWT CHECK f Is Patch set Text PDE Plugin get Resource String Feature Properties Dialog patch NON NLS 1 gd new Grid Data gd horizontal Span 2 f Is Patch set Layout Data gd f Is Patch set Selection feature is Patch  createEntries ISiteFeature ISiteFeature getSiteObject setText PDEPlugin getResourceString FeaturePropertiesDialog fURLText GridData GridData GridData FILL_HORIZONTAL widthHint fURLText setLayoutData setIfDefined fURLText setText PDEPlugin getResourceString FeaturePropertiesDialog fIdText fIdText setLayoutData GridData GridData FILL_HORIZONTAL fIdText setEnabled setIfDefined fIdText getId setText PDEPlugin getResourceString FeaturePropertiesDialog fVersionText fVersionText setLayoutData GridData GridData FILL_HORIZONTAL fVersionText setEnabled setIfDefined fVersionText getVersion setText PDEPlugin getResourceString FeaturePropertiesDialog fLabelText fLabelText setLayoutData GridData GridData FILL_HORIZONTAL setIfDefined fLabelText getLabel setText PDEPlugin getResourceString FeaturePropertiesDialog fTypeText fTypeText setLayoutData GridData GridData FILL_HORIZONTAL setIfDefined fTypeText getType setText PDEPlugin getResourceString FeaturePropertiesDialog fOSText fOSText setLayoutData GridData GridData FILL_HORIZONTAL setIfDefined fOSText setText PDEPlugin getResourceString FeaturePropertiesDialog fWSText fWSText setLayoutData GridData GridData FILL_HORIZONTAL setIfDefined fWSText setText PDEPlugin getResourceString FeaturePropertiesDialog fNLText fNLText setLayoutData GridData GridData FILL_HORIZONTAL setIfDefined fNLText setText PDEPlugin getResourceString FeaturePropertiesDialog fArchText fArchText setLayoutData GridData GridData FILL_HORIZONTAL setIfDefined fArchText getArch fIsPatch fIsPatch setText PDEPlugin getResourceString FeaturePropertiesDialog GridData horizontalSpan fIsPatch setLayoutData fIsPatch setSelection isPatch
see org eclipse pde internal ui editor site Base New Dialog hook Listeners org eclipse swt events Modify Listener protected void hook Listeners Modify Listener listener fURL Text add Modify Listener listener  BaseNewDialog hookListeners ModifyListener hookListeners ModifyListener fURLText addModifyListener
see org eclipse pde internal ui editor site Base New Dialog dialog Changed protected void dialog Changed I Status status fURL Text get Text trim length 0 create Error Status get Empty Error Message getOK Status update Status status  BaseNewDialog dialogChanged dialogChanged IStatus fURLText getText createErrorStatus getEmptyErrorMessage getOKStatus updateStatus
see org eclipse pde internal ui editor site Base New Dialog get Empty Error Message protected String get Empty Error Message return PDE Plugin get Resource String Feature Properties Dialog requiredURL NON NLS 1  BaseNewDialog getEmptyErrorMessage getEmptyErrorMessage PDEPlugin getResourceString FeaturePropertiesDialog
protected void execute try I Site Feature feature I Site Feature get Site Object feature set Is Patch f Is Patch get Selection feature setURL fURL Text get Text trim String text f Label Text get Text trim feature set Label text length 0 null text text f Type Text get Text trim feature set Type text length 0 null text text fOS Text get Text trim feature setOS text length 0 null text text fWS Text get Text trim feature setWS text length 0 null text text fNL Text get Text trim feature setNL text length 0 null text text f Arch Text get Text trim feature set Arch text length 0 null text catch Core Exception e  ISiteFeature ISiteFeature getSiteObject setIsPatch fIsPatch getSelection fURLText getText fLabelText getText setLabel fTypeText getText setType fOSText getText fWSText getText fNLText getText fArchText getText setArch CoreException

implements I Structured Content Provider public Object get Elements Object input Element I Site Build Model model I Site Build Model input Element return model get Site Build get Features  IStructuredContentProvider getElements inputElement ISiteBuildModel ISiteBuildModel inputElement getSiteBuild getFeatures
public Feature Section PDE Form Page form Page Composite parent super form Page parent Section DESCRIPTION new String PDE Plugin get Resource String Site Editor add NON NLS 1 PDE Plugin get Resource String Site Editor build All NON NLS 1 get Section set Text PDE Plugin get Resource String Site Editor Feature Section header NON NLS 1 get Section set Description PDE Plugin get Resource String Site Editor Feature Section desc NON NLS 1 PDE Plugin get Default get Label Provider connect this  FeatureSection PDEFormPage formPage formPage PDEPlugin getResourceString SiteEditor PDEPlugin getResourceString SiteEditor buildAll getSection setText PDEPlugin getResourceString SiteEditor FeatureSection getSection setDescription PDEPlugin getResourceString SiteEditor FeatureSection PDEPlugin getDefault getLabelProvider
public void dispose super dispose f Model remove Model Changed Listener this if f Build Model null f Build Model remove Model Changed Listener this PDE Plugin get Default get Label Provider disconnect this  fModel removeModelChangedListener fBuildModel fBuildModel removeModelChangedListener PDEPlugin getDefault getLabelProvider
f Features Viewer set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 I Site Build Feature f1 I Site Build Feature e1 I Site Build Feature f2 I Site Build Feature e2 int compare super compare viewer f1 get Id f2 get Id return compare 0 super compare viewer f1 get Version f2 get Version compare  fFeaturesViewer setSorter ViewerSorter ISiteBuildFeature ISiteBuildFeature ISiteBuildFeature ISiteBuildFeature getId getId getVersion getVersion
new Drag Source Listener public void drag Start Drag Source Event event I Selection selection f Features Viewer get Selection if selection null selection is Empty event doit false  DragSourceListener dragStart DragSourceEvent ISelection fFeaturesViewer getSelection isEmpty
public void drag Set Data Drag Source Event event I Structured Selection ssel I Structured Selection f Features Viewer get Selection event data ssel to Array  dragSetData DragSourceEvent IStructuredSelection IStructuredSelection fFeaturesViewer getSelection toArray
event data ssel to Array public void drag Finished Drag Source Event event  toArray dragFinished DragSourceEvent
public void create Client Section section Form Toolkit toolkit f Model I Site Model get Page get Model f Model add Model Changed Listener this f Build Model f Model get Build Model if f Build Model null f Build Model add Model Changed Listener this Composite container create Client Container section 2 toolkit create Viewer Part Control container SWT MULTI 2 toolkit f Features Table Part get Table Part f Features Viewer f Features Table Part get Table Viewer f Features Viewer set Content Provider new Feature Content Provider f Features Viewer set Label Provider PDE Plugin get Default get Label Provider f Features Viewer set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 I Site Build Feature f1 I Site Build Feature e1 I Site Build Feature f2 I Site Build Feature e2 int compare super compare viewer f1 get Id f2 get Id return compare 0 super compare viewer f1 get Version f2 get Version compare add drag support Transfer transfers new Transfer Model Data Transfer get Instance f Features Viewer add Drag Support DND DROP LINK transfers new Drag Source Listener public void drag Start Drag Source Event event I Selection selection f Features Viewer get Selection if selection null selection is Empty event doit false public void drag Set Data Drag Source Event event I Structured Selection ssel I Structured Selection f Features Viewer get Selection event data ssel to Array public void drag Finished Drag Source Event event f Features Viewer set Input f Build Model toolkit paint Borders For container section set Client container refresh  createClient FormToolkit fModel ISiteModel getPage getModel fModel addModelChangedListener fBuildModel fModel getBuildModel fBuildModel fBuildModel addModelChangedListener createClientContainer createViewerPartControl fFeaturesTablePart getTablePart fFeaturesViewer fFeaturesTablePart getTableViewer fFeaturesViewer setContentProvider FeatureContentProvider fFeaturesViewer setLabelProvider PDEPlugin getDefault getLabelProvider fFeaturesViewer setSorter ViewerSorter ISiteBuildFeature ISiteBuildFeature ISiteBuildFeature ISiteBuildFeature getId getId getVersion getVersion ModelDataTransfer getInstance fFeaturesViewer addDragSupport DROP_LINK DragSourceListener dragStart DragSourceEvent ISelection fFeaturesViewer getSelection isEmpty dragSetData DragSourceEvent IStructuredSelection IStructuredSelection fFeaturesViewer getSelection toArray dragFinished DragSourceEvent fFeaturesViewer setInput fBuildModel paintBordersFor setClient
manager add new Action PDE Plugin get Resource String Site Editor publish NON NLS 1 public void run Object selected I Structured Selection selection to Array for int i 0 i selected length i I Site Build Feature sb Feature I Site Build Feature selected i I Site Feature feature find Matching Site Feature f Model sb Feature try if feature null f Model get Site add Features new I Site Feature create Site Feature f Model sb Feature catch Core Exception e  PDEPlugin getResourceString SiteEditor IStructuredSelection toArray ISiteBuildFeature sbFeature ISiteBuildFeature ISiteFeature findMatchingSiteFeature fModel sbFeature fModel getSite addFeatures ISiteFeature createSiteFeature fModel sbFeature CoreException
manager add new Action PDE Plugin get Resource String Site Editor build NON NLS 1 public void run List list I Structured Selection selection to List handle Build I Site Build Feature list to Array new I Site Build Feature list size  PDEPlugin getResourceString SiteEditor IStructuredSelection toList handleBuild ISiteBuildFeature toArray ISiteBuildFeature
manager add new Separator manager add new Action PDE Plugin get Resource String Site Editor remove NON NLS 1 public void run do Global Action Action Factory DELETE get Id  PDEPlugin getResourceString SiteEditor doGlobalAction ActionFactory getId
public void fill Context Menu I Menu Manager manager final I Selection selection f Features Viewer get Selection if selection null selection is Empty manager add new Action PDE Plugin get Resource String Site Editor publish NON NLS 1 public void run Object selected I Structured Selection selection to Array for int i 0 i selected length i I Site Build Feature sb Feature I Site Build Feature selected i I Site Feature feature find Matching Site Feature f Model sb Feature try if feature null f Model get Site add Features new I Site Feature create Site Feature f Model sb Feature catch Core Exception e manager add new Action PDE Plugin get Resource String Site Editor build NON NLS 1 public void run List list I Structured Selection selection to List handle Build I Site Build Feature list to Array new I Site Build Feature list size manager add new Separator manager add new Action PDE Plugin get Resource String Site Editor remove NON NLS 1 public void run do Global Action Action Factory DELETE get Id manager add get Page getPDE Editor get Contributor get Global Action Action Factory COPY get Id manager add get Page getPDE Editor get Contributor get Global Action Action Factory PASTE get Id manager add new Separator manager add get Page getPDE Editor get Contributor get Revert Action manager add get Page getPDE Editor get Contributor get Save Action  fillContextMenu IMenuManager ISelection fFeaturesViewer getSelection isEmpty PDEPlugin getResourceString SiteEditor IStructuredSelection toArray ISiteBuildFeature sbFeature ISiteBuildFeature ISiteFeature findMatchingSiteFeature fModel sbFeature fModel getSite addFeatures ISiteFeature createSiteFeature fModel sbFeature CoreException PDEPlugin getResourceString SiteEditor IStructuredSelection toList handleBuild ISiteBuildFeature toArray ISiteBuildFeature PDEPlugin getResourceString SiteEditor doGlobalAction ActionFactory getId getPage getPDEEditor getContributor getGlobalAction ActionFactory getId getPage getPDEEditor getContributor getGlobalAction ActionFactory getId getPage getPDEEditor getContributor getRevertAction getPage getPDEEditor getContributor getSaveAction
public void refresh f Features Viewer refresh int feature Count f Features Viewer get Table get Item Count f Features Table Part set Button Enabled 1 feature Count 0 super refresh  fFeaturesViewer featureCount fFeaturesViewer getTable getItemCount fFeaturesTablePart setButtonEnabled featureCount
public void model Changed I Model Changed Event event mark Stale  modelChanged IModelChangedEvent markStale
public void commit boolean on Save if on Save f Build Model instanceof Workspace Site Build Model Workspace Site Build Model f Build Model is Dirty Workspace Site Build Model f Build Model save super commit on Save  onSave onSave fBuildModel WorkspaceSiteBuildModel WorkspaceSiteBuildModel fBuildModel isDirty WorkspaceSiteBuildModel fBuildModel onSave
public boolean can Paste Clipboard clipboard return false  canPaste
public boolean do Global Action String action Id if action Id equals Action Factory CUT get Id handle Remove Feature return false if action Id equals Action Factory DELETE get Id handle Remove Feature return true return false  doGlobalAction actionId actionId ActionFactory getId handleRemoveFeature actionId ActionFactory getId handleRemoveFeature
Busy Indicator show While control get Display new Runnable public void run Built Features Wizard wizard new Built Features Wizard f Build Model Wizard Dialog dialog new Wizard Dialog control get Shell wizard if dialog open Wizard Dialog OK mark Dirty  BusyIndicator showWhile getDisplay BuiltFeaturesWizard BuiltFeaturesWizard fBuildModel WizardDialog WizardDialog getShell WizardDialog markDirty
public void handle New Feature final Control control f Features Viewer get Table Busy Indicator show While control get Display new Runnable public void run Built Features Wizard wizard new Built Features Wizard f Build Model Wizard Dialog dialog new Wizard Dialog control get Shell wizard if dialog open Wizard Dialog OK mark Dirty  handleNewFeature fFeaturesViewer getTable BusyIndicator showWhile getDisplay BuiltFeaturesWizard BuiltFeaturesWizard fBuildModel WizardDialog WizardDialog getShell WizardDialog markDirty
private boolean handle Remove Feature try I Structured Selection ssel I Structured Selection f Features Viewer get Selection if ssel null ssel size 0 I Site Build Feature sb Features I Site Build Feature ssel to List to Array new I Site Build Feature ssel size for int i 0 i sb Features length i I Site Feature feature find Matching Site Feature f Model sb Features i if feature null I Site site f Model get Site site remove Features new I Site Feature feature f Build Model get Site Build remove Features sb Features mark Dirty return true catch Core Exception e return false  handleRemoveFeature IStructuredSelection IStructuredSelection fFeaturesViewer getSelection ISiteBuildFeature sbFeatures ISiteBuildFeature toList toArray ISiteBuildFeature sbFeatures ISiteFeature findMatchingSiteFeature fModel sbFeatures ISite fModel getSite removeFeatures ISiteFeature fBuildModel getSiteBuild removeFeatures sbFeatures markDirty CoreException
public static I Site Feature find Matching Site Feature I Site Model model I Site Build Feature sbfeature I Site Feature sfeatures model get Site get Features for int j 0 j sfeatures length j I Site Feature sfeature sfeatures j if matches sfeature sbfeature return sfeature return null  ISiteFeature findMatchingSiteFeature ISiteModel ISiteBuildFeature ISiteFeature getSite getFeatures ISiteFeature
private static boolean matches I Site Feature sfeature I Site Build Feature sbfeature return sbfeature get Id equals sfeature get Id sbfeature get Version equals sfeature get Version  ISiteFeature ISiteBuildFeature getId getId getVersion getVersion
public static I Site Feature create Site Feature I Site Model model I Site Build Feature sbfeature throws Core Exception I Site Feature sfeature model get Factory create Feature sfeature set Id sbfeature get Id sfeature set Version sbfeature get Version sfeature setURL model get Build Model get Site Build get Feature Location sbfeature get Id   sbfeature get Version jar NON NLS 1 NON NLS 2 NON NLS 3 I Feature ref Feature sbfeature get Referenced Feature sfeature setOS ref Feature getOS sfeature setWS ref Feature getWS sfeature set Arch ref Feature get Arch sfeature setNL ref Feature getNL sfeature set Is Patch is Feature Patch ref Feature return sfeature  ISiteFeature createSiteFeature ISiteModel ISiteBuildFeature CoreException ISiteFeature getFactory createFeature setId getId setVersion getVersion getBuildModel getSiteBuild getFeatureLocation getId _ getVersion IFeature refFeature getReferencedFeature refFeature refFeature setArch refFeature getArch refFeature setIsPatch isFeaturePatch refFeature
private static boolean is Feature Patch I Feature feature I Feature Import imports feature get Imports for int i 0 i imports length i if imports i is Patch return true return false  isFeaturePatch IFeature IFeatureImport getImports isPatch
see org eclipse pde internal ui editor Table Section selection Changed org eclipse jface viewers I Structured Selection protected void selection Changed I Structured Selection selection get Page getPDE Editor set Selection selection  TableSection selectionChanged IStructuredSelection selectionChanged IStructuredSelection getPage getPDEEditor setSelection
protected void button Selected int index switch index case 0 handle New Feature break case 1 handle Build f Build Model get Site Build get Features  buttonSelected handleNewFeature handleBuild fBuildModel getSiteBuild getFeatures
private void handle Build I Site Build Feature sb Features if sb Features length 0 return I Feature Model models get Feature Models sb Features if models length 0 return Build Site Job job new Build Site Job models f Model get Underlying Resource get Project f Build Model job set User true job schedule  handleBuild ISiteBuildFeature sbFeatures sbFeatures IFeatureModel getFeatureModels sbFeatures BuildSiteJob BuildSiteJob fModel getUnderlyingResource getProject fBuildModel setUser
private I Feature Model get Feature Models I Site Build Feature sb Features Array List list new Array List for int i 0 i sb Features length i I Feature feature sb Features i get Referenced Feature if feature null continue I Feature Model model feature get Model if model null model get Underlying Resource null list add model return I Feature Model list to Array new I Feature Model list size  IFeatureModel getFeatureModels ISiteBuildFeature sbFeatures ArrayList ArrayList sbFeatures IFeature sbFeatures getReferencedFeature IFeatureModel getModel getUnderlyingResource IFeatureModel toArray IFeatureModel
public boolean is Dirty if f Build Model null Workspace Site Build Model f Build Model is Dirty return true return super is Dirty  isDirty fBuildModel WorkspaceSiteBuildModel fBuildModel isDirty isDirty

private Category Section category Section public Features Page PDE Form Editor editor super editor PAGE ID PDE Plugin get Resource String Site Editor page1 NON NLS 1  CategorySection categorySection FeaturesPage PDEFormEditor PAGE_ID PDEPlugin getResourceString SiteEditor
protected void create Form Content I Managed Form mform Scrolled Form form mform get Form Grid Layout layout new Grid Layout form get Body set Layout layout layout num Columns 2 layout make Columns Equal Width true layout horizontal Spacing 12 layout margin Width 10 feature Section new Feature Section this form get Body Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint 250 feature Section get Section set Layout Data gd category Section new Category Section this form get Body gd new Grid Data Grid Data FILL BOTH gd width Hint 250 category Section get Section set Layout Data gd mform add Part feature Section mform add Part category Section Workbench Help set Help form get Body I Help Context Ids MANIFEST SITE OVERVIEW I Site Model model I Site Model get Model I Editor Input input get Editor get Editor Input String name input get Name form set Text model get Resource String name  createFormContent IManagedForm ScrolledForm getForm GridLayout GridLayout getBody setLayout numColumns makeColumnsEqualWidth horizontalSpacing marginWidth featureSection FeatureSection getBody GridData GridData GridData FILL_BOTH widthHint featureSection getSection setLayoutData categorySection CategorySection getBody GridData GridData FILL_BOTH widthHint categorySection getSection setLayoutData addPart featureSection addPart categorySection WorkbenchHelp setHelp getBody IHelpContextIds MANIFEST_SITE_OVERVIEW ISiteModel ISiteModel getModel IEditorInput getEditor getEditorInput getName setText getResourceString

private Text url Text public New Archive Dialog Shell shell I Site Model site Model I Site Archive archive super shell site Model archive  urlText NewArchiveDialog ISiteModel siteModel ISiteArchive siteModel
protected void create Entries Composite container Label label new Label container SWT NULL label set Text PDE Plugin get Resource String Site Editor New Archive Dialog path NON NLS 1 path Text new Text container SWT SINGLE SWT BORDER path Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL label new Label container SWT NULL label set Text PDE Plugin get Resource String PDE Plugin get Resource String Site Editor New Archive Dialog url NON NLS 1 url Text new Text container SWT SINGLE SWT BORDER url Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL I Site Archive archive I Site Archive get Site Object if archive null set If Defined url Text archive getURL set If Defined path Text archive get Path  createEntries setText PDEPlugin getResourceString SiteEditor NewArchiveDialog pathText pathText setLayoutData GridData GridData FILL_HORIZONTAL setText PDEPlugin getResourceString PDEPlugin getResourceString SiteEditor NewArchiveDialog urlText urlText setLayoutData GridData GridData FILL_HORIZONTAL ISiteArchive ISiteArchive getSiteObject setIfDefined urlText setIfDefined pathText getPath
protected String get Dialog Title return PDE Plugin get Resource String PDE Plugin get Resource String Site Editor New Archive Dialog title NON NLS 1  getDialogTitle PDEPlugin getResourceString PDEPlugin getResourceString SiteEditor NewArchiveDialog
protected String get Help Id return I Help Context Ids NEW ARCHIVE DIALOG  getHelpId IHelpContextIds NEW_ARCHIVE_DIALOG
protected String get Empty Error Message return PDE Plugin get Resource String PDE Plugin get Resource String Site Editor New Archive Dialog error NON NLS 1  getEmptyErrorMessage PDEPlugin getResourceString PDEPlugin getResourceString SiteEditor NewArchiveDialog
protected void hook Listeners Modify Listener modify Listener path Text add Modify Listener modify Listener url Text add Modify Listener modify Listener  hookListeners ModifyListener modifyListener pathText addModifyListener modifyListener urlText addModifyListener modifyListener
protected void dialog Changed I Status status null if url Text get Text length 0 path Text get Text length 0 status get Empty Error Status else if has Path path Text get Text status create Error Status PDE Plugin get Resource String New Archive Dialog already Exists NON NLS 1 if status null status getOK Status update Status status  dialogChanged IStatus urlText getText pathText getText getEmptyErrorStatus hasPath pathText getText createErrorStatus PDEPlugin getResourceString NewArchiveDialog alreadyExists getOKStatus updateStatus
private boolean has Path String path I Site Model model get Site Model I Site Archive archives model get Site get Archives for int i 0 i archives length i I Site Archive archive archives i String apath archive get Path if apath null apath equals path return true return false  hasPath ISiteModel getSiteModel ISiteArchive getSite getArchives ISiteArchive getPath
private I Site Archive get Archive return I Site Archive get Site Object  ISiteArchive getArchive ISiteArchive getSiteObject
protected void execute I Site Model site Model get Site Model I Site Archive archive get Archive boolean add archive null if archive null archive site Model get Factory create Archive try archive setURL url Text get Text archive set Path path Text get Text if add site Model get Site add Archives new I Site Archive archive catch Core Exception e PDE Plugin log Exception e  ISiteModel siteModel getSiteModel ISiteArchive getArchive siteModel getFactory createArchive urlText getText setPath pathText getText siteModel getSite addArchives ISiteArchive CoreException PDEPlugin logException

public New Category Definition Dialog Shell shell I Site Model site Model I Site Category Definition def super shell site Model def  NewCategoryDefinitionDialog ISiteModel siteModel ISiteCategoryDefinition siteModel
protected void create Entries Composite container Grid Data gd Label label new Label container SWT NULL label set Text PDE Plugin get Resource String KEY NAME name Text new Text container SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL name Text set Layout Data gd label new Label container SWT NULL label set Text PDE Plugin get Resource String KEY LABEL label Text new Text container SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL label Text set Layout Data gd label new Label container SWT NULL label set Text PDE Plugin get Resource String KEY DESC gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING label set Layout Data gd desc Text new Text container SWT MULTI SWT WRAP SWT BORDER gd new Grid Data Grid Data FILL BOTH gd height Hint 100 gd width Hint 225 desc Text set Layout Data gd if get Category Definition null preset Fields  createEntries GridData setText PDEPlugin getResourceString KEY_NAME nameText GridData GridData FILL_HORIZONTAL nameText setLayoutData setText PDEPlugin getResourceString KEY_LABEL labelText GridData GridData FILL_HORIZONTAL labelText setLayoutData setText PDEPlugin getResourceString KEY_DESC GridData GridData VERTICAL_ALIGN_BEGINNING setLayoutData descText GridData GridData FILL_BOTH heightHint widthHint descText setLayoutData getCategoryDefinition presetFields
private void preset Fields  presetFields
private I Site Category Definition get Category Definition return I Site Category Definition get Site Object  ISiteCategoryDefinition getCategoryDefinition ISiteCategoryDefinition getSiteObject
protected String get Dialog Title return PDE Plugin get Resource String KEY TITLE  getDialogTitle PDEPlugin getResourceString KEY_TITLE
protected String get Help Id return I Help Context Ids NEW CATEGORY DEF DIALOG  getHelpId IHelpContextIds NEW_CATEGORY_DEF_DIALOG
protected String get Empty Error Message return PDE Plugin get Resource String KEY EMPTY  getEmptyErrorMessage PDEPlugin getResourceString KEY_EMPTY
protected void hook Listeners Modify Listener modify Listener name Text add Modify Listener modify Listener label Text add Modify Listener modify Listener desc Text add Modify Listener modify Listener  hookListeners ModifyListener modifyListener nameText addModifyListener modifyListener labelText addModifyListener modifyListener descText addModifyListener modifyListener
protected void initialize Fields super initialize Fields I Site Category Definition category Def get Category Definition set If Defined name Text category Def get Name set If Defined label Text category Def get Label set If Defined desc Text category Def get Description null category Def get Description get Text null  initializeFields initializeFields ISiteCategoryDefinition categoryDef getCategoryDefinition setIfDefined nameText categoryDef getName setIfDefined labelText categoryDef getLabel setIfDefined descText categoryDef getDescription categoryDef getDescription getText
protected void dialog Changed boolean edit get Category Definition null I Status status null String name name Text get Text if name length 0 label Text get Text length 0 status get Empty Error Status else if edit already Exists name status create Error Status PDE Plugin get Resource String New Category Definition Dialog already Exists NON NLS 1 if status null status getOK Status update Status status  dialogChanged getCategoryDefinition IStatus nameText getText labelText getText getEmptyErrorStatus alreadyExists createErrorStatus PDEPlugin getResourceString NewCategoryDefinitionDialog alreadyExists getOKStatus updateStatus
private boolean already Exists String name I Site Category Definition defs get Site Model get Site get Category Definitions for int i 0 i defs length i I Site Category Definition def defs i String dname def get Name if dname null dname equals name return true return false  alreadyExists ISiteCategoryDefinition getSiteModel getSite getCategoryDefinitions ISiteCategoryDefinition getName
protected void execute boolean add false I Site Category Definition category Def get Category Definition I Site Model site Model get Site Model if category Def null add true category Def site Model get Factory create Category Definition try category Def set Name name Text get Text category Def set Label label Text get Text String desc desc Text get Text if desc length 0 I Site Description description category Def get Description if description null description site Model get Factory create Description category Def description set Text desc category Def set Description description else category Def set Description null if add site Model get Site add Category Definitions new I Site Category Definition category Def catch Core Exception e PDE Plugin log Exception e  ISiteCategoryDefinition categoryDef getCategoryDefinition ISiteModel siteModel getSiteModel categoryDef categoryDef siteModel getFactory createCategoryDefinition categoryDef setName nameText getText categoryDef setLabel labelText getText descText getText ISiteDescription categoryDef getDescription siteModel getFactory createDescription categoryDef setText categoryDef setDescription categoryDef setDescription siteModel getSite addCategoryDefinitions ISiteCategoryDefinition categoryDef CoreException PDEPlugin logException

public class Site Editor extends Multi Source Editor protected void create Resource Contexts Input Context Manager manager I File Editor Input input I File file input get File I File site File null String name file get Name to Lower Case if name equals site xml NON NLS 1 site File file if site File exists I Editor Input in new File Editor Input site File manager put Context in new Site Input Context this in file site File manager monitor File site File  SiteEditor MultiSourceEditor createResourceContexts InputContextManager IFileEditorInput IFile getFile IFile siteFile getName toLowerCase siteFile siteFile IEditorInput FileEditorInput siteFile putContext SiteInputContext siteFile monitorFile siteFile
protected Input Context Manager create Input Context Manager Site Input Context Manager context Manager new Site Input Context Manager this context Manager set Undo Manager new Site Undo Manager this return context Manager  InputContextManager createInputContextManager SiteInputContextManager contextManager SiteInputContextManager contextManager setUndoManager SiteUndoManager contextManager
public boolean can Copy I Selection selection return true  canCopy ISelection
protected boolean has Known Types try Transfer Data types get Clipboard get Available Types Transfer transfers new Transfer Text Transfer get Instance RTF Transfer get Instance for int i 0 i types length i for int j 0 j transfers length j if transfers j is Supported Type types i return true catch SWT Error e return false  hasKnownTypes TransferData getClipboard getAvailableTypes TextTransfer getInstance RTFTransfer getInstance isSupportedType SWTError
public void monitored File Added I File file String name file get Name if name equals Ignore Case site xml I Editor Input in new File Editor Input file input Context Manager put Context in new Site Input Context this in false  monitoredFileAdded IFile getName equalsIgnoreCase IEditorInput FileEditorInput inputContextManager putContext SiteInputContext
public boolean monitored File Removed I File file TODO may need to check with the user if there are unsaved changes in the model for the file that just got removed under us return true  monitoredFileRemoved IFile
return true public void context Added Input Context context add Source Page context get Id  contextAdded InputContext addSourcePage getId
public void context Removed Input Context context if context is Primary close true return I Form Page page find Page context get Id if page null remove Page context get Id  contextRemoved InputContext isPrimary IFormPage findPage getId removePage getId
protected void create System File Contexts Input Context Manager manager System File Editor Input input File file File input get Adapter File class File site File null String name file get Name to Lower Case if name equals site xml NON NLS 1 site File file if site File exists I Editor Input in new System File Editor Input site File manager put Context in new Site Input Context this in file site File  createSystemFileContexts InputContextManager SystemFileEditorInput getAdapter siteFile getName toLowerCase siteFile siteFile IEditorInput SystemFileEditorInput siteFile putContext SiteInputContext siteFile
protected void create Storage Contexts Input Context Manager manager I Storage Editor Input input String name input get Name to Lower Case if name starts With site xml NON NLS 1 manager put Context input new Site Input Context this input true  createStorageContexts InputContextManager IStorageEditorInput getName toLowerCase startsWith putContext SiteInputContext
protected void context Menu About To Show I Menu Manager manager super context Menu About To Show manager  contextMenuAboutToShow IMenuManager contextMenuAboutToShow
protected void add Pages try add Page new Features Page this add Page new Archive Page this catch Part Init Exception e PDE Plugin log Exception e add Source Page Site Input Context CONTEXT ID  addPages addPage FeaturesPage addPage ArchivePage PartInitException PDEPlugin logException addSourcePage SiteInputContext CONTEXT_ID
protected String compute Initial Page Id String first Page Id super compute Initial Page Id if first Page Id null Input Context primary input Context Manager get Primary Context if primary get Id equals Site Input Context CONTEXT ID first Page Id Features Page PAGE ID if first Page Id null first Page Id Features Page PAGE ID return first Page Id  computeInitialPageId firstPageId computeInitialPageId firstPageId InputContext inputContextManager getPrimaryContext getId SiteInputContext CONTEXT_ID firstPageId FeaturesPage PAGE_ID firstPageId firstPageId FeaturesPage PAGE_ID firstPageId
see org eclipse pde internal ui neweditor Multi Source Editor createXML Source Page org eclipse pde internal ui neweditor PDE Form Editor java lang String java lang String protected PDE Source Page create Source Page PDE Form Editor editor String title String name String context Id return new Site Source Page editor title name  MultiSourceEditor createXMLSourcePage PDEFormEditor PDESourcePage createSourcePage PDEFormEditor contextId SiteSourcePage
protected I Content Outline Page create Content Outline return null return new Site Outline Page this  IContentOutlinePage createContentOutline SiteOutlinePage
public boolean is Dirty Input Context context input Context Manager find Context Site Input Context CONTEXT ID if context null return super is Dirty I Site Build Model f Build Model I Site Model context get Model get Build Model if f Build Model null Workspace Site Build Model f Build Model is Dirty return true return super is Dirty  isDirty InputContext inputContextManager findContext SiteInputContext CONTEXT_ID isDirty ISiteBuildModel fBuildModel ISiteModel getModel getBuildModel fBuildModel WorkspaceSiteBuildModel fBuildModel isDirty isDirty

public class Site Editor Contributor extends PDE Form Editor Contributor public Site Editor Contributor super Site NON NLS 1  SiteEditorContributor PDEFormEditorContributor SiteEditorContributor
protected boolean has Known Types Clipboard clipboard return true  hasKnownTypes

String category I Site Feature feature public Site Feature Adapter String category I Site Feature feature this category category this feature feature  ISiteFeature SiteFeatureAdapter ISiteFeature
see org eclipse pde core I Writable write java lang String java io Print Writer public void write String indent Print Writer writer feature write indent writer  IWritable PrintWriter PrintWriter

private boolean storage Model false param editor param input public Site Input Context PDE Form Editor editor I Editor Input input boolean primary super editor input primary create  storageModel SiteInputContext PDEFormEditor IEditorInput
protected I Base Model create Model I Editor Input input if input instanceof I File Editor Input return create Workspace Model I File Editor Input input if input instanceof System File Editor Input return create External Model System File Editor Input input if input instanceof I Storage Editor Input return create Storage Model I Storage Editor Input input return null  IBaseModel createModel IEditorInput IFileEditorInput createWorkspaceModel IFileEditorInput SystemFileEditorInput createExternalModel SystemFileEditorInput IStorageEditorInput createStorageModel IStorageEditorInput
private I Base Model create Workspace Model I File Editor Input input Input Stream stream null I File file input get File try stream file get Contents false catch Core Exception e PDE Plugin log Exception e return null I Site Model model new Workspace Site Model file try model load stream false catch Core Exception e I Path build Path file get Project get Full Path append PDE Core SITEBUILD DIR append PDE Core SITEBUILD PROPERTIES I File build File file get Workspace get Root get File build Path I Site Build Model build Model new Workspace Site Build Model build File try build Model load catch Core Exception e model set Build Model build Model try stream close catch IO Exception e PDE Plugin log Exception e return model  IBaseModel createWorkspaceModel IFileEditorInput InputStream IFile getFile getContents CoreException PDEPlugin logException ISiteModel WorkspaceSiteModel CoreException IPath buildPath getProject getFullPath PDECore SITEBUILD_DIR PDECore SITEBUILD_PROPERTIES IFile buildFile getWorkspace getRoot getFile buildPath ISiteBuildModel buildModel WorkspaceSiteBuildModel buildFile buildModel CoreException setBuildModel buildModel IOException PDEPlugin logException
public void dispose I Site Model model I Site Model get Model I Site Build Model build Model model get Build Model if storage Model model dispose if build Model null build Model dispose super dispose  ISiteModel ISiteModel getModel ISiteBuildModel buildModel getBuildModel storageModel buildModel buildModel
super dispose private I Base Model create External Model System File Editor Input input return null  IBaseModel createExternalModel SystemFileEditorInput
return null private I Base Model create Storage Model I Storage Editor Input input return null  IBaseModel createStorageModel IStorageEditorInput
protected void flush Model I Document doc if model is dirty flush its content into the document so that the source editor will pick up the changes if get Model instanceof I Editable return I Editable editable Model I Editable get Model if editable Model is Editable false return if editable Model is Dirty false return try String Writer swriter new String Writer Print Writer writer new Print Writer swriter editable Model save writer writer flush swriter close doc set swriter to String catch IO Exception e PDE Plugin log Exception e  flushModel IDocument getModel IEditable IEditable editableModel IEditable getModel editableModel isEditable editableModel isDirty StringWriter StringWriter PrintWriter PrintWriter editableModel toString IOException PDEPlugin logException
protected boolean synchronize Model I Document doc I Site Model model I Site Model get Model boolean clean Model true String text doc get try Input Stream stream new Byte Array Input Stream text get Bytes UTF8 NON NLS 1 try model reload stream false catch Core Exception e clean Model false try stream close catch IO Exception e catch Unsupported Encoding Exception e PDE Plugin log Exception e return clean Model  synchronizeModel IDocument ISiteModel ISiteModel getModel cleanModel InputStream ByteArrayInputStream getBytes CoreException cleanModel IOException UnsupportedEncodingException PDEPlugin logException cleanModel
see org eclipse pde internal ui neweditor Input Context get Id public String get Id return CONTEXT ID  InputContext getId getId CONTEXT_ID
org eclipse pde core I Model Changed Event protected void add Text Edit Operation Array List ops I Model Changed Event event  IModelChangedEvent addTextEditOperation ArrayList IModelChangedEvent
see org eclipse pde internal ui neweditor context XML Input Context reorder Insert Edits java util Array List protected void reorder Insert Edits Array List ops  XMLInputContext reorderInsertEdits ArrayList reorderInsertEdits ArrayList

public class Site Input Context Manager extends Input Context Manager public Site Input Context Manager PDE Form Editor editor super editor  SiteInputContextManager InputContextManager SiteInputContextManager PDEFormEditor
public I Base Model get Aggregate Model return find Site Model  IBaseModel getAggregateModel findSiteModel
private I Base Model find Site Model Input Context scontext find Context Site Input Context CONTEXT ID if scontext null return scontext get Model else return null  IBaseModel findSiteModel InputContext findContext SiteInputContext CONTEXT_ID getModel

public class Site Source Page extends XML Source Page public Site Source Page PDE Form Editor editor String id String title super editor id title  SiteSourcePage XMLSourcePage SiteSourcePage PDEFormEditor
super editor id title public I Content Outline Page create Content Outline Page return null  IContentOutlinePage createContentOutlinePage
return null protected I Label Provider create Outline Label Provider return null  ILabelProvider createOutlineLabelProvider
return null protected I Tree Content Provider create Outline Content Provider return null  ITreeContentProvider createOutlineContentProvider
return null protected void outline Selection Changed Selection Changed Event e  outlineSelectionChanged SelectionChangedEvent
protected I Content Outline Page create Outline Page TODO remove this method when the above three stubs are implemented return null  IContentOutlinePage createOutlinePage

public class Site Undo Manager extends Model Undo Manager public Site Undo Manager Site Editor editor super editor set Undo Level Limit 30  SiteUndoManager ModelUndoManager SiteUndoManager SiteEditor setUndoLevelLimit
public void connect I Model Change Provider provider I Site Model model I Site Model provider I Site Build Model build Model model get Build Model super connect provider super connect build Model  IModelChangeProvider ISiteModel ISiteModel ISiteBuildModel buildModel getBuildModel buildModel
public void disconnect I Model Change Provider provider I Site Model model I Site Model provider I Site Build Model build Model model get Build Model super disconnect provider super disconnect build Model  IModelChangeProvider ISiteModel ISiteModel ISiteBuildModel buildModel getBuildModel buildModel
protected String get Page Id Object obj return Features Page PAGE ID  getPageId FeaturesPage PAGE_ID
protected void execute I Model Changed Event event boolean undo I Model Change Provider model event get Change Provider Object elements event get Changed Objects int type event get Change Type String property Name event get Changed Property switch type case I Model Changed Event INSERT if undo execute Remove model elements else execute Add model elements break case I Model Changed Event REMOVE if undo execute Add model elements else execute Remove model elements break case I Model Changed Event CHANGE if undo execute Change elements 0 property Name event get New Value event get Old Value else execute Change elements 0 property Name event get Old Value event get New Value  IModelChangedEvent IModelChangeProvider getChangeProvider getChangedObjects getChangeType propertyName getChangedProperty IModelChangedEvent executeRemove executeAdd IModelChangedEvent executeAdd executeRemove IModelChangedEvent executeChange propertyName getNewValue getOldValue executeChange propertyName getOldValue getNewValue
private void execute Add I Model Change Provider model Object elements I Site Model site Model model instanceof I Site Model I Site Model model null I Site site site Model null site Model get Site null I Site Build site Build null I Site Build Model site Build Model null if site Model null site Build Model site Model get Build Model else if model instanceof I Site Build Model site Build Model I Site Build Model model if site Build Model null site Build site Build Model get Site Build try for int i 0 i elements length i Object element elements i if element instanceof I Site Feature site add Features new I Site Feature I Site Feature element else if element instanceof I Site Build Feature site Build add Features new I Site Build Feature I Site Build Feature element else if element instanceof I Site Archive site add Archives new I Site Archive I Site Archive element else if element instanceof I Site Category Definition site add Category Definitions new I Site Category Definition I Site Category Definition element else if element instanceof I Site Category I Site Category category I Site Category element I Site Feature feature I Site Feature category get Parent feature add Categories new I Site Category category catch Core Exception e PDE Plugin log Exception e  executeAdd IModelChangeProvider ISiteModel siteModel ISiteModel ISiteModel ISite siteModel siteModel getSite ISiteBuild siteBuild ISiteBuildModel siteBuildModel siteModel siteBuildModel siteModel getBuildModel ISiteBuildModel siteBuildModel ISiteBuildModel siteBuildModel siteBuild siteBuildModel getSiteBuild ISiteFeature addFeatures ISiteFeature ISiteFeature ISiteBuildFeature siteBuild addFeatures ISiteBuildFeature ISiteBuildFeature ISiteArchive addArchives ISiteArchive ISiteArchive ISiteCategoryDefinition addCategoryDefinitions ISiteCategoryDefinition ISiteCategoryDefinition ISiteCategory ISiteCategory ISiteCategory ISiteFeature ISiteFeature getParent addCategories ISiteCategory CoreException PDEPlugin logException
private void execute Remove I Model Change Provider model Object elements I Site Model site Model model instanceof I Site Model I Site Model model null I Site site site Model null site Model get Site null I Site Build site Build null I Site Build Model site Build Model null if site Model null site Build Model site Model get Build Model else if model instanceof I Site Build Model site Build Model I Site Build Model model if site Build Model null site Build site Build Model get Site Build try for int i 0 i elements length i Object element elements i if element instanceof I Site Feature site remove Features new I Site Feature I Site Feature element else if element instanceof I Site Build Feature site Build remove Features new I Site Build Feature I Site Build Feature element else if element instanceof I Site Archive site remove Archives new I Site Archive I Site Archive element else if element instanceof I Site Category Definition site remove Category Definitions new I Site Category Definition I Site Category Definition element else if element instanceof I Site Category I Site Category category I Site Category element I Site Feature feature I Site Feature category get Parent feature remove Categories new I Site Category category catch Core Exception e PDE Plugin log Exception e  executeRemove IModelChangeProvider ISiteModel siteModel ISiteModel ISiteModel ISite siteModel siteModel getSite ISiteBuild siteBuild ISiteBuildModel siteBuildModel siteModel siteBuildModel siteModel getBuildModel ISiteBuildModel siteBuildModel ISiteBuildModel siteBuildModel siteBuild siteBuildModel getSiteBuild ISiteFeature removeFeatures ISiteFeature ISiteFeature ISiteBuildFeature siteBuild removeFeatures ISiteBuildFeature ISiteBuildFeature ISiteArchive removeArchives ISiteArchive ISiteArchive ISiteCategoryDefinition removeCategoryDefinitions ISiteCategoryDefinition ISiteCategoryDefinition ISiteCategory ISiteCategory ISiteCategory ISiteFeature ISiteFeature getParent removeCategories ISiteCategory CoreException PDEPlugin logException
private void execute Change Object element String property Name Object old Value Object new Value if element instanceof Site Object Site Object sobj Site Object element try sobj restore Property property Name old Value new Value catch Core Exception e PDE Plugin log Exception e if element instanceof Site Build Object Site Build Object sobj Site Build Object element try sobj restore Property property Name old Value new Value catch Core Exception e PDE Plugin log Exception e  executeChange propertyName oldValue newValue SiteObject SiteObject SiteObject restoreProperty propertyName oldValue newValue CoreException PDEPlugin logException SiteBuildObject SiteBuildObject SiteBuildObject restoreProperty propertyName oldValue newValue CoreException PDEPlugin logException
public void model Changed I Model Changed Event event if event get Change Type I Model Changed Event CHANGE Object object event get Changed Objects 0 if object instanceof I Site Object I Site Object obj I Site Object object Ignore events from objects that are not yet in the model if obj instanceof I Site obj is In The Model return super model Changed event  modelChanged IModelChangedEvent getChangeType IModelChangedEvent getChangedObjects ISiteObject ISiteObject ISiteObject ISite isInTheModel modelChanged

public Source Outline Page I Editing Model model I Base Label Provider l Provider I Content Provider c Provider Viewer Sorter sorter super f Model model f Label Provider l Provider f Content Provider c Provider f Viewer Sorter sorter  SourceOutlinePage IEditingModel IBaseLabelProvider lProvider IContentProvider cProvider ViewerSorter fModel fLabelProvider lProvider fContentProvider cProvider fViewerSorter
Creates the control for this outline page public void create Control Composite parent super create Control parent Tree Viewer viewer get Tree Viewer viewer set Content Provider f Content Provider viewer set Label Provider f Label Provider viewer set Sorter f Viewer Sorter viewer set Input f Model viewer expand All  createControl createControl TreeViewer getTreeViewer setContentProvider fContentProvider setLabelProvider fLabelProvider setSorter fViewerSorter setInput fModel expandAll
see org eclipse ui views contentoutline Content Outline Page init org eclipse ui part I Page Site public void init I Page Site page Site super init page Site  ContentOutlinePage IPageSite IPageSite pageSite pageSite
public void make Contributions I Menu Manager menu Manager I Tool Bar Manager tool Bar Manager I Status Line Manager status Line Manager Create actions and contribute into the provided managers  makeContributions IMenuManager menuManager IToolBarManager toolBarManager IStatusLineManager statusLineManager
control get Display async Exec new Runnable public void run control set Redraw false get Tree Viewer refresh get Tree Viewer expand All control set Redraw true  getDisplay asyncExec setRedraw getTreeViewer getTreeViewer expandAll setRedraw
public void reconciled I Document document final Control control get Control if control null return control get Display async Exec new Runnable public void run control set Redraw false get Tree Viewer refresh get Tree Viewer expand All control set Redraw true  IDocument getControl getDisplay asyncExec setRedraw getTreeViewer getTreeViewer expandAll setRedraw

public class Storage Document Provider extends Stream Document Provider public Storage Document Provider I Document Partitioner partitioner this partitioner null  StorageDocumentProvider StreamDocumentProvider StorageDocumentProvider IDocumentPartitioner
public Storage Document Provider I Document Partitioner partitioner String encoding super partitioner encoding  StorageDocumentProvider IDocumentPartitioner
protected I Document create Document Object element throws Core Exception if element instanceof I Storage Editor Input I Document document create Empty Document I Document Partitioner part get Partitioner if part null part connect document document set Document Partitioner part I Storage storage I Storage Editor Input element get Storage set Document Content document storage return document return null  IDocument createDocument CoreException IStorageEditorInput IDocument createEmptyDocument IDocumentPartitioner getPartitioner setDocumentPartitioner IStorage IStorageEditorInput getStorage setDocumentContent
protected void set Document Content I Document document I Storage storage try Input Stream content Stream storage get Contents set Document Content document content Stream content Stream close catch Exception e PDE Plugin log Exception e  setDocumentContent IDocument IStorage InputStream contentStream getContents setDocumentContent contentStream contentStream PDEPlugin logException

private String enc public Stream Document Provider I Document Partitioner partitioner String encoding this partitioner partitioner this enc encoding  StreamDocumentProvider IDocumentPartitioner
protected I Document Partitioner get Partitioner return partitioner  IDocumentPartitioner getPartitioner
protected String get Encoding return enc  getEncoding
protected I Annotation Model create Annotation Model Object element throws Core Exception return null  IAnnotationModel createAnnotationModel CoreException
return null protected void do Save Document I Progress Monitor monitor Object element I Document document boolean force throws Core Exception  doSaveDocument IProgressMonitor IDocument CoreException
protected void do Save Document I Progress Monitor monitor Object element I Document document boolean force throws Core Exception protected void set Document Content I Document document Input Stream content Stream try Reader in if enc null in new Input Stream Reader content Stream else in new Input Stream Reader content Stream enc int chunk Size content Stream available String Buffer buffer new String Buffer chunk Size char read Buffer new char chunk Size int n in read read Buffer while n 0 buffer append read Buffer n in read read Buffer in close document set buffer to String catch IO Exception e PDE Plugin log Exception e  doSaveDocument IProgressMonitor IDocument CoreException setDocumentContent IDocument InputStream contentStream InputStreamReader contentStream InputStreamReader contentStream chunkSize contentStream StringBuffer StringBuffer chunkSize readBuffer chunkSize readBuffer readBuffer readBuffer toString IOException PDEPlugin logException
public long get Synchronization Stamp Object element return 0  getSynchronizationStamp
public long get Modification Stamp Object element return 0  getModificationStamp
public boolean is Deleted Object element return false  isDeleted
protected I Document create Empty Document return new Document  IDocument createEmptyDocument
see org eclipse ui texteditor Abstract Document Provider get Operation Runner org eclipse core runtime I Progress Monitor protected I Runnable Context get Operation Runner I Progress Monitor monitor TODO figure out what this method does return null  AbstractDocumentProvider getOperationRunner IProgressMonitor IRunnableContext getOperationRunner IProgressMonitor

protected Structured Viewer Part viewer Part Constructor for Structured Viewer Section param form Page public Structured Viewer Section PDE Form Page form Page Composite parent int style String button Labels super form Page parent style viewer Part create Viewer Part button Labels viewer Part set Minimum Size 50 50 Form Toolkit toolkit form Page get Managed Form get Toolkit toolkit create Composite Separator get Section create Client get Section toolkit  StructuredViewerPart viewerPart StructuredViewerSection formPage StructuredViewerSection PDEFormPage formPage buttonLabels formPage viewerPart createViewerPart buttonLabels viewerPart setMinimumSize FormToolkit formPage getManagedForm getToolkit createCompositeSeparator getSection createClient getSection
protected void create Viewer Part Control Composite parent int style int span Form Toolkit toolkit viewer Part create Control parent style span toolkit Menu Manager popup Menu Manager new Menu Manager I Menu Listener listener new I Menu Listener public void menu About To Show I Menu Manager mng fill Context Menu mng popup Menu Manager add Menu Listener listener popup Menu Manager set Remove All When Shown true Control control viewer Part get Control Menu menu popup Menu Manager create Context Menu control control set Menu menu  createViewerPartControl FormToolkit viewerPart createControl MenuManager popupMenuManager MenuManager IMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu popupMenuManager addMenuListener popupMenuManager setRemoveAllWhenShown viewerPart getControl popupMenuManager createContextMenu setMenu
protected Composite create Client Container Composite parent int span Form Toolkit toolkit Composite container toolkit create Composite parent Grid Layout layout new Grid Layout layout margin Width layout margin Height 2 layout num Columns span container set Layout layout return container  createClientContainer FormToolkit createComposite GridLayout GridLayout marginWidth marginHeight numColumns setLayout
protected abstract Structured Viewer Part create Viewer Part String button Labels  StructuredViewerPart createViewerPart buttonLabels
protected abstract Structured Viewer Part create Viewer Part String button Labels protected void fill Context Menu I Menu Manager manager  StructuredViewerPart createViewerPart buttonLabels fillContextMenu IMenuManager
protected void button Selected int index  buttonSelected
protected void do Paste I Selection selection get Viewer Selection I Structured Selection ssel I Structured Selection selection if ssel size 1 return Object target ssel get First Element Clipboard clipboard get Page getPDE Editor get Clipboard Model Data Transfer model Transfer Model Data Transfer get Instance Object objects Object clipboard get Contents model Transfer if objects null do Paste target objects  doPaste ISelection getViewerSelection IStructuredSelection IStructuredSelection getFirstElement getPage getPDEEditor getClipboard ModelDataTransfer modelTransfer ModelDataTransfer getInstance getContents modelTransfer doPaste
public boolean can Paste Clipboard clipboard I Selection selection get Viewer Selection I Structured Selection ssel I Structured Selection selection if ssel size 1 return false Object target ssel get First Element Model Data Transfer model Transfer Model Data Transfer get Instance Object objects Object clipboard get Contents model Transfer if objects null objects length 0 return can Paste target objects else return false  canPaste ISelection getViewerSelection IStructuredSelection IStructuredSelection getFirstElement ModelDataTransfer modelTransfer ModelDataTransfer getInstance getContents modelTransfer canPaste
else return false protected I Selection get Viewer Selection return viewer Part get Viewer get Selection  ISelection getViewerSelection viewerPart getViewer getSelection
return viewer Part get Viewer get Selection protected void do Paste Object target Object objects  viewerPart getViewer getSelection doPaste
protected boolean can Paste Object target Object objects return false  canPaste
return false public void set Focus viewer Part get Control set Focus  setFocus viewerPart getControl setFocus

public class System File Document Provider extends Stream Document Provider public System File Document Provider I Document Partitioner partitioner this partitioner null  SystemFileDocumentProvider StreamDocumentProvider SystemFileDocumentProvider IDocumentPartitioner
public System File Document Provider I Document Partitioner partitioner String encoding super partitioner encoding  SystemFileDocumentProvider IDocumentPartitioner
protected I Annotation Model create Annotation Model Object element throws Core Exception if element instanceof System File Editor Input System File Editor Input input System File Editor Input element File file File input get Adapter File class if file null return new System File Marker Annotation Model file return super create Annotation Model element  IAnnotationModel createAnnotationModel CoreException SystemFileEditorInput SystemFileEditorInput SystemFileEditorInput getAdapter SystemFileMarkerAnnotationModel createAnnotationModel
protected I Document create Document Object element throws Core Exception if element instanceof System File Editor Input I Document document create Empty Document I Document Partitioner part get Partitioner if part null part connect document document set Document Partitioner part File file File System File Editor Input element get Adapter File class set Document Content document file return document return null  IDocument createDocument CoreException SystemFileEditorInput IDocument createEmptyDocument IDocumentPartitioner getPartitioner setDocumentPartitioner SystemFileEditorInput getAdapter setDocumentContent
protected void do Save Document I Progress Monitor monitor Object element I Document document boolean force throws Core Exception  doSaveDocument IProgressMonitor IDocument CoreException
protected void set Document Content I Document document File file try Input Stream content Stream new File Input Stream file set Document Content document content Stream content Stream close catch IO Exception e PDE Plugin log Exception e  setDocumentContent IDocument InputStream contentStream FileInputStream setDocumentContent contentStream contentStream IOException PDEPlugin logException

private static final String FACTORY ID PDE Plugin get Plugin Id system File Editor Input Factory NON NLS 1 public System File Editor Input File file storage new System File Storage file  FACTORY_ID PDEPlugin getPluginId systemFileEditorInputFactory SystemFileEditorInput SystemFileStorage
storage new System File Storage file public boolean exists return storage get File exists  SystemFileStorage getFile
public Object get Adapter Class adapter if adapter equals File class return storage get File return null  getAdapter getFile
return null public Image Descriptor get Image Descriptor return null  ImageDescriptor getImageDescriptor
return null public String get Name return storage get File get Name  getName getFile getName
return storage get File get Name public I Persistable Element get Persistable return this  getFile getName IPersistableElement getPersistable
return this public void save State I Memento memento memento put String path storage get File get Absolute Path NON NLS 1  saveState IMemento putString getFile getAbsolutePath
memento put String path storage get File get Absolute Path NON NLS 1 public String get Factory Id return FACTORY ID  putString getFile getAbsolutePath getFactoryId FACTORY_ID
return FACTORY ID public I Storage get Storage return storage  FACTORY_ID IStorage getStorage
return storage public String get Tool Tip Text return storage get File get Absolute Path  getToolTipText getFile getAbsolutePath
return storage get File get Absolute Path public boolean equals Object object return object instanceof System File Editor Input get Storage equals System File Editor Input object get Storage  getFile getAbsolutePath SystemFileEditorInput getStorage SystemFileEditorInput getStorage
public int hash Code return get Storage hash Code  hashCode getStorage hashCode

public class System File Editor Input Factory implements I Element Factory The constructor public System File Editor Input Factory  SystemFileEditorInputFactory IElementFactory SystemFileEditorInputFactory
public I Adaptable create Element I Memento memento String path memento get String path NON NLS 1 File file new File path System File Editor Input input new System File Editor Input file return input  IAdaptable createElement IMemento getString SystemFileEditorInput SystemFileEditorInput

public void resource Changed I Resource Change Event e I Resource Delta delta e get Delta try if delta null delta accept f Resource Delta Visitor catch Core Exception x PDE Plugin log Exception x  resourceChanged IResourceChangeEvent IResourceDelta getDelta fResourceDeltaVisitor CoreException PDEPlugin logException
public boolean visit I Resource Delta delta throws Core Exception if delta null f Resource equals delta get Resource update delta get Marker Deltas return false return true  IResourceDelta CoreException fResource getResource getMarkerDeltas
Creates a marker annotation model with the given resource as the source of the markers param resource the resource public System File Marker Annotation Model File file f Workspace PDE Plugin get Workspace f Resource f Workspace get Root this file file  SystemFileMarkerAnnotationModel fWorkspace PDEPlugin getWorkspace fResource fWorkspace getRoot
protected boolean is Acceptable I Marker marker if marker null return false if f Resource equals marker get Resource return false check extra fields try String path String marker get Attribute IPDEUI Constants MARKER SYSTEM FILE PATH if path null return false return path equals file get Path catch Core Exception e return false  isAcceptable IMarker fResource getResource getAttribute IPDEUIConstants MARKER_SYSTEM_FILE_PATH getPath CoreException
Updates this model to the given marker deltas param marker Deltas the list of marker deltas private void update I Marker Delta marker Deltas if marker Deltas length 0 return for int i 0 i marker Deltas length i I Marker Delta delta marker Deltas i switch delta get Kind case I Resource Delta ADDED add Marker Annotation delta get Marker break case I Resource Delta REMOVED remove Marker Annotation delta get Marker break case I Resource Delta CHANGED modify Marker Annotation delta get Marker break fire Model Changed  markerDeltas IMarkerDelta markerDeltas markerDeltas markerDeltas IMarkerDelta markerDeltas getKind IResourceDelta addMarkerAnnotation getMarker IResourceDelta removeMarkerAnnotation getMarker IResourceDelta modifyMarkerAnnotation getMarker fireModelChanged
protected void listen To Marker Changes boolean listen if listen f Workspace add Resource Change Listener f Resource Change Listener else f Workspace remove Resource Change Listener f Resource Change Listener  listenToMarkerChanges fWorkspace addResourceChangeListener fResourceChangeListener fWorkspace removeResourceChangeListener fResourceChangeListener
f Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i markers length i markers i delete  fWorkspace IWorkspaceRunnable IProgressMonitor CoreException
protected void delete Markers final I Marker markers throws Core Exception f Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i markers length i markers i delete null  deleteMarkers IMarker CoreException fWorkspace IWorkspaceRunnable IProgressMonitor CoreException
protected I Marker retrieve Markers throws Core Exception I Marker markers f Resource find Markers I Marker MARKER true I Resource DEPTH ZERO if markers length 0 return markers Array List result new Array List for int i 0 i markers length i I Marker marker markers i String path String marker get Attribute IPDEUI Constants MARKER SYSTEM FILE PATH if path null path equals file get Path result add marker return I Marker result to Array new I Marker result size  IMarker retrieveMarkers CoreException IMarker fResource findMarkers IMarker IResource DEPTH_ZERO ArrayList ArrayList IMarker getAttribute IPDEUIConstants MARKER_SYSTEM_FILE_PATH getPath IMarker toArray IMarker
Returns the resource serving as the source of markers for this annotation model return the resource serving as the source of markers for this annotation model since 2 0 protected I Resource get Resource return f Resource  IResource getResource fResource

private File file Constructor for System File Storage public System File Storage File file this file file  SystemFileStorage SystemFileStorage
public File get File return file  getFile
public Input Stream get Contents throws Core Exception try return new File Input Stream file catch File Not Found Exception e I Status status new Status I Status ERROR PDE Plugin get Plugin Id I Status OK null e throw new Core Exception status  InputStream getContents CoreException FileInputStream FileNotFoundException IStatus IStatus PDEPlugin getPluginId IStatus CoreException
public I Path get Full Path return new Path file get Absolute Path  IPath getFullPath getAbsolutePath
return new Path file get Absolute Path public String get Name return file get Name  getAbsolutePath getName getName
return file get Name public boolean is Read Only return true  getName isReadOnly
public boolean equals Object object return object instanceof System File Storage get File equals System File Storage object get File  SystemFileStorage getFile SystemFileStorage getFile
public int hash Code return get File hash Code  hashCode getFile hashCode

protected boolean handle Default Button true class Part Adapter extends Editable Table Part public Part Adapter String button Labels super button Labels  handleDefaultButton PartAdapter EditableTablePart PartAdapter buttonLabels buttonLabels
super button Labels public void entry Modified Object entry String value Table Section this entry Modified entry value  buttonLabels entryModified TableSection entryModified
Table Section this entry Modified entry value public void selection Changed I Structured Selection selection get Managed Form fire Selection Changed Table Section this selection Table Section this selection Changed selection  TableSection entryModified selectionChanged IStructuredSelection getManagedForm fireSelectionChanged TableSection TableSection selectionChanged
Table Section this selection Changed selection public void handle Double Click I Structured Selection selection Table Section this handle Double Click selection  TableSection selectionChanged handleDoubleClick IStructuredSelection TableSection handleDoubleClick
public void button Selected Button button int index Table Section this button Selected index if handle Default Button button get Shell set Default Button null  buttonSelected TableSection buttonSelected handleDefaultButton getShell setDefaultButton
button get Shell set Default Button null protected void create Buttons Composite parent Form Toolkit toolkit super create Buttons parent toolkit enable Buttons  getShell setDefaultButton createButtons FormToolkit createButtons enableButtons
Constructor for Table Section param form Page public Table Section PDE Form Page form Page Composite parent int style String button Labels super form Page parent style button Labels  TableSection formPage TableSection PDEFormPage formPage buttonLabels formPage buttonLabels
super form Page parent style button Labels protected Structured Viewer Part create Viewer Part String button Labels return new Part Adapter button Labels  formPage buttonLabels StructuredViewerPart createViewerPart buttonLabels PartAdapter buttonLabels
return new Part Adapter button Labels protected I Action get Rename Action return get Table Part get Rename Action  PartAdapter buttonLabels IAction getRenameAction getTablePart getRenameAction
return get Table Part get Rename Action protected Editable Table Part get Table Part return Editable Table Part viewer Part  getTablePart getRenameAction EditableTablePart getTablePart EditableTablePart viewerPart
return Editable Table Part viewer Part protected void entry Modified Object entry String value  EditableTablePart viewerPart entryModified
protected void entry Modified Object entry String value protected void selection Changed I Structured Selection selection  entryModified selectionChanged IStructuredSelection
protected void selection Changed I Structured Selection selection protected void handle Double Click I Structured Selection selection  selectionChanged IStructuredSelection handleDoubleClick IStructuredSelection
protected void handle Double Click I Structured Selection selection protected void enable Buttons  handleDoubleClick IStructuredSelection enableButtons

public String get Hover Info I Source Viewer source Viewer int line Number String messages get Messages For Line source Viewer line Number if messages length 0 return null String Buffer buffer new String Buffer for int i 0 i messages length i buffer append messages i if i messages length 1 buffer append System get Property line separator NON NLS 1 return buffer to String  getHoverInfo ISourceViewer sourceViewer lineNumber getMessagesForLine sourceViewer lineNumber StringBuffer StringBuffer getProperty toString
private String get Messages For Line I Source Viewer viewer int line I Document document viewer get Document I Annotation Model model viewer get Annotation Model if model null return new String 0 Array List messages new Array List Iterator iter model get Annotation Iterator while iter has Next Object object iter next if object instanceof Marker Annotation Marker Annotation annotation Marker Annotation object if compare Ruler Line model get Position annotation document line I Marker marker annotation get Marker String message marker get Attribute I Marker MESSAGE String null if message null message trim length 0 messages add message return String messages to Array new String messages size  getMessagesForLine ISourceViewer IDocument getDocument IAnnotationModel getAnnotationModel ArrayList ArrayList getAnnotationIterator hasNext MarkerAnnotation MarkerAnnotation MarkerAnnotation compareRulerLine getPosition IMarker getMarker getAttribute IMarker toArray
private boolean compare Ruler Line Position position I Document document int line try if position get Offset 1 position get Length 1 return document get Line Of Offset position get Offset line catch Bad Location Exception e return false  compareRulerLine IDocument getOffset getLength getLineOfOffset getOffset BadLocationException

private static int counter 0 public Color Manager initialize counter  ColorManager
public static void initialize Defaults I Preference Store store Preference Converter set Default store P DEFAULT DEFAULT Preference Converter set Default store P PROC INSTR PROC INSTR Preference Converter set Default store P STRING STRING Preference Converter set Default store P TAG TAG Preference Converter set Default store P XML COMMENT XML COMMENT  initializeDefaults IPreferenceStore PreferenceConverter setDefault P_DEFAULT PreferenceConverter setDefault P_PROC_INSTR PROC_INSTR PreferenceConverter setDefault P_STRING PreferenceConverter setDefault P_TAG PreferenceConverter setDefault P_XML_COMMENT XML_COMMENT
private void initialize I Preference Store pstore PDE Plugin get Default get Preference Store put Color pstore P DEFAULT put Color pstore P PROC INSTR put Color pstore P STRING put Color pstore P TAG put Color pstore P XML COMMENT  IPreferenceStore PDEPlugin getDefault getPreferenceStore putColor P_DEFAULT putColor P_PROC_INSTR putColor P_STRING putColor P_TAG putColor P_XML_COMMENT
public void dispose counter if counter 0 Iterator e f Color Table values iterator while e has Next Color e next dispose  fColorTable hasNext
private void put Color I Preference Store pstore String property RGB setting Preference Converter get Color pstore property Color color new Color Display get Current setting f Color Table put property color  putColor IPreferenceStore PreferenceConverter getColor getCurrent fColorTable
public Color get Color String key Color color Color f Color Table get key if color null color Display get Current get System Color SWT COLOR LIST FOREGROUND return color  getColor fColorTable getCurrent getSystemColor COLOR_LIST_FOREGROUND

public interface I Color Manager void dispose  IColorManager
void dispose Color get Color String key  getColor

public interface I Reconciling Participant void reconciled I Document document  IReconcilingParticipant IDocument

Constructor for Non Rule Based Damager Repairer public Non Rule Based Damager Repairer Text Attribute default Text Attribute Assert is Not Null default Text Attribute f Default Text Attribute default Text Attribute  NonRuleBasedDamagerRepairer NonRuleBasedDamagerRepairer TextAttribute defaultTextAttribute isNotNull defaultTextAttribute fDefaultTextAttribute defaultTextAttribute
see I Presentation Repairer set Document I Document public void set Document I Document document f Document document  IPresentationRepairer setDocument IDocument setDocument IDocument fDocument
Returns the end offset of the line that contains the specified offset or if the offset is inside a line delimiter the end offset of the next line param offset the offset whose line end offset must be computed return the line end offset for the given offset exception Bad Location Exception if offset is invalid in the current document protected int end Of Line Of int offset throws Bad Location Exception I Region info f Document get Line Information Of Offset offset if offset info get Offset info get Length return info get Offset info get Length int line f Document get Line Of Offset offset try info f Document get Line Information line 1 return info get Offset info get Length catch Bad Location Exception x return f Document get Length  BadLocationException endOfLineOf BadLocationException IRegion fDocument getLineInformationOfOffset getOffset getLength getOffset getLength fDocument getLineOfOffset fDocument getLineInformation getOffset getLength BadLocationException fDocument getLength
see I Presentation Damager get Damage Region I Typed Region Document Event boolean public I Region get Damage Region I Typed Region partition Document Event event boolean document Partitioning Changed if document Partitioning Changed try I Region info f Document get Line Information Of Offset event get Offset int start Math max partition get Offset info get Offset int end event get Offset event get Text null event get Length event get Text length if info get Offset end end info get Offset info get Length optimize the case of the same line end info get Offset info get Length else end end Of Line Of end end Math min partition get Offset partition get Length end return new Region start end start catch Bad Location Exception x return partition  IPresentationDamager getDamageRegion ITypedRegion DocumentEvent IRegion getDamageRegion ITypedRegion DocumentEvent documentPartitioningChanged documentPartitioningChanged IRegion fDocument getLineInformationOfOffset getOffset getOffset getOffset getOffset getText getLength getText getOffset getOffset getLength getOffset getLength endOfLineOf getOffset getLength BadLocationException
see I Presentation Repairer create Presentation Text Presentation I Typed Region public void create Presentation Text Presentation presentation I Typed Region region add Range presentation region get Offset region get Length f Default Text Attribute  IPresentationRepairer createPresentation TextPresentation ITypedRegion createPresentation TextPresentation ITypedRegion addRange getOffset getLength fDefaultTextAttribute
Adds style information to the given text presentation param presentation the text presentation to be extended param offset the offset of the range to be styled param length the length of the range to be styled param attr the attribute describing the style of the range to be styled protected void add Range Text Presentation presentation int offset int length Text Attribute attr if attr null presentation add Style Range new Style Range offset length attr get Foreground attr get Background attr get Style  addRange TextPresentation TextAttribute addStyleRange StyleRange getForeground getBackground getStyle

private Array List f Participants new Array List public Reconciling Strategy  ArrayList fParticipants ArrayList ReconcilingStrategy
see org eclipse jface text reconciler I Reconciling Strategy set Document org eclipse jface text I Document public void set Document I Document document f Document document  IReconcilingStrategy setDocument IDocument setDocument IDocument fDocument
public void reconcile Dirty Region dirty Region I Region sub Region if f Document null return notify Participants  DirtyRegion dirtyRegion IRegion subRegion fDocument notifyParticipants
public void reconcile I Region partition if f Document null return notify Participants  IRegion fDocument notifyParticipants
private synchronized void notify Participants for int i 0 i f Participants size i I Reconciling Participant f Participants get i reconciled f Document  notifyParticipants fParticipants IReconcilingParticipant fParticipants fDocument
public void add Participant I Reconciling Participant participant f Participants add participant  addParticipant IReconcilingParticipant fParticipants
public void remove Participant I Reconciling Participant participant f Participants remove participant  removeParticipant IReconcilingParticipant fParticipants

public abstract class Text Util public static String create Multi Line String text int limit return create Multi Line text limit false  TextUtil createMultiLine createMultiLine
public static String create Multi Line String text int limit boolean ignore New Line String Buffer buffer new String Buffer int counter 0 boolean preformatted false for int i 0 i text length i char c text char At i counter if c if is Pre Start text i preformatted true else if is Pre End text i preformatted false else if is Paragraph text i buffer append n p n NON NLS 1 counter 0 i 2 continue if preformatted if c n counter 0 buffer append c continue if Character is Whitespace c if counter 1 counter 0 continue skip else if counter limit buffer append n counter 0 i continue if c n if ignore New Line c else counter 0 buffer append c return buffer to String  createMultiLine ignoreNewLine StringBuffer StringBuffer charAt isPreStart isPreEnd isParagraph isWhitespace ignoreNewLine toString
private static boolean is Paragraph String text int loc if text char At loc return false if loc 2 text length return false if text char At loc 1 p return false if text char At loc 2 return false return true  isParagraph charAt charAt charAt
private static boolean is Pre End String text int loc if text char At loc return false if loc 5 text length return false if text char At loc 1 return false if text char At loc 2 p return false if text char At loc 3 r return false if text char At loc 4 e return false if text char At loc 5 return false return true  isPreEnd charAt charAt charAt charAt charAt charAt
private static boolean is Pre Start String text int loc if text char At loc return false if loc 4 text length return false if text char At loc 1 p return false if text char At loc 2 r return false if text char At loc 3 e return false if text char At loc 4 return false return true  isPreStart charAt charAt charAt charAt charAt

public XML Comment Scanner I Color Manager manager I Token comment new Token new Token manager get Color IPDE Color Constants P XML COMMENT List rules new Array List Add rule for comments rules add new Multi Line Rule comment NON NLS 1 NON NLS 2 I Rule result new I Rule rules size rules to Array result set Rules result  XMLCommentScanner IColorManager IToken getColor IPDEColorConstants P_XML_COMMENT ArrayList MultiLineRule IRule IRule toArray setRules

public XML Partition Scanner I Predicate Rule rules new I Predicate Rule 2 rules 0 new Multi Line Rule new Token XML COMMENT NON NLS 1 NON NLS 2 rules 1 new XML Tag Rule new Token XML TAG set Predicate Rules rules  XMLPartitionScanner IPredicateRule IPredicateRule MultiLineRule XML_COMMENT XMLTagRule XML_TAG setPredicateRules

public XML Scanner I Color Manager manager I Token proc Instr new Token new Text Attribute manager get Color IPDE Color Constants P PROC INSTR I Rule rules new I Rule 2 Add rule for processing instructions rules 0 new Single Line Rule proc Instr NON NLS 1 NON NLS 2 Add generic whitespace rule rules 1 new Whitespace Rule new XML Whitespace Detector set Rules rules  XMLScanner IColorManager IToken procInstr TextAttribute getColor IPDEColorConstants P_PROC_INSTR IRule IRule SingleLineRule procInstr WhitespaceRule XMLWhitespaceDetector setRules

private Mono Reconciler f Reconciler public XML Source Viewer Configuration XML Source Page page I Color Manager color Manager f Source Page page set Color Manager color Manager  MonoReconciler fReconciler XMLSourceViewerConfiguration XMLSourcePage IColorManager colorManager fSourcePage setColorManager colorManager
public void set Color Manager I Color Manager color Manager f Color Manager color Manager  setColorManager IColorManager colorManager fColorManager colorManager
public String get Configured Content Types I Source Viewer source Viewer return new String I Document DEFAULT CONTENT TYPE XML Partition Scanner XML COMMENT XML Partition Scanner XML TAG  getConfiguredContentTypes ISourceViewer sourceViewer IDocument DEFAULT_CONTENT_TYPE XMLPartitionScanner XML_COMMENT XMLPartitionScanner XML_TAG
public I Text Double Click Strategy get Double Click Strategy I Source Viewer source Viewer String content Type if f Double Click Strategy null f Double Click Strategy new XML Double Click Strategy return f Double Click Strategy  ITextDoubleClickStrategy getDoubleClickStrategy ISourceViewer sourceViewer contentType fDoubleClickStrategy fDoubleClickStrategy XMLDoubleClickStrategy fDoubleClickStrategy
protected XML Scanner getPDE Scanner if f Pde Scanner null f Pde Scanner new XML Scanner f Color Manager f Pde Scanner set Default Return Token new Token new Text Attribute f Color Manager get Color IPDE Color Constants P DEFAULT return f Pde Scanner  XMLScanner getPDEScanner fPdeScanner fPdeScanner XMLScanner fColorManager fPdeScanner setDefaultReturnToken TextAttribute fColorManager getColor IPDEColorConstants P_DEFAULT fPdeScanner
protected XML Tag Scanner getPDE Tag Scanner if f Tag Scanner null f Tag Scanner new XML Tag Scanner f Color Manager f Tag Scanner set Default Return Token new Token new Text Attribute f Color Manager get Color IPDE Color Constants P TAG return f Tag Scanner  XMLTagScanner getPDETagScanner fTagScanner fTagScanner XMLTagScanner fColorManager fTagScanner setDefaultReturnToken TextAttribute fColorManager getColor IPDEColorConstants P_TAG fTagScanner
public I Presentation Reconciler get Presentation Reconciler I Source Viewer source Viewer Presentation Reconciler reconciler new Presentation Reconciler Default Damager Repairer dr new Default Damager Repairer getPDE Scanner reconciler set Damager dr I Document DEFAULT CONTENT TYPE reconciler set Repairer dr I Document DEFAULT CONTENT TYPE dr new Default Damager Repairer getPDE Tag Scanner reconciler set Damager dr XML Partition Scanner XML TAG reconciler set Repairer dr XML Partition Scanner XML TAG Non Rule Based Damager Repairer ndr new Non Rule Based Damager Repairer new Text Attribute f Color Manager get Color IPDE Color Constants P XML COMMENT reconciler set Damager ndr XML Partition Scanner XML COMMENT reconciler set Repairer ndr XML Partition Scanner XML COMMENT return reconciler  IPresentationReconciler getPresentationReconciler ISourceViewer sourceViewer PresentationReconciler PresentationReconciler DefaultDamagerRepairer DefaultDamagerRepairer getPDEScanner setDamager IDocument DEFAULT_CONTENT_TYPE setRepairer IDocument DEFAULT_CONTENT_TYPE DefaultDamagerRepairer getPDETagScanner setDamager XMLPartitionScanner XML_TAG setRepairer XMLPartitionScanner XML_TAG NonRuleBasedDamagerRepairer NonRuleBasedDamagerRepairer TextAttribute fColorManager getColor IPDEColorConstants P_XML_COMMENT setDamager XMLPartitionScanner XML_COMMENT setRepairer XMLPartitionScanner XML_COMMENT
public I Annotation Hover get Annotation Hover I Source Viewer source Viewer if f Annotation Hover null f Annotation Hover new Annotation Hover return f Annotation Hover  IAnnotationHover getAnnotationHover ISourceViewer sourceViewer fAnnotationHover fAnnotationHover AnnotationHover fAnnotationHover
public I Reconciler get Reconciler I Source Viewer source Viewer if f Reconciler null I Base Model model f Source Page get Input Context get Model if model instanceof I Reconciling Participant Reconciling Strategy strategy new Reconciling Strategy strategy add Participant I Reconciling Participant model if f Source Page get Content Outline instanceof I Reconciling Participant strategy add Participant I Reconciling Participant f Source Page get Content Outline f Reconciler new Mono Reconciler strategy false f Reconciler set Delay 500 return f Reconciler  IReconciler getReconciler ISourceViewer sourceViewer fReconciler IBaseModel fSourcePage getInputContext getModel IReconcilingParticipant ReconcilingStrategy ReconcilingStrategy addParticipant IReconcilingParticipant fSourcePage getContentOutline IReconcilingParticipant addParticipant IReconcilingParticipant fSourcePage getContentOutline fReconciler MonoReconciler fReconciler setDelay fReconciler
public I Color Manager get Color Manager return f Color Manager  IColorManager getColorManager fColorManager

public class XML Tag Rule extends Multi Line Rule public XML Tag Rule I Token token super token NON NLS 1 NON NLS 2  XMLTagRule MultiLineRule XMLTagRule IToken
protected boolean sequence Detected I Character Scanner scanner char sequence boolean eof Allowed int c scanner read if sequence 0 if c processing instruction abort scanner unread return false if c scanner unread comment abort return false else if sequence 0 scanner unread return super sequence Detected scanner sequence eof Allowed  sequenceDetected ICharacterScanner eofAllowed sequenceDetected eofAllowed

public XML Tag Scanner I Color Manager manager I Token string new Token new Text Attribute manager get Color IPDE Color Constants P STRING I Rule rules new I Rule 3 Add rule for single and double quotes rules 0 new Single Line Rule string NON NLS 1 NON NLS 2 rules 1 new Single Line Rule string NON NLS 1 NON NLS 2 Add generic whitespace rule rules 2 new Whitespace Rule new XML Whitespace Detector set Rules rules  XMLTagScanner IColorManager IToken TextAttribute getColor IPDEColorConstants P_STRING IRule IRule SingleLineRule SingleLineRule WhitespaceRule XMLWhitespaceDetector setRules

public class XML Whitespace Detector implements I Whitespace Detector public boolean is Whitespace char c return c c t c n c r  XMLWhitespaceDetector IWhitespaceDetector isWhitespace

protected boolean handle Default Button true class Part Adapter extends Tree Part public Part Adapter String button Labels super button Labels  handleDefaultButton PartAdapter TreePart PartAdapter buttonLabels buttonLabels
super button Labels public void selection Changed I Structured Selection selection get Managed Form fire Selection Changed Tree Section this selection Tree Section this selection Changed selection  buttonLabels selectionChanged IStructuredSelection getManagedForm fireSelectionChanged TreeSection TreeSection selectionChanged
Tree Section this selection Changed selection public void handle Double Click I Structured Selection selection Tree Section this handle Double Click selection  TreeSection selectionChanged handleDoubleClick IStructuredSelection TreeSection handleDoubleClick
public void button Selected Button button int index Tree Section this button Selected index if handle Default Button button get Shell set Default Button null  buttonSelected TreeSection buttonSelected handleDefaultButton getShell setDefaultButton
button get Shell set Default Button null protected void create Buttons Composite parent Form Toolkit toolkit super create Buttons parent toolkit enable Buttons  getShell setDefaultButton createButtons FormToolkit createButtons enableButtons
Constructor for Table Section param form Page public Tree Section PDE Form Page form Page Composite parent int style String button Labels super form Page parent style button Labels  TableSection formPage TreeSection PDEFormPage formPage buttonLabels formPage buttonLabels
protected Structured Viewer Part create Viewer Part String button Labels return new Part Adapter button Labels  StructuredViewerPart createViewerPart buttonLabels PartAdapter buttonLabels
protected Tree Part get Tree Part return Tree Part viewer Part  TreePart getTreePart TreePart viewerPart
protected void selection Changed I Structured Selection selection  selectionChanged IStructuredSelection
protected void selection Changed I Structured Selection selection protected void handle Double Click I Structured Selection selection  selectionChanged IStructuredSelection handleDoubleClick IStructuredSelection
protected void handle Double Click I Structured Selection selection protected void enable Buttons  handleDoubleClick IStructuredSelection enableButtons

private I Color Manager color Manager public XML Configuration I Color Manager color Manager set Color Manager color Manager  IColorManager colorManager XMLConfiguration IColorManager colorManager setColorManager colorManager
public void set Color Manager I Color Manager color Manager this color Manager color Manager  setColorManager IColorManager colorManager colorManager colorManager
public String get Configured Content Types I Source Viewer source Viewer return new String I Document DEFAULT CONTENT TYPE XML Partition Scanner XML COMMENT XML Partition Scanner XML TAG  getConfiguredContentTypes ISourceViewer sourceViewer IDocument DEFAULT_CONTENT_TYPE XMLPartitionScanner XML_COMMENT XMLPartitionScanner XML_TAG
public I Text Double Click Strategy get Double Click Strategy I Source Viewer source Viewer String content Type if double Click Strategy null double Click Strategy new XML Double Click Strategy return double Click Strategy  ITextDoubleClickStrategy getDoubleClickStrategy ISourceViewer sourceViewer contentType doubleClickStrategy doubleClickStrategy XMLDoubleClickStrategy doubleClickStrategy
protected XML Scanner getPDE Scanner if pde Scanner null pde Scanner new XML Scanner color Manager pde Scanner set Default Return Token new Token new Text Attribute color Manager get Color IPDE Color Constants P DEFAULT return pde Scanner  XMLScanner getPDEScanner pdeScanner pdeScanner XMLScanner colorManager pdeScanner setDefaultReturnToken TextAttribute colorManager getColor IPDEColorConstants P_DEFAULT pdeScanner
protected XML Tag Scanner getPDE Tag Scanner if tag Scanner null tag Scanner new XML Tag Scanner color Manager tag Scanner set Default Return Token new Token new Text Attribute color Manager get Color IPDE Color Constants P TAG return tag Scanner  XMLTagScanner getPDETagScanner tagScanner tagScanner XMLTagScanner colorManager tagScanner setDefaultReturnToken TextAttribute colorManager getColor IPDEColorConstants P_TAG tagScanner
public I Presentation Reconciler get Presentation Reconciler I Source Viewer source Viewer Presentation Reconciler reconciler new Presentation Reconciler Default Damager Repairer dr new Default Damager Repairer getPDE Scanner reconciler set Damager dr I Document DEFAULT CONTENT TYPE reconciler set Repairer dr I Document DEFAULT CONTENT TYPE dr new Default Damager Repairer getPDE Tag Scanner reconciler set Damager dr XML Partition Scanner XML TAG reconciler set Repairer dr XML Partition Scanner XML TAG Non Rule Based Damager Repairer ndr new Non Rule Based Damager Repairer new Text Attribute color Manager get Color IPDE Color Constants P XML COMMENT reconciler set Damager ndr XML Partition Scanner XML COMMENT reconciler set Repairer ndr XML Partition Scanner XML COMMENT return reconciler  IPresentationReconciler getPresentationReconciler ISourceViewer sourceViewer PresentationReconciler PresentationReconciler DefaultDamagerRepairer DefaultDamagerRepairer getPDEScanner setDamager IDocument DEFAULT_CONTENT_TYPE setRepairer IDocument DEFAULT_CONTENT_TYPE DefaultDamagerRepairer getPDETagScanner setDamager XMLPartitionScanner XML_TAG setRepairer XMLPartitionScanner XML_TAG NonRuleBasedDamagerRepairer NonRuleBasedDamagerRepairer TextAttribute colorManager getColor IPDEColorConstants P_XML_COMMENT setDamager XMLPartitionScanner XML_COMMENT setRepairer XMLPartitionScanner XML_COMMENT
public I Annotation Hover get Annotation Hover I Source Viewer source Viewer return new Annotation Hover  IAnnotationHover getAnnotationHover ISourceViewer sourceViewer AnnotationHover
public I Color Manager get Color Manager return color Manager  IColorManager getColorManager colorManager

protected I Text Viewer f Text public XML Double Click Strategy super  ITextViewer fText XMLDoubleClickStrategy
public void double Clicked I Text Viewer part int pos part get Selected Range x if pos 0 return f Text part if select Comment pos select Word pos  doubleClicked ITextViewer getSelectedRange fText selectComment selectWord
protected boolean select Comment int caret Pos I Document doc f Text get Document int start Pos end Pos try int pos caret Pos char c while pos 0 c doc get Char pos if c pos 2 continue if c Character LINE SEPARATOR c break pos if c return false start Pos pos pos caret Pos int length doc get Length c while pos length c doc get Char pos if c Character LINE SEPARATOR c break pos if c return false end Pos pos int offset start Pos 1 int len end Pos offset f Text set Selected Range offset len return true catch Bad Location Exception x return false  selectComment caretPos IDocument fText getDocument startPos endPos caretPos getChar LINE_SEPARATOR startPos caretPos getLength getChar LINE_SEPARATOR endPos startPos endPos fText setSelectedRange BadLocationException
protected boolean select Word int caret Pos I Document doc f Text get Document int start Pos end Pos try int pos caret Pos char c while pos 0 c doc get Char pos if Character is Java Identifier Part c break pos start Pos pos pos caret Pos int length doc get Length while pos length c doc get Char pos if Character is Java Identifier Part c break pos end Pos pos select Range start Pos end Pos return true catch Bad Location Exception x return false  selectWord caretPos IDocument fText getDocument startPos endPos caretPos getChar isJavaIdentifierPart startPos caretPos getLength getChar isJavaIdentifierPart endPos selectRange startPos endPos BadLocationException
private void select Range int start Pos int stop Pos int offset start Pos 1 int length stop Pos offset f Text set Selected Range offset length  selectRange startPos stopPos startPos stopPos fText setSelectedRange

protected I Color Manager color Manager param editor param id param title public XML Source Page PDE Form Editor editor String id String title super editor id title set Source Viewer Configuration createXML Configuration set Range Indicator new Default Range Indicator  IColorManager colorManager XMLSourcePage PDEFormEditor setSourceViewerConfiguration createXMLConfiguration setRangeIndicator DefaultRangeIndicator
protected XML Source Viewer Configuration createXML Configuration if color Manager null color Manager dispose color Manager new Color Manager return new XML Source Viewer Configuration this color Manager  XMLSourceViewerConfiguration createXMLConfiguration colorManager colorManager colorManager ColorManager XMLSourceViewerConfiguration colorManager
public void dispose color Manager dispose super dispose  colorManager
public boolean can Leave The Page boolean clean Model get Input Context is Model Correct if clean Model Display get Current beep String title get Editor get Site get Registered Name Message Dialog open Error PDE Plugin get Active Workbench Shell title PDE Plugin get Resource String ERROR MESSAGE return clean Model  canLeaveThePage cleanModel getInputContext isModelCorrect cleanModel getCurrent getEditor getSite getRegisteredName MessageDialog openError PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString ERROR_MESSAGE cleanModel

public class Default Content Provider implements I Content Provider public Default Content Provider super  DefaultContentProvider IContentProvider DefaultContentProvider
super public void dispose 
public void dispose public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput

public abstract class Default Element implements IPDE Element public Object get Children return null  DefaultElement IPDEElement getChildren
return null public Image get Image return null  getImage
return null public String get Label return NON NLS 1  getLabel
return NON NLS 1 public Object get Parent return null  getParent

public static final Element Label Provider INSTANCE new Element Label Provider public Element Label Provider super  ElementLabelProvider ElementLabelProvider ElementLabelProvider
public Image get Image Object element if element instanceof IPDE Element return IPDE Element element get Image return super get Image element  getImage IPDEElement IPDEElement getImage getImage
public String get Text Object element if element instanceof IPDE Element return IPDE Element element get Label return super get Text element  getText IPDEElement IPDEElement getLabel getText

private Vector children new Vector public Element List String name super name  ElementList
super name public Element List String name Image icon super name icon  ElementList
super name icon public Element List String name Image icon IPDE Element parent super name icon parent  ElementList IPDEElement
super name icon parent public void add IPDE Element child children add Element child  IPDEElement addElement
public Object get Children if children size 0 return new Object 0 Object result new Object children size children copy Into result return result  getChildren copyInto
return result public void remove IPDE Element child children remove child  IPDEElement
children remove child public int size return children size 
return children size public String to String return children to String  toString toString

public interface IPDE Element public Object get Children  IPDEElement getChildren
public Object get Children public Image get Image  getChildren getImage
public Object get Children public Image get Image public String get Label  getChildren getImage getLabel
public Image get Image public String get Label public Object get Parent  getImage getLabel getParent

public class List Content Provider extends Default Content Provider implements I Structured Content Provider public List Content Provider super  ListContentProvider DefaultContentProvider IStructuredContentProvider ListContentProvider
public Object get Elements Object element if element instanceof IPDE Element return IPDE Element element get Children return null  getElements IPDEElement IPDEElement getChildren

private IPDE Element parent public Named Element String name this name null null  IPDEElement NamedElement
this name null null public Named Element String name Image icon this name icon null  NamedElement
public Named Element String name Image image IPDE Element parent this name name this image image this parent parent  NamedElement IPDEElement
this parent parent public Image get Image return image  getImage
return image public String get Label return name  getLabel
return name public Object get Parent return parent  getParent
return parent public String to String return get Label  toString getLabel

public class Tree Content Provider extends List Content Provider implements I Tree Content Provider public Tree Content Provider super  TreeContentProvider ListContentProvider ITreeContentProvider TreeContentProvider
super public void dispose 
public void dispose public Object get Children Object element if element instanceof IPDE Element return IPDE Element element get Children return null  getChildren IPDEElement IPDEElement getChildren
public Object get Elements Object element if element instanceof IPDE Element return IPDE Element element get Children return null  getElements IPDEElement IPDEElement getChildren
public Object get Parent Object element if element instanceof IPDE Element return IPDE Element element get Parent return null  getParent IPDEElement IPDEElement getParent
public boolean has Children java lang Object element if element instanceof IPDE Element Object children IPDE Element element get Children return children null children length 0 return false  hasChildren IPDEElement IPDEElement getChildren
return false public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
public void input Changed Viewer viewer Object old Input Object new Input public boolean is Deleted Object element return false  inputChanged oldInput newInput isDeleted

protected void create Starting Space Composite parent int span Label label new Label parent SWT NULL Grid Data data new Grid Data data horizontal Span span label set Layout Data data  createStartingSpace GridData GridData horizontalSpan setLayoutData
public boolean is Valid I Launch Configuration config return get Error Message null  isValid ILaunchConfiguration getErrorMessage
see org eclipse debug ui Abstract Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy  AbstractLaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
see org eclipse debug ui Abstract Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy  AbstractLaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
Updates the status line and the ok button depending on the status protected void update Status I Status status apply To Status Line this status  updateStatus IStatus applyToStatusLine
Applies the status to a dialog page public static void apply To Status Line Abstract Launcher Tab tab I Status status String error Message null String warning Message null String status Message status get Message if status Message length 0 if status matches I Status ERROR error Message status Message else if status isOK warning Message status Message tab set Error Message error Message tab set Message warning Message tab update Launch Configuration Dialog  applyToStatusLine AbstractLauncherTab IStatus errorMessage warningMessage statusMessage getMessage statusMessage IStatus errorMessage statusMessage warningMessage statusMessage setErrorMessage errorMessage setMessage warningMessage updateLaunchConfigurationDialog
public static I Status get More Severe I Status s1 I Status s2 return s1 get Severity s2 get Severity s1 s2  IStatus getMoreSevere IStatus IStatus getSeverity getSeverity
public static I Status create Status int severity String message return new Status severity PDE Plugin get Plugin Id severity message null  IStatus createStatus PDEPlugin getPluginId
see org eclipse debug ui Abstract Launch Configuration Tab update Launch Configuration Dialog protected void update Launch Configuration Dialog super update Launch Configuration Dialog  AbstractLaunchConfigurationTab updateLaunchConfigurationDialog updateLaunchConfigurationDialog updateLaunchConfigurationDialog

extends Default Content Provider implements I Tree Content Provider public boolean has Children Object parent return parent instanceof I Plugin Model Base  DefaultContentProvider ITreeContentProvider hasChildren IPluginModelBase
public Object get Children Object parent if parent f External Plugins return f External Models if parent f Workspace Plugins return f Workspace Models return new Object 0  getChildren fExternalPlugins fExternalModels fWorkspacePlugins fWorkspaceModels
return new Object 0 public Object get Parent Object child return null  getParent
return null public Object get Elements Object input return new Object f Workspace Plugins f External Plugins  getElements fWorkspacePlugins fExternalPlugins
public Advanced Launcher Tab this true  AdvancedLauncherTab
public Advanced Launcher Tab boolean show Features this f Show Features show Features PDE Plugin get Default get Label Provider connect this f Image PDE Plugin Images DESC REQ PLUGINS OBJ create Image f External Models PDE Core get Default get External Model Manager get All Models f Workspace Models PDE Core get Default get Workspace Model Manager get All Models  AdvancedLauncherTab showFeatures fShowFeatures showFeatures PDEPlugin getDefault getLabelProvider fImage PDEPluginImages DESC_REQ_PLUGINS_OBJ createImage fExternalModels PDECore getDefault getExternalModelManager getAllModels fWorkspaceModels PDECore getDefault getWorkspaceModelManager getAllModels
public void dispose PDE Plugin get Default get Label Provider disconnect this f Image dispose super dispose  PDEPlugin getDefault getLabelProvider fImage
public void create Control Composite parent Composite composite new Composite parent SWT NONE composite set Layout new Grid Layout f Use Default Radio new Button composite SWT RADIO f Use Default Radio set Text PDE Plugin get Resource String Advanced Launcher Tab use Default NON NLS 1 if f Show Features f Use Features Radio new Button composite SWT RADIO f Use Features Radio set Text PDE Plugin get Resource String Advanced Launcher Tab use Features NON NLS 1 f Use List Radio new Button composite SWT RADIO f Use List Radio set Text PDE Plugin get Resource String Advanced Launcher Tab use List NON NLS 1 create Plugin List composite hook Listeners set Control composite Dialog apply Dialog Font composite Workbench Help set Help composite I Help Context Ids LAUNCHER ADVANCED  createControl setLayout GridLayout fUseDefaultRadio fUseDefaultRadio setText PDEPlugin getResourceString AdvancedLauncherTab useDefault fShowFeatures fUseFeaturesRadio fUseFeaturesRadio setText PDEPlugin getResourceString AdvancedLauncherTab useFeatures fUseListRadio fUseListRadio setText PDEPlugin getResourceString AdvancedLauncherTab useList createPluginList hookListeners setControl applyDialogFont WorkbenchHelp setHelp IHelpContextIds LAUNCHER_ADVANCED
private void hook Listeners Selection Adapter adapter new Selection Adapter public void widget Selected Selection Event e use Default Changed  hookListeners SelectionAdapter SelectionAdapter widgetSelected SelectionEvent useDefaultChanged
f Defaults Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e compute Initial Check State update Status  fDefaultsButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent computeInitialCheckState updateStatus
public void widget Selected Selection Event e Busy Indicator show While get Control get Display new Runnable public void run compute Subset update Status  widgetSelected SelectionEvent BusyIndicator showWhile getControl getDisplay computeSubset updateStatus
f Add Required Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e Busy Indicator show While get Control get Display new Runnable public void run compute Subset update Status  fAddRequiredButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent BusyIndicator showWhile getControl getDisplay computeSubset updateStatus
f Select All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e toggle Groups true update Status  fSelectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent toggleGroups updateStatus
f Deselect Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e toggle Groups false update Status  fDeselectButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent toggleGroups updateStatus
private void hook Listeners Selection Adapter adapter new Selection Adapter public void widget Selected Selection Event e use Default Changed f Use Default Radio add Selection Listener adapter if f Show Features f Use Features Radio add Selection Listener adapter f Defaults Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e compute Initial Check State update Status f Add Required Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e Busy Indicator show While get Control get Display new Runnable public void run compute Subset update Status f Select All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e toggle Groups true update Status f Deselect Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e toggle Groups false update Status  hookListeners SelectionAdapter SelectionAdapter widgetSelected SelectionEvent useDefaultChanged fUseDefaultRadio addSelectionListener fShowFeatures fUseFeaturesRadio addSelectionListener fDefaultsButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent computeInitialCheckState updateStatus fAddRequiredButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent BusyIndicator showWhile getControl getDisplay computeSubset updateStatus fSelectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent toggleGroups updateStatus fDeselectButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent toggleGroups updateStatus
param b protected void toggle Groups boolean select handle Group State Changed f Workspace Plugins select handle Group State Changed f External Plugins select  toggleGroups handleGroupStateChanged fWorkspacePlugins handleGroupStateChanged fExternalPlugins
private void use Default Changed adjust Custom Control Enable State f Use List Radio get Selection update Status  useDefaultChanged adjustCustomControlEnableState fUseListRadio getSelection updateStatus
private void adjust Custom Control Enable State boolean enable f Visible Label set Visible enable f Plugin Tree Viewer get Tree set Visible enable f Add Required Button set Visible enable f Defaults Button set Visible enable f Select All Button set Visible enable f Deselect Button set Visible enable  adjustCustomControlEnableState fVisibleLabel setVisible fPluginTreeViewer getTree setVisible fAddRequiredButton setVisible fDefaultsButton setVisible fSelectAllButton setVisible fDeselectButton setVisible
private void create Plugin List Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH f Visible Label new Label composite SWT NULL Grid Data gd new Grid Data gd horizontal Span 2 f Visible Label set Layout Data gd f Visible Label set Text PDE Plugin get Resource String Advanced Launcher Tab visible List NON NLS 1 create Plugin Viewer composite create Button Container composite  createPluginList GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_BOTH fVisibleLabel GridData GridData horizontalSpan fVisibleLabel setLayoutData fVisibleLabel setText PDEPlugin getResourceString AdvancedLauncherTab visibleList createPluginViewer createButtonContainer
private void compute Subset Object checked f Plugin Tree Viewer get Checked Elements Tree Map map new Tree Map for int i 0 i checked length i if checked i instanceof I Plugin Model Base I Plugin Model Base model I Plugin Model Base checked i add Plugin And Dependencies model map if PDE Core get Default get Model Manager isOS Gi Runtime add Plugin And Dependencies find Plugin org eclipse core runtime map NON NLS 1 add Plugin And Dependencies find Plugin org eclipse osgi map add Plugin And Dependencies find Plugin org eclipse osgi services map add Plugin And Dependencies find Plugin org eclipse osgi util map add Plugin And Dependencies find Plugin org eclipse update configurator map else add Plugin And Dependencies find Plugin org eclipse core boot map checked map values to Array f Plugin Tree Viewer set Checked Elements map values to Array f Num External Checked 0 f Num Workspace Checked 0 for int i 0 i checked length i if checked i instanceof Workspace Plugin Model Base f Num Workspace Checked 1 else f Num External Checked 1 adjust Group State  computeSubset fPluginTreeViewer getCheckedElements TreeMap TreeMap IPluginModelBase IPluginModelBase IPluginModelBase addPluginAndDependencies PDECore getDefault getModelManager isOSGiRuntime addPluginAndDependencies findPlugin addPluginAndDependencies findPlugin addPluginAndDependencies findPlugin addPluginAndDependencies findPlugin addPluginAndDependencies findPlugin addPluginAndDependencies findPlugin toArray fPluginTreeViewer setCheckedElements toArray fNumExternalChecked fNumWorkspaceChecked WorkspacePluginModelBase fNumWorkspaceChecked fNumExternalChecked adjustGroupState
private void add Plugin And Dependencies I Plugin Model Base model Tree Map map if model null return String id model get Plugin Base get Id if map contains Key id return map put id model if model instanceof I Fragment Model I Plugin Model Base parent find Plugin I Fragment Model model get Fragment get Plugin Id add Plugin And Dependencies parent map else boolean add Fragments false I Plugin Library libs model get Plugin Base get Libraries for int i 0 i libs length i if Classpath Util Core contains Variables libs i get Name add Fragments true break if add Fragments I Fragment Model fragments find Fragments model get Plugin Base for int i 0 i fragments length i add Plugin And Dependencies fragments i map I Plugin Import imports model get Plugin Base get Imports for int i 0 i imports length i add Plugin And Dependencies find Plugin imports i get Id map  addPluginAndDependencies IPluginModelBase TreeMap getPluginBase getId containsKey IFragmentModel IPluginModelBase findPlugin IFragmentModel getFragment getPluginId addPluginAndDependencies addFragments IPluginLibrary getPluginBase getLibraries ClasspathUtilCore containsVariables getName addFragments addFragments IFragmentModel findFragments getPluginBase addPluginAndDependencies IPluginImport getPluginBase getImports addPluginAndDependencies findPlugin getId
private I Plugin Model Base find Plugin String id Plugin Model Manager manager PDE Core get Default get Model Manager Model Entry entry manager find Entry id if entry null I Plugin Model Base model entry get Active Model if f Plugin Tree Viewer get Checked model return model model entry get External Model if model null f Plugin Tree Viewer get Checked model return model return entry get Active Model return null  IPluginModelBase findPlugin PluginModelManager PDECore getDefault getModelManager ModelEntry findEntry IPluginModelBase getActiveModel fPluginTreeViewer getChecked getExternalModel fPluginTreeViewer getChecked getActiveModel
private I Fragment Model find Fragments I Plugin Base plugin Model Entry entries PDE Core get Default get Model Manager get Entries Array List result new Array List for int i 0 i entries length i Model Entry entry entries i I Plugin Model Base model entry get Active Model if model instanceof I Fragment Model String id I Fragment Model model get Fragment get Plugin Id if id equals plugin get Id if f Plugin Tree Viewer get Checked model result add model else model entry get External Model if model null f Plugin Tree Viewer get Checked model result add model else result add entry get Active Model return I Fragment Model result to Array new I Fragment Model result size  IFragmentModel findFragments IPluginBase ModelEntry PDECore getDefault getModelManager getEntries ArrayList ArrayList ModelEntry IPluginModelBase getActiveModel IFragmentModel IFragmentModel getFragment getPluginId getId fPluginTreeViewer getChecked getExternalModel fPluginTreeViewer getChecked getActiveModel IFragmentModel toArray IFragmentModel
private void adjust Group State f Plugin Tree Viewer set Checked f External Plugins f Num External Checked 0 f Plugin Tree Viewer set Grayed f External Plugins f Num External Checked 0 f Num External Checked f External Models length f Plugin Tree Viewer set Checked f Workspace Plugins f Num Workspace Checked 0 f Plugin Tree Viewer set Grayed f Workspace Plugins f Num Workspace Checked 0 f Num Workspace Checked f Workspace Models length  adjustGroupState fPluginTreeViewer setChecked fExternalPlugins fNumExternalChecked fPluginTreeViewer setGrayed fExternalPlugins fNumExternalChecked fNumExternalChecked fExternalModels fPluginTreeViewer setChecked fWorkspacePlugins fNumWorkspaceChecked fPluginTreeViewer setGrayed fWorkspacePlugins fNumWorkspaceChecked fNumWorkspaceChecked fWorkspaceModels
f Plugin Tree Viewer add Check State Listener new I Check State Listener public void check State Changed final Check State Changed Event event Object element event get Element if element instanceof I Plugin Model Base handle Check State Changed I Plugin Model Base element event get Checked else handle Group State Changed element event get Checked update Launch Configuration Dialog  fPluginTreeViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getElement IPluginModelBase handleCheckStateChanged IPluginModelBase getChecked handleGroupStateChanged getChecked updateLaunchConfigurationDialog
f Plugin Tree Viewer set Sorter new List Util Plugin Sorter public int category Object obj if obj f Workspace Plugins return 1 return 0  fPluginTreeViewer setSorter ListUtil PluginSorter fWorkspacePlugins
private void create Plugin Viewer Composite composite f Plugin Tree Viewer new Checkbox Tree Viewer composite SWT BORDER f Plugin Tree Viewer set Content Provider new Plugin Content Provider f Plugin Tree Viewer set Label Provider PDE Plugin get Default get Label Provider f Plugin Tree Viewer set Auto Expand Level 2 f Plugin Tree Viewer add Check State Listener new I Check State Listener public void check State Changed final Check State Changed Event event Object element event get Element if element instanceof I Plugin Model Base handle Check State Changed I Plugin Model Base element event get Checked else handle Group State Changed element event get Checked update Launch Configuration Dialog f Plugin Tree Viewer set Sorter new List Util Plugin Sorter public int category Object obj if obj f Workspace Plugins return 1 return 0 f Plugin Tree Viewer get Tree set Layout Data new Grid Data Grid Data FILL BOTH Image plugins Image PDE Plugin get Default get Label Provider get PDE Plugin Images DESC REQ PLUGINS OBJ f Workspace Plugins new Named Element PDE Plugin get Resource String Advanced Launcher Tab workspace Plugins NON NLS 1 plugins Image f External Plugins new Named Element PDE Plugin get Resource String Advanced Launcher Tab external Plugins NON NLS 1 plugins Image  createPluginViewer fPluginTreeViewer CheckboxTreeViewer fPluginTreeViewer setContentProvider PluginContentProvider fPluginTreeViewer setLabelProvider PDEPlugin getDefault getLabelProvider fPluginTreeViewer setAutoExpandLevel fPluginTreeViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getElement IPluginModelBase handleCheckStateChanged IPluginModelBase getChecked handleGroupStateChanged getChecked updateLaunchConfigurationDialog fPluginTreeViewer setSorter ListUtil PluginSorter fWorkspacePlugins fPluginTreeViewer getTree setLayoutData GridData GridData FILL_BOTH pluginsImage PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_REQ_PLUGINS_OBJ fWorkspacePlugins NamedElement PDEPlugin getResourceString AdvancedLauncherTab workspacePlugins pluginsImage fExternalPlugins NamedElement PDEPlugin getResourceString AdvancedLauncherTab externalPlugins pluginsImage
private void create Button Container Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height layout margin Width 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL VERTICAL f Select All Button new Button composite SWT PUSH f Select All Button set Text PDE Plugin get Resource String Advanced Launcher Tab select All NON NLS 1 f Select All Button set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data FILL HORIZONTAL SWT Util set Button Dimension Hint f Select All Button f Deselect Button new Button composite SWT PUSH f Deselect Button set Text PDE Plugin get Resource String Advanced Launcher Tab deselect All NON NLS 1 f Deselect Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL SWT Util set Button Dimension Hint f Deselect Button f Add Required Button new Button composite SWT PUSH f Add Required Button set Text PDE Plugin get Resource String Advanced Launcher Tab subset NON NLS 1 f Add Required Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL SWT Util set Button Dimension Hint f Add Required Button f Defaults Button new Button composite SWT PUSH f Defaults Button set Text PDE Plugin get Resource String Advanced Launcher Tab defaults NON NLS 1 f Defaults Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL SWT Util set Button Dimension Hint f Defaults Button  createButtonContainer GridLayout GridLayout marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_VERTICAL fSelectAllButton fSelectAllButton setText PDEPlugin getResourceString AdvancedLauncherTab selectAll fSelectAllButton setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING GridData FILL_HORIZONTAL SWTUtil setButtonDimensionHint fSelectAllButton fDeselectButton fDeselectButton setText PDEPlugin getResourceString AdvancedLauncherTab deselectAll fDeselectButton setLayoutData GridData GridData FILL_HORIZONTAL SWTUtil setButtonDimensionHint fDeselectButton fAddRequiredButton fAddRequiredButton setText PDEPlugin getResourceString AdvancedLauncherTab fAddRequiredButton setLayoutData GridData GridData FILL_HORIZONTAL SWTUtil setButtonDimensionHint fAddRequiredButton fDefaultsButton fDefaultsButton setText PDEPlugin getResourceString AdvancedLauncherTab fDefaultsButton setLayoutData GridData GridData FILL_HORIZONTAL SWTUtil setButtonDimensionHint fDefaultsButton
private void init Workspace Plugins State I Launch Configuration config throws Core Exception f Num Workspace Checked f Workspace Models length f Plugin Tree Viewer set Subtree Checked f Workspace Plugins true Tree Set deselected Launcher Utils parse DeselectedWS Ids config for int i 0 i f Workspace Models length i if deselected contains f Workspace Models i get Plugin Base get Id if f Plugin Tree Viewer set Checked f Workspace Models i false f Num Workspace Checked 1 if f Num Workspace Checked 0 f Plugin Tree Viewer set Checked f Workspace Plugins false f Plugin Tree Viewer set Grayed f Workspace Plugins f Num Workspace Checked 0 f Num Workspace Checked f Workspace Models length  initWorkspacePluginsState ILaunchConfiguration CoreException fNumWorkspaceChecked fWorkspaceModels fPluginTreeViewer setSubtreeChecked fWorkspacePlugins TreeSet LauncherUtils parseDeselectedWSIds fWorkspaceModels fWorkspaceModels getPluginBase getId fPluginTreeViewer setChecked fWorkspaceModels fNumWorkspaceChecked fNumWorkspaceChecked fPluginTreeViewer setChecked fWorkspacePlugins fPluginTreeViewer setGrayed fWorkspacePlugins fNumWorkspaceChecked fNumWorkspaceChecked fWorkspaceModels
private void init External Plugins State I Launch Configuration config throws Core Exception f Num External Checked 0 f Plugin Tree Viewer set Subtree Checked f External Plugins false Tree Set selected Launcher Utils parse Selected Ext Ids config for int i 0 i f External Models length i if selected contains f External Models i get Plugin Base get Id if f Plugin Tree Viewer set Checked f External Models i true f Num External Checked 1 f Plugin Tree Viewer set Checked f External Plugins f Num External Checked 0 f Plugin Tree Viewer set Grayed f External Plugins f Num External Checked 0 f Num External Checked f External Models length  initExternalPluginsState ILaunchConfiguration CoreException fNumExternalChecked fPluginTreeViewer setSubtreeChecked fExternalPlugins TreeSet LauncherUtils parseSelectedExtIds fExternalModels fExternalModels getPluginBase getId fPluginTreeViewer setChecked fExternalModels fNumExternalChecked fPluginTreeViewer setChecked fExternalPlugins fNumExternalChecked fPluginTreeViewer setGrayed fExternalPlugins fNumExternalChecked fNumExternalChecked fExternalModels
public void initialize From I Launch Configuration config try f Use Default Radio set Selection config get Attribute USECUSTOM true if f Show Features f Use Features Radio set Selection config get Attribute USEFEATURES false f Use List Radio set Selection f Use Default Radio get Selection f Use Features Radio get Selection else f Use List Radio set Selection f Use Default Radio get Selection if f Plugin Tree Viewer get Input null f Plugin Tree Viewer set Use Hashlookup true f Plugin Tree Viewer set Input PDE Plugin get Default f Plugin Tree Viewer reveal f Workspace Plugins if f Use Default Radio get Selection compute Initial Check State else if f Use List Radio get Selection init Workspace Plugins State config init External Plugins State config catch Core Exception e PDE Plugin log Exception e adjust Custom Control Enable State f Use List Radio get Selection update Status  initializeFrom ILaunchConfiguration fUseDefaultRadio setSelection getAttribute fShowFeatures fUseFeaturesRadio setSelection getAttribute fUseListRadio setSelection fUseDefaultRadio getSelection fUseFeaturesRadio getSelection fUseListRadio setSelection fUseDefaultRadio getSelection fPluginTreeViewer getInput fPluginTreeViewer setUseHashlookup fPluginTreeViewer setInput PDEPlugin getDefault fPluginTreeViewer fWorkspacePlugins fUseDefaultRadio getSelection computeInitialCheckState fUseListRadio getSelection initWorkspacePluginsState initExternalPluginsState CoreException PDEPlugin logException adjustCustomControlEnableState fUseListRadio getSelection updateStatus
private void compute Initial Check State Tree Set wtable new Tree Set f Num Workspace Checked 0 f Num External Checked 0 for int i 0 i f Workspace Models length i I Plugin Model Base model f Workspace Models i f Num Workspace Checked 1 String id model get Plugin Base get Id if id null wtable add model get Plugin Base get Id f Plugin Tree Viewer set Subtree Checked f Workspace Plugins true f Num External Checked 0 for int i 0 i f External Models length i I Plugin Model Base model f External Models i boolean masked wtable contains model get Plugin Base get Id if masked model is Enabled f Plugin Tree Viewer set Checked model true f Num External Checked 1 adjust Group State  computeInitialCheckState TreeSet TreeSet fNumWorkspaceChecked fNumExternalChecked fWorkspaceModels IPluginModelBase fWorkspaceModels fNumWorkspaceChecked getPluginBase getId getPluginBase getId fPluginTreeViewer setSubtreeChecked fWorkspacePlugins fNumExternalChecked fExternalModels IPluginModelBase fExternalModels getPluginBase getId isEnabled fPluginTreeViewer setChecked fNumExternalChecked adjustGroupState
private void handle Check State Changed I Plugin Model Base model boolean checked if model get Underlying Resource null if checked f Num External Checked 1 else f Num External Checked 1 else if checked f Num Workspace Checked 1 else f Num Workspace Checked 1 adjust Group State  handleCheckStateChanged IPluginModelBase getUnderlyingResource fNumExternalChecked fNumExternalChecked fNumWorkspaceChecked fNumWorkspaceChecked adjustGroupState
private void handle Group State Changed Object group boolean checked f Plugin Tree Viewer set Subtree Checked group checked f Plugin Tree Viewer set Grayed group false if group f Workspace Plugins f Num Workspace Checked checked f Workspace Models length 0 else if group f External Plugins f Num External Checked checked f External Models length 0  handleGroupStateChanged fPluginTreeViewer setSubtreeChecked fPluginTreeViewer setGrayed fWorkspacePlugins fNumWorkspaceChecked fWorkspaceModels fExternalPlugins fNumExternalChecked fExternalModels
public void set Defaults I Launch Configuration Working Copy config if f Show Features config set Attribute USECUSTOM true config set Attribute USEFEATURES false else config set Attribute USECUSTOM true  setDefaults ILaunchConfigurationWorkingCopy fShowFeatures setAttribute setAttribute setAttribute
public void perform Apply I Launch Configuration Working Copy config config set Attribute USECUSTOM f Use Default Radio get Selection if f Show Features config set Attribute USEFEATURES f Use Features Radio get Selection if f Use List Radio get Selection store deselected projects String Buffer wbuf new String Buffer for int i 0 i f Workspace Models length i I Plugin Model Base model I Plugin Model Base f Workspace Models i if f Plugin Tree Viewer get Checked model wbuf append model get Plugin Base get Id File path Separator Char config set Attribute WSPROJECT wbuf to String Store selected external models String Buffer exbuf new String Buffer Object checked f Plugin Tree Viewer get Checked Elements for int i 0 i checked length i if checked i instanceof External Plugin Model Base I Plugin Model Base model I Plugin Model Base checked i exbuf append model get Plugin Base get Id File path Separator Char config set Attribute EXTPLUGINS exbuf to String else config set Attribute WSPROJECT String null config set Attribute EXTPLUGINS String null  performApply ILaunchConfigurationWorkingCopy setAttribute fUseDefaultRadio getSelection fShowFeatures setAttribute fUseFeaturesRadio getSelection fUseListRadio getSelection StringBuffer StringBuffer fWorkspaceModels IPluginModelBase IPluginModelBase fWorkspaceModels fPluginTreeViewer getChecked getPluginBase getId pathSeparatorChar setAttribute toString StringBuffer StringBuffer fPluginTreeViewer getCheckedElements ExternalPluginModelBase IPluginModelBase IPluginModelBase getPluginBase getId pathSeparatorChar setAttribute toString setAttribute setAttribute
private void update Status update Status validate  updateStatus updateStatus
private I Status validate if f Show Features f Use Features Radio get Selection I Path workspace Path PDE Plugin get Workspace get Root get Location I Path feature Path workspace Path remove Last Segments 1 append features NON NLS 1 if workspace Path last Segment equals Ignore Case plugins NON NLS 1 feature Path to File exists return create Status I Status ERROR PDE Plugin get Resource String Advanced Launcher Tab error feature Setup NON NLS 1 return create Status I Status OK NON NLS 1  IStatus fShowFeatures fUseFeaturesRadio getSelection IPath workspacePath PDEPlugin getWorkspace getRoot getLocation IPath featurePath workspacePath removeLastSegments workspacePath lastSegment equalsIgnoreCase featurePath toFile createStatus IStatus PDEPlugin getResourceString AdvancedLauncherTab featureSetup createStatus IStatus
public String get Name return PDE Plugin get Resource String Advanced Launcher Tab name NON NLS 1  getName PDEPlugin getResourceString AdvancedLauncherTab
public Image get Image return f Image  getImage fImage

public Basic Launcher Tab f Jre Selection Status create Status I Status OK NON NLS 1 f Workspace Selection Status create Status I Status OK NON NLS 1 f Image PDE Plugin Images DESC ARGUMENT TAB create Image  BasicLauncherTab fJreSelectionStatus createStatus IStatus fWorkspaceSelectionStatus createStatus IStatus fImage PDEPluginImages DESC_ARGUMENT_TAB createImage
public void dispose super dispose f Image dispose  fImage
public void create Control Composite parent Composite composite new Composite parent SWT NONE composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL create Workspace Data Section composite create Program Section composite create Command Line Settings Section composite create Defaults Button composite set Control composite Dialog apply Dialog Font composite Workbench Help set Help composite I Help Context Ids LAUNCHER BASIC  createControl setLayout GridLayout setLayoutData GridData GridData FILL_HORIZONTAL createWorkspaceDataSection createProgramSection createCommandLineSettingsSection createDefaultsButton setControl applyDialogFont WorkbenchHelp setHelp IHelpContextIds LAUNCHER_BASIC
private void create Program Section Composite composite Group group new Group composite SWT NONE group set Text PDE Plugin get Resource String Basic Launcher Tab program To Run NON NLS 1 Grid Layout layout new Grid Layout layout num Columns 2 group set Layout layout group set Layout Data new Grid Data Grid Data FILL HORIZONTAL create Application Section group create Product Section group  createProgramSection setText PDEPlugin getResourceString BasicLauncherTab programToRun GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_HORIZONTAL createApplicationSection createProductSection
SWT Util set Button Dimension Hint f Defaults Button f Defaults Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e do Restore Defaults update Launch Configuration Dialog  SWTUtil setButtonDimensionHint fDefaultsButton fDefaultsButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent doRestoreDefaults updateLaunchConfigurationDialog
protected void create Defaults Button Composite parent f Defaults Button new Button parent SWT PUSH f Defaults Button set Text PDE Plugin get Resource String Basic Launcher Tab restore NON NLS 1 f Defaults Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END SWT Util set Button Dimension Hint f Defaults Button f Defaults Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e do Restore Defaults update Launch Configuration Dialog  createDefaultsButton fDefaultsButton fDefaultsButton setText PDEPlugin getResourceString BasicLauncherTab fDefaultsButton setLayoutData GridData GridData HORIZONTAL_ALIGN_END SWTUtil setButtonDimensionHint fDefaultsButton fDefaultsButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent doRestoreDefaults updateLaunchConfigurationDialog
f Workspace Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Workspace Selection Status validate Workspace Selection if f Block Changes update Status  fWorkspaceCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent fWorkspaceSelectionStatus validateWorkspaceSelection fBlockChanges updateStatus
f Workspace Combo add Modify Listener new Modify Listener public void modify Text Modify Event e f Workspace Selection Status validate Workspace Selection if f Block Changes update Status  fWorkspaceCombo addModifyListener ModifyListener modifyText ModifyEvent fWorkspaceSelectionStatus validateWorkspaceSelection fBlockChanges updateStatus
f Browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Path chosen choose Workspace Location if chosen null String destination chosen toOS String if f Workspace Combo index Of destination 1 f Workspace Combo add destination 0 f Workspace Combo set Text destination update Status  fBrowseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent IPath chooseWorkspaceLocation toOSString fWorkspaceCombo indexOf fWorkspaceCombo fWorkspaceCombo setText updateStatus
f Clear Workspace Check set Layout Data gd f Clear Workspace Check add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Ask Clear Check set Enabled f Clear Workspace Check get Selection update Launch Configuration Dialog  fClearWorkspaceCheck setLayoutData fClearWorkspaceCheck addSelectionListener SelectionAdapter widgetSelected SelectionEvent fAskClearCheck setEnabled fClearWorkspaceCheck getSelection updateLaunchConfigurationDialog
f Ask Clear Check set Layout Data gd f Ask Clear Check add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  fAskClearCheck setLayoutData fAskClearCheck addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
protected void create Workspace Data Section Composite composite Group group new Group composite SWT NONE group set Text PDE Plugin get Resource String Basic Launcher Tab workspace NON NLS 1 Grid Layout layout new Grid Layout layout num Columns 3 group set Layout layout group set Layout Data new Grid Data Grid Data FILL HORIZONTAL Label label new Label group SWT NULL label set Text PDE Plugin get Resource String Basic Launcher Tab location NON NLS 1 f Workspace Combo new Combo group SWT DROP DOWN Grid Data gd new Grid Data Grid Data FILL HORIZONTAL f Workspace Combo set Layout Data gd f Workspace Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Workspace Selection Status validate Workspace Selection if f Block Changes update Status f Workspace Combo add Modify Listener new Modify Listener public void modify Text Modify Event e f Workspace Selection Status validate Workspace Selection if f Block Changes update Status f Browse Button new Button group SWT PUSH f Browse Button set Text PDE Plugin get Resource String Basic Launcher Tab browse NON NLS 1 f Browse Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END f Browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Path chosen choose Workspace Location if chosen null String destination chosen toOS String if f Workspace Combo index Of destination 1 f Workspace Combo add destination 0 f Workspace Combo set Text destination update Status SWT Util set Button Dimension Hint f Browse Button f Clear Workspace Check new Button group SWT CHECK f Clear Workspace Check set Text PDE Plugin get Resource String Basic Launcher Tab clear NON NLS 1 gd new Grid Data gd horizontal Span 3 f Clear Workspace Check set Layout Data gd f Clear Workspace Check add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Ask Clear Check set Enabled f Clear Workspace Check get Selection update Launch Configuration Dialog f Ask Clear Check new Button group SWT CHECK f Ask Clear Check set Text PDE Plugin get Resource String Basic Launcher Tab ask Clear NON NLS 1 gd new Grid Data gd horizontal Span 3 f Ask Clear Check set Layout Data gd f Ask Clear Check add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  createWorkspaceDataSection setText PDEPlugin getResourceString BasicLauncherTab GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_HORIZONTAL setText PDEPlugin getResourceString BasicLauncherTab fWorkspaceCombo DROP_DOWN GridData GridData GridData FILL_HORIZONTAL fWorkspaceCombo setLayoutData fWorkspaceCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent fWorkspaceSelectionStatus validateWorkspaceSelection fBlockChanges updateStatus fWorkspaceCombo addModifyListener ModifyListener modifyText ModifyEvent fWorkspaceSelectionStatus validateWorkspaceSelection fBlockChanges updateStatus fBrowseButton fBrowseButton setText PDEPlugin getResourceString BasicLauncherTab fBrowseButton setLayoutData GridData GridData HORIZONTAL_ALIGN_END fBrowseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent IPath chooseWorkspaceLocation toOSString fWorkspaceCombo indexOf fWorkspaceCombo fWorkspaceCombo setText updateStatus SWTUtil setButtonDimensionHint fBrowseButton fClearWorkspaceCheck fClearWorkspaceCheck setText PDEPlugin getResourceString BasicLauncherTab GridData horizontalSpan fClearWorkspaceCheck setLayoutData fClearWorkspaceCheck addSelectionListener SelectionAdapter widgetSelected SelectionEvent fAskClearCheck setEnabled fClearWorkspaceCheck getSelection updateLaunchConfigurationDialog fAskClearCheck fAskClearCheck setText PDEPlugin getResourceString BasicLauncherTab askClear GridData horizontalSpan fAskClearCheck setLayoutData fAskClearCheck addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
protected void create Command Line Settings Section Composite composite Group group new Group composite SWT NONE group set Text PDE Plugin get Resource String Basic Launcher Tab command Line Settings NON NLS 1 Grid Layout layout new Grid Layout layout num Columns 2 group set Layout layout group set Layout Data new Grid Data Grid Data FILL HORIZONTAL createJRE Section group createVM Args Section group create Prog Args Section group create Bootstrap Entries Section group  createCommandLineSettingsSection setText PDEPlugin getResourceString BasicLauncherTab commandLineSettings GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_HORIZONTAL createJRESection createVMArgsSection createProgArgsSection createBootstrapEntriesSection
f Product Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean selected f Product Button get Selection f Application Combo set Enabled selected f Product Combo set Enabled selected update Launch Configuration Dialog  fProductButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fProductButton getSelection fApplicationCombo setEnabled fProductCombo setEnabled updateLaunchConfigurationDialog
f Product Combo set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Product Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  fProductCombo setLayoutData GridData GridData FILL_HORIZONTAL fProductCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
protected void create Product Section Composite parent f Product Button new Button parent SWT RADIO f Product Button set Text PDE Plugin get Resource String Basic Launcher Tab run Product NON NLS 1 f Product Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean selected f Product Button get Selection f Application Combo set Enabled selected f Product Combo set Enabled selected update Launch Configuration Dialog f Product Combo new Combo parent SWT READ ONLY SWT DROP DOWN f Product Combo set Items get Product Names f Product Combo set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Product Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  createProductSection fProductButton fProductButton setText PDEPlugin getResourceString BasicLauncherTab runProduct fProductButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fProductButton getSelection fApplicationCombo setEnabled fProductCombo setEnabled updateLaunchConfigurationDialog fProductCombo READ_ONLY DROP_DOWN fProductCombo setItems getProductNames fProductCombo setLayoutData GridData GridData FILL_HORIZONTAL fProductCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
f Application Combo set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Application Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  fApplicationCombo setLayoutData GridData GridData FILL_HORIZONTAL fApplicationCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
protected void create Application Section Composite parent f Application Button new Button parent SWT RADIO f Application Button set Text PDE Plugin get Resource String Basic Launcher Tab run Application NON NLS 1 f Application Combo new Combo parent SWT READ ONLY SWT DROP DOWN f Application Combo set Items get Application Names f Application Combo set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Application Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  createApplicationSection fApplicationButton fApplicationButton setText PDEPlugin getResourceString BasicLauncherTab runApplication fApplicationCombo READ_ONLY DROP_DOWN fApplicationCombo setItems getApplicationNames fApplicationCombo setLayoutData GridData GridData FILL_HORIZONTAL fApplicationCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
protected String get Application Names Tree Set result new Tree Set I Plugin Model Base plugins PDE Core get Default get Model Manager get Plugins for int i 0 i plugins length i I Plugin Extension extensions plugins i get Plugin Base get Extensions for int j 0 j extensions length j String point extensions j get Point if point null point equals org eclipse core runtime applications NON NLS 1 String id extensions j get Plugin Base get Id if id null id trim length 0 id starts With org eclipse pde junit runtime NON NLS 1 continue if extensions j get Id null result add id extensions j get Id NON NLS 1 return String result to Array new String result size  getApplicationNames TreeSet TreeSet IPluginModelBase PDECore getDefault getModelManager getPlugins IPluginExtension getPluginBase getExtensions getPoint getPluginBase getId startsWith getId getId toArray
protected String get Product Names Tree Set result new Tree Set I Plugin Model Base plugins PDE Core get Default get Model Manager get Plugins for int i 0 i plugins length i I Plugin Extension extensions plugins i get Plugin Base get Extensions for int j 0 j extensions length j String point extensions j get Point if point null point equals org eclipse core runtime products NON NLS 1 I Plugin Object children extensions j get Children if children length 1 continue if product equals children 0 get Name NON NLS 1 continue String id extensions j get Plugin Base get Id if id null id trim length 0 continue if extensions j get Id null result add id extensions j get Id NON NLS 1 return String result to Array new String result size  getProductNames TreeSet TreeSet IPluginModelBase PDECore getDefault getModelManager getPlugins IPluginExtension getPluginBase getExtensions getPoint IPluginObject getChildren getName getPluginBase getId getId getId toArray
protected String get Application Attribute return APPLICATION  getApplicationAttribute
f Jre Combo set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Jre Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Jre Selection Status validateJRE Selection update Status  fJreCombo setLayoutData GridData GridData FILL_HORIZONTAL fJreCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent fJreSelectionStatus validateJRESelection updateStatus
button add Selection Listener new Selection Adapter public void widget Selected Selection Event e String currentVM f Jre Combo get Text I Preference Node node new InstalledJR Es Preference Node if show Preference Page node f Jre Combo set Items Launcher Utils getVM Install Names f Jre Combo set Text currentVM if f Jre Combo get Selection Index 1 f Jre Combo set Text Launcher Utils get DefaultVM Install Name  addSelectionListener SelectionAdapter widgetSelected SelectionEvent fJreCombo getText IPreferenceNode InstalledJREsPreferenceNode showPreferencePage fJreCombo setItems LauncherUtils getVMInstallNames fJreCombo setText fJreCombo getSelectionIndex fJreCombo setText LauncherUtils getDefaultVMInstallName
Busy Indicator show While get Control get Display new Runnable public void run dialog create dialog set Message target Node get Label Text if dialog open Preference Dialog OK result 0 true  BusyIndicator showWhile getControl getDisplay setMessage targetNode getLabelText PreferenceDialog
private boolean show Preference Page final I Preference Node target Node Preference Manager manager new Preference Manager manager add To Root target Node final Preference Dialog dialog new Preference Dialog get Control get Shell manager final boolean result new boolean false Busy Indicator show While get Control get Display new Runnable public void run dialog create dialog set Message target Node get Label Text if dialog open Preference Dialog OK result 0 true return result 0  showPreferencePage IPreferenceNode targetNode PreferenceManager PreferenceManager addToRoot targetNode PreferenceDialog PreferenceDialog getControl getShell BusyIndicator showWhile getControl getDisplay setMessage targetNode getLabelText PreferenceDialog
protected void createJRE Section Composite parent Label label new Label parent SWT NONE label set Text PDE Plugin get Resource String Basic Launcher Tab jre NON NLS 1 Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height layout margin Width 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Jre Combo new Combo composite SWT DROP DOWN SWT READ ONLY f Jre Combo set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Jre Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Jre Selection Status validateJRE Selection update Status Button button new Button composite SWT PUSH button set Text PDE Plugin get Resource String Basic Launcher Tab installedJR Es NON NLS 1 button add Selection Listener new Selection Adapter public void widget Selected Selection Event e String currentVM f Jre Combo get Text I Preference Node node new InstalledJR Es Preference Node if show Preference Page node f Jre Combo set Items Launcher Utils getVM Install Names f Jre Combo set Text currentVM if f Jre Combo get Selection Index 1 f Jre Combo set Text Launcher Utils get DefaultVM Install Name private boolean show Preference Page final I Preference Node target Node Preference Manager manager new Preference Manager manager add To Root target Node final Preference Dialog dialog new Preference Dialog get Control get Shell manager final boolean result new boolean false Busy Indicator show While get Control get Display new Runnable public void run dialog create dialog set Message target Node get Label Text if dialog open Preference Dialog OK result 0 true return result 0 button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END SWT Util set Button Dimension Hint button  createJRESection setText PDEPlugin getResourceString BasicLauncherTab GridLayout GridLayout numColumns marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_HORIZONTAL fJreCombo DROP_DOWN READ_ONLY fJreCombo setLayoutData GridData GridData FILL_HORIZONTAL fJreCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent fJreSelectionStatus validateJRESelection updateStatus setText PDEPlugin getResourceString BasicLauncherTab installedJREs addSelectionListener SelectionAdapter widgetSelected SelectionEvent fJreCombo getText IPreferenceNode InstalledJREsPreferenceNode showPreferencePage fJreCombo setItems LauncherUtils getVMInstallNames fJreCombo setText fJreCombo getSelectionIndex fJreCombo setText LauncherUtils getDefaultVMInstallName showPreferencePage IPreferenceNode targetNode PreferenceManager PreferenceManager addToRoot targetNode PreferenceDialog PreferenceDialog getControl getShell BusyIndicator showWhile getControl getDisplay setMessage targetNode getLabelText PreferenceDialog setLayoutData GridData GridData HORIZONTAL_ALIGN_END SWTUtil setButtonDimensionHint
f Vm Args Text set Layout Data gd f Vm Args Text add Modify Listener new Modify Listener public void modify Text Modify Event e if f Block Changes update Launch Configuration Dialog  fVmArgsText setLayoutData fVmArgsText addModifyListener ModifyListener modifyText ModifyEvent fBlockChanges updateLaunchConfigurationDialog
protected void createVM Args Section Composite parent Label label new Label parent SWT NONE label set Text PDE Plugin get Resource String Basic Launcher Tab vm Args NON NLS 1 f Vm Args Text new Text parent SWT BORDER Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 300 f Vm Args Text set Layout Data gd f Vm Args Text add Modify Listener new Modify Listener public void modify Text Modify Event e if f Block Changes update Launch Configuration Dialog  createVMArgsSection setText PDEPlugin getResourceString BasicLauncherTab vmArgs fVmArgsText GridData GridData GridData FILL_HORIZONTAL widthHint fVmArgsText setLayoutData fVmArgsText addModifyListener ModifyListener modifyText ModifyEvent fBlockChanges updateLaunchConfigurationDialog
f Prog Args Text set Layout Data gd f Prog Args Text add Modify Listener new Modify Listener public void modify Text Modify Event e if f Block Changes update Launch Configuration Dialog  fProgArgsText setLayoutData fProgArgsText addModifyListener ModifyListener modifyText ModifyEvent fBlockChanges updateLaunchConfigurationDialog
protected void create Prog Args Section Composite parent Label label new Label parent SWT NONE label set Text PDE Plugin get Resource String Basic Launcher Tab program Args NON NLS 1 f Prog Args Text new Text parent SWT BORDER Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 300 f Prog Args Text set Layout Data gd f Prog Args Text add Modify Listener new Modify Listener public void modify Text Modify Event e if f Block Changes update Launch Configuration Dialog  createProgArgsSection setText PDEPlugin getResourceString BasicLauncherTab programArgs fProgArgsText GridData GridData GridData FILL_HORIZONTAL widthHint fProgArgsText setLayoutData fProgArgsText addModifyListener ModifyListener modifyText ModifyEvent fBlockChanges updateLaunchConfigurationDialog
f Bootstrap set Layout Data gd f Bootstrap add Modify Listener new Modify Listener public void modify Text Modify Event e if f Block Changes update Launch Configuration Dialog  fBootstrap setLayoutData fBootstrap addModifyListener ModifyListener modifyText ModifyEvent fBlockChanges updateLaunchConfigurationDialog
private void create Bootstrap Entries Section Composite parent Label label new Label parent SWT NONE label set Text PDE Plugin get Resource String Basic Launcher Tab bootstrap NON NLS 1 f Bootstrap new Text parent SWT BORDER Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 300 f Bootstrap set Layout Data gd f Bootstrap add Modify Listener new Modify Listener public void modify Text Modify Event e if f Block Changes update Launch Configuration Dialog  createBootstrapEntriesSection setText PDEPlugin getResourceString BasicLauncherTab fBootstrap GridData GridData GridData FILL_HORIZONTAL widthHint fBootstrap setLayoutData fBootstrap addModifyListener ModifyListener modifyText ModifyEvent fBlockChanges updateLaunchConfigurationDialog
public void initialize From I Launch Configuration config try f Block Changes true initialize Workspace Data Section config initializeJRE Section config initialize Program To Run Section config initializeVM Args Section config initialize Prog Args Section config initialize Bootstrap Entries Section config f Workspace Selection Status validate Workspace Selection f Jre Selection Status validateJRE Selection update Status catch Core Exception e PDE Plugin log Exception e finally f Block Changes false  initializeFrom ILaunchConfiguration fBlockChanges initializeWorkspaceDataSection initializeJRESection initializeProgramToRunSection initializeVMArgsSection initializeProgArgsSection initializeBootstrapEntriesSection fWorkspaceSelectionStatus validateWorkspaceSelection fJreSelectionStatus validateJRESelection updateStatus CoreException PDEPlugin logException fBlockChanges
protected void initialize Program To Run Section I Launch Configuration config throws Core Exception initialize Application Section config initialize Product Section config boolean use Product config get Attribute USE PRODUCT false PDE Core get Default get Model Manager isOS Gi Runtime f Product Combo get Item Count 0 f Application Button set Selection use Product f Application Combo set Enabled use Product f Product Button set Selection use Product f Product Button set Enabled f Product Combo get Item Count 0 f Product Combo set Enabled use Product  initializeProgramToRunSection ILaunchConfiguration CoreException initializeApplicationSection initializeProductSection useProduct getAttribute USE_PRODUCT PDECore getDefault getModelManager isOSGiRuntime fProductCombo getItemCount fApplicationButton setSelection useProduct fApplicationCombo setEnabled useProduct fProductButton setSelection useProduct fProductButton setEnabled fProductCombo getItemCount fProductCombo setEnabled useProduct
protected void initialize Product Section I Launch Configuration config throws Core Exception if f Product Combo get Item Count 0 String product Name config get Attribute PRODUCT String null int index product Name null 1 f Product Combo index Of product Name if index 1 index 0 f Product Combo set Text f Product Combo get Item index  initializeProductSection ILaunchConfiguration CoreException fProductCombo getItemCount productName getAttribute productName fProductCombo indexOf productName fProductCombo setText fProductCombo getItem
protected void initialize Application Section I Launch Configuration config throws Core Exception String attribute get Application Attribute first see if the application name has been set on the launch config String application config get Attribute attribute String null if application null f Application Combo index Of application 1 application null check if the user has entered the application arg in the program arg field String Tokenizer tokenizer new String Tokenizer config get Attribute PROGARGS NON NLS 1 while tokenizer has More Tokens String token tokenizer next Token if token equals application tokenizer has More Tokens NON NLS 1 application tokenizer next Token break int index 1 if application null index f Application Combo index Of application use default application as specified in the install ini of the target platform if index 1 index f Application Combo index Of Launcher Utils get Default Application Name if index 1 f Application Combo set Text f Application Combo get Item index else if f Application Combo get Item Count 0 f Application Combo set Text f Application Combo get Item 0 else f Application Combo set Text application  initializeApplicationSection ILaunchConfiguration CoreException getApplicationAttribute getAttribute fApplicationCombo indexOf StringTokenizer StringTokenizer getAttribute hasMoreTokens nextToken hasMoreTokens nextToken fApplicationCombo indexOf fApplicationCombo indexOf LauncherUtils getDefaultApplicationName fApplicationCombo setText fApplicationCombo getItem fApplicationCombo getItemCount fApplicationCombo setText fApplicationCombo getItem fApplicationCombo setText
protected void initialize Workspace Data Section I Launch Configuration config throws Core Exception Array List items new Array List for int i 0 i 6 i String curr config get Attribute LOCATION String value Of i String null if curr null items contains curr items add curr f Workspace Combo set Items String items to Array new String items size if f Workspace Combo get Item Count 0 f Workspace Combo set Text items get 0 to String f Clear Workspace Check set Selection config get Attribute DOCLEAR false f Ask Clear Check set Selection config get Attribute ASKCLEAR true f Ask Clear Check set Enabled f Clear Workspace Check get Selection  initializeWorkspaceDataSection ILaunchConfiguration CoreException ArrayList ArrayList getAttribute valueOf fWorkspaceCombo setItems toArray fWorkspaceCombo getItemCount fWorkspaceCombo setText toString fClearWorkspaceCheck setSelection getAttribute fAskClearCheck setSelection getAttribute fAskClearCheck setEnabled fClearWorkspaceCheck getSelection
protected void initializeJRE Section I Launch Configuration config throws Core Exception f Jre Combo set Items Launcher Utils getVM Install Names String vm Install Name config get Attribute VMINSTALL Launcher Utils get DefaultVM Install Name f Jre Combo set Text vm Install Name if f Jre Combo get Selection Index 1 f Jre Combo set Text Launcher Utils get DefaultVM Install Name  initializeJRESection ILaunchConfiguration CoreException fJreCombo setItems LauncherUtils getVMInstallNames vmInstallName getAttribute LauncherUtils getDefaultVMInstallName fJreCombo setText vmInstallName fJreCombo getSelectionIndex fJreCombo setText LauncherUtils getDefaultVMInstallName
protected void initializeVM Args Section I Launch Configuration config throws Core Exception f Vm Args Text set Text config get Attribute VMARGS NON NLS 1  initializeVMArgsSection ILaunchConfiguration CoreException fVmArgsText setText getAttribute
protected void initialize Prog Args Section I Launch Configuration config throws Core Exception f Prog Args Text set Text config get Attribute PROGARGS Launcher Utils get Default Program Arguments  initializeProgArgsSection ILaunchConfiguration CoreException fProgArgsText setText getAttribute LauncherUtils getDefaultProgramArguments
private void initialize Bootstrap Entries Section I Launch Configuration config throws Core Exception f Bootstrap set Text config get Attribute BOOTSTRAP ENTRIES NON NLS 1  initializeBootstrapEntriesSection ILaunchConfiguration CoreException fBootstrap setText getAttribute BOOTSTRAP_ENTRIES
public void set Defaults I Launch Configuration Working Copy config config set Attribute LOCATION 0 Launcher Utils get Default Workspace NON NLS 1 config set Attribute DOCLEAR false config set Attribute ASKCLEAR true config set Attribute PROGARGS Launcher Utils get Default Program Arguments config set Attribute VMARGS NON NLS 1 config set Attribute BOOTSTRAP ENTRIES NON NLS 1  setDefaults ILaunchConfigurationWorkingCopy setAttribute LauncherUtils getDefaultWorkspace setAttribute setAttribute setAttribute LauncherUtils getDefaultProgramArguments setAttribute setAttribute BOOTSTRAP_ENTRIES
protected void do Restore Defaults f Prog Args Text set Text Launcher Utils get Default Program Arguments f Vm Args Text set Text NON NLS 1 f Workspace Combo set Text Launcher Utils get Default Workspace f Clear Workspace Check set Selection false f Ask Clear Check set Selection true f Ask Clear Check set Enabled false f Jre Combo set Text Launcher Utils get DefaultVM Install Name f Application Button set Selection true f Application Combo set Text Launcher Utils get Default Application Name f Application Combo set Enabled true f Product Button set Selection false f Product Combo set Enabled false f Product Combo set Enabled false update Launch Configuration Dialog  doRestoreDefaults fProgArgsText setText LauncherUtils getDefaultProgramArguments fVmArgsText setText fWorkspaceCombo setText LauncherUtils getDefaultWorkspace fClearWorkspaceCheck setSelection fAskClearCheck setSelection fAskClearCheck setEnabled fJreCombo setText LauncherUtils getDefaultVMInstallName fApplicationButton setSelection fApplicationCombo setText LauncherUtils getDefaultApplicationName fApplicationCombo setEnabled fProductButton setSelection fProductCombo setEnabled fProductCombo setEnabled updateLaunchConfigurationDialog
private void update Status update Status get More Severe f Workspace Selection Status f Jre Selection Status  updateStatus updateStatus getMoreSevere fWorkspaceSelectionStatus fJreSelectionStatus
public void perform Apply I Launch Configuration Working Copy config try save Workspace Data Section config save Application Section config save Product Section config saveJRE Section config saveVM Args Section config save Prog Args Section config save Bootstrap Entries Section config catch Core Exception e PDE Plugin log Exception e  performApply ILaunchConfigurationWorkingCopy saveWorkspaceDataSection saveApplicationSection saveProductSection saveJRESection saveVMArgsSection saveProgArgsSection saveBootstrapEntriesSection CoreException PDEPlugin logException
protected void save Workspace Data Section I Launch Configuration Working Copy config throws Core Exception config set Attribute LOCATION String value Of 0 f Workspace Combo get Text String items f Workspace Combo get Items int n Entries Math min items length 5 for int i 0 i n Entries i config set Attribute LOCATION String value Of i 1 items i config set Attribute DOCLEAR f Clear Workspace Check get Selection config set Attribute ASKCLEAR f Ask Clear Check get Selection  saveWorkspaceDataSection ILaunchConfigurationWorkingCopy CoreException setAttribute valueOf fWorkspaceCombo getText fWorkspaceCombo getItems nEntries nEntries setAttribute valueOf setAttribute fClearWorkspaceCheck getSelection setAttribute fAskClearCheck getSelection
protected void saveJRE Section I Launch Configuration Working Copy config throws Core Exception if f Jre Combo get Selection Index 1 return String jre f Jre Combo get Text if config get Attribute VMINSTALL String null null config set Attribute VMINSTALL jre else config set Attribute VMINSTALL jre equals Launcher Utils get DefaultVM Install Name null jre  saveJRESection ILaunchConfigurationWorkingCopy CoreException fJreCombo getSelectionIndex fJreCombo getText getAttribute setAttribute setAttribute LauncherUtils getDefaultVMInstallName
protected void saveVM Args Section I Launch Configuration Working Copy config config set Attribute VMARGS f Vm Args Text get Text trim  saveVMArgsSection ILaunchConfigurationWorkingCopy setAttribute fVmArgsText getText
protected void save Prog Args Section I Launch Configuration Working Copy config config set Attribute PROGARGS f Prog Args Text get Text trim  saveProgArgsSection ILaunchConfigurationWorkingCopy setAttribute fProgArgsText getText
protected void save Bootstrap Entries Section I Launch Configuration Working Copy config config set Attribute BOOTSTRAP ENTRIES f Bootstrap get Text trim  saveBootstrapEntriesSection ILaunchConfigurationWorkingCopy setAttribute BOOTSTRAP_ENTRIES fBootstrap getText
protected void save Product Section I Launch Configuration Working Copy config config set Attribute USE PRODUCT f Product Button get Selection config set Attribute PRODUCT f Product Combo get Text  saveProductSection ILaunchConfigurationWorkingCopy setAttribute USE_PRODUCT fProductButton getSelection setAttribute fProductCombo getText
protected void save Application Section I Launch Configuration Working Copy config String text f Application Combo get Text String attribute get Application Attribute if text length 0 text equals Launcher Utils get Default Application Name config set Attribute attribute String null else config set Attribute attribute text  saveApplicationSection ILaunchConfigurationWorkingCopy fApplicationCombo getText getApplicationAttribute LauncherUtils getDefaultApplicationName setAttribute setAttribute
private I Path choose Workspace Location Directory Dialog dialog new Directory Dialog get Control get Shell dialog set Filter Path f Workspace Combo get Text dialog set Text PDE Plugin get Resource String Basic Launcher Tab workspace title NON NLS 1 dialog set Message PDE Plugin get Resource String Basic Launcher Tab workspace message NON NLS 1 String res dialog open if res null return new Path res return null  IPath chooseWorkspaceLocation DirectoryDialog DirectoryDialog getControl getShell setFilterPath fWorkspaceCombo getText setText PDEPlugin getResourceString BasicLauncherTab setMessage PDEPlugin getResourceString BasicLauncherTab
private I Status validateJRE Selection if f Jre Combo get Selection Index 1 return create Status I Status ERROR PDE Plugin get Resource String Basic Launcher Tab noJRE NON NLS 1 return create Status I Status OK NON NLS 1  IStatus validateJRESelection fJreCombo getSelectionIndex createStatus IStatus PDEPlugin getResourceString BasicLauncherTab createStatus IStatus
private I Status validate Workspace Selection String location f Workspace Combo get Text trim if Path ROOT is Valid Path location return create Status I Status ERROR PDE Plugin get Resource String Basic Launcher Tab invalid Workspace NON NLS 1 I Path curr new Path location if curr segment Count 0 curr get Device null return create Status I Status ERROR PDE Plugin get Resource String Basic Launcher Tab no Workspace NON NLS 1 return create Status I Status OK NON NLS 1  IStatus validateWorkspaceSelection fWorkspaceCombo getText isValidPath createStatus IStatus PDEPlugin getResourceString BasicLauncherTab invalidWorkspace IPath segmentCount getDevice createStatus IStatus PDEPlugin getResourceString BasicLauncherTab noWorkspace createStatus IStatus
public String get Name return PDE Plugin get Resource String KEY NAME  getName PDEPlugin getResourceString KEY_NAME
public Image get Image return f Image  getImage fImage

private int start Level 1 public Selection Dialog Shell parent Shell I Plugin Model Base models boolean multiple Selection super parent Shell models multiple Selection  startLevel SelectionDialog parentShell IPluginModelBase multipleSelection parentShell multipleSelection
protected Control create Dialog Area Composite parent Composite area Composite super create Dialog Area parent Composite container new Composite area SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height layout margin Width 0 container set Layout layout container set Layout Data new Grid Data Grid Data FILL HORIZONTAL Label label new Label container SWT NONE label set Text PDE Plugin get Resource String Configuration Tab start Level NON NLS 1 start Level Text new Text container SWT SINGLE SWT BORDER start Level Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL return area  createDialogArea createDialogArea GridLayout GridLayout numColumns marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_HORIZONTAL setText PDEPlugin getResourceString ConfigurationTab startLevel startLevelText startLevelText setLayoutData GridData GridData FILL_HORIZONTAL
public int get Start Level return start Level  getStartLevel startLevel
protected void ok Pressed String level start Level Text get Text trim if level length 0 try Integer integer new Integer level if integer int Value 0 start Level integer int Value catch Number Format Exception e super ok Pressed  okPressed startLevelText getText intValue startLevel intValue NumberFormatException okPressed
public Integer start Level public Entry I Plugin Model Base model int level this model model start Level new Integer level  startLevel IPluginModelBase startLevel
public boolean equals Object obj if obj instanceof Entry return Entry obj model get Plugin Base get Id equals model get Plugin Base get Id return false  getPluginBase getId getPluginBase getId
class Content Provider extends Default Table Provider public Object get Elements Object input Element return Array List input Element to Array  ContentProvider DefaultTableProvider getElements inputElement ArrayList inputElement toArray
class Configuration Label Provider extends Label Provider implements I Table Label Provider public Image get Column Image Object element int column Index if column Index 0 element instanceof Entry I Plugin Model Base model Entry element model return PDE Plugin get Default get Label Provider get Image model return null  ConfigurationLabelProvider LabelProvider ITableLabelProvider getColumnImage columnIndex columnIndex IPluginModelBase PDEPlugin getDefault getLabelProvider getImage
public String get Column Text Object element int column Index if element instanceof Entry Entry entry Entry element switch column Index case 0 I Plugin Base plugin entry model get Plugin Base return plugin get Id plugin get Version NON NLS 1 NON NLS 2 case 1 int start entry start Level int Value return start 0 entry start Level to String PDE Plugin get Resource String Configuration Tab unspecified NON NLS 1 return null  getColumnText columnIndex columnIndex IPluginBase getPluginBase getId getVersion startLevel intValue startLevel toString PDEPlugin getResourceString ConfigurationTab
public Configuration Tab PDE Plugin get Default get Label Provider connect this f Image PDE Plugin Images DESC PLUGIN CONFIG OBJ create Image  ConfigurationTab PDEPlugin getDefault getLabelProvider fImage PDEPluginImages DESC_PLUGIN_CONFIG_OBJ createImage
private void initialize Default Plugins f Plugin List clear Hash Map map Launcher Utils get Auto Start Plugins true NON NLS 1 Iterator iter map key Set iterator while iter has Next Object object iter next String id String object to String trim I Plugin Model Base model get Plugin id if model null f Plugin List add new Entry model Integer map get object int Value  initializeDefaultPlugins fPluginList HashMap LauncherUtils getAutoStartPlugins keySet hasNext toString IPluginModelBase getPlugin fPluginList intValue
private void initialize Plugins String selected f Plugin List clear String Tokenizer tokenizer new String Tokenizer selected NON NLS 1 while tokenizer has More Tokens String token tokenizer next Token trim String id token substring 0 token index Of Integer level new Integer token substring token index Of 1 I Plugin Model Base model get Plugin id if model null f Plugin List add new Entry model level int Value  initializePlugins fPluginList StringTokenizer StringTokenizer hasMoreTokens nextToken indexOf indexOf IPluginModelBase getPlugin fPluginList intValue
private I Plugin Model Base get Plugin String id Plugin Model Manager manager PDE Core get Default get Model Manager Model Entry entry manager find Entry id return entry null null entry get Active Model  IPluginModelBase getPlugin PluginModelManager PDECore getDefault getModelManager ModelEntry findEntry getActiveModel
f Use Default add Selection Listener new Selection Adapter public void widget Selected Selection Event e if f Use Default get Selection initialize Default Plugins f Table Viewer refresh enable Buttons f Use Default get Selection update Launch Configuration Dialog  fUseDefault addSelectionListener SelectionAdapter widgetSelected SelectionEvent fUseDefault getSelection initializeDefaultPlugins fTableViewer enableButtons fUseDefault getSelection updateLaunchConfigurationDialog
f Clear Config set Text PDE Plugin get Resource String Configuration Tab clear Area NON NLS 1 f Clear Config add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  fClearConfig setText PDEPlugin getResourceString ConfigurationTab clearArea fClearConfig addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
public void create Control Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout container set Layout layout container set Layout Data new Grid Data Grid Data FILL BOTH create Starting Space container 1 Label label new Label container SWT WRAP label set Text PDE Plugin get Resource String Configuration Tab list Label NON NLS 1 Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 300 label set Layout Data gd Composite middle new Composite container SWT NONE layout new Grid Layout layout num Columns 2 layout margin Width layout margin Height 0 middle set Layout layout middle set Layout Data new Grid Data Grid Data FILL BOTH create Viewer middle create Button Container middle f Use Default new Button container SWT CHECK f Use Default set Text PDE Plugin get Resource String Configuration Tab default List NON NLS 1 f Use Default add Selection Listener new Selection Adapter public void widget Selected Selection Event e if f Use Default get Selection initialize Default Plugins f Table Viewer refresh enable Buttons f Use Default get Selection update Launch Configuration Dialog f Clear Config new Button container SWT CHECK f Clear Config set Text PDE Plugin get Resource String Configuration Tab clear Area NON NLS 1 f Clear Config add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog Dialog apply Dialog Font container set Control container  createControl GridLayout GridLayout setLayout setLayoutData GridData GridData FILL_BOTH createStartingSpace setText PDEPlugin getResourceString ConfigurationTab listLabel GridData GridData GridData FILL_HORIZONTAL widthHint setLayoutData GridLayout numColumns marginWidth marginHeight setLayout setLayoutData GridData GridData FILL_BOTH createViewer createButtonContainer fUseDefault fUseDefault setText PDEPlugin getResourceString ConfigurationTab defaultList fUseDefault addSelectionListener SelectionAdapter widgetSelected SelectionEvent fUseDefault getSelection initializeDefaultPlugins fTableViewer enableButtons fUseDefault getSelection updateLaunchConfigurationDialog fClearConfig fClearConfig setText PDEPlugin getResourceString ConfigurationTab clearArea fClearConfig addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog applyDialogFont setControl
f Table Viewer set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 String id1 Entry e1 model get Plugin Base get Id String id2 Entry e2 model get Plugin Base get Id return super compare viewer id1 id2  fTableViewer setSorter ViewerSorter getPluginBase getId getPluginBase getId
f Table Viewer set Input f Plugin List f Table Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event enable Buttons f Use Default get Selection  fTableViewer setInput fPluginList fTableViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent enableButtons fUseDefault getSelection
private void create Viewer Composite container Table table new Table container SWT BORDER SWT FULL SELECTION SWT MULTI Table Column column1 new Table Column table SWT NONE column1 set Text PDE Plugin get Resource String Configuration Tab col1 NON NLS 1 Table Column column2 new Table Column table SWT NONE column2 set Text PDE Plugin get Resource String Configuration Tab col2 NON NLS 1 table set Header Visible true Table Layout layout new Table Layout layout add Column Data new Column Weight Data 80 layout add Column Data new Column Weight Data 20 table set Layout layout f Table Viewer new Table Viewer table f Table Viewer set Content Provider new Content Provider f Table Viewer set Label Provider new Configuration Label Provider f Table Viewer set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 String id1 Entry e1 model get Plugin Base get Id String id2 Entry e2 model get Plugin Base get Id return super compare viewer id1 id2 f Table Viewer set Input f Plugin List f Table Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event enable Buttons f Use Default get Selection Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint 100 gd width Hint 300 table set Layout Data gd  createViewer FULL_SELECTION TableColumn TableColumn setText PDEPlugin getResourceString ConfigurationTab TableColumn TableColumn setText PDEPlugin getResourceString ConfigurationTab setHeaderVisible TableLayout TableLayout addColumnData ColumnWeightData addColumnData ColumnWeightData setLayout fTableViewer TableViewer fTableViewer setContentProvider ContentProvider fTableViewer setLabelProvider ConfigurationLabelProvider fTableViewer setSorter ViewerSorter getPluginBase getId getPluginBase getId fTableViewer setInput fPluginList fTableViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent enableButtons fUseDefault getSelection GridData GridData GridData FILL_BOTH heightHint widthHint setLayoutData
f Add Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Plugin Model Base models PDE Core get Default get Model Manager get Plugins Array List list new Array List for int i 0 i models length i if f Plugin List contains new Entry models i 1 list add models i Selection Dialog dialog new Selection Dialog get Shell I Plugin Model Base list to Array new I Plugin Model Base list size true if dialog open Plugin Selection Dialog OK Object selected dialog get Result for int i 0 i selected length i f Plugin List add new Entry I Plugin Model Base selected i dialog get Start Level f Table Viewer refresh update Launch Configuration Dialog  fAddButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent IPluginModelBase PDECore getDefault getModelManager getPlugins ArrayList ArrayList fPluginList SelectionDialog SelectionDialog getShell IPluginModelBase toArray IPluginModelBase PluginSelectionDialog getResult fPluginList IPluginModelBase getStartLevel fTableViewer updateLaunchConfigurationDialog
f Remove Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e int index f Table Viewer get Table get Selection Indices 0 Table Item items f Table Viewer get Table get Selection for int i 0 i items length i f Plugin List remove items i get Data f Table Viewer refresh if index f Plugin List size 1 index f Plugin List size 1 if index 0 f Table Viewer set Selection new Structured Selection f Table Viewer get Element At index f Remove Button set Enabled index 0 update Launch Configuration Dialog  fRemoveButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fTableViewer getTable getSelectionIndices TableItem fTableViewer getTable getSelection fPluginList getData fTableViewer fPluginList fPluginList fTableViewer setSelection StructuredSelection fTableViewer getElementAt fRemoveButton setEnabled updateLaunchConfigurationDialog
private void create Button Container Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width layout margin Height 0 container set Layout layout container set Layout Data new Grid Data Grid Data FILL VERTICAL f Add Button new Button container SWT PUSH f Add Button set Text PDE Plugin get Resource String Configuration Tab add NON NLS 1 f Add Button set Layout Data new Grid Data SWT Util set Button Dimension Hint f Add Button f Add Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Plugin Model Base models PDE Core get Default get Model Manager get Plugins Array List list new Array List for int i 0 i models length i if f Plugin List contains new Entry models i 1 list add models i Selection Dialog dialog new Selection Dialog get Shell I Plugin Model Base list to Array new I Plugin Model Base list size true if dialog open Plugin Selection Dialog OK Object selected dialog get Result for int i 0 i selected length i f Plugin List add new Entry I Plugin Model Base selected i dialog get Start Level f Table Viewer refresh update Launch Configuration Dialog f Remove Button new Button container SWT PUSH f Remove Button set Text PDE Plugin get Resource String Configuration Tab remove NON NLS 1 f Remove Button set Layout Data new Grid Data SWT Util set Button Dimension Hint f Remove Button f Remove Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e int index f Table Viewer get Table get Selection Indices 0 Table Item items f Table Viewer get Table get Selection for int i 0 i items length i f Plugin List remove items i get Data f Table Viewer refresh if index f Plugin List size 1 index f Plugin List size 1 if index 0 f Table Viewer set Selection new Structured Selection f Table Viewer get Element At index f Remove Button set Enabled index 0 update Launch Configuration Dialog  createButtonContainer GridLayout GridLayout marginWidth marginHeight setLayout setLayoutData GridData GridData FILL_VERTICAL fAddButton fAddButton setText PDEPlugin getResourceString ConfigurationTab fAddButton setLayoutData GridData SWTUtil setButtonDimensionHint fAddButton fAddButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent IPluginModelBase PDECore getDefault getModelManager getPlugins ArrayList ArrayList fPluginList SelectionDialog SelectionDialog getShell IPluginModelBase toArray IPluginModelBase PluginSelectionDialog getResult fPluginList IPluginModelBase getStartLevel fTableViewer updateLaunchConfigurationDialog fRemoveButton fRemoveButton setText PDEPlugin getResourceString ConfigurationTab fRemoveButton setLayoutData GridData SWTUtil setButtonDimensionHint fRemoveButton fRemoveButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fTableViewer getTable getSelectionIndices TableItem fTableViewer getTable getSelection fPluginList getData fTableViewer fPluginList fPluginList fTableViewer setSelection StructuredSelection fTableViewer getElementAt fRemoveButton setEnabled updateLaunchConfigurationDialog
public void dispose f Image dispose PDE Plugin get Default get Label Provider disconnect this super dispose  fImage PDEPlugin getDefault getLabelProvider
see org eclipse debug ui I Launch Configuration Tab set Defaults org eclipse debug core I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration configuration set Attribute CONFIG USE DEFAULT true configuration set Attribute CONFIG CLEAR false  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy setAttribute CONFIG_USE_DEFAULT setAttribute CONFIG_CLEAR
public void initialize From I Launch Configuration configuration try boolean use Default configuration get Attribute CONFIG USE DEFAULT true if use Default initialize Default Plugins else initialize Plugins configuration get Attribute CONFIG AUTO START NON NLS 1 f Use Default set Selection use Default enable Buttons use Default f Clear Config set Selection configuration get Attribute CONFIG CLEAR false catch Core Exception e f Table Viewer set Input f Plugin List  initializeFrom ILaunchConfiguration useDefault getAttribute CONFIG_USE_DEFAULT useDefault initializeDefaultPlugins initializePlugins getAttribute CONFIG_AUTO_START fUseDefault setSelection useDefault enableButtons useDefault fClearConfig setSelection getAttribute CONFIG_CLEAR CoreException fTableViewer setInput fPluginList
private void enable Buttons boolean enabled I Selection selection f Table Viewer get Selection boolean selected selection null selection is Empty f Add Button set Enabled enabled f Remove Button set Enabled selected enabled  enableButtons ISelection fTableViewer getSelection isEmpty fAddButton setEnabled fRemoveButton setEnabled
public void perform Apply I Launch Configuration Working Copy configuration configuration set Attribute CONFIG CLEAR f Clear Config get Selection configuration set Attribute CONFIG USE DEFAULT f Use Default get Selection if f Use Default get Selection String Buffer buffer new String Buffer for int i 0 i f Plugin List size i Entry entry Entry f Plugin List get i I Plugin Model Base model entry model buffer append model get Plugin Base get Id entry start Level NON NLS 1 if i f Plugin List size 1 buffer append configuration set Attribute CONFIG AUTO START buffer to String else configuration set Attribute CONFIG AUTO START String null  performApply ILaunchConfigurationWorkingCopy setAttribute CONFIG_CLEAR fClearConfig getSelection setAttribute CONFIG_USE_DEFAULT fUseDefault getSelection fUseDefault getSelection StringBuffer StringBuffer fPluginList fPluginList IPluginModelBase getPluginBase getId startLevel fPluginList setAttribute CONFIG_AUTO_START toString setAttribute CONFIG_AUTO_START
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return PDE Plugin get Resource String Configuration Tab name NON NLS 1  ILaunchConfigurationTab getName getName PDEPlugin getResourceString ConfigurationTab
see org eclipse debug ui Abstract Launch Configuration Tab get Image public Image get Image return f Image  AbstractLaunchConfigurationTab getImage getImage fImage

see org eclipse jface preference I Preference Node add org eclipse jface preference I Preference Node public void add I Preference Node node  IPreferenceNode IPreferenceNode IPreferenceNode
see org eclipse jface preference I Preference Node create Page public void create Page page new JR Es Preference Page  IPreferenceNode createPage createPage JREsPreferencePage
public void dispose Resources if page null page dispose page null  disposeResources
see org eclipse jface preference I Preference Node find Sub Node java lang String public I Preference Node find Sub Node String id return null  IPreferenceNode findSubNode IPreferenceNode findSubNode
see org eclipse jface preference I Preference Node get Id public String get Id return org eclipse jdt debug ui preferences VM Preference Page NON NLS 1  IPreferenceNode getId getId VMPreferencePage
see org eclipse jface preference I Preference Node get Label Image public Image get Label Image return null  IPreferenceNode getLabelImage getLabelImage
see org eclipse jface preference I Preference Node get Label Text public String get Label Text return PDE Plugin get Resource String Basic Launcher Tab jre Preference Page NON NLS 1  IPreferenceNode getLabelText getLabelText PDEPlugin getResourceString BasicLauncherTab jrePreferencePage
see org eclipse jface preference I Preference Node get Page public I Preference Page get Page return page  IPreferenceNode getPage IPreferencePage getPage
see org eclipse jface preference I Preference Node get Sub Nodes public I Preference Node get Sub Nodes return new I Preference Node 0  IPreferenceNode getSubNodes IPreferenceNode getSubNodes IPreferenceNode
see org eclipse jface preference I Preference Node remove java lang String public I Preference Node remove String id return null  IPreferenceNode IPreferenceNode
see org eclipse jface preference I Preference Node remove org eclipse jface preference I Preference Node public boolean remove I Preference Node node return false  IPreferenceNode IPreferenceNode IPreferenceNode

public class J Unit Arguments Tab extends Basic Launcher Tab protected String get Application Attribute return APP TO TEST  JUnitArgumentsTab BasicLauncherTab getApplicationAttribute APP_TO_TEST
public void set Defaults I Launch Configuration Working Copy config config set Attribute LOCATION 0 NON NLS 1 Launcher Utils get Default Path append runtime test workspace toOS String NON NLS 1 config set Attribute DOCLEAR true config set Attribute ASKCLEAR false config set Attribute PROGARGS Launcher Utils get Default Program Arguments config set Attribute VMARGS NON NLS 1 config set Attribute BOOTSTRAP ENTRIES NON NLS 1 if J Unit Launch Configuration requiresUI config config set Attribute APPLICATION J Unit Launch Configuration CORE APPLICATION  setDefaults ILaunchConfigurationWorkingCopy setAttribute LauncherUtils getDefaultPath toOSString setAttribute setAttribute setAttribute LauncherUtils getDefaultProgramArguments setAttribute setAttribute BOOTSTRAP_ENTRIES JUnitLaunchConfiguration setAttribute JUnitLaunchConfiguration CORE_APPLICATION
protected String get Application Names Tree Set result new Tree Set result add PDE Plugin get Resource String J Unit Arguments Tab headless NON NLS 1 I Plugin Model Base plugins PDE Core get Default get Model Manager get Plugins for int i 0 i plugins length i I Plugin Extension extensions plugins i get Plugin Base get Extensions for int j 0 j extensions length j String point extensions j get Point if point null point equals org eclipse core runtime applications NON NLS 1 String id extensions j get Plugin Base get Id extensions j get Id NON NLS 1 if id null id starts With org eclipse pde junit runtime NON NLS 1 result add id return String result to Array new String result size  getApplicationNames TreeSet TreeSet PDEPlugin getResourceString JUnitArgumentsTab IPluginModelBase PDECore getDefault getModelManager getPlugins IPluginExtension getPluginBase getExtensions getPoint getPluginBase getId getId startsWith toArray
protected void initialize Application Section I Launch Configuration config throws Core Exception String application config get Attribute APPLICATION String null if J Unit Launch Configuration CORE APPLICATION equals application f Application Combo set Text f Application Combo get Item 0 else super initialize Application Section config  initializeApplicationSection ILaunchConfiguration CoreException getAttribute JUnitLaunchConfiguration CORE_APPLICATION fApplicationCombo setText fApplicationCombo getItem initializeApplicationSection
protected void save Application Section I Launch Configuration Working Copy config if f Application Combo get Selection Index 0 config set Attribute APPLICATION J Unit Launch Configuration CORE APPLICATION else config set Attribute APPLICATION String null super save Application Section config  saveApplicationSection ILaunchConfigurationWorkingCopy fApplicationCombo getSelectionIndex setAttribute JUnitLaunchConfiguration CORE_APPLICATION setAttribute saveApplicationSection

public void launch I Launch Configuration configuration String mode I Launch launch I Progress Monitor monitor throws Core Exception try f Config Dir null monitor begin Task 6 NON NLS 1 I Java Project java Project get Java Project configuration if java Project null java Project exists abort PDE Plugin get Resource String J Unit Launch Configuration error invalidproject null I Java Launch Configuration Constants ERR NOT A JAVA PROJECT NON NLS 1 NON NLS 2 I Type test Types get Test Types configuration java Project new Sub Progress Monitor monitor 1 if test Types length 0 abort PDE Plugin get Resource String J Unit Launch Configuration error notests null I Java Launch Configuration Constants ERR UNSPECIFIED MAIN TYPE NON NLS 1 monitor worked 1 String workspace configuration get Attribute LOCATION 0 get Default Workspace configuration NON NLS 1 if Launcher Utils clear Workspace configuration workspace new Sub Progress Monitor monitor 1 monitor set Canceled true return if configuration get Attribute CONFIG CLEAR false Launcher Utils clear Config Area get Config Dir configuration new Sub Progress Monitor monitor 1 launch set Attribute I Launcher Settings CONFIG LOCATION get Config Dir configuration to String IVM Install launcher Launcher Utils create Launcher configuration monitor worked 1 int port Socket Util find Free Port VM Runner Configuration runner Config createVM Runner configuration test Types port mode if runner Config null monitor set Canceled true return monitor worked 1 set Default Source Locator launch configuration launch set Attribute PORT ATTR Integer to String port launch set Attribute TESTTYPE ATTR test Types 0 get Handle Identifier PDE Plugin get Default get Launches Listener manage launch launcher getVM Runner mode run runner Config launch monitor monitor worked 1 catch Core Exception e monitor set Canceled true throw e  ILaunchConfiguration ILaunch IProgressMonitor CoreException fConfigDir beginTask IJavaProject javaProject getJavaProject javaProject javaProject PDEPlugin getResourceString JUnitLaunchConfiguration IJavaLaunchConfigurationConstants ERR_NOT_A_JAVA_PROJECT IType testTypes getTestTypes javaProject SubProgressMonitor testTypes PDEPlugin getResourceString JUnitLaunchConfiguration IJavaLaunchConfigurationConstants ERR_UNSPECIFIED_MAIN_TYPE getAttribute getDefaultWorkspace LauncherUtils clearWorkspace SubProgressMonitor setCanceled getAttribute CONFIG_CLEAR LauncherUtils clearConfigArea getConfigDir SubProgressMonitor setAttribute ILauncherSettings CONFIG_LOCATION getConfigDir toString IVMInstall LauncherUtils createLauncher SocketUtil findFreePort VMRunnerConfiguration runnerConfig createVMRunner testTypes runnerConfig setCanceled setDefaultSourceLocator setAttribute PORT_ATTR toString setAttribute TESTTYPE_ATTR testTypes getHandleIdentifier PDEPlugin getDefault getLaunchesListener getVMRunner runnerConfig CoreException setCanceled
protected VM Runner Configuration createVM Runner I Launch Configuration configuration I Type test Types int port String run Mode throws Core Exception String classpath Launcher Utils construct Classpath configuration if classpath null abort PDE Plugin get Resource String KEY NO STARTUP null I Status OK Program arguments String program Args compute Program Arguments configuration test Types port run Mode if program Args null return null Environment variables String envp Debug Plugin get Default get Launch Manager get Environment configuration VM Runner Configuration runner Config new VM Runner Configuration org eclipse core launcher Main classpath NON NLS 1 runner Config setVM Arguments computeVM Arguments configuration runner Config set Program Arguments program Args runner Config set Environment envp return runner Config  VMRunnerConfiguration createVMRunner ILaunchConfiguration IType testTypes runMode CoreException LauncherUtils constructClasspath PDEPlugin getResourceString KEY_NO_STARTUP IStatus programArgs computeProgramArguments testTypes runMode programArgs DebugPlugin getDefault getLaunchManager getEnvironment VMRunnerConfiguration runnerConfig VMRunnerConfiguration runnerConfig setVMArguments computeVMArguments runnerConfig setProgramArguments programArgs runnerConfig setEnvironment runnerConfig
protected String get Test Plugin Id I Launch Configuration configuration throws Core Exception I Java Project java Project get Java Project configuration I Plugin Model Base model PDE Core get Default get Model Manager find Model java Project get Project if model null throw new Core Exception new Status I Status ERROR PDE Plugin PLUGIN ID I Status ERROR PDE Plugin get Resource String J Unit Launch Configuration error notaplugin NON NLS 1 null return model get Plugin Base get Id  getTestPluginId ILaunchConfiguration CoreException IJavaProject javaProject getJavaProject IPluginModelBase PDECore getDefault getModelManager findModel javaProject getProject CoreException IStatus PDEPlugin PLUGIN_ID IStatus PDEPlugin getResourceString JUnitLaunchConfiguration getPluginBase getId
protected void abort String message Throwable exception int code throws Core Exception throw new Core Exception new Status I Status ERROR PDE Plugin PLUGIN ID code message exception  CoreException CoreException IStatus PDEPlugin PLUGIN_ID
private String compute Program Arguments I Launch Configuration configuration I Type test Types int port String run Mode throws Core Exception Array List program Args new Array List Get the list of plug ins to run Tree Map plugin Map Launcher Utils get Plugins To Run configuration if plugin Map null return null add Required Plugins plugin Map program Args add version NON NLS 1 program Args add 3 NON NLS 1 Specify the application to launch based on the list of plug ins to run program Args add application NON NLS 1 program Args add get Application Name plugin Map configuration If a product is specified then add it to the program args if configuration get Attribute USE PRODUCT false program Args add product NON NLS 1 program Args add configuration get Attribute PRODUCT NON NLS 1 else Specify the application to test String test Application configuration get Attribute APP TO TEST String null if test Application null test Application length 0 program Args add test Application NON NLS 1 program Args add test Application Specify the location of the runtime workbench String target Workspace configuration get Attribute LOCATION 0 get Default Workspace configuration NON NLS 1 program Args add data NON NLS 1 program Args add target Workspace Create the platform configuration for the runtime workbench String primary Feature Id Launcher Utils get Primary Feature Id Target Platform create Platform Configuration Area plugin Map get Config Dir configuration primary Feature Id Launcher Utils get Auto Start Plugins configuration program Args add configuration NON NLS 1 if PDE Core get Default get Model Manager isOS Gi Runtime program Args add file new Path get Config Dir configuration get Path add Trailing Separator to String NON NLS 1 else program Args add file new Path get Config Dir configuration get Path append platform cfg to String NON NLS 1 NON NLS 2 if PDE Core get Default get Model Manager isOS Gi Runtime if primary Feature Id null program Args add feature NON NLS 1 program Args add primary Feature Id Pre OS Gi platforms need the location of org eclipse core boot specified I Plugin Model Base boot Model I Plugin Model Base plugin Map get org eclipse core boot NON NLS 1 String boot Path Launcher Utils get Boot Path boot Model if boot Path null boot Path ends With jar NON NLS 1 program Args add boot NON NLS 1 program Args add file boot Path NON NLS 1 Specify the output folder names program Args add dev NON NLS 1 if PDE Core get Default get Model Manager isOS Gi Runtime program Args add Classpath Helper get Dev Entries Properties get Config Dir configuration to String dev properties true NON NLS 1 else program Args add Classpath Helper get Dev Entries true Create the options file if tracing is turned on if configuration get Attribute TRACING false TRACING NONE equals configuration get Attribute TRACING CHECKED String null program Args add debug NON NLS 1 String path get Config Dir configuration get Path Path SEPARATOR options NON NLS 1 program Args add Launcher Utils get Tracing File Argument configuration path Add the program args entered by the user String Tokenizer tokenizer new String Tokenizer configuration get Attribute PROGARGS NON NLS 1 while tokenizer has More Tokens program Args add tokenizer next Token if keep Alive configuration run Mode equals I Launch Manager DEBUG MODE program Args add keepalive NON NLS 1 program Args add port NON NLS 1 program Args add Integer to String port program Args add testpluginname NON NLS 1 program Args add get Test Plugin Id configuration a testname was specified just run the single test String test Name configuration get Attribute J Unit Base Launch Configuration TESTNAME ATTR NON NLS 1 if test Name length 0 program Args add test NON NLS 1 program Args add test Types 0 get Fully Qualified Name test Name NON NLS 1 else program Args add classnames NON NLS 1 for int i 0 i test Types length i program Args add test Types i get Fully Qualified Name return String program Args to Array new String program Args size  computeProgramArguments ILaunchConfiguration IType testTypes runMode CoreException ArrayList programArgs ArrayList TreeMap pluginMap LauncherUtils getPluginsToRun pluginMap addRequiredPlugins pluginMap programArgs programArgs programArgs programArgs getApplicationName pluginMap getAttribute USE_PRODUCT programArgs programArgs getAttribute testApplication getAttribute APP_TO_TEST testApplication testApplication programArgs testApplication programArgs testApplication targetWorkspace getAttribute getDefaultWorkspace programArgs programArgs targetWorkspace primaryFeatureId LauncherUtils getPrimaryFeatureId TargetPlatform createPlatformConfigurationArea pluginMap getConfigDir primaryFeatureId LauncherUtils getAutoStartPlugins programArgs PDECore getDefault getModelManager isOSGiRuntime programArgs getConfigDir getPath addTrailingSeparator toString programArgs getConfigDir getPath toString PDECore getDefault getModelManager isOSGiRuntime primaryFeatureId programArgs programArgs primaryFeatureId OSGi IPluginModelBase bootModel IPluginModelBase pluginMap bootPath LauncherUtils getBootPath bootModel bootPath bootPath endsWith programArgs programArgs bootPath programArgs PDECore getDefault getModelManager isOSGiRuntime programArgs ClasspathHelper getDevEntriesProperties getConfigDir toString programArgs ClasspathHelper getDevEntries getAttribute TRACING_NONE getAttribute TRACING_CHECKED programArgs getConfigDir getPath programArgs LauncherUtils getTracingFileArgument StringTokenizer StringTokenizer getAttribute hasMoreTokens programArgs nextToken keepAlive runMode ILaunchManager DEBUG_MODE programArgs programArgs programArgs toString programArgs programArgs getTestPluginId testName getAttribute JUnitBaseLaunchConfiguration TESTNAME_ATTR testName programArgs programArgs testTypes getFullyQualifiedName testName programArgs testTypes programArgs testTypes getFullyQualifiedName programArgs toArray programArgs
private I Plugin Model Base add Required Plugins Tree Map plugin Map throws Core Exception if plugin Map contains Key org eclipse pde junit runtime NON NLS 1 plugin Map put org eclipse pde junit runtime NON NLS 1 find Plugin org eclipse pde junit runtime NON NLS 1 if plugin Map contains Key org eclipse jdt junit runtime NON NLS 1 plugin Map put org eclipse jdt junit runtime NON NLS 1 find Plugin org eclipse jdt junit runtime NON NLS 1 if plugin Map contains Key org junit NON NLS 1 plugin Map put org junit find Plugin org junit NON NLS 1 NON NLS 2 return I Plugin Model Base plugin Map values to Array new I Plugin Model Base plugin Map size  IPluginModelBase addRequiredPlugins TreeMap pluginMap CoreException pluginMap containsKey pluginMap findPlugin pluginMap containsKey pluginMap findPlugin pluginMap containsKey pluginMap findPlugin IPluginModelBase pluginMap toArray IPluginModelBase pluginMap
private I Plugin Model Base find Plugin String id throws Core Exception Plugin Model Manager manager PDE Core get Default get Model Manager I Plugin Model Base model manager find Model id if model null return model if registry Plugins null URL plugin Paths Plugin Path Finder get Plugin Paths Boot Loader get InstallURL get File registry Plugins Target Platform Registry Loader load Models plugin Paths false new Null Progress Monitor for int i 0 i registry Plugins length i if registry Plugins i get Plugin Base get Id equals id return registry Plugins i abort PDE Plugin get Formatted Message J Unit Launch Configuration error missing Plugin NON NLS 1 id null I Status OK return null  IPluginModelBase findPlugin CoreException PluginModelManager PDECore getDefault getModelManager IPluginModelBase findModel registryPlugins pluginPaths PluginPathFinder getPluginPaths BootLoader getInstallURL getFile registryPlugins TargetPlatformRegistryLoader loadModels pluginPaths NullProgressMonitor registryPlugins registryPlugins getPluginBase getId registryPlugins PDEPlugin getFormattedMessage JUnitLaunchConfiguration missingPlugin IStatus
private String computeVM Arguments I Launch Configuration configuration throws Core Exception return new Execution Arguments getVM Arguments configuration getVM Arguments Array NON NLS 1  computeVMArguments ILaunchConfiguration CoreException ExecutionArguments getVMArguments getVMArgumentsArray
public String get Program Arguments I Launch Configuration configuration throws Core Exception return configuration get Attribute I Launcher Settings PROGARGS NON NLS 1  getProgramArguments ILaunchConfiguration CoreException getAttribute ILauncherSettings
public String getVM Arguments I Launch Configuration configuration throws Core Exception return configuration get Attribute I Launcher Settings VMARGS NON NLS 1  getVMArguments ILaunchConfiguration CoreException getAttribute ILauncherSettings
protected void set Default Source Locator I Launch launch I Launch Configuration configuration throws Core Exception Launcher Utils set Default Source Locator configuration launch  setDefaultSourceLocator ILaunch ILaunchConfiguration CoreException LauncherUtils setDefaultSourceLocator
private String get Default Workspace I Launch Configuration config throws Core Exception if config get Attribute APPLICATION UI APPLICATION equals UI APPLICATION return Launcher Utils get Default Path append junit workbench workspace toOS String NON NLS 1 return Launcher Utils get Default Path append junit core workspace toOS String NON NLS 1  getDefaultWorkspace ILaunchConfiguration CoreException getAttribute UI_APPLICATION UI_APPLICATION LauncherUtils getDefaultPath toOSString LauncherUtils getDefaultPath toOSString
private String get Application Name Tree Map plugin Map I Launch Configuration configuration try String application configuration get Attribute APPLICATION String null if CORE APPLICATION equals application requiresUI configuration return CORE APPLICATION catch Core Exception e I Plugin Model Base model I Plugin Model Base plugin Map get org eclipse ui NON NLS 1 if model null I Plugin Extension extensions model get Plugin Base get Extensions for int i 0 i extensions length i String point extensions i get Point if point null point equals org eclipse core runtime applications NON NLS 1 if workbench equals extensions i get Id NON NLS 1 return LEGACY UI APPLICATION return UI APPLICATION  getApplicationName TreeMap pluginMap ILaunchConfiguration getAttribute CORE_APPLICATION CORE_APPLICATION CoreException IPluginModelBase IPluginModelBase pluginMap IPluginExtension getPluginBase getExtensions getPoint getId LEGACY_UI_APPLICATION UI_APPLICATION
public static String get PluginID I Launch Configuration configuration try String projectID configuration get Attribute I Java Launch Configuration Constants ATTR PROJECT NAME NON NLS 1 if projectID length 0 I Resource project PDE Plugin get Workspace get Root find Member projectID if project null project instanceof I Project I Plugin Model Base model PDE Core get Default get Model Manager find Model I Project project if model null return model get Plugin Base get Id catch Core Exception e return null  getPluginID ILaunchConfiguration getAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME IResource PDEPlugin getWorkspace getRoot findMember IProject IPluginModelBase PDECore getDefault getModelManager findModel IProject getPluginBase getId CoreException
public static boolean requiresUI I Launch Configuration configuration String id get PluginID configuration if id null I Plugin Model Base models get Plugin And Prereqs id int i 0 for i models length i if org eclipse swt equals models i get Plugin Base get Id NON NLS 1 return true return false return true  ILaunchConfiguration getPluginID IPluginModelBase getPluginAndPrereqs getPluginBase getId
public static I Plugin Model Base get Plugin And Prereqs String id Tree Map map new Tree Map add Plugin And Prereqs id map if PDE Core get Default get Model Manager isOS Gi Runtime add Plugin And Prereqs org eclipse core boot map NON NLS 1 add Plugin And Prereqs org eclipse core runtime map NON NLS 1 return I Plugin Model Base map values to Array new I Plugin Model Base map size  IPluginModelBase getPluginAndPrereqs TreeMap TreeMap addPluginAndPrereqs PDECore getDefault getModelManager isOSGiRuntime addPluginAndPrereqs addPluginAndPrereqs IPluginModelBase toArray IPluginModelBase
private static void add Plugin And Prereqs String id Tree Map map if map contains Key id return Model Entry entry PDE Core get Default get Model Manager find Entry id if entry null return I Plugin Model Base model entry get Active Model map put id model I Plugin Import imports model get Plugin Base get Imports for int i 0 i imports length i add Plugin And Prereqs imports i get Id map if model instanceof I Fragment Model add Plugin And Prereqs I Fragment Model model get Fragment get Plugin Id map else I Fragment fragments PDE Core get Default find Fragments For id model get Plugin Base get Version for int i 0 i fragments length i add Plugin And Prereqs fragments i get Id map  addPluginAndPrereqs TreeMap containsKey ModelEntry PDECore getDefault getModelManager findEntry IPluginModelBase getActiveModel IPluginImport getPluginBase getImports addPluginAndPrereqs getId IFragmentModel addPluginAndPrereqs IFragmentModel getFragment getPluginId IFragment PDECore getDefault findFragmentsFor getPluginBase getVersion addPluginAndPrereqs getId
private File get Config Dir I Launch Configuration config if f Config Dir null f Config Dir Launcher Utils create Config Area config get Name if f Config Dir exists f Config Dir mkdirs return f Config Dir  getConfigDir ILaunchConfiguration fConfigDir fConfigDir LauncherUtils createConfigArea getName fConfigDir fConfigDir fConfigDir
see org eclipse debug core model Launch Configuration Delegate get Build Order org eclipse debug core I Launch Configuration java lang String protected I Project get Build Order I Launch Configuration configuration String mode throws Core Exception return compute Build Order Launcher Utils get Affected Projects configuration  LaunchConfigurationDelegate getBuildOrder ILaunchConfiguration IProject getBuildOrder ILaunchConfiguration CoreException computeBuildOrder LauncherUtils getAffectedProjects
protected I Project get Projects For Problem Search I Launch Configuration configuration String mode throws Core Exception return Launcher Utils get Affected Projects configuration  IProject getProjectsForProblemSearch ILaunchConfiguration CoreException LauncherUtils getAffectedProjects

public class J Unit Tab Group extends Abstract Launch Configuration Tab Group see I Launch Configuration Tab Group create Tabs I Launch Configuration Dialog String public void create Tabs I Launch Configuration Dialog dialog String mode I Launch Configuration Tab tabs null if PDE Core get Default get Model Manager isOS Gi Runtime tabs new I Launch Configuration Tab new J Unit Main Tab new J Unit Arguments Tab new Advanced Launcher Tab false new Tracing Launcher Tab new Configuration Tab new Source Lookup Tab new Environment Tab new Common Tab else tabs new I Launch Configuration Tab new J Unit Main Tab new J Unit Arguments Tab new Advanced Launcher Tab false new Tracing Launcher Tab new Source Lookup Tab new Environment Tab new Common Tab set Tabs tabs  JUnitTabGroup AbstractLaunchConfigurationTabGroup ILaunchConfigurationTabGroup createTabs ILaunchConfigurationDialog createTabs ILaunchConfigurationDialog ILaunchConfigurationTab PDECore getDefault getModelManager isOSGiRuntime ILaunchConfigurationTab JUnitMainTab JUnitArgumentsTab AdvancedLauncherTab TracingLauncherTab ConfigurationTab SourceLookupTab EnvironmentTab CommonTab ILaunchConfigurationTab JUnitMainTab JUnitArgumentsTab AdvancedLauncherTab TracingLauncherTab SourceLookupTab EnvironmentTab CommonTab setTabs
see I Launch Configuration Tab Group set Defaults I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy config super set Defaults config config set Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER org eclipse pde ui workbench Classpath Provider NON NLS 1  ILaunchConfigurationTabGroup setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy setDefaults setAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER workbenchClasspathProvider
Busy Indicator show While Display get Current new Runnable public void run try String id config get Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER String null if id null config instanceof I Launch Configuration Working Copy I Launch Configuration Working Copy wc I Launch Configuration Working Copy config wc set Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER org eclipse pde ui workbench Classpath Provider NON NLS 1 catch Core Exception e for int i 0 i tabs length i tabs i initialize From config  BusyIndicator showWhile getCurrent getAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER workbenchClasspathProvider CoreException initializeFrom
see org eclipse debug ui Abstract Launch Configuration Tab Group initialize From I Launch Configuration public void initialize From I Launch Configuration configuration final I Launch Configuration config configuration final I Launch Configuration Tab tabs get Tabs Busy Indicator show While Display get Current new Runnable public void run try String id config get Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER String null if id null config instanceof I Launch Configuration Working Copy I Launch Configuration Working Copy wc I Launch Configuration Working Copy config wc set Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER org eclipse pde ui workbench Classpath Provider NON NLS 1 catch Core Exception e for int i 0 i tabs length i tabs i initialize From config  AbstractLaunchConfigurationTabGroup initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration ILaunchConfiguration ILaunchConfigurationTab getTabs BusyIndicator showWhile getCurrent getAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER workbenchClasspathProvider CoreException initializeFrom

Returns the local java launch config type protected I Launch Configuration Type getJ Unit Launch Config Type I Launch Manager lm Debug Plugin get Default get Launch Manager return lm get Launch Configuration Type org eclipse pde ui Junit Launch Config NON NLS 1  ILaunchConfigurationType getJUnitLaunchConfigType ILaunchManager DebugPlugin getDefault getLaunchManager getLaunchConfigurationType JunitLaunchConfig
protected I Launch Configuration create Configuration I Java Project project String name String main Type String container String test Name I Launch Configuration config null try I Launch Configuration Type config Type getJ Unit Launch Config Type I Launch Configuration Working Copy wc config Type new Instance null get Launch Manager generate Unique Launch Configuration Name From name wc set Attribute I Launcher Settings LOCATION 0 get Default Workspace Location NON NLS 1 wc set Attribute I Launcher Settings VMARGS NON NLS 1 wc set Attribute I Launcher Settings PROGARGS Launcher Utils get Default Program Arguments wc set Attribute I Launcher Settings USECUSTOM true wc set Attribute I Launcher Settings DOCLEAR true wc set Attribute I Launcher Settings ASKCLEAR false wc set Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER org eclipse pde ui workbench Classpath Provider NON NLS 1 wc set Attribute I Java Launch Configuration Constants ATTR PROJECT NAME project get Element Name wc set Attribute I Java Launch Configuration Constants ATTR MAIN TYPE NAME main Type wc set Attribute J Unit Base Launch Configuration ATTR KEEPRUNNING false wc set Attribute J Unit Base Launch Configuration LAUNCH CONTAINER ATTR container if test Name length 0 wc set Attribute J Unit Base Launch Configuration TESTNAME ATTR test Name config wc do Save catch Core Exception ce PDE Plugin log ce return config  ILaunchConfiguration createConfiguration IJavaProject mainType testName ILaunchConfiguration ILaunchConfigurationType configType getJUnitLaunchConfigType ILaunchConfigurationWorkingCopy configType newInstance getLaunchManager generateUniqueLaunchConfigurationNameFrom setAttribute ILauncherSettings getDefaultWorkspaceLocation setAttribute ILauncherSettings setAttribute ILauncherSettings LauncherUtils getDefaultProgramArguments setAttribute ILauncherSettings setAttribute ILauncherSettings setAttribute ILauncherSettings setAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER workbenchClasspathProvider setAttribute IJavaLaunchConfigurationConstants ATTR_PROJECT_NAME getElementName setAttribute IJavaLaunchConfigurationConstants ATTR_MAIN_TYPE_NAME mainType setAttribute JUnitBaseLaunchConfiguration ATTR_KEEPRUNNING setAttribute JUnitBaseLaunchConfiguration LAUNCH_CONTAINER_ATTR testName setAttribute JUnitBaseLaunchConfiguration TESTNAME_ATTR testName doSave CoreException PDEPlugin
protected String get Default Workspace Location return Launcher Utils get Default Path append junit workbench workspace toOS String NON NLS 1  getDefaultWorkspaceLocation LauncherUtils getDefaultPath toOSString

public static IVM Install get AllVM Instances Array List res new Array List IVM Install Type types Java Runtime getVM Install Types for int i 0 i types length i IVM Install installs types i getVM Installs for int k 0 k installs length k res add installs k return IVM Install res to Array new IVM Install res size  IVMInstall getAllVMInstances ArrayList ArrayList IVMInstallType JavaRuntime getVMInstallTypes IVMInstall getVMInstalls IVMInstall toArray IVMInstall
public static String getVM Install Names IVM Install installs get AllVM Instances String names new String installs length for int i 0 i installs length i names i installs i get Name return names  getVMInstallNames IVMInstall getAllVMInstances getName
public static String get DefaultVM Install Name IVM Install install Java Runtime get DefaultVM Install if install null return install get Name return null  getDefaultVMInstallName IVMInstall JavaRuntime getDefaultVMInstall getName
public static IVM Install getVM Install String name if name null IVM Install installs get AllVM Instances for int i 0 i installs length i if installs i get Name equals name return installs i return Java Runtime get DefaultVM Install  IVMInstall getVMInstall IVMInstall getAllVMInstances getName JavaRuntime getDefaultVMInstall
public static String get Default Program Arguments String os Target Platform getOS String ws Target Platform getWS String arch Target Platform getOS Arch String nl Target Platform getNL String args os os ws ws arch arch nl nl NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 if PDE Core get Default get Model Manager isOS Gi Runtime return args clean NON NLS 1 return args  getDefaultProgramArguments TargetPlatform TargetPlatform TargetPlatform getOSArch TargetPlatform PDECore getDefault getModelManager isOSGiRuntime
public static String get Default Workspace return get Default Path append runtime workspace toOS String NON NLS 1  getDefaultWorkspace getDefaultPath toOSString
public static I Path get Default Path return PDE Plugin get Workspace get Root get Location remove Last Segments 1  IPath getDefaultPath PDEPlugin getWorkspace getRoot getLocation removeLastSegments
public static Tree Set parse DeselectedWS Ids I Launch Configuration config throws Core Exception Tree Set deselected new Tree Set String ids config get Attribute I Launcher Settings WSPROJECT String null if ids null String Tokenizer tok new String Tokenizer ids File path Separator while tok has More Tokens deselected add tok next Token return deselected  TreeSet parseDeselectedWSIds ILaunchConfiguration CoreException TreeSet TreeSet getAttribute ILauncherSettings StringTokenizer StringTokenizer pathSeparator hasMoreTokens nextToken
public static Tree Set parse Selected Ext Ids I Launch Configuration config throws Core Exception Tree Set selected new Tree Set String ids config get Attribute I Launcher Settings EXTPLUGINS String null if ids null String Tokenizer tok new String Tokenizer ids File path Separator while tok has More Tokens String token tok next Token int loc token last Index Of if loc 1 selected add token else if token char At loc 1 t selected add token substring 0 loc return selected  TreeSet parseSelectedExtIds ILaunchConfiguration CoreException TreeSet TreeSet getAttribute ILauncherSettings StringTokenizer StringTokenizer pathSeparator hasMoreTokens nextToken lastIndexOf charAt
public static String construct Classpath I Launch Configuration configuration throws Core Exception String jar Path get Startup Jar Path if jar Path null return null Array List entries new Array List entries add jar Path String Tokenizer tok new String Tokenizer configuration get Attribute I Launcher Settings BOOTSTRAP ENTRIES NON NLS 1 NON NLS 2 while tok has More Tokens entries add tok next Token trim return String entries to Array new String entries size  constructClasspath ILaunchConfiguration CoreException jarPath getStartupJarPath jarPath ArrayList ArrayList jarPath StringTokenizer StringTokenizer getAttribute ILauncherSettings BOOTSTRAP_ENTRIES hasMoreTokens nextToken toArray
private static String get Startup Jar Path throws Core Exception I Plugin plugin PDE Core get Default find Plugin org eclipse platform NON NLS 1 if plugin null plugin get Model get Underlying Resource null I Project project plugin get Model get Underlying Resource get Project if project has Nature Java Core NATURE ID I Java Project j Project Java Core create project I Package Fragment Root roots j Project get Package Fragment Roots for int i 0 i roots length i if roots i get Kind I Package Fragment Root K SOURCE roots i get Package Fragment org eclipse core launcher exists NON NLS 1 I Path path j Project get Output Location remove First Segments 1 return project get Location append path toOS String if project get File startup jar exists NON NLS 1 return project get File startup jar get Location toOS String NON NLS 1 File startup Jar External Model Manager get Eclipse Home append startup jar to File NON NLS 1 if something goes wrong with the preferences fall back on the startup jar in the running eclipse if startup Jar exists startup Jar new Path External Model Manager compute Default Platform Path append startup jar to File NON NLS 1 return startup Jar exists startup Jar get Absolute Path null  getStartupJarPath CoreException IPlugin PDECore getDefault findPlugin getModel getUnderlyingResource IProject getModel getUnderlyingResource getProject hasNature JavaCore NATURE_ID IJavaProject jProject JavaCore IPackageFragmentRoot jProject getPackageFragmentRoots getKind IPackageFragmentRoot K_SOURCE getPackageFragment IPath jProject getOutputLocation removeFirstSegments getLocation toOSString getFile getFile getLocation toOSString startupJar ExternalModelManager getEclipseHome toFile startupJar startupJar ExternalModelManager computeDefaultPlatformPath toFile startupJar startupJar getAbsolutePath
display sync Exec new Runnable public void run Message Dialog open Error display get Active Shell PDE Plugin get Resource String KEY TITLE PDE Plugin get Formatted Message KEY MISSING REQUIRED required Plugin  syncExec MessageDialog openError getActiveShell PDEPlugin getResourceString KEY_TITLE PDEPlugin getFormattedMessage KEY_MISSING_REQUIRED requiredPlugin
public static Tree Map get Plugins To Run I Launch Configuration config throws Core Exception Tree Map map null Array List status Entries new Array List if config get Attribute I Launcher Settings USECUSTOM true map validate Plugins get Selected Plugins config status Entries if map null map validate Plugins PDE Core get Default get Model Manager get Plugins status Entries final String required Plugin if PDE Core get Default get Model Manager isOS Gi Runtime required Plugin org eclipse osgi NON NLS 1 else required Plugin org eclipse core boot NON NLS 1 if map contains Key required Plugin final Display display get Display display sync Exec new Runnable public void run Message Dialog open Error display get Active Shell PDE Plugin get Resource String KEY TITLE PDE Plugin get Formatted Message KEY MISSING REQUIRED required Plugin return null alert user if any plug ins are not loaded correctly if status Entries size 0 final Multi Status multi Status new Multi Status PDE Plugin get Plugin Id I Status OK I Status status Entries to Array new I Status status Entries size PDE Plugin get Resource String KEY BROKEN PLUGINS null if ignore Validation Errors multi Status return null return map  TreeMap getPluginsToRun ILaunchConfiguration CoreException TreeMap ArrayList statusEntries ArrayList getAttribute ILauncherSettings validatePlugins getSelectedPlugins statusEntries validatePlugins PDECore getDefault getModelManager getPlugins statusEntries requiredPlugin PDECore getDefault getModelManager isOSGiRuntime requiredPlugin requiredPlugin containsKey requiredPlugin getDisplay syncExec MessageDialog openError getActiveShell PDEPlugin getResourceString KEY_TITLE PDEPlugin getFormattedMessage KEY_MISSING_REQUIRED requiredPlugin statusEntries MultiStatus multiStatus MultiStatus PDEPlugin getPluginId IStatus IStatus statusEntries toArray IStatus statusEntries PDEPlugin getResourceString KEY_BROKEN_PLUGINS ignoreValidationErrors multiStatus
public static Hash Map get Auto Start Plugins I Launch Configuration config boolean use Default true String custom Auto Start NON NLS 1 try use Default config get Attribute I Launcher Settings CONFIG USE DEFAULT true custom Auto Start config get Attribute I Launcher Settings CONFIG AUTO START NON NLS 1 catch Core Exception e return get Auto Start Plugins use Default custom Auto Start  HashMap getAutoStartPlugins ILaunchConfiguration useDefault customAutoStart useDefault getAttribute ILauncherSettings CONFIG_USE_DEFAULT customAutoStart getAttribute ILauncherSettings CONFIG_AUTO_START CoreException getAutoStartPlugins useDefault customAutoStart
public static Hash Map get Auto Start Plugins boolean use Default String custom Auto Start Hash Map list new Hash Map if PDE Core get Default get Model Manager isOS Gi Runtime list put org eclipse core boot new Integer 0 NON NLS 1 else String bundles null if use Default Properties prop get Config Ini Properties External Model Manager get Eclipse Home toOS String configuration config ini NON NLS 1 if prop null bundles prop get Property osgi bundles NON NLS 1 if prop null bundles null String path getOS Gi Path if path null prop get Config Ini Properties path eclipse properties NON NLS 1 if prop null bundles prop get Property osgi bundles NON NLS 1 else bundles custom Auto Start if bundles null String Tokenizer tokenizer new String Tokenizer bundles NON NLS 1 while tokenizer has More Tokens String token tokenizer next Token trim int index token index Of if index 1 index token length 1 continue String start token substring index 1 if start index Of start 1 use Default NON NLS 1 Integer level index 1 get Start Level start new Integer 1 list put index 1 token substring 0 token index Of token level return list  HashMap getAutoStartPlugins useDefault customAutoStart HashMap HashMap PDECore getDefault getModelManager isOSGiRuntime useDefault getConfigIniProperties ExternalModelManager getEclipseHome toOSString getProperty getOSGiPath getConfigIniProperties getProperty customAutoStart StringTokenizer StringTokenizer hasMoreTokens nextToken indexOf indexOf useDefault getStartLevel indexOf
private static String getOS Gi Path Model Entry entry PDE Core get Default get Model Manager find Entry org eclipse osgi NON NLS 1 if entry null I Plugin Model Base model entry get Active Model if model get Underlying Resource null return model get Underlying Resource get Location remove Last Segments 2 toOS String return model get Install Location return null  getOSGiPath ModelEntry PDECore getDefault getModelManager findEntry IPluginModelBase getActiveModel getUnderlyingResource getUnderlyingResource getLocation removeLastSegments toOSString getInstallLocation
private static Integer get Start Level String text String Tokenizer tok new String Tokenizer text NON NLS 1 while tok has More Tokens String token tok next Token trim try return new Integer token catch Number Format Exception e return new Integer 1  getStartLevel StringTokenizer StringTokenizer hasMoreTokens nextToken NumberFormatException
private static I Plugin Model Base get Selected Plugins I Launch Configuration config throws Core Exception Tree Map map new Tree Map I Plugin Model Base wsmodels PDE Core get Default get Workspace Model Manager get All Models Set deselectedWS Plugins parse DeselectedWS Ids config for int i 0 i wsmodels length i String id wsmodels i get Plugin Base get Id if id null deselectedWS Plugins contains id map put id wsmodels i Set selected Ex Models parse Selected Ext Ids config I Plugin Model Base exmodels PDE Core get Default get External Model Manager get All Models for int i 0 i exmodels length i String id exmodels i get Plugin Base get Id if id null selected Ex Models contains id map contains Key id map put id exmodels i return I Plugin Model Base map values to Array new I Plugin Model Base map size  IPluginModelBase getSelectedPlugins ILaunchConfiguration CoreException TreeMap TreeMap IPluginModelBase PDECore getDefault getWorkspaceModelManager getAllModels deselectedWSPlugins parseDeselectedWSIds getPluginBase getId deselectedWSPlugins selectedExModels parseSelectedExtIds IPluginModelBase PDECore getDefault getExternalModelManager getAllModels getPluginBase getId selectedExModels containsKey IPluginModelBase toArray IPluginModelBase
public static I Project get Affected Projects I Launch Configuration config throws Core Exception Array List projects new Array List I Plugin Model Base models PDE Core get Default get Workspace Model Manager get All Models Set ignored parse DeselectedWS Ids config for int i 0 i models length i String id models i get Plugin Base get Id if id null id length 0 ignored contains id continue I Project project models i get Underlying Resource get Project if project has Nature Java Core NATURE ID projects add project return I Project projects to Array new I Project projects size  IProject getAffectedProjects ILaunchConfiguration CoreException ArrayList ArrayList IPluginModelBase PDECore getDefault getWorkspaceModelManager getAllModels parseDeselectedWSIds getPluginBase getId IProject getUnderlyingResource getProject hasNature JavaCore NATURE_ID IProject toArray IProject
private static Tree Map validate Plugins I Plugin Model Base models Array List status Entries Tree Map map new Tree Map for int i 0 i models length i I Status status validate Model models i if status null String id models i get Plugin Base get Id if id null map put id models i else status Entries add status return map  TreeMap validatePlugins IPluginModelBase ArrayList statusEntries TreeMap TreeMap IStatus validateModel getPluginBase getId statusEntries
private static I Status validate Model I Plugin Model Base model return model is Loaded null new Status I Status WARNING PDE Plugin get Plugin Id I Status OK model get Plugin Base get Id null  IStatus validateModel IPluginModelBase isLoaded IStatus PDEPlugin getPluginId IStatus getPluginBase getId
public static String get Boot Path I Plugin Model Base boot Model try I Resource resource boot Model get Underlying Resource if resource null I Project project resource get Project if project has Nature Java Core NATURE ID resource project find Member boot jar NON NLS 1 if resource null return file resource get Location toOS String NON NLS 1 I Path path Java Core create project get Output Location if path null I Path source Boot Path project get Parent get Location append path return source Boot Path add Trailing Separator toOS String else File boot Jar new File boot Model get Install Location boot jar NON NLS 1 if boot Jar exists return file boot Jar get Absolute Path NON NLS 1 catch Core Exception e return null  getBootPath IPluginModelBase bootModel IResource bootModel getUnderlyingResource IProject getProject hasNature JavaCore NATURE_ID findMember getLocation toOSString IPath JavaCore getOutputLocation IPath sourceBootPath getParent getLocation sourceBootPath addTrailingSeparator toOSString bootJar bootModel getInstallLocation bootJar bootJar getAbsolutePath CoreException
get Display sync Exec new Runnable public void run result 0 Message Dialog open Confirm get Display get Active Shell PDE Plugin get Resource String KEY TITLE status get Message  getDisplay syncExec MessageDialog openConfirm getDisplay getActiveShell PDEPlugin getResourceString KEY_TITLE getMessage
private static boolean ignore Validation Errors final Multi Status status final boolean result new boolean 1 get Display sync Exec new Runnable public void run result 0 Message Dialog open Confirm get Display get Active Shell PDE Plugin get Resource String KEY TITLE status get Message return result 0  ignoreValidationErrors MultiStatus getDisplay syncExec MessageDialog openConfirm getDisplay getActiveShell PDEPlugin getResourceString KEY_TITLE getMessage
private static Display get Display Display display Display get Current if display null display Display get Default return display  getDisplay getCurrent getDefault
public static IVM Install create Launcher I Launch Configuration configuration throws Core Exception String vm configuration get Attribute I Launcher Settings VMINSTALL String null IVM Install launcher Launcher Utils getVM Install vm if launcher null throw new Core Exception create Error Status PDE Plugin get Formatted Message KEY NO JRE vm if launcher get Install Location exists throw new Core Exception create Error Status PDE Plugin get Resource String KEY JRE PATH NOT FOUND return launcher  IVMInstall createLauncher ILaunchConfiguration CoreException getAttribute ILauncherSettings IVMInstall LauncherUtils getVMInstall CoreException createErrorStatus PDEPlugin getFormattedMessage KEY_NO_JRE getInstallLocation CoreException createErrorStatus PDEPlugin getResourceString KEY_JRE_PATH_NOT_FOUND
public static I Status create Error Status String message return new Status I Status ERROR PDE Plugin get Plugin Id I Status OK message null  IStatus createErrorStatus IStatus PDEPlugin getPluginId IStatus
public static void set Default Source Locator I Launch Configuration configuration I Launch launch throws Core Exception I Launch Configuration Working Copy wc null if configuration is Working Copy wc I Launch Configuration Working Copy configuration else wc configuration get Working Copy set any old source locators to null Source locator is now declared in the plugin xml String locator configuration get Attribute I Launch Configuration ATTR SOURCE LOCATOR ID String null if locator null wc set Attribute I Launch Configuration ATTR SOURCE LOCATOR ID String null set source path provider on pre 2 1 configurations String id configuration get Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER String null if id null wc set Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER org eclipse pde ui workbench Classpath Provider NON NLS 1 if locator null id null wc do Save  setDefaultSourceLocator ILaunchConfiguration ILaunch CoreException ILaunchConfigurationWorkingCopy isWorkingCopy ILaunchConfigurationWorkingCopy getWorkingCopy getAttribute ILaunchConfiguration ATTR_SOURCE_LOCATOR_ID setAttribute ILaunchConfiguration ATTR_SOURCE_LOCATOR_ID getAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER setAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER workbenchClasspathProvider doSave
public static boolean clear Workspace I Launch Configuration configuration String workspace I Progress Monitor monitor throws Core Exception File workspace File new Path workspace to File if configuration get Attribute I Launcher Settings DOCLEAR false workspace File exists boolean do Clear configuration get Attribute I Launcher Settings ASKCLEAR true if do Clear int result confirm Delete Workspace workspace File if result 2 monitor done return false do Clear result 0 if do Clear try delete Content workspace File monitor catch IO Exception e show Warning Dialog PDE Plugin get Resource String KEY PROBLEMS DELETING monitor done return true  clearWorkspace ILaunchConfiguration IProgressMonitor CoreException workspaceFile toFile getAttribute ILauncherSettings workspaceFile doClear getAttribute ILauncherSettings doClear confirmDeleteWorkspace workspaceFile doClear doClear deleteContent workspaceFile IOException showWarningDialog PDEPlugin getResourceString KEY_PROBLEMS_DELETING
get Display sync Exec new Runnable public void run String title PDE Plugin get Resource String KEY TITLE Message Dialog open Warning get Display get Active Shell title message  getDisplay syncExec PDEPlugin getResourceString KEY_TITLE MessageDialog openWarning getDisplay getActiveShell
private static void show Warning Dialog final String message get Display sync Exec new Runnable public void run String title PDE Plugin get Resource String KEY TITLE Message Dialog open Warning get Display get Active Shell title message  showWarningDialog getDisplay syncExec PDEPlugin getResourceString KEY_TITLE MessageDialog openWarning getDisplay getActiveShell
get Display sync Exec new Runnable public void run String title PDE Plugin get Resource String KEY TITLE String message PDE Plugin get Formatted Message KEY DELETE WORKSPACE workspace File get Path Message Dialog dialog new Message Dialog get Display get Active Shell title null message Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL 0 result 0 dialog open  getDisplay syncExec PDEPlugin getResourceString KEY_TITLE PDEPlugin getFormattedMessage KEY_DELETE_WORKSPACE workspaceFile getPath MessageDialog MessageDialog getDisplay getActiveShell MessageDialog IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL
private static int confirm Delete Workspace final File workspace File final int result new int 1 get Display sync Exec new Runnable public void run String title PDE Plugin get Resource String KEY TITLE String message PDE Plugin get Formatted Message KEY DELETE WORKSPACE workspace File get Path Message Dialog dialog new Message Dialog get Display get Active Shell title null message Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL 0 result 0 dialog open return result 0  confirmDeleteWorkspace workspaceFile getDisplay syncExec PDEPlugin getResourceString KEY_TITLE PDEPlugin getFormattedMessage KEY_DELETE_WORKSPACE workspaceFile getPath MessageDialog MessageDialog getDisplay getActiveShell MessageDialog IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL
public static File create Config Area String name I Path state Path PDE Core get Default get State Location File dir new File state Path toOS String if name length 0 dir new File dir name if dir exists dir mkdirs return dir  createConfigArea IPath statePath PDECore getDefault getStateLocation statePath toOSString
public static void clear Config Area File config Dir I Progress Monitor monitor try delete Content config Dir monitor catch IO Exception e show Warning Dialog PDE Plugin get Resource String Launcher Utils problems Deleting Config NON NLS 1  clearConfigArea configDir IProgressMonitor deleteContent configDir IOException showWarningDialog PDEPlugin getResourceString LauncherUtils problemsDeletingConfig
private static void delete Content File curr I Progress Monitor monitor throws IO Exception if curr is Directory File children curr list Files if children null monitor begin Task children length NON NLS 1 for int i 0 i children length i delete Content children i new Sub Progress Monitor monitor 1 curr delete monitor done  deleteContent IProgressMonitor IOException isDirectory listFiles beginTask deleteContent SubProgressMonitor
public static String get Tracing File Argument I Launch Configuration config String options File Name throws Core Exception try Tracing Options Manager mng PDE Core get Default get Tracing Options Manager Map options config get Attribute I Launcher Settings TRACING OPTIONS Map null String selected config get Attribute I Launcher Settings TRACING CHECKED String null if selected null mng save options File Name options else if selected equals I Launcher Settings TRACING NONE Hash Set result new Hash Set String Tokenizer tokenizer new String Tokenizer selected NON NLS 1 while tokenizer has More Tokens result add tokenizer next Token mng save options File Name options result catch Core Exception e return NON NLS 1 return options File Name  getTracingFileArgument ILaunchConfiguration optionsFileName CoreException TracingOptionsManager PDECore getDefault getTracingOptionsManager getAttribute ILauncherSettings TRACING_OPTIONS getAttribute ILauncherSettings TRACING_CHECKED optionsFileName ILauncherSettings TRACING_NONE HashSet HashSet StringTokenizer StringTokenizer hasMoreTokens nextToken optionsFileName CoreException optionsFileName
public static String get Primary Feature Id boolean isOS Gi PDE Core get Default get Model Manager isOS Gi Runtime String filename isOS Gi configuration config ini install ini NON NLS 1 NON NLS 2 Properties properties get Config Ini Properties External Model Manager get Eclipse Home toOS String filename String property isOS Gi eclipse product feature default id NON NLS 1 NON NLS 2 return properties null null properties get Property property  getPrimaryFeatureId isOSGi PDECore getDefault getModelManager isOSGiRuntime isOSGi getConfigIniProperties ExternalModelManager getEclipseHome toOSString isOSGi getProperty
public static String get Default Application Name if PDE Core get Default get Model Manager isOS Gi Runtime return org eclipse ui workbench NON NLS 1 Properties properties get Config Ini Properties External Model Manager get Eclipse Home toOS String configuration config ini NON NLS 1 String app Name properties null properties get Property eclipse application null NON NLS 1 return app Name null app Name org eclipse ui ide workbench NON NLS 1  getDefaultApplicationName PDECore getDefault getModelManager isOSGiRuntime getConfigIniProperties ExternalModelManager getEclipseHome toOSString appName getProperty appName appName
public static Properties get Config Ini Properties String directory String filename File ini File new File directory filename if ini File exists return null Properties pini new Properties try File Input Stream fis new File Input Stream ini File pini load fis fis close return pini catch IO Exception e return null  getConfigIniProperties iniFile iniFile FileInputStream FileInputStream iniFile IOException

public static final long MAX FILE LENGTH 1024 1024 public Launch Listener managed Launches new Array List  MAX_FILE_LENGTH LaunchListener managedLaunches ArrayList
public void manage I Launch launch if managed Launches size 0 hook Listener true if managed Launches contains launch managed Launches add launch  ILaunch managedLaunches hookListener managedLaunches managedLaunches
see org eclipse debug core I Launches Listener launches Removed org eclipse debug core I Launch public void launch Removed I Launch launch update launch true  ILaunchesListener launchesRemoved ILaunch launchRemoved ILaunch
see org eclipse debug core I Launches Listener launches Added org eclipse debug core I Launch public void launch Added I Launch launch  ILaunchesListener launchesAdded ILaunch launchAdded ILaunch
see org eclipse debug core I Launches Listener launches Changed org eclipse debug core I Launch public void launch Changed I Launch launch  ILaunchesListener launchesChanged ILaunch launchChanged ILaunch
private void update I Launch launch boolean remove if managed Launches contains launch if remove launch is Terminated managed Launches remove launch if managed Launches size 0 hook Listener false  ILaunch managedLaunches isTerminated managedLaunches managedLaunches hookListener
private void hook Listener boolean add Debug Plugin debug Plugin Debug Plugin get Default I Launch Manager launch Manager debug Plugin get Launch Manager if add launch Manager add Launch Listener this debug Plugin add Debug Event Listener this else launch Manager remove Launch Listener this debug Plugin remove Debug Event Listener this  hookListener DebugPlugin debugPlugin DebugPlugin getDefault ILaunchManager launchManager debugPlugin getLaunchManager launchManager addLaunchListener debugPlugin addDebugEventListener launchManager removeLaunchListener debugPlugin removeDebugEventListener
private void do Restart I Launch launch I Launch Configuration config launch get Launch Configuration try config launch launch get Launch Mode new Null Progress Monitor catch Core Exception e PDE Plugin log Exception e  doRestart ILaunch ILaunchConfiguration getLaunchConfiguration getLaunchMode NullProgressMonitor CoreException PDEPlugin logException
public void shutdown hook Listener false  hookListener
see org eclipse debug core I Debug Event Set Listener handle Debug Events org eclipse debug core Debug Event public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i Object source event get Source if source instanceof I Process event get Kind Debug Event TERMINATE I Process process I Process source I Launch launch process get Launch if launch null try launch Terminated launch process get Exit Value catch Debug Exception e  IDebugEventSetListener handleDebugEvents DebugEvent handleDebugEvents DebugEvent DebugEvent getSource IProcess getKind DebugEvent IProcess IProcess ILaunch getLaunch launchTerminated getExitValue DebugException
Display get Default async Exec new Runnable public void run Message Dialog open Error PDE Plugin get Active Workbench Shell PDE Plugin get Resource String Launcher error title NON NLS 1 PDE Plugin get Resource String Launcher error code15 NON NLS 1  getDefault asyncExec MessageDialog openError PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString PDEPlugin getResourceString
Display get Default async Exec new Runnable public void run try File log get Most Recent Log File launch if log null Message Dialog open Question PDE Plugin get Active Workbench Shell PDE Plugin get Resource String Launcher error title NON NLS 1 PDE Plugin get Resource String Launcher error code13 NON NLS 1 if log exists if log length MAX FILE LENGTH Open Log Dialog open Dialog new Open Log Dialog PDE Plugin get Active Workbench Shell log open Dialog create open Dialog open else boolean can Launch Program launch log get Absolute Path if can Launch Program p Program find Program txt NON NLS 1 if p null p execute log get Absolute Path else Open Log Dialog open Dialog new Open Log Dialog PDE Plugin get Active Workbench Shell log open Dialog create open Dialog open catch Core Exception e  getDefault asyncExec getMostRecentLogFile MessageDialog openQuestion PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString PDEPlugin getResourceString MAX_FILE_LENGTH OpenLogDialog openDialog OpenLogDialog PDEPlugin getActiveWorkbenchShell openDialog openDialog canLaunch getAbsolutePath canLaunch findProgram getAbsolutePath OpenLogDialog openDialog OpenLogDialog PDEPlugin getActiveWorkbenchShell openDialog openDialog CoreException
private void launch Terminated final I Launch launch int return Value if managed Launches contains launch update launch true if return Value 23 do Restart launch return launch failed because the associated workspace is in use if return Value 15 Display get Default async Exec new Runnable public void run Message Dialog open Error PDE Plugin get Active Workbench Shell PDE Plugin get Resource String Launcher error title NON NLS 1 PDE Plugin get Resource String Launcher error code15 NON NLS 1 return launch failed for reasons printed to the log if return Value 13 Display get Default async Exec new Runnable public void run try File log get Most Recent Log File launch if log null Message Dialog open Question PDE Plugin get Active Workbench Shell PDE Plugin get Resource String Launcher error title NON NLS 1 PDE Plugin get Resource String Launcher error code13 NON NLS 1 if log exists if log length MAX FILE LENGTH Open Log Dialog open Dialog new Open Log Dialog PDE Plugin get Active Workbench Shell log open Dialog create open Dialog open else boolean can Launch Program launch log get Absolute Path if can Launch Program p Program find Program txt NON NLS 1 if p null p execute log get Absolute Path else Open Log Dialog open Dialog new Open Log Dialog PDE Plugin get Active Workbench Shell log open Dialog create open Dialog open catch Core Exception e  launchTerminated ILaunch returnValue managedLaunches returnValue doRestart returnValue getDefault asyncExec MessageDialog openError PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString PDEPlugin getResourceString returnValue getDefault asyncExec getMostRecentLogFile MessageDialog openQuestion PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString PDEPlugin getResourceString MAX_FILE_LENGTH OpenLogDialog openDialog OpenLogDialog PDEPlugin getActiveWorkbenchShell openDialog openDialog canLaunch getAbsolutePath canLaunch findProgram getAbsolutePath OpenLogDialog openDialog OpenLogDialog PDEPlugin getActiveWorkbenchShell openDialog openDialog CoreException
private File get Most Recent Log File I Launch launch throws Core Exception File latest null String workspace launch get Launch Configuration get Attribute I Launcher Settings LOCATION 0 NON NLS 1 NON NLS 2 if workspace length 0 latest new File workspace metadata log NON NLS 1 if latest exists latest null String dir launch get Attribute I Launcher Settings CONFIG LOCATION if dir null File config Dir new File dir File children config Dir list Files if children null for int i 0 i children length i if children i is Directory children i get Name ends With log NON NLS 1 if latest null latest last Modified children i last Modified latest children i return latest  getMostRecentLogFile ILaunch CoreException getLaunchConfiguration getAttribute ILauncherSettings getAttribute ILauncherSettings CONFIG_LOCATION configDir configDir listFiles isDirectory getName endsWith lastModified lastModified

public Open Log Dialog Shell parent Shell File log File super parent Shell this log File log File set Shell Style SWT DIALOG TRIM SWT RESIZE SWT MAX SWT MIN SWT MODELESS  OpenLogDialog parentShell logFile parentShell logFile logFile setShellStyle DIALOG_TRIM
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text PDE Plugin get Resource String Open Log Dialog title NON NLS 1 read Configuration  configureShell newShell configureShell newShell newShell setText PDEPlugin getResourceString OpenLogDialog readConfiguration
non Javadoc Method declared on Dialog protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants CLOSE ID I Dialog Constants CLOSE LABEL true  createButtonsForButtonBar createButton IDialogConstants CLOSE_ID IDialogConstants CLOSE_LABEL
public void create super create dialog location if dialog Location null get Shell set Location dialog Location dialog size if dialog Size null get Shell set Size dialog Size else get Shell set Size DEFAULT WIDTH DEFAULT HEIGHT get Button I Dialog Constants CLOSE ID set Focus  dialogLocation getShell setLocation dialogLocation dialogSize getShell setSize dialogSize getShell setSize DEFAULT_WIDTH DEFAULT_HEIGHT getButton IDialogConstants CLOSE_ID setFocus
protected Control create Dialog Area Composite parent Composite outer Composite super create Dialog Area parent Text text new Text outer SWT MULTI SWT BORDER SWT READ ONLY SWT V SCROLL SWT NO FOCUS SWT H SCROLL text set Background parent get Display get System Color SWT COLOR LIST BACKGROUND Grid Data grid Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN FILL grid Data grab Excess Vertical Space true grid Data grab Excess Horizontal Space true text set Layout Data grid Data text set Text get Log Summary return outer  createDialogArea createDialogArea READ_ONLY V_SCROLL NO_FOCUS H_SCROLL setBackground getDisplay getSystemColor COLOR_LIST_BACKGROUND GridData gridData GridData GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_FILL gridData grabExcessVerticalSpace gridData grabExcessHorizontalSpace setLayoutData gridData setText getLogSummary
private String get Log Summary String Writer out new String Writer Print Writer writer new Print Writer out if log File length Launch Listener MAX FILE LENGTH read Large File With Monitor writer else read File With Monitor writer writer close return out to String  getLogSummary StringWriter StringWriter PrintWriter PrintWriter logFile LaunchListener MAX_FILE_LENGTH readLargeFileWithMonitor readFileWithMonitor toString
reading file within MAX FILE LENGTH size private void read File Print Writer writer throws File Not Found Exception IO Exception Buffered Reader b Reader new Buffered Reader new File Reader log File while b Reader ready writer println b Reader read Line  MAX_FILE_LENGTH readFile PrintWriter FileNotFoundException IOException BufferedReader bReader BufferedReader FileReader logFile bReader bReader readLine
reading large files private void read Large File Print Writer writer throws File Not Found Exception IO Exception Random Access File random null boolean has Started false try random new Random Access File log File r NON NLS 1 random seek log File length Launch Listener MAX FILE LENGTH for String line random read Line if line null break line line trim if line length 0 continue if has Started line starts With ENTRY line starts With SESSION NON NLS 1 NON NLS 2 has Started true if has Started writer println line continue finally try if random null random close catch IO Exception e1  readLargeFile PrintWriter FileNotFoundException IOException RandomAccessFile hasStarted RandomAccessFile logFile logFile LaunchListener MAX_FILE_LENGTH readLine hasStarted startsWith startsWith hasStarted hasStarted IOException
protected void button Pressed int button Id if button Id I Dialog Constants CLOSE ID store Settings close super button Pressed button Id  buttonPressed buttonId buttonId IDialogConstants CLOSE_ID storeSettings buttonPressed buttonId
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task PDE Plugin get Resource String Open Log Dialog message I Progress Monitor UNKNOWN NON NLS 1 try read Large File writer catch IO Exception e writer println PDE Plugin get Resource String Open Log Dialog cannot Display NON NLS 1  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask PDEPlugin getResourceString OpenLogDialog IProgressMonitor readLargeFile IOException PDEPlugin getResourceString OpenLogDialog cannotDisplay
private void read Large File With Monitor final Print Writer writer I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task PDE Plugin get Resource String Open Log Dialog message I Progress Monitor UNKNOWN NON NLS 1 try read Large File writer catch IO Exception e writer println PDE Plugin get Resource String Open Log Dialog cannot Display NON NLS 1 Progress Monitor Dialog dialog new Progress Monitor Dialog get Parent Shell try dialog run true true runnable catch Invocation Target Exception e catch Interrupted Exception e  readLargeFileWithMonitor PrintWriter IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask PDEPlugin getResourceString OpenLogDialog IProgressMonitor readLargeFile IOException PDEPlugin getResourceString OpenLogDialog cannotDisplay ProgressMonitorDialog ProgressMonitorDialog getParentShell InvocationTargetException InterruptedException
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task PDE Plugin get Resource String Open Log Dialog message I Progress Monitor UNKNOWN NON NLS 1 try read File writer catch IO Exception e writer println PDE Plugin get Resource String Open Log Dialog cannot Display NON NLS 1  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask PDEPlugin getResourceString OpenLogDialog IProgressMonitor readFile IOException PDEPlugin getResourceString OpenLogDialog cannotDisplay
private void read File With Monitor final Print Writer writer I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task PDE Plugin get Resource String Open Log Dialog message I Progress Monitor UNKNOWN NON NLS 1 try read File writer catch IO Exception e writer println PDE Plugin get Resource String Open Log Dialog cannot Display NON NLS 1 Progress Monitor Dialog dialog new Progress Monitor Dialog get Parent Shell try dialog run true true runnable catch Invocation Target Exception e catch Interrupted Exception e  readFileWithMonitor PrintWriter IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask PDEPlugin getResourceString OpenLogDialog IProgressMonitor readFile IOException PDEPlugin getResourceString OpenLogDialog cannotDisplay ProgressMonitorDialog ProgressMonitorDialog getParentShell InvocationTargetException InterruptedException
configuration handling Stores the current state in the dialog settings since 2 0 private void store Settings write Configuration  storeSettings writeConfiguration
Returns the dialog settings object used to share state between several event detail dialogs return the dialog settings to be used private I Dialog Settings get Dialog Settings I Dialog Settings settings PDE Plugin get Default get Dialog Settings dialog Settings settings get Section get Class get Name if dialog Settings null dialog Settings settings add New Section get Class get Name return dialog Settings  IDialogSettings getDialogSettings IDialogSettings PDEPlugin getDefault getDialogSettings dialogSettings getSection getClass getName dialogSettings dialogSettings addNewSection getClass getName dialogSettings
Initializes itself from the dialog settings with the same state as at the previous invocation private void read Configuration I Dialog Settings s get Dialog Settings try int x s get Int x NON NLS 1 int y s get Int y NON NLS 1 dialog Location new Point x y x s get Int width NON NLS 1 y s get Int height NON NLS 1 dialog Size new Point x y catch Number Format Exception e dialog Location null dialog Size null  readConfiguration IDialogSettings getDialogSettings getInt getInt dialogLocation getInt getInt dialogSize NumberFormatException dialogLocation dialogSize
private void write Configuration I Dialog Settings s get Dialog Settings Point location get Shell get Location s put x location x NON NLS 1 s put y location y NON NLS 1 Point size get Shell get Size s put width size x NON NLS 1 s put height size y NON NLS 1  writeConfiguration IDialogSettings getDialogSettings getShell getLocation getShell getSize

public class Runtime Workbench Shortcut implements I Launch Shortcut public void run launch I Launch Manager RUN MODE  RuntimeWorkbenchShortcut ILaunchShortcut ILaunchManager RUN_MODE
public void debug launch I Launch Manager DEBUG MODE  ILaunchManager DEBUG_MODE
see I Launch Shortcut launch I Editor Part String public void launch I Editor Part editor String mode launch mode  ILaunchShortcut IEditorPart IEditorPart
see I Launch Shortcut launch I Selection String public void launch I Selection selection String mode launch mode  ILaunchShortcut ISelection ISelection
Launches a configuration in the given mode protected void launch String mode I Launch Configuration config find Launch Configuration mode if config null DebugUI Tools launch config mode  ILaunchConfiguration findLaunchConfiguration DebugUITools
Locate a configuration to relaunch If one cannot be found create one return a re useable config or code null code if none protected I Launch Configuration find Launch Configuration String mode I Launch Configuration configs get Launch Configurations get Workbench Launch Config Type if configs length 0 return create Configuration if configs length 1 return configs 0 Prompt the user to choose a config return choose Configuration configs mode  ILaunchConfiguration findLaunchConfiguration ILaunchConfiguration getLaunchConfigurations getWorkbenchLaunchConfigType createConfiguration chooseConfiguration
private I Launch Configuration get Launch Configurations I Launch Configuration Type config Type Array List result new Array List try I Launch Manager manager Debug Plugin get Default get Launch Manager I Launch Configuration configs manager get Launch Configurations config Type for int i 0 i configs length i if DebugUI Tools is Private configs i result add configs i catch Core Exception e return I Launch Configuration result to Array new I Launch Configuration result size  ILaunchConfiguration getLaunchConfigurations ILaunchConfigurationType configType ArrayList ArrayList ILaunchManager DebugPlugin getDefault getLaunchManager ILaunchConfiguration getLaunchConfigurations configType DebugUITools isPrivate CoreException ILaunchConfiguration toArray ILaunchConfiguration
Shows a selection dialog that allows the user to choose one of the specified launch configurations Return the chosen config or code null code if the user cancelled the dialog protected I Launch Configuration choose Configuration I Launch Configuration configs String mode I Debug Model Presentation label Provider DebugUI Tools new Debug Model Presentation Element List Selection Dialog dialog new Element List Selection Dialog get Shell label Provider dialog set Elements configs dialog set Title PDE Plugin get Resource String Runtime Workbench Shortcut title NON NLS 1 if mode equals I Launch Manager DEBUG MODE dialog set Message PDE Plugin get Resource String Runtime Workbench Shortcut select debug NON NLS 1 else dialog set Message PDE Plugin get Resource String Runtime Workbench Shortcut select run NON NLS 1 dialog set Multiple Selection false int result dialog open label Provider dispose if result Element List Selection Dialog OK return I Launch Configuration dialog get First Result return null  ILaunchConfiguration chooseConfiguration ILaunchConfiguration IDebugModelPresentation labelProvider DebugUITools newDebugModelPresentation ElementListSelectionDialog ElementListSelectionDialog getShell labelProvider setElements setTitle PDEPlugin getResourceString RuntimeWorkbenchShortcut ILaunchManager DEBUG_MODE setMessage PDEPlugin getResourceString RuntimeWorkbenchShortcut setMessage PDEPlugin getResourceString RuntimeWorkbenchShortcut setMultipleSelection labelProvider ElementListSelectionDialog ILaunchConfiguration getFirstResult
Creates a new configuration with default values protected I Launch Configuration create Configuration I Launch Configuration config null try I Launch Configuration Type config Type get Workbench Launch Config Type String computed Name get Computed Name config Type get Name I Launch Configuration Working Copy wc config Type new Instance null computed Name NON NLS 1 wc set Attribute I Launcher Settings LOCATION 0 get Default Workspace Location NON NLS 1 wc set Attribute I Launcher Settings VMARGS NON NLS 1 wc set Attribute I Launcher Settings PROGARGS Launcher Utils get Default Program Arguments wc set Attribute I Launcher Settings USECUSTOM true wc set Attribute I Launcher Settings USEFEATURES false wc set Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER org eclipse pde ui workbench Classpath Provider NON NLS 1 wc set Attribute I Launcher Settings DOCLEAR false wc set Attribute I Launcher Settings ASKCLEAR true config wc do Save catch Core Exception ce PDE Plugin log Exception ce return config  ILaunchConfiguration createConfiguration ILaunchConfiguration ILaunchConfigurationType configType getWorkbenchLaunchConfigType computedName getComputedName configType getName ILaunchConfigurationWorkingCopy configType newInstance computedName setAttribute ILauncherSettings getDefaultWorkspaceLocation setAttribute ILauncherSettings setAttribute ILauncherSettings LauncherUtils getDefaultProgramArguments setAttribute ILauncherSettings setAttribute ILauncherSettings setAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER workbenchClasspathProvider setAttribute ILauncherSettings setAttribute ILauncherSettings doSave CoreException PDEPlugin logException
Returns the workbench config type protected I Launch Configuration Type get Workbench Launch Config Type I Launch Manager lm Debug Plugin get Default get Launch Manager constant return lm get Launch Configuration Type org eclipse pde ui Runtime Workbench NON NLS 1  ILaunchConfigurationType getWorkbenchLaunchConfigType ILaunchManager DebugPlugin getDefault getLaunchManager getLaunchConfigurationType RuntimeWorkbench
private String get Computed Name String prefix I Launch Manager lm Debug Plugin get Default get Launch Manager return lm generate Unique Launch Configuration Name From prefix  getComputedName ILaunchManager DebugPlugin getDefault getLaunchManager generateUniqueLaunchConfigurationNameFrom
Convenience method to get the window that owns this action s Shell protected Shell get Shell return PDE Plugin get Active Workbench Shell  getShell PDEPlugin getActiveWorkbenchShell
private String get Default Workspace Location return Launcher Utils get Default Path append runtime workbench workspace toOS String NON NLS 1  getDefaultWorkspaceLocation LauncherUtils getDefaultPath toOSString

new Runnable public void run shortcut launch new Structured Selection I Launch Manager RUN MODE notify Result true  StructuredSelection ILaunchManager RUN_MODE notifyResult
public class Run Workbench Action extends Action public void run final Runtime Workbench Shortcut shortcut new Runtime Workbench Shortcut Busy Indicator show While PlatformUI get Workbench get Active Workbench Window get Shell get Display new Runnable public void run shortcut launch new Structured Selection I Launch Manager RUN MODE notify Result true  RunWorkbenchAction RuntimeWorkbenchShortcut RuntimeWorkbenchShortcut BusyIndicator showWhile getWorkbench getActiveWorkbenchWindow getShell getDisplay StructuredSelection ILaunchManager RUN_MODE notifyResult

private Button f Select All Button private Button f Deselect All Button public Tracing Launcher Tab PDE Plugin get Default get Label Provider connect this f Image PDE Plugin Images DESC DOC SECTION OBJ create Image  fSelectAllButton fDeselectAllButton TracingLauncherTab PDEPlugin getDefault getLabelProvider fImage PDEPluginImages DESC_DOC_SECTION_OBJ createImage
public void create Control Composite parent Composite container new Composite parent SWT NULL container set Layout new Grid Layout Dialog apply Dialog Font container create Enable Tracing Button container Label separator new Label container SWT SEPARATOR SWT HORIZONTAL separator set Layout Data new Grid Data Grid Data FILL HORIZONTAL create Sash Section container create Button Section container Dialog apply Dialog Font container set Control container Workbench Help set Help container I Help Context Ids LAUNCHER TRACING  createControl setLayout GridLayout applyDialogFont createEnableTracingButton setLayoutData GridData GridData FILL_HORIZONTAL createSashSection createButtonSection applyDialogFont setControl WorkbenchHelp setHelp IHelpContextIds LAUNCHER_TRACING
SWT Util set Button Dimension Hint f Select All Button f Select All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Plugin Viewer set All Checked true update Launch Configuration Dialog  SWTUtil setButtonDimensionHint fSelectAllButton fSelectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fPluginViewer setAllChecked updateLaunchConfigurationDialog
SWT Util set Button Dimension Hint f Deselect All Button f Deselect All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Plugin Viewer set All Checked false update Launch Configuration Dialog  SWTUtil setButtonDimensionHint fDeselectAllButton fDeselectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fPluginViewer setAllChecked updateLaunchConfigurationDialog
private void create Button Section Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 container set Layout layout f Select All Button new Button container SWT PUSH f Select All Button set Text PDE Plugin get Resource String Tracing Launcher Tab select All NON NLS 1 f Select All Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING SWT Util set Button Dimension Hint f Select All Button f Select All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Plugin Viewer set All Checked true update Launch Configuration Dialog f Deselect All Button new Button container SWT PUSH f Deselect All Button set Text PDE Plugin get Resource String Tracinglauncher Tab deselect All NON NLS 1 f Deselect All Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING SWT Util set Button Dimension Hint f Deselect All Button f Deselect All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Plugin Viewer set All Checked false update Launch Configuration Dialog  createButtonSection GridLayout GridLayout numColumns setLayout fSelectAllButton fSelectAllButton setText PDEPlugin getResourceString TracingLauncherTab selectAll fSelectAllButton setLayoutData GridData GridData HORIZONTAL_ALIGN_BEGINNING SWTUtil setButtonDimensionHint fSelectAllButton fSelectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fPluginViewer setAllChecked updateLaunchConfigurationDialog fDeselectAllButton fDeselectAllButton setText PDEPlugin getResourceString TracinglauncherTab deselectAll fDeselectAllButton setLayoutData GridData GridData HORIZONTAL_ALIGN_BEGINNING SWTUtil setButtonDimensionHint fDeselectAllButton fDeselectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fPluginViewer setAllChecked updateLaunchConfigurationDialog
f Tracing Check set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Tracing Check add Selection Listener new Selection Adapter public void widget Selected Selection Event e master Check Changed true update Launch Configuration Dialog  fTracingCheck setLayoutData GridData GridData FILL_HORIZONTAL fTracingCheck addSelectionListener SelectionAdapter widgetSelected SelectionEvent masterCheckChanged updateLaunchConfigurationDialog
private void create Enable Tracing Button Composite container f Tracing Check new Button container SWT CHECK f Tracing Check set Text PDE Plugin get Resource String Tracing Launcher Tab tracing NON NLS 1 f Tracing Check set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Tracing Check add Selection Listener new Selection Adapter public void widget Selected Selection Event e master Check Changed true update Launch Configuration Dialog  createEnableTracingButton fTracingCheck fTracingCheck setText PDEPlugin getResourceString TracingLauncherTab fTracingCheck setLayoutData GridData GridData FILL_HORIZONTAL fTracingCheck addSelectionListener SelectionAdapter widgetSelected SelectionEvent masterCheckChanged updateLaunchConfigurationDialog
private void create Sash Section Composite container Sash Form sash Form new Sash Form container SWT HORIZONTAL sash Form set Layout Data new Grid Data Grid Data FILL BOTH create Plugin Viewer sash Form create Property Sheet Client sash Form  createSashSection SashForm sashForm SashForm sashForm setLayoutData GridData GridData FILL_BOTH createPluginViewer sashForm createPropertySheetClient sashForm
f Plugin Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e plugin Selected get Selected Model  fPluginViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent pluginSelected getSelectedModel
f Plugin Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event update Launch Configuration Dialog  fPluginViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent updateLaunchConfigurationDialog
private void create Plugin Viewer Composite sash Form Composite composite new Composite sash Form SWT NULL Grid Layout layout new Grid Layout layout margin Width layout margin Height 0 composite set Layout layout Label label new Label composite SWT NULL label set Text PDE Plugin get Resource String Tracing Launcher Tab plugins NON NLS 1 f Plugin Viewer Checkbox Table Viewer new Check List composite SWT BORDER f Plugin Viewer set Content Provider new Array Content Provider f Plugin Viewer set Label Provider PDE Plugin get Default get Label Provider f Plugin Viewer set Sorter new List Util Plugin Sorter f Plugin Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e plugin Selected get Selected Model f Plugin Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event update Launch Configuration Dialog Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint 125 gd height Hint 100 f Plugin Viewer get Table set Layout Data gd f Plugin Viewer set Input get Traceable Models  createPluginViewer sashForm sashForm GridLayout GridLayout marginWidth marginHeight setLayout setText PDEPlugin getResourceString TracingLauncherTab fPluginViewer CheckboxTableViewer newCheckList fPluginViewer setContentProvider ArrayContentProvider fPluginViewer setLabelProvider PDEPlugin getDefault getLabelProvider fPluginViewer setSorter ListUtil PluginSorter fPluginViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent pluginSelected getSelectedModel fPluginViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent updateLaunchConfigurationDialog GridData GridData GridData FILL_BOTH widthHint heightHint fPluginViewer getTable setLayoutData fPluginViewer setInput getTraceableModels
private void create Property Sheet Client Composite sash Form Composite table Child new Composite sash Form SWT NULL Grid Layout layout new Grid Layout table Child set Layout layout f Property Label new Label table Child SWT NULL f Property Label set Layout Data new Grid Data Grid Data FILL HORIZONTAL update Property Label null int margin create Property Sheet table Child layout margin Width layout margin Height margin  createPropertySheetClient sashForm tableChild sashForm GridLayout GridLayout tableChild setLayout fPropertyLabel tableChild fPropertyLabel setLayoutData GridData GridData FILL_HORIZONTAL updatePropertyLabel createPropertySheet tableChild marginWidth marginHeight
protected int create Property Sheet Composite parent toolkit new Form Toolkit parent get Display int toolkit Border Style toolkit get Border Style int style toolkit Border Style SWT BORDER SWT NULL SWT BORDER page Book new Scrolled Page Book parent style SWT V SCROLL SWT H SCROLL toolkit adapt page Book false false Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint 100 gd width Hint 125 page Book set Layout Data gd if style SWT NULL page Book set Data Form Toolkit KEY DRAW BORDER Form Toolkit TREE BORDER toolkit paint Borders For parent return style SWT NULL 2 0  createPropertySheet FormToolkit getDisplay toolkitBorderStyle getBorderStyle toolkitBorderStyle pageBook ScrolledPageBook V_SCROLL H_SCROLL pageBook GridData GridData GridData FILL_BOTH heightHint widthHint pageBook setLayoutData pageBook setData FormToolkit KEY_DRAW_BORDER FormToolkit TREE_BORDER paintBordersFor
return style SWT NULL 2 0 public void activated I Launch Configuration Working Copy working Copy page Book get Parent get Parent layout true  ILaunchConfigurationWorkingCopy workingCopy pageBook getParent getParent
public void dispose if toolkit null toolkit dispose if f Image null f Image dispose PDE Plugin get Default get Label Provider disconnect this super dispose  fImage fImage PDEPlugin getDefault getLabelProvider
super dispose public Form Toolkit get Toolkit return toolkit  FormToolkit getToolkit
private I Plugin Model Base get Traceable Models if f Traceable Models null Plugin Model Manager manager PDE Core get Default get Model Manager I Plugin Model Base models manager get Plugins Array List result new Array List for int i 0 i models length i if Tracing Options Manager is Traceable models i result add models i f Traceable Models I Plugin Model Base result to Array new I Plugin Model Base result size return f Traceable Models  IPluginModelBase getTraceableModels fTraceableModels PluginModelManager PDECore getDefault getModelManager IPluginModelBase getPlugins ArrayList ArrayList TracingOptionsManager isTraceable fTraceableModels IPluginModelBase toArray IPluginModelBase fTraceableModels
private Tracing Property Source get Property Source I Plugin Model Base model if model null return null Tracing Property Source source Tracing Property Source f Property Sources get model if source null String id model get Plugin Base get Id Hashtable defaults PDE Core get Default get Tracing Options Manager get Template Table id source new Tracing Property Source model f Master Options defaults this f Property Sources put model source return source  TracingPropertySource getPropertySource IPluginModelBase TracingPropertySource TracingPropertySource fPropertySources getPluginBase getId PDECore getDefault getTracingOptionsManager getTemplateTable TracingPropertySource fMasterOptions fPropertySources
private void master Check Changed boolean user Change boolean enabled f Tracing Check get Selection f Plugin Viewer get Table set Enabled enabled page Book set Enabled enabled f Select All Button set Enabled enabled f Deselect All Button set Enabled enabled  masterCheckChanged userChange fTracingCheck getSelection fPluginViewer getTable setEnabled pageBook setEnabled fSelectAllButton setEnabled fDeselectAllButton setEnabled
private void dispose Property Sources for Enumeration enum f Property Sources elements enum has More Elements Tracing Property Source source Tracing Property Source enum next Element page Book remove Page source get Model f Property Sources clear  disposePropertySources fPropertySources hasMoreElements TracingPropertySource TracingPropertySource nextElement pageBook removePage getModel fPropertySources
public void initialize From I Launch Configuration config f Master Options clear dispose Property Sources try f Tracing Check set Selection config get Attribute TRACING false Map options config get Attribute TRACING OPTIONS Map null if options null options PDE Core get Default get Tracing Options Manager get Tracing Template Copy else options PDE Core get Default get Tracing Options Manager get Tracing Options options f Master Options put All options master Check Changed false I Plugin Model Base model get Last Selected Plugin config if model null f Plugin Viewer set Selection new Structured Selection model else plugin Selected null String checked config get Attribute TRACING CHECKED String null if checked null f Plugin Viewer set All Checked true else if checked equals TRACING NONE f Plugin Viewer set All Checked false else String Tokenizer tokenizer new String Tokenizer checked NON NLS 1 Array List list new Array List Plugin Model Manager manager PDE Core get Default get Model Manager while tokenizer has More Tokens String id tokenizer next Token Model Entry entry manager find Entry id if entry null list add entry get Active Model f Plugin Viewer set Checked Elements list to Array catch Core Exception e PDE Plugin log Exception e  initializeFrom ILaunchConfiguration fMasterOptions disposePropertySources fTracingCheck setSelection getAttribute getAttribute TRACING_OPTIONS PDECore getDefault getTracingOptionsManager getTracingTemplateCopy PDECore getDefault getTracingOptionsManager getTracingOptions fMasterOptions putAll masterCheckChanged IPluginModelBase getLastSelectedPlugin fPluginViewer setSelection StructuredSelection pluginSelected getAttribute TRACING_CHECKED fPluginViewer setAllChecked TRACING_NONE fPluginViewer setAllChecked StringTokenizer StringTokenizer ArrayList ArrayList PluginModelManager PDECore getDefault getModelManager hasMoreTokens nextToken ModelEntry findEntry getActiveModel fPluginViewer setCheckedElements toArray CoreException PDEPlugin logException
private I Plugin Model Base get Last Selected Plugin I Launch Configuration config throws Core Exception String pluginID config get Attribute TRACING SELECTED PLUGIN String null if pluginID null Model Entry entry PDE Core get Default get Model Manager find Entry pluginID return entry null null entry get Active Model return null  IPluginModelBase getLastSelectedPlugin ILaunchConfiguration CoreException getAttribute TRACING_SELECTED_PLUGIN ModelEntry PDECore getDefault getModelManager findEntry getActiveModel
public void perform Apply I Launch Configuration Working Copy config boolean tracing Enabled f Tracing Check get Selection config set Attribute TRACING tracing Enabled if tracing Enabled I Plugin Model Base model get Selected Model String id model null null model get Plugin Base get Id config set Attribute TRACING SELECTED PLUGIN id boolean changes false for Enumeration enum f Property Sources elements enum has More Elements Tracing Property Source source Tracing Property Source enum next Element if source is Modified changes true source save if changes config set Attribute TRACING OPTIONS f Master Options else config set Attribute TRACING SELECTED PLUGIN String null Object checked f Plugin Viewer get Checked Elements if checked length f Plugin Viewer get Table get Item Count config set Attribute TRACING CHECKED String null else if checked length 0 config set Attribute TRACING CHECKED TRACING NONE else String Buffer buffer new String Buffer for int i 0 i checked length i I Plugin Model Base model I Plugin Model Base checked i buffer append model get Plugin Base get Id if i checked length 1 buffer append config set Attribute TRACING CHECKED buffer to String  performApply ILaunchConfigurationWorkingCopy tracingEnabled fTracingCheck getSelection setAttribute tracingEnabled tracingEnabled IPluginModelBase getSelectedModel getPluginBase getId setAttribute TRACING_SELECTED_PLUGIN fPropertySources hasMoreElements TracingPropertySource TracingPropertySource nextElement isModified setAttribute TRACING_OPTIONS fMasterOptions setAttribute TRACING_SELECTED_PLUGIN fPluginViewer getCheckedElements fPluginViewer getTable getItemCount setAttribute TRACING_CHECKED setAttribute TRACING_CHECKED TRACING_NONE StringBuffer StringBuffer IPluginModelBase IPluginModelBase getPluginBase getId setAttribute TRACING_CHECKED toString
public void set Defaults I Launch Configuration Working Copy config config set Attribute TRACING false config set Attribute TRACING CHECKED TRACING NONE  setDefaults ILaunchConfigurationWorkingCopy setAttribute setAttribute TRACING_CHECKED TRACING_NONE
private void update Property Label I Plugin Model Base model String text model null PDE Plugin get Resource String Tracing Launcher Tab options PDE Plugin NON NLS 1 get Default get Label Provider get Text model f Property Label set Text text  updatePropertyLabel IPluginModelBase PDEPlugin getResourceString TracingLauncherTab PDEPlugin getDefault getLabelProvider getText fPropertyLabel setText
private void plugin Selected I Plugin Model Base model Tracing Property Source source get Property Source model if source null page Book show Empty Page else if page Book has Page model Composite parent page Book create Page model source create Contents parent page Book show Page model update Property Label model  pluginSelected IPluginModelBase TracingPropertySource getPropertySource pageBook showEmptyPage pageBook hasPage pageBook createPage createContents pageBook showPage updatePropertyLabel
update Property Label model public String get Name return PDE Plugin get Resource String Tracing Launcher Tab name NON NLS 1  updatePropertyLabel getName PDEPlugin getResourceString TracingLauncherTab
return PDE Plugin get Resource String Tracing Launcher Tab name NON NLS 1 public Image get Image return f Image  PDEPlugin getResourceString TracingLauncherTab getImage fImage
private I Plugin Model Base get Selected Model if f Tracing Check is Enabled Object item I Structured Selection f Plugin Viewer get Selection get First Element if item instanceof I Plugin Model Base return I Plugin Model Base item return null  IPluginModelBase getSelectedModel fTracingCheck isEnabled IStructuredSelection fPluginViewer getSelection getFirstElement IPluginModelBase IPluginModelBase

private String key private String label public Property Editor String key String label this key key this label label  PropertyEditor
this label label public String get Key return key  getKey
return key public String get Label return label  getLabel
return label abstract void create Composite parent 
abstract void create Composite parent abstract void update 
abstract void create Composite parent abstract void update abstract void initialize 
abstract void initialize protected void value Modified Object value f Values put get Key value f Modified true f Tab update Launch Configuration Dialog  valueModified fValues getKey fModified fTab updateLaunchConfigurationDialog
private class Boolean Editor extends Property Editor private Button checkbox public Boolean Editor String key String label super key label  BooleanEditor PropertyEditor BooleanEditor
public void create Composite parent checkbox f Tab get Toolkit create Button parent get Label SWT CHECK Table Wrap Data td new Table Wrap Data td colspan 2 checkbox set Layout Data td  fTab getToolkit createButton getLabel TableWrapData TableWrapData setLayoutData
checkbox set Layout Data td public void update Integer value Integer f Values get get Key checkbox set Selection value int Value 1  setLayoutData fValues getKey setSelection intValue
update checkbox add Selection Listener new Selection Adapter public void widget Selected Selection Event e int value checkbox get Selection 1 0 value Modified new Integer value  addSelectionListener SelectionAdapter widgetSelected SelectionEvent getSelection valueModified
public void initialize update checkbox add Selection Listener new Selection Adapter public void widget Selected Selection Event e int value checkbox get Selection 1 0 value Modified new Integer value  addSelectionListener SelectionAdapter widgetSelected SelectionEvent getSelection valueModified
private class Text Editor extends Property Editor private Text text public Text Editor String key String label super key label  TextEditor PropertyEditor TextEditor
public void create Composite parent Label label f Tab get Toolkit create Label parent get Label Table Wrap Data td new Table Wrap Data td valign Table Wrap Data MIDDLE label set Layout Data td text f Tab get Toolkit create Text parent NON NLS 1 td new Table Wrap Data Table Wrap Data FILL GRAB gd width Hint 100 text set Layout Data td  fTab getToolkit createLabel getLabel TableWrapData TableWrapData TableWrapData setLayoutData fTab getToolkit createText TableWrapData TableWrapData FILL_GRAB widthHint setLayoutData
text set Layout Data td public void update String value String f Values get get Key text set Text value  setLayoutData fValues getKey setText
update text add Modify Listener new Modify Listener public void modify Text Modify Event e value Modified text get Text  addModifyListener ModifyListener modifyText ModifyEvent valueModified getText
public void initialize update text add Modify Listener new Modify Listener public void modify Text Modify Event e value Modified text get Text  addModifyListener ModifyListener modifyText ModifyEvent valueModified getText
public Tracing Property Source I Plugin Model Base model Properties master Options Hashtable template Tracing Launcher Tab tab this f Model model this f Master Options master Options this f Template template this f Tab tab f Values new Hashtable f Dvalues new Hashtable  TracingPropertySource IPluginModelBase masterOptions TracingLauncherTab fModel fMasterOptions masterOptions fTemplate fTab fValues fDvalues
f Dvalues new Hashtable public I Plugin Model Base get Model return f Model  fDvalues IPluginModelBase getModel fModel
private Object get Sorted Keys int size Enumeration keys Object key Array new Object size int i 0 for Enumeration enum f Template keys enum has More Elements String key String enum next Element key Array i key Arrays sort key Array new Comparator public int compare Object o1 Object o2 return compare Keys o1 o2 return key Array  getSortedKeys keyArray fTemplate hasMoreElements nextElement keyArray keyArray compareKeys keyArray
private int compare Keys Object o1 Object o2 String s1 String o1 String s2 String o2 equal return s1 compare To s2  compareKeys compareTo
public void create Contents Composite parent f Descriptors new Vector Table Wrap Layout layout new Table Wrap Layout layout num Columns 2 parent set Layout layout boolean borders Needed false Object sorted Keys get Sorted Keys f Template size f Template keys for int i 0 i sorted Keys length i String key String sorted Keys i I Path path new Path key path path remove First Segments 1 String short Key path to String String value String f Template get key String lvalue null String master Value f Master Options get Property key Property Editor editor if value null lvalue value to Lower Case if lvalue null lvalue equals true lvalue equals false NON NLS 1 NON NLS 2 editor new Boolean Editor short Key short Key Integer dvalue new Integer lvalue equals true 1 0 NON NLS 1 f Dvalues put short Key dvalue if master Value null Integer mvalue new Integer master Value equals true NON NLS 1 1 0 f Values put short Key mvalue else editor new Text Editor short Key short Key f Dvalues put short Key value null value NON NLS 1 if master Value null f Values put short Key master Value borders Needed true editor create parent editor initialize f Descriptors add editor if borders Needed f Tab get Toolkit paint Borders For parent  createContents fDescriptors TableWrapLayout TableWrapLayout numColumns setLayout bordersNeeded sortedKeys getSortedKeys fTemplate fTemplate sortedKeys sortedKeys IPath removeFirstSegments shortKey toString fTemplate masterValue fMasterOptions getProperty PropertyEditor toLowerCase BooleanEditor shortKey shortKey fDvalues shortKey masterValue masterValue fValues shortKey TextEditor shortKey shortKey fDvalues shortKey masterValue fValues shortKey masterValue bordersNeeded fDescriptors bordersNeeded fTab getToolkit paintBordersFor
public void save String pid f Model get Plugin Base get Id for Enumeration enum f Values keys enum has More Elements String short Key String enum next Element Object value f Values get short Key String svalue value to String if value instanceof Integer svalue f Boolean Choices Integer value int Value I Path path new Path pid append short Key f Master Options set Property path to String svalue f Modified false  fModel getPluginBase getId fValues hasMoreElements shortKey nextElement fValues shortKey toString fBooleanChoices intValue IPath shortKey fMasterOptions setProperty toString fModified
f Modified false public void dispose  fModified
public void dispose public boolean is Modified return f Modified  isModified fModified

public void launch I Launch Configuration configuration String mode I Launch launch I Progress Monitor monitor throws Core Exception try f Config Dir null monitor begin Task 5 NON NLS 1 String workspace configuration get Attribute LOCATION 0 Launcher Utils get Default Path append runtime workbench workspace toOS String NON NLS 1 NON NLS 2 Clear workspace and prompt if necessary if Launcher Utils clear Workspace configuration workspace new Sub Progress Monitor monitor 1 monitor set Canceled true return clear config area if necessary if configuration get Attribute CONFIG CLEAR false Launcher Utils clear Config Area get Config Dir configuration new Sub Progress Monitor monitor 1 launch set Attribute I Launcher Settings CONFIG LOCATION get Config Dir configuration to String create launcher IVM Install launcher Launcher Utils create Launcher configuration monitor worked 1 load the arguments on the launcher VM Runner Configuration runner Config createVM Runner configuration if runner Config null monitor set Canceled true return monitor worked 1 Launcher Utils set Default Source Locator configuration launch PDE Plugin get Default get Launches Listener manage launch launcher getVM Runner mode run runner Config launch monitor monitor worked 1 catch Core Exception e monitor set Canceled true throw e  ILaunchConfiguration ILaunch IProgressMonitor CoreException fConfigDir beginTask getAttribute LauncherUtils getDefaultPath toOSString LauncherUtils clearWorkspace SubProgressMonitor setCanceled getAttribute CONFIG_CLEAR LauncherUtils clearConfigArea getConfigDir SubProgressMonitor setAttribute ILauncherSettings CONFIG_LOCATION getConfigDir toString IVMInstall LauncherUtils createLauncher VMRunnerConfiguration runnerConfig createVMRunner runnerConfig setCanceled LauncherUtils setDefaultSourceLocator PDEPlugin getDefault getLaunchesListener getVMRunner runnerConfig CoreException setCanceled
private VM Runner Configuration createVM Runner I Launch Configuration configuration throws Core Exception String classpath Launcher Utils construct Classpath configuration if classpath null String message PDE Plugin get Resource String KEY NO STARTUP throw new Core Exception Launcher Utils create Error Status message Program arguments String program Args get Program Arguments configuration if program Args null return null Environment variables String envp Debug Plugin get Default get Launch Manager get Environment configuration VM Runner Configuration runner Config new VM Runner Configuration org eclipse core launcher Main classpath NON NLS 1 runner Config setVM Arguments getVM Arguments configuration runner Config set Program Arguments program Args runner Config set Environment envp return runner Config  VMRunnerConfiguration createVMRunner ILaunchConfiguration CoreException LauncherUtils constructClasspath PDEPlugin getResourceString KEY_NO_STARTUP CoreException LauncherUtils createErrorStatus programArgs getProgramArguments programArgs DebugPlugin getDefault getLaunchManager getEnvironment VMRunnerConfiguration runnerConfig VMRunnerConfiguration runnerConfig setVMArguments getVMArguments runnerConfig setProgramArguments programArgs runnerConfig setEnvironment runnerConfig
private String get Program Arguments I Launch Configuration configuration throws Core Exception Array List program Args new Array List If a product is specified then add it to the program args if configuration get Attribute USE PRODUCT false program Args add product NON NLS 1 program Args add configuration get Attribute PRODUCT NON NLS 1 else specify the application to launch program Args add application NON NLS 1 program Args add configuration get Attribute APPLICATION Launcher Utils get Default Application Name specify the workspace location for the runtime workbench String target Workspace configuration get Attribute LOCATION 0 Launcher Utils get Default Path append runtime workbench workspace toOS String NON NLS 1 NON NLS 2 program Args add data NON NLS 1 program Args add target Workspace boolean isOSGI PDE Core get Default get Model Manager isOS Gi Runtime if configuration get Attribute USEFEATURES false validate Features I Path install Path PDE Plugin get Workspace get Root get Location program Args add install NON NLS 1 program Args add file install Path remove Last Segments 1 add Trailing Separator to String NON NLS 1 program Args add update NON NLS 1 else Tree Map plugin Map Launcher Utils get Plugins To Run configuration if plugin Map null return null String primary Feature Id Launcher Utils get Primary Feature Id Target Platform create Platform Configuration Area plugin Map get Config Dir configuration primary Feature Id Launcher Utils get Auto Start Plugins configuration program Args add configuration NON NLS 1 if isOSGI program Args add file new Path get Config Dir configuration get Path add Trailing Separator to String NON NLS 1 else program Args add file new Path get Config Dir configuration get Path append platform cfg to String NON NLS 1 NON NLS 2 if isOSGI if primary Feature Id null program Args add feature NON NLS 1 program Args add primary Feature Id I Plugin Model Base boot Model I Plugin Model Base plugin Map get org eclipse core boot NON NLS 1 String boot Path Launcher Utils get Boot Path boot Model if boot Path null boot Path ends With jar NON NLS 1 program Args add boot NON NLS 1 program Args add file boot Path NON NLS 1 add the output folder names program Args add dev NON NLS 1 if PDE Core get Default get Model Manager isOS Gi Runtime program Args add Classpath Helper get Dev Entries Properties get Config Dir configuration to String dev properties true NON NLS 1 else program Args add Classpath Helper get Dev Entries true add tracing if turned on if configuration get Attribute TRACING false TRACING NONE equals configuration get Attribute TRACING CHECKED String null program Args add debug NON NLS 1 program Args add Launcher Utils get Tracing File Argument configuration get Config Dir configuration to String Path SEPARATOR options NON NLS 1 add the program args specified by the user String Tokenizer tokenizer new String Tokenizer configuration get Attribute PROGARGS NON NLS 1 while tokenizer has More Tokens program Args add tokenizer next Token show splash only if we are launching the default application boolean show Splash true int index program Args index Of application NON NLS 1 if index 1 index program Args size 2 if program Args get index 1 equals Launcher Utils get Default Application Name show Splash false if show Splash program Args contains nosplash NON NLS 1 program Args add 0 showsplash NON NLS 1 program Args add 1 compute Showsplash Argument return String program Args to Array new String program Args size  getProgramArguments ILaunchConfiguration CoreException ArrayList programArgs ArrayList getAttribute USE_PRODUCT programArgs programArgs getAttribute programArgs programArgs getAttribute LauncherUtils getDefaultApplicationName targetWorkspace getAttribute LauncherUtils getDefaultPath toOSString programArgs programArgs targetWorkspace PDECore getDefault getModelManager isOSGiRuntime getAttribute validateFeatures IPath installPath PDEPlugin getWorkspace getRoot getLocation programArgs programArgs installPath removeLastSegments addTrailingSeparator toString programArgs TreeMap pluginMap LauncherUtils getPluginsToRun pluginMap primaryFeatureId LauncherUtils getPrimaryFeatureId TargetPlatform createPlatformConfigurationArea pluginMap getConfigDir primaryFeatureId LauncherUtils getAutoStartPlugins programArgs programArgs getConfigDir getPath addTrailingSeparator toString programArgs getConfigDir getPath toString primaryFeatureId programArgs programArgs primaryFeatureId IPluginModelBase bootModel IPluginModelBase pluginMap bootPath LauncherUtils getBootPath bootModel bootPath bootPath endsWith programArgs programArgs bootPath programArgs PDECore getDefault getModelManager isOSGiRuntime programArgs ClasspathHelper getDevEntriesProperties getConfigDir toString programArgs ClasspathHelper getDevEntries getAttribute TRACING_NONE getAttribute TRACING_CHECKED programArgs programArgs LauncherUtils getTracingFileArgument getConfigDir toString StringTokenizer StringTokenizer getAttribute hasMoreTokens programArgs nextToken showSplash programArgs indexOf programArgs programArgs LauncherUtils getDefaultApplicationName showSplash showSplash programArgs programArgs programArgs computeShowsplashArgument programArgs toArray programArgs
private String getVM Arguments I Launch Configuration configuration throws Core Exception return new Execution Arguments configuration get Attribute VMARGS getVM Arguments Array NON NLS 1 NON NLS 2  getVMArguments ILaunchConfiguration CoreException ExecutionArguments getAttribute getVMArgumentsArray
private void validate Features throws Core Exception I Path install Path PDE Plugin get Workspace get Root get Location String last Segment install Path last Segment boolean bad Structure last Segment null if bad Structure I Path features Path install Path remove Last Segments 1 append features NON NLS 1 bad Structure last Segment equals Ignore Case plugins NON NLS 1 features Path to File exists if bad Structure throw new Core Exception Launcher Utils create Error Status PDE Plugin get Resource String KEY BAD FEATURE SETUP else Ensure important files are present ensure Product Files Exist get Product Path  validateFeatures CoreException IPath installPath PDEPlugin getWorkspace getRoot getLocation lastSegment installPath lastSegment badStructure lastSegment badStructure IPath featuresPath installPath removeLastSegments badStructure lastSegment equalsIgnoreCase featuresPath toFile badStructure CoreException LauncherUtils createErrorStatus PDEPlugin getResourceString KEY_BAD_FEATURE_SETUP ensureProductFilesExist getProductPath
private I Path get Install Path return PDE Plugin get Workspace get Root get Location  IPath getInstallPath PDEPlugin getWorkspace getRoot getLocation
private I Path get Product Path return get Install Path remove Last Segments 1  IPath getProductPath getInstallPath removeLastSegments
private String compute Showsplash Argument I Path eclipse Home External Model Manager get Eclipse Home I Path full Path eclipse Home append eclipse NON NLS 1 return full Path toOS String showsplash 600 NON NLS 1  computeShowsplashArgument IPath eclipseHome ExternalModelManager getEclipseHome IPath fullPath eclipseHome fullPath toOSString
private void ensure Product Files Exist I Path product Area File product Dir product Area to File File marker new File product Dir eclipseproduct NON NLS 1 I Path eclipse Path External Model Manager get Eclipse Home if marker exists copy File eclipse Path eclipseproduct marker NON NLS 1 if PDE Core get Default get Model Manager isOS Gi Runtime File config Dir new File product Dir configuration NON NLS 1 if config Dir exists config Dir mkdirs File ini new File config Dir config ini NON NLS 1 if ini exists copy File eclipse Path append configuration config ini ini NON NLS 1 NON NLS 2 else File ini new File product Dir install ini NON NLS 1 if ini exists copy File eclipse Path install ini ini NON NLS 1  ensureProductFilesExist IPath productArea productDir productArea toFile productDir IPath eclipsePath ExternalModelManager getEclipseHome copyFile eclipsePath PDECore getDefault getModelManager isOSGiRuntime configDir productDir configDir configDir configDir copyFile eclipsePath productDir copyFile eclipsePath
private void copy File I Path eclipse Path String name File target File source new File eclipse Path to File name if source exists false return File Input Stream is null File Output Stream os null try is new File Input Stream source os new File Output Stream target byte buf new byte 1024 long current Len 0 int len is read buf while len 1 current Len len os write buf 0 len len is read buf catch IO Exception e finally try if is null is close if os null os close catch IO Exception e  copyFile IPath eclipsePath eclipsePath toFile FileInputStream FileOutputStream FileInputStream FileOutputStream currentLen currentLen IOException IOException
see org eclipse debug core model Launch Configuration Delegate get Build Order org eclipse debug core I Launch Configuration java lang String protected I Project get Build Order I Launch Configuration configuration String mode throws Core Exception return compute Build Order Launcher Utils get Affected Projects configuration  LaunchConfigurationDelegate getBuildOrder ILaunchConfiguration IProject getBuildOrder ILaunchConfiguration CoreException computeBuildOrder LauncherUtils getAffectedProjects
protected I Project get Projects For Problem Search I Launch Configuration configuration String mode throws Core Exception return Launcher Utils get Affected Projects configuration  IProject getProjectsForProblemSearch ILaunchConfiguration CoreException LauncherUtils getAffectedProjects
private File get Config Dir I Launch Configuration config if f Config Dir null try if config get Attribute USEFEATURES false String root get Product Path to String if PDE Core get Default get Model Manager isOS Gi Runtime root configuration NON NLS 1 f Config Dir new File root else f Config Dir Launcher Utils create Config Area config get Name catch Core Exception e f Config Dir Launcher Utils create Config Area config get Name if f Config Dir exists f Config Dir mkdirs return f Config Dir  getConfigDir ILaunchConfiguration fConfigDir getAttribute getProductPath toString PDECore getDefault getModelManager isOSGiRuntime fConfigDir fConfigDir LauncherUtils createConfigArea getName CoreException fConfigDir LauncherUtils createConfigArea getName fConfigDir fConfigDir fConfigDir

see I Launch Configuration Tab Group create Tabs I Launch Configuration Dialog String public void create Tabs I Launch Configuration Dialog dialog String mode I Launch Configuration Tab tabs null if PDE Core get Default get Model Manager isOS Gi Runtime tabs new I Launch Configuration Tab new Basic Launcher Tab new Advanced Launcher Tab new Tracing Launcher Tab new Configuration Tab new Source Lookup Tab new Environment Tab new Common Tab else tabs new I Launch Configuration Tab new Basic Launcher Tab new Advanced Launcher Tab new Tracing Launcher Tab new Source Lookup Tab new Environment Tab new Common Tab set Tabs tabs  ILaunchConfigurationTabGroup createTabs ILaunchConfigurationDialog createTabs ILaunchConfigurationDialog ILaunchConfigurationTab PDECore getDefault getModelManager isOSGiRuntime ILaunchConfigurationTab BasicLauncherTab AdvancedLauncherTab TracingLauncherTab ConfigurationTab SourceLookupTab EnvironmentTab CommonTab ILaunchConfigurationTab BasicLauncherTab AdvancedLauncherTab TracingLauncherTab SourceLookupTab EnvironmentTab CommonTab setTabs
Busy Indicator show While Display get Current new Runnable public void run try String id config get Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER String null if id null config instanceof I Launch Configuration Working Copy I Launch Configuration Working Copy wc I Launch Configuration Working Copy config wc set Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER org eclipse pde ui workbench Classpath Provider NON NLS 1 catch Core Exception e for int i 0 i tabs length i tabs i initialize From config  BusyIndicator showWhile getCurrent getAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER workbenchClasspathProvider CoreException initializeFrom
see org eclipse debug ui Abstract Launch Configuration Tab Group initialize From I Launch Configuration public void initialize From I Launch Configuration configuration final I Launch Configuration config configuration final I Launch Configuration Tab tabs get Tabs Busy Indicator show While Display get Current new Runnable public void run try String id config get Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER String null if id null config instanceof I Launch Configuration Working Copy I Launch Configuration Working Copy wc I Launch Configuration Working Copy config wc set Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER org eclipse pde ui workbench Classpath Provider NON NLS 1 catch Core Exception e for int i 0 i tabs length i tabs i initialize From config  AbstractLaunchConfigurationTabGroup initializeFrom ILaunchConfiguration initializeFrom ILaunchConfiguration ILaunchConfiguration ILaunchConfigurationTab getTabs BusyIndicator showWhile getCurrent getAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy setAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER workbenchClasspathProvider CoreException initializeFrom
see org eclipse debug ui I Launch Configuration Tab Group set Defaults org eclipse debug core I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration super set Defaults configuration configuration set Attribute I Java Launch Configuration Constants ATTR SOURCE PATH PROVIDER org eclipse pde ui workbench Classpath Provider NON NLS 1  ILaunchConfigurationTabGroup setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy setDefaults setAttribute IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH_PROVIDER workbenchClasspathProvider

public class Workbench Source Path Provider extends Standard Source Path Provider see org eclipse jdt launching I Runtime Classpath Provider compute Unresolved Classpath org eclipse debug core I Launch Configuration public I Runtime Classpath Entry compute Unresolved Classpath I Launch Configuration configuration throws Core Exception boolean default Path configuration get Attribute I Java Launch Configuration Constants ATTR DEFAULT SOURCE PATH true if default Path return recover Runtime Path configuration I Java Launch Configuration Constants ATTR SOURCE PATH List source Path new Array List first on the source lookup path goes the class libraries for the JRE String vm Install Name configuration get Attribute I Launcher Settings VMINSTALL Launcher Utils get DefaultVM Install Name IVM Install vm Installations Launcher Utils get AllVM Instances IVM Install jre null for int i 0 i vm Installations length i if vm Install Name equals vm Installations i get Name jre vm Installations i break if jre null add container that corresponds to JRE I Path container Path new Path Java Runtime JRE CONTAINER container Path container Path append jre getVM Install Type get Id container Path container Path append jre get Name I Runtime Classpath Entry entry Java Runtime new Runtime Container Classpath Entry container Path I Runtime Classpath Entry BOOTSTRAP CLASSES source Path add entry I Project projects get Java Projects configuration for int i 0 i projects length i source Path add Java Runtime new Project Runtime Classpath Entry Java Core create projects i return I Runtime Classpath Entry source Path to Array new I Runtime Classpath Entry source Path size  WorkbenchSourcePathProvider StandardSourcePathProvider IRuntimeClasspathProvider computeUnresolvedClasspath ILaunchConfiguration IRuntimeClasspathEntry computeUnresolvedClasspath ILaunchConfiguration CoreException defaultPath getAttribute IJavaLaunchConfigurationConstants ATTR_DEFAULT_SOURCE_PATH defaultPath recoverRuntimePath IJavaLaunchConfigurationConstants ATTR_SOURCE_PATH sourcePath ArrayList vmInstallName getAttribute ILauncherSettings LauncherUtils getDefaultVMInstallName IVMInstall vmInstallations LauncherUtils getAllVMInstances IVMInstall vmInstallations vmInstallName vmInstallations getName vmInstallations IPath containerPath JavaRuntime JRE_CONTAINER containerPath containerPath getVMInstallType getId containerPath containerPath getName IRuntimeClasspathEntry JavaRuntime newRuntimeContainerClasspathEntry containerPath IRuntimeClasspathEntry BOOTSTRAP_CLASSES sourcePath IProject getJavaProjects sourcePath JavaRuntime newProjectRuntimeClasspathEntry JavaCore IRuntimeClasspathEntry sourcePath toArray IRuntimeClasspathEntry sourcePath
Converts plugin models to java projects private I Project get Java Projects I Launch Configuration configuration throws Core Exception boolean use Features configuration get Attribute I Launcher Settings USEFEATURES false boolean use Default configuration get Attribute I Launcher Settings USECUSTOM true I Plugin Model Base models PDE Core get Default get Workspace Model Manager get All Models Set deselected use Features use Default Launcher Utils parse DeselectedWS Ids configuration new Tree Set Array List result new Array List for int i 0 i models length i if deselected contains models i get Plugin Base get Id continue I Project project models i get Underlying Resource get Project if project has Nature Java Core NATURE ID result add project Searchable Plugins Manager manager PDE Core get Default get Model Manager get Searchable Plugins Manager I Java Project proxy manager get Proxy Project if proxy null result add proxy get Project I Project projects I Project result to Array new I Project result size return PDE Plugin get Workspace compute Project Order projects projects  IProject getJavaProjects ILaunchConfiguration CoreException useFeatures getAttribute ILauncherSettings useDefault getAttribute ILauncherSettings IPluginModelBase PDECore getDefault getWorkspaceModelManager getAllModels useFeatures useDefault LauncherUtils parseDeselectedWSIds TreeSet ArrayList ArrayList getPluginBase getId IProject getUnderlyingResource getProject hasNature JavaCore NATURE_ID SearchablePluginsManager PDECore getDefault getModelManager getSearchablePluginsManager IJavaProject getProxyProject getProject IProject IProject toArray IProject PDEPlugin getWorkspace computeProjectOrder
see I Runtime Classpath Provider resolve Classpath I Runtime Classpath Entry I Launch Configuration public I Runtime Classpath Entry resolve Classpath I Runtime Classpath Entry entries I Launch Configuration configuration throws Core Exception List all new Array List entries length for int i 0 i entries length i if entries i get Type I Runtime Classpath Entry PROJECT a project resolves to itself for source lookup rather than the class file output locations all add entries i also add non JRE libraries I Resource resource entries i get Resource if resource instanceof I Project I Java Project project Java Core create I Project resource I Package Fragment Root roots project get Package Fragment Roots for int j 0 j roots length j if roots j is Archive isJRE Library roots j I Runtime Classpath Entry rte Java Runtime new Archive Runtime Classpath Entry roots j get Path I Path path roots j get Source Attachment Path if path null rte set Source Attachment Path path rte set Source Attachment Root Path roots j get Source Attachment Root Path if all contains rte all add rte else I Runtime Classpath Entry resolved Java Runtime resolve Runtime Classpath Entry entries i configuration for int j 0 j resolved length j all add resolved j return I Runtime Classpath Entry all to Array new I Runtime Classpath Entry all size  IRuntimeClasspathProvider resolveClasspath IRuntimeClasspathEntry ILaunchConfiguration IRuntimeClasspathEntry resolveClasspath IRuntimeClasspathEntry ILaunchConfiguration CoreException ArrayList getType IRuntimeClasspathEntry IResource getResource IProject IJavaProject JavaCore IProject IPackageFragmentRoot getPackageFragmentRoots isArchive isJRELibrary IRuntimeClasspathEntry JavaRuntime newArchiveRuntimeClasspathEntry getPath IPath getSourceAttachmentPath setSourceAttachmentPath setSourceAttachmentRootPath getSourceAttachmentRootPath IRuntimeClasspathEntry JavaRuntime resolveRuntimeClasspathEntry IRuntimeClasspathEntry toArray IRuntimeClasspathEntry
private boolean isJRE Library I Package Fragment Root root try I Path path root get Raw Classpath Entry get Path if path equals new Path Java Runtime JRE CONTAINER path equals new Path Java Runtime JRELIB VARIABLE return true catch Java Model Exception e return false  isJRELibrary IPackageFragmentRoot IPath getRawClasspathEntry getPath JavaRuntime JRE_CONTAINER JavaRuntime JRELIB_VARIABLE JavaModelException

private boolean f Stale public Abstract Editing Model I Document document boolean is Reconciling f Document document f Reconciling is Reconciling  fStale AbstractEditingModel IDocument isReconciling fDocument fReconciling isReconciling
public void dispose if fNL Resource Helper null fNL Resource Helper dispose fNL Resource Helper null f Disposed true f Listeners clear  fNLResourceHelper fNLResourceHelper fNLResourceHelper fDisposed fListeners
public String get Resource String String key if key null key length 0 return NON NLS 1 if fNL Resource Helper null fNL Resource Helper createNL Resource Helper return fNL Resource Helper null key fNL Resource Helper get Resource String key  getResourceString fNLResourceHelper fNLResourceHelper createNLResourceHelper fNLResourceHelper fNLResourceHelper getResourceString
protected abstract NL Resource Helper createNL Resource Helper  NLResourceHelper createNLResourceHelper
see org eclipse pde core I Model is Disposed public boolean is Disposed return f Disposed  IModel isDisposed isDisposed fDisposed
see org eclipse pde core I Model is Editable public boolean is Editable return f Reconciling  IModel isEditable isEditable fReconciling
see org eclipse pde core I Model is Loaded public boolean is Loaded return f Loaded  IModel isLoaded isLoaded fLoaded
see org eclipse pde core I Model is In Sync public boolean is In Sync return f In Sync  IModel isInSync isInSync fInSync
see org eclipse pde core I Model is Valid public boolean is Valid return is Loaded  IModel isValid isValid isLoaded
see org eclipse pde core I Model get Time Stamp public final long get Time Stamp return f Timestamp  IModel getTimeStamp getTimeStamp fTimestamp
public final void load throws Core Exception try load get Input Stream get Document false catch Unsupported Encoding Exception e  CoreException getInputStream getDocument UnsupportedEncodingException
public final void reload Input Stream source boolean out Of Sync throws Core Exception load source out Of Sync fire Model Changed new Model Changed Event this I Model Changed Event WORLD CHANGED new Object this null  InputStream outOfSync CoreException outOfSync fireModelChanged ModelChangedEvent IModelChangedEvent WORLD_CHANGED
see org eclipse pde core I Model is Reconciling Model public boolean is Reconciling Model return f Reconciling  IModel isReconcilingModel isReconcilingModel fReconciling
public I Document get Document return f Document  IDocument getDocument fDocument
public final void reconciled I Document document if is Reconciling Model try if is Stale adjust Offsets document set Stale false else reload get Input Stream document false if is Dirty set Dirty false catch Exception e  IDocument isReconcilingModel isStale adjustOffsets setStale getInputStream isDirty setDirty
protected abstract void adjust Offsets I Document document  adjustOffsets IDocument
protected abstract void adjust Offsets I Document document protected Input Stream get Input Stream I Document document throws Unsupported Encoding Exception return new Byte Array Input Stream document get get Bytes get Charset  adjustOffsets IDocument InputStream getInputStream IDocument UnsupportedEncodingException ByteArrayInputStream getBytes getCharset
public String get Charset return f Charset  getCharset fCharset
public void set Charset String charset f Charset charset  setCharset fCharset
see org eclipse pde core I Model Change Provider add Model Changed Listener org eclipse pde core I Model Changed Listener public void add Model Changed Listener I Model Changed Listener listener if f Listeners contains listener f Listeners add listener  IModelChangeProvider addModelChangedListener IModelChangedListener addModelChangedListener IModelChangedListener fListeners fListeners
public void transfer Listeners To I Model Change Provider Extension target I Model Changed Listener Filter filter List old List List f Listeners clone for int i 0 i old List size i I Model Changed Listener listener I Model Changed Listener old List get i if filter null filter accept listener add the listener to the target target add Model Changed Listener listener remove the listener from our list f Listeners remove listener  transferListenersTo IModelChangeProviderExtension IModelChangedListenerFilter oldList fListeners oldList IModelChangedListener IModelChangedListener oldList addModelChangedListener fListeners
public void fire Model Changed I Model Changed Event event set Dirty event get Change Type I Model Changed Event WORLD CHANGED for int i 0 i f Listeners size i I Model Changed Listener f Listeners get i model Changed event  fireModelChanged IModelChangedEvent setDirty getChangeType IModelChangedEvent WORLD_CHANGED fListeners IModelChangedListener fListeners modelChanged
see org eclipse pde core I Model Change Provider fire Model Object Changed java lang Object java lang String java lang Object java lang Object public void fire Model Object Changed Object object String property Object old Value Object new Value fire Model Changed new Model Changed Event this object property old Value new Value  IModelChangeProvider fireModelObjectChanged fireModelObjectChanged oldValue newValue fireModelChanged ModelChangedEvent oldValue newValue
see org eclipse pde core I Model Change Provider remove Model Changed Listener org eclipse pde core I Model Changed Listener public void remove Model Changed Listener I Model Changed Listener listener f Listeners remove listener  IModelChangeProvider removeModelChangedListener IModelChangedListener removeModelChangedListener IModelChangedListener fListeners
see org eclipse pde core I Editable is Dirty public boolean is Dirty return f Dirty  IEditable isDirty isDirty fDirty
see org eclipse pde core I Editable save java io Print Writer public void save Print Writer writer  IEditable PrintWriter PrintWriter
see org eclipse pde core I Editable set Dirty boolean public void set Dirty boolean dirty this f Dirty dirty  IEditable setDirty setDirty fDirty
see org eclipse pde internal ui model I Editing Model is Stale public boolean is Stale return f Stale  IEditingModel isStale isStale fStale
see org eclipse pde internal ui model I Editing Model set Stale boolean public void set Stale boolean stale f Stale stale  IEditingModel setStale setStale fStale
see org eclipse pde core I Model get Underlying Resource public I Resource get Underlying Resource return f Underlying Resource  IModel getUnderlyingResource IResource getUnderlyingResource fUnderlyingResource
public void set Underlying Resource I Resource resource f Underlying Resource resource  setUnderlyingResource IResource fUnderlyingResource
public String get Install Location if f Underlying Resource null return f Underlying Resource get Project get Location to String return f Install Location  getInstallLocation fUnderlyingResource fUnderlyingResource getProject getLocation toString fInstallLocation
public void set Install Location String location f Install Location location  setInstallLocation fInstallLocation

private Hash Map f Entries new Hash Map public Build Build Model model f Model model  HashMap fEntries HashMap BuildModel fModel
public void add I Build Entry entry throws Core Exception f Entries put entry get Name entry f Model fire Model Changed new Model Changed Event f Model I Model Changed Event INSERT new Object entry null  IBuildEntry CoreException fEntries getName fModel fireModelChanged ModelChangedEvent fModel IModelChangedEvent
see org eclipse pde core build I Build get Build Entries public I Build Entry get Build Entries return I Build Entry f Entries values to Array new I Build Entry f Entries size  IBuild getBuildEntries IBuildEntry getBuildEntries IBuildEntry fEntries toArray IBuildEntry fEntries
see org eclipse pde core build I Build get Entry java lang String public I Build Entry get Entry String name return I Build Entry f Entries get name  IBuild getEntry IBuildEntry getEntry IBuildEntry fEntries
public void remove I Build Entry entry throws Core Exception f Entries remove entry get Name f Model fire Model Changed new Model Changed Event f Model I Model Changed Event REMOVE new Object entry null  IBuildEntry CoreException fEntries getName fModel fireModelChanged ModelChangedEvent fModel IModelChangedEvent
java io Print Writer public void write String indent Print Writer writer  PrintWriter PrintWriter
public void load Input Stream source throws IO Exception f Entries clear Properties properties new Properties properties load source Enumeration enum properties keys while enum has More Elements String name enum next Element to String Build Entry entry Build Entry f Model get Factory create Entry name entry process Entry properties get name to String f Entries put name entry adjust Offsets f Model get Document  InputStream IOException fEntries hasMoreElements nextElement toString BuildEntry BuildEntry fModel getFactory createEntry processEntry toString fEntries adjustOffsets fModel getDocument
public void adjust Offsets I Document document int lines document get Number Of Lines try I Document Key current Key null for int i 0 i lines i int offset document get Line Offset i int length document get Line Length i String line document get offset length if line starts With line starts With NON NLS 1 NON NLS 2 if current Key null current Key set Length offset 1 current Key get Offset current Key null continue line line trim if line length 0 continue if current Key null if line ends With NON NLS 1 current Key set Length offset document get Line Length i current Key get Offset current Key null else int index line index Of if index 1 index line index Of if index 1 index line index Of if index 1 index line index Of t String name index 1 line substring 0 index trim line current Key I Document Key get Entry name if current Key null while Character is Space Char document get Char offset offset 1 current Key set Offset offset if line ends With NON NLS 1 current Key set Length document get Line Offset i document get Line Length i current Key get Offset current Key null catch Bad Location Exception e  adjustOffsets IDocument getNumberOfLines IDocumentKey currentKey getLineOffset getLineLength startsWith startsWith currentKey currentKey setLength currentKey getOffset currentKey currentKey endsWith currentKey setLength getLineLength currentKey getOffset currentKey indexOf indexOf indexOf indexOf currentKey IDocumentKey getEntry currentKey isSpaceChar getChar currentKey setOffset endsWith currentKey setLength getLineOffset getLineLength currentKey getOffset currentKey BadLocationException

see org eclipse pde core build I Build Entry add Token java lang String public void add Token String token throws Core Exception f Tokens add token get Model fire Model Object Changed this get Name null token  IBuildEntry addToken addToken CoreException fTokens getModel fireModelObjectChanged getName
see org eclipse pde internal ui model I Document Key get Name public String get Name return f Name  IDocumentKey getName getName fName
see org eclipse pde core build I Build Entry get Tokens public String get Tokens return String f Tokens to Array new String f Tokens size  IBuildEntry getTokens getTokens fTokens toArray fTokens
see org eclipse pde core build I Build Entry contains java lang String public boolean contains String token return f Tokens contains token  IBuildEntry fTokens
see org eclipse pde core build I Build Entry remove Token java lang String public void remove Token String token throws Core Exception f Tokens remove token get Model fire Model Object Changed this get Name token null  IBuildEntry removeToken removeToken CoreException fTokens getModel fireModelObjectChanged getName
public void rename Token String old Token String new Token throws Core Exception int index f Tokens index Of old Token if index 1 f Tokens set index new Token get Model fire Model Object Changed this get Name old Token new Token  renameToken oldToken newToken CoreException fTokens indexOf oldToken fTokens newToken getModel fireModelObjectChanged getName oldToken newToken
public void set Name String name String old Name f Name f Name name if get Model null get Model fire Model Object Changed this get Name old Name name  setName oldName fName fName getModel getModel fireModelObjectChanged getName oldName
see org eclipse pde internal ui model I Document Key get Offset public int get Offset return f Offset  IDocumentKey getOffset getOffset fOffset
see org eclipse pde internal ui model I Document Key set Offset int public void set Offset int offset f Offset offset  IDocumentKey setOffset setOffset fOffset
see org eclipse pde internal ui model I Document Key get Length public int get Length return f Length  IDocumentKey getLength getLength fLength
see org eclipse pde internal ui model I Document Key set Length int public void set Length int length f Length length  IDocumentKey setLength setLength fLength
see org eclipse pde core I Writable write java lang String java io Print Writer public void write String indent Print Writer writer  IWritable PrintWriter PrintWriter
public void set Model I Build Model model f Model model  setModel IBuildModel fModel
public I Build Model get Model return f Model  IBuildModel getModel fModel
public void process Entry String value String Tokenizer stok new String Tokenizer value NON NLS 1 while stok has More Tokens f Tokens add stok next Token trim  processEntry StringTokenizer StringTokenizer hasMoreTokens fTokens nextToken
see org eclipse pde internal ui model I Document Key write public String write return Properties Util write Key Value Pair get Name get Tokens  IDocumentKey PropertiesUtil writeKeyValuePair getName getTokens

param document param is Reconciling public Build Model I Document document boolean is Reconciling super document is Reconciling  isReconciling BuildModel IDocument isReconciling isReconciling
see org eclipse pde internal ui model Abstract Editing Model createNL Resource Helper protected NL Resource Helper createNL Resource Helper return null  AbstractEditingModel createNLResourceHelper NLResourceHelper createNLResourceHelper
public void load Input Stream source boolean out Of Sync throws Core Exception try f Loaded true Build get Build load source catch IO Exception e f Loaded false  InputStream outOfSync CoreException fLoaded getBuild IOException fLoaded
see org eclipse pde internal ui model Abstract Editing Model adjust Offsets org eclipse jface text I Document protected void adjust Offsets I Document document Build get Build adjust Offsets document  AbstractEditingModel adjustOffsets IDocument adjustOffsets IDocument getBuild adjustOffsets
public I Build get Build if f Build null f Build new Build this return f Build  IBuild getBuild fBuild fBuild fBuild
public I Build Model Factory get Factory if f Factory null f Factory new Build Model Factory this return f Factory  IBuildModelFactory getFactory fFactory fFactory BuildModelFactory fFactory

private I Build Model f Model public Build Model Factory I Build Model model f Model model  IBuildModel fModel BuildModelFactory IBuildModel fModel
public I Build Entry create Entry String name Build Entry entry new Build Entry entry set Name name entry set Model f Model return entry  IBuildEntry createEntry BuildEntry BuildEntry setName setModel fModel

private Hashtable f Document Headers new Hashtable public Bundle Bundle Model model f Model model  fDocumentHeaders BundleModel fModel
public void clear Headers f Document Headers clear  clearHeaders fDocumentHeaders
public void load Manifest manifest Map attributes manifest get Main Attributes Iterator iter attributes key Set iterator while iter has Next Attributes Name key Attributes Name iter next Manifest Header header new Manifest Header header set Name key to String header set Value String attributes get key f Document Headers put key to String header adjust Offsets f Model get Document  getMainAttributes keySet hasNext ManifestHeader ManifestHeader setName toString setValue fDocumentHeaders toString adjustOffsets fModel getDocument
public void clear Offsets Iterator iter f Document Headers values iterator while iter has Next Manifest Header header Manifest Header iter next header set Offset 1 header set Length 1  clearOffsets fDocumentHeaders hasNext ManifestHeader ManifestHeader setOffset setLength
public void trim Iterator iter f Document Headers key Set iterator while iter has Next String key iter next to String Manifest Header header Manifest Header f Document Headers get key if header get Offset 1 f Document Headers remove key  fDocumentHeaders keySet hasNext toString ManifestHeader ManifestHeader fDocumentHeaders getOffset fDocumentHeaders
protected void adjust Offsets I Document document int lines document get Number Of Lines try I Document Key current Key null for int i 0 i lines i int offset document get Line Offset i int length document get Line Length i String line document get offset length if current Key null int line Number line starts With i i 1 NON NLS 1 I Region region document get Line Information line Number String delimiter document get Line Delimiter line Number int key Length region get Offset region get Length current Key get Offset current Key set Length delimiter null key Length delimiter length key Length if line starts With NON NLS 1 current Key null if current Key null int index line index Of String name index 1 line substring 0 index line current Key I Document Key f Document Headers get name if current Key null I Region region document get Line Information i current Key set Offset region get Offset String delimiter document get Line Delimiter i current Key set Length delimiter null region get Length delimiter length region get Length catch Bad Location Exception e  adjustOffsets IDocument getNumberOfLines IDocumentKey currentKey getLineOffset getLineLength currentKey lineNumber startsWith IRegion getLineInformation lineNumber getLineDelimiter lineNumber keyLength getOffset getLength currentKey getOffset currentKey setLength keyLength keyLength startsWith currentKey currentKey indexOf currentKey IDocumentKey fDocumentHeaders currentKey IRegion getLineInformation currentKey setOffset getOffset getLineDelimiter currentKey setLength getLength getLength BadLocationException
public void set Header String key String value Manifest Header header Manifest Header f Document Headers get key if header null header new Manifest Header header set Name key header set Value value f Document Headers put key header f Model fire Model Object Changed header key null value  setHeader ManifestHeader ManifestHeader fDocumentHeaders ManifestHeader setName setValue fDocumentHeaders fModel fireModelObjectChanged
see org eclipse pde internal core ibundle I Bundle get Header java lang String public String get Header String key Manifest Header header Manifest Header f Document Headers get key return header null header get Value null  IBundle getHeader getHeader ManifestHeader ManifestHeader fDocumentHeaders getValue
public Dictionary get Headers return f Document Headers  getHeaders fDocumentHeaders

private I Bundle f Bundle param document param is Reconciling public Bundle Model I Document document boolean is Reconciling super document is Reconciling f Bundle new Bundle this  IBundle fBundle isReconciling BundleModel IDocument isReconciling isReconciling fBundle
see org eclipse pde internal ui model Abstract Editing Model createNL Resource Helper protected NL Resource Helper createNL Resource Helper return null  AbstractEditingModel createNLResourceHelper NLResourceHelper createNLResourceHelper
see org eclipse pde internal core ibundle I Bundle Model is Fragment Model public boolean is Fragment Model return get Bundle get Header Constants FRAGMENT HOST null  IBundleModel isFragmentModel isFragmentModel getBundle getHeader FRAGMENT_HOST
public void load Input Stream source boolean out Of Sync throws Core Exception try f Loaded true Bundle get Bundle clear Headers Bundle get Bundle load new Manifest source catch IO Exception e f Loaded false  InputStream outOfSync CoreException fLoaded getBundle clearHeaders getBundle IOException fLoaded
protected void adjust Offsets I Document document Bundle get Bundle clear Offsets Bundle get Bundle adjust Offsets document Bundle get Bundle trim  adjustOffsets IDocument getBundle clearOffsets getBundle adjustOffsets getBundle
see org eclipse pde internal core ibundle I Bundle Model get Bundle public I Bundle get Bundle return f Bundle  IBundleModel getBundle IBundle getBundle fBundle

private Array List f Exceptions new Array List public Eclipse Auto Start Header set Name Eclipse Auto Start NON NLS 1  ArrayList fExceptions ArrayList EclipseAutoStartHeader setName AutoStart
public void add Exception String package Name if f Exceptions contains package Name f Exceptions add package Name  addException packageName fExceptions packageName fExceptions packageName
public void remove Exception String package Name f Exceptions remove package Name  removeException packageName fExceptions packageName
public String get Exceptions return String f Exceptions to Array new String f Exceptions size  getExceptions fExceptions toArray fExceptions

see org eclipse pde internal ui model I Document Key set Name java lang String public void set Name String name f Name name  IDocumentKey setName setName fName
see org eclipse pde internal ui model I Document Key get Name public String get Name return f Name  IDocumentKey getName getName fName
public void set Value String value f Value value  setValue fValue
public String get Value return f Value  getValue fValue
see org eclipse pde internal ui model I Document Key set Offset int public void set Offset int offset f Offset offset  IDocumentKey setOffset setOffset fOffset
see org eclipse pde internal ui model I Document Key get Offset public int get Offset return f Offset  IDocumentKey getOffset getOffset fOffset
see org eclipse pde internal ui model I Document Key set Length int public void set Length int length f Length length  IDocumentKey setLength setLength fLength
see org eclipse pde internal ui model I Document Key get Length public int get Length return f Length  IDocumentKey getLength getLength fLength
see org eclipse pde internal ui model I Document Key write public String write return f Name f Value NON NLS 1  IDocumentKey fName fValue
see org eclipse pde core I Writable write java lang String java io Print Writer public void write String indent Print Writer writer  IWritable PrintWriter PrintWriter

private Locator f Locator public Document Handler  fLocator DocumentHandler
public void start Document throws SAX Exception f Document Node Stack clear f Highest Offset 0 f Find Replace Adapter new Find Replace Document Adapter get Document  startDocument SAXException fDocumentNodeStack fHighestOffset fFindReplaceAdapter FindReplaceDocumentAdapter getDocument
public void start Element String uri String local Name String q Name Attributes attributes throws SAX Exception I Document Node parent f Document Node Stack is Empty null I Document Node f Document Node Stack peek I Document Node node get Document Node q Name parent node setXML Tag Name q Name try int node Offset get Start Offset q Name node set Offset node Offset I Document doc get Document int line doc get Line Of Offset node Offset node set Line Indent node get Offset doc get Line Offset line create attributes for int i 0 i attributes get Length i String att Name attributes getQ Name i String att Value attributes get Value i I Document Attribute attribute get Document Attribute att Name att Value node if attribute null I Region region get Attribute Region att Name att Value node Offset if region null attribute set Name Offset region get Offset attribute set Name Length att Name length attribute set Value Offset region get Offset region get Length 1 att Value length attribute set Value Length att Value length node setXML Attribute attribute catch Bad Location Exception e append Child To Parent parent node f Document Node Stack push node  startElement localName qName SAXException IDocumentNode fDocumentNodeStack isEmpty IDocumentNode fDocumentNodeStack IDocumentNode getDocumentNode qName setXMLTagName qName nodeOffset getStartOffset qName setOffset nodeOffset IDocument getDocument getLineOfOffset nodeOffset setLineIndent getOffset getLineOffset getLength attName getQName attValue getValue IDocumentAttribute getDocumentAttribute attName attValue IRegion getAttributeRegion attName attValue nodeOffset setNameOffset getOffset setNameLength attName setValueOffset getOffset getLength attValue setValueLength attValue setXMLAttribute BadLocationException appendChildToParent fDocumentNodeStack
protected void append Child To Parent I Document Node parent I Document Node child if parent null child null parent add Child Node child  appendChildToParent IDocumentNode IDocumentNode addChildNode
protected abstract I Document Node get Document Node String name I Document Node parent  IDocumentNode getDocumentNode IDocumentNode
protected abstract I Document Node get Document Node String name I Document Node parent protected abstract I Document Attribute get Document Attribute String name String value I Document Node parent  IDocumentNode getDocumentNode IDocumentNode IDocumentAttribute getDocumentAttribute IDocumentNode
private int get Start Offset String element Name throws Bad Location Exception int line f Locator get Line Number int col f Locator get Column Number I Document doc get Document if col 0 col doc get Line Length line String text doc get f Highest Offset 1 doc get Line Offset line f Highest Offset 1 Array List comment Positions new Array List for int idx 0 idx text length idx text index Of idx NON NLS 1 if idx 1 break int end text index Of idx NON NLS 1 if end 1 break comment Positions add new Position idx end idx idx end 1 int idx 0 for idx text length idx 1 idx text index Of element Name idx NON NLS 1 if idx 1 break boolean valid true for int i 0 i comment Positions size i Position pos Position comment Positions get i if pos includes idx valid false break if valid break if idx 1 f Highest Offset idx 1 return f Highest Offset  getStartOffset elementName BadLocationException fLocator getLineNumber fLocator getColumnNumber IDocument getDocument getLineLength fHighestOffset getLineOffset fHighestOffset ArrayList commentPositions ArrayList indexOf indexOf commentPositions indexOf elementName commentPositions commentPositions fHighestOffset fHighestOffset
private int get Element Length I Document Node node int line int column throws Bad Location Exception int end Index node get Offset I Document doc get Document int start Math max doc get Line Offset line node get Offset column doc get Line Length line String line Text doc get start column start doc get Line Offset line int index line Text index Of node getXML Tag Name NON NLS 1 NON NLS 2 if index 1 index line Text index Of NON NLS 1 if index 1 end Index column else end Index index 2 else end Index index node getXML Tag Name length 3 return start end Index node get Offset  getElementLength IDocumentNode BadLocationException endIndex getOffset IDocument getDocument getLineOffset getOffset getLineLength lineText getLineOffset lineText indexOf getXMLTagName lineText indexOf endIndex endIndex endIndex getXMLTagName endIndex getOffset
private I Region get Attribute Region String name String value int offset throws Bad Location Exception I Region name Region f Find Replace Adapter find offset name s s true false false true NON NLS 1 if name Region null if get Document get name Region get Offset name Region get Length value length equals value return new Region name Region get Offset name Region get Length value length 1 return null  IRegion getAttributeRegion BadLocationException IRegion nameRegion fFindReplaceAdapter nameRegion getDocument nameRegion getOffset nameRegion getLength nameRegion getOffset nameRegion getLength
public void end Element String uri String local Name String q Name throws SAX Exception I Document Node node I Document Node f Document Node Stack pop try node set Length get Element Length node f Locator get Line Number 1 f Locator get Column Number set Text Node Offset node catch Bad Location Exception e  endElement localName qName SAXException IDocumentNode IDocumentNode fDocumentNodeStack setLength getElementLength fLocator getLineNumber fLocator getColumnNumber setTextNodeOffset BadLocationException
protected void set Text Node Offset I Document Node node throws Bad Location Exception I Document Text Node text Node node get Text Node if text Node null text Node get Text null if text Node get Text trim length 0 node remove Text Node return I Document doc get Document String text doc get node get Offset node get Length text Node set Offset node get Offset text index Of text Node get Text text doc get text Node get Offset node get Length text Node get Offset node get Offset int index text index Of for index 1 index 0 index if Character is Whitespace text char At index index 1 break text Node set Length index text Node set Text doc get text Node get Offset index  setTextNodeOffset IDocumentNode BadLocationException IDocumentTextNode textNode getTextNode textNode textNode getText textNode getText removeTextNode IDocument getDocument getOffset getLength textNode setOffset getOffset indexOf textNode getText textNode getOffset getLength textNode getOffset getOffset indexOf isWhitespace charAt textNode setLength textNode setText textNode getOffset
see org xml sax helpers Default Handler fatal Error org xml sax SAX Parse Exception public void fatal Error SAX Parse Exception e throws SAX Exception generate Error Element Hierarchy  DefaultHandler fatalError SAXParseException fatalError SAXParseException SAXException generateErrorElementHierarchy
private void generate Error Element Hierarchy while f Document Node Stack is Empty I Document Node f Document Node Stack pop set Is Error Node true  generateErrorElementHierarchy fDocumentNodeStack isEmpty IDocumentNode fDocumentNodeStack setIsErrorNode
see org xml sax helpers Default Handler error org xml sax SAX Parse Exception public void error SAX Parse Exception e throws SAX Exception generate Error Element Hierarchy  DefaultHandler SAXParseException SAXParseException SAXException generateErrorElementHierarchy
see org xml sax helpers Default Handler set Document Locator org xml sax Locator public void set Document Locator Locator locator f Locator locator  DefaultHandler setDocumentLocator setDocumentLocator fLocator
protected abstract I Document get Document  IDocument getDocument

see org eclipse pde internal ui model I Document Text Node set Enclosing Element org eclipse pde internal ui model I Document Node public void set Enclosing Element I Document Node node f Enclosing Element node  IDocumentTextNode setEnclosingElement IDocumentNode setEnclosingElement IDocumentNode fEnclosingElement
see org eclipse pde internal ui model I Document Text Node get Enclosing Element public I Document Node get Enclosing Element return f Enclosing Element  IDocumentTextNode getEnclosingElement IDocumentNode getEnclosingElement fEnclosingElement
see org eclipse pde internal ui model I Document Text Node set Text java lang String public void set Text String text f Text text  IDocumentTextNode setText setText fText
see org eclipse pde internal ui model I Document Text Node get Text public String get Text return f Text null f Text NON NLS 1  IDocumentTextNode getText getText fText fText
see org eclipse pde internal ui model I Document Text Node set Offset int public void set Offset int offset f Offset offset  IDocumentTextNode setOffset setOffset fOffset
see org eclipse pde internal ui model I Document Text Node get Offset public int get Offset return f Offset  IDocumentTextNode getOffset getOffset fOffset
see org eclipse pde internal ui model I Document Text Node get Length public int get Length return f Length  IDocumentTextNode getLength getLength fLength
see org eclipse pde internal ui model I Document Text Node set Length int public void set Length int length f Length length  IDocumentTextNode setLength setLength fLength

public interface I Document Attribute extends Serializable void set Enclosing Element I Document Node node  IDocumentAttribute setEnclosingElement IDocumentNode
void set Enclosing Element I Document Node node I Document Node get Enclosing Element  setEnclosingElement IDocumentNode IDocumentNode getEnclosingElement
I Document Node get Enclosing Element void set Name Offset int offset  IDocumentNode getEnclosingElement setNameOffset
void set Name Offset int offset int get Name Offset  setNameOffset getNameOffset
int get Name Offset void set Name Length int length  getNameOffset setNameLength
void set Name Length int length int get Name Length  setNameLength getNameLength
int get Name Length void set Value Offset int offset  getNameLength setValueOffset
void set Value Offset int offset int get Value Offset  setValueOffset getValueOffset
int get Value Offset void set Value Length int length  getValueOffset setValueLength
void set Value Length int length int get Value Length  setValueLength getValueLength
int get Value Length String get Attribute Name  getValueLength getAttributeName
String get Attribute Name String get Attribute Value  getAttributeName getAttributeValue
String get Attribute Value String write  getAttributeValue

public interface I Document Key extends I Writable void set Name String name  IDocumentKey IWritable setName
public interface I Document Key extends I Writable void set Name String name String get Name  IDocumentKey IWritable setName getName
String get Name void set Offset int offset  getName setOffset
void set Offset int offset int get Offset  setOffset getOffset
int get Offset void set Length int length  getOffset setLength
void set Length int length int get Length  setLength getLength
int get Length String write  getLength

public interface I Document Node extends Serializable I Document Node get Parent Node  IDocumentNode IDocumentNode getParentNode
I Document Node get Parent Node void set Parent Node I Document Node node  IDocumentNode getParentNode setParentNode IDocumentNode
void set Parent Node I Document Node node void add Child Node I Document Node child  setParentNode IDocumentNode addChildNode IDocumentNode
void add Child Node I Document Node child void add Child Node I Document Node child int position  addChildNode IDocumentNode addChildNode IDocumentNode
void add Child Node I Document Node child void add Child Node I Document Node child int position I Document Node remove Child Node I Document Node child  addChildNode IDocumentNode addChildNode IDocumentNode IDocumentNode removeChildNode IDocumentNode
void add Child Node I Document Node child int position I Document Node remove Child Node I Document Node child I Document Node get Child Nodes  addChildNode IDocumentNode IDocumentNode removeChildNode IDocumentNode IDocumentNode getChildNodes
I Document Node get Child Nodes void add Text Node I Document Text Node text Node  IDocumentNode getChildNodes addTextNode IDocumentTextNode textNode
void add Text Node I Document Text Node text Node I Document Text Node get Text Node  addTextNode IDocumentTextNode textNode IDocumentTextNode getTextNode
void add Text Node I Document Text Node text Node I Document Text Node get Text Node void remove Text Node  addTextNode IDocumentTextNode textNode IDocumentTextNode getTextNode removeTextNode
void remove Text Node int index Of I Document Node child  removeTextNode indexOf IDocumentNode
int index Of I Document Node child I Document Node get Child At int index  indexOf IDocumentNode IDocumentNode getChildAt
I Document Node get Child At int index I Document Node get Previous Sibling  IDocumentNode getChildAt IDocumentNode getPreviousSibling
I Document Node get Previous Sibling void set Previous Sibling I Document Node sibling  IDocumentNode getPreviousSibling setPreviousSibling IDocumentNode
void set Previous Sibling I Document Node sibling void swap I Document Node child1 I Document Node child2  setPreviousSibling IDocumentNode IDocumentNode IDocumentNode
void swap I Document Node child1 I Document Node child2 void setXML Tag Name String tag  IDocumentNode IDocumentNode setXMLTagName
void setXML Tag Name String tag String getXML Tag Name  setXMLTagName getXMLTagName
String getXML Tag Name void setXML Attribute I Document Attribute attribute  getXMLTagName setXMLAttribute IDocumentAttribute
void setXML Attribute I Document Attribute attribute void setXML Attribute String name String value  setXMLAttribute IDocumentAttribute setXMLAttribute
void setXML Attribute I Document Attribute attribute void setXML Attribute String name String value String getXML Attribute Value String name  setXMLAttribute IDocumentAttribute setXMLAttribute getXMLAttributeValue
String getXML Attribute Value String name I Document Attribute get Document Attribute String name  getXMLAttributeValue IDocumentAttribute getDocumentAttribute
I Document Attribute get Document Attribute String name I Document Attribute get Node Attributes  IDocumentAttribute getDocumentAttribute IDocumentAttribute getNodeAttributes
I Document Attribute get Document Attribute String name I Document Attribute get Node Attributes void remove Document Attribute I Document Attribute attr  IDocumentAttribute getDocumentAttribute IDocumentAttribute getNodeAttributes removeDocumentAttribute IDocumentAttribute
void remove Document Attribute I Document Attribute attr boolean is Error Node  removeDocumentAttribute IDocumentAttribute isErrorNode
boolean is Error Node void set Is Error Node boolean is Error Node  isErrorNode setIsErrorNode isErrorNode
void set Is Error Node boolean is Error Node void set Offset int offset  setIsErrorNode isErrorNode setOffset
void set Offset int offset void set Length int length  setOffset setLength
void set Length int length int get Offset  setLength getOffset
int get Offset int get Length  getOffset getLength
int get Length void set Line Indent int indent  getLength setLineIndent
void set Line Indent int indent int get Line Indent  setLineIndent getLineIndent
int get Line Indent String write boolean indent  getLineIndent
String write boolean indent String write Shallow boolean terminate  writeShallow

public interface I Document Text Node void set Enclosing Element I Document Node node  IDocumentTextNode setEnclosingElement IDocumentNode
void set Enclosing Element I Document Node node I Document Node get Enclosing Element  setEnclosingElement IDocumentNode IDocumentNode getEnclosingElement
I Document Node get Enclosing Element void set Text String text  IDocumentNode getEnclosingElement setText
void set Text String text String get Text  setText getText
String get Text void set Offset int offset  getText setOffset
void set Offset int offset int get Offset  setOffset getOffset
int get Offset void set Length int length  getOffset setLength
void set Length int length int get Length  setLength getLength

public interface I Editing Model extends I Model I Model Change Provider I Reconciling Participant I Editable public I Document get Document  IEditingModel IModel IModelChangeProvider IReconcilingParticipant IEditable IDocument getDocument
public I Document get Document public void set Stale boolean stale  IDocument getDocument setStale
public I Document get Document public void set Stale boolean stale public boolean is Stale  IDocument getDocument setStale isStale

param model public Abstract Plugin Document Handler Plugin Model Base model f Model model  AbstractPluginDocumentHandler PluginModelBase fModel
see org eclipse pde internal ui model plugin Document Handler get Document protected I Document get Document return f Model get Document  DocumentHandler getDocument IDocument getDocument fModel getDocument
public void end Document throws SAX Exception I Plugin Base plugin Base f Model get Plugin Base try if plugin Base null plugin Base set Schema Version f Schema Version catch Core Exception e  endDocument SAXException IPluginBase pluginBase fModel getPluginBase pluginBase pluginBase setSchemaVersion fSchemaVersion CoreException
public void processing Instruction String target String data throws SAX Exception if eclipse equals target NON NLS 1 f Schema Version 3 0 NON NLS 1  processingInstruction SAXException fSchemaVersion
protected Plugin Model Base get Model return f Model  PluginModelBase getModel fModel

public class Fragment Model extends Plugin Model Base implements I Fragment Model public Fragment Model I Document document boolean is Reconciling super document is Reconciling  FragmentModel PluginModelBase IFragmentModel FragmentModel IDocument isReconciling isReconciling
see org eclipse pde core plugin I Fragment Model get Fragment public I Fragment get Fragment return I Fragment get Plugin Base  IFragmentModel getFragment IFragment getFragment IFragment getPluginBase
see org eclipse pde core plugin I Plugin Model Base is Fragment Model public boolean is Fragment Model return true  IPluginModelBase isFragmentModel isFragmentModel
see org eclipse pde core plugin I Plugin Model Base get Bundle Description public Bundle Description get Bundle Description return null  IPluginModelBase getBundleDescription BundleDescription getBundleDescription
see org eclipse pde core plugin I Plugin Model Base set Bundle Description org eclipse osgi service resolver Bundle Description public void set Bundle Description Bundle Description description  IPluginModelBase setBundleDescription BundleDescription setBundleDescription BundleDescription

see org eclipse pde core plugin I Fragment get Plugin Id public String get Plugin Id return getXML Attribute Value P PLUGIN ID  IFragment getPluginId getPluginId getXMLAttributeValue P_PLUGIN_ID
see org eclipse pde core plugin I Fragment get Plugin Version public String get Plugin Version return getXML Attribute Value P PLUGIN VERSION  IFragment getPluginVersion getPluginVersion getXMLAttributeValue P_PLUGIN_VERSION
public int get Rule String match getXML Attribute Value match NON NLS 1 if match null match trim length 0 return I Match Rules NONE if match equals compatible NON NLS 1 return I Match Rules COMPATIBLE if match equals perfect NON NLS 1 return I Match Rules PERFECT if match equals equivalent NON NLS 1 return I Match Rules EQUIVALENT return I Match Rules GREATER OR EQUAL  getRule getXMLAttributeValue IMatchRules IMatchRules IMatchRules IMatchRules IMatchRules GREATER_OR_EQUAL
see org eclipse pde core plugin I Fragment set Plugin Id java lang String public void set Plugin Id String id throws Core Exception setXML Attribute P PLUGIN ID id  IFragment setPluginId setPluginId CoreException setXMLAttribute P_PLUGIN_ID
see org eclipse pde core plugin I Fragment set Plugin Version java lang String public void set Plugin Version String version throws Core Exception setXML Attribute P PLUGIN VERSION version  IFragment setPluginVersion setPluginVersion CoreException setXMLAttribute P_PLUGIN_VERSION
public void set Rule int rule throws Core Exception String match NON NLS 1 switch rule case I Match Rules COMPATIBLE match compatible NON NLS 1 break case I Match Rules EQUIVALENT match equivalent NON NLS 1 break case I Match Rules PERFECT match perfect NON NLS 1 break case I Match Rules GREATER OR EQUAL match greater Or Equal NON NLS 1 setXML Attribute P RULE match  setRule CoreException IMatchRules IMatchRules IMatchRules IMatchRules GREATER_OR_EQUAL greaterOrEqual setXMLAttribute P_RULE
protected String get Specific Attributes Array List result new Array List String pluginID get Plugin Id if pluginID null pluginID trim length 0 result add P PLUGIN ID pluginID NON NLS 1 NON NLS 2 NON NLS 3 String plugin Version get Plugin Version if plugin Version null plugin Version trim length 0 result add P PLUGIN VERSION plugin Version NON NLS 1 NON NLS 2 NON NLS 3 String match getXML Attribute Value P RULE if match null match trim length 0 result add P RULE match NON NLS 1 NON NLS 2 NON NLS 3 return String result to Array new String result size  getSpecificAttributes ArrayList ArrayList getPluginId P_PLUGIN_ID pluginVersion getPluginVersion pluginVersion pluginVersion P_PLUGIN_VERSION pluginVersion getXMLAttributeValue P_RULE P_RULE toArray

param model public Node Offset Handler Plugin Model Base model super model  NodeOffsetHandler PluginModelBase
public void start Element String uri String local Name String q Name Attributes attributes throws SAX Exception super start Element uri local Name q Name attributes I Document Node node I Document Node f Document Node Stack peek I Document Attribute attrs node get Node Attributes for int i 0 i attrs length i if attrs i get Name Offset 1 node remove Document Attribute attrs i  startElement localName qName SAXException startElement localName qName IDocumentNode IDocumentNode fDocumentNodeStack IDocumentAttribute getNodeAttributes getNameOffset removeDocumentAttribute
protected I Document Node get Document Node String name I Document Node parent I Document Node node null if parent null node I Document Node get Model get Plugin Base node set Offset 1 node set Length 1 else I Document Node children parent get Child Nodes for int i 0 i children length i if children i get Offset 0 node children i break I Document Attribute attrs node get Node Attributes for int i 0 i attrs length i attrs i set Name Offset 1 attrs i set Name Length 1 attrs i set Value Offset 1 attrs i set Value Length 1 for int i 0 i node get Child Nodes length i I Document Node child node get Child At i child set Offset 1 child set Length 1 return node  IDocumentNode getDocumentNode IDocumentNode IDocumentNode IDocumentNode getModel getPluginBase setOffset setLength IDocumentNode getChildNodes getOffset IDocumentAttribute getNodeAttributes setNameOffset setNameLength setValueOffset setValueLength getChildNodes IDocumentNode getChildAt setOffset setLength
see org eclipse pde internal ui model Document Handler append Child To Parent org eclipse pde internal ui model I Document Node org eclipse pde internal ui model I Document Node protected void append Child To Parent I Document Node parent I Document Node child  DocumentHandler appendChildToParent IDocumentNode IDocumentNode appendChildToParent IDocumentNode IDocumentNode
see org eclipse pde internal ui model plugin Document Handler get Document Attribute java lang String java lang String org eclipse pde internal ui model I Document Node protected I Document Attribute get Document Attribute String name String value I Document Node parent return parent get Document Attribute name  DocumentHandler getDocumentAttribute IDocumentNode IDocumentAttribute getDocumentAttribute IDocumentNode getDocumentAttribute

see org eclipse pde core plugin I Plugin Attribute get Value public String get Value return f Value  IPluginAttribute getValue getValue fValue
see org eclipse pde core plugin I Plugin Attribute set Value java lang String public void set Value String value throws Core Exception f Value value  IPluginAttribute setValue setValue CoreException fValue
see org eclipse pde internal ui model I Document Attribute set Enclosing Element org eclipse pde internal ui model I Document Node public void set Enclosing Element I Document Node node f Enclosing Element node  IDocumentAttribute setEnclosingElement IDocumentNode setEnclosingElement IDocumentNode fEnclosingElement
see org eclipse pde internal ui model I Document Attribute get Enclosing Element public I Document Node get Enclosing Element return f Enclosing Element  IDocumentAttribute getEnclosingElement IDocumentNode getEnclosingElement fEnclosingElement
see org eclipse pde internal ui model I Document Attribute set Name Offset int public void set Name Offset int offset f Name Offset offset  IDocumentAttribute setNameOffset setNameOffset fNameOffset
see org eclipse pde internal ui model I Document Attribute get Name Offset public int get Name Offset return f Name Offset  IDocumentAttribute getNameOffset getNameOffset fNameOffset
see org eclipse pde internal ui model I Document Attribute set Name Length int public void set Name Length int length f Name Length length  IDocumentAttribute setNameLength setNameLength fNameLength
see org eclipse pde internal ui model I Document Attribute get Name Length public int get Name Length return f Name Length  IDocumentAttribute getNameLength getNameLength fNameLength
see org eclipse pde internal ui model I Document Attribute set Value Offset int public void set Value Offset int offset f Value Offset offset  IDocumentAttribute setValueOffset setValueOffset fValueOffset
see org eclipse pde internal ui model I Document Attribute get Value Offset public int get Value Offset return f Value Offset  IDocumentAttribute getValueOffset getValueOffset fValueOffset
see org eclipse pde internal ui model I Document Attribute set Value Length int public void set Value Length int length f Value Length length  IDocumentAttribute setValueLength setValueLength fValueLength
see org eclipse pde internal ui model I Document Attribute get Value Length public int get Value Length return f Value Length  IDocumentAttribute getValueLength getValueLength fValueLength
see org eclipse pde internal ui model I Document Attribute get Attribute Name public String get Attribute Name return get Name  IDocumentAttribute getAttributeName getAttributeName getName
see org eclipse pde internal ui model I Document Attribute get Attribute Value public String get Attribute Value return get Value  IDocumentAttribute getAttributeValue getAttributeValue getValue
see org eclipse pde internal ui model I Document Attribute write public String write return get Name get Writable String get Value NON NLS 1 NON NLS 2  IDocumentAttribute getName getWritableString getValue

public void add I Plugin Library library throws Core Exception I Document Node parent get Enclosing Element runtime true NON NLS 1 if library instanceof Plugin Library Node Plugin Library Node node Plugin Library Node library node set Model get Model library set In The Model true parent add Child Node node fire Structure Changed library I Model Changed Event INSERT  IPluginLibrary CoreException IDocumentNode getEnclosingElement PluginLibraryNode PluginLibraryNode PluginLibraryNode setModel getModel setInTheModel addChildNode fireStructureChanged IModelChangedEvent
public void add I Plugin Import plugin Import throws Core Exception I Document Node parent get Enclosing Element requires true NON NLS 1 if plugin Import instanceof Plugin Import Node Plugin Import Node node Plugin Import Node plugin Import node set Model get Model plugin Import set In The Model true parent add Child Node node fire Structure Changed plugin Import I Model Changed Event INSERT  IPluginImport pluginImport CoreException IDocumentNode getEnclosingElement pluginImport PluginImportNode PluginImportNode PluginImportNode pluginImport setModel getModel pluginImport setInTheModel addChildNode fireStructureChanged pluginImport IModelChangedEvent
public void remove I Plugin Import plugin Import throws Core Exception I Document Node parent get Enclosing Element requires false NON NLS 1 if parent null parent remove Child Node I Document Node plugin Import plugin Import set In The Model false fire Structure Changed plugin Import I Model Changed Event REMOVE  IPluginImport pluginImport CoreException IDocumentNode getEnclosingElement removeChildNode IDocumentNode pluginImport pluginImport setInTheModel fireStructureChanged pluginImport IModelChangedEvent
public I Plugin Library get Libraries Array List result new Array List I Document Node requires Node get Enclosing Element runtime false NON NLS 1 if requires Node null I Document Node children requires Node get Child Nodes for int i 0 i children length i if children i instanceof I Plugin Library result add children i return I Plugin Library result to Array new I Plugin Library result size  IPluginLibrary getLibraries ArrayList ArrayList IDocumentNode requiresNode getEnclosingElement requiresNode IDocumentNode requiresNode getChildNodes IPluginLibrary IPluginLibrary toArray IPluginLibrary
private I Document Node get Enclosing Element String element Name boolean create Plugin Element Node element null I Document Node children get Child Nodes for int i 0 i children length i if children i instanceof I Plugin Element if Plugin Element Node children i getXML Tag Name equals element Name element Plugin Element Node children i break if element null create element new Plugin Element Node element setXML Tag Name element Name element set Parent Node this element set Model get Model element set In The Model true if element Name equals runtime NON NLS 1 add Child Node element 0 else if element Name equals requires NON NLS 1 if children length 0 children 0 getXML Tag Name equals runtime NON NLS 1 add Child Node element 1 else add Child Node element 0 return element  IDocumentNode getEnclosingElement elementName PluginElementNode IDocumentNode getChildNodes IPluginElement PluginElementNode getXMLTagName elementName PluginElementNode PluginElementNode setXMLTagName elementName setParentNode setModel getModel setInTheModel elementName addChildNode elementName getXMLTagName addChildNode addChildNode
public I Plugin Import get Imports Array List result new Array List I Document Node requires Node get Enclosing Element requires false NON NLS 1 if requires Node null I Document Node children requires Node get Child Nodes for int i 0 i children length i if children i instanceof I Plugin Import result add children i return I Plugin Import result to Array new I Plugin Import result size  IPluginImport getImports ArrayList ArrayList IDocumentNode requiresNode getEnclosingElement requiresNode IDocumentNode requiresNode getChildNodes IPluginImport IPluginImport toArray IPluginImport
see org eclipse pde core plugin I Plugin Base get Provider Name public String get Provider Name return getXML Attribute Value P PROVIDER  IPluginBase getProviderName getProviderName getXMLAttributeValue P_PROVIDER
see org eclipse pde core plugin I Plugin Base get Version public String get Version return getXML Attribute Value P VERSION  IPluginBase getVersion getVersion getXMLAttributeValue P_VERSION
public void remove I Plugin Library library throws Core Exception I Document Node parent get Enclosing Element runtime false NON NLS 1 if parent null parent remove Child Node I Document Node library library set In The Model false fire Structure Changed library I Model Changed Event REMOVE  IPluginLibrary CoreException IDocumentNode getEnclosingElement removeChildNode IDocumentNode setInTheModel fireStructureChanged IModelChangedEvent
see org eclipse pde core plugin I Plugin Base set Provider Name java lang String public void set Provider Name String provider Name throws Core Exception setXML Attribute P PROVIDER provider Name  IPluginBase setProviderName setProviderName providerName CoreException setXMLAttribute P_PROVIDER providerName
see org eclipse pde core plugin I Plugin Base set Version java lang String public void set Version String version throws Core Exception setXML Attribute P VERSION version  IPluginBase setVersion setVersion CoreException setXMLAttribute P_VERSION
public void swap I Plugin Library l1 I Plugin Library l2 throws Core Exception I Document Node node get Enclosing Element runtime false NON NLS 1 if node null node swap I Document Node l1 I Document Node l2 fire Property Changed node P LIBRARY ORDER l1 l2  IPluginLibrary IPluginLibrary CoreException IDocumentNode getEnclosingElement IDocumentNode IDocumentNode firePropertyChanged P_LIBRARY_ORDER
see org eclipse pde core plugin I Plugin Base get Schema Version public String get Schema Version return f Schema Version  IPluginBase getSchemaVersion getSchemaVersion fSchemaVersion
see org eclipse pde core plugin I Plugin Base set Schema Version java lang String public void set Schema Version String schema Version throws Core Exception f Schema Version schema Version  IPluginBase setSchemaVersion setSchemaVersion schemaVersion CoreException fSchemaVersion schemaVersion
public void add I Plugin Extension extension throws Core Exception if extension instanceof Plugin Extension Node Plugin Extension Node node Plugin Extension Node extension node set Model get Model extension set In The Model true add Child Node node fire Structure Changed extension I Model Changed Event INSERT  IPluginExtension CoreException PluginExtensionNode PluginExtensionNode PluginExtensionNode setModel getModel setInTheModel addChildNode fireStructureChanged IModelChangedEvent
public void add I Plugin Extension Point extension Point throws Core Exception if extension Point instanceof Plugin Extension Point Node Plugin Extension Point Node node Plugin Extension Point Node extension Point node set Model get Model extension Point set In The Model true node set Parent Node this I Plugin Extension Point ext Points get Extension Points if ext Points length 0 add Child Node node index Of I Document Node ext Points ext Points length 1 1 else I Document Node requires get Enclosing Element requires false NON NLS 1 if requires null add Child Node node index Of requires 1 else I Document Node runtime get Enclosing Element runtime false NON NLS 1 if runtime null add Child Node node index Of runtime 1 else add Child Node node 0 fire Structure Changed extension Point I Model Changed Event INSERT  IPluginExtensionPoint extensionPoint CoreException extensionPoint PluginExtensionPointNode PluginExtensionPointNode PluginExtensionPointNode extensionPoint setModel getModel extensionPoint setInTheModel setParentNode IPluginExtensionPoint extPoints getExtensionPoints extPoints addChildNode indexOf IDocumentNode extPoints extPoints IDocumentNode getEnclosingElement addChildNode indexOf IDocumentNode getEnclosingElement addChildNode indexOf addChildNode fireStructureChanged extensionPoint IModelChangedEvent
public I Plugin Extension Point get Extension Points Array List result new Array List I Document Node children get Child Nodes for int i 0 i children length i if children i instanceof I Plugin Extension Point result add children i return I Plugin Extension Point result to Array new I Plugin Extension Point result size  IPluginExtensionPoint getExtensionPoints ArrayList ArrayList IDocumentNode getChildNodes IPluginExtensionPoint IPluginExtensionPoint toArray IPluginExtensionPoint
public I Plugin Extension get Extensions Array List result new Array List I Document Node children get Child Nodes for int i 0 i children length i if children i instanceof I Plugin Extension result add children i return I Plugin Extension result to Array new I Plugin Extension result size  IPluginExtension getExtensions ArrayList ArrayList IDocumentNode getChildNodes IPluginExtension IPluginExtension toArray IPluginExtension
public int get Index Of I Plugin Extension e I Plugin Extension children get Extensions for int i 0 i children length i if children i equals e return i return 1  getIndexOf IPluginExtension IPluginExtension getExtensions
public void remove I Plugin Extension extension throws Core Exception if extension instanceof I Document Node remove Child Node I Document Node extension extension set In The Model false fire Structure Changed extension I Model Changed Event REMOVE  IPluginExtension CoreException IDocumentNode removeChildNode IDocumentNode setInTheModel fireStructureChanged IModelChangedEvent
public void remove I Plugin Extension Point extension Point throws Core Exception if extension Point instanceof I Document Node remove Child Node I Document Node extension Point extension Point set In The Model false fire Structure Changed extension Point I Model Changed Event REMOVE  IPluginExtensionPoint extensionPoint CoreException extensionPoint IDocumentNode removeChildNode IDocumentNode extensionPoint extensionPoint setInTheModel fireStructureChanged extensionPoint IModelChangedEvent
public void swap I Plugin Extension e1 I Plugin Extension e2 throws Core Exception swap I Document Node e1 I Document Node e2 fire Property Changed this P EXTENSION ORDER e1 e2  IPluginExtension IPluginExtension CoreException IDocumentNode IDocumentNode firePropertyChanged P_EXTENSION_ORDER
public void swap I Plugin Import import1 I Plugin Import import2 throws Core Exception I Document Node node get Enclosing Element requires false NON NLS 1 if node null node swap I Document Node import1 I Document Node import2 fire Property Changed node P IMPORT ORDER import1 import2  IPluginImport IPluginImport CoreException IDocumentNode getEnclosingElement IDocumentNode IDocumentNode firePropertyChanged P_IMPORT_ORDER
see org eclipse pde core I Identifiable get Id public String get Id return getXML Attribute Value P ID  IIdentifiable getId getId getXMLAttributeValue P_ID
see org eclipse pde core I Identifiable set Id java lang String public void set Id String id throws Core Exception setXML Attribute P ID id  IIdentifiable setId setId CoreException setXMLAttribute P_ID
see org eclipse pde core plugin I Plugin Object get Name public String get Name return getXML Attribute Value P NAME  IPluginObject getName getName getXMLAttributeValue P_NAME
see org eclipse pde core plugin I Plugin Object set Name java lang String public void set Name String name throws Core Exception setXML Attribute P NAME name  IPluginObject setName setName CoreException setXMLAttribute P_NAME
public String write boolean indent String new Line System get Property line separator NON NLS 1 String Buffer buffer new String Buffer buffer append xml version 1 0 encoding UTF 8 new Line NON NLS 1 if PDE Core get Default get Model Manager isOS Gi Runtime buffer append eclipse version 3 0 new Line NON NLS 1 buffer append write Shallow false new Line I Document Node runtime get Enclosing Element runtime false NON NLS 1 if runtime null runtime set Line Indent get Line Indent 3 buffer append runtime write true new Line I Document Node requires get Enclosing Element requires false NON NLS 1 if requires null requires set Line Indent get Line Indent 3 buffer append requires write true new Line I Plugin Extension Point ext Points get Extension Points for int i 0 i ext Points length i I Document Node ext Point I Document Node ext Points i ext Point set Line Indent get Line Indent 3 buffer append ext Point write true new Line I Plugin Extension extensions get Extensions for int i 0 i extensions length i I Document Node extension I Document Node extensions i extension set Line Indent get Line Indent 3 buffer append extension write true new Line buffer append getXML Tag Name NON NLS 1 NON NLS 2 return buffer to String  newLine getProperty StringBuffer StringBuffer newLine PDECore getDefault getModelManager isOSGiRuntime newLine writeShallow newLine IDocumentNode getEnclosingElement setLineIndent getLineIndent newLine IDocumentNode getEnclosingElement setLineIndent getLineIndent newLine IPluginExtensionPoint extPoints getExtensionPoints extPoints IDocumentNode extPoint IDocumentNode extPoints extPoint setLineIndent getLineIndent extPoint newLine IPluginExtension getExtensions IDocumentNode IDocumentNode setLineIndent getLineIndent newLine getXMLTagName toString
public String write Shallow boolean terminate String new Line System get Property line separator NON NLS 1 String Buffer buffer new String Buffer buffer append getXML Tag Name NON NLS 1 buffer append new Line String id get Id if id null id trim length 0 buffer append P ID get Writable String id new Line NON NLS 1 NON NLS 2 NON NLS 3 String name get Name if name null name trim length 0 buffer append P NAME get Writable String name new Line NON NLS 1 NON NLS 2 NON NLS 3 String version get Version if version null version trim length 0 buffer append P VERSION get Writable String version new Line NON NLS 1 NON NLS 2 NON NLS 3 String provider get Provider Name if provider null provider trim length 0 buffer append P PROVIDER get Writable String provider NON NLS 1 NON NLS 2 NON NLS 3 String specific get Specific Attributes for int i 0 i specific length i buffer append new Line specific i if terminate buffer append NON NLS 1 buffer append NON NLS 1 return buffer to String  writeShallow newLine getProperty StringBuffer StringBuffer getXMLTagName newLine getId P_ID getWritableString newLine getName P_NAME getWritableString newLine getVersion P_VERSION getWritableString newLine getProviderName P_PROVIDER getWritableString getSpecificAttributes newLine toString
protected abstract String get Specific Attributes  getSpecificAttributes

private Plugin Document Node Factory f Factory public Plugin Document Handler Plugin Model Base model super model f Factory Plugin Document Node Factory get Model get Plugin Factory  PluginDocumentNodeFactory fFactory PluginDocumentHandler PluginModelBase fFactory PluginDocumentNodeFactory getModel getPluginFactory
public void characters char ch int start int length throws SAX Exception I Document Node parent I Document Node f Document Node Stack peek if parent null return String Buffer buffer new String Buffer buffer append ch start length I Document Text Node text Node parent get Text Node if text Node null if buffer to String trim length 0 text Node new Document Text Node text Node set Enclosing Element parent parent add Text Node text Node text Node set Text buffer to String trim  SAXException IDocumentNode IDocumentNode fDocumentNodeStack StringBuffer StringBuffer IDocumentTextNode textNode getTextNode textNode toString textNode DocumentTextNode textNode setEnclosingElement addTextNode textNode textNode setText toString
see org eclipse pde internal ui model plugin Document Handler get Document Node java lang String org eclipse pde internal ui model I Document Node protected I Document Node get Document Node String name I Document Node parent return f Factory create Document Node name parent  DocumentHandler getDocumentNode IDocumentNode IDocumentNode getDocumentNode IDocumentNode fFactory createDocumentNode
see org eclipse pde internal ui model plugin Document Handler get Document Attribute java lang String java lang String org eclipse pde internal ui model I Document Node protected I Document Attribute get Document Attribute String name String value I Document Node parent return f Factory create Attribute name value parent  DocumentHandler getDocumentAttribute IDocumentNode IDocumentAttribute getDocumentAttribute IDocumentNode fFactory createAttribute

see org eclipse pde internal ui neweditor model I Document Node get Child Nodes public I Document Node get Child Nodes return I Document Node f Children to Array new I Document Node f Children size  IDocumentNode getChildNodes IDocumentNode getChildNodes IDocumentNode fChildren toArray IDocumentNode fChildren
see org eclipse pde internal ui model I Document Node index Of org eclipse pde internal ui model I Document Node public int index Of I Document Node child return f Children index Of child  IDocumentNode indexOf IDocumentNode indexOf IDocumentNode fChildren indexOf
public I Document Node get Child At int index if index f Children size return I Document Node f Children get index return null  IDocumentNode getChildAt fChildren IDocumentNode fChildren
see org eclipse pde internal ui neweditor model I Document Node get Parent Node public I Document Node get Parent Node return f Parent  IDocumentNode getParentNode IDocumentNode getParentNode fParent
see org eclipse pde internal ui neweditor model I Document Node set Parent Node org eclipse pde internal ui neweditor model I Document Node public void set Parent Node I Document Node node f Parent node  IDocumentNode setParentNode IDocumentNode setParentNode IDocumentNode fParent
see org eclipse pde internal ui neweditor model I Document Node add Child Node org eclipse pde internal ui neweditor model I Document Node public void add Child Node I Document Node child add Child Node child f Children size  IDocumentNode addChildNode IDocumentNode addChildNode IDocumentNode addChildNode fChildren
public void add Child Node I Document Node child int position f Children add position child if position 0 f Children size 1 child set Previous Sibling I Document Node f Children get position 1 if f Children size 1 position f Children size 1 I Document Node f Children get position 1 set Previous Sibling child child set Parent Node this  addChildNode IDocumentNode fChildren fChildren setPreviousSibling IDocumentNode fChildren fChildren fChildren IDocumentNode fChildren setPreviousSibling setParentNode
public I Document Node remove Child Node I Document Node child int index f Children index Of child if index 1 f Children remove child if index f Children size I Document Node prev Sibling index 0 null I Document Node f Children get index 1 I Document Node f Children get index set Previous Sibling prev Sibling return child return null  IDocumentNode removeChildNode IDocumentNode fChildren indexOf fChildren fChildren IDocumentNode prevSibling IDocumentNode fChildren IDocumentNode fChildren setPreviousSibling prevSibling
see org eclipse pde internal ui neweditor model I Document Node is Error Node public boolean is Error Node return f Is Error Node  IDocumentNode isErrorNode isErrorNode fIsErrorNode
see org eclipse pde internal ui neweditor model I Document Node set Is Error Node boolean public void set Is Error Node boolean is Error Node f Is Error Node is Error Node  IDocumentNode setIsErrorNode setIsErrorNode isErrorNode fIsErrorNode isErrorNode
see org eclipse pde internal ui model I Document Node set Offset int public void set Offset int offset f Offset offset  IDocumentNode setOffset setOffset fOffset
see org eclipse pde internal ui model I Document Node set Length int public void set Length int length f Length length  IDocumentNode setLength setLength fLength
see org eclipse pde internal ui model I Document Node get Offset public int get Offset return f Offset  IDocumentNode getOffset getOffset fOffset
see org eclipse pde internal ui model I Document Node get Length public int get Length return f Length  IDocumentNode getLength getLength fLength
see org eclipse pde internal ui model I Document Node set Attribute org eclipse pde internal ui model I Document Attribute public void setXML Attribute I Document Attribute attribute f Attributes put attribute get Attribute Name attribute  IDocumentNode setAttribute IDocumentAttribute setXMLAttribute IDocumentAttribute fAttributes getAttributeName
see org eclipse pde internal ui model I Document Node getXML Attribute Value java lang String public String getXML Attribute Value String name Plugin Attribute attr Plugin Attribute f Attributes get name return attr null null attr get Value  IDocumentNode getXMLAttributeValue getXMLAttributeValue PluginAttribute PluginAttribute fAttributes getValue
see org eclipse pde internal ui model I Document Node setXML Tag Name java lang String public void setXML Tag Name String tag f Tag tag  IDocumentNode setXMLTagName setXMLTagName fTag
see org eclipse pde internal ui model I Document Node getXML Tag Name public String getXML Tag Name return f Tag  IDocumentNode getXMLTagName getXMLTagName fTag
see org eclipse pde internal ui model I Document Node get Document Attribute java lang String public I Document Attribute get Document Attribute String name return I Document Attribute f Attributes get name  IDocumentNode getDocumentAttribute IDocumentAttribute getDocumentAttribute IDocumentAttribute fAttributes
see org eclipse pde internal ui model I Document Node get Line Indent public int get Line Indent return f Indent  IDocumentNode getLineIndent getLineIndent fIndent
see org eclipse pde internal ui model I Document Node set Line Indent int public void set Line Indent int indent f Indent indent  IDocumentNode setLineIndent setLineIndent fIndent
public I Document Attribute get Node Attributes Array List list new Array List Iterator iter f Attributes values iterator while iter has Next list add iter next return I Document Attribute list to Array new I Document Attribute list size  IDocumentAttribute getNodeAttributes ArrayList ArrayList fAttributes hasNext IDocumentAttribute toArray IDocumentAttribute
see org eclipse pde internal ui model I Document Node get Previous Sibling public I Document Node get Previous Sibling return f Previous Sibling  IDocumentNode getPreviousSibling IDocumentNode getPreviousSibling fPreviousSibling
see org eclipse pde internal ui model I Document Node set Previous Sibling org eclipse pde internal ui model I Document Node public void set Previous Sibling I Document Node sibling f Previous Sibling sibling  IDocumentNode setPreviousSibling IDocumentNode setPreviousSibling IDocumentNode fPreviousSibling
protected String get Indent String Buffer buffer new String Buffer for int i 0 i f Indent i buffer append NON NLS 1 return buffer to String  getIndent StringBuffer StringBuffer fIndent toString
public void swap I Document Node child1 I Document Node child2 int index1 f Children index Of child1 int index2 f Children index Of child2 f Children set index1 child2 f Children set index2 child1 child1 set Previous Sibling index2 0 null I Document Node f Children get index2 1 child2 set Previous Sibling index1 0 null I Document Node f Children get index1 1 if index1 f Children size 1 I Document Node f Children get index1 1 set Previous Sibling child2 if index2 f Children size 1 I Document Node f Children get index2 1 set Previous Sibling child1  IDocumentNode IDocumentNode fChildren indexOf fChildren indexOf fChildren fChildren setPreviousSibling IDocumentNode fChildren setPreviousSibling IDocumentNode fChildren fChildren IDocumentNode fChildren setPreviousSibling fChildren IDocumentNode fChildren setPreviousSibling
see org eclipse pde internal ui model I Document Node add Text Node org eclipse pde internal ui model I Document Text Node public void add Text Node I Document Text Node text Node f Text Node text Node  IDocumentNode addTextNode IDocumentTextNode addTextNode IDocumentTextNode textNode fTextNode textNode
see org eclipse pde internal ui model I Document Node get Text Node public I Document Text Node get Text Node return f Text Node  IDocumentNode getTextNode IDocumentTextNode getTextNode fTextNode
see org eclipse pde internal ui model I Document Node remove Text Node public void remove Text Node f Text Node null  IDocumentNode removeTextNode removeTextNode fTextNode
see org eclipse pde internal ui model I Document Node remove Document Attribute org eclipse pde internal ui model I Document Attribute public void remove Document Attribute I Document Attribute attr f Attributes remove attr get Attribute Name  IDocumentNode removeDocumentAttribute IDocumentAttribute removeDocumentAttribute IDocumentAttribute fAttributes getAttributeName

private Plugin Model Base f Model public Plugin Document Node Factory Plugin Model Base model f Model model  PluginModelBase fModel PluginDocumentNodeFactory PluginModelBase fModel
public I Document Node create Document Node String name I Document Node parent if parent null return create Plugin Base name if parent instanceof Plugin Base Node if extension equals name NON NLS 1 return create Extension parent if extension point equals name NON NLS 1 return create Extension Point parent else if name equals import parent instanceof Plugin Element Node NON NLS 1 if Plugin Element Node parent get Name equals requires NON NLS 1 I Document Node ancestor parent get Parent Node if ancestor null ancestor instanceof Plugin Base Node return create Import parent else if name equals library parent instanceof Plugin Element Node NON NLS 1 if Plugin Element Node parent get Name equals runtime NON NLS 1 I Document Node ancestor parent get Parent Node if ancestor null ancestor instanceof Plugin Base Node return create Library parent return create Element name parent  IDocumentNode createDocumentNode IDocumentNode createPluginBase PluginBaseNode createExtension createExtensionPoint PluginElementNode PluginElementNode getName IDocumentNode getParentNode PluginBaseNode createImport PluginElementNode PluginElementNode getName IDocumentNode getParentNode PluginBaseNode createLibrary createElement
param parent return private I Document Node create Library I Document Node parent Plugin Library Node node new Plugin Library Node node set Parent Node parent node set Model f Model node set In The Model true return node  IDocumentNode createLibrary IDocumentNode PluginLibraryNode PluginLibraryNode setParentNode setModel fModel setInTheModel
param parent private I Document Node create Import I Document Node parent Plugin Import Node node new Plugin Import Node node set Parent Node parent node set Model f Model node set In The Model true return node  IDocumentNode createImport IDocumentNode PluginImportNode PluginImportNode setParentNode setModel fModel setInTheModel
param name param parent return private I Document Node create Element String name I Document Node parent Plugin Element Node node new Plugin Element Node try node set Name name node set Parent Node parent node set Model f Model node set In The Model true catch Core Exception e return node  IDocumentNode createElement IDocumentNode PluginElementNode PluginElementNode setName setParentNode setModel fModel setInTheModel CoreException
param name param parent return private Plugin Extension Point Node create Extension Point I Document Node parent Plugin Extension Point Node node new Plugin Extension Point Node node set Parent Node parent node set Model f Model node set In The Model true return node  PluginExtensionPointNode createExtensionPoint IDocumentNode PluginExtensionPointNode PluginExtensionPointNode setParentNode setModel fModel setInTheModel
param name return private Plugin Extension Node create Extension I Document Node parent Plugin Extension Node node new Plugin Extension Node node set Parent Node parent node set Model f Model node set In The Model true return node  PluginExtensionNode createExtension IDocumentNode PluginExtensionNode PluginExtensionNode setParentNode setModel fModel setInTheModel
public I Document Attribute create Attribute String name String value I Document Node enclosing Element Plugin Attribute attribute new Plugin Attribute try attribute set Name name attribute set Value value catch Core Exception e attribute set Enclosing Element enclosing Element attribute set Model f Model attribute set In The Model true return attribute  IDocumentAttribute createAttribute IDocumentNode enclosingElement PluginAttribute PluginAttribute setName setValue CoreException setEnclosingElement enclosingElement setModel fModel setInTheModel
private Plugin Base Node create Plugin Base String name return Plugin Base Node f Model create Plugin Base name equals fragment NON NLS 1  PluginBaseNode createPluginBase PluginBaseNode fModel createPluginBase
public I Plugin Import create Import Plugin Import Node node new Plugin Import Node node set Model f Model node setXML Tag Name import NON NLS 1 return node  IPluginImport createImport PluginImportNode PluginImportNode setModel fModel setXMLTagName
public I Plugin Library create Library Plugin Library Node node new Plugin Library Node node set Model f Model node setXML Tag Name library NON NLS 1 return node  IPluginLibrary createLibrary PluginLibraryNode PluginLibraryNode setModel fModel setXMLTagName
see org eclipse pde core plugin I Extensions Model Factory create Attribute org eclipse pde core plugin I Plugin Element public I Plugin Attribute create Attribute I Plugin Element element return null  IExtensionsModelFactory createAttribute IPluginElement IPluginAttribute createAttribute IPluginElement
public I Plugin Element create Element I Plugin Object parent Plugin Element Node node new Plugin Element Node node set Model f Model node set Parent Node I Document Node parent return node  IPluginElement createElement IPluginObject PluginElementNode PluginElementNode setModel fModel setParentNode IDocumentNode
public I Plugin Extension create Extension Plugin Extension Node node new Plugin Extension Node node set Model f Model node setXML Tag Name extension NON NLS 1 return node  IPluginExtension createExtension PluginExtensionNode PluginExtensionNode setModel fModel setXMLTagName
public I Plugin Extension Point create Extension Point Plugin Extension Point Node node new Plugin Extension Point Node node set Model f Model node setXML Tag Name extension point NON NLS 1 return node  IPluginExtensionPoint createExtensionPoint PluginExtensionPointNode PluginExtensionPointNode setModel fModel setXMLTagName

see org eclipse pde core plugin I Plugin Element create Copy public I Plugin Element create Copy return null  IPluginElement createCopy IPluginElement createCopy
see org eclipse pde core plugin I Plugin Element get Attribute java lang String public I Plugin Attribute get Attribute String name return I Plugin Attribute f Attributes get name  IPluginElement getAttribute IPluginAttribute getAttribute IPluginAttribute fAttributes
see org eclipse pde core plugin I Plugin Element get Attributes public I Plugin Attribute get Attributes return I Plugin Attribute f Attributes values to Array new I Plugin Attribute f Attributes size  IPluginElement getAttributes IPluginAttribute getAttributes IPluginAttribute fAttributes toArray IPluginAttribute fAttributes
see org eclipse pde core plugin I Plugin Element get Attribute Count public int get Attribute Count return f Attributes size  IPluginElement getAttributeCount getAttributeCount fAttributes
see org eclipse pde core plugin I Plugin Element get Text public String get Text I Document Text Node node get Text Node return node null node get Text NON NLS 1  IPluginElement getText getText IDocumentTextNode getTextNode getText
see org eclipse pde core plugin I Plugin Element set Attribute java lang String java lang String public void set Attribute String name String value throws Core Exception setXML Attribute name value  IPluginElement setAttribute setAttribute CoreException setXMLAttribute
public void set Text String text throws Core Exception I Document Text Node node get Text Node if node null node new Document Text Node node set Enclosing Element this add Text Node node node set Text text fire Property Changed this P TEXT node node  setText CoreException IDocumentTextNode getTextNode DocumentTextNode setEnclosingElement addTextNode setText firePropertyChanged P_TEXT
public String write boolean indent String sep System get Property line separator NON NLS 1 String Buffer buffer new String Buffer if indent buffer append get Indent I Document Node children get Child Nodes String text get Text if children length 0 text length 0 buffer append write Shallow false sep if text length 0 buffer append get Indent text sep NON NLS 1 for int i 0 i children length i children i set Line Indent get Line Indent 3 buffer append children i write true sep buffer append get Indent getXML Tag Name NON NLS 1 NON NLS 2 else buffer append write Shallow true return buffer to String  getProperty StringBuffer StringBuffer getIndent IDocumentNode getChildNodes getText writeShallow getIndent setLineIndent getLineIndent getIndent getXMLTagName writeShallow toString
public String write Shallow boolean terminate String sep System get Property line separator NON NLS 1 String Buffer buffer new String Buffer getXML Tag Name NON NLS 1 I Document Attribute attrs get Node Attributes if attrs length 1 if attrs 0 get Attribute Value length 0 buffer append attrs 0 write NON NLS 1 else for int i 0 i attrs length i if attrs i get Attribute Value length 0 buffer append sep get Indent attrs i write NON NLS 1 if terminate buffer append NON NLS 1 buffer append NON NLS 1 return buffer to String  writeShallow getProperty StringBuffer StringBuffer getXMLTagName IDocumentAttribute getNodeAttributes getAttributeValue getAttributeValue getIndent toString
see org eclipse pde core plugin I Plugin Object get Name public String get Name return getXML Tag Name  IPluginObject getName getName getXMLTagName
see org eclipse pde core plugin I Plugin Object set Name java lang String public void set Name String name throws Core Exception setXML Tag Name name  IPluginObject setName setName CoreException setXMLTagName
public Object get Element Info if element Info null I Document Node node get Parent Node for if node null node instanceof I Plugin Extension break node node get Parent Node if node null I Plugin Extension extension I Plugin Extension node I Schema schema I Schema extension get Schema if schema null element Info schema find Element get Name return element Info  getElementInfo elementInfo IDocumentNode getParentNode IPluginExtension getParentNode IPluginExtension IPluginExtension ISchema ISchema getSchema elementInfo findElement getName elementInfo

see org eclipse pde core plugin I Plugin Extension get Point public String get Point return getXML Attribute Value P POINT  IPluginExtension getPoint getPoint getXMLAttributeValue P_POINT
see org eclipse pde core plugin I Plugin Extension set Point java lang String public void set Point String point throws Core Exception setXML Attribute P POINT point  IPluginExtension setPoint setPoint CoreException setXMLAttribute P_POINT
see org eclipse pde core plugin I Plugin Object set Name java lang String public void set Name String name throws Core Exception setXML Attribute P NAME name  IPluginObject setName setName CoreException setXMLAttribute P_NAME
see org eclipse pde core plugin I Plugin Object get Name public String get Name return getXML Attribute Value P NAME  IPluginObject getName getName getXMLAttributeValue P_NAME
see org eclipse pde core plugin I Plugin Object get Translated Name public String get Translated Name String name get Name return name null name trim length 0 get Point get Resource String name  IPluginObject getTranslatedName getTranslatedName getName getPoint getResourceString
see org eclipse pde core I Identifiable get Id public String get Id return getXML Attribute Value P ID  IIdentifiable getId getId getXMLAttributeValue P_ID
see org eclipse pde core I Identifiable set Id java lang String public void set Id String id throws Core Exception setXML Attribute P ID id  IIdentifiable setId setId CoreException setXMLAttribute P_ID
public String write boolean indent String sep System get Property line separator NON NLS 1 String Buffer buffer new String Buffer if indent buffer append get Indent buffer append write Shallow false I Document Node children get Child Nodes for int i 0 i children length i children i set Line Indent get Line Indent 3 buffer append sep children i write true buffer append sep get Indent extension NON NLS 1 return buffer to String  getProperty StringBuffer StringBuffer getIndent writeShallow IDocumentNode getChildNodes setLineIndent getLineIndent getIndent toString
public String write Shallow boolean terminate String sep System get Property line separator NON NLS 1 String attr Indent NON NLS 1 String Buffer buffer new String Buffer extension NON NLS 1 I Document Attribute attr get Document Attribute P ID if attr null attr get Attribute Value trim length 0 buffer append sep get Indent attr Indent attr write attr get Document Attribute P NAME if attr null attr get Attribute Value trim length 0 buffer append sep get Indent attr Indent attr write attr get Document Attribute P POINT if attr null attr get Attribute Value trim length 0 buffer append sep get Indent attr Indent attr write if terminate buffer append NON NLS 1 buffer append NON NLS 1 return buffer to String  writeShallow getProperty attrIndent StringBuffer StringBuffer IDocumentAttribute getDocumentAttribute P_ID getAttributeValue getIndent attrIndent getDocumentAttribute P_NAME getAttributeValue getIndent attrIndent getDocumentAttribute P_POINT getAttributeValue getIndent attrIndent toString
public Object get Schema if f Schema null Schema Registry registry PDE Core get Default get Schema Registry f Schema registry get Schema get Point else if f Schema is Disposed f Schema null return f Schema  getSchema fSchema SchemaRegistry PDECore getDefault getSchemaRegistry fSchema getSchema getPoint fSchema isDisposed fSchema fSchema

see org eclipse pde core plugin I Plugin Extension Point get Full Id public String get Full Id String pluginID get Plugin Base get Id return pluginID null pluginID get Id get Id NON NLS 1  IPluginExtensionPoint getFullId getFullId getPluginBase getId getId getId
see org eclipse pde core plugin I Plugin Extension Point get Schema public String get Schema return getXML Attribute Value schema NON NLS 1  IPluginExtensionPoint getSchema getSchema getXMLAttributeValue
see org eclipse pde core plugin I Plugin Extension Point set Schema java lang String public void set Schema String schema throws Core Exception setXML Attribute P SCHEMA schema  IPluginExtensionPoint setSchema setSchema CoreException setXMLAttribute P_SCHEMA
see org eclipse pde core I Identifiable get Id public String get Id return getXML Attribute Value P ID  IIdentifiable getId getId getXMLAttributeValue P_ID
see org eclipse pde core I Identifiable set Id java lang String public void set Id String id throws Core Exception setXML Attribute P ID id  IIdentifiable setId setId CoreException setXMLAttribute P_ID
see org eclipse pde core plugin I Plugin Object set Name java lang String public void set Name String name throws Core Exception setXML Attribute P NAME name  IPluginObject setName setName CoreException setXMLAttribute P_NAME
see org eclipse pde core plugin I Plugin Object get Name public String get Name return getXML Attribute Value P NAME  IPluginObject getName getName getXMLAttributeValue P_NAME
see org eclipse pde internal ui model plugin Plugin Object Node write public String write boolean indent return indent get Indent write Shallow true write Shallow true  PluginObjectNode getIndent writeShallow writeShallow
public String write Shallow boolean terminate String Buffer buffer new String Buffer extension point NON NLS 1 append Attribute buffer P ID append Attribute buffer P NAME append Attribute buffer P SCHEMA if terminate buffer append NON NLS 1 buffer append NON NLS 1 return buffer to String  writeShallow StringBuffer StringBuffer appendAttribute P_ID appendAttribute P_NAME appendAttribute P_SCHEMA toString

see org eclipse pde core plugin I Plugin Import is Reexported public boolean is Reexported String value getXML Attribute Value P REEXPORTED return value null value equals true NON NLS 1  IPluginImport isReexported isReexported getXMLAttributeValue P_REEXPORTED
see org eclipse pde core plugin I Plugin Import is Optional public boolean is Optional String value getXML Attribute Value P OPTIONAL return value null value equals true NON NLS 1  IPluginImport isOptional isOptional getXMLAttributeValue P_OPTIONAL
see org eclipse pde core plugin I Plugin Import set Reexported boolean public void set Reexported boolean value throws Core Exception setXML Attribute P REEXPORTED value true false NON NLS 1 NON NLS 2  IPluginImport setReexported setReexported CoreException setXMLAttribute P_REEXPORTED
see org eclipse pde core plugin I Plugin Import set Optional boolean public void set Optional boolean value throws Core Exception setXML Attribute P OPTIONAL value true false NON NLS 1 NON NLS 2  IPluginImport setOptional setOptional CoreException setXMLAttribute P_OPTIONAL
public int get Match String match getXML Attribute Value P MATCH if match null match trim length 0 return I Match Rules NONE if match equals compatible NON NLS 1 return I Match Rules COMPATIBLE if match equals perfect NON NLS 1 return I Match Rules PERFECT if match equals equivalent NON NLS 1 return I Match Rules EQUIVALENT return I Match Rules GREATER OR EQUAL  getMatch getXMLAttributeValue P_MATCH IMatchRules IMatchRules IMatchRules IMatchRules IMatchRules GREATER_OR_EQUAL
see org eclipse pde core plugin I Plugin Reference get Version public String get Version return getXML Attribute Value P VERSION  IPluginReference getVersion getVersion getXMLAttributeValue P_VERSION
public void set Match int match throws Core Exception switch match case I Match Rules GREATER OR EQUAL setXML Attribute P MATCH greater Or Equal NON NLS 1 break case I Match Rules EQUIVALENT setXML Attribute P MATCH equivalent NON NLS 1 break case I Match Rules COMPATIBLE setXML Attribute P MATCH compatible NON NLS 1 break case I Match Rules PERFECT setXML Attribute P MATCH perfect NON NLS 1 break default setXML Attribute P MATCH null  setMatch CoreException IMatchRules GREATER_OR_EQUAL setXMLAttribute P_MATCH greaterOrEqual IMatchRules setXMLAttribute P_MATCH IMatchRules setXMLAttribute P_MATCH IMatchRules setXMLAttribute P_MATCH setXMLAttribute P_MATCH
see org eclipse pde core plugin I Plugin Reference set Version java lang String public void set Version String version throws Core Exception setXML Attribute P VERSION version  IPluginReference setVersion setVersion CoreException setXMLAttribute P_VERSION
see org eclipse pde core I Identifiable get Id public String get Id return getXML Attribute Value plugin NON NLS 1  IIdentifiable getId getId getXMLAttributeValue
see org eclipse pde core I Identifiable set Id java lang String public void set Id String id throws Core Exception setXML Attribute plugin id NON NLS 1  IIdentifiable setId setId CoreException setXMLAttribute
see org eclipse pde internal ui model plugin Plugin Object Node write public String write boolean indent return indent get Indent write Shallow true write Shallow true  PluginObjectNode getIndent writeShallow writeShallow
public String write Shallow boolean terminate String Buffer buffer new String Buffer import NON NLS 1 append Attribute buffer plugin NON NLS 1 append Attribute buffer P VERSION append Attribute buffer P MATCH append Attribute buffer P REEXPORTED false NON NLS 1 append Attribute buffer P OPTIONAL false NON NLS 1 if terminate buffer append NON NLS 1 buffer append NON NLS 1 return buffer to String  writeShallow StringBuffer StringBuffer appendAttribute appendAttribute P_VERSION appendAttribute P_MATCH appendAttribute P_REEXPORTED appendAttribute P_OPTIONAL toString

public String get Content Filters I Document Node children get Child Nodes Array List result new Array List for int i 0 i children length i Plugin Object Node node Plugin Object Node children i if node get Name equals P EXPORTED String name children i getXML Attribute Value P NAME if name null name equals NON NLS 1 int index name index Of NON NLS 1 if index 1 name name substring 0 index result add name return String result to Array new String result size  getContentFilters IDocumentNode getChildNodes ArrayList ArrayList PluginObjectNode PluginObjectNode getName P_EXPORTED getXMLAttributeValue P_NAME indexOf toArray
see org eclipse pde core plugin I Plugin Library get Packages public String get Packages return new String 0  IPluginLibrary getPackages getPackages
public boolean is Exported I Document Node children get Child Nodes for int i 0 i children length i Plugin Object Node node Plugin Object Node children i if node get Name equals P EXPORTED return true return false  isExported IDocumentNode getChildNodes PluginObjectNode PluginObjectNode getName P_EXPORTED
public boolean is Fully Exported I Document Node children get Child Nodes for int i 0 i children length i Plugin Object Node node Plugin Object Node children i if node get Name equals P EXPORTED String name children i getXML Attribute Value P NAME if name null name equals NON NLS 1 return true return false  isFullyExported IDocumentNode getChildNodes PluginObjectNode PluginObjectNode getName P_EXPORTED getXMLAttributeValue P_NAME
see org eclipse pde core plugin I Plugin Library get Type public String get Type String type getXML Attribute Value P TYPE return type null type equals resource I Plugin Library RESOURCE I Plugin Library CODE NON NLS 1  IPluginLibrary getType getType getXMLAttributeValue P_TYPE IPluginLibrary IPluginLibrary
see org eclipse pde core plugin I Plugin Library set Content Filters java lang String public void set Content Filters String filters throws Core Exception  IPluginLibrary setContentFilters setContentFilters CoreException
public void add Content Filter String filter throws Core Exception Plugin Element Node node new Plugin Element Node node setXML Tag Name P EXPORTED node set Parent Node this node set Model get Model node setXML Attribute P NAME equals filter filter ends With filter filter NON NLS 1 NON NLS 2 NON NLS 3 add Content Filter node  addContentFilter CoreException PluginElementNode PluginElementNode setXMLTagName P_EXPORTED setParentNode setModel getModel setXMLAttribute P_NAME endsWith addContentFilter
public void add Content Filter Plugin Element Node node throws Core Exception add Child Node node if is In The Model node set In The Model true fire Structure Changed node I Model Changed Event INSERT  addContentFilter PluginElementNode CoreException addChildNode isInTheModel setInTheModel fireStructureChanged IModelChangedEvent
public void remove Content Filter String filter throws Core Exception if filter ends With NON NLS 1 filter NON NLS 1 I Document Node children get Child Nodes for int i 0 i children length i if children i getXML Tag Name equals P EXPORTED filter equals children i getXML Attribute Value P NAME remove Content Filter Plugin Element Node children i  removeContentFilter CoreException endsWith IDocumentNode getChildNodes getXMLTagName P_EXPORTED getXMLAttributeValue P_NAME removeContentFilter PluginElementNode
public void remove Content Filter Plugin Element Node node remove Child Node node if is In The Model node set In The Model false fire Structure Changed node I Model Changed Event REMOVE  removeContentFilter PluginElementNode removeChildNode isInTheModel setInTheModel fireStructureChanged IModelChangedEvent
see org eclipse pde core plugin I Plugin Library set Packages java lang String public void set Packages String packages throws Core Exception  IPluginLibrary setPackages setPackages CoreException
public void set Exported boolean exported throws Core Exception I Document Node children get Child Nodes boolean already Exported false for int i 0 i children length i if children i getXML Tag Name equals P EXPORTED if equals children i getXML Attribute Value P NAME NON NLS 1 remove Content Filter Plugin Element Node children i else already Exported true if exported remove Content Filter Plugin Element Node children i if exported already Exported add Content Filter NON NLS 1  setExported CoreException IDocumentNode getChildNodes alreadyExported getXMLTagName P_EXPORTED getXMLAttributeValue P_NAME removeContentFilter PluginElementNode alreadyExported removeContentFilter PluginElementNode alreadyExported addContentFilter
see org eclipse pde core plugin I Plugin Library set Type java lang String public void set Type String type throws Core Exception  IPluginLibrary setType setType CoreException
see org eclipse pde core plugin I Plugin Object get Name public String get Name return getXML Attribute Value P NAME  IPluginObject getName getName getXMLAttributeValue P_NAME
see org eclipse pde core plugin I Plugin Object set Name java lang String public void set Name String name throws Core Exception setXML Attribute P NAME name  IPluginObject setName setName CoreException setXMLAttribute P_NAME
public String write boolean indent String sep System get Property line separator NON NLS 1 String Buffer buffer new String Buffer if indent buffer append get Indent I Document Node children get Child Nodes if children length 0 buffer append write Shallow false sep for int i 0 i children length i children i set Line Indent get Line Indent 3 buffer append children i write true sep buffer append get Indent getXML Tag Name NON NLS 1 NON NLS 2 else buffer append write Shallow true return buffer to String  getProperty StringBuffer StringBuffer getIndent IDocumentNode getChildNodes writeShallow setLineIndent getLineIndent getIndent getXMLTagName writeShallow toString
public String write Shallow boolean terminate String Buffer buffer new String Buffer getXML Tag Name NON NLS 1 I Document Attribute attrs get Node Attributes for int i 0 i attrs length i append Attribute buffer attrs i get Attribute Name if terminate buffer append NON NLS 1 buffer append NON NLS 1 return buffer to String  writeShallow StringBuffer StringBuffer getXMLTagName IDocumentAttribute getNodeAttributes appendAttribute getAttributeName toString

public class Plugin Model extends Plugin Model Base implements I Plugin Model public Plugin Model I Document document boolean is Reconciling super document is Reconciling  PluginModel PluginModelBase IPluginModel PluginModel IDocument isReconciling isReconciling
see org eclipse pde core plugin I Plugin Model get Plugin public I Plugin get Plugin return I Plugin get Plugin Base  IPluginModel getPlugin IPlugin getPlugin IPlugin getPluginBase
see org eclipse pde core plugin I Plugin Model Base is Fragment Model public boolean is Fragment Model return false  IPluginModelBase isFragmentModel isFragmentModel
see org eclipse pde core plugin I Plugin Model Base get Bundle Description public Bundle Description get Bundle Description return null  IPluginModelBase getBundleDescription BundleDescription getBundleDescription
see org eclipse pde core plugin I Plugin Model Base set Bundle Description org eclipse osgi service resolver Bundle Description public void set Bundle Description Bundle Description description  IPluginModelBase setBundleDescription BundleDescription setBundleDescription BundleDescription

private I Plugin Model Factory f Factory public Plugin Model Base I Document document boolean is Reconciling super document is Reconciling f Factory new Plugin Document Node Factory this  IPluginModelFactory fFactory PluginModelBase IDocument isReconciling isReconciling fFactory PluginDocumentNodeFactory
public I Plugin Base create Plugin Base boolean is Fragment if is Fragment f Plugin Base new Fragment Node f Plugin Base setXML Tag Name fragment NON NLS 1 else f Plugin Base new Plugin Node f Plugin Base setXML Tag Name plugin NON NLS 1 f Plugin Base set In The Model true f Plugin Base set Model this return f Plugin Base  IPluginBase createPluginBase isFragment isFragment fPluginBase FragmentNode fPluginBase setXMLTagName fPluginBase PluginNode fPluginBase setXMLTagName fPluginBase setInTheModel fPluginBase setModel fPluginBase
public I Plugin Base create Plugin Base return create Plugin Base is Fragment Model  IPluginBase createPluginBase createPluginBase isFragmentModel
see org eclipse pde core plugin I Plugin Model Base get Build Model public I Build Model get Build Model return null  IPluginModelBase getBuildModel IBuildModel getBuildModel
see org eclipse pde core plugin I Plugin Model Base get Plugin Base public I Plugin Base get Plugin Base return get Plugin Base true  IPluginModelBase getPluginBase IPluginBase getPluginBase getPluginBase
public I Extensions get Extensions return get Plugin Base  IExtensions getExtensions getPluginBase
public I Plugin Base get Plugin Base boolean create If Missing if f Loaded create If Missing create Plugin Base try load catch Core Exception e return f Plugin Base  IPluginBase getPluginBase createIfMissing fLoaded createIfMissing createPluginBase CoreException fPluginBase
public I Extensions get Extensions boolean create If Missing return get Plugin Base create If Missing  IExtensions getExtensions createIfMissing getPluginBase createIfMissing
see org eclipse pde core plugin I Plugin Model Base is Enabled public boolean is Enabled return f Is Enabled  IPluginModelBase isEnabled isEnabled fIsEnabled
see org eclipse pde core plugin I Plugin Model Base set Enabled boolean public void set Enabled boolean enabled f Is Enabled enabled  IPluginModelBase setEnabled setEnabled fIsEnabled
see org eclipse pde core plugin I Plugin Model Base get Plugin Factory public I Plugin Model Factory get Plugin Factory return f Factory  IPluginModelBase getPluginFactory IPluginModelFactory getPluginFactory fFactory
public URL getNL Lookup Location String install Location get Install Location if install Location null return null if install Location starts With file false NON NLS 1 install Location file install Location NON NLS 1 try URL url new URL install Location NON NLS 1 return url catch MalformedURL Exception e return null  getNLLookupLocation installLocation getInstallLocation installLocation installLocation startsWith installLocation installLocation installLocation MalformedURLException
see org eclipse pde core plugin I Shared Plugin Model get Factory public I Extensions Model Factory get Factory return f Factory  ISharedPluginModel getFactory IExtensionsModelFactory getFactory fFactory
protected NL Resource Helper createNL Resource Helper String name is Fragment Model fragment plugin NON NLS 1 NON NLS 2 URL lookup Location getNL Lookup Location if lookup Location null return null return new NL Resource Helper name new URL lookup Location  NLResourceHelper createNLResourceHelper isFragmentModel lookupLocation getNLLookupLocation lookupLocation NLResourceHelper lookupLocation
protected Default Handler create Document Handler I Model model if f Handler null f Handler new Plugin Document Handler this return f Handler  DefaultHandler createDocumentHandler IModel fHandler fHandler PluginDocumentHandler fHandler
protected Default Handler create Node Offset Handler I Model model if f Node Offset Handler null f Node Offset Handler new Node Offset Handler this return f Node Offset Handler  DefaultHandler createNodeOffsetHandler IModel fNodeOffsetHandler fNodeOffsetHandler NodeOffsetHandler fNodeOffsetHandler

see org eclipse pde core plugin I Plugin get Class Name public String get Class Name return getXML Attribute Value P CLASS NAME  IPlugin getClassName getClassName getXMLAttributeValue P_CLASS_NAME
see org eclipse pde core plugin I Plugin set Class Name java lang String public void set Class Name String class Name throws Core Exception setXML Attribute P CLASS NAME class Name  IPlugin setClassName setClassName className CoreException setXMLAttribute P_CLASS_NAME className
protected String get Specific Attributes String classname get Class Name if classname null classname trim length 0 return new String P CLASS NAME classname NON NLS 1 NON NLS 2 NON NLS 3 return new String 0  getSpecificAttributes getClassName P_CLASS_NAME

see org eclipse pde core plugin I Plugin Object get Model public I Shared Plugin Model get Model return f Model  IPluginObject getModel ISharedPluginModel getModel fModel
see org eclipse pde core plugin I Plugin Object get Plugin Model public I Plugin Model Base get Plugin Model return I Plugin Model Base f Model  IPluginObject getPluginModel IPluginModelBase getPluginModel IPluginModelBase fModel
see org eclipse pde core plugin I Plugin Object get Name public String get Name return f Name  IPluginObject getName getName fName
see org eclipse pde core plugin I Plugin Object is In The Model public boolean is In The Model return f In The Model  IPluginObject isInTheModel isInTheModel fInTheModel
see org eclipse pde core plugin I Plugin Object get Translated Name public String get Translated Name return get Resource String get Name  IPluginObject getTranslatedName getTranslatedName getResourceString getName
see org eclipse pde core plugin I Plugin Object get Parent public I Plugin Object get Parent return I Plugin Object get Parent Node  IPluginObject getParent IPluginObject getParent IPluginObject getParentNode
public I Plugin Base get Plugin Base return f Model null I Plugin Model Base f Model get Plugin Base null  IPluginBase getPluginBase fModel IPluginModelBase fModel getPluginBase
see org eclipse pde core plugin I Plugin Object get Resource String java lang String public String get Resource String String key return f Model null f Model get Resource String key key  IPluginObject getResourceString getResourceString fModel fModel getResourceString
see org eclipse pde core plugin I Plugin Object set Name java lang String public void set Name String name throws Core Exception f Name name  IPluginObject setName setName CoreException fName
see org eclipse pde core plugin I Plugin Object is Valid public boolean is Valid return false  IPluginObject isValid isValid
java io Print Writer public void write String indent Print Writer writer  PrintWriter PrintWriter
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return null  IAdaptable getAdapter getAdapter
see org eclipse pde core plugin I Plugin Object set In The Model boolean public void set In The Model boolean in Model f In The Model in Model  IPluginObject setInTheModel setInTheModel inModel fInTheModel inModel
public void set Model I Shared Plugin Model model f Model model  setModel ISharedPluginModel fModel
public void setXML Attribute String name String value String old Value getXML Attribute Value name Plugin Attribute attr Plugin Attribute f Attributes get name try if value null value NON NLS 1 if attr null attr new Plugin Attribute attr set Name name attr set Enclosing Element this f Attributes put name attr attr set Value value null value NON NLS 1 catch Core Exception e if f In The Model fire Property Changed attr get Enclosing Element attr get Attribute Name old Value value  setXMLAttribute oldValue getXMLAttributeValue PluginAttribute PluginAttribute fAttributes PluginAttribute setName setEnclosingElement fAttributes setValue CoreException fInTheModel firePropertyChanged getEnclosingElement getAttributeName oldValue
protected void fire Property Changed I Document Node node String property Object old Value Object new Value if f Model is Editable f Model instanceof I Model Change Provider I Model Change Provider provider I Model Change Provider f Model provider fire Model Object Changed node property old Value new Value  firePropertyChanged IDocumentNode oldValue newValue fModel isEditable fModel IModelChangeProvider IModelChangeProvider IModelChangeProvider fModel fireModelObjectChanged oldValue newValue
protected void fire Structure Changed I Plugin Object child int change Type I Model model get Model if model is Editable model instanceof I Model Change Provider I Model Changed Event e new Model Changed Event f Model change Type new Object child null fire Model Changed e  fireStructureChanged IPluginObject changeType IModel getModel isEditable IModelChangeProvider IModelChangedEvent ModelChangedEvent fModel changeType fireModelChanged
protected void fire Model Changed I Model Changed Event e I Model model get Model if model is Editable model instanceof I Model Change Provider I Model Change Provider provider I Model Change Provider model provider fire Model Changed e  fireModelChanged IModelChangedEvent IModel getModel isEditable IModelChangeProvider IModelChangeProvider IModelChangeProvider fireModelChanged
public String get Writable String String source String Buffer buf new String Buffer for int i 0 i source length i char c source char At i switch c case buf append amp NON NLS 1 break case buf append lt NON NLS 1 break case buf append gt NON NLS 1 break case buf append apos NON NLS 1 break case buf append quot NON NLS 1 break default buf append c break return buf to String  getWritableString StringBuffer StringBuffer charAt toString
see org eclipse pde internal ui model I Document Node write Shallow public String write Shallow boolean terminate return NON NLS 1  IDocumentNode writeShallow writeShallow
see org eclipse pde internal ui model I Document Node write public String write boolean indent return NON NLS 1  IDocumentNode
protected void append Attribute String Buffer buffer String attr Name append Attribute buffer attr Name NON NLS 1  appendAttribute StringBuffer attrName appendAttribute attrName
protected void append Attribute String Buffer buffer String attr Name String default Value I Document Attribute attr get Document Attribute attr Name if attr null String value attr get Attribute Value if value null value trim length 0 value equals default Value buffer append attr write NON NLS 1  appendAttribute StringBuffer attrName defaultValue IDocumentAttribute getDocumentAttribute attrName getAttributeValue defaultValue

see org eclipse pde core plugin I Plugin Parent add int org eclipse pde core plugin I Plugin Object public void add int index I Plugin Object child throws Core Exception add Child Node I Document Node child index fire Structure Changed child I Model Changed Event INSERT  IPluginParent IPluginObject IPluginObject CoreException addChildNode IDocumentNode fireStructureChanged IModelChangedEvent
public void add I Plugin Object child throws Core Exception add get Child Count child child set In The Model true Plugin Object Node child set Model get Model  IPluginObject CoreException getChildCount setInTheModel PluginObjectNode setModel getModel
see org eclipse pde core plugin I Plugin Parent get Child Count public int get Child Count return get Child Nodes length  IPluginParent getChildCount getChildCount getChildNodes
see org eclipse pde core plugin I Plugin Parent get Index Of org eclipse pde core plugin I Plugin Object public int get Index Of I Plugin Object child return index Of I Document Node child  IPluginParent getIndexOf IPluginObject getIndexOf IPluginObject indexOf IDocumentNode
public void swap I Plugin Object child1 I Plugin Object child2 throws Core Exception swap I Document Node child1 I Document Node child2 fire Property Changed this P SIBLING ORDER child1 child2  IPluginObject IPluginObject CoreException IDocumentNode IDocumentNode firePropertyChanged P_SIBLING_ORDER
public I Plugin Object get Children Array List result new Array List I Document Node nodes get Child Nodes for int i 0 i nodes length i result add nodes i return I Plugin Object result to Array new I Plugin Object result size  IPluginObject getChildren ArrayList ArrayList IDocumentNode getChildNodes IPluginObject toArray IPluginObject
public void remove I Plugin Object child throws Core Exception remove Child Node I Document Node child child set In The Model false fire Structure Changed child I Model Changed Event REMOVE  IPluginObject CoreException removeChildNode IDocumentNode setInTheModel fireStructureChanged IModelChangedEvent

private SAX Parser f Parser public XML Editing Model I Document document boolean is Reconciling super document is Reconciling  SAXParser fParser XMLEditingModel IDocument isReconciling isReconciling
public void load Input Stream source boolean out Of Sync try f Loaded true get Parser parse source create Document Handler this catch SAX Exception e f Loaded false catch IO Exception e  InputStream outOfSync fLoaded getParser createDocumentHandler SAXException fLoaded IOException
protected void adjust Offsets I Document document try get Parser parse get Input Stream document create Node Offset Handler this catch SAX Exception e catch IO Exception e  adjustOffsets IDocument getParser getInputStream createNodeOffsetHandler SAXException IOException
protected abstract Default Handler create Node Offset Handler I Model model  DefaultHandler createNodeOffsetHandler IModel
protected abstract Default Handler create Node Offset Handler I Model model protected abstract Default Handler create Document Handler I Model model  DefaultHandler createNodeOffsetHandler IModel DefaultHandler createDocumentHandler IModel
private SAX Parser get Parser try if f Parser null f Parser SAX Parser Factory new Instance newSAX Parser catch Exception e e print Stack Trace return f Parser  SAXParser getParser fParser fParser SAXParserFactory newInstance newSAXParser printStackTrace fParser

public class OpenPDE Perspective Action extends Action public OpenPDE Perspective Action  OpenPDEPerspectiveAction OpenPDEPerspectiveAction
public void run I Workbench Window window PDE Plugin get Active Workbench Window I Workbench Page page window get Active Page I Adaptable input if page null input page get Input else input Resources Plugin get Workspace get Root try PlatformUI get Workbench show Perspective org eclipse pde ui PDE Perspective NON NLS 1 window input notify Result true catch Workbench Exception e PDE Plugin log Exception e notify Result false  IWorkbenchWindow PDEPlugin getActiveWorkbenchWindow IWorkbenchPage getActivePage IAdaptable getInput ResourcesPlugin getWorkspace getRoot getWorkbench showPerspective PDEPerspective notifyResult WorkbenchException PDEPlugin logException notifyResult

public class Checkbox Table Part extends Structured Viewer Part public Checkbox Table Part String button Labels super button Labels  CheckboxTablePart StructuredViewerPart CheckboxTablePart buttonLabels buttonLabels
protected Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit style SWT H SCROLL SWT V SCROLL if toolkit null style SWT BORDER else style toolkit get Border Style Checkbox Table Viewertable Viewer Checkbox Table Viewer new Check List parent style table Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e Checkbox Table Part this selection Changed I Structured Selection e get Selection table Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event element Checked event get Element event get Checked return table Viewer  StructuredViewer createStructuredViewer FormToolkit H_SCROLL V_SCROLL getBorderStyle CheckboxTableViewertableViewer CheckboxTableViewer newCheckList tableViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent CheckboxTablePart selectionChanged IStructuredSelection getSelection tableViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent elementChecked getElement getChecked tableViewer
public Checkbox Table Viewer get Table Viewer return Checkbox Table Viewer get Viewer  CheckboxTableViewer getTableViewer CheckboxTableViewer getViewer
see Shared Part With Buttons button Selected int protected void button Selected Button button int index  SharedPartWithButtons buttonSelected buttonSelected
protected void element Checked Object element boolean checked  elementChecked
protected void element Checked Object element boolean checked protected void selection Changed I Structured Selection selection  elementChecked selectionChanged IStructuredSelection

private Control combo public Combo Part  ComboPart
public void add Selection Listener Selection Listener listener if combo instanceof Combo Combo combo add Selection Listener listener else C Combo combo add Selection Listener listener  addSelectionListener SelectionListener addSelectionListener CCombo addSelectionListener
public void create Control Composite parent Form Toolkit toolkit int style if toolkit get Border Style SWT BORDER combo new Combo parent style SWT BORDER else combo new C Combo parent style SWT FLAT toolkit adapt combo true true  createControl FormToolkit getBorderStyle CCombo
toolkit adapt combo true true public Control get Control return combo  getControl
public int get Selection Index if combo instanceof Combo return Combo combo get Selection Index else return C Combo combo get Selection Index  getSelectionIndex getSelectionIndex CCombo getSelectionIndex
public void add String item if combo instanceof Combo Combo combo add item else C Combo combo add item  CCombo
public void select int index if combo instanceof Combo Combo combo select index else C Combo combo select index  CCombo
public String get Selection if combo instanceof Combo return Combo combo get Item get Selection Index else return C Combo combo get Item get Selection Index  getSelection getItem getSelectionIndex CCombo getItem getSelectionIndex
public void set Text String text if combo instanceof Combo Combo combo set Text text else C Combo combo set Text text  setText setText CCombo setText
public void set Items String items if combo instanceof Combo Combo combo set Items items else C Combo combo set Items items  setItems setItems CCombo setItems

class Rename Action extends Action public Rename Action super PDE Plugin get Resource String Editable Table Part rename Action NON NLS 1  RenameAction RenameAction PDEPlugin getResourceString EditableTablePart renameAction
super PDE Plugin get Resource String Editable Table Part rename Action NON NLS 1 public void run do Rename  PDEPlugin getResourceString EditableTablePart renameAction doRename
class Name Modifier implements I Cell Modifier public boolean can Modify Object object String property return true  NameModifier ICellModifier canModify
return true public void modify Object object String property Object value entry Modified object value to String  entryModified toString
entry Modified object value to String public Object get Value Object object String property return object to String  entryModified toString getValue toString
Constructor for Editable Table Part param button Labels public Editable Table Part String button Labels super button Labels  EditableTablePart buttonLabels EditableTablePart buttonLabels buttonLabels
public boolean is Editable return editable  isEditable
public void set Editable boolean editable this editable editable  setEditable
public I Action get Rename Action if rename Action null rename Action new Rename Action return rename Action  IAction getRenameAction renameAction renameAction RenameAction renameAction
protected Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit Table Viewer table Viewer Table Viewer super create Structured Viewer parent style toolkit return table Viewer  StructuredViewer createStructuredViewer FormToolkit TableViewer tableViewer TableViewer createStructuredViewer tableViewer
private void do Rename Table Viewer viewer get Table Viewer I Structured Selection selection I Structured Selection viewer get Selection if selection size 1 is Editable Object obj selection get First Element String old Name obj to String Rename Dialog dialog new Rename Dialog get Control get Shell old Name dialog create dialog get Shell set Text PDE Plugin get Resource String Editable Table Part rename Title NON NLS 1 dialog get Shell set Size 300 150 if dialog open Dialog OK entry Modified do Find Item obj dialog get New Name  doRename TableViewer getTableViewer IStructuredSelection IStructuredSelection getSelection isEditable getFirstElement oldName toString RenameDialog RenameDialog getControl getShell oldName getShell setText PDEPlugin getResourceString EditableTablePart renameTitle getShell setSize entryModified doFindItem getNewName
private Widget do Find Item Object element Table Item children get Table Viewer get Table get Items for int i 0 i children length i Table Item item children i Object data item get Data if data null data equals element return item return null  doFindItem TableItem getTableViewer getTable getItems TableItem getData
protected void entry Modified Object entry String value  entryModified

int style public Form Browser int style this style style  FormBrowser
public void create Control Composite parent toolkit new Form Toolkit parent get Display int border Style toolkit get Border Style SWT BORDER SWT NULL SWT BORDER container new Composite parent border Style Fill Layout flayout new Fill Layout flayout margin Width 1 flayout margin Height 1 container set Layout flayout form Text new Scrolled Form Text container SWT V SCROLL SWT H SCROLL false if border Style SWT NULL form Text set Data Form Toolkit KEY DRAW BORDER Form Toolkit TREE BORDER toolkit paint Borders For container Form Text ftext toolkit create Form Text form Text false form Text set Form Text ftext form Text set Expand Horizontal true form Text set Expand Vertical true form Text set Background toolkit get Colors get Background form Text set Foreground toolkit get Colors get Foreground ftext margin Width 2 ftext margin Height 2 ftext set Hyperlink Settings toolkit get Hyperlink Group form Text add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if toolkit null toolkit dispose toolkit null if text null form Text set Text text  createControl FormToolkit getDisplay borderStyle getBorderStyle borderStyle FillLayout FillLayout marginWidth marginHeight setLayout formText ScrolledFormText V_SCROLL H_SCROLL borderStyle formText setData FormToolkit KEY_DRAW_BORDER FormToolkit TREE_BORDER paintBordersFor FormText createFormText formText formText setFormText formText setExpandHorizontal formText setExpandVertical formText setBackground getColors getBackground formText setForeground getColors getForeground marginWidth marginHeight setHyperlinkSettings getHyperlinkGroup formText addDisposeListener DisposeListener widgetDisposed DisposeEvent formText setText
public Control get Control return container  getControl
public void set Text String text this text text if form Text null form Text set Text text  setText formText formText setText

private I Form Entry Listener listener The default constructor Call create Control to make it public Form Entry Composite parent Form Toolkit toolkit String label Text int style create Control parent toolkit label Text style null false  IFormEntryListener createControl FormEntry FormToolkit labelText createControl labelText
This constructor create all the controls right away param parent param toolkit param label Text param browse Text param link Label public Form Entry Composite parent Form Toolkit toolkit String label Text String browse Text boolean link Label create Control parent toolkit label Text SWT SINGLE browse Text link Label  labelText browseText linkLabel FormEntry FormToolkit labelText browseText linkLabel createControl labelText browseText linkLabel
Create all the controls in the provided parent param parent param toolkit param label Text param span param browse Text param link Label private void create Control Composite parent Form Toolkit toolkit String label Text int style String browse Text boolean link Label if link Label Hyperlink link toolkit create Hyperlink parent label Text SWT NULL label link else label toolkit create Label parent label Text label set Foreground toolkit get Colors get Color Form Colors TITLE text toolkit create Text parent style NON NLS 1 add Listeners if browse Text null browse toolkit create Button parent browse Text SWT PUSH browse add Selection Listener new Selection Adapter public void widget Selected Selection Event e if listener null listener browse Button Selected Form Entry this fill Into Grid parent  labelText browseText linkLabel createControl FormToolkit labelText browseText linkLabel linkLabel createHyperlink labelText createLabel labelText setForeground getColors getColor FormColors createText addListeners browseText createButton browseText addSelectionListener SelectionAdapter widgetSelected SelectionEvent browseButtonSelected FormEntry fillIntoGrid
public void set Editable boolean editable text set Editable editable if browse null browse set Enabled editable  setEditable setEditable setEnabled
private void fill Into Grid Composite parent Layout layout parent get Layout if layout instanceof Grid Layout Grid Data gd int span Grid Layout layout num Columns gd new Grid Data Grid Data VERTICAL ALIGN CENTER label set Layout Data gd int tspan browse null span 2 span 1 gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span tspan gd grab Excess Horizontal Space tspan 1 gd width Hint 10 text set Layout Data gd if browse null gd new Grid Data Grid Data VERTICAL ALIGN CENTER browse set Layout Data gd else if layout instanceof Table Wrap Layout Table Wrap Data td int span Table Wrap Layout layout num Columns td new Table Wrap Data td valign Table Wrap Data MIDDLE label set Layout Data td int tspan browse null span 2 span 1 td new Table Wrap Data Table Wrap Data FILL td colspan tspan td grab Horizontal tspan 1 text set Layout Data td if browse null td new Table Wrap Data td valign Table Wrap Data MIDDLE browse set Layout Data td  fillIntoGrid getLayout GridLayout GridData GridLayout numColumns GridData GridData VERTICAL_ALIGN_CENTER setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan grabExcessHorizontalSpace widthHint setLayoutData GridData GridData VERTICAL_ALIGN_CENTER setLayoutData TableWrapLayout TableWrapData TableWrapLayout numColumns TableWrapData TableWrapData setLayoutData TableWrapData TableWrapData grabHorizontal setLayoutData TableWrapData TableWrapData setLayoutData
Attaches the listener for the entry param listener public void set Form Entry Listener I Form Entry Listener listener if label instanceof Hyperlink if this listener null Hyperlink label remove Hyperlink Listener this listener if listener null Hyperlink label add Hyperlink Listener listener this listener listener  setFormEntryListener IFormEntryListener removeHyperlinkListener addHyperlinkListener
private void add Listeners text add Key Listener new Key Adapter public void key Released Key Event e key Release Occured e  addListeners addKeyListener KeyAdapter keyReleased KeyEvent keyReleaseOccured
text add Modify Listener new Modify Listener public void modify Text Modify Event e edit Occured e  addModifyListener ModifyListener modifyText ModifyEvent editOccured
text add Focus Listener new Focus Adapter public void focus Gained Focus Event e if listener null listener focus Gained Form Entry this  addFocusListener FocusAdapter focusGained FocusEvent focusGained FormEntry
listener focus Gained Form Entry this public void focus Lost Focus Event e if dirty commit  focusGained FormEntry focusLost FocusEvent
private void add Listeners text add Key Listener new Key Adapter public void key Released Key Event e key Release Occured e text add Modify Listener new Modify Listener public void modify Text Modify Event e edit Occured e text add Focus Listener new Focus Adapter public void focus Gained Focus Event e if listener null listener focus Gained Form Entry this public void focus Lost Focus Event e if dirty commit  addListeners addKeyListener KeyAdapter keyReleased KeyEvent keyReleaseOccured addModifyListener ModifyListener modifyText ModifyEvent editOccured addFocusListener FocusAdapter focusGained FocusEvent focusGained FormEntry focusLost FocusEvent
If dirty commits the text in the widget to the value and notifies the listener This call clears the dirty flag public void commit if dirty value text get Text if value length 0 value null notify if listener null listener text Value Changed this dirty false  getText textValueChanged
dirty false public void cancel Edit dirty false  cancelEdit
private void edit Occured Modify Event e if ignore Modify return dirty true if listener null listener text Dirty this  editOccured ModifyEvent ignoreModify textDirty
Returns the text control return public Text get Text return text  getText
Returns the browse button control return public Button get Button return browse  getButton
Returns the current entry value If the entry is dirty and was not commited the value may be different from the text in the widget return public String get Value return value  getValue
Returns true if the text has been modified return public boolean is Dirty return dirty  isDirty
private void key Release Occured Key Event e if e character r commit value if dirty commit else if e character u001b Escape character text set Text value null value restore old NON NLS 1 dirty false  keyReleaseOccured KeyEvent setText
Sets the value of this entry param value public void set Value String value if text null text set Text value null value NON NLS 1 this value value null value NON NLS 1  setValue setText
Sets the value of this entry with the possibility to turn the notification off param value param block Notification public void set Value String value boolean block Notification ignore Modify block Notification set Value value ignore Modify false  blockNotification setValue blockNotification ignoreModify blockNotification setValue ignoreModify

public interface I Form Entry Listener extends I Hyperlink Listener The user clicked on the text control and focus was transfered to it param entry  IFormEntryListener IHyperlinkListener
void focus Gained Form Entry entry The user changed the text in the text control of the entry param entry  focusGained FormEntry
void text Dirty Form Entry entry The value of the entry has been changed to be the text in the text control as a result of commit action param entry  textDirty FormEntry
void text Value Changed Form Entry entry The user pressed the Browse button for the entry param entry  textValueChanged FormEntry

public interface I Link Label Provider extends I Label Provider String get Status Text Object object  ILinkLabelProvider ILabelProvider getStatusText
public interface I Link Label Provider extends I Label Provider String get Status Text Object object String get Tool Tip Text Object object  ILinkLabelProvider ILabelProvider getStatusText getToolTipText

Creates a message dialog with a toggle See the superclass constructor for info on the other parameters param toggle Message the message for the toggle control or code null code for the default message Do not show this message again param toggle State the initial state for the toggle public Message Dialog With Toggle Shell parent Shell String dialog Title Image image String message int dialog Image Type String dialog Button Labels int default Index String toggle Message boolean toggle State super parent Shell dialog Title image message dialog Image Type dialog Button Labels default Index this toggle Message toggle Message this toggle State toggle State  toggleMessage toggleState MessageDialogWithToggle parentShell dialogTitle dialogImageType dialogButtonLabels defaultIndex toggleMessage toggleState parentShell dialogTitle dialogImageType dialogButtonLabels defaultIndex toggleMessage toggleMessage toggleState toggleState
Returns the toggle state This can be called even after the dialog is closed return code true code if the toggle button is checked code false code if not public boolean get Toggle State return toggle State  getToggleState toggleState
protected Control create Dialog Area Composite parent Composite dialog Area Composite super create Dialog Area parent toggle Button create Toggle Button dialog Area return dialog Area  createDialogArea dialogArea createDialogArea toggleButton createToggleButton dialogArea dialogArea
button add Selection Listener new Selection Adapter public void widget Selected Selection Event e toggle State button get Selection  addSelectionListener SelectionAdapter widgetSelected SelectionEvent toggleState getSelection
Creates a toggle button with the toggle message and state protected Button create Toggle Button Composite parent final Button button new Button parent SWT CHECK SWT LEFT String text toggle Message if text null text Workbench Messages get String Message Dialog With Toggle default Toggle Message NON NLS 1 button set Text text button set Selection toggle State Grid Data data new Grid Data SWT NONE data horizontal Span 2 data horizontal Alignment Grid Data CENTER button set Layout Data data button set Font parent get Font button add Selection Listener new Selection Adapter public void widget Selected Selection Event e toggle State button get Selection return button  createToggleButton toggleMessage WorkbenchMessages getString MessageDialogWithToggle defaultToggleMessage setText setSelection toggleState GridData GridData horizontalSpan horizontalAlignment GridData setLayoutData setFont getFont addSelectionListener SelectionAdapter widgetSelected SelectionEvent toggleState getSelection
Returns the toggle button return the toggle button protected Button get Toggle Button return toggle Button  getToggleButton toggleButton
Convenience method to open a simple confirm OK Cancel dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message param toggle Message the message for the toggle control or code null code for the default message Don t show me this message again param toggle State the initial state for the toggle return the dialog after being closed by the user which the client can only call code get Return Code code or code get Toggle State code public static Message Dialog With Toggle open Confirm Shell parent String title String message String toggle Message boolean toggle State Message Dialog With Toggle dialog new Message Dialog With Toggle parent title null accept the default window icon message QUESTION new String I Dialog Constants OK LABEL I Dialog Constants CANCEL LABEL 0 OK is the default toggle Message toggle State dialog open return dialog  toggleMessage toggleState getReturnCode getToggleState MessageDialogWithToggle openConfirm toggleMessage toggleState MessageDialogWithToggle MessageDialogWithToggle IDialogConstants OK_LABEL IDialogConstants CANCEL_LABEL toggleMessage toggleState
Convenience method to open a standard error dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message param toggle Message the message for the toggle control or code null code for the default message Don t show me this message again param toggle State the initial state for the toggle return the dialog after being closed by the user which the client can only call code get Return Code code or code get Toggle State code public static Message Dialog With Toggle open Error Shell parent String title String message String toggle Message boolean toggle State Message Dialog With Toggle dialog new Message Dialog With Toggle parent title null accept the default window icon message ERROR new String I Dialog Constants OK LABEL 0 ok is the default toggle Message toggle State dialog open return dialog  toggleMessage toggleState getReturnCode getToggleState MessageDialogWithToggle openError toggleMessage toggleState MessageDialogWithToggle MessageDialogWithToggle IDialogConstants OK_LABEL toggleMessage toggleState
Convenience method to open a standard information dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message param toggle Message the message for the toggle control or code null code for the default message Don t show me this message again param toggle State the initial state for the toggle return the dialog after being closed by the user which the client can only call code get Return Code code or code get Toggle State code public static Message Dialog With Toggle open Information Shell parent String title String message String toggle Message boolean toggle State Message Dialog With Toggle dialog new Message Dialog With Toggle parent title null accept the default window icon message INFORMATION new String I Dialog Constants OK LABEL 0 ok is the default toggle Message toggle State dialog open return dialog  toggleMessage toggleState getReturnCode getToggleState MessageDialogWithToggle openInformation toggleMessage toggleState MessageDialogWithToggle MessageDialogWithToggle IDialogConstants OK_LABEL toggleMessage toggleState
Convenience method to open a simple Yes No question dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message param toggle Message the message for the toggle control or code null code for the default message Don t show me this message again param toggle State the initial state for the toggle return the dialog after being closed by the user which the client can only call code get Return Code code or code get Toggle State code public static Message Dialog With Toggle open Question Shell parent String title String message String toggle Message boolean toggle State Message Dialog With Toggle dialog new Message Dialog With Toggle parent title null accept the default window icon message QUESTION new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL 0 yes is the default toggle Message toggle State dialog open return dialog  toggleMessage toggleState getReturnCode getToggleState MessageDialogWithToggle openQuestion toggleMessage toggleState MessageDialogWithToggle MessageDialogWithToggle IDialogConstants YES_LABEL IDialogConstants NO_LABEL toggleMessage toggleState
Convenience method to open a standard warning dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message param toggle Message the message for the toggle control or code null code for the default message Don t show me this message again param toggle State the initial state for the toggle return the dialog after being closed by the user which the client can only call code get Return Code code or code get Toggle State code public static Message Dialog With Toggle open Warning Shell parent String title String message String toggle Message boolean toggle State Message Dialog With Toggle dialog new Message Dialog With Toggle parent title null accept the default window icon message WARNING new String I Dialog Constants OK LABEL 0 ok is the default toggle Message toggle State dialog open return dialog  toggleMessage toggleState getReturnCode getToggleState MessageDialogWithToggle openWarning toggleMessage toggleState MessageDialogWithToggle MessageDialogWithToggle IDialogConstants OK_LABEL toggleMessage toggleState

Creates a new message line as a child of the given parent public Message Line Composite parent this parent SWT LEFT  MessageLine
Creates a new message line as a child of the parent and with the given SWT stylebits public Message Line Composite parent int style super parent style f Normal Msg Area Background get Background f Error Msg Area Background null  MessageLine fNormalMsgAreaBackground getBackground fErrorMsgAreaBackground
private Image find Image I Status status PDE Label Provider provider PDE Plugin get Default get Label Provider if status isOK return null else if status matches I Status ERROR return provider get PDE Plugin Images DESC ERROR ST OBJ else if status matches I Status WARNING return provider get PDE Plugin Images DESC WARNING ST OBJ else if status matches I Status INFO return provider get PDE Plugin Images DESC INFO ST OBJ return null  findImage IStatus PDELabelProvider PDEPlugin getDefault getLabelProvider IStatus PDEPluginImages DESC_ERROR_ST_OBJ IStatus PDEPluginImages DESC_WARNING_ST_OBJ IStatus PDEPluginImages DESC_INFO_ST_OBJ
Sets the message and image to the given status code null code is a valid argument and will set the empty text and no image public void set Error Status I Status status if status null String message status get Message if message null message length 0 set Text message set Image find Image status if f Error Msg Area Background null f Error Msg Area Background new Color get Display ERROR BACKGROUND RGB set Background f Error Msg Area Background return set Text NON NLS 1 set Image null set Background f Normal Msg Area Background  setErrorStatus IStatus getMessage setText setImage findImage fErrorMsgAreaBackground fErrorMsgAreaBackground getDisplay ERROR_BACKGROUND_RGB setBackground fErrorMsgAreaBackground setText setImage setBackground fNormalMsgAreaBackground
public void dispose if f Error Msg Area Background null f Error Msg Area Background dispose f Error Msg Area Background null super dispose  fErrorMsgAreaBackground fErrorMsgAreaBackground fErrorMsgAreaBackground

public class Modified Text Cell Editor extends Text Cell Editor public Modified Text Cell Editor Composite parent super parent set Value Valid true  ModifiedTextCellEditor TextCellEditor ModifiedTextCellEditor setValueValid
protected void do Set Value Object object Workaround for 32926 if object null object NON NLS 1 super do Set Value object  doSetValue doSetValue
public Control create Control Composite parent Text text Text super create Control parent text add Listener SWT Traverse new Listener public void handle Event Event e do whatever it is you want to do on commit handle Enter this will prevent the return from traversing to the button e doit false return text  createControl createControl addListener handleEvent handleEnter
public void force Commit if is Dirty fire Apply Editor Value  forceCommit isDirty fireApplyEditorValue
private void handle Enter fire Apply Editor Value  handleEnter fireApplyEditorValue

public void set Enabled boolean enabled if enabled this enabled this enabled enabled update Enabled State  setEnabled updateEnabledState
public abstract void create Control Composite parent int style int span  createControl
Form Toolkit toolkit public boolean is Enabled return enabled  FormToolkit isEnabled
protected void update Enabled State  updateEnabledState
protected Composite create Composite Composite parent Form Toolkit toolkit if toolkit null return new Composite parent SWT NULL else return toolkit create Composite parent  createComposite FormToolkit createComposite
protected Label create Empty Space Composite parent int span Form Toolkit toolkit Label label if toolkit null label toolkit create Label parent null else label new Label parent SWT NULL Grid Data gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING gd horizontal Span span gd width Hint 0 gd height Hint 0 label set Layout Data gd return label  createEmptySpace FormToolkit createLabel GridData GridData GridData VERTICAL_ALIGN_BEGINNING horizontalSpan widthHint heightHint setLayoutData

private Composite button Container private class Selection Handler implements Selection Listener public void widget Selected Selection Event e button Selected e  buttonContainer SelectionHandler SelectionListener widgetSelected SelectionEvent buttonSelected
button Selected e public void widget Default Selected Selection Event e button Selected e  buttonSelected widgetDefaultSelected SelectionEvent buttonSelected
private void button Selected Selection Event e Integer index Integer e widget get Data Shared Part With Buttons this button Selected Button e widget index int Value  buttonSelected SelectionEvent getData SharedPartWithButtons buttonSelected intValue
public Shared Part With Buttons String button Labels this button Labels button Labels  SharedPartWithButtons buttonLabels buttonLabels buttonLabels
public void set Button Enabled int index boolean enabled if controls null index 0 controls length index Control c controls index if c instanceof Button c set Enabled enabled  setButtonEnabled setEnabled
protected abstract void create Main Control Composite parent int style int span Form Toolkit toolkit  createMainControl FormToolkit
protected abstract void create Main Control Composite parent int style int span Form Toolkit toolkit protected abstract void button Selected Button button int index  createMainControl FormToolkit buttonSelected
public void create Control Composite parent int style int span Form Toolkit toolkit create Main Label parent span toolkit create Main Control parent style span 1 toolkit create Buttons parent toolkit  createControl FormToolkit createMainLabel createMainControl createButtons
protected void create Buttons Composite parent Form Toolkit toolkit if button Labels null button Labels length 0 button Container create Composite parent toolkit Grid Data gd new Grid Data Grid Data FILL VERTICAL button Container set Layout Data gd button Container set Layout create Buttons Layout controls new Control button Labels length Selection Handler listener new Selection Handler for int i 0 i button Labels length i String label button Labels i if label null Button button create Button button Container label i toolkit button add Selection Listener listener controls i button else create Empty Space button Container 1 toolkit  createButtons FormToolkit buttonLabels buttonLabels buttonContainer createComposite GridData GridData GridData FILL_VERTICAL buttonContainer setLayoutData buttonContainer setLayout createButtonsLayout buttonLabels SelectionHandler SelectionHandler buttonLabels buttonLabels createButton buttonContainer addSelectionListener createEmptySpace buttonContainer
protected Grid Layout create Buttons Layout Grid Layout layout new Grid Layout layout margin Width layout margin Height 0 return layout  GridLayout createButtonsLayout GridLayout GridLayout marginWidth marginHeight
protected Button create Button Composite parent String label int index Form Toolkit toolkit Button button if toolkit null button toolkit create Button parent label SWT PUSH else button new Button parent SWT PUSH button set Text label Grid Data gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING button set Layout Data gd button set Data new Integer index return button  createButton FormToolkit createButton setText GridData GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING setLayoutData setData
protected void update Enabled State for int i 0 i controls length i Control c controls i if c instanceof Button c set Enabled is Enabled  updateEnabledState setEnabled isEnabled
protected void create Main Label Composite parent int span Form Toolkit toolkit  createMainLabel FormToolkit

Creates an instane of a status dialog public Status Dialog Shell parent super parent f Last Status new Status Info  StatusDialog fLastStatus StatusInfo
Update the dialog s status line to reflect the given status It is save to call this method before the dialog has been opened protected void update Status I Status status f Last Status status if f Status Line null f Status Line is Disposed update Buttons Enable State status f Status Line set Error Status status  updateStatus IStatus fLastStatus fStatusLine fStatusLine isDisposed updateButtonsEnableState fStatusLine setErrorStatus
Returns the last status public I Status get Status return f Last Status  IStatus getStatus fLastStatus
Updates the status of the ok button to reflect the given status Subclasses may override this method to update additional buttons param status the status protected void update Buttons Enable State I Status status if f Ok Button null f Ok Button is Disposed f Ok Button set Enabled status matches I Status ERROR  updateButtonsEnableState IStatus fOkButton fOkButton isDisposed fOkButton setEnabled IStatus
protected void configure Shell Shell shell super configure Shell shell if f Title null shell set Text f Title  configureShell configureShell fTitle setText fTitle
public void create super create if f Last Status null policy dialogs are not allowed to come up with an error message if f Last Status matches I Status ERROR Status Info status new Status Info status set Error NON NLS 1 f Last Status status update Status f Last Status  fLastStatus fLastStatus IStatus StatusInfo StatusInfo setError fLastStatus updateStatus fLastStatus
see Dialog create Buttons For Button Bar Composite protected void create Buttons For Button Bar Composite parent f Ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButtonsForButtonBar fOkButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
protected Control create Button Bar Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 1 layout margin Height 0 layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Status Line new Message Line composite f Status Line set Alignment SWT LEFT f Status Line set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Status Line set Error Status null NON NLS 1 super create Button Bar composite return composite  createButtonBar GridLayout GridLayout numColumns marginHeight marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN setLayout setLayoutData GridData GridData FILL_HORIZONTAL fStatusLine MessageLine fStatusLine setAlignment fStatusLine setLayoutData GridData GridData FILL_HORIZONTAL fStatusLine setErrorStatus createButtonBar
Sets the title for this dialog param title the title public void set Title String title f Title title null title NON NLS 1 Shell shell get Shell if shell null shell is Disposed shell set Text f Title  setTitle fTitle getShell isDisposed setText fTitle
Sets the image for this dialog param image the image public void set Image Image image f Image image Shell shell get Shell if shell null shell is Disposed shell set Image f Image  setImage fImage getShell isDisposed setImage fImage

Creates a status set to OK no message public Status Info this OK null  StatusInfo
Creates a status param severity The status severity ERROR WARNING INFO and OK param message The message of the status Applies only for ERROR WARNING and INFO public Status Info int severity String message f Status Message message f Severity severity  StatusInfo fStatusMessage fSeverity
Returns if the status severity is OK public boolean isOK return f Severity I Status OK  fSeverity IStatus
Returns if the status severity is WARNING public boolean is Warning return f Severity I Status WARNING  isWarning fSeverity IStatus
Returns if the status severity is INFO public boolean is Info return f Severity I Status INFO  isInfo fSeverity IStatus
Returns if the status severity is ERROR public boolean is Error return f Severity I Status ERROR  isError fSeverity IStatus
see I Status get Message public String get Message return f Status Message  IStatus getMessage getMessage fStatusMessage
Sets the status to ERROR param The error message can be empty but not null public void set Error String error Message Assert is Not Null error Message f Status Message error Message f Severity I Status ERROR  setError errorMessage isNotNull errorMessage fStatusMessage errorMessage fSeverity IStatus
Sets the status to WARNING param The warning message can be empty but not null public void set Warning String warning Message Assert is Not Null warning Message f Status Message warning Message f Severity I Status WARNING  setWarning warningMessage isNotNull warningMessage fStatusMessage warningMessage fSeverity IStatus
Sets the status to INFO param The info message can be empty but not null public void set Info String info Message Assert is Not Null info Message f Status Message info Message f Severity I Status INFO  setInfo infoMessage isNotNull infoMessage fStatusMessage infoMessage fSeverity IStatus
Sets the status to OK public void setOK f Status Message null f Severity I Status OK  fStatusMessage fSeverity IStatus
see I Status matches int public boolean matches int severity Mask return f Severity severity Mask 0  IStatus severityMask fSeverity severityMask
Returns always code false code see I Status is Multi Status public boolean is Multi Status return false  IStatus isMultiStatus isMultiStatus
see I Status get Severity public int get Severity return f Severity  IStatus getSeverity getSeverity fSeverity
see I Status get Plugin public String get Plugin return PDE Plugin PLUGIN ID  IStatus getPlugin getPlugin PDEPlugin PLUGIN_ID
Returns always code null code see I Status get Exception public Throwable get Exception return null  IStatus getException getException
Returns always the error severity see I Status get Code public int get Code return f Severity  IStatus getCode getCode fSeverity
Returns always code null code see I Status get Children public I Status get Children return new I Status 0  IStatus getChildren IStatus getChildren IStatus

private Structured Viewer viewer private Point min Size null public Structured Viewer Part String button Labels super button Labels  StructuredViewer minSize StructuredViewerPart buttonLabels buttonLabels
super button Labels public Structured Viewer get Viewer return viewer  buttonLabels StructuredViewer getViewer
return viewer public Control get Control return viewer get Control  getControl getControl
protected void create Main Control Composite parent int style int span Form Toolkit toolkit viewer create Structured Viewer parent style toolkit Control control viewer get Control if toolkit null toolkit hook Delete Listener control Grid Data gd new Grid Data Grid Data FILL BOTH gd horizontal Span span control set Layout Data gd apply Minimum Size  createMainControl FormToolkit createStructuredViewer getControl hookDeleteListener GridData GridData GridData FILL_BOTH horizontalSpan setLayoutData applyMinimumSize
public void set Minimum Size int width int height min Size new Point width height if viewer null apply Minimum Size  setMinimumSize minSize applyMinimumSize
private void apply Minimum Size if min Size null Grid Data gd Grid Data viewer get Control get Layout Data gd width Hint min Size x gd height Hint min Size y  applyMinimumSize minSize GridData GridData getControl getLayoutData widthHint minSize heightHint minSize
protected void update Enabled State get Control set Enabled is Enabled super update Enabled State  updateEnabledState getControl setEnabled isEnabled updateEnabledState
super update Enabled State protected abstract Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit  updateEnabledState StructuredViewer createStructuredViewer FormToolkit

Constructor for Table Part param button Labels public Table Part String button Labels super button Labels  TablePart buttonLabels TablePart buttonLabels buttonLabels
protected Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit style SWT H SCROLL SWT V SCROLL if toolkit null style SWT BORDER else style toolkit get Border Style Table Viewertable Viewer new Table Viewer parent style table Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e Table Part this selection Changed I Structured Selection e get Selection table Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event e Table Part this handle Double Click I Structured Selection e get Selection return table Viewer  StructuredViewer createStructuredViewer FormToolkit H_SCROLL V_SCROLL getBorderStyle TableViewertableViewer TableViewer tableViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent TablePart selectionChanged IStructuredSelection getSelection tableViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent TablePart handleDoubleClick IStructuredSelection getSelection tableViewer
public Table Viewer get Table Viewer return Table Viewer get Viewer  TableViewer getTableViewer TableViewer getViewer
see Shared Part With Buttons button Selected int protected void button Selected Button button int index  SharedPartWithButtons buttonSelected buttonSelected
protected void selection Changed I Structured Selection selection  selectionChanged IStructuredSelection
protected void selection Changed I Structured Selection selection protected void handle Double Click I Structured Selection selection  selectionChanged IStructuredSelection handleDoubleClick IStructuredSelection

Constructor for Tree Part param button Labels public Tree Part String button Labels super button Labels  TreePart buttonLabels TreePart buttonLabels buttonLabels
Tree Viewertree Viewer new Tree Viewer parent style tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e Tree Part this selection Changed I Structured Selection e get Selection  TreeViewertreeViewer TreeViewer treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent TreePart selectionChanged IStructuredSelection getSelection
tree Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event e Tree Part this handle Double Click I Structured Selection e get Selection  treeViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent TreePart handleDoubleClick IStructuredSelection getSelection
protected Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit style SWT H SCROLL SWT V SCROLL if toolkit null style SWT BORDER else style toolkit get Border Style Tree Viewertree Viewer new Tree Viewer parent style tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e Tree Part this selection Changed I Structured Selection e get Selection tree Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event e Tree Part this handle Double Click I Structured Selection e get Selection return tree Viewer  StructuredViewer createStructuredViewer FormToolkit H_SCROLL V_SCROLL getBorderStyle TreeViewertreeViewer TreeViewer treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent TreePart selectionChanged IStructuredSelection getSelection treeViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent TreePart handleDoubleClick IStructuredSelection getSelection treeViewer
public Tree Viewer get Tree Viewer return Tree Viewer get Viewer  TreeViewer getTreeViewer TreeViewer getViewer
see Shared Part With Buttons button Selected int protected void button Selected Button button int index  SharedPartWithButtons buttonSelected buttonSelected
protected void selection Changed I Structured Selection selection  selectionChanged IStructuredSelection
protected void selection Changed I Structured Selection selection protected void handle Double Click I Structured Selection selection  selectionChanged IStructuredSelection handleDoubleClick IStructuredSelection

Constructor for Wizard Checkbox Table Part param button Labels public Wizard Checkbox Table Part String table Name String button Labels super button Labels this table Name table Name  WizardCheckboxTablePart buttonLabels WizardCheckboxTablePart tableName buttonLabels buttonLabels tableName tableName
public Wizard Checkbox Table Part String main Label this main Label new String PDE Plugin get Resource String KEY SELECT ALL PDE Plugin get Resource String KEY DESELECT ALL set Select All Index 0 set Deselect All Index 1  WizardCheckboxTablePart mainLabel mainLabel PDEPlugin getResourceString KEY_SELECT_ALL PDEPlugin getResourceString KEY_DESELECT_ALL setSelectAllIndex setDeselectAllIndex
public void set Select All Index int index this select All Index index  setSelectAllIndex selectAllIndex
this select All Index index public void set Deselect All Index int index this deselect All Index index  selectAllIndex setDeselectAllIndex deselectAllIndex
protected void button Selected Button button int index if index select All Index handle Select All true if index deselect All Index handle Select All false  buttonSelected selectAllIndex handleSelectAll deselectAllIndex handleSelectAll
public Object get Selection Checkbox Table Viewer viewer get Table Viewer return viewer get Checked Elements  getSelection CheckboxTableViewer getTableViewer getCheckedElements
public void set Selection Object selected Checkbox Table Viewer viewer get Table Viewer viewer set Checked Elements selected update Counter viewer get Checked Elements length  setSelection CheckboxTableViewer getTableViewer setCheckedElements updateCounter getCheckedElements
public void create Control Composite parent create Control parent SWT NULL 2 null counter Label new Label parent SWT NULL Grid Data gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 counter Label set Layout Data gd update Counter 0  createControl createControl counterLabel GridData GridData GridData VERTICAL_ALIGN_BEGINNING GridData HORIZONTAL_ALIGN_FILL horizontalSpan counterLabel setLayoutData updateCounter
protected Button create Button Composite parent String label int index Form Toolkit toolkit Button button super create Button parent label index toolkit SWT Util set Button Dimension Hint button return button  createButton FormToolkit createButton SWTUtil setButtonDimensionHint
protected Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit Structured Viewer viewer super create Structured Viewer parent style toolkit viewer set Sorter List Util NAME SORTER return viewer  StructuredViewer createStructuredViewer FormToolkit StructuredViewer createStructuredViewer setSorter ListUtil NAME_SORTER
protected void create Main Label Composite parent int span Form Toolkit toolkit if table Name null return Label label new Label parent SWT NULL label set Text table Name Grid Data gd new Grid Data gd horizontal Span span label set Layout Data gd  createMainLabel FormToolkit tableName setText tableName GridData GridData horizontalSpan setLayoutData
protected void update Counter int amount counter amount update Counter Label  updateCounter updateCounterLabel
protected void update Counter Label String number get Selection Count NON NLS 1 String total Number get Total Count NON NLS 1 String message PDE Plugin get Formatted Message KEY COUNTER new String number total Number counter Label set Text message  updateCounterLabel getSelectionCount totalNumber getTotalCount PDEPlugin getFormattedMessage KEY_COUNTER totalNumber counterLabel setText
public int get Selection Count return counter  getSelectionCount
public void select All boolean select handle Select All select  selectAll handleSelectAll
private int get Total Count Checkbox Table Viewer viewer get Table Viewer return viewer get Table get Item Count  getTotalCount CheckboxTableViewer getTableViewer getTable getItemCount
protected void handle Select All boolean select Checkbox Table Viewer viewer get Table Viewer viewer set All Checked select int selected if select selected 0 else selected get Total Count update Counter selected  handleSelectAll CheckboxTableViewer getTableViewer setAllChecked getTotalCount updateCounter
update Counter selected protected void element Checked Object element boolean checked int count get Selection Count update Counter checked count 1 count 1  updateCounter elementChecked getSelectionCount updateCounter

Plugin Model Manager out Of Sync NON NLS 1 public PDE Label Provider  PluginModelManager outOfSync PDELabelProvider
public String get Text Object obj if obj instanceof I Plugin Model Base return get Object Text I Plugin Model Base obj get Plugin Base if obj instanceof I Plugin Base return get Object Text I Plugin Base obj if obj instanceof Import Object return get Object Text Import Object obj if obj instanceof I Plugin Import return get Object Text I Plugin Import obj if obj instanceof I Plugin Library return get Object Text I Plugin Library obj if obj instanceof I Plugin Extension return get Object Text I Plugin Extension obj if obj instanceof I Plugin Extension Point return get Object Text I Plugin Extension Point obj if obj instanceof Named Element return Named Element obj get Label if obj instanceof I Schema Object return get Object Text I Schema Object obj if obj instanceof Feature Plugin return get Object Text Feature Plugin obj if obj instanceof Feature Import return get Object Text Feature Import obj if obj instanceof I Feature Model return get Object Text I Feature Model obj if obj instanceof Feature Child return get Object Text Feature Child obj if obj instanceof I Site Feature return get Object Text I Site Feature obj if obj instanceof I Site Archive return get Object Text I Site Archive obj if obj instanceof I Site Category Definition return get Object Text I Site Category Definition obj if obj instanceof I Site Category return get Object Text I Site Category obj if obj instanceof I Site Build Feature return get Object Text I Site Build Feature obj if obj instanceof I Build Entry return get Object Text I Build Entry obj return super get Text obj  getText IPluginModelBase getObjectText IPluginModelBase getPluginBase IPluginBase getObjectText IPluginBase ImportObject getObjectText ImportObject IPluginImport getObjectText IPluginImport IPluginLibrary getObjectText IPluginLibrary IPluginExtension getObjectText IPluginExtension IPluginExtensionPoint getObjectText IPluginExtensionPoint NamedElement NamedElement getLabel ISchemaObject getObjectText ISchemaObject FeaturePlugin getObjectText FeaturePlugin FeatureImport getObjectText FeatureImport IFeatureModel getObjectText IFeatureModel FeatureChild getObjectText FeatureChild ISiteFeature getObjectText ISiteFeature ISiteArchive getObjectText ISiteArchive ISiteCategoryDefinition getObjectText ISiteCategoryDefinition ISiteCategory getObjectText ISiteCategory ISiteBuildFeature getObjectText ISiteBuildFeature IBuildEntry getObjectText IBuildEntry getText
public String get Object Text I Plugin Base plugin Base String name is Full Name Mode Enabled plugin Base get Translated Name plugin Base get Id name prevent Null name String version plugin Base get Version String text if version null version length 0 text name plugin Base get Version NON NLS 1 NON NLS 2 else text name if plugin Base get Model null plugin Base get Model is In Sync text PDE Plugin get Resource String KEY OUT OF SYNC NON NLS 1 return text  getObjectText IPluginBase pluginBase isFullNameModeEnabled pluginBase getTranslatedName pluginBase getId preventNull pluginBase getVersion pluginBase getVersion pluginBase getModel pluginBase getModel isInSync PDEPlugin getResourceString KEY_OUT_OF_SYNC
private String prevent Null String text return text null text NON NLS 1  preventNull
public String get Object Text I Plugin Extension extension return prevent Null is Full Name Mode Enabled extension get Translated Name extension get Point  getObjectText IPluginExtension preventNull isFullNameModeEnabled getTranslatedName getPoint
public String get Object Text I Plugin Extension Point point return prevent Null is Full Name Mode Enabled point get Translated Name point get Id  getObjectText IPluginExtensionPoint preventNull isFullNameModeEnabled getTranslatedName getId
public String get Object Text Import Object obj if is Full Name Mode Enabled return obj to String return prevent Null obj get Id  getObjectText ImportObject isFullNameModeEnabled toString preventNull getId
public String get Object Text I Plugin Import obj if is Full Name Mode Enabled String id obj get Id I Plugin plugin PDE Core get Default find Plugin obj get Id if plugin null return plugin get Translated Name return id null id NON NLS 1 return prevent Null obj get Id  getObjectText IPluginImport isFullNameModeEnabled getId IPlugin PDECore getDefault findPlugin getId getTranslatedName preventNull getId
return prevent Null obj get Id public String get Object Text I Build Entry obj return obj get Name  preventNull getId getObjectText IBuildEntry getName
public String get Object Text I Plugin Library obj return prevent Null obj get Name  getObjectText IPluginLibrary preventNull getName
public String get Object Text I Schema Object obj String text obj get Name if obj instanceof I Schema Repeatable I Schema Repeatable rso I Schema Repeatable obj boolean unbounded rso get Max Occurs Integer MAX VALUE int max Occurs rso get Max Occurs int min Occurs rso get Min Occurs if max Occurs 1 min Occurs 1 text min Occurs NON NLS 1 NON NLS 2 if unbounded text NON NLS 1 else text max Occurs NON NLS 1 return text  getObjectText ISchemaObject getName ISchemaRepeatable ISchemaRepeatable ISchemaRepeatable getMaxOccurs MAX_VALUE maxOccurs getMaxOccurs minOccurs getMinOccurs maxOccurs minOccurs minOccurs maxOccurs
public String get Object Text Feature Plugin obj String name is Full Name Mode Enabled obj get Translatable Label obj get Id String version obj get Version String text if version null version length 0 text name version NON NLS 1 NON NLS 2 else text name return prevent Null text  getObjectText FeaturePlugin isFullNameModeEnabled getTranslatableLabel getId getVersion preventNull
public String get Object Text Feature Import obj int type obj get Type if type I Feature Import PLUGIN I Plugin plugin obj get Plugin if plugin null is Full Name Mode Enabled return prevent Null plugin get Translated Name else if type I Feature Import FEATURE I Feature feature obj get Feature if feature null is Full Name Mode Enabled return prevent Null feature get Label return prevent Null obj get Id  getObjectText FeatureImport getType IFeatureImport IPlugin getPlugin isFullNameModeEnabled preventNull getTranslatedName IFeatureImport IFeature getFeature isFullNameModeEnabled preventNull getLabel preventNull getId
public String get Object Text I Feature Model obj I Feature feature obj get Feature return prevent Null feature get Id prevent Null feature get Version NON NLS 1 NON NLS 2  getObjectText IFeatureModel IFeature getFeature preventNull getId preventNull getVersion
public String get Object Text Feature Child obj return prevent Null obj get Id prevent Null obj get Version NON NLS 1 NON NLS 2  getObjectText FeatureChild preventNull getId preventNull getVersion
public String get Object Text I Site Feature obj return prevent Null obj getURL  getObjectText ISiteFeature preventNull
public String get Object Text I Site Archive obj return prevent Null obj get Path  getObjectText ISiteArchive preventNull getPath
return prevent Null obj get Path public String get Object Text I Site Category Definition obj return prevent Null obj get Label  preventNull getPath getObjectText ISiteCategoryDefinition preventNull getLabel
public String get Object Text I Site Category obj I Site Category Definition def obj get Definition if def null return prevent Null def get Label return prevent Null obj get Name  getObjectText ISiteCategory ISiteCategoryDefinition getDefinition preventNull getLabel preventNull getName
return prevent Null obj get Name public String get Object Text I Site Build Feature obj return prevent Null obj get Id prevent Null obj get Version NON NLS 1 NON NLS 2  preventNull getName getObjectText ISiteBuildFeature preventNull getId preventNull getVersion
public Image get Image Object obj if obj instanceof I Bundle Plugin Base return get Object Image I Bundle Plugin Base obj if obj instanceof I Bundle Plugin Model Base return get Object Image I Bundle Plugin Base I Bundle Plugin Model Base obj get Plugin Base if obj instanceof I Plugin return get Object Image I Plugin obj if obj instanceof I Fragment return get Object Image I Fragment obj if obj instanceof I Plugin Model return get Object Image I Plugin Model obj get Plugin if obj instanceof I Fragment Model return get Object Image I Fragment Model obj get Fragment if obj instanceof Import Object return get Object Image Import Object obj if obj instanceof I Plugin Import return get Object Image I Plugin Import obj if obj instanceof I Plugin Library return get Object Image I Plugin Library obj if obj instanceof I Plugin Extension return get Object Image I Plugin Extension obj if obj instanceof I Plugin Extension Point return get Object Image I Plugin Extension Point obj if obj instanceof Named Element return Named Element obj get Image if obj instanceof I Schema Element return get Object Image I Schema Element obj if obj instanceof I Schema Attribute return get Object Image I Schema Attribute obj if obj instanceof I Document Section obj instanceof I Schema int flags get Schema Object Flags I Schema Object obj return get PDE Plugin Images DESC DOC SECTION OBJ flags if obj instanceof I Schema Compositor return get Object Image I Schema Compositor obj if obj instanceof I FeatureURL Element return get Object Image I FeatureURL Element obj if obj instanceof I Feature Model return get PDE Plugin Images DESC FEATURE OBJ if obj instanceof I Feature Child return get Object Image I Feature Child obj if obj instanceof I Feature Plugin return get Object Image I Feature Plugin obj if obj instanceof I Feature Data return get Object Image I Feature Data obj if obj instanceof I Feature Import return get Object Image I Feature Import obj if obj instanceof I Feature Info return get Object Image I Feature Info obj if obj instanceof I Build Entry return get PDE Plugin Images DESC BUILD VAR OBJ if obj instanceof I Site Feature return get Object Image I Site Feature obj if obj instanceof I Site Archive return get Object Image I Site Archive obj if obj instanceof I Site Category Definition return get Object Image I Site Category Definition obj if obj instanceof I Site Category return get Object Image I Site Category obj if obj instanceof I Site Build Feature return get Object Image I Site Build Feature obj return super get Image obj  getImage IBundlePluginBase getObjectImage IBundlePluginBase IBundlePluginModelBase getObjectImage IBundlePluginBase IBundlePluginModelBase getPluginBase IPlugin getObjectImage IPlugin IFragment getObjectImage IFragment IPluginModel getObjectImage IPluginModel getPlugin IFragmentModel getObjectImage IFragmentModel getFragment ImportObject getObjectImage ImportObject IPluginImport getObjectImage IPluginImport IPluginLibrary getObjectImage IPluginLibrary IPluginExtension getObjectImage IPluginExtension IPluginExtensionPoint getObjectImage IPluginExtensionPoint NamedElement NamedElement getImage ISchemaElement getObjectImage ISchemaElement ISchemaAttribute getObjectImage ISchemaAttribute IDocumentSection ISchema getSchemaObjectFlags ISchemaObject PDEPluginImages DESC_DOC_SECTION_OBJ ISchemaCompositor getObjectImage ISchemaCompositor IFeatureURLElement getObjectImage IFeatureURLElement IFeatureModel PDEPluginImages DESC_FEATURE_OBJ IFeatureChild getObjectImage IFeatureChild IFeaturePlugin getObjectImage IFeaturePlugin IFeatureData getObjectImage IFeatureData IFeatureImport getObjectImage IFeatureImport IFeatureInfo getObjectImage IFeatureInfo IBuildEntry PDEPluginImages DESC_BUILD_VAR_OBJ ISiteFeature getObjectImage ISiteFeature ISiteArchive getObjectImage ISiteArchive ISiteCategoryDefinition getObjectImage ISiteCategoryDefinition ISiteCategory getObjectImage ISiteCategory ISiteBuildFeature getObjectImage ISiteBuildFeature getImage
public Image get Object Image I Bundle Plugin Base bundle Plugin Base return get Object Image bundle Plugin Base false false  getObjectImage IBundlePluginBase bundlePluginBase getObjectImage bundlePluginBase
public Image get Object Image I Bundle Plugin Base bundle Plugin Base boolean check Enabled boolean java Search I Bundle Plugin Model Base model I Bundle Plugin Model Base bundle Plugin Base get Model int flags get Model Flags model if java Search flags F JAVA Image Descriptor desc PDE Plugin Images DESC BUNDLE OBJ if model is Fragment Model desc PDE Plugin Images DESC BUNDLE FRAGMENT OBJ if check Enabled model is Enabled false desc PDE Plugin Images DESC EXT PLUGIN OBJ return get desc flags  getObjectImage IBundlePluginBase bundlePluginBase checkEnabled javaSearch IBundlePluginModelBase IBundlePluginModelBase bundlePluginBase getModel getModelFlags javaSearch F_JAVA ImageDescriptor PDEPluginImages DESC_BUNDLE_OBJ isFragmentModel PDEPluginImages DESC_BUNDLE_FRAGMENT_OBJ checkEnabled isEnabled PDEPluginImages DESC_EXT_PLUGIN_OBJ
private int get Model Flags I Bundle Plugin Model Base model int flags 0 if model is Loaded model is In Sync flags F ERROR I Resource resource model get Underlying Resource if resource null flags F EXTERNAL else I Project project resource get Project try if Workspace Model Manager is Binary Plugin Project project String property project get Persistent Property PDE Core EXTERNAL PROJECT PROPERTY if property null flags F BINARY catch Core Exception e return flags  getModelFlags IBundlePluginModelBase isLoaded isInSync F_ERROR IResource getUnderlyingResource F_EXTERNAL IProject getProject WorkspaceModelManager isBinaryPluginProject getPersistentProperty PDECore EXTERNAL_PROJECT_PROPERTY F_BINARY CoreException
return flags private Image get Object Image I Plugin plugin return get Object Image plugin false false  getObjectImage IPlugin getObjectImage
public Image get Object Image I Plugin plugin boolean check Enabled boolean java Search I Plugin Model Base model plugin get Plugin Model int flags get Model Flags model if java Search flags F JAVA Image Descriptor desc PDE Plugin Images DESC PLUGIN OBJ if check Enabled model is Enabled false desc PDE Plugin Images DESC EXT PLUGIN OBJ return get desc flags  getObjectImage IPlugin checkEnabled javaSearch IPluginModelBase getPluginModel getModelFlags javaSearch F_JAVA ImageDescriptor PDEPluginImages DESC_PLUGIN_OBJ checkEnabled isEnabled PDEPluginImages DESC_EXT_PLUGIN_OBJ
private int get Model Flags I Plugin Model Base model int flags 0 if model is Loaded model is In Sync flags F ERROR I Resource resource model get Underlying Resource if resource null flags F EXTERNAL else I Project project resource get Project try if Workspace Model Manager is Binary Plugin Project project String property project get Persistent Property PDE Core EXTERNAL PROJECT PROPERTY if property null if property equals PDE Core EXTERNAL PROJECT VALUE flags F EXTERNAL else if property equals PDE Core BINARY PROJECT VALUE flags F BINARY catch Core Exception e return flags  getModelFlags IPluginModelBase isLoaded isInSync F_ERROR IResource getUnderlyingResource F_EXTERNAL IProject getProject WorkspaceModelManager isBinaryPluginProject getPersistentProperty PDECore EXTERNAL_PROJECT_PROPERTY PDECore EXTERNAL_PROJECT_VALUE F_EXTERNAL PDECore BINARY_PROJECT_VALUE F_BINARY CoreException
private Image get Object Image I Fragment fragment return get Object Image fragment false false  getObjectImage IFragment getObjectImage
public Image get Object Image I Fragment fragment boolean check Enabled boolean java Search I Plugin Model Base model fragment get Plugin Model int flags get Model Flags model if java Search flags F JAVA Image Descriptor desc PDE Plugin Images DESC FRAGMENT OBJ if check Enabled model is Enabled false desc PDE Plugin Images DESC EXT FRAGMENT OBJ return get desc flags  getObjectImage IFragment checkEnabled javaSearch IPluginModelBase getPluginModel getModelFlags javaSearch F_JAVA ImageDescriptor PDEPluginImages DESC_FRAGMENT_OBJ checkEnabled isEnabled PDEPluginImages DESC_EXT_FRAGMENT_OBJ
private Image get Object Image Import Object iobj int flags 0 if iobj is Resolved false flags F ERROR else if iobj get Import is Reexported flags F EXPORT I Plugin plugin iobj get Plugin if plugin null I Plugin Model Base model plugin get Plugin Model flags get Model Flags model return get get Required Plugin Image Descriptor iobj get Import flags  getObjectImage ImportObject isResolved F_ERROR getImport isReexported F_EXPORT IPlugin getPlugin IPluginModelBase getPluginModel getModelFlags getRequiredPluginImageDescriptor getImport
protected Image Descriptor get Required Plugin Image Descriptor I Plugin Import iobj return PDE Plugin Images DESC REQ PLUGIN OBJ  ImageDescriptor getRequiredPluginImageDescriptor IPluginImport PDEPluginImages DESC_REQ_PLUGIN_OBJ
private Image get Object Image I Plugin Import obj int flags 0 if obj is Reexported flags F EXPORT return get get Required Plugin Image Descriptor obj flags  getObjectImage IPluginImport isReexported F_EXPORT getRequiredPluginImageDescriptor
private Image get Object Image I Plugin Library library return get PDE Plugin Images DESC JAVA LIB OBJ  getObjectImage IPluginLibrary PDEPluginImages DESC_JAVA_LIB_OBJ
return get PDE Plugin Images DESC JAVA LIB OBJ private Image get Object Image I Plugin Extension point return get PDE Plugin Images DESC EXTENSION OBJ  PDEPluginImages DESC_JAVA_LIB_OBJ getObjectImage IPluginExtension PDEPluginImages DESC_EXTENSION_OBJ
return get PDE Plugin Images DESC EXTENSION OBJ private Image get Object Image I Plugin Extension Point point return get PDE Plugin Images DESC EXT POINT OBJ  PDEPluginImages DESC_EXTENSION_OBJ getObjectImage IPluginExtensionPoint PDEPluginImages DESC_EXT_POINT_OBJ
private Image get Object Image I Schema Element element int flags get Schema Object Flags element return get PDE Plugin Images DESC GEL SC OBJ flags  getObjectImage ISchemaElement getSchemaObjectFlags PDEPluginImages DESC_GEL_SC_OBJ
private Image get Object Image I Schema Attribute att int flags get Schema Object Flags att if att get Kind I Schema Attribute JAVA return get PDE Plugin Images DESC ATT CLASS OBJ flags if att get Kind I Schema Attribute RESOURCE return get PDE Plugin Images DESC ATT FILE OBJ flags if att get Use I Schema Attribute REQUIRED return get PDE Plugin Images DESC ATT REQ OBJ flags return get PDE Plugin Images DESC ATT IMPL OBJ flags  getObjectImage ISchemaAttribute getSchemaObjectFlags getKind ISchemaAttribute PDEPluginImages DESC_ATT_CLASS_OBJ getKind ISchemaAttribute PDEPluginImages DESC_ATT_FILE_OBJ getUse ISchemaAttribute PDEPluginImages DESC_ATT_REQ_OBJ PDEPluginImages DESC_ATT_IMPL_OBJ
private Image get Object Image I Schema Compositor compositor switch compositor get Kind case I Schema Compositor ALL return get PDE Plugin Images DESC ALL SC OBJ case I Schema Compositor CHOICE return get PDE Plugin Images DESC CHOICE SC OBJ case I Schema Compositor SEQUENCE return get PDE Plugin Images DESC SEQ SC OBJ case I Schema Compositor GROUP return get PDE Plugin Images DESC GROUP SC OBJ return null  getObjectImage ISchemaCompositor getKind ISchemaCompositor PDEPluginImages DESC_ALL_SC_OBJ ISchemaCompositor PDEPluginImages DESC_CHOICE_SC_OBJ ISchemaCompositor PDEPluginImages DESC_SEQ_SC_OBJ ISchemaCompositor PDEPluginImages DESC_GROUP_SC_OBJ
private int get Schema Object Flags I Schema Object sobj int flags 0 String text sobj get Description if text null text text trim if text null text length 0 text char At 0 complete flags F EDIT return flags  getSchemaObjectFlags ISchemaObject getDescription charAt F_EDIT
private Image get Object Image I FeatureURL Element url return get PDE Plugin Images DESC LINK OBJ  getObjectImage IFeatureURLElement PDEPluginImages DESC_LINK_OBJ
private Image get Object Image I Feature Plugin plugin int flags 0 if Feature Plugin plugin get Plugin Base null int cflag Compiler Flags get Flag Compiler Flags F UNRESOLVED PLUGINS if cflag Compiler Flags ERROR flags F ERROR else if cflag Compiler Flags WARNING flags F WARNING if plugin is Fragment return get PDE Plugin Images DESC FRAGMENT OBJ flags else return get PDE Plugin Images DESC PLUGIN OBJ flags  getObjectImage IFeaturePlugin FeaturePlugin getPluginBase CompilerFlags getFlag CompilerFlags F_UNRESOLVED_PLUGINS CompilerFlags F_ERROR CompilerFlags F_WARNING isFragment PDEPluginImages DESC_FRAGMENT_OBJ PDEPluginImages DESC_PLUGIN_OBJ
private Image get Object Image I Feature Child feature int flags 0 if Feature Child feature get Referenced Feature null int cflag Compiler Flags get Flag Compiler Flags F UNRESOLVED FEATURES if cflag Compiler Flags ERROR flags F ERROR else if cflag Compiler Flags WARNING flags F WARNING return get PDE Plugin Images DESC FEATURE OBJ flags  getObjectImage IFeatureChild FeatureChild getReferencedFeature CompilerFlags getFlag CompilerFlags F_UNRESOLVED_FEATURES CompilerFlags F_ERROR CompilerFlags F_WARNING PDEPluginImages DESC_FEATURE_OBJ
private Image get Object Image I Feature Data data int flags 0 if data exists flags F ERROR Image Descriptor desc PlatformUI get Workbench get Editor Registry get Image Descriptor data get Id return get desc flags  getObjectImage IFeatureData F_ERROR ImageDescriptor getWorkbench getEditorRegistry getImageDescriptor getId
private Image get Object Image I Feature Import obj Feature Import iimport Feature Import obj int type iimport get Type Image Descriptor base int flags 0 if type I Feature Import FEATURE base PDE Plugin Images DESC FEATURE OBJ I Feature feature iimport get Feature if feature null flags F ERROR else base PDE Plugin Images DESC REQ PLUGIN OBJ I Plugin plugin iimport get Plugin if plugin null flags F ERROR return get base flags  getObjectImage IFeatureImport FeatureImport FeatureImport getType ImageDescriptor IFeatureImport PDEPluginImages DESC_FEATURE_OBJ IFeature getFeature F_ERROR PDEPluginImages DESC_REQ_PLUGIN_OBJ IPlugin getPlugin F_ERROR
private Image get Object Image I Feature Info info int flags 0 String text info get Description if text null text text trim if text null text length 0 complete flags F EDIT return get PDE Plugin Images DESC DOC SECTION OBJ flags  getObjectImage IFeatureInfo getDescription F_EDIT PDEPluginImages DESC_DOC_SECTION_OBJ
public Image get Object Image I Site Feature obj int flags 0 if obj get Archive File null flags F BINARY return get PDE Plugin Images DESC JAVA LIB OBJ flags  getObjectImage ISiteFeature getArchiveFile F_BINARY PDEPluginImages DESC_JAVA_LIB_OBJ
public Image get Object Image I Site Archive obj return get PDE Plugin Images DESC JAVA LIB OBJ 0  getObjectImage ISiteArchive PDEPluginImages DESC_JAVA_LIB_OBJ
return get PDE Plugin Images DESC JAVA LIB OBJ 0 public Image get Object Image I Site Category Definition obj return get PDE Plugin Images DESC CATEGORY OBJ  PDEPluginImages DESC_JAVA_LIB_OBJ getObjectImage ISiteCategoryDefinition PDEPluginImages DESC_CATEGORY_OBJ
public Image get Object Image I Site Category obj int flags obj get Definition null F ERROR 0 return get PDE Plugin Images DESC CATEGORY OBJ flags  getObjectImage ISiteCategory getDefinition F_ERROR PDEPluginImages DESC_CATEGORY_OBJ
public Image get Object Image I Site Build Feature obj if obj get Referenced Feature null return get PDE Plugin Images DESC NOREF FEATURE OBJ else return get PDE Plugin Images DESC FEATURE OBJ  getObjectImage ISiteBuildFeature getReferencedFeature PDEPluginImages DESC_NOREF_FEATURE_OBJ PDEPluginImages DESC_FEATURE_OBJ
public boolean is Full Name Mode Enabled return PDE Plugin is Full Name Mode Enabled  isFullNameModeEnabled PDEPlugin isFullNameModeEnabled

private I Page Layout factory public PDE Perspective super  IPageLayout PDEPerspective
public void create Initial Layout I Page Layout factory this factory factory add Views add Action Sets add New Wizard Shortcuts add Perspective Shortcuts add View Shortcuts  createInitialLayout IPageLayout addViews addActionSets addNewWizardShortcuts addPerspectiveShortcuts addViewShortcuts
private void add Perspective Shortcuts factory add Perspective Shortcut org eclipse ui resource Perspective NON NLS 1 factory add Perspective Shortcut JavaUI ID PERSPECTIVE factory add Perspective Shortcut I DebugUI Constants ID DEBUG PERSPECTIVE  addPerspectiveShortcuts addPerspectiveShortcut resourcePerspective addPerspectiveShortcut ID_PERSPECTIVE addPerspectiveShortcut IDebugUIConstants ID_DEBUG_PERSPECTIVE
private void add Views I Folder Layout top Left factory create Folder top Left NON NLS 1 I Page Layout LEFT 0 25f factory get Editor Area top Left add Placeholder I Page Layout ID RES NAV top Left add View JavaUI ID PACKAGES top Left add Placeholder JavaUI ID TYPE HIERARCHY top Left add View PDE Plugin PLUGINS VIEW ID I Folder Layout bottom factory create Folder bottom Right NON NLS 1 I Page Layout BOTTOM 0 75f factory get Editor Area bottom add View org eclipse pde runtime Log View NON NLS 1 bottom add View I Page Layout ID TASK LIST bottom add View I Page Layout ID PROBLEM VIEW bottom add View I Page Layout ID PROP SHEET factory add View I Page Layout ID OUTLINE I Page Layout RIGHT 0 75f factory get Editor Area  addViews IFolderLayout topLeft createFolder topLeft IPageLayout getEditorArea topLeft addPlaceholder IPageLayout ID_RES_NAV topLeft addView ID_PACKAGES topLeft addPlaceholder ID_TYPE_HIERARCHY topLeft addView PDEPlugin PLUGINS_VIEW_ID IFolderLayout createFolder bottomRight IPageLayout getEditorArea addView LogView addView IPageLayout ID_TASK_LIST addView IPageLayout ID_PROBLEM_VIEW addView IPageLayout ID_PROP_SHEET addView IPageLayout ID_OUTLINE IPageLayout getEditorArea
private void add Action Sets factory add Action Set I DebugUI Constants LAUNCH ACTION SET factory add Action Set I DebugUI Constants DEBUG ACTION SET factory add Action Set JavaUI ID ACTION SET factory add Action Set JavaUI ID ELEMENT CREATION ACTION SET  addActionSets addActionSet IDebugUIConstants LAUNCH_ACTION_SET addActionSet IDebugUIConstants DEBUG_ACTION_SET addActionSet ID_ACTION_SET addActionSet ID_ELEMENT_CREATION_ACTION_SET
private void add New Wizard Shortcuts factory add New Wizard Shortcut org eclipse pde ui New Project Wizard NON NLS 1 factory add New Wizard Shortcut org eclipse pde ui New Fragment Wizard NON NLS 1 factory add New Wizard Shortcut org eclipse pde ui New Feature Project Wizard NON NLS 1 factory add New Wizard Shortcut org eclipse jdt ui wizards New Package Creation Wizard NON NLS 1 factory add New Wizard Shortcut org eclipse jdt ui wizards New Class Creation Wizard NON NLS 1 factory add New Wizard Shortcut org eclipse jdt ui wizards New Interface Creation Wizard NON NLS 1 factory add New Wizard Shortcut org eclipse jdt ui wizards New Source Folder Creation Wizard NON NLS 1 factory add New Wizard Shortcut org eclipse ui wizards new folder NON NLS 1 factory add New Wizard Shortcut org eclipse ui wizards new file NON NLS 1  addNewWizardShortcuts addNewWizardShortcut NewProjectWizard addNewWizardShortcut NewFragmentWizard addNewWizardShortcut NewFeatureProjectWizard addNewWizardShortcut NewPackageCreationWizard addNewWizardShortcut NewClassCreationWizard addNewWizardShortcut NewInterfaceCreationWizard addNewWizardShortcut NewSourceFolderCreationWizard addNewWizardShortcut addNewWizardShortcut
private void add View Shortcuts factory add Show View Shortcut JavaUI ID PACKAGES factory add Show View Shortcut org eclipse pde runtime Log View NON NLS 1 factory add Show View Shortcut PDE Plugin PLUGINS VIEW ID factory add Show View Shortcut I Page Layout ID RES NAV factory add Show View Shortcut I Page Layout ID PROBLEM VIEW factory add Show View Shortcut I Page Layout ID TASK LIST factory add Show View Shortcut I Page Layout ID OUTLINE  addViewShortcuts addShowViewShortcut ID_PACKAGES addShowViewShortcut LogView addShowViewShortcut PDEPlugin PLUGINS_VIEW_ID addShowViewShortcut IPageLayout ID_RES_NAV addShowViewShortcut IPageLayout ID_PROBLEM_VIEW addShowViewShortcut IPageLayout ID_TASK_LIST addShowViewShortcut IPageLayout ID_OUTLINE

public PDE Plugin I Plugin Descriptor descriptor super descriptor inst this try resource Bundle Resource Bundle get Bundle org eclipse pde internal ui pderesources NON NLS 1 catch Missing Resource Exception x resource Bundle null  PDEPlugin IPluginDescriptor resourceBundle ResourceBundle getBundle MissingResourceException resourceBundle
public static I Workbench Page get Active Page return get Default internal Get Active Page  IWorkbenchPage getActivePage getDefault internalGetActivePage
public static Shell get Active Workbench Shell I Workbench Window window get Active Workbench Window if window null return window get Shell return null  getActiveWorkbenchShell IWorkbenchWindow getActiveWorkbenchWindow getShell
return null public static I Workbench Window get Active Workbench Window return get Default get Workbench get Active Workbench Window  IWorkbenchWindow getActiveWorkbenchWindow getDefault getWorkbench getActiveWorkbenchWindow
return get Default get Workbench get Active Workbench Window public static PDE Plugin get Default return inst  getDefault getWorkbench getActiveWorkbenchWindow PDEPlugin getDefault
public Hashtable get Default Name Counters if counters null counters new Hashtable return counters  getDefaultNameCounters
return counters public static String get Formatted Message String key String args String text get Resource String key return java text Message Format format text args  getFormattedMessage getResourceString MessageFormat
return java text Message Format format text args public static String get Formatted Message String key String arg String text get Resource String key return java text Message Format format text new Object arg  MessageFormat getFormattedMessage getResourceString MessageFormat
return java text Message Format format text new Object arg static I Path get Install Location return new Path get Default get Descriptor get InstallURL get File  MessageFormat IPath getInstallLocation getDefault getDescriptor getInstallURL getFile
return new Path get Default get Descriptor get InstallURL get File public static String get Plugin Id return get Default get Descriptor get Unique Identifier  getDefault getDescriptor getInstallURL getFile getPluginId getDefault getDescriptor getUniqueIdentifier
return get Default get Descriptor get Unique Identifier public Resource Bundle get Resource Bundle return resource Bundle  getDefault getDescriptor getUniqueIdentifier ResourceBundle getResourceBundle resourceBundle
public static String get Resource String String key Resource Bundle bundle PDE Plugin get Default get Resource Bundle if bundle null try String bundle String bundle get String key return bundle String return bundle String catch Missing Resource Exception e default actions is to return key which is OK return key  getResourceString ResourceBundle PDEPlugin getDefault getResourceBundle bundleString getString bundleString bundleString MissingResourceException
return key public static I Workspace get Workspace return Resources Plugin get Workspace  IWorkspace getWorkspace ResourcesPlugin getWorkspace
return Resources Plugin get Workspace private I Workbench Page internal Get Active Page return get Workbench get Active Workbench Window get Active Page  ResourcesPlugin getWorkspace IWorkbenchPage internalGetActivePage getWorkbench getActiveWorkbenchWindow getActivePage
public static void log I Status status Resources Plugin get Plugin get Log log status  IStatus ResourcesPlugin getPlugin getLog
public static void log Error Message String message log new Status I Status ERROR get Plugin Id I Status ERROR message null  logErrorMessage IStatus getPluginId IStatus
final I Status fstatus status display async Exec new Runnable public void run Error Dialog open Error null title null fstatus  IStatus asyncExec ErrorDialog openError
public static void log Exception Throwable e final String title String message if e instanceof Invocation Target Exception e Invocation Target Exception e get Target Exception I Status status null if e instanceof Core Exception status Core Exception e get Status else if message null message e get Message if message null message e to String status new Status I Status ERROR get Plugin Id I Status OK message e Resources Plugin get Plugin get Log log status Display display SWT Util get Standard Display final I Status fstatus status display async Exec new Runnable public void run Error Dialog open Error null title null fstatus  logException InvocationTargetException InvocationTargetException getTargetException IStatus CoreException CoreException getStatus getMessage toString IStatus getPluginId IStatus ResourcesPlugin getPlugin getLog SWTUtil getStandardDisplay IStatus asyncExec ErrorDialog openError
public static void log Exception Throwable e log Exception e null null  logException logException
public static void log Throwable e if e instanceof Invocation Target Exception e Invocation Target Exception e get Target Exception I Status status null if e instanceof Core Exception status Core Exception e get Status else status new Status I Status ERROR get Plugin Id I Status OK e get Message e log status  InvocationTargetException InvocationTargetException getTargetException IStatus CoreException CoreException getStatus IStatus getPluginId IStatus getMessage
public Form Colors get Form Colors Display display if form Colors null form Colors new Form Colors display form Colors mark Shared return form Colors  FormColors getFormColors formColors formColors FormColors formColors markShared formColors
public void startup throws Core Exception super startup I Adapter Manager manager Platform get Adapter Manager Schema Adapter Factory schema Factory new Schema Adapter Factory manager register Adapters schema Factory I Schema Object class manager register Adapters schema Factory I Schema Object Reference class manager register Adapters new Feature Adapter Factory I Feature Object class Plugins View Adapter Factory factory new Plugins View Adapter Factory manager register Adapters factory Model Entry class manager register Adapters factory File Adapter class set eclipse home variable if not sets  CoreException IAdapterManager getAdapterManager SchemaAdapterFactory schemaFactory SchemaAdapterFactory registerAdapters schemaFactory ISchemaObject registerAdapters schemaFactory ISchemaObjectReference registerAdapters FeatureAdapterFactory IFeatureObject PluginsViewAdapterFactory PluginsViewAdapterFactory registerAdapters ModelEntry registerAdapters FileAdapter
see org eclipse core runtime Plugin start org osgi framework Bundle Context public void start Bundle Context context throws Exception super start context this context context  BundleContext BundleContext
public Bundle Context get Bundle Context return this context  BundleContext getBundleContext
public void shutdown throws Core Exception if launch Listener null launch Listener shutdown if form Colors null form Colors dispose form Colors null if label Provider null label Provider dispose label Provider null super shutdown  CoreException launchListener launchListener formColors formColors formColors labelProvider labelProvider labelProvider
public static File get File In Plugin I Path path try URL installURL new URL get Default get Descriptor get InstallURL path to String URL localURL Platform as LocalURL installURL return new File localURL get File catch IO Exception e return null  getFileInPlugin IPath getDefault getDescriptor getInstallURL toString asLocalURL getFile IOException
public PDE Label Provider get Label Provider if label Provider null label Provider new PDE Label Provider return label Provider  PDELabelProvider getLabelProvider labelProvider labelProvider PDELabelProvider labelProvider
public Launch Listener get Launches Listener if launch Listener null launch Listener new Launch Listener return launch Listener  LaunchListener getLaunchesListener launchListener launchListener LaunchListener launchListener
protected void initialize Default Preferences I Preference Store store Color Manager initialize Defaults store store set Default P USE SOURCE PAGE false store set Default PROP SHOW OBJECTS VALUE USE IDS store set Default PROP JAVAC DEBUG INFO true store set Default PROP JAVAC FAIL ON ERROR false store set Default PROP JAVAC VERBOSE true Abstract Decorated Text Editor Preference Constants initialize Default Values store  initializeDefaultPreferences IPreferenceStore ColorManager initializeDefaults setDefault P_USE_SOURCE_PAGE setDefault PROP_SHOW_OBJECTS VALUE_USE_IDS setDefault PROP_JAVAC_DEBUG_INFO setDefault PROP_JAVAC_FAIL_ON_ERROR setDefault PROP_JAVAC_VERBOSE AbstractDecoratedTextEditorPreferenceConstants initializeDefaultValues
public static boolean is Full Name Mode Enabled I Preference Store store get Default get Preference Store return store get String PROP SHOW OBJECTS equals VALUE USE NAMES  isFullNameModeEnabled IPreferenceStore getDefault getPreferenceStore getString PROP_SHOW_OBJECTS VALUE_USE_NAMES

public static final Image Descriptor DESC ARGUMENT TAB create PATH VIEW variable tab gif NON NLS 1 private static Image Descriptor create String prefix String name return Image Descriptor create FromURL make ImageURL prefix name  ImageDescriptor DESC_ARGUMENT_TAB PATH_VIEW variable_tab ImageDescriptor ImageDescriptor createFromURL makeImageURL
return Image Descriptor create FromURL make ImageURL prefix name public static Image get String key if PLUGIN REGISTRY null initialize return PLUGIN REGISTRY get key  ImageDescriptor createFromURL makeImageURL PLUGIN_REGISTRY PLUGIN_REGISTRY
public static Image Descriptor get Image Descriptor From Plugin I Plugin Descriptor plugin Descriptor String subdirectory And Filename URL installURL plugin Descriptor get InstallURL try URL newURL new URL installURL subdirectory And Filename return Image Descriptor create FromURL newURL catch MalformedURL Exception e return null  ImageDescriptor getImageDescriptorFromPlugin IPluginDescriptor pluginDescriptor subdirectoryAndFilename pluginDescriptor getInstallURL subdirectoryAndFilename ImageDescriptor createFromURL MalformedURLException
package private static final void initialize PLUGIN REGISTRY new Image Registry manage IMG FORM WIZ DESC FORM WIZ manage IMG FORM BANNER DESC FORM BANNER manage IMG ATT CLASS OBJ DESC ATT CLASS OBJ manage IMG ATT FILE OBJ DESC ATT FILE OBJ manage IMG ATT IMPL OBJ DESC ATT IMPL OBJ manage IMG ATT REQ OBJ DESC ATT REQ OBJ manage IMG GENERIC XML OBJ DESC GENERIC XML OBJ  PLUGIN_REGISTRY ImageRegistry IMG_FORM_WIZ DESC_FORM_WIZ IMG_FORM_BANNER DESC_FORM_BANNER IMG_ATT_CLASS_OBJ DESC_ATT_CLASS_OBJ IMG_ATT_FILE_OBJ DESC_ATT_FILE_OBJ IMG_ATT_IMPL_OBJ DESC_ATT_IMPL_OBJ IMG_ATT_REQ_OBJ DESC_ATT_REQ_OBJ IMG_GENERIC_XML_OBJ DESC_GENERIC_XML_OBJ
private static URL make ImageURL String prefix String name String path prefix name URL url null try url new URL BASE URL path catch MalformedURL Exception e return null return url  makeImageURL BASE_URL MalformedURLException
public static Image manage String key Image Descriptor desc Image image desc create Image PLUGIN REGISTRY put key image return image  ImageDescriptor createImage PLUGIN_REGISTRY

see org eclipse jface preference I Preference Node add org eclipse jface preference I Preference Node public void add I Preference Node node  IPreferenceNode IPreferenceNode IPreferenceNode
see org eclipse jface preference I Preference Node create Page public void create Page page new Build Options Preference Page  IPreferenceNode createPage createPage BuildOptionsPreferencePage
see org eclipse jface preference I Preference Node dispose Resources public void dispose Resources if page null page dispose page null  IPreferenceNode disposeResources disposeResources
see org eclipse jface preference I Preference Node find Sub Node java lang String public I Preference Node find Sub Node String id return null  IPreferenceNode findSubNode IPreferenceNode findSubNode
see org eclipse jface preference I Preference Node get Id public String get Id return org eclipse pde ui build Options Preference Page NON NLS 1  IPreferenceNode getId getId buildOptionsPreferencePage
see org eclipse jface preference I Preference Node get Label Image public Image get Label Image return null  IPreferenceNode getLabelImage getLabelImage
see org eclipse jface preference I Preference Node get Label Text public String get Label Text return PDE Plugin get Default get Descriptor get Resource String preferences build Options name NON NLS 1  IPreferenceNode getLabelText getLabelText PDEPlugin getDefault getDescriptor getResourceString buildOptions
see org eclipse jface preference I Preference Node get Page public I Preference Page get Page return page  IPreferenceNode getPage IPreferencePage getPage
see org eclipse jface preference I Preference Node get Sub Nodes public I Preference Node get Sub Nodes return new I Preference Node 0  IPreferenceNode getSubNodes IPreferenceNode getSubNodes IPreferenceNode
see org eclipse jface preference I Preference Node remove java lang String public I Preference Node remove String id return null  IPreferenceNode IPreferenceNode
see org eclipse jface preference I Preference Node remove org eclipse jface preference I Preference Node public boolean remove I Preference Node node return false  IPreferenceNode IPreferenceNode IPreferenceNode

public Build Options Preference Page set Description PDE Plugin get Resource String Build Properties Preference Page desc NON NLS 1  BuildOptionsPreferencePage setDescription PDEPlugin getResourceString BuildPropertiesPreferencePage
see Preference Page init public void init I Workbench workbench  PreferencePage IWorkbench
see Preference Page create Contents protected Control create Contents Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width 15 composite set Layout layout f Fail On Error new Button composite SWT CHECK f Fail On Error set Text PDE Plugin get Resource String Build Properties Preference Page fail On Error NON NLS 1 f Fail On Error set Selection store get Boolean PROP JAVAC FAIL ON ERROR Grid Data gd new Grid Data gd horizontal Span 2 f Fail On Error set Layout Data gd f Verbose new Button composite SWT CHECK f Verbose set Text PDE Plugin get Resource String Build Properties Preference Page compiler Verbose NON NLS 1 f Verbose set Selection store get Boolean PROP JAVAC VERBOSE gd new Grid Data gd horizontal Span 2 f Verbose set Layout Data gd f Debug Info new Button composite SWT CHECK f Debug Info set Text PDE Plugin get Resource String Build Properties Preference Page compiler Debug NON NLS 1 f Debug Info set Selection store get Boolean PROP JAVAC DEBUG INFO gd new Grid Data gd horizontal Span 2 f Debug Info set Layout Data gd Dialog apply Dialog Font composite return composite  PreferencePage createContents createContents GridLayout GridLayout numColumns marginWidth setLayout fFailOnError fFailOnError setText PDEPlugin getResourceString BuildPropertiesPreferencePage failOnError fFailOnError setSelection getBoolean PROP_JAVAC_FAIL_ON_ERROR GridData GridData horizontalSpan fFailOnError setLayoutData fVerbose fVerbose setText PDEPlugin getResourceString BuildPropertiesPreferencePage compilerVerbose fVerbose setSelection getBoolean PROP_JAVAC_VERBOSE GridData horizontalSpan fVerbose setLayoutData fDebugInfo fDebugInfo setText PDEPlugin getResourceString BuildPropertiesPreferencePage compilerDebug fDebugInfo setSelection getBoolean PROP_JAVAC_DEBUG_INFO GridData horizontalSpan fDebugInfo setLayoutData applyDialogFont
public boolean perform Ok store set Value PROP JAVAC FAIL ON ERROR f Fail On Error get Selection store set Value PROP JAVAC VERBOSE f Verbose get Selection store set Value PROP JAVAC DEBUG INFO f Debug Info get Selection PDE Plugin get Default save Plugin Preferences return super perform Ok  performOk setValue PROP_JAVAC_FAIL_ON_ERROR fFailOnError getSelection setValue PROP_JAVAC_VERBOSE fVerbose getSelection setValue PROP_JAVAC_DEBUG_INFO fDebugInfo getSelection PDEPlugin getDefault savePluginPreferences performOk
protected void perform Defaults f Fail On Error set Selection store get Default Boolean PROP JAVAC FAIL ON ERROR f Verbose set Selection store get Default Boolean PROP JAVAC VERBOSE f Debug Info set Selection store get Default Boolean PROP JAVAC DEBUG INFO  performDefaults fFailOnError setSelection getDefaultBoolean PROP_JAVAC_FAIL_ON_ERROR fVerbose setSelection getDefaultBoolean PROP_JAVAC_VERBOSE fDebugInfo setSelection getDefaultBoolean PROP_JAVAC_DEBUG_INFO

private Hash Set f Builders new Hash Set public Compilers Preference Page set Description PDE Plugin get Resource String Compilers Preference Page desc NON NLS 1  HashSet fBuilders HashSet CompilersPreferencePage setDescription PDEPlugin getResourceString CompilersPreferencePage
f Flag Controls new Array List Selection Listener listener new Selection Adapter public void widget Selected Selection Event e add Changed Conrol Control e widget  fFlagControls ArrayList SelectionListener SelectionAdapter widgetSelected SelectionEvent addChangedConrol
Modify Listener mlistener new Modify Listener public void modify Text Modify Event e add Changed Conrol Control e widget  ModifyListener ModifyListener modifyText ModifyEvent addChangedConrol
see org eclipse jface preference Preference Page create Contents Composite protected Control create Contents Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout container set Layout layout Tab Folder folder new Tab Folder container SWT NONE Grid Data gd new Grid Data Grid Data FILL BOTH folder set Layout Data gd f Flag Controls new Array List Selection Listener listener new Selection Adapter public void widget Selected Selection Event e add Changed Conrol Control e widget Modify Listener mlistener new Modify Listener public void modify Text Modify Event e add Changed Conrol Control e widget String choices new String PDE Plugin get Resource String Compilers Preference Page error PDE Plugin get Resource String Compilers Preference Page warning PDE Plugin get Resource String Compilers Preference Page ignore NON NLS 1 NON NLS 2 NON NLS 3 f Plugin Page create Page folder PDE Plugin get Resource String Compilers Preference Page plugins Compiler Flags PLUGIN FLAGS choices NON NLS 1 f Schema Page create Page folder PDE Plugin get Resource String Compilers Preference Page schemas Compiler Flags SCHEMA FLAGS choices NON NLS 1 f Feature Page create Page folder PDE Plugin get Resource String Compilers Preference Page features Compiler Flags FEATURE FLAGS choices NON NLS 1 create Page folder PDE Plugin get Resource String Compilers Preference Page sites Compiler Flags SITE FLAGS choices NON NLS 1 for int i 0 i f Flag Controls size i Control control Control f Flag Controls get i if control instanceof Combo Combo control add Selection Listener listener else if control instanceof Button Button control add Selection Listener listener else if control instanceof Text Text control add Modify Listener mlistener Dialog apply Dialog Font parent Workbench Help set Help container I Help Context Ids COMPILERS PREFERENCE PAGE return container  PreferencePage createContents createContents GridLayout GridLayout setLayout TabFolder TabFolder GridData GridData GridData FILL_BOTH setLayoutData fFlagControls ArrayList SelectionListener SelectionAdapter widgetSelected SelectionEvent addChangedConrol ModifyListener ModifyListener modifyText ModifyEvent addChangedConrol PDEPlugin getResourceString CompilersPreferencePage PDEPlugin getResourceString CompilersPreferencePage PDEPlugin getResourceString CompilersPreferencePage fPluginPage createPage PDEPlugin getResourceString CompilersPreferencePage CompilerFlags PLUGIN_FLAGS fSchemaPage createPage PDEPlugin getResourceString CompilersPreferencePage CompilerFlags SCHEMA_FLAGS fFeaturePage createPage PDEPlugin getResourceString CompilersPreferencePage CompilerFlags FEATURE_FLAGS createPage PDEPlugin getResourceString CompilersPreferencePage CompilerFlags SITE_FLAGS fFlagControls fFlagControls addSelectionListener addSelectionListener addModifyListener applyDialogFont WorkbenchHelp setHelp IHelpContextIds COMPILERS_PREFERENCE_PAGE
private void add Changed Conrol Control control String flag Id String control get Data boolean do Add false if control instanceof Combo int new Index Combo control get Selection Index int old Index Compiler Flags get Flag flag Id do Add new Index old Index else if control instanceof Button boolean new Value Button control get Selection boolean old Value Compiler Flags get Boolean flag Id do Add old Value new Value else if control instanceof Text String new Value Text control get Text String old Value Compiler Flags get String flag Id do Add new Value equals old Value if do Add f Changed Controls add control else if f Changed Controls contains control f Changed Controls remove control  addChangedConrol flagId getData doAdd newIndex getSelectionIndex oldIndex CompilerFlags getFlag flagId doAdd newIndex oldIndex newValue getSelection oldValue CompilerFlags getBoolean flagId doAdd oldValue newValue newValue getText oldValue CompilerFlags getString flagId doAdd newValue oldValue doAdd fChangedControls fChangedControls fChangedControls
private Composite create Page Tab Folder folder String name int index String choices Composite page new Composite folder SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 page set Layout layout Tab Item tab new Tab Item folder SWT NONE tab set Text name tab set Control page Label label new Label page SWT NULL String text Key if index Compiler Flags SCHEMA FLAGS text Key Compilers Preference Page altlabel NON NLS 1 else text Key Compilers Preference Page label NON NLS 1 label set Text PDE Plugin get Resource String text Key Grid Data gd new Grid Data gd horizontal Span 2 label set Layout Data gd String flag Ids Compiler Flags get Flags index for int i 0 i flag Ids length i Control control create Flag page flag Ids i choices f Flag Controls add control return page  createPage TabFolder GridLayout GridLayout numColumns setLayout TabItem TabItem setText setControl textKey CompilerFlags SCHEMA_FLAGS textKey CompilersPreferencePage textKey CompilersPreferencePage setText PDEPlugin getResourceString textKey GridData GridData horizontalSpan setLayoutData flagIds CompilerFlags getFlags flagIds createFlag flagIds fFlagControls
private Control create Flag Composite page String flag Id String choices Control control null if Compiler Flags get Flag Type flag Id Compiler Flags MARKER Label label new Label page SWT NULL label set Text PDE Plugin get Resource String flag Id Combo combo new Combo page SWT READ ONLY combo set Items choices combo select Compiler Flags get Flag flag Id control combo else if Compiler Flags get Flag Type flag Id Compiler Flags BOOLEAN Button button new Button page SWT CHECK button set Text PDE Plugin get Resource String flag Id button set Selection Compiler Flags get Boolean flag Id Grid Data gd new Grid Data gd horizontal Span 2 button set Layout Data gd control button else if Compiler Flags get Flag Type flag Id Compiler Flags STRING Label label new Label page SWT NULL label set Text PDE Plugin get Resource String flag Id Text text new Text page SWT SINGLE SWT BORDER text set Text Compiler Flags get String flag Id Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 50 text set Layout Data gd new Label page SWT NULL set Layout Data new Grid Data Grid Data sgd new Grid Data Label slabel new Label page SWT NULL slabel set Text PDE Plugin get Resource String Compilers Preference Page label NON NLS 1 sgd horizontal Span 2 slabel set Layout Data sgd control text control set Data flag Id return control  createFlag flagId CompilerFlags getFlagType flagId CompilerFlags setText PDEPlugin getResourceString flagId READ_ONLY setItems CompilerFlags getFlag flagId CompilerFlags getFlagType flagId CompilerFlags setText PDEPlugin getResourceString flagId setSelection CompilerFlags getBoolean flagId GridData GridData horizontalSpan setLayoutData CompilerFlags getFlagType flagId CompilerFlags setText PDEPlugin getResourceString flagId setText CompilerFlags getString flagId GridData GridData GridData FILL_HORIZONTAL widthHint setLayoutData setLayoutData GridData GridData GridData setText PDEPlugin getResourceString CompilersPreferencePage horizontalSpan setLayoutData setData flagId
see org eclipse jface preference Preference Page perform Defaults protected void perform Defaults f Changed Controls clear for int i 0 i f Flag Controls size i boolean has Change false Control control Control f Flag Controls get i String flag Id String control get Data if control instanceof Combo has Change Combo control get Selection Index Compiler Flags get Default Flag flag Id Combo control select Compiler Flags get Default Flag flag Id else if control instanceof Button has Change Button control get Selection Compiler Flags get Default Boolean flag Id Button control set Selection Compiler Flags get Default Boolean flag Id else if control instanceof Text has Change Text control get Text Compiler Flags get Default String flag Id Text control set Text Compiler Flags get Default String flag Id if has Change f Changed Controls add control  PreferencePage performDefaults performDefaults fChangedControls fFlagControls hasChange fFlagControls flagId getData hasChange getSelectionIndex CompilerFlags getDefaultFlag flagId CompilerFlags getDefaultFlag flagId hasChange getSelection CompilerFlags getDefaultBoolean flagId setSelection CompilerFlags getDefaultBoolean flagId hasChange getText CompilerFlags getDefaultString flagId setText CompilerFlags getDefaultString flagId hasChange fChangedControls
public boolean perform Ok if f Changed Controls size 0 String title PDE Plugin get Resource String Compilers Preference Page rebuild title NON NLS 1 String message PDE Plugin get Resource String Compilers Preference Page rebuild message NON NLS 1 Message Dialog dialog new Message Dialog get Shell title null message Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL 2 int res dialog open if res 2 return false f Builders new Hash Set for Iterator iter f Changed Controls iterator iter has Next Control control Control iter next String flag Id String control get Data if control instanceof Combo int index Combo control get Selection Index Compiler Flags set Flag flag Id index else if control instanceof Button boolean value Button control get Selection Compiler Flags set Boolean flag Id value else if control instanceof Text String value Text control get Text Compiler Flags set String flag Id value if control get Parent equals f Plugin Page f Builders add PDE MANIFEST BUILDER ID else if control get Parent equals f Schema Page f Builders add PDE SCHEMA BUILDER ID else if control get Parent equals f Feature Page f Builders add PDE FEATURE BUILDER ID Compiler Flags save if res 0 do Full Build f Changed Controls clear return super perform Ok  performOk fChangedControls PDEPlugin getResourceString CompilersPreferencePage PDEPlugin getResourceString CompilersPreferencePage MessageDialog MessageDialog getShell MessageDialog IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL fBuilders HashSet fChangedControls hasNext flagId getData getSelectionIndex CompilerFlags setFlag flagId getSelection CompilerFlags setBoolean flagId getText CompilerFlags setString flagId getParent fPluginPage fBuilders MANIFEST_BUILDER_ID getParent fSchemaPage fBuilders SCHEMA_BUILDER_ID getParent fFeaturePage fBuilders FEATURE_BUILDER_ID CompilerFlags doFullBuild fChangedControls performOk
Initializes this preference page using the passed desktop param desktop the current desktop public void init I Workbench workbench  IWorkbench
protected I Status run I Progress Monitor monitor try I Project projects PDE get Workspace get Root get Projects monitor begin Task projects length 2 NON NLS 1 for int i 0 i projects length i I Project project projects i if project is Open continue if project has Nature PDE PLUGIN NATURE if f Builders contains PDE MANIFEST BUILDER ID project build Incremental Project Builder FULL BUILD PDE MANIFEST BUILDER ID null new Sub Progress Monitor monitor 1 else monitor worked 1 if f Builders contains PDE SCHEMA BUILDER ID project build Incremental Project Builder FULL BUILD PDE SCHEMA BUILDER ID null new Sub Progress Monitor monitor 1 else monitor worked 1 else if project has Nature PDE FEATURE NATURE if f Builders contains PDE FEATURE BUILDER ID project build Incremental Project Builder FULL BUILD PDE FEATURE BUILDER ID null new Sub Progress Monitor monitor 2 else monitor worked 2 catch Core Exception e return e get Status catch Operation Canceled Exception e return Status CANCEL STATUS finally monitor done return Status OK STATUS  IStatus IProgressMonitor IProject getWorkspace getRoot getProjects beginTask IProject isOpen hasNature PLUGIN_NATURE fBuilders MANIFEST_BUILDER_ID IncrementalProjectBuilder FULL_BUILD MANIFEST_BUILDER_ID SubProgressMonitor fBuilders SCHEMA_BUILDER_ID IncrementalProjectBuilder FULL_BUILD SCHEMA_BUILDER_ID SubProgressMonitor hasNature FEATURE_NATURE fBuilders FEATURE_BUILDER_ID IncrementalProjectBuilder FULL_BUILD FEATURE_BUILDER_ID SubProgressMonitor CoreException getStatus OperationCanceledException CANCEL_STATUS OK_STATUS
see org eclipse core runtime jobs Job belongs To java lang Object public boolean belongs To Object family return Resources Plugin FAMILY MANUAL BUILD family  belongsTo belongsTo ResourcesPlugin FAMILY_MANUAL_BUILD
private void do Full Build Job build Job new Job PDE Plugin get Resource String Compilers Preference Page building NON NLS 1 non Javadoc see org eclipse core runtime jobs Job run org eclipse core runtime I Progress Monitor protected I Status run I Progress Monitor monitor try I Project projects PDE get Workspace get Root get Projects monitor begin Task projects length 2 NON NLS 1 for int i 0 i projects length i I Project project projects i if project is Open continue if project has Nature PDE PLUGIN NATURE if f Builders contains PDE MANIFEST BUILDER ID project build Incremental Project Builder FULL BUILD PDE MANIFEST BUILDER ID null new Sub Progress Monitor monitor 1 else monitor worked 1 if f Builders contains PDE SCHEMA BUILDER ID project build Incremental Project Builder FULL BUILD PDE SCHEMA BUILDER ID null new Sub Progress Monitor monitor 1 else monitor worked 1 else if project has Nature PDE FEATURE NATURE if f Builders contains PDE FEATURE BUILDER ID project build Incremental Project Builder FULL BUILD PDE FEATURE BUILDER ID null new Sub Progress Monitor monitor 2 else monitor worked 2 catch Core Exception e return e get Status catch Operation Canceled Exception e return Status CANCEL STATUS finally monitor done return Status OK STATUS non Javadoc see org eclipse core runtime jobs Job belongs To java lang Object public boolean belongs To Object family return Resources Plugin FAMILY MANUAL BUILD family build Job set Rule Resources Plugin get Workspace get Rule Factory build Rule build Job set User true build Job schedule  doFullBuild buildJob PDEPlugin getResourceString CompilersPreferencePage IProgressMonitor IStatus IProgressMonitor IProject getWorkspace getRoot getProjects beginTask IProject isOpen hasNature PLUGIN_NATURE fBuilders MANIFEST_BUILDER_ID IncrementalProjectBuilder FULL_BUILD MANIFEST_BUILDER_ID SubProgressMonitor fBuilders SCHEMA_BUILDER_ID IncrementalProjectBuilder FULL_BUILD SCHEMA_BUILDER_ID SubProgressMonitor hasNature FEATURE_NATURE fBuilders FEATURE_BUILDER_ID IncrementalProjectBuilder FULL_BUILD FEATURE_BUILDER_ID SubProgressMonitor CoreException getStatus OperationCanceledException CANCEL_STATUS OK_STATUS belongsTo belongsTo ResourcesPlugin FAMILY_MANUAL_BUILD buildJob setRule ResourcesPlugin getWorkspace getRuleFactory buildRule buildJob setUser buildJob

public Editor Preference Page super GRID set Preference Store PDE Plugin get Default get Preference Store set Description PDE Plugin get Resource String Editor Preference Page desc NON NLS 1  EditorPreferencePage setPreferenceStore PDEPlugin getDefault getPreferenceStore setDescription PDEPlugin getResourceString EditorPreferencePage
protected void create Field Editors add Field new Boolean Field Editor P USE SOURCE PAGE PDE Plugin get Resource String Editor Preference Page use Source Page NON NLS 1 get Field Editor Parent add Label 2 NON NLS 1 add Label PDE Plugin get Resource String Editor Preference Page color Settings 2 NON NLS 1 add Source Color Fields  createFieldEditors addField BooleanFieldEditor P_USE_SOURCE_PAGE PDEPlugin getResourceString EditorPreferencePage useSourcePage getFieldEditorParent addLabel addLabel PDEPlugin getResourceString EditorPreferencePage colorSettings addSourceColorFields
public void create Control Composite parent super create Control parent Dialog apply Dialog Font get Control Workbench Help set Help get Control I Help Context Ids EDITOR PREFERENCE PAGE  createControl createControl applyDialogFont getControl WorkbenchHelp setHelp getControl IHelpContextIds EDITOR_PREFERENCE_PAGE
public static boolean get Use Source Page return PDE Plugin get Default get Preference Store get Boolean P USE SOURCE PAGE  getUseSourcePage PDEPlugin getDefault getPreferenceStore getBoolean P_USE_SOURCE_PAGE
private void add Label String text int span Label label new Label get Field Editor Parent SWT NULL Grid Data gd new Grid Data gd horizontal Span span label set Layout Data gd label set Text text  addLabel getFieldEditorParent GridData GridData horizontalSpan setLayoutData setText
private void add Source Color Fields add Field new Color Field Editor IPDE Color Constants P DEFAULT PDE Plugin get Resource String Editor Preference Page text NON NLS 1 get Field Editor Parent add Field new Color Field Editor IPDE Color Constants P PROC INSTR PDE Plugin get Resource String Editor Preference Page proc NON NLS 1 get Field Editor Parent add Field new Color Field Editor IPDE Color Constants P STRING PDE Plugin get Resource String Editor Preference Page string NON NLS 1 get Field Editor Parent add Field new Color Field Editor IPDE Color Constants P TAG PDE Plugin get Resource String Editor Preference Page tag NON NLS 1 get Field Editor Parent add Field new Color Field Editor IPDE Color Constants P XML COMMENT PDE Plugin get Resource String Editor Preference Page comment NON NLS 1 get Field Editor Parent  addSourceColorFields addField ColorFieldEditor IPDEColorConstants P_DEFAULT PDEPlugin getResourceString EditorPreferencePage getFieldEditorParent addField ColorFieldEditor IPDEColorConstants P_PROC_INSTR PDEPlugin getResourceString EditorPreferencePage getFieldEditorParent addField ColorFieldEditor IPDEColorConstants P_STRING PDEPlugin getResourceString EditorPreferencePage getFieldEditorParent addField ColorFieldEditor IPDEColorConstants P_TAG PDEPlugin getResourceString EditorPreferencePage getFieldEditorParent addField ColorFieldEditor IPDEColorConstants P_XML_COMMENT PDEPlugin getResourceString EditorPreferencePage getFieldEditorParent
public boolean perform Ok PDE Plugin get Default save Plugin Preferences return super perform Ok  performOk PDEPlugin getDefault savePluginPreferences performOk
Initializes this preference page using the passed desktop param desktop the current desktop public void init I Workbench workbench  IWorkbench

private URL plugin Paths public Reload Operation URL plugin Paths this plugin Paths plugin Paths  pluginPaths ReloadOperation pluginPaths pluginPaths pluginPaths
public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception f Current State new PDE State f Models Target Platform Registry Loader load Models plugin Paths true f Current State monitor  IProgressMonitor InvocationTargetException InterruptedException fCurrentState PDEState fModels TargetPlatformRegistryLoader loadModels pluginPaths fCurrentState
extends Default Content Provider implements I Structured Content Provider public Object get Elements Object parent return get All Models  DefaultContentProvider IStructuredContentProvider getElements getAllModels
class Table Part extends Wizard Checkbox Table Part public Table Part String button Labels super null button Labels  TablePart WizardCheckboxTablePart TablePart buttonLabels buttonLabels
protected void button Selected Button button int index switch index case 0 handle Reload break case 5 select Not In Workspace break default super button Selected button index  buttonSelected handleReload selectNotInWorkspace buttonSelected
protected Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit Structured Viewer viewer super create Structured Viewer parent style toolkit viewer set Sorter List Util PLUGIN SORTER return viewer  StructuredViewer createStructuredViewer FormToolkit StructuredViewer createStructuredViewer setSorter ListUtil PLUGIN_SORTER
protected void element Checked Object element boolean checked I Plugin Model Base model I Plugin Model Base element if changed contains model model is Enabled checked changed remove model else if model is Enabled checked changed add model super element Checked element checked  elementChecked IPluginModelBase IPluginModelBase isEnabled isEnabled elementChecked
protected void handle Select All boolean select super handle Select All select I Plugin Model Base all Models get All Models for int i 0 i all Models length i I Plugin Model Base model all Models i if model is Enabled select changed add model else if changed contains model model is Enabled select changed remove model  handleSelectAll handleSelectAll IPluginModelBase allModels getAllModels allModels IPluginModelBase allModels isEnabled isEnabled
public External Plugins Block Target Platform Preference Page page this page page String button Labels PDE Plugin get Resource String KEY RELOAD null PDE Plugin get Resource String Wizard Checkbox Table Part KEY SELECT ALL PDE Plugin get Resource String Wizard Checkbox Table Part KEY DESELECT ALL null PDE Plugin get Resource String KEY WORKSPACE table Part new Table Part button Labels table Part set Select All Index 2 table Part set Deselect All Index 3 PDE Plugin get Default get Label Provider connect this  ExternalPluginsBlock TargetPlatformPreferencePage buttonLabels PDEPlugin getResourceString KEY_RELOAD PDEPlugin getResourceString WizardCheckboxTablePart KEY_SELECT_ALL PDEPlugin getResourceString WizardCheckboxTablePart KEY_DESELECT_ALL PDEPlugin getResourceString KEY_WORKSPACE tablePart TablePart buttonLabels tablePart setSelectAllIndex tablePart setDeselectAllIndex PDEPlugin getDefault getLabelProvider
void compute Delta int type 0 I Model added Array null I Model removed Array null I Model changed Array null if reloaded type I Model Provider Event MODELS REMOVED I Model Provider Event MODELS ADDED removed Array initial Models added Array get All Models else if changed size 0 type I Model Provider Event MODELS CHANGED changed Array I Model changed to Array new I Model changed size changed clear if type 0 External Model Manager registry PDE Core get Default get External Model Manager Model Provider Event event new Model Provider Event registry type added Array removed Array changed Array registry fire Model Provider Event event  computeDelta IModel addedArray IModel removedArray IModel changedArray IModelProviderEvent MODELS_REMOVED IModelProviderEvent MODELS_ADDED removedArray initialModels addedArray getAllModels IModelProviderEvent MODELS_CHANGED changedArray IModel toArray IModel ExternalModelManager PDECore getDefault getExternalModelManager ModelProviderEvent ModelProviderEvent addedArray removedArray changedArray fireModelProviderEvent
public Control create Contents Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 15 layout margin Width 0 container set Layout layout Label label new Label container SWT NONE label set Text PDE Plugin get Resource String External Plugins Block title NON NLS 1 Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 label set Layout Data gd table Part create Control container plugin List Viewer table Part get Table Viewer plugin List Viewer set Content Provider new Plugin Content Provider plugin List Viewer set Label Provider PDE Plugin get Default get Label Provider gd Grid Data table Part get Control get Layout Data gd height Hint 100 gd width Hint 100 return container  createContents GridLayout GridLayout numColumns marginHeight marginWidth setLayout setText PDEPlugin getResourceString ExternalPluginsBlock GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan setLayoutData tablePart createControl pluginListViewer tablePart getTableViewer pluginListViewer setContentProvider PluginContentProvider pluginListViewer setLabelProvider PDEPlugin getDefault getLabelProvider GridData tablePart getControl getLayoutData heightHint widthHint
public void dispose PDE Plugin get Default get Label Provider disconnect this  PDEPlugin getDefault getLabelProvider
private I Plugin Model Base get All Models if f Models null initial Models PDE Core get Default get External Model Manager get All Models return initial Models return f Models  IPluginModelBase getAllModels fModels initialModels PDECore getDefault getExternalModelManager getAllModels initialModels fModels
protected void handle Reload String platform Path page get Platform Path if platform Path null platform Path length 0 URL plugin Paths Plugin Path Finder get Plugin Paths platform Path Reload Operation op new Reload Operation plugin Paths try PlatformUI get Workbench get Progress Service run true false op catch Invocation Target Exception e catch Interrupted Exception e plugin List Viewer set Input PDE Core get Default get External Model Manager changed clear handle Select All true reloaded true page reset Needs Reload  handleReload platformPath getPlatformPath platformPath platformPath pluginPaths PluginPathFinder getPluginPaths platformPath ReloadOperation ReloadOperation pluginPaths getWorkbench getProgressService InvocationTargetException InterruptedException pluginListViewer setInput PDECore getDefault getExternalModelManager handleSelectAll resetNeedsReload
public void initialize String platform Path page get Platform Path if platform Path null platform Path length 0 return plugin List Viewer set Input PDE Core get Default get External Model Manager I Plugin Model Base all Models get All Models Vector selection new Vector for int i 0 i all Models length i I Plugin Model Base model all Models i if model is Enabled selection add model table Part set Selection selection to Array  platformPath getPlatformPath platformPath platformPath pluginListViewer setInput PDECore getDefault getExternalModelManager IPluginModelBase allModels getAllModels allModels IPluginModelBase allModels isEnabled tablePart setSelection toArray
Busy Indicator show While page get Shell get Display new Runnable public void run save Preferences if reloaded Eclipse Home Initializer reset Eclipse Home Variable update Models compute Delta  BusyIndicator showWhile getShell getDisplay savePreferences EclipseHomeInitializer resetEclipseHomeVariable updateModels computeDelta
public void save Busy Indicator show While page get Shell get Display new Runnable public void run save Preferences if reloaded Eclipse Home Initializer reset Eclipse Home Variable update Models compute Delta  BusyIndicator showWhile getShell getDisplay savePreferences EclipseHomeInitializer resetEclipseHomeVariable updateModels computeDelta
private void save Preferences Preferences preferences PDE Core get Default get Plugin Preferences I Path new Path new Path page get Platform Path I Path default Path new Path External Model Manager compute Default Platform Path String mode are Paths Equal new Path default Path I Core Constants VALUE USE THIS I Core Constants VALUE USE OTHER preferences set Value I Core Constants TARGET MODE mode preferences set Value I Core Constants PLATFORM PATH page get Platform Path String locations page get Platform Locations for int i 0 i locations length i 5 i preferences set Value I Core Constants SAVED PLATFORM i locations i PDE Core get Default save Plugin Preferences  savePreferences PDECore getDefault getPluginPreferences IPath newPath getPlatformPath IPath defaultPath ExternalModelManager computeDefaultPlatformPath arePathsEqual newPath defaultPath ICoreConstants VALUE_USE_THIS ICoreConstants VALUE_USE_OTHER setValue ICoreConstants TARGET_MODE setValue ICoreConstants PLATFORM_PATH getPlatformPath getPlatformLocations setValue ICoreConstants SAVED_PLATFORM PDECore getDefault savePluginPreferences
private void update Models Iterator iter changed iterator while iter has Next I Plugin Model Base model I Plugin Model Base iter next model set Enabled table Part get Table Viewer get Checked model if reloaded PDE Core get Default get External Model Manager reset f Current State f Models  updateModels hasNext IPluginModelBase IPluginModelBase setEnabled tablePart getTableViewer getChecked PDECore getDefault getExternalModelManager fCurrentState fModels
public static boolean are Paths Equal I Path path1 I Path path2 String device path1 get Device if device null path1 path1 set Device device to Upper Case device path2 get Device if device null path2 path2 set Device device to Upper Case return path1 equals path2  arePathsEqual IPath IPath getDevice setDevice toUpperCase getDevice setDevice toUpperCase
private void select Not In Workspace Workspace Model Manager wm PDE Core get Default get Workspace Model Manager I Plugin Model Base ws Models wm get All Models I Plugin Model Base ex Models get All Models Vector selected new Vector for int i 0 i ex Models length i I Plugin Model Base ex Model ex Models i boolean in Workspace false for int j 0 j ws Models length j I Plugin Model Base ws Model ws Models j String ext Id ex Model get Plugin Base get Id String ws Id ws Model get Plugin Base get Id if ext Id null ws Id null ext Id equals ws Id in Workspace true break if in Workspace selected add ex Model if ex Model is Enabled in Workspace changed add ex Model else if changed contains ex Model changed remove ex Model table Part set Selection selected to Array  selectNotInWorkspace WorkspaceModelManager PDECore getDefault getWorkspaceModelManager IPluginModelBase wsModels getAllModels IPluginModelBase exModels getAllModels exModels IPluginModelBase exModel exModels inWorkspace wsModels IPluginModelBase wsModel wsModels extId exModel getPluginBase getId wsId wsModel getPluginBase getId extId wsId extId wsId inWorkspace inWorkspace exModel exModel isEnabled inWorkspace exModel exModel exModel tablePart setSelection toArray
public void handle Select All boolean selected table Part select All selected  handleSelectAll tablePart selectAll

private Button use Name public Main Preference Page set Preference Store PDE Plugin get Default get Preference Store set Description PDE Plugin get Resource String KEY DESCRIPTION  useName MainPreferencePage setPreferenceStore PDEPlugin getDefault getPreferenceStore setDescription PDEPlugin getResourceString KEY_DESCRIPTION
protected Control create Contents Composite parent I Preference Store store PDE Plugin get Default get Preference Store Composite composite new Composite parent SWT NONE composite set Layout new Grid Layout Group group new Group composite SWT NONE group set Layout Data new Grid Data Grid Data FILL HORIZONTAL group set Text PDE Plugin get Resource String KEY SHOW OBJECTS group set Layout new Grid Layout useID new Button group SWT RADIO useID set Text PDE Plugin get Resource String KEY USE IDS use Name new Button group SWT RADIO use Name set Text PDE Plugin get Resource String KEY USE FULL NAMES if store get String PROP SHOW OBJECTS equals VALUE USE IDS useID set Selection true else use Name set Selection true return composite  createContents IPreferenceStore PDEPlugin getDefault getPreferenceStore setLayout GridLayout setLayoutData GridData GridData FILL_HORIZONTAL setText PDEPlugin getResourceString KEY_SHOW_OBJECTS setLayout GridLayout setText PDEPlugin getResourceString KEY_USE_IDS useName useName setText PDEPlugin getResourceString KEY_USE_FULL_NAMES getString PROP_SHOW_OBJECTS VALUE_USE_IDS setSelection useName setSelection
public void create Control Composite parent super create Control parent Dialog apply Dialog Font get Control Workbench Help set Help get Control I Help Context Ids MAIN PREFERENCE PAGE  createControl createControl applyDialogFont getControl WorkbenchHelp setHelp getControl IHelpContextIds MAIN_PREFERENCE_PAGE
public boolean perform Ok I Preference Store store PDE Plugin get Default get Preference Store if useID get Selection store set Value PROP SHOW OBJECTS VALUE USE IDS else store set Value PROP SHOW OBJECTS VALUE USE NAMES PDE Plugin get Default save Plugin Preferences return super perform Ok  performOk IPreferenceStore PDEPlugin getDefault getPreferenceStore getSelection setValue PROP_SHOW_OBJECTS VALUE_USE_IDS setValue PROP_SHOW_OBJECTS VALUE_USE_NAMES PDEPlugin getDefault savePluginPreferences performOk
protected void perform Defaults I Preference Store store PDE Plugin get Default get Preference Store if store get Default String PROP SHOW OBJECTS equals VALUE USE IDS useID set Selection true use Name set Selection false else useID set Selection false use Name set Selection true  performDefaults IPreferenceStore PDEPlugin getDefault getPreferenceStore getDefaultString PROP_SHOW_OBJECTS VALUE_USE_IDS setSelection useName setSelection setSelection useName setSelection
Initializes this preference page using the passed desktop param desktop the current desktop public void init I Workbench workbench  IWorkbench

see org eclipse jface preference I Preference Node add org eclipse jface preference I Preference Node public void add I Preference Node node  IPreferenceNode IPreferenceNode IPreferenceNode
see org eclipse jface preference I Preference Node create Page public void create Page page new Source Preference Page  IPreferenceNode createPage createPage SourcePreferencePage
see org eclipse jface preference I Preference Node dispose Resources public void dispose Resources if page null page dispose page null  IPreferenceNode disposeResources disposeResources
see org eclipse jface preference I Preference Node find Sub Node java lang String public I Preference Node find Sub Node String id return null  IPreferenceNode findSubNode IPreferenceNode findSubNode
see org eclipse jface preference I Preference Node get Id public String get Id return org eclipse pde ui Source Preference Page NON NLS 1  IPreferenceNode getId getId SourcePreferencePage
see org eclipse jface preference I Preference Node get Label Image public Image get Label Image return null  IPreferenceNode getLabelImage getLabelImage
see org eclipse jface preference I Preference Node get Label Text public String get Label Text return PDE Plugin get Default get Descriptor get Resource String preferences source name NON NLS 1  IPreferenceNode getLabelText getLabelText PDEPlugin getDefault getDescriptor getResourceString
see org eclipse jface preference I Preference Node get Page public I Preference Page get Page return page  IPreferenceNode getPage IPreferencePage getPage
see org eclipse jface preference I Preference Node get Sub Nodes public I Preference Node get Sub Nodes return new I Preference Node 0  IPreferenceNode getSubNodes IPreferenceNode getSubNodes IPreferenceNode
see org eclipse jface preference I Preference Node remove java lang String public I Preference Node remove String id return null  IPreferenceNode IPreferenceNode
see org eclipse jface preference I Preference Node remove org eclipse jface preference I Preference Node public boolean remove I Preference Node node return false  IPreferenceNode IPreferenceNode IPreferenceNode

extends Default Content Provider implements I Structured Content Provider public Object get Elements Object input return get Locations  DefaultContentProvider IStructuredContentProvider getElements getLocations
class Source Label Provider extends Label Provider public String get Text Object obj Source Location location Source Location obj return location get Path toOS String  SourceLabelProvider LabelProvider getText SourceLocation SourceLocation getPath toOSString
public Image get Image Object obj Source Location location Source Location obj return location is User Defined user Image extension Image  getImage SourceLocation SourceLocation isUserDefined userImage extensionImage
class Location Part extends Checkbox Table Part public Location Part String button Labels super button Labels  LocationPart CheckboxTablePart LocationPart buttonLabels buttonLabels
protected void button Selected Button button int index switch index case 0 handle Add break case 1 handle Edit break case 2 handle Delete break case 4 select All true break case 5 select All false break  buttonSelected handleAdd handleEdit handleDelete selectAll selectAll
protected Button create Button Composite parent String label int index Form Toolkit toolkit Button button super create Button parent label index toolkit SWT Util set Button Dimension Hint button return button  createButton FormToolkit createButton SWTUtil setButtonDimensionHint
protected void create Main Label Composite parent int span Form Toolkit toolkit Label label new Label parent SWT NULL label set Text PDE Plugin get Resource String KEY LABEL Grid Data gd new Grid Data Grid Data FILL gd horizontal Span span label set Layout Data gd  createMainLabel FormToolkit setText PDEPlugin getResourceString KEY_LABEL GridData GridData GridData horizontalSpan setLayoutData
protected void selection Changed I Structured Selection selection boolean enabled false if selection is Empty Source Location loc Source Location selection get First Element enabled loc is User Defined table Part set Button Enabled 1 enabled table Part set Button Enabled 2 enabled  selectionChanged IStructuredSelection isEmpty SourceLocation SourceLocation getFirstElement isUserDefined tablePart setButtonEnabled tablePart setButtonEnabled
see org eclipse pde internal ui parts Checkbox Table Part element Checked Object boolean protected void element Checked Object element boolean checked Source Location element set Enabled checked  CheckboxTablePart elementChecked elementChecked SourceLocation setEnabled
public Source Preference Page table Part new Location Part new String PDE Plugin get Resource String KEY ADD PDE Plugin get Resource String Source Preference Page edit NON NLS 1 PDE Plugin get Resource String KEY DELETE null PDE Plugin get Resource String KEY SELECT ALL PDE Plugin get Resource String KEY DESELECT ALL extension Image PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJ FOLDER Image Descriptor user Desc new Overlay Icon PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG OBJ FOLDER new Image Descriptor PDE Plugin Images DESC DOC CO user Image user Desc create Image set Description PDE Plugin get Resource String KEY DESC preferences PDE Core get Default get Plugin Preferences initialize Extension Locations initialize Userlocations  SourcePreferencePage tablePart LocationPart PDEPlugin getResourceString KEY_ADD PDEPlugin getResourceString SourcePreferencePage PDEPlugin getResourceString KEY_DELETE PDEPlugin getResourceString KEY_SELECT_ALL PDEPlugin getResourceString KEY_DESELECT_ALL extensionImage getWorkbench getSharedImages getImage ISharedImages IMG_OBJ_FOLDER ImageDescriptor userDesc OverlayIcon getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_OBJ_FOLDER ImageDescriptor PDEPluginImages DESC_DOC_CO userImage userDesc createImage setDescription PDEPlugin getResourceString KEY_DESC PDECore getDefault getPluginPreferences initializeExtensionLocations initializeUserlocations
private void initialize Extension Locations extension Locations PDE Core get Default get Source Location Manager get Extension Locations  initializeExtensionLocations extensionLocations PDECore getDefault getSourceLocationManager getExtensionLocations
private void initialize Userlocations user Locations PDE Core get Default get Source Location Manager get User Location Array  initializeUserlocations userLocations PDECore getDefault getSourceLocationManager getUserLocationArray
private String encode Source Locations Object locations String Buffer buf new String Buffer for int i 0 i locations length i Source Location loc Source Location locations i if i 0 buf append File path Separator Char buf append encode Source Location loc return buf to String  encodeSourceLocations StringBuffer StringBuffer SourceLocation SourceLocation pathSeparatorChar encodeSourceLocation toString
private String encode Source Location Source Location location return location get Path toOS String location is Enabled t f NON NLS 1 NON NLS 2 NON NLS 3  encodeSourceLocation SourceLocation getPath toOSString isEnabled
public void dispose super dispose user Image dispose  userImage
see I Workbench Preference Page init I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
see I Preference Page perform Ok public boolean perform Ok preferences set Value I Core Constants P EXT LOCATIONS encode Source Locations extension Locations preferences set Value I Core Constants P SOURCE LOCATIONS encode Source Locations user Locations to Array PDE Core get Default save Plugin Preferences return super perform Ok  IPreferencePage performOk performOk setValue ICoreConstants P_EXT_LOCATIONS encodeSourceLocations extensionLocations setValue ICoreConstants P_SOURCE_LOCATIONS encodeSourceLocations userLocations toArray PDECore getDefault savePluginPreferences performOk
public void perform Defaults for int i 0 i extension Locations length i Source Location location Source Location extension Locations i location set Enabled true table Viewer set Checked location true for int i 0 i user Locations size i Source Location location Source Location user Locations get i location set Enabled false table Viewer set Checked location false table Viewer refresh super perform Defaults  performDefaults extensionLocations SourceLocation SourceLocation extensionLocations setEnabled tableViewer setChecked userLocations SourceLocation SourceLocation userLocations setEnabled tableViewer setChecked tableViewer performDefaults
private Object get Locations Object merged new Object extension Locations length user Locations size System arraycopy extension Locations 0 merged 0 extension Locations length System arraycopy user Locations to Array 0 merged extension Locations length user Locations size return merged  getLocations extensionLocations userLocations extensionLocations extensionLocations userLocations toArray extensionLocations userLocations
private void select All boolean selected for int i 0 i extension Locations length i Source Location extension Locations i set Enabled selected for int i 0 i user Locations size i Source Location user Locations get i set Enabled selected table Viewer set All Checked selected  selectAll extensionLocations SourceLocation extensionLocations setEnabled userLocations SourceLocation userLocations setEnabled tableViewer setAllChecked
private void handle Add String path get Directory Dialog null open if path null Source Location location new Source Location new Path path true user Locations add location table Viewer add location table Viewer set Checked location location is Enabled  handleAdd getDirectoryDialog SourceLocation SourceLocation userLocations tableViewer tableViewer setChecked isEnabled
private void handle Edit I Structured Selection ssel I Structured Selection table Viewer get Selection Source Location loc Source Location ssel get First Element String path get Directory Dialog loc get Path toOS String open if path null loc set Path new Path path table Viewer refresh  handleEdit IStructuredSelection IStructuredSelection tableViewer getSelection SourceLocation SourceLocation getFirstElement getDirectoryDialog getPath toOSString setPath tableViewer
private Directory Dialog get Directory Dialog String filter Path if dialog null dialog new Directory Dialog get Shell dialog set Message PDE Plugin get Resource String Source Preference Page dialog Message NON NLS 1 if filter Path null dialog set Filter Path filter Path return dialog  DirectoryDialog getDirectoryDialog filterPath DirectoryDialog getShell setMessage PDEPlugin getResourceString SourcePreferencePage dialogMessage filterPath setFilterPath filterPath
private void handle Delete I Structured Selection selection I Structured Selection table Viewer get Selection Source Location location Source Location selection get First Element user Locations remove location table Viewer remove location  handleDelete IStructuredSelection IStructuredSelection tableViewer getSelection SourceLocation SourceLocation getFirstElement userLocations tableViewer
see I Dialog Page create Control Composite public Control create Contents Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 container set Layout layout table Part set Minimum Size 150 200 table Part create Control container SWT BORDER 2 null table Viewer table Part get Table Viewer table Viewer set Content Provider new Source Provider table Viewer set Label Provider new Source Label Provider table Viewer set Input this initialize States table Part set Button Enabled 1 false table Part set Button Enabled 2 false Dialog apply Dialog Font parent Workbench Help set Help parent I Help Context Ids SOURCE PREFERENCE PAGE return container  IDialogPage createControl createContents GridLayout GridLayout numColumns setLayout tablePart setMinimumSize tablePart createControl tableViewer tablePart getTableViewer tableViewer setContentProvider SourceProvider tableViewer setLabelProvider SourceLabelProvider tableViewer setInput initializeStates tablePart setButtonEnabled tablePart setButtonEnabled applyDialogFont WorkbenchHelp setHelp IHelpContextIds SOURCE_PREFERENCE_PAGE
private void initialize States for int i 0 i extension Locations length i Source Location loc Source Location extension Locations i table Viewer set Checked loc loc is Enabled for int i 0 i user Locations size i Source Location loc Source Location user Locations get i table Viewer set Checked loc loc is Enabled  initializeStates extensionLocations SourceLocation SourceLocation extensionLocations tableViewer setChecked isEnabled userLocations SourceLocation SourceLocation userLocations tableViewer setChecked isEnabled

see org eclipse jface preference I Preference Node add org eclipse jface preference I Preference Node public void add I Preference Node node  IPreferenceNode IPreferenceNode IPreferenceNode
see org eclipse jface preference I Preference Node create Page public void create Page page new Target Environment Preference Page  IPreferenceNode createPage createPage TargetEnvironmentPreferencePage
see org eclipse jface preference I Preference Node dispose Resources public void dispose Resources if page null page dispose page null  IPreferenceNode disposeResources disposeResources
see org eclipse jface preference I Preference Node find Sub Node java lang String public I Preference Node find Sub Node String id return null  IPreferenceNode findSubNode IPreferenceNode findSubNode
see org eclipse jface preference I Preference Node get Id public String get Id return org eclipse pde ui Target Environment Preference Page NON NLS 1  IPreferenceNode getId getId TargetEnvironmentPreferencePage
see org eclipse jface preference I Preference Node get Label Image public Image get Label Image return null  IPreferenceNode getLabelImage getLabelImage
see org eclipse jface preference I Preference Node get Label Text public String get Label Text return PDE Plugin get Default get Descriptor get Resource String preferences target Env name NON NLS 1  IPreferenceNode getLabelText getLabelText PDEPlugin getDefault getDescriptor getResourceString targetEnv
see org eclipse jface preference I Preference Node get Page public I Preference Page get Page return page  IPreferenceNode getPage IPreferencePage getPage
see org eclipse jface preference I Preference Node get Sub Nodes public I Preference Node get Sub Nodes return new I Preference Node 0  IPreferenceNode getSubNodes IPreferenceNode getSubNodes IPreferenceNode
see org eclipse jface preference I Preference Node remove java lang String public I Preference Node remove String id return null  IPreferenceNode IPreferenceNode
see org eclipse jface preference I Preference Node remove org eclipse jface preference I Preference Node public boolean remove I Preference Node node return false  IPreferenceNode IPreferenceNode IPreferenceNode

private Preferences preferences public Target Environment Preference Page set Description PDE Plugin get Resource String KEY DESCRIPTION preferences PDE Core get Default get Plugin Preferences  TargetEnvironmentPreferencePage setDescription PDEPlugin getResourceString KEY_DESCRIPTION PDECore getDefault getPluginPreferences
see org eclipse jface preference Preference Page create Contents Composite protected Control create Contents Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 container set Layout layout Label label new Label container SWT NULL label set Text PDE Plugin get Resource String KEY OS os new Combo container SWT SINGLE SWT BORDER SWT READ ONLY os set Layout Data new Grid Data Grid Data FILL HORIZONTAL os set Items Boot Loader knownOS Values label new Label container SWT NULL label set Text PDE Plugin get Resource String KEY WS ws new Combo container SWT SINGLE SWT BORDER SWT READ ONLY ws set Layout Data new Grid Data Grid Data FILL HORIZONTAL ws set Items Boot Loader knownWS Values label new Label container SWT NULL label set Text PDE Plugin get Resource String KEY NL nl new Combo container SWT SINGLE SWT BORDER SWT READ ONLY nl set Layout Data new Grid Data Grid Data FILL HORIZONTAL nl set Items get Locales label new Label container SWT NULL label set Text PDE Plugin get Resource String KEY ARCH arch new Combo container SWT SINGLE SWT BORDER SWT READ ONLY arch set Layout Data new Grid Data Grid Data FILL HORIZONTAL arch set Items Boot Loader knownOS Arch Values Dialog apply Dialog Font container os set Text preferences get String OS ws set Text preferences get String WS nl set Text expand Locale Name preferences get String NL arch set Text preferences get String ARCH Workbench Help set Help container I Help Context Ids TARGET ENVIRONMENT PREFERENCE PAGE return container  PreferencePage createContents createContents GridLayout GridLayout numColumns setLayout setText PDEPlugin getResourceString KEY_OS READ_ONLY setLayoutData GridData GridData FILL_HORIZONTAL setItems BootLoader knownOSValues setText PDEPlugin getResourceString KEY_WS READ_ONLY setLayoutData GridData GridData FILL_HORIZONTAL setItems BootLoader knownWSValues setText PDEPlugin getResourceString KEY_NL READ_ONLY setLayoutData GridData GridData FILL_HORIZONTAL setItems getLocales setText PDEPlugin getResourceString KEY_ARCH READ_ONLY setLayoutData GridData GridData FILL_HORIZONTAL setItems BootLoader knownOSArchValues applyDialogFont setText getString setText getString setText expandLocaleName getString setText getString WorkbenchHelp setHelp IHelpContextIds TARGET_ENVIRONMENT_PREFERENCE_PAGE
see org eclipse jface preference Preference Page perform Defaults protected void perform Defaults os set Text preferences get Default String OS ws set Text preferences get Default String WS nl set Text expand Locale Name preferences get Default String NL arch set Text preferences get Default String ARCH  PreferencePage performDefaults performDefaults setText getDefaultString setText getDefaultString setText expandLocaleName getDefaultString setText getDefaultString
public boolean perform Ok preferences set Value OS os get Text trim preferences set Value WS ws get Text trim String locale nl get Text trim int dash locale index Of NON NLS 1 if dash 1 locale locale substring 0 dash locale locale trim preferences set Value NL locale preferences set Value ARCH arch get Text trim PDE Plugin get Default save Plugin Preferences return super perform Ok  performOk setValue getText setValue getText getText indexOf setValue setValue getText PDEPlugin getDefault savePluginPreferences performOk
Initializes this preference page using the passed desktop param desktop the current desktop public void init I Workbench workbench  IWorkbench
private String expand Locale Name String name String language NON NLS 1 String country NON NLS 1 String variant NON NLS 1 String Tokenizer tokenizer new String Tokenizer name   NON NLS 1 if tokenizer has More Tokens language tokenizer next Token if tokenizer has More Tokens country tokenizer next Token if tokenizer has More Tokens variant tokenizer next Token Locale locale new Locale language country variant return locale to String locale get Display Name NON NLS 1  expandLocaleName StringTokenizer StringTokenizer _ hasMoreTokens nextToken hasMoreTokens nextToken hasMoreTokens nextToken toString getDisplayName
private static String get Locales Locale locales Locale get Available Locales String result new String locales length for int i 0 i locales length i Locale locale locales i result i locale to String locale get Display Name NON NLS 1 return result  getLocales getAvailableLocales toString getDisplayName

see org eclipse jface preference I Preference Node add org eclipse jface preference I Preference Node public void add I Preference Node node  IPreferenceNode IPreferenceNode IPreferenceNode
see org eclipse jface preference I Preference Node create Page public void create Page page new Target Platform Preference Page  IPreferenceNode createPage createPage TargetPlatformPreferencePage
see org eclipse jface preference I Preference Node dispose Resources public void dispose Resources if page null page dispose page null  IPreferenceNode disposeResources disposeResources
see org eclipse jface preference I Preference Node find Sub Node java lang String public I Preference Node find Sub Node String id return null  IPreferenceNode findSubNode IPreferenceNode findSubNode
see org eclipse jface preference I Preference Node get Id public String get Id return org eclipse pde ui Target Platform Preference Page NON NLS 1  IPreferenceNode getId getId TargetPlatformPreferencePage
see org eclipse jface preference I Preference Node get Label Image public Image get Label Image return null  IPreferenceNode getLabelImage getLabelImage
see org eclipse jface preference I Preference Node get Label Text public String get Label Text return PDE Plugin get Default get Descriptor get Resource String preferences target name NON NLS 1  IPreferenceNode getLabelText getLabelText PDEPlugin getDefault getDescriptor getResourceString
see org eclipse jface preference I Preference Node get Page public I Preference Page get Page return page  IPreferenceNode getPage IPreferencePage getPage
see org eclipse jface preference I Preference Node get Sub Nodes public I Preference Node get Sub Nodes return new I Preference Node 0  IPreferenceNode getSubNodes IPreferenceNode getSubNodes IPreferenceNode
see org eclipse jface preference I Preference Node remove java lang String public I Preference Node remove String id return null  IPreferenceNode IPreferenceNode
see org eclipse jface preference I Preference Node remove org eclipse jface preference I Preference Node public boolean remove I Preference Node node return false  IPreferenceNode IPreferenceNode IPreferenceNode

Main Preference Page constructor comment public Target Platform Preference Page set Description PDE Plugin get Resource String Preferences Target Platform Page Description NON NLS 1 f Preferences PDE Core get Default get Plugin Preferences f Plugins Block new External Plugins Block this  MainPreferencePage TargetPlatformPreferencePage setDescription PDEPlugin getResourceString TargetPlatformPage fPreferences PDECore getDefault getPluginPreferences fPluginsBlock ExternalPluginsBlock
public void dispose f Plugins Block dispose super dispose  fPluginsBlock
f Original Text f Home Text get Text f Home Text add Modify Listener new Modify Listener public void modify Text Modify Event e f Needs Reload true  fOriginalText fHomeText getText fHomeText addModifyListener ModifyListener modifyText ModifyEvent fNeedsReload
f Home Text add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Plugins Block handle Reload f Needs Reload false  fHomeText addSelectionListener SelectionAdapter widgetSelected SelectionEvent fPluginsBlock handleReload fNeedsReload
SWT Util set Button Dimension Hint f Browse Button f Browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Browse  SWTUtil setButtonDimensionHint fBrowseButton fBrowseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleBrowse
public Control create Contents Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 3 layout margin Height layout margin Width 0 container set Layout layout f Home Label new Label container SWT NULL f Home Label set Text PDE Plugin get Resource String Preferences Target Platform Page Platform Home NON NLS 1 f Home Text new Combo container SWT NONE f Home Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL Array List locations new Array List for int i 0 i 5 i String value f Preferences get String I Core Constants SAVED PLATFORM i if value equals NON NLS 1 break locations add value String home Location f Preferences get String I Core Constants PLATFORM PATH if locations contains home Location locations add 0 home Location f Home Text set Items String locations to Array new String locations size f Home Text set Text home Location f Original Text f Home Text get Text f Home Text add Modify Listener new Modify Listener public void modify Text Modify Event e f Needs Reload true f Home Text add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Plugins Block handle Reload f Needs Reload false f Browse Button new Button container SWT PUSH f Browse Button set Text PDE Plugin get Resource String Preferences Target Platform Page Platform Home Button NON NLS 1 f Browse Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END SWT Util set Button Dimension Hint f Browse Button f Browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Browse Control block f Plugins Block create Contents container Grid Data gd new Grid Data Grid Data FILL VERTICAL Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 3 block set Layout Data gd f Plugins Block initialize Dialog apply Dialog Font container Workbench Help set Help container I Help Context Ids TARGET PLATFORM PREFERENCE PAGE return container  createContents GridLayout GridLayout numColumns marginHeight marginWidth setLayout fHomeLabel fHomeLabel setText PDEPlugin getResourceString TargetPlatformPage PlatformHome fHomeText fHomeText setLayoutData GridData GridData FILL_HORIZONTAL ArrayList ArrayList fPreferences getString ICoreConstants SAVED_PLATFORM homeLocation fPreferences getString ICoreConstants PLATFORM_PATH homeLocation homeLocation fHomeText setItems toArray fHomeText setText homeLocation fOriginalText fHomeText getText fHomeText addModifyListener ModifyListener modifyText ModifyEvent fNeedsReload fHomeText addSelectionListener SelectionAdapter widgetSelected SelectionEvent fPluginsBlock handleReload fNeedsReload fBrowseButton fBrowseButton setText PDEPlugin getResourceString TargetPlatformPage PlatformHome fBrowseButton setLayoutData GridData GridData HORIZONTAL_ALIGN_END SWTUtil setButtonDimensionHint fBrowseButton fBrowseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleBrowse fPluginsBlock createContents GridData GridData GridData FILL_VERTICAL GridData HORIZONTAL_ALIGN_FILL horizontalSpan setLayoutData fPluginsBlock applyDialogFont WorkbenchHelp setHelp IHelpContextIds TARGET_PLATFORM_PREFERENCE_PAGE
String get Platform Path return f Home Text get Text  getPlatformPath fHomeText getText
private void handle Browse Directory Dialog dialog new Directory Dialog get Shell if f Home Text get Text length 0 dialog set Filter Path f Home Text get Text String new Path dialog open if new Path null External Plugins Block are Paths Equal new Path f Home Text get Text new Path new Path if f Home Text index Of new Path 1 f Home Text add new Path 0 f Home Text set Text new Path f Plugins Block handle Reload f Needs Reload false  handleBrowse DirectoryDialog DirectoryDialog getShell fHomeText getText setFilterPath fHomeText getText newPath newPath ExternalPluginsBlock arePathsEqual fHomeText getText newPath fHomeText indexOf newPath fHomeText newPath fHomeText setText newPath fPluginsBlock handleReload fNeedsReload
public void init I Workbench workbench  IWorkbench
public void perform Defaults f Home Text set Text External Model Manager compute Default Platform Path f Plugins Block handle Reload super perform Defaults  performDefaults fHomeText setText ExternalModelManager computeDefaultPlatformPath fPluginsBlock handleReload performDefaults
public boolean perform Ok if f Needs Reload External Plugins Block are Paths Equal new Path f Original Text new Path f Home Text get Text Message Dialog dialog new Message Dialog get Shell PDE Plugin get Resource String Preferences Target Platform Page title NON NLS 1 null PDE Plugin get Resource String Preferences Target Platform Page question NON NLS 1 Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL 1 if dialog open 1 return false f Plugins Block handle Reload f Plugins Block save return super perform Ok  performOk fNeedsReload ExternalPluginsBlock arePathsEqual fOriginalText fHomeText getText MessageDialog MessageDialog getShell PDEPlugin getResourceString TargetPlatformPage PDEPlugin getResourceString TargetPlatformPage MessageDialog IDialogConstants YES_LABEL IDialogConstants NO_LABEL fPluginsBlock handleReload fPluginsBlock performOk
public String get Platform Locations return f Home Text get Items  getPlatformLocations fHomeText getItems
public void reset Needs Reload f Needs Reload false String location f Home Text get Text if f Home Text index Of location 1 f Home Text add location 0  resetNeedsReload fNeedsReload fHomeText getText fHomeText indexOf fHomeText

class Content Provider extends Default Table Provider public Object get Elements Object input return get Output Folders  ContentProvider DefaultTableProvider getElements getOutputFolders
see org eclipse jface viewers Label Provider get Image java lang Object public Image get Image Object element return f Image  LabelProvider getImage getImage fImage
private String get Output Folders I Project project I Project get Element Array List list new Array List try if project has Nature Java Core NATURE ID I Java Project j Project Java Core create project list add j Project get Output Location to String I Classpath Entry entries j Project get Raw Classpath for int i 0 i entries length i I Classpath Entry entry entries i if entry get Entry Kind I Classpath Entry CPE SOURCE entry get Content Kind I Package Fragment Root K SOURCE I Path path entry get Output Location if path null list add path to String catch Java Model Exception e catch Core Exception e return String list to Array new String list size  getOutputFolders IProject IProject getElement ArrayList ArrayList hasNature JavaCore NATURE_ID IJavaProject jProject JavaCore jProject getOutputLocation toString IClasspathEntry jProject getRawClasspath IClasspathEntry getEntryKind IClasspathEntry CPE_SOURCE getContentKind IPackageFragmentRoot K_SOURCE IPath getOutputLocation toString JavaModelException CoreException toArray
public Self Hosting Property Page f Image PDE Plugin Images DESC OUTPUT FOLDER OBJ create Image  SelfHostingPropertyPage fImage PDEPluginImages DESC_OUTPUT_FOLDER_OBJ createImage
see org eclipse jface dialogs I Dialog Page dispose public void dispose if f Image null f Image dispose  IDialogPage fImage fImage
see Preference Page create Contents Composite protected Control create Contents Composite parent Composite composite new Composite parent SWT NONE composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL BOTH Label label new Label composite SWT WRAP label set Text PDE Plugin get Resource String Self Hosting Property Page label NON NLS 1 Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 300 label set Layout Data gd new Label composite SWT NONE label new Label composite SWT WRAP label set Text PDE Plugin get Resource String Self Hosting Property Page viewer Label NON NLS 1 f Viewer Checkbox Table Viewer new Check List composite SWT BORDER f Viewer set Content Provider new Content Provider f Viewer set Label Provider new Folder Label Provider f Viewer set Input get Element f Viewer set Sorter new Viewer Sorter f Viewer get Control set Layout Data new Grid Data Grid Data FILL BOTH initialize Dialog apply Dialog Font composite return composite  PreferencePage createContents createContents setLayout GridLayout setLayoutData GridData GridData FILL_BOTH setText PDEPlugin getResourceString SelfHostingPropertyPage GridData GridData GridData FILL_HORIZONTAL widthHint setLayoutData setText PDEPlugin getResourceString SelfHostingPropertyPage viewerLabel fViewer CheckboxTableViewer newCheckList fViewer setContentProvider ContentProvider fViewer setLabelProvider FolderLabelProvider fViewer setInput getElement fViewer setSorter ViewerSorter fViewer getControl setLayoutData GridData GridData FILL_BOTH applyDialogFont
private void initialize f Viewer set All Checked true Preferences pref get Preferences I Project get Element if pref null String bin Excludes pref get PDE Core SELFHOSTING BIN EXLCUDES NON NLS 1 String Tokenizer tokenizer new String Tokenizer bin Excludes NON NLS 1 while tokenizer has More Tokens String token tokenizer next Token trim f Viewer set Checked token false  fViewer setAllChecked getPreferences IProject getElement binExcludes PDECore SELFHOSTING_BIN_EXLCUDES StringTokenizer StringTokenizer binExcludes hasMoreTokens nextToken fViewer setChecked
private Preferences get Preferences I Project project return new Project Scope project get Node PDE Core PLUGIN ID  getPreferences IProject ProjectScope getNode PDECore PLUGIN_ID
see org eclipse jface preference Preference Page perform Defaults protected void perform Defaults f Viewer set All Checked true  PreferencePage performDefaults performDefaults fViewer setAllChecked
public boolean perform Ok Preferences pref get Preferences I Project get Element String Buffer buffer new String Buffer for int i 0 i f Viewer get Table get Item Count i Object object f Viewer get Element At i if f Viewer get Checked object if buffer length 0 buffer append NON NLS 1 buffer append object to String if pref null if buffer length 0 pref put PDE Core SELFHOSTING BIN EXLCUDES buffer to String else pref remove PDE Core SELFHOSTING BIN EXLCUDES try pref flush catch Backing Store Exception e e print Stack Trace return super perform Ok  performOk getPreferences IProject getElement StringBuffer StringBuffer fViewer getTable getItemCount fViewer getElementAt fViewer getChecked toString PDECore SELFHOSTING_BIN_EXLCUDES toString PDECore SELFHOSTING_BIN_EXLCUDES BackingStoreException printStackTrace performOk

Dependency Extent Search Operation op public Dependency Extent Action I Plugin Import object op new Dependency Extent Search Operation object set Text PDE Plugin get Resource String KEY COMPUTE  DependencyExtentSearchOperation DependencyExtentAction IPluginImport DependencyExtentSearchOperation setText PDEPlugin getResourceString KEY_COMPUTE
public void run try SearchUI activate Search Result View PlatformUI get Workbench get Progress Service busy Cursor While op catch Exception e  activateSearchResultView getWorkbench getProgressService busyCursorWhile

public Image get Image Object element if element instanceof I Search Result View Entry I Search Result View Entry entry I Search Result View Entry element element entry get Group By Key if element instanceof I Plugin Extension Point return PDE Plugin get Default get Label Provider get Image I Plugin Extension Point element return super get Image element  getImage ISearchResultViewEntry ISearchResultViewEntry ISearchResultViewEntry getGroupByKey IPluginExtensionPoint PDEPlugin getDefault getLabelProvider getImage IPluginExtensionPoint getImage
public String get Text Object element if element instanceof I Search Result View Entry I Search Result View Entry entry I Search Result View Entry element element entry get Group By Key if element instanceof I Plugin Extension Point return I Plugin Extension Point element get Plugin Model get Plugin Base get Id NON NLS 1 I Plugin Extension Point element get Id else if element instanceof I Java Element I Java Element java Element I Java Element element String text super get Text java Element NON NLS 1 java Element get Ancestor I Java Element PACKAGE FRAGMENT get Element Name if java Element instanceof I Type I Java Element ancestor java Element get Ancestor I Java Element TYPE if ancestor null ancestor java Element get Ancestor I Java Element CLASS FILE if ancestor null ancestor java Element get Ancestor I Java Element COMPILATION UNIT if ancestor null text ancestor get Element Name NON NLS 1 return text return super get Text element  getText ISearchResultViewEntry ISearchResultViewEntry ISearchResultViewEntry getGroupByKey IPluginExtensionPoint IPluginExtensionPoint getPluginModel getPluginBase getId IPluginExtensionPoint getId IJavaElement IJavaElement javaElement IJavaElement getText javaElement javaElement getAncestor IJavaElement PACKAGE_FRAGMENT getElementName javaElement IType IJavaElement javaElement getAncestor IJavaElement javaElement getAncestor IJavaElement CLASS_FILE javaElement getAncestor IJavaElement COMPILATION_UNIT getElementName getText

public Search Result Collector I Progress Monitor monitor this monitor monitor  SearchResultCollector IProgressMonitor
public void accept I Resource resource int start int end I Java Element enclosing Element int accuracy throws Core Exception if accuracy I Java Search Constants EXACT MATCH result add enclosing Element get Ancestor I Java Element PACKAGE FRAGMENT  IResource IJavaElement enclosingElement CoreException IJavaSearchConstants EXACT_MATCH enclosingElement getAncestor IJavaElement PACKAGE_FRAGMENT
public void about To Start  aboutToStart
public void done 
public void done public I Progress Monitor get Progress Monitor return monitor  IProgressMonitor getProgressMonitor
public I Java Element get Result return I Java Element result to Array new I Java Element result size  IJavaElement getResult IJavaElement toArray IJavaElement
public Dependency Extent Search Operation I Plugin Import object this object object parent Project object get Model get Underlying Resource get Project  DependencyExtentSearchOperation IPluginImport parentProject getModel getUnderlyingResource getProject
public void run I Progress Monitor monitor result Collector new Dependency Extent Search Result Collector this monitor try Hash Set set new Hash Set Plugin Java Search Util collect All Prerequisites PDE Core get Default find Plugin object get Id set models I Plugin Base set to Array new I Plugin Base set size if parent Project has Nature Java Core NATURE ID package Fragments Plugin Java Search Util collect Package Fragments models parent Project monitor set Task Name PDE Plugin get Resource String KEY SEARCHING monitor begin Task package Fragments length 1 NON NLS 1 result Collector search Started find Extension Points monitor if package Fragments length 0 do Java Search monitor catch Core Exception e PDE Plugin log e get Status finally result Collector done  IProgressMonitor resultCollector DependencyExtentSearchResultCollector HashSet HashSet PluginJavaSearchUtil collectAllPrerequisites PDECore getDefault findPlugin getId IPluginBase toArray IPluginBase parentProject hasNature JavaCore NATURE_ID packageFragments PluginJavaSearchUtil collectPackageFragments parentProject setTaskName PDEPlugin getResourceString KEY_SEARCHING beginTask packageFragments resultCollector searchStarted findExtensionPoints packageFragments doJavaSearch CoreException PDEPlugin getStatus resultCollector
private void find Extension Points I Progress Monitor monitor Hash Set ids new Hash Set I Plugin Extension extensions object get Plugin Base get Extensions for int i 0 i extensions length i if ids add extensions i get Point I Plugin Extension Point point get Extension Point extensions i get Point if point null result Collector accept point monitor worked 1  findExtensionPoints IProgressMonitor HashSet HashSet IPluginExtension getPluginBase getExtensions getPoint IPluginExtensionPoint getExtensionPoint getPoint resultCollector
private I Plugin Extension Point get Extension Point String target Id for int i 0 i models length i I Plugin Extension Point ext Points models i get Extension Points for int j 0 j ext Points length j if ext Points j get Full Id equals target Id return ext Points j return null  IPluginExtensionPoint getExtensionPoint targetId IPluginExtensionPoint extPoints getExtensionPoints extPoints extPoints getFullId targetId extPoints
private void do Java Search I Progress Monitor monitor throws Java Model Exception Search Engine search Engine new Search Engine I Java Search Scope scope get Search Scope for int i 0 i package Fragments length i I Package Fragment package Fragment package Fragments i if package Fragment has Subpackages Search Result Collector collector new Search Result Collector monitor search Engine search PDE Plugin get Workspace Search Engine create Search Pattern package Fragment get Element Name NON NLS 1 I Java Search Constants TYPE I Java Search Constants REFERENCES true scope collector I Java Element enclosing Elements collector get Result if enclosing Elements length 0 search For Types package Fragment search Engine Search Engine create Java Search Scope enclosing Elements monitor else search For Types package Fragment search Engine scope monitor monitor worked 1  doJavaSearch IProgressMonitor JavaModelException SearchEngine searchEngine SearchEngine IJavaSearchScope getSearchScope packageFragments IPackageFragment packageFragment packageFragments packageFragment hasSubpackages SearchResultCollector SearchResultCollector searchEngine PDEPlugin getWorkspace SearchEngine createSearchPattern packageFragment getElementName IJavaSearchConstants IJavaSearchConstants IJavaElement enclosingElements getResult enclosingElements searchForTypes packageFragment searchEngine SearchEngine createJavaSearchScope enclosingElements searchForTypes packageFragment searchEngine
private void search For Types I Package Fragment fragment Search Engine search Engine I Java Search Scope scope I Progress Monitor monitor throws Java Model Exception I Java Element children fragment get Children for int i 0 i children length i I Java Element child children i I Type types new I Type 0 if child instanceof I Class File types new I Type I Class File child get Type else if child instanceof I Compilation Unit types I Compilation Unit child get All Types for int j 0 j types length j Search Result Collector collector new Search Result Collector monitor search Engine search PDE Plugin get Workspace Search Engine create Search Pattern types j I Java Search Constants REFERENCES scope collector if collector get Result length 0 result Collector accept types j  searchForTypes IPackageFragment SearchEngine searchEngine IJavaSearchScope IProgressMonitor JavaModelException IJavaElement getChildren IJavaElement IType IType IClassFile IType IClassFile getType ICompilationUnit ICompilationUnit getAllTypes SearchResultCollector SearchResultCollector searchEngine PDEPlugin getWorkspace SearchEngine createSearchPattern IJavaSearchConstants getResult resultCollector
private I Java Search Scope get Search Scope throws Java Model Exception I Package Fragment Root roots Java Core create parent Project get Package Fragment Roots Array List filtered Roots new Array List for int i 0 i roots length i if roots i get Resource null roots i get Resource get Project equals parent Project filtered Roots add roots i return Search Engine create Java Search Scope I Java Element filtered Roots to Array new I Java Element filtered Roots size  IJavaSearchScope getSearchScope JavaModelException IPackageFragmentRoot JavaCore parentProject getPackageFragmentRoots ArrayList filteredRoots ArrayList getResource getResource getProject parentProject filteredRoots SearchEngine createJavaSearchScope IJavaElement filteredRoots toArray IJavaElement filteredRoots
public String get Plural Label return object get Id 0 PDE Plugin get Resource String KEY DEPENDENCIES NON NLS 1  getPluralLabel getId PDEPlugin getResourceString KEY_DEPENDENCIES
public String get Singular Label return object get Id 1 PDE Plugin get Resource String KEY DEPENDENCY NON NLS 1  getSingularLabel getId PDEPlugin getResourceString KEY_DEPENDENCY
public I Project get Project return parent Project  IProject getProject parentProject

class Group By Key Computer implements I Group By Key Computer public Object compute Group By Key I Marker marker return marker  GroupByKeyComputer IGroupByKeyComputer computeGroupByKey IMarker
class Search Action Group Factory implements I Action Group Factory public Action Group create Action Group I Search Result View search View return new Search Action Group  SearchActionGroupFactory IActionGroupFactory ActionGroup createActionGroup ISearchResultView searchView SearchActionGroup
class Search Action Group extends Plugin Search Action Group public void fill Context Menu I Menu Manager menu super fill Context Menu menu Action Context context get Context I Structured Selection selection I Structured Selection context get Selection if selection size 1 I Search Result View Entry entry I Search Result View Entry selection get First Element menu add new References In Plugin Action entry  SearchActionGroup PluginSearchActionGroup fillContextMenu IMenuManager fillContextMenu ActionContext getContext IStructuredSelection IStructuredSelection getSelection ISearchResultViewEntry ISearchResultViewEntry getFirstElement ReferencesInPluginAction
public Dependency Extent Search Result Collector Dependency Extent Search Operation op I Progress Monitor monitor this operation op this monitor monitor  DependencyExtentSearchResultCollector DependencyExtentSearchOperation IProgressMonitor
public void accept Object match try I Resource resource operation get Project I Marker marker resource create Marker SearchUI SEARCH MARKER if match instanceof I Plugin Extension Point if match instanceof I Source Object marker set Attribute I Marker LINE NUMBER I Source Object match get Start Line if I Plugin Extension Point match get Model get Underlying Resource null annotate External Marker marker I Plugin Extension Point match result View add Match null match resource marker num Matches 1 String text num Matches 1 PDE Plugin get Resource String KEY DEPENDENCIES PDE Plugin get Resource String KEY DEPENDENCY monitor set Task Name PDE Plugin get Resource String KEY SEARCHING NON NLS 1 num Matches NON NLS 1 text NON NLS 1 PDE Plugin get Resource String KEY FOUND catch Core Exception e  IResource getProject IMarker createMarker SEARCH_MARKER IPluginExtensionPoint ISourceObject setAttribute IMarker LINE_NUMBER ISourceObject getStartLine IPluginExtensionPoint getModel getUnderlyingResource annotateExternalMarker IPluginExtensionPoint resultView addMatch numMatches numMatches PDEPlugin getResourceString KEY_DEPENDENCIES PDEPlugin getResourceString KEY_DEPENDENCY setTaskName PDEPlugin getResourceString KEY_SEARCHING numMatches PDEPlugin getResourceString KEY_FOUND CoreException
public void done if result View null result View search Finished  resultView resultView searchFinished
private void annotate External Marker I Marker marker I Plugin Object match throws Core Exception I Plugin Model Base model match get Plugin Model String path model get Install Location String manifest model is Fragment Model fragment xml NON NLS 1 plugin xml NON NLS 1 String file Name path File separator manifest marker set Attribute IPDEUI Constants MARKER SYSTEM FILE PATH file Name  annotateExternalMarker IMarker IPluginObject CoreException IPluginModelBase getPluginModel getInstallLocation isFragmentModel fileName setAttribute IPDEUIConstants MARKER_SYSTEM_FILE_PATH fileName
public void search Started result View SearchUI get Search Result View result View search Started new Search Action Group Factory operation get Singular Label operation get Plural Label null PAGE ID new Dependency Extent Label Provider new Search Go To Action new Group By Key Computer operation  searchStarted resultView getSearchResultView resultView searchStarted SearchActionGroupFactory getSingularLabel getPluralLabel PAGE_ID DependencyExtentLabelProvider SearchGoToAction GroupByKeyComputer

public class Dependency Extent Viewer Sorter extends Viewer Sorter The constructor public Dependency Extent Viewer Sorter  DependencyExtentViewerSorter ViewerSorter DependencyExtentViewerSorter
public int category Object element try if element instanceof I Search Result View Entry Object object I Search Result View Entry element get Group By Key if object instanceof I Type if I Type object is Class return 1 return 0 catch Java Model Exception e return 2  ISearchResultViewEntry ISearchResultViewEntry getGroupByKey IType IType isClass JavaModelException

private Object object public Find Declarations Action Object object this object object set Text PDE Plugin get Resource String KEY DECLARATION  FindDeclarationsAction setText PDEPlugin getResourceString KEY_DECLARATION
public void run Plugin Search Input input new Plugin Search Input if object instanceof I Plugin Import input set Search String I Plugin Import object get Id input set Search Element Plugin Search Input ELEMENT PLUGIN else if object instanceof I Plugin Extension input set Search String I Plugin Extension object get Point input set Search Element Plugin Search Input ELEMENT EXTENSION POINT else if object instanceof I Plugin input set Search String I Plugin object get Id input set Search Element Plugin Search Input ELEMENT PLUGIN else if object instanceof I Fragment input set Search String I Fragment object get Id input set Search Element Plugin Search Input ELEMENT FRAGMENT input set Search Limit Plugin Search Input LIMIT DECLARATIONS input set Search Scope new Plugin Search Scope try SearchUI activate Search Result View Plugin SearchUI Operation op new Plugin SearchUI Operation input new Plugin Search Result Collector PlatformUI get Workbench get Progress Service busy Cursor While op catch Invocation Target Exception e catch Interrupted Exception e  PluginSearchInput PluginSearchInput IPluginImport setSearchString IPluginImport getId setSearchElement PluginSearchInput ELEMENT_PLUGIN IPluginExtension setSearchString IPluginExtension getPoint setSearchElement PluginSearchInput ELEMENT_EXTENSION_POINT IPlugin setSearchString IPlugin getId setSearchElement PluginSearchInput ELEMENT_PLUGIN IFragment setSearchString IFragment getId setSearchElement PluginSearchInput ELEMENT_FRAGMENT setSearchLimit PluginSearchInput LIMIT_DECLARATIONS setSearchScope PluginSearchScope activateSearchResultView PluginSearchUIOperation PluginSearchUIOperation PluginSearchResultCollector getWorkbench getProgressService busyCursorWhile InvocationTargetException InterruptedException

private String search String null see org eclipse ui I Object Action Delegate set Active Part org eclipse jface action I Action org eclipse ui I Workbench Part public void set Active Part I Action action I Workbench Part target Part  searchString IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action if search String null return Plugin Search Input input new Plugin Search Input input set Search Element Plugin Search Input ELEMENT PLUGIN input set Search Limit Plugin Search Input LIMIT REFERENCES input set Search String search String input set Search Scope new Plugin Search Scope try SearchUI activate Search Result View Plugin SearchUI Operation op new Plugin SearchUI Operation input new Plugin Search Result Collector PlatformUI get Workbench get Progress Service busy Cursor While op catch Invocation Target Exception e catch Interrupted Exception e  IActionDelegate IAction IAction searchString PluginSearchInput PluginSearchInput setSearchElement PluginSearchInput ELEMENT_PLUGIN setSearchLimit PluginSearchInput LIMIT_REFERENCES setSearchString searchString setSearchScope PluginSearchScope activateSearchResultView PluginSearchUIOperation PluginSearchUIOperation PluginSearchResultCollector getWorkbench getProgressService busyCursorWhile InvocationTargetException InterruptedException
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection search String null if selection instanceof I Structured Selection I Structured Selection s Selection I Structured Selection selection if s Selection size 1 I File file I File s Selection get First Element Model Entry entry PDE Core get Default get Model Manager find Entry file get Project if entry null I Plugin Model Base model entry get Active Model if model null search String model get Plugin Base get Id  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection searchString IStructuredSelection IStructuredSelection sSelection IStructuredSelection sSelection IFile IFile sSelection getFirstElement ModelEntry PDECore getDefault getModelManager findEntry getProject IPluginModelBase getActiveModel searchString getPluginBase getId

private Object object public Find References Action Object object this object object set Text PDE Plugin get Resource String KEY REFERENCES  FindReferencesAction setText PDEPlugin getResourceString KEY_REFERENCES
public void run Plugin Search Input input new Plugin Search Input if object instanceof I Plugin input set Search Element Plugin Search Input ELEMENT PLUGIN input set Search String I Plugin object get Id else if object instanceof I Plugin Extension Point input set Search Element Plugin Search Input ELEMENT EXTENSION POINT I Plugin Model Base model I Plugin Extension Point object get Plugin Model String id model get Plugin Base get Id if id null id trim length 0 id NON NLS 1 input set Search String id NON NLS 1 I Plugin Extension Point object get Id else if object instanceof I Plugin Import input set Search Element Plugin Search Input ELEMENT PLUGIN input set Search String I Plugin Import object get Id input set Search Limit Plugin Search Input LIMIT REFERENCES input set Search Scope new Plugin Search Scope try SearchUI activate Search Result View Plugin SearchUI Operation op new Plugin SearchUI Operation input new Plugin Search Result Collector PlatformUI get Workbench get Progress Service busy Cursor While op catch Invocation Target Exception e catch Interrupted Exception e  PluginSearchInput PluginSearchInput IPlugin setSearchElement PluginSearchInput ELEMENT_PLUGIN setSearchString IPlugin getId IPluginExtensionPoint setSearchElement PluginSearchInput ELEMENT_EXTENSION_POINT IPluginModelBase IPluginExtensionPoint getPluginModel getPluginBase getId setSearchString IPluginExtensionPoint getId IPluginImport setSearchElement PluginSearchInput ELEMENT_PLUGIN setSearchString IPluginImport getId setSearchLimit PluginSearchInput LIMIT_REFERENCES setSearchScope PluginSearchScope activateSearchResultView PluginSearchUIOperation PluginSearchUIOperation PluginSearchResultCollector getWorkbench getProgressService busyCursorWhile InvocationTargetException InterruptedException

class Search Action Group Factory implements I Action Group Factory public Action Group create Action Group I Search Result View search View return new Search Action Group  SearchActionGroupFactory IActionGroupFactory ActionGroup createActionGroup ISearchResultView searchView SearchActionGroup
class Group By Key Computer implements I Group By Key Computer public Object compute Group By Key I Marker marker return marker  GroupByKeyComputer IGroupByKeyComputer computeGroupByKey IMarker
public Java Search Collector Java Search Operation op I Progress Monitor monitor this operation op this monitor monitor  JavaSearchCollector JavaSearchOperation IProgressMonitor
public void about To Start result View SearchUI get Search Result View result View search Started new Search Action Group Factory operation get Singular Label operation get Plural Label null org eclipse pde internal ui search java Search NON NLS 1 new Dependency Extent Label Provider new Search Go To Action new Group By Key Computer operation  aboutToStart resultView getSearchResultView resultView searchStarted SearchActionGroupFactory getSingularLabel getPluralLabel javaSearch DependencyExtentLabelProvider SearchGoToAction GroupByKeyComputer
public void accept I Resource resource int start int end I Java Element enclosing Element int accuracy throws Core Exception if accuracy I Java Search Constants EXACT MATCH Hash Map attributes new Hash Map 3 Java Core add Java Element Marker Attributes attributes enclosing Element attributes put I Marker CHAR START new Integer Math max start 0 attributes put I Marker CHAR END new Integer Math max end 0 I Marker marker resource create Marker SearchUI SEARCH MARKER marker set Attributes attributes result View add Match enclosing Element get Element Name enclosing Element resource marker  IResource IJavaElement enclosingElement CoreException IJavaSearchConstants EXACT_MATCH HashMap HashMap JavaCore addJavaElementMarkerAttributes enclosingElement IMarker CHAR_START IMarker CHAR_END IMarker createMarker SEARCH_MARKER setAttributes resultView addMatch enclosingElement getElementName enclosingElement
public void done if result View null result View search Finished  resultView resultView searchFinished
public I Progress Monitor get Progress Monitor return monitor  IProgressMonitor getProgressMonitor

private static final String KEY MATCHES Search multiple Matches NON NLS 1 public Java Search Operation I Java Element element I Project parent Project this element element this parent Project parent Project  KEY_MATCHES multipleMatches JavaSearchOperation IJavaElement IProject parentProject parentProject parentProject
public void run I Progress Monitor monitor do Java Search monitor  IProgressMonitor doJavaSearch
private void do Java Search I Progress Monitor monitor try Search Engine search Engine new Search Engine search Engine search PDE Plugin get Workspace element I Java Search Constants REFERENCES get Search Scope new Java Search Collector this monitor catch Java Model Exception e  doJavaSearch IProgressMonitor SearchEngine searchEngine SearchEngine searchEngine PDEPlugin getWorkspace IJavaSearchConstants getSearchScope JavaSearchCollector JavaModelException
private I Java Search Scope get Search Scope throws Java Model Exception I Package Fragment Root roots Java Core create parent Project get Package Fragment Roots Array List filtered Roots new Array List for int i 0 i roots length i if roots i get Resource null roots i get Resource get Project equals parent Project filtered Roots add roots i return Search Engine create Java Search Scope I Java Element filtered Roots to Array new I Java Element filtered Roots size  IJavaSearchScope getSearchScope JavaModelException IPackageFragmentRoot JavaCore parentProject getPackageFragmentRoots ArrayList filteredRoots ArrayList getResource getResource getProject parentProject filteredRoots SearchEngine createJavaSearchScope IJavaElement filteredRoots toArray IJavaElement filteredRoots
public String get Plural Label return element get Element Name 0 PDE Plugin get Resource String KEY MATCHES NON NLS 1  getPluralLabel getElementName PDEPlugin getResourceString KEY_MATCHES
public String get Singular Label return element get Element Name 1 PDE Plugin get Resource String KEY MATCH NON NLS 1  getSingularLabel getElementName PDEPlugin getResourceString KEY_MATCH

public static void collect All Prerequisites I Plugin plugin Hash Set set if set add plugin return if plugin get Model instanceof Workspace Plugin Model Base I Fragment fragments PDE Core get Default get Workspace Model Manager get Fragments For plugin get Id plugin get Version for int i 0 i fragments length i set add fragments i I Plugin Import imports plugin get Imports for int i 0 i imports length i if imports i is Reexported I Plugin child PDE Core get Default find Plugin imports i get Id if child null collect All Prerequisites child set  collectAllPrerequisites IPlugin HashSet getModel WorkspacePluginModelBase IFragment PDECore getDefault getWorkspaceModelManager getFragmentsFor getId getVersion IPluginImport getImports isReexported IPlugin PDECore getDefault findPlugin getId collectAllPrerequisites
public static I Package Fragment collect Package Fragments I Plugin Base models I Project parent Project throws Java Model Exception Array List result new Array List I Package Fragment Root roots Java Core create parent Project get All Package Fragment Roots for int i 0 i models length i I Plugin Base pre Req models i I Resource resource pre Req get Model get Underlying Resource if resource null Array List library Paths get Library Paths pre Req for int j 0 j roots length j if library Paths contains roots j get Path extract Fragments roots j result else I Project project resource get Project for int j 0 j roots length j I Java Project j Project I Java Project roots j get Parent if j Project get Project equals project extract Fragments roots j result return I Package Fragment result to Array new I Package Fragment result size  IPackageFragment collectPackageFragments IPluginBase IProject parentProject JavaModelException ArrayList ArrayList IPackageFragmentRoot JavaCore parentProject getAllPackageFragmentRoots IPluginBase preReq IResource preReq getModel getUnderlyingResource ArrayList libraryPaths getLibraryPaths preReq libraryPaths getPath extractFragments IProject getProject IJavaProject jProject IJavaProject getParent jProject getProject extractFragments IPackageFragment toArray IPackageFragment
private static void extract Fragments I Package Fragment Root root Array List result try I Java Element children root get Children for int i 0 i children length i I Package Fragment fragment I Package Fragment children i if fragment get Children length 0 result add fragment catch Java Model Exception e  extractFragments IPackageFragmentRoot ArrayList IJavaElement getChildren IPackageFragment IPackageFragment getChildren JavaModelException
private static Array List get Library Paths I Plugin Base plugin Array List library Paths new Array List I Fragment fragments PDE Core get Default find Fragments For plugin get Id plugin get Version I Plugin Library libraries plugin get Libraries for int i 0 i libraries length i String library Name Classpath Util Core expand Library Name libraries i get Name String path plugin get Model get Install Location Path SEPARATOR library Name if new File path exists library Paths add new Path path else find Library In Fragments fragments library Name library Paths return library Paths  ArrayList getLibraryPaths IPluginBase ArrayList libraryPaths ArrayList IFragment PDECore getDefault findFragmentsFor getId getVersion IPluginLibrary getLibraries libraryName ClasspathUtilCore expandLibraryName getName getModel getInstallLocation libraryName libraryPaths findLibraryInFragments libraryName libraryPaths libraryPaths
private static void find Library In Fragments I Fragment fragments String library Name Array List library Paths for int i 0 i fragments length i String path fragments i get Model get Install Location Path SEPARATOR library Name if new File path exists library Paths add new Path path break  findLibraryInFragments IFragment libraryName ArrayList libraryPaths getModel getInstallLocation libraryName libraryPaths

public void fill Context Menu I Menu Manager menu super fill Context Menu menu Action Context context get Context I Selection selection context get Selection if selection instanceof I Structured Selection I Structured Selection s Selection I Structured Selection selection if s Selection size 1 Object object s Selection get First Element add Find Declarations Action object menu add Find References Action object menu add Show Description Action object menu add Dependency Extent Action object menu  fillContextMenu IMenuManager fillContextMenu ActionContext getContext ISelection getSelection IStructuredSelection IStructuredSelection sSelection IStructuredSelection sSelection sSelection getFirstElement addFindDeclarationsAction addFindReferencesAction addShowDescriptionAction addDependencyExtentAction
private void add Dependency Extent Action Object object I Menu Manager menu if object instanceof I Search Result View Entry object I Search Result View Entry object get Group By Key else if object instanceof Import Object object Import Object object get Import if object instanceof I Plugin Import I Plugin Import object get Model get Underlying Resource null menu add new Separator menu add new Dependency Extent Action I Plugin Import object  addDependencyExtentAction IMenuManager ISearchResultViewEntry ISearchResultViewEntry getGroupByKey ImportObject ImportObject getImport IPluginImport IPluginImport getModel getUnderlyingResource DependencyExtentAction IPluginImport
private void add Find Declarations Action Object object I Menu Manager menu if object instanceof I Search Result View Entry object I Search Result View Entry object get Group By Key else if object instanceof Import Object object Import Object object get Import if object instanceof I Plugin Import object instanceof I Plugin Extension menu add new Find Declarations Action object  addFindDeclarationsAction IMenuManager ISearchResultViewEntry ISearchResultViewEntry getGroupByKey ImportObject ImportObject getImport IPluginImport IPluginExtension FindDeclarationsAction
private void add Find References Action Object object I Menu Manager menu if object instanceof I Search Result View Entry object I Search Result View Entry object get Group By Key else if object instanceof Model Entry object Model Entry object get Active Model get Plugin Base else if object instanceof Import Object object Import Object object get Import if object instanceof I Plugin Extension Point object instanceof I Plugin Import object instanceof I Plugin menu add new Find References Action object  addFindReferencesAction IMenuManager ISearchResultViewEntry ISearchResultViewEntry getGroupByKey ModelEntry ModelEntry getActiveModel getPluginBase ImportObject ImportObject getImport IPluginExtensionPoint IPluginImport IPlugin FindReferencesAction
private void add Show Description Action Object object I Menu Manager menu if object instanceof I Search Result View Entry object I Search Result View Entry object get Group By Key if object instanceof I Plugin Extension Point menu add new Show Description Action I Plugin Extension Point object else if object instanceof I Plugin Extension String point Id I Plugin Extension object get Point I Plugin Extension Point ext Point PDE Core get Default find Extension Point point Id if ext Point null menu add new Show Description Action ext Point  addShowDescriptionAction IMenuManager ISearchResultViewEntry ISearchResultViewEntry getGroupByKey IPluginExtensionPoint ShowDescriptionAction IPluginExtensionPoint IPluginExtension pointId IPluginExtension getPoint IPluginExtensionPoint extPoint PDECore getDefault findExtensionPoint pointId extPoint ShowDescriptionAction extPoint

see org eclipse search ui I Action Group Factory create Action Group org eclipse search ui I Search Result View public Action Group create Action Group I Search Result View search View return new Plugin Search Action Group  IActionGroupFactory createActionGroup ISearchResultView ActionGroup createActionGroup ISearchResultView searchView PluginSearchActionGroup

public class Plugin Search Label Provider extends Label Provider public Plugin Search Label Provider Increment reference count for the global label provider PDE Plugin get Default get Label Provider connect this  PluginSearchLabelProvider LabelProvider PluginSearchLabelProvider PDEPlugin getDefault getLabelProvider
public void dispose Allow global label provider to release shared images if needed PDE Plugin get Default get Label Provider disconnect this super dispose  PDEPlugin getDefault getLabelProvider
see org eclipse jface viewers Label Provider get Image java lang Object public Image get Image Object element if element instanceof I Search Result View Entry I Search Result View Entry entry I Search Result View Entry element return PDE Plugin get Default get Label Provider get Image I Plugin Object entry get Group By Key return super get Image element  LabelProvider getImage getImage ISearchResultViewEntry ISearchResultViewEntry ISearchResultViewEntry PDEPlugin getDefault getLabelProvider getImage IPluginObject getGroupByKey getImage
see org eclipse jface viewers Label Provider get Text java lang Object public String get Text Object element if element instanceof I Search Result View Entry I Search Result View Entry entry I Search Result View Entry element I Plugin Object object I Plugin Object entry get Group By Key if object instanceof I Plugin Base return I Plugin Base object get Id if object instanceof I Plugin Import return I Plugin Import object get Id NON NLS 1 object get Plugin Model get Plugin Base get Id if object instanceof I Plugin Extension return I Plugin Extension object get Point NON NLS 1 object get Plugin Model get Plugin Base get Id if object instanceof I Plugin Extension Point return I Plugin Extension Point object get Full Id return super get Text element  LabelProvider getText getText ISearchResultViewEntry ISearchResultViewEntry ISearchResultViewEntry IPluginObject IPluginObject getGroupByKey IPluginBase IPluginBase getId IPluginImport IPluginImport getId getPluginModel getPluginBase getId IPluginExtension IPluginExtension getPoint getPluginModel getPluginBase getId IPluginExtensionPoint IPluginExtensionPoint getFullId getText

public boolean equals Object obj if obj instanceof Query Data if Query Data obj text equals text return true return false  QueryData QueryData
public void create Control Composite parent Composite result new Composite parent SWT NONE Grid Layout layout new Grid Layout 1 true layout margin Height 0 layout margin Width 0 result set Layout layout result set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL create Pattern Section result create Settings Section result hook Listeners set Control result Dialog apply Dialog Font result Workbench Help set Help result I Help Context Ids SEARCH PAGE  createControl GridLayout GridLayout marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL createPatternSection createSettingsSection hookListeners setControl applyDialogFont WorkbenchHelp setHelp IHelpContextIds SEARCH_PAGE
private void create Group Composite parent Button buttons String group Label String button Labels int default Enabled Group group new Group parent SWT NONE group set Layout new Grid Layout 1 true group set Layout Data new Grid Data Grid Data FILL HORIZONTAL group set Text group Label for int i 0 i button Labels length i buttons i new Button group SWT RADIO buttons i set Text button Labels i buttons i set Selection i default Enabled  createGroup groupLabel buttonLabels defaultEnabled setLayout GridLayout setLayoutData GridData GridData FILL_HORIZONTAL setText groupLabel buttonLabels setText buttonLabels setSelection defaultEnabled
private void create Pattern Section Composite parent Composite result new Composite parent SWT NONE result set Layout new Grid Layout 2 false result set Layout Data new Grid Data Grid Data FILL HORIZONTAL Label label new Label result SWT NONE Grid Data data new Grid Data data horizontal Span 2 label set Layout Data data label set Text PDE Plugin get Resource String KEY SEARCH STRING pattern Combo new Combo result SWT SINGLE SWT BORDER pattern Combo set Layout Data new Grid Data Grid Data FILL HORIZONTAL case Sensitive new Button result SWT CHECK case Sensitive set Text PDE Plugin get Resource String KEY CASE SENSITIVE  createPatternSection setLayout GridLayout setLayoutData GridData GridData FILL_HORIZONTAL GridData GridData horizontalSpan setLayoutData setText PDEPlugin getResourceString KEY_SEARCH_STRING patternCombo patternCombo setLayoutData GridData GridData FILL_HORIZONTAL caseSensitive caseSensitive setText PDEPlugin getResourceString KEY_CASE_SENSITIVE
private void create Settings Section Composite parent Composite result new Composite parent SWT NONE result set Layout new Grid Layout 3 true result set Layout Data new Grid Data Grid Data FILL BOTH create Group result search For Buttons PDE Plugin get Resource String KEY SEARCH FOR new String PDE Plugin get Resource String KEY PLUGIN PDE Plugin get Resource String KEY FRAGMENT PDE Plugin get Resource String KEY EXT PT 2 create Group result limit To Buttons PDE Plugin get Resource String KEY LIMIT TO new String PDE Plugin get Resource String KEY DECLARATIONS PDE Plugin get Resource String KEY REFERENCES PDE Plugin get Resource String KEY ALL OCCURRENCES 2 create Group result external Scope Buttons PDE Plugin get Resource String KEY EXTERNAL SCOPE new String PDE Plugin get Resource String KEY ALL PDE Plugin get Resource String KEY ENABLED PDE Plugin get Resource String KEY NONE 1  createSettingsSection setLayout GridLayout setLayoutData GridData GridData FILL_BOTH createGroup searchForButtons PDEPlugin getResourceString KEY_SEARCH_FOR PDEPlugin getResourceString KEY_PLUGIN PDEPlugin getResourceString KEY_FRAGMENT PDEPlugin getResourceString KEY_EXT_PT createGroup limitToButtons PDEPlugin getResourceString KEY_LIMIT_TO PDEPlugin getResourceString KEY_DECLARATIONS PDEPlugin getResourceString KEY_REFERENCES PDEPlugin getResourceString KEY_ALL_OCCURRENCES createGroup externalScopeButtons PDEPlugin getResourceString KEY_EXTERNAL_SCOPE PDEPlugin getResourceString KEY_ALL PDEPlugin getResourceString KEY_ENABLED PDEPlugin getResourceString KEY_NONE
private I File find Manifest File Object item if item instanceof I Java Project item I Java Project item get Project if item instanceof I Project I File file I Project item get File plugin xml NON NLS 1 if file exists return file file I Project item get File fragment xml NON NLS 1 if file exists return file else if item instanceof I File I File file I File item if file get Name equals plugin xml NON NLS 1 file get Name equals fragment xml NON NLS 1 return file return null  IFile findManifestFile IJavaProject IJavaProject getProject IProject IFile IProject getFile IProject getFile IFile IFile IFile getName getName
private int get External Scope if external Scope Buttons 0 get Selection return Plugin Search Scope EXTERNAL SCOPE ALL if external Scope Buttons 1 get Selection return Plugin Search Scope EXTERNAL SCOPE ENABLED return Plugin Search Scope EXTERNAL SCOPE NONE  getExternalScope externalScopeButtons getSelection PluginSearchScope EXTERNAL_SCOPE_ALL externalScopeButtons getSelection PluginSearchScope EXTERNAL_SCOPE_ENABLED PluginSearchScope EXTERNAL_SCOPE_NONE
private Plugin Search Input get Input Plugin Search Scope scope new Plugin Search Scope get Workspace Scope get External Scope get Selected Resources Plugin Search Input input new Plugin Search Input int search For get Search For input set Search Element search For input set Search Limit get Limit To input set Search Scope scope String search String pattern Combo get Text trim if search For Plugin Search Input ELEMENT EXTENSION POINT search String index Of 1 search String search String NON NLS 1 input set Search String search String input set Case Sensitive case Sensitive get Selection return input  PluginSearchInput getInput PluginSearchScope PluginSearchScope getWorkspaceScope getExternalScope getSelectedResources PluginSearchInput PluginSearchInput searchFor getSearchFor setSearchElement searchFor setSearchLimit getLimitTo setSearchScope searchString patternCombo getText searchFor PluginSearchInput ELEMENT_EXTENSION_POINT searchString indexOf searchString searchString setSearchString searchString setCaseSensitive caseSensitive getSelection
private int get Limit To if limit To Buttons 0 get Selection return Plugin Search Input LIMIT DECLARATIONS if limit To Buttons 1 get Selection return Plugin Search Input LIMIT REFERENCES return Plugin Search Input LIMIT ALL  getLimitTo limitToButtons getSelection PluginSearchInput LIMIT_DECLARATIONS limitToButtons getSelection PluginSearchInput LIMIT_REFERENCES PluginSearchInput LIMIT_ALL
private int get Search For if search For Buttons 0 get Selection return Plugin Search Input ELEMENT PLUGIN if search For Buttons 1 get Selection return Plugin Search Input ELEMENT FRAGMENT return Plugin Search Input ELEMENT EXTENSION POINT  getSearchFor searchForButtons getSelection PluginSearchInput ELEMENT_PLUGIN searchForButtons getSelection PluginSearchInput ELEMENT_FRAGMENT PluginSearchInput ELEMENT_EXTENSION_POINT
private Hash Set get Selected Resources Hash Set result new Hash Set int scope container get Selected Scope if scope I Search Page Container WORKSPACE SCOPE return null if scope I Search Page Container SELECTION SCOPE if container get Selection instanceof I Structured Selection I Structured Selection selection I Structured Selection container get Selection Iterator iter selection iterator while iter has Next I File file find Manifest File iter next if file null result add file else if scope I Search Page Container WORKING SET SCOPE I Working Set working Sets container get Selected Working Sets if working Sets null for int i 0 i working Sets length i I Adaptable elements working Sets i get Elements for int j 0 j elements length j I File file find Manifest File elements j if file null result add file return result  HashSet getSelectedResources HashSet HashSet getSelectedScope ISearchPageContainer WORKSPACE_SCOPE ISearchPageContainer SELECTION_SCOPE getSelection IStructuredSelection IStructuredSelection IStructuredSelection getSelection hasNext IFile findManifestFile ISearchPageContainer WORKING_SET_SCOPE IWorkingSet workingSets getSelectedWorkingSets workingSets workingSets IAdaptable workingSets getElements IFile findManifestFile
private int get Workspace Scope switch container get Selected Scope case I Search Page Container SELECTION SCOPE return Plugin Search Scope SCOPE SELECTION case I Search Page Container WORKING SET SCOPE return Plugin Search Scope SCOPE WORKING SETS default return Plugin Search Scope SCOPE WORKSPACE  getWorkspaceScope getSelectedScope ISearchPageContainer SELECTION_SCOPE PluginSearchScope SCOPE_SELECTION ISearchPageContainer WORKING_SET_SCOPE PluginSearchScope SCOPE_WORKING_SETS PluginSearchScope SCOPE_WORKSPACE
search For Buttons 1 add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean selected search For Buttons 1 get Selection if selected limit To Buttons 0 set Selection true limit To Buttons 1 set Selection false limit To Buttons 2 set Selection false limit To Buttons 1 set Enabled selected limit To Buttons 2 set Enabled selected  searchForButtons addSelectionListener SelectionAdapter widgetSelected SelectionEvent searchForButtons getSelection limitToButtons setSelection limitToButtons setSelection limitToButtons setSelection limitToButtons setEnabled limitToButtons setEnabled
pattern Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e int index previous Queries size pattern Combo get Selection Index 1 Query Data data Query Data previous Queries get index reset Page data container set Perform Action Enabled pattern Combo get Text length 0  patternCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent previousQueries patternCombo getSelectionIndex QueryData QueryData previousQueries resetPage setPerformActionEnabled patternCombo getText
pattern Combo add Modify Listener new Modify Listener public void modify Text Modify Event e container set Perform Action Enabled pattern Combo get Text trim length 0  patternCombo addModifyListener ModifyListener modifyText ModifyEvent setPerformActionEnabled patternCombo getText
private void hook Listeners search For Buttons 1 add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean selected search For Buttons 1 get Selection if selected limit To Buttons 0 set Selection true limit To Buttons 1 set Selection false limit To Buttons 2 set Selection false limit To Buttons 1 set Enabled selected limit To Buttons 2 set Enabled selected pattern Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e int index previous Queries size pattern Combo get Selection Index 1 Query Data data Query Data previous Queries get index reset Page data container set Perform Action Enabled pattern Combo get Text length 0 pattern Combo add Modify Listener new Modify Listener public void modify Text Modify Event e container set Perform Action Enabled pattern Combo get Text trim length 0  hookListeners searchForButtons addSelectionListener SelectionAdapter widgetSelected SelectionEvent searchForButtons getSelection limitToButtons setSelection limitToButtons setSelection limitToButtons setSelection limitToButtons setEnabled limitToButtons setEnabled patternCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent previousQueries patternCombo getSelectionIndex QueryData QueryData previousQueries resetPage setPerformActionEnabled patternCombo getText patternCombo addModifyListener ModifyListener modifyText ModifyEvent setPerformActionEnabled patternCombo getText
public boolean perform Action save Query Data try SearchUI activate Search Result View Plugin SearchUI Operation op new Plugin SearchUI Operation get Input new Plugin Search Result Collector container get Runnable Context run true true op catch Invocation Target Exception e return false catch Interrupted Exception e return false return true  performAction saveQueryData activateSearchResultView PluginSearchUIOperation PluginSearchUIOperation getInput PluginSearchResultCollector getRunnableContext InvocationTargetException InterruptedException
private void reset Page Query Data data case Sensitive set Selection data is Case Sensitive search For Buttons 0 set Selection data search Element Plugin Search Input ELEMENT PLUGIN search For Buttons 1 set Selection data search Element Plugin Search Input ELEMENT FRAGMENT search For Buttons 2 set Selection data search Element Plugin Search Input ELEMENT EXTENSION POINT limit To Buttons 0 set Selection data limit Plugin Search Input LIMIT DECLARATIONS limit To Buttons 1 set Selection data limit Plugin Search Input LIMIT REFERENCES limit To Buttons 1 set Enabled search For Buttons 1 get Selection limit To Buttons 2 set Selection data limit Plugin Search Input LIMIT ALL limit To Buttons 2 set Enabled search For Buttons 1 get Selection external Scope Buttons 0 set Selection data external Scope Plugin Search Scope EXTERNAL SCOPE ALL external Scope Buttons 1 set Selection data external Scope Plugin Search Scope EXTERNAL SCOPE ENABLED external Scope Buttons 2 set Selection data external Scope Plugin Search Scope EXTERNAL SCOPE NONE container set Selected Scope data workspace Scope if data working Sets null container set Selected Working Sets data working Sets  resetPage QueryData caseSensitive setSelection isCaseSensitive searchForButtons setSelection searchElement PluginSearchInput ELEMENT_PLUGIN searchForButtons setSelection searchElement PluginSearchInput ELEMENT_FRAGMENT searchForButtons setSelection searchElement PluginSearchInput ELEMENT_EXTENSION_POINT limitToButtons setSelection PluginSearchInput LIMIT_DECLARATIONS limitToButtons setSelection PluginSearchInput LIMIT_REFERENCES limitToButtons setEnabled searchForButtons getSelection limitToButtons setSelection PluginSearchInput LIMIT_ALL limitToButtons setEnabled searchForButtons getSelection externalScopeButtons setSelection externalScope PluginSearchScope EXTERNAL_SCOPE_ALL externalScopeButtons setSelection externalScope PluginSearchScope EXTERNAL_SCOPE_ENABLED externalScopeButtons setSelection externalScope PluginSearchScope EXTERNAL_SCOPE_NONE setSelectedScope workspaceScope workingSets setSelectedWorkingSets workingSets
private void save Query Data Query Data data new Query Data data text pattern Combo get Text data is Case Sensitive case Sensitive get Selection data search Element get Search For data limit get Limit To data external Scope get External Scope data workspace Scope container get Selected Scope data working Sets container get Selected Working Sets if previous Queries contains data previous Queries remove data previous Queries add data if previous Queries size 10 previous Queries remove 0  saveQueryData QueryData QueryData patternCombo getText isCaseSensitive caseSensitive getSelection searchElement getSearchFor getLimitTo externalScope getExternalScope workspaceScope getSelectedScope workingSets getSelectedWorkingSets previousQueries previousQueries previousQueries previousQueries previousQueries
public void set Container I Search Page Container container this container container  setContainer ISearchPageContainer
public void set Visible boolean visible if visible pattern Combo null if first Time first Time false String patterns new String previous Queries size for int i previous Queries size 1 j 0 i 0 i j patterns j Query Data previous Queries get i text pattern Combo set Items patterns container set Perform Action Enabled pattern Combo get Text length 0 pattern Combo set Focus super set Visible visible  setVisible patternCombo firstTime firstTime previousQueries previousQueries QueryData previousQueries patternCombo setItems setPerformActionEnabled patternCombo getText patternCombo setFocus setVisible

class Group By Key Computer implements I Group By Key Computer public Object compute Group By Key I Marker marker return marker  GroupByKeyComputer IGroupByKeyComputer computeGroupByKey IMarker
public void set Operation Plugin Search Operation operation this operation Plugin SearchUI Operation operation  setOperation PluginSearchOperation PluginSearchUIOperation
public Plugin Search Operation get Operation return operation  PluginSearchOperation getOperation
public void accept I Plugin Object match try I Resource resource match get Model get Underlying Resource if resource null resource PDE Plugin get Workspace get Root I Marker marker resource create Marker SearchUI SEARCH MARKER if match instanceof I Source Object marker set Attribute I Marker LINE NUMBER I Source Object match get Start Line if match get Model get Underlying Resource null annotate External Marker marker match result View add Match null match resource marker num Matches 1 String text num Matches 1 PDE Plugin get Resource String KEY MATCHES PDE Plugin get Resource String KEY MATCH monitor sub Task num Matches text NON NLS 1 catch Core Exception e  IPluginObject IResource getModel getUnderlyingResource PDEPlugin getWorkspace getRoot IMarker createMarker SEARCH_MARKER ISourceObject setAttribute IMarker LINE_NUMBER ISourceObject getStartLine getModel getUnderlyingResource annotateExternalMarker resultView addMatch numMatches numMatches PDEPlugin getResourceString KEY_MATCHES PDEPlugin getResourceString KEY_MATCH subTask numMatches CoreException
private void annotate External Marker I Marker marker I Plugin Object match throws Core Exception I Plugin Model Base model match get Plugin Model String path model get Install Location String manifest model is Fragment Model fragment xml NON NLS 1 plugin xml NON NLS 1 String file Name path File separator manifest marker set Attribute IPDEUI Constants MARKER SYSTEM FILE PATH file Name  annotateExternalMarker IMarker IPluginObject CoreException IPluginModelBase getPluginModel getInstallLocation isFragmentModel fileName setAttribute IPDEUIConstants MARKER_SYSTEM_FILE_PATH fileName
public void done if result View null result View search Finished  resultView resultView searchFinished
public void search Started result View SearchUI get Search Result View result View search Started new Plugin Search Action Group Factory operation get Singular Label operation get Plural Label null pageID new Plugin Search Label Provider new Search Go To Action new Group By Key Computer operation  searchStarted resultView getSearchResultView resultView searchStarted PluginSearchActionGroupFactory getSingularLabel getPluralLabel PluginSearchLabelProvider SearchGoToAction GroupByKeyComputer
public void set Progress Monitor I Progress Monitor monitor this monitor monitor  setProgressMonitor IProgressMonitor

private static final String KEY MATCHES Search multiple Matches NON NLS 1 public Plugin SearchUI Operation Plugin Search Input input I Plugin Search Result Collector collector super input collector  KEY_MATCHES multipleMatches PluginSearchUIOperation PluginSearchInput IPluginSearchResultCollector
try I Workspace Runnable workspace Runnable new I Workspace Runnable public void run I Progress Monitor pm throws Core Exception execute pm  IWorkspaceRunnable workspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException
public void run I Progress Monitor monitor try I Workspace Runnable workspace Runnable new I Workspace Runnable public void run I Progress Monitor pm throws Core Exception execute pm Resources Plugin get Workspace run workspace Runnable monitor catch Core Exception e catch Operation Canceled Exception e  IProgressMonitor IWorkspaceRunnable workspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException ResourcesPlugin getWorkspace workspaceRunnable CoreException OperationCanceledException
public String get Plural Label return input get Search String 0 PDE Plugin get Resource String KEY MATCHES NON NLS 1  getPluralLabel getSearchString PDEPlugin getResourceString KEY_MATCHES
public String get Singular Label return input get Search String 1 PDE Plugin get Resource String KEY MATCH NON NLS 1  getSingularLabel getSearchString PDEPlugin getResourceString KEY_MATCH

private Show Description Action delegate see org eclipse ui I Object Action Delegate set Active Part org eclipse jface action I Action org eclipse ui I Workbench Part public void set Active Part I Action action I Workbench Part target Part  ShowDescriptionAction IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action if file null return File Schema Descriptor sd new File Schema Descriptor file I Schema schema sd get Schema if delegate null delegate new Show Description Action schema else delegate set Schema schema delegate run  IActionDelegate IAction IAction FileSchemaDescriptor FileSchemaDescriptor ISchema getSchema ShowDescriptionAction setSchema
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection file null if selection instanceof I Structured Selection Object obj I Structured Selection selection get First Element if obj instanceof I File file I File obj  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection IStructuredSelection IStructuredSelection getFirstElement IFile IFile

public References In Plugin Action I Search Result View Entry entry this entry entry set Text PDE Plugin get Resource String KEY REFERENCES entry get Resource get Name NON NLS 1  ReferencesInPluginAction ISearchResultViewEntry setText PDEPlugin getResourceString KEY_REFERENCES getResource getName
public void run try SearchUI activate Search Result View I Workspace Runnable operation null Object object entry get Group By Key if object instanceof I Java Element operation new Java Search Operation I Java Element object I Project entry get Resource else operation new Plugin SearchUI Operation get Plugin Search Input I Plugin Extension Point object new Plugin Search Result Collector PDE Plugin get Workspace run operation null I Workspace AVOID UPDATE new Null Progress Monitor catch Core Exception e  activateSearchResultView IWorkspaceRunnable getGroupByKey IJavaElement JavaSearchOperation IJavaElement IProject getResource PluginSearchUIOperation getPluginSearchInput IPluginExtensionPoint PluginSearchResultCollector PDEPlugin getWorkspace IWorkspace AVOID_UPDATE NullProgressMonitor CoreException
private Plugin Search Input get Plugin Search Input I Plugin Extension Point object Plugin Search Input input new Plugin Search Input input set Search Element Plugin Search Input ELEMENT EXTENSION POINT input set Search String I Plugin Extension Point object get Plugin Base get Id NON NLS 1 I Plugin Extension Point object get Id input set Search Limit Plugin Search Input LIMIT REFERENCES Hash Set set new Hash Set I Resource resource I Project entry get Resource get File plugin xml NON NLS 1 if resource exists resource I Project entry get Resource get File fragment xml NON NLS 1 set add resource input set Search Scope new Plugin Search Scope Plugin Search Scope SCOPE SELECTION Plugin Search Scope EXTERNAL SCOPE NONE set return input  PluginSearchInput getPluginSearchInput IPluginExtensionPoint PluginSearchInput PluginSearchInput setSearchElement PluginSearchInput ELEMENT_EXTENSION_POINT setSearchString IPluginExtensionPoint getPluginBase getId IPluginExtensionPoint getId setSearchLimit PluginSearchInput LIMIT_REFERENCES HashSet HashSet IResource IProject getResource getFile IProject getResource getFile setSearchScope PluginSearchScope PluginSearchScope SCOPE_SELECTION PluginSearchScope EXTERNAL_SCOPE_NONE

class Schema Marker Resolution implements I Marker Resolution private Show Description Action action public String get Label return PDE Plugin get Resource String Schema Marker Resolution Generator label NON NLS 1  SchemaMarkerResolution IMarkerResolution ShowDescriptionAction getLabel PDEPlugin getResourceString SchemaMarkerResolutionGenerator
public void run I Marker marker try String point String marker get Attribute point NON NLS 1 if point null return I Schema schema PDE Core get Default get Schema Registry get Schema point if action null action new Show Description Action schema else action set Schema schema action run catch Core Exception e PDE Plugin log Exception e  IMarker getAttribute ISchema PDECore getDefault getSchemaRegistry getSchema ShowDescriptionAction setSchema CoreException PDEPlugin logException
public Schema Marker Resolution Generator resolutions 0 new Schema Marker Resolution  SchemaMarkerResolutionGenerator SchemaMarkerResolution
Insert the method s description here see I Marker Resolution Generator get Resolutions public I Marker Resolution get Resolutions I Marker marker return resolutions  IMarkerResolutionGenerator getResolutions IMarkerResolution getResolutions IMarker

public class Search Go To Action extends Action public Search Go To Action super  SearchGoToAction SearchGoToAction
public void run try I Search Result View view SearchUI get Search Result View I Selection selection view get Selection Object element null if selection instanceof I Structured Selection element I Structured Selection selection get First Element if element instanceof I Search Result View Entry I Search Result View Entry entry I Search Result View Entry element element entry get Group By Key if element instanceof I Java Element I Editor Part editor JavaUI open In Editor I Java Element element IDE goto Marker editor entry get Selected Marker else if element instanceof I Plugin Object I Plugin Object object I Plugin Object element if object instanceof I Plugin Base Manifest Editor open Plugin Editor I Plugin Base object else Manifest Editor open Plugin Editor object get Plugin Base object entry get Selected Marker catch Part Init Exception e catch Java Model Exception e  ISearchResultView getSearchResultView ISelection getSelection IStructuredSelection IStructuredSelection getFirstElement ISearchResultViewEntry ISearchResultViewEntry ISearchResultViewEntry getGroupByKey IJavaElement IEditorPart openInEditor IJavaElement gotoMarker getSelectedMarker IPluginObject IPluginObject IPluginObject IPluginBase ManifestEditor openPluginEditor IPluginBase ManifestEditor openPluginEditor getPluginBase getSelectedMarker PartInitException JavaModelException

private URL cssURL public Show Description Action I Plugin Extension Point point set Extension Point point  ShowDescriptionAction IPluginExtensionPoint setExtensionPoint
public Show Description Action I Schema schema set Schema schema  ShowDescriptionAction ISchema setSchema
public void set Schema I Schema schema this schema schema this point Id schema get Qualified Point Id  setSchema ISchema pointId getQualifiedPointId
public void set Extension Point I Plugin Extension Point point this point Id point get Full Id set Text PDE Plugin get Resource String Show Description Action label NON NLS 1 schema null  setExtensionPoint IPluginExtensionPoint pointId getFullId setText PDEPlugin getResourceString ShowDescriptionAction
public URL getCSSURL return cssURL 
public void setCSSURL String url try cssURL new URL url catch MalformedURL Exception e PDE log Exception e  MalformedURLException logException
public void setCSSURL URL url cssURL url 
public void run if schema null Schema Registry registry PDE Core get Default get Schema Registry schema registry get Schema point Id if schema null show No Schema Message return show Schema Document  SchemaRegistry PDECore getDefault getSchemaRegistry getSchema pointId showNoSchemaMessage showSchemaDocument
private void show No Schema Message String title PDE Plugin get Resource String Show Description Action title NON NLS 1 String message PDE Plugin get Formatted Message Show Description Action no Point desc point Id NON NLS 1 NON NLS 2 Message Dialog open Warning PDE Plugin get Active Workbench Shell title message  showNoSchemaMessage PDEPlugin getResourceString ShowDescriptionAction PDEPlugin getFormattedMessage ShowDescriptionAction noPoint pointId MessageDialog openWarning PDEPlugin getActiveWorkbenchShell
private void show Schema Document try preview File get Preview File if preview File null return Schema Transformer transformer new Schema Transformer Output Stream os new File Output Stream preview File Print Writer print Writer new Print Writer os true transformer transform print Writer schema cssURL Schema Transformer TEMP os flush os close showURL preview File get Path catch Exception e PDE Plugin log Exception e  showSchemaDocument previewFile getPreviewFile previewFile SchemaTransformer SchemaTransformer OutputStream FileOutputStream previewFile PrintWriter printWriter PrintWriter printWriter SchemaTransformer previewFile getPath PDEPlugin logException
private File get Preview File try File file File create Temp File pde html NON NLS 1 NON NLS 2 file delete On Exit return file catch IO Exception e return null  getPreviewFile createTempFile deleteOnExit IOException
private void showURL String url boolean win32 SWT get Platform equals win32 NON NLS 1 if win32 Program launch url else I Browser browser Browser Manager get Instance create Browser try browser displayURL file url NON NLS 1 catch Exception e  getPlatform IBrowser BrowserManager getInstance createBrowser

private I Plugin Model Base model public Unused Dependencies Action I Plugin Model Base model this model model set Text PDE Plugin get Resource String Unused Dependencies action NON NLS 1  IPluginModelBase UnusedDependenciesAction IPluginModelBase setText PDEPlugin getResourceString UnusedDependencies
public void run Unused Dependencies Operation op new Unused Dependencies Operation model try PlatformUI get Workbench get Progress Service busy Cursor While op catch Exception e I Plugin Import unused op get Unused Dependencies if unused length 0 Message Dialog open Information PDE Plugin get Active Workbench Shell PDE Plugin get Resource String Unused Dependencies title NON NLS 1 PDE Plugin get Resource String Unused Dependencies not Found NON NLS 1 else if model is Editable Unused Imports Dialog dialog new Unused Imports Dialog PDE Plugin get Active Workbench Shell model unused dialog create dialog get Shell set Text PDE Plugin get Resource String Unused Dependencies title NON NLS 1 dialog open else String line Separator System get Property line separator NON NLS 1 String Buffer buffer new String Buffer PDE Plugin get Resource String Unused Dependencies found NON NLS 1 for int i 0 i unused length i buffer append line Separator unused i get Id Message Dialog open Information PDE Plugin get Active Workbench Shell PDE Plugin get Resource String Unused Dependencies title NON NLS 1 buffer to String  UnusedDependenciesOperation UnusedDependenciesOperation getWorkbench getProgressService busyCursorWhile IPluginImport getUnusedDependencies MessageDialog openInformation PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString UnusedDependencies PDEPlugin getResourceString UnusedDependencies notFound isEditable UnusedImportsDialog UnusedImportsDialog PDEPlugin getActiveWorkbenchShell getShell setText PDEPlugin getResourceString UnusedDependencies lineSeparator getProperty StringBuffer StringBuffer PDEPlugin getResourceString UnusedDependencies lineSeparator getId MessageDialog openInformation PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString UnusedDependencies toString

public void accept I Resource resource int start int end I Java Element enclosing Element int accuracy throws Core Exception if accuracy I Java Search Constants EXACT MATCH count 1  IResource IJavaElement enclosingElement CoreException IJavaSearchConstants EXACT_MATCH
public void about To Start  aboutToStart
public void about To Start public void done  aboutToStart
public void done public I Progress Monitor get Progress Monitor return null  IProgressMonitor getProgressMonitor
public boolean is Empty return count 0  isEmpty
public Unused Dependencies Operation I Plugin Model Base model this model model this parent Project model get Underlying Resource get Project  UnusedDependenciesOperation IPluginModelBase parentProject getUnderlyingResource getProject
public void run I Progress Monitor monitor try I Plugin Import imports model get Plugin Base get Imports if imports length 0 return monitor set Task Name PDE Plugin get Resource String Unused Dependencies analyze NON NLS 1 monitor begin Task imports length NON NLS 1 for int i 0 i imports length i if is Used imports i new Sub Progress Monitor monitor 1 unused add imports i monitor set Task Name PDE Plugin get Resource String Unused Dependencies analyze NON NLS 1 unused size NON NLS 1 PDE Plugin get Resource String Unused Dependencies unused NON NLS 1 NON NLS 1 unused size 1 PDE Plugin get Resource String Dependency Extent singular NON NLS 1 PDE Plugin get Resource String Dependency Extent plural NON NLS 1 NON NLS 1 PDE Plugin get Resource String Dependency Extent found NON NLS 1 finally monitor done  IProgressMonitor IPluginImport getPluginBase getImports setTaskName PDEPlugin getResourceString UnusedDependencies beginTask isUsed SubProgressMonitor setTaskName PDEPlugin getResourceString UnusedDependencies PDEPlugin getResourceString UnusedDependencies PDEPlugin getResourceString DependencyExtent PDEPlugin getResourceString DependencyExtent PDEPlugin getResourceString DependencyExtent
private boolean is Used I Plugin Import dependency I Progress Monitor monitor try Hash Set set new Hash Set Plugin Java Search Util collect All Prerequisites PDE Core get Default find Plugin dependency get Id set I Plugin Base models I Plugin Base set to Array new I Plugin Base set size I Package Fragment package Fragments new I Package Fragment 0 if parent Project has Nature Java Core NATURE ID package Fragments Plugin Java Search Util collect Package Fragments models parent Project monitor begin Task package Fragments length 1 NON NLS 1 if provides Extension Point models return true monitor worked 1 if package Fragments length 0 return do Java Search package Fragments new Sub Progress Monitor monitor package Fragments length catch Java Model Exception e catch Core Exception e finally monitor done return false  isUsed IPluginImport IProgressMonitor HashSet HashSet PluginJavaSearchUtil collectAllPrerequisites PDECore getDefault findPlugin getId IPluginBase IPluginBase toArray IPluginBase IPackageFragment packageFragments IPackageFragment parentProject hasNature JavaCore NATURE_ID packageFragments PluginJavaSearchUtil collectPackageFragments parentProject beginTask packageFragments providesExtensionPoint packageFragments doJavaSearch packageFragments SubProgressMonitor packageFragments JavaModelException CoreException
public I Plugin Import get Unused Dependencies return I Plugin Import unused to Array new I Plugin Import unused size  IPluginImport getUnusedDependencies IPluginImport toArray IPluginImport
private boolean provides Extension Point I Plugin Base models I Plugin Extension extensions model get Plugin Base get Extensions for int i 0 i extensions length i for int j 0 j models length j if provides Extension Point models j extensions i get Point return true return false  providesExtensionPoint IPluginBase IPluginExtension getPluginBase getExtensions providesExtensionPoint getPoint
private boolean provides Extension Point I Plugin Base model String targetID I Plugin Extension Point ext Points model get Extension Points for int i 0 i ext Points length i if ext Points i get Full Id equals targetID return true return false  providesExtensionPoint IPluginBase IPluginExtensionPoint extPoints getExtensionPoints extPoints extPoints getFullId
private boolean do Java Search I Package Fragment package Fragments I Progress Monitor monitor throws Java Model Exception Search Engine search Engine new Search Engine I Java Search Scope scope get Search Scope for int i 0 i package Fragments length i I Package Fragment package Fragment package Fragments i boolean used false if package Fragment has Subpackages Search Result Collector collector new Search Result Collector search Engine search PDE Plugin get Workspace Search Engine create Search Pattern package Fragment get Element Name NON NLS 1 I Java Search Constants TYPE I Java Search Constants REFERENCES true scope collector used collector is Empty else used search For Types package Fragment search Engine scope monitor monitor worked 1 if used return true return false  doJavaSearch IPackageFragment packageFragments IProgressMonitor JavaModelException SearchEngine searchEngine SearchEngine IJavaSearchScope getSearchScope packageFragments IPackageFragment packageFragment packageFragments packageFragment hasSubpackages SearchResultCollector SearchResultCollector searchEngine PDEPlugin getWorkspace SearchEngine createSearchPattern packageFragment getElementName IJavaSearchConstants IJavaSearchConstants isEmpty searchForTypes packageFragment searchEngine
private boolean search For Types I Package Fragment fragment Search Engine search Engine I Java Search Scope scope I Progress Monitor monitor throws Java Model Exception I Java Element children fragment get Children for int i 0 i children length i I Java Element child children i I Type types new I Type 0 if child instanceof I Class File types new I Type I Class File child get Type else if child instanceof I Compilation Unit types I Compilation Unit child get All Types for int j 0 j types length j Search Result Collector collector new Search Result Collector search Engine search PDE Plugin get Workspace Search Engine create Search Pattern types j I Java Search Constants REFERENCES scope collector if collector is Empty return true return false  searchForTypes IPackageFragment SearchEngine searchEngine IJavaSearchScope IProgressMonitor JavaModelException IJavaElement getChildren IJavaElement IType IType IClassFile IType IClassFile getType ICompilationUnit ICompilationUnit getAllTypes SearchResultCollector SearchResultCollector searchEngine PDEPlugin getWorkspace SearchEngine createSearchPattern IJavaSearchConstants isEmpty
private I Java Search Scope get Search Scope throws Java Model Exception I Package Fragment Root roots Java Core create parent Project get Package Fragment Roots Array List filtered Roots new Array List for int i 0 i roots length i if roots i get Resource null roots i get Resource get Project equals parent Project filtered Roots add roots i return Search Engine create Java Search Scope I Java Element filtered Roots to Array new I Java Element filtered Roots size  IJavaSearchScope getSearchScope JavaModelException IPackageFragmentRoot JavaCore parentProject getPackageFragmentRoots ArrayList filteredRoots ArrayList getResource getResource getProject parentProject filteredRoots SearchEngine createJavaSearchScope IJavaElement filteredRoots toArray IJavaElement filteredRoots

class Content Provider extends Default Table Provider public Object get Elements Object parent return unused  ContentProvider DefaultTableProvider getElements
public Unused Imports Dialog Shell parent Shell I Plugin Model Base model I Plugin Import unused super parent Shell this model model this unused unused checkbox Table Part new Wizard Checkbox Table Part PDE Plugin get Resource String Unused Dependencies remove NON NLS 1  UnusedImportsDialog parentShell IPluginModelBase IPluginImport parentShell checkboxTablePart WizardCheckboxTablePart PDEPlugin getResourceString UnusedDependencies
protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
protected Control create Dialog Area Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width layout margin Height 9 container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH container set Layout Data gd checkbox Table Part create Control container choice Viewer checkbox Table Part get Table Viewer choice Viewer set Content Provider new Content Provider choice Viewer set Label Provider PDE Plugin get Default get Label Provider choice Viewer set Sorter List Util PLUGIN SORTER gd Grid Data checkbox Table Part get Control get Layout Data gd width Hint 250 gd height Hint 275 choice Viewer set Input PDE Plugin get Default checkbox Table Part set Selection unused return container  createDialogArea GridLayout GridLayout numColumns marginWidth marginHeight setLayout GridData GridData GridData FILL_BOTH setLayoutData checkboxTablePart createControl choiceViewer checkboxTablePart getTableViewer choiceViewer setContentProvider ContentProvider choiceViewer setLabelProvider PDEPlugin getDefault getLabelProvider choiceViewer setSorter ListUtil PLUGIN_SORTER GridData checkboxTablePart getControl getLayoutData widthHint heightHint choiceViewer setInput PDEPlugin getDefault checkboxTablePart setSelection
protected void ok Pressed try Object elements choice Viewer get Checked Elements for int i 0 i elements length i model get Plugin Base remove I Plugin Import elements i super ok Pressed catch Core Exception e  okPressed choiceViewer getCheckedElements getPluginBase IPluginImport okPressed CoreException

private Image Descriptor f Overlays public Abstract Overlay Icon Image Descriptor overlays this overlays null  ImageDescriptor fOverlays AbstractOverlayIcon ImageDescriptor
public Abstract Overlay Icon Image Descriptor overlays Point size f Overlays overlays if size null f Size size else f Size new Point DEFAULT WIDTH DEFAULT HEIGHT  AbstractOverlayIcon ImageDescriptor fOverlays fSize fSize DEFAULT_WIDTH DEFAULT_HEIGHT
protected void draw Bottom Left Image Descriptor overlays if overlays null return int length overlays length int x 0 for int i 0 i 3 i if i length overlays i null Image Data id overlays i get Image Data draw Image id x get Size y id height x id width  drawBottomLeft ImageDescriptor ImageData getImageData drawImage getSize
protected void draw Bottom Right Image Descriptor overlays if overlays null return int length overlays length int x get Size x for int i 2 i 0 i if i length overlays i null Image Data id overlays i get Image Data x id width draw Image id x get Size y id height  drawBottomRight ImageDescriptor getSize ImageData getImageData drawImage getSize
protected abstract Image Data get Base Image Data  ImageData getBaseImageData
protected void draw Composite Image int width int height Image Data base get Base Image Data draw Image base 0 0 if f Overlays null if f Overlays length 0 draw Top Right f Overlays 0 if f Overlays length 1 draw Bottom Right f Overlays 1 if f Overlays length 2 draw Bottom Left f Overlays 2 if f Overlays length 3 draw Top Left f Overlays 3  drawCompositeImage ImageData getBaseImageData drawImage fOverlays fOverlays drawTopRight fOverlays fOverlays drawBottomRight fOverlays fOverlays drawBottomLeft fOverlays fOverlays drawTopLeft fOverlays
protected void draw Top Left Image Descriptor overlays if overlays null return int length overlays length int x 0 for int i 0 i 3 i if i length overlays i null Image Data id overlays i get Image Data draw Image id x 0 x id width  drawTopLeft ImageDescriptor ImageData getImageData drawImage
protected void draw Top Right Image Descriptor overlays if overlays null return int length overlays length int x get Size x for int i 2 i 0 i if i length overlays i null Image Data id overlays i get Image Data x id width draw Image id x 0  drawTopRight ImageDescriptor getSize ImageData getImageData drawImage
protected Point get Size return f Size  getSize fSize

private String values Creates an property descriptor with the given id display name and list of value labels to display in the combo box cell editor param id the id of the property param display Name the name to display for the property param values Array the list of possible values to display in the combo box public Choice Property Descriptor Object id String display Name String values Array super id display Name values values Array  displayName valuesArray ChoicePropertyDescriptor displayName valuesArray displayName valuesArray
The code Combo Box Property Descriptor code implementation of this code I Property Descriptor code method creates and returns a new code Combo Box Cell Editor code p The editor is configured with the current validator if there is one p public Cell Editor create Property Editor Composite parent Cell Editor editor new Combo Box Cell Editor parent values SWT READ ONLY if get Validator null editor set Validator get Validator return editor  ComboBoxPropertyDescriptor IPropertyDescriptor ComboBoxCellEditor CellEditor createPropertyEditor CellEditor ComboBoxCellEditor READ_ONLY getValidator setValidator getValidator

private Image base public Image Overlay Icon Image base Image Descriptor overlays this base overlays null  ImageOverlayIcon ImageDescriptor
public Image Overlay Icon Image base Image Descriptor overlays Point size super overlays size this base base  ImageOverlayIcon ImageDescriptor
protected Image Data get Base Image Data return base get Image Data  ImageData getBaseImageData getImageData

private Image Descriptor f Base public Overlay Icon Image Descriptor base Image Descriptor overlays this base overlays null  ImageDescriptor fBase OverlayIcon ImageDescriptor ImageDescriptor
public Overlay Icon Image Descriptor base Image Descriptor overlays Point size super overlays size f Base base if f Base null f Base Image Descriptor get Missing Image Descriptor  OverlayIcon ImageDescriptor ImageDescriptor fBase fBase fBase ImageDescriptor getMissingImageDescriptor
protected Image Data get Base Image Data return f Base get Image Data  ImageData getBaseImageData fBase getImageData

public Pixel Converter Control control GC gc new GC control gc set Font control get Font f Font Metrics gc get Font Metrics gc dispose  PixelConverter setFont getFont fFontMetrics getFontMetrics
see Dialog Page convert Height In Chars To Pixels public int convert Height In Chars To Pixels int chars return Dialog convert Height In Chars To Pixels f Font Metrics chars  DialogPage convertHeightInCharsToPixels convertHeightInCharsToPixels convertHeightInCharsToPixels fFontMetrics
see Dialog Page convert HorizontalDL Us To Pixels public int convert HorizontalDL Us To Pixels int dlus return Dialog convert HorizontalDL Us To Pixels f Font Metrics dlus  DialogPage convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels fFontMetrics
see Dialog Page convert VerticalDL Us To Pixels public int convert VerticalDL Us To Pixels int dlus return Dialog convert VerticalDL Us To Pixels f Font Metrics dlus  DialogPage convertVerticalDLUsToPixels convertVerticalDLUsToPixels convertVerticalDLUsToPixels fFontMetrics
see Dialog Page convert Width In Chars To Pixels public int convert Width In Chars To Pixels int chars return Dialog convert Width In Chars To Pixels f Font Metrics chars  DialogPage convertWidthInCharsToPixels convertWidthInCharsToPixels convertWidthInCharsToPixels fFontMetrics

Array List consumers new Array List public Shared Label Provider  ArrayList ArrayList SharedLabelProvider
public void connect Object consumer if consumers contains consumer consumers add consumer 
public void disconnect Object consumer consumers remove consumer if consumers size 0 dispose 
public void dispose if consumers size 0 for Enumeration enum images elements enum has More Elements Image image Image enum next Element image dispose images clear  hasMoreElements nextElement
public Image get Image Descriptor desc return get desc 0  ImageDescriptor
public Image get Image Descriptor desc int flags Object key desc if flags 0 key get Key desc hash Code flags Image image Image images get key if image null image create Image desc flags images put key image return image  ImageDescriptor getKey hashCode createImage
public Image get Image image int flags if flags 0 return image String key get Key image hash Code flags Image result Image Image images get key if result Image null result Image create Image image flags images put key result Image return result Image  getKey hashCode resultImage resultImage resultImage createImage resultImage resultImage
private String get Key long hash Code int flags return hash Code flags NON NLS 1 NON NLS 2  getKey hashCode hashCode
private Image create Image Image Descriptor base Desc int flags if flags 0 return base Desc create Image Image Descriptor lower Left get Lower Left Overlays flags Image Descriptor upper Right get Upper Right Overlays flags Image Descriptor lower Right get Lower Right Overlays flags Image Descriptor upper Left get Upper Left Overlays flags Overlay Icon comp Desc new Overlay Icon base Desc new Image Descriptor upper Right lower Right lower Left upper Left return comp Desc create Image  createImage ImageDescriptor baseDesc baseDesc createImage ImageDescriptor lowerLeft getLowerLeftOverlays ImageDescriptor upperRight getUpperRightOverlays ImageDescriptor lowerRight getLowerRightOverlays ImageDescriptor upperLeft getUpperLeftOverlays OverlayIcon compDesc OverlayIcon baseDesc ImageDescriptor upperRight lowerRight lowerLeft upperLeft compDesc createImage
private Image create Image Image base Image int flags if flags 0 return base Image Image Descriptor lower Left get Lower Left Overlays flags Image Descriptor upper Right get Upper Right Overlays flags Image Descriptor lower Right get Lower Right Overlays flags Image Descriptor upper Left get Upper Left Overlays flags Image Overlay Icon comp Desc new Image Overlay Icon base Image new Image Descriptor upper Right lower Right lower Left upper Left return comp Desc create Image  createImage baseImage baseImage ImageDescriptor lowerLeft getLowerLeftOverlays ImageDescriptor upperRight getUpperRightOverlays ImageDescriptor lowerRight getLowerRightOverlays ImageDescriptor upperLeft getUpperLeftOverlays ImageOverlayIcon compDesc ImageOverlayIcon baseImage ImageDescriptor upperRight lowerRight lowerLeft upperLeft compDesc createImage
private Image Descriptor get Lower Left Overlays int flags if flags F ERROR 0 return new Image Descriptor PDE Plugin Images DESC ERROR CO if flags F WARNING 0 return new Image Descriptor PDE Plugin Images DESC WARNING CO return null  ImageDescriptor getLowerLeftOverlays F_ERROR ImageDescriptor PDEPluginImages DESC_ERROR_CO F_WARNING ImageDescriptor PDEPluginImages DESC_WARNING_CO
private Image Descriptor get Upper Right Overlays int flags if flags F EXPORT 0 return new Image Descriptor PDE Plugin Images DESC EXPORT CO if flags F EDIT 0 return new Image Descriptor PDE Plugin Images DESC DOC CO if flags F JAVA 0 return new Image Descriptor PDE Plugin Images DESC JAVA CO return null  ImageDescriptor getUpperRightOverlays F_EXPORT ImageDescriptor PDEPluginImages DESC_EXPORT_CO F_EDIT ImageDescriptor PDEPluginImages DESC_DOC_CO F_JAVA ImageDescriptor PDEPluginImages DESC_JAVA_CO
private Image Descriptor get Lower Right Overlays int flags if flags F JAR 0 return new Image Descriptor PDE Plugin Images DESC JAR CO if flags F PROJECT 0 return new Image Descriptor PDE Plugin Images DESC PROJECT CO return null  ImageDescriptor getLowerRightOverlays F_JAR ImageDescriptor PDEPluginImages DESC_JAR_CO F_PROJECT ImageDescriptor PDEPluginImages DESC_PROJECT_CO
private Image Descriptor get Upper Left Overlays int flags if flags F EXTERNAL 0 return new Image Descriptor PDE Plugin Images DESC EXTERNAL CO if flags F BINARY 0 return new Image Descriptor PDE Plugin Images DESC BINARY CO return null  ImageDescriptor getUpperLeftOverlays F_EXTERNAL ImageDescriptor PDEPluginImages DESC_EXTERNAL_CO F_BINARY ImageDescriptor PDEPluginImages DESC_BINARY_CO
public String get Column Text Object obj int index return get Text obj  getColumnText getText
return get Text obj public Image get Column Image Object obj int index return get Image obj  getText getColumnImage getImage
public Image get Image From Plugin I Plugin Descriptor plugin Descriptor String subdirectory And Filename URL installURL plugin Descriptor get InstallURL return get Image FromURL installURL subdirectory And Filename  getImageFromPlugin IPluginDescriptor pluginDescriptor subdirectoryAndFilename pluginDescriptor getInstallURL getImageFromURL subdirectoryAndFilename
public Image get Image FromURL URL installURL String subdirectory And Filename Image image null try URL newURL new URL installURL subdirectory And Filename String key newURL to String image Image images get key if image null Image Descriptor desc Image Descriptor create FromURL newURL image desc create Image images put key image catch MalformedURL Exception e catch SWT Exception e return image  getImageFromURL subdirectoryAndFilename subdirectoryAndFilename toString ImageDescriptor ImageDescriptor createFromURL createImage MalformedURLException SWTException

Returns the standard display to be used The method first checks if the thread calling this method has an associated disaply If so this display is returned Otherwise the method returns the default display public static Display get Standard Display Display display display Display get Current if display null display Display get Default return display  getStandardDisplay getCurrent getDefault
Returns the shell for the given widget If the widget doesn t represent a SWT object that manage a shell code null code is returned return the shell for the given widget public static Shell get Shell Widget widget if widget instanceof Control return Control widget get Shell if widget instanceof Caret return Caret widget get Parent get Shell if widget instanceof Drag Source return Drag Source widget get Control get Shell if widget instanceof Drop Target return Drop Target widget get Control get Shell if widget instanceof Menu return Menu widget get Parent get Shell if widget instanceof Scroll Bar return Scroll Bar widget get Parent get Shell return null  getShell getShell getParent getShell DragSource DragSource getControl getShell DropTarget DropTarget getControl getShell getParent getShell ScrollBar ScrollBar getParent getShell
Returns a width hint for a button control public static int get Button Width Hint Button button if button get Font equals J Face Resources get Default Font button set Font J Face Resources get Dialog Font Pixel Converter converter new Pixel Converter button int width Hint converter convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH return Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x  getButtonWidthHint getFont JFaceResources getDefaultFont setFont JFaceResources getDialogFont PixelConverter PixelConverter widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint computeSize
Returns a height hint for a button control public static int get Button Heigth Hint Button button if button get Font equals J Face Resources get Default Font button set Font J Face Resources get Dialog Font Pixel Converter converter new Pixel Converter button return converter convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT  getButtonHeigthHint getFont JFaceResources getDefaultFont setFont JFaceResources getDialogFont PixelConverter PixelConverter convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT
Sets width and height hint for the button control b Note b This is a NOP if the button s layout data is not an instance of code Grid Data code paramthe button for which to set the dimension hint public static void set Button Dimension Hint Button button Dialog apply Dialog Font button Assert is Not Null button Object gd button get Layout Data if gd instanceof Grid Data Grid Data gd height Hint get Button Heigth Hint button Grid Data gd width Hint get Button Width Hint button  GridData setButtonDimensionHint applyDialogFont isNotNull getLayoutData GridData GridData heightHint getButtonHeigthHint GridData widthHint getButtonWidthHint
public static void set Dialog Size Dialog dialog int width int height Point computed Size dialog get Shell compute Size SWT DEFAULT SWT DEFAULT width Math max computed Size x width height Math max computed Size y height dialog get Shell set Size width height  setDialogSize computedSize getShell computeSize computedSize computedSize getShell setSize

Constructor for Copy To Clipboard Action protected Copy To Clipboard Action Clipboard clipboard set Enabled false this clipboard clipboard  CopyToClipboardAction CopyToClipboardAction setEnabled
Constructor for Copy To Clipboard Action param text protected Copy To Clipboard Action String text super text  CopyToClipboardAction CopyToClipboardAction
public void set Selection I Structured Selection selection this selection selection set Enabled can Copy selection  setSelection IStructuredSelection setEnabled canCopy
private boolean can Copy I Structured Selection selection if selection is Empty return false for Iterator iter selection iterator iter has Next Object obj iter next if obj instanceof File Adapter return false return true  canCopy IStructuredSelection isEmpty hasNext FileAdapter
public void run if selection is Empty return Array List files new Array List for Iterator iter selection iterator iter has Next Object obj iter next if obj instanceof File Adapter files add obj do Copy files  isEmpty ArrayList ArrayList hasNext FileAdapter doCopy
private void do Copy Array List files Get the file names and a string representation int len files size String file Names new String len String Buffer buf new String Buffer for int i 0 length len i length i File Adapter adapter File Adapter files get i File file adapter get File file Names i file get Absolute Path if i 0 buf append n NON NLS 1 buf append file get Name set the clipboard contents clipboard set Contents new Object file Names buf to String new Transfer File Transfer get Instance Text Transfer get Instance  doCopy ArrayList fileNames StringBuffer StringBuffer FileAdapter FileAdapter getFile fileNames getAbsolutePath getName setContents fileNames toString FileTransfer getInstance TextTransfer getInstance

Constructor for Plugins Content Provider public Dependencies Content Provider Dependencies View view Plugin Model Manager manager this manager manager manager add Plugin Model Listener this this view view  PluginsContentProvider DependenciesContentProvider DependenciesView PluginModelManager addPluginModelListener
public void dispose manager remove Plugin Model Listener this  removePluginModelListener
public void input Changed Viewer viewer Object old Input Object new Input this viewer Tree Viewer viewer if new Input null return view update Title new Input  inputChanged oldInput newInput TreeViewer newInput updateTitle newInput
see I Tree Content Provider get Children Object public Object get Children Object parent Element if parent Element instanceof I Plugin Model Base return new Object I Plugin Model Base parent Element get Plugin Base if parent Element instanceof I Plugin Base return create Import Objects I Plugin Base parent Element if parent Element instanceof Import Object Import Object iobj Import Object parent Element I Plugin plugin iobj get Plugin if plugin null return new Object 0 return create Import Objects plugin return new Object 0  ITreeContentProvider getChildren getChildren parentElement parentElement IPluginModelBase IPluginModelBase parentElement getPluginBase parentElement IPluginBase createImportObjects IPluginBase parentElement parentElement ImportObject ImportObject ImportObject parentElement IPlugin getPlugin createImportObjects
private Object create Import Objects I Plugin Base plugin I Plugin Import imports plugin get Imports Object result new Object imports length for int i 0 i imports length i result i new Import Object imports i return result  createImportObjects IPluginBase IPluginImport getImports ImportObject
see I Tree Content Provider get Parent Object public Object get Parent Object element return null  ITreeContentProvider getParent getParent
see I Tree Content Provider has Children Object public boolean has Children Object element return get Children element length 0  ITreeContentProvider hasChildren hasChildren getChildren
see I Structured Content Provider get Elements Object public Object get Elements Object input Element return get Children input Element  IStructuredContentProvider getElements getElements inputElement getChildren inputElement
viewer get Tree get Display async Exec new Runnable public void run int kind delta get Kind if viewer get Tree is Disposed return if kind Plugin Model Delta CHANGED 0 kind Plugin Model Delta ADDED 0 Don t know exactly what change the safest way out is to refresh viewer refresh return if kind Plugin Model Delta REMOVED 0 Model Entry removed delta get Removed Entries handle Removed removed if kind Plugin Model Delta ADDED 0 viewer refresh  getTree getDisplay asyncExec getKind getTree isDisposed PluginModelDelta PluginModelDelta PluginModelDelta ModelEntry getRemovedEntries handleRemoved PluginModelDelta
public void models Changed final Plugin Model Delta delta if viewer null viewer get Tree is Disposed return viewer get Tree get Display async Exec new Runnable public void run int kind delta get Kind if viewer get Tree is Disposed return if kind Plugin Model Delta CHANGED 0 kind Plugin Model Delta ADDED 0 Don t know exactly what change the safest way out is to refresh viewer refresh return if kind Plugin Model Delta REMOVED 0 Model Entry removed delta get Removed Entries handle Removed removed if kind Plugin Model Delta ADDED 0 viewer refresh  modelsChanged PluginModelDelta getTree isDisposed getTree getDisplay asyncExec getKind getTree isDisposed PluginModelDelta PluginModelDelta PluginModelDelta ModelEntry getRemovedEntries handleRemoved PluginModelDelta
private void handle Removed Model Entry removed for int i 0 i removed length i Model Entry entry removed i I Plugin Model Base model entry get Active Model if model null model equals viewer get Input viewer set Input null return viewer refresh  handleRemoved ModelEntry ModelEntry IPluginModelBase getActiveModel getInput setInput

Constructor for Plugins Label Provider public Dependencies Label Provider super shared Provider PDE Plugin get Default get Label Provider shared Provider connect this  PluginsLabelProvider DependenciesLabelProvider sharedProvider PDEPlugin getDefault getLabelProvider sharedProvider
public void dispose shared Provider disconnect this super dispose  sharedProvider
public String get Text Object obj return shared Provider get Text obj  getText sharedProvider getText
public Image get Image Object obj return shared Provider get Image obj  getImage sharedProvider getImage

class Focus On Selection Action extends Action public void run handle Focus On get Selected Object  FocusOnSelectionAction handleFocusOn getSelectedObject
public void update Object object set Enabled object null String name Label Provider tree Viewer get Label Provider get Text object set Text PDE Plugin get Formatted Message Dependencies View focus On Selection name NON NLS 1  setEnabled LabelProvider treeViewer getLabelProvider getText setText PDEPlugin getFormattedMessage DependenciesView focusOnSelection
property Listener new I Property Change Listener public void property Change Property Change Event event String property event get Property if property equals Main Preference Page PROP SHOW OBJECTS tree Viewer refresh  propertyListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty MainPreferencePage PROP_SHOW_OBJECTS treeViewer
Constructor for Plugins View public Dependencies View property Listener new I Property Change Listener public void property Change Property Change Event event String property event get Property if property equals Main Preference Page PROP SHOW OBJECTS tree Viewer refresh  PluginsView DependenciesView propertyListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty MainPreferencePage PROP_SHOW_OBJECTS treeViewer
public void dispose PDE Plugin get Default get Preference Store remove Property Change Listener property Listener super dispose  PDEPlugin getDefault getPreferenceStore removePropertyChangeListener propertyListener
tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e handle Selection Changed e get Selection  treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged getSelection
see I Workbench Part create Part Control Composite public void create Part Control Composite parent tree Viewer new Tree Viewer parent SWT MULTI SWT V SCROLL SWT H SCROLL drill Down Adapter new Drill Down Adapter tree Viewer Plugin Model Manager manager PDE Core get Default get Model Manager tree Viewer set Content Provider new Dependencies Content Provider this manager tree Viewer set Label Provider new Dependencies Label Provider tree Viewer set Sorter List Util PLUGIN SORTER tree Viewer set Auto Expand Level 2 make Actions I Action Bars action Bars get View Site get Action Bars contribute To Action Bars action Bars hook Context Menu hook Double Click Action tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e handle Selection Changed e get Selection PDE Plugin get Default get Preference Store add Property Change Listener property Listener get View Site set Selection Provider tree Viewer Workbench Help set Help tree Viewer get Control I Help Context Ids DEPENDENCIES VIEW  IWorkbenchPart createPartControl createPartControl treeViewer TreeViewer V_SCROLL H_SCROLL drillDownAdapter DrillDownAdapter treeViewer PluginModelManager PDECore getDefault getModelManager treeViewer setContentProvider DependenciesContentProvider treeViewer setLabelProvider DependenciesLabelProvider treeViewer setSorter ListUtil PLUGIN_SORTER treeViewer setAutoExpandLevel makeActions IActionBars actionBars getViewSite getActionBars contributeToActionBars actionBars hookContextMenu hookDoubleClickAction treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged getSelection PDEPlugin getDefault getPreferenceStore addPropertyChangeListener propertyListener getViewSite setSelectionProvider treeViewer WorkbenchHelp setHelp treeViewer getControl IHelpContextIds DEPENDENCIES_VIEW
private void contribute To Action Bars I Action Bars action Bars contribute To Local Tool Bar action Bars get Tool Bar Manager contribute To Drop Down Menu action Bars get Menu Manager  contributeToActionBars IActionBars actionBars contributeToLocalToolBar actionBars getToolBarManager contributeToDropDownMenu actionBars getMenuManager
private void contribute To Drop Down Menu I Menu Manager manager  contributeToDropDownMenu IMenuManager
private void contribute To Local Tool Bar I Tool Bar Manager manager drill Down Adapter add Navigation Actions manager  contributeToLocalToolBar IToolBarManager drillDownAdapter addNavigationActions
private void make Actions open Action new Action public void run handle Double Click  makeActions openAction handleDoubleClick
handle Double Click public void update Object object  handleDoubleClick
focus On Action new Action public void run handle Focus On  focusOnAction handleFocusOn
private void make Actions open Action new Action public void run handle Double Click public void update Object object open Action set Text PDE Plugin get Resource String Dependencies View open NON NLS 1 focus On Selection Action new Focus On Selection Action focus On Action new Action public void run handle Focus On focus On Action set Text PDE Plugin get Resource String Dependencies View focus On NON NLS 1  makeActions openAction handleDoubleClick openAction setText PDEPlugin getResourceString DependenciesView focusOnSelectionAction FocusOnSelectionAction focusOnAction handleFocusOn focusOnAction setText PDEPlugin getResourceString DependenciesView focusOn
private Object get Selected Object I Structured Selection selection I Structured Selection tree Viewer get Selection if selection is Empty selection size 1 return null return selection get First Element  getSelectedObject IStructuredSelection IStructuredSelection treeViewer getSelection isEmpty getFirstElement
private void fill Context Menu I Menu Manager manager I Structured Selection selection I Structured Selection tree Viewer get Selection if selection size 1 manager add open Action manager add new Separator focus On Selection Action update get Selected Object if focus On Selection Action is Enabled manager add focus On Selection Action manager add focus On Action if selection size 1 manager add new Separator Plugin Search Action Group action Group new Plugin Search Action Group action Group set Context new Action Context selection action Group fill Context Menu manager if tree Viewer get Input instanceof Workspace Plugin Model Base manager add new Unused Dependencies Action Workspace Plugin Model Base tree Viewer get Input manager add new Separator drill Down Adapter add Navigation Actions manager manager add new Separator I Workbench Action Constants MB ADDITIONS  fillContextMenu IMenuManager IStructuredSelection IStructuredSelection treeViewer getSelection openAction focusOnSelectionAction getSelectedObject focusOnSelectionAction isEnabled focusOnSelectionAction focusOnAction PluginSearchActionGroup actionGroup PluginSearchActionGroup actionGroup setContext ActionContext actionGroup fillContextMenu treeViewer getInput WorkspacePluginModelBase UnusedDependenciesAction WorkspacePluginModelBase treeViewer getInput drillDownAdapter addNavigationActions IWorkbenchActionConstants MB_ADDITIONS
menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager Dependencies View this fill Context Menu manager  menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager DependenciesView fillContextMenu
private void hook Context Menu Menu Manager menu Mgr new Menu Manager Popup Menu NON NLS 1 menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager Dependencies View this fill Context Menu manager Menu menu menu Mgr create Context Menu tree Viewer get Control tree Viewer get Control set Menu menu get Site register Context Menu menu Mgr tree Viewer  hookContextMenu MenuManager menuMgr MenuManager PopupMenu menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager DependenciesView fillContextMenu menuMgr createContextMenu treeViewer getControl treeViewer getControl setMenu getSite registerContextMenu menuMgr treeViewer
private void handle Double Click Object obj get Selected Object if obj instanceof Import Object I Plugin plugin Import Object obj get Plugin if plugin null obj plugin if obj instanceof I Plugin Base Manifest Editor open Plugin Editor I Plugin Base obj  handleDoubleClick getSelectedObject ImportObject IPlugin ImportObject getPlugin IPluginBase ManifestEditor openPluginEditor IPluginBase
private void handle Focus On Object new Focus if new Focus instanceof I Plugin Model Base open To new Focus if new Focus instanceof I Plugin Base open To I Plugin Base new Focus get Model if new Focus instanceof Import Object Import Object iimport Import Object new Focus I Plugin plugin iimport get Plugin if plugin null open To plugin get Model  handleFocusOn newFocus newFocus IPluginModelBase openTo newFocus newFocus IPluginBase openTo IPluginBase newFocus getModel newFocus ImportObject ImportObject ImportObject newFocus IPlugin getPlugin openTo getModel
private void handle Focus On Plugin Selection Dialog dialog new Plugin Selection Dialog tree Viewer get Control get Shell true false dialog create if dialog open Plugin Selection Dialog OK handle Focus On dialog get First Result  handleFocusOn PluginSelectionDialog PluginSelectionDialog treeViewer getControl getShell PluginSelectionDialog handleFocusOn getFirstResult
private void handle Selection Changed I Selection selection String text Object obj get Selected Object get View Site get Action Bars get Status Line Manager set Message text  handleSelectionChanged ISelection getSelectedObject getViewSite getActionBars getStatusLineManager setMessage
private void hook Double Click Action tree Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Double Click  hookDoubleClickAction treeViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleDoubleClick
private void hook Double Click Action tree Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Double Click  hookDoubleClickAction treeViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleDoubleClick
see I Workbench Part set Focus public void set Focus tree Viewer get Tree set Focus  IWorkbenchPart setFocus setFocus treeViewer getTree setFocus
void update Title Object new Input I Configuration Element config get Configuration Element if config null return String view Name config get Attribute name NON NLS 1 if new Input null new Input equals PDE Core get Default get Model Manager restore old set Title view Name set Title Tool Tip get Title else String name Label Provider tree Viewer get Label Provider get Text new Input set Title view Name name NON NLS 1 set Title Tool Tip get Title set Title Tool Tip get Input Path new Input  updateTitle newInput IConfigurationElement getConfigurationElement viewName getAttribute newInput newInput PDECore getDefault getModelManager setTitle viewName setTitleToolTip getTitle LabelProvider treeViewer getLabelProvider getText newInput setTitle viewName setTitleToolTip getTitle setTitleToolTip getInputPath newInput
public void open To Object object tree Viewer set Input object  openTo treeViewer setInput

Constructor for File Adapter Property Source public File Adapter Property Source super  FileAdapterPropertySource FileAdapterPropertySource
public void set Adapter File Adapter adapter this adapter adapter  setAdapter FileAdapter
see I Property Source get Editable Value public Object get Editable Value return null  IPropertySource getEditableValue getEditableValue
see I Property Source get Property Descriptors public I Property Descriptor get Property Descriptors if descriptors null descriptors new I Property Descriptor 5 descriptors 0 new Property Descriptor editable editable NON NLS 1 NON NLS 2 descriptors 1 new Property Descriptor last last modified NON NLS 1 NON NLS 2 descriptors 2 new Property Descriptor name name NON NLS 1 NON NLS 2 descriptors 3 new Property Descriptor path path NON NLS 1 NON NLS 2 descriptors 4 new Property Descriptor size size NON NLS 1 NON NLS 2 return descriptors  IPropertySource getPropertyDescriptors IPropertyDescriptor getPropertyDescriptors IPropertyDescriptor PropertyDescriptor PropertyDescriptor PropertyDescriptor PropertyDescriptor PropertyDescriptor
see I Property Source get Property Value Object public Object get Property Value Object id String key id to String if key equals editable NON NLS 1 return false NON NLS 1 if key equals last NON NLS 1 Date date new Date adapter get File last Modified return Date Format get Instance format date if key equals name NON NLS 1 return adapter get File get Name if key equals path NON NLS 1 return adapter get File get Absolute Path if key equals size NON NLS 1 return adapter get File length NON NLS 1 return null  IPropertySource getPropertyValue getPropertyValue toString getFile lastModified DateFormat getInstance getFile getName getFile getAbsolutePath getFile
see I Property Source is Property Set Object public boolean is Property Set Object id return false  IPropertySource isPropertySet isPropertySet
see I Property Source reset Property Value Object public void reset Property Value Object id  IPropertySource resetPropertyValue resetPropertyValue
see I Property Source set Property Value Object Object public void set Property Value Object id Object value  IPropertySource setPropertyValue setPropertyValue

private I Storage f Jar Entry File public Jar Entry Editor Input I Storage jar Entry File f Jar Entry File jar Entry File  IStorage fJarEntryFile JarEntryEditorInput IStorage jarEntryFile fJarEntryFile jarEntryFile
public boolean equals Object obj if this obj return true if obj instanceof Jar Entry Editor Input return false Jar Entry Editor Input other Jar Entry Editor Input obj return f Jar Entry File equals other f Jar Entry File  JarEntryEditorInput JarEntryEditorInput JarEntryEditorInput fJarEntryFile fJarEntryFile
see I Editor Input get Persistable public I Persistable Element get Persistable return null  IEditorInput getPersistable IPersistableElement getPersistable
see I Editor Input get Name public String get Name return f Jar Entry File get Name  IEditorInput getName getName fJarEntryFile getName
see I Editor Input get Full Path public String get Full Path return f Jar Entry File get Full Path to String  IEditorInput getFullPath getFullPath fJarEntryFile getFullPath toString
see I Editor Input get Content Type public String get Content Type return f Jar Entry File get Full Path get File Extension  IEditorInput getContentType getContentType fJarEntryFile getFullPath getFileExtension
see I Editor Input get Tool Tip Text public String get Tool Tip Text return f Jar Entry File get Full Path to String  IEditorInput getToolTipText getToolTipText fJarEntryFile getFullPath toString
see I Editor Input get Image Descriptor public Image Descriptor get Image Descriptor I Editor Registry registry PlatformUI get Workbench get Editor Registry return registry get Image Descriptor f Jar Entry File get Full Path get File Extension  IEditorInput getImageDescriptor ImageDescriptor getImageDescriptor IEditorRegistry getWorkbench getEditorRegistry getImageDescriptor fJarEntryFile getFullPath getFileExtension
see I Editor Input exists public boolean exists JAR entries can t be deleted return true  IEditorInput
see I Adaptable get Adapter Class public Object get Adapter Class adapter return null  IAdaptable getAdapter getAdapter
see I Storage Editor Input get Storage public I Storage get Storage return f Jar Entry File  IStorageEditorInput getStorage IStorage getStorage fJarEntryFile

Constructor for File Adapter Property Source public Model Entry Property Source super  FileAdapterPropertySource ModelEntryPropertySource
public void set Entry Model Entry entry this entry entry  setEntry ModelEntry
see I Property Source get Editable Value public Object get Editable Value return null  IPropertySource getEditableValue getEditableValue
see I Property Source get Property Descriptors public I Property Descriptor get Property Descriptors if descriptors null descriptors new I Property Descriptor 8 descriptors 0 new Property Descriptor kind kind NON NLS 1 NON NLS 2 descriptors 1 new Property Descriptor name name NON NLS 1 NON NLS 2 descriptors 2 new Property Descriptor fragment fragment NON NLS 1 NON NLS 2 descriptors 3 new Property Descriptor path path NON NLS 1 NON NLS 2 descriptors 4 new Property Descriptor id id NON NLS 1 NON NLS 2 descriptors 5 new Property Descriptor version version NON NLS 1 NON NLS 2 descriptors 6 new Property Descriptor provider provider NON NLS 1 NON NLS 2 descriptors 7 new Property Descriptor enabled enabled NON NLS 1 NON NLS 2 return descriptors  IPropertySource getPropertyDescriptors IPropertyDescriptor getPropertyDescriptors IPropertyDescriptor PropertyDescriptor PropertyDescriptor PropertyDescriptor PropertyDescriptor PropertyDescriptor PropertyDescriptor PropertyDescriptor PropertyDescriptor
see I Property Source get Property Value Object public Object get Property Value Object id String key id to String I Plugin Model Base model entry get Active Model I Resource resource model get Underlying Resource if key equals enabled NON NLS 1 return model is Enabled true false NON NLS 1 NON NLS 2 if key equals kind NON NLS 1 return resource null workspace external NON NLS 1 NON NLS 2 if key equals fragment NON NLS 1 return model is Fragment Model yes no NON NLS 1 NON NLS 2 if key equals name NON NLS 1 return model get Plugin Base get Translated Name if key equals path NON NLS 1 if resource null return resource get Location toOS String else return model get Install Location if key equals id NON NLS 1 return model get Plugin Base get Id if key equals version NON NLS 1 return model get Plugin Base get Version if key equals provider NON NLS 1 return model get Plugin Base get Provider Name return null  IPropertySource getPropertyValue getPropertyValue toString IPluginModelBase getActiveModel IResource getUnderlyingResource isEnabled isFragmentModel getPluginBase getTranslatedName getLocation toOSString getInstallLocation getPluginBase getId getPluginBase getVersion getPluginBase getProviderName
see I Property Source is Property Set Object public boolean is Property Set Object id return false  IPropertySource isPropertySet isPropertySet
see I Property Source reset Property Value Object public void reset Property Value Object id  IPropertySource resetPropertyValue resetPropertyValue
see I Property Source set Property Value Object Object public void set Property Value Object id Object value  IPropertySource setPropertyValue setPropertyValue

public void run I Action action if f Selection instanceof I Structured Selection I Structured Selection ssel I Structured Selection f Selection open Dependencies ssel get First Element  IAction fSelection IStructuredSelection IStructuredSelection IStructuredSelection fSelection openDependencies getFirstElement
private void open Dependencies Object el if el instanceof I File el I File el get Project if el instanceof I Java Project el I Java Project el get Project if el instanceof I Project el PDE Core get Default get Model Manager find Model I Project el if el instanceof I Plugin Object el I Plugin Object el get Model if el instanceof I Plugin Model Base open Dependencies I Plugin Model Base el  openDependencies IFile IFile getProject IJavaProject IJavaProject getProject IProject PDECore getDefault getModelManager findModel IProject IPluginObject IPluginObject getModel IPluginModelBase openDependencies IPluginModelBase
private void open Dependencies I Plugin Model Base model I Workbench Page page PDE Plugin get Active Page try I View Part view page show View PDE Plugin DEPENDENCIES VIEW ID Dependencies View view open To model catch Part Init Exception e PDE Plugin log Exception e  openDependencies IPluginModelBase IWorkbenchPage PDEPlugin getActivePage IViewPart showView PDEPlugin DEPENDENCIES_VIEW_ID DependenciesView openTo PartInitException PDEPlugin logException
see I Workbench Window Action Delegate dispose public void dispose  IWorkbenchWindowActionDelegate
see I Workbench Window Action Delegate init I Workbench Window public void init I Workbench Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow
see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection f Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection fSelection

Constructor for Plugins Content Provider public Plugins Content Provider Plugins View view Plugin Model Manager manager this manager manager manager add Plugin Model Listener this this view view java Provider new Standard Java Element Content Provider  PluginsContentProvider PluginsContentProvider PluginsView PluginModelManager addPluginModelListener javaProvider StandardJavaElementContentProvider
public void dispose manager remove Plugin Model Listener this  removePluginModelListener
public void input Changed Viewer viewer Object old Input Object new Input this viewer Tree Viewer viewer if new Input null return view update Title new Input  inputChanged oldInput newInput TreeViewer newInput updateTitle newInput
see I Tree Content Provider get Children Object public Object get Children Object parent Element if parent Element instanceof Plugin Model Manager return Plugin Model Manager parent Element get Entries if parent Element instanceof Model Entry Model Entry entry Model Entry parent Element return entry get Children if parent Element instanceof File Adapter return File Adapter parent Element get Children if parent Element instanceof I Package Fragment Root parent Element instanceof I Package Fragment parent Element instanceof I Compilation Unit return java Provider get Children parent Element return new Object 0  ITreeContentProvider getChildren getChildren parentElement parentElement PluginModelManager PluginModelManager parentElement getEntries parentElement ModelEntry ModelEntry ModelEntry parentElement getChildren parentElement FileAdapter FileAdapter parentElement getChildren parentElement IPackageFragmentRoot parentElement IPackageFragment parentElement ICompilationUnit javaProvider getChildren parentElement
see I Tree Content Provider get Parent Object public Object get Parent Object element if element instanceof Plugin Model Manager return null if element instanceof Model Entry return manager if element instanceof Entry File Adapter return Entry File Adapter element get Entry if element instanceof File Adapter return File Adapter element get Parent return null  ITreeContentProvider getParent getParent PluginModelManager ModelEntry EntryFileAdapter EntryFileAdapter getEntry FileAdapter FileAdapter getParent
see I Tree Content Provider has Children Object public boolean has Children Object element if element instanceof Plugin Model Manager return Plugin Model Manager element is Empty false if element instanceof Model Entry Model Entry entry Model Entry element return entry get Workspace Model null if element instanceof File Adapter File Adapter file Adapter File Adapter element return file Adapter has Children if element instanceof I Package Fragment Root element instanceof I Package Fragment element instanceof I Compilation Unit return java Provider has Children element return false  ITreeContentProvider hasChildren hasChildren PluginModelManager PluginModelManager isEmpty ModelEntry ModelEntry ModelEntry getWorkspaceModel FileAdapter FileAdapter fileAdapter FileAdapter fileAdapter hasChildren IPackageFragmentRoot IPackageFragment ICompilationUnit javaProvider hasChildren
see I Structured Content Provider get Elements Object public Object get Elements Object input Element return get Children input Element  IStructuredContentProvider getElements getElements inputElement getChildren inputElement
viewer get Tree get Display async Exec new Runnable public void run int kind delta get Kind if viewer get Tree is Disposed return if kind Plugin Model Delta CHANGED 0 Don t know exactly what change the safest way out is to refresh viewer refresh return if kind Plugin Model Delta REMOVED 0 Model Entry removed delta get Removed Entries viewer remove removed if kind Plugin Model Delta ADDED 0 Model Entry added delta get Added Entries for int i 0 i added length i if is Visible added i viewer add manager added i  getTree getDisplay asyncExec getKind getTree isDisposed PluginModelDelta PluginModelDelta ModelEntry getRemovedEntries PluginModelDelta ModelEntry getAddedEntries isVisible
public void models Changed final Plugin Model Delta delta if viewer null viewer get Tree is Disposed return viewer get Tree get Display async Exec new Runnable public void run int kind delta get Kind if viewer get Tree is Disposed return if kind Plugin Model Delta CHANGED 0 Don t know exactly what change the safest way out is to refresh viewer refresh return if kind Plugin Model Delta REMOVED 0 Model Entry removed delta get Removed Entries viewer remove removed if kind Plugin Model Delta ADDED 0 Model Entry added delta get Added Entries for int i 0 i added length i if is Visible added i viewer add manager added i  modelsChanged PluginModelDelta getTree isDisposed getTree getDisplay asyncExec getKind getTree isDisposed PluginModelDelta PluginModelDelta ModelEntry getRemovedEntries PluginModelDelta ModelEntry getAddedEntries isVisible
private boolean is Visible Model Entry entry Viewer Filter filters viewer get Filters for int i 0 i filters length i Viewer Filter filter filters i if filter select viewer manager entry return false return true  isVisible ModelEntry ViewerFilter getFilters ViewerFilter

Navigator Drag Action constructor comment public Plugins Drag Adapter I Selection Provider provider selection Provider provider  NavigatorDragAction PluginsDragAdapter ISelectionProvider selectionProvider
Returns the data to be transferred in a drag and drop operation public void drag Set Data Drag Source Event event resort to a file transfer if File Transfer get Instance is Supported Type event data Type return File Adapter files get Selected Files Get the path of each file and set as the drag data final int len files length String file Names new String len for int i 0 length len i length i file Names i files i get File get Absolute Path event data file Names  dragSetData DragSourceEvent FileTransfer getInstance isSupportedType dataType FileAdapter getSelectedFiles fileNames fileNames getFile getAbsolutePath fileNames
All selection must be files or folders public void drag Start Drag Source Event event Workaround for 1GEUS9V Drag Source drag Source Drag Source event widget Control control drag Source get Control if control control get Display get Focus Control event doit false return File Adapter files get Selected Files if files length 0 event doit false return event doit true  dragStart DragSourceEvent DragSource dragSource DragSource dragSource getControl getDisplay getFocusControl FileAdapter getSelectedFiles
private File Adapter get Selected Files I Structured Selection selection I Structured Selection selection Provider get Selection Array List files new Array List for Iterator iter selection iterator iter has Next Object obj iter next if obj instanceof File Adapter files add obj else return new File Adapter 0 return File Adapter files to Array new File Adapter files size  FileAdapter getSelectedFiles IStructuredSelection IStructuredSelection selectionProvider getSelection ArrayList ArrayList hasNext FileAdapter FileAdapter FileAdapter toArray FileAdapter

Constructor for Plugins Label Provider public Plugins Label Provider super shared Provider PDE Plugin get Default get Label Provider folder Image PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJ FOLDER project Image PlatformUI get Workbench get Shared Images get Image IDE Shared Images IMG OBJ PROJECT shared Provider connect this  PluginsLabelProvider PluginsLabelProvider sharedProvider PDEPlugin getDefault getLabelProvider folderImage getWorkbench getSharedImages getImage ISharedImages IMG_OBJ_FOLDER projectImage getWorkbench getSharedImages getImage SharedImages IMG_OBJ_PROJECT sharedProvider
public void dispose shared Provider disconnect this super dispose  sharedProvider
public String get Text Object obj if obj instanceof Model Entry return get Text Model Entry obj if obj instanceof File Adapter return get Text File Adapter obj if obj instanceof I Package Fragment Root use the short name I Path path I Package Fragment Root obj get Path return path last Segment if obj instanceof I Java Element return I Java Element obj get Element Name if obj instanceof I Storage return I Storage obj get Name return super get Text obj  getText ModelEntry getText ModelEntry FileAdapter getText FileAdapter IPackageFragmentRoot IPath IPackageFragmentRoot getPath lastSegment IJavaElement IJavaElement getElementName IStorage IStorage getName getText
public Image get Image Object obj if obj instanceof Model Entry return get Image Model Entry obj if obj instanceof File Adapter return get Image File Adapter obj if obj instanceof I Package Fragment Root I Package Fragment Root root I Package Fragment Root obj boolean has Source false try has Source root get Source Attachment Path null catch Java Model Exception e return JavaUI get Shared Images get Image has Source org eclipse jdt ui I Shared Images IMG OBJS EXTERNAL ARCHIVE WITH SOURCE org eclipse jdt ui I Shared Images IMG OBJS EXTERNAL ARCHIVE if obj instanceof I Package Fragment return JavaUI get Shared Images get Image org eclipse jdt ui I Shared Images IMG OBJS PACKAGE if obj instanceof I Compilation Unit return JavaUI get Shared Images get Image org eclipse jdt ui I Shared Images IMG OBJS CUNIT if obj instanceof I Class File return JavaUI get Shared Images get Image org eclipse jdt ui I Shared Images IMG OBJS CFILE if obj instanceof I Storage String name I Storage obj get Name return get File Image name return null  getImage ModelEntry getImage ModelEntry FileAdapter getImage FileAdapter IPackageFragmentRoot IPackageFragmentRoot IPackageFragmentRoot hasSource hasSource getSourceAttachmentPath JavaModelException getSharedImages getImage hasSource ISharedImages IMG_OBJS_EXTERNAL_ARCHIVE_WITH_SOURCE ISharedImages IMG_OBJS_EXTERNAL_ARCHIVE IPackageFragment getSharedImages getImage ISharedImages IMG_OBJS_PACKAGE ICompilationUnit getSharedImages getImage ISharedImages IMG_OBJS_CUNIT IClassFile getSharedImages getImage ISharedImages IMG_OBJS_CFILE IStorage IStorage getName getFileImage
private String get Text Model Entry entry I Plugin Model Base model entry get Active Model String text shared Provider get Text model if model is Enabled false text PDE Plugin get Formatted Message Plugins View disabled text NON NLS 1 return text  getText ModelEntry IPluginModelBase getActiveModel sharedProvider getText isEnabled PDEPlugin getFormattedMessage PluginsView
private String get Text File Adapter file return file get File get Name  getText FileAdapter getFile getName
private Image get Image Model Entry entry I Plugin Model Base model entry get Active Model if model get Underlying Resource null return project Image if model instanceof I Plugin Model return shared Provider get Object Image I Plugin model get Plugin Base true entry is In Java Search else return shared Provider get Object Image I Fragment model get Plugin Base true entry is In Java Search  getImage ModelEntry IPluginModelBase getActiveModel getUnderlyingResource projectImage IPluginModel sharedProvider getObjectImage IPlugin getPluginBase isInJavaSearch sharedProvider getObjectImage IFragment getPluginBase isInJavaSearch
private Image get Image File Adapter file Adapter if file Adapter is Directory return folder Image return get File Image file Adapter get File get Name  getImage FileAdapter fileAdapter fileAdapter isDirectory folderImage getFileImage fileAdapter getFile getName
private Image get File Image String file Name Image Descriptor desc PlatformUI get Workbench get Editor Registry get Image Descriptor file Name return shared Provider get desc  getFileImage fileName ImageDescriptor getWorkbench getEditorRegistry getImageDescriptor fileName sharedProvider

class Disabled Filter extends Viewer Filter public boolean select Viewer v Object parent Object element if element instanceof Model Entry Model Entry entry Model Entry element if entry get Workspace Model null I Plugin Model Base external Model entry get External Model if external Model null return external Model is Enabled return true  DisabledFilter ViewerFilter ModelEntry ModelEntry ModelEntry getWorkspaceModel IPluginModelBase externalModel getExternalModel externalModel externalModel isEnabled
class Workspace Filter extends Viewer Filter public boolean select Viewer v Object parent Object element if element instanceof Model Entry Model Entry entry Model Entry element return entry get Workspace Model null return true  WorkspaceFilter ViewerFilter ModelEntry ModelEntry ModelEntry getWorkspaceModel
class Java Filter extends Viewer Filter public boolean select Viewer v Object parent Object element if element instanceof I Package Fragment I Package Fragment package Fragment I Package Fragment element try return package Fragment has Children catch Java Model Exception e return false return true  JavaFilter ViewerFilter IPackageFragment IPackageFragment packageFragment IPackageFragment packageFragment hasChildren JavaModelException
property Listener new I Property Change Listener public void property Change Property Change Event event String property event get Property if property equals Main Preference Page PROP SHOW OBJECTS tree Viewer refresh  propertyListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty MainPreferencePage PROP_SHOW_OBJECTS treeViewer
Constructor for Plugins View public Plugins View property Listener new I Property Change Listener public void property Change Property Change Event event String property event get Property if property equals Main Preference Page PROP SHOW OBJECTS tree Viewer refresh  PluginsView PluginsView propertyListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty MainPreferencePage PROP_SHOW_OBJECTS treeViewer
public void dispose PDE Plugin get Default get Preference Store remove Property Change Listener property Listener open Dependencies Action dispose if clipboard null clipboard dispose clipboard null super dispose  PDEPlugin getDefault getPreferenceStore removePropertyChangeListener propertyListener openDependenciesAction
tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e handle Selection Changed e get Selection  treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged getSelection
see I Workbench Part create Part Control Composite public void create Part Control Composite parent tree Viewer new Tree Viewer parent SWT MULTI SWT V SCROLL SWT H SCROLL drill Down Adapter new Drill Down Adapter tree Viewer Plugin Model Manager manager PDE Core get Default get Model Manager tree Viewer set Content Provider new Plugins Content Provider this manager tree Viewer set Label Provider new Plugins Label Provider tree Viewer set Sorter List Util PLUGIN SORTER init Drag And Drop make Actions init Filters I Action Bars action Bars get View Site get Action Bars contribute To Action Bars action Bars hook Context Menu hook Double Click Action tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e handle Selection Changed e get Selection tree Viewer set Input manager PDE Plugin get Default get Preference Store add Property Change Listener property Listener get View Site set Selection Provider tree Viewer Workbench Help set Help tree Viewer get Control I Help Context Ids PLUGINS VIEW  IWorkbenchPart createPartControl createPartControl treeViewer TreeViewer V_SCROLL H_SCROLL drillDownAdapter DrillDownAdapter treeViewer PluginModelManager PDECore getDefault getModelManager treeViewer setContentProvider PluginsContentProvider treeViewer setLabelProvider PluginsLabelProvider treeViewer setSorter ListUtil PLUGIN_SORTER initDragAndDrop makeActions initFilters IActionBars actionBars getViewSite getActionBars contributeToActionBars actionBars hookContextMenu hookDoubleClickAction treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged getSelection treeViewer setInput PDEPlugin getDefault getPreferenceStore addPropertyChangeListener propertyListener getViewSite setSelectionProvider treeViewer WorkbenchHelp setHelp treeViewer getControl IHelpContextIds PLUGINS_VIEW
private void contribute To Action Bars I Action Bars action Bars contribute To Local Tool Bar action Bars get Tool Bar Manager contribute To Drop Down Menu action Bars get Menu Manager  contributeToActionBars IActionBars actionBars contributeToLocalToolBar actionBars getToolBarManager contributeToDropDownMenu actionBars getMenuManager
private void contribute To Drop Down Menu I Menu Manager manager manager add workspace Filter Action manager add disabled Filter Action  contributeToDropDownMenu IMenuManager workspaceFilterAction disabledFilterAction
private void contribute To Local Tool Bar I Tool Bar Manager manager drill Down Adapter add Navigation Actions manager  contributeToLocalToolBar IToolBarManager drillDownAdapter addNavigationActions
clipboard new Clipboard tree Viewer get Tree get Display open Action new Action public void run handle Double Click  treeViewer getTree getDisplay openAction handleDoubleClick
open Dependencies Adapter new Action public void run Model Entry entry get Enclosing Entry I Plugin Model Base model entry get Active Model open Dependencies Action selection Changed this new Structured Selection model open Dependencies Action run this  openDependenciesAdapter ModelEntry getEnclosingEntry IPluginModelBase getActiveModel openDependenciesAction selectionChanged StructuredSelection openDependenciesAction
import Binary Action new Action public void run handle Import false  importBinaryAction handleImport
import Binary Action set Text PDE Plugin get Resource String Plugins View as Binary Project NON NLS 1 import Source Action new Action public void run handle Import true  importBinaryAction setText PDEPlugin getResourceString PluginsView asBinaryProject importSourceAction handleImport
disabled Filter Action new Action public void run boolean checked disabled Filter Action is Checked if checked tree Viewer remove Filter disabled Filter else tree Viewer add Filter disabled Filter get Settings put disabled Filter checked NON NLS 1  disabledFilterAction disabledFilterAction isChecked treeViewer removeFilter disabledFilter treeViewer addFilter disabledFilter getSettings disabledFilter
workspace Filter Action new Action public void run boolean checked workspace Filter Action is Checked if checked tree Viewer remove Filter workspace Filter else tree Viewer add Filter workspace Filter get Settings put workspace Filter checked NON NLS 1  workspaceFilterAction workspaceFilterAction isChecked treeViewer removeFilter workspaceFilter treeViewer addFilter workspaceFilter getSettings workspaceFilter
open Text Editor Action new Action public void run handle Open Text Editor get Selected File null  openTextEditorAction handleOpenTextEditor getSelectedFile
open System Editor Action new Action public void run handle Open System Editor get Selected File  openSystemEditorAction handleOpenSystemEditor getSelectedFile
open System Editor Action set Text PDE Plugin get Resource String Plugins View system Editor NON NLS 1 open Manifest Action new Action public void run handle Open Manifest Editor get Selected File  openSystemEditorAction setText PDEPlugin getResourceString PluginsView systemEditor openManifestAction handleOpenManifestEditor getSelectedFile
open Schema Action new Action public void run handle Open Schema Editor get Selected File  openSchemaAction handleOpenSchemaEditor getSelectedFile
select Dependent Action new Action public void run handle Select Dependent  selectDependentAction handleSelectDependent
select Dependent Action set Text PDE Plugin get Resource String Plugins View dependent Plugins NON NLS 1 select In Java Search Action new Action public void run handle Select In Java Search  selectDependentAction setText PDEPlugin getResourceString PluginsView dependentPlugins selectInJavaSearchAction handleSelectInJavaSearch
add To Java Search Action new Action public void run handle Java Search true  addToJavaSearchAction handleJavaSearch
remove From Java Search Action new Action public void run handle Java Search false  removeFromJavaSearchAction handleJavaSearch
private void make Actions clipboard new Clipboard tree Viewer get Tree get Display open Action new Action public void run handle Double Click open Action set Text PDE Plugin get Resource String Plugins View open NON NLS 1 open Dependencies Action new Open Dependencies Action open Dependencies Action init PDE Plugin get Active Workbench Window open Dependencies Adapter new Action public void run Model Entry entry get Enclosing Entry I Plugin Model Base model entry get Active Model open Dependencies Action selection Changed this new Structured Selection model open Dependencies Action run this open Dependencies Adapter set Text PDE Plugin get Resource String Plugins View open Dependencies NON NLS 1 import Binary Action new Action public void run handle Import false import Binary Action set Text PDE Plugin get Resource String Plugins View as Binary Project NON NLS 1 import Source Action new Action public void run handle Import true import Source Action set Text PDE Plugin get Resource String Plugins View as Source Project NON NLS 1 disabled Filter Action new Action public void run boolean checked disabled Filter Action is Checked if checked tree Viewer remove Filter disabled Filter else tree Viewer add Filter disabled Filter get Settings put disabled Filter checked NON NLS 1 disabled Filter Action set Text PDE Plugin get Resource String Plugins View show Disabled NON NLS 1 disabled Filter Action set Checked false workspace Filter Action new Action public void run boolean checked workspace Filter Action is Checked if checked tree Viewer remove Filter workspace Filter else tree Viewer add Filter workspace Filter get Settings put workspace Filter checked NON NLS 1 workspace Filter Action set Text PDE Plugin get Resource String Plugins View show Workspace NON NLS 1 workspace Filter Action set Checked true open Text Editor Action new Action public void run handle Open Text Editor get Selected File null open Text Editor Action set Text PDE Plugin get Resource String Plugins View text Editor NON NLS 1 open Text Editor Action set Image Descriptor PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG OBJ FILE open System Editor Action new Action public void run handle Open System Editor get Selected File open System Editor Action set Text PDE Plugin get Resource String Plugins View system Editor NON NLS 1 open Manifest Action new Action public void run handle Open Manifest Editor get Selected File open Manifest Action set Text PDE Plugin get Resource String Plugins View manifest Editor NON NLS 1 open Schema Action new Action public void run handle Open Schema Editor get Selected File open Schema Action set Text PDE Plugin get Resource String Plugins View schema Editor NON NLS 1 copy Action new Copy To Clipboard Action clipboard copy Action set Text PDE Plugin get Resource String Plugins View copy NON NLS 1 select Dependent Action new Action public void run handle Select Dependent select Dependent Action set Text PDE Plugin get Resource String Plugins View dependent Plugins NON NLS 1 select In Java Search Action new Action public void run handle Select In Java Search select In Java Search Action set Text PDE Plugin get Resource String Plugins View plugins In Java Search NON NLS 1 add To Java Search Action new Action public void run handle Java Search true add To Java Search Action set Text PDE Plugin get Resource String Plugins View add To Java Search NON NLS 1 remove From Java Search Action new Action public void run handle Java Search false remove From Java Search Action set Text PDE Plugin get Resource String Plugins View remove From Java Search NON NLS 1 show In Navigator Action new Show In Workspace Action I Page Layout ID RES NAV tree Viewer show In Navigator Action set Text PDE Plugin get Resource String Plugins View show In Navigator NON NLS 1 show In Packages Action new Show In Workspace Action JavaUI ID PACKAGES tree Viewer show In Packages Action set Text PDE Plugin get Resource String Plugins View show In Package Explorer NON NLS 1 open Class File Action new Open Action get View Site  makeActions treeViewer getTree getDisplay openAction handleDoubleClick openAction setText PDEPlugin getResourceString PluginsView openDependenciesAction OpenDependenciesAction openDependenciesAction PDEPlugin getActiveWorkbenchWindow openDependenciesAdapter ModelEntry getEnclosingEntry IPluginModelBase getActiveModel openDependenciesAction selectionChanged StructuredSelection openDependenciesAction openDependenciesAdapter setText PDEPlugin getResourceString PluginsView openDependencies importBinaryAction handleImport importBinaryAction setText PDEPlugin getResourceString PluginsView asBinaryProject importSourceAction handleImport importSourceAction setText PDEPlugin getResourceString PluginsView asSourceProject disabledFilterAction disabledFilterAction isChecked treeViewer removeFilter disabledFilter treeViewer addFilter disabledFilter getSettings disabledFilter disabledFilterAction setText PDEPlugin getResourceString PluginsView showDisabled disabledFilterAction setChecked workspaceFilterAction workspaceFilterAction isChecked treeViewer removeFilter workspaceFilter treeViewer addFilter workspaceFilter getSettings workspaceFilter workspaceFilterAction setText PDEPlugin getResourceString PluginsView showWorkspace workspaceFilterAction setChecked openTextEditorAction handleOpenTextEditor getSelectedFile openTextEditorAction setText PDEPlugin getResourceString PluginsView textEditor openTextEditorAction setImageDescriptor getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_OBJ_FILE openSystemEditorAction handleOpenSystemEditor getSelectedFile openSystemEditorAction setText PDEPlugin getResourceString PluginsView systemEditor openManifestAction handleOpenManifestEditor getSelectedFile openManifestAction setText PDEPlugin getResourceString PluginsView manifestEditor openSchemaAction handleOpenSchemaEditor getSelectedFile openSchemaAction setText PDEPlugin getResourceString PluginsView schemaEditor copyAction CopyToClipboardAction copyAction setText PDEPlugin getResourceString PluginsView selectDependentAction handleSelectDependent selectDependentAction setText PDEPlugin getResourceString PluginsView dependentPlugins selectInJavaSearchAction handleSelectInJavaSearch selectInJavaSearchAction setText PDEPlugin getResourceString PluginsView pluginsInJavaSearch addToJavaSearchAction handleJavaSearch addToJavaSearchAction setText PDEPlugin getResourceString PluginsView addToJavaSearch removeFromJavaSearchAction handleJavaSearch removeFromJavaSearchAction setText PDEPlugin getResourceString PluginsView removeFromJavaSearch showInNavigatorAction ShowInWorkspaceAction IPageLayout ID_RES_NAV treeViewer showInNavigatorAction setText PDEPlugin getResourceString PluginsView showInNavigator showInPackagesAction ShowInWorkspaceAction ID_PACKAGES treeViewer showInPackagesAction setText PDEPlugin getResourceString PluginsView showInPackageExplorer openClassFileAction OpenAction getViewSite
private File Adapter get Selected File Object obj get Selected Object if obj instanceof File Adapter return File Adapter obj return null  FileAdapter getSelectedFile getSelectedObject FileAdapter FileAdapter
private Model Entry get Enclosing Entry Object obj get Selected Object if obj null return null if obj instanceof Model Entry return Model Entry obj if obj instanceof File Adapter File Adapter file File Adapter obj if file is Manifest File Adapter parent file get Parent if parent instanceof Entry File Adapter return Entry File Adapter parent get Entry return null  ModelEntry getEnclosingEntry getSelectedObject ModelEntry ModelEntry FileAdapter FileAdapter FileAdapter isManifest FileAdapter getParent EntryFileAdapter EntryFileAdapter getEntry
private Object get Selected Object I Structured Selection selection I Structured Selection tree Viewer get Selection if selection is Empty selection size 1 return null return selection get First Element  getSelectedObject IStructuredSelection IStructuredSelection treeViewer getSelection isEmpty getFirstElement
private void fill Context Menu I Menu Manager manager I Structured Selection selection I Structured Selection tree Viewer get Selection if selection size 1 Object sobj selection get First Element boolean add Separator false if sobj instanceof File Adapter File Adapter sobj is Directory false manager add open Action Menu Manager open With Menu new Menu Manager PDE Plugin get Resource String Plugins View open With NON NLS 1 fill Open With Menu open With Menu sobj manager add open With Menu add Separator true if sobj instanceof I Storage manager add open Action add Separator true if sobj instanceof I Class File manager add open Class File Action add Separator true Model Entry entry get Enclosing Entry if entry null manager add open Dependencies Adapter manager add new Separator Plugin Search Action Group action Group new Plugin Search Action Group action Group set Context new Action Context selection action Group fill Context Menu manager add Separator true if add Separator manager add new Separator if selection size 0 boolean add Separator false if show In Navigator Action is Applicable manager add show In Navigator Action add Separator true if show In Packages Action is Applicable manager add show In Packages Action add Separator true if add Separator manager add new Separator if can Import selection Menu Manager import Menu new Menu Manager PDE Plugin get Resource String Plugins View import NON NLS 1 import Menu add import Binary Action import Menu add import Source Action manager add import Menu manager add new Separator add Separator false if can Do Java Search Operation selection true manager add add To Java Search Action add Separator true if can Do Java Search Operation selection false manager add remove From Java Search Action add Separator true if add Separator manager add new Separator copy Action set Selection selection manager add copy Action I Menu Manager selection Menu new Menu Manager PDE Plugin get Resource String Plugins View select NON NLS 1 manager add selection Menu if selection size 0 selection Menu add select Dependent Action selection Menu add select In Java Search Action manager add new Separator drill Down Adapter add Navigation Actions manager manager add new Separator I Workbench Action Constants MB ADDITIONS  fillContextMenu IMenuManager IStructuredSelection IStructuredSelection treeViewer getSelection getFirstElement addSeparator FileAdapter FileAdapter isDirectory openAction MenuManager openWithMenu MenuManager PDEPlugin getResourceString PluginsView openWith fillOpenWithMenu openWithMenu openWithMenu addSeparator IStorage openAction addSeparator IClassFile openClassFileAction addSeparator ModelEntry getEnclosingEntry openDependenciesAdapter PluginSearchActionGroup actionGroup PluginSearchActionGroup actionGroup setContext ActionContext actionGroup fillContextMenu addSeparator addSeparator addSeparator showInNavigatorAction isApplicable showInNavigatorAction addSeparator showInPackagesAction isApplicable showInPackagesAction addSeparator addSeparator canImport MenuManager importMenu MenuManager PDEPlugin getResourceString PluginsView importMenu importBinaryAction importMenu importSourceAction importMenu addSeparator canDoJavaSearchOperation addToJavaSearchAction addSeparator canDoJavaSearchOperation removeFromJavaSearchAction addSeparator addSeparator copyAction setSelection copyAction IMenuManager selectionMenu MenuManager PDEPlugin getResourceString PluginsView selectionMenu selectionMenu selectDependentAction selectionMenu selectInJavaSearchAction drillDownAdapter addNavigationActions IWorkbenchActionConstants MB_ADDITIONS
private void fill Open With Menu I Menu Manager manager Object obj File Adapter adapter File Adapter obj String editor Id adapter get Editor Id String file Name adapter get File get Name String lc File Name file Name to Lower Case Image Descriptor desc PlatformUI get Workbench get Editor Registry get Image Descriptor file Name if lc File Name equals plugin xml NON NLS 1 lc File Name equals fragment xml NON NLS 1 lc File Name equals manifest mf NON NLS 1 open Manifest Action set Image Descriptor desc manager add open Manifest Action manager add new Separator open Manifest Action set Checked editor Id null editor Id equals PDE Plugin MANIFEST EDITOR ID if lc File Name ends With mxsd lc File Name ends With exsd NON NLS 1 NON NLS 2 open Schema Action set Image Descriptor desc manager add open Schema Action manager add new Separator open Schema Action set Checked editor Id null editor Id equals PDE Plugin SCHEMA EDITOR ID manager add open Text Editor Action open Text Editor Action set Checked editor Id null editor Id equals DEFAULT EDITOR ID open System Editor Action set Image Descriptor desc open System Editor Action set Checked editor Id null editor Id equals system NON NLS 1 manager add open System Editor Action  fillOpenWithMenu IMenuManager FileAdapter FileAdapter editorId getEditorId fileName getFile getName lcFileName fileName toLowerCase ImageDescriptor getWorkbench getEditorRegistry getImageDescriptor fileName lcFileName lcFileName lcFileName openManifestAction setImageDescriptor openManifestAction openManifestAction setChecked editorId editorId PDEPlugin MANIFEST_EDITOR_ID lcFileName endsWith lcFileName endsWith openSchemaAction setImageDescriptor openSchemaAction openSchemaAction setChecked editorId editorId PDEPlugin SCHEMA_EDITOR_ID openTextEditorAction openTextEditorAction setChecked editorId editorId DEFAULT_EDITOR_ID openSystemEditorAction setImageDescriptor openSystemEditorAction setChecked editorId editorId openSystemEditorAction
private boolean can Import I Structured Selection selection int nexternal 0 for Iterator iter selection iterator iter has Next Object obj iter next if obj instanceof Model Entry Model Entry entry Model Entry obj if entry get Workspace Model null nexternal else return false return nexternal 0  canImport IStructuredSelection hasNext ModelEntry ModelEntry ModelEntry getWorkspaceModel
private boolean can Do Java Search Operation I Structured Selection selection boolean add int nhits 0 for Iterator iter selection iterator iter has Next Object obj iter next if obj instanceof Model Entry Model Entry entry Model Entry obj if entry get Workspace Model null if add entry is In Java Search false nhits if add entry is In Java Search nhits return nhits 0  canDoJavaSearchOperation IStructuredSelection hasNext ModelEntry ModelEntry ModelEntry getWorkspaceModel isInJavaSearch isInJavaSearch
protected void init Drag And Drop int ops DND DROP COPY DND DROP MOVE Transfer transfers new Transfer File Transfer get Instance tree Viewer add Drag Support ops transfers new Plugins Drag Adapter I Selection Provider tree Viewer  initDragAndDrop DROP_COPY DROP_MOVE FileTransfer getInstance treeViewer addDragSupport PluginsDragAdapter ISelectionProvider treeViewer
private I Dialog Settings get Settings I Dialog Settings master PDE Plugin get Default get Dialog Settings I Dialog Settings section master get Section plugins View NON NLS 1 if section null section master add New Section plugins View NON NLS 1 return section  IDialogSettings getSettings IDialogSettings PDEPlugin getDefault getDialogSettings IDialogSettings getSection pluginsView addNewSection pluginsView
private void init Filters boolean workspace false boolean disabled true I Dialog Settings settings get Settings workspace settings get Boolean workspace Filter NON NLS 1 disabled settings get Boolean disabled Filter NON NLS 1 if workspace tree Viewer add Filter workspace Filter if disabled tree Viewer add Filter disabled Filter tree Viewer add Filter java Filter workspace Filter Action set Checked workspace disabled Filter Action set Checked disabled  initFilters IDialogSettings getSettings getBoolean workspaceFilter getBoolean disabledFilter treeViewer addFilter workspaceFilter treeViewer addFilter disabledFilter treeViewer addFilter javaFilter workspaceFilterAction setChecked disabledFilterAction setChecked
menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager Plugins View this fill Context Menu manager  menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager PluginsView fillContextMenu
private void hook Context Menu Menu Manager menu Mgr new Menu Manager Popup Menu NON NLS 1 menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager Plugins View this fill Context Menu manager Menu menu menu Mgr create Context Menu tree Viewer get Control tree Viewer get Control set Menu menu get Site register Context Menu menu Mgr tree Viewer  hookContextMenu MenuManager menuMgr MenuManager PopupMenu menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager PluginsView fillContextMenu menuMgr createContextMenu treeViewer getControl treeViewer getControl setMenu getSite registerContextMenu menuMgr treeViewer
private void handle Double Click Object obj get Selected Object if obj instanceof Model Entry tree Viewer set Expanded State obj tree Viewer get Expanded State obj if obj instanceof File Adapter File Adapter adapter File Adapter obj if adapter is Directory tree Viewer set Expanded State adapter tree Viewer get Expanded State adapter return String editor Id adapter get Editor Id if editor Id null editor Id equals system NON NLS 1 handle Open System Editor adapter else handle Open Text Editor adapter editor Id if obj instanceof I Class File open Class File Action run if obj instanceof I Storage handle Open Storage I Storage obj  handleDoubleClick getSelectedObject ModelEntry treeViewer setExpandedState treeViewer getExpandedState FileAdapter FileAdapter FileAdapter isDirectory treeViewer setExpandedState treeViewer getExpandedState editorId getEditorId editorId editorId handleOpenSystemEditor handleOpenTextEditor editorId IClassFile openClassFileAction IStorage handleOpenStorage IStorage
private void handle Open Storage I Storage obj I Workbench Page page PDE Plugin get Active Page I Editor Input input new Jar Entry Editor Input I Storage obj try page open Editor input DEFAULT EDITOR ID catch Part Init Exception e PDE Plugin log Exception e  handleOpenStorage IStorage IWorkbenchPage PDEPlugin getActivePage IEditorInput JarEntryEditorInput IStorage openEditor DEFAULT_EDITOR_ID PartInitException PDEPlugin logException
private void handle Import boolean extract Source I Structured Selection selection I Structured Selection tree Viewer get Selection Array List external Models new Array List for Iterator iter selection iterator iter has Next Model Entry entry Model Entry iter next if entry get Workspace Model null continue external Models add entry get External Model I Plugin Model Base models I Plugin Model Base external Models to Array new I Plugin Model Base external Models size try Shell shell tree Viewer get Tree get Shell int import Type extract Source Plugin Import Operation IMPORT WITH SOURCE Plugin Import Operation IMPORT BINARY I Runnable With Progress op Plugin Import Wizard get Import Operation shell import Type models PlatformUI get Workbench get Progress Service busy Cursor While op catch Interrupted Exception e catch Invocation Target Exception e PDE Plugin log Exception e catch Exception e  handleImport extractSource IStructuredSelection IStructuredSelection treeViewer getSelection ArrayList externalModels ArrayList hasNext ModelEntry ModelEntry getWorkspaceModel externalModels getExternalModel IPluginModelBase IPluginModelBase externalModels toArray IPluginModelBase externalModels treeViewer getTree getShell importType extractSource PluginImportOperation IMPORT_WITH_SOURCE PluginImportOperation IMPORT_BINARY IRunnableWithProgress PluginImportWizard getImportOperation importType getWorkbench getProgressService busyCursorWhile InterruptedException InvocationTargetException PDEPlugin logException
I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Plugin Model Manager manager PDE Core get Default get Model Manager try manager set In Java Search array add monitor catch Core Exception e throw new Invocation Target Exception e finally monitor done  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException PluginModelManager PDECore getDefault getModelManager setInJavaSearch CoreException InvocationTargetException
private void handle Java Search final boolean add I Structured Selection selection I Structured Selection tree Viewer get Selection if selection size 0 return Array List result new Array List for Iterator iter selection iterator iter has Next Model Entry entry Model Entry iter next if entry get Workspace Model null continue if entry is In Java Search add result add entry if result size 0 return final Model Entry array Model Entry result to Array new Model Entry result size I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Plugin Model Manager manager PDE Core get Default get Model Manager try manager set In Java Search array add monitor catch Core Exception e throw new Invocation Target Exception e finally monitor done try PlatformUI get Workbench get Progress Service run InUI PDE Plugin get Active Workbench Window op PDE Plugin get Workspace get Root catch Interrupted Exception e catch Invocation Target Exception e PDE Plugin log Exception e  handleJavaSearch IStructuredSelection IStructuredSelection treeViewer getSelection ArrayList ArrayList hasNext ModelEntry ModelEntry getWorkspaceModel isInJavaSearch ModelEntry ModelEntry toArray ModelEntry IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException PluginModelManager PDECore getDefault getModelManager setInJavaSearch CoreException InvocationTargetException getWorkbench getProgressService runInUI PDEPlugin getActiveWorkbenchWindow PDEPlugin getWorkspace getRoot InterruptedException InvocationTargetException PDEPlugin logException
private void handle Select Dependent I Structured Selection selection I Structured Selection tree Viewer get Selection if selection size 0 return Hash Set set new Hash Set for Iterator iter selection iterator iter has Next Model Entry entry Model Entry iter next set add entry add Dependent Entries entry set tree Viewer set Selection new Structured Selection set to Array  handleSelectDependent IStructuredSelection IStructuredSelection treeViewer getSelection HashSet HashSet hasNext ModelEntry ModelEntry addDependentEntries treeViewer setSelection StructuredSelection toArray
private void handle Select In Java Search Plugins Content Provider provider Plugins Content Provider tree Viewer get Content Provider Object elements provider get Elements tree Viewer get Input Array List result new Array List for int i 0 i elements length i Object element elements i if element instanceof Model Entry Model Entry entry Model Entry element if entry is In Java Search result add entry tree Viewer set Selection new Structured Selection result to Array  handleSelectInJavaSearch PluginsContentProvider PluginsContentProvider treeViewer getContentProvider getElements treeViewer getInput ArrayList ArrayList ModelEntry ModelEntry ModelEntry isInJavaSearch treeViewer setSelection StructuredSelection toArray
private void add Dependent Entries Model Entry entry Set set if entry is Empty entry get Active Model instanceof Workspace Plugin Model Base return I Plugin Model Base model entry get External Model if model null return I Plugin Base plugin model get Plugin Base if plugin null return I Plugin Import iimports plugin get Imports Plugin Model Manager manager PDE Core get Default get Model Manager for int i 0 i iimports length i I Plugin Import iimport iimports i Model Entry ientry manager find Entry iimport get Id if ientry null set add ientry add Dependent Entries ientry set  addDependentEntries ModelEntry isEmpty getActiveModel WorkspacePluginModelBase IPluginModelBase getExternalModel IPluginBase getPluginBase IPluginImport getImports PluginModelManager PDECore getDefault getModelManager IPluginImport ModelEntry findEntry getId addDependentEntries
private void handle Open Text Editor File Adapter adapter String editor Id if adapter null return I Workbench Page page PDE Plugin get Active Page if editor Id null if adapter is Manifest editor Id PDE Plugin MANIFEST EDITOR ID else if adapter is Schema editor Id PDE Plugin SCHEMA EDITOR ID try if editor Id null editor Id equals system NON NLS 1 editor Id DEFAULT EDITOR ID page open Editor new System File Editor Input adapter get File editor Id adapter set Editor Id editor Id catch Part Init Exception e PDE Plugin log Exception e  handleOpenTextEditor FileAdapter editorId IWorkbenchPage PDEPlugin getActivePage editorId isManifest editorId PDEPlugin MANIFEST_EDITOR_ID isSchema editorId PDEPlugin SCHEMA_EDITOR_ID editorId editorId editorId DEFAULT_EDITOR_ID openEditor SystemFileEditorInput getFile editorId setEditorId editorId PartInitException PDEPlugin logException
private void handle Open Manifest Editor File Adapter adapter handle Open Text Editor adapter PDE Plugin MANIFEST EDITOR ID  handleOpenManifestEditor FileAdapter handleOpenTextEditor PDEPlugin MANIFEST_EDITOR_ID
private void handle Open Schema Editor File Adapter adapter handle Open Text Editor adapter PDE Plugin SCHEMA EDITOR ID  handleOpenSchemaEditor FileAdapter handleOpenTextEditor PDEPlugin SCHEMA_EDITOR_ID
show While tree Viewer get Tree get Display new Runnable public void run Open file using shell String path file get Absolute Path result 0 Program launch path  showWhile treeViewer getTree getDisplay getAbsolutePath
private void handle Open System Editor File Adapter adapter if adapter null return File local File null try local File get Local Copy adapter get File catch IO Exception e PDE Plugin log Exception e return catch Core Exception e PDE Plugin log Exception e Start busy indicator final File file local File final boolean result new boolean 1 Busy Indicator show While tree Viewer get Tree get Display new Runnable public void run Open file using shell String path file get Absolute Path result 0 Program launch path Shell Execute returns whether call was successful if result 0 PDE Plugin log Exception new Part Init Exception PDE Plugin get Formatted Message Plugins View unable To Open NON NLS 1 file get Name else adapter set Editor Id system NON NLS 1  handleOpenSystemEditor FileAdapter localFile localFile getLocalCopy getFile IOException PDEPlugin logException CoreException PDEPlugin logException localFile BusyIndicator showWhile treeViewer getTree getDisplay getAbsolutePath ShellExecute PDEPlugin logException PartInitException PDEPlugin getFormattedMessage PluginsView unableToOpen getName setEditorId
private File get Local Copy File file throws IO Exception Core Exception create a tmp copy of this file and make it read only This is to ensure that the original file belonging to the external plug in directories will not be modified String file Name file get Name String prefix String suffix null int dot Loc file Name index Of if dot Loc 1 prefix file Name substring 0 dot Loc suffix file Name substring dot Loc else prefix file Name File tmp File File create Temp File prefix suffix tmp File delete On Exit File Output Stream fos new File Output Stream tmp File File Input Stream fis new File Input Stream file byte cbuffer new byte 1024 int read 0 while read 1 read fis read cbuffer if read 1 fos write cbuffer 0 read fos flush fos close fis close tmp File set Read Only return tmp File  getLocalCopy IOException CoreException fileName getName dotLoc fileName indexOf dotLoc fileName dotLoc fileName dotLoc fileName tmpFile createTempFile tmpFile deleteOnExit FileOutputStream FileOutputStream tmpFile FileInputStream FileInputStream tmpFile setReadOnly tmpFile
private void handle Selection Changed I Selection selection String text NON NLS 1 Object obj get Selected Object if obj instanceof Model Entry I Plugin Model Base model Model Entry obj get Active Model text model get Install Location if obj instanceof File Adapter text File Adapter obj get File get Absolute Path get View Site get Action Bars get Status Line Manager set Message text  handleSelectionChanged ISelection getSelectedObject ModelEntry IPluginModelBase ModelEntry getActiveModel getInstallLocation FileAdapter FileAdapter getFile getAbsolutePath getViewSite getActionBars getStatusLineManager setMessage
private void hook Double Click Action tree Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Double Click  hookDoubleClickAction treeViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleDoubleClick
private void hook Double Click Action tree Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Double Click  hookDoubleClickAction treeViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleDoubleClick
see I Workbench Part set Focus public void set Focus tree Viewer get Tree set Focus  IWorkbenchPart setFocus setFocus treeViewer getTree setFocus
void update Title Object new Input I Configuration Element config get Configuration Element if config null return String view Name config get Attribute name NON NLS 1 if new Input null new Input equals PDE Core get Default get Model Manager restore old set Title view Name set Title Tool Tip get Title else String name Label Provider tree Viewer get Label Provider get Text new Input set Title view Name name NON NLS 1 set Title Tool Tip get Input Path new Input  updateTitle newInput IConfigurationElement getConfigurationElement viewName getAttribute newInput newInput PDECore getDefault getModelManager setTitle viewName setTitleToolTip getTitle LabelProvider treeViewer getLabelProvider getText newInput setTitle viewName setTitleToolTip getInputPath newInput
private String get Input Path Object input if input instanceof File Adapter return file File Adapter input get File get Absolute Path NON NLS 1 if input instanceof Model Entry I Plugin Model Base model Model Entry input get Active Model return plugin model get Install Location NON NLS 1 return NON NLS 1  getInputPath FileAdapter FileAdapter getFile getAbsolutePath ModelEntry IPluginModelBase ModelEntry getActiveModel getInstallLocation

private Model Entry Property Source entry Property Source public Object get Adapter Object adaptable Object Class adapter Type if adapter Type equals I Property Source class return get Properties adaptable Object return null  ModelEntryPropertySource entryPropertySource getAdapter adaptableObject adapterType adapterType IPropertySource getProperties adaptableObject
public java lang Class get Adapter List return new Class I Property Source class  getAdapterList IPropertySource
private I Property Source get Properties Object object if object instanceof File Adapter if adapter Property Source null adapter Property Source new File Adapter Property Source adapter Property Source set Adapter File Adapter object return adapter Property Source if object instanceof Model Entry if entry Property Source null entry Property Source new Model Entry Property Source entry Property Source set Entry Model Entry object return entry Property Source return null  IPropertySource getProperties FileAdapter adapterPropertySource adapterPropertySource FileAdapterPropertySource adapterPropertySource setAdapter FileAdapter adapterPropertySource ModelEntry entryPropertySource entryPropertySource ModelEntryPropertySource entryPropertySource setEntry ModelEntry entryPropertySource

Constructor for Show In Workspace Action public Show In Workspace Action String view Id I Selection Provider provider this view Id view Id this provider provider  ShowInWorkspaceAction ShowInWorkspaceAction viewId ISelectionProvider viewId viewId
Constructor for Show In Workspace Action param text protected Show In Workspace Action String text super text  ShowInWorkspaceAction ShowInWorkspaceAction
public boolean is Applicable I Structured Selection selection I Structured Selection provider get Selection if selection is Empty return false for Iterator iter selection iterator iter has Next Object obj iter next if obj instanceof Model Entry return false Model Entry entry Model Entry obj I Plugin Model Base model entry get Active Model if model get Underlying Resource null return false return true  isApplicable IStructuredSelection IStructuredSelection getSelection isEmpty hasNext ModelEntry ModelEntry ModelEntry IPluginModelBase getActiveModel getUnderlyingResource
public void run List v collect Resources I Workbench Page page PDE Plugin get Active Page try I View Part view page show View view Id if view instanceof I Set Selection Target I Selection selection new Structured Selection v I Set Selection Target view select Reveal selection catch Part Init Exception e PDE Plugin log Exception e  collectResources IWorkbenchPage PDEPlugin getActivePage IViewPart showView viewId ISetSelectionTarget ISelection StructuredSelection ISetSelectionTarget selectReveal PartInitException PDEPlugin logException
private List collect Resources Array List list new Array List I Structured Selection selection I Structured Selection provider get Selection if selection is Empty return list for Iterator iter selection iterator iter has Next Object obj iter next if obj instanceof Model Entry Model Entry entry Model Entry obj I Plugin Model Base model entry get Active Model I Resource resource model get Underlying Resource if resource null list add resource return list  collectResources ArrayList ArrayList IStructuredSelection IStructuredSelection getSelection isEmpty hasNext ModelEntry ModelEntry ModelEntry IPluginModelBase getActiveModel IResource getUnderlyingResource

public Base Wizard Selection Page String name String label super name this label label description Browser new Form Browser SWT BORDER SWT V SCROLL description Browser set Text NON NLS 1  BaseWizardSelectionPage descriptionBrowser FormBrowser V_SCROLL descriptionBrowser setText
public void create Description In Composite composite description Browser create Control composite Control c description Browser get Control Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint 200 c set Layout Data gd  createDescriptionIn descriptionBrowser createControl descriptionBrowser getControl GridData GridData GridData FILL_BOTH widthHint setLayoutData
protected abstract I Wizard Node create Wizard Node Wizard Element element  IWizardNode createWizardNode WizardElement
protected abstract I Wizard Node create Wizard Node Wizard Element element public String get Label return label  IWizardNode createWizardNode WizardElement getLabel
return label public void set Description Text String text description Browser set Text text  setDescriptionText descriptionBrowser setText
public void set Description Enabled boolean enabled Control dcontrol description Browser get Control if dcontrol null dcontrol set Enabled enabled  setDescriptionEnabled descriptionBrowser getControl setEnabled

public static final String ATT NAME name NON NLS 1 public Category I Configuration Element a Config config a Config  ATT_NAME IConfigurationElement aConfig aConfig
config a Config public String getID return config get Attribute ATT ID  aConfig getAttribute ATT_ID
return config get Attribute ATT ID public String get Label return config get Attribute ATT NAME  getAttribute ATT_ID getLabel getAttribute ATT_NAME
public String get Parent Category Path if parent Category Path null return parent Category Path String category config get Attribute ATT CATEGORY if category null return null String Tokenizer stok new String Tokenizer category NON NLS 1 parent Category Path new String stok count Tokens for int i 0 stok has More Tokens i parent Category Path i stok next Token return parent Category Path  getParentCategoryPath parentCategoryPath parentCategoryPath getAttribute ATT_CATEGORY StringTokenizer StringTokenizer parentCategoryPath countTokens hasMoreTokens parentCategoryPath nextToken parentCategoryPath

The constructor public Base Export Wizard PDE Plugin get Default get Label Provider connect this I Dialog Settings master Settings PDE Plugin get Default get Dialog Settings set Needs Progress Monitor true set Dialog Settings get Settings Section master Settings  BaseExportWizard PDEPlugin getDefault getLabelProvider IDialogSettings masterSettings PDEPlugin getDefault getDialogSettings setNeedsProgressMonitor setDialogSettings getSettingsSection masterSettings
public void add Pages page1 create Page1 add Page page1  addPages createPage1 addPage
protected abstract Base Export Wizard Page create Page1  BaseExportWizardPage createPage1
protected abstract Base Export Wizard Page create Page1 public void dispose PDE Plugin get Default get Label Provider disconnect this super dispose  BaseExportWizardPage createPage1 PDEPlugin getDefault getLabelProvider
public I Structured Selection get Selection return selection  IStructuredSelection getSelection
protected abstract I Dialog Settings get Settings Section I Dialog Settings master Settings  IDialogSettings getSettingsSection IDialogSettings masterSettings
see Wizard init public void init I Workbench workbench I Structured Selection selection this selection selection  IWorkbench IStructuredSelection
see Wizard perform Finish public boolean perform Finish page1 save Settings if page1 do Generate Ant File generate Ant Build File page1 get Ant Build File Name if page1 do Export As Zip File zip File new File page1 get Destination page1 get File Name if zip File exists if Message Dialog open Question get Container get Shell PDE Plugin get Resource String Base Export Wizard confirm Replace title NON NLS 1 PDE Plugin get Formatted Message Base Export Wizard confirm Replace desc NON NLS 1 new Path page1 get Destination page1 get File Name toOS String return false zip File delete schedule Export Job return true  performFinish performFinish saveSettings doGenerateAntFile generateAntBuildFile getAntBuildFileName doExportAsZip zipFile getDestination getFileName zipFile MessageDialog openQuestion getContainer getShell PDEPlugin getResourceString BaseExportWizard confirmReplace PDEPlugin getFormattedMessage BaseExportWizard confirmReplace getDestination getFileName toOSString zipFile scheduleExportJob
private void generate Ant Build File String filename String parent new Path filename remove Last Segments 1 toOS String String build Filename new Path filename last Segment if build Filename ends With xml NON NLS 1 build Filename xml NON NLS 1 File dir new File new File parent get Absolute Path if dir exists dir mkdirs try File build File new File dir build Filename Print Writer writer new Print Writer new File Writer build File generate Ant Task writer writer close set Default Values dir build Filename catch IO Exception e  generateAntBuildFile removeLastSegments toOSString buildFilename lastSegment buildFilename endsWith buildFilename getAbsolutePath buildFile buildFilename PrintWriter PrintWriter FileWriter buildFile generateAntTask setDefaultValues buildFilename IOException
private void set Default Values File dir String build Filename try I Container container PDE Plugin get Workspace get Root get Container For Location new Path dir to String if container null container exists container get Project refresh Local I Resource DEPTH INFINITE null I File file container get File new Path build Filename List configs Ant Launch Shortcut find Existing Launch Configurations file I Launch Configuration Working Copy launch Copy if configs size 0 I Launch Configuration config Ant Launch Shortcut create Default Launch Configuration file launch Copy config get Working Copy else launch Copy I Launch Configuration configs get 0 get Working Copy if launch Copy null launch Copy set Attribute I Java Launch Configuration Constants ATTR VM INSTALL NAME String null launch Copy set Attribute I Java Launch Configuration Constants ATTR VM INSTALL TYPE String null launch Copy do Save catch Core Exception e  setDefaultValues buildFilename IContainer PDEPlugin getWorkspace getRoot getContainerForLocation toString getProject refreshLocal IResource DEPTH_INFINITE IFile getFile buildFilename AntLaunchShortcut findExistingLaunchConfigurations ILaunchConfigurationWorkingCopy launchCopy ILaunchConfiguration AntLaunchShortcut createDefaultLaunchConfiguration launchCopy getWorkingCopy launchCopy ILaunchConfiguration getWorkingCopy launchCopy launchCopy setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_NAME launchCopy setAttribute IJavaLaunchConfigurationConstants ATTR_VM_INSTALL_TYPE launchCopy doSave CoreException
protected abstract void generate Ant Task Print Writer writer  generateAntTask PrintWriter
protected abstract void generate Ant Task Print Writer writer protected abstract void schedule Export Job  generateAntTask PrintWriter scheduleExportJob
protected String get Export Operation int export Type page1 get Export Type switch export Type case Feature Export Job EXPORT AS ZIP return zip NON NLS 1 case Feature Export Job EXPORT AS DIRECTORY return directory NON NLS 1 case Feature Export Job EXPORT AS UPDATE JARS return update NON NLS 1 return zip NON NLS 1  getExportOperation exportType getExportType exportType FeatureExportJob EXPORT_AS_ZIP FeatureExportJob EXPORT_AS_DIRECTORY FeatureExportJob EXPORT_AS_UPDATE_JARS

extends Default Content Provider implements I Structured Content Provider public Object get Elements Object parent return get List Elements  DefaultContentProvider IStructuredContentProvider getElements getListElements
class Export Part extends Wizard Checkbox Table Part public Export Part String label String button Labels super label button Labels  ExportPart WizardCheckboxTablePart ExportPart buttonLabels buttonLabels
public void update Counter int count super update Counter count page Changed  updateCounter updateCounter pageChanged
protected void button Selected Button button int index switch index case 0 handle Select All true break case 1 handle Select All false break case 3 handle Working Sets  buttonSelected handleSelectAll handleSelectAll handleWorkingSets
public Base Export Wizard Page I Structured Selection selection String name String choice Label boolean feature Export super name this f Selection selection this f Is Feature Export feature Export f Export Part new Export Part choice Label new String PDE Plugin get Resource String Export Part KEY SELECT ALL PDE Plugin get Resource String Export Part KEY DESELECT ALL null PDE Plugin get Resource String Export Wizard working Set NON NLS 1 set Description PDE Plugin get Resource String Export Wizard Plugin description NON NLS 1  BaseExportWizardPage IStructuredSelection choiceLabel featureExport fSelection fIsFeatureExport featureExport fExportPart ExportPart choiceLabel PDEPlugin getResourceString ExportPart KEY_SELECT_ALL PDEPlugin getResourceString ExportPart KEY_DESELECT_ALL PDEPlugin getResourceString ExportWizard workingSet setDescription PDEPlugin getResourceString ExportWizard
see org eclipse jface dialogs I Dialog Page create Control org eclipse swt widgets Composite public void create Control Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout container set Layout layout create Table Viewer Section container create Options Section container create Export Destination Section container create Ant Build Section container Dialog apply Dialog Font container initialize List load Settings page Changed hook Listeners set Control container hook Help Context container  IDialogPage createControl createControl GridLayout GridLayout setLayout createTableViewerSection createOptionsSection createExportDestinationSection createAntBuildSection applyDialogFont initializeList loadSettings pageChanged hookListeners setControl hookHelpContext
private void create Table Viewer Section Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 layout margin Height 0 layout margin Width 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH f Export Part create Control composite Grid Data gd Grid Data f Export Part get Control get Layout Data gd height Hint 125 gd width Hint 150 gd horizontal Span 2  createTableViewerSection GridLayout GridLayout numColumns marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_BOTH fExportPart createControl GridData GridData fExportPart getControl getLayoutData heightHint widthHint horizontalSpan
private void create Export Destination Section Composite parent Group group new Group parent SWT NONE group set Text PDE Plugin get Resource String Export Wizard destination group NON NLS 1 Grid Layout layout new Grid Layout layout num Columns 3 group set Layout layout group set Layout Data new Grid Data Grid Data FILL HORIZONTAL f File Label new Label group SWT NONE f File Label set Text PDE Plugin get Resource String Export Wizard zip File NON NLS 1 f Zip File new Combo group SWT BORDER f Zip File set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Browse File new Button group SWT PUSH f Browse File set Text PDE Plugin get Resource String Export Wizard browse NON NLS 1 f Browse File set Layout Data new Grid Data SWT Util set Button Dimension Hint f Browse File f Directory Label new Label group SWT NULL f Directory Label set Text PDE Plugin get Resource String Export Wizard destination NON NLS 1 f Destination new Combo group SWT BORDER f Destination set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Browse Directory new Button group SWT PUSH f Browse Directory set Text PDE Plugin get Resource String Export Wizard browse NON NLS 1 f Browse Directory set Layout Data new Grid Data SWT Util set Button Dimension Hint f Browse Directory  createExportDestinationSection setText PDEPlugin getResourceString ExportWizard GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_HORIZONTAL fFileLabel fFileLabel setText PDEPlugin getResourceString ExportWizard zipFile fZipFile fZipFile setLayoutData GridData GridData FILL_HORIZONTAL fBrowseFile fBrowseFile setText PDEPlugin getResourceString ExportWizard fBrowseFile setLayoutData GridData SWTUtil setButtonDimensionHint fBrowseFile fDirectoryLabel fDirectoryLabel setText PDEPlugin getResourceString ExportWizard fDestination fDestination setLayoutData GridData GridData FILL_HORIZONTAL fBrowseDirectory fBrowseDirectory setText PDEPlugin getResourceString ExportWizard fBrowseDirectory setLayoutData GridData SWTUtil setButtonDimensionHint fBrowseDirectory
private void create Options Section Composite parent Group comp new Group parent SWT NONE comp set Text PDE Plugin get Resource String Export Wizard options NON NLS 1 comp set Layout new Grid Layout comp set Layout Data new Grid Data Grid Data FILL HORIZONTAL Composite top new Composite comp SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height layout margin Width 0 top set Layout layout top set Layout Data new Grid Data Grid Data FILL HORIZONTAL Label label new Label top SWT NONE label set Text PDE Plugin get Resource String Export Wizard format NON NLS 1 f Export Formats new Combo top SWT READ ONLY f Export Formats set Layout Data new Grid Data Grid Data FILL HORIZONTAL String formats new String 3 if Platform getOS equals macosx NON NLS 1 formats 0 PDE Plugin get Resource String Export Wizard tar NON NLS 1 else formats 0 PDE Plugin get Resource String Export Wizard zip NON NLS 1 formats 1 PDE Plugin get Resource String Export Wizard directory NON NLS 1 formats 2 PDE Plugin get Resource String Export Wizard update Jars NON NLS 1 f Export Formats set Items formats Composite bottom new Composite comp SWT NONE layout new Grid Layout layout num Columns 3 layout margin Height layout margin Width 0 bottom set Layout layout bottom set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Include Source new Button bottom SWT CHECK f Include Source set Text PDE Plugin get Resource String Export Wizard include Source NON NLS 1 f Include Source set Layout Data new Grid Data Grid Data FILL HORIZONTAL Button button new Button bottom SWT PUSH button set Text PDE Plugin get Resource String Export Wizard build Options button NON NLS 1 button set Layout Data new Grid Data button add Selection Listener new Selection Adapter public void widget Selected Selection Event e show Preference Page new Build Options Preference Node SWT Util set Button Dimension Hint button button new Button bottom SWT PUSH button set Text PDE Plugin get Resource String Export Wizard target Env button NON NLS 1 button set Layout Data new Grid Data button add Selection Listener new Selection Adapter public void widget Selected Selection Event e show Preference Page new Target Environment Preference Node SWT Util set Button Dimension Hint button  createOptionsSection setText PDEPlugin getResourceString ExportWizard setLayout GridLayout setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout numColumns marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_HORIZONTAL setText PDEPlugin getResourceString ExportWizard fExportFormats READ_ONLY fExportFormats setLayoutData GridData GridData FILL_HORIZONTAL PDEPlugin getResourceString ExportWizard PDEPlugin getResourceString ExportWizard PDEPlugin getResourceString ExportWizard PDEPlugin getResourceString ExportWizard updateJars fExportFormats setItems GridLayout numColumns marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_HORIZONTAL fIncludeSource fIncludeSource setText PDEPlugin getResourceString ExportWizard includeSource fIncludeSource setLayoutData GridData GridData FILL_HORIZONTAL setText PDEPlugin getResourceString ExportWizard buildOptions setLayoutData GridData addSelectionListener SelectionAdapter widgetSelected SelectionEvent showPreferencePage BuildOptionsPreferenceNode SWTUtil setButtonDimensionHint setText PDEPlugin getResourceString ExportWizard targetEnv setLayoutData GridData addSelectionListener SelectionAdapter widgetSelected SelectionEvent showPreferencePage TargetEnvironmentPreferenceNode SWTUtil setButtonDimensionHint
private void create Ant Build Section Composite parent Group group new Group parent SWT NONE group set Text PDE Plugin get Resource String Export Wizard ant Title NON NLS 1 Grid Layout layout new Grid Layout layout num Columns 3 group set Layout layout group set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Save As Ant Button new Button group SWT CHECK f Save As Ant Button set Text PDE Plugin get Resource String Export Wizard ant Check NON NLS 1 Grid Data gd new Grid Data gd horizontal Span 3 f Save As Ant Button set Layout Data gd f Ant Label new Label group SWT NONE f Ant Label set Text PDE Plugin get Resource String Export Wizard ant Label NON NLS 1 gd new Grid Data gd horizontal Indent 20 f Ant Label set Layout Data gd f Ant Combo new Combo group SWT NONE f Ant Combo set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Browse Ant new Button group SWT PUSH f Browse Ant set Text PDE Plugin get Resource String Export Wizard browse2 NON NLS 1 f Browse Ant set Layout Data new Grid Data SWT Util set Button Dimension Hint f Browse Ant  createAntBuildSection setText PDEPlugin getResourceString ExportWizard antTitle GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_HORIZONTAL fSaveAsAntButton fSaveAsAntButton setText PDEPlugin getResourceString ExportWizard antCheck GridData GridData horizontalSpan fSaveAsAntButton setLayoutData fAntLabel fAntLabel setText PDEPlugin getResourceString ExportWizard antLabel GridData horizontalIndent fAntLabel setLayoutData fAntCombo fAntCombo setLayoutData GridData GridData FILL_HORIZONTAL fBrowseAnt fBrowseAnt setText PDEPlugin getResourceString ExportWizard fBrowseAnt setLayoutData GridData SWTUtil setButtonDimensionHint fBrowseAnt
Busy Indicator show While get Control get Display new Runnable public void run dialog create dialog set Message target Node get Label Text dialog open  BusyIndicator showWhile getControl getDisplay setMessage targetNode getLabelText
private void show Preference Page final I Preference Node target Node Preference Manager manager new Preference Manager manager add To Root target Node final Preference Dialog dialog new Preference Dialog get Control get Shell manager Busy Indicator show While get Control get Display new Runnable public void run dialog create dialog set Message target Node get Label Text dialog open  showPreferencePage IPreferenceNode targetNode PreferenceManager PreferenceManager addToRoot targetNode PreferenceDialog PreferenceDialog getControl getShell BusyIndicator showWhile getControl getDisplay setMessage targetNode getLabelText
f Save As Ant Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Ant Label set Enabled f Save As Ant Button get Selection f Ant Combo set Enabled f Save As Ant Button get Selection f Browse Ant set Enabled f Save As Ant Button get Selection page Changed  fSaveAsAntButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fAntLabel setEnabled fSaveAsAntButton getSelection fAntCombo setEnabled fSaveAsAntButton getSelection fBrowseAnt setEnabled fSaveAsAntButton getSelection pageChanged
f Export Formats add Selection Listener new Selection Adapter public void widget Selected Selection Event e enable Zip Option do Export As Zip enable Directory Option do Export As Zip f Include Source set Enabled do Export As Update Jars page Changed  fExportFormats addSelectionListener SelectionAdapter widgetSelected SelectionEvent enableZipOption doExportAsZip enableDirectoryOption doExportAsZip fIncludeSource setEnabled doExportAsUpdateJars pageChanged
f Browse File add Selection Listener new Selection Adapter public void widget Selected Selection Event e choose File f Zip File f Zip Extension NON NLS 1  fBrowseFile addSelectionListener SelectionAdapter widgetSelected SelectionEvent chooseFile fZipFile fZipExtension
f Zip File add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed  fZipFile addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged
f Zip File add Modify Listener new Modify Listener public void modify Text Modify Event e page Changed  fZipFile addModifyListener ModifyListener modifyText ModifyEvent pageChanged
f Destination add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed  fDestination addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged
f Destination add Modify Listener new Modify Listener public void modify Text Modify Event e page Changed  fDestination addModifyListener ModifyListener modifyText ModifyEvent pageChanged
f Browse Directory add Selection Listener new Selection Adapter public void widget Selected Selection Event e choose Destination  fBrowseDirectory addSelectionListener SelectionAdapter widgetSelected SelectionEvent chooseDestination
f Browse Ant add Selection Listener new Selection Adapter public void widget Selected Selection Event e choose File f Ant Combo xml NON NLS 1  fBrowseAnt addSelectionListener SelectionAdapter widgetSelected SelectionEvent chooseFile fAntCombo
f Ant Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed  fAntCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged
f Ant Combo add Modify Listener new Modify Listener public void modify Text Modify Event e page Changed  fAntCombo addModifyListener ModifyListener modifyText ModifyEvent pageChanged
private void hook Listeners f Save As Ant Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Ant Label set Enabled f Save As Ant Button get Selection f Ant Combo set Enabled f Save As Ant Button get Selection f Browse Ant set Enabled f Save As Ant Button get Selection page Changed f Export Formats add Selection Listener new Selection Adapter public void widget Selected Selection Event e enable Zip Option do Export As Zip enable Directory Option do Export As Zip f Include Source set Enabled do Export As Update Jars page Changed f Browse File add Selection Listener new Selection Adapter public void widget Selected Selection Event e choose File f Zip File f Zip Extension NON NLS 1 f Zip File add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed f Zip File add Modify Listener new Modify Listener public void modify Text Modify Event e page Changed f Destination add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed f Destination add Modify Listener new Modify Listener public void modify Text Modify Event e page Changed f Browse Directory add Selection Listener new Selection Adapter public void widget Selected Selection Event e choose Destination f Browse Ant add Selection Listener new Selection Adapter public void widget Selected Selection Event e choose File f Ant Combo xml NON NLS 1 f Ant Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed f Ant Combo add Modify Listener new Modify Listener public void modify Text Modify Event e page Changed  hookListeners fSaveAsAntButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fAntLabel setEnabled fSaveAsAntButton getSelection fAntCombo setEnabled fSaveAsAntButton getSelection fBrowseAnt setEnabled fSaveAsAntButton getSelection pageChanged fExportFormats addSelectionListener SelectionAdapter widgetSelected SelectionEvent enableZipOption doExportAsZip enableDirectoryOption doExportAsZip fIncludeSource setEnabled doExportAsUpdateJars pageChanged fBrowseFile addSelectionListener SelectionAdapter widgetSelected SelectionEvent chooseFile fZipFile fZipExtension fZipFile addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged fZipFile addModifyListener ModifyListener modifyText ModifyEvent pageChanged fDestination addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged fDestination addModifyListener ModifyListener modifyText ModifyEvent pageChanged fBrowseDirectory addSelectionListener SelectionAdapter widgetSelected SelectionEvent chooseDestination fBrowseAnt addSelectionListener SelectionAdapter widgetSelected SelectionEvent chooseFile fAntCombo fAntCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged fAntCombo addModifyListener ModifyListener modifyText ModifyEvent pageChanged
private void choose File Combo combo String filter File Dialog dialog new File Dialog get Shell SWT SAVE dialog set File Name f Zip File get Text dialog set Filter Extensions new String filter String res dialog open if res null if combo index Of res 1 combo add res 0 combo set Text res  chooseFile FileDialog FileDialog getShell setFileName fZipFile getText setFilterExtensions indexOf setText
private void enable Zip Option boolean enabled if f File Label get Enabled enabled f File Label set Enabled enabled f Zip File set Enabled enabled f Browse File set Enabled enabled  enableZipOption fFileLabel getEnabled fFileLabel setEnabled fZipFile setEnabled fBrowseFile setEnabled
private void enable Directory Option boolean enabled if f Directory Label get Enabled enabled f Directory Label set Enabled enabled f Destination set Enabled enabled f Browse Directory set Enabled enabled  enableDirectoryOption fDirectoryLabel getEnabled fDirectoryLabel setEnabled fDestination setEnabled fBrowseDirectory setEnabled
protected abstract Object get List Elements  getListElements
private void initialize List Table Viewer viewer f Export Part get Table Viewer viewer set Content Provider new Export List Provider viewer set Label Provider PDE Plugin get Default get Label Provider viewer set Sorter List Util PLUGIN SORTER f Export Part get Table Viewer set Input PDE Core get Default get Workspace Model Manager check Selected  initializeList TableViewer fExportPart getTableViewer setContentProvider ExportListProvider setLabelProvider PDEPlugin getDefault getLabelProvider setSorter ListUtil PLUGIN_SORTER fExportPart getTableViewer setInput PDECore getDefault getWorkspaceModelManager checkSelected
private void choose Destination Directory Dialog dialog new Directory Dialog get Shell SWT SAVE dialog set Filter Path f Destination get Text dialog set Text PDE Plugin get Resource String Export Wizard dialog title NON NLS 1 dialog set Message PDE Plugin get Resource String Export Wizard dialog message NON NLS 1 String res dialog open if res null if f Destination index Of res 1 f Destination add res 0 f Destination set Text res  chooseDestination DirectoryDialog DirectoryDialog getShell setFilterPath fDestination getText setText PDEPlugin getResourceString ExportWizard setMessage PDEPlugin getResourceString ExportWizard fDestination indexOf fDestination fDestination setText
protected void check Selected Object elems f Selection to Array Array List checked new Array List elems length for int i 0 i elems length i Object elem elems i I Project project null if elem instanceof I File I File file I File elem project file get Project else if elem instanceof I Project project I Project elem else if elem instanceof I Java Project project I Java Project elem get Project if project null I Model model find Model For project if model null checked contains model checked add model f Export Part set Selection checked to Array if checked size 0 f Export Part get Table Viewer reveal checked get 0  checkSelected fSelection toArray ArrayList ArrayList IProject IFile IFile IFile getProject IProject IProject IJavaProject IJavaProject getProject IModel findModelFor fExportPart setSelection toArray fExportPart getTableViewer
protected abstract I Model find Model For I Project project  IModel findModelFor IProject
private void page Changed String message null if f Save As Ant Button null f Save As Ant Button is Disposed f Save As Ant Button get Selection if f Ant Combo get Text trim length 0 message PDE Plugin get Resource String Export Wizard status noantfile NON NLS 1 if f Export Formats null f Export Formats is Disposed do Export As Zip if f Zip File get Text trim length 0 message PDE Plugin get Resource String Export Wizard status nofile NON NLS 1 else if f Destination null f Destination is Disposed if f Destination get Text trim length 0 message PDE Plugin get Resource String Export Wizard status nodirectory NON NLS 1 boolean has Sel f Export Part get Selection Count 0 if has Sel message PDE Plugin get Resource String Export Wizard status noselection NON NLS 1 set Message message set Page Complete has Sel message null  pageChanged fSaveAsAntButton fSaveAsAntButton isDisposed fSaveAsAntButton getSelection fAntCombo getText PDEPlugin getResourceString ExportWizard fExportFormats fExportFormats isDisposed doExportAsZip fZipFile getText PDEPlugin getResourceString ExportWizard fDestination fDestination isDisposed fDestination getText PDEPlugin getResourceString ExportWizard hasSel fExportPart getSelectionCount hasSel PDEPlugin getResourceString ExportWizard setMessage setPageComplete hasSel
private void load Settings I Dialog Settings settings get Dialog Settings initialize Export Options settings initialize Destination Section settings initialize Ant Build Section settings  loadSettings IDialogSettings getDialogSettings initializeExportOptions initializeDestinationSection initializeAntBuildSection
private void initialize Export Options I Dialog Settings settings boolean export Update settings get Boolean S EXPORT UPDATE boolean export Directory settings get Boolean S EXPORT DIRECTORY int index Feature Export Job EXPORT AS ZIP if export Update index Feature Export Job EXPORT AS UPDATE JARS else if export Directory index Feature Export Job EXPORT AS DIRECTORY f Export Formats set Text f Export Formats get Item index enable Zip Option export Update export Directory enable Directory Option export Update export Directory initialize the options section f Include Source set Selection settings get Boolean S EXPORT SOURCE f Include Source set Enabled do Export As Update Jars  initializeExportOptions IDialogSettings exportUpdate getBoolean S_EXPORT_UPDATE exportDirectory getBoolean S_EXPORT_DIRECTORY FeatureExportJob EXPORT_AS_ZIP exportUpdate FeatureExportJob EXPORT_AS_UPDATE_JARS exportDirectory FeatureExportJob EXPORT_AS_DIRECTORY fExportFormats setText fExportFormats getItem enableZipOption exportUpdate exportDirectory enableDirectoryOption exportUpdate exportDirectory fIncludeSource setSelection getBoolean S_EXPORT_SOURCE fIncludeSource setEnabled doExportAsUpdateJars
private void initialize Destination Section I Dialog Settings settings initialize Combo settings S DESTINATION f Destination initialize Combo settings S ZIP FILENAME f Zip File  initializeDestinationSection IDialogSettings initializeCombo S_DESTINATION fDestination initializeCombo S_ZIP_FILENAME fZipFile
private void initialize Ant Build Section I Dialog Settings settings f Save As Ant Button set Selection settings get Boolean S SAVE AS ANT initialize Combo settings S ANT FILENAME f Ant Combo f Ant Label set Enabled f Save As Ant Button get Selection f Ant Combo set Enabled f Save As Ant Button get Selection f Browse Ant set Enabled f Save As Ant Button get Selection  initializeAntBuildSection IDialogSettings fSaveAsAntButton setSelection getBoolean S_SAVE_AS_ANT initializeCombo S_ANT_FILENAME fAntCombo fAntLabel setEnabled fSaveAsAntButton getSelection fAntCombo setEnabled fSaveAsAntButton getSelection fBrowseAnt setEnabled fSaveAsAntButton getSelection
private void initialize Combo I Dialog Settings settings String key Combo combo Array List list new Array List for int i 0 i 6 i String curr settings get key String value Of i if curr null list contains curr list add curr String items String list to Array new String list size combo set Items items if items length 0 combo set Text items 0  initializeCombo IDialogSettings ArrayList ArrayList valueOf toArray setItems setText
public void save Settings I Dialog Settings settings get Dialog Settings settings put S EXPORT UPDATE do Export As Update Jars settings put S EXPORT DIRECTORY do Export As Directory settings put S EXPORT SOURCE f Include Source get Selection settings put S SAVE AS ANT f Save As Ant Button get Selection save Combo settings S DESTINATION f Destination save Combo settings S ZIP FILENAME f Zip File save Combo settings S ANT FILENAME f Ant Combo  saveSettings IDialogSettings getDialogSettings S_EXPORT_UPDATE doExportAsUpdateJars S_EXPORT_DIRECTORY doExportAsDirectory S_EXPORT_SOURCE fIncludeSource getSelection S_SAVE_AS_ANT fSaveAsAntButton getSelection saveCombo S_DESTINATION fDestination saveCombo S_ZIP_FILENAME fZipFile saveCombo S_ANT_FILENAME fAntCombo
private void save Combo I Dialog Settings settings String key Combo combo if combo get Text trim length 0 settings put key String value Of 0 combo get Text trim String items combo get Items int n Entries Math min items length 5 for int i 0 i n Entries i settings put key String value Of i 1 items i trim  saveCombo IDialogSettings getText valueOf getText getItems nEntries nEntries valueOf
public Object get Selected Items return f Export Part get Selection  getSelectedItems fExportPart getSelection
public boolean do Export As Zip return f Export Formats get Selection Index Feature Export Job EXPORT AS ZIP  doExportAsZip fExportFormats getSelectionIndex FeatureExportJob EXPORT_AS_ZIP
public boolean do Export As Update Jars return f Export Formats get Selection Index Feature Export Job EXPORT AS UPDATE JARS  doExportAsUpdateJars fExportFormats getSelectionIndex FeatureExportJob EXPORT_AS_UPDATE_JARS
public boolean do Export As Directory return f Export Formats get Selection Index Feature Export Job EXPORT AS DIRECTORY  doExportAsDirectory fExportFormats getSelectionIndex FeatureExportJob EXPORT_AS_DIRECTORY
public boolean do Export Source return f Include Source null f Include Source get Selection  doExportSource fIncludeSource fIncludeSource getSelection
public String get File Name if do Export As Zip String path f Zip File get Text if path null path length 0 String file Name new Path path last Segment if file Name ends With f Zip Extension file Name f Zip Extension return file Name return null  getFileName doExportAsZip fZipFile getText fileName lastSegment fileName endsWith fZipExtension fileName fZipExtension fileName
public String get Destination if f Export Formats null do Export As Zip String path f Zip File get Text if path null path length 0 path new Path path remove Last Segments 1 toOS String return new File path get Absolute Path return NON NLS 1 if f Destination null f Destination is Disposed return NON NLS 1 File dir new File f Destination get Text trim return dir get Absolute Path  getDestination fExportFormats doExportAsZip fZipFile getText removeLastSegments toOSString getAbsolutePath fDestination fDestination isDisposed fDestination getText getAbsolutePath
public int get Export Type return f Export Formats get Selection Index  getExportType fExportFormats getSelectionIndex
protected abstract void hook Help Context Control control  hookHelpContext
private void handle Working Sets I Working Set Manager manager PlatformUI get Workbench get Working Set Manager I Working Set Selection Dialog dialog manager create Working Set Selection Dialog get Shell true if dialog open Window OK Array List models new Array List I Working Set working Sets dialog get Selection for int i 0 i working Sets length i I Adaptable elements working Sets i get Elements for int j 0 j elements length j I Adaptable element elements j if element instanceof I Java Project element I Java Project element get Project if element instanceof I Project I Model model find Model For I Project element if is Valid Model model models add model f Export Part set Selection models to Array  handleWorkingSets IWorkingSetManager getWorkbench getWorkingSetManager IWorkingSetSelectionDialog createWorkingSetSelectionDialog getShell ArrayList ArrayList IWorkingSet workingSets getSelection workingSets IAdaptable workingSets getElements IAdaptable IJavaProject IJavaProject getProject IProject IModel findModelFor IProject isValidModel fExportPart setSelection toArray
protected abstract boolean is Valid Model I Model model  isValidModel IModel
protected abstract boolean is Valid Model I Model model public boolean do Generate Ant File return f Save As Ant Button get Selection  isValidModel IModel doGenerateAntFile fSaveAsAntButton getSelection
public String get Ant Build File Name return f Ant Combo get Text trim  getAntBuildFileName fAntCombo getText

see org eclipse core runtime jobs I Scheduling Rule contains org eclipse core runtime jobs I Scheduling Rule public boolean contains I Scheduling Rule rule return rule instanceof Scheduling Rule  ISchedulingRule ISchedulingRule ISchedulingRule SchedulingRule
see org eclipse core runtime jobs I Scheduling Rule is Conflicting org eclipse core runtime jobs I Scheduling Rule public boolean is Conflicting I Scheduling Rule rule return rule instanceof Scheduling Rule  ISchedulingRule isConflicting ISchedulingRule isConflicting ISchedulingRule SchedulingRule
public Feature Export Job int export Type boolean export Source String destination String zip File Name Object items super PDE Plugin get Resource String Feature Export Job name NON NLS 1 f Export Type export Type f Export Source export Source f Destination Directory destination f Zip Filename zip File Name f Items items f Build Temp Location PDE Plugin get Default get State Location append temp to String NON NLS 1 set Rule new Scheduling Rule  FeatureExportJob exportType exportSource zipFileName PDEPlugin getResourceString FeatureExportJob fExportType exportType fExportSource exportSource fDestinationDirectory fZipFilename zipFileName fItems fBuildTempLocation PDEPlugin getDefault getStateLocation toString setRule SchedulingRule
final Display display get Standard Display display async Exec new Runnable public void run Error Dialog open Error display get Active Shell PDE Plugin get Resource String Feature Export Job error PDE Plugin get Resource String Feature Export Job problems e get Status NON NLS 1 NON NLS 2 done new Status I Status OK PDE Plugin get Plugin Id I Status OK null NON NLS 1  getStandardDisplay asyncExec ErrorDialog openError getActiveShell PDEPlugin getResourceString FeatureExportJob PDEPlugin getResourceString FeatureExportJob getStatus IStatus PDEPlugin getPluginId IStatus
final String em error Message get Standard Display async Exec new Runnable public void run async Notify Export Exception em  errorMessage getStandardDisplay asyncExec asyncNotifyExportException
protected I Status run I Progress Monitor monitor String error Message null try create Log Writer do Exports monitor catch final Core Exception e final Display display get Standard Display display async Exec new Runnable public void run Error Dialog open Error display get Active Shell PDE Plugin get Resource String Feature Export Job error PDE Plugin get Resource String Feature Export Job problems e get Status NON NLS 1 NON NLS 2 done new Status I Status OK PDE Plugin get Plugin Id I Status OK null NON NLS 1 return Job ASYNC FINISH catch Invocation Target Exception e String message e get Target Exception get Message if message null message length 0 error Message e get Target Exception get Message finally if writer null writer close if error Message null log File null log File exists log File length 0 error Message get Log Found Message if error Message null final String em error Message get Standard Display async Exec new Runnable public void run async Notify Export Exception em return Job ASYNC FINISH return new Status I Status OK PDE Plugin get Plugin Id I Status OK null NON NLS 1  IStatus IProgressMonitor errorMessage createLogWriter doExports CoreException getStandardDisplay asyncExec ErrorDialog openError getActiveShell PDEPlugin getResourceString FeatureExportJob PDEPlugin getResourceString FeatureExportJob getStatus IStatus PDEPlugin getPluginId IStatus ASYNC_FINISH InvocationTargetException getTargetException getMessage errorMessage getTargetException getMessage errorMessage logFile logFile logFile errorMessage getLogFoundMessage errorMessage errorMessage getStandardDisplay asyncExec asyncNotifyExportException ASYNC_FINISH IStatus PDEPlugin getPluginId IStatus
protected void do Exports I Progress Monitor monitor throws Invocation Target Exception Core Exception create Destination monitor begin Task f Items length 1 NON NLS 1 try for int i 0 i f Items length i I Feature Model model I Feature Model f Items i try I Feature feature model get Feature String id feature get Id String os getOS feature String ws getWS feature String arch getOS Arch feature do Export id model get Feature get Version model get Install Location os ws arch new Sub Progress Monitor monitor 1 finally delete Build Files model finally cleanup new Sub Progress Monitor monitor 1 monitor done  doExports IProgressMonitor InvocationTargetException CoreException createDestination beginTask fItems fItems IFeatureModel IFeatureModel fItems IFeature getFeature getId getOSArch doExport getFeature getVersion getInstallLocation SubProgressMonitor deleteBuildFiles SubProgressMonitor
private String getOS I Feature feature String os feature getOS if os null os trim length 0 os index Of 1 os equals NON NLS 1 return Target Platform getOS return os  IFeature indexOf TargetPlatform
private String getWS I Feature feature String ws feature getWS if ws null ws trim length 0 ws index Of 1 ws equals NON NLS 1 return Target Platform getWS return ws  IFeature indexOf TargetPlatform
private String getOS Arch I Feature feature String arch feature get Arch if arch null arch trim length 0 arch index Of 1 arch equals NON NLS 1 return Target Platform getOS Arch return arch  getOSArch IFeature getArch indexOf TargetPlatform getOSArch
private void create Destination throws Invocation Target Exception File file new File f Destination Directory if file exists file is Directory if file mkdirs throw new Invocation Target Exception new Exception PDE Plugin get Resource String Export Wizard bad Directory NON NLS 1  createDestination InvocationTargetException fDestinationDirectory isDirectory InvocationTargetException PDEPlugin getResourceString ExportWizard badDirectory
protected void do Export String featureID String version String feature Location String os String ws String arch I Progress Monitor monitor throws Core Exception Invocation Target Exception monitor begin Task 5 NON NLS 1 monitor set Task Name PDE Plugin get Resource String Feature Export Job task Name NON NLS 1 try Hash Map properties create Build Properties os ws arch make Script featureID version os ws arch feature Location monitor worked 1 run Script get Build Script Name feature Location get Build Execution Targets properties new Sub Progress Monitor monitor 2 run Script get Assembly Script Name featureID os ws arch feature Location new String main NON NLS 1 properties new Sub Progress Monitor monitor 2 finally monitor done  doExport featureLocation IProgressMonitor CoreException InvocationTargetException beginTask setTaskName PDEPlugin getResourceString FeatureExportJob taskName HashMap createBuildProperties makeScript featureLocation runScript getBuildScriptName featureLocation getBuildExecutionTargets SubProgressMonitor runScript getAssemblyScriptName featureLocation SubProgressMonitor
protected Hash Map create Build Properties String os String ws String arch if f Build Properties null f Build Properties new Hash Map 15 f Build Properties put IXML Constants PROPERTY BUILD TEMP f Build Temp Location destination NON NLS 1 f Build Properties put IXML Constants PROPERTY TEMP FOLDER f Build Temp Location temp folder NON NLS 1 f Build Properties put IXML Constants PROPERTY FEATURE TEMP FOLDER f Build Temp Location destination NON NLS 1 f Build Properties put IXML Constants PROPERTY INCLUDE CHILDREN true NON NLS 1 f Build Properties put eclipse running true NON NLS 1 NON NLS 2 f Build Properties put IXML Constants PROPERTY BASE OS os f Build Properties put IXML Constants PROPERTY BASE WS ws f Build Properties put IXML Constants PROPERTY BASE ARCH arch f Build Properties put IXML Constants PROPERTY BASE NL Target Platform getNL f Build Properties put IXML Constants PROPERTY BOOTCLASSPATH Base Build Action get Boot Classpath I Preference Store store PDE Plugin get Default get Preference Store f Build Properties put IXML Constants PROPERTY JAVAC FAIL ON ERROR false NON NLS 1 f Build Properties put IXML Constants PROPERTY JAVAC DEBUG INFO store get Boolean PROP JAVAC DEBUG INFO on off NON NLS 1 NON NLS 2 f Build Properties put IXML Constants PROPERTY JAVAC VERBOSE store get String PROP JAVAC VERBOSE Preferences pref Java Core get Plugin get Plugin Preferences f Build Properties put IXML Constants PROPERTY JAVAC SOURCE pref get String Java Core COMPILER SOURCE f Build Properties put IXML Constants PROPERTY JAVAC TARGET pref get String Java Core COMPILER CODEGEN TARGET PLATFORM for the assembler f Build Properties put IXML Constants PROPERTY BUILD DIRECTORY f Build Temp Location assembly Location NON NLS 1 f Build Properties put IXML Constants PROPERTY BUILD LABEL NON NLS 1 f Build Properties put IXML Constants PROPERTY COLLECTING FOLDER NON NLS 1 String prefix Platform getOS equals macosx NON NLS 1 NON NLS 2 NON NLS 3 f Build Properties put IXML Constants PROPERTY ARCHIVE PREFIX prefix if f Export Type EXPORT AS ZIP f Build Properties put IXML Constants PROPERTY ARCHIVE FULLPATH f Destination Directory File separator f Zip Filename else f Build Properties put IXML Constants PROPERTY ASSEMBLY TMP f Destination Directory return f Build Properties  HashMap createBuildProperties fBuildProperties fBuildProperties HashMap fBuildProperties IXMLConstants PROPERTY_BUILD_TEMP fBuildTempLocation fBuildProperties IXMLConstants PROPERTY_TEMP_FOLDER fBuildTempLocation fBuildProperties IXMLConstants PROPERTY_FEATURE_TEMP_FOLDER fBuildTempLocation fBuildProperties IXMLConstants PROPERTY_INCLUDE_CHILDREN fBuildProperties fBuildProperties IXMLConstants PROPERTY_BASE_OS fBuildProperties IXMLConstants PROPERTY_BASE_WS fBuildProperties IXMLConstants PROPERTY_BASE_ARCH fBuildProperties IXMLConstants PROPERTY_BASE_NL TargetPlatform fBuildProperties IXMLConstants PROPERTY_BOOTCLASSPATH BaseBuildAction getBootClasspath IPreferenceStore PDEPlugin getDefault getPreferenceStore fBuildProperties IXMLConstants PROPERTY_JAVAC_FAIL_ON_ERROR fBuildProperties IXMLConstants PROPERTY_JAVAC_DEBUG_INFO getBoolean PROP_JAVAC_DEBUG_INFO fBuildProperties IXMLConstants PROPERTY_JAVAC_VERBOSE getString PROP_JAVAC_VERBOSE JavaCore getPlugin getPluginPreferences fBuildProperties IXMLConstants PROPERTY_JAVAC_SOURCE getString JavaCore COMPILER_SOURCE fBuildProperties IXMLConstants PROPERTY_JAVAC_TARGET getString JavaCore COMPILER_CODEGEN_TARGET_PLATFORM fBuildProperties IXMLConstants PROPERTY_BUILD_DIRECTORY fBuildTempLocation assemblyLocation fBuildProperties IXMLConstants PROPERTY_BUILD_LABEL fBuildProperties IXMLConstants PROPERTY_COLLECTING_FOLDER fBuildProperties IXMLConstants PROPERTY_ARCHIVE_PREFIX fExportType EXPORT_AS_ZIP fBuildProperties IXMLConstants PROPERTY_ARCHIVE_FULLPATH fDestinationDirectory fZipFilename fBuildProperties IXMLConstants PROPERTY_ASSEMBLY_TMP fDestinationDirectory fBuildProperties
private void make Script String featureID String version Id String os String ws String arch String feature Location throws Core Exception Build Script Generator generator new Build Script Generator generator set BuildingOS Gi PDE Core get Default get Model Manager isOS Gi Runtime generator set Children true generator set Working Directory feature Location generator set Dev Entries get Dev Properties generator set Elements new String feature featureID version Id null version Id NON NLS 1 NON NLS 2 NON NLS 3 generator set Plugin Path get Paths String format if f Export Type EXPORT AS ZIP format Platform getOS equals macosx tar Gz ant Zip NON NLS 1 NON NLS 2 NON NLS 3 else format folder NON NLS 1 Build Script Generator set Output Format format Build Script Generator set Force Update Jar f Export Type EXPORT AS UPDATE JARS Build Script Generator set Embedded Source f Export Source f Export Type EXPORT AS UPDATE JARS Build Script Generator set Config Info os ws arch NON NLS 1 NON NLS 2 generator generate  makeScript versionId featureLocation CoreException BuildScriptGenerator BuildScriptGenerator setBuildingOSGi PDECore getDefault getModelManager isOSGiRuntime setChildren setWorkingDirectory featureLocation setDevEntries getDevProperties setElements versionId versionId setPluginPath getPaths fExportType EXPORT_AS_ZIP tarGz antZip BuildScriptGenerator setOutputFormat BuildScriptGenerator setForceUpdateJar fExportType EXPORT_AS_UPDATE_JARS BuildScriptGenerator setEmbeddedSource fExportSource fExportType EXPORT_AS_UPDATE_JARS BuildScriptGenerator setConfigInfo
private String get Dev Properties if f Dev Properties null f Dev Properties Classpath Helper get Dev Entries Properties f Build Temp Location dev properties false NON NLS 1 return f Dev Properties  getDevProperties fDevProperties fDevProperties ClasspathHelper getDevEntriesProperties fBuildTempLocation fDevProperties
protected void run Script String location String targets Map properties I Progress Monitor monitor throws Invocation Target Exception Core Exception Ant Runner runner new Ant Runner runner add User Properties properties runner set Ant Home location runner set Build File Location location runner add Build Listener org eclipse pde internal ui ant Export Build Listener NON NLS 1 runner set Execution Targets targets runner run monitor  runScript IProgressMonitor InvocationTargetException CoreException AntRunner AntRunner addUserProperties setAntHome setBuildFileLocation addBuildListener ExportBuildListener setExecutionTargets
private String get Build Script Name String feature Location return feature Location Path SEPARATOR build xml NON NLS 1  getBuildScriptName featureLocation featureLocation
protected String get Assembly Script Name String featureID String os String ws String arch String feature Location return feature Location Path SEPARATOR assemble NON NLS 1 featureID os NON NLS 1 NON NLS 2 ws arch NON NLS 1 xml NON NLS 1  getAssemblyScriptName featureLocation featureLocation
private String get Build Execution Targets if f Export Source f Export Type EXPORT AS UPDATE JARS return new String build jars build sources gather logs NON NLS 1 NON NLS 2 NON NLS 3 return new String build jars gather logs NON NLS 1 NON NLS 2  getBuildExecutionTargets fExportSource fExportType EXPORT_AS_UPDATE_JARS
public void delete Build Files I Model model throws Core Exception if model null return String directory model instanceof I Feature Model I Feature Model model get Install Location I Plugin Model Base model get Install Location if model get Underlying Resource null is Custom Build model File dir new File directory File children dir list Files if children null for int i 0 i children length i if children i is Directory String filename children i get Name if filename equals build xml NON NLS 1 filename starts With assemble filename ends With xml NON NLS 1 NON NLS 2 children i delete if model instanceof I Feature Model I Feature feature I Feature Model model get Feature I Feature Child children feature get Included Features for int i 0 i children length i I Feature ref Feature Child children i get Referenced Feature if ref null delete Build Files ref get Model I Feature Plugin plugins feature get Plugins Plugin Model Manager manager PDE Core get Default get Model Manager for int i 0 i plugins length i Model Entry entry manager find Entry plugins i get Id if entry null delete Build Files entry get Active Model  deleteBuildFiles IModel CoreException IFeatureModel IFeatureModel getInstallLocation IPluginModelBase getInstallLocation getUnderlyingResource isCustomBuild listFiles isDirectory getName startsWith endsWith IFeatureModel IFeature IFeatureModel getFeature IFeatureChild getIncludedFeatures IFeature FeatureChild getReferencedFeature deleteBuildFiles getModel IFeaturePlugin getPlugins PluginModelManager PDECore getDefault getModelManager ModelEntry findEntry getId deleteBuildFiles getActiveModel
protected boolean is Custom Build I Model model throws Core Exception I Build Model build Model null I File build File model get Underlying Resource get Project get File build properties NON NLS 1 if build File exists build Model new Workspace Build Model build File build Model load if build Model null I Build build build Model get Build I Build Entry entry build get Entry custom NON NLS 1 if entry null String tokens entry get Tokens for int i 0 i tokens length i if tokens i equals true NON NLS 1 return true return false  isCustomBuild IModel CoreException IBuildModel buildModel IFile buildFile getUnderlyingResource getProject getFile buildFile buildModel WorkspaceBuildModel buildFile buildModel buildModel IBuild buildModel getBuild IBuildEntry getEntry getTokens
protected String get Paths throws Core Exception Array List paths new Array List I Feature Model models PDE Core get Default get Workspace Model Manager get Feature Models for int i 0 i models length i paths add models i get Install Location Path SEPARATOR feature xml NON NLS 1 String plugins Target Platform create Plugin Path String features String paths to Array new String paths size String all new String plugins length paths size System arraycopy plugins 0 all 0 plugins length System arraycopy features 0 all plugins length features length return all  getPaths CoreException ArrayList ArrayList IFeatureModel PDECore getDefault getWorkspaceModelManager getFeatureModels getInstallLocation TargetPlatform createPluginPath toArray
private static void create Log Writer try String path PDE Plugin get Default get State Location toOS String log File new File path export Log txt NON NLS 1 if log File exists log File delete log File create New File writer new Print Writer new File Writer log File true catch IO Exception e  createLogWriter PDEPlugin getDefault getStateLocation toOSString logFile exportLog logFile logFile logFile createNewFile PrintWriter FileWriter logFile IOException
public static Print Writer get Writer if writer null create Log Writer return writer  PrintWriter getWriter createLogWriter
protected void cleanup I Progress Monitor monitor File script File null try script File create Script File writer new Print Writer new File Writer script File true generate Header writer generate Delete Zip Target writer generate Clean Target writer boolean errors generate Zip Logs Target writer generate Closing Tag writer writer close Array List targets new Array List targets add delete Zip NON NLS 1 if errors targets add zip logs NON NLS 1 targets add clean NON NLS 1 Ant Runner runner new Ant Runner runner set Build File Location script File get Absolute Path runner set Execution Targets String targets to Array new String targets size runner run monitor catch IO Exception e catch Core Exception e finally if script File null script File exists script File delete  IProgressMonitor scriptFile scriptFile createScriptFile PrintWriter FileWriter scriptFile generateHeader generateDeleteZipTarget generateCleanTarget generateZipLogsTarget generateClosingTag ArrayList ArrayList deleteZip AntRunner AntRunner setBuildFileLocation scriptFile getAbsolutePath setExecutionTargets toArray IOException CoreException scriptFile scriptFile scriptFile
private File create Script File throws IO Exception String path PDE Plugin get Default get State Location toOS String File zip new File path zip xml NON NLS 1 if zip exists zip delete zip create New File return zip  createScriptFile IOException PDEPlugin getDefault getStateLocation toOSString createNewFile
return zip private void generate Header Print Writer writer writer println xml version 1 0 encoding UTF 8 NON NLS 1 writer println project name temp default clean basedir NON NLS 1  generateHeader PrintWriter
private void generate Clean Target Print Writer writer writer println target name clean NON NLS 1 writer println delete dir f Build Temp Location NON NLS 1 NON NLS 2 writer println target NON NLS 1  generateCleanTarget PrintWriter fBuildTempLocation
private void generate Delete Zip Target Print Writer writer writer println target name delete Zip NON NLS 1 writer println delete file f Destination Directory logs zip NON NLS 1 NON NLS 2 writer println target NON NLS 1  generateDeleteZipTarget PrintWriter deleteZip fDestinationDirectory
private boolean generate Zip Logs Target Print Writer writer if log File null log File exists log File length 0 writer println target name zip logs NON NLS 1 writer println zip zipfile f Destination Directory logs zip basedir f Build Temp Location temp folder NON NLS 1 NON NLS 2 NON NLS 3 writer println target NON NLS 1 return true return false  generateZipLogsTarget PrintWriter logFile logFile logFile fDestinationDirectory fBuildTempLocation
return false private void generate Closing Tag Print Writer writer writer println project NON NLS 1  generateClosingTag PrintWriter
Returns the standard display to be used The method first checks if the thread calling this method has an associated disaply If so this display is returned Otherwise the method returns the default display public static Display get Standard Display Display display display Display get Current if display null display Display get Default return display  getStandardDisplay getCurrent getDefault
private void async Notify Export Exception String error Message get Standard Display beep Message Dialog open Error PDE Plugin get Active Workbench Shell PDE Plugin get Resource String Feature Export Job error error Message NON NLS 1 done new Status I Status OK PDE Plugin get Plugin Id I Status OK null NON NLS 1  asyncNotifyExportException errorMessage getStandardDisplay MessageDialog openError PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString FeatureExportJob errorMessage IStatus PDEPlugin getPluginId IStatus
protected String get Log Found Message return PDE Plugin get Formatted Message Export Job error message f Destination Directory File separator logs zip NON NLS 1 NON NLS 2  getLogFoundMessage PDEPlugin getFormattedMessage ExportJob fDestinationDirectory

The constructor public Feature Export Wizard set Default Page Image Descriptor PDE Plugin Images DESC FEATURE EXPORT WIZ set Window Title PDE Plugin get Resource String KEY WTITLE  FeatureExportWizard setDefaultPageImageDescriptor PDEPluginImages DESC_FEATURE_EXPORT_WIZ setWindowTitle PDEPlugin getResourceString KEY_WTITLE
protected Base Export Wizard Page create Page1 return new Feature Export Wizard Page get Selection  BaseExportWizardPage createPage1 FeatureExportWizardPage getSelection
public I Dialog Settings get Settings Section I Dialog Settings master I Dialog Settings setting master get Section STORE SECTION if setting null setting master add New Section STORE SECTION return setting  IDialogSettings getSettingsSection IDialogSettings IDialogSettings getSection STORE_SECTION addNewSection STORE_SECTION
protected void schedule Export Job Feature Export Job job new Feature Export Job page1 get Export Type page1 do Export Source page1 get Destination page1 get File Name page1 get Selected Items job set User true job schedule job set Property I Progress Constants ICON PROPERTY PDE Plugin Images DESC FEATURE OBJ  scheduleExportJob FeatureExportJob FeatureExportJob getExportType doExportSource getDestination getFileName getSelectedItems setUser setProperty IProgressConstants ICON_PROPERTY PDEPluginImages DESC_FEATURE_OBJ
protected void generate Ant Task Print Writer writer writer println xml version 1 0 encoding UTF 8 NON NLS 1 writer println project name build default feature export NON NLS 1 writer println t target name feature export NON NLS 1 writer print t t pde export Features features get FeatureI Ds NON NLS 1 destination page1 get Destination NON NLS 1 NON NLS 2 String filename page1 get File Name if filename null writer print filename filename NON NLS 1 NON NLS 2 writer print export Type get Export Operation NON NLS 1 NON NLS 2 writer println export Source page1 do Export Source true false NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 writer println t target NON NLS 1 writer println project NON NLS 1  generateAntTask PrintWriter feature_export feature_export exportFeatures getFeatureIDs getDestination getFileName exportType getExportOperation exportSource doExportSource
private String get FeatureI Ds String Buffer buffer new String Buffer Object objects page1 get Selected Items for int i 0 i objects length i Object object objects i if object instanceof I Feature Model buffer append I Feature Model object get Feature get Id if i objects length 1 buffer append NON NLS 1 return buffer to String  getFeatureIDs StringBuffer StringBuffer getSelectedItems IFeatureModel IFeatureModel getFeature getId toString

public Feature Export Wizard Page I Structured Selection selection super selection feature Export NON NLS 1 PDE Plugin get Resource String Export Wizard Feature page Block NON NLS 1 true set Title PDE Plugin get Resource String Export Wizard Feature page Title NON NLS 1  FeatureExportWizardPage IStructuredSelection featureExport PDEPlugin getResourceString ExportWizard pageBlock setTitle PDEPlugin getResourceString ExportWizard pageTitle
public Object get List Elements Workspace Model Manager manager PDE Core get Default get Workspace Model Manager return manager get Feature Models  getListElements WorkspaceModelManager PDECore getDefault getWorkspaceModelManager getFeatureModels
protected void hook Help Context Control control Workbench Help set Help control I Help Context Ids FEATURE EXPORT WIZARD  hookHelpContext WorkbenchHelp setHelp IHelpContextIds FEATURE_EXPORT_WIZARD
see org eclipse pde internal ui wizards exports Base Export Wizard Page is Valid Model org eclipse pde core I Model protected boolean is Valid Model I Model model return model instanceof I Feature Model  BaseExportWizardPage isValidModel IModel isValidModel IModel IFeatureModel
see org eclipse pde internal ui wizards exports Base Export Wizard Page find Model For org eclipse core resources I Project protected I Model find Model For I Project project return PDE Core get Default get Workspace Model Manager get Feature Model project  BaseExportWizardPage findModelFor IProject IModel findModelFor IProject PDECore getDefault getWorkspaceModelManager getFeatureModel

public Plugin Export Job int export Type boolean export Source String destination String zip File Name Object items super export Type export Source destination zip File Name items  PluginExportJob exportType exportSource zipFileName exportType exportSource zipFileName
protected void do Exports I Progress Monitor monitor throws Invocation Target Exception Core Exception try create a feature to contain all plug ins String featureID org eclipse pde container feature NON NLS 1 f Feature Location f Build Temp Location File separator featureID create Feature featureID f Feature Location create Build Properties File f Feature Location do Export featureID null f Feature Location Target Platform getOS Target Platform getWS Target Platform getOS Arch monitor catch IO Exception e finally for int i 0 i f Items length i if f Items i instanceof I Plugin Model Base delete Build Files I Plugin Model Base f Items i cleanup new Sub Progress Monitor monitor 1 monitor done  doExports IProgressMonitor InvocationTargetException CoreException fFeatureLocation fBuildTempLocation createFeature fFeatureLocation createBuildPropertiesFile fFeatureLocation doExport fFeatureLocation TargetPlatform TargetPlatform TargetPlatform getOSArch IOException fItems fItems IPluginModelBase deleteBuildFiles IPluginModelBase fItems SubProgressMonitor
private void create Feature String featureID String feature Location throws IO Exception File file new File feature Location if file exists file is Directory file mkdirs File featureXML new File file feature xml NON NLS 1 Print Writer writer new Print Writer new Output Stream Writer new File Output Stream featureXML UTF 8 true NON NLS 1 writer println xml version 1 0 encoding UTF 8 NON NLS 1 writer println feature id featureID version 1 0 NON NLS 1 NON NLS 2 for int i 0 i f Items length i if f Items i instanceof I Plugin Model Base I Plugin Base plugin I Plugin Model Base f Items i get Plugin Base writer println plugin id plugin get Id version 0 0 0 NON NLS 1 NON NLS 2 writer println feature NON NLS 1 writer close  createFeature featureLocation IOException featureLocation isDirectory PrintWriter PrintWriter OutputStreamWriter FileOutputStream fItems fItems IPluginModelBase IPluginBase IPluginModelBase fItems getPluginBase getId
protected String get Paths throws Core Exception String paths super get Paths String all new String paths length 1 all 0 f Feature Location File separator feature xml NON NLS 1 System arraycopy paths 0 all 1 paths length return all  getPaths CoreException getPaths fFeatureLocation
private void create Build Properties File String feature Location File file new File feature Location if file exists file is Directory file mkdirs File build new File file build properties NON NLS 1 try build create New File catch IO Exception e  createBuildPropertiesFile featureLocation featureLocation isDirectory createNewFile IOException

The constructor public Plugin Export Wizard set Default Page Image Descriptor PDE Plugin Images DESC PLUGIN EXPORT WIZ set Window Title PDE Plugin get Resource String KEY WTITLE  PluginExportWizard setDefaultPageImageDescriptor PDEPluginImages DESC_PLUGIN_EXPORT_WIZ setWindowTitle PDEPlugin getResourceString KEY_WTITLE
protected Base Export Wizard Page create Page1 return new Plugin Export Wizard Page get Selection  BaseExportWizardPage createPage1 PluginExportWizardPage getSelection
public I Dialog Settings get Settings Section I Dialog Settings master I Dialog Settings setting master get Section STORE SECTION if setting null setting master add New Section STORE SECTION return setting  IDialogSettings getSettingsSection IDialogSettings IDialogSettings getSection STORE_SECTION addNewSection STORE_SECTION
protected void schedule Export Job Plugin Export Job job new Plugin Export Job page1 get Export Type page1 do Export Source page1 get Destination page1 get File Name page1 get Selected Items job set User true job schedule job set Property I Progress Constants ICON PROPERTY PDE Plugin Images DESC PLUGIN OBJ  scheduleExportJob PluginExportJob PluginExportJob getExportType doExportSource getDestination getFileName getSelectedItems setUser setProperty IProgressConstants ICON_PROPERTY PDEPluginImages DESC_PLUGIN_OBJ
protected void generate Ant Task Print Writer writer writer println xml version 1 0 encoding UTF 8 NON NLS 1 writer println project name build default plugin export NON NLS 1 writer println t target name plugin export NON NLS 1 writer print t t pde export Plugins plugins get PluginI Ds NON NLS 1 destination page1 get Destination NON NLS 1 NON NLS 2 String filename page1 get File Name if filename null writer print filename filename NON NLS 1 NON NLS 2 writer print export Type get Export Operation NON NLS 1 NON NLS 2 writer println export Source page1 do Export Source true false NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 writer println t target NON NLS 1 writer println project NON NLS 1  generateAntTask PrintWriter plugin_export plugin_export exportPlugins getPluginIDs getDestination getFileName exportType getExportOperation exportSource doExportSource
private String get PluginI Ds String Buffer buffer new String Buffer Object objects page1 get Selected Items for int i 0 i objects length i Object object objects i if object instanceof I Plugin Model Base buffer append I Plugin Model Base object get Plugin Base get Id if i objects length 1 buffer append NON NLS 1 return buffer to String  getPluginIDs StringBuffer StringBuffer getSelectedItems IPluginModelBase IPluginModelBase getPluginBase getId toString

public Plugin Export Wizard Page I Structured Selection selection super selection plugin Export NON NLS 1 PDE Plugin get Resource String Export Wizard Plugin page Block NON NLS 1 false set Title PDE Plugin get Resource String Export Wizard Plugin page Title NON NLS 1  PluginExportWizardPage IStructuredSelection pluginExport PDEPlugin getResourceString ExportWizard pageBlock setTitle PDEPlugin getResourceString ExportWizard pageTitle
public Object get List Elements I Project projects Resources Plugin get Workspace get Root get Projects Array List result new Array List for int i 0 i projects length i if Workspace Model Manager is Binary Plugin Project projects i Workspace Model Manager is Plugin Project projects i I Model model PDE Core get Default get Model Manager find Model projects i if model null is Valid Model model has Build Properties I Plugin Model Base model result add model return I Model result to Array new I Model result size  getListElements IProject ResourcesPlugin getWorkspace getRoot getProjects ArrayList ArrayList WorkspaceModelManager isBinaryPluginProject WorkspaceModelManager isPluginProject IModel PDECore getDefault getModelManager findModel isValidModel hasBuildProperties IPluginModelBase IModel toArray IModel
protected void hook Help Context Control control Workbench Help set Help control I Help Context Ids PLUGIN EXPORT WIZARD  hookHelpContext WorkbenchHelp setHelp IHelpContextIds PLUGIN_EXPORT_WIZARD
private boolean has Build Properties I Plugin Model Base model File file new File model get Install Location build properties NON NLS 1 return file exists  hasBuildProperties IPluginModelBase getInstallLocation
see org eclipse pde internal ui wizards exports Base Export Wizard Page is Valid Model org eclipse pde core I Model protected boolean is Valid Model I Model model return model null model instanceof I Plugin Model Base  BaseExportWizardPage isValidModel IModel isValidModel IModel IPluginModelBase
see org eclipse pde internal ui wizards exports Base Export Wizard Page find Model For org eclipse core resources I Project protected I Model find Model For I Project project return PDE Core get Default get Model Manager find Model project  BaseExportWizardPage findModelFor IProject IModel findModelFor IProject PDECore getDefault getModelManager findModel

protected Button find Location Button public Base Extension Point Main Page I Container container super new Extension Point NON NLS 1 this container container if container null this project container get Project else this project null  findLocationButton BaseExtensionPointMainPage IContainer newExtensionPoint getProject
public void create Control Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 layout vertical Spacing 9 layout make Columns Equal Width false container set Layout layout Label label Grid Data gd if is Plugin Id Needed label new Label container SWT NONE label set Text PDE Plugin get Resource String KEY PLUGIN ID plugin Id Text new Text container SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 1 gd width Hint 275 plugin Id Text set Layout Data gd plugin Id Text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Page true plugin Browse Button new Button container SWT PUSH gd new Grid Data Grid Data HORIZONTAL ALIGN END gd horizontal Span 1 gd width Hint 50 plugin Browse Button set Layout Data gd plugin Browse Button set Text PDE Plugin get Resource String Base Extension Point Main Page plugin Browse NON NLS 1 plugin Browse Button set Tool Tip Text PDE Plugin get Resource String Base Extension Point Main Page plugin Id tooltip NON NLS 1 plugin Browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Plugin Browse SWT Util set Button Dimension Hint plugin Browse Button label new Label container SWT NONE label set Text PDE Plugin get Resource String KEY ID id Text new Text container SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 id Text set Layout Data gd id Text add Modify Listener new Modify Listener public void modify Text Modify Event e schema Text set Text get Schema Location id Text get Text exsd NON NLS 1 NON NLS 2 validate Page false label new Label container SWT NONE label set Text PDE Plugin get Resource String KEY NAME name Text new Text container SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 name Text set Layout Data gd name Text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Page false if is Plugin Id Needed is Plugin Id Final label new Label container SWT NONE label set Text PDE Plugin get Resource String KEY SCHEMA LOCATION schema Location Text new Text container SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 150 gd grab Excess Horizontal Space true schema Location Text set Layout Data gd schema Location Text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Page true find Location Button new Button container SWT PUSH gd new Grid Data Grid Data HORIZONTAL ALIGN END gd width Hint 50 find Location Button set Layout Data gd find Location Button set Text PDE Plugin get Resource String Base Extension Point Main Page find Browse NON NLS 1 find Location Button set Tool Tip Text PDE Plugin get Resource String Base Extension Point Main Page schema Location tooltip NON NLS 1 find Location Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Schema Location SWT Util set Button Dimension Hint find Location Button label new Label container SWT NONE label set Text PDE Plugin get Resource String KEY SCHEMA schema Text new Text container SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 schema Text set Layout Data gd schema Text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Page false if is Shared Schema Switch Needed shared Schema Button new Button container SWT CHECK shared Schema Button set Text PDE Plugin get Resource String KEY SHARED gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 shared Schema Button set Layout Data gd open Schema Button new Button container SWT CHECK open Schema Button set Text PDE Plugin get Resource String KEY EDIT open Schema Button set Selection true gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 open Schema Button set Layout Data gd if is Plugin Id Needed plugin Id Text set Focus else id Text set Focus set Control container Dialog apply Dialog Font container Workbench Help set Help container I Help Context Ids NEW SCHEMA  createControl GridLayout GridLayout numColumns verticalSpacing makeColumnsEqualWidth setLayout GridData isPluginIdNeeded setText PDEPlugin getResourceString KEY_PLUGIN_ID pluginIdText GridData GridData FILL_HORIZONTAL horizontalSpan widthHint pluginIdText setLayoutData pluginIdText addModifyListener ModifyListener modifyText ModifyEvent validatePage pluginBrowseButton GridData GridData HORIZONTAL_ALIGN_END horizontalSpan widthHint pluginBrowseButton setLayoutData pluginBrowseButton setText PDEPlugin getResourceString BaseExtensionPointMainPage pluginBrowse pluginBrowseButton setToolTipText PDEPlugin getResourceString BaseExtensionPointMainPage pluginId pluginBrowseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handlePluginBrowse SWTUtil setButtonDimensionHint pluginBrowseButton setText PDEPlugin getResourceString KEY_ID idText GridData GridData FILL_HORIZONTAL horizontalSpan idText setLayoutData idText addModifyListener ModifyListener modifyText ModifyEvent schemaText setText getSchemaLocation idText getText validatePage setText PDEPlugin getResourceString KEY_NAME nameText GridData GridData FILL_HORIZONTAL horizontalSpan nameText setLayoutData nameText addModifyListener ModifyListener modifyText ModifyEvent validatePage isPluginIdNeeded isPluginIdFinal setText PDEPlugin getResourceString KEY_SCHEMA_LOCATION schemaLocationText GridData GridData FILL_HORIZONTAL widthHint grabExcessHorizontalSpace schemaLocationText setLayoutData schemaLocationText addModifyListener ModifyListener modifyText ModifyEvent validatePage findLocationButton GridData GridData HORIZONTAL_ALIGN_END widthHint findLocationButton setLayoutData findLocationButton setText PDEPlugin getResourceString BaseExtensionPointMainPage findBrowse findLocationButton setToolTipText PDEPlugin getResourceString BaseExtensionPointMainPage schemaLocation findLocationButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSchemaLocation SWTUtil setButtonDimensionHint findLocationButton setText PDEPlugin getResourceString KEY_SCHEMA schemaText GridData GridData FILL_HORIZONTAL horizontalSpan schemaText setLayoutData schemaText addModifyListener ModifyListener modifyText ModifyEvent validatePage isSharedSchemaSwitchNeeded sharedSchemaButton sharedSchemaButton setText PDEPlugin getResourceString KEY_SHARED GridData GridData FILL_HORIZONTAL horizontalSpan sharedSchemaButton setLayoutData openSchemaButton openSchemaButton setText PDEPlugin getResourceString KEY_EDIT openSchemaButton setSelection GridData GridData FILL_HORIZONTAL horizontalSpan openSchemaButton setLayoutData isPluginIdNeeded pluginIdText setFocus idText setFocus setControl applyDialogFont WorkbenchHelp setHelp IHelpContextIds NEW_SCHEMA
private Input Stream create Schema Stream String plugin Id String point Id String name boolean shared if name length 0 name point Id Editable Schema schema new Editable Schema plugin Id point Id name schema set Description PDE Plugin get Resource String KEY SECTIONS OVERVIEW Document Section section section new Document Section schema I Document Section SINCE PDE Plugin get Resource String Base Extension Point Main Page since NON NLS 1 section set Description PDE Plugin get Resource String KEY SECTIONS SINCE schema add Document Section section Schema Element element if shared element new Schema Element schema extension NON NLS 1 Schema Complex Type complex Type new Schema Complex Type schema element set Type complex Type Schema Compositor compositor new Schema Compositor element I Schema Compositor SEQUENCE complex Type set Compositor compositor Schema Attribute attribute new Schema Attribute element point NON NLS 1 attribute set Type new Schema Simple Type schema string NON NLS 1 attribute set Use I Schema Attribute REQUIRED complex Type add Attribute attribute attribute new Schema Attribute element id NON NLS 1 attribute set Type new Schema Simple Type schema string NON NLS 1 complex Type add Attribute attribute attribute new Schema Attribute element name NON NLS 1 attribute set Type new Schema Simple Type schema string NON NLS 1 complex Type add Attribute attribute schema add Element element section new Document Section schema I Document Section EXAMPLES Examples NON NLS 1 section set Description PDE Plugin get Resource String KEY SECTIONS USAGE schema add Document Section section section new Document Section schema I Document Section API INFO API Information NON NLS 1 section set Description PDE Plugin get Resource String KEY SECTIONS API schema add Document Section section section new Document Section schema I Document Section IMPLEMENTATION Supplied Implementation NON NLS 1 section set Description PDE Plugin get Resource String KEY SECTIONS SUPPLIED schema add Document Section section section new Document Section schema I Document Section COPYRIGHT Copyright NON NLS 1 section set Description PDE Plugin get Resource String KEY SECTIONS COPYRIGHT schema add Document Section section String Writer swriter new String Writer try Print Writer writer new Print Writer swriter true schema save writer swriter close catch IO Exception e PDE Plugin log Exception e try return new Byte Array Input Stream swriter to String get Bytes UTF8 NON NLS 1 catch Unsupported Encoding Exception e return new Byte Array Input Stream new byte 0  InputStream createSchemaStream pluginId pointId pointId EditableSchema EditableSchema pluginId pointId setDescription PDEPlugin getResourceString KEY_SECTIONS_OVERVIEW DocumentSection DocumentSection IDocumentSection PDEPlugin getResourceString BaseExtensionPointMainPage setDescription PDEPlugin getResourceString KEY_SECTIONS_SINCE addDocumentSection SchemaElement SchemaElement SchemaComplexType complexType SchemaComplexType setType complexType SchemaCompositor SchemaCompositor ISchemaCompositor complexType setCompositor SchemaAttribute SchemaAttribute setType SchemaSimpleType setUse ISchemaAttribute complexType addAttribute SchemaAttribute setType SchemaSimpleType complexType addAttribute SchemaAttribute setType SchemaSimpleType complexType addAttribute addElement DocumentSection IDocumentSection setDescription PDEPlugin getResourceString KEY_SECTIONS_USAGE addDocumentSection DocumentSection IDocumentSection API_INFO setDescription PDEPlugin getResourceString KEY_SECTIONS_API addDocumentSection DocumentSection IDocumentSection setDescription PDEPlugin getResourceString KEY_SECTIONS_SUPPLIED addDocumentSection DocumentSection IDocumentSection setDescription PDEPlugin getResourceString KEY_SECTIONS_COPYRIGHT addDocumentSection StringWriter StringWriter PrintWriter PrintWriter IOException PDEPlugin logException ByteArrayInputStream toString getBytes UnsupportedEncodingException ByteArrayInputStream
private I File generate Schema File String plugin Id String id String name boolean shared String schema I Progress Monitor monitor throws Core Exception I File schema File null monitor sub Task PDE Plugin get Resource String KEY GENERATING I Workspace workspace container get Workspace I Path schema Path new Path schema remove Last Segments 1 I Path new Schema Path container get Project Relative Path append schema Path if new Schema Path is Empty false I Folder folder container get Project get Folder new Schema Path Core Utility create Folder folder true true null Input Stream source create Schema Stream plugin Id id name shared I Path file Path container get Full Path append schema schema File workspace get Root get File file Path if schema File exists create for the first time schema File create source true monitor else schema File set Contents source true false monitor monitor done IDE set Default Editor schema File PDE Plugin SCHEMA EDITOR ID return schema File  IFile generateSchemaFile pluginId IProgressMonitor CoreException IFile schemaFile subTask PDEPlugin getResourceString KEY_GENERATING IWorkspace getWorkspace IPath schemaPath removeLastSegments IPath newSchemaPath getProjectRelativePath schemaPath newSchemaPath isEmpty IFolder getProject getFolder newSchemaPath CoreUtility createFolder InputStream createSchemaStream pluginId IPath filePath getFullPath schemaFile getRoot getFile filePath schemaFile schemaFile schemaFile setContents setDefaultEditor schemaFile PDEPlugin SCHEMA_EDITOR_ID schemaFile
I Runnable With Progress operation new Workspace Modify Operation public void execute I Progress Monitor monitor try String schema Name schema if schema ends With exsd NON NLS 1 schema Name schema exsd NON NLS 1 I File file generate Schema File get Plugin Id id name shared schema Name monitor if file null open File schema Text set Text file get Project Relative Path to String open Schema File file catch Core Exception e PDE Plugin log Exception e finally monitor done  IRunnableWithProgress WorkspaceModifyOperation IProgressMonitor schemaName endsWith schemaName IFile generateSchemaFile getPluginId schemaName openFile schemaText setText getProjectRelativePath toString openSchemaFile CoreException PDEPlugin logException
public I Runnable With Progress get Operation final boolean open File open Schema Button get Selection final String id id Text get Text final String name name Text get Text final String schema schema Text get Text final boolean shared shared Schema Button null shared Schema Button get Selection false I Runnable With Progress operation new Workspace Modify Operation public void execute I Progress Monitor monitor try String schema Name schema if schema ends With exsd NON NLS 1 schema Name schema exsd NON NLS 1 I File file generate Schema File get Plugin Id id name shared schema Name monitor if file null open File schema Text set Text file get Project Relative Path to String open Schema File file catch Core Exception e PDE Plugin log Exception e finally monitor done return operation  IRunnableWithProgress getOperation openFile openSchemaButton getSelection idText getText nameText getText schemaText getText sharedSchemaButton sharedSchemaButton getSelection IRunnableWithProgress WorkspaceModifyOperation IProgressMonitor schemaName endsWith schemaName IFile generateSchemaFile getPluginId schemaName openFile schemaText setText getProjectRelativePath toString openSchemaFile CoreException PDEPlugin logException
public String get Schema Location if schema Text null String schema schema Text get Text if schema length 0 return SCHEMA DIR int loc schema last Index Of NON NLS 1 if loc 1 return schema substring 0 loc return NON NLS 1  getSchemaLocation schemaText schemaText getText SCHEMA_DIR lastIndexOf
public String get Plugin Id if plugin Id Text null return plugin Id Text get Text return NON NLS 1  getPluginId pluginIdText pluginIdText getText
protected boolean is Plugin Id Needed return false  isPluginIdNeeded
return false protected boolean is Plugin Id Final return false  isPluginIdFinal
return false protected boolean is Shared Schema Switch Needed return false  isSharedSchemaSwitchNeeded
d async Exec new Runnable public void run try String editor Id PDE Plugin SCHEMA EDITOR ID ww get Active Page open Editor new File Editor Input file editor Id catch Part Init Exception e PDE Plugin log Exception e  asyncExec editorId PDEPlugin SCHEMA_EDITOR_ID getActivePage openEditor FileEditorInput editorId PartInitException PDEPlugin logException
private void open Schema File final I File file final I Workbench Window ww PDE Plugin get Active Workbench Window Display d ww get Shell get Display d async Exec new Runnable public void run try String editor Id PDE Plugin SCHEMA EDITOR ID ww get Active Page open Editor new File Editor Input file editor Id catch Part Init Exception e PDE Plugin log Exception e  openSchemaFile IFile IWorkbenchWindow PDEPlugin getActiveWorkbenchWindow getShell getDisplay asyncExec editorId PDEPlugin SCHEMA_EDITOR_ID getActivePage openEditor FileEditorInput editorId PartInitException PDEPlugin logException
public boolean check Fields Filled boolean empty id Text get Text length 0 name Text get Text length 0 if empty is Plugin Id Needed empty get Plugin Id length 0 schema Text get Text length 0 if empty is Plugin Id Final empty schema Location Text get Text length 0 return empty  checkFieldsFilled idText getText nameText getText isPluginIdNeeded getPluginId schemaText getText isPluginIdFinal schemaLocationText getText
private void validate Page boolean has Container Changed if has Container Changed validate Container return boolean is Complete check Fields Filled set Page Complete is Complete String message null if is Complete if is Plugin Id Needed message PDE Plugin get Resource String KEY MISSING ID else message PDE Plugin get Resource String KEY NO PLUGIN MISSING ID set Message message I Message Provider WARNING  validatePage hasContainerChanged hasContainerChanged validateContainer isComplete checkFieldsFilled setPageComplete isComplete isComplete isPluginIdNeeded PDEPlugin getResourceString KEY_MISSING_ID PDEPlugin getResourceString KEY_NO_PLUGIN_MISSING_ID setMessage IMessageProvider
private boolean validate Container if is Plugin Id Needed is Plugin Id Final String new Container Name schema Location Text get Text I Workspace Root root PDE Core get Workspace get Root I Path workspace Path root get Location if new Container Name starts With workspace Path to String new Container Name new Container Name replace First workspace Path to String NON NLS 1 if new Container Name length 0 handle Invalid Container return false if root exists new Path new Container Name container root get Container For Location workspace Path append new Container Name else if project null project exists new Path new Container Name container root get Container For Location project get Location append new Container Name else handle Invalid Container return false handle Valid Container return true boolean exists container null container exists if exists handle Invalid Container return exists  validateContainer isPluginIdNeeded isPluginIdFinal newContainerName schemaLocationText getText IWorkspaceRoot PDECore getWorkspace getRoot IPath workspacePath getLocation newContainerName startsWith workspacePath toString newContainerName newContainerName replaceFirst workspacePath toString newContainerName handleInvalidContainer newContainerName getContainerForLocation workspacePath newContainerName newContainerName getContainerForLocation getLocation newContainerName handleInvalidContainer handleValidContainer handleInvalidContainer
private void handle Invalid Container set Error Message PDE Plugin get Resource String Base Extension Point Main Page no Container NON NLS 1 set Page Complete false  handleInvalidContainer setErrorMessage PDEPlugin getResourceString BaseExtensionPointMainPage noContainer setPageComplete
set Page Complete false private void handle Valid Container set Error Message null  setPageComplete handleValidContainer setErrorMessage
private void handle Plugin Browse Plugin Selection Dialog dialog new Plugin Selection Dialog get Shell PDE Core get Default get Workspace Model Manager get All Models false dialog create if dialog open Dialog OK Workspace Plugin Model Base workspace Model Base Workspace Plugin Model Base dialog get First Result plugin Id Text set Text workspace Model Base get Plugin Base get Id  handlePluginBrowse PluginSelectionDialog PluginSelectionDialog getShell PDECore getDefault getWorkspaceModelManager getAllModels WorkspacePluginModelBase workspaceModelBase WorkspacePluginModelBase getFirstResult pluginIdText setText workspaceModelBase getPluginBase getId
dialog add Filter new Viewer Filter public boolean select Viewer viewer Object parent Element Object element if element instanceof I File return false else if is Plugin Id Final return I Resource element get Project equals project return true  addFilter ViewerFilter parentElement IFile isPluginIdFinal IResource getProject
private void handle Schema Location Element Tree Selection Dialog dialog new Element Tree Selection Dialog get Shell new Workbench Label Provider new Workbench Content Provider dialog set Title PDE Plugin get Resource String Base Extension Point Main Page schema Location title NON NLS 1 dialog set Message PDE Plugin get Resource String Base Extension Point Main Page schema Location desc NON NLS 1 dialog set Double Click Selects false dialog set Allow Multiple false dialog add Filter new Viewer Filter public boolean select Viewer viewer Object parent Element Object element if element instanceof I File return false else if is Plugin Id Final return I Resource element get Project equals project return true dialog set Input PDE Plugin get Workspace get Root dialog set Sorter new Resource Sorter Resource Sorter NAME dialog set Initial Selection project if dialog open Element Tree Selection Dialog OK Object elements dialog get Result if elements length 0 I Resource elem I Resource elements 0 String new Path get Workspace Relative Path elem get Location to String schema Location Text set Text new Path NON NLS 1  handleSchemaLocation ElementTreeSelectionDialog ElementTreeSelectionDialog getShell WorkbenchLabelProvider WorkbenchContentProvider setTitle PDEPlugin getResourceString BaseExtensionPointMainPage schemaLocation setMessage PDEPlugin getResourceString BaseExtensionPointMainPage schemaLocation setDoubleClickSelects setAllowMultiple addFilter ViewerFilter parentElement IFile isPluginIdFinal IResource getProject setInput PDEPlugin getWorkspace getRoot setSorter ResourceSorter ResourceSorter setInitialSelection ElementTreeSelectionDialog getResult IResource IResource newPath getWorkspaceRelativePath getLocation toString schemaLocationText setText newPath
private String get Workspace Relative Path String path String workspace Path PDE Core get Workspace get Root get Location to String if path starts With workspace Path path path replace First workspace Path NON NLS 1 return path  getWorkspaceRelativePath workspacePath PDECore getWorkspace getRoot getLocation toString startsWith workspacePath replaceFirst workspacePath

private I Structured Selection f Selection param categories param base Category param message public Extension Editor Selection Page Element List wizards super wizards PDE Plugin get Resource String Extension Editor Selection Page message NON NLS 1 set Title PDE Plugin get Resource String Extension Editor Selection Page title NON NLS 1 set Description PDE Plugin get Resource String Extension Editor Selection Page desc NON NLS 1  IStructuredSelection fSelection baseCategory ExtensionEditorSelectionPage ElementList PDEPlugin getResourceString ExtensionEditorSelectionPage setTitle PDEPlugin getResourceString ExtensionEditorSelectionPage setDescription PDEPlugin getResourceString ExtensionEditorSelectionPage
public void init I Project project I Plugin Base plugin Base I Structured Selection selection this f Project project this f Plugin Base plugin Base this f Selection selection  IProject IPluginBase pluginBase IStructuredSelection fProject fPluginBase pluginBase fSelection
return new Wizard Node this element public I Base Plugin Wizard create Wizard throws Core Exception I Extension Editor Wizard wizard create Wizard wizard Element wizard init f Project f Plugin Base get Plugin Model f Selection return wizard  WizardNode IBasePluginWizard createWizard CoreException IExtensionEditorWizard createWizard wizardElement fProject fPluginBase getPluginModel fSelection
return wizard protected I Extension Editor Wizard create Wizard Wizard Element element throws Core Exception return I Extension Editor Wizard element create Executable Extension  IExtensionEditorWizard createWizard WizardElement CoreException IExtensionEditorWizard createExecutableExtension
protected I Wizard Node create Wizard Node Wizard Element element return new Wizard Node this element public I Base Plugin Wizard create Wizard throws Core Exception I Extension Editor Wizard wizard create Wizard wizard Element wizard init f Project f Plugin Base get Plugin Model f Selection return wizard protected I Extension Editor Wizard create Wizard Wizard Element element throws Core Exception return I Extension Editor Wizard element create Executable Extension  IWizardNode createWizardNode WizardElement WizardNode IBasePluginWizard createWizard CoreException IExtensionEditorWizard createWizard wizardElement fProject fPluginBase getPluginModel fSelection IExtensionEditorWizard createWizard WizardElement CoreException IExtensionEditorWizard createExecutableExtension

public Extension Editor Wizard I Project project I Plugin Model Base model I Structured Selection selection set Dialog Settings PDE Plugin get Default get Dialog Settings set Default Page Image Descriptor PDE Plugin Images DESC NEWEX WIZ this model model this project project this selection selection set Force Previous And Next Buttons true set Window Title PDE Plugin get Resource String KEY WTITLE PDE Plugin get Default get Label Provider connect this load Wizard Collection  ExtensionEditorWizard IProject IPluginModelBase IStructuredSelection setDialogSettings PDEPlugin getDefault getDialogSettings setDefaultPageImageDescriptor PDEPluginImages DESC_NEWEX_WIZ setForcePreviousAndNextButtons setWindowTitle PDEPlugin getResourceString KEY_WTITLE PDEPlugin getDefault getLabelProvider loadWizardCollection
public void add Pages point Page new Extension Editor Selection Page wizards point Page init project model get Plugin Base selection add Page point Page  addPages pointPage ExtensionEditorSelectionPage pointPage getPluginBase addPage pointPage
private void load Wizard Collection New Extension Registry Reader reader new New Extension Registry Reader true wizards reader read Registry PDE Plugin get Plugin Id PLUGIN POINT true  loadWizardCollection NewExtensionRegistryReader NewExtensionRegistryReader readRegistry PDEPlugin getPluginId PLUGIN_POINT
public boolean perform Finish return true  performFinish
public void dispose super dispose PDE Plugin get Default get Label Provider disconnect this  PDEPlugin getDefault getLabelProvider

private I Plugin Base f Plugin Base param categories param base Category param message public Extension Tree Selection Page Wizard Collection Element categories String base Category String message super categories base Category message  IPluginBase fPluginBase baseCategory ExtensionTreeSelectionPage WizardCollectionElement baseCategory baseCategory
super categories base Category message public void init I Project project I Plugin Base plugin Base this f Project project this f Plugin Base plugin Base  baseCategory IProject IPluginBase pluginBase fProject fPluginBase pluginBase
return new Wizard Node this element public I Base Plugin Wizard create Wizard throws Core Exception I Extension Wizard wizard create Wizard wizard Element wizard init f Project f Plugin Base get Plugin Model return wizard  WizardNode IBasePluginWizard createWizard CoreException IExtensionWizard createWizard wizardElement fProject fPluginBase getPluginModel
protected I Extension Wizard create Wizard Wizard Element element throws Core Exception if element is Template I Configuration Element template element get Template Element if template null return null I Template Section section I Template Section template create Executable Extension class NON NLS 1 return new New Extension Template Wizard section else return I Extension Wizard element create Executable Extension  IExtensionWizard createWizard WizardElement CoreException isTemplate IConfigurationElement getTemplateElement ITemplateSection ITemplateSection createExecutableExtension NewExtensionTemplateWizard IExtensionWizard createExecutableExtension
protected I Wizard Node create Wizard Node Wizard Element element return new Wizard Node this element public I Base Plugin Wizard create Wizard throws Core Exception I Extension Wizard wizard create Wizard wizard Element wizard init f Project f Plugin Base get Plugin Model return wizard protected I Extension Wizard create Wizard Wizard Element element throws Core Exception if element is Template I Configuration Element template element get Template Element if template null return null I Template Section section I Template Section template create Executable Extension class NON NLS 1 return new New Extension Template Wizard section else return I Extension Wizard element create Executable Extension  IWizardNode createWizardNode WizardElement WizardNode IBasePluginWizard createWizard CoreException IExtensionWizard createWizard wizardElement fProject fPluginBase getPluginModel IExtensionWizard createWizard WizardElement CoreException isTemplate IConfigurationElement getTemplateElement ITemplateSection ITemplateSection createExecutableExtension NewExtensionTemplateWizard IExtensionWizard createExecutableExtension
public I Selection Provider get Selection Provider return wizard Selection Viewer  ISelectionProvider getSelectionProvider wizardSelectionViewer

public New Extension Point Main Page I Project project I Plugin Model Base model this project model null  NewExtensionPointMainPage IProject IPluginModelBase
public New Extension Point Main Page I Project project I Plugin Model Base model I Plugin Extension Point point super project initialize this model model this point point  NewExtensionPointMainPage IProject IPluginModelBase IPluginExtensionPoint
this point point public void initialize set Title PDE Plugin get Resource String KEY TITLE set Description PDE Plugin get Resource String KEY DESC  setTitle PDEPlugin getResourceString KEY_TITLE setDescription PDEPlugin getResourceString KEY_DESC
public void create Control Composite parent super create Control parent initialize Values set Page Complete check Fields Filled set Message null  createControl createControl initializeValues setPageComplete checkFieldsFilled setMessage
set Message null protected boolean is Plugin Id Final return true  setMessage isPluginIdFinal
public boolean finish final String id id Text get Text final String name name Text get Text final String schema schema Text get Text I Plugin Base plugin model get Plugin Base I Plugin Extension Point point model get Factory create Extension Point try point set Id id if name length 0 point set Name name if schema length 0 point set Schema schema plugin add point catch Core Exception e PDE Plugin log Exception e if schema length 0 I Runnable With Progress operation get Operation try get Container run false true operation catch Invocation Target Exception e PDE Plugin log Exception e return false catch Interrupted Exception e return false return true  idText getText nameText getText schemaText getText IPluginBase getPluginBase IPluginExtensionPoint getFactory createExtensionPoint setId setName setSchema CoreException PDEPlugin logException IRunnableWithProgress getOperation getContainer InvocationTargetException PDEPlugin logException InterruptedException
return true public String get Plugin Id return model get Plugin Base get Id  getPluginId getPluginBase getId
public void initialize Values if point null return if id Text null point get Id null id Text set Text point get Id if name Text null point get Name null name Text set Text point get Name if schema Text null point get Schema null schema Text set Text point get Schema  initializeValues idText getId idText setText getId nameText getName nameText setText getName schemaText getSchema schemaText setText getSchema

private static final String KEY WTITLE New Extension Point Wizard wtitle NON NLS 1 public New Extension Point Wizard I Project project I Plugin Model Base model Manifest Editor editor this project model I Plugin Extension Point null this editor editor  KEY_WTITLE NewExtensionPointWizard NewExtensionPointWizard IProject IPluginModelBase ManifestEditor IPluginExtensionPoint
public New Extension Point Wizard I Project project I Plugin Model Base model I Plugin Extension Point point initialize this project project this model model this point point  NewExtensionPointWizard IProject IPluginModelBase IPluginExtensionPoint
public void initialize set Dialog Settings PDE Plugin get Default get Dialog Settings set Default Page Image Descriptor PDE Plugin Images DESC NEWEXP WIZ set Window Title PDE Plugin get Resource String KEY WTITLE set Needs Progress Monitor true  setDialogSettings PDEPlugin getDefault getDialogSettings setDefaultPageImageDescriptor PDEPluginImages DESC_NEWEXP_WIZ setWindowTitle PDEPlugin getResourceString KEY_WTITLE setNeedsProgressMonitor
public void add Pages main Page new New Extension Point Main Page project model point add Page main Page  addPages mainPage NewExtensionPointMainPage addPage mainPage
public boolean perform Finish if editor null editor ensure Plugin Context Presence return main Page finish  performFinish ensurePluginContextPresence mainPage

private boolean editor Wizard Mode public New Extension Registry Reader this false  editorWizardMode NewExtensionRegistryReader
this false public New Extension Registry Reader boolean editor Wizard Mode this editor Wizard Mode editor Wizard Mode  NewExtensionRegistryReader editorWizardMode editorWizardMode editorWizardMode
protected Wizard Collection Element create Collection Element Wizard Collection Element parent String id String label Wizard Collection Element new Element new Wizard Collection Element id label parent if parent null parent add new Element return new Element  WizardCollectionElement createCollectionElement WizardCollectionElement WizardCollectionElement newElement WizardCollectionElement newElement newElement
protected Wizard Element create Wizard Element I Configuration Element config String name config get Attribute Wizard Element ATT NAME String id config get Attribute Wizard Element ATT ID String class Name config get Attribute Wizard Element ATT CLASS String template config get Attribute Wizard Element ATT TEMPLATE if name null id null return null if class Name null template null return null Wizard Element element new Wizard Element config String image Name config get Attribute Wizard Element ATT ICON if image Name null I Extension extension config get Declaring Extension I Plugin Descriptor pd extension get Declaring Plugin Descriptor Image image PDE Plugin get Default get Label Provider get Image From Plugin pd image Name element set Image image return element  WizardElement createWizardElement IConfigurationElement getAttribute WizardElement ATT_NAME getAttribute WizardElement ATT_ID className getAttribute WizardElement ATT_CLASS getAttribute WizardElement ATT_TEMPLATE className WizardElement WizardElement imageName getAttribute WizardElement ATT_ICON imageName IExtension getDeclaringExtension IPluginDescriptor getDeclaringPluginDescriptor PDEPlugin getDefault getLabelProvider getImageFromPlugin imageName setImage
protected Wizard Element create Editor Wizard Element I Configuration Element config String name config get Attribute Wizard Element ATT NAME String id config get Attribute Wizard Element ATT ID String class Name config get Attribute Wizard Element ATT CLASS String point config get Attribute Wizard Element ATT POINT if name null id null class Name null return null if point null return null Wizard Element element new Wizard Element config String image Name config get Attribute Wizard Element ATT ICON if image Name null I Extension extension config get Declaring Extension I Plugin Descriptor pd extension get Declaring Plugin Descriptor Image image PDE Plugin get Default get Label Provider get Image From Plugin pd image Name element set Image image return element  WizardElement createEditorWizardElement IConfigurationElement getAttribute WizardElement ATT_NAME getAttribute WizardElement ATT_ID className getAttribute WizardElement ATT_CLASS getAttribute WizardElement ATT_POINT className WizardElement WizardElement imageName getAttribute WizardElement ATT_ICON imageName IExtension getDeclaringExtension IPluginDescriptor getDeclaringPluginDescriptor PDEPlugin getDefault getLabelProvider getImageFromPlugin imageName setImage
protected String get Category String For I Configuration Element config String result config get Attribute ATT CATEGORY if result null result UNCATEGORIZED WIZARD CATEGORY return result  getCategoryStringFor IConfigurationElement getAttribute ATT_CATEGORY UNCATEGORIZED_WIZARD_CATEGORY
protected Wizard Collection Element get Child WithID Wizard Collection Element parent String id Object children parent get Children if children null for int i 0 i children length i Wizard Collection Element current Child Wizard Collection Element children i if current Child get Id equals id return current Child return null  WizardCollectionElement getChildWithID WizardCollectionElement getChildren WizardCollectionElement currentChild WizardCollectionElement currentChild getId currentChild
protected void insert Using Category Wizard Element element Element List result Wizard Collection Element current Result Wizard Collection Element result String Tokenizer family Tokenizer new String Tokenizer get Category String For element get Configuration Element CATEGORY SEPARATOR use the period separated sections of the current Wizard s category to traverse through the Named Solution tree that was previously created Wizard Collection Element current Collection Element current Result ie root boolean move To Other false while family Tokenizer has More Elements Wizard Collection Element temp Collection Element get Child WithID current Collection Element family Tokenizer next Token if temp Collection Element null can t find the path bump it to uncategorized move To Other true break else current Collection Element temp Collection Element if move To Other move Element To Uncategorized Category current Result element else current Collection Element get Wizards add element  insertUsingCategory WizardElement ElementList WizardCollectionElement currentResult WizardCollectionElement StringTokenizer familyTokenizer StringTokenizer getCategoryStringFor getConfigurationElement CATEGORY_SEPARATOR NamedSolution WizardCollectionElement currentCollectionElement currentResult moveToOther familyTokenizer hasMoreElements WizardCollectionElement tempCollectionElement getChildWithID currentCollectionElement familyTokenizer nextToken tempCollectionElement moveToOther currentCollectionElement tempCollectionElement moveToOther moveElementToUncategorizedCategory currentResult currentCollectionElement getWizards
protected void move Element To Uncategorized Category Wizard Collection Element root Wizard Element element Wizard Collection Element other Category get Child WithID root UNCATEGORIZED WIZARD CATEGORY if other Category null other Category create Collection Element root UNCATEGORIZED WIZARD CATEGORY UNCATEGORIZED WIZARD CATEGORY LABEL other Category get Wizards add element  moveElementToUncategorizedCategory WizardCollectionElement WizardElement WizardCollectionElement otherCategory getChildWithID UNCATEGORIZED_WIZARD_CATEGORY otherCategory otherCategory createCollectionElement UNCATEGORIZED_WIZARD_CATEGORY UNCATEGORIZED_WIZARD_CATEGORY_LABEL otherCategory getWizards
private void process Category I Configuration Element config Element List list Wizard Collection Element result Wizard Collection Element list Category category null category new Category config if category getID null category get Label null System out println PDE Plugin get Resource String New Extension Registry Reader missing Property NON NLS 1 return String category Path category get Parent Category Path Wizard Collection Element parent result ie root if category Path null for int i 0 i category Path length i Wizard Collection Element temp Element get Child WithID parent category Path i if temp Element null parent null break else parent temp Element if parent null create Collection Element parent category getID category get Label  processCategory IConfigurationElement ElementList WizardCollectionElement WizardCollectionElement getLabel PDEPlugin getResourceString NewExtensionRegistryReader missingProperty categoryPath getParentCategoryPath WizardCollectionElement categoryPath categoryPath WizardCollectionElement tempElement getChildWithID categoryPath tempElement tempElement createCollectionElement getLabel
protected void process Element I Configuration Element element Element List result boolean shortcuts Only String tag element get Name if tag equals TAG WIZARD editor Wizard Mode Wizard Element wizard create Wizard Element element if shortcuts Only String shortcut element get Attribute ATT SHORTCUTTABLE if shortcut null shortcut to Lower Case equals true NON NLS 1 result add wizard else insert Using Category wizard result else if tag equals TAG EDITOR WIZARD editor Wizard Mode Wizard Element wizard create Editor Wizard Element element if shortcuts Only result add wizard else insert Using Category wizard result else if tag equals TAG CATEGORY if shortcuts Only false process Category element result  processElement IConfigurationElement ElementList shortcutsOnly getName TAG_WIZARD editorWizardMode WizardElement createWizardElement shortcutsOnly getAttribute ATT_SHORTCUTTABLE toLowerCase insertUsingCategory TAG_EDITOR_WIZARD editorWizardMode WizardElement createEditorWizardElement shortcutsOnly insertUsingCategory TAG_CATEGORY shortcutsOnly processCategory
public Element List read Registry String plugin Id String plugin Point Id boolean shortcuts Only Element List result shortcuts Only new Element List shortcuts NON NLS 1 new Wizard Collection Element root root null NON NLS 1 NON NLS 2 I Extension Registry registry Platform get Extension Registry I Extension Point point registry get Extension Point plugin Id plugin Point Id if point null return null I Extension extensions point get Extensions for int i 0 i extensions length i I Configuration Element elements extensions i get Configuration Elements for int j 0 j elements length j I Configuration Element config elements j process Element config result shortcuts Only return result  ElementList readRegistry pluginId pluginPointId shortcutsOnly ElementList shortcutsOnly ElementList WizardCollectionElement IExtensionRegistry getExtensionRegistry IExtensionPoint getExtensionPoint pluginId pluginPointId IExtension getExtensions IConfigurationElement getConfigurationElements IConfigurationElement processElement shortcutsOnly

I Plugin Model Base model Creates a new template wizard public New Extension Template Wizard I Template Section section super set Dialog Settings PDE Plugin get Default get Dialog Settings set Default Page Image Descriptor PDE Plugin Images DESC NEWEX WIZ set Needs Progress Monitor true this section section  IPluginModelBase NewExtensionTemplateWizard ITemplateSection setDialogSettings PDEPlugin getDefault getDialogSettings setDefaultPageImageDescriptor PDEPluginImages DESC_NEWEX_WIZ setNeedsProgressMonitor
public void init I Project project I Plugin Model Base model this project project this model model  IProject IPluginModelBase
public void set Section I Template Section section this section section  setSection ITemplateSection
public I Template Section get Section return section  ITemplateSection getSection
public void add Pages section add Pages this if get Section null set Window Title get Section get Label if section instanceof Base Option Template Section Base Option Template Section section initialize Fields model  addPages addPages getSection setWindowTitle getSection getLabel BaseOptionTemplateSection BaseOptionTemplateSection initializeFields
I Runnable With Progress operation new Workspace Modify Operation public void execute I Progress Monitor monitor try do Finish monitor catch Core Exception e PDE Plugin log Exception e finally monitor done  IRunnableWithProgress WorkspaceModifyOperation IProgressMonitor doFinish CoreException PDEPlugin logException
public boolean perform Finish I Runnable With Progress operation new Workspace Modify Operation public void execute I Progress Monitor monitor try do Finish monitor catch Core Exception e PDE Plugin log Exception e finally monitor done try get Container run false true operation catch Invocation Target Exception e PDE Plugin log Exception e return false catch Interrupted Exception e PDE Plugin log Exception e return false return true  performFinish IRunnableWithProgress WorkspaceModifyOperation IProgressMonitor doFinish CoreException PDEPlugin logException getContainer InvocationTargetException PDEPlugin logException InterruptedException PDEPlugin logException
protected void do Finish I Progress Monitor monitor throws Core Exception int total Work section get Number Of Work Units monitor begin Task PDE Plugin get Resource String New Extension Template Wizard generating total Work NON NLS 1 update Dependencies section execute project model monitor nsteps  doFinish IProgressMonitor CoreException totalWork getNumberOfWorkUnits beginTask PDEPlugin getResourceString NewExtensionTemplateWizard totalWork updateDependencies
private void update Dependencies throws Core Exception I Plugin Reference refs section get Dependencies model get Plugin Base get Schema Version for int i 0 i refs length i I Plugin Reference ref refs i if model Contains ref false I Plugin Import iimport model get Plugin Factory create Import iimport set Id ref get Id iimport set Match ref get Match iimport set Version ref get Version model get Plugin Base add iimport  updateDependencies CoreException IPluginReference getDependencies getPluginBase getSchemaVersion IPluginReference modelContains IPluginImport getPluginFactory createImport setId getId setMatch getMatch setVersion getVersion getPluginBase
private boolean model Contains I Plugin Reference ref I Plugin Base plugin model get Plugin Base I Plugin Import imports plugin get Imports for int i 0 i imports length i I Plugin Import iimport imports i if iimport get Id equals ref get Id good enough return true return false  modelContains IPluginReference IPluginBase getPluginBase IPluginImport getImports IPluginImport getId getId

public New Extension Wizard I Project project I Plugin Model Base model Manifest Editor editor set Dialog Settings PDE Plugin get Default get Dialog Settings set Default Page Image Descriptor PDE Plugin Images DESC NEWEX WIZ this model model this project project this editor editor set Force Previous And Next Buttons true set Window Title PDE Plugin get Resource String KEY WTITLE PDE Plugin get Default get Label Provider connect this load Wizard Collection  NewExtensionWizard IProject IPluginModelBase ManifestEditor setDialogSettings PDEPlugin getDefault getDialogSettings setDefaultPageImageDescriptor PDEPluginImages DESC_NEWEX_WIZ setForcePreviousAndNextButtons setWindowTitle PDEPlugin getResourceString KEY_WTITLE PDEPlugin getDefault getLabelProvider loadWizardCollection
public void add Pages point Page new Point Selection Page project model get Plugin Base wizard Collection get Templates this add Page point Page  addPages pointPage PointSelectionPage getPluginBase wizardCollection getTemplates addPage pointPage
private void load Wizard Collection New Extension Registry Reader reader new New Extension Registry Reader wizard Collection Wizard Collection Element reader read Registry PDE Plugin get Plugin Id PLUGIN POINT false  loadWizardCollection NewExtensionRegistryReader NewExtensionRegistryReader wizardCollection WizardCollectionElement readRegistry PDEPlugin getPluginId PLUGIN_POINT
public Wizard Collection Element get Templates Wizard Collection Element template Collection new Wizard Collection Element null NON NLS 1 NON NLS 2 collect Templates wizard Collection get Children template Collection return template Collection  WizardCollectionElement getTemplates WizardCollectionElement templateCollection WizardCollectionElement collectTemplates wizardCollection getChildren templateCollection templateCollection
private void collect Templates Object children Wizard Collection Element list for int i 0 i children length i if children i instanceof Wizard Collection Element Wizard Collection Element element Wizard Collection Element children i collect Templates element get Children list collect Templates element get Wizards get Children list else if children i instanceof Wizard Element Wizard Element wizard Wizard Element children i if wizard is Template list get Wizards add wizard  collectTemplates WizardCollectionElement WizardCollectionElement WizardCollectionElement WizardCollectionElement collectTemplates getChildren collectTemplates getWizards getChildren WizardElement WizardElement WizardElement isTemplate getWizards
public boolean perform Finish if point Page can Finish return point Page finish return true  performFinish pointPage canFinish pointPage
public Manifest Editor get Editor return editor  ManifestEditor getEditor
public void dispose super dispose PDE Plugin get Default get Label Provider disconnect this  PDEPlugin getDefault getLabelProvider

private boolean is Plugin Id Final public New Schema File Main Page I Container container this container null false  isPluginIdFinal NewSchemaFileMainPage IContainer
public New Schema File Main Page I Container container I Plugin Extension Point point boolean is Plugin Id Final super container set Title PDE Plugin get Resource String KEY TITLE set Description PDE Plugin get Resource String KEY DESC this point point this container container this is Plugin Id Final is Plugin Id Final  NewSchemaFileMainPage IContainer IPluginExtensionPoint isPluginIdFinal setTitle PDEPlugin getResourceString KEY_TITLE setDescription PDEPlugin getResourceString KEY_DESC isPluginIdFinal isPluginIdFinal
public void create Control Composite parent super create Control parent initialize Values plugin Id Text set Enabled is Plugin Id Final plugin Browse Button set Enabled is Plugin Id Final set Message null  createControl createControl initializeValues pluginIdText setEnabled isPluginIdFinal pluginBrowseButton setEnabled isPluginIdFinal setMessage
public boolean finish I Runnable With Progress operation get Operation try get Container run false true operation if point null point set Id id Text get Text point set Name name Text get Text point set Schema schema Text get Text catch Invocation Target Exception e PDE Plugin log Exception e return false catch Interrupted Exception e return false catch Core Exception e return false return true  IRunnableWithProgress getOperation getContainer setId idText getText setName nameText getText setSchema schemaText getText InvocationTargetException PDEPlugin logException InterruptedException CoreException
return true protected boolean is Plugin Id Needed return true  isPluginIdNeeded
return true protected boolean is Plugin Id Final return is Plugin Id Final  isPluginIdFinal isPluginIdFinal
return is Plugin Id Final protected boolean is Shared Schema Switch Needed return true  isPluginIdFinal isSharedSchemaSwitchNeeded
public void initialize Values if container null plugin Id Text set Text container get Project get Name if is Plugin Id Final schema Location Text set Text container get Project get Name container get Project Relative Path to String NON NLS 1 if point null return if id Text null point get Id null id Text set Text point get Id if name Text null point get Name null name Text set Text point get Name if schema Text null point get Schema null schema Text set Text point get Schema  initializeValues pluginIdText setText getProject getName isPluginIdFinal schemaLocationText setText getProject getName getProjectRelativePath toString idText getId idText setText getId nameText getName nameText setText getName schemaText getSchema schemaText setText getSchema

public static final String KEY WTITLE New Schema File Wizard wtitle NON NLS 1 public New Schema File Wizard this null null false  KEY_WTITLE NewSchemaFileWizard NewSchemaFileWizard
public New Schema File Wizard I Project project I Plugin Extension Point point boolean is Final Plugin Id initialize this container project this point point this is Plugin Id Final is Final Plugin Id  NewSchemaFileWizard IProject IPluginExtensionPoint isFinalPluginId isPluginIdFinal isFinalPluginId
public void initialize set Dialog Settings get Settings Section set Default Page Image Descriptor PDE Plugin Images DESC EXT POINT SCHEMA WIZ set Window Title PDE Plugin get Resource String KEY WTITLE set Needs Progress Monitor true  setDialogSettings getSettingsSection setDefaultPageImageDescriptor PDEPluginImages DESC_EXT_POINT_SCHEMA_WIZ setWindowTitle PDEPlugin getResourceString KEY_WTITLE setNeedsProgressMonitor
set Needs Progress Monitor true public void add Pages main Page new New Schema File Main Page container point is Plugin Id Final add Page main Page  setNeedsProgressMonitor addPages mainPage NewSchemaFileMainPage isPluginIdFinal addPage mainPage
private I Dialog Settings get Settings Section I Dialog Settings root PDE Plugin get Default get Dialog Settings I Dialog Settings section root get Section new Extension Point Wizard NON NLS 1 if section null section root add New Section new Extension Point Wizard NON NLS 1 return section  IDialogSettings getSettingsSection IDialogSettings PDEPlugin getDefault getDialogSettings IDialogSettings getSection newExtensionPointWizard addNewSection newExtensionPointWizard
public void init I Workbench workbench I Structured Selection selection Object sel selection get First Element if sel instanceof I Java Project container I Java Project sel get Project else if sel instanceof I Container container I Container sel  IWorkbench IStructuredSelection getFirstElement IJavaProject IJavaProject getProject IContainer IContainer
public boolean perform Finish return main Page finish  performFinish mainPage

class Point Filter extends Viewer Filter public boolean select Viewer viewer Object parent Element Object element if f Filter Check get Selection return true I Plugin Extension Point point I Plugin Extension Point element return f Available Imports contains point get Plugin Base get Id  PointFilter ViewerFilter parentElement fFilterCheck getSelection IPluginExtensionPoint IPluginExtensionPoint fAvailableImports getPluginBase getId
class Template Content Provider extends Default Content Provider implements I Structured Content Provider public Object get Elements Object input Element if input Element instanceof I Plugin Extension Point Plugin Extension Point point Plugin Extension Point input Element Array List result new Array List if template Collection get Wizards null Object wizards template Collection get Wizards get Children for int i 0 i wizards length i String wizard Contributor Id Wizard Element wizards i get Contributing Id if wizard Contributor Id null point null point get Full Id null continue if wizards i instanceof Wizard Element wizard Contributor Id equals point get Full Id result add Wizard Element wizards i return result to Array return new Object 0  TemplateContentProvider DefaultContentProvider IStructuredContentProvider getElements inputElement inputElement IPluginExtensionPoint PluginExtensionPoint PluginExtensionPoint inputElement ArrayList ArrayList templateCollection getWizards templateCollection getWizards getChildren wizardContributorId WizardElement getContributingId wizardContributorId getFullId WizardElement wizardContributorId getFullId WizardElement toArray
implements I Structured Content Provider public Object get Elements Object parent Hash Set ext Points new Hash Set Plugin Model Manager manager Plugin Model Manager parent I Plugin Model Base plugins manager get Plugins for int i 0 i plugins length i I Plugin Extension Point points plugins i get Plugin Base get Extension Points for int j 0 j points length j ext Points add points j return ext Points to Array  IStructuredContentProvider getElements HashSet extPoints HashSet PluginModelManager PluginModelManager IPluginModelBase getPlugins IPluginExtensionPoint getPluginBase getExtensionPoints extPoints extPoints toArray
extends Label Provider implements I Table Label Provider public String get Text Object obj return get Column Text obj 0  LabelProvider ITableLabelProvider getText getColumnText
public String get Column Text Object obj int index PDE Label Provider provider PDE Plugin get Default get Label Provider if provider is Full Name Mode Enabled return provider get Text I Plugin Extension Point obj return I Plugin Extension Point obj get Full Id  getColumnText PDELabelProvider PDEPlugin getDefault getLabelProvider isFullNameModeEnabled getText IPluginExtensionPoint IPluginExtensionPoint getFullId
public Image get Image Object obj return get Column Image obj 0  getImage getColumnImage
public Image get Column Image Object obj int index I Plugin Extension Point exp I Plugin Extension Point obj int flag f Available Imports contains exp get Plugin Base get Id 0 Shared Label Provider F WARNING if Template Content Provider f Template Viewer get Content Provider get Elements exp length 0 return PDE Plugin get Default get Label Provider get PDE Plugin Images DESC NEWEXP WIZ TOOL flag return PDE Plugin get Default get Label Provider get PDE Plugin Images DESC EXT POINT OBJ flag  getColumnImage IPluginExtensionPoint IPluginExtensionPoint fAvailableImports getPluginBase getId SharedLabelProvider F_WARNING TemplateContentProvider fTemplateViewer getContentProvider getElements PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_NEWEXP_WIZ_TOOL PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_EXT_POINT_OBJ
public Point Selection Page I Project project I Plugin Base model Wizard Collection Element element Wizard Collection Element templates New Extension Wizard wizard super point Selection Page PDE Plugin get Resource String New Extension Wizard Point Selection Page title NON NLS 1 NON NLS 2 this f Plugin Base model this wizard Collection element this template Collection templates this wizard wizard this project project f Available Imports Plugin Selection Dialog get Existing Imports model set Title PDE Plugin get Resource String New Extension Wizard Point Selection Page title NON NLS 1 set Description PDE Plugin get Resource String New Extension Wizard Point Selection Page desc NON NLS 1 PDE Plugin get Default get Label Provider connect this make Actions  PointSelectionPage IProject IPluginBase WizardCollectionElement WizardCollectionElement NewExtensionWizard pointSelectionPage PDEPlugin getResourceString NewExtensionWizard PointSelectionPage fPluginBase wizardCollection templateCollection fAvailableImports PluginSelectionDialog getExistingImports setTitle PDEPlugin getResourceString NewExtensionWizard PointSelectionPage setDescription PDEPlugin getResourceString NewExtensionWizard PointSelectionPage PDEPlugin getDefault getLabelProvider makeActions
second Tab set Control create Wizards Page tab Folder tab Folder add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Tab Selection tab Folder get Selection Index  secondTab setControl createWizardsPage tabFolder tabFolder addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateTabSelection tabFolder getSelectionIndex
f Point List Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if can Finish finish wizard get Shell close wizard dispose wizard set Container null  fPointListViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent canFinish getShell setContainer
f Template Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if can Flip To Next Page advance To Next Page  fTemplateViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent canFlipToNextPage advanceToNextPage
f Filter Check set Selection true f Filter Check add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Point List Viewer refresh  fFilterCheck setSelection fFilterCheck addSelectionListener SelectionAdapter widgetSelected SelectionEvent fPointListViewer
public void create Control Composite parent tab folder final Tab Folder tab Folder new Tab Folder parent SWT FLAT Tab Item first Tab new Tab Item tab Folder SWT NULL first Tab set Text PDE Plugin get Resource String Point Selection Page tab1 NON NLS 1 Tab Item second Tab new Tab Item tab Folder SWT NULL second Tab set Text PDE Plugin get Resource String Point Selection Page tab2 NON NLS 1 second Tab set Control create Wizards Page tab Folder tab Folder add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Tab Selection tab Folder get Selection Index top level group Composite outer Container new Composite tab Folder SWT NONE first Tab set Control outer Container Grid Layout layout new Grid Layout outer Container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH outer Container set Layout Data gd Composite point Container new Composite outer Container SWT NONE layout new Grid Layout layout margin Height layout margin Width 0 point Container set Layout layout gd new Grid Data Grid Data FILL BOTH point Container set Layout Data gd Label point Label new Label point Container SWT NONE point Label set Text PDE Plugin get Resource String New Extension Wizard Point Selection Page avail Ext Points label NON NLS 1 f Point List Viewer new Table Viewer point Container SWT V SCROLL SWT H SCROLL SWT BORDER f Point List Viewer set Content Provider new Point Content Provider f Point List Viewer set Label Provider new Point Label Provider f Point List Viewer add Selection Changed Listener this f Point List Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if can Finish finish wizard get Shell close wizard dispose wizard set Container null f Point List Viewer set Sorter List Util NAME SORTER gd new Grid Data Grid Data FILL BOTH gd height Hint 150 f Point List Viewer get Table set Layout Data gd Composite template Composite new Composite outer Container SWT NONE layout new Grid Layout layout margin Height 9 layout margin Width 0 template Composite set Layout layout gd new Grid Data Grid Data FILL HORIZONTAL template Composite set Layout Data gd template Label new Label template Composite SWT NONE template Label set Text PDE Plugin get Resource String New Extension Wizard Point Selection Page contributed Templates title NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL template Label set Layout Data gd Sash Form template Sash Form new Sash Form template Composite SWT HORIZONTAL template Sash Form set Layout new Grid Layout gd new Grid Data Grid Data FILL BOTH gd height Hint 80 template Sash Form set Layout Data gd Composite wizard Composite new Composite template Sash Form SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 wizard Composite set Layout layout gd new Grid Data Grid Data FILL BOTH Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL wizard Composite set Layout Data gd f Template Viewer new Table Viewer wizard Composite SWT V SCROLL SWT H SCROLL SWT BORDER f Template Viewer set Content Provider new Template Content Provider f Template Viewer set Label Provider Element Label Provider INSTANCE f Template Viewer set Sorter List Util NAME SORTER f Template Viewer add Selection Changed Listener this gd new Grid Data Grid Data FILL BOTH f Template Viewer get Table set Layout Data gd Table Item selection f Point List Viewer get Table get Selection if selection null selection length 0 f Template Viewer set Input I Plugin Extension Point selection 0 f Template Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if can Flip To Next Page advance To Next Page Composite description Composite new Composite template Sash Form SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 description Composite set Layout layout gd new Grid Data Grid Data FILL BOTH Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL description Composite set Layout Data gd create Description In description Composite f Filter Check new Button outer Container SWT CHECK f Filter Check set Text PDE Plugin get Resource String New Extension Wizard Point Selection Page filter Check NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL f Filter Check set Layout Data gd f Filter Check set Selection true f Filter Check add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Point List Viewer refresh get Container get Shell set Size 500 500 create Menu Manager initialize set Control tab Folder Dialog apply Dialog Font outer Container Workbench Help set Help outer Container I Help Context Ids ADD EXTENSIONS SCHEMA BASED  createControl TabFolder tabFolder TabFolder TabItem firstTab TabItem tabFolder firstTab setText PDEPlugin getResourceString PointSelectionPage TabItem secondTab TabItem tabFolder secondTab setText PDEPlugin getResourceString PointSelectionPage secondTab setControl createWizardsPage tabFolder tabFolder addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateTabSelection tabFolder getSelectionIndex outerContainer tabFolder firstTab setControl outerContainer GridLayout GridLayout outerContainer setLayout GridData GridData GridData FILL_BOTH outerContainer setLayoutData pointContainer outerContainer GridLayout marginHeight marginWidth pointContainer setLayout GridData GridData FILL_BOTH pointContainer setLayoutData pointLabel pointContainer pointLabel setText PDEPlugin getResourceString NewExtensionWizard PointSelectionPage availExtPoints fPointListViewer TableViewer pointContainer V_SCROLL H_SCROLL fPointListViewer setContentProvider PointContentProvider fPointListViewer setLabelProvider PointLabelProvider fPointListViewer addSelectionChangedListener fPointListViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent canFinish getShell setContainer fPointListViewer setSorter ListUtil NAME_SORTER GridData GridData FILL_BOTH heightHint fPointListViewer getTable setLayoutData templateComposite outerContainer GridLayout marginHeight marginWidth templateComposite setLayout GridData GridData FILL_HORIZONTAL templateComposite setLayoutData templateLabel templateComposite templateLabel setText PDEPlugin getResourceString NewExtensionWizard PointSelectionPage contributedTemplates GridData GridData FILL_HORIZONTAL templateLabel setLayoutData SashForm templateSashForm SashForm templateComposite templateSashForm setLayout GridLayout GridData GridData FILL_BOTH heightHint templateSashForm setLayoutData wizardComposite templateSashForm GridLayout marginHeight marginWidth wizardComposite setLayout GridData GridData FILL_BOTH GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL wizardComposite setLayoutData fTemplateViewer TableViewer wizardComposite V_SCROLL H_SCROLL fTemplateViewer setContentProvider TemplateContentProvider fTemplateViewer setLabelProvider ElementLabelProvider fTemplateViewer setSorter ListUtil NAME_SORTER fTemplateViewer addSelectionChangedListener GridData GridData FILL_BOTH fTemplateViewer getTable setLayoutData TableItem fPointListViewer getTable getSelection fTemplateViewer setInput IPluginExtensionPoint fTemplateViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent canFlipToNextPage advanceToNextPage descriptionComposite templateSashForm GridLayout marginHeight marginWidth descriptionComposite setLayout GridData GridData FILL_BOTH GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL descriptionComposite setLayoutData createDescriptionIn descriptionComposite fFilterCheck outerContainer fFilterCheck setText PDEPlugin getResourceString NewExtensionWizard PointSelectionPage filterCheck GridData GridData FILL_HORIZONTAL fFilterCheck setLayoutData fFilterCheck setSelection fFilterCheck addSelectionListener SelectionAdapter widgetSelected SelectionEvent fPointListViewer getContainer getShell setSize createMenuManager setControl tabFolder applyDialogFont outerContainer WorkbenchHelp setHelp outerContainer IHelpContextIds ADD_EXTENSIONS_SCHEMA_BASED
private Control create Wizards Page Composite parent wizards Page new Extension Tree Selection Page wizard Collection null PDE Plugin get Resource String Point Selection Page categories NON NLS 1 wizards Page create Control parent wizards Page set Wizard wizard wizards Page get Selection Provider add Selection Changed Listener this wizards Page init project f Plugin Base return wizards Page get Control  createWizardsPage wizardsPage ExtensionTreeSelectionPage wizardCollection PDEPlugin getResourceString PointSelectionPage wizardsPage createControl wizardsPage setWizard wizardsPage getSelectionProvider addSelectionChangedListener wizardsPage fPluginBase wizardsPage getControl
mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager fill Context Menu manager  addMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu
private void create Menu Manager Menu Manager mgr new Menu Manager mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager fill Context Menu manager mgr set Remove All When Shown true Control control f Point List Viewer get Control Menu menu mgr create Context Menu control control set Menu menu  createMenuManager MenuManager MenuManager addMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu setRemoveAllWhenShown fPointListViewer getControl createContextMenu setMenu
private void fill Context Menu I Menu Manager mgr mgr add show Details Action I Selection selection f Point List Viewer get Selection I Plugin Extension Point point I Plugin Extension Point I Structured Selection selection get First Element show Details Action set Enabled point null  fillContextMenu IMenuManager showDetailsAction ISelection fPointListViewer getSelection IPluginExtensionPoint IPluginExtensionPoint IStructuredSelection getFirstElement showDetailsAction setEnabled
public void advance To Next Page get Container show Page get Next Page  advanceToNextPage getContainer showPage getNextPage
public boolean can Flip To Next Page return get Next Page null  canFlipToNextPage getNextPage
public boolean can Finish if f Template Viewer null I Selection selection f Template Viewer get Selection if selection instanceof I Structured Selection I Structured Selection ssel I Structured Selection selection if ssel is Empty return false if f Point List Viewer null I Selection selection f Point List Viewer get Selection if selection instanceof I Structured Selection I Structured Selection ssel I Structured Selection selection if ssel is Empty false return true return false  canFinish fTemplateViewer ISelection fTemplateViewer getSelection IStructuredSelection IStructuredSelection IStructuredSelection isEmpty fPointListViewer ISelection fPointListViewer getSelection IStructuredSelection IStructuredSelection IStructuredSelection isEmpty
public void dispose PDE Plugin get Default get Label Provider disconnect this wizards Page dispose super dispose  PDEPlugin getDefault getLabelProvider wizardsPage
public boolean finish String point f Current Point get Full Id wizard get Editor ensure Plugin Context Presence try I Plugin Extension extension f Plugin Base get Model get Factory create Extension extension set Point point f Plugin Base add extension String pluginID f Current Point get Plugin Base get Id if f Available Imports contains pluginID I Plugin Model Base model Base I Plugin Model Base f Plugin Base get Model I Plugin Import import Node model Base get Plugin Factory create Import import Node set Id pluginID f Plugin Base add import Node catch Core Exception e PDE Plugin log Exception e return true  fCurrentPoint getFullId getEditor ensurePluginContextPresence IPluginExtension fPluginBase getModel getFactory createExtension setPoint fPluginBase fCurrentPoint getPluginBase getId fAvailableImports IPluginModelBase modelBase IPluginModelBase fPluginBase getModel IPluginImport importNode modelBase getPluginFactory createImport importNode setId fPluginBase importNode CoreException PDEPlugin logException
f Show Description Action set Extension Point f Current Point Busy Indicator show While f Point List Viewer get Control get Display new Runnable public void run f Show Description Action run  fShowDescriptionAction setExtensionPoint fCurrentPoint BusyIndicator showWhile fPointListViewer getControl getDisplay fShowDescriptionAction
private void do Show Description if f Show Description Action null f Show Description Action new Show Description Action f Current Point else f Show Description Action set Extension Point f Current Point Busy Indicator show While f Point List Viewer get Control get Display new Runnable public void run f Show Description Action run  doShowDescription fShowDescriptionAction fShowDescriptionAction ShowDescriptionAction fCurrentPoint fShowDescriptionAction setExtensionPoint fCurrentPoint BusyIndicator showWhile fPointListViewer getControl getDisplay fShowDescriptionAction
public I Plugin Extension get New Extension return f New Extension  IPluginExtension getNewExtension fNewExtension
protected void initialize f Point List Viewer add Filter new Point Filter f Point List Viewer set Input PDE Core get Default get Model Manager f Point List Viewer get Table set Focus  fPointListViewer addFilter PointFilter fPointListViewer setInput PDECore getDefault getModelManager fPointListViewer getTable setFocus
private void make Actions show Details Action new Action public void run do Show Description  makeActions showDetailsAction doShowDescription
private void make Actions show Details Action new Action public void run do Show Description show Details Action set Text PDE Plugin get Resource String New Extension Wizard Point Selection Page show Details NON NLS 1  makeActions showDetailsAction doShowDescription showDetailsAction setText PDEPlugin getResourceString NewExtensionWizard PointSelectionPage showDetails
public void selection Changed Selection Changed Event event I Selection selection event get Selection set Description NON NLS 1 if selection instanceof I Structured Selection I Structured Selection ssel I Structured Selection selection if ssel null ssel is Empty if ssel get First Element instanceof I Plugin Extension Point f Current Point I Plugin Extension Point ssel get First Element f Template Viewer set Input f Current Point if f Available Imports contains f Current Point get Plugin Base get Id set Message null else set Message PDE Plugin get Resource String New Extension Wizard Point Selection Page message NON NLS 1 INFORMATION set Description PDE Plugin get Formatted Message New Extension Wizard Point Selection Page plugin Description f Current Point get Full Id NON NLS 1 set Description Text NON NLS 1 template Label set Text PDE Plugin get Formatted Message New Extension Wizard Point Selection Page contributed Templates label f Current Point get Full Id NON NLS 1 set Selected Node null set Page Complete true else if ssel get First Element instanceof Wizard Element Wizard Element wizard Selection Wizard Element ssel get First Element set Selected Node create Wizard Node wizard Selection set Description Text wizard Selection get Description set Description PDE Plugin get Formatted Message New Extension Wizard Point Selection Page template Description wizard Selection get Label NON NLS 1 set Page Complete false else set Selected Node null set Page Complete false get Container update Buttons  selectionChanged SelectionChangedEvent ISelection getSelection setDescription IStructuredSelection IStructuredSelection IStructuredSelection isEmpty getFirstElement IPluginExtensionPoint fCurrentPoint IPluginExtensionPoint getFirstElement fTemplateViewer setInput fCurrentPoint fAvailableImports fCurrentPoint getPluginBase getId setMessage setMessage PDEPlugin getResourceString NewExtensionWizard PointSelectionPage setDescription PDEPlugin getFormattedMessage NewExtensionWizard PointSelectionPage pluginDescription fCurrentPoint getFullId setDescriptionText templateLabel setText PDEPlugin getFormattedMessage NewExtensionWizard PointSelectionPage contributedTemplates fCurrentPoint getFullId setSelectedNode setPageComplete getFirstElement WizardElement WizardElement wizardSelection WizardElement getFirstElement setSelectedNode createWizardNode wizardSelection setDescriptionText wizardSelection getDescription setDescription PDEPlugin getFormattedMessage NewExtensionWizard PointSelectionPage templateDescription wizardSelection getLabel setPageComplete setSelectedNode setPageComplete getContainer updateButtons
private void update Tab Selection int index if index 0 extension point page I Selection selection f Template Viewer get Selection if selection is Empty false selection Changed new Selection Changed Event f Template Viewer selection else selection Changed new Selection Changed Event f Point List Viewer f Point List Viewer get Selection else wizard page I Selection Provider provider wizards Page get Selection Provider selection Changed new Selection Changed Event provider provider get Selection  updateTabSelection ISelection fTemplateViewer getSelection isEmpty selectionChanged SelectionChangedEvent fTemplateViewer selectionChanged SelectionChangedEvent fPointListViewer fPointListViewer getSelection ISelectionProvider wizardsPage getSelectionProvider selectionChanged SelectionChangedEvent getSelection
return new Wizard Node this element public I Base Plugin Wizard create Wizard throws Core Exception I Extension Wizard wizard create Wizard wizard Element wizard init project f Plugin Base get Plugin Model return wizard  WizardNode IBasePluginWizard createWizard CoreException IExtensionWizard createWizard wizardElement fPluginBase getPluginModel
protected I Extension Wizard create Wizard Wizard Element element throws Core Exception if element is Template I Configuration Element template element get Template Element if template null return null I Template Section section I Template Section template create Executable Extension class NON NLS 1 return new New Extension Template Wizard section return I Extension Wizard element create Executable Extension  IExtensionWizard createWizard WizardElement CoreException isTemplate IConfigurationElement getTemplateElement ITemplateSection ITemplateSection createExecutableExtension NewExtensionTemplateWizard IExtensionWizard createExecutableExtension
protected I Wizard Node create Wizard Node Wizard Element element return new Wizard Node this element public I Base Plugin Wizard create Wizard throws Core Exception I Extension Wizard wizard create Wizard wizard Element wizard init project f Plugin Base get Plugin Model return wizard protected I Extension Wizard create Wizard Wizard Element element throws Core Exception if element is Template I Configuration Element template element get Template Element if template null return null I Template Section section I Template Section template create Executable Extension class NON NLS 1 return new New Extension Template Wizard section return I Extension Wizard element create Executable Extension  IWizardNode createWizardNode WizardElement WizardNode IBasePluginWizard createWizard CoreException IExtensionWizard createWizard wizardElement fPluginBase getPluginModel IExtensionWizard createWizard WizardElement CoreException isTemplate IConfigurationElement getTemplateElement ITemplateSection ITemplateSection createExecutableExtension NewExtensionTemplateWizard IExtensionWizard createExecutableExtension

New Feature Wizard Spec Page patch custom Project NON NLS 1 public Base Feature Spec Page Wizard New Project Creation Page main Page boolean is Patch super spec Page NON NLS 1 this is Patch is Patch this main Page main Page  NewFeatureWizard SpecPage customProject BaseFeatureSpecPage WizardNewProjectCreationPage mainPage isPatch specPage isPatch isPatch mainPage mainPage
public void create Control Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout vertical Spacing 12 layout horizontal Spacing 9 container set Layout layout Modify Listener listener new Modify Listener public void modify Text Modify Event e verify Complete if is Patch Group patch Properties Group new Group container SWT NULL layout new Grid Layout 2 false patch Properties Group set Layout layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 patch Properties Group set Layout Data gd patch Properties Group set Text PDE Plugin get Resource String New Feature Wizard Spec Page patch Properties NON NLS 1 Label label new Label patch Properties Group SWT NULL label set Text PDE Plugin get Resource String PATCH ID patch Id Text new Text patch Properties Group SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL patch Id Text set Layout Data gd if initial Id null patch Id Text set Text initial Id patch Id Text add Modify Listener listener label new Label patch Properties Group SWT NULL label set Text PDE Plugin get Resource String PATCH NAME patch Name Text new Text patch Properties Group SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL patch Name Text set Layout Data gd if initial Name null patch Name Text set Text initial Name patch Name Text add Modify Listener listener label new Label patch Properties Group SWT NULL label set Text PDE Plugin get Resource String PATCH PROVIDER patch Provider Text new Text patch Properties Group SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL patch Provider Text set Layout Data gd patch Provider Text add Modify Listener listener add Feature Properties container listener add Custom Install Handler Section container listener set Control container Dialog apply Dialog Font container Workbench Help set Help container I Help Context Ids NEW FEATURE DATA  createControl GridLayout GridLayout numColumns verticalSpacing horizontalSpacing setLayout ModifyListener ModifyListener modifyText ModifyEvent verifyComplete isPatch patchPropertiesGroup GridLayout patchPropertiesGroup setLayout GridData GridData GridData FILL_HORIZONTAL horizontalSpan patchPropertiesGroup setLayoutData patchPropertiesGroup setText PDEPlugin getResourceString NewFeatureWizard SpecPage patchProperties patchPropertiesGroup setText PDEPlugin getResourceString PATCH_ID patchIdText patchPropertiesGroup GridData GridData FILL_HORIZONTAL patchIdText setLayoutData initialId patchIdText setText initialId patchIdText addModifyListener patchPropertiesGroup setText PDEPlugin getResourceString PATCH_NAME patchNameText patchPropertiesGroup GridData GridData FILL_HORIZONTAL patchNameText setLayoutData initialName patchNameText setText initialName patchNameText addModifyListener patchPropertiesGroup setText PDEPlugin getResourceString PATCH_PROVIDER patchProviderText patchPropertiesGroup GridData GridData FILL_HORIZONTAL patchProviderText setLayoutData patchProviderText addModifyListener addFeatureProperties addCustomInstallHandlerSection setControl applyDialogFont WorkbenchHelp setHelp IHelpContextIds NEW_FEATURE_DATA
private void add Custom Install Handler Section Composite parent Modify Listener listener Group custom Handler Group new Group parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 custom Handler Group set Layout layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 custom Handler Group set Layout Data gd custom Handler Group set Text PDE Plugin get Resource String Base Feature Spec Page custom Group NON NLS 1 custom Choice new Button custom Handler Group SWT CHECK if is Patch custom Choice set Text PDE Plugin get Resource String KEY CUSTOM INSTALL HANDLER else custom Choice set Text PDE Plugin get Resource String KEY PATCH CUSTOM INSTALL HANDLER custom Choice add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean is Selected Button e widget get Selection library Text set Enabled is Selected library Label set Enabled is Selected verify Complete gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 custom Choice set Layout Data gd library Label new Label custom Handler Group SWT NULL library Label set Text PDE Plugin get Resource String KEY LIBRARY gd new Grid Data gd horizontal Indent 22 library Label set Layout Data gd library Text new Text custom Handler Group SWT SINGLE SWT BORDER library Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL library Text add Modify Listener listener  addCustomInstallHandlerSection ModifyListener customHandlerGroup GridLayout GridLayout numColumns customHandlerGroup setLayout GridData GridData GridData FILL_HORIZONTAL horizontalSpan customHandlerGroup setLayoutData customHandlerGroup setText PDEPlugin getResourceString BaseFeatureSpecPage customGroup customChoice customHandlerGroup isPatch customChoice setText PDEPlugin getResourceString KEY_CUSTOM_INSTALL_HANDLER customChoice setText PDEPlugin getResourceString KEY_PATCH_CUSTOM_INSTALL_HANDLER customChoice addSelectionListener SelectionAdapter widgetSelected SelectionEvent isSelected getSelection libraryText setEnabled isSelected libraryLabel setEnabled isSelected verifyComplete GridData GridData FILL_HORIZONTAL horizontalSpan customChoice setLayoutData libraryLabel customHandlerGroup libraryLabel setText PDEPlugin getResourceString KEY_LIBRARY GridData horizontalIndent libraryLabel setLayoutData libraryText customHandlerGroup libraryText setLayoutData GridData GridData FILL_HORIZONTAL libraryText addModifyListener
public boolean is Patch return is Patch  isPatch isPatch
protected abstract void verify Complete  verifyComplete
protected abstract void verify Complete return Returns the initial Name public String get Initial Name return initial Name  verifyComplete initialName getInitialName initialName
param initial Name The initial Name to set public void set Initial Name String initial Name this initial Name initial Name  initialName initialName setInitialName initialName initialName initialName
param initial Id public void set Initial Id String initial Id this initial Id initial Id  initialId setInitialId initialId initialId initialId
return Returns the initial Id public String get Initial Id return initial Id  initialId getInitialId initialId
protected void initialize custom Choice set Selection false library Text set Enabled false library Label set Enabled false  customChoice setSelection libraryText setEnabled libraryLabel setEnabled
private void add Feature Properties Composite container Modify Listener listener Group feature Properties Group new Group container SWT NULL Grid Layout layout new Grid Layout 2 false feature Properties Group set Layout layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 feature Properties Group set Layout Data gd if is Patch feature Properties Group set Text PDE Plugin get Resource String Base Feature Spec Page patch Group title NON NLS 1 Label label new Label feature Properties Group SWT NULL label set Text PDE Plugin get Resource String FEATURE ID Composite patchcontainer new Composite feature Properties Group SWT NULL layout new Grid Layout 2 false layout margin Height layout margin Width 0 layout horizontal Spacing 5 patchcontainer set Layout layout gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 1 patchcontainer set Layout Data gd feature Id Text new Text patchcontainer SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL feature Id Text set Layout Data gd if initial Id null feature Id Text set Text initial Id feature Id Text add Modify Listener listener browse Button new Button patchcontainer SWT PUSH browse Button set Text PDE Plugin get Resource String Base Feature Spec Page browse NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN END browse Button set Layout Data gd browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e Feature Selection Dialog dialog new Feature Selection Dialog get Shell get All Feature Models dialog create if dialog open Dialog OK Object result dialog get Result I Feature Model selected Model I Feature Model result 0 feature Id Text set Text selected Model get Feature get Id feature Name Text set Text selected Model get Feature get Label feature Version Text set Text selected Model get Feature get Version f Feature To Patch selected Model SWT Util set Button Dimension Hint browse Button else feature Properties Group set Text PDE Plugin get Resource String Base Feature Spec Page feature Properties Group title NON NLS 1 Label label new Label feature Properties Group SWT NULL label set Text PDE Plugin get Resource String FEATURE ID feature Id Text new Text feature Properties Group SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL feature Id Text set Layout Data gd if initial Id null feature Id Text set Text initial Id feature Id Text add Modify Listener listener Label label new Label feature Properties Group SWT NULL label set Text PDE Plugin get Resource String FEATURE NAME feature Name Text new Text feature Properties Group SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL feature Name Text set Layout Data gd if initial Name null feature Name Text set Text initial Name feature Name Text add Modify Listener listener label new Label feature Properties Group SWT NULL label set Text PDE Plugin get Resource String FEATURE VERSION feature Version Text new Text feature Properties Group SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL feature Version Text set Layout Data gd feature Version Text add Modify Listener listener if is Patch label new Label feature Properties Group SWT NULL label set Text PDE Plugin get Resource String FEATURE PROVIDER feature Provider Text new Text feature Properties Group SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL feature Provider Text set Layout Data gd feature Provider Text add Modify Listener listener  addFeatureProperties ModifyListener featurePropertiesGroup GridLayout GridLayout featurePropertiesGroup setLayout GridData GridData GridData FILL_HORIZONTAL horizontalSpan featurePropertiesGroup setLayoutData isPatch featurePropertiesGroup setText PDEPlugin getResourceString BaseFeatureSpecPage patchGroup featurePropertiesGroup setText PDEPlugin getResourceString FEATURE_ID featurePropertiesGroup GridLayout marginHeight marginWidth horizontalSpacing setLayout GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData featureIdText GridData GridData FILL_HORIZONTAL featureIdText setLayoutData initialId featureIdText setText initialId featureIdText addModifyListener browseButton browseButton setText PDEPlugin getResourceString BaseFeatureSpecPage GridData GridData HORIZONTAL_ALIGN_END browseButton setLayoutData browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent FeatureSelectionDialog FeatureSelectionDialog getShell getAllFeatureModels getResult IFeatureModel selectedModel IFeatureModel featureIdText setText selectedModel getFeature getId featureNameText setText selectedModel getFeature getLabel featureVersionText setText selectedModel getFeature getVersion fFeatureToPatch selectedModel SWTUtil setButtonDimensionHint browseButton featurePropertiesGroup setText PDEPlugin getResourceString BaseFeatureSpecPage featurePropertiesGroup featurePropertiesGroup setText PDEPlugin getResourceString FEATURE_ID featureIdText featurePropertiesGroup GridData GridData FILL_HORIZONTAL featureIdText setLayoutData initialId featureIdText setText initialId featureIdText addModifyListener featurePropertiesGroup setText PDEPlugin getResourceString FEATURE_NAME featureNameText featurePropertiesGroup GridData GridData FILL_HORIZONTAL featureNameText setLayoutData initialName featureNameText setText initialName featureNameText addModifyListener featurePropertiesGroup setText PDEPlugin getResourceString FEATURE_VERSION featureVersionText featurePropertiesGroup GridData GridData FILL_HORIZONTAL featureVersionText setLayoutData featureVersionText addModifyListener isPatch featurePropertiesGroup setText PDEPlugin getResourceString FEATURE_PROVIDER featureProviderText featurePropertiesGroup GridData GridData FILL_HORIZONTAL featureProviderText setLayoutData featureProviderText addModifyListener
protected String compute Initial Id String project Name String Buffer buffer new String Buffer String Tokenizer stok new String Tokenizer project Name NON NLS 1 while stok has More Tokens String token stok next Token for int i 0 i token length i if Character is Letter Or Digit token char At i buffer append token char At i if stok has More Tokens buffer char At buffer length 1 buffer append NON NLS 1 return buffer to String  computeInitialId projectName StringBuffer StringBuffer StringTokenizer StringTokenizer projectName hasMoreTokens nextToken isLetterOrDigit charAt charAt hasMoreTokens charAt toString
protected String verify Version String problem Text PDE Plugin get Resource String KEY VERSION FORMAT String value feature Version Text get Text if value length 0 return problem Text try new Plugin Version Identifier value catch Throwable e return problem Text return null  verifyVersion problemText PDEPlugin getResourceString KEY_VERSION_FORMAT featureVersionText getText problemText PluginVersionIdentifier problemText
protected String verify Id Rules String problem Text PDE Plugin get Resource String KEY INVALID ID String name feature Id Text get Text if name null name length 0 return PDE Plugin get Resource String KEY MISSING String Tokenizer stok new String Tokenizer name NON NLS 1 while stok has More Tokens String token stok next Token for int i 0 i token length i if Character is Letter Or Digit token char At i false return problem Text return null  verifyIdRules problemText PDEPlugin getResourceString KEY_INVALID_ID featureIdText getText PDEPlugin getResourceString KEY_MISSING StringTokenizer StringTokenizer hasMoreTokens nextToken isLetterOrDigit charAt problemText
public I Feature Model get Feature To Patch return f Feature To Patch  IFeatureModel getFeatureToPatch fFeatureToPatch
public I Feature Model get All Feature Models I Path target Path External Model Manager get Eclipse Home File main Feature Dir target Path append features to File NON NLS 1 if main Feature Dir exists false main Feature Dir is Directory return null File feature Dirs main Feature Dir list Files Plugin Version Identifier best Vid null File best Dir null Array List all Models new Array List for int i 0 i feature Dirs length i best Vid null best Dir null File feature Dir feature Dirs i String name feature Dir get Name if feature Dir is Directory int loc name last Index Of   NON NLS 1 if loc 1 continue String version name substring loc 1 Plugin Version Identifier vid new Plugin Version Identifier version if best Vid null vid is Greater Than best Vid best Vid vid best Dir feature Dir if best Vid null return null We have a feature and know the version File manifest new File best Dir feature xml NON NLS 1 External Feature Model model new External Feature Model model set Install Location best Dir get Absolute Path Input Stream stream null boolean error false try stream new File Input Stream manifest model load stream false catch Exception e error true if stream null try stream close catch IO Exception e if error model is Loaded all Models add model Workspace Model Manager mng PDE Core get Default get Workspace Model Manager I Feature Model workspace Models mng get Feature Models for int i 0 i workspace Models length i if is Feature Included all Models workspace Models i all Models add workspace Models i return I Feature Model all Models to Array new I Feature Model all Models size  IFeatureModel getAllFeatureModels IPath targetPath ExternalModelManager getEclipseHome mainFeatureDir targetPath toFile mainFeatureDir mainFeatureDir isDirectory featureDirs mainFeatureDir listFiles PluginVersionIdentifier bestVid bestDir ArrayList allModels ArrayList featureDirs bestVid bestDir featureDir featureDirs featureDir getName featureDir isDirectory lastIndexOf _ PluginVersionIdentifier PluginVersionIdentifier bestVid isGreaterThan bestVid bestVid bestDir featureDir bestVid bestDir ExternalFeatureModel ExternalFeatureModel setInstallLocation bestDir getAbsolutePath InputStream FileInputStream IOException isLoaded allModels WorkspaceModelManager PDECore getDefault getWorkspaceModelManager IFeatureModel workspaceModels getFeatureModels workspaceModels isFeatureIncluded allModels workspaceModels allModels workspaceModels IFeatureModel allModels toArray IFeatureModel allModels
protected boolean is Feature Included Array List models I Feature Model workspace Model for int i 0 i models size i if models get i instanceof I Feature Model continue I Feature Model model I Feature Model models get i if model get Feature get Id equals workspace Model get Feature get Id model get Feature get Version equals workspace Model get Feature get Version return true return false  isFeatureIncluded ArrayList IFeatureModel workspaceModel IFeatureModel IFeatureModel IFeatureModel getFeature getId workspaceModel getFeature getId getFeature getVersion workspaceModel getFeature getVersion
protected String get Install Handler Library if custom Choice get Selection return null String library library Text get Text if library ends With jar NON NLS 1 library jar NON NLS 1 return library  getInstallHandlerLibrary customChoice getSelection libraryText getText endsWith

protected Wizard Checkbox Table Part table Part param page Name public Base Plugin List Page String page Name super page Name table Part new Wizard Checkbox Table Part null PDE Plugin get Default get Label Provider connect this  WizardCheckboxTablePart tablePart pageName BasePluginListPage pageName pageName tablePart WizardCheckboxTablePart PDEPlugin getDefault getLabelProvider
param page Name param title param title Image public Base Plugin List Page String page Name String title Image Descriptor title Image super page Name title title Image table Part new Wizard Checkbox Table Part null PDE Plugin get Default get Label Provider connect this  pageName titleImage BasePluginListPage pageName ImageDescriptor titleImage pageName titleImage tablePart WizardCheckboxTablePart PDEPlugin getDefault getLabelProvider
see org eclipse jface dialogs I Dialog Page create Control org eclipse swt widgets Composite public void create Control Composite parent  IDialogPage createControl createControl
public void dispose super dispose PDE Plugin get Default get Label Provider disconnect this  PDEPlugin getDefault getLabelProvider
public void set Visible boolean visible super set Visible visible if visible table Part get Control set Focus  setVisible setVisible tablePart getControl setFocus

public Feature Data library null has Custom Handler false is Patch false  FeatureData hasCustomHandler isPatch
public boolean has Custom Handler return has Custom Handler  hasCustomHandler hasCustomHandler
public boolean is Patch return is Patch  isPatch isPatch
public String get Source Folder Name return Preference Constants get Preference Store get String Preference Constants SRCBIN SRCNAME  getSourceFolderName PreferenceConstants getPreferenceStore getString PreferenceConstants SRCBIN_SRCNAME
public String get Java Build Folder Name return Preference Constants get Preference Store get String Preference Constants SRCBIN BINNAME  getJavaBuildFolderName PreferenceConstants getPreferenceStore getString PreferenceConstants SRCBIN_BINNAME

param parent param renderer public Feature Selection Dialog Shell parent I Feature Model models super parent PDE Plugin get Default get Label Provider set Title PDE Plugin get Resource String Feature Selection Dialog title NON NLS 1 set Message PDE Plugin get Resource String Feature Selection Dialog message NON NLS 1 set Elements models set Multiple Selection false PDE Plugin get Default get Label Provider connect this  FeatureSelectionDialog IFeatureModel PDEPlugin getDefault getLabelProvider setTitle PDEPlugin getResourceString FeatureSelectionDialog setMessage PDEPlugin getResourceString FeatureSelectionDialog setElements setMultipleSelection PDEPlugin getDefault getLabelProvider
public boolean close PDE Plugin get Default get Label Provider disconnect this return super close  PDEPlugin getDefault getLabelProvider
see org eclipse ui dialogs Abstract Element List Selection Dialog set Validator org eclipse ui dialogs I Selection Status Validator public void set Validator I Selection Status Validator validator super set Validator validator  AbstractElementListSelectionDialog setValidator ISelectionStatusValidator setValidator ISelectionStatusValidator setValidator

protected Feature Spec Page Wizard New Project Creation Page main Page super main Page false set Title PDE Plugin get Resource String PAGE TITLE set Description PDE Plugin get Resource String PAGE DESC  FeatureSpecPage WizardNewProjectCreationPage mainPage mainPage setTitle PDEPlugin getResourceString PAGE_TITLE setDescription PDEPlugin getResourceString PAGE_DESC
protected void initialize if is Initialized return String project Name main Page get Project Name if initial Id null feature Id Text set Text compute Initial Id project Name if initial Name null feature Name Text set Text project Name feature Version Text set Text 1 0 0 NON NLS 1 super initialize  isInitialized projectName mainPage getProjectName initialId featureIdText setText computeInitialId projectName initialName featureNameText setText projectName featureVersionText setText
public Feature Data get Feature Data Feature Data data new Feature Data data id feature Id Text get Text try Plugin Version Identifier pvi new Plugin Version Identifier feature Version Text get Text data version pvi to String catch Number Format Exception e data version feature Version Text get Text data provider feature Provider Text get Text data name feature Name Text get Text data library get Install Handler Library data has Custom Handler custom Choice get Selection return data  FeatureData getFeatureData FeatureData FeatureData featureIdText getText PluginVersionIdentifier PluginVersionIdentifier featureVersionText getText toString NumberFormatException featureVersionText getText featureProviderText getText featureNameText getText getInstallHandlerLibrary hasCustomHandler customChoice getSelection
protected void verify Complete String message verify Id Rules if message null set Page Complete false set Error Message message return message verify Version if message null set Page Complete false set Error Message message return if custom Choice get Selection library Text get Text length 0 set Page Complete false set Error Message PDE Plugin get Resource String KEY LIBRARY MISSING return set Page Complete true set Error Message null return  verifyComplete verifyIdRules setPageComplete setErrorMessage verifyVersion setPageComplete setErrorMessage customChoice getSelection libraryText getText setPageComplete setErrorMessage PDEPlugin getResourceString KEY_LIBRARY_MISSING setPageComplete setErrorMessage
public void set Visible boolean visible super set Visible visible if visible initialize is Initialized true feature Id Text set Focus  setVisible setVisible isInitialized featureIdText setFocus

public class Feature Patch Provider implements I Project Provider public Feature Patch Provider super  FeaturePatchProvider IProjectProvider FeaturePatchProvider
public String get Project Name return main Page get Project Name  getProjectName mainPage getProjectName
public I Project get Project return main Page get Project Handle  IProject getProject mainPage getProjectHandle
public I Path get Location Path return main Page get Location Path  IPath getLocationPath mainPage getLocationPath
public I Feature Model get Feature To Patch if spec Page null return spec Page get Feature To Patch return null  IFeatureModel getFeatureToPatch specPage specPage getFeatureToPatch
public Feature Data get Feature Data return spec Page get Feature Data  FeatureData getFeatureData specPage getFeatureData
public New Feature Patch Wizard super set Default Page Image Descriptor PDE Plugin Images DESC NEWFTRPTCH WIZ set Dialog Settings PDE Plugin get Default get Dialog Settings set Needs Progress Monitor true set Window Title PDE Plugin get Resource String KEY WTITLE  NewFeaturePatchWizard setDefaultPageImageDescriptor PDEPluginImages DESC_NEWFTRPTCH_WIZ setDialogSettings PDEPlugin getDefault getDialogSettings setNeedsProgressMonitor setWindowTitle PDEPlugin getResourceString KEY_WTITLE
public void add Pages main Page new Wizard New Project Creation Page main NON NLS 1 main Page set Title PDE Plugin get Resource String MAIN PAGE TITLE main Page set Description PDE Plugin get Resource String MAIN PAGE DESC String pname get Default Value DEF PROJECT NAME if pname null main Page set Initial Project Name pname add Page main Page provider new Feature Patch Provider spec Page new Patch Spec Page main Page spec Page set Initial Id get Default Value DEF FEATURE ID spec Page set Initial Name get Default Value DEF FEATURE NAME add Page spec Page plugin List Page new Patch Plugin List Page provider add Page plugin List Page  addPages mainPage WizardNewProjectCreationPage mainPage setTitle PDEPlugin getResourceString MAIN_PAGE_TITLE mainPage setDescription PDEPlugin getResourceString MAIN_PAGE_DESC getDefaultValue DEF_PROJECT_NAME mainPage setInitialProjectName addPage mainPage FeaturePatchProvider specPage PatchSpecPage mainPage specPage setInitialId getDefaultValue DEF_FEATURE_ID specPage setInitialName getDefaultValue DEF_FEATURE_NAME addPage specPage pluginListPage PatchPluginListPage addPage pluginListPage
public boolean can Finish I Wizard Page page get Container get Current Page return page spec Page page is Page Complete page plugin List Page page is Page Complete  canFinish IWizardPage getContainer getCurrentPage specPage isPageComplete pluginListPage isPageComplete
public void execute I Progress Monitor monitor try create Feature Project project location plugins feature Model data monitor catch Core Exception e PDE Plugin log Exception e finally monitor done  IProgressMonitor createFeatureProject featureModel CoreException PDEPlugin logException
public boolean perform Finish final I Project project provider get Project final I Path location provider get Location Path final I Feature Plugin plugins plugin List Page get Selected Plugins null I Feature Plugin plugin List Page get Selected Plugins new I Feature Plugin 0 final I Feature Model feature Model provider get Feature To Patch final Feature Data data provider get Feature Data I Runnable With Progress operation new Workspace Modify Operation public void execute I Progress Monitor monitor try create Feature Project project location plugins feature Model data monitor catch Core Exception e PDE Plugin log Exception e finally monitor done try get Container run false true operation Basic New Project Resource Wizard update Perspective config catch Invocation Target Exception e PDE Plugin log Exception e return false catch Interrupted Exception e return false return true  performFinish IProject getProject IPath getLocationPath IFeaturePlugin pluginListPage getSelectedPlugins IFeaturePlugin pluginListPage getSelectedPlugins IFeaturePlugin IFeatureModel featureModel getFeatureToPatch FeatureData getFeatureData IRunnableWithProgress WorkspaceModifyOperation IProgressMonitor createFeatureProject featureModel CoreException PDEPlugin logException getContainer BasicNewProjectResourceWizard updatePerspective InvocationTargetException PDEPlugin logException InterruptedException
public void set Initialization Data I Configuration Element config String property Object data throws Core Exception this config config  setInitializationData IConfigurationElement CoreException
private void create Feature Project I Project project I Path location I Feature Plugin plugins I Feature Model feature Model Feature Data data I Progress Monitor monitor throws Core Exception monitor begin Task PDE Plugin get Resource String CREATING PROJECT 3 boolean overwrite true if location append project get Name to File exists overwrite Message Dialog open Question PDE Plugin get Active Workbench Shell PDE Plugin get Resource String KEY WTITLE PDE Plugin get Resource String OVERWRITE FEATURE if overwrite Core Utility create Project project location monitor project open monitor I Project Description desc project get Workspace new Project Description project get Name desc set Location provider get Location Path if project has Nature PDE FEATURE BUILDER ID Core Utility add Nature To Project project PDE FEATURE NATURE monitor if project has Nature Java Core NATURE ID data has Custom Handler Core Utility add Nature To Project project Java Core NATURE ID monitor Java Core create project set Output Location project get Full Path append data get Java Build Folder Name monitor Java Core create project set Raw Classpath new I Classpath Entry Java Core new Container Entry new Path Java Runtime JRE CONTAINER Java Core new Source Entry project get Full Path append data get Source Folder Name monitor add Source Folder data get Source Folder Name project monitor monitor sub Task PDE Plugin get Resource String CREATING MANIFEST monitor worked 1 create Build Properties project data monitor worked 1 create feature xml I File file create Feature Manifest project plugins feature Model data monitor worked 1 open manifest for editing open Feature Manifest file else project create monitor project open monitor I File feature File project get File feature xml NON NLS 1 if feature File exists open Feature Manifest feature File monitor worked 3  createFeatureProject IProject IPath IFeaturePlugin IFeatureModel featureModel FeatureData IProgressMonitor CoreException beginTask PDEPlugin getResourceString CREATING_PROJECT getName toFile MessageDialog openQuestion PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString KEY_WTITLE PDEPlugin getResourceString OVERWRITE_FEATURE CoreUtility createProject IProjectDescription getWorkspace newProjectDescription getName setLocation getLocationPath hasNature FEATURE_BUILDER_ID CoreUtility addNatureToProject FEATURE_NATURE hasNature JavaCore NATURE_ID hasCustomHandler CoreUtility addNatureToProject JavaCore NATURE_ID JavaCore setOutputLocation getFullPath getJavaBuildFolderName JavaCore setRawClasspath IClasspathEntry JavaCore newContainerEntry JavaRuntime JRE_CONTAINER JavaCore newSourceEntry getFullPath getSourceFolderName addSourceFolder getSourceFolderName subTask PDEPlugin getResourceString CREATING_MANIFEST createBuildProperties IFile createFeatureManifest featureModel openFeatureManifest IFile featureFile getFile featureFile openFeatureManifest featureFile
protected static void add Source Folder String name I Project project I Progress Monitor monitor throws Core Exception I Path path project get Full Path append name ensure Folder Exists project path monitor monitor worked 1  addSourceFolder IProject IProgressMonitor CoreException IPath getFullPath ensureFolderExists
private void create Build Properties I Project project Feature Data data throws Core Exception String file Name build properties NON NLS 1 I Path path project get Full Path append file Name I File file project get Workspace get Root get File path if file exists Workspace Build Model model new Workspace Build Model file I Build Entry ientry model get Factory create Entry bin includes NON NLS 1 ientry add Token feature xml NON NLS 1 String library spec Page get Install Handler Library if library null String source data get Source Folder Name if source null I Build Entry entry model get Factory create Entry I Build Entry JAR PREFIX library if source ends With NON NLS 1 source NON NLS 1 entry add Token source ientry add Token library model get Build add entry String output data get Java Build Folder Name if output null I Build Entry entry model get Factory create Entry I Build Properties Constants PROPERTY OUTPUT PREFIX library if output ends With NON NLS 1 output NON NLS 1 entry add Token output model get Build add entry model get Build add ientry model save IDE set Default Editor file PDE Plugin BUILD EDITOR ID  createBuildProperties IProject FeatureData CoreException fileName IPath getFullPath fileName IFile getWorkspace getRoot getFile WorkspaceBuildModel WorkspaceBuildModel IBuildEntry getFactory createEntry addToken specPage getInstallHandlerLibrary getSourceFolderName IBuildEntry getFactory createEntry IBuildEntry JAR_PREFIX endsWith addToken addToken getBuild getJavaBuildFolderName IBuildEntry getFactory createEntry IBuildPropertiesConstants PROPERTY_OUTPUT_PREFIX endsWith addToken getBuild getBuild setDefaultEditor PDEPlugin BUILD_EDITOR_ID
private I File create Feature Manifest I Project project I Feature Plugin plugins I Feature Model feature Model Feature Data data throws Core Exception I File file project get File feature xml NON NLS 1 Workspace Feature Model model new Workspace Feature Model model set File file I Feature feature model get Feature feature set Label data name feature set Id data id feature set Version 1 0 0 NON NLS 1 feature set Provider Name data provider I Feature Plugin added new I Feature Plugin plugins length for int i 0 i plugins length i added i model get Factory create Plugin String name feature get Id int loc name last Index Of NON NLS 1 if loc 1 loc name length name name substring loc 1 name length String version Segments plugins i get Version split NON NLS 1 String Buffer version new String Buffer for int j 0 j version Segments length j if j 3 version append version Segments j version append NON NLS 1 version append name I Status status Plugin Version Identifier validate Version version to String if status isOK added i set Version version to String else added i set Version plugins i get Version added i set Id plugins i get Id added i set Download Size plugins i get Download Size added i set Arch plugins i get Arch added i set Install Size plugins i get Install Size added i set Label plugins i get Label added i setNL plugins i getNL added i setOS plugins i getOS added i setWS plugins i getWS feature add Plugins added Feature Import feature Import Feature Import model get Factory create Import if feature Model null feature Import load From feature Model get Feature feature Import set Patch true feature Import set Version feature Model get Feature get Version feature Import set Id feature Model get Feature get Id else if data is Patch feature Import set Patch true feature Import set Version data feature To Patch Version feature Import set Id data feature To Patch Id feature add Imports new I Feature Import feature Import I Feature Install Handler handler feature get Install Handler if handler null handler feature get Model get Factory create Install Handler feature set Install Handler handler handler set Library spec Page get Install Handler Library I Feature Info info model get Factory create Info I Feature INFO COPYRIGHT feature set Feature Info info I Feature INFO COPYRIGHT info setURL PDE Plugin get Resource String New Feature Wizard sample CopyrightURL NON NLS 1 info set Description PDE Plugin get Resource String New Feature Wizard sample Copyright Desc NON NLS 1 info model get Factory create Info I Feature INFO LICENSE feature set Feature Info info I Feature INFO LICENSE info setURL PDE Plugin get Resource String New Feature Wizard sample LicenseURL NON NLS 1 info set Description PDE Plugin get Resource String New Feature Wizard sample License Desc NON NLS 1 info model get Factory create Info I Feature INFO DESCRIPTION feature set Feature Info info I Feature INFO DESCRIPTION info setURL PDE Plugin get Resource String New Feature Wizard sample DescriptionURL NON NLS 1 info set Description PDE Plugin get Resource String New Feature Wizard sample Description Desc NON NLS 1 Save the model model save model dispose IDE set Default Editor file PDE Plugin FEATURE EDITOR ID return file  IFile createFeatureManifest IProject IFeaturePlugin IFeatureModel featureModel FeatureData CoreException IFile getFile WorkspaceFeatureModel WorkspaceFeatureModel setFile IFeature getFeature setLabel setId setVersion setProviderName IFeaturePlugin IFeaturePlugin getFactory createPlugin getId lastIndexOf versionSegments getVersion StringBuffer StringBuffer versionSegments versionSegments IStatus PluginVersionIdentifier validateVersion toString setVersion toString setVersion getVersion setId getId setDownloadSize getDownloadSize setArch getArch setInstallSize getInstallSize setLabel getLabel addPlugins FeatureImport featureImport FeatureImport getFactory createImport featureModel featureImport loadFrom featureModel getFeature featureImport setPatch featureImport setVersion featureModel getFeature getVersion featureImport setId featureModel getFeature getId isPatch featureImport setPatch featureImport setVersion featureToPatchVersion featureImport setId featureToPatchId addImports IFeatureImport featureImport IFeatureInstallHandler getInstallHandler getModel getFactory createInstallHandler setInstallHandler setLibrary specPage getInstallHandlerLibrary IFeatureInfo getFactory createInfo IFeature INFO_COPYRIGHT setFeatureInfo IFeature INFO_COPYRIGHT PDEPlugin getResourceString NewFeatureWizard sampleCopyrightURL setDescription PDEPlugin getResourceString NewFeatureWizard sampleCopyrightDesc getFactory createInfo IFeature INFO_LICENSE setFeatureInfo IFeature INFO_LICENSE PDEPlugin getResourceString NewFeatureWizard sampleLicenseURL setDescription PDEPlugin getResourceString NewFeatureWizard sampleLicenseDesc getFactory createInfo IFeature INFO_DESCRIPTION setFeatureInfo IFeature INFO_DESCRIPTION PDEPlugin getResourceString NewFeatureWizard sampleDescriptionURL setDescription PDEPlugin getResourceString NewFeatureWizard sampleDescriptionDesc setDefaultEditor PDEPlugin FEATURE_EDITOR_ID
get Shell get Display async Exec new Runnable public void run I Set Selection Target active Part select Reveal selection  getShell getDisplay asyncExec ISetSelectionTarget activePart selectReveal
private void open Feature Manifest I File manifest File I Workbench Page page PDE Plugin get Active Page Reveal the file first final I Selection selection new Structured Selection manifest File final I Workbench Part active Part page get Active Part if active Part instanceof I Set Selection Target get Shell get Display async Exec new Runnable public void run I Set Selection Target active Part select Reveal selection Open the editor File Editor Input input new File Editor Input manifest File String id PDE Plugin FEATURE EDITOR ID try page open Editor input id catch Part Init Exception e PDE Plugin log Exception e  openFeatureManifest IFile manifestFile IWorkbenchPage PDEPlugin getActivePage ISelection StructuredSelection manifestFile IWorkbenchPart activePart getActivePart activePart ISetSelectionTarget getShell getDisplay asyncExec ISetSelectionTarget activePart selectReveal FileEditorInput FileEditorInput manifestFile PDEPlugin FEATURE_EDITOR_ID openEditor PartInitException PDEPlugin logException
private static void ensure Folder Exists I Project project I Path folder Path I Progress Monitor monitor throws Core Exception I Workspace workspace project get Workspace for int i 1 i folder Path segment Count i I Path partial Path folder Path upto Segment i if workspace get Root exists partial Path I Folder folder workspace get Root get Folder partial Path folder create true true null monitor worked 1  ensureFolderExists IProject IPath folderPath IProgressMonitor CoreException IWorkspace getWorkspace folderPath segmentCount IPath partialPath folderPath uptoSegment getRoot partialPath IFolder getRoot getFolder partialPath

private I Project Provider provider public class Feature Project Provider implements I Project Provider public Feature Project Provider super  IProjectProvider FeatureProjectProvider IProjectProvider FeatureProjectProvider
super public String get Project Name return main Page get Project Name  getProjectName mainPage getProjectName
return main Page get Project Name public I Project get Project return main Page get Project Handle  mainPage getProjectName IProject getProject mainPage getProjectHandle
return main Page get Project Handle public I Path get Location Path return main Page get Location Path  mainPage getProjectHandle IPath getLocationPath mainPage getLocationPath
return main Page get Location Path public Feature Data get Feature Data return spec Page get Feature Data  mainPage getLocationPath FeatureData getFeatureData specPage getFeatureData
public I Plugin Base get Plugin List Selection if plugin List Page null return null return plugin List Page get Selected Plugins  IPluginBase getPluginListSelection pluginListPage pluginListPage getSelectedPlugins
return plugin List Page get Selected Plugins public I Configuration Element get Config Element return config  pluginListPage getSelectedPlugins IConfigurationElement getConfigElement
public New Feature Project Wizard super set Default Page Image Descriptor PDE Plugin Images DESC NEWFTRPRJ WIZ set Dialog Settings PDE Plugin get Default get Dialog Settings set Needs Progress Monitor true set Window Title PDE Plugin get Resource String KEY WTITLE  NewFeatureProjectWizard setDefaultPageImageDescriptor PDEPluginImages DESC_NEWFTRPRJ_WIZ setDialogSettings PDEPlugin getDefault getDialogSettings setNeedsProgressMonitor setWindowTitle PDEPlugin getResourceString KEY_WTITLE
public void add Pages provider new Feature Project Provider main Page new Wizard New Project Creation Page main NON NLS 1 main Page set Title PDE Plugin get Resource String MAIN PAGE TITLE main Page set Description PDE Plugin get Resource String MAIN PAGE DESC String pname get Default Value DEF PROJECT NAME if pname null main Page set Initial Project Name pname add Page main Page spec Page new Feature Spec Page main Page spec Page set Initial Id get Default Value DEF ID spec Page set Initial Name get Default Value DEF NAME add Page spec Page if has Interesting Projects plugin List Page new Plugin List Page add Page plugin List Page  addPages FeatureProjectProvider mainPage WizardNewProjectCreationPage mainPage setTitle PDEPlugin getResourceString MAIN_PAGE_TITLE mainPage setDescription PDEPlugin getResourceString MAIN_PAGE_DESC getDefaultValue DEF_PROJECT_NAME mainPage setInitialProjectName addPage mainPage specPage FeatureSpecPage mainPage specPage setInitialId getDefaultValue DEF_ID specPage setInitialName getDefaultValue DEF_NAME addPage specPage hasInterestingProjects pluginListPage PluginListPage addPage pluginListPage
public boolean can Finish I Wizard Page page get Container get Current Page return page spec Page page is Page Complete page plugin List Page page is Page Complete  canFinish IWizardPage getContainer getCurrentPage specPage isPageComplete pluginListPage isPageComplete
private boolean has Interesting Projects I Workspace workspace PDE Plugin get Workspace I Workspace Root root workspace get Root I Project projects root get Projects for int i 0 i projects length i I Project project projects i if Workspace Model Manager is Plugin Project project return true return false  hasInterestingProjects IWorkspace PDEPlugin getWorkspace IWorkspaceRoot getRoot IProject getProjects IProject WorkspaceModelManager isPluginProject
I Runnable With Progress operation new Workspace Modify Operation public void execute I Progress Monitor monitor try create Feature Project project location data plugins monitor catch Core Exception e PDE Plugin log Exception e finally monitor done  IRunnableWithProgress WorkspaceModifyOperation IProgressMonitor createFeatureProject CoreException PDEPlugin logException
public boolean perform Finish final I Project project Feature Project Provider provider get Project final I Path location Feature Project Provider provider get Location Path final Feature Data data Feature Project Provider provider get Feature Data final I Plugin Base plugins Feature Project Provider provider get Plugin List Selection null Feature Project Provider provider get Plugin List Selection new I Plugin Base 0 I Runnable With Progress operation new Workspace Modify Operation public void execute I Progress Monitor monitor try create Feature Project project location data plugins monitor catch Core Exception e PDE Plugin log Exception e finally monitor done try get Container run false true operation Basic New Project Resource Wizard update Perspective Feature Project Provider provider get Config Element catch Invocation Target Exception e PDE Plugin log Exception e return false catch Interrupted Exception e return false return true  performFinish IProject FeatureProjectProvider getProject IPath FeatureProjectProvider getLocationPath FeatureData FeatureProjectProvider getFeatureData IPluginBase FeatureProjectProvider getPluginListSelection FeatureProjectProvider getPluginListSelection IPluginBase IRunnableWithProgress WorkspaceModifyOperation IProgressMonitor createFeatureProject CoreException PDEPlugin logException getContainer BasicNewProjectResourceWizard updatePerspective FeatureProjectProvider getConfigElement InvocationTargetException PDEPlugin logException InterruptedException
public void set Initialization Data I Configuration Element config String property Object data throws Core Exception this config config  setInitializationData IConfigurationElement CoreException
protected static void add Source Folder String name I Project project I Progress Monitor monitor throws Core Exception I Path path project get Full Path append name ensure Folder Exists project path monitor monitor worked 1  addSourceFolder IProject IProgressMonitor CoreException IPath getFullPath ensureFolderExists
private static void ensure Folder Exists I Project project I Path folder Path I Progress Monitor monitor throws Core Exception I Workspace workspace project get Workspace for int i 1 i folder Path segment Count i I Path partial Path folder Path upto Segment i if workspace get Root exists partial Path I Folder folder workspace get Root get Folder partial Path folder create true true null monitor worked 1  ensureFolderExists IProject IPath folderPath IProgressMonitor CoreException IWorkspace getWorkspace folderPath segmentCount IPath partialPath folderPath uptoSegment getRoot partialPath IFolder getRoot getFolder partialPath
private void create Build Properties I Project project Feature Data data throws Core Exception String file Name build properties NON NLS 1 I Path path project get Full Path append file Name I File file project get Workspace get Root get File path if file exists Workspace Build Model model new Workspace Build Model file I Build Entry ientry model get Factory create Entry bin includes NON NLS 1 ientry add Token feature xml NON NLS 1 String library data library if library null String source data get Source Folder Name if source null I Build Entry entry model get Factory create Entry I Build Entry JAR PREFIX library if source ends With NON NLS 1 source NON NLS 1 entry add Token source ientry add Token library model get Build add entry String output data get Java Build Folder Name if output null I Build Entry entry model get Factory create Entry I Build Properties Constants PROPERTY OUTPUT PREFIX library if output ends With NON NLS 1 output NON NLS 1 entry add Token output model get Build add entry model get Build add ientry model save IDE set Default Editor file PDE Plugin BUILD EDITOR ID  createBuildProperties IProject FeatureData CoreException fileName IPath getFullPath fileName IFile getWorkspace getRoot getFile WorkspaceBuildModel WorkspaceBuildModel IBuildEntry getFactory createEntry addToken getSourceFolderName IBuildEntry getFactory createEntry IBuildEntry JAR_PREFIX endsWith addToken addToken getBuild getJavaBuildFolderName IBuildEntry getFactory createEntry IBuildPropertiesConstants PROPERTY_OUTPUT_PREFIX endsWith addToken getBuild getBuild setDefaultEditor PDEPlugin BUILD_EDITOR_ID
private I File create Feature Manifest I Project project Feature Data data I Plugin Base plugins throws Core Exception I File file project get File feature xml NON NLS 1 Workspace Feature Model model new Workspace Feature Model model set File file I Feature feature model get Feature String name data name feature set Label name feature set Id data id feature set Version data version feature set Provider Name data provider I Feature Plugin added new I Feature Plugin plugins length for int i 0 i plugins length i I Plugin Base plugin plugins i Feature Plugin fplugin Feature Plugin model get Factory create Plugin fplugin load From plugin added i fplugin feature add Plugins added feature compute Imports I Feature Install Handler handler feature get Install Handler if handler null handler feature get Model get Factory create Install Handler feature set Install Handler handler handler set Library data library I Feature Info info model get Factory create Info I Feature INFO COPYRIGHT feature set Feature Info info I Feature INFO COPYRIGHT info setURL PDE Plugin get Resource String New Feature Wizard sample CopyrightURL NON NLS 1 info set Description PDE Plugin get Resource String New Feature Wizard sample Copyright Desc NON NLS 1 info model get Factory create Info I Feature INFO LICENSE feature set Feature Info info I Feature INFO LICENSE info setURL PDE Plugin get Resource String New Feature Wizard sample LicenseURL NON NLS 1 info set Description PDE Plugin get Resource String New Feature Wizard sample License Desc NON NLS 1 info model get Factory create Info I Feature INFO DESCRIPTION feature set Feature Info info I Feature INFO DESCRIPTION info setURL PDE Plugin get Resource String New Feature Wizard sample DescriptionURL NON NLS 1 info set Description PDE Plugin get Resource String New Feature Wizard sample Description Desc NON NLS 1 Save the model model save model dispose IDE set Default Editor file PDE Plugin FEATURE EDITOR ID return file  IFile createFeatureManifest IProject FeatureData IPluginBase CoreException IFile getFile WorkspaceFeatureModel WorkspaceFeatureModel setFile IFeature getFeature setLabel setId setVersion setProviderName IFeaturePlugin IFeaturePlugin IPluginBase FeaturePlugin FeaturePlugin getFactory createPlugin loadFrom addPlugins computeImports IFeatureInstallHandler getInstallHandler getModel getFactory createInstallHandler setInstallHandler setLibrary IFeatureInfo getFactory createInfo IFeature INFO_COPYRIGHT setFeatureInfo IFeature INFO_COPYRIGHT PDEPlugin getResourceString NewFeatureWizard sampleCopyrightURL setDescription PDEPlugin getResourceString NewFeatureWizard sampleCopyrightDesc getFactory createInfo IFeature INFO_LICENSE setFeatureInfo IFeature INFO_LICENSE PDEPlugin getResourceString NewFeatureWizard sampleLicenseURL setDescription PDEPlugin getResourceString NewFeatureWizard sampleLicenseDesc getFactory createInfo IFeature INFO_DESCRIPTION setFeatureInfo IFeature INFO_DESCRIPTION PDEPlugin getResourceString NewFeatureWizard sampleDescriptionURL setDescription PDEPlugin getResourceString NewFeatureWizard sampleDescriptionDesc setDefaultEditor PDEPlugin FEATURE_EDITOR_ID
private void create Feature Project I Project project I Path location Feature Data data I Plugin Base plugins I Progress Monitor monitor throws Core Exception monitor begin Task PDE Plugin get Resource String CREATING PROJECT 3 boolean overwrite true if location append project get Name to File exists overwrite Message Dialog open Question PDE Plugin get Active Workbench Shell PDE Plugin get Resource String KEY WTITLE PDE Plugin get Resource String OVERWRITE FEATURE if overwrite Core Utility create Project project location monitor project open monitor I Project Description desc project get Workspace new Project Description project get Name desc set Location provider get Location Path if project has Nature PDE FEATURE BUILDER ID Core Utility add Nature To Project project PDE FEATURE NATURE monitor if project has Nature Java Core NATURE ID data has Custom Handler Core Utility add Nature To Project project Java Core NATURE ID monitor Java Core create project set Output Location project get Full Path append data get Java Build Folder Name monitor Java Core create project set Raw Classpath new I Classpath Entry Java Core new Container Entry new Path Java Runtime JRE CONTAINER Java Core new Source Entry project get Full Path append data get Source Folder Name monitor add Source Folder data get Source Folder Name project monitor monitor sub Task PDE Plugin get Resource String CREATING MANIFEST monitor worked 1 create Build Properties project data monitor worked 1 create feature xml I File file create Feature Manifest project data plugins monitor worked 1 open manifest for editing open Feature Manifest file else project create monitor project open monitor I File feature File project get File feature xml NON NLS 1 if feature File exists open Feature Manifest feature File monitor worked 3  createFeatureProject IProject IPath FeatureData IPluginBase IProgressMonitor CoreException beginTask PDEPlugin getResourceString CREATING_PROJECT getName toFile MessageDialog openQuestion PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString KEY_WTITLE PDEPlugin getResourceString OVERWRITE_FEATURE CoreUtility createProject IProjectDescription getWorkspace newProjectDescription getName setLocation getLocationPath hasNature FEATURE_BUILDER_ID CoreUtility addNatureToProject FEATURE_NATURE hasNature JavaCore NATURE_ID hasCustomHandler CoreUtility addNatureToProject JavaCore NATURE_ID JavaCore setOutputLocation getFullPath getJavaBuildFolderName JavaCore setRawClasspath IClasspathEntry JavaCore newContainerEntry JavaRuntime JRE_CONTAINER JavaCore newSourceEntry getFullPath getSourceFolderName addSourceFolder getSourceFolderName subTask PDEPlugin getResourceString CREATING_MANIFEST createBuildProperties IFile createFeatureManifest openFeatureManifest IFile featureFile getFile featureFile openFeatureManifest featureFile
if active Part instanceof I Set Selection Target get Shell get Display async Exec new Runnable public void run I Set Selection Target active Part select Reveal selection  activePart ISetSelectionTarget getShell getDisplay asyncExec ISetSelectionTarget activePart selectReveal
private void open Feature Manifest I File manifest File I Workbench Page page PDE Plugin get Active Page Reveal the file first final I Selection selection new Structured Selection manifest File final I Workbench Part active Part page get Active Part if active Part instanceof I Set Selection Target get Shell get Display async Exec new Runnable public void run I Set Selection Target active Part select Reveal selection Open the editor File Editor Input input new File Editor Input manifest File String id PDE Plugin FEATURE EDITOR ID try page open Editor input id catch Part Init Exception e PDE Plugin log Exception e  openFeatureManifest IFile manifestFile IWorkbenchPage PDEPlugin getActivePage ISelection StructuredSelection manifestFile IWorkbenchPart activePart getActivePart activePart ISetSelectionTarget getShell getDisplay asyncExec ISetSelectionTarget activePart selectReveal FileEditorInput FileEditorInput manifestFile PDEPlugin FEATURE_EDITOR_ID openEditor PartInitException PDEPlugin logException

public class Open Project Wizard Action extends Action implements I Cheat Sheet Action param text public Open Project Wizard Action super Open Project NON NLS 1  OpenProjectWizardAction ICheatSheetAction OpenProjectWizardAction OpenProject
see I Action Delegate run I Action public void run run new String null  IActionDelegate IAction
public void run String params I Cheat Sheet Manager manager Hashtable def Values new Hashtable if params length 0 def Values put New Feature Project Wizard DEF PROJECT NAME params 0 if params length 1 def Values put New Feature Project Wizard DEF ID params 1 if params length 2 def Values put New Feature Project Wizard DEF NAME params 2 New Feature Project Wizard wizard new New Feature Project Wizard wizard init def Values wizard init PlatformUI get Workbench new Structured Selection Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create SWT Util set Dialog Size dialog 500 500 dialog get Shell set Text wizard get Window Title int result dialog open notify Result result Wizard Dialog OK  ICheatSheetManager defValues defValues NewFeatureProjectWizard DEF_PROJECT_NAME defValues NewFeatureProjectWizard DEF_ID defValues NewFeatureProjectWizard DEF_NAME NewFeatureProjectWizard NewFeatureProjectWizard defValues getWorkbench StructuredSelection WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell SWTUtil setDialogSize getShell setText getWindowTitle notifyResult WizardDialog

param page Name public Patch Plugin List Page String page Name super page Name set Title PDE Plugin get Resource String PAGE TITLE set Description PDE Plugin get Resource String PAGE DESC  pageName PatchPluginListPage pageName pageName setTitle PDEPlugin getResourceString PAGE_TITLE setDescription PDEPlugin getResourceString PAGE_DESC
param provider public Patch Plugin List Page I Project Provider provider super patch Plugin List NON NLS 1 this provider provider set Title PDE Plugin get Resource String PAGE TITLE set Description PDE Plugin get Resource String PAGE DESC  PatchPluginListPage IProjectProvider patchPluginList setTitle PDEPlugin getResourceString PAGE_TITLE setDescription PDEPlugin getResourceString PAGE_DESC
param page Name param title param title Image public Patch Plugin List Page String page Name String title Image Descriptor title Image super page Name title title Image  pageName titleImage PatchPluginListPage pageName ImageDescriptor titleImage pageName titleImage
I Structured Content Provider public Object get Elements Object parent return get Plugin Models  IStructuredContentProvider getElements getPluginModels
public Patch Plugin List Page super patch Plugin List Page NON NLS 1 set Title PDE Plugin get Resource String PAGE TITLE set Description PDE Plugin get Resource String PAGE DESC  PatchPluginListPage patchPluginListPage setTitle PDEPlugin getResourceString PAGE_TITLE setDescription PDEPlugin getResourceString PAGE_DESC
public void create Control Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout vertical Spacing 9 container set Layout layout table Part create Control container plugin Viewer table Part get Table Viewer plugin Viewer set Content Provider new Plugin Content Provider plugin Viewer set Label Provider PDE Plugin get Default get Label Provider plugin Viewer set Sorter List Util PLUGIN SORTER Grid Data gd Grid Data table Part get Control get Layout Data gd height Hint 250 plugin Viewer set Input PDE Core get Default get Workspace Model Manager table Part set Selection new Object 0 set Control container Dialog apply Dialog Font container Workbench Help set Help container I Help Context Ids NEW FEATURE REFERENCED PLUGINS  createControl GridLayout GridLayout numColumns verticalSpacing setLayout tablePart createControl pluginViewer tablePart getTableViewer pluginViewer setContentProvider PluginContentProvider pluginViewer setLabelProvider PDEPlugin getDefault getLabelProvider pluginViewer setSorter ListUtil PLUGIN_SORTER GridData GridData tablePart getControl getLayoutData heightHint pluginViewer setInput PDECore getDefault getWorkspaceModelManager tablePart setSelection setControl applyDialogFont WorkbenchHelp setHelp IHelpContextIds NEW_FEATURE_REFERENCED_PLUGINS
private Object get Plugin Models I Feature Model feature Model Feature Patch Provider provider get Feature To Patch if feature Model null return new Object 0 return feature Model get Feature get Plugins  getPluginModels IFeatureModel featureModel FeaturePatchProvider getFeatureToPatch featureModel featureModel getFeature getPlugins
public I Feature Plugin get Selected Plugins I Feature Model feature Model Feature Patch Provider provider get Feature To Patch if feature Model null return new I Feature Plugin 0 Object result table Part get Selection I Feature Plugin plugins new I Feature Plugin result length for int i 0 i plugins length i plugins i I Feature Plugin result i return plugins  IFeaturePlugin getSelectedPlugins IFeatureModel featureModel FeaturePatchProvider getFeatureToPatch featureModel IFeaturePlugin tablePart getSelection IFeaturePlugin IFeaturePlugin IFeaturePlugin
public void set Visible boolean visible if visible true plugin Viewer refresh super set Visible visible  setVisible pluginViewer setVisible

public Patch Spec Page Wizard New Project Creation Page main Page super main Page true set Title PDE Plugin get Resource String Patch Spec title NON NLS 1 set Description PDE Plugin get Resource String Patch Spec desc NON NLS 1  PatchSpecPage WizardNewProjectCreationPage mainPage mainPage setTitle PDEPlugin getResourceString PatchSpec setDescription PDEPlugin getResourceString PatchSpec
protected void initialize if is Initialized return String project Name main Page get Project Name if initial Id null patch Id Text set Text compute Initial Id project Name if initial Name null patch Name Text set Text project Name set Error Message null super initialize  isInitialized projectName mainPage getProjectName initialId patchIdText setText computeInitialId projectName initialName patchNameText setText projectName setErrorMessage
protected void verify Complete String message verify Id Rules if message null set Page Complete false set Error Message message return message verify Version if message null set Page Complete false set Error Message message return if custom Choice get Selection library Text get Text length 0 set Page Complete false set Error Message PDE Plugin get Resource String KEY LIBRARY MISSING return I Feature Model feature Models get All Feature Models for int i 0 i feature Models length i I Feature feature feature Models i get Feature if feature get Id equals feature Id Text get Text feature get Version equals feature Version Text get Text f Feature To Patch feature get Model set Message null set Page Complete true set Error Message null return f Feature To Patch null set Message PDE Plugin get Formatted Message New Feature Patch Spec Page not Found feature Id Text get Text Dialog Page WARNING NON NLS 1 set Error Message null get Container update Buttons return  verifyComplete verifyIdRules setPageComplete setErrorMessage verifyVersion setPageComplete setErrorMessage customChoice getSelection libraryText getText setPageComplete setErrorMessage PDEPlugin getResourceString KEY_LIBRARY_MISSING IFeatureModel featureModels getAllFeatureModels featureModels IFeature featureModels getFeature getId featureIdText getText getVersion featureVersionText getText fFeatureToPatch getModel setMessage setPageComplete setErrorMessage fFeatureToPatch setMessage PDEPlugin getFormattedMessage NewFeaturePatch SpecPage notFound featureIdText getText DialogPage setErrorMessage getContainer updateButtons
public I Wizard Page get Next Page if f Feature To Patch null return null return super get Next Page  IWizardPage getNextPage fFeatureToPatch getNextPage
private String get Patch Id if patch Id Text null return NON NLS 1 return patch Id Text get Text  getPatchId patchIdText patchIdText getText
private String get Patch Name if patch Name Text null return NON NLS 1 return patch Name Text get Text  getPatchName patchNameText patchNameText getText
private String get Patch Provider if patch Provider Text null return NON NLS 1 return patch Provider Text get Text  getPatchProvider patchProviderText patchProviderText getText
public Feature Data get Feature Data Feature Data data new Feature Data data id get Patch Id data version 1 0 0 NON NLS 1 data provider get Patch Provider data name get Patch Name data library get Install Handler Library data has Custom Handler custom Choice get Selection data is Patch true data feature To Patch Id feature Id Text get Text data feature To Patch Version feature Version Text get Text return data  FeatureData getFeatureData FeatureData FeatureData getPatchId getPatchProvider getPatchName getInstallHandlerLibrary hasCustomHandler customChoice getSelection isPatch featureToPatchId featureIdText getText featureToPatchVersion featureVersionText getText
protected String verify Id Rules String problem Text PDE Plugin get Resource String KEY INVALID ID String name patch Id Text get Text if name null name length 0 return PDE Plugin get Resource String KEY PMISSING String Tokenizer stok new String Tokenizer name NON NLS 1 while stok has More Tokens String token stok next Token for int i 0 i token length i if Character is Letter Or Digit token char At i false return problem Text return super verify Id Rules  verifyIdRules problemText PDEPlugin getResourceString KEY_INVALID_ID patchIdText getText PDEPlugin getResourceString KEY_PMISSING StringTokenizer StringTokenizer hasMoreTokens nextToken isLetterOrDigit charAt problemText verifyIdRules
public void set Visible boolean visible super set Visible visible if visible initialize is Initialized true patch Id Text set Focus  setVisible setVisible isInitialized patchIdText setFocus

extends Default Content Provider implements I Structured Content Provider public Object get Elements Object parent return get Plugin Models  DefaultContentProvider IStructuredContentProvider getElements getPluginModels
public Plugin List Page super plugin List Page NON NLS 1 set Title PDE Plugin get Resource String PAGE TITLE set Description PDE Plugin get Resource String PAGE DESC  PluginListPage pluginListPage setTitle PDEPlugin getResourceString PAGE_TITLE setDescription PDEPlugin getResourceString PAGE_DESC
public void create Control Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout vertical Spacing 9 container set Layout layout table Part create Control container Checkbox Table Viewer plugin Viewer table Part get Table Viewer plugin Viewer set Content Provider new Plugin Content Provider plugin Viewer set Label Provider PDE Plugin get Default get Label Provider plugin Viewer set Sorter List Util PLUGIN SORTER Grid Data gd Grid Data table Part get Control get Layout Data gd height Hint 250 plugin Viewer set Input PDE Core get Default get Workspace Model Manager table Part set Selection new Object 0 set Control container Dialog apply Dialog Font container Workbench Help set Help container I Help Context Ids NEW FEATURE REFERENCED PLUGINS  createControl GridLayout GridLayout numColumns verticalSpacing setLayout tablePart createControl CheckboxTableViewer pluginViewer tablePart getTableViewer pluginViewer setContentProvider PluginContentProvider pluginViewer setLabelProvider PDEPlugin getDefault getLabelProvider pluginViewer setSorter ListUtil PLUGIN_SORTER GridData GridData tablePart getControl getLayoutData heightHint pluginViewer setInput PDECore getDefault getWorkspaceModelManager tablePart setSelection setControl applyDialogFont WorkbenchHelp setHelp IHelpContextIds NEW_FEATURE_REFERENCED_PLUGINS
private Object get Plugin Models if models null Workspace Model Manager manager PDE Core get Default get Workspace Model Manager I Plugin Model workspace Models manager get Plugin Models I Fragment Model fragment Models manager get Fragment Models models new I Plugin Model Base workspace Models length fragment Models length System arraycopy workspace Models 0 models 0 workspace Models length System arraycopy fragment Models 0 models workspace Models length fragment Models length return models  getPluginModels WorkspaceModelManager PDECore getDefault getWorkspaceModelManager IPluginModel workspaceModels getPluginModels IFragmentModel fragmentModels getFragmentModels IPluginModelBase workspaceModels fragmentModels workspaceModels workspaceModels fragmentModels workspaceModels fragmentModels
public I Plugin Base get Selected Plugins Object result table Part get Selection I Plugin Base plugins new I Plugin Base result length for int i 0 i result length i I Plugin Model Base model I Plugin Model Base result i plugins i model get Plugin Base return plugins  IPluginBase getSelectedPlugins tablePart getSelection IPluginBase IPluginBase IPluginModelBase IPluginModelBase getPluginBase

private I Container f Selected Container public Folder Selection Dialog Shell parent I Label Provider label Provider I Tree Content Provider content Provider super parent label Provider content Provider set Sorter new Resource Sorter Resource Sorter NAME  IContainer fSelectedContainer FolderSelectionDialog ILabelProvider labelProvider ITreeContentProvider contentProvider labelProvider contentProvider setSorter ResourceSorter ResourceSorter
protected Control create Dialog Area Composite parent Composite result Composite super create Dialog Area parent get Tree Viewer add Selection Changed Listener this get Tree Viewer expand To Level 2 Button button new Button result SWT PUSH button set Text PDE Plugin get Resource String Build Editor Source Folder Selection Dialog button NON NLS 1 button add Selection Listener new Selection Adapter public void widget Selected Selection Event event new Folder Button Pressed button set Font parent get Font Grid Data data new Grid Data data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT button set Layout Data data f New Folder Button button apply Dialog Font result return result  createDialogArea createDialogArea getTreeViewer addSelectionChangedListener getTreeViewer expandToLevel setText PDEPlugin getResourceString BuildEditor SourceFolderSelectionDialog addSelectionListener SelectionAdapter widgetSelected SelectionEvent newFolderButtonPressed setFont getFont GridData GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT setLayoutData fNewFolderButton applyDialogFont
private void update New Folder Button State I Structured Selection selection I Structured Selection get Tree Viewer get Selection f Selected Container null if selection size 1 Object first selection get First Element if first instanceof I Container f Selected Container I Container first f New Folder Button set Enabled f Selected Container null  updateNewFolderButtonState IStructuredSelection IStructuredSelection getTreeViewer getSelection fSelectedContainer getFirstElement IContainer fSelectedContainer IContainer fNewFolderButton setEnabled fSelectedContainer
protected void new Folder Button Pressed New Folder Dialog dialog new New Folder Dialog get Shell f Selected Container if dialog open Window OK Tree Viewer tree Viewer get Tree Viewer tree Viewer refresh f Selected Container Object created Folder if dialog get Result null created Folder dialog get Result 0 tree Viewer reveal created Folder tree Viewer set Selection new Structured Selection created Folder  newFolderButtonPressed NewFolderDialog NewFolderDialog getShell fSelectedContainer TreeViewer treeViewer getTreeViewer treeViewer fSelectedContainer createdFolder getResult createdFolder getResult treeViewer createdFolder treeViewer setSelection StructuredSelection createdFolder
see org eclipse jface viewers I Selection Changed Listener selection Changed org eclipse jface viewers Selection Changed Event public void selection Changed Selection Changed Event event update New Folder Button State  ISelectionChangedListener selectionChanged SelectionChangedEvent selectionChanged SelectionChangedEvent updateNewFolderButtonState

public interface I Default Value Consumer Initializes the consumer with the values param values  IDefaultValueConsumer
void init Dictionary values Returns the default value for the given key param key return the default value or code null code if not provided 

extends Default Content Provider implements I Structured Content Provider public Object get Elements Object element return new Object 0  DefaultContentProvider IStructuredContentProvider getElements
public Base Import Wizard Second Page String page Name Plugin Import Wizard First Page page super page Name this page1 page PDE Plugin get Default get Label Provider connect this PDE Core get Default get External Model Manager add Model Provider Listener this  BaseImportWizardSecondPage pageName PluginImportWizardFirstPage pageName PDEPlugin getDefault getLabelProvider PDECore getDefault getExternalModelManager addModelProviderListener
protected Composite create Import List Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 container set Layout layout container set Layout Data new Grid Data Grid Data FILL BOTH Label label new Label container SWT NONE label set Text PDE Plugin get Resource String Import Wizard Detailed Page import List NON NLS 1 Table table new Table container SWT BORDER SWT MULTI SWT V SCROLL Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint 225 gd height Hint 200 table set Layout Data gd import List Viewer new Table Viewer table import List Viewer set Label Provider PDE Plugin get Default get Label Provider import List Viewer set Content Provider new Content Provider import List Viewer set Input PDE Core get Default get External Model Manager import List Viewer set Sorter List Util PLUGIN SORTER return container  createImportList GridLayout GridLayout marginWidth marginHeight setLayout setLayoutData GridData GridData FILL_BOTH setText PDEPlugin getResourceString ImportWizard DetailedPage importList V_SCROLL GridData GridData GridData FILL_BOTH widthHint heightHint setLayoutData importListViewer TableViewer importListViewer setLabelProvider PDEPlugin getDefault getLabelProvider importListViewer setContentProvider ContentProvider importListViewer setInput PDECore getDefault getExternalModelManager importListViewer setSorter ListUtil PLUGIN_SORTER
protected Composite create Computations Option Composite parent Composite composite new Composite parent SWT NONE composite set Layout new Grid Layout add Fragments Button new Button composite SWT CHECK add Fragments Button set Text PDE Plugin get Resource String Import Wizard Second Page add Fragments NON NLS 1 add Fragments Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL if get Dialog Settings get SETTINGS ADD FRAGMENTS null add Fragments Button set Selection get Dialog Settings get Boolean SETTINGS ADD FRAGMENTS else add Fragments Button set Selection true return composite  createComputationsOption setLayout GridLayout addFragmentsButton addFragmentsButton setText PDEPlugin getResourceString ImportWizard SecondPage addFragments addFragmentsButton setLayoutData GridData GridData FILL_HORIZONTAL getDialogSettings SETTINGS_ADD_FRAGMENTS addFragmentsButton setSelection getDialogSettings getBoolean SETTINGS_ADD_FRAGMENTS addFragmentsButton setSelection
public void dispose PDE Plugin get Default get Label Provider disconnect this PDE Core get Default get External Model Manager remove Model Provider Listener this  PDEPlugin getDefault getLabelProvider PDECore getDefault getExternalModelManager removeModelProviderListener
public void set Visible boolean visible super set Visible visible if visible is Refresh Needed models page1 get Models refresh Page  setVisible setVisible isRefreshNeeded getModels refreshPage
protected abstract void refresh Page  refreshPage
protected boolean is Refresh Needed if f Refresh Needed f Refresh Needed false location page1 get Drop Location return true String curr Location page1 get Drop Location if location null location equals curr Location location page1 get Drop Location return true return false  isRefreshNeeded fRefreshNeeded fRefreshNeeded getDropLocation currLocation getDropLocation currLocation getDropLocation
private I Plugin Model Base find Model String id for int i 0 i models length i String model Id models i get Plugin Base get Id if model Id null model Id equals id return models i return null  IPluginModelBase findModel modelId getPluginBase getId modelId modelId
private I Fragment Model find Fragments I Plugin plugin Array List result new Array List for int i 0 i models length i if models i instanceof I Fragment Model I Fragment fragment I Fragment Model models i get Fragment if plugin get Id equals Ignore Case fragment get Plugin Id result add models i return I Fragment Model result to Array new I Fragment Model result size  IFragmentModel findFragments IPlugin ArrayList ArrayList IFragmentModel IFragment IFragmentModel getFragment getId equalsIgnoreCase getPluginId IFragmentModel toArray IFragmentModel
protected void add Plugin And Dependencies I Plugin Model Base model Array List selected boolean add Fragments boolean contains Variable false if selected contains model selected add model if add Fragments model instanceof I Plugin Model I Plugin Library libraries model get Plugin Base get Libraries for int i 0 i libraries length i if Classpath Util Core contains Variables libraries i get Name contains Variable true break add Dependencies model selected add Fragments contains Variable  addPluginAndDependencies IPluginModelBase ArrayList addFragments containsVariable addFragments IPluginModel IPluginLibrary getPluginBase getLibraries ClasspathUtilCore containsVariables getName containsVariable addDependencies addFragments containsVariable
protected void add Dependencies I Plugin Model Base model Array List selected boolean add Fragments I Plugin Import required model get Plugin Base get Imports if required length 0 for int i 0 i required length i I Plugin Model Base found find Model required i get Id if found null add Plugin And Dependencies found selected add Fragments if add Fragments if model instanceof I Plugin Model I Fragment Model fragments find Fragments I Plugin Model model get Plugin for int i 0 i fragments length i add Plugin And Dependencies fragments i selected add Fragments else I Fragment fragment I Fragment Model model get Fragment I Plugin Model Base found find Model fragment get Plugin Id if found null add Plugin And Dependencies found selected add Fragments  addDependencies IPluginModelBase ArrayList addFragments IPluginImport getPluginBase getImports IPluginModelBase findModel getId addPluginAndDependencies addFragments addFragments IPluginModel IFragmentModel findFragments IPluginModel getPlugin addPluginAndDependencies addFragments IFragment IFragmentModel getFragment IPluginModelBase findModel getPluginId addPluginAndDependencies addFragments
public I Plugin Model Base get Models To Import Table Item items import List Viewer get Table get Items Array List result new Array List for int i 0 i items length i result add items i get Data return I Plugin Model Base result to Array new I Plugin Model Base result size  IPluginModelBase getModelsToImport TableItem importListViewer getTable getItems ArrayList ArrayList getData IPluginModelBase toArray IPluginModelBase
public void store Settings I Dialog Settings settings get Dialog Settings settings put SETTINGS ADD FRAGMENTS add Fragments Button get Selection  storeSettings IDialogSettings getDialogSettings SETTINGS_ADD_FRAGMENTS addFragmentsButton getSelection
see org eclipse pde core I Model Provider Listener models Changed org eclipse pde core I Model Provider Event public void models Changed I Model Provider Event event f Refresh Needed true  IModelProviderListener modelsChanged IModelProviderEvent modelsChanged IModelProviderEvent fRefreshNeeded

Constructor for Binary Project Filter public Binary Project Filter super  BinaryProjectFilter BinaryProjectFilter
see Viewer Filter select Viewer Object Object public boolean select Viewer viewer Object parent Element Object element I Project project null if element instanceof I Java Project project I Java Project element get Project else if element instanceof I Project project I Project element if project null if is Plugin Project project is Feature Project project return is Binary project return true  ViewerFilter parentElement IProject IJavaProject IJavaProject getProject IProject IProject isPluginProject isFeatureProject isBinary
private boolean is Plugin Project I Project project if project is Open false return false return project exists new Path plugin xml NON NLS 1 project exists new Path fragment xml project exists new Path META INF MANIFEST MF NON NLS 1 NON NLS 2  isPluginProject IProject isOpen
private boolean is Feature Project I Project project if project is Open false return false return project exists new Path feature xml NON NLS 1  isFeatureProject IProject isOpen
private boolean is Binary I Project project try String binary project get Persistent Property PDE Core EXTERNAL PROJECT PROPERTY if binary null Repository Provider provider Repository Provider get Provider project return provider null provider instanceof Binary Repository Provider catch Core Exception e PDE Core log Exception e return false  isBinary IProject getPersistentProperty PDECore EXTERNAL_PROJECT_PROPERTY RepositoryProvider RepositoryProvider getProvider BinaryRepositoryProvider CoreException PDECore logException

public static final int YES 2 Do the callback Returns YES NO or CANCEL int do Query I Project project  doQuery IProject
public Feature Import Operation I Feature Model models I Path target Path I Replace Query replace Query f Models models f Target Path target Path f Root Resources Plugin get Workspace get Root f Replace Query replace Query  FeatureImportOperation IFeatureModel IPath targetPath IReplaceQuery replaceQuery fModels fTargetPath targetPath fRoot ResourcesPlugin getWorkspace getRoot fReplaceQuery replaceQuery
public void run I Progress Monitor monitor throws Core Exception Operation Canceled Exception if monitor null monitor new Null Progress Monitor monitor begin Task PDE Plugin get Resource String Feature Import Wizard operation creating NON NLS 1 f Models length try Multi Status multi Status new Multi Status PDE Plugin get Plugin Id I Status OK PDE Plugin get Resource String Feature Import Wizard operation multi Problem NON NLS 1 null for int i 0 i f Models length i try create Project f Models i new Sub Progress Monitor monitor 1 catch Core Exception e multi Status merge e get Status if monitor is Canceled throw new Operation Canceled Exception if multi Status isOK throw new Core Exception multi Status finally monitor done  IProgressMonitor CoreException OperationCanceledException NullProgressMonitor beginTask PDEPlugin getResourceString FeatureImportWizard fModels MultiStatus multiStatus MultiStatus PDEPlugin getPluginId IStatus PDEPlugin getResourceString FeatureImportWizard multiProblem fModels createProject fModels SubProgressMonitor CoreException multiStatus getStatus isCanceled OperationCanceledException multiStatus CoreException multiStatus
private void create Project I Feature Model model I Progress Monitor monitor throws Core Exception String name model get Feature get Id feature NON NLS 1 String task PDE Plugin get Formatted Message Feature Import Wizard operation creating2 NON NLS 1 name monitor begin Task task 8 try I Project project f Root get Project name if project exists if query Replace project project delete true true new Sub Progress Monitor monitor 1 try Repository Provider unmap project catch Team Exception e else return else monitor worked 1 I Project Description description PDE Plugin get Workspace new Project Description name description set Location f Target Path append name project create description new Sub Progress Monitor monitor 1 if project is Open project open null File feature Dir new File model get Install Location import Content feature Dir project get Full Path File System Structure Provider INSTANCE null new Sub Progress Monitor monitor 1 Mark this project so that we can show image overlay using the label decorator project set Persistent Property PDE Core EXTERNAL PROJECT PROPERTY PDE Core BINARY PROJECT VALUE set Project Natures project model monitor finally monitor done  createProject IFeatureModel IProgressMonitor CoreException getFeature getId PDEPlugin getFormattedMessage FeatureImportWizard beginTask IProject fRoot getProject queryReplace SubProgressMonitor RepositoryProvider TeamException IProjectDescription PDEPlugin getWorkspace newProjectDescription setLocation fTargetPath SubProgressMonitor isOpen featureDir getInstallLocation importContent featureDir getFullPath FileSystemStructureProvider SubProgressMonitor setPersistentProperty PDECore EXTERNAL_PROJECT_PROPERTY PDECore BINARY_PROJECT_VALUE setProjectNatures
throws Core Exception I Overwrite Query query new I Overwrite Query public String query Overwrite String file return ALL  CoreException IOverwriteQuery IOverwriteQuery queryOverwrite
private void import Content Object source I Path dest Path I Import Structure Provider provider List files To Import I Progress Monitor monitor throws Core Exception I Overwrite Query query new I Overwrite Query public String query Overwrite String file return ALL Import Operation op new Import Operation dest Path source provider query op set Create Container Structure false if files To Import null op set Files To Import files To Import try op run monitor catch Invocation Target Exception e Throwable th e get Target Exception if th instanceof Core Exception throw Core Exception th I Status status new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR e get Message e throw new Core Exception status catch Interrupted Exception e throw new Operation Canceled Exception e get Message  importContent IPath destPath IImportStructureProvider filesToImport IProgressMonitor CoreException IOverwriteQuery IOverwriteQuery queryOverwrite ImportOperation ImportOperation destPath setCreateContainerStructure filesToImport setFilesToImport filesToImport InvocationTargetException getTargetException CoreException CoreException IStatus IStatus PDEPlugin getPluginId IStatus getMessage CoreException InterruptedException OperationCanceledException getMessage
private boolean query Replace I Project project throws Operation Canceled Exception switch f Replace Query do Query project case I Replace Query CANCEL throw new Operation Canceled Exception case I Replace Query NO return false return true  queryReplace IProject OperationCanceledException fReplaceQuery doQuery IReplaceQuery OperationCanceledException IReplaceQuery
private void set Project Natures I Project project I Feature Model model I Progress Monitor monitor throws Core Exception I Project Description desc project get Description if model get Feature get Install Handler null desc set Nature Ids new String Java Core NATURE ID PDE FEATURE NATURE I Java Project j Project Java Core create project j Project set Raw Classpath new I Classpath Entry Java Core new Container Entry new Path org eclipse jdt launching JRE CONTAINER NON NLS 1 monitor else desc set Nature Ids new String PDE FEATURE NATURE project set Description desc new Sub Progress Monitor monitor 1  setProjectNatures IProject IFeatureModel IProgressMonitor CoreException IProjectDescription getDescription getFeature getInstallHandler setNatureIds JavaCore NATURE_ID FEATURE_NATURE IJavaProject jProject JavaCore jProject setRawClasspath IClasspathEntry JavaCore newContainerEntry JRE_CONTAINER setNatureIds FEATURE_NATURE setDescription SubProgressMonitor

public Feature Import Wizard I Dialog Settings master Settings PDE Plugin get Default get Dialog Settings set Dialog Settings get Settings Section master Settings set Default Page Image Descriptor PDE Plugin Images DESC FEATURE IMPORT WIZ set Window Title PDE Plugin get Resource String Feature Import Wizard title NON NLS 1  FeatureImportWizard IDialogSettings masterSettings PDEPlugin getDefault getDialogSettings setDialogSettings getSettingsSection masterSettings setDefaultPageImageDescriptor PDEPluginImages DESC_FEATURE_IMPORT_WIZ setWindowTitle PDEPlugin getResourceString FeatureImportWizard
see I Workbench Wizard init I Workbench I Structured Selection public void init I Workbench workbench I Structured Selection selection  IWorkbenchWizard IWorkbench IStructuredSelection IWorkbench IStructuredSelection
public void add Pages set Needs Progress Monitor true f Page1 new Feature Import Wizard First Page add Page f Page1 f Page2 new Feature Import Wizard Detailed Page f Page1 add Page f Page2  addPages setNeedsProgressMonitor fPage1 FeatureImportWizardFirstPage addPage fPage1 fPage2 FeatureImportWizardDetailedPage fPage1 addPage fPage2
private I Dialog Settings get Settings Section I Dialog Settings master I Dialog Settings setting master get Section STORE SECTION if setting null setting master add New Section STORE SECTION return setting  IDialogSettings getSettingsSection IDialogSettings IDialogSettings getSection STORE_SECTION addNewSection STORE_SECTION
public boolean perform Finish try final I Feature Model models f Page2 get Selected Models f Page1 store Settings true I Path target Path compute Target Path I Runnable With Progress op get Import Operation get Shell models target Path get Container run true true op catch Interrupted Exception e return false catch Invocation Target Exception e PDE Plugin log Exception e return true exception handled return true  performFinish IFeatureModel fPage2 getSelectedModels fPage1 storeSettings IPath targetPath computeTargetPath IRunnableWithProgress getImportOperation getShell targetPath getContainer InterruptedException InvocationTargetException PDEPlugin logException
private I Path compute Target Path I Path plugins Location PDE Plugin get Workspace get Root get Location return plugins Location remove Last Segments 1 append features NON NLS 1  IPath computeTargetPath IPath pluginsLocation PDEPlugin getWorkspace getRoot getLocation pluginsLocation removeLastSegments
return new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I Replace Query query new Replace Query shell Feature Import Operation op new Feature Import Operation models target Path query PDE Plugin get Workspace run op monitor catch Core Exception e throw new Invocation Target Exception e catch Operation Canceled Exception e throw new Interrupted Exception e get Message finally monitor done  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException IReplaceQuery ReplaceQuery FeatureImportOperation FeatureImportOperation targetPath PDEPlugin getWorkspace CoreException InvocationTargetException OperationCanceledException InterruptedException getMessage
public static I Runnable With Progress get Import Operation final Shell shell final I Feature Model models final I Path target Path return new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I Replace Query query new Replace Query shell Feature Import Operation op new Feature Import Operation models target Path query PDE Plugin get Workspace run op monitor catch Core Exception e throw new Invocation Target Exception e catch Operation Canceled Exception e throw new Interrupted Exception e get Message finally monitor done  IRunnableWithProgress getImportOperation IFeatureModel IPath targetPath IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException IReplaceQuery ReplaceQuery FeatureImportOperation FeatureImportOperation targetPath PDEPlugin getWorkspace CoreException InvocationTargetException OperationCanceledException InterruptedException getMessage
private static class Replace Dialog extends Message Dialog public Replace Dialog Shell parent Shell String dialog Message super parent Shell PDE Plugin get Resource String KEY MESSAGES TITLE null dialog Message Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants YES TO ALL LABEL I Dialog Constants NO LABEL PDE Plugin get Resource String Feature Import Wizard no To All NON NLS 1 I Dialog Constants CANCEL LABEL 0  ReplaceDialog MessageDialog ReplaceDialog parentShell dialogMessage parentShell PDEPlugin getResourceString KEY_MESSAGES_TITLE dialogMessage MessageDialog IDialogConstants YES_LABEL IDialogConstants YES_TO_ALL_LABEL IDialogConstants NO_LABEL PDEPlugin getResourceString FeatureImportWizard noToAll IDialogConstants CANCEL_LABEL
private static class Replace Query implements I Replace Query private Shell shell public Replace Query Shell shell this shell shell  ReplaceQuery IReplaceQuery ReplaceQuery
shell get Display sync Exec new Runnable public void run Replace Dialog dialog new Replace Dialog shell message int ret Val dialog open if ret Val 0 result 0 RETURNCODES ret Val if ret Val 1 yes To All 1 else if ret Val 3 yes To All 1  getDisplay syncExec ReplaceDialog ReplaceDialog retVal retVal retVal retVal yesToAll retVal yesToAll
public int do Query I Project project if yes To All 0 return yes To All 0 I Replace Query YES I Replace Query NO final String message PDE Plugin get Formatted Message Feature Import Wizard messages exists NON NLS 1 project get Name final int result I Replace Query CANCEL shell get Display sync Exec new Runnable public void run Replace Dialog dialog new Replace Dialog shell message int ret Val dialog open if ret Val 0 result 0 RETURNCODES ret Val if ret Val 1 yes To All 1 else if ret Val 3 yes To All 1 return result 0  doQuery IProject yesToAll yesToAll IReplaceQuery IReplaceQuery PDEPlugin getFormattedMessage FeatureImportWizard getName IReplaceQuery getDisplay syncExec ReplaceDialog ReplaceDialog retVal retVal retVal retVal yesToAll retVal yesToAll

extends Default Content Provider implements I Structured Content Provider public Object get Elements Object parent return get Models  DefaultContentProvider IStructuredContentProvider getElements getModels
class Table Part extends Wizard Checkbox Table Part public Table Part String main Label super main Label  TablePart WizardCheckboxTablePart TablePart mainLabel mainLabel
public void update Counter int count super update Counter count dialog Changed  updateCounter updateCounter dialogChanged
protected Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit Structured Viewer viewer super create Structured Viewer parent style toolkit viewer set Sorter List Util FEATURE SORTER return viewer  StructuredViewer createStructuredViewer FormToolkit StructuredViewer createStructuredViewer setSorter ListUtil FEATURE_SORTER
public Feature Import Wizard Detailed Page Feature Import Wizard First Page first Page super Feature Import Wizard Detailed Page NON NLS 1 set Title PDE Plugin get Resource String Feature Import Wizard Detailed Page title NON NLS 1 set Description PDE Plugin get Resource String Feature Import Wizard Detailed Page desc NON NLS 1 f First Page first Page f Drop Location null f Table Part new Table Part PDE Plugin get Resource String Feature Import Wizard Detailed Page feature List NON NLS 1 PDE Plugin get Default get Label Provider connect this  FeatureImportWizardDetailedPage FeatureImportWizardFirstPage firstPage FeatureImportWizardDetailedPage setTitle PDEPlugin getResourceString FeatureImportWizard DetailedPage setDescription PDEPlugin getResourceString FeatureImportWizard DetailedPage fFirstPage firstPage fDropLocation fTablePart TablePart PDEPlugin getResourceString FeatureImportWizard DetailedPage featureList PDEPlugin getDefault getLabelProvider
async Exec new Runnable public void run f Feature Viewer set Input PDE Plugin get Default if get Models null f Feature Viewer set Checked Elements get Models f Table Part update Counter get Models length  asyncExec fFeatureViewer setInput PDEPlugin getDefault getModels fFeatureViewer setCheckedElements getModels fTablePart updateCounter getModels
I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor monitor begin Task PDE Plugin get Resource String Feature Import Wizard messages updating NON NLS 1 I Progress Monitor UNKNOWN f Feature Viewer get Control get Display async Exec new Runnable public void run f Feature Viewer set Input PDE Plugin get Default if get Models null f Feature Viewer set Checked Elements get Models f Table Part update Counter get Models length monitor done  IRunnableWithProgress IRunnableWithProgress IProgressMonitor beginTask PDEPlugin getResourceString FeatureImportWizard IProgressMonitor fFeatureViewer getControl getDisplay asyncExec fFeatureViewer setInput PDEPlugin getDefault getModels fFeatureViewer setCheckedElements getModels fTablePart updateCounter getModels
private void initialize Fields I Path drop Location if drop Location equals this f Drop Location this f Drop Location drop Location f Models null if f Models null get Models force loading I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor monitor begin Task PDE Plugin get Resource String Feature Import Wizard messages updating NON NLS 1 I Progress Monitor UNKNOWN f Feature Viewer get Control get Display async Exec new Runnable public void run f Feature Viewer set Input PDE Plugin get Default if get Models null f Feature Viewer set Checked Elements get Models f Table Part update Counter get Models length monitor done try get Container run true false op catch Interrupted Exception e catch Invocation Target Exception e PDE Plugin log Exception e finally dialog Changed tree Part update Counter 0  initializeFields IPath dropLocation dropLocation fDropLocation fDropLocation dropLocation fModels fModels getModels IRunnableWithProgress IRunnableWithProgress IProgressMonitor beginTask PDEPlugin getResourceString FeatureImportWizard IProgressMonitor fFeatureViewer getControl getDisplay asyncExec fFeatureViewer setInput PDEPlugin getDefault getModels fFeatureViewer setCheckedElements getModels fTablePart updateCounter getModels getContainer InterruptedException InvocationTargetException PDEPlugin logException dialogChanged treePart updateCounter
public void set Visible boolean visible super set Visible visible if visible initialize Fields f First Page get Drop Location  setVisible setVisible initializeFields fFirstPage getDropLocation
public void create Control Composite parent initialize Dialog Units parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 5 container set Layout layout f Table Part create Control container f Feature Viewer Checkbox Table Viewer f Table Part get Table Viewer f Feature Viewer set Content Provider new Content Provider f Feature Viewer set Label Provider PDE Plugin get Default get Label Provider Grid Data gd Grid Data f Table Part get Control get Layout Data gd height Hint 300 gd width Hint 300 set Control container dialog Changed Dialog apply Dialog Font container Workbench Help set Help container I Help Context Ids FEATURE IMPORT SECOND PAGE  createControl initializeDialogUnits GridLayout GridLayout numColumns marginHeight marginWidth setLayout fTablePart createControl fFeatureViewer CheckboxTableViewer fTablePart getTableViewer fFeatureViewer setContentProvider ContentProvider fFeatureViewer setLabelProvider PDEPlugin getDefault getLabelProvider GridData GridData fTablePart getControl getLayoutData heightHint widthHint setControl dialogChanged applyDialogFont WorkbenchHelp setHelp IHelpContextIds FEATURE_IMPORT_SECOND_PAGE
public void dispose super dispose PDE Plugin get Default get Label Provider disconnect this  PDEPlugin getDefault getLabelProvider
I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception monitor begin Task PDE Plugin get Resource String Feature Import Wizard messages loading File NON NLS 1 I Progress Monitor UNKNOWN try Multi Status errors do Load Features result create Path home monitor if errors null errors get Children length 0 PDE Plugin log errors f Models I Feature Model result to Array new I Feature Model result size catch Core Exception e throw new Invocation Target Exception e finally monitor done  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException beginTask PDEPlugin getResourceString FeatureImportWizard loadingFile IProgressMonitor MultiStatus doLoadFeatures createPath getChildren PDEPlugin fModels IFeatureModel toArray IFeatureModel CoreException InvocationTargetException
public I Feature Model get Models if f Models null return f Models final Array List result new Array List final I Path home f Drop Location if home null I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception monitor begin Task PDE Plugin get Resource String Feature Import Wizard messages loading File NON NLS 1 I Progress Monitor UNKNOWN try Multi Status errors do Load Features result create Path home monitor if errors null errors get Children length 0 PDE Plugin log errors f Models I Feature Model result to Array new I Feature Model result size catch Core Exception e throw new Invocation Target Exception e finally monitor done try get Container run true false op catch Interrupted Exception e return null catch Invocation Target Exception e PDE Plugin log Exception e return f Models  IFeatureModel getModels fModels fModels ArrayList ArrayList IPath fDropLocation IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException beginTask PDEPlugin getResourceString FeatureImportWizard loadingFile IProgressMonitor MultiStatus doLoadFeatures createPath getChildren PDEPlugin fModels IFeatureModel toArray IFeatureModel CoreException InvocationTargetException getContainer InterruptedException InvocationTargetException PDEPlugin logException fModels
private File create Path I Path drop Location File features Dir new File drop Location to File features NON NLS 1 if features Dir exists return features Dir return null  createPath IPath dropLocation featuresDir dropLocation toFile featuresDir featuresDir
private Multi Status do Load Features Array List result File path I Progress Monitor monitor throws Core Exception if path null return null File dirs path list Files if dirs null return null monitor begin Task PDE Plugin get Resource String Feature Import Wizard Detailed Page loading dirs length NON NLS 1 Array List result Status new Array List for int i 0 i dirs length i File dir dirs i if dir is Directory File manifest new File dir feature xml NON NLS 1 if manifest exists I Status status do Load Feature dir manifest result if status null result Status add status monitor worked 1 if result Status null I Status children I Status result Status to Array new I Status result Status size Multi Status multi Status new Multi Status PDE Plugin PLUGIN ID I Status OK children PDE Plugin get Resource String Feature Import Wizard Detailed Page problems Loading NON NLS 1 null return multi Status return null  MultiStatus doLoadFeatures ArrayList IProgressMonitor CoreException listFiles beginTask PDEPlugin getResourceString FeatureImportWizard DetailedPage ArrayList resultStatus ArrayList isDirectory IStatus doLoadFeature resultStatus resultStatus IStatus IStatus resultStatus toArray IStatus resultStatus MultiStatus multiStatus MultiStatus PDEPlugin PLUGIN_ID IStatus PDEPlugin getResourceString FeatureImportWizard DetailedPage problemsLoading multiStatus
private I Status do Load Feature File dir File manifest Array List result External Feature Model model new External Feature Model model set Install Location dir get Absolute Path I Status status null Input Stream stream null try stream new File Input Stream manifest model load stream false catch Exception e Errors in the file status new Status I Status ERROR PDE Plugin PLUGIN ID I Status OK e get Message e if stream null try stream close catch IO Exception e if status null result add model return status  IStatus doLoadFeature ArrayList ExternalFeatureModel ExternalFeatureModel setInstallLocation getAbsolutePath IStatus InputStream FileInputStream IStatus PDEPlugin PLUGIN_ID IStatus getMessage IOException
public I Feature Model get Selected Models Object selected f Feature Viewer get Checked Elements I Feature Model result new I Feature Model selected length System arraycopy selected 0 result 0 selected length return result  IFeatureModel getSelectedModels fFeatureViewer getCheckedElements IFeatureModel IFeatureModel
private void dialog Changed String message null if f Feature Viewer null f Feature Viewer get Table get Item Count 0 message PDE Plugin get Resource String Feature Import Wizard messages no Features NON NLS 1 set Message message Wizard Page INFORMATION set Page Complete f Table Part get Selection Count 0  dialogChanged fFeatureViewer fFeatureViewer getTable getItemCount PDEPlugin getResourceString FeatureImportWizard noFeatures setMessage WizardPage setPageComplete fTablePart getSelectionCount
see org eclipse jface wizard Wizard Page is Page Complete public boolean is Page Complete return f Table Part get Selection Count 0  WizardPage isPageComplete isPageComplete fTablePart getSelectionCount

public Feature Import Wizard First Page super Feature Import Wizard Page NON NLS 1 set Title PDE Plugin get Resource String Feature Import Wizard First Page title NON NLS 1 set Description PDE Plugin get Resource String Feature Import Wizard First Page desc NON NLS 1  FeatureImportWizardFirstPage FeatureImportWizardPage setTitle PDEPlugin getResourceString FeatureImportWizard FirstPage setDescription PDEPlugin getResourceString FeatureImportWizard FirstPage
f Browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Path chosen choose Drop Location if chosen null f Drop Location set Text chosen toOS String  fBrowseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent IPath chooseDropLocation fDropLocation setText toOSString
public void create Control Composite parent initialize Dialog Units parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 composite set Layout layout f Runtime Location Button new Button composite SWT CHECK fill Horizontal f Runtime Location Button 3 false f Runtime Location Button set Text PDE Plugin get Resource String Feature Import Wizard First Page runtime Location NON NLS 1 f Other Location Label new Label composite SWT NULL f Other Location Label set Text PDE Plugin get Resource String Feature Import Wizard First Page other Folder NON NLS 1 f Drop Location new Combo composite SWT DROP DOWN fill Horizontal f Drop Location 1 true f Browse Button new Button composite SWT PUSH f Browse Button set Text PDE Plugin get Resource String Feature Import Wizard First Page browse NON NLS 1 f Browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Path chosen choose Drop Location if chosen null f Drop Location set Text chosen toOS String f Browse Button set Layout Data new Grid Data SWT Util set Button Dimension Hint f Browse Button initialize Fields get Dialog Settings hook Listeners set Control composite Dialog apply Dialog Font composite Workbench Help set Help composite I Help Context Ids FEATURE IMPORT FIRST PAGE  createControl initializeDialogUnits GridLayout GridLayout numColumns setLayout fRuntimeLocationButton fillHorizontal fRuntimeLocationButton fRuntimeLocationButton setText PDEPlugin getResourceString FeatureImportWizard FirstPage runtimeLocation fOtherLocationLabel fOtherLocationLabel setText PDEPlugin getResourceString FeatureImportWizard FirstPage otherFolder fDropLocation DROP_DOWN fillHorizontal fDropLocation fBrowseButton fBrowseButton setText PDEPlugin getResourceString FeatureImportWizard FirstPage fBrowseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent IPath chooseDropLocation fDropLocation setText toOSString fBrowseButton setLayoutData GridData SWTUtil setButtonDimensionHint fBrowseButton initializeFields getDialogSettings hookListeners setControl applyDialogFont WorkbenchHelp setHelp IHelpContextIds FEATURE_IMPORT_FIRST_PAGE
private String get Target Home Preferences preferences PDE Core get Default get Plugin Preferences return preferences get String I Core Constants PLATFORM PATH  getTargetHome PDECore getDefault getPluginPreferences getString ICoreConstants PLATFORM_PATH
f Runtime Location Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e set Other Enabled f Runtime Location Button get Selection validate Drop Location if f Runtime Location Button get Selection f Drop Location set Text get Target Home  fRuntimeLocationButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setOtherEnabled fRuntimeLocationButton getSelection validateDropLocation fRuntimeLocationButton getSelection fDropLocation setText getTargetHome
f Drop Location add Selection Listener new Selection Adapter public void widget Selected Selection Event e validate Drop Location  fDropLocation addSelectionListener SelectionAdapter widgetSelected SelectionEvent validateDropLocation
f Drop Location add Modify Listener new Modify Listener public void modify Text Modify Event e validate Drop Location  fDropLocation addModifyListener ModifyListener modifyText ModifyEvent validateDropLocation
private void hook Listeners f Runtime Location Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e set Other Enabled f Runtime Location Button get Selection validate Drop Location if f Runtime Location Button get Selection f Drop Location set Text get Target Home f Drop Location add Selection Listener new Selection Adapter public void widget Selected Selection Event e validate Drop Location f Drop Location add Modify Listener new Modify Listener public void modify Text Modify Event e validate Drop Location  hookListeners fRuntimeLocationButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setOtherEnabled fRuntimeLocationButton getSelection validateDropLocation fRuntimeLocationButton getSelection fDropLocation setText getTargetHome fDropLocation addSelectionListener SelectionAdapter widgetSelected SelectionEvent validateDropLocation fDropLocation addModifyListener ModifyListener modifyText ModifyEvent validateDropLocation
private Grid Data fill Horizontal Control control int span boolean grab Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span span gd grab Excess Horizontal Space grab control set Layout Data gd return gd  GridData fillHorizontal GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan grabExcessHorizontalSpace setLayoutData
private void initialize Fields I Dialog Settings initial Settings String drop Items new String 0 boolean do Other false if initial Settings null do Other initial Settings get Boolean SETTINGS DOOTHER Array List items new Array List for int i 0 i 6 i String curr initial Settings get SETTINGS DROPLOCATION String value Of i if curr null items contains curr items add curr drop Items String items to Array new String items size f Drop Location set Items drop Items f Runtime Location Button set Selection do Other set Other Enabled do Other if do Other if drop Items length 0 f Drop Location set Text drop Items 0 else f Drop Location set Text get Target Home validate Drop Location  initializeFields IDialogSettings initialSettings dropItems doOther initialSettings doOther initialSettings getBoolean SETTINGS_DOOTHER ArrayList ArrayList initialSettings SETTINGS_DROPLOCATION valueOf dropItems toArray fDropLocation setItems dropItems fRuntimeLocationButton setSelection doOther setOtherEnabled doOther doOther dropItems fDropLocation setText dropItems fDropLocation setText getTargetHome validateDropLocation
private void set Other Enabled boolean enabled f Other Location Label set Enabled enabled f Drop Location set Enabled enabled f Browse Button set Enabled enabled  setOtherEnabled fOtherLocationLabel setEnabled fDropLocation setEnabled fBrowseButton setEnabled
public void store Settings boolean finish Pressed I Dialog Settings settings get Dialog Settings boolean other f Runtime Location Button get Selection if finish Pressed f Drop Location get Text length 0 other settings put SETTINGS DROPLOCATION String value Of 0 f Drop Location get Text String items f Drop Location get Items int n Entries Math min items length 5 for int i 0 i n Entries i settings put SETTINGS DROPLOCATION String value Of i 1 items i if finish Pressed settings put SETTINGS DOOTHER other  storeSettings finishPressed IDialogSettings getDialogSettings fRuntimeLocationButton getSelection finishPressed fDropLocation getText SETTINGS_DROPLOCATION valueOf fDropLocation getText fDropLocation getItems nEntries nEntries SETTINGS_DROPLOCATION valueOf finishPressed SETTINGS_DOOTHER
Browses for a drop location private I Path choose Drop Location Directory Dialog dialog new Directory Dialog get Shell dialog set Filter Path f Drop Location get Text dialog set Text PDE Plugin get Resource String Feature Import Wizard messages folder title NON NLS 1 dialog set Message PDE Plugin get Resource String Feature Import Wizard messages folder message NON NLS 1 String res dialog open if res null return new Path res return null  IPath chooseDropLocation DirectoryDialog DirectoryDialog getShell setFilterPath fDropLocation getText setText PDEPlugin getResourceString FeatureImportWizard setMessage PDEPlugin getResourceString FeatureImportWizard
private void validate Drop Location String error Message null if is Other Location I Path curr get Drop Location if curr segment Count 0 error Message PDE Plugin get Resource String Feature Import Wizard errors location Missing NON NLS 1 else if Path ROOT is Valid Path f Drop Location get Text error Message PDE Plugin get Resource String Feature Import Wizard errors build Folder Invalid NON NLS 1 else File file curr to File if file exists file is Directory error Message PDE Plugin get Resource String Feature Import Wizard errors build Folder Missing NON NLS 1 set Error Message error Message set Page Complete error Message null  validateDropLocation errorMessage isOtherLocation IPath getDropLocation segmentCount errorMessage PDEPlugin getResourceString FeatureImportWizard locationMissing isValidPath fDropLocation getText errorMessage PDEPlugin getResourceString FeatureImportWizard buildFolderInvalid toFile isDirectory errorMessage PDEPlugin getResourceString FeatureImportWizard buildFolderMissing setErrorMessage errorMessage setPageComplete errorMessage
Returns the drop location public I Path get Drop Location return new Path f Drop Location get Text  IPath getDropLocation fDropLocation getText
public boolean is Other Location return f Runtime Location Button get Selection  isOtherLocation fRuntimeLocationButton getSelection
see org eclipse jface wizard Wizard Page is Page Complete public boolean is Page Complete return get Error Message null  WizardPage isPageComplete isPageComplete getErrorMessage

public static final int YES 2 int do Query I Project project  doQuery IProject
public Plugin Import Operation I Plugin Model Base models int import Type I Replace Query replace Query this f Models models this f Import Type import Type this f Replace Query replace Query  PluginImportOperation IPluginModelBase importType IReplaceQuery replaceQuery fModels fImportType importType fReplaceQuery replaceQuery
public void run I Progress Monitor monitor throws Core Exception Operation Canceled Exception if monitor null monitor new Null Progress Monitor monitor begin Task PDE Plugin get Resource String Import Wizard operation creating NON NLS 1 f Models length try Multi Status multi Status new Multi Status PDE Plugin get Plugin Id I Status OK PDE Plugin get Resource String Import Wizard operation multi Problem NON NLS 1 null for int i 0 i f Models length i try import Plugin f Models i new Sub Progress Monitor monitor 1 catch Core Exception e multi Status merge e get Status if monitor is Canceled throw new Operation Canceled Exception if multi Status isOK throw new Core Exception multi Status finally monitor done  IProgressMonitor CoreException OperationCanceledException NullProgressMonitor beginTask PDEPlugin getResourceString ImportWizard fModels MultiStatus multiStatus MultiStatus PDEPlugin getPluginId IStatus PDEPlugin getResourceString ImportWizard multiProblem fModels importPlugin fModels SubProgressMonitor CoreException multiStatus getStatus isCanceled OperationCanceledException multiStatus CoreException multiStatus
private void import Plugin I Plugin Model Base model I Progress Monitor monitor throws Core Exception String id model get Plugin Base get Id String task PDE Plugin get Formatted Message Import Wizard operation creating2 id NON NLS 1 monitor begin Task task 6 try build Model null I Project project find Project model get Plugin Base get Id if project exists if query Replace project return delete Project project new Sub Progress Monitor monitor 1 create Project project new Sub Progress Monitor monitor 1 switch f Import Type case IMPORT BINARY import As Binary project model new Sub Progress Monitor monitor 4 break case IMPORT BINARY WITH LINKS import As Binary With Links project model new Sub Progress Monitor monitor 4 break case IMPORT WITH SOURCE if id equals org apache ant id equals org eclipse osgi util NON NLS 1 NON NLS 2 id equals org eclipse osgi services id equals org eclipse swt NON NLS 1 NON NLS 2 import As Binary project model new Sub Progress Monitor monitor 4 else import With Source project model new Sub Progress Monitor monitor 4 set Project Description project model if project has Nature Java Core NATURE ID set Classpath project model finally monitor done  importPlugin IPluginModelBase IProgressMonitor CoreException getPluginBase getId PDEPlugin getFormattedMessage ImportWizard beginTask buildModel IProject findProject getPluginBase getId queryReplace deleteProject SubProgressMonitor createProject SubProgressMonitor fImportType IMPORT_BINARY importAsBinary SubProgressMonitor IMPORT_BINARY_WITH_LINKS importAsBinaryWithLinks SubProgressMonitor IMPORT_WITH_SOURCE importAsBinary SubProgressMonitor importWithSource SubProgressMonitor setProjectDescription hasNature JavaCore NATURE_ID setClasspath
private I Project find Project String id Plugin Model Manager manager PDE Core get Default get Model Manager Model Entry entry manager find Entry id if entry null I Plugin Model Base model entry get Workspace Model if model null return model get Underlying Resource get Project return PDE Plugin get Workspace get Root get Project id  IProject findProject PluginModelManager PDECore getDefault getModelManager ModelEntry findEntry IPluginModelBase getWorkspaceModel getUnderlyingResource getProject PDEPlugin getWorkspace getRoot getProject
private void delete Project I Project project I Progress Monitor monitor throws Core Exception if Repository Provider get Provider project null Repository Provider unmap project project delete true true monitor  deleteProject IProject IProgressMonitor CoreException RepositoryProvider getProvider RepositoryProvider
private void create Project I Project project I Progress Monitor monitor throws Core Exception project create monitor if project is Open project open null  createProject IProject IProgressMonitor CoreException isOpen
private void import As Binary I Project project I Plugin Model Base model I Progress Monitor monitor throws Core Exception import Plugin Content project model monitor project set Persistent Property PDE Core EXTERNAL PROJECT PROPERTY PDE Core BINARY PROJECT VALUE  importAsBinary IProject IPluginModelBase IProgressMonitor CoreException importPluginContent setPersistentProperty PDECore EXTERNAL_PROJECT_PROPERTY PDECore BINARY_PROJECT_VALUE
private void import As Binary With Links I Project project I Plugin Model Base model I Progress Monitor monitor throws Core Exception File items new File model get Install Location list Files if items null monitor begin Task PDE Plugin get Resource String Plugin Import Operation linking items length NON NLS 1 for int i 0 i items length i File source File items i if source File is Directory I Folder folder project get Folder source File get Name folder create Link new Path source File get Path I Resource NONE new Sub Progress Monitor monitor 1 else String file Name source File get Name Ignore classpath and project in the plug in These files will be created so ignore the imported ones if file Name equals classpath file Name equals project NON NLS 1 NON NLS 2 I File file project get File file Name file create Link new Path source File get Path I Resource NONE new Sub Progress Monitor monitor 1 try Repository Provider map project PDE Core BINARY REPOSITORY PROVIDER catch Team Exception e  importAsBinaryWithLinks IProject IPluginModelBase IProgressMonitor CoreException getInstallLocation listFiles beginTask PDEPlugin getResourceString PluginImportOperation sourceFile sourceFile isDirectory IFolder getFolder sourceFile getName createLink sourceFile getPath IResource SubProgressMonitor fileName sourceFile getName fileName fileName IFile getFile fileName createLink sourceFile getPath IResource SubProgressMonitor RepositoryProvider PDECore BINARY_REPOSITORY_PROVIDER TeamException
private void import With Source I Project project I Plugin Model Base model I Progress Monitor monitor throws Core Exception monitor begin Task 3 NON NLS 1 import Plugin Content project model new Sub Progress Monitor monitor 2 build Model configure Bin Includes project model I Plugin Library libraries model get Plugin Base get Libraries for int i 0 i libraries length i if Classpath Util Core contains Variables libraries i get Name continue I Path library Path new Path libraries i get Name I Resource jar File project find Member library Path if jar File null I Path src Path get Source Path library Path I Resource src Zip jar File get Project find Member src Path if src Zip null String jar Name library Path remove File Extension last Segment I Folder dest jar File get Project get Folder src jar Name NON NLS 1 I Build Entry entry build Model get Factory create Entry source libraries i get Name NON NLS 1 entry add Token dest get Name NON NLS 1 build Model get Build add entry if dest exists dest create true true null extract Zip File src Zip dest monitor extract Resources jar File dest monitor src Zip delete true null jar File delete true null build Model save Give the project a binary property if no source was extracted the model contains at minimum the bin includes key if build Model get Build get Build Entries length 2 project set Persistent Property PDE Core EXTERNAL PROJECT PROPERTY PDE Core BINARY PROJECT VALUE monitor done  importWithSource IProject IPluginModelBase IProgressMonitor CoreException beginTask importPluginContent SubProgressMonitor buildModel configureBinIncludes IPluginLibrary getPluginBase getLibraries ClasspathUtilCore containsVariables getName IPath libraryPath getName IResource jarFile findMember libraryPath jarFile IPath srcPath getSourcePath libraryPath IResource srcZip jarFile getProject findMember srcPath srcZip jarName libraryPath removeFileExtension lastSegment IFolder jarFile getProject getFolder jarName IBuildEntry buildModel getFactory createEntry getName addToken getName buildModel getBuild extractZipFile srcZip extractResources jarFile srcZip jarFile buildModel buildModel getBuild getBuildEntries setPersistentProperty PDECore EXTERNAL_PROJECT_PROPERTY PDECore BINARY_PROJECT_VALUE
private Workspace Build Model configure Bin Includes I Project project I Plugin Model Base model Workspace Build Model build Model new Workspace Build Model project get File build properties NON NLS 1 I Build build build Model get Build true I Build Entry entry build Model get Factory create Entry bin includes NON NLS 1 File files new File model get Install Location list Files try for int i 0 i files length i String token files i get Name if files i is Directory token token NON NLS 1 entry add Token token build add entry build Model save catch Core Exception e PDE Plugin log Exception e return build Model  WorkspaceBuildModel configureBinIncludes IProject IPluginModelBase WorkspaceBuildModel buildModel WorkspaceBuildModel getFile IBuild buildModel getBuild IBuildEntry buildModel getFactory createEntry getInstallLocation listFiles getName isDirectory addToken buildModel CoreException PDEPlugin logException buildModel
private void import Plugin Content I Project project I Plugin Model Base model I Progress Monitor monitor throws Core Exception monitor begin Task 2 NON NLS 1 import Content new File model get Install Location project get Full Path File System Structure Provider INSTANCE null new Sub Progress Monitor monitor 1 import Source project model get Plugin Base new Path model get Install Location new Sub Progress Monitor monitor 1 make sure all libraries have been imported if any are missing check in fragments I Fragment fragments get Fragments For model I Plugin Library libraries model get Plugin Base get Libraries for int i 0 i libraries length i String library Name libraries i get Name if Classpath Util Core contains Variables library Name project exists new Path Classpath Util Core expand Library Name library Name for int j 0 j fragments length j import Jar From Fragment project fragments j library Name import Source From Fragment project fragments j library Name  importPluginContent IProject IPluginModelBase IProgressMonitor CoreException beginTask importContent getInstallLocation getFullPath FileSystemStructureProvider SubProgressMonitor importSource getPluginBase getInstallLocation SubProgressMonitor IFragment getFragmentsFor IPluginLibrary getPluginBase getLibraries libraryName getName ClasspathUtilCore containsVariables libraryName ClasspathUtilCore expandLibraryName libraryName importJarFromFragment libraryName importSourceFromFragment libraryName
throws Core Exception I Overwrite Query query new I Overwrite Query public String query Overwrite String file return ALL  CoreException IOverwriteQuery IOverwriteQuery queryOverwrite
private void import Content Object source I Path dest Path I Import Structure Provider provider List files To Import I Progress Monitor monitor throws Core Exception I Overwrite Query query new I Overwrite Query public String query Overwrite String file return ALL Import Operation op new Import Operation dest Path source provider query op set Create Container Structure false if files To Import null op set Files To Import files To Import try op run monitor catch Invocation Target Exception e I Status status new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR e get Message e throw new Core Exception status catch Interrupted Exception e throw new Operation Canceled Exception e get Message  importContent IPath destPath IImportStructureProvider filesToImport IProgressMonitor CoreException IOverwriteQuery IOverwriteQuery queryOverwrite ImportOperation ImportOperation destPath setCreateContainerStructure filesToImport setFilesToImport filesToImport InvocationTargetException IStatus IStatus PDEPlugin getPluginId IStatus getMessage CoreException InterruptedException OperationCanceledException getMessage
private void import Source I Project project I Plugin Base plugin I Path plugin Path I Progress Monitor monitor throws Core Exception Source Location Manager manager PDE Core get Default get Source Location Manager I Plugin Library libraries plugin get Libraries monitor begin Task PDE Plugin get Resource String Import Wizard operation copying Source NON NLS 1 libraries length for int i 0 i libraries length i I Path lib Path new Path libraries i get Name I Path src Path get Source Path lib Path if src Path null project get File src Path exists File src Zip manager find Source File plugin src Path if src Zip null import Archive project src Zip src Path monitor worked 1  importSource IProject IPluginBase IPath pluginPath IProgressMonitor CoreException SourceLocationManager PDECore getDefault getSourceLocationManager IPluginLibrary getLibraries beginTask PDEPlugin getResourceString ImportWizard copyingSource IPath libPath getName IPath srcPath getSourcePath libPath srcPath getFile srcPath srcZip findSourceFile srcPath srcZip importArchive srcZip srcPath
private void import Archive I Project project File archive I Path dest Path throws Core Exception try if dest Path segment Count 2 for int i 1 i dest Path segment Count i I Folder folder project get Folder dest Path upto Segment i if folder exists folder create true true null I File file project get File dest Path File Input Stream fstream new File Input Stream archive if file exists file set Contents fstream true false null else file create fstream true null fstream close catch IO Exception e I Status status new Status I Status ERROR PDE Plugin get Plugin Id I Status OK e get Message e throw new Core Exception status  importArchive IProject IPath destPath CoreException destPath segmentCount destPath segmentCount IFolder getFolder destPath uptoSegment IFile getFile destPath FileInputStream FileInputStream setContents IOException IStatus IStatus PDEPlugin getPluginId IStatus getMessage CoreException
private void extract Zip File I Resource res I Folder dest I Progress Monitor monitor throws Core Exception Zip File zip File null try zip File new Zip File res get Location to File Zip File Structure Provider provider new Zip File Structure Provider zip File import Content provider get Root dest get Full Path provider null monitor catch IO Exception e I Status status new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR e get Message e throw new Core Exception status finally if zip File null try zip File close catch IO Exception e  extractZipFile IResource IFolder IProgressMonitor CoreException ZipFile zipFile zipFile ZipFile getLocation toFile ZipFileStructureProvider ZipFileStructureProvider zipFile importContent getRoot getFullPath IOException IStatus IStatus PDEPlugin getPluginId IStatus getMessage CoreException zipFile zipFile IOException
private void extract Resources I Resource res I Folder dest I Progress Monitor monitor throws Core Exception Zip File zip File null try zip File new Zip File res get Location to File Zip File Structure Provider provider new Zip File Structure Provider zip File Array List collected new Array List collect Resources provider provider get Root collected import Content provider get Root dest get Full Path provider collected monitor catch IO Exception e I Status status new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR e get Message e throw new Core Exception status finally if zip File null try zip File close catch IO Exception e  extractResources IResource IFolder IProgressMonitor CoreException ZipFile zipFile zipFile ZipFile getLocation toFile ZipFileStructureProvider ZipFileStructureProvider zipFile ArrayList ArrayList collectResources getRoot importContent getRoot getFullPath IOException IStatus IStatus PDEPlugin getPluginId IStatus getMessage CoreException zipFile zipFile IOException
private void collect Resources Zip File Structure Provider provider Object element Array List collected List children provider get Children element if children null children is Empty for int i 0 i children size i Object curr children get i if provider is Folder curr if provider get Label curr equals META INF NON NLS 1 collect Resources provider curr collected else if provider get Label curr ends With class NON NLS 1 collected add curr  collectResources ZipFileStructureProvider ArrayList getChildren isEmpty isFolder getLabel collectResources getLabel endsWith
private boolean query Replace I Project project throws Operation Canceled Exception switch f Replace Query do Query project case I Replace Query CANCEL throw new Operation Canceled Exception case I Replace Query NO return false return true  queryReplace IProject OperationCanceledException fReplaceQuery doQuery IReplaceQuery OperationCanceledException IReplaceQuery
private void set Project Description I Project project I Plugin Model Base model throws Core Exception I Project Description desc project get Description if needs Java Nature project model desc set Nature Ids new String Java Core NATURE ID PDE PLUGIN NATURE else desc set Nature Ids new String PDE PLUGIN NATURE project set Description desc null  setProjectDescription IProject IPluginModelBase CoreException IProjectDescription getDescription needsJavaNature setNatureIds JavaCore NATURE_ID PLUGIN_NATURE setNatureIds PLUGIN_NATURE setDescription
private void set Classpath I Project project I Plugin Model Base model throws Java Model Exception I Java Project j Project Java Core create project Vector entries new Vector if f Import Type IMPORT BINARY WITH LINKS get Linked Libraries project model entries else I Plugin Library libraries model get Plugin Base get Libraries for int i 0 i libraries length i if build Model null I Build Entry build Entry build Model get Build get Entry source libraries i get Name NON NLS 1 if build Entry null I Path path new Path build Entry get Tokens 0 entries add Java Core new Source Entry project get Full Path append path continue I Classpath Entry entry get Library Entry project libraries i if entry null entries add entry entries add Classpath Util Core create Container Entry entries add Classpath Util Core createJRE Entry j Project set Raw Classpath I Classpath Entry entries to Array new I Classpath Entry entries size j Project get Output Location null  setClasspath IProject IPluginModelBase JavaModelException IJavaProject jProject JavaCore fImportType IMPORT_BINARY_WITH_LINKS getLinkedLibraries IPluginLibrary getPluginBase getLibraries buildModel IBuildEntry buildEntry buildModel getBuild getEntry getName buildEntry IPath buildEntry getTokens JavaCore newSourceEntry getFullPath IClasspathEntry getLibraryEntry ClasspathUtilCore createContainerEntry ClasspathUtilCore createJREEntry jProject setRawClasspath IClasspathEntry toArray IClasspathEntry jProject getOutputLocation
private void get Linked Libraries I Project project I Plugin Model Base model Vector entries Classpath Util Core add Libraries model true entries for int i 0 i entries size i I Path path new Path model get Install Location I Classpath Entry entry I Classpath Entry entries remove i if entry get Path matching First Segments path path segment Count path entry get Path remove First Segments path segment Count path project get Full Path append path set Device null else if model instanceof I Fragment Model I Fragment fragments get Fragments For model for int j 0 j fragments length j I Path frag Path new Path fragments j get Model get Install Location if entry get Path matching First Segments frag Path frag Path segment Count path PDE Plugin get Workspace get Root get Full Path path path append fragments j get Id path path append entry get Path remove First Segments frag Path segment Count set Device null break I Path src Attachment entry get Source Attachment Path I Path src Att Root entry get Source Attachment Root Path entries add i Java Core new Library Entry path src Attachment src Att Root entry is Exported  getLinkedLibraries IProject IPluginModelBase ClasspathUtilCore addLibraries IPath getInstallLocation IClasspathEntry IClasspathEntry getPath matchingFirstSegments segmentCount getPath removeFirstSegments segmentCount getFullPath setDevice IFragmentModel IFragment getFragmentsFor IPath fragPath getModel getInstallLocation getPath matchingFirstSegments fragPath fragPath segmentCount PDEPlugin getWorkspace getRoot getFullPath getId getPath removeFirstSegments fragPath segmentCount setDevice IPath srcAttachment getSourceAttachmentPath IPath srcAttRoot getSourceAttachmentRootPath JavaCore newLibraryEntry srcAttachment srcAttRoot isExported
private I Classpath Entry get Library Entry I Project project I Plugin Library library if I Plugin Library RESOURCE equals library get Type return null String library Name Classpath Util Core expand Library Name library get Name if project exists new Path library Name return null I Path src Attach get Source Attachment Path project project get Full Path append library Name I Path src Root src Attach null Path EMPTY null return Java Core new Library Entry project get Full Path append library Name src Attach src Root library is Exported  IClasspathEntry getLibraryEntry IProject IPluginLibrary IPluginLibrary getType libraryName ClasspathUtilCore expandLibraryName getName libraryName IPath srcAttach getSourceAttachmentPath getFullPath libraryName IPath srcRoot srcAttach JavaCore newLibraryEntry getFullPath libraryName srcAttach srcRoot isExported
private I Path get Source Attachment Path I Project project I Path jar Path I Path source Path get Source Path jar Path if source Path null return null I Workspace Root root project get Workspace get Root if root find Member source Path null return source Path return null  IPath getSourceAttachmentPath IProject IPath jarPath IPath sourcePath getSourcePath jarPath sourcePath IWorkspaceRoot getWorkspace getRoot findMember sourcePath sourcePath
private I Path get Source Path I Path jar Path jar Path new Path Classpath Util Core expand Library Name jar Path to String String lib Name jar Path last Segment if lib Name null int idx lib Name last Index Of if idx 1 String src Name lib Name substring 0 idx src zip NON NLS 1 I Path path jar Path remove Last Segments 1 append src Name return path return null  IPath getSourcePath IPath jarPath jarPath ClasspathUtilCore expandLibraryName jarPath toString libName jarPath lastSegment libName libName lastIndexOf srcName libName IPath jarPath removeLastSegments srcName
private boolean needs Java Nature I Project project I Plugin Model Base model boolean is Java Project false I Plugin Library libraries model get Plugin Base get Libraries for int i 0 i libraries length i if I Plugin Library RESOURCE equals libraries i get Type is Java Project true break if is Java Project I Plugin Import imports model get Plugin Base get Imports for int i 0 i imports length i if imports i is Reexported is Java Project true break return is Java Project  needsJavaNature IProject IPluginModelBase isJavaProject IPluginLibrary getPluginBase getLibraries IPluginLibrary getType isJavaProject isJavaProject IPluginImport getPluginBase getImports isReexported isJavaProject isJavaProject
private I Fragment get Fragments For I Plugin Model Base model Array List result new Array List for int i 0 i f Models length i if f Models i instanceof I Fragment Model I Fragment fragment I Fragment Model f Models i get Fragment if PDE Core compare model get Plugin Base get Id model get Plugin Base get Version fragment get Plugin Id fragment get Version fragment get Rule result add fragment return I Fragment result to Array new I Fragment result size  IFragment getFragmentsFor IPluginModelBase ArrayList ArrayList fModels fModels IFragmentModel IFragment IFragmentModel fModels getFragment PDECore getPluginBase getId getPluginBase getVersion getPluginId getVersion getRule IFragment toArray IFragment
private void import Jar From Fragment I Project project I Fragment fragment String name throws Core Exception I Path jar Path new Path Classpath Util Core expand Library Name name File swt Jar new File fragment get Model get Install Location jar Path to String if swt Jar exists import Archive project swt Jar jar Path  importJarFromFragment IProject IFragment CoreException IPath jarPath ClasspathUtilCore expandLibraryName swtJar getModel getInstallLocation jarPath toString swtJar importArchive swtJar jarPath
private void import Source From Fragment I Project project I Fragment fragment String name throws Core Exception I Path jar Path new Path Classpath Util Core expand Library Name name I Path src Path get Source Path jar Path Source Location Manager manager PDE Core get Default get Source Location Manager File src File manager find Source File fragment src Path if src File null import Archive project src File src Path  importSourceFromFragment IProject IFragment CoreException IPath jarPath ClasspathUtilCore expandLibraryName IPath srcPath getSourcePath jarPath SourceLocationManager PDECore getDefault getSourceLocationManager srcFile findSourceFile srcPath srcFile importArchive srcFile srcPath

public Plugin Import Wizard I Dialog Settings master Settings PDE Plugin get Default get Dialog Settings set Dialog Settings get Settings Section master Settings set Default Page Image Descriptor PDE Plugin Images DESC PLUGIN IMPORT WIZ set Window Title PDE Plugin get Resource String Import Wizard title NON NLS 1  PluginImportWizard IDialogSettings masterSettings PDEPlugin getDefault getDialogSettings setDialogSettings getSettingsSection masterSettings setDefaultPageImageDescriptor PDEPluginImages DESC_PLUGIN_IMPORT_WIZ setWindowTitle PDEPlugin getResourceString ImportWizard
public void init I Workbench workbench I Structured Selection selection this selection selection  IWorkbench IStructuredSelection
public void add Pages set Needs Progress Monitor true page1 new Plugin Import Wizard First Page first NON NLS 1 add Page page1 page2 new Plugin Import Wizard Express Page express page1 selection NON NLS 1 add Page page2 page3 new Plugin Import Wizard Detailed Page detailed page1 NON NLS 1 add Page page3  addPages setNeedsProgressMonitor PluginImportWizardFirstPage addPage PluginImportWizardExpressPage addPage PluginImportWizardDetailedPage addPage
private I Dialog Settings get Settings Section I Dialog Settings master I Dialog Settings setting master get Section STORE SECTION if setting null setting master add New Section STORE SECTION return setting  IDialogSettings getSettingsSection IDialogSettings IDialogSettings getSection STORE_SECTION addNewSection STORE_SECTION
private I Plugin Model Base get Models To Import if page1 get Next Page equals page2 return page2 get Models To Import return page3 get Models To Import  IPluginModelBase getModelsToImport getNextPage getModelsToImport getModelsToImport
public boolean perform Finish page1 store Settings Base Import Wizard Second Page page1 get Next Page store Settings try final I Plugin Model Base models get Models To Import I Runnable With Progress op get Import Operation get Shell page1 get Import Type models get Container run true true op catch Interrupted Exception e return false catch Invocation Target Exception e PDE Plugin log Exception e return true exception handled return true  performFinish storeSettings BaseImportWizardSecondPage getNextPage storeSettings IPluginModelBase getModelsToImport IRunnableWithProgress getImportOperation getShell getImportType getContainer InterruptedException InvocationTargetException PDEPlugin logException
public static I Runnable With Progress get Import Operation final Shell shell final int import Type final I Plugin Model Base models return new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I Replace Query query new Replace Query shell Plugin Import Operation op new Plugin Import Operation models import Type query PDE Plugin get Workspace run op monitor catch Core Exception e throw new Invocation Target Exception e catch Operation Canceled Exception e throw new Interrupted Exception e get Message finally monitor done  IRunnableWithProgress getImportOperation importType IPluginModelBase IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException IReplaceQuery ReplaceQuery PluginImportOperation PluginImportOperation importType PDEPlugin getWorkspace CoreException InvocationTargetException OperationCanceledException InterruptedException getMessage
private static class Replace Dialog extends Message Dialog public Replace Dialog Shell parent Shell String dialog Message super parent Shell PDE Plugin get Resource String Import Wizard messages title NON NLS 1 null dialog Message Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants YES TO ALL LABEL I Dialog Constants NO LABEL PDE Plugin get Resource String Import Wizard no To All NON NLS 1 I Dialog Constants CANCEL LABEL 0  ReplaceDialog MessageDialog ReplaceDialog parentShell dialogMessage parentShell PDEPlugin getResourceString ImportWizard dialogMessage MessageDialog IDialogConstants YES_LABEL IDialogConstants YES_TO_ALL_LABEL IDialogConstants NO_LABEL PDEPlugin getResourceString ImportWizard noToAll IDialogConstants CANCEL_LABEL
private static class Replace Query implements I Replace Query private Shell shell public Replace Query Shell shell this shell shell  ReplaceQuery IReplaceQuery ReplaceQuery
shell get Display sync Exec new Runnable public void run Replace Dialog dialog new Replace Dialog shell message int ret Val dialog open if ret Val 0 result 0 RETURNCODES ret Val if ret Val 1 yes To All 1 else if ret Val 3 yes To All 1  getDisplay syncExec ReplaceDialog ReplaceDialog retVal retVal retVal retVal yesToAll retVal yesToAll
public int do Query I Project project if yes To All 0 return yes To All 0 I Replace Query YES I Replace Query NO final String message PDE Plugin get Formatted Message Import Wizard messages exists project get Name NON NLS 1 final int result I Replace Query CANCEL shell get Display sync Exec new Runnable public void run Replace Dialog dialog new Replace Dialog shell message int ret Val dialog open if ret Val 0 result 0 RETURNCODES ret Val if ret Val 1 yes To All 1 else if ret Val 3 yes To All 1 return result 0  doQuery IProject yesToAll yesToAll IReplaceQuery IReplaceQuery PDEPlugin getFormattedMessage ImportWizard getName IReplaceQuery getDisplay syncExec ReplaceDialog ReplaceDialog retVal retVal retVal retVal yesToAll retVal yesToAll
public I Wizard Page get Next Page I Wizard Page page if page equals page1 if page1 get Scan All Plugins return page3 return page2 return null  IWizardPage getNextPage IWizardPage getScanAllPlugins
public I Wizard Page get Previous Page I Wizard Page page return page equals page1 null page1  IWizardPage getPreviousPage IWizardPage
public boolean can Finish return page1 get Next Page is Page Complete  canFinish getNextPage isPageComplete

extends Default Content Provider implements I Structured Content Provider public Object get Elements Object element return models  DefaultContentProvider IStructuredContentProvider getElements
public Plugin Import Wizard Detailed Page String page Name Plugin Import Wizard First Page first Page super page Name first Page set Title PDE Plugin get Resource String Import Wizard Detailed Page title NON NLS 1 set Message PDE Plugin get Resource String Import Wizard Detailed Page desc NON NLS 1  PluginImportWizardDetailedPage pageName PluginImportWizardFirstPage firstPage pageName firstPage setTitle PDEPlugin getResourceString ImportWizard DetailedPage setMessage PDEPlugin getResourceString ImportWizard DetailedPage
public void create Control Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 layout make Columns Equal Width false layout horizontal Spacing 5 layout vertical Spacing 10 container set Layout layout create Scroll Area container create Available List container set Layout Data new Grid Data Grid Data FILL BOTH create Button Area container create Import List container set Layout Data new Grid Data Grid Data FILL BOTH update Count Composite options create Computations Option container Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 3 options set Layout Data gd add Viewer Listeners initialize set Control container Dialog apply Dialog Font container  createControl GridLayout GridLayout numColumns makeColumnsEqualWidth horizontalSpacing verticalSpacing setLayout createScrollArea createAvailableList setLayoutData GridData GridData FILL_BOTH createButtonArea createImportList setLayoutData GridData GridData FILL_BOTH updateCount createComputationsOption GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData addViewerListeners setControl applyDialogFont
private void initialize set Page Complete false  setPageComplete
private void add Viewer Listeners available List Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Add  addViewerListeners availableListViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleAdd
import List Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Remove  importListViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleRemove
filter Text add Modify Listener new Modify Listener public void modify Text Modify Event e handle Filter  filterText addModifyListener ModifyListener modifyText ModifyEvent handleFilter
private void add Viewer Listeners available List Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Add import List Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Remove filter Text add Modify Listener new Modify Listener public void modify Text Modify Event e handle Filter  addViewerListeners availableListViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleAdd importListViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleRemove filterText addModifyListener ModifyListener modifyText ModifyEvent handleFilter
private Composite create Available List Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 container set Layout layout container set Layout Data new Grid Data Label label new Label container SWT NONE label set Text PDE Plugin get Resource String Import Wizard Detailed Page available List NON NLS 1 Table table new Table container SWT BORDER SWT MULTI SWT V SCROLL Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint 225 gd height Hint 200 table set Layout Data gd available List Viewer new Table Viewer table available List Viewer set Label Provider PDE Plugin get Default get Label Provider available List Viewer set Content Provider new Content Provider available List Viewer set Input PDE Core get Default get External Model Manager available List Viewer set Sorter List Util PLUGIN SORTER return container  createAvailableList GridLayout GridLayout marginWidth marginHeight setLayout setLayoutData GridData setText PDEPlugin getResourceString ImportWizard DetailedPage availableList V_SCROLL GridData GridData GridData FILL_BOTH widthHint heightHint setLayoutData availableListViewer TableViewer availableListViewer setLabelProvider PDEPlugin getDefault getLabelProvider availableListViewer setContentProvider ContentProvider availableListViewer setInput PDECore getDefault getExternalModelManager availableListViewer setSorter ListUtil PLUGIN_SORTER
button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Existing Projects  setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleExistingProjects
button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Existing Unshared  setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleExistingUnshared
button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Add  setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAdd
button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Add All  setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAddAll
button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Remove  setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleRemove
button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Remove All  setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleRemoveAll
button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Swap  setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSwap
button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Add Required Plugins  setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAddRequiredPlugins
private Composite create Button Area Composite parent Composite comp new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width layout margin Height 0 comp set Layout layout comp set Layout Data new Grid Data Grid Data FILL VERTICAL Composite container new Composite comp SWT NONE layout new Grid Layout layout margin Width 0 layout margin Height 30 container set Layout layout container set Layout Data new Grid Data Grid Data FILL BOTH Button button new Button container SWT PUSH button set Text PDE Plugin get Resource String Import Wizard Detailed Page existing NON NLS 1 button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Existing Projects SWT Util set Button Dimension Hint button button new Button container SWT PUSH button set Text PDE Plugin get Resource String Import Wizard Detailed Page existing Unshared NON NLS 1 button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Existing Unshared SWT Util set Button Dimension Hint button new Label container SWT NONE new Label container SWT NONE button new Button container SWT PUSH button set Text PDE Plugin get Resource String Import Wizard Detailed Page add NON NLS 1 button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Add SWT Util set Button Dimension Hint button button new Button container SWT PUSH button set Text PDE Plugin get Resource String Import Wizard Detailed Page add All NON NLS 1 button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Add All SWT Util set Button Dimension Hint button button new Button container SWT PUSH button set Text PDE Plugin get Resource String Import Wizard Detailed Page remove NON NLS 1 button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Remove SWT Util set Button Dimension Hint button button new Button container SWT PUSH button set Text PDE Plugin get Resource String Import Wizard Detailed Page remove All NON NLS 1 button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Remove All SWT Util set Button Dimension Hint button button new Button container SWT PUSH button set Text PDE Plugin get Resource String Import Wizard Detailed Page swap NON NLS 1 button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Swap SWT Util set Button Dimension Hint button button new Button container SWT PUSH button set Text PDE Plugin get Resource String Import Wizard Detailed Page add Required NON NLS 1 button set Layout Data new Grid Data Grid Data FILL HORIZONTAL button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Add Required Plugins SWT Util set Button Dimension Hint button count Label new Label comp SWT NONE count Label set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN CENTER return container  createButtonArea GridLayout GridLayout marginWidth marginHeight setLayout setLayoutData GridData GridData FILL_VERTICAL GridLayout marginWidth marginHeight setLayout setLayoutData GridData GridData FILL_BOTH setText PDEPlugin getResourceString ImportWizard DetailedPage setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleExistingProjects SWTUtil setButtonDimensionHint setText PDEPlugin getResourceString ImportWizard DetailedPage existingUnshared setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleExistingUnshared SWTUtil setButtonDimensionHint setText PDEPlugin getResourceString ImportWizard DetailedPage setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAdd SWTUtil setButtonDimensionHint setText PDEPlugin getResourceString ImportWizard DetailedPage addAll setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAddAll SWTUtil setButtonDimensionHint setText PDEPlugin getResourceString ImportWizard DetailedPage setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleRemove SWTUtil setButtonDimensionHint setText PDEPlugin getResourceString ImportWizard DetailedPage removeAll setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleRemoveAll SWTUtil setButtonDimensionHint setText PDEPlugin getResourceString ImportWizard DetailedPage setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSwap SWTUtil setButtonDimensionHint setText PDEPlugin getResourceString ImportWizard DetailedPage addRequired setLayoutData GridData GridData FILL_HORIZONTAL addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAddRequiredPlugins SWTUtil setButtonDimensionHint countLabel countLabel setLayoutData GridData GridData HORIZONTAL_ALIGN_CENTER
private Composite create Scroll Area Composite parent Group container new Group parent SWT NONE Grid Layout layout new Grid Layout 2 false layout margin Width layout margin Height 6 container set Layout layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 3 container set Layout Data gd container set Text PDE Plugin get Resource String Import Wizard Detailed Page locate NON NLS 1 Label filter Label new Label container SWT NONE filter Label set Text PDE Plugin get Resource String Import Wizard Detailed Page search NON NLS 1 filter Text new Text container SWT BORDER filter Text set Text NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL filter Text set Layout Data gd return container  createScrollArea GridLayout GridLayout marginWidth marginHeight setLayout GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData setText PDEPlugin getResourceString ImportWizard DetailedPage filterLabel filterLabel setText PDEPlugin getResourceString ImportWizard DetailedPage filterText filterText setText GridData GridData FILL_HORIZONTAL filterText setLayoutData
public void set Visible boolean visible super set Visible visible set Page Complete visible import List Viewer get Table get Item Count 0  setVisible setVisible setPageComplete importListViewer getTable getItemCount
protected void refresh Page available List Viewer refresh import List Viewer get Table remove All page Changed  refreshPage availableListViewer importListViewer getTable removeAll pageChanged
protected void page Changed update Count handle Filter set Page Complete import List Viewer get Table get Item Count 0  pageChanged updateCount handleFilter setPageComplete importListViewer getTable getItemCount
private void update Count count Label set Text PDE Plugin get Formatted Message Import Wizard Detailed Page count NON NLS 1 new String new Integer import List Viewer get Table get Item Count to String new Integer models length to String count Label get Parent layout  updateCount countLabel setText PDEPlugin getFormattedMessage ImportWizard DetailedPage importListViewer getTable getItemCount toString toString countLabel getParent
private void handle Add I Structured Selection ssel I Structured Selection available List Viewer get Selection if ssel size 0 Table table available List Viewer get Table int index table get Selection Indices 0 available List Viewer remove ssel to Array import List Viewer add ssel to Array table set Selection index table get Item Count index table get Item Count 1 page Changed  handleAdd IStructuredSelection IStructuredSelection availableListViewer getSelection availableListViewer getTable getSelectionIndices availableListViewer toArray importListViewer toArray setSelection getItemCount getItemCount pageChanged
private void handle Add All Table Item items available List Viewer get Table get Items Array List data new Array List for int i 0 i items length i data add items i get Data if data size 0 import List Viewer add data to Array available List Viewer remove data to Array page Changed  handleAddAll TableItem availableListViewer getTable getItems ArrayList ArrayList getData importListViewer toArray availableListViewer toArray pageChanged
private void handle Filter if filter Text null filter Text get Text trim length 0 return String text filter Text get Text trim if text index Of 1 text index Of 1 text NON NLS 1 String Matcher string Matcher new String Matcher text false false Table Item table Items available List Viewer get Table get Items Array List results new Array List for int i 0 i table Items length i Object data table Items i get Data if data instanceof I Plugin Model Base I Plugin Model Base model I Plugin Model Base data if string Matcher match model get Plugin Base get Id results add table Items i if results size 0 Table Item selection List Table Item results to Array new Table Item results size available List Viewer get Table set Selection selection List else available List Viewer set Selection null  handleFilter filterText filterText getText filterText getText indexOf indexOf StringMatcher stringMatcher StringMatcher TableItem tableItems availableListViewer getTable getItems ArrayList ArrayList tableItems tableItems getData IPluginModelBase IPluginModelBase IPluginModelBase stringMatcher getPluginBase getId tableItems TableItem selectionList TableItem toArray TableItem availableListViewer getTable setSelection selectionList availableListViewer setSelection
private void handle Remove I Structured Selection ssel I Structured Selection import List Viewer get Selection if ssel size 0 Table table import List Viewer get Table int index table get Selection Indices 0 import List Viewer remove ssel to Array available List Viewer add ssel to Array table set Selection index table get Item Count index table get Item Count 1 page Changed  handleRemove IStructuredSelection IStructuredSelection importListViewer getSelection importListViewer getTable getSelectionIndices importListViewer toArray availableListViewer toArray setSelection getItemCount getItemCount pageChanged
private void handle Remove All handle Remove All true  handleRemoveAll handleRemoveAll
private void handle Remove All boolean refresh Table Item items import List Viewer get Table get Items Array List data new Array List for int i 0 i items length i data add items i get Data if data size 0 available List Viewer add data to Array import List Viewer remove data to Array page Changed  handleRemoveAll TableItem importListViewer getTable getItems ArrayList ArrayList getData availableListViewer toArray importListViewer toArray pageChanged
private void handle Swap Table Item a Items available List Viewer get Table get Items Table Item i Items import List Viewer get Table get Items Array List data new Array List for int i 0 i i Items length i data add i Items i get Data if data size 0 available List Viewer add data to Array import List Viewer remove data to Array data clear for int i 0 i a Items length i data add a Items i get Data if data size 0 import List Viewer add data to Array available List Viewer remove data to Array page Changed  handleSwap TableItem aItems availableListViewer getTable getItems TableItem iItems importListViewer getTable getItems ArrayList ArrayList iItems iItems getData availableListViewer toArray importListViewer toArray aItems aItems getData importListViewer toArray availableListViewer toArray pageChanged
private void handle Existing Projects handle Remove All false Array List result new Array List for int i 0 i models length i String id models i get Plugin Base get Id I Project project I Project PDE Plugin get Workspace get Root find Member id if project null project is Open Workspace Model Manager is Plugin Project project result add models i if result size 0 import List Viewer add result to Array available List Viewer remove result to Array page Changed  handleExistingProjects handleRemoveAll ArrayList ArrayList getPluginBase getId IProject IProject PDEPlugin getWorkspace getRoot findMember isOpen WorkspaceModelManager isPluginProject importListViewer toArray availableListViewer toArray pageChanged
private void handle Existing Unshared handle Remove All false Array List result new Array List for int i 0 i models length i String id models i get Plugin Base get Id I Project project I Project PDE Plugin get Workspace get Root find Member id if project null project is Open Workspace Model Manager is Unshared Plugin Project project result add models i if result size 0 import List Viewer add result to Array available List Viewer remove result to Array page Changed  handleExistingUnshared handleRemoveAll ArrayList ArrayList getPluginBase getId IProject IProject PDEPlugin getWorkspace getRoot findMember isOpen WorkspaceModelManager isUnsharedPluginProject importListViewer toArray availableListViewer toArray pageChanged
private void handle Add Required Plugins Table Item items import List Viewer get Table get Items if items length 0 return if items length 1 I Plugin Model Base model I Plugin Model Base items 0 get Data if model get Plugin Base get Id equals org eclipse core boot NON NLS 1 return Array List result new Array List for int i 0 i items length i add Plugin And Dependencies I Plugin Model Base items i get Data result add Fragments Button get Selection handle Remove All false import List Viewer add result to Array available List Viewer remove result to Array page Changed  handleAddRequiredPlugins TableItem importListViewer getTable getItems IPluginModelBase IPluginModelBase getData getPluginBase getId ArrayList ArrayList addPluginAndDependencies IPluginModelBase getData addFragmentsButton getSelection handleRemoveAll importListViewer toArray availableListViewer toArray pageChanged

implements I Structured Content Provider public Object get Elements Object parent I Project projects PDE Plugin get Workspace get Root get Projects Array List result new Array List Plugin Model Manager manager PDE Core get Default get Model Manager for int i 0 i projects length i if projects i is Open Workspace Model Manager is Plugin Project projects i Workspace Model Manager is Binary Plugin Project projects i I Plugin Model Base model manager find Model projects i if model null result add model return result to Array  IStructuredContentProvider getElements IProject PDEPlugin getWorkspace getRoot getProjects ArrayList ArrayList PluginModelManager PDECore getDefault getModelManager isOpen WorkspaceModelManager isPluginProject WorkspaceModelManager isBinaryPluginProject IPluginModelBase findModel toArray
class Table Part extends Wizard Checkbox Table Part public Table Part String main Label String button Labels super main Label button Labels set Select All Index 0 set Deselect All Index 1  TablePart WizardCheckboxTablePart TablePart mainLabel buttonLabels mainLabel buttonLabels setSelectAllIndex setDeselectAllIndex
set Deselect All Index 1 public void update Counter int count super update Counter count  setDeselectAllIndex updateCounter updateCounter
super update Counter count public void button Selected Button button int index if index 0 index 1 super button Selected button index  updateCounter buttonSelected buttonSelected
protected Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit Structured Viewer viewer super create Structured Viewer parent style toolkit return viewer  StructuredViewer createStructuredViewer FormToolkit StructuredViewer createStructuredViewer
protected void element Checked Object element boolean checked super element Checked element checked page Changed  elementChecked elementChecked pageChanged
protected void handle Select All boolean select super handle Select All select page Changed  handleSelectAll handleSelectAll pageChanged
public Plugin Import Wizard Express Page String page Name Plugin Import Wizard First Page page I Structured Selection selection super page Name page this initial Selection selection set Title PDE Plugin get Resource String Import Wizard express Page title NON NLS 1 set Message PDE Plugin get Resource String Import Wizard express Page desc NON NLS 1  PluginImportWizardExpressPage pageName PluginImportWizardFirstPage IStructuredSelection pageName initialSelection setTitle PDEPlugin getResourceString ImportWizard expressPage setMessage PDEPlugin getResourceString ImportWizard expressPage
add Fragments Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed  addFragmentsButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged
public void create Control Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout horizontal Spacing 20 layout vertical Spacing 10 container set Layout layout container set Layout Data new Grid Data Grid Data FILL BOTH create Table Part container create Import Part container Composite options create Computations Option container Grid Data gd new Grid Data gd horizontal Span 2 options set Layout Data gd add Fragments Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed initialize set Control container Dialog apply Dialog Font container  createControl GridLayout GridLayout numColumns horizontalSpacing verticalSpacing setLayout setLayoutData GridData GridData FILL_BOTH createTablePart createImportPart createComputationsOption GridData GridData horizontalSpan setLayoutData addFragmentsButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged setControl applyDialogFont
private Composite create Table Part Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 container set Layout layout container set Layout Data new Grid Data Grid Data FILL BOTH table Part new Table Part PDE Plugin get Resource String Import Wizard express Page non Binary NON NLS 1 new String PDE Plugin get Resource String Table Part KEY SELECT ALL PDE Plugin get Resource String Table Part KEY DESELECT ALL table Part create Control container Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint 200 gd width Hint 225 table Part get Control set Layout Data gd Checkbox Table Viewer viewer table Part get Table Viewer viewer set Label Provider PDE Plugin get Default get Label Provider viewer set Content Provider new Plugin Content Provider viewer set Sorter List Util PLUGIN SORTER viewer set Input PDE Plugin get Workspace get Root return container  createTablePart GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_BOTH tablePart TablePart PDEPlugin getResourceString ImportWizard expressPage nonBinary PDEPlugin getResourceString TablePart KEY_SELECT_ALL PDEPlugin getResourceString TablePart KEY_DESELECT_ALL tablePart createControl GridData GridData GridData FILL_BOTH heightHint widthHint tablePart getControl setLayoutData CheckboxTableViewer tablePart getTableViewer setLabelProvider PDEPlugin getDefault getLabelProvider setContentProvider PluginContentProvider setSorter ListUtil PLUGIN_SORTER setInput PDEPlugin getWorkspace getRoot
private void create Import Part Composite parent Composite container new Composite parent SWT NONE container set Layout new Grid Layout container set Layout Data new Grid Data Grid Data FILL BOTH create Import List container counter Label new Label container SWT NONE counter Label set Layout Data new Grid Data Grid Data FILL HORIZONTAL  createImportPart setLayout GridLayout setLayoutData GridData GridData FILL_BOTH createImportList counterLabel counterLabel setLayoutData GridData GridData FILL_HORIZONTAL
private void initialize Object items initial Selection to Array Array List list new Array List Plugin Model Manager manager PDE Core get Default get Model Manager for int i 0 i items length i Object item items i if item instanceof I Java Project item I Java Project item get Project if item instanceof I Project I Project project I Project item if project is Open Workspace Model Manager is Plugin Project project Workspace Model Manager is Binary Plugin Project project I Plugin Model Base model manager find Model project if model null list add model table Part set Selection list to Array  initialSelection toArray ArrayList ArrayList PluginModelManager PDECore getDefault getModelManager IJavaProject IJavaProject getProject IProject IProject IProject isOpen WorkspaceModelManager isPluginProject WorkspaceModelManager isBinaryPluginProject IPluginModelBase findModel tablePart setSelection toArray
private void compute Models To Import import List Viewer get Table remove All Array List result new Array List Object w Models table Part get Selection for int i 0 i w Models length i I Plugin Model Base model I Plugin Model Base w Models i add Dependencies model result add Fragments Button get Selection add Extra Prerequisites model result if w Models length 0 remove Shared Models result import List Viewer add result to Array  computeModelsToImport importListViewer getTable removeAll ArrayList ArrayList wModels tablePart getSelection wModels IPluginModelBase IPluginModelBase wModels addDependencies addFragmentsButton getSelection addExtraPrerequisites wModels removeSharedModels importListViewer toArray
private void remove Shared Models Array List result I Plugin Model Base smodels I Plugin Model Base result to Array new I Plugin Model Base result size Plugin Model Manager manager PDE Core get Default get Model Manager for int i 0 i smodels length i String id smodels i get Plugin Base get Id I Plugin Model Base model manager find Model id if model null I Resource resource model get Underlying Resource if resource null I Project project resource get Project if Workspace Model Manager is Unshared Plugin Project project result remove smodels i  removeSharedModels ArrayList IPluginModelBase IPluginModelBase toArray IPluginModelBase PluginModelManager PDECore getDefault getModelManager getPluginBase getId IPluginModelBase findModel IResource getUnderlyingResource IProject getProject WorkspaceModelManager isUnsharedPluginProject
private void add Extra Prerequisites I Plugin Model Base model Array List result try I Build Model build Model model get Build Model if build Model null I File build File model get Underlying Resource get Project get File build properties NON NLS 1 if build File exists build Model new Workspace Build Model build File build Model load if build Model null return I Build Entry entry build Model get Build get Entry I Build Entry JARS EXTRA CLASSPATH if entry null return String tokens entry get Tokens for int i 0 i tokens length i Path path new Path tokens i if path segment Count 2 path segment 0 equals NON NLS 1 for int j 0 j models length j if models j get Plugin Base get Id equals path segment 1 result contains models j result add models j catch Core Exception e  addExtraPrerequisites IPluginModelBase ArrayList IBuildModel buildModel getBuildModel buildModel IFile buildFile getUnderlyingResource getProject getFile buildFile buildModel WorkspaceBuildModel buildFile buildModel buildModel IBuildEntry buildModel getBuild getEntry IBuildEntry JARS_EXTRA_CLASSPATH getTokens segmentCount getPluginBase getId CoreException
protected void refresh Page page Changed  refreshPage pageChanged
protected void page Changed compute Models To Import update Count set Page Complete import List Viewer get Table get Item Count 0  pageChanged computeModelsToImport updateCount setPageComplete importListViewer getTable getItemCount
private void update Count counter Label set Text PDE Plugin get Formatted Message Import Wizard express Page total NON NLS 1 new Integer import List Viewer get Table get Item Count to String counter Label get Parent layout  updateCount counterLabel setText PDEPlugin getFormattedMessage ImportWizard expressPage importListViewer getTable getItemCount toString counterLabel getParent

public Plugin Import Wizard First Page String name super name set Title PDE Plugin get Resource String Import Wizard First Page title NON NLS 1 set Message PDE Plugin get Resource String Import Wizard First Page desc NON NLS 1 PDE Plugin get Default get Label Provider connect this  PluginImportWizardFirstPage setTitle PDEPlugin getResourceString ImportWizard FirstPage setMessage PDEPlugin getResourceString ImportWizard FirstPage PDEPlugin getDefault getLabelProvider
public void create Control Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout vertical Spacing 15 container set Layout layout create Directory Group container create Import Choices Group container create Import Options Group container Dialog apply Dialog Font container initialize set Control container  createControl GridLayout GridLayout verticalSpacing setLayout createDirectoryGroup createImportChoicesGroup createImportOptionsGroup applyDialogFont setControl
private void create Import Choices Group Composite container Group import Choices new Group container SWT NONE import Choices set Text PDE Plugin get Resource String Import Wizard First Page import Group NON NLS 1 import Choices set Layout new Grid Layout import Choices set Layout Data new Grid Data Grid Data FILL HORIZONTAL scan Button new Button import Choices SWT RADIO scan Button set Text PDE Plugin get Resource String Import Wizard First Page scan All NON NLS 1 import Button new Button import Choices SWT RADIO import Button set Text PDE Plugin get Resource String Import Wizard First Page import Prereqs NON NLS 1  createImportChoicesGroup importChoices importChoices setText PDEPlugin getResourceString ImportWizard FirstPage importGroup importChoices setLayout GridLayout importChoices setLayoutData GridData GridData FILL_HORIZONTAL scanButton importChoices scanButton setText PDEPlugin getResourceString ImportWizard FirstPage scanAll importButton importChoices importButton setText PDEPlugin getResourceString ImportWizard FirstPage importPrereqs
private void create Import Options Group Composite container Group options new Group container SWT NONE options set Text PDE Plugin get Resource String Import Wizard First Page import As NON NLS 1 options set Layout new Grid Layout options set Layout Data new Grid Data Grid Data FILL HORIZONTAL binary Button new Button options SWT RADIO binary Button set Text PDE Plugin get Resource String Import Wizard First Page binary NON NLS 1 binary With Links Button new Button options SWT RADIO binary With Links Button set Text PDE Plugin get Resource String Import Wizard First Page binary Links NON NLS 1 source Button new Button options SWT RADIO source Button set Text PDE Plugin get Resource String Import Wizard First Page source NON NLS 1  createImportOptionsGroup setText PDEPlugin getResourceString ImportWizard FirstPage importAs setLayout GridLayout setLayoutData GridData GridData FILL_HORIZONTAL binaryButton binaryButton setText PDEPlugin getResourceString ImportWizard FirstPage binaryWithLinksButton binaryWithLinksButton setText PDEPlugin getResourceString ImportWizard FirstPage binaryLinks sourceButton sourceButton setText PDEPlugin getResourceString ImportWizard FirstPage
private void initialize I Dialog Settings settings get Dialog Settings Array List items new Array List for int i 0 i 6 i String curr settings get SETTINGS DROPLOCATION String value Of i if curr null items contains curr items add curr drop Location set Items String items to Array new String items size if settings get Boolean SETTINGS DOOTHER runtime Location Button set Selection false change Button set Enabled false drop Location set Text items get 0 to String else runtime Location Button set Selection true other Location Label set Enabled false drop Location set Enabled false browse Button set Enabled false drop Location set Text get Target Home int import Type Resources Plugin get Plugin get Plugin Preferences get Boolean Resources Plugin PREF DISABLE LINKING Plugin Import Operation IMPORT BINARY Plugin Import Operation IMPORT BINARY WITH LINKS try import Type settings get Int SETTINGS IMPORTTYPE catch Number Format Exception e if import Type Plugin Import Operation IMPORT BINARY binary Button set Selection true else if import Type Plugin Import Operation IMPORT BINARY WITH LINKS binary With Links Button set Selection true else source Button set Selection true boolean scan true if settings get SETTINGS SCAN ALL null scan settings get Boolean SETTINGS SCAN ALL scan Button set Selection scan import Button set Selection scan  IDialogSettings getDialogSettings ArrayList ArrayList SETTINGS_DROPLOCATION valueOf dropLocation setItems toArray getBoolean SETTINGS_DOOTHER runtimeLocationButton setSelection changeButton setEnabled dropLocation setText toString runtimeLocationButton setSelection otherLocationLabel setEnabled dropLocation setEnabled browseButton setEnabled dropLocation setText getTargetHome importType ResourcesPlugin getPlugin getPluginPreferences getBoolean ResourcesPlugin PREF_DISABLE_LINKING PluginImportOperation IMPORT_BINARY PluginImportOperation IMPORT_BINARY_WITH_LINKS importType getInt SETTINGS_IMPORTTYPE NumberFormatException importType PluginImportOperation IMPORT_BINARY binaryButton setSelection importType PluginImportOperation IMPORT_BINARY_WITH_LINKS binaryWithLinksButton setSelection sourceButton setSelection SETTINGS_SCAN_ALL getBoolean SETTINGS_SCAN_ALL scanButton setSelection importButton setSelection
runtime Location Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean selected runtime Location Button get Selection if selected drop Location set Text get Target Home other Location Label set Enabled selected drop Location set Enabled selected browse Button set Enabled selected change Button set Enabled selected validate Drop Location  runtimeLocationButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent runtimeLocationButton getSelection dropLocation setText getTargetHome otherLocationLabel setEnabled dropLocation setEnabled browseButton setEnabled changeButton setEnabled validateDropLocation
change Button set Text PDE Plugin get Resource String Import Wizard First Page go To Target NON NLS 1 change Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Change Target Platform  changeButton setText PDEPlugin getResourceString ImportWizard FirstPage goToTarget changeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleChangeTargetPlatform
drop Location set Layout Data new Grid Data Grid Data FILL HORIZONTAL drop Location add Modify Listener new Modify Listener public void modify Text Modify Event e validate Drop Location  dropLocation setLayoutData GridData GridData FILL_HORIZONTAL dropLocation addModifyListener ModifyListener modifyText ModifyEvent validateDropLocation
browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Path chosen choose Drop Location if chosen null drop Location set Text chosen toOS String  browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent IPath chooseDropLocation dropLocation setText toOSString
source Locations set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END source Locations add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Source Locations  sourceLocations setLayoutData GridData GridData HORIZONTAL_ALIGN_END sourceLocations addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSourceLocations
env Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data FILL HORIZONTAL env Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Env Change  envButton setLayoutData GridData GridData HORIZONTAL_ALIGN_END GridData FILL_HORIZONTAL envButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleEnvChange
private void create Directory Group Composite parent Group composite new Group parent SWT NONE composite set Text PDE Plugin get Resource String Import Wizard First Page import From NON NLS 1 Grid Layout layout new Grid Layout layout num Columns 3 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL runtime Location Button new Button composite SWT CHECK Grid Data gd new Grid Data gd horizontal Span 2 runtime Location Button set Layout Data gd runtime Location Button set Text PDE Plugin get Resource String Import Wizard First Page target NON NLS 1 runtime Location Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean selected runtime Location Button get Selection if selected drop Location set Text get Target Home other Location Label set Enabled selected drop Location set Enabled selected browse Button set Enabled selected change Button set Enabled selected validate Drop Location change Button new Button composite SWT PUSH change Button set Text PDE Plugin get Resource String Import Wizard First Page go To Target NON NLS 1 change Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Change Target Platform change Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL SWT Util set Button Dimension Hint change Button other Location Label new Label composite SWT NULL other Location Label set Text PDE Plugin get Resource String Import Wizard First Page other Folder NON NLS 1 drop Location new Combo composite SWT DROP DOWN drop Location set Layout Data new Grid Data Grid Data FILL HORIZONTAL drop Location add Modify Listener new Modify Listener public void modify Text Modify Event e validate Drop Location browse Button new Button composite SWT PUSH browse Button set Text PDE Plugin get Resource String Import Wizard First Page browse NON NLS 1 browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Path chosen choose Drop Location if chosen null drop Location set Text chosen toOS String browse Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL SWT Util set Button Dimension Hint browse Button Label label new Label composite SWT NONE label set Text PDE Plugin get Resource String Import Wizard First Page source label NON NLS 1 gd new Grid Data gd horizontal Span 2 label set Layout Data gd Button source Locations new Button composite SWT PUSH source Locations set Text PDE Plugin get Resource String Import Wizard First Page code Locations NON NLS 1 source Locations set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END source Locations add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Source Locations SWT Util set Button Dimension Hint source Locations source Locations set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL label new Label composite SWT WRAP label set Text PDE Plugin get Resource String Import Wizard First Page variables NON NLS 1 gd new Grid Data gd horizontal Span 2 label set Layout Data gd Button env Button new Button composite SWT PUSH env Button set Text PDE Plugin get Resource String Import Wizard First Page env NON NLS 1 env Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data FILL HORIZONTAL env Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Env Change SWT Util set Button Dimension Hint env Button env Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL  createDirectoryGroup setText PDEPlugin getResourceString ImportWizard FirstPage importFrom GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_HORIZONTAL runtimeLocationButton GridData GridData horizontalSpan runtimeLocationButton setLayoutData runtimeLocationButton setText PDEPlugin getResourceString ImportWizard FirstPage runtimeLocationButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent runtimeLocationButton getSelection dropLocation setText getTargetHome otherLocationLabel setEnabled dropLocation setEnabled browseButton setEnabled changeButton setEnabled validateDropLocation changeButton changeButton setText PDEPlugin getResourceString ImportWizard FirstPage goToTarget changeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleChangeTargetPlatform changeButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL SWTUtil setButtonDimensionHint changeButton otherLocationLabel otherLocationLabel setText PDEPlugin getResourceString ImportWizard FirstPage otherFolder dropLocation DROP_DOWN dropLocation setLayoutData GridData GridData FILL_HORIZONTAL dropLocation addModifyListener ModifyListener modifyText ModifyEvent validateDropLocation browseButton browseButton setText PDEPlugin getResourceString ImportWizard FirstPage browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent IPath chooseDropLocation dropLocation setText toOSString browseButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL SWTUtil setButtonDimensionHint browseButton setText PDEPlugin getResourceString ImportWizard FirstPage GridData horizontalSpan setLayoutData sourceLocations sourceLocations setText PDEPlugin getResourceString ImportWizard FirstPage codeLocations sourceLocations setLayoutData GridData GridData HORIZONTAL_ALIGN_END sourceLocations addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSourceLocations SWTUtil setButtonDimensionHint sourceLocations sourceLocations setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL setText PDEPlugin getResourceString ImportWizard FirstPage GridData horizontalSpan setLayoutData envButton envButton setText PDEPlugin getResourceString ImportWizard FirstPage envButton setLayoutData GridData GridData HORIZONTAL_ALIGN_END GridData FILL_HORIZONTAL envButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleEnvChange SWTUtil setButtonDimensionHint envButton envButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL
private I Path choose Drop Location Directory Dialog dialog new Directory Dialog get Shell dialog set Filter Path drop Location get Text dialog set Text PDE Plugin get Resource String Import Wizard messages folder title NON NLS 1 dialog set Message PDE Plugin get Resource String Import Wizard messages folder message NON NLS 1 String res dialog open if res null return new Path res return null  IPath chooseDropLocation DirectoryDialog DirectoryDialog getShell setFilterPath dropLocation getText setText PDEPlugin getResourceString ImportWizard setMessage PDEPlugin getResourceString ImportWizard
private void handle Change Target Platform I Preference Node target Node new Target Platform Preference Node if show Preference Page target Node drop Location set Text External Model Manager get Eclipse Home toOS String  handleChangeTargetPlatform IPreferenceNode targetNode TargetPlatformPreferenceNode showPreferencePage targetNode dropLocation setText ExternalModelManager getEclipseHome toOSString
private void handle Source Locations I Preference Node source Node new Source Code Locations Preference Node show Preference Page source Node  handleSourceLocations IPreferenceNode sourceNode SourceCodeLocationsPreferenceNode showPreferencePage sourceNode
private void handle Env Change I Preference Node target Node new Target Environment Preference Node show Preference Page target Node  handleEnvChange IPreferenceNode targetNode TargetEnvironmentPreferenceNode showPreferencePage targetNode
Busy Indicator show While get Control get Display new Runnable public void run dialog create dialog set Message target Node get Label Text if dialog open Preference Dialog OK result 0 true  BusyIndicator showWhile getControl getDisplay setMessage targetNode getLabelText PreferenceDialog
private boolean show Preference Page final I Preference Node target Node Preference Manager manager new Preference Manager manager add To Root target Node final Preference Dialog dialog new Preference Dialog get Control get Shell manager final boolean result new boolean false Busy Indicator show While get Control get Display new Runnable public void run dialog create dialog set Message target Node get Label Text if dialog open Preference Dialog OK result 0 true return result 0  showPreferencePage IPreferenceNode targetNode PreferenceManager PreferenceManager addToRoot targetNode PreferenceDialog PreferenceDialog getControl getShell BusyIndicator showWhile getControl getDisplay setMessage targetNode getLabelText PreferenceDialog
private String get Target Home Preferences preferences PDE Core get Default get Plugin Preferences return preferences get String I Core Constants PLATFORM PATH  getTargetHome PDECore getDefault getPluginPreferences getString ICoreConstants PLATFORM_PATH
public boolean get Scan All Plugins return scan Button get Selection  getScanAllPlugins scanButton getSelection
public int get Import Type if binary Button get Selection return Plugin Import Operation IMPORT BINARY if binary With Links Button get Selection return Plugin Import Operation IMPORT BINARY WITH LINKS return Plugin Import Operation IMPORT WITH SOURCE  getImportType binaryButton getSelection PluginImportOperation IMPORT_BINARY binaryWithLinksButton getSelection PluginImportOperation IMPORT_BINARY_WITH_LINKS PluginImportOperation IMPORT_WITH_SOURCE
public String get Drop Location return runtime Location Button get Selection TARGET PLATFORM drop Location get Text trim  getDropLocation runtimeLocationButton getSelection TARGET_PLATFORM dropLocation getText
public void store Settings I Dialog Settings settings get Dialog Settings boolean other runtime Location Button get Selection if drop Location get Text length 0 other settings put SETTINGS DROPLOCATION String value Of 0 drop Location get Text trim String items drop Location get Items int n Entries Math min items length 5 for int i 0 i n Entries i settings put SETTINGS DROPLOCATION String value Of i 1 items i settings put SETTINGS DOOTHER other settings put SETTINGS IMPORTTYPE get Import Type settings put SETTINGS SCAN ALL get Scan All Plugins  storeSettings IDialogSettings getDialogSettings runtimeLocationButton getSelection dropLocation getText SETTINGS_DROPLOCATION valueOf dropLocation getText dropLocation getItems nEntries nEntries SETTINGS_DROPLOCATION valueOf SETTINGS_DOOTHER SETTINGS_IMPORTTYPE getImportType SETTINGS_SCAN_ALL getScanAllPlugins
public void dispose PDE Plugin get Default get Label Provider disconnect this  PDEPlugin getDefault getLabelProvider
private void validate Drop Location if runtime Location Button get Selection I Path curr new Path drop Location get Text if curr segment Count 0 curr get Device null set Error Message PDE Plugin get Resource String Import Wizard errors location Missing NON NLS 1 set Page Complete false return if Path ROOT is Valid Path drop Location get Text set Error Message PDE Plugin get Resource String Import Wizard errors build Folder Invalid NON NLS 1 set Page Complete false return if curr to File is Directory set Error Message PDE Plugin get Resource String Import Wizard errors build Folder Missing NON NLS 1 set Page Complete false return if curr equals new Path get Target Home set Error Message null set Message PDE Plugin get Resource String Import Wizard First Page warning Dialog Page WARNING NON NLS 1 set Page Complete true return set Error Message null set Page Complete true set Message PDE Plugin get Resource String Import Wizard First Page desc NON NLS 1  validateDropLocation runtimeLocationButton getSelection IPath dropLocation getText segmentCount getDevice setErrorMessage PDEPlugin getResourceString ImportWizard locationMissing setPageComplete isValidPath dropLocation getText setErrorMessage PDEPlugin getResourceString ImportWizard buildFolderInvalid setPageComplete toFile isDirectory setErrorMessage PDEPlugin getResourceString ImportWizard buildFolderMissing setPageComplete getTargetHome setErrorMessage setMessage PDEPlugin getResourceString ImportWizard FirstPage DialogPage setPageComplete setErrorMessage setPageComplete setMessage PDEPlugin getResourceString ImportWizard FirstPage
private void resolve Target Platform I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor models PDE Core get Default get External Model Manager get All Models monitor done  resolveTargetPlatform IRunnableWithProgress IRunnableWithProgress IProgressMonitor PDECore getDefault getExternalModelManager getAllModels
private void resolve Target Platform I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor models PDE Core get Default get External Model Manager get All Models monitor done try get Container run true false op catch Throwable e PDE Plugin log Exception e  resolveTargetPlatform IRunnableWithProgress IRunnableWithProgress IProgressMonitor PDECore getDefault getExternalModelManager getAllModels getContainer PDEPlugin logException
I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor File files new File 2 files 0 new File location files 1 new File location plugins NON NLS 1 URL urls Plugin Path Finder scan Locations files models Target Platform Registry Loader load Models urls false monitor monitor done  IRunnableWithProgress IRunnableWithProgress IProgressMonitor PluginPathFinder scanLocations TargetPlatformRegistryLoader loadModels
private void resolve Arbitrary Location final String location I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor File files new File 2 files 0 new File location files 1 new File location plugins NON NLS 1 URL urls Plugin Path Finder scan Locations files models Target Platform Registry Loader load Models urls false monitor monitor done try get Container run true false op catch Throwable e PDE Plugin log Exception e  resolveArbitraryLocation IRunnableWithProgress IRunnableWithProgress IProgressMonitor PluginPathFinder scanLocations TargetPlatformRegistryLoader loadModels getContainer PDEPlugin logException
public I Plugin Model Base get Models String drop Location get Drop Location if drop Location equals TARGET PLATFORM resolve Target Platform else resolve Arbitrary Location drop Location return models  IPluginModelBase getModels dropLocation getDropLocation dropLocation TARGET_PLATFORM resolveTargetPlatform resolveArbitraryLocation dropLocation

public class Show Target Platform Action extends Action public void run I Preference Node target Node new Target Platform Preference Node boolean result show Preference Page target Node notify Result result  ShowTargetPlatformAction IPreferenceNode targetNode TargetPlatformPreferenceNode showPreferencePage targetNode notifyResult
Busy Indicator show While shell get Display new Runnable public void run dialog create dialog set Message target Node get Label Text if dialog open Preference Dialog OK result 0 true  BusyIndicator showWhile getDisplay setMessage targetNode getLabelText PreferenceDialog
private boolean show Preference Page final I Preference Node target Node Preference Manager manager new Preference Manager manager add To Root target Node Shell shell PlatformUI get Workbench get Active Workbench Window get Shell final Preference Dialog dialog new Preference Dialog shell manager final boolean result new boolean false Busy Indicator show While shell get Display new Runnable public void run dialog create dialog set Message target Node get Label Text if dialog open Preference Dialog OK result 0 true return result 0  showPreferencePage IPreferenceNode targetNode PreferenceManager PreferenceManager addToRoot targetNode getWorkbench getActiveWorkbenchWindow getShell PreferenceDialog PreferenceDialog BusyIndicator showWhile getDisplay setMessage targetNode getLabelText PreferenceDialog

public interface I Project Provider Returns the new plug in project handle This method will cause project creation if not created already return the handle of the new plug in project  IProjectProvider
I Project get Project Returns the name of the plug in project that will be created This method can be called at any time without forcing the project resource creation return new project name  IProject getProject
String get Project Name Returns an absolute path of the new plug in project that will be created This method can be called at any time without forcing the project resource creation return absolute project location path  getProjectName

public class List Util static class Name Sorter extends Viewer Sorter public boolean is Sorter Property Object element Object property Id return property Id equals I Basic Property Constants P TEXT  ListUtil NameSorter ViewerSorter isSorterProperty propertyId propertyId IBasicPropertyConstants P_TEXT
static class Feature Sorter extends Name Sorter public int compare Viewer viewer Object e1 Object e2 if e1 instanceof I Feature Model e2 instanceof I Feature Model I Feature feature1 I Feature Model e1 get Feature I Feature feature2 I Feature Model e2 get Feature int result collator compare feature1 get Id feature2 get Id if result 0 return result return super compare viewer e1 e2  FeatureSorter NameSorter IFeatureModel IFeatureModel IFeature IFeatureModel getFeature IFeature IFeatureModel getFeature getId getId
public static class Plugin Sorter extends Name Sorter public int compare Viewer viewer Object e1 Object e2 int result 0 String name1 get Name e1 String name2 get Name e2 if name1 null name2 null result collator compare name1 name2 return result 0 result super compare viewer e1 e2  PluginSorter NameSorter getName getName
private String get Name Object object if object instanceof I Plugin Base return get Plugin Name I Plugin Base object if object instanceof I Plugin Model Base return get Plugin Name I Plugin Model Base object get Plugin Base if object instanceof Model Entry return get Plugin Name Model Entry object get Active Model get Plugin Base return null  getName IPluginBase getPluginName IPluginBase IPluginModelBase getPluginName IPluginModelBase getPluginBase ModelEntry getPluginName ModelEntry getActiveModel getPluginBase
private String get Plugin Name I Plugin Base plugin Base return PDE Plugin is Full Name Mode Enabled plugin Base get Translated Name plugin Base get Id  getPluginName IPluginBase pluginBase PDEPlugin isFullNameModeEnabled pluginBase getTranslatedName pluginBase getId
static class Table Label Provider extends Element Label Provider implements I Table Label Provider public String get Column Text Object o int index return get Text o  TableLabelProvider ElementLabelProvider ITableLabelProvider getColumnText getText
return get Text o public Image get Column Image Object o int index return get Image o  getText getColumnImage getImage
public static final I Label Provider TABLE LABEL PROVIDER new Table Label Provider public List Util super  ILabelProvider TABLE_LABEL_PROVIDER TableLabelProvider ListUtil

private Dictionary default Values public New Wizard super set Window Title PDE Plugin get Resource String KEY WTITLE  defaultValues NewWizard setWindowTitle PDEPlugin getResourceString KEY_WTITLE
set Window Title PDE Plugin get Resource String KEY WTITLE public org eclipse jface viewers I Structured Selection get Selection return selection  setWindowTitle PDEPlugin getResourceString KEY_WTITLE IStructuredSelection getSelection
return selection public I Workbench get Workbench return workbench  IWorkbench getWorkbench
return workbench public void init I Workbench workbench I Structured Selection selection this workbench workbench this selection selection  IWorkbench IStructuredSelection
this selection selection public boolean perform Finish return true  performFinish
see org eclipse pde internal ui wizards I Default Value Consumer get Default Value java lang String public String get Default Value String key if default Values null return null return String default Values get key  IDefaultValueConsumer getDefaultValue getDefaultValue defaultValues defaultValues
see org eclipse pde internal ui wizards I Default Value Consumer init java util Dictionary public void init Dictionary default Values this default Values default Values  IDefaultValueConsumer defaultValues defaultValues defaultValues

see org eclipse pde ui I Field Data2 get Id public String get Id return f Id  IFieldData2 getId getId fId
see org eclipse pde ui I Field Data2 get Version public String get Version return f Version  IFieldData2 getVersion getVersion fVersion
see org eclipse pde ui I Field Data2 get Name public String get Name return f Name  IFieldData2 getName getName fName
see org eclipse pde ui I Field Data2 get Provider public String get Provider return f Provider  IFieldData2 getProvider getProvider fProvider
public boolean is Legacy return f Is Legacy  isLegacy fIsLegacy
see org eclipse pde ui I Field Data2 get Library Name public String get Library Name return f Library Name  IFieldData2 getLibraryName getLibraryName fLibraryName
see org eclipse pde ui I Field Data2 get Source Folder Name public String get Source Folder Name return f Source Folder Name  IFieldData2 getSourceFolderName getSourceFolderName fSourceFolderName
see org eclipse pde ui I Field Data2 get Output Folder Name public String get Output Folder Name return f Output Folder Name  IFieldData2 getOutputFolderName getOutputFolderName fOutputFolderName
see org eclipse pde ui I Field Data2 has Bundle Structure public boolean has Bundle Structure return f Has Bundle Structure  IFieldData2 hasBundleStructure hasBundleStructure fHasBundleStructure
see org eclipse pde ui I Field Data2 is Simple public boolean is Simple return f Is Simple  IFieldData2 isSimple isSimple fIsSimple
public void set Id String id f Id id  setId fId
public void set Name String name f Name name  setName fName
public void set Provider String provider f Provider provider  setProvider fProvider
public void set Version String version f Version version  setVersion fVersion
public void set Is Legacy boolean is Legacy f Is Legacy is Legacy  setIsLegacy isLegacy fIsLegacy isLegacy
public void set Library Name String name f Library Name name  setLibraryName fLibraryName
public void set Source Folder Name String name f Source Folder Name name  setSourceFolderName fSourceFolderName
public void set Output Folder Name String name f Output Folder Name name  setOutputFolderName fOutputFolderName
public void set Has Bundle Structure boolean is Bundle f Has Bundle Structure is Bundle  setHasBundleStructure isBundle fHasBundleStructure isBundle
public void set Is Simple boolean simple f Is Simple simple  setIsSimple fIsSimple

protected int f Changed Groups 0 protected Modify Listener listener new Modify Listener public void modify Text Modify Event e validate Page  fChangedGroups ModifyListener ModifyListener modifyText ModifyEvent validatePage
protected Modify Listener properties Listener new Modify Listener public void modify Text Modify Event e if is Initialized f Changed Groups PROPERTIES GROUP validate Page  ModifyListener propertiesListener ModifyListener modifyText ModifyEvent isInitialized fChangedGroups PROPERTIES_GROUP validatePage
public Content Page String page Name I Project Provider provider New Project Creation Page page Abstract Field Data data boolean is Fragment super page Name creation Page page f Is Fragment is Fragment f Project Provider provider f Data data if is Fragment set Title PDE Plugin get Resource String Content Page ftitle NON NLS 1 set Description PDE Plugin get Resource String Content Page fdesc NON NLS 1 else set Title PDE Plugin get Resource String Content Page title NON NLS 1 set Description PDE Plugin get Resource String Content Page desc NON NLS 1  ContentPage pageName IProjectProvider NewProjectCreationPage AbstractFieldData isFragment pageName creationPage fIsFragment isFragment fProjectProvider fData isFragment setTitle PDEPlugin getResourceString ContentPage setDescription PDEPlugin getResourceString ContentPage setTitle PDEPlugin getResourceString ContentPage setDescription PDEPlugin getResourceString ContentPage
public void create Control Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout vertical Spacing 10 container set Layout layout create Property Controls container f Legacy Button new Button container SWT CHECK Grid Data gd new Grid Data gd horizontal Span 2 f Legacy Button set Layout Data gd f Legacy Button set Text PDE Plugin get Resource String Content Page legacy NON NLS 1 f Legacy Button set Selection PDE Core get Default get Model Manager isOS Gi Runtime Dialog apply Dialog Font container set Control container  createControl GridLayout GridLayout numColumns verticalSpacing setLayout createPropertyControls fLegacyButton GridData GridData horizontalSpan fLegacyButton setLayoutData fLegacyButton setText PDEPlugin getResourceString ContentPage fLegacyButton setSelection PDECore getDefault getModelManager isOSGiRuntime applyDialogFont setControl
protected abstract void create Property Controls Composite container  createPropertyControls
protected Text create Text Composite parent Modify Listener listener Text text new Text parent SWT BORDER SWT SINGLE text set Layout Data new Grid Data Grid Data FILL HORIZONTAL text add Modify Listener listener return text  createText ModifyListener setLayoutData GridData GridData FILL_HORIZONTAL addModifyListener
protected void validate Page set Message null String error Message validate Id if error Message null if f Version Text get Text trim length 0 error Message PDE Plugin get Resource String Content Page noversion NON NLS 1 else if is Version Valid f Version Text get Text trim error Message PDE Plugin get Resource String Content Page badversion NON NLS 1 else if f Name Text get Text trim length 0 error Message PDE Plugin get Resource String Content Page noname NON NLS 1 if error Message null if creation Page is Java Project f Library Text get Text trim length 0 error Message PDE Plugin get Resource String Project Structure Page no Library NON NLS 1 if f Is Fragment String pluginID f Plugin Id Text get Text trim if pluginID length 0 error Message PDE Plugin get Resource String Content Page nopid NON NLS 1 else if PDE Core get Default get Model Manager find Entry pluginID null error Message PDE Plugin get Resource String Content Page plugin Not Found NON NLS 1 else if f Plugin Version get Text trim length 0 error Message PDE Plugin get Resource String Content Page nopversion NON NLS 1 else if is Version Valid f Plugin Version get Text trim error Message PDE Plugin get Resource String Content Page badpversion NON NLS 1 else if f Generate Class is Enabled f Generate Class get Selection I Status status Java Conventions validate Java Type Name f Class Text get Text trim if status get Severity I Status ERROR error Message status get Message else if status get Severity I Status WARNING set Message status get Message Dialog Page WARNING if is Initialized set Error Message error Message else set Error Message null set Page Complete error Message null  validatePage setMessage errorMessage validateId errorMessage fVersionText getText errorMessage PDEPlugin getResourceString ContentPage isVersionValid fVersionText getText errorMessage PDEPlugin getResourceString ContentPage fNameText getText errorMessage PDEPlugin getResourceString ContentPage errorMessage creationPage isJavaProject fLibraryText getText errorMessage PDEPlugin getResourceString ProjectStructurePage noLibrary fIsFragment fPluginIdText getText errorMessage PDEPlugin getResourceString ContentPage PDECore getDefault getModelManager findEntry errorMessage PDEPlugin getResourceString ContentPage pluginNotFound fPluginVersion getText errorMessage PDEPlugin getResourceString ContentPage isVersionValid fPluginVersion getText errorMessage PDEPlugin getResourceString ContentPage fGenerateClass isEnabled fGenerateClass getSelection IStatus JavaConventions validateJavaTypeName fClassText getText getSeverity IStatus errorMessage getMessage getSeverity IStatus setMessage getMessage DialogPage isInitialized setErrorMessage errorMessage setErrorMessage setPageComplete errorMessage
private String validate Id String id f Id Text get Text trim if id length 0 return PDE Plugin get Resource String Content Page noid NON NLS 1 String Tokenizer stok new String Tokenizer id NON NLS 1 while stok has More Tokens String token stok next Token for int i 0 i token length i if Character is Letter Or Digit token char At i   token char At i return PDE Plugin get Resource String Content Page invalid Id NON NLS 1 return null  validateId fIdText getText PDEPlugin getResourceString ContentPage StringTokenizer StringTokenizer hasMoreTokens nextToken isLetterOrDigit charAt _ charAt PDEPlugin getResourceString ContentPage invalidId
private boolean is Version Valid String version try new Plugin Version Identifier version catch Exception e return false return true  isVersionValid PluginVersionIdentifier
public void set Visible boolean visible if visible if creation Page has Bundle Structure f Legacy Button set Enabled false else f Legacy Button set Enabled true f Library Label set Enabled creation Page is Java Project f Library Text set Enabled creation Page is Java Project if f Is Fragment if creation Page is Java Project f Generate Class set Enabled false f Class Label set Enabled false f Class Text set Enabled false fUI Plugin set Enabled false else f Generate Class set Enabled true if f Generate Class get Selection f Class Label set Enabled true f Class Text set Enabled true fUI Plugin set Enabled true if visible String id compute Id properties group if f Changed Groups PROPERTIES GROUP 0 int oldf Changed f Changed Groups f Id Text set Text id f Version Text set Text 1 0 0 NON NLS 1 preset Name Field id preset Provider Field id preset Library Field id f Changed Groups oldf Changed plugin class group if f Is Fragment f Changed Groups P CLASS GROUP 0 int oldf Changed f Changed Groups preset Class Field id f Changed Groups oldf Changed if is Initialized validate Page is Initialized true else update Data super set Visible visible  setVisible creationPage hasBundleStructure fLegacyButton setEnabled fLegacyButton setEnabled fLibraryLabel setEnabled creationPage isJavaProject fLibraryText setEnabled creationPage isJavaProject fIsFragment creationPage isJavaProject fGenerateClass setEnabled fClassLabel setEnabled fClassText setEnabled fUIPlugin setEnabled fGenerateClass setEnabled fGenerateClass getSelection fClassLabel setEnabled fClassText setEnabled fUIPlugin setEnabled computeId fChangedGroups PROPERTIES_GROUP oldfChanged fChangedGroups fIdText setText fVersionText setText presetNameField presetProviderField presetLibraryField fChangedGroups oldfChanged fIsFragment fChangedGroups P_CLASS_GROUP oldfChanged fChangedGroups presetClassField fChangedGroups oldfChanged isInitialized validatePage isInitialized updateData setVisible
private String compute Id return f Project Provider get Project Name replace All a zA Z0 9     NON NLS 1 NON NLS 2  computeId fProjectProvider getProjectName replaceAll _ _
private void preset Library Field String id String Tokenizer tok new String Tokenizer id NON NLS 1 while tok has More Tokens String token tok next Token if tok has More Tokens f Library Text set Text token jar NON NLS 1  presetLibraryField StringTokenizer StringTokenizer hasMoreTokens nextToken hasMoreTokens fLibraryText setText
private void preset Name Field String id String Tokenizer tok new String Tokenizer id NON NLS 1 while tok has More Tokens String token tok next Token if tok has More Tokens f Name Text set Text Character to Upper Case token char At 0 token length 1 token substring 1 NON NLS 1 f Is Fragment PDE Plugin get Resource String Content Page fragment PDE Plugin get Resource String Content Page plugin NON NLS 1 NON NLS 2 NON NLS 3  presetNameField StringTokenizer StringTokenizer hasMoreTokens nextToken hasMoreTokens fNameText setText toUpperCase charAt fIsFragment PDEPlugin getResourceString ContentPage PDEPlugin getResourceString ContentPage
private void preset Provider Field String id String Tokenizer tok new String Tokenizer id NON NLS 1 int count tok count Tokens if count 2 tok next Token equals com NON NLS 1 f Provider Text set Text tok next Token to Upper Case  presetProviderField StringTokenizer StringTokenizer countTokens nextToken fProviderText setText nextToken toUpperCase
private void preset Class Field String id String Buffer buffer new String Buffer for int i 0 i id length i char ch id char At i if buffer length 0 if Character is Java Identifier Start ch buffer append ch else if Character is Java Identifier Part ch ch buffer append ch String Tokenizer tok new String Tokenizer buffer to String NON NLS 1 while tok has More Tokens String token tok next Token if tok has More Tokens buffer append Character to Upper Case token char At 0 token substring 1 Plugin NON NLS 1 NON NLS 2 f Class Text set Text buffer to String  presetClassField StringBuffer StringBuffer charAt isJavaIdentifierStart isJavaIdentifierPart StringTokenizer StringTokenizer toString hasMoreTokens nextToken hasMoreTokens toUpperCase charAt fClassText setText toString
public void update Data f Data set Id f Id Text get Text trim f Data set Version f Version Text get Text trim f Data set Name f Name Text get Text trim f Data set Provider f Provider Text get Text trim f Data set Is Legacy f Legacy Button is Enabled f Legacy Button get Selection if creation Page is Java Project String library f Library Text get Text trim if library ends With jar NON NLS 1 library jar NON NLS 1 f Data set Library Name library  updateData fData setId fIdText getText fData setVersion fVersionText getText fData setName fNameText getText fData setProvider fProviderText getText fData setIsLegacy fLegacyButton isEnabled fLegacyButton getSelection creationPage isJavaProject fLibraryText getText endsWith fData setLibraryName
public I Field Data get Data return f Data  IFieldData getData fData
public String get Id return f Id Text get Text trim  getId fIdText getText

public class Fragment Content Page extends Content Page public Fragment Content Page String page Name I Project Provider provider New Project Creation Page page Abstract Field Data data super page Name provider page data true  FragmentContentPage ContentPage FragmentContentPage pageName IProjectProvider NewProjectCreationPage AbstractFieldData pageName
public void create Property Controls Composite container Group properties Group new Group container SWT NONE Grid Layout layout new Grid Layout 2 false layout margin Width 5 properties Group set Layout layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 properties Group set Layout Data gd properties Group set Text PDE Plugin get Resource String Content Page f Group NON NLS 1 Label label new Label properties Group SWT NONE label set Text PDE Plugin get Resource String Content Page fid NON NLS 1 f Id Text create Text properties Group properties Listener label new Label properties Group SWT NONE label set Text PDE Plugin get Resource String Content Page fversion NON NLS 1 f Version Text create Text properties Group properties Listener label new Label properties Group SWT NONE label set Text PDE Plugin get Resource String Content Page fname NON NLS 1 f Name Text create Text properties Group properties Listener label new Label properties Group SWT NONE label set Text PDE Plugin get Resource String Content Page fprovider NON NLS 1 f Provider Text create Text properties Group properties Listener f Library Label new Label properties Group SWT NONE f Library Label set Text PDE Plugin get Resource String Project Structure Page library NON NLS 1 f Library Text create Text properties Group properties Listener add Fragment Specific Controls container  createPropertyControls propertiesGroup GridLayout GridLayout marginWidth propertiesGroup setLayout GridData GridData GridData FILL_HORIZONTAL horizontalSpan propertiesGroup setLayoutData propertiesGroup setText PDEPlugin getResourceString ContentPage fGroup propertiesGroup setText PDEPlugin getResourceString ContentPage fIdText createText propertiesGroup propertiesListener propertiesGroup setText PDEPlugin getResourceString ContentPage fVersionText createText propertiesGroup propertiesListener propertiesGroup setText PDEPlugin getResourceString ContentPage fNameText createText propertiesGroup propertiesListener propertiesGroup setText PDEPlugin getResourceString ContentPage fProviderText createText propertiesGroup propertiesListener fLibraryLabel propertiesGroup fLibraryLabel setText PDEPlugin getResourceString ProjectStructurePage fLibraryText createText propertiesGroup propertiesListener addFragmentSpecificControls
param container private void add Fragment Specific Controls Composite container Group parent Group new Group container SWT NONE Grid Layout layout new Grid Layout 2 false layout margin Width 5 parent Group set Layout layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 parent Group set Layout Data gd parent Group set Text PDE Plugin get Resource String Content Page parent Plugin Group NON NLS 1 Label label new Label parent Group SWT NONE label set Text PDE Plugin get Resource String Content Page pid NON NLS 1 create Plugin Id Container parent Group label new Label parent Group SWT NONE label set Text PDE Plugin get Resource String Content Page pversion NON NLS 1 f Plugin Version create Text parent Group listener label new Label parent Group SWT NONE label set Text PDE Plugin get Resource String PDE Plugin get Resource String Content Page match Rule NON NLS 1 f Match Combo new Combo parent Group SWT READ ONLY SWT BORDER f Match Combo set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Match Combo set Items new String NON NLS 1 PDE Plugin get Resource String KEY MATCH EQUIVALENT PDE Plugin get Resource String KEY MATCH COMPATIBLE PDE Plugin get Resource String KEY MATCH PERFECT PDE Plugin get Resource String KEY MATCH GREATER f Match Combo set Text f Match Combo get Item 0  addFragmentSpecificControls parentGroup GridLayout GridLayout marginWidth parentGroup setLayout GridData GridData GridData FILL_HORIZONTAL horizontalSpan parentGroup setLayoutData parentGroup setText PDEPlugin getResourceString ContentPage parentPluginGroup parentGroup setText PDEPlugin getResourceString ContentPage createPluginIdContainer parentGroup parentGroup setText PDEPlugin getResourceString ContentPage fPluginVersion createText parentGroup parentGroup setText PDEPlugin getResourceString PDEPlugin getResourceString ContentPage matchRule fMatchCombo parentGroup READ_ONLY fMatchCombo setLayoutData GridData GridData FILL_HORIZONTAL fMatchCombo setItems PDEPlugin getResourceString KEY_MATCH_EQUIVALENT PDEPlugin getResourceString KEY_MATCH_COMPATIBLE PDEPlugin getResourceString KEY_MATCH_PERFECT PDEPlugin getResourceString KEY_MATCH_GREATER fMatchCombo setText fMatchCombo getItem
public void run Plugin Selection Dialog dialog new Plugin Selection Dialog f Plugin Id Text get Shell false false dialog create if dialog open Plugin Selection Dialog OK I Plugin Model model I Plugin Model dialog get First Result I Plugin plugin model get Plugin f Plugin Id Text set Text plugin get Id f Plugin Version set Text plugin get Version  PluginSelectionDialog PluginSelectionDialog fPluginIdText getShell PluginSelectionDialog IPluginModel IPluginModel getFirstResult IPlugin getPlugin fPluginIdText setText getId fPluginVersion setText getVersion
public void widget Selected Selection Event e Busy Indicator show While f Plugin Id Text get Display new Runnable public void run Plugin Selection Dialog dialog new Plugin Selection Dialog f Plugin Id Text get Shell false false dialog create if dialog open Plugin Selection Dialog OK I Plugin Model model I Plugin Model dialog get First Result I Plugin plugin model get Plugin f Plugin Id Text set Text plugin get Id f Plugin Version set Text plugin get Version  widgetSelected SelectionEvent BusyIndicator showWhile fPluginIdText getDisplay PluginSelectionDialog PluginSelectionDialog fPluginIdText getShell PluginSelectionDialog IPluginModel IPluginModel getFirstResult IPlugin getPlugin fPluginIdText setText getId fPluginVersion setText getVersion
private void create Plugin Id Container Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height layout margin Width 0 container set Layout layout container set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Plugin Id Text create Text container listener Button browse new Button container SWT PUSH browse set Text PDE Plugin get Resource String Content Page browse NON NLS 1 browse set Layout Data new Grid Data browse add Selection Listener new Selection Adapter public void widget Selected Selection Event e Busy Indicator show While f Plugin Id Text get Display new Runnable public void run Plugin Selection Dialog dialog new Plugin Selection Dialog f Plugin Id Text get Shell false false dialog create if dialog open Plugin Selection Dialog OK I Plugin Model model I Plugin Model dialog get First Result I Plugin plugin model get Plugin f Plugin Id Text set Text plugin get Id f Plugin Version set Text plugin get Version SWT Util set Button Dimension Hint browse  createPluginIdContainer GridLayout GridLayout numColumns marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_HORIZONTAL fPluginIdText createText setText PDEPlugin getResourceString ContentPage setLayoutData GridData addSelectionListener SelectionAdapter widgetSelected SelectionEvent BusyIndicator showWhile fPluginIdText getDisplay PluginSelectionDialog PluginSelectionDialog fPluginIdText getShell PluginSelectionDialog IPluginModel IPluginModel getFirstResult IPlugin getPlugin fPluginIdText setText getId fPluginVersion setText getVersion SWTUtil setButtonDimensionHint
public void update Data super update Data Fragment Field Data f Data set Plugin Id f Plugin Id Text get Text trim Fragment Field Data f Data set Plugin Version f Plugin Version get Text trim Fragment Field Data f Data set Match f Match Combo get Selection Index  updateData updateData FragmentFieldData fData setPluginId fPluginIdText getText FragmentFieldData fData setPluginVersion fPluginVersion getText FragmentFieldData fData setMatch fMatchCombo getSelectionIndex

see org eclipse pde ui I Fragment Field Data get Plugin Id public String get Plugin Id return f Plugin Id  IFragmentFieldData getPluginId getPluginId fPluginId
see org eclipse pde ui I Fragment Field Data get Plugin Version public String get Plugin Version return f Plugin Version  IFragmentFieldData getPluginVersion getPluginVersion fPluginVersion
see org eclipse pde ui I Fragment Field Data get Match public int get Match return f Match  IFragmentFieldData getMatch getMatch fMatch
public void set Plugin Id String id f Plugin Id id  setPluginId fPluginId
public void set Plugin Version String version f Plugin Version version  setPluginVersion fPluginVersion
public void set Match int match f Match match  setMatch fMatch

public New Fragment Project Wizard set Default Page Image Descriptor PDE Plugin Images DESC NEWFRAGPRJ WIZ set Window Title PDE Plugin get Resource String New Fragment Project Wizard title NON NLS 1 set Needs Progress Monitor true PDE Plugin get Default get Label Provider connect this f Fragment Data new Fragment Field Data  NewFragmentProjectWizard setDefaultPageImageDescriptor PDEPluginImages DESC_NEWFRAGPRJ_WIZ setWindowTitle PDEPlugin getResourceString NewFragmentProjectWizard setNeedsProgressMonitor PDEPlugin getDefault getLabelProvider fFragmentData FragmentFieldData
f Project Provider new I Project Provider public String get Project Name return f Main Page get Project Name  fProjectProvider IProjectProvider getProjectName fMainPage getProjectName
return f Main Page get Project Name public I Project get Project return f Main Page get Project Handle  fMainPage getProjectName IProject getProject fMainPage getProjectHandle
return f Main Page get Project Handle public I Path get Location Path return f Main Page get Location Path  fMainPage getProjectHandle IPath getLocationPath fMainPage getLocationPath
public void add Pages f Main Page new New Project Creation Page main f Fragment Data true NON NLS 1 f Main Page set Title PDE Plugin get Resource String New Project Wizard Main Page ftitle NON NLS 1 f Main Page set Description PDE Plugin get Resource String New Project Wizard Main Page fdesc NON NLS 1 add Page f Main Page f Project Provider new I Project Provider public String get Project Name return f Main Page get Project Name public I Project get Project return f Main Page get Project Handle public I Path get Location Path return f Main Page get Location Path f Content Page new Fragment Content Page page2 f Project Provider f Main Page f Fragment Data NON NLS 1 add Page f Content Page  addPages fMainPage NewProjectCreationPage fFragmentData fMainPage setTitle PDEPlugin getResourceString NewProjectWizard MainPage fMainPage setDescription PDEPlugin getResourceString NewProjectWizard MainPage addPage fMainPage fProjectProvider IProjectProvider getProjectName fMainPage getProjectName IProject getProject fMainPage getProjectHandle IPath getLocationPath fMainPage getLocationPath fContentPage FragmentContentPage fProjectProvider fMainPage fFragmentData addPage fContentPage
see org eclipse jface wizard Wizard can Finish public boolean can Finish I Wizard Page page get Container get Current Page return page is Page Complete page f Main Page  canFinish canFinish IWizardPage getContainer getCurrentPage isPageComplete fMainPage
public boolean perform Finish try f Main Page update Data f Content Page update Data Basic New Project Resource Wizard update Perspective f Config get Container run false true new New Project Creation Operation f Fragment Data f Project Provider null return true catch Invocation Target Exception e PDE Plugin log Exception e catch Interrupted Exception e return false  performFinish fMainPage updateData fContentPage updateData BasicNewProjectResourceWizard updatePerspective fConfig getContainer NewProjectCreationOperation fFragmentData fProjectProvider InvocationTargetException PDEPlugin logException InterruptedException
see org eclipse jface wizard Wizard dispose public void dispose super dispose PDE Plugin get Default get Label Provider disconnect this  PDEPlugin getDefault getLabelProvider
see org eclipse core runtime I Executable Extension set Initialization Data org eclipse core runtime I Configuration Element java lang String java lang Object public void set Initialization Data I Configuration Element config String property Name Object data throws Core Exception f Config config  IExecutableExtension setInitializationData IConfigurationElement setInitializationData IConfigurationElement propertyName CoreException fConfig

public New Plugin Project Wizard set Default Page Image Descriptor PDE Plugin Images DESC NEWPPRJ WIZ set Dialog Settings PDE Plugin get Default get Dialog Settings set Window Title PDE Plugin get Resource String New Project Wizard title NON NLS 1 set Needs Progress Monitor true PDE Plugin get Default get Label Provider connect this f Plugin Data new Plugin Field Data  NewPluginProjectWizard setDefaultPageImageDescriptor PDEPluginImages DESC_NEWPPRJ_WIZ setDialogSettings PDEPlugin getDefault getDialogSettings setWindowTitle PDEPlugin getResourceString NewProjectWizard setNeedsProgressMonitor PDEPlugin getDefault getLabelProvider fPluginData PluginFieldData
f Project Provider new I Project Provider public String get Project Name return f Main Page get Project Name  fProjectProvider IProjectProvider getProjectName fMainPage getProjectName
return f Main Page get Project Name public I Project get Project return f Main Page get Project Handle  fMainPage getProjectName IProject getProject fMainPage getProjectHandle
return f Main Page get Project Handle public I Path get Location Path return f Main Page get Location Path  fMainPage getProjectHandle IPath getLocationPath fMainPage getLocationPath
public void add Pages f Main Page new New Project Creation Page main f Plugin Data false NON NLS 1 f Main Page set Title PDE Plugin get Resource String New Project Wizard Main Page title NON NLS 1 f Main Page set Description PDE Plugin get Resource String New Project Wizard Main Page desc NON NLS 1 String pname get Default Value DEF PROJECT NAME if pname null f Main Page set Initial Project Name pname add Page f Main Page f Project Provider new I Project Provider public String get Project Name return f Main Page get Project Name public I Project get Project return f Main Page get Project Handle public I Path get Location Path return f Main Page get Location Path f Content Page new Plugin Content Page page2 f Project Provider f Main Page f Plugin Data NON NLS 1 f Wizard List Page new Template List Selection Page get Available Codegen Wizards f Content Page PDE Plugin get Resource String Wizard List Selection Page templates NON NLS 1 String tid get Default Value DEF TEMPLATE ID if tid null f Wizard List Page set Initial Template Id tid add Page f Content Page add Page f Wizard List Page  addPages fMainPage NewProjectCreationPage fPluginData fMainPage setTitle PDEPlugin getResourceString NewProjectWizard MainPage fMainPage setDescription PDEPlugin getResourceString NewProjectWizard MainPage getDefaultValue DEF_PROJECT_NAME fMainPage setInitialProjectName addPage fMainPage fProjectProvider IProjectProvider getProjectName fMainPage getProjectName IProject getProject fMainPage getProjectHandle IPath getLocationPath fMainPage getLocationPath fContentPage PluginContentPage fProjectProvider fMainPage fPluginData fWizardListPage TemplateListSelectionPage getAvailableCodegenWizards fContentPage PDEPlugin getResourceString WizardListSelectionPage getDefaultValue DEF_TEMPLATE_ID fWizardListPage setInitialTemplateId addPage fContentPage addPage fWizardListPage
see org eclipse jface wizard Wizard can Finish public boolean can Finish I Wizard Page page get Container get Current Page return page is Page Complete page f Main Page  canFinish canFinish IWizardPage getContainer getCurrentPage isPageComplete fMainPage
public boolean perform Finish try f Main Page update Data f Content Page update Data Basic New Project Resource Wizard update Perspective f Config I Plugin Content Wizard content Wizard f Wizard List Page get Selected Wizard get Container run false true new New Project Creation Operation f Plugin Data f Project Provider content Wizard return true catch Invocation Target Exception e PDE Plugin log Exception e catch Interrupted Exception e return false  performFinish fMainPage updateData fContentPage updateData BasicNewProjectResourceWizard updatePerspective fConfig IPluginContentWizard contentWizard fWizardListPage getSelectedWizard getContainer NewProjectCreationOperation fPluginData fProjectProvider contentWizard InvocationTargetException PDEPlugin logException InterruptedException
see org eclipse jface wizard Wizard dispose public void dispose super dispose PDE Plugin get Default get Label Provider disconnect this  PDEPlugin getDefault getLabelProvider
see org eclipse core runtime I Executable Extension set Initialization Data org eclipse core runtime I Configuration Element java lang String java lang Object public void set Initialization Data I Configuration Element config String property Name Object data throws Core Exception f Config config  IExecutableExtension setInitializationData IConfigurationElement setInitializationData IConfigurationElement propertyName CoreException fConfig
protected Wizard Element create Wizard Element I Configuration Element config String name config get Attribute Wizard Element ATT NAME String id config get Attribute Wizard Element ATT ID String class Name config get Attribute Wizard Element ATT CLASS if name null id null class Name null return null Wizard Element element new Wizard Element config String image Name config get Attribute Wizard Element ATT ICON if image Name null I Plugin Descriptor pd config get Declaring Extension get Declaring Plugin Descriptor Image image PDE Plugin get Default get Label Provider get Image From Plugin pd image Name element set Image image return element  WizardElement createWizardElement IConfigurationElement getAttribute WizardElement ATT_NAME getAttribute WizardElement ATT_ID className getAttribute WizardElement ATT_CLASS className WizardElement WizardElement imageName getAttribute WizardElement ATT_ICON imageName IPluginDescriptor getDeclaringExtension getDeclaringPluginDescriptor PDEPlugin getDefault getLabelProvider getImageFromPlugin imageName setImage
public Element List get Available Codegen Wizards Element List wizards new Element List Codegen Wizards NON NLS 1 I Plugin Registry registry Platform get Plugin Registry I Extension Point point registry get Extension Point PDE Plugin get Plugin Id PLUGIN POINT if point null return wizards I Extension extensions point get Extensions for int i 0 i extensions length i I Configuration Element elements extensions i get Configuration Elements for int j 0 j elements length j if elements j get Name equals TAG WIZARD Wizard Element element create Wizard Element elements j if element null wizards add element return wizards  ElementList getAvailableCodegenWizards ElementList ElementList CodegenWizards IPluginRegistry getPluginRegistry IExtensionPoint getExtensionPoint PDEPlugin getPluginId PLUGIN_POINT IExtension getExtensions IConfigurationElement getConfigurationElements getName TAG_WIZARD WizardElement createWizardElement

public New Project Creation Operation I Field Data data I Project Provider provider I Plugin Content Wizard content Wizard f Data data f Project Provider provider f Content Wizard content Wizard  NewProjectCreationOperation IFieldData IProjectProvider IPluginContentWizard contentWizard fData fProjectProvider fContentWizard contentWizard
protected void execute I Progress Monitor monitor throws Core Exception Invocation Target Exception Interrupted Exception monitor begin Task PDE Plugin get Resource String New Project Creation Operation creating get Number Of Work Units NON NLS 1 monitor sub Task PDE Plugin get Resource String New Project Creation Operation project NON NLS 1 I Project project create Project monitor worked 1 if project has Nature Java Core NATURE ID monitor sub Task PDE Plugin get Resource String New Project Creation Operation set Classpath NON NLS 1 set Classpath project f Data monitor worked 1 if f Data instanceof I Plugin Field Data I Plugin Field Data f Data do Generate Class generate Top Level Plugin Class project new Sub Progress Monitor monitor 1 monitor sub Task PDE Plugin get Resource String New Project Creation Operation manifest File NON NLS 1 create Manifest project monitor worked 1 monitor sub Task PDE Plugin get Resource String New Project Creation Operation build Properties File NON NLS 1 create Build Properties File project monitor worked 1 boolean content Wizard Result true if f Content Wizard null content Wizard Result f Content Wizard perform Finish project f Model new Sub Progress Monitor monitor 1 f Model save if f Data has Bundle Structure String filename f Data instanceof I Fragment Field Data fragment xml plugin xml NON NLS 1 NON NLS 2 PDE Plugin Converter convert ToOSGI Format project filename new Sub Progress Monitor monitor 1 trim Model f Model get Plugin Base f Model save open File project get File META INF MANIFEST MF NON NLS 1 else open File I File f Model get Underlying Resource monitor worked 1 result content Wizard Result  IProgressMonitor CoreException InvocationTargetException InterruptedException beginTask PDEPlugin getResourceString NewProjectCreationOperation getNumberOfWorkUnits subTask PDEPlugin getResourceString NewProjectCreationOperation IProject createProject hasNature JavaCore NATURE_ID subTask PDEPlugin getResourceString NewProjectCreationOperation setClasspath setClasspath fData fData IPluginFieldData IPluginFieldData fData doGenerateClass generateTopLevelPluginClass SubProgressMonitor subTask PDEPlugin getResourceString NewProjectCreationOperation manifestFile createManifest subTask PDEPlugin getResourceString NewProjectCreationOperation buildPropertiesFile createBuildPropertiesFile contentWizardResult fContentWizard contentWizardResult fContentWizard performFinish fModel SubProgressMonitor fModel fData hasBundleStructure fData IFragmentFieldData PDEPluginConverter convertToOSGIFormat SubProgressMonitor trimModel fModel getPluginBase fModel openFile getFile openFile IFile fModel getUnderlyingResource contentWizardResult
private void trim Model I Plugin Base base throws Core Exception base set Id null base set Version null base set Name null base set Provider Name null if base instanceof I Fragment I Fragment base set Plugin Id null I Fragment base set Plugin Version null I Fragment base set Rule 0 else I Plugin base set Class Name null I Plugin Import imports base get Imports for int i 0 i imports length i base remove imports i I Plugin Library libraries base get Libraries for int i 0 i libraries length i base remove libraries i  trimModel IPluginBase CoreException setId setVersion setName setProviderName IFragment IFragment setPluginId IFragment setPluginVersion IFragment setRule IPlugin setClassName IPluginImport getImports IPluginLibrary getLibraries
public boolean get Result return result  getResult
private void generate Top Level Plugin Class I Project project I Progress Monitor monitor throws Core Exception I Plugin Field Data data I Plugin Field Data f Data f Generator new Plugin Class Code Generator project data get Classname data f Generator generate monitor monitor done  generateTopLevelPluginClass IProject IProgressMonitor CoreException IPluginFieldData IPluginFieldData fData fGenerator PluginClassCodeGenerator getClassname fGenerator
private int get Number Of Work Units int num Units 4 if f Data has Bundle Structure num Units if f Data instanceof I Plugin Field Data I Plugin Field Data data I Plugin Field Data f Data if data do Generate Class num Units if f Content Wizard null num Units return num Units  getNumberOfWorkUnits numUnits fData hasBundleStructure numUnits fData IPluginFieldData IPluginFieldData IPluginFieldData fData doGenerateClass numUnits fContentWizard numUnits numUnits
private I Project create Project throws Core Exception I Project project f Project Provider get Project if project exists Core Utility create Project project f Project Provider get Location Path null project open null if project has Nature PDE PLUGIN NATURE Core Utility add Nature To Project project PDE PLUGIN NATURE null if f Data is Simple project has Nature Java Core NATURE ID Core Utility add Nature To Project project Java Core NATURE ID null if f Data is Simple f Data get Source Folder Name trim length 0 I Folder folder project get Folder f Data get Source Folder Name if folder exists Core Utility create Folder folder true true null return project  IProject createProject CoreException IProject fProjectProvider getProject CoreUtility createProject fProjectProvider getLocationPath hasNature PLUGIN_NATURE CoreUtility addNatureToProject PLUGIN_NATURE fData isSimple hasNature JavaCore NATURE_ID CoreUtility addNatureToProject JavaCore NATURE_ID fData isSimple fData getSourceFolderName IFolder getFolder fData getSourceFolderName CoreUtility createFolder
private void create Manifest I Project project throws Core Exception if f Data instanceof I Fragment Field Data f Model new Workspace Fragment Model project get File fragment xml NON NLS 1 else f Model new Workspace Plugin Model project get File plugin xml NON NLS 1 I Plugin Base plugin Base f Model get Plugin Base if f Data is Legacy plugin Base set Schema Version 3 0 NON NLS 1 plugin Base set Id f Data get Id plugin Base set Version f Data get Version plugin Base set Name f Data get Name plugin Base set Provider Name f Data get Provider if plugin Base instanceof I Fragment I Fragment fragment I Fragment plugin Base Fragment Field Data data Fragment Field Data f Data fragment set Plugin Id data get Plugin Id fragment set Plugin Version data get Plugin Version fragment set Rule data get Match else if I Plugin Field Data f Data do Generate Class I Plugin plugin Base set Class Name I Plugin Field Data f Data get Classname if f Data is Simple I Plugin Library library f Model get Plugin Factory create Library library set Name f Data get Library Name library set Exported true plugin Base add library I Plugin Reference dependencies get Dependencies for int i 0 i dependencies length i I Plugin Reference ref dependencies i I Plugin Import iimport f Model get Plugin Factory create Import iimport set Id ref get Id iimport set Version ref get Version iimport set Match ref get Match plugin Base add iimport  createManifest IProject CoreException fData IFragmentFieldData fModel WorkspaceFragmentModel getFile fModel WorkspacePluginModel getFile IPluginBase pluginBase fModel getPluginBase fData isLegacy pluginBase setSchemaVersion pluginBase setId fData getId pluginBase setVersion fData getVersion pluginBase setName fData getName pluginBase setProviderName fData getProvider pluginBase IFragment IFragment IFragment pluginBase FragmentFieldData FragmentFieldData fData setPluginId getPluginId setPluginVersion getPluginVersion setRule getMatch IPluginFieldData fData doGenerateClass IPlugin pluginBase setClassName IPluginFieldData fData getClassname fData isSimple IPluginLibrary fModel getPluginFactory createLibrary setName fData getLibraryName setExported pluginBase IPluginReference getDependencies IPluginReference IPluginImport fModel getPluginFactory createImport setId getId setVersion getVersion setMatch getMatch pluginBase
private void create Build Properties File I Project project throws Core Exception I File file project get File build properties NON NLS 1 if file exists Workspace Build Model model new Workspace Build Model file I Build Model Factory factory model get Factory I Build Entry bin Entry factory create Entry I Build Entry BIN INCLUDES bin Entry add Token f Data instanceof I Fragment Field Data fragment xml NON NLS 1 plugin xml NON NLS 1 if f Data has Bundle Structure bin Entry add Token META INF NON NLS 1 if f Data is Simple bin Entry add Token f Data get Library Name if f Content Wizard null String files f Content Wizard get New Files for int j 0 j files length j if bin Entry contains files j bin Entry add Token files j I Build Entry entry factory create Entry I Build Entry JAR PREFIX f Data get Library Name String src Folder f Data get Source Folder Name trim if src Folder length 0 entry add Token new Path src Folder add Trailing Separator to String else entry add Token NON NLS 1 model get Build add entry entry factory create Entry I Build Entry OUTPUT PREFIX f Data get Library Name String output Folder f Data get Output Folder Name trim if output Folder length 0 entry add Token new Path output Folder add Trailing Separator to String else entry add Token NON NLS 1 model get Build add entry model get Build add bin Entry model save  createBuildPropertiesFile IProject CoreException IFile getFile WorkspaceBuildModel WorkspaceBuildModel IBuildModelFactory getFactory IBuildEntry binEntry createEntry IBuildEntry BIN_INCLUDES binEntry addToken fData IFragmentFieldData fData hasBundleStructure binEntry addToken fData isSimple binEntry addToken fData getLibraryName fContentWizard fContentWizard getNewFiles binEntry binEntry addToken IBuildEntry createEntry IBuildEntry JAR_PREFIX fData getLibraryName srcFolder fData getSourceFolderName srcFolder addToken srcFolder addTrailingSeparator toString addToken getBuild createEntry IBuildEntry OUTPUT_PREFIX fData getLibraryName outputFolder fData getOutputFolderName outputFolder addToken outputFolder addTrailingSeparator toString addToken getBuild getBuild binEntry
private void set Classpath I Project project I Field Data data throws Java Model Exception Core Exception Set output folder I Java Project java Project Java Core create project I Path path project get Full Path append data get Output Folder Name java Project set Output Location path null Set classpath I Classpath Entry entries new I Classpath Entry 3 path project get Full Path append data get Source Folder Name entries 0 Java Core new Source Entry path entries 1 Classpath Util Core create Container Entry entries 2 Classpath Util Core createJRE Entry java Project set Raw Classpath entries null  setClasspath IProject IFieldData JavaModelException CoreException IJavaProject javaProject JavaCore IPath getFullPath getOutputFolderName javaProject setOutputLocation IClasspathEntry IClasspathEntry getFullPath getSourceFolderName JavaCore newSourceEntry ClasspathUtilCore createContainerEntry ClasspathUtilCore createJREEntry javaProject setRawClasspath
private I Plugin Reference get Dependencies Array List result new Array List if f Generator null I Plugin Reference refs f Generator get Dependencies for int i 0 i refs length i result add refs i if f Content Wizard null I Plugin Reference refs f Content Wizard get Dependencies f Data is Legacy null 3 0 NON NLS 1 for int j 0 j refs length j if result contains refs j result add refs j return I Plugin Reference result to Array new I Plugin Reference result size  IPluginReference getDependencies ArrayList ArrayList fGenerator IPluginReference fGenerator getDependencies fContentWizard IPluginReference fContentWizard getDependencies fData isLegacy IPluginReference toArray IPluginReference
ww get Shell get Display async Exec new Runnable public void run if focus Part instanceof I Set Selection Target I Selection selection new Structured Selection file I Set Selection Target focus Part select Reveal selection try page open Editor new File Editor Input file PDE Plugin MANIFEST EDITOR ID catch Part Init Exception e  getShell getDisplay asyncExec focusPart ISetSelectionTarget ISelection StructuredSelection ISetSelectionTarget focusPart selectReveal openEditor FileEditorInput PDEPlugin MANIFEST_EDITOR_ID PartInitException
private void open File final I File file final I Workbench Window ww PDE Plugin get Active Workbench Window final I Workbench Page page ww get Active Page if page null return final I Workbench Part focus Part page get Active Part ww get Shell get Display async Exec new Runnable public void run if focus Part instanceof I Set Selection Target I Selection selection new Structured Selection file I Set Selection Target focus Part select Reveal selection try page open Editor new File Editor Input file PDE Plugin MANIFEST EDITOR ID catch Part Init Exception e  openFile IFile IWorkbenchWindow PDEPlugin getActiveWorkbenchWindow IWorkbenchPage getActivePage IWorkbenchPart focusPart getActivePart getShell getDisplay asyncExec focusPart ISetSelectionTarget ISelection StructuredSelection ISetSelectionTarget focusPart selectReveal openEditor FileEditorInput PDEPlugin MANIFEST_EDITOR_ID PartInitException

public New Project Creation Page String page Name Abstract Field Data data boolean is Fragment super page Name f Is Fragment is Fragment f Data data  NewProjectCreationPage pageName AbstractFieldData isFragment pageName fIsFragment isFragment fData
public void create Control Composite parent super create Control parent Composite control Composite get Control Grid Layout layout new Grid Layout layout vertical Spacing 10 control set Layout layout create Project Type Group control create Bundle Structure Group control Dialog apply Dialog Font control set Control control  createControl createControl getControl GridLayout GridLayout verticalSpacing setLayout createProjectTypeGroup createBundleStructureGroup applyDialogFont setControl
f Java Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean enabled f Java Button get Selection f Source Label set Enabled enabled f Source Text set Enabled enabled f Outputlabel set Enabled enabled f Output Text set Enabled enabled validate Page  fJavaButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fJavaButton getSelection fSourceLabel setEnabled fSourceText setEnabled fOutputlabel setEnabled fOutputText setEnabled validatePage
private void create Project Type Group Composite container Group group new Group container SWT NONE group set Text PDE Plugin get Resource String Project Structure Page settings NON NLS 1 Grid Layout layout new Grid Layout layout num Columns 2 group set Layout layout group set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Java Button create Button group f Java Button set Text PDE Plugin get Resource String Project Structure Page java NON NLS 1 f Java Button set Selection true f Java Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean enabled f Java Button get Selection f Source Label set Enabled enabled f Source Text set Enabled enabled f Outputlabel set Enabled enabled f Output Text set Enabled enabled validate Page f Source Label create Label group PDE Plugin get Resource String Project Structure Page source NON NLS 1 f Source Text create Text group I Preference Store store Preference Constants get Preference Store f Source Text set Text store get String Preference Constants SRCBIN SRCNAME f Outputlabel create Label group PDE Plugin get Resource String Project Structure Page output NON NLS 1 f Output Text create Text group f Output Text set Text store get String Preference Constants SRCBIN BINNAME  createProjectTypeGroup setText PDEPlugin getResourceString ProjectStructurePage GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_HORIZONTAL fJavaButton createButton fJavaButton setText PDEPlugin getResourceString ProjectStructurePage fJavaButton setSelection fJavaButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent fJavaButton getSelection fSourceLabel setEnabled fSourceText setEnabled fOutputlabel setEnabled fOutputText setEnabled validatePage fSourceLabel createLabel PDEPlugin getResourceString ProjectStructurePage fSourceText createText IPreferenceStore PreferenceConstants getPreferenceStore fSourceText setText getString PreferenceConstants SRCBIN_SRCNAME fOutputlabel createLabel PDEPlugin getResourceString ProjectStructurePage fOutputText createText fOutputText setText getString PreferenceConstants SRCBIN_BINNAME
private void create Bundle Structure Group Composite container Group group new Group container SWT NONE group set Text PDE Plugin get Resource String Project Structure Page alternate Format NON NLS 1 group set Layout new Grid Layout group set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Bundle Check new Button group SWT CHECK if f Is Fragment f Bundle Check set Text PDE Plugin get Resource String Project Structure Page fbundle NON NLS 1 else f Bundle Check set Text PDE Plugin get Resource String Project Structure Page pbundle NON NLS 1 Label label new Label group SWT WRAP label set Text PDE Plugin get Resource String Project Structure Page note NON NLS 1 Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 250 gd horizontal Indent 22 label set Layout Data gd  createBundleStructureGroup setText PDEPlugin getResourceString ProjectStructurePage alternateFormat setLayout GridLayout setLayoutData GridData GridData FILL_HORIZONTAL fBundleCheck fIsFragment fBundleCheck setText PDEPlugin getResourceString ProjectStructurePage fBundleCheck setText PDEPlugin getResourceString ProjectStructurePage setText PDEPlugin getResourceString ProjectStructurePage GridData GridData GridData FILL_HORIZONTAL widthHint horizontalIndent setLayoutData
private Button create Button Composite container Button button new Button container SWT CHECK Grid Data gd new Grid Data gd horizontal Span 2 button set Layout Data gd return button  createButton GridData GridData horizontalSpan setLayoutData
public boolean has Bundle Structure if f Bundle Check null return false return f Bundle Check get Selection  hasBundleStructure fBundleCheck fBundleCheck getSelection
public boolean is Java Project if f Java Button null return false return f Java Button get Selection  isJavaProject fJavaButton fJavaButton getSelection
private Label create Label Composite container String text Label label new Label container SWT NONE label set Text text Grid Data gd new Grid Data gd horizontal Indent 22 label set Layout Data gd return label  createLabel setText GridData GridData horizontalIndent setLayoutData
text set Layout Data gd text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Page  setLayoutData addModifyListener ModifyListener modifyText ModifyEvent validatePage
private Text create Text Composite container Text text new Text container SWT BORDER SWT SINGLE Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint 300 text set Layout Data gd text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Page return text  createText GridData GridData GridData FILL_HORIZONTAL widthHint setLayoutData addModifyListener ModifyListener modifyText ModifyEvent validatePage
public void set Visible boolean visible super set Visible visible if visible update Data  setVisible setVisible updateData
public void update Data f Data set Is Simple is Java Project f Data set Source Folder Name f Source Text get Text trim f Data set Output Folder Name f Output Text get Text trim f Data set Has Bundle Structure f Bundle Check get Selection  updateData fData setIsSimple isJavaProject fData setSourceFolderName fSourceText getText fData setOutputFolderName fOutputText getText fData setHasBundleStructure fBundleCheck getSelection

public class Open Project Wizard Action extends Action implements I Cheat Sheet Action param text public Open Project Wizard Action super Open Project NON NLS 1  OpenProjectWizardAction ICheatSheetAction OpenProjectWizardAction OpenProject
see I Action Delegate run I Action public void run run new String null  IActionDelegate IAction
public void run String params I Cheat Sheet Manager manager Hashtable def Values new Hashtable if params length 0 def Values put New Plugin Project Wizard DEF PROJECT NAME params 0 if params length 1 def Values put New Plugin Project Wizard DEF TEMPLATE ID params 1 New Plugin Project Wizard wizard new New Plugin Project Wizard wizard init PlatformUI get Workbench new Structured Selection wizard init def Values Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create SWT Util set Dialog Size dialog 500 500 dialog get Shell set Text wizard get Window Title int result dialog open notify Result result Wizard Dialog OK  ICheatSheetManager defValues defValues NewPluginProjectWizard DEF_PROJECT_NAME defValues NewPluginProjectWizard DEF_TEMPLATE_ID NewPluginProjectWizard NewPluginProjectWizard getWorkbench StructuredSelection defValues WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell SWTUtil setDialogSize getShell setText getWindowTitle notifyResult WizardDialog

public Plugin Class Code Generator I Project project String qualified Class Name I Plugin Field Data data this f Project project this f Qualified Class Name qualified Class Name f Plugin Data data  PluginClassCodeGenerator IProject qualifiedClassName IPluginFieldData fProject fQualifiedClassName qualifiedClassName fPluginData
public I File generate I Progress Monitor monitor throws Core Exception int nameloc f Qualified Class Name last Index Of String package Name nameloc 1 f Qualified Class Name substring 0 nameloc NON NLS 1 String class Name f Qualified Class Name substring nameloc 1 I Path path new Path package Name replace if f Plugin Data get Source Folder Name trim length 0 path new Path f Plugin Data get Source Folder Name append path Core Utility create Folder f Project get Folder path true true null I File file f Project get File path append class Name java NON NLS 1 String Writer swriter new String Writer Print Writer writer new Print Writer swriter if f Plugin Data is Legacy generate Legacy Plugin Class package Name class Name writer else generate Plugin Class package Name class Name writer writer flush try swriter close Byte Array Input Stream stream new Byte Array Input Stream swriter to String get Bytes f Project get Default Charset if file exists file set Contents stream false true monitor else file create stream false monitor stream close catch IO Exception e return file  IFile IProgressMonitor CoreException fQualifiedClassName lastIndexOf packageName fQualifiedClassName className fQualifiedClassName IPath packageName fPluginData getSourceFolderName fPluginData getSourceFolderName CoreUtility createFolder fProject getFolder IFile fProject getFile className StringWriter StringWriter PrintWriter PrintWriter fPluginData isLegacy generateLegacyPluginClass packageName className generatePluginClass packageName className ByteArrayInputStream ByteArrayInputStream toString getBytes fProject getDefaultCharset setContents IOException
private void generate Plugin Class String package Name String class Name Print Writer writer if package Name equals NON NLS 1 writer println package package Name NON NLS 1 NON NLS 2 writer println if f Plugin Data isUI Plugin writer println import org eclipse ui plugin NON NLS 1 else writer println import org eclipse core runtime Plugin NON NLS 1 writer println import org osgi framework Bundle Context NON NLS 1 writer println import java util NON NLS 1 writer println writer println NON NLS 1 writer println The main plugin class to be used in the desktop NON NLS 1 writer println NON NLS 1 if f Plugin Data isUI Plugin writer println public class class Name extends AbstractUI Plugin NON NLS 1 NON NLS 2 else writer println public class class Name extends Plugin NON NLS 1 NON NLS 2 writer println t The shared instance NON NLS 1 writer println tprivate static class Name plugin NON NLS 1 NON NLS 2 writer println t Resource bundle NON NLS 1 writer println tprivate Resource Bundle resource Bundle NON NLS 1 writer println t NON NLS 1 writer println t NON NLS 1 writer println t The constructor NON NLS 1 writer println t NON NLS 1 writer println tpublic class Name NON NLS 1 NON NLS 2 writer println t tsuper NON NLS 1 writer println t tplugin this NON NLS 1 writer println t ttry NON NLS 1 writer println t t tresource Bundle Resource Bundle get Bundle NON NLS 1 package Name class Name Resources NON NLS 1 NON NLS 2 writer println t t catch Missing Resource Exception x NON NLS 1 writer println t t tresource Bundle null NON NLS 1 writer println t t NON NLS 1 writer println t NON NLS 1 writer println writer println t NON NLS 1 writer println t This method is called upon plug in activation NON NLS 1 writer println t NON NLS 1 writer println tpublic void start Bundle Context context throws Exception NON NLS 1 writer println t tsuper start context NON NLS 1 writer println t NON NLS 1 writer println writer println t NON NLS 1 writer println t This method is called when the plug in is stopped NON NLS 1 writer println t NON NLS 1 writer println tpublic void stop Bundle Context context throws Exception NON NLS 1 writer println t tsuper stop context NON NLS 1 writer println t NON NLS 1 writer println writer println t NON NLS 1 writer println t Returns the shared instance NON NLS 1 writer println t NON NLS 1 writer println tpublic static class Name get Default NON NLS 1 NON NLS 2 writer println t treturn plugin NON NLS 1 writer println t NON NLS 1 writer println writer println t NON NLS 1 writer println t Returns the string from the plugin s resource bundle NON NLS 1 writer println t or key if not found NON NLS 1 writer println t NON NLS 1 writer println tpublic static String get Resource String String key NON NLS 1 writer println t t Resource Bundle bundle class Name NON NLS 1 get Default get Resource Bundle NON NLS 1 writer println t ttry NON NLS 1 writer println t t treturn bundle null bundle get String key key NON NLS 1 writer println t t catch Missing Resource Exception e NON NLS 1 writer println t t treturn key NON NLS 1 writer println t t NON NLS 1 writer println t NON NLS 1 writer println writer println t NON NLS 1 writer println t Returns the plugin s resource bundle NON NLS 1 writer println t NON NLS 1 writer println tpublic Resource Bundle get Resource Bundle NON NLS 1 writer println t treturn resource Bundle NON NLS 1 writer println t NON NLS 1 writer println NON NLS 1  generatePluginClass packageName className PrintWriter packageName packageName fPluginData isUIPlugin BundleContext fPluginData isUIPlugin className AbstractUIPlugin className className ResourceBundle resourceBundle className tresourceBundle ResourceBundle getBundle packageName className MissingResourceException tresourceBundle BundleContext BundleContext className getDefault getResourceString tResourceBundle className getDefault getResourceBundle getString MissingResourceException ResourceBundle getResourceBundle resourceBundle
private void generate Legacy Plugin Class String package Name String class Name Print Writer writer if package Name equals NON NLS 1 writer println package package Name NON NLS 1 NON NLS 2 writer println if f Plugin Data isUI Plugin writer println import org eclipse ui plugin NON NLS 1 writer println import org eclipse core runtime NON NLS 1 writer println import java util NON NLS 1 writer println writer println NON NLS 1 writer println The main plugin class to be used in the desktop NON NLS 1 writer println NON NLS 1 if f Plugin Data isUI Plugin writer println public class class Name extends AbstractUI Plugin NON NLS 1 NON NLS 2 else writer println public class class Name extends Plugin NON NLS 1 NON NLS 2 writer println t The shared instance NON NLS 1 writer println tprivate static class Name plugin NON NLS 1 NON NLS 2 writer println t Resource bundle NON NLS 1 writer println tprivate Resource Bundle resource Bundle NON NLS 1 writer println t NON NLS 1 writer println t NON NLS 1 writer println t The constructor NON NLS 1 writer println t NON NLS 1 writer println tpublic class Name NON NLS 1 I Plugin Descriptor descriptor NON NLS 1 writer println t tsuper descriptor NON NLS 1 writer println t tplugin this NON NLS 1 writer println t ttry NON NLS 1 writer println t t tresource Bundle Resource Bundle get Bundle NON NLS 1 package Name class Name Resources NON NLS 1 NON NLS 2 writer println t t catch Missing Resource Exception x NON NLS 1 writer println t t tresource Bundle null NON NLS 1 writer println t t NON NLS 1 writer println t NON NLS 1 writer println writer println t NON NLS 1 writer println t Returns the shared instance NON NLS 1 writer println t NON NLS 1 writer println tpublic static class Name get Default NON NLS 1 NON NLS 2 writer println t treturn plugin NON NLS 1 writer println t NON NLS 1 writer println writer println t NON NLS 1 writer println t Returns the string from the plugin s resource bundle NON NLS 1 writer println t or key if not found NON NLS 1 writer println t NON NLS 1 writer println tpublic static String get Resource String String key NON NLS 1 writer println t t Resource Bundle bundle class Name NON NLS 1 get Default get Resource Bundle NON NLS 1 writer println t ttry NON NLS 1 writer println t t treturn bundle null bundle get String key key NON NLS 1 writer println t t catch Missing Resource Exception e NON NLS 1 writer println t t treturn key NON NLS 1 writer println t t NON NLS 1 writer println t NON NLS 1 writer println writer println t NON NLS 1 writer println t Returns the plugin s resource bundle NON NLS 1 writer println t NON NLS 1 writer println tpublic Resource Bundle get Resource Bundle NON NLS 1 writer println t treturn resource Bundle NON NLS 1 writer println t NON NLS 1 writer println NON NLS 1  generateLegacyPluginClass packageName className PrintWriter packageName packageName fPluginData isUIPlugin fPluginData isUIPlugin className AbstractUIPlugin className className ResourceBundle resourceBundle className IPluginDescriptor tresourceBundle ResourceBundle getBundle packageName className MissingResourceException tresourceBundle className getDefault getResourceString tResourceBundle className getDefault getResourceBundle getString MissingResourceException ResourceBundle getResourceBundle resourceBundle
public I Plugin Reference get Dependencies Array List result new Array List if f Plugin Data isUI Plugin result add new Plugin Reference org eclipse ui null 0 NON NLS 1 if f Plugin Data is Legacy result add new Plugin Reference org eclipse core runtime null 0 NON NLS 1 return I Plugin Reference result to Array new I Plugin Reference result size  IPluginReference getDependencies ArrayList ArrayList fPluginData isUIPlugin PluginReference fPluginData isLegacy PluginReference IPluginReference toArray IPluginReference

private Modify Listener class Listener new Modify Listener public void modify Text Modify Event e if is Initialized f Changed Groups P CLASS GROUP validate Page  ModifyListener classListener ModifyListener modifyText ModifyEvent isInitialized fChangedGroups P_CLASS_GROUP validatePage
public Plugin Content Page String page Name I Project Provider provider New Project Creation Page page Abstract Field Data data super page Name provider page data false  PluginContentPage pageName IProjectProvider NewProjectCreationPage AbstractFieldData pageName
public void create Property Controls Composite container Group properties Group new Group container SWT NONE Grid Layout layout new Grid Layout 2 false layout margin Width 5 properties Group set Layout layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 properties Group set Layout Data gd properties Group set Text PDE Plugin get Resource String Content Page p Group NON NLS 1 Label label new Label properties Group SWT NONE label set Text PDE Plugin get Resource String Content Page pid NON NLS 1 f Id Text create Text properties Group properties Listener label new Label properties Group SWT NONE label set Text PDE Plugin get Resource String Content Page pversion NON NLS 1 f Version Text create Text properties Group properties Listener label new Label properties Group SWT NONE label set Text PDE Plugin get Resource String Content Page pname NON NLS 1 f Name Text create Text properties Group properties Listener label new Label properties Group SWT NONE label set Text PDE Plugin get Resource String Content Page pprovider NON NLS 1 f Provider Text create Text properties Group properties Listener f Library Label new Label properties Group SWT NONE f Library Label set Text PDE Plugin get Resource String Project Structure Page library NON NLS 1 f Library Text create Text properties Group properties Listener add Plugin Specific Controls container  createPropertyControls propertiesGroup GridLayout GridLayout marginWidth propertiesGroup setLayout GridData GridData GridData FILL_HORIZONTAL horizontalSpan propertiesGroup setLayoutData propertiesGroup setText PDEPlugin getResourceString ContentPage pGroup propertiesGroup setText PDEPlugin getResourceString ContentPage fIdText createText propertiesGroup propertiesListener propertiesGroup setText PDEPlugin getResourceString ContentPage fVersionText createText propertiesGroup propertiesListener propertiesGroup setText PDEPlugin getResourceString ContentPage fNameText createText propertiesGroup propertiesListener propertiesGroup setText PDEPlugin getResourceString ContentPage fProviderText createText propertiesGroup propertiesListener fLibraryLabel propertiesGroup fLibraryLabel setText PDEPlugin getResourceString ProjectStructurePage fLibraryText createText propertiesGroup propertiesListener addPluginSpecificControls
f Generate Class add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Class Label set Enabled f Generate Class get Selection f Class Text set Enabled f Generate Class get Selection fUI Plugin set Enabled f Generate Class get Selection validate Page  fGenerateClass addSelectionListener SelectionAdapter widgetSelected SelectionEvent fClassLabel setEnabled fGenerateClass getSelection fClassText setEnabled fGenerateClass getSelection fUIPlugin setEnabled fGenerateClass getSelection validatePage
fUI Plugin add Selection Listener new Selection Adapter public void widget Selected Selection Event e get Container update Buttons  fUIPlugin addSelectionListener SelectionAdapter widgetSelected SelectionEvent getContainer updateButtons
param container private void add Plugin Specific Controls Composite container Group class Group new Group container SWT NONE Grid Layout layout new Grid Layout 2 false layout margin Width 5 class Group set Layout layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 class Group set Layout Data gd class Group set Text PDE Plugin get Resource String Content Page p Class Group NON NLS 1 f Generate Class new Button class Group SWT CHECK f Generate Class set Text PDE Plugin get Resource String Content Page generate NON NLS 1 f Generate Class set Selection true gd new Grid Data gd horizontal Span 2 f Generate Class set Layout Data gd f Generate Class add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Class Label set Enabled f Generate Class get Selection f Class Text set Enabled f Generate Class get Selection fUI Plugin set Enabled f Generate Class get Selection validate Page f Class Label new Label class Group SWT NONE f Class Label set Text PDE Plugin get Resource String Content Page classname NON NLS 1 gd new Grid Data gd horizontal Indent 30 f Class Label set Layout Data gd f Class Text create Text class Group class Listener fUI Plugin new Button class Group SWT CHECK fUI Plugin set Text PDE Plugin get Resource String Content Page uicontribution NON NLS 1 fUI Plugin set Selection true gd new Grid Data gd horizontal Indent 30 gd horizontal Span 2 fUI Plugin set Layout Data gd fUI Plugin add Selection Listener new Selection Adapter public void widget Selected Selection Event e get Container update Buttons  addPluginSpecificControls classGroup GridLayout GridLayout marginWidth classGroup setLayout GridData GridData GridData FILL_HORIZONTAL horizontalSpan classGroup setLayoutData classGroup setText PDEPlugin getResourceString ContentPage pClassGroup fGenerateClass classGroup fGenerateClass setText PDEPlugin getResourceString ContentPage fGenerateClass setSelection GridData horizontalSpan fGenerateClass setLayoutData fGenerateClass addSelectionListener SelectionAdapter widgetSelected SelectionEvent fClassLabel setEnabled fGenerateClass getSelection fClassText setEnabled fGenerateClass getSelection fUIPlugin setEnabled fGenerateClass getSelection validatePage fClassLabel classGroup fClassLabel setText PDEPlugin getResourceString ContentPage GridData horizontalIndent fClassLabel setLayoutData fClassText createText classGroup classListener fUIPlugin classGroup fUIPlugin setText PDEPlugin getResourceString ContentPage fUIPlugin setSelection GridData horizontalIndent horizontalSpan fUIPlugin setLayoutData fUIPlugin addSelectionListener SelectionAdapter widgetSelected SelectionEvent getContainer updateButtons
public void update Data super update Data Plugin Field Data f Data set Classname f Class Text get Text trim Plugin Field Data f Data set IsUI Plugin fUI Plugin get Selection Plugin Field Data f Data set Do Generate Class f Generate Class is Enabled f Generate Class get Selection  updateData updateData PluginFieldData fData setClassname fClassText getText PluginFieldData fData setIsUIPlugin fUIPlugin getSelection PluginFieldData fData setDoGenerateClass fGenerateClass isEnabled fGenerateClass getSelection

see org eclipse pde ui I Plugin Field Data get Classname public String get Classname return f Classname  IPluginFieldData getClassname getClassname fClassname
public void set Classname String classname f Classname classname  setClassname fClassname
see org eclipse pde ui I Plugin Field Data isUI Plugin public boolean isUI Plugin return f IsUI Plugin  IPluginFieldData isUIPlugin isUIPlugin fIsUIPlugin
public void set IsUI Plugin boolean isUI Plugin f IsUI Plugin isUI Plugin  setIsUIPlugin isUIPlugin fIsUIPlugin isUIPlugin
public void add Template I Template Section section if templates contains section templates add section  addTemplate ITemplateSection
public I Template Section get Template Sections return I Template Section templates to Array new I Template Section templates size  ITemplateSection getTemplateSections ITemplateSection toArray ITemplateSection
public void set Do Generate Class boolean do Generate f Do Generate Class do Generate  setDoGenerateClass doGenerate fDoGenerateClass doGenerate
see org eclipse pde ui I Plugin Field Data do Generate Class public boolean do Generate Class return f Do Generate Class  IPluginFieldData doGenerateClass doGenerateClass fDoGenerateClass

public class Plugin Selection Dialog extends Element List Selection Dialog public Plugin Selection Dialog Shell parent Shell boolean include Fragments boolean multiple Selection this parent Shell get Elements include Fragments multiple Selection  PluginSelectionDialog ElementListSelectionDialog PluginSelectionDialog parentShell includeFragments multipleSelection parentShell getElements includeFragments multipleSelection
public Plugin Selection Dialog Shell parent Shell I Plugin Model Base models boolean multiple Selection super parent Shell PDE Plugin get Default get Label Provider set Title PDE Plugin get Resource String Plugin Selection Dialog title NON NLS 1 set Message PDE Plugin get Resource String Plugin Selection Dialog message NON NLS 1 set Elements models set Multiple Selection multiple Selection PDE Plugin get Default get Label Provider connect this  PluginSelectionDialog parentShell IPluginModelBase multipleSelection parentShell PDEPlugin getDefault getLabelProvider setTitle PDEPlugin getResourceString PluginSelectionDialog setMessage PDEPlugin getResourceString PluginSelectionDialog setElements setMultipleSelection multipleSelection PDEPlugin getDefault getLabelProvider
public boolean close PDE Plugin get Default get Label Provider disconnect this return super close  PDEPlugin getDefault getLabelProvider
private static I Plugin Model Base get Elements boolean include Fragments Plugin Model Manager manager PDE Core get Default get Model Manager return include Fragments manager get Plugins manager get Plugins Only  IPluginModelBase getElements includeFragments PluginModelManager PDECore getDefault getModelManager includeFragments getPlugins getPluginsOnly
public static Hash Set get Existing Imports I Plugin Base model Hash Set existing Imports new Hash Set if PDE Core get Default get Model Manager isOS Gi Runtime existing Imports add org eclipse core boot NON NLS 1 existing Imports add org eclipse core runtime NON NLS 1 add Self And Direct Imports existing Imports model if model instanceof I Fragment I Plugin parent get Parent Plugin I Fragment model if parent null add Self And Direct Imports existing Imports parent return existing Imports  HashSet getExistingImports IPluginBase HashSet existingImports HashSet PDECore getDefault getModelManager isOSGiRuntime existingImports existingImports addSelfAndDirectImports existingImports IFragment IPlugin getParentPlugin IFragment addSelfAndDirectImports existingImports existingImports
private static I Plugin get Parent Plugin I Fragment fragment String target Id fragment get Plugin Id String target Version fragment get Plugin Version int match fragment get Rule return PDE Core get Default find Plugin target Id target Version match  IPlugin getParentPlugin IFragment targetId getPluginId targetVersion getPluginVersion getRule PDECore getDefault findPlugin targetId targetVersion
private static void add Self And Direct Imports Hash Set set I Plugin Base plugin Base set add plugin Base get Id I Plugin Import imports plugin Base get Imports for int i 0 i imports length i String id imports i get Id if set add id add Reexported Import set id  addSelfAndDirectImports HashSet IPluginBase pluginBase pluginBase getId IPluginImport pluginBase getImports getId addReexportedImport
private static void add Reexported Import Hash Set set String id Plugin Model Manager manager PDE Core get Default get Model Manager Model Entry entry manager find Entry id if entry null I Plugin Model Base model entry get Active Model I Plugin Import imports model get Plugin Base get Imports for int i 0 i imports length i if imports i is Reexported set add imports i get Id add Reexported Import set imports i get Id  addReexportedImport HashSet PluginModelManager PDECore getDefault getModelManager ModelEntry findEntry IPluginModelBase getActiveModel IPluginImport getPluginBase getImports isReexported getId addReexportedImport getId

class Wizard Filter extends Viewer Filter public boolean select Viewer viewer Object parent Element Object element I Field Data data f Content Page get Data boolean simple data is Simple boolean generate false boolean ui false if data instanceof Plugin Field Data ui Plugin Field Data data isUI Plugin generate Plugin Field Data data do Generate Class Wizard Element welement Wizard Element element I Configuration Element config welement get Configuration Element boolean ui Flag get Flag config ui content NON NLS 1 boolean java Flag get Flag config java NON NLS 1 filter out java wizards for simple projects if simple java Flag return false filter out ui wizards for non ui plug ins if ui Flag simple generate ui return false return true  WizardFilter ViewerFilter parentElement IFieldData fContentPage getData isSimple PluginFieldData PluginFieldData isUIPlugin PluginFieldData doGenerateClass WizardElement WizardElement IConfigurationElement getConfigurationElement uiFlag getFlag javaFlag getFlag javaFlag uiFlag
private boolean get Flag I Configuration Element config String name String value config get Attribute name if value null return true return value equals Ignore Case true NON NLS 1  getFlag IConfigurationElement getAttribute equalsIgnoreCase
public Template List Selection Page Element List wizard Elements Content Page page String message super wizard Elements message f Content Page page set Title PDE Plugin get Resource String Wizard List Selection Page title NON NLS 1 set Description PDE Plugin get Resource String Wizard List Selection Page desc NON NLS 1  TemplateListSelectionPage ElementList wizardElements ContentPage wizardElements fContentPage setTitle PDEPlugin getResourceString WizardListSelectionPage setDescription PDEPlugin getResourceString WizardListSelectionPage
f Use Template add Selection Listener new Selection Adapter public void widget Selected Selection Event e wizard Selection Viewer get Control set Enabled f Use Template get Selection if f Use Template get Selection set Description NON NLS 1 set Description Enabled f Use Template get Selection get Container update Buttons  fUseTemplate addSelectionListener SelectionAdapter widgetSelected SelectionEvent wizardSelectionViewer getControl setEnabled fUseTemplate getSelection fUseTemplate getSelection setDescription setDescriptionEnabled fUseTemplate getSelection getContainer updateButtons
public void create Above Composite container int span f Use Template new Button container SWT CHECK f Use Template set Text PDE Plugin get Resource String Wizard List Selection Page label NON NLS 1 Grid Data gd new Grid Data gd horizontal Span span f Use Template set Layout Data gd f Use Template add Selection Listener new Selection Adapter public void widget Selected Selection Event e wizard Selection Viewer get Control set Enabled f Use Template get Selection if f Use Template get Selection set Description NON NLS 1 set Description Enabled f Use Template get Selection get Container update Buttons if get Initial Template Id null f Use Template set Selection true  createAbove fUseTemplate fUseTemplate setText PDEPlugin getResourceString WizardListSelectionPage GridData GridData horizontalSpan fUseTemplate setLayoutData fUseTemplate addSelectionListener SelectionAdapter widgetSelected SelectionEvent wizardSelectionViewer getControl setEnabled fUseTemplate getSelection fUseTemplate getSelection setDescription setDescriptionEnabled fUseTemplate getSelection getContainer updateButtons getInitialTemplateId fUseTemplate setSelection
protected void initialize Viewer wizard Selection Viewer add Filter new Wizard Filter if get Initial Template Id null wizard Selection Viewer get Control set Enabled false set Description Enabled false else select Initial Template  initializeViewer wizardSelectionViewer addFilter WizardFilter getInitialTemplateId wizardSelectionViewer getControl setEnabled setDescriptionEnabled selectInitialTemplate
private void select Initial Template Object children wizard Elements get Children for int i 0 i children length i Wizard Element welement Wizard Element children i if welement getID equals get Initial Template Id wizard Selection Viewer set Selection new Structured Selection welement true set Selected Node create Wizard Node welement set Description Text welement get Description break  selectInitialTemplate wizardElements getChildren WizardElement WizardElement getInitialTemplateId wizardSelectionViewer setSelection StructuredSelection setSelectedNode createWizardNode setDescriptionText getDescription
return new Wizard Node this element public I Base Plugin Wizard create Wizard throws Core Exception I Plugin Content Wizard wizard I Plugin Content Wizard wizard Element create Executable Extension wizard init f Content Page get Data return wizard  WizardNode IBasePluginWizard createWizard CoreException IPluginContentWizard IPluginContentWizard wizardElement createExecutableExtension fContentPage getData
protected I Wizard Node create Wizard Node Wizard Element element return new Wizard Node this element public I Base Plugin Wizard create Wizard throws Core Exception I Plugin Content Wizard wizard I Plugin Content Wizard wizard Element create Executable Extension wizard init f Content Page get Data return wizard  IWizardNode createWizardNode WizardElement WizardNode IBasePluginWizard createWizard CoreException IPluginContentWizard IPluginContentWizard wizardElement createExecutableExtension fContentPage getData
public I Plugin Content Wizard get Selected Wizard if f Use Template get Selection return I Plugin Content Wizard super get Selected Wizard return null  IPluginContentWizard getSelectedWizard fUseTemplate getSelection IPluginContentWizard getSelectedWizard
public boolean is Page Complete return f Use Template get Selection f Use Template get Selection get Selected Node null  isPageComplete fUseTemplate getSelection fUseTemplate getSelection getSelectedNode
see org eclipse jface wizard Wizard Selection Page can Flip To Next Page public boolean can Flip To Next Page I Structured Selection ssel I Structured Selection wizard Selection Viewer get Selection return f Use Template get Selection ssel null ssel is Empty  WizardSelectionPage canFlipToNextPage canFlipToNextPage IStructuredSelection IStructuredSelection wizardSelectionViewer getSelection fUseTemplate getSelection isEmpty
return Returns the f Initial Template Id public String get Initial Template Id return f Initial Template Id  fInitialTemplateId getInitialTemplateId fInitialTemplateId
param initial Template Id The f Initial Template Id to set public void set Initial Template Id String initial Template Id f Initial Template Id initial Template Id  initialTemplateId fInitialTemplateId setInitialTemplateId initialTemplateId fInitialTemplateId initialTemplateId
public void set Visible boolean visible if visible f Content Page update Data wizard Selection Viewer refresh super set Visible visible  setVisible fContentPage updateData wizardSelectionViewer setVisible

public Rename Dialog Shell shell String old Name super shell this is Case Sensitive false initialize set Old Name old Name  RenameDialog oldName isCaseSensitive setOldName oldName
public Rename Dialog Shell shell boolean is Case Sensitive String names String old Name super shell this is Case Sensitive is Case Sensitive initialize if names null for int i 0 i names length i add Old Name names i set Old Name old Name  RenameDialog isCaseSensitive oldName isCaseSensitive isCaseSensitive addOldName setOldName oldName
public void initialize old Names new Array List set Status Line Above Buttons true  oldNames ArrayList setStatusLineAboveButtons
public void add Old Name String old Name if old Names contains old Name old Names add old Name  addOldName oldName oldNames oldName oldNames oldName
public void set Old Name String old Name this old Name old Name add Old Name old Name if text null text set Text old Name this new Name old Name  setOldName oldName oldName oldName addOldName oldName setText oldName newName oldName
text new Text container SWT SINGLE SWT BORDER text add Modify Listener new Modify Listener public void modify Text Modify Event e text Changed text get Text  addModifyListener ModifyListener modifyText ModifyEvent textChanged getText
protected Control create Dialog Area Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH container set Layout Data gd Label label new Label container SWT NULL label set Text PDE Plugin get Resource String Rename Dialog label NON NLS 1 text new Text container SWT SINGLE SWT BORDER text add Modify Listener new Modify Listener public void modify Text Modify Event e text Changed text get Text gd new Grid Data Grid Data FILL HORIZONTAL text set Layout Data gd apply Dialog Font container return container  createDialogArea GridLayout GridLayout numColumns setLayout GridData GridData GridData FILL_BOTH setLayoutData setText PDEPlugin getResourceString RenameDialog addModifyListener ModifyListener modifyText ModifyEvent textChanged getText GridData GridData FILL_HORIZONTAL setLayoutData applyDialogFont
public int open text set Text old Name text select All Button ok Button get Button I Dialog Constants OK ID status new Status I Status OK PDE Plugin get Plugin Id I Status OK NON NLS 1 null update Status status ok Button set Enabled false return super open  setText oldName selectAll okButton getButton IDialogConstants OK_ID IStatus PDEPlugin getPluginId IStatus updateStatus okButton setEnabled
private void text Changed String text Button ok Button get Button I Dialog Constants OK ID for int i 0 i old Names size i if is Case Sensitive text equals old Names get i is Case Sensitive text equals Ignore Case old Names get i to String status new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR PDE Plugin get Resource String Rename Dialog validation Error NON NLS 1 null update Status status ok Button set Enabled false break ok Button set Enabled true status new Status I Status OK PDE Plugin get Plugin Id I Status OK NON NLS 1 null update Status status  textChanged okButton getButton IDialogConstants OK_ID oldNames isCaseSensitive oldNames isCaseSensitive equalsIgnoreCase oldNames toString IStatus PDEPlugin getPluginId IStatus PDEPlugin getResourceString RenameDialog validationError updateStatus okButton setEnabled okButton setEnabled IStatus PDEPlugin getPluginId IStatus updateStatus
public String get New Name return new Name  getNewName newName
see org eclipse jface dialogs Dialog ok Pressed protected void ok Pressed new Name text get Text super ok Pressed  okPressed okPressed newName getText okPressed
see org eclipse ui dialogs Selection Status Dialog compute Result protected void compute Result  SelectionStatusDialog computeResult computeResult

implements I Structured Content Provider public Object get Elements Object parent if real Entries null return real Entries return new Object 0  IStructuredContentProvider getElements realEntries realEntries
class Entry Sorter extends Viewer Sorter public int category Object obj I Classpath Entry entry I Classpath Entry obj return entry get Entry Kind I Classpath Entry CPE PROJECT 10 0  EntrySorter ViewerSorter IClasspathEntry IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT
implements I Table Label Provider public String get Text Object obj I Classpath Entry entry I Classpath Entry obj int kind entry get Entry Kind if kind I Classpath Entry CPE PROJECT return entry get Path segment 0 else I Path path entry get Path String name path last Segment return name NON NLS 1 path upto Segment path segment Count 1 toOS String  ITableLabelProvider getText IClasspathEntry IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT getPath IPath getPath lastSegment uptoSegment segmentCount toOSString
public Image get Image Object obj I Classpath Entry entry I Classpath Entry obj int kind entry get Entry Kind if kind I Classpath Entry CPE PROJECT return project Image else if kind I Classpath Entry CPE LIBRARY I Path source Att entry get Source Attachment Path return source Att null slibrary Image library Image return null  getImage IClasspathEntry IClasspathEntry getEntryKind IClasspathEntry CPE_PROJECT projectImage IClasspathEntry CPE_LIBRARY IPath sourceAtt getSourceAttachmentPath sourceAtt slibraryImage libraryImage
return null public String get Column Text Object obj int col return get Text obj  getColumnText getText
return get Text obj public Image get Column Image Object obj int col return get Image obj  getText getColumnImage getImage
The constructor public Required Plugins Container Page super required Plugins Container Page NON NLS 1 set Title PDE Plugin get Resource String Required Plugins Container Page title NON NLS 1 set Description PDE Plugin get Resource String Required Plugins Container Page desc NON NLS 1 project Image PlatformUI get Workbench get Shared Images get Image IDE Shared Images IMG OBJ PROJECT library Image PDE Plugin Images DESC BUILD VAR OBJ create Image library Image JavaUI get Shared Images get Image org eclipse jdt ui I Shared Images IMG OBJS EXTERNAL ARCHIVE slibrary Image JavaUI get Shared Images get Image org eclipse jdt ui I Shared Images IMG OBJS EXTERNAL ARCHIVE WITH SOURCE set Image Descriptor PDE Plugin Images DESC CONVJPPRJ WIZ replaced Entries new Hashtable  RequiredPluginsContainerPage requiredPluginsContainerPage setTitle PDEPlugin getResourceString RequiredPluginsContainerPage setDescription PDEPlugin getResourceString RequiredPluginsContainerPage projectImage getWorkbench getSharedImages getImage SharedImages IMG_OBJ_PROJECT libraryImage PDEPluginImages DESC_BUILD_VAR_OBJ createImage libraryImage getSharedImages getImage ISharedImages IMG_OBJS_EXTERNAL_ARCHIVE slibraryImage getSharedImages getImage ISharedImages IMG_OBJS_EXTERNAL_ARCHIVE_WITH_SOURCE setImageDescriptor PDEPluginImages DESC_CONVJPPRJ_WIZ replacedEntries
viewer set Sorter new Entry Sorter viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Prevent user to change checkbox states viewer set Checked event get Element event get Checked  setSorter EntrySorter addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent setChecked getElement getChecked
viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e handle Selection Changed I Structured Selection e get Selection  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged IStructuredSelection getSelection
SWT Util set Button Dimension Hint attach Source Button attach Source Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Attach Source  SWTUtil setButtonDimensionHint attachSourceButton attachSourceButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAttachSource
Insert the method s description here see Wizard Page create Control public void create Control Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 container set Layout layout Label label new Label container SWT NULL label set Text PDE Plugin get Resource String Required Plugins Container Page label NON NLS 1 Grid Data gd new Grid Data gd horizontal Span 2 label set Layout Data gd viewer Checkbox Table Viewer new Check List container SWT BORDER SWT V SCROLL SWT H SCROLL viewer set Content Provider new Entry Content Provider viewer set Label Provider new Entry Label Provider viewer set Sorter new Entry Sorter viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Prevent user to change checkbox states viewer set Checked event get Element event get Checked viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e handle Selection Changed I Structured Selection e get Selection gd new Grid Data Grid Data FILL BOTH gd width Hint 400 gd height Hint 300 viewer get Table set Layout Data gd attach Source Button new Button container SWT PUSH attach Source Button set Text PDE Plugin get Resource String Required Plugins Container Page attach Source NON NLS 1 gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING attach Source Button set Layout Data gd SWT Util set Button Dimension Hint attach Source Button attach Source Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Attach Source attach Source Button set Enabled false Workbench Help set Help container I Help Context Ids PLUGINS CONTAINER PAGE set Control container Dialog apply Dialog Font container if real Entries null initialize View  WizardPage createControl createControl GridLayout GridLayout numColumns setLayout setText PDEPlugin getResourceString RequiredPluginsContainerPage GridData GridData horizontalSpan setLayoutData CheckboxTableViewer newCheckList V_SCROLL H_SCROLL setContentProvider EntryContentProvider setLabelProvider EntryLabelProvider setSorter EntrySorter addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent setChecked getElement getChecked addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged IStructuredSelection getSelection GridData GridData FILL_BOTH widthHint heightHint getTable setLayoutData attachSourceButton attachSourceButton setText PDEPlugin getResourceString RequiredPluginsContainerPage attachSource GridData GridData VERTICAL_ALIGN_BEGINNING attachSourceButton setLayoutData SWTUtil setButtonDimensionHint attachSourceButton attachSourceButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAttachSource attachSourceButton setEnabled WorkbenchHelp setHelp IHelpContextIds PLUGINS_CONTAINER_PAGE setControl applyDialogFont realEntries initializeView
private void handle Selection Changed I Structured Selection selection I Classpath Entry entry I Classpath Entry selection get First Element boolean can Attach true if entry null entry get Entry Kind I Classpath Entry CPE LIBRARY can Attach false attach Source Button set Enabled can Attach  handleSelectionChanged IStructuredSelection IClasspathEntry IClasspathEntry getFirstElement canAttach getEntryKind IClasspathEntry CPE_LIBRARY canAttach attachSourceButton setEnabled canAttach
private I Classpath Entry get Editable Entry I Classpath Entry entry I Classpath Entry modified Entry I Classpath Entry replaced Entries get entry if modified Entry null return modified Entry return entry  IClasspathEntry getEditableEntry IClasspathEntry IClasspathEntry modifiedEntry IClasspathEntry replacedEntries modifiedEntry modifiedEntry
private void handle Attach Source I Structured Selection ssel I Structured Selection viewer get Selection I Classpath Entry entry I Classpath Entry ssel get First Element I Classpath Entry editable Entry get Editable Entry entry I Classpath Entry new Entry Build Path Dialog Access configure Source Attachment viewer get Control get Shell editable Entry if new Entry null replaced Entries put entry new Entry  handleAttachSource IStructuredSelection IStructuredSelection getSelection IClasspathEntry IClasspathEntry getFirstElement IClasspathEntry editableEntry getEditableEntry IClasspathEntry newEntry BuildPathDialogAccess configureSourceAttachment getControl getShell editableEntry newEntry replacedEntries newEntry
Insert the method s description here see Wizard Page finish public boolean finish if replaced Entries size 0 must handle edited entries process Replaced Entries return true  WizardPage replacedEntries processReplacedEntries
private void process Replaced Entries Source Attachment Manager manager PDE Core get Default get Source Attachment Manager for Enumeration enum replaced Entries keys enum has More Elements I Classpath Entry entry I Classpath Entry enum next Element I Classpath Entry new Entry I Classpath Entry replaced Entries get entry manager add Entry new Entry get Path new Entry get Source Attachment Path new Entry get Source Attachment Root Path manager save reset Container  processReplacedEntries SourceAttachmentManager PDECore getDefault getSourceAttachmentManager replacedEntries hasMoreElements IClasspathEntry IClasspathEntry nextElement IClasspathEntry newEntry IClasspathEntry replacedEntries addEntry newEntry getPath newEntry getSourceAttachmentPath newEntry getSourceAttachmentRootPath resetContainer
Insert the method s description here see Wizard Page get Selection public I Classpath Entry get Selection return entry  WizardPage getSelection IClasspathEntry getSelection
public void initialize I Java Project project I Classpath Entry current Entries java Project project  IJavaProject IClasspathEntry currentEntries javaProject
Insert the method s description here see Wizard Page set Selection public void set Selection I Classpath Entry container Entry this entry container Entry create Real Entries if viewer null initialize View  WizardPage setSelection setSelection IClasspathEntry containerEntry containerEntry createRealEntries initializeView
private void reset Container I Java Project java Project get Java Project if java Project null try I Classpath Container container Java Core get Classpath Container entry get Path java Project if container instanceof Required Plugins Classpath Container Required Plugins Classpath Container container reset catch Java Model Exception e  resetContainer IJavaProject javaProject getJavaProject javaProject IClasspathContainer JavaCore getClasspathContainer getPath javaProject RequiredPluginsClasspathContainer RequiredPluginsClasspathContainer JavaModelException
private void create Real Entries I Java Project java Project get Java Project if java Project null real Entries new I Classpath Entry 0 return if entry null entry Classpath Util Core create Container Entry try Model Entry update Unknown Classpath Container java Project real Entries new I Classpath Entry 0 catch Core Exception e entry Classpath Util Core create Container Entry Plugin Model Manager mng PDE Core get Default get Model Manager Model Entry entry mng find Entry java Project get Project if entry null I Classpath Container container entry get Classpath Container if container null real Entries container get Classpath Entries else try I Classpath Container container Java Core get Classpath Container entry get Path java Project if container null real Entries container get Classpath Entries catch Java Model Exception e if real Entries null real Entries new I Classpath Entry 0  createRealEntries IJavaProject javaProject getJavaProject javaProject realEntries IClasspathEntry ClasspathUtilCore createContainerEntry ModelEntry updateUnknownClasspathContainer javaProject realEntries IClasspathEntry CoreException ClasspathUtilCore createContainerEntry PluginModelManager PDECore getDefault getModelManager ModelEntry findEntry javaProject getProject IClasspathContainer getClasspathContainer realEntries getClasspathEntries IClasspathContainer JavaCore getClasspathContainer getPath javaProject realEntries getClasspathEntries JavaModelException realEntries realEntries IClasspathEntry
private I Java Project get Java Project return java Project  IJavaProject getJavaProject javaProject
private void initialize View viewer set Input entry viewer set All Grayed true for int i 0 i real Entries length i if real Entries i is Exported viewer set Checked real Entries i true  initializeView setInput setAllGrayed realEntries realEntries isExported setChecked realEntries

public class Resizable Wizard Dialog extends Wizard Dialog public Resizable Wizard Dialog Shell shell I Wizard wizard super shell wizard set Shell Style get Shell Style SWT RESIZE  ResizableWizardDialog WizardDialog ResizableWizardDialog IWizard setShellStyle getShellStyle

private Listener text Modify Listener new Listener public void handle Event Event e set Page Complete validate Page  textModifyListener handleEvent setPageComplete validatePage
Creates a new project creation wizard page param page Name the name of this page public New Site Project Creation Page String page Name super page Name  pageName NewSiteProjectCreationPage pageName pageName
html Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e create Site html Button get Selection web Label set Enabled create Site web Text set Enabled create Site set Page Complete validate Page  htmlButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent createSite htmlButton getSelection webLabel setEnabled createSite webText setEnabled createSite setPageComplete validatePage
non Javadoc Method declared on I Dialog Page public void create Control Composite parent super create Control parent Composite control Composite get Control Grid Layout layout new Grid Layout layout vertical Spacing 15 control set Layout layout Group web Group new Group control SWT NULL web Group set Text PDE Plugin get Resource String New Site Project Creation Page web Title NON NLS 1 initialize Dialog Units parent layout new Grid Layout layout num Columns 2 web Group set Layout layout web Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL html Button new Button web Group SWT CHECK SWT RIGHT html Button set Text PDE Plugin get Resource String HTML CHECK LABEL Grid Data gd new Grid Data gd horizontal Span 2 html Button set Layout Data gd web Label new Label web Group SWT NULL web Label set Text PDE Plugin get Resource String HTML WEB LABEL gd new Grid Data Grid Data FILL HORIZONTAL web Label set Layout Data gd web Text new Text web Group SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint SIZING TEXT FIELD WIDTH web Text set Layout Data gd web Text set Text web NON NLS 1 web Text set Enabled create Site web Label set Enabled create Site web Text add Listener SWT Modify text Modify Listener html Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e create Site html Button get Selection web Label set Enabled create Site web Text set Enabled create Site set Page Complete validate Page set Page Complete validate Page set Control web Group Dialog apply Dialog Font web Group  IDialogPage createControl createControl getControl GridLayout GridLayout verticalSpacing setLayout webGroup webGroup setText PDEPlugin getResourceString NewSiteProjectCreationPage webTitle initializeDialogUnits GridLayout numColumns webGroup setLayout webGroup setLayoutData GridData GridData FILL_HORIZONTAL htmlButton webGroup htmlButton setText PDEPlugin getResourceString HTML_CHECK_LABEL GridData GridData horizontalSpan htmlButton setLayoutData webLabel webGroup webLabel setText PDEPlugin getResourceString HTML_WEB_LABEL GridData GridData FILL_HORIZONTAL webLabel setLayoutData webText webGroup GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH webText setLayoutData webText setText webText setEnabled createSite webLabel setEnabled createSite webText addListener textModifyListener htmlButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent createSite htmlButton getSelection webLabel setEnabled createSite webText setEnabled createSite setPageComplete validatePage setPageComplete validatePage setControl webGroup applyDialogFont webGroup
public boolean is Create Update SiteHTML return create Site  isCreateUpdateSiteHTML createSite
public String get Web Location String text web Text get Text if text starts With File separator text starts With NON NLS 1 text text substring 1 if text ends With File separator text ends With NON NLS 1 text text substring 0 text length 1 return text  getWebLocation webText getText startsWith startsWith endsWith endsWith
protected boolean validate Page if super validate Page return false if create Site get Web Location equals NON NLS 1 set Error Message PDE Plugin get Resource String WEB ERR return false return true  validatePage validatePage createSite getWebLocation setErrorMessage PDEPlugin getResourceString WEB_ERR

public New Site Project Wizard super set Default Page Image Descriptor PDE Plugin Images DESC NEWSITEPRJ WIZ set Dialog Settings PDE Plugin get Default get Dialog Settings set Needs Progress Monitor true set Window Title PDE Plugin get Resource String KEY WTITLE  NewSiteProjectWizard setDefaultPageImageDescriptor PDEPluginImages DESC_NEWSITEPRJ_WIZ setDialogSettings PDEPlugin getDefault getDialogSettings setNeedsProgressMonitor setWindowTitle PDEPlugin getResourceString KEY_WTITLE
public void add Pages main Page new New Site Project Creation Page main NON NLS 1 main Page set Title PDE Plugin get Resource String MAIN PAGE TITLE main Page set Description PDE Plugin get Resource String MAIN PAGE DESC String pname get Default Value DEF PROJECT NAME if pname null main Page set Initial Project Name pname add Page main Page  addPages mainPage NewSiteProjectCreationPage mainPage setTitle PDEPlugin getResourceString MAIN_PAGE_TITLE mainPage setDescription PDEPlugin getResourceString MAIN_PAGE_DESC getDefaultValue DEF_PROJECT_NAME mainPage setInitialProjectName addPage mainPage
private I File create Site Manifest I Project project throws Core Exception I File file project get File site xml NON NLS 1 if file exists return file Workspace Site Model model new Workspace Site Model model set File file I Site site model get Site String name project get Name site set Label name Save the model model save model dispose Create and save build model Workspace Site Build Model build Model new Workspace Site Build Model I File build File project get File PDE Core SITEBUILD FILE build Model set File build File I Site Build site Build build Model get Site Build site Build set Autobuild false site Build set Show Console true build Model save build Model dispose Set the default editor IDE set Default Editor file PDE Plugin SITE EDITOR ID return file  IFile createSiteManifest IProject CoreException IFile getFile WorkspaceSiteModel WorkspaceSiteModel setFile ISite getSite getName setLabel WorkspaceSiteBuildModel buildModel WorkspaceSiteBuildModel IFile buildFile getFile PDECore SITEBUILD_FILE buildModel setFile buildFile ISiteBuild siteBuild buildModel getSiteBuild siteBuild setAutobuild siteBuild setShowConsole buildModel buildModel setDefaultEditor PDEPlugin SITE_EDITOR_ID
private void createHTML File I Project project try I File file project get File index html NON NLS 1 String Writer swrite new String Writer Print Writer writer new Print Writer swrite writer println html NON NLS 1 writer println head NON NLS 1 writer println title project get Name title NON NLS 1 NON NLS 2 writer println style import url main Page get Web Location site css style NON NLS 1 NON NLS 2 writer println script type text javascript NON NLS 1 writer println var returnval 0 NON NLS 1 writer println var stylesheet xml File cache doc NON NLS 1 writer println function init NON NLS 1 writer println NSCP 7 1 Mozilla 1 4 1 Safari NON NLS 1 writer println Use the standard DOM Level 2 technique if it is supported NON NLS 1 writer println if document implementation document implementation create Document NON NLS 1 writer println xml File document implementation create Document null NON NLS 1 writer println stylesheet document implementation create Document null NON NLS 1 writer println if xml File load NON NLS 1 writer println xml File load site xml NON NLS 1 writer println stylesheet load main Page get Web Location site xsl NON NLS 1 NON NLS 2 writer println else NON NLS 1 writer println alert PDE Plugin get Resource String SiteHTML load Error NON NLS 1 NON NLS 2 NON NLS 3 writer println NON NLS 1 writer println xml File add Event Listener load transform false NON NLS 1 writer println stylesheet add Event Listener load transform false NON NLS 1 writer println NON NLS 1 writer println IE 6 0 solution NON NLS 1 writer println else if window ActiveX Object NON NLS 1 writer println xml File new ActiveX Object msxml2 DOM Document 3 0 NON NLS 1 writer println xml File async false NON NLS 1 writer println xml File load site xml NON NLS 1 writer println stylesheet new ActiveX Object msxml2 Free ThreadedDOM Document 3 0 NON NLS 1 writer println stylesheet async false NON NLS 1 writer println stylesheet load main Page get Web Location site xsl NON NLS 1 NON NLS 2 writer println cache new ActiveX Object msxml2 XSL Template 3 0 NON NLS 1 writer println cache stylesheet stylesheet NON NLS 1 writer println transform Data NON NLS 1 writer println NON NLS 1 writer println NON NLS 1 writer println separate transformation function for IE 6 0 NON NLS 1 writer println function transform Data NON NLS 1 writer println var processor cache create Processor NON NLS 1 writer println processor input xml File NON NLS 1 writer println processor transform NON NLS 1 writer println data innerHTML processor output NON NLS 1 writer println NON NLS 1 writer println separate transformation function for NSCP 7 1 and Mozilla 1 4 1 NON NLS 1 writer println function transform NON NLS 1 writer println returnval 1 NON NLS 1 writer println if returnval 2 NON NLS 1 writer println var processor new XSLT Processor NON NLS 1 writer println processor import Stylesheet stylesheet NON NLS 1 writer println doc processor transform To Document xml File NON NLS 1 writer println document get Element By Id data innerHTML doc document Element innerHTML NON NLS 1 writer println NON NLS 1 writer println NON NLS 1 writer println script NON NLS 1 writer println head NON NLS 1 writer println body onload init NON NLS 1 writer println insert static HTML here NON NLS 1 writer println div id data this is where the transformed data goes div NON NLS 1 writer println body NON NLS 1 writer println html NON NLS 1 writer flush swrite close Byte Array Input Stream stream new Byte Array Input Stream swrite to String get Bytes UTF8 NON NLS 1 if file exists file set Contents stream false false null else file create stream false null stream close catch Exception e PDE Plugin log Exception e  createHTMLFile IProject IFile getFile StringWriter StringWriter PrintWriter PrintWriter getName mainPage getWebLocation xmlFile createDocument xmlFile createDocument createDocument xmlFile xmlFile mainPage getWebLocation PDEPlugin getResourceString loadError xmlFile addEventListener addEventListener ActiveXObject xmlFile ActiveXObject DOMDocument xmlFile xmlFile ActiveXObject FreeThreadedDOMDocument mainPage getWebLocation ActiveXObject XSLTemplate transformData transformData createProcessor xmlFile XSLTProcessor importStylesheet transformToDocument xmlFile getElementById documentElement ByteArrayInputStream ByteArrayInputStream toString getBytes setContents PDEPlugin logException
private void createCSS File I Project project try I File file project get File main Page get Web Location site css NON NLS 1 String Writer swrite new String Writer Print Writer writer new Print Writer swrite writer println STYLE type text css NON NLS 1 writer println td spacer padding bottom 10px padding top 10px NON NLS 1 writer println title font family sans serif color 99AACC NON NLS 1 writer println body Text font family sans serif font size 9pt color 000000 NON NLS 1 writer println sub header font family sans serif font style normal font weight bold font size 9pt color white NON NLS 1 writer println log text font family sans serif font style normal font weight lighter font size 8pt color black NON NLS 1 writer println big header font family sans serif font style normal font weight bold font size 9pt color white border top 10px solid white NON NLS 1 writer println light row background FFFFFF NON NLS 1 writer println dark row background EEEEFF NON NLS 1 writer println header background 99AADD NON NLS 1 writer println indent word wrap break word width 300px text indent 10px NON NLS 1 writer println STYLE NON NLS 1 writer flush swrite close Byte Array Input Stream stream new Byte Array Input Stream swrite to String get Bytes UTF8 NON NLS 1 if file exists file set Contents stream false false null else file create stream false null stream close catch Exception e PDE Plugin log Exception e  createCSSFile IProject IFile getFile mainPage getWebLocation StringWriter StringWriter PrintWriter PrintWriter bodyText ByteArrayInputStream ByteArrayInputStream toString getBytes setContents PDEPlugin logException
private void createXSL File I Project project try I File file project get File main Page get Web Location site xsl NON NLS 1 String Writer swrite new String Writer Print Writer writer new Print Writer swrite writer println xsl stylesheet version 1 0 xmlns xsl http www w3 org 1999 XSL Transform xmlns msxsl urn schemas microsoft com xslt NON NLS 1 writer println xsl output method html encoding ISO 8859 1 NON NLS 1 writer println xsl key name cat match category use name NON NLS 1 writer println xsl template match NON NLS 1 writer println xsl for each select site NON NLS 1 writer println html NON NLS 1 writer println head NON NLS 1 writer println title project get Name title NON NLS 1 NON NLS 2 writer println style import url main Page get Web Location site css style NON NLS 1 NON NLS 2 writer println head NON NLS 1 writer println body NON NLS 1 writer println h1 class title project get Name h1 NON NLS 1 NON NLS 2 writer println p class body Text xsl value of select description p NON NLS 1 writer println table width 100 border 0 cellspacing 1 cellpadding 2 NON NLS 1 writer println xsl for each select category def NON NLS 1 writer println xsl sort select label order ascending case order upper first NON NLS 1 writer println xsl sort select name order ascending case order upper first NON NLS 1 writer println xsl if test count key cat name 0 NON NLS 1 writer println tr class header NON NLS 1 writer println td class sub header width 30 NON NLS 1 writer println xsl value of select name NON NLS 1 writer println td NON NLS 1 writer println td class sub header width 70 NON NLS 1 writer println xsl value of select label NON NLS 1 writer println td NON NLS 1 writer println tr NON NLS 1 writer println xsl for each select key cat name NON NLS 1 writer println xsl sort select ancestor feature version order ascending NON NLS 1 writer println xsl sort select ancestor feature id order ascending case order upper first NON NLS 1 writer println tr NON NLS 1 writer println xsl choose NON NLS 1 writer println xsl when test position mod 2 1 NON NLS 1 writer println xsl attribute name class dark row xsl attribute NON NLS 1 writer println xsl when NON NLS 1 writer println xsl otherwise NON NLS 1 writer println xsl attribute name class light row xsl attribute NON NLS 1 writer println xsl otherwise NON NLS 1 writer println xsl choose NON NLS 1 writer println td class log text id indent NON NLS 1 writer println xsl choose NON NLS 1 writer println xsl when test ancestor feature label NON NLS 1 writer println a href ancestor feature url xsl value of select ancestor feature label a NON NLS 1 writer println br NON NLS 1 writer println div id indent NON NLS 1 writer println xsl value of select ancestor feature id xsl value of select ancestor feature version NON NLS 1 writer println div NON NLS 1 writer println xsl when NON NLS 1 writer println xsl otherwise NON NLS 1 writer println a href ancestor feature url xsl value of select ancestor feature id xsl value of select ancestor feature version a NON NLS 1 writer println xsl otherwise NON NLS 1 writer println xsl choose NON NLS 1 writer println br NON NLS 1 writer println td NON NLS 1 writer println td NON NLS 1 writer println table NON NLS 1 writer println xsl if test ancestor feature os NON NLS 1 writer println tr td class log text id indent Operating Systems td NON NLS 1 writer println td class log text id indent xsl value of select ancestor feature os td NON NLS 1 writer println tr NON NLS 1 writer println xsl if NON NLS 1 writer println xsl if test ancestor feature ws NON NLS 1 writer println tr td class log text id indent Windows Systems td NON NLS 1 writer println td class log text id indent xsl value of select ancestor feature ws td NON NLS 1 writer println tr NON NLS 1 writer println xsl if NON NLS 1 writer println xsl if test ancestor feature nl NON NLS 1 writer println tr td class log text id indent Languages td NON NLS 1 writer println td class log text id indent xsl value of select ancestor feature nl td NON NLS 1 writer println tr NON NLS 1 writer println xsl if NON NLS 1 writer println xsl if test ancestor feature arch NON NLS 1 writer println tr td class log text id indent Architecture td NON NLS 1 writer println td class log text id indent xsl value of select ancestor feature arch td NON NLS 1 writer println tr NON NLS 1 writer println xsl if NON NLS 1 writer println table NON NLS 1 writer println td NON NLS 1 writer println tr NON NLS 1 writer println xsl for each NON NLS 1 writer println tr td class spacer br td td class spacer br td tr NON NLS 1 writer println xsl if NON NLS 1 writer println xsl for each NON NLS 1 writer println xsl if test count feature gt count feature category NON NLS 1 writer println tr class header NON NLS 1 writer println td class sub header colspan 2 NON NLS 1 writer println Uncategorized NON NLS 1 writer println td NON NLS 1 writer println tr NON NLS 1 writer println xsl if NON NLS 1 writer println xsl choose NON NLS 1 writer println xsl when test function available msxsl node set NON NLS 1 writer println xsl variable name rtf nodes NON NLS 1 writer println xsl for each select feature not category NON NLS 1 writer println xsl sort select id order ascending case order upper first NON NLS 1 writer println xsl sort select version order ascending NON NLS 1 writer println xsl value of select NON NLS 1 writer println xsl copy of select NON NLS 1 writer println xsl for each NON NLS 1 writer println xsl variable NON NLS 1 writer println xsl variable name my Node Set select msxsl node set rtf nodes NON NLS 1 writer println xsl for each select my Node Set NON NLS 1 writer println tr NON NLS 1 writer println xsl choose NON NLS 1 writer println xsl when test position mod 2 1 NON NLS 1 writer println xsl attribute name class dark row xsl attribute NON NLS 1 writer println xsl when NON NLS 1 writer println xsl otherwise NON NLS 1 writer println xsl attribute name class light row xsl attribute NON NLS 1 writer println xsl otherwise NON NLS 1 writer println xsl choose NON NLS 1 writer println td class log text id indent NON NLS 1 writer println xsl choose NON NLS 1 writer println xsl when test label NON NLS 1 writer println a href url xsl value of select label a NON NLS 1 writer println br NON NLS 1 writer println div id indent NON NLS 1 writer println xsl value of select id xsl value of select version NON NLS 1 writer println div NON NLS 1 writer println xsl when NON NLS 1 writer println xsl otherwise NON NLS 1 writer println a href url xsl value of select id xsl value of select version a NON NLS 1 writer println xsl otherwise NON NLS 1 writer println xsl choose NON NLS 1 writer println br br NON NLS 1 writer println td NON NLS 1 writer println td NON NLS 1 writer println table NON NLS 1 writer println xsl if test os NON NLS 1 writer println tr td class log text id indent Operating Systems td NON NLS 1 writer println td class log text id indent xsl value of select os td NON NLS 1 writer println tr NON NLS 1 writer println xsl if NON NLS 1 writer println xsl if test ws NON NLS 1 writer println tr td class log text id indent Windows Systems td NON NLS 1 writer println td class log text id indent xsl value of select ws td NON NLS 1 writer println tr NON NLS 1 writer println xsl if NON NLS 1 writer println xsl if test nl NON NLS 1 writer println tr td class log text id indent Languages td NON NLS 1 writer println td class log text id indent xsl value of select nl td NON NLS 1 writer println tr NON NLS 1 writer println xsl if NON NLS 1 writer println xsl if test arch NON NLS 1 writer println tr td class log text id indent Architecture td NON NLS 1 writer println td class log te createXSLFile IProject IFile getFile mainPage getWebLocation StringWriter StringWriter PrintWriter PrintWriter getName mainPage getWebLocation getName bodyText myNodeSet myNodeSet
private boolean create Site Project I Project project I Path location I Progress Monitor monitor throws Core Exception monitor begin Task PDE Plugin get Resource String CREATING PROJECT 4 if location append project get Name to File exists Core Utility create Project project location monitor project open monitor Core Utility add Nature To Project project PDE SITE NATURE monitor create Folders project monitor if created Project monitor worked 2 monitor sub Task PDE Plugin get Resource String CREATING MANIFEST create site xml I File file create Site Manifest project created Project true monitor worked 1 open manifest for editing open Site Manifest file monitor worked 1 else if project is Open project open monitor I File site File project get File site xml NON NLS 1 if site File exists open Site Manifest site File monitor worked 4 create site xsl site css and index html if main Page is Create Update SiteHTML createXSL File project createCSS File project createHTML File project return true  createSiteProject IProject IPath IProgressMonitor CoreException beginTask PDEPlugin getResourceString CREATING_PROJECT getName toFile CoreUtility createProject CoreUtility addNatureToProject SITE_NATURE createFolders createdProject subTask PDEPlugin getResourceString CREATING_MANIFEST IFile createSiteManifest createdProject openSiteManifest isOpen IFile siteFile getFile siteFile openSiteManifest siteFile mainPage isCreateUpdateSiteHTML createXSLFile createCSSFile createHTMLFile
private void create Folders I Project project I Progress Monitor monitor throws Core Exception String names new String main Page get Web Location Site Build DEFAULT FEATURE DIR Site Build DEFAULT PLUGIN DIR I Folder folder I Path path for int i 0 i names length i if names i length 0 main Page is Create Update SiteHTML i 0 continue folder project get Folder names i path folder get Project Relative Path if path segment Count 0 for int j 1 j path segment Count j folder project get Folder path upto Segment j toOS String if folder exists create Folder project path upto Segment j toOS String monitor create Folder project PDE Core SITEBUILD DIR monitor  createFolders IProject IProgressMonitor CoreException mainPage getWebLocation SiteBuild DEFAULT_FEATURE_DIR SiteBuild DEFAULT_PLUGIN_DIR IFolder IPath mainPage isCreateUpdateSiteHTML getFolder getProjectRelativePath segmentCount segmentCount getFolder uptoSegment toOSString createFolder uptoSegment toOSString createFolder PDECore SITEBUILD_DIR
private void create Folder I Project project String name I Progress Monitor monitor throws Core Exception I Folder plugins project get Folder name if plugins exists plugins create true true new Sub Progress Monitor monitor 1 else monitor worked 1  createFolder IProject IProgressMonitor CoreException IFolder getFolder SubProgressMonitor
if active Part instanceof I Set Selection Target get Shell get Display async Exec new Runnable public void run I Set Selection Target active Part select Reveal selection  activePart ISetSelectionTarget getShell getDisplay asyncExec ISetSelectionTarget activePart selectReveal
private void open Site Manifest I File manifest File I Workbench Page page PDE Plugin get Active Page Reveal the file first final I Selection selection new Structured Selection manifest File final I Workbench Part active Part page get Active Part if active Part instanceof I Set Selection Target get Shell get Display async Exec new Runnable public void run I Set Selection Target active Part select Reveal selection Open the editor File Editor Input input new File Editor Input manifest File String id PDE Plugin SITE EDITOR ID try page open Editor input id catch Part Init Exception e PDE Plugin log Exception e  openSiteManifest IFile manifestFile IWorkbenchPage PDEPlugin getActivePage ISelection StructuredSelection manifestFile IWorkbenchPart activePart getActivePart activePart ISetSelectionTarget getShell getDisplay asyncExec ISetSelectionTarget activePart selectReveal FileEditorInput FileEditorInput manifestFile PDEPlugin SITE_EDITOR_ID openEditor PartInitException PDEPlugin logException
I Runnable With Progress operation new Workspace Modify Operation public void execute I Progress Monitor monitor try create Site Project project location monitor catch Core Exception e PDE Plugin log Exception e finally monitor done  IRunnableWithProgress WorkspaceModifyOperation IProgressMonitor createSiteProject CoreException PDEPlugin logException
public boolean perform Finish final I Project project main Page get Project Handle final I Path location main Page get Location Path I Runnable With Progress operation new Workspace Modify Operation public void execute I Progress Monitor monitor try create Site Project project location monitor catch Core Exception e PDE Plugin log Exception e finally monitor done try get Container run false true operation Basic New Project Resource Wizard update Perspective config catch Invocation Target Exception e PDE Plugin log Exception e return false catch Interrupted Exception e return false return true  performFinish IProject mainPage getProjectHandle IPath mainPage getLocationPath IRunnableWithProgress WorkspaceModifyOperation IProgressMonitor createSiteProject CoreException PDEPlugin logException getContainer BasicNewProjectResourceWizard updatePerspective InvocationTargetException PDEPlugin logException InterruptedException
public void set Initialization Data I Configuration Element config String property Object data throws Core Exception this config config  setInitializationData IConfigurationElement CoreException

public class Open Project Wizard Action extends Action implements I Cheat Sheet Action param text public Open Project Wizard Action super Open Project NON NLS 1  OpenProjectWizardAction ICheatSheetAction OpenProjectWizardAction OpenProject
see I Action Delegate run I Action public void run run new String null  IActionDelegate IAction
public void run String params I Cheat Sheet Manager manager Hashtable def Values new Hashtable if params length 0 def Values put New Site Project Wizard DEF PROJECT NAME params 0 New Site Project Wizard wizard new New Site Project Wizard wizard init PlatformUI get Workbench new Structured Selection wizard init def Values Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create SWT Util set Dialog Size dialog 500 500 dialog get Shell set Text wizard get Window Title int result dialog open notify Result result Wizard Dialog OK  ICheatSheetManager defValues defValues NewSiteProjectWizard DEF_PROJECT_NAME NewSiteProjectWizard NewSiteProjectWizard getWorkbench StructuredSelection defValues WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell SWTUtil setDialogSize getShell setText getWindowTitle notifyResult WizardDialog

public abstract class Base Editor Template extends PDE Template Section public String get Used Extension Point return org eclipse ui editors NON NLS 1  BaseEditorTemplate PDETemplateSection getUsedExtensionPoint
see org eclipse pde ui templates I Template Section get Folders To Include public String get New Files return new String icons NON NLS 1  ITemplateSection getFoldersToInclude getNewFiles

public Control Stack stack new Stack parser new Preprocessor Parser  ControlStack PreprocessorParser
public void set Value Provider I Variable Provider provider parser set Variable Provider provider  setValueProvider IVariableProvider setVariableProvider
public void process Line String line if line starts With if NON NLS 1 String expression line substring 2 trim boolean result false try result parser parse And Evaluate expression catch Exception e Entry entry new Entry entry value result stack push entry else if line starts With else NON NLS 1 if stack is Empty false Entry entry Entry stack peek entry value entry value else if line starts With endif NON NLS 1 pop the stack if stack is Empty stack pop else a preprocessor comment ignore it  processLine startsWith parseAndEvaluate startsWith isEmpty startsWith isEmpty
public boolean get Current State if stack is Empty return true All control levels must evaluate to true to return result true for Iterator iter stack iterator iter has Next Entry entry Entry iter next if entry value return false return true  getCurrentState isEmpty hasNext

Constructor for Editor New Wizard public Editor New Wizard super  EditorNewWizard EditorNewWizard
super public void init I Field Data data super init data set Window Title PDE Plugin get Resource String KEY WTITLE  IFieldData setWindowTitle PDEPlugin getResourceString KEY_WTITLE
see New Extension Template Wizard create Template Sections public I Template Section create Template Sections return new I Template Section new Editor Template  NewExtensionTemplateWizard createTemplateSections ITemplateSection createTemplateSections ITemplateSection EditorTemplate

Constructor for Editor Template public Editor Template set Page Count 1 create Options  EditorTemplate EditorTemplate setPageCount createOptions
public I Plugin Reference get Dependencies String schema Version if schema Version null I Plugin Reference dep new I Plugin Reference 5 dep 0 new Plugin Reference org eclipse core runtime null 0 NON NLS 1 dep 1 new Plugin Reference org eclipse ui null 0 NON NLS 1 dep 2 new Plugin Reference org eclipse jface text null 0 NON NLS 1 dep 3 new Plugin Reference org eclipse ui editors null 0 NON NLS 1 dep 4 new Plugin Reference org eclipse ui workbench texteditor null 0 NON NLS 1 return dep return super get Dependencies schema Version  IPluginReference getDependencies schemaVersion schemaVersion IPluginReference IPluginReference PluginReference PluginReference PluginReference PluginReference PluginReference getDependencies schemaVersion
public void add Pages Wizard wizard Wizard Page page create Page 0 I Help Context Ids TEMPLATE EDITOR page set Title PDE Plugin get Resource String KEY TITLE page set Description PDE Plugin get Resource String KEY DESC wizard add Page page mark Pages Added  addPages WizardPage createPage IHelpContextIds TEMPLATE_EDITOR setTitle PDEPlugin getResourceString KEY_TITLE setDescription PDEPlugin getResourceString KEY_DESC addPage markPagesAdded
private void create Options first page add Option KEY PACKAGE NAME PDE Plugin get Resource String KEY PACKAGE LABEL String null 0 add Option EDITOR CLASS NAME PDE Plugin get Resource String KEY CLASS LABEL XML Editor NON NLS 1 0 add Option EDITOR NAME PDE Plugin get Resource String KEY EDITOR LABEL PDE Plugin get Resource String KEY DEFAULT EDITOR NAME 0 add Option EXTENSIONS PDE Plugin get Resource String KEY EXTENSION LABEL xml NON NLS 1 0  createOptions addOption KEY_PACKAGE_NAME PDEPlugin getResourceString KEY_PACKAGE_LABEL addOption EDITOR_CLASS_NAME PDEPlugin getResourceString KEY_CLASS_LABEL XMLEditor addOption EDITOR_NAME PDEPlugin getResourceString KEY_EDITOR_LABEL PDEPlugin getResourceString KEY_DEFAULT_EDITOR_NAME addOption PDEPlugin getResourceString KEY_EXTENSION_LABEL
public String get Section Id return editor NON NLS 1  getSectionId
see I Template Section get Number Of Work Units public int get Number Of Work Units return super get Number Of Work Units 1  ITemplateSection getNumberOfWorkUnits getNumberOfWorkUnits getNumberOfWorkUnits
protected void initialize Fields I Field Data data In a new project wizard we don t know this yet the model has not been created String id data get Id initialize Option KEY PACKAGE NAME id editors NON NLS 1  initializeFields IFieldData getId initializeOption KEY_PACKAGE_NAME
public void initialize Fields I Plugin Model Base model In the new extension wizard the model exists so we can initialize directly from it String plugin Id model get Plugin Base get Id initialize Option KEY PACKAGE NAME plugin Id editors NON NLS 1  initializeFields IPluginModelBase pluginId getPluginBase getId initializeOption KEY_PACKAGE_NAME pluginId
public boolean is Dependent On Parent Wizard return true  isDependentOnParentWizard
see Generic Template Section validate Options Template Option public void validate Options Template Option source if source is Required source is Empty flag Missing Required Option source else validate Container Page source  GenericTemplateSection validateOptions TemplateOption validateOptions TemplateOption isRequired isEmpty flagMissingRequiredOption validateContainerPage
private void validate Container Page Template Option source Template Option options get Options 0 for int i 0 i options length i Template Option next Option options i if next Option is Required next Option is Empty flag Missing Required Option next Option return reset Page State  validateContainerPage TemplateOption TemplateOption getOptions TemplateOption nextOption nextOption isRequired nextOption isEmpty flagMissingRequiredOption nextOption resetPageState
protected void update Model I Progress Monitor monitor throws Core Exception I Plugin Base plugin model get Plugin Base I Plugin Extension extension create Extension get Used Extension Point true I Plugin Model Factory factory model get Plugin Factory I Plugin Element editor Element factory create Element extension editor Element set Name editor NON NLS 1 editor Element set Attribute id NON NLS 1 get String Option KEY PACKAGE NAME get String Option EDITOR CLASS NAME NON NLS 1 editor Element set Attribute name get String Option EDITOR NAME NON NLS 1 editor Element set Attribute icon icons sample gif NON NLS 1 NON NLS 2 editor Element set Attribute extensions get String Option EXTENSIONS NON NLS 1 editor Element set Attribute class NON NLS 1 get String Option KEY PACKAGE NAME get String Option EDITOR CLASS NAME NON NLS 1 editor Element set Attribute contributor Class NON NLS 1 org eclipse ui texteditor Basic Text Editor Action Contributor NON NLS 1 extension add editor Element if extension is In The Model plugin add extension  updateModel IProgressMonitor CoreException IPluginBase getPluginBase IPluginExtension createExtension getUsedExtensionPoint IPluginModelFactory getPluginFactory IPluginElement editorElement createElement editorElement setName editorElement setAttribute getStringOption KEY_PACKAGE_NAME getStringOption EDITOR_CLASS_NAME editorElement setAttribute getStringOption EDITOR_NAME editorElement setAttribute editorElement setAttribute getStringOption editorElement setAttribute getStringOption KEY_PACKAGE_NAME getStringOption EDITOR_CLASS_NAME editorElement setAttribute contributorClass BasicTextEditorActionContributor editorElement isInTheModel

Constructor for Hello World New Wizard public Hello World New Wizard super  HelloWorldNewWizard HelloWorldNewWizard
public void init I Field Data data super init data set Window Title PDE Plugin get Resource String KEY WTITLE  IFieldData setWindowTitle PDEPlugin getResourceString KEY_WTITLE
see New Extension Template Wizard create Template Sections public I Template Section create Template Sections return new I Template Section new Hello World Template  NewExtensionTemplateWizard createTemplateSections ITemplateSection createTemplateSections ITemplateSection HelloWorldTemplate

Constructor for Hello World Template public Hello World Template set Page Count 1 create Options  HelloWorldTemplate HelloWorldTemplate setPageCount createOptions
public String get Section Id return hello World NON NLS 1  getSectionId helloWorld
see I Template Section get Number Of Work Units public int get Number Of Work Units return super get Number Of Work Units 1  ITemplateSection getNumberOfWorkUnits getNumberOfWorkUnits getNumberOfWorkUnits
private void create Options add Option KEY PACKAGE NAME PDE Plugin get Resource String KEY PACKAGE LABEL String null 0 add Option KEY CLASS NAME PDE Plugin get Resource String KEY CLASS LABEL CLASS NAME 0 add Option KEY MESSAGE PDE Plugin get Resource String KEY TEXT LABEL PDE Plugin get Resource String KEY DEFAULT MESSAGE 0  createOptions addOption KEY_PACKAGE_NAME PDEPlugin getResourceString KEY_PACKAGE_LABEL addOption KEY_CLASS_NAME PDEPlugin getResourceString KEY_CLASS_LABEL CLASS_NAME addOption KEY_MESSAGE PDEPlugin getResourceString KEY_TEXT_LABEL PDEPlugin getResourceString KEY_DEFAULT_MESSAGE
public void add Pages Wizard wizard Wizard Page page create Page 0 I Help Context Ids TEMPLATE HELLO WORLD page set Title PDE Plugin get Resource String KEY TITLE page set Description PDE Plugin get Resource String KEY DESC wizard add Page page mark Pages Added  addPages WizardPage createPage IHelpContextIds TEMPLATE_HELLO_WORLD setTitle PDEPlugin getResourceString KEY_TITLE setDescription PDEPlugin getResourceString KEY_DESC addPage markPagesAdded
public void validate Options Template Option source if source is Required source is Empty flag Missing Required Option source else validate Container Page source  validateOptions TemplateOption isRequired isEmpty flagMissingRequiredOption validateContainerPage
private void validate Container Page Template Option source Template Option all Page Options get Options 0 for int i 0 i all Page Options length i Template Option next Option all Page Options i if next Option is Required next Option is Empty flag Missing Required Option next Option return reset Page State  validateContainerPage TemplateOption TemplateOption allPageOptions getOptions allPageOptions TemplateOption nextOption allPageOptions nextOption isRequired nextOption isEmpty flagMissingRequiredOption nextOption resetPageState
public boolean is Dependent On Parent Wizard return true  isDependentOnParentWizard
protected void initialize Fields I Field Data data In a new project wizard we don t know this yet the model has not been created String id data get Id initialize Option KEY PACKAGE NAME id actions NON NLS 1  initializeFields IFieldData getId initializeOption KEY_PACKAGE_NAME
public void initialize Fields I Plugin Model Base model In the new extension wizard the model exists so we can initialize directly from it String plugin Id model get Plugin Base get Id initialize Option KEY PACKAGE NAME plugin Id actions NON NLS 1  initializeFields IPluginModelBase pluginId getPluginBase getId initializeOption KEY_PACKAGE_NAME pluginId
public String get Used Extension Point return org eclipse ui action Sets NON NLS 1  getUsedExtensionPoint actionSets
protected void update Model I Progress Monitor monitor throws Core Exception I Plugin Base plugin model get Plugin Base I Plugin Extension extension create Extension org eclipse ui action Sets true NON NLS 1 I Plugin Model Factory factory model get Plugin Factory I Plugin Element set Element factory create Element extension set Element set Name action Set NON NLS 1 set Element set Attribute id plugin get Id action Set NON NLS 1 NON NLS 2 set Element set Attribute label PDE Plugin get Resource String KEY SAMPLE ACTION SET NON NLS 1 set Element set Attribute visible true NON NLS 1 NON NLS 2 I Plugin Element menu Element factory create Element set Element menu Element set Name menu NON NLS 1 menu Element set Attribute label PDE Plugin get Resource String KEY SAMPLE MENU NON NLS 1 menu Element set Attribute id sample Menu NON NLS 1 NON NLS 2 I Plugin Element group Element factory create Element menu Element group Element set Name separator NON NLS 1 group Element set Attribute name sample Group NON NLS 1 NON NLS 2 menu Element add group Element set Element add menu Element String full Class Name get String Option KEY PACKAGE NAME get String Option KEY CLASS NAME NON NLS 1 I Plugin Element action Element factory create Element set Element action Element set Name action NON NLS 1 action Element set Attribute id full Class Name NON NLS 1 action Element set Attribute label PDE Plugin get Resource String KEY SAMPLE ACTION NON NLS 1 action Element set Attribute menubar Path sample Menu sample Group NON NLS 1 NON NLS 2 action Element set Attribute toolbar Path sample Group NON NLS 1 NON NLS 2 action Element set Attribute icon icons sample gif NON NLS 1 NON NLS 2 action Element set Attribute tooltip PDE Plugin get Resource String KEY DEFAULT MESSAGE NON NLS 1 action Element set Attribute class full Class Name NON NLS 1 set Element add action Element extension add set Element if extension is In The Model plugin add extension  updateModel IProgressMonitor CoreException IPluginBase getPluginBase IPluginExtension createExtension actionSets IPluginModelFactory getPluginFactory IPluginElement setElement createElement setElement setName actionSet setElement setAttribute getId actionSet setElement setAttribute PDEPlugin getResourceString KEY_SAMPLE_ACTION_SET setElement setAttribute IPluginElement menuElement createElement setElement menuElement setName menuElement setAttribute PDEPlugin getResourceString KEY_SAMPLE_MENU menuElement setAttribute sampleMenu IPluginElement groupElement createElement menuElement groupElement setName groupElement setAttribute sampleGroup menuElement groupElement setElement menuElement fullClassName getStringOption KEY_PACKAGE_NAME getStringOption KEY_CLASS_NAME IPluginElement actionElement createElement setElement actionElement setName actionElement setAttribute fullClassName actionElement setAttribute PDEPlugin getResourceString KEY_SAMPLE_ACTION actionElement setAttribute menubarPath sampleMenu sampleGroup actionElement setAttribute toolbarPath sampleGroup actionElement setAttribute actionElement setAttribute PDEPlugin getResourceString KEY_DEFAULT_MESSAGE actionElement setAttribute fullClassName setElement actionElement setElement isInTheModel
see org eclipse pde ui templates I Template Section get Folders To Include public String get New Files return new String icons NON NLS 1  ITemplateSection getFoldersToInclude getNewFiles

public Help Template set Page Count 1 create Options alter Option States  HelpTemplate setPageCount createOptions alterOptionStates
public void add Pages Wizard wizard Wizard Page page create Page 0 I Help Context Ids TEMPLATE HELP page set Title PDE Plugin get Resource String NL TITLE page set Description PDE Plugin get Resource String NL DESC wizard add Page page mark Pages Added  addPages WizardPage createPage IHelpContextIds TEMPLATE_HELP setTitle PDEPlugin getResourceString NL_TITLE setDescription PDEPlugin getResourceString NL_DESC addPage markPagesAdded
private void alter Option States gen Test Option set Enabled primary Option is Selected getting Started Option set Enabled primary Option is Selected concepts Option set Enabled primary Option is Selected tasks Option set Enabled primary Option is Selected reference Option set Enabled primary Option is Selected samples Option set Enabled primary Option is Selected  alterOptionStates genTestOption setEnabled primaryOption isSelected gettingStartedOption setEnabled primaryOption isSelected conceptsOption setEnabled primaryOption isSelected tasksOption setEnabled primaryOption isSelected referenceOption setEnabled primaryOption isSelected samplesOption setEnabled primaryOption isSelected
private void create Options toc Label Option add Option KEY TOC LABEL PDE Plugin get Resource String NL TOC LABEL Sample Table of Contents NON NLS 1 0 primary Option Boolean Option add Option KEY IS PRIMARY PDE Plugin get Resource String NL IS PRIMARY false 0 gen Test Option Boolean Option add Option KEY GEN TEST PDE Plugin get Resource String NL GEN TEST true 0 getting Started Option Boolean Option add Option KEY GET STARTED PDE Plugin get Resource String NL GET STARTED true 0 concepts Option Boolean Option add Option KEY CONCEPTS PDE Plugin get Resource String NL CONCEPTS true 0 tasks Option Boolean Option add Option KEY TASKS PDE Plugin get Resource String NL TASKS true 0 reference Option Boolean Option add Option KEY REFERENCE PDE Plugin get Resource String NL REFERENCE true 0 samples Option Boolean Option add Option KEY SAMPLES PDE Plugin get Resource String NL SAMPLES true 0  createOptions tocLabelOption addOption KEY_TOC_LABEL PDEPlugin getResourceString NL_TOC_LABEL primaryOption BooleanOption addOption KEY_IS_PRIMARY PDEPlugin getResourceString NL_IS_PRIMARY genTestOption BooleanOption addOption KEY_GEN_TEST PDEPlugin getResourceString NL_GEN_TEST gettingStartedOption BooleanOption addOption KEY_GET_STARTED PDEPlugin getResourceString NL_GET_STARTED conceptsOption BooleanOption addOption KEY_CONCEPTS PDEPlugin getResourceString NL_CONCEPTS tasksOption BooleanOption addOption KEY_TASKS PDEPlugin getResourceString NL_TASKS referenceOption BooleanOption addOption KEY_REFERENCE PDEPlugin getResourceString NL_REFERENCE samplesOption BooleanOption addOption KEY_SAMPLES PDEPlugin getResourceString NL_SAMPLES
see Option Template Section get Section Id public String get Section Id return help NON NLS 1  OptionTemplateSection getSectionId getSectionId
protected boolean is Ok To Create Folder File source Folder boolean is Ok true String folder Name source Folder get Name if folder Name equals concepts NON NLS 1 is Ok concepts Option is Enabled concepts Option is Selected else if folder Name equals gettingstarted NON NLS 1 is Ok getting Started Option is Enabled getting Started Option is Selected else if folder Name equals reference NON NLS 1 is Ok reference Option is Enabled reference Option is Selected else if folder Name equals samples NON NLS 1 is Ok samples Option is Enabled samples Option is Selected else if folder Name equals tasks NON NLS 1 is Ok tasks Option is Enabled tasks Option is Selected return is Ok  isOkToCreateFolder sourceFolder isOk folderName sourceFolder getName folderName isOk conceptsOption isEnabled conceptsOption isSelected folderName isOk gettingStartedOption isEnabled gettingStartedOption isSelected folderName isOk referenceOption isEnabled referenceOption isSelected folderName isOk samplesOption isEnabled samplesOption isSelected folderName isOk tasksOption isEnabled tasksOption isSelected isOk
see Abstract Template Section is Ok To Create File File protected boolean is Ok To Create File File source File boolean is Ok true String file Name source File get Name if file Name equals test Toc xml NON NLS 1 is Ok gen Test Option is Enabled gen Test Option is Selected else if file Name equals tocconcepts xml NON NLS 1 is Ok concepts Option is Enabled concepts Option is Selected else if file Name equals tocgettingstarted xml NON NLS 1 is Ok getting Started Option is Enabled getting Started Option is Selected else if file Name equals tocreference xml NON NLS 1 is Ok reference Option is Enabled reference Option is Selected else if file Name equals tocsamples xml NON NLS 1 is Ok samples Option is Enabled samples Option is Selected else if file Name equals toctasks xml NON NLS 1 is Ok tasks Option is Enabled tasks Option is Selected else if file Name equals maintopic html file Name equals subtopic html NON NLS 1 NON NLS 2 source File get Parent File get Name equals html NON NLS 1 is Ok primary Option is Selected primary Option is Selected getting Started Option is Selected concepts Option is Selected tasks Option is Selected reference Option is Selected samples Option is Selected return is Ok  AbstractTemplateSection isOkToCreateFile isOkToCreateFile sourceFile isOk fileName sourceFile getName fileName testToc isOk genTestOption isEnabled genTestOption isSelected fileName isOk conceptsOption isEnabled conceptsOption isSelected fileName isOk gettingStartedOption isEnabled gettingStartedOption isSelected fileName isOk referenceOption isEnabled referenceOption isSelected fileName isOk samplesOption isEnabled samplesOption isSelected fileName isOk tasksOption isEnabled tasksOption isSelected fileName fileName sourceFile getParentFile getName isOk primaryOption isSelected primaryOption isSelected gettingStartedOption isSelected conceptsOption isSelected tasksOption isSelected referenceOption isSelected samplesOption isSelected isOk
see Base Option Template Section validate Options Template Option public void validate Options Template Option changed if changed toc Label Option if changed is Empty flag Missing Required Option changed else reset Page State else if changed primary Option alter Option States  BaseOptionTemplateSection validateOptions TemplateOption validateOptions TemplateOption tocLabelOption isEmpty flagMissingRequiredOption resetPageState primaryOption alterOptionStates
see Abstract Template Section update Model I Progress Monitor protected void update Model I Progress Monitor monitor throws Core Exception I Plugin Base plugin model get Plugin Base I Plugin Extension extension create Extension get Used Extension Point true I Plugin Model Factory factory model get Plugin Factory I Plugin Element toc Element factory create Element extension toc Element set Name toc NON NLS 1 toc Element set Attribute file toc xml NON NLS 1 NON NLS 2 if primary Option is Selected toc Element set Attribute primary true NON NLS 1 NON NLS 2 extension add toc Element if gen Test Option is Selected gen Test Option is Enabled I Plugin Element test Toc Element factory create Element extension test Toc Element set Name toc NON NLS 1 test Toc Element set Attribute file test Toc xml NON NLS 1 NON NLS 2 test Toc Element set Attribute primary true NON NLS 1 NON NLS 2 extension add test Toc Element add Non Primary Topic concepts Option tocconcepts xml extension NON NLS 1 add Non Primary Topic getting Started Option tocgettingstarted xml extension NON NLS 1 add Non Primary Topic reference Option tocreference xml extension NON NLS 1 add Non Primary Topic samples Option tocsamples xml extension NON NLS 1 add Non Primary Topic tasks Option toctasks xml extension NON NLS 1 if extension is In The Model plugin add extension  AbstractTemplateSection updateModel IProgressMonitor updateModel IProgressMonitor CoreException IPluginBase getPluginBase IPluginExtension createExtension getUsedExtensionPoint IPluginModelFactory getPluginFactory IPluginElement tocElement createElement tocElement setName tocElement setAttribute primaryOption isSelected tocElement setAttribute tocElement genTestOption isSelected genTestOption isEnabled IPluginElement testTocElement createElement testTocElement setName testTocElement setAttribute testToc testTocElement setAttribute testTocElement addNonPrimaryTopic conceptsOption addNonPrimaryTopic gettingStartedOption addNonPrimaryTopic referenceOption addNonPrimaryTopic samplesOption addNonPrimaryTopic tasksOption isInTheModel
private void add Non Primary Topic Boolean Option option String file I Plugin Extension extension throws Core Exception if option is Enabled option is Selected I Plugin Element toc Element extension get Plugin Model get Plugin Factory create Element extension toc Element set Name toc NON NLS 1 toc Element set Attribute file file NON NLS 1 extension add toc Element  addNonPrimaryTopic BooleanOption IPluginExtension CoreException isEnabled isSelected IPluginElement tocElement getPluginModel getPluginFactory createElement tocElement setName tocElement setAttribute tocElement
see I Template Section get Used Extension Point public String get Used Extension Point return org eclipse help toc NON NLS 1  ITemplateSection getUsedExtensionPoint getUsedExtensionPoint
see org eclipse pde ui templates Abstract Template Section get Dependencies java lang String public I Plugin Reference get Dependencies String schema Version return new I Plugin Reference new Plugin Reference org eclipse help null 0 NON NLS 1  AbstractTemplateSection getDependencies IPluginReference getDependencies schemaVersion IPluginReference PluginReference
see org eclipse pde internal ui wizards templates PDE Template Section get Folders To Include public String get New Files return new String html xml NON NLS 1 NON NLS 2  PDETemplateSection getFoldersToInclude getNewFiles

Constructor for Multi Page Editor New Wizard public Multi Page Editor New Wizard super  MultiPageEditorNewWizard MultiPageEditorNewWizard
super public void init I Field Data data super init data set Window Title PDE Plugin get Resource String KEY WTITLE  IFieldData setWindowTitle PDEPlugin getResourceString KEY_WTITLE
public I Template Section create Template Sections return new I Template Section new Multi Page Editor Template new New Wizard Template  ITemplateSection createTemplateSections ITemplateSection MultiPageEditorTemplate NewWizardTemplate

Constructor for Multi Page Editor Template public Multi Page Editor Template set Page Count 1 create Options  MultiPageEditorTemplate MultiPageEditorTemplate setPageCount createOptions
public String get Section Id return multi Page Editor NON NLS 1  getSectionId multiPageEditor
public I Plugin Reference get Dependencies String schema Version if schema Version null I Plugin Reference dep new I Plugin Reference 7 dep 0 new Plugin Reference org eclipse jface text null 0 NON NLS 1 dep 1 new Plugin Reference org eclipse core resources null 0 NON NLS 1 dep 2 new Plugin Reference org eclipse ui null 0 NON NLS 1 dep 3 new Plugin Reference org eclipse ui editors null 0 NON NLS 1 dep 4 new Plugin Reference org eclipse ui ide null 0 NON NLS 1 dep 5 new Plugin Reference org eclipse ui workbench texteditor null 0 NON NLS 1 dep 6 new Plugin Reference org eclipse core runtime null 0 NON NLS 1 return dep return super get Dependencies schema Version  IPluginReference getDependencies schemaVersion schemaVersion IPluginReference IPluginReference PluginReference PluginReference PluginReference PluginReference PluginReference PluginReference PluginReference getDependencies schemaVersion
see I Template Section get Number Of Work Units public int get Number Of Work Units return super get Number Of Work Units 1  ITemplateSection getNumberOfWorkUnits getNumberOfWorkUnits getNumberOfWorkUnits
private void create Options first page add Option KEY PACKAGE NAME PDE Plugin get Resource String KEY PACKAGE LABEL String null 0 add Option editor Class Name NON NLS 1 PDE Plugin get Resource String KEY CLASS LABEL Multi Page Editor NON NLS 1 0 add Option contributor Class Name NON NLS 1 PDE Plugin get Resource String KEY CONTRIBUTOR LABEL Multi Page Editor Contributor NON NLS 1 0 add Option editor Name NON NLS 1 PDE Plugin get Resource String KEY EDITOR LABEL PDE Plugin get Resource String KEY DEFAULT EDITOR NAME 0 add Option extensions NON NLS 1 PDE Plugin get Resource String KEY EXTENSIONS LABEL mpe NON NLS 1 0  createOptions addOption KEY_PACKAGE_NAME PDEPlugin getResourceString KEY_PACKAGE_LABEL addOption editorClassName PDEPlugin getResourceString KEY_CLASS_LABEL MultiPageEditor addOption contributorClassName PDEPlugin getResourceString KEY_CONTRIBUTOR_LABEL MultiPageEditorContributor addOption editorName PDEPlugin getResourceString KEY_EDITOR_LABEL PDEPlugin getResourceString KEY_DEFAULT_EDITOR_NAME addOption PDEPlugin getResourceString KEY_EXTENSIONS_LABEL
protected void initialize Fields I Field Data data In a new project wizard we don t know this yet the model has not been created String id data get Id initialize Option KEY PACKAGE NAME id editors NON NLS 1  initializeFields IFieldData getId initializeOption KEY_PACKAGE_NAME
public void initialize Fields I Plugin Model Base model In the new extension wizard the model exists so we can initialize directly from it String plugin Id model get Plugin Base get Id initialize Option KEY PACKAGE NAME plugin Id editors NON NLS 1  initializeFields IPluginModelBase pluginId getPluginBase getId initializeOption KEY_PACKAGE_NAME pluginId
public boolean is Dependent On Parent Wizard return true  isDependentOnParentWizard
public void add Pages Wizard wizard Wizard Page page create Page 0 I Help Context Ids TEMPLATE MULTIPAGE EDITOR page set Title PDE Plugin get Resource String KEY TITLE page set Description PDE Plugin get Resource String KEY DESC wizard add Page page mark Pages Added  addPages WizardPage createPage IHelpContextIds TEMPLATE_MULTIPAGE_EDITOR setTitle PDEPlugin getResourceString KEY_TITLE setDescription PDEPlugin getResourceString KEY_DESC addPage markPagesAdded
public void validate Options Template Option source if source is Required source is Empty flag Missing Required Option source else validate Container Page source  validateOptions TemplateOption isRequired isEmpty flagMissingRequiredOption validateContainerPage
private void validate Container Page Template Option source Template Option all Page Options get Options 0 for int i 0 i all Page Options length i Template Option next Option all Page Options i if next Option is Required next Option is Empty flag Missing Required Option next Option return reset Page State  validateContainerPage TemplateOption TemplateOption allPageOptions getOptions allPageOptions TemplateOption nextOption allPageOptions nextOption isRequired nextOption isEmpty flagMissingRequiredOption nextOption resetPageState
protected void update Model I Progress Monitor monitor throws Core Exception I Plugin Base plugin model get Plugin Base I Plugin Extension extension create Extension org eclipse ui editors true NON NLS 1 I Plugin Model Factory factory model get Plugin Factory String editor Class Name get String Option KEY PACKAGE NAME get String Option editor Class Name NON NLS 1 NON NLS 2 String contributor Class Name get String Option KEY PACKAGE NAME NON NLS 1 get String Option contributor Class Name NON NLS 1 I Plugin Element editor Element factory create Element extension editor Element set Name editor NON NLS 1 editor Element set Attribute id editor Class Name NON NLS 1 editor Element set Attribute name get String Option editor Name NON NLS 1 NON NLS 2 editor Element set Attribute icon icons sample gif NON NLS 1 NON NLS 2 editor Element set Attribute extensions get String Option extensions NON NLS 1 NON NLS 2 editor Element set Attribute class editor Class Name NON NLS 1 editor Element set Attribute contributor Class contributor Class Name NON NLS 1 extension add editor Element if extension is In The Model plugin add extension  updateModel IProgressMonitor CoreException IPluginBase getPluginBase IPluginExtension createExtension IPluginModelFactory getPluginFactory editorClassName getStringOption KEY_PACKAGE_NAME getStringOption editorClassName contributorClassName getStringOption KEY_PACKAGE_NAME getStringOption contributorClassName IPluginElement editorElement createElement editorElement setName editorElement setAttribute editorClassName editorElement setAttribute getStringOption editorName editorElement setAttribute editorElement setAttribute getStringOption editorElement setAttribute editorClassName editorElement setAttribute contributorClass contributorClassName editorElement isInTheModel

private Template Selection Page selection Page public New Plugin Template Choice Wizard  TemplateSelectionPage selectionPage NewPluginTemplateChoiceWizard
public I Template Section get Template Sections if selection Page null return new I Template Section 0 return selection Page get Selected Templates  ITemplateSection getTemplateSections selectionPage ITemplateSection selectionPage getSelectedTemplates
public void add Additional Pages selection Page new Template Selection Page add Page selection Page  addAdditionalPages selectionPage TemplateSelectionPage addPage selectionPage
public I Wizard Page get Next Page I Wizard Page page if selection Page null return null return selection Page get Next Visible Page page  IWizardPage getNextPage IWizardPage selectionPage selectionPage getNextVisiblePage
return selection Page get Next Visible Page page public I Wizard Page get Previous Page I Wizard Page page return null  selectionPage getNextVisiblePage IWizardPage getPreviousPage IWizardPage

private static final String KEY FILE LABEL New Wizard Template file Name NON NLS 1 public New Wizard Template set Page Count 1 create Options  KEY_FILE_LABEL NewWizardTemplate fileName NewWizardTemplate setPageCount createOptions
public String get Section Id return new Wizard NON NLS 1  getSectionId newWizard
see I Template Section get Number Of Work Units public int get Number Of Work Units return super get Number Of Work Units 1  ITemplateSection getNumberOfWorkUnits getNumberOfWorkUnits getNumberOfWorkUnits
private void create Options first page add Option KEY PACKAGE NAME PDE Plugin get Resource String KEY PACKAGE LABEL String null 0 add Option category Id PDE Plugin get Resource String KEY CATEGORY ID LABEL String null 0 NON NLS 1 add Option category Name PDE Plugin get Resource String KEY CATEGORY NAME LABEL Sample Wizards 0 NON NLS 1 NON NLS 2 add Option wizard Class Name PDE Plugin get Resource String KEY CLASS LABEL Sample New Wizard 0 NON NLS 1 NON NLS 2 add Option wizard Page Class Name PDE Plugin get Resource String KEY PAGE CLASS LABEL Sample New Wizard Page 0 NON NLS 1 NON NLS 2 add Option wizard Name PDE Plugin get Resource String KEY WIZARD LABEL PDE Plugin get Resource String KEY DEFAULT NAME 0 NON NLS 1 add Option extension PDE Plugin get Resource String KEY EXTENSION LABEL mpe 0 NON NLS 1 NON NLS 2 add Option initial File Name PDE Plugin get Resource String KEY FILE LABEL new file mpe 0 NON NLS 1 NON NLS 2  createOptions addOption KEY_PACKAGE_NAME PDEPlugin getResourceString KEY_PACKAGE_LABEL addOption categoryId PDEPlugin getResourceString KEY_CATEGORY_ID_LABEL addOption categoryName PDEPlugin getResourceString KEY_CATEGORY_NAME_LABEL addOption wizardClassName PDEPlugin getResourceString KEY_CLASS_LABEL SampleNewWizard addOption wizardPageClassName PDEPlugin getResourceString KEY_PAGE_CLASS_LABEL SampleNewWizardPage addOption wizardName PDEPlugin getResourceString KEY_WIZARD_LABEL PDEPlugin getResourceString KEY_DEFAULT_NAME addOption PDEPlugin getResourceString KEY_EXTENSION_LABEL addOption initialFileName PDEPlugin getResourceString KEY_FILE_LABEL new_file
protected void initialize Fields I Field Data data In a new project wizard we don t know this yet the model has not been created String id data get Id initialize Option KEY PACKAGE NAME id wizards NON NLS 1 initialize Option category Id id NON NLS 1  initializeFields IFieldData getId initializeOption KEY_PACKAGE_NAME initializeOption categoryId
public void initialize Fields I Plugin Model Base model In the new extension wizard the model exists so we can initialize directly from it String plugin Id model get Plugin Base get Id initialize Option KEY PACKAGE NAME plugin Id wizards NON NLS 1 initialize Option category Id plugin Id NON NLS 1  initializeFields IPluginModelBase pluginId getPluginBase getId initializeOption KEY_PACKAGE_NAME pluginId initializeOption categoryId pluginId
public I Plugin Reference get Dependencies String schema Version Array List result new Array List result add new Plugin Reference org eclipse core resources null 0 NON NLS 1 result add new Plugin Reference org eclipse ui null 0 NON NLS 1 if schema Version null result add new Plugin Reference org eclipse ui ide null 0 NON NLS 1 result add new Plugin Reference org eclipse core runtime null 0 NON NLS 1 return I Plugin Reference result to Array new I Plugin Reference result size  IPluginReference getDependencies schemaVersion ArrayList ArrayList PluginReference PluginReference schemaVersion PluginReference PluginReference IPluginReference toArray IPluginReference
public boolean is Dependent On Parent Wizard return true  isDependentOnParentWizard
public void add Pages Wizard wizard Wizard Page page create Page 0 I Help Context Ids TEMPLATE NEW WIZARD page set Title PDE Plugin get Resource String KEY TITLE page set Description PDE Plugin get Resource String KEY DESC wizard add Page page mark Pages Added  addPages WizardPage createPage IHelpContextIds TEMPLATE_NEW_WIZARD setTitle PDEPlugin getResourceString KEY_TITLE setDescription PDEPlugin getResourceString KEY_DESC addPage markPagesAdded
public void validate Options Template Option source if source is Required source is Empty flag Missing Required Option source else validate Container Page source  validateOptions TemplateOption isRequired isEmpty flagMissingRequiredOption validateContainerPage
private void validate Container Page Template Option source Template Option all Page Options get Options 0 for int i 0 i all Page Options length i Template Option next Option all Page Options i if next Option is Required next Option is Empty flag Missing Required Option next Option return reset Page State  validateContainerPage TemplateOption TemplateOption allPageOptions getOptions allPageOptions TemplateOption nextOption allPageOptions nextOption isRequired nextOption isEmpty flagMissingRequiredOption nextOption resetPageState
public String get Used Extension Point return org eclipse ui new Wizards NON NLS 1  getUsedExtensionPoint newWizards
protected void update Model I Progress Monitor monitor throws Core Exception I Plugin Base plugin model get Plugin Base I Plugin Extension extension create Extension org eclipse ui new Wizards true NON NLS 1 I Plugin Model Factory factory model get Plugin Factory String cid get String Option category Id NON NLS 1 create Category extension cid String full Class Name get String Option KEY PACKAGE NAME get String Option wizard Class Name NON NLS 1 NON NLS 2 I Plugin Element view Element factory create Element extension view Element set Name wizard NON NLS 1 view Element set Attribute id full Class Name NON NLS 1 view Element set Attribute name get String Option wizard Name NON NLS 1 NON NLS 2 view Element set Attribute icon icons sample gif NON NLS 1 NON NLS 2 view Element set Attribute class full Class Name NON NLS 1 view Element set Attribute category cid NON NLS 1 extension add view Element if extension is In The Model plugin add extension  updateModel IProgressMonitor CoreException IPluginBase getPluginBase IPluginExtension createExtension newWizards IPluginModelFactory getPluginFactory getStringOption categoryId createCategory fullClassName getStringOption KEY_PACKAGE_NAME getStringOption wizardClassName IPluginElement viewElement createElement viewElement setName viewElement setAttribute fullClassName viewElement setAttribute getStringOption wizardName viewElement setAttribute viewElement setAttribute fullClassName viewElement setAttribute viewElement isInTheModel
private void create Category I Plugin Extension extension String id throws Core Exception I Plugin Object elements extension get Children for int i 0 i elements length i I Plugin Element element I Plugin Element elements i if element get Name equals Ignore Case category NON NLS 1 I Plugin Attribute att element get Attribute id NON NLS 1 if att null String cid att get Value if cid null cid equals id return I Plugin Element category Element model get Factory create Element extension category Element set Name category NON NLS 1 category Element set Attribute name get String Option category Name NON NLS 1 NON NLS 2 category Element set Attribute id id NON NLS 1 extension add category Element  createCategory IPluginExtension CoreException IPluginObject getChildren IPluginElement IPluginElement getName equalsIgnoreCase IPluginAttribute getAttribute getValue IPluginElement categoryElement getFactory createElement categoryElement setName categoryElement setAttribute getStringOption categoryName categoryElement setAttribute categoryElement
see org eclipse pde internal ui wizards templates PDE Template Section get Folders To Include public String get New Files return new String icons NON NLS 1  PDETemplateSection getFoldersToInclude getNewFiles

public abstract class PDE Template Section extends Option Template Section protected Resource Bundle get Plugin Resource Bundle return PDE Plugin get Default get Descriptor get Resource Bundle  PDETemplateSection OptionTemplateSection ResourceBundle getPluginResourceBundle PDEPlugin getDefault getDescriptor getResourceBundle
protected URL get InstallURL return PDE Plugin get Default get Descriptor get InstallURL  getInstallURL PDEPlugin getDefault getDescriptor getInstallURL
see org eclipse pde ui templates I Template Section get Folders To Include public String get New Files return new String 0  ITemplateSection getFoldersToInclude getNewFiles

private static final String KEY WTITLE Perspective Extensions New Wizard wtitle NON NLS 1 Constructor for Perspective Extensions New Wizard public Perspective Extensions New Wizard super  KEY_WTITLE PerspectiveExtensionsNewWizard PerspectiveExtensionsNewWizard PerspectiveExtensionsNewWizard
public void init I Field Data data super init data set Window Title PDE Plugin get Resource String KEY WTITLE  IFieldData setWindowTitle PDEPlugin getResourceString KEY_WTITLE
see New Plugin Template Wizard create Template Sections public I Template Section create Template Sections return new I Template Section new Perspective Extensions Template  NewPluginTemplateWizard createTemplateSections ITemplateSection createTemplateSections ITemplateSection PerspectiveExtensionsTemplate

Constructor for Perspective Extensions Template public Perspective Extensions Template set Page Count 2 create Options  PerspectiveExtensionsTemplate PerspectiveExtensionsTemplate setPageCount createOptions
public void add Pages Wizard wizard Wizard Page page0 create Page 0 I Help Context Ids TEMPLATE PERSPECTIVE EXTENSIONS page0 set Title PDE Plugin get Resource String NL TITLE0 page0 set Description PDE Plugin get Resource String NL DESC0 wizard add Page page0 Wizard Page page1 create Page 1 I Help Context Ids TEMPLATE PERSPECTIVE EXTENSIONS page1 set Title PDE Plugin get Resource String NL TITLE1 page1 set Description PDE Plugin get Resource String NL DESC1 wizard add Page page1 mark Pages Added  addPages WizardPage createPage IHelpContextIds TEMPLATE_PERSPECTIVE_EXTENSIONS setTitle PDEPlugin getResourceString NL_TITLE0 setDescription PDEPlugin getResourceString NL_DESC0 addPage WizardPage createPage IHelpContextIds TEMPLATE_PERSPECTIVE_EXTENSIONS setTitle PDEPlugin getResourceString NL_TITLE1 setDescription PDEPlugin getResourceString NL_DESC1 addPage markPagesAdded
private void create Options add options to first page add Option KEY TARGET PERSPECTIVE PDE Plugin get Resource String NL PERSPECTIVE ID org eclipse ui resource Perspective NON NLS 1 0 add Option KEY ACTION SET PDE Plugin get Resource String NL ACTION SET org eclipse jdt ui Java Action Set NON NLS 1 0 add Option KEY PERSPECTIVE SHORTCUT PDE Plugin get Resource String NL SHORTCUT ID org eclipse debug ui Debug Perspective NON NLS 1 0 add Option KEY VIEW SHORTCUT PDE Plugin get Resource String NL VIEW SHORTCUT ID org eclipse jdt ui Type Hierarchy NON NLS 1 0 add Option KEY WIZARD SHORTCUT PDE Plugin get Resource String NL WIZARD SHORTCUT ID org eclipse jdt ui wizards New Project Creation Wizard NON NLS 1 0 add options to second page add Option KEY VIEW PDE Plugin get Resource String NL VIEW ID org eclipse jdt ui Package Explorer NON NLS 1 1 add Option KEY VIEW RELATIVE PDE Plugin get Resource String NL RELATIVE VIEW org eclipse ui views Resource Navigator NON NLS 1 1 add Option KEY VIEW RELATIONSHIP PDE Plugin get Resource String NL RELATIVE LOCATION new String stack PDE Plugin get Resource String NL STACK NON NLS 1 fast PDE Plugin get Resource String NL FAST NON NLS 1 left PDE Plugin get Resource String NL LEFT NON NLS 1 right PDE Plugin get Resource String NL RIGHT NON NLS 1 top PDE Plugin get Resource String NL TOP NON NLS 1 bottom PDE Plugin get Resource String NL BOTTOM NON NLS 1 stack NON NLS 1 1  createOptions addOption KEY_TARGET_PERSPECTIVE PDEPlugin getResourceString NL_PERSPECTIVE_ID resourcePerspective addOption KEY_ACTION_SET PDEPlugin getResourceString NL_ACTION_SET JavaActionSet addOption KEY_PERSPECTIVE_SHORTCUT PDEPlugin getResourceString NL_SHORTCUT_ID DebugPerspective addOption KEY_VIEW_SHORTCUT PDEPlugin getResourceString NL_VIEW_SHORTCUT_ID TypeHierarchy addOption KEY_WIZARD_SHORTCUT PDEPlugin getResourceString NL_WIZARD_SHORTCUT_ID NewProjectCreationWizard addOption KEY_VIEW PDEPlugin getResourceString NL_VIEW_ID PackageExplorer addOption KEY_VIEW_RELATIVE PDEPlugin getResourceString NL_RELATIVE_VIEW ResourceNavigator addOption KEY_VIEW_RELATIONSHIP PDEPlugin getResourceString NL_RELATIVE_LOCATION PDEPlugin getResourceString NL_STACK PDEPlugin getResourceString NL_FAST PDEPlugin getResourceString NL_LEFT PDEPlugin getResourceString NL_RIGHT PDEPlugin getResourceString NL_TOP PDEPlugin getResourceString NL_BOTTOM
private Template Option get All Page Options Template Option source int page Index get Page Index source if page Index 1 return get Options page Index return new Template Option 0  TemplateOption getAllPageOptions TemplateOption pageIndex getPageIndex pageIndex getOptions pageIndex TemplateOption
see PDE Template Section get Section Id public String get Section Id return perspective Extensions NON NLS 1  PDETemplateSection getSectionId getSectionId perspectiveExtensions
see Generic Template Section validate Options Template Option public void validate Options Template Option source if source is Required source is Empty flag Missing Required Option source else validate Container Page source  GenericTemplateSection validateOptions TemplateOption validateOptions TemplateOption isRequired isEmpty flagMissingRequiredOption validateContainerPage
private void validate Container Page Template Option source Template Option siblings get All Page Options source for int i 0 i siblings length i Template Option next Option siblings i if next Option is Required next Option is Empty flag Missing Required Option next Option return reset Page State  validateContainerPage TemplateOption TemplateOption getAllPageOptions TemplateOption nextOption nextOption isRequired nextOption isEmpty flagMissingRequiredOption nextOption resetPageState
see Abstract Template Section update Model I Progress Monitor protected void update Model I Progress Monitor monitor throws Core Exception I Plugin Base plugin model get Plugin Base I Plugin Extension extension create Extension get Used Extension Point true I Plugin Model Factory factory model get Plugin Factory I Plugin Element perspective Element factory create Element extension perspective Element set Name perspective Extension NON NLS 1 perspective Element set Attribute targetID NON NLS 1 get String Option KEY TARGET PERSPECTIVE I Plugin Element wizard Shortcut Element factory create Element perspective Element wizard Shortcut Element set Name new Wizard Shortcut NON NLS 1 wizard Shortcut Element set Attribute id get String Option KEY WIZARD SHORTCUT NON NLS 1 perspective Element add wizard Shortcut Element I Plugin Element view Shortcut Element factory create Element perspective Element view Shortcut Element set Name view Shortcut NON NLS 1 view Shortcut Element set Attribute id get String Option KEY VIEW SHORTCUT NON NLS 1 perspective Element add view Shortcut Element I Plugin Element perspective Shortcut Element factory create Element perspective Element perspective Shortcut Element set Name perspective Shortcut NON NLS 1 perspective Shortcut Element set Attribute id NON NLS 1 get String Option KEY PERSPECTIVE SHORTCUT perspective Element add perspective Shortcut Element I Plugin Element action Set Element factory create Element perspective Element action Set Element set Name action Set NON NLS 1 action Set Element set Attribute id get String Option KEY ACTION SET NON NLS 1 perspective Element add action Set Element I Plugin Element view Element factory create Element perspective Element view Element set Name view NON NLS 1 view Element set Attribute id get String Option KEY VIEW NON NLS 1 view Element set Attribute relative get String Option KEY VIEW RELATIVE NON NLS 1 String relationship get Value KEY VIEW RELATIONSHIP to String view Element set Attribute relationship relationship NON NLS 1 if relationship equals stack relationship equals fast NON NLS 1 NON NLS 2 view Element set Attribute ratio 0 5 NON NLS 1 NON NLS 2 perspective Element add view Element extension add perspective Element if extension is In The Model plugin add extension  AbstractTemplateSection updateModel IProgressMonitor updateModel IProgressMonitor CoreException IPluginBase getPluginBase IPluginExtension createExtension getUsedExtensionPoint IPluginModelFactory getPluginFactory IPluginElement perspectiveElement createElement perspectiveElement setName perspectiveExtension perspectiveElement setAttribute getStringOption KEY_TARGET_PERSPECTIVE IPluginElement wizardShortcutElement createElement perspectiveElement wizardShortcutElement setName newWizardShortcut wizardShortcutElement setAttribute getStringOption KEY_WIZARD_SHORTCUT perspectiveElement wizardShortcutElement IPluginElement viewShortcutElement createElement perspectiveElement viewShortcutElement setName viewShortcut viewShortcutElement setAttribute getStringOption KEY_VIEW_SHORTCUT perspectiveElement viewShortcutElement IPluginElement perspectiveShortcutElement createElement perspectiveElement perspectiveShortcutElement setName perspectiveShortcut perspectiveShortcutElement setAttribute getStringOption KEY_PERSPECTIVE_SHORTCUT perspectiveElement perspectiveShortcutElement IPluginElement actionSetElement createElement perspectiveElement actionSetElement setName actionSet actionSetElement setAttribute getStringOption KEY_ACTION_SET perspectiveElement actionSetElement IPluginElement viewElement createElement perspectiveElement viewElement setName viewElement setAttribute getStringOption KEY_VIEW viewElement setAttribute getStringOption KEY_VIEW_RELATIVE getValue KEY_VIEW_RELATIONSHIP toString viewElement setAttribute viewElement setAttribute perspectiveElement viewElement perspectiveElement isInTheModel
see I Template Section get Used Extension Point public String get Used Extension Point return org eclipse ui perspective Extensions NON NLS 1  ITemplateSection getUsedExtensionPoint getUsedExtensionPoint perspectiveExtensions

Constructor for Plugin Reference public Plugin Reference super  PluginReference PluginReference
public boolean equals Object object if object instanceof I Plugin Reference I Plugin Reference source I Plugin Reference object if id null return false if id equals source get Id false return false if version null source get Version null return true return version equals source get Version return false  IPluginReference IPluginReference IPluginReference getId getVersion getVersion
public Plugin Reference String id String version int match this id id this version version this match match  PluginReference
see I Plugin Reference get Match public int get Match return match  IPluginReference getMatch getMatch
see I Plugin Reference get Version public String get Version return version  IPluginReference getVersion getVersion
see I Plugin Reference set Match int public void set Match int match throws Core Exception this match match  IPluginReference setMatch setMatch CoreException
see I Plugin Reference set Version String public void set Version String version throws Core Exception this version version  IPluginReference setVersion setVersion CoreException
see I Identifiable get Id public String get Id return id  IIdentifiable getId getId
see I Identifiable set Id String public void set Id String id throws Core Exception this id id  IIdentifiable setId setId CoreException

private static final String KEY WTITLE Popup Menu New Wizard wtitle NON NLS 1 Constructor for Perspective Extensions New Wizard public Popup Menu New Wizard super  KEY_WTITLE PopupMenuNewWizard PerspectiveExtensionsNewWizard PopupMenuNewWizard
public void init I Field Data data super init data set Window Title PDE Plugin get Resource String KEY WTITLE  IFieldData setWindowTitle PDEPlugin getResourceString KEY_WTITLE
see New Plugin Template Wizard create Template Sections public I Template Section create Template Sections return new I Template Section new Popup Menu Template  NewPluginTemplateWizard createTemplateSections ITemplateSection createTemplateSections ITemplateSection PopupMenuTemplate

Constructor for Property Page Template public Popup Menu Template set Page Count 1 create Options  PropertyPageTemplate PopupMenuTemplate setPageCount createOptions
public void add Pages Wizard wizard Wizard Page page create Page 0 I Help Context Ids TEMPLATE POPUP MENU page set Title PDE Plugin get Resource String NL TITLE page set Description PDE Plugin get Resource String NL DESC wizard add Page page mark Pages Added  addPages WizardPage createPage IHelpContextIds TEMPLATE_POPUP_MENU setTitle PDEPlugin getResourceString NL_TITLE setDescription PDEPlugin getResourceString NL_DESC addPage markPagesAdded
private void create Options add Option KEY TARGET OBJECT PDE Plugin get Resource String NL TARGET CLASS org eclipse core resources I File NON NLS 1 0 add Option KEY NAME FILTER PDE Plugin get Resource String NL NAME FILTER plugin xml NON NLS 1 0 add Option KEY SUBMENU LABEL PDE Plugin get Resource String NL SUBMENU NAME PDE Plugin get Resource String NL DEFAULT SUBMENU NAME 0 add Option KEY ACTION LABEL PDE Plugin get Resource String NL ACTION LABEL PDE Plugin get Resource String NL DEFAULT ACTION NAME 0 add Option KEY PACKAGE NAME PDE Plugin get Resource String NL PACKAGE NAME String null 0 add Option KEY ACTION CLASS PDE Plugin get Resource String NL ACTION CLASS PDE Plugin get Resource String Popup Menu Template new Action NON NLS 1 0 add Option KEY SELECTION PDE Plugin get Resource String NL ENABLED FOR new String single Selection PDE Plugin get Resource String NL SINGLE SELECTION NON NLS 1 multiple Selection PDE Plugin get Resource String NL MULTIPLE SELECTION NON NLS 1 single Selection 0 NON NLS 1  createOptions addOption KEY_TARGET_OBJECT PDEPlugin getResourceString NL_TARGET_CLASS IFile addOption KEY_NAME_FILTER PDEPlugin getResourceString NL_NAME_FILTER addOption KEY_SUBMENU_LABEL PDEPlugin getResourceString NL_SUBMENU_NAME PDEPlugin getResourceString NL_DEFAULT_SUBMENU_NAME addOption KEY_ACTION_LABEL PDEPlugin getResourceString NL_ACTION_LABEL PDEPlugin getResourceString NL_DEFAULT_ACTION_NAME addOption KEY_PACKAGE_NAME PDEPlugin getResourceString NL_PACKAGE_NAME addOption KEY_ACTION_CLASS PDEPlugin getResourceString NL_ACTION_CLASS PDEPlugin getResourceString PopupMenuTemplate newAction addOption KEY_SELECTION PDEPlugin getResourceString NL_ENABLED_FOR singleSelection PDEPlugin getResourceString NL_SINGLE_SELECTION multipleSelection PDEPlugin getResourceString NL_MULTIPLE_SELECTION singleSelection
see PDE Template Section get Section Id public String get Section Id return popup Menus NON NLS 1  PDETemplateSection getSectionId getSectionId popupMenus
public boolean is Dependent On Parent Wizard return true  isDependentOnParentWizard
protected void initialize Fields I Field Data data In a new project wizard we don t know this yet the model has not been created String id data get Id initialize Option KEY PACKAGE NAME id popup actions NON NLS 1  initializeFields IFieldData getId initializeOption KEY_PACKAGE_NAME
public void initialize Fields I Plugin Model Base model In the new extension wizard the model exists so we can initialize directly from it String plugin Id model get Plugin Base get Id initialize Option KEY PACKAGE NAME plugin Id popup actions NON NLS 1  initializeFields IPluginModelBase pluginId getPluginBase getId initializeOption KEY_PACKAGE_NAME pluginId
see Generic Template Section validate Options Template Option public void validate Options Template Option source if source is Required source is Empty flag Missing Required Option source else validate Container Page source  GenericTemplateSection validateOptions TemplateOption validateOptions TemplateOption isRequired isEmpty flagMissingRequiredOption validateContainerPage
private void validate Container Page Template Option source Template Option all Page Options get Options 0 for int i 0 i all Page Options length i Template Option next Option all Page Options i if next Option is Required next Option is Empty flag Missing Required Option next Option return reset Page State  validateContainerPage TemplateOption TemplateOption allPageOptions getOptions allPageOptions TemplateOption nextOption allPageOptions nextOption isRequired nextOption isEmpty flagMissingRequiredOption nextOption resetPageState
see Abstract Template Section update Model I Progress Monitor protected void update Model I Progress Monitor monitor throws Core Exception I Plugin Base plugin model get Plugin Base I Plugin Extension extension create Extension get Used Extension Point true I Plugin Model Factory factory model get Plugin Factory I Plugin Element object Contribution Element factory create Element extension object Contribution Element set Name object Contribution NON NLS 1 object Contribution Element set Attribute object Class NON NLS 1 get String Option KEY TARGET OBJECT object Contribution Element set Attribute name Filter NON NLS 1 get String Option KEY NAME FILTER object Contribution Element set Attribute id NON NLS 1 model get Plugin Base get Id contribution1 NON NLS 1 I Plugin Element menu Element factory create Element object Contribution Element menu Element set Name menu NON NLS 1 menu Element set Attribute label get String Option KEY SUBMENU LABEL NON NLS 1 menu Element set Attribute path additions NON NLS 1 NON NLS 2 menu Element set Attribute id model get Plugin Base get Id menu1 NON NLS 1 NON NLS 2 I Plugin Element separator Element factory create Element menu Element separator Element set Name separator NON NLS 1 separator Element set Attribute name group1 NON NLS 1 NON NLS 2 menu Element add separator Element object Contribution Element add menu Element I Plugin Element action Element factory create Element object Contribution Element action Element set Name action NON NLS 1 action Element set Attribute label get String Option KEY ACTION LABEL NON NLS 1 action Element set Attribute class NON NLS 1 get String Option KEY PACKAGE NAME get String Option KEY ACTION CLASS NON NLS 1 action Element set Attribute menubar Path NON NLS 1 model get Plugin Base get Id menu1 group1 NON NLS 1 action Element set Attribute enables For NON NLS 1 get Value KEY SELECTION to String equals single Selection NON NLS 1 1 NON NLS 1 multiple NON NLS 1 action Element set Attribute id model get Plugin Base get Id new Action NON NLS 1 NON NLS 2 object Contribution Element add action Element extension add object Contribution Element if extension is In The Model plugin add extension  AbstractTemplateSection updateModel IProgressMonitor updateModel IProgressMonitor CoreException IPluginBase getPluginBase IPluginExtension createExtension getUsedExtensionPoint IPluginModelFactory getPluginFactory IPluginElement objectContributionElement createElement objectContributionElement setName objectContribution objectContributionElement setAttribute objectClass getStringOption KEY_TARGET_OBJECT objectContributionElement setAttribute nameFilter getStringOption KEY_NAME_FILTER objectContributionElement setAttribute getPluginBase getId IPluginElement menuElement createElement objectContributionElement menuElement setName menuElement setAttribute getStringOption KEY_SUBMENU_LABEL menuElement setAttribute menuElement setAttribute getPluginBase getId IPluginElement separatorElement createElement menuElement separatorElement setName separatorElement setAttribute menuElement separatorElement objectContributionElement menuElement IPluginElement actionElement createElement objectContributionElement actionElement setName actionElement setAttribute getStringOption KEY_ACTION_LABEL actionElement setAttribute getStringOption KEY_PACKAGE_NAME getStringOption KEY_ACTION_CLASS actionElement setAttribute menubarPath getPluginBase getId actionElement setAttribute enablesFor getValue KEY_SELECTION toString singleSelection actionElement setAttribute getPluginBase getId newAction objectContributionElement actionElement objectContributionElement isInTheModel
see I Template Section get Used Extension Point public String get Used Extension Point return org eclipse ui popup Menus NON NLS 1  ITemplateSection getUsedExtensionPoint getUsedExtensionPoint popupMenus

private String main Class Name public Preference Page Template set Page Count 1 create Options  mainClassName PreferencePageTemplate setPageCount createOptions
public String get Section Id return preferences NON NLS 1  getSectionId
see I Template Section get Number Of Work Units public int get Number Of Work Units return super get Number Of Work Units 1  ITemplateSection getNumberOfWorkUnits getNumberOfWorkUnits getNumberOfWorkUnits
private void create Options first page add Option KEY PACKAGE NAME PDE Plugin get Resource String NL PACKAGE NAME String null 0 add Option page Class Name NON NLS 1 PDE Plugin get Resource String NL CLASS NAME Sample Preference Page NON NLS 1 0 add Option page Name NON NLS 1 PDE Plugin get Resource String NL PAGE NAME PDE Plugin get Resource String NL DEFAULT PAGE NAME 0  createOptions addOption KEY_PACKAGE_NAME PDEPlugin getResourceString NL_PACKAGE_NAME addOption pageClassName PDEPlugin getResourceString NL_CLASS_NAME SamplePreferencePage addOption pageName PDEPlugin getResourceString NL_PAGE_NAME PDEPlugin getResourceString NL_DEFAULT_PAGE_NAME
protected void initialize Fields I Field Data data In a new project wizard we don t know this yet the model has not been created String id data get Id initialize Option KEY PACKAGE NAME id preferences NON NLS 1 main Class Name id Preference Class NON NLS 1  initializeFields IFieldData getId initializeOption KEY_PACKAGE_NAME mainClassName PreferenceClass
public void initialize Fields I Plugin Model Base model In the new extension wizard the model exists so we can initialize directly from it String plugin Id model get Plugin Base get Id initialize Option KEY PACKAGE NAME plugin Id preferences NON NLS 1 if model instanceof I Plugin Model I Plugin plugin I Plugin model get Plugin Base main Class Name plugin get Class Name  initializeFields IPluginModelBase pluginId getPluginBase getId initializeOption KEY_PACKAGE_NAME pluginId IPluginModel IPlugin IPlugin getPluginBase mainClassName getClassName
public String get Replacement String String file Name String key if key equals full Plugin Class Name NON NLS 1 return main Class Name if key equals plugin Class Name NON NLS 1 return get Plugin Class Name return super get Replacement String file Name key  getReplacementString fileName fullPluginClassName mainClassName pluginClassName getPluginClassName getReplacementString fileName
private String get Plugin Class Name int dot main Class Name last Index Of if dot 1 return main Class Name substring dot 1 return main Class Name  getPluginClassName mainClassName lastIndexOf mainClassName mainClassName
public boolean is Dependent On Parent Wizard return true  isDependentOnParentWizard
public void add Default Option boolean val add Option has Default NON NLS 1 null val 0  addDefaultOption addOption hasDefault
public void add Pages Wizard wizard Wizard Page page create Page 0 I Help Context Ids TEMPLATE PREFERENCE PAGE page set Title PDE Plugin get Resource String NL TITLE page set Description PDE Plugin get Resource String NL DESC wizard add Page page mark Pages Added  addPages WizardPage createPage IHelpContextIds TEMPLATE_PREFERENCE_PAGE setTitle PDEPlugin getResourceString NL_TITLE setDescription PDEPlugin getResourceString NL_DESC addPage markPagesAdded
public void validate Options Template Option source if source is Required source is Empty flag Missing Required Option source else reset Page State  validateOptions TemplateOption isRequired isEmpty flagMissingRequiredOption resetPageState
public String get Used Extension Point return org eclipse ui preference Pages NON NLS 1  getUsedExtensionPoint preferencePages
protected void update Model I Progress Monitor monitor throws Core Exception I Plugin Base plugin model get Plugin Base I Plugin Extension extension create Extension get Used Extension Point true I Plugin Model Factory factory model get Plugin Factory String full Class Name get String Option KEY PACKAGE NAME get String Option page Class Name NON NLS 1 NON NLS 2 I Plugin Element page Element factory create Element extension page Element set Name page NON NLS 1 page Element set Attribute id full Class Name NON NLS 1 page Element set Attribute name get String Option page Name NON NLS 1 NON NLS 2 page Element set Attribute class full Class Name NON NLS 1 extension add page Element if extension is In The Model plugin add extension  updateModel IProgressMonitor CoreException IPluginBase getPluginBase IPluginExtension createExtension getUsedExtensionPoint IPluginModelFactory getPluginFactory fullClassName getStringOption KEY_PACKAGE_NAME getStringOption pageClassName IPluginElement pageElement createElement pageElement setName pageElement setAttribute fullClassName pageElement setAttribute getStringOption pageName pageElement setAttribute fullClassName pageElement isInTheModel

abstract class Node abstract Object get Value  getValue
class Leaf Node extends Node Object value Leaf Node Object value this value value  LeafNode LeafNode
this value value public Object get Value return value  getValue
public String to String if value null return leaf value to String NON NLS 1 NON NLS 2 else return leaf null NON NLS 1  toString toString
public Expression Node Node left Node right int opcode this opcode opcode this left left this right right  ExpressionNode
public Object get Value boolean result false Object left Value left null left get Value Boolean FALSE Object right Value right null right get Value Boolean FALSE if opcode OP NOT right Value instanceof Boolean result right Value equals Boolean TRUE false true else if left Value instanceof Boolean right Value instanceof Boolean boolean bleft Boolean left Value boolean Value boolean bright Boolean right Value boolean Value switch opcode case OP AND result bleft bright break case OP OR result bleft bright break case OP EQ result bleft bright break case OP NEQ result bleft bright break if left Value instanceof String right Value instanceof String switch opcode case OP EQ result left Value equals right Value break case OP NEQ result left Value equals right Value break return result Boolean TRUE Boolean FALSE  getValue leftValue getValue rightValue getValue OP_NOT rightValue rightValue leftValue rightValue leftValue booleanValue rightValue booleanValue OP_AND OP_OR OP_EQ OP_NEQ leftValue rightValue OP_EQ leftValue rightValue OP_NEQ leftValue rightValue
public String to String String lstring left null left to String NON NLS 1 String rstring right null right to String NON NLS 1 return lstring opcode rstring NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4  toString toString toString
Node root public Preprocessor Parser this null  PreprocessorParser
public Preprocessor Parser I Variable Provider provider this provider provider expr Stack new Stack  PreprocessorParser IVariableProvider exprStack
public void set Variable Provider I Variable Provider provider this provider provider  setVariableProvider IVariableProvider
vars put c Boolean TRUE NON NLS 1 Preprocessor Parser parser new Preprocessor Parser new I Variable Provider public Object get Value String variable return vars get variable  PreprocessorParser PreprocessorParser IVariableProvider getValue
public static void main String args final Hashtable vars new Hashtable vars put a Boolean FALSE NON NLS 1 vars put b 3 NON NLS 1 NON NLS 2 vars put c Boolean TRUE NON NLS 1 Preprocessor Parser parser new Preprocessor Parser new I Variable Provider public Object get Value String variable return vars get variable try boolean value parser parse And Evaluate a b 2 c NON NLS 1 System out println Result value NON NLS 1 catch Exception e System out println e  PreprocessorParser PreprocessorParser IVariableProvider getValue parseAndEvaluate
public boolean parse And Evaluate String line throws Exception reset this line line System out println Line line parse print Expression return evaluate  parseAndEvaluate printExpression
private boolean evaluate boolean result false if expr Stack is Empty false Root Entry entry Root Entry expr Stack peek if entry root null Object value entry root get Value if value null value instanceof Boolean if Boolean value equals Boolean TRUE result true return result  exprStack isEmpty RootEntry RootEntry exprStack getValue
private void reset loc 0 tvalue null expr Stack clear  exprStack
private void parse throws Exception for int token get Next Token System out println Token token val tvalue if token T EOF break if token T VAR Node node new Leaf Node provider get Value tvalue to String push Node node continue if token T TRUE token T FALSE Object value token T TRUE Boolean TRUE Boolean FALSE Node node new Leaf Node value push Node node continue if token T STRING Node node new Leaf Node tvalue push Node node continue if token T NOT push Node OP NOT continue int opcode 0 switch token case T AND opcode OP AND break case T OR opcode OP OR break case T EQ opcode OP EQ break case T NEQ opcode OP NEQ break if opcode 0 push Node opcode continue if token T LBR push Root continue if token T RBR if expr Stack is Empty throw Unexpected Token not token NON NLS 1 pop Root continue  getNextToken T_EOF T_VAR LeafNode getValue toString pushNode T_TRUE T_FALSE T_TRUE LeafNode pushNode T_STRING LeafNode pushNode T_NOT pushNode OP_NOT T_AND OP_AND T_OR OP_OR T_EQ OP_EQ T_NEQ OP_NEQ pushNode T_LBR pushRoot T_RBR exprStack isEmpty throwUnexpectedToken popRoot
private Root Entry get Current Root if expr Stack is Empty Root Entry entry new Root Entry expr Stack push entry return Root Entry expr Stack peek  RootEntry getCurrentRoot exprStack isEmpty RootEntry RootEntry exprStack RootEntry exprStack
private void replace Root Expression Node new Root Root Entry entry get Current Root if entry root null new Root left entry root entry root new Root  replaceRoot ExpressionNode newRoot RootEntry getCurrentRoot newRoot newRoot
private void push Node Node node Root Entry entry get Current Root if entry root null entry root node else Expression Node enode Expression Node entry root if enode opcode OP NOT enode right node else if enode left null enode left node else enode right node  pushNode RootEntry getCurrentRoot ExpressionNode ExpressionNode OP_NOT
private void push Node int opcode Expression Node node new Expression Node null null opcode replace Root node  pushNode ExpressionNode ExpressionNode replaceRoot
private void push Root expr Stack push new Root Entry  pushRoot exprStack RootEntry
private void pop Root Root Entry entry get Current Root expr Stack pop push Node entry root  popRoot RootEntry getCurrentRoot exprStack pushNode
private void throw Unexpected Token String expected int token throws Exception String message Expected expected found token NON NLS 1 NON NLS 2 throw new Exception message  throwUnexpectedToken
private int get Next Token boolean string false boolean variable false int vloc loc tvalue null for if loc line length check if we have panding identifier if variable tvalue line substring vloc loc variable false return T VAR if string EOF in string string false return T ERROR regular end of line tvalue EOF NON NLS 1 return T EOF char c line char At loc if c if string tvalue line substring vloc loc 1 string false return T STRING else vloc loc string true continue else if string continue if variable Character is Java Identifier Start c variable true vloc loc 1 continue if variable if Character is Java Identifier Part c loc tvalue line substring vloc loc variable false if tvalue equals Ignore Case false NON NLS 1 return T FALSE if tvalue equals Ignore Case true NON NLS 1 return T TRUE return T VAR else continue if test Double Token c NON NLS 1 return T NEQ if test Double Token c NON NLS 1 return T EQ if test Double Token c NON NLS 1 return T AND if test Double Token c NON NLS 1 return T OR if test Single Token c return T NOT if test Single Token c return T LBR if test Single Token c return T RBR if c c t c n continue tvalue c NON NLS 1 return T ERROR  getNextToken T_VAR T_ERROR T_EOF charAt T_STRING isJavaIdentifierStart isJavaIdentifierPart equalsIgnoreCase T_FALSE equalsIgnoreCase T_TRUE T_VAR testDoubleToken T_NEQ testDoubleToken T_EQ testDoubleToken T_AND testDoubleToken T_OR testSingleToken T_NOT testSingleToken T_LBR testSingleToken T_RBR T_ERROR
private boolean test Single Token char c char expected if c expected tvalue expected NON NLS 1 return true return false  testSingleToken
private boolean test Double Token char c1 String pattern if c1 pattern char At 0 return false char c2 line char At loc if c2 pattern char At 1 loc tvalue pattern return true return false  testDoubleToken charAt charAt charAt

private static final String KEY WTITLE Property Page New Wizard wtitle NON NLS 1 Constructor for Property Page New Wizard public Property Page New Wizard super  KEY_WTITLE PropertyPageNewWizard PropertyPageNewWizard PropertyPageNewWizard
public void init I Field Data data super init data set Window Title PDE Plugin get Resource String KEY WTITLE  IFieldData setWindowTitle PDEPlugin getResourceString KEY_WTITLE
see New Plugin Template Wizard create Template Sections public I Template Section create Template Sections return new I Template Section new Property Page Template  NewPluginTemplateWizard createTemplateSections ITemplateSection createTemplateSections ITemplateSection PropertyPageTemplate

Constructor for Property Page Template public Property Page Template set Page Count 1 create Options  PropertyPageTemplate PropertyPageTemplate setPageCount createOptions
public void add Pages Wizard wizard Wizard Page page create Page 0 I Help Context Ids TEMPLATE PROPERTY PAGE page set Title PDE Plugin get Resource String NL TITLE page set Description PDE Plugin get Resource String NL DESC wizard add Page page mark Pages Added  addPages WizardPage createPage IHelpContextIds TEMPLATE_PROPERTY_PAGE setTitle PDEPlugin getResourceString NL_TITLE setDescription PDEPlugin getResourceString NL_DESC addPage markPagesAdded
private void create Options add Option KEY PACKAGE NAME PDE Plugin get Resource String NL PACKAGE NAME String null 0 add Option KEY CLASSNAME PDE Plugin get Resource String NL PAGE CLASS Sample Property Page NON NLS 1 0 add Option KEY PAGE NAME PDE Plugin get Resource String NL PAGE NAME PDE Plugin get Resource String NL DEFAULT PAGE NAME 0 add Option KEY TARGET CLASS PDE Plugin get Resource String NL TARGET CLASS org eclipse core resources I File NON NLS 1 0 add Option KEY NAME FILTER PDE Plugin get Resource String NL NAME FILTER NON NLS 1 0  createOptions addOption KEY_PACKAGE_NAME PDEPlugin getResourceString NL_PACKAGE_NAME addOption KEY_CLASSNAME PDEPlugin getResourceString NL_PAGE_CLASS SamplePropertyPage addOption KEY_PAGE_NAME PDEPlugin getResourceString NL_PAGE_NAME PDEPlugin getResourceString NL_DEFAULT_PAGE_NAME addOption KEY_TARGET_CLASS PDEPlugin getResourceString NL_TARGET_CLASS IFile addOption KEY_NAME_FILTER PDEPlugin getResourceString NL_NAME_FILTER
see PDE Template Section get Section Id public String get Section Id return property Pages NON NLS 1  PDETemplateSection getSectionId getSectionId propertyPages
public boolean is Dependent On Parent Wizard return true  isDependentOnParentWizard
protected void initialize Fields I Field Data data In a new project wizard we don t know this yet the model has not been created String id data get Id initialize Option KEY PACKAGE NAME id properties NON NLS 1  initializeFields IFieldData getId initializeOption KEY_PACKAGE_NAME
public void initialize Fields I Plugin Model Base model In the new extension wizard the model exists so we can initialize directly from it String plugin Id model get Plugin Base get Id initialize Option KEY PACKAGE NAME plugin Id properties NON NLS 1  initializeFields IPluginModelBase pluginId getPluginBase getId initializeOption KEY_PACKAGE_NAME pluginId
see Generic Template Section validate Options Template Option public void validate Options Template Option source if source is Required source is Empty flag Missing Required Option source else validate Container Page source  GenericTemplateSection validateOptions TemplateOption validateOptions TemplateOption isRequired isEmpty flagMissingRequiredOption validateContainerPage
private void validate Container Page Template Option source Template Option all Page Options get Options 0 for int i 0 i all Page Options length i Template Option next Option all Page Options i if next Option is Required next Option is Empty flag Missing Required Option next Option return reset Page State  validateContainerPage TemplateOption TemplateOption allPageOptions getOptions allPageOptions TemplateOption nextOption allPageOptions nextOption isRequired nextOption isEmpty flagMissingRequiredOption nextOption resetPageState
see Abstract Template Section update Model I Progress Monitor protected void update Model I Progress Monitor monitor throws Core Exception I Plugin Base plugin model get Plugin Base I Plugin Extension extension create Extension get Used Extension Point true I Plugin Model Factory factory model get Plugin Factory I Plugin Element page Element factory create Element extension page Element set Name page NON NLS 1 page Element set Attribute id NON NLS 1 get String Option KEY PACKAGE NAME sample Property Page NON NLS 1 page Element set Attribute name get String Option KEY PAGE NAME NON NLS 1 page Element set Attribute object Class get String Option KEY TARGET CLASS NON NLS 1 page Element set Attribute class NON NLS 1 get String Option KEY PACKAGE NAME get String Option KEY CLASSNAME NON NLS 1 page Element set Attribute name Filter get String Option KEY NAME FILTER NON NLS 1 extension add page Element if extension is In The Model plugin add extension  AbstractTemplateSection updateModel IProgressMonitor updateModel IProgressMonitor CoreException IPluginBase getPluginBase IPluginExtension createExtension getUsedExtensionPoint IPluginModelFactory getPluginFactory IPluginElement pageElement createElement pageElement setName pageElement setAttribute getStringOption KEY_PACKAGE_NAME samplePropertyPage pageElement setAttribute getStringOption KEY_PAGE_NAME pageElement setAttribute objectClass getStringOption KEY_TARGET_CLASS pageElement setAttribute getStringOption KEY_PACKAGE_NAME getStringOption KEY_CLASSNAME pageElement setAttribute nameFilter getStringOption KEY_NAME_FILTER pageElement isInTheModel
see I Template Section get Used Extension Point public String get Used Extension Point return org eclipse ui property Pages NON NLS 1  ITemplateSection getUsedExtensionPoint getUsedExtensionPoint propertyPages
public I Plugin Reference get Dependencies String schema Version Array List result new Array List result add new Plugin Reference org eclipse core resources null 0 NON NLS 1 if schema Version null result add new Plugin Reference org eclipse core runtime null 0 NON NLS 1 result add new Plugin Reference org eclipse ui null 0 NON NLS 1 return I Plugin Reference result to Array new I Plugin Reference result size  IPluginReference getDependencies schemaVersion ArrayList ArrayList PluginReference schemaVersion PluginReference PluginReference IPluginReference toArray IPluginReference

Constructor for Template Editor Input param file public Template Editor Input I File file String first Page Id super file this first Page Id first Page Id  TemplateEditorInput TemplateEditorInput IFile firstPageId firstPageId firstPageId
public String get First Page Id return first Page Id  getFirstPageId firstPageId

class Table Part extends Wizard Checkbox Table Part public Table Part String main Label super main Label  TablePart WizardCheckboxTablePart TablePart mainLabel mainLabel
protected Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit return super create Structured Viewer parent style SWT FULL SELECTION toolkit  StructuredViewer createStructuredViewer FormToolkit createStructuredViewer FULL_SELECTION
protected void update Counter int amount super update Counter amount if get Container null get Container update Buttons  updateCounter updateCounter getContainer getContainer updateButtons
extends Default Content Provider implements I Structured Content Provider public Object get Elements Object parent return candidates to Array  DefaultContentProvider IStructuredContentProvider getElements toArray
class List Label Provider extends Label Provider implements I Table Label Provider public String get Column Text Object obj int index I Template Section section I Template Section obj if index 0 return section get Label else return section get Used Extension Point  ListLabelProvider LabelProvider ITableLabelProvider getColumnText ITemplateSection ITemplateSection getLabel getUsedExtensionPoint
public Image get Column Image Object obj int index if index 0 return PDE Plugin get Default get Label Provider get PDE Plugin Images DESC EXTENSION OBJ else return PDE Plugin get Default get Label Provider get PDE Plugin Images DESC EXT POINT OBJ  getColumnImage PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_EXTENSION_OBJ PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_EXT_POINT_OBJ
Constructor for Template Selection Page param page Name public Template Selection Page super template Selection NON NLS 1 set Title PDE Plugin get Resource String NL TITLE set Description PDE Plugin get Resource String NL DESC initialize Templates  TemplateSelectionPage pageName TemplateSelectionPage templateSelection setTitle PDEPlugin getResourceString NL_TITLE setDescription PDEPlugin getResourceString NL_DESC initializeTemplates
private void initialize Templates create Candidates table Part new Table Part PDE Plugin get Resource String NL TABLE description Browser new Form Browser SWT BORDER SWT V SCROLL description Browser set Text NON NLS 1 PDE Plugin get Default get Label Provider connect this visible Pages new Array List  initializeTemplates createCandidates tablePart TablePart PDEPlugin getResourceString NL_TABLE descriptionBrowser FormBrowser V_SCROLL descriptionBrowser setText PDEPlugin getDefault getLabelProvider visiblePages ArrayList
public void dispose super dispose PDE Plugin get Default get Label Provider disconnect this  PDEPlugin getDefault getLabelProvider
private void create Candidates candidates new Array List I Plugin Registry registry Platform get Plugin Registry I Configuration Element elements registry get Configuration Elements For PDE Plugin get Plugin Id templates NON NLS 1 for int i 0 i elements length i I Configuration Element element elements i add Template element candidates  createCandidates ArrayList IPluginRegistry getPluginRegistry IConfigurationElement getConfigurationElementsFor PDEPlugin getPluginId IConfigurationElement addTemplate
private void add Template I Configuration Element config Array List result if config get Name equals Ignore Case template false NON NLS 1 return try Object template config create Executable Extension class NON NLS 1 if template instanceof I Template Section result add template catch Core Exception e PDE Plugin log e  addTemplate IConfigurationElement ArrayList getName equalsIgnoreCase createExecutableExtension ITemplateSection CoreException PDEPlugin
viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection sel I Structured Selection event get Selection handle Selection Changed I Template Section sel get First Element  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection handleSelectionChanged ITemplateSection getFirstElement
see I Dialog Page create Control Composite public void create Control Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout container set Layout layout layout num Columns 2 table Part create Control container Checkbox Table Viewer viewer table Part get Table Viewer viewer set Content Provider new List Content Provider viewer set Label Provider new List Label Provider initialize Table viewer get Table viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection sel I Structured Selection event get Selection handle Selection Changed I Template Section sel get First Element description Browser create Control container Control c description Browser get Control Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data FILL VERTICAL gd height Hint 100 gd horizontal Span 2 c set Layout Data gd viewer set Input PDE Plugin get Default table Part select All true set Control container Dialog apply Dialog Font container Workbench Help set Help container I Help Context Ids TEMPLATE SELECTION  IDialogPage createControl createControl GridLayout GridLayout setLayout numColumns tablePart createControl CheckboxTableViewer tablePart getTableViewer setContentProvider ListContentProvider setLabelProvider ListLabelProvider initializeTable getTable addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection handleSelectionChanged ITemplateSection getFirstElement descriptionBrowser createControl descriptionBrowser getControl GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData FILL_VERTICAL heightHint horizontalSpan setLayoutData setInput PDEPlugin getDefault tablePart selectAll setControl applyDialogFont WorkbenchHelp setHelp IHelpContextIds TEMPLATE_SELECTION
public I Template Section get Selected Templates Object elements table Part get Table Viewer get Checked Elements I Template Section result new I Template Section elements length System arraycopy elements 0 result 0 elements length return result  ITemplateSection getSelectedTemplates tablePart getTableViewer getCheckedElements ITemplateSection ITemplateSection
private void initialize Table Table table table set Header Visible true Table Column column new Table Column table SWT NULL column set Text PDE Plugin get Resource String NL CNAME column set Resizable true column new Table Column table SWT NULL column set Text PDE Plugin get Resource String NL CPOINT column set Resizable true Table Layout layout new Table Layout layout add Column Data new Column Weight Data 50 layout add Column Data new Column Weight Data 50 table set Layout layout  initializeTable setHeaderVisible TableColumn TableColumn setText PDEPlugin getResourceString NL_CNAME setResizable TableColumn setText PDEPlugin getResourceString NL_CPOINT setResizable TableLayout TableLayout addColumnData ColumnWeightData addColumnData ColumnWeightData setLayout
private void handle Selection Changed I Template Section section String text section null section get Description NON NLS 1 if text length 0 text p text p NON NLS 1 NON NLS 2 description Browser set Text text  handleSelectionChanged ITemplateSection getDescription descriptionBrowser setText
public boolean can Flip To Next Page if table Part get Selection Count 0 return false return super can Flip To Next Page  canFlipToNextPage tablePart getSelectionCount canFlipToNextPage
public I Wizard Page get Next Page I Template Section sections get Selected Templates visible Pages clear for int i 0 i sections length i I Template Section section sections i if section get Pages Added false section add Pages Wizard get Wizard for int j 0 j section get Page Count j visible Pages add section get Page j if visible Pages size 0 return I Wizard Page visible Pages get 0 return null  IWizardPage getNextPage ITemplateSection getSelectedTemplates visiblePages ITemplateSection getPagesAdded addPages getWizard getPageCount visiblePages getPage visiblePages IWizardPage visiblePages
public I Wizard Page get Next Visible Page I Wizard Page page if page this return page get Next Page else int index visible Pages index Of page if index 0 index visible Pages size 1 return I Wizard Page visible Pages get index 1 return null  IWizardPage getNextVisiblePage IWizardPage getNextPage visiblePages indexOf visiblePages IWizardPage visiblePages

Constructor for View New Wizard public View New Wizard super  ViewNewWizard ViewNewWizard
super public void init I Field Data data super init data set Window Title PDE Plugin get Resource String KEY WTITLE  IFieldData setWindowTitle PDEPlugin getResourceString KEY_WTITLE
see New Extension Template Wizard create Template Sections public I Template Section create Template Sections return new I Template Section new View Template  NewExtensionTemplateWizard createTemplateSections ITemplateSection createTemplateSections ITemplateSection ViewTemplate

private Boolean Option add To Perspective Constructor for Hello World Template public View Template set Page Count 2 create Options  BooleanOption addToPerspective HelloWorldTemplate ViewTemplate setPageCount createOptions
public String get Section Id return view NON NLS 1  getSectionId
see I Template Section get Number Of Work Units public int get Number Of Work Units return super get Number Of Work Units 1  ITemplateSection getNumberOfWorkUnits getNumberOfWorkUnits getNumberOfWorkUnits
private void create Options first page add Option KEY PACKAGE NAME PDE Plugin get Resource String NL PACKAGE NAME String null 0 add Option class Name PDE Plugin get Resource String NL CLASS NAME Sample View 0 NON NLS 1 NON NLS 2 add Option view Name PDE Plugin get Resource String NL NAME PDE Plugin get Resource String NL DEFAULT NAME 0 NON NLS 1 add Option view Category Id PDE Plugin get Resource String NL CATEGORY ID String null 0 NON NLS 1 add Option view Category Name PDE Plugin get Resource String NL CATEGORY NAME PDE Plugin get Resource String NL DEFAULT CATEGORY NAME 0 NON NLS 1 add Option view Type PDE Plugin get Resource String NL SELECT NON NLS 1 new String table Viewer PDE Plugin get Resource String NL TABLE NON NLS 1 tree Viewer PDE Plugin get Resource String NL TREE NON NLS 1 table Viewer 0 NON NLS 1 add To Perspective Boolean Option add Option add To Perspective PDE Plugin get Resource String NL ADD TO PERSPECTIVE true 0 NON NLS 1 second page add Option double Click PDE Plugin get Resource String NL DOUBLE CLICK true 1 NON NLS 1 add Option popup PDE Plugin get Resource String NL POPUP true 1 NON NLS 1 add Option local Toolbar PDE Plugin get Resource String NL TOOLBAR true 1 NON NLS 1 add Option local Pulldown PDE Plugin get Resource String NL PULLDOWN true 1 NON NLS 1 add Option sorter PDE Plugin get Resource String NL SORTING true 1 NON NLS 1 add Option filter PDE Plugin get Resource String NL FILTER true lists 1 add Option drill Down PDE Plugin get Resource String NL DRILLDOWN true 1 NON NLS 1 set Option Enabled drill Down false NON NLS 1  createOptions addOption KEY_PACKAGE_NAME PDEPlugin getResourceString NL_PACKAGE_NAME addOption className PDEPlugin getResourceString NL_CLASS_NAME SampleView addOption viewName PDEPlugin getResourceString NL_NAME PDEPlugin getResourceString NL_DEFAULT_NAME addOption viewCategoryId PDEPlugin getResourceString NL_CATEGORY_ID addOption viewCategoryName PDEPlugin getResourceString NL_CATEGORY_NAME PDEPlugin getResourceString NL_DEFAULT_CATEGORY_NAME addOption viewType PDEPlugin getResourceString NL_SELECT tableViewer PDEPlugin getResourceString NL_TABLE treeViewer PDEPlugin getResourceString NL_TREE tableViewer addToPerspective BooleanOption addOption addToPerspective PDEPlugin getResourceString NL_ADD_TO_PERSPECTIVE addOption doubleClick PDEPlugin getResourceString NL_DOUBLE_CLICK addOption PDEPlugin getResourceString NL_POPUP addOption localToolbar PDEPlugin getResourceString NL_TOOLBAR addOption localPulldown PDEPlugin getResourceString NL_PULLDOWN addOption PDEPlugin getResourceString NL_SORTING addOption PDEPlugin getResourceString NL_FILTER addOption drillDown PDEPlugin getResourceString NL_DRILLDOWN setOptionEnabled drillDown
protected void initialize Fields I Field Data data In a new project wizard we don t know this yet the model has not been created String id data get Id initialize Option KEY PACKAGE NAME id views NON NLS 1 initialize Option view Category Id id NON NLS 1  initializeFields IFieldData getId initializeOption KEY_PACKAGE_NAME initializeOption viewCategoryId
public void initialize Fields I Plugin Model Base model In the new extension wizard the model exists so we can initialize directly from it String plugin Id model get Plugin Base get Id initialize Option KEY PACKAGE NAME plugin Id views NON NLS 1 initialize Option view Category Id plugin Id NON NLS 1  initializeFields IPluginModelBase pluginId getPluginBase getId initializeOption KEY_PACKAGE_NAME pluginId initializeOption viewCategoryId pluginId
public boolean is Dependent On Parent Wizard return true  isDependentOnParentWizard
public void add Pages Wizard wizard Wizard Page page0 create Page 0 I Help Context Ids TEMPLATE VIEW page0 set Title PDE Plugin get Resource String NL TITLE0 page0 set Description PDE Plugin get Resource String NL DESC0 wizard add Page page0 Wizard Page page1 create Page 1 I Help Context Ids TEMPLATE VIEW page1 set Title PDE Plugin get Resource String NL TITLE1 page1 set Description PDE Plugin get Resource String NL DESC1 wizard add Page page1 mark Pages Added  addPages WizardPage createPage IHelpContextIds TEMPLATE_VIEW setTitle PDEPlugin getResourceString NL_TITLE0 setDescription PDEPlugin getResourceString NL_DESC0 addPage WizardPage createPage IHelpContextIds TEMPLATE_VIEW setTitle PDEPlugin getResourceString NL_TITLE1 setDescription PDEPlugin getResourceString NL_DESC1 addPage markPagesAdded
public void validate Options Template Option source String view Type get Value view Type to String NON NLS 1 set Option Enabled drill Down view Type equals tree Viewer NON NLS 1 NON NLS 2 if source is Required source is Empty flag Missing Required Option source else validate Container Page source  validateOptions TemplateOption viewType getValue viewType toString setOptionEnabled drillDown viewType treeViewer isRequired isEmpty flagMissingRequiredOption validateContainerPage
private void validate Container Page Template Option source Template Option all Page Options get Options 0 for int i 0 i all Page Options length i Template Option next Option all Page Options i if next Option is Required next Option is Empty flag Missing Required Option next Option return reset Page State  validateContainerPage TemplateOption TemplateOption allPageOptions getOptions allPageOptions TemplateOption nextOption allPageOptions nextOption isRequired nextOption isEmpty flagMissingRequiredOption nextOption resetPageState
public String get Used Extension Point return org eclipse ui views NON NLS 1  getUsedExtensionPoint
protected void update Model I Progress Monitor monitor throws Core Exception I Plugin Base plugin model get Plugin Base I Plugin Extension extension create Extension org eclipse ui views true NON NLS 1 I Plugin Model Factory factory model get Plugin Factory String cid get String Option view Category Id NON NLS 1 create Category extension cid String full Class Name get String Option KEY PACKAGE NAME get String Option class Name NON NLS 1 NON NLS 2 I Plugin Element view Element factory create Element extension view Element set Name view NON NLS 1 view Element set Attribute id full Class Name NON NLS 1 view Element set Attribute name get String Option view Name NON NLS 1 NON NLS 2 view Element set Attribute icon icons sample gif NON NLS 1 NON NLS 2 view Element set Attribute class full Class Name NON NLS 1 view Element set Attribute category cid NON NLS 1 extension add view Element if extension is In The Model plugin add extension if add To Perspective is Selected I Plugin Extension perspective Extension create Extension org eclipse ui perspective Extensions true NON NLS 1 I Plugin Element perspective Element factory create Element perspective Extension perspective Element set Name perspective Extension NON NLS 1 perspective Element set Attribute targetID NON NLS 1 org eclipse ui resource Perspective NON NLS 1 I Plugin Element view factory create Element perspective Element view set Name view NON NLS 1 view set Attribute id full Class Name NON NLS 1 view set Attribute relative org eclipse ui views Task List NON NLS 1 NON NLS 2 view set Attribute relationship right NON NLS 1 NON NLS 2 view set Attribute ratio 0 5 NON NLS 1 NON NLS 2 perspective Element add view perspective Extension add perspective Element if perspective Extension is In The Model plugin add perspective Extension  updateModel IProgressMonitor CoreException IPluginBase getPluginBase IPluginExtension createExtension IPluginModelFactory getPluginFactory getStringOption viewCategoryId createCategory fullClassName getStringOption KEY_PACKAGE_NAME getStringOption className IPluginElement viewElement createElement viewElement setName viewElement setAttribute fullClassName viewElement setAttribute getStringOption viewName viewElement setAttribute viewElement setAttribute fullClassName viewElement setAttribute viewElement isInTheModel addToPerspective isSelected IPluginExtension perspectiveExtension createExtension perspectiveExtensions IPluginElement perspectiveElement createElement perspectiveExtension perspectiveElement setName perspectiveExtension perspectiveElement setAttribute resourcePerspective IPluginElement createElement perspectiveElement setName setAttribute fullClassName setAttribute TaskList setAttribute setAttribute perspectiveElement perspectiveExtension perspectiveElement perspectiveExtension isInTheModel perspectiveExtension
private void create Category I Plugin Extension extension String id throws Core Exception I Plugin Object elements extension get Children for int i 0 i elements length i I Plugin Element element I Plugin Element elements i if element get Name equals Ignore Case category NON NLS 1 I Plugin Attribute att element get Attribute id NON NLS 1 if att null String cid att get Value if cid null cid equals id return I Plugin Element category Element model get Factory create Element extension category Element set Name category NON NLS 1 category Element set Attribute name get String Option view Category Name NON NLS 1 NON NLS 2 category Element set Attribute id id NON NLS 1 extension add category Element  createCategory IPluginExtension CoreException IPluginObject getChildren IPluginElement IPluginElement getName equalsIgnoreCase IPluginAttribute getAttribute getValue IPluginElement categoryElement getFactory createElement categoryElement setName categoryElement setAttribute getStringOption viewCategoryName categoryElement setAttribute categoryElement
see org eclipse pde internal ui wizards templates PDE Template Section get Folders To Include public String get New Files return new String icons NON NLS 1  PDETemplateSection getFoldersToInclude getNewFiles
public I Plugin Reference get Dependencies String schema Version Array List result new Array List if schema Version null result add new Plugin Reference org eclipse core runtime null 0 NON NLS 1 result add new Plugin Reference org eclipse ui null 0 NON NLS 1 return I Plugin Reference result to Array new I Plugin Reference result size  IPluginReference getDependencies schemaVersion ArrayList ArrayList schemaVersion PluginReference PluginReference IPluginReference toArray IPluginReference

extends Default Content Provider implements I Structured Content Provider public Object get Elements Object parent I Workspace workspace I Workspace parent return workspace get Root get Projects  DefaultContentProvider IStructuredContentProvider getElements IWorkspace IWorkspace getRoot getProjects
implements I Table Label Provider public String get Column Text Object obj int index if index 0 return I Project obj get Name return NON NLS 1  ITableLabelProvider getColumnText IProject getName
return NON NLS 1 public Image get Column Image Object obj int index return PlatformUI get Workbench get Shared Images get Image IDE Shared Images IMG OBJ PROJECT  getColumnImage getWorkbench getSharedImages getImage SharedImages IMG_OBJ_PROJECT
class Table Part extends Wizard Checkbox Table Part public Table Part String main Label super main Label  TablePart WizardCheckboxTablePart TablePart mainLabel mainLabel
public void update Counter int count super update Counter count set Page Complete count 0 if update Build Path Button null return Object selected table Part get Selection update Build Path Button set Enabled false for int i 0 i selected length i try if I Project selected i has Nature Java Core NATURE ID update Build Path Button set Enabled true break catch Core Exception e PDE Plugin log Exception e  updateCounter updateCounter setPageComplete updateBuildPathButton tablePart getSelection updateBuildPathButton setEnabled IProject hasNature JavaCore NATURE_ID updateBuildPathButton setEnabled CoreException PDEPlugin logException
public Converted Projects Page Vector initial Selection super converted Projects NON NLS 1 set Title PDE Plugin get Resource String KEY TITLE set Description PDE Plugin get Resource String KEY DESC table Part new Table Part PDE Plugin get Resource String KEY PROJECT LIST  ConvertedProjectsPage initialSelection convertedProjects setTitle PDEPlugin getResourceString KEY_TITLE setDescription PDEPlugin getResourceString KEY_DESC tablePart TablePart PDEPlugin getResourceString KEY_PROJECT_LIST
project Viewer set Label Provider new Project Label Provider project Viewer add Filter new Viewer Filter public boolean select Viewer viewer Object parent Object object I Project project I Project object return project is Open PDE has Plugin Nature project  projectViewer setLabelProvider ProjectLabelProvider projectViewer addFilter ViewerFilter IProject IProject isOpen hasPluginNature
public void create Control Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 5 container set Layout layout table Part create Control container project Viewer table Part get Table Viewer project Viewer set Content Provider new Project Content Provider project Viewer set Label Provider new Project Label Provider project Viewer add Filter new Viewer Filter public boolean select Viewer viewer Object parent Object object I Project project I Project object return project is Open PDE has Plugin Nature project project Viewer set Input PDE Plugin get Workspace update Build Path Button new Button container SWT CHECK update Build Path Button set Text PDE Plugin get Resource String KEY UPDATE BUILD PATH update Build Path Button set Selection get Dialog Settings get Boolean UPDATE SECTION update Build Path Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL update Build Path Button set Enabled false table Part update Counter 0 set Control container Dialog apply Dialog Font container Workbench Help set Help container I Help Context Ids CONVERTED PROJECTS  createControl GridLayout GridLayout numColumns marginHeight marginWidth setLayout tablePart createControl projectViewer tablePart getTableViewer projectViewer setContentProvider ProjectContentProvider projectViewer setLabelProvider ProjectLabelProvider projectViewer addFilter ViewerFilter IProject IProject isOpen hasPluginNature projectViewer setInput PDEPlugin getWorkspace updateBuildPathButton updateBuildPathButton setText PDEPlugin getResourceString KEY_UPDATE_BUILD_PATH updateBuildPathButton setSelection getDialogSettings getBoolean UPDATE_SECTION updateBuildPathButton setLayoutData GridData GridData FILL_HORIZONTAL updateBuildPathButton setEnabled tablePart updateCounter setControl applyDialogFont WorkbenchHelp setHelp IHelpContextIds CONVERTED_PROJECTS
private static String create Initial Name String id int loc id last Index Of if loc 1 return id String Buffer buf new String Buffer id substring loc 1 buf set Char At 0 Character to Upper Case buf char At 0 return buf to String  createInitialName lastIndexOf StringBuffer StringBuffer setCharAt toUpperCase charAt toString
private static void create Manifest File I File file I Progress Monitor monitor throws Core Exception Workspace Plugin Model model new Workspace Plugin Model file model load I Plugin plugin model get Plugin plugin set Id file get Project get Name plugin set Name create Initial Name plugin get Id plugin set Version 1 0 0 NON NLS 1 model save  createManifestFile IFile IProgressMonitor CoreException WorkspacePluginModel WorkspacePluginModel IPlugin getPlugin setId getProject getName setName createInitialName getId setVersion
I Runnable With Progress operation new Workspace Modify Operation public void execute I Progress Monitor monitor try convert Projects selected update Build Path monitor catch Core Exception e PDE Plugin log Exception e finally monitor done  IRunnableWithProgress WorkspaceModifyOperation IProgressMonitor convertProjects updateBuildPath CoreException PDEPlugin logException
public boolean finish final boolean update Build Path update Build Path Button get Selection update Build Path Button is Enabled final Object selected table Part get Selection I Dialog Settings settings get Dialog Settings settings put UPDATE SECTION update Build Path I Runnable With Progress operation new Workspace Modify Operation public void execute I Progress Monitor monitor try convert Projects selected update Build Path monitor catch Core Exception e PDE Plugin log Exception e finally monitor done try get Container run false true operation catch Invocation Target Exception e PDE Plugin log Exception e return false catch Interrupted Exception e PDE Plugin log Exception e return false return true  updateBuildPath updateBuildPathButton getSelection updateBuildPathButton isEnabled tablePart getSelection IDialogSettings getDialogSettings UPDATE_SECTION updateBuildPath IRunnableWithProgress WorkspaceModifyOperation IProgressMonitor convertProjects updateBuildPath CoreException PDEPlugin logException getContainer InvocationTargetException PDEPlugin logException InterruptedException PDEPlugin logException
public static void update Build Path I Project project I Progress Monitor monitor throws Core Exception I Path manifest Path project get Full Path append plugin xml NON NLS 1 I File file project get Workspace get Root get File manifest Path if file exists return Workspace Plugin Model model new Workspace Plugin Model file model load if model is Loaded return Classpath Util Core set Classpath model monitor error occurs here on initial  updateBuildPath IProject IProgressMonitor CoreException IPath manifestPath getFullPath IFile getWorkspace getRoot getFile manifestPath WorkspacePluginModel WorkspacePluginModel isLoaded ClasspathUtilCore setClasspath
public static void convert Project I Project project I Progress Monitor monitor throws Core Exception Core Utility add Nature To Project project PDE PLUGIN NATURE monitor I Path manifest Path project get Full Path append plugin xml NON NLS 1 I File file project get Workspace get Root get File manifest Path if file exists IDE set Default Editor file PDE Plugin MANIFEST EDITOR ID else manifest Path project get Full Path append fragment xml NON NLS 1 I File fragment File project get Workspace get Root get File manifest Path if fragment File exists create Manifest File file monitor IDE set Default Editor file PDE Plugin MANIFEST EDITOR ID I Path build Path project get Full Path append build properties NON NLS 1 I File build File project get Workspace get Root get File build Path if build File exists IDE set Default Editor build File PDE Plugin BUILD EDITOR ID  convertProject IProject IProgressMonitor CoreException CoreUtility addNatureToProject PLUGIN_NATURE IPath manifestPath getFullPath IFile getWorkspace getRoot getFile manifestPath setDefaultEditor PDEPlugin MANIFEST_EDITOR_ID manifestPath getFullPath IFile fragmentFile getWorkspace getRoot getFile manifestPath fragmentFile createManifestFile setDefaultEditor PDEPlugin MANIFEST_EDITOR_ID IPath buildPath getFullPath IFile buildFile getWorkspace getRoot getFile buildPath buildFile setDefaultEditor buildFile PDEPlugin BUILD_EDITOR_ID
private void convert Projects Object selected boolean update Build Path I Progress Monitor monitor throws Core Exception int total Count update Build Path 2 selected length selected length monitor begin Task PDE Plugin get Resource String KEY CONVERTING total Count for int i 0 i selected length i convert Project I Project selected i monitor monitor worked 1 if update Build Path monitor sub Task PDE Plugin get Resource String KEY UPDATING for int i 0 i selected length i if I Project selected i has Nature Java Core NATURE ID update Build Path I Project selected i new Sub Progress Monitor monitor 1 else monitor worked 1 monitor done  convertProjects updateBuildPath IProgressMonitor CoreException totalCount updateBuildPath beginTask PDEPlugin getResourceString KEY_CONVERTING totalCount convertProject IProject updateBuildPath subTask PDEPlugin getResourceString KEY_UPDATING IProject hasNature JavaCore NATURE_ID updateBuildPath IProject SubProgressMonitor

public Converted Project Wizard set Default Page Image Descriptor PDE Plugin Images DESC CONVJPPRJ WIZ set Window Title PDE Plugin get Resource String KEY WTITLE set Dialog Settings PDE Plugin get Default get Dialog Settings set Needs Progress Monitor true  ConvertedProjectWizard setDefaultPageImageDescriptor PDEPluginImages DESC_CONVJPPRJ_WIZ setWindowTitle PDEPlugin getResourceString KEY_WTITLE setDialogSettings PDEPlugin getDefault getDialogSettings setNeedsProgressMonitor
public void add Pages main Page new Converted Projects Page selected add Page main Page  addPages mainPage ConvertedProjectsPage addPage mainPage
add Page main Page public boolean perform Finish return main Page finish  addPage mainPage performFinish mainPage

private static void initialize f Map put org eclipse ui marker Image Provider org eclipse ui ide marker Image Provider NON NLS 1 NON NLS 2 f Map put org eclipse ui marker Help org eclipse ui ide marker Help NON NLS 1 NON NLS 2 f Map put org eclipse ui marker Image Providers org eclipse ui ide marker Image Providers NON NLS 1 NON NLS 2 f Map put org eclipse ui marker Resolution org eclipse ui ide marker Resolution NON NLS 1 NON NLS 2 f Map put org eclipse ui project Nature Images org eclipse ui ide project Nature Images NON NLS 1 NON NLS 2 f Map put org eclipse ui resource Filters org eclipse ui ide resource Filters NON NLS 1 NON NLS 2 f Map put org eclipse ui marker Updaters org eclipse ui editors marker Updaters NON NLS 1 NON NLS 2 f Map put org eclipse ui document Providers org eclipse ui editors document Providers NON NLS 1 NON NLS 2 f Map put org eclipse ui workbench texteditor marker Annotation Specification org eclipse ui editors marker Annotation Specification NON NLS 1 NON NLS 2 f Map put org eclipse help browser org eclipse help base browser NON NLS 1 NON NLS 2 f Map put org eclipse help lucene Analyzer org eclipse help base lucene Analyzer NON NLS 1 NON NLS 2 f Map put org eclipse help webapp org eclipse help base webapp NON NLS 1 NON NLS 2 f Map put org eclipse help support org eclipse ui help Support NON NLS 1 NON NLS 2  fMap markerImageProvider markerImageProvider fMap markerHelp markerHelp fMap markerImageProviders markerImageProviders fMap markerResolution markerResolution fMap projectNatureImages projectNatureImages fMap resourceFilters resourceFilters fMap markerUpdaters markerUpdaters fMap documentProviders documentProviders fMap markerAnnotationSpecification markerAnnotationSpecification fMap fMap luceneAnalyzer luceneAnalyzer fMap fMap helpSupport
public static boolean is Deprecated String id if f Map is Empty initialize return f Map contains Key id  isDeprecated fMap isEmpty fMap containsKey
public static boolean has Moved From Help To Base String key return key equals org eclipse help browser NON NLS 1 key equals org eclipse help lucene Analyzer NON NLS 1 key equals org eclipse help webapp NON NLS 1  hasMovedFromHelpToBase luceneAnalyzer
public static boolean has Moved From Help ToUI String key return key equals org eclipse help support NON NLS 1  hasMovedFromHelpToUI
public static String get New Id String old Id if f Map is Empty initialize return f Map contains Key old Id f Map get old Id to String null  getNewId oldId fMap isEmpty fMap containsKey oldId fMap oldId toString

public Migrate Plugin Wizard I Plugin Model Base selected I Dialog Settings master Settings PDE Plugin get Default get Dialog Settings set Dialog Settings get Settings Section master Settings set Default Page Image Descriptor PDE Plugin Images DESC MIGRATE 30 WIZ set Window Title PDE Plugin get Resource String Migration Wizard title NON NLS 1 set Needs Progress Monitor true this selected selected  MigratePluginWizard IPluginModelBase IDialogSettings masterSettings PDEPlugin getDefault getDialogSettings setDialogSettings getSettingsSection masterSettings setDefaultPageImageDescriptor PDEPluginImages DESC_MIGRATE_30_WIZ setWindowTitle PDEPlugin getResourceString MigrationWizard setNeedsProgressMonitor
I Runnable With Progress operation new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception if PDE Plugin get Workspace validate Edit get Files To Validate models get Container get Shell get Severity I Status OK monitor done return int num Units do Update Classpath models length 2 models length monitor begin Task PDE Plugin get Resource String Migration Wizard progress num Units NON NLS 1 try for int i 0 i models length i monitor sub Task models i get Plugin Base get Id transform models i models i get Underlying Resource refresh Local I Resource DEPTH ZERO null monitor worked 1 if do Clean Projects I Project project models i get Underlying Resource get Project I Project Description desc project get Description desc set Referenced Projects new I Project 0 project set Description desc null if do Update Classpath Update Classpath Action do Update Classpath new Sub Progress Monitor monitor 1 new I Plugin Model Base models i catch Exception e PDE Plugin log Exception e finally monitor done  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException PDEPlugin getWorkspace validateEdit getFilesToValidate getContainer getShell getSeverity IStatus numUnits doUpdateClasspath beginTask PDEPlugin getResourceString MigrationWizard numUnits subTask getPluginBase getId getUnderlyingResource refreshLocal IResource DEPTH_ZERO doCleanProjects IProject getUnderlyingResource getProject IProjectDescription getDescription setReferencedProjects IProject setDescription doUpdateClasspath UpdateClasspathAction doUpdateClasspath SubProgressMonitor IPluginModelBase PDEPlugin logException
public boolean perform Finish final I Plugin Model Base models page1 get Selected page1 store Settings final boolean do Update Classpath page1 is Update Classpath Requested final boolean do Clean Projects page1 is Clean Projects Requested I Runnable With Progress operation new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception if PDE Plugin get Workspace validate Edit get Files To Validate models get Container get Shell get Severity I Status OK monitor done return int num Units do Update Classpath models length 2 models length monitor begin Task PDE Plugin get Resource String Migration Wizard progress num Units NON NLS 1 try for int i 0 i models length i monitor sub Task models i get Plugin Base get Id transform models i models i get Underlying Resource refresh Local I Resource DEPTH ZERO null monitor worked 1 if do Clean Projects I Project project models i get Underlying Resource get Project I Project Description desc project get Description desc set Referenced Projects new I Project 0 project set Description desc null if do Update Classpath Update Classpath Action do Update Classpath new Sub Progress Monitor monitor 1 new I Plugin Model Base models i catch Exception e PDE Plugin log Exception e finally monitor done try get Container run true false operation catch Invocation Target Exception e catch Interrupted Exception e return true  performFinish IPluginModelBase getSelected storeSettings doUpdateClasspath isUpdateClasspathRequested doCleanProjects isCleanProjectsRequested IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException PDEPlugin getWorkspace validateEdit getFilesToValidate getContainer getShell getSeverity IStatus numUnits doUpdateClasspath beginTask PDEPlugin getResourceString MigrationWizard numUnits subTask getPluginBase getId getUnderlyingResource refreshLocal IResource DEPTH_ZERO doCleanProjects IProject getUnderlyingResource getProject IProjectDescription getDescription setReferencedProjects IProject setDescription doUpdateClasspath UpdateClasspathAction doUpdateClasspath SubProgressMonitor IPluginModelBase PDEPlugin logException getContainer InvocationTargetException InterruptedException
private I File get Files To Validate I Plugin Model Base models Array List files new Array List for int i 0 i models length i I Project project models i get Underlying Resource get Project files add models i get Underlying Resource files add project get File project NON NLS 1 files add project get File classpath NON NLS 1 return I File files to Array new I File files size  IFile getFilesToValidate IPluginModelBase ArrayList ArrayList IProject getUnderlyingResource getProject getUnderlyingResource getFile getFile IFile toArray IFile
private I Dialog Settings get Settings Section I Dialog Settings master I Dialog Settings setting master get Section STORE SECTION if setting null setting master add New Section STORE SECTION return setting  IDialogSettings getSettingsSection IDialogSettings IDialogSettings getSection STORE_SECTION addNewSection STORE_SECTION
public void add Pages page1 new Migrate Plugin Wizard Page selected add Page page1  addPages MigratePluginWizardPage addPage
private void transform I Plugin Model Base model throws Exception I Resource file model get Underlying Resource I Document document create Document file Find Replace Document Adapter find Adapter new Find Replace Document Adapter document add Eclipse Processing Instruction document find Adapter update Extensions document find Adapter if model get Plugin Base get Imports length 0 add New Imports document find Adapter get Additional Imports model write File document file  IPluginModelBase IResource getUnderlyingResource IDocument createDocument FindReplaceDocumentAdapter findAdapter FindReplaceDocumentAdapter addEclipseProcessingInstruction findAdapter updateExtensions findAdapter getPluginBase getImports addNewImports findAdapter getAdditionalImports writeFile
private I Document create Document I Resource file throws Exception Buffered Reader reader new Buffered Reader new File Reader file get Location toOS String String Buffer buffer new String Buffer while reader ready buffer append char reader read reader close return new Document buffer to String  IDocument createDocument IResource BufferedReader BufferedReader FileReader getLocation toOSString StringBuffer StringBuffer toString
private void write File I Document document I Resource file throws Exception Print Writer writer new Print Writer new File Writer file get Location toOS String writer write document get writer close  writeFile IDocument IResource PrintWriter PrintWriter FileWriter getLocation toOSString
private void add Eclipse Processing Instruction I Document document Find Replace Document Adapter adapter try I Region region adapter find 1 xml true true false true NON NLS 1 if region null String text document get region get Offset region get Length adapter replace text System get Property line separator NON NLS 1 eclipse version 3 0 NON NLS 1 false catch Bad Location Exception e  addEclipseProcessingInstruction IDocument FindReplaceDocumentAdapter IRegion getOffset getLength getProperty BadLocationException
private void update Extensions I Document document Find Replace Document Adapter adapter int start 0 for try I Region region find Next Extension adapter start if region null break I Region id Region find Point Attribute Region adapter region if id Region null String point document get id Region get Offset id Region get Length if Extension Point Mappings is Deprecated point trim adapter replace Extension Point Mappings get New Id point trim false start region get Offset region get Length catch Bad Location Exception e  updateExtensions IDocument FindReplaceDocumentAdapter IRegion findNextExtension IRegion idRegion findPointAttributeRegion idRegion idRegion getOffset idRegion getLength ExtensionPointMappings isDeprecated ExtensionPointMappings getNewId getOffset getLength BadLocationException
private I Region find Point Attribute Region Find Replace Document Adapter adapter I Region parent Region try I Region region adapter find parent Region get Offset s point s s NON NLS 1 true true false true if region null region get Offset region get Length parent Region get Offset parent Region get Length region adapter find region get Offset region get Length NON NLS 1 true true false true if region null region get Offset region get Length parent Region get Offset parent Region get Length return region catch Bad Location Exception e return null  IRegion findPointAttributeRegion FindReplaceDocumentAdapter IRegion parentRegion IRegion parentRegion getOffset getOffset getLength parentRegion getOffset parentRegion getLength getOffset getLength getOffset getLength parentRegion getOffset parentRegion getLength BadLocationException
private I Region find Next Extension Find Replace Document Adapter adapter int start int offset 1 int length 1 try I Region region adapter find start extension s true true false true NON NLS 1 if region null offset region get Offset region adapter find offset true true false false NON NLS 1 if region null length region get Offset offset 1 catch Bad Location Exception e return offset 1 length 1 new Region offset length null  IRegion findNextExtension FindReplaceDocumentAdapter IRegion getOffset getOffset BadLocationException
private String get Additional Imports I Plugin Model Base model Array List result new Array List TODO do no just add If core runtime exists replace it if find Import model org eclipse core runtime null result add import plugin org eclipse core runtime compatibility NON NLS 1 I Plugin Import ui Import find Import model org eclipse ui NON NLS 1 if ui Import null Array List list new Array List list add org eclipse ui ide NON NLS 1 list add org eclipse ui views NON NLS 1 list add org eclipse jface text NON NLS 1 list add org eclipse ui workbench texteditor NON NLS 1 list add org eclipse ui editors NON NLS 1 I Plugin Import imports model get Plugin Base get Imports for int i 0 i imports length i if list contains imports i get Id list remove imports i get Id for int i 0 i list size i String Buffer buffer new String Buffer import plugin NON NLS 1 buffer append list get i NON NLS 1 if ui Import is Reexported buffer append export true NON NLS 1 if ui Import is Optional buffer append optional true NON NLS 1 buffer append NON NLS 1 result add buffer to String else if needs AdditionalUI Import model result add import plugin org eclipse ui NON NLS 1 if needs Help Base Import model result add import plugin org eclipse help base NON NLS 1 return String result to Array new String result size  getAdditionalImports IPluginModelBase ArrayList ArrayList findImport IPluginImport uiImport findImport uiImport ArrayList ArrayList IPluginImport getPluginBase getImports getId getId StringBuffer StringBuffer uiImport isReexported uiImport isOptional toString needsAdditionalUIImport needsHelpBaseImport toArray
private void add New Imports I Document document Find Replace Document Adapter adapter String imports try if imports length 0 return String space NON NLS 1 I Region requires Region adapter find 0 requires true false false false NON NLS 1 if requires Region null I Region spacer Region adapter find requires Region get Offset requires Region get Length s true true false true NON NLS 1 if spacer Region null space document get spacer Region get Offset spacer Region get Length String Buffer buffer new String Buffer space for int i 0 i imports length i buffer append imports i space adapter replace buffer to String false catch Bad Location Exception e  addNewImports IDocument FindReplaceDocumentAdapter IRegion requiresRegion requiresRegion IRegion spacerRegion requiresRegion getOffset requiresRegion getLength spacerRegion spacerRegion getOffset spacerRegion getLength StringBuffer StringBuffer toString BadLocationException
private boolean needs AdditionalUI Import I Plugin Model Base model I Plugin Extension extensions model get Plugin Base get Extensions for int i 0 i extensions length i if Extension Point Mappings has Moved From Help ToUI extensions i get Point find Import model org eclipse ui null NON NLS 1 return true return false  needsAdditionalUIImport IPluginModelBase IPluginExtension getPluginBase getExtensions ExtensionPointMappings hasMovedFromHelpToUI getPoint findImport
private boolean needs Help Base Import I Plugin Model Base model I Plugin Extension extensions model get Plugin Base get Extensions for int i 0 i extensions length i if Extension Point Mappings has Moved From Help To Base extensions i get Point find Import model org eclipse help base null NON NLS 1 return true return false  needsHelpBaseImport IPluginModelBase IPluginExtension getPluginBase getExtensions ExtensionPointMappings hasMovedFromHelpToBase getPoint findImport
private I Plugin Import find Import I Plugin Model Base model String importID I Plugin Import imports model get Plugin Base get Imports for int i 0 i imports length i if imports i get Id equals importID return imports i return null  IPluginImport findImport IPluginModelBase IPluginImport getPluginBase getImports getId

extends Default Content Provider implements I Structured Content Provider public Object get Elements Object parent return get Models  DefaultContentProvider IStructuredContentProvider getElements getModels
class Table Part extends Wizard Checkbox Table Part public Table Part String main Label super main Label  TablePart WizardCheckboxTablePart TablePart mainLabel mainLabel
public void update Counter int count super update Counter count dialog Changed  updateCounter updateCounter dialogChanged
protected Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit Structured Viewer viewer super create Structured Viewer parent style toolkit viewer set Sorter List Util PLUGIN SORTER return viewer  StructuredViewer createStructuredViewer FormToolkit StructuredViewer createStructuredViewer setSorter ListUtil PLUGIN_SORTER
public Migrate Plugin Wizard Page I Plugin Model Base selected super Migrate Wizard Page NON NLS 1 set Title PDE Plugin get Resource String Migration Wizard title NON NLS 1 set Description PDE Plugin get Resource String Migration Wizard Page desc NON NLS 1 this f Selected selected f Table Part new Table Part PDE Plugin get Resource String Migration Wizard Page label NON NLS 1 PDE Plugin get Default get Label Provider connect this  MigratePluginWizardPage IPluginModelBase MigrateWizardPage setTitle PDEPlugin getResourceString MigrationWizard setDescription PDEPlugin getResourceString MigrationWizardPage fSelected fTablePart TablePart PDEPlugin getResourceString MigrationWizardPage PDEPlugin getDefault getLabelProvider
public void dispose super dispose PDE Plugin get Default get Label Provider disconnect this  PDEPlugin getDefault getLabelProvider
public void create Control Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 5 layout vertical Spacing 10 container set Layout layout f Table Part create Control container f Plugin List Viewer f Table Part get Table Viewer f Plugin List Viewer set Content Provider new Content Provider f Plugin List Viewer set Label Provider PDE Plugin get Default get Label Provider Grid Data gd Grid Data f Table Part get Control get Layout Data gd height Hint 300 gd width Hint 300 f Plugin List Viewer set Input PDE Plugin get Default f Table Part set Selection f Selected f Update Classpath Button new Button container SWT CHECK f Update Classpath Button set Text PDE Plugin get Resource String Migration Wizard update NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 f Update Classpath Button set Layout Data gd String update get Dialog Settings get S UPDATE CLASSATH boolean do Update update null true get Dialog Settings get Boolean S UPDATE CLASSATH f Update Classpath Button set Selection do Update f Clean Projects Button new Button container SWT CHECK f Clean Projects Button set Text PDE Plugin get Resource String Migrate Plugin Wizard clean Projects NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 f Clean Projects Button set Layout Data gd String clean get Dialog Settings get S CLEAN PROJECTS boolean do Clean clean null true get Dialog Settings get Boolean S CLEAN PROJECTS f Clean Projects Button set Selection do Clean set Control container Dialog apply Dialog Font container  createControl GridLayout GridLayout numColumns marginHeight marginWidth verticalSpacing setLayout fTablePart createControl fPluginListViewer fTablePart getTableViewer fPluginListViewer setContentProvider ContentProvider fPluginListViewer setLabelProvider PDEPlugin getDefault getLabelProvider GridData GridData fTablePart getControl getLayoutData heightHint widthHint fPluginListViewer setInput PDEPlugin getDefault fTablePart setSelection fSelected fUpdateClasspathButton fUpdateClasspathButton setText PDEPlugin getResourceString MigrationWizard GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan fUpdateClasspathButton setLayoutData getDialogSettings S_UPDATE_CLASSATH doUpdate getDialogSettings getBoolean S_UPDATE_CLASSATH fUpdateClasspathButton setSelection doUpdate fCleanProjectsButton fCleanProjectsButton setText PDEPlugin getResourceString MigratePluginWizard cleanProjects GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan fCleanProjectsButton setLayoutData getDialogSettings S_CLEAN_PROJECTS doClean getDialogSettings getBoolean S_CLEAN_PROJECTS fCleanProjectsButton setSelection doClean setControl applyDialogFont
public I Plugin Model Base get Selected Object objects f Table Part get Selection I Plugin Model Base models new I Plugin Model Base objects length System arraycopy objects 0 models 0 objects length return models  IPluginModelBase getSelected fTablePart getSelection IPluginModelBase IPluginModelBase
private void dialog Changed set Page Complete f Table Part get Selection Count 0  dialogChanged setPageComplete fTablePart getSelectionCount
see org eclipse jface wizard Wizard Page is Page Complete public boolean is Page Complete return f Table Part get Selection Count 0  WizardPage isPageComplete isPageComplete fTablePart getSelectionCount
private Object get Models Vector result new Vector I Plugin Model Base models PDE Core get Default get Workspace Model Manager get All Models for int i 0 i models length i if models i get Underlying Resource is Linked models i is Loaded models i get Plugin Base get Schema Version null result add models i return result to Array  getModels IPluginModelBase PDECore getDefault getWorkspaceModelManager getAllModels getUnderlyingResource isLinked isLoaded getPluginBase getSchemaVersion toArray
public void store Settings I Dialog Settings settings get Dialog Settings settings put S UPDATE CLASSATH f Update Classpath Button get Selection settings put S CLEAN PROJECTS f Clean Projects Button get Selection  storeSettings IDialogSettings getDialogSettings S_UPDATE_CLASSATH fUpdateClasspathButton getSelection S_CLEAN_PROJECTS fCleanProjectsButton getSelection
public boolean is Update Classpath Requested return f Update Classpath Button get Selection  isUpdateClasspathRequested fUpdateClasspathButton getSelection
public boolean is Clean Projects Requested return f Clean Projects Button get Selection  isCleanProjectsRequested fCleanProjectsButton getSelection

see org eclipse ui I Object Action Delegate set Active Part org eclipse jface action I Action org eclipse ui I Workbench Part public void set Active Part I Action action I Workbench Part target Part  IObjectActionDelegate setActivePart IAction IWorkbenchPart setActivePart IAction IWorkbenchPart targetPart
new Wizard Dialog display get Active Shell wizard Busy Indicator show While display new Runnable public void run dialog open  WizardDialog getActiveShell BusyIndicator showWhile
public void run I Action action if f Selection instanceof I Structured Selection Object elems I Structured Selection f Selection to Array Array List models new Array List elems length Plugin Model Manager manager PDE Core get Default get Model Manager for int i 0 i elems length i Object elem elems i I Project project null if elem instanceof I File I File file I File elem project file get Project else if elem instanceof I Project project I Project elem else if elem instanceof I Java Project project I Java Project elem get Project if project null I Plugin Model Base model manager find Model project if model null models add model final I Plugin Model Base model Array I Plugin Model Base models to Array new I Plugin Model Base models size Migrate Plugin Wizard wizard new Migrate Plugin Wizard model Array final Display display get Display final Wizard Dialog dialog new Wizard Dialog display get Active Shell wizard Busy Indicator show While display new Runnable public void run dialog open  IAction fSelection IStructuredSelection IStructuredSelection fSelection toArray ArrayList ArrayList PluginModelManager PDECore getDefault getModelManager IProject IFile IFile IFile getProject IProject IProject IJavaProject IJavaProject getProject IPluginModelBase findModel IPluginModelBase modelArray IPluginModelBase toArray IPluginModelBase MigratePluginWizard MigratePluginWizard modelArray getDisplay WizardDialog WizardDialog getActiveShell BusyIndicator showWhile
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection f Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection fSelection
private Display get Display Display display Display get Current if display null display Display get Default return display  getDisplay getCurrent getDefault

public Update Buildpath Wizard I Plugin Model Base selected I Dialog Settings master Settings PDE Plugin get Default get Dialog Settings set Dialog Settings get Settings Section master Settings set Default Page Image Descriptor PDE Plugin Images DESC CONVJPPRJ WIZ set Window Title PDE Plugin get Resource String KEY WTITLE set Needs Progress Monitor true this selected selected  UpdateBuildpathWizard IPluginModelBase IDialogSettings masterSettings PDEPlugin getDefault getDialogSettings setDialogSettings getSettingsSection masterSettings setDefaultPageImageDescriptor PDEPluginImages DESC_CONVJPPRJ_WIZ setWindowTitle PDEPlugin getResourceString KEY_WTITLE setNeedsProgressMonitor
private I Dialog Settings get Settings Section I Dialog Settings master I Dialog Settings setting master get Section STORE SECTION if setting null setting master add New Section STORE SECTION return setting  IDialogSettings getSettingsSection IDialogSettings IDialogSettings getSection STORE_SECTION addNewSection STORE_SECTION
public boolean perform Finish Object final Selected page1 get Selected page1 store Settings I Plugin Model Base model Array new I Plugin Model Base final Selected length System arraycopy final Selected 0 model Array 0 final Selected length Update Classpath Action run true get Container model Array return true  performFinish finalSelected getSelected storeSettings IPluginModelBase modelArray IPluginModelBase finalSelected finalSelected modelArray finalSelected UpdateClasspathAction getContainer modelArray
public void add Pages page1 new Update Buildpath Wizard Page selected add Page page1  addPages UpdateBuildpathWizardPage addPage

extends Default Content Provider implements I Structured Content Provider public Object get Elements Object parent return get Models  DefaultContentProvider IStructuredContentProvider getElements getModels
class Table Part extends Wizard Checkbox Table Part public Table Part String main Label super main Label  TablePart WizardCheckboxTablePart TablePart mainLabel mainLabel
public void update Counter int count super update Counter count dialog Changed  updateCounter updateCounter dialogChanged
protected Structured Viewer create Structured Viewer Composite parent int style Form Toolkit toolkit Structured Viewer viewer super create Structured Viewer parent style toolkit viewer set Sorter List Util PLUGIN SORTER return viewer  StructuredViewer createStructuredViewer FormToolkit StructuredViewer createStructuredViewer setSorter ListUtil PLUGIN_SORTER
public Update Buildpath Wizard Page I Plugin Model Base selected super Update Buildpath Wizard Page NON NLS 1 set Title PDE Plugin get Resource String KEY TITLE set Description PDE Plugin get Resource String KEY DESC this selected selected table Part new Table Part PDE Plugin get Resource String KEY PLUGIN LIST PDE Plugin get Default get Label Provider connect this  UpdateBuildpathWizardPage IPluginModelBase UpdateBuildpathWizardPage setTitle PDEPlugin getResourceString KEY_TITLE setDescription PDEPlugin getResourceString KEY_DESC tablePart TablePart PDEPlugin getResourceString KEY_PLUGIN_LIST PDEPlugin getDefault getLabelProvider
public void dispose super dispose PDE Plugin get Default get Label Provider disconnect this  PDEPlugin getDefault getLabelProvider
public void create Control Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 5 container set Layout layout table Part create Control container plugin List Viewer table Part get Table Viewer plugin List Viewer set Content Provider new Buildpath Content Provider plugin List Viewer set Label Provider PDE Plugin get Default get Label Provider Grid Data gd Grid Data table Part get Control get Layout Data gd height Hint 300 gd width Hint 300 plugin List Viewer set Input PDE Plugin get Default table Part set Selection selected set Control container Dialog apply Dialog Font container Workbench Help set Help container I Help Context Ids UPDATE CLASSPATH  createControl GridLayout GridLayout numColumns marginHeight marginWidth setLayout tablePart createControl pluginListViewer tablePart getTableViewer pluginListViewer setContentProvider BuildpathContentProvider pluginListViewer setLabelProvider PDEPlugin getDefault getLabelProvider GridData GridData tablePart getControl getLayoutData heightHint widthHint pluginListViewer setInput PDEPlugin getDefault tablePart setSelection setControl applyDialogFont WorkbenchHelp setHelp IHelpContextIds UPDATE_CLASSPATH
public void store Settings  storeSettings
public Object get Selected return table Part get Selection  getSelected tablePart getSelection
private void dialog Changed set Page Complete table Part get Selection Count 0  dialogChanged setPageComplete tablePart getSelectionCount
see org eclipse jface wizard Wizard Page is Page Complete public boolean is Page Complete return table Part get Selection Count 0  WizardPage isPageComplete isPageComplete tablePart getSelectionCount
private Object get Models Vector result new Vector try I Plugin Model Base models PDE Core get Default get Workspace Model Manager get All Models for int i 0 i models length i We should only care about Java nature not libraries A plug in may not have library but it may re export plug ins that do if models i get Plugin Base get Libraries length 0 continue if models i get Underlying Resource get Project has Nature Java Core NATURE ID result add models i catch Core Exception e PDE Plugin log Exception e return result to Array  getModels IPluginModelBase PDECore getDefault getWorkspaceModelManager getAllModels getPluginBase getLibraries getUnderlyingResource getProject hasNature JavaCore NATURE_ID CoreException PDEPlugin logException toArray

PDE Plugin get Active Workbench Shell get Display new Runnable public void run dialog open  PDEPlugin getActiveWorkbenchShell getDisplay
public void run I Action action if f Selection instanceof I Structured Selection Object elems I Structured Selection f Selection to Array Array List models new Array List elems length Plugin Model Manager manager PDE Core get Default get Model Manager for int i 0 i elems length i Object elem elems i I Project project null if elem instanceof I File I File file I File elem project file get Project else if elem instanceof I Project project I Project elem else if elem instanceof I Java Project project I Java Project elem get Project if project null Workspace Model Manager is Java Plugin Project project I Plugin Model Base model manager find Model project if model null models add model final I Plugin Model Base model Array I Plugin Model Base models to Array new I Plugin Model Base models size Update Buildpath Wizard wizard new Update Buildpath Wizard model Array final Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard Busy Indicator show While PDE Plugin get Active Workbench Shell get Display new Runnable public void run dialog open  IAction fSelection IStructuredSelection IStructuredSelection fSelection toArray ArrayList ArrayList PluginModelManager PDECore getDefault getModelManager IProject IFile IFile IFile getProject IProject IProject IJavaProject IJavaProject getProject WorkspaceModelManager isJavaPluginProject IPluginModelBase findModel IPluginModelBase modelArray IPluginModelBase toArray IPluginModelBase UpdateBuildpathWizard UpdateBuildpathWizard modelArray WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell BusyIndicator showWhile PDEPlugin getActiveWorkbenchShell getDisplay
try I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception do Update Classpath monitor models  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException doUpdateClasspath
context run fork true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception do Update Classpath monitor models PDE Plugin get Workspace run runnable monitor catch Core Exception e throw new Invocation Target Exception e catch Operation Canceled Exception e throw new Interrupted Exception e get Message  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException doUpdateClasspath PDEPlugin getWorkspace CoreException InvocationTargetException OperationCanceledException InterruptedException getMessage
public static void run boolean fork I Runnable Context context final I Plugin Model Base models try context run fork true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I Workspace Runnable runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception do Update Classpath monitor models PDE Plugin get Workspace run runnable monitor catch Core Exception e throw new Invocation Target Exception e catch Operation Canceled Exception e throw new Interrupted Exception e get Message catch Interrupted Exception e return catch Invocation Target Exception e String title PDE Plugin get Resource String KEY TITLE String message PDE Plugin get Resource String KEY MESSAGE PDE Plugin log Exception e title message  IRunnableContext IPluginModelBase IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException doUpdateClasspath PDEPlugin getWorkspace CoreException InvocationTargetException OperationCanceledException InterruptedException getMessage InterruptedException InvocationTargetException PDEPlugin getResourceString KEY_TITLE PDEPlugin getResourceString KEY_MESSAGE PDEPlugin logException
public static void do Update Classpath I Progress Monitor monitor I Plugin Model Base models throws Core Exception monitor begin Task PDE Plugin get Resource String KEY UPDATE models length try for int i 0 i models length i I Plugin Model Base model models i monitor sub Task models i get Plugin Base get Id no reason to compile classpath for a non Java model I Project project model get Underlying Resource get Project if project has Nature Java Core NATURE ID monitor worked 1 continue Classpath Util Core set Classpath model new Sub Progress Monitor monitor 1 if monitor is Canceled break finally monitor done  doUpdateClasspath IProgressMonitor IPluginModelBase CoreException beginTask PDEPlugin getResourceString KEY_UPDATE IPluginModelBase subTask getPluginBase getId IProject getUnderlyingResource getProject hasNature JavaCore NATURE_ID ClasspathUtilCore setClasspath SubProgressMonitor isCanceled
see I Workbench Window Action Delegate init I Workbench Window public void init I View Part view  IWorkbenchWindowActionDelegate IWorkbenchWindow IViewPart
see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection f Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection fSelection

public static String P WIZARDS org eclipse pde ui wizards NON NLS 1 public Wizard Collection Element String id String name Wizard Collection Element parent super name null parent this id id  P_WIZARDS WizardCollectionElement WizardCollectionElement
public Wizard Collection Element find Child Collection I Path search Path String search String search Path segment 0 Object children get Children for int i 0 i children length i Wizard Collection Element current Category Wizard Collection Element children i if current Category get Label equals search String if search Path segment Count 1 return current Category return current Category find Child Collection search Path remove First Segments 1 return null  WizardCollectionElement findChildCollection IPath searchPath searchString searchPath getChildren WizardCollectionElement currentCategory WizardCollectionElement currentCategory getLabel searchString searchPath segmentCount currentCategory currentCategory findChildCollection searchPath removeFirstSegments
public Wizard Element find Wizard String search Id Object children get Wizards get Children for int i 0 i children length i Wizard Element current Wizard Wizard Element children i if current Wizard getID equals search Id return current Wizard return null  WizardElement findWizard searchId getWizards getChildren WizardElement currentWizard WizardElement currentWizard searchId currentWizard
return null public String get Id return id  getId
public I Path get Path if parent null return new Path NON NLS 1 return parent get Path append get Label  IPath getPath getPath getLabel
return parent get Path append get Label public Element List get Wizards return wizards  getPath getLabel ElementList getWizards
return wizards public void set Id java lang String new Id id new Id  setId newId newId
id new Id public void set Wizards Element List value wizards value  newId setWizards ElementList

private String base Category public Wizard Collection Sorter String base Category this base Category base Category  baseCategory WizardCollectionSorter baseCategory baseCategory baseCategory
public int compare Viewer viewer Object o1 Object o2 String name2 Wizard Collection Element o2 get Label String name1 Wizard Collection Element o1 get Label if name2 equals name1 return 0 if base Category null note that this must be checked for name2 before name1 because if they re BOTH equal to base Category then we want to answer false by convention if name2 equals Ignore Case base Category return 1 if name1 equals Ignore Case base Category return 1 return name2 compare To name1  WizardCollectionElement getLabel WizardCollectionElement getLabel baseCategory baseCategory equalsIgnoreCase baseCategory equalsIgnoreCase baseCategory compareTo
return name2 compare To name1 public boolean is Sorter Property Object object Object property Id return true  compareTo isSorterProperty propertyId

private I Configuration Element template public Wizard Element I Configuration Element config super config get Attribute ATT NAME this configuration Element config  IConfigurationElement WizardElement IConfigurationElement getAttribute ATT_NAME configurationElement
this configuration Element config public Object create Executable Extension throws Core Exception return configuration Element create Executable Extension ATT CLASS  configurationElement createExecutableExtension CoreException configurationElement createExecutableExtension ATT_CLASS
return configuration Element create Executable Extension ATT CLASS public I Configuration Element get Configuration Element return configuration Element  configurationElement createExecutableExtension ATT_CLASS IConfigurationElement getConfigurationElement configurationElement
public String get Description if description null I Configuration Element children configuration Element get Children TAG DESCRIPTION if children length 0 description expand Description children 0 get Value return description  getDescription IConfigurationElement configurationElement getChildren TAG_DESCRIPTION expandDescription getValue
We allow replacement variables in description values as well This is to allow extension template descriptin reuse in project template wizards Tokens in form token will be evaluated against the contributing plug in s resource bundle As before to have in the description one need to add private String expand Description String source if source null source length 0 return source if source index Of 1 return source Resource Bundle bundle configuration Element get Declaring Extension get Declaring Plugin Descriptor get Resource Bundle if bundle null return source String Buffer buf new String Buffer boolean key Mode false int key Start Index 1 for int i 0 i source length i char c source char At i if c char c2 source char At i 1 if c2 i buf append continue else if key Mode key Mode false String key source substring key Start Index i String value key try value bundle get String key catch Missing Resource Exception e buf append value else key Start Index i 1 key Mode true else if key Mode buf append c return buf to String  expandDescription indexOf ResourceBundle configurationElement getDeclaringExtension getDeclaringPluginDescriptor getResourceBundle StringBuffer StringBuffer keyMode keyStartIndex charAt charAt keyMode keyMode keyStartIndex getString MissingResourceException keyStartIndex keyMode keyMode toString
return buf to String public String getID return configuration Element get Attribute ATT ID  toString configurationElement getAttribute ATT_ID
return configuration Element get Attribute ATT ID public void set Image Image image this image image  configurationElement getAttribute ATT_ID setImage
this image image public String get Template Id return configuration Element get Attribute ATT TEMPLATE  getTemplateId configurationElement getAttribute ATT_TEMPLATE
return configuration Element get Attribute ATT TEMPLATE public boolean is Template return get Template Id null  configurationElement getAttribute ATT_TEMPLATE isTemplate getTemplateId
return get Template Id null public I Configuration Element get Template Element if template null template find Template Element return template  getTemplateId IConfigurationElement getTemplateElement findTemplateElement
private I Configuration Element find Template Element String template Id get Template Id if template Id null return null I Configuration Element templates Platform get Extension Registry get Configuration Elements For org eclipse pde ui templates NON NLS 1 for int i 0 i templates length i I Configuration Element template templates i String id template get Attribute id NON NLS 1 if id null id equals template Id return template return null  IConfigurationElement findTemplateElement templateId getTemplateId templateId IConfigurationElement getExtensionRegistry getConfigurationElementsFor IConfigurationElement getAttribute templateId
public String get Contributing Id I Configuration Element tel get Template Element if tel null return null return tel get Attribute contributing Id NON NLS 1  getContributingId IConfigurationElement getTemplateElement getAttribute contributingId

private class Wizard Selected Action extends Action public Wizard Selected Action super wizard Selection NON NLS 1  WizardSelectedAction WizardSelectedAction wizardSelection
public void run selection Changed new Selection Changed Event wizard Selection Viewer wizard Selection Viewer get Selection advance To Next Page  selectionChanged SelectionChangedEvent wizardSelectionViewer wizardSelectionViewer getSelection advanceToNextPage
public Wizard List Selection Page Element List wizard Elements String message super List Selection message NON NLS 1 this wizard Elements wizard Elements  WizardListSelectionPage ElementList wizardElements ListSelection wizardElements wizardElements
this wizard Elements wizard Elements public void advance To Next Page get Container show Page get Next Page  wizardElements wizardElements advanceToNextPage getContainer showPage getNextPage
get Container show Page get Next Page public Element List get Wizard Elements return wizard Elements  getContainer showPage getNextPage ElementList getWizardElements wizardElements
wizard Selection Viewer set Sorter List Util NAME SORTER wizard Selection Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event double Click Action run  wizardSelectionViewer setSorter ListUtil NAME_SORTER wizardSelectionViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent doubleClickAction
public void create Control Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout vertical Spacing 10 container set Layout layout container set Layout Data new Grid Data Grid Data FILL BOTH create Above container 1 Label label new Label container SWT NONE label set Text get Label Grid Data gd new Grid Data label set Layout Data gd Sash Form sash Form new Sash Form container SWT HORIZONTAL sash Form set Layout Data new Grid Data Grid Data FILL BOTH wizard Selection Viewer new Table Viewer create Table sash Form SWT BORDER wizard Selection Viewer set Content Provider new List Content Provider wizard Selection Viewer set Label Provider List Util TABLE LABEL PROVIDER wizard Selection Viewer set Sorter List Util NAME SORTER wizard Selection Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event double Click Action run create Description In sash Form create Below container 1 initialize Viewer wizard Selection Viewer set Input wizard Elements wizard Selection Viewer add Selection Changed Listener this Dialog apply Dialog Font container set Control container  createControl GridLayout GridLayout verticalSpacing setLayout setLayoutData GridData GridData FILL_BOTH createAbove setText getLabel GridData GridData setLayoutData SashForm sashForm SashForm sashForm setLayoutData GridData GridData FILL_BOTH wizardSelectionViewer TableViewer createTable sashForm wizardSelectionViewer setContentProvider ListContentProvider wizardSelectionViewer setLabelProvider ListUtil TABLE_LABEL_PROVIDER wizardSelectionViewer setSorter ListUtil NAME_SORTER wizardSelectionViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent doubleClickAction createDescriptionIn sashForm createBelow initializeViewer wizardSelectionViewer setInput wizardElements wizardSelectionViewer addSelectionChangedListener applyDialogFont setControl
protected void create Above Composite container int span  createAbove
protected void create Above Composite container int span protected void create Below Composite container int span  createAbove createBelow
protected void initialize Viewer  initializeViewer
private Table create Table Composite parent int style Table table new Table parent style new Table Column table SWT NONE Table Layout layout new Table Layout layout add Column Data new Column Pixel Data 200 table set Layout layout return table  createTable TableColumn TableLayout TableLayout addColumnData ColumnPixelData setLayout
public void selection Changed Selection Changed Event event set Error Message null I Structured Selection selection I Structured Selection event get Selection Wizard Element current Wizard Selection null Iterator iter selection iterator if iter has Next current Wizard Selection Wizard Element iter next if current Wizard Selection null set Description Text NON NLS 1 set Selected Node null return final Wizard Element final Selection current Wizard Selection set Selected Node create Wizard Node final Selection set Description Text String final Selection get Description get Container update Buttons  selectionChanged SelectionChangedEvent setErrorMessage IStructuredSelection IStructuredSelection getSelection WizardElement currentWizardSelection hasNext currentWizardSelection WizardElement currentWizardSelection setDescriptionText setSelectedNode WizardElement finalSelection currentWizardSelection setSelectedNode createWizardNode finalSelection setDescriptionText finalSelection getDescription getContainer updateButtons
public I Wizard Page get Next Page boolean should Create if should Create return super get Next Page I Wizard Node selected Node get Selected Node selected Node dispose I Wizard wizard selected Node get Wizard if wizard null super set Selected Node null return null if should Create Allow the wizard to create its pages wizard add Pages return wizard get Starting Page  IWizardPage getNextPage shouldCreate shouldCreate getNextPage IWizardNode selectedNode getSelectedNode selectedNode IWizard selectedNode getWizard setSelectedNode shouldCreate addPages getStartingPage
protected void focus And Select First Table table wizard Selection Viewer get Table table set Focus Table Item items table get Items if items length 0 Table Item first items 0 Object obj first get Data wizard Selection Viewer set Selection new Structured Selection obj  focusAndSelectFirst wizardSelectionViewer getTable setFocus TableItem getItems TableItem getData wizardSelectionViewer setSelection StructuredSelection
see org eclipse core runtime I Executable Extension set Initialization Data org eclipse core runtime I Configuration Element java lang String java lang Object public void set Initialization Data I Configuration Element config String property Name Object data throws Core Exception  IExecutableExtension setInitializationData IConfigurationElement setInitializationData IConfigurationElement propertyName CoreException
public I Plugin Content Wizard get Selected Wizard I Wizard Node node get Selected Node if node null return I Plugin Content Wizard node get Wizard return null  IPluginContentWizard getSelectedWizard IWizardNode getSelectedNode IPluginContentWizard getWizard
see org eclipse jface wizard Wizard Selection Page can Flip To Next Page public boolean can Flip To Next Page I Structured Selection ssel I Structured Selection wizard Selection Viewer get Selection return ssel null ssel is Empty  WizardSelectionPage canFlipToNextPage canFlipToNextPage IStructuredSelection IStructuredSelection wizardSelectionViewer getSelection isEmpty

protected Wizard Element wizard Element public Wizard Node Base Wizard Selection Page parent Page Wizard Element element parent Wizard Page parent Page wizard Element element  WizardElement wizardElement WizardNode BaseWizardSelectionPage parentPage WizardElement parentWizardPage parentPage wizardElement
wizard Element element protected abstract I Base Plugin Wizard create Wizard throws Core Exception  wizardElement IBasePluginWizard createWizard CoreException
protected abstract I Base Plugin Wizard create Wizard throws Core Exception public void dispose if wizard null wizard dispose wizard null  IBasePluginWizard createWizard CoreException
public Wizard Element get Element return wizard Element  WizardElement getElement wizardElement
return wizard Element public Point get Extent return new Point 1 1  wizardElement getExtent
public I Wizard get Wizard if wizard null return wizard we ve already created it I Base Plugin Wizard plugin Wizard try plugin Wizard create Wizard create instance of target wizard catch Core Exception e parent Wizard Page set Description Text NON NLS 1 parent Wizard Page set Error Message PDE Plugin get Resource String KEY CREATION ERROR TEXT Message Dialog open Error parent Wizard Page get Wizard get Container get Shell PDE Plugin get Resource String KEY CREATION ERROR PDE Plugin get Resource String KEY CREATION ERROR TEXT return null wizard I Wizard plugin Wizard wizard set Use Container State false return wizard  IWizard getWizard IBasePluginWizard pluginWizard pluginWizard createWizard CoreException parentWizardPage setDescriptionText parentWizardPage setErrorMessage PDEPlugin getResourceString KEY_CREATION_ERROR_TEXT MessageDialog openError parentWizardPage getWizard getContainer getShell PDEPlugin getResourceString KEY_CREATION_ERROR PDEPlugin getResourceString KEY_CREATION_ERROR_TEXT IWizard pluginWizard setUseContainerState
return wizard public boolean is Content Created return wizard null  isContentCreated

public Wizard Tree Selection Page Wizard Collection Element categories String base Category String message super New Extension message NON NLS 1 this wizard Categories categories this base Category base Category  WizardTreeSelectionPage WizardCollectionElement baseCategory NewExtension wizardCategories baseCategory baseCategory
this base Category base Category public void advance To Next Page get Container show Page get Next Page  baseCategory baseCategory advanceToNextPage getContainer showPage getNextPage
new Runnable public void run selection Changed new Selection Changed Event wizard Selection Viewer wizard Selection Viewer get Selection advance To Next Page  selectionChanged SelectionChangedEvent wizardSelectionViewer wizardSelectionViewer getSelection advanceToNextPage
add Double Click Listener new I Double Click Listener public void double Click Double Click Event event Busy Indicator show While wizard Selection Viewer get Control get Display new Runnable public void run selection Changed new Selection Changed Event wizard Selection Viewer wizard Selection Viewer get Selection advance To Next Page  addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent BusyIndicator showWhile wizardSelectionViewer getControl getDisplay selectionChanged SelectionChangedEvent wizardSelectionViewer wizardSelectionViewer getSelection advanceToNextPage
public void create Control Composite parent top level group Composite container new Composite parent SWT NULL Fill Layout flayout new Fill Layout flayout margin Width 5 flayout margin Height 5 container set Layout flayout Sash Form root Sash new Sash Form container SWT VERTICAL Sash Form outer Sash new Sash Form root Sash SWT HORIZONTAL Grid Layout layout new Grid Layout layout num Columns 2 outer Container set Layout layout outer Container set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL tree pane Tree tree new Tree outer Sash SWT BORDER category Tree Viewer new Tree Viewer tree category Tree Viewer set Content Provider new Tree Content Provider category Tree Viewer set Label Provider Element Label Provider INSTANCE category Tree Viewer set Sorter new Wizard Collection Sorter base Category category Tree Viewer add Selection Changed Listener this Grid Data gd new Grid Data Grid Data FILL BOTH Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL gd height Hint SIZING LISTS HEIGHT gd width Hint SIZING LISTS WIDTH tree set Layout Data gd wizard actions pane Table table new Table outer Sash SWT BORDER new Table Column table SWT NONE Table Layout tlayout new Table Layout tlayout add Column Data new Column Weight Data 100 table set Layout tlayout wizard Selection Viewer new Table Viewer table wizard Selection Viewer set Content Provider new List Content Provider wizard Selection Viewer set Label Provider List Util TABLE LABEL PROVIDER wizard Selection Viewer set Sorter List Util NAME SORTER wizard Selection Viewer add Selection Changed Listener this wizard Selection Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event Busy Indicator show While wizard Selection Viewer get Control get Display new Runnable public void run selection Changed new Selection Changed Event wizard Selection Viewer wizard Selection Viewer get Selection advance To Next Page gd new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL gd height Hint SIZING LISTS HEIGHT gd width Hint SIZING LISTS WIDTH table set Layout Data gd the new composite below is needed in order to make the label span the two defined columns of outer Container Composite description Composite new Composite root Sash SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 description Composite set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data horizontal Span 2 data height Hint SIZING DESC HEIGHT description Composite set Layout Data data create Description In description Composite initialize Viewers root Sash set Weights new int 70 30 set Control container  createControl FillLayout FillLayout marginWidth marginHeight setLayout SashForm rootSash SashForm SashForm outerSash SashForm rootSash GridLayout GridLayout numColumns outerContainer setLayout outerContainer setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL outerSash categoryTreeViewer TreeViewer categoryTreeViewer setContentProvider TreeContentProvider categoryTreeViewer setLabelProvider ElementLabelProvider categoryTreeViewer setSorter WizardCollectionSorter baseCategory categoryTreeViewer addSelectionChangedListener GridData GridData GridData FILL_BOTH GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL heightHint SIZING_LISTS_HEIGHT widthHint SIZING_LISTS_WIDTH setLayoutData outerSash TableColumn TableLayout TableLayout addColumnData ColumnWeightData setLayout wizardSelectionViewer TableViewer wizardSelectionViewer setContentProvider ListContentProvider wizardSelectionViewer setLabelProvider ListUtil TABLE_LABEL_PROVIDER wizardSelectionViewer setSorter ListUtil NAME_SORTER wizardSelectionViewer addSelectionChangedListener wizardSelectionViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent BusyIndicator showWhile wizardSelectionViewer getControl getDisplay selectionChanged SelectionChangedEvent wizardSelectionViewer wizardSelectionViewer getSelection advanceToNextPage GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL heightHint SIZING_LISTS_HEIGHT widthHint SIZING_LISTS_WIDTH setLayoutData outerContainer descriptionComposite rootSash GridLayout marginHeight marginWidth descriptionComposite setLayout GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL horizontalSpan heightHint SIZING_DESC_HEIGHT descriptionComposite setLayoutData createDescriptionIn descriptionComposite initializeViewers rootSash setWeights setControl
protected Object get Single Selection I Structured Selection selection Object selected Object selection get First Element if selection size 1 selected Object null ie a multi selection return selected Object  getSingleSelection IStructuredSelection selectedObject getFirstElement selectedObject selectedObject
private void handle Category Selection Selection Changed Event selection Event set Error Message null set Description Text NON NLS 1 set Selected Node null Wizard Collection Element selected Category Wizard Collection Element get Single Selection I Structured Selection selection Event get Selection if selected Category null wizard Selection Viewer set Input null else wizard Selection Viewer set Input selected Category get Wizards  handleCategorySelection SelectionChangedEvent selectionEvent setErrorMessage setDescriptionText setSelectedNode WizardCollectionElement selectedCategory WizardCollectionElement getSingleSelection IStructuredSelection selectionEvent getSelection selectedCategory wizardSelectionViewer setInput wizardSelectionViewer setInput selectedCategory getWizards
private void handle Wizard Selection Selection Changed Event selection Event set Error Message null Wizard Element current Selection Wizard Element get Single Selection I Structured Selection selection Event get Selection If no single selection clear and return if current Selection null set Description Text NON NLS 1 set Selected Node null return final Wizard Element final Selection current Selection Busy Indicator show While category Tree Viewer get Control get Display new Runnable public void run set Selected Node create Wizard Node final Selection set Description Text String final Selection get Description  handleWizardSelection SelectionChangedEvent selectionEvent setErrorMessage WizardElement currentSelection WizardElement getSingleSelection IStructuredSelection selectionEvent getSelection currentSelection setDescriptionText setSelectedNode WizardElement finalSelection currentSelection BusyIndicator showWhile categoryTreeViewer getControl getDisplay setSelectedNode createWizardNode finalSelection setDescriptionText finalSelection getDescription
protected void initialize Viewers category Tree Viewer set Input wizard Categories wizard Selection Viewer add Selection Changed Listener this category Tree Viewer get Tree set Focus  initializeViewers categoryTreeViewer setInput wizardCategories wizardSelectionViewer addSelectionChangedListener categoryTreeViewer getTree setFocus
public void selection Changed Selection Changed Event selection Event if selection Event get Selection Provider equals category Tree Viewer handle Category Selection selection Event else handle Wizard Selection selection Event  selectionChanged SelectionChangedEvent selectionEvent selectionEvent getSelectionProvider categoryTreeViewer handleCategorySelection selectionEvent handleWizardSelection selectionEvent
handle Wizard Selection selection Event public void set Selected Node I Wizard Node node super set Selected Node node  handleWizardSelection selectionEvent setSelectedNode IWizardNode setSelectedNode

public interface I Extension Editor Wizard extends I Base Plugin Wizard Initializes the wizard with the project of the plug in and the model object for the plug in manifest file Java code and other resorces should be created in the source folder under the provided project Changes in the plug in manifest should be made using the AP Is of the provided model Changing the model will make the model dirty This will show up in the UI indicating that the currently opened manifest file is modified and needs to be saved p The wizard is opened on a current selection in the extension tree It is supposed to modify the selected element and or its children using plug in model AP Is The setters on the AP Is will cause the model to be dirty and make the editor dirty as well Saving the editor will commit the changes made by the wizard to the edited file param project the plug in project resource where the new code and resources should go param plugin Model the model instance that should be used to modify the plug in manifest param selection the currently selected extension or extension element in the manifest editor extension tree public void init I Project project I Plugin Model Base plugin Model  IExtensionEditorWizard IBasePluginWizard APIs APIs APIs pluginModel IProject IPluginModelBase pluginModel

public interface I Extension Wizard extends I Base Plugin Wizard Initializes the wizard with the project of the plug in and the model object for the plug in manifest file Java code and other resorces should be created in the source folder under the provided project Changes in the plug in manifest should be made using the AP Is of the provided model Changing the model will make the model dirty This will show up in the UI indicating that the currently opened manifest file is modified and needs to be saved p Although the wizard is launched to create an extension there is no reason a wizard cannot create several at once param project the plug in project resource where the new code and resources should go param plugin Model the model instance that should be used to modify the plug in manifest  IExtensionWizard IBasePluginWizard APIs pluginModel

public interface I Field Data Plug in identifier field return plug in identifier as entered in the wizard  IFieldData
String get Id Plug in version field return plug in version as entered in the wizard  getId
String get Version Plug in name field return plug in name as entered in the wizard  getVersion
String get Name Plug in provider field return plug in provider as entered in the wizard  getName
String get Provider Plug in library field return the name of the initial Java library  getProvider
String get Library Name Source folder field return the name of the Java source folder  getLibraryName
String get Source Folder Name Output folder field return the name of the Java output folder  getSourceFolderName
String get Output Folder Name Legacy selection return code true code if the plug in is created for use with products based on Eclipse before release 3 0 code false code if the plug ins is compatible with Eclipse 3 0  getOutputFolderName
boolean is Legacy OS Gi bundle selection return code true code if the plug in has structure as expected by OS Gi framework in Eclipse 3 0 runtime code false code if the plug in has standard pre 3 0 layout  isLegacy OSGi OSGi
boolean has Bundle Structure Simple project selection return code true code if the plug in should have no Java code and nature code false code otherwise  hasBundleStructure

public interface I Fragment Field Data extends I Field Data Referenced plug in id field return the id of the fragment s plug in  IFragmentFieldData IFieldData
String get Plugin Id Referenced plug in version field return the version of the fragment s plug in  getPluginId
String get Plugin Version Referenced plug in version match choice return the rule for matching the version of the referenced plug in that can be one of the values defined in code I Match Rules code see org eclipse pde code plugin I Match Rules  getPluginVersion IMatchRules IMatchRules

private Composite container param page Name public Project Names Page Sample Wizard wizard super projects NON NLS 1 this wizard wizard set Title PDE Plugin get Resource String Project Names Page title NON NLS 1 set Description PDE Plugin get Resource String Project Names Page desc NON NLS 1  pageName ProjectNamesPage SampleWizard setTitle PDEPlugin getResourceString ProjectNamesPage setDescription PDEPlugin getResourceString ProjectNamesPage
public void set Visible boolean visible set Page Complete wizard get Selection null if container null update Entries super set Visible visible  setVisible setPageComplete getSelection updateEntries setVisible
private void update Entries I Configuration Element selection wizard get Selection if selection null set Message null I Configuration Element projects selection get Children project NON NLS 1 Control children container get Children if projects length 1 children length 2 Text text Text children 1 text set Text projects 0 get Attribute name NON NLS 1 validate Entries return dispose all for int i 0 i children length i children i dispose create entries if projects length 1 create Entry PDE Plugin get Resource String Project Names Page project Name projects 0 get Attribute name NON NLS 1 NON NLS 2 else for int i 0 i projects length i String label Project name i 1 NON NLS 1 NON NLS 2 create Entry label projects i get Attribute name NON NLS 1 container layout validate Entries else set Message PDE Plugin get Resource String Project Names Page no Sample Found Wizard Page WARNING NON NLS 1  updateEntries IConfigurationElement getSelection setMessage IConfigurationElement getChildren getChildren setText getAttribute validateEntries createEntry PDEPlugin getResourceString ProjectNamesPage projectName getAttribute createEntry getAttribute validateEntries setMessage PDEPlugin getResourceString ProjectNamesPage noSampleFound WizardPage
public String get Project Names Control children container get Children String names new String children length 2 int index 0 for int i 0 i children length i if children i instanceof Text String name Text children i get Text names index name return names  getProjectNames getChildren getText
text set Text project Name text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Entries  setText projectName addModifyListener ModifyListener modifyText ModifyEvent validateEntries
private void create Entry String label Name String project Name Label label new Label container SWT NULL label set Text label Name label set Layout Data new Grid Data Grid Data VERTICAL ALIGN CENTER final Text text new Text container SWT SINGLE SWT BORDER text set Text project Name text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Entries text set Layout Data new Grid Data Grid Data FILL HORIZONTAL  createEntry labelName projectName setText labelName setLayoutData GridData GridData VERTICAL_ALIGN_CENTER setText projectName addModifyListener ModifyListener modifyText ModifyEvent validateEntries setLayoutData GridData GridData FILL_HORIZONTAL
private void validate Entries Control children container get Children boolean empty false Hash Set set new Hash Set for int i 0 i children length i if children i instanceof Text String name Text children i get Text if name length 0 empty true break else I Status name Status PDE Plugin get Workspace validate Name name I Resource PROJECT if name Status isOK set Error Message name Status get Message set Page Complete false return set add name if empty set Error Message PDE Plugin get Resource String Project Names Page empty Name NON NLS 1 set Page Complete false else int nnames set size int nfields children length 2 if nfields nnames set Error Message PDE Plugin get Resource String Project Names Page duplicate Names NON NLS 1 set Page Complete false else set Page Complete true set Error Message null  validateEntries getChildren HashSet HashSet getText IStatus nameStatus PDEPlugin getWorkspace validateName IResource nameStatus setErrorMessage nameStatus getMessage setPageComplete setErrorMessage PDEPlugin getResourceString ProjectNamesPage emptyName setPageComplete setErrorMessage PDEPlugin getResourceString ProjectNamesPage duplicateNames setPageComplete setPageComplete setErrorMessage
public void create Control Composite parent container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 container set Layout layout set Control container update Entries  createControl GridLayout GridLayout numColumns setLayout setControl updateEntries

private Scrolled Form Text form Text param page Name public Review Page Sample Wizard wizard super last NON NLS 1 this wizard wizard set Title PDE Plugin get Resource String Review Page title NON NLS 1 set Description PDE Plugin get Resource String Review Page desc NON NLS 1  ScrolledFormText formText pageName ReviewPage SampleWizard setTitle PDEPlugin getResourceString ReviewPage setDescription PDEPlugin getResourceString ReviewPage
public void set Visible boolean visible set Page Complete wizard get Selection null if form Text null update Content super set Visible visible  setVisible setPageComplete getSelection formText updateContent setVisible
private void update Content String Buffer buf new String Buffer buf append form NON NLS 1 I Configuration Element selection wizard get Selection if selection null set Message null I Configuration Element desc selection get Children description NON NLS 1 if desc length 1 buf append PDE Plugin get Formatted Message Review Page desc Content new String selection get Attribute name desc 0 get Value NON NLS 1 NON NLS 2 else buf append PDE Plugin get Formatted Message Review Page content selection get Attribute name NON NLS 1 NON NLS 2 else set Message PDE Plugin get Resource String Review Page no Sample Found Wizard Page WARNING NON NLS 1 buf append form NON NLS 1 form Text set Text buf to String  updateContent StringBuffer StringBuffer IConfigurationElement getSelection setMessage IConfigurationElement getChildren PDEPlugin getFormattedMessage ReviewPage descContent getAttribute getValue PDEPlugin getFormattedMessage ReviewPage getAttribute setMessage PDEPlugin getResourceString ReviewPage noSampleFound WizardPage formText setText toString
public void create Control Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout container set Layout layout form Text new Scrolled Form Text container true form Text set Background parent get Background Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint 300 gd height Hint 300 form Text set Layout Data gd Hyperlink Settings settings new Hyperlink Settings parent get Display form Text get Form Text set Hyperlink Settings settings set Control container update Content  createControl GridLayout GridLayout setLayout formText ScrolledFormText formText setBackground getBackground GridData GridData GridData FILL_BOTH widthHint heightHint formText setLayoutData HyperlinkSettings HyperlinkSettings getDisplay formText getFormText setHyperlinkSettings setControl updateContent

class Input File Listener implements I Resource Change Listener I Resource Delta Visitor public void resource Changed I Resource Change Event event if event get Type I Resource Change Event POST CHANGE I Resource Delta delta event get Delta try delta accept this catch Core Exception e PDE Plugin log Exception e  InputFileListener IResourceChangeListener IResourceDeltaVisitor resourceChanged IResourceChangeEvent getType IResourceChangeEvent POST_CHANGE IResourceDelta getDelta CoreException PDEPlugin logException
public boolean visit I Resource Delta delta throws Core Exception I Resource resource delta get Resource if resource instanceof I File I File file I File resource if file equals I File Editor Input get Editor Input get File if delta get Kind I Resource Delta REMOVED delta get Kind I Resource Delta REPLACED close return false return true  IResourceDelta CoreException IResource getResource IFile IFile IFile IFileEditorInput getEditorInput getFile getKind IResourceDelta getKind IResourceDelta
public Sample Editor default Shortcut new Runtime Workbench Shortcut PDE Plugin get Default get Label Provider connect this  SampleEditor defaultShortcut RuntimeWorkbenchShortcut PDEPlugin getDefault getLabelProvider
Hyperlink more Link toolkit create Hyperlink form get Body Read More SWT NULL NON NLS 1 more Link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e Workbench Help display Help Resource helpURL  moreLink createHyperlink getBody moreLink addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent WorkbenchHelp displayHelpResource
inst Text add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e Object href e get Href if href equals help NON NLS 1 Workbench Help display Help Resource helpURL else if href equals run NON NLS 1 do Run launcher launch Target false else if href equals debug NON NLS 1 do Run launcher launch Target true  instText addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent getHref WorkbenchHelp displayHelpResource doRun launchTarget doRun launchTarget
see Editor Part create Part Control public void create Part Control Composite parent toolkit new Form Toolkit parent get Display form toolkit create Scrolled Form parent Properties properties load Content form set Text properties get Property name NON NLS 1 Table Wrap Layout layout new Table Wrap Layout layout vertical Spacing 10 layout top Margin 10 layout bottom Margin 10 layout left Margin 10 layout right Margin 10 form get Body set Layout layout final String launcher properties get Property launcher NON NLS 1 final String launch Target properties get Property launch Target NON NLS 1 desc Text toolkit create Form Text form get Body true desc Text set Layout Data new Table Wrap Data Table Wrap Data FILL GRAB String desc properties get Property description NON NLS 1 String content PDE Plugin get Formatted Message Sample Editor desc desc null desc NON NLS 1 NON NLS 2 desc Text set Text content true false final String helpURL properties get Property help Href NON NLS 1 if helpURL null Hyperlink more Link toolkit create Hyperlink form get Body Read More SWT NULL NON NLS 1 more Link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e Workbench Help display Help Resource helpURL inst Text toolkit create Form Text form get Body true inst Text set Layout Data new Table Wrap Data Table Wrap Data FILL GRAB String Buffer buf new String Buffer buf append PDE Plugin get Resource String Sample Editor content NON NLS 1 inst Text set Text buf to String true false inst Text add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e Object href e get Href if href equals help NON NLS 1 Workbench Help display Help Resource helpURL else if href equals run NON NLS 1 do Run launcher launch Target false else if href equals debug NON NLS 1 do Run launcher launch Target true inst Text set Image run PDE Plugin get Default get Label Provider get PDE Plugin Images DESC RUN EXC NON NLS 1 inst Text set Image debug PDE Plugin get Default get Label Provider get PDE Plugin Images DESC DEBUG EXC NON NLS 1 inst Text set Image help PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJS INFO TSK NON NLS 1  EditorPart createPartControl createPartControl FormToolkit getDisplay createScrolledForm loadContent setText getProperty TableWrapLayout TableWrapLayout verticalSpacing topMargin bottomMargin leftMargin rightMargin getBody setLayout getProperty launchTarget getProperty launchTarget descText createFormText getBody descText setLayoutData TableWrapData TableWrapData FILL_GRAB getProperty PDEPlugin getFormattedMessage SampleEditor descText setText getProperty helpHref moreLink createHyperlink getBody moreLink addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent WorkbenchHelp displayHelpResource instText createFormText getBody instText setLayoutData TableWrapData TableWrapData FILL_GRAB StringBuffer StringBuffer PDEPlugin getResourceString SampleEditor instText setText toString instText addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent getHref WorkbenchHelp displayHelpResource doRun launchTarget doRun launchTarget instText setImage PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_RUN_EXC instText setImage PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_DEBUG_EXC instText setImage getWorkbench getSharedImages getImage ISharedImages IMG_OBJS_INFO_TSK
final I Launch Shortcut fshortcut shortcut Busy Indicator show While form get Display new Runnable public void run fshortcut launch selection debug I Launch Manager DEBUG MODE I Launch Manager RUN MODE  ILaunchShortcut BusyIndicator showWhile getDisplay ILaunchManager DEBUG_MODE ILaunchManager RUN_MODE
private void do Run String launcher String target final boolean debug I Launch Shortcut shortcut default Shortcut final I Selection selection if target null selection new Structured Selection else selection new Structured Selection final I Launch Shortcut fshortcut shortcut Busy Indicator show While form get Display new Runnable public void run fshortcut launch selection debug I Launch Manager DEBUG MODE I Launch Manager RUN MODE  doRun ILaunchShortcut defaultShortcut ISelection StructuredSelection StructuredSelection ILaunchShortcut BusyIndicator showWhile getDisplay ILaunchManager DEBUG_MODE ILaunchManager RUN_MODE
private Properties load Content I Storage Editor Input input I Storage Editor Input get Editor Input Properties properties new Properties try I Storage storage input get Storage Input Stream is storage get Contents properties load is is close catch IO Exception e PDE Plugin log Exception e catch Core Exception e PDE Plugin log Exception e return properties  loadContent IStorageEditorInput IStorageEditorInput getEditorInput IStorage getStorage InputStream getContents IOException PDEPlugin logException CoreException PDEPlugin logException
public void dispose if input File Listener null PDE Plugin get Workspace remove Resource Change Listener input File Listener input File Listener null toolkit dispose PDE Plugin get Default get Label Provider disconnect this super dispose  inputFileListener PDEPlugin getWorkspace removeResourceChangeListener inputFileListener inputFileListener PDEPlugin getDefault getLabelProvider
see Editor Part set Focus public void set Focus form set Focus  EditorPart setFocus setFocus setFocus
see Editor Part do Save public void do Save I Progress Monitor monitor  EditorPart doSave doSave IProgressMonitor
see Editor Part do Save As public void do Save As  EditorPart doSaveAs doSaveAs
see Editor Part is Dirty public boolean is Dirty return false  EditorPart isDirty isDirty
see Editor Part is Save As Allowed public boolean is Save As Allowed return false  EditorPart isSaveAsAllowed isSaveAsAllowed
see Editor Part init public void init I Editor Site site I Editor Input input throws Part Init Exception set Site site set Input input input File Listener new Input File Listener PDE Plugin get Workspace add Resource Change Listener input File Listener  EditorPart IEditorSite IEditorInput PartInitException setSite setInput inputFileListener InputFileListener PDEPlugin getWorkspace addResourceChangeListener inputFileListener
display async Exec new Runnable public void run if toolkit null get Site get Page close Editor Sample Editor this false  asyncExec getSite getPage closeEditor SampleEditor
public void close Display display get Site get Shell get Display display async Exec new Runnable public void run if toolkit null get Site get Page close Editor Sample Editor this false  getSite getShell getDisplay asyncExec getSite getPage closeEditor SampleEditor

public Sample Operation I Configuration Element sample String project Names I Overwrite Query query this sample sample this query query this project Names project Names  SampleOperation IConfigurationElement projectNames IOverwriteQuery projectNames projectNames
public I File get Sample Manifest return sample Manifest  IFile getSampleManifest sampleManifest
public I Project get Created Projects return created Projects  IProject getCreatedProjects createdProjects
I Workspace Runnable op new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception I Configuration Element projects sample get Children project NON NLS 1 monitor begin Task PDE Plugin get Resource String Sample Operation creating 4 projects length NON NLS 1 created Projects new I Project projects length try for int i 0 i projects length i I File file import Project project Names i projects i new Sub Progress Monitor monitor 4 if file null sample Manifest null sample Manifest file if file null created Projects i file get Project catch Interrupted Exception e throw new Operation Canceled Exception catch Invocation Target Exception e throw Core Exception e  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException IConfigurationElement getChildren beginTask PDEPlugin getResourceString SampleOperation createdProjects IProject IFile importProject projectNames SubProgressMonitor sampleManifest sampleManifest createdProjects getProject InterruptedException OperationCanceledException InvocationTargetException throwCoreException
public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I Workspace Runnable op new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception I Configuration Element projects sample get Children project NON NLS 1 monitor begin Task PDE Plugin get Resource String Sample Operation creating 4 projects length NON NLS 1 created Projects new I Project projects length try for int i 0 i projects length i I File file import Project project Names i projects i new Sub Progress Monitor monitor 4 if file null sample Manifest null sample Manifest file if file null created Projects i file get Project catch Interrupted Exception e throw new Operation Canceled Exception catch Invocation Target Exception e throw Core Exception e PDE Plugin get Workspace run op monitor catch Core Exception e throw new Invocation Target Exception e catch Operation Canceled Exception e throw e finally monitor done  IProgressMonitor InvocationTargetException InterruptedException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException IConfigurationElement getChildren beginTask PDEPlugin getResourceString SampleOperation createdProjects IProject IFile importProject projectNames SubProgressMonitor sampleManifest sampleManifest createdProjects getProject InterruptedException OperationCanceledException InvocationTargetException throwCoreException PDEPlugin getWorkspace CoreException InvocationTargetException OperationCanceledException
private void throw Core Exception Invocation Target Exception e throws Core Exception Throwable t e get Cause Status status new Status I Status ERROR PDE Plugin PLUGIN ID I Status OK e get Message t throw new Core Exception status  throwCoreException InvocationTargetException CoreException getCause IStatus PDEPlugin PLUGIN_ID IStatus getMessage CoreException
private I File import Project String name I Configuration Element config I Progress Monitor monitor throws Core Exception Invocation Target Exception Interrupted Exception String path config get Attribute archive NON NLS 1 if name null path null return null I Workspace workspace PDE Plugin get Workspace I Workspace Root root workspace get Root I Project project root get Project name boolean skip false if project exists if no To All skip true else String return Id query query Overwrite project get Full Path to String if return Id equals I Overwrite Query NO ALL no To All true skip true else if return Id equals I Overwrite Query NO skip true if skip project delete true true new Sub Progress Monitor monitor 1 project root get Project name else monitor worked 1 if skip monitor worked 3 I File manifest project get File SAMPLE PROPERTIES return manifest project create new Sub Progress Monitor monitor 1 project open new Null Progress Monitor Zip File zip File get Zip File From Plugin Dir path sample get Declaring Extension get Declaring Plugin Descriptor import Files From Zip zip File project get Full Path new Sub Progress Monitor monitor 1 return create Sample Manifest project config new Sub Progress Monitor monitor 1  IFile importProject IConfigurationElement IProgressMonitor CoreException InvocationTargetException InterruptedException getAttribute IWorkspace PDEPlugin getWorkspace IWorkspaceRoot getRoot IProject getProject noToAll returnId queryOverwrite getFullPath toString returnId IOverwriteQuery NO_ALL noToAll returnId IOverwriteQuery SubProgressMonitor getProject IFile getFile SAMPLE_PROPERTIES SubProgressMonitor NullProgressMonitor ZipFile zipFile getZipFileFromPluginDir getDeclaringExtension getDeclaringPluginDescriptor importFilesFromZip zipFile getFullPath SubProgressMonitor createSampleManifest SubProgressMonitor
private I File create Sample Manifest I Project project I Configuration Element config I Progress Monitor monitor throws Core Exception I File file project get File SAMPLE PROPERTIES if file exists try Byte Array Output Stream out new Byte Array Output Stream Properties properties new Properties create Sample Manifest Content config get Attribute name properties NON NLS 1 properties store out NON NLS 1 out flush String contents out to String out close Byte Array Input Stream stream new Byte Array Input Stream contents get Bytes UTF8 NON NLS 1 file create stream true monitor stream close catch Unsupported Encoding Exception e catch IO Exception e return file  IFile createSampleManifest IProject IConfigurationElement IProgressMonitor CoreException IFile getFile SAMPLE_PROPERTIES ByteArrayOutputStream ByteArrayOutputStream createSampleManifestContent getAttribute toString ByteArrayInputStream ByteArrayInputStream getBytes UnsupportedEncodingException IOException
private void create Sample Manifest Content String project Name Properties properties write Property properties id sample get Attribute id NON NLS 1 NON NLS 2 write Property properties name sample get Attribute name NON NLS 1 NON NLS 2 write Property properties project Name project Name NON NLS 1 write Property properties launcher sample get Attribute launcher NON NLS 1 NON NLS 2 I Configuration Element desc sample get Children description NON NLS 1 if desc length 1 write Property properties help Href desc 0 NON NLS 1 get Attribute help Href NON NLS 1 write Property properties description desc 0 get Value NON NLS 1  createSampleManifestContent projectName writeProperty getAttribute writeProperty getAttribute writeProperty projectName projectName writeProperty getAttribute IConfigurationElement getChildren writeProperty helpHref getAttribute helpHref writeProperty getValue
private void write Property Properties properties String name String value if value null return properties set Property name value  writeProperty setProperty
private Zip File get Zip File From Plugin Dir String plugin Relative Path I Plugin Descriptor plugin Descriptor throws Core Exception try URL starterURL new URL plugin Descriptor get InstallURL plugin Relative Path return new Zip File Platform as LocalURL starterURL get File catch IO Exception e String message plugin Relative Path e get Message NON NLS 1 Status status new Status I Status ERROR PDE Plugin get Plugin Id I Status ERROR message e throw new Core Exception status  ZipFile getZipFileFromPluginDir pluginRelativePath IPluginDescriptor pluginDescriptor CoreException pluginDescriptor getInstallURL pluginRelativePath ZipFile asLocalURL getFile IOException pluginRelativePath getMessage IStatus PDEPlugin getPluginId IStatus CoreException
private void import Files From Zip Zip File src Zip File I Path dest Path I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception Zip File Structure Provider structure Provider new Zip File Structure Provider src Zip File Import Operation op new Import Operation dest Path structure Provider get Root structure Provider query op run monitor  importFilesFromZip ZipFile srcZipFile IPath destPath IProgressMonitor InvocationTargetException InterruptedException ZipFileStructureProvider structureProvider ZipFileStructureProvider srcZipFile ImportOperation ImportOperation destPath structureProvider getRoot structureProvider

public Sample Standby Content default Shortcut new Runtime Workbench Shortcut PDE Plugin get Default get Label Provider connect this  SampleStandbyContent defaultShortcut RuntimeWorkbenchShortcut PDEPlugin getDefault getLabelProvider
SWT NULL more Link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e if helpURL null Workbench Help display Help Resource helpURL  moreLink addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent WorkbenchHelp displayHelpResource
inst Text add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e Object href e get Href if href equals help NON NLS 1 Workbench Help display Help Resource helpURL else if href equals browse NON NLS 1 do Browse else if href equals run NON NLS 1 do Run launcher launch Target false else if href equals debug NON NLS 1 do Run launcher launch Target true  instText addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent getHref WorkbenchHelp displayHelpResource doBrowse doRun launchTarget doRun launchTarget
public void create Part Control Composite parent Form Toolkit toolkit form toolkit create Scrolled Form parent form set Background Image PDE Plugin get Default get Label Provider get PDE Plugin Images DESC FORM BANNER Table Wrap Layout layout new Table Wrap Layout layout vertical Spacing 10 layout top Margin 10 layout bottom Margin 10 layout left Margin 10 layout right Margin 10 form get Body set Layout layout desc Text toolkit create Form Text form get Body true desc Text set Layout Data new Table Wrap Data Table Wrap Data FILL GRAB desc Text set Text false false NON NLS 1 more Link toolkit create Hyperlink form get Body Read More NON NLS 1 SWT NULL more Link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e if helpURL null Workbench Help display Help Resource helpURL inst Text toolkit create Form Text form get Body true inst Text set Layout Data new Table Wrap Data Table Wrap Data FILL GRAB String Buffer buf new String Buffer buf append PDE Plugin get Resource String Sample Standby Content content NON NLS 1 inst Text set Text buf to String true false inst Text add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e Object href e get Href if href equals help NON NLS 1 Workbench Help display Help Resource helpURL else if href equals browse NON NLS 1 do Browse else if href equals run NON NLS 1 do Run launcher launch Target false else if href equals debug NON NLS 1 do Run launcher launch Target true inst Text set Image run PDE Plugin get Default get Label Provider get NON NLS 1 PDE Plugin Images DESC RUN EXC inst Text set Image debug PDE Plugin get Default get Label Provider NON NLS 1 get PDE Plugin Images DESC DEBUG EXC inst Text set Image help PlatformUI get Workbench get Shared Images NON NLS 1 get Image I Shared Images IMG OBJS INFO TSK  createPartControl FormToolkit createScrolledForm setBackgroundImage PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_FORM_BANNER TableWrapLayout TableWrapLayout verticalSpacing topMargin bottomMargin leftMargin rightMargin getBody setLayout descText createFormText getBody descText setLayoutData TableWrapData TableWrapData FILL_GRAB descText setText moreLink createHyperlink getBody moreLink addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent WorkbenchHelp displayHelpResource instText createFormText getBody instText setLayoutData TableWrapData TableWrapData FILL_GRAB StringBuffer StringBuffer PDEPlugin getResourceString SampleStandbyContent instText setText toString instText addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent getHref WorkbenchHelp displayHelpResource doBrowse doRun launchTarget doRun launchTarget instText setImage PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_RUN_EXC instText setImage PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_DEBUG_EXC instText setImage getWorkbench getSharedImages getImage ISharedImages IMG_OBJS_INFO_TSK
Busy Indicator show While form get Display new Runnable public void run fshortcut launch selection debug I Launch Manager DEBUG MODE I Launch Manager RUN MODE  BusyIndicator showWhile getDisplay ILaunchManager DEBUG_MODE ILaunchManager RUN_MODE
private void do Run String launcher String target final boolean debug I Launch Shortcut shortcut default Shortcut final I Selection selection if target null selection new Structured Selection else selection new Structured Selection final I Launch Shortcut fshortcut shortcut Busy Indicator show While form get Display new Runnable public void run fshortcut launch selection debug I Launch Manager DEBUG MODE I Launch Manager RUN MODE  doRun ILaunchShortcut defaultShortcut ISelection StructuredSelection StructuredSelection ILaunchShortcut BusyIndicator showWhile getDisplay ILaunchManager DEBUG_MODE ILaunchManager RUN_MODE
private void do Browse I Workspace Root root PDE Plugin get Workspace get Root I Project projects root get Projects I Set Selection Target target find Target if target null return String sid sample get Attribute id NON NLS 1 if sid null return Array List items new Array List for int i 0 i projects length i I Project project projects i if project exists project is Open continue I File pfile project get File sample properties NON NLS 1 if pfile exists try Input Stream is pfile get Contents Properties prop new Properties prop load is is close String id prop get Property id NON NLS 1 if id null id equals sid match I Resource res find Select Reveal project prop get Property project Name NON NLS 1 if res null items add res catch IO Exception e PDE Plugin log Exception e catch Core Exception e PDE Plugin log Exception e if items size 0 target select Reveal new Structured Selection items  doBrowse IWorkspaceRoot PDEPlugin getWorkspace getRoot IProject getProjects ISetSelectionTarget findTarget getAttribute ArrayList ArrayList IProject isOpen IFile getFile InputStream getContents getProperty IResource findSelectReveal getProperty projectName IOException PDEPlugin logException CoreException PDEPlugin logException selectReveal StructuredSelection
private I Set Selection Target find Target String id sample get Attribute target View Id NON NLS 1 if id null return null I View Part view PDE Plugin get Active Page find View id if view null view instanceof I Set Selection Target return null return I Set Selection Target view  ISetSelectionTarget findTarget getAttribute targetViewId IViewPart PDEPlugin getActivePage findView ISetSelectionTarget ISetSelectionTarget
private I Resource find Select Reveal I Project project String original Name I Configuration Element projects sample get Children project NON NLS 1 for int i 0 i projects length i if original Name equals projects i get Attribute name NON NLS 1 String path projects i get Attribute select Reveal NON NLS 1 if path null continue I Resource res project find Member path if res exists return res return null  IResource findSelectReveal IProject originalName IConfigurationElement getChildren originalName getAttribute getAttribute selectReveal IResource findMember
see org eclipse ui intro internal parts I Standby Content Part get Control public Control get Control return form  IStandbyContentPart getControl getControl
see org eclipse ui intro internal parts I Standby Content Part init org eclipse ui intro I Intro Part public void init I Intro Part intro Part  IStandbyContentPart IIntroPart IIntroPart introPart
public void set Input Object input if the new input is null use cached input from momento if input null this input String input String sample Id this input to String I Configuration Element samples Platform get Extension Registry get Configuration Elements For org eclipse pde ui samples NON NLS 1 for int i 0 i samples length i I Configuration Element sample samples i String id sample get Attribute id NON NLS 1 if id null id equals sample Id update sample return update null  setInput sampleId toString IConfigurationElement getExtensionRegistry getConfigurationElementsFor IConfigurationElement getAttribute sampleId
private void update I Configuration Element sample this sample sample if form null return String title sample null sample get Attribute name NON NLS 1 NON NLS 2 form set Text title if sample null launcher sample get Attribute launcher NON NLS 1 launch Target sample get Attribute launch Target NON NLS 1 else launcher null launch Target null I Configuration Element desc Config sample null sample get Children description null NON NLS 1 if desc Config length 1 String desc desc Config 0 get Value String content PDE Plugin get Formatted Message Sample Standby Content desc desc null desc NON NLS 1 NON NLS 2 helpURL desc Config 0 get Attribute help Href NON NLS 1 more Link set Visible helpURL null desc Text set Text content true false else more Link set Visible false desc Text set Text false false NON NLS 1 form reflow true  IConfigurationElement getAttribute setText getAttribute launchTarget getAttribute launchTarget launchTarget IConfigurationElement descConfig getChildren descConfig descConfig getValue PDEPlugin getFormattedMessage SampleStandbyContent descConfig getAttribute helpHref moreLink setVisible descText setText moreLink setVisible descText setText
see org eclipse ui intro internal parts I Standby Content Part set Focus public void set Focus form set Focus  IStandbyContentPart setFocus setFocus setFocus
see org eclipse ui intro internal parts I Standby Content Part dispose public void dispose PDE Plugin get Default get Label Provider disconnect this  IStandbyContentPart PDEPlugin getDefault getLabelProvider
public void init I Intro Part intro Part I Memento memento try to restore last state input get Cached Input memento  IIntroPart introPart IMemento getCachedInput
Tries to create the last content part viewed based on sample id param memento return private String get Cached Input I Memento memento if memento null return null return memento get String MEMENTO SAMPLE ID ATT  getCachedInput IMemento getString MEMENTO_SAMPLE_ID_ATT
public void save State I Memento memento String current Sample Id input if input null memento put String MEMENTO SAMPLE ID ATT current Sample Id  saveState IMemento currentSampleId putString MEMENTO_SAMPLE_ID_ATT currentSampleId

private class Import Overwrite Query implements I Overwrite Query public String query Overwrite String file String return Codes YES NO ALL CANCEL int return Val open Dialog file return return Val 0 CANCEL return Codes return Val  ImportOverwriteQuery IOverwriteQuery queryOverwrite returnCodes returnVal openDialog returnVal returnCodes returnVal
get Shell get Display sync Exec new Runnable public void run String title PDE Plugin get Resource String Sample Wizard title NON NLS 1 String msg PDE Plugin get Formatted Message Sample Wizard overwrite file NON NLS 1 String options I Dialog Constants YES LABEL I Dialog Constants NO LABEL I Dialog Constants YES TO ALL LABEL I Dialog Constants CANCEL LABEL Message Dialog dialog new Message Dialog get Shell title null msg Message Dialog QUESTION options 0 result 0 dialog open  getShell getDisplay syncExec PDEPlugin getResourceString SampleWizard PDEPlugin getFormattedMessage SampleWizard IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants YES_TO_ALL_LABEL IDialogConstants CANCEL_LABEL MessageDialog MessageDialog getShell MessageDialog
private int open Dialog final String file final int result I Dialog Constants CANCEL ID get Shell get Display sync Exec new Runnable public void run String title PDE Plugin get Resource String Sample Wizard title NON NLS 1 String msg PDE Plugin get Formatted Message Sample Wizard overwrite file NON NLS 1 String options I Dialog Constants YES LABEL I Dialog Constants NO LABEL I Dialog Constants YES TO ALL LABEL I Dialog Constants CANCEL LABEL Message Dialog dialog new Message Dialog get Shell title null msg Message Dialog QUESTION options 0 result 0 dialog open return result 0  openDialog IDialogConstants CANCEL_ID getShell getDisplay syncExec PDEPlugin getResourceString SampleWizard PDEPlugin getFormattedMessage SampleWizard IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants YES_TO_ALL_LABEL IDialogConstants CANCEL_LABEL MessageDialog MessageDialog getShell MessageDialog
The default constructor public Sample Wizard PDE Plugin get Default get Label Provider connect this set Default Page Image Descriptor PDE Plugin Images DESC NEWEXP WIZ samples Platform get Extension Registry get Configuration Elements For org eclipse pde ui samples NON NLS 1 names Page new Project Names Page this last Page new Review Page this set Needs Progress Monitor true  SampleWizard PDEPlugin getDefault getLabelProvider setDefaultPageImageDescriptor PDEPluginImages DESC_NEWEXP_WIZ getExtensionRegistry getConfigurationElementsFor namesPage ProjectNamesPage lastPage ReviewPage setNeedsProgressMonitor
set Needs Progress Monitor true public void dispose PDE Plugin get Default get Label Provider disconnect this super dispose  setNeedsProgressMonitor PDEPlugin getDefault getLabelProvider
super dispose public I Configuration Element get Samples return samples  IConfigurationElement getSamples
public void add Pages if selection null add Page new Selection Page this add Page names Page add Page last Page  addPages addPage SelectionPage addPage namesPage addPage lastPage
public boolean perform Finish try String persp Id selection get Attribute perspective Id NON NLS 1 I Workbench Page page PDE Plugin get Active Page if persp Id null switch Perspective PlatformUI get Workbench show Perspective persp Id page get Workbench Window Sample Operation op new Sample Operation selection names Page get Project Names new Import Overwrite Query get Container run true true op I File sample Manifest op get Sample Manifest this created Projects op get Created Projects if select Reveal Enabled select Reveal get Shell if activities Enabled enable Activities if sample Editor Needed sample Manifest null IDE open Editor page sample Manifest true catch Invocation Target Exception e PDE Plugin log Exception e return false catch Interrupted Exception e PDE Plugin log Exception e return false catch Core Exception e PDE Plugin log Exception e return false catch Operation Canceled Exception e return false return true  performFinish perspId getAttribute perspectiveId IWorkbenchPage PDEPlugin getActivePage perspId switchPerspective getWorkbench showPerspective perspId getWorkbenchWindow SampleOperation SampleOperation namesPage getProjectNames ImportOverwriteQuery getContainer IFile sampleManifest getSampleManifest createdProjects getCreatedProjects selectRevealEnabled selectReveal getShell activitiesEnabled enableActivities sampleEditorNeeded sampleManifest openEditor sampleManifest InvocationTargetException PDEPlugin logException InterruptedException PDEPlugin logException CoreException PDEPlugin logException OperationCanceledException
public void select Reveal Shell shell shell get Display async Exec new Runnable public void run do Select Reveal  selectReveal getDisplay asyncExec doSelectReveal
private void do Select Reveal if selection null created Projects null return String view Id selection get Attribute target View Id NON NLS 1 if view Id null return I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null return I Workbench Page page window get Active Page if page null return I View Part view page find View view Id if view null view instanceof I Set Selection Target return I Set Selection Target target I Set Selection Target view I Configuration Element projects selection get Children project NON NLS 1 Array List items new Array List for int i 0 i projects length i String path projects i get Attribute select Reveal NON NLS 1 if path null continue I Resource resource created Projects i find Member path if resource exists items add resource if items size 0 target select Reveal new Structured Selection items  doSelectReveal createdProjects viewId getAttribute targetViewId viewId IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IWorkbenchPage getActivePage IViewPart findView viewId ISetSelectionTarget ISetSelectionTarget ISetSelectionTarget IConfigurationElement getChildren ArrayList ArrayList getAttribute selectReveal IResource createdProjects findMember selectReveal StructuredSelection
public void enable Activities I Configuration Element elements selection get Children activity NON NLS 1 Hash Set activities To Enable new Hash Set I Workbench Activity Support workbench Activity Support PlatformUI get Workbench get Activity Support for int i 0 i elements length i I Configuration Element element elements i String id element get Attribute id NON NLS 1 if id null continue activities To Enable add id Hash Set set new Hash Set workbench Activity Support get Activity Manager get Enabled Activity Ids set add All activities To Enable workbench Activity Support set Enabled Activity Ids set  enableActivities IConfigurationElement getChildren HashSet activitiesToEnable HashSet IWorkbenchActivitySupport workbenchActivitySupport getWorkbench getActivitySupport IConfigurationElement getAttribute activitiesToEnable HashSet HashSet workbenchActivitySupport getActivityManager getEnabledActivityIds addAll activitiesToEnable workbenchActivitySupport setEnabledActivityIds
public void set Initialization Data I Configuration Element config String property Name Object data throws Core Exception String variable data null data instanceof String data to String null if variable null for int i 0 i samples length i I Configuration Element element samples i String id element get Attribute id NON NLS 1 if id null id equals variable set Selection element break  setInitializationData IConfigurationElement propertyName CoreException toString IConfigurationElement getAttribute setSelection
public void init I Workbench workbench I Structured Selection selection  IWorkbench IStructuredSelection
return Returns the selection public I Configuration Element get Selection return selection  IConfigurationElement getSelection
param selection The selection to set public void set Selection I Configuration Element selection this selection selection  setSelection IConfigurationElement
return Returns the sample Editor Needed public boolean is Sample Editor Needed return sample Editor Needed  sampleEditorNeeded isSampleEditorNeeded sampleEditorNeeded
param sample Editor Needed The sample Editor Needed to set public void set Sample Editor Needed boolean sample Editor Needed this sample Editor Needed sample Editor Needed  sampleEditorNeeded sampleEditorNeeded setSampleEditorNeeded sampleEditorNeeded sampleEditorNeeded sampleEditorNeeded
return Returns the switch Perspective todo Generated comment public boolean is Switch Perspective return switch Perspective  switchPerspective isSwitchPerspective switchPerspective
param switch Perspective The switch Perspective to set todo Generated comment public void set Switch Perspective boolean switch Perspective this switch Perspective switch Perspective  switchPerspective switchPerspective setSwitchPerspective switchPerspective switchPerspective switchPerspective
return Returns the select Reveal Enabled todo Generated comment public boolean is Select Reveal Enabled return select Reveal Enabled  selectRevealEnabled isSelectRevealEnabled selectRevealEnabled
param select Reveal Enabled The select Reveal Enabled to set todo Generated comment public void set Select Reveal Enabled boolean select Reveal Enabled this select Reveal Enabled select Reveal Enabled  selectRevealEnabled selectRevealEnabled setSelectRevealEnabled selectRevealEnabled selectRevealEnabled selectRevealEnabled
return Returns the activities Enabled todo Generated comment public boolean get Activities Enabled return activities Enabled  activitiesEnabled getActivitiesEnabled activitiesEnabled
param activities Enabled The activities Enabled to set todo Generated comment public void set Activities Enabled boolean activities Enabled this activities Enabled activities Enabled  activitiesEnabled activitiesEnabled setActivitiesEnabled activitiesEnabled activitiesEnabled activitiesEnabled

class Selection Part extends Table Part public Selection Part super new String More Info NON NLS 1  SelectionPart TablePart SelectionPart
super new String More Info NON NLS 1 protected void button Selected Button button int index if index 0 do More Info  buttonSelected doMoreInfo
protected void selection Changed I Structured Selection selection update Selection selection  selectionChanged IStructuredSelection updateSelection
update Selection selection protected void handle Double Click I Structured Selection selection  updateSelection handleDoubleClick IStructuredSelection
class Sample Provider extends Default Content Provider implements I Structured Content Provider public Object get Elements Object input return wizard get Samples  SampleProvider DefaultContentProvider IStructuredContentProvider getElements getSamples
class Sample Label Provider extends Label Provider private Image image public Sample Label Provider image PDE Plugin get Default get Label Provider get PDE Plugin Images DESC NEWEXP TOOL  SampleLabelProvider LabelProvider SampleLabelProvider PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_NEWEXP_TOOL
image PDE Plugin get Default get Label Provider get PDE Plugin Images DESC NEWEXP TOOL public String get Text Object obj I Configuration Element sample I Configuration Element obj return sample get Attribute name NON NLS 1  PDEPlugin getDefault getLabelProvider PDEPluginImages DESC_NEWEXP_TOOL getText IConfigurationElement IConfigurationElement getAttribute
return sample get Attribute name NON NLS 1 public Image get Image Object obj return image  getAttribute getImage
param page Name public Selection Page Sample Wizard wizard super selection NON NLS 1 this wizard wizard set Title PDE Plugin get Resource String Selection Page title NON NLS 1 set Description PDE Plugin get Resource String Selection Page desc NON NLS 1 part new Selection Part  pageName SelectionPage SampleWizard setTitle PDEPlugin getResourceString SelectionPage setDescription PDEPlugin getResourceString SelectionPage SelectionPart
public void create Control Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout container set Layout layout layout num Columns 2 part set Minimum Size 300 300 part create Control container SWT H SCROLL SWT V SCROLL SWT BORDER 2 null part get Table Viewer set Content Provider new Sample Provider part get Table Viewer set Label Provider new Sample Label Provider desc new Text container SWT MULTI SWT BORDER SWT WRAP SWT V SCROLL Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd height Hint 64 desc set Layout Data gd part get Table Viewer set Input this update Selection null set Control container  createControl GridLayout GridLayout setLayout numColumns setMinimumSize createControl H_SCROLL V_SCROLL getTableViewer setContentProvider SampleProvider getTableViewer setLabelProvider SampleLabelProvider V_SCROLL GridData GridData GridData FILL_HORIZONTAL heightHint setLayoutData getTableViewer setInput updateSelection setControl
private void do More Info if wizard get Selection null I Configuration Element desc wizard get Selection get Children description NON NLS 1 String help Href desc 0 get Attribute help Href NON NLS 1 Workbench Help display Help Resource help Href  doMoreInfo getSelection IConfigurationElement getSelection getChildren helpHref getAttribute helpHref WorkbenchHelp displayHelpResource helpHref
private void update Selection I Structured Selection selection if selection null desc set Text NON NLS 1 part set Button Enabled 0 false set Page Complete false else I Configuration Element sample I Configuration Element selection get First Element String text NON NLS 1 String help Href null I Configuration Element sample Desc sample get Children description NON NLS 1 if sample Desc length 1 text sample Desc 0 get Value help Href sample Desc 0 get Attribute help Href NON NLS 1 desc set Text text part set Button Enabled 0 help Href null wizard set Selection sample set Page Complete true  updateSelection IStructuredSelection setText setButtonEnabled setPageComplete IConfigurationElement IConfigurationElement getFirstElement helpHref IConfigurationElement sampleDesc getChildren sampleDesc sampleDesc getValue helpHref sampleDesc getAttribute helpHref setText setButtonEnabled helpHref setSelection setPageComplete

private String sample Id public Show Sample Action  sampleId ShowSampleAction
public void run I Intro Site site Properties params sample Id params get Property id NON NLS 1 if sample Id null return if ensure Sample Feature Present return Sample Wizard wizard new Sample Wizard try wizard set Initialization Data null class sample Id NON NLS 1 wizard set Sample Editor Needed false wizard set Switch Perspective false wizard set Select Reveal Enabled false wizard set Activities Enabled false Wizard Dialog dialog new Wizard Dialog PDE Plugin get Active Workbench Shell wizard dialog create dialog get Shell set Text PDE Plugin get Resource String Show Sample Action title NON NLS 1 dialog get Shell set Size 400 500 if dialog open Wizard Dialog OK switch To Sample Standby wizard catch Core Exception e PDE Plugin log Exception e  IIntroSite sampleId getProperty sampleId ensureSampleFeaturePresent SampleWizard SampleWizard setInitializationData sampleId setSampleEditorNeeded setSwitchPerspective setSelectRevealEnabled setActivitiesEnabled WizardDialog WizardDialog PDEPlugin getActiveWorkbenchShell getShell setText PDEPlugin getResourceString ShowSampleAction getShell setSize WizardDialog switchToSampleStandby CoreException PDEPlugin logException
private void switch To Sample Standby Sample Wizard wizard String Buffer url new String Buffer url append http org eclipse ui intro show Standby NON NLS 1 url append plugin Id org eclipse pde ui NON NLS 1 url append NON NLS 1 url append part Id org eclipse pde ui sample Standby Part NON NLS 1 url append NON NLS 1 url append input NON NLS 1 url append sample Id I IntroURL introURL IntroURL Factory create IntroURL url to String if introURL null introURL execute ensure Proper Context wizard  switchToSampleStandby SampleWizard StringBuffer StringBuffer showStandby pluginId partId sampleStandbyPart sampleId IIntroURL IntroURLFactory createIntroURL toString ensureProperContext
private void ensure Proper Context Sample Wizard wizard I Configuration Element sample wizard get Selection String persp Id sample get Attribute perspective Id NON NLS 1 if persp Id null try wizard enable Activities PlatformUI get Workbench show Perspective persp Id PDE Plugin get Active Workbench Window wizard select Reveal PDE Plugin get Active Workbench Shell catch Workbench Exception e PDE Plugin log Exception e enable Activities sample  ensureProperContext SampleWizard IConfigurationElement getSelection perspId getAttribute perspectiveId perspId enableActivities getWorkbench showPerspective perspId PDEPlugin getActiveWorkbenchWindow selectReveal PDEPlugin getActiveWorkbenchShell WorkbenchException PDEPlugin logException enableActivities
enable Activities sample private void enable Activities I Configuration Element sample  enableActivities enableActivities IConfigurationElement
private boolean ensure Sample Feature Present if check Feature return true the feature is not present ask to download if Message Dialog open Question PDE Plugin get Active Workbench Shell PDE Plugin get Resource String Show Sample Action msg Title NON NLS 1 PDE Plugin get Resource String Show Sample Action msg Desc NON NLS 1 return download Feature return false  ensureSampleFeaturePresent checkFeature MessageDialog openQuestion PDEPlugin getActiveWorkbenchShell PDEPlugin getResourceString ShowSampleAction msgTitle PDEPlugin getResourceString ShowSampleAction msgDesc downloadFeature
private boolean check Feature I Platform Configuration config Configurator Utils get Current Platform Configuration I Platform Configuration I Feature Entry features config get Configured Feature Entries Plugin Version Identifier sample Version new Plugin Version Identifier SAMPLE FEATURE VERSION for int i 0 i features length i String id features i get Feature Identifier if SAMPLE FEATURE ID equals id String version features i get Feature Version Plugin Version Identifier fversion new Plugin Version Identifier version if fversion is Compatible With sample Version return true return false  checkFeature IPlatformConfiguration ConfiguratorUtils getCurrentPlatformConfiguration IPlatformConfiguration IFeatureEntry getConfiguredFeatureEntries PluginVersionIdentifier sampleVersion PluginVersionIdentifier SAMPLE_FEATURE_VERSION getFeatureIdentifier SAMPLE_FEATURE_ID getFeatureVersion PluginVersionIdentifier PluginVersionIdentifier isCompatibleWith sampleVersion
I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try Install Command command new Install Command SAMPLE FEATURE ID SAMPLE FEATURE VERSION UPDATE SITE null false NON NLS 1 command run monitor command apply Changes Now catch Exception e throw new Invocation Target Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InstallCommand InstallCommand SAMPLE_FEATURE_ID SAMPLE_FEATURE_VERSION UPDATE_SITE applyChangesNow InvocationTargetException
private boolean download Feature I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try Install Command command new Install Command SAMPLE FEATURE ID SAMPLE FEATURE VERSION UPDATE SITE null false NON NLS 1 command run monitor command apply Changes Now catch Exception e throw new Invocation Target Exception e try PlatformUI get Workbench get Progress Service busy Cursor While op catch Invocation Target Exception e PDE Plugin log Exception e return false catch Interrupted Exception e PDE Plugin log Exception e return true  downloadFeature IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InstallCommand InstallCommand SAMPLE_FEATURE_ID SAMPLE_FEATURE_VERSION UPDATE_SITE applyChangesNow InvocationTargetException getWorkbench getProgressService busyCursorWhile InvocationTargetException PDEPlugin logException InterruptedException PDEPlugin logException

public interface I Plugin Content Wizard extends I Base Plugin Wizard Initializes the wizard with the data collected from the parent wizard pages The data can be used to customize the generated content param data all the information collected in the parent wizard that can be used in configuring the generated content  IPluginContentWizard IBasePluginWizard
void init I Field Data data Returns new dependencies that are required by this wizard If the wizard adds extensions or code to the plug in that depend on other plug ins it must report it by returning a reference to that plug in This information will be used to compose a correct list of plug in dependencies so that the plug in compiles without errors in the first build after creation param schema Version version of the plug in manifest or samp null samp if older manifest prior to 3 0 has been created Depending on the manifest version the list of dependencies may vary return the array of plug in dependencies required by this wizard  IFieldData schemaVersion
I Plugin Reference get Dependencies String schema Version The wizard is required to return an array of new file and folder names that are generated by it for the purpose of inclusion in code build properties code file All files and folders that must be part of the binary build must be listed in code bin includes code variable Since the tokens obtained by this method will be passed to the variable as is it is legal to use all wild cards also legal in code build properties such as gif return  IPluginReference getDependencies schemaVersion
Executes the wizard when Finish button has been pressed Note that you should put all your working code in this method and not in perform Finish of the Wizard class due to the wrong calling order In addition this method provides progress monitor so that the execution of the content wizard can be reported as a part of the overall new project creation operation param project the newly created plug in project handle param model the model of the plug in manifest that can be used to add extension markup param monitor the progress monitor to track progress of the content generation return code true code if the content has been generated successfully code false code otherwise In case of failure the wizard dialog will stay open boolean perform Finish I Project project I Plugin Model Base model  performFinish performFinish IProject IPluginModelBase

public interface I Plugin Field Data extends I Field Data The class name field return the name of the plug in class  IPluginFieldData IFieldData
String get Classname UI plug in selection return code true code if the plug in contains UI code and extensions code false code otherwise  getClassname
boolean isUI Plugin Plug in class generation selection return code true code if the plug in class is to be generated by the plug in wizard code false code otherwise  isUIPlugin

private I Field Data data Creates a new template wizard public Abstract New Plugin Template Wizard super set Dialog Settings PDE Plugin get Default get Dialog Settings set Default Page Image Descriptor PDE Plugin Images DESC NEWEXPRJ WIZ set Needs Progress Monitor true  IFieldData AbstractNewPluginTemplateWizard setDialogSettings PDEPlugin getDefault getDialogSettings setDefaultPageImageDescriptor PDEPluginImages DESC_NEWEXPRJ_WIZ setNeedsProgressMonitor
see org eclipse pde ui I Plugin Content Wizard init I Field Data public void init I Field Data data this data data set Window Title PDE Plugin get Resource String KEY WTITLE  IPluginContentWizard IFieldData IFieldData setWindowTitle PDEPlugin getResourceString KEY_WTITLE
Returns the field data passed to the wizard during the initialization return the parent wizard field data public I Field Data get Data return data  IFieldData getData
This wizard adds a mandatory first page Subclasses implement this method to add additional pages to the wizard 
protected abstract void add Additional Pages Implements wizard method Subclasses cannot override it public final void add Pages add Additional Pages  addAdditionalPages addPages addAdditionalPages
see org eclipse jface wizard Wizard perform Finish public boolean perform Finish do nothing all the work is in the other perform Finish return true  performFinish performFinish performFinish
Implements the interface method by looping through template sections and executing them sequentially param project the project param model the plug in model param monitor the progress monitor to track the execution progress as part of the overall new project creation operation return code true code if the wizard completed the operation with success code false code otherwise public boolean perform Finish I Project project I Plugin Model Base model I Progress Monitor monitor try I Template Section sections get Template Sections monitor begin Task sections length NON NLS 1 for int i 0 i sections length i sections i execute project model new Sub Progress Monitor monitor 1 No reason to do this any more with the new editors save Template File project null catch Core Exception e PDE Plugin log Exception e return false finally monitor done return true  performFinish IProject IPluginModelBase IProgressMonitor ITemplateSection getTemplateSections beginTask SubProgressMonitor saveTemplateFile CoreException PDEPlugin logException
Returns the template sections used in this wizard return the array of template sections 
public abstract I Template Section get Template Sections see org eclipse pde ui I Plugin Content Wizard get Dependencies String public I Plugin Reference get Dependencies String schema Version Array List result new Array List I Template Section sections get Template Sections for int i 0 i sections length i I Plugin Reference refs sections i get Dependencies schema Version for int j 0 j refs length j if result contains refs j result add refs j return I Plugin Reference result to Array new I Plugin Reference result size  ITemplateSection getTemplateSections IPluginContentWizard getDependencies IPluginReference getDependencies schemaVersion ArrayList ArrayList ITemplateSection getTemplateSections IPluginReference getDependencies schemaVersion IPluginReference toArray IPluginReference
see org eclipse pde ui I Plugin Content Wizard get New Files public String get New Files Array List result new Array List I Template Section sections get Template Sections for int i 0 i sections length i String new Files sections i get New Files for int j 0 j new Files length j if result contains new Files j result add new Files j return String result to Array new String result size  IPluginContentWizard getNewFiles getNewFiles ArrayList ArrayList ITemplateSection getTemplateSections newFiles getNewFiles newFiles newFiles newFiles toArray

private boolean pages Added false The default implementation of this method provides values of the following keys samp plugin Class samp samp plugin Id samp and samp plugin Name samp see I Template Section get Replacement String String public String get Replacement String String file Name String key if key equals KEY PLUGIN CLASS model null if model instanceof I Plugin Model I Plugin plugin I Plugin model get Plugin Base return plugin get Class Name if key equals KEY PLUGIN ID model null I Plugin Base plugin model get Plugin Base return plugin get Id if key equals KEY PLUGIN NAME model null I Plugin Base plugin model get Plugin Base return plugin get Translated Name return key  pagesAdded pluginClass pluginId pluginName ITemplateSection getReplacementString getReplacementString fileName KEY_PLUGIN_CLASS IPluginModel IPlugin IPlugin getPluginBase getClassName KEY_PLUGIN_ID IPluginBase getPluginBase getId KEY_PLUGIN_NAME IPluginBase getPluginBase getTranslatedName
see I Variable Provider get Value String public Object get Value String key return null  IVariableProvider getValue getValue
see I Template Section get Template Location public URL get Template Location return null  ITemplateSection getTemplateLocation getTemplateLocation
see I Template Section get Description public String get Description return NON NLS 1  ITemplateSection getDescription getDescription
Returns the translated version of the resource string represented by the provided key param key the key of the required resource string return the translated version of the required resource string see get Plugin Resource Bundle public String get Plugin Resource String String key Resource Bundle bundle get Plugin Resource Bundle if bundle null return key try return bundle get String key catch Missing Resource Exception e return key  getPluginResourceBundle getPluginResourceString ResourceBundle getPluginResourceBundle getString MissingResourceException
An abstract method that returns the resource bundle that corresponds to the best match of samp plugin properties samp file for the current locale in case of fragments the file is samp fragment properties samp return resource bundle for plug in properties file or samp null samp if not found 
see I Template Section add Pages I Base Plugin Wizard public void add Pages Wizard wizard  ITemplateSection addPages IBasePluginWizard addPages
Tests if wizard pages for this template section have been added return code true code if wizard pages for this section have been added code false code otherwise public boolean get Pages Added return pages Added  getPagesAdded pagesAdded
Marks that pages have been added to the wizard by this template Call this method in add Pages see add Pages Wizard protected void mark Pages Added pages Added true  addPages addPages markPagesAdded pagesAdded
The default implementation of the interface method The returned value is 1 see I Template Section get Number Of Work Units public int get Number Of Work Units return 1  ITemplateSection getNumberOfWorkUnits getNumberOfWorkUnits
see I Template Section get Dependencies public I Plugin Reference get Dependencies String schema Version return new I Plugin Reference new Plugin Reference org eclipse ui NON NLS 1 null 0  ITemplateSection getDependencies IPluginReference getDependencies schemaVersion IPluginReference PluginReference
Returns the folder with Java files in the target project The default implementation looks for source folders in the classpath of the target folders and picks the first one encountered Subclasses may override this behaviour param monitor progress monitor to use return source folder that will be used to generate Java files or samp null samp if none found protected I Folder get Source Folder I Progress Monitor monitor throws Core Exception I Folder source Folder null try I Java Project java Project Java Core create project I Classpath Entry classpath java Project get Raw Classpath for int i 0 i classpath length i I Classpath Entry entry classpath i if entry get Entry Kind I Classpath Entry CPE SOURCE I Path path entry get Path remove First Segments 1 if path segment Count 0 source Folder project get Folder path break catch Java Model Exception e return source Folder  IFolder getSourceFolder IProgressMonitor CoreException IFolder sourceFolder IJavaProject javaProject JavaCore IClasspathEntry javaProject getRawClasspath IClasspathEntry getEntryKind IClasspathEntry CPE_SOURCE IPath getPath removeFirstSegments segmentCount sourceFolder getFolder JavaModelException sourceFolder
Generates files as part of the template execution The default implementation uses template location as a root of the file templates The files found in the location are processed in the following way ul li Files and folders found in the directory samp bin samp are copied into the target project without modification li li Files found in the directory samp java samp are copied into the Java source folder by creating the folder structure that corresponds to the package name variable samp package Name samp Java files are subject to conditional generation and variable replacement li li All other files and folders are copied directly into the target folder with the conditional generation and variable replacement for files Variable replacement also includes file names li ul param monitor progress monitor to use to indicate generation progress protected void generate Files I Progress Monitor monitor throws Core Exception monitor set Task Name PDE Plugin get Resource String KEY GENERATING File template Directory get Template Directory if template Directory null template Directory exists return generate Files template Directory project true false monitor monitor sub Task NON NLS 1 monitor worked 1  packageName generateFiles IProgressMonitor CoreException setTaskName PDEPlugin getResourceString KEY_GENERATING templateDirectory getTemplateDirectory templateDirectory templateDirectory generateFiles templateDirectory subTask
Tests if the folder found in the template location should be created in the target project Subclasses may use this method to conditionally block creation of the entire directories subject to user choices param source Folder the folder found in the template location that needs to be created return samp true samp if the specified folder should be created in the project or samp false samp to skip it including all subfolders and files it may contain The default implementation is samp true samp param source Folder the folder that is tested return code true code if the provided folder should be created in the workspace code false code if the values of the substitution variables indicate otherwise protected boolean is Ok To Create Folder File source Folder return true  sourceFolder sourceFolder isOkToCreateFolder sourceFolder
Tests if the file found in the template location should be created in the target project Subclasses may use this method to conditionally block createion of the file subject to user choices param source File the file found in the template location that needs to be created return samp true samp if the specified file should be created in the project or samp false samp to skip it The default implementation is samp true samp protected boolean is Ok To Create File File source File return true  sourceFile isOkToCreateFile sourceFile
Subclass must implement this method to add the required entries in the plug in model param monitor the progress monitor to be used protected abstract void update Model I Progress Monitor monitor  updateModel IProgressMonitor
The default implementation of the interface method It will generate required files found in the template location and then call samp update Model samp to add the required manifest entires see I Template Section execute I Project I Plugin Model Base I Progress Monitor public void execute I Project project I Plugin Model Base model I Progress Monitor monitor throws Core Exception this project project this model model generate Files monitor update Model monitor  updateModel ITemplateSection IProject IPluginModelBase IProgressMonitor IProject IPluginModelBase IProgressMonitor CoreException generateFiles updateModel
A utility method to create an extension object for the plug in model from the provided extension point id param point Id the identifier of the target extension point param reuse if true new extension object will be created only if an extension with the same Id does not exist return an existing extension if exists and samp reuse samp is samp true samp or a new extension object otherwise protected I Plugin Extension create Extension String point Id boolean reuse throws Core Exception if reuse I Plugin Extension extensions model get Plugin Base get Extensions for int i 0 i extensions length i I Plugin Extension extension extensions i if extension get Point equals Ignore Case point Id return extension I Plugin Extension extension model get Factory create Extension extension set Point point Id return extension  pointId IPluginExtension createExtension pointId CoreException IPluginExtension getPluginBase getExtensions IPluginExtension getPoint equalsIgnoreCase pointId IPluginExtension getFactory createExtension setPoint pointId
private File get Template Directory try URL location get Template Location if location null return null URL url Platform resolve location url Platform as LocalURL url if url null String name url get File return new File name catch Exception e return null return null  getTemplateDirectory getTemplateLocation asLocalURL getFile
private void generate Files File src I Container dst boolean first Level boolean binary I Progress Monitor monitor throws Core Exception File members src list Files for int i 0 i members length i File member members i if member is Directory I Container dst Container null if first Level binary false if member get Name equals java NON NLS 1 I Folder source Folder get Source Folder monitor dst Container generate Java Source Folder source Folder monitor else if member get Name equals bin NON NLS 1 binary true dst Container dst if dst Container null if is Ok To Create Folder member false continue String folder Name get Processed String member get Name member get Name dst Container dst get Folder new Path folder Name if dst Container instanceof I Folder dst Container exists I Folder dst Container create true true monitor generate Files member dst Container false binary monitor else if is Ok To Create File member if first Level binary false copy File member dst binary monitor  generateFiles IContainer firstLevel IProgressMonitor CoreException listFiles isDirectory IContainer dstContainer firstLevel getName IFolder sourceFolder getSourceFolder dstContainer generateJavaSourceFolder sourceFolder getName dstContainer dstContainer isOkToCreateFolder folderName getProcessedString getName getName dstContainer getFolder folderName dstContainer IFolder dstContainer IFolder dstContainer generateFiles dstContainer isOkToCreateFile firstLevel copyFile
private I Folder generate Java Source Folder I Folder source Folder I Progress Monitor monitor throws Core Exception Object package Value get Value KEY PACKAGE NAME String package Name package Value null package Value to String null if package Name null package Name model get Plugin Base get Id I Path path new Path package Name replace File separator Char if source Folder null path source Folder get Project Relative Path append path for int i 1 i path segment Count i I Path subpath path upto Segment i I Folder subfolder project get Folder subpath if subfolder exists false subfolder create true true monitor return project get Folder path  IFolder generateJavaSourceFolder IFolder sourceFolder IProgressMonitor CoreException packageValue getValue KEY_PACKAGE_NAME packageName packageValue packageValue toString packageName packageName getPluginBase getId IPath packageName separatorChar sourceFolder sourceFolder getProjectRelativePath segmentCount IPath uptoSegment IFolder getFolder getFolder
private void copy File File file I Container dst boolean binary I Progress Monitor monitor throws Core Exception String target File Name get Processed String file get Name file get Name monitor sub Task target File Name I File dst File dst get File new Path target File Name try Input Stream stream get Processed Stream file binary if dst File exists dst File set Contents stream true true monitor else dst File create stream true monitor stream close catch IO Exception e  copyFile IContainer IProgressMonitor CoreException targetFileName getProcessedString getName getName subTask targetFileName IFile dstFile getFile targetFileName InputStream getProcessedStream dstFile dstFile setContents dstFile IOException
private String get Processed String String file Name String source if source index Of 1 return source int loc 1 String Buffer buffer new String Buffer boolean replacement Mode false for int i 0 i source length i char c source char At i if c if replacement Mode String key source substring loc i String value get Replacement String file Name key buffer append value replacement Mode false else replacement Mode true loc i 1 continue else if replacement Mode buffer append c return buffer to String  getProcessedString fileName indexOf StringBuffer StringBuffer replacementMode charAt replacementMode getReplacementString fileName replacementMode replacementMode replacementMode toString
private Input Stream get Processed Stream File file boolean binary throws IO Exception Core Exception File Input Stream stream new File Input Stream file if binary return stream Input Stream Reader reader new Input Stream Reader stream int bufsize 1024 char cbuffer new char bufsize int read 0 String Buffer key Buffer new String Buffer String Buffer out Buffer new String Buffer String Buffer pre Buffer new String Buffer boolean new Line true Control Stack pre Stack new Control Stack pre Stack set Value Provider this boolean replacement Mode false boolean preprocessor Mode false boolean escape false while read 1 read reader read cbuffer for int i 0 i read i char c cbuffer i if escape String Buffer buf preprocessor Mode pre Buffer out Buffer buf append c escape false continue if new Line c preprocessor line preprocessor Mode true pre Buffer delete 0 pre Buffer length continue if preprocessor Mode if c escape true continue if c n handle line preprocessor Mode false new Line true String line pre Buffer to String trim pre Stack process Line line continue else pre Buffer append c continue if pre Stack get Current State false continue if c if replacement Mode replacement Mode false String key key Buffer to String String value get Replacement String file get Name key out Buffer append value key Buffer delete 0 key Buffer length else replacement Mode true else if replacement Mode key Buffer append c else out Buffer append c if c n new Line true else new Line false stream close return new Byte Array Input Stream out Buffer to String get Bytes project get Default Charset  InputStream getProcessedStream IOException CoreException FileInputStream FileInputStream InputStreamReader InputStreamReader StringBuffer keyBuffer StringBuffer StringBuffer outBuffer StringBuffer StringBuffer preBuffer StringBuffer newLine ControlStack preStack ControlStack preStack setValueProvider replacementMode preprocessorMode StringBuffer preprocessorMode preBuffer outBuffer newLine preprocessorMode preBuffer preBuffer preprocessorMode preprocessorMode newLine preBuffer toString preStack processLine preBuffer preStack getCurrentState replacementMode replacementMode keyBuffer toString getReplacementString getName outBuffer keyBuffer keyBuffer replacementMode replacementMode keyBuffer outBuffer newLine newLine ByteArrayInputStream outBuffer toString getBytes getDefaultCharset

Adds a boolean option with a provided name label and initial value param name the unique name of the option can be used as a variable in conditional code emitting and variable substitution param label presentable name of the option param value initial value of the option param page Index a zero based index of a page where this option should appear return the newly created option protected Template Option add Option String name String label boolean value int page Index Boolean Option option new Boolean Option this name label register Option option value Boolean TRUE Boolean FALSE page Index return option  pageIndex TemplateOption addOption pageIndex BooleanOption BooleanOption registerOption pageIndex
Adds a string option with a provided name label and initial value param name the unique name of the option can be used as a variable in conditional code emitting and variable substitution param label presentable name of the option param value initial value of the option param page Index a zero based index of a page where this option should appear return the newly created option protected Template Option add Option String name String label String value int page Index String Option option new String Option this name label register Option option value page Index return option  pageIndex TemplateOption addOption pageIndex StringOption StringOption registerOption pageIndex
Adds a choice option with a provided name label list of choices and the initial value choice param name the unique name of the option can be used as a variable in conditional code emitting and variable substitution param label presentable name of the option param choices an array of choices that the user will have when setting the value of the option Each array position should accept an array of String objects of size 2 the first being the unique name and the second the presentable label of the choice param value initial value choice of the option param page Index a zero based index of a page where this option should appear return the newly created option protected Template Option add Option String name String label String choices String value int page Index Choice Option option new Choice Option this name label choices register Option option value page Index return option  pageIndex TemplateOption addOption pageIndex ChoiceOption ChoiceOption registerOption pageIndex
Initializes the option with a given unique name with the provided value The value will be set only if the option has not yet been initialized param name option unique name param value the initial value of the option protected void initialize Option String name Object value Template Option option get Option name if option null Only initialize options that have no value set if option get Value null option set Value value  initializeOption TemplateOption getOption getValue setValue
Returns a string value of the option with a given name The option with that name must exist and must be registered as a string option to begin with param name the unique name of the option return the string value of the option with a given name or samp null samp if not found public String get String Option String name Template Option option Template Option options get name if option null option instanceof String Option return String Option option get Text return null  getStringOption TemplateOption TemplateOption StringOption StringOption getText
Returns a boolean value of the option with a given name The option with that name must exist and must be registered as a boolean option to begin with param name the unique name of the option return the boolean value of the option with a given name or samp null samp if not found public boolean get Boolean Option String key Template Option option Template Option options get key if option null option instanceof Boolean Option return Boolean Option option is Selected return false  getBooleanOption TemplateOption TemplateOption BooleanOption BooleanOption isSelected
Enables the option with a given name The exact effect of the method depends on the option type but the end result should always be the same users should not be able to modify values of disabled options This method has no effect if the option with a given name is not found param name the unique name of the option param enabled the enable state that the option should have public void set Option Enabled String name boolean enabled Template Option option Template Option options get name if option null option set Enabled enabled  setOptionEnabled TemplateOption TemplateOption setEnabled
Returns the value of the option with a given name The actual type of the returned object depends on the option type param name the name of the option return the current value of the option with a specified name or samp null samp if not found or not applicable public Object get Value String name Template Option option Template Option options get name if option null return option get Value return super get Value name  getValue TemplateOption TemplateOption getValue getValue
Returns true if this template depends on values set in the parent wizard Values in the parent wizard include plug in id plug in name plug in class name plug in provider etc If the template does depend on these values samp initialize Fields samp will be called when the page is made visible in the forward direction going from the first page to the pages owned by this template If the page is never shown Finish is pressed before the page is made visible at least once samp initialize Fields samp will be called with the model object instead during template execution The same method will also be called when the template is created within the context of the plug in manifest editor because plug in model already exists at that time return code true code if this template depends on the data set in the parent wizard code false code otherwise public boolean is Dependent On Parent Wizard return false  initializeFields initializeFields isDependentOnParentWizard
Initializes options in the wizard page using the data provided by the method parameters Some options may depend on the user selection in the common wizard pages before template page has been shown for example plug in ID plug in name etc This method allows options to initialize in respect to these values p The method is called before the actual plug in has been built p param data plug in data as defined in the common plug in project wizard pages protected void initialize Fields I Field Data data  initializeFields IFieldData
Initializes options in the wizard page using the data provided by the method parameters Some options may depend on the user selection in the common wizard pages before template page has been shown for example plug in ID plug in name etc This method allows options to initialize in respect to these values p This method is called after the plug in has already been created or as part of new extension creation inside the manifest editor Either way the plug in properties in the model have been fully set and the model can be used to initialize options that cannot be initialized independently param model the model of the plug in manifest file public void initialize Fields I Plugin Model Base model  initializeFields IPluginModelBase
Subclasses must implement this method in order to validate options whose value have been changed by the user The subclass can elect to validate the option on its own or to also check validity of other options in relation to the new value of this one param changed the option whose value has been changed by the user 
public abstract void validate Options Template Option changed Expands variable substitution to include all string options defined in this template see Abstract Template Section get Replacement String String String public String get Replacement String String file Name String key String value get String Option key if value null return value return super get Replacement String file Name key  validateOptions TemplateOption AbstractTemplateSection getReplacementString getReplacementString fileName getStringOption getReplacementString fileName
Modifies the superclass implementation by adding the initialization step before commencing execution This is important because some options may not be initialized and users may choose to press Finish before the wizard page where the options are were shown for the first time public void execute I Project project I Plugin Model Base model I Progress Monitor monitor throws Core Exception initialize Fields model super execute project model monitor  IProject IPluginModelBase IProgressMonitor CoreException initializeFields
Registers the provided option and sets the initial value param option the option to register param value the initial value param page Index the page index to which this option belongs protected void register Option Template Option option Object value int page Index option set Value value options put option get Name option  pageIndex registerOption TemplateOption pageIndex setValue getName
private Template Option get Option String key return Template Option options get key  TemplateOption getOption TemplateOption

private Button button The constructor of the option param section the parent section param name the unique name param label the presentable label of the option public Boolean Option Base Option Template Section section String name String label super section name label  BooleanOption BaseOptionTemplateSection
Returns the current state of the option return true of the option is selected false otherwise public boolean is Selected return get Value null get Value equals Boolean TRUE  isSelected getValue getValue
Changes the current state of the option to the provided state param selected the new state of the option public void set Selected boolean selected set Value selected Boolean TRUE Boolean FALSE  setSelected setValue
Implementation of the superclass method that updates the option s widget with the new value param value the new option value public void set Value Object value super set Value value if button null button set Selection is Selected  setValue setValue setSelection isSelected
button add Selection Listener new Selection Adapter public void widget Selected Selection Event e Boolean Option super set Value button get Selection Boolean TRUE Boolean FALSE get Section validate Options Boolean Option this  addSelectionListener SelectionAdapter widgetSelected SelectionEvent BooleanOption setValue getSelection getSection validateOptions BooleanOption
Creates the boolean option control Option reserves the right to modify the actual widget used as long as the user can modify its boolean state param parent the parent composite of the option widget param span the number of columns that the widget should span public void create Control Composite parent int span button new Button parent SWT CHECK button set Text get Label Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span span button set Layout Data gd button set Selection is Selected button add Selection Listener new Selection Adapter public void widget Selected Selection Event e Boolean Option super set Value button get Selection Boolean TRUE Boolean FALSE get Section validate Options Boolean Option this button set Enabled is Enabled  createControl setText getLabel GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData setSelection isSelected addSelectionListener SelectionAdapter widgetSelected SelectionEvent BooleanOption setValue getSelection getSection validateOptions BooleanOption setEnabled isEnabled
Implementatin of the superclass method that updates the option widget with the new enabled state param enabled the new enabled state public void set Enabled boolean enabled super set Enabled enabled if button null button set Enabled enabled  setEnabled setEnabled setEnabled

Constructor for Choice Option param section the parent section param name the unique name param label the presentable label param choices the list of choices from which the value can be chosen Each array entry should be an array of size 2 where position 0 will be interpeted as the choice unique name and position 1 as the choice presentable label public Choice Option Base Option Template Section section String name String label String choices super section name label this choices choices  ChoiceOption ChoiceOption BaseOptionTemplateSection
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e Button b Button e widget if block Listener return if b get Selection Choice Option super set Value b get Data to String get Section validate Options Choice Option this  SelectionListener SelectionAdapter widgetSelected SelectionEvent blockListener getSelection ChoiceOption setValue getData toString getSection validateOptions ChoiceOption
see Template Field create Control Composite int Form Widget Factory public void create Control Composite parent int span Composite container create Composite parent span fill container span Grid Layout layout new Grid Layout layout margin Width layout margin Height 0 container set Layout layout label Control create Label container span label Control set Enabled is Enabled fill label Control span buttons new Button choices length Selection Listener listener new Selection Adapter public void widget Selected Selection Event e Button b Button e widget if block Listener return if b get Selection Choice Option super set Value b get Data to String get Section validate Options Choice Option this for int i 0 i choices length i String choice choices i Button button create Radio Button parent span choice buttons i button button add Selection Listener listener button set Enabled is Enabled if get Choice null select Choice get Choice  TemplateField createControl FormWidgetFactory createControl createComposite GridLayout GridLayout marginWidth marginHeight setLayout labelControl createLabel labelControl setEnabled isEnabled labelControl SelectionListener SelectionAdapter widgetSelected SelectionEvent blockListener getSelection ChoiceOption setValue getData toString getSection validateOptions ChoiceOption createRadioButton addSelectionListener setEnabled isEnabled getChoice selectChoice getChoice
Returns the string value of the current choice return the current choice or samp null samp if not initialized public String get Choice return get Value null get Value to String null  getChoice getValue getValue toString
Implements the superclass method by passing the new value to the option s widget param value the new value public void set Value Object value super set Value value if buttons null value null select Choice value to String  setValue setValue selectChoice toString
Implements the superclass method by updating the enable state of the option s widget public void set Enabled boolean enabled super set Enabled enabled if label Control null label Control set Enabled enabled for int i 0 i buttons length i buttons i set Enabled is Enabled  setEnabled setEnabled labelControl labelControl setEnabled setEnabled isEnabled
private Grid Data fill Control control int span Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span span control set Layout Data gd return gd  GridData GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan setLayoutData
private Composite create Composite Composite parent int span Composite composite new Composite parent SWT NULL fill composite span return composite  createComposite
private Button create Radio Button Composite parent int span String choice Button button new Button parent SWT RADIO button set Data choice 0 button set Text choice 1 Grid Data gd fill button span gd horizontal Indent 10 return button  createRadioButton setData setText GridData horizontalIndent
private void select Choice String choice block Listener true for int i 0 i buttons length i Button button buttons i String bname button get Data to String if bname equals choice button set Selection true else button set Selection false block Listener false  selectChoice blockListener getData toString setSelection setSelection blockListener

public interface I Template Section Returns the URL of the zip file containing template files and directories that will be created in the plug in project If URL protocol is file and the URL ends with a trailing file separator an attempt will be made to treat the URL as a root directory and iterate using standard Java I O classes If template files are stored in a ZIP or JAR archive the name of the archive must be part of the URL return a template location URL  ITemplateSection
public URL get Template Location Returns a presentable label the section return a template label  getTemplateLocation
Returns a description of the section The description should explain what extension will be used what classes will be generated and how to test that the generated code works properly return a template description 
Returns a replacement string for the provided key When a token is found in the template file with a form key the actual key is passed to this method to obtain the replacement If replacement is provided it is substituted for the token including the characters Otherwise it is transfered as is param file Name the name of the file in which the key was found You can use it to return different values for different files param key the replacement key found in the template file return replacement string for the provided key or the key itself if not found  fileName
public String get Replacement String String file Name String key Adds template related pages to the wizard A typical section implementation contributes one page but complex sections may span several pages param wizard the host wizard to add pages into  getReplacementString fileName
Returns a wizard page at the provided index return wizard page index 
public Wizard Page get Page int page Index Returns number of pages that are contributed by this template public int get Page Count  WizardPage getPage pageIndex getPageCount
Tests whether this template have had a chance to create its pages This method returns true after add Pages has been called return samp true samp if wizard pages have been created by this template  addPages
Returns the number of work units that this template will consume during the execution This number is used to calculate the total number of work units when initializing the progress indicator return 
Provides the list of template dependencies A template may generate a number of Java classes that reference classes and interfaces from other plug ins By providing this list a template enables the template wizard to create the correct Java build path so that these classes and interfaces are correctly resolved param schema Version version of the target manifest or samp null samp if older manifest prior to 3 0 will be created Depending on the manifest version the list of dependencies may vary return  schemaVersion
Returns identifier of the extension point used in this section return extension point id if this section contributes into an extension point or samp null samp if not applicable 
Executes the template As part of the execution template may generate resources under the provided project and or modify the plug in model param project the workspace project that contains the plug in param model structured representation of the plug in manifest param monitor progress monitor to indicate execution progress public void execute I Project project I Plugin Model Base model  IProject IPluginModelBase
Returns an array of tokens representing new files and folders created by this template section The information is collected for the benefit of code build properties code file so that the generated files and folders are included in the binary build The tokens will be added as is to the variable code bin includes code For this reason wild cards and other syntax rules applicable to this variable can be used in this method For example p pre return new String quot icons gif quot pre p return an array of strings that fully describe the files and folders created by this template section as required by code bin includes code variable in code build properties code file 

public interface I Variable Provider Returns the value of the variable with a given name param variable the name of the variable return the value of the specified variable  IVariableProvider

private I Template Section sections Creates a new template wizard public New Plugin Template Wizard sections create Template Sections  ITemplateSection NewPluginTemplateWizard createTemplateSections
Subclasses are required to implement this method by creating templates that will appear in this wizard return an array of template sections that will appear in this wizard 
public abstract I Template Section create Template Sections Returns templates that appear in this section return public final I Template Section get Template Sections return sections  ITemplateSection createTemplateSections ITemplateSection getTemplateSections
Implemented by asking templates in this wizard to contribute pages protected final void add Additional Pages add template pages for int i 0 i sections length i sections i add Pages this  addAdditionalPages addPages

Wizard Page page Array List options public Template Page options new Array List  WizardPage ArrayList TemplatePage ArrayList
The default constructor public Option Template Section  OptionTemplateSection
Returns the unique name of this section This name will be used to construct name and description lookup keys as well as the template file location in the contributing plug in return the unique section Id see get Label see get Description see get Template Location  getLabel getDescription getTemplateLocation
Returns the directory where all the templates are located in the contributing plug in return templates  schema Version for code since Eclipse 3 0 or templates for pre 3 0 code protected String get Template Directory String schema Version model get Plugin Base get Schema Version if schema Version null return templates  schema Version NON NLS 1 return templates NON NLS 1  templates_ schemaVersion getTemplateDirectory schemaVersion getPluginBase getSchemaVersion schemaVersion templates_ schemaVersion
Returns the install URL of the plug in that contributes this template return the install URL of the contributing plug in 
Implements the abstract method by looking for templates using the following path p install location template Directory section Id return the URL of the location where files to be emitted by this template are located public URL get Template Location URL url get InstallURL try String location get Template Directory File separator get Section Id return new URL url location catch MalformedURL Exception e return null  templateDirectory sectionId getTemplateLocation getInstallURL getTemplateDirectory getSectionId MalformedURLException
Returns the wizard page at the specified index Pages must be created prior to calling this method return the wizard page at the specified index or samp null samp if invalid index see create Page int public Wizard Page get Page int page Index if page Index 0 page Index pages size return null Template Page tpage Template Page pages get page Index return tpage page  createPage WizardPage getPage pageIndex pageIndex pageIndex TemplatePage TemplatePage pageIndex
Creates the wizard page for the specified page index This method cannot be called before set Page Count int The page will be created with all the options registered for that page index Therefore make all the calls to add Option before calling this method param page Index a zero based index of the page relative to this template For example if a template need to have two pages you have to call this method twice once with index 0 and again with index 1 see set Page Count int see Base Option Template Section add Option public Wizard Page create Page int page Index if page Index 0 page Index pages size return null Template Page tpage Template Page pages get page Index tpage page new Option Template Wizard Page this tpage options null return tpage page  setPageCount addOption pageIndex setPageCount BaseOptionTemplateSection addOption WizardPage createPage pageIndex pageIndex pageIndex TemplatePage TemplatePage pageIndex OptionTemplateWizardPage
Creates the wizard page for the specified page index This method cannot be called before set Page Count int The page will be created with all the options registered for that page index Therefore make all the calls to add Option before calling this method param page Index a zero based index of the page relative to this template For example if a template need to have two pages you have to call this method twice once with index 0 and again with index 1 param help Context Id the Id of the help context defined in the contributing plug in that will be used to locate content of the info pop displayed when F1 is pressed see set Page Count int see Base Option Template Section add Option public Wizard Page create Page int page Index String help Context Id if page Index 0 page Index pages size return null Template Page tpage Template Page pages get page Index tpage page new Option Template Wizard Page this tpage options help Context Id return tpage page  setPageCount addOption pageIndex helpContextId setPageCount BaseOptionTemplateSection addOption WizardPage createPage pageIndex helpContextId pageIndex pageIndex TemplatePage TemplatePage pageIndex OptionTemplateWizardPage helpContextId
Returns a number of pages that this template contributes to the wizard return the number of pages see set Page Count int public int get Page Count return pages size  setPageCount getPageCount
Sets the number of pages this template will manage This method must be called prior to adding pages and options in order to initialize the template Once the method has been called you can call methods that accept page index in the range 0 count 1 param count number of pages that this template will contribute to the template wizard public void set Page Count int count pages clear for int i 0 i count i pages add new Template Page  setPageCount TemplatePage
Returns options that belong to the page with the given index param page Index 0 based index of the template page return see set Page Count int public Template Option get Options int page Index if page Index 0 page Index pages size return new Template Option 0 Template Page page Template Page pages get page Index return Template Option page options to Array new Template Option page options size  pageIndex setPageCount TemplateOption getOptions pageIndex pageIndex pageIndex TemplateOption TemplatePage TemplatePage pageIndex TemplateOption toArray TemplateOption
Returns options that are added to the provided wizard page param page wizard page that hosts required options return array of options added to the provided wizard page public Template Option get Options Wizard Page page for int i 0 i pages size i Template Page tpage Template Page pages get i if tpage page equals page return get Options i return new Template Option 0  TemplateOption getOptions WizardPage TemplatePage TemplatePage getOptions TemplateOption
Returns the zero based index of a page that hosts the the given option param option template option for which a page index is being requested return zero based index of a page that hosts the option or 1 if none of the pages contain the option public int get Page Index Template Option option for int i 0 i pages size i Template Page tpage Template Page pages get i if tpage options contains option return i return 1  getPageIndex TemplateOption TemplatePage TemplatePage
Returns the label of this template to be used in the UI The label is obtained by creating a lookup key using the following rule template section id name This key is used to locate the label in the plugin properties file of the plug in that contributed this template return the translated label of this template public String get Label String key template get Section Id name NON NLS 1 NON NLS 2 return get Plugin Resource String key  getLabel getSectionId getPluginResourceString
Returns the description of this template to be used in the UI The description is obtained by creating a lookup key using the following rule template section id desc This key is used to locate the label in the plugin properties file of the plug in that contributed this template return the translated description of this template public String get Description String key template get Section Id desc NON NLS 1 NON NLS 2 return get Plugin Resource String key  getDescription getSectionId getPluginResourceString
Locates the page that this option is presented in and flags that the option is required and is currently not set The flagging is done by setting the page incomplete and setting the error message that uses option s message label param option the option that is required and currently not set protected void flag Missing Required Option Template Option option Wizard Page page null for int i 0 i pages size i Template Page tpage Template Page pages get i Array List list tpage options if list contains option page tpage page break if page null page set Page Complete false String message PDE Plugin get Formatted Message KEY MUST BE SET option get Message Label page set Error Message message  flagMissingRequiredOption TemplateOption WizardPage TemplatePage TemplatePage ArrayList setPageComplete PDEPlugin getFormattedMessage KEY_MUST_BE_SET getMessageLabel setErrorMessage
Resets the current page state by clearing the error message and making the page complete thereby allowing users to flip to the next page protected void reset Page State if pages size 0 return Wizard Page first Page Template Page pages get 0 page I Wizard Container container first Page get Wizard get Container Wizard Page current Page Wizard Page container get Current Page current Page set Error Message null current Page set Page Complete true  resetPageState WizardPage firstPage TemplatePage IWizardContainer firstPage getWizard getContainer WizardPage currentPage WizardPage getCurrentPage currentPage setErrorMessage currentPage setPageComplete
protected void register Option Template Option option Object value int page Index super register Option option value page Index if page Index 0 page Index pages size Template Page tpage Template Page pages get page Index tpage options add option  registerOption TemplateOption pageIndex registerOption pageIndex pageIndex pageIndex TemplatePage TemplatePage pageIndex

The constructor param section the section that is contributing this page param option a list of options that should be shown in this page public Option Template Wizard Page Base Option Template Section section Array List options String help Context Id super NON NLS 1 this section section this options options this help Context Id help Context Id  OptionTemplateWizardPage BaseOptionTemplateSection ArrayList helpContextId helpContextId helpContextId
Creates the page control by creating individual options in the order subject to their position in the list param composite public void create Control Composite composite Composite container new Composite composite SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout vertical Spacing 9 container set Layout layout for int i 0 i options size i Template Option option Template Option options get i option create Control container 2 if help Context Id null Workbench Help set Help container help Context Id set Control container Dialog apply Dialog Font container  createControl GridLayout GridLayout numColumns verticalSpacing setLayout TemplateOption TemplateOption createControl helpContextId WorkbenchHelp setHelp helpContextId setControl applyDialogFont
Initializes the options that require late initialization when the page is made visible param visible public void set Visible boolean visible if visible section is Dependent On Parent Wizard I Wizard wizard get Wizard if wizard instanceof Abstract New Plugin Template Wizard Abstract New Plugin Template Wizard template Wizard Abstract New Plugin Template Wizard wizard section initialize Fields template Wizard get Data super set Visible visible  setVisible isDependentOnParentWizard IWizard getWizard AbstractNewPluginTemplateWizard AbstractNewPluginTemplateWizard templateWizard AbstractNewPluginTemplateWizard initializeFields templateWizard getData setVisible

private boolean ignore Listener The constructor param section the parent section param name the unique option name param label the translatable label of the option public String Option Base Option Template Section section String name String label super section name label set Required true  ignoreListener StringOption BaseOptionTemplateSection setRequired
A utility version of the samp get Value samp method that converts the current value into the String object return the string version of the current value public String get Text if get Value null return get Value to String return null  getValue getText getValue getValue toString
A utility version of the samp set Value samp method that accepts String objects param new Text the new text value of the option see set Value Object public void set Text String new Text set Value new Text  setValue newText setValue setText newText setValue newText
Implements the superclass method by passing the string value of the new value to the widget param value the new option value public void set Value Object value super set Value value if text null ignore Listener true String text Value get Text text set Text text Value null text Value NON NLS 1 ignore Listener false  setValue setValue ignoreListener textValue getText setText textValue textValue ignoreListener
text add Modify Listener new Modify Listener public void modify Text Modify Event e if ignore Listener return String Option super set Value text get Text get Section validate Options String Option this  addModifyListener ModifyListener modifyText ModifyEvent ignoreListener StringOption setValue getText getSection validateOptions StringOption
Creates the string option control param parent parent composite of the string option widget param span the number of columns that the widget should span public void create Control Composite parent int span label Control create Label parent 1 label Control set Enabled is Enabled text new Text parent SWT SINGLE SWT BORDER if get Value null text set Text get Value to String Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span span 1 text set Layout Data gd text set Enabled is Enabled text add Modify Listener new Modify Listener public void modify Text Modify Event e if ignore Listener return String Option super set Value text get Text get Section validate Options String Option this  createControl labelControl createLabel labelControl setEnabled isEnabled getValue setText getValue toString GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData setEnabled isEnabled addModifyListener ModifyListener modifyText ModifyEvent ignoreListener StringOption setValue getText getSection validateOptions StringOption
A string option is empty if its text field contains no text return true if there is no text in the text field public boolean is Empty return get Value null get Value to String length 0  isEmpty getValue getValue toString
Implements the superclass method by passing the enabled state to the option s widget param enabled public void set Enabled boolean enabled super set Enabled enabled if label Control null label Control set Enabled enabled text set Enabled enabled  setEnabled setEnabled labelControl labelControl setEnabled setEnabled

private String label The constructor for the field param section the section that owns this field param label the label of this field public Template Field Base Option Template Section section String label this section section this label label  TemplateField BaseOptionTemplateSection
Returns the field label return field label public String get Label return label  getLabel
Changes the label of this field param label the new label of this field public void set Label String label this label label  setLabel
Returns the template section that owns this option field return parent template section public Base Option Template Section get Section return section  BaseOptionTemplateSection getSection
Factory method that creates the label in the provided parent param parant the parent composite to create the label in param span number of columns that the label should span return the newly created Label widget protected Label create Label Composite parent int span Label label new Label parent SWT NULL label set Text get Label return label  createLabel setText getLabel
Subclasses must implement this method to create the control of the template field param parent the parent composite the control should be created in param span number of columns that the control should span 

private boolean required Creates a new option for the provided template section param section the parent template section param name the unique name of this option param the presentable label of this option public Template Option Base Option Template Section section String name String label super section label this name name  TemplateOption BaseOptionTemplateSection
Returns the unique name of this option return option name public String get Name return name  getName
Changes the unique name of this option param name the new option name public void set Name String name this name name  setName
Returns the value of this option return the current value public Object get Value return value  getValue
Returns whether this option is currently empty The actual semantics of the result depends on the implementing option return samp true samp if option is empty samp false otherwise public boolean is Empty return false  isEmpty
Marks this option as required Required options must be set by the user An option that is empty and is marked required will be flagged as an error in the wizard param required the new value of the property see is Empty public void set Required boolean required this required required  isEmpty setRequired
Returns whether this option is required cannot be empty return samp true samp if this option is required samp false samp otherwise public boolean is Required return required  isRequired
Sets the new value of this option param value the new value public void set Value Object value this value value  setValue
Returns whether this option is enabled The actual presentation of enabled state depends on the implementing option return samp true samp if option is enabled and can be modified public boolean is Enabled return enabled  isEnabled
Sets the enabled state of this option The action presentation of the enabled state depends on the implementing option param enabled the new enabled state public void set Enabled boolean enabled this enabled enabled  setEnabled
Returns the label of this option that can be presented in the messages to the user The default implementation trims the label property from mnemonics and from the trailing column public String get Message Label String label get Label String Buffer buf new String Buffer for int i 0 i label length i char c label char At i if c i label length 1 char c2 label char At i 1 if c2 DBCS mnemonic sequence char It is OK to truncate the label at this point break if c c buf append c return buf to String  getMessageLabel getLabel StringBuffer StringBuffer charAt charAt toString

public void init I Intro Part intro Part I Memento memento this intro Part intro Part try to restore last state input get Cached Input memento  IIntroPart introPart IMemento introPart introPart getCachedInput
public void create Part Control Composite parent Form Toolkit toolkit container toolkit create Composite parent Fill Layout layout new Fill Layout layout margin Width layout margin Height 0 container set Layout layout viewer Cheat Sheet Viewer Factory create Cheat Sheet View viewer create Part Control container  createPartControl FormToolkit createComposite FillLayout FillLayout marginWidth marginHeight setLayout CheatSheetViewerFactory createCheatSheetView createPartControl
see org eclipse ui intro internal parts I Standby Content Part get Control public Control get Control return container  IStandbyContentPart getControl getControl
public void set Input Object input if the new input is null use cacched input from momento if input null this input String input viewer set Input this input  setInput setInput
see org eclipse ui intro internal parts I Standby Content Part set Focus public void set Focus viewer set Focus  IStandbyContentPart setFocus setFocus setFocus
see org eclipse ui intro internal parts I Standby Content Part dispose public void dispose  IStandbyContentPart
public void save State I Memento memento String current Cheat Sheet Id viewer get Cheat SheetID if current Cheat Sheet Id null memento put String MEMENTO CHEATSHEET ID ATT current Cheat Sheet Id  saveState IMemento currentCheatSheetId getCheatSheetID currentCheatSheetId putString MEMENTO_CHEATSHEET_ID_ATT currentCheatSheetId
Tries to create the last content part viewed based on content part id param memento return private String get Cached Input I Memento memento if memento null return null return memento get String MEMENTO CHEATSHEET ID ATT  getCachedInput IMemento getString MEMENTO_CHEATSHEET_ID_ATT

public Collapse All Action Tree Viewer viewer super Search Messages get String Collapse All Action 0 NON NLS 1 f Viewer viewer set Tool Tip Text Search Messages get String Collapse All Action 1 NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH COLLAPSE ALL  CollapseAllAction TreeViewer SearchMessages getString CollapseAllAction fViewer setToolTipText SearchMessages getString CollapseAllAction SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_COLLAPSE_ALL
public void run f Viewer collapse All  fViewer collapseAll

public Expand All Action Tree Viewer viewer super Search Messages get String Expand All Action label NON NLS 1 f Viewer viewer set Tool Tip Text Search Messages get String Expand All Action tooltip NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH EXPAND ALL  ExpandAllAction TreeViewer SearchMessages getString ExpandAllAction fViewer setToolTipText SearchMessages getString ExpandAllAction SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_EXPAND_ALL
public void run f Viewer expand All  fViewer expandAll

public interface I Navigate void navigate Next boolean forward  INavigate navigateNext

public Remove All Matches Action Abstract Text Search View Page page super Search Messages get String Remove All Matches Action label NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH REM ALL set Tool Tip Text Search Messages get String Remove All Matches Action tooltip NON NLS 1 f Page page  RemoveAllMatchesAction AbstractTextSearchViewPage SearchMessages getString RemoveAllMatchesAction SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_REM_ALL setToolTipText SearchMessages getString RemoveAllMatchesAction fPage
public void run Abstract Text Search Result search f Page get Input if search null search remove All  AbstractTextSearchResult fPage getInput removeAll

public Remove Match Action Abstract Text Search View Page page f Page page set Text Search Messages get String Remove Match Action label NON NLS 1 set Tool Tip Text Search Messages get String Remove Match Action tooltip NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH REM  RemoveMatchAction AbstractTextSearchViewPage fPage setText SearchMessages getString RemoveMatchAction setToolTipText SearchMessages getString RemoveMatchAction SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_REM
public void run Match match f Page get Current Match Abstract Text Search Result result f Page get Input if match null result null result remove Match match  fPage getCurrentMatch AbstractTextSearchResult fPage getInput removeMatch

public Remove Selected Matches Action Abstract Text Search View Page page f Page page set Text Search Messages get String Remove Selected Matches Action label NON NLS 1 set Tool Tip Text Search Messages get String Remove Selected Matches Action tooltip NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH REM  RemoveSelectedMatchesAction AbstractTextSearchViewPage fPage setText SearchMessages getString RemoveSelectedMatchesAction setToolTipText SearchMessages getString RemoveSelectedMatchesAction SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_REM
public void run f Page internal Remove Selected  fPage internalRemoveSelected

public Set Layout Action Abstract Text Search View Page page String label String tooltip int layout super label I Action AS CHECK BOX f Page page set Tool Tip Text tooltip NON NLS 1 f Layout layout  SetLayoutAction AbstractTextSearchViewPage IAction AS_CHECK_BOX fPage setToolTipText fLayout
public void run f Page set Layout f Layout  fPage setLayout fLayout
public int get Layout return f Layout  getLayout fLayout

public Show Next Result Action Abstract Text Search View Page page super Search Messages get String Show Next Result Action label NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH NEXT set Tool Tip Text Search Messages get String Show Next Result Action tooltip NON NLS 1 f Page page  ShowNextResultAction AbstractTextSearchViewPage SearchMessages getString ShowNextResultAction SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_NEXT setToolTipText SearchMessages getString ShowNextResultAction fPage
public void run f Page goto Next Match  fPage gotoNextMatch

public Show Previous Result Action Abstract Text Search View Page page super Search Messages get String Show Previous Result Action label NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH PREV set Tool Tip Text Search Messages get String Show Previous Result Action tooltip NON NLS 1 f Page page  ShowPreviousResultAction AbstractTextSearchViewPage SearchMessages getString ShowPreviousResultAction SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_PREV setToolTipText SearchMessages getString ShowPreviousResultAction fPage
public void run f Page goto Previous Match  fPage gotoPreviousMatch

public class Table Viewer Navigator implements I Navigate private Table Viewer f Viewer public Table Viewer Navigator Table Viewer viewer f Viewer viewer  TableViewerNavigator INavigate TableViewer fViewer TableViewerNavigator TableViewer fViewer
public void navigate Next boolean forward int item Count f Viewer get Table get Item Count if item Count 0 return int selection f Viewer get Table get Selection Indices int next Index 0 if selection length 0 if forward next Index selection selection length 1 1 if next Index item Count next Index 0 else next Index selection 0 1 if next Index 0 next Index item Count 1 f Viewer get Table set Selection next Index f Viewer get Table show Selection  navigateNext itemCount fViewer getTable getItemCount itemCount fViewer getTable getSelectionIndices nextIndex nextIndex nextIndex itemCount nextIndex nextIndex nextIndex nextIndex itemCount fViewer getTable setSelection nextIndex fViewer getTable showSelection

private Abstract Text Search View Page f Page public Tree Viewer Navigator Abstract Text Search View Page page Tree Viewer viewer f Viewer viewer f Page page  AbstractTextSearchViewPage fPage TreeViewerNavigator AbstractTextSearchViewPage TreeViewer fViewer fPage
public void navigate Next boolean forward Tree Item current Item get Current Item forward if current Item null return Tree Item next Item null if forward next Item get Next Item Forward current Item if next Item null next Item get First Item else next Item get Next Item Backward current Item if next Item null next Item get Last Item if next Item null internal Set Selection next Item  navigateNext TreeItem currentItem getCurrentItem currentItem TreeItem nextItem nextItem getNextItemForward currentItem nextItem nextItem getFirstItem nextItem getNextItemBackward currentItem nextItem nextItem getLastItem nextItem internalSetSelection nextItem
private Tree Item get First Item Tree Item roots f Viewer get Tree get Items if roots length 0 return null for int i 0 i roots length i if has Matches roots i return roots i Tree Item first Child get First Child With Matches roots 0 if first Child null return first Child return null  TreeItem getFirstItem TreeItem fViewer getTree getItems hasMatches TreeItem firstChild getFirstChildWithMatches firstChild firstChild
private Tree Item get Last Item Tree Item roots f Viewer get Tree get Items if roots length 0 return null return get Last Child With Matches roots roots length 1  TreeItem getLastItem TreeItem fViewer getTree getItems getLastChildWithMatches
private Tree Item get Next Item Backward Tree Item current Item Tree Item previous Sibling get Next Sibling current Item false if previous Sibling null Tree Item last Child get Last Child With Matches previous Sibling if last Child null return last Child if has Matches previous Sibling return previous Sibling return null else Tree Item parent current Item get Parent Item if parent null if has Matches parent return parent return get Next Item Backward parent return null  TreeItem getNextItemBackward TreeItem currentItem TreeItem previousSibling getNextSibling currentItem previousSibling TreeItem lastChild getLastChildWithMatches previousSibling lastChild lastChild hasMatches previousSibling previousSibling TreeItem currentItem getParentItem hasMatches getNextItemBackward
private Tree Item get Last Child With Matches Tree Item current Item Tree Item children get Children current Item if children length 0 return null Tree Item recursive Child get Last Child With Matches children children length 1 if recursive Child null return children children length 1 return recursive Child  TreeItem getLastChildWithMatches TreeItem currentItem TreeItem getChildren currentItem TreeItem recursiveChild getLastChildWithMatches recursiveChild recursiveChild
private Tree Item get Next Item Forward Tree Item current Item Tree Item child get First Child With Matches current Item if child null return child Tree Item next Sibling get Next Sibling current Item true if next Sibling null if has Matches next Sibling return next Sibling return get First Child With Matches next Sibling else Tree Item parent current Item get Parent Item while parent null next Sibling get Next Sibling parent true if next Sibling null if has Matches next Sibling return next Sibling return get First Child With Matches next Sibling parent parent get Parent Item return null  TreeItem getNextItemForward TreeItem currentItem TreeItem getFirstChildWithMatches currentItem TreeItem nextSibling getNextSibling currentItem nextSibling hasMatches nextSibling nextSibling getFirstChildWithMatches nextSibling TreeItem currentItem getParentItem nextSibling getNextSibling nextSibling hasMatches nextSibling nextSibling getFirstChildWithMatches nextSibling getParentItem
private Tree Item get First Child With Matches Tree Item item Tree Item children get Children item if children length 0 return null Tree Item child children 0 if has Matches child return child return get First Child With Matches child  TreeItem getFirstChildWithMatches TreeItem TreeItem getChildren TreeItem hasMatches getFirstChildWithMatches
private Tree Item get Children Tree Item item f Viewer set Expanded State item get Data true return item get Items  TreeItem getChildren TreeItem fViewer setExpandedState getData getItems
private Tree Item get Next Sibling Tree Item current Item boolean forward Tree Item siblings get Siblings current Item if siblings length 2 return null int index 1 for int i 0 i siblings length i if siblings i current Item index i break if forward index siblings length 1 return null else if forward index 0 return null return forward siblings index 1 siblings index 1  TreeItem getNextSibling TreeItem currentItem TreeItem getSiblings currentItem currentItem
private Tree Item get Siblings Tree Item current Item Tree tree f Viewer get Tree Tree Item parent Item current Item get Parent Item if parent Item null return parent Item get Items return tree get Items  TreeItem getSiblings TreeItem currentItem fViewer getTree TreeItem parentItem currentItem getParentItem parentItem parentItem getItems getItems
private boolean has Matches Tree Item item Object element item get Data if element null return false return f Page get Displayed Match Count element 0  hasMatches TreeItem getData fPage getDisplayedMatchCount
private Tree Item get Current Item boolean forward Tree tree f Viewer get Tree Tree Item selection tree get Selection if selection length 0 selection tree get Items Tree Item next Item null if selection length 0 next Item forward selection 0 selection selection length 1 return next Item  TreeItem getCurrentItem fViewer getTree TreeItem getSelection getItems TreeItem nextItem nextItem nextItem
private void internal Set Selection Tree Item ti if ti null Object data ti get Data if data null I Selection selection new Structured Selection data f Viewer set Selection selection true  internalSetSelection TreeItem getData ISelection StructuredSelection fViewer setSelection

public Cancel Search Action Search View view super Search Messages get String Cancel Search Action label NON NLS 1 f View view set Tool Tip Text Search Messages get String Cancel Search Action tooltip NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH CANCEL  CancelSearchAction SearchView SearchMessages getString CancelSearchAction fView setToolTipText SearchMessages getString CancelSearchAction SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_CANCEL
public void run I Search Result result f View get Current Search Result if result null Internal SearchUI get Instance cancel Search result get Query  ISearchResult fView getCurrentSearchResult InternalSearchUI getInstance cancelSearch getQuery

Search Job Record I Search Query job boolean bg f Query job f Background bg f Is Running false  SearchJobRecord ISearchQuery fQuery fBackground fIsRunning
private class Internal Search Job extends Job Search Job Record f Search Job Record public Internal Search Job Search Job Record sjr super sjr f Query get Label f Search Job Record sjr  InternalSearchJob SearchJobRecord fSearchJobRecord InternalSearchJob SearchJobRecord fQuery getLabel fSearchJobRecord
protected I Status run I Progress Monitor monitor Throttling Progress Monitor real Monitor new Throttling Progress Monitor monitor 0 5f f Search Job Record f Job this search Job Started f Search Job Record I Status status null try status f Search Job Record f Query run real Monitor finally search Job Finished f Search Job Record f Search Job Record f Job null return status  IStatus IProgressMonitor ThrottlingProgressMonitor realMonitor ThrottlingProgressMonitor fSearchJobRecord fJob searchJobStarted fSearchJobRecord IStatus fSearchJobRecord fQuery realMonitor searchJobFinished fSearchJobRecord fSearchJobRecord fJob
return status public boolean belongs To Object family return family Internal SearchUI FAMILY SEARCH  belongsTo InternalSearchUI FAMILY_SEARCH
private void search Job Started Search Job Record record record f Is Running true get Search Manager query Starting record f Query  searchJobStarted SearchJobRecord fIsRunning getSearchManager queryStarting fQuery
private void search Job Finished Search Job Record record record f Is Running false get Search Manager query Finished record f Query  searchJobFinished SearchJobRecord fIsRunning getSearchManager queryFinished fQuery
The constructor public Internal SearchUI fg Instance this f Search Jobs new Hash Map f Search Results Manager new Query Manager f Position Tracker new Position Tracker URL iconURL Search Plugin get Default get Bundle get Entry icons full eview16 searchres gif NON NLS 1 Image Descriptor image Image Descriptor create FromURL iconURL PlatformUI get Workbench get Progress Service register Icon For Family image FAMILY SEARCH  InternalSearchUI fgInstance fSearchJobs HashMap fSearchResultsManager QueryManager fPositionTracker PositionTracker SearchPlugin getDefault getBundle getEntry ImageDescriptor ImageDescriptor createFromURL getWorkbench getProgressService registerIconForFamily FAMILY_SEARCH
Returns the shared instance public static Internal SearchUI get Instance if fg Instance null fg Instance new Internal SearchUI return fg Instance  InternalSearchUI getInstance fgInstance fgInstance InternalSearchUI fgInstance
public I Search Result View Part get Search View return I Search Result View Part Search Plugin get Active Page find View New SearchUI SEARCH VIEW ID  ISearchResultViewPart getSearchView ISearchResultViewPart SearchPlugin getActivePage findView NewSearchUI SEARCH_VIEW_ID
public boolean run Search In Background I Search Query query Assert is True f Search Jobs get query null add Query query if is Query Running query return false Search Job Record sjr new Search Job Record query true f Search Jobs put query sjr do Run Search In Background sjr return true  runSearchInBackground ISearchQuery isTrue fSearchJobs addQuery isQueryRunning SearchJobRecord SearchJobRecord fSearchJobs doRunSearchInBackground
public boolean is Query Running I Search Query query Search Job Record sjr Search Job Record f Search Jobs get query return sjr null sjr f Is Running  isQueryRunning ISearchQuery SearchJobRecord SearchJobRecord fSearchJobs fIsRunning
public I Status run Search In Foreground I Runnable Context context final I Search Query query Assert is True f Search Jobs get query null add Query query Search Job Record sjr new Search Job Record query false f Search Jobs put query sjr return do Run Search In Foreground sjr context  IStatus runSearchInForeground IRunnableContext ISearchQuery isTrue fSearchJobs addQuery SearchJobRecord SearchJobRecord fSearchJobs doRunSearchInForeground
private void do Run Search In Background Search Job Record job Record if job Record f Job null job Record f Job new Internal Search Job job Record job Record f Job set Priority Job BUILD job Record f Job set User true I Workbench Site Progress Service service get Progress Service if service null service schedule job Record f Job 0 true else job Record f Job schedule  doRunSearchInBackground SearchJobRecord jobRecord jobRecord fJob jobRecord fJob InternalSearchJob jobRecord jobRecord fJob setPriority jobRecord fJob setUser IWorkbenchSiteProgressService getProgressService jobRecord fJob jobRecord fJob
public I Workbench Site Progress Service get Progress Service I Search Result View Part view get Search View if view null I Workbench Part Site site view get Site if site null return I Workbench Site Progress Service view get Site get Adapter I Workbench Site Progress Service class return null  IWorkbenchSiteProgressService getProgressService ISearchResultViewPart getSearchView IWorkbenchPartSite getSite IWorkbenchSiteProgressService getSite getAdapter IWorkbenchSiteProgressService
public boolean run Again I Search Query job final Search Job Record rec Search Job Record f Search Jobs get job if rec null return false if rec f Background do Run Search In Background rec else Progress Monitor Dialog pmd new Progress Monitor Dialog get Search View get Site get Shell do Run Search In Foreground rec pmd return true  runAgain ISearchQuery SearchJobRecord SearchJobRecord fSearchJobs fBackground doRunSearchInBackground ProgressMonitorDialog ProgressMonitorDialog getSearchView getSite getShell doRunSearchInForeground
context run true true new I Runnable With Progress public void run I Progress Monitor monitor search Job Started rec try temp 0 rec f Query run monitor finally search Job Finished rec  IRunnableWithProgress IProgressMonitor searchJobStarted fQuery searchJobFinished
private I Status do Run Search In Foreground final Search Job Record rec I Runnable Context context final I Status temp new I Status 1 if context null context get Context try context run true true new I Runnable With Progress public void run I Progress Monitor monitor search Job Started rec try temp 0 rec f Query run monitor finally search Job Finished rec catch Invocation Target Exception e temp 0 new Status I Status ERROR Search Plugin getID 0 Search Messages get String Internal SearchUI error unexpected e get Target Exception NON NLS 1 catch Interrupted Exception e canceled temp 0 Status OK STATUS return temp 0  IStatus doRunSearchInForeground SearchJobRecord IRunnableContext IStatus IStatus getContext IRunnableWithProgress IProgressMonitor searchJobStarted fQuery searchJobFinished InvocationTargetException IStatus SearchPlugin SearchMessages getString InternalSearchUI getTargetException InterruptedException OK_STATUS
private I Runnable Context get Context return new Progress Monitor Dialog null  IRunnableContext getContext ProgressMonitorDialog
public static void shutdown Internal SearchUI instance fg Instance if instance null instance do Shutdown  InternalSearchUI fgInstance doShutdown
private void do Shutdown Iterator job Recs f Search Jobs values iterator while job Recs has Next Search Job Record element Search Job Record job Recs next if element f Job null element f Job cancel f Position Tracker dispose  doShutdown jobRecs fSearchJobs jobRecs hasNext SearchJobRecord SearchJobRecord jobRecs fJob fJob fPositionTracker
public void cancel Search I Search Query job Search Job Record rec Search Job Record f Search Jobs get job if rec null rec f Job null rec f Job cancel  cancelSearch ISearchQuery SearchJobRecord SearchJobRecord fSearchJobs fJob fJob
public I Search Result View Part activate Search View String default Perspective Id New SearchUI get Default Perspective Id if default Perspective Id null I Workbench Window window window Search Plugin get Active Workbench Window if window null window get Shell null window get Shell is Disposed try PlatformUI get Workbench show Perspective default Perspective Id window catch Workbench Exception ex show view in current perspective try I Search Result View Part view Part I Search Result View Part Search Plugin get Active Page find View New SearchUI SEARCH VIEW ID if view Part null Search Preference Page is View Brought To Front view Part I Search Result View Part Search Plugin get Active Page show View New SearchUI SEARCH VIEW ID null I Workbench Page VIEW ACTIVATE return view Part catch Part Init Exception ex Exception Handler handle ex Search Messages get String Search Error open Result View title Search Messages get String Search Error open Result View message NON NLS 2 NON NLS 1 return null  ISearchResultViewPart activateSearchView defaultPerspectiveId NewSearchUI getDefaultPerspectiveId defaultPerspectiveId IWorkbenchWindow SearchPlugin getActiveWorkbenchWindow getShell getShell isDisposed getWorkbench showPerspective defaultPerspectiveId WorkbenchException ISearchResultViewPart viewPart ISearchResultViewPart SearchPlugin getActivePage findView NewSearchUI SEARCH_VIEW_ID viewPart SearchPreferencePage isViewBroughtToFront viewPart ISearchResultViewPart SearchPlugin getActivePage showView NewSearchUI SEARCH_VIEW_ID IWorkbenchPage VIEW_ACTIVATE viewPart PartInitException ExceptionHandler SearchMessages getString openResultView SearchMessages getString openResultView
public Query Manager get Search Manager return f Search Results Manager  QueryManager getSearchManager fSearchResultsManager
public Position Tracker get Position Tracker return f Position Tracker  PositionTracker getPositionTracker fPositionTracker
public void add Query Listener I Query Listener l get Search Manager add Query Listener l  addQueryListener IQueryListener getSearchManager addQueryListener
get Search Manager add Query Listener l public I Search Query get Queries return get Search Manager get Queries  getSearchManager addQueryListener ISearchQuery getQueries getSearchManager getQueries
return get Search Manager get Queries public void remove Query Listener I Query Listener l get Search Manager remove Query Listener l  getSearchManager getQueries removeQueryListener IQueryListener getSearchManager removeQueryListener
public void remove Query I Search Query query cancel Search query get Search Manager remove Query query f Search Jobs remove query  removeQuery ISearchQuery cancelSearch getSearchManager removeQuery fSearchJobs
public void add Query I Search Query query while get Search Manager get Queries length HISTORY COUNT remove Query get Search Manager get Oldest Query get Search Manager add Query query  addQuery ISearchQuery getSearchManager getQueries HISTORY_COUNT removeQuery getSearchManager getOldestQuery getSearchManager addQuery
public void remove All Queries for Iterator queries f Search Jobs key Set iterator queries has Next I Search Query query I Search Query queries next cancel Search query f Search Jobs clear get Search Manager remove All  removeAllQueries fSearchJobs keySet hasNext ISearchQuery ISearchQuery cancelSearch fSearchJobs getSearchManager removeAll

private List f Listeners public Query Manager super an Array List should be plenty fast enough few searches f Queries new Array List f Listeners new Array List fLRU new Array List  fListeners QueryManager ArrayList fQueries ArrayList fListeners ArrayList ArrayList
fLRU new Array List synchronized I Search Query get Queries I Search Query result new I Search Query f Queries size return I Search Query f Queries to Array result  ArrayList ISearchQuery getQueries ISearchQuery ISearchQuery fQueries ISearchQuery fQueries toArray
void remove Query I Search Query query synchronized f Queries f Queries remove query fLRU remove query fire Removed query  removeQuery ISearchQuery fQueries fQueries fireRemoved
void add Query I Search Query query synchronized f Queries if f Queries contains query return f Queries add 0 query fLRU add 0 query fire Added query  addQuery ISearchQuery fQueries fQueries fQueries fireAdded
void add Query Listener I Query Listener l synchronized f Listeners f Listeners add l  addQueryListener IQueryListener fListeners fListeners
void remove Query Listener I Query Listener l synchronized f Listeners f Listeners remove l  removeQueryListener IQueryListener fListeners fListeners
void fire Added I Search Query query Set copied Listeners new Hash Set synchronized f Listeners copied Listeners add All f Listeners Iterator listeners copied Listeners iterator while listeners has Next I Query Listener l I Query Listener listeners next l query Added query  fireAdded ISearchQuery copiedListeners HashSet fListeners copiedListeners addAll fListeners copiedListeners hasNext IQueryListener IQueryListener queryAdded
void fire Removed I Search Query query Set copied Listeners new Hash Set synchronized f Listeners copied Listeners add All f Listeners Iterator listeners copied Listeners iterator while listeners has Next I Query Listener l I Query Listener listeners next l query Removed query  fireRemoved ISearchQuery copiedListeners HashSet fListeners copiedListeners addAll fListeners copiedListeners hasNext IQueryListener IQueryListener queryRemoved
void fire Starting I Search Query query Set copied Listeners new Hash Set synchronized f Listeners copied Listeners add All f Listeners Iterator listeners copied Listeners iterator while listeners has Next I Query Listener l I Query Listener listeners next l query Starting query  fireStarting ISearchQuery copiedListeners HashSet fListeners copiedListeners addAll fListeners copiedListeners hasNext IQueryListener IQueryListener queryStarting
void fire Finished I Search Query query Set copied Listeners new Hash Set synchronized f Listeners copied Listeners add All f Listeners Iterator listeners copied Listeners iterator while listeners has Next I Query Listener l I Query Listener listeners next l query Finished query  fireFinished ISearchQuery copiedListeners HashSet fListeners copiedListeners addAll fListeners copiedListeners hasNext IQueryListener IQueryListener queryFinished
void remove All Set copied Searches new Hash Set synchronized f Queries copied Searches add All f Queries f Queries clear fLRU clear Iterator iter copied Searches iterator while iter has Next I Search Query element I Search Query iter next fire Removed element  removeAll copiedSearches HashSet fQueries copiedSearches addAll fQueries fQueries copiedSearches hasNext ISearchQuery ISearchQuery fireRemoved
void query Finished I Search Query query fire Finished query  queryFinished ISearchQuery fireFinished
void query Starting I Search Query query fire Starting query  queryStarting ISearchQuery fireStarting
void touch I Search Query query if fLRU contains query fLRU remove query fLRU add 0 query  ISearchQuery
I Search Query get Oldest Query if fLRU size 0 return I Search Query fLRU get fLRU size 1 return null  ISearchQuery getOldestQuery ISearchQuery

class Remove All Searches Action extends Action public Remove All Searches Action super Search Messages get String Remove All Searches Action label NON NLS 1 set Tool Tip Text Search Messages get String Remove All Searches Action tooltip NON NLS 1  RemoveAllSearchesAction RemoveAllSearchesAction SearchMessages getString RemoveAllSearchesAction setToolTipText SearchMessages getString RemoveAllSearchesAction
public void run I Search Query queries New SearchUI get Queries for int i 0 i queries length i if New SearchUI is Query Running queries i Internal SearchUI get Instance remove Query queries i  ISearchQuery NewSearchUI getQueries NewSearchUI isQueryRunning InternalSearchUI getInstance removeQuery

public Search Again Action Search View view set Text Search Messages get String Search Again Action label NON NLS 1 set Tool Tip Text Search Messages get String Search Again Action tooltip NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T TOOL Search Plugin Images IMG TOOL SEARCH f View view  SearchAgainAction SearchView setText SearchMessages getString SearchAgainAction setToolTipText SearchMessages getString SearchAgainAction SearchPluginImages setImageDescriptors SearchPluginImages T_TOOL SearchPluginImages IMG_TOOL_SEARCH fView
public void run final I Search Result search f View get Current Search Result if search null Internal SearchUI get Instance cancel Search search get Query Internal SearchUI get Instance run Again search get Query  ISearchResult fView getCurrentSearchResult InternalSearchUI getInstance cancelSearch getQuery InternalSearchUI getInstance runAgain getQuery

public Search Drop Down Action Search View search View set Text Search Messages get String Search Drop Down Action label NON NLS 1 set Tool Tip Text Search Messages get String Search Drop Down Action tooltip NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH HISTORY f Search View search View set Menu Creator this  SearchDropDownAction SearchView searchView setText SearchMessages getString SearchDropDownAction setToolTipText SearchMessages getString SearchDropDownAction SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_HISTORY fSearchView searchView setMenuCreator
public void dispose dispose Menu  disposeMenu
void dispose Menu if f Menu null f Menu dispose  disposeMenu fMenu fMenu
public Menu get Menu Menu parent return null  getMenu
public Menu get Menu Control parent I Search Query current Query null I Search Result current Search f Search View get Current Search Result if current Search null current Query current Search get Query dispose Menu f Menu new Menu parent I Search Query searches Internal SearchUI get Instance get Search Manager get Queries for int i 0 i searches length i I Search Result search searches i get Search Result String label search get Label String tooltip search get Tooltip Image Descriptor image search get Image Descriptor if Internal SearchUI get Instance is Query Running search get Query label label Search Messages get String Search Drop Down Action running message NON NLS 1 Show Search Action action new Show Search Action f Search View search label image tooltip if searches i equals current Query action set Checked true add Action To Menu f Menu action if searches length 0 new Menu Item f Menu SWT SEPARATOR add Action To Menu f Menu new Remove All Searches Action return f Menu  getMenu ISearchQuery currentQuery ISearchResult currentSearch fSearchView getCurrentSearchResult currentSearch currentQuery currentSearch getQuery disposeMenu fMenu ISearchQuery InternalSearchUI getInstance getSearchManager getQueries ISearchResult getSearchResult getLabel getTooltip ImageDescriptor getImageDescriptor InternalSearchUI getInstance isQueryRunning getQuery SearchMessages getString SearchDropDownAction ShowSearchAction ShowSearchAction fSearchView currentQuery setChecked addActionToMenu fMenu MenuItem fMenu addActionToMenu fMenu RemoveAllSearchesAction fMenu
protected void add Action To Menu Menu parent Action action Action Contribution Item item new Action Contribution Item action item fill parent 1  addActionToMenu ActionContributionItem ActionContributionItem
public void run new Show Searches Action f Search View run  ShowSearchesAction fSearchView

private Array List f Images new Array List public String get Text Object element return I Search Result element get Label  ArrayList fImages ArrayList getText ISearchResult getLabel
public Image get Image Object element Image Descriptor image Descriptor I Search Result element get Image Descriptor if image Descriptor null return null Image image image Descriptor create Image f Images add image return image  getImage ImageDescriptor imageDescriptor ISearchResult getImageDescriptor imageDescriptor imageDescriptor createImage fImages
public void dispose Iterator iter f Images iterator while iter has Next Image iter next dispose f Images null  fImages hasNext fImages
public Searches Dialog Shell parent List input super parent set Title Search Messages get String Searches Dialog title NON NLS 1 set Message Search Messages get String Searches Dialog message NON NLS 1 f Input input  SearchesDialog setTitle SearchMessages getString SearchesDialog setMessage SearchMessages getString SearchesDialog fInput
protected Label create Message Area Composite composite Label label new Label composite SWT WRAP label set Text get Message Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint convert Width In Chars To Pixels WIDTH IN CHARACTERS label set Layout Data gd apply Dialog Font label return label  createMessageArea setText getMessage GridData GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels WIDTH_IN_CHARACTERS setLayoutData applyDialogFont
f Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event get Button REMOVE ID set Enabled event get Selection is Empty  fViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getButton REMOVE_ID setEnabled getSelection isEmpty
final Table table f Viewer get Table table add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e ok Pressed  fViewer getTable addMouseListener MouseAdapter mouseDoubleClick MouseEvent okPressed
protected Control create Dialog Area Composite container Composite ancestor Composite super create Dialog Area container create Message Area ancestor Composite parent new Composite ancestor SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 parent set Layout layout f Viewer new Table Viewer parent SWT SINGLE SWT H SCROLL SWT V SCROLL SWT BORDER SWT FULL SELECTION f Viewer set Content Provider new List Content Provider f Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event get Button REMOVE ID set Enabled event get Selection is Empty final Table table f Viewer get Table table add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e ok Pressed f Viewer set Label Provider new Searches Label Provider Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint convert Height In Chars To Pixels 15 gd width Hint convert Width In Chars To Pixels WIDTH IN CHARACTERS table set Layout Data gd Button button create Button parent REMOVE ID Search Messages get String Searches Dialog remove label false NON NLS 1 Grid Data button get Layout Data vertical Alignment Grid Data BEGINNING apply Dialog Font ancestor set input selections last so all the widgets are created f Viewer set Input f Input List initial Selection get Initial Element Selections if initial Selection null f Viewer set Selection new Structured Selection initial Selection return table  createDialogArea createDialogArea createMessageArea GridLayout GridLayout numColumns setLayout fViewer TableViewer H_SCROLL V_SCROLL FULL_SELECTION fViewer setContentProvider ListContentProvider fViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getButton REMOVE_ID setEnabled getSelection isEmpty fViewer getTable addMouseListener MouseAdapter mouseDoubleClick MouseEvent okPressed fViewer setLabelProvider SearchesLabelProvider GridData GridData GridData FILL_BOTH heightHint convertHeightInCharsToPixels widthHint convertWidthInCharsToPixels WIDTH_IN_CHARACTERS setLayoutData createButton REMOVE_ID SearchMessages getString SearchesDialog GridData getLayoutData verticalAlignment GridData applyDialogFont fViewer setInput fInput initialSelection getInitialElementSelections initialSelection fViewer setSelection StructuredSelection initialSelection
protected void button Pressed int button Id if button Id REMOVE ID I Structured Selection selection I Structured Selection f Viewer get Selection Iterator search Results selection iterator while search Results has Next I Search Result result I Search Result search Results next Internal SearchUI get Instance remove Query result get Query f Input remove result f Viewer refresh return super button Pressed button Id  buttonPressed buttonId buttonId REMOVE_ID IStructuredSelection IStructuredSelection fViewer getSelection searchResults searchResults hasNext ISearchResult ISearchResult searchResults InternalSearchUI getInstance removeQuery getQuery fInput fViewer buttonPressed buttonId
protected void ok Pressed Build a list of selected children I Selection selection f Viewer get Selection if selection instanceof I Structured Selection set Result I Structured Selection f Viewer get Selection to List super ok Pressed  okPressed ISelection fViewer getSelection IStructuredSelection setResult IStructuredSelection fViewer getSelection toList okPressed

param key return public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public Search Page Registry String extension Point String target Class Attribute String id Attribute super f Extension To Instance new Hash Map f Class To Instance new Hash Map initialize Extension Cache extension Point target Class Attribute f Id Attribute id Attribute  SearchPageRegistry extensionPoint targetClassAttribute idAttribute fExtensionToInstance HashMap fClassToInstance HashMap initializeExtensionCache extensionPoint targetClassAttribute fIdAttribute idAttribute
private void initialize Extension Cache String extension Point String target Class Attribute f Target Class Name To Extension new Hash Map I Configuration Element extensions Platform get Extension Registry get Configuration Elements For extension Point for int i 0 i extensions length i f Target Class Name To Extension put extensions i get Attribute target Class Attribute extensions i  initializeExtensionCache extensionPoint targetClassAttribute fTargetClassNameToExtension HashMap IConfigurationElement getExtensionRegistry getConfigurationElementsFor extensionPoint fTargetClassNameToExtension getAttribute targetClassAttribute
public I Search Result Page get Extension Object Object element Class expected Type I Search Result Page page I Search Result Page f Class To Instance get element get Class if page null return page if f Class To Instance contains Key element get Class return null page internal Get Extension Object element expected Type if page null f Class To Instance put element get Class page return page  ISearchResultPage getExtensionObject expectedType ISearchResultPage ISearchResultPage fClassToInstance getClass fClassToInstance containsKey getClass internalGetExtensionObject expectedType fClassToInstance getClass
private I Search Result Page internal Get Extension Object Object element Class expected Type I Configuration Element config Element I Configuration Element f Target Class Name To Extension get element get Class get Name if config Element null if f Target Class Name To Extension contains Key element get Class get Name return null config Element get Config Element element get Class if config Element null f Target Class Name To Extension put element get Class get Name config Element if config Element null I Search Result Page lp I Search Result Page f Extension To Instance get config Element if lp null if f Extension To Instance contains Key config Element return null I Search Result Page instance try instance I Search Result Page config Element create Executable Extension class NON NLS 1 String id config Element get Attribute f Id Attribute instance setID id if expected Type is Assignable From instance get Class f Extension To Instance put config Element instance return instance catch Core Exception e programming error Log it Search Plugin get Default get Log log e get Status else return lp return null  ISearchResultPage internalGetExtensionObject expectedType IConfigurationElement configElement IConfigurationElement fTargetClassNameToExtension getClass getName configElement fTargetClassNameToExtension containsKey getClass getName configElement getConfigElement getClass configElement fTargetClassNameToExtension getClass getName configElement configElement ISearchResultPage ISearchResultPage fExtensionToInstance configElement fExtensionToInstance containsKey configElement ISearchResultPage ISearchResultPage configElement createExecutableExtension configElement getAttribute fIdAttribute expectedType isAssignableFrom getClass fExtensionToInstance configElement CoreException SearchPlugin getDefault getLog getStatus
private I Configuration Element get Config Element Class clazz return search In Supertypes clazz  IConfigurationElement getConfigElement searchInSupertypes
private I Configuration Element search In Supertypes Class clazz I Configuration Element found Extension null Class superclass clazz get Superclass if superclass null found Extension I Configuration Element f Target Class Name To Extension get superclass get Name if found Extension null return found Extension Class interfaces clazz get Interfaces for int i 0 i interfaces length i found Extension I Configuration Element f Target Class Name To Extension get interfaces i get Name if found Extension null return found Extension if superclass null found Extension search In Supertypes superclass if found Extension null return found Extension for int i 0 i interfaces length i found Extension search In Supertypes interfaces i if found Extension null return found Extension return null  IConfigurationElement searchInSupertypes IConfigurationElement foundExtension getSuperclass foundExtension IConfigurationElement fTargetClassNameToExtension getName foundExtension foundExtension getInterfaces foundExtension IConfigurationElement fTargetClassNameToExtension getName foundExtension foundExtension foundExtension searchInSupertypes foundExtension foundExtension foundExtension searchInSupertypes foundExtension foundExtension

public static void create Standard Groups I Contribution Manager menu menu add new Separator I Context Menu Constants GROUP NEW menu add new Group Marker I Context Menu Constants GROUP GOTO menu add new Group Marker I Context Menu Constants GROUP OPEN menu add new Separator I Context Menu Constants GROUP SHOW menu add new Separator I Context Menu Constants GROUP BUILD menu add new Separator I Context Menu Constants GROUP REORGANIZE menu add new Separator I Context Menu Constants GROUP REMOVE MATCHES menu add new Group Marker I Context Menu Constants GROUP GENERATE menu add new Separator I Workbench Action Constants MB ADDITIONS menu add new Separator I Context Menu Constants GROUP VIEWER SETUP menu add new Separator I Context Menu Constants GROUP PROPERTIES menu add new Separator I Context Menu Constants GROUP SEARCH  createStandardGroups IContributionManager IContextMenuConstants GROUP_NEW GroupMarker IContextMenuConstants GROUP_GOTO GroupMarker IContextMenuConstants GROUP_OPEN IContextMenuConstants GROUP_SHOW IContextMenuConstants GROUP_BUILD IContextMenuConstants GROUP_REORGANIZE IContextMenuConstants GROUP_REMOVE_MATCHES GroupMarker IContextMenuConstants GROUP_GENERATE IWorkbenchActionConstants MB_ADDITIONS IContextMenuConstants GROUP_VIEWER_SETUP IContextMenuConstants GROUP_PROPERTIES IContextMenuConstants GROUP_SEARCH
class Dummy Part implements I Workbench Part public void add Property Listener I Property Listener listener dummy  DummyPart IWorkbenchPart addPropertyListener IPropertyListener
class Dummy Part implements I Workbench Part public void add Property Listener I Property Listener listener dummy public void create Part Control Composite parent dummy  DummyPart IWorkbenchPart addPropertyListener IPropertyListener createPartControl
public void add Property Listener I Property Listener listener dummy public void create Part Control Composite parent dummy public void dispose dummy  addPropertyListener IPropertyListener createPartControl
public void create Part Control Composite parent dummy public void dispose dummy public I Workbench Part Site get Site return null  createPartControl IWorkbenchPartSite getSite
public void dispose dummy public I Workbench Part Site get Site return null public String get Title return null  IWorkbenchPartSite getSite getTitle
public I Workbench Part Site get Site return null public String get Title return null public Image get Title Image return null  IWorkbenchPartSite getSite getTitle getTitleImage
public String get Title return null public Image get Title Image return null public String get Title Tool Tip return null  getTitle getTitleImage getTitleToolTip
public Image get Title Image return null public String get Title Tool Tip return null public void remove Property Listener I Property Listener listener dummy  getTitleImage getTitleToolTip removePropertyListener IPropertyListener
public String get Title Tool Tip return null public void remove Property Listener I Property Listener listener dummy public void set Focus dummy  getTitleToolTip removePropertyListener IPropertyListener setFocus
public void remove Property Listener I Property Listener listener dummy public void set Focus dummy public Object get Adapter Class adapter return null  removePropertyListener IPropertyListener setFocus getAdapter
private String f Id public void create Control Composite parent f Control new Tree parent SWT NONE f Control set Text Search Messages get String Search View empty message NON NLS 1  fId createControl fControl fControl setText SearchMessages getString SearchView
public Control get Control return f Control  getControl fControl
public void set Focus if f Control null f Control set Focus  setFocus fControl fControl setFocus
see org eclipse search2 ui I Search Results Page set Input org eclipse search2 ui I Search Result java lang Object public void set Input I Search Result search Object view State do nothing  ISearchResultsPage setInput ISearchResult setInput ISearchResult viewState
see org eclipse search2 ui I Search Results Page set View Part org eclipse search2 ui I Search Result View public void set View Part I Search Result View Part part do nothing  ISearchResultsPage setViewPart ISearchResultView setViewPart ISearchResultViewPart
public Object getUI State empty implementation return null  getUIState
public void init I Page Site page Site super init page Site get Site set Selection Provider null  IPageSite pageSite pageSite getSite setSelectionProvider
see org eclipse search ui I Search Result Page save State org eclipse ui I Memento public void save State I Memento memento do nothing  ISearchResultPage saveState IMemento saveState IMemento
see org eclipse search ui I Search Result Page restore State org eclipse ui I Memento public void restore State I Memento memento do nothing  ISearchResultPage restoreState IMemento restoreState IMemento
see org eclipse search ui I Search Result Page setID java lang String public void setID String id f Id id  ISearchResultPage fId
see org eclipse search ui I Search Result Page getID public String getID return f Id  ISearchResultPage fId
see org eclipse search ui I Search Result Page get Label public String get Label return NON NLS 1  ISearchResultPage getLabel getLabel
public Search View super f Parts To Pages new Hash Map f Pages To Parts new Hash Map set Title Image Search Plugin Images get Search Plugin Images T VIEW f Search View Page Service new Search Page Registry org eclipse search search Result View Pages search Result Class id NON NLS 1 NON NLS 2 NON NLS 3 f Search View States new Hash Map  SearchView fPartsToPages HashMap fPagesToParts HashMap setTitleImage SearchPluginImages SearchPluginImages T_VIEW fSearchViewPageService SearchPageRegistry searchResultViewPages searchResultClass fSearchViewStates HashMap
protected I Page create Default Page Page Book book I Page Book View Page page new Empty Search View page create Control book init Page page Dummy Part part new Dummy Part f Parts To Pages put part page f Pages To Parts put page part f Default Part part return page  IPage createDefaultPage PageBook IPageBookViewPage EmptySearchView createControl initPage DummyPart DummyPart fPartsToPages fPagesToParts fDefaultPart
protected Page Rec do Create Page I Workbench Part part I Page Book View Page page I Page Book View Page f Parts To Pages get part init Page page page create Control get Page Book Page Rec rec new Page Rec part page return rec  PageRec doCreatePage IWorkbenchPart IPageBookViewPage IPageBookViewPage fPartsToPages initPage createControl getPageBook PageRec PageRec
protected void do Destroy Page I Workbench Part part Page Rec page Record I Page page page Record page page dispose page Record dispose empty cross reference cache f Parts To Pages remove part  doDestroyPage IWorkbenchPart PageRec pageRecord IPage pageRecord pageRecord fPartsToPages
protected I Workbench Part get Bootstrap Part return null  IWorkbenchPart getBootstrapPart
protected boolean is Important I Workbench Part part return part instanceof Dummy Part  isImportant IWorkbenchPart DummyPart
public void show Search Result I Search Result search if search null Internal SearchUI get Instance get Search Manager touch search get Query I Search Result Page page null if search null page f Search View Page Service get Extension Object search I Search Result Page class if page null String format Search Messages get String Search View error no Result Page NON NLS 1 String message Message Format format format new Object search get Class get Name Search Plugin log new Status I Status ERROR Search Plugin getID 0 message null return detach the previous page I Search Result Page current Page I Search Result Page get Current Page Object ui State current Page getUI State if f Current Search null if ui State null f Search View States put f Current Search ui State current Page set Input null null switch to a new page if page null page current Page I Workbench Part part I Workbench Part f Pages To Parts get page if part null part new Dummy Part f Pages To Parts put page part f Parts To Pages put part page page set View Part this part Activated part connect to the new pages f Current Search search if page null page set Input search f Search View States get search update Label update Cancel Action  showSearchResult ISearchResult InternalSearchUI getInstance getSearchManager getQuery ISearchResultPage fSearchViewPageService getExtensionObject ISearchResultPage SearchMessages getString SearchView noResultPage MessageFormat getClass getName SearchPlugin IStatus SearchPlugin ISearchResultPage currentPage ISearchResultPage getCurrentPage uiState currentPage getUIState fCurrentSearch uiState fSearchViewStates fCurrentSearch uiState currentPage setInput currentPage IWorkbenchPart IWorkbenchPart fPagesToParts DummyPart fPagesToParts fPartsToPages setViewPart partActivated fCurrentSearch setInput fSearchViewStates updateLabel updateCancelAction
public void update Label I Search Result Page page get Active Page String label NON NLS 1 if page null label page get Label set Content Description label  updateLabel ISearchResultPage getActivePage getLabel setContentDescription
public I Search Result get Current Search Result return f Current Search  ISearchResult getCurrentSearchResult fCurrentSearch
public void create Part Control Composite parent super create Part Control parent create Actions initialize Tool Bar Internal SearchUI get Instance get Search Manager add Query Listener this  createPartControl createPartControl createActions initializeToolBar InternalSearchUI getInstance getSearchManager addQueryListener
private void initialize Tool Bar I Tool Bar Manager tbm get View Site get Action Bars get Tool Bar Manager create Standard Groups tbm tbm append To Group I Context Menu Constants GROUP SEARCH f Cancel Action NON NLS 1 tbm append To Group I Context Menu Constants GROUP SEARCH f Searches Drop Down Action NON NLS 1 get View Site get Action Bars update Action Bars  initializeToolBar IToolBarManager getViewSite getActionBars getToolBarManager createStandardGroups appendToGroup IContextMenuConstants GROUP_SEARCH fCancelAction appendToGroup IContextMenuConstants GROUP_SEARCH fSearchesDropDownAction getViewSite getActionBars updateActionBars
private void create Actions f Searches Drop Down Action new Search Drop Down Action this f Searches Drop Down Action set Enabled Internal SearchUI get Instance get Search Manager get Queries length 0 f Search Again Action new Search Again Action this hackery to get the shortcut to show up f Search Again Action set Action Definition Id org eclipse ui file refresh NON NLS 1 f Cancel Action new Cancel Search Action this f Cancel Action set Enabled false  createActions fSearchesDropDownAction SearchDropDownAction fSearchesDropDownAction setEnabled InternalSearchUI getInstance getSearchManager getQueries fSearchAgainAction SearchAgainAction fSearchAgainAction setActionDefinitionId fCancelAction CancelSearchAction fCancelAction setEnabled
public void dispose Internal SearchUI get Instance get Search Manager remove Query Listener this Annotation Managers search Result Activated get Site get Workbench Window null super dispose  InternalSearchUI getInstance getSearchManager removeQueryListener AnnotationManagers searchResultActivated getSite getWorkbenchWindow
public void query Starting I Search Query query update Cancel Action  queryStarting ISearchQuery updateCancelAction
public void query Finished I Search Query query update Cancel Action  queryFinished ISearchQuery updateCancelAction
private void update Cancel Action I Search Result result get Current Search Result boolean query Running false if result null query Running Internal SearchUI get Instance is Query Running result get Query f Cancel Action set Enabled query Running  updateCancelAction ISearchResult getCurrentSearchResult queryRunning queryRunning InternalSearchUI getInstance isQueryRunning getQuery fCancelAction setEnabled queryRunning
public void query Added I Search Query query show Search Result query get Search Result f Searches Drop Down Action set Enabled Internal SearchUI get Instance get Search Manager get Queries length 0  queryAdded ISearchQuery showSearchResult getSearchResult fSearchesDropDownAction setEnabled InternalSearchUI getInstance getSearchManager getQueries
public void query Removed I Search Query query Internal SearchUI get Instance cancel Search query if query get Search Result equals f Current Search show Search Result null part Activated f Default Part f Search View States remove query get Search Result f Searches Drop Down Action dispose Menu f Searches Drop Down Action set Enabled Internal SearchUI get Instance get Search Manager get Queries length 0  queryRemoved ISearchQuery InternalSearchUI getInstance cancelSearch getSearchResult fCurrentSearch showSearchResult partActivated fDefaultPart fSearchViewStates getSearchResult fSearchesDropDownAction disposeMenu fSearchesDropDownAction setEnabled InternalSearchUI getInstance getSearchManager getQueries
public void fill Context Menu I Menu Manager menu Manager I Search Result result get Current Search Result if result null f Search Again Action set Enabled result get Query can Rerun menu Manager append To Group I Context Menu Constants GROUP SEARCH f Search Again Action Menu Manager show In Sub Menu new Menu Manager Search Messages get String Search View show In menu NON NLS 1 show In Sub Menu add Contribution Item Factory VIEWS SHOW IN create get View Site get Workbench Window menu Manager append To Group I Context Menu Constants GROUP OPEN show In Sub Menu  fillContextMenu IMenuManager menuManager ISearchResult getCurrentSearchResult fSearchAgainAction setEnabled getQuery canRerun menuManager appendToGroup IContextMenuConstants GROUP_SEARCH fSearchAgainAction MenuManager showInSubMenu MenuManager SearchMessages getString SearchView showIn showInSubMenu ContributionItemFactory VIEWS_SHOW_IN getViewSite getWorkbenchWindow menuManager appendToGroup IContextMenuConstants GROUP_OPEN showInSubMenu
Methods related to saving page state inherit Doc public void save State I Memento memento for Iterator pages f Pages To Parts key Set iterator pages has Next I Search Result Page page I Search Result Page pages next I Memento child memento create Child MEMENTO TYPE page getID NON NLS 1 page save State child  inheritDoc saveState IMemento fPagesToParts keySet hasNext ISearchResultPage ISearchResultPage IMemento createChild MEMENTO_TYPE saveState
inherit Doc public void init I View Site site I Memento memento throws Part Init Exception super init site memento create Standard Groups site get Action Bars get Menu Manager f Page State memento I Workbench Site Progress Service progress Service get Progress Service if progress Service null progress Service show Busy For Family Internal SearchUI FAMILY SEARCH  inheritDoc IViewSite IMemento PartInitException createStandardGroups getActionBars getMenuManager fPageState IWorkbenchSiteProgressService progressService getProgressService progressService progressService showBusyForFamily InternalSearchUI FAMILY_SEARCH
inherit Doc protected void init Page I Page Book View Page page super init Page page page get Site get Action Bars set Global Action Handler Action Factory REFRESH get Id f Search Again Action page get Site get Action Bars update Action Bars I Search Result Page sr Page I Search Result Page page I Memento memento null if f Page State null I Memento mementos f Page State get Children MEMENTO TYPE for int i 0 i mementos length i if mementos i getID equals sr Page getID memento mementos i break sr Page restore State memento  inheritDoc initPage IPageBookViewPage initPage getSite getActionBars setGlobalActionHandler ActionFactory getId fSearchAgainAction getSite getActionBars updateActionBars ISearchResultPage srPage ISearchResultPage IMemento fPageState IMemento fPageState getChildren MEMENTO_TYPE srPage srPage restoreState
public void set Focus I Page current Page get Current Page if current Page null current Page set Focus else super set Focus  setFocus IPage currentPage getCurrentPage currentPage currentPage setFocus setFocus
public I Search Result Page get Active Page I Page page get Current Page if page instanceof I Search Result Page return I Search Result Page page return null  ISearchResultPage getActivePage IPage getCurrentPage ISearchResultPage ISearchResultPage
public I Workbench Site Progress Service get Progress Service I Workbench Site Progress Service service null Object site Service get Site get Adapter I Workbench Site Progress Service class if site Service null service I Workbench Site Progress Service site Service return service  IWorkbenchSiteProgressService getProgressService IWorkbenchSiteProgressService siteService getSite getAdapter IWorkbenchSiteProgressService siteService IWorkbenchSiteProgressService siteService
public void show Busy boolean busy super show Busy busy get Progress Service warn Of Content Change  showBusy showBusy getProgressService warnOfContentChange
if adapter I Show In Source class return new I Show In Source public Show In Context get Show In Context return new Show In Context null get Selection Provider get Selection  IShowInSource IShowInSource ShowInContext getShowInContext ShowInContext getSelectionProvider getSelection
public Object get Adapter Class adapter Object super Adapter super get Adapter adapter if super Adapter null return super Adapter if adapter I Show In Source class return new I Show In Source public Show In Context get Show In Context return new Show In Context null get Selection Provider get Selection return null  getAdapter superAdapter getAdapter superAdapter superAdapter IShowInSource IShowInSource ShowInContext getShowInContext ShowInContext getSelectionProvider getSelection

Create a new instance of this class public Show Search Action Search View view I Search Result search String text Image Descriptor image String tooltip f Search search f View view fix for bug 38049 if text index Of 0 text set Text text set Image Descriptor image set Tool Tip Text tooltip  ShowSearchAction SearchView ISearchResult ImageDescriptor fSearch fView indexOf setText setImageDescriptor setToolTipText
public void run f View show Search Result f Search  fView showSearchResult fSearch

Create a new instance of this class public Show Searches Action Search View search View super Search Messages get String Show Searches Action label NON NLS 1 set Tool Tip Text Search Messages get String Show Searches Action tooltip NON NLS 1 f Search View search View  ShowSearchesAction SearchView searchView SearchMessages getString ShowSearchesAction setToolTipText SearchMessages getString ShowSearchesAction fSearchView searchView
public void run Query Manager sm Internal SearchUI get Instance get Search Manager I Search Query queries sm get Queries Array List input new Array List for int j 0 j queries length j I Search Result search queries j get Search Result input add search Searches Dialog dlg new Searches Dialog Search Plugin get Active Workbench Shell input I Search Result current f Search View get Current Search Result if current null Object selected new Object 1 selected 0 current dlg set Initial Selections selected if dlg open Window OK List result Arrays as List dlg get Result if result null result size 1 f Search View show Search Result I Search Result result get 0  QueryManager InternalSearchUI getInstance getSearchManager ISearchQuery getQueries ArrayList ArrayList ISearchResult getSearchResult SearchesDialog SearchesDialog SearchPlugin getActiveWorkbenchShell ISearchResult fSearchView getCurrentSearchResult setInitialSelections asList getResult fSearchView showSearchResult ISearchResult

public Annotation Highlighter I Annotation Model model I Document document f Model model f Document document f Matches To Annotations new Hash Map  AnnotationHighlighter IAnnotationModel IDocument fModel fDocument fMatchesToAnnotations HashMap
public void add Highlights Match matches Hash Map map new Hash Map matches length for int i 0 i matches length i int offset matches i get Offset int length matches i get Length if offset 0 length 0 try Position position create Position matches i if position null Annotation annotation new Annotation f Annotation Type Lookup get Annotation Type New SearchUI SEARCH MARKER I Marker SEVERITY INFO true null f Matches To Annotations put matches i annotation map put annotation position catch Bad Location Exception e Search Plugin log new Status I Status ERROR Search Plugin getID 0 Search Messages get String Annotation Highlighter error bad Location e NON NLS 1 add Annotations map  addHighlights HashMap HashMap getOffset getLength createPosition fAnnotationTypeLookup getAnnotationType NewSearchUI SEARCH_MARKER IMarker SEVERITY_INFO fMatchesToAnnotations BadLocationException SearchPlugin IStatus SearchPlugin SearchMessages getString AnnotationHighlighter badLocation addAnnotations
private Position create Position Match match throws Bad Location Exception Position position Internal SearchUI get Instance get Position Tracker get Current Position match if position null position new Position match get Offset match get Length else need to clone position can t have it twice in a document position new Position position get Offset position get Length if match get Base Unit Match UNIT LINE if f Document null position Position Tracker convert To Character Position position f Document else Search Plugin log new Status I Status ERROR Search Plugin getID 0 Search Messages get String Annotation Highlighter error no Document null NON NLS 1 return null return position  createPosition BadLocationException InternalSearchUI getInstance getPositionTracker getCurrentPosition getOffset getLength getOffset getLength getBaseUnit UNIT_LINE fDocument PositionTracker convertToCharacterPosition fDocument SearchPlugin IStatus SearchPlugin SearchMessages getString AnnotationHighlighter noDocument
public void remove Highlights Match matches Hash Set annotations new Hash Set matches length for int i 0 i matches length i Annotation annotation Annotation f Matches To Annotations remove matches i if annotation null annotations add annotation remove Annotations annotations  removeHighlights HashSet HashSet fMatchesToAnnotations removeAnnotations
private void add Annotations Map annotation To Position Map if f Model instanceof I Annotation Model Extension I Annotation Model Extension ame I Annotation Model Extension f Model ame replace Annotations new Annotation 0 annotation To Position Map else for Iterator elements annotation To Position Map key Set iterator elements has Next Annotation element Annotation elements next Position p Position annotation To Position Map get element f Model add Annotation element p  addAnnotations annotationToPositionMap fModel IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension fModel replaceAnnotations annotationToPositionMap annotationToPositionMap keySet hasNext annotationToPositionMap fModel addAnnotation
Removes annotations from the given annotation model The default implementation works for editors that implement code I Text Editor code Subclasses may override this method param annotations A set containing the annotations to be removed see Annotation private void remove Annotations Set annotations if f Model instanceof I Annotation Model Extension I Annotation Model Extension ame I Annotation Model Extension f Model Annotation annotation Array new Annotation annotations size ame replace Annotations Annotation annotations to Array annotation Array Collections EMPTY MAP else for Iterator iter annotations iterator iter has Next Annotation element Annotation iter next f Model remove Annotation element  ITextEditor removeAnnotations fModel IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension fModel annotationArray replaceAnnotations toArray annotationArray EMPTY_MAP hasNext fModel removeAnnotation
public void remove All Set match Set f Matches To Annotations key Set Match matches new Match match Set size remove Highlights Match match Set to Array matches  removeAll matchSet fMatchesToAnnotations keySet matchSet removeHighlights matchSet toArray
protected void handle Content Replaced I File Buffer buffer if buffer instanceof I Text File Buffer return I Text File Buffer text Buffer I Text File Buffer buffer if f Document null f Document equals text Buffer get Document Match matches new Match f Matches To Annotations key Set size f Matches To Annotations key Set to Array matches remove All add Highlights matches  handleContentReplaced IFileBuffer ITextFileBuffer ITextFileBuffer textBuffer ITextFileBuffer fDocument fDocument textBuffer getDocument fMatchesToAnnotations keySet fMatchesToAnnotations keySet toArray removeAll addHighlights

fg Manager Map new Hash Map I Window Listener listener new I Window Listener public void window Activated I Workbench Window window ignore  fgManagerMap HashMap IWindowListener IWindowListener windowActivated IWorkbenchWindow
public void window Deactivated I Workbench Window window ignore  windowDeactivated IWorkbenchWindow
public void window Closed I Workbench Window window dispose Annotation Manager window  windowClosed IWorkbenchWindow disposeAnnotationManager
public void window Opened I Workbench Window window ignore  windowOpened IWorkbenchWindow
private static void dispose Annotation Manager I Workbench Window window Window Annotation Manager mgr Window Annotation Manager fg Manager Map remove window if mgr null mgr dispose  disposeAnnotationManager IWorkbenchWindow WindowAnnotationManager WindowAnnotationManager fgManagerMap
public static void search Result Activated I Workbench Window window Abstract Text Search Result result Window Annotation Manager mgr Window Annotation Manager fg Manager Map get window if mgr null mgr new Window Annotation Manager window fg Manager Map put window mgr mgr set Search Result result  searchResultActivated IWorkbenchWindow AbstractTextSearchResult WindowAnnotationManager WindowAnnotationManager fgManagerMap WindowAnnotationManager fgManagerMap setSearchResult

private Annotation Type Lookup f Annotation Type Lookup EditorsUI get Annotation Type Lookup public Editor Access Highlighter I Search Editor Access editor Access f Editor Acess editor Access f Matches To Annotations new Hash Map  AnnotationTypeLookup fAnnotationTypeLookup getAnnotationTypeLookup EditorAccessHighlighter ISearchEditorAccess editorAccess fEditorAcess editorAccess fMatchesToAnnotations HashMap
public void add Highlights Match matches Map maps By Annotation Model new Hash Map for int i 0 i matches length i int offset matches i get Offset int length matches i get Length if offset 0 length 0 try Position position create Position matches i if position null Map map get Map maps By Annotation Model matches i if map null Annotation annotation new Annotation f Annotation Type Lookup get Annotation Type New SearchUI SEARCH MARKER I Marker SEVERITY INFO true null f Matches To Annotations put matches i annotation map put annotation position catch Bad Location Exception e Search Plugin log new Status I Status ERROR Search Plugin getID 0 Search Messages get String Editor Access Highlighter error bad Location e NON NLS 1 for Iterator maps maps By Annotation Model key Set iterator maps has Next I Annotation Model model I Annotation Model maps next Map position Map Map maps By Annotation Model get model add Annotations model position Map  addHighlights mapsByAnnotationModel HashMap getOffset getLength createPosition getMap mapsByAnnotationModel fAnnotationTypeLookup getAnnotationType NewSearchUI SEARCH_MARKER IMarker SEVERITY_INFO fMatchesToAnnotations BadLocationException SearchPlugin IStatus SearchPlugin SearchMessages getString EditorAccessHighlighter badLocation mapsByAnnotationModel keySet hasNext IAnnotationModel IAnnotationModel positionMap mapsByAnnotationModel addAnnotations positionMap
private Position create Position Match match throws Bad Location Exception Position position Internal SearchUI get Instance get Position Tracker get Current Position match if position null position new Position match get Offset match get Length else need to clone position can t have it twice in a document position new Position position get Offset position get Length if match get Base Unit Match UNIT LINE I Document doc f Editor Acess get Document match if doc null position Position Tracker convert To Character Position position doc else Search Plugin log new Status I Status ERROR Search Plugin getID 0 Search Messages get String Annotation Highlighter error no Document null NON NLS 1 return null return position  createPosition BadLocationException InternalSearchUI getInstance getPositionTracker getCurrentPosition getOffset getLength getOffset getLength getBaseUnit UNIT_LINE IDocument fEditorAcess getDocument PositionTracker convertToCharacterPosition SearchPlugin IStatus SearchPlugin SearchMessages getString AnnotationHighlighter noDocument
private Map get Map Map maps By Annotation Model Match match I Annotation Model model f Editor Acess get Annotation Model match if model null return null Hash Map map Hash Map maps By Annotation Model get model if map null map new Hash Map maps By Annotation Model put model map return map  getMap mapsByAnnotationModel IAnnotationModel fEditorAcess getAnnotationModel HashMap HashMap mapsByAnnotationModel HashMap mapsByAnnotationModel
private Set get Set Map sets By Annotation Model Match match I Annotation Model model f Editor Acess get Annotation Model match if model null return null Hash Set set Hash Set sets By Annotation Model get model if set null set new Hash Set sets By Annotation Model put model set return set  getSet setsByAnnotationModel IAnnotationModel fEditorAcess getAnnotationModel HashSet HashSet setsByAnnotationModel HashSet setsByAnnotationModel
public void remove Highlights Match matches Map sets By Annotation Model new Hash Map for int i 0 i matches length i Annotation annotation Annotation f Matches To Annotations remove matches i if annotation null Set annotations get Set sets By Annotation Model matches i if annotations null annotations add annotation for Iterator maps sets By Annotation Model key Set iterator maps has Next I Annotation Model model I Annotation Model maps next Set set Set sets By Annotation Model get model remove Annotations model set  removeHighlights setsByAnnotationModel HashMap fMatchesToAnnotations getSet setsByAnnotationModel setsByAnnotationModel keySet hasNext IAnnotationModel IAnnotationModel setsByAnnotationModel removeAnnotations
private void add Annotations I Annotation Model model Map annotation To Position Map if model instanceof I Annotation Model Extension I Annotation Model Extension ame I Annotation Model Extension model ame replace Annotations new Annotation 0 annotation To Position Map else for Iterator elements annotation To Position Map key Set iterator elements has Next Annotation element Annotation elements next Position p Position annotation To Position Map get element model add Annotation element p  addAnnotations IAnnotationModel annotationToPositionMap IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension replaceAnnotations annotationToPositionMap annotationToPositionMap keySet hasNext annotationToPositionMap addAnnotation
Removes annotations from the given annotation model The default implementation works for editors that implement code I Text Editor code Subclasses may override this method param annotations A set containing the annotations to be removed see Annotation private void remove Annotations I Annotation Model model Set annotations if model instanceof I Annotation Model Extension I Annotation Model Extension ame I Annotation Model Extension model Annotation annotation Array new Annotation annotations size ame replace Annotations Annotation annotations to Array annotation Array Collections EMPTY MAP else for Iterator iter annotations iterator iter has Next Annotation element Annotation iter next model remove Annotation element  ITextEditor removeAnnotations IAnnotationModel IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension annotationArray replaceAnnotations toArray annotationArray EMPTY_MAP hasNext removeAnnotation
public void remove All Set match Set f Matches To Annotations key Set Match matches new Match match Set size remove Highlights Match match Set to Array matches  removeAll matchSet fMatchesToAnnotations keySet matchSet removeHighlights matchSet toArray
protected void handle Content Replaced I File Buffer buffer if buffer instanceof I Text File Buffer return I Document document null I Text File Buffer text Buffer I Text File Buffer buffer for Iterator matches f Matches To Annotations key Set iterator matches has Next Match match Match matches next document f Editor Acess get Document match if document null break if document null document equals text Buffer get Document Match matches new Match f Matches To Annotations key Set size f Matches To Annotations key Set to Array matches remove All add Highlights matches  handleContentReplaced IFileBuffer ITextFileBuffer IDocument ITextFileBuffer textBuffer ITextFileBuffer fMatchesToAnnotations keySet hasNext fEditorAcess getDocument textBuffer getDocument fMatchesToAnnotations keySet fMatchesToAnnotations keySet toArray removeAll addHighlights

public Editor Annotation Manager I Editor Part editor Part f Editor editor Part f Highlighter create Highlighter editor Part  EditorAnnotationManager IEditorPart editorPart fEditor editorPart fHighlighter createHighlighter editorPart
public static final void debug Set Highlighter Type int type fg Highlighter Type type  debugSetHighlighterType fgHighlighterType
void dispose remove Annotations if f Highlighter null f Highlighter dispose if f Result null f Result remove Listener this  removeAnnotations fHighlighter fHighlighter fResult fResult removeListener
public synchronized void set Search Result Abstract Text Search Result result if result f Result return if f Result null remove Annotations f Result remove Listener this f Result result if f Result null f Result add Listener this add Annotations  setSearchResult AbstractTextSearchResult fResult fResult removeAnnotations fResult removeListener fResult fResult fResult addListener addAnnotations
public synchronized void search Result Changed Search Result Event e if f Result null return if e instanceof Match Event Match Event me Match Event e Match matches me get Matches int kind me get Kind for int i 0 i matches length i update Match matches i kind else if e instanceof Remove All Event remove Annotations  searchResultChanged SearchResultEvent fResult MatchEvent MatchEvent MatchEvent getMatches getKind updateMatch RemoveAllEvent removeAnnotations
private void update Match Match match int kind I Editor Match Adapter adapter f Result get Editor Match Adapter if f Editor null adapter null adapter is Shown In Editor match f Editor if kind Match Event ADDED add Annotations new Match match else remove Annotations new Match match  updateMatch IEditorMatchAdapter fResult getEditorMatchAdapter fEditor isShownInEditor fEditor MatchEvent addAnnotations removeAnnotations
private void remove Annotations if f Highlighter null f Highlighter remove All  removeAnnotations fHighlighter fHighlighter removeAll
private static Highlighter create Highlighter I Editor Part editor if fg Highlighter Type HIGHLLIGHTER ANY return debug Create Highlighter editor I Search Editor Access access I Search Editor Access editor get Adapter I Search Editor Access class if access null return new Editor Access Highlighter access I Annotation Model model get Annotation Model editor if model null return new Annotation Highlighter model get Document editor I Editor Input input editor get Editor Input if input instanceof I File Editor Input I File file I File Editor Input input get File if file null return new Marker Highlighter file return null  createHighlighter IEditorPart fgHighlighterType HIGHLLIGHTER_ANY debugCreateHighlighter ISearchEditorAccess ISearchEditorAccess getAdapter ISearchEditorAccess EditorAccessHighlighter IAnnotationModel getAnnotationModel AnnotationHighlighter getDocument IEditorInput getEditorInput IFileEditorInput IFile IFileEditorInput getFile MarkerHighlighter
private static Highlighter debug Create Highlighter I Editor Part editor if fg Highlighter Type HIGHLIGHTER ANNOTATION I Annotation Model model get Annotation Model editor if model null return new Annotation Highlighter model get Document editor else if fg Highlighter Type HIGHLIGHTER MARKER I Editor Input input editor get Editor Input if input instanceof I File Editor Input I File file I File Editor Input input get File if file null return new Marker Highlighter file else if fg Highlighter Type HIGHLIGHTER EDITOR ACCESS I Search Editor Access access I Search Editor Access editor get Adapter I Search Editor Access class if access null return new Editor Access Highlighter access return null  debugCreateHighlighter IEditorPart fgHighlighterType HIGHLIGHTER_ANNOTATION IAnnotationModel getAnnotationModel AnnotationHighlighter getDocument fgHighlighterType HIGHLIGHTER_MARKER IEditorInput getEditorInput IFileEditorInput IFile IFileEditorInput getFile MarkerHighlighter fgHighlighterType HIGHLIGHTER_EDITOR_ACCESS ISearchEditorAccess ISearchEditorAccess getAdapter ISearchEditorAccess EditorAccessHighlighter
private void add Annotations if f Result null return I Editor Match Adapter match Adapter f Result get Editor Match Adapter if match Adapter null return Match matches match Adapter compute Contained Matches f Result f Editor if matches null return add Annotations matches  addAnnotations fResult IEditorMatchAdapter matchAdapter fResult getEditorMatchAdapter matchAdapter matchAdapter computeContainedMatches fResult fEditor addAnnotations
private void add Annotations Match matches if f Highlighter null f Highlighter add Highlights matches  addAnnotations fHighlighter fHighlighter addHighlights
private void remove Annotations Match matches if f Highlighter null f Highlighter remove Highlights matches  removeAnnotations fHighlighter fHighlighter removeHighlights
private static I Annotation Model get Annotation Model I Workbench Part part I Annotation Model model null model I Annotation Model part get Adapter I Annotation Model class if model null I Text Editor text Editor null if part instanceof I Text Editor text Editor I Text Editor part if text Editor null I Document Provider dp text Editor get Document Provider if dp null model dp get Annotation Model text Editor get Editor Input return model  IAnnotationModel getAnnotationModel IWorkbenchPart IAnnotationModel IAnnotationModel getAdapter IAnnotationModel ITextEditor textEditor ITextEditor textEditor ITextEditor textEditor IDocumentProvider textEditor getDocumentProvider getAnnotationModel textEditor getEditorInput
private static I Document get Document I Workbench Part part I Document doc null doc I Document part get Adapter I Document class if doc null I Text Editor text Editor null if part instanceof I Text Editor text Editor I Text Editor part if text Editor null I Document Provider dp text Editor get Document Provider if dp null doc dp get Document text Editor get Editor Input return doc  IDocument getDocument IWorkbenchPart IDocument IDocument getAdapter IDocument ITextEditor textEditor ITextEditor textEditor ITextEditor textEditor IDocumentProvider textEditor getDocumentProvider getDocument textEditor getEditorInput

public Highlighter f Buffer Listener new I File Buffer Listener public void buffer Created I File Buffer buffer  fBufferListener IFileBufferListener bufferCreated IFileBuffer
public void buffer Disposed I File Buffer buffer  bufferDisposed IFileBuffer
public void buffer Content About To Be Replaced I File Buffer buffer  bufferContentAboutToBeReplaced IFileBuffer
public void buffer Content Replaced I File Buffer buffer handle Content Replaced buffer  bufferContentReplaced IFileBuffer handleContentReplaced
public void state Changing I File Buffer buffer  stateChanging IFileBuffer
public void dirty State Changed I File Buffer buffer boolean is Dirty  dirtyStateChanged IFileBuffer isDirty
public void state Validation Changed I File Buffer buffer boolean is State Validated  stateValidationChanged IFileBuffer isStateValidated
public void underlying File Moved I File Buffer buffer I Path path  underlyingFileMoved IFileBuffer IPath
public void underlying File Deleted I File Buffer buffer  underlyingFileDeleted IFileBuffer
public void state Change Failed I File Buffer buffer  stateChangeFailed IFileBuffer
public Highlighter f Buffer Listener new I File Buffer Listener public void buffer Created I File Buffer buffer public void buffer Disposed I File Buffer buffer public void buffer Content About To Be Replaced I File Buffer buffer public void buffer Content Replaced I File Buffer buffer handle Content Replaced buffer public void state Changing I File Buffer buffer public void dirty State Changed I File Buffer buffer boolean is Dirty public void state Validation Changed I File Buffer buffer boolean is State Validated public void underlying File Moved I File Buffer buffer I Path path public void underlying File Deleted I File Buffer buffer public void state Change Failed I File Buffer buffer File Buffers get Text File Buffer Manager add File Buffer Listener f Buffer Listener  fBufferListener IFileBufferListener bufferCreated IFileBuffer bufferDisposed IFileBuffer bufferContentAboutToBeReplaced IFileBuffer bufferContentReplaced IFileBuffer handleContentReplaced stateChanging IFileBuffer dirtyStateChanged IFileBuffer isDirty stateValidationChanged IFileBuffer isStateValidated underlyingFileMoved IFileBuffer IPath underlyingFileDeleted IFileBuffer stateChangeFailed IFileBuffer FileBuffers getTextFileBufferManager addFileBufferListener fBufferListener
File Buffers get Text File Buffer Manager add File Buffer Listener f Buffer Listener public abstract void add Highlights Match matches  FileBuffers getTextFileBufferManager addFileBufferListener fBufferListener addHighlights
public abstract void add Highlights Match matches public abstract void remove Highlights Match matches  addHighlights removeHighlights
public abstract void remove Highlights Match matches public abstract void remove All  removeHighlights removeAll
public abstract void remove Highlights Match matches public abstract void remove All public void dispose File Buffers get Text File Buffer Manager remove File Buffer Listener f Buffer Listener  removeHighlights removeAll FileBuffers getTextFileBufferManager removeFileBufferListener fBufferListener
protected abstract void handle Content Replaced I File Buffer buffer  handleContentReplaced IFileBuffer

private Map f Matches To Annotations public Marker Highlighter I File file f File file f Matches To Annotations new Hash Map  fMatchesToAnnotations MarkerHighlighter IFile fFile fMatchesToAnnotations HashMap
Search Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i matches length i I Marker marker marker create Marker matches i if marker null f Matches To Annotations put matches i marker  SearchPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException IMarker createMarker fMatchesToAnnotations
public void add Highlights final Match matches try Search Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i matches length i I Marker marker marker create Marker matches i if marker null f Matches To Annotations put matches i marker f File I Workspace AVOID UPDATE null catch Core Exception e just log the thing There s nothing we can do anyway Search Plugin log e get Status  addHighlights SearchPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException IMarker createMarker fMatchesToAnnotations fFile IWorkspace AVOID_UPDATE CoreException SearchPlugin getStatus
private I Marker create Marker Match match throws Core Exception Position position Internal SearchUI get Instance get Position Tracker get Current Position match if position null if match get Offset 0 match get Length 0 return null position new Position match get Offset match get Length else need to clone position can t have it twice in a document position new Position position get Offset position get Length I Marker marker f File create Marker New SearchUI SEARCH MARKER Hash Map attributes new Hash Map 4 if match get Base Unit Match UNIT CHARACTER attributes put I Marker CHAR START new Integer position get Offset attributes put I Marker CHAR END new Integer position get Offset position get Length else attributes put I Marker LINE NUMBER new Integer position get Offset marker set Attributes attributes return marker  IMarker createMarker CoreException InternalSearchUI getInstance getPositionTracker getCurrentPosition getOffset getLength getOffset getLength getOffset getLength IMarker fFile createMarker NewSearchUI SEARCH_MARKER HashMap HashMap getBaseUnit UNIT_CHARACTER IMarker CHAR_START getOffset IMarker CHAR_END getOffset getLength IMarker LINE_NUMBER getOffset setAttributes
public void remove Highlights Match matches for int i 0 i matches length i I Marker marker I Marker f Matches To Annotations remove matches i if marker null try marker delete catch Core Exception e just log the thing There s nothing we can do anyway Search Plugin log e get Status  removeHighlights IMarker IMarker fMatchesToAnnotations CoreException SearchPlugin getStatus
public void remove All try f File delete Markers New SearchUI SEARCH MARKER true I Resource DEPTH INFINITE f Matches To Annotations clear catch Core Exception e just log the thing There s nothing we can do anyway Search Plugin log e get Status  removeAll fFile deleteMarkers NewSearchUI SEARCH_MARKER IResource DEPTH_INFINITE fMatchesToAnnotations CoreException SearchPlugin getStatus
protected void handle Content Replaced I File Buffer buffer if buffer get Location equals f File get Location return Match matches new Match f Matches To Annotations key Set size f Matches To Annotations key Set to Array matches remove All add Highlights matches  handleContentReplaced IFileBuffer getLocation fFile getLocation fMatchesToAnnotations keySet fMatchesToAnnotations keySet toArray removeAll addHighlights

private interface I File Buffer Match Operation void run I Text File Buffer buffer Match match  IFileBufferMatchOperation ITextFileBuffer
public Position Tracker New SearchUI add Query Listener this File Buffers get Text File Buffer Manager add File Buffer Listener this  PositionTracker NewSearchUI addQueryListener FileBuffers getTextFileBufferManager addFileBufferListener
tracking search results public void query Added I Search Query query if query get Search Result instanceof Abstract Text Search Result query get Search Result add Listener this  queryAdded ISearchQuery getSearchResult AbstractTextSearchResult getSearchResult addListener
public void query Removed I Search Query query I Search Result result query get Search Result if result instanceof Abstract Text Search Result untrack All Abstract Text Search Result result result remove Listener this  queryRemoved ISearchQuery ISearchResult getSearchResult AbstractTextSearchResult untrackAll AbstractTextSearchResult removeListener
tracking matches public void search Result Changed Search Result Event e if e instanceof Match Event Match Event evt Match Event e Match matches evt get Matches int kind evt get Kind Abstract Text Search Result result Abstract Text Search Result e get Search Result for int i 0 i matches length i I Text File Buffer fb get Tracked File Buffer result matches i get Element update Match matches i fb kind result else if e instanceof Remove All Event Remove All Event evt Remove All Event e I Search Result result evt get Search Result untrack All Abstract Text Search Result result  searchResultChanged SearchResultEvent MatchEvent MatchEvent MatchEvent getMatches getKind AbstractTextSearchResult AbstractTextSearchResult getSearchResult ITextFileBuffer getTrackedFileBuffer getElement updateMatch RemoveAllEvent RemoveAllEvent RemoveAllEvent ISearchResult getSearchResult untrackAll AbstractTextSearchResult
private void update Match Match match I Text File Buffer fb int kind Abstract Text Search Result result if fb null if kind Match Event ADDED track Position result fb match else if kind Match Event REMOVED untrack Position fb match  updateMatch ITextFileBuffer AbstractTextSearchResult MatchEvent trackPosition MatchEvent untrackPosition
private void untrack All Abstract Text Search Result result Set match Set new Hash Set f Matches To Positions key Set for Iterator matches match Set iterator matches has Next Match match Match matches next Abstract Text Search Result match Container Abstract Text Search Result f Matches To Search Results get match if result equals match Container I Text File Buffer fb get Tracked File Buffer result match get Element if fb null untrack Position fb match  untrackAll AbstractTextSearchResult matchSet HashSet fMatchesToPositions keySet matchSet hasNext AbstractTextSearchResult matchContainer AbstractTextSearchResult fMatchesToSearchResults matchContainer ITextFileBuffer getTrackedFileBuffer getElement untrackPosition
private void untrack Position I Text File Buffer fb Match match Position position Position f Matches To Positions get match if position null remove File Buffer Mapping fb match f Matches To Search Results remove match f Matches To Positions remove match fb get Document remove Position position  untrackPosition ITextFileBuffer fMatchesToPositions removeFileBufferMapping fMatchesToSearchResults fMatchesToPositions getDocument removePosition
private void track Position Abstract Text Search Result result I Text File Buffer fb Match match int offset match get Offset int length match get Length if offset 0 length 0 return try I Document doc fb get Document Position position new Position offset length if match get Base Unit Match UNIT LINE position convert To Character Position position doc doc add Position position f Matches To Search Results put match result f Matches To Positions put match position add File Buffer Mapping fb match catch Bad Location Exception e the match is outside the document result remove Match match  trackPosition AbstractTextSearchResult ITextFileBuffer getOffset getLength IDocument getDocument getBaseUnit UNIT_LINE convertToCharacterPosition addPosition fMatchesToSearchResults fMatchesToPositions addFileBufferMapping BadLocationException removeMatch
public static Position convert To Character Position Position line Position I Document doc throws Bad Location Exception int line Offset line Position get Offset int line Length line Position get Length int char Offset doc get Line Offset line Offset int char Length 0 if line Length 0 int last Line line Offset line Length 1 int end Position doc get Line Offset last Line doc get Line Length last Line char Length end Position char Offset return new Position char Offset char Length  convertToCharacterPosition linePosition IDocument BadLocationException lineOffset linePosition getOffset lineLength linePosition getLength charOffset getLineOffset lineOffset charLength lineLength lastLine lineOffset lineLength endPosition getLineOffset lastLine getLineLength lastLine charLength endPosition charOffset charOffset charLength
private void add File Buffer Mapping I Text File Buffer fb Match match Set matches Set f File Buffers To Matches get fb if matches null matches new Hash Set f File Buffers To Matches put fb matches matches add match  addFileBufferMapping ITextFileBuffer fFileBuffersToMatches HashSet fFileBuffersToMatches
private void remove File Buffer Mapping I Text File Buffer fb Match match Set matches Set f File Buffers To Matches get fb if matches null matches remove match if matches size 0 f File Buffers To Matches remove fb  removeFileBufferMapping ITextFileBuffer fFileBuffersToMatches fFileBuffersToMatches
private I Text File Buffer get Tracked File Buffer Abstract Text Search Result result Object element I File Match Adapter adapter result get File Match Adapter if adapter null return null I File file adapter get File element if file null return null if file exists return null return File Buffers get Text File Buffer Manager get Text File Buffer file get Location  ITextFileBuffer getTrackedFileBuffer AbstractTextSearchResult IFileMatchAdapter getFileMatchAdapter IFile getFile FileBuffers getTextFileBufferManager getTextFileBuffer getLocation
public Position get Current Position Match match Position pos Position f Matches To Positions get match if pos null return pos Abstract Text Search Result result Abstract Text Search Result f Matches To Search Results get match if match get Base Unit Match UNIT LINE result null I Text File Buffer fb get Tracked File Buffer result match get Element if fb null I Document doc fb get Document try pos convert To Line Position pos doc catch Bad Location Exception e return pos  getCurrentPosition fMatchesToPositions AbstractTextSearchResult AbstractTextSearchResult fMatchesToSearchResults getBaseUnit UNIT_LINE ITextFileBuffer getTrackedFileBuffer getElement IDocument getDocument convertToLinePosition BadLocationException
public static Position convert To Line Position Position pos I Document doc throws Bad Location Exception int offset doc get Line Of Offset pos get Offset int end doc get Line Of Offset pos get Offset pos get Length int line Length end offset if pos get Length 0 line Length 0 if the character length is 0 add the last line too line Length return new Position offset line Length  convertToLinePosition IDocument BadLocationException getLineOfOffset getOffset getLineOfOffset getOffset getLength lineLength getLength lineLength lineLength lineLength
public void dispose New SearchUI remove Query Listener this File Buffers get Text File Buffer Manager remove File Buffer Listener this  NewSearchUI removeQueryListener FileBuffers getTextFileBufferManager removeFileBufferListener
public void buffer Created I File Buffer buffer final int track Count new int 1 if buffer instanceof I Text File Buffer return I Workspace ws Resources Plugin get Workspace I File file ws get Root get File For Location buffer get Location if file null file ws get Root get File buffer get Location I Search Query queries New SearchUI get Queries for int i 0 i queries length i I Search Result result queries i get Search Result if result instanceof Abstract Text Search Result Abstract Text Search Result text Result Abstract Text Search Result result I File Match Adapter adapter text Result get File Match Adapter if adapter null Match matches adapter compute Contained Matches text Result file for int j 0 j matches length j track Count 0 track Position Abstract Text Search Result result I Text File Buffer buffer matches j  bufferCreated IFileBuffer trackCount ITextFileBuffer IWorkspace ResourcesPlugin getWorkspace IFile getRoot getFileForLocation getLocation getRoot getFile getLocation ISearchQuery NewSearchUI getQueries ISearchResult getSearchResult AbstractTextSearchResult AbstractTextSearchResult textResult AbstractTextSearchResult IFileMatchAdapter textResult getFileMatchAdapter computeContainedMatches textResult trackCount trackPosition AbstractTextSearchResult ITextFileBuffer
private void do For Existing Matches In I File Buffer buffer I File Buffer Match Operation operation if buffer instanceof I Text File Buffer return Set matches Set f File Buffers To Matches get buffer if matches null Set match Set new Hash Set matches for Iterator match Iterator match Set iterator match Iterator has Next Match element Match match Iterator next operation run I Text File Buffer buffer element  doForExistingMatchesIn IFileBuffer IFileBufferMatchOperation ITextFileBuffer fFileBuffersToMatches matchSet HashSet matchIterator matchSet matchIterator hasNext matchIterator ITextFileBuffer
see org eclipse search internal model Position Tracker File Buffer Match Runnable run org eclipse core filebuffers I Text File Buffer org eclipse search ui model text Match public void run I Text File Buffer text Buffer Match match track Count 0 untrack Position text Buffer match  PositionTracker FileBufferMatchRunnable ITextFileBuffer ITextFileBuffer textBuffer trackCount untrackPosition textBuffer
public void buffer Disposed I File Buffer buffer final int track Count new int 1 do For Existing Matches In buffer new I File Buffer Match Operation non Javadoc see org eclipse search internal model Position Tracker File Buffer Match Runnable run org eclipse core filebuffers I Text File Buffer org eclipse search ui model text Match public void run I Text File Buffer text Buffer Match match track Count 0 untrack Position text Buffer match  bufferDisposed IFileBuffer trackCount doForExistingMatchesIn IFileBufferMatchOperation PositionTracker FileBufferMatchRunnable ITextFileBuffer ITextFileBuffer textBuffer trackCount untrackPosition textBuffer
see org eclipse core filebuffers I File Buffer Listener buffer Content About To Be Replaced org eclipse core filebuffers I File Buffer public void buffer Content About To Be Replaced I File Buffer buffer not interesting for us  IFileBufferListener bufferContentAboutToBeReplaced IFileBuffer bufferContentAboutToBeReplaced IFileBuffer
do For Existing Matches In buffer new I File Buffer Match Operation public void run I Text File Buffer text Buffer Match match track Count 0 Abstract Text Search Result result Abstract Text Search Result f Matches To Search Results get match untrack Position text Buffer match track Position result text Buffer match  doForExistingMatchesIn IFileBufferMatchOperation ITextFileBuffer textBuffer trackCount AbstractTextSearchResult AbstractTextSearchResult fMatchesToSearchResults untrackPosition textBuffer trackPosition textBuffer
public void buffer Content Replaced I File Buffer buffer final int track Count new int 1 do For Existing Matches In buffer new I File Buffer Match Operation public void run I Text File Buffer text Buffer Match match track Count 0 Abstract Text Search Result result Abstract Text Search Result f Matches To Search Results get match untrack Position text Buffer match track Position result text Buffer match  bufferContentReplaced IFileBuffer trackCount doForExistingMatchesIn IFileBufferMatchOperation ITextFileBuffer textBuffer trackCount AbstractTextSearchResult AbstractTextSearchResult fMatchesToSearchResults untrackPosition textBuffer trackPosition textBuffer
see org eclipse core filebuffers I File Buffer Listener state Changing org eclipse core filebuffers I File Buffer public void state Changing I File Buffer buffer not interesting for us  IFileBufferListener stateChanging IFileBuffer stateChanging IFileBuffer
public void run I Text File Buffer text Buffer Match match track Count 0 Position pos Position f Matches To Positions get match if pos null if pos is Deleted Abstract Text Search Result result Abstract Text Search Result f Matches To Search Results get match might be that the containing element has been removed if result null result remove Match match untrack Position text Buffer match else if match get Base Unit Match UNIT LINE try pos convert To Line Position pos text Buffer get Document catch Bad Location Exception e Search Plugin get Default get Log log new Status I Status ERROR Search Plugin getID 0 e get Localized Message e match set Offset pos get Offset match set Length pos get Length  ITextFileBuffer textBuffer trackCount fMatchesToPositions isDeleted AbstractTextSearchResult AbstractTextSearchResult fMatchesToSearchResults removeMatch untrackPosition textBuffer getBaseUnit UNIT_LINE convertToLinePosition textBuffer getDocument BadLocationException SearchPlugin getDefault getLog IStatus SearchPlugin getLocalizedMessage setOffset getOffset setLength getLength
public void dirty State Changed I File Buffer buffer boolean is Dirty if is Dirty return final int track Count new int 1 do For Existing Matches In buffer new I File Buffer Match Operation non Javadoc see org eclipse search internal model Position Tracker File Buffer Match Runnable run org eclipse core filebuffers I Text File Buffer org eclipse search ui model text Match public void run I Text File Buffer text Buffer Match match track Count 0 Position pos Position f Matches To Positions get match if pos null if pos is Deleted Abstract Text Search Result result Abstract Text Search Result f Matches To Search Results get match might be that the containing element has been removed if result null result remove Match match untrack Position text Buffer match else if match get Base Unit Match UNIT LINE try pos convert To Line Position pos text Buffer get Document catch Bad Location Exception e Search Plugin get Default get Log log new Status I Status ERROR Search Plugin getID 0 e get Localized Message e match set Offset pos get Offset match set Length pos get Length  dirtyStateChanged IFileBuffer isDirty isDirty trackCount doForExistingMatchesIn IFileBufferMatchOperation PositionTracker FileBufferMatchRunnable ITextFileBuffer ITextFileBuffer textBuffer trackCount fMatchesToPositions isDeleted AbstractTextSearchResult AbstractTextSearchResult fMatchesToSearchResults removeMatch untrackPosition textBuffer getBaseUnit UNIT_LINE convertToLinePosition textBuffer getDocument BadLocationException SearchPlugin getDefault getLog IStatus SearchPlugin getLocalizedMessage setOffset getOffset setLength getLength
see org eclipse core filebuffers I File Buffer Listener state Validation Changed org eclipse core filebuffers I File Buffer boolean public void state Validation Changed I File Buffer buffer boolean is State Validated not interesting for us  IFileBufferListener stateValidationChanged IFileBuffer stateValidationChanged IFileBuffer isStateValidated
see org eclipse core filebuffers I File Buffer Listener underlying File Moved org eclipse core filebuffers I File Buffer org eclipse core runtime I Path public void underlying File Moved I File Buffer buffer I Path path not interesting for us  IFileBufferListener underlyingFileMoved IFileBuffer IPath underlyingFileMoved IFileBuffer IPath
see org eclipse core filebuffers I File Buffer Listener underlying File Deleted org eclipse core filebuffers I File Buffer public void underlying File Deleted I File Buffer buffer not interesting for us  IFileBufferListener underlyingFileDeleted IFileBuffer underlyingFileDeleted IFileBuffer
see org eclipse core filebuffers I File Buffer Listener state Change Failed org eclipse core filebuffers I File Buffer public void state Change Failed I File Buffer buffer not interesting for us  IFileBufferListener stateChangeFailed IFileBuffer stateChangeFailed IFileBuffer
see org eclipse search ui I Query Listener query Starting org eclipse search ui I Search Query public void query Starting I Search Query query not interested here  IQueryListener queryStarting ISearchQuery queryStarting ISearchQuery
see org eclipse search ui I Query Listener query Finished org eclipse search ui I Search Query public void query Finished I Search Query query not interested  IQueryListener queryFinished ISearchQuery queryFinished ISearchQuery

init Editors f Part Listener new I Part Listener2 public void part Activated I Workbench Part Reference part Ref start Highlighting get Editor part Ref  initEditors fPartListener IPartListener2 partActivated IWorkbenchPartReference partRef startHighlighting getEditor partRef
public void part Brought To Top I Workbench Part Reference part Ref start Highlighting get Editor part Ref  partBroughtToTop IWorkbenchPartReference partRef startHighlighting getEditor partRef
public void part Closed I Workbench Part Reference part Ref stop Highlighting get Editor part Ref  partClosed IWorkbenchPartReference partRef stopHighlighting getEditor partRef
public void part Deactivated I Workbench Part Reference part Ref  partDeactivated IWorkbenchPartReference partRef
public void part Opened I Workbench Part Reference part Ref  partOpened IWorkbenchPartReference partRef
public void part Hidden I Workbench Part Reference part Ref stop Highlighting get Editor part Ref  partHidden IWorkbenchPartReference partRef stopHighlighting getEditor partRef
public void part Visible I Workbench Part Reference part Ref start Highlighting get Editor part Ref  partVisible IWorkbenchPartReference partRef startHighlighting getEditor partRef
public void part Input Changed I Workbench Part Reference part Ref  partInputChanged IWorkbenchPartReference partRef
public Window Annotation Manager I Workbench Window window f Window window f Annotation Managers new Hash Map init Editors f Part Listener new I Part Listener2 public void part Activated I Workbench Part Reference part Ref start Highlighting get Editor part Ref public void part Brought To Top I Workbench Part Reference part Ref start Highlighting get Editor part Ref public void part Closed I Workbench Part Reference part Ref stop Highlighting get Editor part Ref public void part Deactivated I Workbench Part Reference part Ref public void part Opened I Workbench Part Reference part Ref public void part Hidden I Workbench Part Reference part Ref stop Highlighting get Editor part Ref public void part Visible I Workbench Part Reference part Ref start Highlighting get Editor part Ref public void part Input Changed I Workbench Part Reference part Ref f Window get Part Service add Part Listener f Part Listener  WindowAnnotationManager IWorkbenchWindow fWindow fAnnotationManagers HashMap initEditors fPartListener IPartListener2 partActivated IWorkbenchPartReference partRef startHighlighting getEditor partRef partBroughtToTop IWorkbenchPartReference partRef startHighlighting getEditor partRef partClosed IWorkbenchPartReference partRef stopHighlighting getEditor partRef partDeactivated IWorkbenchPartReference partRef partOpened IWorkbenchPartReference partRef partHidden IWorkbenchPartReference partRef stopHighlighting getEditor partRef partVisible IWorkbenchPartReference partRef startHighlighting getEditor partRef partInputChanged IWorkbenchPartReference partRef fWindow getPartService addPartListener fPartListener
private void start Highlighting I Editor Part editor if editor null return Editor Annotation Manager mgr Editor Annotation Manager f Annotation Managers get editor if mgr null mgr new Editor Annotation Manager editor f Annotation Managers put editor mgr mgr set Search Result f Search Result  startHighlighting IEditorPart EditorAnnotationManager EditorAnnotationManager fAnnotationManagers EditorAnnotationManager fAnnotationManagers setSearchResult fSearchResult
private void init Editors I Workbench Page pages f Window get Pages for int i 0 i pages length i I Editor Reference editors pages i get Editor References for int j 0 j editors length j I Editor Part editor editors j get Editor false if editor null pages i is Part Visible editor start Highlighting editor  initEditors IWorkbenchPage fWindow getPages IEditorReference getEditorReferences IEditorPart getEditor isPartVisible startHighlighting
private void stop Highlighting I Editor Part editor if editor null return Editor Annotation Manager mgr Editor Annotation Manager f Annotation Managers remove editor if mgr null mgr dispose  stopHighlighting IEditorPart EditorAnnotationManager EditorAnnotationManager fAnnotationManagers
private I Editor Part get Editor I Workbench Part Reference part Ref if part Ref instanceof I Editor Reference return I Editor Reference part Ref get Editor false return null  IEditorPart getEditor IWorkbenchPartReference partRef partRef IEditorReference IEditorReference partRef getEditor
void dispose f Window get Part Service remove Part Listener f Part Listener for Iterator mgrs f Annotation Managers values iterator mgrs has Next Editor Annotation Manager mgr Editor Annotation Manager mgrs next mgr dispose f Annotation Managers null  fWindow getPartService removePartListener fPartListener fAnnotationManagers hasNext EditorAnnotationManager EditorAnnotationManager fAnnotationManagers
void set Search Result Abstract Text Search Result result f Search Result result for Iterator mgrs f Annotation Managers values iterator mgrs has Next Editor Annotation Manager mgr Editor Annotation Manager mgrs next mgr set Search Result result  setSearchResult AbstractTextSearchResult fSearchResult fAnnotationManagers hasNext EditorAnnotationManager EditorAnnotationManager setSearchResult

public Throttling Progress Monitor I Progress Monitor wrapped float throttle Ratio super wrapped f Throttle Ratio throttle Ratio f Sub Milis 0 f Last Called 0  ThrottlingProgressMonitor IProgressMonitor throttleRatio fThrottleRatio throttleRatio fSubMilis fLastCalled
public void internal Worked double work super internal Worked work if f Last Called 0 long sleep Time System current Time Millis f Last Called sleep Time f Throttle Ratio sleep Time Math min 100 sleep Time if sleep Time 1 f Sub Milis if f Sub Milis 50 sleep Time 1 f Sub Milis 0 f Last Called System current Time Millis if sleep Time 0 try Thread sleep sleep Time catch Interrupted Exception e ignore else Thread yield else f Last Called System current Time Millis  internalWorked internalWorked fLastCalled sleepTime currentTimeMillis fLastCalled sleepTime fThrottleRatio sleepTime sleepTime sleepTime fSubMilis fSubMilis sleepTime fSubMilis fLastCalled currentTimeMillis sleepTime sleepTime InterruptedException fLastCalled currentTimeMillis

Checks whether the given element is enclosed by this scope or not paramelementthe resource proxy to be checked return code true code if the resource is inside the search scope 
Returns a human readable description of this scope returnthe description of this scope as code String code 

public Search Scope String description Assert is Not Null description f Description description f Elements new Array List 5  SearchScope isNotNull fDescription fElements ArrayList
public Search Scope String description I Resource resources Assert is Not Null description int resource Count resources length f Description description f Elements new Array List resource Count 5 for int i 0 i resource Count i f Elements add resources i  SearchScope IResource isNotNull resourceCount fDescription fElements ArrayList resourceCount resourceCount fElements
public void set Description String description Assert is Not Null description f Description description  setDescription isNotNull fDescription
see I Search Scope add I Resource public void add I Resource element f Elements add element  ISearchScope IResource IResource fElements
public boolean encloses I Resource Proxy proxy I Path element Path proxy request Full Path Iterator iter elements while iter has Next I Resource resource I Resource iter next if resource get Full Path is Prefix Of element Path return true return false  IResourceProxy IPath elementPath requestFullPath hasNext IResource IResource getFullPath isPrefixOf elementPath
Implements method from I Search Scope public String get Description return f Description  ISearchScope getDescription fDescription
Returns the search scope elements protected Iterator elements return f Elements iterator  fElements
Implements method from I Search Scope deprecated as of 2 1 use link encloses I Resource Proxy public boolean encloses I Resource element I Path element Path element get Full Path Iterator iter elements while iter has Next I Resource resource I Resource iter next if resource get Full Path is Prefix Of element Path return true return false  ISearchScope IResourceProxy IResource IPath elementPath getFullPath hasNext IResource IResource getFullPath isPrefixOf elementPath

private boolean f Visit Derived Amount Of Work Calculator Multi Status status boolean visit Derived super status f Visit Derived visit Derived  fVisitDerived AmountOfWorkCalculator MultiStatus visitDerived fVisitDerived visitDerived
protected boolean visit File I Resource Proxy proxy throws Core Exception if should Visit proxy f Result return true  visitFile IResourceProxy CoreException shouldVisit fResult
private boolean should Visit I Resource Proxy proxy if f Scope encloses proxy return false if f Visit Derived return true return proxy is Derived  shouldVisit IResourceProxy fScope fVisitDerived isDerived
public int process Collection projects I Search Scope scope f Result 0 f Scope scope Iterator i projects iterator while i has Next I Project project I Project i next int save f Result try project accept this I Resource NONE catch Core Exception ex add To Status ex Project doesn t contain any files that are in scope if save f Result i remove return f Result  ISearchScope fResult fScope hasNext IProject IProject fResult IResource CoreException addToStatus fResult fResult

private I Resource Proxy f Proxy public File Match Collector I Text Search Result Collector collector I Resource Proxy proxy f Collector collector f Proxy proxy  IResourceProxy fProxy FileMatchCollector ITextSearchResultCollector IResourceProxy fCollector fProxy
public void accept String line int start int length int line Number throws Invocation Target Exception try f Collector accept f Proxy line start length line Number catch Core Exception e throw new Invocation Target Exception e  lineNumber InvocationTargetException fCollector fProxy lineNumber CoreException InvocationTargetException

public interface I Match Collector void accept String line int start int length int line Number throws Invocation Target Exception  IMatchCollector lineNumber InvocationTargetException

public interface I Text Search Result Collector Returns the progress monitor used to setup and report progress public I Progress Monitor get Progress Monitor  ITextSearchResultCollector IProgressMonitor getProgressMonitor
public I Progress Monitor get Progress Monitor Called before the actual search starts public void about To Start throws Core Exception  IProgressMonitor getProgressMonitor aboutToStart CoreException
Accepts the given search result param proxy proxy the resource proxy in which the match has been found param line the line containing the match param start position from the beginning of the file Start position is zero based param length the length of the match param line Number the line number of the match  lineNumber
public void accept I Resource Proxy proxy String line int start int length int line Number throws Core Exception Called when the search has ended public void done throws Core Exception  IResourceProxy lineNumber CoreException CoreException

public Match Locator String pattern boolean is Case Sensitive boolean is Regex Search throws Pattern Syntax Exception f Pattern pattern Pattern reg Ex Pattern if is Regex Search pattern as Reg Ex pattern if is Case Sensitive reg Ex Pattern Pattern compile pattern Pattern CASE INSENSITIVE else reg Ex Pattern Pattern compile pattern f Matcher reg Ex Pattern matcher NON NLS 1  MatchLocator isCaseSensitive isRegexSearch PatternSyntaxException fPattern regExPattern isRegexSearch asRegEx isCaseSensitive regExPattern CASE_INSENSITIVE regExPattern fMatcher regExPattern
public boolean is Emtpy return get Pattern length 0  isEmtpy getPattern
public String get Pattern return f Pattern  getPattern fPattern
public void locate Matches I Progress Monitor monitor Reader reader I Match Collector collector throws IO Exception Invocation Target Exception int line Counter 1 int char Counter 0 boolean eof false try while eof String Buffer sb new String Buffer 200 int eol Str Length read Line reader sb int line Length sb length int start 0 eof eol Str Length 1 String line sb to String while start line Length f Matcher reset line if f Matcher find start start char Counter f Matcher start int length f Matcher end f Matcher start collector accept line trim start length line Counter start f Matcher end else no match in this line start line Length char Counter line Length eol Str Length line Counter if monitor is Canceled throw new Operation Canceled Exception Search Messages get String Text Search Visitor canceled NON NLS 1 finally if reader null reader close  locateMatches IProgressMonitor IMatchCollector IOException InvocationTargetException lineCounter charCounter StringBuffer StringBuffer eolStrLength readLine lineLength eolStrLength toString lineLength fMatcher fMatcher charCounter fMatcher fMatcher fMatcher lineCounter fMatcher lineLength charCounter lineLength eolStrLength lineCounter isCanceled OperationCanceledException SearchMessages getString TextSearchVisitor
private String as Reg Ex String pattern String Buffer out new String Buffer pattern length boolean escaped false boolean quoting false int i 0 while i pattern length char ch pattern char At i if ch escaped if quoting out append E NON NLS 1 quoting false out append NON NLS 1 escaped false continue else if ch escaped if quoting out append E NON NLS 1 quoting false out append NON NLS 1 escaped false continue else if ch escaped escaped true continue else if ch escaped escaped false if quoting out append E NON NLS 1 quoting false out append NON NLS 1 continue if quoting out append Q NON NLS 1 quoting true if escaped ch ch ch out append out append ch escaped ch if quoting out append E NON NLS 1 return out to String  asRegEx StringBuffer StringBuffer charAt toString
protected int read Line Reader reader String Buffer sb throws IO Exception int ch 1 if f Pushback ch f Pushback Char f Pushback false else ch reader read while ch 0 if ch fgLF return 1 if ch fgCR ch reader read if ch fgLF return 2 else f Pushback Char ch f Pushback true return 1 sb append char ch ch reader read return 1  readLine StringBuffer IOException fPushback fPushbackChar fPushback fPushbackChar fPushback

Search for the given pattern public I Status search I Workspace workspace I Search Scope scope boolean visit Derived I Text Search Result Collector collector Match Locator match Locator Assert is Not Null workspace Assert is Not Null scope Assert is Not Null collector Assert is Not Null match Locator I Progress Monitor monitor collector get Progress Monitor I Project projects workspace get Root get Projects Collection open Projects new Array List 10 for int i 0 i projects length i I Project project projects i if project is Open open Projects add project String message Search Messages get String Text Search Engine status Message NON NLS 1 Multi Status status new Multi Status New SearchUI PLUGIN ID I Status OK message null if open Projects is Empty int amount Of Work new Amount Of Work Calculator status visit Derived process open Projects scope try monitor begin Task amount Of Work NON NLS 1 if amount Of Work 0 Integer args new Integer new Integer 1 new Integer amount Of Work monitor set Task Name Search Messages get Formatted String Text Search Engine scanning args NON NLS 1 collector about To Start Text Search Visitor visitor new Text Search Visitor match Locator scope visit Derived collector status amount Of Work visitor process open Projects catch Core Exception ex status add ex get Status finally monitor done try collector done catch Core Exception ex status add ex get Status return status  IStatus IWorkspace ISearchScope visitDerived ITextSearchResultCollector MatchLocator matchLocator isNotNull isNotNull isNotNull isNotNull matchLocator IProgressMonitor getProgressMonitor IProject getRoot getProjects openProjects ArrayList IProject isOpen openProjects SearchMessages getString TextSearchEngine statusMessage MultiStatus MultiStatus NewSearchUI PLUGIN_ID IStatus openProjects isEmpty amountOfWork AmountOfWorkCalculator visitDerived openProjects beginTask amountOfWork amountOfWork amountOfWork setTaskName SearchMessages getFormattedString TextSearchEngine aboutToStart TextSearchVisitor TextSearchVisitor matchLocator visitDerived amountOfWork openProjects CoreException getStatus CoreException getStatus

private static class Workspace Scope extends Text Search Scope private Workspace Scope super Search Messages get String Workspace Scope NON NLS 1  WorkspaceScope TextSearchScope WorkspaceScope SearchMessages getString WorkspaceScope
public void add I Resource element do nothing  IResource
public boolean encloses I Resource Proxy proxy if proxy get Type I Resource FILE skip File proxy return false return true  IResourceProxy getType IResource skipFile
Returns a new Workbench scope public static Text Search Scope new Workspace Scope return new Workspace Scope  TextSearchScope newWorkspaceScope WorkspaceScope
public Text Search Scope String description super description  TextSearchScope
public Text Search Scope String description I Resource resources super description resources  TextSearchScope IResource
public Text Search Scope String description I Adaptable elements super description convert To Resources elements  TextSearchScope IAdaptable convertToResources
public Text Search Scope String description I Working Set working Sets super description convert To Resources get Elements working Sets  TextSearchScope IWorkingSet workingSets convertToResources getElements workingSets
private static I Resource convert To Resources I Adaptable elements int length elements length Set resources new Hash Set length for int i 0 i length i I Resource resource I Resource elements i get Adapter I Resource class if resource null resources add resource return I Resource resources to Array new I Resource resources size  IResource convertToResources IAdaptable HashSet IResource IResource getAdapter IResource IResource toArray IResource
private static I Adaptable get Elements I Working Set working Sets int length working Sets length Set elements new Hash Set length for int i 0 i length i elements add All Arrays as List working Sets i get Elements return I Adaptable elements to Array new I Adaptable elements size  IAdaptable getElements IWorkingSet workingSets workingSets HashSet addAll asList workingSets getElements IAdaptable toArray IAdaptable
Adds an extension to the scope public void add Extension String extension Pattern pattern Pattern compile as Reg Ex extension Pattern CASE INSENSITIVE f Extensions add pattern matcher NON NLS 1  addExtension asRegEx CASE_INSENSITIVE fExtensions
private String as Reg Ex String pattern String Buffer out new String Buffer pattern length boolean escaped false boolean quoting false int i 0 while i pattern length char ch pattern char At i if ch escaped if quoting out append E NON NLS 1 quoting false out append NON NLS 1 escaped false continue else if ch escaped if quoting out append E NON NLS 1 quoting false out append NON NLS 1 escaped false continue else if ch escaped escaped true continue else if ch escaped escaped false if quoting out append E NON NLS 1 quoting false out append NON NLS 1 continue if quoting out append Q NON NLS 1 quoting true if escaped ch ch ch out append out append ch escaped ch if quoting out append E NON NLS 1 return out to String  asRegEx StringBuffer StringBuffer charAt toString
Adds all string patterns contained in code extensions code to this scope The allowed pattern characters are code code for any character and code code for one character public void add Extensions Set extensions if extensions null return Iterator iter extensions iterator while iter has Next Object obj iter next if obj instanceof String add Extension String obj  addExtensions hasNext addExtension
public boolean encloses I Resource Proxy proxy if proxy get Type I Resource FILE skip File proxy return false return super encloses proxy  IResourceProxy getType IResource skipFile
boolean skip File I Resource Proxy proxy if proxy null Iterator iter f Extensions iterator while iter has Next if Matcher iter next reset proxy get Name matches return false return true  skipFile IResourceProxy fExtensions hasNext getName
Implements method from I Search Scope deprecated As of 2 1 replaced by link encloses I Resource Proxy public boolean encloses I Resource element if element get Type I Resource FILE skip File I File element return false return super encloses element  ISearchScope IResourceProxy IResource getType IResource skipFile IFile
boolean skip File I File file if file null Iterator iter f Extensions iterator while iter has Next if Matcher iter next reset file get Name matches return false return true  skipFile IFile fExtensions hasNext getName

public Text Search Visitor Match Locator locator I Search Scope scope boolean visit Derived I Text Search Result Collector collector Multi Status status int file Count super status f Scope scope f Collector collector f Progress Monitor collector get Progress Monitor f Locator locator f Number Of Scanned Files 0 f Number Of Files To Scan file Count f Message Format Args new Integer new Integer 0 new Integer file Count f Visit Derived visit Derived  TextSearchVisitor MatchLocator ISearchScope visitDerived ITextSearchResultCollector MultiStatus fileCount fScope fCollector fProgressMonitor getProgressMonitor fLocator fNumberOfScannedFiles fNumberOfFilesToScan fileCount fMessageFormatArgs fileCount fVisitDerived visitDerived
public void process Collection projects Iterator i projects iterator while i has Next I Project project I Project i next try project accept this I Resource NONE catch Core Exception ex add To Status ex  hasNext IProject IProject IResource CoreException addToStatus
Returns an array of all editors that have an unsaved content If the identical content is presented in more than one editor only one of those editor parts is part of the result return an array of all editor parts public static I Editor Part get Editors Set inputs new Hash Set List result new Array List 0 I Workbench workbench Search Plugin get Default get Workbench I Workbench Window windows workbench get Workbench Windows for int i 0 i windows length i I Workbench Page pages windows i get Pages for int x 0 x pages length x I Editor Reference editor Refs pages x get Editor References for int z 0 z editor Refs length z I Editor Part ep editor Refs z get Editor false if ep null I Editor Input input ep get Editor Input if inputs contains input inputs add input result add ep return I Editor Part result to Array new I Editor Part result size  IEditorPart getEditors HashSet ArrayList IWorkbench SearchPlugin getDefault getWorkbench IWorkbenchWindow getWorkbenchWindows IWorkbenchPage getPages IEditorReference editorRefs getEditorReferences editorRefs IEditorPart editorRefs getEditor IEditorInput getEditorInput IEditorPart toArray IEditorPart
private boolean should Visit I Resource Proxy proxy if f Scope encloses proxy return false if f Visit Derived return true return proxy is Derived  shouldVisit IResourceProxy fScope fVisitDerived isDerived
protected boolean visit File I Resource Proxy proxy throws Core Exception if should Visit proxy return false if f Locator is Emtpy f Collector accept proxy 1 0 1 NON NLS 1 update Progress Monitor return true I File file I File proxy request Resource try Buffered Reader reader null I Text Editor editor find Editor For file if editor null String s editor get Document Provider get Document editor get Editor Input get reader new Buffered Reader new String Reader s else Input Stream stream file get Contents false reader new Buffered Reader new Input Stream Reader stream file get Charset try f Locator locate Matches f Progress Monitor reader new File Match Collector f Collector proxy catch Invocation Target Exception e1 throw Core Exception e1 get Cause catch IO Exception e String message Search Messages get Formatted String Text Search Visitor error file get Full Path NON NLS 1 throw new Core Exception new Status I Status ERROR New SearchUI PLUGIN ID Platform PLUGIN ERROR message e finally update Progress Monitor return true  visitFile IResourceProxy CoreException shouldVisit fLocator isEmtpy fCollector updateProgressMonitor IFile IFile requestResource BufferedReader ITextEditor findEditorFor getDocumentProvider getDocument getEditorInput BufferedReader StringReader InputStream getContents BufferedReader InputStreamReader getCharset fLocator locateMatches fProgressMonitor FileMatchCollector fCollector InvocationTargetException CoreException getCause IOException SearchMessages getFormattedString TextSearchVisitor getFullPath CoreException IStatus NewSearchUI PLUGIN_ID PLUGIN_ERROR updateProgressMonitor
private void update Progress Monitor f Number Of Scanned Files if f Number Of Scanned Files f Number Of Files To Scan if System current Time Millis f Last Update Time 1000 f Message Format Args 0 new Integer f Number Of Scanned Files 1 f Progress Monitor set Task Name Search Messages get Formatted String Text Search Visitor scanning f Message Format Args NON NLS 1 f Last Update Time System current Time Millis f Progress Monitor worked 1 if f Progress Monitor is Canceled throw new Operation Canceled Exception Search Messages get String Text Search Visitor canceled NON NLS 1  updateProgressMonitor fNumberOfScannedFiles fNumberOfScannedFiles fNumberOfFilesToScan currentTimeMillis fLastUpdateTime fMessageFormatArgs fNumberOfScannedFiles fProgressMonitor setTaskName SearchMessages getFormattedString TextSearchVisitor fMessageFormatArgs fLastUpdateTime currentTimeMillis fProgressMonitor fProgressMonitor isCanceled OperationCanceledException SearchMessages getString TextSearchVisitor
private I Text Editor find Editor For I File file int i 0 while i f Editors length I Editor Part editor f Editors i I Editor Input input editor get Editor Input if input instanceof I File Editor Input editor instanceof I Text Editor if I File Editor Input input get File equals file return I Text Editor editor i return null  ITextEditor findEditorFor IFile fEditors IEditorPart fEditors IEditorInput getEditorInput IFileEditorInput ITextEditor IFileEditorInput getFile ITextEditor
see I Resource Proxy Visitor visit I Resource Proxy public boolean visit I Resource Proxy proxy f Editors get Editors return super visit proxy  IResourceProxyVisitor IResourceProxy IResourceProxy fEditors getEditors

private Multi Status f Status Typed Resource Visitor Multi Status status Assert is Not Null status f Status status  MultiStatus fStatus TypedResourceVisitor MultiStatus isNotNull fStatus
protected boolean visit File I Resource Proxy proxy throws Core Exception return true  visitFile IResourceProxy CoreException
protected boolean visit Project I Resource Proxy proxy throws Core Exception return true  visitProject IResourceProxy CoreException
protected boolean visit Folder I Resource Proxy proxy throws Core Exception return true  visitFolder IResourceProxy CoreException
protected void add To Status Core Exception ex f Status add ex get Status  addToStatus CoreException fStatus getStatus
public boolean visit I Resource Proxy proxy try switch proxy get Type case I Resource FILE return visit File proxy case I Resource FOLDER return visit Folder proxy case I Resource PROJECT return visit Project proxy default Assert is True false unknown resource type NON NLS 1 return false catch Core Exception ex add To Status ex return false  IResourceProxy getType IResource visitFile IResource visitFolder IResource visitProject isTrue CoreException addToStatus

public Copy To Clipboard Action Structured Viewer viewer Assert is Not Null viewer f Viewer viewer set Text Search Messages get String Copy To Clipboard Action label NON NLS 1 set Tool Tip Text Search Messages get String Copy To Clipboard Action tooltip NON NLS 1  CopyToClipboardAction StructuredViewer isNotNull fViewer setText SearchMessages getString CopyToClipboardAction setToolTipText SearchMessages getString CopyToClipboardAction
public void run Shell shell Search Plugin get Active Workbench Shell if shell null return I Label Provider label Provider I Label Provider f Viewer get Label Provider String line Delim System get Property line separator NON NLS 1 String Buffer buf new String Buffer Iterator iter get Selection while iter has Next if buf length 0 buf append line Delim buf append label Provider get Text iter next if buf length 0 Clipboard clipboard new Clipboard shell get Display try copy To Clipbard clipboard buf to String shell finally clipboard dispose  SearchPlugin getActiveWorkbenchShell ILabelProvider labelProvider ILabelProvider fViewer getLabelProvider lineDelim getProperty StringBuffer StringBuffer getSelection hasNext lineDelim labelProvider getText getDisplay copyToClipbard toString
private Iterator get Selection I Selection s f Viewer get Selection if s instanceof I Structured Selection return I Structured Selection s iterator return Collections EMPTY LIST iterator  getSelection ISelection fViewer getSelection IStructuredSelection IStructuredSelection EMPTY_LIST
private void copy To Clipbard Clipboard clipboard String str Shell shell try clipboard set Contents new String str new Transfer Text Transfer get Instance catch SWT Error ex if ex code DND ERROR CANNOT SET CLIPBOARD throw ex String title Search Messages get String Copy To Clipboard Action error title NON NLS 1 String message Search Messages get String Copy To Clipboard Action error message NON NLS 1 if Message Dialog open Question shell title message copy To Clipbard clipboard str shell  copyToClipbard setContents TextTransfer getInstance SWTError ERROR_CANNOT_SET_CLIPBOARD SearchMessages getString CopyToClipboardAction SearchMessages getString CopyToClipboardAction MessageDialog openQuestion copyToClipbard

public Goto Marker Action Search Result Viewer viewer super Search Messages get String Search Result View goto Marker text NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH GOTO set Tool Tip Text Search Messages get String Search Result View goto Marker tooltip NON NLS 1 f Viewer viewer  GotoMarkerAction SearchResultViewer SearchMessages getString SearchResultView gotoMarker SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_GOTO setToolTipText SearchMessages getString SearchResultView gotoMarker fViewer
public void run f Viewer show Result  fViewer showResult

private I Workbench Window f Window public Open File Search Page Action  IWorkbenchWindow fWindow OpenFileSearchPageAction
public void init I Workbench Window window f Window window  IWorkbenchWindow fWindow
public void run I Action action if f Window null f Window get Active Page null Search Plugin beep log Error Message Could not open the search dialog for some reason the window handle was null NON NLS 1 return New SearchUI open Search Dialog f Window TEXT SEARCH PAGE ID NON NLS 1  IAction fWindow fWindow getActivePage SearchPlugin logErrorMessage NewSearchUI openSearchDialog fWindow TEXT_SEARCH_PAGE_ID
public void selection Changed I Action action I Selection selection do nothing since the action isn t selection dependent  selectionChanged IAction ISelection
public void dispose f Window null  fWindow
public static void log Error Message String message I Status status new Status I Status ERROR New SearchUI PLUGIN ID I Status ERROR message null Search Plugin log status  logErrorMessage IStatus IStatus NewSearchUI PLUGIN_ID IStatus SearchPlugin

public Open Search Dialog Action super Search Messages get String Open Search Dialog Action label NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T TOOL Search Plugin Images IMG TOOL SEARCH set Tool Tip Text Search Messages get String Open Search Dialog Action tooltip NON NLS 1  OpenSearchDialogAction SearchMessages getString OpenSearchDialogAction SearchPluginImages setImageDescriptors SearchPluginImages T_TOOL SearchPluginImages IMG_TOOL_SEARCH setToolTipText SearchMessages getString OpenSearchDialogAction
public Open Search Dialog Action I Workbench Window window String page Id this f Page Id page Id f Window window  OpenSearchDialogAction IWorkbenchWindow pageId fPageId pageId fWindow
public void init I Workbench Window window f Window window  IWorkbenchWindow fWindow
public void run I Action action run  IAction
public void run if get Window get Active Page null Search Plugin beep return Search Dialog dialog new Search Dialog get Window get Shell Search Plugin get Workspace get Selection get Editor Part f Page Id dialog open  getWindow getActivePage SearchPlugin SearchDialog SearchDialog getWindow getShell SearchPlugin getWorkspace getSelection getEditorPart fPageId
public void selection Changed I Action action I Selection selection do nothing since the action isn t selection dependent  selectionChanged IAction ISelection
private I Selection get Selection return get Window get Selection Service get Selection  ISelection getSelection getWindow getSelectionService getSelection
private I Editor Part get Editor Part return get Window get Active Page get Active Editor  IEditorPart getEditorPart getWindow getActivePage getActiveEditor
private I Workbench Window get Window if f Window null f Window Search Plugin get Active Workbench Window return f Window  IWorkbenchWindow getWindow fWindow fWindow SearchPlugin getActiveWorkbenchWindow fWindow
public void dispose f Window null  fWindow

public Remove All Results Action super Search Messages get String Search Result View remove All Results text NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH REM ALL set Tool Tip Text Search Messages get String Search Result View remove All Results tooltip NON NLS 1  RemoveAllResultsAction SearchMessages getString SearchResultView removeAllResults SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_REM_ALL setToolTipText SearchMessages getString SearchResultView removeAllResults
public void run Search Manager get Default remove All Results  SearchManager getDefault removeAllResults

public Remove All Searches Action super Search Messages get String Search Result View remove All Searches text NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH REM ALL set Tool Tip Text Search Messages get String Search Result View remove All Searches tooltip NON NLS 1  RemoveAllSearchesAction SearchMessages getString SearchResultView removeAllSearches SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_REM_ALL setToolTipText SearchMessages getString SearchResultView removeAllSearches
public void run Search Manager get Default remove All Searches  SearchManager getDefault removeAllSearches

public Remove Match Action I Selection Provider provider super Search Messages get String Search Result View remove Match text NON NLS 1 set Tool Tip Text Search Messages get String Search Result View remove Match tooltip NON NLS 1 f Selection Provider provider  RemoveMatchAction ISelectionProvider SearchMessages getString SearchResultView removeMatch setToolTipText SearchMessages getString SearchResultView removeMatch fSelectionProvider
public void run I Marker markers get Markers f Selection Provider get Selection if markers null try Search Plugin get Workspace delete Markers markers catch Core Exception ex Exception Handler handle ex Search Messages get String Search Error delete Markers title Search Messages get String Search Error delete Markers message NON NLS 2 NON NLS 1  IMarker getMarkers fSelectionProvider getSelection SearchPlugin getWorkspace deleteMarkers CoreException ExceptionHandler SearchMessages getString deleteMarkers SearchMessages getString deleteMarkers
private I Marker get Markers I Selection s if s instanceof I Structured Selection s is Empty return null I Structured Selection selection I Structured Selection s int size selection size if size 1 return null if selection get First Element instanceof I Search Result View Entry I Marker marker I Search Result View Entry selection get First Element get Selected Marker if marker null return new I Marker marker return null  IMarker getMarkers ISelection IStructuredSelection isEmpty IStructuredSelection IStructuredSelection getFirstElement ISearchResultViewEntry IMarker ISearchResultViewEntry getFirstElement getSelectedMarker IMarker

public Remove Potential Matches Action I Workbench Site site f Site site if use Plural Label set Text Search Messages get String Remove Potential Matches Action remove Potential Matches text NON NLS 1 set Tool Tip Text Search Messages get String Remove Potential Matches Action remove Potential Matches tooltip NON NLS 1 else set Text Search Messages get String Remove Potential Matches Action remove Potential Match text NON NLS 1 set Tool Tip Text Search Messages get String Remove Potential Matches Action remove Potential Match tooltip NON NLS 1  RemovePotentialMatchesAction IWorkbenchSite fSite usePluralLabel setText SearchMessages getString RemovePotentialMatchesAction removePotentialMatches setToolTipText SearchMessages getString RemovePotentialMatchesAction removePotentialMatches setText SearchMessages getString RemovePotentialMatchesAction removePotentialMatch setToolTipText SearchMessages getString RemovePotentialMatchesAction removePotentialMatch
public void run I Marker markers get Markers if markers null try Search Plugin get Workspace delete Markers markers catch Core Exception ex Exception Handler handle ex Search Messages get String Search Error delete Markers title Search Messages get String Search Error delete Markers message NON NLS 2 NON NLS 1 else String title Search Messages get String Remove Potential Matches Action dialog title NON NLS 1 String message Search Messages get String Remove Potential Matches Action dialog message NON NLS 1 Message Dialog open Information f Site get Shell title message action only makes sense once set Enabled false  IMarker getMarkers SearchPlugin getWorkspace deleteMarkers CoreException ExceptionHandler SearchMessages getString deleteMarkers SearchMessages getString deleteMarkers SearchMessages getString RemovePotentialMatchesAction SearchMessages getString RemovePotentialMatchesAction MessageDialog openInformation fSite getShell setEnabled
private I Marker get Markers I Selection s f Site get Selection Provider get Selection if s instanceof I Structured Selection return null I Structured Selection selection I Structured Selection s int size selection size if size 0 return null Array List markers new Array List size 3 Iterator iter selection iterator for int i 0 iter has Next i Search Result View Entry entry Search Result View Entry iter next Iterator entry Iter entry get Markers iterator while entry Iter has Next I Marker marker I Marker entry Iter next if marker get Attribute SearchUI POTENTIAL MATCH false markers add marker return I Marker markers to Array new I Marker markers size  IMarker getMarkers ISelection fSite getSelectionProvider getSelection IStructuredSelection IStructuredSelection IStructuredSelection ArrayList ArrayList hasNext SearchResultViewEntry SearchResultViewEntry entryIter getMarkers entryIter hasNext IMarker IMarker entryIter getAttribute POTENTIAL_MATCH IMarker toArray IMarker
private boolean use Plural Label I Selection s f Site get Selection Provider get Selection if s instanceof I Structured Selection s is Empty return false I Structured Selection selection I Structured Selection s int size selection size if size 0 return false int marker Count 0 Iterator iter selection iterator for int i 0 iter has Next i Search Result View Entry entry Search Result View Entry iter next Iterator entry Iter entry get Markers iterator while entry Iter has Next I Marker marker I Marker entry Iter next if marker get Attribute SearchUI POTENTIAL MATCH false marker Count if marker Count 1 return true return false  usePluralLabel ISelection fSite getSelectionProvider getSelection IStructuredSelection isEmpty IStructuredSelection IStructuredSelection markerCount hasNext SearchResultViewEntry SearchResultViewEntry entryIter getMarkers entryIter hasNext IMarker IMarker entryIter getAttribute POTENTIAL_MATCH markerCount markerCount

public Remove Result Action I Selection Provider provider boolean strings Depend On Match Count f Selection Provider provider if strings Depend On Match Count use Plural Label set Text Search Messages get String Search Result View remove Entries text NON NLS 1 set Tool Tip Text Search Messages get String Search Result View remove Entries tooltip NON NLS 1 else set Text Search Messages get String Search Result View remove Entry text NON NLS 1 set Tool Tip Text Search Messages get String Search Result View remove Entry tooltip NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH REM  RemoveResultAction ISelectionProvider stringsDependOnMatchCount fSelectionProvider stringsDependOnMatchCount usePluralLabel setText SearchMessages getString SearchResultView removeEntries setToolTipText SearchMessages getString SearchResultView removeEntries setText SearchMessages getString SearchResultView removeEntry setToolTipText SearchMessages getString SearchResultView removeEntry SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_REM
Busy Indicator show While Search Plugin get Active Workbench Shell get Display new Runnable public void run try Search Plugin get Workspace delete Markers markers catch Core Exception ex Exception Handler handle ex Search Messages get String Search Error delete Markers title Search Messages get String Search Error delete Markers message NON NLS 2 NON NLS 1  BusyIndicator showWhile SearchPlugin getActiveWorkbenchShell getDisplay SearchPlugin getWorkspace deleteMarkers CoreException ExceptionHandler SearchMessages getString deleteMarkers SearchMessages getString deleteMarkers
public void run final I Marker markers get Markers f Selection Provider get Selection if markers null Busy Indicator show While Search Plugin get Active Workbench Shell get Display new Runnable public void run try Search Plugin get Workspace delete Markers markers catch Core Exception ex Exception Handler handle ex Search Messages get String Search Error delete Markers title Search Messages get String Search Error delete Markers message NON NLS 2 NON NLS 1  IMarker getMarkers fSelectionProvider getSelection BusyIndicator showWhile SearchPlugin getActiveWorkbenchShell getDisplay SearchPlugin getWorkspace deleteMarkers CoreException ExceptionHandler SearchMessages getString deleteMarkers SearchMessages getString deleteMarkers
private I Marker get Markers I Selection s if s instanceof I Structured Selection s is Empty return null I Structured Selection selection I Structured Selection s int size selection size if size 0 return null Array List markers new Array List size 3 int marker Count 0 Iterator iter selection iterator for int i 0 iter has Next i Search Result View Entry entry Search Result View Entry iter next marker Count entry get Match Count markers add All entry get Markers return I Marker markers to Array new I Marker marker Count  IMarker getMarkers ISelection IStructuredSelection isEmpty IStructuredSelection IStructuredSelection ArrayList ArrayList markerCount hasNext SearchResultViewEntry SearchResultViewEntry markerCount getMatchCount addAll getMarkers IMarker toArray IMarker markerCount
private boolean use Plural Label I Selection s f Selection Provider get Selection if s null s is Empty s instanceof I Structured Selection return false I Structured Selection selection I Structured Selection s if selection size 1 return true Object first Element selection get First Element if first Element instanceof I Search Result View Entry return I Search Result View Entry first Element get Match Count 1 else return false  usePluralLabel ISelection fSelectionProvider getSelection isEmpty IStructuredSelection IStructuredSelection IStructuredSelection firstElement getFirstElement firstElement ISearchResultViewEntry ISearchResultViewEntry firstElement getMatchCount

public Resource To Items Mapper Content Viewer viewer f Resource To Item new Hash Map f Reuse Lists new Stack f Content Viewer viewer  ResourceToItemsMapper ContentViewer fResourceToItem HashMap fReuseLists fContentViewer
Must be called from the UI thread public void resource Changed I Resource changed Resource Object obj f Resource To Item get changed Resource if obj null not mapped else if obj instanceof Item update Item Item obj else List of Items List list List obj for int k 0 k list size k update Item Item list get k  resourceChanged IResource changedResource fResourceToItem changedResource updateItem updateItem
private void update Item Item item if item is Disposed defensive code I Label Provider lprovider I Label Provider f Content Viewer get Label Provider Object data item get Data String old Text item get Text String text lprovider get Text data if text null text equals old Text item set Text text Image old Image item get Image Image image lprovider get Image data if image null image equals old Image item set Image image  updateItem isDisposed ILabelProvider ILabelProvider fContentViewer getLabelProvider getData oldText getText getText oldText setText oldImage getImage getImage oldImage setImage
Adds a new item to the map param element Element to map param item The item used for the element public void add To Map Object element Item item I Resource resource I Search Result View Entry element get Resource if resource null Object existing Mapping f Resource To Item get resource if existing Mapping null f Resource To Item put resource item else if existing Mapping instanceof Item if existing Mapping item List list get New List list add existing Mapping list add item f Resource To Item put resource list else List List list List existing Mapping if list contains item list add item  addToMap IResource ISearchResultViewEntry getResource existingMapping fResourceToItem existingMapping fResourceToItem existingMapping existingMapping getNewList existingMapping fResourceToItem existingMapping
Removes an element from the map public void remove From Map Object element Item item I Resource resource I Search Result View Entry element get Resource if resource null Object existing Mapping f Resource To Item get resource if existing Mapping null return else if existing Mapping instanceof Item f Resource To Item remove resource else List List list List existing Mapping list remove item if list is Empty f Resource To Item remove list release List list  removeFromMap IResource ISearchResultViewEntry getResource existingMapping fResourceToItem existingMapping existingMapping fResourceToItem existingMapping isEmpty fResourceToItem releaseList
private List get New List if f Reuse Lists is Empty return List f Reuse Lists pop return new Array List 2  getNewList fReuseLists isEmpty fReuseLists ArrayList
private void release List List list if f Reuse Lists size NUMBER LIST REUSE f Reuse Lists push list  releaseList fReuseLists NUMBER_LIST_REUSE fReuseLists
Clears the map public void clear Map f Resource To Item clear  clearMap fResourceToItem
Clears the map public boolean is Empty return f Resource To Item is Empty  isEmpty fResourceToItem isEmpty

Returns a new scope part with workspace as initial scope The part is not yet created public Scope Part I Search Page Container search Page Container boolean search Enclosing Projects int initial Scope get Stored Scope Assert is Legal initial Scope 0 initial Scope 3 f Scope initial Scope f Can Search Enclosing Projects search Enclosing Projects if f Can Search Enclosing Projects f Scope I Search Page Container SELECTED PROJECTS SCOPE f Scope I Search Page Container WORKSPACE SCOPE f Search Page Container search Page Container restore State  ScopePart ISearchPageContainer searchPageContainer searchEnclosingProjects initialScope getStoredScope isLegal initialScope initialScope fScope initialScope fCanSearchEnclosingProjects searchEnclosingProjects fCanSearchEnclosingProjects fScope ISearchPageContainer SELECTED_PROJECTS_SCOPE fScope ISearchPageContainer WORKSPACE_SCOPE fSearchPageContainer searchPageContainer restoreState
private static int get Stored Scope int scope try scope fg Settings Store get Int STORE SCOPE catch Number Format Exception ex scope I Search Page Container WORKSPACE SCOPE if scope I Search Page Container WORKING SET SCOPE scope I Search Page Container SELECTION SCOPE scope I Search Page Container SELECTED PROJECTS SCOPE scope I Search Page Container WORKSPACE SCOPE scope I Search Page Container WORKSPACE SCOPE return scope  getStoredScope fgSettingsStore getInt STORE_SCOPE NumberFormatException ISearchPageContainer WORKSPACE_SCOPE ISearchPageContainer WORKING_SET_SCOPE ISearchPageContainer SELECTION_SCOPE ISearchPageContainer SELECTED_PROJECTS_SCOPE ISearchPageContainer WORKSPACE_SCOPE ISearchPageContainer WORKSPACE_SCOPE
private void restore State String lru Working Set Names fg Settings Store get Array STORE LRU WORKING SET NAMES if lru Working Set Names null Set existing Working Sets new Hash Set lru Working Set Names length for int i 0 i lru Working Set Names length i String name lru Working Set Names i I Working Set working Set PlatformUI get Workbench get Working Set Manager get Working Set name if working Set null existing Working Sets add working Set if existing Working Sets is Empty f Working Sets I Working Set existing Working Sets to Array new I Working Set existing Working Sets size else Backward compatibility String working Set Name fg Settings Store get STORE LRU WORKING SET NAME if working Set Name null I Working Set working Set PlatformUI get Workbench get Working Set Manager get Working Set working Set Name if working Set null f Working Sets new I Working Set working Set save State  restoreState lruWorkingSetNames fgSettingsStore getArray STORE_LRU_WORKING_SET_NAMES lruWorkingSetNames existingWorkingSets HashSet lruWorkingSetNames lruWorkingSetNames lruWorkingSetNames IWorkingSet workingSet getWorkbench getWorkingSetManager getWorkingSet workingSet existingWorkingSets workingSet existingWorkingSets isEmpty fWorkingSets IWorkingSet existingWorkingSets toArray IWorkingSet existingWorkingSets workingSetName fgSettingsStore STORE_LRU_WORKING_SET_NAME workingSetName IWorkingSet workingSet getWorkbench getWorkingSetManager getWorkingSet workingSetName workingSet fWorkingSets IWorkingSet workingSet saveState
Returns the scope selected in this part return the selected scope public int get Selected Scope return f Scope  getSelectedScope fScope
Sets the selected scope This method must only be called on a created part param scope the scope to be selected in this part public void set Selected Scope int scope Assert is Legal scope 0 scope 3 Assert is Not Null f Use Workspace Assert is Not Null f Use Selection Assert is Not Null f Use Working Set Assert is Not Null f Use Project f Scope scope if f Scope I Search Page Container SELECTED PROJECTS SCOPE if f Can Search Enclosing Projects Search Plugin log new Status I Status WARNING New SearchUI PLUGIN ID I Status WARNING Enclosing projects scope set on search page that does not support it null NON NLS 1 f Scope I Search Page Container WORKSPACE SCOPE else if f Use Project is Enabled f Scope I Search Page Container WORKSPACE SCOPE else if f Scope I Search Page Container SELECTION SCOPE if f Use Selection is Enabled f Scope I Search Page Container WORKSPACE SCOPE switch f Scope case I Search Page Container WORKSPACE SCOPE f Use Workspace set Selection true f Use Selection set Selection false f Use Project set Selection false f Use Working Set set Selection false break case I Search Page Container SELECTION SCOPE f Use Workspace set Selection false f Use Selection set Selection true f Use Project set Selection false f Use Working Set set Selection false break case I Search Page Container WORKING SET SCOPE f Use Workspace set Selection false f Use Selection set Selection false f Use Project set Selection false f Use Working Set set Selection true break case I Search Page Container SELECTED PROJECTS SCOPE f Use Workspace set Selection false f Use Selection set Selection false f Use Project set Selection true f Use Working Set set Selection false break update Search Page Container Action Performed Enablement fg Settings Store put STORE SCOPE f Scope  setSelectedScope isLegal isNotNull fUseWorkspace isNotNull fUseSelection isNotNull fUseWorkingSet isNotNull fUseProject fScope fScope ISearchPageContainer SELECTED_PROJECTS_SCOPE fCanSearchEnclosingProjects SearchPlugin IStatus NewSearchUI PLUGIN_ID IStatus fScope ISearchPageContainer WORKSPACE_SCOPE fUseProject isEnabled fScope ISearchPageContainer WORKSPACE_SCOPE fScope ISearchPageContainer SELECTION_SCOPE fUseSelection isEnabled fScope ISearchPageContainer WORKSPACE_SCOPE fScope ISearchPageContainer WORKSPACE_SCOPE fUseWorkspace setSelection fUseSelection setSelection fUseProject setSelection fUseWorkingSet setSelection ISearchPageContainer SELECTION_SCOPE fUseWorkspace setSelection fUseSelection setSelection fUseProject setSelection fUseWorkingSet setSelection ISearchPageContainer WORKING_SET_SCOPE fUseWorkspace setSelection fUseSelection setSelection fUseProject setSelection fUseWorkingSet setSelection ISearchPageContainer SELECTED_PROJECTS_SCOPE fUseWorkspace setSelection fUseSelection setSelection fUseProject setSelection fUseWorkingSet setSelection updateSearchPageContainerActionPerformedEnablement fgSettingsStore STORE_SCOPE fScope
private void update Search Page Container Action Performed Enablement boolean new State f Scope I Search Page Container WORKING SET SCOPE f Working Sets null if f Search Page Container instanceof Search Dialog Search Dialog f Search Page Container set Perform Action Enabled From Scope Part new State else if f Search Page Container null f Search Page Container set Perform Action Enabled new State  updateSearchPageContainerActionPerformedEnablement newState fScope ISearchPageContainer WORKING_SET_SCOPE fWorkingSets fSearchPageContainer SearchDialog SearchDialog fSearchPageContainer setPerformActionEnabledFromScopePart newState fSearchPageContainer fSearchPageContainer setPerformActionEnabled newState
Returns the selected working set of this part return the selected working set or null if the scope is not WORKING SET SCOPE if there is no working set selected public I Working Set get Selected Working Sets if get Selected Scope I Search Page Container WORKING SET SCOPE return f Working Sets else return null  WORKING_SET_SCOPE IWorkingSet getSelectedWorkingSets getSelectedScope ISearchPageContainer WORKING_SET_SCOPE fWorkingSets
Sets the selected working set for this part This method must only be called on a created part param working Set the working set to be selected public void set Selected Working Sets I Working Set working Sets Assert is Not Null working Sets set Selected Scope I Search Page Container WORKING SET SCOPE f Working Sets null Set existing Working Sets new Hash Set working Sets length for int i 0 i working Sets length i String name working Sets i get Name I Working Set working Set PlatformUI get Workbench get Working Set Manager get Working Set name if working Set null existing Working Sets add working Set if existing Working Sets is Empty f Working Sets I Working Set existing Working Sets to Array new I Working Set existing Working Sets size save State if f Working Set Text null f Working Set Text set Text to String f Working Sets  workingSet setSelectedWorkingSets IWorkingSet workingSets isNotNull workingSets setSelectedScope ISearchPageContainer WORKING_SET_SCOPE fWorkingSets existingWorkingSets HashSet workingSets workingSets workingSets getName IWorkingSet workingSet getWorkbench getWorkingSetManager getWorkingSet workingSet existingWorkingSets workingSet existingWorkingSets isEmpty fWorkingSets IWorkingSet existingWorkingSets toArray IWorkingSet existingWorkingSets saveState fWorkingSetText fWorkingSetText setText toString fWorkingSets
Saves the last recently used working sets if any private void save State if f Working Sets null f Working Sets length 0 String existing Working Set Names new String f Working Sets length for int i 0 i existing Working Set Names length i existing Working Set Names i f Working Sets i get Name fg Settings Store put STORE LRU WORKING SET NAMES existing Working Set Names  saveState fWorkingSets fWorkingSets existingWorkingSetNames fWorkingSets existingWorkingSetNames existingWorkingSetNames fWorkingSets getName fgSettingsStore STORE_LRU_WORKING_SET_NAMES existingWorkingSetNames
Creates this scope part param parent a widget which will be the parent of the new instance cannot be null public Composite create Part Composite parent f Part new Group parent SWT NONE f Part set Text Search Messages get String Scope Part group text NON NLS 1 Grid Layout layout new Grid Layout layout num Columns 4 f Part set Layout layout f Part set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Use Workspace new Button f Part SWT RADIO f Use Workspace set Data new Integer I Search Page Container WORKSPACE SCOPE f Use Workspace set Text Search Messages get String Scope Part workspace Scope text NON NLS 1 f Use Selection new Button f Part SWT RADIO f Use Selection set Data new Integer I Search Page Container SELECTION SCOPE f Use Selection set Text Search Messages get String Scope Part selected Resources Scope text NON NLS 1 I Selection selection f Search Page Container get Selection f Use Selection set Enabled selection instanceof I Structured Selection f Search Page Container get Selection is Empty Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Indent 8 f Use Selection set Layout Data gd f Use Project new Button f Part SWT RADIO f Use Project set Data new Integer I Search Page Container SELECTED PROJECTS SCOPE f Use Project set Text Search Messages get String Scope Part enclosing Projects Scope text NON NLS 1 f Use Project set Enabled selection instanceof I Structured Selection f Search Page Container get Selection is Empty has Focus Editor gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 gd horizontal Indent 8 f Use Project set Layout Data gd if f Can Search Enclosing Projects f Use Project set Visible false f Use Working Set new Button f Part SWT RADIO f Use Working Set set Data new Integer I Search Page Container WORKING SET SCOPE f Use Working Set set Text Search Messages get String Scope Part working Set Scope text NON NLS 1 f Working Set Text new Text f Part SWT SINGLE SWT BORDER SWT READ ONLY Button choose Working Set new Button f Part SWT PUSH choose Working Set set Layout Data new Grid Data choose Working Set set Text Search Messages get String Scope Part working Set Choose Button text NON NLS 1 SWT Util set Button Dimension Hint choose Working Set choose Working Set add Selection Listener new Selection Adapter public void widget Selected Selection Event e if handle Choose Working Set set Selected Scope I Search Page Container WORKING SET SCOPE gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Indent 8 gd horizontal Span 2 gd width Hint new Pixel Converter f Working Set Text convert Width In Chars To Pixels 30 f Working Set Text set Layout Data gd Add scope change listeners Selection Adapter scope Changed Lister new Selection Adapter public void widget Selected Selection Event e handle Scope Changed e f Use Workspace add Selection Listener scope Changed Lister f Use Selection add Selection Listener scope Changed Lister f Use Project add Selection Listener scope Changed Lister f Use Working Set add Selection Listener scope Changed Lister Set initial scope set Selected Scope f Scope Set initial working set if f Working Sets null f Working Set Text set Text to String f Working Sets return f Part  createPart fPart fPart setText SearchMessages getString ScopePart GridLayout GridLayout numColumns fPart setLayout fPart setLayoutData GridData GridData FILL_HORIZONTAL fUseWorkspace fPart fUseWorkspace setData ISearchPageContainer WORKSPACE_SCOPE fUseWorkspace setText SearchMessages getString ScopePart workspaceScope fUseSelection fPart fUseSelection setData ISearchPageContainer SELECTION_SCOPE fUseSelection setText SearchMessages getString ScopePart selectedResourcesScope ISelection fSearchPageContainer getSelection fUseSelection setEnabled IStructuredSelection fSearchPageContainer getSelection isEmpty GridData GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalIndent fUseSelection setLayoutData fUseProject fPart fUseProject setData ISearchPageContainer SELECTED_PROJECTS_SCOPE fUseProject setText SearchMessages getString ScopePart enclosingProjectsScope fUseProject setEnabled IStructuredSelection fSearchPageContainer getSelection isEmpty hasFocusEditor GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan horizontalIndent fUseProject setLayoutData fCanSearchEnclosingProjects fUseProject setVisible fUseWorkingSet fPart fUseWorkingSet setData ISearchPageContainer WORKING_SET_SCOPE fUseWorkingSet setText SearchMessages getString ScopePart workingSetScope fWorkingSetText fPart READ_ONLY chooseWorkingSet fPart chooseWorkingSet setLayoutData GridData chooseWorkingSet setText SearchMessages getString ScopePart workingSetChooseButton SWTUtil setButtonDimensionHint chooseWorkingSet chooseWorkingSet addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleChooseWorkingSet setSelectedScope ISearchPageContainer WORKING_SET_SCOPE GridData GridData FILL_HORIZONTAL horizontalIndent horizontalSpan widthHint PixelConverter fWorkingSetText convertWidthInCharsToPixels fWorkingSetText setLayoutData SelectionAdapter scopeChangedLister SelectionAdapter widgetSelected SelectionEvent handleScopeChanged fUseWorkspace addSelectionListener scopeChangedLister fUseSelection addSelectionListener scopeChangedLister fUseProject addSelectionListener scopeChangedLister fUseWorkingSet addSelectionListener scopeChangedLister setSelectedScope fScope fWorkingSets fWorkingSetText setText toString fWorkingSets fPart
return Whether an editor has the focus private boolean has Focus Editor I Workbench Page active Page Search Plugin get Active Page if active Page null return false if active Page get Active Part instanceof I Editor Part return true return false  hasFocusEditor IWorkbenchPage activePage SearchPlugin getActivePage activePage activePage getActivePart IEditorPart
private void handle Scope Changed Selection Event e Object source e get Source if source instanceof Button Button button Button source if button get Selection set Selected Scope Integer button get Data int Value  handleScopeChanged SelectionEvent getSource getSelection setSelectedScope getData intValue
private boolean handle Choose Working Set I Working Set Selection Dialog dialog PlatformUI get Workbench get Working Set Manager create Working Set Selection Dialog f Use Selection get Shell true if f Working Sets null dialog set Selection f Working Sets if dialog open Window OK Object result dialog get Selection if result length 0 set Selected Working Sets I Working Set result return true f Working Set Text set Text NON NLS 1 f Working Sets null if f Scope I Search Page Container WORKING SET SCOPE set Selected Scope I Search Page Container WORKSPACE SCOPE return false else if f Working Sets null test if selected working set has been removed int i 0 while i f Working Sets length if PlatformUI get Workbench get Working Set Manager get Working Set f Working Sets i get Name null break i if i f Working Sets length f Working Set Text set Text NON NLS 1 f Working Sets null update Search Page Container Action Performed Enablement return false  handleChooseWorkingSet IWorkingSetSelectionDialog getWorkbench getWorkingSetManager createWorkingSetSelectionDialog fUseSelection getShell fWorkingSets setSelection fWorkingSets getSelection setSelectedWorkingSets IWorkingSet fWorkingSetText setText fWorkingSets fScope ISearchPageContainer WORKING_SET_SCOPE setSelectedScope ISearchPageContainer WORKSPACE_SCOPE fWorkingSets fWorkingSets getWorkbench getWorkingSetManager getWorkingSet fWorkingSets getName fWorkingSets fWorkingSetText setText fWorkingSets updateSearchPageContainerActionPerformedEnablement
void set Visible boolean state f Part set Visible state  setVisible fPart setVisible
public static String to String I Working Set working Sets String result NON NLS 1 if working Sets null working Sets length 0 Arrays sort working Sets new Working Set Comparator boolean first Found false for int i 0 i working Sets length i String working Set Name working Sets i get Name if first Found result Search Messages get Formatted String Scope Part working Set Concatenation new String result working Set Name NON NLS 1 else result working Set Name first Found true return result  toString IWorkingSet workingSets workingSets workingSets workingSets WorkingSetComparator firstFound workingSets workingSetName workingSets getName firstFound SearchMessages getFormattedString ScopePart workingSetConcatenation workingSetName workingSetName firstFound

public Search String page Id String singular Label String plural Label Pattern I Label Provider label Provider Image Descriptor image Descriptor I Action goto Marker Action I Action Group Factory group Factory I Group By Key Computer group By Key Computer I Runnable With Progress operation f Page Id page Id f Singular Label singular Label f Plural Label Pattern plural Label Pattern f Image Descriptor image Descriptor f Label Provider label Provider f Goto Marker Action goto Marker Action f Action Group Factory group Factory f Group By Key Computer group By Key Computer f Operation operation if f Plural Label Pattern null f Plural Label Pattern NON NLS 1  pageId singularLabel pluralLabelPattern ILabelProvider labelProvider ImageDescriptor imageDescriptor IAction gotoMarkerAction IActionGroupFactory groupFactory IGroupByKeyComputer groupByKeyComputer IRunnableWithProgress fPageId pageId fSingularLabel singularLabel fPluralLabelPattern pluralLabelPattern fImageDescriptor imageDescriptor fLabelProvider labelProvider fGotoMarkerAction gotoMarkerAction fActionGroupFactory groupFactory fGroupByKeyComputer groupByKeyComputer fOperation fPluralLabelPattern fPluralLabelPattern
public Search String page Id String singular Label String plural Label Pattern I Label Provider label Provider Image Descriptor image Descriptor I Action goto Marker Action I Context Menu Contributor context Menu Contributor I Group By Key Computer group By Key Computer I Runnable With Progress operation f Page Id page Id f Singular Label singular Label f Plural Label Pattern plural Label Pattern f Image Descriptor image Descriptor f Label Provider label Provider f Goto Marker Action goto Marker Action f Context Menu Contributor context Menu Contributor f Group By Key Computer group By Key Computer f Operation operation if f Plural Label Pattern null f Plural Label Pattern NON NLS 1  pageId singularLabel pluralLabelPattern ILabelProvider labelProvider ImageDescriptor imageDescriptor IAction gotoMarkerAction IContextMenuContributor contextMenuContributor IGroupByKeyComputer groupByKeyComputer IRunnableWithProgress fPageId pageId fSingularLabel singularLabel fPluralLabelPattern pluralLabelPattern fImageDescriptor imageDescriptor fLabelProvider labelProvider fGotoMarkerAction gotoMarkerAction fContextMenuContributor contextMenuContributor fGroupByKeyComputer groupByKeyComputer fOperation fPluralLabelPattern fPluralLabelPattern
Returns the full description of the search The description set by the client where 0 will be replaced by the match count String get Full Description if f Singular Label null get Item Count 1 return f Singular Label try to replace 0 with the match count int i f Plural Label Pattern last Index Of 0 NON NLS 1 if i 0 return f Plural Label Pattern else return f Plural Label Pattern substring 0 i get Item Count f Plural Label Pattern substring Math min i 3 f Plural Label Pattern length  getFullDescription fSingularLabel getItemCount fSingularLabel fPluralLabelPattern lastIndexOf fPluralLabelPattern fPluralLabelPattern getItemCount fPluralLabelPattern fPluralLabelPattern
Returns a short description of the search Cuts off after 30 characters and adds The description set by the client where 0 will be replaced by the match count String get Short Description String text get Full Description int separator Pos text index Of NON NLS 1 if separator Pos 1 return text substring 0 Math min 50 text length use first 50 characters NON NLS 1 if separator Pos 30 return text don t cut if text char At 0 NON NLS 1 return text substring 0 Math min 30 text length text substring Math min separator Pos 3 text length NON NLS 1 else return text substring 0 Math min 30 text length text substring Math min separator Pos 3 text length NON NLS 1  getShortDescription getFullDescription separatorPos indexOf separatorPos separatorPos charAt separatorPos separatorPos
return text substring 0 Math min 30 text length text substring Math min separator Pos 3 text length NON NLS 1 Image used when search is displayed in a list Image Descriptor get Image Descriptor return f Image Descriptor  separatorPos ImageDescriptor getImageDescriptor fImageDescriptor
int get Item Count int count 0 Iterator iter get Results iterator while iter has Next count I Search Result View Entry iter next get Match Count return count  getItemCount getResults hasNext ISearchResultViewEntry getMatchCount
List get Results if f Results null return new Array List return f Results  getResults fResults ArrayList fResults
I Label Provider get Label Provider return f Label Provider  ILabelProvider getLabelProvider fLabelProvider
void search Again if f Operation null return Shell shell Search Plugin get Active Workbench Shell I Workspace Description workspace Desc Search Plugin get Workspace get Description boolean is Auto Building workspace Desc is Auto Building if is Auto Building disable auto build during search operation Search Plugin set Auto Building false try new Progress Monitor Dialog shell run true true f Operation catch Invocation Target Exception ex Exception Handler handle ex shell Search Messages get String Search Error search title Search Messages get String Search Error search message NON NLS 2 NON NLS 1 catch Interrupted Exception e finally if is Auto Building enable auto building again Search Plugin set Auto Building true  searchAgain fOperation SearchPlugin getActiveWorkbenchShell IWorkspaceDescription workspaceDesc SearchPlugin getWorkspace getDescription isAutoBuilding workspaceDesc isAutoBuilding isAutoBuilding SearchPlugin setAutoBuilding ProgressMonitorDialog fOperation InvocationTargetException ExceptionHandler SearchMessages getString SearchMessages getString InterruptedException isAutoBuilding SearchPlugin setAutoBuilding
boolean is Same Search Search search return search null search get Operation f Operation f Operation null  isSameSearch getOperation fOperation fOperation
void backup Markers Iterator iter get Results iterator while iter has Next Search Result View Entry iter next backup Markers  backupMarkers getResults hasNext SearchResultViewEntry backupMarkers
String get Page Id return f Page Id  getPageId fPageId
I Group By Key Computer get Group By Key Computer return f Group By Key Computer  IGroupByKeyComputer getGroupByKeyComputer fGroupByKeyComputer
public I Runnable With Progress get Operation return f Operation  IRunnableWithProgress getOperation fOperation
I Action get Goto Marker Action return f Goto Marker Action  IAction getGotoMarkerAction fGotoMarkerAction
I Context Menu Contributor get Context Menu Contributor return f Context Menu Contributor  IContextMenuContributor getContextMenuContributor fContextMenuContributor
I Action Group Factory get Action Group Factory return f Action Group Factory  IActionGroupFactory getActionGroupFactory fActionGroupFactory
public void remove Results f Results null  removeResults fResults
void set Results Array List results Assert is Not Null results f Results results  setResults ArrayList isNotNull fResults
I Selection get Selection return f Selection  ISelection getSelection fSelection
void set Selection I Selection selection f Selection selection  setSelection ISelection fSelection

class Search Again Action extends Action public Search Again Action super Search Messages get String Search Result View search Again text NON NLS 1 set Tool Tip Text Search Messages get String Search Result View search Again tooltip NON NLS 1  SearchAgainAction SearchAgainAction SearchMessages getString SearchResultView searchAgain setToolTipText SearchMessages getString SearchResultView searchAgain
public void run Search selected Search Manager get Default get Current Search if selected null selected search Again  SearchManager getDefault getCurrentSearch searchAgain

private class Tab Folder Layout extends Layout protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache if w Hint SWT DEFAULT h Hint SWT DEFAULT return new Point w Hint h Hint int x 0 int y 0 Control children composite get Children for int i 0 i children length i Point size children i compute Size SWT DEFAULT SWT DEFAULT flush Cache x Math max x size x y Math max y size y Point min Size get Min Size x Math max x min Size x y Math max y min Size y if w Hint SWT DEFAULT x w Hint if h Hint SWT DEFAULT y h Hint return new Point x y  TabFolderLayout computeSize wHint hHint flushCache wHint hHint wHint hHint getChildren computeSize flushCache minSize getMinSize minSize minSize wHint wHint hHint hHint
protected void layout Composite composite boolean flush Cache Rectangle rect composite get Client Area Control children composite get Children for int i 0 i children length i children i set Bounds rect  flushCache getClientArea getChildren setBounds
public Search Dialog Shell shell I Workspace workspace I Selection selection I Editor Part editor String page Id super shell Assert is Not Null workspace f Workspace workspace f Selection selection f Editor Part editor f Descriptors filter By Activities Search Plugin get Default get Enabled Search Page Descriptors page Id f Initial Page Id page Id  SearchDialog IWorkspace ISelection IEditorPart pageId isNotNull fWorkspace fSelection fEditorPart fDescriptors filterByActivities SearchPlugin getDefault getEnabledSearchPageDescriptors pageId fInitialPageId pageId
protected void configure Shell Shell shell super configure Shell shell shell set Text Search Messages get String Search Dialog title NON NLS 1 shell set Image Search Plugin Images get Search Plugin Images IMG TOOL SEARCH Workbench Help set Help shell I Search Help Context Ids SEARCH DIALOG  configureShell configureShell setText SearchMessages getString SearchDialog setImage SearchPluginImages SearchPluginImages IMG_TOOL_SEARCH WorkbenchHelp setHelp ISearchHelpContextIds SEARCH_DIALOG
public I Workspace get Workspace return f Workspace  IWorkspace getWorkspace fWorkspace
public I Selection get Selection return f Selection  ISelection getSelection fSelection
public I Editor Part get Editor Part return f Editor Part  IEditorPart getEditorPart fEditorPart
public void create super create if f Current Page null f Current Page set Visible true  fCurrentPage fCurrentPage setVisible
I Label Provider label Provider new Label Provider public String get Text Object element if element instanceof Search Page Descriptor String label Search Page Descriptor element get Label int i label index Of while i 0 if i label length label label substring 0 i label substring i 1 else label substring 0 i i label index Of return label else return null  ILabelProvider labelProvider LabelProvider getText SearchPageDescriptor SearchPageDescriptor getLabel indexOf indexOf
public Image get Image Object element if element instanceof Search Page Descriptor Image Descriptor image Desc Search Page Descriptor element get Image if image Desc null return null Image image image Desc create Image if image null created Images add image return image else return null  getImage SearchPageDescriptor ImageDescriptor imageDesc SearchPageDescriptor getImage imageDesc imageDesc createImage createdImages
final Button ok Button this get Ok Button viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event ok Button set Enabled viewer get Checked Elements length 0  okButton getOkButton addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent okButton setEnabled getCheckedElements
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e ok Button set Enabled viewer get Checked Elements length 0  SelectionListener SelectionAdapter widgetSelected SelectionEvent okButton setEnabled getCheckedElements
List Selection Dialog dialog new List Selection Dialog get Shell input new List Content Provider label Provider message public void create super create final Checkbox Table Viewer viewer get Viewer final Button ok Button this get Ok Button viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event ok Button set Enabled viewer get Checked Elements length 0 Selection Listener listener new Selection Adapter public void widget Selected Selection Event e ok Button set Enabled viewer get Checked Elements length 0 this get Button I Dialog Constants SELECT ALL ID add Selection Listener listener this get Button I Dialog Constants DESELECT ALL ID add Selection Listener listener  ListSelectionDialog ListSelectionDialog getShell ListContentProvider labelProvider CheckboxTableViewer getViewer okButton getOkButton addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent okButton setEnabled getCheckedElements SelectionListener SelectionAdapter widgetSelected SelectionEvent okButton setEnabled getCheckedElements getButton IDialogConstants SELECT_ALL_ID addSelectionListener getButton IDialogConstants DESELECT_ALL_ID addSelectionListener
display async Exec new Runnable public void run new Open Search Dialog Action run  asyncExec OpenSearchDialogAction
private void handle Customize Pressed List input Search Plugin get Default get Search Page Descriptors input filter By Activities input final Array List created Images new Array List input size I Label Provider label Provider new Label Provider public String get Text Object element if element instanceof Search Page Descriptor String label Search Page Descriptor element get Label int i label index Of while i 0 if i label length label label substring 0 i label substring i 1 else label substring 0 i i label index Of return label else return null public Image get Image Object element if element instanceof Search Page Descriptor Image Descriptor image Desc Search Page Descriptor element get Image if image Desc null return null Image image image Desc create Image if image null created Images add image return image else return null String message Search Messages get String Search Page Selection Dialog message NON NLS 1 List Selection Dialog dialog new List Selection Dialog get Shell input new List Content Provider label Provider message public void create super create final Checkbox Table Viewer viewer get Viewer final Button ok Button this get Ok Button viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event ok Button set Enabled viewer get Checked Elements length 0 Selection Listener listener new Selection Adapter public void widget Selected Selection Event e ok Button set Enabled viewer get Checked Elements length 0 this get Button I Dialog Constants SELECT ALL ID add Selection Listener listener this get Button I Dialog Constants DESELECT ALL ID add Selection Listener listener dialog set Title Search Messages get String Search Page Selection Dialog title NON NLS 1 dialog set Initial Selections Search Plugin get Default get Enabled Search Page Descriptors f Initial Page Id to Array if dialog open Window OK Search Page Descriptor set Enabled dialog get Result Display display get Shell get Display close if display null display is Disposed display async Exec new Runnable public void run new Open Search Dialog Action run destroy Images created Images  handleCustomizePressed SearchPlugin getDefault getSearchPageDescriptors filterByActivities ArrayList createdImages ArrayList ILabelProvider labelProvider LabelProvider getText SearchPageDescriptor SearchPageDescriptor getLabel indexOf indexOf getImage SearchPageDescriptor ImageDescriptor imageDesc SearchPageDescriptor getImage imageDesc imageDesc createImage createdImages SearchMessages getString SearchPageSelectionDialog ListSelectionDialog ListSelectionDialog getShell ListContentProvider labelProvider CheckboxTableViewer getViewer okButton getOkButton addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent okButton setEnabled getCheckedElements SelectionListener SelectionAdapter widgetSelected SelectionEvent okButton setEnabled getCheckedElements getButton IDialogConstants SELECT_ALL_ID addSelectionListener getButton IDialogConstants DESELECT_ALL_ID addSelectionListener setTitle SearchMessages getString SearchPageSelectionDialog setInitialSelections SearchPlugin getDefault getEnabledSearchPageDescriptors fInitialPageId toArray SearchPageDescriptor setEnabled getResult getShell getDisplay isDisposed asyncExec OpenSearchDialogAction destroyImages createdImages
private List filter By Activities List input Array List filtered List new Array List input size for Iterator descriptors input iterator descriptors has Next Search Page Descriptor descriptor Search Page Descriptor descriptors next if Workbench Activity Helper filter Item descriptor filtered List add descriptor return filtered List  filterByActivities ArrayList filteredList ArrayList hasNext SearchPageDescriptor SearchPageDescriptor WorkbenchActivityHelper filterItem filteredList filteredList
private void destroy Images List images Iterator iter images iterator while iter has Next Image image Image iter next if image null image is Disposed image dispose  destroyImages hasNext isDisposed
Busy Indicator show While get Shell get Display new Runnable public void run f Current Page get Descriptor At f Current Index create Object  BusyIndicator showWhile getShell getDisplay fCurrentPage getDescriptorAt fCurrentIndex createObject
item add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e item set Data null if item get Image null item get Image dispose  addDisposeListener DisposeListener widgetDisposed DisposeEvent setData getImage getImage
folder add Selection Listener new Selection Adapter public void widget Selected Selection Event event turn To Page event  addSelectionListener SelectionAdapter widgetSelected SelectionEvent turnToPage
protected Control create Page Area Composite parent int num Pages f Descriptors size f Scope Parts new Scope Part num Pages if num Pages 0 Label label new Label parent SWT CENTER SWT WRAP label set Text Search Messages get String Search Dialog no Search Extension NON NLS 1 return label f Current Index get Preferred Page Index Busy Indicator show While get Shell get Display new Runnable public void run f Current Page get Descriptor At f Current Index create Object f Current Page set Container this if num Pages 1 return get Control f Current Page parent 0 else Composite border new Composite parent SWT NONE Fill Layout layout new Fill Layout layout margin Width 7 layout margin Height 7 border set Layout layout Tab Folder folder new Tab Folder border SWT NONE folder set Layout new Tab Folder Layout for int i 0 i num Pages i Search Page Descriptor descriptor Search Page Descriptor f Descriptors get i if Workbench Activity Helper filter Item descriptor continue final Tab Item item new Tab Item folder SWT NONE item set Text descriptor get Label item add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e item set Data null if item get Image null item get Image dispose Image Descriptor image Desc descriptor get Image if image Desc null item set Image image Desc create Image item set Data descriptor if i f Current Index item set Control get Control f Current Page folder i item set Data f Current Page folder add Selection Listener new Selection Adapter public void widget Selected Selection Event event turn To Page event folder set Selection f Current Index return border  createPageArea numPages fDescriptors fScopeParts ScopePart numPages numPages setText SearchMessages getString SearchDialog noSearchExtension fCurrentIndex getPreferredPageIndex BusyIndicator showWhile getShell getDisplay fCurrentPage getDescriptorAt fCurrentIndex createObject fCurrentPage setContainer numPages getControl fCurrentPage FillLayout FillLayout marginWidth marginHeight setLayout TabFolder TabFolder setLayout TabFolderLayout numPages SearchPageDescriptor SearchPageDescriptor fDescriptors WorkbenchActivityHelper filterItem TabItem TabItem setText getLabel addDisposeListener DisposeListener widgetDisposed DisposeEvent setData getImage getImage ImageDescriptor imageDesc getImage imageDesc setImage imageDesc createImage setData fCurrentIndex setControl getControl fCurrentPage setData fCurrentPage addSelectionListener SelectionAdapter widgetSelected SelectionEvent turnToPage setSelection fCurrentIndex
protected void create Buttons For Button Bar Composite parent f Replace Button create Action Button parent REPLACE ID Search Messages get String Search Dialog replace Action true NON NLS 1 f Replace Button set Visible f Current Page instanceof I Replace Page create Action Button parent SEARCH ID Search Messages get String Search Dialog search Action true NON NLS 1 super create Buttons For Button Bar parent  createButtonsForButtonBar fReplaceButton createActionButton REPLACE_ID SearchMessages getString SearchDialog replaceAction fReplaceButton setVisible fCurrentPage IReplacePage createActionButton SEARCH_ID SearchMessages getString SearchDialog searchAction createButtonsForButtonBar
SWT Util set Button Dimension Hint f Customize Button f Customize Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Customize Pressed  SWTUtil setButtonDimensionHint fCustomizeButton fCustomizeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleCustomizePressed
protected Control create Button Bar Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 3 layout margin Height 0 layout margin Width 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Customize Button new Button composite SWT NONE f Customize Button set Text Search Messages get String Search Dialog customize NON NLS 1 Grid Data gd new Grid Data gd horizontal Indent 2 new Grid Layout margin Width f Customize Button set Layout Data gd SWT Util set Button Dimension Hint f Customize Button f Customize Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Customize Pressed Label filler new Label composite SWT NONE filler set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL Control result super create Button Bar composite get Button SEARCH ID set Enabled f Descriptors size 0 apply Dialog Font composite return result  createButtonBar GridLayout GridLayout numColumns marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_HORIZONTAL fCustomizeButton fCustomizeButton setText SearchMessages getString SearchDialog GridData GridData horizontalIndent GridLayout marginWidth fCustomizeButton setLayoutData SWTUtil setButtonDimensionHint fCustomizeButton fCustomizeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleCustomizePressed setLayoutData GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL createButtonBar getButton SEARCH_ID setEnabled fDescriptors applyDialogFont
protected boolean perform Action int actionID if f Current Page null return true boolean is Auto Building Search Plugin get Workspace is Auto Building if is Auto Building disable auto build during search operation Search Plugin set Auto Building false try f Customize Button set Enabled false if actionID SEARCH ID return f Current Page perform Action else safe cast replace button is only visible when the curren page is a replace page return I Replace Page f Current Page perform Replace finally f Customize Button set Enabled true if is Auto Building enable auto building again Search Plugin set Auto Building true  performAction fCurrentPage isAutoBuilding SearchPlugin getWorkspace isAutoBuilding isAutoBuilding SearchPlugin setAutoBuilding fCustomizeButton setEnabled SEARCH_ID fCurrentPage performAction IReplacePage fCurrentPage performReplace fCustomizeButton setEnabled isAutoBuilding SearchPlugin setAutoBuilding
private Search Page Descriptor get Descriptor At int index return Search Page Descriptor f Descriptors get index  SearchPageDescriptor getDescriptorAt SearchPageDescriptor fDescriptors
private Point get Min Size if f Min Size null return f Min Size int x 0 int y 0 int length f Descriptors size for int i 0 i length i Point size get Descriptor At i get Preferred Size if size x SWT DEFAULT x Math max x size x if size y SWT DEFAULT y Math max y size y f Min Size new Point x y return f Min Size  getMinSize fMinSize fMinSize fDescriptors getDescriptorAt getPreferredSize fMinSize fMinSize
Busy Indicator show While get Shell get Display new Runnable public void run item set Data descriptor create Object  BusyIndicator showWhile getShell getDisplay setData createObject
private void turn To Page Selection Event event final Tab Item item Tab Item event item Tab Folder folder item get Parent Control old Control folder get Item f Current Index get Control Point old Size old Control get Size if item get Control null final Search Page Descriptor descriptor Search Page Descriptor item get Data Busy Indicator show While get Shell get Display new Runnable public void run item set Data descriptor create Object I Search Page page I Search Page item get Data page set Container this Control new Control get Control page Composite event widget item get Parent get Selection Index item set Control new Control if item get Data instanceof I Search Page f Current Page I Search Page item get Data f Replace Button set Visible f Current Page instanceof I Replace Page f Current Index item get Parent get Selection Index f Current Page set Visible true Control new Control item get Control resize Dialog If Needed old Size new Control compute Size SWT DEFAULT SWT DEFAULT true  turnToPage SelectionEvent TabItem TabItem TabFolder getParent oldControl getItem fCurrentIndex getControl oldSize oldControl getSize getControl SearchPageDescriptor SearchPageDescriptor getData BusyIndicator showWhile getShell getDisplay setData createObject ISearchPage ISearchPage getData setContainer newControl getControl getParent getSelectionIndex setControl newControl getData ISearchPage fCurrentPage ISearchPage getData fReplaceButton setVisible fCurrentPage IReplacePage fCurrentIndex getParent getSelectionIndex fCurrentPage setVisible newControl getControl resizeDialogIfNeeded oldSize newControl computeSize
private int get Preferred Page Index Object element null if f Selection instanceof I Structured Selection element I Structured Selection f Selection get First Element if element null f Editor Part null element f Editor Part get Editor Input if element instanceof I File Editor Input element I File Editor Input element get File int result 0 int level I Search Page Score Computer LOWEST int size f Descriptors size for int i 0 i size i Search Page Descriptor descriptor Search Page Descriptor f Descriptors get i if f Initial Page Id null f Initial Page Id equals descriptor get Id return i int new Level descriptor compute Score element if new Level level level new Level result i return result  getPreferredPageIndex fSelection IStructuredSelection IStructuredSelection fSelection getFirstElement fEditorPart fEditorPart getEditorInput IFileEditorInput IFileEditorInput getFile ISearchPageScoreComputer fDescriptors SearchPageDescriptor SearchPageDescriptor fDescriptors fInitialPageId fInitialPageId getId newLevel computeScore newLevel newLevel
Implements method from I Search Page Container public I Runnable Context get Runnable Context return this  ISearchPageContainer IRunnableContext getRunnableContext
public int get Selected Scope if f Scope Parts f Current Index null safe code should not happen return I Search Page Container WORKSPACE SCOPE else return f Scope Parts f Current Index get Selected Scope  getSelectedScope fScopeParts fCurrentIndex ISearchPageContainer WORKSPACE_SCOPE fScopeParts fCurrentIndex getSelectedScope
public I Working Set get Selected Working Sets if f Scope Parts f Current Index null safe code should not happen return null else return f Scope Parts f Current Index get Selected Working Sets  IWorkingSet getSelectedWorkingSets fScopeParts fCurrentIndex fScopeParts fCurrentIndex getSelectedWorkingSets
Implements method from I Search Page Container public void set Selected Scope int scope if f Scope Parts f Current Index null f Scope Parts f Current Index set Selected Scope scope  ISearchPageContainer setSelectedScope fScopeParts fCurrentIndex fScopeParts fCurrentIndex setSelectedScope
Implements method from I Search Page Container public boolean has Valid Scope return get Selected Scope WORKING SET SCOPE get Selected Working Sets null  ISearchPageContainer hasValidScope getSelectedScope WORKING_SET_SCOPE getSelectedWorkingSets
Implements method from I Search Page Container public void set Selected Working Sets I Working Set working Sets if f Scope Parts f Current Index null f Scope Parts f Current Index set Selected Working Sets working Sets  ISearchPageContainer setSelectedWorkingSets IWorkingSet workingSets fScopeParts fCurrentIndex fScopeParts fCurrentIndex setSelectedWorkingSets workingSets
public void set Perform Action Enabled boolean state super set Perform Action Enabled state f Page State Ignoring Scope Part state set Perform Action Enabled From Scope Part has Valid Scope  setPerformActionEnabled setPerformActionEnabled fPageStateIgnoringScopePart setPerformActionEnabledFromScopePart hasValidScope
Set the enable state of the perform action button p Note This is a special method to be called only from the Scope Part p public void set Perform Action Enabled From Scope Part boolean state if f Page State Ignoring Scope Part super set Perform Action Enabled state  ScopePart setPerformActionEnabledFromScopePart fPageStateIgnoringScopePart setPerformActionEnabled
private Control get Control I Search Page page Composite parent int index Control control page get Control if control null return control Page wrapper Composite page Wrapper new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 page Wrapper set Layout layout Dialog apply Dialog Font page Wrapper The page itself page create Control page Wrapper Search scope Search Page Descriptor descriptor get Descriptor At index boolean show Scope descriptor show Scope Section if show Scope Composite c new Composite page Wrapper SWT NONE layout new Grid Layout c set Layout Data new Grid Data Grid Data FILL HORIZONTAL c set Layout layout f Scope Parts index new Scope Part this descriptor can Search In Projects Control part f Scope Parts index create Part c apply Dialog Font part f Scope Parts index set Visible true return page Wrapper  getControl ISearchPage getControl pageWrapper GridLayout GridLayout marginWidth marginHeight pageWrapper setLayout applyDialogFont pageWrapper createControl pageWrapper SearchPageDescriptor getDescriptorAt showScope showScopeSection showScope pageWrapper GridLayout setLayoutData GridData GridData FILL_HORIZONTAL setLayout fScopeParts ScopePart canSearchInProjects fScopeParts createPart applyDialogFont fScopeParts setVisible pageWrapper
private void resize Dialog If Needed Point old Size Point new Size if old Size null new Size null return Shell shell get Shell Point shell Size shell get Size if must Resize old Size new Size if new Size x old Size x shell Size x new Size x old Size x if new Size y old Size y shell Size y new Size y old Size y shell set Size shell Size shell layout true  resizeDialogIfNeeded oldSize newSize oldSize newSize getShell shellSize getSize mustResize oldSize newSize newSize oldSize shellSize newSize oldSize newSize oldSize shellSize newSize oldSize setSize shellSize
private boolean must Resize Point current Size Point new Size return current Size x new Size x current Size y new Size y  mustResize currentSize newSize currentSize newSize currentSize newSize
protected void status Message boolean error String message f Status Label set Text message if error f Status Label set Foreground J Face Colors get Error Text f Status Label get Display else f Status Label set Foreground null if error get Shell get Display beep  statusMessage fStatusLabel setText fStatusLabel setForeground JFaceColors getErrorText fStatusLabel getDisplay fStatusLabel setForeground getShell getDisplay

public Search Drop Down Action set Text Search Messages get String Search Result View previous Searches text NON NLS 1 set Tool Tip Text Search Messages get String Search Result View previous Searches tooltip NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH HISTORY set Menu Creator this  SearchDropDownAction setText SearchMessages getString SearchResultView previousSearches setToolTipText SearchMessages getString SearchResultView previousSearches SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_HISTORY setMenuCreator
public void dispose if f Menu null f Menu dispose f Menu null  fMenu fMenu fMenu
public Menu get Menu Menu parent return null  getMenu
public Menu get Menu Control parent if f Menu null f Menu dispose f Menu new Menu parent boolean checked One false Iterator iter Search Manager get Default get Previous Searches iterator Search selected Search Manager get Default get Current Search int i 0 while iter has Next i RESULTS IN DROP DOWN Search search Search iter next Show Search Action action new Show Search Action search action set Checked search equals selected if search equals selected checked One true add Action To Menu f Menu action new Menu Item f Menu SWT SEPARATOR if iter has Next Action others new Show Searches Action others set Checked checked One add Action To Menu f Menu others add Action To Menu f Menu new Remove All Searches Action return f Menu  getMenu fMenu fMenu fMenu checkedOne SearchManager getDefault getPreviousSearches SearchManager getDefault getCurrentSearch hasNext RESULTS_IN_DROP_DOWN ShowSearchAction ShowSearchAction setChecked checkedOne addActionToMenu fMenu MenuItem fMenu hasNext ShowSearchesAction setChecked checkedOne addActionToMenu fMenu addActionToMenu fMenu RemoveAllSearchesAction fMenu
protected void add Action To Menu Menu parent Action action Action Contribution Item item new Action Contribution Item action item fill parent 1  addActionToMenu ActionContributionItem ActionContributionItem
public void run new Show Searches Action run true  ShowSearchesAction
Get s rid of the menu because the menu hangs on to the searches etc void clear dispose 

Search f Current Search null private Search Manager Search Plugin get Workspace add Resource Change Listener this  fCurrentSearch SearchManager SearchPlugin getWorkspace addResourceChangeListener
private boolean f Is Remove All false public static Search Manager get Default return fg Default  fIsRemoveAll SearchManager getDefault fgDefault
Returns the list with previous searches I Search Linked List get Previous Searches return f Previous Searches  ISearch LinkedList getPreviousSearches fPreviousSearches
Returns the list with current last results Array List get Current Results if f Current Search null return new Array List 0 else return Array List f Current Search get Results  ArrayList getCurrentResults fCurrentSearch ArrayList ArrayList fCurrentSearch getResults
public Search get Current Search return f Current Search  getCurrentSearch fCurrentSearch
Workspace Modify Operation op new Workspace Modify Operation null protected void execute I Progress Monitor monitor throws Core Exception monitor begin Task Search Messages get String Search Manager updating 100 NON NLS 1 Search Plugin get Workspace get Root delete Markers SearchUI SEARCH MARKER true I Resource DEPTH INFINITE monitor worked 100 monitor done  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException beginTask SearchMessages getString SearchManager SearchPlugin getWorkspace getRoot deleteMarkers SEARCH_MARKER IResource DEPTH_INFINITE
void remove All Searches Search Plugin get Workspace remove Resource Change Listener this Workspace Modify Operation op new Workspace Modify Operation null protected void execute I Progress Monitor monitor throws Core Exception monitor begin Task Search Messages get String Search Manager updating 100 NON NLS 1 Search Plugin get Workspace get Root delete Markers SearchUI SEARCH MARKER true I Resource DEPTH INFINITE monitor worked 100 monitor done boolean is Auto Building Search Plugin get Workspace is Auto Building if is Auto Building disable auto build during search operation Search Plugin set Auto Building false try Progress Monitor Dialog dialog new Progress Monitor Dialog get Shell dialog run true true op catch Invocation Target Exception ex Exception Handler handle ex Search Messages get String Search Error delete Markers title Search Messages get String Search Error delete Markers message NON NLS 2 NON NLS 1 catch Interrupted Exception e Do nothing Operation has been canceled finally Search Plugin get Workspace add Resource Change Listener this if is Auto Building enable auto building again Search Plugin set Auto Building true clear searches f Previous Searches new Linked List f Current Search null update viewers Iterator iter f Listeners iterator while iter has Next Search Result Viewer viewer Search Result Viewer iter next handle All Searches Removed viewer  removeAllSearches SearchPlugin getWorkspace removeResourceChangeListener WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException beginTask SearchMessages getString SearchManager SearchPlugin getWorkspace getRoot deleteMarkers SEARCH_MARKER IResource DEPTH_INFINITE isAutoBuilding SearchPlugin getWorkspace isAutoBuilding isAutoBuilding SearchPlugin setAutoBuilding ProgressMonitorDialog ProgressMonitorDialog getShell InvocationTargetException ExceptionHandler SearchMessages getString deleteMarkers SearchMessages getString deleteMarkers InterruptedException SearchPlugin getWorkspace addResourceChangeListener isAutoBuilding SearchPlugin setAutoBuilding fPreviousSearches LinkedList fCurrentSearch fListeners hasNext SearchResultViewer SearchResultViewer handleAllSearchesRemoved
private void handle All Searches Removed Search Result Viewer viewer viewer handle All Searches Removed  handleAllSearchesRemoved SearchResultViewer handleAllSearchesRemoved
Search Plugin get Workspace remove Resource Change Listener this Workspace Modify Operation op new Workspace Modify Operation null protected void execute I Progress Monitor monitor throws Core Exception internal Set Current Search search monitor  SearchPlugin getWorkspace removeResourceChangeListener WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException internalSetCurrentSearch
void set Current Search final Search search if f Current Search search return Search Plugin get Workspace remove Resource Change Listener this Workspace Modify Operation op new Workspace Modify Operation null protected void execute I Progress Monitor monitor throws Core Exception internal Set Current Search search monitor boolean is Auto Building Search Plugin get Workspace is Auto Building if is Auto Building disable auto build during search operation Search Plugin set Auto Building false try Progress Monitor Dialog dialog new Progress Monitor Dialog get Shell dialog run true true op catch Invocation Target Exception ex Exception Handler handle ex Search Messages get String Search Error switch Search title Search Messages get String Search Error switch Search message NON NLS 2 NON NLS 1 catch Interrupted Exception e Do nothing Operation has been canceled finally Search Plugin get Workspace add Resource Change Listener this if is Auto Building enable auto building again Search Plugin set Auto Building true get Previous Searches remove search get Previous Searches add First search  setCurrentSearch fCurrentSearch SearchPlugin getWorkspace removeResourceChangeListener WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException internalSetCurrentSearch isAutoBuilding SearchPlugin getWorkspace isAutoBuilding isAutoBuilding SearchPlugin setAutoBuilding ProgressMonitorDialog ProgressMonitorDialog getShell InvocationTargetException ExceptionHandler SearchMessages getString switchSearch SearchMessages getString switchSearch InterruptedException SearchPlugin getWorkspace addResourceChangeListener isAutoBuilding SearchPlugin setAutoBuilding getPreviousSearches getPreviousSearches addFirst
final String warning Msg warning Message display sync Exec new Runnable public void run Message Dialog open Warning get Shell warning Title warning Msg  warningMsg warningMessage syncExec MessageDialog openWarning getShell warningTitle warningMsg
display sync Exec new Runnable public void run if previous Search null viewer visible Viewer previous Search set Selection viewer get Selection viewer set Input null viewer set Page Id search get Page Id viewer set Goto Marker Action search get Goto Marker Action viewer set Context Menu Target search get Context Menu Contributor viewer set Action Group Factory null viewer set Input get Current Results viewer set Action Group Factory search get Action Group Factory viewer set Selection f Current Search get Selection true  syncExec previousSearch visibleViewer previousSearch setSelection getSelection setInput setPageId getPageId setGotoMarkerAction getGotoMarkerAction setContextMenuTarget getContextMenuContributor setActionGroupFactory setInput getCurrentResults setActionGroupFactory getActionGroupFactory setSelection fCurrentSearch getSelection
void internal Set Current Search final Search search I Progress Monitor monitor if f Current Search null f Current Search backup Markers final Search previous Search f Current Search f Current Search search monitor begin Task Search Messages get String Search Manager updating get Current Results size 20 NON NLS 1 remove current search markers try Search Plugin get Workspace get Root delete Markers SearchUI SEARCH MARKER true I Resource DEPTH INFINITE catch Core Exception ex Exception Handler handle ex Search Messages get String Search Error delete Markers title Search Messages get String Search Error delete Markers message NON NLS 2 NON NLS 1 monitor worked 10 add search markers Iterator iter get Current Results iterator Array List empty Entries new Array List 10 boolean files Changed false boolean files Deleted false I Group By Key Computer group By Key Computer get Current Search get Group By Key Computer while iter has Next monitor worked 1 Search Result View Entry entry Search Result View Entry iter next Iterator attr Per Marker Iter entry get Attributes Per Marker iterator entry clear Marker List if entry get Resource null entry get Resource exists empty Entries add entry files Deleted true continue while attr Per Marker Iter has Next I Marker new Marker null try new Marker entry get Resource create Marker entry get Marker Type catch Core Exception ex Exception Handler handle ex Search Messages get String Search Error create Marker title Search Messages get String Search Error create Marker message NON NLS 2 NON NLS 1 continue try new Marker set Attributes Map attr Per Marker Iter next if group By Key Computer null group By Key Computer compute Group By Key new Marker null files Deleted true new Marker delete continue catch Core Exception ex Exception Handler handle ex Search Messages get String Search Error marker Attribute Access title Search Messages get String Search Error marker Attribute Access message NON NLS 2 NON NLS 1 entry add new Marker if entry get Match Count 0 empty Entries add entry else if files Changed entry get Resource get Modification Stamp entry get Modification Stamp files Changed true get Current Results remove All empty Entries monitor worked 10 String warning Message null Display display get Display if files Changed warning Message Search Messages get String Search Manager resource Changed NON NLS 1 if files Deleted if warning Message null warning Message NON NLS 1 else warning Message n NON NLS 1 warning Message Search Messages get String Search Manager resource Deleted NON NLS 1 if warning Message null if display null display is Disposed final String warning Title Search Messages get String Search Manager resource Changed Warning NON NLS 1 final String warning Msg warning Message display sync Exec new Runnable public void run Message Dialog open Warning get Shell warning Title warning Msg update viewers iter f Listeners iterator if display null display is Disposed final Viewer visible Viewer Search Result View Search Plugin get Search Result View get Viewer while iter has Next final Search Result Viewer viewer Search Result Viewer iter next display sync Exec new Runnable public void run if previous Search null viewer visible Viewer previous Search set Selection viewer get Selection viewer set Input null viewer set Page Id search get Page Id viewer set Goto Marker Action search get Goto Marker Action viewer set Context Menu Target search get Context Menu Contributor viewer set Action Group Factory null viewer set Input get Current Results viewer set Action Group Factory search get Action Group Factory viewer set Selection f Current Search get Selection true monitor done  internalSetCurrentSearch IProgressMonitor fCurrentSearch fCurrentSearch backupMarkers previousSearch fCurrentSearch fCurrentSearch beginTask SearchMessages getString SearchManager getCurrentResults SearchPlugin getWorkspace getRoot deleteMarkers SEARCH_MARKER IResource DEPTH_INFINITE CoreException ExceptionHandler SearchMessages getString deleteMarkers SearchMessages getString deleteMarkers getCurrentResults ArrayList emptyEntries ArrayList filesChanged filesDeleted IGroupByKeyComputer groupByKeyComputer getCurrentSearch getGroupByKeyComputer hasNext SearchResultViewEntry SearchResultViewEntry attrPerMarkerIter getAttributesPerMarker clearMarkerList getResource getResource emptyEntries filesDeleted attrPerMarkerIter hasNext IMarker newMarker newMarker getResource createMarker getMarkerType CoreException ExceptionHandler SearchMessages getString createMarker SearchMessages getString createMarker newMarker setAttributes attrPerMarkerIter groupByKeyComputer groupByKeyComputer computeGroupByKey newMarker filesDeleted newMarker CoreException ExceptionHandler SearchMessages getString markerAttributeAccess SearchMessages getString markerAttributeAccess newMarker getMatchCount emptyEntries filesChanged getResource getModificationStamp getModificationStamp filesChanged getCurrentResults removeAll emptyEntries warningMessage getDisplay filesChanged warningMessage SearchMessages getString SearchManager resourceChanged filesDeleted warningMessage warningMessage warningMessage warningMessage SearchMessages getString SearchManager resourceDeleted warningMessage isDisposed warningTitle SearchMessages getString SearchManager resourceChangedWarning warningMsg warningMessage syncExec MessageDialog openWarning getShell warningTitle warningMsg fListeners isDisposed visibleViewer SearchResultView SearchPlugin getSearchResultView getViewer hasNext SearchResultViewer SearchResultViewer syncExec previousSearch visibleViewer previousSearch setSelection getSelection setInput setPageId getPageId setGotoMarkerAction getGotoMarkerAction setContextMenuTarget getContextMenuContributor setActionGroupFactory setInput getCurrentResults setActionGroupFactory getActionGroupFactory setSelection fCurrentSearch getSelection
Returns the number of matches int get Current Item Count if f Current Search null return f Current Search get Item Count else return 0  getCurrentItemCount fCurrentSearch fCurrentSearch getItemCount
void remove All Results f Is Remove All true try Search Plugin get Workspace get Root delete Markers SearchUI SEARCH MARKER true I Resource DEPTH INFINITE catch Core Exception ex Exception Handler handle ex Search Messages get String Search Error delete Markers title Search Messages get String Search Error delete Markers message NON NLS 2 NON NLS 1 f Is Remove All false  removeAllResults fIsRemoveAll SearchPlugin getWorkspace getRoot deleteMarkers SEARCH_MARKER IResource DEPTH_INFINITE CoreException ExceptionHandler SearchMessages getString deleteMarkers SearchMessages getString deleteMarkers fIsRemoveAll
display sync Exec new Runnable public void run if f Current Search null viewer visible Viewer f Current Search set Selection viewer get Selection set New Search viewer new Search  syncExec fCurrentSearch visibleViewer fCurrentSearch setSelection getSelection setNewSearch newSearch
void add New Search final Search new Search Search Plugin get Workspace remove Resource Change Listener this Clear the viewers Iterator iter f Listeners iterator Display display get Display if display null display is Disposed final Viewer visible Viewer Search Result View Search Plugin get Search Result View get Viewer while iter has Next final Search Result Viewer viewer Search Result Viewer iter next display sync Exec new Runnable public void run if f Current Search null viewer visible Viewer f Current Search set Selection viewer get Selection set New Search viewer new Search if f Current Search null if f Current Search is Same Search new Search get Previous Searches remove f Current Search else f Current Search backup Markers f Current Search new Search get Previous Searches add First f Current Search Remove the markers try Search Plugin get Workspace get Root delete Markers SearchUI SEARCH MARKER true I Resource DEPTH INFINITE catch Core Exception ex Exception Handler handle ex Search Messages get String Search Error delete Markers title Search Messages get String Search Error delete Markers message NON NLS 2 NON NLS 1  addNewSearch newSearch SearchPlugin getWorkspace removeResourceChangeListener fListeners getDisplay isDisposed visibleViewer SearchResultView SearchPlugin getSearchResultView getViewer hasNext SearchResultViewer SearchResultViewer syncExec fCurrentSearch visibleViewer fCurrentSearch setSelection getSelection setNewSearch newSearch fCurrentSearch fCurrentSearch isSameSearch newSearch getPreviousSearches fCurrentSearch fCurrentSearch backupMarkers fCurrentSearch newSearch getPreviousSearches addFirst fCurrentSearch SearchPlugin getWorkspace getRoot deleteMarkers SEARCH_MARKER IResource DEPTH_INFINITE CoreException ExceptionHandler SearchMessages getString deleteMarkers SearchMessages getString deleteMarkers
else display sync Exec new Runnable public void run handle New Search Result  syncExec handleNewSearchResult
void search Finished Array List results Assert is Not Null results get Current Search set Results results Display display get Display if display null display is Disposed return if Thread current Thread display get Thread handle New Search Result else display sync Exec new Runnable public void run handle New Search Result Search Plugin get Workspace add Resource Change Listener this  searchFinished ArrayList isNotNull getCurrentSearch setResults getDisplay isDisposed currentThread getThread handleNewSearchResult syncExec handleNewSearchResult SearchPlugin getWorkspace addResourceChangeListener
Change event handling void add Search Change Listener Search Result Viewer viewer f Listeners add viewer  addSearchChangeListener SearchResultViewer fListeners
void remove Search Change Listener Search Result Viewer viewer Assert is Not Null viewer f Listeners remove viewer  removeSearchChangeListener SearchResultViewer isNotNull fListeners
private final void handle Search Markers Changed I Marker Delta marker Deltas if f Is Remove All handle Remove All f Is Remove All false return Iterator iter f Listeners iterator while iter has Next Search Result Viewer iter next get Control set Redraw false for int i 0 i marker Deltas length i handle Search Marker Changed marker Deltas i iter f Listeners iterator while iter has Next Search Result Viewer iter next get Control set Redraw true  handleSearchMarkersChanged IMarkerDelta markerDeltas fIsRemoveAll handleRemoveAll fIsRemoveAll fListeners hasNext SearchResultViewer getControl setRedraw markerDeltas handleSearchMarkerChanged markerDeltas fListeners hasNext SearchResultViewer getControl setRedraw
private void handle Search Marker Changed I Marker Delta marker Delta int kind marker Delta get Kind don t listen for adds will be done by I Search Result View add Match if kind I Resource Delta REMOVED 0 handle Remove Match marker Delta get Marker else if kind I Resource Delta CHANGED 0 handle Update Match marker Delta get Marker  handleSearchMarkerChanged IMarkerDelta markerDelta markerDelta getKind ISearchResultView addMatch IResourceDelta handleRemoveMatch markerDelta getMarker IResourceDelta handleUpdateMatch markerDelta getMarker
private void handle Remove All if f Current Search null f Current Search remove Results Iterator iter f Listeners iterator while iter has Next Search Result Viewer iter next handle Remove All  handleRemoveAll fCurrentSearch fCurrentSearch removeResults fListeners hasNext SearchResultViewer handleRemoveAll
private void handle New Search Result Iterator iter f Listeners iterator while iter has Next Search Result Viewer viewer Search Result Viewer iter next viewer set Input get Current Results  handleNewSearchResult fListeners hasNext SearchResultViewer SearchResultViewer setInput getCurrentResults
private void set New Search Search Result Viewer viewer Search search viewer set Input null viewer clear Title viewer set Page Id search get Page Id viewer set Goto Marker Action search get Goto Marker Action viewer set Context Menu Target search get Context Menu Contributor viewer set Action Group Factory search get Action Group Factory  setNewSearch SearchResultViewer setInput clearTitle setPageId getPageId setGotoMarkerAction getGotoMarkerAction setContextMenuTarget getContextMenuContributor setActionGroupFactory getActionGroupFactory
private void handle Remove Match I Marker marker Search Result View Entry entry find Entry marker if entry null entry remove marker if entry get Match Count 0 get Current Results remove entry Iterator iter f Listeners iterator while iter has Next Search Result Viewer iter next handle Remove Match entry else Iterator iter f Listeners iterator while iter has Next Search Result Viewer iter next handle Update Match entry true  handleRemoveMatch IMarker SearchResultViewEntry findEntry getMatchCount getCurrentResults fListeners hasNext SearchResultViewer handleRemoveMatch fListeners hasNext SearchResultViewer handleUpdateMatch
private void handle Update Match I Marker marker Search Result View Entry entry find Entry marker if entry null Iterator iter f Listeners iterator while iter has Next Search Result Viewer iter next handle Update Match entry false  handleUpdateMatch IMarker SearchResultViewEntry findEntry fListeners hasNext SearchResultViewer handleUpdateMatch
private Search Result View Entry find Entry I Marker marker Iterator entries get Current Results iterator while entries has Next Search Result View Entry entry Search Result View Entry entries next if entry contains marker return entry return null  SearchResultViewEntry findEntry IMarker getCurrentResults hasNext SearchResultViewEntry SearchResultViewEntry
Runnable runnable new Runnable public void run if get Current Search null handle Search Markers Changed marker Deltas update title and actions Iterator iter f Listeners iterator while iter has Next Search Result Viewer viewer Search Result Viewer iter next viewer enable Actions viewer update Title  getCurrentSearch handleSearchMarkersChanged markerDeltas fListeners hasNext SearchResultViewer SearchResultViewer enableActions updateTitle
Received a resource event Since the delta could be created in a separate thread this methods post the event into the viewer s display thread public final void resource Changed final I Resource Change Event event if event null return final I Marker Delta marker Deltas event find Marker Deltas SearchUI SEARCH MARKER true if marker Deltas null marker Deltas length 1 return Display display get Display if display null display is Disposed return Runnable runnable new Runnable public void run if get Current Search null handle Search Markers Changed marker Deltas update title and actions Iterator iter f Listeners iterator while iter has Next Search Result Viewer viewer Search Result Viewer iter next viewer enable Actions viewer update Title display sync Exec runnable  resourceChanged IResourceChangeEvent IMarkerDelta markerDeltas findMarkerDeltas SEARCH_MARKER markerDeltas markerDeltas getDisplay isDisposed getCurrentSearch handleSearchMarkersChanged markerDeltas fListeners hasNext SearchResultViewer SearchResultViewer enableActions updateTitle syncExec
Find and return a valid display private Display get Display Iterator iter f Listeners iterator while iter has Next Control control Viewer iter next get Control if control null control is Disposed Display display control get Display if display null display is Disposed return display return null  getDisplay fListeners hasNext getControl isDisposed getDisplay isDisposed
Find and return a valid shell private Shell get Shell return Search Plugin get Active Workbench Shell  getShell SearchPlugin getActiveWorkbenchShell

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Search Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE SearchMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException
Gets a string from the resource bundle and formats it with the argument param keythe string used to get the bundle value must not be null public static String get Formatted String String key Object arg String format null try format fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1 if arg null arg NON NLS 1 return Message Format format format new Object arg  getFormattedString fgResourceBundle getString MissingResourceException MessageFormat
Gets a string from the resource bundle and formats it with the argument param keythe string used to get the bundle value must not be null public static String get Formatted String String key Object args String format null try format fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1 return Message Format format format args  getFormattedString fgResourceBundle getString MissingResourceException MessageFormat

public String extension public int score public Extension Score Pair String extension int score this extension extension this score score  ExtensionScorePair
Creates a new search page node with the given configuration element public Search Page Descriptor I Configuration Element element f Element element  SearchPageDescriptor IConfigurationElement fElement
Creates a new search page from this node public I Search Page create Object I Search Page result null try result I Search Page f Element create Executable Extension CLASS ATTRIBUTE catch Core Exception ex Exception Handler handle ex Search Messages get String Search Error create Search Page title Search Messages get String Search Error create Search Page message NON NLS 2 NON NLS 1 catch Class Cast Exception ex Exception Handler display Message Dialog ex Search Messages get String Search Error create Search Page title Search Messages get String Search Error create Search Page message NON NLS 2 NON NLS 1 return null if result null result set Title get Label return result  ISearchPage createObject ISearchPage ISearchPage fElement createExecutableExtension CLASS_ATTRIBUTE CoreException ExceptionHandler SearchMessages getString createSearchPage SearchMessages getString createSearchPage ClassCastException ExceptionHandler displayMessageDialog SearchMessages getString createSearchPage SearchMessages getString createSearchPage setTitle getLabel
Returns the page s id public String get Id return f Element get Attribute ID ATTRIBUTE  getId fElement getAttribute ID_ATTRIBUTE
Returns the page s image public Image Descriptor get Image String image Name f Element get Attribute ICON ATTRIBUTE if image Name null return null URL url try url new URL f Element get Declaring Extension get Declaring Plugin Descriptor get InstallURL image Name catch java net MalformedURL Exception ex Exception Handler log ex Search Messages get String Search Error create Search Page message NON NLS 1 return null return Image Descriptor create FromURL url  ImageDescriptor getImage imageName fElement getAttribute ICON_ATTRIBUTE imageName fElement getDeclaringExtension getDeclaringPluginDescriptor getInstallURL imageName MalformedURLException ExceptionHandler SearchMessages getString createSearchPage ImageDescriptor createFromURL
Returns the page s label public String get Label return f Element get Attribute LABEL ATTRIBUTE  getLabel fElement getAttribute LABEL_ATTRIBUTE
Returns code true code if the scope section needs to be shown in the dialog public boolean show Scope Section return Boolean value Of f Element get Attribute SHOW SCOPE SECTION ATTRIBUTE boolean Value  showScopeSection valueOf fElement getAttribute SHOW_SCOPE_SECTION_ATTRIBUTE booleanValue
Returns code true code if the page is initially shown in the Search dialog This attribute is optional and defaults to code true code public boolean is Initially Enabled String str Val f Element get Attribute ENABLED ATTRIBUTE return str Val null Boolean value Of str Val boolean Value  isInitiallyEnabled strVal fElement getAttribute ENABLED_ATTRIBUTE strVal valueOf strVal booleanValue
Returns code true code if the page can handle searches in enclosing projects The value should be ignored if code show Scope Section code returns code false code This attribute is optional and defaults to code false code public boolean can Search In Projects return Boolean value Of f Element get Attribute CAN SEARCH ENCLOSING PROJECTS boolean Value  showScopeSection canSearchInProjects valueOf fElement getAttribute CAN_SEARCH_ENCLOSING_PROJECTS booleanValue
Returns the page s preferred size public Point get Preferred Size return String Converter as Point f Element get Attribute SIZE ATTRIBUTE UNKNOWN SIZE  getPreferredSize StringConverter asPoint fElement getAttribute SIZE_ATTRIBUTE UNKNOWN_SIZE
Returns the page s tab position relative to the other tabs returnthe tab position or code Integer MAX VALUE code if not defined in the plugins xml file public int get Tab Position int position Integer MAX VALUE 2 String str f Element get Attribute TAB POSITION ATTRIBUTE if str null try position Integer parse Int str catch Number Format Exception ex Exception Handler log ex Search Messages get String Search Error create Search Page message NON NLS 1 position is Integer MAX VALUE return position  MAX_VALUE getTabPosition MAX_VALUE fElement getAttribute TAB_POSITION_ATTRIBUTE parseInt NumberFormatException ExceptionHandler SearchMessages getString createSearchPage MAX_VALUE
boolean is Enabled return get Enabled Page Ids contains get Id  isEnabled getEnabledPageIds getId
Returns the help context for help shown in search view return the help context id or code null code if not defined public String get Search View Help Context Id return f Element get Attribute SEARCH VIEW HELP CONTEXT ID ATTRIBUTE  getSearchViewHelpContextId fElement getAttribute SEARCH_VIEW_HELP_CONTEXT_ID_ATTRIBUTE
static void set Enabled Object enabled Descriptors fg Enabled Page Ids new Array List 5 for int i 0 i enabled Descriptors length i if enabled Descriptors i instanceof Search Page Descriptor fg Enabled Page Ids add Search Page Descriptor enabled Descriptors i get Id store Enabled Page Ids  setEnabled enabledDescriptors fgEnabledPageIds ArrayList enabledDescriptors enabledDescriptors SearchPageDescriptor fgEnabledPageIds SearchPageDescriptor enabledDescriptors getId storeEnabledPageIds
private static List get Enabled Page Ids if fg Enabled Page Ids null List descriptors Search Plugin get Default get Search Page Descriptors String enabled Page Ids get Dialog Settings get Array STORE ENABLED PAGE IDS if enabled Page Ids null fg Enabled Page Ids new Array List descriptors size else fg Enabled Page Ids new Array List Arrays as List enabled Page Ids List processed Page Ids String processed Page Ids Arr get Dialog Settings get Array STORE PROCESSED PAGE IDS if processed Page Ids Arr null processed Page Ids new Array List descriptors size else processed Page Ids new Array List Arrays as List processed Page Ids Arr Enable pages based on contribution Iterator iter descriptors iterator while iter has Next Search Page Descriptor desc Search Page Descriptor iter next if processed Page Ids contains desc get Id continue processed Page Ids add desc get Id if desc is Initially Enabled fg Enabled Page Ids add desc get Id get Dialog Settings put STORE PROCESSED PAGE IDS String processed Page Ids to Array new String processed Page Ids size store Enabled Page Ids return fg Enabled Page Ids  getEnabledPageIds fgEnabledPageIds SearchPlugin getDefault getSearchPageDescriptors enabledPageIds getDialogSettings getArray STORE_ENABLED_PAGE_IDS enabledPageIds fgEnabledPageIds ArrayList fgEnabledPageIds ArrayList asList enabledPageIds processedPageIds processedPageIdsArr getDialogSettings getArray STORE_PROCESSED_PAGE_IDS processedPageIdsArr processedPageIds ArrayList processedPageIds ArrayList asList processedPageIdsArr hasNext SearchPageDescriptor SearchPageDescriptor processedPageIds getId processedPageIds getId isInitiallyEnabled fgEnabledPageIds getId getDialogSettings STORE_PROCESSED_PAGE_IDS processedPageIds toArray processedPageIds storeEnabledPageIds fgEnabledPageIds
private static void store Enabled Page Ids get Dialog Settings put STORE ENABLED PAGE IDS String fg Enabled Page Ids to Array new String fg Enabled Page Ids size Search Plugin get Default save Plugin Preferences  storeEnabledPageIds getDialogSettings STORE_ENABLED_PAGE_IDS fgEnabledPageIds toArray fgEnabledPageIds SearchPlugin getDefault savePluginPreferences
private static I Dialog Settings get Dialog Settings I Dialog Settings settings Search Plugin get Default get Dialog Settings I Dialog Settings section settings get Section SECTION ID if section null create new section section settings add New Section SECTION ID return section  IDialogSettings getDialogSettings IDialogSettings SearchPlugin getDefault getDialogSettings IDialogSettings getSection SECTION_ID addNewSection SECTION_ID
public int compare To Object o int my Pos get Tab Position int objs Pos Search Page Descriptor o get Tab Position if my Pos Integer MAX VALUE objs Pos Integer MAX VALUE my Pos objs Pos return get Label compare To Search Page Descriptor o get Label else return my Pos objs Pos  compareTo myPos getTabPosition objsPos SearchPageDescriptor getTabPosition myPos MAX_VALUE objsPos MAX_VALUE myPos objsPos getLabel compareTo SearchPageDescriptor getLabel myPos objsPos
Returns the score for this page with the given input element public int compute Score Object element if element instanceof I Adaptable I Resource resource I Resource I Adaptable element get Adapter I Resource class if resource null resource get Type I Resource FILE String extension I File resource get File Extension if extension null return get Score For File Extension extension else I Search Page Score Computer tester I Search Page Score Computer I Adaptable element get Adapter I Search Page Score Computer class if tester null return tester compute Score get Id element else if element instanceof I Search Result View Entry I Search Result View Entry entry I Search Result View Entry element return compute Score entry get Selected Marker if f Wildcard Score I Search Page Score Computer UNKNOWN return f Wildcard Score return I Search Page Score Computer LOWEST  computeScore IAdaptable IResource IResource IAdaptable getAdapter IResource getType IResource IFile getFileExtension getScoreForFileExtension ISearchPageScoreComputer ISearchPageScoreComputer IAdaptable getAdapter ISearchPageScoreComputer computeScore getId ISearchResultViewEntry ISearchResultViewEntry ISearchResultViewEntry computeScore getSelectedMarker fWildcardScore ISearchPageScoreComputer fWildcardScore ISearchPageScoreComputer
private int get Score For File Extension String extension if f Extension Score Pairs null read Extension Score Pairs int size f Extension Score Pairs size for int i 0 i size i Extension Score Pair p Extension Score Pair f Extension Score Pairs get i if extension equals p extension return p score if f Wildcard Score I Search Page Score Computer UNKNOWN return f Wildcard Score return I Search Page Score Computer LOWEST  getScoreForFileExtension fExtensionScorePairs readExtensionScorePairs fExtensionScorePairs ExtensionScorePair ExtensionScorePair fExtensionScorePairs fWildcardScore ISearchPageScoreComputer fWildcardScore ISearchPageScoreComputer
private void read Extension Score Pairs f Extension Score Pairs new Array List 3 String content f Element get Attribute EXTENSIONS ATTRIBUTE if content null return String Tokenizer tokenizer new String Tokenizer content NON NLS 1 while tokenizer has More Elements String token tokenizer next Token trim int pos token index Of if pos 1 String extension token substring 0 pos int score String Converter as Int token substring pos 1 I Search Page Score Computer UNKNOWN if extension equals NON NLS 1 f Wildcard Score score else f Extension Score Pairs add new Extension Score Pair extension score  readExtensionScorePairs fExtensionScorePairs ArrayList fElement getAttribute EXTENSIONS_ATTRIBUTE StringTokenizer StringTokenizer hasMoreElements nextToken indexOf StringConverter asInt ISearchPageScoreComputer fWildcardScore fExtensionScorePairs ExtensionScorePair
see org eclipse ui I Plugin Contribution get Local Id public String get Local Id return get Id  IPluginContribution getLocalId getLocalId getId
see org eclipse ui I Plugin Contribution get Plugin Id public String get Plugin Id return f Element get Declaring Extension get Namespace  IPluginContribution getPluginId getPluginId fElement getDeclaringExtension getNamespace

public Search Plugin I Plugin Descriptor descriptor super descriptor Assert is True fg Search Plugin null fg Search Plugin this  SearchPlugin IPluginDescriptor isTrue fgSearchPlugin fgSearchPlugin
Returns the search plugin instance public static Search Plugin get Default return fg Search Plugin  SearchPlugin getDefault fgSearchPlugin
Overrides AbstractUI Plugin initialize Default Preferences protected void initialize Default Preferences I Preference Store store Search Preference Page init Defaults store  AbstractUIPlugin initializeDefaultPreferences initializeDefaultPreferences IPreferenceStore SearchPreferencePage initDefaults
final Window Ref window Ref new Window Ref Display get Default sync Exec new Runnable public void run set Active Workbench Window window Ref  WindowRef windowRef WindowRef getDefault syncExec setActiveWorkbenchWindow windowRef
Returns the active workbench window code null code if the active window is not a workbench window public static I Workbench Window get Active Workbench Window I Workbench Window window fg Search Plugin get Workbench get Active Workbench Window if window null final Window Ref window Ref new Window Ref Display get Default sync Exec new Runnable public void run set Active Workbench Window window Ref return window Ref window else return window  IWorkbenchWindow getActiveWorkbenchWindow IWorkbenchWindow fgSearchPlugin getWorkbench getActiveWorkbenchWindow WindowRef windowRef WindowRef getDefault syncExec setActiveWorkbenchWindow windowRef windowRef
private static void set Active Workbench Window Window Ref window Ref window Ref window null Display display Display get Current if display null return Control shell display get Active Shell while shell null Object data shell get Data if data instanceof I Workbench Window window Ref window I Workbench Window data return shell shell get Parent Shell shells display get Shells for int i 0 i shells length i Object data shells i get Data if data instanceof I Workbench Window window Ref window I Workbench Window data return  setActiveWorkbenchWindow WindowRef windowRef windowRef getCurrent getActiveShell getData IWorkbenchWindow windowRef IWorkbenchWindow getParent getShells getData IWorkbenchWindow windowRef IWorkbenchWindow
Returns the shell of the active workbench window public static Shell get Active Workbench Shell I Workbench Window window get Active Workbench Window if window null return window get Shell return null  getActiveWorkbenchShell IWorkbenchWindow getActiveWorkbenchWindow getShell
Beeps using the display of the active workbench window public static void beep get Active Workbench Shell get Display beep  getActiveWorkbenchShell getDisplay
Returns the active workbench window s currrent page public static I Workbench Page get Active Page return get Active Workbench Window get Active Page  IWorkbenchPage getActivePage getActiveWorkbenchWindow getActivePage
Returns the workbench from which this plugin has been loaded public static I Workspace get Workspace return Resources Plugin get Workspace  IWorkspace getWorkspace ResourcesPlugin getWorkspace
Activates the search result view in the active page This call has no effect if the search result view is already activated return code true code if the search result view could be activated public static boolean activate Search Result View String default Perspective Id SearchUI get Default Perspective Id if default Perspective Id null I Workbench Window window window get Active Workbench Window if window null window get Shell null window get Shell is Disposed try PlatformUI get Workbench show Perspective default Perspective Id window catch Workbench Exception ex show view in current perspective try I View Part view Part get Active Page find View SearchUI SEARCH RESULT VIEW ID if view Part null Search Preference Page is View Brought To Front return get Active Page show View SearchUI SEARCH RESULT VIEW ID null return true catch Part Init Exception ex Exception Handler handle ex Search Messages get String Search Error open Result View title Search Messages get String Search Error open Result View message NON NLS 2 NON NLS 1 return false  activateSearchResultView defaultPerspectiveId getDefaultPerspectiveId defaultPerspectiveId IWorkbenchWindow getActiveWorkbenchWindow getShell getShell isDisposed getWorkbench showPerspective defaultPerspectiveId WorkbenchException IViewPart viewPart getActivePage findView SEARCH_RESULT_VIEW_ID viewPart SearchPreferencePage isViewBroughtToFront getActivePage showView SEARCH_RESULT_VIEW_ID PartInitException ExceptionHandler SearchMessages getString openResultView SearchMessages getString openResultView
Returns the search result view of the active workbench window Returns code null code if the active workbench window doesn t have any search result view public static I Search Result View get Search Result View I View Part part get Active Page find View SearchUI SEARCH RESULT VIEW ID if part instanceof I Search Result View return I Search Result View part return null  ISearchResultView getSearchResultView IViewPart getActivePage findView SEARCH_RESULT_VIEW_ID ISearchResultView ISearchResultView
static void set Auto Building boolean state I Workspace Description workspace Desc get Workspace get Description workspace Desc set Auto Building state try get Workspace set Description workspace Desc catch Core Exception ex Exception Handler handle ex Search Messages get String Search Error set Description title Search Messages get String Search Error set Description message NON NLS 2 NON NLS 1  setAutoBuilding IWorkspaceDescription workspaceDesc getWorkspace getDescription workspaceDesc setAutoBuilding getWorkspace setDescription workspaceDesc CoreException ExceptionHandler SearchMessages getString setDescription SearchMessages getString setDescription
public void startup throws Core Exception super startup register Adapters  CoreException registerAdapters
Shuts down this plug in public void shutdown throws Core Exception Internal SearchUI shutdown unregister Adapters get Workspace remove Resource Change Listener Search Manager get Default super shutdown fg Search Plugin null  CoreException InternalSearchUI unregisterAdapters getWorkspace removeResourceChangeListener SearchManager getDefault fgSearchPlugin
Returns all search pages contributed to the workbench public List get Search Page Descriptors if f Page Descriptors null I Plugin Registry registry Platform get Plugin Registry I Configuration Element elements registry get Configuration Elements For New SearchUI PLUGIN ID SEARCH PAGE EXTENSION POINT f Page Descriptors create Search Page Descriptors elements return f Page Descriptors  getSearchPageDescriptors fPageDescriptors IPluginRegistry getPluginRegistry IConfigurationElement getConfigurationElementsFor NewSearchUI PLUGIN_ID SEARCH_PAGE_EXTENSION_POINT fPageDescriptors createSearchPageDescriptors fPageDescriptors
Returns all search pages contributed to the workbench public List get Enabled Search Page Descriptors String page Id Iterator iter get Search Page Descriptors iterator List enabled Descriptors new Array List 5 while iter has Next Search Page Descriptor desc Search Page Descriptor iter next if desc is Enabled desc get Id equals page Id enabled Descriptors add desc return enabled Descriptors  getEnabledSearchPageDescriptors pageId getSearchPageDescriptors enabledDescriptors ArrayList hasNext SearchPageDescriptor SearchPageDescriptor isEnabled getId pageId enabledDescriptors enabledDescriptors
Returns the help context ID for the Search view as provided by the current search page extension since 3 0 public String get Search View Help Context Id Search current Search Search Manager get Default get Current Search if current Search null String page Id current Search get Page Id Iterator iter get Search Page Descriptors iterator while iter has Next Search Page Descriptor desc Search Page Descriptor iter next if desc get Id equals page Id String help Id desc get Search View Help Context Id if help Id null return I Search Help Context Ids SEARCH VIEW else return desc get Search View Help Context Id return I Search Help Context Ids SEARCH VIEW  getSearchViewHelpContextId currentSearch SearchManager getDefault getCurrentSearch currentSearch pageId currentSearch getPageId getSearchPageDescriptors hasNext SearchPageDescriptor SearchPageDescriptor getId pageId helpId getSearchViewHelpContextId helpId ISearchHelpContextIds SEARCH_VIEW getSearchViewHelpContextId ISearchHelpContextIds SEARCH_VIEW
Creates all necessary search page nodes private List create Search Page Descriptors I Configuration Element elements List result new Array List 5 for int i 0 i elements length i I Configuration Element element elements i if Search Page Descriptor PAGE TAG equals element get Name Search Page Descriptor desc new Search Page Descriptor element result add desc Collections sort result return result  createSearchPageDescriptors IConfigurationElement ArrayList IConfigurationElement SearchPageDescriptor PAGE_TAG getName SearchPageDescriptor SearchPageDescriptor
Returns all sorters contributed to the workbench public List get Sorter Descriptors if f Sorter Descriptors null I Plugin Registry registry Platform get Plugin Registry I Configuration Element elements registry get Configuration Elements For SearchUI PLUGIN ID SORTER EXTENSION POINT f Sorter Descriptors create Sorter Descriptors elements return f Sorter Descriptors  getSorterDescriptors fSorterDescriptors IPluginRegistry getPluginRegistry IConfigurationElement getConfigurationElementsFor PLUGIN_ID SORTER_EXTENSION_POINT fSorterDescriptors createSorterDescriptors fSorterDescriptors
Creates all necessary sorter description nodes private List create Sorter Descriptors I Configuration Element elements List result new Array List 5 for int i 0 i elements length i I Configuration Element element elements i if Sorter Descriptor SORTER TAG equals element get Name result add new Sorter Descriptor element return result  createSorterDescriptors IConfigurationElement ArrayList IConfigurationElement SorterDescriptor SORTER_TAG getName SorterDescriptor
Log status to platform log public static void log I Status status get Default get Log log status  IStatus getDefault getLog
public static void log Throwable e log new Status I Status ERROR New SearchUI PLUGIN ID INTERNAL ERROR Search Messages get String Search Plugin internal error e NON NLS 1  IStatus NewSearchUI PLUGIN_ID INTERNAL_ERROR SearchMessages getString SearchPlugin internal_error
public static String getID return get Default get Descriptor get Unique Identifier  getDefault getDescriptor getUniqueIdentifier
public static boolean use New Search return true  useNewSearch
Creates the Search plugin standard groups in a context menu public static void create Standard Groups I Menu Manager menu if menu is Empty return menu add new Separator I Context Menu Constants GROUP NEW menu add new Group Marker I Context Menu Constants GROUP GOTO menu add new Group Marker I Context Menu Constants GROUP OPEN menu add new Separator I Context Menu Constants GROUP SHOW menu add new Separator I Context Menu Constants GROUP BUILD menu add new Separator I Context Menu Constants GROUP REORGANIZE menu add new Separator I Context Menu Constants GROUP REMOVE MATCHES menu add new Group Marker I Context Menu Constants GROUP GENERATE menu add new Separator I Context Menu Constants GROUP SEARCH menu add new Separator I Context Menu Constants GROUP ADDITIONS menu add new Separator I Context Menu Constants GROUP VIEWER SETUP menu add new Separator I Context Menu Constants GROUP PROPERTIES  createStandardGroups IMenuManager isEmpty IContextMenuConstants GROUP_NEW GroupMarker IContextMenuConstants GROUP_GOTO GroupMarker IContextMenuConstants GROUP_OPEN IContextMenuConstants GROUP_SHOW IContextMenuConstants GROUP_BUILD IContextMenuConstants GROUP_REORGANIZE IContextMenuConstants GROUP_REMOVE_MATCHES GroupMarker IContextMenuConstants GROUP_GENERATE IContextMenuConstants GROUP_SEARCH IContextMenuConstants GROUP_ADDITIONS IContextMenuConstants GROUP_VIEWER_SETUP IContextMenuConstants GROUP_PROPERTIES
private void register Adapters I Adapter Manager manager Platform get Adapter Manager f Search Result View Entry Adapter Factory new Search Result View Entry Adapter Factory manager register Adapters f Search Result View Entry Adapter Factory I Search Result View Entry class  registerAdapters IAdapterManager getAdapterManager fSearchResultViewEntryAdapterFactory SearchResultViewEntryAdapterFactory registerAdapters fSearchResultViewEntryAdapterFactory ISearchResultViewEntry
private void unregister Adapters I Adapter Manager manager Platform get Adapter Manager manager unregister Adapters f Search Result View Entry Adapter Factory  unregisterAdapters IAdapterManager getAdapterManager unregisterAdapters fSearchResultViewEntryAdapterFactory

public static final Image Descriptor DESC OBJ SEARCHMARKER create Managed T OBJ IMG OBJ SEARCHMARKER public static Image get String key return PLUGIN REGISTRY get key  ImageDescriptor DESC_OBJ_SEARCHMARKER createManaged T_OBJ IMG_OBJ_SEARCHMARKER PLUGIN_REGISTRY
private static Image Descriptor create Managed String prefix String name Image Descriptor result Image Descriptor create FromURL make Icon FileURL prefix name substring NAME PREFIX LENGTH PLUGIN REGISTRY put name result return result  ImageDescriptor createManaged ImageDescriptor ImageDescriptor createFromURL makeIconFileURL NAME_PREFIX_LENGTH PLUGIN_REGISTRY
private static Image Descriptor create String prefix String name return Image Descriptor create FromURL make Icon FileURL prefix name  ImageDescriptor ImageDescriptor createFromURL makeIconFileURL
private static URL make Icon FileURL String prefix String name String Buffer buffer new String Buffer prefix buffer append name try return new URL fg Icon Location buffer to String catch MalformedURL Exception ex Exception Handler log ex Search Messages get String Search Error incorrect Icon Location message NON NLS 1 return null  makeIconFileURL StringBuffer StringBuffer fgIconLocation toString MalformedURLException ExceptionHandler SearchMessages getString incorrectIconLocation
Sets all available image descriptors for the given action public static void set Image Descriptors I Action action String type String rel Path rel Path rel Path substring NAME PREFIX LENGTH action set Disabled Image Descriptor create d type rel Path NON NLS 1 action set Hover Image Descriptor create e type rel Path NON NLS 1 action set Image Descriptor create e type rel Path NON NLS 1  setImageDescriptors IAction relPath relPath relPath NAME_PREFIX_LENGTH setDisabledImageDescriptor relPath setHoverImageDescriptor relPath setImageDescriptor relPath

public int compare Object o1 Object o2 if o1 instanceof I Perspective Descriptor o2 instanceof I Perspective Descriptor String id1 I Perspective Descriptor o1 get Label String id2 I Perspective Descriptor o2 get Label return Collator get Instance compare id1 id2 return 0  IPerspectiveDescriptor IPerspectiveDescriptor IPerspectiveDescriptor getLabel IPerspectiveDescriptor getLabel getInstance
public Search Preference Page super GRID set Preference Store Search Plugin get Default get Preference Store  SearchPreferencePage setPreferenceStore SearchPlugin getDefault getPreferenceStore
public static void init Defaults I Preference Store store RGB gray new RGB 85 85 85 store set Default EMPHASIZE POTENTIAL MATCHES true store set Default IGNORE POTENTIAL MATCHES false Preference Converter set Default store POTENTIAL MATCH FG COLOR gray store set Default REUSE EDITOR false store set Default BRING VIEW TO FRONT true store set Default DEFAULT PERSPECTIVE NO DEFAULT PERSPECTIVE store set Default LIMIT TABLE TO 200 store set Default LIMIT TABLE false  initDefaults IPreferenceStore setDefault EMPHASIZE_POTENTIAL_MATCHES setDefault IGNORE_POTENTIAL_MATCHES PreferenceConverter setDefault POTENTIAL_MATCH_FG_COLOR setDefault REUSE_EDITOR setDefault BRING_VIEW_TO_FRONT setDefault DEFAULT_PERSPECTIVE NO_DEFAULT_PERSPECTIVE setDefault LIMIT_TABLE_TO setDefault LIMIT_TABLE
public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Search Help Context Ids SEARCH PREFERENCE PAGE  createControl createControl WorkbenchHelp setHelp getControl ISearchHelpContextIds SEARCH_PREFERENCE_PAGE
protected void create Field Editors Boolean Field Editor bool Editor new Boolean Field Editor REUSE EDITOR Search Messages get String Search Preference Page reuse Editor NON NLS 1 get Field Editor Parent add Field bool Editor bool Editor new Boolean Field Editor BRING VIEW TO FRONT Search Messages get String Search Preference Page bring To Front NON NLS 1 get Field Editor Parent add Field bool Editor f Ignore Potential Matches Checkbox new Boolean Field Editor IGNORE POTENTIAL MATCHES Search Messages get String Search Preference Page ignore Potential Matches NON NLS 1 get Field Editor Parent add Field f Ignore Potential Matches Checkbox f Emphasized Checkbox new Boolean Field Editor EMPHASIZE POTENTIAL MATCHES Search Messages get String Search Preference Page emphasize Potential Matches NON NLS 1 get Field Editor Parent add Field f Emphasized Checkbox f Color Editor new Color Field Editor POTENTIAL MATCH FG COLOR Search Messages get String Search Preference Page potential Match Fg Color NON NLS 1 get Field Editor Parent add Field f Color Editor create Table Limit f Emphasized Checkbox set Enabled are Potential Matches Ignored get Field Editor Parent f Color Editor set Enabled are Potential Matches Ignored are Potential Matches Emphasized get Field Editor Parent handle Deleted Perspectives String perspective Names And Ids get Perspective Names And Ids Combo Field Editor combo Editor new Combo Field Editor DEFAULT PERSPECTIVE Search Messages get String Search Preference Page default Perspective NON NLS 1 perspective Names And Ids get Field Editor Parent add Field combo Editor  createFieldEditors BooleanFieldEditor boolEditor BooleanFieldEditor REUSE_EDITOR SearchMessages getString SearchPreferencePage reuseEditor getFieldEditorParent addField boolEditor boolEditor BooleanFieldEditor BRING_VIEW_TO_FRONT SearchMessages getString SearchPreferencePage bringToFront getFieldEditorParent addField boolEditor fIgnorePotentialMatchesCheckbox BooleanFieldEditor IGNORE_POTENTIAL_MATCHES SearchMessages getString SearchPreferencePage ignorePotentialMatches getFieldEditorParent addField fIgnorePotentialMatchesCheckbox fEmphasizedCheckbox BooleanFieldEditor EMPHASIZE_POTENTIAL_MATCHES SearchMessages getString SearchPreferencePage emphasizePotentialMatches getFieldEditorParent addField fEmphasizedCheckbox fColorEditor ColorFieldEditor POTENTIAL_MATCH_FG_COLOR SearchMessages getString SearchPreferencePage potentialMatchFgColor getFieldEditorParent addField fColorEditor createTableLimit fEmphasizedCheckbox setEnabled arePotentialMatchesIgnored getFieldEditorParent fColorEditor setEnabled arePotentialMatchesIgnored arePotentialMatchesEmphasized getFieldEditorParent handleDeletedPerspectives perspectiveNamesAndIds getPerspectiveNamesAndIds ComboFieldEditor comboEditor ComboFieldEditor DEFAULT_PERSPECTIVE SearchMessages getString SearchPreferencePage defaultPerspective perspectiveNamesAndIds getFieldEditorParent addField comboEditor
f Limit Table add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Limit Value Enablement  fLimitTable addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLimitValueEnablement
f Limit Table Value add Key Listener new Key Adapter public void key Released Key Event e validate Text  fLimitTableValue addKeyListener KeyAdapter keyReleased KeyEvent validateText
private void create Table Limit Composite parent new Composite get Field Editor Parent SWT NONE Grid Layout gl new Grid Layout gl num Columns 2 gl margin Width 0 gl margin Height 0 parent set Layout gl Grid Data gd new Grid Data gd horizontal Span 2 parent set Layout Data gd f Limit Table new Button parent SWT CHECK f Limit Table set Text Search Messages get String Search Preference Page limit label NON NLS 1 f Limit Table set Layout Data new Grid Data f Limit Table Value new Text parent SWT BORDER gd new Grid Data gd width Hint convert Width In Chars To Pixels 6 f Limit Table Value set Layout Data gd apply Dialog Font parent f Limit Table add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Limit Value Enablement f Limit Table Value add Key Listener new Key Adapter public void key Released Key Event e validate Text init Limit  createTableLimit getFieldEditorParent GridLayout GridLayout numColumns marginWidth marginHeight setLayout GridData GridData horizontalSpan setLayoutData fLimitTable fLimitTable setText SearchMessages getString SearchPreferencePage fLimitTable setLayoutData GridData fLimitTableValue GridData widthHint convertWidthInCharsToPixels fLimitTableValue setLayoutData applyDialogFont fLimitTable addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLimitValueEnablement fLimitTableValue addKeyListener KeyAdapter keyReleased KeyEvent validateText initLimit
protected void validate Text String text f Limit Table Value get Text int value 1 try value Integer value Of text int Value catch Number Format Exception e if f Limit Table get Selection value 0 set Error Message Search Messages get String Search Preference Page limit error NON NLS 1 else set Error Message null  validateText fLimitTableValue getText valueOf intValue NumberFormatException fLimitTable getSelection setErrorMessage SearchMessages getString SearchPreferencePage setErrorMessage
public void set Visible boolean state handle Deleted Perspectives super set Visible state  setVisible handleDeletedPerspectives setVisible
public void property Change Property Change Event event update Field Enablement  propertyChange PropertyChangeEvent updateFieldEnablement
public void init I Workbench workbench  IWorkbench
protected void perform Defaults super perform Defaults I Preference Store preference Store get Preference Store if preference Store null boolean limit preference Store get Default Boolean LIMIT TABLE int count preference Store get Default Int LIMIT TABLE TO f Limit Table set Selection limit f Limit Table Value set Text String value Of count update Field Enablement  performDefaults performDefaults IPreferenceStore preferenceStore getPreferenceStore preferenceStore preferenceStore getDefaultBoolean LIMIT_TABLE preferenceStore getDefaultInt LIMIT_TABLE_TO fLimitTable setSelection fLimitTableValue setText valueOf updateFieldEnablement
private void init Limit I Preference Store preference Store get Preference Store if preference Store null boolean limit preference Store get Boolean LIMIT TABLE int count preference Store get Int LIMIT TABLE TO f Limit Table set Selection limit f Limit Table Value set Text String value Of count update Limit Value Enablement  initLimit IPreferenceStore preferenceStore getPreferenceStore preferenceStore preferenceStore getBoolean LIMIT_TABLE preferenceStore getInt LIMIT_TABLE_TO fLimitTable setSelection fLimitTableValue setText valueOf updateLimitValueEnablement
public boolean perform Ok I Preference Store preference Store Search Plugin get Default get Preference Store if preference Store null preference Store set Value LIMIT TABLE f Limit Table get Selection preference Store set Value LIMIT TABLE TO Integer value Of f Limit Table Value get Text int Value return super perform Ok  performOk IPreferenceStore preferenceStore SearchPlugin getDefault getPreferenceStore preferenceStore preferenceStore setValue LIMIT_TABLE fLimitTable getSelection preferenceStore setValue LIMIT_TABLE_TO valueOf fLimitTableValue getText intValue performOk
private void update Field Enablement boolean are Potential Matches Ignored f Ignore Potential Matches Checkbox get Boolean Value f Emphasized Checkbox set Enabled are Potential Matches Ignored get Field Editor Parent f Color Editor set Enabled are Potential Matches Ignored f Emphasized Checkbox get Boolean Value get Field Editor Parent update Limit Value Enablement validate Text  updateFieldEnablement arePotentialMatchesIgnored fIgnorePotentialMatchesCheckbox getBooleanValue fEmphasizedCheckbox setEnabled arePotentialMatchesIgnored getFieldEditorParent fColorEditor setEnabled arePotentialMatchesIgnored fEmphasizedCheckbox getBooleanValue getFieldEditorParent updateLimitValueEnablement validateText
private void update Limit Value Enablement f Limit Table Value set Enabled f Limit Table get Selection  updateLimitValueEnablement fLimitTableValue setEnabled fLimitTable getSelection
Return a 2 dimensional array of perspective names and ids private String get Perspective Names And Ids I Perspective Registry registry PlatformUI get Workbench get Perspective Registry I Perspective Descriptor perspective Descriptors registry get Perspectives Arrays sort perspective Descriptors new Perspective Descriptor Comparator String table new String perspective Descriptors length 1 2 table 0 0 Search Messages get String Search Preference Page default Perspective none NON NLS 1 table 0 1 NO DEFAULT PERSPECTIVE for int i 0 i perspective Descriptors length i table i 1 0 perspective Descriptors i get Label table i 1 1 perspective Descriptors i get Id return table  getPerspectiveNamesAndIds IPerspectiveRegistry getWorkbench getPerspectiveRegistry IPerspectiveDescriptor perspectiveDescriptors getPerspectives perspectiveDescriptors PerspectiveDescriptorComparator perspectiveDescriptors SearchMessages getString SearchPreferencePage defaultPerspective NO_DEFAULT_PERSPECTIVE perspectiveDescriptors perspectiveDescriptors getLabel perspectiveDescriptors getId
private static void handle Deleted Perspectives I Preference Store store Search Plugin get Default get Preference Store String id store get String DEFAULT PERSPECTIVE if PlatformUI get Workbench get Perspective Registry find Perspective With Id id null store put Value DEFAULT PERSPECTIVE NO DEFAULT PERSPECTIVE  handleDeletedPerspectives IPreferenceStore SearchPlugin getDefault getPreferenceStore getString DEFAULT_PERSPECTIVE getWorkbench getPerspectiveRegistry findPerspectiveWithId putValue DEFAULT_PERSPECTIVE NO_DEFAULT_PERSPECTIVE
Accessors to preference values public static String get Default Perspective Id handle Deleted Perspectives I Preference Store store Search Plugin get Default get Preference Store String id store get String DEFAULT PERSPECTIVE if id null id length 0 id equals NO DEFAULT PERSPECTIVE return null else if PlatformUI get Workbench get Perspective Registry find Perspective With Id id null store put Value DEFAULT PERSPECTIVE id return null return id  getDefaultPerspectiveId handleDeletedPerspectives IPreferenceStore SearchPlugin getDefault getPreferenceStore getString DEFAULT_PERSPECTIVE NO_DEFAULT_PERSPECTIVE getWorkbench getPerspectiveRegistry findPerspectiveWithId putValue DEFAULT_PERSPECTIVE
public static int get Table Limit I Preference Store store Search Plugin get Default get Preference Store return store get Int LIMIT TABLE TO  getTableLimit IPreferenceStore SearchPlugin getDefault getPreferenceStore getInt LIMIT_TABLE_TO
public static boolean is Table Limited I Preference Store store Search Plugin get Default get Preference Store return store get Boolean LIMIT TABLE  isTableLimited IPreferenceStore SearchPlugin getDefault getPreferenceStore getBoolean LIMIT_TABLE
public static boolean is Editor Reused I Preference Store store Search Plugin get Default get Preference Store return store get Boolean REUSE EDITOR  isEditorReused IPreferenceStore SearchPlugin getDefault getPreferenceStore getBoolean REUSE_EDITOR
public static boolean is View Brought To Front I Preference Store store Search Plugin get Default get Preference Store return store get Boolean BRING VIEW TO FRONT  isViewBroughtToFront IPreferenceStore SearchPlugin getDefault getPreferenceStore getBoolean BRING_VIEW_TO_FRONT
public static boolean are Potential Matches Ignored I Preference Store store Search Plugin get Default get Preference Store return store get Boolean IGNORE POTENTIAL MATCHES  arePotentialMatchesIgnored IPreferenceStore SearchPlugin getDefault getPreferenceStore getBoolean IGNORE_POTENTIAL_MATCHES
public static boolean are Potential Matches Emphasized I Preference Store store Search Plugin get Default get Preference Store return store get Boolean EMPHASIZE POTENTIAL MATCHES  arePotentialMatchesEmphasized IPreferenceStore SearchPlugin getDefault getPreferenceStore getBoolean EMPHASIZE_POTENTIAL_MATCHES
public static RGB get Potential Match Foreground Color I Preference Store store Search Plugin get Default get Preference Store return Preference Converter get Color store POTENTIAL MATCH FG COLOR  getPotentialMatchForegroundColor IPreferenceStore SearchPlugin getDefault getPreferenceStore PreferenceConverter getColor POTENTIAL_MATCH_FG_COLOR

private static final Object fg Empty Array new Object 0 public void input Changed Viewer viewer Object old Input Object new Input Do nothing since the viewer listens to resource deltas  fgEmptyArray inputChanged oldInput newInput
public void dispose 
public boolean is Deleted Object element return false  isDeleted
public Object get Elements Object element if element instanceof Array List return Array List element to Array else return fg Empty Array  getElements ArrayList ArrayList toArray fgEmptyArray

Search Result Label Provider I Label Provider provider f Label Provider provider  SearchResultLabelProvider ILabelProvider fLabelProvider
public String get Text Object element String Buffer buf new String Buffer get Label Provider get Text element int count I Search Result View Entry element get Match Count if count 1 buf append NON NLS 1 buf append count buf append MATCHES POSTFIX return buf to String  getText StringBuffer StringBuffer getLabelProvider getText ISearchResultViewEntry getMatchCount MATCHES_POSTFIX toString
public Image get Image Object element return f Label Provider get Image element  getImage fLabelProvider getImage
Don t dispose since label providers are reused public void dispose 
I Label Provider get Label Provider return f Label Provider  ILabelProvider getLabelProvider fLabelProvider
public void add Listener I Label Provider Listener listener super add Listener listener f Label Provider add Listener listener PlatformUI get Workbench get Decorator Manager get Label Decorator add Listener listener  addListener ILabelProviderListener addListener fLabelProvider addListener getWorkbench getDecoratorManager getLabelDecorator addListener
public boolean is Label Property Object element String property return f Label Provider is Label Property element property  isLabelProperty fLabelProvider isLabelProperty
public void remove Listener I Label Provider Listener listener super remove Listener listener f Label Provider remove Listener listener PlatformUI get Workbench get Decorator Manager get Label Decorator remove Listener listener  removeListener ILabelProviderListener removeListener fLabelProvider removeListener getWorkbench getDecoratorManager getLabelDecorator removeListener

Implements method from I View Part public void init I View Site site I Memento memento throws Part Init Exception super init site memento f Memento memento  IViewPart IViewSite IMemento PartInitException fMemento
public void save State I Memento memento if f Viewer null part has not been created if f Memento null Keep the old state memento put Memento f Memento return f Viewer save State memento  saveState IMemento fViewer fMemento putMemento fMemento fViewer saveState
f Property Change Listener new I Property Change Listener public void property Change Property Change Event event if Search Preference Page POTENTIAL MATCH FG COLOR equals event get Property Search Preference Page EMPHASIZE POTENTIAL MATCHES equals event get Property if f Viewer null f Viewer updated Potential Match Fg Color  fPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent SearchPreferencePage POTENTIAL_MATCH_FG_COLOR getProperty SearchPreferencePage EMPHASIZE_POTENTIAL_MATCHES getProperty fViewer fViewer updatedPotentialMatchFgColor
Creates the search list inner viewer public void create Part Control Composite parent Assert is True f Viewer null f Viewer new Search Result Viewer this parent if f Memento null f Viewer restore State f Memento f Memento null Search Manager get Default add Search Change Listener f Viewer f Viewer init Add select All action handlers f Cell Editor Action Handler new Cell Editor Action Handler get View Site get Action Bars f Select All Action new Select All Action f Viewer f Cell Editor Action Handler set Select All Action f Select All Action fill Action Bars get View Site get Action Bars f Property Change Listener new I Property Change Listener public void property Change Property Change Event event if Search Preference Page POTENTIAL MATCH FG COLOR equals event get Property Search Preference Page EMPHASIZE POTENTIAL MATCHES equals event get Property if f Viewer null f Viewer updated Potential Match Fg Color Search Plugin get Default get Preference Store add Property Change Listener f Property Change Listener Workbench Help set Help f Viewer get Control Search Plugin get Default get Search View Help Context Id  createPartControl isTrue fViewer fViewer SearchResultViewer fMemento fViewer restoreState fMemento fMemento SearchManager getDefault addSearchChangeListener fViewer fViewer selectAll fCellEditorActionHandler CellEditorActionHandler getViewSite getActionBars fSelectAllAction SelectAllAction fViewer fCellEditorActionHandler setSelectAllAction fSelectAllAction fillActionBars getViewSite getActionBars fPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent SearchPreferencePage POTENTIAL_MATCH_FG_COLOR getProperty SearchPreferencePage EMPHASIZE_POTENTIAL_MATCHES getProperty fViewer fViewer updatedPotentialMatchFgColor SearchPlugin getDefault getPreferenceStore addPropertyChangeListener fPropertyChangeListener WorkbenchHelp setHelp fViewer getControl SearchPlugin getDefault getSearchViewHelpContextId
Returns the search result viewer public Search Result Viewer get Viewer return f Viewer  SearchResultViewer getViewer fViewer
public void set Focus f Viewer get Control set Focus  setFocus fViewer getControl setFocus
public void dispose if f Viewer null Search Manager get Default remove Search Change Listener f Viewer f Viewer null if f Property Change Listener null Search Plugin get Default get Preference Store remove Property Change Listener f Property Change Listener if f Cell Editor Action Handler null f Cell Editor Action Handler dispose f Cell Editor Action Handler null super dispose  fViewer SearchManager getDefault removeSearchChangeListener fViewer fViewer fPropertyChangeListener SearchPlugin getDefault getPreferenceStore removePropertyChangeListener fPropertyChangeListener fCellEditorActionHandler fCellEditorActionHandler fCellEditorActionHandler
protected void set Content Description String title super set Content Description title  setContentDescription setContentDescription
protected void set Title Tool Tip String text super set Title Tool Tip text  setTitleToolTip setTitleToolTip
private void fill Action Bars I Action Bars action Bars I Tool Bar Manager tool Bar action Bars get Tool Bar Manager fill Tool Bar tool Bar action Bars update Action Bars Add select All action handlers action Bars set Global Action Handler Action Factory SELECT ALL get Id f Select All Action  fillActionBars IActionBars actionBars IToolBarManager toolBar actionBars getToolBarManager fillToolBar toolBar actionBars updateActionBars selectAll actionBars setGlobalActionHandler ActionFactory SELECT_ALL getId fSelectAllAction
private void fill Tool Bar I Tool Bar Manager tbm f Viewer fill Tool Bar tbm  fillToolBar IToolBarManager fViewer fillToolBar
I Label Provider get Label Provider String page Id if page Id null return I Label Provider fg Label Providers get page Id return null  ILabelProvider getLabelProvider pageId pageId ILabelProvider fgLabelProviders pageId
public I Label Provider get Label Provider if f Viewer null return null I Base Label Provider label Provider f Viewer get Label Provider if label Provider null return null return Search Result Label Provider label Provider get Label Provider  ILabelProvider getLabelProvider fViewer IBaseLabelProvider labelProvider fViewer getLabelProvider labelProvider SearchResultLabelProvider labelProvider getLabelProvider
Make sure we are doing it in the right thread get Display sync Exec new Runnable public void run get Viewer set Goto Marker Action goto Marker Action  getDisplay syncExec getViewer setGotoMarkerAction gotoMarkerAction
private void set Goto Marker Action final I Action goto Marker Action Make sure we are doing it in the right thread get Display sync Exec new Runnable public void run get Viewer set Goto Marker Action goto Marker Action  setGotoMarkerAction IAction gotoMarkerAction getDisplay syncExec getViewer setGotoMarkerAction gotoMarkerAction
Display get Display return f Viewer get Control get Display  getDisplay fViewer getControl getDisplay
Implements method from I Search Result View public I Selection get Selection return f Viewer get Selection  ISearchResultView ISelection getSelection fViewer getSelection
public void search Started I Action Group Factorygroup Factory Stringsingular Label Stringplural Label Pattern Image Descriptorimage Descriptor Stringpage Id I Label Providerlabel Provider I Actiongoto Action I Group By Key Computergroup By Key Computer I Runnable With Progressoperation Assert is Not Null page Id Assert is Not Null plural Label Pattern Assert is Not Null goto Action f Response new Hash Map 500 set Goto Marker Action goto Action I Label Provider old Label Provider I Label Provider fg Label Providers get page Id if old Label Provider null old Label Provider dispose fg Label Providers put page Id label Provider Search Manager get Default add New Search new Search page Id singular Label plural Label Pattern null image Descriptor f Viewer get Goto Marker Action group Factory group By Key Computer operation  searchStarted IActionGroupFactorygroupFactory StringsingularLabel StringpluralLabelPattern ImageDescriptorimageDescriptor StringpageId ILabelProviderlabelProvider IActiongotoAction IGroupByKeyComputergroupByKeyComputer IRunnableWithProgressoperation isNotNull pageId isNotNull pluralLabelPattern isNotNull gotoAction fResponse HashMap setGotoMarkerAction gotoAction ILabelProvider oldLabelProvider ILabelProvider fgLabelProviders pageId oldLabelProvider oldLabelProvider fgLabelProviders pageId labelProvider SearchManager getDefault addNewSearch pageId singularLabel pluralLabelPattern imageDescriptor fViewer getGotoMarkerAction groupFactory groupByKeyComputer
Implements method from I Search Result View deprecated As of build 20011107 replaced by the new version with additonal parameter public void search Started Stringpage Id Stringlabel Image Descriptorimage Descriptor I Context Menu Contributor contributor I Label Providerlabel Provider I Actiongoto Action I Group By Key Computergroup By Key Computer I Runnable With Progressoperation search Started page Id null label image Descriptor contributor label Provider goto Action group By Key Computer operation  ISearchResultView deprecatedAs searchStarted StringpageId ImageDescriptorimageDescriptor IContextMenuContributor ILabelProviderlabelProvider IActiongotoAction IGroupByKeyComputergroupByKeyComputer IRunnableWithProgressoperation searchStarted pageId imageDescriptor labelProvider gotoAction groupByKeyComputer
Implements method from I Search Result View deprecated As of build 20020514 public void search Started Stringpage Id Stringsingular Label Stringplural Label Pattern Image Descriptorimage Descriptor I Context Menu Contributor contributor I Label Providerlabel Provider I Actiongoto Action I Group By Key Computergroup By Key Computer I Runnable With Progressoperation Assert is Not Null page Id Assert is Not Null plural Label Pattern Assert is Not Null goto Action f Response new Hash Map 500 set Goto Marker Action goto Action I Label Provider old Label Provider I Label Provider fg Label Providers get page Id if old Label Provider null old Label Provider dispose fg Label Providers put page Id label Provider Search Manager get Default add New Search new Search page Id singular Label plural Label Pattern null image Descriptor f Viewer get Goto Marker Action contributor group By Key Computer operation  ISearchResultView deprecatedAs searchStarted StringpageId StringsingularLabel StringpluralLabelPattern ImageDescriptorimageDescriptor IContextMenuContributor ILabelProviderlabelProvider IActiongotoAction IGroupByKeyComputergroupByKeyComputer IRunnableWithProgressoperation isNotNull pageId isNotNull pluralLabelPattern isNotNull gotoAction fResponse HashMap setGotoMarkerAction gotoAction ILabelProvider oldLabelProvider ILabelProvider fgLabelProviders pageId oldLabelProvider oldLabelProvider fgLabelProviders pageId labelProvider SearchManager getDefault addNewSearch pageId singularLabel pluralLabelPattern imageDescriptor fViewer getGotoMarkerAction groupByKeyComputer
public void add Match String description Object group By Key I Resource resource I Marker marker Search Result View Entry entry Search Result View Entry f Response get group By Key if entry null entry new Search Result View Entry group By Key resource f Response put group By Key entry entry add marker  addMatch groupByKey IResource IMarker SearchResultViewEntry SearchResultViewEntry fResponse groupByKey SearchResultViewEntry groupByKey fResponse groupByKey
Implements method from I Search Result View public void search Finished Search Manager get Default search Finished new Array List f Response values f Response null  ISearchResultView searchFinished SearchManager getDefault searchFinished ArrayList fResponse fResponse

public Search Result View Entry Object group By Key I Resource resource f Group By Key group By Key f Resource resource if f Resource null f Modification Stamp f Resource get Modification Stamp  SearchResultViewEntry groupByKey IResource fGroupByKey groupByKey fResource fResource fModificationStamp fResource getModificationStamp
Accessors public Object get Group By Key return f Group By Key  getGroupByKey fGroupByKey
void set Group By Key Object group By Key f Group By Key group By Key  setGroupByKey groupByKey fGroupByKey groupByKey
public I Resource get Resource return f Resource  IResource getResource fResource
public int get Match Count if f Markers null return f Markers size if f Markers null f Marker null return 1 return 0  getMatchCount fMarkers fMarkers fMarkers fMarker
boolean is Potential Match if f Marker null return f Marker get Attribute SearchUI POTENTIAL MATCH false return false  isPotentialMatch fMarker fMarker getAttribute POTENTIAL_MATCH
List get Attributes Per Marker if f Attributes null return new Array List 0 return f Attributes  getAttributesPerMarker fAttributes ArrayList fAttributes
public long get Modification Stamp return f Modification Stamp  getModificationStamp fModificationStamp
void clear Marker List f Marker null if f Markers null f Markers clear  clearMarkerList fMarker fMarkers fMarkers
void add I Marker marker if marker null f Marker Type null try f Marker Type marker get Type catch Core Exception ex will default to org eclipse search searchmarker if f Marker null f Marker marker if f Markers null f Markers add marker return if f Markers null f Markers new Array List 10 add By Startpos f Markers f Marker add By Startpos f Markers marker  IMarker fMarkerType fMarkerType getType CoreException fMarker fMarker fMarkers fMarkers fMarkers fMarkers ArrayList addByStartpos fMarkers fMarker addByStartpos fMarkers
void set Selected Marker Index int index f Selected Marker Index index  setSelectedMarkerIndex fSelectedMarkerIndex
public I Marker get Selected Marker f Selected Marker Index Math min f Selected Marker Index get Match Count 1 if f Markers null f Marker null return null if f Markers null f Selected Marker Index 0 return I Marker f Markers get f Selected Marker Index return f Marker  IMarker getSelectedMarker fSelectedMarkerIndex fSelectedMarkerIndex getMatchCount fMarkers fMarker fMarkers fSelectedMarkerIndex IMarker fMarkers fSelectedMarkerIndex fMarker
public List get Markers if f Markers null f Marker null return new Array List 0 else if f Markers null f Marker null List markers new Array List 1 markers add f Marker return markers return f Markers  getMarkers fMarkers fMarker ArrayList fMarkers fMarker ArrayList fMarker fMarkers
String get Marker Type if f Marker Type null return SearchUI SEARCH MARKER else return f Marker Type  getMarkerType fMarkerType SEARCH_MARKER fMarkerType
boolean contains I Marker marker if f Markers null f Marker null return false if f Markers null return f Marker equals marker else return f Markers contains marker  IMarker fMarkers fMarker fMarkers fMarker fMarkers
void remove I Marker marker if marker null return if f Markers null if f Marker null f Marker equals marker f Marker null else f Markers remove marker if f Markers size 1 f Marker I Marker f Markers get 0 f Markers null  IMarker fMarkers fMarker fMarker fMarker fMarkers fMarkers fMarker IMarker fMarkers fMarkers
void backup Markers if f Resource null f Modification Stamp f Resource get Modification Stamp List markers get Markers f Attributes new Array List markers size Iterator iter markers iterator while iter has Next I Marker marker I Marker iter next Map attributes null try attributes marker get Attributes catch Core Exception ex don t backup corrupt marker continue f Attributes add attributes  backupMarkers fResource fModificationStamp fResource getModificationStamp getMarkers fAttributes ArrayList hasNext IMarker IMarker getAttributes CoreException fAttributes
private void add By Startpos Array List markers I Marker marker int start Pos marker get Attribute I Marker CHAR START 1 int i 0 int marker Count markers size while i marker Count start Pos I Marker markers get i get Attribute I Marker CHAR START 1 i markers add i marker if i 0 f Marker marker  addByStartpos ArrayList IMarker startPos getAttribute IMarker CHAR_START markerCount markerCount startPos IMarker getAttribute IMarker CHAR_START fMarker

public Class get Adapter List return PROPERTIES  getAdapterList
public Object get Adapter Object element Class key I Search Result View Entry entry I Search Result View Entry element if I Resource class equals key I Resource resource entry get Resource This is a trick to filter out dummy markers that have been attached to a project because there is no corresponding resource in the workspace int type resource get Type if type I Resource PROJECT type I Resource ROOT return resource return null  getAdapter ISearchResultViewEntry ISearchResultViewEntry IResource IResource getResource getType IResource IResource

new I Selection Changed Listener public void selection Changed Selection Changed Event event if f Last Selection null f Last Selection equals event get Selection f Last Selection event get Selection handle Selection Changed  ISelectionChangedListener selectionChanged SelectionChangedEvent fLastSelection fLastSelection getSelection fLastSelection getSelection handleSelectionChanged
add Open Listener new I Open Listener public void open Open Event event show Result  addOpenListener IOpenListener OpenEvent showResult
menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr Search Plugin create Standard Groups mgr fill Context Menu mgr  menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager SearchPlugin createStandardGroups fillContextMenu
public Search Result Viewer Search Result View outer Part Composite parent super new Table parent SWT MULTI SWT H SCROLL SWT V SCROLL SWT FULL SELECTION f Resource To Items Mapper new Resource To Items Mapper this f Outer Part outer Part Assert is Not Null f Outer Part if Search Preference Page are Potential Matches Emphasized f Potential Match Fg Color new Color Search Plugin get Active Workbench Shell get Display Search Preference Page get Potential Match Foreground Color set Use Hashlookup true set Content Provider new Search Result Content Provider I Label Provider label Provider new Search Result Label Provider new File Label Provider File Label Provider SHOW LABEL set Label Provider label Provider Search current Search Search Manager get Default get Current Search boolean has Search current Search null boolean has Search Operation has Search current Search get Operation null f Show Next Result Action new Show Next Result Action this f Show Next Result Action set Enabled false f Show Previous Result Action new Show Previous Result Action this f Show Previous Result Action set Enabled false f Goto Marker Action Proxy new Goto Marker Action this f Goto Marker Action Proxy set Enabled false f Remove Selected Matches Action new Remove Result Action this false f Remove Selected Matches Action set Enabled false f Remove All Results Action new Remove All Results Action f Remove All Results Action set Enabled false f Search Again Action new Search Again Action f Search Again Action set Enabled has Search Operation f Sort Drop Down Action new Sort Drop Down Action this f Sort Drop Down Action set Enabled get Item Count 0 f Search Drop Down Action new Search Drop Down Action f Search Drop Down Action set Enabled has Search f Copy To Clipboard Action new Copy To Clipboard Action this add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event if f Last Selection null f Last Selection equals event get Selection f Last Selection event get Selection handle Selection Changed add Open Listener new I Open Listener public void open Open Event event show Result Menu Manager menu Mgr new Menu Manager Pop Up NON NLS 1 menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr Search Plugin create Standard Groups mgr fill Context Menu mgr Menu menu menu Mgr create Context Menu get Table get Table set Menu menu Register menu f Outer Part get Site register Context Menu menu Mgr this I Action Bars action Bars f Outer Part get View Site get Action Bars if action Bars null action Bars set Global Action Handler Action Factory NEXT get Id f Show Next Result Action action Bars set Global Action Handler Action Factory PREVIOUS get Id f Show Previous Result Action f Outer Part get Site set Selection Provider this  SearchResultViewer SearchResultView outerPart H_SCROLL V_SCROLL FULL_SELECTION fResourceToItemsMapper ResourceToItemsMapper fOuterPart outerPart isNotNull fOuterPart SearchPreferencePage arePotentialMatchesEmphasized fPotentialMatchFgColor SearchPlugin getActiveWorkbenchShell getDisplay SearchPreferencePage getPotentialMatchForegroundColor setUseHashlookup setContentProvider SearchResultContentProvider ILabelProvider labelProvider SearchResultLabelProvider FileLabelProvider FileLabelProvider SHOW_LABEL setLabelProvider labelProvider currentSearch SearchManager getDefault getCurrentSearch hasSearch currentSearch hasSearchOperation hasSearch currentSearch getOperation fShowNextResultAction ShowNextResultAction fShowNextResultAction setEnabled fShowPreviousResultAction ShowPreviousResultAction fShowPreviousResultAction setEnabled fGotoMarkerActionProxy GotoMarkerAction fGotoMarkerActionProxy setEnabled fRemoveSelectedMatchesAction RemoveResultAction fRemoveSelectedMatchesAction setEnabled fRemoveAllResultsAction RemoveAllResultsAction fRemoveAllResultsAction setEnabled fSearchAgainAction SearchAgainAction fSearchAgainAction setEnabled hasSearchOperation fSortDropDownAction SortDropDownAction fSortDropDownAction setEnabled getItemCount fSearchDropDownAction SearchDropDownAction fSearchDropDownAction setEnabled hasSearch fCopyToClipboardAction CopyToClipboardAction addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent fLastSelection fLastSelection getSelection fLastSelection getSelection handleSelectionChanged addOpenListener IOpenListener OpenEvent showResult MenuManager menuMgr MenuManager PopUp menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager SearchPlugin createStandardGroups fillContextMenu menuMgr createContextMenu getTable getTable setMenu fOuterPart getSite registerContextMenu menuMgr IActionBars actionBars fOuterPart getViewSite getActionBars actionBars actionBars setGlobalActionHandler ActionFactory getId fShowNextResultAction actionBars setGlobalActionHandler ActionFactory getId fShowPreviousResultAction fOuterPart getSite setSelectionProvider
void init Search search Search Manager get Default get Current Search if search null set Goto Marker Action search get Goto Marker Action set Context Menu Target search get Context Menu Contributor set Action Group Factory null set Action Group Factory search get Action Group Factory set Page Id search get Page Id set Input search get Results  SearchManager getDefault getCurrentSearch setGotoMarkerAction getGotoMarkerAction setContextMenuTarget getContextMenuContributor setActionGroupFactory setActionGroupFactory getActionGroupFactory setPageId getPageId setInput getResults
protected void do Update Item Widget item Object element boolean full Map super do Update Item item element full Map if Search Result View Entry element is Potential Match Table Item ti Table Item item ti set Foreground f Potential Match Fg Color  doUpdateItem fullMap doUpdateItem fullMap SearchResultViewEntry isPotentialMatch TableItem TableItem setForeground fPotentialMatchFgColor
private void handle Selection Changed int selection Count get Selected Entries Count boolean has Single Selection selection Count 1 boolean has Elements get Item Count 0 f Show Next Result Action set Enabled has Single Selection has Elements selection Count 0 f Show Previous Result Action set Enabled has Single Selection has Elements selection Count 0 f Goto Marker Action Proxy set Enabled has Single Selection f Remove Selected Matches Action set Enabled selection Count 0 if f Handle Selection Changed Events f Marker To Show 1 f Current Match Removed false else f Handle Selection Changed Events true update Status Line  handleSelectionChanged selectionCount getSelectedEntriesCount hasSingleSelection selectionCount hasElements getItemCount fShowNextResultAction setEnabled hasSingleSelection hasElements selectionCount fShowPreviousResultAction setEnabled hasSingleSelection hasElements selectionCount fGotoMarkerActionProxy setEnabled hasSingleSelection fRemoveSelectedMatchesAction setEnabled selectionCount fHandleSelectionChangedEvents fMarkerToShow fCurrentMatchRemoved fHandleSelectionChangedEvents updateStatusLine
void update Status Line boolean has Single Selection get Selected Entries Count 1 String location NON NLS 1 if has Single Selection I Search Result View Entry entry I Search Result View Entry get Table get Item get Table get Selection Index get Data I Path path entry get Resource get Full Path if path null location path make Relative to String set Status Line Message location  updateStatusLine hasSingleSelection getSelectedEntriesCount hasSingleSelection ISearchResultViewEntry ISearchResultViewEntry getTable getItem getTable getSelectionIndex getData IPath getResource getFullPath makeRelative toString setStatusLineMessage
void enable Actions Note The check before each set operation reduces flickering boolean state get Item Count 0 if state f Show Next Result Action is Enabled f Show Next Result Action set Enabled state if state f Show Previous Result Action is Enabled f Show Previous Result Action set Enabled state if state f Sort Drop Down Action is Enabled f Sort Drop Down Action set Enabled state if state f Remove All Results Action is Enabled f Remove All Results Action set Enabled state Search current Search Search Manager get Default get Current Search state current Search null boolean operation State state current Search get Operation null if state f Search Drop Down Action is Enabled f Search Drop Down Action set Enabled state if operation State f Search Again Action is Enabled f Search Again Action set Enabled operation State state get Selection is Empty if state f Goto Marker Action Proxy is Enabled f Goto Marker Action Proxy set Enabled state if state f Remove Selected Matches Action is Enabled f Remove Selected Matches Action set Enabled state  enableActions getItemCount fShowNextResultAction isEnabled fShowNextResultAction setEnabled fShowPreviousResultAction isEnabled fShowPreviousResultAction setEnabled fSortDropDownAction isEnabled fSortDropDownAction setEnabled fRemoveAllResultsAction isEnabled fRemoveAllResultsAction setEnabled currentSearch SearchManager getDefault getCurrentSearch currentSearch operationState currentSearch getOperation fSearchDropDownAction isEnabled fSearchDropDownAction setEnabled operationState fSearchAgainAction isEnabled fSearchAgainAction setEnabled operationState getSelection isEmpty fGotoMarkerActionProxy isEnabled fGotoMarkerActionProxy setEnabled fRemoveSelectedMatchesAction isEnabled fRemoveSelectedMatchesAction setEnabled
protected void input Changed Object input Object old Input f Last Selection null get Table remove All super input Changed input old Input f Marker To Show 1 f Current Match Removed false update Title enable Actions if get Item Count 0 select Result 0 Workbench Help set Help get Control Search Plugin get Default get Search View Help Context Id  inputChanged oldInput fLastSelection getTable removeAll inputChanged oldInput fMarkerToShow fCurrentMatchRemoved updateTitle enableActions getItemCount selectResult WorkbenchHelp setHelp getControl SearchPlugin getDefault getSearchViewHelpContextId
protected int get Selected Entries Count I Selection s get Selection if s null s is Empty s instanceof I Structured Selection return 0 I Structured Selection selection I Structured Selection s return selection size  getSelectedEntriesCount ISelection getSelection isEmpty IStructuredSelection IStructuredSelection IStructuredSelection
protected boolean enable Remove Match Menu Item if get Selected Entries Count 1 return false Table table get Table int index table get Selection Index Search Result View Entry entry null if index 1 entry Search Result View Entry table get Item index get Data return entry null entry get Match Count 1  enableRemoveMatchMenuItem getSelectedEntriesCount getTable getSelectionIndex SearchResultViewEntry SearchResultViewEntry getItem getData getMatchCount
void fill Context Menu I Menu Manager menu I Selection selection get Selection if f Action Group null Action Context context new Action Context selection context set Input get Input f Action Group set Context context f Action Group fill Context Menu menu f Action Group set Context null if f Context Menu Contributor null f Context Menu Contributor fill menu this if selection is Empty menu append To Group I Context Menu Constants GROUP REORGANIZE f Copy To Clipboard Action menu append To Group I Context Menu Constants GROUP GOTO f Goto Marker Action Proxy if enable Remove Match Menu Item menu append To Group I Context Menu Constants GROUP REMOVE MATCHES new Remove Match Action this menu append To Group I Context Menu Constants GROUP REMOVE MATCHES new Remove Result Action this true if is Potential Match Selected menu append To Group I Context Menu Constants GROUP REMOVE MATCHES new Remove Potential Matches Action f Outer Part get View Site If we have elements if get Item Count 0 menu append To Group I Context Menu Constants GROUP REMOVE MATCHES new Remove All Results Action menu append To Group I Context Menu Constants GROUP VIEWER SETUP f Search Again Action if get Item Count 0 f Sort Drop Down Action f Sort Drop Down Action renew if f Sort Drop Down Action get Sorter Count 1 menu append To Group I Context Menu Constants GROUP VIEWER SETUP f Sort Drop Down Action  fillContextMenu IMenuManager ISelection getSelection fActionGroup ActionContext ActionContext setInput getInput fActionGroup setContext fActionGroup fillContextMenu fActionGroup setContext fContextMenuContributor fContextMenuContributor isEmpty appendToGroup IContextMenuConstants GROUP_REORGANIZE fCopyToClipboardAction appendToGroup IContextMenuConstants GROUP_GOTO fGotoMarkerActionProxy enableRemoveMatchMenuItem appendToGroup IContextMenuConstants GROUP_REMOVE_MATCHES RemoveMatchAction appendToGroup IContextMenuConstants GROUP_REMOVE_MATCHES RemoveResultAction isPotentialMatchSelected appendToGroup IContextMenuConstants GROUP_REMOVE_MATCHES RemovePotentialMatchesAction fOuterPart getViewSite getItemCount appendToGroup IContextMenuConstants GROUP_REMOVE_MATCHES RemoveAllResultsAction appendToGroup IContextMenuConstants GROUP_VIEWER_SETUP fSearchAgainAction getItemCount fSortDropDownAction fSortDropDownAction fSortDropDownAction getSorterCount appendToGroup IContextMenuConstants GROUP_VIEWER_SETUP fSortDropDownAction
private boolean is Potential Match Selected if get Selected Entries Count 0 return false Iterator iter Collections EMPTY LIST iterator I Selection selection get Selection if selection instanceof I Structured Selection iter I Structured Selection selection iterator while iter has Next Object entry iter next if entry instanceof I Search Result View Entry I Marker marker I Search Result View Entry entry get Selected Marker if marker null marker get Attribute SearchUI POTENTIAL MATCH false return true return false  isPotentialMatchSelected getSelectedEntriesCount EMPTY_LIST ISelection getSelection IStructuredSelection IStructuredSelection hasNext ISearchResultViewEntry IMarker ISearchResultViewEntry getSelectedMarker getAttribute POTENTIAL_MATCH
I Action get Goto Marker Action null as return value is covered no action will take place return f Goto Marker Action  IAction getGotoMarkerAction fGotoMarkerAction
void set Goto Marker Action I Action goto Marker Action f Goto Marker Action goto Marker Action  setGotoMarkerAction IAction gotoMarkerAction fGotoMarkerAction gotoMarkerAction
void set Context Menu Target I Context Menu Contributor contributor f Context Menu Contributor contributor  setContextMenuTarget IContextMenuContributor fContextMenuContributor
void set Action Group Factory I Action Group Factory group Factory I Action Bars action Bars f Outer Part get View Site get Action Bars if f Action Group null f Action Group dispose f Action Group null if group Factory null f Action Group group Factory create Action Group f Outer Part if action Bars null f Action Group fill Action Bars action Bars if action Bars null action Bars update Action Bars  setActionGroupFactory IActionGroupFactory groupFactory IActionBars actionBars fOuterPart getViewSite getActionBars fActionGroup fActionGroup fActionGroup groupFactory fActionGroup groupFactory createActionGroup fOuterPart actionBars fActionGroup fillActionBars actionBars actionBars actionBars updateActionBars
void set Page Id String page Id if f Current Page Id null f Current Page Id equals page Id return f Current Page Id page Id I Label Provider label Provider f Outer Part get Label Provider page Id if label Provider null internal Set Label Provider label Provider f Sort Drop Down Action set Page Id page Id  setPageId pageId fCurrentPageId fCurrentPageId pageId fCurrentPageId pageId ILabelProvider labelProvider fOuterPart getLabelProvider pageId labelProvider internalSetLabelProvider labelProvider fSortDropDownAction setPageId pageId
get Table add Key Listener new Key Adapter public void key Released Key Event e if e key Code SWT F5 f Search Again Action run return performance if e character SWT DEL new Remove Result Action Search Result Viewer this true run return performance  getTable addKeyListener KeyAdapter keyReleased KeyEvent keyCode fSearchAgainAction RemoveResultAction SearchResultViewer
void fill Tool Bar I Tool Bar Manager tbm tbm add f Show Next Result Action tbm add f Show Previous Result Action tbm add f Goto Marker Action see bug 15275 tbm add f Remove Selected Matches Action tbm add f Remove All Results Action tbm add new Separator tbm add new Open Search Dialog Action tbm add f Search Drop Down Action need to hook F5 to table get Table add Key Listener new Key Adapter public void key Released Key Event e if e key Code SWT F5 f Search Again Action run return performance if e character SWT DEL new Remove Result Action Search Result Viewer this true run return performance  fillToolBar IToolBarManager fShowNextResultAction fShowPreviousResultAction fGotoMarkerAction fRemoveSelectedMatchesAction fRemoveAllResultsAction OpenSearchDialogAction fSearchDropDownAction getTable addKeyListener KeyAdapter keyReleased KeyEvent keyCode fSearchAgainAction RemoveResultAction SearchResultViewer
int get Item Count return Search Manager get Default get Current Item Count  getItemCount SearchManager getDefault getCurrentItemCount
void internal Set Label Provider I Label Provider provider set Label Provider new Search Result Label Provider provider  internalSetLabelProvider ILabelProvider setLabelProvider SearchResultLabelProvider
Makes the first marker of the current result entry visible in an editor If no result is visible this method does nothing public void show Result Table table get Table if can Do Show Result table return int index table get Selection Index if index 0 return Search Result View Entry entry Search Result View Entry get Table get Item index get Data f Marker To Show 0 f Current Match Removed false entry set Selected Marker Index 0 open Current Selection  showResult getTable canDoShowResult getSelectionIndex SearchResultViewEntry SearchResultViewEntry getTable getItem getData fMarkerToShow fCurrentMatchRemoved setSelectedMarkerIndex openCurrentSelection
Makes the next result marker visible in an editor If no result is visible this method makes the first result visible public void show Next Result Table table get Table if can Do Show Result table return int index table get Selection Index Search Result View Entry entry null if index 1 entry Search Result View Entry table get Item index get Data if f Current Match Removed f Current Match Removed false else f Marker To Show if entry null f Marker To Show entry get Match Count move selection if index 1 index 0 else index if index table get Item Count index 0 f Marker To Show 0 entry Search Result View Entry get Table get Item index get Data select Result index entry set Selected Marker Index f Marker To Show open Current Selection update Status Line  showNextResult getTable canDoShowResult getSelectionIndex SearchResultViewEntry SearchResultViewEntry getItem getData fCurrentMatchRemoved fCurrentMatchRemoved fMarkerToShow fMarkerToShow getMatchCount getItemCount fMarkerToShow SearchResultViewEntry getTable getItem getData selectResult setSelectedMarkerIndex fMarkerToShow openCurrentSelection updateStatusLine
Makes the previous result marker visible If there isn t any visible result this method makes the last result visible public void show Previous Result f Current Match Removed false Table table get Table if can Do Show Result table return int index table get Selection Index Search Result View Entry entry f Marker To Show if f Marker To Show 0 entry Search Result View Entry get Table get Item get Table get Selection Index get Data else move selection int count table get Item Count if index 1 index count 1 else index if index 0 index count 1 entry Search Result View Entry get Table get Item index get Data f Marker To Show entry get Match Count 1 select Result index entry set Selected Marker Index f Marker To Show open Current Selection update Status Line  showPreviousResult fCurrentMatchRemoved getTable canDoShowResult getSelectionIndex SearchResultViewEntry fMarkerToShow fMarkerToShow SearchResultViewEntry getTable getItem getTable getSelectionIndex getData getItemCount SearchResultViewEntry getTable getItem getData fMarkerToShow getMatchCount selectResult setSelectedMarkerIndex fMarkerToShow openCurrentSelection updateStatusLine
private boolean can Do Show Result Table table if table null get Item Count 0 return false return true  canDoShowResult getItemCount
private void select Result int index f Handle Selection Changed Events false Object element get Element At index if element null set Selection new Structured Selection get Element At index true else set Selection Structured Selection EMPTY  selectResult fHandleSelectionChangedEvents getElementAt setSelection StructuredSelection getElementAt setSelection StructuredSelection
private void open Current Selection I Action action get Goto Marker Action if action null action run  openCurrentSelection IAction getGotoMarkerAction
Updates the foreground color for potential matches void updated Potential Match Fg Color if f Potential Match Fg Color null f Potential Match Fg Color dispose f Potential Match Fg Color null if Search Preference Page are Potential Matches Emphasized f Potential Match Fg Color new Color Search Plugin get Active Workbench Shell get Display Search Preference Page get Potential Match Foreground Color refresh  updatedPotentialMatchFgColor fPotentialMatchFgColor fPotentialMatchFgColor fPotentialMatchFgColor SearchPreferencePage arePotentialMatchesEmphasized fPotentialMatchFgColor SearchPlugin getActiveWorkbenchShell getDisplay SearchPreferencePage getPotentialMatchForegroundColor
Update the title protected void update Title boolean has Current Search Search Manager get Default get Current Search null String title if has Current Search String description Search Manager get Default get Current Search get Full Description title Search Messages get Formatted String Search Result View title With Description description NON NLS 1 else title Search Messages get String Search Result View title NON NLS 1 if title null title equals f Outer Part get Content Description f Outer Part set Content Description title  updateTitle hasCurrentSearch SearchManager getDefault getCurrentSearch hasCurrentSearch SearchManager getDefault getCurrentSearch getFullDescription SearchMessages getFormattedString SearchResultView titleWithDescription SearchMessages getString SearchResultView fOuterPart getContentDescription fOuterPart setContentDescription
Clear the title protected void clear Title String title Search Messages get String Search Result View title NON NLS 1 if title equals f Outer Part get Content Description f Outer Part set Content Description title  clearTitle SearchMessages getString SearchResultView fOuterPart getContentDescription fOuterPart setContentDescription
Sets the message text to be displayed on the status line The image on the status line is cleared private void set Status Line Message String message f Outer Part get View Site get Action Bars get Status Line Manager set Message message  setStatusLineMessage fOuterPart getViewSite getActionBars getStatusLineManager setMessage
protected void handle Dispose Dispose Event event f Last Selection null Menu menu get Table get Menu if menu null menu dispose if f Potential Match Fg Color null f Potential Match Fg Color dispose if f Action Group null f Action Group dispose f Action Group null super handle Dispose event  handleDispose DisposeEvent fLastSelection getTable getMenu fPotentialMatchFgColor fPotentialMatchFgColor fActionGroup fActionGroup fActionGroup handleDispose
Handle a single add protected void handle Add Match I Search Result View Entry entry insert entry 1  handleAddMatch ISearchResultViewEntry
Handle a single remove protected void handle Remove Match I Search Result View Entry entry Widget item find Item entry if entry get Match Count 0 remove entry else update Item item entry update Status Line  handleRemoveMatch ISearchResultViewEntry findItem getMatchCount updateItem updateStatusLine
Handle remove all protected void handle Remove All set Context Menu Target null set Action Group Factory null set Input null  handleRemoveAll setContextMenuTarget setActionGroupFactory setInput
Handle an update of an entry protected void handle Update Match I Search Result View Entry entry boolean match Removed Widget item find Item entry update Item item entry if match Removed get Selection From Widget contains entry f Current Match Removed true  handleUpdateMatch ISearchResultViewEntry matchRemoved findItem updateItem matchRemoved getSelectionFromWidget fCurrentMatchRemoved
Persistency void restore State I Memento memento f Sort Drop Down Action restore State memento  restoreState IMemento fSortDropDownAction restoreState
void save State I Memento memento f Sort Drop Down Action save State memento  saveState IMemento fSortDropDownAction saveState
protected void handle Label Provider Changed Label Provider Changed Event event Object changed event get Elements if changed null f Resource To Items Mapper is Empty Array List others new Array List changed length for int i 0 i changed length i Object curr changed i if curr instanceof I Resource f Resource To Items Mapper resource Changed I Resource curr else if curr instanceof I Adaptable I Resource resource I Resource I Adaptable curr get Adapter I Resource class if resource null f Resource To Items Mapper resource Changed resource else others add curr if others is Empty return event new Label Provider Changed Event I Base Label Provider event get Source others to Array super handle Label Provider Changed event  handleLabelProviderChanged LabelProviderChangedEvent getElements fResourceToItemsMapper isEmpty ArrayList ArrayList IResource fResourceToItemsMapper resourceChanged IResource IAdaptable IResource IResource IAdaptable getAdapter IResource fResourceToItemsMapper resourceChanged isEmpty LabelProviderChangedEvent IBaseLabelProvider getSource toArray handleLabelProviderChanged
protected void map Element Object element Widget item super map Element element item if item instanceof Item f Resource To Items Mapper add To Map element Item item  mapElement mapElement fResourceToItemsMapper addToMap
protected void unmap Element Object element Widget item if item instanceof Item f Resource To Items Mapper remove From Map element Item item super unmap Element element item  unmapElement fResourceToItemsMapper removeFromMap unmapElement
see Structured Viewer unmap All Elements protected void unmap All Elements f Resource To Items Mapper clear Map super unmap All Elements  StructuredViewer unmapAllElements unmapAllElements fResourceToItemsMapper clearMap unmapAllElements
protected void internal Refresh Object element boolean update Labels see bug 44891 get Table set Redraw false super internal Refresh element update Labels get Table set Redraw true  internalRefresh updateLabels getTable setRedraw internalRefresh updateLabels getTable setRedraw
void handle All Searches Removed set Context Menu Target null set Action Group Factory null set Input null f Search Drop Down Action clear  handleAllSearchesRemoved setContextMenuTarget setActionGroupFactory setInput fSearchDropDownAction

Creates the action Select All Action Search Result Viewer viewer super select All NON NLS 1 set Text Search Messages get String Select All Action label NON NLS 1 set Tool Tip Text Search Messages get String Select All Action tooltip NON NLS 1 Workbench Help set Help this I Search Help Context Ids SELECT ALL ACTION f Viewer viewer  SelectAllAction SearchResultViewer selectAll setText SearchMessages getString SelectAllAction setToolTipText SearchMessages getString SelectAllAction WorkbenchHelp setHelp ISearchHelpContextIds SELECT_ALL_ACTION fViewer
Selects all resources in the view public void run f Viewer get Table select All force viewer selection change f Viewer set Selection f Viewer get Selection  fViewer getTable selectAll fViewer setSelection fViewer getSelection

public Show Next Result Action Search Result Viewer viewer super Search Messages get String Search Result View show Next text NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH NEXT set Tool Tip Text Search Messages get String Search Result View show Next tooltip NON NLS 1 f Viewer viewer set Action Definition Id org eclipse ui navigate next NON NLS 1  ShowNextResultAction SearchResultViewer SearchMessages getString SearchResultView showNext SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_NEXT setToolTipText SearchMessages getString SearchResultView showNext fViewer setActionDefinitionId
public void run f Viewer show Next Result  fViewer showNextResult

public Show Previous Result Action Search Result Viewer viewer super Search Messages get String Search Result View show Prev text NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH PREV set Tool Tip Text Search Messages get String Search Result View show Prev tooltip NON NLS 1 set Action Definition Id org eclipse ui navigate previous NON NLS 1 f Viewer viewer  ShowPreviousResultAction SearchResultViewer SearchMessages getString SearchResultView showPrev SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_PREV setToolTipText SearchMessages getString SearchResultView showPrev setActionDefinitionId fViewer
public void run f Viewer show Previous Result  fViewer showPreviousResult

Create a new instance of this class public Show Search Action Search search f Search search String desc search get Short Description set Text desc set Tool Tip Text desc set Image Descriptor search get Image Descriptor  ShowSearchAction fSearch getShortDescription setText setToolTipText setImageDescriptor getImageDescriptor
Invoke the resource wizard selection wizard param browser org eclipse jface parts Window public void run if f Search Search Manager get Default get Current Search Search Manager get Default set Current Search f Search  fSearch SearchManager getDefault getCurrentSearch SearchManager getDefault setCurrentSearch fSearch

public String get Text Object element if element instanceof Show Search Action return NON NLS 1 return Show Search Action element get Text  getText ShowSearchAction ShowSearchAction getText
public Image get Image Object element if element instanceof Show Search Action return null Image Descriptor image Descriptor Show Search Action element get Image Descriptor if image Descriptor null return null Image image image Descriptor create Image f Images add image return image  getImage ShowSearchAction ImageDescriptor imageDescriptor ShowSearchAction getImageDescriptor imageDescriptor imageDescriptor createImage fImages
public void dispose Iterator iter f Images iterator while iter has Next Image iter next dispose f Images null  fImages hasNext fImages
Create a new instance of this class public Show Searches Action super Search Messages get String Show Other Searches Action label NON NLS 1 set Tool Tip Text Search Messages get String Show Other Searches Action tooltip NON NLS 1  ShowSearchesAction SearchMessages getString ShowOtherSearchesAction setToolTipText SearchMessages getString ShowOtherSearchesAction
Overrides method from Action public void run run false 
public void run boolean show All Iterator iter Search Manager get Default get Previous Searches iterator int cut Off Size if show All cut Off Size 0 else cut Off Size Search Drop Down Action RESULTS IN DROP DOWN int size Search Manager get Default get Previous Searches size cut Off Size Search selected Search Search Manager get Default get Current Search Action selected Action null Array List input new Array List size int i 0 while iter has Next Search search Search iter next if i cut Off Size continue Action action new Show Search Action search input add action if selected Search search selected Action action Open a list dialog String title String message if show All title Search Messages get String Previous Searches Dialog title NON NLS 1 message Search Messages get String Previous Searches Dialog message NON NLS 1 else title Search Messages get String Other Searches Dialog title NON NLS 1 message Search Messages get String Other Searches Dialog message NON NLS 1 Label Provider label Provider new Searches Label Provider List Dialog dlg new List Dialog Search Plugin get Active Workbench Shell input title message new Search Result Content Provider label Provider if selected Action null Object selected new Object 1 selected 0 selected Action dlg set Initial Selections selected if dlg open Window OK List result Arrays as List dlg get Result if result null result size 1 Show Search Action result get 0 run  showAll SearchManager getDefault getPreviousSearches cutOffSize showAll cutOffSize cutOffSize SearchDropDownAction RESULTS_IN_DROP_DOWN SearchManager getDefault getPreviousSearches cutOffSize selectedSearch SearchManager getDefault getCurrentSearch selectedAction ArrayList ArrayList hasNext cutOffSize ShowSearchAction selectedSearch selectedAction showAll SearchMessages getString PreviousSearchesDialog SearchMessages getString PreviousSearchesDialog SearchMessages getString OtherSearchesDialog SearchMessages getString OtherSearchesDialog LabelProvider labelProvider SearchesLabelProvider ListDialog ListDialog SearchPlugin getActiveWorkbenchShell SearchResultContentProvider labelProvider selectedAction selectedAction setInitialSelections asList getResult ShowSearchAction

public Sort Drop Down Action Search Result Viewer viewer super Search Messages get String Sort Drop Down Action label NON NLS 1 Search Plugin Images set Image Descriptors this Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH SORT f Viewer viewer set Tool Tip Text Search Messages get String Sort Drop Down Action tooltip NON NLS 1 set Menu Creator this f Last Checked For Type new Hash Map 5  SortDropDownAction SearchResultViewer SearchMessages getString SortDropDownAction SearchPluginImages setImageDescriptors SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_SORT fViewer setToolTipText SearchMessages getString SortDropDownAction setMenuCreator fLastCheckedForType HashMap
public void dispose if f Menu null f Menu is Disposed f Menu dispose f Menu null  fMenu fMenu isDisposed fMenu fMenu
public Menu get Menu Control parent return null  getMenu
void set Page Id String page Id f Page Id page Id Sorter Descriptor sorter Desc Sorter Descriptor f Last Checked For Type get page Id if sorter Desc null sorter Desc Sorter Descriptor fg Last Checked For Type get page Id if sorter Desc null sorter Desc find Sorter f Page Id if sorter Desc null set Checked sorter Desc f Viewer set Sorter sorter Desc create Object else Use default sort workbench viewer sorter f Viewer set Sorter new Workbench Viewer Sorter  setPageId pageId fPageId pageId SorterDescriptor sorterDesc SorterDescriptor fLastCheckedForType pageId sorterDesc sorterDesc SorterDescriptor fgLastCheckedForType pageId sorterDesc sorterDesc findSorter fPageId sorterDesc setChecked sorterDesc fViewer setSorter sorterDesc createObject fViewer setSorter WorkbenchViewerSorter
Sort Drop Down Action this set Checked sorter Desc Busy Indicator show While parent get Display new Runnable public void run f Viewer set Sorter sorter  SortDropDownAction setChecked sorterDesc BusyIndicator showWhile getDisplay fViewer setSorter
final Action action new Action public void run if checked Id equals sorter Desc get Id Sort Drop Down Action this set Checked sorter Desc Busy Indicator show While parent get Display new Runnable public void run f Viewer set Sorter sorter  checkedId sorterDesc getId SortDropDownAction setChecked sorterDesc BusyIndicator showWhile getDisplay fViewer setSorter
public Menu get Menu final Menu parent dispose ensure old menu gets disposed f Menu new Menu parent Iterator iter Search Plugin get Default get Sorter Descriptors iterator while iter has Next Object value f Last Checked For Type get f Page Id final String checked Id if value instanceof Sorter Descriptor checked Id Sorter Descriptor value get Id else checked Id NON NLS 1 final Sorter Descriptor sorter Desc Sorter Descriptor iter next if sorter Desc get Page Id equals f Page Id sorter Desc get Page Id equals NON NLS 1 continue final Viewer Sorter sorter sorter Desc create Object if sorter null final Action action new Action public void run if checked Id equals sorter Desc get Id Sort Drop Down Action this set Checked sorter Desc Busy Indicator show While parent get Display new Runnable public void run f Viewer set Sorter sorter action set Text sorter Desc get Label action set Image Descriptor sorter Desc get Image action set Tool Tip Text sorter Desc get Tool Tip Text action set Checked checked Id equals sorter Desc get Id add Action To Menu f Menu action return f Menu  getMenu fMenu SearchPlugin getDefault getSorterDescriptors hasNext fLastCheckedForType fPageId checkedId SorterDescriptor checkedId SorterDescriptor getId checkedId SorterDescriptor sorterDesc SorterDescriptor sorterDesc getPageId fPageId sorterDesc getPageId ViewerSorter sorterDesc createObject checkedId sorterDesc getId SortDropDownAction setChecked sorterDesc BusyIndicator showWhile getDisplay fViewer setSorter setText sorterDesc getLabel setImageDescriptor sorterDesc getImage setToolTipText sorterDesc getToolTipText setChecked checkedId sorterDesc getId addActionToMenu fMenu fMenu
protected void add Action To Menu Menu parent Action action Action Contribution Item item new Action Contribution Item action item fill parent 1  addActionToMenu ActionContributionItem ActionContributionItem
public void run nothing to do 
private Sorter Descriptor find Sorter String page Id Iterator iter Search Plugin get Default get Sorter Descriptors iterator while iter has Next Sorter Descriptor sorter Desc Sorter Descriptor iter next if sorter Desc get Page Id equals page Id sorter Desc get Page Id equals NON NLS 1 return sorter Desc return null  SorterDescriptor findSorter pageId SearchPlugin getDefault getSorterDescriptors hasNext SorterDescriptor sorterDesc SorterDescriptor sorterDesc getPageId pageId sorterDesc getPageId sorterDesc
private Sorter Descriptor get Sorter String sorter Id Iterator iter Search Plugin get Default get Sorter Descriptors iterator while iter has Next Sorter Descriptor sorter Desc Sorter Descriptor iter next if sorter Desc get Id equals sorter Id return sorter Desc return null  SorterDescriptor getSorter sorterId SearchPlugin getDefault getSorterDescriptors hasNext SorterDescriptor sorterDesc SorterDescriptor sorterDesc getId sorterId sorterDesc
private void set Checked Sorter Descriptor sorter Desc f Last Checked For Type put f Page Id sorter Desc fg Last Checked For Type put f Page Id sorter Desc  setChecked SorterDescriptor sorterDesc fLastCheckedForType fPageId sorterDesc fgLastCheckedForType fPageId sorterDesc
Disposes this action s menu and returns a new unused instance Sort Drop Down Action renew Sort Drop Down Action action new Sort Drop Down Action f Viewer action f Last Checked For Type f Last Checked For Type action f Page Id f Page Id dispose return action  SortDropDownAction SortDropDownAction SortDropDownAction fViewer fLastCheckedForType fLastCheckedForType fPageId fPageId
void restore State I Memento memento if f Last Checked For Type is Empty restore State memento f Last Checked For Type TAG SORTERS if fg Last Checked For Type is Empty restore State memento fg Last Checked For Type TAG DEFAULT SORTERS  restoreState IMemento fLastCheckedForType isEmpty restoreState fLastCheckedForType TAG_SORTERS fgLastCheckedForType isEmpty restoreState fgLastCheckedForType TAG_DEFAULT_SORTERS
private void restore State I Memento memento Map map String map Name memento memento get Child map Name if memento null return I Memento memento Elements memento get Children TAG ELEMENT for int i 0 i memento Elements length i String page Id memento Elements i get String TAG PAGE ID String sorter Id memento Elements i get String TAG SORTER ID Sorter Descriptor sorter Desc get Sorter sorter Id if sorter Desc null map put page Id sorter Desc  restoreState IMemento mapName getChild mapName IMemento mementoElements getChildren TAG_ELEMENT mementoElements pageId mementoElements getString TAG_PAGE_ID sorterId mementoElements getString TAG_SORTER_ID SorterDescriptor sorterDesc getSorter sorterId sorterDesc pageId sorterDesc
void save State I Memento memento save State memento fg Last Checked For Type TAG DEFAULT SORTERS save State memento f Last Checked For Type TAG SORTERS  saveState IMemento saveState fgLastCheckedForType TAG_DEFAULT_SORTERS saveState fLastCheckedForType TAG_SORTERS
private void save State I Memento memento Map map String map Name Iterator iter map entry Set iterator memento memento create Child map Name while iter has Next I Memento memento Element memento create Child TAG ELEMENT Map Entry entry Map Entry iter next memento Element put String TAG PAGE ID String entry get Key memento Element put String TAG SORTER ID Sorter Descriptor entry get Value get Id  saveState IMemento mapName entrySet createChild mapName hasNext IMemento mementoElement createChild TAG_ELEMENT mementoElement putString TAG_PAGE_ID getKey mementoElement putString TAG_SORTER_ID SorterDescriptor getValue getId
int get Sorter Count int count 0 Iterator iter Search Plugin get Default get Sorter Descriptors iterator while iter has Next Sorter Descriptor sorter Desc Sorter Descriptor iter next if sorter Desc get Page Id equals f Page Id sorter Desc get Page Id equals NON NLS 1 count return count  getSorterCount SearchPlugin getDefault getSorterDescriptors hasNext SorterDescriptor sorterDesc SorterDescriptor sorterDesc getPageId fPageId sorterDesc getPageId

Creates a new sorter node with the given configuration element public Sorter Descriptor I Configuration Element element f Element element  SorterDescriptor IConfigurationElement fElement
Creates a new sorter from this node public Viewer Sorter create Object try return Viewer Sorter f Element create Executable Extension CLASS ATTRIBUTE catch Core Exception ex Exception Handler handle ex Search Messages get String Search Error create Sorter title Search Messages get String Search Error create Sorter message NON NLS 2 NON NLS 1 return null catch Class Cast Exception ex Exception Handler display Message Dialog ex Search Messages get String Search Error create Sorter title Search Messages get String Search Error create Sorter message NON NLS 2 NON NLS 1 return null  ViewerSorter createObject ViewerSorter fElement createExecutableExtension CLASS_ATTRIBUTE CoreException ExceptionHandler SearchMessages getString createSorter SearchMessages getString createSorter ClassCastException ExceptionHandler displayMessageDialog SearchMessages getString createSorter SearchMessages getString createSorter
Returns the sorter s id public String get Id return f Element get Attribute ID ATTRIBUTE  getId fElement getAttribute ID_ATTRIBUTE
Returns the sorter s image public Image Descriptor get Image String image Name f Element get Attribute ICON ATTRIBUTE if image Name null return null URL url try url new URL f Element get Declaring Extension get Declaring Plugin Descriptor get InstallURL image Name catch java net MalformedURL Exception ex Exception Handler log ex Search Messages get String Search Error create Sorter message NON NLS 1 return null return Image Descriptor create FromURL url  ImageDescriptor getImage imageName fElement getAttribute ICON_ATTRIBUTE imageName fElement getDeclaringExtension getDeclaringPluginDescriptor getInstallURL imageName MalformedURLException ExceptionHandler SearchMessages getString createSorter ImageDescriptor createFromURL
Returns the sorter s label public String get Label return f Element get Attribute LABEL ATTRIBUTE  getLabel fElement getAttribute LABEL_ATTRIBUTE
Returns the sorter s preferred size public String get Tool Tip Text return f Element get Attribute TOOLTIP ATTRIBUTE  getToolTipText fElement getAttribute TOOLTIP_ATTRIBUTE
Returns the sorter s preferred size public String get Page Id return f Element get Attribute PAGE ID ATTRIBUTE  getPageId fElement getAttribute PAGE_ID_ATTRIBUTE

I Editor Part open Match match throws Part Init Exception I Workbench Page wb Page Search Plugin get Active Page if New SearchUI reuse Editor return show With Reuse match wb Page else return show Without Reuse match wb Page  IEditorPart PartInitException IWorkbenchPage wbPage SearchPlugin getActivePage NewSearchUI reuseEditor showWithReuse wbPage showWithoutReuse wbPage
private I Editor Part show Without Reuse Match match I Workbench Page wb Page throws Part Init Exception return IDE open Editor wb Page I File match get Element false  IEditorPart showWithoutReuse IWorkbenchPage wbPage PartInitException openEditor wbPage IFile getElement
private I Editor Part show With Reuse Match match I Workbench Page wb Page throws Part Init Exception I File file I File match get Element String editorID get EditorID file return show In Editor wb Page file editorID  IEditorPart showWithReuse IWorkbenchPage wbPage PartInitException IFile IFile getElement getEditorID showInEditor wbPage
private String get EditorID I File file throws Part Init Exception I Editor Descriptor desc IDE get Editor Descriptor file if desc null return Search Plugin get Default get Workbench get Editor Registry find Editor I Editor Registry SYSTEM EXTERNAL EDITOR ID get Id else return desc get Id  getEditorID IFile PartInitException IEditorDescriptor getEditorDescriptor SearchPlugin getDefault getWorkbench getEditorRegistry findEditor IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID getId getId
private boolean is Pinned I Editor Part editor if editor null return false I Editor Reference editor Refs editor get Editor Site get Page get Editor References int i 0 while i editor Refs length if editor equals editor Refs i get Editor false return editor Refs i is Pinned i return false  isPinned IEditorPart IEditorReference editorRefs getEditorSite getPage getEditorReferences editorRefs editorRefs getEditor editorRefs isPinned
private I Editor Part show In Editor I Workbench Page page I File file String editor Id throws Part Init Exception I File Editor Input input new File Editor Input file I Editor Part editor page find Editor input if editor null page bring To Top editor else boolean is Open false if f Editor null I Editor Reference parts page get Editor References int i 0 while is Open i parts length is Open f Editor parts i get Editor false boolean can Be Reused is Open f Editor is Dirty is Pinned f Editor boolean shows Same Input Type f Editor null f Editor get Site get Id equals editor Id if can Be Reused shows Same Input Type page close Editor f Editor false f Editor null if can Be Reused shows Same Input Type I Reusable Editor f Editor set Input input page bring To Top f Editor editor f Editor else editor IDE open Editor page file false if editor instanceof I Reusable Editor f Editor editor else f Editor null return editor  IEditorPart showInEditor IWorkbenchPage IFile editorId PartInitException IFileEditorInput FileEditorInput IEditorPart findEditor bringToTop isOpen fEditor IEditorReference getEditorReferences isOpen isOpen fEditor getEditor canBeReused isOpen fEditor isDirty isPinned fEditor showsSameInputType fEditor fEditor getSite getId editorId canBeReused showsSameInputType closeEditor fEditor fEditor canBeReused showsSameInputType IReusableEditor fEditor setInput bringToTop fEditor fEditor openEditor IReusableEditor fEditor fEditor

protected final Object EMPTY ARR new Object 0 protected Abstract Text Search Result f Result public void dispose nothing to do  EMPTY_ARR AbstractTextSearchResult fResult
public void input Changed Viewer viewer Object old Input Object new Input if new Input instanceof File Search Result initialize File Search Result new Input  inputChanged oldInput newInput newInput FileSearchResult FileSearchResult newInput
protected void initialize Abstract Text Search Result result f Result result  AbstractTextSearchResult fResult
public abstract void elements Changed Object updated Elements  elementsChanged updatedElements
public abstract void elements Changed Object updated Elements public abstract void clear  elementsChanged updatedElements

public File Label Provider Abstract Text Search View Page page int order Flag f Label Provider new Workbench Label Provider f Order order Flag f Page page  FileLabelProvider AbstractTextSearchViewPage orderFlag fLabelProvider WorkbenchLabelProvider fOrder orderFlag fPage
public void set Order int order Flag f Order order Flag  setOrder orderFlag fOrder orderFlag
public int get Order return f Order  getOrder fOrder
public String get Text Object element if element instanceof I Resource return null NON NLS 1 I Resource resource I Resource element String text null if resource exists text Search Messages get String File Label Provider removed resource label NON NLS 1 else I Path path resource get Full Path remove Last Segments 1 if path get Device null path path make Relative if f Order SHOW LABEL f Order SHOW LABEL PATH text f Label Provider get Text resource if path null f Order SHOW LABEL PATH f Args 0 text f Args 1 path to String text Message Format format fg Separator Format f Args else if path null text path to String else text NON NLS 1 if f Order SHOW PATH LABEL f Args 0 text f Args 1 f Label Provider get Text resource text Message Format format fg Separator Format f Args int match Count 0 Abstract Text Search Result result f Page get Input if result null match Count result get Match Count element if match Count 1 return text String format Search Messages get String File Label Provider count format NON NLS 1 return Message Format format format new Object text new Integer match Count  getText IResource IResource IResource SearchMessages getString FileLabelProvider removed_resource IPath getFullPath removeLastSegments getDevice makeRelative fOrder SHOW_LABEL fOrder SHOW_LABEL_PATH fLabelProvider getText fOrder SHOW_LABEL_PATH fArgs fArgs toString MessageFormat fgSeparatorFormat fArgs toString fOrder SHOW_PATH_LABEL fArgs fArgs fLabelProvider getText MessageFormat fgSeparatorFormat fArgs matchCount AbstractTextSearchResult fPage getInput matchCount getMatchCount matchCount SearchMessages getString FileLabelProvider MessageFormat matchCount
public Image get Image Object element if element instanceof I Resource return null NON NLS 1 I Resource resource I Resource element Image image f Label Provider get Image resource return image  getImage IResource IResource IResource fLabelProvider getImage
public void dispose super dispose f Label Provider dispose  fLabelProvider
public boolean is Label Property Object element String property return f Label Provider is Label Property element property  isLabelProperty fLabelProvider isLabelProperty
public void remove Listener I Label Provider Listener listener super remove Listener listener f Label Provider remove Listener listener  removeListener ILabelProviderListener removeListener fLabelProvider removeListener
public void add Listener I Label Provider Listener listener super add Listener listener f Label Provider add Listener listener  addListener ILabelProviderListener addListener fLabelProvider addListener

private long f Creation Time Stamp public File Match I File element int offset int length super element offset length f Creation Time Stamp element get Modification Stamp  fCreationTimeStamp FileMatch IFile fCreationTimeStamp getModificationStamp
public I File get File return I File get Element  IFile getFile IFile getElement
public long get Creation Time Stamp return f Creation Time Stamp  getCreationTimeStamp fCreationTimeStamp

public File Search Description String search String String scope Description super f Search String search String f Scope Description scope Description  FileSearchDescription searchString scopeDescription fSearchString searchString fScopeDescription scopeDescription
public String get Scope Description return f Scope Description  getScopeDescription fScopeDescription
public String get Search String return f Search String  getSearchString fSearchString

private static final String SHOW IN TARGETS new String I Page Layout ID RES NAV private static final I Show In Target List SHOW IN TARGET LIST new I Show In Target List public String get Show In Target Ids return SHOW IN TARGETS  SHOW_IN_TARGETS IPageLayout ID_RES_NAV IShowInTargetList SHOW_IN_TARGET_LIST IShowInTargetList getShowInTargetIds SHOW_IN_TARGETS
f Property Change Listener new I Property Change Listener public void property Change Property Change Event event if Search Preference Page LIMIT TABLE equals event get Property Search Preference Page LIMIT TABLE TO equals event get Property if get Viewer instanceof Table Viewer get View Part update Label get Viewer refresh  fPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent SearchPreferencePage LIMIT_TABLE getProperty SearchPreferencePage LIMIT_TABLE_TO getProperty getViewer TableViewer getViewPart updateLabel getViewer
private I Property Change Listener f Property Change Listener public File Search Page f Sort By Name Action new Sort Action Search Messages get String File Search Page sort name label this File Label Provider SHOW LABEL PATH NON NLS 1 f Sort By Path Action new Sort Action Search Messages get String File Search Page sort path label this File Label Provider SHOW PATH LABEL NON NLS 1 f Property Change Listener new I Property Change Listener public void property Change Property Change Event event if Search Preference Page LIMIT TABLE equals event get Property Search Preference Page LIMIT TABLE TO equals event get Property if get Viewer instanceof Table Viewer get View Part update Label get Viewer refresh Search Plugin get Default get Preference Store add Property Change Listener f Property Change Listener  IPropertyChangeListener fPropertyChangeListener FileSearchPage fSortByNameAction SortAction SearchMessages getString FileSearchPage sort_name FileLabelProvider SHOW_LABEL_PATH fSortByPathAction SortAction SearchMessages getString FileSearchPage sort_path FileLabelProvider SHOW_PATH_LABEL fPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent SearchPreferencePage LIMIT_TABLE getProperty SearchPreferencePage LIMIT_TABLE_TO getProperty getViewer TableViewer getViewPart updateLabel getViewer SearchPlugin getDefault getPreferenceStore addPropertyChangeListener fPropertyChangeListener
public Structured Viewer get Viewer return super get Viewer  StructuredViewer getViewer getViewer
protected void configure Table Viewer Table Viewer viewer viewer set Use Hashlookup true viewer set Label Provider new Decorating Label Provider new File Label Provider this File Label Provider SHOW LABEL PlatformUI get Workbench get Decorator Manager get Label Decorator viewer set Content Provider new File Table Content Provider this set Sort Order f Current Sort Order f Content Provider File Content Provider viewer get Content Provider  configureTableViewer TableViewer setUseHashlookup setLabelProvider DecoratingLabelProvider FileLabelProvider FileLabelProvider SHOW_LABEL getWorkbench getDecoratorManager getLabelDecorator setContentProvider FileTableContentProvider setSortOrder fCurrentSortOrder fContentProvider FileContentProvider getContentProvider
protected void configure Tree Viewer Tree Viewer viewer viewer set Use Hashlookup true viewer set Label Provider new Decorating Label Provider new File Label Provider this File Label Provider SHOW LABEL PlatformUI get Workbench get Decorator Manager get Label Decorator viewer set Content Provider new File Tree Content Provider viewer f Content Provider File Content Provider viewer get Content Provider  configureTreeViewer TreeViewer setUseHashlookup setLabelProvider DecoratingLabelProvider FileLabelProvider FileLabelProvider SHOW_LABEL getWorkbench getDecoratorManager getLabelDecorator setContentProvider FileTreeContentProvider fContentProvider FileContentProvider getContentProvider
protected void show Match Match match int offset int length boolean activate throws Part Init Exception I File file I File match get Element I Editor Part editor f Editor Opener open match if editor null activate editor get Editor Site get Page activate editor if editor instanceof I Text Editor I Text Editor text Editor I Text Editor editor text Editor select And Reveal offset length else if editor null show With Marker editor file offset length  showMatch PartInitException IFile IFile getElement IEditorPart fEditorOpener getEditorSite getPage ITextEditor ITextEditor textEditor ITextEditor textEditor selectAndReveal showWithMarker
private void show With Marker I Editor Part editor I File file int offset int length throws Part Init Exception try I Marker marker file create Marker New SearchUI SEARCH MARKER Hash Map attributes new Hash Map 4 attributes put I Marker CHAR START new Integer offset attributes put I Marker CHAR END new Integer offset length marker set Attributes attributes IDE goto Marker editor marker marker delete catch Core Exception e throw new Part Init Exception Search Messages get String File Search Page error marker e NON NLS 1  showWithMarker IEditorPart IFile PartInitException IMarker createMarker NewSearchUI SEARCH_MARKER HashMap HashMap IMarker CHAR_START IMarker CHAR_END setAttributes gotoMarker CoreException PartInitException SearchMessages getString FileSearchPage
protected void fill Context Menu I Menu Manager mgr super fill Context Menu mgr add Sort Actions mgr f Action Group set Context new Action Context get Site get Selection Provider get Selection f Action Group fill Context Menu mgr File Search Query query File Search Query get Input get Query if equals query get Search String NON NLS 1 Replace Action2 replace Action new Replace Action2 this I Structured Selection get Viewer get Selection if replace Action is Enabled mgr append To Group I Context Menu Constants GROUP REORGANIZE replace Action Replace Action2 replace All new Replace Action2 this if replace All is Enabled mgr append To Group I Context Menu Constants GROUP REORGANIZE replace All  fillContextMenu IMenuManager fillContextMenu addSortActions fActionGroup setContext ActionContext getSite getSelectionProvider getSelection fActionGroup fillContextMenu FileSearchQuery FileSearchQuery getInput getQuery getSearchString ReplaceAction2 replaceAction ReplaceAction2 IStructuredSelection getViewer getSelection replaceAction isEnabled appendToGroup IContextMenuConstants GROUP_REORGANIZE replaceAction ReplaceAction2 replaceAll ReplaceAction2 replaceAll isEnabled appendToGroup IContextMenuConstants GROUP_REORGANIZE replaceAll
private void add Sort Actions I Menu Manager mgr if get Layout FLAG LAYOUT FLAT return Menu Manager sort Menu new Menu Manager Search Messages get String File Search Page sort by label NON NLS 1 sort Menu add f Sort By Name Action sort Menu add f Sort By Path Action f Sort By Name Action set Checked f Current Sort Order f Sort By Name Action get Sort Order f Sort By Path Action set Checked f Current Sort Order f Sort By Path Action get Sort Order mgr append To Group I Context Menu Constants GROUP VIEWER SETUP sort Menu  addSortActions IMenuManager getLayout FLAG_LAYOUT_FLAT MenuManager sortMenu MenuManager SearchMessages getString FileSearchPage sort_by sortMenu fSortByNameAction sortMenu fSortByPathAction fSortByNameAction setChecked fCurrentSortOrder fSortByNameAction getSortOrder fSortByPathAction setChecked fCurrentSortOrder fSortByPathAction getSortOrder appendToGroup IContextMenuConstants GROUP_VIEWER_SETUP sortMenu
public void set View Part I Search Result View Part part super set View Part part f Action Group new New Text Search Action Group part  setViewPart ISearchResultViewPart setViewPart fActionGroup NewTextSearchActionGroup
public void dispose f Action Group dispose Search Plugin get Default get Preference Store remove Property Change Listener f Property Change Listener super dispose  fActionGroup SearchPlugin getDefault getPreferenceStore removePropertyChangeListener fPropertyChangeListener
protected void elements Changed Object objects if f Content Provider null f Content Provider elements Changed objects  elementsChanged fContentProvider fContentProvider elementsChanged
protected void clear if f Content Provider null f Content Provider clear  fContentProvider fContentProvider
public void set Sort Order int sort Order f Current Sort Order sort Order Structured Viewer viewer get Viewer Decorating Label Provider lp Wrapper Decorating Label Provider viewer get Label Provider File Label Provider lp Wrapper get Label Provider set Order sort Order if sort Order File Label Provider SHOW LABEL PATH viewer set Sorter new Name Sorter else viewer set Sorter new Path Sorter get Settings put KEY SORTING f Current Sort Order  setSortOrder sortOrder fCurrentSortOrder sortOrder StructuredViewer getViewer DecoratingLabelProvider lpWrapper DecoratingLabelProvider getLabelProvider FileLabelProvider lpWrapper getLabelProvider setOrder sortOrder sortOrder FileLabelProvider SHOW_LABEL_PATH setSorter NameSorter setSorter PathSorter getSettings KEY_SORTING fCurrentSortOrder
public void restore State I Memento memento super restore State memento try f Current Sort Order get Settings get Int KEY SORTING catch Number Format Exception e f Current Sort Order f Sort By Name Action get Sort Order if memento null Integer value memento get Integer KEY SORTING if value null f Current Sort Order value int Value  restoreState IMemento restoreState fCurrentSortOrder getSettings getInt KEY_SORTING NumberFormatException fCurrentSortOrder fSortByNameAction getSortOrder getInteger KEY_SORTING fCurrentSortOrder intValue
public void save State I Memento memento super save State memento memento put Integer KEY SORTING f Current Sort Order  saveState IMemento saveState putInteger KEY_SORTING fCurrentSortOrder
public Object get Adapter Class adapter if I Show In Target List class equals adapter return SHOW IN TARGET LIST return null  getAdapter IShowInTargetList SHOW_IN_TARGET_LIST
public String get Label String label super get Label Structured Viewer viewer get Viewer if viewer instanceof Table Viewer Table Viewer tv Table Viewer viewer Abstract Text Search Result result get Input if result null int item Count I Structured Content Provider tv get Content Provider get Elements get Input length int file Count get Input get Elements length if item Count file Count String format Search Messages get String File Search Page limited format NON NLS 1 return Message Format format format new Object File Search Query quote label new Integer item Count new Integer file Count return label  getLabel getLabel StructuredViewer getViewer TableViewer TableViewer TableViewer AbstractTextSearchResult getInput itemCount IStructuredContentProvider getContentProvider getElements getInput fileCount getInput getElements itemCount fileCount SearchMessages getString FileSearchPage MessageFormat FileSearchQuery itemCount fileCount

public File Search Query Text Search Scope scope String options String search String boolean visit Derived f Visit Derived visit Derived f Scope scope f Search Options options f Search String search String  FileSearchQuery TextSearchScope searchString visitDerived fVisitDerived visitDerived fScope fSearchOptions fSearchString searchString
public File Search Query Text Search Scope scope String options String search String this scope options search String false  FileSearchQuery TextSearchScope searchString searchString
public boolean can Run In Background return true  canRunInBackground
text Result remove All I Text Search Result Collector collector new I Text Search Result Collector public I Progress Monitor get Progress Monitor return pm  textResult removeAll ITextSearchResultCollector ITextSearchResultCollector IProgressMonitor getProgressMonitor
public void about To Start do nothing  aboutToStart
public void accept I Resource Proxy proxy String line int start int length int line Number I Resource resource proxy request Resource if start 0 start 0 if length 0 length 0 text Result add Match create Match I File resource start length line Number  IResourceProxy lineNumber IResource requestResource textResult addMatch createMatch IFile lineNumber
public void done do nothing 
public I Status run final I Progress Monitor pm final Abstract Text Search Result text Result Abstract Text Search Result get Search Result text Result remove All I Text Search Result Collector collector new I Text Search Result Collector public I Progress Monitor get Progress Monitor return pm public void about To Start do nothing public void accept I Resource Proxy proxy String line int start int length int line Number I Resource resource proxy request Resource if start 0 start 0 if length 0 length 0 text Result add Match create Match I File resource start length line Number public void done do nothing return new Text Search Engine search Search Plugin get Workspace f Scope f Visit Derived collector new Match Locator f Search String is Case Sensitive is Regex Search  IStatus IProgressMonitor AbstractTextSearchResult textResult AbstractTextSearchResult getSearchResult textResult removeAll ITextSearchResultCollector ITextSearchResultCollector IProgressMonitor getProgressMonitor aboutToStart IResourceProxy lineNumber IResource requestResource textResult addMatch createMatch IFile lineNumber TextSearchEngine SearchPlugin getWorkspace fScope fVisitDerived MatchLocator fSearchString isCaseSensitive isRegexSearch
public String get Label return Search Messages get String File Search Query label NON NLS 1  getLabel SearchMessages getString FileSearchQuery
public String get Search String return f Search String  getSearchString fSearchString
private String get Search Options return f Search Options  getSearchOptions fSearchOptions
String get Singular Label String args new String quote f Search String f Scope get Description String format 0 1 match in 1 NON NLS 1 return Message Format format format args  getSingularLabel fSearchString fScope getDescription MessageFormat
String get Plural Pattern String args new String quote f Search String 0 f Scope get Description NON NLS 1 String format 0 1 matches in 2 NON NLS 1 return Message Format format format args  getPluralPattern fSearchString fScope getDescription MessageFormat
public static String quote String search String search String search String replace All NON NLS 1 NON NLS 2 return search String replace All NON NLS 1 NON NLS 2  searchString searchString searchString replaceAll searchString replaceAll
public I Status search In File final Abstract Text Search Result result final I Progress Monitor monitor I File file I Text Search Result Collector collector new I Text Search Result Collector public I Progress Monitor get Progress Monitor return monitor  IStatus searchInFile AbstractTextSearchResult IProgressMonitor IFile ITextSearchResultCollector ITextSearchResultCollector IProgressMonitor getProgressMonitor
public void about To Start do nothing  aboutToStart
public void accept I Resource Proxy proxy String line int start int length int line Number I Resource resource proxy request Resource if start 0 start 0 if length 0 length 0 result add Match new File Match I File resource start length  IResourceProxy lineNumber IResource requestResource addMatch FileMatch IFile
public void done do nothing 
return public I Status search In File final Abstract Text Search Result result final I Progress Monitor monitor I File file I Text Search Result Collector collector new I Text Search Result Collector public I Progress Monitor get Progress Monitor return monitor public void about To Start do nothing public void accept I Resource Proxy proxy String line int start int length int line Number I Resource resource proxy request Resource if start 0 start 0 if length 0 length 0 result add Match new File Match I File resource start length public void done do nothing Search Scope scope new Search Scope new I Resource file NON NLS 1 new Text Search Engine search Search Plugin get Workspace scope f Visit Derived collector new Match Locator f Search String is Case Sensitive is Regex Search return Status OK STATUS NON NLS 1  IStatus searchInFile AbstractTextSearchResult IProgressMonitor IFile ITextSearchResultCollector ITextSearchResultCollector IProgressMonitor getProgressMonitor aboutToStart IResourceProxy lineNumber IResource requestResource addMatch FileMatch IFile SearchScope SearchScope IResource TextSearchEngine SearchPlugin getWorkspace fVisitDerived MatchLocator fSearchString isCaseSensitive isRegexSearch OK_STATUS
public boolean is Regex Search return is Regex Search get Search Options  isRegexSearch isRegexSearch getSearchOptions
static boolean is Regex Search String options return options index Of r 1  isRegexSearch indexOf
public boolean is Case Sensitive return is Case Sensitive get Search Options  isCaseSensitive isCaseSensitive getSearchOptions
static boolean is Case Sensitive String options return options index Of i 1  isCaseSensitive indexOf
public boolean can Rerun return true  canRerun
public I Search Result get Search Result if f Result null f Result new File Search Result this new Search Result Updater f Result return f Result  ISearchResult getSearchResult fResult fResult FileSearchResult SearchResultUpdater fResult fResult
protected File Match create Match I File file int start int length int line Number return new File Match file start length  FileMatch createMatch IFile lineNumber FileMatch

private File Search Query f Query public File Search Result File Search Query job f Query job  FileSearchQuery fQuery FileSearchResult FileSearchQuery fQuery
f Query job public Image Descriptor get Image Descriptor return Search Plugin Images DESC OBJ TSEARCH DPDN  fQuery ImageDescriptor getImageDescriptor SearchPluginImages DESC_OBJ_TSEARCH_DPDN
public String get Label if get Match Count 1 return f Query get Singular Label else return Message Format format f Query get Plural Pattern new Object new Integer get Match Count  getLabel getMatchCount fQuery getSingularLabel MessageFormat fQuery getPluralPattern getMatchCount
else return Message Format format f Query get Plural Pattern new Object new Integer get Match Count public String get Tooltip return get Label  MessageFormat fQuery getPluralPattern getMatchCount getTooltip getLabel
public Match compute Contained Matches Abstract Text Search Result result I File file return get Matches file  computeContainedMatches AbstractTextSearchResult IFile getMatches
public I File get File Object element if element instanceof I File return I File element return null  IFile getFile IFile IFile
public boolean is Shown In Editor Match match I Editor Part editor I Editor Input ei editor get Editor Input if ei instanceof I File Editor Input File Editor Input fi File Editor Input ei return match get Element equals fi get File return false  isShownInEditor IEditorPart IEditorInput getEditorInput IFileEditorInput FileEditorInput FileEditorInput getElement getFile
public Match compute Contained Matches Abstract Text Search Result result I Editor Part editor I Editor Input ei editor get Editor Input if ei instanceof I File Editor Input File Editor Input fi File Editor Input ei return get Matches fi get File return EMPTY ARR  computeContainedMatches AbstractTextSearchResult IEditorPart IEditorInput getEditorInput IFileEditorInput FileEditorInput FileEditorInput getMatches getFile EMPTY_ARR
public I Search Query get Query return f Query  ISearchQuery getQuery fQuery
public I File Match Adapter get File Match Adapter return this  IFileMatchAdapter getFileMatchAdapter
public I Editor Match Adapter get Editor Match Adapter return this  IEditorMatchAdapter getEditorMatchAdapter

private File Search Page f Page public File Table Content Provider File Search Page page f Page page  FileSearchPage fPage FileTableContentProvider FileSearchPage fPage
public Object get Elements Object input Element if input Element instanceof File Search Result Object elements File Search Result input Element get Elements int table Limit Search Preference Page get Table Limit if Search Preference Page is Table Limited elements length table Limit Object shown Elements new Object table Limit System arraycopy elements 0 shown Elements 0 table Limit return shown Elements return elements return EMPTY ARR  getElements inputElement inputElement FileSearchResult FileSearchResult inputElement getElements tableLimit SearchPreferencePage getTableLimit SearchPreferencePage isTableLimited tableLimit shownElements tableLimit shownElements tableLimit shownElements EMPTY_ARR
public void input Changed Viewer viewer Object old Input Object new Input if new Input instanceof File Search Result f Result File Search Result new Input  inputChanged oldInput newInput newInput FileSearchResult fResult FileSearchResult newInput
public void elements Changed Object updated Elements Table Viewer viewer get Viewer boolean table Limited Search Preference Page is Table Limited for int i 0 i updated Elements length i if f Result get Match Count updated Elements i 0 if viewer test Find Item updated Elements i null viewer update updated Elements i null else if table Limited viewer get Table get Item Count Search Preference Page get Table Limit viewer add updated Elements i else viewer remove updated Elements i  elementsChanged updatedElements TableViewer getViewer tableLimited SearchPreferencePage isTableLimited updatedElements fResult getMatchCount updatedElements testFindItem updatedElements updatedElements tableLimited getTable getItemCount SearchPreferencePage getTableLimit updatedElements updatedElements
private Table Viewer get Viewer return Table Viewer f Page get Viewer  TableViewer getViewer TableViewer fPage getViewer
return Table Viewer f Page get Viewer public void clear get Viewer refresh  TableViewer fPage getViewer getViewer

private Map f Children Map File Tree Content Provider Abstract Tree Viewer viewer f Tree Viewer viewer  fChildrenMap FileTreeContentProvider AbstractTreeViewer fTreeViewer
public Object get Elements Object input Element return get Children input Element  getElements inputElement getChildren inputElement
protected synchronized void initialize Abstract Text Search Result result super initialize result f Children Map new Hash Map if result null Object elements result get Elements for int i 0 i elements length i insert elements i false  AbstractTextSearchResult fChildrenMap HashMap getElements
protected void insert Object child boolean refresh Viewer Object parent get Parent child while parent null if insert Child parent child if refresh Viewer f Tree Viewer add parent child else if refresh Viewer f Tree Viewer refresh parent return child parent parent get Parent child if insert Child f Result child if refresh Viewer f Tree Viewer add f Result child  refreshViewer getParent insertChild refreshViewer fTreeViewer refreshViewer fTreeViewer getParent insertChild fResult refreshViewer fTreeViewer fResult
returns true if the child already was a child of parent param parent param child return private boolean insert Child Object parent Object child Set children Set f Children Map get parent if children null children new Hash Set f Children Map put parent children return children add child  insertChild fChildrenMap HashSet fChildrenMap
protected void remove Object element boolean refresh Viewer precondition here f Result get Match Count child 0 if has Children element if refresh Viewer f Tree Viewer refresh element else if f Result get Match Count element 0 f Children Map remove element Object parent get Parent element if parent null remove From Siblings element parent remove parent refresh Viewer else remove From Siblings element f Result if refresh Viewer f Tree Viewer refresh else if refresh Viewer f Tree Viewer refresh element  refreshViewer fResult getMatchCount hasChildren refreshViewer fTreeViewer fResult getMatchCount fChildrenMap getParent removeFromSiblings refreshViewer removeFromSiblings fResult refreshViewer fTreeViewer refreshViewer fTreeViewer
private void remove From Siblings Object element Object parent Set siblings Set f Children Map get parent if siblings null siblings remove element  removeFromSiblings fChildrenMap
public Object get Children Object parent Element Set children Set f Children Map get parent Element if children null return EMPTY ARR return children to Array  getChildren parentElement fChildrenMap parentElement EMPTY_ARR toArray
public boolean has Children Object element return get Children element length 0  hasChildren getChildren
public synchronized void elements Changed Object updated Elements for int i 0 i updated Elements length i if f Result get Match Count updated Elements i 0 insert updated Elements i true else remove updated Elements i true  elementsChanged updatedElements updatedElements fResult getMatchCount updatedElements updatedElements updatedElements
public void clear initialize f Result f Tree Viewer refresh  fResult fTreeViewer
public Object get Parent Object element if element instanceof I Project return null if element instanceof I Resource I Resource resource I Resource element return resource get Parent return null  getParent IProject IResource IResource IResource getParent

public void run I Search Result View view SearchUI get Search Result View I Selection selection view get Selection Object element null if selection instanceof I Structured Selection element I Structured Selection selection get First Element if element instanceof I Search Result View Entry I Search Result View Entry entry I Search Result View Entry element show entry get Selected Marker  ISearchResultView getSearchResultView ISelection getSelection IStructuredSelection IStructuredSelection getFirstElement ISearchResultViewEntry ISearchResultViewEntry ISearchResultViewEntry getSelectedMarker
private void show I Marker marker if SearchUI reuse Editor show With Reuse marker else show Without Reuse marker  IMarker reuseEditor showWithReuse showWithoutReuse
private void show With Reuse I Marker marker I Workbench Page page Search Plugin get Active Page I Resource resource marker get Resource if page null resource instanceof I File return I Editor Input input new File Editor Input I File resource String editor Id null I Editor Descriptor desc IDE get Default Editor I File resource if desc null editor Id Search Plugin get Default get Workbench get Editor Registry find Editor I Editor Registry SYSTEM EXTERNAL EDITOR ID get Id else editor Id desc get Id I Editor Part editor page find Editor input if editor null page bring To Top editor else boolean is Open false if f Editor null I Editor Reference parts page get Editor References int i 0 while is Open i parts length is Open f Editor parts i get Editor false boolean can Be Reused is Open f Editor is Dirty is Pinned f Editor boolean shows Same Input Type f Editor null f Editor get Site get Id equals editor Id if can Be Reused shows Same Input Type page close Editor f Editor false f Editor null if can Be Reused shows Same Input Type I Reusable Editor f Editor set Input input page bring To Top f Editor editor f Editor else try editor page open Editor input editor Id false if editor instanceof I Reusable Editor f Editor editor else f Editor null catch Part Init Exception ex Exception Handler handle ex Search Messages get String Search Error open Editor title Search Messages get String Search Error open Editor message NON NLS 2 NON NLS 1 return if editor null IDE goto Marker editor marker  showWithReuse IMarker IWorkbenchPage SearchPlugin getActivePage IResource getResource IFile IEditorInput FileEditorInput IFile editorId IEditorDescriptor getDefaultEditor IFile editorId SearchPlugin getDefault getWorkbench getEditorRegistry findEditor IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID getId editorId getId IEditorPart findEditor bringToTop isOpen fEditor IEditorReference getEditorReferences isOpen isOpen fEditor getEditor canBeReused isOpen fEditor isDirty isPinned fEditor showsSameInputType fEditor fEditor getSite getId editorId canBeReused showsSameInputType closeEditor fEditor fEditor canBeReused showsSameInputType IReusableEditor fEditor setInput bringToTop fEditor fEditor openEditor editorId IReusableEditor fEditor fEditor PartInitException ExceptionHandler SearchMessages getString openEditor SearchMessages getString openEditor gotoMarker
private boolean is Pinned I Editor Part editor if editor null return false I Editor Reference editor Refs editor get Editor Site get Page get Editor References int i 0 while i editor Refs length if editor equals editor Refs i get Editor false return editor Refs i is Pinned i return false  isPinned IEditorPart IEditorReference editorRefs getEditorSite getPage getEditorReferences editorRefs editorRefs getEditor editorRefs isPinned
private void show Without Reuse I Marker marker I Workbench Page page Search Plugin get Active Page if page null return try IDE open Editor page marker false catch Part Init Exception ex Exception Handler handle ex Search Messages get String Search Error open Editor title Search Messages get String Search Error open Editor message NON NLS 2 NON NLS 1 return  showWithoutReuse IMarker IWorkbenchPage SearchPlugin getActivePage openEditor PartInitException ExceptionHandler SearchMessages getString openEditor SearchMessages getString openEditor

public Object compute Group By Key I Marker marker if marker null return null else return marker get Resource  computeGroupByKey IMarker getResource

public class Name Sorter extends Viewer Sorter public int compare Viewer viewer Object e1 Object e2 return compare I Resource e1 I Resource e2  NameSorter ViewerSorter IResource IResource
protected int compare I Resource resource I Resource resource2 String property1 get Property resource String property2 get Property resource2 return collator compare property1 property2  IResource IResource getProperty getProperty
protected String get Property I Resource resource return resource get Name  getProperty IResource getName

public New Text Search Action Group I View Part part Assert is Not Null part I Workbench Part Site site part get Site f Selection Provider site get Selection Provider f Page site get Page f Open Properties Dialog new Property Dialog Action site get Shell f Selection Provider f Open Action new Open File Action f Page I Selection selection f Selection Provider get Selection if selection instanceof I Structured Selection f Open Properties Dialog selection Changed I Structured Selection selection else f Open Properties Dialog selection Changed selection  NewTextSearchActionGroup IViewPart isNotNull IWorkbenchPartSite getSite fSelectionProvider getSelectionProvider fPage getPage fOpenPropertiesDialog PropertyDialogAction getShell fSelectionProvider fOpenAction OpenFileAction fPage ISelection fSelectionProvider getSelection IStructuredSelection fOpenPropertiesDialog selectionChanged IStructuredSelection fOpenPropertiesDialog selectionChanged
public void fill Context Menu I Menu Manager menu view must exist if we create a context menu for it I Selection selection get Context get Selection if selection instanceof I Structured Selection add Open With Menu menu I Structured Selection selection if f Open Properties Dialog null f Open Properties Dialog is Enabled selection null f Open Properties Dialog is Applicable For Selection I Structured Selection selection menu append To Group I Context Menu Constants GROUP PROPERTIES f Open Properties Dialog  fillContextMenu IMenuManager ISelection getContext getSelection IStructuredSelection addOpenWithMenu IStructuredSelection fOpenPropertiesDialog fOpenPropertiesDialog isEnabled fOpenPropertiesDialog isApplicableForSelection IStructuredSelection appendToGroup IContextMenuConstants GROUP_PROPERTIES fOpenPropertiesDialog
private void add Open With Menu I Menu Manager menu I Structured Selection selection if selection null selection size 1 return Object o selection get First Element if o instanceof I Adaptable return f Open Action selection Changed selection menu append To Group I Context Menu Constants GROUP OPEN f Open Action Create menu I Menu Manager submenu new Menu Manager Search Messages get String Open With Menu label NON NLS 1 submenu add new Open With Menu f Page I Adaptable o Add the submenu menu append To Group I Context Menu Constants GROUP OPEN submenu  addOpenWithMenu IMenuManager IStructuredSelection getFirstElement IAdaptable fOpenAction selectionChanged appendToGroup IContextMenuConstants GROUP_OPEN fOpenAction IMenuManager MenuManager SearchMessages getString OpenWithMenu OpenWithMenu fPage IAdaptable appendToGroup IContextMenuConstants GROUP_OPEN
Method declared in Action Group public void fill Action Bars I Action Bars action Bar super fill Action Bars action Bar set Global Action Handlers action Bar  ActionGroup fillActionBars IActionBars actionBar fillActionBars actionBar setGlobalActionHandlers actionBar
private void set Global Action Handlers I Action Bars action Bars action Bars set Global Action Handler Action Factory PROPERTIES get Id f Open Properties Dialog  setGlobalActionHandlers IActionBars actionBars actionBars setGlobalActionHandler ActionFactory getId fOpenPropertiesDialog

public class Path Sorter extends Name Sorter protected int compare I Resource left I Resource right I Path path1 left get Full Path I Path path2 right get Full Path int segment Count Math min path1 segment Count path2 segment Count for int i 0 i segment Count i int value collator compare path1 segment i path2 segment i if value 0 return value return path1 segment Count path2 segment Count  PathSorter NameSorter IResource IResource IPath getFullPath IPath getFullPath segmentCount segmentCount segmentCount segmentCount segmentCount segmentCount

private I Context Information Validator f Validator new Subject Control Context Information Validator this public Reg Ex Content Assist Processor Array List proposal Keys super f Proposal Keys proposal Keys  IContextInformationValidator fValidator SubjectControlContextInformationValidator RegExContentAssistProcessor ArrayList proposalKeys fProposalKeys proposalKeys
see I Content Assist Processor compute Completion Proposals I Text Viewer int public I Completion Proposal compute Completion Proposals I Text Viewer viewer int document Offset return compute Completion Proposals I Content Assist Subject Control null document Offset  IContentAssistProcessor computeCompletionProposals ITextViewer ICompletionProposal computeCompletionProposals ITextViewer documentOffset computeCompletionProposals IContentAssistSubjectControl documentOffset
see I Content Assist Processor compute Context Information I Text Viewer int public I Context Information compute Context Information I Text Viewer viewer int document Offset return compute Context Information I Content Assist Subject Control null document Offset  IContentAssistProcessor computeContextInformation ITextViewer IContextInformation computeContextInformation ITextViewer documentOffset computeContextInformation IContentAssistSubjectControl documentOffset
see I Content Assist Processor get Completion Proposal Auto Activation Characters public char get Completion Proposal Auto Activation Characters return new char  IContentAssistProcessor getCompletionProposalAutoActivationCharacters getCompletionProposalAutoActivationCharacters
see I Content Assist Processor get Context Information Auto Activation Characters public char get Context Information Auto Activation Characters return new char  IContentAssistProcessor getContextInformationAutoActivationCharacters getContextInformationAutoActivationCharacters
see I Content Assist Processor get Context Information Validator public I Context Information Validator get Context Information Validator return f Validator  IContentAssistProcessor getContextInformationValidator IContextInformationValidator getContextInformationValidator fValidator
see I Content Assist Processor get Error Message public String get Error Message return null  IContentAssistProcessor getErrorMessage getErrorMessage
public I Completion Proposal compute Completion Proposals I Content Assist Subject Control content Assist Subject Control int document Offset List results new Array List f Proposal Keys size Iterator iter f Proposal Keys iterator while iter has Next add Proposal String iter next content Assist Subject Control document Offset results true if results is Empty iter f Proposal Keys iterator while iter has Next add Proposal String iter next content Assist Subject Control document Offset results false return I Completion Proposal results to Array new I Completion Proposal results size  ICompletionProposal computeCompletionProposals IContentAssistSubjectControl contentAssistSubjectControl documentOffset ArrayList fProposalKeys fProposalKeys hasNext addProposal contentAssistSubjectControl documentOffset isEmpty fProposalKeys hasNext addProposal contentAssistSubjectControl documentOffset ICompletionProposal toArray ICompletionProposal
see I Subject Control Content Assist Processor compute Context Information I Content Assist Subject Control int public I Context Information compute Context Information I Content Assist Subject Control content Assist Subject Control int document Offset return null  ISubjectControlContentAssistProcessor computeContextInformation IContentAssistSubjectControl IContextInformation computeContextInformation IContentAssistSubjectControl contentAssistSubjectControl documentOffset
private void add Proposal String proposal Key I Content Assist Subject Control content Assist Subject Control int document Offset List results boolean filter String proposal String fg Proposal Strings get proposal Key compute correct replacement if filter String selection null try selection content Assist Subject Control get Document get document Offset 1 1 catch Bad Location Exception e return if selection null selection length 0 proposal length 0 proposal char At 0 selection char At 0 return proposal proposal substring 1 String display String get String proposal Key display String NON NLS 1 String additional Info get String proposal Key additional Info NON NLS 1 I Context Information info create Context Information proposal Key Move cursor on to the left if the proposal ends with int relative Offset proposal length XXX currently there s no smartness position the cursor after the proposal if relative Offset 0 proposal char At relative Offset 1 relative Offset results add new Completion Proposal proposal document Offset 0 Math max 0 relative Offset null display String info additional Info  addProposal proposalKey IContentAssistSubjectControl contentAssistSubjectControl documentOffset fgProposalStrings proposalKey contentAssistSubjectControl getDocument documentOffset BadLocationException charAt charAt displayString getString proposalKey displayString additionalInfo getString proposalKey additionalInfo IContextInformation createContextInformation proposalKey relativeOffset relativeOffset charAt relativeOffset relativeOffset CompletionProposal documentOffset relativeOffset displayString additionalInfo
private I Context Information create Context Information String proposal Key return null  IContextInformation createContextInformation proposalKey
private String get String String proposal Key String type return Search Messages get String Find Replace reg Ex Content Assist type proposal Key NON NLS 1 NON NLS 2  getString proposalKey SearchMessages getString FindReplace regExContentAssist proposalKey

public Replace Action I Workbench Site site List elements Assert is Not Null site f Site site if elements null f Elements elements else f Elements new Array List 0 set Text Search Messages get String Replace Action label all NON NLS 1 set Enabled f Elements is Empty  ReplaceAction IWorkbenchSite isNotNull fSite fElements fElements ArrayList setText SearchMessages getString ReplaceAction label_all setEnabled fElements isEmpty
public Replace Action I Workbench Site site I Structured Selection selection Assert is Not Null site f Site site set Text Search Messages get String Replace Action label selected NON NLS 1 f Elements selection to List set Enabled f Elements is Empty  ReplaceAction IWorkbenchSite IStructuredSelection isNotNull fSite setText SearchMessages getString ReplaceAction label_selected fElements toList setEnabled fElements isEmpty
public void run Search search Search Manager get Default get Current Search I Runnable With Progress operation search get Operation if operation instanceof Text Search Operation if validate Resources Text Search Operation operation Replace Dialog dialog new Replace Dialog f Site get Shell f Elements Text Search Operation operation dialog open else Message Dialog open Error f Site get Shell get Dialog Title Search Messages get String Replace Action error only on text search NON NLS 1  SearchManager getDefault getCurrentSearch IRunnableWithProgress getOperation TextSearchOperation validateResources TextSearchOperation ReplaceDialog ReplaceDialog fSite getShell fElements TextSearchOperation MessageDialog openError fSite getShell getDialogTitle SearchMessages getString ReplaceAction only_on_text_search
try pmd run true true new Workspace Modify Operation null protected void execute I Progress Monitor monitor throws Core Exception research monitor out Of Date Entries operation  WorkspaceModifyOperation IProgressMonitor CoreException outOfDateEntries
private boolean validate Resources final Text Search Operation operation final List out Of Date Entries new Array List for Iterator elements f Elements iterator elements has Next Search Result View Entry entry Search Result View Entry elements next if is Out Of Date entry out Of Date Entries add entry final List out Of Sync Entries new Array List for Iterator elements f Elements iterator elements has Next Search Result View Entry entry Search Result View Entry elements next if is Out Of Sync entry out Of Sync Entries add entry if out Of Date Entries size 0 out Of Sync Entries size 0 if ask For Research out Of Date Entries out Of Sync Entries Progress Monitor Dialog pmd new Progress Monitor Dialog f Site get Shell try pmd run true true new Workspace Modify Operation null protected void execute I Progress Monitor monitor throws Core Exception research monitor out Of Date Entries operation return true catch Invocation Target Exception e Exception Handler handle e f Site get Shell Search Messages get String Replace Action label Search Messages get String Replace Action research error NON NLS 1 NON NLS 2 catch Interrupted Exception e canceled return false return true  validateResources TextSearchOperation outOfDateEntries ArrayList fElements hasNext SearchResultViewEntry SearchResultViewEntry isOutOfDate outOfDateEntries outOfSyncEntries ArrayList fElements hasNext SearchResultViewEntry SearchResultViewEntry isOutOfSync outOfSyncEntries outOfDateEntries outOfSyncEntries askForResearch outOfDateEntries outOfSyncEntries ProgressMonitorDialog ProgressMonitorDialog fSite getShell WorkspaceModifyOperation IProgressMonitor CoreException outOfDateEntries InvocationTargetException ExceptionHandler fSite getShell SearchMessages getString ReplaceAction SearchMessages getString ReplaceAction InterruptedException
private void research I Progress Monitor monitor List out Of Date Entries Text Search Operation operation throws Core Exception I Status status null for Iterator elements out Of Date Entries iterator elements has Next Search Result View Entry entry Search Result View Entry elements next status research operation monitor entry if status null status isOK throw new Core Exception status  IProgressMonitor outOfDateEntries TextSearchOperation CoreException IStatus outOfDateEntries hasNext SearchResultViewEntry SearchResultViewEntry CoreException
private boolean ask For Research List out Of Date Entries List out Of Sync Entries Search Result View view Search Result View Search Plugin get Search Result View I Label Provider label Provider null if view null label Provider view get Label Provider Search Again Confirmation Dialog dialog new Search Again Confirmation Dialog f Site get Shell label Provider out Of Sync Entries out Of Date Entries return dialog open I Dialog Constants OK ID  askForResearch outOfDateEntries outOfSyncEntries SearchResultView SearchResultView SearchPlugin getSearchResultView ILabelProvider labelProvider labelProvider getLabelProvider SearchAgainConfirmationDialog SearchAgainConfirmationDialog fSite getShell labelProvider outOfSyncEntries outOfDateEntries IDialogConstants OK_ID
private String get Dialog Title return Search Messages get String Replace Action dialog title NON NLS 1  getDialogTitle SearchMessages getString ReplaceAction
private boolean is Out Of Date Search Result View Entry entry I Resource resource entry get Resource if entry get Modification Stamp resource get Modification Stamp return true I Text File Buffer Manager bm File Buffers get Text File Buffer Manager I Text File Buffer fb bm get Text File Buffer resource get Full Path if fb null fb is Dirty return true return false  isOutOfDate SearchResultViewEntry IResource getResource getModificationStamp getModificationStamp ITextFileBufferManager FileBuffers getTextFileBufferManager ITextFileBuffer getTextFileBuffer getFullPath isDirty
private boolean is Out Of Sync Search Result View Entry entry return entry get Resource is Synchronized I Resource DEPTH ZERO  isOutOfSync SearchResultViewEntry getResource isSynchronized IResource DEPTH_ZERO
markers add All entry get Markers operation search In File I File entry get Resource new I Text Search Result Collector public I Progress Monitor get Progress Monitor return monitor  addAll getMarkers searchInFile IFile getResource ITextSearchResultCollector IProgressMonitor getProgressMonitor
public void about To Start nothing to do  aboutToStart
public void accept I Resource Proxy proxy String line int start int length int line Number throws Core Exception I File file I File proxy request Resource if start 0 length 1 return I Marker marker file create Marker SearchUI SEARCH MARKER Hash Map attributes new Hash Map 4 attributes put SearchUI LINE line attributes put I Marker CHAR START new Integer start attributes put I Marker CHAR END new Integer start length attributes put I Marker LINE NUMBER new Integer line Number marker set Attributes attributes  IResourceProxy lineNumber CoreException IFile IFile requestResource IMarker createMarker SEARCH_MARKER HashMap HashMap IMarker CHAR_START IMarker CHAR_END IMarker LINE_NUMBER lineNumber setAttributes
public void done nothing to do 
private I Status research Text Search Operation operation final I Progress Monitor monitor Search Result View Entry entry throws Core Exception List markers new Array List markers add All entry get Markers operation search In File I File entry get Resource new I Text Search Result Collector public I Progress Monitor get Progress Monitor return monitor public void about To Start nothing to do public void accept I Resource Proxy proxy String line int start int length int line Number throws Core Exception I File file I File proxy request Resource if start 0 length 1 return I Marker marker file create Marker SearchUI SEARCH MARKER Hash Map attributes new Hash Map 4 attributes put SearchUI LINE line attributes put I Marker CHAR START new Integer start attributes put I Marker CHAR END new Integer start length attributes put I Marker LINE NUMBER new Integer line Number marker set Attributes attributes public void done nothing to do I Status status operation get Status if status null status isOK for Iterator marker Iter markers iterator marker Iter has Next I Marker marker I Marker marker Iter next marker delete return status  IStatus TextSearchOperation IProgressMonitor SearchResultViewEntry CoreException ArrayList addAll getMarkers searchInFile IFile getResource ITextSearchResultCollector IProgressMonitor getProgressMonitor aboutToStart IResourceProxy lineNumber CoreException IFile IFile requestResource IMarker createMarker SEARCH_MARKER HashMap HashMap IMarker CHAR_START IMarker CHAR_END IMarker LINE_NUMBER lineNumber setAttributes IStatus getStatus markerIter markerIter hasNext IMarker IMarker markerIter

private Item f Array private int f Next Position Item Iterator Item array f Array array f Next Position 0  fArray fNextPosition ItemIterator fArray fNextPosition
public boolean has Next return f Next Position f Array length  hasNext fNextPosition fArray
public Object next if has Next throw new No Such Element Exception return f Array f Next Position get Data  hasNext NoSuchElementException fArray fNextPosition getData
public void remove throw new Unsupported Operation Exception  UnsupportedOperationException
public Replace Action2 File Search Page page I File elements Assert is Not Null page f Site page get Site if elements null f Elements elements else f Elements new I File 0 f Page page set Text Search Messages get String Replace Action label all NON NLS 1 set Enabled f Elements length 0  ReplaceAction2 FileSearchPage IFile isNotNull fSite getSite fElements fElements IFile fPage setText SearchMessages getString ReplaceAction label_all setEnabled fElements
public Replace Action2 File Search Page page Assert is Not Null page f Site page get Site f Page page Item items null Structured Viewer viewer f Page get Viewer if viewer instanceof Tree Viewer items Tree Viewer viewer get Tree get Items else if viewer instanceof Table Viewer items Table Viewer viewer get Table get Items f Elements collect Files new Item Iterator items set Text Search Messages get String Replace Action label all NON NLS 1 set Enabled f Elements length 0  ReplaceAction2 FileSearchPage isNotNull fSite getSite fPage StructuredViewer fPage getViewer TreeViewer TreeViewer getTree getItems TableViewer TableViewer getTable getItems fElements collectFiles ItemIterator setText SearchMessages getString ReplaceAction label_all setEnabled fElements
public Replace Action2 File Search Page page I Structured Selection selection f Site page get Site f Page page set Text Search Messages get String Replace Action label selected NON NLS 1 f Elements collect Files selection iterator set Enabled f Elements length 0  ReplaceAction2 FileSearchPage IStructuredSelection fSite getSite fPage setText SearchMessages getString ReplaceAction label_selected fElements collectFiles setEnabled fElements
resource accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception if proxy get Type I Resource FILE I Resource file proxy request Resource if result get Match Count file 0 files add file return false return true  IResourceProxyVisitor IResourceProxy CoreException getType IResource IResource requestResource getMatchCount
private I File collect Files Iterator resources final Set files new Hash Set final Abstract Text Search Result result f Page get Input if result null return new I File 0 while resources has Next I Resource resource I Resource resources next try resource accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy throws Core Exception if proxy get Type I Resource FILE I Resource file proxy request Resource if result get Match Count file 0 files add file return false return true I Container NONE catch Core Exception e TODO Don t know yet how to handle this This is called when we open the context menu A bad time to show a dialog Search Plugin get Default get Log log e get Status return I File files to Array new I File files size  IFile collectFiles HashSet AbstractTextSearchResult fPage getInput IFile hasNext IResource IResource IResourceProxyVisitor IResourceProxy CoreException getType IResource IResource requestResource getMatchCount IContainer CoreException SearchPlugin getDefault getLog getStatus IFile toArray IFile
public void run I Workspace workspace Resources Plugin get Workspace I Scheduling Rule rule workspace get Rule Factory modify Rule workspace get Root try Platform get Job Manager begin Rule rule null if validate Resources File Search Query f Page get Input get Query Replace Dialog2 dialog new Replace Dialog2 f Site get Shell f Elements f Page dialog open catch Operation Canceled Exception e finally Platform get Job Manager end Rule rule  IWorkspace ResourcesPlugin getWorkspace ISchedulingRule getRuleFactory modifyRule getRoot getJobManager beginRule validateResources FileSearchQuery fPage getInput getQuery ReplaceDialog2 ReplaceDialog2 fSite getShell fElements fPage OperationCanceledException getJobManager endRule
try pmd run true true new Workspace Modify Operation null protected void execute I Progress Monitor monitor throws Core Exception research monitor out Of Date Entries operation  WorkspaceModifyOperation IProgressMonitor CoreException outOfDateEntries
private boolean validate Resources final File Search Query operation I File read Only Files get Read Only Files I Status status Resources Plugin get Workspace validate Edit read Only Files f Site get Shell if status isOK if status get Severity I Status CANCEL Error Dialog open Error f Site get Shell Search Messages get String Replace Action2 error validate title Search Messages get String Replace Action2 error validate message status NON NLS 1 NON NLS 2 return false final List out Of Date Entries new Array List for int j 0 j f Elements length j I File entry f Elements j Match markers f Page get Displayed Matches entry for int i 0 i markers length i if is Out Of Date File Match markers i out Of Date Entries add entry break final List out Of Sync Entries new Array List for int i 0 i f Elements length i I File entry f Elements i if is Out Of Sync entry out Of Sync Entries add entry if out Of Date Entries size 0 out Of Sync Entries size 0 if ask For Research out Of Date Entries out Of Sync Entries Progress Monitor Dialog pmd new Progress Monitor Dialog f Site get Shell try pmd run true true new Workspace Modify Operation null protected void execute I Progress Monitor monitor throws Core Exception research monitor out Of Date Entries operation return true catch Invocation Target Exception e Exception Handler handle e f Site get Shell Search Messages get String Replace Action label Search Messages get String Replace Action research error NON NLS 1 NON NLS 2 catch Interrupted Exception e canceled return false return true  validateResources FileSearchQuery IFile readOnlyFiles getReadOnlyFiles IStatus ResourcesPlugin getWorkspace validateEdit readOnlyFiles fSite getShell getSeverity IStatus ErrorDialog openError fSite getShell SearchMessages getString ReplaceAction2 error_validate SearchMessages getString ReplaceAction2 error_validate outOfDateEntries ArrayList fElements IFile fElements fPage getDisplayedMatches isOutOfDate FileMatch outOfDateEntries outOfSyncEntries ArrayList fElements IFile fElements isOutOfSync outOfSyncEntries outOfDateEntries outOfSyncEntries askForResearch outOfDateEntries outOfSyncEntries ProgressMonitorDialog ProgressMonitorDialog fSite getShell WorkspaceModifyOperation IProgressMonitor CoreException outOfDateEntries InvocationTargetException ExceptionHandler fSite getShell SearchMessages getString ReplaceAction SearchMessages getString ReplaceAction InterruptedException
private I File get Read Only Files Set read Only new Hash Set for int i 0 i f Elements length i if f Elements i is Read Only read Only add f Elements i I File read Only Array new I File read Only size return I File read Only to Array read Only Array  IFile getReadOnlyFiles readOnly HashSet fElements fElements isReadOnly readOnly fElements IFile readOnlyArray IFile readOnly IFile readOnly toArray readOnlyArray
private void research I Progress Monitor monitor List out Of Date Entries File Search Query operation throws Core Exception I Status status null for Iterator elements out Of Date Entries iterator elements has Next I File entry I File elements next status research operation monitor entry if status null status isOK throw new Core Exception status  IProgressMonitor outOfDateEntries FileSearchQuery CoreException IStatus outOfDateEntries hasNext IFile IFile CoreException
private boolean ask For Research List out Of Date Entries List out Of Sync Entries Search Again Confirmation Dialog dialog new Search Again Confirmation Dialog f Site get Shell I Label Provider f Page get Viewer get Label Provider out Of Sync Entries out Of Date Entries return dialog open I Dialog Constants OK ID  askForResearch outOfDateEntries outOfSyncEntries SearchAgainConfirmationDialog SearchAgainConfirmationDialog fSite getShell ILabelProvider fPage getViewer getLabelProvider outOfSyncEntries outOfDateEntries IDialogConstants OK_ID
private boolean is Out Of Date File Match match if match get Creation Time Stamp match get File get Modification Stamp return true I Text File Buffer Manager bm File Buffers get Text File Buffer Manager I Text File Buffer fb bm get Text File Buffer match get File get Full Path if fb null fb is Dirty return true return false  isOutOfDate FileMatch getCreationTimeStamp getFile getModificationStamp ITextFileBufferManager FileBuffers getTextFileBufferManager ITextFileBuffer getTextFileBuffer getFile getFullPath isDirty
private boolean is Out Of Sync I File entry return entry is Synchronized I Resource DEPTH ZERO  isOutOfSync IFile isSynchronized IResource DEPTH_ZERO
private I Status research File Search Query operation final I Progress Monitor monitor I File entry Match matches f Page get Displayed Matches entry I Status status operation search In File get Result monitor entry if status null status isOK for int i 0 i matches length i get Result remove Match matches i return status  IStatus FileSearchQuery IProgressMonitor IFile fPage getDisplayedMatches IStatus searchInFile getResult getResult removeMatch
private Abstract Text Search Result get Result return f Page get Input  AbstractTextSearchResult getResult fPage getInput

private I Marker f Marker Replace Marker I Marker marker f Marker marker  IMarker fMarker ReplaceMarker IMarker fMarker
public I File get File return I File f Marker get Resource  IFile getFile IFile fMarker getResource
public void delete Position I Document doc if f Position null Marker Utilities set Char Start f Marker f Position get Offset Marker Utilities set Char End f Marker f Position get Offset f Position get Length doc remove Position f Position f Position null  deletePosition IDocument fPosition MarkerUtilities setCharStart fMarker fPosition getOffset MarkerUtilities setCharEnd fMarker fPosition getOffset fPosition getLength removePosition fPosition fPosition
public void delete throws Core Exception f Marker delete  CoreException fMarker
public void create Position I Document doc throws Bad Location Exception if f Position null int char Start Marker Utilities get Char Start f Marker f Position new Position char Start Marker Utilities get Char End f Marker char Start doc add Position f Position  createPosition IDocument BadLocationException fPosition charStart MarkerUtilities getCharStart fMarker fPosition charStart MarkerUtilities getCharEnd fMarker charStart addPosition fPosition
public int get Length if f Position null return f Position get Length return Marker Utilities get Char End f Marker Marker Utilities get Char Start f Marker  getLength fPosition fPosition getLength MarkerUtilities getCharEnd fMarker MarkerUtilities getCharStart fMarker
public int get Offset if f Position null return f Position get Offset return Marker Utilities get Char Start f Marker  getOffset fPosition fPosition getOffset MarkerUtilities getCharStart fMarker
private abstract static class Replace Operation extends Workspace Modify Operation public void execute I Progress Monitor monitor throws Invocation Target Exception try do Replace monitor catch Bad Location Exception e throw new Invocation Target Exception e catch Core Exception e throw new Invocation Target Exception e catch IO Exception e throw new Invocation Target Exception e  ReplaceOperation WorkspaceModifyOperation IProgressMonitor InvocationTargetException doReplace BadLocationException InvocationTargetException CoreException InvocationTargetException IOException InvocationTargetException
protected abstract void do Replace I Progress Monitor pm throws Bad Location Exception Core Exception IO Exception  doReplace IProgressMonitor BadLocationException CoreException IOException
protected Replace Dialog Shell parent Shell List entries Text Search Operation operation super parent Shell Assert is Not Null entries Assert is Not Null operation f Markers new Array List initialize Markers entries f Operation operation  ReplaceDialog parentShell TextSearchOperation parentShell isNotNull isNotNull fMarkers ArrayList initializeMarkers fOperation
private void initialize Markers List entries for Iterator elements entries iterator elements has Next Search Result View Entry element Search Result View Entry elements next List marker List element get Markers for Iterator markers marker List iterator markers has Next I Marker marker I Marker markers next int char Start Marker Utilities get Char Start marker if char Start 0 Marker Utilities get Char End marker char Start f Markers add new Replace Marker marker  initializeMarkers hasNext SearchResultViewEntry SearchResultViewEntry markerList getMarkers markerList hasNext IMarker IMarker charStart MarkerUtilities getCharStart charStart MarkerUtilities getCharEnd charStart fMarkers ReplaceMarker
widget related stuff public void create super create Shell shell get Shell shell set Text get Dialog Title goto Current Marker enable Buttons  getShell setText getDialogTitle gotoCurrentMarker enableButtons
protected Control create Page Area Composite parent Composite result new Composite parent SWT NULL Grid Layout layout new Grid Layout result set Layout layout layout num Columns 2 layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING initialize Dialog Units result Label label new Label result SWT NONE label set Text Search Messages get String Replace Dialog replace label NON NLS 1 Text clabel new Text result SWT BORDER clabel set Enabled false clabel set Text f Operation get Pattern Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint convert Width In Chars To Pixels 50 clabel set Layout Data gd label new Label result SWT NONE label set Text Search Messages get String Replace Dialog with label NON NLS 1 f Text Field new Text result SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint convert Width In Chars To Pixels 50 f Text Field set Layout Data gd f Text Field set Focus new Label result SWT NONE Button replace With Regex new Button result SWT CHECK replace With Regex set Text Search Messages get String Replace Dialog is Regex label NON NLS 1 replace With Regex set Enabled false replace With Regex set Selection false apply Dialog Font result return result  createPageArea GridLayout GridLayout setLayout numColumns marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING initializeDialogUnits setText SearchMessages getString ReplaceDialog replace_label setEnabled setText fOperation getPattern GridData GridData GridData FILL_HORIZONTAL widthHint convertWidthInCharsToPixels setLayoutData setText SearchMessages getString ReplaceDialog with_label fTextField GridData GridData FILL_HORIZONTAL widthHint convertWidthInCharsToPixels fTextField setLayoutData fTextField setFocus replaceWithRegex replaceWithRegex setText SearchMessages getString ReplaceDialog isRegex replaceWithRegex setEnabled replaceWithRegex setSelection applyDialogFont
protected void create Buttons For Button Bar Composite parent f Replace Button create Button parent REPLACE Search Messages get String Replace Dialog replace true NON NLS 1 f Replace All In File Button create Button parent REPLACE ALL IN FILE Search Messages get String Replace Dialog replace All In File false NON NLS 1 Label filler new Label parent SWT NONE filler set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL f Replace All Button create Button parent REPLACE ALL Search Messages get String Replace Dialog replace All false NON NLS 1 f Skip Button create Button parent SKIP Search Messages get String Replace Dialog skip false NON NLS 1 f Skip File Button create Button parent SKIP FILE Search Messages get String Replace Dialog skip File false NON NLS 1 filler new Label parent SWT NONE filler set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL super create Buttons For Button Bar parent Grid Layout parent get Layout num Columns 4  createButtonsForButtonBar fReplaceButton createButton SearchMessages getString ReplaceDialog fReplaceAllInFileButton createButton REPLACE_ALL_IN_FILE SearchMessages getString ReplaceDialog replaceAllInFile setLayoutData GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL fReplaceAllButton createButton REPLACE_ALL SearchMessages getString ReplaceDialog replaceAll fSkipButton createButton SearchMessages getString ReplaceDialog fSkipFileButton createButton SKIP_FILE SearchMessages getString ReplaceDialog skipFile setLayoutData GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL createButtonsForButtonBar GridLayout getLayout numColumns
protected Point get Initial Location Point initial Size Search Result View view Search Result View Search Plugin get Search Result View if view null return super get Initial Location initial Size Point result new Point 0 0 Control control view get Viewer get Control Point size control get Size Point location control to Display control get Location result x Math max 0 location x size x initial Size x result y Math max 0 location y size y initial Size y return result  getInitialLocation initialSize SearchResultView SearchResultView SearchPlugin getSearchResultView getInitialLocation initialSize getViewer getControl getSize toDisplay getLocation initialSize initialSize
private void enable Buttons f Skip Button set Enabled has Next Marker f Skip File Button set Enabled has Next File f Replace Button set Enabled can Replace f Replace All In File Button set Enabled can Replace f Replace All Button set Enabled can Replace  enableButtons fSkipButton setEnabled hasNextMarker fSkipFileButton setEnabled hasNextFile fReplaceButton setEnabled canReplace fReplaceAllInFileButton setEnabled canReplace fReplaceAllButton setEnabled canReplace
case REPLACE run false true new Replace Operation protected void do Replace I Progress Monitor pm throws Bad Location Exception Core Exception replace pm replace Text  ReplaceOperation doReplace IProgressMonitor BadLocationException CoreException replaceText
case REPLACE ALL IN FILE run false true new Replace Operation protected void do Replace I Progress Monitor pm throws Bad Location Exception Core Exception replace In File pm replace Text  REPLACE_ALL_IN_FILE ReplaceOperation doReplace IProgressMonitor BadLocationException CoreException replaceInFile replaceText
case REPLACE ALL run false true new Replace Operation protected void do Replace I Progress Monitor pm throws Bad Location Exception Core Exception replace All pm replace Text  REPLACE_ALL ReplaceOperation doReplace IProgressMonitor BadLocationException CoreException replaceAll replaceText
protected void button Pressed int button Id final String replace Text f Text Field get Text try switch button Id case SKIP skip break case SKIP FILE skip File break case REPLACE run false true new Replace Operation protected void do Replace I Progress Monitor pm throws Bad Location Exception Core Exception replace pm replace Text goto Current Marker break case REPLACE ALL IN FILE run false true new Replace Operation protected void do Replace I Progress Monitor pm throws Bad Location Exception Core Exception replace In File pm replace Text goto Current Marker break case REPLACE ALL run false true new Replace Operation protected void do Replace I Progress Monitor pm throws Bad Location Exception Core Exception replace All pm replace Text goto Current Marker break default super button Pressed button Id return catch Invocation Target Exception e Search Plugin log e String message Search Messages get Formatted String Replace Dialog error unable to replace get Current Marker get File get Name NON NLS 1 Message Dialog open Error get Parent Shell get Dialog Title message catch Interrupted Exception e means operation canceled if has Next Marker has Next File can Replace close else enable Buttons  buttonPressed buttonId replaceText fTextField getText buttonId SKIP_FILE skipFile ReplaceOperation doReplace IProgressMonitor BadLocationException CoreException replaceText gotoCurrentMarker REPLACE_ALL_IN_FILE ReplaceOperation doReplace IProgressMonitor BadLocationException CoreException replaceInFile replaceText gotoCurrentMarker REPLACE_ALL ReplaceOperation doReplace IProgressMonitor BadLocationException CoreException replaceAll replaceText gotoCurrentMarker buttonPressed buttonId InvocationTargetException SearchPlugin SearchMessages getFormattedString ReplaceDialog unable_to_replace getCurrentMarker getFile getName MessageDialog openError getParentShell getDialogTitle InterruptedException hasNextMarker hasNextFile canReplace enableButtons
private Replace Marker get Current Marker return Replace Marker f Markers get 0  ReplaceMarker getCurrentMarker ReplaceMarker fMarkers
private void replace I Progress Monitor pm String replacement Text throws Bad Location Exception Core Exception Replace Marker marker get Current Marker pm begin Task Search Messages get String Replace Dialog task replace 10 NON NLS 1 replace In File pm marker get File replacement Text new Replace Marker marker  IProgressMonitor replacementText BadLocationException CoreException ReplaceMarker getCurrentMarker beginTask SearchMessages getString ReplaceDialog replaceInFile getFile replacementText ReplaceMarker
private void replace In File I Progress Monitor pm String replacement Text throws Bad Location Exception Core Exception Replace Marker first Marker get Current Marker Replace Marker markers collect Markers first Marker get File pm begin Task Search Messages get Formatted String Replace Dialog task replace In File first Marker get File get Full Path toOS String 4 NON NLS 1 replace In File pm first Marker get File replacement Text markers  replaceInFile IProgressMonitor replacementText BadLocationException CoreException ReplaceMarker firstMarker getCurrentMarker ReplaceMarker collectMarkers firstMarker getFile beginTask SearchMessages getFormattedString ReplaceDialog replaceInFile firstMarker getFile getFullPath toOSString replaceInFile firstMarker getFile replacementText
private void replace All I Progress Monitor pm String replacement Text throws Bad Location Exception Core Exception int resource Count count Resources pm begin Task Search Messages get String Replace Dialog task replace replace All resource Count NON NLS 1 while f Markers size 0 replace In File new Sub Progress Monitor pm 1 0 replacement Text pm done  replaceAll IProgressMonitor replacementText BadLocationException CoreException resourceCount countResources beginTask SearchMessages getString ReplaceDialog replaceAll resourceCount fMarkers replaceInFile SubProgressMonitor replacementText
private void replace In File final I Progress Monitor pm final I File file final String replacement Text final Replace Marker markers throws Bad Location Exception Core Exception if pm is Canceled throw new Operation Canceled Exception do Replace In File pm file replacement Text markers  replaceInFile IProgressMonitor IFile replacementText ReplaceMarker BadLocationException CoreException isCanceled OperationCanceledException doReplaceInFile replacementText
private void do Replace In File I Progress Monitor pm I File file String replacement Text final Replace Marker markers throws Bad Location Exception Core Exception try if file is Read Only file get Workspace validate Edit new I File file null if file is Read Only if f Skip Readonly skip File return int rc ask For Skip file switch rc case CANCEL throw new Operation Canceled Exception case SKIP FILE skip File return case SKIP ALL f Skip Readonly true skip File return I Text File Buffer Manager bm File Buffers get Text File Buffer Manager try bm connect file get Full Path new Sub Progress Monitor pm 1 I Text File Buffer fb bm get Text File Buffer file get Full Path boolean was Dirty fb is Dirty I Document doc fb get Document try create Positions In File file doc for int i 0 i markers length i doc replace markers i get Offset markers i get Length replacement Text f Markers remove 0 markers i delete finally remove Positons In File file doc if was Dirty fb commit new Sub Progress Monitor pm 1 true finally bm disconnect file get Full Path new Sub Progress Monitor pm 1 finally pm done  doReplaceInFile IProgressMonitor IFile replacementText ReplaceMarker BadLocationException CoreException isReadOnly getWorkspace validateEdit IFile isReadOnly fSkipReadonly skipFile askForSkip OperationCanceledException SKIP_FILE skipFile SKIP_ALL fSkipReadonly skipFile ITextFileBufferManager FileBuffers getTextFileBufferManager getFullPath SubProgressMonitor ITextFileBuffer getTextFileBuffer getFullPath wasDirty isDirty IDocument getDocument createPositionsInFile getOffset getLength replacementText fMarkers removePositonsInFile wasDirty SubProgressMonitor getFullPath SubProgressMonitor
private void remove Positons In File I File file I Document doc for Iterator markers f Markers iterator markers has Next Replace Marker marker Replace Marker markers next if marker get File equals file return marker delete Position doc  removePositonsInFile IFile IDocument fMarkers hasNext ReplaceMarker ReplaceMarker getFile deletePosition
private void create Positions In File I File file I Document doc throws Bad Location Exception for Iterator markers f Markers iterator markers has Next Replace Marker marker Replace Marker markers next if marker get File equals file return marker create Position doc  createPositionsInFile IFile IDocument BadLocationException fMarkers hasNext ReplaceMarker ReplaceMarker getFile createPosition
private int ask For Skip final I File file String message Search Messages get Formatted String Read Only Dialog message file get Full Path toOS String NON NLS 1 String button Labels null boolean show Skip count Resources 1 if show Skip String skip Label Search Messages get String Read Only Dialog skip File NON NLS 1 String skip All Label Search Messages get String Read Only Dialog skip All NON NLS 1 button Labels new String skip Label skip All Label I Dialog Constants CANCEL LABEL else button Labels new String I Dialog Constants CANCEL LABEL Message Dialog msd new Message Dialog get Shell get Shell get Text null message Message Dialog ERROR button Labels 0 int rc msd open switch rc case 0 return show Skip SKIP FILE CANCEL case 1 return SKIP ALL default return CANCEL  askForSkip IFile SearchMessages getFormattedString ReadOnlyDialog getFullPath toOSString buttonLabels showSkip countResources showSkip skipLabel SearchMessages getString ReadOnlyDialog skipFile skipAllLabel SearchMessages getString ReadOnlyDialog skipAll buttonLabels skipLabel skipAllLabel IDialogConstants CANCEL_LABEL buttonLabels IDialogConstants CANCEL_LABEL MessageDialog MessageDialog getShell getShell getText MessageDialog buttonLabels showSkip SKIP_FILE SKIP_ALL
private String get Dialog Title return Search Messages get String Replace Dialog dialog title NON NLS 1  getDialogTitle SearchMessages getString ReplaceDialog
private void skip f Markers remove 0 Assert is True f Markers size 0 goto Current Marker  fMarkers isTrue fMarkers gotoCurrentMarker
private void skip File Replace Marker current Marker get Current Marker if current Marker null return I Resource current File current Marker get File while f Markers size 0 get Current Marker get File equals current File f Markers remove 0 goto Current Marker  skipFile ReplaceMarker currentMarker getCurrentMarker currentMarker IResource currentFile currentMarker getFile fMarkers getCurrentMarker getFile currentFile fMarkers gotoCurrentMarker
private void goto Current Marker if f Markers size 0 Replace Marker marker get Current Marker Control focus Control get Shell get Display get Focus Control try select Entry marker I Text Editor editor null if SearchUI reuse Editor editor open Editor Reuse marker else editor open Editor No Reuse marker editor select And Reveal marker get Offset marker get Length if focus Control null focus Control is Disposed focus Control set Focus catch Part Init Exception e String message Search Messages get Formatted String Replace Dialog error unable to open text editor marker get File get Name NON NLS 1 Message Dialog open Error get Parent Shell get Dialog Title message  gotoCurrentMarker fMarkers ReplaceMarker getCurrentMarker focusControl getShell getDisplay getFocusControl selectEntry ITextEditor reuseEditor openEditorReuse openEditorNoReuse selectAndReveal getOffset getLength focusControl focusControl isDisposed focusControl setFocus PartInitException SearchMessages getFormattedString ReplaceDialog unable_to_open_text_editor getFile getName MessageDialog openError getParentShell getDialogTitle
private void select Entry Replace Marker marker Search Result View view Search Result View Search Plugin get Search Result View if view null return Search Result Viewer viewer view get Viewer if viewer null return I Selection sel viewer get Selection if sel instanceof I Structured Selection return I Structured Selection ss I Structured Selection sel I File file marker get File if ss size 1 file equals ss get First Element return Table table viewer get Table if table null table is Disposed return int selection Index table get Selection Index if selection Index 0 selection Index 0 for int i 0 i table get Item Count i int current Table Index selection Index i table get Item Count Search Result View Entry entry Search Result View Entry viewer get Element At current Table Index if file equals entry get Group By Key viewer set Selection new Structured Selection entry return  selectEntry ReplaceMarker SearchResultView SearchResultView SearchPlugin getSearchResultView SearchResultViewer getViewer ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection IFile getFile getFirstElement getTable isDisposed selectionIndex getSelectionIndex selectionIndex selectionIndex getItemCount currentTableIndex selectionIndex getItemCount SearchResultViewEntry SearchResultViewEntry getElementAt currentTableIndex getGroupByKey setSelection StructuredSelection
opening editors private I Text Editor open Editor No Reuse Replace Marker marker throws Part Init Exception I File file marker get File I Workbench Page active Page Search Plugin get Active Page if active Page null return null I Text Editor text Editor show Open Text Editor active Page file if text Editor null return text Editor return open New Text Editor file active Page  ITextEditor openEditorNoReuse ReplaceMarker PartInitException IFile getFile IWorkbenchPage activePage SearchPlugin getActivePage activePage ITextEditor textEditor showOpenTextEditor activePage textEditor textEditor openNewTextEditor activePage
private I Text Editor open New Text Editor I File file I Workbench Page active Page throws Part Init Exception I Editor Descriptor desc IDE get Default Editor file if desc null String editorID desc get Id I Editor Part editor if desc is Internal editor active Page open Editor new File Editor Input file editorID if editor instanceof I Text Editor if editor instanceof I Reusable Editor f Editor I Reusable Editor editor return I Text Editor editor else active Page close Editor editor false I Editor Part editor active Page open Editor new File Editor Input file org eclipse ui Default Text Editor NON NLS 1 return I Text Editor editor  ITextEditor openNewTextEditor IFile IWorkbenchPage activePage PartInitException IEditorDescriptor getDefaultEditor getId IEditorPart isInternal activePage openEditor FileEditorInput ITextEditor IReusableEditor fEditor IReusableEditor ITextEditor activePage closeEditor IEditorPart activePage openEditor FileEditorInput DefaultTextEditor ITextEditor
private I Text Editor open Editor Reuse Replace Marker marker throws Part Init Exception I Workbench Page page Search Plugin get Active Page I File file marker get File if page null return null I Text Editor text Editor show Open Text Editor page file if text Editor null return text Editor String editor Id null I Editor Descriptor desc IDE get Default Editor file if desc null desc is Internal editor Id desc get Id boolean is Open is Editor Open page f Editor boolean can Be Reused is Open f Editor is Dirty is Pinned f Editor boolean shows Same Input Type f Editor null editor Id null f Editor get Site get Id equals editor Id if can Be Reused if shows Same Input Type f Editor set Input new File Editor Input file page bring To Top f Editor return I Text Editor f Editor else page close Editor f Editor false f Editor null return open New Text Editor file page  ITextEditor openEditorReuse ReplaceMarker PartInitException IWorkbenchPage SearchPlugin getActivePage IFile getFile ITextEditor textEditor showOpenTextEditor textEditor textEditor editorId IEditorDescriptor getDefaultEditor isInternal editorId getId isOpen isEditorOpen fEditor canBeReused isOpen fEditor isDirty isPinned fEditor showsSameInputType fEditor editorId fEditor getSite getId editorId canBeReused showsSameInputType fEditor setInput FileEditorInput bringToTop fEditor ITextEditor fEditor closeEditor fEditor fEditor openNewTextEditor
private boolean is Editor Open I Workbench Page page I Editor Part editor if editor null I Editor Reference parts page get Editor References int i 0 for int j 0 j parts length j if editor parts i get Editor false return true return false  isEditorOpen IWorkbenchPage IEditorPart IEditorReference getEditorReferences getEditor
private I Text Editor show Open Text Editor I Workbench Page page I File file I Editor Part editor page find Editor new File Editor Input file if editor instanceof I Text Editor page bring To Top editor return I Text Editor editor return null  ITextEditor showOpenTextEditor IWorkbenchPage IFile IEditorPart findEditor FileEditorInput ITextEditor bringToTop ITextEditor
private boolean is Pinned I Editor Part editor if editor null return false I Editor Reference editor Refs editor get Editor Site get Page get Editor References int i 0 while i editor Refs length if editor equals editor Refs i get Editor false return editor Refs i is Pinned i return false  isPinned IEditorPart IEditorReference editorRefs getEditorSite getPage getEditorReferences editorRefs editorRefs getEditor editorRefs isPinned
resource related return the number of resources referred to in f Markers private int count Resources I Resource r null int count 0 for Iterator elements f Markers iterator elements has Next Replace Marker element Replace Marker elements next if element get File equals r count r element get File return count  fMarkers countResources IResource fMarkers hasNext ReplaceMarker ReplaceMarker getFile getFile
private Replace Marker collect Markers I Resource resource List matching new Array List for int i 0 i f Markers size i Replace Marker marker Replace Marker f Markers get i if marker get File equals resource break matching add marker Replace Marker markers new Replace Marker matching size return Replace Marker matching to Array markers  ReplaceMarker collectMarkers IResource ArrayList fMarkers ReplaceMarker ReplaceMarker fMarkers getFile ReplaceMarker ReplaceMarker ReplaceMarker toArray
some queries private boolean has Next Marker return f Markers size 1  hasNextMarker fMarkers
private boolean has Next File if has Next Marker return false I Resource current File get Current Marker get File for int i 0 i f Markers size i if Replace Marker f Markers get i get File equals current File return true return false  hasNextFile hasNextMarker IResource currentFile getCurrentMarker getFile fMarkers ReplaceMarker fMarkers getFile currentFile
private boolean can Replace return f Markers size 0  canReplace fMarkers

public void run I Progress Monitor monitor throws Invocation Target Exception try do Replace monitor catch Bad Location Exception e throw new Invocation Target Exception e catch Core Exception e throw new Invocation Target Exception e catch IO Exception e throw new Invocation Target Exception e  IProgressMonitor InvocationTargetException doReplace BadLocationException InvocationTargetException CoreException InvocationTargetException IOException InvocationTargetException
protected abstract void do Replace I Progress Monitor pm throws Bad Location Exception Core Exception IO Exception  doReplace IProgressMonitor BadLocationException CoreException IOException
protected Replace Dialog2 Shell parent Shell I File entries File Search Page page super parent Shell Assert is Not Null entries Assert is Not Null page get Input f Page page f Markers new Array List initialize Markers entries  ReplaceDialog2 parentShell IFile FileSearchPage parentShell isNotNull isNotNull getInput fPage fMarkers ArrayList initializeMarkers
private boolean is Regex Query return File Search Query f Page get Input get Query is Regex Search  isRegexQuery FileSearchQuery fPage getInput getQuery isRegexSearch
private void initialize Markers I File entries for int j 0 j entries length j I File entry entries j Match matches f Page get Displayed Matches entry for int i 0 i matches length i f Markers add matches i  initializeMarkers IFile IFile fPage getDisplayedMatches fMarkers
widget related stuff public void create super create Shell shell get Shell shell set Text get Dialog Title goto Current Marker enable Buttons  getShell setText getDialogTitle gotoCurrentMarker enableButtons
public int open boolean was Autobuild false try was Autobuild disable Autobuild catch Core Exception e Exception Handler handle e get Shell get Dialog Title Search Messages get String Replace Dialog2 error disable Autobuild NON NLS 1 try return super open finally if was Autobuild try restore Autobuild catch Core Exception e1 Exception Handler handle e1 get Shell get Dialog Title Search Messages get String Replace Dialog2 error restore Autobuild NON NLS 1 return CANCEL  wasAutobuild wasAutobuild disableAutobuild CoreException ExceptionHandler getShell getDialogTitle SearchMessages getString ReplaceDialog2 disableAutobuild wasAutobuild restoreAutobuild CoreException ExceptionHandler getShell getDialogTitle SearchMessages getString ReplaceDialog2 restoreAutobuild
private void restore Autobuild throws Core Exception this is only called if autobuild was on before I Workspace workspace Resources Plugin get Workspace I Workspace Description description workspace get Description description set Auto Building true workspace set Description description if f Saved new Global Build Action f Page get Site get Workbench Window Incremental Project Builder INCREMENTAL BUILD run  restoreAutobuild CoreException IWorkspace ResourcesPlugin getWorkspace IWorkspaceDescription getDescription setAutoBuilding setDescription fSaved GlobalBuildAction fPage getSite getWorkbenchWindow IncrementalProjectBuilder INCREMENTAL_BUILD
private boolean disable Autobuild throws Core Exception I Workspace workspace Resources Plugin get Workspace boolean autobuild workspace is Auto Building if autobuild I Workspace Description description workspace get Description description set Auto Building false workspace set Description description return autobuild  disableAutobuild CoreException IWorkspace ResourcesPlugin getWorkspace isAutoBuilding IWorkspaceDescription getDescription setAutoBuilding setDescription
f Replace With Regex set Text Search Messages get String Replace Dialog is Regex label NON NLS 1 f Replace With Regex add Selection Listener new Selection Adapter public void widget Selected Selection Event e set Content Assists Enablement f Replace With Regex get Selection  fReplaceWithRegex setText SearchMessages getString ReplaceDialog isRegex fReplaceWithRegex addSelectionListener SelectionAdapter widgetSelected SelectionEvent setContentAssistsEnablement fReplaceWithRegex getSelection
protected Control create Page Area Composite parent Workbench Help set Help parent I Search Help Context Ids REPLACE DIALOG Composite result new Composite parent SWT NULL Grid Layout layout new Grid Layout result set Layout layout layout num Columns 2 layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING initialize Dialog Units result Label label new Label result SWT NONE label set Text Search Messages get String Replace Dialog replace label NON NLS 1 Text clabel new Text result SWT BORDER clabel set Enabled false clabel set Text File Search Query f Page get Input get Query get Search String Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint convert Width In Chars To Pixels 50 clabel set Layout Data gd label new Label result SWT NONE label set Text Search Messages get String Replace Dialog with label NON NLS 1 f Text Field new Text result SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint convert Width In Chars To Pixels 50 f Text Field set Layout Data gd f Text Field set Focus new Label result SWT NONE f Replace With Regex new Button result SWT CHECK f Replace With Regex set Text Search Messages get String Replace Dialog is Regex label NON NLS 1 f Replace With Regex add Selection Listener new Selection Adapter public void widget Selected Selection Event e set Content Assists Enablement f Replace With Regex get Selection if is Regex Query f Replace With Regex set Selection true else f Replace With Regex set Selection false f Replace With Regex set Enabled false f Status Label new Label result SWT NULL gd new Grid Data Grid Data FILL HORIZONTAL gd vertical Alignment SWT BOTTOM gd horizontal Span 2 f Status Label set Layout Data gd set Content Assists Enablement f Replace With Regex get Selection apply Dialog Font result return result  createPageArea WorkbenchHelp setHelp ISearchHelpContextIds REPLACE_DIALOG GridLayout GridLayout setLayout numColumns marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING initializeDialogUnits setText SearchMessages getString ReplaceDialog replace_label setEnabled setText FileSearchQuery fPage getInput getQuery getSearchString GridData GridData GridData FILL_HORIZONTAL widthHint convertWidthInCharsToPixels setLayoutData setText SearchMessages getString ReplaceDialog with_label fTextField GridData GridData FILL_HORIZONTAL widthHint convertWidthInCharsToPixels fTextField setLayoutData fTextField setFocus fReplaceWithRegex fReplaceWithRegex setText SearchMessages getString ReplaceDialog isRegex fReplaceWithRegex addSelectionListener SelectionAdapter widgetSelected SelectionEvent setContentAssistsEnablement fReplaceWithRegex getSelection isRegexQuery fReplaceWithRegex setSelection fReplaceWithRegex setSelection fReplaceWithRegex setEnabled fStatusLabel GridData GridData FILL_HORIZONTAL verticalAlignment horizontalSpan fStatusLabel setLayoutData setContentAssistsEnablement fReplaceWithRegex getSelection applyDialogFont
protected void create Buttons For Button Bar Composite parent f Replace Button create Button parent REPLACE Search Messages get String Replace Dialog replace true NON NLS 1 f Replace All In File Button create Button parent REPLACE ALL IN FILE Search Messages get String Replace Dialog replace All In File false NON NLS 1 Label filler new Label parent SWT NONE filler set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL f Replace All Button create Button parent REPLACE ALL Search Messages get String Replace Dialog replace All false NON NLS 1 f Skip Button create Button parent SKIP Search Messages get String Replace Dialog skip false NON NLS 1 f Skip File Button create Button parent SKIP FILE Search Messages get String Replace Dialog skip File false NON NLS 1 filler new Label parent SWT NONE filler set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL super create Buttons For Button Bar parent Grid Layout parent get Layout num Columns 4  createButtonsForButtonBar fReplaceButton createButton SearchMessages getString ReplaceDialog fReplaceAllInFileButton createButton REPLACE_ALL_IN_FILE SearchMessages getString ReplaceDialog replaceAllInFile setLayoutData GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL fReplaceAllButton createButton REPLACE_ALL SearchMessages getString ReplaceDialog replaceAll fSkipButton createButton SearchMessages getString ReplaceDialog fSkipFileButton createButton SKIP_FILE SearchMessages getString ReplaceDialog skipFile setLayoutData GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL createButtonsForButtonBar GridLayout getLayout numColumns
private void enable Buttons f Skip Button set Enabled has Next Marker f Skip File Button set Enabled has Next File f Replace Button set Enabled can Replace f Replace All In File Button set Enabled can Replace f Replace All Button set Enabled can Replace  enableButtons fSkipButton setEnabled hasNextMarker fSkipFileButton setEnabled hasNextFile fReplaceButton setEnabled canReplace fReplaceAllInFileButton setEnabled canReplace fReplaceAllButton setEnabled canReplace
case REPLACE run new Replace Operation protected void do Replace I Progress Monitor pm throws Bad Location Exception Core Exception replace pm replace Text  ReplaceOperation doReplace IProgressMonitor BadLocationException CoreException replaceText
case REPLACE ALL IN FILE run new Replace Operation protected void do Replace I Progress Monitor pm throws Bad Location Exception Core Exception replace In File pm replace Text  REPLACE_ALL_IN_FILE ReplaceOperation doReplace IProgressMonitor BadLocationException CoreException replaceInFile replaceText
case REPLACE ALL run new Replace Operation protected void do Replace I Progress Monitor pm throws Bad Location Exception Core Exception replace All pm replace Text  REPLACE_ALL ReplaceOperation doReplace IProgressMonitor BadLocationException CoreException replaceAll replaceText
protected void button Pressed int button Id final String replace Text f Text Field get Text status Message false NON NLS 1 try switch button Id case SKIP skip break case SKIP FILE skip File break case REPLACE run new Replace Operation protected void do Replace I Progress Monitor pm throws Bad Location Exception Core Exception replace pm replace Text I Resource get Current Marker get Element goto Current Marker break case REPLACE ALL IN FILE run new Replace Operation protected void do Replace I Progress Monitor pm throws Bad Location Exception Core Exception replace In File pm replace Text I Resource get Current Marker get Element goto Current Marker break case REPLACE ALL run new Replace Operation protected void do Replace I Progress Monitor pm throws Bad Location Exception Core Exception replace All pm replace Text Resources Plugin get Workspace get Root goto Current Marker break default super button Pressed button Id return catch Invocation Target Exception e Throwable target Exception e get Target Exception if target Exception instanceof Pattern Syntax Exception String format Search Messages get String Replace Dialog2 regex Error format NON NLS 1 String message Message Format format format new Object target Exception get Localized Message status Message true message else String message Search Messages get Formatted String Replace Dialog error unable to replace I File get Current Marker get Element get Name NON NLS 1 Exception Handler handle e get Parent Shell get Dialog Title message catch Interrupted Exception e means operation canceled if has Next Marker has Next File can Replace close else enable Buttons  buttonPressed buttonId replaceText fTextField getText statusMessage buttonId SKIP_FILE skipFile ReplaceOperation doReplace IProgressMonitor BadLocationException CoreException replaceText IResource getCurrentMarker getElement gotoCurrentMarker REPLACE_ALL_IN_FILE ReplaceOperation doReplace IProgressMonitor BadLocationException CoreException replaceInFile replaceText IResource getCurrentMarker getElement gotoCurrentMarker REPLACE_ALL ReplaceOperation doReplace IProgressMonitor BadLocationException CoreException replaceAll replaceText ResourcesPlugin getWorkspace getRoot gotoCurrentMarker buttonPressed buttonId InvocationTargetException targetException getTargetException targetException PatternSyntaxException SearchMessages getString ReplaceDialog2 regexError MessageFormat targetException getLocalizedMessage statusMessage SearchMessages getFormattedString ReplaceDialog unable_to_replace IFile getCurrentMarker getElement getName ExceptionHandler getParentShell getDialogTitle InterruptedException hasNextMarker hasNextFile canReplace enableButtons
private void run Replace Operation operation I Resource resource throws Invocation Target Exception Interrupted Exception I Resource Rule Factory rule Factory Resources Plugin get Workspace get Rule Factory I Scheduling Rule rule rule Factory modify Rule resource PlatformUI get Workbench get Progress Service run InUI this operation rule  ReplaceOperation IResource InvocationTargetException InterruptedException IResourceRuleFactory ruleFactory ResourcesPlugin getWorkspace getRuleFactory ISchedulingRule ruleFactory modifyRule getWorkbench getProgressService runInUI
private Match get Current Marker return Match f Markers get 0  getCurrentMarker fMarkers
private void replace I Progress Monitor pm String replacement Text throws Bad Location Exception Core Exception Match marker get Current Marker pm begin Task Search Messages get String Replace Dialog task replace 10 NON NLS 1 replace In File pm I File marker get Element replacement Text new Match marker  IProgressMonitor replacementText BadLocationException CoreException getCurrentMarker beginTask SearchMessages getString ReplaceDialog replaceInFile IFile getElement replacementText
private void replace In File I Progress Monitor pm String replacement Text throws Bad Location Exception Core Exception Match first Marker get Current Marker Match markers collect Markers I File first Marker get Element pm begin Task Search Messages get Formatted String Replace Dialog task replace In File I File first Marker get Element get Full Path toOS String 4 NON NLS 1 replace In File pm I File first Marker get Element replacement Text markers  replaceInFile IProgressMonitor replacementText BadLocationException CoreException firstMarker getCurrentMarker collectMarkers IFile firstMarker getElement beginTask SearchMessages getFormattedString ReplaceDialog replaceInFile IFile firstMarker getElement getFullPath toOSString replaceInFile IFile firstMarker getElement replacementText
private void replace All I Progress Monitor pm String replacement Text throws Bad Location Exception Core Exception int resource Count count Resources pm begin Task Search Messages get String Replace Dialog task replace replace All resource Count NON NLS 1 while f Markers size 0 replace In File new Sub Progress Monitor pm 1 0 replacement Text pm done  replaceAll IProgressMonitor replacementText BadLocationException CoreException resourceCount countResources beginTask SearchMessages getString ReplaceDialog replaceAll resourceCount fMarkers replaceInFile SubProgressMonitor replacementText
private void replace In File final I Progress Monitor pm final I File file final String replacement Text final Match markers throws Bad Location Exception Core Exception if pm is Canceled throw new Operation Canceled Exception do Replace In File pm file replacement Text markers  replaceInFile IProgressMonitor IFile replacementText BadLocationException CoreException isCanceled OperationCanceledException doReplaceInFile replacementText
private void do Replace In File I Progress Monitor pm I File file String replacement Text final Match markers throws Bad Location Exception Core Exception Pattern pattern null if f Replace With Regex get Selection pattern create Replace Pattern try if file is Read Only if f Skip Readonly skip File return int rc ask For Skip file switch rc case CANCEL throw new Operation Canceled Exception case SKIP FILE skip File return case SKIP ALL f Skip Readonly true skip File return I Text File Buffer Manager bm File Buffers get Text File Buffer Manager try bm connect file get Full Path new Sub Progress Monitor pm 1 I Text File Buffer fb bm get Text File Buffer file get Full Path boolean was Dirty fb is Dirty I Document doc fb get Document for int i 0 i markers length i Position Tracker tracker Internal SearchUI get Instance get Position Tracker int offset markers i get Offset int length markers i get Length Position current Position tracker get Current Position markers i if current Position null offset current Position offset length current Position length String original Text doc get offset length String replacement String compute Replacement String pattern original Text replacement Text doc replace offset length replacement String f Markers remove 0 f Page get Input remove Match markers i if was Dirty fb commit new Sub Progress Monitor pm 1 true f Saved true finally bm disconnect file get Full Path new Sub Progress Monitor pm 1 finally pm done  doReplaceInFile IProgressMonitor IFile replacementText BadLocationException CoreException fReplaceWithRegex getSelection createReplacePattern isReadOnly fSkipReadonly skipFile askForSkip OperationCanceledException SKIP_FILE skipFile SKIP_ALL fSkipReadonly skipFile ITextFileBufferManager FileBuffers getTextFileBufferManager getFullPath SubProgressMonitor ITextFileBuffer getTextFileBuffer getFullPath wasDirty isDirty IDocument getDocument PositionTracker InternalSearchUI getInstance getPositionTracker getOffset getLength currentPosition getCurrentPosition currentPosition currentPosition currentPosition originalText replacementString computeReplacementString originalText replacementText replacementString fMarkers fPage getInput removeMatch wasDirty SubProgressMonitor fSaved getFullPath SubProgressMonitor
private Pattern create Replace Pattern File Search Query query File Search Query f Page get Input get Query if query is Case Sensitive return Pattern compile query get Search String Pattern CASE INSENSITIVE else return Pattern compile query get Search String  createReplacePattern FileSearchQuery FileSearchQuery fPage getInput getQuery isCaseSensitive getSearchString CASE_INSENSITIVE getSearchString
private String compute Replacement String Pattern pattern String original Text String replacement Text if pattern null try return pattern matcher original Text replace First replacement Text catch Index Out Of Bounds Exception ex throw new Pattern Syntax Exception ex get Localized Message replacement Text 1 return replacement Text  computeReplacementString originalText replacementText originalText replaceFirst replacementText IndexOutOfBoundsException PatternSyntaxException getLocalizedMessage replacementText replacementText
private int ask For Skip final I File file String message Search Messages get Formatted String Read Only Dialog message file get Full Path toOS String NON NLS 1 String button Labels null boolean show Skip count Resources 1 if show Skip String skip Label Search Messages get String Read Only Dialog skip File NON NLS 1 String skip All Label Search Messages get String Read Only Dialog skip All NON NLS 1 button Labels new String skip Label skip All Label I Dialog Constants CANCEL LABEL else button Labels new String I Dialog Constants CANCEL LABEL Message Dialog msd new Message Dialog get Shell get Shell get Text null message Message Dialog ERROR button Labels 0 int rc msd open switch rc case 0 return show Skip SKIP FILE CANCEL case 1 return SKIP ALL default return CANCEL  askForSkip IFile SearchMessages getFormattedString ReadOnlyDialog getFullPath toOSString buttonLabels showSkip countResources showSkip skipLabel SearchMessages getString ReadOnlyDialog skipFile skipAllLabel SearchMessages getString ReadOnlyDialog skipAll buttonLabels skipLabel skipAllLabel IDialogConstants CANCEL_LABEL buttonLabels IDialogConstants CANCEL_LABEL MessageDialog MessageDialog getShell getShell getText MessageDialog buttonLabels showSkip SKIP_FILE SKIP_ALL
private String get Dialog Title return Search Messages get String Replace Dialog dialog title NON NLS 1  getDialogTitle SearchMessages getString ReplaceDialog
private void skip f Markers remove 0 Assert is True f Markers size 0 goto Current Marker  fMarkers isTrue fMarkers gotoCurrentMarker
private void skip File Match current Marker get Current Marker if current Marker null return I Resource current File I Resource current Marker get Element while f Markers size 0 get Current Marker get Element equals current File f Markers remove 0 goto Current Marker  skipFile currentMarker getCurrentMarker currentMarker IResource currentFile IResource currentMarker getElement fMarkers getCurrentMarker getElement currentFile fMarkers gotoCurrentMarker
private void goto Current Marker if f Markers size 0 Match marker get Current Marker Control focus Control get Shell get Display get Focus Control try select Entry marker I Text Editor editor null if New SearchUI reuse Editor editor open Editor Reuse marker else editor open Editor No Reuse marker Position p Internal SearchUI get Instance get Position Tracker get Current Position marker if p null editor select And Reveal p get Offset p get Length else editor select And Reveal marker get Offset marker get Length if focus Control null focus Control is Disposed focus Control set Focus catch Part Init Exception e String message Search Messages get Formatted String Replace Dialog error unable to open text editor I File marker get Element get Name NON NLS 1 Message Dialog open Error get Parent Shell get Dialog Title message  gotoCurrentMarker fMarkers getCurrentMarker focusControl getShell getDisplay getFocusControl selectEntry ITextEditor NewSearchUI reuseEditor openEditorReuse openEditorNoReuse InternalSearchUI getInstance getPositionTracker getCurrentPosition selectAndReveal getOffset getLength selectAndReveal getOffset getLength focusControl focusControl isDisposed focusControl setFocus PartInitException SearchMessages getFormattedString ReplaceDialog unable_to_open_text_editor IFile getElement getName MessageDialog openError getParentShell getDialogTitle
private void select Entry Match marker I Selection sel f Page get Viewer get Selection if sel instanceof I Structured Selection return I Structured Selection ss I Structured Selection sel I File file I File marker get Element if ss size 1 file equals ss get First Element return f Page get Viewer set Selection new Structured Selection marker get Element  selectEntry ISelection fPage getViewer getSelection IStructuredSelection IStructuredSelection IStructuredSelection IFile IFile getElement getFirstElement fPage getViewer setSelection StructuredSelection getElement
opening editors private I Text Editor open Editor No Reuse Match marker throws Part Init Exception I File file I File marker get Element I Workbench Page active Page Search Plugin get Active Page if active Page null return null I Text Editor text Editor show Open Text Editor active Page file if text Editor null return text Editor return open New Text Editor file active Page  ITextEditor openEditorNoReuse PartInitException IFile IFile getElement IWorkbenchPage activePage SearchPlugin getActivePage activePage ITextEditor textEditor showOpenTextEditor activePage textEditor textEditor openNewTextEditor activePage
private I Text Editor open New Text Editor I File file I Workbench Page active Page throws Part Init Exception I Editor Descriptor desc IDE get Default Editor file if desc null String editorID desc get Id I Editor Part editor if desc is Internal editor active Page open Editor new File Editor Input file editorID if editor instanceof I Text Editor if editor instanceof I Reusable Editor f Editor I Reusable Editor editor return I Text Editor editor else active Page close Editor editor false I Editor Part editor active Page open Editor new File Editor Input file org eclipse ui Default Text Editor NON NLS 1 return I Text Editor editor  ITextEditor openNewTextEditor IFile IWorkbenchPage activePage PartInitException IEditorDescriptor getDefaultEditor getId IEditorPart isInternal activePage openEditor FileEditorInput ITextEditor IReusableEditor fEditor IReusableEditor ITextEditor activePage closeEditor IEditorPart activePage openEditor FileEditorInput DefaultTextEditor ITextEditor
private I Text Editor open Editor Reuse Match marker throws Part Init Exception I Workbench Page page Search Plugin get Active Page I File file I File marker get Element if page null return null I Text Editor text Editor show Open Text Editor page file if text Editor null return text Editor String editor Id null I Editor Descriptor desc IDE get Default Editor file if desc null desc is Internal editor Id desc get Id boolean is Open is Editor Open page f Editor boolean can Be Reused is Open f Editor is Dirty is Pinned f Editor boolean shows Same Input Type f Editor null editor Id null f Editor get Site get Id equals editor Id if can Be Reused if shows Same Input Type f Editor set Input new File Editor Input file page bring To Top f Editor return I Text Editor f Editor else page close Editor f Editor false f Editor null return open New Text Editor file page  ITextEditor openEditorReuse PartInitException IWorkbenchPage SearchPlugin getActivePage IFile IFile getElement ITextEditor textEditor showOpenTextEditor textEditor textEditor editorId IEditorDescriptor getDefaultEditor isInternal editorId getId isOpen isEditorOpen fEditor canBeReused isOpen fEditor isDirty isPinned fEditor showsSameInputType fEditor editorId fEditor getSite getId editorId canBeReused showsSameInputType fEditor setInput FileEditorInput bringToTop fEditor ITextEditor fEditor closeEditor fEditor fEditor openNewTextEditor
private boolean is Editor Open I Workbench Page page I Editor Part editor if editor null I Editor Reference parts page get Editor References int i 0 for int j 0 j parts length j if editor parts i get Editor false return true return false  isEditorOpen IWorkbenchPage IEditorPart IEditorReference getEditorReferences getEditor
private I Text Editor show Open Text Editor I Workbench Page page I File file I Editor Part editor page find Editor new File Editor Input file if editor instanceof I Text Editor page bring To Top editor return I Text Editor editor return null  ITextEditor showOpenTextEditor IWorkbenchPage IFile IEditorPart findEditor FileEditorInput ITextEditor bringToTop ITextEditor
private boolean is Pinned I Editor Part editor if editor null return false I Editor Reference editor Refs editor get Editor Site get Page get Editor References int i 0 while i editor Refs length if editor equals editor Refs i get Editor false return editor Refs i is Pinned i return false  isPinned IEditorPart IEditorReference editorRefs getEditorSite getPage getEditorReferences editorRefs editorRefs getEditor editorRefs isPinned
resource related return the number of resources referred to in f Markers private int count Resources I Resource r null int count 0 for Iterator elements f Markers iterator elements has Next Match element Match elements next if element get Element equals r count r I Resource element get Element return count  fMarkers countResources IResource fMarkers hasNext getElement IResource getElement
private Match collect Markers I File resource List matching new Array List for int i 0 i f Markers size i Match marker Match f Markers get i if resource equals marker get Element break matching add marker Match markers new Match matching size return Match matching to Array markers  collectMarkers IFile ArrayList fMarkers fMarkers getElement toArray
some queries private boolean has Next Marker return f Markers size 1  hasNextMarker fMarkers
private boolean has Next File if has Next Marker return false I Resource current File I Resource get Current Marker get Element for int i 0 i f Markers size i if Match f Markers get i get Element equals current File return true return false  hasNextFile hasNextMarker IResource currentFile IResource getCurrentMarker getElement fMarkers fMarkers getElement currentFile
private boolean can Replace return f Markers size 0  canReplace fMarkers
see org eclipse jface text I Information Control Creator create Information Control org eclipse swt widgets Shell public I Information Control create Information Control Shell parent return new Default Information Control parent  IInformationControlCreator createInformationControl IInformationControl createInformationControl DefaultInformationControl
public static Subject Control Content Assistant create Content Assistant Array List proposal Keys final Subject Control Content Assistant content Assistant new Subject Control Content Assistant content Assistant set Restore Completion Proposal Size Search Plugin get Default get Dialog Settings NON NLS 1 I Content Assist Processor processor new Reg Ex Content Assist Processor proposal Keys content Assistant set Content Assist Processor processor I Document DEFAULT CONTENT TYPE content Assistant set Context Information Popup Orientation I Content Assistant CONTEXT INFO ABOVE content Assistant set Information Control Creator new I Information Control Creator see org eclipse jface text I Information Control Creator create Information Control org eclipse swt widgets Shell public I Information Control create Information Control Shell parent return new Default Information Control parent return content Assistant  SubjectControlContentAssistant createContentAssistant ArrayList proposalKeys SubjectControlContentAssistant contentAssistant SubjectControlContentAssistant contentAssistant setRestoreCompletionProposalSize SearchPlugin getDefault getDialogSettings IContentAssistProcessor RegExContentAssistProcessor proposalKeys contentAssistant setContentAssistProcessor IDocument DEFAULT_CONTENT_TYPE contentAssistant setContextInformationPopupOrientation IContentAssistant CONTEXT_INFO_ABOVE contentAssistant setInformationControlCreator IInformationControlCreator IInformationControlCreator createInformationControl IInformationControl createInformationControl DefaultInformationControl contentAssistant
private void set Content Assists Enablement boolean enable if enable if f Replace Content Assist Handler null f Replace Content Assist Handler Content Assist Handler create Handler For Text f Text Field create Content Assistant Reg Ex Content Assist Processor fg Replace Proposal Keys f Replace Content Assist Handler set Enabled true else if f Replace Content Assist Handler null return f Replace Content Assist Handler set Enabled false  setContentAssistsEnablement fReplaceContentAssistHandler fReplaceContentAssistHandler ContentAssistHandler createHandlerForText fTextField createContentAssistant RegExContentAssistProcessor fgReplaceProposalKeys fReplaceContentAssistHandler setEnabled fReplaceContentAssistHandler fReplaceContentAssistHandler setEnabled
private void status Message boolean error String message f Status Label set Text message if error f Status Label set Foreground J Face Colors get Error Text f Status Label get Display else f Status Label set Foreground null if error get Shell get Display beep  statusMessage fStatusLabel setText fStatusLabel setForeground JFaceColors getErrorText fStatusLabel getDisplay fStatusLabel setForeground getShell getDisplay

public int compare Viewer viewer Object e1 Object e2 String name1 null String name2 null if e1 instanceof I Search Result View Entry name1 I Search Result View Entry e1 get Resource get Name if e2 instanceof I Search Result View Entry name2 I Search Result View Entry e2 get Resource get Name if name1 null name1 NON NLS 1 if name2 null name2 NON NLS 1 return get Collator compare name1 name2  ISearchResultViewEntry ISearchResultViewEntry getResource getName ISearchResultViewEntry ISearchResultViewEntry getResource getName getCollator
Overrides method from Viewer Sorter public boolean is Sorter Property Object element String property return true  ViewerSorter isSorterProperty
public void sort Viewer viewer Object elements Set label provider to show resource path I Search Result View view SearchUI get Search Result View if view null I Label Provider label Provider view get Label Provider if label Provider instanceof File Label Provider File Label Provider label Provider set Order File Label Provider SHOW LABEL PATH super sort viewer elements  ISearchResultView getSearchResultView ILabelProvider labelProvider getLabelProvider labelProvider FileLabelProvider FileLabelProvider labelProvider setOrder FileLabelProvider SHOW_LABEL_PATH

public int compare Viewer viewer Object e1 Object e2 String name1 null String name2 null if e1 instanceof I Search Result View Entry name1 I Search Result View Entry e1 get Resource get Full Path to String if e2 instanceof I Search Result View Entry name2 I Search Result View Entry e2 get Resource get Full Path to String if name1 null name1 NON NLS 1 if name2 null name2 NON NLS 1 return get Collator compare name1 name2  ISearchResultViewEntry ISearchResultViewEntry getResource getFullPath toString ISearchResultViewEntry ISearchResultViewEntry getResource getFullPath toString getCollator
Overrides method from Viewer Sorter public boolean is Sorter Property Object element String property return true  ViewerSorter isSorterProperty
public void sort Viewer viewer Object elements Set label provider to show resource path I Search Result View view SearchUI get Search Result View if view null I Label Provider label Provider view get Label Provider if label Provider instanceof File Label Provider File Label Provider label Provider set Order File Label Provider SHOW PATH LABEL super sort viewer elements  ISearchResultView getSearchResultView ILabelProvider labelProvider getLabelProvider labelProvider FileLabelProvider FileLabelProvider labelProvider setOrder FileLabelProvider SHOW_PATH_LABEL

public Image get Image Object element if f Label Provider null return f Label Provider get Image element return null  getImage fLabelProvider fLabelProvider getImage
public String get Text Object element if f Label Provider null return f Label Provider get Text element return null  getText fLabelProvider fLabelProvider getText
Search Again Confirmation Dialog Shell shell I Label Provider label Provider List out Of Sync List out Of Date super shell f Out Of Sync out Of Sync f Out Of Date out Of Date f Label Provider label Provider set Shell Style get Shell Style SWT RESIZE  SearchAgainConfirmationDialog ILabelProvider labelProvider outOfSync outOfDate fOutOfSync outOfSync fOutOfDate outOfDate fLabelProvider labelProvider setShellStyle getShellStyle
protected Control create Dialog Area Composite parent Composite result Composite super create Dialog Area parent if f Out Of Sync size 0 create Label result Search Messages get String Search Again Confirmation Dialog outofsync message NON NLS 1 create Label result Search Messages get String Search Again Confirmation Dialog outofsync label NON NLS 1 create Table Viewer f Out Of Sync result else create Label result Search Messages get String Search Again Confirmation Dialog stale message NON NLS 1 create Label result Search Messages get String Search Again Confirmation Dialog stale label NON NLS 1 create Table Viewer f Out Of Date result return result  createDialogArea createDialogArea fOutOfSync createLabel SearchMessages getString SearchAgainConfirmationDialog createLabel SearchMessages getString SearchAgainConfirmationDialog createTableViewer fOutOfSync createLabel SearchMessages getString SearchAgainConfirmationDialog createLabel SearchMessages getString SearchAgainConfirmationDialog createTableViewer fOutOfDate
private void create Label Composite parent String text Label message new Label parent SWT WRAP Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd width Hint convert Width In Chars To Pixels 40 message set Layout Data gd message set Text text  createLabel GridData GridData GridData FILL_HORIZONTAL widthHint convertWidthInCharsToPixels setLayoutData setText
private Table Viewer create Table Viewer List input Composite result Table Viewer viewer new Table Viewer result viewer set Content Provider new List Content Provider viewer set Label Provider new Proxy Label Provider viewer set Input input Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint convert Width In Chars To Pixels 40 gd height Hint convert Height In Chars To Pixels 5 viewer get Control set Layout Data gd return viewer  TableViewer createTableViewer TableViewer TableViewer setContentProvider ListContentProvider setLabelProvider ProxyLabelProvider setInput GridData GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels heightHint convertHeightInCharsToPixels getControl setLayoutData
protected void configure Shell Shell shell super configure Shell shell shell set Text Search Messages get String Search Again Confirmation Dialog title NON NLS 1  configureShell configureShell setText SearchMessages getString SearchAgainConfirmationDialog

public Search Result Updater File Search Result result f Result result New SearchUI add Query Listener this Resources Plugin get Workspace add Resource Change Listener this  SearchResultUpdater FileSearchResult fResult NewSearchUI addQueryListener ResourcesPlugin getWorkspace addResourceChangeListener
public void resource Changed I Resource Change Event event I Resource Delta delta event get Delta if delta null handle Delta delta  resourceChanged IResourceChangeEvent IResourceDelta getDelta handleDelta
delta accept new I Resource Delta Visitor public boolean visit I Resource Delta delta throws Core Exception switch delta get Kind case I Resource Delta ADDED return false case I Resource Delta REMOVED I Resource res delta get Resource if res instanceof I File Match matches f Result get Matches res f Result remove Matches matches break case I Resource Delta CHANGED handle changed resource break return true  IResourceDeltaVisitor IResourceDelta CoreException getKind IResourceDelta IResourceDelta IResource getResource IFile fResult getMatches fResult removeMatches IResourceDelta
private void handle Delta I Resource Delta delta try delta accept new I Resource Delta Visitor public boolean visit I Resource Delta delta throws Core Exception switch delta get Kind case I Resource Delta ADDED return false case I Resource Delta REMOVED I Resource res delta get Resource if res instanceof I File Match matches f Result get Matches res f Result remove Matches matches break case I Resource Delta CHANGED handle changed resource break return true catch Core Exception e Search Plugin get Default get Log log e get Status  handleDelta IResourceDelta IResourceDeltaVisitor IResourceDelta CoreException getKind IResourceDelta IResourceDelta IResource getResource IFile fResult getMatches fResult removeMatches IResourceDelta CoreException SearchPlugin getDefault getLog getStatus
public void query Added I Search Query query don t care  queryAdded ISearchQuery
public void query Removed I Search Query query if f Result equals query get Search Result Resources Plugin get Workspace remove Resource Change Listener this New SearchUI remove Query Listener this  queryRemoved ISearchQuery fResult getSearchResult ResourcesPlugin getWorkspace removeResourceChangeListener NewSearchUI removeQueryListener
public void query Starting I Search Query query don t care  queryStarting ISearchQuery
public void query Finished I Search Query query don t care  queryFinished ISearchQuery

public Sort Action String label File Search Page page int sort Order super label f Page page f Sort Order sort Order  SortAction FileSearchPage sortOrder fPage fSortOrder sortOrder
public void run f Page set Sort Order f Sort Order  fPage setSortOrder fSortOrder
public int get Sort Order return f Sort Order  getSortOrder fSortOrder

public Text Search Action Group I View Part part Assert is Not Null part I Workbench Part Site site part get Site f Selection Provider site get Selection Provider f Page site get Page f Open Properties Dialog new Property Dialog Action site get Shell f Selection Provider I Selection selection f Selection Provider get Selection if selection instanceof I Structured Selection f Open Properties Dialog selection Changed I Structured Selection selection else f Open Properties Dialog selection Changed selection  TextSearchActionGroup IViewPart isNotNull IWorkbenchPartSite getSite fSelectionProvider getSelectionProvider fPage getPage fOpenPropertiesDialog PropertyDialogAction getShell fSelectionProvider ISelection fSelectionProvider getSelection IStructuredSelection fOpenPropertiesDialog selectionChanged IStructuredSelection fOpenPropertiesDialog selectionChanged
public void fill Context Menu I Menu Manager menu if is Text Search return view must exist if we create a context menu for it I Search Result View view SearchUI get Search Result View I Structured Selection selection null if get Context get Selection instanceof I Structured Selection selection I Structured Selection get Context get Selection else selection Structured Selection EMPTY add Open With Menu menu selection Replace Action replace All new Replace Action view get Site get Search Result Entries if replace All is Enabled menu append To Group I Context Menu Constants GROUP REORGANIZE replace All Replace Action replace Selected new Replace Action view get Site selection if replace Selected is Enabled menu append To Group I Context Menu Constants GROUP REORGANIZE replace Selected if f Open Properties Dialog null f Open Properties Dialog is Enabled selection null f Open Properties Dialog is Applicable For Selection selection menu append To Group I Context Menu Constants GROUP PROPERTIES f Open Properties Dialog  fillContextMenu IMenuManager isTextSearch ISearchResultView getSearchResultView IStructuredSelection getContext getSelection IStructuredSelection IStructuredSelection getContext getSelection StructuredSelection addOpenWithMenu ReplaceAction replaceAll ReplaceAction getSite getSearchResultEntries replaceAll isEnabled appendToGroup IContextMenuConstants GROUP_REORGANIZE replaceAll ReplaceAction replaceSelected ReplaceAction getSite replaceSelected isEnabled appendToGroup IContextMenuConstants GROUP_REORGANIZE replaceSelected fOpenPropertiesDialog fOpenPropertiesDialog isEnabled fOpenPropertiesDialog isApplicableForSelection appendToGroup IContextMenuConstants GROUP_PROPERTIES fOpenPropertiesDialog
private List get Search Result Entries Search Result View view Search Result View Search Plugin get Search Result View we can assume we have a view how else would we be called Search Result Viewer viewer view get Viewer Table table viewer get Table Table Item items table get Items List elements new Array List items length for int i 0 i items length i elements add items i get Data return elements  getSearchResultEntries SearchResultView SearchResultView SearchPlugin getSearchResultView SearchResultViewer getViewer getTable TableItem getItems ArrayList getData
private boolean is Text Search I Runnable With Progress operation Search Manager get Default get Current Search get Operation if operation instanceof Text Search Operation String pattern Text Search Operation operation get Pattern return pattern null pattern length 0 return false  isTextSearch IRunnableWithProgress SearchManager getDefault getCurrentSearch getOperation TextSearchOperation TextSearchOperation getPattern
private void add Open With Menu I Menu Manager menu I Structured Selection selection if selection null selection size 1 return Object o selection get First Element if o instanceof I Search Result View Entry return Object resource I Search Result View Entry o get Resource if resource instanceof I File return Create menu I Menu Manager submenu new Menu Manager Search Messages get String Open With Menu label NON NLS 1 submenu add new Open With Menu f Page I File resource Add the submenu menu append To Group I Context Menu Constants GROUP OPEN submenu  addOpenWithMenu IMenuManager IStructuredSelection getFirstElement ISearchResultViewEntry ISearchResultViewEntry getResource IFile IMenuManager MenuManager SearchMessages getString OpenWithMenu OpenWithMenu fPage IFile appendToGroup IContextMenuConstants GROUP_OPEN
Method declared in Action Group public void fill Action Bars I Action Bars action Bar super fill Action Bars action Bar set Global Action Handlers action Bar  ActionGroup fillActionBars IActionBars actionBar fillActionBars actionBar setGlobalActionHandlers actionBar
private void set Global Action Handlers I Action Bars action Bars action Bars set Global Action Handler Action Factory PROPERTIES get Id f Open Properties Dialog  setGlobalActionHandlers IActionBars actionBars actionBars setGlobalActionHandler ActionFactory getId fOpenPropertiesDialog

Creates a new text search operation public Text Search Operation I Workspace workspace String pattern boolean is Case Sensitive boolean is Regex Search I Search Scope scope Text Search Result Collector collector super null Assert is Not Null collector f Workspace workspace f Match Locator new Match Locator pattern is Case Sensitive is Regex Search f Scope scope f Collector collector f Collector set Operation this  TextSearchOperation IWorkspace isCaseSensitive isRegexSearch ISearchScope TextSearchResultCollector isNotNull fWorkspace fMatchLocator MatchLocator isCaseSensitive isRegexSearch fScope fCollector fCollector setOperation
The actual algorithm protected void execute I Progress Monitor monitor f Collector set Progress Monitor monitor Text Search Engine engine new Text Search Engine f Status engine search f Workspace f Scope false f Collector f Match Locator  IProgressMonitor fCollector setProgressMonitor TextSearchEngine TextSearchEngine fStatus fWorkspace fScope fCollector fMatchLocator
void search In File I File file I Text Search Result Collector collector Text Search Engine engine new Text Search Engine Text Search Scope scope new Text Search Scope NON NLS 1 scope add file scope add Extension NON NLS 1 f Status engine search f Workspace scope false collector f Match Locator  searchInFile IFile ITextSearchResultCollector TextSearchEngine TextSearchEngine TextSearchScope TextSearchScope addExtension fStatus fWorkspace fMatchLocator
String get Singular Label String pattern f Match Locator get Pattern if pattern null pattern length 1 return Search Messages get Formatted String File Search Operation singular Label Postfix new String f Scope get Description NON NLS 1 else return Search Messages get Formatted String Text Search Operation singular Label Postfix new String f Match Locator get Pattern f Scope get Description NON NLS 1  getSingularLabel fMatchLocator getPattern SearchMessages getFormattedString FileSearchOperation singularLabelPostfix fScope getDescription SearchMessages getFormattedString TextSearchOperation singularLabelPostfix fMatchLocator getPattern fScope getDescription
String get Plural Label Pattern String pattern f Match Locator get Pattern if pattern null pattern length 1 return Search Messages get Formatted String File Search Operation plural Label Pattern Postfix new String 0 f Scope get Description NON NLS 2 NON NLS 1 else return Search Messages get Formatted String Text Search Operation plural Label Pattern Postfix new String f Match Locator get Pattern 0 f Scope get Description NON NLS 2 NON NLS 1  getPluralLabelPattern fMatchLocator getPattern SearchMessages getFormattedString FileSearchOperation pluralLabelPatternPostfix fScope getDescription SearchMessages getFormattedString TextSearchOperation pluralLabelPatternPostfix fMatchLocator getPattern fScope getDescription
Image Descriptor get Image Descriptor return Search Plugin Images DESC OBJ TSEARCH DPDN  ImageDescriptor getImageDescriptor SearchPluginImages DESC_OBJ_TSEARCH_DPDN
I Status get Status return f Status  IStatus getStatus fStatus
String get Pattern return f Match Locator get Pattern  getPattern fMatchLocator getPattern

public Search Pattern Data String text Pattern boolean ignore Case boolean is Reg Ex Search Set file Name Patterns int scope I Working Set working Sets this ignore Case ignore Case this is Reg Ex Search is Reg Ex Search this text Pattern text Pattern this file Name Patterns file Name Patterns this scope scope this working Sets working Sets  SearchPatternData textPattern ignoreCase isRegExSearch fileNamePatterns IWorkingSet workingSets ignoreCase ignoreCase isRegExSearch isRegExSearch textPattern textPattern fileNamePatterns fileNamePatterns workingSets workingSets
public boolean perform Action if Search Plugin use New Search return perform New Search false else return perform Old Search  performAction SearchPlugin useNewSearch performNewSearch performOldSearch
private boolean perform Old Search Text Search Operation op create Text Search Operation return run Operation op  performOldSearch TextSearchOperation createTextSearchOperation runOperation
private boolean run Operation final Text Search Operation op try get Runnable Context run true true op catch Invocation Target Exception ex if ex get Target Exception instanceof Pattern Syntax Exception show Reg Ex Syntax Error Pattern Syntax Exception ex get Target Exception else Exception Handler handle ex Search Messages get String Search Error search title Search Messages get String Search Error search message NON NLS 2 NON NLS 1 return false catch Interrupted Exception e return false I Status status op get Status if status null status isOK String title Search Messages get String Search Problems title NON NLS 1 Error Dialog open Error get Shell title null status NON NLS 1 return false return true  runOperation TextSearchOperation getRunnableContext InvocationTargetException getTargetException PatternSyntaxException showRegExSyntaxError PatternSyntaxException getTargetException ExceptionHandler SearchMessages getString SearchMessages getString InterruptedException IStatus getStatus SearchMessages getString ErrorDialog openError getShell
private I Runnable Context get Runnable Context I Runnable Context context null context get Container get Runnable Context Shell shell f Pattern get Shell if context null context new Progress Monitor Dialog shell return context  IRunnableContext getRunnableContext IRunnableContext getContainer getRunnableContext fPattern getShell ProgressMonitorDialog
private Text Search Operation create Text Search Operation Search Pattern Data pattern Data get Pattern Data if pattern Data file Name Patterns null f Extensions get Text length 0 pattern Data file Name Patterns new Hash Set 1 pattern Data file Name Patterns add NON NLS 1 Setup search scope Text Search Scope scope null switch get Container get Selected Scope case I Search Page Container WORKSPACE SCOPE scope Text Search Scope new Workspace Scope break case I Search Page Container SELECTION SCOPE scope get Selected Resources Scope false break case I Search Page Container SELECTED PROJECTS SCOPE scope get Selected Resources Scope true break case I Search Page Container WORKING SET SCOPE I Working Set working Sets get Container get Selected Working Sets String desc Search Messages get Formatted String Working Set Scope Scope Part to String working Sets NON NLS 1 scope new Text Search Scope desc working Sets scope add Extensions pattern Data file Name Patterns SearchUI activate Search Result View Text Search Result Collector collector new Text Search Result Collector final Text Search Operation op new Text Search Operation Search Plugin get Workspace pattern Data text Pattern File Search Query is Case Sensitive get Search Options File Search Query is Regex Search get Search Options scope collector return op  TextSearchOperation createTextSearchOperation SearchPatternData patternData getPatternData patternData fileNamePatterns fExtensions getText patternData fileNamePatterns HashSet patternData fileNamePatterns TextSearchScope getContainer getSelectedScope ISearchPageContainer WORKSPACE_SCOPE TextSearchScope newWorkspaceScope ISearchPageContainer SELECTION_SCOPE getSelectedResourcesScope ISearchPageContainer SELECTED_PROJECTS_SCOPE getSelectedResourcesScope ISearchPageContainer WORKING_SET_SCOPE IWorkingSet workingSets getContainer getSelectedWorkingSets SearchMessages getFormattedString WorkingSetScope ScopePart toString workingSets TextSearchScope workingSets addExtensions patternData fileNamePatterns activateSearchResultView TextSearchResultCollector TextSearchResultCollector TextSearchOperation TextSearchOperation SearchPlugin getWorkspace patternData textPattern FileSearchQuery isCaseSensitive getSearchOptions FileSearchQuery isRegexSearch getSearchOptions
Display get Current async Exec new Runnable public void run I Search Result View Part view New SearchUI activate Search Result View if view null I Search Result Page page view get Active Page if page instanceof File Search Page File Search Page file Page File Search Page page Object elements file Page get Input get Elements I File files new I File elements length System arraycopy elements 0 files 0 files length new Replace Action2 file Page files run  getCurrent asyncExec ISearchResultViewPart NewSearchUI activateSearchResultView ISearchResultPage getActivePage FileSearchPage FileSearchPage filePage FileSearchPage filePage getInput getElements IFile IFile ReplaceAction2 filePage
Display get Current async Exec new Runnable public void run Search Result View view Search Result View Search Plugin get Search Result View new Replace Dialog Search Plugin get Search Result View get View Site get Shell List view get Viewer get Input op open  getCurrent asyncExec SearchResultView SearchResultView SearchPlugin getSearchResultView ReplaceDialog SearchPlugin getSearchResultView getViewSite getShell getViewer getInput
public boolean perform Replace if Search Plugin use New Search if perform New Search true return false Display get Current async Exec new Runnable public void run I Search Result View Part view New SearchUI activate Search Result View if view null I Search Result Page page view get Active Page if page instanceof File Search Page File Search Page file Page File Search Page page Object elements file Page get Input get Elements I File files new I File elements length System arraycopy elements 0 files 0 files length new Replace Action2 file Page files run else final Text Search Operation op create Text Search Operation if run Operation op return false Display get Current async Exec new Runnable public void run Search Result View view Search Result View Search Plugin get Search Result View new Replace Dialog Search Plugin get Search Result View get View Site get Shell List view get Viewer get Input op open return true  performReplace SearchPlugin useNewSearch performNewSearch getCurrent asyncExec ISearchResultViewPart NewSearchUI activateSearchResultView ISearchResultPage getActivePage FileSearchPage FileSearchPage filePage FileSearchPage filePage getInput getElements IFile IFile ReplaceAction2 filePage TextSearchOperation createTextSearchOperation runOperation getCurrent asyncExec SearchResultView SearchResultView SearchPlugin getSearchResultView ReplaceDialog SearchPlugin getSearchResultView getViewSite getShell getViewer getInput
private boolean perform New Search boolean forground Search Pattern Data pattern Data get Pattern Data if pattern Data file Name Patterns null f Extensions get Text length 0 pattern Data file Name Patterns new Hash Set 1 pattern Data file Name Patterns add NON NLS 1 Setup search scope Text Search Scope scope null switch get Container get Selected Scope case I Search Page Container WORKSPACE SCOPE scope Text Search Scope new Workspace Scope break case I Search Page Container SELECTION SCOPE scope get Selected Resources Scope false break case I Search Page Container SELECTED PROJECTS SCOPE scope get Selected Resources Scope true break case I Search Page Container WORKING SET SCOPE I Working Set working Sets get Container get Selected Working Sets String desc Search Messages get Formatted String Working Set Scope Scope Part to String working Sets NON NLS 1 scope new Text Search Scope desc working Sets org eclipse search ui New SearchUI activate Search Result View scope add Extensions pattern Data file Name Patterns File Search Query ws Job new File Search Query scope get Search Options pattern Data text Pattern f Search Derived if forground I Status status New SearchUI run Query In Foreground get Runnable Context ws Job return status null status isOK else New SearchUI run Query ws Job return true  performNewSearch SearchPatternData patternData getPatternData patternData fileNamePatterns fExtensions getText patternData fileNamePatterns HashSet patternData fileNamePatterns TextSearchScope getContainer getSelectedScope ISearchPageContainer WORKSPACE_SCOPE TextSearchScope newWorkspaceScope ISearchPageContainer SELECTION_SCOPE getSelectedResourcesScope ISearchPageContainer SELECTED_PROJECTS_SCOPE getSelectedResourcesScope ISearchPageContainer WORKING_SET_SCOPE IWorkingSet workingSets getContainer getSelectedWorkingSets SearchMessages getFormattedString WorkingSetScope ScopePart toString workingSets TextSearchScope workingSets NewSearchUI activateSearchResultView addExtensions patternData fileNamePatterns FileSearchQuery wsJob FileSearchQuery getSearchOptions patternData textPattern fSearchDerived IStatus NewSearchUI runQueryInForeground getRunnableContext wsJob NewSearchUI runQuery wsJob
private void show Reg Ex Syntax Error Pattern Syntax Exception ex String title Search Messages get String Search Page regular Expression Syntax Problem title NON NLS 1 Message Dialog open Information get Shell title ex get Localized Message  showRegExSyntaxError PatternSyntaxException SearchMessages getString SearchPage regularExpressionSyntaxProblem MessageDialog openInformation getShell getLocalizedMessage
private String get Pattern return f Pattern get Text  getPattern fPattern getText
Return search pattern data and update previous searches An existing entry will be updated private Search Pattern Data get Pattern Data Search Pattern Data match null String text Pattern f Pattern get Text int i fg Previous Search Patterns size 1 while i 0 match Search Pattern Data fg Previous Search Patterns get i if text Pattern equals match text Pattern break i if i 0 match ignore Case ignore Case match is Reg Ex Search f Is Reg Ex Checkbox get Selection match text Pattern get Pattern match file Name Patterns get Extensions match scope get Container get Selected Scope match working Sets get Container get Selected Working Sets remove will be added last see below fg Previous Search Patterns remove match else match new Search Pattern Data get Pattern ignore Case f Is Reg Ex Checkbox get Selection get Extensions get Container get Selected Scope get Container get Selected Working Sets fg Previous Search Patterns add match return match  SearchPatternData getPatternData SearchPatternData textPattern fPattern getText fgPreviousSearchPatterns SearchPatternData fgPreviousSearchPatterns textPattern textPattern ignoreCase ignoreCase isRegExSearch fIsRegExCheckbox getSelection textPattern getPattern fileNamePatterns getExtensions getContainer getSelectedScope workingSets getContainer getSelectedWorkingSets fgPreviousSearchPatterns SearchPatternData getPattern ignoreCase fIsRegExCheckbox getSelection getExtensions getContainer getSelectedScope getContainer getSelectedWorkingSets fgPreviousSearchPatterns
private String get Previous Extensions List extensions new Array List fg Previous Search Patterns size for int i fg Previous Search Patterns size 1 i 0 i Search Pattern Data data Search Pattern Data fg Previous Search Patterns get i String text File Type Editor types To String data file Name Patterns if extensions contains text extensions add text return String extensions to Array new String extensions size  getPreviousExtensions ArrayList fgPreviousSearchPatterns fgPreviousSearchPatterns SearchPatternData SearchPatternData fgPreviousSearchPatterns FileTypeEditor typesToString fileNamePatterns toArray
private String get Previous Search Patterns int size fg Previous Search Patterns size String patterns new String size for int i 0 i size i patterns i Search Pattern Data fg Previous Search Patterns get size 1 i text Pattern return patterns  getPreviousSearchPatterns fgPreviousSearchPatterns SearchPatternData fgPreviousSearchPatterns textPattern
private String get Search Options String Buffer result new String Buffer if ignore Case result append i NON NLS 1 if f Is Reg Ex Search result append r NON NLS 1 return result to String  getSearchOptions StringBuffer StringBuffer ignoreCase fIsRegExSearch toString
private Set get Extensions return f File Type Editor get File Types  getExtensions fFileTypeEditor getFileTypes
private boolean ignore Case return f Ignore Case get Selection  ignoreCase fIgnoreCase getSelection
public void set Visible boolean visible if visible f Pattern null if f First Time f First Time false Set item and text here to prevent page from resizing f Pattern set Items get Previous Search Patterns f Extensions set Items get Previous Extensions initialize Pattern Control f Pattern set Focus get Container set Perform Action Enabled get Container has Valid Scope super set Visible visible  setVisible fPattern fFirstTime fFirstTime fPattern setItems getPreviousSearchPatterns fExtensions setItems getPreviousExtensions initializePatternControl fPattern setFocus getContainer setPerformActionEnabled getContainer hasValidScope setVisible
add some listeners for regex syntax checking f Pattern add Modify Listener new Modify Listener public void modify Text Modify Event e check Regex  fPattern addModifyListener ModifyListener modifyText ModifyEvent checkRegex
Creates the page s content public void create Control Composite parent initialize Dialog Units parent read Configuration Grid Data gd Composite result new Composite parent SWT NONE Grid Layout layout new Grid Layout 3 false layout horizontal Spacing 10 result set Layout layout result set Layout Data new Grid Data Grid Data FILL HORIZONTAL Row Layouter layouter new Row Layouter layout num Columns gd new Grid Data gd horizontal Alignment Grid Data FILL gd vertical Alignment Grid Data VERTICAL ALIGN BEGINNING Grid Data VERTICAL ALIGN FILL layouter set Default Grid Data gd 0 layouter set Default Grid Data gd 1 layouter set Default Grid Data gd 2 layouter set Default Span layouter perform create Text Search Composite result Vertical filler Label filler new Label result SWT LEFT gd new Grid Data Grid Data BEGINNING Grid Data VERTICAL ALIGN FILL gd height Hint convert Height In Chars To Pixels 1 3 filler set Layout Data gd layouter perform new Control filler 3 layouter perform create File Name Pattern Composite result set Control result Dialog apply Dialog Font result Workbench Help set Help result I Search Help Context Ids TEXT SEARCH PAGE add some listeners for regex syntax checking f Pattern add Modify Listener new Modify Listener public void modify Text Modify Event e check Regex  createControl initializeDialogUnits readConfiguration GridData GridLayout GridLayout horizontalSpacing setLayout setLayoutData GridData GridData FILL_HORIZONTAL RowLayouter RowLayouter numColumns GridData horizontalAlignment GridData verticalAlignment GridData VERTICAL_ALIGN_BEGINNING GridData VERTICAL_ALIGN_FILL setDefaultGridData setDefaultGridData setDefaultGridData setDefaultSpan createTextSearchComposite GridData GridData GridData VERTICAL_ALIGN_FILL heightHint convertHeightInCharsToPixels setLayoutData createFileNamePatternComposite setControl applyDialogFont WorkbenchHelp setHelp ISearchHelpContextIds TEXT_SEARCH_PAGE fPattern addModifyListener ModifyListener modifyText ModifyEvent checkRegex
private void check Regex if f Is Reg Ex Checkbox get Selection try Pattern compile f Pattern get Text catch Pattern Syntax Exception e status Message true e get Localized Message get Container set Perform Action Enabled false return status Message false NON NLS 1 else status Message false Search Messages get String Search Page containing Text hint NON NLS 1 get Container set Perform Action Enabled true  checkRegex fIsRegExCheckbox getSelection fPattern getText PatternSyntaxException statusMessage getLocalizedMessage getContainer setPerformActionEnabled statusMessage statusMessage SearchMessages getString SearchPage containingText getContainer setPerformActionEnabled
f Pattern set Items get Previous Search Patterns f Pattern add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Widget Selected  fPattern setItems getPreviousSearchPatterns fPattern addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleWidgetSelected
f Ignore Case set Selection f Is Case Sensitive f Ignore Case add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Is Case Sensitive f Ignore Case get Selection write Configuration  fIgnoreCase setSelection fIsCaseSensitive fIgnoreCase addSelectionListener SelectionAdapter widgetSelected SelectionEvent fIsCaseSensitive fIgnoreCase getSelection writeConfiguration
f Is Reg Ex Checkbox add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Is Reg Ex Search f Is Reg Ex Checkbox get Selection check Regex write Configuration set Content Assists Enablement f Is Reg Ex Search  fIsRegExCheckbox addSelectionListener SelectionAdapter widgetSelected SelectionEvent fIsRegExSearch fIsRegExCheckbox getSelection checkRegex writeConfiguration setContentAssistsEnablement fIsRegExSearch
private Control create Text Search Composite Composite group Grid Data gd Label label Info text label new Label group SWT LEFT label set Text Search Messages get String Search Page containing Text text NON NLS 1 gd new Grid Data Grid Data BEGINNING gd horizontal Span 3 label set Layout Data gd Pattern combo f Pattern new Combo group SWT SINGLE SWT BORDER Not done here to prevent page from resizing f Pattern set Items get Previous Search Patterns f Pattern add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Widget Selected gd new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL gd horizontal Span 2 f Pattern set Layout Data gd f Ignore Case new Button group SWT CHECK f Ignore Case set Text Search Messages get String Search Page case Sensitive NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING f Ignore Case set Layout Data gd f Ignore Case set Selection f Is Case Sensitive f Ignore Case add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Is Case Sensitive f Ignore Case get Selection write Configuration Text line which explains the special characters f Status Label new Label group SWT LEFT gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 f Status Label set Layout Data gd Reg Ex checkbox f Is Reg Ex Checkbox new Button group SWT CHECK f Is Reg Ex Checkbox set Text Search Messages get String Search Page regular Expression NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING f Is Reg Ex Checkbox set Layout Data gd f Is Reg Ex Checkbox set Selection f Is Reg Ex Search set Content Assists Enablement f Is Reg Ex Search f Is Reg Ex Checkbox add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Is Reg Ex Search f Is Reg Ex Checkbox get Selection check Regex write Configuration set Content Assists Enablement f Is Reg Ex Search return group  createTextSearchComposite GridData setText SearchMessages getString SearchPage containingText GridData GridData horizontalSpan setLayoutData fPattern fPattern setItems getPreviousSearchPatterns fPattern addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleWidgetSelected GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL horizontalSpan fPattern setLayoutData fIgnoreCase fIgnoreCase setText SearchMessages getString SearchPage caseSensitive GridData GridData HORIZONTAL_ALIGN_BEGINNING fIgnoreCase setLayoutData fIgnoreCase setSelection fIsCaseSensitive fIgnoreCase addSelectionListener SelectionAdapter widgetSelected SelectionEvent fIsCaseSensitive fIgnoreCase getSelection writeConfiguration fStatusLabel GridData GridData FILL_HORIZONTAL horizontalSpan fStatusLabel setLayoutData RegEx fIsRegExCheckbox fIsRegExCheckbox setText SearchMessages getString SearchPage regularExpression GridData GridData HORIZONTAL_ALIGN_BEGINNING fIsRegExCheckbox setLayoutData fIsRegExCheckbox setSelection fIsRegExSearch setContentAssistsEnablement fIsRegExSearch fIsRegExCheckbox addSelectionListener SelectionAdapter widgetSelected SelectionEvent fIsRegExSearch fIsRegExCheckbox getSelection checkRegex writeConfiguration setContentAssistsEnablement fIsRegExSearch
private void handle Widget Selected if f Pattern get Selection Index 0 return int index fg Previous Search Patterns size 1 f Pattern get Selection Index Search Pattern Data pattern Data Search Pattern Data fg Previous Search Patterns get index if pattern Data null f Pattern get Text equals pattern Data text Pattern return f Ignore Case set Selection pattern Data ignore Case f Is Reg Ex Checkbox set Selection pattern Data is Reg Ex Search f Pattern set Text pattern Data text Pattern f File Type Editor set File Types pattern Data file Name Patterns if pattern Data working Sets null get Container set Selected Working Sets pattern Data working Sets else get Container set Selected Scope pattern Data scope  handleWidgetSelected fPattern getSelectionIndex fgPreviousSearchPatterns fPattern getSelectionIndex SearchPatternData patternData SearchPatternData fgPreviousSearchPatterns patternData fPattern getText patternData textPattern fIgnoreCase setSelection patternData ignoreCase fIsRegExCheckbox setSelection patternData isRegExSearch fPattern setText patternData textPattern fFileTypeEditor setFileTypes patternData fileNamePatterns patternData workingSets getContainer setSelectedWorkingSets patternData workingSets getContainer setSelectedScope patternData
private void initialize Pattern Control I Selection selection get Selection String text NON NLS 1 String extension null if selection instanceof I Text Selection I Text Selection text Selection I Text Selection get Selection text text Selection get Text else I Resource resource null Object item null if selection instanceof I Structured Selection item I Structured Selection selection get First Element if item instanceof I Resource resource I Resource item text resource get Name else if item instanceof I Search Result View Entry I Marker marker I Search Result View Entry item get Selected Marker resource marker get Resource try text String marker get Attribute SearchUI LINE catch Core Exception ex Exception Handler handle ex Search Messages get String Search Error marker Attribute Access title Search Messages get String Search Error marker Attribute Access message NON NLS 2 NON NLS 1 text NON NLS 1 else if item instanceof I Adaptable Object adapter I Adaptable item get Adapter I Workbench Adapter class if adapter instanceof I Workbench Adapter text I Workbench Adapter adapter get Label item adapter I Adaptable item get Adapter I Resource class if adapter instanceof I Resource resource I Resource adapter if text null keep text if provided by workbench adapter text resource get Name if resource instanceof I File extension resource get File Extension if extension null extension resource get Name else extension extension NON NLS 1 else extension NON NLS 1 f Pattern set Text insert Escape Chars text if get Previous Extensions length 0 f Extensions set Text get Previous Extensions 0 else if extension null extension get Extension From Editor if extension null f Extensions set Text extension  initializePatternControl ISelection getSelection ITextSelection ITextSelection textSelection ITextSelection getSelection textSelection getText IResource IStructuredSelection IStructuredSelection getFirstElement IResource IResource getName ISearchResultViewEntry IMarker ISearchResultViewEntry getSelectedMarker getResource getAttribute CoreException ExceptionHandler SearchMessages getString markerAttributeAccess SearchMessages getString markerAttributeAccess IAdaptable IAdaptable getAdapter IWorkbenchAdapter IWorkbenchAdapter IWorkbenchAdapter getLabel IAdaptable getAdapter IResource IResource IResource getName IFile getFileExtension getName fPattern setText insertEscapeChars getPreviousExtensions fExtensions setText getPreviousExtensions getExtensionFromEditor fExtensions setText
private String insert Escape Chars String text if text null text equals NON NLS 1 return NON NLS 1 String Buffer sb In new String Buffer text Buffered Reader reader new Buffered Reader new String Reader text int length Of First Line 0 try length Of First Line reader read Line length catch IO Exception ex return NON NLS 1 String Buffer sb Out new String Buffer length Of First Line 5 int i 0 while i length Of First Line char ch sb In char At i if ch ch ch sb Out append NON NLS 1 sb Out append ch i i 1 return sb Out to String  insertEscapeChars StringBuffer sbIn StringBuffer BufferedReader BufferedReader StringReader lengthOfFirstLine lengthOfFirstLine readLine IOException StringBuffer sbOut StringBuffer lengthOfFirstLine lengthOfFirstLine sbIn charAt sbOut sbOut sbOut toString
private String get Extension From Editor I Editor Part ep Search Plugin get Active Page get Active Editor if ep null Object elem ep get Editor Input if elem instanceof I File Editor Input String extension I File Editor Input elem get File get File Extension if extension null return I File Editor Input elem get File get Name else return extension NON NLS 1 return null  getExtensionFromEditor IEditorPart SearchPlugin getActivePage getActiveEditor getEditorInput IFileEditorInput IFileEditorInput getFile getFileExtension IFileEditorInput getFile getName
f Extensions new Combo group SWT SINGLE SWT BORDER f Extensions add Modify Listener new Modify Listener public void modify Text Modify Event e get Container set Perform Action Enabled get Container has Valid Scope  fExtensions fExtensions addModifyListener ModifyListener modifyText ModifyEvent getContainer setPerformActionEnabled getContainer hasValidScope
f Search Derived Checkbox set Selection f Search Derived f Search Derived Checkbox add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Search Derived f Search Derived Checkbox get Selection write Configuration  fSearchDerivedCheckbox setSelection fSearchDerived fSearchDerivedCheckbox addSelectionListener SelectionAdapter widgetSelected SelectionEvent fSearchDerived fSearchDerivedCheckbox getSelection writeConfiguration
private Control create File Name Pattern Composite Composite group Grid Data gd Line with label combo and button Label label new Label group SWT LEFT label set Text Search Messages get String Search Page file Name Patterns text NON NLS 1 gd new Grid Data Grid Data BEGINNING gd horizontal Span 3 label set Layout Data gd f Extensions new Combo group SWT SINGLE SWT BORDER f Extensions add Modify Listener new Modify Listener public void modify Text Modify Event e get Container set Perform Action Enabled get Container has Valid Scope gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 f Extensions set Layout Data gd Button button new Button group SWT PUSH button set Text Search Messages get String Search Page browse NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN END button set Layout Data gd SWT Util set Button Dimension Hint button f File Type Editor new File Type Editor Search Plugin get Default get Workbench get Editor Registry f Extensions button Text line which explains the special characters label new Label group SWT LEFT label set Text Search Messages get String Search Page file Name Patterns hint NON NLS 1 gd new Grid Data Grid Data BEGINNING gd horizontal Span 3 label set Layout Data gd f Search Derived Checkbox new Button group SWT CHECK gd new Grid Data Grid Data BEGINNING f Search Derived Checkbox set Layout Data gd f Search Derived Checkbox set Text Search Messages get String Text Search Page search Derived label NON NLS 1 f Search Derived Checkbox set Selection f Search Derived f Search Derived Checkbox add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Search Derived f Search Derived Checkbox get Selection write Configuration return group  createFileNamePatternComposite GridData setText SearchMessages getString SearchPage fileNamePatterns GridData GridData horizontalSpan setLayoutData fExtensions fExtensions addModifyListener ModifyListener modifyText ModifyEvent getContainer setPerformActionEnabled getContainer hasValidScope GridData GridData FILL_HORIZONTAL horizontalSpan fExtensions setLayoutData setText SearchMessages getString SearchPage GridData GridData HORIZONTAL_ALIGN_END setLayoutData SWTUtil setButtonDimensionHint fFileTypeEditor FileTypeEditor SearchPlugin getDefault getWorkbench getEditorRegistry fExtensions setText SearchMessages getString SearchPage fileNamePatterns GridData GridData horizontalSpan setLayoutData fSearchDerivedCheckbox GridData GridData fSearchDerivedCheckbox setLayoutData fSearchDerivedCheckbox setText SearchMessages getString TextSearchPage searchDerived fSearchDerivedCheckbox setSelection fSearchDerived fSearchDerivedCheckbox addSelectionListener SelectionAdapter widgetSelected SelectionEvent fSearchDerived fSearchDerivedCheckbox getSelection writeConfiguration
public boolean is Valid return true  isValid
Sets the search page s container public void set Container I Search Page Container container f Container container  setContainer ISearchPageContainer fContainer
Returns the search page s container private I Search Page Container get Container return f Container  ISearchPageContainer getContainer fContainer
Returns the current active selection private I Selection get Selection return f Container get Selection  ISelection getSelection fContainer getSelection
private Text Search Scope get Selected Resources Scope boolean is Project Scope Text Search Scope scope new Text Search Scope Search Messages get String Selection Scope NON NLS 1 int element Count 0 I Project first Project null if get Selection instanceof I Structured Selection get Selection is Empty Iterator iter I Structured Selection get Selection iterator while iter has Next Object selection iter next Unpack search result entry if selection instanceof I Search Result View Entry selection I Search Result View Entry selection get Group By Key I Resource resource null if selection instanceof I Resource resource I Resource selection else if selection instanceof I Adaptable if is Project Scope resource I Project I Adaptable selection get Adapter I Project class if resource null resource I Resource I Adaptable selection get Adapter I Resource class if resource null if is Project Scope resource resource get Project if resource null is Project Scope scope encloses resource continue if first Project null first Project I Project resource element Count scope add resource else if is Project Scope I Project editor Project get Editor Project if editor Project null scope add editor Project if is Project Scope if element Count 1 scope set Description Search Messages get Formatted String Enclosing Projects Scope first Project get Name NON NLS 1 else if element Count 1 scope set Description Search Messages get Formatted String Enclosing Project Scope first Project get Name NON NLS 1 else scope set Description Search Messages get Formatted String Enclosing Project Scope NON NLS 1 NON NLS 2 return scope  TextSearchScope getSelectedResourcesScope isProjectScope TextSearchScope TextSearchScope SearchMessages getString SelectionScope elementCount IProject firstProject getSelection IStructuredSelection getSelection isEmpty IStructuredSelection getSelection hasNext ISearchResultViewEntry ISearchResultViewEntry getGroupByKey IResource IResource IResource IAdaptable isProjectScope IProject IAdaptable getAdapter IProject IResource IAdaptable getAdapter IResource isProjectScope getProject isProjectScope firstProject firstProject IProject elementCount isProjectScope IProject editorProject getEditorProject editorProject editorProject isProjectScope elementCount setDescription SearchMessages getFormattedString EnclosingProjectsScope firstProject getName elementCount setDescription SearchMessages getFormattedString EnclosingProjectScope firstProject getName setDescription SearchMessages getFormattedString EnclosingProjectScope
private I Project get Editor Project I Workbench Part active Part Search Plugin get Active Page get Active Part if active Part instanceof I Editor Part I Editor Part editor I Editor Part active Part I Editor Input input editor get Editor Input if input instanceof I File Editor Input return I File Editor Input input get File get Project return null  IProject getEditorProject IWorkbenchPart activePart SearchPlugin getActivePage getActivePart activePart IEditorPart IEditorPart IEditorPart activePart IEditorInput getEditorInput IFileEditorInput IFileEditorInput getFile getProject
Returns the page settings for this Text search page return the page settings to be used private I Dialog Settings get Dialog Settings I Dialog Settings settings Search Plugin get Default get Dialog Settings f Dialog Settings settings get Section PAGE NAME if f Dialog Settings null f Dialog Settings settings add New Section PAGE NAME return f Dialog Settings  IDialogSettings getDialogSettings IDialogSettings SearchPlugin getDefault getDialogSettings fDialogSettings getSection PAGE_NAME fDialogSettings fDialogSettings addNewSection PAGE_NAME fDialogSettings
Initializes itself from the stored page settings private void read Configuration I Dialog Settings s get Dialog Settings f Is Case Sensitive s get Boolean STORE CASE SENSITIVE f Is Reg Ex Search s get Boolean STORE IS REG EX SEARCH f Search Derived s get Boolean STORE SEARCH DERIVED  readConfiguration IDialogSettings getDialogSettings fIsCaseSensitive getBoolean STORE_CASE_SENSITIVE fIsRegExSearch getBoolean STORE_IS_REG_EX_SEARCH fSearchDerived getBoolean STORE_SEARCH_DERIVED
Stores it current configuration in the dialog store private void write Configuration I Dialog Settings s get Dialog Settings s put STORE CASE SENSITIVE f Is Case Sensitive s put STORE IS REG EX SEARCH f Is Reg Ex Search s put STORE SEARCH DERIVED f Search Derived  writeConfiguration IDialogSettings getDialogSettings STORE_CASE_SENSITIVE fIsCaseSensitive STORE_IS_REG_EX_SEARCH fIsRegExSearch STORE_SEARCH_DERIVED fSearchDerived
private void set Content Assists Enablement boolean enable if enable if f Replace Content Assist Handler null f Replace Content Assist Handler Content Assist Handler create Handler For Combo f Pattern Replace Dialog2 create Content Assistant Reg Ex Content Assist Processor fg Find Proposal Keys f Replace Content Assist Handler set Enabled true else if f Replace Content Assist Handler null return f Replace Content Assist Handler set Enabled false  setContentAssistsEnablement fReplaceContentAssistHandler fReplaceContentAssistHandler ContentAssistHandler createHandlerForCombo fPattern ReplaceDialog2 createContentAssistant RegExContentAssistProcessor fgFindProposalKeys fReplaceContentAssistHandler setEnabled fReplaceContentAssistHandler fReplaceContentAssistHandler setEnabled
private void status Message boolean error String message f Status Label set Text message if error f Status Label set Foreground J Face Colors get Error Text f Status Label get Display else f Status Label set Foreground null  statusMessage fStatusLabel setText fStatusLabel setForeground JFaceColors getErrorText fStatusLabel getDisplay fStatusLabel setForeground

private static class Text Search Action Group Factory implements I Action Group Factory public Action Group create Action Group I Search Result View part return new Text Search Action Group part  TextSearchActionGroupFactory IActionGroupFactory ActionGroup createActionGroup ISearchResultView TextSearchActionGroup
Returns the progress monitor used to setup and report progress public I Progress Monitor get Progress Monitor return f Monitor  IProgressMonitor getProgressMonitor fMonitor
void set Progress Monitor I Progress Monitor pm f Monitor pm  setProgressMonitor IProgressMonitor fMonitor
Called before the actual search starts public void about To Start throws Core Exception f View SearchUI get Search Result View f Match Count 0 f Last Update Time 0 if f View null f View search Started new Text Search Action Group Factory f Operation get Singular Label f Operation get Plural Label Pattern f Operation get Image Descriptor Text Search Page EXTENSION POINT ID new File Label Provider File Label Provider SHOW LABEL PATH new Goto Marker Action new Group By Key Computer f Operation  aboutToStart CoreException fView getSearchResultView fMatchCount fLastUpdateTime fView fView searchStarted TextSearchActionGroupFactory fOperation getSingularLabel fOperation getPluralLabelPattern fOperation getImageDescriptor TextSearchPage EXTENSION_POINT_ID FileLabelProvider FileLabelProvider SHOW_LABEL_PATH GotoMarkerAction GroupByKeyComputer fOperation
Accepts the given search result public void accept final I Resource Proxy proxy String line int start int length final int line Number throws Core Exception I Resource resource proxy request Resource I Marker marker resource create Marker SearchUI SEARCH MARKER Hash Map attributes new Hash Map 4 attributes put SearchUI LINE line attributes put I Marker CHAR START new Integer start attributes put I Marker CHAR END new Integer start length attributes put I Marker LINE NUMBER new Integer line Number marker set Attributes attributes String description resource get Full Path last Segment if description null description NON NLS 1 f View add Match description resource resource marker f Match Count if get Progress Monitor is Canceled System current Time Millis f Last Update Time 1000 get Progress Monitor sub Task get Formatted Matches String f Match Count f Last Update Time System current Time Millis  IResourceProxy lineNumber CoreException IResource requestResource IMarker createMarker SEARCH_MARKER HashMap HashMap IMarker CHAR_START IMarker CHAR_END IMarker LINE_NUMBER lineNumber setAttributes getFullPath lastSegment fView addMatch fMatchCount getProgressMonitor isCanceled currentTimeMillis fLastUpdateTime getProgressMonitor subTask getFormattedMatchesString fMatchCount fLastUpdateTime currentTimeMillis
Called when the search has ended public void done if get Progress Monitor is Canceled String matches String get Formatted Matches String f Match Count get Progress Monitor set Task Name Message Format format DONE new String matches String if f View null f View search Finished Cut no longer unused references because the collector might be re used f View null f Monitor null  getProgressMonitor isCanceled matchesString getFormattedMatchesString fMatchCount getProgressMonitor setTaskName MessageFormat matchesString fView fView searchFinished fView fMonitor
void set Operation Text Search Operation operation f Operation operation  setOperation TextSearchOperation fOperation
private String get Formatted Matches String int count if f Match Count 1 return MATCH f Message Format Args 0 new Integer count return Message Format format MATCHES f Message Format Args  getFormattedMatchesString fMatchCount fMessageFormatArgs MessageFormat fMessageFormatArgs

public Combo Field Editor String name String label Text String entry Names And Values Composite parent init name label Text Assert is True check Array entry Names And Values f Entry Names And Values entry Names And Values create Control parent  ComboFieldEditor labelText entryNamesAndValues labelText isTrue checkArray entryNamesAndValues fEntryNamesAndValues entryNamesAndValues createControl
Checks whether given code String code is of type code String 2 code return code true code if it is ok and code false code otherwise private boolean check Array String table if table null return false for int i 0 i table length i String array table i if array null array length 2 return false return true  checkArray
protected void adjust For Num Columns int num Columns Control control get Label Control if control null Grid Data control get Layout Data horizontal Span num Columns Grid Data f Combo get Layout Data horizontal Span num Columns  adjustForNumColumns numColumns getLabelControl GridData getLayoutData horizontalSpan numColumns GridData fCombo getLayoutData horizontalSpan numColumns
protected void do Fill Into Grid Composite parent int num Columns Control control get Label Control parent Grid Data gd new Grid Data gd horizontal Span num Columns control set Layout Data gd control get Combo Box Control parent gd new Grid Data gd horizontal Span num Columns control set Layout Data gd  doFillIntoGrid numColumns getLabelControl GridData GridData horizontalSpan numColumns setLayoutData getComboBoxControl GridData horizontalSpan numColumns setLayoutData
see Field Editor do Load protected void do Load update Combo For Value get Preference Store get String get Preference Name  FieldEditor doLoad doLoad updateComboForValue getPreferenceStore getString getPreferenceName
see Field Editor do Load Default protected void do Load Default update Combo For Value get Preference Store get Default String get Preference Name  FieldEditor doLoadDefault doLoadDefault updateComboForValue getPreferenceStore getDefaultString getPreferenceName
protected void do Store if f Value null get Preference Store set To Default get Preference Name return get Preference Store set Value get Preference Name f Value  doStore fValue getPreferenceStore setToDefault getPreferenceName getPreferenceStore setValue getPreferenceName fValue
see Field Editor get Number Of Controls public int get Number Of Controls return 2  FieldEditor getNumberOfControls getNumberOfControls
f Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event evt String old Value f Value String name f Combo get Text f Value get Value For Name name set Presents Default Value false fire Value Changed VALUE old Value f Value  fCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent oldValue fValue fCombo getText fValue getValueForName setPresentsDefaultValue fireValueChanged oldValue fValue
Lazily create and return the Combo control public Combo get Combo Box Control Composite parent if f Combo null f Combo new Combo parent SWT READ ONLY for int i 0 i f Entry Names And Values length i f Combo add f Entry Names And Values i 0 i f Combo set Font parent get Font f Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event evt String old Value f Value String name f Combo get Text f Value get Value For Name name set Presents Default Value false fire Value Changed VALUE old Value f Value return f Combo  getComboBoxControl fCombo fCombo READ_ONLY fEntryNamesAndValues fCombo fEntryNamesAndValues fCombo setFont getFont fCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent oldValue fValue fCombo getText fValue getValueForName setPresentsDefaultValue fireValueChanged oldValue fValue fCombo
Given the name label of an entry return the corresponding value protected String get Value For Name String name for int i 0 i f Entry Names And Values length i String entry f Entry Names And Values i if name equals entry 0 return entry 1 return f Entry Names And Values 0 0  getValueForName fEntryNamesAndValues fEntryNamesAndValues fEntryNamesAndValues
Set the name in the combo widget to match the specified value protected void update Combo For Value String value f Value value for int i 0 i f Entry Names And Values length i if value equals f Entry Names And Values i 1 f Combo set Text f Entry Names And Values i 0 return if f Entry Names And Values length 0 f Value f Entry Names And Values 0 1 f Combo set Text f Entry Names And Values 0 0  updateComboForValue fValue fEntryNamesAndValues fEntryNamesAndValues fCombo setText fEntryNamesAndValues fEntryNamesAndValues fValue fEntryNamesAndValues fCombo setText fEntryNamesAndValues

Logs the given exception using the platform s logging mechanism The exception is logged as an error with the error code code Java Status Constants INTERNAL ERROR code public static void log Throwable t String message Search Plugin log new Status I Status ERROR New SearchUI PLUGIN ID I Status ERROR message t  JavaStatusConstants INTERNAL_ERROR SearchPlugin IStatus NewSearchUI PLUGIN_ID IStatus
Handles the given code Core Exception code The workbench shell is used as a parent for the dialog window param e the code Core Exception code to be handled param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Core Exception e String title String message handle e Search Plugin get Active Workbench Shell title message  CoreException CoreException CoreException SearchPlugin getActiveWorkbenchShell
Handles the given code Core Exception code param e the code Core Exception code to be handled param parent the dialog window s parent shell param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Core Exception e Shell parent String title String message fg Instance perform e parent title message  CoreException CoreException CoreException fgInstance
Handles the given code Invocation Target Exception code The workbench shell is used as a parent for the dialog window param e the code Invocation Target Exception code to be handled param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Invocation Target Exception e String title String message handle e Search Plugin get Active Workbench Shell title message  InvocationTargetException InvocationTargetException InvocationTargetException SearchPlugin getActiveWorkbenchShell
Handles the given code Invocation Target Exception code param e the code Invocation Target Exception code to be handled param parent the dialog window s parent shell param title the dialog window s window title param message message to be displayed by the dialog window public static void handle Invocation Target Exception e Shell parent String title String message fg Instance perform e parent title message  InvocationTargetException InvocationTargetException InvocationTargetException fgInstance
protected void perform Core Exception e Shell shell String title String message Search Plugin log e I Status status e get Status if status null Error Dialog open Error shell title message status else display Message Dialog e e get Message shell title message  CoreException SearchPlugin IStatus getStatus ErrorDialog openError displayMessageDialog getMessage
protected void perform Invocation Target Exception e Shell shell String title String message Throwable target e get Target Exception if target instanceof Core Exception perform Core Exception target shell title message else Search Plugin log e if e get Message null e get Message length 0 display Message Dialog e e get Message shell title message else display Message Dialog e target get Message shell title message  InvocationTargetException getTargetException CoreException CoreException SearchPlugin getMessage getMessage displayMessageDialog getMessage displayMessageDialog getMessage
Helper methods public static void display Message Dialog Throwable t Shell shell String title String message fg Instance display Message Dialog t t get Message shell title message  displayMessageDialog fgInstance displayMessageDialog getMessage
public static void display Message Dialog Throwable t String title String message display Message Dialog t Search Plugin get Active Workbench Shell title message  displayMessageDialog displayMessageDialog SearchPlugin getActiveWorkbenchShell
private void display Message Dialog Throwable t String exception Message Shell shell String title String message String Writer msg new String Writer if message null msg write message msg write n n NON NLS 1 if exception Message null exception Message length 0 msg write Search Messages get String Exception Dialog see Error Log Message NON NLS 1 else msg write exception Message Message Dialog open Error shell title msg to String  displayMessageDialog exceptionMessage StringWriter StringWriter exceptionMessage exceptionMessage SearchMessages getString ExceptionDialog seeErrorLogMessage exceptionMessage MessageDialog openError toString

public Extended Dialog Window Shell shell super shell f Action Buttons new Hash Set  ExtendedDialogWindow fActionButtons HashSet
Hook called when the user has pressed the button to perform the dialog s action If the method returns code false code the dialog stays open Otherwise the dialog is going to be closed protected boolean perform Action int button Id return true  performAction buttonId
Hook called when the user has pressed the button to cancel the dialog If the method returns code false code the dialog stays open Otherwise the dialog is going to be closed protected boolean perform Cancel return true  performCancel
UI creation Create the page area protected abstract Control create Page Area Composite parent  createPageArea
Add buttons to the dialog s button bar Subclasses may override param parent the button bar composite protected void create Buttons For Button Bar Composite parent f Cancel Button create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar fCancelButton createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
protected Button create Action Button Composite parent int id String label boolean default Button Button action Button create Button parent id label default Button f Action Buttons add action Button return action Button  createActionButton defaultButton actionButton createButton defaultButton fActionButtons actionButton actionButton
Creates the layout of the extended dialog window protected Control create Dialog Area Composite parent Composite result new Composite parent SWT NULL Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 layout horizontal Spacing 0 layout vertical Spacing 0 result set Layout layout result set Layout Data new Grid Data Grid Data FILL BOTH f Contents create Page Area result f Contents set Layout Data new Grid Data Grid Data FILL BOTH Insert a progress monitor Grid Layout pmlayout new Grid Layout pmlayout num Columns 1 f Progress Monitor Part new Progress Monitor Part result pmlayout SWT DEFAULT Grid Data gd new Grid Data Grid Data FILL HORIZONTAL f Progress Monitor Part set Layout Data gd f Progress Monitor Part set Visible false Label separator new Label result SWT SEPARATOR SWT HORIZONTAL gd new Grid Data Grid Data FILL HORIZONTAL separator set Layout Data gd apply Dialog Font result return result  createDialogArea GridLayout GridLayout marginWidth marginHeight horizontalSpacing verticalSpacing setLayout setLayoutData GridData GridData FILL_BOTH fContents createPageArea fContents setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout numColumns fProgressMonitorPart ProgressMonitorPart GridData GridData GridData FILL_HORIZONTAL fProgressMonitorPart setLayoutData fProgressMonitorPart setVisible GridData GridData FILL_HORIZONTAL setLayoutData applyDialogFont
protected void button Pressed int button Id switch button Id case I Dialog Constants CANCEL ID if f Active Running Operations 0 close break default if perform Action button Id close  buttonPressed buttonId buttonId IDialogConstants CANCEL_ID fActiveRunningOperations performAction buttonId
Set the enable state of the perform action button public void set Perform Action Enabled boolean state for Iterator buttons f Action Buttons iterator buttons has Next Button element Button buttons next element set Enabled state  setPerformActionEnabled fActionButtons hasNext setEnabled
Runs the given code I Runnable With Progress code with the progress monitor for this wizard dialog param fork if true it is run in a separate thread param cancelable specifies whether to enable the cancel button or not param runnable the runnable to run public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception The operation can only be canceled if it is executed in a separate thread Otherwise the UI is blocked anyway Object state null try f Active Running Operations state about To Start fork cancelable Modal Context run runnable fork get Progress Monitor get Shell get Display finally if state null stopped state f Active Running Operations  IRunnableWithProgress IRunnableWithProgress InvocationTargetException InterruptedException fActiveRunningOperations aboutToStart ModalContext getProgressMonitor getShell getDisplay fActiveRunningOperations
Returns the progress monitor If the wizard dialog doesn t have a progress monitor code null code is returned protected I Progress Monitor get Progress Monitor return f Progress Monitor Part  IProgressMonitor getProgressMonitor fProgressMonitorPart
About to start a long running operation tiggered through the wizard So show the progress monitor and disable the wizard return The saved UI state protected synchronized Object about To Start boolean enable Cancel Button Hash Map saved State null Shell shell get Shell if shell null Display d shell get Display Save focus control Control focus Control d get Focus Control if focus Control null focus Control get Shell shell focus Control null Set the busy cursor to all shells f Wait Cursor new Cursor d SWT CURSOR WAIT set Display Cursor d f Wait Cursor Set the arrow cursor to the cancel component f Arrow Cursor new Cursor d SWT CURSOR ARROW f Cancel Button set Cursor f Arrow Cursor Deactivate shell saved State saveUI State enable Cancel Button if focus Control null saved State put FOCUS CONTROL focus Control Attach the progress monitor part to the cancel button f Progress Monitor Part attach To Cancel Component f Cancel Button f Progress Monitor Part set Visible true return saved State  aboutToStart enableCancelButton HashMap savedState getShell getDisplay focusControl getFocusControl focusControl focusControl getShell focusControl fWaitCursor CURSOR_WAIT setDisplayCursor fWaitCursor fArrowCursor CURSOR_ARROW fCancelButton setCursor fArrowCursor savedState saveUIState enableCancelButton focusControl savedState FOCUS_CONTROL focusControl fProgressMonitorPart attachToCancelComponent fCancelButton fProgressMonitorPart setVisible savedState
A long running operation triggered through the wizard was stopped either by user input or by normal end param saved State The save State returned by code about To Start code see about To Start boolean protected synchronized void stopped Object saved State Assert is True saved State instanceof Hash Map Shell shell get Shell if shell null f Progress Monitor Part set Visible false f Progress Monitor Part remove From Cancel Component f Cancel Button Hash Map state Hash Map saved State restoreUI State state set Display Cursor shell get Display null f Cancel Button set Cursor null f Wait Cursor dispose f Wait Cursor null f Arrow Cursor dispose f Arrow Cursor null Control focus Control Control state get FOCUS CONTROL if focus Control null focus Control is Disposed focus Control set Focus  savedState saveState aboutToStart aboutToStart savedState isTrue savedState HashMap getShell fProgressMonitorPart setVisible fProgressMonitorPart removeFromCancelComponent fCancelButton HashMap HashMap savedState restoreUIState setDisplayCursor getDisplay fCancelButton setCursor fWaitCursor fWaitCursor fArrowCursor fArrowCursor focusControl FOCUS_CONTROL focusControl focusControl isDisposed focusControl setFocus
private void set Display Cursor Display d Cursor c Shell shells d get Shells for int i 0 i shells length i shells i set Cursor c  setDisplayCursor getShells setCursor
private void restoreUI State Hash Map state restore Enable State f Cancel Button state NON NLS 1 for Iterator action Buttons f Action Buttons iterator action Buttons has Next Button button Button action Buttons next restore Enable State button state Control Enable State page State Control Enable State state get tab Form NON NLS 1 page State restore  restoreUIState HashMap restoreEnableState fCancelButton actionButtons fActionButtons actionButtons hasNext actionButtons restoreEnableState ControlEnableState pageState ControlEnableState tabForm pageState
Restores the enable state of the given control private protected void restore Enable State Control w Hash Map h if w is Disposed Boolean b Boolean h get w if b null w set Enabled b boolean Value  restoreEnableState HashMap isDisposed setEnabled booleanValue
private Hash Map saveUI State boolean keep Cancel Enabled Hash Map saved State new Hash Map 10 save Enable State And Set f Cancel Button saved State keep Cancel Enabled NON NLS 1 for Iterator action Buttons f Action Buttons iterator action Buttons has Next Button button Button action Buttons next save Enable State And Set button saved State false saved State put tab Form Control Enable State disable f Contents NON NLS 1 return saved State  HashMap saveUIState keepCancelEnabled HashMap savedState HashMap saveEnableStateAndSet fCancelButton savedState keepCancelEnabled actionButtons fActionButtons actionButtons hasNext actionButtons saveEnableStateAndSet savedState savedState tabForm ControlEnableState fContents savedState
private void save Enable State And Set Control w Hash Map h boolean enabled if w is Disposed h put w new Boolean w is Enabled w set Enabled enabled  saveEnableStateAndSet HashMap isDisposed isEnabled setEnabled
protected void handle Shell Close Event if ok To Close super handle Shell Close Event  handleShellCloseEvent okToClose handleShellCloseEvent
The dialog is going to be closed Check if there is a running operation If so post an alert saying that the wizard can t be closed public boolean ok To Close if f Active Running Operations 0 synchronized this f Window Closing Dialog create Closing Dialog f Window Closing Dialog open synchronized this f Window Closing Dialog null return false return true  okToClose fActiveRunningOperations fWindowClosingDialog createClosingDialog fWindowClosingDialog fWindowClosingDialog
private Message Dialog create Closing Dialog Message Dialog result new Message Dialog get Shell Search Messages get String Search Dialog Closing Dialog title NON NLS 1 null Search Messages get String Search Dialog Closing Dialog message NON NLS 1 Message Dialog QUESTION new String I Dialog Constants OK LABEL 0 return result  MessageDialog createClosingDialog MessageDialog MessageDialog getShell SearchMessages getString SearchDialogClosingDialog SearchMessages getString SearchDialogClosingDialog MessageDialog IDialogConstants OK_LABEL
Returns the cancel component that is to be used to cancel a long running operation protected Control get Cancel Component return f Cancel Button  getCancelComponent fCancelButton

public File Label Provider int order Flag f Decorator PlatformUI get Workbench get Decorator Manager get Label Decorator f Label Provider new Workbench Label Provider f Order order Flag  FileLabelProvider orderFlag fDecorator getWorkbench getDecoratorManager getLabelDecorator fLabelProvider WorkbenchLabelProvider fOrder orderFlag
public void set Order int order Flag f Order order Flag  setOrder orderFlag fOrder orderFlag
public String get Text Object element if element instanceof I Search Result View Entry return NON NLS 1 I Resource resource I Search Result View Entry element get Resource String text null if resource null resource exists text Search Messages get String Search Result View removed resource NON NLS 1 else I Path path resource get Full Path remove Last Segments 1 if path get Device null path path make Relative if f Order SHOW LABEL f Order SHOW LABEL PATH text f Label Provider get Text resource if path null f Order SHOW LABEL PATH f Args 0 text f Args 1 path to String text Message Format format fg Separator Format f Args else if path null text path to String else text NON NLS 1 if f Order SHOW PATH LABEL f Args 0 text f Args 1 f Label Provider get Text resource text Message Format format fg Separator Format f Args Do the decoration if f Decorator null String decorated Text f Decorator decorate Text text resource if decorated Text null return decorated Text return text  getText ISearchResultViewEntry IResource ISearchResultViewEntry getResource SearchMessages getString SearchResultView removed_resource IPath getFullPath removeLastSegments getDevice makeRelative fOrder SHOW_LABEL fOrder SHOW_LABEL_PATH fLabelProvider getText fOrder SHOW_LABEL_PATH fArgs fArgs toString MessageFormat fgSeparatorFormat fArgs toString fOrder SHOW_PATH_LABEL fArgs fArgs fLabelProvider getText MessageFormat fgSeparatorFormat fArgs fDecorator decoratedText fDecorator decorateText decoratedText decoratedText
public Image get Image Object element if element instanceof I Search Result View Entry return null NON NLS 1 I Resource resource I Search Result View Entry element get Resource Image image f Label Provider get Image resource if f Decorator null Image decorated Image f Decorator decorate Image image resource if decorated Image null return decorated Image return image  getImage ISearchResultViewEntry IResource ISearchResultViewEntry getResource fLabelProvider getImage fDecorator decoratedImage fDecorator decorateImage decoratedImage decoratedImage
public void dispose super dispose f Label Provider dispose  fLabelProvider
public boolean is Label Property Object element String property return f Label Provider is Label Property element property  isLabelProperty fLabelProvider isLabelProperty
public void remove Listener I Label Provider Listener listener super remove Listener listener f Label Provider remove Listener listener  removeListener ILabelProviderListener removeListener fLabelProvider removeListener
public void add Listener I Label Provider Listener listener super add Listener listener f Label Provider add Listener listener  addListener ILabelProviderListener addListener fLabelProvider addListener

public File Type Editor I Editor Registry registry Combo text Field Button browse Button f Text Field text Field f Browse Button browse Button f Text Field add Dispose Listener this f Browse Button add Dispose Listener this f Browse Button add Selection Listener this  FileTypeEditor IEditorRegistry textField browseButton fTextField textField fBrowseButton browseButton fTextField addDisposeListener fBrowseButton addDisposeListener fBrowseButton addSelectionListener
public void widget Disposed Dispose Event event Widget widget event widget if widget f Text Field f Text Field null else if widget f Browse Button f Browse Button null  widgetDisposed DisposeEvent fTextField fTextField fBrowseButton fBrowseButton
public void widget Selected Selection Event event if event widget f Browse Button handle Browse Button  widgetSelected SelectionEvent fBrowseButton handleBrowseButton
public void widget Double Selected Selection Event event  widgetDoubleSelected SelectionEvent
Answer a collection of the currently specified resource types return java util Vector public Set get File Types Set result new Hash Set String Tokenizer tokenizer new String Tokenizer f Text Field get Text TYPE DELIMITER while tokenizer has More Tokens String current Extension tokenizer next Token trim result add current Extension return result  getFileTypes HashSet StringTokenizer StringTokenizer fTextField getText TYPE_DELIMITER hasMoreTokens currentExtension nextToken currentExtension
Populate self s import types field based upon the passed types collection param types java util Vector public void set File Types Set types f Text Field set Text types To String types  setFileTypes fTextField setText typesToString
protected void handle Browse Button Type Filtering Dialog dialog new Type Filtering Dialog f Text Field get Shell get File Types if dialog open Window OK set File Types new Hash Set Arrays as List dialog get Result  handleBrowseButton TypeFilteringDialog TypeFilteringDialog fTextField getShell getFileTypes setFileTypes HashSet asList getResult
public static String types To String Set types String Buffer result new String Buffer Iterator types Iter types iterator boolean first true while types Iter has Next if first result append TYPE DELIMITER result append NON NLS 1 else first false result append types Iter next return result to String  typesToString StringBuffer StringBuffer typesIter typesIter hasNext TYPE_DELIMITER typesIter toString

List f Contents public List Content Provider  fContents ListContentProvider
public Object get Elements Object input if f Contents null f Contents input return f Contents to Array return new Object 0  getElements fContents fContents fContents toArray
public void input Changed Viewer viewer Object old Input Object new Input if new Input instanceof List f Contents List new Input else f Contents null we use a fixed set  inputChanged oldInput newInput newInput fContents newInput fContents
public void dispose 
public boolean is Deleted Object o return f Contents null f Contents contains o  isDeleted fContents fContents

public List Dialog Shell parent Object input String title String message I Structured Content Provider sp I Label Provider lp super parent set Title title set Message message f Input input f Content Provider sp f Label Provider lp  ListDialog IStructuredContentProvider ILabelProvider setTitle setMessage fInput fContentProvider fLabelProvider
public void set Create Cancel Button boolean value f Create Cancel Button value  setCreateCancelButton fCreateCancelButton
protected Label create Message Area Composite composite Label label new Label composite SWT WRAP label set Text get Message Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint convert Width In Chars To Pixels WIDTH IN CHARACTERS label set Layout Data gd apply Dialog Font label return label  createMessageArea setText getMessage GridData GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels WIDTH_IN_CHARACTERS setLayoutData applyDialogFont
final Table table f Viewer get Table table add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e if f Create Cancel Button ok Pressed  fViewer getTable addMouseListener MouseAdapter mouseDoubleClick MouseEvent fCreateCancelButton okPressed
protected Control create Dialog Area Composite container Composite parent Composite super create Dialog Area container create Message Area parent f Viewer new Table Viewer parent SWT SINGLE SWT H SCROLL SWT V SCROLL SWT BORDER f Viewer set Content Provider f Content Provider final Table table f Viewer get Table table add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e if f Create Cancel Button ok Pressed f Viewer set Label Provider f Label Provider f Viewer set Input f Input List initial Selection get Initial Element Selections if initial Selection null f Viewer set Selection new Structured Selection initial Selection Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint convert Height In Chars To Pixels 15 gd width Hint convert Width In Chars To Pixels WIDTH IN CHARACTERS table set Layout Data gd apply Dialog Font table return table  createDialogArea createDialogArea createMessageArea fViewer TableViewer H_SCROLL V_SCROLL fViewer setContentProvider fContentProvider fViewer getTable addMouseListener MouseAdapter mouseDoubleClick MouseEvent fCreateCancelButton okPressed fViewer setLabelProvider fLabelProvider fViewer setInput fInput initialSelection getInitialElementSelections initialSelection fViewer setSelection StructuredSelection initialSelection GridData GridData GridData FILL_BOTH heightHint convertHeightInCharsToPixels widthHint convertWidthInCharsToPixels WIDTH_IN_CHARACTERS setLayoutData applyDialogFont
protected void create Buttons For Button Bar Composite parent if f Create Cancel Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true else super create Buttons For Button Bar parent  createButtonsForButtonBar fCreateCancelButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButtonsForButtonBar
protected void ok Pressed Build a list of selected children I Selection selection f Viewer get Selection if selection instanceof I Structured Selection set Result I Structured Selection f Viewer get Selection to List super ok Pressed  okPressed ISelection fViewer getSelection IStructuredSelection setResult IStructuredSelection fViewer getSelection toList okPressed

Creates a new message line as a child of the given parent Error message will be shown with in the rgb color 200 0 0 public Message Line Composite parent this parent SWT LEFT  MessageLine
Creates a new message line as a child of the parent and with the given SWT stylebits Error message will be shown with in the rgb color 200 0 0 public Message Line Composite parent int style super parent style f Default Color get Foreground f ErrorRGB fg ErrorRGB  MessageLine fDefaultColor getForeground fErrorRGB fgErrorRGB
Creates a new message line as a child of the parent and with the given SWT stylebits Error message will be shown with in the given rgb color public Message Line Composite parent int style RGB errorRGB super parent style f Default Color get Foreground f ErrorRGB errorRGB  MessageLine fDefaultColor getForeground fErrorRGB
Clears the currently displayed error message and redisplayes the message which was active before the error message was set public void clear Error Message set Error Message null  clearErrorMessage setErrorMessage
Clears the currently displayed message public void clear Message set Message null  clearMessage setMessage
Get the currently displayed error text return The error message If no error message is displayed code null code is returned public String get Error Message return f Error Text  getErrorMessage fErrorText
Get the currently displayed message return The message If no message is displayed code null code is returned public String get Message return f Message Text  getMessage fMessageText
Sets the default error color used by all message lines Note a call to this method only affects newly created Message Lines not existing ones public static void set Default Error Color RGB color fg ErrorRGB color  MessageLines setDefaultErrorColor fgErrorRGB
f Error Color new Color get Display f ErrorRGB add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e get Error Color dispose  fErrorColor getDisplay fErrorRGB addDisposeListener DisposeListener widgetDisposed DisposeEvent getErrorColor
Display the given error message A currently displayed message is saved and will be redisplayed when the error message is cleared public void set Error Message String message f Error Text message if message null set Message f Message Text else if f Error Color null f Error Color new Color get Display f ErrorRGB add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e get Error Color dispose set Foreground f Error Color set Text message  setErrorMessage fErrorText setMessage fMessageText fErrorColor fErrorColor getDisplay fErrorRGB addDisposeListener DisposeListener widgetDisposed DisposeEvent getErrorColor setForeground fErrorColor setText
Set the message text If the message line currently displays an error the message is stored and will be shown after a call to clear Error Message public void set Message String message f Message Text message if message null message NON NLS 1 if f Error Text null set Foreground f Default Color set Text message  clearErrorMessage setMessage fMessageText fErrorText setForeground fDefaultColor setText
protected Color get Error Color return f Error Color  getErrorColor fErrorColor

public Pixel Converter Control control GC gc new GC control gc set Font control get Font f Font Metrics gc get Font Metrics gc dispose  PixelConverter setFont getFont fFontMetrics getFontMetrics
see org eclipse jface dialogs Dialog Page convert Height In Chars To Pixels int public int convert Height In Chars To Pixels int chars return Dialog convert Height In Chars To Pixels f Font Metrics chars  DialogPage convertHeightInCharsToPixels convertHeightInCharsToPixels convertHeightInCharsToPixels fFontMetrics
see org eclipse jface dialogs Dialog Page convert HorizontalDL Us To Pixels int public int convert HorizontalDL Us To Pixels int dlus return Dialog convert HorizontalDL Us To Pixels f Font Metrics dlus  DialogPage convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels fFontMetrics
see org eclipse jface dialogs Dialog Page convert VerticalDL Us To Pixels int public int convert VerticalDL Us To Pixels int dlus return Dialog convert VerticalDL Us To Pixels f Font Metrics dlus  DialogPage convertVerticalDLUsToPixels convertVerticalDLUsToPixels convertVerticalDLUsToPixels fFontMetrics
see org eclipse jface dialogs Dialog Page convert Width In Chars To Pixels int public int convert Width In Chars To Pixels int chars return Dialog convert Width In Chars To Pixels f Font Metrics chars  DialogPage convertWidthInCharsToPixels convertWidthInCharsToPixels convertWidthInCharsToPixels fFontMetrics

private Grid Data f Default Grid Datas new Grid Data 4 public Row Layouter int num Columns this num Columns false  GridData fDefaultGridDatas GridData RowLayouter numColumns numColumns
public Row Layouter int num Columns boolean order f Num Columns num Columns f Order order  RowLayouter numColumns fNumColumns numColumns fOrder
public void set Default Span span Horizontal Alignment Grid Data FILL span Grab Excess Horizontal Space 1  setDefaultSpan spanHorizontalAlignment GridData spanGrabExcessHorizontalSpace
public void perform Control c1 perform new Control c1 0 
public void perform Control c1 Control c2 int span perform new Control c1 c2 span 
public void perform Control c1 Control c2 Control c3 int span perform new Control c1 c2 c3 span 
public void perform Control controls int span Column int num Columns num Columns Assert is True controls length num Columns order controls int grid Index 0 for int i 0 i controls length i Control control controls i Grid Data gd Grid Data control get Layout Data if gd null gd get Grid Data grid Index if i span Column int span num Columns controls length 1 grid Index span if gd null gd new Grid Data apply Delta gd gd horizontal Span span else grid Index control set Layout Data gd  spanColumn numColumns numColumns isTrue numColumns gridIndex GridData GridData getLayoutData getGridData gridIndex spanColumn numColumns gridIndex GridData applyDelta horizontalSpan gridIndex setLayoutData
private void apply Delta Grid Data gd if span Horizontal Alignment 1 gd horizontal Alignment span Horizontal Alignment if span Grab Excess Horizontal Space 1 if span Grab Excess Horizontal Space 0 gd grab Excess Horizontal Space false else gd grab Excess Horizontal Space true if span Horizontal Span 1 gd horizontal Span span Horizontal Span if span Horizontal Indent 1 gd horizontal Indent span Horizontal Indent if span Width Hint 1 gd width Hint span Width Hint if span Vertical Alignment 1 gd vertical Alignment span Vertical Alignment if span Grab Excess Vertical Space 1 if span Grab Excess Vertical Space 0 gd grab Excess Vertical Space false else gd grab Excess Vertical Space true if span Vertical Span 1 gd vertical Span span Vertical Span if span Height Hint 1 gd height Hint span Height Hint  applyDelta GridData spanHorizontalAlignment horizontalAlignment spanHorizontalAlignment spanGrabExcessHorizontalSpace spanGrabExcessHorizontalSpace grabExcessHorizontalSpace grabExcessHorizontalSpace spanHorizontalSpan horizontalSpan spanHorizontalSpan spanHorizontalIndent horizontalIndent spanHorizontalIndent spanWidthHint widthHint spanWidthHint spanVerticalAlignment verticalAlignment spanVerticalAlignment spanGrabExcessVerticalSpace spanGrabExcessVerticalSpace grabExcessVerticalSpace grabExcessVerticalSpace spanVerticalSpan verticalSpan spanVerticalSpan spanHeightHint heightHint spanHeightHint
public void set Default Grid Data Grid Data gd int index if index f Default Grid Datas length Grid Data new Datas new Grid Data index 4 System arraycopy f Default Grid Datas 0 new Datas 0 f Default Grid Datas length f Default Grid Datas new Datas f Default Grid Datas index gd  setDefaultGridData GridData fDefaultGridDatas GridData newDatas GridData fDefaultGridDatas newDatas fDefaultGridDatas fDefaultGridDatas newDatas fDefaultGridDatas
public Grid Data get Grid Data int index if index f Default Grid Datas length return null return clone Grid Data f Default Grid Datas index  GridData getGridData fDefaultGridDatas cloneGridData fDefaultGridDatas
public int num Columns return f Num Columns  numColumns fNumColumns
protected void order Control controls if f Order return for int i 0 i controls length i Control control controls i control move Below f Last Control f Last Control control  fOrder moveBelow fLastControl fLastControl
protected Grid Data clone Grid Data Grid Data gd if gd null return null Grid Data result new Grid Data result horizontal Alignment gd horizontal Alignment result grab Excess Horizontal Space gd grab Excess Horizontal Space result horizontal Span gd horizontal Span result horizontal Indent gd horizontal Indent result width Hint gd width Hint result vertical Alignment gd vertical Alignment result grab Excess Vertical Space gd grab Excess Vertical Space result vertical Span gd vertical Span result height Hint gd height Hint return result  GridData cloneGridData GridData GridData GridData horizontalAlignment horizontalAlignment grabExcessHorizontalSpace grabExcessHorizontalSpace horizontalSpan horizontalSpan horizontalIndent horizontalIndent widthHint widthHint verticalAlignment verticalAlignment grabExcessVerticalSpace grabExcessVerticalSpace verticalSpan verticalSpan heightHint heightHint

Returns the standard display to be used The method first checks if the thread calling this method has an associated disaply If so this display is returned Otherwise the method returns the default display public static Display get Standard Display Display display display Display get Current if display null display Display get Default return display  getStandardDisplay getCurrent getDefault
Returns the shell for the given widget If the widget doesn t represent a SWT object that manage a shell code null code is returned return the shell for the given widget public static Shell get Shell Widget widget if widget instanceof Control return Control widget get Shell if widget instanceof Caret return Caret widget get Parent get Shell if widget instanceof Drag Source return Drag Source widget get Control get Shell if widget instanceof Drop Target return Drop Target widget get Control get Shell if widget instanceof Menu return Menu widget get Parent get Shell if widget instanceof Scroll Bar return Scroll Bar widget get Parent get Shell return null  getShell getShell getParent getShell DragSource DragSource getControl getShell DropTarget DropTarget getControl getShell getParent getShell ScrollBar ScrollBar getParent getShell
Returns a width hint for a button control public static int get Button Width Hint Button button if button get Font equals J Face Resources get Default Font button set Font J Face Resources get Dialog Font Pixel Converter converter new Pixel Converter button int width Hint converter convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH return Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x  getButtonWidthHint getFont JFaceResources getDefaultFont setFont JFaceResources getDialogFont PixelConverter PixelConverter widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint computeSize
Returns a height hint for a button control public static int get Button Height Hint Button button if button get Font equals J Face Resources get Default Font button set Font J Face Resources get Dialog Font Pixel Converter converter new Pixel Converter button return converter convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT  getButtonHeightHint getFont JFaceResources getDefaultFont setFont JFaceResources getDialogFont PixelConverter PixelConverter convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT
Sets width and height hint for the button control b Note b This is a NOP if the button s layout data is not an instance of code Grid Data code paramthe button for which to set the dimension hint public static void set Button Dimension Hint Button button Assert is Not Null button Object gd button get Layout Data if gd instanceof Grid Data Grid Data gd height Hint get Button Height Hint button Grid Data gd width Hint get Button Width Hint button  GridData setButtonDimensionHint isNotNull getLayoutData GridData GridData heightHint getButtonHeightHint GridData widthHint getButtonWidthHint
public static int get Table Height Hint Table table int rows if table get Font equals J Face Resources get Default Font table set Font J Face Resources get Dialog Font int result table get Item Height rows table get Header Height if table get Lines Visible result table get Grid Line Width rows 1 return result  getTableHeightHint getFont JFaceResources getDefaultFont setFont JFaceResources getDialogFont getItemHeight getHeaderHeight getLinesVisible getGridLineWidth

private I File Editor Mapping f Current Input Creates a type selection dialog using the supplied entries Set the initial selections to those whose extensions match the preselections public Type Filtering Dialog Shell parent Shell Collection preselections super parent Shell set Title Search Messages get String Types Filtering title NON NLS 1 f Initial Selections preselections set Message Search Messages get String Types Filtering message NON NLS 1  IFileEditorMapping fCurrentInput TypeFilteringDialog parentShell parentShell setTitle SearchMessages getString TypesFiltering fInitialSelections setMessage SearchMessages getString TypesFiltering
Add the selection and deselection buttons to the dialog param composite org eclipse swt widgets Composite private void add Selection Buttons Composite composite Composite button Composite new Composite composite SWT RIGHT Grid Layout layout new Grid Layout layout num Columns 2 button Composite set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data GRAB HORIZONTAL data grab Excess Horizontal Space true composite set Data data Button select Button create Button button Composite I Dialog Constants SELECT ALL ID Search Messages get String Types Filtering select All NON NLS 1 false Selection Listener listener new Selection Adapter public void widget Selected Selection Event e get List Viewer set All Checked true select Button add Selection Listener listener Button deselect Button create Button button Composite I Dialog Constants DESELECT ALL ID Search Messages get String Types Filtering deselect All NON NLS 1 false listener new Selection Adapter public void widget Selected Selection Event e get List Viewer set All Checked false deselect Button add Selection Listener listener  addSelectionButtons buttonComposite GridLayout GridLayout numColumns buttonComposite setLayout GridData GridData GridData HORIZONTAL_ALIGN_END GridData GRAB_HORIZONTAL grabExcessHorizontalSpace setData selectButton createButton buttonComposite IDialogConstants SELECT_ALL_ID SearchMessages getString TypesFiltering selectAll SelectionListener SelectionAdapter widgetSelected SelectionEvent getListViewer setAllChecked selectButton addSelectionListener deselectButton createButton buttonComposite IDialogConstants DESELECT_ALL_ID SearchMessages getString TypesFiltering deselectAll SelectionAdapter widgetSelected SelectionEvent getListViewer setAllChecked deselectButton addSelectionListener
Add the currently specified extensions private void add User Defined Entries List result String Tokenizer tokenizer new String Tokenizer f User Defined Text get Text File Type Editor TYPE DELIMITER Allow the and prefix and strip out the extension while tokenizer has More Tokens String current Extension tokenizer next Token trim if current Extension equals NON NLS 1 result add current Extension  addUserDefinedEntries StringTokenizer StringTokenizer fUserDefinedText getText FileTypeEditor TYPE_DELIMITER hasMoreTokens currentExtension nextToken currentExtension currentExtension
Visually checks the previously specified elements in this dialog s list viewer private void check Initial Selections I File Editor Mapping editor Mappings PlatformUI get Workbench get Editor Registry get File Editor Mappings Array List selected Mappings new Array List for int i 0 i editor Mappings length i I File Editor Mapping mapping editor Mappings i if f Initial Selections contains mapping get Label f List Viewer set Checked mapping true selected Mappings add mapping get Label Now add in the ones not selected to the user defined list Iterator initial Iterator f Initial Selections iterator String Buffer entries new String Buffer boolean first true while initial Iterator has Next String next Extension String initial Iterator next if selected Mappings contains next Extension if first entries append File Type Editor TYPE DELIMITER entries append NON NLS 1 first false entries append next Extension f User Defined Text set Text entries to String  checkInitialSelections IFileEditorMapping editorMappings getWorkbench getEditorRegistry getFileEditorMappings ArrayList selectedMappings ArrayList editorMappings IFileEditorMapping editorMappings fInitialSelections getLabel fListViewer setChecked selectedMappings getLabel initialIterator fInitialSelections StringBuffer StringBuffer initialIterator hasNext nextExtension initialIterator selectedMappings nextExtension FileTypeEditor TYPE_DELIMITER nextExtension fUserDefinedText setText toString
Method declared in Window protected void configure Shell Shell shell super configure Shell shell Workbench Help set Help shell I Search Help Context Ids TYPE FILTERING DIALOG  configureShell configureShell WorkbenchHelp setHelp ISearchHelpContextIds TYPE_FILTERING_DIALOG
protected Control create Dialog Area Composite parent page group Composite composite Composite super create Dialog Area parent create Message Area composite f List Viewer Checkbox Table Viewer new Check List composite SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data height Hint SIZING SELECTION WIDGET HEIGHT data width Hint SIZING SELECTION WIDGET WIDTH f List Viewer get Table set Layout Data data f List Viewer set Label Provider File Editor Mapping Label Provider INSTANCE f List Viewer set Content Provider File Editor Mapping Content Provider INSTANCE add Selection Buttons composite create User Entry Group composite initialize Viewer initialize page if f Initial Selections null f Initial Selections is Empty check Initial Selections apply Dialog Font composite return composite  createDialogArea createDialogArea createMessageArea fListViewer CheckboxTableViewer newCheckList GridData GridData GridData FILL_BOTH heightHint SIZING_SELECTION_WIDGET_HEIGHT widthHint SIZING_SELECTION_WIDGET_WIDTH fListViewer getTable setLayoutData fListViewer setLabelProvider FileEditorMappingLabelProvider fListViewer setContentProvider FileEditorMappingContentProvider addSelectionButtons createUserEntryGroup initializeViewer fInitialSelections fInitialSelections isEmpty checkInitialSelections applyDialogFont
Create the group that shows the user defined entries for the dialog param parent the parent this is being created in private void create User Entry Group Composite parent destination specification group Composite user Defined Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 user Defined Group set Layout layout user Defined Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN FILL new Label user Defined Group SWT NONE set Text Search Messages get String Types Filtering other Extensions NON NLS 1 user defined entry field f User Defined Text new Text user Defined Group SWT SINGLE SWT BORDER Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL f User Defined Text set Layout Data data  createUserEntryGroup userDefinedGroup GridLayout GridLayout numColumns userDefinedGroup setLayout userDefinedGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_FILL userDefinedGroup setText SearchMessages getString TypesFiltering otherExtensions fUserDefinedText userDefinedGroup GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL fUserDefinedText setLayoutData
Return the input to the dialog private I File Editor Mapping get Input Filter the mappings to be just those with a wildcard extension if f Current Input null List wildcard Editors new Array List I File Editor Mapping all Mappings PlatformUI get Workbench get Editor Registry get File Editor Mappings for int i 0 i all Mappings length i if all Mappings i get Name equals NON NLS 1 wildcard Editors add all Mappings i f Current Input new I File Editor Mapping wildcard Editors size wildcard Editors to Array f Current Input return f Current Input  IFileEditorMapping getInput fCurrentInput wildcardEditors ArrayList IFileEditorMapping allMappings getWorkbench getEditorRegistry getFileEditorMappings allMappings allMappings getName wildcardEditors allMappings fCurrentInput IFileEditorMapping wildcardEditors wildcardEditors toArray fCurrentInput fCurrentInput
Initializes this dialog s viewer after it has been laid out private void initialize Viewer f List Viewer set Input get Input  initializeViewer fListViewer setInput getInput
The code List Selection Dialog code implementation of this code Dialog code method builds a list of the selected elements for later retrieval by the client and closes this dialog protected void ok Pressed Get the input children I File Editor Mapping children get Input List list new Array List Build a list of selected children for int i 0 i children length i I File Editor Mapping element children i if f List Viewer get Checked element list add element get Label add User Defined Entries list set Result list super ok Pressed  ListSelectionDialog okPressed IFileEditorMapping getInput ArrayList IFileEditorMapping fListViewer getChecked getLabel addUserDefinedEntries setResult okPressed
protected Checkbox Table Viewer get List Viewer return f List Viewer  CheckboxTableViewer getListViewer fListViewer

public int compare Object o1 Object o2 String name1 null String name2 null if o1 instanceof I Working Set name1 I Working Set o1 get Name if o2 instanceof I Working Set name2 I Working Set o2 get Name return f Collator compare name1 name2  IWorkingSet IWorkingSet getName IWorkingSet IWorkingSet getName fCollator

Creates an code Action Group code for a Search view param search View the search result view for which the group is made seeorg eclipse ui actions Action Group  ActionGroup searchView ActionGroup

Contributes menu items to the given context menu appropriate for the given selection param menuthe menu to which the items are added param input Providerthe selection and input provider  inputProviderthe

Computes and returns key by which the given marker is grouped parammarkerthe marker for which the key must be computed returnan object that will be used as the key for that marker code null code if the marker seems to be invalid 

public interface I Query Listener Called when an query has been added to the system param query the query that has been added  IQueryListener
void query Added I Search Query query Called when a query has been removed param query the query that has been removed  queryAdded ISearchQuery
Called before an code I Search Query code is starting param query the query about to start  ISearchQuery
Called after an code I Search Query code has finished param query the query that has finished  ISearchQuery

Performs the replace action for this page The search dialog calls this method when the Replace button is pressed return code true code if the dialog can be closed after execution 

Performs the action for this page The search dialog calls this method when the Search button is pressed return code true code if the dialog can be closed after execution 
Sets the container of this page The search dialog calls this method to initialize this page Implementations may store the reference to the container paramcontainerthe container for this page 

Returns the selection with which this container was opened return the selection passed to this container when it was opened 
Returns the context for the search operation This context allows progress to be shown inside the search dialog returnthe code I Runnable Context code for the search operation  IRunnableContext
Sets the enable state of the perform action button of this container paramstate code true code to enable the button which performs the action 
Returns search container s selected scope The scope is WORKSPACE SCOPE SELECTED PROJECTS SCOPE SELECTION SCOPE or WORKING SET SCOPE return the selected scope since 2 0  WORKSPACE_SCOPE SELECTED_PROJECTS_SCOPE SELECTION_SCOPE WORKING_SET_SCOPE
Sets the selected scope of this search page container The scope is WORKSPACE SCOPE SELECTED PROJECTS SCOPE SELECTION SCOPE or WORKING SET SCOPE param scope the newly selected scope since 2 0  WORKSPACE_SCOPE SELECTED_PROJECTS_SCOPE SELECTION_SCOPE WORKING_SET_SCOPE
Tells whether a valid scope is selected return a code true code if a valid scope is selected in this search page container since 2 0 
Returns the selected working sets of this container return an array with the selected working sets or code null code if the scope is not WORKING SET SCOPE since 2 0  WORKING_SET_SCOPE
Sets the selected working sets of this container param working Sets an array of I Working Set since 2 0  workingSets IWorkingSet

Computes and returns a score indicating how good the page with the given id can handle the given input element The search page id appears as the code id code attribute of the code lt page gt code element contributed to the search pages extension point code org eclipse search search Pages code parampage Idthe string id of the page for which the score is computed paraminputthe object based on which the page should open returna score higher or equal to code LOWEST code or code UNKNOWN code if this computer cannot decide  searchPages parampageIdthe

public interface I Search Query This is the method that actually does the work i e finds the results of the search query param monitor the progress monitor to be used return the status after completion of the search job  ISearchQuery
I Status run I Progress Monitor monitor Returns a user readable label for this query This will be used for example to set the code Job code name if this query is executed in the background Note that progress notification for example the number of matches found should be done via the progress monitor passed into the code run I Progress Monitor code method return the user readable label of this query  IStatus IProgressMonitor IProgressMonitor
String get Label Returns whether the query can be run more than once Some queries may depend on transient information and return code false code return whether this query can be run more than once  getLabel
boolean can Rerun Returns whether this query can be run in the background Note that queries must do proper locking when they are run in the background e g get the appropriate workspace locks return whether this query can be run in the background  canRerun
boolean can Run In Background Returns the search result associated with this query This method can be called before run is called return this query s search result  canRunInBackground

public interface I Search Result Adds a code I Search Result Listener code Has no effect when the listener has already been added param l the listener to be added  ISearchResult ISearchResultListener
public void add Listener I Search Result Listener l Removes a code I Search Result Changed Listener code Has no effect when the listener hasn t previously been added param l the listener to be removed  addListener ISearchResultListener ISearchResultChangedListener
public void remove Listener I Search Result Listener l Returns a user readable label for this search result return the label for this search result  removeListener ISearchResultListener
String get Label Returns a tooltip to be used when this search result is shown in the UI return a user readable String  getLabel
public String get Tooltip Returns an image descriptor for the given I Search Result return an image representing this search result or code null code  getTooltip ISearchResult
Image Descriptor get Image Descriptor Returns the query that produced this search result return the query producing this result  ImageDescriptor getImageDescriptor

public interface I Search Result Listener Called to notify listeners of changes in a code I Search Result code The event object code e code is only guaranteed to be valid for the duration of the call param e the event object describing the change Note that implementers of code I Search Result code will be sending subclasses of code Search Result Event code  ISearchResultListener ISearchResult ISearchResult SearchResultEvent

public interface I Search Result Page extends I Page Book View Page Returns an Object representing the current user interface state of the page For example the current selection in a viewer The UI state will be later passed into the code set Input code method when the currently shown code I Search Result code is shown again return an object representing the UI state of this page  ISearchResultPage IPageBookViewPage setInput ISearchResult
Object getUI State Sets the search result to be shown in this search results page Implementers should restore UI state e g selection from the previously saved code ui State code object param search the search result to be shown param ui State the previously saved UI state see I Search Result Page getUI State  getUIState uiState uiState ISearchResultPage getUIState
void set Input I Search Result search Object ui State Sets the search view this search results page is shown in This method will be called before the page is shown for the first time i e before the page control is created param part the parent search view  setInput ISearchResult uiState
void set View Part I Search Result View Part part Restores the page state Note that this applies only to state that is saved across sessions param memento a memento to restore the page state from or code null code if no previous state was saved see set Input I Search Result Object  setViewPart ISearchResultViewPart setInput ISearchResult
void restore State I Memento memento Saves the page state in a memento Note that this applies to state that should persist across sessions param memento a memento to receive the object state see getUI State  restoreState IMemento getUIState
void save State I Memento memento Sets the id for this page This method will be called before any other initialization is done param id the id for this page  saveState IMemento
void setID String id Returns the id set via code setID code return the id of this page 
Returns a user readable label for this search result page The label will be used to describe the contents for the page to the user for example it will be displayed in the search view title bar To take an example from file search a label might read like this test 896 matches in Workspace return the user readable label for this search result page 

Informs the view that a search has started Provides all necessary information to create an entry in the search result view If every match should show up in the search result view then the match itself can be used as key paramgroup Factorythe action group factory or code null code if no factory is provided paramsingular Labelthe label to be used for this search occurrence if there is one match or code null code if the plural Label Pattern should be used paramplural Label Patternthe label pattern to be used for this search occurrence if there are more than one matches or none This string may contain 0 which will be replace by the match count paramimage Descriptorthe image descriptor to be used for this search occurrence or code null code if this search should not have an image parampage Idthe id of the search page which started the search paramlabel Providerthe label provider used by this search result view or code null code if the default provider should be used The default label provider shows the resource name and the corresponding image paramgoto Actionthe action used by the view to go to a marker paramgroup By Key Computerthe computer used by the view to compute the key for a marker paramoperationthe runnable used by the view to repeat the search see I Action Group Factory since 2 0 public void search Started I Action Group Factorygroup Factory Stringsingular Label Stringplural Label Pattern Image Descriptorimage Descriptor Stringpage Id I Label Providerlabel Provider I Actiongoto Action I Group By Key Computergroup By Key Computer  paramgroupFactorythe paramsingularLabelthe pluralLabelPattern parampluralLabelPatternthe paramimageDescriptorthe parampageIdthe paramlabelProviderthe paramgotoActionthe paramgroupByKeyComputerthe IActionGroupFactory searchStarted IActionGroupFactorygroupFactory StringsingularLabel StringpluralLabelPattern ImageDescriptorimageDescriptor StringpageId ILabelProviderlabelProvider IActiongotoAction IGroupByKeyComputergroupByKeyComputer
Returns the current selection of the search result view returnthe current selection of the search result view seeorg eclipse jface viewers I Selection Provider get Selection  ISelectionProvider getSelection
Informs the view that a search has started Provides all necessary information to create an entry in the search result view If every match should show up in the search result view then the match itself can be used as key parampage Idthe id of the search page which started the search paramlabelthe label to be used for this search occurrence paramimage Descriptorthe image descriptor to be used for this search occurrence or code null code if this search should not have an image paramcontributorthe context menu contributor or code null code if no context menu is contributed paramlabel Providerthe label provider used by this search result view or code null code if the default provider should be used The default label provider shows the resource name and the corresponding image paramgoto Actionthe action used by the view to go to a marker paramgroup By Key Computerthe computer used by the view to compute the key for a marker paramoperationthe runnable used by the view to repeat the search deprecated As of build 20011107 replaced by the new version with additonal parameter public void search Started Stringpage Id Stringlabel Image Descriptorimage Descriptor I Context Menu Contributor contributor I Label Providerlabel Provider I Actiongoto Action I Group By Key Computergroup By Key Computer  parampageIdthe paramimageDescriptorthe paramlabelProviderthe paramgotoActionthe paramgroupByKeyComputerthe deprecatedAs searchStarted StringpageId ImageDescriptorimageDescriptor IContextMenuContributor ILabelProviderlabelProvider IActiongotoAction IGroupByKeyComputergroupByKeyComputer
Informs the view that a search has started Provides all necessary information to create an entry in the search result view If every match should show up in the search result view then the match itself can be used as key parampage Idthe id of the search page which started the search paramsingular Labelthe label to be used for this search occurrence if there is one match or code null code if the plural Label Pattern should be used paramplural Label Patternthe label pattern to be used for this search occurrence if there are more than one matches or none This string may contain 0 which will be replace by the match count paramimage Descriptorthe image descriptor to be used for this search occurrence or code null code if this search should not have an image paramcontributorthe context menu contributor or code null code if no context menu is contributed paramlabel Providerthe label provider used by this search result view or code null code if the default provider should be used The default label provider shows the resource name and the corresponding image paramgoto Actionthe action used by the view to go to a marker paramgroup By Key Computerthe computer used by the view to compute the key for a marker paramoperationthe runnable used by the view to repeat the search since 2 0 deprecated As of build 20020514 replaced by the new version which provides an action group factory public void search Started Stringpage Id Stringsingular Label Stringplural Label Pattern Image Descriptorimage Descriptor I Context Menu Contributor contributor I Label Providerlabel Provider I Actiongoto Action I Group By Key Computergroup By Key Computer  parampageIdthe paramsingularLabelthe pluralLabelPattern parampluralLabelPatternthe paramimageDescriptorthe paramlabelProviderthe paramgotoActionthe paramgroupByKeyComputerthe deprecatedAs searchStarted StringpageId StringsingularLabel StringpluralLabelPattern ImageDescriptorimageDescriptor IContextMenuContributor ILabelProviderlabelProvider IActiongotoAction IGroupByKeyComputergroupByKeyComputer
Informs the view that the search has finished This method must also be called in case of the search fails or has been canceled 
Informs the view that a match has been found Provides all necessary information to create a search result entry in this view p Note It is the clients responsibility to create the marker for this match p paramdescriptionthe text description of the match paramgroup By Keythe code Object code by which this match is grouped parammarkerthe marker for this match paramresourcethe marker s resource passed for optimization  paramgroupByKeythe
Returns the label provider of a search result view returnthe label provider of a search result view or code null code since 2 0 

Returns the key by which this entry s markers are logically grouped A line in a text could be such a key Clients supply this key as a parameter to code I Search Result View add Match code returnthe common resource of this entry s markers seeI Search Result View add Match  ISearchResultView addMatch seeISearchResultView addMatch
Returns the resource to which this entry s markers are attached This is a convenience method for code get Selected Marker get Resource code returnthe common resource of this entry s markers  getSelectedMarker getResource
Returns the number of markers grouped by this entry returnthe number of markers 
Returns the selected marker of this entry or the first one if no marker is selected A search results view entry can group markers which the UI allows the user to step through them while this entry remains selected returnthe selected marker inside this entry or code null code if the entry has no markers 

public interface I Search Result View Part extends I View Part Search result pages should call this method to have the search results view contribute to their context menus param menu Manager the menu manager the search result view should contribute to  ISearchResultViewPart IViewPart menuManager
void fill Context Menu I Menu Manager menu Manager Returns the code I Search Result Page code currently shown in this search view Returns code null code if no page is currently shown return the active code I Search Result Page code or code null code  fillContextMenu IMenuManager menuManager ISearchResultPage ISearchResultPage
Requests that the search view updates the label it is showing for search result pages Typically a search result page will call this method when the search result it s displaying is updated see I Search Result Page get Label  ISearchResultPage getLabel

public class New SearchUI Activates a search result view in the current workbench window page If a search view is already open in the current workbench window page it is activated Otherwise a new search view is opened and activated return the activate search result view or code null code if the search result view couldn t be activated public static I Search Result View Part activate Search Result View return Internal SearchUI get Instance activate Search View  NewSearchUI ISearchResultViewPart activateSearchResultView InternalSearchUI getInstance activateSearchView
Gets the search result view shown in the current workbench window return the search result view or code null code if none is open in the current workbench window page public static I Search Result View Part get Search Result View return Internal SearchUI get Instance get Search View  ISearchResultViewPart getSearchResultView InternalSearchUI getInstance getSearchView
Runs the given search query This method may run the given query in a separate thread if code I Search Query can Run In Background code returns code true code Running a query adds it to the set of known queries and notifies any registered code I Query Listener code s about the addition param query the query to execute public static void run Query I Search Query query if query can Run In Background Internal SearchUI get Instance run Search In Background query else I Status status Internal SearchUI get Instance run Search In Foreground null query if status null if status isOK Search Plugin log status if status get Severity I Status ERROR Error Dialog open Error Search Plugin get Active Workbench Shell Search Messages get String New SearchUI error title Search Messages get String New SearchUI error label status NON NLS 1 NON NLS 2  ISearchQuery canRunInBackground IQueryListener runQuery ISearchQuery canRunInBackground InternalSearchUI getInstance runSearchInBackground IStatus InternalSearchUI getInstance runSearchInForeground SearchPlugin getSeverity IStatus ErrorDialog openError SearchPlugin getActiveWorkbenchShell SearchMessages getString NewSearchUI SearchMessages getString NewSearchUI
Runs the given search query This method will execute the query in the same thread as the caller This method blocks until the query is finished Running a query adds it to the set of known queries and notifies any registered code I Query Listener code s about the addition param context the runnable context to run the query in param query the query to execute return a status indicating whether the query ran correctly public static I Status run Query In Foreground I Runnable Context context I Search Query query return Internal SearchUI get Instance run Search In Foreground context query  IQueryListener IStatus runQueryInForeground IRunnableContext ISearchQuery InternalSearchUI getInstance runSearchInForeground
Registers the given listener to receive notification of changes to queries The listener will be notified whenever a query has been added removed is starting or has finished Has no effect if an identical listener is already registered param l the listener to be added public static void add Query Listener I Query Listener l Internal SearchUI get Instance add Query Listener l  addQueryListener IQueryListener InternalSearchUI getInstance addQueryListener
Removes the given query listener Does nothing if the listener is not present param l the listener to be removed public static void remove Query Listener I Query Listener l Internal SearchUI get Instance remove Query Listener l  removeQueryListener IQueryListener InternalSearchUI getInstance removeQueryListener
Returns all search queries know to the search UI i e registered via code run Query code or code run Query In Foreground code return all search results public static I Search Query get Queries return Internal SearchUI get Instance get Queries  runQuery runQueryInForeground ISearchQuery getQueries InternalSearchUI getInstance getQueries
Returns whether the given query is currently running Queries may be run by client request or by actions in the search UI param query the query return whether the given query is currently running see New SearchUI run Query I Search Query see New SearchUI run Query In Foreground I Runnable Context I Search Query public static boolean is Query Running I Search Query query return Internal SearchUI get Instance is Query Running query  NewSearchUI runQuery ISearchQuery NewSearchUI runQueryInForeground IRunnableContext ISearchQuery isQueryRunning ISearchQuery InternalSearchUI getInstance isQueryRunning
Opens the search dialog If code page Id code is specified and a corresponding page is found then it is brought to top param window the parent window param page Idthe page to select or code null code if the best fitting page should be selected public static void open Search Dialog I Workbench Window window String page Id new Open Search Dialog Action window page Id run  pageId pageIdthe openSearchDialog IWorkbenchWindow pageId OpenSearchDialogAction pageId
Returns the preference whether editors should be reused when showing search results The goto action can decide to use or ignore this preference return code true code if editors should be reused for showing search results public static boolean reuse Editor return Search Preference Page is Editor Reused  reuseEditor SearchPreferencePage isEditorReused
Returns the preference whether a search engine is allowed to report potential matches or not p Search engines which can report inexact matches must respect this preference i e they should not report inexact matches if this method returns code true code p return code true code if search engine must not report inexact matches public static boolean are Potential Matches Ignored return Search Preference Page are Potential Matches Ignored  arePotentialMatchesIgnored SearchPreferencePage arePotentialMatchesIgnored
Returns the ID of the default perspective p The perspective with this ID will be used to show the Search view If no default perspective is set then the Search view will appear in the current perspective p return the ID of the default perspective code null code if no default perspective is set public static String get Default Perspective Id return Search Preference Page get Default Perspective Id  getDefaultPerspectiveId SearchPreferencePage getDefaultPerspectiveId

public abstract class Search Result Event extends Event Object Creates a new search result event for the given search result param search Result the source of the event protected Search Result Event I Search Result search Result super search Result  SearchResultEvent EventObject searchResult SearchResultEvent ISearchResult searchResult searchResult
Gets the code I Search Result code for this event return the source of this event public I Search Result get Search Result return I Search Result get Source  ISearchResult ISearchResult getSearchResult ISearchResult getSource

Activates the search result view in the active page of the active workbench window This call has no effect but returns code true code if the search result view is already activated return code true code if the search result view could be activated deprecated Use link New SearchUI activate Search Result View instead public static boolean activate Search Result View return Search Plugin activate Search Result View  NewSearchUI activateSearchResultView activateSearchResultView SearchPlugin activateSearchResultView
Opens the search dialog If code page Id code is specified and a corresponding page is found then it is brought to top param page Idthe page to select or code null code if the best fitting page should be selected since 2 0 deprecated Use link New SearchUI open Search Dialog I Workbench Window String instead public static void open Search Dialog I Workbench Window window String page Id New SearchUI open Search Dialog window page Id  pageId pageIdthe NewSearchUI openSearchDialog IWorkbenchWindow openSearchDialog IWorkbenchWindow pageId NewSearchUI openSearchDialog pageId
Returns the search result view of the active page of the active workbench window returnthe search result view or code null code if there is no active search result view deprecated Use link New SearchUI get Search Result View instead public static I Search Result View get Search Result View return Search Plugin get Search Result View  NewSearchUI getSearchResultView ISearchResultView getSearchResultView SearchPlugin getSearchResultView
Returns the shared search marker image Normally editors show this icon in their vertical ruler This image is owned by the search UI plug in and must not be disposed by clients return the shared image public static Image get Search Marker Image return Search Plugin Images get Search Plugin Images IMG OBJ SEARCHMARKER  getSearchMarkerImage SearchPluginImages SearchPluginImages IMG_OBJ_SEARCHMARKER
Returns the preference whether editors should be reused when showing search results The goto action can decide to use or ignore this preference return code true code if editors should be reused for showing search results since 2 0 deprecated Use link New SearchUI reuse Editor instead public static boolean reuse Editor return New SearchUI reuse Editor  NewSearchUI reuseEditor reuseEditor NewSearchUI reuseEditor
Returns the preference whether a search engine is allowed to report potential matches or not p Search engines which can report inexact matches must respect this preference i e they should not report inexact matches if this method returns code true code p return code true code if search engine must not report inexact matches since 2 1 deprecated Use link New SearchUI are Potential Matches Ignored instead public static boolean are Potential Matches Ignored return New SearchUI are Potential Matches Ignored  NewSearchUI arePotentialMatchesIgnored arePotentialMatchesIgnored NewSearchUI arePotentialMatchesIgnored
Returns the ID of the default perspective p The perspective with this ID will be used to show the Search view If no default perspective is set then the Search view will appear in the current perspective p return the ID of the default perspective code null code if no default perspective is set since 2 1 deprecated Use link New SearchUI get Default Perspective Id instead public static String get Default Perspective Id return New SearchUI get Default Perspective Id  NewSearchUI getDefaultPerspectiveId getDefaultPerspectiveId NewSearchUI getDefaultPerspectiveId
Block instantiation private SearchUI 

Constructs a new code Abstract Text Search Result code protected Abstract Text Search Result f Elements To Matches new Hash Map f Listeners new Array List f Match Event new Match Event this  AbstractTextSearchResult AbstractTextSearchResult fElementsToMatches HashMap fListeners ArrayList fMatchEvent MatchEvent
Returns an array with all matches reported against the given element param element the element to report matches for return all matches reported for this element see Match get Element public Match get Matches Object element synchronized f Elements To Matches return do Get Matches element  getElement getMatches fElementsToMatches doGetMatches
private Match do Get Matches Object element List matches List f Elements To Matches get element if matches null return Match matches to Array new Match matches size return EMPTY ARRAY  doGetMatches fElementsToMatches toArray EMPTY_ARRAY
Adds a code Match code to this search result This method does nothing if the match is already present p Subclasses may extend this method p param match the match to add public void add Match Match match boolean has Added false synchronized f Elements To Matches has Added do Add Match match if has Added fire Change get Search Result Event match Match Event ADDED  addMatch hasAdded fElementsToMatches hasAdded doAddMatch hasAdded fireChange getSearchResultEvent MatchEvent
Adds a number of Matches to this search result This method does nothing for matches that are already present p Subclasses may extend this method p param matches the matches to add public void add Matches Match matches Set really Added new Hash Set synchronized f Elements To Matches for int i 0 i matches length i if do Add Match matches i really Added add matches i if really Added size 0 fire Change get Search Result Event really Added Match Event ADDED  addMatches reallyAdded HashSet fElementsToMatches doAddMatch reallyAdded reallyAdded fireChange getSearchResultEvent reallyAdded MatchEvent
private Match Event get Search Result Event Match match int event Kind f Match Event set Kind event Kind f Match Event set Match match return f Match Event  MatchEvent getSearchResultEvent eventKind fMatchEvent setKind eventKind fMatchEvent setMatch fMatchEvent
private Match Event get Search Result Event Set matches int event Kind f Match Event set Kind event Kind Match match Array new Match matches size matches to Array match Array f Match Event set Matches match Array return f Match Event  MatchEvent getSearchResultEvent eventKind fMatchEvent setKind eventKind matchArray toArray matchArray fMatchEvent setMatches matchArray fMatchEvent
private boolean do Add Match Match match List matches List f Elements To Matches get match get Element if matches null matches new Array List f Elements To Matches put match get Element matches if matches contains match insert Sorted matches match return true return false  doAddMatch fElementsToMatches getElement ArrayList fElementsToMatches getElement insertSorted
private static void insert Sorted List matches Match match if matches size 0 matches add match return int insert Index get Insert Index matches match matches add insert Index match  insertSorted insertIndex getInsertIndex insertIndex
private static int get Insert Index List matches Match match int count matches size int min 0 max count 1 while min max int mid min max 2 Match data Match matches get mid int compare compare match data if compare 0 max mid 1 else min mid 1 return min  getInsertIndex
private static int compare Match match1 Match match2 int diff match2 get Offset match1 get Offset if diff 0 return diff return match2 get Length match1 get Length  getOffset getOffset getLength getLength
Removes all matches from this search result p Subclasses may extend this method p public void remove All synchronized f Elements To Matches do Remove All fire Change new Remove All Event this  removeAll fElementsToMatches doRemoveAll fireChange RemoveAllEvent
fire Change new Remove All Event this private void do Remove All f Elements To Matches clear  fireChange RemoveAllEvent doRemoveAll fElementsToMatches
Removes the given match from this search result This method has no effect if the match is not found p Subclasses may extend this method p param match the match to remove public void remove Match Match match boolean existed false synchronized f Elements To Matches existed do Remove Match match if existed fire Change get Search Result Event match Match Event REMOVED  removeMatch fElementsToMatches doRemoveMatch fireChange getSearchResultEvent MatchEvent
Removes the given matches from this search result This method has no effect for matches that are not found p Subclasses may extend this method p param matches the matches to remove public void remove Matches Match matches Set existing new Hash Set synchronized f Elements To Matches for int i 0 i matches length i if do Remove Match matches i existing add matches i if existing size 0 fire Change get Search Result Event existing Match Event REMOVED  removeMatches HashSet fElementsToMatches doRemoveMatch fireChange getSearchResultEvent MatchEvent
private boolean do Remove Match Match match boolean existed false List matches List f Elements To Matches get match get Element if matches null existed matches remove match if matches is Empty f Elements To Matches remove match get Element return existed  doRemoveMatch fElementsToMatches getElement isEmpty fElementsToMatches getElement
inherit Doc public void add Listener I Search Result Listener l synchronized f Listeners f Listeners add l  inheritDoc addListener ISearchResultListener fListeners fListeners
inherit Doc public void remove Listener I Search Result Listener l synchronized f Listeners f Listeners remove l  inheritDoc removeListener ISearchResultListener fListeners fListeners
Send the given code Search Result Event code to all registered search result listeners param e the event to be sent see I Search Result Listener protected void fire Change Search Result Event e Hash Set copied Listeners new Hash Set synchronized f Listeners copied Listeners add All f Listeners Iterator listeners copied Listeners iterator while listeners has Next I Search Result Listener listeners next search Result Changed e  SearchResultEvent ISearchResultListener fireChange SearchResultEvent HashSet copiedListeners HashSet fListeners copiedListeners addAll fListeners copiedListeners hasNext ISearchResultListener searchResultChanged
Returns the total number of matches contained in this search result return total number of matches public int get Match Count int count 0 synchronized f Elements To Matches for Iterator elements f Elements To Matches values iterator elements has Next List element List elements next if element null count element size return count  getMatchCount fElementsToMatches fElementsToMatches hasNext
Returns the number of matches reported against a given element This is equivalent to calling code get Matches element length code param element the element to get the match count for return the number of matches reported against the element public int get Match Count Object element List matches List f Elements To Matches get element if matches null return matches size return 0  getMatches getMatchCount fElementsToMatches
Returns an array containing the set of all elements that matches are reported against in this search result return the set of elements in this search result public Object get Elements synchronized f Elements To Matches return f Elements To Matches key Set to Array  getElements fElementsToMatches fElementsToMatches keySet toArray
Returns an implementation of code I Editor Match Adapter code appropriate for this search result return an appropriate adapter or code null code if none has been implemented see I Editor Match Adapter  IEditorMatchAdapter IEditorMatchAdapter
Returns an implementation of code I File Match Adapter code appropriate for this search result return an appropriate adapter or code null code if none has been implemented see I File Match Adapter  IFileMatchAdapter IFileMatchAdapter

private class UpdateUI Job extends UI Job public UpdateUI Job super Search Messages get String Abstract Text Search View Page update job name NON NLS 1 set System true  UpdateUIJob UIJob UpdateUIJob SearchMessages getString AbstractTextSearchViewPage update_job setSystem
public I Status run InUI Thread I Progress Monitor monitor Control control get Control if control null control is Disposed disposed the control while the UI was posted return Status OK STATUS run Batched Updates if has More Updates is Query Running schedule 500 else f IsUI Update Scheduled false turn On Decoration f View Part update Label return Status OK STATUS  IStatus runInUIThread IProgressMonitor getControl isDisposed OK_STATUS runBatchedUpdates hasMoreUpdates isQueryRunning fIsUIUpdateScheduled turnOnDecoration fViewPart updateLabel OK_STATUS
Undocumented for testing only Used to find UpdateUI Jobs public boolean belongs To Object family return family Abstract Text Search View Page this  UpdateUIJobs belongsTo AbstractTextSearchViewPage
private Array List f Listeners new Array List 5 public void add Selection Changed Listener I Selection Changed Listener listener f Listeners add listener  ArrayList fListeners ArrayList addSelectionChangedListener ISelectionChangedListener fListeners
public I Selection get Selection return f Viewer get Selection  ISelection getSelection fViewer getSelection
public void remove Selection Changed Listener I Selection Changed Listener listener f Listeners remove listener  removeSelectionChangedListener ISelectionChangedListener fListeners
public void set Selection I Selection selection f Viewer set Selection selection  setSelection ISelection fViewer setSelection
public void selection Changed Selection Changed Event event forward to my listeners Selection Changed Event wrapped Event new Selection Changed Event this event get Selection for Iterator listeners f Listeners iterator listeners has Next I Selection Changed Listener listener I Selection Changed Listener listeners next listener selection Changed wrapped Event  selectionChanged SelectionChangedEvent SelectionChangedEvent wrappedEvent SelectionChangedEvent getSelection fListeners hasNext ISelectionChangedListener ISelectionChangedListener selectionChanged wrappedEvent
f Batched Updates new Hash Set f Listener new I Search Result Listener public void search Result Changed Search Result Event e handle Search Results Changed e  fBatchedUpdates HashSet fListener ISearchResultListener searchResultChanged SearchResultEvent handleSearchResultsChanged
This constructor must be passed a combination of layout flags combined with bitwise or At least one flag must be passed in i e 0 is not a permitted value param supported Layouts flags determining which layout options this page supports Must not be 0 see FLAG LAYOUT FLAT see FLAG LAYOUT TREE protected Abstract Text Search View Page int supported Layouts f Supported Layouts supported Layouts init Layout f Remove All Results Action new Remove All Matches Action this f Remove Selected Matches new Remove Selected Matches Action this f Remove Current Match new Remove Match Action this f Show Next Action new Show Next Result Action this f Show Previous Action new Show Previous Result Action this create Layout Actions f Batched Updates new Hash Set f Listener new I Search Result Listener public void search Result Changed Search Result Event e handle Search Results Changed e  supportedLayouts FLAG_LAYOUT_FLAT FLAG_LAYOUT_TREE AbstractTextSearchViewPage supportedLayouts fSupportedLayouts supportedLayouts initLayout fRemoveAllResultsAction RemoveAllMatchesAction fRemoveSelectedMatches RemoveSelectedMatchesAction fRemoveCurrentMatch RemoveMatchAction fShowNextAction ShowNextResultAction fShowPreviousAction ShowPreviousResultAction createLayoutActions fBatchedUpdates HashSet fListener ISearchResultListener searchResultChanged SearchResultEvent handleSearchResultsChanged
private void init Layout if supports Tree Layout f Current Layout FLAG LAYOUT TREE else f Current Layout FLAG LAYOUT FLAT  initLayout supportsTreeLayout fCurrentLayout FLAG_LAYOUT_TREE fCurrentLayout FLAG_LAYOUT_FLAT
Constructs this page with the default layout flags see Abstract Text Search View Page Abstract Text Search View Page int protected Abstract Text Search View Page this FLAG LAYOUT FLAT FLAG LAYOUT TREE  AbstractTextSearchViewPage AbstractTextSearchViewPage AbstractTextSearchViewPage FLAG_LAYOUT_FLAT FLAG_LAYOUT_TREE
private void create Layout Actions if count Bits f Supported Layouts 1 f Flat Action new Set Layout Action this Search Messages get String Abstract Text Search View Page flat layout label Search Messages get String Abstract Text Search View Page flat layout tooltip FLAG LAYOUT FLAT NON NLS 1 NON NLS 2 f Hierarchical Action new Set Layout Action this Search Messages get String Abstract Text Search View Page hierarchical layout label Search Messages get String Abstract Text Search View Page hierarchical layout tooltip FLAG LAYOUT TREE NON NLS 1 NON NLS 2 Search Plugin Images set Image Descriptors f Flat Action Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH FLAT LAYOUT Search Plugin Images set Image Descriptors f Hierarchical Action Search Plugin Images T LCL Search Plugin Images IMG LCL SEARCH HIERARCHICAL LAYOUT  createLayoutActions countBits fSupportedLayouts fFlatAction SetLayoutAction SearchMessages getString AbstractTextSearchViewPage flat_layout SearchMessages getString AbstractTextSearchViewPage flat_layout FLAG_LAYOUT_FLAT fHierarchicalAction SetLayoutAction SearchMessages getString AbstractTextSearchViewPage hierarchical_layout SearchMessages getString AbstractTextSearchViewPage hierarchical_layout FLAG_LAYOUT_TREE SearchPluginImages setImageDescriptors fFlatAction SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_FLAT_LAYOUT SearchPluginImages setImageDescriptors fHierarchicalAction SearchPluginImages T_LCL SearchPluginImages IMG_LCL_SEARCH_HIERARCHICAL_LAYOUT
private int count Bits int layout Flags int bit Count 0 for int i 0 i 32 i if layout Flags 2 1 bit Count layout Flags 1 return bit Count  countBits layoutFlags bitCount layoutFlags bitCount layoutFlags bitCount
private boolean supports Tree Layout return is Layout Supported FLAG LAYOUT TREE  supportsTreeLayout isLayoutSupported FLAG_LAYOUT_TREE
Returns a dialog settings object for this search result page There will be one dialog settings object per search result page id return the dialog settings for this search result page see Abstract Text Search View Page getID protected I Dialog Settings get Settings I Dialog Settings parent Search Plugin get Default get Dialog Settings I Dialog Settings settings parent get Section getID if settings null settings parent add New Section getID return settings  AbstractTextSearchViewPage IDialogSettings getSettings IDialogSettings SearchPlugin getDefault getDialogSettings IDialogSettings getSection addNewSection
inherit Doc public void setID String id f Id id  inheritDoc fId
inherit Doc public String getID return f Id  inheritDoc fId
inherit Doc public String get Label Abstract Text Search Result result get Input if result null return NON NLS 1 return result get Label  inheritDoc getLabel AbstractTextSearchResult getInput getLabel
Opens an editor on the given element and selects the given range of text If a search results implements a code I File Match Adapter code match locations will be tracked and the current match range will be passed into this method param match the match to show param current Offset the current start offset of the match param current Length the current length of the selection throws Part Init Exception if an editor can t be opened see org eclipse core filebuffers I Text File Buffer Manager see I File Match Adapter deprecated protected void show Match Match match int current Offset int current Length throws Part Init Exception  IFileMatchAdapter currentOffset currentLength PartInitException ITextFileBufferManager IFileMatchAdapter showMatch currentOffset currentLength PartInitException
Opens an editor on the given element and selects the given range of text If a search results implements a code I File Match Adapter code match locations will be tracked and the current match range will be passed into this method If the code activate code parameter is code true code the opened editor shoud have be activated Otherwise the focus should not be changed param match the match to show param current Offset the current start offset of the match param current Length the current length of the selection param activate whether to activate the editor throws Part Init Exception if an editor can t be opened see org eclipse core filebuffers I Text File Buffer Manager see I File Match Adapter protected void show Match Match match int current Offset int current Length boolean activate throws Part Init Exception show Match match current Offset current Length  IFileMatchAdapter currentOffset currentLength PartInitException ITextFileBufferManager IFileMatchAdapter showMatch currentOffset currentLength PartInitException showMatch currentOffset currentLength
This method is called whenever the set of matches for the given elements changes This method is guaranteed to be called in the UI thread Note that this notification is asynchronous i e further changes may have occurred by the time this method is called They will be described in a future call param objects array of objects that has to be refreshed 
This method is called whenever all elements have been removed from the shown code Abstract Search Result code This method is guaranteed to be called in the UI thread Note that this notification is asynchronous i e further changes may have occurred by the time this method is called They will be described in a future call  AbstractSearchResult
Configures the given viewer Implementers have to set at least a content provider and a label provider This method may be called if the page was constructed with the flag code FLAG LAYOUT TREE code param viewer the viewer to be configured  FLAG_LAYOUT_TREE
Configures the given viewer Implementers have to set at least a content provider and a label provider This method may be called if the page was constructed with the flag code FLAG LAYOUT FLAT code param viewer the viewer to be configured  FLAG_LAYOUT_FLAT
Fills the context menu for this page Subclasses may override this method param mgr the menu manager representing the context menu protected void fill Context Menu I Menu Manager mgr mgr append To Group I Context Menu Constants GROUP ADDITIONS f Copy To Clipboard Action mgr append To Group I Context Menu Constants GROUP SHOW f Show Next Action mgr append To Group I Context Menu Constants GROUP SHOW f Show Previous Action if get Current Match null mgr append To Group I Context Menu Constants GROUP REMOVE MATCHES f Remove Current Match if get Viewer get Selection is Empty mgr append To Group I Context Menu Constants GROUP REMOVE MATCHES f Remove Selected Matches mgr append To Group I Context Menu Constants GROUP REMOVE MATCHES f Remove All Results Action  fillContextMenu IMenuManager appendToGroup IContextMenuConstants GROUP_ADDITIONS fCopyToClipboardAction appendToGroup IContextMenuConstants GROUP_SHOW fShowNextAction appendToGroup IContextMenuConstants GROUP_SHOW fShowPreviousAction getCurrentMatch appendToGroup IContextMenuConstants GROUP_REMOVE_MATCHES fRemoveCurrentMatch getViewer getSelection isEmpty appendToGroup IContextMenuConstants GROUP_REMOVE_MATCHES fRemoveSelectedMatches appendToGroup IContextMenuConstants GROUP_REMOVE_MATCHES fRemoveAllResultsAction
f Menu add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr Search View create Standard Groups mgr fill Context Menu mgr f View Part fill Context Menu mgr  fMenu addMenuListener IMenuListener menuAboutToShow IMenuManager SearchView createStandardGroups fillContextMenu fViewPart fillContextMenu
inherit Doc public void create Control Composite parent f Query Listener create Query Listener f Menu new Menu Manager Pop Up NON NLS 1 f Menu set Remove All When Shown true f Menu set Parent get Site get Action Bars get Menu Manager f Menu add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr Search View create Standard Groups mgr fill Context Menu mgr f View Part fill Context Menu mgr f Pagebook new Page Book parent SWT NULL f Pagebook set Layout Data new Grid Data Grid Data FILL BOTH f Busy Label create Busy Control f Viewer Container new Composite f Pagebook SWT NULL f Viewer Container set Layout Data new Grid Data Grid Data FILL BOTH f Viewer Container set Size 100 100 f Viewer Container set Layout new Fill Layout f Viewer Adapter new Selection Provider Adapter get Site set Selection Provider f Viewer Adapter Register menu get Site register Context Menu f View Part get View Site get Id f Menu f Viewer Adapter create Viewer f Viewer Container f Current Layout show Busy Label f Is Busy Shown New SearchUI add Query Listener f Query Listener  inheritDoc createControl fQueryListener createQueryListener fMenu MenuManager PopUp fMenu setRemoveAllWhenShown fMenu setParent getSite getActionBars getMenuManager fMenu addMenuListener IMenuListener menuAboutToShow IMenuManager SearchView createStandardGroups fillContextMenu fViewPart fillContextMenu fPagebook PageBook fPagebook setLayoutData GridData GridData FILL_BOTH fBusyLabel createBusyControl fViewerContainer fPagebook fViewerContainer setLayoutData GridData GridData FILL_BOTH fViewerContainer setSize fViewerContainer setLayout FillLayout fViewerAdapter SelectionProviderAdapter getSite setSelectionProvider fViewerAdapter getSite registerContextMenu fViewPart getViewSite getId fMenu fViewerAdapter createViewer fViewerContainer fCurrentLayout showBusyLabel fIsBusyShown NewSearchUI addQueryListener fQueryListener
private Control create Busy Control Table busy Label new Table f Pagebook SWT NONE Table Item item new Table Item busy Label SWT NONE item set Text Search Messages get String Abstract Text Search View Page searching label NON NLS 1 busy Label set Layout Data new Grid Data Grid Data FILL HORIZONTAL return busy Label  createBusyControl busyLabel fPagebook TableItem TableItem busyLabel setText SearchMessages getString AbstractTextSearchViewPage busyLabel setLayoutData GridData GridData FILL_HORIZONTAL busyLabel
private synchronized void scheduleUI Update if f IsUI Update Scheduled f IsUI Update Scheduled true new UpdateUI Job schedule  scheduleUIUpdate fIsUIUpdateScheduled fIsUIUpdateScheduled UpdateUIJob
private I Query Listener create Query Listener return new I Query Listener public void query Added I Search Query query ignore  IQueryListener createQueryListener IQueryListener queryAdded ISearchQuery
public void query Removed I Search Query query ignore  queryRemoved ISearchQuery
final Runnable runnable1 new Runnable public void run update Busy Label Abstract Text Search Result result get Input if result null result get Query equals query return turn Off Decoration scheduleUI Update  updateBusyLabel AbstractTextSearchResult getInput getQuery turnOffDecoration scheduleUIUpdate
public void query Starting final I Search Query query final Runnable runnable1 new Runnable public void run update Busy Label Abstract Text Search Result result get Input if result null result get Query equals query return turn Off Decoration scheduleUI Update async Exec runnable1  queryStarting ISearchQuery updateBusyLabel AbstractTextSearchResult getInput getQuery turnOffDecoration scheduleUIUpdate asyncExec
final Runnable runnable2 new Runnable public void run update Busy Label Abstract Text Search Result result get Input if result null result get Query equals query return if f Viewer get Selection is Empty navigate Next true  updateBusyLabel AbstractTextSearchResult getInput getQuery fViewer getSelection isEmpty navigateNext
public void query Finished final I Search Query query final Runnable runnable2 new Runnable public void run update Busy Label Abstract Text Search Result result get Input if result null result get Query equals query return if f Viewer get Selection is Empty navigate Next true async Exec runnable2  queryFinished ISearchQuery updateBusyLabel AbstractTextSearchResult getInput getQuery fViewer getSelection isEmpty navigateNext asyncExec
private I Query Listener create Query Listener return new I Query Listener public void query Added I Search Query query ignore public void query Removed I Search Query query ignore public void query Starting final I Search Query query final Runnable runnable1 new Runnable public void run update Busy Label Abstract Text Search Result result get Input if result null result get Query equals query return turn Off Decoration scheduleUI Update async Exec runnable1 public void query Finished final I Search Query query final Runnable runnable2 new Runnable public void run update Busy Label Abstract Text Search Result result get Input if result null result get Query equals query return if f Viewer get Selection is Empty navigate Next true async Exec runnable2  IQueryListener createQueryListener IQueryListener queryAdded ISearchQuery queryRemoved ISearchQuery queryStarting ISearchQuery updateBusyLabel AbstractTextSearchResult getInput getQuery turnOffDecoration scheduleUIUpdate asyncExec queryFinished ISearchQuery updateBusyLabel AbstractTextSearchResult getInput getQuery fViewer getSelection isEmpty navigateNext asyncExec
private void update Busy Label Abstract Text Search Result result get Input boolean should Show Busy result null New SearchUI is Query Running result get Query result get Match Count 0 if should Show Busy f Is Busy Shown return f Is Busy Shown should Show Busy show Busy Label f Is Busy Shown  updateBusyLabel AbstractTextSearchResult getInput shouldShowBusy NewSearchUI isQueryRunning getQuery getMatchCount shouldShowBusy fIsBusyShown fIsBusyShown shouldShowBusy showBusyLabel fIsBusyShown
private void show Busy Label boolean should Show Busy if should Show Busy f Pagebook show Page f Busy Label else f Pagebook show Page f Viewer Container  showBusyLabel shouldShowBusy shouldShowBusy fPagebook showPage fBusyLabel fPagebook showPage fViewerContainer
Determines whether a certain layout is supported by this search result page param layout the layout to test for return whether the given layout is supported or not see Abstract Text Search View Page Abstract Text Search View Page int public boolean is Layout Supported int layout return layout f Supported Layouts layout  AbstractTextSearchViewPage AbstractTextSearchViewPage isLayoutSupported fSupportedLayouts
Sets the layout of this search result page The layout must be on of code FLAG LAYOUT FLAT code or code FLAG LAYOUT TREE code and it must be one of the values passed during construction of this search result page param layout the new layout see Abstract Text Search View Page is Layout Supported int public void set Layout int layout Assert is True count Bits layout 1 Assert is True is Layout Supported layout if count Bits f Supported Layouts 2 return if f Current Layout layout return f Current Layout layout I Selection selection f Viewer get Selection I Search Result result disconnect Viewer dispose Viewer create Viewer f Viewer Container layout f Viewer Container layout true connect Viewer result f Viewer set Selection selection true get Settings put KEY LAYOUT layout get View Part update Label  FLAG_LAYOUT_FLAT FLAG_LAYOUT_TREE AbstractTextSearchViewPage isLayoutSupported setLayout isTrue countBits isTrue isLayoutSupported countBits fSupportedLayouts fCurrentLayout fCurrentLayout ISelection fViewer getSelection ISearchResult disconnectViewer disposeViewer createViewer fViewerContainer fViewerContainer connectViewer fViewer setSelection getSettings KEY_LAYOUT getViewPart updateLabel
private void dispose Viewer f Viewer remove Selection Changed Listener f Viewer Adapter f Viewer get Control dispose f Viewer null  disposeViewer fViewer removeSelectionChangedListener fViewerAdapter fViewer getControl fViewer
private void update Layout Actions if f Flat Action null f Flat Action set Checked f Current Layout f Flat Action get Layout if f Hierarchical Action null f Hierarchical Action set Checked f Current Layout f Hierarchical Action get Layout  updateLayoutActions fFlatAction fFlatAction setChecked fCurrentLayout fFlatAction getLayout fHierarchicalAction fHierarchicalAction setChecked fCurrentLayout fHierarchicalAction getLayout
Return the layout this page is currently using return the layout this page is currently using see FLAG LAYOUT FLAT see FLAG LAYOUT TREE public int get Layout return f Current Layout  FLAG_LAYOUT_FLAT FLAG_LAYOUT_TREE getLayout fCurrentLayout
tbm update false f Viewer add Open Listener new I Open Listener public void open Open Event event handle Open event  fViewer addOpenListener IOpenListener OpenEvent handleOpen
f Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event f Current Match Index 1 f Remove Selected Matches set Enabled event get Selection is Empty  fViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent fCurrentMatchIndex fRemoveSelectedMatches setEnabled getSelection isEmpty
private void create Viewer Composite parent int layout if layout FLAG LAYOUT FLAT 0 Table Viewer viewer create Table Viewer parent f Viewer viewer configure Table Viewer viewer else if layout FLAG LAYOUT TREE 0 Tree Viewer viewer create Tree Viewer parent f Viewer viewer configure Tree Viewer viewer I Tool Bar Manager tbm get Site get Action Bars get Tool Bar Manager tbm remove All Search View create Standard Groups tbm fill Toolbar tbm tbm update false f Viewer add Open Listener new I Open Listener public void open Open Event event handle Open event f Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event f Current Match Index 1 f Remove Selected Matches set Enabled event get Selection is Empty f Viewer add Selection Changed Listener f Viewer Adapter Menu menu f Menu create Context Menu f Viewer get Control f Viewer get Control set Menu menu update Layout Actions get View Part update Label  createViewer FLAG_LAYOUT_FLAT TableViewer createTableViewer fViewer configureTableViewer FLAG_LAYOUT_TREE TreeViewer createTreeViewer fViewer configureTreeViewer IToolBarManager getSite getActionBars getToolBarManager removeAll SearchView createStandardGroups fillToolbar fViewer addOpenListener IOpenListener OpenEvent handleOpen fViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent fCurrentMatchIndex fRemoveSelectedMatches setEnabled getSelection isEmpty fViewer addSelectionChangedListener fViewerAdapter fMenu createContextMenu fViewer getControl fViewer getControl setMenu updateLayoutActions getViewPart updateLabel
Creates the tree viewer to be shown on this page Clients may override this method param parent the parent widget return returns a newly created code Tree Viewer code protected Tree Viewer create Tree Viewer Composite parent return new Tree Viewer parent SWT MULTI SWT H SCROLL SWT V SCROLL  TreeViewer TreeViewer createTreeViewer TreeViewer H_SCROLL V_SCROLL
return new Table Viewer parent SWT MULTI SWT H SCROLL SWT V SCROLL SWT FULL SELECTION protected void handle Label Provider Changed Label Provider Changed Event event get Table set Redraw false try super handle Label Provider Changed event finally get Table set Redraw true  TableViewer H_SCROLL V_SCROLL FULL_SELECTION handleLabelProviderChanged LabelProviderChangedEvent getTable setRedraw handleLabelProviderChanged getTable setRedraw
Creates the table viewer to be shown on this page Clients may override this method param parent the parent widget return returns a newly created code Table Viewer code protected Table Viewer create Table Viewer Composite parent return new Table Viewer parent SWT MULTI SWT H SCROLL SWT V SCROLL SWT FULL SELECTION protected void handle Label Provider Changed Label Provider Changed Event event get Table set Redraw false try super handle Label Provider Changed event finally get Table set Redraw true  TableViewer TableViewer createTableViewer TableViewer H_SCROLL V_SCROLL FULL_SELECTION handleLabelProviderChanged LabelProviderChangedEvent getTable setRedraw handleLabelProviderChanged getTable setRedraw
inherit Doc public void set Focus Control control f Viewer get Control if control null control is Disposed control set Focus  inheritDoc setFocus fViewer getControl isDisposed setFocus
inherit Doc public Control get Control return f Pagebook  inheritDoc getControl fPagebook
inherit Doc public void set Input I Search Result search Object view State I Search Result old Search disconnect Viewer if old Search null old Search remove Listener f Listener Annotation Managers search Result Activated get Site get Workbench Window Abstract Text Search Result search f Input search if search null search add Listener f Listener connect Viewer search if view State instanceof I Selection f Viewer set Selection I Selection view State true else navigate Next true update Busy Label turn Off Decoration scheduleUI Update  inheritDoc setInput ISearchResult viewState ISearchResult oldSearch disconnectViewer oldSearch oldSearch removeListener fListener AnnotationManagers searchResultActivated getSite getWorkbenchWindow AbstractTextSearchResult fInput addListener fListener connectViewer viewState ISelection fViewer setSelection ISelection viewState navigateNext updateBusyLabel turnOffDecoration scheduleUIUpdate
inherit Doc public Object getUI State return f Viewer get Selection  inheritDoc getUIState fViewer getSelection
private void connect Viewer I Search Result search f Copy To Clipboard Action new Copy To Clipboard Action f Viewer f Viewer set Input search  connectViewer ISearchResult fCopyToClipboardAction CopyToClipboardAction fViewer fViewer setInput
private I Search Result disconnect Viewer I Search Result result I Search Result f Viewer get Input f Viewer set Input null return result  ISearchResult disconnectViewer ISearchResult ISearchResult fViewer getInput fViewer setInput
Returns the viewer currently used in this page return the currently used viewer or code null code if none has been created yet protected Structured Viewer get Viewer return f Viewer  StructuredViewer getViewer fViewer
I Safe Runnable runnable new I Safe Runnable public void handle Exception Throwable exception if exception instanceof Part Init Exception Part Init Exception pie Part Init Exception exception Error Dialog open Error get Site get Shell Search Messages get String Default Search View Page show match Search Messages get String Default Search View Page error no editor pie get Status NON NLS 1 NON NLS 2  ISafeRunnable ISafeRunnable handleException PartInitException PartInitException PartInitException ErrorDialog openError getSite getShell SearchMessages getString DefaultSearchViewPage show_match SearchMessages getString DefaultSearchViewPage no_editor getStatus
public void run throws Exception Position current Position Internal SearchUI get Instance get Position Tracker get Current Position match if current Position null show Match match current Position get Offset current Position get Length activate Editor else show Match match match get Offset match get Length activate Editor  currentPosition InternalSearchUI getInstance getPositionTracker getCurrentPosition currentPosition showMatch currentPosition getOffset currentPosition getLength activateEditor showMatch getOffset getLength activateEditor
private void show Match final Match match final boolean activate Editor I Safe Runnable runnable new I Safe Runnable public void handle Exception Throwable exception if exception instanceof Part Init Exception Part Init Exception pie Part Init Exception exception Error Dialog open Error get Site get Shell Search Messages get String Default Search View Page show match Search Messages get String Default Search View Page error no editor pie get Status NON NLS 1 NON NLS 2 public void run throws Exception Position current Position Internal SearchUI get Instance get Position Tracker get Current Position match if current Position null show Match match current Position get Offset current Position get Length activate Editor else show Match match match get Offset match get Length activate Editor Platform run runnable  showMatch activateEditor ISafeRunnable ISafeRunnable handleException PartInitException PartInitException PartInitException ErrorDialog openError getSite getShell SearchMessages getString DefaultSearchViewPage show_match SearchMessages getString DefaultSearchViewPage no_editor getStatus currentPosition InternalSearchUI getInstance getPositionTracker getCurrentPosition currentPosition showMatch currentPosition getOffset currentPosition getLength activateEditor showMatch getOffset getLength activateEditor
Returns the currently shown result return the previously set result or code null code see Abstract Text Search View Page set Input I Search Result Object public Abstract Text Search Result get Input return Abstract Text Search Result f Input  AbstractTextSearchViewPage setInput ISearchResult AbstractTextSearchResult getInput AbstractTextSearchResult fInput
Selects the element corresponding to the next match and shows the match in an editor Note that this will cycle back to the first match after the last match public void goto Next Match goto Next Match false  gotoNextMatch gotoNextMatch
private void goto Next Match boolean activate Editor f Current Match Index Match next Match get Current Match if next Match null navigate Next true f Current Match Index 0 show Current Match activate Editor  gotoNextMatch activateEditor fCurrentMatchIndex nextMatch getCurrentMatch nextMatch navigateNext fCurrentMatchIndex showCurrentMatch activateEditor
Selects the element corresponding to the previous match and shows the match in an editor Note that this will cycle back to the last match after the first match public void goto Previous Match goto Previous Match false  gotoPreviousMatch gotoPreviousMatch
private void goto Previous Match boolean activate Editor f Current Match Index Match next Match get Current Match if next Match null navigate Next false f Current Match Index get Input get Match Count get First Selected Element 1 show Current Match activate Editor  gotoPreviousMatch activateEditor fCurrentMatchIndex nextMatch getCurrentMatch nextMatch navigateNext fCurrentMatchIndex getInput getMatchCount getFirstSelectedElement showCurrentMatch activateEditor
private void navigate Next boolean forward I Navigate navigator null if f Viewer instanceof Table Viewer navigator new Table Viewer Navigator Table Viewer f Viewer else navigator new Tree Viewer Navigator this Tree Viewer f Viewer navigator navigate Next forward  navigateNext INavigate fViewer TableViewer TableViewerNavigator TableViewer fViewer TreeViewerNavigator TreeViewer fViewer navigateNext
private boolean show Current Match boolean activate Editor Match current Match get Current Match if current Match null show Match current Match activate Editor return true else return false  showCurrentMatch activateEditor currentMatch getCurrentMatch currentMatch showMatch currentMatch activateEditor
Returns the currently selected match return the selected match or code null code if none are selected public Match get Current Match Object element get First Selected Element if element null Match matches get Displayed Matches element if f Current Match Index 0 f Current Match Index matches length return matches f Current Match Index return null  getCurrentMatch getFirstSelectedElement getDisplayedMatches fCurrentMatchIndex fCurrentMatchIndex fCurrentMatchIndex
Returns the matches that are currently displayed for the given element While the default implementation just forwards to the current input search result of the page subclasses may override this method to do filtering etc Any action operating on the visible matches in the search result page should use this method to get the matches for a search result instead of asking the search result directly param element The element to get the matches for return The matches displayed for the given element If the current input of this page is code null code an empty array is returned see Abstract Text Search Result get Matches Object public Match get Displayed Matches Object element Abstract Text Search Result result get Input if result null return EMPTY MATCH ARRAY return result get Matches element  AbstractTextSearchResult getMatches getDisplayedMatches AbstractTextSearchResult getInput EMPTY_MATCH_ARRAY getMatches
Returns the number of matches that are currently displayed for the given element While the default implementation just forwards to the current input search result of the page subclasses may override this method to do filtering etc Any action operating on the visible matches in the search result page should use this method to get the match count for a search result instead of asking the search result directly param element The element to get the matches for return The number of matches displayed for the given element If the current input of this page is code null code 0 is returned see Abstract Text Search Result get Match Count Object public int get Displayed Match Count Object element Abstract Text Search Result result get Input if result null return 0 return result get Match Count element  AbstractTextSearchResult getMatchCount getDisplayedMatchCount AbstractTextSearchResult getInput getMatchCount
private Object get First Selected Element I Structured Selection selection I Structured Selection f Viewer get Selection if selection size 0 return selection get First Element return null  getFirstSelectedElement IStructuredSelection IStructuredSelection fViewer getSelection getFirstElement
inherit Doc public void dispose disconnect Viewer super dispose New SearchUI remove Query Listener f Query Listener  inheritDoc disconnectViewer NewSearchUI removeQueryListener fQueryListener
inherit Doc public void init I Page Site page Site super init page Site add Layout Actions page Site get Action Bars get Menu Manager init Action DefinitionI Ds page Site get Workbench Window page Site get Action Bars get Menu Manager update All true page Site get Action Bars update Action Bars  inheritDoc IPageSite pageSite pageSite addLayoutActions pageSite getActionBars getMenuManager initActionDefinitionIDs pageSite getWorkbenchWindow pageSite getActionBars getMenuManager updateAll pageSite getActionBars updateActionBars
private void init Action DefinitionI Ds I Workbench Window window f Remove Selected Matches set Action Definition Id get Action Definition Id window Action Factory DELETE f Show Next Action set Action Definition Id get Action Definition Id window Action Factory NEXT f Show Previous Action set Action Definition Id get Action Definition Id window Action Factory PREVIOUS  initActionDefinitionIDs IWorkbenchWindow fRemoveSelectedMatches setActionDefinitionId getActionDefinitionId ActionFactory fShowNextAction setActionDefinitionId getActionDefinitionId ActionFactory fShowPreviousAction setActionDefinitionId getActionDefinitionId ActionFactory
private String get Action Definition Id I Workbench Window window Action Factory factory I Workbench Action action factory create window String id action get Action Definition Id action dispose return id  getActionDefinitionId IWorkbenchWindow ActionFactory IWorkbenchAction getActionDefinitionId
Fills the toolbar contribution for this page Subclasses may override this method param tbm the tool bar manager representing the view s toolbar protected void fill Toolbar I Tool Bar Manager tbm tbm append To Group I Context Menu Constants GROUP SHOW f Show Next Action NON NLS 1 tbm append To Group I Context Menu Constants GROUP SHOW f Show Previous Action NON NLS 1 tbm append To Group I Context Menu Constants GROUP REMOVE MATCHES f Remove Selected Matches NON NLS 1 tbm append To Group I Context Menu Constants GROUP REMOVE MATCHES f Remove All Results Action NON NLS 1 I Action Bars action Bars get Site get Action Bars get Site get Workbench Window if action Bars null action Bars set Global Action Handler Action Factory NEXT get Id f Show Next Action action Bars set Global Action Handler Action Factory PREVIOUS get Id f Show Previous Action action Bars set Global Action Handler Action Factory DELETE get Id f Remove Selected Matches if get Layout FLAG LAYOUT TREE add Tree Actions tbm  fillToolbar IToolBarManager appendToGroup IContextMenuConstants GROUP_SHOW fShowNextAction appendToGroup IContextMenuConstants GROUP_SHOW fShowPreviousAction appendToGroup IContextMenuConstants GROUP_REMOVE_MATCHES fRemoveSelectedMatches appendToGroup IContextMenuConstants GROUP_REMOVE_MATCHES fRemoveAllResultsAction IActionBars actionBars getSite getActionBars getSite getWorkbenchWindow actionBars actionBars setGlobalActionHandler ActionFactory getId fShowNextAction actionBars setGlobalActionHandler ActionFactory getId fShowPreviousAction actionBars setGlobalActionHandler ActionFactory getId fRemoveSelectedMatches getLayout FLAG_LAYOUT_TREE addTreeActions
private void add Tree Actions I Tool Bar Manager tbm create new actions new viewer created tbm append To Group I Context Menu Constants GROUP VIEWER SETUP new Expand All Action Tree Viewer get Viewer tbm append To Group I Context Menu Constants GROUP VIEWER SETUP new Collapse All Action Tree Viewer get Viewer  addTreeActions IToolBarManager appendToGroup IContextMenuConstants GROUP_VIEWER_SETUP ExpandAllAction TreeViewer getViewer appendToGroup IContextMenuConstants GROUP_VIEWER_SETUP CollapseAllAction TreeViewer getViewer
private void add Layout Actions I Menu Manager menu Manager if f Flat Action null menu Manager append To Group I Context Menu Constants GROUP VIEWER SETUP f Flat Action if f Hierarchical Action null menu Manager append To Group I Context Menu Constants GROUP VIEWER SETUP f Hierarchical Action  addLayoutActions IMenuManager menuManager fFlatAction menuManager appendToGroup IContextMenuConstants GROUP_VIEWER_SETUP fFlatAction fHierarchicalAction menuManager appendToGroup IContextMenuConstants GROUP_VIEWER_SETUP fHierarchicalAction
inherit Doc public void set View Part I Search Result View Part part f View Part part  inheritDoc setViewPart ISearchResultViewPart fViewPart
Returns the view part set with code set View Part I Search Result View Part code return The view part or code null code if the view part hasn t been set yet or set to null protected I Search Result View Part get View Part return f View Part  setViewPart ISearchResultViewPart ISearchResultViewPart getViewPart fViewPart
multithreaded update handling private synchronized void handle Search Results Changed final Search Result Event e if e instanceof Match Event Match Event me Match Event e post Update me get Matches else if e instanceof Remove All Event post Clear  handleSearchResultsChanged SearchResultEvent MatchEvent MatchEvent MatchEvent postUpdate getMatches RemoveAllEvent postClear
private synchronized void post Update Match matches for int i 0 i matches length i f Batched Updates add matches i get Element scheduleUI Update  postUpdate fBatchedUpdates getElement scheduleUIUpdate
private synchronized void run Batched Updates if false f Batched Updates size 50 Object hundred Updates new Object 50 Iterator elements f Batched Updates iterator for int i 0 i hundred Updates length i hundred Updates i elements next elements remove elements Changed hundred Updates else elements Changed f Batched Updates to Array f Batched Updates clear update Busy Label  runBatchedUpdates fBatchedUpdates hundredUpdates fBatchedUpdates hundredUpdates hundredUpdates elementsChanged hundredUpdates elementsChanged fBatchedUpdates toArray fBatchedUpdates updateBusyLabel
private void post Clear async Exec new Runnable public void run run Clear  postClear asyncExec runClear
private void post Clear async Exec new Runnable public void run run Clear  postClear asyncExec runClear
private synchronized boolean has More Updates return f Batched Updates size 0  hasMoreUpdates fBatchedUpdates
private boolean is Query Running Abstract Text Search Result result get Input if result null return New SearchUI is Query Running result get Query return false  isQueryRunning AbstractTextSearchResult getInput NewSearchUI isQueryRunning getQuery
private void run Clear synchronized this f Batched Updates clear update Busy Label get View Part update Label clear  runClear fBatchedUpdates updateBusyLabel getViewPart updateLabel
control control get Display async Exec new Runnable public void run if control null control is Disposed runnable run  getDisplay asyncExec isDisposed
private void async Exec final Runnable runnable final Control control get Control if control null control is Disposed Display current Display Display get Current if current Display null current Display equals control get Display meaning we re not executing on the display thread of the control control get Display async Exec new Runnable public void run if control null control is Disposed runnable run else runnable run  asyncExec getControl isDisposed currentDisplay getCurrent currentDisplay currentDisplay getDisplay getDisplay asyncExec isDisposed
inherit Doc Subclasses may extend this method public void restore State I Memento memento if count Bits f Supported Layouts 1 try f Current Layout get Settings get Int KEY LAYOUT workaround because the saved value may be 0 if f Current Layout 0 init Layout catch Number Format Exception e ignore signals no value stored if memento null Integer layout memento get Integer KEY LAYOUT if layout null f Current Layout layout int Value workaround because the saved value may be 0 if f Current Layout 0 init Layout  inheritDoc restoreState IMemento countBits fSupportedLayouts fCurrentLayout getSettings getInt KEY_LAYOUT fCurrentLayout initLayout NumberFormatException getInteger KEY_LAYOUT fCurrentLayout intValue fCurrentLayout initLayout
inherit Doc Subclasses my extend this method public void save State I Memento memento if count Bits f Supported Layouts 1 memento put Integer KEY LAYOUT f Current Layout  inheritDoc saveState IMemento countBits fSupportedLayouts putInteger KEY_LAYOUT fCurrentLayout
Note this is internal API and should not be called from clients outside of the search plug in p Removes the currently selected match Does nothing if no match is selected p public void internal Remove Selected Abstract Text Search Result result get Input if result null return Structured Viewer viewer get Viewer I Structured Selection selection I Structured Selection viewer get Selection Hash Set set new Hash Set if viewer instanceof Tree Viewer I Tree Content Provider cp I Tree Content Provider viewer get Content Provider collect All Matches Below result set cp selection to Array else collect All Matches set selection to Array Match matches new Match set size set to Array matches result remove Matches matches  internalRemoveSelected AbstractTextSearchResult getInput StructuredViewer getViewer IStructuredSelection IStructuredSelection getSelection HashSet HashSet TreeViewer ITreeContentProvider ITreeContentProvider getContentProvider collectAllMatchesBelow toArray collectAllMatches toArray toArray removeMatches
private void collect All Matches Hash Set set Object elements for int j 0 j elements length j Match matches get Displayed Matches elements j for int i 0 i matches length i set add matches i  collectAllMatches HashSet getDisplayedMatches
private void collect All Matches Below Abstract Text Search Result result Set set I Tree Content Provider cp Object elements for int j 0 j elements length j Match matches get Displayed Matches elements j for int i 0 i matches length i set add matches i Object children cp get Children elements j collect All Matches Below result set cp children  collectAllMatchesBelow AbstractTextSearchResult ITreeContentProvider getDisplayedMatches getChildren collectAllMatchesBelow
private void turn Off Decoration I Base Label Provider lp f Viewer get Label Provider if lp instanceof Decorating Label Provider Decorating Label Provider lp set Label Decorator null  turnOffDecoration IBaseLabelProvider fViewer getLabelProvider DecoratingLabelProvider DecoratingLabelProvider setLabelDecorator
private void turn On Decoration I Base Label Provider lp f Viewer get Label Provider if lp instanceof Decorating Label Provider Decorating Label Provider lp set Label Decorator PlatformUI get Workbench get Decorator Manager get Label Decorator  turnOnDecoration IBaseLabelProvider fViewer getLabelProvider DecoratingLabelProvider DecoratingLabelProvider setLabelDecorator getWorkbench getDecoratorManager getLabelDecorator
p This method is called when the search page gets an open even from it s underlying viewer for example on double click The default implementation will open the first match on any element that has matches If the element to be opened is an inner node in the tree layout the node will be expanded if it s collapsed and vice versa Subclasses are allowed to override this method p param event the event sent for the currently shown viewer see I Open Listener protected void handle Open Open Event event Viewer viewer event get Viewer boolean has Current Match show Current Match Open Strategy activate On Open I Selection sel event get Selection if viewer instanceof Tree Viewer sel instanceof I Structured Selection I Structured Selection selection I Structured Selection sel Tree Viewer tv Tree Viewer get Viewer Object element selection get First Element if element null if has Current Match get Displayed Match Count element 0 goto Next Match Open Strategy activate On Open else tv set Expanded State element tv get Expanded State element return else if has Current Match goto Next Match Open Strategy activate On Open  IOpenListener handleOpen OpenEvent getViewer hasCurrentMatch showCurrentMatch OpenStrategy activateOnOpen ISelection getSelection TreeViewer IStructuredSelection IStructuredSelection IStructuredSelection TreeViewer TreeViewer getViewer getFirstElement hasCurrentMatch getDisplayedMatchCount gotoNextMatch OpenStrategy activateOnOpen setExpandedState getExpandedState hasCurrentMatch gotoNextMatch OpenStrategy activateOnOpen

public interface I Editor Match Adapter Determines whether a match should be displayed in the given editor For example if a match is reported in a file This method should return code true code if the given editor displays the file param match The match param editor The editor that possibly contains the matches element return wether the given match should be displayed in the editor  IEditorMatchAdapter
public abstract boolean is Shown In Editor Match match I Editor Part editor Returns all matches that are contained in the element shown in the given editor For example if the editor shows a particular file all matches in that file should be returned param result the result to search for matches param editor The editor return All matches that are contained in the element that is shown in the given editor  isShownInEditor IEditorPart

public interface I File Match Adapter Returns an array with all matches contained in the given file in the given search result If the matches are not contained within an code I File code this method must return an empty array param result the search result to find matches in param file the file to find matches in return an array of matches possibly empty  IFileMatchAdapter IFile
public abstract Match compute Contained Matches Abstract Text Search Result result I File file Returns the file associated with the given element usually the file the element is contained in If the element is not associated with a file this method should return code null code param element an element associated with a match return the file associated with the element or code null code  computeContainedMatches AbstractTextSearchResult IFile

public interface I Search Editor Access Finds the document displaying the match param match the match return the document displaying the given match  ISearchEditorAccess
I Document get Document Match match Finds the annotation model for the given match param match the match return the annotation model displaying the given match  IDocument getDocument

Constructs a new Match object param element the element that contains the match param unit the unit offset and length are based on param offset the offset the match starts at param length the length of the match public Match Object element int unit int offset int length Assert is True unit UNIT CHARACTER unit UNIT LINE f Element element f Offset offset f Length length f Unit unit  isTrue UNIT_CHARACTER UNIT_LINE fElement fOffset fLength fUnit
Constructs a new Match object The offset and length will be based on characters param element the element that contains the match param offset the offset the match starts at param length the length of the match public Match Object element int offset int length this element UNIT CHARACTER offset length  UNIT_CHARACTER
Returns the offset of this match return the offset public int get Offset return f Offset  getOffset fOffset
Sets the offset of this match param offset the offset to set public void set Offset int offset f Offset offset  setOffset fOffset
Returns the length of this match return the length public int get Length return f Length  getLength fLength
Sets the length param length the length to set public void set Length int length f Length length  setLength fLength
Returns the element that contains this match return the element that contains this match public Object get Element return f Element  getElement fElement
Returns whether match length and offset are expressed in lines or characters return either UNIT LINE or UNIT CHARACTER public int get Base Unit return f Unit  UNIT_LINE UNIT_CHARACTER getBaseUnit fUnit

Constructs a new code Match Event code param search Result the search result concerned public Match Event I Search Result search Result super search Result  MatchEvent searchResult MatchEvent ISearchResult searchResult searchResult
Tells whether this is a remove or an add return one of code ADDED code or code REMOVED code public int get Kind return f Kind  getKind fKind
Returns the concerned matches return the matches this event is about public Match get Matches if f Matches null return f Matches else if f Match Container 0 null return f Match Container else return fg Emtpy Matches  getMatches fMatches fMatches fMatchContainer fMatchContainer fgEmtpyMatches
Sets the kind of event this is param kind the kind to set either code ADDED code or code REMOVED code protected void set Kind int kind f Kind kind  setKind fKind
Sets the match for the change this event reports param match the match to set protected void set Match Match match f Match Container 0 match f Matches null  setMatch fMatchContainer fMatches
Sets the matches for the change this event reports param matches the matches to set protected void set Matches Match matches f Match Container 0 null f Matches matches  setMatches fMatchContainer fMatches

public class Remove All Event extends Search Result Event A constructor param search Result the search result this event is about public Remove All Event I Search Result search Result super search Result  RemoveAllEvent SearchResultEvent searchResult RemoveAllEvent ISearchResult searchResult searchResult

Class clazz public Class Data Class clazz String str super str this clazz clazz  ClassData
public static String get All Flags return new String no gen  getAllFlags no_gen
public Class get Clazz return clazz  getClazz
public String get Exclude return String get Param exclude  getExclude getParam
public void set Exclude String str set Param exclude str  setExclude setParam

void load Class Source if class Source Path null return File f new File class Source Path class Source load File f  loadClassSource classSourcePath classSourcePath classSource loadFile
void load Files BAD holds on to a lot of memory if source Path null return files new Hashtable for int i 0 i source Path length i File file new File source Path i if file exists if file is Directory if file get Absolute Path ends With java files put file load File file else load Directory file  loadFiles sourcePath sourcePath sourcePath isDirectory getAbsolutePath endsWith loadFile loadDirectory
String load File File file try File Reader fr new File Reader file Buffered Reader br new Buffered Reader fr String Buffer str new String Buffer char buffer new char 1024 int read while read br read buffer 1 str append buffer 0 read fr close return str to String catch IO Exception e e print Stack Trace System out return  loadFile FileReader FileReader BufferedReader BufferedReader StringBuffer StringBuffer toString IOException printStackTrace
void load Directory File file String entries file list for int i 0 i entries length i String entry entries i File f new File file entry if f is Directory if f get Absolute Path ends With java files put f load File f else load Directory f  loadDirectory isDirectory getAbsolutePath endsWith loadFile loadDirectory
public void generate Class clazz load Files load Class Source  loadFiles loadClassSource
public void set Source Path String source Path this source Path source Path files null  setSourcePath sourcePath sourcePath sourcePath
public void set Class Source Path String class Source Path this class Source Path class Source Path  setClassSourcePath classSourcePath classSourcePath classSourcePath

String get Field Value Field field String name field get Name int index 0 while true index class Source index Of name index 1 if index 1 return null int equals Index class Source index Of index if class Source substring index name length equals Index trim length 0 int semi Index class Source index Of equals Index return class Source substring equals Index 1 semi Index trim  getFieldValue getName classSource indexOf equalsIndex classSource indexOf classSource equalsIndex semiIndex classSource indexOf equalsIndex classSource equalsIndex semiIndex
public void generate Class clazz unused Count used Count 0 super generate clazz Field fields clazz get Declared Fields generate fields output used used Count unused unused Count total unused Count used Count  unusedCount usedCount getDeclaredFields usedCount unusedCount unusedCount usedCount
public void generate Field fields sort fields for int i 0 i fields length i Field field fields i if field get Modifiers Modifier FINAL 0 continue generate field  getModifiers
public void generate Field field String name field get Name Enumeration keys files keys while keys has More Elements Object key keys next Element String str String files get key if str index Of name 1 int modifiers field get Modifiers String modifiers Str Modifier to String modifiers output t output modifiers Str if modifiers Str length 0 output output get Type Signature3 field get Type output output field get Name output output get Field Value field output output Delimiter used Count return unused Count output NOT USED field to String n  getName hasMoreElements nextElement indexOf getModifiers modifiersStr toString modifiersStr modifiersStr getTypeSignature3 getType getName getFieldValue outputDelimiter usedCount unusedCount toString
public static void main String args if args length 2 System out println Usage java Cleanup Constants OS class Name src path class source return try Cleanup Constants gen new Cleanup Constants String clazz Name args 0 String source Path new String args 1 String class Source args 2 clazz Name org eclipse swt internal carbon OS source Path new String Users ssq Desktop eclipse workspace org eclipse swt Eclipse SWT carbon Users ssq Desktop eclipse workspace org eclipse swt Eclipse SWT PI carbon org eclipse swt internal carbon Mac Util java Users ssq Desktop eclipse workspace org eclipse swt Eclipse SWT Drag and Drop carbon org eclipse swt dnd class Source Users ssq Desktop eclipse workspace org eclipse swt Eclipse SWT PI carbon org eclipse swt internal carbon OS java Class clazz Class for Name clazz Name gen set Source Path source Path gen set Class Source Path class Source gen generate clazz catch Exception e System out println Problem e print Stack Trace System out  CleanupConstants className CleanupConstants CleanupConstants clazzName sourcePath classSource clazzName sourcePath MacUtil classSource forName clazzName setSourcePath sourcePath setClassSourcePath classSource printStackTrace

public class Cleanup Natives extends Cleanup Class public Cleanup Natives  CleanupNatives CleanupClass CleanupNatives
String get Arg Names Method method int n args method get Parameter Types length if n args 0 return new String 0 String name method get Name String params int index 0 while true index class Source index Of name index 1 if index 1 return null int paranteses Start class Source index Of index if class Source substring index name length paranteses Start trim length 0 int paranteses End class Source index Of paranteses Start params class Source substring paranteses Start 1 paranteses End break String names new String n args String Tokenizer tk new String Tokenizer params for int i 0 i names length i String s tk next Token trim String Tokenizer tk1 new String Tokenizer s String s1 null while tk1 has More Tokens s1 tk1 next Token names i s1 trim return names  getArgNames n_args getParameterTypes n_args getName classSource indexOf parantesesStart classSource indexOf classSource parantesesStart parantesesEnd classSource indexOf parantesesStart classSource parantesesStart parantesesEnd n_args StringTokenizer StringTokenizer nextToken StringTokenizer StringTokenizer hasMoreTokens nextToken
public void generate Class clazz unused Count used Count 0 super generate clazz Method methods clazz get Declared Methods generate methods output used used Count unused unused Count total unused Count used Count  unusedCount usedCount getDeclaredMethods usedCount unusedCount unusedCount usedCount
public void generate Method methods sort methods for int i 0 i methods length i Method method methods i if method get Modifiers Modifier NATIVE 0 continue generate method  getModifiers
public void generate Method method String name method get Name Enumeration keys files keys while keys has More Elements Object key keys next Element String str String files get key if str index Of name 1 int modifiers method get Modifiers Class clazz method get Declaring Class String modifiers Str Modifier to String modifiers output modifiers Str if modifiers Str length 0 output output get Type Signature3 method get Return Type output output method get Name output Class param Types method get Parameter Types String param Names get Arg Names method for int i 0 i param Types length i Class param Type param Types i if i 0 output String sig get Type Signature3 param Type if clazz get Package equals param Type get Package sig get Class Name param Type output sig output output param Names i output output Delimiter used Count return unused Count output NOT USED method to String n  getName hasMoreElements nextElement indexOf getModifiers getDeclaringClass modifiersStr toString modifiersStr modifiersStr getTypeSignature3 getReturnType getName paramTypes getParameterTypes paramNames getArgNames paramTypes paramType paramTypes getTypeSignature3 paramType getPackage paramType getPackage getClassName paramType paramNames outputDelimiter usedCount unusedCount toString
public static void main String args args new String a b c if args length 2 System out println Usage java Cleanup Natives OS class Name src path class source return try Cleanup Natives gen new Cleanup Natives String clazz Name args 0 String source Path new String args 1 String class Source args 2 clazz Name org eclipse swt internal gtk OS source Path new String bluebird teamswt ssq eclipse gtk workspace org eclipse swt Eclipse SWT gtk bluebird teamswt ssq eclipse gtk workspace org eclipse swt Eclipse SWT Drag and Drop gtk class Source bluebird teamswt ssq eclipse gtk workspace org eclipse swt Eclipse SWT PI gtk org eclipse swt internal gtk OS java Class clazz Class for Name clazz Name gen set Source Path source Path gen set Class Source Path class Source gen generate clazz catch Exception e System out println Problem e print Stack Trace System out  CleanupNatives className CleanupNatives CleanupNatives clazzName sourcePath classSource clazzName sourcePath classSource forName clazzName setSourcePath sourcePath setClassSourcePath classSource printStackTrace

public class Constants Generator extends JNI Generator public void generate Class clazz Field fields clazz get Declared Fields generate fields  ConstantsGenerator JNIGenerator getDeclaredFields
public void generate Field fields sort fields output int main output Delimiter for int i 0 i fields length i Field field fields i if field get Modifiers Modifier FINAL 0 continue generate field output output Delimiter  outputDelimiter getModifiers outputDelimiter
public void generate Field field Class type field get Type output tprintf public static final output get Type Signature3 field output output field get Name output if type String class type byte class output s else output 0x x output n output field get Name output output Delimiter  getType getTypeSignature3 getName getName outputDelimiter
public static void main String args if args length 1 System out println Usage java Constants Generator class Name1 class Name2 return try Constants Generator gen new Constants Generator for int i 0 i args length i String clazz Name args i Class clazz Class for Name clazz Name gen generate clazz catch Exception e System out println Problem e print Stack Trace System out  ConstantsGenerator className1 className2 ConstantsGenerator ConstantsGenerator clazzName forName clazzName printStackTrace

Field field public Field Data Field field String str super str this field field  FieldData
public static String get All Flags return new String no gen no wince  getAllFlags no_gen no_wince
public String get Accessor return String get Param accessor  getAccessor getParam
public String get Cast String cast String get Param cast trim if cast length 0 if cast starts With cast cast if cast ends With cast cast return cast  getCast getParam startsWith endsWith
public String get Exclude return String get Param exclude  getExclude getParam
public Field get Field return field  getField
public void set Accessor String str set Param accessor str  setAccessor setParam
public void set Cast String str set Param cast str  setCast setParam
public void set Exclude String str set Param exclude str  setExclude setParam

Hash Map params public Item Data String str parse str  HashMap ItemData
static String split String str String separator String Tokenizer tk new String Tokenizer str separator Array List result new Array List while tk has More Elements result add tk next Element return String result to Array new String result size  StringTokenizer StringTokenizer ArrayList ArrayList hasMoreElements nextElement toArray
public String get Flags Object flags get Param flags if flags null return new String 0 if flags instanceof String return String flags String result split String flags params put flags result return result  getFlags getParam
public boolean get Flag String flag String flags get Flags for int i 0 i flags length i if flags i equals flag return true return false  getFlag getFlags
public Object get Param String key Object value params get key return value null value  getParam
public boolean is Generate return get Flag no gen  isGenerate getFlag no_gen
public void parse String str this params new Hash Map if str length 0 return String params split str for int i 0 i params length i String param params i int equals param index Of if equals 1 System out println String key param substring 0 equals trim String value param substring equals 1 trim set Param key value  HashMap indexOf setParam
public void set Flags String flags set Param flags flags  setFlags setParam
public void set Flag String flag boolean value String flags get Flags Hash Set set new Hash Set Arrays as List flags if value set add flag else set remove flag set Flags String set to Array new String set size  setFlag getFlags HashSet HashSet asList setFlags toArray
public void set Generate boolean value set Flag no gen value  setGenerate setFlag no_gen
public void set Param String key Object value params put key value  setParam
public String to String String Buffer buffer new String Buffer Set set params key Set String keys String set to Array new String set size Arrays sort keys for int j 0 j keys length j String key keys j Object value params get key String value Str if value instanceof String value Str String value else if value instanceof String String values String value String Buffer value Buffer new String Buffer for int i 0 i values length i if i 0 value Buffer append value Buffer append values i value Str value Buffer to String else value Str value to String if value Str length 0 if buffer length 0 buffer append buffer append key buffer append buffer append value Str return buffer to String  toString StringBuffer StringBuffer keySet toArray valueStr valueStr StringBuffer valueBuffer StringBuffer valueBuffer valueBuffer valueStr valueBuffer toString valueStr toString valueStr valueStr toString

public JNI Generator delimiter System get Property line separator output System out meta Data new Meta Data new Properties  JNIGenerator getProperty metaData MetaData
String fix Delimiter String str if delimiter equals n return str int index 0 length str length String Buffer buffer new String Buffer while index 1 int start index index str index Of n start if index 1 buffer append str substring start length else buffer append str substring start index buffer append delimiter index return buffer to String  fixDelimiter StringBuffer StringBuffer indexOf toString
static String get Class Name Class clazz String name clazz get Name int index name last Index Of 1 return name substring index name length  getClassName getName lastIndexOf
static String get Function Name Method method return get Function Name method method get Parameter Types  getFunctionName getFunctionName getParameterTypes
static String get Function Name Method method Class param Types String function toC method get Name if is Unique method Modifier NATIVE function    if param Types length 0 for int i 0 i param Types length i Class param Type param Types i function toC get Type Signature param Type return function  getFunctionName paramTypes getName isUnique __ paramTypes paramTypes paramType paramTypes getTypeSignature paramType
static int get Byte Count Class clazz if clazz Integer TYPE return 4 if clazz Boolean TYPE return 4 if clazz Long TYPE return 8 if clazz Short TYPE return 2 if clazz Character TYPE return 2 if clazz Byte TYPE return 1 if clazz Float TYPE return 4 if clazz Double TYPE return 8 return 4  getByteCount
static String get Type Signature Field field Class clazz field get Type return get Type Signature clazz  getTypeSignature getType getTypeSignature
static String get Type Signature Class clazz if clazz Integer TYPE return I if clazz Boolean TYPE return Z if clazz Long TYPE return J if clazz Short TYPE return S if clazz Character TYPE return C if clazz Byte TYPE return B if clazz Float TYPE return F if clazz Double TYPE return D if clazz is Array Class component Type clazz get Component Type return get Type Signature component Type return L clazz get Name replace  getTypeSignature isArray componentType getComponentType getTypeSignature componentType getName
static String get Type Signature1 Field field Class clazz field get Type return get Type Signature1 clazz  getTypeSignature1 getType getTypeSignature1
static String get Type Signature1 Class clazz if clazz Integer TYPE return Int if clazz Boolean TYPE return Boolean if clazz Long TYPE return Long if clazz Short TYPE return Short if clazz Character TYPE return Char if clazz Byte TYPE return Byte if clazz Float TYPE return Float if clazz Double TYPE return Double return Object  getTypeSignature1
static String get Type Signature2 Field field Class clazz field get Type return get Type Signature2 clazz  getTypeSignature2 getType getTypeSignature2
static String get Type Signature2 Class clazz if clazz Void TYPE return void if clazz Integer TYPE return jint if clazz Boolean TYPE return jboolean if clazz Long TYPE return jlong if clazz Short TYPE return jshort if clazz Character TYPE return jchar if clazz Byte TYPE return jbyte if clazz Float TYPE return jfloat if clazz Double TYPE return jdouble if clazz is Array Class component Type clazz get Component Type return get Type Signature2 component Type Array return jobject  getTypeSignature2 isArray componentType getComponentType getTypeSignature2 componentType
static String get Type Signature4 Class clazz if clazz Void TYPE return void if clazz Integer TYPE return jint if clazz Boolean TYPE return jboolean if clazz Long TYPE return jlong if clazz Short TYPE return jshort if clazz Character TYPE return jchar if clazz Byte TYPE return jbyte if clazz Float TYPE return jfloat if clazz Double TYPE return jdouble if clazz is Array Class component Type clazz get Component Type return get Type Signature4 component Type return get Class Name clazz  getTypeSignature4 isArray componentType getComponentType getTypeSignature4 componentType getClassName
static String get Type Signature3 Field field Class clazz field get Type return get Type Signature3 clazz  getTypeSignature3 getType getTypeSignature3
static String get Type Signature3 Class clazz if clazz Void TYPE return void if clazz Integer TYPE return int if clazz Boolean TYPE return boolean if clazz Long TYPE return long if clazz Short TYPE return short if clazz Character TYPE return char if clazz Byte TYPE return byte if clazz Float TYPE return float if clazz Double TYPE return double if clazz String class return String if clazz is Array Class component Type clazz get Component Type return get Type Signature3 component Type return clazz get Name  getTypeSignature3 isArray componentType getComponentType getTypeSignature3 componentType getName
static boolean is Unique Method method int modifier Mask Class clazz method get Declaring Class Method methods clazz get Declared Methods for int i 0 i methods length i Method mth methods i if method get Modifiers modifier Mask 0 continue if method equals mth continue if method get Name equals mth get Name return false return true  isUnique modifierMask getDeclaringClass getDeclaredMethods getModifiers modifierMask getName getName
Arrays sort methods new Comparator public int compare Object a Object b Method mth1 Method a Method mth2 Method b int result mth1 get Name compare To mth2 get Name return result 0 result get Function Name mth1 compare To get Function Name mth2  getName compareTo getName getFunctionName compareTo getFunctionName
static void sort Method methods Arrays sort methods new Comparator public int compare Object a Object b Method mth1 Method a Method mth2 Method b int result mth1 get Name compare To mth2 get Name return result 0 result get Function Name mth1 compare To get Function Name mth2  getName compareTo getName getFunctionName compareTo getFunctionName
static void sort Field fields Arrays sort fields new Comparator public int compare Object a Object b return Field a get Name compare To Field b get Name  getName compareTo getName
static void sort Field fields Arrays sort fields new Comparator public int compare Object a Object b return Field a get Name compare To Field b get Name  getName compareTo getName
static void sort Class classes Arrays sort classes new Comparator public int compare Object a Object b return Class a get Name compare To Class b get Name  getName compareTo getName
static void sort Class classes Arrays sort classes new Comparator public int compare Object a Object b return Class a get Name compare To Class b get Name  getName compareTo getName
static String toC String str String Buffer buf new String Buffer for int i 0 i str length i char c str char At i switch c case   buf append  1 break case buf append  2 break case buf append  3 break case buf append   break case buf append   break default buf append c return buf to String  StringBuffer StringBuffer charAt _ _1 _2 _3 _ _ toString
public String get Delimiter return delimiter  getDelimiter
public Print Stream get Output return output  PrintStream getOutput
public Meta Data get Meta Data return meta Data  MetaData getMetaData metaData
public abstract void generate Class clazz 
public void generate Meta Data String key Meta Data mt get Meta Data String data mt get Meta Data key null if data null return output fix Delimiter data output Delimiter  generateMetaData MetaData getMetaData getMetaData fixDelimiter outputDelimiter
public void generate Class classes sort classes for int i 0 i classes length i Class clazz classes i generate clazz 
public void output String str output print str 
public void output Delimiter output get Delimiter  outputDelimiter getDelimiter
public void set Delimiter String delimiter this delimiter delimiter  setDelimiter
public void set Output Print Stream output this output output  setOutput PrintStream
public void set Meta Data Meta Data data meta Data data  setMetaData MetaData metaData

Meta Data meta Data public JNI Generator App  MetaData metaData JNIGeneratorApp
public String get Classpath return classpath  getClasspath
public String get Main Class return main Class  getMainClass mainClass
public Meta Data get Meta Data return meta Data  MetaData getMetaData metaData
String get Meta Data Dir return JNI Generation org eclipse swt tools internal  getMetaDataDir
public String get Output Dir return output Dir  getOutputDir outputDir
void generateSTATS C try String output Name get Class Name main Class to Lower Case String inc include swt h n include os structs h n meta Data set Meta Data swt includes inc Stats Generator gen new Stats Generator gen set Meta Data meta Data Byte Array Output Stream out new Byte Array Output Stream Print Stream print new Print Stream out gen set Output print gen generate Source File get Natives Classes print flush if out size 0 output out to Byte Array output Dir output Name  stats c catch Exception e System out println Problem e print Stack Trace System out  generateSTATS_C outputName getClassName mainClass toLowerCase os_structs metaData setMetaData swt_includes StatsGenerator StatsGenerator setMetaData metaData ByteArrayOutputStream ByteArrayOutputStream PrintStream PrintStream setOutput generateSourceFile getNativesClasses toByteArray outputDir outputName _stats printStackTrace
void generateSTATS H try String output Name get Class Name main Class to Lower Case String inc meta Data set Meta Data swt includes inc Stats Generator gen new Stats Generator gen set Meta Data meta Data Byte Array Output Stream out new Byte Array Output Stream Print Stream print new Print Stream out gen set Output print gen generate Header File get Natives Classes print flush if out size 0 output out to Byte Array output Dir output Name  stats h catch Exception e System out println Problem e print Stack Trace System out  generateSTATS_H outputName getClassName mainClass toLowerCase metaData setMetaData swt_includes StatsGenerator StatsGenerator setMetaData metaData ByteArrayOutputStream ByteArrayOutputStream PrintStream PrintStream setOutput generateHeaderFile getNativesClasses toByteArray outputDir outputName _stats printStackTrace
void generateSTRUCTS H try String output Name get Class Name main Class to Lower Case meta Data set Meta Data swt includes include output Name h n Structs Generator gen new Structs Generator gen set Meta Data meta Data Byte Array Output Stream out new Byte Array Output Stream Print Stream print new Print Stream out gen set Output print gen generate Header File get Structure Classes print flush if out size 0 output out to Byte Array output Dir output Name  structs h catch Exception e System out println Problem e print Stack Trace System out  generateSTRUCTS_H outputName getClassName mainClass toLowerCase metaData setMetaData swt_includes outputName StructsGenerator StructsGenerator setMetaData metaData ByteArrayOutputStream ByteArrayOutputStream PrintStream PrintStream setOutput generateHeaderFile getStructureClasses toByteArray outputDir outputName _structs printStackTrace
void generateSTRUCTS C try String output Name get Class Name main Class to Lower Case String inc include swt h n include output Name  structs h n meta Data set Meta Data swt includes inc Structs Generator gen new Structs Generator gen set Meta Data meta Data Byte Array Output Stream out new Byte Array Output Stream Print Stream print new Print Stream out gen set Output print gen generate Source File get Structure Classes print flush if out size 0 output out to Byte Array output Dir output Name  structs c catch Exception e System out println Problem e print Stack Trace System out  generateSTRUCTS_C outputName getClassName mainClass toLowerCase outputName _structs metaData setMetaData swt_includes StructsGenerator StructsGenerator setMetaData metaData ByteArrayOutputStream ByteArrayOutputStream PrintStream PrintStream setOutput generateSourceFile getStructureClasses toByteArray outputDir outputName _structs printStackTrace
void generateSWT C try String output Name get Class Name main Class to Lower Case String inc include swt h n include output Name  structs h n meta Data set Meta Data swt includes inc Natives Generator gen new Natives Generator gen set Meta Data meta Data Byte Array Output Stream out new Byte Array Output Stream Print Stream print new Print Stream out gen set Output print gen generate get Natives Classes print flush if out size 0 output out to Byte Array output Dir output Name c catch Exception e System out println Problem e print Stack Trace System out  generateSWT_C outputName getClassName mainClass toLowerCase outputName _structs metaData setMetaData swt_includes NativesGenerator NativesGenerator setMetaData metaData ByteArrayOutputStream ByteArrayOutputStream PrintStream PrintStream setOutput getNativesClasses toByteArray outputDir outputName printStackTrace
void generate All Meta Data try Meta Data Generator gen new Meta Data Generator gen set Meta Data meta Data Byte Array Output Stream out new Byte Array Output Stream Print Stream print new Print Stream out gen set Output print gen generate get Classes print flush if new File get Meta Data Dir exists System out println Warning Meta data output dir does not exist return if out size 0 output out to Byte Array get Meta Data Dir main Class properties catch Exception e System out println Problem e print Stack Trace System out  generateAllMetaData MetaDataGenerator MetaDataGenerator setMetaData metaData ByteArrayOutputStream ByteArrayOutputStream PrintStream PrintStream setOutput getClasses getMetaDataDir toByteArray getMetaDataDir mainClass printStackTrace
public void generate if main Class null return generateSTRUCTS H generateSTRUCTS C generateSWT C generateSTATS H generateSTATS C generate All Meta Data  mainClass generateSTRUCTS_H generateSTRUCTS_C generateSWT_C generateSTATS_H generateSTATS_C generateAllMetaData
boolean compare Input Stream is1 Input Stream is2 throws IO Exception while true int c1 is1 read int c2 is2 read if c1 c2 return false if c1 1 break return true  InputStream InputStream IOException
void output byte bytes String file Name throws IO Exception File Input Stream is null try is new File Input Stream file Name if compare new Byte Array Input Stream bytes new Buffered Input Stream is return catch File Not Found Exception e finally try if is null is close catch IO Exception e File Output Stream out new File Output Stream file Name out write bytes out close  fileName IOException FileInputStream FileInputStream fileName ByteArrayInputStream BufferedInputStream FileNotFoundException IOException FileOutputStream FileOutputStream fileName
String get Class Name String class Name int dot main Class last Index Of if dot 1 return class Name return main Class substring dot 1  getClassName className mainClass lastIndexOf className mainClass
String get Package Name String class Name int dot main Class last Index Of if dot 1 return return main Class substring 0 dot  getPackageName className mainClass lastIndexOf mainClass
String get Class Names String main Class Name String pkg Name get Package Name main Class Name String classpath get Classpath if classpath null classpath System get Property java class path String pkg Path pkg Name replace File separator Char String pkg Zip Path pkg Name replace Array List classes new Array List int start 0 int index 0 while index classpath length index classpath index Of File path Separator Char start if index 1 index classpath length String path classpath substring start index if path to Lower Case ends With jar Zip File zip File null try zip File new Zip File path Enumeration entries zip File entries while entries has More Elements Zip Entry entry Zip Entry entries next Element String name entry get Name if name starts With pkg Zip Path name ends With class String class Name name substring pkg Zip Path length 1 name length 6 class Name replace classes add class Name catch IO Exception e finally try if zip File null zip File close catch IO Exception ex else File file new File path File separator pkg Path if file exists String entries file list for int i 0 i entries length i String entry entries i File f new File file entry if f is Directory if f get Absolute Path ends With class String class Name entry substring 0 entry length 6 classes add class Name else System out println SUBDIR NOT DONE f start index 1 return String classes to Array new String classes size  getClassNames mainClassName pkgName getPackageName mainClassName getClasspath getProperty pkgPath pkgName separatorChar pkgZipPath pkgName ArrayList ArrayList indexOf pathSeparatorChar toLowerCase endsWith ZipFile zipFile zipFile ZipFile zipFile hasMoreElements ZipEntry ZipEntry nextElement getName startsWith pkgZipPath endsWith className pkgZipPath className className IOException zipFile zipFile IOException pkgPath isDirectory getAbsolutePath endsWith className className toArray
public Class get Classes if main Class null return new Class 0 String class Names get Class Names main Class Arrays sort class Names String package Name get Package Name main Class Class classes new Class class Names length for int i 0 i class Names length i String class Name class Names i try classes i Class for Name package Name class Name false get Class get Class Loader catch Exception e e print Stack Trace return classes  getClasses mainClass classNames getClassNames mainClass classNames packageName getPackageName mainClass classNames classNames className classNames forName packageName className getClass getClassLoader printStackTrace
public Class get Natives Classes if main Class null return new Class 0 Array List result new Array List Class classes get Classes for int i 0 i classes length i Class clazz classes i Method methods clazz get Declared Methods for int j 0 j methods length j Method method methods j int mods method get Modifiers if mods Modifier NATIVE 0 result add clazz break return Class result to Array new Class result size  getNativesClasses mainClass ArrayList ArrayList getClasses getDeclaredMethods getModifiers toArray
public Class get Structure Classes if main Class null return new Class 0 Array List result new Array List Class classes get Classes outer for int i 0 i classes length i Class clazz classes i Method methods clazz get Declared Methods for int j 0 j methods length j Method method methods j int mods method get Modifiers if mods Modifier NATIVE 0 continue outer result add clazz return Class result to Array new Class result size  getStructureClasses mainClass ArrayList ArrayList getClasses getDeclaredMethods getModifiers toArray
Meta Data load Meta Data int index 0 Properties propeties new Properties int length main Class length while index length index main Class index Of index if index 1 index length try Input Stream is get Class get Resource As Stream main Class substring 0 index properties propeties load is is close catch Exception e index return new Meta Data propeties  MetaData loadMetaData mainClass mainClass indexOf InputStream getClass getResourceAsStream mainClass MetaData
public void set Classpath String classpath this classpath classpath  setClasspath
public void set Main Class String str main Class str meta Data load Meta Data  setMainClass mainClass metaData loadMetaData
public void set Output Dir String str output Dir str  setOutputDir outputDir
public static String get Default Main Class return org eclipse swt internal Platform PLATFORM OS  getDefaultMainClass
public static String get Default Output Dir return org eclipse swt Eclipse SWT PI Platform PLATFORM library  getDefaultOutputDir
public static void main String args JNI Generator App gen new JNI Generator App if args length 0 gen set Main Class args 0 if args length 1 gen set Output Dir args 1 if args length 2 gen set Classpath args 2 else gen set Main Class get Default Main Class gen set Output Dir get Default Output Dir gen generate  JNIGeneratorApp JNIGeneratorApp setMainClass setOutputDir setClasspath setMainClass getDefaultMainClass setOutputDir getDefaultOutputDir

static final int PARAM FLAGS COLUMN 3 public JNI Generator AppUI this new JNI Generator App  PARAM_FLAGS_COLUMN JNIGeneratorAppUI JNIGeneratorApp
public JNI Generator AppUI JNI Generator App app this app app  JNIGeneratorAppUI JNIGeneratorApp
void cleanup 
void generate Structs Header Structs Generator gen new Structs Generator gen set Meta Data app get Meta Data Class classes get Selected Classes gen generate Header File classes  generateStructsHeader StructsGenerator StructsGenerator setMetaData getMetaData getSelectedClasses generateHeaderFile
void generate Structs Structs Generator gen new Structs Generator gen set Meta Data app get Meta Data Class classes get Selected Classes gen generate Source File classes  generateStructs StructsGenerator StructsGenerator setMetaData getMetaData getSelectedClasses generateSourceFile
void generate Sizeof Sizeof Generator gen new Sizeof Generator gen set Meta Data app get Meta Data gen generate get Selected Classes  generateSizeof SizeofGenerator SizeofGenerator setMetaData getMetaData getSelectedClasses
void generate Meta Data Meta Data Generator gen new Meta Data Generator gen set Meta Data app get Meta Data Method methods get Selected Methods if methods length 0 gen generate methods else gen generate get Selected Classes  generateMetaData MetaDataGenerator MetaDataGenerator setMetaData getMetaData getSelectedMethods getSelectedClasses
void generate Natives Natives Generator gen new Natives Generator gen set Meta Data app get Meta Data Method methods get Selected Methods if methods length 0 gen generate methods else gen generate get Selected Classes  generateNatives NativesGenerator NativesGenerator setMetaData getMetaData getSelectedMethods getSelectedClasses
void generate Constants Constants Generator gen new Constants Generator gen set Meta Data app get Meta Data Field fields get Selected Fields if fields length 0 gen generate fields else gen generate get Selected Classes  generateConstants ConstantsGenerator ConstantsGenerator setMetaData getMetaData getSelectedFields getSelectedClasses
Class get Selected Classes Table Item items classes Lt get Selection Class classes new Class items length for int i 0 i items length i Table Item item items i classes i Class Data item get Data get Clazz return classes  getSelectedClasses TableItem classesLt getSelection TableItem ClassData getData getClazz
Method get Selected Methods Table Item selection members Lt get Selection Method methods new Method selection length int count 0 for int i 0 i selection length i Table Item item selection i Object data item get Data if data instanceof Method Data Method method Method Data data get Method methods count method if count methods length Method result new Method count System arraycopy methods 0 result 0 count methods result return methods  getSelectedMethods TableItem membersLt getSelection TableItem getData MethodData MethodData getMethod
Field get Selected Fields Table Item selection members Lt get Selection Field fields new Field selection length int count 0 for int i 0 i selection length i Table Item item selection i Object data item get Data if data instanceof Field Data Field field Field Data data get Field fields count field if count fields length Field result new Field count System arraycopy fields 0 result 0 count fields result return fields  getSelectedFields TableItem membersLt getSelection TableItem getData FieldData FieldData getField
Listener update Main Class Listener new Listener public void handle Event Event e update Main Class if update Output Dir return update Classes update Members update Parameters  updateMainClassListener handleEvent updateMainClass updateOutputDir updateClasses updateMembers updateParameters
public void open display new Display shell new Shell display shell set Text JNI Generator Grid Data data Grid Layout shell Layout new Grid Layout shell Layout num Columns 2 shell set Layout shell Layout Composite panel new Composite shell SWT NONE data new Grid Data Grid Data FILL BOTH panel set Layout Data data Grid Layout panel Layout new Grid Layout panel Layout num Columns 1 panel set Layout panel Layout Listener update Main Class Listener new Listener public void handle Event Event e update Main Class if update Output Dir return update Classes update Members update Parameters create Main Class Panel panel update Main Class Listener create Output Dir Panel panel update Main Class Listener create Classes Panel panel create Members Panel panel create Parameters Panel panel create Action Buttons shell Point preferred Size shell compute Size SWT DEFAULT SWT DEFAULT shell set Size shell get Size x preferred Size y Grid Data classes Lt get Layout Data height Hint 1 Grid Data members Lt get Layout Data height Hint 1 Grid Data params Lt get Layout Data height Hint 1 update Main Class update Classes update Members update Parameters  setText GridData GridLayout shellLayout GridLayout shellLayout numColumns setLayout shellLayout GridData GridData FILL_BOTH setLayoutData GridLayout panelLayout GridLayout panelLayout numColumns setLayout panelLayout updateMainClassListener handleEvent updateMainClass updateOutputDir updateClasses updateMembers updateParameters createMainClassPanel updateMainClassListener createOutputDirPanel updateMainClassListener createClassesPanel createMembersPanel createParametersPanel createActionButtons preferredSize computeSize setSize getSize preferredSize GridData classesLt getLayoutData heightHint GridData membersLt getLayoutData heightHint GridData paramsLt getLayoutData heightHint updateMainClass updateClasses updateMembers updateParameters
void create Main Class Panel Composite panel Listener update Listener Label main Class Lb new Label panel SWT NONE main Class Lb set Text Main Class Grid Data data main Class Cb new Combo panel SWT DROP DOWN String main Class app get Main Class main Class Cb set Text main Class null main Class data new Grid Data Grid Data FILL HORIZONTAL main Class Cb set Layout Data data main Class Cb add Listener SWT Selection update Listener main Class Cb add Listener SWT Default Selection update Listener  createMainClassPanel updateListener mainClassLb mainClassLb setText GridData mainClassCb DROP_DOWN mainClass getMainClass mainClassCb setText mainClass mainClass GridData GridData FILL_HORIZONTAL mainClassCb setLayoutData mainClassCb addListener updateListener mainClassCb addListener DefaultSelection updateListener
void create Output Dir Panel Composite panel Listener update Listener Label output Dir Lb new Label panel SWT NONE output Dir Lb set Text Output Dir Grid Data data output Dir Cb new Combo panel SWT DROP DOWN String output Dir app get Output Dir output Dir Cb set Text output Dir null output Dir data new Grid Data Grid Data FILL HORIZONTAL output Dir Cb set Layout Data data output Dir Cb add Listener SWT Selection update Listener output Dir Cb add Listener SWT Default Selection update Listener  createOutputDirPanel updateListener outputDirLb outputDirLb setText GridData outputDirCb DROP_DOWN outputDir getOutputDir outputDirCb setText outputDir outputDir GridData GridData FILL_HORIZONTAL outputDirCb setLayoutData outputDirCb addListener updateListener outputDirCb addListener DefaultSelection updateListener
classes Lt add Listener SWT Selection new Listener public void handle Event Event e if e detail SWT CHECK update Generate Table Item e item else update Members update Parameters  classesLt addListener handleEvent updateGenerate TableItem updateMembers updateParameters
void create Classes Panel Composite panel Label classes Lb new Label panel SWT NONE classes Lb set Text Classes Grid Data data classes Lt new Table panel SWT CHECK SWT MULTI SWT BORDER SWT H SCROLL SWT V SCROLL SWT FULL SELECTION data new Grid Data Grid Data FILL BOTH data height Hint classes Lt get Item Height 6 classes Lt set Layout Data data classes Lt set Header Visible true classes Lt add Listener SWT Selection new Listener public void handle Event Event e if e detail SWT CHECK update Generate Table Item e item else update Members update Parameters Table Column column column new Table Column classes Lt SWT NONE CLASS NAME COLUMN column set Text Class column new Table Column classes Lt SWT NONE CLASS EXCLUDE COLUMN column set Text Exclude  createClassesPanel classesLb classesLb setText GridData classesLt H_SCROLL V_SCROLL FULL_SELECTION GridData GridData FILL_BOTH heightHint classesLt getItemHeight classesLt setLayoutData classesLt setHeaderVisible classesLt addListener handleEvent updateGenerate TableItem updateMembers updateParameters TableColumn TableColumn classesLt CLASS_NAME_COLUMN setText TableColumn classesLt CLASS_EXCLUDE_COLUMN setText
members Lt add Listener SWT Selection new Listener public void handle Event Event e if e detail SWT CHECK update Generate Table Item e item else update Parameters  membersLt addListener handleEvent updateGenerate TableItem updateParameters
Listener member Text Listener new Listener public void handle Event Event e member Editor Tx set Visible false Table Item item member Text Editor get Item if item null return int column member Text Editor get Column Item Data member Data Item Data item get Data String text member Editor Tx get Text Meta Data meta Data app get Meta Data if member Data instanceof Field Data Field Data field Data Field Data member Data switch column case FIELD CAST COLUMN field Data set Cast text item set Text column field Data get Cast break case FIELD ACCESSOR COLUMN field Data set Accessor text item set Text column field Data get Accessor break case FIELD EXCLUDE COLUMN field Data set Exclude text item set Text column field Data get Exclude break meta Data set Meta Data field Data get Field field Data members Lt get Column column pack else if member Data instanceof Method Data Method Data method Data Method Data member Data switch column case METHOD EXCLUDE COLUMN method Data set Exclude text item set Text column method Data get Exclude break meta Data set Meta Data method Data get Method method Data members Lt get Column column pack  memberTextListener handleEvent memberEditorTx setVisible TableItem memberTextEditor getItem memberTextEditor getColumn ItemData memberData ItemData getData memberEditorTx getText MetaData metaData getMetaData memberData FieldData FieldData fieldData FieldData memberData FIELD_CAST_COLUMN fieldData setCast setText fieldData getCast FIELD_ACCESSOR_COLUMN fieldData setAccessor setText fieldData getAccessor FIELD_EXCLUDE_COLUMN fieldData setExclude setText fieldData getExclude metaData setMetaData fieldData getField fieldData membersLt getColumn memberData MethodData MethodData methodData MethodData memberData METHOD_EXCLUDE_COLUMN methodData setExclude setText methodData getExclude metaData setMetaData methodData getMethod methodData membersLt getColumn
Listener member List Listener new Listener public void handle Event Event e member Editor Lt set Visible false Table Item item member List Editor get Item if item null return int column member List Editor get Column Item Data data Item Data item get Data String flags member Editor Lt get Selection data set Flags flags item set Text column get Flags String data get Flags item set Checked data is Generate Meta Data meta Data app get Meta Data if data instanceof Field Data Field Data field Data Field Data data meta Data set Meta Data field Data get Field field Data members Lt get Column column pack else if data instanceof Method Data Method Data method Data Method Data data meta Data set Meta Data method Data get Method method Data members Lt get Column column pack  memberListListener handleEvent memberEditorLt setVisible TableItem memberListEditor getItem memberListEditor getColumn ItemData ItemData getData memberEditorLt getSelection setFlags setText getFlagsString getFlags setChecked isGenerate MetaData metaData getMetaData FieldData FieldData fieldData FieldData metaData setMetaData fieldData getField fieldData membersLt getColumn MethodData MethodData methodData MethodData metaData setMetaData methodData getMethod methodData membersLt getColumn
members Lt add Listener SWT Mouse Down new Listener public void handle Event Event e if e button 1 return Point pt new Point e x e y Table Item item members Lt get Item pt if item null return int column 1 for int i 0 i members Lt get Column Count i if item get Bounds i contains pt column i break if column 1 return Item Data item Data Item Data item get Data if item Data instanceof Field Data Field Data data Field Data item Data if column FIELD CAST COLUMN column FIELD ACCESSOR COLUMN column FIELD EXCLUDE COLUMN member Text Editor set Column column member Text Editor set Item item String text switch column case FIELD CAST COLUMN text data get Cast break case FIELD ACCESSOR COLUMN text data get Accessor break case FIELD EXCLUDE COLUMN text data get Exclude break member Editor Tx set Text text member Editor Tx select All member Editor Tx set Visible true member Editor Tx set Focus else if column FIELD FLAGS COLUMN if members Lt get Client Area contains pt x pt y member Editor Lt get Size y member List Editor vertical Alignment SWT TOP else member List Editor vertical Alignment SWT BOTTOM member List Editor set Column column member List Editor set Item item member Editor Lt set Items Field Data get All Flags Point size member Editor Lt compute Size SWT DEFAULT SWT DEFAULT member List Editor minimum Width size x member List Editor minimum Height size y member Editor Lt set Selection data get Flags member Editor Lt set Visible true member Editor Lt set Focus else if item Data instanceof Method Data Method Data data Method Data item Data if column METHOD EXCLUDE COLUMN member Text Editor set Column column member Text Editor set Item item member Editor Tx set Text data get Exclude member Editor Tx select All member Editor Tx set Visible true member Editor Tx set Focus else if column METHOD FLAGS COLUMN if members Lt get Client Area contains pt x pt y member Editor Lt get Size y member List Editor vertical Alignment SWT TOP else member List Editor vertical Alignment SWT BOTTOM member List Editor set Column column member List Editor set Item item member Editor Lt set Items Method Data get All Flags Point size member Editor Lt compute Size SWT DEFAULT SWT DEFAULT member List Editor minimum Width size x member List Editor minimum Height size y member Editor Lt set Selection data get Flags member Editor Lt set Visible true member Editor Lt set Focus  membersLt addListener MouseDown handleEvent TableItem membersLt getItem membersLt getColumnCount getBounds ItemData itemData ItemData getData itemData FieldData FieldData FieldData itemData FIELD_CAST_COLUMN FIELD_ACCESSOR_COLUMN FIELD_EXCLUDE_COLUMN memberTextEditor setColumn memberTextEditor setItem FIELD_CAST_COLUMN getCast FIELD_ACCESSOR_COLUMN getAccessor FIELD_EXCLUDE_COLUMN getExclude memberEditorTx setText memberEditorTx selectAll memberEditorTx setVisible memberEditorTx setFocus FIELD_FLAGS_COLUMN membersLt getClientArea memberEditorLt getSize memberListEditor verticalAlignment memberListEditor verticalAlignment memberListEditor setColumn memberListEditor setItem memberEditorLt setItems FieldData getAllFlags memberEditorLt computeSize memberListEditor minimumWidth memberListEditor minimumHeight memberEditorLt setSelection getFlags memberEditorLt setVisible memberEditorLt setFocus itemData MethodData MethodData MethodData itemData METHOD_EXCLUDE_COLUMN memberTextEditor setColumn memberTextEditor setItem memberEditorTx setText getExclude memberEditorTx selectAll memberEditorTx setVisible memberEditorTx setFocus METHOD_FLAGS_COLUMN membersLt getClientArea memberEditorLt getSize memberListEditor verticalAlignment memberListEditor verticalAlignment memberListEditor setColumn memberListEditor setItem memberEditorLt setItems MethodData getAllFlags memberEditorLt computeSize memberListEditor minimumWidth memberListEditor minimumHeight memberEditorLt setSelection getFlags memberEditorLt setVisible memberEditorLt setFocus
void create Members Panel Composite panel Label members Lb new Label panel SWT NONE members Lb set Text Members Grid Data data members Lt new Table panel SWT CHECK SWT MULTI SWT BORDER SWT H SCROLL SWT V SCROLL SWT FULL SELECTION data new Grid Data Grid Data FILL BOTH data height Hint members Lt get Item Height 6 members Lt set Layout Data data members Lt add Listener SWT Selection new Listener public void handle Event Event e if e detail SWT CHECK update Generate Table Item e item else update Parameters member Text Editor new Table Editor members Lt member Text Editor grab Horizontal true member Editor Tx new Text members Lt SWT SINGLE member Text Editor set Editor member Editor Tx Listener member Text Listener new Listener public void handle Event Event e member Editor Tx set Visible false Table Item item member Text Editor get Item if item null return int column member Text Editor get Column Item Data member Data Item Data item get Data String text member Editor Tx get Text Meta Data meta Data app get Meta Data if member Data instanceof Field Data Field Data field Data Field Data member Data switch column case FIELD CAST COLUMN field Data set Cast text item set Text column field Data get Cast break case FIELD ACCESSOR COLUMN field Data set Accessor text item set Text column field Data get Accessor break case FIELD EXCLUDE COLUMN field Data set Exclude text item set Text column field Data get Exclude break meta Data set Meta Data field Data get Field field Data members Lt get Column column pack else if member Data instanceof Method Data Method Data method Data Method Data member Data switch column case METHOD EXCLUDE COLUMN method Data set Exclude text item set Text column method Data get Exclude break meta Data set Meta Data method Data get Method method Data members Lt get Column column pack member Editor Tx add Listener SWT Default Selection member Text Listener member Editor Tx add Listener SWT Focus Out member Text Listener member List Editor new Table Editor members Lt member Editor Lt new List members Lt SWT MULTI SWT BORDER member List Editor set Editor member Editor Lt Listener member List Listener new Listener public void handle Event Event e member Editor Lt set Visible false Table Item item member List Editor get Item if item null return int column member List Editor get Column Item Data data Item Data item get Data String flags member Editor Lt get Selection data set Flags flags item set Text column get Flags String data get Flags item set Checked data is Generate Meta Data meta Data app get Meta Data if data instanceof Field Data Field Data field Data Field Data data meta Data set Meta Data field Data get Field field Data members Lt get Column column pack else if data instanceof Method Data Method Data method Data Method Data data meta Data set Meta Data method Data get Method method Data members Lt get Column column pack member Editor Lt add Listener SWT Default Selection member List Listener member Editor Lt add Listener SWT Focus Out member List Listener members Lt add Listener SWT Mouse Down new Listener public void handle Event Event e if e button 1 return Point pt new Point e x e y Table Item item members Lt get Item pt if item null return int column 1 for int i 0 i members Lt get Column Count i if item get Bounds i contains pt column i break if column 1 return Item Data item Data Item Data item get Data if item Data instanceof Field Data Field Data data Field Data item Data if column FIELD CAST COLUMN column FIELD ACCESSOR COLUMN column FIELD EXCLUDE COLUMN member Text Editor set Column column member Text Editor set Item item String text switch column case FIELD CAST COLUMN text data get Cast break case FIELD ACCESSOR COLUMN text data get Accessor break case FIELD EXCLUDE COLUMN text data get Exclude break member Editor Tx set Text text member Editor Tx select All member Editor Tx set Visible true member Editor Tx set Focus else if column FIELD FLAGS COLUMN if members Lt get Client Area contains pt x pt y member Editor Lt get Size y member List Editor vertical Alignment SWT TOP else member List Editor vertical Alignment SWT BOTTOM member List Editor set Column column member List Editor set Item item member Editor Lt set Items Field Data get All Flags Point size member Editor Lt compute Size SWT DEFAULT SWT DEFAULT member List Editor minimum Width size x member List Editor minimum Height size y member Editor Lt set Selection data get Flags member Editor Lt set Visible true member Editor Lt set Focus else if item Data instanceof Method Data Method Data data Method Data item Data if column METHOD EXCLUDE COLUMN member Text Editor set Column column member Text Editor set Item item member Editor Tx set Text data get Exclude member Editor Tx select All member Editor Tx set Visible true member Editor Tx set Focus else if column METHOD FLAGS COLUMN if members Lt get Client Area contains pt x pt y member Editor Lt get Size y member List Editor vertical Alignment SWT TOP else member List Editor vertical Alignment SWT BOTTOM member List Editor set Column column member List Editor set Item item member Editor Lt set Items Method Data get All Flags Point size member Editor Lt compute Size SWT DEFAULT SWT DEFAULT member List Editor minimum Width size x member List Editor minimum Height size y member Editor Lt set Selection data get Flags member Editor Lt set Visible true member Editor Lt set Focus  createMembersPanel membersLb membersLb setText GridData membersLt H_SCROLL V_SCROLL FULL_SELECTION GridData GridData FILL_BOTH heightHint membersLt getItemHeight membersLt setLayoutData membersLt addListener handleEvent updateGenerate TableItem updateParameters memberTextEditor TableEditor membersLt memberTextEditor grabHorizontal memberEditorTx membersLt memberTextEditor setEditor memberEditorTx memberTextListener handleEvent memberEditorTx setVisible TableItem memberTextEditor getItem memberTextEditor getColumn ItemData memberData ItemData getData memberEditorTx getText MetaData metaData getMetaData memberData FieldData FieldData fieldData FieldData memberData FIELD_CAST_COLUMN fieldData setCast setText fieldData getCast FIELD_ACCESSOR_COLUMN fieldData setAccessor setText fieldData getAccessor FIELD_EXCLUDE_COLUMN fieldData setExclude setText fieldData getExclude metaData setMetaData fieldData getField fieldData membersLt getColumn memberData MethodData MethodData methodData MethodData memberData METHOD_EXCLUDE_COLUMN methodData setExclude setText methodData getExclude metaData setMetaData methodData getMethod methodData membersLt getColumn memberEditorTx addListener DefaultSelection memberTextListener memberEditorTx addListener FocusOut memberTextListener memberListEditor TableEditor membersLt memberEditorLt membersLt memberListEditor setEditor memberEditorLt memberListListener handleEvent memberEditorLt setVisible TableItem memberListEditor getItem memberListEditor getColumn ItemData ItemData getData memberEditorLt getSelection setFlags setText getFlagsString getFlags setChecked isGenerate MetaData metaData getMetaData FieldData FieldData fieldData FieldData metaData setMetaData fieldData getField fieldData membersLt getColumn MethodData MethodData methodData MethodData metaData setMetaData methodData getMethod methodData membersLt getColumn memberEditorLt addListener DefaultSelection memberListListener memberEditorLt addListener FocusOut memberListListener membersLt addListener MouseDown handleEvent TableItem membersLt getItem membersLt getColumnCount getBounds ItemData itemData ItemData getData itemData FieldData FieldData FieldData itemData FIELD_CAST_COLUMN FIELD_ACCESSOR_COLUMN FIELD_EXCLUDE_COLUMN memberTextEditor setColumn memberTextEditor setItem FIELD_CAST_COLUMN getCast FIELD_ACCESSOR_COLUMN getAccessor FIELD_EXCLUDE_COLUMN getExclude memberEditorTx setText memberEditorTx selectAll memberEditorTx setVisible memberEditorTx setFocus FIELD_FLAGS_COLUMN membersLt getClientArea memberEditorLt getSize memberListEditor verticalAlignment memberListEditor verticalAlignment memberListEditor setColumn memberListEditor setItem memberEditorLt setItems FieldData getAllFlags memberEditorLt computeSize memberListEditor minimumWidth memberListEditor minimumHeight memberEditorLt setSelection getFlags memberEditorLt setVisible memberEditorLt setFocus itemData MethodData MethodData MethodData itemData METHOD_EXCLUDE_COLUMN memberTextEditor setColumn memberTextEditor setItem memberEditorTx setText getExclude memberEditorTx selectAll memberEditorTx setVisible memberEditorTx setFocus METHOD_FLAGS_COLUMN membersLt getClientArea memberEditorLt getSize memberListEditor verticalAlignment memberListEditor verticalAlignment memberListEditor setColumn memberListEditor setItem memberEditorLt setItems MethodData getAllFlags memberEditorLt computeSize memberListEditor minimumWidth memberListEditor minimumHeight memberEditorLt setSelection getFlags memberEditorLt setVisible memberEditorLt setFocus
params Lt add Listener SWT Selection new Listener public void handle Event Event e if e detail SWT CHECK update Generate Table Item e item  paramsLt addListener handleEvent updateGenerate TableItem
Listener param Text Listener new Listener public void handle Event Event e param Editor Tx set Visible false Table Item item param Text Editor get Item if item null return int column param Text Editor get Column Parameter Data param Data Parameter Data item get Data if column PARAM CAST COLUMN String text param Editor Tx get Text param Data set Cast text item set Text column param Data get Cast Meta Data meta Data app get Meta Data meta Data set Meta Data param Data get Method param Data get Parameter param Data params Lt get Column column pack  paramTextListener handleEvent paramEditorTx setVisible TableItem paramTextEditor getItem paramTextEditor getColumn ParameterData paramData ParameterData getData PARAM_CAST_COLUMN paramEditorTx getText paramData setCast setText paramData getCast MetaData metaData getMetaData metaData setMetaData paramData getMethod paramData getParameter paramData paramsLt getColumn
Listener param List Listener new Listener public void handle Event Event e param Editor Lt set Visible false Table Item item param List Editor get Item if item null return int column param List Editor get Column Parameter Data param Data Parameter Data item get Data if column PARAM FLAGS COLUMN String flags param Editor Lt get Selection param Data set Flags flags item set Text column get Flags String param Data get Flags Meta Data meta Data app get Meta Data meta Data set Meta Data param Data get Method param Data get Parameter param Data params Lt get Column column pack  paramListListener handleEvent paramEditorLt setVisible TableItem paramListEditor getItem paramListEditor getColumn ParameterData paramData ParameterData getData PARAM_FLAGS_COLUMN paramEditorLt getSelection paramData setFlags setText getFlagsString paramData getFlags MetaData metaData getMetaData metaData setMetaData paramData getMethod paramData getParameter paramData paramsLt getColumn
params Lt add Listener SWT Mouse Down new Listener public void handle Event Event e if e button 1 return Point pt new Point e x e y Table Item item params Lt get Item pt if item null return int column 1 for int i 0 i params Lt get Column Count i if item get Bounds i contains pt column i break if column 1 return Parameter Data data Parameter Data item get Data if column PARAM CAST COLUMN param Text Editor set Column column param Text Editor set Item item param Editor Tx set Text data get Cast param Editor Tx select All param Editor Tx set Visible true param Editor Tx set Focus else if column PARAM FLAGS COLUMN if params Lt get Client Area contains pt x pt y param Editor Lt get Size y param List Editor vertical Alignment SWT TOP else param List Editor vertical Alignment SWT BOTTOM param List Editor set Column column param List Editor set Item item param Editor Lt set Selection data get Flags param Editor Lt set Visible true param Editor Lt set Focus  paramsLt addListener MouseDown handleEvent TableItem paramsLt getItem paramsLt getColumnCount getBounds ParameterData ParameterData getData PARAM_CAST_COLUMN paramTextEditor setColumn paramTextEditor setItem paramEditorTx setText getCast paramEditorTx selectAll paramEditorTx setVisible paramEditorTx setFocus PARAM_FLAGS_COLUMN paramsLt getClientArea paramEditorLt getSize paramListEditor verticalAlignment paramListEditor verticalAlignment paramListEditor setColumn paramListEditor setItem paramEditorLt setSelection getFlags paramEditorLt setVisible paramEditorLt setFocus
void create Parameters Panel Composite panel Label params Lb new Label panel SWT NONE params Lb set Text Parameters Grid Data data params Lt new Table panel SWT MULTI SWT BORDER SWT H SCROLL SWT V SCROLL SWT FULL SELECTION data new Grid Data Grid Data FILL BOTH int item Height params Lt get Item Height data height Hint item Height 6 params Lt set Layout Data data params Lt add Listener SWT Selection new Listener public void handle Event Event e if e detail SWT CHECK update Generate Table Item e item Table Column column column new Table Column params Lt SWT NONE PARAM INDEX COLUMN column new Table Column params Lt SWT NONE PARAM TYPE COLUMN column set Text Type column new Table Column params Lt SWT NONE PARAM CAST COLUMN column set Text Cast column new Table Column params Lt SWT NONE PARAM FLAGS COLUMN column set Text Flags param Text Editor new Table Editor params Lt param Text Editor grab Horizontal true param Editor Tx new Text params Lt SWT SINGLE param Text Editor set Editor param Editor Tx Listener param Text Listener new Listener public void handle Event Event e param Editor Tx set Visible false Table Item item param Text Editor get Item if item null return int column param Text Editor get Column Parameter Data param Data Parameter Data item get Data if column PARAM CAST COLUMN String text param Editor Tx get Text param Data set Cast text item set Text column param Data get Cast Meta Data meta Data app get Meta Data meta Data set Meta Data param Data get Method param Data get Parameter param Data params Lt get Column column pack param Editor Tx add Listener SWT Default Selection param Text Listener param Editor Tx add Listener SWT Focus Out param Text Listener param List Editor new Table Editor params Lt param Editor Lt new List params Lt SWT MULTI SWT BORDER param Editor Lt set Items Parameter Data get All Flags Point size param Editor Lt compute Size SWT DEFAULT SWT DEFAULT param List Editor minimum Width size x param List Editor minimum Height size y param List Editor set Editor param Editor Lt Listener param List Listener new Listener public void handle Event Event e param Editor Lt set Visible false Table Item item param List Editor get Item if item null return int column param List Editor get Column Parameter Data param Data Parameter Data item get Data if column PARAM FLAGS COLUMN String flags param Editor Lt get Selection param Data set Flags flags item set Text column get Flags String param Data get Flags Meta Data meta Data app get Meta Data meta Data set Meta Data param Data get Method param Data get Parameter param Data params Lt get Column column pack param Editor Lt add Listener SWT Default Selection param List Listener param Editor Lt add Listener SWT Focus Out param List Listener params Lt add Listener SWT Mouse Down new Listener public void handle Event Event e if e button 1 return Point pt new Point e x e y Table Item item params Lt get Item pt if item null return int column 1 for int i 0 i params Lt get Column Count i if item get Bounds i contains pt column i break if column 1 return Parameter Data data Parameter Data item get Data if column PARAM CAST COLUMN param Text Editor set Column column param Text Editor set Item item param Editor Tx set Text data get Cast param Editor Tx select All param Editor Tx set Visible true param Editor Tx set Focus else if column PARAM FLAGS COLUMN if params Lt get Client Area contains pt x pt y param Editor Lt get Size y param List Editor vertical Alignment SWT TOP else param List Editor vertical Alignment SWT BOTTOM param List Editor set Column column param List Editor set Item item param Editor Lt set Selection data get Flags param Editor Lt set Visible true param Editor Lt set Focus  createParametersPanel paramsLb paramsLb setText GridData paramsLt H_SCROLL V_SCROLL FULL_SELECTION GridData GridData FILL_BOTH itemHeight paramsLt getItemHeight heightHint itemHeight paramsLt setLayoutData paramsLt addListener handleEvent updateGenerate TableItem TableColumn TableColumn paramsLt PARAM_INDEX_COLUMN TableColumn paramsLt PARAM_TYPE_COLUMN setText TableColumn paramsLt PARAM_CAST_COLUMN setText TableColumn paramsLt PARAM_FLAGS_COLUMN setText paramTextEditor TableEditor paramsLt paramTextEditor grabHorizontal paramEditorTx paramsLt paramTextEditor setEditor paramEditorTx paramTextListener handleEvent paramEditorTx setVisible TableItem paramTextEditor getItem paramTextEditor getColumn ParameterData paramData ParameterData getData PARAM_CAST_COLUMN paramEditorTx getText paramData setCast setText paramData getCast MetaData metaData getMetaData metaData setMetaData paramData getMethod paramData getParameter paramData paramsLt getColumn paramEditorTx addListener DefaultSelection paramTextListener paramEditorTx addListener FocusOut paramTextListener paramListEditor TableEditor paramsLt paramEditorLt paramsLt paramEditorLt setItems ParameterData getAllFlags paramEditorLt computeSize paramListEditor minimumWidth paramListEditor minimumHeight paramListEditor setEditor paramEditorLt paramListListener handleEvent paramEditorLt setVisible TableItem paramListEditor getItem paramListEditor getColumn ParameterData paramData ParameterData getData PARAM_FLAGS_COLUMN paramEditorLt getSelection paramData setFlags setText getFlagsString paramData getFlags MetaData metaData getMetaData metaData setMetaData paramData getMethod paramData getParameter paramData paramsLt getColumn paramEditorLt addListener DefaultSelection paramListListener paramEditorLt addListener FocusOut paramListListener paramsLt addListener MouseDown handleEvent TableItem paramsLt getItem paramsLt getColumnCount getBounds ParameterData ParameterData getData PARAM_CAST_COLUMN paramTextEditor setColumn paramTextEditor setItem paramEditorTx setText getCast paramEditorTx selectAll paramEditorTx setVisible paramEditorTx setFocus PARAM_FLAGS_COLUMN paramsLt getClientArea paramEditorLt getSize paramListEditor verticalAlignment paramListEditor verticalAlignment paramListEditor setColumn paramListEditor setItem paramEditorLt setSelection getFlags paramEditorLt setVisible paramEditorLt setFocus
Button create Action Button Composite parent String text Listener listener Button action new Button parent SWT PUSH action set Text text Grid Data data new Grid Data Grid Data FILL HORIZONTAL action set Layout Data data action add Listener SWT Selection listener return action  createActionButton setText GridData GridData GridData FILL_HORIZONTAL setLayoutData addListener
create Action Button actions Panel Generate All new Listener public void handle Event Event e if update Output Dir return Cursor cursor new Cursor shell get Display SWT CURSOR WAIT shell set Cursor cursor app generate shell set Cursor null cursor dispose  createActionButton actionsPanel handleEvent updateOutputDir getDisplay CURSOR_WAIT setCursor setCursor
create Action Button actions Panel Generate Structs Header new Listener public void handle Event Event e generate Structs Header  createActionButton actionsPanel handleEvent generateStructsHeader
create Action Button actions Panel Generate Structs new Listener public void handle Event Event e generate Structs  createActionButton actionsPanel handleEvent generateStructs
create Action Button actions Panel Generate Natives new Listener public void handle Event Event e generate Natives  createActionButton actionsPanel handleEvent generateNatives
create Action Button actions Panel Generate Constants new Listener public void handle Event Event e generate Constants  createActionButton actionsPanel handleEvent generateConstants
create Action Button actions Panel Generate Sizeof new Listener public void handle Event Event e generate Sizeof  createActionButton actionsPanel handleEvent generateSizeof
create Action Button actions Panel Generate Meta Data new Listener public void handle Event Event e generate Meta Data  createActionButton actionsPanel handleEvent generateMetaData
void create Action Buttons Composite parent Composite actions Panel new Composite parent SWT NONE Grid Data data new Grid Data Grid Data FILL VERTICAL actions Panel set Layout Data data Grid Layout actions Layout new Grid Layout actions Layout num Columns 1 actions Panel set Layout actions Layout create Action Button actions Panel Generate All new Listener public void handle Event Event e if update Output Dir return Cursor cursor new Cursor shell get Display SWT CURSOR WAIT shell set Cursor cursor app generate shell set Cursor null cursor dispose Label separator new Label actions Panel SWT SEPARATOR SWT HORIZONTAL data new Grid Data Grid Data FILL HORIZONTAL separator set Layout Data data separator new Label actions Panel SWT SEPARATOR SWT HORIZONTAL data new Grid Data Grid Data FILL HORIZONTAL separator set Layout Data data create Action Button actions Panel Generate Structs Header new Listener public void handle Event Event e generate Structs Header create Action Button actions Panel Generate Structs new Listener public void handle Event Event e generate Structs create Action Button actions Panel Generate Natives new Listener public void handle Event Event e generate Natives create Action Button actions Panel Generate Constants new Listener public void handle Event Event e generate Constants create Action Button actions Panel Generate Sizeof new Listener public void handle Event Event e generate Sizeof create Action Button actions Panel Generate Meta Data new Listener public void handle Event Event e generate Meta Data  createActionButtons actionsPanel GridData GridData GridData FILL_VERTICAL actionsPanel setLayoutData GridLayout actionsLayout GridLayout actionsLayout numColumns actionsPanel setLayout actionsLayout createActionButton actionsPanel handleEvent updateOutputDir getDisplay CURSOR_WAIT setCursor setCursor actionsPanel GridData GridData FILL_HORIZONTAL setLayoutData actionsPanel GridData GridData FILL_HORIZONTAL setLayoutData createActionButton actionsPanel handleEvent generateStructsHeader createActionButton actionsPanel handleEvent generateStructs createActionButton actionsPanel handleEvent generateNatives createActionButton actionsPanel handleEvent generateConstants createActionButton actionsPanel handleEvent generateSizeof createActionButton actionsPanel handleEvent generateMetaData
public void run shell open while shell is Disposed if display read And Dispatch display sleep cleanup  isDisposed readAndDispatch
String get Package String String class Name int dot app get Main Class last Index Of if dot 1 return return app get Main Class substring 0 dot  getPackageString className getMainClass lastIndexOf getMainClass
String get Class String Class clazz String name JNI Generator get Type Signature3 clazz int index name last Index Of if index 1 return name return name substring index 1 name length  getClassString JNIGenerator getTypeSignature3 lastIndexOf
String get Flags String String flags if flags length 0 return String Buffer buffer new String Buffer for int j 0 j flags length j String flag flags j if buffer length 0 buffer append buffer append flag return buffer to String  getFlagsString StringBuffer StringBuffer toString
String get Method String Method method String pkg Name get Package String method get Declaring Class get Name String Buffer buffer new String Buffer buffer append method get Name buffer append Class params method get Parameter Types for int i 0 i params length i Class param params i if i 0 buffer append String string JNI Generator get Type Signature3 param if string starts With pkg Name string string substring pkg Name length 1 buffer append string buffer append return buffer to String  getMethodString pkgName getPackageString getDeclaringClass getName StringBuffer StringBuffer getName getParameterTypes JNIGenerator getTypeSignature3 startsWith pkgName pkgName toString
String get Field String Field field return field get Name  getFieldString getName
void update Classes classes Lt remove All Meta Data meta Data app get Meta Data Class classes app get Classes for int i 0 i classes length i Class clazz classes i Class Data class Data meta Data get Meta Data clazz Table Item item new Table Item classes Lt SWT NONE item set Data class Data item set Text CLASS NAME COLUMN get Class String clazz item set Checked class Data is Generate Table Column columns classes Lt get Columns for int i 0 i columns length i Table Column column columns i column pack  updateClasses classesLt removeAll MetaData metaData getMetaData getClasses ClassData classData metaData getMetaData TableItem TableItem classesLt setData classData setText CLASS_NAME_COLUMN getClassString setChecked classData isGenerate TableColumn classesLt getColumns TableColumn
void update Members members Lt remove All Meta Data meta Data app get Meta Data members Lt set Header Visible false Table Column columns members Lt get Columns for int i 0 i columns length i Table Column column columns i column dispose int indices classes Lt get Selection Indices if indices length 1 return Table Item class Item classes Lt get Item indices 0 Class Data class Data Class Data class Item get Data Class clazz class Data get Clazz boolean has Natives false Method methods clazz get Declared Methods for int i 0 i methods length i Method method methods i int mods method get Modifiers if has Natives mods Modifier NATIVE 0 break members Lt set Redraw false if has Natives Table Column column column new Table Column members Lt SWT NONE METHOD NAME COLUMN column set Text Method column new Table Column members Lt SWT NONE METHOD FLAGS COLUMN column set Text Flags column new Table Column members Lt SWT NONE METHOD EXCLUDE COLUMN column set Text Exclude JNI Generator sort methods for int i 0 i methods length i Method method methods i if method get Modifiers Modifier NATIVE 0 continue Method Data method Data meta Data get Meta Data method Table Item item new Table Item members Lt SWT NONE item set Data method Data item set Text METHOD NAME COLUMN get Method String method item set Checked method Data is Generate item set Text METHOD FLAGS COLUMN get Flags String method Data get Flags item set Text METHOD EXCLUDE COLUMN method Data get Exclude else Table Column column column new Table Column members Lt SWT NONE FIELD NAME COLUMN column set Text Field column new Table Column members Lt SWT NONE FIELD CAST COLUMN column set Text Cast column new Table Column members Lt SWT NONE FIELD ACCESSOR COLUMN column set Text Accessor column new Table Column members Lt SWT NONE FIELD FLAGS COLUMN column set Text Flags column new Table Column members Lt SWT NONE FIELD EXCLUDE COLUMN column set Text Exclude Field fields clazz get Declared Fields for int i 0 i fields length i Field field fields i int mods field get Modifiers if mods Modifier PUBLIC 0 mods Modifier FINAL 0 mods Modifier STATIC 0 continue Field Data field Data meta Data get Meta Data field Table Item item new Table Item members Lt SWT NONE item set Data field Data item set Text FIELD NAME COLUMN get Field String field item set Checked field Data is Generate item set Text FIELD CAST COLUMN field Data get Cast item set Text FIELD ACCESSOR COLUMN field Data get Accessor item set Text FIELD FLAGS COLUMN get Flags String field Data get Flags item set Text FIELD EXCLUDE COLUMN field Data get Exclude columns members Lt get Columns for int i 0 i columns length i Table Column column columns i column pack members Lt set Header Visible true members Lt set Redraw true  updateMembers membersLt removeAll MetaData metaData getMetaData membersLt setHeaderVisible TableColumn membersLt getColumns TableColumn classesLt getSelectionIndices TableItem classItem classesLt getItem ClassData classData ClassData classItem getData classData getClazz hasNatives getDeclaredMethods getModifiers hasNatives membersLt setRedraw hasNatives TableColumn TableColumn membersLt METHOD_NAME_COLUMN setText TableColumn membersLt METHOD_FLAGS_COLUMN setText TableColumn membersLt METHOD_EXCLUDE_COLUMN setText JNIGenerator getModifiers MethodData methodData metaData getMetaData TableItem TableItem membersLt setData methodData setText METHOD_NAME_COLUMN getMethodString setChecked methodData isGenerate setText METHOD_FLAGS_COLUMN getFlagsString methodData getFlags setText METHOD_EXCLUDE_COLUMN methodData getExclude TableColumn TableColumn membersLt FIELD_NAME_COLUMN setText TableColumn membersLt FIELD_CAST_COLUMN setText TableColumn membersLt FIELD_ACCESSOR_COLUMN setText TableColumn membersLt FIELD_FLAGS_COLUMN setText TableColumn membersLt FIELD_EXCLUDE_COLUMN setText getDeclaredFields getModifiers FieldData fieldData metaData getMetaData TableItem TableItem membersLt setData fieldData setText FIELD_NAME_COLUMN getFieldString setChecked fieldData isGenerate setText FIELD_CAST_COLUMN fieldData getCast setText FIELD_ACCESSOR_COLUMN fieldData getAccessor setText FIELD_FLAGS_COLUMN getFlagsString fieldData getFlags setText FIELD_EXCLUDE_COLUMN fieldData getExclude membersLt getColumns TableColumn membersLt setHeaderVisible membersLt setRedraw
void update Parameters params Lt remove All Meta Data meta Data app get Meta Data int indices members Lt get Selection Indices if indices length 1 params Lt set Header Visible false return params Lt set Redraw false Table Item member Item members Lt get Item indices 0 Object data member Item get Data if data instanceof Method Data return Method Data method Data Method Data member Item get Data Method method method Data get Method Class params method get Parameter Types for int i 0 i params length i Class param params i Parameter Data param Data meta Data get Meta Data method i Table Item item new Table Item params Lt SWT NONE item set Data param Data item set Text PARAM INDEX COLUMN String value Of i item set Text PARAM TYPE COLUMN get Class String param item set Text PARAM CAST COLUMN param Data get Cast item set Text PARAM FLAGS COLUMN get Flags String param Data get Flags Table Column columns params Lt get Columns for int i 0 i columns length i Table Column column columns i column pack params Lt set Redraw true params Lt set Header Visible true  updateParameters paramsLt removeAll MetaData metaData getMetaData membersLt getSelectionIndices paramsLt setHeaderVisible paramsLt setRedraw TableItem memberItem membersLt getItem memberItem getData MethodData MethodData methodData MethodData memberItem getData methodData getMethod getParameterTypes ParameterData paramData metaData getMetaData TableItem TableItem paramsLt setData paramData setText PARAM_INDEX_COLUMN valueOf setText PARAM_TYPE_COLUMN getClassString setText PARAM_CAST_COLUMN paramData getCast setText PARAM_FLAGS_COLUMN getFlagsString paramData getFlags TableColumn paramsLt getColumns TableColumn paramsLt setRedraw paramsLt setHeaderVisible
void update Generate Table Item item Meta Data meta Data app get Meta Data Item Data item Data Item Data item get Data item Data set Generate item get Checked if item Data instanceof Class Data Class Data data Class Data item Data meta Data set Meta Data data get Clazz data else if item Data instanceof Field Data Field Data data Field Data item Data item set Text FIELD FLAGS COLUMN get Flags String data get Flags meta Data set Meta Data data get Field data else if item Data instanceof Method Data Method Data data Method Data item Data item set Text METHOD FLAGS COLUMN get Flags String data get Flags meta Data set Meta Data data get Method data else if item Data instanceof Parameter Data Parameter Data data Parameter Data item Data item set Text PARAM FLAGS COLUMN get Flags String data get Flags meta Data set Meta Data data get Method data get Parameter data  updateGenerate TableItem MetaData metaData getMetaData ItemData itemData ItemData getData itemData setGenerate getChecked itemData ClassData ClassData ClassData itemData metaData setMetaData getClazz itemData FieldData FieldData FieldData itemData setText FIELD_FLAGS_COLUMN getFlagsString getFlags metaData setMetaData getField itemData MethodData MethodData MethodData itemData setText METHOD_FLAGS_COLUMN getFlagsString getFlags metaData setMetaData getMethod itemData ParameterData ParameterData ParameterData itemData setText PARAM_FLAGS_COLUMN getFlagsString getFlags metaData setMetaData getMethod getParameter
boolean update Output Dir String output Dir Str output Dir Cb get Text File file new File output Dir Str if file exists Message Box dialog new Message Box shell SWT OK SWT ICON ERROR dialog set Message Output directory does not exist dialog open return false if file is Directory Message Box dialog new Message Box shell SWT OK SWT ICON ERROR dialog set Message Output directory is not a directory dialog open return false if output Dir Str length 0 if output Dir Str equals app get Output Dir app set Output Dir output Dir Str if output Dir Cb index Of output Dir Str 1 output Dir Cb add output Dir Str return true  updateOutputDir outputDirStr outputDirCb getText outputDirStr MessageBox MessageBox ICON_ERROR setMessage isDirectory MessageBox MessageBox ICON_ERROR setMessage outputDirStr outputDirStr getOutputDir setOutputDir outputDirStr outputDirCb indexOf outputDirStr outputDirCb outputDirStr
void update Main Class String main Class Str main Class Cb get Text if main Class Str length 0 if main Class Str equals app get Main Class app set Main Class main Class Str if main Class Cb index Of main Class Str 1 main Class Cb add main Class Str  updateMainClass mainClassStr mainClassCb getText mainClassStr mainClassStr getMainClass setMainClass mainClassStr mainClassCb indexOf mainClassStr mainClassCb mainClassStr
public static void main String args JNI Generator App gen new JNI Generator App if args length 0 gen set Main Class args 0 if args length 1 gen set Output Dir args 1 else gen set Main Class JNI Generator App get Default Main Class gen set Output Dir JNI Generator App get Default Output Dir JNI Generator AppUI ui new JNI Generator AppUI gen ui open ui run  JNIGeneratorApp JNIGeneratorApp setMainClass setOutputDir setMainClass JNIGeneratorApp getDefaultMainClass setOutputDir JNIGeneratorApp getDefaultOutputDir JNIGeneratorAppUI JNIGeneratorAppUI

Properties data public Meta Data Properties data this data data  MetaData
public Class Data get Meta Data Class clazz String key JNI Generator toC clazz get Name String value get Meta Data key return new Class Data clazz value  ClassData getMetaData JNIGenerator getName getMetaData ClassData
public Field Data get Meta Data Field field String class Name JNI Generator get Class Name field get Declaring Class String key class Name   field get Name String value get Meta Data key return new Field Data field value  FieldData getMetaData className JNIGenerator getClassName getDeclaringClass className _ getName getMetaData FieldData
boolean convert To32 Bit Class param Types boolean changed false for int i 0 i param Types length i Class param Type param Types i if param Type Long TYPE param Types i Integer TYPE changed true if param Type long class param Types i int class changed true return changed  convertTo32Bit paramTypes paramTypes paramType paramTypes paramType paramTypes paramType paramTypes
public Method Data get Meta Data Method method String class Name JNI Generator get Class Name method get Declaring Class String key class Name   JNI Generator get Function Name method String value get Meta Data key null if value null key class Name   method get Name value get Meta Data key null Support for 64 bit port if value null Class param Types method get Parameter Types if convert To32 Bit param Types key class Name   JNI Generator get Function Name method param Types value get Meta Data key null if value null value return new Method Data method value  MethodData getMetaData className JNIGenerator getClassName getDeclaringClass className _ JNIGenerator getFunctionName getMetaData className _ getName getMetaData paramTypes getParameterTypes convertTo32Bit paramTypes className _ JNIGenerator getFunctionName paramTypes getMetaData MethodData
public Parameter Data get Meta Data Method method int parameter String class Name JNI Generator get Class Name method get Declaring Class String key class Name   JNI Generator get Function Name method   parameter String value get Meta Data key null if value null key class Name   method get Name   parameter value get Meta Data key null Support for 64 bit port if value null Class param Types method get Parameter Types if convert To32 Bit param Types key class Name   JNI Generator get Function Name method param Types   parameter value get Meta Data key null if value null value return new Parameter Data method parameter value  ParameterData getMetaData className JNIGenerator getClassName getDeclaringClass className _ JNIGenerator getFunctionName _ getMetaData className _ getName _ getMetaData paramTypes getParameterTypes convertTo32Bit paramTypes className _ JNIGenerator getFunctionName paramTypes _ getMetaData ParameterData
public String get Meta Data String key String default Value return data get Property key default Value  getMetaData defaultValue getProperty defaultValue
public void set Meta Data Class clazz Class Data value String key JNI Generator toC clazz get Name set Meta Data key value to String  setMetaData ClassData JNIGenerator getName setMetaData toString
public void set Meta Data Field field Field Data value String class Name JNI Generator get Class Name field get Declaring Class String key class Name   field get Name set Meta Data key value to String  setMetaData FieldData className JNIGenerator getClassName getDeclaringClass className _ getName setMetaData toString
public void set Meta Data Method method Method Data value String key String class Name JNI Generator get Class Name method get Declaring Class if JNI Generator is Unique method Modifier NATIVE key class Name   method get Name else key class Name   JNI Generator get Function Name method set Meta Data key value to String  setMetaData MethodData className JNIGenerator getClassName getDeclaringClass JNIGenerator isUnique className _ getName className _ JNIGenerator getFunctionName setMetaData toString
public void set Meta Data Method method int arg Parameter Data value String key String class Name JNI Generator get Class Name method get Declaring Class if JNI Generator is Unique method Modifier NATIVE key class Name   method get Name   arg else key class Name   JNI Generator get Function Name method   arg set Meta Data key value to String  setMetaData ParameterData className JNIGenerator getClassName getDeclaringClass JNIGenerator isUnique className _ getName _ className _ JNIGenerator getFunctionName _ setMetaData toString
public void set Meta Data String key String value data set Property key value  setMetaData setProperty

public void generate Class clazz output toC clazz get Name output Class Data data get Meta Data get Meta Data clazz if data null output data to String output Delimiter Field fields clazz get Declared Fields generate fields Method methods clazz get Declared Methods generate methods output Delimiter  getName ClassData getMetaData getMetaData toString outputDelimiter getDeclaredFields getDeclaredMethods outputDelimiter
public void generate Field fields for int i 0 i fields length i Field field fields i int mods field get Modifiers if mods Modifier PUBLIC 0 continue if mods Modifier FINAL 0 continue if mods Modifier STATIC 0 continue generate field output Delimiter  getModifiers outputDelimiter
public void generate Field field output get Class Name field get Declaring Class output   output field get Name output Field Data data get Meta Data get Meta Data field if data null output data to String  getClassName getDeclaringClass _ getName FieldData getMetaData getMetaData toString
public void generate Method methods sort methods for int i 0 i methods length i Method method methods i if method get Modifiers Modifier NATIVE 0 continue generate method output Delimiter  getModifiers outputDelimiter
public void generate Method method String Buffer buffer new String Buffer buffer append get Class Name method get Declaring Class buffer append   if is Unique method Modifier NATIVE buffer append method get Name else buffer append get Function Name method String key buffer to String output key output Method Data method Data get Meta Data get Meta Data method if method Data null output method Data to String output Delimiter int length method get Parameter Types length for int i 0 i length i output key output   output i Parameter Data param Data get Meta Data get Meta Data method i if param Data null output param Data to String output Delimiter  StringBuffer StringBuffer getClassName getDeclaringClass _ isUnique getName getFunctionName toString MethodData methodData getMetaData getMetaData methodData methodData toString outputDelimiter getParameterTypes _ ParameterData paramData getMetaData getMetaData paramData paramData toString outputDelimiter
public static void main String args if args length 1 System out println Usage java Cast Generator class Name1 class Name2 return try Meta Data Generator gen new Meta Data Generator for int i 0 i args length i String clazz Name args i Class clazz Class for Name clazz Name gen generate clazz catch Exception e System out println Problem e print Stack Trace System out  CastGenerator className1 className2 MetaDataGenerator MetaDataGenerator clazzName forName clazzName printStackTrace

Method method public Method Data Method method String str super str this method method  MethodData
public static String get All Flags return new String no gen address const dynamic  getAllFlags no_gen
public Method get Method return method  getMethod
public String get Accessor return String get Param accessor  getAccessor getParam
public String get Exclude return String get Param exclude  getExclude getParam
public void set Accessor String str set Param accessor str  setAccessor setParam
public void set Exclude String str set Param exclude str  setExclude setParam

boolean native Macro enter Exit Macro public Natives Generator enter Exit Macro true native Macro true  nativeMacro enterExitMacro NativesGenerator enterExitMacro nativeMacro
public void generate Class clazz String method Name Method methods clazz get Declared Methods int count 0 for int i 0 i methods length i if methods i get Name starts With method Name count Method result new Method count count 0 for int i 0 i methods length i if methods i get Name starts With method Name result count methods i generate result  methodName getDeclaredMethods getName startsWith methodName getName startsWith methodName
public void generate Class clazz Class Data class Data get Meta Data get Meta Data clazz if class Data get Flag no gen return generate Meta Data swt copyright generate Meta Data swt includes generate Native Macro clazz Method methods clazz get Declared Methods generate Excludes methods generate methods  ClassData classData getMetaData getMetaData classData getFlag no_gen generateMetaData swt_copyright generateMetaData swt_includes generateNativeMacro getDeclaredMethods generateExcludes
public void generate Excludes Method methods sort methods Hash Set excludes new Hash Set for int i 0 i methods length i Method method methods i if method get Modifiers Modifier NATIVE 0 continue Method Data method Data get Meta Data get Meta Data method String exclude method Data get Exclude if exclude length 0 excludes add exclude for Iterator iter excludes iterator iter has Next String exclude String iter next output exclude output Delimiter for int i 0 i methods length i Method method methods i if method get Modifiers Modifier NATIVE 0 continue Method Data method Data get Meta Data get Meta Data method String method Exclude method Data get Exclude if exclude equals method Exclude output define NO  output get Function Name method output Delimiter output endif output Delimiter output Delimiter  generateExcludes HashSet HashSet getModifiers MethodData methodData getMetaData getMetaData methodData getExclude hasNext outputDelimiter getModifiers MethodData methodData getMetaData getMetaData methodExclude methodData getExclude methodExclude NO_ getFunctionName outputDelimiter outputDelimiter outputDelimiter
public void generate Method methods sort methods for int i 0 i methods length i Method method methods i if method get Modifiers Modifier NATIVE 0 continue generate method  getModifiers
public void generate Method method Method Data method Data get Meta Data get Meta Data method if method Data get Flag no gen return Class return Type method get Return Type Class param Types method get Parameter Types String function get Function Name method if return Type Void TYPE return Type is Primitive output Warnning bad return type method output Delimiter return generate Source Start function generate Function Prototype method function param Types return Type generate Function Body method method Data function param Types return Type generate Source End function output Delimiter  MethodData methodData getMetaData getMetaData methodData getFlag no_gen returnType getReturnType paramTypes getParameterTypes getFunctionName returnType returnType isPrimitive outputDelimiter generateSourceStart generateFunctionPrototype paramTypes returnType generateFunctionBody methodData paramTypes returnType generateSourceEnd outputDelimiter
public void set Enter Exit Macro boolean enter Exit Macro this enter Exit Macro enter Exit Macro  setEnterExitMacro enterExitMacro enterExitMacro enterExitMacro
public void set Native Macro boolean native Macro this native Macro native Macro  setNativeMacro nativeMacro nativeMacro nativeMacro
void generate Native Macro Class clazz output define output get Class Name clazz output  NATIVE func Java  output toC clazz get Name output   func output Delimiter output Delimiter  generateNativeMacro getClassName _NATIVE Java_ getName _ outputDelimiter outputDelimiter
void generate Get Parameter int i Class param Type Parameter Data param Data boolean critical if param Type is Primitive return output tif arg i output lparg i output if param Type is Array Class component Type param Type get Component Type if component Type is Primitive if critical output env Get Primitive Array Critical env arg i output NULL else output env Get output get Type Signature1 component Type output Array Elements env arg i output NULL else throw new Error not done else if param Type String class if param Data get Flag unicode output env Get String Chars env arg i output NULL else output env Get StringUTF Chars env arg i output NULL else if param Data get Flag no in output  arg i output else output get output get Class Name param Type output Fields env arg i output  arg i output output Delimiter  generateGetParameter paramType ParameterData paramData paramType isPrimitive paramType isArray componentType paramType getComponentType componentType isPrimitive GetPrimitiveArrayCritical getTypeSignature1 componentType ArrayElements paramType paramData getFlag GetStringChars GetStringUTFChars paramData getFlag no_in _arg getClassName paramType _arg outputDelimiter
void generate Set Parameter int i Class param Type Parameter Data param Data boolean critical if param Type is Primitive return if param Type is Array output tif arg i output Class component Type param Type get Component Type if component Type is Primitive if critical output env Release Primitive Array Critical env arg i else output env Release output get Type Signature1 component Type output Array Elements env arg i output lparg i output if param Data get Flag no out output JNI ABORT else output 0 output else throw new Error not done output Delimiter else if param Type String class output tif arg i output if param Data get Flag unicode output env Release String Chars env arg i else output env Release StringUTF Chars env arg i output lparg i output output Delimiter else if param Data get Flag no out output tif arg i output output set output get Class Name param Type output Fields env arg i output lparg i output output Delimiter  generateSetParameter paramType ParameterData paramData paramType isPrimitive paramType isArray componentType paramType getComponentType componentType isPrimitive ReleasePrimitiveArrayCritical getTypeSignature1 componentType ArrayElements paramData getFlag no_out JNI_ABORT outputDelimiter paramType paramData getFlag ReleaseStringChars ReleaseStringUTFChars outputDelimiter paramData getFlag no_out getClassName paramType outputDelimiter
void generate Exit Macro Method method String function if enter Exit Macro return output t output get Class Name method get Declaring Class output  NATIVE EXIT env that output function output  FUNC output Delimiter  generateExitMacro enterExitMacro getClassName getDeclaringClass _NATIVE_EXIT _FUNC outputDelimiter
void generate Enter Macro Method method String function if enter Exit Macro return output t output get Class Name method get Declaring Class output  NATIVE ENTER env that output function output  FUNC output Delimiter  generateEnterMacro enterExitMacro getClassName getDeclaringClass _NATIVE_ENTER _FUNC outputDelimiter
boolean generate Local Vars Method method Class param Types Class return Type boolean needs Return enter Exit Macro for int i 0 i param Types length i Class param Type param Types i if param Type is Primitive continue Parameter Data param Data get Meta Data get Meta Data method i output t if param Type is Array Class component Type param Type get Component Type if component Type is Primitive output get Type Signature2 component Type output lparg i output NULL else throw new Error not done else if param Type String class if param Data get Flag unicode output const jchar lparg i else output const jbyte lparg i output NULL else output get Class Name param Type output  arg i if param Data get Flag init output 0 output lparg i output NULL output Delimiter needs Return true if needs Return if return Type Void TYPE output t output get Type Signature2 return Type output rc output Delimiter return needs Return  generateLocalVars paramTypes returnType needsReturn enterExitMacro paramTypes paramType paramTypes paramType isPrimitive ParameterData paramData getMetaData getMetaData paramType isArray componentType paramType getComponentType componentType isPrimitive getTypeSignature2 componentType paramType paramData getFlag getClassName paramType _arg paramData getFlag outputDelimiter needsReturn needsReturn returnType getTypeSignature2 returnType outputDelimiter needsReturn
void generate Getters Method method Class param Types int critical Count 0 for int i 0 i param Types length i Class param Type param Types i Parameter Data param Data get Meta Data get Meta Data method i if is Critical param Type param Data generate Get Parameter i param Type param Data false else critical Count if critical Count 0 output ifdef JNI VERSION 1 2 output Delimiter output tif IS JNI 1 2 output Delimiter for int i 0 i param Types length i Class param Type param Types i Parameter Data param Data get Meta Data get Meta Data method i if is Critical param Type param Data output t generate Get Parameter i param Type param Data true output t else output Delimiter output endif output Delimiter output t output Delimiter for int i 0 i param Types length i Class param Type param Types i Parameter Data param Data get Meta Data get Meta Data method i if is Critical param Type param Data output t generate Get Parameter i param Type param Data false output t output Delimiter  generateGetters paramTypes criticalCount paramTypes paramType paramTypes ParameterData paramData getMetaData getMetaData isCritical paramType paramData generateGetParameter paramType paramData criticalCount criticalCount JNI_VERSION_1_2 outputDelimiter IS_JNI_1_2 outputDelimiter paramTypes paramType paramTypes ParameterData paramData getMetaData getMetaData isCritical paramType paramData generateGetParameter paramType paramData outputDelimiter outputDelimiter outputDelimiter paramTypes paramType paramTypes ParameterData paramData getMetaData getMetaData isCritical paramType paramData generateGetParameter paramType paramData outputDelimiter
void generate Setters Method method Class param Types int critical Count 0 for int i param Types length 1 i 0 i Class param Type param Types i Parameter Data param Data get Meta Data get Meta Data method i if is Critical param Type param Data critical Count if critical Count 0 output ifdef JNI VERSION 1 2 output Delimiter output tif IS JNI 1 2 output Delimiter for int i param Types length 1 i 0 i Class param Type param Types i Parameter Data param Data get Meta Data get Meta Data method i if is Critical param Type param Data output t generate Set Parameter i param Type param Data true output t else output Delimiter output endif output Delimiter output t output Delimiter for int i param Types length 1 i 0 i Class param Type param Types i Parameter Data param Data get Meta Data get Meta Data method i if is Critical param Type param Data output t generate Set Parameter i param Type param Data false output t output Delimiter for int i param Types length 1 i 0 i Class param Type param Types i Parameter Data param Data get Meta Data get Meta Data method i if is Critical param Type param Data generate Set Parameter i param Type param Data false  generateSetters paramTypes criticalCount paramTypes paramType paramTypes ParameterData paramData getMetaData getMetaData isCritical paramType paramData criticalCount criticalCount JNI_VERSION_1_2 outputDelimiter IS_JNI_1_2 outputDelimiter paramTypes paramType paramTypes ParameterData paramData getMetaData getMetaData isCritical paramType paramData generateSetParameter paramType paramData outputDelimiter outputDelimiter outputDelimiter paramTypes paramType paramTypes ParameterData paramData getMetaData getMetaData isCritical paramType paramData generateSetParameter paramType paramData outputDelimiter paramTypes paramType paramTypes ParameterData paramData getMetaData getMetaData isCritical paramType paramData generateSetParameter paramType paramData
void generate Dynamic Function Call Method method Method Data method Data Class param Types Class return Type boolean needs Return output output Delimiter generate Function Call method method Data param Types return Type needs Return output output Delimiter output t output output Delimiter if Platform PLATFORM equals win32 output t tstatic int initialized 0 output Delimiter output t tstatic HMODULE hm NULL output Delimiter output t tstatic FARPROC fp NULL output Delimiter if return Type Void TYPE if needs Return output t trc 0 output Delimiter output t tif initialized output Delimiter output t t tif hm Get Module Handle output method get Name output  LIB hm Load Library output method get Name output  LIB output Delimiter output t t tif hm fp Get Proc Address hm output method get Name output output Delimiter output t t tinitialized 1 output Delimiter output t t output Delimiter output t tif fp output Delimiter output t t generate Function Call Left Side method method Data return Type needs Return output fp generate Function Call Right Side method method Data param Types 0 output Delimiter output t t output Delimiter else output t tstatic int initialized 0 output Delimiter output t tstatic void handle NULL output Delimiter output t tstatic output get Type Signature2 return Type output fptr for int i 0 i param Types length i if i 0 output Class param Type param Types i Parameter Data param Data get Meta Data get Meta Data method i String cast param Data get Cast if cast length 2 output cast substring 1 cast length 1 else output get Type Signature4 param Type output output Delimiter if return Type Void TYPE if needs Return output t trc 0 output Delimiter output t tif initialized output Delimiter output t t tif handle handle dlopen output method get Name output  LIB RTLD LAZY output Delimiter output t t tif handle fptr dlsym handle output method get Name output output Delimiter output t t tinitialized 1 output Delimiter output t t output Delimiter output t tif fptr output Delimiter output t t generate Function Call Left Side method method Data return Type needs Return output fptr generate Function Call Right Side method method Data param Types 0 output Delimiter output t t output Delimiter output t output output Delimiter  generateDynamicFunctionCall MethodData methodData paramTypes returnType needsReturn outputDelimiter generateFunctionCall methodData paramTypes returnType needsReturn outputDelimiter outputDelimiter outputDelimiter outputDelimiter outputDelimiter returnType needsReturn outputDelimiter outputDelimiter GetModuleHandle getName _LIB LoadLibrary getName _LIB outputDelimiter GetProcAddress getName outputDelimiter outputDelimiter outputDelimiter outputDelimiter generateFunctionCallLeftSide methodData returnType needsReturn generateFunctionCallRightSide methodData paramTypes outputDelimiter outputDelimiter outputDelimiter outputDelimiter getTypeSignature2 returnType paramTypes paramType paramTypes ParameterData paramData getMetaData getMetaData paramData getCast getTypeSignature4 paramType outputDelimiter returnType needsReturn outputDelimiter outputDelimiter getName _LIB RTLD_LAZY outputDelimiter getName outputDelimiter outputDelimiter outputDelimiter outputDelimiter generateFunctionCallLeftSide methodData returnType needsReturn generateFunctionCallRightSide methodData paramTypes outputDelimiter outputDelimiter outputDelimiter
void generate Function Call Left Side Method method Method Data method Data Class return Type boolean needs Return output t if return Type Void TYPE if needs Return output rc else output return output output get Type Signature2 return Type output if method Data get Flag address output  generateFunctionCallLeftSide MethodData methodData returnType needsReturn returnType needsReturn getTypeSignature2 returnType methodData getFlag
void generate Function Call Right Side Method method Method Data method Data Class param Types int param Start if method Data get Flag const output for int i param Start i param Types length i Class param Type param Types i Parameter Data param Data get Meta Data get Meta Data method i if i param Start output if param Data get Flag struct output output param Data get Cast if param Type is Primitive output lp output arg i output output  generateFunctionCallRightSide MethodData methodData paramTypes paramStart methodData getFlag paramStart paramTypes paramType paramTypes ParameterData paramData getMetaData getMetaData paramStart paramData getFlag paramData getCast paramType isPrimitive
void generate Function Call Method method Method Data method Data Class param Types Class return Type boolean needs Return generate Function Call Left Side method method Data return Type needs Return int param Start 0 if method get Name equals Ignore Case call output Parameter Data param Data get Meta Data get Meta Data method 0 String cast param Data get Cast if cast length 0 cast equals output cast else output output get Type Signature2 return Type output output arg0 param Start 1 else if method get Name equals Vtbl Call output output get Type Signature2 return Type output STDMETHODCALLTYPE int arg1 arg0 param Start 1 else output method get Name generate Function Call Right Side method method Data param Types param Start output Delimiter  generateFunctionCall MethodData methodData paramTypes returnType needsReturn generateFunctionCallLeftSide methodData returnType needsReturn paramStart getName equalsIgnoreCase ParameterData paramData getMetaData getMetaData paramData getCast getTypeSignature2 returnType paramStart getName VtblCall getTypeSignature2 returnType paramStart getName generateFunctionCallRightSide methodData paramTypes paramStart outputDelimiter
void generate Return Method method Class return Type boolean needs Return if needs Return return Type Void TYPE output treturn rc output Delimiter  generateReturn returnType needsReturn needsReturn returnType outputDelimiter
void generateGT Kmemmove Method method String function Class param Types generate Enter Macro method function output t boolean get param Types 0 is Primitive String class Name get Class Name param Types get 1 0 output get if arg1 get if arg0 set output class Name output get Fields env arg1 Fields env arg0 output class Name output get arg0 arg1 output output Delimiter generate Exit Macro method function  generateGTKmemmove paramTypes generateEnterMacro paramTypes isPrimitive className getClassName paramTypes className className outputDelimiter generateExitMacro
void generate Function Body Method method Method Data method Data String function Class param Types Class return Type output output Delimiter boolean isGT Kmemove method get Name equals memmove param Types length 2 return Type Void TYPE if isGT Kmemove generateGT Kmemmove method function param Types else boolean needs Return generate Local Vars method param Types return Type generate Enter Macro method function generate Getters method param Types if method Data get Flag dynamic generate Dynamic Function Call method method Data param Types return Type needs Return else generate Function Call method method Data param Types return Type needs Return generate Setters method param Types generate Exit Macro method function generate Return method return Type needs Return output output Delimiter  generateFunctionBody MethodData methodData paramTypes returnType outputDelimiter isGTKmemove getName paramTypes returnType isGTKmemove generateGTKmemmove paramTypes needsReturn generateLocalVars paramTypes returnType generateEnterMacro generateGetters paramTypes methodData getFlag generateDynamicFunctionCall methodData paramTypes returnType needsReturn generateFunctionCall methodData paramTypes returnType needsReturn generateSetters paramTypes generateExitMacro generateReturn returnType needsReturn outputDelimiter
void generate Function Prototype Method method String function Class param Types Class return Type output JNIEXPORT output get Type Signature2 return Type output JNICALL if native Macro output get Class Name method get Declaring Class output  NATIVE else output Java  output toC method get Declaring Class get Name output   output function if native Macro output output Delimiter output t JNI Env env if method get Modifiers Modifier STATIC 0 output jclass else output jobject output that for int i 0 i param Types length i Class param Type param Types i output output get Type Signature2 param Type output arg i output output Delimiter  generateFunctionPrototype paramTypes returnType getTypeSignature2 returnType nativeMacro getClassName getDeclaringClass _NATIVE Java_ getDeclaringClass getName _ nativeMacro outputDelimiter JNIEnv getModifiers paramTypes paramType paramTypes getTypeSignature2 paramType outputDelimiter
void generate Source Start String function output ifndef NO  output function output Delimiter  generateSourceStart NO_ outputDelimiter
void generate Source End String function output endif output Delimiter  generateSourceEnd outputDelimiter
boolean is Critical Class param Type Parameter Data param Data return param Type is Array param Type get Component Type is Primitive param Data get Flag critical  isCritical paramType ParameterData paramData paramType isArray paramType getComponentType isPrimitive paramData getFlag
boolean is Unique Method method return is Unique method Modifier NATIVE  isUnique isUnique
public static void main String args args new String org eclipse swt internal win32 OS if args length 1 System out println Usage java Natives Generator class Name1 class Name2 return try Natives Generator gen new Natives Generator for int i 0 i args length i String clazz Name args i Class clazz Class for Name clazz Name gen generate clazz gen generate clazz CommandBar Destroy catch Exception e System out println Problem e print Stack Trace System out  NativesGenerator className1 className2 NativesGenerator NativesGenerator clazzName forName clazzName CommandBar_Destroy printStackTrace

public Parameter Data Method method int parameter String str super str this method method this parameter parameter  ParameterData
public static String get All Flags return new String no in no out critical init struct unicode  getAllFlags no_in no_out
public String get Cast String cast String get Param cast trim if cast length 0 if cast starts With cast cast if cast ends With cast cast return cast  getCast getParam startsWith endsWith
public Method get Method return method  getMethod
public int get Parameter return parameter  getParameter
public void set Cast String str set Param cast str  setCast setParam

public void generate Class classes output int main output Delimiter super generate classes output output Delimiter  outputDelimiter outputDelimiter
public void generate Class clazz String class Name get Class Name clazz output tprintf output class Name output d n sizeof output class Name output output Delimiter Field fields clazz get Declared Fields generate fields  className getClassName className className outputDelimiter getDeclaredFields
public void generate Field fields sort fields for int i 0 i fields length i Field field fields i if field get Modifiers Modifier FINAL 0 continue generate field  getModifiers
public void generate Field field output tprintf output field get Name output d n sizeof output field get Name output output Delimiter  getName getName outputDelimiter
public static void main String args if args length 1 System out println Usage java Sizeof Generator class Name1 class Name2 return try Sizeof Generator gen new Sizeof Generator for int i 0 i args length i String clazz Name args i Class clazz Class for Name clazz Name gen generate clazz catch Exception e System out println Problem e print Stack Trace System out  SizeofGenerator className1 className2 SizeofGenerator SizeofGenerator clazzName forName clazzName printStackTrace

public class Stats Generator extends JNI Generator public Stats Generator  StatsGenerator JNIGenerator StatsGenerator
public void generate Class clazz generate Header File clazz generate Source File clazz  generateHeaderFile generateSourceFile
public void generate Method methods sort methods for int i 0 i methods length i Method method methods i if method get Modifiers Modifier NATIVE 0 continue generate String Array method  getModifiers generateStringArray
public void generate Header File Class clazz generateNATIVE Macros clazz Method methods clazz get Declared Methods generate Header File methods  generateHeaderFile generateNATIVEMacros getDeclaredMethods generateHeaderFile
public void generate Header File Class classes if classes length 0 return sort classes generate Meta Data swt copyright for int i 0 i classes length i Class clazz classes i Class Data class Data get Meta Data get Meta Data clazz if class Data get Flag no gen continue generate Header File clazz  generateHeaderFile generateMetaData swt_copyright ClassData classData getMetaData getMetaData classData getFlag no_gen generateHeaderFile
void generateNATIVE Macros Class clazz String class Name get Class Name clazz output ifdef NATIVE STATS output Delimiter output int output class Name output  nativeFunctionCallCount output Delimiter output char output class Name output  nativeFunctionNames output Delimiter output define output class Name output  NATIVE ENTER env that func output class Name output  nativeFunctionCallCount func output Delimiter output define output class Name output  NATIVE EXIT env that func output Delimiter output else output Delimiter output define output class Name output  NATIVE ENTER env that func output Delimiter output define output class Name output  NATIVE EXIT env that func output Delimiter output endif output Delimiter output Delimiter  generateNATIVEMacros className getClassName NATIVE_STATS outputDelimiter className _nativeFunctionCallCount outputDelimiter className _nativeFunctionNames outputDelimiter className _NATIVE_ENTER className _nativeFunctionCallCount outputDelimiter className _NATIVE_EXIT outputDelimiter outputDelimiter className _NATIVE_ENTER outputDelimiter className _NATIVE_EXIT outputDelimiter outputDelimiter outputDelimiter
public void generate Header File Method methods sort methods generate Defines methods  generateHeaderFile generateDefines
public void generate Source File Class classes if classes length 0 return sort classes generate Meta Data swt copyright generate Meta Data swt includes output ifdef NATIVE STATS output Delimiter output Delimiter for int i 0 i classes length i Class clazz classes i Class Data class Data get Meta Data get Meta Data clazz if class Data get Flag no gen continue generate Source File clazz output Delimiter output endif output Delimiter  generateSourceFile generateMetaData swt_copyright generateMetaData swt_includes NATIVE_STATS outputDelimiter outputDelimiter ClassData classData getMetaData getMetaData classData getFlag no_gen generateSourceFile outputDelimiter outputDelimiter
public void generate Source File Class clazz Method methods clazz get Declared Methods int method Count 0 for int i 0 i methods length i Method method methods i if method get Modifiers Modifier NATIVE 0 continue method Count String class Name get Class Name clazz output int output class Name output  nativeFunctionCount output String value Of method Count output output Delimiter output int output class Name output  nativeFunctionCallCount output String value Of method Count output output Delimiter output char output class Name output  nativeFunctionNames output Delimiter generate methods output output Delimiter  generateSourceFile getDeclaredMethods methodCount getModifiers methodCount className getClassName className _nativeFunctionCount valueOf methodCount outputDelimiter className _nativeFunctionCallCount valueOf methodCount outputDelimiter className _nativeFunctionNames outputDelimiter outputDelimiter
void generate String Array Method method output t get Function Name method output Delimiter  generateStringArray getFunctionName outputDelimiter
void generate Defines Method methods int method Count 0 for int i 0 i methods length i Method method methods i if method get Modifiers Modifier NATIVE 0 continue output define get Function Name method  FUNC method Count method Count output Delimiter  generateDefines methodCount getModifiers getFunctionName _FUNC methodCount methodCount outputDelimiter

public class Structs Generator extends JNI Generator public void generate Class clazz generate Header File clazz generate Source File clazz  StructsGenerator JNIGenerator generateHeaderFile generateSourceFile
public void generate Excludes Class classes Hash Set excludes new Hash Set for int i 0 i classes length i Class clazz classes i Class Data class Data get Meta Data get Meta Data clazz String exclude class Data get Exclude if exclude length 0 excludes add exclude for Iterator iter excludes iterator iter has Next String exclude String iter next output exclude output Delimiter for int i 0 i classes length i Class clazz classes i Class Data class Data get Meta Data get Meta Data clazz String class Exclude class Data get Exclude if exclude equals class Exclude output define NO  output get Class Name clazz output Delimiter output endif output Delimiter output Delimiter  generateExcludes HashSet HashSet ClassData classData getMetaData getMetaData classData getExclude hasNext outputDelimiter ClassData classData getMetaData getMetaData classExclude classData getExclude classExclude NO_ getClassName outputDelimiter outputDelimiter outputDelimiter
public void generate Header File Class clazz generate Source Start clazz generate Prototypes clazz generate Blank Macros clazz generate Source End clazz output Delimiter  generateHeaderFile generateSourceStart generatePrototypes generateBlankMacros generateSourceEnd outputDelimiter
public void generate Header File Class classes if classes length 0 return sort classes generate Meta Data swt copyright generate Meta Data swt includes generate Excludes classes for int i 0 i classes length i Class clazz classes i Class Data class Data get Meta Data get Meta Data clazz if class Data get Flag no gen continue generate Header File clazz  generateHeaderFile generateMetaData swt_copyright generateMetaData swt_includes generateExcludes ClassData classData getMetaData getMetaData classData getFlag no_gen generateHeaderFile
public void generate Source File Class clazz generate Source Start clazz generateFI Ds Structure clazz output Delimiter generate Global Var clazz output Delimiter generate Functions clazz generate Source End clazz output Delimiter  generateSourceFile generateSourceStart generateFIDsStructure outputDelimiter generateGlobalVar outputDelimiter generateFunctions generateSourceEnd outputDelimiter
public void generate Source File Class classes if classes length 0 return sort classes generate Meta Data swt copyright generate Meta Data swt includes for int i 0 i classes length i Class clazz classes i Class Data class Data get Meta Data get Meta Data clazz if class Data get Flag no gen continue generate Source File clazz  generateSourceFile generateMetaData swt_copyright generateMetaData swt_includes ClassData classData getMetaData getMetaData classData getFlag no_gen generateSourceFile
void generate Source Start Class clazz String clazz Name get Class Name clazz output ifndef NO  output clazz Name output Delimiter  generateSourceStart clazzName getClassName NO_ clazzName outputDelimiter
void generate Source End Class clazz output endif output Delimiter  generateSourceEnd outputDelimiter
void generate Global Var Class clazz String clazz Name get Class Name clazz output clazz Name output  FID CACHE output clazz Name output Fc output Delimiter  generateGlobalVar clazzName getClassName clazzName _FID_CACHE clazzName outputDelimiter
void generate Blank Macros Class clazz String clazz Name get Class Name clazz output else output Delimiter output define cache output clazz Name output Fields a b output Delimiter output define get output clazz Name output Fields a b c NULL output Delimiter output define set output clazz Name output Fields a b c output Delimiter output define output clazz Name output  sizeof 0 output Delimiter  generateBlankMacros clazzName getClassName outputDelimiter clazzName outputDelimiter clazzName outputDelimiter clazzName outputDelimiter clazzName _sizeof outputDelimiter
void generate Prototypes Class clazz String clazz Name get Class Name clazz output void cache output clazz Name output Fields JNI Env env jobject lp Object output Delimiter output clazz Name output get output clazz Name output Fields JNI Env env jobject lp Object output clazz Name output lp Struct output Delimiter output void set output clazz Name output Fields JNI Env env jobject lp Object output clazz Name output lp Struct output Delimiter output define output clazz Name output  sizeof sizeof output clazz Name output output Delimiter  generatePrototypes clazzName getClassName clazzName JNIEnv lpObject outputDelimiter clazzName clazzName JNIEnv lpObject clazzName lpStruct outputDelimiter clazzName JNIEnv lpObject clazzName lpStruct outputDelimiter clazzName _sizeof clazzName outputDelimiter
void generateFI Ds Structure Class clazz String clazz Name get Class Name clazz output typedef struct output clazz Name output  FID CACHE output Delimiter output tint cached output Delimiter output tjclass clazz output Delimiter output tjfieldID Field fields clazz get Declared Fields boolean first true for int i 0 i fields length i Field field fields i if ignore Field field continue if first output output field get Name first false output output Delimiter output output clazz Name output  FID CACHE output Delimiter  generateFIDsStructure clazzName getClassName clazzName _FID_CACHE outputDelimiter outputDelimiter outputDelimiter getDeclaredFields ignoreField getName outputDelimiter clazzName _FID_CACHE outputDelimiter
void generate Cache Function Class clazz String clazz Name get Class Name clazz output void cache output clazz Name output Fields JNI Env env jobject lp Object output Delimiter output output Delimiter output tif output clazz Name output Fc cached return output Delimiter Class superclazz clazz get Superclass if superclazz Object class String super Name get Class Name superclazz output tcache output super Name output Fields env lp Object output Delimiter output t output clazz Name output Fc clazz env Get Object Class env lp Object output Delimiter Field fields clazz get Declared Fields for int i 0 i fields length i Field field fields i if ignore Field field continue output t output clazz Name output Fc output field get Name output env Get FieldID env output clazz Name output Fc clazz output field get Name output output get Type Signature field output output Delimiter output t output clazz Name output Fc cached 1 output Delimiter output output Delimiter  generateCacheFunction clazzName getClassName clazzName JNIEnv lpObject outputDelimiter outputDelimiter clazzName outputDelimiter getSuperclass superName getClassName superName lpObject outputDelimiter clazzName GetObjectClass lpObject outputDelimiter getDeclaredFields ignoreField clazzName getName GetFieldID clazzName getName getTypeSignature outputDelimiter clazzName outputDelimiter outputDelimiter
void generate Get Fields Class clazz Class superclazz clazz get Superclass String clazz Name get Class Name clazz String super Name get Class Name superclazz if superclazz Object class Windows exception cannot call get set function of super class in this case if clazz Name equals super Name A clazz Name equals super Name W output tget output super Name output Fields env lp Object output super Name output lp Struct output Delimiter else generate Get Fields superclazz Field fields clazz get Declared Fields for int i 0 i fields length i Field field fields i if ignore Field field continue Field Data field Data get Meta Data get Meta Data field String exclude field Data get Exclude if exclude length 0 output exclude output Delimiter boolean no WinCE field Data get Flag no wince if no WinCE output ifndef  WIN32 WCE output Delimiter Class type field get Type String type Name get Class Name type String accessor field Data get Accessor if accessor null accessor length 0 accessor field get Name if type is Primitive output tlp Struct output accessor output output field Data get Cast output env Get output get Type Signature1 field output Field env lp Object output get Class Name field get Declaring Class output Fc output field get Name output else if type is Array Class component Type type get Component Type if component Type is Primitive output t output Delimiter output t output get Type Signature2 field output lp Object1 env Get Object Field env lp Object output get Class Name field get Declaring Class output Fc output field get Name output output Delimiter output t env Get output get Type Signature1 component Type output Array Region env lp Object1 0 sizeof lp Struct output accessor output int byte Count get Byte Count component Type if byte Count 1 output output String value Of byte Count output void lp Struct output accessor output output Delimiter output t else throw new Error not done else output t output Delimiter output tjobject lp Object1 env Get Object Field env lp Object output get Class Name field get Declaring Class output Fc output field get Name output output Delimiter output tget output type Name output Fields env lp Object1 lp Struct output accessor output output Delimiter output t output Delimiter if no WinCE output endif output Delimiter if exclude length 0 output endif output Delimiter  generateGetFields getSuperclass clazzName getClassName superName getClassName clazzName superName clazzName superName superName lpObject superName lpStruct outputDelimiter generateGetFields getDeclaredFields ignoreField FieldData fieldData getMetaData getMetaData fieldData getExclude outputDelimiter noWinCE fieldData getFlag no_wince noWinCE _WIN32_WCE outputDelimiter getType typeName getClassName fieldData getAccessor getName isPrimitive tlpStruct fieldData getCast getTypeSignature1 lpObject getClassName getDeclaringClass getName isArray componentType getComponentType componentType isPrimitive outputDelimiter getTypeSignature2 lpObject1 GetObjectField lpObject getClassName getDeclaringClass getName outputDelimiter getTypeSignature1 componentType ArrayRegion lpObject1 lpStruct byteCount getByteCount componentType byteCount valueOf byteCount lpStruct outputDelimiter outputDelimiter lpObject1 GetObjectField lpObject getClassName getDeclaringClass getName outputDelimiter typeName lpObject1 lpStruct outputDelimiter outputDelimiter noWinCE outputDelimiter outputDelimiter
void generate Get Function Class clazz String clazz Name get Class Name clazz output clazz Name output get output clazz Name output Fields JNI Env env jobject lp Object output clazz Name output lp Struct output Delimiter output output Delimiter output tif output clazz Name output Fc cached cache output clazz Name output Fields env lp Object output Delimiter generate Get Fields clazz output treturn lp Struct output Delimiter output output Delimiter  generateGetFunction clazzName getClassName clazzName clazzName JNIEnv lpObject clazzName lpStruct outputDelimiter outputDelimiter clazzName clazzName lpObject outputDelimiter generateGetFields lpStruct outputDelimiter outputDelimiter
void generate Set Fields Class clazz Class superclazz clazz get Superclass String clazz Name get Class Name clazz String super Name get Class Name superclazz if superclazz Object class Windows exception cannot call get set function of super class in this case if clazz Name equals super Name A clazz Name equals super Name W output tset output super Name output Fields env lp Object output super Name output lp Struct output Delimiter else generate Set Fields superclazz Field fields clazz get Declared Fields for int i 0 i fields length i Field field fields i if ignore Field field continue Field Data field Data get Meta Data get Meta Data field String exclude field Data get Exclude if exclude length 0 output exclude output Delimiter boolean no WinCE field Data get Flag no wince if no WinCE output ifndef  WIN32 WCE output Delimiter Class type field get Type String type Name get Class Name type String accessor field Data get Accessor if accessor null accessor length 0 accessor field get Name if type is Primitive output t env Set output get Type Signature1 field output Field env lp Object output get Class Name field get Declaring Class output Fc output field get Name output output get Type Signature2 field output lp Struct output accessor output else if type is Array Class component Type type get Component Type if component Type is Primitive output t output Delimiter output t output get Type Signature2 field output lp Object1 env Get Object Field env lp Object output get Class Name field get Declaring Class output Fc output field get Name output output Delimiter output t env Set output get Type Signature1 component Type output Array Region env lp Object1 0 sizeof lp Struct output accessor output int byte Count get Byte Count component Type if byte Count 1 output output String value Of byte Count output void lp Struct output accessor output output Delimiter output t else throw new Error not done else output t output Delimiter output tjobject lp Object1 env Get Object Field env lp Object output get Class Name field get Declaring Class output Fc output field get Name output output Delimiter output tset output type Name output Fields env lp Object1 lp Struct output accessor output output Delimiter output t output Delimiter if no WinCE output endif output Delimiter if exclude length 0 output endif output Delimiter  generateSetFields getSuperclass clazzName getClassName superName getClassName clazzName superName clazzName superName superName lpObject superName lpStruct outputDelimiter generateSetFields getDeclaredFields ignoreField FieldData fieldData getMetaData getMetaData fieldData getExclude outputDelimiter noWinCE fieldData getFlag no_wince noWinCE _WIN32_WCE outputDelimiter getType typeName getClassName fieldData getAccessor getName isPrimitive getTypeSignature1 lpObject getClassName getDeclaringClass getName getTypeSignature2 lpStruct isArray componentType getComponentType componentType isPrimitive outputDelimiter getTypeSignature2 lpObject1 GetObjectField lpObject getClassName getDeclaringClass getName outputDelimiter getTypeSignature1 componentType ArrayRegion lpObject1 lpStruct byteCount getByteCount componentType byteCount valueOf byteCount lpStruct outputDelimiter outputDelimiter lpObject1 GetObjectField lpObject getClassName getDeclaringClass getName outputDelimiter typeName lpObject1 lpStruct outputDelimiter outputDelimiter noWinCE outputDelimiter outputDelimiter
void generate Set Function Class clazz String clazz Name get Class Name clazz output void set output clazz Name output Fields JNI Env env jobject lp Object output clazz Name output lp Struct output Delimiter output output Delimiter output tif output clazz Name output Fc cached cache output clazz Name output Fields env lp Object output Delimiter generate Set Fields clazz output output Delimiter  generateSetFunction clazzName getClassName clazzName JNIEnv lpObject clazzName lpStruct outputDelimiter outputDelimiter clazzName clazzName lpObject outputDelimiter generateSetFields outputDelimiter
void generate Functions Class clazz generate Cache Function clazz output Delimiter generate Get Function clazz output Delimiter generate Set Function clazz  generateFunctions generateCacheFunction outputDelimiter generateGetFunction outputDelimiter generateSetFunction
boolean ignore Field Field field int mods field get Modifiers return mods Modifier PUBLIC 0 mods Modifier FINAL 0 mods Modifier STATIC 0  ignoreField getModifiers
public static void main String args if args length 1 System out println Usage java Structs Generator class Name1 class Name2 return try Structs Generator gen new Structs Generator for int i 0 i args length i String clazz Name args i Class clazz Class for Name clazz Name gen generate clazz catch Exception e System out println Problem e print Stack Trace System out  StructsGenerator className1 className2 StructsGenerator StructsGenerator clazzName forName clazzName printStackTrace

String mainclass public Swt Jni Gen  SwtJniGen
public void set Classpath String classpath this classpath classpath  setClasspath
public void set Outputdir String outputdir this outputdir outputdir  setOutputdir
public void set Main Class String mainclass this mainclass mainclass  setMainClass
public void execute throws Build Exception try System out println jnigen mainclass mainclass classpath classpath outputdir outputdir JNI Generator App main new String mainclass outputdir classpath System out println jnigen done catch Exception e throw new Build Exception e  BuildException JNIGeneratorApp BuildException

Vector filesets new Vector public Swt Replace  SwtReplace
public void set From String from this from from  setFrom
public void set To String to this to to  setTo
Adds a set of files to preprocess param set a set of files to preprocess public void add Fileset File Set set filesets add Element set  addFileset FileSet addElement
public void execute throws Build Exception try for int i 0 i filesets size i File Set fs File Set filesets element At i Directory Scanner ds fs get Directory Scanner get Project String src Files ds get Included Files for int j 0 j src Files length j pre Process ds get Basedir to String File separator src Files j catch Exception e throw new Build Exception e  BuildException FileSet FileSet elementAt DirectoryScanner getDirectoryScanner getProject srcFiles getIncludedFiles srcFiles preProcess getBasedir toString srcFiles BuildException
public void pre Process String src throws Exception String dst src swt File src File new File src File dst File new File dst File Reader fr new File Reader src File File Writer fw new File Writer dst File Buffered Reader reader new Buffered Reader fr Buffered Writer writer new Buffered Writer fw boolean modified false while true String line reader read Line if line null break int index while index line last Index Of from 1 modified true line line substring 0 index to line substring index from length writer write line writer new Line reader close writer close if modified src File delete dst File rename To src File else dst File delete  preProcess srcFile dstFile FileReader FileReader srcFile FileWriter FileWriter dstFile BufferedReader BufferedReader BufferedWriter BufferedWriter readLine lastIndexOf newLine srcFile dstFile renameTo srcFile dstFile

public interface I File Type Info Returns the string specifying the file extension return the file extension  IFileTypeInfo
Returns the file type for files ending with the corresponding extension Valid values are Team UNKNOWN Team TEXT Team BINARY return the file type 

public interface I Ignore Info Return the string specifying the pattern of this ignore The string may include the wildcard characters and If you wish to include either of these characters verbatim i e you do not wish them to expand to wildcards you must escape them with a backslash p If you are using string literals in Java to represent the patterns don t forget escape characters are represented by return the pattern represented by this ignore info  IIgnoreInfo
public String get Pattern Return whether or not this ignore info is enabled A disabled ignore info remains in the global ignore list but no attempt is made to match with it to determine resource ignore state return whether the ignore info is enabled  getPattern

For every I Project in provider Projects return an opaque UTF 8 encoded String to act as a reference to that project The format of the String is specific to the provider The format of the String must be such that I Project Set Serializer add To Worskpace will be able to consume it and recreate a corresponding project see I Project Set Serializer add To Workspace String reference Strings String filename Object context I Progress Monitor monitor param provider Projects an array of projects that the serializer should create text references for param context a UI context object This object will either be a com ibm swt widgets Shell or it will be null param monitor a progress monitor return String an array of serialized reference strings uniquely identifying the projects throws Team Exception  IProject providerProjects IProjectSetSerializer addToWorskpace IProjectSetSerializer addToWorkspace referenceStrings IProgressMonitor providerProjects TeamException
For every String in reference Strings create in the workspace a corresponding I Project Return an Array of the resulting I Projects Result is unspecified in the case where an I Project of that name already exists In the case of failure a Team Exception must be thrown The opaque strings in reference Strings are guaranteed to have been previously produced by I Project Set Serializer as Reference see I Project Set Serializer as Reference I Project provider Projects Object context I Progress Monitor monitor param reference Strings an array of referene strings uniquely identifying the projects param filename the name of the file that the references were read from This is included in case the provider needs to deduce relative paths param context a UI context object This object will either be a com ibm swt widgets Shell or it will be null param monitor a progress monitor return I Project an array of projects that were created throws Team Exception  referenceStrings IProject IProjects IProject TeamException referenceStrings IProjectSetSerializer asReference IProjectSetSerializer asReference IProject providerProjects IProgressMonitor referenceStrings IProject TeamException

Return the resource associated with this status return Returns the resource 

Ensure that the provider type is backwards compatible by passing the project set serializer to the type if a serializer is registered This is required for repository providers who implemented a project set capability in 2 1 before the capability contained the serialization API and have not released a 3 0 plugin yet This method is called before project set export and import and can be used by other clients who work with project sets param type the provider type instance param capability the capability that was obtained from the provider type since 3 0 public static void ensure Backwards Compatible Repository Provider Type type Project Set Capability capability if capability null I Project Set Serializer old Serializer Team get Project Set Serializer type getID if old Serializer null capability set Serializer old Serializer  ensureBackwardsCompatible RepositoryProviderType ProjectSetCapability IProjectSetSerializer oldSerializer getProjectSetSerializer oldSerializer setSerializer oldSerializer
Notify the provider that a project set has been created at path Only providers identified as having projects in the project set will be notified The project set may or may not be created in a workspace project thus may not be a resource param file the project set file that was created param context a UI context object This object will either be a com ibm swt widgets Shell or it will be null param monitor a progress monitor deprecated should use or override project Set Created File Project Set Serialization Context I Progress Monitor instead public void project Set Created File file Object context I Progress Monitor monitor default is to do nothing  projectSetCreated ProjectSetSerializationContext IProgressMonitor projectSetCreated IProgressMonitor
Notify the provider that a project set has been created at path Only providers identified as having projects in the project set will be notified The project set may or may not be created in a workspace project thus may not be a resource param file the project set file that was created param context the context in which the references are created not code null code param monitor a progress monitor since 3 0 public void project Set Created File file Project Set Serialization Context context I Progress Monitor monitor Invoke old method by default project Set Created file context get Shell monitor  projectSetCreated ProjectSetSerializationContext IProgressMonitor projectSetCreated getShell
For every project in provider Projects return an opaque UTF 8 encoded String to act as a reference to that project The format of the String is specific to the provider The format of the String must be such that link add To Workspace String Project Set Serialization Context I Progress Monitor will be able to consume it and load the corresponding project p This default implementation simply throws an exception indicating that no references can be created unless there is an I Project Set Serializer registered for the repository provider type in which case the operation is delegated to the serializer Subclasses are expected to override since 3 0 param provider Projects an array of projects for which references are needed not code null code and contains no code null code s param context the context in which the references are created not code null code param monitor a progress monitor or code null code if none return an array containing exactly the same number of elements as the provider Projects argument where each element is a serialized reference string uniquely identifying the corresponding the project in the provider Projects array not code null code and contains no code null code s throws Team Exception thrown if there is a reference string cannot be created for a project public String as Reference I Project provider Projects Project Set Serialization Context context I Progress Monitor monitor throws Team Exception if serializer null return serializer as Reference provider Projects context get Shell monitor throw new Team Exception Policy bind Project Set Capability 0 NON NLS 1  providerProjects addToWorkspace ProjectSetSerializationContext IProgressMonitor IProjectSetSerializer providerProjects providerProjects providerProjects TeamException asReference IProject providerProjects ProjectSetSerializationContext IProgressMonitor TeamException asReference providerProjects getShell TeamException ProjectSetCapability
For every String in reference Strings load the corresponding project into the workspace The opaque strings in reference Strings are guaranteed to have been previously produced by link as Reference I Project Project Set Serialization Context I Progress Monitor The confirm Overwrite method is called with an array of projects for which projects of the same name already exists in the workspace p Callers from within a UI context should wrapper a call to this method inside a Workspace Modify Operation so that events generated as a result of this operation are deferred until the outermost operation has successfully completed p This default implementation simply throws an exception indicating that no projects can be loaded unless there is an I Project Set Serializer registered for the repository provider type in which case the operation is delegated to the serializer Subclasses are expected to override since 3 0 param reference Strings an array of referene strings uniquely identifying the projects not code null code and contains no code null code s param context the context in which the projects are loaded not code null code param monitor a progress monitor or code null code if none return I Project an array of projects that were loaded excluding those projects already existing and not overwritten not code null code contains no code null code s throws Team Exception thrown if there is a problem loading a project into the workspace If an exception is thrown then the workspace is left in an unspecified state where some of the referenced projects may be loaded or partially loaded and others may not public I Project add To Workspace String reference Strings Project Set Serialization Context context I Progress Monitor monitor throws Team Exception if serializer null return serializer add To Workspace reference Strings context get Filename context get Shell monitor throw new Team Exception Policy bind Project Set Capability 1 NON NLS 1  referenceStrings referenceStrings asReference IProject ProjectSetSerializationContext IProgressMonitor confirmOverwrite WorkspaceModifyOperation IProjectSetSerializer referenceStrings IProject TeamException IProject addToWorkspace referenceStrings ProjectSetSerializationContext IProgressMonitor TeamException addToWorkspace referenceStrings getFilename getShell TeamException ProjectSetCapability
Determine if any of the projects already exist and confirm which of those projects are to be overwritten since 3 0 param context the context in which the projects are loaded not code null code param projects an array of proposed projects to be loaded not code null code contains no code null code s return an array of confirmed projects to be loaded or code null code if the operation is to be canceled throws Team Exception protected I Project confirm Overwrite Project Set Serialization Context context I Project projects throws Team Exception Build a collection of existing projects final Collection existing Projects new Array List for int i 0 i projects length i I Project each Proj projects i if each Proj exists existing Projects add each Proj if existing Projects size 0 return projects Confirm the overwrite I Project confirmed context confirm Overwrite I Project existing Projects to Array new I Project existing Projects size if confirmed null return null if existing Projects size confirmed length return projects Return the amended list of projects to be loaded Collection result new Array List projects length result add All Arrays as List projects result remove All existing Projects for int i 0 i confirmed length i I Project each Proj confirmed i if existing Projects contains each Proj result add each Proj return I Project result to Array new I Project result size  TeamException IProject confirmOverwrite ProjectSetSerializationContext IProject TeamException existingProjects ArrayList IProject eachProj eachProj existingProjects eachProj existingProjects IProject confirmOverwrite IProject existingProjects toArray IProject existingProjects existingProjects ArrayList addAll asList removeAll existingProjects IProject eachProj existingProjects eachProj eachProj IProject toArray IProject
and add To Workspace void set Serializer I Project Set Serializer serializer this serializer serializer  addToWorkspace setSerializer IProjectSetSerializer

Create a serialization context with no filename public Project Set Serialization Context this null  ProjectSetSerializationContext
Create a serialization context and set the filename of the file that does or is to contain the project set param filename a filename or code null code public Project Set Serialization Context String filename this filename filename  ProjectSetSerializationContext
Given an array of projects that currently exist in the workspace determine which of those projects should be overwritten p This default implementation always returns an empty array indicating that no existing projects should be overwritten Subclasses may override this as appropriate param projects an array of projects currently existing in the workspace that are desired to be overwritten not code null code contains no code null code s return an array of zero or more projects that should be overwritten or code null code if the operation is to be canceled public I Project confirm Overwrite I Project projects throws Team Exception return new I Project 0  IProject confirmOverwrite IProject TeamException IProject
Return a org eclipse swt Shell if there is a UI context or code null code if executing headless return the shell or code null code public Object get Shell return null  getShell
Return the name of the file to or from which teh project set is being loaded or saved This may be code null code return the filename or code null code public String get Filename return filename  getFilename

Instantiate a new Repository Provider with concrete class by given providerID and associate it with project param project the project to be mapped param id the ID of the provider to be mapped to the project throws Team Exception if ul li There is no provider by that ID li li The project is already associated with a repository provider and that provider prevented its unmapping li ul see Repository Provider unmap I Project public static void map I Project project String id throws Team Exception I Scheduling Rule rule Resources Plugin get Workspace get Rule Factory modify Rule project try Obtain a scheduling rule on the project before obtaining the mapping Lock This is required because a caller of get Provider may hold a scheduling rule before get Provider is invoked but get Provider itself does not and can not obtain a scheduling rule Thus the locking order is always scheduling rule followed by mapping Lock Platform get Job Manager begin Rule rule null try mapping Lock acquire Repository Provider existing Provider null if project get Persistent Property PROVIDER PROP KEY null existing Provider get Provider project get the real one not the nature one if we already have a provider and its the same ID we re ok if the ID s differ unmap the existing if existing Provider null if existing Provider getID equals id return nothing to do else unmap project Create the provider as a session property before adding the persistant property to ensure that the provider can be instantiated Repository Provider provider map New Provider project id mark it with the persistent ID for filtering try project set Persistent Property PROVIDER PROP KEY id catch Core Exception outer couldn t set the persistant property so clear the session property try project set Session Property PROVIDER PROP KEY null catch Core Exception inner something is seriously wrong Team Plugin log I Status ERROR Policy bind Repository Provider could Not Clear After Error project get Name id inner NON NLS 1 throw outer provider configure xxx not sure if needed since they control with wiz page and can configure all they want adding the nature would ve caused project description delta so trigger one project touch null Set the rule factory for the provider after the touch so the touch does not fail due to incomptible modify rules Team Hook Dispatcher set Provider Rule Factory project provider get Rule Factory finally mapping Lock release catch Core Exception e throw Team Plugin wrap Exception e finally Platform get Job Manager end Rule rule  RepositoryProvider TeamException RepositoryProvider IProject IProject TeamException ISchedulingRule ResourcesPlugin getWorkspace getRuleFactory modifyRule mappingLock getProvider getProvider getProvider mappingLock getJobManager beginRule mappingLock RepositoryProvider existingProvider getPersistentProperty PROVIDER_PROP_KEY existingProvider getProvider existingProvider existingProvider RepositoryProvider mapNewProvider setPersistentProperty PROVIDER_PROP_KEY CoreException setSessionProperty PROVIDER_PROP_KEY CoreException TeamPlugin IStatus RepositoryProvider couldNotClearAfterError getName TeamHookDispatcher setProviderRuleFactory getRuleFactory mappingLock CoreException TeamPlugin wrapException getJobManager endRule
private static Repository Provider map New Provider I Project project String id throws Team Exception Repository Provider provider new Provider id instantiate via extension point if provider null throw new Team Exception Policy bind Repository Provider could Not Instantiate Provider project get Name id NON NLS 1 validate that either the provider supports linked resources or the project has no linked resources if provider can Handle Linked Resources try I Resource members project members for int i 0 i members length i I Resource resource members i if resource is Linked throw new Team Exception new Status I Status ERROR Team Plugin ID I Resource Status LINKING NOT ALLOWED Policy bind Repository Provider linked Resources Exist project get Name id null NON NLS 1 catch Core Exception e throw Team Plugin wrap Exception e store provider instance as session property try project set Session Property PROVIDER PROP KEY provider provider set Project project catch Core Exception e throw Team Plugin wrap Exception e return provider  RepositoryProvider mapNewProvider IProject TeamException RepositoryProvider newProvider TeamException RepositoryProvider couldNotInstantiateProvider getName canHandleLinkedResources IResource IResource isLinked TeamException IStatus TeamPlugin IResourceStatus LINKING_NOT_ALLOWED RepositoryProvider linkedResourcesExist getName CoreException TeamPlugin wrapException setSessionProperty PROVIDER_PROP_KEY setProject CoreException TeamPlugin wrapException
private static Repository Provider map Existing Provider I Project project String id throws Team Exception try Obtain the mapping lock before creating the instance so we can make sure that a disconnect is not happening at the same time mapping Lock acquire try Ensure that the persistant property is still set i e an unmap may have come in since we checked it last String current Id project get Persistent Property PROVIDER PROP KEY if current Id null The provider has been unmapped return null if current Id equals id A provider has been disconnected and another connected Since mapping creates the session property we can just return it return lookup Provider Prop project catch Core Exception e throw Team Plugin wrap Exception e return map New Provider project id finally mapping Lock release  RepositoryProvider mapExistingProvider IProject TeamException mappingLock currentId getPersistentProperty PROVIDER_PROP_KEY currentId currentId lookupProviderProp CoreException TeamPlugin wrapException mapNewProvider mappingLock
Disassoociates project with the repository provider its currently mapped to param project throws Team Exception The project isn t associated with any repository provider public static void unmap I Project project throws Team Exception I Scheduling Rule rule Resources Plugin get Workspace get Rule Factory modify Rule project try See the map I Project String method for a description of lock ordering Platform get Job Manager begin Rule rule null try mapping Lock acquire String id project get Persistent Property PROVIDER PROP KEY If you tried to remove a non existant nature it would fail so we need to as well with the persistent prop if id null throw new Team Exception Policy bind Repository Provider No Provider Registered project get Name NON NLS 1 This will instantiate one if it didn t already exist which is ok since we need to call deconfigure on it for proper lifecycle Repository Provider provider get Provider project if provider null There is a persistant property but the provider cannot be obtained The reason could be that the provider s plugin is no longer available Better log it just in case this is unexpected Team Plugin log I Status ERROR Policy bind Repository Provider could Not Instantiate Provider project get Name id null NON NLS 1 if provider null provider deconfigure project set Session Property PROVIDER PROP KEY null project set Persistent Property PROVIDER PROP KEY null if provider null provider deconfigured removing the nature would ve caused project description delta so trigger one project touch null Change the rule factory after the touch in order to avoid rule incompatibility Team Hook Dispatcher set Provider Rule Factory project null finally mapping Lock release catch Core Exception e throw Team Plugin wrap Exception e finally Platform get Job Manager end Rule rule  TeamException IProject TeamException ISchedulingRule ResourcesPlugin getWorkspace getRuleFactory modifyRule IProject getJobManager beginRule mappingLock getPersistentProperty PROVIDER_PROP_KEY TeamException RepositoryProvider No_Provider_Registered getName RepositoryProvider getProvider TeamPlugin IStatus RepositoryProvider couldNotInstantiateProvider getName setSessionProperty PROVIDER_PROP_KEY setPersistentProperty PROVIDER_PROP_KEY TeamHookDispatcher setProviderRuleFactory mappingLock CoreException TeamPlugin wrapException getJobManager endRule
Return the provider mapped to project or null if none private static Repository Provider lookup Provider Prop I Project project throws Core Exception return Repository Provider project get Session Property PROVIDER PROP KEY  RepositoryProvider lookupProviderProp IProject CoreException RepositoryProvider getSessionProperty PROVIDER_PROP_KEY
Default constructor required for the resources plugin to instantiate this class from the nature extension definition public Repository Provider  RepositoryProvider
Configures the provider for the given project This method is called after code set Project code If an exception is generated during configuration of the project the provider will not be assigned to the project throws Core Exception if the configuration fails  setProject CoreException
Configures the nature for the given project This is called by code Repository Provider map code the first time a provider is mapped to a project It is not intended to be called by clients throws Core Exception if this method fails If the configuration fails the provider will not be associated with the project see Repository Provider configure Project final public void configure throws Core Exception try configure Project catch Core Exception e try Repository Provider unmap get Project catch Team Exception e2 throw new Core Exception new Status I Status ERROR Team Plugin ID 0 Policy bind RepositoryProvider Error removing nature from project   1 getID e2 NON NLS 1 throw e  RepositoryProvider CoreException RepositoryProvider configureProject CoreException configureProject CoreException RepositoryProvider getProject TeamException CoreException IStatus TeamPlugin RepositoryProvider_Error_removing_nature_from_project___1
Method deconfigured is invoked after a provider has been unmaped The project will no longer have the provider associated with it when this method is invoked It is a last chance for the provider to clean up protected void deconfigured 
Answer the id of this provider instance The id should be the repository provider s id as defined in the provider plugin s plugin xml return the nature id of this provider 
Returns an code I File Modification Validator code for pre checking operations that modify the contents of files Returns code null code if the provider does not wish to participate in file modification validation see org eclipse core resources I File Modification Validator public I File Modification Validator get File Modification Validator return null  IFileModificationValidator IFileModificationValidator IFileModificationValidator getFileModificationValidator
Returns an code I Move Delete Hook code for handling moves and deletes that occur withing projects managed by the provider This allows providers to control how moves and deletes occur and includes the ability to prevent them p Returning code null code signals that the default move and delete behavior is desired see org eclipse core resources team I Move Delete Hook public I Move Delete Hook get Move Delete Hook return null  IMoveDeleteHook IMoveDeleteHook IMoveDeleteHook getMoveDeleteHook
Returns a brief description of this provider The exact details of the representation are unspecified and subject to change but the following may be regarded as typical Sample Project org eclipse team cvs provider return a string description of this provider public String to String return Policy bind Repository Provider to String get Project get Name getID NON NLS 1  SampleProject toString RepositoryProvider toString getProject getName
Returns all known registered Repository Provider ids return an array of registered repository provider ids final public static String get All Provider Type Ids I Project Nature Descriptor desc Resources Plugin get Workspace get Nature Descriptors Set team Set new Hash Set team Set add All All Provider Type Ids add in all the ones we know via extension point fall back to old method of nature ID to find any for backwards compatibility for int i 0 i desc length i String set Ids desc i get Nature Set Ids for int j 0 j set Ids length j if set Ids j equals TEAM SETID team Set add desc i get Nature Id return String team Set to Array new String team Set size  RepositoryProvider getAllProviderTypeIds IProjectNatureDescriptor ResourcesPlugin getWorkspace getNatureDescriptors teamSet HashSet teamSet addAll AllProviderTypeIds setIds getNatureSetIds setIds setIds TEAM_SETID teamSet getNatureId teamSet toArray teamSet
Returns the provider for a given I Project or code null code if a provider is not associated with the project or if the project is closed or does not exist This method should be called if the caller is looking for b any b repository provider Otherwise call code get Provider project id code to look for a specific repository provider type p param project the project to query for a provider return the repository provider associated with the project final public static Repository Provider get Provider I Project project try if project is Accessible First look for the session property Repository Provider provider lookup Provider Prop project if provider null return provider Next check if it has the ID as a persistent property if yes then instantiate provider String id project get Persistent Property PROVIDER PROP KEY if id null return map Existing Provider project id Couldn t find using new method fall back to lookup using natures for backwards compatibility I Project Description project Desc project get Description String nature Ids project Desc get Nature Ids I Workspace workspace Resources Plugin get Workspace for every nature id on this project find it s natures sets and check if it is in the team set for int i 0 i nature Ids length i I Project Nature Descriptor desc workspace get Nature Descriptor nature Ids i The descriptor can be null if the nature doesn t exist if desc null String set Ids desc get Nature Set Ids for int j 0 j set Ids length j if set Ids j equals TEAM SETID return get Provider project nature Ids i catch Core Exception e if is Acceptable Exception e Team Plugin log e return null  IProject getProvider RepositoryProvider getProvider IProject isAccessible RepositoryProvider lookupProviderProp getPersistentProperty PROVIDER_PROP_KEY mapExistingProvider IProjectDescription projectDesc getDescription natureIds projectDesc getNatureIds IWorkspace ResourcesPlugin getWorkspace natureIds IProjectNatureDescriptor getNatureDescriptor natureIds setIds getNatureSetIds setIds setIds TEAM_SETID getProvider natureIds CoreException isAcceptableException TeamPlugin
on the project private static boolean is Acceptable Exception Core Exception e return e get Status get Code I Resource Status RESOURCE NOT FOUND  isAcceptableException CoreException getStatus getCode IResourceStatus RESOURCE_NOT_FOUND
Returns a provider of type with the given id if associated with the given project or code null code if the project is not associated with a provider of that type or the nature id is that of a non team repository provider nature param project the project to query for a provider param id the repository provider id return the repository provider final public static Repository Provider get Provider I Project project String id try if project is Accessible Look for an existing provider first to avoid accessing persistant properties Repository Provider provider lookup Provider Prop project throws core we will reuse the catching already here if provider null if provider getID equals id return provider else return null There isn t one so check the persistant property String existingID project get Persistent Property PROVIDER PROP KEY if id equals existingID The ids are equal so instantiate and return Repository Provider new Provider map Existing Provider project id if new Provider null new Provider getID equals id return new Provider else The id changed before we could create the desired provider return null couldn t find using new method fall back to lookup using natures for backwards compatibility if the nature id given is not in the team set then return null I Project Nature Descriptor desc Resources Plugin get Workspace get Nature Descriptor id if desc null for backwards compat may not have any nature by that ID return null String set Ids desc get Nature Set Ids for int i 0 i set Ids length i if set Ids i equals TEAM SETID return Repository Provider project get Nature id catch Core Exception e if is Acceptable Exception e Team Plugin log e return null  RepositoryProvider getProvider IProject isAccessible RepositoryProvider lookupProviderProp getPersistentProperty PROVIDER_PROP_KEY RepositoryProvider newProvider mapExistingProvider newProvider newProvider newProvider IProjectNatureDescriptor ResourcesPlugin getWorkspace getNatureDescriptor setIds getNatureSetIds setIds setIds TEAM_SETID RepositoryProvider getNature CoreException isAcceptableException TeamPlugin
Returns whether the given project is shared or not This is a lightweight method in that it will not instantiate a provider instance as code get Provider code would if one is not already instantiated Note that I Project touch generates a project description delta This in combination with is Shared can be used to be notified of sharing unsharing of projects param project the project being tested return boolean see get Provider I Project since 2 1 public static boolean is Shared I Project project if project is Accessible return false try if lookup Provider Prop project null return true return project get Persistent Property PROVIDER PROP KEY null catch Core Exception e Team Plugin log e return false  getProvider IProject isShared getProvider IProject isShared IProject isAccessible lookupProviderProp getPersistentProperty PROVIDER_PROP_KEY CoreException TeamPlugin
see I Project Nature get Project public I Project get Project return project  IProjectNature getProject IProject getProject
see I Project Nature set Project I Project public void set Project I Project project this project project  IProjectNature setProject IProject setProject IProject
private static List initialize All Provider Types List allI Ds new Array List Team Plugin plugin Team Plugin get Plugin if plugin null I Extension Point extension plugin get Descriptor get Extension Point Team Plugin REPOSITORY EXTENSION if extension null I Extension extensions extension get Extensions for int i 0 i extensions length i I Configuration Element config Elements extensions i get Configuration Elements for int j 0 j config Elements length j String extension Id config Elements j get Attribute id NON NLS 1 allI Ds add extension Id return allI Ds  initializeAllProviderTypes allIDs ArrayList TeamPlugin TeamPlugin getPlugin IExtensionPoint getDescriptor getExtensionPoint TeamPlugin REPOSITORY_EXTENSION IExtension getExtensions IConfigurationElement configElements getConfigurationElements configElements extensionId configElements getAttribute allIDs extensionId allIDs
private static Repository Provider new Provider String id Team Plugin plugin Team Plugin get Plugin if plugin null I Extension Point extension plugin get Descriptor get Extension Point Team Plugin REPOSITORY EXTENSION if extension null I Extension extensions extension get Extensions for int i 0 i extensions length i I Configuration Element config Elements extensions i get Configuration Elements for int j 0 j config Elements length j String extension Id config Elements j get Attribute id NON NLS 1 if extension Id null extension Id equals id try return Repository Provider config Elements j create Executable Extension class NON NLS 1 catch Core Exception e Team Plugin log e catch Class Cast Exception e String class Name config Elements j get Attribute class NON NLS 1 Team Plugin log I Status ERROR Policy bind Repository Provider invalid Class id class Name e NON NLS 1 return null return null  RepositoryProvider newProvider TeamPlugin TeamPlugin getPlugin IExtensionPoint getDescriptor getExtensionPoint TeamPlugin REPOSITORY_EXTENSION IExtension getExtensions IConfigurationElement configElements getConfigurationElements configElements extensionId configElements getAttribute extensionId extensionId RepositoryProvider configElements createExecutableExtension CoreException TeamPlugin ClassCastException className configElements getAttribute TeamPlugin IStatus RepositoryProvider invalidClass className
Method validate Create Link is invoked by the Platform Core Team Hook when a linked resource is about to be added to the provider s project It should not be called by other clients and it should not need to be overridden by subclasses although it is possible to do so in special cases Subclasses can indicate that they support linked resources by overridding the code can Handle Linked Resources code method param resource see code org eclipse core resources team Team Hook code param update Flags see code org eclipse core resources team Team Hook code param location see code org eclipse core resources team Team Hook code return I Status see code org eclipse core resources team Team Hook code see Repository Provider can Handle Linked Resources since 2 1 public I Status validate Create Link I Resource resource int update Flags I Path location if can Handle Linked Resources return Team OK STATUS else return new Status I Status ERROR Team Plugin ID I Resource Status LINKING NOT ALLOWED Policy bind Repository Provider linked Resources Not Supported get Project get Name getID null NON NLS 1  validateCreateLink TeamHook canHandleLinkedResources TeamHook updateFlags TeamHook TeamHook IStatus TeamHook RepositoryProvider canHandleLinkedResources IStatus validateCreateLink IResource updateFlags IPath canHandleLinkedResources OK_STATUS IStatus TeamPlugin IResourceStatus LINKING_NOT_ALLOWED RepositoryProvider linkedResourcesNotSupported getProject getName
Method can Handle Linked Resources should be overridden by subclasses who support linked resources At a minimum supporting linked resources requires changes to the move delete hook see org eclipe core resources team I Move Delete Hook This method is called after the Repository Provider is instantiated but before code set Project code is invoked so it will not have access to any state determined from the code set Project code method return boolean see org eclipse core resources team I Move Delete Hook since 2 1 public boolean can Handle Linked Resources return false  canHandleLinkedResources IMoveDeleteHook RepositoryProvider setProject setProject IMoveDeleteHook canHandleLinkedResources
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return null  IAdaptable getAdapter getAdapter
Return the resource rule factory for this provider This factory will be used to determine the scheduling rules that are to be obtained when performing various resource operations e g move copy delete etc on the resources in the project the provider is mapped to p By default the factory returned by this method is pessimistic and obtains the workspace lock for all operations that could result in a callback to the provider either through the code I Move Delete Hook code or code I File Modification Validator code This is done to ensure that older providers are not broken However providers should override this method and provide a subclass of link org eclipse core resources team Resource Rule Factory that provides rules of a more optimistic granularity e g project or lower return the rule factory for this provider since 3 0 see org eclipse core resources team Resource Rule Factory public I Resource Rule Factory get Rule Factory return new Pessimistic Resource Rule Factory  IMoveDeleteHook IFileModificationValidator ResourceRuleFactory ResourceRuleFactory IResourceRuleFactory getRuleFactory PessimisticResourceRuleFactory

private String id public Repository Provider Type  RepositoryProviderType
Return the Repository Provider Type for the given provider ID param id the ID of the provider return Repository Provider Type see getID public static Repository Provider Type get Provider Type String id Repository Provider Type type Repository Provider Type all Provider Types get id if type null return type If there isn t one in the table we ll try to create one from the extension point Its possible that new Provider Type will return null but in that case it will have also logged the errorso just return the result return new Provider Type id  RepositoryProviderType RepositoryProviderType RepositoryProviderType getProviderType RepositoryProviderType RepositoryProviderType allProviderTypes newProviderType newProviderType
private void setID String id this id id 
private static Repository Provider Type new Provider Type String id Team Plugin plugin Team Plugin get Plugin if plugin null I Extension Point extension plugin get Descriptor get Extension Point Team Plugin REPOSITORY EXTENSION if extension null I Extension extensions extension get Extensions for int i 0 i extensions length i I Configuration Element config Elements extensions i get Configuration Elements for int j 0 j config Elements length j String extension Id config Elements j get Attribute id NON NLS 1 if extension Id null extension Id equals id try Repository Provider Type provider Type Its ok not to have a type Class extension In this case a default instance will be created if config Elements j get Attribute type Class null NON NLS 1 provider Type new Default Repository Provider Type else provider Type Repository Provider Type config Elements j create Executable Extension type Class NON NLS 1 provider Type setID id all Provider Types put id provider Type return provider Type catch Core Exception e Team Plugin log e catch Class Cast Exception e String class Name config Elements j get Attribute type Class NON NLS 1 Team Plugin log I Status ERROR Policy bind Repository Provider Type invalid Class id class Name e NON NLS 1 return null return null  RepositoryProviderType newProviderType TeamPlugin TeamPlugin getPlugin IExtensionPoint getDescriptor getExtensionPoint TeamPlugin REPOSITORY_EXTENSION IExtension getExtensions IConfigurationElement configElements getConfigurationElements configElements extensionId configElements getAttribute extensionId extensionId RepositoryProviderType providerType typeClass configElements getAttribute typeClass providerType DefaultRepositoryProviderType providerType RepositoryProviderType configElements createExecutableExtension typeClass providerType allProviderTypes providerType providerType CoreException TeamPlugin ClassCastException className configElements getAttribute typeClass TeamPlugin IStatus RepositoryProviderType invalidClass className
Answer the id of this provider type The id will be the repository provider type s id as defined in the provider plugin s plugin xml return the id of this provider type public final String getID return this id 
Answers an object for serializing and deserializing of references to projects Given a project it can produce a UTF 8 encoded String which can be stored in a file Given this String it can load a project into the workspace It also provides a mechanism by which repository providers can be notified when a project set is created and exported If the provider doesn t wish to provide this feature return null p Subclasses should override this method to return the appropriate serializer for the associated repository type It is recommended that serializers not have any references to UI classes so that they can be used in a headless environment p At this time the default implementation wrappers the code I Project Set Serializer code interface if one exists providing backward compatibility with existing code At some time in the future the code I Project Set Serializer code interface will be removed and the default implementation will revert to having limited functionality return the project set serializer or code null code public Project Set Capability get Project Set Capability Provide backward compatibility with the old I Project Set Serializer interface I Project Set Serializer old Serializer Team get Project Set Serializer getID if old Serializer null Project Set Capability capability new Default Project Set Capability capability set Serializer old Serializer return capability return null  IProjectSetSerializer IProjectSetSerializer ProjectSetCapability getProjectSetCapability IProjectSetSerializer IProjectSetSerializer oldSerializer getProjectSetSerializer oldSerializer ProjectSetCapability DefaultProjectSetCapability setSerializer oldSerializer

Return the flags that describe the type of change The returned value should be AN Ded with the change type flags to determine whether the change event is of a particular type For exampe pre if event get Flags I Subscriber Change Event SYNC CHANGED the sync info for the resource has changed pre return the flags that describe the type of change  ANDed getFlags ISubscriberChangeEvent SYNC_CHANGED
Return the resource whose state with respect to the subscriber has changed return the resource whose state with respect to the subscriber has changed 
Return the subscriber to which this change event applies return the subscriber to which this change event applies 

Notifies this listener that some resources subscriber properties have changed The changes have already happened For example a resource s base revision may have changed The resource tree may or may not be open for modification when this method is invoked param deltas detailing the kinds of changes 

Return the name of this subscription in a format that is suitable for display to an end user return String representing the name of this subscription 
Returns code true code if this resource is supervised by this subscriber A supervised resource is one for which this subscriber maintains the synchronization state Supervised resources are the only resources returned when code members I Resource code was invoked with the parent of the resource Returns code false code in all other cases return code true code if this resource is supervised and code false code otherwise  IResource
Returns all non transient member resources of the given resource The result will include entries for resources that exist either in the workspace or are implicated in an incoming change Returns an empty list if the given resource exists neither in the workspace nor in the corresponding subscriber location or if the given resource is transient p This is a fast operation the repository is not contacted p param resource the resource return a list of member resources 
Returns the list of root resources this subscriber considers for synchronization A client should call this method first then can safely call code members code to navigate the resources managed by this subscriber return a list of resources 
Returns synchronization info for the given resource or code null code if there is no synchronization info because the subscriber does not apply to this resource p Note that sync info may be returned for non existing or for resources which have no corresponding remote resource p p This method will be quick If synchronization calculation requires content from the server it must be cached when the subscriber is refreshed A client should call refresh before calling this method to ensure that the latest information is available for computing the sync state p param resource the resource of interest return sync info 
Returns the comparison criteria that will be used by the sync info created by this subscriber return the comparator to use when computing sync states for this subscriber 
Refreshes the resource hierarchy from the given resources and their children to the specified depth from the corresponding resources in the remote location Resources are ignored in the following cases ul li if they do not exist either in the workspace or in the corresponding remote location li li if the given resource is not supervised by this subscriber li li if the given resource is a closed project they are ineligible for synchronization li p Typical synchronization operations use the statuses computed by this method as the basis for determining what to do It is possible for the actual sync status of the resource to have changed since the current local sync status was refreshed Operations typically skip resources with stale sync information The chances of stale information being used can be reduced by running this method where feasible before doing other operations Note that this will of course affect performance p p The depth parameter controls whether refreshing is performed on just the given resource depth code DEPTH ZERO code the resource and its children depth code DEPTH ONE code or recursively to the resource and all its descendents depth code DEPTH INFINITE code Use depth code DEPTH ONE code rather than depth code DEPTH ZERO code to ensure that new members of a project or folder are detected p p This method might change resources any changes will be reported in a subsequent subscriber resource change event indicating changes to server sync status p p This method contacts the server and is therefore long running progress and cancellation are provided by the given progress monitor p param resources the resources param depth valid values are code DEPTH ZERO code code DEPTH ONE code or code DEPTH INFINITE code param monitor progress monitor or code null code if progress reporting and cancellation are not desired return status with code code OK code if there were no problems otherwise a description possibly a multi status consisting of low severity warnings or informational messages exception Team Exception if this method fails Reasons include ul li The server could not be contacted li ul  DEPTH_ZERO DEPTH_ONE DEPTH_INFINITE DEPTH_ONE DEPTH_ZERO DEPTH_ZERO DEPTH_ONE DEPTH_INFINITE TeamException
Adds a listener to this team subscriber Has no effect if an identical listener is already registered p Team resource change listeners are informed about state changes that affect the resources supervised by this subscriber p param listener a team resource change listener public void add Listener I Subscriber Change Listener listener synchronized listeners if listeners contains listener listeners add listener  addListener ISubscriberChangeListener
Removes a listener previously registered with this team subscriber Has no affect if an identical listener is not registered param listener a team resource change listener public void remove Listener I Subscriber Change Listener listener synchronized listeners listeners remove listener  removeListener ISubscriberChangeListener
Adds all out of sync resources get Kind IN SYNC that occur under the given resources to the specified depth The purpose of this method is to provide subscribers a means of optimizing the determination of all out of sync out of sync descendants of a set of resources p If any of the directly provided resources are not supervised by the subscriber then they should be removed from the set If errors occur while determining the sync info for the resources they should be added to the set using code add Error code p param resources the root of the resource subtrees from which out of sync sync info should be collected param depth the depth to which sync info should be collected one of code I Resource DEPTH ZERO code code I Resource DEPTH ONE code or code I Resource DEPTH INFINITE code param set the sync info set to which out of sync resources should be added or removed Any errors should be added to the set as well param monitor a progress monitor public void collect Out Of Sync I Resource resources int depth Sync Info Set set I Progress Monitor monitor try monitor begin Task null 100 resources length for int i 0 i resources length i I Resource resource resources i I Progress Monitor sub Monitor Policy sub Monitor For monitor 100 sub Monitor begin Task null I Progress Monitor UNKNOWN collect resource depth set sub Monitor sub Monitor done finally monitor done  getKind IN_SYNC addError IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE collectOutOfSync IResource SyncInfoSet IProgressMonitor beginTask IResource IProgressMonitor subMonitor subMonitorFor subMonitor beginTask IProgressMonitor subMonitor subMonitor
final I Subscriber Change Listener listener all Listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception don t log the exception it is already being logged in Platform run  ISubscriberChangeListener allListeners ISafeRunnable handleException
Platform run public void run throws Exception listener subscriber Resource Changed deltas  subscriberResourceChanged
Fires a team resource change event to all registered listeners Only listeners registered at the time this method is called are notified Listener notification makes use of an I Safe Runnable to ensure that client exceptions do not effect the notification to other clients protected void fire Team Resource Change final I Subscriber Change Event deltas I Subscriber Change Listener all Listeners Copy the listener list so we re not calling client code while synchronized synchronized listeners all Listeners I Subscriber Change Listener listeners to Array new I Subscriber Change Listener listeners size Notify the listeners safely so all will receive notification for int i 0 i all Listeners length i final I Subscriber Change Listener listener all Listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception don t log the exception it is already being logged in Platform run public void run throws Exception listener subscriber Resource Changed deltas  ISafeRunnable fireTeamResourceChange ISubscriberChangeEvent ISubscriberChangeListener allListeners allListeners ISubscriberChangeListener toArray ISubscriberChangeListener allListeners ISubscriberChangeListener allListeners ISafeRunnable handleException subscriberResourceChanged
private void collect I Resource resource int depth Sync Info Set set I Progress Monitor monitor Policy check Canceled monitor if resource get Type I Resource FILE depth I Resource DEPTH ZERO try I Resource members members resource for int i 0 i members length i collect members i depth I Resource DEPTH INFINITE I Resource DEPTH INFINITE I Resource DEPTH ZERO set monitor catch Team Exception e set add Error new Team Status I Status ERROR Team Plugin ID I Team Status SYNC INFO SET ERROR Policy bind Subscriber Event Handler 8 resource get Full Path to String e get Message e resource NON NLS 1 monitor sub Task Policy bind Subscriber Event Handler 2 resource get Full Path to String NON NLS 1 try Sync Info info get Sync Info resource if info null info get Kind Sync Info IN SYNC Resource is no longer under the subscriber control This can occur for the resources past as arguments to collect Out Of Sync set remove resource else set add info catch Team Exception e set add Error new Team Status I Status ERROR Team Plugin ID I Team Status RESOURCE SYNC INFO ERROR Policy bind Subscriber Event Handler 9 resource get Full Path to String e get Message NON NLS 1 e resource Tick the monitor to give the owner a chance to do something monitor worked 1  IResource SyncInfoSet IProgressMonitor checkCanceled getType IResource IResource DEPTH_ZERO IResource IResource DEPTH_INFINITE IResource DEPTH_INFINITE IResource DEPTH_ZERO TeamException addError TeamStatus IStatus TeamPlugin ITeamStatus SYNC_INFO_SET_ERROR SubscriberEventHandler getFullPath toString getMessage subTask SubscriberEventHandler getFullPath toString SyncInfo getSyncInfo getKind SyncInfo IN_SYNC collectOutOfSync TeamException addError TeamStatus IStatus TeamPlugin ITeamStatus RESOURCE_SYNC_INFO_ERROR SubscriberEventHandler getFullPath toString getMessage

Create a cahnge event with the given flags for the given subscriber and resource param subscriber the subscriber to which the state change applies param flags the flags that describe the change param resource the resource whose state has change public Subscriber Change Event Subscriber subscriber int flags I Resource resource this subscriber subscriber this flags flags this resource resource  SubscriberChangeEvent IResource
see org eclipse team core subscribers I Subscriber Change Event get Flags public int get Flags return flags  ISubscriberChangeEvent getFlags getFlags
see org eclipse team core subscribers I Subscriber Change Event get Resource public I Resource get Resource return resource  ISubscriberChangeEvent getResource IResource getResource
see org eclipse team core subscribers I Subscriber Change Event get Subscriber public Subscriber get Subscriber return subscriber  ISubscriberChangeEvent getSubscriber getSubscriber
Returns an array of deltas for the resources with code I Subscriber Change Event SYNC CHANGED code as the flag param resources the resources whose sync info has changed return an array of change events public static Subscriber Change Event as Sync Changed Deltas Subscriber subscriber I Resource resources Subscriber Change Event deltas new Subscriber Change Event resources length for int i 0 i resources length i I Resource resource resources i deltas i new Subscriber Change Event subscriber I Subscriber Change Event SYNC CHANGED resource return deltas  ISubscriberChangeEvent SYNC_CHANGED SubscriberChangeEvent asSyncChangedDeltas IResource SubscriberChangeEvent SubscriberChangeEvent IResource SubscriberChangeEvent ISubscriberChangeEvent SYNC_CHANGED

Selects code Sync Info code that match the given change type and direction param direction the change direction code Sync Info OUTGOING code code Sync Info INCOMING code and code Sync Info CONFLICTING code that this filter matches param change the change type code Sync Info ADDITION code code Sync Info DELETION code and code Sync Info CHANGE code that this filter matches return a code Fast Sync Info Filter code that selects code Sync Info code that match the given change type and direction public static Fast Sync Info Filter get Direction And Change Filter int direction int change return new And Sync Info Filter new Fast Sync Info Filter new Sync Info Direction Filter direction new Sync Info Change Type Filter change  SyncInfo SyncInfo SyncInfo SyncInfo SyncInfo SyncInfo SyncInfo FastSyncInfoFilter SyncInfo FastSyncInfoFilter getDirectionAndChangeFilter AndSyncInfoFilter FastSyncInfoFilter SyncInfoDirectionFilter SyncInfoChangeTypeFilter
protected Fast Sync Info Filter filters Create a compund filter that contains the provided filters param filters the child filters protected Compound Sync Info Filter Fast Sync Info Filter filters this filters filters  FastSyncInfoFilter CompoundSyncInfoFilter FastSyncInfoFilter
public static class And Sync Info Filter extends Compound Sync Info Filter Create an AND filter from the given filters param filters the filters to be AN Ded public And Sync Info Filter Fast Sync Info Filter filters super filters  AndSyncInfoFilter CompoundSyncInfoFilter ANDed AndSyncInfoFilter FastSyncInfoFilter
public boolean select Sync Info info for int i 0 i filters length i Fast Sync Info Filter filter filters i if filter select info return false return true  SyncInfo FastSyncInfoFilter
see org eclipse team core synchronize Fast Sync Info Filter select org eclipse team core synchronize Sync Info public boolean select Sync Info info return info get Kind Sync Info AUTOMERGE CONFLICT 0  FastSyncInfoFilter SyncInfo SyncInfo getKind SyncInfo AUTOMERGE_CONFLICT
see org eclipse team core synchronize Fast Sync Info Filter select org eclipse team core synchronize Sync Info public boolean select Sync Info info return info get Kind 0 info get Kind Sync Info PSEUDO CONFLICT 0  FastSyncInfoFilter SyncInfo SyncInfo getKind getKind SyncInfo PSEUDO_CONFLICT
public static class Or Sync Info Filter extends Compound Sync Info Filter Create an OR filter from the given filters param filters the filters to be O Red public Or Sync Info Filter Fast Sync Info Filter filters super filters  OrSyncInfoFilter CompoundSyncInfoFilter ORed OrSyncInfoFilter FastSyncInfoFilter
public boolean select Sync Info info for int i 0 i filters length i Fast Sync Info Filter filter filters i if filter select info return true return false  SyncInfo FastSyncInfoFilter
private int change Filters new int Sync Info ADDITION Sync Info DELETION Sync Info CHANGE Create a filter that will match code Sync Info code whose change type match those passed as arguments to this constructor param change Filters the array of change types code Sync Info ADDITION code code Sync Info DELETION code and code Sync Info CHANGE code that this filter match public Sync Info Change Type Filter int change Filters this change Filters change Filters  changeFilters SyncInfo SyncInfo SyncInfo SyncInfo changeFilters SyncInfo SyncInfo SyncInfo SyncInfoChangeTypeFilter changeFilters changeFilters changeFilters
Create a filter that will match code Sync Info code whose change type match that passed as an argument to this constructor param change the change type code Sync Info ADDITION code code Sync Info DELETION code and code Sync Info CHANGE code that this filter matches public Sync Info Change Type Filter int change this new int change  SyncInfo SyncInfo SyncInfo SyncInfo SyncInfoChangeTypeFilter
public boolean select Sync Info info int sync Kind info get Kind for int i 0 i change Filters length i int filter change Filters i if sync Kind Sync Info CHANGE MASK filter return true return false  SyncInfo syncKind getKind changeFilters changeFilters syncKind SyncInfo CHANGE_MASK
int direction Filters new int Sync Info OUTGOING Sync Info INCOMING Sync Info CONFLICTING Create a filter that will match code Sync Info code whose change direction match those passed as arguments to this constructor param direction Filters the array of change directions code Sync Info OUTGOING code code Sync Info INCOMING code and code Sync Info CONFLICTING code that this filter match public Sync Info Direction Filter int direction Filters this direction Filters direction Filters  directionFilters SyncInfo SyncInfo SyncInfo SyncInfo directionFilters SyncInfo SyncInfo SyncInfo SyncInfoDirectionFilter directionFilters directionFilters directionFilters
Create a filter that will match code Sync Info code whose change direction match that passed as arguments to this constructor param direction the change direction code Sync Info OUTGOING code code Sync Info INCOMING code and code Sync Info CONFLICTING code that this filter matches public Sync Info Direction Filter int direction this new int direction  SyncInfo SyncInfo SyncInfo SyncInfo SyncInfoDirectionFilter
public boolean select Sync Info info int sync Kind info get Kind for int i 0 i direction Filters length i int filter direction Filters i if sync Kind Sync Info DIRECTION MASK filter return true return false  SyncInfo syncKind getKind directionFilters directionFilters syncKind SyncInfo DIRECTION_MASK
Return whether the provided code Sync Info code matches the filter The default behavior it to include resources whose sync Kind is non zero param info the code Sync Info code being tested return code true code if the code Sync Info code matches the filter public boolean select Sync Info info return info get Kind 0  SyncInfo syncKind SyncInfo SyncInfo SyncInfo getKind
see org eclipse team core subscribers Sync Info Filter select org eclipse team core subscribers Sync Info org eclipse core runtime I Progress Monitor public final boolean select Sync Info info I Progress Monitor monitor return select info  SyncInfoFilter SyncInfo IProgressMonitor SyncInfo IProgressMonitor

Returns newly added out of sync code Sync Info code elements return newly added code Sync Info code elements or an empty list if this event doesn t contain added resources  SyncInfo SyncInfo
Returns changed code Sync Info code elements The returned elements are still out of sync return changed code Sync Info code elements or an empty list if this event doesn t contain changes resources  SyncInfo SyncInfo
Returns the removed code I Resource code elements for which the set no longer contains on out of sync code Sync Info code The returned elements are all in sync resources return removed code Sync Info code elements or an empty list if this event doesn t contain removed resources  IResource SyncInfo SyncInfo
Returns the link Sync Info Set that generated these events return the link Sync Info Set that generated these events  SyncInfoSet SyncInfoSet

Sent when the contents of a link Sync Info Set have been reset or the listener has been connected to the set for the first time using code Sync Info Set connect I Sync Info Set Change Listener I Progress Monitor code Listeners should discard any state they have accumulated from the originating sync info set and re obtain their state from the set The originating sync set will be locked for modification when this method is called p Clients should not modify the set within this method and other threads that try to modify the set will be blocked until the reset is processed p param set the originating link Sync Info Set  SyncInfoSet SyncInfoSet ISyncInfoSetChangeListener IProgressMonitor SyncInfoSet
Sent when a link Sync Info Set changes For example when a resource s synchronization state changes The originating sync set will be locked for modification when this method is called Clients should not modify the set within this method and other threads that try to modify the set will be blocked until the change is processed p If the originating set is an instance of code Sync Info Tree code then the event will be an instance of code I Sync Info Tree Change Event code Clients can determine this using an code instancof code check p param event an event containing information about the change  SyncInfoSet SyncInfoTree ISyncInfoTreeChangeEvent
This method is called when errors have occurred calculating the code Sync Info code for a resource The resource associated with the error is available from the code I Team Status code This event only provides the latest errors that occurred An array of all errors can be retrieved directly from the set param set the originating link Sync Info Set param errors the errors that occurred during the latest set modifications param monitor a progress monitor  SyncInfo ITeamStatus SyncInfoSet

Returns the highest parent resources of all newly added elements available in this event by calling code get Added Resources code In other words it returns the set of all parent containers that did not previously have descendants in the sync set but are direct children of containers that did previously have descescendants in the set p These roots are provided in order to allow listeners to optimize the reconciliation of hierachical views of the code Sync Info Set code contents return parents of all newly added elements or an empty list if this event doesn t contain added resources  getAddedResources SyncInfoSet
Returns the highest parent resources of all newly removed elements available in this event by calling code get Removed Resources code In other words it returns the set of all parent containers that previously had descendants in the sync set but are direct children of containers that still have descescendants in the set p These roots are provided in order to allow listeners to optimize the reconciliation of hierachical views of the code Sync Info Set code contents return parents of all newly removed elements or an empty list if this event doesn t contain added resources  getRemovedResources SyncInfoSet

Construct a sync info object param local the local resource Must be non null but may not exist param base the base resource variant or code null code param remote the remote resource variant or code null code param comparator the comparator used to determine if resources differ public Sync Info I Resource local I Resource Variant base I Resource Variant remote I Resource Variant Comparator comparator Assert is Not Null local Assert is Not Null comparator this local local this base base this remote remote this comparator comparator  SyncInfo IResource IResourceVariant IResourceVariant IResourceVariantComparator isNotNull isNotNull
Returns the state of the local resource Note that the resource may or may not exist return a resource public I Resource get Local return local  IResource getLocal
Returns the content identifier for the local resource or code null code if it doesn t have one For example in CVS this would be the revision number return String that could be displayed to the user to identify this resource public String get Local Content Identifier return null  getLocalContentIdentifier
Returns the remote resource handle for the base resource or code null code if the base resource does not exist p Note The type of the common resource may be different from the types of the local and remote resources p return a remote resource handle or code null code public I Resource Variant get Base return base  IResourceVariant getBase
Returns the handle for the remote resource or code null code if the remote resource does not exist p Note The type of the remote resource may be different from the types of the local and common resources p return a remote resource handle or code null code public I Resource Variant get Remote return remote  IResourceVariant getRemote
Returns the comparator that is used to determine the kind of this sync node return the comparator that is used to determine the kind of this sync node public I Resource Variant Comparator get Comparator return comparator  IResourceVariantComparator getComparator
Returns the kind of synchronization for this node return the kind of synchronization for this node public int get Kind return sync Kind  getKind syncKind
Helper method that returns whether the given kind represents an in sync resource param kind the kind of a code Sync Info code return whether the kind is code IN SYNC code static public boolean is In Sync int kind return kind IN SYNC  SyncInfo IN_SYNC isInSync IN_SYNC
Helper method to return the direction portion of the given kind The resulting value can be compared directly with the direction constants param kind the kind of a code Sync Info code return the direction portion of the kind static public int get Direction int kind return kind DIRECTION MASK  SyncInfo getDirection DIRECTION_MASK
Helper method to return the change portion of the given kind The resulting value can be compared directly with the change type constants param kind the kind of a code Sync Info code return the change portion of the kind static public int get Change int kind return kind CHANGE MASK  SyncInfo getChange CHANGE_MASK
public boolean equals Object other if other this return true if other instanceof Sync Info return equal Nodes this Sync Info other return false  SyncInfo equalNodes SyncInfo
see java lang Object hash Code public int hash Code return get Local hash Code  hashCode hashCode getLocal hashCode
private boolean equal Nodes Sync Info node1 Sync Info node2 if node1 null node2 null return false First ensure the local resources are equals I Resource local1 null if node1 get Local null local1 node1 get Local I Resource local2 null if node2 get Local null local2 node2 get Local if equal Objects local1 local2 return false Next ensure the base resources are equal I Resource Variant base1 null if node1 get Base null base1 node1 get Base I Resource Variant base2 null if node2 get Base null base2 node2 get Base if equal Objects base1 base2 return false Finally ensure the remote resources are equal I Resource Variant remote1 null if node1 get Remote null remote1 node1 get Remote I Resource Variant remote2 null if node2 get Remote null remote2 node2 get Remote if equal Objects remote1 remote2 return false return true  equalNodes SyncInfo SyncInfo IResource getLocal getLocal IResource getLocal getLocal equalObjects IResourceVariant getBase getBase IResourceVariant getBase getBase equalObjects IResourceVariant getRemote getRemote IResourceVariant getRemote getRemote equalObjects
private boolean equal Objects Object o1 Object o2 if o1 null o2 null return true if o1 null o2 null return false return o1 equals o2  equalObjects
public Object get Adapter Class adapter if adapter I Resource class return get Local return null  getAdapter IResource getLocal
see java lang Object to String public String to String return get Local get Name kind To String get Kind NON NLS 1  toString toString getLocal getName kindToString getKind
A helper method that returns a displayable i e externalized string describing the provided sync kind param kind the sync kind obtained from a code Sync Info code return a displayable string that descibes the kind public static String kind To String int kind String label NON NLS 1 if kind IN SYNC label Policy bind Remote Sync Element insync NON NLS 1 else switch kind DIRECTION MASK case CONFLICTING label Policy bind Remote Sync Element conflicting break NON NLS 1 case OUTGOING label Policy bind Remote Sync Element outgoing break NON NLS 1 case INCOMING label Policy bind Remote Sync Element incoming break NON NLS 1 switch kind CHANGE MASK case CHANGE label Policy bind concat Strings label Policy bind Remote Sync Element change break NON NLS 1 NON NLS 2 case ADDITION label Policy bind concat Strings label Policy bind Remote Sync Element addition break NON NLS 1 NON NLS 2 case DELETION label Policy bind concat Strings label Policy bind Remote Sync Element deletion break NON NLS 1 NON NLS 2 if kind MANUAL CONFLICT 0 label Policy bind concat Strings label Policy bind Remote Sync Element manual NON NLS 1 NON NLS 2 if kind AUTOMERGE CONFLICT 0 label Policy bind concat Strings label Policy bind Remote Sync Element auto NON NLS 1 NON NLS 2 return Policy bind Remote Sync Element delimit label NON NLS 1  SyncInfo kindToString IN_SYNC RemoteSyncElement DIRECTION_MASK RemoteSyncElement RemoteSyncElement RemoteSyncElement CHANGE_MASK concatStrings RemoteSyncElement concatStrings RemoteSyncElement concatStrings RemoteSyncElement MANUAL_CONFLICT concatStrings RemoteSyncElement AUTOMERGE_CONFLICT concatStrings RemoteSyncElement RemoteSyncElement
Method that is invoked after instance creation to initialize the sync kind This method should only be invoked by the creator of the code Sync Info code instance It is not done from the constructor in order to allow subclasses to calculate the sync kind from any additional state variables they may have throws Team Exception if there were problems calculating the sync state public final void init throws Team Exception sync Kind calculate Kind  SyncInfo TeamException TeamException syncKind calculateKind
Method that is invoked from the code init code method to calculate the sync kind for this instance of code Sync Info code The result is assigned to an instance variable and is available using code get Kind code Subclasses should not invoke this method but may override it in order to customize the sync kind calculation algorithm return the sync kind of this code Sync Info code throws Team Exception if there were problems calculating the sync state protected int calculate Kind throws Team Exception int description IN SYNC boolean local Exists local exists if comparator is Three Way if base null if remote null if local Exists description IN SYNC else description OUTGOING ADDITION else if local Exists description INCOMING ADDITION else description CONFLICTING ADDITION if comparator compare local remote description PSEUDO CONFLICT else if local Exists if remote null description CONFLICTING DELETION PSEUDO CONFLICT else if comparator compare base remote description OUTGOING DELETION else description CONFLICTING CHANGE else if remote null if comparator compare local base description INCOMING DELETION else description CONFLICTING CHANGE else boolean ay comparator compare local base boolean am comparator compare base remote if ay am in sync else if ay am description INCOMING CHANGE else if ay am description OUTGOING CHANGE else if comparator compare local remote description CONFLICTING CHANGE else two compare without access to base contents if remote null if local Exists Assert is True false shouldn t happen else description DELETION else if local Exists description ADDITION else if comparator compare local remote description CHANGE return description  SyncInfo getKind SyncInfo TeamException calculateKind TeamException IN_SYNC localExists isThreeWay localExists IN_SYNC localExists PSEUDO_CONFLICT localExists PSEUDO_CONFLICT localExists isTrue localExists

Content Comparator criteria new Content Comparator false Create a filter that does not ignore whitespace public Content Comparison Sync Info Filter this false  ContentComparator ContentComparator ContentComparisonSyncInfoFilter
Create a filter and configure how whitspace is handled param ignore Whitespace whether whitespace should be ignored public Content Comparison Sync Info Filter boolean ignore Whitespace criteria new Content Comparator ignore Whitespace  ignoreWhitespace ContentComparisonSyncInfoFilter ignoreWhitespace ContentComparator ignoreWhitespace
public boolean select Sync Info info I Progress Monitor monitor I Resource Variant remote info get Remote I Resource local info get Local if local get Type I Resource FILE return true if remote null return local exists if local exists return false return compare Contents I File local remote monitor  SyncInfo IProgressMonitor IResourceVariant getRemote IResource getLocal getType IResource compareContents IFile
Compare the contents of the local file and its variant This is used by the code select code method to compare the contents of two non null files param local a local file param remote a resource variant of the file param monitor a progress monitor return whether the contents of the two files are equal public boolean compare Contents I File local I Resource Variant remote I Progress Monitor monitor Assert is Not Null local Assert is Not Null remote return criteria compare local remote monitor  compareContents IFile IResourceVariant IProgressMonitor isNotNull isNotNull
Return code true code if the provided code Sync Info code matches the filter param info the code Sync Info code to be tested param monitor a progress monitor return code true code if the code Sync Info code matches the filter  SyncInfo SyncInfo SyncInfo

Create an empty set public Sync Info Set  SyncInfoSet
Create a code Sync Info Set code containing the given code Sync Info code instances param infos the code Sync Info code instances to be contained by this set public Sync Info Set Sync Info infos this use the internal add since we can t have listeners at this point anyway for int i 0 i infos length i internal Add infos i  SyncInfoSet SyncInfo SyncInfo SyncInfoSet SyncInfo internalAdd
Return an array of code Sync Info code for all out of sync resources that are contained by the set return an array of code Sync Info code public synchronized Sync Info get Sync Infos return Sync Info resources values to Array new Sync Info resources size  SyncInfo SyncInfo SyncInfo getSyncInfos SyncInfo toArray SyncInfo
Return all out of sync resources contained in this set The default implementation uses code get Sync Infos code to determine the resources contained in the set Subclasses may override to optimize return all out of sync resources contained in the set public I Resource get Resources Sync Info infos get Sync Infos List resources new Array List for int i 0 i infos length i Sync Info info infos i resources add info get Local return I Resource resources to Array new I Resource resources size  getSyncInfos IResource getResources SyncInfo getSyncInfos ArrayList SyncInfo getLocal IResource toArray IResource
Return the code Sync Info code for the given resource or code null code if the resource is not contained in the set param resource the resource return the code Sync Info code for the resource or code null code if the resource is in sync or doesn t have synchronization information in this set public synchronized Sync Info get Sync Info I Resource resource return Sync Info resources get resource get Full Path  SyncInfo SyncInfo SyncInfo getSyncInfo IResource SyncInfo getFullPath
Return the number of out of sync resources contained in this set return the size of the set see count For int int public synchronized int size return resources size  countFor
Return the number of out of sync resources in the given set whose sync kind matches the given kind and mask e g code Sync Info get Kind mask kind code p For example this will return the number of outgoing changes in the set pre long outgoing count For Sync Info OUTGOING Sync Info DIRECTION MASK pre p param kind the sync kind param mask the sync kind mask return the number of matching resources in the set public long count For int kind int mask return statistics count For kind mask  SyncInfo getKind countFor SyncInfo SyncInfo DIRECTION_MASK countFor countFor
Returns code true code if there are any conflicting nodes in the set and code false code otherwise return code true code if there are any conflicting nodes in the set and code false code otherwise public boolean has Conflicts return count For Sync Info CONFLICTING Sync Info DIRECTION MASK 0  hasConflicts countFor SyncInfo SyncInfo DIRECTION_MASK
Return whether the set is empty return code true code if the set is empty public synchronized boolean is Empty return resources is Empty  isEmpty isEmpty
Add the code Sync Info code to the set replacing any previously existing one param info the new code Sync Info code protected synchronized void internal Add Sync Info info Assert is True locked For Modification I Resource local info get Local I Path path local get Full Path Sync Info old Sync Info Sync Info resources put path info if old Sync Info null statistics add info else statistics remove old Sync Info statistics add info  SyncInfo SyncInfo internalAdd SyncInfo isTrue lockedForModification IResource getLocal IPath getFullPath SyncInfo oldSyncInfo SyncInfo oldSyncInfo oldSyncInfo
Remove the resource from the set updating all internal data structures param resource the resource to be removed return the code Sync Info code that was just removed protected synchronized Sync Info internal Remove I Resource resource Assert is True locked For Modification I Path path resource get Full Path Sync Info info Sync Info resources remove path if info null statistics remove info return info  SyncInfo SyncInfo internalRemove IResource isTrue lockedForModification IPath getFullPath SyncInfo SyncInfo
Registers the given listener for sync info set notifications Has no effect if an identical listener is already registered param listener listener to register public void add Sync Set Changed Listener I Sync Info Set Change Listener listener synchronized listeners listeners add listener  addSyncSetChangedListener ISyncInfoSetChangeListener
Deregisters the given listener for participant notifications Has no effect if listener is not already registered param listener listener to deregister public void remove Sync Set Changed Listener I Sync Info Set Change Listener listener synchronized listeners listeners remove listener  removeSyncSetChangedListener ISyncInfoSetChangeListener
Reset the sync set so it is empty Listeners are notified of the change public void clear try begin Input errors clear resources clear statistics clear get Change Event reset finally end Input null  beginInput getChangeEvent endInput
private void run I Workspace Runnable runnable I Progress Monitor monitor monitor Policy monitor For monitor monitor begin Task null 100 try begin Input runnable run Policy sub Monitor For monitor 80 catch Core Exception e add Error new Team Status I Status ERROR Team Plugin ID I Team Status SYNC INFO SET ERROR e get Message e null finally end Input Policy sub Monitor For monitor 20  IWorkspaceRunnable IProgressMonitor monitorFor beginTask beginInput subMonitorFor CoreException addError TeamStatus IStatus TeamPlugin ITeamStatus SYNC_INFO_SET_ERROR getMessage endInput subMonitorFor
run new I Workspace Runnable public void run I Progress Monitor monitor try monitor begin Task null 100 add Sync Set Changed Listener listener listener sync Info Set Reset Sync Info Set this Policy sub Monitor For monitor 95 finally monitor done  IWorkspaceRunnable IProgressMonitor beginTask addSyncSetChangedListener syncInfoSetReset SyncInfoSet subMonitorFor
Connect the listener to the sync set in such a fashion that the listener will be connected the the sync set using code add Change Listener code and issued a reset event This is done to provide a means of connecting to the sync set and initializing a model based on the sync set without worrying about missing events p The reset event may be done in the context of this method invocation or may be done in another thread at the discretion of the code Sync Info Set code implementation p p Disconnecting is done by calling code remove Change Listener code Once disconnected a listener can reconnect to be reinitialized p param listener the listener that should be connected to this set param monitor a progress monitor public void connect final I Sync Info Set Change Listener listener I Progress Monitor monitor run new I Workspace Runnable public void run I Progress Monitor monitor try monitor begin Task null 100 add Sync Set Changed Listener listener listener sync Info Set Reset Sync Info Set this Policy sub Monitor For monitor 95 finally monitor done monitor  addChangeListener SyncInfoSet removeChangeListener ISyncInfoSetChangeListener IProgressMonitor IWorkspaceRunnable IProgressMonitor beginTask addSyncSetChangedListener syncInfoSetReset SyncInfoSet subMonitorFor
Add the given code Sync Info code to the set A change event will be generated unless the call to this method is nested in between calls to code begin Input code and code end Input I Progress Monitor code in which case the event for this addition and any other sync set change will be fired in a batched event when code end Input code is invoked p Invoking this method outside of the above mentioned block will result in the code end Input I Progress Monitor code being invoked with a null progress monitor If responsiveness is required the client should always nest sync set modifications within code begin Input end Input code p param info the sync info to be added to this set public void add Sync Info info try begin Input boolean already Exists get Sync Info info get Local null internal Add info if already Exists get Change Event changed info else get Change Event added info finally end Input null  SyncInfo beginInput endInput IProgressMonitor endInput endInput IProgressMonitor beginInput endInput SyncInfo beginInput alreadyExists getSyncInfo getLocal internalAdd alreadyExists getChangeEvent getChangeEvent endInput
Add all the syncinfo from the given set to this set param set the set whose sync info should be added to this set public void add All Sync Info Set set try begin Input Sync Info infos set get Sync Infos for int i 0 i infos length i add infos i finally end Input null  addAll SyncInfoSet beginInput SyncInfo getSyncInfos endInput
Remove the given local resource from the set param resource the local resource to remove public synchronized void remove I Resource resource try begin Input Sync Info info internal Remove resource get Change Event removed resource info finally end Input null  IResource beginInput SyncInfo internalRemove getChangeEvent endInput
Remove all the given resources from the set param resources the resources to be removed public void remove All I Resource resources try begin Input for int i 0 i resources length i remove resources i finally end Input null  removeAll IResource beginInput endInput
Removes all conflicting nodes from this set public void remove Conflicting Nodes reject Nodes new Sync Info Direction Filter Sync Info CONFLICTING  removeConflictingNodes rejectNodes SyncInfoDirectionFilter SyncInfo
Removes all outgoing nodes from this set public void remove Outgoing Nodes reject Nodes new Sync Info Direction Filter Sync Info OUTGOING  removeOutgoingNodes rejectNodes SyncInfoDirectionFilter SyncInfo
Removes all incoming nodes from this set public void remove Incoming Nodes reject Nodes new Sync Info Direction Filter Sync Info INCOMING  removeIncomingNodes rejectNodes SyncInfoDirectionFilter SyncInfo
Indicate whether the set has nodes matching the given filter param filter a sync info filter public boolean has Nodes Fast Sync Info Filter filter Sync Info infos get Sync Infos for int i 0 i infos length i Sync Info info infos i if info null filter select info return true return false  hasNodes FastSyncInfoFilter SyncInfo getSyncInfos SyncInfo
Removes all nodes from this set that do not match the given filter leaving only those that do match the filter param filter a sync info filter public void select Nodes Fast Sync Info Filter filter try begin Input Sync Info infos get Sync Infos for int i 0 i infos length i Sync Info info infos i if info null filter select info remove info get Local finally end Input null  selectNodes FastSyncInfoFilter beginInput SyncInfo getSyncInfos SyncInfo getLocal endInput
Removes all nodes from this set that match the given filter leaving those that do not match the filter param filter a sync info filter public void reject Nodes Fast Sync Info Filter filter try begin Input Sync Info infos get Sync Infos for int i 0 i infos length i Sync Info info infos i if info null filter select info remove info get Local finally end Input null  rejectNodes FastSyncInfoFilter beginInput SyncInfo getSyncInfos SyncInfo getLocal endInput
Return all nodes in this set that match the given filter param filter a sync info filter public Sync Info get Nodes Fast Sync Info Filter filter List result new Array List Sync Info infos get Sync Infos for int i 0 i infos length i Sync Info info infos i if info null filter select info result add info return Sync Info result to Array new Sync Info result size  SyncInfo getNodes FastSyncInfoFilter ArrayList SyncInfo getSyncInfos SyncInfo SyncInfo toArray SyncInfo
Returns code true code if this sync set has incoming changes Note that conflicts are not considered to be incoming changes return code true code if this sync set has incoming changes public boolean has Incoming Changes return count For Sync Info INCOMING Sync Info DIRECTION MASK 0  hasIncomingChanges countFor SyncInfo SyncInfo DIRECTION_MASK
Returns code true code if this sync set has outgoing changes Note that conflicts are not considered to be outgoing changes return code true code if this sync set has outgoing changes public boolean has Outgoing Changes return count For Sync Info OUTGOING Sync Info DIRECTION MASK 0  hasOutgoingChanges countFor SyncInfo SyncInfo DIRECTION_MASK
This method is used to obtain a lock on the set which ensures thread safety and batches change notification If the set is locked by another thread the calling thread will block until the lock becomes available This method uses an code org eclipse core runtime jobs I Lock code p It is important that the lock is released after it is obtained Calls to code end Input code should be done in a finally block as illustrated in the following code snippet pre try set begin Input do stuff finally set end Input progress pre p p Calls to code begin Input code and code end Input code can be nested and must be matched p public void begin Input lock acquire  ILock endInput beginInput endInput beginInput endInput beginInput
This method is used to release the lock on this set The prgress monitor is needed to allow listeners to perform long running operations is reponse to the set change The lock is held while the listeners are notified so listeners must be cautious in order to avoid deadlock public void end Input I Progress Monitor monitor try if lock get Depth 1 Remain locked while firing the events so the handlers can expect the set to remain constant while they process the events fire Changes Policy monitor For monitor finally lock release  endInput IProgressMonitor getDepth fireChanges monitorFor
Reset the changes accumulated so far by this set This method is not intended to be invoked or implemented by clients protected void reset Changes changes create Empty Change Event  resetChanges createEmptyChangeEvent
Create an empty change event Subclass may override to provided specialized event types return an empty change event protected Sync Set Changed Event create Empty Change Event return new Sync Set Changed Event this  SyncSetChangedEvent createEmptyChangeEvent SyncSetChangedEvent
final I Sync Info Set Change Listener listener all Listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception don t log the exception it is already being logged in Platform run  ISyncInfoSetChangeListener allListeners ISafeRunnable handleException
public void run throws Exception try locked For Modification true if event is Reset listener sync Info Set Reset Sync Info Set this Policy sub Monitor For monitor 100 else listener sync Info Changed event Policy sub Monitor For monitor 100 if new Errors length 0 listener sync Info Set Errors Sync Info Set this new Errors Policy sub Monitor For monitor 50 finally locked For Modification false  lockedForModification isReset syncInfoSetReset SyncInfoSet subMonitorFor syncInfoChanged subMonitorFor newErrors syncInfoSetErrors SyncInfoSet newErrors subMonitorFor lockedForModification
private void fire Changes final I Progress Monitor monitor Use a synchronized block to ensure that the event we send is static final Sync Set Changed Event event synchronized this event get Change Event reset Changes Ensure that the list of listeners is not changed while events are fired Copy the listeners so that addition removal is not blocked by event listeners if event is Empty event is Reset return I Sync Info Set Change Listener all Listeners get Listeners Fire the events using an I Safe Runnable final I Team Status new Errors event get Errors monitor begin Task null 100 new Errors length 0 50 0 all Listeners length for int i 0 i all Listeners length i final I Sync Info Set Change Listener listener all Listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception don t log the exception it is already being logged in Platform run public void run throws Exception try locked For Modification true if event is Reset listener sync Info Set Reset Sync Info Set this Policy sub Monitor For monitor 100 else listener sync Info Changed event Policy sub Monitor For monitor 100 if new Errors length 0 listener sync Info Set Errors Sync Info Set this new Errors Policy sub Monitor For monitor 50 finally locked For Modification false monitor done  fireChanges IProgressMonitor SyncSetChangedEvent getChangeEvent resetChanges isEmpty isReset ISyncInfoSetChangeListener allListeners getListeners ISafeRunnable ITeamStatus newErrors getErrors beginTask newErrors allListeners allListeners ISyncInfoSetChangeListener allListeners ISafeRunnable handleException lockedForModification isReset syncInfoSetReset SyncInfoSet subMonitorFor syncInfoChanged subMonitorFor newErrors syncInfoSetErrors SyncInfoSet newErrors subMonitorFor lockedForModification
Return a copy of all the listeners registered with this set return the listeners protected I Sync Info Set Change Listener get Listeners I Sync Info Set Change Listener all Listeners synchronized listeners all Listeners I Sync Info Set Change Listener listeners to Array new I Sync Info Set Change Listener listeners size return all Listeners  ISyncInfoSetChangeListener getListeners ISyncInfoSetChangeListener allListeners allListeners ISyncInfoSetChangeListener toArray ISyncInfoSetChangeListener allListeners
Return the change event that is accumulating the changes to the set This can be called by sublasses to access the event return Returns the changes protected Sync Set Changed Event get Change Event return changes  SyncSetChangedEvent getChangeEvent
Add the error to the set Errors should be added to the set when the client populating the set cannot determine the code Sync Info code for one or more resources due to an exception or some other problem Listeners will be notified that an error occurred and can react accordingly p Only one error can be associated with a resource which is obtained from the code I Team Status code It is up to the client populating the set to ensure that the error associated with a resource contains all relevent information The error will remain in the set until the set is reset p param resource the resource associated with the error or the workspace root param status the status that describes the error that occurred public void add Error I Team Status status try begin Input errors put status get Resource status get Change Event error Occurred status finally end Input null  SyncInfo ITeamStatus addError ITeamStatus beginInput getResource getChangeEvent errorOccurred endInput
Return an array of the errors the occurred while populating this set The errors will remain with the set until it is reset return the errors public I Team Status get Errors return I Team Status errors values to Array new I Team Status errors size  ITeamStatus getErrors ITeamStatus toArray ITeamStatus

Create an empty sync info tree public Sync Info Tree super  SyncInfoTree
Create a sync info tree containing the given sync info elements param infos the sync info elements public Sync Info Tree Sync Info infos super infos  SyncInfoTree SyncInfo
Return wether the given resource has any children in the sync set The children could be either out of sync resources that are contained by the set or containers that are ancestors of out of sync resources contained by the set param resource the resource to check for children return code true code if the resource has children in the set public synchronized boolean has Members I Resource resource if resource get Type I Resource FILE return false I Container parent I Container resource if parent get Type I Resource ROOT return is Empty I Path path parent get Full Path Set all Descendants Set parents get path return all Descendants null all Descendants is Empty  hasMembers IResource getType IResource IContainer IContainer getType IResource isEmpty IPath getFullPath allDescendants allDescendants allDescendants isEmpty
Return the code Sync Info code for each out of sync resource in the subtree rooted at the given resource to the depth specified The depth is one of ul li code I Resource DEPTH ZERO code the resource only li code I Resource DEPTH ONE code the resource or its direct children li code I Resource DEPTH INFINITE code the resource and all of it s descendants ul If the given resource is out of sync it will be included in the result p The default implementation makes use of code get Sync Info I Resource code code members I Resource code and code get Sync Infos code to provide the varying depths Subclasses may override to optimize p param resource the root of the resource subtree param depth the depth of the subtree return the code Sync Info code for any out of sync resources public synchronized Sync Info get Sync Infos I Resource resource int depth if depth I Resource DEPTH ZERO resource get Type I Resource FILE Sync Info info get Sync Info resource if info null return new Sync Info 0 else return new Sync Info info if depth I Resource DEPTH ONE List result new Array List Sync Info info get Sync Info resource if info null result add info I Resource members members resource for int i 0 i members length i I Resource member members i info get Sync Info member if info null result add info return Sync Info result to Array new Sync Info result size if it s the root then return all out of sync resources if resource get Type I Resource ROOT return get Sync Infos for folders return all children deep return internal Get Deep Sync Info I Container resource  SyncInfo IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE getSyncInfo IResource IResource getSyncInfos SyncInfo SyncInfo getSyncInfos IResource IResource DEPTH_ZERO getType IResource SyncInfo getSyncInfo SyncInfo SyncInfo IResource DEPTH_ONE ArrayList SyncInfo getSyncInfo IResource IResource getSyncInfo SyncInfo toArray SyncInfo getType IResource getSyncInfos internalGetDeepSyncInfo IContainer
private synchronized Sync Info internal Get Deep Sync Info I Container resource List infos new Array List I Resource children internal Get Out Of Sync Descendants resource for int i 0 i children length i I Resource child children i Sync Info info get Sync Info child if info null infos add info else Team Plugin log I Status INFO Policy bind Sync Info Tree 0 child get Full Path null NON NLS 1 return Sync Info infos to Array new Sync Info infos size  SyncInfo internalGetDeepSyncInfo IContainer ArrayList IResource internalGetOutOfSyncDescendants IResource SyncInfo getSyncInfo TeamPlugin IStatus SyncInfoTree getFullPath SyncInfo toArray SyncInfo
Overrides inherited method to provide an instance of code I Sync Info Tree Change Event code protected Sync Set Changed Event create Empty Change Event return new Sync Info Tree Change Event this  ISyncInfoTreeChangeEvent SyncSetChangedEvent createEmptyChangeEvent SyncInfoTreeChangeEvent
public void add Sync Info info try begin Input boolean already Exists get Sync Info info get Local null super add info if already Exists I Resource local info get Local add To Parents local local finally end Input null  SyncInfo beginInput alreadyExists getSyncInfo getLocal alreadyExists IResource getLocal addToParents endInput
public void remove I Resource resource try begin Input super remove resource remove From Parents resource resource finally end Input null  IResource beginInput removeFromParents endInput
public void clear try begin Input super clear synchronized this parents clear finally end Input null  beginInput endInput
private synchronized boolean add To Parents I Resource resource I Resource parent if parent get Type I Resource ROOT return false this flag is used to indicate if the parent was previosuly in the set boolean added Parent false if parent get Type I Resource FILE the file is new added Parent true else Set children Set parents get parent get Full Path if children null children new Hash Set parents put parent get Full Path children this is a new folder in the sync set added Parent true children add resource if the parent already existed and the resource is new record it if add To Parents resource parent get Parent added Parent internal Added Subtree Root parent return added Parent  addToParents IResource IResource getType IResource addedParent getType IResource addedParent getFullPath HashSet getFullPath addedParent addToParents getParent addedParent internalAddedSubtreeRoot addedParent
private synchronized boolean remove From Parents I Resource resource I Resource parent if parent get Type I Resource ROOT return false this flag is used to indicate if the parent was removed from the set boolean removed Parent false if parent get Type I Resource FILE the file will be removed removed Parent true else Set children Set parents get parent get Full Path if children null children remove resource if children is Empty parents remove parent get Full Path removed Parent true if the parent wasn t removed and the resource was record it if remove From Parents resource parent get Parent removed Parent internal Removed Subtree Root parent return removed Parent  removeFromParents IResource IResource getType IResource removedParent getType IResource removedParent getFullPath isEmpty getFullPath removedParent removeFromParents getParent removedParent internalRemovedSubtreeRoot removedParent
private void internal Added Subtree Root I Resource parent Sync Info Tree Change Event get Change Event added Subtree Root parent  internalAddedSubtreeRoot IResource SyncInfoTreeChangeEvent getChangeEvent addedSubtreeRoot
private void internal Removed Subtree Root I Resource parent Sync Info Tree Change Event get Change Event removed Subtree Root parent  internalRemovedSubtreeRoot IResource SyncInfoTreeChangeEvent getChangeEvent removedSubtreeRoot
Remove from this set the code Sync Info code for the given resource and any of its descendants within the specified depth The depth is one of ul li code I Resource DEPTH ZERO code the resource only li code I Resource DEPTH ONE code the resource or its direct children li code I Resource DEPTH INFINITE code the resource and all of it s descendants ul param resource the root of the resource subtree param depth the depth of the subtree public void remove I Resource resource int depth try begin Input if get Sync Info resource null remove resource if depth I Resource DEPTH ZERO resource get Type I Resource FILE return if depth I Resource DEPTH ONE I Resource members members resource for int i 0 i members length i I Resource member members i if get Sync Info member null remove member else if depth I Resource DEPTH INFINITE I Resource to Remove internal Get Out Of Sync Descendants I Container resource for int i 0 i to Remove length i remove to Remove i finally end Input null  SyncInfo IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE IResource beginInput getSyncInfo IResource DEPTH_ZERO getType IResource IResource DEPTH_ONE IResource IResource getSyncInfo IResource DEPTH_INFINITE IResource toRemove internalGetOutOfSyncDescendants IContainer toRemove toRemove endInput
This is an internal method and is not intended to be invoked or overriden by clients protected synchronized I Resource internal Get Out Of Sync Descendants I Container resource The parent map contains a set of all out of sync children Set all Children Set parents get resource get Full Path if all Children null return new I Resource 0 return I Resource all Children to Array new I Resource all Children size  IResource internalGetOutOfSyncDescendants IContainer allChildren getFullPath allChildren IResource IResource allChildren toArray IResource allChildren
private synchronized I Resource internal Members I Workspace Root root Set possible Children parents key Set Set children new Hash Set for Iterator it possible Children iterator it has Next Object next it next I Resource element root find Member I Path next if element null children add element get Project return I Resource children to Array new I Resource children size  IResource internalMembers IWorkspaceRoot possibleChildren keySet HashSet possibleChildren hasNext IResource findMember IPath getProject IResource toArray IResource
Return the immediate children of the given resource who are either out of sync or contain out of sync resources param resource the parent resource return the children of the resource that are either out of sync or are ancestors of out of sync resources contained in the set public synchronized I Resource members I Resource resource if resource get Type I Resource FILE return new I Resource 0 I Container parent I Container resource if parent get Type I Resource ROOT return internal Members I Workspace Root parent OPTIMIZE could be optimized so that we don t traverse all the deep children to find the immediate ones Set children new Hash Set I Path path parent get Full Path Set possible Children Set parents get path if possible Children null for Iterator it possible Children iterator it has Next Object next it next I Resource element I Resource next I Path child Path element get Full Path I Resource model Object null if child Path segment Count path segment Count 1 model Object element else if child Path segment Count path segment Count I Container child Folder parent get Folder new Path child Path segment path segment Count model Object child Folder if model Object null children add model Object return I Resource children to Array new I Resource children size  IResource IResource getType IResource IResource IContainer IContainer getType IResource internalMembers IWorkspaceRoot HashSet IPath getFullPath possibleChildren possibleChildren possibleChildren hasNext IResource IResource IPath childPath getFullPath IResource modelObject childPath segmentCount segmentCount modelObject childPath segmentCount segmentCount IContainer childFolder getFolder childPath segmentCount modelObject childFolder modelObject modelObject IResource toArray IResource

private int type public File Type Info String extension int type this extension extension this type type  FileTypeInfo
this type type public String get Extension return extension  getExtension
return extension public int get Type return type  getType
Return the type of the given I Storage Valid return values are Team TEXT Team BINARY Team UNKNOWN param storage the I Storage return whether the given I Storage is TEXT BINARY or UNKNOWN public static int get Type I Storage storage String extension get File Extension storage get Name if extension null return UNKNOWN Sorted Map table get File Type Table Integer integer Integer table get extension if integer null return UNKNOWN return integer int Value  IStorage IStorage IStorage getType IStorage getFileExtension getName SortedMap getFileTypeTable intValue
Returns whether the given file should be ignored This method answers true if the file matches one of the global ignore patterns or if the file is marked as derived param file the file return whether the file should be ignored public static boolean is Ignored Hint I Resource resource if resource is Derived return true return matches Enabled Ignore resource  isIgnoredHint IResource isDerived matchesEnabledIgnore
Returns whether the given file should be ignored deprecated use is Ignored Hint I Resource instead public static boolean is Ignored Hint I File file if file is Derived return true return matches Enabled Ignore file  isIgnoredHint IResource isIgnoredHint IFile isDerived matchesEnabledIgnore
private static boolean matches Enabled Ignore I Resource resource String Matcher matchers get String Matchers for int i 0 i matchers length i if matchers i match resource get Name return true return false  matchesEnabledIgnore IResource StringMatcher getStringMatchers getName
Returns whether the given file should be ignored deprecated use is Ignored Hint instead public static boolean is Ignored I File file return matches Enabled Ignore file  isIgnoredHint isIgnored IFile matchesEnabledIgnore
private static I File Type Info get File Type Info Sorted Map map List result new Array List Iterator e map key Set iterator while e has Next String string String e next int type Integer map get string int Value result add new File Type Info string type return I File Type Info result to Array new I File Type Info result size  IFileTypeInfo getFileTypeInfo SortedMap ArrayList keySet hasNext intValue FileTypeInfo IFileTypeInfo toArray IFileTypeInfo
Return all known file types return all known file types public static I File Type Info get All Types return get File Type Info get File Type Table  IFileTypeInfo getAllTypes getFileTypeInfo getFileTypeTable
Returns the list of global ignores public synchronized static I Ignore Info get All Ignores The ignores are cached and when the preferences change the cache is cleared This makes it faster to lookup without having to re parse the preferences if global Ignore null global Ignore new Tree Map plugin Ignore new Tree Map ignore Matchers null try read Ignore State catch Team Exception e Team Plugin log I Status ERROR Policy bind Team Error loading ignore state from disk 1 e NON NLS 1 initialize Plugin Ignores plugin Ignore global Ignore I Ignore Info result get Ignore Info global Ignore return result  IIgnoreInfo getAllIgnores globalIgnore globalIgnore TreeMap pluginIgnore TreeMap ignoreMatchers readIgnoreState TeamException TeamPlugin IStatus Error_loading_ignore_state_from_disk_1 initializePluginIgnores pluginIgnore globalIgnore IIgnoreInfo getIgnoreInfo globalIgnore
private String p pattern private boolean e enabled public String get Pattern return p  getPattern
return p public boolean get Enabled return e  getEnabled
private static I Ignore Info get Ignore Info Map g Ignore I Ignore Info result new I Ignore Info g Ignore size Iterator e g Ignore key Set iterator int i 0 while e has Next final String pattern String e next final boolean enabled Boolean g Ignore get pattern boolean Value result i new I Ignore Info private String p pattern private boolean e enabled public String get Pattern return p public boolean get Enabled return e return result  IIgnoreInfo getIgnoreInfo gIgnore IIgnoreInfo IIgnoreInfo gIgnore gIgnore keySet hasNext gIgnore booleanValue IIgnoreInfo getPattern getEnabled
private synchronized static String Matcher get String Matchers if ignore Matchers null I Ignore Info ignore Patterns get All Ignores Vector matchers new Vector ignore Patterns length for int i 0 i ignore Patterns length i if ignore Patterns i get Enabled matchers add new String Matcher ignore Patterns i get Pattern true false ignore Matchers new String Matcher matchers size matchers copy Into ignore Matchers return ignore Matchers  StringMatcher getStringMatchers ignoreMatchers IIgnoreInfo ignorePatterns getAllIgnores ignorePatterns ignorePatterns ignorePatterns getEnabled StringMatcher ignorePatterns getPattern ignoreMatchers StringMatcher copyInto ignoreMatchers ignoreMatchers
private synchronized static Sorted Map get File Type Table The types are cached and when the preferences change the cache is cleared This makes it faster to lookup without having to re parse the preferences if global Types null load Text State return global Types  SortedMap getFileTypeTable globalTypes loadTextState globalTypes
Set the file type for the give extension to the given type Valid types are Team TEXT Team BINARY Team UNKNOWN param extension the file extension param type the file type public static void set All Types String extensions int types if plugin Types null load Text State global Types new Tree Map for int i 0 i extensions length i global Types put extensions i new Integer types i Now set into preferences String Buffer buf new String Buffer Iterator e global Types key Set iterator while e has Next String extension String e next boolean is Custom plugin Types contains Key extension Integer plugin Types get extension equals plugin Types get extension if is Custom buf append extension buf append PREF TEAM SEPARATOR Integer type Integer global Types get extension buf append type buf append PREF TEAM SEPARATOR Team Plugin get Plugin get Plugin Preferences set Value PREF TEAM TYPES buf to String  setAllTypes pluginTypes loadTextState globalTypes TreeMap globalTypes StringBuffer StringBuffer globalTypes keySet hasNext isCustom pluginTypes containsKey pluginTypes pluginTypes isCustom PREF_TEAM_SEPARATOR globalTypes PREF_TEAM_SEPARATOR TeamPlugin getPlugin getPluginPreferences setValue PREF_TEAM_TYPES toString
Add patterns to the list of global ignores public static void set All Ignores String patterns boolean enabled global Ignore new Tree Map ignore Matchers null for int i 0 i patterns length i global Ignore put patterns i new Boolean enabled i Now set into preferences String Buffer buf new String Buffer Iterator e global Ignore key Set iterator while e has Next String pattern String e next boolean is Custom plugin Ignore contains Key pattern Boolean plugin Ignore get pattern equals global Ignore get pattern if is Custom buf append pattern buf append PREF TEAM SEPARATOR boolean en Boolean global Ignore get pattern boolean Value buf append en buf append PREF TEAM SEPARATOR Team Plugin get Plugin get Plugin Preferences set Value PREF TEAM IGNORES buf to String  setAllIgnores globalIgnore TreeMap ignoreMatchers globalIgnore StringBuffer StringBuffer globalIgnore keySet hasNext isCustom pluginIgnore containsKey pluginIgnore globalIgnore isCustom PREF_TEAM_SEPARATOR globalIgnore booleanValue PREF_TEAM_SEPARATOR TeamPlugin getPlugin getPluginPreferences setValue PREF_TEAM_IGNORES toString
private static void initialize Plugin Patterns Map p Types Map f Types Team Plugin plugin Team Plugin get Plugin if plugin null I Extension Point extension plugin get Descriptor get Extension Point Team Plugin FILE TYPES EXTENSION if extension null I Extension extensions extension get Extensions for int i 0 i extensions length i I Configuration Element config Elements extensions i get Configuration Elements for int j 0 j config Elements length j String ext config Elements j get Attribute extension NON NLS 1 if ext null String type config Elements j get Attribute type NON NLS 1 If the extension doesn t already exist add it if f Types contains Key ext if type equals text NON NLS 1 p Types put ext new Integer TEXT f Types put ext new Integer TEXT else if type equals binary NON NLS 1 f Types put ext new Integer BINARY p Types put ext new Integer BINARY  initializePluginPatterns pTypes fTypes TeamPlugin TeamPlugin getPlugin IExtensionPoint getDescriptor getExtensionPoint TeamPlugin FILE_TYPES_EXTENSION IExtension getExtensions IConfigurationElement configElements getConfigurationElements configElements configElements getAttribute configElements getAttribute fTypes containsKey pTypes fTypes fTypes pTypes
private static void read Text State Data Input Stream dis throws IO Exception int extension Count 0 try extension Count dis read Int catch EOF Exception e Ignore the exception it will occur if there are no patterns stored in the state file return for int i 0 i extension Count i String extension dis readUTF int type dis read Int global Types put extension new Integer type  readTextState DataInputStream IOException extensionCount extensionCount readInt EOFException extensionCount readInt globalTypes
private static void load Text State global Types new Tree Map boolean old load Backward Compatible Text State if old load Text Preferences plugin Types new Tree Map initialize Plugin Patterns plugin Types global Types if old Team Plugin get Plugin save Plugin Preferences  loadTextState globalTypes TreeMap loadBackwardCompatibleTextState loadTextPreferences pluginTypes TreeMap initializePluginPatterns pluginTypes globalTypes TeamPlugin getPlugin savePluginPreferences
pref add Property Change Listener new Preferences I Property Change Listener public void property Change Property Change Event event when a property is changed invalidate our cache so that properties will be recalculated if event get Property equals PREF TEAM TYPES global Types null  addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty PREF_TEAM_TYPES globalTypes
private static void load Text Preferences Preferences pref Team Plugin get Plugin get Plugin Preferences if pref contains PREF TEAM TYPES return pref add Property Change Listener new Preferences I Property Change Listener public void property Change Property Change Event event when a property is changed invalidate our cache so that properties will be recalculated if event get Property equals PREF TEAM TYPES global Types null String pref Types pref get String PREF TEAM TYPES String Tokenizer tok new String Tokenizer pref Types PREF TEAM SEPARATOR String extension integer try while true extension tok next Token if extension length 0 return integer tok next Token global Types put extension Integer value Of integer catch No Such Element Exception e return  loadTextPreferences TeamPlugin getPlugin getPluginPreferences PREF_TEAM_TYPES addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty PREF_TEAM_TYPES globalTypes prefTypes getString PREF_TEAM_TYPES StringTokenizer StringTokenizer prefTypes PREF_TEAM_SEPARATOR nextToken nextToken globalTypes valueOf NoSuchElementException
private static boolean load Backward Compatible Text State File name of the persisted file type information String STATE FILE file Types NON NLS 1 I Path plugin State Location Team Plugin get Plugin get State Location append STATE FILE File f plugin State Location to File if f exists return false try Data Input Stream dis new Data Input Stream new File Input Stream f try read Text State dis finally dis close catch IO Exception ex Team Plugin log Status ERROR ex get Message ex return false f delete return true  loadBackwardCompatibleTextState STATE_FILE fileTypes IPath pluginStateLocation TeamPlugin getPlugin getStateLocation STATE_FILE pluginStateLocation toFile DataInputStream DataInputStream FileInputStream readTextState IOException TeamPlugin getMessage
private static void initialize Plugin Ignores Sorted Map p Ignore Sorted Map g Ignore Team Plugin plugin Team Plugin get Plugin if plugin null I Extension Point extension plugin get Descriptor get Extension Point Team Plugin IGNORE EXTENSION if extension null I Extension extensions extension get Extensions for int i 0 i extensions length i I Configuration Element config Elements extensions i get Configuration Elements for int j 0 j config Elements length j String pattern config Elements j get Attribute pattern NON NLS 1 if pattern null String selected config Elements j get Attribute enabled NON NLS 1 if selected null Check for selected because this used to be the field name selected config Elements j get Attribute selected NON NLS 1 boolean enabled selected null selected equals Ignore Case true NON NLS 1 if this ignore doesn t already exist add it to the global list p Ignore put pattern new Boolean enabled if g Ignore contains Key pattern g Ignore put pattern new Boolean enabled  initializePluginIgnores SortedMap pIgnore SortedMap gIgnore TeamPlugin TeamPlugin getPlugin IExtensionPoint getDescriptor getExtensionPoint TeamPlugin IGNORE_EXTENSION IExtension getExtensions IConfigurationElement configElements getConfigurationElements configElements configElements getAttribute configElements getAttribute configElements getAttribute equalsIgnoreCase pIgnore gIgnore containsKey gIgnore
pref add Property Change Listener new Preferences I Property Change Listener public void property Change Property Change Event event when a property is changed invalidate our cache so that properties will be recalculated if event get Property equals PREF TEAM IGNORES global Ignore null  addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty PREF_TEAM_IGNORES globalIgnore
private static void read Ignore State throws Team Exception if read Backward Compatible Ignore State return Preferences pref Team Plugin get Plugin get Plugin Preferences if pref contains PREF TEAM IGNORES return pref add Property Change Listener new Preferences I Property Change Listener public void property Change Property Change Event event when a property is changed invalidate our cache so that properties will be recalculated if event get Property equals PREF TEAM IGNORES global Ignore null String pref Ignores pref get String PREF TEAM IGNORES String Tokenizer tok new String Tokenizer pref Ignores PREF TEAM SEPARATOR String pattern enabled try while true pattern tok next Token if pattern length 0 return enabled tok next Token global Ignore put pattern new Boolean enabled catch No Such Element Exception e return  readIgnoreState TeamException readBackwardCompatibleIgnoreState TeamPlugin getPlugin getPluginPreferences PREF_TEAM_IGNORES addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty PREF_TEAM_IGNORES globalIgnore prefIgnores getString PREF_TEAM_IGNORES StringTokenizer StringTokenizer prefIgnores PREF_TEAM_SEPARATOR nextToken nextToken globalIgnore NoSuchElementException
private static boolean read Backward Compatible Ignore State throws Team Exception String GLOBALIGNORE FILE global Ignores NON NLS 1 I Path plugin State Location Team Plugin get Plugin get State Location append GLOBALIGNORE FILE File f plugin State Location to File if f exists return false try Data Input Stream dis new Data Input Stream new File Input Stream f try int ignore Count 0 try ignore Count dis read Int catch EOF Exception e Ignore the exception it will occur if there are no ignore patterns stored in the provider state file return false for int i 0 i ignore Count i String pattern dis readUTF boolean enabled dis read Boolean global Ignore put pattern new Boolean enabled finally dis close f delete catch File Not Found Exception e not a fatal error there just happens not to be any state to read catch IO Exception ex throw new Team Exception new Status I Status ERROR Team Plugin ID 0 Policy bind Team read Error ex NON NLS 1 return true  readBackwardCompatibleIgnoreState TeamException GLOBALIGNORE_FILE globalIgnores IPath pluginStateLocation TeamPlugin getPlugin getStateLocation GLOBALIGNORE_FILE pluginStateLocation toFile DataInputStream DataInputStream FileInputStream ignoreCount ignoreCount readInt EOFException ignoreCount readBoolean globalIgnore FileNotFoundException IOException TeamException IStatus TeamPlugin readError
Resources Plugin get Workspace add Resource Change Listener new I Resource Change Listener public void resource Changed I Resource Change Event event I Resource Delta project Deltas event get Delta get Affected Children for int i 0 i project Deltas length i I Resource Delta delta project Deltas i I Resource resource delta get Resource Only consider project additions that are moves if delta get Kind I Resource Delta ADDED continue if delta get Flags I Resource Delta MOVED FROM 0 continue Only consider projects that have a provider if Repository Provider is Shared resource get Project continue Repository Provider provider Repository Provider get Provider resource get Project if provider null continue Only consider providers whose project is not mapped properly already if provider get Project equals resource get Project continue Tell the provider about it s new project provider set Project resource get Project  ResourcesPlugin getWorkspace addResourceChangeListener IResourceChangeListener resourceChanged IResourceChangeEvent IResourceDelta projectDeltas getDelta getAffectedChildren projectDeltas IResourceDelta projectDeltas IResource getResource getKind IResourceDelta getFlags IResourceDelta MOVED_FROM RepositoryProvider isShared getProject RepositoryProvider RepositoryProvider getProvider getProject getProject getProject setProject getProject
Initialize the registry restoring its state This method is called by the plug in upon startup clients should not call this method public static void startup throws Core Exception Register a delta listener that will tell the provider about a project move Resources Plugin get Workspace add Resource Change Listener new I Resource Change Listener public void resource Changed I Resource Change Event event I Resource Delta project Deltas event get Delta get Affected Children for int i 0 i project Deltas length i I Resource Delta delta project Deltas i I Resource resource delta get Resource Only consider project additions that are moves if delta get Kind I Resource Delta ADDED continue if delta get Flags I Resource Delta MOVED FROM 0 continue Only consider projects that have a provider if Repository Provider is Shared resource get Project continue Repository Provider provider Repository Provider get Provider resource get Project if provider null continue Only consider providers whose project is not mapped properly already if provider get Project equals resource get Project continue Tell the provider about it s new project provider set Project resource get Project I Resource Change Event POST CHANGE  CoreException ResourcesPlugin getWorkspace addResourceChangeListener IResourceChangeListener resourceChanged IResourceChangeEvent IResourceDelta projectDeltas getDelta getAffectedChildren projectDeltas IResourceDelta projectDeltas IResource getResource getKind IResourceDelta getFlags IResourceDelta MOVED_FROM RepositoryProvider isShared getProject RepositoryProvider RepositoryProvider getProvider getProject getProject getProject setProject getProject IResourceChangeEvent POST_CHANGE
Shut down the registry persisting its state This method is called by the plug in upon shutdown clients should not call this method public static void shutdown Team Plugin get Plugin save Plugin Preferences  TeamPlugin getPlugin savePluginPreferences
deprecated Use link org eclipse team core Repository Provider Type get Project Set Capability to obtain an instance of link Project Set Capability instead public static I Project Set Serializer get Project Set Serializer String id Team Plugin plugin Team Plugin get Plugin if plugin null I Extension Point extension plugin get Descriptor get Extension Point Team Plugin PROJECT SET EXTENSION if extension null I Extension extensions extension get Extensions for int i 0 i extensions length i I Configuration Element config Elements extensions i get Configuration Elements for int j 0 j config Elements length j String extension Id config Elements j get Attribute id NON NLS 1 if extension Id null extension Id equals id try return I Project Set Serializer config Elements j create Executable Extension class NON NLS 1 catch Core Exception e Team Plugin log e return null return null  RepositoryProviderType getProjectSetCapability ProjectSetCapability IProjectSetSerializer getProjectSetSerializer TeamPlugin TeamPlugin getPlugin IExtensionPoint getDescriptor getExtensionPoint TeamPlugin PROJECT_SET_EXTENSION IExtension getExtensions IConfigurationElement configElements getConfigurationElements configElements extensionId configElements getAttribute extensionId extensionId IProjectSetSerializer configElements createExecutableExtension CoreException TeamPlugin
private static Team Exception wrap Exception String message Core Exception e Multi Status status new Multi Status Team Plugin ID 0 message e status merge e get Status return new Team Exception status  TeamException wrapException CoreException MultiStatus MultiStatus TeamPlugin getStatus TeamException
private static String get File Extension String name if name null return null int index name last Index Of if index 1 return null if index name length 1 return NON NLS 1 return name substring index 1  getFileExtension lastIndexOf
Return the default ignore infos i e those that are specified in plugin manifests return the default ignore infos since 3 0 public static I Ignore Info get Default Ignores Sorted Map g Ignore new Tree Map Sorted Map p Ignore new Tree Map initialize Plugin Ignores p Ignore g Ignore return get Ignore Info g Ignore  IIgnoreInfo getDefaultIgnores SortedMap gIgnore TreeMap SortedMap pIgnore TreeMap initializePluginIgnores pIgnore gIgnore getIgnoreInfo gIgnore
Return the default file type bindings i e those that are specified in plugin manifests return the default file type bindings since 3 0 public static I File Type Info get Default Types Sorted Map g Types new Tree Map Sorted Map p Types new Tree Map initialize Plugin Patterns p Types g Types return get File Type Info g Types  IFileTypeInfo getDefaultTypes SortedMap gTypes TreeMap SortedMap pTypes TreeMap initializePluginPatterns pTypes gTypes getFileTypeInfo gTypes

Create a code Team Exception code which contains the given status object param status the status for this exception public Team Exception I Status status super status  TeamException TeamException IStatus
Create a code Team Exception code with an error status that contains the given message and throwable param message the message for the exception param e an associated exception since 3 0 public Team Exception String message Throwable e super new Status I Status ERROR Team Plugin ID 0 message e  TeamException TeamException IStatus TeamPlugin
Create a code Team Exception code with an error status that contains the given message param message the message for the exception public Team Exception String message this message null  TeamException TeamException
Create a code Team Exception code that wraps the given code Core Exception code param e a code Core Exception code since 3 0 protected Team Exception Core Exception e super as Status e  TeamException CoreException CoreException TeamException CoreException asStatus
private static Status as Status Core Exception e I Status status e get Status return new Status status get Severity status get Plugin status get Code status get Message e  asStatus CoreException IStatus getStatus getSeverity getPlugin getCode getMessage
Return a code Team Exception code for the given exception param e an exception return a code Team Exception code for the given exception since 3 0 public static Team Exception as Team Exception Core Exception e if e instanceof Team Exception return Team Exception e return new Team Exception e  TeamException TeamException TeamException asTeamException CoreException TeamException TeamException TeamException
Return a code Team Exception code for the given exception param e an exception return a code Team Exception code for the given exception since 3 0 public static Team Exception as Team Exception Invocation Target Exception e Throwable target e get Target Exception if target instanceof Team Exception return Team Exception target return new Team Exception new Status I Status ERROR Team Plugin ID UNABLE target get Message null target get Message target NON NLS 1  TeamException TeamException TeamException asTeamException InvocationTargetException getTargetException TeamException TeamException TeamException IStatus TeamPlugin getMessage getMessage

Create a new status object param severity the severity one of code OK code code ERROR code code INFO code or code WARNING code param plugin Id the unique identifier of the relevant plug in param code the plug in specific status code or code OK code param message a human readable message localized to the current locale param exception a low level exception or code null code if not applicable param resource the resource asociated with the exception public Team Status int severity String plugin Id int code String message Throwable exception I Resource resource super severity plugin Id code message exception if resource null this resource Resources Plugin get Workspace get Root else this resource resource  pluginId TeamStatus pluginId IResource pluginId ResourcesPlugin getWorkspace getRoot
Return the resource associated with this status return Returns the resource public I Resource get Resource return resource  IResource getResource

Refreshes the resource variant tree for the specified resources and possibly their descendants depending on the depth The default implementation of this method invokes code refresh I Resource int I Progress Monitor code for each resource Subclasses may override but should either invoke the above mentioned refresh or code collect Changes code in order to reconcile the resource variant tree param resources the resources whose variants should be refreshed param depth the depth of the refresh one of code I Resource DEPTH ZERO code code I Resource DEPTH ONE code or code I Resource DEPTH INFINITE code param monitor a progress monitor return the array of resources whose corresponding varianst have changed throws Team Exception public I Resource refresh I Resource resources int depth I Progress Monitor monitor throws Team Exception List changed Resources new Array List monitor begin Task null 100 resources length for int i 0 i resources length i I Resource resource resources i I Resource changed refresh resource depth Policy sub Monitor For monitor 100 changed Resources add All Arrays as List changed monitor done if changed Resources null return new I Resource 0 return I Resource changed Resources to Array new I Resource changed Resources size  IResource IProgressMonitor collectChanges IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE TeamException IResource IResource IProgressMonitor TeamException changedResources ArrayList beginTask IResource IResource subMonitorFor changedResources addAll asList changedResources IResource IResource changedResources toArray IResource changedResources
Helper method invoked from code refresh I Resource int I Progress Monitor monitor code for each resource The default implementation performs the following steps ol li get the resource variant handle corresponding to the local resource by calling code get Remote Tree code li pass the local resource and the resource variant handle to code collect Changes code ol Subclasses may override but should perform roughly the same steps param resource the resoure being refreshed param depth the depth of the refresh one of code I Resource DEPTH ZERO code code I Resource DEPTH ONE code or code I Resource DEPTH INFINITE code param monitor a progress monitor return the resource s whose variants have changed throws Team Exception protected I Resource refresh I Resource resource int depth I Progress Monitor monitor throws Team Exception I Resource changed Resources null monitor begin Task null 100 try monitor set Task Name Policy bind Synchronization Cache Refresh Operation 0 resource get Full Path make Relative to String NON NLS 1 build the remote tree only if an initial tree hasn t been provided I Resource Variant tree fetch Variant resource depth Policy sub Monitor For monitor 70 update the known remote handles I Progress Monitor sub Policy infinite Sub Monitor For monitor 30 try sub begin Task null 64 changed Resources collect Changes resource tree depth Policy sub Monitor For sub 64 finally sub done finally monitor done if changed Resources null return new I Resource 0 return changed Resources  IResource IProgressMonitor getRemoteTree collectChanges IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE TeamException IResource IResource IProgressMonitor TeamException IResource changedResources beginTask setTaskName SynchronizationCacheRefreshOperation getFullPath makeRelative toString IResourceVariant fetchVariant subMonitorFor IProgressMonitor infiniteSubMonitorFor beginTask changedResources collectChanges subMonitorFor changedResources IResource changedResources
Collect the changes in the remote tree to the specified depth param local the local resource being refreshed param remote the corresponding resource variant param depth the depth of the refresh one of code I Resource DEPTH ZERO code code I Resource DEPTH ONE code or code I Resource DEPTH INFINITE code param monitor a progress monitor return the resource s whose variants have changed throws Team Exception protected I Resource collect Changes I Resource local I Resource Variant remote int depth I Progress Monitor monitor throws Team Exception List changed Resources new Array List collect Changes local remote changed Resources depth monitor return I Resource changed Resources to Array new I Resource changed Resources size  IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE TeamException IResource collectChanges IResource IResourceVariant IProgressMonitor TeamException changedResources ArrayList collectChanges changedResources IResource changedResources toArray IResource changedResources
Fetch the members of the given resource variant handle This method may return members that were fetched when code fetch Variant code was called or may fetch the children directly i e this method may contact the server param variant the resource variant param progress a progress monitor return the members of the resource variant  fetchVariant
Fetch the resource variant corresponding to the given resource The depth parameter indicates the depth of the refresh operation and also indicates the depth to which the resource variant s desendants will be traversed This method may prefetch the descendants to the provided depth or may just return the variant handle corresponding to the given local resource in which case the descendant variants will be fetched by code fetch Members I Resource Variant I Progress Monitor code param resource the local resource param depth the depth of the refresh one of code I Resource DEPTH ZERO code code I Resource DEPTH ONE code or code I Resource DEPTH INFINITE code param monitor a progress monitor return the resource variant corresponding to the given local resource  fetchMembers IResourceVariant IProgressMonitor IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE
Method that is invoked during collection to let subclasses know which members were collected for the given resource Implementors should purge any cached state for children of the local resource that are no longer members Any such resources should be returned to allow clients to clear any state they maintain for those resources param local the local resource param members the collected members return any resources that were previously collected whose state has been flushed protected I Resource collected Members I Resource local I Resource members throws Team Exception return new I Resource 0  IResource collectedMembers IResource IResource TeamException IResource
Set the variant associated with the local resource to the newly fetched resource variant This method is invoked during change collection and should return whether the variant associated with the local resource has changed param local the local resource param remote the newly fetched resoure variant return code true code if the resource variant changed throws Team Exception  TeamException
private void collect Changes I Resource local I Resource Variant remote Collection changed Resources int depth I Progress Monitor monitor throws Team Exception boolean changed set Variant local remote if changed changed Resources add local if depth I Resource DEPTH ZERO return Map children merged Members local remote monitor for Iterator it children key Set iterator it has Next I Resource local Child I Resource it next I Resource Variant remote Child I Resource Variant children get local Child collect Changes local Child remote Child changed Resources depth I Resource DEPTH INFINITE I Resource DEPTH INFINITE I Resource DEPTH ZERO monitor I Resource cleared collected Members local I Resource children key Set to Array new I Resource children key Set size changed Resources add All Arrays as List cleared monitor worked 1  collectChanges IResource IResourceVariant changedResources IProgressMonitor TeamException setVariant changedResources IResource DEPTH_ZERO mergedMembers keySet hasNext IResource localChild IResource IResourceVariant remoteChild IResourceVariant localChild collectChanges localChild remoteChild changedResources IResource DEPTH_INFINITE IResource DEPTH_INFINITE IResource DEPTH_ZERO IResource collectedMembers IResource keySet toArray IResource keySet changedResources addAll asList
private Map merged Members I Resource local I Resource Variant remote I Progress Monitor progress throws Team Exception I Resource I Resource Variant Map merged Resources new Hash Map I Resource Variant remote Children if remote null remote Children new I Resource Variant 0 else remote Children fetch Members remote progress I Resource local Children members local if remote Children length 0 local Children length 0 Set all Set new Hash Set 20 Map local Set null Map remote Set null if local Children length 0 local Set new Hash Map 10 for int i 0 i local Children length i I Resource local Child local Children i String name local Child get Name local Set put name local Child all Set add name if remote Children length 0 remote Set new Hash Map 10 for int i 0 i remote Children length i I Resource Variant remote Child remote Children i String name remote Child get Name remote Set put name remote Child all Set add name Iterator e all Set iterator while e has Next String key Child Name String e next Policy check Canceled progress I Resource local Child local Set null I Resource local Set get key Child Name null I Resource Variant remote Child remote Set null I Resource Variant remote Set get key Child Name null if local Child null there has to be a remote resource available if we got this far Assert is True remote Child null boolean is Container remote Child is Container local Child get Resource Child local parent key Child Name is Container merged Resources put local Child remote Child return merged Resources  mergedMembers IResource IResourceVariant IProgressMonitor TeamException IResource IResourceVariant mergedResources HashMap IResourceVariant remoteChildren remoteChildren IResourceVariant remoteChildren fetchMembers IResource localChildren remoteChildren localChildren allSet HashSet localSet remoteSet localChildren localSet HashMap localChildren IResource localChild localChildren localChild getName localSet localChild allSet remoteChildren remoteSet HashMap remoteChildren IResourceVariant remoteChild remoteChildren remoteChild getName remoteSet remoteChild allSet allSet hasNext keyChildName checkCanceled IResource localChild localSet IResource localSet keyChildName IResourceVariant remoteChild remoteSet IResourceVariant remoteSet keyChildName localChild isTrue remoteChild isContainer remoteChild isContainer localChild getResourceChild keyChildName isContainer mergedResources localChild remoteChild mergedResources
private I Resource get Resource Child I Resource parent String child Name boolean is Container if parent get Type I Resource FILE return null if is Container return I Container parent get Folder new Path child Name else return I Container parent get File new Path child Name  IResource getResourceChild IResource childName isContainer getType IResource isContainer IContainer getFolder childName IContainer getFile childName

class Resource Variant Storage implements I Encoded Storage public Input Stream get Contents throws Core Exception if is Contents Cached The cache may have been cleared if someone held on to the storage too long throw new Team Exception Policy bind Cached Resource Variant 0 get Cache Path NON NLS 1 return get Cached Contents  ResourceVariantStorage IEncodedStorage InputStream getContents CoreException isContentsCached TeamException CachedResourceVariant getCachePath getCachedContents
return get Cached Contents public I Path get Full Path return get Full Path  getCachedContents IPath getFullPath getFullPath
return get Full Path public String get Name return Cached Resource Variant this get Name  getFullPath getName CachedResourceVariant getName
return Cached Resource Variant this get Name public boolean is Read Only return true  CachedResourceVariant getName isReadOnly
return true public Object get Adapter Class adapter return Cached Resource Variant this get Adapter adapter  getAdapter CachedResourceVariant getAdapter
public String get Charset throws Core Exception Input Stream contents get Contents try String char Set Team Plugin get Charset get Name contents return char Set catch IO Exception e throw new Team Exception new Status I Status ERROR Team Plugin ID I Resource Status FAILED DESCRIBING CONTENTS Policy bind Cached Resource Variant 1 get Full Path to String e NON NLS 1 finally try contents close catch IO Exception e1 Ignore  getCharset CoreException InputStream getContents charSet TeamPlugin getCharset getName charSet IOException TeamException IStatus TeamPlugin IResourceStatus FAILED_DESCRIBING_CONTENTS CachedResourceVariant getFullPath toString IOException
public I Storage get Storage I Progress Monitor monitor throws Team Exception if is Container return null ensure Contents Cached monitor if storage null storage new Resource Variant Storage return storage  IStorage getStorage IProgressMonitor TeamException isContainer ensureContentsCached ResourceVariantStorage
private void ensure Contents Cached I Progress Monitor monitor throws Team Exception Ensure that the contents are cached from the server if is Contents Cached fetch Contents monitor  ensureContentsCached IProgressMonitor TeamException isContentsCached fetchContents
Method that is invoked when the contents of the resource variant need to be fetched This method will only be invoked for files i e code is Container code returns code false code Subclasses should override this method and invoke code set Contents code with a stream containing the fetched contents param monitor a progress monitor  isContainer setContents
This method should be invoked by subclasses from within their code fetch Contents code method in order to cache the contents for this resource variant p This method is not intended to be overridden by clients param stream the stream containing the contents of the resource variant param monitor a progress monitor throws Team Exception protected void set Contents Input Stream stream I Progress Monitor monitor throws Team Exception Ensure that there is a cache entry to receive the contents Assert is True is Container if is Handle Cached cache Handle get Cache Entry set Contents stream monitor  fetchContents TeamException setContents InputStream IProgressMonitor TeamException isTrue isContainer isHandleCached cacheHandle getCacheEntry setContents
private Resource Variant Cache Entry get Cache Entry return get Cache get Cache Entry this get Cache Path  ResourceVariantCacheEntry getCacheEntry getCache getCacheEntry getCachePath
Return whether there are already contents cached for this resource variant This method will return code false code even if the contents are currently being cached by another thread The consequence of this is that the contents may be fetched twice in the rare case where two threads request the same contents concurrently For containers this method will always return code false code p This method is not intended to be overridden by clients protected boolean is Contents Cached if is Container is Handle Cached return false Resource Variant Cache Entry entry get Cache get Cache Entry get Cache Path return entry get State Resource Variant Cache Entry READY  isContentsCached isContainer isHandleCached ResourceVariantCacheEntry getCache getCacheEntry getCachePath getState ResourceVariantCacheEntry
Return the cached contents for this resource variant or code null code if the contents have not been cached For containers this method will always return code null code p This method is not intended to be overridden by clients return the cached contents or code null code throws Team Exception protected Input Stream get Cached Contents throws Team Exception if is Container is Contents Cached return null return get Cache get Cache Entry get Cache Path get Contents  TeamException InputStream getCachedContents TeamException isContainer isContentsCached getCache getCacheEntry getCachePath getContents
Return code true code if the cache contains an entry for this resource variant It is possible that another instance of this variant is cached To get the cached instance call code get Cached Handle code Note that cached contents can be retrieved from any handle to a resource variant whose cache path as returned by code get Cache Path code match but other state information may only be accessible from the cached copy p This method is not intended to be overridden by clients return whether the variant is cached protected boolean is Handle Cached return get Cache has Entry get Cache Path  getCachedHandle getCachePath isHandleCached getCache hasEntry getCachePath
Get the path that uniquely identifies the remote resource variant This path descibes the remote location where the remote resource is stored and also uniquely identifies each resource variant It is used to uniquely identify this resource variant when it is stored in the resource variant cache return the full path of the remote resource variant 
Return the size in bytes of the contents of this resource variant The method will return 0 if the contents have not yet been cached locally For containers this method will always return 0 public long get Size if is Container is Contents Cached return 0 Resource Variant Cache Entry entry get Cache Entry if entry null entry get State Resource Variant Cache Entry READY return 0 return entry get Size  getSize isContainer isContentsCached ResourceVariantCacheEntry getCacheEntry getState ResourceVariantCacheEntry getSize
return Returns the cache private Resource Variant Cache get Cache Resource Variant Cache enable Caching get Cache Id return Resource Variant Cache get Cache get Cache Id  ResourceVariantCache getCache ResourceVariantCache enableCaching getCacheId ResourceVariantCache getCache getCacheId
Return the ID that uniquely identifies the cache in which this resource variant is to be cache The ID of the plugin that provides the resource variant subclass is a good candidate for this ID The creation management and disposal of the cache is managed by Team return the cache ID 
Return the cached handle for this resource variant if there is one If there isn t one then code null code is returned If there is no cached handle and one is desired then code cache Handle code should be called p This method is not intended to be overridden by clients return a cached copy of this resource variant or code null code protected Cached Resource Variant get Cached Handle Resource Variant Cache Entry entry get Cache Entry if entry null return null return entry get Resource Variant  cacheHandle CachedResourceVariant getCachedHandle ResourceVariantCacheEntry getCacheEntry getResourceVariant
Cache this handle in the cache replacing any previously cached handle Note that caching this handle will replace any state associated with a previously cached handle if there is one but the contents will remain The reason for this is the assumption that the cache path for a resource variant as returned by code get Cache Path code identifies an immutable resource version or revision The ability to replace the handle itself is provided so that additional state may be cached before or after the contents are fetched p This method is not intended to be overridden by clients protected void cache Handle get Cache add get Cache Path this  getCachePath cacheHandle getCache getCachePath

Answers the name of the remote resource The name may be displayed to the user return name of the resource variant 
Answers if the remote resource may have children return code true code if the remote resource may have children and code false code otherwise 
Return an instance of I Storage or code null code if the remote resource does not have contents i e is a folder Since the code I Sorage get Contents code method does not accept an code I Progress Monitor code this method must ensure that the contents access by the resulting code I Storage code is cached locally hence the code I Progress Monitor code argument to this method Implementations of this method should ensure that the resulting code I Storage code is accessing locally cached contents and is not contacting the server p The returned storage object may be an instance of link org eclipse core resources I Encoded Storage in which case clients can determine the character encoding of the contents return an code I Storage code that provides access to the contents of the remote resource or code null code if the remote resource is a container  IStorage ISorage getContents IProgressMonitor IStorage IProgressMonitor IStorage IEncodedStorage IStorage
Return a content identifier that is used to differentiate versions or revisions of the same resource return a String that identifies the version of the subscriber resource throws Team Exception  TeamException
Return an array of bytes that can be used to uniquely identify this resource variant when compared to other resource variants and could also potentially be used to recreate a resource variant handle return the bytes that uniquely identify this resource variant 
Returns whether the remote resource is equal to the provided object param object the object to be compared return whether the object is equal to the remote resource 

Returns code true code if the local resource matches the remote resource based on this criteria and code false code otherwise Comparing should be fast and based on cached information param resource the local resource to be compared param remote the remote resources to be compared return code true code if local and remote are equal based on this criteria and code false code otherwise 
Returns code true code if the base resource matches the remote resource based on this criteria and code false code otherwise Comparing should be fast and based on cached information param base the base resource to be compared param remote the remote resources to be compared return code true code if base and remote are equal based on this criteria and code false code otherwise 
Answers code true code if the base tree is maintained by this comparator s subscriber If the base tree is not considered than the subscriber can be considered as not supported three way comparisons Instead comparisons are made between the local and remote only without consideration for the base 

Returns the list of root resources for which this tree may have resource variants return the list of root resources 
Returns the members of the local resource that have resource variants in this tree The members may or may not exist locally The resource variants corresponding to the members can be retrieved using code get Resource Variant I Resource code param resource the local resource return the members of the local resource for which this tree contains resource variants throws Team Exception  getResourceVariant IResource TeamException
Return the resource variant corresponding to the local resource Return code null code if there is no variant for the resource param resource the local resource return the resource s variant in this tree throws Team Exception  TeamException
Return whether the local resource has a variant in this tree param resource the local resource return code true code if the tree contains a variant for the resource throws Team Exception  TeamException
Refreshes the resource variant tree for the specified resources and possibly their descendants depending on the depth param resources the resources whose variants should be refreshed param depth the depth of the refresh one of code I Resource DEPTH ZERO code code I Resource DEPTH ONE code or code I Resource DEPTH INFINITE code param monitor a progress monitor return the array of resources whose corresponding variants have changed as a result of the refresh throws Team Exception public I Resource refresh I Resource resources int depth  IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE TeamException IResource IResource
Flush any variants in the tree for the given resource to the depth specified param resource the resource param depth the flush depth one of code I Resource DEPTH ZERO code code I Resource DEPTH ONE code or code I Resource DEPTH INFINITE code  IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE

Notification of synchronization state changes for the given resources Clients must query the code Three Way Synchronizer code that generated this event to determine the new synchronization state param resources the resources whose synchronization state has changed  ThreeWaySynchronizer

Create a persistant tree that uses the given qualified name as the key in the code org eclipse core resources I Synchronizer code It must be unique and should use the plugin as the local name and a unique id within the plugin as the qualifier name param name the key used in the Core synchronizer public Persistant Resource Variant Byte Store Qualified Name name sync Name name get Synchronizer add sync Name  ISynchronizer PersistantResourceVariantByteStore QualifiedName syncName getSynchronizer syncName
see org eclipse team core variants Resource Variant Byte Store dispose public void dispose get Synchronizer remove get Sync Name  ResourceVariantByteStore getSynchronizer getSyncName
Return the qualified name that uniquely identifies this tree return the qwualified name that uniquely identifies this tree public Qualified Name get Sync Name return sync Name  QualifiedName getSyncName syncName
public byte get Bytes I Resource resource throws Team Exception byte sync Bytes internal Get Sync Bytes resource if sync Bytes null equals sync Bytes NO REMOTE If it is known that there is no remote return null return null return sync Bytes  getBytes IResource TeamException syncBytes internalGetSyncBytes syncBytes syncBytes NO_REMOTE syncBytes
public boolean set Bytes I Resource resource byte bytes throws Team Exception Assert is Not Null bytes byte old Bytes internal Get Sync Bytes resource if old Bytes null equals old Bytes bytes return false try get Synchronizer set Sync Info get Sync Name resource bytes return true catch Core Exception e throw Team Exception as Team Exception e  setBytes IResource TeamException isNotNull oldBytes internalGetSyncBytes oldBytes oldBytes getSynchronizer setSyncInfo getSyncName CoreException TeamException asTeamException
public boolean flush Bytes I Resource resource int depth throws Team Exception if resource exists resource is Phantom try if depth I Resource DEPTH ZERO internal Get Sync Bytes resource null get Synchronizer flush Sync Info get Sync Name resource depth return true catch Core Exception e throw Team Exception as Team Exception e return false  flushBytes IResource TeamException isPhantom IResource DEPTH_ZERO internalGetSyncBytes getSynchronizer flushSyncInfo getSyncName CoreException TeamException asTeamException
Return whether the resource variant state for this resource is known This is used to differentiate the case where a resource variant has never been fetched from the case where the resource variant is known to not exist In the later case this method returns code true code while code get Bytes code returns code null code param resource the local resource return whether the resource variant state for this resource is known throws Team Exception public boolean is Variant Known I Resource resource throws Team Exception return internal Get Sync Bytes resource null  getBytes TeamException isVariantKnown IResource TeamException internalGetSyncBytes
This method should be invoked by a client to indicate that it is known that there is no remote resource associated with the local resource After this method is invoked code is Variant Known resource code will return code true code and code get Bytes resource code will return code null code return code true code if this changes the remote sync bytes public boolean delete Bytes I Resource resource throws Team Exception return set Bytes resource NO REMOTE  isVariantKnown getBytes deleteBytes IResource TeamException setBytes NO_REMOTE
public I Resource members I Resource resource throws Team Exception if resource get Type I Resource FILE return new I Resource 0 try Filter and return only resources that have sync bytes in the cache I Resource members I Container resource members true include phantoms List filtered Members new Array List members length for int i 0 i members length i I Resource member members i if get Bytes member null filtered Members add member return I Resource filtered Members to Array new I Resource filtered Members size catch Core Exception e throw Team Exception as Team Exception e  IResource IResource TeamException getType IResource IResource IResource IContainer filteredMembers ArrayList IResource getBytes filteredMembers IResource filteredMembers toArray IResource filteredMembers CoreException TeamException asTeamException
private I Synchronizer get Synchronizer return Resources Plugin get Workspace get Synchronizer  ISynchronizer getSynchronizer ResourcesPlugin getWorkspace getSynchronizer
private byte internal Get Sync Bytes I Resource resource throws Team Exception try return get Synchronizer get Sync Info get Sync Name resource catch Core Exception e throw Team Exception as Team Exception e  internalGetSyncBytes IResource TeamException getSynchronizer getSyncInfo getSyncName CoreException TeamException asTeamException
public void run I Resource root I Workspace Runnable runnable I Progress Monitor monitor throws Team Exception try Resources Plugin get Workspace run runnable root 0 monitor catch Core Exception e throw Team Exception as Team Exception e  IResource IWorkspaceRunnable IProgressMonitor TeamException ResourcesPlugin getWorkspace CoreException TeamException asTeamException

public abstract class Resource Variant Byte Store Dispose of any cached sync bytes when this cache is no longer needed public abstract void dispose  ResourceVariantByteStore
Return the bytes for the variant corresponding the given local resource A return value of code null code means that no bytes have been stored for the resource variant It is up to the client to determine whether this means that the resource variant does not exist or that it has not been fetched or otherwise determined yet param resource the local resource return the bytes that represent the resource s variant throws Team Exception  TeamException
Set the bytes for the variant corresponding the given local resource The bytes should never be code null code If it is known that the remote does not exist code delete Bytes I Resource code should be used instead If the sync bytes for the remote are stale and should be removed code flush Bytes I Resouce int code should be called param resource the local resource param bytes the bytes that represent the resource s variant return code true code if the bytes changed throws Team Exception  deleteBytes IResource flushBytes IResouce TeamException
Remove the bytes from the tree for the resource variants corresponding to the given local resource and its descendants to the given depth After the bytes are removed code get Bytes resource code will return code null code for the affected resources param resource the local resource param depth the depth of the operation one of code I Resource DEPTH ZERO code code I Resource DEPTH ONE code or code I Resource DEPTH INFINITE code return code true code if there were bytes present which were removed throws Team Exception  getBytes IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE TeamException
Method called to indicate that it is known that there is no variant associated with the local resource Subclasses may handle this information in different ways The code flush I Resource int code method should be used in the cases where a client wishes to remove bytes for other reason param resource the local resource return code true code if this changes the bytes for the variant  IResource
Return the children of the given resource that have resource variants in this tree param resource the parent resource return the members who have resource variants in this tree 
Helper method to compare two byte arrays for equality param sync Bytes1 the first byte array or code null code param sync Bytes2 the second byte array or code null code return whetehr the two arrays are equal i e same content protected boolean equals byte sync Bytes1 byte sync Bytes2 if sync Bytes1 null return sync Bytes2 null else if sync Bytes2 null return false if sync Bytes1 length sync Bytes2 length return false for int i 0 i sync Bytes1 length i if sync Bytes1 i sync Bytes2 i return false return true  syncBytes1 syncBytes2 syncBytes1 syncBytes2 syncBytes1 syncBytes2 syncBytes2 syncBytes1 syncBytes2 syncBytes1 syncBytes1 syncBytes2
Run the given action which may contain multiple modfications to the byte store By default the action is run Subclasses may override to obtain scheduling rules or batch deltas if the byte store modifies workspace resources param root the root resource for all modifications param action the action to perform param monitor a progress monitor exception Core Exception if the operation failed exception Operation Canceled Exception if the operation is canceled public void run I Resource root I Workspace Runnable runnable I Progress Monitor monitor throws Team Exception try runnable run monitor catch Core Exception e throw Team Exception as Team Exception e  CoreException OperationCanceledException IResource IWorkspaceRunnable IProgressMonitor TeamException CoreException TeamException asTeamException

Create a resource variant tree that uses the provided byte store to cache the resource variant bytes param store the resource variant byte store used to cahe resource variants protected Resource Variant Tree Resource Variant Byte Store store this store store  ResourceVariantTree ResourceVariantByteStore
see org eclipse team core variants I Resource Variant Tree members org eclipse core resources I Resource public I Resource members I Resource resource throws Team Exception return get Byte Store members resource  IResourceVariantTree IResource IResource IResource TeamException getByteStore
see org eclipse team core variants I Resource Variant Tree has Resource Variant org eclipse core resources I Resource public boolean has Resource Variant I Resource resource throws Team Exception return get Byte Store get Bytes resource null  IResourceVariantTree hasResourceVariant IResource hasResourceVariant IResource TeamException getByteStore getBytes
see org eclipse team core variants I Resource Variant Tree flush Variants org eclipse core resources I Resource int public void flush Variants I Resource resource int depth throws Team Exception get Byte Store flush Bytes resource depth  IResourceVariantTree flushVariants IResource flushVariants IResource TeamException getByteStore flushBytes
protected boolean set Variant I Resource local I Resource Variant remote throws Team Exception Resource Variant Byte Store cache get Byte Store byte new Remote Bytes get Bytes local remote boolean changed if new Remote Bytes null changed cache delete Bytes local else changed cache set Bytes local new Remote Bytes return changed  setVariant IResource IResourceVariant TeamException ResourceVariantByteStore getByteStore newRemoteBytes getBytes newRemoteBytes deleteBytes setBytes newRemoteBytes
Get the byte store that is used to cache the serialization bytes for the resource variants of this tree A byte store is used to reduce the memory footprint of the tree p This method is not intended to be overriden by subclasses return the resource variant tree that is being refreshed protected Resource Variant Byte Store get Byte Store return store  ResourceVariantByteStore getByteStore
Get the bytes to be stored in the code Resource Variant Byte Store code from the given resource variant By default the code I Resource Variant as Bytes code method is used to get the bytes param local the local resource param remote the corresponding resource variant handle return the bytes for the resource variant protected byte get Bytes I Resource local I Resource Variant remote throws Team Exception if remote null return null return remote as Bytes  ResourceVariantByteStore IResourceVariant asBytes getBytes IResource IResourceVariant TeamException asBytes
final I Resource resources new I Resource null get Byte Store run local new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception resources 0 Resource Variant Tree super collect Changes local remote depth monitor  IResource IResource getByteStore IWorkspaceRunnable IProgressMonitor CoreException ResourceVariantTree collectChanges
protected I Resource collect Changes final I Resource local final I Resource Variant remote final int depth I Progress Monitor monitor throws Team Exception final I Resource resources new I Resource null get Byte Store run local new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception resources 0 Resource Variant Tree super collect Changes local remote depth monitor monitor return resources 0  IResource collectChanges IResource IResourceVariant IProgressMonitor TeamException IResource IResource getByteStore IWorkspaceRunnable IProgressMonitor CoreException ResourceVariantTree collectChanges

public Sync Info get Sync Info I Resource resource throws Team Exception if is Supervised resource return null I Resource Variant remote Resource get Remote Tree get Resource Variant resource I Resource Variant base Resource if get Resource Comparator is Three Way base Resource get Base Tree get Resource Variant resource else base Resource null return get Sync Info resource base Resource remote Resource  SyncInfo getSyncInfo IResource TeamException isSupervised IResourceVariant remoteResource getRemoteTree getResourceVariant IResourceVariant baseResource getResourceComparator isThreeWay baseResource getBaseTree getResourceVariant baseResource getSyncInfo baseResource remoteResource
Method that creates an instance of Sync Info for the provided local base and remote resource variants Can be overiden by subclasses param local the local resource param base the base resource variant or code null code param remote the remote resource variant or code null code return the code Sync Info code containing the provided resources protected Sync Info get Sync Info I Resource local I Resource Variant base I Resource Variant remote throws Team Exception Sync Info info new Sync Info local base remote this get Resource Comparator info init return info  SyncInfo SyncInfo SyncInfo getSyncInfo IResource IResourceVariant IResourceVariant TeamException SyncInfo SyncInfo getResourceComparator
public I Resource members I Resource resource throws Team Exception if resource get Type I Resource FILE return new I Resource 0 try Set all Members new Hash Set try all Members add All Arrays as List I Container resource members catch Core Exception e if e get Status get Code I Resource Status RESOURCE NOT FOUND The resource is no longer exists so ignore the exception else throw e all Members add All Arrays as List internal Members get Remote Tree resource if get Resource Comparator is Three Way all Members add All Arrays as List internal Members get Base Tree resource for Iterator iterator all Members iterator iterator has Next I Resource member I Resource iterator next if member exists get Remote Tree has Resource Variant member Remove deletion conflicts iterator remove else if is Supervised resource Remove unsupervised resources iterator remove return I Resource all Members to Array new I Resource all Members size catch Core Exception e throw Team Exception as Team Exception e  IResource IResource TeamException getType IResource IResource allMembers HashSet allMembers addAll asList IContainer CoreException getStatus getCode IResourceStatus RESOURCE_NOT_FOUND allMembers addAll asList internalMembers getRemoteTree getResourceComparator isThreeWay allMembers addAll asList internalMembers getBaseTree allMembers hasNext IResource IResource getRemoteTree hasResourceVariant isSupervised IResource allMembers toArray IResource allMembers CoreException TeamException asTeamException
public void refresh I Resource resources int depth I Progress Monitor monitor throws Team Exception monitor Policy monitor For monitor List errors new Array List try monitor begin Task null 1000 resources length for int i 0 i resources length i I Resource resource resources i I Status status refresh resource depth Policy sub Monitor For monitor 1000 if status isOK errors add status finally monitor done if errors is Empty int num Success resources length errors size throw new Team Exception new Multi Status Team Plugin ID 0 I Status errors to Array new I Status errors size Policy bind Resource Variant Tree Subscriber 1 new Object get Name Integer to String num Success Integer to String resources length null NON NLS 1  IResource IProgressMonitor TeamException monitorFor ArrayList beginTask IResource IStatus subMonitorFor isEmpty numSuccess TeamException MultiStatus TeamPlugin IStatus toArray IStatus ResourceVariantTreeSubscriber getName toString numSuccess toString
Return the base resource variant tree protected abstract I Resource Variant Tree get Base Tree  IResourceVariantTree getBaseTree
protected abstract I Resource Variant Tree get Base Tree Return the remote resource variant tree protected abstract I Resource Variant Tree get Remote Tree  IResourceVariantTree getBaseTree IResourceVariantTree getRemoteTree
private I Status refresh I Resource resource int depth I Progress Monitor monitor monitor Policy monitor For monitor try monitor begin Task null 100 Set all Changes new Hash Set if get Resource Comparator is Three Way I Resource base Changes get Base Tree refresh new I Resource resource depth Policy sub Monitor For monitor 25 all Changes add All Arrays as List base Changes I Resource remote Changes get Remote Tree refresh new I Resource resource depth Policy sub Monitor For monitor 75 all Changes add All Arrays as List remote Changes I Resource changed Resources I Resource all Changes to Array new I Resource all Changes size fire Team Resource Change Subscriber Change Event as Sync Changed Deltas this changed Resources return Status OK STATUS catch Team Exception e return new Team Status I Status ERROR Team Plugin ID 0 Policy bind Resource Variant Tree Subscriber 2 resource get Full Path to String e get Message e resource NON NLS 1 finally monitor done  IStatus IResource IProgressMonitor monitorFor beginTask allChanges HashSet getResourceComparator isThreeWay IResource baseChanges getBaseTree IResource subMonitorFor allChanges addAll asList baseChanges IResource remoteChanges getRemoteTree IResource subMonitorFor allChanges addAll asList remoteChanges IResource changedResources IResource allChanges toArray IResource allChanges fireTeamResourceChange SubscriberChangeEvent asSyncChangedDeltas changedResources OK_STATUS TeamException TeamStatus IStatus TeamPlugin ResourceVariantTreeSubscriber getFullPath toString getMessage
private I Resource internal Members I Resource Variant Tree tree I Resource resource throws Team Exception Core Exception Filter and return only phantoms associated with the remote synchronizer I Resource members try members tree members resource catch Core Exception e if is Supervised resource e get Status get Code I Resource Status RESOURCE NOT FOUND The resource is no longer supervised or doesn t exist in any form so ignore the exception and return that there are no members return new I Resource 0 throw e return members  IResource internalMembers IResourceVariantTree IResource TeamException CoreException IResource CoreException isSupervised getStatus getCode IResourceStatus RESOURCE_NOT_FOUND IResource

see org eclipse team core variants Resource Variant Byte Store delete Bytes org eclipse core resources I Resource public boolean delete Bytes I Resource resource throws Team Exception return flush Bytes resource I Resource DEPTH ZERO  ResourceVariantByteStore deleteBytes IResource deleteBytes IResource TeamException flushBytes IResource DEPTH_ZERO
see org eclipse team core variants Resource Variant Byte Store dispose public void dispose sync Bytes Cache clear members Cache clear  ResourceVariantByteStore syncBytesCache membersCache
public boolean flush Bytes I Resource resource int depth throws Team Exception if get Sync Bytes Cache contains Key resource if depth I Resource DEPTH ZERO I Resource members members resource for int i 0 i members length i I Resource child members i flush Bytes child depth I Resource DEPTH INFINITE I Resource DEPTH INFINITE I Resource DEPTH ZERO get Sync Bytes Cache remove resource internal Remove From Parent resource return true return false  flushBytes IResource TeamException getSyncBytesCache containsKey IResource DEPTH_ZERO IResource IResource flushBytes IResource DEPTH_INFINITE IResource DEPTH_INFINITE IResource DEPTH_ZERO getSyncBytesCache internalRemoveFromParent
public byte get Bytes I Resource resource throws Team Exception byte sync Bytes internal Get Sync Bytes resource if sync Bytes null equals sync Bytes NO REMOTE If it is known that there is no remote return null return null return sync Bytes  getBytes IResource TeamException syncBytes internalGetSyncBytes syncBytes syncBytes NO_REMOTE syncBytes
Return code true code if no bytes are contained in this tree return code true code if no bytes are contained in this tree public boolean is Empty return sync Bytes Cache is Empty  isEmpty syncBytesCache isEmpty
public I Resource members I Resource resource List members List members Cache get resource if members null return new I Resource 0 return I Resource members to Array new I Resource members size  IResource IResource membersCache IResource IResource toArray IResource
public boolean set Bytes I Resource resource byte bytes throws Team Exception Assert is Not Null bytes byte old Bytes internal Get Sync Bytes resource if old Bytes null equals old Bytes bytes return false internal Set Sync Info resource bytes return true  setBytes IResource TeamException isNotNull oldBytes internalGetSyncBytes oldBytes oldBytes internalSetSyncInfo
private Map get Sync Bytes Cache return sync Bytes Cache  getSyncBytesCache syncBytesCache
private void internal Add To Parent I Resource resource I Container parent resource get Parent if parent null return List members List members Cache get parent if members null members new Array List members Cache put parent members members add resource  internalAddToParent IResource IContainer getParent membersCache ArrayList membersCache
private byte internal Get Sync Bytes I Resource resource return byte get Sync Bytes Cache get resource  internalGetSyncBytes IResource getSyncBytesCache
private void internal Remove From Parent I Resource resource I Container parent resource get Parent List members List members Cache get parent if members null members remove resource if members is Empty members Cache remove parent  internalRemoveFromParent IResource IContainer getParent membersCache isEmpty membersCache
private void internal Set Sync Info I Resource resource byte bytes get Sync Bytes Cache put resource bytes internal Add To Parent resource  internalSetSyncInfo IResource getSyncBytesCache internalAddToParent

static class Remote Resource Variant Byte Store extends Resource Variant Byte Store private Three Way Synchronizer synchronizer public Remote Resource Variant Byte Store Three Way Synchronizer synchronizer this synchronizer synchronizer  RemoteResourceVariantByteStore ResourceVariantByteStore ThreeWaySynchronizer RemoteResourceVariantByteStore ThreeWaySynchronizer
this synchronizer synchronizer public void dispose Nothing to do as contents are owned by the Target Synchronizer  TargetSynchronizer
Nothing to do as contents are owned by the Target Synchronizer public byte get Bytes I Resource resource throws Team Exception return get Synchronizer get Remote Bytes resource  TargetSynchronizer getBytes IResource TeamException getSynchronizer getRemoteBytes
return get Synchronizer get Remote Bytes resource public boolean set Bytes I Resource resource byte bytes throws Team Exception return get Synchronizer set Remote Bytes resource bytes  getSynchronizer getRemoteBytes setBytes IResource TeamException getSynchronizer setRemoteBytes
public boolean flush Bytes I Resource resource int depth throws Team Exception This method is invoked when the remote bytes are stale and should be removed This is handled by the Three Way Synchronizer so nothing needs to be done here return false  flushBytes IResource TeamException ThreeWaySynchronizer
return false public boolean is Variant Known I Resource resource throws Team Exception return get Synchronizer has Sync Bytes resource  isVariantKnown IResource TeamException getSynchronizer hasSyncBytes
return get Synchronizer has Sync Bytes resource public boolean delete Bytes I Resource resource throws Team Exception return get Synchronizer remove Remote Bytes resource  getSynchronizer hasSyncBytes deleteBytes IResource TeamException getSynchronizer removeRemoteBytes
return get Synchronizer remove Remote Bytes resource public I Resource members I Resource resource throws Team Exception return synchronizer members resource  getSynchronizer removeRemoteBytes IResource IResource TeamException
return synchronizer members resource private Three Way Synchronizer get Synchronizer return synchronizer  ThreeWaySynchronizer getSynchronizer
Create a remote resource variant tree that stores and obtains it s bytes from the remote slot of the synchronizer of the given subscriber param subscriber a three way subscriber public Three Way Remote Tree Three Way Subscriber subscriber super new Remote Resource Variant Byte Store subscriber get Synchronizer this subscriber subscriber  ThreeWayRemoteTree ThreeWaySubscriber RemoteResourceVariantByteStore getSynchronizer
see org eclipse team internal core subscribers caches I Resource Variant Tree roots public I Resource roots return get Subscriber roots  IResourceVariantTree IResource getSubscriber
see org eclipse team internal core subscribers caches I Resource Variant Tree get Resource Variant org eclipse core resources I Resource public I Resource Variant get Resource Variant I Resource resource throws Team Exception return get Subscriber get Resource Variant resource get Byte Store get Bytes resource  IResourceVariantTree getResourceVariant IResource IResourceVariant getResourceVariant IResource TeamException getSubscriber getResourceVariant getByteStore getBytes
Return the subscriber associated with this resource variant tree return the subscriber associated with this resource variant tree protected Three Way Subscriber get Subscriber return subscriber  ThreeWaySubscriber getSubscriber
final I Resource resources new I Resource null get Subscriber get Synchronizer run local new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception resources 0 Three Way Remote Tree super collect Changes local remote depth monitor  IResource IResource getSubscriber getSynchronizer IWorkspaceRunnable IProgressMonitor CoreException ThreeWayRemoteTree collectChanges
protected I Resource collect Changes final I Resource local final I Resource Variant remote final int depth I Progress Monitor monitor throws Team Exception final I Resource resources new I Resource null get Subscriber get Synchronizer run local new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception resources 0 Three Way Remote Tree super collect Changes local remote depth monitor monitor return resources 0  IResource collectChanges IResource IResourceVariant IProgressMonitor TeamException IResource IResource getSubscriber getSynchronizer IWorkspaceRunnable IProgressMonitor CoreException ThreeWayRemoteTree collectChanges

Create a three way resource comparator that uses the code Three Way Synchronizer code to compare a local resource to a resource variant param synchronizer public Three Way Resource Comparator Three Way Synchronizer synchronizer this synchronizer synchronizer  ThreeWaySynchronizer ThreeWayResourceComparator ThreeWaySynchronizer
public boolean compare I Resource local I Resource Variant remote First ensure the resources are the same gender if local get Type I Resource FILE remote is Container return false try If the file is locally modified it cannot be in sync if local get Type I Resource FILE get Synchronizer is Locally Modified local return false If there is no base the local cannopt match the remote if get Synchronizer get Base Bytes local null return false Otherwise assume they are the same if the remote equals the base return equals get Synchronizer get Base Bytes local get Bytes remote catch Team Exception e Team Plugin log e return false  IResource IResourceVariant getType IResource isContainer getType IResource getSynchronizer isLocallyModified getSynchronizer getBaseBytes getSynchronizer getBaseBytes getBytes TeamException TeamPlugin
public boolean compare I Resource Variant base I Resource Variant remote byte bytes1 get Bytes base byte bytes2 get Bytes remote return equals bytes1 bytes2  IResourceVariant IResourceVariant getBytes getBytes
see org eclipse team core variants I Resource Variant Comparator is Three Way public boolean is Three Way return true  IResourceVariantComparator isThreeWay isThreeWay
private Three Way Synchronizer get Synchronizer return synchronizer  ThreeWaySynchronizer getSynchronizer
private byte get Bytes I Resource Variant remote return remote as Bytes  getBytes IResourceVariant asBytes
private boolean equals byte sync Bytes byte old Bytes if sync Bytes length old Bytes length return false for int i 0 i old Bytes length i if old Bytes i sync Bytes i return false return true  syncBytes oldBytes syncBytes oldBytes oldBytes oldBytes syncBytes

Create a three way subscriber that uses the given synchronizer to manage the synchronization state of local resoures and their variants param synchronizer the three way synchronizer for this subscriber protected Three Way Subscriber Three Way Synchronizer synchronizer this synchronizer synchronizer base Tree new Three Way Base Tree this get Synchronizer add Listener this  ThreeWaySubscriber ThreeWaySynchronizer baseTree ThreeWayBaseTree getSynchronizer addListener
see org eclipse team core variants Resource Variant Tree Subscriber get Base Tree protected final I Resource Variant Tree get Base Tree return base Tree  ResourceVariantTreeSubscriber getBaseTree IResourceVariantTree getBaseTree baseTree
protected final I Resource Variant Tree get Remote Tree if remote Tree null remote Tree create Remote Tree return remote Tree  IResourceVariantTree getRemoteTree remoteTree remoteTree createRemoteTree remoteTree
public final I Resource Variant Comparator get Resource Comparator if comparator null comparator new Three Way Resource Comparator this get Synchronizer return comparator  IResourceVariantComparator getResourceComparator ThreeWayResourceComparator getSynchronizer
see org eclipse team core variants I Synchronizer Change Listener sync State Changed org eclipse core resources I Resource public void sync State Changed I Resource resources fire Team Resource Change Subscriber Change Event as Sync Changed Deltas this resources  ISynchronizerChangeListener syncStateChanged IResource syncStateChanged IResource fireTeamResourceChange SubscriberChangeEvent asSyncChangedDeltas
Returns code false code for resources that are not children of a subscriber root are ignored by the subscriber s synchronizer or are ignored by the code Team ignore Hist I Resource code Returns code true code otherwise see org eclipse team core subscribers Subscriber is Supervised I Resource public boolean is Supervised I Resource resource throws Team Exception if is Child Of Root resource return false if get Synchronizer is Ignored resource return false if Team is Ignored Hint resource return false return true  ignoreHist IResource isSupervised IResource isSupervised IResource TeamException isChildOfRoot getSynchronizer isIgnored isIgnoredHint
Return the three way sychronizer of this subscriber return the three way sychronizer of this subscriber public Three Way Synchronizer get Synchronizer return synchronizer  ThreeWaySynchronizer getSynchronizer
Create the resource variant for the given local resource from the given bytes The bytes are those that were previously returned from a call to code I Resource Variant as Bytes code param resource the local resource param bytes the bytes that identify a variant of the resource return the resouce variant handle recreated from the bytes throws Team Exception  IResourceVariant asBytes TeamException
Create the three way remote tree which provides access to the remote bytes in the three way synchronizer This method is invoked once when the remote tree is first accessed The returned object is cached and reused on subsequent accesses return the remote tree 
Convenience method that can be used by subclasses to notify listeners when a root is added or removed from the subscriber The added parameter should be code true code if the root was added and code false code if it was removed param resource the added or removed root param added code true code if the root was added and code false code if it was removed protected void handle Root Changed I Resource resource boolean added if added root Added resource else root Removed resource  handleRootChanged IResource rootAdded rootRemoved
private void root Added I Resource resource Subscriber Change Event delta new Subscriber Change Event this I Subscriber Change Event ROOT ADDED resource fire Team Resource Change new Subscriber Change Event delta  rootAdded IResource SubscriberChangeEvent SubscriberChangeEvent ISubscriberChangeEvent ROOT_ADDED fireTeamResourceChange SubscriberChangeEvent
private void root Removed I Resource resource try get Synchronizer flush resource I Resource DEPTH INFINITE catch Team Exception e Team Plugin log e Subscriber Change Event delta new Subscriber Change Event this I Subscriber Change Event ROOT REMOVED resource fire Team Resource Change new Subscriber Change Event delta  rootRemoved IResource getSynchronizer IResource DEPTH_INFINITE TeamException TeamPlugin SubscriberChangeEvent SubscriberChangeEvent ISubscriberChangeEvent ROOT_REMOVED fireTeamResourceChange SubscriberChangeEvent
private boolean is Child Of Root I Resource resource I Resource roots roots I Path full Path resource get Full Path for int i 0 i roots length i I Resource root roots i if root get Full Path is Prefix Of full Path return true return false  isChildOfRoot IResource IResource IPath fullPath getFullPath IResource getFullPath isPrefixOf fullPath

Create a three way synchronizer that uses a persistant byte store with the given qualified name as its unique identifier param name the unique identifier for the persistant store public Three Way Synchronizer Qualified Name name this new Persistant Resource Variant Byte Store name  ThreeWaySynchronizer QualifiedName PersistantResourceVariantByteStore
Create a three way synchronizer that uses the given byte store as its underlying byte cache param store the byte store this synchronizer uses to cache its bytes public Three Way Synchronizer Resource Variant Byte Store store cache store  ThreeWaySynchronizer ResourceVariantByteStore
Adds a listener to this synchronizer Listeners will be notified when the synchronization state of a resource changes Listeners are not notified when files are modified locally Clients can make use of the code I Resource code delta mechanism if they need to know about local modifications Has no effect if an identical listener is already registered p Team resource change listeners are informed about state changes that affect the resources supervised by this subscriber p param listener a synchronizer change listener public void add Listener I Synchronizer Change Listener listener synchronized listeners listeners add listener  IResource addListener ISynchronizerChangeListener
Removes a listener previously registered with this synchronizer Has no affect if an identical listener is not registered param listener a synchronizer change listener public void remove Listener I Synchronizer Change Listener listener synchronized listeners listeners remove listener  removeListener ISynchronizerChangeListener
Return the base bytes that are cached for the given resource or code null code if no base is cached The returned bytes should uniquely identify the resource variant that is the base for the given local resource param resource the resource return the base bytes cached with the resource or code null code throws Team Exception public byte get Base Bytes I Resource resource throws Team Exception try begin Operation byte sync Bytes internal Get Sync Bytes resource if sync Bytes null return null byte base Bytes get Slot sync Bytes 1 if base Bytes null base Bytes length 0 return null return base Bytes finally end Operation  TeamException getBaseBytes IResource TeamException beginOperation syncBytes internalGetSyncBytes syncBytes baseBytes getSlot syncBytes baseBytes baseBytes baseBytes endOperation
Set the base bytes for the given resource The provided bytes should encode enough information to uniquely identify and possibly recreate the resource variant that is the base for the given local resource In essence setting the base bytes is equivalent to marking the file as in sync As such setting the base bytes will also set the remote bytes and mark the file as clean i e having no outgoing changes param resource the resource param base Bytes the base bytes that identify the base resource variant throws Team Exception public void set Base Bytes I Resource resource byte base Bytes throws Team Exception Assert is Not Null base Bytes I Scheduling Rule rule null try rule begin Batching resource null try begin Operation String base new String base Bytes String slots new String new Long resource get Modification Stamp to String base base byte sync Bytes to Bytes slots internal Set Sync Bytes resource sync Bytes batching Lock resource Changed resource finally end Operation finally if rule null end Batching rule null  baseBytes TeamException setBaseBytes IResource baseBytes TeamException isNotNull baseBytes ISchedulingRule beginBatching beginOperation baseBytes getModificationStamp toString syncBytes toBytes internalSetSyncBytes syncBytes batchingLock resourceChanged endOperation endBatching
Return whether the local resource has been modified since the last time the base bytes were set This method will return code false code for ignored resources and code true code for non existant resources that have base bytes cached param resource the resource return code true code if the resource has been modified since the last time the base bytes were set throws Team Exception public boolean is Locally Modified I Resource resource throws Team Exception return internal Get Sync Bytes resource null is Ignored resource get Local Timestamp resource resource get Modification Stamp get Base Bytes resource null resource exists  TeamException isLocallyModified IResource TeamException internalGetSyncBytes isIgnored getLocalTimestamp getModificationStamp getBaseBytes
Return the remote bytes that are cached for the given resource or code null code if no remote is cached The returned bytes should uniquely identify the resource variant that is the remote for the given local resource param resource the resource return the remote bytes cached with the resource or code null code throws Team Exception public byte get Remote Bytes I Resource resource throws Team Exception try begin Operation byte sync Bytes internal Get Sync Bytes resource if sync Bytes null return null byte remote Bytes get Slot sync Bytes 2 if remote Bytes null remote Bytes length 0 return null return remote Bytes finally end Operation  TeamException getRemoteBytes IResource TeamException beginOperation syncBytes internalGetSyncBytes syncBytes remoteBytes getSlot syncBytes remoteBytes remoteBytes remoteBytes endOperation
Set the remote bytes for the given resource The provided bytes should encode enough information to uniquely identify and possibly recreate the resource variant that is the remote for the given local resource If the remote for a resource no longer exists code remove Remote Bytes I Resource code should be called param resource the resource param remote Bytes the base bytes that identify the remote resource variant return code true code if the remote bytes changed as a result of the set throws Team Exception public boolean set Remote Bytes I Resource resource byte remote Bytes throws Team Exception Assert is Not Null remote Bytes I Scheduling Rule rule null try rule begin Batching resource null try begin Operation byte sync Bytes internal Get Sync Bytes resource if sync Bytes null String slots new String NON NLS 1 NON NLS 1 new String remote Bytes sync Bytes to Bytes slots else byte current Remote get Slot sync Bytes 2 if equals remote Bytes current Remote return false sync Bytes set Slot sync Bytes 2 remote Bytes internal Set Sync Bytes resource sync Bytes batching Lock resource Changed resource return true finally end Operation finally if rule null end Batching rule null  removeRemoteBytes IResource remoteBytes TeamException setRemoteBytes IResource remoteBytes TeamException isNotNull remoteBytes ISchedulingRule beginBatching beginOperation syncBytes internalGetSyncBytes syncBytes remoteBytes syncBytes toBytes currentRemote getSlot syncBytes remoteBytes currentRemote syncBytes setSlot syncBytes remoteBytes internalSetSyncBytes syncBytes batchingLock resourceChanged endOperation endBatching
Remove the remote bytes associated with the resource This is typically done when the corresponding remote resource variant no longer exists param resource the resource return code true code if the remote bytes changed as a result of the removal throws Team Exception public boolean remove Remote Bytes I Resource resource throws Team Exception I Scheduling Rule rule null try rule begin Batching resource null try begin Operation byte sync Bytes internal Get Sync Bytes resource if sync Bytes null String current Remote new String get Slot sync Bytes 2 if current Remote length 0 return false sync Bytes set Slot sync Bytes 2 new byte 0 internal Set Sync Bytes resource sync Bytes batching Lock resource Changed resource return true return false finally end Operation finally if rule null end Batching rule null  TeamException removeRemoteBytes IResource TeamException ISchedulingRule beginBatching beginOperation syncBytes internalGetSyncBytes syncBytes currentRemote getSlot syncBytes currentRemote syncBytes setSlot syncBytes internalSetSyncBytes syncBytes batchingLock resourceChanged endOperation endBatching
Return whether the given resource has sync bytes in the synchronizer param resource the local resource return whether there are sync bytes cached for the local resources public boolean has Sync Bytes I Resource resource throws Team Exception return internal Get Sync Bytes resource null  hasSyncBytes IResource TeamException internalGetSyncBytes
Returns whether the resource has been marked as ignored using code set Ignored I Resource code param resource the resource return code true code if the resource is ignored throws Team Exception public boolean is Ignored I Resource resource throws Team Exception byte bytes cache get Bytes resource return bytes null equals bytes IGNORED BYTES  setIgnored IResource TeamException isIgnored IResource TeamException getBytes IGNORED_BYTES
Mark the resource as being ignored Ignored resources are not returned by the code members code method are never dirty see code is Locally Modified code and do not have base or remote bytes cahced for them param resource the resource to be ignored throws Team Exception public void set Ignored I Resource resource throws Team Exception internal Set Sync Bytes resource IGNORED BYTES  isLocallyModified TeamException setIgnored IResource TeamException internalSetSyncBytes IGNORED_BYTES
Return the members of the local resource that either have sync bytes or exist locally and are not ignored param resource the local resource return the children of the local resource that have cached sync bytes or are not ignored throws Team Exception public I Resource members I Resource resource throws Team Exception if resource get Type I Resource FILE return new I Resource 0 try Set potential Children new Hash Set I Container container I Container resource if container exists potential Children add All Arrays as List container members potential Children add All Arrays as List cache members resource List result new Array List for Iterator iter potential Children iterator iter has Next I Resource child I Resource iter next if child exists has Sync Bytes child result add child return I Resource result to Array new I Resource result size catch Core Exception e throw Team Exception as Team Exception e  TeamException IResource IResource TeamException getType IResource IResource potentialChildren HashSet IContainer IContainer potentialChildren addAll asList potentialChildren addAll asList ArrayList potentialChildren hasNext IResource IResource hasSyncBytes IResource toArray IResource CoreException TeamException asTeamException
Flush any cached bytes for the given resource to the depth specified param resource the resource param depth the depth of the flush one of code I Resource DEPTH ZERO code code I Resource DEPTH ONE code or code I Resource DEPTH INFINITE code throws Team Exception public void flush I Resource resource int depth throws Team Exception I Scheduling Rule rule null try rule begin Batching resource null try begin Operation if cache flush Bytes resource depth batching Lock resource Changed resource finally end Operation finally if rule null end Batching rule null  IResource DEPTH_ZERO IResource DEPTH_ONE IResource DEPTH_INFINITE TeamException IResource TeamException ISchedulingRule beginBatching beginOperation flushBytes batchingLock resourceChanged endOperation endBatching
Perform multiple sync state modifications and fire only a single change notification at the end param resource Rule the scheduling rule that encompasses all modifications param runnable the runnable that performs the sync state modifications param monitor a progress monitor throws Team Exception public void run I Resource resource Rule I Workspace Runnable runnable I Progress Monitor monitor throws Team Exception monitor Policy monitor For monitor monitor begin Task null 100 I Scheduling Rule rule begin Batching resource Rule Policy sub Monitor For monitor 10 try cache run resource Rule runnable Policy sub Monitor For monitor 80 catch Core Exception e throw Team Exception as Team Exception e finally if rule null end Batching rule Policy sub Monitor For monitor 10 monitor done  resourceRule TeamException IResource resourceRule IWorkspaceRunnable IProgressMonitor TeamException monitorFor beginTask ISchedulingRule beginBatching resourceRule subMonitorFor resourceRule subMonitorFor CoreException TeamException asTeamException endBatching subMonitorFor
public void flush Thread Info info I Progress Monitor monitor throws Team Exception if info null info is Empty broadcast Sync Changes info get Changed Resources  ThreadInfo IProgressMonitor TeamException isEmpty broadcastSyncChanges getChangedResources
final I Synchronizer Change Listener listener all Listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception don t log the exception it is already being logged in Platform run  ISynchronizerChangeListener allListeners ISafeRunnable handleException
don t log the exception it is already being logged in Platform run public void run throws Exception listener sync State Changed resources  syncStateChanged
private void broadcast Sync Changes final I Resource resources I Synchronizer Change Listener all Listeners Copy the listener list so we re not calling client code while synchronized synchronized listeners all Listeners I Synchronizer Change Listener listeners to Array new I Synchronizer Change Listener listeners size Notify the listeners safely so all will receive notification for int i 0 i all Listeners length i final I Synchronizer Change Listener listener all Listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception don t log the exception it is already being logged in Platform run public void run throws Exception listener sync State Changed resources  broadcastSyncChanges IResource ISynchronizerChangeListener allListeners allListeners ISynchronizerChangeListener toArray ISynchronizerChangeListener allListeners ISynchronizerChangeListener allListeners ISafeRunnable handleException syncStateChanged
private byte internal Get Sync Bytes I Resource resource throws Team Exception byte bytes cache get Bytes resource if bytes null equals bytes IGNORED BYTES return null return bytes  internalGetSyncBytes IResource TeamException getBytes IGNORED_BYTES
Set the cached sync bytes private boolean internal Set Sync Bytes I Resource resource byte sync Bytes throws Team Exception return cache set Bytes resource sync Bytes  internalSetSyncBytes IResource syncBytes TeamException setBytes syncBytes
private byte get Slot byte sync Bytes int i return Sync Byte Converter get Slot sync Bytes i false  getSlot syncBytes SyncByteConverter getSlot syncBytes
private byte set Slot byte sync Bytes int i byte insert Bytes throws Team Exception return Sync Byte Converter set Slot sync Bytes i insert Bytes  setSlot syncBytes insertBytes TeamException SyncByteConverter setSlot syncBytes insertBytes
private byte to Bytes String slots return Sync Byte Converter to Bytes slots  toBytes SyncByteConverter toBytes
private long get Local Timestamp I Resource resource throws Team Exception try begin Operation byte sync Bytes internal Get Sync Bytes resource if sync Bytes null return 0 byte bytes get Slot sync Bytes 0 if bytes null bytes length 0 return 0 return Long parse Long new String bytes finally end Operation  getLocalTimestamp IResource TeamException beginOperation syncBytes internalGetSyncBytes syncBytes getSlot syncBytes parseLong endOperation
private boolean equals byte sync Bytes byte old Bytes if sync Bytes length old Bytes length return false for int i 0 i old Bytes length i if old Bytes i sync Bytes i return false return true  syncBytes oldBytes syncBytes oldBytes oldBytes oldBytes syncBytes
private void begin Operation Do not try to acquire the lock if the resources tree is locked The reason for this is that during the resource delta phase i e when the tree is locked the workspace lock is held If we obtain our lock there is a chance of dealock It is OK if we don t as we are still protected by scheduling rules and the workspace lock if Resources Plugin get Workspace is Tree Locked return lock acquire  beginOperation ResourcesPlugin getWorkspace isTreeLocked
private void end Operation See begin Operation for a description of why the lock is not obtained when the tree is locked if Resources Plugin get Workspace is Tree Locked return lock release  endOperation beginOperation ResourcesPlugin getWorkspace isTreeLocked
is the rule obtained by the lock It may differ from the provided rule private I Scheduling Rule begin Batching I Scheduling Rule resource Rule I Progress Monitor monitor return batching Lock acquire resource Rule this I Flush Operation monitor  ISchedulingRule beginBatching ISchedulingRule resourceRule IProgressMonitor batchingLock resourceRule IFlushOperation
by the corresponding call to begin Batching private void end Batching I Scheduling Rule rule I Progress Monitor monitor throws Team Exception batching Lock release rule monitor  beginBatching endBatching ISchedulingRule IProgressMonitor TeamException batchingLock

protected ICVS Resource send Local Resource State Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor throws CVS Exception Send all folders that are already managed to the server new File Structure Visitor session false false visit session resources monitor return resources  ICVSResource sendLocalResourceState GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor CVSException FileStructureVisitor

private boolean send Binary public Abstract Structure Visitor Session session boolean send Questionable boolean send Modified Contents this session send Questionable send Modified Contents true  sendBinary AbstractStructureVisitor sendQuestionable sendModifiedContents sendQuestionable sendModifiedContents
public Abstract Structure Visitor Session session boolean send Questionable boolean send Modified Contents boolean send Binary this session session this send Questionable send Questionable this send Modified Contents send Modified Contents this send Binary send Binary  AbstractStructureVisitor sendQuestionable sendModifiedContents sendBinary sendQuestionable sendQuestionable sendModifiedContents sendModifiedContents sendBinary sendBinary
Helper method to indicate if a directory has already been sent to the server protected boolean is Last Sent ICVS Folder folder return folder equals last Folder Sent  isLastSent ICVSFolder lastFolderSent
Helper method to record if a directory has already been sent to the server protected void record Last Sent ICVS Folder folder last Folder Sent folder  recordLastSent ICVSFolder lastFolderSent
Helper which indicates if a folder is an orphaned subtree That is a directory which contains a CVS subdirectory but is not managed by its parent The root directory of the session is not considered orphaned even if it is not managed by its parent protected boolean is Orphaned Subtree ICVS Folder m Folder throws CVS Exception return m Folder isCVS Folder m Folder is Managed m Folder equals session get Local Root m Folder get Parent isCVS Folder  isOrphanedSubtree ICVSFolder mFolder CVSException mFolder isCVSFolder mFolder isManaged mFolder getLocalRoot mFolder getParent isCVSFolder
Send the folder relative to the root to the server Send all appropiate modifier like Sticky Questionable Static directory br Folders will only be sent once protected void send Folder ICVS Folder m Folder throws CVS Exception Policy check Canceled monitor boolean exists m Folder exists boolean isCVS Folder m Folder isCVS Folder We are only interested in folders that exist or are CVS folders A folder could be a non existant CVS folder if it is a holder for outgoing file deletions if exists isCVS Folder return Do not send the same folder twice if is Last Sent m Folder return Do not send virtual directories if isCVS Folder m Folder get Folder Sync Info is Virtual Directory return String local Path m Folder get Relative Path session get Local Root monitor sub Task Policy bind Abstract Structure Visitor sending Folder Util to Truncated Path m Folder session get Local Root 3 NON NLS 1 Deal with questionable directories boolean is Questionable exists isCVS Folder is Orphaned Subtree m Folder if is Questionable if send Questionable We need to make sure the parent folder was sent send Folder m Folder get Parent session send Questionable m Folder return Send the directory to the server String remote Path m Folder get Remote Location session get Local Root if remote Path null throw new CVS Exception Policy bind Abstract Structure Visitor no Remote NON NLS 1 session send Directory local Path remote Path Send any directory properties to the server Folder Sync Info info m Folder get Folder Sync Info if info null if info get Is Static session send Static Directory CVS Entry Line Tag tag info get Tag if tag null tag get Type CVS Tag HEAD session send Sticky tag to Entry Line Format false Record that we sent this folder record Last Sent m Folder monitor worked 1  sendFolder ICVSFolder mFolder CVSException checkCanceled mFolder isCVSFolder mFolder isCVSFolder isCVSFolder isLastSent mFolder isCVSFolder mFolder getFolderSyncInfo isVirtualDirectory localPath mFolder getRelativePath getLocalRoot subTask AbstractStructureVisitor sendingFolder toTruncatedPath mFolder getLocalRoot isQuestionable isCVSFolder isOrphanedSubtree mFolder isQuestionable sendQuestionable sendFolder mFolder getParent sendQuestionable mFolder remotePath mFolder getRemoteLocation getLocalRoot remotePath CVSException AbstractStructureVisitor noRemote sendDirectory localPath remotePath FolderSyncInfo mFolder getFolderSyncInfo getIsStatic sendStaticDirectory CVSEntryLineTag getTag getType CVSTag sendSticky toEntryLineFormat recordLastSent mFolder
Send the information about the file to the server If the file is modified its contents are sent as well protected void send File ICVS File m File throws CVS Exception Policy check Canceled monitor Send the parent folder if it hasn t been sent already send Folder m File get Parent Send the file s entry line to the server byte sync Bytes m File get Sync Bytes boolean is Managed sync Bytes null if is Managed send Pending Notification m File session send Entry sync Bytes Resource Sync Info get Timestamp To Server sync Bytes m File get Time Stamp else If the file is not managed send a questionable to the server if the file exists locally A unmanaged locally non existant file results from the explicit use of the file name as a command argument if send Questionable if m File exists session send Questionable m File return else we are probably doing an import so send the file contents below If the file exists send the appropriate indication to the server if m File exists if m File is Modified null boolean binary Resource Sync Info is Binary sync Bytes if send Modified Contents session send Modified m File binary send Binary monitor else session send Is Modified m File binary monitor else session send Unchanged m File monitor worked 1  sendFile ICVSFile mFile CVSException checkCanceled sendFolder mFile getParent syncBytes mFile getSyncBytes isManaged syncBytes isManaged sendPendingNotification mFile sendEntry syncBytes ResourceSyncInfo getTimestampToServer syncBytes mFile getTimeStamp sendQuestionable mFile sendQuestionable mFile mFile mFile isModified ResourceSyncInfo isBinary syncBytes sendModifiedContents sendModified mFile sendBinary sendIsModified mFile sendUnchanged mFile
protected void send Pending Notification ICVS File m File throws CVS Exception Notify Info notify m File get Pending Notification if notify null send Folder m File get Parent session send Notify m File get Parent notify  sendPendingNotification ICVSFile mFile CVSException NotifyInfo mFile getPendingNotification sendFolder mFile getParent sendNotify mFile getParent
Collections sort resource List new Comparator public int compare Object object1 Object object2 ICVS Resource resource1 ICVS Resource object1 ICVS Resource resource2 ICVS Resource object2 try String path1 resource1 get Parent get Relative Path local Root String path2 resource2 get Parent get Relative Path local Root int path Compare path1 compare To path2 if path Compare 0 if resource1 is Folder resource2 is Folder return resource1 get Name compare To resource2 get Name else if resource1 is Folder return 1 else return 1 else return path Compare catch CVS Exception e return resource1 get Name compare To resource2 get Name  resourceList ICVSResource ICVSResource ICVSResource ICVSResource getParent getRelativePath localRoot getParent getRelativePath localRoot pathCompare compareTo pathCompare isFolder isFolder getName compareTo getName isFolder pathCompare CVSException getName compareTo getName
This method is used to visit a set of ICVS Resources Using it ensures that a common parent between the set of resources is only sent once public void visit Session session ICVS Resource resources I Progress Monitor monitor throws CVS Exception Sort the resources to avoid sending the same directory multiple times List resource List new Array List resources length resource List add All Arrays as List resources final ICVS Folder local Root session get Local Root Collections sort resource List new Comparator public int compare Object object1 Object object2 ICVS Resource resource1 ICVS Resource object1 ICVS Resource resource2 ICVS Resource object2 try String path1 resource1 get Parent get Relative Path local Root String path2 resource2 get Parent get Relative Path local Root int path Compare path1 compare To path2 if path Compare 0 if resource1 is Folder resource2 is Folder return resource1 get Name compare To resource2 get Name else if resource1 is Folder return 1 else return 1 else return path Compare catch CVS Exception e return resource1 get Name compare To resource2 get Name Create a progress monitor suitable for the visit int resource Hint 64 monitor begin Task null resource Hint this monitor Policy infinite Sub Monitor For monitor resource Hint try Visit all the resources this monitor begin Task null resource Hint session set Send File Title Key get Send File Title Key for int i 0 i resource List size i ICVS Resource resource List get i accept this finally monitor done  ICVSResources ICVSResource IProgressMonitor CVSException resourceList ArrayList resourceList addAll asList ICVSFolder localRoot getLocalRoot resourceList ICVSResource ICVSResource ICVSResource ICVSResource getParent getRelativePath localRoot getParent getRelativePath localRoot pathCompare compareTo pathCompare isFolder isFolder getName compareTo getName isFolder pathCompare CVSException getName compareTo getName resourceHint beginTask resourceHint infiniteSubMonitorFor resourceHint beginTask resourceHint setSendFileTitleKey getSendFileTitleKey resourceList ICVSResource resourceList
protected String get Send File Title Key return Abstract Structure Visitor sending File NON NLS 1  getSendFileTitleKey AbstractStructureVisitor sendingFile

public class Add extends Command Local options specific to add protected Add 
protected Add protected String get Request Id return add NON NLS 1  getRequestId
protected ICVS Resource send Local Resource State Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor throws CVS Exception Check that all the arguments can give you an repo that you will need while traversing the file structure for int i 0 i resources length i Assert is Not Null resources i get Remote Location session get Local Root Get a vistor and use it on every resource we should work on Add Structure Visitor visitor new Add Structure Visitor session visitor visit session resources monitor return resources  ICVSResource sendLocalResourceState GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor CVSException isNotNull getRemoteLocation getLocalRoot AddStructureVisitor AddStructureVisitor
If the add succeeded then folders have to be initialized with the sync info protected I Status command Finished Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor I Status status throws CVS Exception if status get Code CVS Status SERVER ERROR return status for int i 0 i resources length i if resources i is Folder ICVS Folder m Folder ICVS Folder resources i Folder Sync Info info m Folder get Parent get Folder Sync Info if info null status merge Status status new CVS Status CVS Status ERROR Policy bind Add invalid Parent m Folder get Relative Path session get Local Root NON NLS 1 else String repository info get Repository m Folder get Name NON NLS 1 m Folder set Folder Sync Info new Folder Sync Info repository info get Root info get Tag info get Is Static return status  IStatus commandFinished GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor IStatus CVSException getCode CVSStatus SERVER_ERROR isFolder ICVSFolder mFolder ICVSFolder FolderSyncInfo mFolder getParent getFolderSyncInfo mergeStatus CVSStatus CVSStatus invalidParent mFolder getRelativePath getLocalRoot getRepository mFolder getName mFolder setFolderSyncInfo FolderSyncInfo getRoot getTag getIsStatic

class Add Structure Visitor extends Abstract Structure Visitor public Add Structure Visitor Session session super session false true  AddStructureVisitor AbstractStructureVisitor AddStructureVisitor
see ICVS Resource Visitor visit File I Managed File public void visit File ICVS File m File throws CVS Exception Send the parent folder send Folder m File get Parent Sends the Is modified request if it is supported otherwise the file contents are sent as binary The server does not need the contents at this stage so this should not be a problem session send Is Modified m File true monitor  ICVSResourceVisitor visitFile IManagedFile visitFile ICVSFile mFile CVSException sendFolder mFile getParent sendIsModified mFile
see ICVS Resource Visitor visit Folder ICVS Folder public void visit Folder ICVS Folder m Folder throws CVS Exception Assert is Not Null m Folder Send the parent folder send Folder m Folder get Parent Send the directory String local Path m Folder get Relative Path session get Local Root String remote Path m Folder get Remote Location session get Local Root session send Directory local Path remote Path Record that we sent this folder record Last Sent m Folder  ICVSResourceVisitor visitFolder ICVSFolder visitFolder ICVSFolder mFolder CVSException isNotNull mFolder sendFolder mFolder getParent localPath mFolder getRelativePath getLocalRoot remotePath mFolder getRemoteLocation getLocalRoot sendDirectory localPath remotePath recordLastSent mFolder

public class Admin extends Abstract Message Command Local options specific to admin protected Admin  AbstractMessageCommand
protected Admin protected String get Request Id return admin NON NLS 1  getRequestId

The CVS Annotate Command Answers a resource with each line annotated with the revision the line was added changed and the user making the change 
protected Annotate protected String get Request Id return annotate NON NLS 1  getRequestId
Local options specific to Annotate revision can be tag or revision public static Local Option make Revision Option String revision return new Local Option r revision null NON NLS 1  LocalOption makeRevisionOption LocalOption

private long size 0 public void write int b throws IO Exception size  IOException
size public long get Size return size  getSize

class Checked In Handler extends Response Handler public String get ResponseID return Checked in NON NLS 1  CheckedInHandler ResponseHandler getResponseID
public void handle Session session String local Dir I Progress Monitor monitor throws CVS Exception read additional data for the response String repository File session read Line String entry Line session read Line clear file update modifiers session set Mod Time null Get the local file String file Name repository File substring repository File last Index Of 1 NON NLS 1 ICVS Folder m Parent session get Local Root get Folder local Dir ICVS File m File m Parent get File file Name Marked the local file as checked in monitor sub Task Policy bind Check In Handler checked In Util to Truncated Path ICVS Resource m File session get Local Root 3 NON NLS 1 m File checked In entry Line  localDir IProgressMonitor CVSException repositoryFile readLine entryLine readLine setModTime fileName repositoryFile repositoryFile lastIndexOf ICVSFolder mParent getLocalRoot getFolder localDir ICVSFile mFile mParent getFile fileName subTask CheckInHandler checkedIn toTruncatedPath ICVSResource mFile getLocalRoot mFile checkedIn entryLine

public static final Local Option DO NOT SHORTEN new Local Option N NON NLS 1 public static final Local Option FETCH MODULE ALIASES new Local Option c NON NLS 1 public static Local Option make Directory Name Option String module Name return new Local Option d module Name NON NLS 1  LocalOption DO_NOT_SHORTEN LocalOption LocalOption FETCH_MODULE_ALIASES LocalOption LocalOption makeDirectoryNameOption moduleName LocalOption moduleName
Command options found in the CVSROOT modules file public static Local Option ALIAS new Local Option a NON NLS 1 public static Local Option make Status Option String status return new Local Option s status NON NLS 1  LocalOption LocalOption LocalOption makeStatusOption LocalOption
protected Checkout 
protected Checkout protected String get Request Id return co NON NLS 1  getRequestId
protected I Command Output Listener get Default Command Output Listener return DEFAULT OUTPUT LISTENER  ICommandOutputListener getDefaultCommandOutputListener DEFAULT_OUTPUT_LISTENER
protected ICVS Resource compute Work Resources Session session Local Option local Options String arguments throws CVS Exception We shouldn t have any arguments if we re fetching the module definitions if arguments length 1 FETCH MODULE ALIASES is Element Of local Options throw new Illegal Argument Exception We can determine the local directories using either the d option or the module expansions Option d Option find Option local Options d NON NLS 1 if d Option null Should we append the expansions to the d argument return new ICVS Resource session get Local Root get Folder d Option argument String modules session get Module Expansions ICVS Resource resources new ICVS Resource modules length for int i 0 i resources length i resources i session get Local Root get Folder modules i return resources  ICVSResource computeWorkResources LocalOption localOptions CVSException FETCH_MODULE_ALIASES isElementOf localOptions IllegalArgumentException dOption findOption localOptions dOption ICVSResource getLocalRoot getFolder dOption getModuleExpansions ICVSResource ICVSResource getLocalRoot getFolder
Start the Checkout command Send the module that is going to be checked out to the server by reading the name of the resource given This has to change to we give it the name of the modul and the Checkout creates everything for us protected ICVS Resource send Local Resource State Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor throws CVS Exception We need a folder to put the project s we checkout into Assert is True session get Local Root is Folder Send the information about the local workspace resources to the server List resources To Send new Array List resources length for int i 0 i resources length i ICVS Resource resource resources i if resource exists resource is Folder ICVS Folder resource isCVS Folder resources To Send add resource if resources To Send is Empty resources ICVS Resource resources To Send to Array new ICVS Resource resources To Send size new File Structure Visitor session true true visit session resources monitor else monitor begin Task null 100 monitor done return resources  ICVSResource sendLocalResourceState GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor CVSException isTrue getLocalRoot isFolder resourcesToSend ArrayList ICVSResource isFolder ICVSFolder isCVSFolder resourcesToSend resourcesToSend isEmpty ICVSResource resourcesToSend toArray ICVSResource resourcesToSend FileStructureVisitor beginTask
protected void send Local Working Directory Session session throws CVS Exception session send Constructed Root Directory  sendLocalWorkingDirectory CVSException sendConstructedRootDirectory
On sucessful finish prune empty directories if the P option was specified or is implied by D or r protected I Status command Finished Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor I Status status throws CVS Exception If we didn t succeed don t do any post processing if status get Code CVS Status SERVER ERROR return status If we are retrieving the modules file ignore other options if FETCH MODULE ALIASES is Element Of local Options return status If we are pruning P or getting a sticky copy D or r then prune empty directories if PRUNE EMPTY DIRECTORIES is Element Of local Options find Option local Options D null NON NLS 1 find Option local Options r null NON NLS 1 Prune empty directories new Prune Folder Visitor visit session resources return status  IStatus commandFinished GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor IStatus CVSException getCode CVSStatus SERVER_ERROR FETCH_MODULE_ALIASES isElementOf localOptions PRUNE_EMPTY_DIRECTORIES isElementOf localOptions findOption localOptions findOption localOptions PruneFolderVisitor
Override execute to perform a expand modules before the checkout protected I Status do Execute Session session Global Option global Options Local Option local Options String arguments I Command Output Listener listener I Progress Monitor monitor throws CVS Exception monitor begin Task null 100 if FETCH MODULE ALIASES is Element Of local Options Execute the expand modules command This will put the expansions in the session for later retrieval I Status status Request EXPAND MODULES execute session arguments Policy sub Monitor For monitor 10 if status get Code CVS Status SERVER ERROR return status If d is not included in the local options then send N do not shorten directory paths to the server as is done by other cvs clients if find Option local Options d null NON NLS 1 if DO NOT SHORTEN is Element Of local Options Local Option new Local Options new Local Option local Options length 1 new Local Options 0 DO NOT SHORTEN System arraycopy local Options 0 new Local Options 1 local Options length local Options new Local Options return super do Execute session global Options local Options arguments listener Policy sub Monitor For monitor 90  IStatus doExecute GlobalOption globalOptions LocalOption localOptions ICommandOutputListener IProgressMonitor CVSException beginTask FETCH_MODULE_ALIASES isElementOf localOptions IStatus EXPAND_MODULES subMonitorFor getCode CVSStatus SERVER_ERROR findOption localOptions DO_NOT_SHORTEN isElementOf localOptions LocalOption newLocalOptions LocalOption localOptions newLocalOptions DO_NOT_SHORTEN localOptions newLocalOptions localOptions localOptions newLocalOptions doExecute globalOptions localOptions subMonitorFor
Perform a checkout to get the module expansions defined in the CVSROOT modules file public Remote Module get Remote Modules Session session CVS Tag tag I Progress Monitor monitor throws CVS Exception Module Definitions Listener module Definition Listener new Module Definitions Listener I Status status super execute session NO GLOBAL OPTIONS new Local Option FETCH MODULE ALIASES NO ARGUMENTS module Definition Listener monitor if status get Code CVS Status SERVER ERROR throw new CVS Server Exception status return Remote Module create Remote Modules module Definition Listener get Module Expansions session getCVS Repository Location tag  RemoteModule getRemoteModules CVSTag IProgressMonitor CVSException ModuleDefinitionsListener moduleDefinitionListener ModuleDefinitionsListener IStatus NO_GLOBAL_OPTIONS LocalOption FETCH_MODULE_ALIASES NO_ARGUMENTS moduleDefinitionListener getCode CVSStatus SERVER_ERROR CVSServerException RemoteModule createRemoteModules moduleDefinitionListener getModuleExpansions getCVSRepositoryLocation

public class Created Response Handler extends Updated Handler public Created Response Handler super Updated Handler HANDLE UPDATED  CreatedResponseHandler UpdatedHandler CreatedResponseHandler UpdatedHandler HANDLE_UPDATED
super Updated Handler HANDLE UPDATED public String get ResponseID return Created NON NLS 1  UpdatedHandler HANDLE_UPDATED getResponseID
protected I Status do Execute Session session Global Option global Options Local Option local Options String arguments I Command Output Listener listener I Progress Monitor monitor throws CVS Exception Response Handler new Created new Created Response Handler Response Handler old Created session get Response Handler new Created get ResponseID session register Response Handler new Created try return super do Execute session global Options local Options arguments listener monitor finally session register Response Handler old Created  IStatus doExecute GlobalOption globalOptions LocalOption localOptions ICommandOutputListener IProgressMonitor CVSException ResponseHandler newCreated CreatedResponseHandler ResponseHandler oldCreated getResponseHandler newCreated getResponseID registerResponseHandler newCreated doExecute globalOptions localOptions registerResponseHandler oldCreated

protected static final I Command Output Listener DEFAULT OUTPUT LISTENER new Command Output Listener Prevents client code from instantiating us protected Command  ICommandOutputListener DEFAULT_OUTPUT_LISTENER CommandOutputListener
Provides the default command output listener which is used to accumulate errors Subclasses can override this method in order to properly interpret information received from the server protected I Command Output Listener get Default Command Output Listener return DEFAULT OUTPUT LISTENER  ICommandOutputListener getDefaultCommandOutputListener DEFAULT_OUTPUT_LISTENER
Sends the command s arguments to the server template method p The default implementation sends all arguments Subclasses may override this method to provide alternate behaviour p param session the CVS session param arguments the arguments that were supplied by the caller of execute protected void send Arguments Session session String arguments throws CVS Exception for int i 0 i arguments length i session send Argument arguments i  sendArguments CVSException sendArgument
Describes the local resource state to the server prior to command execution template method p Commands must override this method to inform the server about the state of local resources using the Entries Modified Unchanged and Questionable requests as needed p p This method should return the resources that are of interest to the code Command command Finished code method In most cases it is the same resources that are provided but in some cases e g Commit the resources to be passed to the above method are different p param session the CVS session param global Options the global options for the command param local Options the local options for the command param resources the resource arguments for the command param monitor the progress monitor return ICVS Resource protected abstract ICVS Resource send Local Resource State Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor  commandFinished globalOptions localOptions ICVSResource ICVSResource sendLocalResourceState GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor
Cleans up after command execution template method p The default implementation is a no op Subclasses may override this method to follow up command execution on the server with clean up operations on local resources p param session the CVS session param global Options the global options for the command param local Options the local options for the command param resources the resource arguments for the command param monitor the progress monitor param status the status accumulated so far If the code CVS Status SERVER ERROR then the command failed return status the status past in plus any additional status accumulated during the finish protected I Status command Finished Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor I Status status throws CVS Exception return status  globalOptions localOptions CVSStatus SERVER_ERROR IStatus commandFinished GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor IStatus CVSException
Sends the local working directory path prior to command execution template method p The default implementation sends the paths of local root directory assuming it exists Subclasses may override this method to provide alternate behaviour p param session the CVS session protected void send Local Working Directory Session session throws CVS Exception ICVS Folder local Root session get Local Root if local Root isCVS Folder session send Local Root Directory else session send Constructed Root Directory  sendLocalWorkingDirectory CVSException ICVSFolder localRoot getLocalRoot localRoot isCVSFolder sendLocalRootDirectory sendConstructedRootDirectory
Computes an array of ICVS Resources corresponding to command arguments template method p The default implementation assumes that all arguments supplied to the command represent resources in the local root that are to be manipulated Subclasses must override this method if this assumption does not hold p param session the CVS session param local Options the command local options param arguments the command arguments return the resource arguments for the command protected ICVS Resource compute Work Resources Session session Local Option local Options String arguments throws CVS Exception ICVS Folder local Root session get Local Root if arguments length 0 As a convenience passing no arguments to the CVS command implies the command will operate on the local root folder return new ICVS Resource local Root else Assume all arguments represent resources that are descendants of the local root folder ICVS Resource resources new ICVS Resource arguments length for int i 0 i arguments length i ICVS Resource resource local Root get Child arguments i file does not exist it could have been deleted It doesn t matter which type we return since only the name of the resource is used and sent to the server if resource null if local Root get Name length 0 Return a folder because it is the safest choice when local Root is a handle to the I Workspace Root resource local Root get Folder arguments i else resource local Root get File arguments i resources i resource return resources  ICVSResources localOptions ICVSResource computeWorkResources LocalOption localOptions CVSException ICVSFolder localRoot getLocalRoot ICVSResource localRoot ICVSResource ICVSResource ICVSResource localRoot getChild localRoot getName localRoot IWorkspaceRoot localRoot getFolder localRoot getFile
Send an array of Resources see Command send File Structure ICVS Resource I Progress Monitor boolean boolean boolean protected void send File Structure Session session ICVS Resource resources boolean empty Folders I Progress Monitor monitor throws CVS Exception check Resources Managed resources new File Structure Visitor session empty Folders true visit session resources monitor  sendFileStructure ICVSResource IProgressMonitor sendFileStructure ICVSResource emptyFolders IProgressMonitor CVSException checkResourcesManaged FileStructureVisitor emptyFolders
Checks that all work resources are managed param resources the resource arguments for the command throws CVS Exception if some resources are not managed protected void check Resources Managed ICVS Resource resources throws CVS Exception for int i 0 i resources length i ICVS Folder folder if resources i is Folder folder ICVS Folder resources i else folder resources i get Parent if folder null folder isCVS Folder folder exists throw new CVS Exception Policy bind Command argument Not Managed folder get Name NON NLS 1  CVSException checkResourcesManaged ICVSResource CVSException ICVSFolder isFolder ICVSFolder getParent isCVSFolder CVSException argumentNotManaged getName
ICVS Runnable job new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception update the global and local options Global Option g Options filter Global Options session global Options Local Option l Options filter Local Options session g Options local Options print the invocation string to the console if session is Output To Console Policy DEBUG CVS PROTOCOL I Path command Root Path I Resource resource session get Local Root getI Resource if resource null command Root Path Path EMPTY else command Root Path resource get Full Path String line construct Command Invocation String command Root Path g Options l Options arguments if session is Output To Console I Console Listener console Listener CVS Provider Plugin get Plugin get Console Listener if console Listener null console Listener command Invoked line if Policy DEBUG CVS PROTOCOL System out println CMD line NON NLS 1 run the command try status 0 do Execute session g Options l Options arguments listener monitor notify Console On Completion session status 0 null catch CVS Exception e notify Console On Completion session null e throw e catch Runtime Exception e notify Console On Completion session null e throw e  ICVSRunnable ICVSRunnable IProgressMonitor CVSException GlobalOption gOptions filterGlobalOptions globalOptions LocalOption lOptions filterLocalOptions gOptions localOptions isOutputToConsole DEBUG_CVS_PROTOCOL IPath commandRootPath IResource getLocalRoot getIResource commandRootPath commandRootPath getFullPath constructCommandInvocationString commandRootPath gOptions lOptions isOutputToConsole IConsoleListener consoleListener CVSProviderPlugin getPlugin getConsoleListener consoleListener consoleListener commandInvoked DEBUG_CVS_PROTOCOL doExecute gOptions lOptions notifyConsoleOnCompletion CVSException notifyConsoleOnCompletion RuntimeException notifyConsoleOnCompletion
Executes a CVS command p Dispatches the commands retrieves the results and determines whether or not an error occurred A listener may be supplied to capture message text that would normally be written to the standard error and standard output streams of a command line CVS client p param session the open CVS session param global Options the array of global options or NO GLOBAL OPTIONS param local Options the array of local options or NO LOCAL OPTIONS param arguments the array of arguments usually filenames relative to local Root or NO ARGUMENTS param listener the command output listener or null to discard all messages param monitor the progress monitor return a status code indicating success or failure of the operation throws CVS Exception if a fatal error occurs e g connection timeout public final I Status execute final Session session final Global Option global Options final Local Option local Options final String arguments final I Command Output Listener listener I Progress Monitor pm throws CVS Exception final I Status status new I Status 1 ICVS Runnable job new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception update the global and local options Global Option g Options filter Global Options session global Options Local Option l Options filter Local Options session g Options local Options print the invocation string to the console if session is Output To Console Policy DEBUG CVS PROTOCOL I Path command Root Path I Resource resource session get Local Root getI Resource if resource null command Root Path Path EMPTY else command Root Path resource get Full Path String line construct Command Invocation String command Root Path g Options l Options arguments if session is Output To Console I Console Listener console Listener CVS Provider Plugin get Plugin get Console Listener if console Listener null console Listener command Invoked line if Policy DEBUG CVS PROTOCOL System out println CMD line NON NLS 1 run the command try status 0 do Execute session g Options l Options arguments listener monitor notify Console On Completion session status 0 null catch CVS Exception e notify Console On Completion session null e throw e catch Runtime Exception e notify Console On Completion session null e throw e if is Workspace Modification session get Local Root run job pm else job run pm return status 0  globalOptions NO_GLOBAL_OPTIONS localOptions NO_LOCAL_OPTIONS localRoot NO_ARGUMENTS CVSException IStatus GlobalOption globalOptions LocalOption localOptions ICommandOutputListener IProgressMonitor CVSException IStatus IStatus ICVSRunnable ICVSRunnable IProgressMonitor CVSException GlobalOption gOptions filterGlobalOptions globalOptions LocalOption lOptions filterLocalOptions gOptions localOptions isOutputToConsole DEBUG_CVS_PROTOCOL IPath commandRootPath IResource getLocalRoot getIResource commandRootPath commandRootPath getFullPath constructCommandInvocationString commandRootPath gOptions lOptions isOutputToConsole IConsoleListener consoleListener CVSProviderPlugin getPlugin getConsoleListener consoleListener consoleListener commandInvoked DEBUG_CVS_PROTOCOL doExecute gOptions lOptions notifyConsoleOnCompletion CVSException notifyConsoleOnCompletion RuntimeException notifyConsoleOnCompletion isWorkspaceModification getLocalRoot
Return whether this command modifies the workspace If code true code is returned a scheduling rule on the session local root is obtained Otherwise no scheduling rule is obtained By default code true code is returned return whether this command modifies the workspace protected boolean is Workspace Modification return true  isWorkspaceModification
private void notify Console On Completion Session session I Status status Exception exception if session is Output To Console I Console Listener console Listener CVS Provider Plugin get Plugin get Console Listener if console Listener null console Listener command Completed status exception if Policy DEBUG CVS PROTOCOL if status null System out println RESULT status to String NON NLS 1 else System out println RESULT exception to String NON NLS 1  notifyConsoleOnCompletion IStatus isOutputToConsole IConsoleListener consoleListener CVSProviderPlugin getPlugin getConsoleListener consoleListener consoleListener commandCompleted DEBUG_CVS_PROTOCOL toString toString
protected I Status do Execute Session session Global Option global Options Local Option local Options String arguments I Command Output Listener listener I Progress Monitor monitor throws CVS Exception ICVS Resource resources null setup progress monitor monitor Policy monitor For monitor monitor begin Task null 100 Policy check Canceled monitor try prepare for command clear stale command state from previous runs session set No Local Changes DO NOT CHANGE is Element Of global Options session set Mod Time null initiate command send global options for int i 0 i global Options length i global Options i send session Policy check Canceled monitor send local options for int i 0 i local Options length i local Options i send session Policy check Canceled monitor compute the work resources resources compute Work Resources session local Options arguments Policy check Canceled monitor send local working directory state contributes 48 of work resources send Local Resource State session global Options local Options resources Policy infinite Sub Monitor For monitor 48 Policy check Canceled monitor send arguments send Arguments session arguments send local working directory path send Local Working Directory session if no listener was provided use the command s default in order to get error reporting if listener null listener get Default Command Output Listener execute command and process responses Processing responses contributes 50 of work I Status status execute Request session listener Policy sub Monitor For monitor 50 Finished adds last 2 of work status command Finished session global Options local Options resources Policy sub Monitor For monitor 2 status return status finally monitor done  IStatus doExecute GlobalOption globalOptions LocalOption localOptions ICommandOutputListener IProgressMonitor CVSException ICVSResource monitorFor beginTask checkCanceled setNoLocalChanges DO_NOT_CHANGE isElementOf globalOptions setModTime globalOptions globalOptions checkCanceled localOptions localOptions checkCanceled computeWorkResources localOptions checkCanceled sendLocalResourceState globalOptions localOptions infiniteSubMonitorFor checkCanceled sendArguments sendLocalWorkingDirectory getDefaultCommandOutputListener IStatus executeRequest subMonitorFor commandFinished globalOptions localOptions subMonitorFor
Constucts the CVS command invocation string corresponding to the arguments param global Options the global options param local Option the local options param arguments the arguments return the command invocation string private String construct Command Invocation String I Path command Root Path Global Option global Options Local Option local Options String arguments String Buffer command Line new String Buffer cvs NON NLS 1 for int i 0 i global Options length i String option global Options i to String if option length 0 continue command Line append command Line append option command Line append command Line append get Request Id for int i 0 i local Options length i String option local Options i to String if option length 0 continue command Line append command Line append option for int i 0 i arguments length i if arguments i length 0 continue command Line append NON NLS 1 I Path complete Path command Root Path if arguments i equals Session CURRENT LOCAL FOLDER complete Path complete Path append arguments i command Line append complete Path to String command Line append NON NLS 1 return command Line to String  globalOptions localOption constructCommandInvocationString IPath commandRootPath GlobalOption globalOptions LocalOption localOptions StringBuffer commandLine StringBuffer globalOptions globalOptions toString commandLine commandLine commandLine commandLine getRequestId localOptions localOptions toString commandLine commandLine commandLine IPath completePath commandRootPath CURRENT_LOCAL_FOLDER completePath completePath commandLine completePath toString commandLine commandLine toString
protected static abstract class Option protected String option argument protected Option String option String argument this option option this argument argument 
Determines if this option is an element of an array of options param array the array of options return true iff the array contains this option public boolean is Element Of Option array return find Option array option null  isElementOf findOption
Returns the option part of the option String get Option return option  getOption
Compares two options for equality param other the other option public boolean equals Object other if this other return true if other instanceof Option Option other Option Option other return option equals other Option option return false  otherOption otherOption
Sends the option to a CVS server param session the CVS session 
public String to String if argument null argument length 0 return option argument NON NLS 1 else return option  toString
public static class Global Option extends Option protected Global Option String option super option null  GlobalOption GlobalOption
super option null public void send Session session throws CVS Exception session send Global Option option  CVSException sendGlobalOption
Add the given global option to the end of the provided list param new Option param options return Global Option protected Global Option add To End Global Option options Global Option global Options new Global Option options length 1 System arraycopy options 0 global Options 0 options length global Options global Options length 1 this return global Options  newOption GlobalOption GlobalOption addToEnd GlobalOption GlobalOption globalOptions GlobalOption globalOptions globalOptions globalOptions globalOptions
public static final class Quiet Option extends Global Option private Quiet Option String option super option  QuietOption GlobalOption QuietOption
super option public void send Session session throws CVS Exception if option length 0 super send session  CVSException
public static class Local Option extends Option protected Local Option String option super option null  LocalOption LocalOption
super option null protected Local Option String option String argument super option argument  LocalOption
super option argument public void send Session session throws CVS Exception session send Argument option if argument null session send Argument argument  CVSException sendArgument sendArgument
public static class K Subst Option extends Local Option private boolean is Unknown Mode private K Subst Option String option this option false  KSubstOption LocalOption isUnknownMode KSubstOption
private K Subst Option String option boolean is Unknown Mode super option this is Unknown Mode is Unknown Mode ksubst Option Map put option this  KSubstOption isUnknownMode isUnknownMode isUnknownMode ksubstOptionMap
Gets the K Subst Option instance for the specified mode param mode the mode e g kb return an instance for that mode public static K Subst Option from Mode String mode if mode length 0 mode kkv use default NON NLS 1 K Subst Option option K Subst Option ksubst Option Map get mode if option null option new K Subst Option mode true return option  KSubstOption KSubstOption fromMode KSubstOption KSubstOption ksubstOptionMap KSubstOption
Gets the K Subst Option instance for the specified file param file the file to get the option for return an instance for that mode public static K Subst Option from File I File file if CVS Provider Plugin is Text file return get Default Text Mode return KSUBST BINARY  KSubstOption KSubstOption fromFile IFile CVSProviderPlugin isText getDefaultTextMode KSUBST_BINARY
Returns an array of all valid modes public static K Subst Option get AllK Subst Options return K Subst Option ksubst Option Map values to Array new K Subst Option ksubst Option Map size  KSubstOption getAllKSubstOptions KSubstOption ksubstOptionMap toArray KSubstOption ksubstOptionMap
Returns the entry line mode string for this instance public String to Mode if KSUBST TEXT EXPAND equals this return NON NLS 1 return get Option  toMode KSUBST_TEXT_EXPAND getOption
Returns true if the substitution mode requires no data translation during file transfer public boolean is Binary return KSUBST BINARY equals this  isBinary KSUBST_BINARY
Returns a short localized text string describing this mode public String get Short Display Text if is Unknown Mode return Policy bind K Subst Option unknown short option NON NLS 1 return Policy bind K Subst Option option short NON NLS 1 NON NLS 2  getShortDisplayText isUnknownMode KSubstOption KSubstOption
Returns a long localized text string describing this mode public String get Long Display Text if is Unknown Mode return Policy bind K Subst Option unknown long option NON NLS 1 return Policy bind K Subst Option option long NON NLS 1 NON NLS 2  getLongDisplayText isUnknownMode KSubstOption KSubstOption
Return the text mode that will be used by default public static K Subst Option get Default Text Mode return CVS Provider Plugin get Plugin get Default TextK Subst Option  KSubstOption getDefaultTextMode CVSProviderPlugin getPlugin getDefaultTextKSubstOption
Makes a m log message option Valid for add commit import public static Local Option make Argument Option Local Option option String argument if argument null argument NON NLS 1 return new Local Option option get Option argument NON NLS 1  LocalOption makeArgumentOption LocalOption LocalOption getOption
Makes a r or D option for a tag Valid for checkout export history rdiff update public static Local Option make Tag Option CVS Tag tag int type tag get Type switch type case CVS Tag BRANCH case CVS Tag VERSION return new Local Option r tag get Name NON NLS 1 case CVS Tag DATE return new Local Option D tag get Name NON NLS 1 default tag must not be HEAD throw new Illegal Argument Exception Policy bind Command invalid Tag NON NLS 1  LocalOption makeTagOption CVSTag getType CVSTag CVSTag LocalOption getName CVSTag LocalOption getName IllegalArgumentException invalidTag
Find a specific option in an array of options param array the array of options param option the option string to search for return the first element matching the option string or null if none public static Option find Option Option array String option for int i 0 i array length i if array i get Option equals option return array i return null  findOption getOption
Collect all arguments of a specific option from an array of options param array the array of options param option the option string to search for return an array of all arguments of belonging to matching options protected static String collect Option Arguments Option array String option List of String list new Array List for int i 0 i array length i if array i get Option equals option list add array i argument return String list to Array new String list size  collectOptionArguments ArrayList getOption toArray
Allows commands to filter the set of global options to be sent This method invokes the method of the same name on the session itself in order to get any session wide or globally set options Subclasses that override this method should call the superclass param session the session param global Options the global options read only return the filtered global options protected Global Option filter Global Options Session session Global Option global Options return session filter Global Options global Options  globalOptions GlobalOption filterGlobalOptions GlobalOption globalOptions filterGlobalOptions globalOptions
Allows commands to filter the set of local options to be sent Subclasses that override this method should call the superclass param session the session param global Options the global options read only param local Options the local options read only return the filtered local options protected Local Option filter Local Options Session session Global Option global Options Local Option local Options return local Options  globalOptions localOptions LocalOption filterLocalOptions GlobalOption globalOptions LocalOption localOptions localOptions
Execute a CVS command on an array of ICVS Resource This method simply converts the ICVS Resource to String paths relative to the local root of the session and invokes code execute Session Global Option Local Option String I Command Output Listener I Progress Monitor code p param session the open CVS session param global Options the array of global options or NO GLOBAL OPTIONS param local Options the array of local options or NO LOCAL OPTIONS param arguments the array of ICVS Resource to be operated on param listener the command output listener or null to discard all messages param monitor the progress monitor return a status code indicating success or failure of the operation throws CVS Exception if a fatal error occurs e g connection timeout see Command execute Session Global Option Local Option String I Command Output Listener I Progress Monitor public final I Status execute Session session Global Option global Options Local Option local Options ICVS Resource arguments I Command Output Listener listener I Progress Monitor pm throws CVS Exception String string Arguments convert Arguments For Open Session arguments session return execute session global Options local Options string Arguments listener pm  ICVSResource ICVSResource GlobalOption LocalOption ICommandOutputListener IProgressMonitor globalOptions NO_GLOBAL_OPTIONS localOptions NO_LOCAL_OPTIONS ICVSResource CVSException GlobalOption LocalOption ICommandOutputListener IProgressMonitor IStatus GlobalOption globalOptions LocalOption localOptions ICVSResource ICommandOutputListener IProgressMonitor CVSException stringArguments convertArgumentsForOpenSession globalOptions localOptions stringArguments
protected String convert Arguments For Open Session ICVS Resource arguments Session open Session throws CVS Exception Convert arguments List string Arguments new Array List arguments length for int i 0 i arguments length i string Arguments add arguments i get Relative Path open Session get Local Root return String string Arguments to Array new String string Arguments size  convertArgumentsForOpenSession ICVSResource openSession CVSException stringArguments ArrayList stringArguments getRelativePath openSession getLocalRoot stringArguments toArray stringArguments
Method merge Status param status param cVS Status return I Status protected I Status merge Status I Status accumulated Status I Status new Status if accumulated Status is Multi Status Multi Status accumulated Status merge new Status return accumulated Status if accumulated Status isOK return new Status if new Status isOK return accumulated Status Multi Status result new Multi Status CVS Provider Plugin ID CVS Status INFO new I Status accumulated Status new Status Policy bind Command warnings Policy bind Command get Request Id null NON NLS 1 NON NLS 2 return result  mergeStatus cVSStatus IStatus IStatus mergeStatus IStatus accumulatedStatus IStatus newStatus accumulatedStatus isMultiStatus MultiStatus accumulatedStatus newStatus accumulatedStatus accumulatedStatus newStatus newStatus accumulatedStatus MultiStatus MultiStatus CVSProviderPlugin CVSStatus IStatus accumulatedStatus newStatus getRequestId

public class Command Output Listener implements I Command Output Listener public I Status message Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor return OK  CommandOutputListener ICommandOutputListener IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor
public I Status error Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor String protocol Error get Protocol Error line location if protocol Error null return new CVS Status CVS Status ERROR CVS Status PROTOCOL ERROR command Root protocol Error return new CVS Status CVS Status ERROR CVS Status ERROR LINE command Root line  IStatus errorLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor protocolError getProtocolError protocolError CVSStatus CVSStatus CVSStatus PROTOCOL_ERROR commandRoot protocolError CVSStatus CVSStatus CVSStatus ERROR_LINE commandRoot
Return the portion of the line that describes the error if the error line is a protocol error or null if the line is not a protocol error param line the error line received from the server param location the repository location return String the potocol error or null protected String get Protocol Error String line ICVS Repository Location location if line starts With Protocol error NON NLS 1 return line return null  getProtocolError ICVSRepositoryLocation startsWith
public String get Server Message String line ICVS Repository Location location return CVS Repository Location location get Server Message Without Prefix line SERVER PREFIX  getServerMessage ICVSRepositoryLocation CVSRepositoryLocation getServerMessageWithoutPrefix SERVER_PREFIX
public String get Server Aborted Message String line ICVS Repository Location location return CVS Repository Location location get Server Message Without Prefix line SERVER ABORTED PREFIX  getServerAbortedMessage ICVSRepositoryLocation CVSRepositoryLocation getServerMessageWithoutPrefix SERVER_ABORTED_PREFIX
public String get ServerR Tag Message String line ICVS Repository Location location return CVS Repository Location location get Server Message Without Prefix line RTAG PREFIX  getServerRTagMessage ICVSRepositoryLocation CVSRepositoryLocation getServerMessageWithoutPrefix RTAG_PREFIX

public static final Local Option FORCE new Local Option f NON NLS 1 protected Commit  LocalOption LocalOption
protected Commit protected String get Request Id return ci NON NLS 1  getRequestId
Send all files under the working Folder as changed files to the server protected ICVS Resource send Local Resource State Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor throws CVS Exception Get the folders we want to work on check Resources Managed resources Send all changed files to the server Modified File Sender visitor new Modified File Sender session visitor visit session resources monitor Send the changed files as arguments because this is what other cvs clients do ICVS File changed Files visitor get Modified Files for int i 0 i changed Files length i session send Argument changed Files i get Relative Path session get Local Root return changed Files  workingFolder ICVSResource sendLocalResourceState GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor CVSException checkResourcesManaged ModifiedFileSender ModifiedFileSender ICVSFile changedFiles getModifiedFiles changedFiles sendArgument changedFiles getRelativePath getLocalRoot changedFiles
On successful finish prune empty directories if the P or D option was specified protected I Status command Finished Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor I Status status throws CVS Exception If we didn t succeed don t do any post processing if status get Code CVS Status SERVER ERROR return status If pruning is enable prune empty directories after a commit if CVS Provider Plugin get Plugin get Prune Empty Directories NON NLS 1 new Prune Folder Visitor visit session resources Reset the timestamps of any committed files that are still dirty Only do so if there were no E messages from the server if status isOK for int i 0 i resources length i ICVS Resource resource resources i if resource is Folder ICVS File cvs File ICVS File resources i if cvs File exists cvs File is Modified null status merge Status status clear Modified State cvs File return status  IStatus commandFinished GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor IStatus CVSException getCode CVSStatus SERVER_ERROR CVSProviderPlugin getPlugin getPruneEmptyDirectories PruneFolderVisitor ICVSResource isFolder ICVSFile cvsFile ICVSFile cvsFile cvsFile isModified mergeStatus clearModifiedState cvsFile
protected I Status clear Modified State ICVS File cvs File throws CVS Exception byte info cvs File get Sync Bytes if info null There should be sync info Log the problem return new Status I Status WARNING CVS Provider Plugin ID 0 Policy bind Commit sync Info Missing cvs File getI Resource get Full Path to String null NON NLS 1 cvs File checked In null return new Status I Status INFO CVS Provider Plugin ID 0 Policy bind Commit timestamp Reset cvs File getI Resource get Full Path to String null NON NLS 1  IStatus clearModifiedState ICVSFile cvsFile CVSException cvsFile getSyncBytes IStatus CVSProviderPlugin syncInfoMissing cvsFile getIResource getFullPath toString cvsFile checkedIn IStatus CVSProviderPlugin timestampReset cvsFile getIResource getFullPath toString
We do not want to send the arguments here because we send them in send Requests To Server special handling protected void send Arguments Session session String arguments throws CVS Exception  sendRequestsToServer sendArguments CVSException
public final I Status execute Session session Global Option global Options Local Option local Options ICVS Resource arguments Collection files To Commit As Text I Command Output Listener listener I Progress Monitor pm throws CVS Exception session set Text Transfer Override files To Commit As Text try return super execute session global Options local Options arguments listener pm finally session set Text Transfer Override null  IStatus GlobalOption globalOptions LocalOption localOptions ICVSResource filesToCommitAsText ICommandOutputListener IProgressMonitor CVSException setTextTransferOverride filesToCommitAsText globalOptions localOptions setTextTransferOverride

class Copy Handler extends Response Handler public String get ResponseID return Copy file NON NLS 1  CopyHandler ResponseHandler getResponseID
public void handle Session session String local Dir I Progress Monitor monitor throws CVS Exception read additional data for the response String repository File session read Line String new File session read Line if session is No Local Changes session is Create Backups return Get the local file String file Name repository File substring repository File last Index Of 1 NON NLS 1 ICVS Folder m Parent session get Local Root get Folder local Dir ICVS File m File m Parent get File file Name Assert is True m Parent exists Assert is True m File exists m File is Managed rename the file m File copy To new File  localDir IProgressMonitor CVSException repositoryFile readLine newFile readLine isNoLocalChanges isCreateBackups fileName repositoryFile repositoryFile lastIndexOf ICVSFolder mParent getLocalRoot getFolder localDir ICVSFile mFile mParent getFile fileName isTrue mParent isTrue mFile mFile isManaged mFile copyTo newFile

protected CRLF Detect Input Stream Input Stream in ICVS Storage file super in try this filename get File Name file catch CVS Exception e this filename file get Name  CRLFDetectInputStream InputStream ICVSStorage getFileName CVSException getName
private String get File Name ICVS Storage storage throws CVS Exception String file Name if storage instanceof ICVS File ICVS File file ICVS File storage file Name file get Repository Relative Path if file Name null I Resource resource file getI Resource if resource null file Name file get Name else Use the resource path if there is one since the remote pat file Name file getI Resource get Full Path to String else file Name storage get Name return file Name  getFileName ICVSStorage CVSException fileName ICVSFile ICVSFile ICVSFile fileName getRepositoryRelativePath fileName IResource getIResource fileName getName fileName getIResource getFullPath toString fileName getName fileName
Wraps the underlying stream s method Translates CR LF sequences to L Fs transparently throws InterruptedIO Exception if the operation was interrupted before all of the bytes specified have been skipped bytes Transferred will be zero throws IO Exception if an i o error occurs public int read throws IO Exception int next in read if next 1 test ForCRLF byte next return next  LFs InterruptedIOException bytesTransferred IOException IOException testForCRLF
Wraps the underlying stream s method Translates CR LF sequences to L Fs transparently throws InterruptedIO Exception if the operation was interrupted before all of the bytes specified have been skipped bytes Transferred may be non zero throws IO Exception if an i o error occurs public int read byte buffer int off int len throws IO Exception int count super read buffer off len for int i off i count i test ForCRLF buffer i return count  LFs InterruptedIOException bytesTransferred IOException IOException testForCRLF
Test the byte to see if a CRLF sequence was read private void test ForCRLF byte next if reported return if previousCR next n CVS Provider Plugin log I Status WARNING Policy bind CRLF Detect Input Stream 0 filename null NON NLS 1 reported true previousCR next r  testForCRLF CVSProviderPlugin IStatus CRLFDetectInputStream

public static final Local Option BRIEF new Local Option brief NON NLS 1 protected Diff  LocalOption LocalOption
protected Diff protected String get Request Id return diff NON NLS 1  getRequestId
Overwritten to throw the CVS Diff Exception if the server returns an error because it just does so when there is a difference between the checked files protected I Status do Execute Session session Global Option global Options Local Option local Options String arguments I Command Output Listener listener I Progress Monitor monitor throws CVS Exception try return super do Execute session global Options local Options arguments listener monitor catch CVS Server Exception e if e contains Errors throw e return e get Status  CVSDiffException IStatus doExecute GlobalOption globalOptions LocalOption localOptions ICommandOutputListener IProgressMonitor CVSException doExecute globalOptions localOptions CVSServerException containsErrors getStatus
protected ICVS Resource send Local Resource State Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor throws CVS Exception check Resources Managed resources Diff Structure Visitor visitor new Diff Structure Visitor session visitor visit session resources monitor return resources  ICVSResource sendLocalResourceState GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor CVSException checkResourcesManaged DiffStructureVisitor DiffStructureVisitor
protected String get Server Error Message return Policy bind Diff server Error NON NLS 1  getServerErrorMessage serverError

class Diff Structure Visitor extends File Structure Visitor public Diff Structure Visitor Session session super session false true  DiffStructureVisitor FileStructureVisitor DiffStructureVisitor
Send unmanaged files as modified with a default entry line protected void send File ICVS File m File throws CVS Exception byte info m File get Sync Bytes if info null return Send the parent folder if it hasn t been sent already send Folder m File get Parent Policy check Canceled monitor session send Entry info null if m File exists return if m File is Modified null session send Modified m File Resource Sync Info is Binary info monitor else session send Unchanged m File  sendFile ICVSFile mFile CVSException mFile getSyncBytes sendFolder mFile getParent checkCanceled sendEntry mFile mFile isModified sendModified mFile ResourceSyncInfo isBinary sendUnchanged mFile

see org eclipse team internal ccvs core client Request get Request Id protected String get Request Id return editors NON NLS 1  getRequestId getRequestId
see org eclipse team internal ccvs core client Command is Workspace Modification protected boolean is Workspace Modification return false  isWorkspaceModification isWorkspaceModification

public class Expand Modules extends Request protected Expand Modules  ExpandModules ExpandModules
public class Expand Modules extends Request protected Expand Modules protected String get Request Id return expand modules NON NLS 1  ExpandModules ExpandModules getRequestId
public I Status execute Session session String modules I Progress Monitor monitor throws CVS Exception Reset the module expansions before the responses arrive session reset Module Expansion for int i 0 i modules length i session send Argument modules i return execute Request session Command DEFAULT OUTPUT LISTENER monitor  IStatus IProgressMonitor CVSException resetModuleExpansion sendArgument executeRequest DEFAULT_OUTPUT_LISTENER

private boolean send Empty Folders public File Structure Visitor Session session boolean send Empty Folders boolean send Modified Contents this session send Empty Folders send Modified Contents true  sendEmptyFolders FileStructureVisitor sendEmptyFolders sendModifiedContents sendEmptyFolders sendModifiedContents
public File Structure Visitor Session session boolean send Empty Folders boolean send Modified Contents boolean send Binary super session true send Modified Contents send Binary this send Empty Folders send Empty Folders  FileStructureVisitor sendEmptyFolders sendModifiedContents sendBinary sendModifiedContents sendBinary sendEmptyFolders sendEmptyFolders
see ICVS Resource Visitor visit File I Managed File public void visit File ICVS File m File throws CVS Exception send File m File  ICVSResourceVisitor visitFile IManagedFile visitFile ICVSFile mFile CVSException sendFile mFile
see ICVS Resource Visitor visit Folder ICVS Folder public void visit Folder ICVS Folder m Folder throws CVS Exception if send Empty Folders If we want to send empty folder that just send it when we come to it send Folder m Folder boolean exists m Folder exists boolean isCVS Folder m Folder isCVS Folder We are only interested in CVS folders A folder could be a non existant CVS folder if it is a holder for outgoing file deletions if isCVS Folder return if exists is Orphaned Subtree m Folder return Send files then the questionable folders then the managed folders ICVS Resource children m Folder members ICVS Folder ALL UNIGNORED MEMBERS send Files children send Questionable Folders children send Managed Folders children  ICVSResourceVisitor visitFolder ICVSFolder visitFolder ICVSFolder mFolder CVSException sendEmptyFolders sendFolder mFolder mFolder isCVSFolder mFolder isCVSFolder isCVSFolder isOrphanedSubtree mFolder ICVSResource mFolder ICVSFolder ALL_UNIGNORED_MEMBERS sendFiles sendQuestionableFolders sendManagedFolders
Method send Managed Folders param children private void send Managed Folders ICVS Resource children throws CVS Exception for int i 0 i children length i ICVS Resource resource children i if resource is Folder resource is Managed resource accept this  sendManagedFolders sendManagedFolders ICVSResource CVSException ICVSResource isFolder isManaged
Method send Questionable Folders param children private void send Questionable Folders ICVS Resource children throws CVS Exception for int i 0 i children length i ICVS Resource resource children i if resource is Folder resource is Managed resource accept this  sendQuestionableFolders sendQuestionableFolders ICVSResource CVSException ICVSResource isFolder isManaged
Method send Files param children private void send Files ICVS Resource children throws CVS Exception for int i 0 i children length i ICVS Resource resource children i if resource is Folder resource accept this  sendFiles sendFiles ICVSResource CVSException ICVSResource isFolder

public class Import extends Command Local options specific to import public static Local Option make Binary Wrapper Option String pattern return new Local Option W pattern k b NON NLS 1 NON NLS 2  LocalOption makeBinaryWrapperOption LocalOption
protected Import 
protected Import protected String get Request Id return import NON NLS 1  getRequestId
protected ICVS Resource compute Work Resources Session session Local Option local Options String arguments throws CVS Exception if arguments length 3 throw new Illegal Argument Exception return new ICVS Resource 0  ICVSResource computeWorkResources LocalOption localOptions CVSException IllegalArgumentException ICVSResource
protected I Status do Execute Session session Global Option global Options Local Option local Options String arguments I Command Output Listener listener I Progress Monitor monitor throws CVS Exception If the branch option is not provided a default value of 1 1 1 is used This is done to maintain reference client compatibility if find Option local Options b null NON NLS 1 Local Option new Local Options new Local Option local Options length 1 new Local Options 0 new Local Option b 1 1 1 NON NLS 1 NON NLS 2 System arraycopy local Options 0 new Local Options 1 local Options length local Options new Local Options return super do Execute session global Options local Options arguments listener monitor  IStatus doExecute GlobalOption globalOptions LocalOption localOptions ICommandOutputListener IProgressMonitor CVSException findOption localOptions LocalOption newLocalOptions LocalOption localOptions newLocalOptions LocalOption localOptions newLocalOptions localOptions localOptions newLocalOptions doExecute globalOptions localOptions
protected ICVS Resource send Local Resource State Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor throws CVS Exception ICVS Resource Visitor visitor new Import Structure Visitor session collect Option Arguments local Options W monitor NON NLS 1 session get Local Root accept visitor return resources  ICVSResource sendLocalResourceState GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor CVSException ICVSResourceVisitor ImportStructureVisitor collectOptionArguments localOptions getLocalRoot
protected void send Local Working Directory Session session throws CVS Exception session send Constructed Root Directory  sendLocalWorkingDirectory CVSException sendConstructedRootDirectory

Constructor for Import Structure Visitor param request Sender param m Root param monitor public Import Structure Visitor Session session String wrappers I Progress Monitor monitor this session session this monitor Policy infinite Sub Monitor For monitor 512 this wrappers wrappers wrap Matcher init Wrap Matcher wrappers  ImportStructureVisitor requestSender mRoot ImportStructureVisitor IProgressMonitor infiniteSubMonitorFor wrapMatcher initWrapMatcher
Inits the wrap Matcher that is responsible to find out whether a file is to be send as a binary on an import or not Takes wrappers of this format class k o and inits the File Name Matcher to give ko back if you call it with match somename class ignores all wrappers that do not contain k private File Name Matcher init Wrap Matcher String wrappers File Name Matcher wrap Matcher if wrappers null return null wrap Matcher new File Name Matcher for int i 0 i wrappers length i if wrappers i index Of KEYWORD OPTION 1 continue String Tokenizer st new String Tokenizer wrappers i String pattern st next Token String option st next Token get rid of the quotes String Tokenizer quote St new String Tokenizer st next Token QUOTE option quote St next Token wrap Matcher register pattern option return wrap Matcher  wrapMatcher FileNameMatcher FileNameMatcher initWrapMatcher FileNameMatcher wrapMatcher wrapMatcher FileNameMatcher indexOf KEYWORD_OPTION StringTokenizer StringTokenizer nextToken nextToken StringTokenizer quoteSt StringTokenizer nextToken quoteSt nextToken wrapMatcher wrapMatcher
see ICVS Resource Visitor visit File I Managed File public void visit File ICVS File m File throws CVS Exception if ignore Matcher null ignore Matcher match m File get Name return boolean binary Team get Type I File m File getI Resource Team BINARY if wrap Matcher null String mode wrap Matcher get Match m File get Name if mode null binary K Subst Option from Mode mode is Binary session send Modified m File binary monitor  ICVSResourceVisitor visitFile IManagedFile visitFile ICVSFile mFile CVSException ignoreMatcher ignoreMatcher mFile getName getType IFile mFile getIResource wrapMatcher wrapMatcher getMatch mFile getName KSubstOption fromMode isBinary sendModified mFile
see ICVS Resource Visitor visit Folder ICVS Folder public void visit Folder ICVS Folder m Folder throws CVS Exception if ignore Matcher null ignore Matcher match m Folder get Name return String local Path m Folder get Relative Path session get Local Root monitor sub Task Policy bind Abstract Structure Visitor sending Folder local Path NON NLS 1 session send Constructed Directory local Path m Folder accept Children this  ICVSResourceVisitor visitFolder ICVSFolder visitFolder ICVSFolder mFolder CVSException ignoreMatcher ignoreMatcher mFolder getName localPath mFolder getRelativePath getLocalRoot subTask AbstractStructureVisitor sendingFolder localPath sendConstructedDirectory localPath mFolder acceptChildren

private K Subst Option ksubst Mode public AdminK Subst Listener K Subst Option ksubst Mode this ksubst Mode ksubst Mode  KSubstOption ksubstMode AdminKSubstListener KSubstOption ksubstMode ksubstMode ksubstMode
public I Status message Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor if line starts With RCS file NON NLS 1 String rcs File line substring 10 trim if rcs File ends With v NON NLS 1 return new CVS Status CVS Status ERROR Policy bind AdminK Subst Listener expectedRCS File rcs File NON NLS 1 String remote Root Location null try Folder Sync Info info command Root get Folder Sync Info remote Root Location info get Remote Location catch CVS Exception e return e get Status if remote Root Location null return new CVS Status CVS Status ERROR Policy bind AdminK Subst Listener command Root Not Managed NON NLS 1 I Path rcs File Path new Path rcs File substring 0 rcs File length 2 I Path remote Root Path new Path remote Root Location if remote Root Path is Prefix Of rcs File Path return new CVS Status CVS Status ERROR Policy bind AdminK Subst Listener expected Child Of Command Root NON NLS 1 rcs File Path to String remote Root Path to String rcs File Path rcs File Path remove First Segments remote Root Path segment Count try ICVS File file command Root get File rcs File Path to String Resource Sync Info info file get Sync Info byte sync Bytes file get Sync Bytes if sync Bytes null only update sync info if we have it locally file set Sync Bytes Resource Sync Info set Keyword Mode sync Bytes ksubst Mode ICVS File UNKNOWN catch CVS Exception e return new CVS Status CVS Status ERROR Policy bind AdminK Subst Listener could Not Set Resource Sync Info NON NLS 1 rcs File Path to String e to String return OK  IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor startsWith rcsFile rcsFile endsWith CVSStatus CVSStatus AdminKSubstListener expectedRCSFile rcsFile remoteRootLocation FolderSyncInfo commandRoot getFolderSyncInfo remoteRootLocation getRemoteLocation CVSException getStatus remoteRootLocation CVSStatus CVSStatus AdminKSubstListener commandRootNotManaged IPath rcsFilePath rcsFile rcsFile IPath remoteRootPath remoteRootLocation remoteRootPath isPrefixOf rcsFilePath CVSStatus CVSStatus AdminKSubstListener expectedChildOfCommandRoot rcsFilePath toString remoteRootPath toString rcsFilePath rcsFilePath removeFirstSegments remoteRootPath segmentCount ICVSFile commandRoot getFile rcsFilePath toString ResourceSyncInfo getSyncInfo syncBytes getSyncBytes syncBytes setSyncBytes ResourceSyncInfo setKeywordMode syncBytes ksubstMode ICVSFile CVSException CVSStatus CVSStatus AdminKSubstListener couldNotSetResourceSyncInfo rcsFilePath toString toString

String error public String get Error return error  getError
public I Status message Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor CVS Annotate Block a Block new CVS Annotate Block line line Number if a Block is Valid error line Make sure all lines have a line terminator try a Stream write line substring a Block get Source Offset get Bytes if line ends With r line ends With r n NON NLS 1 NON NLS 2 a Stream write System get Property line separator get Bytes NON NLS 1 catch IO Exception e add a Block return OK  IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor CVSAnnotateBlock aBlock CVSAnnotateBlock lineNumber aBlock isValid aStream aBlock getSourceOffset getBytes endsWith endsWith aStream getProperty getBytes IOException aBlock
public Input Stream get Contents return new Byte Array Input Stream a Stream to Byte Array  InputStream getContents ByteArrayInputStream aStream toByteArray
public List get Cvs Annotate Blocks return blocks  getCvsAnnotateBlocks
Add an annotate block to the receiver merging this block with the previous block if it is part of the same change param a Block private void add CVS Annotate Block a Block int size blocks size if size 0 blocks add a Block else CVS Annotate Block last Block CVS Annotate Block blocks get size 1 if last Block get Revision equals a Block get Revision last Block set End Line a Block get Start Line else blocks add a Block  aBlock CVSAnnotateBlock aBlock aBlock CVSAnnotateBlock lastBlock CVSAnnotateBlock lastBlock getRevision aBlock getRevision lastBlock setEndLine aBlock getStartLine aBlock
public boolean has Error return error null  hasError
public I Status error Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor if line starts With Policy bind Annotate Listener 3 NON NLS 1 error Policy bind Annotate Listener 4 NON NLS 1 return new CVS Status CVS Status ERROR CVS Status SERVER ERROR command Root error return super error Line line location command Root monitor  IStatus errorLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor startsWith AnnotateListener AnnotateListener CVSStatus CVSStatus CVSStatus SERVER_ERROR commandRoot errorLine commandRoot
Set the contents of the listener to the provided contents This is done if the contents fetched by the annotate command has a charater set that may have been mangled by the transfer param remote Contents the actual contens of the file public void set Contents Input Stream remote Contents try Byte Array Output Stream stream new Byte Array Output Stream byte buffer new byte 1024 int n remote Contents read buffer while n 1 stream write buffer 0 n n remote Contents read buffer a Stream stream catch IO Exception e Log and continue CVS Provider Plugin log CVS Exception wrap Exception e  remoteContents setContents InputStream remoteContents ByteArrayOutputStream ByteArrayOutputStream remoteContents remoteContents aStream IOException CVSProviderPlugin CVSException wrapException

public interface I File Diff Listener public void file Diff String local File Path String remote File Path String left Revision  IFileDiffListener fileDiff localFilePath remoteFilePath leftRevision
public Compare Diff Listener I File Diff Listener listener this listener listener  CompareDiffListener IFileDiffListener
public I Status message Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor ignore any server messages if get Server Message line location null return OK Map map LOCAL FILE MATCHER process Server Message line if map null local File Path String map get local File NON NLS 1 return OK map REMOTE FILE MATCHER process Server Message line if map null remote File Path String map get remote File NON NLS 1 return OK map REVISION LINE MATCHER process Server Message line if map null left Revision String map get left Revision NON NLS 1 right Revision String map get right Revision NON NLS 1 if local File Path null remote File Path null return new CVS Status I Status ERROR Policy bind Compare Diff Listener 11 NON NLS 1 listener file Diff local File Path remote File Path left Revision right Revision local File Path remote File Path left Revision right Revision null return OK Ignore all other lines return OK  IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor getServerMessage LOCAL_FILE_MATCHER processServerMessage localFilePath localFile REMOTE_FILE_MATCHER processServerMessage remoteFilePath remoteFile REVISION_LINE_MATCHER processServerMessage leftRevision leftRevision rightRevision rightRevision localFilePath remoteFilePath CVSStatus IStatus CompareDiffListener fileDiff localFilePath remoteFilePath leftRevision rightRevision localFilePath remoteFilePath leftRevision rightRevision
private I Status handle Unknown Diff Format String line return new CVS Status I Status ERROR Policy bind Compare Diff Listener 12 line NON NLS 1  IStatus handleUnknownDiffFormat CVSStatus IStatus CompareDiffListener
public I Status error Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor ignore server messages for now this is used only with the diff request and the errors can be safely ignored if get Server Message line location null return OK return super error Line line location command Root monitor  IStatus errorLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor getServerMessage errorLine commandRoot

Print Stream patch Stream public Diff Listener Print Stream patch Stream this patch Stream patch Stream  PrintStream patchStream DiffListener PrintStream patchStream patchStream patchStream
public I Status message Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor Ensure that the line doesn t end with a CR This can happen if the remote file has CR LF in it if line length 0 line char At line length 1 r line line substring 0 line length 1 patch Stream println line return OK  IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor charAt patchStream
public I Status error Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor ignore server messages for now this is used only with the diff request and the errors can be safely ignored if get Server Message line location null return OK return super error Line line location command Root monitor  IStatus errorLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor getServerMessage errorLine commandRoot

Constructor Editors Listener public Editors Listener  EditorsListener EditorsListener
see org eclipse team internal ccvs core client listeners I Command Output Listener message Line java lang String org eclipse team internal ccvs core ICVS Repository Location org eclipse team internal ccvs core ICVS Folder org eclipse core runtime I Progress Monitor public I Status message Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor If there is a file with multiple editors then cvs will write the filename only in the first line and the following line will start with a Tab if line starts With t NON NLS 1 line file Name line Editors Info info new Editors Info String Tokenizer tokenizer new String Tokenizer line t NON NLS 1 int i 0 while tokenizer has More Tokens String token tokenizer next Token switch i case 0 info set File Name token file Name token break case 1 info set User Name token break case 2 info set Date String token break case 3 info set Computer Name token break default break i infos add info return OK  ICommandOutputListener messageLine ICVSRepositoryLocation ICVSFolder IProgressMonitor IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor startsWith fileName EditorsInfo EditorsInfo StringTokenizer StringTokenizer hasMoreTokens nextToken setFileName fileName setUserName setDateString setComputerName
Method get Editors Infos return I Editors Info public Editors Info get Editors Infos return Editors Info infos to Array new Editors Info infos size  getEditorsInfos IEditorsInfo EditorsInfo getEditorsInfos EditorsInfo toArray EditorsInfo

Invoked when a message line is received from the server p Any status other than I Command Output Listener OK will be accumulated by the command and returned The severity of the status matches those of I Status and must indicate whether this is a warning error or informational text while the code should be one of the codes provided by CVS Status The status code must not be CVS Status SERVER ERROR p param line the line of message text sent by the server param command Root the root directory of the command param monitor the progress monitor return a status indicating success or failure based on the text public I Status message Line String line ICVS Repository Location location ICVS Folder command Root  ICommandOutputListener IStatus CVSStatus CVSStatus SERVER_ERROR commandRoot IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot
Invoked when an error line is received from the server p Any status other than I Command Output Listener OK will be accumulated by the command and returned The severity of the status matches those of I Status and must indicate whether this is a warning error or informational text while the code should be one of the codes provided by CVS Status The status code must not be CVS Status SERVER ERROR p param line the line of error text sent by the server param command Root the root directory of the command param monitor the progress monitor return a status indicating success or failure based on the text public I Status error Line String line ICVS Repository Location location ICVS Folder command Root  ICommandOutputListener IStatus CVSStatus CVSStatus SERVER_ERROR commandRoot IStatus errorLine ICVSRepositoryLocation ICVSFolder commandRoot

public interface I Console Listener Called when a command is invoked param line the command invocation string  IConsoleListener
Called when a line of message text has been received param line the line of text 
Called when a line of error text has been received param line the line of text 
Called when a command has been completed param status the status code or null if not applicable param exception an exception or null if not applicable 

Provides access to the revision of a file through the use of the Status command param command Root the root directory of the command param path the absolute remote path of the resource including the repository root directory param remote Revision the remote revision of the file  commandRoot remoteRevision

public interface I Update Message Listener Notification that a directory which may or may not have been reported by directory Information does not exist param command Root the root directory of the command param path the path of the directory relative to the command Root  IUpdateMessageListener directoryInformation commandRoot commandRoot
public void directory Does Not Exist ICVS Folder command Root String path Notification of information about a directory param command Root the root directory of the command param path the path of the directory relative to the command Root param new Directory true if the directory does not exist locally i e in the command Root hierarchy  directoryDoesNotExist ICVSFolder commandRoot commandRoot commandRoot newDirectory commandRoot
public void directory Information ICVS Folder command Root String path boolean new Directory Notification of information about a file param type the type of update for the file see Update for type constants param command Root the root directory of the command param filename the path of the file relative to the command Root  directoryInformation ICVSFolder commandRoot newDirectory commandRoot commandRoot
public void file Information int type ICVS Folder parent String filename Notification that a file does not exists remotely param command Root the root directory of the command param filename the path of the file relative to the command Root  fileInformation ICVSFolder commandRoot commandRoot

public Log Entry Remote File file String revision String author Date date String comment String state CVS Tag tags this file file to Revision revision this author author this date date this comment comment this state state this tags tags  LogEntry RemoteFile CVSTag toRevision
see I Log Entry get Revision public String get Revision return file get Revision  ILogEntry getRevision getRevision getRevision
see I Log Entry get Author public String get Author return author  ILogEntry getAuthor getAuthor
see I Log Entry get Date public Date get Date return date  ILogEntry getDate getDate
see I Log Entry get Comment public String get Comment return comment  ILogEntry getComment getComment
see I Log Entry get State public String get State return state  ILogEntry getState getState
see I Log Entry get Tags public CVS Tag get Tags CVS Tag result new CVS Tag tags length System arraycopy tags 0 result 0 tags length return result  ILogEntry getTags CVSTag getTags CVSTag CVSTag
see I Log Entry get Remote File public ICVS Remote File get Remote File return file  ILogEntry getRemoteFile ICVSRemoteFile getRemoteFile
see I Log Entry is Deletion public boolean is Deletion return get State equals dead NON NLS 1  ILogEntry isDeletion isDeletion getState

Constructor used to get the log information for one or more files public Log Listener this current File null this current File Entries new Array List  LogListener currentFile currentFileEntries ArrayList
Constructor used to get the log information for one file public Log Listener Remote File file List entries this current File file this current File Entries entries this entries put file get Repository Relative Path entries  LogListener RemoteFile currentFile currentFileEntries getRepositoryRelativePath
Return the log entry for the given remote file The revision of the remote file is used to determine which log entry to return If no log entry was fetched code null code is returned public I Log Entry get Entry For ICVS Remote File file List file Entries List entries get file get Repository Relative Path if file Entries null for Iterator iter file Entries iterator iter has Next I Log Entry entry I Log Entry iter next try if entry get Revision equals file get Revision return entry catch Team Exception e Log and continue CVS Provider Plugin log e return null  ILogEntry getEntryFor ICVSRemoteFile fileEntries getRepositoryRelativePath fileEntries fileEntries hasNext ILogEntry ILogEntry getRevision getRevision TeamException CVSProviderPlugin
public I Log Entry get Entries For ICVS Remote File file List file Entries List entries get file get Repository Relative Path if file Entries null return I Log Entry file Entries to Array new I Log Entry file Entries size return new I Log Entry 0  ILogEntry getEntriesFor ICVSRemoteFile fileEntries getRepositoryRelativePath fileEntries ILogEntry fileEntries toArray ILogEntry fileEntries ILogEntry
public I Status message Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor Fields we will find in the log for a file keys String tag name values String tag revision number switch state case BEGIN if line starts With RCS file NON NLS 1 We are starting to recieve the log for a file String file Name get Relative File Path location line substring 10 trim if file Name null We couldn t determine the file name so dump the entries current File null current File Entries new Array List else if current File null current File get Repository Relative Path equals file Name We are starting another file current File Remote File create file Name location current File Entries List entries get current File get Repository Relative Path if current File Entries null current File Entries new Array List entries put current File get Repository Relative Path current File Entries tag Names clear tag Revisions clear else if line starts With symbolic names NON NLS 1 state SYMBOLIC NAMES else if line starts With revision NON NLS 1 revision line substring 9 state REVISION break case SYMBOLIC NAMES if line starts With keyword substitution NON NLS 1 state BEGIN else int first Colon line index Of String tag Name line substring 1 first Colon String tag Revision line substring first Colon 2 tag Names add tag Name tag Revisions add tag Revision break case REVISION date 2000 06 19 04 56 21 author somebody state Exp lines 114 45 get the creation date int end Of Date Index line index Of 6 creation Date line substring 6 end Of Date Index GMT NON NLS 1 get the author name int end Of Author Index line index Of end Of Date Index 1 author line substring end Of Date Index 11 end Of Author Index get the file state because this revision might be dead file State line substring end Of Author Index 10 line index Of end Of Author Index 1 comment new String Buffer state COMMENT break case COMMENT skip next line info about branches if it exists if not then it is a comment line if line starts With branches break NON NLS 1 if line equals NON NLS 1 line equals NON NLS 1 state DONE break if comment length 0 comment append n comment append line break if state DONE we are only interested in tag names for this revision remove all others List this Revision Tags new Array List 3 for int i 0 i tag Names size i String tag Name String tag Names get i String tag Revision String tag Revisions get i If this is a branch tag then only include this tag with the revision that is the root of this branch e g 1 1 is root of branch 1 1 2 boolean is Branch is Branch Tag tag Revision if is Branch int last Dot tag Revision last Index Of if last Dot 1 CVS Provider Plugin log I Status ERROR Policy bind Log Listener invalid Revision Format tag Name tag Revision null NON NLS 1 else if tag Revision char At last Dot 1 0 tag Revision char At last Dot 2 last Dot last Dot 2 tag Revision tag Revision substring 0 last Dot if tag Revision equals revision int type is Branch CVS Tag BRANCH CVS Tag VERSION this Revision Tags add new CVS Tag tag Name type Date date Date Util convert From Log Time creation Date if current File null Log Entry entry new Log Entry current File revision author date comment to String file State CVS Tag this Revision Tags to Array new CVS Tag 0 current File Entries add entry state BEGIN return OK  IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor startsWith fileName getRelativeFilePath fileName currentFile currentFileEntries ArrayList currentFile currentFile getRepositoryRelativePath fileName currentFile RemoteFile fileName currentFileEntries currentFile getRepositoryRelativePath currentFileEntries currentFileEntries ArrayList currentFile getRepositoryRelativePath currentFileEntries tagNames tagRevisions startsWith SYMBOLIC_NAMES startsWith SYMBOLIC_NAMES startsWith firstColon indexOf tagName firstColon tagRevision firstColon tagNames tagName tagRevisions tagRevision endOfDateIndex indexOf creationDate endOfDateIndex endOfAuthorIndex indexOf endOfDateIndex endOfDateIndex endOfAuthorIndex fileState endOfAuthorIndex indexOf endOfAuthorIndex StringBuffer startsWith thisRevisionTags ArrayList tagNames tagName tagNames tagRevision tagRevisions isBranch isBranchTag tagRevision isBranch lastDot tagRevision lastIndexOf lastDot CVSProviderPlugin IStatus LogListener invalidRevisionFormat tagName tagRevision tagRevision charAt lastDot tagRevision charAt lastDot lastDot lastDot tagRevision tagRevision lastDot tagRevision isBranch CVSTag CVSTag thisRevisionTags CVSTag tagName DateUtil convertFromLogTime creationDate currentFile LogEntry LogEntry currentFile toString fileState CVSTag thisRevisionTags toArray CVSTag currentFileEntries
public I Status error Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor String server Message get Server Message line location if server Message null look for the following condition E cvs server nothing known about file Name if server Message starts With NOTHING KNOWN ABOUT return new CVS Status I Status ERROR CVS Status DOES NOT EXIST command Root line return OK  IStatus errorLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor serverMessage getServerMessage serverMessage fileName serverMessage startsWith NOTHING_KNOWN_ABOUT CVSStatus IStatus CVSStatus DOES_NOT_EXIST commandRoot
branch tags have odd number of segments or have an even number with a zero as the second last segment e g 1 1 1 1 26 0 2 are branch revision numbers protected boolean is Branch Tag String tag Name First check if we have an odd number of segments i e even number of dots int number Of Dots 0 int last Dot 0 for int i 0 i tag Name length i if tag Name char At i number Of Dots last Dot i if number Of Dots 2 0 return true if number Of Dots 1 return false If not check if the second lat segment is a zero if tag Name char At last Dot 1 0 tag Name char At last Dot 2 return true return false  isBranchTag tagName numberOfDots lastDot tagName tagName charAt numberOfDots lastDot numberOfDots numberOfDots tagName charAt lastDot tagName charAt lastDot
private String get Relative File Path ICVS Repository Location location String file Name if file Name ends With v NON NLS 1 file Name file Name substring 0 file Name length 2 file Name Util remove Attic Segment file Name String root Directory location get Root Directory if file Name starts With root Directory try file Name Util get Relative Path root Directory file Name catch CVS Exception e CVS Provider Plugin log e return null return file Name  getRelativeFilePath ICVSRepositoryLocation fileName fileName endsWith fileName fileName fileName fileName removeAtticSegment fileName rootDirectory getRootDirectory fileName startsWith rootDirectory fileName getRelativePath rootDirectory fileName CVSException CVSProviderPlugin fileName

private Map module Map public Module Definitions Listener reset  moduleMap ModuleDefinitionsListener
public I Status message Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor Lines that start with a space indicate a multi line entry if line char At 0 last Line line line last Line else last Line line Use the module name as the key so that multi line modules will be recorded properly int first Space line index Of NON NLS 1 if first Space 1 String module line substring 0 first Space module Map put module line return OK  IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor charAt lastLine lastLine lastLine firstSpace indexOf firstSpace firstSpace moduleMap
public String get Module Expansions return String module Map values to Array new String module Map size  getModuleExpansions moduleMap toArray moduleMap
public void reset this module Map new Hash Map  moduleMap HashMap

Module Expansion String module Name String expansions Local Option options this module Name module Name this expansions expansions this options options  ModuleExpansion moduleName LocalOption moduleName moduleName
see I Module Expansion get Module Name public String get Module Name return module Name  IModuleExpansion getModuleName getModuleName moduleName
see I Module Expansion get Module Expansion String public String get Module Expansion String String result expansions 0 for int i 1 i expansions length i result result expansions i NON NLS 1 return result  IModuleExpansion getModuleExpansionString getModuleExpansionString
see I Module Expansion get Expansions public String get Expansions return expansions  IModuleExpansion getExpansions getExpansions
public Local Option get Options return options  LocalOption getOptions
Translate an array of module names to their expansions The resulting List of Strings may be bigger than the original private List get Expansions For String possible Modules Map module Mappings int depth throws CVS Exception List result new Array List for int i 0 i possible Modules length i Is it a module if possible Modules i char At 0 result add All get Expansions For possible Modules i substring 1 module Mappings depth else result add possible Modules i return result  getExpansionsFor possibleModules moduleMappings CVSException ArrayList possibleModules possibleModules charAt addAll getExpansionsFor possibleModules moduleMappings possibleModules
Translate a module name to its expansion The resulting List may contain one or more Strings private List get Expansions For String module Map module Mappings int depth throws CVS Exception if depth module Mappings size Indicate that a circular reference exists throw new CVS Exception Policy bind Module Expansion circular module NON NLS 1 Object mappings module Mappings get module if mappings null If there s no mapping assume it is a project name List result new Array List result add module return result else Follow any expansion chains return get Expansions For Module Expansion mappings expansions module Mappings depth 1  getExpansionsFor moduleMappings CVSException moduleMappings CVSException ModuleExpansion moduleMappings ArrayList getExpansionsFor ModuleExpansion moduleMappings
Resolve the module mappings using module Mappings which maps module names to their Module Expansion public void resolve Module References Using Map module Mappings try List result get Expansions For expansions module Mappings 0 expansions String result to Array new String result size catch CVS Exception e Is this the best way to show the circular reference problem Or should we just leave the expansions untouched List result new Array List result add e get Status get Message result add All Arrays as List expansions expansions String result to Array new String result size  moduleMappings ModuleExpansion resolveModuleReferencesUsing moduleMappings getExpansionsFor moduleMappings toArray CVSException ArrayList getStatus getMessage addAll asList toArray

public static void initialize Patterns try DIRECTORY MATCHER new Server Message Line Matcher I Message Patterns RDIFF DIRECTORY new String REMOTE FOLDER PATH VARIABLE NAME FILE DIFF MATCHER new Server Message Line Matcher I Message Patterns RDIFF SUMMARY FILE DIFF new String REMOTE FILE PATH VARIABLE NAME LEFT REVISION VARIABLE NAME RIGHT REVISION VARIABLE NAME NEW FILE MATCHER new Server Message Line Matcher I Message Patterns RDIFF SUMMARY NEW FILE new String REMOTE FILE PATH VARIABLE NAME RIGHT REVISION VARIABLE NAME DELETED FILE MATCHER new Server Message Line Matcher I Message Patterns RDIFF SUMMARY DELETED FILE new String REMOTE FILE PATH VARIABLE NAME DELETED FILE MATCHER2 new Server Message Line Matcher I Message Patterns RDIFF SUMMARY DELETED FILE2 new String REMOTE FILE PATH VARIABLE NAME LEFT REVISION VARIABLE NAME catch CVS Exception e This is serious as the listener will not function properly CVS Provider Plugin log e  initializePatterns DIRECTORY_MATCHER ServerMessageLineMatcher IMessagePatterns RDIFF_DIRECTORY REMOTE_FOLDER_PATH_VARIABLE_NAME FILE_DIFF_MATCHER ServerMessageLineMatcher IMessagePatterns RDIFF_SUMMARY_FILE_DIFF REMOTE_FILE_PATH_VARIABLE_NAME LEFT_REVISION_VARIABLE_NAME RIGHT_REVISION_VARIABLE_NAME NEW_FILE_MATCHER ServerMessageLineMatcher IMessagePatterns RDIFF_SUMMARY_NEW_FILE REMOTE_FILE_PATH_VARIABLE_NAME RIGHT_REVISION_VARIABLE_NAME DELETED_FILE_MATCHER ServerMessageLineMatcher IMessagePatterns RDIFF_SUMMARY_DELETED_FILE REMOTE_FILE_PATH_VARIABLE_NAME DELETED_FILE_MATCHER2 ServerMessageLineMatcher IMessagePatterns RDIFF_SUMMARY_DELETED_FILE2 REMOTE_FILE_PATH_VARIABLE_NAME LEFT_REVISION_VARIABLE_NAME CVSException CVSProviderPlugin
public interface I File Diff Listener public void file Diff String remote File Path String left Revision String right Revision  IFileDiffListener fileDiff remoteFilePath leftRevision rightRevision
String left Revision String right Revision public void new File String remote File Path String right Revision  leftRevision rightRevision newFile remoteFilePath rightRevision
String remote File Path String right Revision public void deleted File String remote File Path String left Revision  remoteFilePath rightRevision deletedFile remoteFilePath leftRevision
String remote File Path String left Revision public void directory String remote Folder Path  remoteFilePath leftRevision remoteFolderPath
public R Diff Summary Listener I File Diff Listener listener this listener listener  RDiffSummaryListener IFileDiffListener
public I Status message Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor Map variables FILE DIFF MATCHER process Server Message line if variables null listener file Diff String variables get REMOTE FILE PATH VARIABLE NAME String variables get LEFT REVISION VARIABLE NAME String variables get RIGHT REVISION VARIABLE NAME return OK variables NEW FILE MATCHER process Server Message line if variables null listener new File String variables get REMOTE FILE PATH VARIABLE NAME String variables get RIGHT REVISION VARIABLE NAME return OK variables DELETED FILE MATCHER process Server Message line if variables null listener deleted File String variables get REMOTE FILE PATH VARIABLE NAME null return OK variables DELETED FILE MATCHER2 process Server Message line if variables null listener deleted File String variables get REMOTE FILE PATH VARIABLE NAME String variables get LEFT REVISION VARIABLE NAME return OK return super message Line line location command Root monitor  IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor FILE_DIFF_MATCHER processServerMessage fileDiff REMOTE_FILE_PATH_VARIABLE_NAME LEFT_REVISION_VARIABLE_NAME RIGHT_REVISION_VARIABLE_NAME NEW_FILE_MATCHER processServerMessage newFile REMOTE_FILE_PATH_VARIABLE_NAME RIGHT_REVISION_VARIABLE_NAME DELETED_FILE_MATCHER processServerMessage deletedFile REMOTE_FILE_PATH_VARIABLE_NAME DELETED_FILE_MATCHER2 processServerMessage deletedFile REMOTE_FILE_PATH_VARIABLE_NAME LEFT_REVISION_VARIABLE_NAME messageLine commandRoot
public I Status error Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor Map variables DIRECTORY MATCHER process Server Message line if variables null listener directory String variables get REMOTE FOLDER PATH VARIABLE NAME return OK return super error Line line location command Root monitor  IStatus errorLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor DIRECTORY_MATCHER processServerMessage REMOTE_FOLDER_PATH_VARIABLE_NAME errorLine commandRoot

public Server Message Line Matcher String template String expected Variables throws CVS Exception Extract the variable names from the template Matcher matcher VARIABLE MATCHING PATTERN matcher template List variables new Array List while matcher find if matcher group Count 2 throw new CVS Exception Policy bind Server Message Line Matcher 5 template NON NLS 1 variables add matcher group 2 ensure Matches template variables expected Variables this variables String variables to Array new String variables size Modify the template so it can be used to match message lines from the server i e remove the variable markup for Iterator iter variables iterator iter has Next String element String iter next template template replace All element NON NLS 1 NON NLS 2 template template replace All element NON NLS 1 NON NLS 2 Ensure that the number of groups in the pattern match the number of variables int count 0 int start 1 while start template index Of start 1 1 count if count variables size throw new CVS Exception Policy bind Server Message Line Matcher 6 template NON NLS 1 Create the pattern fir matching lines from the server this pattern Pattern compile template  ServerMessageLineMatcher expectedVariables CVSException VARIABLE_MATCHING_PATTERN ArrayList groupCount CVSException ServerMessageLineMatcher ensureMatches expectedVariables toArray hasNext replaceAll replaceAll indexOf CVSException ServerMessageLineMatcher
private void ensure Matches String template List variables String expected Variables throws CVS Exception for int i 0 i expected Variables length i String expected expected Variables i if variables contains expected throw new CVS Exception Policy bind Server Message Line Matcher 7 expected template NON NLS 1  ensureMatches expectedVariables CVSException expectedVariables expectedVariables CVSException ServerMessageLineMatcher
public Map process Server Message String line Matcher matcher pattern matcher line if matcher find return null Assert is True matcher group Count variables length Map result new Hash Map for int i 1 i matcher group Count i result put variables i 1 matcher group i return result  processServerMessage isTrue groupCount HashMap groupCount
public boolean matches String line Matcher matcher pattern matcher line return matcher find 

private I Status Listener status Listener public Status Listener I Status Listener status Listener this status Listener status Listener  IStatusListener statusListener StatusListener IStatusListener statusListener statusListener statusListener
public I Status message Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor We re only concerned about file revisions if line starts With Repository revision NON NLS 1 if line starts With Repository revision No revision control file NON NLS 1 int separating Tab Index line index Of t 24 String remote Revision line substring 24 separating Tab Index This is the full location on the server e g home cvs repo project file txt String file Location line substring separating Tab Index 1 line length 2 Inform the listener about the file revision status Listener file Status command Root remove Attic Segment file Location remote Revision return OK  IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor startsWith startsWith separatingTabIndex indexOf remoteRevision separatingTabIndex fileLocation separatingTabIndex statusListener fileStatus commandRoot removeAtticSegment fileLocation remoteRevision
public I Status error Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor String server Message get Server Message line location if server Message null if server Message starts With conflict NON NLS 1 We get this because we made up an entry line to send to the server Therefore we make this a warning return new CVS Status CVS Status WARNING CVS Status CONFLICT command Root line if server Message starts With Examining NON NLS 1 is Folder true return OK if is Folder This used to do something but it was obviously wrong and there was no indication why it was needed Therefore I have removed the code to see if anything is effected is Folder false return super error Line line location command Root monitor  IStatus errorLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor serverMessage getServerMessage serverMessage serverMessage startsWith CVSStatus CVSStatus CVSStatus commandRoot serverMessage startsWith isFolder isFolder isFolder errorLine commandRoot
If the status returns that the file is in the Attic then remove the Attic segment This is because files added to a branch that are not in the main trunk HEAD are added to the Attic but cvs does magic on updateto put them in the correct location e g project Attic file txt project file txt private String remove Attic Segment String path return Util remove Attic Segment path  removeAtticSegment removeAtticSegment

public I Status message Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor Received a warning in the form W folder file v1 already exists on version 1 2 NOT MOVING tag to version 1 3 Indicate this as an error since no tagging was done if line char At 0 W return new CVS Status CVS Status ERROR CVS Status TAG ALREADY EXISTS command Root line substring 2 return OK  IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor charAt CVSStatus CVSStatus CVSStatus TAG_ALREADY_EXISTS commandRoot
public I Status error Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor Ignore the lines Tagging folder1 folder2 String server Message get Server Message line location if server Message null server Message starts With Tagging NON NLS 1 return OK String rtag Message get ServerR Tag Message line location if rtag Message null rtag Message starts With Tagging NON NLS 1 return OK return super error Line line location command Root monitor  IStatus errorLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor serverMessage getServerMessage serverMessage serverMessage startsWith rtagMessage getServerRTagMessage rtagMessage rtagMessage startsWith errorLine commandRoot

String merged Binary File Revision merged Binary File Path public Update Listener I Update Message Listener update Message Listener this update Message Listener update Message Listener  mergedBinaryFileRevision mergedBinaryFilePath UpdateListener IUpdateMessageListener updateMessageListener updateMessageListener updateMessageListener
public I Status message Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor merging Binary false if update Message Listener null return OK if line starts With Merging differences NON NLS 1 merging true else if line index Of 1 We have a message that indicates the type of update The possible messages are defined by the prefix constants MLP  String path line substring 2 char change Type line char At 0 calculate change type int type 0 switch change Type case A type Update STATE ADDED LOCAL break new file locally that was added but not comitted to server yet case type Update STATE UNKOWN break new file locally but not added to server case U type Update STATE REMOTE CHANGES break remote changes to an unmodified local file case R type Update STATE DELETED break removed locally but still exists on the server case M type Update STATE MODIFIED break modified locally case C type Update STATE CONFLICT break modified locally and on the server but cannot be auto merged case D type Update STATE DELETED break deleted locally but still exists on server default type Update STATE NONE if merging If we are merging the modified prefix is used both to show merges and local changes We have to detect this case and use a more specific change type if type Update STATE MODIFIED type Update STATE MERGEABLE CONFLICT merging false update Message Listener file Information type command Root path return OK  IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor mergingBinary updateMessageListener startsWith indexOf MLP_ changeType charAt changeType STATE_ADDED_LOCAL STATE_UNKOWN STATE_REMOTE_CHANGES STATE_DELETED STATE_MODIFIED STATE_CONFLICT STATE_DELETED STATE_NONE STATE_MODIFIED STATE_MERGEABLE_CONFLICT updateMessageListener fileInformation commandRoot
This handler is used by the Remote Resource hierarchy to retrieve E messages from the CVS server in order to determine the folders contained in a parent folder WARNING This class parses the message output to determine the state of files in the repository Unfortunately these messages seem to be customizable on a server by server basis Here s a list of responses we expect in various situations Directory exists remotely cvs server Updating folder1 folder2 Directory doesn t exist remotely cvs server skipping directory folder1 folder2 New or unknown remote directory cvs server New Directory folder1 folder2 File removed remotely cvs server folder1 file ext is no longer in the repository cvs server warning folder1 file ext is not any longer pertinent Locally added file was added remotely as well cvs server conflict folder file ext created independently by second party File removed locally and modified remotely cvs server conflict removed file txt was modified by second party File modified locally but removed remotely cvs server conflict file txt is modified but no longer in the repository Ignored Messages cvs server cannot open directory cvs server nothing known about Tag error that really means there are no files in a directory cvs server aborted no such tag Merge contained conflicts rcsmerge warning conflicts during merge Binary file conflict cvs server nonmergeable file needs merge cvs server revision 1 4 from repository is now in a1 a2 test cvs server file from working directory is now in test 1 3 public I Status error Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor try Reset flag globally here because we have to many exit points boolean was Merging Binary merging Binary merging Binary false String server Message get Server Message line location if server Message null Strip the prefix from the line String message server Message if message starts With Updating NON NLS 1 if update Message Listener null String path message substring 9 update Message Listener directory Information command Root path false return OK else if message starts With skipping directory NON NLS 1 if update Message Listener null String path message substring 18 trim update Message Listener directory Does Not Exist command Root path return OK else if message starts With New directory NON NLS 1 if update Message Listener null String path message substring 15 message last Index Of update Message Listener directory Information command Root path true return OK else if message ends With is no longer in the repository NON NLS 1 if update Message Listener null String filename message substring 0 message length 31 filename strip Quotes filename update Message Listener file Does Not Exist command Root filename return OK else if message starts With conflict NON NLS 1 We can get the following conflict warnings cvs server conflict folder file ext created independently by second party cvs server conflict removed file txt was modified by second party cvs server conflict file txt is modified but no longer in the repository If we get the above line we have conflicting additions or deletions and we can expect a server error We still get C foler file ext so we don t need to do anything else except in the remotely deleted case if update Message Listener null if message ends With is modified but no longer in the repository NON NLS 1 The C foler file ext will come after this so if whould be ignored String filename message substring 10 message length 44 filename strip Quotes filename update Message Listener file Does Not Exist command Root filename return new CVS Status CVS Status WARNING CVS Status CONFLICT command Root line else if message starts With warning NON NLS 1 We can get the following conflict warnings cvs server warning folder1 file ext is not any longer pertinent If we get the above line we have local changes to a remotely deleted file if update Message Listener null if message ends With is not any longer pertinent NON NLS 1 String filename message substring 9 message length 30 update Message Listener file Does Not Exist command Root filename return new CVS Status CVS Status WARNING CVS Status CONFLICT command Root line else if message starts With conflicts NON NLS 1 This line is info only The server doesn t report an error return new CVS Status I Status INFO CVS Status CONFLICT command Root line else if message starts With nonmergeable file needs merge NON NLS 1 merging Binary true merged Binary File Revision null merged Binary File Path null return OK else if was Merging Binary Map variables MERGED BINARY FILE LINE 1 process Server Message message if variables null merged Binary File Revision String variables get REVISION VARIABLE NAME merged Binary File Path String variables get LOCAL FILE PATH VARIABLE NAME merging Binary true return OK variables MERGED BINARY FILE LINE 2 process Server Message message if variables null String backup File String variables get BACKUP FILE VARIABLE NAME try if merged Binary File Revision null merged Binary File Path null ICVS File file command Root get File merged Binary File Path I Resource resource file getI Resource if resource null return new CVS Status I Status ERROR CVS Status UNMEGERED BINARY CONFLICT Policy bind Update Listener 0 new Object NON NLS 1 resource get Full Path to String merged Binary File Revision resource get Full Path remove Last Segments 1 append backup File to String catch CVS Exception e1 CVS Provider Plugin log e1 return OK Fallthrough case for cvs server messages if message starts With cannot open directory NON NLS 1 message starts With nothing known about NON NLS 1 return super error Line line location command Root monitor else String server Aborted Message get Server Aborted Message line location if server Aborted Message null Strip the prefix from the line String message server Aborted Message if message starts With no such tag NON NLS 1 This is reported from CVS when a tag is used on the update there are no files in the directory To get the folders the update request should be re issued for HEAD return new CVS Status CVS Status WARNING CVS Status NO SUCH TAG command Root line else return super error Line line location command Root monitor else if line equals rcsmerge warning conflicts during merge NON NLS 1 There were conflicts in the merge return new CVS Status CVS Status WARNING CVS Status CONFLICT command Root line catch String Index Out Of Bounds Exception e Something went wrong in the parsing of the message Return a status indicating the problem if CVS Provider Plugin get Plugin is Debugging System out println Error parsing E line line NON NLS 1 return new CVS Status CVS Status ERROR CVS Status ERROR LINE PARSE FAILURE command Root line return super error Line line location command Root monitor  RemoteResource IStatus errorLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor wasMergingBinary mergingBinary mergingBinary serverMessage getServerMessage serverMessage serverMessage startsWith updateMessageListener updateMessageListener directoryInformation commandRoot startsWith updateMessageListener updateMessageListener directoryDoesNotExist commandRoot startsWith updateMessageListener lastIndexOf updateMessageListener directoryInformation commandRoot endsWith updateMessageListener stripQuotes updateMessageListener fileDoesNotExist commandRoot startsWith updateMessageListener endsWith stripQuotes updateMessageListener fileDoesNotExist commandRoot CVSStatus CVSStatus CVSStatus commandRoot startsWith updateMessageListener endsWith updateMessageListener fileDoesNotExist commandRoot CVSStatus CVSStatus CVSStatus commandRoot startsWith CVSStatus IStatus CVSStatus commandRoot startsWith mergingBinary mergedBinaryFileRevision mergedBinaryFilePath wasMergingBinary MERGED_BINARY_FILE_LINE_1 processServerMessage mergedBinaryFileRevision REVISION_VARIABLE_NAME mergedBinaryFilePath LOCAL_FILE_PATH_VARIABLE_NAME mergingBinary MERGED_BINARY_FILE_LINE_2 processServerMessage backupFile BACKUP_FILE_VARIABLE_NAME mergedBinaryFileRevision mergedBinaryFilePath ICVSFile commandRoot getFile mergedBinaryFilePath IResource getIResource CVSStatus IStatus CVSStatus UNMEGERED_BINARY_CONFLICT UpdateListener getFullPath toString mergedBinaryFileRevision getFullPath removeLastSegments backupFile toString CVSException CVSProviderPlugin startsWith startsWith errorLine commandRoot serverAbortedMessage getServerAbortedMessage serverAbortedMessage serverAbortedMessage startsWith CVSStatus CVSStatus CVSStatus NO_SUCH_TAG commandRoot errorLine commandRoot CVSStatus CVSStatus CVSStatus commandRoot StringIndexOutOfBoundsException CVSProviderPlugin getPlugin isDebugging CVSStatus CVSStatus CVSStatus ERROR_LINE_PARSE_FAILURE commandRoot errorLine commandRoot
private String strip Quotes String filename CVS version 12 fix filenames are returned inside quotes Fixes bug 49056 if filename starts With filename ends With NON NLS 1 NON NLS 2 filename filename substring 1 filename length 1 return filename  stripQuotes startsWith endsWith

public class Log extends Abstract Message Command Local options specific to log public static Local Option make Revision Option String revision return new Local Option r revision null NON NLS 1  AbstractMessageCommand LocalOption makeRevisionOption LocalOption
public static final Local Option RCS FILE NAMES ONLY new Local Option R NON NLS 1 protected Log  LocalOption RCS_FILE_NAMES_ONLY LocalOption
protected Log protected String get Request Id return log NON NLS 1  getRequestId
protected ICVS Resource send Local Resource State Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor throws CVS Exception Send all folders that are already managed to the server boolean send Empty Folders Command find Option local Options RCS FILE NAMES ONLY get Option null new File Structure Visitor session send Empty Folders false send modified contents visit session resources monitor return resources  ICVSResource sendLocalResourceState GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor CVSException sendEmptyFolders findOption localOptions RCS_FILE_NAMES_ONLY getOption FileStructureVisitor sendEmptyFolders

private final Set modified Files public Modified File Sender Session session super session false true modified Files new Hash Set  modifiedFiles ModifiedFileSender modifiedFiles HashSet
Override send File to only send modified files protected void send File ICVS File m File throws CVS Exception Only send the file if its modified if m File is Managed m File is Modified null super send File m File modified Files add m File  sendFile sendFile ICVSFile mFile CVSException mFile isManaged mFile isModified sendFile mFile modifiedFiles mFile
protected String get Send File Title Key return null  getSendFileTitleKey
Return all the files that have been send to the server public ICVS File get Modified Files return ICVS File modified Files to Array new ICVS File modified Files size  ICVSFile getModifiedFiles ICVSFile modifiedFiles toArray ICVSFile modifiedFiles

class Mod Time Handler extends Response Handler public String get ResponseID return Mod time NON NLS 1  ModTimeHandler ResponseHandler getResponseID
public void handle Session session String time Stamp I Progress Monitor monitor throws CVS Exception try session set Mod Time CVS Date Formatter server Stamp To Date time Stamp catch Parse Exception e throw new CVS Exception Policy bind Mod Time Handler invalid Format time Stamp e NON NLS 1  timeStamp IProgressMonitor CVSException setModTime CVSDateFormatter serverStampToDate timeStamp ParseException CVSException ModTimeHandler invalidFormat timeStamp

see Response Handler get ResponseID public String get ResponseID return Module expansion NON NLS 1  ResponseHandler getResponseID getResponseID
public void handle Session session String expansion I Progress Monitor monitor throws CVS Exception session add Module Expansion expansion  IProgressMonitor CVSException addModuleExpansion

see org eclipse team internal ccvs core client Response Handler get Instance Response Handler get Instance return new MT Handler  ResponseHandler getInstance ResponseHandler getInstance MTHandler
see Response Handler get ResponseID public String get ResponseID return MT NON NLS 1  ResponseHandler getResponseID getResponseID
see Response Handler handle Session String I Progress Monitor public void handle Session session String argument I Progress Monitor monitor throws CVS Exception If there was a line available from before clear it if is Line Available start Next Line if argument char At 0 Reset any previously accumulated text start Next Line else if argument char At 0 Mark the line as available in case there was no trailing newline if next Line null is Line Available true else Extract the tag and text from the line String tag String text int space Index argument index Of if space Index 1 tag argument text null else tag argument substring 0 space Index text argument substring space Index 1 Accumulate the line and indicate if its available for use if tag equals newline NON NLS 1 is Line Available true else if text null Reset the previous line if required if is Line Available start Next Line Accumulate the line if next Line null next Line text else The text from the sevrver contains spaces when appropriate so just append next Line next Line text  ResponseHandler IProgressMonitor IProgressMonitor CVSException isLineAvailable startNextLine charAt startNextLine charAt nextLine isLineAvailable spaceIndex indexOf spaceIndex spaceIndex spaceIndex isLineAvailable isLineAvailable startNextLine nextLine nextLine nextLine nextLine
Check if there is a line available If there is it should be fetched with get Line immediatly before the next MT response is processed public boolean is Line Available return is Line Available  getLine isLineAvailable isLineAvailable
Get the available line This purges the line from the handler public String get Line return next Line  getLine nextLine
private void start Next Line is Line Available false next Line null  startNextLine isLineAvailable nextLine

see Response Handler get ResponseID public String get ResponseID return New entry NON NLS 1  ResponseHandler getResponseID getResponseID
public void handle Session session String local Dir I Progress Monitor monitor throws CVS Exception read additional data for the response String repository File session read Line String entry Line session read Line Clear the recorded mod time session set Mod Time null Get the local file String file Name repository File substring repository File last Index Of 1 NON NLS 1 ICVS Folder m Parent session get Local Root get Folder local Dir ICVS File m File m Parent get File file Name Resource Sync Info file Info m File get Sync Info Mutable Resource Sync Info new Info file Info clone Mutable new Info set Entry Line entry Line m File set Sync Info new Info ICVS File UNKNOWN  localDir IProgressMonitor CVSException repositoryFile readLine entryLine readLine setModTime fileName repositoryFile repositoryFile lastIndexOf ICVSFolder mParent getLocalRoot getFolder localDir ICVSFile mFile mParent getFile fileName ResourceSyncInfo fileInfo mFile getSyncInfo MutableResourceSyncInfo newInfo fileInfo cloneMutable newInfo setEntryLine entryLine mFile setSyncInfo newInfo ICVSFile

see org eclipse team internal ccvs core client Command send Local Resource State Session Global Option Local Option ICVS Resource I Progress Monitor protected ICVS Resource send Local Resource State Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor throws CVS Exception The noop visitor will send any pending notifications new NOOP Visitor session visit session resources monitor return resources  sendLocalResourceState GlobalOption LocalOption ICVSResource IProgressMonitor ICVSResource sendLocalResourceState GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor CVSException NOOPVisitor
see org eclipse team internal ccvs core client Request get Request Id protected String get Request Id return noop NON NLS 1  getRequestId getRequestId
see org eclipse team internal ccvs core client Command send Arguments Session String protected void send Arguments Session session String arguments throws CVS Exception don t send any arguments  sendArguments sendArguments CVSException
see org eclipse team internal ccvs core client Command is Workspace Modification protected boolean is Workspace Modification return false  isWorkspaceModification isWorkspaceModification

public class NOOP Visitor extends Abstract Structure Visitor public NOOP Visitor Session session Only send non empty folders super session false false  NOOPVisitor AbstractStructureVisitor NOOPVisitor
see org eclipse team internal ccvs core ICVS Resource Visitor visit File ICVS File public void visit File ICVS File file throws CVS Exception send Pending Notification file  ICVSResourceVisitor visitFile ICVSFile visitFile ICVSFile CVSException sendPendingNotification
see org eclipse team internal ccvs core ICVS Resource Visitor visit Folder ICVS Folder public void visit Folder ICVS Folder folder throws CVS Exception if folder isCVS Folder folder accept Children this  ICVSResourceVisitor visitFolder ICVSFolder visitFolder ICVSFolder CVSException isCVSFolder acceptChildren

see org eclipse team internal ccvs core client Response Handler get ResponseID public String get ResponseID return Notified NON NLS 1  ResponseHandler getResponseID getResponseID
see org eclipse team internal ccvs core client Response Handler handle Session String I Progress Monitor public void handle Session session String local Dir I Progress Monitor monitor throws CVS Exception read additional data for the response which is the full repository path of the file String repository File Path session read Line clear the notify info for the file ICVS Folder folder session get Local Root get Folder local Dir ICVS File file folder get File new Path repository File Path last Segment file notification Completed  ResponseHandler IProgressMonitor localDir IProgressMonitor CVSException repositoryFilePath readLine ICVSFolder getLocalRoot getFolder localDir ICVSFile getFile repositoryFilePath lastSegment notificationCompleted

private ICVS Folder local Root public Prune Folder Visitor  ICVSFolder localRoot PruneFolderVisitor
This method is used to visit a set of ICVS Resources public void visit Session s ICVS Resource resources throws CVS Exception visit s get Local Root resources  ICVSResources ICVSResource CVSException getLocalRoot
This method is used to visit a set of ICVS Resources public void visit ICVS Folder root ICVS Resource resources throws CVS Exception local Root root Visit the resources Set prunable Parents new Hash Set for int i 0 i resources length i ICVS Resource cvs Resource resources i prune the resource and it s children when appropriate cvs Resource accept this if the resource doesn t exists attempt to prune it s parent if cvs Resource exists prunable Parents add cvs Resource get Parent for Iterator iter prunable Parents iterator iter has Next ICVS Folder cvs Folder ICVS Folder iter next prune Folder And Parents If Appropriate cvs Folder  ICVSResources ICVSFolder ICVSResource CVSException localRoot prunableParents HashSet ICVSResource cvsResource cvsResource cvsResource prunableParents cvsResource getParent prunableParents hasNext ICVSFolder cvsFolder ICVSFolder pruneFolderAndParentsIfAppropriate cvsFolder
see ICVS Resource Visitor visit File I Managed File public void visit File ICVS File file throws CVS Exception nothing to do here  ICVSResourceVisitor visitFile IManagedFile visitFile ICVSFile CVSException
see ICVS Resource Visitor visit Folder ICVS Folder public void visit Folder ICVS Folder folder throws CVS Exception First prune any empty children folder accept Children this Then prune the folder if it is empty prune Folder If Appropriate folder  ICVSResourceVisitor visitFolder ICVSFolder visitFolder ICVSFolder CVSException acceptChildren pruneFolderIfAppropriate
private void prune Folder If Appropriate ICVS Folder folder throws CVS Exception Only prune managed folders that are not the root of the operation if folder exists folder is Managed folder equals get Local Root folder members ICVS Folder ALL EXISTING MEMBERS length 0 Delete the folder but keep a phantom for local folders folder delete  pruneFolderIfAppropriate ICVSFolder CVSException isManaged getLocalRoot ICVSFolder ALL_EXISTING_MEMBERS
private ICVS Folder get Local Root return local Root  ICVSFolder getLocalRoot localRoot
Attemp to prunt the given folder If the folder is pruned attempt to prune it s parent private void prune Folder And Parents If Appropriate ICVS Folder folder throws CVS Exception prune Folder If Appropriate folder if folder exists ICVS Folder parent folder get Parent prune Folder And Parents If Appropriate parent  pruneFolderAndParentsIfAppropriate ICVSFolder CVSException pruneFolderIfAppropriate ICVSFolder getParent pruneFolderAndParentsIfAppropriate

see org eclipse team internal ccvs core client Request get Request Id protected String get Request Id return rdiff NON NLS 1  getRequestId getRequestId
Makes a r or D option for a tag Valid for checkout export history rdiff update public static Local Option make Tag Option CVS Tag tag if tag null tag CVS Tag DEFAULT int type tag get Type switch type case CVS Tag BRANCH case CVS Tag VERSION case CVS Tag HEAD return new Local Option r tag get Name NON NLS 1 case CVS Tag DATE return new Local Option D tag get Name NON NLS 1 default Unknow tag type throw new Illegal Argument Exception  LocalOption makeTagOption CVSTag CVSTag getType CVSTag CVSTag CVSTag LocalOption getName CVSTag LocalOption getName IllegalArgumentException

public abstract class Remote Command extends Command protected ICVS Resource compute Work Resources Session session Local Option local Options String arguments throws CVS Exception return new ICVS Resource 0  RemoteCommand ICVSResource computeWorkResources LocalOption localOptions CVSException ICVSResource
protected ICVS Resource send Local Resource State Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor throws CVS Exception do nothing monitor begin Task null 100 monitor done return resources  ICVSResource sendLocalResourceState GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor CVSException beginTask
protected void send Local Working Directory Session session throws CVS Exception do nothing  sendLocalWorkingDirectory CVSException
protected String convert Arguments For Open Session ICVS Resource arguments Session open Session throws CVS Exception Convert arguments List string Arguments new Array List arguments length for int i 0 i arguments length i string Arguments add arguments i get Repository Relative Path return String string Arguments to Array new String string Arguments size  convertArgumentsForOpenSession ICVSResource openSession CVSException stringArguments ArrayList stringArguments getRepositoryRelativePath stringArguments toArray stringArguments

public class Remove extends Command Local options specific to remove protected Remove 
protected Remove protected String get Request Id return remove NON NLS 1  getRequestId
protected ICVS Resource send Local Resource State Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor throws CVS Exception Send all modified files to the server XXX Does the command line client send all modified files new Modified File Sender session visit session resources monitor return resources  ICVSResource sendLocalResourceState GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor CVSException ModifiedFileSender

class Removed Handler extends Response Handler public String get ResponseID return Removed NON NLS 1  RemovedHandler ResponseHandler getResponseID
public void handle Session session String local Dir I Progress Monitor monitor throws CVS Exception read additional data for the response String repository File session read Line Get the local file String file Name repository File substring repository File last Index Of 1 NON NLS 1 ICVS Folder m Parent session get Local Root get Folder local Dir ICVS File m File m Parent get File file Name if m File is Managed throw new CVS Exception Policy bind Removed Handler invalid new Path local Dir append file Name to String NON NLS 1 delete then unmanage the file if m File is Read Only m File set Read Only false m File delete m File unmanage null  localDir IProgressMonitor CVSException repositoryFile readLine fileName repositoryFile repositoryFile lastIndexOf ICVSFolder mParent getLocalRoot getFolder localDir ICVSFile mFile mParent getFile fileName mFile isManaged CVSException RemovedHandler localDir fileName toString mFile isReadOnly mFile setReadOnly mFile mFile

class Remove Entry Handler extends Response Handler public String get ResponseID return Remove entry NON NLS 1  RemoveEntryHandler ResponseHandler getResponseID
public void handle Session session String local Dir I Progress Monitor monitor throws CVS Exception read additional data for the response String repository File session read Line Get the local file String file Name repository File substring repository File last Index Of 1 NON NLS 1 ICVS Folder m Parent session get Local Root get Folder local Dir ICVS File m File m Parent get File file Name if m File exists CVS Provider Plugin log new CVS Exception Policy bind Remove Entry Handler 2 m File get Repository Relative Path NON NLS 1 else m File unmanage null  localDir IProgressMonitor CVSException repositoryFile readLine fileName repositoryFile repositoryFile lastIndexOf ICVSFolder mParent getLocalRoot getFolder localDir ICVSFile mFile mParent getFile fileName mFile CVSProviderPlugin CVSException RemoveEntryHandler mFile getRepositoryRelativePath mFile

private static void initialize Handler Cache synchronized response Handlers register Response Handler new Checked In Handler register Response Handler new Copy Handler register Response Handler new Mod Time Handler register Response Handler new New Entry Handler register Response Handler new Removed Handler register Response Handler new Remove Entry Handler register Response Handler new Static Handler true register Response Handler new Static Handler false register Response Handler new Sticky Handler true register Response Handler new Sticky Handler false register Response Handler new Updated Handler Updated Handler HANDLE UPDATED register Response Handler new Updated Handler Updated Handler HANDLE UPDATE EXISTING register Response Handler new Updated Handler Updated Handler HANDLE CREATED register Response Handler new Updated Handler Updated Handler HANDLE MERGED register Response Handler new Valid Requests Handler register Response Handler new Module Expansion Handler register Response Handler new MT Handler register Response Handler new Notified Handler register Response Handler new Template Handler  initializeHandlerCache responseHandlers registerResponseHandler CheckedInHandler registerResponseHandler CopyHandler registerResponseHandler ModTimeHandler registerResponseHandler NewEntryHandler registerResponseHandler RemovedHandler registerResponseHandler RemoveEntryHandler registerResponseHandler StaticHandler registerResponseHandler StaticHandler registerResponseHandler StickyHandler registerResponseHandler StickyHandler registerResponseHandler UpdatedHandler UpdatedHandler HANDLE_UPDATED registerResponseHandler UpdatedHandler UpdatedHandler HANDLE_UPDATE_EXISTING registerResponseHandler UpdatedHandler UpdatedHandler HANDLE_CREATED registerResponseHandler UpdatedHandler UpdatedHandler HANDLE_MERGED registerResponseHandler ValidRequestsHandler registerResponseHandler ModuleExpansionHandler registerResponseHandler MTHandler registerResponseHandler NotifiedHandler registerResponseHandler TemplateHandler
private static void register Response Handler Response Handler handler synchronized response Handlers response Handlers put handler get ResponseID handler  registerResponseHandler ResponseHandler responseHandlers responseHandlers getResponseID
This method is invoked by Session to get a mutable copy of the global list of acceptable response handlers return a map of reponse handlers protected static Map get Reponse Handler Map synchronized response Handlers if response Handlers is Empty initialize Handler Cache Map copy new Hash Map for Iterator iter response Handlers values iterator iter has Next Response Handler handler Response Handler iter next copy put handler get ResponseID handler get Instance return copy  getReponseHandlerMap responseHandlers responseHandlers isEmpty initializeHandlerCache HashMap responseHandlers hasNext ResponseHandler ResponseHandler getResponseID getInstance
Prevents client code from instantiating us protected Request 
Returns the string used to invoke this request on the server template method return the request identifier string 
Executes a request and processes the responses param session the open CVS session param listener the command output listener or null to discard all messages param monitor the progress monitor return a status code indicating success or failure of the operation protected I Status execute Request Session session I Command Output Listener listener I Progress Monitor monitor throws CVS Exception send request session send Request get Request Id This number can be tweaked if the monitor is judged to move too quickly or too slowly After some experimentation this is a good number for both large projects it doesn t move so quickly as to give a false sense of speed and smaller projects it actually does move some rather than remaining still and then jumping to 100 final int TOTAL WORK 300 monitor begin Task Policy bind Command receiving Responses TOTAL WORK NON NLS 1 int half Way TOTAL WORK 2 int current Increment 4 int next Progress current Increment int worked 0 If the session is connected to a CVSNT server 1 11 1 1 we ll need to do some special handling for some errors Unfortunately CVSNT 1 11 1 1 will drop the connection after so some functionality is still effected boolean isCVSNT session isCVSNT List accumulated Status new Array List for update monitor work amount if next Progress 0 monitor worked 1 worked if worked half Way we have passed the current halfway point so double the increment and reset the halfway point current Increment 2 half Way TOTAL WORK half Way 2 reset the progress counter to another full increment next Progress current Increment Policy check Canceled monitor retrieve a response line String response session read Line int space Pos response index Of String argument if space Pos 1 argument response substring space Pos 1 response response substring 0 space Pos else argument NON NLS 1 handle completion responses if response equals ok NON NLS 1 break else if response equals error isCVSNT response equals NON NLS 1 NON NLS 2 argument argument trim boolean serious false if argument length 0 argument get Server Error Message else argument Policy bind Command serious Server Error argument NON NLS 1 if accumulated Status is Empty accumulated Status add new CVS Status CVS Status ERROR CVS Status SERVER ERROR argument serious true if accumulated Status is Empty accumulated Status add new CVS Status CVS Status ERROR CVS Status SERVER ERROR Policy bind Command no More Info Available NON NLS 1 I Status status new Multi Status CVS Provider Plugin ID CVS Status SERVER ERROR I Status accumulated Status to Array new I Status accumulated Status size argument null if serious throw new CVS Server Exception status else look for particularly bad errors in the accumulated statii for Iterator iter accumulated Status iterator iter has Next I Status s I Status iter next if s get Code CVS Status PROTOCOL ERROR throw new CVS Server Exception status return status handle message responses else if response equals MT NON NLS 1 Handle the MT response MT Handler handler MT Handler session get Response Handler response if handler null handler handle session argument monitor else throw new CVS Exception new org eclipse core runtime Status I Status ERROR CVS Provider Plugin ID CVS Exception IO FAILED Policy bind Command unsupported Response response argument null NON NLS 1 If a line is available pass it on to the message listener and console as if it were an M response if handler is Line Available String line handler get Line I Status status listener message Line line session getCVS Repository Location session get Local Root monitor if status I Command Output Listener OK accumulated Status add status if session is Output To Console I Console Listener console Listener CVS Provider Plugin get Plugin get Console Listener if console Listener null console Listener message Line Received line else if response equals M NON NLS 1 I Status status listener message Line argument session getCVS Repository Location session get Local Root monitor if status I Command Output Listener OK accumulated Status add status if session is Output To Console I Console Listener console Listener CVS Provider Plugin get Plugin get Console Listener if console Listener null console Listener message Line Received argument else if response equals E NON NLS 1 I Status status listener error Line argument session getCVS Repository Location session get Local Root monitor if status I Command Output Listener OK accumulated Status add status if session is Output To Console I Console Listener console Listener CVS Provider Plugin get Plugin get Console Listener if console Listener null console Listener error Line Received argument handle other responses else Response Handler handler Response Handler session get Response Handler response if handler null handler handle session argument monitor else throw new CVS Exception new org eclipse core runtime Status I Status ERROR CVS Provider Plugin ID CVS Exception IO FAILED Policy bind Command unsupported Response response argument null NON NLS 1 if accumulated Status is Empty return I Command Output Listener OK else return new Multi Status CVS Provider Plugin ID CVS Status INFO I Status accumulated Status to Array new I Status accumulated Status size Policy bind Command warnings Policy bind Command get Request Id null NON NLS 1 NON NLS 2  IStatus executeRequest ICommandOutputListener IProgressMonitor CVSException sendRequest getRequestId TOTAL_WORK beginTask receivingResponses TOTAL_WORK halfWay TOTAL_WORK currentIncrement nextProgress currentIncrement accumulatedStatus ArrayList nextProgress halfWay currentIncrement halfWay TOTAL_WORK halfWay nextProgress currentIncrement checkCanceled readLine spacePos indexOf spacePos spacePos spacePos getServerErrorMessage seriousServerError accumulatedStatus isEmpty accumulatedStatus CVSStatus CVSStatus CVSStatus SERVER_ERROR accumulatedStatus isEmpty accumulatedStatus CVSStatus CVSStatus CVSStatus SERVER_ERROR noMoreInfoAvailable IStatus MultiStatus CVSProviderPlugin CVSStatus SERVER_ERROR IStatus accumulatedStatus toArray IStatus accumulatedStatus CVSServerException accumulatedStatus hasNext IStatus IStatus getCode CVSStatus PROTOCOL_ERROR CVSServerException MTHandler MTHandler getResponseHandler CVSException IStatus CVSProviderPlugin CVSException IO_FAILED unsupportedResponse isLineAvailable getLine IStatus messageLine getCVSRepositoryLocation getLocalRoot ICommandOutputListener accumulatedStatus isOutputToConsole IConsoleListener consoleListener CVSProviderPlugin getPlugin getConsoleListener consoleListener consoleListener messageLineReceived IStatus messageLine getCVSRepositoryLocation getLocalRoot ICommandOutputListener accumulatedStatus isOutputToConsole IConsoleListener consoleListener CVSProviderPlugin getPlugin getConsoleListener consoleListener consoleListener messageLineReceived IStatus errorLine getCVSRepositoryLocation getLocalRoot ICommandOutputListener accumulatedStatus isOutputToConsole IConsoleListener consoleListener CVSProviderPlugin getPlugin getConsoleListener consoleListener consoleListener errorLineReceived ResponseHandler ResponseHandler getResponseHandler CVSException IStatus CVSProviderPlugin CVSException IO_FAILED unsupportedResponse accumulatedStatus isEmpty ICommandOutputListener MultiStatus CVSProviderPlugin CVSStatus IStatus accumulatedStatus toArray IStatus accumulatedStatus getRequestId
reports as error protected String get Server Error Message return Policy bind Command server Error Policy bind Command get Request Id NON NLS 1 NON NLS 2  getServerErrorMessage serverError getRequestId

public abstract class Response Handler Returns the text string of the server response handled by this object return the id  ResponseHandler
Handles a server response p Suppose as a result of performing a command the CVS server responds as follows br pre Clear sticky my Directory n u cvsroot my Directory n pre Then the code handle code method of the code Response Handler code for em Clear sticky em will be invoked with code argument code set to em my Directory em It must then read the remaining response data from the connection em u cvsroot my Directory em including the newline and take any necessary action p p Note The type and quantity of additional data that must be read from the connection varies on a per response basis p param session the Session used for CVS communication param argument the argument supplied with the response param monitor the progress monitor for the current CVS command public abstract void handle Session session String argument  myDirectory myDirectory ResponseHandler myDirectory myDirectory
Creates a new CVS folder param local Dir the local path of the folder relative to root param repository Dir the remote path of the folder relative to the repository return the new folder protected static ICVS Folder create Folder Session session String local Dir String repository Dir throws CVS Exception ICVS Folder folder session get Local Root get Folder local Dir if folder exists CVS Provider Plugin get Plugin get Prune Empty Directories folder get Parent isCVS Folder Only create the folder if pruning is disabled or the folder s parent is not a CVS folder which occurs on checkout When pruning is enabled the folder will be lazily created when it contains a file see get Existing Folder folder mkdir if folder isCVS Folder folder set Folder Sync Info new Folder Sync Info Util get Relative Path session get Repository Root repository Dir session getCVS Repository Location get Location null false return folder  localDir repositoryDir ICVSFolder createFolder localDir repositoryDir CVSException ICVSFolder getLocalRoot getFolder localDir CVSProviderPlugin getPlugin getPruneEmptyDirectories getParent isCVSFolder getExistingFolder isCVSFolder setFolderSyncInfo FolderSyncInfo getRelativePath getRepositoryRoot repositoryDir getCVSRepositoryLocation getLocation
protected ICVS Folder get Existing Folder Session session String local Dir throws CVS Exception ICVS Folder m Parent session get Local Root get Folder local Dir if m Parent exists First check if the parent is a phantom I Container container I Container m Parent getI Resource if container null Create all the parents as need recreate Phatom Folders m Parent return m Parent  ICVSFolder getExistingFolder localDir CVSException ICVSFolder mParent getLocalRoot getFolder localDir mParent IContainer IContainer mParent getIResource recreatePhatomFolders mParent mParent
Method recreate Phatom Folders param m Parent private void recreate Phatom Folders ICVS Folder folder throws CVS Exception ICVS Folder parent folder get Parent if parent exists recreate Phatom Folders parent folder mkdir  recreatePhatomFolders mParent recreatePhatomFolders ICVSFolder CVSException ICVSFolder getParent recreatePhatomFolders
Return as instance that can be used by an open session Subclasses that contain session related state must override this message to return a copy of themselves package Response Handler get Instance return this  ResponseHandler getInstance

Makes a r option for rlog Here are the currently supported options tag1tag2result date datedate date all revisions between date and later tagtagtag tag all revisions between tag and tag must be on same branch branch date date all revisions of date or later branch tagtag all revisions from tag to the end of branchs tip Valid for rlog public static Local Option make Tag Option CVS Tag tag1 CVS Tag tag2 int type1 tag1 get Type int type2 tag2 get Type if type1 type2 switch type1 case CVS Tag HEAD case CVS Tag BRANCH A range of branches all revisions on all the branches in that range case CVS Tag VERSION Revisions from tag1 to tag2 they must be on the same branch return new Local Option r tag1 get Name tag2 get Name null NON NLS 1 NON NLS 2 case CVS Tag DATE Selects revisions created between DATE1 and DATE2 If DATE1 is after DATE2 use instead otherwise no log messages are retrieved Date date1 tag1 as Date Date date2 tag2 as Date String operator NON NLS 1 if date1 compare To date2 0 operator NON NLS 1 return new Local Option d tag1 get Name operator tag2 get Name null NON NLS 1 NON NLS 2 default Unknow tag type throw new Illegal Argument Exception if type1 CVS Tag BRANCH type1 CVS Tag HEAD type2 CVS Tag DATE return new Local Option d tag2 get Name NON NLS 1 NON NLS 2 if type1 CVS Tag BRANCH type1 CVS Tag HEAD type2 CVS Tag VERSION return new Local Option r tag2 get Name null NON NLS 1 NON NLS 2 defaults switch type1 case CVS Tag HEAD case CVS Tag BRANCH All revisions on this branch case CVS Tag VERSION revisions in this tag return new Local Option r tag1 get Name null NON NLS 1 NON NLS 2 case CVS Tag DATE Revisions at this date tag return new Local Option d tag1 get Name NON NLS 1 NON NLS 2 default Unknow tag type throw new Illegal Argument Exception  LocalOption makeTagOption CVSTag CVSTag getType getType CVSTag CVSTag CVSTag LocalOption getName getName CVSTag asDate asDate compareTo LocalOption getName getName IllegalArgumentException CVSTag CVSTag CVSTag LocalOption getName CVSTag CVSTag CVSTag LocalOption getName CVSTag CVSTag CVSTag LocalOption getName CVSTag LocalOption getName IllegalArgumentException
see org eclipse team internal ccvs core client Request get Request Id protected String get Request Id return rlog NON NLS 1  getRequestId getRequestId

Makes a r or D option for a tag Valid for checkout export history rdiff update public static Local Option make Tag Option CVS Tag tag int type tag get Type switch type case CVS Tag BRANCH case CVS Tag VERSION case CVS Tag HEAD return new Local Option r tag get Name NON NLS 1 case CVS Tag DATE return new Local Option D tag get Name NON NLS 1 default Unknow tag type throw new Illegal Argument Exception  LocalOption makeTagOption CVSTag getType CVSTag CVSTag CVSTag LocalOption getName CVSTag LocalOption getName IllegalArgumentException
protected String get Request Id return rtag NON NLS 1  getRequestId
protected ICVS Resource compute Work Resources Session session Local Option local Options String arguments throws CVS Exception if arguments length 2 throw new Illegal Argument Exception return super compute Work Resources session local Options arguments  ICVSResource computeWorkResources LocalOption localOptions CVSException IllegalArgumentException computeWorkResources localOptions
public I Status execute Session session Global Option global Options Local Option local Options CVS Tag source Tag CVS Tag tag String arguments I Progress Monitor monitor throws CVS Exception if tag get Type CVS Tag VERSION tag get Type CVS Tag BRANCH throw new CVS Exception new CVS Status I Status ERROR Policy bind Tag not Version Or Branch Error NON NLS 1 Add the source tag to the local options List modified Local Options new Array List local Options length 1 if source Tag null source Tag CVS Tag DEFAULT modified Local Options add All Arrays as List local Options modified Local Options add make Tag Option source Tag Add the CREATE BRANCH option for a branch tag if tag get Type CVS Tag BRANCH if CREATE BRANCH is Element Of local Options modified Local Options add CREATE BRANCH Add the tag name to the start of the arguments String new Arguments new String arguments length 1 new Arguments 0 tag get Name System arraycopy arguments 0 new Arguments 1 arguments length return execute session global Options Local Option modified Local Options to Array new Local Option modified Local Options size new Arguments null monitor  IStatus GlobalOption globalOptions LocalOption localOptions CVSTag sourceTag CVSTag IProgressMonitor CVSException getType CVSTag getType CVSTag CVSException CVSStatus IStatus notVersionOrBranchError modifiedLocalOptions ArrayList localOptions sourceTag sourceTag CVSTag modifiedLocalOptions addAll asList localOptions modifiedLocalOptions makeTagOption sourceTag CREATE_BRANCH getType CVSTag CREATE_BRANCH isElementOf localOptions modifiedLocalOptions CREATE_BRANCH newArguments newArguments getName newArguments globalOptions LocalOption modifiedLocalOptions toArray LocalOption modifiedLocalOptions newArguments
public I Status execute Session session Global Option global Options Local Option local Options CVS Tag source Tag CVS Tag tag ICVS Remote Resource arguments I Progress Monitor monitor throws CVS Exception String string Arguments convert Arguments For Open Session arguments session return execute session global Options local Options source Tag tag string Arguments monitor  IStatus GlobalOption globalOptions LocalOption localOptions CVSTag sourceTag CVSTag ICVSRemoteResource IProgressMonitor CVSException stringArguments convertArgumentsForOpenSession globalOptions localOptions sourceTag stringArguments
protected I Command Output Listener get Default Command Output Listener return DEFAULT OUTPUT LISTENER  ICommandOutputListener getDefaultCommandOutputListener DEFAULT_OUTPUT_LISTENER

Creates a new CVS session initially in the CLOSED state By default command output is directed to the console param location the CVS repository location used for this session param local Root represents the current working directory of the client public Session ICVS Repository Location location ICVS Folder local Root this location local Root true  localRoot ICVSRepositoryLocation ICVSFolder localRoot localRoot
Creates a new CVS session initially in the CLOSED state param location the CVS repository location used for this session param local Root represents the current working directory of the client param output To Console if true command output is directed to the console public Session ICVS Repository Location location ICVS Folder local Root boolean output To Console this location CVS Repository Location location this local Root local Root this output To Console output To Console  localRoot outputToConsole ICVSRepositoryLocation ICVSFolder localRoot outputToConsole CVSRepositoryLocation localRoot localRoot outputToConsole outputToConsole
This is only used by the Module Expansions Handler protected void add Module Expansion String expansion expansions add expansion  ModuleExpansionsHandler addModuleExpansion
protected void reset Module Expansion if expansions null expansions new Array List else expansions clear  resetModuleExpansion ArrayList
Opens authenticates and initializes a connection to the server specified for the remote location param monitor the progress monitor throws Illegal State Exception if the Session is not in the CLOSED state public void open I Progress Monitor monitor throws CVS Exception open monitor true write access  IllegalStateException IProgressMonitor CVSException
public void open I Progress Monitor monitor boolean write Access throws CVS Exception if connection null throw new Illegal State Exception monitor Policy monitor For monitor monitor begin Task null 100 boolean opened false try connection get Location For Connection write Access open Connection Policy sub Monitor For monitor 50 If we re connected to a CVSNT server or we don t know the platform accept MT Otherwise don t boolean useMT location get Server Platform CVS Repository Location CVS SERVER if useMT remove Response Handler MT NON NLS 1 tell the server the names of the responses we can handle connection write Line Valid responses make Response List NON NLS 1 Flush in order to recieve the valid requests connection flush ask for the set of valid requests I Status status Request VALID REQUESTS execute this Policy sub Monitor For monitor 40 if status isOK throw new CVS Exception status set the root directory on the server for this connection connection write Line Root get Repository Root NON NLS 1 enable compression compression Level CVS Provider Plugin get Plugin get Compression Level if compression Level 0 is Valid Request gzip file contents NON NLS 1 Enable the use of CVS 1 8 per file compression mechanism The newer Gzip stream request seems to be problematic due to Java s GZIP Input Stream tendency to block on read rather than to return a partially filled buffer The latter option would be better since it can make more effective use of the code dictionary if it can be made to work connection write Line gzip file contents Integer to String compression Level NON NLS 1 else compression Level 0 get the server platform if it is unknown if CVS Provider Plugin get Plugin is Determine Version Enabled location get Server Platform CVS Repository Location UNDETERMINED PLATFORM Command VERSION execute this location Policy sub Monitor For monitor 10 opened true finally if connection null opened close monitor done  IProgressMonitor writeAccess CVSException IllegalStateException monitorFor beginTask getLocationForConnection writeAccess openConnection subMonitorFor getServerPlatform CVSRepositoryLocation CVS_SERVER removeResponseHandler writeLine makeResponseList IStatus VALID_REQUESTS subMonitorFor CVSException writeLine getRepositoryRoot compressionLevel CVSProviderPlugin getPlugin getCompressionLevel compressionLevel isValidRequest GZIPInputStream writeLine toString compressionLevel compressionLevel CVSProviderPlugin getPlugin isDetermineVersionEnabled getServerPlatform CVSRepositoryLocation UNDETERMINED_PLATFORM subMonitorFor
Return the location to be used for this connection private CVS Repository Location get Location For Connection boolean write Access return location  CVSRepositoryLocation getLocationForConnection writeAccess
Closes a connection to the server throws Illegal State Exception if the Session is not in the OPEN state public void close if connection null connection close connection null valid Requests null  IllegalStateException validRequests
Determines if the server supports the specified request param request the request string to verify return true iff the request is supported public boolean is Valid Request String request return valid Requests null valid Requests index Of request 1 NON NLS 1 NON NLS 2  isValidRequest validRequests validRequests indexOf
public boolean isCVSNT if location get Server Platform CVS Repository Location UNDETERMINED PLATFORM return location get Root Directory index Of 1 else return location get Server Platform CVS Repository Location CVSNT SERVER  getServerPlatform CVSRepositoryLocation UNDETERMINED_PLATFORM getRootDirectory indexOf getServerPlatform CVSRepositoryLocation CVSNT_SERVER
Returns the local root folder for this session p Generally speaking specifies the current working directory at the time of invocation of an equivalent CVS command line client p return the local root folder public ICVS Folder get Local Root return local Root  ICVSFolder getLocalRoot localRoot
Return the list of module expansions communicated from the server The modules expansions are typically a directory path of length 1 but can be of greater length on occasion public String get Module Expansions if expansions null return new String 0 return String expansions to Array new String expansions size  getModuleExpansions toArray
Returns the repository root folder for this session p Specifies the unqualified path to the CVS repository root folder on the server p return the repository root folder public String get Repository Root return location get Root Directory  getRepositoryRoot getRootDirectory
Returns an object representing the CVS repository location for this session return the CVS repository location public ICVS Repository Location getCVS Repository Location return location  ICVSRepositoryLocation getCVSRepositoryLocation
Receives a line of text minus the newline from the server return the line of text public String read Line throws CVS Exception return connection read Line  readLine CVSException readLine
Sends a line of text followed by a newline to the server param line the line of text public void write Line String line throws CVS Exception connection write Line line  writeLine CVSException writeLine
Sends an argument to the server p e g send Argument Hello n World n Hello World sends pre Argument Hello n Argumentx World n Argumentx Hello World n pre p param arg the argument to send public void send Argument String arg throws CVS Exception connection write Argument NON NLS 1 int old Pos 0 for int pos arg index Of n old Pos if pos 1 break connection write Line strip TrainingCR arg substring old Pos pos connection write Argumentx NON NLS 1 old Pos pos 1 connection write Line strip TrainingCR arg substring old Pos  sendArgument nWorld sendArgument CVSException oldPos indexOf oldPos writeLine stripTrainingCR oldPos oldPos writeLine stripTrainingCR oldPos
private String strip TrainingCR String string if string ends With r NON NLS 1 return string substring 0 string length 1 return string  stripTrainingCR endsWith
Sends a request to the server and flushes any output buffers param request Id the string associated with the request to be executed public void send Request String request Id throws CVS Exception connection write Line request Id connection flush  requestId sendRequest requestId CVSException writeLine requestId
Sends an Is modified request to the server without the file contents p e g if a file called local file was modified sends pre Is modified local file n pre p p This request is an optimized form of the Modified request and may not be supported by all servers Hence if it is not supported a Modified request is sent instead along with the file s contents According to the CVS protocol specification this request is only safe for use with some forms of admin annotate diff editors log watch add watch off watch on watch remove and watchers br It may be possible to use this for add export remove and status br Do not use with co ci history init import release rdiff rtag or update p p Note The most recent Directory request must have specified the file s parent folder p param file the file that was modified see send Modified public void send Is Modified ICVS File file boolean is Binary I Progress Monitor monitor throws CVS Exception if is Valid Request Is modified NON NLS 1 connection write Line Is modified file get Name NON NLS 1 else send Modified file is Binary monitor  local_file local_file sendModified sendIsModified ICVSFile isBinary IProgressMonitor CVSException isValidRequest writeLine getName sendModified isBinary
Sends a Static directory request to the server p Indicates that the directory specified in the most recent Directory request is static No new files will be checked out into this directory unless explicitly requested p public void send Static Directory throws CVS Exception connection write Line Static directory NON NLS 1  sendStaticDirectory CVSException writeLine
Sends a Directory request to the server with a constructed path p It may be necessary at times to guess the remote path of a directory since it does not exist yet In this case we construct a remote path based on the local path by prepending the local path with the repository root This may not work in the presence of modules so only use it for creating new projects p p Note A CVS repository root can end with a trailing slash The CVS server expects that the repository root sent contain this extra slash Including the foward slash in addition to the absolute remote path makes for a string containing two consecutive slashes e g home cvs repo projecta a txt This is valid in the CVS protocol p public void send Constructed Directory String local Dir throws CVS Exception send Directory local Dir get Repository Root local Dir NON NLS 1  sendConstructedDirectory localDir CVSException sendDirectory localDir getRepositoryRoot localDir
Sends a Directory request to the server p e g send Directory local dir remote dir sends pre Directory local dir repository root remote dir pre p param local Dir the path of the local directory relative to local Root param remote Dir the path of the remote directory relative to repository Root public void send Directory String local Dir String remote Dir throws CVS Exception if local Dir length 0 local Dir NON NLS 1 connection write Line Directory local Dir NON NLS 1 connection write Line remote Dir  sendDirectory local_dir remote_dir local_dir repository_root remote_dir localDir localRoot remoteDir repositoryRoot sendDirectory localDir remoteDir CVSException localDir localDir writeLine localDir writeLine remoteDir
Sends a Directory request for the local Root public void send Local Root Directory throws CVS Exception send Directory local Root get Remote Location local Root NON NLS 1  localRoot sendLocalRootDirectory CVSException sendDirectory localRoot getRemoteLocation localRoot
Sends a Directory request for the local Root with a constructed path p Use this when creating a new project that does not exist in the repository p see send Constructed Directory public void send Constructed Root Directory throws CVS Exception send Constructed Directory NON NLS 1  localRoot sendConstructedDirectory sendConstructedRootDirectory CVSException sendConstructedDirectory
Sends an Entry request to the server p Indicates that a file is managed but it may not exist locally Sends the file s entry line to the server to indicate the version that was previously checked out p p Note The most recent Directory request must have specified the file s parent folder p param entry Line the formatted entry line of the managed file public void send Entry byte sync Bytes String server Timestamp throws CVS Exception connection write Entry NON NLS 1 if server Timestamp null server Timestamp NON NLS 1 int start Util get Offset Of Delimeter sync Bytes byte 0 3 if start 1 something is wrong with the entry line so just send it as is and let the server report the error connection write Line new String sync Bytes return int end Util get Offset Of Delimeter sync Bytes byte start 1 1 if end 1 something is wrong with the entry line so just send it as is and let the server report the error connection write Line new String sync Bytes return connection write new String sync Bytes 0 start 1 connection write server Timestamp connection write Line new String sync Bytes end sync Bytes length end  entryLine sendEntry syncBytes serverTimestamp CVSException serverTimestamp serverTimestamp getOffsetOfDelimeter syncBytes writeLine syncBytes getOffsetOfDelimeter syncBytes writeLine syncBytes syncBytes serverTimestamp writeLine syncBytes syncBytes
Sends a global options to the server p e g send Global Option n sends pre Global option n n pre p param option the global option to send public void send Global Option String option throws CVS Exception connection write Line Global option option NON NLS 1  sendGlobalOption Global_option sendGlobalOption CVSException writeLine Global_option
Sends an Unchanged request to the server p e g if a file called local file was not modified sends pre Unchanged local file n pre p p Note The most recent Directory request must have specified the file s parent folder p param file the file that was not modified public void send Unchanged ICVS File file throws CVS Exception connection write Line Unchanged file get Name NON NLS 1  local_file local_file sendUnchanged ICVSFile CVSException writeLine getName
Sends the Notify request to the server public void send Notify ICVS Folder parent Notify Info info throws CVS Exception String filename info get Name connection write Line Notify filename NON NLS 1 connection write Line info get Server Line parent  sendNotify ICVSFolder NotifyInfo CVSException getName writeLine writeLine getServerLine
Sends a Questionable request to the server p Indicates that a file exists locally but is unmanaged Asks the server whether or not the file should be ignored in subsequent CVS operations The reply to the request occurs in the form of special M type message responses prefixed with when the next command is executed p p Note The most recent Directory request must have specified the file s parent folder p param resource the local file or folder public void send Questionable ICVS Resource resource throws CVS Exception connection write Line Questionable resource get Name NON NLS 1  sendQuestionable ICVSResource CVSException writeLine getName
Sends a Sticky tag request to the server p Indicates that the directory specified in the most recent Directory request has a sticky tag or date and sends the tag s contents p param tag the sticky tag associated with the directory public void send Sticky String tag throws CVS Exception connection write Line Sticky tag NON NLS 1  sendSticky CVSException writeLine
Sends a Modified request to the server along with the file contents p e g if a file called local file was modified sends pre Modified local file n file permissions n file size n file contents pre p p Under some circumstances Is modified may be used in place of this request br Do not use with history init import rdiff release rtag or update p p Note The most recent Directory request must have specified the file s parent folder p param file the file that was modified param is Binary if true the file is sent without translating line delimiters param monitor the progress monitor see send Is Modified public void send Modified ICVS File file boolean is Binary I Progress Monitor monitor throws CVS Exception send Modified file is Binary true monitor  local_file local_file file_permissions file_size file_contents isBinary sendIsModified sendModified ICVSFile isBinary IProgressMonitor CVSException sendModified isBinary
public void send Modified ICVS File file boolean is Binary boolean send Binary I Progress Monitor monitor throws CVS Exception String filename file get Name connection write Line Modified filename NON NLS 1 send the default permissions for now connection write Line Resource Sync Info get Default Permissions send File file is Binary send Binary monitor  sendModified ICVSFile isBinary sendBinary IProgressMonitor CVSException getName writeLine writeLine ResourceSyncInfo getDefaultPermissions sendFile isBinary sendBinary
Sends a file to the remote CVS server possibly translating line delimiters p Line termination sequences are automatically converted to linefeeds only required by the CVS specification when sending non binary files This may alter the actual size and contents of the file that is sent p p Note Non binary files must be small enough to fit in available memory p param file the file to be sent param is Binary is true if the file should be sent without translation param monitor the progress monitor public void send File ICVS File file boolean is Binary I Progress Monitor monitor throws CVS Exception send File file is Binary true monitor  isBinary sendFile ICVSFile isBinary IProgressMonitor CVSException sendFile isBinary
in new Progress Monitor Input Stream in length TRANSFER PROGRESS INCREMENT monitor protected void update Monitor long bytes Read long bytes Total I Progress Monitor monitor if bytes Read 0 return Assert is True bytes Read bytes Total monitor sub Task Policy bind Session transfer NON NLS 1 new Object title Long to String bytes Read 10 Long to String bytes Total 10  ProgressMonitorInputStream TRANSFER_PROGRESS_INCREMENT updateMonitor bytesRead bytesTotal IProgressMonitor bytesRead isTrue bytesRead bytesTotal subTask toString bytesRead toString bytesTotal
in new Progress Monitor Input Stream in file get Size TRANSFER PROGRESS INCREMENT monitor protected void update Monitor long bytes Read long bytes Total I Progress Monitor monitor if bytes Read 0 return Assert is True bytes Read bytes Total monitor sub Task Policy bind Session transfer NON NLS 1 new Object title Long to String bytes Read 10 Long to String bytes Total 10  ProgressMonitorInputStream getSize TRANSFER_PROGRESS_INCREMENT updateMonitor bytesRead bytesTotal IProgressMonitor bytesRead isTrue bytesRead bytesTotal subTask toString bytesRead toString bytesTotal
public void send File ICVS Storage file boolean is Binary boolean send Binary I Progress Monitor monitor throws CVS Exception check overrides if text Transfer Override Set null text Transfer Override Set contains file is Binary false update progress monitor final String title Policy bind get Send File Title Key new Object Util to Truncated Path file local Root 3 NON NLS 1 monitor sub Task Policy bind Session transfer No Size title NON NLS 1 try Input Stream in null long length try if is Binary send Binary byte bytes hello get Bytes NON NLS 1 send Uncompressed Bytes new Byte Array Input Stream bytes bytes length return if compression Level 0 in file get Contents if is Binary IS CRLF PLATFORM uncompressed text byte buffer new byte TRANSFER BUFFER SIZE in new CRL FtoLF Input Stream in Byte Count Output Stream counter new Byte Count Output Stream try for int count count in read buffer 1 counter write buffer 0 count finally counter close in close length counter get Size in new CRL FtoLF Input Stream file get Contents else uncompressed binary length file get Size in new Progress Monitor Input Stream in length TRANSFER PROGRESS INCREMENT monitor protected void update Monitor long bytes Read long bytes Total I Progress Monitor monitor if bytes Read 0 return Assert is True bytes Read bytes Total monitor sub Task Policy bind Session transfer NON NLS 1 new Object title Long to String bytes Read 10 Long to String bytes Total 10 send Uncompressed Bytes in length else monitor sub Task Policy bind Session calculating Compressed Size Util to Truncated Path file local Root 3 NON NLS 1 in file get Contents byte buffer new byte TRANSFER BUFFER SIZE Byte Count Output Stream counter new Byte Count Output Stream Output Stream zout new GZIP Output Stream counter if is Binary IS CRLF PLATFORM in new CRL FtoLF Input Stream in try for int count count in read buffer 1 zout write buffer 0 count finally zout close in close in file get Contents in new Progress Monitor Input Stream in file get Size TRANSFER PROGRESS INCREMENT monitor protected void update Monitor long bytes Read long bytes Total I Progress Monitor monitor if bytes Read 0 return Assert is True bytes Read bytes Total monitor sub Task Policy bind Session transfer NON NLS 1 new Object title Long to String bytes Read 10 Long to String bytes Total 10 if is Binary IS CRLF PLATFORM in new CRL FtoLF Input Stream in send Compressed Bytes in counter get Size finally if in null in close catch IO Exception e throw CVS Exception wrap Exception e  sendFile ICVSStorage isBinary sendBinary IProgressMonitor CVSException textTransferOverrideSet textTransferOverrideSet isBinary getSendFileTitleKey toTruncatedPath localRoot subTask transferNoSize InputStream isBinary sendBinary getBytes sendUncompressedBytes ByteArrayInputStream compressionLevel getContents isBinary IS_CRLF_PLATFORM TRANSFER_BUFFER_SIZE CRLFtoLFInputStream ByteCountOutputStream ByteCountOutputStream getSize CRLFtoLFInputStream getContents getSize ProgressMonitorInputStream TRANSFER_PROGRESS_INCREMENT updateMonitor bytesRead bytesTotal IProgressMonitor bytesRead isTrue bytesRead bytesTotal subTask toString bytesRead toString bytesTotal sendUncompressedBytes subTask calculatingCompressedSize toTruncatedPath localRoot getContents TRANSFER_BUFFER_SIZE ByteCountOutputStream ByteCountOutputStream OutputStream GZIPOutputStream isBinary IS_CRLF_PLATFORM CRLFtoLFInputStream getContents ProgressMonitorInputStream getSize TRANSFER_PROGRESS_INCREMENT updateMonitor bytesRead bytesTotal IProgressMonitor bytesRead isTrue bytesRead bytesTotal subTask toString bytesRead toString bytesTotal isBinary IS_CRLF_PLATFORM CRLFtoLFInputStream sendCompressedBytes getSize IOException CVSException wrapException
private void send Compressed Bytes Input Stream in long length throws IO Exception CVS Exception String size Line z Long to String length NON NLS 1 write Line size Line Output Stream out connection get Output Stream GZIP Output Stream zo new GZIP Output Stream out byte buffer new byte TRANSFER BUFFER SIZE for int count count in read buffer 1 zo write buffer 0 count zo finish  sendCompressedBytes InputStream IOException CVSException sizeLine toString writeLine sizeLine OutputStream getOutputStream GZIPOutputStream GZIPOutputStream TRANSFER_BUFFER_SIZE
private void send Uncompressed Bytes Input Stream in long length throws IO Exception CVS Exception Output Stream out connection get Output Stream String size Line Long to String length write Line size Line byte buffer new byte TRANSFER BUFFER SIZE for int count count in read buffer 1 out write buffer 0 count  sendUncompressedBytes InputStream IOException CVSException OutputStream getOutputStream sizeLine toString writeLine sizeLine TRANSFER_BUFFER_SIZE
in new Progress Monitor Input Stream in size TRANSFER PROGRESS INCREMENT monitor protected void update Monitor long bytes Read long bytes Total I Progress Monitor monitor if bytes Read 0 return monitor sub Task Policy bind Session transfer NON NLS 1 new Object title Long to String bytes Read 10 Long to String bytes Total 10  ProgressMonitorInputStream TRANSFER_PROGRESS_INCREMENT updateMonitor bytesRead bytesTotal IProgressMonitor bytesRead subTask toString bytesRead toString bytesTotal
Receives a file from the remote CVS server possibly translating line delimiters p Line termination sequences are automatically converted to platform format only when receiving non binary files This may alter the actual size and contents of the file that is received p p Translation is performed on the fly so the file need not fit in available memory p param file the file to be received param is Binary is true if the file should be received without translation param response Type one of the ICVS File updated types UPDATED CREATED MERGED UPDATE EXISTING indicating what repsonse type provided the file contents param monitor the progress monitor public void receive File ICVS Storage file boolean is Binary int response Type I Progress Monitor monitor throws CVS Exception check overrides if text Transfer Override Set null text Transfer Override Set contains file is Binary false update progress monitor final String title Policy bind Session receiving new Object Util to Truncated Path file local Root 3 NON NLS 1 monitor sub Task Policy bind Session transfer No Size title NON NLS 1 get the file size from the server long size boolean compressed false try String size Line read Line if size Line char At 0 z compressed true size Line size Line substring 1 size Long parse Long size Line 10 catch Number Format Exception e throw new CVS Exception Policy bind Session bad Int e NON NLS 1 create an input stream that spans the next size bytes from the connection Input Stream in new Size Constrained Input Stream connection get Input Stream size true discard On Close setup progress monitoring in new Progress Monitor Input Stream in size TRANSFER PROGRESS INCREMENT monitor protected void update Monitor long bytes Read long bytes Total I Progress Monitor monitor if bytes Read 0 return monitor sub Task Policy bind Session transfer NON NLS 1 new Object title Long to String bytes Read 10 Long to String bytes Total 10 if compression enabled decompress on the fly if compressed try in new GZIP Input Stream in catch IO Exception e throw CVS Exception wrap Exception e if not binary translate line delimiters on the fly if is Binary switch from LF to CRLF if appropriate if IS CRLF PLATFORM CVS Provider Plugin get Plugin is Use Platform Lineend auto correct for CRLF line ends that come from the server in new CRL FtoLF Input Stream in convert LF to CRLF in new L FtoCRLF Input Stream in else be nice and warn about text files that contain CRLF in new CRLF Detect Input Stream in file write the file locally file set Contents in response Type true new Null Progress Monitor  isBinary responseType ICVSFile UPDATE_EXISTING receiveFile ICVSStorage isBinary responseType IProgressMonitor CVSException textTransferOverrideSet textTransferOverrideSet isBinary toTruncatedPath localRoot subTask transferNoSize sizeLine readLine sizeLine charAt sizeLine sizeLine parseLong sizeLine NumberFormatException CVSException badInt InputStream SizeConstrainedInputStream getInputStream discardOnClose ProgressMonitorInputStream TRANSFER_PROGRESS_INCREMENT updateMonitor bytesRead bytesTotal IProgressMonitor bytesRead subTask toString bytesRead toString bytesTotal GZIPInputStream IOException CVSException wrapException isBinary IS_CRLF_PLATFORM CVSProviderPlugin getPlugin isUsePlatformLineend CRLFtoLFInputStream LFtoCRLFInputStream CRLFDetectInputStream setContents responseType NullProgressMonitor
Stores the value of the last Mod time response encountered Valid only for the duration of a single CVS command void set Mod Time Date mod Time this mod Time mod Time  setModTime modTime modTime modTime
Returns the stored value of the last Mod time response or null if there was none while processing the current command Date get Mod Time return mod Time  getModTime modTime
Stores true if the n global option was specified for the current command Valid only for the duration of a single CVS command void set No Local Changes boolean no Local Changes this no Local Changes no Local Changes  setNoLocalChanges noLocalChanges noLocalChanges noLocalChanges
Returns true if the n global option was specified for the current command false otherwise boolean is No Local Changes return no Local Changes  isNoLocalChanges noLocalChanges
Callback hook for the Valid Requests Handler to specify the set of valid requests for this session void set Valid Requests String valid Requests this valid Requests valid Requests NON NLS 1 NON NLS 2  ValidRequestsHandler setValidRequests validRequests validRequests validRequests
boolean is Output To Console return output To Console  isOutputToConsole outputToConsole
Stores a flag as to whether files will be created Default is true param create Backups if true creates files at the server s request void set Create Backups boolean create Backups this create Backups create Backups  createBackups setCreateBackups createBackups createBackups createBackups
Returns a flag as to whether files will be created boolean is Create Backups return create Backups  isCreateBackups createBackups
Gets the send File Title Key return Returns a String String get Send File Title Key if send File Title Key null return Session sending NON NLS 1 return send File Title Key  sendFileTitleKey getSendFileTitleKey sendFileTitleKey sendFileTitleKey
Sets the send File Title Key param send File Title Key The send File Title Key to set public void set Send File Title Key String send File Title Key this send File Title Key send File Title Key  sendFileTitleKey sendFileTitleKey sendFileTitleKey setSendFileTitleKey sendFileTitleKey sendFileTitleKey sendFileTitleKey
Remembers a set of files that must be transferred as text regardless of what the is Binary parameter to send File is param text Transfer Override Set the set of ICVS Files to override or null if none public void set Text Transfer Override Collection text Transfer Override Set this text Transfer Override Set text Transfer Override Set  isBinary sendFile textTransferOverrideSet ICVSFiles setTextTransferOverride textTransferOverrideSet textTransferOverrideSet textTransferOverrideSet
Filter the provided global options using parameters set on this session or globally The session may add global options that correspond to user preferences or remove those that contradict requirements for this particular session param global Options the global options read only return the filtered global options protected Global Option filter Global Options Global Option global Options if Command DO NOT CHANGE is Element Of global Options Get the user preference for verbosity Quiet Option quiet Option CVS Provider Plugin get Plugin get Quietness if quiet Option null global Options quiet Option add To End global Options Get the user preference for read only if CVS Provider Plugin get Plugin get Plugin Preferences get Boolean CVS Provider Plugin READ ONLY if Command MAKE READ ONLY is Element Of global Options global Options Command MAKE READ ONLY add To End global Options return global Options  globalOptions GlobalOption filterGlobalOptions GlobalOption globalOptions DO_NOT_CHANGE isElementOf globalOptions QuietOption quietOption CVSProviderPlugin getPlugin getQuietness quietOption globalOptions quietOption addToEnd globalOptions CVSProviderPlugin getPlugin getPluginPreferences getBoolean CVSProviderPlugin READ_ONLY MAKE_READ_ONLY isElementOf globalOptions globalOptions MAKE_READ_ONLY addToEnd globalOptions globalOptions
Method set Ignoring Local Changes param b protected void set Ignoring Local Changes boolean b ignoring Local Changes b  setIgnoringLocalChanges setIgnoringLocalChanges ignoringLocalChanges
Returns the ignoring Local Changes return boolean protected boolean is Ignoring Local Changes return ignoring Local Changes  ignoringLocalChanges isIgnoringLocalChanges ignoringLocalChanges
protected Map get Reponse Handlers if response Handlers null response Handlers Request get Reponse Handler Map return response Handlers  getReponseHandlers responseHandlers responseHandlers getReponseHandlerMap responseHandlers
private String make Response List String Buffer result new String Buffer ok error M E NON NLS 1 Iterator elements get Reponse Handlers key Set iterator while elements has Next result append result append String elements next return result to String  makeResponseList StringBuffer StringBuffer getReponseHandlers keySet hasNext toString
return result to String public void register Response Handler Response Handler handler get Reponse Handlers put handler get ResponseID handler  toString registerResponseHandler ResponseHandler getReponseHandlers getResponseID
public void remove Response Handler String responseID get Reponse Handlers remove responseID  removeResponseHandler getReponseHandlers
public Response Handler get Response Handler String responseID return Response Handler get Reponse Handlers get responseID  ResponseHandler getResponseHandler ResponseHandler getReponseHandlers

private final boolean set Static Directory public Static Handler boolean set Static Directory this set Static Directory set Static Directory  setStaticDirectory StaticHandler setStaticDirectory setStaticDirectory setStaticDirectory
public String get ResponseID if set Static Directory return Set static directory NON NLS 1 else return Clear static directory NON NLS 1  getResponseID setStaticDirectory
public void handle Session session String local Dir I Progress Monitor monitor throws CVS Exception read additional data for the response String repository Dir session read Line create the directory then set or clear the static flag Assert is True repository Dir ends With NON NLS 1 repository Dir repository Dir substring 0 repository Dir length 1 ICVS Folder folder create Folder session local Dir repository Dir Folder Sync Info sync Info folder get Folder Sync Info Added to ignore sync info for workspace root if sync Info null return Folder Sync Info new Info new Folder Sync Info sync Info get Repository sync Info get Root sync Info get Tag set Static Directory only set the sync info if it has changed if sync Info equals new Info folder set Folder Sync Info new Info  localDir IProgressMonitor CVSException repositoryDir readLine isTrue repositoryDir endsWith repositoryDir repositoryDir repositoryDir ICVSFolder createFolder localDir repositoryDir FolderSyncInfo syncInfo getFolderSyncInfo syncInfo FolderSyncInfo newInfo FolderSyncInfo syncInfo getRepository syncInfo getRoot syncInfo getTag setStaticDirectory syncInfo newInfo setFolderSyncInfo newInfo

public class Status extends Abstract Message Command Local options specific to status protected Status  AbstractMessageCommand
protected Status protected String get Request Id return status NON NLS 1  getRequestId

private final boolean set Sticky public Sticky Handler boolean set Sticky this set Sticky set Sticky  setSticky StickyHandler setSticky setSticky setSticky
public String get ResponseID if set Sticky return Set sticky NON NLS 1 else return Clear sticky NON NLS 1  getResponseID setSticky
public void handle Session session String local Dir I Progress Monitor monitor throws CVS Exception read additional data for the response String repository Dir session read Line String tag null if set Sticky tag session read Line if tag length 0 tag null FIXME is this correct create the directory then set or clear the sticky tag Assert is True repository Dir ends With NON NLS 1 repository Dir repository Dir substring 0 repository Dir length 1 ICVS Folder folder create Folder session local Dir repository Dir Folder Sync Info sync Info folder get Folder Sync Info Added to ignore sync info for workspace root if sync Info null return Folder Sync Info new Info new Folder Sync Info sync Info get Repository sync Info get Root tag null new CVS Entry Line Tag tag null sync Info get Is Static only set the sync info if it has changed if sync Info equals new Info folder set Folder Sync Info new Info  localDir IProgressMonitor CVSException repositoryDir readLine setSticky readLine isTrue repositoryDir endsWith repositoryDir repositoryDir repositoryDir ICVSFolder createFolder localDir repositoryDir FolderSyncInfo syncInfo getFolderSyncInfo syncInfo FolderSyncInfo newInfo FolderSyncInfo syncInfo getRepository syncInfo getRoot CVSEntryLineTag syncInfo getIsStatic syncInfo newInfo setFolderSyncInfo newInfo

public class Sync Update extends Update public Sync Update  SyncUpdate SyncUpdate
protected void send File Structure Session session ICVS Resource resources boolean empty Folders I Progress Monitor monitor throws CVS Exception check Resources Managed resources new File Structure Visitor session empty Folders true false visit session resources monitor  sendFileStructure ICVSResource emptyFolders IProgressMonitor CVSException checkResourcesManaged FileStructureVisitor emptyFolders

private boolean custom Behavior Enabled protected Tag boolean custom Behavior Enabled this custom Behavior Enabled custom Behavior Enabled  customBehaviorEnabled customBehaviorEnabled customBehaviorEnabled customBehaviorEnabled
protected Tag this false 
protected String get Request Id return tag NON NLS 1  getRequestId
protected ICVS Resource compute Work Resources Session session Local Option local Options String arguments throws CVS Exception if arguments length 1 throw new Illegal Argument Exception String all But First new String arguments length 1 System arraycopy arguments 1 all But First 0 arguments length 1 return super compute Work Resources session local Options all But First  ICVSResource computeWorkResources LocalOption localOptions CVSException IllegalArgumentException allButFirst allButFirst computeWorkResources localOptions allButFirst
public I Status execute Session session Global Option global Options Local Option local Options CVS Tag tag String arguments I Command Output Listener listener I Progress Monitor monitor throws CVS Exception if tag get Type CVS Tag VERSION tag get Type CVS Tag BRANCH throw new CVS Exception new CVS Status I Status ERROR Policy bind Tag not Version Or Branch Error NON NLS 1 Add the CREATE BRANCH option for a branch tag if tag get Type CVS Tag BRANCH if CREATE BRANCH is Element Of local Options Local Option new Local Options new Local Option local Options length 1 System arraycopy local Options 0 new Local Options 0 local Options length new Local Options new Local Options length 1 CREATE BRANCH local Options new Local Options Add the tag name to the start of the arguments String new Arguments new String arguments length 1 new Arguments 0 tag get Name System arraycopy arguments 0 new Arguments 1 arguments length return execute session global Options local Options new Arguments listener monitor  IStatus GlobalOption globalOptions LocalOption localOptions CVSTag ICommandOutputListener IProgressMonitor CVSException getType CVSTag getType CVSTag CVSException CVSStatus IStatus notVersionOrBranchError CREATE_BRANCH getType CVSTag CREATE_BRANCH isElementOf localOptions LocalOption newLocalOptions LocalOption localOptions localOptions newLocalOptions localOptions newLocalOptions newLocalOptions CREATE_BRANCH localOptions newLocalOptions newArguments newArguments getName newArguments globalOptions localOptions newArguments
public I Status execute Session session Global Option global Options Local Option local Options CVS Tag tag ICVS Resource arguments I Command Output Listener listener I Progress Monitor monitor throws CVS Exception String string Arguments convert Arguments For Open Session arguments session return execute session global Options local Options tag string Arguments listener monitor  IStatus GlobalOption globalOptions LocalOption localOptions CVSTag ICVSResource ICommandOutputListener IProgressMonitor CVSException stringArguments convertArgumentsForOpenSession globalOptions localOptions stringArguments
protected I Command Output Listener get Default Command Output Listener return DEFAULT OUTPUT LISTENER  ICommandOutputListener getDefaultCommandOutputListener DEFAULT_OUTPUT_LISTENER
protected ICVS Resource send Local Resource State Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor throws CVS Exception Send all folders that are already managed to the server if custom Behavior Enabled new Tag File Sender session visit session resources monitor else new File Structure Visitor session false false visit session resources monitor return resources  ICVSResource sendLocalResourceState GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor CVSException customBehaviorEnabled TagFileSender FileStructureVisitor

class Tag File Sender extends File Structure Visitor public Tag File Sender Session session super session false false  TagFileSender FileStructureVisitor TagFileSender
Override send File to provide custom handling of added and deleted resources Added resources are skipped Deleted resources are sent as if they were not deleted protected void send File ICVS File m File throws CVS Exception Policy check Canceled monitor byte sync Bytes m File get Sync Bytes if sync Bytes null Send the parent folder if it hasn t been sent already send Folder m File get Parent Send the file if appropriate if Resource Sync Info is Deletion sync Bytes makes this resource sync undeleted sync Bytes Resource Sync Info convert From Deletion sync Bytes if Resource Sync Info is Addition sync Bytes session send Entry sync Bytes Resource Sync Info get Timestamp To Server sync Bytes m File get Time Stamp session send Is Modified m File Resource Sync Info is Binary sync Bytes monitor  sendFile sendFile ICVSFile mFile CVSException checkCanceled syncBytes mFile getSyncBytes syncBytes sendFolder mFile getParent ResourceSyncInfo isDeletion syncBytes syncBytes ResourceSyncInfo convertFromDeletion syncBytes ResourceSyncInfo isAddition syncBytes sendEntry syncBytes ResourceSyncInfo getTimestampToServer syncBytes mFile getTimeStamp sendIsModified mFile ResourceSyncInfo isBinary syncBytes

see org eclipse team internal ccvs core client Response Handler get ResponseID public String get ResponseID return Template NON NLS 1  ResponseHandler getResponseID getResponseID
Create a dummy storage handle to recieve the contents from the server template File new ICVS Storage public String get Name return Template NON NLS 1  templateFile ICVSStorage getName
public void set Contents Input Stream stream int response Type boolean keep Local History I Progress Monitor monitor throws CVS Exception try Transfer the contents Output Stream out new Byte Array Output Stream try byte buffer new byte 1024 int read while read stream read buffer 0 Policy check Canceled monitor out write buffer 0 read finally out close catch IO Exception e throw CVS Exception wrap Exception e NON NLS 1 finally try stream close catch IO Exception e1 Ignore close errors  setContents InputStream responseType keepLocalHistory IProgressMonitor CVSException OutputStream ByteArrayOutputStream checkCanceled IOException CVSException wrapException IOException
public long get Size return 0  getSize
return 0 public Input Stream get Contents throws CVS Exception return new Byte Array Input Stream new byte 0  InputStream getContents CVSException ByteArrayInputStream
see org eclipse team internal ccvs core client Response Handler handle org eclipse team internal ccvs core client Session java lang String org eclipse core runtime I Progress Monitor public void handle Session session String local Dir I Progress Monitor monitor throws CVS Exception String remote Dir session read Line ICVS Folder local Folder get Existing Folder session local Dir I Container container I Container local Folder getI Resource ICVS Storage template File if container null Create a dummy storage handle to recieve the contents from the server template File new ICVS Storage public String get Name return Template NON NLS 1 public void set Contents Input Stream stream int response Type boolean keep Local History I Progress Monitor monitor throws CVS Exception try Transfer the contents Output Stream out new Byte Array Output Stream try byte buffer new byte 1024 int read while read stream read buffer 0 Policy check Canceled monitor out write buffer 0 read finally out close catch IO Exception e throw CVS Exception wrap Exception e NON NLS 1 finally try stream close catch IO Exception e1 Ignore close errors public long get Size return 0 public Input Stream get Contents throws CVS Exception return new Byte Array Input Stream new byte 0 else template File CVS Workspace Root getCVS File For Sync File Writer get Template File container session receive File template File false Updated Handler HANDLE UPDATED monitor  ResponseHandler IProgressMonitor localDir IProgressMonitor CVSException remoteDir readLine ICVSFolder localFolder getExistingFolder localDir IContainer IContainer localFolder getIResource ICVSStorage templateFile templateFile ICVSStorage getName setContents InputStream responseType keepLocalHistory IProgressMonitor CVSException OutputStream ByteArrayOutputStream checkCanceled IOException CVSException wrapException IOException getSize InputStream getContents CVSException ByteArrayInputStream templateFile CVSWorkspaceRoot getCVSFileFor SyncFileWriter getTemplateFile receiveFile templateFile UpdatedHandler HANDLE_UPDATED

Makes a r or D or A option for a tag Valid for checkout export history rdiff update public static Local Option make Tag Option CVS Tag tag int type tag get Type switch type case CVS Tag HEAD return CLEAR STICKY default return Command make Tag Option tag  LocalOption makeTagOption CVSTag getType CVSTag CLEAR_STICKY makeTagOption
protected Update 
protected Update protected String get Request Id return update NON NLS 1  getRequestId
protected I Command Output Listener get Default Command Output Listener return DEFAULT OUTPUT LISTENER  ICommandOutputListener getDefaultCommandOutputListener DEFAULT_OUTPUT_LISTENER
protected ICVS Resource send Local Resource State Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor throws CVS Exception Send all folders that are already managed to the server even folders that are empty send File Structure session resources true monitor return resources  ICVSResource sendLocalResourceState GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor CVSException sendFileStructure
Convenience method that allows the creation of files to be disabled param create Backups if true creates files see Command execute public final I Status execute Session session Global Option global Options Local Option local Options String arguments I Command Output Listener listener I Progress Monitor pm boolean create Backups throws CVS Exception session set Create Backups create Backups try return super execute session global Options local Options arguments listener pm finally session set Create Backups true  createBackups IStatus GlobalOption globalOptions LocalOption localOptions ICommandOutputListener IProgressMonitor createBackups CVSException setCreateBackups createBackups globalOptions localOptions setCreateBackups
On successful finish prune empty directories if the P or D option was specified protected I Status command Finished Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor I Status status throws CVS Exception If we didn t succeed don t do any post processing if status get Code CVS Status SERVER ERROR return status If we are pruning P then prune empty directories Note the CVS spec says that Date D and version r updates should automatically prune but this is a problem for remote CVS handles which fetch a level at a time if PRUNE EMPTY DIRECTORIES is Element Of local Options NON NLS 1 Delete empty directories new Prune Folder Visitor visit session resources return status  IStatus commandFinished GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor IStatus CVSException getCode CVSStatus SERVER_ERROR PRUNE_EMPTY_DIRECTORIES isElementOf localOptions PruneFolderVisitor
protected Local Option filter Local Options Session session Global Option global Options Local Option local Options List new Options new Array List Arrays as List local Options Look for absent directories if enabled and the option is not already included ICVS Folder session Root session get Local Root I Resource resource null Repository Provider provider null If there is a provider use the providers setting try resource session get Local Root getI Resource if resource null provider Repository Provider get Provider resource get Project CVS Provider Plugin get Type Id if provider null if CVS Team Provider provider get Fetch Absent Directories RETRIEVE ABSENT DIRECTORIES is Element Of local Options new Options add Update RETRIEVE ABSENT DIRECTORIES catch CVS Exception e CVS Provider Plugin log e If there is no provider use the global setting if provider null if CVS Provider Plugin get Plugin get Fetch Absent Directories RETRIEVE ABSENT DIRECTORIES is Element Of local Options new Options add Update RETRIEVE ABSENT DIRECTORIES Prune empty directories if pruning is enabled and the command in not being run in non update mode if CVS Provider Plugin get Plugin get Prune Empty Directories PRUNE EMPTY DIRECTORIES is Element Of local Options if DO NOT CHANGE is Element Of global Options new Options add Update PRUNE EMPTY DIRECTORIES local Options Local Option new Options to Array new Local Option new Options size return super filter Local Options session global Options local Options  LocalOption filterLocalOptions GlobalOption globalOptions LocalOption localOptions newOptions ArrayList asList localOptions ICVSFolder sessionRoot getLocalRoot IResource RepositoryProvider getLocalRoot getIResource RepositoryProvider getProvider getProject CVSProviderPlugin getTypeId CVSTeamProvider getFetchAbsentDirectories RETRIEVE_ABSENT_DIRECTORIES isElementOf localOptions newOptions RETRIEVE_ABSENT_DIRECTORIES CVSException CVSProviderPlugin CVSProviderPlugin getPlugin getFetchAbsentDirectories RETRIEVE_ABSENT_DIRECTORIES isElementOf localOptions newOptions RETRIEVE_ABSENT_DIRECTORIES CVSProviderPlugin getPlugin getPruneEmptyDirectories PRUNE_EMPTY_DIRECTORIES isElementOf localOptions DO_NOT_CHANGE isElementOf globalOptions newOptions PRUNE_EMPTY_DIRECTORIES localOptions LocalOption newOptions toArray LocalOption newOptions filterLocalOptions globalOptions localOptions
We allow unmanaged resources as long as there parents are managed see Command check Resources Managed ICVS Resource protected void check Resources Managed ICVS Resource resources throws CVS Exception for int i 0 i resources length i ICVS Folder folder if resources i is Folder if ICVS Folder resources i isCVS Folder folder ICVS Folder resources i else folder resources i get Parent else folder resources i get Parent if folder null folder isCVS Folder folder exists throw new CVS Exception Policy bind Command argument Not Managed folder get Name NON NLS 1  checkResourcesManaged ICVSResource checkResourcesManaged ICVSResource CVSException ICVSFolder isFolder ICVSFolder isCVSFolder ICVSFolder getParent getParent isCVSFolder CVSException argumentNotManaged getName
see org eclipse team internal ccvs core client Command do Execute org eclipse team internal ccvs core client Session org eclipse team internal ccvs core client Command Global Option org eclipse team internal ccvs core client Command Local Option java lang String org eclipse team internal ccvs core client listeners I Command Output Listener org eclipse core runtime I Progress Monitor protected I Status do Execute Session session Global Option global Options Local Option local Options String arguments I Command Output Listener listener I Progress Monitor monitor throws CVS Exception session set Ignoring Local Changes IGNORE LOCAL CHANGES is Element Of local Options try return super do Execute session global Options local Options arguments listener monitor finally session set Ignoring Local Changes false  doExecute GlobalOption LocalOption ICommandOutputListener IProgressMonitor IStatus doExecute GlobalOption globalOptions LocalOption localOptions ICommandOutputListener IProgressMonitor CVSException setIgnoringLocalChanges IGNORE_LOCAL_CHANGES isElementOf localOptions doExecute globalOptions localOptions setIgnoringLocalChanges

private static final String READ ONLY FLAG u rw NON NLS 1 public Updated Handler int handler Type this handler Type handler Type  READ_ONLY_FLAG UpdatedHandler handlerType handlerType handlerType
public String get ResponseID switch handler Type case HANDLE UPDATED return Updated NON NLS 1 case HANDLE MERGED return Merged NON NLS 1 case HANDLE UPDATE EXISTING return Update existing NON NLS 1 case HANDLE CREATED return Created NON NLS 1 return null  getResponseID handlerType HANDLE_UPDATED HANDLE_MERGED HANDLE_UPDATE_EXISTING HANDLE_CREATED
public void handle Session session String local Dir I Progress Monitor monitor throws CVS Exception read additional data for the response String repository File session read Line String entry Line session read Line byte entry Bytes entry Line get Bytes String permissions Line session read Line clear file update modifiers Date mod Time session get Mod Time session set Mod Time null Get the local file String file Name repository File substring repository File last Index Of 1 NON NLS 1 ICVS Folder m Parent get Existing Folder session local Dir ICVS File m File get Target File m Parent file Name entry Bytes boolean binary Resource Sync Info is Binary entry Bytes boolean read Only permissions Line index Of READ ONLY FLAG 1 The file may have been set as read only by a previous checkout update if m File is Read Only m File set Read Only false receive Target File session m File entry Line mod Time binary read Only monitor  localDir IProgressMonitor CVSException repositoryFile readLine entryLine readLine entryBytes entryLine getBytes permissionsLine readLine modTime getModTime setModTime fileName repositoryFile repositoryFile lastIndexOf ICVSFolder mParent getExistingFolder localDir ICVSFile mFile getTargetFile mParent fileName entryBytes ResourceSyncInfo isBinary entryBytes readOnly permissionsLine indexOf READ_ONLY_FLAG mFile isReadOnly mFile setReadOnly receiveTargetFile mFile entryLine modTime readOnly
protected ICVS File get Target File ICVS Folder m Parent String file Name byte entry Bytes throws CVS Exception return m Parent get File file Name  ICVSFile getTargetFile ICVSFolder mParent fileName entryBytes CVSException mParent getFile fileName
protected void receive Target File Session session ICVS File m File String entry Line Date mod Time boolean binary boolean read Only I Progress Monitor monitor throws CVS Exception receive the file contents from the server session receive File m File binary handler Type monitor Set the timestamp in the file and get it again so that we use the real timestamp in the sync info The os may not actually set the time we provided m File set Time Stamp mod Time mod Time m File get Time Stamp Resource Sync Info info new Resource Sync Info entry Line null null Mutable Resource Sync Info new Info With Timestamp info clone Mutable new Info With Timestamp set Time Stamp mod Time int modification State ICVS File UNKNOWN if handler Type HANDLE MERGED new Info With Timestamp set Merged else if session is Ignoring Local Changes info is Added could be an added entry during a merge in which case it is dirty handler Type HANDLE UPDATE EXISTING handler Type HANDLE CREATED both these cases result in an unmodified file reporting is handled by the File Modification Manager modification State ICVS File CLEAN CVS Provider Plugin get Plugin get File Modification Manager updated m File m File set Sync Info new Info With Timestamp modification State if read Only m File set Read Only true  receiveTargetFile ICVSFile mFile entryLine modTime readOnly IProgressMonitor CVSException receiveFile mFile handlerType mFile setTimeStamp modTime modTime mFile getTimeStamp ResourceSyncInfo ResourceSyncInfo entryLine MutableResourceSyncInfo newInfoWithTimestamp cloneMutable newInfoWithTimestamp setTimeStamp modTime modificationState ICVSFile handlerType HANDLE_MERGED newInfoWithTimestamp setMerged isIgnoringLocalChanges isAdded handlerType HANDLE_UPDATE_EXISTING handlerType HANDLE_CREATED FileModificationManager modificationState ICVSFile CVSProviderPlugin getPlugin getFileModificationManager mFile mFile setSyncInfo newInfoWithTimestamp modificationState readOnly mFile setReadOnly

public static void initialize Patterns try MERGE UPDATE CONFLICTING ADDITION MATCHER new Server Message Line Matcher I Message Patterns MERGE UPDATE CONFLICTING ADDITION new String LOCAL FILE PATH VARIABLE NAME catch CVS Exception e This is serious as the listener will not function properly CVS Provider Plugin log e  initializePatterns MERGE_UPDATE_CONFLICTING_ADDITION_MATCHER ServerMessageLineMatcher IMessagePatterns MERGE_UPDATE_CONFLICTING_ADDITION LOCAL_FILE_PATH_VARIABLE_NAME CVSException CVSProviderPlugin
public class Mergable Only Updated Handler extends Updated Handler public Mergable Only Updated Handler handle Merged responses super Updated Handler HANDLE MERGED  MergableOnlyUpdatedHandler UpdatedHandler MergableOnlyUpdatedHandler UpdatedHandler HANDLE_MERGED
protected ICVS File get Target File ICVS Folder m Parent String file Name byte entry Bytes throws CVS Exception String adjusted File Name file Name if Resource Sync Info is Merged With Conflicts entry Bytes for merged with conflict return a temp file adjusted File Name adjusted File Name Resource Sync Info get Revision entry Bytes NON NLS 1 NON NLS 2 skipped Files add I Container m Parent getI Resource get File new Path file Name return super get Target File m Parent adjusted File Name entry Bytes  ICVSFile getTargetFile ICVSFolder mParent fileName entryBytes CVSException adjustedFileName fileName ResourceSyncInfo isMergedWithConflicts entryBytes adjustedFileName adjustedFileName ResourceSyncInfo getRevision entryBytes skippedFiles IContainer mParent getIResource getFile fileName getTargetFile mParent adjustedFileName entryBytes
protected void receive Target File Session session ICVS File m File String entry Line Date mod Time boolean binary boolean read Only I Progress Monitor monitor throws CVS Exception if Resource Sync Info is Merged With Conflicts entry Line get Bytes For merged with conflict just recieve the file contents Use the Updated handler type so that the file will be created or updated session receive File m File binary Updated Handler HANDLE UPDATED monitor Now delete the file since it is not used m File delete else super receive Target File session m File entry Line mod Time binary read Only monitor  receiveTargetFile ICVSFile mFile entryLine modTime readOnly IProgressMonitor CVSException ResourceSyncInfo isMergedWithConflicts entryLine getBytes receiveFile mFile UpdatedHandler HANDLE_UPDATED mFile receiveTargetFile mFile entryLine modTime readOnly
public class Merge Update Listener extends Update Listener public Merge Update Listener I Update Message Listener update Message Listener super update Message Listener  MergeUpdateListener UpdateListener MergeUpdateListener IUpdateMessageListener updateMessageListener updateMessageListener
public I Status error Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor Map variables MERGE UPDATE CONFLICTING ADDITION MATCHER process Server Message line if variables null String file Path String variables get LOCAL FILE PATH VARIABLE NAME try ICVS Resource cvs Resource command Root get Child file Path I Resource resource cvs Resource getI Resource if resource null resource get Type I Resource FILE skipped Files add resource return OK catch CVS Exception e CVS Provider Plugin log e Fall through to let the superclass process the error line return super error Line line location command Root monitor  IStatus errorLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor MERGE_UPDATE_CONFLICTING_ADDITION_MATCHER processServerMessage filePath LOCAL_FILE_PATH_VARIABLE_NAME ICVSResource cvsResource commandRoot getChild filePath IResource cvsResource getIResource getType IResource skippedFiles CVSException CVSProviderPlugin errorLine commandRoot
protected I Status do Execute Session session Global Option global Options Local Option local Options String arguments I Command Output Listener listener I Progress Monitor monitor throws CVS Exception Mergable Only Updated Handler new Handler new Mergable Only Updated Handler Response Handler old Handler session get Response Handler new Handler get ResponseID skipped Files clear try session register Response Handler new Handler Don t create backup files since merges won t be overridden session set Create Backups false return super do Execute session global Options local Options arguments new Merge Update Listener null monitor finally session register Response Handler old Handler session set Create Backups true  IStatus doExecute GlobalOption globalOptions LocalOption localOptions ICommandOutputListener IProgressMonitor CVSException MergableOnlyUpdatedHandler newHandler MergableOnlyUpdatedHandler ResponseHandler oldHandler getResponseHandler newHandler getResponseID skippedFiles registerResponseHandler newHandler setCreateBackups doExecute globalOptions localOptions MergeUpdateListener registerResponseHandler oldHandler setCreateBackups
public I File get Skipped Files return I File skipped Files to Array new I File skipped Files size  IFile getSkippedFiles IFile skippedFiles toArray IFile skippedFiles

public class Created Response Handler extends Updated Handler public Created Response Handler super Updated Handler HANDLE UPDATED  CreatedResponseHandler UpdatedHandler CreatedResponseHandler UpdatedHandler HANDLE_UPDATED
super Updated Handler HANDLE UPDATED public String get ResponseID return Created NON NLS 1  UpdatedHandler HANDLE_UPDATED getResponseID
protected I Status do Execute Session session Global Option global Options Local Option local Options String arguments I Command Output Listener listener I Progress Monitor monitor throws CVS Exception Response Handler new Created new Created Response Handler Response Handler old Created session get Response Handler new Created get ResponseID session register Response Handler new Created try return super do Execute session global Options local Options arguments listener monitor finally session register Response Handler old Created  IStatus doExecute GlobalOption globalOptions LocalOption localOptions ICommandOutputListener IProgressMonitor CVSException ResponseHandler newCreated CreatedResponseHandler ResponseHandler oldCreated getResponseHandler newCreated getResponseID registerResponseHandler newCreated doExecute globalOptions localOptions registerResponseHandler oldCreated

class Valid Requests extends Request protected Valid Requests  ValidRequests ValidRequests
protected Valid Requests protected String get Request Id return valid requests NON NLS 1  ValidRequests getRequestId
public I Status execute Session session I Progress Monitor monitor throws CVS Exception return execute Request session Command DEFAULT OUTPUT LISTENER monitor  IStatus IProgressMonitor CVSException executeRequest DEFAULT_OUTPUT_LISTENER

class Valid Requests Handler extends Response Handler public String get ResponseID return Valid requests NON NLS 1  ValidRequestsHandler ResponseHandler getResponseID
public void handle Session session String valid Requests I Progress Monitor monitor throws CVS Exception remember the set of valid requests for this session session set Valid Requests valid Requests  validRequests IProgressMonitor CVSException setValidRequests validRequests

private static final String CVS PREFIX Concurrent Versions System CVS NON NLS 1 see Request get Request Id protected String get Request Id return version NON NLS 1  CVS_PREFIX getRequestId getRequestId
I Command Output Listener listener new I Command Output Listener public I Status message Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor String known Prefix null boolean isCVSNT false if line starts With CVS NT PREFIX 1 isCVSNT true known Prefix CVS NT PREFIX 1 else if line starts With CVS NT PREFIX 2 isCVSNT true known Prefix CVS NT PREFIX 2 else if line starts With CVS PREFIX known Prefix CVS PREFIX I Status status OK if known Prefix null String version Number line substring known Prefix length line index Of known Prefix length 1 if version Number starts With 1 10 version Number equals 1 11 version Number equals 1 11 1 NON NLS 1 NON NLS 2 NON NLS 3 status new CVS Status I Status ERROR CVS Status UNSUPPORTED SERVER VERSION Policy bind Version unsupported Version location get Host version Number NON NLS 1 else if isCVSNT status new CVS Status I Status WARNING CVS Status SERVER IS CVSNT Policy bind Version unsupportedCVSNT location get Host version Number NON NLS 1 else status new CVS Status I Status INFO CVS Status SERVER IS UNKNOWN Policy bind Version unknown Version Format location get Host line NON NLS 1 CVS Repository Location location set Server Plaform status return status  ICommandOutputListener ICommandOutputListener IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor knownPrefix startsWith CVS_NT_PREFIX_1 knownPrefix CVS_NT_PREFIX_1 startsWith CVS_NT_PREFIX_2 knownPrefix CVS_NT_PREFIX_2 startsWith CVS_PREFIX knownPrefix CVS_PREFIX IStatus knownPrefix versionNumber knownPrefix indexOf knownPrefix versionNumber startsWith versionNumber versionNumber CVSStatus IStatus CVSStatus UNSUPPORTED_SERVER_VERSION unsupportedVersion getHost versionNumber CVSStatus IStatus CVSStatus SERVER_IS_CVSNT getHost versionNumber CVSStatus IStatus CVSStatus SERVER_IS_UNKNOWN unknownVersionFormat getHost CVSRepositoryLocation setServerPlaform
return status public I Status error Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor return new CVS Status I Status ERROR CVS Status ERROR LINE line  IStatus errorLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor CVSStatus IStatus CVSStatus ERROR_LINE
public I Status execute Session session final ICVS Repository Location location I Progress Monitor monitor throws CVS Exception The server may not support the version request if session is Valid Request get Request Id I Status status new CVS Status I Status WARNING CVS Status SERVER IS UNKNOWN Policy bind Version version Not Valid Request location get Host NON NLS 1 CVS Repository Location location set Server Plaform status CVS Provider Plugin log status return status I Command Output Listener listener new I Command Output Listener public I Status message Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor String known Prefix null boolean isCVSNT false if line starts With CVS NT PREFIX 1 isCVSNT true known Prefix CVS NT PREFIX 1 else if line starts With CVS NT PREFIX 2 isCVSNT true known Prefix CVS NT PREFIX 2 else if line starts With CVS PREFIX known Prefix CVS PREFIX I Status status OK if known Prefix null String version Number line substring known Prefix length line index Of known Prefix length 1 if version Number starts With 1 10 version Number equals 1 11 version Number equals 1 11 1 NON NLS 1 NON NLS 2 NON NLS 3 status new CVS Status I Status ERROR CVS Status UNSUPPORTED SERVER VERSION Policy bind Version unsupported Version location get Host version Number NON NLS 1 else if isCVSNT status new CVS Status I Status WARNING CVS Status SERVER IS CVSNT Policy bind Version unsupportedCVSNT location get Host version Number NON NLS 1 else status new CVS Status I Status INFO CVS Status SERVER IS UNKNOWN Policy bind Version unknown Version Format location get Host line NON NLS 1 CVS Repository Location location set Server Plaform status return status public I Status error Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor return new CVS Status I Status ERROR CVS Status ERROR LINE line return execute session NO GLOBAL OPTIONS NO LOCAL OPTIONS new String listener monitor  IStatus ICVSRepositoryLocation IProgressMonitor CVSException isValidRequest getRequestId IStatus CVSStatus IStatus CVSStatus SERVER_IS_UNKNOWN versionNotValidRequest getHost CVSRepositoryLocation setServerPlaform CVSProviderPlugin ICommandOutputListener ICommandOutputListener IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor knownPrefix startsWith CVS_NT_PREFIX_1 knownPrefix CVS_NT_PREFIX_1 startsWith CVS_NT_PREFIX_2 knownPrefix CVS_NT_PREFIX_2 startsWith CVS_PREFIX knownPrefix CVS_PREFIX IStatus knownPrefix versionNumber knownPrefix indexOf knownPrefix versionNumber startsWith versionNumber versionNumber CVSStatus IStatus CVSStatus UNSUPPORTED_SERVER_VERSION unsupportedVersion getHost versionNumber CVSStatus IStatus CVSStatus SERVER_IS_CVSNT getHost versionNumber CVSStatus IStatus CVSStatus SERVER_IS_UNKNOWN unknownVersionFormat getHost CVSRepositoryLocation setServerPlaform IStatus errorLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor CVSStatus IStatus CVSStatus ERROR_LINE NO_GLOBAL_OPTIONS NO_LOCAL_OPTIONS
see org eclipse team internal ccvs core client Command is Workspace Modification protected boolean is Workspace Modification return false  isWorkspaceModification isWorkspaceModification

private byte read Line Buffer new byte 256 public Connection ICVS Repository Location cvsroot I Server Connection server Connection fCVS Root cvsroot this server Connection server Connection  readLineBuffer ICVSRepositoryLocation IServerConnection serverConnection fCVSRoot serverConnection serverConnection
private static byte append byte buffer int index byte b if index buffer length byte new Buffer new byte index 2 System arraycopy buffer 0 new Buffer 0 buffer length buffer new Buffer buffer index b return buffer  newBuffer newBuffer newBuffer
Closes the connection public void close if is Established return try server Connection close catch IO Exception ex Generally errors on close are of no interest However log them if debugging is on if CVS Provider Plugin get Plugin is Debugging CVS Provider Plugin log new CVS Communication Exception Policy bind Connection cannot Close ex NON NLS 1 finally f Response Stream null f Is Established false  isEstablished serverConnection IOException CVSProviderPlugin getPlugin isDebugging CVSProviderPlugin CVSCommunicationException cannotClose fResponseStream fIsEstablished
Flushes the request stream public void flush throws CVS Exception if is Established return try get Output Stream flush catch IO Exception e throw new CVS Communication Exception e  CVSException isEstablished getOutputStream IOException CVSCommunicationException
Returns the code Output Stream code used to send requests to the server public Output Stream get Output Stream if is Established return null return server Connection get Output Stream  OutputStream OutputStream getOutputStream isEstablished serverConnection getOutputStream
Returns the code Input Stream code used to read responses from the server public Input Stream get Input Stream if is Established return null if f Response Stream null f Response Stream server Connection get Input Stream return f Response Stream  InputStream InputStream getInputStream isEstablished fResponseStream fResponseStream serverConnection getInputStream fResponseStream
Returns code true code if the connection is established otherwise code false code public boolean is Established return f Is Established  isEstablished fIsEstablished
Opens the connection public void open I Progress Monitor monitor throws CVS Exception if is Established return try server Connection open monitor catch IO Exception e throw new CVS Communication Exception e f Is Established true  IProgressMonitor CVSException isEstablished serverConnection IOException CVSCommunicationException fIsEstablished
Reads a line from the response stream public String read Line throws CVS Exception if is Established throw new CVS Communication Exception Policy bind Connection read Unestablished Connection NON NLS 1 try Input Stream in get Input Stream int index 0 int r while r in read 1 if r NEWLINE break read Line Buffer append read Line Buffer index byte r String result new String read Line Buffer 0 index get Encoding fCVS Root if Policy DEBUG CVS PROTOCOL System out println result return result catch IO Exception e throw new CVS Communication Exception e  readLine CVSException isEstablished CVSCommunicationException readUnestablishedConnection InputStream getInputStream readLineBuffer readLineBuffer readLineBuffer getEncoding fCVSRoot DEBUG_CVS_PROTOCOL IOException CVSCommunicationException
static String read Line ICVS Repository Location location Input Stream in throws IO Exception byte buffer new byte 256 int index 0 int r while r in read 1 if r NEWLINE break buffer append buffer index byte r String result new String buffer 0 index get Encoding location if Policy DEBUG CVS PROTOCOL System out println result return result  readLine ICVSRepositoryLocation InputStream IOException getEncoding DEBUG_CVS_PROTOCOL
Sends the given string to the server public void write String s throws CVS Exception try write s get Bytes get Encoding fCVS Root false catch Unsupported Encoding Exception e throw new CVS Exception e get Message  CVSException getBytes getEncoding fCVSRoot UnsupportedEncodingException CVSException getMessage
Return the encoding for the given repository location return the encoding for the given repository location public static String get Encoding ICVS Repository Location location return location get Encoding  getEncoding ICVSRepositoryLocation getEncoding
Sends the given string and a newline to the server public void write Line String s throws CVS Exception try write s get Bytes get Encoding fCVS Root true catch Unsupported Encoding Exception e throw new CVS Exception e get Message  writeLine CVSException getBytes getEncoding fCVSRoot UnsupportedEncodingException CVSException getMessage
void write byte bytes boolean new Line throws CVS Exception write bytes 0 bytes length new Line  newLine CVSException newLine
Low level method to write a string to the server All write methods are funneled through this method void write byte b int off int len boolean newline throws CVS Exception if is Established throw new CVS Communication Exception Policy bind Connection write Unestablished Connection NON NLS 1 if Policy DEBUG CVS PROTOCOL System out print new String b off len newline n NON NLS 1 NON NLS 2 try Output Stream out get Output Stream out write b off len if newline out write NEWLINE catch IO Exception e throw new CVS Communication Exception e  CVSException isEstablished CVSCommunicationException writeUnestablishedConnection DEBUG_CVS_PROTOCOL OutputStream getOutputStream IOException CVSCommunicationException

Creates a new code CVS Authentication Exception code param detail a message that describes the exception in detail param code indicates whether authentication can be retried or not public CVS Authentication Exception String detail int code this new CVS Status I Status ERROR code Policy bind CVS Authentication Exception detail new Object detail NON NLS 1  CVSAuthenticationException CVSAuthenticationException CVSStatus IStatus CVSAuthenticationException
Creates a new code CVS Authentication Exception code param status the status result describing this exception public CVS Authentication Exception I Status status super status  CVSAuthenticationException CVSAuthenticationException IStatus

Create a new code CVS Communication Exception with the given status private CVS Communication Exception I Status status super status  CVSCommunicationException CVSCommunicationException IStatus
Create a new code CVS Communication Exception with the given message public CVS Communication Exception String message super message  CVSCommunicationException CVSCommunicationException
Create a new code CVS Communication Exception param message a message describing the exception in detail param the caught exception that has caused the communication exception public CVS Communication Exception String message Exception e super message e  CVSCommunicationException CVSCommunicationException
Create a new code CVS Communication Exception param the caught exception that has caused the communication exception public CVS Communication Exception Exception e this get Status For e  CVSCommunicationException CVSCommunicationException getStatusFor
public static I Status get Status For Exception e if e instanceof InterruptedIO Exception InterruptedIO Exception io Ex InterruptedIO Exception e Multi Status status new Multi Status CVS Provider Plugin ID 0 get Message For e e status add new CVS Status I Status ERROR Policy bind CVS Communication Exception interrupt Cause NON NLS 1 status add new CVS Status I Status ERROR Policy bind CVS Communication Exception interrupt Solution NON NLS 1 status add new CVS Status I Status ERROR Policy bind CVS Communication Exception alternate Interrupt Cause NON NLS 1 status add new CVS Status I Status ERROR Policy bind CVS Communication Exception alternate Interrupt Solution NON NLS 1 return status return new CVS Status I Status ERROR get Message For e e  IStatus getStatusFor InterruptedIOException InterruptedIOException ioEx InterruptedIOException MultiStatus MultiStatus CVSProviderPlugin getMessageFor CVSStatus IStatus CVSCommunicationException interruptCause CVSStatus IStatus CVSCommunicationException interruptSolution CVSStatus IStatus CVSCommunicationException alternateInterruptCause CVSStatus IStatus CVSCommunicationException alternateInterruptSolution CVSStatus IStatus getMessageFor
public static String get Message For Throwable throwable String message Policy bind throwable get Class get Name new Object throwable get Message if message equals throwable get Class get Name message Policy bind CVS Communication Exception io new Object throwable to String NON NLS 1 return message  getMessageFor getClass getName getMessage getClass getName CVSCommunicationException toString

Return the preferences node whose child nodes are teh know repositories return a preferences node public static Preferences get Parent Preferences return CVS Provider Plugin get Plugin get Instance Preferences node PREF REPOSITORIES NODE  getParentPreferences CVSProviderPlugin getPlugin getInstancePreferences PREF_REPOSITORIES_NODE
Return a preferences node that contains suitabel defaults for a repository location return a preferences node public static Preferences get Default Preferences Preferences defaults new Default Scope get Node CVS Provider Plugin ID node DEFAULT REPOSITORY SETTINGS NODE defaults put PREF SERVER ENCODING get Default Encoding return defaults  getDefaultPreferences DefaultScope getNode CVSProviderPlugin DEFAULT_REPOSITORY_SETTINGS_NODE PREF_SERVER_ENCODING getDefaultEncoding
private static String get Default Encoding return System get Property file encoding UTF 8 NON NLS 1 NON NLS 2  getDefaultEncoding getProperty
Set the proxy connection method that is to be used when a repository location has the ext connection method This is usefull with the extssh connection method as it can be used to kepp the sandbox compatible with the command line client param string public static void set Ext Connection Method Proxy String string ext Proxy string  setExtConnectionMethodProxy extProxy
Validate whether the given string is a valid registered connection method name param method Name the method name return whether the given string is a valid registered connection method name public static boolean validate Connection Method String method Name Assert is Not Null method Name I Connection Method methods get Plugged In Connection Methods for int i 0 i methods length i if method Name equals methods i get Name return true return false  methodName validateConnectionMethod methodName isNotNull methodName IConnectionMethod getPluggedInConnectionMethods methodName getName
Create a repository location instance from the given properties The supported properties are connection The connection method to be used user The username for the connection optional password The password used for the connection optional host The host where the repository resides port The port to connect to optional root The server directory where the repository is located encoding The file system encoding of the server public static CVS Repository Location from Properties Properties configuration throws CVS Exception We build a string to allow validation of the components that are provided to us String connection configuration get Property connection NON NLS 1 if connection null connection pserver NON NLS 1 I Connection Method method get Plugged In Connection Method connection if method null throw new CVS Exception new Status I Status ERROR CVS Provider Plugin ID Team Exception UNABLE Policy bind CVS Repository Location methods new Object get Plugged In Connection Method Names null NON NLS 1 String user configuration get Property user NON NLS 1 if user length 0 user null String password configuration get Property password NON NLS 1 if user null password null String host configuration get Property host NON NLS 1 if host null throw new CVS Exception new Status I Status ERROR CVS Provider Plugin ID Team Exception UNABLE Policy bind CVS Repository Location host Required null NON NLS 1 String port String configuration get Property port NON NLS 1 int port if port String null port ICVS Repository Location USE DEFAULT PORT else port Integer parse Int port String String root configuration get Property root NON NLS 1 if root null throw new CVS Exception new Status I Status ERROR CVS Provider Plugin ID Team Exception UNABLE Policy bind CVS Repository Location root Required null NON NLS 1 root root replace String encoding configuration get Property encoding NON NLS 1 return new CVS Repository Location method user password host port root encoding user null false  CVSRepositoryLocation fromProperties CVSException getProperty IConnectionMethod getPluggedInConnectionMethod CVSException IStatus CVSProviderPlugin TeamException CVSRepositoryLocation getPluggedInConnectionMethodNames getProperty getProperty getProperty CVSException IStatus CVSProviderPlugin TeamException CVSRepositoryLocation hostRequired portString getProperty portString ICVSRepositoryLocation USE_DEFAULT_PORT parseInt portString getProperty CVSException IStatus CVSProviderPlugin TeamException CVSRepositoryLocation rootRequired getProperty CVSRepositoryLocation
Parse a location string and return a CVS Repository Location On failure the status of the exception will be a Multi Status that includes the original parsing error and a general status displaying the passed location and proper form This form is better for logging etc public static CVS Repository Location from String String location throws CVS Exception try return from String location false catch CVS Exception e Parsing failed Include a status that shows the passed location and the proper form Multi Status error new Multi Status CVS Provider Plugin ID I Status ERROR Policy bind CVS Repository Location invalid Format new Object location null NON NLS 1 error merge new CVS Status I Status ERROR Policy bind CVS Repository Location location Form NON NLS 1 error merge e get Status throw new CVS Exception error  CVSRepositoryLocation MultiStatus CVSRepositoryLocation fromString CVSException fromString CVSException MultiStatus MultiStatus CVSProviderPlugin IStatus CVSRepositoryLocation invalidFormat CVSStatus IStatus CVSRepositoryLocation locationForm getStatus CVSException
Parse a location string and return a CVS Repository Location The valid format from the cederqvist is method user password hostname port path to repository However this does not work with CVS on NT so we use the format method user password hostname port path to repository Some differences to note The after the host port is not optional because of NT naming including device e g pserver username password hostname port D cvsroot If validate Only is true this method will always throw an exception The status of the exception indicates success or failure The status of the exception contains a specific message suitable for displaying to a user who has knowledge of the provided location string see CVS Repository Location from String String public static CVS Repository Location from String String location boolean validate Only throws CVS Exception String part Id null try Get the connection method part Id CVS Repository Location parsing Method NON NLS 1 int start location index Of COLON String method Name int end if start 0 end location index Of COLON start 1 method Name location substring start 1 end start end 1 else this could be an alternate format for ext username password host path method Name ext NON NLS 1 start 0 I Connection Method method get Plugged In Connection Method method Name if method null throw new CVS Exception new CVS Status I Status ERROR Policy bind CVS Repository Location methods new Object get Plugged In Connection Method Names NON NLS 1 Get the user name and password if provided part Id CVS Repository Location parsing User NON NLS 1 end location index Of HOST SEPARATOR start String user null String password null if end is 1 then there is no host separator meaning that the username is not present if end 1 Get the optional user and password user location substring start end Separate the user and password if there is a password start user index Of COLON if start 1 part Id CVS Repository Location parsing Password NON NLS 1 password user substring start 1 user user substring 0 start Set start to point after the host separator start end 1 Get the host and port part Id CVS Repository Location parsing Host NON NLS 1 end location index Of COLON start String host location substring start end int port USE DEFAULT PORT Separate the port and host if there is a port start host index Of PORT SEPARATOR boolean have Port false if start 1 try Initially we used a between the host and port part Id CVS Repository Location parsing Port NON NLS 1 port Integer parse Int host substring start 1 host host substring 0 start have Port true catch Number Format Exception e Ignore this as the 1234 port could be part of a proxy host string if have Port In the correct CVS format the port follows the COLON part Id CVS Repository Location parsing Port NON NLS 1 int index end char c location char At index String port String new String while Character is Digit c port String c c location char At index if port String length 0 end index 1 port Integer parse Int port String Get the repository path translating backslashes to slashes part Id CVS Repository Location parsing Root NON NLS 1 start end 1 String root location substring start replace if validate Only throw new CVS Exception new CVS Status I Status OK Policy bind ok NON NLS 1 return new CVS Repository Location method user password host port root null encoding user null password null catch Index Out Of Bounds Exception e We ll get here if anything funny happened while extracting substrings throw new CVS Exception Policy bind part Id catch Number Format Exception e We ll get here if we couldn t parse a number throw new CVS Exception Policy bind part Id  CVSRepositoryLocation validateOnly CVSRepositoryLocation fromString CVSRepositoryLocation fromString validateOnly CVSException partId partId CVSRepositoryLocation parsingMethod indexOf methodName indexOf methodName methodName IConnectionMethod getPluggedInConnectionMethod methodName CVSException CVSStatus IStatus CVSRepositoryLocation getPluggedInConnectionMethodNames partId CVSRepositoryLocation parsingUser indexOf HOST_SEPARATOR indexOf partId CVSRepositoryLocation parsingPassword partId CVSRepositoryLocation parsingHost indexOf USE_DEFAULT_PORT indexOf PORT_SEPARATOR havePort partId CVSRepositoryLocation parsingPort parseInt havePort NumberFormatException havePort partId CVSRepositoryLocation parsingPort charAt portString isDigit portString charAt portString parseInt portString partId CVSRepositoryLocation parsingRoot validateOnly CVSException CVSStatus IStatus CVSRepositoryLocation IndexOutOfBoundsException CVSException partId NumberFormatException CVSException partId
Validate that the given string could be used to succesfully create a CVS repository location This method performs some initial checks to provide displayable feedback and also tries a more in depth parse using code from String String boolean code public static I Status validate String location Check some simple things that are not checked in creation if location null return new CVS Status I Status ERROR Policy bind CVS Repository Location null Location NON NLS 1 if location equals NON NLS 1 return new CVS Status I Status ERROR Policy bind CVS Repository Location empty Location NON NLS 1 if location ends With location ends With t NON NLS 1 NON NLS 2 return new CVS Status I Status ERROR Policy bind CVS Repository Location end Whitespace NON NLS 1 if location starts With location index Of COLON 1 1 NON NLS 1 return new CVS Status I Status ERROR Policy bind CVS Repository Location start Of Location NON NLS 1 Do some quick checks to provide geberal feedback String format Error Policy bind CVS Repository Location location Form NON NLS 1 int second Colon location index Of COLON 1 int at location index Of HOST SEPARATOR if at 1 String user location substring second Colon 1 at if user equals NON NLS 1 return new CVS Status I Status ERROR format Error else at second Colon int colon location index Of COLON at 1 if colon 1 return new CVS Status I Status ERROR format Error String host location substring at 1 colon if host equals NON NLS 1 return new CVS Status I Status ERROR format Error String path location substring colon 1 location length if path equals NON NLS 1 return new CVS Status I Status ERROR format Error Do a full parse and see if it passes try from String location true catch CVS Exception e An exception is always throw Return the status return e get Status Looks ok we ll actually never get here because above from String String boolean will always throw an exception return Status OK STATUS  fromString IStatus CVSStatus IStatus CVSRepositoryLocation nullLocation CVSStatus IStatus CVSRepositoryLocation emptyLocation endsWith endsWith CVSStatus IStatus CVSRepositoryLocation endWhitespace startsWith indexOf CVSStatus IStatus CVSRepositoryLocation startOfLocation formatError CVSRepositoryLocation locationForm secondColon indexOf indexOf HOST_SEPARATOR secondColon CVSStatus IStatus formatError secondColon indexOf CVSStatus IStatus formatError CVSStatus IStatus formatError CVSStatus IStatus formatError fromString CVSException getStatus fromString OK_STATUS
Get the plugged in user authenticator if there is one return the plugged in user authenticator or code null code public static I User Authenticator get Authenticator if authenticator null authenticator get Plugged In Authenticator return authenticator  IUserAuthenticator getAuthenticator getPluggedInAuthenticator
Return the list of plugged in connection methods return the list of plugged in connection methods public static I Connection Method get Plugged In Connection Methods if plugged In Connection Methods null List connection Methods new Array List if STANDALONE MODE connection Methods add new P Server Connection Method else I Extension extensions Platform get Plugin Registry get Extension Point CVS Provider Plugin ID CVS Provider Plugin PT CONNECTIONMETHODS get Extensions for int i 0 i extensions length i I Extension extension extensions i I Configuration Element configs extension get Configuration Elements if configs length 0 CVS Provider Plugin log I Status ERROR Policy bind CVS Provider Plugin exec Problem null NON NLS 1 continue try I Configuration Element config configs 0 connection Methods add config create Executable Extension run NON NLS 1 catch Core Exception ex CVS Provider Plugin log I Status ERROR Policy bind CVS Provider Plugin exec Problem ex NON NLS 1 plugged In Connection Methods I Connection Method connection Methods to Array new I Connection Method 0 return plugged In Connection Methods  IConnectionMethod getPluggedInConnectionMethods pluggedInConnectionMethods connectionMethods ArrayList STANDALONE_MODE connectionMethods PServerConnectionMethod IExtension getPluginRegistry getExtensionPoint CVSProviderPlugin CVSProviderPlugin PT_CONNECTIONMETHODS getExtensions IExtension IConfigurationElement getConfigurationElements CVSProviderPlugin IStatus CVSProviderPlugin execProblem IConfigurationElement connectionMethods createExecutableExtension CoreException CVSProviderPlugin IStatus CVSProviderPlugin execProblem pluggedInConnectionMethods IConnectionMethod connectionMethods toArray IConnectionMethod pluggedInConnectionMethods
private static I Connection Method get Plugged In Connection Method String method Name Assert is Not Null method Name I Connection Method methods get Plugged In Connection Methods for int i 0 i methods length i if method Name equals methods i get Name return methods i return null  IConnectionMethod getPluggedInConnectionMethod methodName isNotNull methodName IConnectionMethod getPluggedInConnectionMethods methodName getName
private static String get Plugged In Connection Method Names I Connection Method methods get Plugged In Connection Methods String Buffer method Names new String Buffer for int i 0 i methods length i String name methods i get Name if i 0 method Names append NON NLS 1 method Names append name return method Names to String  getPluggedInConnectionMethodNames IConnectionMethod getPluggedInConnectionMethods StringBuffer methodNames StringBuffer getName methodNames methodNames methodNames toString
private static I User Authenticator get Plugged In Authenticator I Extension extensions Platform get Plugin Registry get Extension Point CVS Provider Plugin ID CVS Provider Plugin PT AUTHENTICATOR get Extensions if extensions length 0 return null I Extension extension extensions 0 I Configuration Element configs extension get Configuration Elements if configs length 0 CVS Provider Plugin log I Status ERROR Policy bind CVS Adapter no Configuration Element new Object extension get Unique Identifier null NON NLS 1 return null try I Configuration Element config configs 0 return I User Authenticator config create Executable Extension run NON NLS 1 catch Core Exception ex CVS Provider Plugin log I Status ERROR Policy bind CVS Adapter unable To Instantiate new Object extension get Unique Identifier ex NON NLS 1 return null  IUserAuthenticator getPluggedInAuthenticator IExtension getPluginRegistry getExtensionPoint CVSProviderPlugin CVSProviderPlugin PT_AUTHENTICATOR getExtensions IExtension IConfigurationElement getConfigurationElements CVSProviderPlugin IStatus CVSAdapter noConfigurationElement getUniqueIdentifier IConfigurationElement IUserAuthenticator createExecutableExtension CoreException CVSProviderPlugin IStatus CVSAdapter unableToInstantiate getUniqueIdentifier
private CVS Repository Location I Connection Method method String user String password String host int port String root String encoding boolean user Fixed boolean password Fixed this method method this user user this password password this host host this port port this root root The username can be fixed only if one is provided if user Fixed user null this user Fixed true The password can only be fixed if the username is and a password is provided if user Fixed password Fixed password null this password Fixed true if encoding null set Encoding encoding  CVSRepositoryLocation IConnectionMethod userFixed passwordFixed userFixed userFixed userFixed passwordFixed passwordFixed setEncoding
private Connection create Connection String password I Progress Monitor monitor throws CVS Exception I Connection Method method To Use method if method get Name equals ext ext Proxy null ext Proxy equals method get Name NON NLS 1 method To Use get Plugged In Connection Method ext Proxy Connection connection new Connection this method To Use create Connection this password connection open monitor return connection  createConnection IProgressMonitor CVSException IConnectionMethod methodToUse getName extProxy extProxy getName methodToUse getPluggedInConnectionMethod extProxy methodToUse createConnection
public void dispose flush Cache try if has Preferences internal Get Preferences remove Node get Parent Preferences flush catch Backing Store Exception e CVS Provider Plugin log I Status ERROR Policy bind CVS Repository Location 73 get Location true e NON NLS 1  flushCache hasPreferences internalGetPreferences removeNode getParentPreferences BackingStoreException CVSProviderPlugin IStatus CVSRepositoryLocation getLocation
private void flush Cache try Platform flush Authorization Info FAKE URL get Location AUTH SCHEME catch Core Exception e No need to report this since the location is most likely being disposed Just fail silently and continue CVS Provider Plugin log e  flushCache flushAuthorizationInfo FAKE_URL getLocation AUTH_SCHEME CoreException CVSProviderPlugin
see ICVS Repository Location get Host public String get Host return host  ICVSRepositoryLocation getHost getHost
The port is included if it is not the default port public String get Location return get Location false  getLocation getLocation
public String get Location boolean for Display return COLON method get Name COLON user Fixed user password Fixed for Display COLON password NON NLS 1 HOST SEPARATOR NON NLS 1 host COLON port USE DEFAULT PORT new Integer port to String NON NLS 1 root  getLocation forDisplay getName userFixed passwordFixed forDisplay HOST_SEPARATOR USE_DEFAULT_PORT toString
see ICVS Repository Location get Method public I Connection Method get Method return method  ICVSRepositoryLocation getMethod IConnectionMethod getMethod
public boolean set Method String method Name I Connection Method new Method get Plugged In Connection Method method Name if new Method null return false method new Method return true  setMethod methodName IConnectionMethod newMethod getPluggedInConnectionMethod methodName newMethod newMethod
see ICVS Repository Location get Port public int get Port return port  ICVSRepositoryLocation getPort getPort
public String get Encoding if has Preferences return internal Get Preferences get PREF SERVER ENCODING get Default Encoding else return get Default Encoding  getEncoding hasPreferences internalGetPreferences PREF_SERVER_ENCODING getDefaultEncoding getDefaultEncoding
public void set Encoding String encoding if encoding null encoding get Default Encoding if has Preferences internal Get Preferences remove PREF SERVER ENCODING else ensure Preferences Stored internal Get Preferences put PREF SERVER ENCODING encoding flush Preferences  setEncoding getDefaultEncoding hasPreferences internalGetPreferences PREF_SERVER_ENCODING ensurePreferencesStored internalGetPreferences PREF_SERVER_ENCODING flushPreferences
public ICVS Remote Resource members CVS Tag tag boolean modules I Progress Monitor progress throws CVS Exception try if modules return Remote Module get Remote Modules this tag progress else Remote Folder root new Remote Folder null this ICVS Remote Folder REPOSITORY ROOT FOLDER NAME tag ICVS Remote Resource resources root members progress There is the off chance that there is a file in the root of the repository This is not supported by cvs so we need to make sure there are no files List folders new Array List resources length for int i 0 i resources length i ICVS Remote Resource remote Resource resources i if remote Resource is Container folders add remote Resource return ICVS Remote Resource folders to Array new ICVS Remote Resource folders size catch Team Exception e throw new CVS Exception e get Status  ICVSRemoteResource CVSTag IProgressMonitor CVSException RemoteModule getRemoteModules RemoteFolder RemoteFolder ICVSRemoteFolder REPOSITORY_ROOT_FOLDER_NAME ICVSRemoteResource ArrayList ICVSRemoteResource remoteResource remoteResource isContainer remoteResource ICVSRemoteResource toArray ICVSRemoteResource TeamException CVSException getStatus
see ICVS Repository Location get Remote Folder String CVS Tag public ICVS Remote Folder get Remote Folder String remote Path CVS Tag tag return new Remote Folder null this remote Path tag  ICVSRepositoryLocation getRemoteFolder CVSTag ICVSRemoteFolder getRemoteFolder remotePath CVSTag RemoteFolder remotePath
public ICVS Remote File get Remote File String remote Path CVS Tag tag I Path path new Path remote Path Remote Folder Tree remote Folder new Remote Folder Tree null this path remove Last Segments 1 to String tag Remote File remote File new Remote File remote Folder Update STATE ADDED LOCAL path last Segment null null tag remote Folder set Children new ICVS Remote Resource remote File return remote File  ICVSRemoteFile getRemoteFile remotePath CVSTag IPath remotePath RemoteFolderTree remoteFolder RemoteFolderTree removeLastSegments toString RemoteFile remoteFile RemoteFile remoteFolder STATE_ADDED_LOCAL lastSegment remoteFolder setChildren ICVSRemoteResource remoteFile remoteFile
see ICVS Repository Location get Root Directory public String get Root Directory return root  ICVSRepositoryLocation getRootDirectory getRootDirectory
associated with the CVS Plugin singleton public int get Timeout return CVS Provider Plugin get Plugin get Timeout  CVSPlugin getTimeout CVSProviderPlugin getPlugin getTimeout
see ICVS Repository Location get User Info public I User Info get User Info boolean make Username Mutable return new User Info get Username password make Username Mutable true is Username Mutable  ICVSRepositoryLocation getUserInfo IUserInfo getUserInfo makeUsernameMutable UserInfo getUsername makeUsernameMutable isUsernameMutable
public String get Username If the username is mutable get it from the cache if it s there if user null is Username Mutable retrieve Password return user null user NON NLS 1  getUsername isUsernameMutable retrievePassword
see I User Info is Username Mutable public boolean is Username Mutable return user Fixed  IUserInfo isUsernameMutable isUsernameMutable userFixed
public Connection open Connection I Progress Monitor monitor throws CVS Exception Object host Lock synchronized host Locks host Lock host Locks get get Host if host Lock null host Lock new Object host Locks put get Host host Lock synchronized host Lock try Allow two ticks in case of a retry monitor begin Task Policy bind CVS Repository Location opening Connection get Host 2 NON NLS 1 Get the repository in order to ensure that the location is known by CVS The get will record the location if it s not already recorded if Known Repositories get Instance is Known Repository get Location Known Repositories get Instance add Repository this true broadcast while true try The following will throw an exception if authentication fails String password this password if password null If the instance has no password obtain it from the cache password retrieve Password if user null This is possible if the cache was cleared somehow for a location with a mutable username throw new CVS Authentication Exception new CVS Status I Status ERROR CVS Authentication Exception RETRY Policy bind CVS Repository Location username Required NON NLS 1 if password null password NON NLS 1 return create Connection password monitor catch CVS Authentication Exception ex if ex get Status get Code CVS Authentication Exception RETRY String message ex get Message I User Authenticator authenticator get Authenticator if authenticator null throw new CVS Authentication Exception Policy bind Client no Authenticator CVS Authentication Exception NO RETRY NON NLS 1 authenticator prompt For User Info this this message else throw ex finally monitor done  openConnection IProgressMonitor CVSException hostLock hostLocks hostLock hostLocks getHost hostLock hostLock hostLocks getHost hostLock hostLock beginTask CVSRepositoryLocation openingConnection getHost KnownRepositories getInstance isKnownRepository getLocation KnownRepositories getInstance addRepository retrievePassword CVSAuthenticationException CVSStatus IStatus CVSAuthenticationException CVSRepositoryLocation usernameRequired createConnection CVSAuthenticationException getStatus getCode CVSAuthenticationException getMessage IUserAuthenticator getAuthenticator CVSAuthenticationException noAuthenticator CVSAuthenticationException NO_RETRY promptForUserInfo
Implementation of inherited to String public String to String return get Location true  toString toString getLocation
public boolean equals Object o if this o return true if o instanceof CVS Repository Location return false return get Location equals CVS Repository Location o get Location  CVSRepositoryLocation getLocation CVSRepositoryLocation getLocation
return get Location equals CVS Repository Location o get Location public int hash Code return get Location hash Code  getLocation CVSRepositoryLocation getLocation hashCode getLocation hashCode
private String retrieve Password Map map Platform get Authorization Info FAKE URL get Location AUTH SCHEME if map null String username String map get INFO USERNAME if username null is Username Mutable set Username username String password String map get INFO PASSWORD if password null return password return null  retrievePassword getAuthorizationInfo FAKE_URL getLocation AUTH_SCHEME INFO_USERNAME isUsernameMutable setUsername INFO_PASSWORD
public void set Password String password if password Fixed throw new Unsupported Operation Exception We set the password here but it will be cleared if the user info is cached using update Cache this password password  setPassword passwordFixed UnsupportedOperationException updateCache
public void set User Info I User Info userinfo user userinfo get Username password User Info userinfo get Password  setUserInfo IUserInfo getUsername UserInfo getPassword
public void set Username String user if user Fixed throw new Unsupported Operation Exception this user user  setUsername userFixed UnsupportedOperationException
public void set User Muteable boolean muteable user Fixed muteable  setUserMuteable userFixed
public void set Allow Caching boolean value allow Caching value update Cache  setAllowCaching allowCaching updateCache
public void update Cache Nothing to cache if the password is fixed if password Fixed allow Caching return Nothing to cache if the password is null and the user is fixed if password null user Fixed return if update Cache user password If the cache was updated null the password field so we will obtain the password from the cache when needed password null ensure Preferences Stored  updateCache passwordFixed allowCaching userFixed updateCache ensurePreferencesStored
private boolean update Cache String username String password put the password into the Platform map Map map Platform get Authorization Info FAKE URL get Location AUTH SCHEME if map null map new java util Hash Map 10 if username null map put INFO USERNAME username if password null map put INFO PASSWORD password try Platform add Authorization Info FAKE URL get Location AUTH SCHEME map catch Core Exception e We should probably wrap the Core Exception here CVS Provider Plugin log e return false return true  updateCache getAuthorizationInfo FAKE_URL getLocation AUTH_SCHEME HashMap INFO_USERNAME INFO_PASSWORD addAuthorizationInfo FAKE_URL getLocation AUTH_SCHEME CoreException CoreException CVSProviderPlugin
public void validate Connection I Progress Monitor monitor throws CVS Exception try monitor Policy monitor For monitor monitor begin Task null 100 ICVS Folder root CVS Workspace Root getCVS Folder For Resources Plugin get Workspace get Root Session session new Session this root false output to console session open Policy sub Monitor For monitor 50 false read only try I Status status Command VERSION execute session this Policy sub Monitor For monitor 50 Log any non ok status if status isOK CVS Provider Plugin log status finally session close monitor done if get Server Platform CVSNT SERVER check for the use of a repository prefix if get Root Directory starts With Session SERVER SEPARATOR A prefix is in use Log a warning CVS Provider Plugin log I Status WARNING Policy bind CVS Repository Location cvsnt Prefix get Location null NON NLS 1 throw new CVS Authentication Exception new Status I Status WARNING CVS Provider Plugin ID 0 Policy bind CVS Repository Location cvsnt Prefix get Location null NON NLS 1 catch CVS Exception e If the validation failed dispose of any cached info dispose throw e  validateConnection IProgressMonitor CVSException monitorFor beginTask ICVSFolder CVSWorkspaceRoot getCVSFolderFor ResourcesPlugin getWorkspace getRoot subMonitorFor IStatus subMonitorFor CVSProviderPlugin getServerPlatform CVSNT_SERVER getRootDirectory startsWith SERVER_SEPARATOR CVSProviderPlugin IStatus CVSRepositoryLocation cvsntPrefix getLocation CVSAuthenticationException IStatus CVSProviderPlugin CVSRepositoryLocation cvsntPrefix getLocation CVSException
Return the server platform type It will be one of the following UNDETERMINED PLATFORM The platform has not been determined CVS SERVER The platform is regular CVS server CVSNT SERVER The platform in CVSNT If UNDETERMINED PLATFORM is returned the platform can be determined using the Command VERSION command public int get Server Platform return server Platform  UNDETERMINED_PLATFORM CVS_SERVER CVSNT_SERVER UNDETERMINED_PLATFORM getServerPlatform serverPlatform
This method is called from Command VERSION to set the platform type public void set Server Plaform I Status status OK means that its a regular cvs server if status isOK server Platform CVS SERVER return Find the status that reports the CVS platform if status is Multi Status I Status children status get Children for int i 0 i children length i I Status i Status children i if i Status get Code CVS Status SERVER IS CVSNT i Status get Code CVS Status UNSUPPORTED SERVER VERSION i Status get Code CVS Status SERVER IS UNKNOWN status i Status break Second check the code of the status itself to see if it is NT switch status get Code case CVS Status SERVER IS CVSNT server Platform CVSNT SERVER break case CVS Status UNSUPPORTED SERVER VERSION server Platform UNSUPPORTED SERVER break case CVS Status SERVER IS UNKNOWN server Platform UNKNOWN SERVER break default We had an error status with no info about the server Mark it as undetermined server Platform UNDETERMINED PLATFORM  setServerPlaform IStatus serverPlatform CVS_SERVER isMultiStatus IStatus getChildren IStatus iStatus iStatus getCode CVSStatus SERVER_IS_CVSNT iStatus getCode CVSStatus UNSUPPORTED_SERVER_VERSION iStatus getCode CVSStatus SERVER_IS_UNKNOWN iStatus getCode CVSStatus SERVER_IS_CVSNT serverPlatform CVSNT_SERVER CVSStatus UNSUPPORTED_SERVER_VERSION serverPlatform UNSUPPORTED_SERVER CVSStatus SERVER_IS_UNKNOWN serverPlatform UNKNOWN_SERVER serverPlatform UNDETERMINED_PLATFORM
see ICVS Repository Location flush User Info public void flush User Info flush Cache  ICVSRepositoryLocation flushUserInfo flushUserInfo flushCache
String get Ext Command String password throws IO Exception Get the user specified connection parameters String CVS RSH CVS Provider Plugin get Plugin get Cvs Rsh Command String CVS RSH PARAMETERS CVS Provider Plugin get Plugin get Cvs Rsh Parameters String CVS SERVER CVS Provider Plugin get Plugin get Cvs Server if CVS RSH null CVS SERVER null throw new IO Exception Policy bind EXT Server Connection vars Not Set NON NLS 1 If there is only one token assume it is the command and use the default parameters and order if CVS RSH PARAMETERS null CVS RSH PARAMETERS length 0 if port USE DEFAULT PORT throw new IO Exception Policy bind EXT Server Connection invalid Port NON NLS 1 return new String CVS RSH host l user CVS SERVER INVOKE SVR CMD NON NLS 1 Substitute any variables for their appropriate values CVS RSH PARAMETERS string Replace CVS RSH PARAMETERS USER VARIABLE user CVS RSH PARAMETERS string Replace CVS RSH PARAMETERS PASSWORD VARIABLE password CVS RSH PARAMETERS string Replace CVS RSH PARAMETERS HOST VARIABLE host CVS RSH PARAMETERS string Replace CVS RSH PARAMETERS PORT VARIABLE new Integer port to String Build the command list to be sent to the OS List commands new Array List commands add CVS RSH String Tokenizer tokenizer new String Tokenizer CVS RSH PARAMETERS while tokenizer has More Tokens String next tokenizer next Token commands add next commands add CVS SERVER commands add INVOKE SVR CMD return String commands to Array new String commands size  getExtCommand IOException CVS_RSH CVSProviderPlugin getPlugin getCvsRshCommand CVS_RSH_PARAMETERS CVSProviderPlugin getPlugin getCvsRshParameters CVS_SERVER CVSProviderPlugin getPlugin getCvsServer CVS_RSH CVS_SERVER IOException EXTServerConnection varsNotSet CVS_RSH_PARAMETERS CVS_RSH_PARAMETERS USE_DEFAULT_PORT IOException EXTServerConnection invalidPort CVS_RSH CVS_SERVER INVOKE_SVR_CMD CVS_RSH_PARAMETERS stringReplace CVS_RSH_PARAMETERS USER_VARIABLE CVS_RSH_PARAMETERS stringReplace CVS_RSH_PARAMETERS PASSWORD_VARIABLE CVS_RSH_PARAMETERS stringReplace CVS_RSH_PARAMETERS HOST_VARIABLE CVS_RSH_PARAMETERS stringReplace CVS_RSH_PARAMETERS PORT_VARIABLE toString ArrayList CVS_RSH StringTokenizer StringTokenizer CVS_RSH_PARAMETERS hasMoreTokens nextToken CVS_SERVER INVOKE_SVR_CMD toArray
private String string Replace String string String old String String new String int index string to Lower Case index Of old String if index 1 return string return string Replace string substring 0 index new String string substring index old String length old String new String  stringReplace oldString newString toLowerCase indexOf oldString stringReplace newString oldString oldString newString
Return the server message with the prefix removed Server aborted messages typically start with cvs server cvs server aborted cvs rtag public String get Server Message Without Prefix String error Line String prefix String message error Line int first Space message index Of if first Space 1 remove the program name and the space message message substring first Space 1 Quick fix to handle changes in server message format see Bug 45138 if prefix starts With NON NLS 1 This is the server aborted message Remove the pattern command name aborted int closing Bracket message index Of NON NLS 1 if closing Bracket 1 return null get what is inside the brackets String real Prefix message substring 1 closing Bracket check that there is two words and the second word is aborted int space real Prefix index Of if space 1 return null if real Prefix index Of space 1 1 return null if real Prefix substring space 1 equals aborted return null NON NLS 1 It s a match return the rest of the line message message substring closing Bracket 2 if message char At 0 message message substring 1 return message else This is the server command message Remove the pattern command name int colon message index Of NON NLS 1 if colon 1 return null get what is before the colon String real Prefix message substring 0 colon ensure that it is a single word if real Prefix index Of 1 return null message message substring colon 1 if message char At 0 message message substring 1 return message This is not a server message with the desired prefix return null  getServerMessageWithoutPrefix errorLine errorLine firstSpace indexOf firstSpace firstSpace startsWith command_name closingBracket indexOf closingBracket realPrefix closingBracket realPrefix indexOf realPrefix indexOf realPrefix closingBracket charAt command_name indexOf realPrefix realPrefix indexOf charAt
see org eclipse team internal ccvs core ICVS Repository Location get User Authenticator public I User Authenticator get User Authenticator return get Authenticator  ICVSRepositoryLocation getUserAuthenticator IUserAuthenticator getUserAuthenticator getAuthenticator
see org eclipse team internal ccvs core ICVS Repository Location set User Authenticator public void set User Authenticator I User Authenticator authenticator CVS Repository Location authenticator authenticator  ICVSRepositoryLocation setUserAuthenticator setUserAuthenticator IUserAuthenticator CVSRepositoryLocation
public Preferences get Preferences if has Preferences ensure Preferences Stored return internal Get Preferences  getPreferences hasPreferences ensurePreferencesStored internalGetPreferences
private Preferences internal Get Preferences return get Parent Preferences node get Preference Name  internalGetPreferences getParentPreferences getPreferenceName
private boolean has Preferences try return get Parent Preferences node Exists get Preference Name catch Backing Store Exception e CVS Provider Plugin log I Status ERROR Policy bind CVS Repository Location 74 get Location true e NON NLS 1 return false  hasPreferences getParentPreferences nodeExists getPreferenceName BackingStoreException CVSProviderPlugin IStatus CVSRepositoryLocation getLocation
Return a unique name that identifies this location but does not contain any slashes Also do not use Although a valid path character the initial core implementation didn t handle it well private String get Preference Name return get Location replace replace  getPreferenceName getLocation
public void store Preferences Preferences prefs internal Get Preferences Must store at least one preference in the node prefs put PREF LOCATION get Location flush Preferences  storePreferences internalGetPreferences PREF_LOCATION getLocation flushPreferences
private void flush Preferences try internal Get Preferences flush catch Backing Store Exception e CVS Provider Plugin log I Status ERROR Policy bind CVS Repository Location 75 get Location true e NON NLS 1  flushPreferences internalGetPreferences BackingStoreException CVSProviderPlugin IStatus CVSRepositoryLocation getLocation
private void ensure Preferences Stored if has Preferences store Preferences  ensurePreferencesStored hasPreferences storePreferences
public boolean get User Info Cached Map map Platform get Authorization Info FAKE URL get Location AUTH SCHEME if map null String password String map get INFO PASSWORD return password null return false  getUserInfoCached getAuthorizationInfo FAKE_URL getLocation AUTH_SCHEME INFO_PASSWORD

Return true if the exception from the cvs server is the no tag error and false otherwise public boolean is No Tag Exception I Status status get Status if status is Multi Status return false I Status children Multi Status status get Children for int i 0 i children length i if children i get Code CVS Status NO SUCH TAG return true return false  isNoTagException IStatus getStatus isMultiStatus IStatus MultiStatus getChildren getCode CVSStatus NO_SUCH_TAG
Return true if the exceptions status contains any error status messages public boolean contains Errors I Status status get Status if status is Multi Status return status get Severity I Status ERROR I Status children Multi Status status get Children for int i 0 i children length i if children i get Severity I Status ERROR return true return false  containsErrors IStatus getStatus isMultiStatus getSeverity IStatus IStatus MultiStatus getChildren getSeverity IStatus
Return the CVS Server Exception for the given error message and error list This is public due to packaging and should not be used by clients public static CVS Server Exception for Error String message I Status children if children length 0 return new CVS Server Exception message children else return new CVS Server Exception new CVS Status I Status ERROR CVS Status SERVER ERROR message null  CVSServerException CVSServerException forError IStatus CVSServerException CVSServerException CVSStatus IStatus CVSStatus SERVER_ERROR
public CVS Server Exception I Status status super status  CVSServerException IStatus
private CVS Server Exception String message I Status children super new Multi Status CVS Provider Plugin ID CVS Status SERVER ERROR children message null  CVSServerException IStatus MultiStatus CVSProviderPlugin CVSStatus SERVER_ERROR

Process process protected Ext Connection ICVS Repository Location location String password this location location this password password  ExtConnection ICVSRepositoryLocation
Closes the connection public void close throws IO Exception try if input Stream null input Stream close finally input Stream null try if output Stream null output Stream close finally output Stream null if process null process destroy  IOException inputStream inputStream inputStream outputStream outputStream outputStream
Returns the code Input Stream code used to read data from the server public Input Stream get Input Stream return input Stream  InputStream InputStream getInputStream inputStream
Returns the code Output Stream code used to send data to the server public Output Stream get Output Stream return output Stream  OutputStream OutputStream getOutputStream outputStream
Opens the connection and invokes cvs in server mode see Connection open public void open I Progress Monitor monitor throws IO Exception String command CVS Repository Location location get Ext Command password boolean connected false try process Util create Process command monitor input Stream new Polling Input Stream new Timeout Input Stream process get Input Stream 8192 buffer Size 1000 read Timeout 1 close Timeout location get Timeout monitor output Stream new Polling Output Stream new Timeout Output Stream process get Output Stream 8192 buffersize 1000 write Timeout 1000 close Timeout location get Timeout monitor XXX need to do something more useful with stderr discard the input to prevent the process from hanging due to a full pipe Thread thread new Discard Input Thread process get Error Stream connected true finally if connected try close finally Ignore any exceptions during close  IProgressMonitor IOException CVSRepositoryLocation getExtCommand createProcess inputStream PollingInputStream TimeoutInputStream getInputStream bufferSize readTimeout closeTimeout getTimeout outputStream PollingOutputStream TimeoutOutputStream getOutputStream writeTimeout closeTimeout getTimeout DiscardInputThread getErrorStream
private static class Discard Input Thread extends Thread private Input Stream in public Discard Input Thread Input Stream in this in in  DiscardInputThread InputStream DiscardInputThread InputStream
public void run try try while in read 1 finally in close catch IO Exception e  IOException

public class Ext Connection Method implements I Connection Method see I Connection Method get Name public String get Name return ext NON NLS 1  ExtConnectionMethod IConnectionMethod IConnectionMethod getName getName
see I Connection Method create Connection public I Server Connection create Connection ICVS Repository Location repository Root String password return new Ext Connection repository Root password  IConnectionMethod createConnection IServerConnection createConnection ICVSRepositoryLocation repositoryRoot ExtConnection repositoryRoot
public void disconnect ICVS Repository Location location  ICVSRepositoryLocation

see Connection do Close public void close throws IO Exception try if input Stream null input Stream close finally input Stream null try if output Stream null output Stream close finally output Stream null try if f Socket null f Socket close finally f Socket null  doClose IOException inputStream inputStream inputStream outputStream outputStream outputStream fSocket fSocket fSocket
see Connection do Open public void open I Progress Monitor monitor throws IO Exception CVS Authentication Exception monitor sub Task Policy bind P Server Connection authenticating NON NLS 1 monitor worked 1 f Socket create Socket monitor boolean connected false try this input Stream new Buffered Input Stream new Polling Input Stream f Socket get Input Stream cvsroot get Timeout monitor this output Stream new Polling Output Stream new Timeout Output Stream f Socket get Output Stream 8192 buffer Size 1000 write Timeout 1000 close Timeout cvsroot get Timeout monitor authenticate connected true finally if connected clean Up After Failed Connection  doOpen IProgressMonitor IOException CVSAuthenticationException subTask PServerConnection fSocket createSocket inputStream BufferedInputStream PollingInputStream fSocket getInputStream getTimeout outputStream PollingOutputStream TimeoutOutputStream fSocket getOutputStream bufferSize writeTimeout closeTimeout getTimeout cleanUpAfterFailedConnection
see Connection get Input Stream public Input Stream get Input Stream return input Stream  getInputStream InputStream getInputStream inputStream
see Connection get Output Stream public Output Stream get Output Stream return output Stream  getOutputStream OutputStream getOutputStream outputStream
Creates a new code P Server Connection code for the given cvs root P Server Connection ICVS Repository Location cvsroot String password this cvsroot cvsroot this password password  PServerConnection PServerConnection ICVSRepositoryLocation
Does the actual authentification private void authenticate throws IO Exception CVS Authentication Exception String scrambled Password scramble Password password String user cvsroot get Username Output Stream out get Output Stream String Buffer request new String Buffer request append BEGIN request append NEWLINE request append cvsroot get Root Directory request append NEWLINE request append user request append NEWLINE request append scrambled Password request append NEWLINE request append END request append NEWLINE out write request to String get Bytes out flush String line Connection read Line cvsroot get Input Stream trim Return if we succeeded if LOGIN OK equals line return Otherwise determine the type of error if line length 0 throw new IO Exception Policy bind P Server Connection no Response NON NLS 1 if LOGIN FAILED equals line throw new CVS Authentication Exception Policy bind P Server Connection login Refused CVS Authentication Exception RETRY NON NLS 1 String message NON NLS 1 Skip any E messages for now while line char At 0 ERROR CHAR message line substring 1 line Connection read Line cvsroot get Input Stream Remove leading error 0 if line starts With ERROR MESSAGE message line substring ERROR MESSAGE length 1 else message line if message index Of NO SUCH USER 1 throw new CVS Authentication Exception Policy bind P Server Connection invalid User new Object message CVS Authentication Exception RETRY NON NLS 1 throw new IO Exception Policy bind P Server Connection connection Refused new Object message NON NLS 1  IOException CVSAuthenticationException scrambledPassword scramblePassword getUsername OutputStream getOutputStream StringBuffer StringBuffer getRootDirectory scrambledPassword toString getBytes readLine getInputStream LOGIN_OK IOException PServerConnection noResponse LOGIN_FAILED CVSAuthenticationException PServerConnection loginRefused CVSAuthenticationException charAt ERROR_CHAR readLine getInputStream startsWith ERROR_MESSAGE ERROR_MESSAGE indexOf NO_SUCH_USER CVSAuthenticationException PServerConnection invalidUser CVSAuthenticationException IOException PServerConnection connectionRefused
private void clean Up After Failed Connection throws IO Exception try if input Stream null input Stream close finally try if output Stream null output Stream close finally try if f Socket null f Socket close finally f Socket null  cleanUpAfterFailedConnection IOException inputStream inputStream outputStream outputStream fSocket fSocket fSocket
Creates the actual socket protected Socket create Socket I Progress Monitor monitor throws IO Exception Determine what port to use int port cvsroot get Port if port ICVS Repository Location USE DEFAULT PORT port DEFAULT PORT Make the connection Socket result try result Util create Socket cvsroot get Host port monitor Bug 36351 disable buffering and send bytes immediately result set Tcp No Delay true catch InterruptedIO Exception e If we get this exception chances are the host is not responding throw new InterruptedIO Exception Policy bind P Server Connection socket new Object cvsroot get Host NON NLS 1 result set So Timeout 1000 1 second between timeouts return result  createSocket IProgressMonitor IOException getPort ICVSRepositoryLocation USE_DEFAULT_PORT DEFAULT_PORT createSocket getHost setTcpNoDelay InterruptedIOException InterruptedIOException PServerConnection getHost setSoTimeout
private String scramble Password String password throws CVS Authentication Exception int length password length char out new char length for int i 0 i length i char value password char At i if value 0 value 255 throw In Valid Character out i SCRAMBLING TABLE value return A new String out NON NLS 1  scramblePassword CVSAuthenticationException charAt throwInValidCharacter SCRAMBLING_TABLE
private void throw In Valid Character throws CVS Authentication Exception throw new CVS Authentication Exception Policy bind P Server Connection invalid Chars CVS Authentication Exception RETRY NON NLS 1  throwInValidCharacter CVSAuthenticationException CVSAuthenticationException PServerConnection invalidChars CVSAuthenticationException

public class P Server Connection Method implements I Connection Method see I Connection Method create Connection ICVS Repository Location String public I Server Connection create Connection ICVS Repository Location location String password return new P Server Connection location password  PServerConnectionMethod IConnectionMethod IConnectionMethod createConnection ICVSRepositoryLocation IServerConnection createConnection ICVSRepositoryLocation PServerConnection
see I Connection Method get Name public String get Name return pserver NON NLS 1  IConnectionMethod getName getName
see org eclipse team internal ccvs core I Connection Method disconnect org eclipse team internal ccvs core ICVS Repository Location public void disconnect ICVS Repository Location location  IConnectionMethod ICVSRepositoryLocation ICVSRepositoryLocation

protected User Info String username String password boolean is Username Mutable this username username this password password this is Username Mutable is Username Mutable  UserInfo isUsernameMutable isUsernameMutable isUsernameMutable
see I User Info get Username public String get Username return username  IUserInfo getUsername getUsername
protected String get Password return password  getPassword
see I User Info is Username Mutable public boolean is Username Mutable return false  IUserInfo isUsernameMutable isUsernameMutable
see I User Info set Password String public void set Password String password this password password  IUserInfo setPassword setPassword
see I User Info set Username String public void set Username String username this username username  IUserInfo setUsername setUsername

return public boolean is Valid return valid  isValid
return index of line where source starts public int get Source Offset return source Offset  getSourceOffset sourceOffset
return int the last source line of the receiver public int get End Line return end Line  getEndLine endLine
param line public void set End Line int line end Line line  setEndLine endLine
return the revision the receiver occured in public String get Revision return revision  getRevision
return the first source line number of the receiver public int get Start Line return start Line  getStartLine startLine
Parase a CVS Annotate output line and instantiate the receiver param line a CVS Annotate output line public CVS Annotate Block String line int line Number super start Line line Number end Line line Number int index line index Of if index 1 return revision line substring 0 index index line index Of index NON NLS 1 if index 1 return int index2 line index Of index if index2 1 return user line substring index 1 index2 index line index Of index2 NON NLS 1 if index 1 return source Offset index 2 valid true  CVSAnnotateBlock lineNumber startLine lineNumber endLine lineNumber indexOf indexOf indexOf indexOf sourceOffset
Used by the default Label Provider to display objects in a List View public String to String int delta end Line start Line 1 String line Policy bind CVS Annotate Block 4 NON NLS 1 if delta 1 line Policy bind CVS Annotate Block 5 NON NLS 1 return Policy bind CVS Annotate Block 6 new Object NON NLS 1 user revision String value Of delta line  LabelProvider toString endLine startLine CVSAnnotateBlock CVSAnnotateBlock CVSAnnotateBlock valueOf
Answer true if the receiver contains the given line number false otherwse param i a line number return true if receiver contains a line number public boolean contains int i return i start Line i end Line  startLine endLine

public CVS Compare Subscriber I Resource resources CVS Tag tag super get Unique Id Policy bind CVS Compare Subscriber 2 tag get Name Policy bind CVS Compare Subscriber 3 NON NLS 1 NON NLS 2 this resources resources tree new CVS Resource Variant Tree new Session Resource Variant Byte Store tag get Cache File Contents Hint initialize  CVSCompareSubscriber IResource CVSTag getUniqueId CVSCompareSubscriber getName CVSCompareSubscriber CVSResourceVariantTree SessionResourceVariantByteStore getCacheFileContentsHint
public CVS Compare Subscriber I Resource resources CVS Tag tags String name super get Unique Id Policy bind CVS Compare Subscriber 2 name Policy bind CVS Compare Subscriber 3 NON NLS 1 NON NLS 2 reset Roots resources tags initialize  CVSCompareSubscriber IResource CVSTag getUniqueId CVSCompareSubscriber CVSCompareSubscriber resetRoots
param resources param tags public void reset Roots I Resource resources CVS Tag tags if this resources null List removed new Array List for int i 0 i this resources length i I Resource resource this resources i removed add new Subscriber Change Event this I Subscriber Change Event ROOT REMOVED resource this resources new I Resource 0 fire Team Resource Change I Subscriber Change Event removed to Array new I Subscriber Change Event removed size if tree null tree dispose tree null this resources resources Multi Tag Resource Variant Tree multi Tree new Multi Tag Resource Variant Tree new Session Resource Variant Byte Store get Cache File Contents Hint for int i 0 i tags length i multi Tree add Resource resources i tags i tree multi Tree  resetRoots IResource CVSTag ArrayList IResource SubscriberChangeEvent ISubscriberChangeEvent ROOT_REMOVED IResource fireTeamResourceChange ISubscriberChangeEvent toArray ISubscriberChangeEvent MultiTagResourceVariantTree multiTree MultiTagResourceVariantTree SessionResourceVariantByteStore getCacheFileContentsHint multiTree addResource multiTree
private void initialize CVS Provider Plugin get Plugin getCVS Workspace Subscriber add Listener this  CVSProviderPlugin getPlugin getCVSWorkspaceSubscriber addListener
public void dispose CVS Provider Plugin get Plugin getCVS Workspace Subscriber remove Listener this tree dispose  CVSProviderPlugin getPlugin getCVSWorkspaceSubscriber removeListener
private static Qualified Name get Unique Id String unique Id Long to String System current Time Millis return new Qualified Name QUALIFIED NAME UNIQUE ID PREFIX unique Id NON NLS 1  QualifiedName getUniqueId uniqueId toString currentTimeMillis QualifiedName QUALIFIED_NAME UNIQUE_ID_PREFIX uniqueId
see org eclipse team internal ccvs core CVS Sync Tree Subscriber get Base Synchronization Cache protected I Resource Variant Tree get Base Tree No base cache needed since it s a two way compare return null  CVSSyncTreeSubscriber getBaseSynchronizationCache IResourceVariantTree getBaseTree
see org eclipse team internal ccvs core CVS Sync Tree Subscriber get Remote Synchronization Cache protected I Resource Variant Tree get Remote Tree return tree  CVSSyncTreeSubscriber getRemoteSynchronizationCache IResourceVariantTree getRemoteTree
see org eclipse team core subscribers Team Subscriber is Three Way public boolean is Three Way return false  TeamSubscriber isThreeWay isThreeWay
see org eclipse team core subscribers Team Subscriber roots public I Resource roots return resources  TeamSubscriber IResource
public void subscriber Resource Changed I Subscriber Change Event deltas List outgoing Deltas new Array List deltas length for int i 0 i deltas length i I Subscriber Change Event delta deltas i if delta get Flags I Subscriber Change Event ROOT REMOVED 0 I Resource resource delta get Resource outgoing Deltas add All Arrays as List handle Removed Root resource else if delta get Flags I Subscriber Change Event SYNC CHANGED 0 I Resource resource delta get Resource try if is Supervised resource outgoing Deltas add new Subscriber Change Event this delta get Flags resource catch Team Exception e Log and ignore CVS Provider Plugin log e fire Team Resource Change Subscriber Change Event outgoing Deltas to Array new Subscriber Change Event outgoing Deltas size  subscriberResourceChanged ISubscriberChangeEvent outgoingDeltas ArrayList ISubscriberChangeEvent getFlags ISubscriberChangeEvent ROOT_REMOVED IResource getResource outgoingDeltas addAll asList handleRemovedRoot getFlags ISubscriberChangeEvent SYNC_CHANGED IResource getResource isSupervised outgoingDeltas SubscriberChangeEvent getFlags TeamException CVSProviderPlugin fireTeamResourceChange SubscriberChangeEvent outgoingDeltas toArray SubscriberChangeEvent outgoingDeltas
private Subscriber Change Event handle Removed Root I Resource removed Root Determine if any of the roots of the compare are affected List removals new Array List resources length for int j 0 j resources length j I Resource root resources j if removed Root get Full Path is Prefix Of root get Full Path The root is no longer managed by CVS removals add root try tree flush Variants root I Resource DEPTH INFINITE catch Team Exception e CVS Provider Plugin log e if removals is Empty return new Subscriber Change Event 0 Adjust the roots of the subscriber List new Roots new Array List resources length new Roots add All Arrays as List resources new Roots remove All removals resources I Resource new Roots to Array new I Resource new Roots size Create the deltas for the removals Subscriber Change Event deltas new Subscriber Change Event removals size for int i 0 i deltas length i deltas i new Subscriber Change Event this I Subscriber Change Event ROOT REMOVED I Resource removals get i return deltas  SubscriberChangeEvent handleRemovedRoot IResource removedRoot ArrayList IResource removedRoot getFullPath isPrefixOf getFullPath flushVariants IResource DEPTH_INFINITE TeamException CVSProviderPlugin isEmpty SubscriberChangeEvent newRoots ArrayList newRoots addAll asList newRoots removeAll IResource newRoots toArray IResource newRoots SubscriberChangeEvent SubscriberChangeEvent SubscriberChangeEvent ISubscriberChangeEvent ROOT_REMOVED IResource
public boolean is Supervised I Resource resource throws Team Exception if super is Supervised resource if resource exists get Remote Tree has Resource Variant resource Exclude conflicting deletions return false for int i 0 i resources length i I Resource root resources i if root get Full Path is Prefix Of resource get Full Path return true return false  isSupervised IResource TeamException isSupervised getRemoteTree hasResourceVariant IResource getFullPath isPrefixOf getFullPath
see org eclipse team internal ccvs core CVS Sync Tree Subscriber get Cache File Contents Hint protected boolean get Cache File Contents Hint return true  CVSSyncTreeSubscriber getCacheFileContentsHint getCacheFileContentsHint
public CVS Tag get Tag return tree get Tag Resources Plugin get Workspace get Root  CVSTag getTag getTag ResourcesPlugin getWorkspace getRoot
public boolean equals Object other if this other return true if other instanceof CVS Compare Subscriber return false CVS Compare Subscriber s CVS Compare Subscriber other CVS Resource Variant Tree tree1 CVS Resource Variant Tree get Remote Tree CVS Resource Variant Tree tree2 CVS Resource Variant Tree s get Remote Tree I Workspace Root root Resources Plugin get Workspace get Root CVS Tag tag1 tree1 get Tag root CVS Tag tag2 tree2 get Tag root if tag1 null tag2 null return false return tag1 equals tag2 roots Equal s  CVSCompareSubscriber CVSCompareSubscriber CVSCompareSubscriber CVSResourceVariantTree CVSResourceVariantTree getRemoteTree CVSResourceVariantTree CVSResourceVariantTree getRemoteTree IWorkspaceRoot ResourcesPlugin getWorkspace getRoot CVSTag getTag CVSTag getTag rootsEqual
cvs Resource accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception byte bytes file get Sync Bytes if bytes null try tree get Byte Store set Bytes file getI Resource bytes catch Team Exception e throw CVS Exception wrap Exception e  cvsResource ICVSResourceVisitor visitFile ICVSFile CVSException getSyncBytes getByteStore setBytes getIResource TeamException CVSException wrapException
public void visit Folder ICVS Folder folder throws CVS Exception No need to copy sync info for folders since CVS resource variant tree will get missing folder info from the local resources folder accept Children this  visitFolder ICVSFolder CVSException acceptChildren
Prime the remote tree with the sync info from the local workspace This is done to ensure that we don t get a huge nimber of outgoing changes before the first refresh public void prime Remote Tree throws CVS Exception for int i 0 i resources length i I Resource resource resources i ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource cvs Resource accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception byte bytes file get Sync Bytes if bytes null try tree get Byte Store set Bytes file getI Resource bytes catch Team Exception e throw CVS Exception wrap Exception e public void visit Folder ICVS Folder folder throws CVS Exception No need to copy sync info for folders since CVS resource variant tree will get missing folder info from the local resources folder accept Children this  primeRemoteTree CVSException IResource ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor cvsResource ICVSResourceVisitor visitFile ICVSFile CVSException getSyncBytes getByteStore setBytes getIResource TeamException CVSException wrapException visitFolder ICVSFolder CVSException acceptChildren

public class CVS Exception extends Team Exception public CVS Exception Core Exception e super e  CVSException TeamException CVSException CoreException
public CVS Exception int severity int code String message Throwable e super new CVS Status severity code message e  CVSException CVSStatus
public CVS Exception int severity int code String message this severity code message null  CVSException
public CVS Exception String message super new CVS Status I Status ERROR UNABLE message null  CVSException CVSStatus IStatus
public CVS Exception String message Throwable e this I Status ERROR UNABLE message e  CVSException IStatus
public CVS Exception I Status status super status  CVSException IStatus
public static CVS Exception wrap Exception I Resource resource String message IO Exception e NOTE we should record the resource somehow We should also inlcude the IO message return new CVS Exception new CVS Status I Status ERROR IO FAILED message e  CVSException wrapException IResource IOException CVSException CVSStatus IStatus IO_FAILED
Static helper methods for creating exceptions public static CVS Exception wrap Exception I Resource resource String message Core Exception e return new CVS Exception new CVS Status I Status ERROR e get Status get Code message e  CVSException wrapException IResource CoreException CVSException CVSStatus IStatus getStatus getCode
public static CVS Exception wrap Exception Exception e Throwable t e if e instanceof Invocation Target Exception Throwable target Invocation Target Exception e get Target Exception if target instanceof CVS Exception return CVS Exception target t target return new CVS Exception new CVS Status I Status ERROR UNABLE t get Message null t get Message t NON NLS 1  CVSException wrapException InvocationTargetException InvocationTargetException getTargetException CVSException CVSException CVSException CVSStatus IStatus getMessage getMessage
public static CVS Exception wrap Exception Core Exception e if e instanceof CVS Exception return CVS Exception e return new CVS Exception e  CVSException wrapException CoreException CVSException CVSException CVSException
public Core Exception to Core Exception I Status status get Status return new Core Exception new Status status get Severity status get Plugin 0 status get Message this  CoreException toCoreException IStatus getStatus CoreException getSeverity getPlugin getMessage

from 3 0 M8 to 3 0 M9 so not lose there ongoing merge state private Persistant Resource Variant Byte Store merged Synchronizer private Merge Base Tree Resource Variant Byte Store cache CVS Tag tag boolean cache File Contents Hint String sync Key Prefix super cache tag cache File Contents Hint merged Synchronizer new Persistant Resource Variant Byte Store new Qualified Name SYNC KEY QUALIFIER sync Key Prefix 0merged NON NLS 1  PersistantResourceVariantByteStore mergedSynchronizer MergeBaseTree ResourceVariantByteStore CVSTag cacheFileContentsHint syncKeyPrefix cacheFileContentsHint mergedSynchronizer PersistantResourceVariantByteStore QualifiedName SYNC_KEY_QUALIFIER syncKeyPrefix
public I Resource refresh I Resource resources int depth I Progress Monitor monitor throws Team Exception Only refresh the base of a resource once as it should not change List unrefreshed new Array List for int i 0 i resources length i I Resource resource resources i if has Resource Variant resource unrefreshed add resource if unrefreshed is Empty monitor done return new I Resource 0 I Resource refreshed super refresh I Resource unrefreshed to Array new I Resource unrefreshed size depth monitor return refreshed  IResource IResource IProgressMonitor TeamException ArrayList IResource hasResourceVariant isEmpty IResource IResource IResource toArray IResource
public I Resource Variant get Resource Variant I Resource resource throws Team Exception Use the merged bytes for the base if there are some byte merged Bytes merged Synchronizer get Bytes resource if merged Bytes null byte parent Bytes get Byte Store get Bytes resource get Parent if parent Bytes null return Remote File from Bytes resource merged Bytes parent Bytes return super get Resource Variant resource  IResourceVariant getResourceVariant IResource TeamException mergedBytes mergedSynchronizer getBytes mergedBytes parentBytes getByteStore getBytes getParent parentBytes RemoteFile fromBytes mergedBytes parentBytes getResourceVariant
Mark the resource as merged by making it s base equal the remote public void merged I Resource resource byte remote Bytes throws Team Exception if remote Bytes null get Byte Store delete Bytes resource else get Byte Store set Bytes resource remote Bytes  IResource remoteBytes TeamException remoteBytes getByteStore deleteBytes getByteStore setBytes remoteBytes
Return true if the remote has already been merged i e the base equals the remote public boolean is Merged I Resource resource byte remote Bytes throws Team Exception byte merged Bytes get Byte Store get Bytes resource return Util equals merged Bytes remote Bytes  isMerged IResource remoteBytes TeamException mergedBytes getByteStore getBytes mergedBytes remoteBytes
see org eclipse team internal ccvs core syncinfo CVS Resource Variant Tree dispose public void dispose merged Synchronizer dispose super dispose  CVSResourceVariantTree mergedSynchronizer
private Merge Base Tree base Tree public CVS Merge Subscriber I Resource roots CVS Tag start CVS Tag end this get Unique Id roots start end  MergeBaseTree baseTree CVSMergeSubscriber IResource CVSTag CVSTag getUniqueId
private static Qualified Name get Unique Id String unique Id Long to String System current Time Millis return new Qualified Name ID CVS UNIQUE ID PREFIX unique Id NON NLS 1  QualifiedName getUniqueId uniqueId toString currentTimeMillis QualifiedName UNIQUE_ID_PREFIX uniqueId
public CVS Merge Subscriber Qualified Name id I Resource roots CVS Tag start CVS Tag end super id Policy bind CVS Merge Subscriber 2 start get Name end get Name Policy bind CVS Merge Subscriber 4 NON NLS 1 NON NLS 2 this start start this end end this roots new Array List Arrays as List roots initialize  CVSMergeSubscriber QualifiedName IResource CVSTag CVSTag CVSMergeSubscriber getName getName CVSMergeSubscriber ArrayList asList
remote Tree new CVS Resource Variant Tree remote Synchronizer get End Tag get Cache File Contents Hint public I Resource refresh I Resource resources int depth I Progress Monitor monitor throws Team Exception Override refresh to compare file contents monitor begin Task null 100 try I Resource refreshed super refresh resources depth monitor compare With Remote refreshed Policy sub Monitor For monitor 50 return refreshed finally monitor done  remoteTree CVSResourceVariantTree remoteSynchronizer getEndTag getCacheFileContentsHint IResource IResource IProgressMonitor TeamException beginTask IResource compareWithRemote subMonitorFor
private void initialize Qualified Name id get Id String sync Key Prefix id get Local Name Persistant Resource Variant Byte Store remote Synchronizer new Persistant Resource Variant Byte Store new Qualified Name SYNC KEY QUALIFIER sync Key Prefix end get Name remote Tree new CVS Resource Variant Tree remote Synchronizer get End Tag get Cache File Contents Hint public I Resource refresh I Resource resources int depth I Progress Monitor monitor throws Team Exception Override refresh to compare file contents monitor begin Task null 100 try I Resource refreshed super refresh resources depth monitor compare With Remote refreshed Policy sub Monitor For monitor 50 return refreshed finally monitor done Persistant Resource Variant Byte Store base Synchronizer new Persistant Resource Variant Byte Store new Qualified Name SYNC KEY QUALIFIER sync Key Prefix start get Name base Tree new Merge Base Tree base Synchronizer get Start Tag get Cache File Contents Hint sync Key Prefix Resources Plugin get Workspace add Resource Change Listener this CVS Provider Plugin get Plugin getCVS Workspace Subscriber add Listener this  QualifiedName getId syncKeyPrefix getLocalName PersistantResourceVariantByteStore remoteSynchronizer PersistantResourceVariantByteStore QualifiedName SYNC_KEY_QUALIFIER syncKeyPrefix getName remoteTree CVSResourceVariantTree remoteSynchronizer getEndTag getCacheFileContentsHint IResource IResource IProgressMonitor TeamException beginTask IResource compareWithRemote subMonitorFor PersistantResourceVariantByteStore baseSynchronizer PersistantResourceVariantByteStore QualifiedName SYNC_KEY_QUALIFIER syncKeyPrefix getName baseTree MergeBaseTree baseSynchronizer getStartTag getCacheFileContentsHint syncKeyPrefix ResourcesPlugin getWorkspace addResourceChangeListener CVSProviderPlugin getPlugin getCVSWorkspaceSubscriber addListener
protected Sync Info get Sync Info I Resource local I Resource Variant base I Resource Variant remote throws Team Exception CVS Merge Sync Info info new CVS Merge Sync Info local base remote this info init return info  SyncInfo getSyncInfo IResource IResourceVariant IResourceVariant TeamException CVSMergeSyncInfo CVSMergeSyncInfo
public void merged I Resource resources throws Team Exception for int i 0 i resources length i I Resource resource resources i internal Merged resource fire Team Resource Change Subscriber Change Event as Sync Changed Deltas this resources  IResource TeamException IResource internalMerged fireTeamResourceChange SubscriberChangeEvent asSyncChangedDeltas
private void internal Merged I Resource resource throws Team Exception byte remote Bytes get Remote Byte Store get Bytes resource base Tree merged resource remote Bytes  internalMerged IResource TeamException remoteBytes getRemoteByteStore getBytes baseTree remoteBytes
public void cancel Resources Plugin get Workspace remove Resource Change Listener this remote Tree dispose base Tree dispose  ResourcesPlugin getWorkspace removeResourceChangeListener remoteTree baseTree
see org eclipse team core sync Team Subscriber roots public I Resource roots return I Resource roots to Array new I Resource roots size  TeamSubscriber IResource IResource toArray IResource
see org eclipse team core sync Team Subscriber is Supervised org eclipse core resources I Resource public boolean is Supervised I Resource resource throws Team Exception return get Base Tree has Resource Variant resource get Remote Tree has Resource Variant resource  TeamSubscriber isSupervised IResource isSupervised IResource TeamException getBaseTree hasResourceVariant getRemoteTree hasResourceVariant
public CVS Tag get Start Tag return start  CVSTag getStartTag
public CVS Tag get End Tag return end  CVSTag getEndTag
delta accept new I Resource Delta Visitor public boolean visit I Resource Delta delta throws Core Exception I Resource resource delta get Resource if resource get Type I Resource PROJECT I Project project I Project resource if project is Accessible return false if delta get Flags I Resource Delta OPEN 0 return false if Repository Provider get Provider project CVS Provider Plugin get Type Id null return false if roots contains resource if delta get Kind I Resource Delta REMOVED delta get Kind I Resource Delta MOVED TO cancel stop visiting children return false keep visiting children return true  IResourceDeltaVisitor IResourceDelta CoreException IResource getResource getType IResource IProject IProject isAccessible getFlags IResourceDelta RepositoryProvider getProvider CVSProviderPlugin getTypeId getKind IResourceDelta getKind IResourceDelta MOVED_TO
public void resource Changed I Resource Change Event event try I Resource Delta delta event get Delta if delta null delta accept new I Resource Delta Visitor public boolean visit I Resource Delta delta throws Core Exception I Resource resource delta get Resource if resource get Type I Resource PROJECT I Project project I Project resource if project is Accessible return false if delta get Flags I Resource Delta OPEN 0 return false if Repository Provider get Provider project CVS Provider Plugin get Type Id null return false if roots contains resource if delta get Kind I Resource Delta REMOVED delta get Kind I Resource Delta MOVED TO cancel stop visiting children return false keep visiting children return true catch Core Exception e CVS Provider Plugin log e get Status  resourceChanged IResourceChangeEvent IResourceDelta getDelta IResourceDeltaVisitor IResourceDelta CoreException IResource getResource getType IResource IProject IProject isAccessible getFlags IResourceDelta RepositoryProvider getProvider CVSProviderPlugin getTypeId getKind IResourceDelta getKind IResourceDelta MOVED_TO CoreException CVSProviderPlugin getStatus
Return whether the given resource has been merged with its corresponding remote param resource the local resource return boolean throws Team Exception public boolean is Merged I Resource resource throws Team Exception byte remote Bytes get Remote Byte Store get Bytes resource return base Tree is Merged resource remote Bytes  TeamException isMerged IResource TeamException remoteBytes getRemoteByteStore getBytes baseTree isMerged remoteBytes
public void subscriber Resource Changed I Subscriber Change Event deltas for int i 0 i deltas length i I Subscriber Change Event delta deltas i switch delta get Flags case I Subscriber Change Event ROOT REMOVED I Resource resource delta get Resource if roots remove resource fire Team Resource Change new I Subscriber Change Event delta break  subscriberResourceChanged ISubscriberChangeEvent ISubscriberChangeEvent getFlags ISubscriberChangeEvent ROOT_REMOVED IResource getResource fireTeamResourceChange ISubscriberChangeEvent
see org eclipse team internal ccvs core CVS Sync Tree Subscriber get Base Synchronization Cache protected I Resource Variant Tree get Base Tree return base Tree  CVSSyncTreeSubscriber getBaseSynchronizationCache IResourceVariantTree getBaseTree baseTree
see org eclipse team internal ccvs core CVS Sync Tree Subscriber get Remote Synchronization Cache protected I Resource Variant Tree get Remote Tree return remote Tree  CVSSyncTreeSubscriber getRemoteSynchronizationCache IResourceVariantTree getRemoteTree remoteTree
protected boolean get Cache File Contents Hint return true  getCacheFileContentsHint
private void compare With Remote I Resource refreshed I Progress Monitor monitor throws CVS Exception Team Exception For any remote changes if the revision differs from the local compare the contents if refreshed length 0 return Sync Info Filter Content Comparison Sync Info Filter content Filter new Sync Info Filter Content Comparison Sync Info Filter monitor begin Task null refreshed length 100 for int i 0 i refreshed length i I Resource resource refreshed i if resource get Type I Resource FILE ICVS File local CVS Workspace Root getCVS File For I File resource byte local Bytes local get Sync Bytes byte remote Bytes get Remote Byte Store get Bytes resource if remote Bytes null local Bytes null local exists Resource Sync Info get Revision remote Bytes equals Resource Sync Info get Revision local Bytes content Filter select get Sync Info resource Policy sub Monitor For monitor 100 The contents are equals so mark the file as merged internal Merged resource monitor done  compareWithRemote IResource IProgressMonitor CVSException TeamException SyncInfoFilter ContentComparisonSyncInfoFilter contentFilter SyncInfoFilter ContentComparisonSyncInfoFilter beginTask IResource getType IResource ICVSFile CVSWorkspaceRoot getCVSFileFor IFile localBytes getSyncBytes remoteBytes getRemoteByteStore getBytes remoteBytes localBytes ResourceSyncInfo getRevision remoteBytes ResourceSyncInfo getRevision localBytes contentFilter getSyncInfo subMonitorFor internalMerged
private Persistant Resource Variant Byte Store get Remote Byte Store return Persistant Resource Variant Byte Store CVS Resource Variant Tree get Remote Tree get Byte Store  PersistantResourceVariantByteStore getRemoteByteStore PersistantResourceVariantByteStore CVSResourceVariantTree getRemoteTree getByteStore
public boolean equals Object other if this other return true if other instanceof CVS Merge Subscriber return false CVS Merge Subscriber s CVS Merge Subscriber other return get End Tag equals s get End Tag get Start Tag equals s get Start Tag roots Equal s  CVSMergeSubscriber CVSMergeSubscriber CVSMergeSubscriber getEndTag getEndTag getStartTag getStartTag rootsEqual

public class CVS Merge Sync Info extends CVS Sync Info public CVS Merge Sync Info I Resource local I Resource Variant base I Resource Variant remote Subscriber subscriber super local base remote subscriber  CVSMergeSyncInfo CVSSyncInfo CVSMergeSyncInfo IResource IResourceVariant IResourceVariant
protected int handle Deletion Conflicts int kind see bug 40053 if kind Sync Info CONFLICTING Sync Info DELETION Sync Info PSEUDO CONFLICT return Sync Info IN SYNC return kind  handleDeletionConflicts SyncInfo SyncInfo SyncInfo PSEUDO_CONFLICT SyncInfo IN_SYNC
protected int calculate Kind throws Team Exception Report merged resources as in sync if CVS Merge Subscriber get Subscriber is Merged get Local return IN SYNC int kind super calculate Kind Report outgoing resources as in sync if kind DIRECTION MASK OUTGOING return IN SYNC return kind  calculateKind TeamException CVSMergeSubscriber getSubscriber isMerged getLocal IN_SYNC calculateKind DIRECTION_MASK IN_SYNC
public I Status make Outgoing I Progress Monitor monitor throws Team Exception Make the resource outgoing by marking it as merged with the subscriber CVS Merge Subscriber subscriber CVS Merge Subscriber get Subscriber subscriber merged new I Resource get Local return Status OK STATUS  IStatus makeOutgoing IProgressMonitor TeamException CVSMergeSubscriber CVSMergeSubscriber getSubscriber IResource getLocal OK_STATUS

Override superclass implementation to return an array of project references see Project Set Serializer as Reference I Project Project Set Serialization Context I Progress Monitor public String as Reference I Project projects Project Set Serialization Context context I Progress Monitor monitor throws Team Exception String result new String projects length for int i 0 i projects length i result i as Reference projects i return result  ProjectSetSerializer asReference IProject ProjectSetSerializationContext IProgressMonitor asReference IProject ProjectSetSerializationContext IProgressMonitor TeamException asReference
Answer a string representing the specified project param project the project not code null code return the project reference not code null code throws CVS Exception private String as Reference I Project project throws Team Exception String Buffer buffer new String Buffer buffer append 1 0 NON NLS 1 CVS Team Provider provider CVS Team Provider Repository Provider get Provider project CVS Workspace Root root provider getCVS Workspace Root CVS Repository Location location CVS Repository Location from String root get Remote Location get Location location set User Muteable true String repo Location location get Location buffer append repo Location buffer append NON NLS 1 ICVS Folder folder root get Local Root Folder Sync Info sync Info folder get Folder Sync Info String module sync Info get Repository buffer append module buffer append NON NLS 1 String project Name folder get Name buffer append project Name CVS Tag tag sync Info get Tag if tag null if tag get Type CVS Tag DATE buffer append NON NLS 1 String tag Name tag get Name buffer append tag Name return buffer to String  CVSException asReference IProject TeamException StringBuffer StringBuffer CVSTeamProvider CVSTeamProvider RepositoryProvider getProvider CVSWorkspaceRoot getCVSWorkspaceRoot CVSRepositoryLocation CVSRepositoryLocation fromString getRemoteLocation getLocation setUserMuteable repoLocation getLocation repoLocation ICVSFolder getLocalRoot FolderSyncInfo syncInfo getFolderSyncInfo syncInfo getRepository projectName getName projectName CVSTag syncInfo getTag getType CVSTag tagName getName tagName toString
Override superclass implementation to load the referenced projects into the workspace see org eclipse team core Project Set Serializer add To Workspace java lang String org eclipse team core Project Set Serialization Context org eclipse core runtime I Progress Monitor public I Project add To Workspace String reference Strings Project Set Serialization Context context I Progress Monitor monitor throws Team Exception monitor Policy monitor For monitor Policy check Canceled monitor Confirm the projects to be loaded Map info Map new Hash Map reference Strings length I Project projects as Projects reference Strings info Map projects confirm Overwrite context projects if projects null return new I Project 0 Load the projects return checkout projects info Map monitor  ProjectSetSerializer addToWorkspace ProjectSetSerializationContext IProgressMonitor IProject addToWorkspace referenceStrings ProjectSetSerializationContext IProgressMonitor TeamException monitorFor checkCanceled infoMap HashMap referenceStrings IProject asProjects referenceStrings infoMap confirmOverwrite IProject infoMap
Translate the reference strings into projects to be loaded and build a mapping of project to project load information param reference Strings project references param info Map a mapping of project to project load information return the projects to be loaded private I Project as Projects String reference Strings Map info Map throws CVS Exception Collection result new Array List for int i 0 i reference Strings length i String Tokenizer tokenizer new String Tokenizer reference Strings i NON NLS 1 String version tokenizer next Token If this is a newer version then ignore it if version equals 1 0 NON NLS 1 continue Load Info info new Load Info tokenizer I Project proj info get Project result add proj info Map put proj info return I Project result to Array new I Project result size  referenceStrings infoMap IProject asProjects referenceStrings infoMap CVSException ArrayList referenceStrings StringTokenizer StringTokenizer referenceStrings nextToken LoadInfo LoadInfo IProject getProject infoMap IProject toArray IProject
Checkout projects from the CVS repository param projects the projects to be loaded from the repository param info Map a mapping of project to project load information param monitor the progress monitor not code null code private I Project checkout I Project projects Map info Map I Progress Monitor monitor throws Team Exception monitor begin Task 1000 projects length NON NLS 1 List result new Array List try for int i 0 i projects length i if monitor is Canceled break I Project project projects i Load Info info Load Info info Map get project if info null info checkout new Sub Progress Monitor monitor 1000 result add project finally monitor done return I Project result to Array new I Project result size  infoMap IProject IProject infoMap IProgressMonitor TeamException beginTask ArrayList isCanceled IProject LoadInfo LoadInfo infoMap SubProgressMonitor IProject toArray IProject
Construct a new instance wrappering the specified project reference param proj Ref the project reference Load Info String Tokenizer tokenizer throws CVS Exception String repo tokenizer next Token repository Location get Repository Location From String repo module tokenizer next Token String project Name tokenizer next Token project Resources Plugin get Workspace get Root get Project project Name if tokenizer has More Tokens String tag Name tokenizer next Token tag new CVS Tag tag Name CVS Tag BRANCH else tag null  projRef LoadInfo StringTokenizer CVSException nextToken repositoryLocation getRepositoryLocationFromString nextToken projectName nextToken ResourcesPlugin getWorkspace getRoot getProject projectName hasMoreTokens tagName nextToken CVSTag tagName CVSTag
Answer the project referenced by this object The project may or may not already exist return the project not code null code private I Project get Project return project  IProject getProject
Checkout the project specified by this reference param monitor project monitor return true if loaded else false throws Team Exception boolean checkout I Progress Monitor monitor throws Team Exception if repository Location null return false CVS Project Set Capability checkout repository Location project module tag monitor return true  TeamException IProgressMonitor TeamException repositoryLocation CVSProjectSetCapability repositoryLocation
Extract the CVS repository location information from the specified string param repo the repository location as a string return the CVS repository information throws CVS Exception private static ICVS Repository Location get Repository Location From String String repo throws CVS Exception create the new location ICVS Repository Location new Location CVS Repository Location from String repo if new Location get Username null new Location get Username length 0 look for an existing location that matched ICVS Repository Location locations CVS Provider Plugin get Plugin get Known Repositories for int i 0 i locations length i ICVS Repository Location location locations i if location get Method new Location get Method location get Host equals new Location get Host location get Port new Location get Port location get Root Directory equals new Location get Root Directory return location return new Location  CVSException ICVSRepositoryLocation getRepositoryLocationFromString CVSException ICVSRepositoryLocation newLocation CVSRepositoryLocation fromString newLocation getUsername newLocation getUsername ICVSRepositoryLocation CVSProviderPlugin getPlugin getKnownRepositories ICVSRepositoryLocation getMethod newLocation getMethod getHost newLocation getHost getPort newLocation getPort getRootDirectory newLocation getRootDirectory newLocation
Checkout a CVS module The provided project represents the target project Any existing contents may or may not get overwritten If project is code null code then a project will be created based on the provided source Module If soure Module is null then the project name will be used as the module to check out If both are absent an exception is thrown Resources existing in the local file system at the target project location but now known to the workbench will be overwritten After the successful completion of this method the project will exist and be open public static void checkout ICVS Repository Location repository I Project project String source Module CVS Tag tag I Progress Monitor monitor throws Team Exception if source Module null source Module project get Name checkout new ICVS Remote Folder new Remote Folder null repository source Module tag new I Project project monitor  sourceModule soureModule ICVSRepositoryLocation IProject sourceModule CVSTag IProgressMonitor TeamException sourceModule sourceModule getName ICVSRemoteFolder RemoteFolder sourceModule IProject
Prepare the target projects to receive resources root run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception scrub Projects I Project target Projects to Array new I Project target Projects size monitor  ICVSRunnable IProgressMonitor CVSException scrubProjects IProject targetProjects toArray IProject targetProjects
I Workspace Runnable workspace Runnable new I Workspace Runnable public void run I Progress Monitor pm throws Core Exception try pm begin Task null 1000 resources length Get the location of the workspace root ICVS Folder root CVS Workspace Root getCVS Folder For Resources Plugin get Workspace get Root for int i 0 i resources length i I Project project null Remote Folder resource Remote Folder resources i Determine the provided target project if there is one if projects null project projects i Determine the remote module to be checked out String module Name if resource instanceof Remote Module module Name Remote Module resource get Name else module Name resource get Repository Relative Path Open a connection session to the repository ICVS Repository Location repository resource get Repository Session session new Session repository root try session open Policy sub Monitor For pm 50 false read only Determine the local target projects either the project provider or the module expansions final Set target Projects new Hash Set if project null Fetch the module expansions I Status status Request EXPAND MODULES execute session new String module Name Policy sub Monitor For pm 50 if status get Code CVS Status SERVER ERROR throw new CVS Server Exception status Convert the module expansions to local projects String expansions session get Module Expansions for int j 0 j expansions length j target Projects add Resources Plugin get Workspace get Root get Project new Path expansions j segment 0 else target Projects add project Prepare the target projects to receive resources root run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception scrub Projects I Project target Projects to Array new I Project target Projects size monitor Policy sub Monitor For pm 100 Build the local options List local Options new Array List Add the option to load into the target project if one was supplied if project null local Options add Checkout make Directory Name Option project get Name Prune empty directories if pruning enabled if CVS Provider Plugin get Plugin get Prune Empty Directories local Options add Checkout PRUNE EMPTY DIRECTORIES Add the options related to the CVS Tag CVS Tag tag resource get Tag if tag null A null tag in a remote resource indicates HEAD tag CVS Tag DEFAULT local Options add Update make Tag Option tag Perform the checkout I Status status Command CHECKOUT execute session Command NO GLOBAL OPTIONS Local Option local Options to Array new Local Option local Options size new String module Name null Policy sub Monitor For pm 800 if status get Code CVS Status SERVER ERROR XXX Should we cleanup any partially checked out projects throw new CVS Server Exception status Bring the project into the workspace refresh Projects I Project target Projects to Array new I Project target Projects size Policy sub Monitor For pm 100 finally session close catch Team Exception e Pass it outside the workspace runnable e Holder 0 e finally pm done Core Exception and Operation Canceled Exception are propagated  IWorkspaceRunnable workspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException beginTask ICVSFolder CVSWorkspaceRoot getCVSFolderFor ResourcesPlugin getWorkspace getRoot IProject RemoteFolder RemoteFolder moduleName RemoteModule moduleName RemoteModule getName moduleName getRepositoryRelativePath ICVSRepositoryLocation getRepository subMonitorFor targetProjects HashSet IStatus EXPAND_MODULES moduleName subMonitorFor getCode CVSStatus SERVER_ERROR CVSServerException getModuleExpansions targetProjects ResourcesPlugin getWorkspace getRoot getProject targetProjects ICVSRunnable IProgressMonitor CVSException scrubProjects IProject targetProjects toArray IProject targetProjects subMonitorFor localOptions ArrayList localOptions makeDirectoryNameOption getName CVSProviderPlugin getPlugin getPruneEmptyDirectories localOptions PRUNE_EMPTY_DIRECTORIES CVSTag CVSTag getTag CVSTag localOptions makeTagOption IStatus NO_GLOBAL_OPTIONS LocalOption localOptions toArray LocalOption localOptions moduleName subMonitorFor getCode CVSStatus SERVER_ERROR CVSServerException refreshProjects IProject targetProjects toArray IProject targetProjects subMonitorFor TeamException eHolder CoreException OperationCanceledException
Checkout the remote resources into the local workspace Each resource will be checked out into the corresponding project If the corresponding project is null or if projects is null the name of the remote resource is used as the name of the project Resources existing in the local file system at the target project location but now known to the workbench will be overwritten public static void checkout final ICVS Remote Folder resources final I Project projects final I Progress Monitor monitor throws Team Exception final Team Exception e Holder new Team Exception 1 try I Workspace Runnable workspace Runnable new I Workspace Runnable public void run I Progress Monitor pm throws Core Exception try pm begin Task null 1000 resources length Get the location of the workspace root ICVS Folder root CVS Workspace Root getCVS Folder For Resources Plugin get Workspace get Root for int i 0 i resources length i I Project project null Remote Folder resource Remote Folder resources i Determine the provided target project if there is one if projects null project projects i Determine the remote module to be checked out String module Name if resource instanceof Remote Module module Name Remote Module resource get Name else module Name resource get Repository Relative Path Open a connection session to the repository ICVS Repository Location repository resource get Repository Session session new Session repository root try session open Policy sub Monitor For pm 50 false read only Determine the local target projects either the project provider or the module expansions final Set target Projects new Hash Set if project null Fetch the module expansions I Status status Request EXPAND MODULES execute session new String module Name Policy sub Monitor For pm 50 if status get Code CVS Status SERVER ERROR throw new CVS Server Exception status Convert the module expansions to local projects String expansions session get Module Expansions for int j 0 j expansions length j target Projects add Resources Plugin get Workspace get Root get Project new Path expansions j segment 0 else target Projects add project Prepare the target projects to receive resources root run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception scrub Projects I Project target Projects to Array new I Project target Projects size monitor Policy sub Monitor For pm 100 Build the local options List local Options new Array List Add the option to load into the target project if one was supplied if project null local Options add Checkout make Directory Name Option project get Name Prune empty directories if pruning enabled if CVS Provider Plugin get Plugin get Prune Empty Directories local Options add Checkout PRUNE EMPTY DIRECTORIES Add the options related to the CVS Tag CVS Tag tag resource get Tag if tag null A null tag in a remote resource indicates HEAD tag CVS Tag DEFAULT local Options add Update make Tag Option tag Perform the checkout I Status status Command CHECKOUT execute session Command NO GLOBAL OPTIONS Local Option local Options to Array new Local Option local Options size new String module Name null Policy sub Monitor For pm 800 if status get Code CVS Status SERVER ERROR XXX Should we cleanup any partially checked out projects throw new CVS Server Exception status Bring the project into the workspace refresh Projects I Project target Projects to Array new I Project target Projects size Policy sub Monitor For pm 100 finally session close catch Team Exception e Pass it outside the workspace runnable e Holder 0 e finally pm done Core Exception and Operation Canceled Exception are propagated Resources Plugin get Workspace run workspace Runnable new Multi Rule projects 0 monitor catch Core Exception e throw CVS Exception wrap Exception e finally monitor done Re throw the Team Exception if one occurred if e Holder 0 null throw e Holder 0  ICVSRemoteFolder IProject IProgressMonitor TeamException TeamException eHolder TeamException IWorkspaceRunnable workspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException beginTask ICVSFolder CVSWorkspaceRoot getCVSFolderFor ResourcesPlugin getWorkspace getRoot IProject RemoteFolder RemoteFolder moduleName RemoteModule moduleName RemoteModule getName moduleName getRepositoryRelativePath ICVSRepositoryLocation getRepository subMonitorFor targetProjects HashSet IStatus EXPAND_MODULES moduleName subMonitorFor getCode CVSStatus SERVER_ERROR CVSServerException getModuleExpansions targetProjects ResourcesPlugin getWorkspace getRoot getProject targetProjects ICVSRunnable IProgressMonitor CVSException scrubProjects IProject targetProjects toArray IProject targetProjects subMonitorFor localOptions ArrayList localOptions makeDirectoryNameOption getName CVSProviderPlugin getPlugin getPruneEmptyDirectories localOptions PRUNE_EMPTY_DIRECTORIES CVSTag CVSTag getTag CVSTag localOptions makeTagOption IStatus NO_GLOBAL_OPTIONS LocalOption localOptions toArray LocalOption localOptions moduleName subMonitorFor getCode CVSStatus SERVER_ERROR CVSServerException refreshProjects IProject targetProjects toArray IProject targetProjects subMonitorFor TeamException eHolder CoreException OperationCanceledException ResourcesPlugin getWorkspace workspaceRunnable MultiRule CoreException CVSException wrapException TeamException eHolder eHolder
internal use only static void refresh Projects I Project projects I Progress Monitor monitor throws Core Exception Team Exception monitor begin Task Policy bind CVS Provider Creating projects 2 projects length 100 NON NLS 1 try for int i 0 i projects length i I Project project projects i Register the project with Team Repository Provider map project CVS Provider Plugin get Type Id CVS Team Provider provider CVS Team Provider Repository Provider get Provider project CVS Provider Plugin get Type Id provider set Watch Edit Enabled CVS Provider Plugin get Plugin is Watch Edit Enabled finally monitor done  refreshProjects IProject IProgressMonitor CoreException TeamException beginTask CVSProvider Creating_projects_2 IProject RepositoryProvider CVSProviderPlugin getTypeId CVSTeamProvider CVSTeamProvider RepositoryProvider getProvider CVSProviderPlugin getTypeId setWatchEditEnabled CVSProviderPlugin getPlugin isWatchEditEnabled
internal use only static void scrub Projects I Project projects I Progress Monitor monitor throws CVS Exception if projects null monitor done return monitor begin Task Policy bind CVS Provider Scrubbing projects 1 projects length 100 NON NLS 1 try for int i 0 i projects length i I Project project projects i if project null project exists if project is Open project open Policy sub Monitor For monitor 10 We do not want to delete the project to avoid a project deletion delta We do not want to delete the project to avoid core exceptions monitor sub Task Policy bind CVS Provider Scrubbing local project 1 NON NLS 1 unmap the project from any previous repository provider if Repository Provider get Provider project null Repository Provider unmap project I Resource children project members I Container INCLUDE TEAM PRIVATE MEMBERS I Progress Monitor sub Monitor Policy sub Monitor For monitor 80 sub Monitor begin Task null children length 100 try for int j 0 j children length j if children j get Name equals project NON NLS 1 children j delete true force Policy sub Monitor For sub Monitor 100 finally sub Monitor done else if project null Make sure there is no directory in the local file system File location new File project get Parent get Location to File project get Name if location exists deep Delete location catch Core Exception e throw CVS Exception wrap Exception e finally monitor done  scrubProjects IProject IProgressMonitor CVSException beginTask CVSProvider Scrubbing_projects_1 IProject isOpen subMonitorFor subTask CVSProvider Scrubbing_local_project_1 RepositoryProvider getProvider RepositoryProvider IResource IContainer INCLUDE_TEAM_PRIVATE_MEMBERS IProgressMonitor subMonitor subMonitorFor subMonitor beginTask getName subMonitorFor subMonitor subMonitor getParent getLocation toFile getName deepDelete CoreException CVSException wrapException
private static void deep Delete File resource if resource is Directory File file List resource list Files for int i 0 i file List length i deep Delete file List i resource delete  deepDelete isDirectory fileList listFiles fileList deepDelete fileList

public synchronized CVS Workspace Subscriber getCVS Workspace Subscriber if cvs Workspace Subscriber null cvs Workspace Subscriber new CVS Workspace Subscriber CVS WORKSPACE SUBSCRIBER ID Policy bind CVS Provider Plugin 20 NON NLS 1 Policy bind CVS Provider Plugin 21 NON NLS 1 return cvs Workspace Subscriber  CVSWorkspaceSubscriber getCVSWorkspaceSubscriber cvsWorkspaceSubscriber cvsWorkspaceSubscriber CVSWorkspaceSubscriber CVS_WORKSPACE_SUBSCRIBER_ID CVSProviderPlugin CVSProviderPlugin cvsWorkspaceSubscriber
return public boolean is Confirm Move Tag Enabled return confirm Move Tag Enabled  isConfirmMoveTagEnabled confirmMoveTagEnabled
param confirm Move Tag public void set Confirm Move Tag Enabled boolean confirm Move Tag this confirm Move Tag Enabled confirm Move Tag  confirmMoveTag setConfirmMoveTagEnabled confirmMoveTag confirmMoveTagEnabled confirmMoveTag
Constructor for CVS Provider Plugin param descriptor public CVS Provider Plugin I Plugin Descriptor descriptor super descriptor instance this  CVSProviderPlugin CVSProviderPlugin IPluginDescriptor
Convenience method for logging Core Exceptions to the plugin log public static void log Core Exception e log e get Status get Severity e get Message e  CoreExceptions CoreException getStatus getSeverity getMessage
Log the given exception along with the provided message and severity indicator public static void log int severity String message Throwable e log new Status severity ID 0 message e 
Log the given status Do not use this method for the I Status from a Core Exception Use code log Core Exception code instead so the stack trace is not lost public static void log I Status status get Plugin get Log log status  IStatus CoreException CoreException IStatus getPlugin getLog
Returns the singleton plug in instance return the plugin instance public static CVS Provider Plugin get Plugin return instance  CVSProviderPlugin getPlugin
Answers the repository provider type id for the cvs plugin public static String get Type Id return NATURE ID  getTypeId NATURE_ID
Sets the file transfer compression level if supported Valid levels are 0 disabled 1 worst fastest 9 best slowest public void set Compression Level int level compression Level level  setCompressionLevel compressionLevel
Gets the file transfer compression level public int get Compression Level return compression Level  getCompressionLevel compressionLevel
Sets the default keyword substitution mode for text files public void set Default TextK Subst Option K Subst Option ksubst default TextK Subst Option ksubst  setDefaultTextKSubstOption KSubstOption defaultTextKSubstOption
Gets the default keyword substitution mode for text files public K Subst Option get Default TextK Subst Option return default TextK Subst Option  KSubstOption getDefaultTextKSubstOption defaultTextKSubstOption
Should the CVS adapter prune empty directories public boolean get Prune Empty Directories return prune Empty Directories  getPruneEmptyDirectories pruneEmptyDirectories
Set whether the CVS adapter should prune empty directories public void set Prune Empty Directories boolean prune prune Empty Directories prune  setPruneEmptyDirectories pruneEmptyDirectories
Get the communications timeout value in seconds public int get Timeout return communications Timeout  getTimeout communicationsTimeout
Set the timeout value for communications to a value in seconds The value must be greater than or equal 0 If is it 0 there is no timeout public void set Timeout int timeout this communications Timeout Math max 0 timeout  setTimeout communicationsTimeout
Set the quietness option to use with cvs commands Can be q or Q public void set Quietness Quiet Option option this quietness option  setQuietness QuietOption
Get the quietness option for commands public Quiet Option get Quietness return quietness  QuietOption getQuietness
Set the console listener for commands param console Listener the listener public void set Console Listener I Console Listener console Listener this console Listener console Listener  consoleListener setConsoleListener IConsoleListener consoleListener consoleListener consoleListener
Get the console listener for commands return the console Listener or null public I Console Listener get Console Listener return console Listener  consoleListener IConsoleListener getConsoleListener consoleListener
see Plugin startup public void startup throws Core Exception super startup Policy localize org eclipse team internal ccvs core messages NON NLS 1 load the state which includes the known repositories load Old State crash create Crash File Initialize CVS change listeners Note tha the report type is important I Workspace workspace Resources Plugin get Workspace add Delete Move Listener new Build Cleanup Listener file Modification Manager new File Modification Manager meta File Sync Listener new Sync File Change Listener workspace add Resource Change Listener add Delete Move Listener I Resource Change Event POST AUTO BUILD workspace add Resource Change Listener meta File Sync Listener I Resource Change Event POST CHANGE workspace add Resource Change Listener file Modification Manager I Resource Change Event POST CHANGE file Modification Manager register Save Participant getCVS Workspace Subscriber  CoreException loadOldState createCrashFile IWorkspace ResourcesPlugin getWorkspace addDeleteMoveListener BuildCleanupListener fileModificationManager FileModificationManager metaFileSyncListener SyncFileChangeListener addResourceChangeListener addDeleteMoveListener IResourceChangeEvent POST_AUTO_BUILD addResourceChangeListener metaFileSyncListener IResourceChangeEvent POST_CHANGE addResourceChangeListener fileModificationManager IResourceChangeEvent POST_CHANGE fileModificationManager registerSaveParticipant getCVSWorkspaceSubscriber
see Plugin shutdown public void shutdown throws Core Exception super shutdown save Plugin Preferences remove listeners I Workspace workspace Resources Plugin get Workspace workspace remove Resource Change Listener meta File Sync Listener workspace remove Resource Change Listener file Modification Manager workspace remove Resource Change Listener add Delete Move Listener remove all of this plugin s save participants This is easier than having each class that added itself as a participant to have to listen to shutdown workspace remove Save Participant this delete Crash File  CoreException savePluginPreferences IWorkspace ResourcesPlugin getWorkspace removeResourceChangeListener metaFileSyncListener removeResourceChangeListener fileModificationManager removeResourceChangeListener addDeleteMoveListener removeSaveParticipant deleteCrashFile
see org eclipse core runtime Plugin initialize Default Plugin Preferences protected void initialize Default Plugin Preferences Preferences store get Plugin Preferences store set Default READ ONLY false  initializeDefaultPluginPreferences initializeDefaultPluginPreferences getPluginPreferences setDefault READ_ONLY
Gets the cvs Rsh Command return Returns a String public String get Cvs Rsh Command return cvs Rsh Command  cvsRshCommand getCvsRshCommand cvsRshCommand
Sets the cvs Rsh Command param cvs Rsh Command The cvs Rsh Command to set public void set Cvs Rsh Command String cvs Rsh Command this cvs Rsh Command cvs Rsh Command  cvsRshCommand cvsRshCommand cvsRshCommand setCvsRshCommand cvsRshCommand cvsRshCommand cvsRshCommand
Returns the cvs Rsh Parameters return String public String get Cvs Rsh Parameters return cvs Rsh Parameters  cvsRshParameters getCvsRshParameters cvsRshParameters
Sets the cvs Rsh Parameters param cvs Rsh Parameters The cvs Rsh Parameters to set public void set Cvs Rsh Parameters String cvs Rsh Parameters this cvs Rsh Parameters cvs Rsh Parameters  cvsRshParameters cvsRshParameters cvsRshParameters setCvsRshParameters cvsRshParameters cvsRshParameters cvsRshParameters
Gets the cvs Server return Returns a String public String get Cvs Server return cvs Server  cvsServer getCvsServer cvsServer
Sets the cvs Server param cvs Server The cvs Server to set public void set Cvs Server String cvs Server this cvs Server cvs Server  cvsServer cvsServer cvsServer setCvsServer cvsServer cvsServer cvsServer
Gets the etch Absent Directories return Returns a boolean public boolean get Fetch Absent Directories return fetch Absent Directories  etchAbsentDirectories getFetchAbsentDirectories fetchAbsentDirectories
public boolean get Repositories Are Binary return repositories Are Binary  getRepositoriesAreBinary repositoriesAreBinary
Sets the fetch Absent Directories param etch Absent Directories The etch Absent Directories to set public void set Fetch Absent Directories boolean fetch Absent Directories this fetch Absent Directories fetch Absent Directories  fetchAbsentDirectories etchAbsentDirectories etchAbsentDirectories setFetchAbsentDirectories fetchAbsentDirectories fetchAbsentDirectories fetchAbsentDirectories
public boolean get Prompt On File Delete return prompt On File Delete  getPromptOnFileDelete promptOnFileDelete
public void set Prompt On File Delete boolean prompt prompt On File Delete prompt  setPromptOnFileDelete promptOnFileDelete
public void set Repositories Are Binary boolean binary repositories Are Binary binary  setRepositoriesAreBinary repositoriesAreBinary
public boolean get Prompt On Folder Delete return prompt On Folder Delete  getPromptOnFolderDelete promptOnFolderDelete
public void set Prompt On Folder Delete boolean prompt prompt On Folder Delete prompt  setPromptOnFolderDelete promptOnFolderDelete
final ICVS Decorator Enablement Listener listener listeners i I Safe Runnable code new I Safe Runnable public void run throws Exception listener decorator Enablement Changed enabled  ICVSDecoratorEnablementListener ISafeRunnable ISafeRunnable decoratorEnablementChanged
listener decorator Enablement Changed enabled public void handle Exception Throwable e don t log the exception it is already being logged in Platform run  decoratorEnablementChanged handleException
public static void broadcast Decorator Enablement Changed final boolean enabled ICVS Decorator Enablement Listener listeners synchronized decorator Enablement Listeners listeners ICVS Decorator Enablement Listener decorator Enablement Listeners to Array new ICVS Decorator Enablement Listener decorator Enablement Listeners size for int i 0 i listeners length i final ICVS Decorator Enablement Listener listener listeners i I Safe Runnable code new I Safe Runnable public void run throws Exception listener decorator Enablement Changed enabled public void handle Exception Throwable e don t log the exception it is already being logged in Platform run Platform run code  broadcastDecoratorEnablementChanged ICVSDecoratorEnablementListener decoratorEnablementListeners ICVSDecoratorEnablementListener decoratorEnablementListeners toArray ICVSDecoratorEnablementListener decoratorEnablementListeners ICVSDecoratorEnablementListener ISafeRunnable ISafeRunnable decoratorEnablementChanged handleException
Gets the replace Unmanaged return Returns a boolean public boolean is Replace Unmanaged return replace Unmanaged  replaceUnmanaged isReplaceUnmanaged replaceUnmanaged
Sets the replace Unmanaged param replace Unmanaged The replace Unmanaged to set public void set Replace Unmanaged boolean replace Unmanaged this replace Unmanaged replace Unmanaged  replaceUnmanaged replaceUnmanaged replaceUnmanaged setReplaceUnmanaged replaceUnmanaged replaceUnmanaged replaceUnmanaged
Register to receive notification of repository creation and disposal public void add Repository Listener ICVS Listener listener Known Repositories get Instance add Repository Listener listener  addRepositoryListener ICVSListener KnownRepositories getInstance addRepositoryListener
Register to receive notification of enablement of sync info decoration requirements This can be useful for providing lazy initialization of caches that are only required for decorating resource with CVS information public void add Decorator Enablement Listener ICVS Decorator Enablement Listener listener synchronized decorator Enablement Listeners decorator Enablement Listeners add listener  addDecoratorEnablementListener ICVSDecoratorEnablementListener decoratorEnablementListeners decoratorEnablementListeners
De register a listener public void remove Repository Listener ICVS Listener listener Known Repositories get Instance remove Repository Listener listener  removeRepositoryListener ICVSListener KnownRepositories getInstance removeRepositoryListener
De register the decorator enablement listener public void remove Decorator Enablement Listener ICVS Decorator Enablement Listener listener synchronized decorator Enablement Listeners decorator Enablement Listeners remove listener  removeDecoratorEnablementListener ICVSDecoratorEnablementListener decoratorEnablementListeners decoratorEnablementListeners
Return a list of the know repository locations This is left here to isolate the Rel Eng tools plugin from changes in CVS core public ICVS Repository Location get Known Repositories return Known Repositories get Instance get Repositories  RelEng ICVSRepositoryLocation getKnownRepositories KnownRepositories getInstance getRepositories
private void load Old State try I Path plugin State Location CVS Provider Plugin get Plugin get State Location append REPOSITORIES STATE FILE File file plugin State Location to File if file exists try Data Input Stream dis new Data Input Stream new File Input Stream file read Old State dis dis close The file is no longer needed as the state is persisted in the user settings file delete catch IO Exception e throw new Team Exception new Status Status ERROR CVS Provider Plugin ID Team Exception UNABLE Policy bind CVS Provider io Exception e NON NLS 1 catch Team Exception e Util log Error Policy bind CVS Provider error Loading e NON NLS 1  loadOldState IPath pluginStateLocation CVSProviderPlugin getPlugin getStateLocation REPOSITORIES_STATE_FILE pluginStateLocation toFile DataInputStream DataInputStream FileInputStream readOldState IOException TeamException CVSProviderPlugin TeamException CVSProvider ioException TeamException logError CVSProvider errorLoading
private void read Old State Data Input Stream dis throws IO Exception CVS Exception Known Repositories instance Known Repositories get Instance int count dis read Int if count 0 this is the version 1 format of the state file for int i 0 i count i ICVS Repository Location location instance get Repository dis readUTF instance add Repository location false no need to broadcast on startup else if count REPOSITORIES STATE FILE VERSION 2 count dis read Int for int i 0 i count i ICVS Repository Location location instance get Repository dis readUTF instance add Repository location false no need to broadcast on startup Read the next field which is no longer used dis readUTF else Util log Error Policy bind CVS Provider Plugin unknown State File Version new Integer count to String null NON NLS 1  readOldState DataInputStream IOException CVSException KnownRepositories KnownRepositories getInstance readInt ICVSRepositoryLocation getRepository addRepository REPOSITORIES_STATE_FILE_VERSION_2 readInt ICVSRepositoryLocation getRepository addRepository logError CVSProviderPlugin unknownStateFileVersion toString
public static boolean is Text I File file if CVS Provider Plugin get Plugin get Repositories Are Binary return false return Team get Type file Team TEXT  isText IFile CVSProviderPlugin getPlugin getRepositoriesAreBinary getType
Gets the determine Version Enabled return boolean public boolean is Determine Version Enabled return determine Version Enabled  determineVersionEnabled isDetermineVersionEnabled determineVersionEnabled
Sets the determine Version Enabled param determine Version Enabled The determine Version Enabled to set public void set Determine Version Enabled boolean determine Version Enabled this determine Version Enabled determine Version Enabled  determineVersionEnabled determineVersionEnabled determineVersionEnabled setDetermineVersionEnabled determineVersionEnabled determineVersionEnabled determineVersionEnabled
Returns the file Modification Manager return File Modification Manager public File Modification Manager get File Modification Manager return file Modification Manager  fileModificationManager FileModificationManager FileModificationManager getFileModificationManager fileModificationManager
return boolean public boolean is Watch Edit Enabled return get Plugin Preferences get Boolean CVS Provider Plugin READ ONLY  isWatchEditEnabled getPluginPreferences getBoolean CVSProviderPlugin READ_ONLY
public void set Debug Protocol boolean value Policy DEBUG CVS PROTOCOL value  setDebugProtocol DEBUG_CVS_PROTOCOL
public boolean is Debug Protocol return Policy DEBUG CVS PROTOCOL  isDebugProtocol DEBUG_CVS_PROTOCOL
private boolean create Crash File I Path plugin State Location CVS Provider Plugin get Plugin get State Location File crash File plugin State Location append CRASH INDICATION FILE to File if crash File exists return true try crash File create New File catch IO Exception e CVS Provider Plugin log I Status ERROR e get Message e return false  createCrashFile IPath pluginStateLocation CVSProviderPlugin getPlugin getStateLocation crashFile pluginStateLocation CRASH_INDICATION_FILE toFile crashFile crashFile createNewFile IOException CVSProviderPlugin IStatus getMessage
private void delete Crash File I Path plugin State Location CVS Provider Plugin get Plugin get State Location File crash File plugin State Location append CRASH INDICATION FILE to File crash File delete  deleteCrashFile IPath pluginStateLocation CVSProviderPlugin getPlugin getStateLocation crashFile pluginStateLocation CRASH_INDICATION_FILE toFile crashFile
public boolean crash On Last Run return crash  crashOnLastRun
Return the CVS preferences node in the instance scope public org osgi service prefs Preferences get Instance Preferences I Preferences Service service Platform get Preferences Service I Eclipse Preferences root service get Root Node return root node Instance Scope SCOPE node get Bundle get Symbolic Name  getInstancePreferences IPreferencesService getPreferencesService IEclipsePreferences getRootNode InstanceScope getBundle getSymbolicName
return Returns the use Platform Lineend public boolean is Use Platform Lineend return use Platform Lineend  usePlatformLineend isUsePlatformLineend usePlatformLineend
param use Platform Lineend The use Platform Lineend to set public void set Use Platform Lineend boolean use Platform Lineend this use Platform Lineend use Platform Lineend  usePlatformLineend usePlatformLineend setUsePlatformLineend usePlatformLineend usePlatformLineend usePlatformLineend

private boolean is Three Way public CVS Revision Number Compare Criteria boolean is Three Way this is Three Way is Three Way  isThreeWay CVSRevisionNumberCompareCriteria isThreeWay isThreeWay isThreeWay
public boolean compare Object e1 Object e2 if e1 instanceof I Resource e2 instanceof ICVS Remote Resource return compare I Resource e1 ICVS Remote Resource e2 else if e1 instanceof ICVS Remote Resource e2 instanceof ICVS Remote Resource return compare ICVS Remote Resource e1 ICVS Remote Resource e2 return false  IResource ICVSRemoteResource IResource ICVSRemoteResource ICVSRemoteResource ICVSRemoteResource ICVSRemoteResource ICVSRemoteResource
see Remote Sync Element timestamp Equals I Resource Variant I Resource Variant protected boolean compare ICVS Remote Resource e1 ICVS Remote Resource e2 if e1 is Container if e2 is Container return true return false return e1 equals e2  RemoteSyncElement timestampEquals IResourceVariant IResourceVariant ICVSRemoteResource ICVSRemoteResource isContainer isContainer
see Remote Sync Element timestamp Equals I Resource I Resource Variant protected boolean compare I Resource e1 ICVS Remote Resource e2 if e1 get Type I Resource FILE if e2 is Container return true return false ICVS File cvs File CVS Workspace Root getCVS File For I File e1 try byte sync Bytes1 cvs File get Sync Bytes byte sync Bytes2 ICVS Remote File e2 get Sync Bytes if sync Bytes1 null if Resource Sync Info is Deletion sync Bytes1 Resource Sync Info is Merge sync Bytes1 cvs File is Modified null return false return Resource Sync Info get Revision sync Bytes1 equals Resource Sync Info get Revision sync Bytes2 return false catch CVS Exception e CVS Provider Plugin log e return false  RemoteSyncElement timestampEquals IResource IResourceVariant IResource ICVSRemoteResource getType IResource isContainer ICVSFile cvsFile CVSWorkspaceRoot getCVSFileFor IFile syncBytes1 cvsFile getSyncBytes syncBytes2 ICVSRemoteFile getSyncBytes syncBytes1 ResourceSyncInfo isDeletion syncBytes1 ResourceSyncInfo isMerge syncBytes1 cvsFile isModified ResourceSyncInfo getRevision syncBytes1 ResourceSyncInfo getRevision syncBytes2 CVSException CVSProviderPlugin
see org eclipse team core subscribers I Comparison Criteria compare org eclipse core resources I Resource org eclipse team core subscribers I Subscriber Resource public boolean compare I Resource local I Resource Variant remote return compare local ICVS Remote Resource remote  IComparisonCriteria IResource ISubscriberResource IResource IResourceVariant ICVSRemoteResource
see org eclipse team core subscribers I Comparison Criteria compare org eclipse team core subscribers I Subscriber Resource org eclipse team core subscribers I Subscriber Resource public boolean compare I Resource Variant base I Resource Variant remote return compare ICVS Remote Resource base ICVS Remote Resource remote  IComparisonCriteria ISubscriberResource ISubscriberResource IResourceVariant IResourceVariant ICVSRemoteResource ICVSRemoteResource
see org eclipse team core subscribers I Subscriber Resource Comparator is Three Way public boolean is Three Way return is Three Way  ISubscriberResourceComparator isThreeWay isThreeWay isThreeWay

private ICVS Folder command Root public CVS Status int severity int code String message Throwable t super severity CVS Provider Plugin ID code message t  ICVSFolder commandRoot CVSStatus CVSProviderPlugin
public CVS Status int severity int code String message this severity code message null  CVSStatus
public CVS Status int severity int code ICVS Folder command Root String message this severity code message null this command Root command Root  CVSStatus ICVSFolder commandRoot commandRoot commandRoot
public CVS Status int severity String message Throwable t this severity 0 message t  CVSStatus
public CVS Status int severity String message this severity severity message null  CVSStatus
see I Status get Message public String get Message String message super get Message if command Root null message Policy bind CVS Status message With Root command Root get Name message NON NLS 1 return message  IStatus getMessage getMessage getMessage commandRoot CVSStatus messageWithRoot commandRoot getName

private Subscriber subscriber public CVS Sync Info I Resource local I Resource Variant base I Resource Variant remote Subscriber subscriber super local base remote Resource Variant Tree Subscriber subscriber get Resource Comparator this subscriber subscriber  CVSSyncInfo IResource IResourceVariant IResourceVariant ResourceVariantTreeSubscriber getResourceComparator
public Subscriber get Subscriber return subscriber  getSubscriber
protected int calculate Kind throws Team Exception special handling for folders the generic sync algorithm doesn t work well with CVS because folders are not in namespaces e g they exist in all versions and branches I Resource local get Local if local get Type I Resource FILE int folder Kind Sync Info IN SYNC ICVS Remote Folder remote ICVS Remote Folder get Remote ICVS Folder cvs Folder CVS Workspace Root getCVS Folder For I Container local boolean isCVS Folder false try isCVS Folder cvs Folder isCVS Folder catch CVS Exception e Assume the folder is not a CVS folder if local exists if remote null if isCVS Folder TODO This assumes all CVS folders are in sync even if they have been pruned folder Kind Sync Info IN SYNC else folder Kind Sync Info INCOMING Sync Info ADDITION else ignore conflicting deletion to keep phantom sync info else if remote null if isCVS Folder TODO This is not really an incoming deletion The folder will be pruned once any children are commited folder Kind Sync Info IN SYNC folder Kind Sync Info INCOMING Sync Info DELETION else folder Kind Sync Info OUTGOING Sync Info ADDITION else if isCVS Folder folder Kind Sync Info CONFLICTING Sync Info ADDITION else folder exists both locally and remotely and are considered in sync however we aren t checking the folder mappings to ensure that they are the same return folder Kind 1 Run the generic sync calculation algorithm then handle CVS specific sync cases int kind super calculate Kind 2 Set the CVS specific sync type based on the workspace sync state provided by the CVS server I Resource Variant remote get Remote if remote null kind Sync Info PSEUDO CONFLICT 0 Remote Resource cvs Remote Remote Resource remote int type cvs Remote get Workspace Sync State switch type the server compared both text files and decided that it cannot merge them without line conflicts case Update STATE CONFLICT return kind Sync Info MANUAL CONFLICT the server compared both text files and decided that it can safely merge them without line conflicts case Update STATE MERGEABLE CONFLICT return kind Sync Info AUTOMERGE CONFLICT 3 unmanage delete delete conflicts and return that they are in sync kind handle Deletion Conflicts kind return kind  calculateKind TeamException IResource getLocal getType IResource folderKind SyncInfo IN_SYNC ICVSRemoteFolder ICVSRemoteFolder getRemote ICVSFolder cvsFolder CVSWorkspaceRoot getCVSFolderFor IContainer isCVSFolder isCVSFolder cvsFolder isCVSFolder CVSException isCVSFolder folderKind SyncInfo IN_SYNC folderKind SyncInfo SyncInfo isCVSFolder folderKind SyncInfo IN_SYNC folderKind SyncInfo SyncInfo folderKind SyncInfo SyncInfo isCVSFolder folderKind SyncInfo SyncInfo folderKind calculateKind IResourceVariant getRemote SyncInfo PSEUDO_CONFLICT RemoteResource cvsRemote RemoteResource cvsRemote getWorkspaceSyncState STATE_CONFLICT SyncInfo MANUAL_CONFLICT STATE_MERGEABLE_CONFLICT SyncInfo AUTOMERGE_CONFLICT handleDeletionConflicts
protected int handle Deletion Conflicts int kind if kind Sync Info CONFLICTING Sync Info DELETION Sync Info PSEUDO CONFLICT try I Resource local get Local ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For local if cvs Resource is Folder cvs Resource is Managed cvs Resource unmanage null return Sync Info IN SYNC catch CVS Exception e CVS Provider Plugin log e return Sync Info CONFLICTING Sync Info DELETION return kind  handleDeletionConflicts SyncInfo SyncInfo SyncInfo PSEUDO_CONFLICT IResource getLocal ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor cvsResource isFolder cvsResource isManaged cvsResource SyncInfo IN_SYNC CVSException CVSProviderPlugin SyncInfo SyncInfo
public I Status make Outgoing I Progress Monitor monitor throws Team Exception For folders there is no outgoing only in sync if get Local get Type I Resource FOLDER return make In Sync int sync Kind get Kind boolean incoming sync Kind DIRECTION MASK INCOMING boolean outgoing sync Kind DIRECTION MASK OUTGOING ICVS Resource local CVS Workspace Root getCVS Resource For get Local Remote Resource remote Remote Resource get Remote Resource Sync Info orig Info local get Sync Info Mutable Resource Sync Info info null if orig Info null info orig Info clone Mutable if outgoing The sync info is alright it s already outgoing return Status OK STATUS else if incoming We have an incoming change addition or deletion that we want to ignore if local exists We could have an incoming change or deletion if remote null info set Added else Otherwise change the revision to the remote revision and dirty the file info set Revision remote get Sync Info get Revision info set Time Stamp null else We have an incoming add turn it around as an outgoing delete info remote get Sync Info clone Mutable info set Deleted true else if local exists We have a conflict and a local resource if get Remote null if get Base null We have a conflicting change Update the local revision info set Revision remote get Sync Info get Revision else try We have conflictin additions We need to fetch the contents of the remote to get all the relevant information timestamp permissions The most important thing we get is the keyword substitution mode which must be right to perform the commit remote get Storage Policy monitor For monitor get Contents info remote get Sync Info clone Mutable catch Core Exception e Team Exception as Team Exception e else if get Base null We have a remote deletion Make the local an addition info set Added else There s a local no base and no remote We can t possible have a conflict Assert is True false else We have a conflict and there is no local if get Remote null We have a local deletion that conflicts with remote changes info set Revision remote get Sync Info get Revision info set Deleted true else We have conflicting deletions Clear the sync info info null return Status OK STATUS if info null Folder Sync Info parent Info local get Parent get Folder Sync Info if parent Info null return new CVS Status I Status ERROR PARENT NOT MANAGED Policy bind CVS Sync Info 9 get Local get Full Path to String NON NLS 1 info set Tag parent Info get Tag ICVS File local set Sync Info info ICVS File UNKNOWN return Status OK STATUS  IStatus makeOutgoing IProgressMonitor TeamException getLocal getType IResource makeInSync syncKind getKind syncKind DIRECTION_MASK syncKind DIRECTION_MASK ICVSResource CVSWorkspaceRoot getCVSResourceFor getLocal RemoteResource RemoteResource getRemote ResourceSyncInfo origInfo getSyncInfo MutableResourceSyncInfo origInfo origInfo cloneMutable OK_STATUS setAdded setRevision getSyncInfo getRevision setTimeStamp getSyncInfo cloneMutable setDeleted getRemote getBase setRevision getSyncInfo getRevision getStorage monitorFor getContents getSyncInfo cloneMutable CoreException TeamException asTeamException getBase setAdded isTrue getRemote setRevision getSyncInfo getRevision setDeleted OK_STATUS FolderSyncInfo parentInfo getParent getFolderSyncInfo parentInfo CVSStatus IStatus PARENT_NOT_MANAGED CVSSyncInfo getLocal getFullPath toString setTag parentInfo getTag ICVSFile setSyncInfo ICVSFile OK_STATUS
public void make Incoming I Progress Monitor monitor throws Team Exception To make outgoing deletions incoming the local will not exist but it is still important to unmanage e g delete all meta info for the deletion CVS Workspace Root getCVS Resource For get Local unmanage monitor  makeIncoming IProgressMonitor TeamException CVSWorkspaceRoot getCVSResourceFor getLocal
public I Status make In Sync throws CVS Exception Only works on folders if get Local get Type I Resource FILE return new CVS Status I Status WARNING INVALID RESOURCE TYPE Policy bind CVS Sync Info 7 get Local get Full Path to String NON NLS 1 Only works on outgoing and conflicting changes boolean outgoing get Kind DIRECTION MASK OUTGOING if outgoing return new CVS Status I Status WARNING INVALID SYNC KIND Policy bind CVS Sync Info 8 get Local get Full Path to String NON NLS 1 The parent must be managed ICVS Folder local CVS Workspace Root getCVS Folder For I Container get Local if get Local get Type I Resource FOLDER local get Parent isCVS Folder return new CVS Status I Status ERROR PARENT NOT MANAGED Policy bind CVS Sync Info 9 get Local get Full Path to String NON NLS 1 Ensure that the folder exists locally if local exists local mkdir If the folder already has CVS info check that the remote and local match Remote Folder remote Remote Folder get Remote if local is Managed get Local get Type I Resource PROJECT local isCVS Folder If there s no remote assume everything is OK if remote null return Status OK STATUS Verify that the root and repository are the same Folder Sync Info remote Info remote get Folder Sync Info Folder Sync Info local Info local get Folder Sync Info if local Info get Root equals remote Info get Root return new CVS Status I Status ERROR SYNC INFO CONFLICTS Policy bind CVS Remote Sync Element root Differs new Object local get Name remote Info get Root local Info get Root NON NLS 1 else if local Info get Repository equals remote Info get Repository return new CVS Status I Status ERROR SYNC INFO CONFLICTS Policy bind CVS Remote Sync Element repository Differs new Object local get Name remote Info get Repository local Info get Repository NON NLS 1 The folders are in sync so just return return Status OK STATUS The remote must exist if the local is not managed if remote null return new CVS Status I Status ERROR REMOTE DOES NOT EXIST Policy bind CVS Sync Info 10 get Local get Full Path to String NON NLS 1 Since the parent is managed this will also set the resource sync info It is impossible for an incoming folder addition to map to another location in the repo so we assume that using the parent s folder sync as a basis is safe It is also impossible for an incomming folder to be static Folder Sync Info remote Info remote get Folder Sync Info Folder Sync Info local Info local get Parent get Folder Sync Info local set Folder Sync Info new Folder Sync Info remote Info get Repository remote Info get Root local Info get Tag false return Status OK STATUS  IStatus makeInSync CVSException getLocal getType IResource CVSStatus IStatus INVALID_RESOURCE_TYPE CVSSyncInfo getLocal getFullPath toString getKind DIRECTION_MASK CVSStatus IStatus INVALID_SYNC_KIND CVSSyncInfo getLocal getFullPath toString ICVSFolder CVSWorkspaceRoot getCVSFolderFor IContainer getLocal getLocal getType IResource getParent isCVSFolder CVSStatus IStatus PARENT_NOT_MANAGED CVSSyncInfo getLocal getFullPath toString RemoteFolder RemoteFolder getRemote isManaged getLocal getType IResource isCVSFolder OK_STATUS FolderSyncInfo remoteInfo getFolderSyncInfo FolderSyncInfo localInfo getFolderSyncInfo localInfo getRoot remoteInfo getRoot CVSStatus IStatus SYNC_INFO_CONFLICTS CVSRemoteSyncElement rootDiffers getName remoteInfo getRoot localInfo getRoot localInfo getRepository remoteInfo getRepository CVSStatus IStatus SYNC_INFO_CONFLICTS CVSRemoteSyncElement repositoryDiffers getName remoteInfo getRepository localInfo getRepository OK_STATUS CVSStatus IStatus REMOTE_DOES_NOT_EXIST CVSSyncInfo getLocal getFullPath toString FolderSyncInfo remoteInfo getFolderSyncInfo FolderSyncInfo localInfo getParent getFolderSyncInfo setFolderSyncInfo FolderSyncInfo remoteInfo getRepository remoteInfo getRoot localInfo getTag OK_STATUS
public String to String I Resource Variant base get Base I Resource Variant remote get Remote String Buffer result new String Buffer super to String result append Local NON NLS 1 result append get Local to String result append Base NON NLS 1 if base null result append none NON NLS 1 else result append base to String result append Remote NON NLS 1 if remote null result append none NON NLS 1 else result append remote to String return result to String  toString IResourceVariant getBase IResourceVariant getRemote StringBuffer StringBuffer toString getLocal toString toString toString toString
public String get Local Content Identifier try I Resource local get Local if local null local get Type I Resource FILE it s a file return the revision number if we can find one ICVS File cvs File CVS Workspace Root getCVS File For I File local Resource Sync Info info cvs File get Sync Info if info null return info get Revision catch CVS Exception e CVS Provider Plugin log e return null return null  getLocalContentIdentifier IResource getLocal getType IResource ICVSFile cvsFile CVSWorkspaceRoot getCVSFileFor IFile ResourceSyncInfo cvsFile getSyncInfo getRevision CVSException CVSProviderPlugin

CVS Sync Tree Subscriber Qualified Name id String name String description this id id this name name this description description this comparison Criteria new CVS Revision Number Compare Criteria is Three Way  CVSSyncTreeSubscriber QualifiedName comparisonCriteria CVSRevisionNumberCompareCriteria isThreeWay
see org eclipse team core sync I Sync Tree Subscriber get Id public Qualified Name get Id return id  ISyncTreeSubscriber getId QualifiedName getId
see org eclipse team core sync I Sync Tree Subscriber get Name public String get Name return name  ISyncTreeSubscriber getName getName
see org eclipse team core sync I Sync Tree Subscriber get Description public String get Description return description  ISyncTreeSubscriber getDescription getDescription
public Sync Info get Sync Info I Resource resource throws Team Exception if is Supervised resource return null if resource get Type I Resource FILE is Three Way return super get Sync Info resource else In CVS folders do not have a base Hence the remote is used as the base I Resource Variant remote Resource get Remote Tree get Resource Variant resource return get Sync Info resource remote Resource remote Resource  SyncInfo getSyncInfo IResource TeamException isSupervised getType IResource isThreeWay getSyncInfo IResourceVariant remoteResource getRemoteTree getResourceVariant getSyncInfo remoteResource remoteResource
public boolean is Supervised I Resource resource throws Team Exception try Repository Provider provider Repository Provider get Provider resource get Project CVS Provider Plugin get Type Id if provider null return false TODO what happens for resources that don t exist TODO is it proper to use ignored here ICVS Resource cvs Thing CVS Workspace Root getCVS Resource For resource if cvs Thing is Ignored An ignored resource could have an incoming addition conflict return get Remote Tree has Resource Variant resource return true catch Team Exception e If there is no resource in coe this measn there is no local and no remote so the resource is not supervised if e get Status get Code I Resource Status RESOURCE NOT FOUND return false throw e  isSupervised IResource TeamException RepositoryProvider RepositoryProvider getProvider getProject CVSProviderPlugin getTypeId ICVSResource cvsThing CVSWorkspaceRoot getCVSResourceFor cvsThing isIgnored getRemoteTree hasResourceVariant TeamException getStatus getCode IResourceStatus RESOURCE_NOT_FOUND
see org eclipse team core subscribers Team Subscriber get Default Comparison Criteria public I Resource Variant Comparator get Resource Comparator return comparison Criteria  TeamSubscriber getDefaultComparisonCriteria IResourceVariantComparator getResourceComparator comparisonCriteria
protected Sync Info get Sync Info I Resource local I Resource Variant base I Resource Variant remote throws Team Exception CVS Sync Info info new CVS Sync Info local base remote this info init return info  SyncInfo getSyncInfo IResource IResourceVariant IResourceVariant TeamException CVSSyncInfo CVSSyncInfo
Indicate whether file contents should be cached on a refresh protected boolean get Cache File Contents Hint return false  getCacheFileContentsHint
Indicate whether the subscriber is two way or three way protected boolean is Three Way return true  isThreeWay
protected boolean roots Equal Subscriber other Set roots1 new Hash Set Arrays as List other roots Set roots2 new Hash Set Arrays as List roots if roots1 size roots2 size return false return roots2 contains All roots1  rootsEqual HashSet asList HashSet asList containsAll

private static final String DATE TAG NAME FORMAT dd MMM yyyy HH mm ss Z NON NLS 1 private static final Simple Date Format tag Name Format new Simple Date Format DATE TAG NAME FORMAT Locale US protected static synchronized String date To Tag Name Date date tag Name Format set Time Zone Time Zone get Time Zone GMT NON NLS 1 return tag Name Format format date NON NLS 1  DATE_TAG_NAME_FORMAT SimpleDateFormat tagNameFormat SimpleDateFormat DATE_TAG_NAME_FORMAT dateToTagName tagNameFormat setTimeZone TimeZone getTimeZone tagNameFormat
protected static Date tag Name To Date String name if name null return null try return tag Name Format parse name catch Parse Exception e CVS Provider Plugin log new CVS Exception Tag name name is not of the expected format DATE TAG NAME FORMAT e NON NLS 1 NON NLS 2 return null  tagNameToDate tagNameFormat ParseException CVSProviderPlugin CVSException DATE_TAG_NAME_FORMAT
public CVS Tag this HEAD HEAD NON NLS 1  CVSTag
public CVS Tag String name int type this name name this type type  CVSTag
Write a date in local date tag format public CVS Tag Date date this date To Tag Name date DATE  CVSTag dateToTagName
public boolean equals Object other if other this return true if other instanceof CVS Tag return false CVS Tag tag CVS Tag other if get Type tag get Type return false if get Name equals tag get Name return false return true  CVSTag CVSTag CVSTag getType getType getName getName
public String get Name return name  getName
public int get Type TODO get Type will not return accurate types for Tags retrieved from the local CVS Entries file See Bug 36758 return type  getType getType
public int hash Code return name hash Code  hashCode hashCode
public int compare To CVS Tag other if get Type DATE other get Type DATE Date date1 as Date Date date2 other as Date if date1 null date2 null return 1 return date1 compare To date2 return get Name compare To other get Name  compareTo CVSTag getType getType asDate asDate compareTo getName compareTo getName
public static boolean equal Tags CVS Tag tag1 CVS Tag tag2 if tag1 null tag1 CVS Tag DEFAULT if tag2 null tag2 CVS Tag DEFAULT return tag1 equals tag2  equalTags CVSTag CVSTag CVSTag CVSTag
public static I Status validate Tag Name String tag Name if tag Name null return new CVS Status CVS Status ERROR Policy bind CVS Tag null Name NON NLS 1 if tag Name equals NON NLS 1 return new CVS Status CVS Status ERROR Policy bind CVS Tag empty Name NON NLS 1 if Character is Letter tag Name char At 0 return new CVS Status CVS Status ERROR Policy bind CVS Tag begin Name NON NLS 1 for int i 0 i tag Name length i char c tag Name char At i if Character is Space Char c c c c c c c c return new CVS Status CVS Status ERROR Policy bind CVS Tag bad Char Name NON NLS 1 return new CVS Status CVS Status OK Policy bind ok NON NLS 1  IStatus validateTagName tagName tagName CVSStatus CVSStatus CVSTag nullName tagName CVSStatus CVSStatus CVSTag emptyName isLetter tagName charAt CVSStatus CVSStatus CVSTag beginName tagName tagName charAt isSpaceChar CVSStatus CVSStatus CVSTag badCharName CVSStatus CVSStatus
Return the date this tag represents or code null code if the tag is not of type DATE return the date of the tag or code null code public Date as Date return tag Name To Date name  asDate tagNameToDate

private static final Resource Rule Factory RESOURCE RULE FACTORY new Resource Rule Factory public I Scheduling Rule validate Edit Rule I Resource resources if resources length 0 return null optimize rule for single file if resources length 1 return resources 0 is Read Only parent resources 0 null need a lock on the parents of all read only files Hash Set rules new Hash Set for int i 0 i resources length i if resources i is Read Only rules add parent resources i if rules is Empty return null if rules size 1 return I Scheduling Rule rules iterator next I Scheduling Rule rule Array I Scheduling Rule rules to Array new I Scheduling Rule rules size return new Multi Rule rule Array  ResourceRuleFactory RESOURCE_RULE_FACTORY ResourceRuleFactory ISchedulingRule validateEditRule IResource isReadOnly HashSet HashSet isReadOnly isEmpty ISchedulingRule ISchedulingRule ruleArray ISchedulingRule toArray ISchedulingRule MultiRule ruleArray
private static I File Modification Validator get Plugged In Validator I Extension extensions Platform get Plugin Registry get Extension Point CVS Provider Plugin ID CVS Provider Plugin PT FILE MODIFICATION VALIDATOR get Extensions if extensions length 0 return null I Extension extension extensions 0 I Configuration Element configs extension get Configuration Elements if configs length 0 CVS Provider Plugin log I Status ERROR Policy bind CVS Adapter no Configuration Element new Object extension get Unique Identifier null NON NLS 1 return null try I Configuration Element config configs 0 return I File Modification Validator config create Executable Extension run NON NLS 1 catch Core Exception ex CVS Provider Plugin log I Status ERROR Policy bind CVS Adapter unable To Instantiate new Object extension get Unique Identifier ex NON NLS 1 return null  IFileModificationValidator getPluggedInValidator IExtension getPluginRegistry getExtensionPoint CVSProviderPlugin CVSProviderPlugin PT_FILE_MODIFICATION_VALIDATOR getExtensions IExtension IConfigurationElement getConfigurationElements CVSProviderPlugin IStatus CVSAdapter noConfigurationElement getUniqueIdentifier IConfigurationElement IFileModificationValidator createExecutableExtension CoreException CVSProviderPlugin IStatus CVSAdapter unableToInstantiate getUniqueIdentifier
No arg Constructor for I Project Nature conformance public CVS Team Provider  IProjectNature CVSTeamProvider
see org eclipse core resources I Project Nature deconfigure public void deconfigure  IProjectNature
public void deconfigured when a nature is removed from the project notify the synchronizer that we no longer need the sync info cached This does not affect the actual CVS meta directories on disk and will remain unless a client calls unmanage try Eclipse Synchronizer get Instance deconfigure get Project null internal Set Watch Edit Enabled null internal Set Fetch Absent Directories null catch CVS Exception e Log the exception and let the disconnect continue CVS Provider Plugin log e Resource State Change Listeners get Listener project Deconfigured get Project  EclipseSynchronizer getInstance getProject internalSetWatchEditEnabled internalSetFetchAbsentDirectories CVSException CVSProviderPlugin ResourceStateChangeListeners getListener projectDeconfigured getProject
see I Project Nature get Project public I Project get Project return project  IProjectNature getProject IProject getProject
see I Project Nature set Project I Project public void set Project I Project project this project project try this workspace Root new CVS Workspace Root project Ensure that the project has CVS info if workspace Root get Local Root get Folder Sync Info null CVS Provider Plugin log new CVS Exception new CVS Status CVS Status ERROR Policy bind CVS Team Provider no Folder Info project get Name NON NLS 1 catch CVS Exception e Ignore exceptions here They will be surfaced elsewhere  IProjectNature setProject IProject setProject IProject workspaceRoot CVSWorkspaceRoot workspaceRoot getLocalRoot getFolderSyncInfo CVSProviderPlugin CVSException CVSStatus CVSStatus CVSTeamProvider noFolderInfo getName CVSException
Diff the resources with the repository and write the output to the provided Print Stream in a form that is usable as a patch The patch is rooted at the project public void diff I Resource resource Local Option options Print Stream stream I Progress Monitor progress throws Team Exception boolean include New Files false boolean do Not Recurse false int format STANDARD FORMAT Determine the command root and arguments arguments list ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource ICVS Folder command Root String arguments if cvs Resource is Folder command Root ICVS Folder cvs Resource arguments new String Session CURRENT LOCAL FOLDER else command Root cvs Resource get Parent arguments new String cvs Resource get Name Session s new Session workspace Root get Remote Location command Root progress begin Task null 100 try s open Policy sub Monitor For progress 20 false read only Command DIFF execute s Command NO GLOBAL OPTIONS options arguments new Diff Listener stream Policy sub Monitor For progress 80 finally s close progress done Append our diff output to the server diff output Our diff output includes new files and new files in new directories for int i 0 i options length i Local Option option options i if option equals Diff INCLUDE NEWFILES include New Files true else if option equals Diff DO NOT RECURSE do Not Recurse true else if option equals Diff UNIFIED FORMAT format UNIFIED FORMAT else if option equals Diff CONTEXT FORMAT format CONTEXT FORMAT if include New Files new File Diff command Root stream do Not Recurse format  PrintStream IResource LocalOption PrintStream IProgressMonitor TeamException includeNewFiles doNotRecurse STANDARD_FORMAT ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor ICVSFolder commandRoot cvsResource isFolder commandRoot ICVSFolder cvsResource CURRENT_LOCAL_FOLDER commandRoot cvsResource getParent cvsResource getName workspaceRoot getRemoteLocation commandRoot beginTask subMonitorFor NO_GLOBAL_OPTIONS DiffListener subMonitorFor LocalOption INCLUDE_NEWFILES includeNewFiles DO_NOT_RECURSE doNotRecurse UNIFIED_FORMAT UNIFIED_FORMAT CONTEXT_FORMAT CONTEXT_FORMAT includeNewFiles newFileDiff commandRoot doNotRecurse
resource accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception if file is Ignored file is Managed add File To Diff resource file stream format  ICVSResourceVisitor visitFile ICVSFile CVSException isIgnored isManaged addFileToDiff
public void visit Folder ICVS Folder folder throws CVS Exception Even if we are not supposed to recurse we still need to go into the root directory if folder exists folder is Ignored do Not Recurse folder equals resource return else folder accept Children this  visitFolder ICVSFolder CVSException isIgnored doNotRecurse acceptChildren
This diff adds new files and directories to the stream param resource param stream param do Not Recurse param format throws CVS Exception private void new File Diff final ICVS Folder resource final Print Stream stream final boolean do Not Recurse final int format throws CVS Exception resource accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception if file is Ignored file is Managed add File To Diff resource file stream format public void visit Folder ICVS Folder folder throws CVS Exception Even if we are not supposed to recurse we still need to go into the root directory if folder exists folder is Ignored do Not Recurse folder equals resource return else folder accept Children this  doNotRecurse CVSException newFileDiff ICVSFolder PrintStream doNotRecurse CVSException ICVSResourceVisitor visitFile ICVSFile CVSException isIgnored isManaged addFileToDiff visitFolder ICVSFolder CVSException isIgnored doNotRecurse acceptChildren
private void add File To Diff ICVS Folder cmd Root ICVS File file Print Stream stream int format throws CVS Exception String null File Prefix NON NLS 1 String new File Prefix NON NLS 1 String position Info NON NLS 1 String line Prefix NON NLS 1 String path String file get Relative Path cmd Root Buffered Reader file Reader new Buffered Reader new Input Stream Reader file get Contents int lines 0 try while file Reader read Line null lines file Reader close switch format case UNIFIED FORMAT null File Prefix NON NLS 1 new File Prefix NON NLS 1 position Info 0 0 1 lines NON NLS 1 NON NLS 2 line Prefix NON NLS 1 break case CONTEXT FORMAT null File Prefix NON NLS 1 new File Prefix NON NLS 1 position Info 1 lines NON NLS 1 NON NLS 2 line Prefix NON NLS 1 break default position Info 0a1 lines NON NLS 1 line Prefix NON NLS 1 break file Reader new Buffered Reader new Input Stream Reader file get Contents stream println Index path String NON NLS 1 stream println NON NLS 1 stream println RCS file path String NON NLS 1 stream println diff N path String NON NLS 1 if lines 0 if format STANDARD FORMAT stream println null File Prefix dev null1 Jan 1970 00 00 00 0000 NON NLS 1 Technically this date should be the local file date but nobody really cares stream println new File Prefix path String 1 Jan 1970 00 00 00 0000 NON NLS 1 if format CONTEXT FORMAT stream println NON NLS 1 stream println 0 NON NLS 1 stream println position Info for int i 0 i lines i stream print line Prefix stream println file Reader read Line catch IO Exception e throw CVS Exception wrap Exception file getI Resource Policy bind CVS Team Provider error Adding File To Diff path String e NON NLS 1 finally try file Reader close catch IO Exception e1  addFileToDiff ICVSFolder cmdRoot ICVSFile PrintStream CVSException nullFilePrefix newFilePrefix positionInfo linePrefix pathString getRelativePath cmdRoot BufferedReader fileReader BufferedReader InputStreamReader getContents fileReader readLine fileReader UNIFIED_FORMAT nullFilePrefix newFilePrefix positionInfo linePrefix CONTEXT_FORMAT nullFilePrefix newFilePrefix positionInfo linePrefix positionInfo linePrefix fileReader BufferedReader InputStreamReader getContents pathString pathString pathString STANDARD_FORMAT nullFilePrefix newFilePrefix pathString CONTEXT_FORMAT positionInfo linePrefix fileReader readLine IOException CVSException wrapException getIResource CVSTeamProvider errorAddingFileToDiff pathString fileReader IOException
Return the remote location to which the receiver s project is mapped public ICVS Repository Location get Remote Location throws CVS Exception try return workspace Root get Remote Location catch CVS Exception e If we can t get the remote location we should disconnect since nothing can be done with the provider try Repository Provider unmap project catch Team Exception ex CVS Provider Plugin log ex We need to trigger a decorator refresh throw e  ICVSRepositoryLocation getRemoteLocation CVSException workspaceRoot getRemoteLocation CVSException RepositoryProvider TeamException CVSProviderPlugin
Set the comment to be used on the next checkin public void set Comment String comment this comment comment  setComment
see I Team Provider is Dirty I Resource public boolean is Dirty I Resource resource Assert is True false return false  ITeamProvider isDirty IResource isDirty IResource isTrue
public CVS Workspace Root getCVS Workspace Root return workspace Root  CVSWorkspaceRoot getCVSWorkspaceRoot workspaceRoot
private void check Is Child I Resource resource throws CVS Exception if is Child Resource resource throw new CVS Exception new Status I Status ERROR CVS Provider Plugin ID Team Exception UNABLE Policy bind CVS Team Provider invalid Resource NON NLS 1 new Object resource get Full Path to String project get Name null  checkIsChild IResource CVSException isChildResource CVSException IStatus CVSProviderPlugin TeamException CVSTeamProvider invalidResource getFullPath toString getName
private String get Valid Arguments I Resource resources Local Option options throws CVS Exception List arguments new Array List resources length for int i 0 i resources length i check Is Child resources i I Path cvs Path resources i get Full Path remove First Segments 1 if cvs Path segment Count 0 arguments add Session CURRENT LOCAL FOLDER else arguments add cvs Path to String return String arguments to Array new String arguments size  getValidArguments IResource LocalOption CVSException ArrayList checkIsChild IPath cvsPath getFullPath removeFirstSegments cvsPath segmentCount CURRENT_LOCAL_FOLDER cvsPath toString toArray
private ICVS Resource getCVS Arguments I Resource resources ICVS Resource cvs Resources new ICVS Resource resources length for int i 0 i cvs Resources length i cvs Resources i CVS Workspace Root getCVS Resource For resources i return cvs Resources  ICVSResource getCVSArguments IResource ICVSResource cvsResources ICVSResource cvsResources cvsResources CVSWorkspaceRoot getCVSResourceFor cvsResources
Visit all the children folders in order to set the root in the folder sync info workspace Root get Local Root accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception  workspaceRoot getLocalRoot ICVSResourceVisitor visitFile ICVSFile CVSException
public void visit File ICVS File file throws CVS Exception public void visit Folder ICVS Folder folder throws CVS Exception monitor worked 1 Folder Sync Info info folder get Folder Sync Info if info null monitor sub Task Policy bind CVS Team Provider updating Folder info get Repository NON NLS 1 folder set Folder Sync Info new Folder Sync Info info get Repository root info get Tag info get Is Static folder accept Children this  visitFile ICVSFile CVSException visitFolder ICVSFolder CVSException FolderSyncInfo getFolderSyncInfo subTask CVSTeamProvider updatingFolder getRepository setFolderSyncInfo FolderSyncInfo getRepository getTag getIsStatic acceptChildren
workspace Root get Local Root run new ICVS Runnable public void run I Progress Monitor progress throws CVS Exception try 256 ticks gives us a maximum of 1024 which seems reasonable for folders is a project progress begin Task null 100 final I Progress Monitor monitor Policy infinite Sub Monitor For progress 100 monitor begin Task Policy bind CVS Team Provider folder Info project get Name 256 NON NLS 1 Visit all the children folders in order to set the root in the folder sync info workspace Root get Local Root accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception public void visit Folder ICVS Folder folder throws CVS Exception monitor worked 1 Folder Sync Info info folder get Folder Sync Info if info null monitor sub Task Policy bind CVS Team Provider updating Folder info get Repository NON NLS 1 folder set Folder Sync Info new Folder Sync Info info get Repository root info get Tag info get Is Static folder accept Children this finally progress done  workspaceRoot getLocalRoot ICVSRunnable IProgressMonitor CVSException beginTask IProgressMonitor infiniteSubMonitorFor beginTask CVSTeamProvider folderInfo getName workspaceRoot getLocalRoot ICVSResourceVisitor visitFile ICVSFile CVSException visitFolder ICVSFolder CVSException FolderSyncInfo getFolderSyncInfo subTask CVSTeamProvider updatingFolder getRepository setFolderSyncInfo FolderSyncInfo getRepository getTag getIsStatic acceptChildren
public void set Remote Root ICVS Repository Location location I Progress Monitor monitor throws Team Exception Check if there is a differnece between the new and old roots final String root location get Location if root equals workspace Root get Remote Location return try workspace Root get Local Root run new ICVS Runnable public void run I Progress Monitor progress throws CVS Exception try 256 ticks gives us a maximum of 1024 which seems reasonable for folders is a project progress begin Task null 100 final I Progress Monitor monitor Policy infinite Sub Monitor For progress 100 monitor begin Task Policy bind CVS Team Provider folder Info project get Name 256 NON NLS 1 Visit all the children folders in order to set the root in the folder sync info workspace Root get Local Root accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception public void visit Folder ICVS Folder folder throws CVS Exception monitor worked 1 Folder Sync Info info folder get Folder Sync Info if info null monitor sub Task Policy bind CVS Team Provider updating Folder info get Repository NON NLS 1 folder set Folder Sync Info new Folder Sync Info info get Repository root info get Tag info get Is Static folder accept Children this finally progress done monitor finally monitor done  setRemoteRoot ICVSRepositoryLocation IProgressMonitor TeamException getLocation workspaceRoot getRemoteLocation workspaceRoot getLocalRoot ICVSRunnable IProgressMonitor CVSException beginTask IProgressMonitor infiniteSubMonitorFor beginTask CVSTeamProvider folderInfo getName workspaceRoot getLocalRoot ICVSResourceVisitor visitFile ICVSFile CVSException visitFolder ICVSFolder CVSException FolderSyncInfo getFolderSyncInfo subTask CVSTeamProvider updatingFolder getRepository setFolderSyncInfo FolderSyncInfo getRepository getTag getIsStatic acceptChildren
Helper to indicate if the resource is a child of the receiver s project private boolean is Child Resource I Resource resource return resource get Project get Name equals project get Name  isChildResource IResource getProject getName getName
public void configure Project throws Core Exception Resource State Change Listeners get Listener project Configured get Project  configureProject CoreException ResourceStateChangeListeners getListener projectConfigured getProject
workspace Root get Local Root run new ICVS Runnable public void run final I Progress Monitor monitor throws CVS Exception final Map from K Subst Option to List of String files To Admin new Hash Map final List of ICVS Resource files To Commit new Array List final Collection of ICVS File files To Commit As Text new Hash Set need fast lookup final boolean useCRLF IS CRLF PLATFORM CVS Provider Plugin get Plugin is Use Platform Lineend determine the resources to be committed and or admin d for Iterator it change Set entry Set iterator it has Next Map Entry entry Map Entry it next I File file I File entry get Key K Subst Option toK Subst K Subst Option entry get Value only set keyword substitution if resource is a managed file check Is Child file ICVS File m File CVS Workspace Root getCVS File For file if m File is Managed continue only set keyword substitution if new differs from actual byte sync Bytes m File get Sync Bytes K Subst Option fromK Subst Resource Sync Info get Keyword Mode sync Bytes if toK Subst equals fromK Subst continue change resource sync info immediately for an outgoing addition if Resource Sync Info is Addition sync Bytes m File set Sync Bytes Resource Sync Info set Keyword Mode sync Bytes toK Subst ICVS File UNKNOWN continue nothing do to for deletions if Resource Sync Info is Deletion sync Bytes continue file exists remotely so we ll have to commit it if fromK Subst is Binary toK Subst is Binary converting from binary to text clean Line Delimiters file useCRLF new Null Progress Monitor XXX need better progress monitoring remember to commit the cleaned resource as text before admin files To Commit As Text add m File force a commit to bump the revision number make Dirty file files To Commit add m File remember to admin the resource List list List files To Admin get toK Subst if list null list new Array List files To Admin put toK Subst list list add m File commit then admin the resources compute the total work to be performed int total Work files To Commit size 1 for Iterator it files To Admin values iterator it has Next List list List it next total Work list size total Work 1 Add 1 for each connection that needs to be made if total Work 0 monitor begin Task Policy bind CVS Team Provider settingK Subst total Work NON NLS 1 try commit files that changed from binary to text NOTE The files are committed as text with conversions even if the resource sync info still says binary if files To Commit size 0 Session session new Session workspace Root get Remote Location workspace Root get Local Root true output to console session open Policy sub Monitor For monitor 1 true open for modification try String keyword Change Comment comment if keyword Change Comment null keyword Change Comment length 0 keyword Change Comment Policy bind CVS Team Provider changing Keyword Comment NON NLS 1 result 0 Command COMMIT execute session Command NO GLOBAL OPTIONS new Local Option Commit DO NOT RECURSE Commit FORCE Commit make Argument Option Command MESSAGE OPTION keyword Change Comment ICVS Resource files To Commit to Array new ICVS Resource files To Commit size files To Commit As Text null Policy sub Monitor For monitor files To Commit size finally session close if errors were encountered abort if result 0 isOK return admin files that changed keyword substitution mode NOTE As confirmation of the completion of a command the server replies with the RCS command output if a change took place Rather than assume that the command succeeded we listen for these lines and update the local Resource Sync Info for the particular files that were actually changed remotely for Iterator it files To Admin entry Set iterator it has Next Map Entry entry Map Entry it next final K Subst Option toK Subst K Subst Option entry get Key final List list List entry get Value do it Session session new Session workspace Root get Remote Location workspace Root get Local Root true output to console session open Policy sub Monitor For monitor 1 true open for modification try result 0 Command ADMIN execute session Command NO GLOBAL OPTIONS new Local Option toK Subst ICVS Resource list to Array new ICVS Resource list size new AdminK Subst Listener toK Subst Policy sub Monitor For monitor list size finally session close if errors were encountered abort if result 0 isOK return finally monitor done  workspaceRoot getLocalRoot ICVSRunnable IProgressMonitor CVSException KSubstOption filesToAdmin HashMap ICVSResource filesToCommit ArrayList ICVSFile filesToCommitAsText HashSet IS_CRLF_PLATFORM CVSProviderPlugin getPlugin isUsePlatformLineend changeSet entrySet hasNext IFile IFile getKey KSubstOption toKSubst KSubstOption getValue checkIsChild ICVSFile mFile CVSWorkspaceRoot getCVSFileFor mFile isManaged syncBytes mFile getSyncBytes KSubstOption fromKSubst ResourceSyncInfo getKeywordMode syncBytes toKSubst fromKSubst ResourceSyncInfo isAddition syncBytes mFile setSyncBytes ResourceSyncInfo setKeywordMode syncBytes toKSubst ICVSFile ResourceSyncInfo isDeletion syncBytes fromKSubst isBinary toKSubst isBinary cleanLineDelimiters NullProgressMonitor filesToCommitAsText mFile makeDirty filesToCommit mFile filesToAdmin toKSubst ArrayList filesToAdmin toKSubst mFile totalWork filesToCommit filesToAdmin hasNext totalWork totalWork totalWork beginTask CVSTeamProvider settingKSubst totalWork filesToCommit workspaceRoot getRemoteLocation workspaceRoot getLocalRoot subMonitorFor keywordChangeComment keywordChangeComment keywordChangeComment keywordChangeComment CVSTeamProvider changingKeywordComment NO_GLOBAL_OPTIONS LocalOption DO_NOT_RECURSE makeArgumentOption MESSAGE_OPTION keywordChangeComment ICVSResource filesToCommit toArray ICVSResource filesToCommit filesToCommitAsText subMonitorFor filesToCommit ResourceSyncInfo filesToAdmin entrySet hasNext KSubstOption toKSubst KSubstOption getKey getValue workspaceRoot getRemoteLocation workspaceRoot getLocalRoot subMonitorFor NO_GLOBAL_OPTIONS LocalOption toKSubst ICVSResource toArray ICVSResource AdminKSubstListener toKSubst subMonitorFor
Sets the keyword substitution mode for the specified resources p Applies the following rules in order br ul li If a file is not managed skips it li li If a file is not changing modes skips it li li If a file is being changed from binary to text corrects line delimiters then commits it then admins it li li If a file is added changes the resource sync information locally li li Otherwise commits the file with FORCE to create a new revision then admins it li ul All files that are admin d are committed with FORCE to prevent other developers from casually trying to commit pending changes to the repository without first checking out a new copy This is not a perfect solution as they could just as easily do an UPDATE and not obtain the new keyword sync info p param change Set a map from I File to K Subst Option param monitor the progress monitor return a status code indicating success or failure of the operation throws Team Exception public I Status set Keyword Substitution final Map from I File to K Subst Option change Set final String comment I Progress Monitor monitor throws Team Exception final I Status result new I Status I Command Output Listener OK workspace Root get Local Root run new ICVS Runnable public void run final I Progress Monitor monitor throws CVS Exception final Map from K Subst Option to List of String files To Admin new Hash Map final List of ICVS Resource files To Commit new Array List final Collection of ICVS File files To Commit As Text new Hash Set need fast lookup final boolean useCRLF IS CRLF PLATFORM CVS Provider Plugin get Plugin is Use Platform Lineend determine the resources to be committed and or admin d for Iterator it change Set entry Set iterator it has Next Map Entry entry Map Entry it next I File file I File entry get Key K Subst Option toK Subst K Subst Option entry get Value only set keyword substitution if resource is a managed file check Is Child file ICVS File m File CVS Workspace Root getCVS File For file if m File is Managed continue only set keyword substitution if new differs from actual byte sync Bytes m File get Sync Bytes K Subst Option fromK Subst Resource Sync Info get Keyword Mode sync Bytes if toK Subst equals fromK Subst continue change resource sync info immediately for an outgoing addition if Resource Sync Info is Addition sync Bytes m File set Sync Bytes Resource Sync Info set Keyword Mode sync Bytes toK Subst ICVS File UNKNOWN continue nothing do to for deletions if Resource Sync Info is Deletion sync Bytes continue file exists remotely so we ll have to commit it if fromK Subst is Binary toK Subst is Binary converting from binary to text clean Line Delimiters file useCRLF new Null Progress Monitor XXX need better progress monitoring remember to commit the cleaned resource as text before admin files To Commit As Text add m File force a commit to bump the revision number make Dirty file files To Commit add m File remember to admin the resource List list List files To Admin get toK Subst if list null list new Array List files To Admin put toK Subst list list add m File commit then admin the resources compute the total work to be performed int total Work files To Commit size 1 for Iterator it files To Admin values iterator it has Next List list List it next total Work list size total Work 1 Add 1 for each connection that needs to be made if total Work 0 monitor begin Task Policy bind CVS Team Provider settingK Subst total Work NON NLS 1 try commit files that changed from binary to text NOTE The files are committed as text with conversions even if the resource sync info still says binary if files To Commit size 0 Session session new Session workspace Root get Remote Location workspace Root get Local Root true output to console session open Policy sub Monitor For monitor 1 true open for modification try String keyword Change Comment comment if keyword Change Comment null keyword Change Comment length 0 keyword Change Comment Policy bind CVS Team Provider changing Keyword Comment NON NLS 1 result 0 Command COMMIT execute session Command NO GLOBAL OPTIONS new Local Option Commit DO NOT RECURSE Commit FORCE Commit make Argument Option Command MESSAGE OPTION keyword Change Comment ICVS Resource files To Commit to Array new ICVS Resource files To Commit size files To Commit As Text null Policy sub Monitor For monitor files To Commit size finally session close if errors were encountered abort if result 0 isOK return admin files that changed keyword substitution mode NOTE As confirmation of the completion of a command the server replies with the RCS command output if a change took place Rather than assume that the command succeeded we listen for these lines and update the local Resource Sync Info for the particular files that were actually changed remotely for Iterator it files To Admin entry Set iterator it has Next Map Entry entry Map Entry it next final K Subst Option toK Subst K Subst Option entry get Key final List list List entry get Value do it Session session new Session workspace Root get Remote Location workspace Root get Local Root true output to console session open Policy sub Monitor For monitor 1 true open for modification try result 0 Command ADMIN execute session Command NO GLOBAL OPTIONS new Local Option toK Subst ICVS Resource list to Array new ICVS Resource list size new AdminK Subst Listener toK Subst Policy sub Monitor For monitor list size finally session close if errors were encountered abort if result 0 isOK return finally monitor done Policy monitor For monitor return result 0  changeSet IFile KSubstOption TeamException IStatus setKeywordSubstitution IFile KSubstOption changeSet IProgressMonitor TeamException IStatus IStatus ICommandOutputListener workspaceRoot getLocalRoot ICVSRunnable IProgressMonitor CVSException KSubstOption filesToAdmin HashMap ICVSResource filesToCommit ArrayList ICVSFile filesToCommitAsText HashSet IS_CRLF_PLATFORM CVSProviderPlugin getPlugin isUsePlatformLineend changeSet entrySet hasNext IFile IFile getKey KSubstOption toKSubst KSubstOption getValue checkIsChild ICVSFile mFile CVSWorkspaceRoot getCVSFileFor mFile isManaged syncBytes mFile getSyncBytes KSubstOption fromKSubst ResourceSyncInfo getKeywordMode syncBytes toKSubst fromKSubst ResourceSyncInfo isAddition syncBytes mFile setSyncBytes ResourceSyncInfo setKeywordMode syncBytes toKSubst ICVSFile ResourceSyncInfo isDeletion syncBytes fromKSubst isBinary toKSubst isBinary cleanLineDelimiters NullProgressMonitor filesToCommitAsText mFile makeDirty filesToCommit mFile filesToAdmin toKSubst ArrayList filesToAdmin toKSubst mFile totalWork filesToCommit filesToAdmin hasNext totalWork totalWork totalWork beginTask CVSTeamProvider settingKSubst totalWork filesToCommit workspaceRoot getRemoteLocation workspaceRoot getLocalRoot subMonitorFor keywordChangeComment keywordChangeComment keywordChangeComment keywordChangeComment CVSTeamProvider changingKeywordComment NO_GLOBAL_OPTIONS LocalOption DO_NOT_RECURSE makeArgumentOption MESSAGE_OPTION keywordChangeComment ICVSResource filesToCommit toArray ICVSResource filesToCommit filesToCommitAsText subMonitorFor filesToCommit ResourceSyncInfo filesToAdmin entrySet hasNext KSubstOption toKSubst KSubstOption getKey getValue workspaceRoot getRemoteLocation workspaceRoot getLocalRoot subMonitorFor NO_GLOBAL_OPTIONS LocalOption toKSubst ICVSResource toArray ICVSResource AdminKSubstListener toKSubst subMonitorFor monitorFor
This method translates the contents of a file from binary into text ASCII Fixes the line delimiters in the local file to reflect the platform s native encoding Performs CR LF LF or LF CR LF conversion depending on the platform but does not affect delimiters that are already correctly encoded public static void clean Line Delimiters I File file boolean useCRLF I Progress Monitor progress throws CVS Exception try convert delimiters in memory Byte Array Output Stream bos new Byte Array Output Stream Input Stream is new Buffered Input Stream file get Contents try Always convert CR LF into L Fs is new CRL FtoLF Input Stream is if useCRLF For CR LF platforms translate L Fs to CR L Fs is new L FtoCRLF Input Stream is for int b b is read 1 bos write b bos close finally is close write file back to disk with corrected delimiters if changes were made Byte Array Input Stream bis new Byte Array Input Stream bos to Byte Array file set Contents bis false force false keep History progress catch Core Exception e throw CVS Exception wrap Exception file Policy bind CVS Team Provider clean Line Delimiters Exception e NON NLS 1 catch IO Exception e throw CVS Exception wrap Exception file Policy bind CVS Team Provider clean Line Delimiters Exception e NON NLS 1  cleanLineDelimiters IFile IProgressMonitor CVSException ByteArrayOutputStream ByteArrayOutputStream InputStream BufferedInputStream getContents LFs CRLFtoLFInputStream LFs LFs LFtoCRLFInputStream ByteArrayInputStream ByteArrayInputStream toByteArray setContents keepHistory CoreException CVSException wrapException CVSTeamProvider cleanLineDelimitersException IOException CVSException wrapException CVSTeamProvider cleanLineDelimitersException
private static void make Dirty I File file throws CVS Exception ICVS File m File CVS Workspace Root getCVS File For file Resource Sync Info orig Info m File get Sync Info Mutable Resource Sync Info info orig Info clone Mutable info set Time Stamp null set the sync timestamp to null to trigger dirtyness m File set Sync Info info ICVS File UNKNOWN  makeDirty IFile CVSException ICVSFile mFile CVSWorkspaceRoot getCVSFileFor ResourceSyncInfo origInfo mFile getSyncInfo MutableResourceSyncInfo origInfo cloneMutable setTimeStamp mFile setSyncInfo ICVSFile
see Repository Provider getID public String getID return CVS Provider Plugin get Type Id  RepositoryProvider CVSProviderPlugin getTypeId
see Repository Provider get Move Delete Hook public I Move Delete Hook get Move Delete Hook return move Delete Hook  RepositoryProvider getMoveDeleteHook IMoveDeleteHook getMoveDeleteHook moveDeleteHook
Return the currently registered Move Delete Hook public static Move Delete Hook get Registered Move Delete Hook return move Delete Hook  MoveDeleteHook getRegisteredMoveDeleteHook moveDeleteHook
see org eclipse team core Repository Provider get File Modification Validator public I File Modification Validator get File Modification Validator if CVS Team Provider file Modification Validator null CVS Team Provider file Modification Validator CVS Team Provider get Plugged In Validator if CVS Team Provider file Modification Validator null CVS Team Provider file Modification Validator super get File Modification Validator return CVS Team Provider file Modification Validator  RepositoryProvider getFileModificationValidator IFileModificationValidator getFileModificationValidator CVSTeamProvider fileModificationValidator CVSTeamProvider fileModificationValidator CVSTeamProvider getPluggedInValidator CVSTeamProvider fileModificationValidator CVSTeamProvider fileModificationValidator getFileModificationValidator CVSTeamProvider fileModificationValidator
public void edit I Resource resources boolean recurse boolean notify Server final int notification I Progress Monitor progress throws CVS Exception notify Edit Unedit resources recurse notify Server new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception if file is Read Only file edit notification Policy monitor For null  IResource notifyServer IProgressMonitor CVSException notifyEditUnedit notifyServer ICVSResourceVisitor visitFile ICVSFile CVSException isReadOnly monitorFor
file edit notification Policy monitor For null public void visit Folder ICVS Folder folder throws CVS Exception nothing needs to be done here as the recurse will handle the traversal  monitorFor visitFolder ICVSFolder CVSException
Checkout cvs edit the provided resources so they can be modified locally and committed This will make any read only resources in the list writable and will notify the server that the file is being edited This notification may be done immediately or at some later point depending on whether contact with the server is possble at the time of invocation or the value of the notify server parameter The recurse parameter is equivalent to the cvs local options l code true code and R code false code The notify Server parameter can be used to defer server contact until the next command This may be approrpiate if no shell or progress monitor is available to the caller The notification bit field indicates what temporary watches are to be used while the file is being edited The possible values that can be O Red together are ICVS File EDIT ICVS File UNEDIT and ICVS File COMMIT There pre O Red convenience values ICVS File NO NOTIFICATION and ICVS File NOTIFY ON ALL are also available param resources the resources to be edited param recurse indicates whether to recurse R or not l param notify Server indicates whether to notify the server now if possible or defer until the next command param notification the temporary watches param progress progress monitor to provide progress indication cancellation or code null code exception CVS Exception if this method fails since 2 1 see CVS Team Provider unedit public void edit I Resource resources boolean recurse boolean notify Server final int notification I Progress Monitor progress throws CVS Exception notify Edit Unedit resources recurse notify Server new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception if file is Read Only file edit notification Policy monitor For null public void visit Folder ICVS Folder folder throws CVS Exception nothing needs to be done here as the recurse will handle the traversal null no scheduling rule progress  notifyServer ORed ICVSFile ICVSFile ICVSFile ORed ICVSFile NO_NOTIFICATION ICVSFile NOTIFY_ON_ALL notifyServer CVSException CVSTeamProvider IResource notifyServer IProgressMonitor CVSException notifyEditUnedit notifyServer ICVSResourceVisitor visitFile ICVSFile CVSException isReadOnly monitorFor visitFolder ICVSFolder CVSException
public void unedit I Resource resources boolean recurse boolean notify Server I Progress Monitor progress throws CVS Exception notify Edit Unedit resources recurse notify Server new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception if file is Read Only file unedit Policy monitor For null  IResource notifyServer IProgressMonitor CVSException notifyEditUnedit notifyServer ICVSResourceVisitor visitFile ICVSFile CVSException isReadOnly monitorFor
file unedit Policy monitor For null public void visit Folder ICVS Folder folder throws CVS Exception nothing needs to be done here as the recurse will handle the traversal  monitorFor visitFolder ICVSFolder CVSException
Unedit the given resources Any writtable resources will be reverted to their base contents and made read only and the server will be notified that the file is no longer being edited This notification may be done immediately or at some later point depending on whether contact with the server is possble at the time of invocation or the value of the notify server parameter The recurse parameter is equivalent to the cvs local options l code true code and R code false code The notify Server parameter can be used to defer server contact until the next command This may be approrpiate if no shell or progress monitor is available to the caller param resources the resources to be unedited param recurse indicates whether to recurse R or not l param notify Server indicates whether to notify the server now if possible or defer until the next command param progress progress monitor to provide progress indication cancellation or code null code exception CVS Exception if this method fails since 2 1 see CVS Team Provider edit public void unedit I Resource resources boolean recurse boolean notify Server I Progress Monitor progress throws CVS Exception notify Edit Unedit resources recurse notify Server new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception if file is Read Only file unedit Policy monitor For null public void visit Folder ICVS Folder folder throws CVS Exception nothing needs to be done here as the recurse will handle the traversal get Project project scheduling rule progress  notifyServer notifyServer CVSException CVSTeamProvider IResource notifyServer IProgressMonitor CVSException notifyEditUnedit notifyServer ICVSResourceVisitor visitFile ICVSFile CVSException isReadOnly monitorFor visitFolder ICVSFolder CVSException getProject
I Workspace Runnable workspace Runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception final ICVS Resource cvs Resources getCVS Arguments resources mark the files locally as being checked out try for int i 0 i cvs Resources length i cvs Resources i accept edit Unedit Visitor recurse catch CVS Exception e exception 0 e return send the noop command to the server in order to deliver the notifications if notify Server monitor begin Task null 100 Session session new Session workspace Root get Remote Location workspace Root get Local Root true try try session open Policy sub Monitor For monitor 10 true open for modification catch CVS Exception e1 If the connection cannot be opened just exit normally The notifications will be sent when a connection can be made return Command NOOP execute session Command NO GLOBAL OPTIONS Command NO LOCAL OPTIONS cvs Resources null Policy sub Monitor For monitor 90 catch CVS Exception e exception 0 e finally session close monitor done  IWorkspaceRunnable workspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException ICVSResource cvsResources getCVSArguments cvsResources cvsResources editUneditVisitor CVSException notifyServer beginTask workspaceRoot getRemoteLocation workspaceRoot getLocalRoot subMonitorFor CVSException NO_GLOBAL_OPTIONS NO_LOCAL_OPTIONS cvsResources subMonitorFor CVSException
private void notify Edit Unedit final I Resource resources final boolean recurse final boolean notify Server final ICVS Resource Visitor edit Unedit Visitor I Scheduling Rule rule I Progress Monitor monitor throws CVS Exception final CVS Exception exception new CVS Exception null I Workspace Runnable workspace Runnable new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception final ICVS Resource cvs Resources getCVS Arguments resources mark the files locally as being checked out try for int i 0 i cvs Resources length i cvs Resources i accept edit Unedit Visitor recurse catch CVS Exception e exception 0 e return send the noop command to the server in order to deliver the notifications if notify Server monitor begin Task null 100 Session session new Session workspace Root get Remote Location workspace Root get Local Root true try try session open Policy sub Monitor For monitor 10 true open for modification catch CVS Exception e1 If the connection cannot be opened just exit normally The notifications will be sent when a connection can be made return Command NOOP execute session Command NO GLOBAL OPTIONS Command NO LOCAL OPTIONS cvs Resources null Policy sub Monitor For monitor 90 catch CVS Exception e exception 0 e finally session close monitor done try Resources Plugin get Workspace run workspace Runnable rule 0 Policy monitor For monitor catch Core Exception e if exception 0 null throw CVS Exception wrap Exception e else CVS Provider Plugin log CVS Exception wrap Exception e if exception 0 null throw exception 0  notifyEditUnedit IResource notifyServer ICVSResourceVisitor editUneditVisitor ISchedulingRule IProgressMonitor CVSException CVSException CVSException IWorkspaceRunnable workspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException ICVSResource cvsResources getCVSArguments cvsResources cvsResources editUneditVisitor CVSException notifyServer beginTask workspaceRoot getRemoteLocation workspaceRoot getLocalRoot subMonitorFor CVSException NO_GLOBAL_OPTIONS NO_LOCAL_OPTIONS cvsResources subMonitorFor CVSException ResourcesPlugin getWorkspace workspaceRunnable monitorFor CoreException CVSException wrapException CVSProviderPlugin CVSException wrapException
Gets the etch Absent Directories return Returns a boolean public boolean get Fetch Absent Directories throws CVS Exception try String property get Project get Persistent Property FETCH ABSENT DIRECTORIES PROP KEY if property null return CVS Provider Plugin get Plugin get Fetch Absent Directories return Boolean value Of property boolean Value catch Core Exception e throw new CVS Exception new CVS Status I Status ERROR Policy bind CVS Team Provider error Getting Fetch Property project get Name e NON NLS 1  etchAbsentDirectories getFetchAbsentDirectories CVSException getProject getPersistentProperty FETCH_ABSENT_DIRECTORIES_PROP_KEY CVSProviderPlugin getPlugin getFetchAbsentDirectories valueOf booleanValue CoreException CVSException CVSStatus IStatus CVSTeamProvider errorGettingFetchProperty getName
Sets the fetch Absent Directories param etch Absent Directories The etch Absent Directories to set public void set Fetch Absent Directories boolean fetch Absent Directories throws CVS Exception internal Set Fetch Absent Directories fetch Absent Directories Boolean TRUE to String Boolean FALSE to String  fetchAbsentDirectories etchAbsentDirectories etchAbsentDirectories setFetchAbsentDirectories fetchAbsentDirectories CVSException internalSetFetchAbsentDirectories fetchAbsentDirectories toString toString
public void internal Set Fetch Absent Directories String fetch Absent Directories throws CVS Exception try get Project set Persistent Property FETCH ABSENT DIRECTORIES PROP KEY fetch Absent Directories catch Core Exception e throw new CVS Exception new CVS Status I Status ERROR Policy bind CVS Team Provider error Setting Fetch Property project get Name e NON NLS 1  internalSetFetchAbsentDirectories fetchAbsentDirectories CVSException getProject setPersistentProperty FETCH_ABSENT_DIRECTORIES_PROP_KEY fetchAbsentDirectories CoreException CVSException CVSStatus IStatus CVSTeamProvider errorSettingFetchProperty getName
see org eclipse team core Repository Provider can Handle Linked Resources public boolean can Handle Linked Resources return true  RepositoryProvider canHandleLinkedResources canHandleLinkedResources
see org eclipse team core Repository Provider validate Create Link org eclipse core resources I Resource int org eclipse core runtime I Path public I Status validate Create Link I Resource resource int update Flags I Path location ICVS Folder cvs Folder CVS Workspace Root getCVS Folder For resource get Parent get Folder new Path resource get Name try if cvs Folder isCVS Folder There is a remote folder that overlaps with the link so disallow return new CVS Status I Status ERROR Policy bind CVS Team Provider overlapping Remote Folder resource get Full Path to String NON NLS 1 else ICVS File cvs File CVS Workspace Root getCVS File For resource get Parent get File new Path resource get Name if cvs File is Managed there is an outgoing file deletion that overlaps the link so disallow return new CVS Status I Status ERROR Policy bind CVS Team Provider overlapping File Deletion resource get Full Path to String NON NLS 1 catch CVS Exception e CVS Provider Plugin log e return e get Status return super validate Create Link resource update Flags location  RepositoryProvider validateCreateLink IResource IPath IStatus validateCreateLink IResource updateFlags IPath ICVSFolder cvsFolder CVSWorkspaceRoot getCVSFolderFor getParent getFolder getName cvsFolder isCVSFolder CVSStatus IStatus CVSTeamProvider overlappingRemoteFolder getFullPath toString ICVSFile cvsFile CVSWorkspaceRoot getCVSFileFor getParent getFile getName cvsFile isManaged CVSStatus IStatus CVSTeamProvider overlappingFileDeletion getFullPath toString CVSException CVSProviderPlugin getStatus validateCreateLink updateFlags
Get the editors of the resources by calling the code cvs editors code command author a href mailto gregor kohlwes csc com kohlwes gmx net Gregor Kohlwes a param resources param progress return I Editors Info throws CVS Exception public Editors Info editors I Resource resources I Progress Monitor progress throws CVS Exception Build the local options Local Option command Options new Local Option progress worked 10 Build the arguments list String arguments get Valid Arguments resources command Options Build the listener for the command Editors Listener listener new Editors Listener Check if canceled if progress is Canceled return new Editors Info 0 Build the session Session session new Session workspace Root get Remote Location workspace Root get Local Root Check if canceled if progress is Canceled return new Editors Info 0 progress begin Task null 100 try Opening the session takes 20 of the time session open Policy sub Monitor For progress 20 false read only if progress is Canceled Execute the editors command Command EDITORS execute session Command NO GLOBAL OPTIONS command Options arguments listener Policy sub Monitor For progress 80 finally session close progress done Return the infos about the editors return listener get Editors Infos  IEditorsInfo CVSException EditorsInfo IResource IProgressMonitor CVSException LocalOption commandOptions LocalOption getValidArguments commandOptions EditorsListener EditorsListener isCanceled EditorsInfo workspaceRoot getRemoteLocation workspaceRoot getLocalRoot isCanceled EditorsInfo beginTask subMonitorFor isCanceled NO_GLOBAL_OPTIONS commandOptions subMonitorFor getEditorsInfos
Return the commit comment template that was provided by the server return String throws CVS Exception public String get Commit Template throws CVS Exception ICVS Folder local Folder getCVS Workspace Root get Local Root ICVS File template File CVS Workspace Root getCVS File For Sync File Writer get Template File I Container local Folder getI Resource if template File exists return null Input Stream in new Buffered Input Stream template File get Contents try Byte Array Output Stream out new Byte Array Output Stream int b do b in read if b 1 out write byte b while b 1 out close return new String out to String catch IO Exception e throw CVS Exception wrap Exception e finally try in close catch IO Exception e Since we already have the contents just log this exception CVS Provider Plugin log CVS Exception wrap Exception e  CVSException getCommitTemplate CVSException ICVSFolder localFolder getCVSWorkspaceRoot getLocalRoot ICVSFile templateFile CVSWorkspaceRoot getCVSFileFor SyncFileWriter getTemplateFile IContainer localFolder getIResource templateFile InputStream BufferedInputStream templateFile getContents ByteArrayOutputStream ByteArrayOutputStream toString IOException CVSException wrapException IOException CVSProviderPlugin CVSException wrapException
Return true if the project is configured to use watch edit A project will use watch edit if it was checked out when the global preference to use watch edit is turned on return boolean public boolean is Watch Edit Enabled throws CVS Exception I Project project get Project try String property String project get Session Property WATCH EDIT PROP KEY if property null property project get Persistent Property WATCH EDIT PROP KEY if property null The persistant property for the project was never set i e old project Use the global preference to determine if the project is using watch edit return CVS Provider Plugin get Plugin is Watch Edit Enabled else project set Session Property WATCH EDIT PROP KEY property return Boolean value Of property boolean Value catch Core Exception e if project is Accessible We only care if the project still exists throw new CVS Exception new CVS Status I Status ERROR Policy bind CVS Team Provider error Getting Watch Edit project get Name e NON NLS 1 return false  isWatchEditEnabled CVSException IProject getProject getSessionProperty WATCH_EDIT_PROP_KEY getPersistentProperty WATCH_EDIT_PROP_KEY CVSProviderPlugin getPlugin isWatchEditEnabled setSessionProperty WATCH_EDIT_PROP_KEY valueOf booleanValue CoreException isAccessible CVSException CVSStatus IStatus CVSTeamProvider errorGettingWatchEdit getName
public void set Watch Edit Enabled boolean enabled throws CVS Exception internal Set Watch Edit Enabled enabled Boolean TRUE to String Boolean FALSE to String  setWatchEditEnabled CVSException internalSetWatchEditEnabled toString toString
private void internal Set Watch Edit Enabled String enabled throws CVS Exception try I Project project get Project project set Persistent Property WATCH EDIT PROP KEY enabled project set Session Property WATCH EDIT PROP KEY enabled catch Core Exception e throw new CVS Exception new CVS Status I Status ERROR Policy bind CVS Team Provider error Setting Watch Edit project get Name e NON NLS 1  internalSetWatchEditEnabled CVSException IProject getProject setPersistentProperty WATCH_EDIT_PROP_KEY setSessionProperty WATCH_EDIT_PROP_KEY CoreException CVSException CVSStatus IStatus CVSTeamProvider errorSettingWatchEdit getName
see org eclipse team core Repository Provider get Rule Factory public I Resource Rule Factory get Rule Factory return RESOURCE RULE FACTORY  RepositoryProvider getRuleFactory IResourceRuleFactory getRuleFactory RESOURCE_RULE_FACTORY

see org eclipse team core Repository Provider Type supports Project Set Import Relocation public boolean supports Project Set Import Relocation return false  RepositoryProviderType supportsProjectSetImportRelocation supportsProjectSetImportRelocation
see org eclipse team core Repository Provider Type get Project Set Capability public Project Set Capability get Project Set Capability return new CVS Project Set Capability  RepositoryProviderType getProjectSetCapability ProjectSetCapability getProjectSetCapability CVSProjectSetCapability

base Tree new CVS Resource Variant Tree base Synchronizer null get Cache File Contents Hint public I Resource refresh I Resource resources int depth I Progress Monitor monitor throws Team Exception TODO Ensure that file contents are cached for modified local files try monitor begin Task null 100 return new I Resource 0 finally monitor done  baseTree CVSResourceVariantTree baseSynchronizer getCacheFileContentsHint IResource IResource IProgressMonitor TeamException beginTask IResource
CVS Workspace Subscriber Qualified Name id String name String description super id name description install sync info participant Resource Variant Byte Store base Synchronizer new CVS Base Resource Variant Tree base Tree new CVS Resource Variant Tree base Synchronizer null get Cache File Contents Hint public I Resource refresh I Resource resources int depth I Progress Monitor monitor throws Team Exception TODO Ensure that file contents are cached for modified local files try monitor begin Task null 100 return new I Resource 0 finally monitor done CVS Descendant Resource Variant Byte Store remote Synchronizer new CVS Descendant Resource Variant Byte Store base Synchronizer new Persistant Resource Variant Byte Store new Qualified Name SYNC KEY QUALIFIER REMOTE RESOURCE KEY remote Tree new CVS Resource Variant Tree remote Synchronizer null get Cache File Contents Hint Resource State Change Listeners get Listener add Resource State Change Listener this  CVSWorkspaceSubscriber QualifiedName ResourceVariantByteStore baseSynchronizer CVSBaseResourceVariantTree baseTree CVSResourceVariantTree baseSynchronizer getCacheFileContentsHint IResource IResource IProgressMonitor TeamException beginTask IResource CVSDescendantResourceVariantByteStore remoteSynchronizer CVSDescendantResourceVariantByteStore baseSynchronizer PersistantResourceVariantByteStore QualifiedName SYNC_KEY_QUALIFIER REMOTE_RESOURCE_KEY remoteTree CVSResourceVariantTree remoteSynchronizer getCacheFileContentsHint ResourceStateChangeListeners getListener addResourceStateChangeListener
public I Resource roots List result new Array List I Project projects Resources Plugin get Workspace get Root get Projects for int i 0 i projects length i I Project project projects i if project is Open Repository Provider provider Repository Provider get Provider project CVS Provider Plugin get Type Id if provider null result add project return I Project result to Array new I Project result size  IResource ArrayList IProject ResourcesPlugin getWorkspace getRoot getProjects IProject isOpen RepositoryProvider RepositoryProvider getProvider CVSProviderPlugin getTypeId IProject toArray IProject
see org eclipse team internal ccvs core I Resource State Change Listener resource Sync Info Changed org eclipse core resources I Resource public void resource Sync Info Changed I Resource changed Resources internal Resource Sync Info Changed changed Resources true  IResourceStateChangeListener resourceSyncInfoChanged IResource resourceSyncInfoChanged IResource changedResources internalResourceSyncInfoChanged changedResources
private void internal Resource Sync Info Changed I Resource changed Resources boolean can Modify Workspace get Remote Byte Store handle Resource Changes changed Resources can Modify Workspace fire Team Resource Change Subscriber Change Event as Sync Changed Deltas this changed Resources  internalResourceSyncInfoChanged IResource changedResources canModifyWorkspace getRemoteByteStore handleResourceChanges changedResources canModifyWorkspace fireTeamResourceChange SubscriberChangeEvent asSyncChangedDeltas changedResources
see org eclipse team internal ccvs core I Resource State Change Listener external Sync Info Change org eclipse core resources I Resource public void external Sync Info Change I Resource changed Resources internal Resource Sync Info Changed changed Resources false  IResourceStateChangeListener externalSyncInfoChange IResource externalSyncInfoChange IResource changedResources internalResourceSyncInfoChanged changedResources
public void resource Modified I Resource changed Resources This is only ever called from a delta POST CHANGE which causes problems since the workspace tree is closed for modification and we flush the sync info in resource Sync Info Changed Since the listeners of the Subscriber will also listen to deltas we don t need to propogate this  resourceModified IResource changedResources POST_CHANGE resourceSyncInfoChanged
see org eclipse team internal ccvs core I Resource State Change Listener project Configured org eclipse core resources I Project public void project Configured I Project project Subscriber Change Event delta new Subscriber Change Event this I Subscriber Change Event ROOT ADDED project fire Team Resource Change new Subscriber Change Event delta  IResourceStateChangeListener projectConfigured IProject projectConfigured IProject SubscriberChangeEvent SubscriberChangeEvent ISubscriberChangeEvent ROOT_ADDED fireTeamResourceChange SubscriberChangeEvent
public void project Deconfigured I Project project try get Remote Tree flush Variants project I Resource DEPTH INFINITE catch Team Exception e CVS Provider Plugin log e Subscriber Change Event delta new Subscriber Change Event this I Subscriber Change Event ROOT REMOVED project fire Team Resource Change new Subscriber Change Event delta  projectDeconfigured IProject getRemoteTree flushVariants IResource DEPTH_INFINITE TeamException CVSProviderPlugin SubscriberChangeEvent SubscriberChangeEvent ISubscriberChangeEvent ROOT_REMOVED fireTeamResourceChange SubscriberChangeEvent
public void set Remote I Resource resource I Resource Variant remote I Progress Monitor monitor throws Team Exception TODO This exposes internal behavior to much I Resource changed Resources CVS Resource Variant Tree get Remote Tree collect Changes resource remote I Resource DEPTH INFINITE monitor if changed Resources length 0 fire Team Resource Change Subscriber Change Event as Sync Changed Deltas this changed Resources  setRemote IResource IResourceVariant IProgressMonitor TeamException IResource changedResources CVSResourceVariantTree getRemoteTree collectChanges IResource DEPTH_INFINITE changedResources fireTeamResourceChange SubscriberChangeEvent asSyncChangedDeltas changedResources
see org eclipse team internal ccvs core CVS Sync Tree Subscriber get Base Synchronization Cache protected I Resource Variant Tree get Base Tree return base Tree  CVSSyncTreeSubscriber getBaseSynchronizationCache IResourceVariantTree getBaseTree baseTree
see org eclipse team internal ccvs core CVS Sync Tree Subscriber get Remote Synchronization Cache protected I Resource Variant Tree get Remote Tree return remote Tree  CVSSyncTreeSubscriber getRemoteSynchronizationCache IResourceVariantTree getRemoteTree remoteTree
resource accept new I Resource Visitor public boolean visit I Resource inner Resource throws Core Exception try Policy check Canceled monitor if inner Resource get Type I Resource FILE monitor sub Task Policy bind CVS Workspace Subscriber 1 inner Resource get Full Path to String NON NLS 1 if is Out Of Sync inner Resource monitor Sync Info info get Sync Info inner Resource if info null info get Kind 0 set add info catch Team Exception e set add Error new Team Status I Status ERROR CVS Provider Plugin ID I Team Status RESOURCE SYNC INFO ERROR Policy bind CVS Workspace Subscriber 2 inner Resource get Full Path to String e get Message e inner Resource NON NLS 1 return true  IResourceVisitor IResource innerResource CoreException checkCanceled innerResource getType IResource subTask CVSWorkspaceSubscriber innerResource getFullPath toString isOutOfSync innerResource SyncInfo getSyncInfo innerResource getKind TeamException addError TeamStatus IStatus CVSProviderPlugin ITeamStatus RESOURCE_SYNC_INFO_ERROR CVSWorkspaceSubscriber innerResource getFullPath toString getMessage innerResource
public void collect Out Of Sync I Resource resources int depth final Sync Info Set set final I Progress Monitor monitor monitor begin Task null I Progress Monitor UNKNOWN for int i 0 i resources length i I Resource resource resources i try if is Supervised resource return catch Team Exception e fallthrough and try to collect sync info CVS Provider Plugin log e try resource accept new I Resource Visitor public boolean visit I Resource inner Resource throws Core Exception try Policy check Canceled monitor if inner Resource get Type I Resource FILE monitor sub Task Policy bind CVS Workspace Subscriber 1 inner Resource get Full Path to String NON NLS 1 if is Out Of Sync inner Resource monitor Sync Info info get Sync Info inner Resource if info null info get Kind 0 set add info catch Team Exception e set add Error new Team Status I Status ERROR CVS Provider Plugin ID I Team Status RESOURCE SYNC INFO ERROR Policy bind CVS Workspace Subscriber 2 inner Resource get Full Path to String e get Message e inner Resource NON NLS 1 return true depth true include phantoms catch Core Exception e set add Error new Team Status I Status ERROR CVS Provider Plugin ID I Team Status SYNC INFO SET ERROR e get Message e Resources Plugin get Workspace get Root monitor done  collectOutOfSync IResource SyncInfoSet IProgressMonitor beginTask IProgressMonitor IResource isSupervised TeamException CVSProviderPlugin IResourceVisitor IResource innerResource CoreException checkCanceled innerResource getType IResource subTask CVSWorkspaceSubscriber innerResource getFullPath toString isOutOfSync innerResource SyncInfo getSyncInfo innerResource getKind TeamException addError TeamStatus IStatus CVSProviderPlugin ITeamStatus RESOURCE_SYNC_INFO_ERROR CVSWorkspaceSubscriber innerResource getFullPath toString getMessage innerResource CoreException addError TeamStatus IStatus CVSProviderPlugin ITeamStatus SYNC_INFO_SET_ERROR getMessage ResourcesPlugin getWorkspace getRoot
internal use only boolean is Out Of Sync I Resource resource I Progress Monitor monitor throws Team Exception return has Incoming Change resource has Outgoing Change resource monitor  isOutOfSync IResource IProgressMonitor TeamException hasIncomingChange hasOutgoingChange
private boolean has Incoming Change I Resource resource throws Team Exception return get Remote Byte Store is Variant Known resource  hasIncomingChange IResource TeamException getRemoteByteStore isVariantKnown
private boolean has Outgoing Change I Resource resource I Progress Monitor monitor throws CVS Exception if resource get Type I Resource PROJECT resource get Type I Resource ROOT a project or the workspace root cannot have outgoing changes return false int state Eclipse Synchronizer get Instance get Modification State resource get Parent if state ICVS File CLEAN if the parent is known to be clean then the resource must also be clean return false if resource get Type I Resource FILE A file is an outgoing change if it is modified ICVS File file CVS Workspace Root getCVS File For I File resource return file is Modified monitor else A folder is an outgoing change if it is not a CVS folder and not ignored ICVS Folder folder CVS Workspace Root getCVS Folder For I Container resource return folder isCVS Folder folder is Ignored  hasOutgoingChange IResource IProgressMonitor CVSException getType IResource getType IResource EclipseSynchronizer getInstance getModificationState getParent ICVSFile getType IResource ICVSFile CVSWorkspaceRoot getCVSFileFor IFile isModified ICVSFolder CVSWorkspaceRoot getCVSFolderFor IContainer isCVSFolder isIgnored
TODO Should not need to access this here private CVS Descendant Resource Variant Byte Store get Remote Byte Store return CVS Descendant Resource Variant Byte Store CVS Resource Variant Tree get Remote Tree get Byte Store  CVSDescendantResourceVariantByteStore getRemoteByteStore CVSDescendantResourceVariantByteStore CVSResourceVariantTree getRemoteTree getByteStore
Update the remote tree to the base param folder public void update Remote CVS Team Provider provider ICVS Folder folder I Progress Monitor monitor throws Team Exception try monitor begin Task null 100 I Resource resource folder getI Resource if resource null ICVS Resource tree Remote Folder Tree Builder build Base Tree CVS Repository Location provider get Remote Location folder null Policy sub Monitor For monitor 50 set Remote resource I Resource Variant tree Policy sub Monitor For monitor 50 finally monitor done  updateRemote CVSTeamProvider ICVSFolder IProgressMonitor TeamException beginTask IResource getIResource ICVSResource RemoteFolderTreeBuilder buildBaseTree CVSRepositoryLocation getRemoteLocation subMonitorFor setRemote IResourceVariant subMonitorFor

Converts a time stamp as sent from a cvs server for a log command into a code Date code public static Date convert From Log Time String mod Time Simple Date Format format new Simple Date Format LOG TIMESTAMP FORMAT LOG TIMESTAMP LOCALE try return format parse mod Time catch Parse Exception e fallback is to return null return null  convertFromLogTime modTime SimpleDateFormat SimpleDateFormat LOG_TIMESTAMP_FORMAT LOG_TIMESTAMP_LOCALE modTime ParseException
Converts a modifcation time stamp as send from a cvs server into a code Date code The format of the modification time stamp is defined in the document CVS Client Server for CVS 1 11 section 5 6 Dates public static Date convert From Mod Time String mod Time Simple Date Format format new Simple Date Format MODTIME TIMESTAMP FORMAT MODTIME TIMESTAMP LOCALE try return format parse mod Time catch Parse Exception e fallback is to return null return null  convertFromModTime modTime SimpleDateFormat SimpleDateFormat MODTIME_TIMESTAMP_FORMAT MODTIME_TIMESTAMP_LOCALE modTime ParseException
Converts a history time stamp as sent from a cvs server into a code Date code public static Date convert From History Time String history Time Simple Date Format format new Simple Date Format HISTORY TIMESTAMP FORMAT HISTORY TIMESTAMP LOCALE try return format parse history Time catch Parse Exception e fallback is to return null return null  convertFromHistoryTime historyTime SimpleDateFormat SimpleDateFormat HISTORY_TIMESTAMP_FORMAT HISTORY_TIMESTAMP_LOCALE historyTime ParseException
Converts a date into an entry time format as specified in the document Version Management with CVS for CVS 1 10 6 page 14 Note that the time format is always in GMT also not specified in the document public static String to Entry Format Date date Simple Date Format format new Simple Date Format ENTRY TIMESTAMP FORMAT ENTRY TIMESTAMP LOCALE format set Time Zone Time Zone get Time Zone ENTRY TIMESTAMP TIME ZONE return format format date  toEntryFormat SimpleDateFormat SimpleDateFormat ENTRY_TIMESTAMP_FORMAT ENTRY_TIMESTAMP_LOCALE setTimeZone TimeZone getTimeZone ENTRY_TIMESTAMP_TIME_ZONE

public class Editors Info public Editors Info  EditorsInfo EditorsInfo
Returns the user Name return String public String get User Name return user Name  userName getUserName userName
Sets the user Name param user Name The user Name to set public void set User Name String user Name this user Name user Name  userName userName userName setUserName userName userName userName
Returns the date String return String public String get Date String return date String  dateString getDateString dateString
Returns the file Name return String public String get File Name return file Name  fileName getFileName fileName
Sets the date String param date String The date String to set public void set Date String String date String this date String date String  dateString dateString dateString setDateString dateString dateString dateString
Sets the file Name param file Name The file Name to set public void set File Name String file Name this file Name file Name  fileName fileName fileName setFileName fileName fileName fileName
Returns the computer Name return String public String get Computer Name return computer Name  computerName getComputerName computerName
Sets the computer Name param computer Name The computer Name to set public void set Computer Name String computer Name this computer Name computer Name  computerName computerName computerName setComputerName computerName computerName computerName

public interface I Connection Method Returns the name of this connection method e g local ext public String get Name  IConnectionMethod getName
Creates a new server connection using the given repository root which includes the user name and the given password 
Some connection method may persist the physical connection to the server through several I Server Connections For example when making several successive connections to the same location using SSH2 it would be very expensive to re connect re negotiate and re authenticate for each operation therefore the SSH2 connection method will create one SSH session and open several channels one for each I Server Connection created and keep the session open until disconnect is called p This method actually closes any connection to the indicated location p  IServerConnections IServerConnection

public interface ICVS Decorator Enablement Listener Called when CVS decoration is enabled or disabled Implementers can use the decorator enablement change as a chance to create or destroy cached CVS information that would help decorate CVS elements param enabled a flag indicating the enablement state of the decorators  ICVSDecoratorEnablementListener

Answers the workspace synchronization information for this resource This would typically include information from the b Entries b file that is used to track the base revisions of local CVS resources return the synchronization information for this resource or code null code if the resource does not have synchronization information available 
Called to set the workspace synchronization information for a resource To clear sync information call code unmanage code The sync info will become the persisted between workbench sessions Note This method makes use of a Resource Sync Info object which has the parsed contents of the resource sync info Clients can manipulate the values using Mutable Resource Sync Info and then set the sync info using this method param info the resource synchronization to associate with this resource  ResourceSyncInfo MutableResourceSyncInfo
Called to set the workspace synchronization information for a resource To clear sync information call code unmanage code The sync info will become the persisted between workbench sessions Note This method sets the sync info to the bytes provided as is It is the caller s responsibility to ensure that these bytes are of the proper format Use with caution param info the resource synchronization to associate with this resource 
Sets the file to read only code true code or writable code false code This method is used by the command framework and should not be used by other clients Other clients should use code edit code and code unedit code instead as they will report the change to the server if appropriate 
Answers whether the file is read only or not If a file is read only code edit code should be invoked to make the file editable 
Copy the resource to another file in the same directory This method is used by the command framework and should not be used by other clients 
Answers the current timestamp for this file with second precision This method is used by the command framework and should not be used by other clients 
If the date is code null code then the current time is used After set Time Stamp is invoked it is assumed that the file is CLEAN If this is not the case it is the clients responsibility to invoke set Sync Bytes with the appropriate modification state This method is used by the command framework and should not be used by other clients  setTimeStamp setSyncBytes
Answers code true code if the file has changed since it was last updated from the repository if the file does not exist or is not managed And code false code if it has not changed 
Answers the revision history for this file This is similar to the output of the log command 
Mark the file as checked out to allow local editing analogous to cvs edit If this method is invoked when code is Checked Out code returns code false code a notification message that will be sent to the server on the next connection If code is Checked Out code returns code true code then nothing is done param notifications the set of operations for which the local user would like notification while the local file is being edited  isCheckedOut isCheckedOut
Undo a checkout of the file analogous to cvs unedit If this method is invoked when code is Checked Out code returns code true code a notification message that will be sent to the server on the next connection If code is Checked Out code returns code false code then nothing is done  isCheckedOut isCheckedOut
This method is invoked by the checked in handler after the file has been committed 
Answer any pending notification information associated with the receiver This method is used by the command framework and should not be used by other clients 
Indicate to the file that the pending notification was successfully communicated to the server This method is used by the command framework and should not be used by other clients 
Indicate whether the file has been cvs edit ed This is determined by looking in the CVS Base folder for a file of the same name as the file i e no files are read so the method can be called by time critical code like menu enablement return boolean 

public interface ICVS File Modification Validator extends I File Modification Validator public I Status validate Move Delete I File files I Progress Monitor monitor  ICVSFileModificationValidator IFileModificationValidator IStatus validateMoveDelete IFile IProgressMonitor

Answers and array of code ICVS Resource code elements that are immediate children of this remote resource in no particular order The server may be contacted param monitor a progress monitor to indicate the duration of the operation or code null code if progress reporting is not required return array of immediate children of this remote resource  ICVSResource
Answer the immediate children of the resource that are known at the time of invocation The server is never contacted The flags indicate the type of members to be included Here are the rules for specifying just one flag a FILE MEMBERS and FOLDER MEMBERS will return managed and unmanaged resource of the corresponding type b IGNORED MEMBERS MANAGED RESOURCES and UNMANAGED RESOURCES will return files and folders of the given type c EXISTING MEMBERS and PHANTOM MEMBERS will return existing and phatom resource of the corresponding type Note Unmanaged resources are those that are neither managed or ignored If all of the flags from either group a group b or group c are not present the same rule for default types applies For example FILE MEMBERS FOLDER MEMBERS will return all managed and unmanaged existing and phantom files and folders IGNORED MEMBERS UNMANAGED MEMBERS will return all ignored or unmanaged existing or phantom files and folders If a flag from each group is present the result is the union of the sets For example FILE MEMBERS IGNORED MEMBERS EXISTING MEMBERS will return all existing ignored files  FILE_MEMBERS FOLDER_MEMBERS IGNORED_MEMBERS MANAGED_RESOURCES UNMANAGED_RESOURCES EXISTING_MEMBERS PHANTOM_MEMBERS FILE_MEMBERS FOLDER_MEMBERS IGNORED_MEMBERS UNMANAGED_MEMBERS FILE_MEMBERS IGNORED_MEMBERS EXISTING_MEMBERS
Answers a child folder of this resource with the given name or code null code if the given folder does not have a child with that name 
Answers a child file of this resource with the given name or code null code if the given folder does not have a child with that name 
Return the child resource at the given path relative to the receiver 
Create the folder if it did not exist before Does only work if the direct subfolder did exist throws CVS Exception if for some reason it was not possible to create the folder  CVSException
Answers the folder s synchronization information or code null code if the folder is not a CVS folder p To modify the folder sync info the caller must call code set Folder Sync Info code with new sync information p  setFolderSyncInfo
Set the folder sync information for this folder Setting the folder information to code null code is not supported The only mechanism for removing an existing CVS folder is to delete the resource 
Accepts the visitor on all files and all sub Folder in the folder Files are visited first then all the folders  subFolder
Answers code true code if the folder has valid CVS synchronization information and code false code otherwise Note This method does not throw an exception so this method does not differentiate between a folder not be shared with CVS and a folder that is shared but whose sync info has become corrupt Use get Folder Sync Info to differentiate between these situations Also Note A folder that is a CVS folder may not exist in the workspace The purpose of such a folder is to act as a remotely existing folder that does not exist locally This is normally done in order to remember outgoing file deletions when a parent folder is deleted Creating the folder will result in a folder that is mapped to a remote folder  getFolderSyncInfo
Runs the given action as an atomic cvs local workspace operation rooted at this cvs folder p After running a method that modifies cvs resource state in the local workspace registered listeners receive after the fact notification in the form of a resource state change event In addition any resource state information persistance is batched This method allows clients to call a number of methods that modify resources and only have resource change event notifications reported at the end of the entire batch p p If this method is called in the dynamic scope of another such call this method simply runs the action p param job the action to perform param monitor a progress monitor or code null code if progress reporting and cancellation are not desired exception CVS Exception if the operation failed  CVSException

public interface ICVS Listener public void repository Added ICVS Repository Location root  ICVSListener repositoryAdded ICVSRepositoryLocation
public interface ICVS Listener public void repository Added ICVS Repository Location root public void repository Removed ICVS Repository Location root  ICVSListener repositoryAdded ICVSRepositoryLocation repositoryRemoved ICVSRepositoryLocation

Returns a stream over the contents of this remote element param progress a progress monitor to indicate the duration of the operation or code null code if progress reporting is not required 
Get the log entry for the revision the remote file represents This method will return null until after the get Contents I Progress Monitor method is called i e the call to get Contents also fetches the entry  getContents IProgressMonitor getContents
public I Log Entry get Log Entry I Progress Monitor monitor throws Team Exception Get all the log entries of the remote file public I Log Entry get Log Entries I Progress Monitor monitor throws Team Exception  ILogEntry getLogEntry IProgressMonitor TeamException ILogEntry getLogEntries IProgressMonitor TeamException
Get the revision of the remote file e g 1 1 The revision depends on any tagging associated with the remote parent used to access the file 

Return the context of this handle The returned tag can be a branch or version tag 
Return the local options that are used to determine how memebers are retrieved Interesting options are Checkout ALIAS Command DO NOT RECURSE  DO_NOT_RECURSE
Indicates whether the remote folder can be expanded This is a temporary hopefully means of indicating certain types of folders i e module definitions that are not expandable due to lack of mdoule expansion They can still be checked out 
Indicates whether the remote folder is an actual remote folder is a module defined in the CVSROOT modules file or some other module definition 

Answers if the remote element may have children return code true code if the remote element may have children and code false code otherwise 
public boolean is Container Return the repository public ICVS Repository Location get Repository  isContainer ICVSRepositoryLocation getRepository
Returns the parent of this remote resource or code null code if the remote resource does not have a parent 
Does the remote resource represented by this handle exist on the server This method may contact the server and be long running 
public boolean exists I Progress Monitor monitor throws Team Exception Answers the repository relative path of this remote folder public String get Repository Relative Path  IProgressMonitor TeamException getRepositoryRelativePath
Compares two objects for equality for cvs remote resources equality is defined in terms of their handles same cvs resource type equal relative paths and for files identical revision numbers Remote resources are not equal to objects other than cvs remote resources param other the other object return an indication of whether the objects are equals 
Allows a client to change the context of a remote resource handle For example if a remote resource was created with the HEAD context e g can be used to browse the main branch use this method to change the context to another branch tag or to a version tag 
public ICVS Remote Resource for Tag CVS Tag tag Name Tag the remote resources referenced by the receiver using rtag public I Status tag CVS Tag tag Local Option local Options I Progress Monitor monitor throws CVS Exception  ICVSRemoteResource forTag CVSTag tagName IStatus CVSTag LocalOption localOptions IProgressMonitor CVSException
TODO Temporary param progress return 

public static int USE DEFAULT PORT 0 Return the connection method for making the connection public I Connection Method get Method  USE_DEFAULT_PORT IConnectionMethod getMethod
public I Connection Method get Method Returns the host where the repository is located public String get Host  IConnectionMethod getMethod getHost
Returns the port to connect to or USE DEFAULT PORT if the connection method is to use its default port  USE_DEFAULT_PORT
public int get Port Returns the root directory of the repository public String get Root Directory  getPort getRootDirectory
Returns the string representing the receiver This string should contain enough information to recreate the receiver 
Returns the immediate children of this location If tag is code null code the HEAD branch is assumed If modules is true then the module definitions from the CVSROOT modules file are returned Otherwise the root level projects are returned param tag the context in which to return the members e g branch or version 
Returns a handle to a remote file at this repository location using the given tag as the context The corresponding remote file may not exist or may be a folder 
Returns a handle to a remote folder at this repository location using the given tag as the context The corresponding remote folder may not exist or may be a file 
public ICVS Remote Folder get Remote Folder String remote Path CVS Tag tag encoding for commit comments public String get Encoding  ICVSRemoteFolder getRemoteFolder remotePath CVSTag getEncoding
Return the conection timeout value in milliseconds A value of 0 means there is no timeout value 
public int get Timeout Return the username public String get Username  getTimeout getUsername
public String get Username Returns the user information for the location public I User Info get User Info boolean allow Modification Of Username  getUsername IUserInfo getUserInfo allowModificationOfUsername
public I User Info get User Info boolean allow Modification Of Username Flush any cahced user information related to the repository location public void flush User Info  IUserInfo getUserInfo allowModificationOfUsername flushUserInfo
Validate that the receiver can be used to connect to a repository An exception is thrown if connection fails param monitor the progress monitor used while validating 
Set the option to allow the user settings to be cached between sessions since 3 0 
public void set Allow Caching boolean allow Caching Returns if the user info for this location is cached public boolean get User Info Cached  setAllowCaching allowCaching getUserInfoCached
public boolean get User Info Cached Sets the user information used for this location public void set Username String username  getUserInfoCached setUsername
public void set Username String username Sets the user information used for this location public void set Password String password  setUsername setPassword
Returns the plugged in authenticator for this location since 3 0 
Sets the plugged in authenticator for this location This is a hook for testing since 3 0 
Sets encoding for commit messages since 3 0 

Answers the name of the resource return the name of the resource this handle represents It can never be code null code 
Answers if this resource has CVS synchronization information associated with it return code true code if the resource is 
Unmanage the given resource by purging any CVS synchronization associated with the resource The only way a resource can become managed is by running the appropriate CVS commands e g add commit update 
Answer whether the resource could be ignored because it is in the one of the ignore lists maintained by CVS Even if a resource is ignored it can still be added to a repository at which time it should never be ignored by the CVS client return code true code if this resource is listed in one of the ignore files maintained by CVS and code false code otherwise 
Add the following pattern to the file s parent ignore list XXX This should really be a method of ICVS Folder  ICVSFolder
Answers if the handle is a file or a folder handle return code true code if this is a folder handle and code false code if it is a file handle 
Answers if the resource identified by this handle exists return code true code if the resource represented by this handle exists and code false code false otherwise 
Answers the underlying I Resource for the cvs resource or null if there is not a corresponding local resource return the I Resource that corresponds to the CVS resource  IResource IResource
Answers the local relative path from the given ancestor to the receiver This method will return a path for files that are themselves not added to CVS control but who have an ancestor that is under CVS control return the ancestor relative path for this resource 
Return the repository relative path of the remote resource Return code null code if the resource is not under CVS control return throws CVS Exception  CVSException
Get the absolute remote location of a resource This method is used by the CVS command infrastructure during command execution The root is used in situations where the resource is not under CVS control The remote path that the resource would have if it was is determined by recursively searching the resource s parent until a managed folder is found The provided root is used to stop the recursive search if no managed parent is found param root the root folder of the command return the remote location 
Answers the workspace synchronization information for this resource This would typically include information from the b Entries b file that is used to track the base revisions of local CVS resources return the synchronization information for this resource or code null code if the resource does not have synchronization information available 
public Resource Sync Info get Sync Info throws CVS Exception Deletes the resource represented by the handle public void delete throws CVS Exception  ResourceSyncInfo getSyncInfo CVSException CVSException
Give the folder that contains this resource If the resource is not managed then the result of the operation is not specified return a handle to the parent of this resource 
public ICVS Folder get Parent Accept a vistor to this resource public void accept ICVS Resource Visitor visitor throws CVS Exception  ICVSFolder getParent ICVSResourceVisitor CVSException
Accept a visitor to this resource The recurse parameter corresponds to the CVS l do not recurse and R recurse options If recurse is false only the resource and it s children are visited Otherwise the resource and all it s decendants are visited 
Method is Modified return boolean  isModified

public interface ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception  ICVSResourceVisitor visitFile ICVSFile CVSException
public interface ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception public void visit Folder ICVS Folder folder throws CVS Exception  ICVSResourceVisitor visitFile ICVSFile CVSException visitFolder ICVSFolder CVSException

public interface ICVS Runnable Runs the operation reporting progress to and accepting cancellation requests from the given progress monitor p Implementors of this method should check the progress monitor for cancellation when it is safe and appropriate to do so The cancellation request should be propagated to the caller by throwing code Operation Canceled Exception code p param monitor a progress monitor or code null code if progress reporting and cancellation are not desired exception Core Exception if this operation fails  ICVSRunnable OperationCanceledException CoreException

Return the name for this ICVS Storage return  ICVSStorage
Set the contents of the file to the contents of the provided input stream This method is used by the command framework and should not be used by other clients Other clients should set the contents of the underlying code I File code which can be obtained using code getI Resource code param response Type the type of reponse that was received from the server UPDATED could be a new file or an existing file MERGED merging remote changes with local changes Failure could result in loss of local changes CREATED contents for a file that doesn t exist locally UPDATE EXISTING Replacing a local file with no local changes with remote changes  IFile getIResource responseType UPDATE_EXISTING
public void set Contents Input Stream stream int response Type boolean keep Local History I Progress Monitor monitor throws CVS Exception Answers the size of the file long get Size  setContents InputStream responseType keepLocalHistory IProgressMonitor CVSException getSize
Gets an input stream for reading from the file It is the responsibility of the caller to close the stream when finished 

public interface I Log Entry extends I Adaptable Get the revision for the entry public String get Revision  ILogEntry IAdaptable getRevision
public String get Revision Get the author of the revision public String get Author  getRevision getAuthor
public String get Author Get the date the revision was committed public Date get Date  getAuthor getDate
public Date get Date Get the comment for the revision public String get Comment  getDate getComment
public String get Comment Get the state public String get State  getComment getState
public String get State Get the tags associated with the revision public CVS Tag get Tags  getState CVSTag getTags
public CVS Tag get Tags Get the remote file for this entry public ICVS Remote File get Remote File  CVSTag getTags ICVSRemoteFile getRemoteFile
public ICVS Remote File get Remote File Does the log entry represent a deletion stat dead public boolean is Deletion  ICVSRemoteFile getRemoteFile isDeletion

Notifies this listener that some resource sync info state changes have already happened For example a resource s base revision may have changed The resource tree is open for modification when this method is invoked so markers can be created etc p Note This method is called by the CVS core it is not intended to be called directly by clients p param changed Resources that have sync info state changes Note The changed state event is purposely vague For now it is only a hint to listeners that they should query the provider to determine the resources new sync info  changedResources
Notifies this listener that the resource sync info may have been changed by an external tool It is not always easy to differentiate external changes from intenal ones Therefore the changed resources may include some whose sync info was changed internally This method is called from a POST CHANGE delta listener so the workspace cannot be modified param change Resources that have sync info state changes  POST_CHANGE changeResources
Notifies this listener that the resource s have been modified This doesn t necessarily mean that the resource state is Modified The listener must check the state p Note This method is called by CVS team core it is not intended to be called directly by clients p param changed Resources that have changed state param change Type the type of state change  isModified changedResources changeType
Notifies this listener that the project has just been configured to be a CVS project p Note This method is called by the CVS core it is not intended to be called directly by clients p param project The project that has just been configured 
Notifies this listener that the project has just been deconfigured and no longer has the CVS nature p Note This method is called by the CVS core it is not intended to be called directly by clients p param project The project that has just been configured 

public interface I Server Connection Open a connection to the CVS server Throw CVS Authentication Exception if the username or password is invalid Throw IO Exceptions for other failures  IServerConnection CVSAuthenticationException IOExceptions
public void open I Progress Monitor monitor throws IO Exception CVS Authentication Exception Close the connection Throw IO Exception on failures  IProgressMonitor IOException CVSAuthenticationException IOException
public void close throws IO Exception Get the input stream to receive responses from the server public Input Stream get Input Stream  IOException InputStream getInputStream
public Input Stream get Input Stream Get the output stream to send requests to the server public Output Stream get Output Stream  InputStream getInputStream OutputStream getOutputStream

Authenticates the user for access to a given repository The obtained values for user name and password will be placed into the supplied user info object Implementors are allowed to save user names and passwords The user should be prompted for user name and password if there is no saved one or if code retry code is code true code param location The repository location to authenticate the user for or code null code if this authentication is not for a CVS repository location param info The object to place user validation information into param retry code true code if a previous attempt to log in failed param message An optional message to display if e g previous authentication failed return true if the validation was successful and false otherwise 
Prompts the user for a number values using text fields The labels are provided in the core prompt code array Implementors will return the entered values or null if the user cancel the prompt param location The repository location to authenticate the user for or code null code if this authentication is not for a CVS repository location param destination The destination in the format like username hostname port param name A name about this dialog param instruction A message for the instruction param prompt Labels for text fields param echo the array to show which fields are secret return the entered values or null if the user canceled since 3 0 
Prompts the authenticator for additional information regarding this authentication request A default implementation of this method should return the code default Response code whereas alternate implementations could prompt the user with a dialog param location the repository location for this authentication or code null code if this authentication is not for a CVS repository location param prompt Type one of the following values ul li code NONE code for a unspecified prompt type li li code ERROR code for an error prompt li li code INFORMATION code for an information prompt li li code QUESTION code for a question prompt li li code WARNING code for a warning prompt li ul param title the prompt title that could be displayed to the user param message the prompt param prompt Responses the possible responses to the prompt param default Response the default response to the prompt return the response to the prompt since 3 0  defaultResponse promptType promptResponses defaultResponse

public interface I User Info Get the username for this user public String get Username  IUserInfo getUsername
public String get Username Return true if the username is mutable If not set Username should not be called public boolean is Username Mutable  getUsername setUsername isUsernameMutable
public boolean is Username Mutable Sets the password for this user public void set Password String password  isUsernameMutable setPassword
public void set Password String password Sets the username for this user This should not be called if is Username Mutable returns false  setPassword isUsernameMutable

Creates a NLS catalog for the given locale public static void localize String bundle Name bundle Resource Bundle get Bundle bundle Name  bundleName ResourceBundle getBundle bundleName
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string public static String bind String id String binding return bind id new String binding 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings public static String bind String id String binding1 String binding2 return bind id new String binding1 binding2 
Gets a string from the resource bundle We don t want to crash because of a missing String Returns the key if not found public static String bind String key try return bundle get String key catch Missing Resource Exception e return key catch Null Pointer Exception e return key NON NLS 1 NON NLS 2  getString MissingResourceException NullPointerException
Gets a string from the resource bundle and binds it with the given arguments If the key is not found return the key public static String bind String key Object args try return Message Format format bind key args catch Missing Resource Exception e return key catch Null Pointer Exception e return key NON NLS 1 NON NLS 2  MessageFormat MissingResourceException NullPointerException
Progress monitor helpers public static void check Canceled I Progress Monitor monitor if monitor is Canceled throw new Operation Canceled Exception  checkCanceled IProgressMonitor isCanceled OperationCanceledException
public static I Progress Monitor monitor For I Progress Monitor monitor if monitor null return new Null Progress Monitor return monitor  IProgressMonitor monitorFor IProgressMonitor NullProgressMonitor
public static I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks  IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor
public static I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks int style if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks style  IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor
public static I Progress Monitor infinite Sub Monitor For I Progress Monitor monitor int ticks if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Infinite Sub Progress Monitor monitor ticks  IProgressMonitor infiniteSubMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor InfiniteSubProgressMonitor

private static String get Name In Internal Format CVS Tag tag if tag get Type DATE String s ensure Entry Line Format tag get Name if s null return s return tag get Name  getNameInInternalFormat CVSTag getType ensureEntryLineFormat getName getName
private static synchronized String ensure Entry Line Format String text if text length ENTRY LINE DATE TAG FORMAT length return text Date date tag Name To Date text if date null return text entry Line Date Tag Formatter set Time Zone Time Zone get Default return entry Line Date Tag Formatter format date  ensureEntryLineFormat ENTRY_LINE_DATE_TAG_FORMAT tagNameToDate entryLineDateTagFormatter setTimeZone TimeZone getDefault entryLineDateTagFormatter
static synchronized public Date entry Line To Date String text try return entry Line Date Tag Formatter parse text catch Parse Exception e CVS Provider Plugin log new CVS Exception Tag name text is not of the expected format ENTRY LINE DATE TAG FORMAT e NON NLS 1 NON NLS 2 return null  entryLineToDate entryLineDateTagFormatter ParseException CVSProviderPlugin CVSException ENTRY_LINE_DATE_TAG_FORMAT
The parameter tag must not be null public CVS Entry Line Tag CVS Tag tag super get Name In Internal Format tag tag get Type  CVSEntryLineTag CVSTag getNameInInternalFormat getType
public CVS Entry Line Tag String entry Line Tag switch entry Line Tag char At 0 case T type BRANCH break case N type VERSION break case D type DATE break default type HEAD name entry Line Tag substring 1  CVSEntryLineTag entryLineTag entryLineTag charAt entryLineTag
public String get Name if get Type DATE Use same format as CVS Tag when the name is requested Date date as Date if date null return date To Tag Name date return name  getName getType CVSTag asDate dateToTagName
Returns the tag type public int get Type return type  getType
public String to Entry Line Format boolean use Same Prefix For Branch And Tag if type BRANCH type VERSION use Same Prefix For Branch And Tag return T name NON NLS 1 else if type VERSION return N name NON NLS 1 else if type DATE return D name NON NLS 1 return NON NLS 1  toEntryLineFormat useSamePrefixForBranchAndTag useSamePrefixForBranchAndTag
For debugging purposes public String to String return to Entry Line Format false  toString toEntryLineFormat
see org eclipse team internal ccvs core CVS Tag as Date public Date as Date return entry Line To Date name  CVSTag asDate asDate entryLineToDate

private ICVS Folder local Root public CVS Workspace Root I Container resource this local Root getCVS Folder For resource  ICVSFolder localRoot CVSWorkspaceRoot IContainer localRoot getCVSFolderFor
Set the sharing for a project to enable it to be used with the CVS Team Provider This method ensure that the repository in the Folder Sync Info is known and that the project is mapped to a CVS repository provider It does not modify the sync info associated with the project s resources in any way public static void set Sharing I Project project Folder Sync Info info I Progress Monitor monitor throws Team Exception Ensure provided info matches that of the project ICVS Folder folder ICVS Folder CVS Workspace Root getCVS Resource For project Folder Sync Info folder Info folder get Folder Sync Info if info equals folder Info throw new CVS Exception new CVS Status CVS Status ERROR Policy bind CVS Provider info Mismatch project get Name NON NLS 1 Register the project with Team Repository Provider map project CVS Provider Plugin get Type Id  CVSTeamProvider FolderSyncInfo setSharing IProject FolderSyncInfo IProgressMonitor TeamException ICVSFolder ICVSFolder CVSWorkspaceRoot getCVSResourceFor FolderSyncInfo folderInfo getFolderSyncInfo folderInfo CVSException CVSStatus CVSStatus CVSProvider infoMismatch getName RepositoryProvider CVSProviderPlugin getTypeId
Answer the list of directories that a checkout of the given resources would expand to In other words the returned strings represent the root paths that the given resources would be loaded into public static String get Expansions ICVS Remote Folder resources I Progress Monitor monitor throws CVS Exception if resources length 0 return new String 0 Get the location of the workspace root ICVS Folder root CVS Workspace Root getCVS Folder For Resources Plugin get Workspace get Root Get the command arguments String arguments new String resources length for int i 0 i resources length i if resources i instanceof Remote Module arguments i Remote Module resources i get Name else arguments i resources i get Repository Relative Path Perform the Expand Modules command I Status status Session s new Session resources 0 get Repository root s open monitor false read only try status Request EXPAND MODULES execute s arguments monitor finally s close if status get Code CVS Status SERVER ERROR throw new CVS Server Exception status return s get Module Expansions  getExpansions ICVSRemoteFolder IProgressMonitor CVSException ICVSFolder CVSWorkspaceRoot getCVSFolderFor ResourcesPlugin getWorkspace getRoot RemoteModule RemoteModule getName getRepositoryRelativePath IStatus getRepository EXPAND_MODULES getCode CVSStatus SERVER_ERROR CVSServerException getModuleExpansions
public static ICVS Folder getCVS Folder For I Container resource return new Eclipse Folder resource  ICVSFolder getCVSFolderFor IContainer EclipseFolder
public static ICVS File getCVS File For I File resource return new Eclipse File resource  ICVSFile getCVSFileFor IFile EclipseFile
public static ICVS Resource getCVS Resource For I Resource resource if resource get Type I Resource FILE return getCVS File For I File resource else return getCVS Folder For I Container resource  ICVSResource getCVSResourceFor IResource getType IResource getCVSFileFor IFile getCVSFolderFor IContainer
public static ICVS Remote Resource get Remote Resource For I Resource resource throws CVS Exception ICVS Resource managed getCVS Resource For resource return get Remote Resource For managed  ICVSRemoteResource getRemoteResourceFor IResource CVSException ICVSResource getCVSResourceFor getRemoteResourceFor
public static ICVS Remote Resource get Remote Resource For ICVS Resource resource throws CVS Exception if resource is Folder ICVS Folder folder ICVS Folder resource Folder Sync Info sync Info folder get Folder Sync Info if sync Info null return new Remote Folder null Known Repositories get Instance get Repository sync Info get Root sync Info get Repository sync Info get Tag else if resource is Managed Remote Folder parent Remote Folder get Remote Resource For resource get Parent if parent null This could be caused by another thread changing the state in the instant between when we did the managed check and we obtained the parent handle If this is the case is Managed should return false now If it doesn t then we should log an error if resource is Managed CVS Provider Plugin log new CVS Exception Policy bind CVS Workspace Root 11 Util get Fullest Path resource NON NLS 1 else return Remote File get Base parent ICVS File resource return null  ICVSRemoteResource getRemoteResourceFor ICVSResource CVSException isFolder ICVSFolder ICVSFolder FolderSyncInfo syncInfo getFolderSyncInfo syncInfo RemoteFolder KnownRepositories getInstance getRepository syncInfo getRoot syncInfo getRepository syncInfo getTag isManaged RemoteFolder RemoteFolder getRemoteResourceFor getParent isManaged isManaged CVSProviderPlugin CVSException CVSWorkspaceRoot getFullestPath RemoteFile getBase ICVSFile
private static ICVS Remote Resource get Remote Tree From Parent I Resource resource ICVS Resource managed CVS Tag tag I Progress Monitor progress throws Team Exception If the parent isn t mapped to CVS there s nothing we can do ICVS Folder parent managed get Parent Folder Sync Info sync Info parent get Folder Sync Info if sync Info null The parent is managed so just indicate that there is no remote return null ICVS Repository Location location Known Repositories get Instance get Repository parent get Folder Sync Info get Root Remote Folder remote Parent Remote Folder Tree Builder build Remote Tree CVS Repository Location location parent tag progress ICVS Remote Resource remote null if remote Parent null try remote ICVS Remote Resource remote Parent get Child resource get Name catch CVS Exception e remote null The types need to match or we re in trouble if remote null remote is Container managed is Folder throw new CVS Exception new CVS Status CVS Status ERROR Policy bind CVS Team Provider types Differ resource get Full Path to String null NON NLS 1 return remote  ICVSRemoteResource getRemoteTreeFromParent IResource ICVSResource CVSTag IProgressMonitor TeamException ICVSFolder getParent FolderSyncInfo syncInfo getFolderSyncInfo syncInfo ICVSRepositoryLocation KnownRepositories getInstance getRepository getFolderSyncInfo getRoot RemoteFolder remoteParent RemoteFolderTreeBuilder buildRemoteTree CVSRepositoryLocation ICVSRemoteResource remoteParent ICVSRemoteResource remoteParent getChild getName CVSException isContainer isFolder CVSException CVSStatus CVSStatus CVSTeamProvider typesDiffer getFullPath toString
public static ICVS Remote Resource get Remote Tree I Resource resource CVS Tag tag I Progress Monitor progress throws Team Exception return get Remote Tree resource tag false cache file contents hint progress  ICVSRemoteResource getRemoteTree IResource CVSTag IProgressMonitor TeamException getRemoteTree
Return the remote tree that corresponds to the given local resource Return code null code if the remote tree doesn t exist remotely or if the local resource is not mapped to a remote i e is not managed by CVS param resource the local resource param tag the tag to be queried remotely param cache File Contents Hint hint which indicates whether file contents will be required param progress return the remote tree or code null code throws Team Exception public static ICVS Remote Resource get Remote Tree I Resource resource CVS Tag tag boolean cache File Contents Hint I Progress Monitor progress throws Team Exception ICVS Resource managed CVS Workspace Root getCVS Resource For resource ICVS Remote Resource remote CVS Workspace Root get Remote Resource For resource if remote null progress begin Task null 100 remote get Remote Tree From Parent resource managed tag Policy sub Monitor For progress 50 if cache File Contents Hint remote null remote instanceof Remote File Remote File file Remote File remote get the storage for the file to ensure that the contents are cached file get Storage Policy sub Monitor For progress 50 progress done else if resource get Type I Resource FILE ICVS Repository Location location remote get Repository if cache File Contents Hint remote File Content Caching Service build Remote Tree CVS Repository Location location ICVS File managed tag progress else remote Remote Folder Tree Builder build Remote Tree CVS Repository Location location ICVS File managed tag progress else ICVS Repository Location location remote get Repository if cache File Contents Hint remote File Content Caching Service build Remote Tree CVS Repository Location location ICVS Folder managed tag progress else remote Remote Folder Tree Builder build Remote Tree CVS Repository Location location ICVS Folder managed tag progress return remote  cacheFileContentsHint TeamException ICVSRemoteResource getRemoteTree IResource CVSTag cacheFileContentsHint IProgressMonitor TeamException ICVSResource CVSWorkspaceRoot getCVSResourceFor ICVSRemoteResource CVSWorkspaceRoot getRemoteResourceFor beginTask getRemoteTreeFromParent subMonitorFor cacheFileContentsHint RemoteFile RemoteFile RemoteFile getStorage subMonitorFor getType IResource ICVSRepositoryLocation getRepository cacheFileContentsHint FileContentCachingService buildRemoteTree CVSRepositoryLocation ICVSFile RemoteFolderTreeBuilder buildRemoteTree CVSRepositoryLocation ICVSFile ICVSRepositoryLocation getRepository cacheFileContentsHint FileContentCachingService buildRemoteTree CVSRepositoryLocation ICVSFolder RemoteFolderTreeBuilder buildRemoteTree CVSRepositoryLocation ICVSFolder
public static boolean has Remote I Resource resource try ICVS Resource cvs Resource getCVS Resource For resource int type resource get Type if type I Resource FILE if type I Resource PROJECT return ICVS Folder cvs Resource isCVS Folder else return cvs Resource is Managed else byte sync Bytes ICVS File cvs Resource get Sync Bytes if sync Bytes null return Resource Sync Info is Addition sync Bytes else return false catch CVS Exception e return false  hasRemote IResource ICVSResource cvsResource getCVSResourceFor getType IResource IResource ICVSFolder cvsResource isCVSFolder cvsResource isManaged syncBytes ICVSFile cvsResource getSyncBytes syncBytes ResourceSyncInfo isAddition syncBytes CVSException
public ICVS Repository Location get Remote Location throws CVS Exception Folder Sync Info info local Root get Folder Sync Info if info null throw new CVS Exception Policy bind CVS Workspace Root notCVS Folder local Root get Name NON NLS 1 return Known Repositories get Instance get Repository info get Root  ICVSRepositoryLocation getRemoteLocation CVSException FolderSyncInfo localRoot getFolderSyncInfo CVSException CVSWorkspaceRoot notCVSFolder localRoot getName KnownRepositories getInstance getRepository getRoot
public ICVS Folder get Local Root return local Root  ICVSFolder getLocalRoot localRoot
Return true if the resource is part of a link i e a linked resource or one of it s children param container return boolean public static boolean is Linked Resource I Resource resource check the resource directly first if resource is Linked return true projects and root cannot be links if resource get Type I Resource PROJECT resource get Type I Resource ROOT return false look one level under the project to see if the resource is part of a link String linked Parent Name resource get Project Relative Path segment 0 I Folder linked Parent resource get Project get Folder linked Parent Name return linked Parent is Linked  isLinkedResource IResource isLinked getType IResource getType IResource linkedParentName getProjectRelativePath IFolder linkedParent getProject getFolder linkedParentName linkedParent isLinked
A resource is considered shared param resource return boolean public static boolean is Shared WithCVS I Resource resource throws CVS Exception if resource is Accessible return false if is Linked Resource resource return false if Repository Provider get Provider resource get Project CVS Provider Plugin get Type Id null return false ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource if cvs Resource is Managed return true if cvs Resource exists return false if cvs Resource is Folder ICVS Folder cvs Resource isCVS Folder return true if cvs Resource is Ignored return false return cvs Resource get Parent isCVS Folder  isSharedWithCVS IResource CVSException isAccessible isLinkedResource RepositoryProvider getProvider getProject CVSProviderPlugin getTypeId ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor cvsResource isManaged cvsResource cvsResource isFolder ICVSFolder cvsResource isCVSFolder cvsResource isIgnored cvsResource getParent isCVSFolder
Return whether the given container is an orphaned subtree An orphaned subtree is folder i e non project that is a CVS folder but is not managed and is not a linked resource To know if the resource is a descendant of an orphaned subtree the client must invoked this method for each ancestor of a resource param container the container being tested return whether the container is an orphaned CVS folder throws CVS Exception public static boolean is Orphaned Subtree I Container container throws CVS Exception ICVS Folder m Folder CVS Workspace Root getCVS Folder For container return m Folder isCVS Folder m Folder is Managed m Folder getI Resource get Type I Resource FOLDER is Linked Resource container  CVSException isOrphanedSubtree IContainer CVSException ICVSFolder mFolder CVSWorkspaceRoot getCVSFolderFor mFolder isCVSFolder mFolder isManaged mFolder getIResource getType IResource isLinkedResource

Create a handle based on the given local resource protected Eclipse File I File file super file  EclipseFile IFile
public void delete throws CVS Exception try I File resource delete false force true keep History null catch Core Exception e throw CVS Exception wrap Exception resource Policy bind EclipseFile Problem deleting resource resource get Full Path to String e get Status get Message e NON NLS 1 NON NLS 2  CVSException IFile keepHistory CoreException CVSException wrapException EclipseFile_Problem_deleting_resource getFullPath toString getStatus getMessage
public long get Size return getIO File length  getSize getIOFile
public Input Stream get Contents throws CVS Exception try return getI File get Contents catch Core Exception e throw CVS Exception wrap Exception resource Policy bind EclipseFile Problem accessing resource resource get Full Path to String e get Status get Message e NON NLS 1 NON NLS 2  InputStream getContents CVSException getIFile getContents CoreException CVSException wrapException EclipseFile_Problem_accessing_resource getFullPath toString getStatus getMessage
public Date get Time Stamp long timestamp getI File get Local Time Stamp if timestamp I Resource NULL STAMP If there is no file return the same timestamp as io File last Modified would return new Date 0L return new Date timestamp 1000 1000  getTimeStamp getIFile getLocalTimeStamp IResource NULL_STAMP ioFile lastModified
public void set Time Stamp Date date throws CVS Exception long time if date null time System current Time Millis else time date get Time Eclipse Synchronizer get Instance set Time Stamp this time  setTimeStamp CVSException currentTimeMillis getTime EclipseSynchronizer getInstance setTimeStamp
see ICVS Resource is Folder public boolean is Folder return false  ICVSResource isFolder isFolder
public boolean is Modified I Progress Monitor monitor throws CVS Exception ignore the monitor there is no valuable progress to be shown when calculating the dirty state for files It is relatively fast if exists return get Sync Bytes null int state Eclipse Synchronizer get Instance get Modification State getI File if state UNKNOWN boolean dirty state CLEAN Check to make sure that cached state is the real state They can be different if deltas happen in the wrong order if dirty is Dirty return dirty nothing cached need to manually check and record byte sync Bytes get Sync Bytes if sync Bytes null is Ignored return false unmanaged files are reported as modified return Eclipse Synchronizer get Instance set Modified this UNKNOWN  isModified IProgressMonitor CVSException getSyncBytes EclipseSynchronizer getInstance getModificationState getIFile isDirty syncBytes getSyncBytes syncBytes isIgnored EclipseSynchronizer getInstance setModified
see ICVS Resource accept ICVS Resource Visitor public void accept ICVS Resource Visitor visitor throws CVS Exception visitor visit File this  ICVSResource ICVSResourceVisitor ICVSResourceVisitor CVSException visitFile
see ICVS Resource accept ICVS Resource Visitor boolean public void accept ICVS Resource Visitor visitor boolean recurse throws CVS Exception visitor visit File this  ICVSResource ICVSResourceVisitor ICVSResourceVisitor CVSException visitFile
public void copy To String filename throws CVS Exception try I Path target Path new Path filename I File target File getI File get Parent get File target Path if target File exists There is a file in the target location Delete it and keep the history just in case target File delete false force true keep history null getI File copy target Path true force null catch Core Exception e throw new CVS Exception e get Status  copyTo CVSException IPath targetPath IFile targetFile getIFile getParent getFile targetPath targetFile targetFile getIFile targetPath CoreException CVSException getStatus
see ICVS Resource get Remote Location public String get Remote Location ICVS Folder stop Searching throws CVS Exception return get Parent get Remote Location stop Searching SEPARATOR get Name  ICVSResource getRemoteLocation getRemoteLocation ICVSFolder stopSearching CVSException getParent getRemoteLocation stopSearching getName
public void set Contents Input Stream stream int response Type boolean keep Local History I Progress Monitor monitor throws CVS Exception try I File file getI File if PROJECT META DATA PATH equals file get Full Path remove First Segments 1 response Type UPDATED switch response Type case UPDATED if resource exists file set Contents stream true force true keep history monitor break case CREATED creating a new file so it should not exist locally file create stream false force monitor break case MERGED merging contents into a file that exists locally Ensure we don t leave the file in a partially written state I File temp File file get Parent get File new Path file get Name TEMP FILE EXTENSION monitor begin Task null 100 if temp File exists temp File delete true Policy sub Monitor For monitor 25 temp File create stream true force Policy sub Monitor For monitor 25 file delete false true Policy sub Monitor For monitor 25 temp File move new Path file get Name true force false history Policy sub Monitor For monitor 25 monitor done break case UPDATE EXISTING creating a new file so it should exist locally file set Contents stream true force true keep history monitor break catch Core Exception e String message null if e get Status get Code I Resource Status FAILED READ LOCAL This error indicates that Core couldn t read from the server stream The real reason will be in the message of the wrapped exception Throwable t e get Status get Exception if t null message t get Message if message null message e get Message throw CVS Exception wrap Exception resource Policy bind EclipseFile Problem writing resource resource get Full Path to String message e NON NLS 1  setContents InputStream responseType keepLocalHistory IProgressMonitor CVSException IFile getIFile PROJECT_META_DATA_PATH getFullPath removeFirstSegments responseType responseType setContents IFile tempFile getParent getFile getName TEMP_FILE_EXTENSION beginTask tempFile tempFile subMonitorFor tempFile subMonitorFor subMonitorFor tempFile getName subMonitorFor UPDATE_EXISTING setContents CoreException getStatus getCode IResourceStatus FAILED_READ_LOCAL getStatus getException getMessage getMessage CVSException wrapException EclipseFile_Problem_writing_resource getFullPath toString
see ICVS File set Read Only public void set Read Only boolean read Only throws CVS Exception getI File set Read Only read Only  ICVSFile setReadOnly setReadOnly readOnly CVSException getIFile setReadOnly readOnly
see ICVS File is Read Only public boolean is Read Only throws CVS Exception return getI File is Read Only  ICVSFile isReadOnly isReadOnly CVSException getIFile isReadOnly
Typecasting helper public I File getI File return I File resource  IFile getIFile IFile
private File getIO File I Path location resource get Location if location null return location to File return null  getIOFile IPath getLocation toFile
see ICVS File get Log Entries I Progress Monitor public I Log Entry get Log Entries I Progress Monitor monitor throws Team Exception byte sync Bytes get Sync Bytes if sync Bytes null Resource Sync Info is Addition sync Bytes ICVS Remote Resource remote File CVS Workspace Root get Remote Resource For resource return ICVS Remote File remote File get Log Entries monitor return new I Log Entry 0  ICVSFile getLogEntries IProgressMonitor ILogEntry getLogEntries IProgressMonitor TeamException syncBytes getSyncBytes syncBytes ResourceSyncInfo isAddition syncBytes ICVSRemoteResource remoteFile CVSWorkspaceRoot getRemoteResourceFor ICVSRemoteFile remoteFile getLogEntries ILogEntry
see org eclipse team internal ccvs core ICVS File set Notify Info Notify Info public void set Notify Info Notify Info info throws CVS Exception if is Managed Eclipse Synchronizer get Instance set Notify Info resource info On an edit the base should be cached On an unedit the base should be restored and cleared On a commit the base should be cleared  ICVSFile setNotifyInfo NotifyInfo setNotifyInfo NotifyInfo CVSException isManaged EclipseSynchronizer getInstance setNotifyInfo
see org eclipse team internal ccvs core ICVS File get Notify Info public Notify Info get Notify Info throws CVS Exception if is Managed return Eclipse Synchronizer get Instance get Notify Info resource return null  ICVSFile getNotifyInfo NotifyInfo getNotifyInfo CVSException isManaged EclipseSynchronizer getInstance getNotifyInfo
see org eclipse team internal ccvs core ICVS File set Notify Info Notify Info public void set Baserev Info Baserev Info info throws CVS Exception if is Managed if info null Eclipse Synchronizer get Instance delete Baserev Info resource Eclipse Synchronizer get Instance delete File From Base Directory getI File null else Eclipse Synchronizer get Instance set Baserev Info resource info  ICVSFile setNotifyInfo NotifyInfo setBaserevInfo BaserevInfo CVSException isManaged EclipseSynchronizer getInstance deleteBaserevInfo EclipseSynchronizer getInstance deleteFileFromBaseDirectory getIFile EclipseSynchronizer getInstance setBaserevInfo
see org eclipse team internal ccvs core ICVS File get Notify Info public Baserev Info get Baserev Info throws CVS Exception if is Managed return Eclipse Synchronizer get Instance get Baserev Info resource return null  ICVSFile getNotifyInfo BaserevInfo getBaserevInfo CVSException isManaged EclipseSynchronizer getInstance getBaserevInfo
run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception byte sync Bytes get Sync Bytes if sync Bytes null Resource Sync Info is Addition sync Bytes return convert the notifications to internal form char internal Format if notifications NO NOTIFICATION internal Format null else if notifications NOTIFY ON ALL internal Format Notify Info ALL else List notification Characters new Array List if notifications NOTIFY ON EDIT 0 notification Characters add new Character Notify Info EDIT if notifications NOTIFY ON UNEDIT 0 notification Characters add new Character Notify Info UNEDIT if notifications NOTIFY ON COMMIT 0 notification Characters add new Character Notify Info COMMIT internal Format new char notification Characters size for int i 0 i internal Format length i internal Format i Character notification Characters get i char Value record the notification Notify Info notify Info new Notify Info get Name Notify Info EDIT new Date internal Format set Notify Info notify Info Only record the base if the file is not modified if is Modified null Eclipse Synchronizer get Instance copy File To Base Directory getI File monitor set Baserev Info new Baserev Info get Name Resource Sync Info get Revision sync Bytes allow editing set Read Only false  ICVSRunnable IProgressMonitor CVSException syncBytes getSyncBytes syncBytes ResourceSyncInfo isAddition syncBytes internalFormat NO_NOTIFICATION internalFormat NOTIFY_ON_ALL internalFormat NotifyInfo notificationCharacters ArrayList NOTIFY_ON_EDIT notificationCharacters NotifyInfo NOTIFY_ON_UNEDIT notificationCharacters NotifyInfo NOTIFY_ON_COMMIT notificationCharacters NotifyInfo internalFormat notificationCharacters internalFormat internalFormat notificationCharacters charValue NotifyInfo notifyInfo NotifyInfo getName NotifyInfo internalFormat setNotifyInfo notifyInfo isModified EclipseSynchronizer getInstance copyFileToBaseDirectory getIFile setBaserevInfo BaserevInfo getName ResourceSyncInfo getRevision syncBytes setReadOnly
see org eclipse team internal ccvs core ICVS File checkout int public void edit final int notifications I Progress Monitor monitor throws CVS Exception if is Read Only return run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception byte sync Bytes get Sync Bytes if sync Bytes null Resource Sync Info is Addition sync Bytes return convert the notifications to internal form char internal Format if notifications NO NOTIFICATION internal Format null else if notifications NOTIFY ON ALL internal Format Notify Info ALL else List notification Characters new Array List if notifications NOTIFY ON EDIT 0 notification Characters add new Character Notify Info EDIT if notifications NOTIFY ON UNEDIT 0 notification Characters add new Character Notify Info UNEDIT if notifications NOTIFY ON COMMIT 0 notification Characters add new Character Notify Info COMMIT internal Format new char notification Characters size for int i 0 i internal Format length i internal Format i Character notification Characters get i char Value record the notification Notify Info notify Info new Notify Info get Name Notify Info EDIT new Date internal Format set Notify Info notify Info Only record the base if the file is not modified if is Modified null Eclipse Synchronizer get Instance copy File To Base Directory getI File monitor set Baserev Info new Baserev Info get Name Resource Sync Info get Revision sync Bytes allow editing set Read Only false monitor  ICVSFile IProgressMonitor CVSException isReadOnly ICVSRunnable IProgressMonitor CVSException syncBytes getSyncBytes syncBytes ResourceSyncInfo isAddition syncBytes internalFormat NO_NOTIFICATION internalFormat NOTIFY_ON_ALL internalFormat NotifyInfo notificationCharacters ArrayList NOTIFY_ON_EDIT notificationCharacters NotifyInfo NOTIFY_ON_UNEDIT notificationCharacters NotifyInfo NOTIFY_ON_COMMIT notificationCharacters NotifyInfo internalFormat notificationCharacters internalFormat internalFormat notificationCharacters charValue NotifyInfo notifyInfo NotifyInfo getName NotifyInfo internalFormat setNotifyInfo notifyInfo isModified EclipseSynchronizer getInstance copyFileToBaseDirectory getIFile setBaserevInfo BaserevInfo getName ResourceSyncInfo getRevision syncBytes setReadOnly
run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception record the notification Notify Info info get Notify Info if info null info get Notification Type Notify Info EDIT info null else info new Notify Info get Name Notify Info UNEDIT new Date null set Notify Info info if is Modified null Resource Sync Info sync Info get Sync Info Baserev Info baserev Info get Baserev Info Eclipse Synchronizer get Instance restore File From Base Directory getI File monitor reset any changes that may have been merged from the server if sync Info get Revision equals baserev Info get Revision Mutable Resource Sync Info new Info sync Info clone Mutable new Info set Revision baserev Info get Revision new Info set Time Stamp get Time Stamp new Info set Deleted false set Sync Info new Info ICVS File CLEAN else an unedited file is no longer modified Eclipse Synchronizer get Instance set Modified Eclipse File this CLEAN else We still need to report a state change set Sync Bytes get Sync Bytes ICVS File CLEAN set Baserev Info null prevent editing set Read Only true  ICVSRunnable IProgressMonitor CVSException NotifyInfo getNotifyInfo getNotificationType NotifyInfo NotifyInfo getName NotifyInfo setNotifyInfo isModified ResourceSyncInfo syncInfo getSyncInfo BaserevInfo baserevInfo getBaserevInfo EclipseSynchronizer getInstance restoreFileFromBaseDirectory getIFile syncInfo getRevision baserevInfo getRevision MutableResourceSyncInfo newInfo syncInfo cloneMutable newInfo setRevision baserevInfo getRevision newInfo setTimeStamp getTimeStamp newInfo setDeleted setSyncInfo newInfo ICVSFile EclipseSynchronizer getInstance setModified EclipseFile setSyncBytes getSyncBytes ICVSFile setBaserevInfo setReadOnly
see org eclipse team internal ccvs core ICVS File uncheckout public void unedit I Progress Monitor monitor throws CVS Exception if is Read Only return run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception record the notification Notify Info info get Notify Info if info null info get Notification Type Notify Info EDIT info null else info new Notify Info get Name Notify Info UNEDIT new Date null set Notify Info info if is Modified null Resource Sync Info sync Info get Sync Info Baserev Info baserev Info get Baserev Info Eclipse Synchronizer get Instance restore File From Base Directory getI File monitor reset any changes that may have been merged from the server if sync Info get Revision equals baserev Info get Revision Mutable Resource Sync Info new Info sync Info clone Mutable new Info set Revision baserev Info get Revision new Info set Time Stamp get Time Stamp new Info set Deleted false set Sync Info new Info ICVS File CLEAN else an unedited file is no longer modified Eclipse Synchronizer get Instance set Modified Eclipse File this CLEAN else We still need to report a state change set Sync Bytes get Sync Bytes ICVS File CLEAN set Baserev Info null prevent editing set Read Only true monitor  ICVSFile IProgressMonitor CVSException isReadOnly ICVSRunnable IProgressMonitor CVSException NotifyInfo getNotifyInfo getNotificationType NotifyInfo NotifyInfo getName NotifyInfo setNotifyInfo isModified ResourceSyncInfo syncInfo getSyncInfo BaserevInfo baserevInfo getBaserevInfo EclipseSynchronizer getInstance restoreFileFromBaseDirectory getIFile syncInfo getRevision baserevInfo getRevision MutableResourceSyncInfo newInfo syncInfo cloneMutable newInfo setRevision baserevInfo getRevision newInfo setTimeStamp getTimeStamp newInfo setDeleted setSyncInfo newInfo ICVSFile EclipseSynchronizer getInstance setModified EclipseFile setSyncBytes getSyncBytes ICVSFile setBaserevInfo setReadOnly
see org eclipse team internal ccvs core ICVS File notification Completed public void notification Completed throws CVS Exception Eclipse Synchronizer get Instance delete Notify Info resource  ICVSFile notificationCompleted notificationCompleted CVSException EclipseSynchronizer getInstance deleteNotifyInfo
see org eclipse team internal ccvs core ICVS File get Pending Notification public Notify Info get Pending Notification throws CVS Exception return get Notify Info  ICVSFile getPendingNotification NotifyInfo getPendingNotification CVSException getNotifyInfo
see org eclipse team internal ccvs core ICVS File committed String public void checked In String entry Line throws CVS Exception Resource Sync Info old Info get Sync Info Resource Sync Info new Info null int modification State ICVS File CLEAN if entry Line null The file contents matched the server contents so no entry line was sent if old Info null return Date time Stamp old Info get Time Stamp if time Stamp null old Info is Merged With Conflicts If the entry line has no timestamp put the file timestamp in the entry line if old Info is Added Mutable Resource Sync Info mutable old Info clone Mutable mutable set Time Stamp get Time Stamp true clear merged new Info mutable else reset the file timestamp to the one from the entry line set Time Stamp time Stamp new Info null No need to set the new Info as there is no sync info change modified false the file will be no longer modified else if old Info null cvs add of a file new Info new Resource Sync Info entry Line null null an added file should show up as modified modification State ICVS File DIRTY else commit of a changed file new Info new Resource Sync Info entry Line old Info get Permissions get Time Stamp modified false a committed file is no longer modified if new Info null set Sync Info new Info modification State clear Cached Base  ICVSFile checkedIn entryLine CVSException ResourceSyncInfo oldInfo getSyncInfo ResourceSyncInfo newInfo modificationState ICVSFile entryLine oldInfo timeStamp oldInfo getTimeStamp timeStamp oldInfo isMergedWithConflicts oldInfo isAdded MutableResourceSyncInfo oldInfo cloneMutable setTimeStamp getTimeStamp newInfo setTimeStamp timeStamp newInfo newInfo oldInfo newInfo ResourceSyncInfo entryLine modificationState ICVSFile newInfo ResourceSyncInfo entryLine oldInfo getPermissions getTimeStamp newInfo setSyncInfo newInfo modificationState clearCachedBase
private void clear Cached Base throws CVS Exception Baserev Info base get Baserev Info if base null set Baserev Info null set Read Only true  clearCachedBase CVSException BaserevInfo getBaserevInfo setBaserevInfo setReadOnly
public void unmanage I Progress Monitor monitor throws CVS Exception run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception Eclipse File super unmanage monitor clear Cached Base  IProgressMonitor CVSException ICVSRunnable IProgressMonitor CVSException EclipseFile clearCachedBase
see org eclipse team internal ccvs core ICVS Resource unmanage org eclipse core runtime I Progress Monitor public void unmanage I Progress Monitor monitor throws CVS Exception run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception Eclipse File super unmanage monitor clear Cached Base monitor  ICVSResource IProgressMonitor IProgressMonitor CVSException ICVSRunnable IProgressMonitor CVSException EclipseFile clearCachedBase
see org eclipse team internal ccvs core ICVS File is Edited public boolean is Edited throws CVS Exception return Eclipse Synchronizer get Instance is Edited getI File  ICVSFile isEdited isEdited CVSException EclipseSynchronizer getInstance isEdited getIFile
see org eclipse team internal ccvs core ICVS Resource set Sync Info org eclipse team internal ccvs core syncinfo Resource Sync Info public void set Sync Info Resource Sync Info info int modification State throws CVS Exception set Sync Bytes info get Bytes info modification State  ICVSResource setSyncInfo ResourceSyncInfo setSyncInfo ResourceSyncInfo modificationState CVSException setSyncBytes getBytes modificationState
see org eclipse team internal ccvs core resources Eclipse Resource set Sync Bytes byte int public void set Sync Bytes byte sync Bytes int modification State throws CVS Exception set Sync Bytes sync Bytes null modification State  EclipseResource setSyncBytes setSyncBytes syncBytes modificationState CVSException setSyncBytes syncBytes modificationState
private void set Sync Bytes byte sync Bytes Resource Sync Info info int modification State throws CVS Exception Assert is Not Null sync Bytes set Sync Bytes sync Bytes Eclipse Synchronizer get Instance set Modified this modification State  setSyncBytes syncBytes ResourceSyncInfo modificationState CVSException isNotNull syncBytes setSyncBytes syncBytes EclipseSynchronizer getInstance setModified modificationState
public void handle Modification boolean for Addition throws CVS Exception if is Ignored Special case handling for when a resource passes from the un managed state to the ignored state e g ignoring the ignore file Parent dirty state must be recalculated but since the resource s end state is ignored there is a lot of code in the plugin that simply disregards the change to the resource There may be a better was of handling resources that transition from un managed to ignored but for now this seems like the safest change if resource is Derived Eclipse Synchronizer get Instance set Modified this CLEAN return set the modification state to what it really is and return true if the modification state changed Eclipse Synchronizer get Instance set Modified this UNKNOWN  handleModification forAddition CVSException isIgnored isDerived EclipseSynchronizer getInstance setModified EclipseSynchronizer getInstance setModified
public String get Repository Relative Path throws CVS Exception if is Managed return null String parent Path get Parent get Repository Relative Path if parent Path null return null return parent Path Session SERVER SEPARATOR get Name  getRepositoryRelativePath CVSException isManaged parentPath getParent getRepositoryRelativePath parentPath parentPath SERVER_SEPARATOR getName
protected boolean is Dirty throws CVS Exception boolean dirty byte sync Bytes get Sync Bytes if sync Bytes null dirty exists else is Merged must be called because when a file is updated and merged by the cvs server the timestamps are equal Merged files should however be reported as dirty because the user should take action and commit or review the merged contents if Resource Sync Info is Addition sync Bytes Resource Sync Info is Merge sync Bytes exists dirty true else TODO non optimal as Resource Sync Info is created each time Resource Sync Info info new Resource Sync Info sync Bytes dirty get Time Stamp equals info get Time Stamp return dirty  isDirty CVSException syncBytes getSyncBytes syncBytes isMerged ResourceSyncInfo isAddition syncBytes ResourceSyncInfo isMerge syncBytes ResourceSyncInfo ResourceSyncInfo ResourceSyncInfo syncBytes getTimeStamp getTimeStamp

class Eclipse Folder extends Eclipse Resource implements ICVS Folder protected Eclipse Folder I Container container super container  EclipseFolder EclipseResource ICVSFolder EclipseFolder IContainer
see ICVS Folder members int public ICVS Resource members int flags throws CVS Exception final List result new Array List I Resource resources Eclipse Synchronizer get Instance members I Container resource boolean include Files flags FILE MEMBERS 0 flags FILE MEMBERS FOLDER MEMBERS 0 boolean include Folders flags FOLDER MEMBERS 0 flags FILE MEMBERS FOLDER MEMBERS 0 boolean include Managed flags MANAGED MEMBERS 0 flags MANAGED MEMBERS UNMANAGED MEMBERS IGNORED MEMBERS 0 boolean include Unmanaged flags UNMANAGED MEMBERS 0 flags MANAGED MEMBERS UNMANAGED MEMBERS IGNORED MEMBERS 0 boolean include Ignored flags IGNORED MEMBERS 0 boolean include Existing flags EXISTING MEMBERS 0 flags EXISTING MEMBERS PHANTOM MEMBERS 0 boolean include Phantoms flags PHANTOM MEMBERS 0 flags EXISTING MEMBERS PHANTOM MEMBERS 0 for int i 0 i resources length i I Resource resource resources i ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource if include Files resource get Type I Resource FILE include Folders resource get Type I Resource FOLDER boolean is Managed cvs Resource is Managed boolean is Ignored cvs Resource is Ignored if is Managed include Managed is Ignored include Ignored is Managed is Ignored include Unmanaged boolean exists cvs Resource exists if include Existing exists include Phantoms exists is Managed result add cvs Resource return ICVS Resource result to Array new ICVS Resource result size  ICVSFolder ICVSResource CVSException ArrayList IResource EclipseSynchronizer getInstance IContainer includeFiles FILE_MEMBERS FILE_MEMBERS FOLDER_MEMBERS includeFolders FOLDER_MEMBERS FILE_MEMBERS FOLDER_MEMBERS includeManaged MANAGED_MEMBERS MANAGED_MEMBERS UNMANAGED_MEMBERS IGNORED_MEMBERS includeUnmanaged UNMANAGED_MEMBERS MANAGED_MEMBERS UNMANAGED_MEMBERS IGNORED_MEMBERS includeIgnored IGNORED_MEMBERS includeExisting EXISTING_MEMBERS EXISTING_MEMBERS PHANTOM_MEMBERS includePhantoms PHANTOM_MEMBERS EXISTING_MEMBERS PHANTOM_MEMBERS IResource ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor includeFiles getType IResource includeFolders getType IResource isManaged cvsResource isManaged isIgnored cvsResource isIgnored isManaged includeManaged isIgnored includeIgnored isManaged isIgnored includeUnmanaged cvsResource includeExisting includePhantoms isManaged cvsResource ICVSResource toArray ICVSResource
see ICVS Folder create Folder String public ICVS Folder get Folder String name throws CVS Exception if CURRENT LOCAL FOLDER equals name CURRENT LOCAL FOLDER SEPARATOR equals name return this I Path path new Path name if resource get Type I Resource ROOT path segment Count 1 return new Eclipse Folder I Workspace Root resource get Project name else return new Eclipse Folder I Container resource get Folder new Path name  ICVSFolder createFolder ICVSFolder getFolder CVSException CURRENT_LOCAL_FOLDER CURRENT_LOCAL_FOLDER IPath getType IResource segmentCount EclipseFolder IWorkspaceRoot getProject EclipseFolder IContainer getFolder
see ICVS Folder create File String public ICVS File get File String name throws CVS Exception return new Eclipse File I Container resource get File new Path name  ICVSFolder createFile ICVSFile getFile CVSException EclipseFile IContainer getFile
see ICVS Folder mkdir public void mkdir throws CVS Exception try if resource get Type I Resource PROJECT I Project project I Project resource project create null project open null else I Folder resource create false don t force true make local null We need to signal the creation to the synchronizer immediately because we may do additional CVS operations on the folder before the next delta occurs Eclipse Synchronizer get Instance created getI Resource catch Core Exception e throw CVS Exception wrap Exception resource Policy bind EclipseFolder problem creating resource get Full Path to String e get Status get Message e NON NLS 1  ICVSFolder CVSException getType IResource IProject IProject IFolder EclipseSynchronizer getInstance getIResource CoreException CVSException wrapException EclipseFolder_problem_creating getFullPath toString getStatus getMessage
see ICVS Resource is Folder public boolean is Folder return true  ICVSResource isFolder isFolder
see ICVS Folder accept Children ICVS Resource Visitor public void accept Children ICVS Resource Visitor visitor throws CVS Exception Visit files and then folders ICVS Resource sub Files members FILE MEMBERS for int i 0 i sub Files length i sub Files i accept visitor ICVS Resource sub Folders members FOLDER MEMBERS for int i 0 i sub Folders length i sub Folders i accept visitor  ICVSFolder acceptChildren ICVSResourceVisitor acceptChildren ICVSResourceVisitor CVSException ICVSResource subFiles FILE_MEMBERS subFiles subFiles ICVSResource subFolders FOLDER_MEMBERS subFolders subFolders
see ICVS Resource accept ICVS Resource Visitor public void accept ICVS Resource Visitor visitor throws CVS Exception visitor visit Folder this  ICVSResource ICVSResourceVisitor ICVSResourceVisitor CVSException visitFolder
see ICVS Resource accept ICVS Resource Visitor boolean public void accept ICVS Resource Visitor visitor boolean recurse throws CVS Exception visitor visit Folder this ICVS Resource resources if recurse resources members ICVS Folder ALL MEMBERS else resources members ICVS Folder FILE MEMBERS for int i 0 i resources length i resources i accept visitor recurse  ICVSResource ICVSResourceVisitor ICVSResourceVisitor CVSException visitFolder ICVSResource ICVSFolder ALL_MEMBERS ICVSFolder FILE_MEMBERS
see ICVS Resource get Remote Location ICVS Folder public String get Remote Location ICVS Folder stop Searching throws CVS Exception if get Folder Sync Info null return get Folder Sync Info get Remote Location ICVS Folder parent get Parent if parent null equals stop Searching String parent Location parent Location parent get Remote Location stop Searching if parent Location null return parent Location SEPARATOR get Name return null  ICVSResource getRemoteLocation ICVSFolder getRemoteLocation ICVSFolder stopSearching CVSException getFolderSyncInfo getFolderSyncInfo getRemoteLocation ICVSFolder getParent stopSearching parentLocation parentLocation getRemoteLocation stopSearching parentLocation parentLocation getName
see ICVS Folder get Folder Info public Folder Sync Info get Folder Sync Info throws CVS Exception return Eclipse Synchronizer get Instance get Folder Sync I Container resource  ICVSFolder getFolderInfo FolderSyncInfo getFolderSyncInfo CVSException EclipseSynchronizer getInstance getFolderSync IContainer
run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception Eclipse Synchronizer synchronizer Eclipse Synchronizer get Instance synchronizer set Folder Sync I Container resource folder Info the server won t add directories as sync info therefore it must be done when a directory is shared with the repository byte new Sync Bytes new Resource Sync Info get Name get Bytes byte old Sync Bytes get Sync Bytes only set the bytes if the new differes from the old this avoids unnecessary saving of sync files if old Sync Bytes null Util equals new Sync Bytes old Sync Bytes set Sync Bytes new Sync Bytes  ICVSRunnable IProgressMonitor CVSException EclipseSynchronizer EclipseSynchronizer getInstance setFolderSync IContainer folderInfo newSyncBytes ResourceSyncInfo getName getBytes oldSyncBytes getSyncBytes oldSyncBytes newSyncBytes oldSyncBytes setSyncBytes newSyncBytes
public void set Folder Sync Info final Folder Sync Info folder Info throws CVS Exception ignore folder sync on the root i e CVSROOT config Top Level Admin yes but we just ignore it if resource get Type I Resource ROOT return run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception Eclipse Synchronizer synchronizer Eclipse Synchronizer get Instance synchronizer set Folder Sync I Container resource folder Info the server won t add directories as sync info therefore it must be done when a directory is shared with the repository byte new Sync Bytes new Resource Sync Info get Name get Bytes byte old Sync Bytes get Sync Bytes only set the bytes if the new differes from the old this avoids unnecessary saving of sync files if old Sync Bytes null Util equals new Sync Bytes old Sync Bytes set Sync Bytes new Sync Bytes null  setFolderSyncInfo FolderSyncInfo folderInfo CVSException TopLevelAdmin getType IResource ICVSRunnable IProgressMonitor CVSException EclipseSynchronizer EclipseSynchronizer getInstance setFolderSync IContainer folderInfo newSyncBytes ResourceSyncInfo getName getBytes oldSyncBytes getSyncBytes oldSyncBytes newSyncBytes oldSyncBytes setSyncBytes newSyncBytes
see ICVS Folder isCVS Folder public boolean isCVS Folder throws CVS Exception return Eclipse Synchronizer get Instance get Folder Sync I Container resource null  ICVSFolder isCVSFolder isCVSFolder CVSException EclipseSynchronizer getInstance getFolderSync IContainer
run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception monitor Policy monitor For monitor monitor begin Task null 100 recursive Unmanage I Container resource Policy sub Monitor For monitor 99 Eclipse Folder super unmanage Policy sub Monitor For monitor 1 monitor done  ICVSRunnable IProgressMonitor CVSException monitorFor beginTask recursiveUnmanage IContainer subMonitorFor EclipseFolder subMonitorFor
public void unmanage I Progress Monitor monitor throws CVS Exception run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception monitor Policy monitor For monitor monitor begin Task null 100 recursive Unmanage I Container resource Policy sub Monitor For monitor 99 Eclipse Folder super unmanage Policy sub Monitor For monitor 1 monitor done Policy sub Monitor For monitor 99  IProgressMonitor CVSException ICVSRunnable IProgressMonitor CVSException monitorFor beginTask recursiveUnmanage IContainer subMonitorFor EclipseFolder subMonitorFor subMonitorFor
private static void recursive Unmanage I Container container I Progress Monitor monitor try monitor begin Task null 10 monitor sub Task container get Full Path toOS String Eclipse Synchronizer get Instance delete Folder Sync container I Resource members container members true for int i 0 i members length i monitor worked 1 I Resource resource members i if members i get Type I Resource FILE recursive Unmanage I Container resource monitor catch Core Exception e Just ignore and continue finally monitor done  recursiveUnmanage IContainer IProgressMonitor beginTask subTask getFullPath toOSString EclipseSynchronizer getInstance deleteFolderSync IResource IResource getType IResource recursiveUnmanage IContainer CoreException
public boolean is Ignored throws CVS Exception if isCVS Folder return false return super is Ignored  isIgnored CVSException isCVSFolder isIgnored
public ICVS Resource get Child String named Path throws CVS Exception I Path path new Path named Path if path segment Count 0 return this I Resource child I Container resource find Member path true include phantoms if child null if child get Type I Resource FILE return new Eclipse File I File child else return new Eclipse Folder I Container child return null  ICVSResource getChild namedPath CVSException IPath namedPath segmentCount IResource IContainer findMember getType IResource EclipseFile IFile EclipseFolder IContainer
see ICVS Folder fetch Children I Progress Monitor public ICVS Resource fetch Children I Progress Monitor monitor throws CVS Exception return members FILE MEMBERS FOLDER MEMBERS  ICVSFolder fetchChildren IProgressMonitor ICVSResource fetchChildren IProgressMonitor CVSException FILE_MEMBERS FOLDER_MEMBERS
see org eclipse team internal ccvs core ICVS Resource delete public void delete throws CVS Exception if exists return try resource delete false force null catch Core Exception e throw new CVS Exception e get Status  ICVSResource CVSException CoreException CVSException getStatus
Assumption this is only called from decorator and is Ignored is purposely ommited here for performance reasons public boolean is Modified I Progress Monitor monitor throws CVS Exception try monitor Policy monitor For monitor monitor begin Task Policy bind Eclipse Folder is Modified Progress resource get Full Path to String 1000 NON NLS 1 I Container container I Container getI Resource Added optimization to avoid loading sync info if possible This will place a modified indicator on non cvs folders i e the call to get Modified State will cache a session property int state Eclipse Synchronizer get Instance get Modification State getI Resource boolean modified if state ICVS File UNKNOWN if isCVS Folder return container exists We have no cached info for the folder We ll need to check directly caching as go This will recursively determined the modified state for all child resources until a modified child is found modified calculate And Save Child Modification States monitor Eclipse Synchronizer get Instance set Modified this modified else modified state ICVS File DIRTY return modified finally monitor done  isIgnored isModified IProgressMonitor CVSException monitorFor beginTask EclipseFolder isModifiedProgress getFullPath toString IContainer IContainer getIResource getModifiedState EclipseSynchronizer getInstance getModificationState getIResource ICVSFile isCVSFolder calculateAndSaveChildModificationStates EclipseSynchronizer getInstance setModified ICVSFile
public void handle Modification boolean for Addition throws CVS Exception For non additions we are only interested in sync info changes if is Ignored for Addition return the folder is an addition Folder Sync Info info get Folder Sync Info if the folder has sync info it was handled is set Folder Info otherwise flush the ancestors to recalculate if info null Eclipse Synchronizer get Instance set Dirty Indicator getI Resource true  handleModification forAddition CVSException isIgnored forAddition FolderSyncInfo getFolderSyncInfo setFolderInfo EclipseSynchronizer getInstance setDirtyIndicator getIResource
Determines the modification state of the receiver by examining it s children This method may result in modification state being cached with the children but does not cache it for the receiver private boolean calculate And Save Child Modification States I Progress Monitor monitor throws CVS Exception ICVS Resource children members ALL UNIGNORED MEMBERS for int i 0 i children length i ICVS Resource resource children i if resource is Modified null if a child resource is dirty consider the parent dirty as well there is no need to continue checking other siblings return true monitor worked 1 return false  calculateAndSaveChildModificationStates IProgressMonitor CVSException ICVSResource ALL_UNIGNORED_MEMBERS ICVSResource isModified
public String get Repository Relative Path throws CVS Exception Folder Sync Info info get Folder Sync Info if info null return null The REPOSITORY property of the folder info is the repository relative path return info get Repository  getRepositoryRelativePath CVSException FolderSyncInfo getFolderSyncInfo getRepository

Creates a CVS handle to the provided resource protected Eclipse Resource I Resource resource Assert is Not Null resource this resource resource  EclipseResource IResource isNotNull
public String get Relative Path ICVS Folder root throws CVS Exception try Eclipse Resource root Folder String result root Folder Eclipse Resource root result Util get Relative Path root Folder get Path get Path if result length 0 return CURRENT LOCAL FOLDER return result catch Class Cast Exception e throw new CVS Exception Policy bind Eclipse Resource invalid Resource Class e NON NLS 1  getRelativePath ICVSFolder CVSException EclipseResource rootFolder rootFolder EclipseResource getRelativePath rootFolder getPath getPath CURRENT_LOCAL_FOLDER ClassCastException CVSException EclipseResource invalidResourceClass
see ICVS Resource exists public boolean exists return resource exists  ICVSResource
public ICVS Folder get Parent I Container parent resource get Parent if parent null return null return new Eclipse Folder parent  ICVSFolder getParent IContainer getParent EclipseFolder
see ICVS Resource get Name public String get Name return resource get Name  ICVSResource getName getName getName
public boolean is Ignored throws CVS Exception a managed resource is never ignored if is Managed resource get Type I Resource ROOT resource get Type I Resource PROJECT return false If the resource is a derived or linked resource it is ignored if resource is Derived resource is Linked return true always ignore CVS String name get Name if name equals CVS return true NON NLS 1 check the global ignores from Team if Team is Ignored Hint resource return true check ignore patterns from the cvsignore file if Eclipse Synchronizer get Instance is Ignored resource return true check the parent if the parent is ignored or mapped to CVSROOT Emptydir then this resource is ignored also ICVS Folder parent get Parent if parent null return false if parent is Ignored return true Folder Sync Info info parent get Folder Sync Info if info null return false return info is Virtual Directory  isIgnored CVSException isManaged getType IResource getType IResource isDerived isLinked getName isIgnoredHint EclipseSynchronizer getInstance isIgnored ICVSFolder getParent isIgnored FolderSyncInfo getFolderSyncInfo isVirtualDirectory
public void set Ignored As final String pattern throws CVS Exception run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception Eclipse Synchronizer get Instance add Ignored resource get Parent pattern  setIgnoredAs CVSException ICVSRunnable IProgressMonitor CVSException EclipseSynchronizer getInstance addIgnored getParent
public void set Ignored As final String pattern throws CVS Exception run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception Eclipse Synchronizer get Instance add Ignored resource get Parent pattern null  setIgnoredAs CVSException ICVSRunnable IProgressMonitor CVSException EclipseSynchronizer getInstance addIgnored getParent
see ICVS Resource is Managed public boolean is Managed throws CVS Exception return is Managed get Sync Bytes  ICVSResource isManaged isManaged CVSException isManaged getSyncBytes
Helper method that captures the sematics of is Managed given a Resource Sync Info public boolean is Managed byte sync Bytes return sync Bytes null  isManaged ResourceSyncInfo isManaged syncBytes syncBytes
Two Managed Resources are equal if there cvs Resources are equal and that is if the point to the same file public boolean equals Object obj if obj instanceof Eclipse Resource return false else return get Path equals Eclipse Resource obj get Path  ManagedResources cvsResources EclipseResource getPath EclipseResource getPath
see ICVS Resource get Path public String get Path return resource get Full Path to String  ICVSResource getPath getPath getFullPath toString
see ICVS Resource is Folder public boolean is Folder return false  ICVSResource isFolder isFolder
see org eclipse team internal ccvs core ICVS File get Sync Bytes public byte get Sync Bytes throws CVS Exception return Eclipse Synchronizer get Instance get Sync Bytes getI Resource  ICVSFile getSyncBytes getSyncBytes CVSException EclipseSynchronizer getInstance getSyncBytes getIResource
public void set Sync Bytes byte sync Bytes throws CVS Exception if get Parent isCVS Folder Eclipse Synchronizer get Instance set Sync Bytes getI Resource sync Bytes  setSyncBytes syncBytes CVSException getParent isCVSFolder EclipseSynchronizer getInstance setSyncBytes getIResource syncBytes
see ICVS Resource get Sync Info public Resource Sync Info get Sync Info throws CVS Exception return Eclipse Synchronizer get Instance get Resource Sync resource  ICVSResource getSyncInfo ResourceSyncInfo getSyncInfo CVSException EclipseSynchronizer getInstance getResourceSync
Implement the hashcode on the underlying strings like it is done in the equals public int hash Code return get Path hash Code  hashCode getPath hashCode
Give the pathname back public String to String return get Path  toString getPath
see ICVS Resource unmanage public void unmanage I Progress Monitor monitor throws CVS Exception Eclipse Synchronizer get Instance delete Resource Sync resource  ICVSResource IProgressMonitor CVSException EclipseSynchronizer getInstance deleteResourceSync
see Comparable compare To Object public int compare To Object arg0 Eclipse Resource other Eclipse Resource arg0 return resource get Full Path to String compare To other resource get Full Path to String  compareTo compareTo EclipseResource EclipseResource getFullPath toString compareTo getFullPath toString
see org eclipse team internal ccvs core ICVS Resource getI Resource public I Resource getI Resource return resource  ICVSResource getIResource IResource getIResource
Called by a resource change listener when a resource is changed or added This allows CVS resources to adjust any internal state based on the change param for Addition modification is an addition throws CVS Exception  forAddition CVSException
Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception try Eclipse Synchronizer get Instance run getI Resource job monitor catch CVS Exception e error 0 e  ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException EclipseSynchronizer getInstance getIResource CVSException
public void run final ICVS Runnable job I Progress Monitor monitor throws CVS Exception final CVS Exception error new CVS Exception 1 try Do not use a scheduling rule in the workspace run since one will be obtained by the Eclipse Synchronizer Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception try Eclipse Synchronizer get Instance run getI Resource job monitor catch CVS Exception e error 0 e null no rule 0 monitor catch Core Exception e throw CVS Exception wrap Exception e if error 0 null throw error 0  ICVSRunnable IProgressMonitor CVSException CVSException CVSException EclipseSynchronizer ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException EclipseSynchronizer getInstance getIResource CVSException CoreException CVSException wrapException

Package private contructor to allow specialized subclass for handling folder deletions Eclipse Synchronizer  EclipseSynchronizer
Returns the singleton instance of the synchronizer public static Eclipse Synchronizer get Instance if instance null instance new Eclipse Synchronizer return instance  EclipseSynchronizer getInstance EclipseSynchronizer
public Sync Info Cache get Sync Info Cache For I Resource resource if resource exists resource is Local I Resource DEPTH ZERO return session Property Cache else return synchronizer Cache  SyncInfoCache getSyncInfoCacheFor IResource isLocal IResource DEPTH_ZERO sessionPropertyCache synchronizerCache
private boolean is Valid I Resource resource return resource exists synchronizer Cache is Phantom resource  isValid IResource synchronizerCache isPhantom
Sets the folder sync info for the specified folder The folder must exist and must not be the workspace root param folder the folder param info the folder sync info must not be null see get Folder Sync delete Folder Sync public void set Folder Sync I Container folder Folder Sync Info info throws CVS Exception Assert is Not Null info enforce the use of delete Folder Sync ignore folder sync on the root i e CVSROOT config Top Level Admin yes but we just ignore it if folder get Type I Resource ROOT return if is Valid folder This means that the folder doesn t exist and is not a phantom Allow the set if the parent is a CVS folder since this can occur when creating phatom folders if get Folder Sync folder get Parent null throw new CVS Exception I Status ERROR CVS Exception UNABLE Policy bind Eclipse Synchronizer Error Setting Folder Sync folder get Full Path to String NON NLS 1 I Scheduling Rule rule null try rule begin Batching folder null try begin Operation get the old info Folder Sync Info old Info get Folder Sync folder set folder sync and notify get Sync Info Cache For folder set Cached Folder Sync folder info true if the sync info changed from null we may need to adjust the ancestors if old Info null adjust Dirty State Recursively folder RECOMPUTE INDICATOR folder Changed folder finally end Operation finally if rule null end Batching rule null  getFolderSync deleteFolderSync setFolderSync IContainer FolderSyncInfo CVSException isNotNull deleteFolderSync TopLevelAdmin getType IResource isValid getFolderSync getParent CVSException IStatus CVSException EclipseSynchronizer ErrorSettingFolderSync getFullPath toString ISchedulingRule beginBatching beginOperation FolderSyncInfo oldInfo getFolderSync getSyncInfoCacheFor setCachedFolderSync oldInfo adjustDirtyStateRecursively RECOMPUTE_INDICATOR folderChanged endOperation endBatching
Gets the folder sync info for the specified folder param folder the folder return the folder sync info associated with the folder or null if none see set Folder Sync delete Folder Sync public Folder Sync Info get Folder Sync I Container folder throws CVS Exception if folder get Type I Resource ROOT is Valid folder return null try begin Operation cache Folder Sync folder return get Sync Info Cache For folder get Cached Folder Sync folder finally end Operation  setFolderSync deleteFolderSync FolderSyncInfo getFolderSync IContainer CVSException getType IResource isValid beginOperation cacheFolderSync getSyncInfoCacheFor getCachedFolderSync endOperation
Deletes the folder sync for the specified folder and the resource sync for all of its children Does not recurse param folder the folder see get Folder Sync set Folder Sync public void delete Folder Sync I Container folder throws CVS Exception if folder get Type I Resource ROOT is Valid folder return I Scheduling Rule rule null try rule begin Batching folder null try begin Operation iterate over all children with sync info and prepare notifications this is done first since deleting the folder sync may remove a phantom cache Resource Sync For Children folder true can modify workspace I Resource children folder members true for int i 0 i children length i I Resource resource children i resource Changed resource delete resource sync for all children get Sync Info Cache For resource set Cached Sync Bytes resource null true delete folder sync get Sync Info Cache For folder set Cached Folder Sync folder null true folder Changed folder catch Core Exception e throw CVS Exception wrap Exception e finally end Operation finally if rule null end Batching rule null  getFolderSync setFolderSync deleteFolderSync IContainer CVSException getType IResource isValid ISchedulingRule beginBatching beginOperation cacheResourceSyncForChildren IResource IResource resourceChanged getSyncInfoCacheFor setCachedSyncBytes getSyncInfoCacheFor setCachedFolderSync folderChanged CoreException CVSException wrapException endOperation endBatching
private void folder Changed I Container folder resource Lock folder Changed folder  folderChanged IContainer resourceLock folderChanged
private void resource Changed I Resource resource resource Lock resource Changed resource  resourceChanged IResource resourceLock resourceChanged
Sets the resource sync info for the specified resource The parent folder must exist and must not be the workspace root param resource the resource param info the resource sync info must not be null see get Resource Sync delete Resource Sync public void set Resource Sync I Resource resource Resource Sync Info info throws CVS Exception Assert is Not Null info enforce the use of delete Resource Sync I Container parent resource get Parent if parent null parent get Type I Resource ROOT is Valid parent throw new CVS Exception I Status ERROR CVS Exception UNABLE Policy bind Eclipse Synchronizer Error Setting Resource Sync resource get Full Path to String NON NLS 1 I Scheduling Rule rule null try rule begin Batching resource null try begin Operation cache resource sync for siblings set for self then notify cache Resource Sync For Children parent true can modify workspace set Cached Resource Sync resource info resource Changed resource finally end Operation finally if rule null end Batching rule null  getResourceSync deleteResourceSync setResourceSync IResource ResourceSyncInfo CVSException isNotNull deleteResourceSync IContainer getParent getType IResource isValid CVSException IStatus CVSException EclipseSynchronizer ErrorSettingResourceSync getFullPath toString ISchedulingRule beginBatching beginOperation cacheResourceSyncForChildren setCachedResourceSync resourceChanged endOperation endBatching
Gets the resource sync info for the specified folder param resource the resource return the resource sync info associated with the resource or null if none see set Resource Sync delete Resource Sync public Resource Sync Info get Resource Sync I Resource resource throws CVS Exception byte info get Sync Bytes resource if info null return null return new Resource Sync Info info  setResourceSync deleteResourceSync ResourceSyncInfo getResourceSync IResource CVSException getSyncBytes ResourceSyncInfo
Gets the resource sync info for the specified folder param resource the resource return the resource sync info associated with the resource or null if none see set Resource Sync delete Resource Sync public byte get Sync Bytes I Resource resource throws CVS Exception I Container parent resource get Parent if parent null parent get Type I Resource ROOT is Valid parent return null try begin Operation cache resource sync for siblings then return for self try cache Resource Sync For Children parent false cannot modify workspace catch CVS Exception e if is Cannot Modify Synchronizer e is Resource Not Found e We will resort to loading the sync info for the requested resource from disk byte bytes get Sync Bytes From Disk resource if resource exists bytes null Resource Sync Info is Deletion bytes bytes Resource Sync Info convert To Deletion bytes return bytes else throw e return get Cached Sync Bytes resource finally end Operation  setResourceSync deleteResourceSync getSyncBytes IResource CVSException IContainer getParent getType IResource isValid beginOperation cacheResourceSyncForChildren CVSException isCannotModifySynchronizer isResourceNotFound getSyncBytesFromDisk ResourceSyncInfo isDeletion ResourceSyncInfo convertToDeletion getCachedSyncBytes endOperation
Sets the resource sync info for the specified resource The parent folder must exist and must not be the workspace root param resource the resource param info the resource sync info must not be null see get Resource Sync delete Resource Sync public void set Sync Bytes I Resource resource byte sync Bytes throws CVS Exception Assert is Not Null sync Bytes enforce the use of delete Resource Sync I Container parent resource get Parent if parent null parent get Type I Resource ROOT is Valid parent throw new CVS Exception I Status ERROR CVS Exception UNABLE Policy bind Eclipse Synchronizer Error Setting Resource Sync resource get Full Path to String NON NLS 1 I Scheduling Rule rule null try rule begin Batching resource null try begin Operation cache resource sync for siblings set for self then notify cache Resource Sync For Children parent true can modify workspace set Cached Sync Bytes resource sync Bytes resource Changed resource finally end Operation finally if rule null end Batching rule null  getResourceSync deleteResourceSync setSyncBytes IResource syncBytes CVSException isNotNull syncBytes deleteResourceSync IContainer getParent getType IResource isValid CVSException IStatus CVSException EclipseSynchronizer ErrorSettingResourceSync getFullPath toString ISchedulingRule beginBatching beginOperation cacheResourceSyncForChildren setCachedSyncBytes syncBytes resourceChanged endOperation endBatching
Deletes the resource sync info for the specified resource if it exists param resource the resource see get Resource Sync set Resource Sync public void delete Resource Sync I Resource resource throws CVS Exception I Container parent resource get Parent if parent null parent get Type I Resource ROOT is Valid parent return I Scheduling Rule rule null try rule begin Batching resource null try begin Operation cache resource sync for siblings delete for self then notify cache Resource Sync For Children parent true can modify workspace if get Cached Sync Bytes resource null avoid redundant notifications set Cached Sync Bytes resource null clear Dirty Indicator resource resource Changed resource finally end Operation finally if rule null end Batching rule null  getResourceSync setResourceSync deleteResourceSync IResource CVSException IContainer getParent getType IResource isValid ISchedulingRule beginBatching beginOperation cacheResourceSyncForChildren getCachedSyncBytes setCachedSyncBytes clearDirtyIndicator resourceChanged endOperation endBatching
param resource private void clear Dirty Indicator I Resource resource throws CVS Exception get Sync Info Cache For resource flush Dirty Cache resource adjust Dirty State Recursively resource get Parent RECOMPUTE INDICATOR  clearDirtyIndicator IResource CVSException getSyncInfoCacheFor flushDirtyCache adjustDirtyStateRecursively getParent RECOMPUTE_INDICATOR
Gets the array of ignore patterns for the specified folder param folder the folder return the patterns or an empty array if none see add Ignored public boolean is Ignored I Resource resource throws CVS Exception if resource get Type I Resource ROOT resource get Type I Resource PROJECT resource exists return false try begin Operation File Name Matcher matcher cache Folder Ignores resource get Parent return matcher match resource get Name finally end Operation  addIgnored isIgnored IResource CVSException getType IResource getType IResource beginOperation FileNameMatcher cacheFolderIgnores getParent getName endOperation
Adds a pattern to the set of ignores for the specified folder param folder the folder param pattern the pattern public void add Ignored I Container folder String pattern throws CVS Exception if folder get Type I Resource ROOT folder exists throw new CVS Exception I Status ERROR CVS Exception UNABLE Policy bind Eclipse Synchronizer Error Setting Ignore Pattern folder get Full Path to String NON NLS 1 I Scheduling Rule rule null try rule begin Batching folder get File new Path Sync File Writer IGNORE FILE null try begin Operation String ignores Sync File Writer readCVS Ignore Entries folder if ignores null verify that the pattern has not already been added for int i 0 i ignores length i if ignores i equals pattern return add the pattern String old Ignores ignores ignores new String old Ignores length 1 System arraycopy old Ignores 0 ignores 0 old Ignores length ignores old Ignores length pattern else ignores new String pattern set Cached Folder Ignores folder ignores Sync File Writer writeCVS Ignore Entries folder ignores broadcast changes to unmanaged children they are the only candidates for being ignored List possible Ignores new Array List accumulate Non Managed Children folder possible Ignores Resource State Change Listeners get Listener resource Sync Info Changed I Resource possible Ignores to Array new I Resource possible Ignores size finally end Operation finally if rule null end Batching rule null  addIgnored IContainer CVSException getType IResource CVSException IStatus CVSException EclipseSynchronizer ErrorSettingIgnorePattern getFullPath toString ISchedulingRule beginBatching getFile SyncFileWriter IGNORE_FILE beginOperation SyncFileWriter readCVSIgnoreEntries oldIgnores oldIgnores oldIgnores oldIgnores oldIgnores setCachedFolderIgnores SyncFileWriter writeCVSIgnoreEntries possibleIgnores ArrayList accumulateNonManagedChildren possibleIgnores ResourceStateChangeListeners getListener resourceSyncInfoChanged IResource possibleIgnores toArray IResource possibleIgnores endOperation endBatching
Returns the members of this folder including deleted resources with sync info but excluding special resources such as CVS subdirectories param folder the container to list return the array of members public I Resource members I Container folder throws CVS Exception if is Valid folder return new I Resource 0 try begin Operation if folder get Type I Resource ROOT ensure that the sync info is cached so any required phantoms are created cache Resource Sync For Children folder false catch CVS Exception e if is Cannot Modify Synchronizer e is Resource Not Found e throw e finally end Operation try return folder members true catch Core Exception e throw CVS Exception wrap Exception e  IResource IContainer CVSException isValid IResource beginOperation getType IResource cacheResourceSyncForChildren CVSException isCannotModifySynchronizer isResourceNotFound endOperation CoreException CVSException wrapException
private boolean is Cannot Modify Synchronizer CVS Exception e I Resource Status WORKSPACE LOCKED can occur if the resource sync is loaded during the POST CHANGE delta phase CVS Status FAILED TO CACHE SYNC INFO can occur if the resource sync is loaded when no scheduling rule is held return e get Status get Code I Resource Status WORKSPACE LOCKED e get Status get Code CVS Status FAILED TO CACHE SYNC INFO  isCannotModifySynchronizer CVSException IResourceStatus WORKSPACE_LOCKED POST_CHANGE CVSStatus FAILED_TO_CACHE_SYNC_INFO getStatus getCode IResourceStatus WORKSPACE_LOCKED getStatus getCode CVSStatus FAILED_TO_CACHE_SYNC_INFO
private boolean is Resource Not Found CVS Exception e return e get Status get Code I Resource Status RESOURCE NOT FOUND  isResourceNotFound CVSException getStatus getCode IResourceStatus RESOURCE_NOT_FOUND
Begins a batch of operations in order to optimize sync file writing The provided scheduling rule indicates the resources that the resources affected by the operation while the returned scheduling rule is the rule obtained by the lock It may differ from the provided rule as it must encompass any sync files that may change as a result of the operation public I Scheduling Rule begin Batching I Scheduling Rule resource Rule I Progress Monitor monitor return resource Lock acquire resource Rule this I Flush Operation monitor  ISchedulingRule beginBatching ISchedulingRule resourceRule IProgressMonitor resourceLock resourceRule IFlushOperation
Ends a batch of operations The provided rule must be the one that was returned by the corresponding call to begin Batching p Progress cancellation is ignored while writting the cache to disk This is to ensure cache to disk consistency p param monitor the progress monitor may be null exception CVS Exception with a status with code code COMMITTING SYNC INFO FAILED code if all the CVS sync information could not be written to disk public void end Batching I Scheduling Rule rule I Progress Monitor monitor throws CVS Exception resource Lock release rule monitor  beginBatching CVSException COMMITTING_SYNC_INFO_FAILED endBatching ISchedulingRule IProgressMonitor CVSException resourceLock
Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor pm throws Core Exception I Status status commit Cache info pm if status isOK throw new CVS Exception status  ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException IStatus commitCache CVSException
public void flush final Thread Info info I Progress Monitor monitor throws CVS Exception if info null info is Empty try begin Operation Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor pm throws Core Exception I Status status commit Cache info pm if status isOK throw new CVS Exception status null 0 no flags monitor catch Core Exception e throw CVS Exception wrap Exception e finally end Operation  ThreadInfo IProgressMonitor CVSException isEmpty beginOperation ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException IStatus commitCache CVSException CoreException CVSException wrapException endOperation
private void begin Operation Do not try to acquire the lock if the resources tree is locked The reason for this is that during the resource delta phase i e when the tree is locked the workspace lock is held If we obtain our lock there is a chance of dealock It is OK if we don t as we are still protected by scheduling rules and the workspace lock if Resources Plugin get Workspace is Tree Locked return lock acquire  beginOperation ResourcesPlugin getWorkspace isTreeLocked
private void end Operation See begin Operation for a description of why the lock is not obtained when the tree is locked if Resources Plugin get Workspace is Tree Locked return lock release  endOperation beginOperation ResourcesPlugin getWorkspace isTreeLocked
Flush the sync information from the in memory cache to disk and purge the entries from the cache p Recursively flushes the sync information for all resources below the root to disk and purges the entries from memory so that the next time it is accessed it will be retrieved from disk May flush more sync information than strictly needed but never less p param root the root of the subtree to purge param deep purge sync from child folders param monitor the progress monitor may be null public void flush I Container root boolean deep I Progress Monitor monitor throws CVS Exception monitor Policy monitor For monitor monitor begin Task null 10 I Scheduling Rule rule null try rule begin Batching root Policy sub Monitor For monitor 1 try begin Operation try Flush changes to disk resource Lock flush Policy sub Monitor For monitor 8 finally Purge the in memory cache session Property Cache purge Cache root deep finally end Operation finally if rule null end Batching rule Policy sub Monitor For monitor 1 monitor done  IContainer IProgressMonitor CVSException monitorFor beginTask ISchedulingRule beginBatching subMonitorFor beginOperation resourceLock subMonitorFor sessionPropertyCache purgeCache endOperation endBatching subMonitorFor
public void deconfigure final I Project project I Progress Monitor monitor throws CVS Exception monitor Policy monitor For monitor monitor begin Task null 100 I Scheduling Rule rule null try rule begin Batching project Policy sub Monitor For monitor 10 Flush the sync info flush project true deep Policy sub Monitor For monitor 80 purge Dirty Cache project Policy sub Monitor For monitor 5 forget about pruned folders however the top level pruned folder will have resource sync e g a line in the Entry file As a result the folder is managed but is not a CVS folder synchronizer Cache purge Cache project true finally if rule null end Batching rule Policy sub Monitor For monitor 5 monitor done  IProject IProgressMonitor CVSException monitorFor beginTask ISchedulingRule beginBatching subMonitorFor subMonitorFor purgeDirtyCache subMonitorFor synchronizerCache purgeCache endBatching subMonitorFor
Called to notify the synchronizer that meta files have changed on disk outside of the workbench The cache will be flushed for this folder and it s immediate children and appropriate state change events are broadcasts to state change listeners public void ignore Files Changed I Container roots throws CVS Exception for int i 0 i roots length i I Container container roots i I Scheduling Rule rule null try Set changed new Hash Set rule begin Batching container null try begin Operation changed add All Arrays as List session Property Cache purge Cache container false don t flush children finally end Operation if changed is Empty Resource State Change Listeners get Listener resource Sync Info Changed I Resource changed to Array new I Resource changed size finally if rule null end Batching rule null  ignoreFilesChanged IContainer CVSException IContainer ISchedulingRule HashSet beginBatching beginOperation addAll asList sessionPropertyCache purgeCache endOperation isEmpty ResourceStateChangeListeners getListener resourceSyncInfoChanged IResource toArray IResource endBatching
public void sync Files Changed Externally I Container changed Meta Files I File external Deletions throws CVS Exception List changed new Array List for int i 0 i changed Meta Files length i I Container container changed Meta Files i if is Within Active Operation Scope container changed add All Arrays as List session Property Cache purge Cache container false don t flush children for int i 0 i external Deletions length i I File file external Deletions i if is Within Active Operation Scope file session Property Cache purge Cache file get Parent false don t flush children changed add file if changed is Empty Resource State Change Listeners get Listener external Sync Info Change I Resource changed to Array new I Resource changed size  syncFilesChangedExternally IContainer changedMetaFiles IFile externalDeletions CVSException ArrayList changedMetaFiles IContainer changedMetaFiles isWithinActiveOperationScope addAll asList sessionPropertyCache purgeCache externalDeletions IFile externalDeletions isWithinActiveOperationScope sessionPropertyCache purgeCache getParent isEmpty ResourceStateChangeListeners getListener externalSyncInfoChange IResource toArray IResource
private boolean prepare For Deletion I Resource resource throws CVS Exception if resource exists return false I Scheduling Rule rule null try rule begin Batching resource null try begin Operation Flush the dirty info for the resource and it s ancestors Although we could be smarter we need to do this because the deletion may fail adjust Dirty State Recursively resource RECOMPUTE INDICATOR if resource get Type I Resource FILE byte sync Bytes get Sync Bytes resource if sync Bytes null if Resource Sync Info is Addition sync Bytes delete Resource Sync resource else sync Bytes convert To Deletion sync Bytes synchronizer Cache set Cached Sync Bytes resource sync Bytes true session Property Cache purge Resource Sync Cache resource resource Changed resource return false else I Container container I Container resource if container get Type I Resource PROJECT synchronizer Cache flush I Project container return false else Move the folder sync info into phantom space Folder Sync Info info get Folder Sync container if info null return false synchronizer Cache set Cached Folder Sync container info true folder Changed container move the resource sync as well byte sync Bytes get Sync Bytes resource synchronizer Cache set Cached Sync Bytes resource sync Bytes true session Property Cache purge Resource Sync Cache container session Property Cache purge Cache container false return true finally end Operation finally if rule null end Batching rule null  prepareForDeletion IResource CVSException ISchedulingRule beginBatching beginOperation adjustDirtyStateRecursively RECOMPUTE_INDICATOR getType IResource syncBytes getSyncBytes syncBytes ResourceSyncInfo isAddition syncBytes deleteResourceSync syncBytes convertToDeletion syncBytes synchronizerCache setCachedSyncBytes syncBytes sessionPropertyCache purgeResourceSyncCache resourceChanged IContainer IContainer getType IResource synchronizerCache IProject FolderSyncInfo getFolderSync synchronizerCache setCachedFolderSync folderChanged syncBytes getSyncBytes synchronizerCache setCachedSyncBytes syncBytes sessionPropertyCache purgeResourceSyncCache sessionPropertyCache purgeCache endOperation endBatching
The resource has been deleted Make sure any cached state is cleared This is needed because the move delete hook is not invoked in all situations e g external deletion param resource throws CVS Exception protected void handle Deleted I Resource resource throws CVS Exception if resource exists return try begin Operation adjust Dirty State Recursively resource RECOMPUTE INDICATOR finally end Operation  CVSException handleDeleted IResource CVSException beginOperation adjustDirtyStateRecursively RECOMPUTE_INDICATOR endOperation
resource accept new I Resource Visitor public boolean visit I Resource inner Resource throws Core Exception try return prepare For Deletion inner Resource catch CVS Exception e CVS Provider Plugin log e throw new Core Exception e get Status  IResourceVisitor IResource innerResource CoreException prepareForDeletion innerResource CVSException CVSProviderPlugin CoreException getStatus
Prepare for the deletion of the target resource from within the move delete hook The method is invoked by both the delete File Folder methods and for the source resource of move File Folder This method will move the cached sync info into the phantom I Synchronizer cache so that outgoing deletions and known remote folders are preserved param resource param monitor throws CVS Exception public void prepare For Deletion I Resource resource I Progress Monitor monitor throws CVS Exception Move sync info to phantom space for the resource and all it s children monitor Policy monitor For monitor try begin Operation monitor begin Task null 100 try resource accept new I Resource Visitor public boolean visit I Resource inner Resource throws Core Exception try return prepare For Deletion inner Resource catch CVS Exception e CVS Provider Plugin log e throw new Core Exception e get Status catch Core Exception e throw CVS Exception wrap Exception e finally end Operation monitor done  deleteFile moveFile ISynchronizer CVSException prepareForDeletion IResource IProgressMonitor CVSException monitorFor beginOperation beginTask IResourceVisitor IResource innerResource CoreException prepareForDeletion innerResource CVSException CVSProviderPlugin CoreException getStatus CoreException CVSException wrapException endOperation
If not already cached loads and caches the resource sync for the children of the container Folder must exist and must not be the workspace root param container the container private void cache Resource Sync For Children I Container container boolean can Modify Workspace throws CVS Exception don t try to load if the information is already cached if get Sync Info Cache For container is Resource Sync Info Cached container load the sync info from disk byte infos do not load the sync info for resources that are linked if is Linked Resource container infos null else infos Sync File Writer read All Resource Sync container try if infos null for int i 0 i infos length i byte sync Bytes infos i I Path name new Path get Name sync Bytes I Resource resource if is Folder sync Bytes resource container get Folder name else resource container get File name get Sync Info Cache For resource set Cached Sync Bytes resource sync Bytes can Modify Workspace get Sync Info Cache For container set Resource Sync Info Cached container catch CVS Exception e if Policy DEBUG METAFILE CHANGES System err println Failed to cache Entries for folder container get Full Path NON NLS 1 throw e  cacheResourceSyncForChildren IContainer canModifyWorkspace CVSException getSyncInfoCacheFor isResourceSyncInfoCached isLinkedResource SyncFileWriter readAllResourceSync syncBytes IPath getName syncBytes IResource isFolder syncBytes getFolder getFile getSyncInfoCacheFor setCachedSyncBytes syncBytes canModifyWorkspace getSyncInfoCacheFor setResourceSyncInfoCached CVSException DEBUG_METAFILE_CHANGES getFullPath
If not already cached loads and caches the folder sync for the container Folder must exist and must not be the workspace root param container the container private void cache Folder Sync I Container container throws CVS Exception don t try to load if the information is already cached if get Sync Info Cache For container is Folder Sync Info Cached container load the sync info from disk Folder Sync Info info do not load the sync info for resources that are linked if is Linked Resource container info null else info Sync File Writer read Folder Sync container get Sync Info Cache For container set Cached Folder Sync container info false  cacheFolderSync IContainer CVSException getSyncInfoCacheFor isFolderSyncInfoCached FolderSyncInfo isLinkedResource SyncFileWriter readFolderSync getSyncInfoCacheFor setCachedFolderSync
private boolean is Linked Resource I Resource resource return CVS Workspace Root is Linked Resource resource  isLinkedResource IResource CVSWorkspaceRoot isLinkedResource
Load the sync info for the given resource from disk param resource return byte private byte get Sync Bytes From Disk I Resource resource throws CVS Exception byte infos Sync File Writer read All Resource Sync resource get Parent if infos null return null for int i 0 i infos length i byte sync Bytes infos i if resource get Name equals get Name sync Bytes return sync Bytes return null  getSyncBytesFromDisk IResource CVSException SyncFileWriter readAllResourceSync getParent syncBytes getName getName syncBytes syncBytes
Commits the cache after a series of operations Will return STATUS OK unless there were problems writting sync information to disk If an error occurs a multistatus is returned with the list of reasons for the failures Failures are recovered and all changed resources are given a chance to be written to disk param monitor the progress monitor may be null internal use only I Status commit Cache Thread Info thread Info I Progress Monitor monitor if thread Info is Empty return Sync Info Cache STATUS OK List errors new Array List try prepare operation find parents of changed resources I Resource changed Resources thread Info get Changed Resources I Container changed Folders thread Info get Changed Folders Set dirty Parents new Hash Set for int i 0 i changed Resources length i I Resource resource changed Resources i I Container folder resource get Parent dirty Parents add folder monitor Policy monitor For monitor int num Dirty dirty Parents size int num Resources changed Folders length num Dirty monitor begin Task null num Resources if monitor is Canceled monitor sub Task Policy bind Eclipse Synchronizer Updating Sync End Operation Cancelled NON NLS 1 else monitor sub Task Policy bind Eclipse Synchronizer Updating Sync End Operation NON NLS 1 write sync info to disk folder sync info changes for int i 0 i changed Folders length i I Container folder changed Folders i if folder exists folder get Type I Resource ROOT try Folder Sync Info info session Property Cache get Cached Folder Sync folder Do not write the folder sync for linked resources if info null deleted folder sync info since we loaded it but don t overwrite the sync info for linked folders if is Linked Resource folder Sync File Writer delete Folder Sync folder dirty Parents remove folder else modified or created new folder sync info since we loaded it Sync File Writer write Folder Sync folder info catch CVS Exception e try session Property Cache purge Cache folder true deep catch CVS Exception pe errors add pe get Status errors add e get Status monitor worked 1 update progress for parents we will skip because they were deleted monitor worked num Dirty dirty Parents size resource sync info changes for Iterator it dirty Parents iterator it has Next I Container folder I Container it next if folder exists folder get Type I Resource ROOT write sync info for all children in one go try List infos new Array List I Resource children folder members true for int i 0 i children length i I Resource resource children i byte sync Bytes get Sync Bytes resource if sync Bytes null infos add sync Bytes do not overwrite the sync info for linked resources if infos size 0 is Linked Resource folder Sync File Writer write All Resource Sync folder byte infos to Array new byte infos size catch CVS Exception e try session Property Cache purge Cache folder false depth 1 catch CVS Exception pe errors add pe get Status errors add e get Status catch Core Exception e try session Property Cache purge Cache folder false depth 1 catch CVS Exception pe errors add pe get Status errors add e get Status monitor worked 1 broadcast events monitor sub Task Policy bind Eclipse Synchronizer Notifying Listeners NON NLS 1 Set all Changes new Hash Set all Changes add All Arrays as List changed Resources all Changes add All Arrays as List changed Folders all Changes add All dirty Parents I Resource resources I Resource all Changes to Array new I Resource all Changes size broadcast Resource State Changes resources if errors is Empty Multi Status status new Multi Status CVS Provider Plugin ID CVS Status COMMITTING SYNC INFO FAILED Policy bind Eclipse Synchronizer Error Committing NON NLS 1 null for int i 0 i errors size i status merge I Status errors get i return status return Sync Info Cache STATUS OK finally monitor done  STATUS_OK IStatus commitCache ThreadInfo threadInfo IProgressMonitor threadInfo isEmpty SyncInfoCache STATUS_OK ArrayList IResource changedResources threadInfo getChangedResources IContainer changedFolders threadInfo getChangedFolders dirtyParents HashSet changedResources IResource changedResources IContainer getParent dirtyParents monitorFor numDirty dirtyParents numResources changedFolders numDirty beginTask numResources isCanceled subTask EclipseSynchronizer UpdatingSyncEndOperationCancelled subTask EclipseSynchronizer UpdatingSyncEndOperation changedFolders IContainer changedFolders getType IResource FolderSyncInfo sessionPropertyCache getCachedFolderSync isLinkedResource SyncFileWriter deleteFolderSync dirtyParents SyncFileWriter writeFolderSync CVSException sessionPropertyCache purgeCache CVSException getStatus getStatus numDirty dirtyParents dirtyParents hasNext IContainer IContainer getType IResource ArrayList IResource IResource syncBytes getSyncBytes syncBytes syncBytes isLinkedResource SyncFileWriter writeAllResourceSync toArray CVSException sessionPropertyCache purgeCache CVSException getStatus getStatus CoreException sessionPropertyCache purgeCache CVSException getStatus getStatus subTask EclipseSynchronizer NotifyingListeners allChanges HashSet allChanges addAll asList changedResources allChanges addAll asList changedFolders allChanges addAll dirtyParents IResource IResource allChanges toArray IResource allChanges broadcastResourceStateChanges isEmpty MultiStatus MultiStatus CVSProviderPlugin CVSStatus COMMITTING_SYNC_INFO_FAILED EclipseSynchronizer ErrorCommitting IStatus SyncInfoCache STATUS_OK
Broadcasts the resource state changes for the given resources to CVS Provider Plugin void broadcast Resource State Changes I Resource resources if resources length 0 Resource State Change Listeners get Listener resource Sync Info Changed resources  broadcastResourceStateChanges IResource ResourceStateChangeListeners getListener resourceSyncInfoChanged
Returns the resource sync info for the resource null if none Parent must exist and must not be the workspace root The resource sync info for the children of the parent container MUST ALREADY BE CACHED param resource the resource return the resource sync info for the resource or null see cache Resource Sync For Children private byte get Cached Sync Bytes I Resource resource throws CVS Exception return get Sync Info Cache For resource get Cached Sync Bytes resource  cacheResourceSyncForChildren getCachedSyncBytes IResource CVSException getSyncInfoCacheFor getCachedSyncBytes
Returns the resource sync info for the resource null if none Parent must exist and must not be the workspace root The resource sync info for the children of the parent container MUST ALREADY BE CACHED param resource the resource return the resource sync info for the resource or null see cache Resource Sync For Children private void set Cached Sync Bytes I Resource resource byte sync Bytes throws CVS Exception get Sync Info Cache For resource set Cached Sync Bytes resource sync Bytes true resource Changed resource  cacheResourceSyncForChildren setCachedSyncBytes IResource syncBytes CVSException getSyncInfoCacheFor setCachedSyncBytes syncBytes resourceChanged
Sets the resource sync info for the resource if null deletes it Parent must exist and must not be the workspace root The resource sync info for the children of the parent container MUST ALREADY BE CACHED param resource the resource param info the new resource sync info see cache Resource Sync For Children private void set Cached Resource Sync I Resource resource Resource Sync Info info throws CVS Exception todo byte sync Bytes null if info null sync Bytes info get Bytes get Sync Info Cache For resource set Cached Sync Bytes resource sync Bytes true  cacheResourceSyncForChildren setCachedResourceSync IResource ResourceSyncInfo CVSException syncBytes syncBytes getBytes getSyncInfoCacheFor setCachedSyncBytes syncBytes
If not already cached loads and caches the folder ignores sync for the container Folder must exist and must not be the workspace root param container the container return the folder ignore patterns or an empty array if none private File Name Matcher cache Folder Ignores I Container container throws CVS Exception return session Property Cache cache Folder Ignores container  FileNameMatcher cacheFolderIgnores IContainer CVSException sessionPropertyCache cacheFolderIgnores
Sets the array of folder ignore patterns for the container must not be null Folder must exist and must not be the workspace root param container the container param ignores the array of ignore patterns private void set Cached Folder Ignores I Container container String ignores throws CVS Exception session Property Cache set Cached Folder Ignores container ignores  setCachedFolderIgnores IContainer CVSException sessionPropertyCache setCachedFolderIgnores
private void accumulate Non Managed Children I Container folder List possible Ignores throws CVS Exception try cache Resource Sync For Children folder true can modify workspace I Resource children folder members List folders new Array List deal with all files first and then folders to be otimized for caching scheme for int i 0 i children length i I Resource child children i if get Cached Sync Bytes child null possible Ignores add child if child get Type I Resource FILE folders add child for Iterator iter folders iterator iter has Next I Container child I Container iter next accumulate Non Managed Children child possible Ignores catch Core Exception e throw CVS Exception wrap Exception e  accumulateNonManagedChildren IContainer possibleIgnores CVSException cacheResourceSyncForChildren IResource ArrayList IResource getCachedSyncBytes possibleIgnores getType IResource hasNext IContainer IContainer accumulateNonManagedChildren possibleIgnores CoreException CVSException wrapException
Add the entry to the CVS Notify file We are not initially concerned with efficiency since edit unedit are typically issued on a small set of files XXX If there was a previous notify entry for the resource it is replaced This is probably not the proper behavior see Eclipse File A value of null for info indicates that any entry for the given resource is to be removed from the Notify file param resource param info public void set Notify Info I Resource resource Notify Info info throws CVS Exception Notify Info infos Sync File Writer read All Notify Info resource get Parent if infos null if the file is empty and we are removing an entry just return if info null return infos new Notify Info info else Map info Map new Hash Map for int i 0 i infos length i Notify Info notify Info infos i info Map put notify Info get Name notify Info if info null if the info is null remove the entry info Map remove resource get Name else add the new entry to the list info Map put info get Name info Notify Info new Infos new Notify Info info Map size int i 0 for Iterator iter info Map values iterator iter has Next new Infos i Notify Info iter next infos new Infos Sync File Writer write All Notify Info resource get Parent infos  EclipseFile setNotifyInfo IResource NotifyInfo CVSException NotifyInfo SyncFileWriter readAllNotifyInfo getParent NotifyInfo infoMap HashMap NotifyInfo notifyInfo infoMap notifyInfo getName notifyInfo infoMap getName infoMap getName NotifyInfo newInfos NotifyInfo infoMap infoMap hasNext newInfos NotifyInfo newInfos SyncFileWriter writeAllNotifyInfo getParent
Method get Notify Info param resource return Notify Info public Notify Info get Notify Info I Resource resource throws CVS Exception Notify Info infos Sync File Writer read All Notify Info resource get Parent if infos null return null for int i 0 i infos length i Notify Info notify Info infos i if notify Info get Name equals resource get Name return notify Info return null  getNotifyInfo NotifyInfo NotifyInfo getNotifyInfo IResource CVSException NotifyInfo SyncFileWriter readAllNotifyInfo getParent NotifyInfo notifyInfo notifyInfo getName getName notifyInfo
Method delete Notify Info param resource public void delete Notify Info I Resource resource throws CVS Exception Notify Info infos Sync File Writer read All Notify Info resource get Parent if infos null return Map info Map new Hash Map for int i 0 i infos length i Notify Info notify Info infos i info Map put notify Info get Name notify Info info Map remove resource get Name Notify Info new Infos new Notify Info info Map size int i 0 for Iterator iter info Map values iterator iter has Next new Infos i Notify Info iter next Sync File Writer write All Notify Info resource get Parent new Infos  deleteNotifyInfo deleteNotifyInfo IResource CVSException NotifyInfo SyncFileWriter readAllNotifyInfo getParent infoMap HashMap NotifyInfo notifyInfo infoMap notifyInfo getName notifyInfo infoMap getName NotifyInfo newInfos NotifyInfo infoMap infoMap hasNext newInfos NotifyInfo SyncFileWriter writeAllNotifyInfo getParent newInfos
Add the entry to the CVS Baserev file We are not initially concerned with efficiency since edit unedit are typically issued on a small set of files XXX If there was a previous notify entry for the resource it is replaced This is probably not the proper behavior see Eclipse File param resource param info public void set Baserev Info I Resource resource Baserev Info info throws CVS Exception Baserev Info infos Sync File Writer read All Baserev Info resource get Parent if infos null infos new Baserev Info info else Map info Map new Hash Map for int i 0 i infos length i info Map put infos i get Name infos i info Map put info get Name info Baserev Info new Infos new Baserev Info info Map size int i 0 for Iterator iter info Map values iterator iter has Next new Infos i Baserev Info iter next infos new Infos Sync File Writer write All Baserev Info resource get Parent infos  EclipseFile setBaserevInfo IResource BaserevInfo CVSException BaserevInfo SyncFileWriter readAllBaserevInfo getParent BaserevInfo infoMap HashMap infoMap getName infoMap getName BaserevInfo newInfos BaserevInfo infoMap infoMap hasNext newInfos BaserevInfo newInfos SyncFileWriter writeAllBaserevInfo getParent
Method get Baserev Info param resource return Baserev Info public Baserev Info get Baserev Info I Resource resource throws CVS Exception Baserev Info infos Sync File Writer read All Baserev Info resource get Parent if infos null return null for int i 0 i infos length i Baserev Info info infos i if info get Name equals resource get Name return info return null  getBaserevInfo BaserevInfo BaserevInfo getBaserevInfo IResource CVSException BaserevInfo SyncFileWriter readAllBaserevInfo getParent BaserevInfo getName getName
Method delete Notify Info param resource public void delete Baserev Info I Resource resource throws CVS Exception Baserev Info infos Sync File Writer read All Baserev Info resource get Parent if infos null return Map info Map new Hash Map for int i 0 i infos length i info Map put infos i get Name infos i info Map remove resource get Name Baserev Info new Infos new Baserev Info info Map size int i 0 for Iterator iter info Map values iterator iter has Next new Infos i Baserev Info iter next Sync File Writer write All Baserev Info resource get Parent new Infos  deleteNotifyInfo deleteBaserevInfo IResource CVSException BaserevInfo SyncFileWriter readAllBaserevInfo getParent infoMap HashMap infoMap getName infoMap getName BaserevInfo newInfos BaserevInfo infoMap infoMap hasNext newInfos BaserevInfo SyncFileWriter writeAllBaserevInfo getParent newInfos
public void copy File To Base Directory final I File file I Progress Monitor monitor throws CVS Exception monitor Policy monitor For monitor monitor begin Task null 100 I Scheduling Rule rule null try rule begin Batching file Policy sub Monitor For monitor 10 Resource Sync Info info get Resource Sync file The file must exist remotely and locally if info null info is Added info is Deleted return Sync File Writer write File To Base Directory file Policy sub Monitor For monitor 80 resource Changed file finally if rule null end Batching rule Policy sub Monitor For monitor 10 monitor done  copyFileToBaseDirectory IFile IProgressMonitor CVSException monitorFor beginTask ISchedulingRule beginBatching subMonitorFor ResourceSyncInfo getResourceSync isAdded isDeleted SyncFileWriter writeFileToBaseDirectory subMonitorFor resourceChanged endBatching subMonitorFor
public void restore File From Base Directory final I File file I Progress Monitor monitor throws CVS Exception monitor Policy monitor For monitor monitor begin Task null 100 I Scheduling Rule rule null try rule begin Batching file Policy sub Monitor For monitor 10 Resource Sync Info info get Resource Sync file The file must exist remotely if info null info is Added return Sync File Writer restore File From Base Directory file Policy sub Monitor For monitor 80 resource Changed file finally if rule null end Batching rule Policy sub Monitor For monitor 10 monitor done  restoreFileFromBaseDirectory IFile IProgressMonitor CVSException monitorFor beginTask ISchedulingRule beginBatching subMonitorFor ResourceSyncInfo getResourceSync isAdded SyncFileWriter restoreFileFromBaseDirectory subMonitorFor resourceChanged endBatching subMonitorFor
public void delete File From Base Directory final I File file I Progress Monitor monitor throws CVS Exception Resource Sync Info info get Resource Sync file The file must exist remotely if info null info is Added return Sync File Writer delete File From Base Directory file monitor  deleteFileFromBaseDirectory IFile IProgressMonitor CVSException ResourceSyncInfo getResourceSync isAdded SyncFileWriter deleteFileFromBaseDirectory
Method is Sync Info Loaded returns true if all the sync info for the provided resources is loaded into the internal cache param resources param i return boolean public boolean is Sync Info Loaded I Resource resources int depth throws CVS Exception get the folders involved I Container folders get Parent Folders resources depth for all folders that have a CVS folder ensure the sync info is cached for int i 0 i folders length i I Container parent folders i if get Sync Info Cache For parent is Sync Info Loaded parent return false return true  isSyncInfoLoaded isSyncInfoLoaded IResource CVSException IContainer getParentFolders IContainer getSyncInfoCacheFor isSyncInfoLoaded
Method ensure Sync Info Loaded loads all the relevent sync info into the cache This method can only be invoked when the workspace is open for modification in other words it cannot be invoked from inside a POST CHANGE delta listener param resources param i return Object public void ensure Sync Info Loaded I Resource resources int depth throws CVS Exception get the folders involved I Container folders get Parent Folders resources depth Cache the sync info for all the folders for int i 0 i folders length i I Container parent folders i I Scheduling Rule rule null try rule begin Batching parent null try begin Operation cache Resource Sync For Children parent true can modify workspace cache Folder Sync parent cache Folder Ignores parent finally end Operation finally if rule null end Batching rule null  ensureSyncInfoLoaded POST_CHANGE ensureSyncInfoLoaded IResource CVSException IContainer getParentFolders IContainer ISchedulingRule beginBatching beginOperation cacheResourceSyncForChildren cacheFolderSync cacheFolderIgnores endOperation endBatching
resource accept new I Resource Visitor public boolean visit I Resource inner Resource throws Core Exception if inner Resource get Type I Resource FOLDER folders add inner Resource let the depth determine who we visit return true  IResourceVisitor IResource innerResource CoreException innerResource getType IResource innerResource
private I Container get Parent Folders I Resource resources int depth throws CVS Exception final Set folders new Hash Set for int i 0 i resources length i I Resource resource resources i folders add resource get Project if resource get Type I Resource PROJECT folders add resource get Parent use the depth to gather child folders when appropriate if depth I Resource DEPTH ZERO try resource accept new I Resource Visitor public boolean visit I Resource inner Resource throws Core Exception if inner Resource get Type I Resource FOLDER folders add inner Resource let the depth determine who we visit return true depth false catch Core Exception e throw CVS Exception wrap Exception e return I Container folders to Array new I Container folders size  IContainer getParentFolders IResource CVSException HashSet IResource getProject getType IResource getParent IResource DEPTH_ZERO IResourceVisitor IResource innerResource CoreException innerResource getType IResource innerResource CoreException CVSException wrapException IContainer toArray IContainer
Perform sync info batching within the context of the given resource scheduling rule while running the given ICVS Runnable param runnable param monitor throws CVS Exception public void run I Scheduling Rule resource Rule ICVS Runnable runnable I Progress Monitor monitor throws CVS Exception monitor Policy monitor For monitor monitor begin Task null 100 I Scheduling Rule rule begin Batching resource Rule Policy sub Monitor For monitor 10 try runnable run Policy sub Monitor For monitor 80 finally if rule null end Batching rule Policy sub Monitor For monitor 10 monitor done  ICVSRunnable CVSException ISchedulingRule resourceRule ICVSRunnable IProgressMonitor CVSException monitorFor beginTask ISchedulingRule beginBatching resourceRule subMonitorFor subMonitorFor endBatching subMonitorFor
This method is invoked from the I Move Delete Hook to batch the resulting sync file changes public void run ICVS Runnable runnable I Progress Monitor monitor throws CVS Exception Use the root resource as the rule Note This will not lock the workspace due to behavior in Reentrant Lock I Workspace Root root Resources Plugin get Workspace get Root run root runnable monitor  IMoveDeleteHook ICVSRunnable IProgressMonitor CVSException ReentrantLock IWorkspaceRoot ResourcesPlugin getWorkspace getRoot
Method is Edited returns true if a cvs edit was performed on the given file and no commit or unedit has yet been performed param i Resource return boolean public boolean is Edited I File resource return Sync File Writer is Edited resource  isEdited iResource isEdited IFile SyncFileWriter isEdited
package void adjust Dirty State Recursively I Resource resource String indicator throws CVS Exception if resource get Type I Resource ROOT return try begin Operation if get Sync Info Cache For resource caches Dirty State if indicator get Dirty Indicator resource return get Sync Info Cache For resource set Dirty Indicator resource indicator if Policy DEBUG DIRTY CACHING debug resource indicator adjusting dirty state NON NLS 1 I Container parent resource get Parent if indicator NOT DIRTY INDICATOR adjust Dirty State Recursively parent RECOMPUTE INDICATOR if indicator RECOMPUTE INDICATOR adjust Dirty State Recursively parent RECOMPUTE INDICATOR if indicator IS DIRTY INDICATOR adjust Dirty State Recursively parent indicator finally end Operation  adjustDirtyStateRecursively IResource CVSException getType IResource beginOperation getSyncInfoCacheFor cachesDirtyState getDirtyIndicator getSyncInfoCacheFor setDirtyIndicator DEBUG_DIRTY_CACHING IContainer getParent NOT_DIRTY_INDICATOR adjustDirtyStateRecursively RECOMPUTE_INDICATOR RECOMPUTE_INDICATOR adjustDirtyStateRecursively RECOMPUTE_INDICATOR IS_DIRTY_INDICATOR adjustDirtyStateRecursively endOperation
protected String get Dirty Indicator I Resource resource throws CVS Exception try begin Operation return get Sync Info Cache For resource get Dirty Indicator resource finally end Operation  getDirtyIndicator IResource CVSException beginOperation getSyncInfoCacheFor getDirtyIndicator endOperation
protected void set Dirty Indicator I Resource resource boolean modified throws CVS Exception String indicator modified IS DIRTY INDICATOR NOT DIRTY INDICATOR set the dirty indicator and adjust the parent accordingly adjust Dirty State Recursively resource indicator  setDirtyIndicator IResource CVSException IS_DIRTY_INDICATOR NOT_DIRTY_INDICATOR adjustDirtyStateRecursively
Method get Name param sync Bytes private String get Name byte sync Bytes throws CVS Exception return Resource Sync Info get Name sync Bytes  getName syncBytes getName syncBytes CVSException ResourceSyncInfo getName syncBytes
Method is Folder param sync Bytes return boolean private boolean is Folder byte sync Bytes return Resource Sync Info is Folder sync Bytes  isFolder syncBytes isFolder syncBytes ResourceSyncInfo isFolder syncBytes
Method convert To Deletion param sync Bytes return byte private byte convert To Deletion byte sync Bytes throws CVS Exception return Resource Sync Info convert To Deletion sync Bytes  convertToDeletion syncBytes convertToDeletion syncBytes CVSException ResourceSyncInfo convertToDeletion syncBytes
Method created By Move clears any session properties on the file so it appears as an ADDED file param destination public void created By Move I File file throws CVS Exception delete Resource Sync file  createdByMove createdByMove IFile CVSException deleteResourceSync
static public void debug I Resource resource String indicator String string String di Eclipse Synchronizer IS DIRTY INDICATOR if indicator Eclipse Synchronizer IS DIRTY INDICATOR di dirty NON NLS 1 else if indicator Eclipse Synchronizer NOT DIRTY INDICATOR di clean NON NLS 1 else di needs recomputing NON NLS 1 System out println string di resource get Full Path NON NLS 1 NON NLS 2 NON NLS 3  IResource EclipseSynchronizer IS_DIRTY_INDICATOR EclipseSynchronizer IS_DIRTY_INDICATOR EclipseSynchronizer NOT_DIRTY_INDICATOR getFullPath
static public void debug I Resource resource boolean modified String string debug resource modified IS DIRTY INDICATOR NOT DIRTY INDICATOR string  IResource IS_DIRTY_INDICATOR NOT_DIRTY_INDICATOR
param file return int public int get Modification State I Resource resource throws CVS Exception String indicator get Dirty Indicator resource if Policy DEBUG DIRTY CACHING debug resource indicator get Modification State NON NLS 1 if indicator null indicator RECOMPUTE INDICATOR return ICVS File UNKNOWN else if indicator IS DIRTY INDICATOR return ICVS File DIRTY else if indicator NOT DIRTY INDICATOR return ICVS File CLEAN else return ICVS File UNKNOWN  getModificationState IResource CVSException getDirtyIndicator DEBUG_DIRTY_CACHING getModificationState RECOMPUTE_INDICATOR ICVSFile IS_DIRTY_INDICATOR ICVSFile NOT_DIRTY_INDICATOR ICVSFile ICVSFile
Return whether the resource is within the scope of a currently active CVS operation param resource return public boolean is Within Active Operation Scope I Resource resource return resource Lock is Within Active Operation Scope resource  isWithinActiveOperationScope IResource resourceLock isWithinActiveOperationScope
Set the timestamp of the given file and set it to be CLEAN It is assumed that this method is only invoked to reset the file timestamp to the timestamp that is in the CVS Entries file param file param time throws CVS Exception public void set Time Stamp Eclipse File cvs File long time throws CVS Exception I Scheduling Rule rule null I File file I File cvs File getI Resource try rule begin Batching file null try begin Operation try file set Local Time Stamp time set Modified cvs File ICVS File CLEAN catch Core Exception e throw CVS Exception wrap Exception e resource Changed file finally end Operation finally if rule null end Batching rule null  CVSException setTimeStamp EclipseFile cvsFile CVSException ISchedulingRule IFile IFile cvsFile getIResource beginBatching beginOperation setLocalTimeStamp setModified cvsFile ICVSFile CoreException CVSException wrapException resourceChanged endOperation endBatching
container accept new I Resource Visitor public boolean visit I Resource resource throws Core Exception if get Sync Bytes resource null resource Changed resource if resource get Type I Resource FILE if get Folder Sync I Container resource null folder Changed I Container resource return true return false  IResourceVisitor IResource CoreException getSyncBytes resourceChanged getType IResource getFolderSync IContainer folderChanged IContainer
React to a resource that was just moved by the move delete hook param resource the resource that was moved at its new location public void post Move I Resource resource throws CVS Exception try begin Operation if resource get Type I Resource FILE Purge any copied sync info so true sync info will be obtained from the synchronizer cache session Property Cache purge Resource Sync Cache resource else I Container container I Container resource Purge any copied sync info session Property Cache purge Cache container true deep Dirty all resources so old sync info will be rewritten to disk try container accept new I Resource Visitor public boolean visit I Resource resource throws Core Exception if get Sync Bytes resource null resource Changed resource if resource get Type I Resource FILE if get Folder Sync I Container resource null folder Changed I Container resource return true return false catch Core Exception e throw CVS Exception wrap Exception e Flush the sync info to disk flush container true deep null finally end Operation  postMove IResource CVSException beginOperation getType IResource sessionPropertyCache purgeResourceSyncCache IContainer IContainer sessionPropertyCache purgeCache IResourceVisitor IResource CoreException getSyncBytes resourceChanged getType IResource getFolderSync IContainer folderChanged IContainer CoreException CVSException wrapException endOperation
This method is to be invoked only from the move delete hook It s purpose is to obtain the sync look in order to prevent other threads from accessing sync info while the move delete is taking place param runnable param monitor throws CVS Exception public void perform Move Delete ICVS Runnable runnable I Progress Monitor monitor throws CVS Exception I Scheduling Rule rule null try monitor begin Task null 100 rule begin Batching null null try begin Operation runnable run Policy sub Monitor For monitor 95 finally end Operation finally if rule null end Batching rule Policy sub Monitor For monitor 5 monitor done  CVSException performMoveDelete ICVSRunnable IProgressMonitor CVSException ISchedulingRule beginTask beginBatching beginOperation subMonitorFor endOperation endBatching subMonitorFor
Compute the modification state for the given file If the modification State is ICVS File UNKNOWN it is computed However if it is CLEAN or DIRTY it is set accordingly CLEAN or DIRTY can only be used if the caller is protected from resource modifications either by a scheduling rule or inside a delta handler param file param modification State return true if the file is dirty public boolean set Modified Eclipse File cvs File int modification State throws CVS Exception try begin Operation boolean dirty if modification State ICVS File UNKNOWN dirty cvs File is Dirty else dirty modification State ICVS File DIRTY set Dirty Indicator cvs File getI Resource dirty return dirty finally end Operation  modificationState ICVSFile modificationState setModified EclipseFile cvsFile modificationState CVSException beginOperation modificationState ICVSFile cvsFile isDirty modificationState ICVSFile setDirtyIndicator cvsFile getIResource endOperation
Set the modified state of the folder This method can be called when no resource locks are held It will check the cached modification state of all the folder s children before setting If the states of the children do not match the state for the folder is not cached param folder param modified public void set Modified ICVS Folder cvs Folder boolean modified throws CVS Exception try begin Operation I Container folder I Container cvs Folder getI Resource The drop out condition for clean or dirty are the opposite i e if modified and a dirty is found we can set the indicator and if not modified and a dirty or unknown is found we cannot set the indicator boolean ok To Set modified Obtain the children while we re locked to ensure some were not added or changed ICVS Resource children cvs Folder members ICVS Folder ALL UNIGNORED MEMBERS for int i 0 i children length i I Resource resource children i getI Resource if modified if get Dirty Indicator resource IS DIRTY INDICATOR ok To Set true break else if get Dirty Indicator resource NOT DIRTY INDICATOR ok To Set false break if ok To Set set Dirty Indicator folder modified finally end Operation  setModified ICVSFolder cvsFolder CVSException beginOperation IContainer IContainer cvsFolder getIResource okToSet ICVSResource cvsFolder ICVSFolder ALL_UNIGNORED_MEMBERS IResource getIResource getDirtyIndicator IS_DIRTY_INDICATOR okToSet getDirtyIndicator NOT_DIRTY_INDICATOR okToSet okToSet setDirtyIndicator endOperation
public boolean was Phantom I Resource resource if resource exists try return synchronizer Cache get Cached Sync Bytes resource null resource get Type I Resource FOLDER synchronizer Cache has Cached Folder Sync I Container resource catch CVS Exception e Log and assume resource is not a phantom CVS Provider Plugin log e return false  wasPhantom IResource synchronizerCache getCachedSyncBytes getType IResource synchronizerCache hasCachedFolderSync IContainer CVSException CVSProviderPlugin
Method called from background handler when resources that are mapped to CVS are recreated param resources param monitor throws CVS Exception public void resources Recreated I Resource resources I Progress Monitor monitor throws CVS Exception if resources length 0 return I Scheduling Rule rule null I Scheduling Rule projects Rule get Project Rule resources try monitor Policy monitor For monitor monitor begin Task null 100 rule begin Batching projects Rule monitor for int i 0 i resources length i I Resource resource resources i try created resource catch CVS Exception e CVS Provider Plugin log e finally if rule null end Batching rule Policy sub Monitor For monitor 5 monitor done  CVSException resourcesRecreated IResource IProgressMonitor CVSException ISchedulingRule ISchedulingRule projectsRule getProjectRule monitorFor beginTask beginBatching projectsRule IResource CVSException CVSProviderPlugin endBatching subMonitorFor
private I Scheduling Rule get Project Rule I Resource resources Hash Set set new Hash Set for int i 0 i resources length i I Resource resource resources i set add resource get Project I Project projects I Project set to Array new I Project set size if projects length 1 return projects 0 return new Multi Rule projects  ISchedulingRule getProjectRule IResource HashSet HashSet IResource getProject IProject IProject toArray IProject MultiRule
protected void created I Resource resource throws CVS Exception try begin Operation if resource exists restore Resource Sync resource if resource get Type I Resource FOLDER restore Folder Sync I Folder resource finally end Operation  IResource CVSException beginOperation restoreResourceSync getType IResource restoreFolderSync IFolder endOperation
private void restore Folder Sync I Folder folder throws CVS Exception try set the dirty count using what was cached in the phantom it begin Operation Folder Sync Info folder Info synchronizer Cache get Cached Folder Sync folder if folder Info null There is folder sync info to restore if folder get Folder Sync File Writer CVS DIRNAME exists There is already a CVS subdirectory which indicates that either the folder was recreated by an external tool or that a folder with CVS information was copied from another location To know the difference we need to compare the folder sync info If they are mapped to the same root and repository then just purge the phantom info Otherwise keep the original sync info Get the new folder sync info Folder Sync Info new Folder Info get Folder Sync folder if new Folder Info get Root equals folder Info get Root new Folder Info get Repository equals folder Info get Repository The folder is the same so use what is on disk Fall through to ensure that the Root and Repository files exist else The folder is mapped to a different location Purge new resource sync before restoring from phantom ICVS Folder cvs Folder CVS Workspace Root getCVS Folder For folder ICVS Resource children cvs Folder members ICVS Folder MANAGED MEMBERS for int i 0 i children length i ICVS Resource resource children i delete Resource Sync resource getI Resource set the sync info using what was cached in the phantom set Folder Sync folder folder Info purge the dirty cache so any old persisted dirty state is purged session Property Cache purge Dirty Cache folder if there are managed members indicate that 1 is changed so the Entries file is written I Resource members members folder for int i 0 i members length i I Resource resource members i if get Sync Bytes resource null resource Changed resource break finally try end Operation finally synchronizer Cache flush folder  restoreFolderSync IFolder CVSException beginOperation FolderSyncInfo folderInfo synchronizerCache getCachedFolderSync folderInfo getFolder SyncFileWriter CVS_DIRNAME FolderSyncInfo newFolderInfo getFolderSync newFolderInfo getRoot folderInfo getRoot newFolderInfo getRepository folderInfo getRepository ICVSFolder cvsFolder CVSWorkspaceRoot getCVSFolderFor ICVSResource cvsFolder ICVSFolder MANAGED_MEMBERS ICVSResource deleteResourceSync getIResource setFolderSync folderInfo sessionPropertyCache purgeDirtyCache IResource IResource getSyncBytes resourceChanged endOperation synchronizerCache
private void restore Resource Sync I Resource resource throws CVS Exception try begin Operation byte sync Bytes synchronizer Cache get Cached Sync Bytes resource if sync Bytes null if Resource Sync Info is Folder sync Bytes sync Bytes Resource Sync Info convert From Deletion sync Bytes byte new Bytes get Sync Bytes resource if new Bytes null Resource Sync Info is Folder new Bytes new Bytes Resource Sync Info convert From Deletion new Bytes if new Bytes null Util equals sync Bytes new Bytes only move the sync info if there is no new sync info set Sync Bytes resource sync Bytes finally try end Operation finally synchronizer Cache set Cached Sync Bytes resource null true  restoreResourceSync IResource CVSException beginOperation syncBytes synchronizerCache getCachedSyncBytes syncBytes ResourceSyncInfo isFolder syncBytes syncBytes ResourceSyncInfo convertFromDeletion syncBytes newBytes getSyncBytes newBytes ResourceSyncInfo isFolder newBytes newBytes ResourceSyncInfo convertFromDeletion newBytes newBytes syncBytes newBytes setSyncBytes syncBytes endOperation synchronizerCache setCachedSyncBytes
private void purge Dirty Cache I Project project I Progress Monitor monitor throws CVS Exception session Property Cache purge Dirty Cache project  purgeDirtyCache IProject IProgressMonitor CVSException sessionPropertyCache purgeDirtyCache

public static Remote Folder Tree build Remote Tree CVS Repository Location repository ICVS Folder root CVS Tag tag I Progress Monitor monitor throws CVS Exception monitor begin Task null 100 try Remote Folder Tree Builder builder new Remote Folder Tree Builder repository root tag Remote Folder Tree tree builder build Tree new ICVS Resource root Policy sub Monitor For monitor 50 File Content Caching Service service new File Content Caching Service repository tree builder get File Diffs service cache File Contents Policy sub Monitor For monitor 50 return tree finally monitor done  RemoteFolderTree buildRemoteTree CVSRepositoryLocation ICVSFolder CVSTag IProgressMonitor CVSException beginTask RemoteFolderTreeBuilder RemoteFolderTreeBuilder RemoteFolderTree buildTree ICVSResource subMonitorFor FileContentCachingService FileContentCachingService getFileDiffs cacheFileContents subMonitorFor
Fetch and cache the file contents for the specified files param root the root folder for the files being fetched param file Paths the root relative file paths param monitor throws CVS Exception public static void fetch File Contents Remote Folder Tree root String file Paths I Progress Monitor monitor throws CVS Exception File Content Caching Service service new File Content Caching Service CVS Repository Location root get Repository root file Paths service cache File Contents monitor  filePaths CVSException fetchFileContents RemoteFolderTree filePaths IProgressMonitor CVSException FileContentCachingService FileContentCachingService CVSRepositoryLocation getRepository filePaths cacheFileContents
public static Remote File build Remote Tree CVS Repository Location repository ICVS File file CVS Tag tag I Progress Monitor monitor throws CVS Exception monitor begin Task null 100 try Remote Folder Tree Builder builder new Remote Folder Tree Builder repository file get Parent tag Remote File remote builder build Tree file monitor if builder get File Diffs length 0 Getting the storage of the file will cache the contents remote get Storage Policy sub Monitor For monitor 50 return remote catch Team Exception e throw CVS Exception wrap Exception e finally monitor done  RemoteFile buildRemoteTree CVSRepositoryLocation ICVSFile CVSTag IProgressMonitor CVSException beginTask RemoteFolderTreeBuilder RemoteFolderTreeBuilder getParent RemoteFile buildTree getFileDiffs getStorage subMonitorFor TeamException CVSException wrapException
public File Content Caching Service CVS Repository Location repository Remote Folder Tree tree String file Diffs this repository repository this remote Root tree this file Diffs file Diffs  FileContentCachingService CVSRepositoryLocation RemoteFolderTree fileDiffs remoteRoot fileDiffs fileDiffs
private void cache File Contents I Progress Monitor monitor throws CVS Exception String files get Uncached Files if files length 0 return Fetch the file contents for all out of sync files by running an update on the remote tree passing the known changed files as arguments monitor begin Task null 10 files length 100 Policy check Canceled monitor Session session new Session repository remote Root false session open Policy sub Monitor For monitor 10 false read only try Policy check Canceled monitor I Status status Command UPDATE execute session Command NO GLOBAL OPTIONS new Local Option Update IGNORE LOCAL CHANGES files null Policy sub Monitor For monitor files length 100 if status isOK No big deal but log the problem anyway CVS Provider Plugin log new CVS Exception status finally session close monitor done  cacheFileContents IProgressMonitor CVSException getUncachedFiles beginTask checkCanceled remoteRoot subMonitorFor checkCanceled IStatus NO_GLOBAL_OPTIONS LocalOption IGNORE_LOCAL_CHANGES subMonitorFor CVSProviderPlugin CVSException
private String get Uncached Files if file Diffs length 0 return file Diffs List existing new Array List for int i 0 i file Diffs length i String file Path file Diffs i try ICVS File file remote Root get File file Path if file instanceof Remote File if Remote File file is Contents Cached existing add file Path catch CVS Exception e The child does not exists so exclude it return String existing to Array new String existing size  getUncachedFiles fileDiffs fileDiffs ArrayList fileDiffs filePath fileDiffs ICVSFile remoteRoot getFile filePath RemoteFile RemoteFile isContentsCached filePath CVSException toArray

event get Delta accept new I Resource Delta Visitor public boolean visit I Resource Delta delta I Resource resource delta get Resource if resource get Type I Resource PROJECT I Project project I Project resource if project is Accessible return false if delta get Flags I Resource Delta OPEN 0 return false if Repository Provider get Provider project CVS Provider Plugin get Type Id null return false if resource get Type I Resource FILE delta get Kind I Resource Delta CHANGED resource exists int flags delta get Flags if flags INTERESTING CHANGES 0 resource Changed resource false else if delta get Kind I Resource Delta ADDED resource Changed resource true else if delta get Kind I Resource Delta REMOVED try Eclipse Synchronizer get Instance handle Deleted resource catch CVS Exception e CVS Provider Plugin log e modified Resources add resource return true  getDelta IResourceDeltaVisitor IResourceDelta IResource getResource getType IResource IProject IProject isAccessible getFlags IResourceDelta RepositoryProvider getProvider CVSProviderPlugin getTypeId getType IResource getKind IResourceDelta getFlags INTERESTING_CHANGES resourceChanged getKind IResourceDelta resourceChanged getKind IResourceDelta EclipseSynchronizer getInstance handleDeleted CVSException CVSProviderPlugin modifiedResources
Listen for file modifications and fire modification state changes see org eclipse core resources I Resource Change Listener resource Changed org eclipse core resources I Resource Change Event public void resource Changed I Resource Change Event event try event get Delta accept new I Resource Delta Visitor public boolean visit I Resource Delta delta I Resource resource delta get Resource if resource get Type I Resource PROJECT I Project project I Project resource if project is Accessible return false if delta get Flags I Resource Delta OPEN 0 return false if Repository Provider get Provider project CVS Provider Plugin get Type Id null return false if resource get Type I Resource FILE delta get Kind I Resource Delta CHANGED resource exists int flags delta get Flags if flags INTERESTING CHANGES 0 resource Changed resource false else if delta get Kind I Resource Delta ADDED resource Changed resource true else if delta get Kind I Resource Delta REMOVED try Eclipse Synchronizer get Instance handle Deleted resource catch CVS Exception e CVS Provider Plugin log e modified Resources add resource return true if modified Resources is Empty Resource State Change Listeners get Listener resource Modified I Resource modified Resources to Array new I Resource modified Resources size modified Resources clear catch Core Exception e CVS Provider Plugin log e  IResourceChangeListener resourceChanged IResourceChangeEvent resourceChanged IResourceChangeEvent getDelta IResourceDeltaVisitor IResourceDelta IResource getResource getType IResource IProject IProject isAccessible getFlags IResourceDelta RepositoryProvider getProvider CVSProviderPlugin getTypeId getType IResource getKind IResourceDelta getFlags INTERESTING_CHANGES resourceChanged getKind IResourceDelta resourceChanged getKind IResourceDelta EclipseSynchronizer getInstance handleDeleted CVSException CVSProviderPlugin modifiedResources modifiedResources isEmpty ResourceStateChangeListeners getListener resourceModified IResource modifiedResources toArray IResource modifiedResources modifiedResources CoreException CVSProviderPlugin
We register a save participant so we can get the delta from workbench startup to plugin startup throws Core Exception public void register Save Participant throws Core Exception I Workspace ws Resources Plugin get Workspace I Saved State ss ws add Save Participant CVS Provider Plugin get Plugin this if ss null ss process Resource Change Events this ws remove Save Participant CVS Provider Plugin get Plugin  CoreException registerSaveParticipant CoreException IWorkspace ResourcesPlugin getWorkspace ISavedState addSaveParticipant CVSProviderPlugin getPlugin processResourceChangeEvents removeSaveParticipant CVSProviderPlugin getPlugin
see org eclipse core resources I Save Participant done Saving org eclipse core resources I Save Context public void done Saving I Save Context context Do nothing  ISaveParticipant doneSaving ISaveContext doneSaving ISaveContext
see org eclipse core resources I Save Participant prepare To Save org eclipse core resources I Save Context public void prepare To Save I Save Context context Do nothing  ISaveParticipant prepareToSave ISaveContext prepareToSave ISaveContext
see org eclipse core resources I Save Participant rollback org eclipse core resources I Save Context public void rollback I Save Context context Do nothing  ISaveParticipant ISaveContext ISaveContext
see org eclipse core resources I Save Participant saving org eclipse core resources I Save Context public void saving I Save Context context Do nothing  ISaveParticipant ISaveContext ISaveContext
Method updated flags the objetc as having been modfied by the updated handler This flag is read during the resource delta to determine whether the modification made the file dirty or not param m File public void updated ICVS File m File try if m File instanceof Eclipse File I File file I File m File getI Resource file set Session Property UPDATE TIMESTAMP new Long file get Modification Stamp catch Core Exception e CVS Provider Plugin log e  mFile ICVSFile mFile mFile EclipseFile IFile IFile mFile getIResource setSessionProperty UPDATE_TIMESTAMP getModificationStamp CoreException CVSProviderPlugin
private void resource Changed I Resource resource boolean addition if is Clean Update resource return try Eclipse Resource cvs Resource Eclipse Resource CVS Workspace Root getCVS Resource For resource if cvs Resource is Ignored cvs Resource handle Modification addition modified Resources add resource catch CVS Exception e Log the exception and continue CVS Provider Plugin log e  resourceChanged IResource isCleanUpdate EclipseResource cvsResource EclipseResource CVSWorkspaceRoot getCVSResourceFor cvsResource isIgnored cvsResource handleModification modifiedResources CVSException CVSProviderPlugin
If the file was the result of a clean update the cached timestamp will be removed param resource return boolean private boolean is Clean Update I Resource resource if resource get Type I Resource FILE return false long mod Stamp resource get Modification Stamp Long when We Wrote try when We Wrote Long resource get Session Property UPDATE TIMESTAMP resource set Session Property UPDATE TIMESTAMP null catch Core Exception e CVS Provider Plugin log e when We Wrote null return when We Wrote null when We Wrote long Value mod Stamp  isCleanUpdate IResource getType IResource modStamp getModificationStamp whenWeWrote whenWeWrote getSessionProperty UPDATE_TIMESTAMP setSessionProperty UPDATE_TIMESTAMP CoreException CVSProviderPlugin whenWeWrote whenWeWrote whenWeWrote longValue modStamp

Static method which creates a file as a single child of its parent This should only be used when one is only interested in the file alone The returned Remote File represents the base of the local resource If the local resource does not have a base then null is returned even if the resource does exists remotely e g created by another party public static Remote File get Base Remote Folder parent ICVS File managed throws CVS Exception Assert is Not Null parent A parent folder must be provided for file managed get Name NON NLS 1 byte sync Bytes managed get Sync Bytes if sync Bytes null Resource Sync Info is Addition sync Bytes Either the file is unmanaged or has just been added i e doesn t necessarily have a remote return null if Resource Sync Info is Deletion sync Bytes sync Bytes Resource Sync Info convert From Deletion sync Bytes Remote File file new Remote File parent sync Bytes parent set Children new ICVS Remote Resource file return file  RemoteFile RemoteFile getBase RemoteFolder ICVSFile CVSException isNotNull getName syncBytes getSyncBytes syncBytes ResourceSyncInfo isAddition syncBytes ResourceSyncInfo isDeletion syncBytes syncBytes ResourceSyncInfo convertFromDeletion syncBytes RemoteFile RemoteFile syncBytes setChildren ICVSRemoteResource
This method is used by the CVS subscribers to create file handles public static Remote File from Bytes I Resource local byte bytes byte parent Bytes throws CVS Exception Assert is Not Null bytes Assert is True local get Type I Resource FILE Remote Folder parent Remote Folder from Bytes local get Parent parent Bytes Remote File file new Remote File parent bytes parent set Children new ICVS Remote Resource file return file  RemoteFile fromBytes IResource parentBytes CVSException isNotNull isTrue getType IResource RemoteFolder RemoteFolder fromBytes getParent parentBytes RemoteFile RemoteFile setChildren ICVSRemoteResource
Create a remote file handle for the given file path that is relative to the given location public static Remote File create String file Path ICVS Repository Location location Assert is Not Null file Path Assert is Not Null location I Path path new Path file Path Remote Folder parent new Remote Folder null parent location path remove Last Segments 1 to String null tag Remote File file new Remote File parent Update STATE NONE path last Segment null revision null keyword mode null tag parent set Children new ICVS Remote Resource file return file  RemoteFile filePath ICVSRepositoryLocation isNotNull filePath isNotNull IPath filePath RemoteFolder RemoteFolder removeLastSegments toString RemoteFile RemoteFile STATE_NONE lastSegment setChildren ICVSRemoteResource
Constructor for Remote File that should be used when nothing is know about the file ahead of time param parent the folder that is the parent of the file param workspace Sync State the workspace state use Update STATE NONE if unknown param name the name of the file param revision revision of the file or code null code if the revision is not known param keyword Mode keyword mode of the file or code null code if the mode is not known param tag tag for the file public Remote File Remote Folder parent int workspace Sync State String name String revision K Subst Option keyword Mode CVS Tag tag this parent name workspace Sync State get Sync Bytes name revision keyword Mode tag  RemoteFile workspaceSyncState STATE_NONE keywordMode RemoteFile RemoteFolder workspaceSyncState KSubstOption keywordMode CVSTag workspaceSyncState getSyncBytes keywordMode
private static byte get Sync Bytes String name String revision K Subst Option keyword Mode CVS Tag tag if revision null revision Resource Sync Info ADDED REVISION if keyword Mode null keyword Mode K Subst Option get Default Text Mode Mutable Resource Sync Info new Info new Mutable Resource Sync Info name revision new Info set Keyword Mode keyword Mode new Info set Tag tag return new Info get Bytes  getSyncBytes KSubstOption keywordMode CVSTag ResourceSyncInfo ADDED_REVISION keywordMode keywordMode KSubstOption getDefaultTextMode MutableResourceSyncInfo newInfo MutableResourceSyncInfo newInfo setKeywordMode keywordMode newInfo setTag newInfo getBytes
package Remote File Remote Folder parent byte sync Bytes throws CVS Exception this parent Update STATE NONE sync Bytes  RemoteFile RemoteFolder syncBytes CVSException STATE_NONE syncBytes
package Remote File Remote Folder parent int workspace Sync State byte sync Bytes throws CVS Exception this parent Resource Sync Info get Name sync Bytes workspace Sync State sync Bytes  RemoteFile RemoteFolder workspaceSyncState syncBytes CVSException ResourceSyncInfo getName syncBytes workspaceSyncState syncBytes
private Remote File Remote Folder parent String name int workspace Sync State byte sync Bytes super parent name this sync Bytes sync Bytes set Workspace Sync State workspace Sync State  RemoteFile RemoteFolder workspaceSyncState syncBytes syncBytes syncBytes setWorkspaceSyncState workspaceSyncState
see ICVS Resource accept ICVS Resource Visitor public void accept ICVS Resource Visitor visitor throws CVS Exception visitor visit File this  ICVSResource ICVSResourceVisitor ICVSResourceVisitor CVSException visitFile
see ICVS Resource accept ICVS Resource Visitor boolean public void accept ICVS Resource Visitor visitor boolean recurse throws CVS Exception visitor visit File this  ICVSResource ICVSResourceVisitor ICVSResourceVisitor CVSException visitFile
see ICVS Remote File get Contents public Input Stream get Contents I Progress Monitor monitor throws CVS Exception try return get Storage monitor get Contents catch Core Exception e throw CVS Exception wrap Exception e  ICVSRemoteFile getContents InputStream getContents IProgressMonitor CVSException getStorage getContents CoreException CVSException wrapException
protected void fetch Contents I Progress Monitor monitor throws Team Exception try about To Receive Contents get Sync Bytes internal Fetch Contents monitor If the fetch succeeded but no contents were cached from the server than we can assume that the remote file has no contents if is Contents Cached set Contents new Byte Array Input Stream new byte 0 monitor finally done Receiving Contents  fetchContents IProgressMonitor TeamException aboutToReceiveContents getSyncBytes internalFetchContents isContentsCached setContents ByteArrayInputStream doneReceivingContents
private void internal Fetch Contents I Progress Monitor monitor throws CVS Exception monitor begin Task Policy bind Remote File get Contents 100 NON NLS 1 if get Revision equals Resource Sync Info ADDED REVISION The revision of the remote file is not known so we need to use the tag to get the status of the file CVS Tag tag get Sync Info get Tag if tag null tag CVS Tag DEFAULT Remote Folder Member Fetcher fetcher new Remote Folder Member Fetcher Remote Folder get Parent tag fetcher update File Revisions new ICVS File this Policy sub Monitor For monitor 10 Session session new Session get Repository parent false create backups session open Policy sub Monitor For monitor 10 false read only try I Status status Command UPDATE execute session Command NO GLOBAL OPTIONS new Local Option Update make Tag Option new CVS Tag get Revision CVS Tag VERSION Update IGNORE LOCAL CHANGES new ICVS Resource this null Policy sub Monitor For monitor 80 if status get Code CVS Status SERVER ERROR throw new CVS Server Exception status finally session close monitor done  internalFetchContents IProgressMonitor CVSException beginTask RemoteFile getContents getRevision ResourceSyncInfo ADDED_REVISION CVSTag getSyncInfo getTag CVSTag RemoteFolderMemberFetcher RemoteFolderMemberFetcher RemoteFolder getParent updateFileRevisions ICVSFile subMonitorFor getRepository subMonitorFor IStatus NO_GLOBAL_OPTIONS LocalOption makeTagOption CVSTag getRevision CVSTag IGNORE_LOCAL_CHANGES ICVSResource subMonitorFor getCode CVSStatus SERVER_ERROR CVSServerException
public I Log Entry get Log Entry I Progress Monitor monitor throws CVS Exception if entry null monitor Policy monitor For monitor monitor begin Task Policy bind Remote File get Log Entries 100 NON NLS 1 Session session new Session get Repository parent false output to console session open Policy sub Monitor For monitor 10 false read only try try final List entries new Array List I Status status Command LOG execute session Command NO GLOBAL OPTIONS new Local Option Log make Revision Option get Revision new ICVS Resource Remote File this new Log Listener Remote File this entries Policy sub Monitor For monitor 90 if entries size 1 entry I Log Entry entries get 0 if status get Code CVS Status SERVER ERROR throw new CVS Server Exception status finally monitor done finally session close return entry  ILogEntry getLogEntry IProgressMonitor CVSException monitorFor beginTask RemoteFile getLogEntries getRepository subMonitorFor ArrayList IStatus NO_GLOBAL_OPTIONS LocalOption makeRevisionOption getRevision ICVSResource RemoteFile LogListener RemoteFile subMonitorFor ILogEntry getCode CVSStatus SERVER_ERROR CVSServerException
see ICVS Remote File get Log Entries public I Log Entry get Log Entries I Progress Monitor monitor throws CVS Exception monitor Policy monitor For monitor monitor begin Task Policy bind Remote File get Log Entries 100 NON NLS 1 final List entries new Array List Session session new Session get Repository parent false output to console session open Policy sub Monitor For monitor 10 false read only try Quiet Option quietness CVS Provider Plugin get Plugin get Quietness try CVS Provider Plugin get Plugin set Quietness Command VERBOSE I Status status Command LOG execute session Command NO GLOBAL OPTIONS Command NO LOCAL OPTIONS new ICVS Resource Remote File this new Log Listener Remote File this entries Policy sub Monitor For monitor 90 if status get Code CVS Status SERVER ERROR throw new CVS Server Exception status finally CVS Provider Plugin get Plugin set Quietness quietness monitor done finally session close return I Log Entry entries to Array new I Log Entry entries size  ICVSRemoteFile getLogEntries ILogEntry getLogEntries IProgressMonitor CVSException monitorFor beginTask RemoteFile getLogEntries ArrayList getRepository subMonitorFor QuietOption CVSProviderPlugin getPlugin getQuietness CVSProviderPlugin getPlugin setQuietness IStatus NO_GLOBAL_OPTIONS NO_LOCAL_OPTIONS ICVSResource RemoteFile LogListener RemoteFile subMonitorFor getCode CVSStatus SERVER_ERROR CVSServerException CVSProviderPlugin getPlugin setQuietness ILogEntry toArray ILogEntry
see ICVS Remote File get Revision public String get Revision try return Resource Sync Info get Revision sync Bytes catch CVS Exception e CVS Provider Plugin log e return Resource Sync Info ADDED REVISION  ICVSRemoteFile getRevision getRevision ResourceSyncInfo getRevision syncBytes CVSException CVSProviderPlugin ResourceSyncInfo ADDED_REVISION
private K Subst Option get Keyword Mode try return Resource Sync Info get Keyword Mode sync Bytes catch CVS Exception e CVS Provider Plugin log e return K Subst Option get Default Text Mode  KSubstOption getKeywordMode ResourceSyncInfo getKeywordMode syncBytes CVSException CVSProviderPlugin KSubstOption getDefaultTextMode
public Remote File to Revision String revision Remote Folder new Parent new Remote Folder null parent get Repository parent get Repository Relative Path parent get Tag Remote File file new Remote File new Parent get Workspace Sync State get Name revision get Keyword Mode CVS Tag DEFAULT new Parent set Children new ICVS Remote Resource file return file  RemoteFile toRevision RemoteFolder newParent RemoteFolder getRepository getRepositoryRelativePath getTag RemoteFile RemoteFile newParent getWorkspaceSyncState getName getKeywordMode CVSTag newParent setChildren ICVSRemoteResource
see ICVS File get Sync Info public Resource Sync Info get Sync Info try return new Resource Sync Info sync Bytes catch CVS Exception e CVS Provider Plugin log e return null  ICVSFile getSyncInfo ResourceSyncInfo getSyncInfo ResourceSyncInfo syncBytes CVSException CVSProviderPlugin
see ICVS Resource get Remote Location ICVS Folder public String get Remote Location ICVS Folder stop Searching throws CVS Exception return parent get Remote Location stop Searching Session SERVER SEPARATOR get Name  ICVSResource getRemoteLocation ICVSFolder getRemoteLocation ICVSFolder stopSearching CVSException getRemoteLocation stopSearching SERVER_SEPARATOR getName
Get the remote path for the receiver relative to the repository location path public String get Repository Relative Path String parent Path parent get Repository Relative Path return parent Path Session SERVER SEPARATOR get Name  getRepositoryRelativePath parentPath getRepositoryRelativePath parentPath SERVER_SEPARATOR getName
Return the server root directory for the repository public ICVS Repository Location get Repository return parent get Repository  ICVSRepositoryLocation getRepository getRepository
see I Managed File set File Info File Properties public void set Sync Info Resource Sync Info file Info int modification State set Sync Bytes file Info get Bytes modification State  IManagedFile setFileInfo FileProperties setSyncInfo ResourceSyncInfo fileInfo modificationState setSyncBytes fileInfo getBytes modificationState
Set the revision for this remote file param revision to associated with this remote file public void set Revision String revision throws CVS Exception sync Bytes Resource Sync Info set Revision sync Bytes revision  setRevision CVSException syncBytes ResourceSyncInfo setRevision syncBytes
public Input Stream get Contents throws CVS Exception if fetching Return the cached contents if is Contents Cached try Input Stream cached get Cached Contents if cached null return cached catch Team Exception e throw CVS Exception wrap Exception e There was nothing cached so return an empty stream This is done to allow the contents to be fetched i e update sends empty contents and real contents are sent back return new Byte Array Input Stream new byte 0  InputStream getContents CVSException isContentsCached InputStream getCachedContents TeamException CVSException wrapException ByteArrayInputStream
protected Input Stream get Cached Contents throws Team Exception if is Handle Cached Remote File file Remote File get Cached Handle if file null byte new Sync Bytes file get Sync Bytes if new Sync Bytes null Make sure the sync bytes match the content that is being accessed sync Bytes new Sync Bytes return super get Cached Contents  InputStream getCachedContents TeamException isHandleCached RemoteFile RemoteFile getCachedHandle newSyncBytes getSyncBytes newSyncBytes syncBytes newSyncBytes getCachedContents
public void set Contents Input Stream stream int response Type boolean keep Local History I Progress Monitor monitor throws CVS Exception try set Contents stream monitor catch Team Exception e throw CVS Exception wrap Exception e  setContents InputStream responseType keepLocalHistory IProgressMonitor CVSException setContents TeamException CVSException wrapException
see ICVS File set Read Only boolean public void set Read Only boolean read Only Remote Files are always read only  ICVSFile setReadOnly setReadOnly readOnly RemoteFiles
see ICVS File is Read Only public boolean is Read Only return true  ICVSFile isReadOnly isReadOnly
see ICVS File get Time Stamp public Date get Time Stamp return get Sync Info get Time Stamp  ICVSFile getTimeStamp getTimeStamp getSyncInfo getTimeStamp
see ICVS File set Time Stamp Date public void set Time Stamp Date date Remote Files are not muttable so do not support timestamp changes  ICVSFile setTimeStamp setTimeStamp RemoteFiles
see ICVS File move To String public void copy To String m File Do nothing  ICVSFile moveTo copyTo mFile
see I Remote Resource members I Progress Monitor public ICVS Remote Resource members I Progress Monitor progress return new ICVS Remote Resource 0  IRemoteResource IProgressMonitor ICVSRemoteResource IProgressMonitor ICVSRemoteResource
see I Remote Resource is Container public boolean is Container return false  IRemoteResource isContainer isContainer
see ICVS Resource is Folder public boolean is Folder return false  ICVSResource isFolder isFolder
public I Status tag final CVS Tag tag final Local Option local Options I Progress Monitor monitor throws CVS Exception monitor Policy monitor For monitor monitor begin Task null 100 Session session new Session get Repository get Parent true output to console session open Policy sub Monitor For monitor 10 true open for modification try return Command RTAG execute session Command NO GLOBAL OPTIONS local Options new CVS Tag get Revision CVS Tag VERSION tag new ICVS Remote Resource Remote File this Policy sub Monitor For monitor 90 finally session close  IStatus CVSTag LocalOption localOptions IProgressMonitor CVSException monitorFor beginTask getRepository getParent subMonitorFor NO_GLOBAL_OPTIONS localOptions CVSTag getRevision CVSTag ICVSRemoteResource RemoteFile subMonitorFor
public boolean equals Object target if this target return true if target instanceof Remote File return false Remote File remote Remote File target return super equals target remote get Revision equals get Revision  RemoteFile RemoteFile RemoteFile getRevision getRevision
see org eclipse team internal ccvs core ICVS File checkout int public void edit int notifications I Progress Monitor monitor do nothing  ICVSFile IProgressMonitor
see org eclipse team internal ccvs core ICVS File uncheckout public void unedit I Progress Monitor monitor do nothing  ICVSFile IProgressMonitor
see org eclipse team internal ccvs core ICVS File notification Completed public void notification Completed do nothing  ICVSFile notificationCompleted notificationCompleted
see org eclipse team internal ccvs core ICVS File get Pending Notification public Notify Info get Pending Notification return null  ICVSFile getPendingNotification NotifyInfo getPendingNotification
see Remote Resource for Tag ICVS Remote Folder CVS Tag public ICVS Remote Resource for Tag ICVS Remote Folder parent CVS Tag tag return new Remote File Remote Folder parent get Workspace Sync State get Name get Revision get Keyword Mode tag  RemoteResource forTag ICVSRemoteFolder CVSTag ICVSRemoteResource forTag ICVSRemoteFolder CVSTag RemoteFile RemoteFolder getWorkspaceSyncState getName getRevision getKeywordMode
see org eclipse team internal ccvs core ICVS Remote Resource for Tag org eclipse team internal ccvs core CVS Tag public ICVS Remote Resource for Tag CVS Tag tag Remote Folder Tree remote Folder new Remote Folder Tree null get Repository ICVS Remote Folder get Parent get Repository Relative Path tag Remote File remote File Remote File for Tag remote Folder tag remote Folder set Children new ICVS Remote Resource remote File return remote File  ICVSRemoteResource forTag CVSTag ICVSRemoteResource forTag CVSTag RemoteFolderTree remoteFolder RemoteFolderTree getRepository ICVSRemoteFolder getParent getRepositoryRelativePath RemoteFile remoteFile RemoteFile forTag remoteFolder remoteFolder setChildren ICVSRemoteResource remoteFile remoteFile
see org eclipse team internal ccvs core ICVS File committed org eclipse team internal ccvs core syncinfo Resource Sync Info public void checked In String info do nothing  ICVSFile ResourceSyncInfo checkedIn
see org eclipse team internal ccvs core ICVS File is Edited public boolean is Edited return false  ICVSFile isEdited isEdited
see org eclipse team internal ccvs core ICVS File get Sync Bytes public byte get Sync Bytes return sync Bytes  ICVSFile getSyncBytes getSyncBytes syncBytes
see org eclipse team internal ccvs core ICVS File set Sync Bytes byte public void set Sync Bytes byte sync Bytes int modification State if fetching Remote File file Remote File get Cached Handle if file null cache Handle else if file this file set Sync Bytes sync Bytes modification State this sync Bytes sync Bytes  ICVSFile setSyncBytes setSyncBytes syncBytes modificationState RemoteFile RemoteFile getCachedHandle cacheHandle setSyncBytes syncBytes modificationState syncBytes syncBytes
public String to String return super to String get Revision NON NLS 1  toString toString getRevision
see org eclipse team core sync I Remote Resource get Comment public String get Comment throws CVS Exception I Log Entry entry get Log Entry new Null Progress Monitor return entry get Comment  IRemoteResource getComment getComment CVSException ILogEntry getLogEntry NullProgressMonitor getComment
see org eclipse team core sync I Remote Resource get Content Identifier public String get Content Identifier return get Revision  IRemoteResource getContentIdentifier getContentIdentifier getRevision
see org eclipse team core sync I Remote Resource get Creator Display Name public String get Creator Display Name throws CVS Exception I Log Entry entry get Log Entry new Null Progress Monitor return entry get Author  IRemoteResource getCreatorDisplayName getCreatorDisplayName CVSException ILogEntry getLogEntry NullProgressMonitor getAuthor
Callback which indicates that the remote file is about to receive contents that should be cached param entry Line public void about To Receive Contents byte entry Line set Sync Bytes entry Line ICVS File CLEAN fetching true  entryLine aboutToReceiveContents entryLine setSyncBytes entryLine ICVSFile
The contents for the file have already been provided public void done Receiving Contents fetching false  doneReceivingContents
see org eclipse team core synchronize Resource Variant is Contents Cached public boolean is Contents Cached Made public for use by File Content Caching Service return super is Contents Cached  ResourceVariant isContentsCached isContentsCached FileContentCachingService isContentsCached

public static Remote Folder from Bytes I Resource local byte bytes throws CVS Exception Assert is Not Null bytes Assert is True local get Type I Resource FILE Folder Sync Info sync Info Folder Sync Info get Folder Sync Info bytes return new Remote Folder null local get Name Known Repositories get Instance get Repository sync Info get Root sync Info get Repository sync Info get Tag sync Info get Is Static  RemoteFolder fromBytes IResource CVSException isNotNull isTrue getType IResource FolderSyncInfo syncInfo FolderSyncInfo getFolderSyncInfo RemoteFolder getName KnownRepositories getInstance getRepository syncInfo getRoot syncInfo getRepository syncInfo getTag syncInfo getIsStatic
Constructor for Remote Folder public Remote Folder Remote Folder parent ICVS Repository Location repository String repository Relative Path CVS Tag tag this parent repository Relative Path null Util get Last Segment repository Relative Path NON NLS 1 repository repository Relative Path tag false  RemoteFolder RemoteFolder RemoteFolder ICVSRepositoryLocation repositoryRelativePath CVSTag repositoryRelativePath getLastSegment repositoryRelativePath repositoryRelativePath
public Remote Folder Remote Folder parent String name ICVS Repository Location repository String repository Relative Path CVS Tag tag boolean is Static super parent name if repository null this folder Info new Folder Sync Info repository Relative Path to String repository get Location tag is Static this repository repository  RemoteFolder RemoteFolder ICVSRepositoryLocation repositoryRelativePath CVSTag isStatic folderInfo FolderSyncInfo repositoryRelativePath toString getLocation isStatic
see ICVS Resource accept ICVS Resource Visitor public void accept ICVS Resource Visitor visitor throws CVS Exception visitor visit Folder this  ICVSResource ICVSResourceVisitor ICVSResourceVisitor CVSException visitFolder
see ICVS Resource accept ICVS Resource Visitor boolean public void accept ICVS Resource Visitor visitor boolean recurse throws CVS Exception visitor visit Folder this ICVS Resource resources if recurse resources members ICVS Folder ALL MEMBERS else resources members ICVS Folder FILE MEMBERS for int i 0 i resources length i resources i accept visitor recurse  ICVSResource ICVSResourceVisitor ICVSResourceVisitor CVSException visitFolder ICVSResource ICVSFolder ALL_MEMBERS ICVSFolder FILE_MEMBERS
public boolean exists I Progress Monitor monitor throws Team Exception try members monitor return true catch CVS Exception e if e get Status get Code CVS Status DOES NOT EXIST return false else throw e  IProgressMonitor TeamException CVSException getStatus getCode CVSStatus DOES_NOT_EXIST
Check whether the given resource is a child of the receiver remotely protected boolean exists ICVS Remote Resource child I Progress Monitor monitor throws CVS Exception return exists child get Tag monitor  ICVSRemoteResource IProgressMonitor CVSException getTag
final boolean exists new boolean true final I Update Message Listener listener new I Update Message Listener public void directory Information ICVS Folder parent String path boolean new Directory exists 0 true  IUpdateMessageListener IUpdateMessageListener directoryInformation ICVSFolder newDirectory
exists 0 true public void directory Does Not Exist ICVS Folder parent String path exists 0 false  directoryDoesNotExist ICVSFolder
exists 0 false public void file Information int type ICVS Folder parent String filename We can t set exists true here as we may get a conflict on a deleted file i e remote files are always communicated to the server as modified  fileInformation ICVSFolder
i e remote files are always communicated to the server as modified public void file Does Not Exist ICVS Folder parent String filename exists 0 false  fileDoesNotExist ICVSFolder
protected boolean exists final ICVS Remote Resource child CVS Tag tag I Progress Monitor monitor throws CVS Exception final I Progress Monitor progress Policy monitor For monitor progress begin Task Policy bind Remote Folder exists 100 NON NLS 1 try Create the listener for remote files and folders final boolean exists new boolean true final I Update Message Listener listener new I Update Message Listener public void directory Information ICVS Folder parent String path boolean new Directory exists 0 true public void directory Does Not Exist ICVS Folder parent String path exists 0 false public void file Information int type ICVS Folder parent String filename We can t set exists true here as we may get a conflict on a deleted file i e remote files are always communicated to the server as modified public void file Does Not Exist ICVS Folder parent String filename exists 0 false Build the local options final List local Options new Array List local Options add Update RETRIEVE ABSENT DIRECTORIES if tag null tag get Type CVS Tag HEAD local Options add Update make Tag Option tag Retrieve the children and any file revision numbers in a single connection Perform a cvs n update d r tag Name folder Name with custom message and error handlers boolean retry false Session session new Session get Repository this false output to console session open Policy sub Monitor For progress 10 false read only try I Status status Command UPDATE execute session new Global Option Command DO NOT CHANGE Local Option local Options to Array new Local Option local Options size new ICVS Resource child new Update Listener listener Policy sub Monitor For progress 70 if status get Code CVS Status SERVER ERROR CVS Server Exception e new CVS Server Exception status if e is No Tag Exception child is Container retry true else if e contains Errors throw e finally session close We now know that this is an exception caused by a cvs bug If the folder has no files in it just subfolders CVS does not respond with the subfolders Workaround Retry the request with no tag to get the directory names if any if retry Policy check Canceled progress return exists child null Policy sub Monitor For progress 20 return exists 0 finally progress done  ICVSRemoteResource CVSTag IProgressMonitor CVSException IProgressMonitor monitorFor beginTask RemoteFolder IUpdateMessageListener IUpdateMessageListener directoryInformation ICVSFolder newDirectory directoryDoesNotExist ICVSFolder fileInformation ICVSFolder fileDoesNotExist ICVSFolder localOptions ArrayList localOptions RETRIEVE_ABSENT_DIRECTORIES getType CVSTag localOptions makeTagOption tagName folderName getRepository subMonitorFor IStatus GlobalOption DO_NOT_CHANGE LocalOption localOptions toArray LocalOption localOptions ICVSResource UpdateListener subMonitorFor getCode CVSStatus SERVER_ERROR CVSServerException CVSServerException isNoTagException isContainer containsErrors checkCanceled subMonitorFor
see ICVS Remote Folder get Members public ICVS Remote Resource get Members I Progress Monitor monitor throws Team Exception return get Members get Tag monitor  ICVSRemoteFolder getMembers ICVSRemoteResource getMembers IProgressMonitor TeamException getMembers getTag
This method gets the members for a given tag and returns them During the execution of this method the instance variable children will be used to contain the children However the variable is reset and the result returned Thus instances of Remote Folder do not persist the children Subclasses namely Remote Folder Tree may persist the children protected ICVS Remote Resource get Members CVS Tag tag I Progress Monitor monitor throws CVS Exception Fetch the children Remote Folder Member Fetcher fetcher new Remote Folder Member Fetcher this tag fetcher fetch Members Policy monitor For monitor children is assigned in the Internal Remote Folder Members Fetcher return children  RemoteFolder RemoteFolderTree ICVSRemoteResource getMembers CVSTag IProgressMonitor CVSException RemoteFolderMemberFetcher RemoteFolderMemberFetcher fetchMembers monitorFor InternalRemoteFolderMembersFetcher
see ICVS Folder members int public ICVS Resource members int flags throws CVS Exception final List result new Array List ICVS Remote Resource resources get Children if children null return new ICVS Resource 0 Remote Folders never have phantom members if flags EXISTING MEMBERS 0 flags PHANTOM MEMBERS 1 return new ICVS Resource 0 boolean include Files flags FILE MEMBERS 0 flags FILE MEMBERS FOLDER MEMBERS 0 boolean include Folders flags FOLDER MEMBERS 0 flags FILE MEMBERS FOLDER MEMBERS 0 boolean include Managed flags MANAGED MEMBERS 0 flags MANAGED MEMBERS UNMANAGED MEMBERS IGNORED MEMBERS 0 boolean include Unmanaged flags UNMANAGED MEMBERS 0 flags MANAGED MEMBERS UNMANAGED MEMBERS IGNORED MEMBERS 0 boolean include Ignored flags IGNORED MEMBERS 0 for int i 0 i resources length i ICVS Resource cvs Resource resources i if include Files cvs Resource is Folder include Folders cvs Resource is Folder boolean is Managed cvs Resource is Managed boolean is Ignored cvs Resource is Ignored if is Managed include Managed is Ignored include Ignored is Managed is Ignored include Unmanaged result add cvs Resource return ICVS Resource result to Array new ICVS Resource result size  ICVSFolder ICVSResource CVSException ArrayList ICVSRemoteResource getChildren ICVSResource RemoteFolders EXISTING_MEMBERS PHANTOM_MEMBERS ICVSResource includeFiles FILE_MEMBERS FILE_MEMBERS FOLDER_MEMBERS includeFolders FOLDER_MEMBERS FILE_MEMBERS FOLDER_MEMBERS includeManaged MANAGED_MEMBERS MANAGED_MEMBERS UNMANAGED_MEMBERS IGNORED_MEMBERS includeUnmanaged UNMANAGED_MEMBERS MANAGED_MEMBERS UNMANAGED_MEMBERS IGNORED_MEMBERS includeIgnored IGNORED_MEMBERS ICVSResource cvsResource includeFiles cvsResource isFolder includeFolders cvsResource isFolder isManaged cvsResource isManaged isIgnored cvsResource isIgnored isManaged includeManaged isIgnored includeIgnored isManaged isIgnored includeUnmanaged cvsResource ICVSResource toArray ICVSResource
see ICVS Folder get Folder String public ICVS Folder get Folder String name throws CVS Exception if name equals Session CURRENT LOCAL FOLDER name equals Session CURRENT LOCAL FOLDER Session SERVER SEPARATOR return this ICVS Resource child get Child name if child is Folder return ICVS Folder child throw new CVS Exception I Status ERROR CHILD DOES NOT EXIST Policy bind Remote Folder invalid Child name get Name NON NLS 1  ICVSFolder getFolder ICVSFolder getFolder CVSException CURRENT_LOCAL_FOLDER CURRENT_LOCAL_FOLDER SERVER_SEPARATOR ICVSResource getChild isFolder ICVSFolder CVSException IStatus CHILD_DOES_NOT_EXIST RemoteFolder invalidChild getName
see ICVS Folder get File String public ICVS File get File String name throws CVS Exception ICVS Resource child get Child name if child is Folder return ICVS File child throw new CVS Exception I Status ERROR CHILD DOES NOT EXIST Policy bind Remote Folder invalid Child name get Name NON NLS 1  ICVSFolder getFile ICVSFile getFile CVSException ICVSResource getChild isFolder ICVSFile CVSException IStatus CHILD_DOES_NOT_EXIST RemoteFolder invalidChild getName
public Local Option get Local Options return Command NO LOCAL OPTIONS  LocalOption getLocalOptions NO_LOCAL_OPTIONS
public String get Repository Relative Path The REPOSITORY property of the folder info is the repository relative path return get Folder Sync Info get Repository  getRepositoryRelativePath getFolderSyncInfo getRepository
see ICVS Resource get Relative Path ICVS Folder public String get Relative Path ICVS Folder ancestor throws CVS Exception Check to see if the receiver is the ancestor if ancestor this return Session CURRENT LOCAL FOLDER Otherwise we need a parent to continue if parent null throw new CVS Exception Policy bind Remote Folder invalid Child get Name ancestor get Name NON NLS 1 return super get Relative Path ancestor  ICVSResource getRelativePath ICVSFolder getRelativePath ICVSFolder CVSException CURRENT_LOCAL_FOLDER CVSException RemoteFolder invalidChild getName getName getRelativePath
public ICVS Repository Location get Repository return repository  ICVSRepositoryLocation getRepository
see ICVS Remote Folder is Expandable public boolean is Expandable return true  ICVSRemoteFolder isExpandable isExpandable
see ICVS Resource is Folder public boolean is Folder return true  ICVSResource isFolder isFolder
see ICVS Folder child Exists String public boolean child Exists String path try return get Child path null catch CVS Exception e return false  ICVSFolder childExists childExists getChild CVSException
see ICVS Folder get Child String This get Child is geared to work with the Command hierarchy Therefore it only returns children that were previously fetched by a call to get Members If the request child does not exist an exception is thrown public ICVS Resource get Child String path throws CVS Exception if path equals Session CURRENT LOCAL FOLDER path length 0 return this if path index Of Session SERVER SEPARATOR 1 I Path p new Path path try return Remote Folder get Child p segment 0 get Child p remove First Segments 1 to String catch CVS Exception e regenerate the exception to give as much info as possible throw new CVS Exception I Status ERROR CHILD DOES NOT EXIST Policy bind Remote Folder invalid Child path get Name NON NLS 1 else ICVS Remote Resource children get Children if children null throw new CVS Exception I Status ERROR CHILD DOES NOT EXIST Policy bind Remote Folder invalid Child path get Name NON NLS 1 for int i 0 i children length i if children i get Name equals path return ICVS Resource children i throw new CVS Exception I Status ERROR CHILD DOES NOT EXIST Policy bind Remote Folder invalid Child path get Name NON NLS 1  ICVSFolder getChild getChild getMembers ICVSResource getChild CVSException CURRENT_LOCAL_FOLDER indexOf SERVER_SEPARATOR IPath RemoteFolder getChild getChild removeFirstSegments toString CVSException CVSException IStatus CHILD_DOES_NOT_EXIST RemoteFolder invalidChild getName ICVSRemoteResource getChildren CVSException IStatus CHILD_DOES_NOT_EXIST RemoteFolder invalidChild getName getName ICVSResource CVSException IStatus CHILD_DOES_NOT_EXIST RemoteFolder invalidChild getName
see ICVS Folder mkdir public void mkdir throws CVS Exception throw new CVS Exception Policy bind Remote Resource invalid Operation NON NLS 1  ICVSFolder CVSException CVSException RemoteResource invalidOperation
see ICVS Folder flush boolean public void flush boolean deep  ICVSFolder
see ICVS Folder get Folder Info public Folder Sync Info get Folder Sync Info return folder Info  ICVSFolder getFolderInfo FolderSyncInfo getFolderSyncInfo folderInfo
see ICVS Resource get Remote Location ICVS Folder public String get Remote Location ICVS Folder stop Searching throws CVS Exception if folder Info null return Util append Path parent get Remote Location stop Searching get Name return folder Info get Remote Location  ICVSResource getRemoteLocation ICVSFolder getRemoteLocation ICVSFolder stopSearching CVSException folderInfo appendPath getRemoteLocation stopSearching getName folderInfo getRemoteLocation
see ICVS Folder isCVS Folder public boolean isCVS Folder return folder Info null  ICVSFolder isCVSFolder isCVSFolder folderInfo
see ICVS Folder accept Children ICVS Resource Visitor public void accept Children ICVS Resource Visitor visitor throws CVS Exception throw new CVS Exception Policy bind Remote Resource invalid Operation NON NLS 1  ICVSFolder acceptChildren ICVSResourceVisitor acceptChildren ICVSResourceVisitor CVSException CVSException RemoteResource invalidOperation
see I Remote Resource is Container public boolean is Container return true  IRemoteResource isContainer isContainer
see I Remote Resource members I Progress Monitor public ICVS Remote Resource members I Progress Monitor progress throws Team Exception return get Members progress  IRemoteResource IProgressMonitor ICVSRemoteResource IProgressMonitor TeamException getMembers
see I Remote Resource get Contents I Progress Monitor public Input Stream get Contents I Progress Monitor progress throws Team Exception return null  IRemoteResource getContents IProgressMonitor InputStream getContents IProgressMonitor TeamException
handle has not yet queried the server for the its children public ICVS Remote Resource get Children return children  ICVSRemoteResource getChildren
This allows subclass to set the children protected void set Children ICVS Remote Resource children this children children  setChildren ICVSRemoteResource
see ICVS Remote Folder set Tag String public void set Tag CVS Tag tag this folder Info new Folder Sync Info folder Info get Repository folder Info get Root tag folder Info get Is Static  ICVSRemoteFolder setTag setTag CVSTag folderInfo FolderSyncInfo folderInfo getRepository folderInfo getRoot folderInfo getIsStatic
see ICVS Remote Folder get Tag public CVS Tag get Tag if folder Info null return null return folder Info get Tag  ICVSRemoteFolder getTag CVSTag getTag folderInfo folderInfo getTag
see ICVS Folder set Folder Info Folder Sync Info public void set Folder Sync Info Folder Sync Info folder Info throws CVS Exception this folder Info folder Info  ICVSFolder setFolderInfo FolderSyncInfo setFolderSyncInfo FolderSyncInfo folderInfo CVSException folderInfo folderInfo
see ICVS Folder run ICVS Runnable I Progress Monitor public void run ICVS Runnable job I Progress Monitor monitor throws CVS Exception job run monitor  ICVSFolder ICVSRunnable IProgressMonitor ICVSRunnable IProgressMonitor CVSException
see ICVS Folder run ICVS Runnable int I Progress Monitor public void run ICVS Runnable job int flags I Progress Monitor monitor throws CVS Exception job run monitor  ICVSFolder ICVSRunnable IProgressMonitor ICVSRunnable IProgressMonitor CVSException
public I Status tag final CVS Tag tag final Local Option local Options I Progress Monitor monitor throws CVS Exception monitor Policy monitor For monitor monitor begin Task null 100 Session session new Session get Repository this true output to console session open Policy sub Monitor For monitor 10 true open for modification try return Command RTAG execute session Command NO GLOBAL OPTIONS local Options folder Info get Tag tag new ICVS Remote Resource Remote Folder this Policy sub Monitor For monitor 90 finally session close  IStatus CVSTag LocalOption localOptions IProgressMonitor CVSException monitorFor beginTask getRepository subMonitorFor NO_GLOBAL_OPTIONS localOptions folderInfo getTag ICVSRemoteResource RemoteFolder subMonitorFor
see ICVS Folder fetch Children I Progress Monitor public ICVS Resource fetch Children I Progress Monitor monitor throws CVS Exception try return get Members monitor catch Team Exception e throw new CVS Exception e get Status  ICVSFolder fetchChildren IProgressMonitor ICVSResource fetchChildren IProgressMonitor CVSException getMembers TeamException CVSException getStatus
public boolean equals Object target if super equals target return false Remote Folder folder Remote Folder target A simple folder is never equal to a defined module if folder is Defined Module is Defined Module return false CVS Tag tag1 get Tag CVS Tag tag2 folder get Tag if tag1 null tag1 CVS Tag DEFAULT if tag2 null tag2 CVS Tag DEFAULT return tag1 equals tag2  RemoteFolder RemoteFolder isDefinedModule isDefinedModule CVSTag getTag CVSTag getTag CVSTag CVSTag
see java lang Object hash Code public int hash Code CVS Tag tag get Tag if tag null tag CVS Tag DEFAULT return super hash Code tag get Name hash Code  hashCode hashCode CVSTag getTag CVSTag hashCode getName hashCode
protected I Path get Relative Path From Root Relative Path ICVS Folder root I Path path throws CVS Exception If the root is the receiver then the path is already relative to the receiver if root this return path Assert is True path is Empty return get Relative Path From Root Relative Path ICVS Folder root get Child path segment 0 path remove First Segments 1  IPath getRelativePathFromRootRelativePath ICVSFolder IPath CVSException isTrue isEmpty getRelativePathFromRootRelativePath ICVSFolder getChild removeFirstSegments
see ICVS Remote Folder for Tag CVS Tag public ICVS Remote Resource for Tag ICVS Remote Folder parent CVS Tag tag Name return new Remote Folder Remote Folder parent get Name repository folder Info get Repository tag Name folder Info get Is Static  ICVSRemoteFolder forTag CVSTag ICVSRemoteResource forTag ICVSRemoteFolder CVSTag tagName RemoteFolder RemoteFolder getName folderInfo getRepository tagName folderInfo getIsStatic
see ICVS Remote Folder for Tag CVS Tag public ICVS Remote Resource for Tag CVS Tag tag Name return ICVS Remote Folder for Tag null tag Name  ICVSRemoteFolder forTag CVSTag ICVSRemoteResource forTag CVSTag tagName ICVSRemoteFolder forTag tagName
see org eclipse team internal ccvs core ICVS Remote Folder is Defined Module public boolean is Defined Module return false  ICVSRemoteFolder isDefinedModule isDefinedModule
see org eclipse team internal ccvs core resources Remote Resource get Sync Info public Resource Sync Info get Sync Info return new Resource Sync Info get Name  RemoteResource getSyncInfo ResourceSyncInfo getSyncInfo ResourceSyncInfo getName
public byte get Sync Bytes try return folder Info get Bytes catch CVS Exception e This shouldn t even happen return null  getSyncBytes folderInfo getBytes CVSException
see org eclipse team core sync I Remote Resource get Comment public String get Comment throws Team Exception return null  IRemoteResource getComment getComment TeamException
see org eclipse team core sync I Remote Resource get Content Identifier public String get Content Identifier return get Tag get Name  IRemoteResource getContentIdentifier getContentIdentifier getTag getName
see org eclipse team core sync I Remote Resource get Creator Display Name public String get Creator Display Name throws Team Exception return null  IRemoteResource getCreatorDisplayName getCreatorDisplayName TeamException
see org eclipse team internal ccvs core ICVS Resource is Managed public boolean is Managed return super is Managed isCVS Folder  ICVSResource isManaged isManaged isManaged isCVSFolder
see org eclipse team core synchronize Resource Variant fetch Contents org eclipse core runtime I Progress Monitor protected void fetch Contents I Progress Monitor monitor throws Team Exception This should not get called for folders  ResourceVariant fetchContents IProgressMonitor fetchContents IProgressMonitor TeamException

List exceptions new Array List CVS Exception protected Remote Folder Member Fetcher Remote Folder parent Folder CVS Tag tag this tag tag this parent Folder parent Folder  ArrayList CVSException RemoteFolderMemberFetcher RemoteFolder parentFolder CVSTag parentFolder parentFolder
Fetch the members for a given tag and returns them During the execution of this method the instance variable children will be used to contain the children However the variable is reset and the result returned Thus instances of Remote Folder do not persist the children Subclasses namely Remote Folder Tree may persist the children public void fetch Members I Progress Monitor monitor throws CVS Exception fetch Members monitor tag  RemoteFolder RemoteFolderTree fetchMembers IProgressMonitor CVSException fetchMembers
public void fetch Members I Progress Monitor monitor CVS Tag tag throws CVS Exception final I Progress Monitor progress Policy monitor For monitor progress begin Task Policy bind Remote Folder get Members 100 NON NLS 1 try Update the parent folder children so there are no children update Parent Folder Children Perform an update to retrieve the child files and folders I Status status perform Update Policy sub Monitor For progress 50 tag Update the parent folder with the new children update Parent Folder Children Policy check Canceled monitor Handle any errors that were identified by the listener perform Error Check status Policy bind Remote Folder error Fetching Members NON NLS 1 Get the revision numbers for the files ICVS File remote Files get Files if remote Files length 0 update File Revisions remote Files Policy sub Monitor For progress 50 else progress worked 50 catch CVS Server Exception e if e is No Tag Exception e contains Errors throw e if tag null throw e we now know that this is an exception caused by a cvs bug if the folder has no files in it just subfolders cvs does not respond with the subfolders workaround retry the request with no tag to get the directory names if any Policy check Canceled progress fetch Members Policy sub Monitor For progress 50 null finally progress done  fetchMembers IProgressMonitor CVSTag CVSException IProgressMonitor monitorFor beginTask RemoteFolder getMembers updateParentFolderChildren IStatus performUpdate subMonitorFor updateParentFolderChildren checkCanceled performErrorCheck RemoteFolder errorFetchingMembers ICVSFile remoteFiles getFiles remoteFiles updateFileRevisions remoteFiles subMonitorFor CVSServerException isNoTagException containsErrors checkCanceled fetchMembers subMonitorFor
protected I Status perform Update I Progress Monitor progress CVS Tag tag throws CVS Exception progress begin Task null 100 Session session new Session parent Folder get Repository parent Folder false output to console session open Policy sub Monitor For progress 10 false read only try Build the local options final List local Options new Array List local Options add Update RETRIEVE ABSENT DIRECTORIES if tag null local Options add Update make Tag Option tag return Command UPDATE execute session new Global Option Command DO NOT CHANGE Local Option local Options to Array new Local Option local Options size new ICVS Resource parent Folder new Update Listener this Policy sub Monitor For progress 90 finally session close  IStatus performUpdate IProgressMonitor CVSTag CVSException beginTask parentFolder getRepository parentFolder subMonitorFor localOptions ArrayList localOptions RETRIEVE_ABSENT_DIRECTORIES localOptions makeTagOption GlobalOption DO_NOT_CHANGE LocalOption localOptions toArray LocalOption localOptions ICVSResource parentFolder UpdateListener subMonitorFor
protected void update File Revisions final ICVS File files I Progress Monitor monitor throws CVS Exception Perform a cvs status with a listener monitor Policy monitor For monitor monitor begin Task null 100 Quiet Option quietness CVS Provider Plugin get Plugin get Quietness try CVS Provider Plugin get Plugin set Quietness Command VERBOSE Session session new Session parent Folder get Repository parent Folder false output to console session open Policy sub Monitor For monitor 10 false read only try I Status status Command STATUS execute session Command NO GLOBAL OPTIONS Command NO LOCAL OPTIONS files new Status Listener this Policy sub Monitor For monitor 90 perform Error Check status Policy bind Remote Folder error Fetching Revisions NON NLS 1 TODO Ensure all files have a revision finally session close finally CVS Provider Plugin get Plugin set Quietness quietness  updateFileRevisions ICVSFile IProgressMonitor CVSException monitorFor beginTask QuietOption CVSProviderPlugin getPlugin getQuietness CVSProviderPlugin getPlugin setQuietness parentFolder getRepository parentFolder subMonitorFor IStatus NO_GLOBAL_OPTIONS NO_LOCAL_OPTIONS StatusListener subMonitorFor performErrorCheck RemoteFolder errorFetchingRevisions CVSProviderPlugin getPlugin setQuietness
private void perform Error Check I Status status String error Title throws CVS Exception if status get Code CVS Status SERVER ERROR Only throw the exception if no files or folders were found if folders size files size 0 throw new CVS Server Exception status else CVS Provider Plugin log new CVS Server Exception status if exists throw new CVS Exception new CVS Status CVS Status ERROR CVS Status DOES NOT EXIST Policy bind Remote Folder does Not Exist this parent Folder get Repository Relative Path NON NLS 1 Report any internal exceptions that occured fetching the members if exceptions is Empty if exceptions size 1 throw CVS Exception exceptions get 0 else Multi Status multi new Multi Status CVS Provider Plugin ID 0 error Title null for int i 0 i exceptions size i multi merge CVS Exception exceptions get i get Status throw new CVS Exception multi  performErrorCheck IStatus errorTitle CVSException getCode CVSStatus SERVER_ERROR CVSServerException CVSProviderPlugin CVSServerException CVSException CVSStatus CVSStatus CVSStatus DOES_NOT_EXIST RemoteFolder doesNotExist parentFolder getRepositoryRelativePath isEmpty CVSException MultiStatus MultiStatus CVSProviderPlugin errorTitle CVSException getStatus CVSException
public void directory Information ICVS Folder command Root String string Path boolean new Directory try I Path path this parent Folder get Relative Path From Root Relative Path command Root new Path string Path if new Directory path segment Count 1 record Folder path last Segment catch CVS Exception e exceptions add e  directoryInformation ICVSFolder commandRoot stringPath newDirectory IPath parentFolder getRelativePathFromRootRelativePath commandRoot stringPath newDirectory segmentCount recordFolder lastSegment CVSException
public void directory Does Not Exist ICVS Folder parent String string Path try I Path path this parent Folder get Relative Path From Root Relative Path parent new Path string Path if path is Empty parent Does Not Exist catch CVS Exception e exceptions add e  directoryDoesNotExist ICVSFolder stringPath IPath parentFolder getRelativePathFromRootRelativePath stringPath isEmpty parentDoesNotExist CVSException
public void file Information int type ICVS Folder parent String filename try I Path file Path new Path filename file Path this parent Folder get Relative Path From Root Relative Path parent file Path if file Path segment Count 1 String proper Filename file Path last Segment record File proper Filename catch CVS Exception e exceptions add e  fileInformation ICVSFolder IPath filePath filePath parentFolder getRelativePathFromRootRelativePath filePath filePath segmentCount properFilename filePath lastSegment recordFile properFilename CVSException
see org eclipse team internal ccvs core client listeners I Update Message Listener file Does Not Exist org eclipse team internal ccvs core ICVS Folder java lang String public void file Does Not Exist ICVS Folder parent String filename  IUpdateMessageListener fileDoesNotExist ICVSFolder fileDoesNotExist ICVSFolder
public void file Status ICVS Folder command Root String path String remote Revision if remote Revision I Status Listener FOLDER REVISION Ignore any folders return try Remote File parent Folder get Child Util get Last Segment path set Revision remote Revision catch CVS Exception e exceptions add e  fileStatus ICVSFolder commandRoot remoteRevision remoteRevision IStatusListener FOLDER_REVISION RemoteFile parentFolder getChild getLastSegment setRevision remoteRevision CVSException
This method is invoked for each child folder as the reponses are being recieved from the server Default behavior is to record the folder for later retrieval using code get Chilren code Subclasses may override but should invoke the inherited method to ensure the folder gets recorded param name the name of the child folder protected Remote Folder record Folder String name Remote Folder folder new Remote Folder parent Folder parent Folder get Repository Util append Path parent Folder get Repository Relative Path name tag folders add folder return folder  getChilren RemoteFolder recordFolder RemoteFolder RemoteFolder parentFolder parentFolder getRepository appendPath parentFolder getRepositoryRelativePath
This method is invoked for each child file as the reponses are being recieved from the server Default behavior is to record the file for later retrieval using code get Children code Subclasses may override but should invoke the inherited method to ensure the file gets recorded This is important because the file revisions for any files are fetched subsequent to the fecthing of the children param name the name of the child folder protected Remote File record File String name Remote File file new Remote File parent Folder Update STATE NONE name null revision unknown null keyword mode unknown tag files add file return file  getChildren RemoteFile recordFile RemoteFile RemoteFile parentFolder STATE_NONE
This method is invoked to indicate that the parent beig queried for children does not exist Subclasses may override to get early notification of this but should still invoke the inherited method protected void parent Does Not Exist exists false  parentDoesNotExist
Update the parent folder such that it s children are the children that have been fecthed by the reciever protected void update Parent Folder Children parent Folder set Children get Fetched Children  updateParentFolderChildren parentFolder setChildren getFetchedChildren
Return the child files fetched from the server return protected ICVS File get Files return ICVS File files to Array new ICVS File files size  ICVSFile getFiles ICVSFile toArray ICVSFile
Return an array of all fecthed children return public ICVS Remote Resource get Fetched Children ICVS Remote Resource resources new ICVS Remote Resource folders size files size int count 0 for Iterator iter folders iterator iter has Next ICVS Remote Resource resource ICVS Remote Resource iter next resources count resource for Iterator iter files iterator iter has Next ICVS Remote Resource resource ICVS Remote Resource iter next resources count resource return resources  ICVSRemoteResource getFetchedChildren ICVSRemoteResource ICVSRemoteResource hasNext ICVSRemoteResource ICVSRemoteResource hasNext ICVSRemoteResource ICVSRemoteResource

public class Remote Folder Sandbox extends Remote Folder public Remote Folder Sandbox Remote Folder parent ICVS Repository Location repository String repository Relative Path CVS Tag tag super parent repository repository Relative Path tag set Children new ICVS Remote Resource 0  RemoteFolderSandbox RemoteFolder RemoteFolderSandbox RemoteFolder ICVSRepositoryLocation repositoryRelativePath CVSTag repositoryRelativePath setChildren ICVSRemoteResource
public ICVS File get File String name throws CVS Exception try return super get File name catch CVS Exception e if e get Status get Code CHILD DOES NOT EXIST I Path path new Path name String file Name path last Segment Remote Folder Sandbox parent get Folder path Remote File file new Remote File parent Update STATE NONE file Name null null get Tag parent add Child file return file throw e  ICVSFile getFile CVSException getFile CVSException getStatus getCode CHILD_DOES_NOT_EXIST IPath fileName lastSegment RemoteFolderSandbox getFolder RemoteFile RemoteFile STATE_NONE fileName getTag addChild
private void add Child Remote Resource resource ICVS Remote Resource children get Children ICVS Remote Resource new Children new ICVS Remote Resource children length 1 System arraycopy children 0 new Children 0 children length new Children children length resource set Children new Children  addChild RemoteResource ICVSRemoteResource getChildren ICVSRemoteResource newChildren ICVSRemoteResource newChildren newChildren setChildren newChildren
private Remote Folder Sandbox get Folder I Path path throws CVS Exception I Path parent Path path remove Last Segments 1 String parent String if parent Path is Empty parent String Session CURRENT LOCAL FOLDER else parent String path remove Last Segments 1 to String Remote Folder Sandbox parent Remote Folder Sandbox get Folder parent String return parent  RemoteFolderSandbox getFolder IPath CVSException IPath parentPath removeLastSegments parentString parentPath isEmpty parentString CURRENT_LOCAL_FOLDER parentString removeLastSegments toString RemoteFolderSandbox RemoteFolderSandbox getFolder parentString
public ICVS Folder get Folder String name throws CVS Exception try return super get Folder name catch CVS Exception e if e get Status get Code CHILD DOES NOT EXIST I Path path new Path name Remote Folder Sandbox parent get Folder path String repo Path new Path get Repository Relative Path append name remove Trailing Separator to String Remote Folder Sandbox folder new Remote Folder Sandbox parent get Repository repo Path get Tag parent add Child folder return folder throw e  ICVSFolder getFolder CVSException getFolder CVSException getStatus getCode CHILD_DOES_NOT_EXIST IPath RemoteFolderSandbox getFolder repoPath getRepositoryRelativePath removeTrailingSeparator toString RemoteFolderSandbox RemoteFolderSandbox getRepository repoPath getTag addChild
see org eclipse team internal ccvs core resources Remote Folder get Members org eclipse core runtime I Progress Monitor public ICVS Remote Resource get Members I Progress Monitor monitor throws Team Exception return get Children  RemoteFolder getMembers IProgressMonitor ICVSRemoteResource getMembers IProgressMonitor TeamException getChildren

public class Remote Folder Tree extends Remote Folder public Remote Folder Tree Remote Folder parent ICVS Repository Location repository String repository Relative Path CVS Tag tag super parent repository repository Relative Path tag  RemoteFolderTree RemoteFolder RemoteFolderTree RemoteFolder ICVSRepositoryLocation repositoryRelativePath CVSTag repositoryRelativePath
public Remote Folder Tree Remote Folder parent String name ICVS Repository Location repository String repository Relative Path CVS Tag tag super parent name repository repository Relative Path tag false  RemoteFolderTree RemoteFolder ICVSRepositoryLocation repositoryRelativePath CVSTag repositoryRelativePath
public ICVS Remote Resource get Members CVS Tag tag Name I Progress Monitor monitor throws CVS Exception if get Children null set Children super get Members tag Name monitor return get Children  ICVSRemoteResource getMembers CVSTag tagName IProgressMonitor CVSException getChildren setChildren getMembers tagName getChildren
No other external classes should use this method public void set Children ICVS Remote Resource children super set Children children  setChildren ICVSRemoteResource setChildren
public void accept Children ICVS Resource Visitor visitor throws CVS Exception ICVS Remote Resource children get Children if children null return for int i 0 i children length i ICVS Resource children i accept visitor  acceptChildren ICVSResourceVisitor CVSException ICVSRemoteResource getChildren ICVSResource

Delta Node String name String revision int sync State this name name this revision revision this sync State sync State  DeltaNode syncState syncState syncState
String get Name return name  getName
String get Revision return revision  getRevision
int get Sync State return sync State  getSyncState syncState
package Remote Folder Tree Builder CVS Repository Location repository ICVS Folder root CVS Tag tag this repository repository this root root this tag tag this file Deltas new Hash Map this changed Files new Array List this remote Folder Table new Hash Map Build the local options List local Options new Array List if tag null if tag get Type CVS Tag HEAD local Options add Update CLEAR STICKY else local Options add Update make Tag Option tag update Local Options Local Option local Options to Array new Local Option local Options size  RemoteFolderTreeBuilder CVSRepositoryLocation ICVSFolder CVSTag fileDeltas HashMap changedFiles ArrayList remoteFolderTable HashMap localOptions ArrayList getType CVSTag localOptions CLEAR_STICKY localOptions makeTagOption updateLocalOptions LocalOption localOptions toArray LocalOption localOptions
private Local Option get Options Without Tag Build the local options List local Options new Array List local Options add Update RETRIEVE ABSENT DIRECTORIES return Local Option local Options to Array new Local Option local Options size  LocalOption getOptionsWithoutTag localOptions ArrayList localOptions RETRIEVE_ABSENT_DIRECTORIES LocalOption localOptions toArray LocalOption localOptions
public static Remote Folder Tree build Base Tree CVS Repository Location repository ICVS Folder root CVS Tag tag I Progress Monitor progress throws CVS Exception try Remote Folder Tree Builder builder new Remote Folder Tree Builder repository root tag progress begin Task null 100 I Progress Monitor sub Progress Policy infinite Sub Monitor For progress 100 sub Progress begin Task null 512 NON NLS 1 sub Progress sub Task Policy bind Remote Folder Tree Builder building Base root get Name NON NLS 1 return builder build Base Tree null root sub Progress finally progress done  RemoteFolderTree buildBaseTree CVSRepositoryLocation ICVSFolder CVSTag IProgressMonitor CVSException RemoteFolderTreeBuilder RemoteFolderTreeBuilder beginTask IProgressMonitor subProgress infiniteSubMonitorFor subProgress beginTask subProgress subTask RemoteFolderTreeBuilder buildingBase getName buildBaseTree subProgress
public static Remote Folder Tree build Remote Tree CVS Repository Location repository I Container root CVS Tag tag I Progress Monitor monitor throws CVS Exception return build Remote Tree repository CVS Workspace Root getCVS Folder For root tag monitor  RemoteFolderTree buildRemoteTree CVSRepositoryLocation IContainer CVSTag IProgressMonitor CVSException buildRemoteTree CVSWorkspaceRoot getCVSFolderFor
public static Remote Folder Tree build Remote Tree CVS Repository Location repository ICVS Folder root CVS Tag tag I Progress Monitor monitor throws CVS Exception Remote Folder Tree Builder builder new Remote Folder Tree Builder repository root tag return builder build Tree new ICVS Resource root monitor  RemoteFolderTree buildRemoteTree CVSRepositoryLocation ICVSFolder CVSTag IProgressMonitor CVSException RemoteFolderTreeBuilder RemoteFolderTreeBuilder buildTree ICVSResource
return builder build Tree new ICVS Resource root monitor public static Remote File build Remote Tree CVS Repository Location repository ICVS File file CVS Tag tag I Progress Monitor monitor throws CVS Exception Remote Folder Tree Builder builder new Remote Folder Tree Builder repository file get Parent tag return builder build Tree file monitor  buildTree ICVSResource RemoteFile buildRemoteTree CVSRepositoryLocation ICVSFile CVSTag IProgressMonitor CVSException RemoteFolderTreeBuilder RemoteFolderTreeBuilder getParent buildTree
public static Remote Folder Tree build Remote Tree CVS Repository Location repository ICVS Folder root ICVS Resource resources CVS Tag tag I Progress Monitor monitor throws CVS Exception if resources length 0 resources new ICVS Resource root Remote Folder Tree Builder builder new Remote Folder Tree Builder repository root tag return builder build Tree resources monitor  RemoteFolderTree buildRemoteTree CVSRepositoryLocation ICVSFolder ICVSResource CVSTag IProgressMonitor CVSException ICVSResource RemoteFolderTreeBuilder RemoteFolderTreeBuilder buildTree
package Remote Folder Tree build Tree ICVS Resource resources I Progress Monitor monitor throws CVS Exception Make sure that the cvs commands are not quiet during this operations Quiet Option quietness CVS Provider Plugin get Plugin get Quietness try CVS Provider Plugin get Plugin set Quietness Command VERBOSE monitor begin Task null 100 1st Connection Use local state to determine delta with server if fetch Delta resources Policy sub Monitor For monitor 75 return null 2nd Connection Build remote tree from above delta using 2nd connection to fetch unknown directories NOTE Multiple commands may be issued over this connection fetch New Directories Policy sub Monitor For monitor 10 3rd Connection Used to fetch file status in groups of 1024 fetch File Revisions Policy sub Monitor For monitor 15 return remote Root finally CVS Provider Plugin get Plugin set Quietness quietness monitor done  RemoteFolderTree buildTree ICVSResource IProgressMonitor CVSException QuietOption CVSProviderPlugin getPlugin getQuietness CVSProviderPlugin getPlugin setQuietness beginTask fetchDelta subMonitorFor fetchNewDirectories subMonitorFor fetchFileRevisions subMonitorFor remoteRoot CVSProviderPlugin getPlugin setQuietness
private boolean fetch Delta ICVS Resource resources I Progress Monitor monitor throws CVS Exception Get the arguments from the files Array List arguments new Array List for int i 0 i resources length i ICVS Resource resource resources i arguments add resource get Relative Path root Use local state to determine delta with server monitor begin Task null 100 Policy check Canceled monitor Session session new Session repository root false session open Policy sub Monitor For monitor 10 false read only try Policy check Canceled monitor fetch Delta session String arguments to Array new String arguments size Policy sub Monitor For monitor 90 if project Does Not Exist We cannot handle the case where a project i e the top most CVS folder has been deleted directly on the sever i e deleted using rm rf if root isCVS Folder root is Managed throw new CVS Exception Policy bind Remote Folder Tree Build folder Deleted From Server root get Folder Sync Info get Repository NON NLS 1 else return false finally session close monitor done return true  fetchDelta ICVSResource IProgressMonitor CVSException ArrayList ArrayList ICVSResource getRelativePath beginTask checkCanceled subMonitorFor checkCanceled fetchDelta toArray subMonitorFor projectDoesNotExist isCVSFolder isManaged CVSException RemoteFolderTreeBuild folderDeletedFromServer getFolderSyncInfo getRepository
private void fetch New Directories I Progress Monitor monitor throws CVS Exception Build remote tree from the fetched delta using a new connection to fetch unknown directories NOTE Multiple commands may be issued over this connection monitor begin Task null 100 Session session remote Root new Remote Folder Tree null root get Name repository root get Folder Sync Info get Repository tag For Remote Folder root tag if new Folder Exist New folders will require a connection for fetching their members session new Session repository remote Root false session open Policy sub Monitor For monitor 10 false read only else session null try Set up an infinite progress monitor for the recursive build I Progress Monitor sub Progress Policy infinite Sub Monitor For monitor 90 sub Progress begin Task null 512 Build the remote tree build Remote Tree session root remote Root sub Progress NON NLS 1 finally if session null session close monitor done  fetchNewDirectories IProgressMonitor CVSException beginTask remoteRoot RemoteFolderTree getName getFolderSyncInfo getRepository tagForRemoteFolder newFolderExist remoteRoot subMonitorFor IProgressMonitor subProgress infiniteSubMonitorFor subProgress beginTask buildRemoteTree remoteRoot subProgress
private void fetch File Revisions I Progress Monitor monitor throws CVS Exception 3rd Connection Used to fetch file status in groups of 1024 if changed Files is Empty String all Changed Files String changed Files to Array new String changed Files size int iterations all Changed Files length MAX REVISION FETCHES PER CONNECTION all Changed Files length MAX REVISION FETCHES PER CONNECTION 0 0 1 for int i 0 i iterations i int length Math min MAX REVISION FETCHES PER CONNECTION all Changed Files length MAX REVISION FETCHES PER CONNECTION i String buffer new String length System arraycopy all Changed Files i MAX REVISION FETCHES PER CONNECTION buffer 0 length Session session new Session repository remote Root false session open Policy sub Monitor For monitor 1 false read only try fetch File Revisions session buffer Policy sub Monitor For monitor 2 finally session close  fetchFileRevisions IProgressMonitor CVSException changedFiles isEmpty allChangedFiles changedFiles toArray changedFiles allChangedFiles MAX_REVISION_FETCHES_PER_CONNECTION allChangedFiles MAX_REVISION_FETCHES_PER_CONNECTION MAX_REVISION_FETCHES_PER_CONNECTION allChangedFiles MAX_REVISION_FETCHES_PER_CONNECTION allChangedFiles MAX_REVISION_FETCHES_PER_CONNECTION remoteRoot subMonitorFor fetchFileRevisions subMonitorFor
package Remote File build Tree ICVS File file I Progress Monitor monitor throws CVS Exception Quiet Option quietness CVS Provider Plugin get Plugin get Quietness try CVS Provider Plugin get Plugin set Quietness Command VERBOSE monitor begin Task null 100 Query the server to see if there is a delta available Policy check Canceled monitor Session session new Session repository root false session open Policy sub Monitor For monitor 10 false read only try Policy check Canceled monitor fetch Delta session new String file get Name Policy sub Monitor For monitor 50 if project Does Not Exist return null finally session close Create a parent for the remote resource remote Root new Remote Folder Tree null root get Name repository root get Folder Sync Info get Repository tag For Remote Folder root tag Create the remote resource using the delta if there is one Remote File remote File Map deltas Map file Deltas get NON NLS 1 if deltas null deltas is Empty If the file is an addition return null as the remote Note If there was a conflicting addition the delta would not be empty byte sync Bytes file get Sync Bytes if sync Bytes null Resource Sync Info is Addition sync Bytes return null remote File new Remote File remote Root sync Bytes else Delta Node d Delta Node deltas get file get Name if d get Revision DELETED return null remote File new Remote File remote Root d get Sync State file get Name null the revision will be retrieved from the server get Keyword Mode file use the same keyword mode a the local file tag For Remote Folder remote Root tag Add the resource to its parent remote Root set Children new ICVS Remote Resource remote File If there was a delta fetch the new revision if changed Files is Empty Add the remote folder to the remote folder lookup table used to update file revisions record Remote Folder remote Root session new Session repository remote Root false session open Policy sub Monitor For monitor 10 false read only try fetch File Revisions session String changed Files to Array new String changed Files size Policy sub Monitor For monitor 20 finally session close return remote File finally CVS Provider Plugin get Plugin set Quietness quietness monitor done  RemoteFile buildTree ICVSFile IProgressMonitor CVSException QuietOption CVSProviderPlugin getPlugin getQuietness CVSProviderPlugin getPlugin setQuietness beginTask checkCanceled subMonitorFor checkCanceled fetchDelta getName subMonitorFor projectDoesNotExist remoteRoot RemoteFolderTree getName getFolderSyncInfo getRepository tagForRemoteFolder RemoteFile remoteFile fileDeltas isEmpty syncBytes getSyncBytes syncBytes ResourceSyncInfo isAddition syncBytes remoteFile RemoteFile remoteRoot syncBytes DeltaNode DeltaNode getName getRevision remoteFile RemoteFile remoteRoot getSyncState getName getKeywordMode tagForRemoteFolder remoteRoot remoteRoot setChildren ICVSRemoteResource remoteFile changedFiles isEmpty recordRemoteFolder remoteRoot remoteRoot subMonitorFor fetchFileRevisions changedFiles toArray changedFiles subMonitorFor remoteFile CVSProviderPlugin getPlugin setQuietness
private Command K Subst Option get Keyword Mode ICVS File file throws CVS Exception if file null return null byte sync Bytes file get Sync Bytes if sync Bytes null return null return Resource Sync Info get Keyword Mode sync Bytes  KSubstOption getKeywordMode ICVSFile CVSException syncBytes getSyncBytes syncBytes ResourceSyncInfo getKeywordMode syncBytes
private Remote Folder Tree build Base Tree Remote Folder Tree parent ICVS Folder local I Progress Monitor monitor throws CVS Exception Policy check Canceled monitor Create a remote folder tree corresponding to the local resource Remote Folder Tree remote new Remote Folder Tree parent local get Name repository local get Folder Sync Info get Repository local get Folder Sync Info get Tag Create a List to contain the created children List children new Array List Build the child folders corresponding to local folders base ICVS Resource folders local members ICVS Folder FOLDER MEMBERS for int i 0 i folders length i ICVS Folder folder ICVS Folder folders i if folder is Managed folder isCVS Folder monitor worked 1 children add build Base Tree remote folder monitor Build the child files corresponding to local files base ICVS Resource files local members ICVS Folder FILE MEMBERS for int i 0 i files length i ICVS File file ICVS File files i byte sync Bytes file get Sync Bytes if there is no sync info then there is no base if sync Bytes null continue There is no remote if the file was added if Resource Sync Info is Addition sync Bytes continue If the file was deleted locally we need to generate a new sync info without the delete flag if Resource Sync Info is Deletion sync Bytes sync Bytes Resource Sync Info convert From Deletion sync Bytes children add new Remote File remote sync Bytes monitor worked 1 Add the children to the remote folder tree remote set Children ICVS Remote Resource children to Array new ICVS Remote Resource children size return remote  RemoteFolderTree buildBaseTree RemoteFolderTree ICVSFolder IProgressMonitor CVSException checkCanceled RemoteFolderTree RemoteFolderTree getName getFolderSyncInfo getRepository getFolderSyncInfo getTag ArrayList ICVSResource ICVSFolder FOLDER_MEMBERS ICVSFolder ICVSFolder isManaged isCVSFolder buildBaseTree ICVSResource ICVSFolder FILE_MEMBERS ICVSFile ICVSFile syncBytes getSyncBytes syncBytes ResourceSyncInfo isAddition syncBytes ResourceSyncInfo isDeletion syncBytes syncBytes ResourceSyncInfo convertFromDeletion syncBytes RemoteFile syncBytes setChildren ICVSRemoteResource toArray ICVSRemoteResource
private void build Remote Tree Session session ICVS Folder local Remote Folder Tree remote String local Path I Progress Monitor monitor throws CVS Exception Policy check Canceled monitor Add the remote folder to the remote folder lookup table used to update file revisions record Remote Folder remote Create a map to contain the created children Map children new Hash Map If there s no corresponding local resource then we need to fetch its contents in order to populate the deltas if local null fetch New Directory session remote local Path monitor Fetch the delta s for the folder Map deltas Map file Deltas get local Path if deltas null deltas EMPTY MAP If there is a local use the local children to start buidling the remote children if local null Build the child folders corresponding to local folders ICVS Resource folders local members ICVS Folder FOLDER MEMBERS for int i 0 i folders length i ICVS Folder folder ICVS Folder folders i Delta Node d Delta Node deltas get folder get Name if folder isCVS Folder is Orphaned Subtree folder d null d get Revision DELETED children put folders i get Name new Remote Folder Tree remote folders i get Name repository folder get Folder Sync Info get Repository tag For Remote Folder folder tag Build the child files corresponding to local files ICVS Resource files local members ICVS Folder FILE MEMBERS for int i 0 i files length i ICVS File file ICVS File files i Delta Node d Delta Node deltas get file get Name byte sync Bytes file get Sync Bytes if there is no sync info then there isn t a remote file for this local file on the server if sync Bytes null continue There is no remote if the file was added and we didn t get a conflict C indicator from the server if Resource Sync Info is Addition sync Bytes d null continue There is no remote if the file was deleted and we didn t get a remove R indicator from the server if Resource Sync Info is Deletion sync Bytes d null continue int type d null Update STATE NONE d get Sync State children put file get Name new Remote File remote type sync Bytes Build the children for new or out of date resources from the deltas Iterator i deltas key Set iterator while i has Next String name String i next Delta Node d Delta Node deltas get name String revision d get Revision if revision FOLDER children put name new Remote Folder Tree remote repository Util append Path remote get Repository Relative Path name tag For Remote Folder remote tag else if revision ADDED children put name new Remote File remote d get Sync State name null the revision will be fetched later null there s no way to know the remote keyword mode tag For Remote Folder remote tag else if revision UNKNOWN The local resource is out of sync with the remote Create a Remote File associated with the tag so we are assured of getting the proper revision Note this will replace the Remote File added from the local base children put name new Remote File remote d get Sync State name null the revision will be fetched later get Keyword Mode ICVS File children get name get the keyword mode from the local file tag For Remote Folder remote tag else if revision DELETED This should have been deleted while creating from the local resources If it wasn t delete it now if children contains Key name children remove name else We should never get here monitor worked 1 Add the children to the remote folder tree remote set Children ICVS Remote Resource children values to Array new ICVS Remote Resource children size We have to delay building the child folders to support the proper fetching of new directories due to the fact that the same CVS home directory i e the same root directory must be used for all requests sent over the same connection Iterator child Iterator children entry Set iterator List empty Children new Array List while child Iterator has Next Map Entry entry Map Entry child Iterator next if Remote Resource entry get Value is Folder Remote Folder Tree remote Folder Remote Folder Tree entry get Value String name String entry get Key ICVS Folder local Folder Delta Node d Delta Node deltas get name for directories that are new on the server if d null d get Revision FOLDER local Folder null else local Folder local get Folder name build Remote Tree session local Folder remote Folder Util append Path local Path name monitor Record any children that are empty if prune Empty Directories remote Folder get Children length 0 Prune if the local folder is also empty if local Folder null local Folder members ICVS Folder ALL EXISTING MEMBERS length 0 empty Children add remote Folder else Also prune if the tag we are fetching is not HEAD and differs from the tag of the local folder Folder Sync Info info local Folder get Folder Sync Info if tag null info null tag equals CVS Tag DEFAULT tag equals info get Tag empty Children add remote Folder Prune any empty child folders if prune Empty Directories empty Children is Empty List new Children new Array List new Children add All Arrays as List remote get Children new Children remove All empty Children remote set Children ICVS Remote Resource new Children to Array new ICVS Remote Resource new Children size  buildRemoteTree ICVSFolder RemoteFolderTree localPath IProgressMonitor CVSException checkCanceled recordRemoteFolder HashMap fetchNewDirectory localPath fileDeltas localPath EMPTY_MAP ICVSResource ICVSFolder FOLDER_MEMBERS ICVSFolder ICVSFolder DeltaNode DeltaNode getName isCVSFolder isOrphanedSubtree getRevision getName RemoteFolderTree getName getFolderSyncInfo getRepository tagForRemoteFolder ICVSResource ICVSFolder FILE_MEMBERS ICVSFile ICVSFile DeltaNode DeltaNode getName syncBytes getSyncBytes syncBytes ResourceSyncInfo isAddition syncBytes ResourceSyncInfo isDeletion syncBytes STATE_NONE getSyncState getName RemoteFile syncBytes keySet hasNext DeltaNode DeltaNode getRevision RemoteFolderTree appendPath getRepositoryRelativePath tagForRemoteFolder RemoteFile getSyncState tagForRemoteFolder RemoteFile RemoteFile RemoteFile getSyncState getKeywordMode ICVSFile tagForRemoteFolder containsKey setChildren ICVSRemoteResource toArray ICVSRemoteResource childIterator entrySet emptyChildren ArrayList childIterator hasNext childIterator RemoteResource getValue isFolder RemoteFolderTree remoteFolder RemoteFolderTree getValue getKey ICVSFolder localFolder DeltaNode DeltaNode getRevision localFolder localFolder getFolder buildRemoteTree localFolder remoteFolder appendPath localPath pruneEmptyDirectories remoteFolder getChildren localFolder localFolder ICVSFolder ALL_EXISTING_MEMBERS emptyChildren remoteFolder FolderSyncInfo localFolder getFolderSyncInfo CVSTag getTag emptyChildren remoteFolder pruneEmptyDirectories emptyChildren isEmpty newChildren ArrayList newChildren addAll asList getChildren newChildren removeAll emptyChildren setChildren ICVSRemoteResource newChildren toArray ICVSRemoteResource newChildren
I Update Message Listener listener new I Update Message Listener public void directory Information ICVS Folder root String path boolean new Directory if new Directory Record new directory with parent so it can be retrieved when building the parent record Delta path FOLDER Update STATE NONE monitor sub Task Policy bind Remote Folder Tree Builder receiving Delta Util to Truncated Path path 3 NON NLS 1  IUpdateMessageListener IUpdateMessageListener directoryInformation ICVSFolder newDirectory newDirectory recordDelta STATE_NONE subTask RemoteFolderTreeBuilder receivingDelta toTruncatedPath
public void directory Does Not Exist ICVS Folder root String path Record removed directory with parent so it can be removed when building the parent if path length 0 project Does Not Exist true else record Delta path DELETED Update STATE NONE monitor sub Task Policy bind Remote Folder Tree Builder receiving Delta Util to Truncated Path path 3 NON NLS 1  directoryDoesNotExist ICVSFolder projectDoesNotExist recordDelta STATE_NONE subTask RemoteFolderTreeBuilder receivingDelta toTruncatedPath
public void file Information int type ICVS Folder root String filename Cases that do not require action are case A A locally added file that does not exists remotely case A local file that has not been added and does not exists remotely case M A locally modified file that has not been modified remotely switch type case Update STATE MERGEABLE CONFLICT case Update STATE CONFLICT We have an remote change to a modified local file The change could be a local change conflicting with a remote deletion If so the deltas may already have a DELETED for the file We shouldn t override this DELETED Map deltas deltas Map file Deltas get Util remove Last Segment filename Delta Node d deltas null Delta Node deltas get Util get Last Segment filename null if d null d get Revision DELETED break case Update STATE DELETED We have a locally removed file that still exists remotely case Update STATE REMOTE CHANGES We have an remote change to an unmodified local file changed Files add filename record Delta filename UNKNOWN type monitor sub Task Policy bind Remote Folder Tree Builder receiving Delta Util to Truncated Path filename 3 NON NLS 1 break  fileInformation ICVSFolder STATE_MERGEABLE_CONFLICT STATE_CONFLICT fileDeltas removeLastSegment DeltaNode DeltaNode getLastSegment getRevision STATE_DELETED STATE_REMOTE_CHANGES changedFiles recordDelta subTask RemoteFolderTreeBuilder receivingDelta toTruncatedPath
public void file Does Not Exist ICVS Folder root String filename record Delta filename DELETED Update STATE NONE monitor sub Task Policy bind Remote Folder Tree Builder receiving Delta Util to Truncated Path filename 3 NON NLS 1  fileDoesNotExist ICVSFolder recordDelta STATE_NONE subTask RemoteFolderTreeBuilder receivingDelta toTruncatedPath
private List fetch Delta Session session String arguments final I Progress Monitor monitor throws CVS Exception Create an listener that will accumulate new and removed files and folders I Update Message Listener listener new I Update Message Listener public void directory Information ICVS Folder root String path boolean new Directory if new Directory Record new directory with parent so it can be retrieved when building the parent record Delta path FOLDER Update STATE NONE monitor sub Task Policy bind Remote Folder Tree Builder receiving Delta Util to Truncated Path path 3 NON NLS 1 public void directory Does Not Exist ICVS Folder root String path Record removed directory with parent so it can be removed when building the parent if path length 0 project Does Not Exist true else record Delta path DELETED Update STATE NONE monitor sub Task Policy bind Remote Folder Tree Builder receiving Delta Util to Truncated Path path 3 NON NLS 1 public void file Information int type ICVS Folder root String filename Cases that do not require action are case A A locally added file that does not exists remotely case A local file that has not been added and does not exists remotely case M A locally modified file that has not been modified remotely switch type case Update STATE MERGEABLE CONFLICT case Update STATE CONFLICT We have an remote change to a modified local file The change could be a local change conflicting with a remote deletion If so the deltas may already have a DELETED for the file We shouldn t override this DELETED Map deltas deltas Map file Deltas get Util remove Last Segment filename Delta Node d deltas null Delta Node deltas get Util get Last Segment filename null if d null d get Revision DELETED break case Update STATE DELETED We have a locally removed file that still exists remotely case Update STATE REMOTE CHANGES We have an remote change to an unmodified local file changed Files add filename record Delta filename UNKNOWN type monitor sub Task Policy bind Remote Folder Tree Builder receiving Delta Util to Truncated Path filename 3 NON NLS 1 break public void file Does Not Exist ICVS Folder root String filename record Delta filename DELETED Update STATE NONE monitor sub Task Policy bind Remote Folder Tree Builder receiving Delta Util to Truncated Path filename 3 NON NLS 1 Perform a cvs n update d r tag in order to get the messages from the server that will indicate what has changed on the server I Status status Command SYNCUPDATE execute session new Global Option Command DO NOT CHANGE update Local Options arguments new Update Listener listener monitor return changed Files  fetchDelta IProgressMonitor CVSException IUpdateMessageListener IUpdateMessageListener directoryInformation ICVSFolder newDirectory newDirectory recordDelta STATE_NONE subTask RemoteFolderTreeBuilder receivingDelta toTruncatedPath directoryDoesNotExist ICVSFolder projectDoesNotExist recordDelta STATE_NONE subTask RemoteFolderTreeBuilder receivingDelta toTruncatedPath fileInformation ICVSFolder STATE_MERGEABLE_CONFLICT STATE_CONFLICT fileDeltas removeLastSegment DeltaNode DeltaNode getLastSegment getRevision STATE_DELETED STATE_REMOTE_CHANGES changedFiles recordDelta subTask RemoteFolderTreeBuilder receivingDelta toTruncatedPath fileDoesNotExist ICVSFolder recordDelta STATE_NONE subTask RemoteFolderTreeBuilder receivingDelta toTruncatedPath IStatus GlobalOption DO_NOT_CHANGE updateLocalOptions UpdateListener changedFiles
I Update Message Listener listener new I Update Message Listener public void directory Information ICVS Folder root String path boolean new Directory if new Directory Record new directory with parent so it can be retrieved when building the parent NOTE Check path prefix record Delta path FOLDER Update STATE NONE monitor sub Task Policy bind Remote Folder Tree Builder receiving Delta Util to Truncated Path path 3 NON NLS 1  IUpdateMessageListener IUpdateMessageListener directoryInformation ICVSFolder newDirectory newDirectory recordDelta STATE_NONE subTask RemoteFolderTreeBuilder receivingDelta toTruncatedPath
public void directory Does Not Exist ICVS Folder root String path  directoryDoesNotExist ICVSFolder
public void file Information int type ICVS Folder root String filename NOTE Check path prefix changed Files add filename record Delta filename ADDED type monitor sub Task Policy bind Remote Folder Tree Builder receiving Delta Util to Truncated Path filename 3 NON NLS 1  fileInformation ICVSFolder changedFiles recordDelta subTask RemoteFolderTreeBuilder receivingDelta toTruncatedPath
monitor sub Task Policy bind Remote Folder Tree Builder receiving Delta Util to Truncated Path filename 3 NON NLS 1 public void file Does Not Exist ICVS Folder root String filename  subTask RemoteFolderTreeBuilder receivingDelta toTruncatedPath fileDoesNotExist ICVSFolder
private void fetch New Directory Session session Remote Folder Tree new Folder String local Path final I Progress Monitor monitor throws CVS Exception Create an listener that will accumulate new files and folders I Update Message Listener listener new I Update Message Listener public void directory Information ICVS Folder root String path boolean new Directory if new Directory Record new directory with parent so it can be retrieved when building the parent NOTE Check path prefix record Delta path FOLDER Update STATE NONE monitor sub Task Policy bind Remote Folder Tree Builder receiving Delta Util to Truncated Path path 3 NON NLS 1 public void directory Does Not Exist ICVS Folder root String path public void file Information int type ICVS Folder root String filename NOTE Check path prefix changed Files add filename record Delta filename ADDED type monitor sub Task Policy bind Remote Folder Tree Builder receiving Delta Util to Truncated Path filename 3 NON NLS 1 public void file Does Not Exist ICVS Folder root String filename NOTE Should use the path relative to the remote Root I Status status Command UPDATE execute session new Global Option Command DO NOT CHANGE update Local Options new String local Path new Update Listener listener Policy sub Monitor For monitor 1 if status get Code CVS Status SERVER ERROR FIXME This should be refactored maybe static methods on CVS Exception CVS Server Exception e new CVS Server Exception status if e is No Tag Exception e contains Errors throw e we now know that this is an exception caused by a cvs bug if the folder has no files in it just subfolders cvs does not respond with the subfolders workaround retry the request with no tag to get the directory names if any Policy check Canceled monitor status Command UPDATE execute session new Global Option Command DO NOT CHANGE get Options Without Tag new String local Path new Update Listener listener Policy sub Monitor For monitor 1 if status get Code CVS Status SERVER ERROR throw new CVS Server Exception status  fetchNewDirectory RemoteFolderTree newFolder localPath IProgressMonitor CVSException IUpdateMessageListener IUpdateMessageListener directoryInformation ICVSFolder newDirectory newDirectory recordDelta STATE_NONE subTask RemoteFolderTreeBuilder receivingDelta toTruncatedPath directoryDoesNotExist ICVSFolder fileInformation ICVSFolder changedFiles recordDelta subTask RemoteFolderTreeBuilder receivingDelta toTruncatedPath fileDoesNotExist ICVSFolder remoteRoot IStatus GlobalOption DO_NOT_CHANGE updateLocalOptions localPath UpdateListener subMonitorFor getCode CVSStatus SERVER_ERROR CVSException CVSServerException CVSServerException isNoTagException containsErrors checkCanceled GlobalOption DO_NOT_CHANGE getOptionsWithoutTag localPath UpdateListener subMonitorFor getCode CVSStatus SERVER_ERROR CVSServerException
I Status Listener listener new I Status Listener public void file Status ICVS Folder root String path String remote Revision try update Revision path remote Revision monitor sub Task Policy bind Remote Folder Tree Builder receiving Revision Util to Truncated Path path 3 NON NLS 1 catch CVS Exception e exceptions add e  IStatusListener IStatusListener fileStatus ICVSFolder remoteRevision updateRevision remoteRevision subTask RemoteFolderTreeBuilder receivingRevision toTruncatedPath CVSException
Get the file revisions for the given filenames private void fetch File Revisions Session session String file Names final I Progress Monitor monitor throws CVS Exception Create a listener for receiving the revision info final Map revisions new Hash Map final List exceptions new Array List I Status Listener listener new I Status Listener public void file Status ICVS Folder root String path String remote Revision try update Revision path remote Revision monitor sub Task Policy bind Remote Folder Tree Builder receiving Revision Util to Truncated Path path 3 NON NLS 1 catch CVS Exception e exceptions add e Perform a cvs status with a custom message handler I Status status Command STATUS execute session Command NO GLOBAL OPTIONS Command NO LOCAL OPTIONS file Names new Status Listener listener monitor if status get Code CVS Status SERVER ERROR throw new CVS Server Exception status Report any exceptions that occured fecthing the revisions if exceptions is Empty if exceptions size 1 throw CVS Exception exceptions get 0 else Multi Status multi new Multi Status CVS Provider Plugin ID 0 Policy bind Remote Folder error Fetching Revisions null NON NLS 1 for int i 0 i exceptions size i multi merge CVS Exception exceptions get i get Status throw new CVS Exception multi  fetchFileRevisions fileNames IProgressMonitor CVSException HashMap ArrayList IStatusListener IStatusListener fileStatus ICVSFolder remoteRevision updateRevision remoteRevision subTask RemoteFolderTreeBuilder receivingRevision toTruncatedPath CVSException IStatus NO_GLOBAL_OPTIONS NO_LOCAL_OPTIONS fileNames StatusListener getCode CVSStatus SERVER_ERROR CVSServerException isEmpty CVSException MultiStatus MultiStatus CVSProviderPlugin RemoteFolder errorFetchingRevisions CVSException getStatus CVSException
private boolean prune Empty Directories return false  pruneEmptyDirectories
private void record Delta String path String revision int sync State if revision FOLDER new Folder Exist true String parent Util remove Last Segment path Map deltas Map file Deltas get parent if deltas null deltas new Hash Map file Deltas put parent deltas String name Util get Last Segment path deltas put name new Delta Node name revision sync State  recordDelta syncState newFolderExist removeLastSegment fileDeltas HashMap fileDeltas getLastSegment DeltaNode syncState
private void update Revision String path String revision throws CVS Exception Remote Folder Tree folder get Recored Remote Folder Util remove Last Segment path if folder null throw new CVS Exception Policy bind Remote Folder Tree Builder missing Parent path to String revision NON NLS 1 Remote File folder get File Util get Last Segment path set Revision revision  updateRevision CVSException RemoteFolderTree getRecoredRemoteFolder removeLastSegment CVSException RemoteFolderTreeBuilder missingParent toString RemoteFile getFile getLastSegment setRevision
of the remote private CVS Tag tag For Remote Folder ICVS Folder folder CVS Tag tag throws CVS Exception return tag null folder get Folder Sync Info get Tag tag  CVSTag tagForRemoteFolder ICVSFolder CVSTag CVSException getFolderSyncInfo getTag
private boolean is Orphaned Subtree ICVS Folder m Folder throws CVS Exception return m Folder isCVS Folder m Folder is Managed m Folder equals root m Folder get Parent isCVS Folder  isOrphanedSubtree ICVSFolder mFolder CVSException mFolder isCVSFolder mFolder isManaged mFolder mFolder getParent isCVSFolder
private void record Remote Folder Remote Folder Tree remote throws CVS Exception String path remote get Folder Sync Info get Remote Location remote Folder Table put Util as Path path remote  recordRemoteFolder RemoteFolderTree CVSException getFolderSyncInfo getRemoteLocation remoteFolderTable asPath
private Remote Folder Tree get Recored Remote Folder String path return Remote Folder Tree remote Folder Table get Util as Path path  RemoteFolderTree getRecoredRemoteFolder RemoteFolderTree remoteFolderTable asPath
This method returns an array of the files that differ between the local and remote trees The files are represented as a String that contains the path to the file in the remote or local trees return an array of differing files public String get File Diffs return String changed Files to Array new String changed Files size  getFileDiffs changedFiles toArray changedFiles

public static Remote Module get Remote Modules ICVS Repository Location repository CVS Tag tag I Progress Monitor monitor throws Team Exception monitor Policy monitor For monitor monitor begin Task Policy bind Remote Module get Remote Modules 100 NON NLS 1 try Remote Module modules Session s new Session repository ICVS Folder CVS Workspace Root getCVS Resource For Resources Plugin get Workspace get Root false s open Policy sub Monitor For monitor 10 false read only try modules Command CHECKOUT get Remote Modules s tag Policy sub Monitor For monitor 90 finally s close return modules finally monitor done  RemoteModule getRemoteModules ICVSRepositoryLocation CVSTag IProgressMonitor TeamException monitorFor beginTask RemoteModule getRemoteModules RemoteModule ICVSFolder CVSWorkspaceRoot getCVSResourceFor ResourcesPlugin getWorkspace getRoot subMonitorFor getRemoteModules subMonitorFor
Create a set of Remote Modules from the provided module definition strings returned from the server At the moment we are very restrictive on the types of modules we support public static Remote Module create Remote Modules String module Definition Strings ICVS Repository Location repository CVS Tag tag Map modules new Hash Map Map referenced Modules Table new Hash Map Map module Aliases new Hash Map List acceptable Modules new Array List First pass Create the remote module instances based on remote mapping for int i 0 i module Definition Strings length i Read the module name String Tokenizer tokenizer new String Tokenizer module Definition Strings i String module Name tokenizer next Token List local Options List String next try Read the options associated with the module local Options List new Array List next tokenizer next Token while next char At 0 switch next char At 1 case a alias local Options List add Checkout ALIAS break case l don t recurse local Options List add Checkout DO NOT RECURSE break case d directory local Options List add Checkout make Directory Name Option tokenizer next Token break case e case i case o case t case u Ignore any programs tokenizer next Token break case s status local Options List add Checkout make Status Option tokenizer next Token break default unanticipated option Ignore it and go on next tokenizer next Token catch No Such Element Exception e There is an invalid entry in the modules file Log it and continue CVS Provider Plugin log I Status WARNING Policy bind Remote Module invalid Definition module Definition Strings i repository get Location null NON NLS 1 continue Local Option local Options Local Option local Options List to Array new Local Option local Options List size if Checkout ALIAS is Element Of local Options if local Options length 1 XXX This is an error condition that needs to be reported An alias expands to one or more modules or paths List expansions new Array List 10 expansions add next while tokenizer has More Tokens expansions add tokenizer next Token module Aliases put module Name String expansions to Array new String expansions size modules put module Name new Remote Module module Name null repository null local Options tag true else The module definition may have a leading directory which can be followed by some files if next char At 0 String directory next List files new Array List while tokenizer has More Tokens next char At 0 next tokenizer next Token if next char At 0 files add next Remote Module remote Module new Remote Module module Name null repository directory local Options tag files is Empty modules put module Name remote Module if files is Empty ICVS Remote Resource children new ICVS Remote Resource files size for int j 0 j children length j children j new Remote File remote Module Update STATE NONE String files get j null null tag remote Module set Children children else modules put module Name new Remote Module module Name null repository null local Options tag true Record any referenced modules so that can be cross referenced below if next char At 0 List children new Array List 10 children add next while tokenizer has More Tokens children add tokenizer next Token referenced Modules Table put module Name String children to Array new String children size Second pass Cross reference aliases to modules XXX Aliases can reference other aliases which confuses the expansion Iterator iter module Aliases key Set iterator while iter has Next String module Name String iter next Remote Module module Remote Module modules get module Name String expansion String module Aliases get module Name List referenced Folders new Array List boolean expandable true for int i 0 i expansion length i if expansion i char At 0 XXX Unsupported for now expandable false else I Path path new Path expansion i if path segment Count 1 XXX Unsupported for now expandable false else Remote Module child Remote Module modules get expansion i if child null referenced Folders add new Remote Folder null repository path to String tag else Need to check if the child is a module alias if child is Alias XXX Unsupported for now expandable false else referenced Folders add child if expandable TODO Make module static module set Children ICVS Remote Resource referenced Folders to Array new ICVS Remote Resource referenced Folders size else module set Expandable false Third pass Cross reference remote modules where necessary iter modules key Set iterator while iter has Next String module Name String iter next String children String referenced Modules Table get module Name if children null Remote Module module Remote Module modules get module Name List referenced Folders new Array List boolean expandable true for int i 0 i children length i Remote Module child Remote Module modules get children i substring 1 if child null invalid module definition expandable false else if child is Alias Include alias children in line expandable false referenced Folders add All Arrays as List child get Children else XXX not expandable if child has local directory option d if Command find Option child get Local Options d null NON NLS 1 expandable false else referenced Folders add child if expandable module set Referenced Modules ICVS Remote Resource referenced Folders to Array new ICVS Remote Resource referenced Folders size else module set Expandable false return Remote Module modules values to Array new Remote Module modules size  RemoteModules RemoteModule createRemoteModules moduleDefinitionStrings ICVSRepositoryLocation CVSTag HashMap referencedModulesTable HashMap moduleAliases HashMap acceptableModules ArrayList moduleDefinitionStrings StringTokenizer StringTokenizer moduleDefinitionStrings moduleName nextToken localOptionsList localOptionsList ArrayList nextToken charAt charAt localOptionsList localOptionsList DO_NOT_RECURSE localOptionsList makeDirectoryNameOption nextToken nextToken localOptionsList makeStatusOption nextToken nextToken NoSuchElementException CVSProviderPlugin IStatus RemoteModule invalidDefinition moduleDefinitionStrings getLocation LocalOption localOptions LocalOption localOptionsList toArray LocalOption localOptionsList isElementOf localOptions localOptions ArrayList hasMoreTokens nextToken moduleAliases moduleName toArray moduleName RemoteModule moduleName localOptions charAt ArrayList hasMoreTokens charAt nextToken charAt RemoteModule remoteModule RemoteModule moduleName localOptions isEmpty moduleName remoteModule isEmpty ICVSRemoteResource ICVSRemoteResource RemoteFile remoteModule STATE_NONE remoteModule setChildren moduleName RemoteModule moduleName localOptions charAt ArrayList hasMoreTokens nextToken referencedModulesTable moduleName toArray moduleAliases keySet hasNext moduleName RemoteModule RemoteModule moduleName moduleAliases moduleName referencedFolders ArrayList charAt IPath segmentCount RemoteModule RemoteModule referencedFolders RemoteFolder toString isAlias referencedFolders setChildren ICVSRemoteResource referencedFolders toArray ICVSRemoteResource referencedFolders setExpandable keySet hasNext moduleName referencedModulesTable moduleName RemoteModule RemoteModule moduleName referencedFolders ArrayList RemoteModule RemoteModule isAlias referencedFolders addAll asList getChildren findOption getLocalOptions referencedFolders setReferencedModules ICVSRemoteResource referencedFolders toArray ICVSRemoteResource referencedFolders setExpandable RemoteModule toArray RemoteModule
public Remote Module String label Remote Folder parent ICVS Repository Location repository String repository Relative Path Local Option local Options CVS Tag tag boolean is Static super parent label repository repository Relative Path null Folder Sync Info VIRTUAL DIRECTORY repository Relative Path tag is Static this local Options local Options this label label this expandable true  RemoteModule RemoteFolder ICVSRepositoryLocation repositoryRelativePath LocalOption localOptions CVSTag isStatic repositoryRelativePath FolderSyncInfo VIRTUAL_DIRECTORY repositoryRelativePath isStatic localOptions localOptions
public Local Option get Local Options return local Options  LocalOption getLocalOptions localOptions
public ICVS Remote Resource get Members CVS Tag tag Name I Progress Monitor monitor throws CVS Exception if expandable return new ICVS Remote Resource 0 ICVS Remote Resource physical Children if folder Info get Is Static physical Children get Children else physical Children super get Members tag Name monitor ICVS Remote Resource all Children if referenced Modules null referenced Modules length 0 if physical Children null all Children referenced Modules else Combine two sets of children all Children new ICVS Remote Resource physical Children length referenced Modules length for int i 0 i physical Children length i all Children i physical Children i for int i 0 i referenced Modules length i all Children i physical Children length referenced Modules i else if physical Children null all Children physical Children else all Children new ICVS Remote Resource 0 return all Children  ICVSRemoteResource getMembers CVSTag tagName IProgressMonitor CVSException ICVSRemoteResource ICVSRemoteResource physicalChildren folderInfo getIsStatic physicalChildren getChildren physicalChildren getMembers tagName ICVSRemoteResource allChildren referencedModules referencedModules physicalChildren allChildren referencedModules allChildren ICVSRemoteResource physicalChildren referencedModules physicalChildren allChildren physicalChildren referencedModules allChildren physicalChildren referencedModules physicalChildren allChildren physicalChildren allChildren ICVSRemoteResource allChildren
private void set Referenced Modules ICVS Remote Resource referenced Modules this referenced Modules referenced Modules  setReferencedModules ICVSRemoteResource referencedModules referencedModules referencedModules
public boolean is Alias return Checkout ALIAS is Element Of local Options  isAlias isElementOf localOptions
see ICVS Remote Folder is Expandable public boolean is Expandable return expandable  ICVSRemoteFolder isExpandable isExpandable
private void set Expandable boolean expandable this expandable expandable  setExpandable
see ICVS Remote Folder for Tag CVS Tag public ICVS Remote Resource for Tag ICVS Remote Folder parent CVS Tag tag Name Remote Module r new Remote Module label Remote Folder parent get Repository folder Info get Repository local Options tag Name folder Info get Is Static r set Expandable expandable if folder Info get Is Static ICVS Remote Resource children get Children if children null List tagged Children new Array List children length for int i 0 i children length i ICVS Remote Resource resource children i tagged Children add Remote Resource resource for Tag r tag Name r set Children ICVS Remote Resource tagged Children to Array new ICVS Remote Resource tagged Children size if referenced Modules null List tagged Modules new Array List referenced Modules length for int i 0 i referenced Modules length i Remote Module module Remote Module referenced Modules i tagged Modules add module for Tag r tag Name r set Referenced Modules ICVS Remote Resource tagged Modules to Array new ICVS Remote Resource tagged Modules size return r  ICVSRemoteFolder forTag CVSTag ICVSRemoteResource forTag ICVSRemoteFolder CVSTag tagName RemoteModule RemoteModule RemoteFolder getRepository folderInfo getRepository localOptions tagName folderInfo getIsStatic setExpandable folderInfo getIsStatic ICVSRemoteResource getChildren taggedChildren ArrayList ICVSRemoteResource taggedChildren RemoteResource forTag tagName setChildren ICVSRemoteResource taggedChildren toArray ICVSRemoteResource taggedChildren referencedModules taggedModules ArrayList referencedModules referencedModules RemoteModule RemoteModule referencedModules taggedModules forTag tagName setReferencedModules ICVSRemoteResource taggedModules toArray ICVSRemoteResource taggedModules
see org eclipse team internal ccvs core ICVS Remote Folder is Defined Module public boolean is Defined Module return true  ICVSRemoteFolder isDefinedModule isDefinedModule
see java lang Object equals java lang Object public boolean equals Object arg0 if arg0 instanceof Remote Module Remote Module module Remote Module arg0 return get Name equals module get Name super equals module return false  RemoteModule RemoteModule RemoteModule getName getName
see java lang Object hash Code public int hash Code return super hash Code get Name hash Code  hashCode hashCode hashCode getName hashCode
see org eclipse team internal ccvs core ICVS Folder get Child java lang String public ICVS Resource get Child String path throws CVS Exception if path equals Session CURRENT LOCAL FOLDER path length 0 return this If the path is one segment and it s a referenced module return the module Note the overriden method will extract the first segment from a multi segment path and re invoke this method so we only need to check for one segment here and use the inherited method in the other cases if referenced Modules null if path index Of Session SERVER SEPARATOR 1 for int i 0 i referenced Modules length i if referenced Modules i get Name equals path return ICVS Resource referenced Modules i return super get Child path  ICVSFolder getChild ICVSResource getChild CVSException CURRENT_LOCAL_FOLDER referencedModules indexOf SERVER_SEPARATOR referencedModules referencedModules getName ICVSResource referencedModules getChild

Constructor for Remote Resource public Remote Resource Remote Folder parent String name this parent parent this name name  RemoteResource RemoteResource RemoteFolder
see ICVS Remote Resource get Name public String get Name return name  ICVSRemoteResource getName getName
see ICVS Resource get Relative Path ICVS Folder public String get Relative Path ICVS Folder ancestor throws CVS Exception return Util append Path parent get Relative Path ancestor get Name  ICVSResource getRelativePath ICVSFolder getRelativePath ICVSFolder CVSException appendPath getRelativePath getName
see ICVS Remote Resource get Parent public ICVS Remote Resource get Remote Parent return parent  ICVSRemoteResource getParent ICVSRemoteResource getRemoteParent
public abstract String get Repository Relative Path  getRepositoryRelativePath
public abstract String get Repository Relative Path public abstract ICVS Repository Location get Repository  getRepositoryRelativePath ICVSRepositoryLocation getRepository
public abstract ICVS Repository Location get Repository public int get Workspace Sync State return workspace Sync State  ICVSRepositoryLocation getRepository getWorkspaceSyncState workspaceSyncState
public void set Workspace Sync State int workspace Sync State this workspace Sync State workspace Sync State  setWorkspaceSyncState workspaceSyncState workspaceSyncState workspaceSyncState
see ICVS Resource delete public void delete For now do nothing but we could provide this in the future  ICVSResource
the remote resource from the server public boolean exists return true 
see ICVS Remote Resource exists I Progress Monitor public boolean exists I Progress Monitor monitor throws Team Exception return parent exists this monitor  ICVSRemoteResource IProgressMonitor IProgressMonitor TeamException
see ICVS Resource get Parent public ICVS Folder get Parent return parent  ICVSResource getParent ICVSFolder getParent
see ICVS Resource is Ignored public boolean is Ignored return false  ICVSResource isIgnored isIgnored
see ICVS Resource is Managed public boolean is Managed return parent null  ICVSResource isManaged isManaged
public boolean is Modified I Progress Monitor monitor throws CVS Exception it is safe to always consider a remote file handle as modified This will cause any CVS command to fetch new contents from the server return true  isModified IProgressMonitor CVSException
see ICVS Resource unmanage public void unmanage I Progress Monitor monitor throws CVS Exception do nothing  ICVSResource IProgressMonitor CVSException
see ICVS Resource get Sync Info public abstract Resource Sync Info get Sync Info  ICVSResource getSyncInfo ResourceSyncInfo getSyncInfo
see ICVS Resource set Sync Info Resource Sync Info public void set Sync Info Resource Sync Info info int modification State ensure that clients are not trying to set sync info on remote handles Assert is True false  ICVSResource setSyncInfo ResourceSyncInfo setSyncInfo ResourceSyncInfo modificationState isTrue
public boolean equals Object target if this target return true if target instanceof Remote Resource return false Remote Resource remote Remote Resource target return remote is Container is Container remote get Repository equals get Repository remote get Repository Relative Path equals get Repository Relative Path  RemoteResource RemoteResource RemoteResource isContainer isContainer getRepository getRepository getRepositoryRelativePath getRepositoryRelativePath
see ICVS Resource set Ignored As String public void set Ignored As String pattern throws CVS Exception ensure that clients are not trying to set sync info on remote handles Assert is True false  ICVSResource setIgnoredAs setIgnoredAs CVSException isTrue
see org eclipse team internal ccvs core ICVS Resource getI Resource public I Resource getI Resource throws CVS Exception return null  ICVSResource getIResource IResource getIResource CVSException
Return a copy of the receiver that is associated with the given tag The parent should be a copy of the receiver s parent which has been copied to the same tag param parent param tag Name return ICVS Remote Folder  tagName ICVSRemoteFolder
see java lang Object hash Code public int hash Code return get Repository Relative Path hash Code  hashCode hashCode getRepositoryRelativePath hashCode
Method which returns an array of bytes that can be used to recreate the remote handle To recreate the remote handle invoke the code from Bytes code method on either Remote Folder or Remote File TODO It would be nice to have a method on Rmeote Resource to recreate the handles but the file requires the bytes for the parent folder since this folder may not exist locally return  fromBytes RemoteFolder RemoteFile RmeoteResource
abstract public byte get Sync Bytes public String to String return Remote is Container Folder File get Name NON NLS 1 NON NLS 2 NON NLS 3  getSyncBytes toString isContainer getName
public String get Cache Path ICVS Repository Location location get Repository I Path path new Path location get Host path path append location get Root Directory path path append parent get Repository Relative Path path path append get Name get Content Identifier return path to String  getCachePath ICVSRepositoryLocation getRepository IPath getHost getRootDirectory getRepositoryRelativePath getName getContentIdentifier toString
see org eclipse team core synchronize Resource Variant get Cache Id protected String get Cache Id return CVS Provider Plugin ID  ResourceVariant getCacheId getCacheId CVSProviderPlugin
see org eclipse team core variants I Resource Variant as Bytes public byte as Bytes return get Sync Bytes  IResourceVariant asBytes asBytes getSyncBytes

package Session Property Sync Info Cache Synchronizer Sync Info Cache synchronizer Cache this synchronizer Cache synchronizer Cache try this save participant is removed when the plugin is shutdown Resources Plugin get Workspace add Save Participant CVS Provider Plugin get Plugin this I Synchronizer synchronizer Resources Plugin get Workspace get Synchronizer synchronizer add FOLDER DIRTY STATE KEY catch Core Exception e CVS Provider Plugin log e  SessionPropertySyncInfoCache SynchronizerSyncInfoCache synchronizerCache synchronizerCache synchronizerCache ResourcesPlugin getWorkspace addSaveParticipant CVSProviderPlugin getPlugin ISynchronizer ResourcesPlugin getWorkspace getSynchronizer FOLDER_DIRTY_STATE_KEY CoreException CVSProviderPlugin
If not already cached loads and caches the folder ignores sync for the container Folder must exist and must not be the workspace root param container the container return the folder ignore patterns or an empty array if none package File Name Matcher cache Folder Ignores I Container container throws CVS Exception don t try to load if the information is already cached File Name Matcher matcher File Name Matcher safe Get Session Property container IGNORE SYNC KEY if matcher null read folder ignores and remember it String ignores Sync File Writer readCVS Ignore Entries container if ignores null matcher NULL IGNORES else matcher new File Name Matcher ignores safe Set Session Property container IGNORE SYNC KEY matcher return matcher  FileNameMatcher cacheFolderIgnores IContainer CVSException FileNameMatcher FileNameMatcher safeGetSessionProperty IGNORE_SYNC_KEY SyncFileWriter readCVSIgnoreEntries NULL_IGNORES FileNameMatcher safeSetSessionProperty IGNORE_SYNC_KEY
package boolean is Folder Sync Info Cached I Container container throws CVS Exception Object info safe Get Session Property container FOLDER SYNC KEY if info null Defer to the synchronizer in case the folder was recreated info synchronizer Cache get Cached Folder Sync container return info null  isFolderSyncInfoCached IContainer CVSException safeGetSessionProperty FOLDER_SYNC_KEY synchronizerCache getCachedFolderSync
package boolean is Resource Sync Info Cached I Container container throws CVS Exception return safe Get Session Property container RESOURCE SYNC CACHED KEY null  isResourceSyncInfoCached IContainer CVSException safeGetSessionProperty RESOURCE_SYNC_CACHED_KEY
package void set Resource Sync Info Cached I Container container throws CVS Exception safe Set Session Property container RESOURCE SYNC CACHED KEY RESOURCE SYNC CACHED  setResourceSyncInfoCached IContainer CVSException safeSetSessionProperty RESOURCE_SYNC_CACHED_KEY RESOURCE_SYNC_CACHED
Returns the folder sync info for the container null if none Folder must exist and must not be the workspace root The folder sync info for the container MUST ALREADY BE CACHED param container the container return the folder sync info for the folder or null if none see cache Folder Sync Folder Sync Info get Cached Folder Sync I Container container throws CVS Exception Folder Sync Info info Folder Sync Info safe Get Session Property container FOLDER SYNC KEY if info null Defer to the synchronizer in case the folder was recreated info synchronizer Cache get Cached Folder Sync container if info null safe Set Session Property container FOLDER SYNC KEY info if info null There should be sync info but it was missing Report the error throw new CVS Exception Policy bind Eclipse Synchronizer folder Sync Info Missing container get Full Path to String NON NLS 1 if info NULL FOLDER SYNC INFO return null return info  cacheFolderSync FolderSyncInfo getCachedFolderSync IContainer CVSException FolderSyncInfo FolderSyncInfo safeGetSessionProperty FOLDER_SYNC_KEY synchronizerCache getCachedFolderSync safeSetSessionProperty FOLDER_SYNC_KEY CVSException EclipseSynchronizer folderSyncInfoMissing getFullPath toString NULL_FOLDER_SYNC_INFO
Purges the cache recursively for all resources beneath the container There must not be any pending uncommitted changes return the resources whose sync info was flushed package I Resource purge Cache I Container container boolean deep throws CVS Exception if container exists return new I Resource 0 try Set flushed new Hash Set if container get Type I Resource ROOT safe Set Session Property container IGNORE SYNC KEY null safe Set Session Property container FOLDER SYNC KEY null safe Set Session Property container RESOURCE SYNC CACHED KEY null flushed add container Eclipse Synchronizer get Instance adjust Dirty State Recursively container RECOMPUTE INDICATOR I Resource members container members for int i 0 i members length i I Resource resource members i purge Resource Sync Cache resource flushed add resource if deep resource get Type I Resource FILE I Resource flushed Children purge Cache I Container resource deep flushed add All Arrays as List flushed Children return I Resource flushed to Array new I Resource flushed size catch Core Exception e throw CVS Exception wrap Exception e  IResource purgeCache IContainer CVSException IResource HashSet getType IResource safeSetSessionProperty IGNORE_SYNC_KEY safeSetSessionProperty FOLDER_SYNC_KEY safeSetSessionProperty RESOURCE_SYNC_CACHED_KEY EclipseSynchronizer getInstance adjustDirtyStateRecursively RECOMPUTE_INDICATOR IResource IResource purgeResourceSyncCache getType IResource IResource flushedChildren purgeCache IContainer addAll asList flushedChildren IResource toArray IResource CoreException CVSException wrapException
package void purge Resource Sync Cache I Resource resource throws CVS Exception safe Set Session Property resource RESOURCE SYNC KEY null Eclipse Synchronizer get Instance adjust Dirty State Recursively resource RECOMPUTE INDICATOR  purgeResourceSyncCache IResource CVSException safeSetSessionProperty RESOURCE_SYNC_KEY EclipseSynchronizer getInstance adjustDirtyStateRecursively RECOMPUTE_INDICATOR
Sets the array of folder ignore patterns for the container must not be null Folder must exist and must not be the workspace root param container the container param ignores the array of ignore patterns package void set Cached Folder Ignores I Container container String ignores throws CVS Exception safe Set Session Property container IGNORE SYNC KEY new File Name Matcher ignores  setCachedFolderIgnores IContainer CVSException safeSetSessionProperty IGNORE_SYNC_KEY FileNameMatcher
Sets the folder sync info for the container if null deletes it Folder must exist and must not be the workspace root The folder sync info for the container need not have previously been cached param container the container param info the new folder sync info void set Cached Folder Sync I Container container Folder Sync Info info boolean can Modify Workspace throws CVS Exception if container exists return if info null info NULL FOLDER SYNC INFO safe Set Session Property container FOLDER SYNC KEY info Ensure the synchronizer is clear for exiting resources if can Modify Workspace synchronizer Cache get Cached Folder Sync container null synchronizer Cache set Cached Folder Sync container null true  setCachedFolderSync IContainer FolderSyncInfo canModifyWorkspace CVSException NULL_FOLDER_SYNC_INFO safeSetSessionProperty FOLDER_SYNC_KEY canModifyWorkspace synchronizerCache getCachedFolderSync synchronizerCache setCachedFolderSync
package void set Dirty Indicator I Resource resource String indicator throws CVS Exception if resource get Type I Resource FILE internal Set Dirty Indicator I File resource indicator else internal Set Dirty Indicator I Container resource indicator  setDirtyIndicator IResource CVSException getType IResource internalSetDirtyIndicator IFile internalSetDirtyIndicator IContainer
package String get Dirty Indicator I Resource resource throws CVS Exception if resource get Type I Resource FILE return internal Get Dirty Indicator I File resource else return internal Get Dirty Indicator I Container resource  getDirtyIndicator IResource CVSException getType IResource internalGetDirtyIndicator IFile internalGetDirtyIndicator IContainer
private void internal Set Dirty Indicator I File file String indicator throws CVS Exception safe Set Session Property file IS DIRTY indicator  internalSetDirtyIndicator IFile CVSException safeSetSessionProperty IS_DIRTY
private String internal Get Dirty Indicator I File file throws CVS Exception String di String safe Get Session Property file IS DIRTY if di null di RECOMPUTE INDICATOR return di  internalGetDirtyIndicator IFile CVSException safeGetSessionProperty IS_DIRTY RECOMPUTE_INDICATOR
private void internal Set Dirty Indicator I Container container String indicator throws CVS Exception safe Set Session Property container IS DIRTY indicator  internalSetDirtyIndicator IContainer CVSException safeSetSessionProperty IS_DIRTY
private String internal Get Dirty Indicator I Container container throws CVS Exception try String di String safe Get Session Property container IS DIRTY if the session property is not available then restore from persisted sync info At this time the sync info is not flushed because we don t want the workspace to generate a delta if di null byte di Bytes Resources Plugin get Workspace get Synchronizer get Sync Info FOLDER DIRTY STATE KEY container if di Bytes null CVS Provider Plugin get Plugin crash On Last Run di new String di Bytes if di equals NOT DIRTY INDICATOR di NOT DIRTY INDICATOR else if di equals IS DIRTY INDICATOR di IS DIRTY INDICATOR else di RECOMPUTE INDICATOR else di RECOMPUTE INDICATOR set Dirty Indicator container di return di catch Core Exception e throw CVS Exception wrap Exception e  internalGetDirtyIndicator IContainer CVSException safeGetSessionProperty IS_DIRTY diBytes ResourcesPlugin getWorkspace getSynchronizer getSyncInfo FOLDER_DIRTY_STATE_KEY diBytes CVSProviderPlugin getPlugin crashOnLastRun diBytes NOT_DIRTY_INDICATOR NOT_DIRTY_INDICATOR IS_DIRTY_INDICATOR IS_DIRTY_INDICATOR RECOMPUTE_INDICATOR RECOMPUTE_INDICATOR setDirtyIndicator CoreException CVSException wrapException
package void flush Dirty Cache I Resource resource throws CVS Exception if resource exists if resource get Type I Resource FILE safe Set Session Property resource IS DIRTY null else safe Set Session Property resource IS DIRTY null flush Dirty State From Disk I Container resource  flushDirtyCache IResource CVSException getType IResource safeSetSessionProperty IS_DIRTY safeSetSessionProperty IS_DIRTY flushDirtyStateFromDisk IContainer
Method is Sync Info Loaded returns true if all the sync info for the provided resources is loaded into the internal cache param resources param i return boolean package boolean is Sync Info Loaded I Container parent throws CVS Exception if parent get Folder new Path Sync File Writer CVS DIRNAME exists if safe Get Session Property parent RESOURCE SYNC CACHED KEY null return false if safe Get Session Property parent FOLDER SYNC KEY null return false if parent get Session Property IGNORE SYNC KEY null return false return true  isSyncInfoLoaded isSyncInfoLoaded IContainer CVSException getFolder SyncFileWriter CVS_DIRNAME safeGetSessionProperty RESOURCE_SYNC_CACHED_KEY safeGetSessionProperty FOLDER_SYNC_KEY getSessionProperty IGNORE_SYNC_KEY
see org eclipse team internal ccvs core resources Sync Info Cache get Cached Sync Bytes org eclipse core resources I Resource byte get Cached Sync Bytes I Resource resource throws CVS Exception byte bytes byte safe Get Session Property resource RESOURCE SYNC KEY if bytes null Defer to the synchronizer in case the file was recreated bytes synchronizer Cache get Cached Sync Bytes resource if bytes null boolean gender Change false if resource get Type I Resource FILE if Resource Sync Info is Folder bytes gender Change true else if Resource Sync Info is Folder bytes gender Change true if gender Change Return null if it is a gender change bytes null else safe Set Session Property resource RESOURCE SYNC KEY Resource Sync Info convert From Deletion bytes return bytes  SyncInfoCache getCachedSyncBytes IResource getCachedSyncBytes IResource CVSException safeGetSessionProperty RESOURCE_SYNC_KEY synchronizerCache getCachedSyncBytes genderChange getType IResource ResourceSyncInfo isFolder genderChange ResourceSyncInfo isFolder genderChange genderChange safeSetSessionProperty RESOURCE_SYNC_KEY ResourceSyncInfo convertFromDeletion
Object safe Get Session Property I Resource resource Qualified Name key throws CVS Exception try return resource get Session Property key catch Core Exception e I Status status e get Status if status null int code e get Status get Code if code I Resource Status RESOURCE NOT LOCAL code I Resource Status RESOURCE NOT FOUND ignore error since a phantom would of been created and we can safely ignore these cases return null some other error we did not expect throw CVS Exception wrap Exception e  safeGetSessionProperty IResource QualifiedName CVSException getSessionProperty CoreException IStatus getStatus getStatus getCode IResourceStatus RESOURCE_NOT_LOCAL IResourceStatus RESOURCE_NOT_FOUND CVSException wrapException
void safe Set Session Property I Resource resource Qualified Name key Object value throws CVS Exception try resource set Session Property key value catch Core Exception e I Status status e get Status if status null int code e get Status get Code if code I Resource Status RESOURCE NOT LOCAL code I Resource Status RESOURCE NOT FOUND ignore error since a phantom would of been created and we can safely ignore these cases some other error we did not expect throw CVS Exception wrap Exception e  safeSetSessionProperty IResource QualifiedName CVSException setSessionProperty CoreException IStatus getStatus getStatus getCode IResourceStatus RESOURCE_NOT_LOCAL IResourceStatus RESOURCE_NOT_FOUND CVSException wrapException
see org eclipse team internal ccvs core resources Sync Info Cache set Cached Sync Bytes org eclipse core resources I Resource byte void set Cached Sync Bytes I Resource resource byte sync Bytes boolean can Modify Workspace throws CVS Exception Ensure that the sync bytes do not indicate a deletion if sync Bytes null Resource Sync Info is Deletion sync Bytes sync Bytes Resource Sync Info convert From Deletion sync Bytes Put the sync bytes into the cache safe Set Session Property resource RESOURCE SYNC KEY sync Bytes Ensure the synchronizer is clear if can Modify Workspace synchronizer Cache get Cached Sync Bytes resource null synchronizer Cache set Cached Sync Bytes resource null can Modify Workspace  SyncInfoCache setCachedSyncBytes IResource setCachedSyncBytes IResource syncBytes canModifyWorkspace CVSException syncBytes ResourceSyncInfo isDeletion syncBytes syncBytes ResourceSyncInfo convertFromDeletion syncBytes safeSetSessionProperty RESOURCE_SYNC_KEY syncBytes canModifyWorkspace synchronizerCache getCachedSyncBytes synchronizerCache setCachedSyncBytes canModifyWorkspace
boolean is Dirty Cache Flushed I Container resource throws CVS Exception if resource exists return get Dirty Indicator resource RECOMPUTE INDICATOR return false  isDirtyCacheFlushed IContainer CVSException getDirtyIndicator RECOMPUTE_INDICATOR
see org eclipse core resources I Save Participant done Saving org eclipse core resources I Save Context public void done Saving I Save Context context  ISaveParticipant doneSaving ISaveContext doneSaving ISaveContext
see org eclipse core resources I Save Participant prepare To Save org eclipse core resources I Save Context public void prepare To Save I Save Context context throws Core Exception  ISaveParticipant prepareToSave ISaveContext prepareToSave ISaveContext CoreException
see org eclipse core resources I Save Participant rollback org eclipse core resources I Save Context public void rollback I Save Context context  ISaveParticipant ISaveContext ISaveContext
project accept new I Resource Visitor public boolean visit I Resource resource throws Core Exception if resource get Type I Resource FILE String di null try di get Dirty Indicator resource catch CVS Exception e continue traversal CVS Provider Plugin log e if di null synchronizer set Sync Info FOLDER DIRTY STATE KEY resource di get Bytes return true  IResourceVisitor IResource CoreException getType IResource getDirtyIndicator CVSException CVSProviderPlugin setSyncInfo FOLDER_DIRTY_STATE_KEY getBytes
public void saving I Save Context context throws Core Exception boolean full Save context get Kind I Save Context FULL SAVE boolean project Save context get Kind I Save Context PROJECT SAVE if project Save full Save persist all session properties for folders into sync info final I Synchronizer synchronizer Resources Plugin get Workspace get Synchronizer traverse the workspace looking for CVS managed projects or just the specific projects being closed I Project projects if project Save projects new I Project 1 projects 0 context get Project else projects Resources Plugin get Workspace get Root get Projects for int i 0 i projects length i I Project project projects i Repository Provider provider Repository Provider get Provider project CVS Provider Plugin get Type Id found a project managed by CVS convert each session property on a folder to a sync object if provider null project accept new I Resource Visitor public boolean visit I Resource resource throws Core Exception if resource get Type I Resource FILE String di null try di get Dirty Indicator resource catch CVS Exception e continue traversal CVS Provider Plugin log e if di null synchronizer set Sync Info FOLDER DIRTY STATE KEY resource di get Bytes return true  ISaveContext CoreException fullSave getKind ISaveContext FULL_SAVE projectSave getKind ISaveContext PROJECT_SAVE projectSave fullSave ISynchronizer ResourcesPlugin getWorkspace getSynchronizer IProject projectSave IProject getProject ResourcesPlugin getWorkspace getRoot getProjects IProject RepositoryProvider RepositoryProvider getProvider CVSProviderPlugin getTypeId IResourceVisitor IResource CoreException getType IResource getDirtyIndicator CVSException CVSProviderPlugin setSyncInfo FOLDER_DIRTY_STATE_KEY getBytes
private void flush Dirty State From Disk I Container container final I Synchronizer synchronizer Resources Plugin get Workspace get Synchronizer try synchronizer flush Sync Info FOLDER DIRTY STATE KEY container I Resource DEPTH INFINITE catch Core Exception e CVS Provider Plugin log e  flushDirtyStateFromDisk IContainer ISynchronizer ResourcesPlugin getWorkspace getSynchronizer flushSyncInfo FOLDER_DIRTY_STATE_KEY IResource DEPTH_INFINITE CoreException CVSProviderPlugin
package void purge Dirty Cache I Resource resource throws CVS Exception if resource exists return try if resource get Type I Resource ROOT safe Set Session Property resource IS DIRTY null if resource get Type I Resource FILE Resources Plugin get Workspace get Synchronizer flush Sync Info FOLDER DIRTY STATE KEY resource I Resource DEPTH INFINITE I Resource members I Container resource members for int i 0 i members length i purge Dirty Cache members i catch Core Exception e throw CVS Exception wrap Exception e  purgeDirtyCache IResource CVSException getType IResource safeSetSessionProperty IS_DIRTY getType IResource ResourcesPlugin getWorkspace getSynchronizer flushSyncInfo FOLDER_DIRTY_STATE_KEY IResource DEPTH_INFINITE IResource IContainer purgeDirtyCache CoreException CVSException wrapException
see org eclipse team internal ccvs core resources Sync Info Cache caches Dirty State public boolean caches Dirty State return true  SyncInfoCache cachesDirtyState cachesDirtyState

private static final Object BYTES REMOVED new byte 0 public Synchronizer Sync Info Cache get Workspace Synchronizer add FOLDER SYNC KEY get Workspace Synchronizer add RESOURCE SYNC KEY  BYTES_REMOVED SynchronizerSyncInfoCache getWorkspaceSynchronizer FOLDER_SYNC_KEY getWorkspaceSynchronizer RESOURCE_SYNC_KEY
Return the Eclipse Workspace Synchronizer from org eclipse core resources private I Synchronizer get Workspace Synchronizer return Resources Plugin get Workspace get Synchronizer  ISynchronizer getWorkspaceSynchronizer ResourcesPlugin getWorkspace getSynchronizer
package void flush I Project project throws CVS Exception purge Cache project true  IProject CVSException purgeCache
Method flush param folder package void flush I Folder folder throws CVS Exception purge Cache folder false  IFolder CVSException purgeCache
Returns the folder sync info for the container null if none Folder must exist and must not be the workspace root The folder sync info for the container MUST ALREADY BE CACHED param container the container return the folder sync info for the folder or null if none see cache Folder Sync Folder Sync Info get Cached Folder Sync I Container container throws CVS Exception byte bytes internal Get Cached Sync Bytes container if bytes null return null return Folder Sync Info get Folder Sync Info bytes  cacheFolderSync FolderSyncInfo getCachedFolderSync IContainer CVSException internalGetCachedSyncBytes FolderSyncInfo getFolderSyncInfo
boolean has Cached Folder Sync I Container container throws CVS Exception return internal Get Cached Sync Bytes container null  hasCachedFolderSync IContainer CVSException internalGetCachedSyncBytes
private byte internal Get Cached Sync Bytes I Container container throws CVS Exception try return get Workspace Synchronizer get Sync Info FOLDER SYNC KEY container catch Core Exception e throw CVS Exception wrap Exception e  internalGetCachedSyncBytes IContainer CVSException getWorkspaceSynchronizer getSyncInfo FOLDER_SYNC_KEY CoreException CVSException wrapException
Sets the folder sync info for the container if null deletes it Folder must exist and must not be the workspace root The folder sync info for the container need not have previously been cached param container the container param info the new folder sync info void set Cached Folder Sync I Container container Folder Sync Info info boolean can Modify Workspace throws CVS Exception try if info null if container exists container is Phantom get Workspace Synchronizer flush Sync Info FOLDER SYNC KEY container I Resource DEPTH ZERO else get Workspace Synchronizer set Sync Info FOLDER SYNC KEY container info get Bytes catch Core Exception e throw CVS Exception wrap Exception e  setCachedFolderSync IContainer FolderSyncInfo canModifyWorkspace CVSException isPhantom getWorkspaceSynchronizer flushSyncInfo FOLDER_SYNC_KEY IResource DEPTH_ZERO getWorkspaceSynchronizer setSyncInfo FOLDER_SYNC_KEY getBytes CoreException CVSException wrapException
see org eclipse team internal ccvs core resources Sync Info Cache get Cached Sync Bytes org eclipse core resources I Resource byte get Cached Sync Bytes I Resource resource throws CVS Exception try byte bytes if pending Cache Writes contains Key resource bytes byte pending Cache Writes get resource if bytes BYTES REMOVED bytes null else bytes get Workspace Synchronizer get Sync Info RESOURCE SYNC KEY resource if bytes null resource get Type I Resource FILE if Resource Sync Info is Addition bytes The local file has been deleted but was an addition Therefore ignoe the sync bytes bytes null else if Resource Sync Info is Deletion bytes Ensure the bytes indicate an outgoing deletion bytes Resource Sync Info convert To Deletion bytes return bytes catch Core Exception e throw CVS Exception wrap Exception e  SyncInfoCache getCachedSyncBytes IResource getCachedSyncBytes IResource CVSException pendingCacheWrites containsKey pendingCacheWrites BYTES_REMOVED getWorkspaceSynchronizer getSyncInfo RESOURCE_SYNC_KEY getType IResource ResourceSyncInfo isAddition ResourceSyncInfo isDeletion ResourceSyncInfo convertToDeletion CoreException CVSException wrapException
see org eclipse team internal ccvs core resources Sync Info Cache set Cached Sync Bytes org eclipse core resources I Resource byte void set Cached Sync Bytes I Resource resource byte sync Bytes boolean can Modify Workspace throws CVS Exception byte old Bytes get Cached Sync Bytes resource try if sync Bytes null if old Bytes null if can Modify Workspace if resource exists resource is Phantom get Workspace Synchronizer flush Sync Info RESOURCE SYNC KEY resource I Resource DEPTH ZERO pending Cache Writes remove resource else if resource exists resource is Phantom pending Cache Writes put resource BYTES REMOVED else ensure that the sync info is not already set to the same thing We do this to avoid causing a resource delta when the sync info is initially loaded i e the synchronizer has it and so does the Entries file Ignore the if old Bytes null equals sync Bytes old Bytes if can Modify Workspace get Workspace Synchronizer set Sync Info RESOURCE SYNC KEY resource sync Bytes pending Cache Writes remove resource else pending Cache Writes put resource sync Bytes catch Core Exception e throw CVS Exception wrap Exception e  SyncInfoCache setCachedSyncBytes IResource setCachedSyncBytes IResource syncBytes canModifyWorkspace CVSException oldBytes getCachedSyncBytes syncBytes oldBytes canModifyWorkspace isPhantom getWorkspaceSynchronizer flushSyncInfo RESOURCE_SYNC_KEY IResource DEPTH_ZERO pendingCacheWrites isPhantom pendingCacheWrites BYTES_REMOVED oldBytes syncBytes oldBytes canModifyWorkspace getWorkspaceSynchronizer setSyncInfo RESOURCE_SYNC_KEY syncBytes pendingCacheWrites pendingCacheWrites syncBytes CoreException CVSException wrapException
private boolean equals byte sync Bytes byte old Bytes throws CVS Exception if Resource Sync Info is Folder sync Bytes sync Bytes Resource Sync Info convert To Deletion sync Bytes if Resource Sync Info is Folder old Bytes try old Bytes Resource Sync Info convert To Deletion old Bytes catch CVS Exception e CVS Provider Plugin log e return false return Util equals sync Bytes old Bytes  syncBytes oldBytes CVSException ResourceSyncInfo isFolder syncBytes syncBytes ResourceSyncInfo convertToDeletion syncBytes ResourceSyncInfo isFolder oldBytes oldBytes ResourceSyncInfo convertToDeletion oldBytes CVSException CVSProviderPlugin syncBytes oldBytes
String get Dirty Indicator I Resource resource throws CVS Exception if resource get Type I Resource FILE a phantom file is dirty if it was managed before it was deleted return get Cached Sync Bytes resource null IS DIRTY INDICATOR NOT DIRTY INDICATOR else return calculate Dirty Count For Phantom Folder I Container resource  getDirtyIndicator IResource CVSException getType IResource getCachedSyncBytes IS_DIRTY_INDICATOR NOT_DIRTY_INDICATOR calculateDirtyCountForPhantomFolder IContainer
see org eclipse team internal ccvs core resources Sync Info Cache set Dirty Indicator org eclipse core resources I Resource java lang String void set Dirty Indicator I Resource resource String indicator throws CVS Exception We don t cache the dirty count for folders because it would cause resource delta s in the decorator thread and possible deadlock  SyncInfoCache setDirtyIndicator IResource setDirtyIndicator IResource CVSException
public boolean caches Dirty State We don t cache the dirty count for folders because it would cause resource delta s in the decorator thread and possible deadlock return false  cachesDirtyState
package void flush Dirty Cache I Resource container throws CVS Exception Dirty state is not cached  flushDirtyCache IResource CVSException
package boolean is Sync Info Loaded I Container parent throws CVS Exception return true  isSyncInfoLoaded IContainer CVSException
see org eclipse team internal ccvs core resources Sync Info Cache is Resource Sync Info Cached org eclipse core resources I Container boolean is Resource Sync Info Cached I Container container throws CVS Exception the sync info is always cahced when using the synchronizer return true  SyncInfoCache isResourceSyncInfoCached IContainer isResourceSyncInfoCached IContainer CVSException
see org eclipse team internal ccvs core resources Sync Info Cache set Resource Sync Info Cached org eclipse core resources I Container void set Resource Sync Info Cached I Container container throws CVS Exception do nothing  SyncInfoCache setResourceSyncInfoCached IContainer setResourceSyncInfoCached IContainer CVSException
see org eclipse team internal ccvs core resources Sync Info Cache is Folder Sync Info Cached org eclipse core resources I Container boolean is Folder Sync Info Cached I Container container throws CVS Exception return true  SyncInfoCache isFolderSyncInfoCached IContainer isFolderSyncInfoCached IContainer CVSException
see org eclipse team internal ccvs core resources Sync Info Cache is Dirty Cache Flushed org eclipse core resources I Container boolean is Dirty Cache Flushed I Container resource throws CVS Exception return false  SyncInfoCache isDirtyCacheFlushed IContainer isDirtyCacheFlushed IContainer CVSException
private String calculate Dirty Count For Phantom Folder I Container parent throws CVS Exception ICVS Folder cvs Folder CVS Workspace Root getCVS Folder For parent if get Cached Folder Sync parent null return NOT DIRTY INDICATOR String indicator NOT DIRTY INDICATOR ICVS Resource children cvs Folder members ICVS Folder MANAGED MEMBERS ICVS Folder PHANTOM MEMBERS for int i 0 i children length i ICVS Resource resource children i keep looking into phantom folders until a managed phantom file is found if resource is Folder indicator calculate Dirty Count For Phantom Folder I Container resource getI Resource else Any non existant managed files are dirty outgoing deletion indicator IS DIRTY INDICATOR break return indicator  calculateDirtyCountForPhantomFolder IContainer CVSException ICVSFolder cvsFolder CVSWorkspaceRoot getCVSFolderFor getCachedFolderSync NOT_DIRTY_INDICATOR NOT_DIRTY_INDICATOR ICVSResource cvsFolder ICVSFolder MANAGED_MEMBERS ICVSFolder PHANTOM_MEMBERS ICVSResource isFolder calculateDirtyCountForPhantomFolder IContainer getIResource IS_DIRTY_INDICATOR
param root param deep public void purge Cache I Container root boolean deep throws CVS Exception int depth deep I Resource DEPTH INFINITE I Resource DEPTH ZERO try if root exists root is Phantom get Workspace Synchronizer flush Sync Info RESOURCE SYNC KEY root depth if root exists root is Phantom get Workspace Synchronizer flush Sync Info FOLDER SYNC KEY root depth if deep I Path full Path root get Full Path for Iterator iter pending Cache Writes key Set iterator iter has Next I Resource resource I Resource iter next if full Path is Prefix Of resource get Full Path iter remove else pending Cache Writes remove root catch Core Exception e if e get Status get Code I Resource Status RESOURCE NOT FOUND Must have been deleted since we checked return throw CVS Exception wrap Exception e  purgeCache IContainer CVSException IResource DEPTH_INFINITE IResource DEPTH_ZERO isPhantom getWorkspaceSynchronizer flushSyncInfo RESOURCE_SYNC_KEY isPhantom getWorkspaceSynchronizer flushSyncInfo FOLDER_SYNC_KEY IPath fullPath getFullPath pendingCacheWrites keySet hasNext IResource IResource fullPath isPrefixOf getFullPath pendingCacheWrites CoreException getStatus getCode IResourceStatus RESOURCE_NOT_FOUND CVSException wrapException
public boolean is Phantom I Resource resource return resource is Phantom pending Cache Writes contains Key resource  isPhantom IResource isPhantom pendingCacheWrites containsKey

Returns the folder sync info for the container null if none Folder must exist and must not be the workspace root The folder sync info for the container MUST ALREADY BE CACHED p The code can Modify Workspace code flag is used to indicate whether it is OK to modify I Sycnrhonizer entries for the given resource A value of code true code indicates that the client holds a scheduling rule that encompasses the resource and the workspace is open for modification param container the container param can Modify Workspace indicates if it is OK to modify the I Sycnrhonizer return the folder sync info for the folder or null if none see cache Folder Sync  canModifyWorkspace ISycnrhonizer canModifyWorkspace ISycnrhonizer cacheFolderSync
Sets the folder sync info for the container if null deletes it Folder must exist and must not be the workspace root The folder sync info for the container need not have previously been cached The code can Modify Workspace code flag is used to indicate whether it is OK to modify I Sycnrhonizer entries for the given resource A value of code true code indicates that the client holds a scheduling rule that encompasses the resource and the workspace is open for modification param container the container param info the new folder sync info param can Modify Workspace indicates if it is OK to modify the I Sycnrhonizer  canModifyWorkspace ISycnrhonizer canModifyWorkspace ISycnrhonizer
Returns the resource sync info for the given resource The resource sync info for the resource MUST ALREADY BE CACHED param resource the resource return the bytes containing the resource s sync info see cache Resource Sync For Children  cacheResourceSyncForChildren
Sets the resource sync info for the resource if null deletes it Parent must exist and must not be the workspace root The resource sync info for the resource MUST ALREADY BE CACHED The code can Modify Workspace code flag is used to indicate whether it is OK to modify I Sycnrhonizer entries for the given resource A value of code true code indicates that the client holds a scheduling rule that encompasses the resource and the workspace is open for modification param resource the resource param sync Bytes the bytes containing the new resource sync info param can Modify Workspace indicates if it is OK to modify the I Sycnrhonizer see cache Resource Sync For Children  canModifyWorkspace ISycnrhonizer syncBytes canModifyWorkspace ISycnrhonizer cacheResourceSyncForChildren
package abstract void set Cached Sync Bytes I Resource resource byte sync Bytes boolean can Modify Workspace throws CVS Exception package abstract String get Dirty Indicator I Resource resource throws CVS Exception  setCachedSyncBytes IResource syncBytes canModifyWorkspace CVSException getDirtyIndicator IResource CVSException
package abstract String get Dirty Indicator I Resource resource throws CVS Exception package abstract void set Dirty Indicator I Resource resource String indicator throws CVS Exception  getDirtyIndicator IResource CVSException setDirtyIndicator IResource CVSException
package abstract void set Dirty Indicator I Resource resource String indicator throws CVS Exception package abstract void flush Dirty Cache I Resource resource throws CVS Exception  setDirtyIndicator IResource CVSException flushDirtyCache IResource CVSException
package abstract void flush Dirty Cache I Resource resource throws CVS Exception package abstract boolean is Sync Info Loaded I Container parent throws CVS Exception  flushDirtyCache IResource CVSException isSyncInfoLoaded IContainer CVSException
Query the low level cache to see if the sync info for the provided container is loaded param container return boolean throws CVS Exception  CVSException
Query the low level cache to see if the sync info for the direct children of the provided container is loaded param container return boolean 
Indicate to the low level cache that the sync info for all it s direct children have been set so they match what is on disk param container 
param resource return boolean 
Return whether the cache also caches dirty state or recomputes it each time it is requested 

private String revision public Baserev Info String entry Line throws CVS Exception set Entry Line entry Line  BaserevInfo entryLine CVSException setEntryLine entryLine
public Baserev Info String name String revision this name name this revision revision  BaserevInfo
Return the entry line as it appears in the CVS Baserev file return String public String get Entry Line String Buffer result new String Buffer result append BASEREV PREFIX result append name result append Resource Sync Info SEPARATOR result append revision result append Resource Sync Info SEPARATOR return result to String  getEntryLine StringBuffer StringBuffer BASEREV_PREFIX ResourceSyncInfo ResourceSyncInfo toString
private void set Entry Line String entry Line throws CVS Exception if entry Line starts With BASEREV PREFIX entry Line entry Line substring 1 String strings Util parse Into Substrings entry Line Resource Sync Info SEPARATOR Accept either a length of 2 or 3 If the length is 3 we ignore the last string as per the CVS spec if strings length 2 strings length 3 throw new CVS Exception Policy bind Base Rev Info malformed Entry Line entry Line NON NLS 1 name strings 0 if name length 0 throw new CVS Exception Policy bind Base Rev Info malformed Entry Line entry Line NON NLS 1 revision strings 1 if revision length 0 throw new CVS Exception Policy bind Base Rev Info malformed Entry Line entry Line NON NLS 1  setEntryLine entryLine CVSException entryLine startsWith BASEREV_PREFIX entryLine entryLine parseIntoSubstrings entryLine ResourceSyncInfo CVSException BaseRevInfo malformedEntryLine entryLine CVSException BaseRevInfo malformedEntryLine entryLine CVSException BaseRevInfo malformedEntryLine entryLine
Returns the name return String public String get Name return name  getName
Returns the revision return String public String get Revision return revision  getRevision

public class CVS Base Resource Variant Tree extends Resource Variant Byte Store public void dispose Do nothing  CVSBaseResourceVariantTree ResourceVariantByteStore
public byte get Bytes I Resource resource throws Team Exception if resource get Type I Resource FILE For a file return the entry line byte bytes Eclipse Synchronizer get Instance get Sync Bytes resource if bytes null Use the base sync info i e no deletion or addition if Resource Sync Info is Deletion bytes bytes Resource Sync Info convert From Deletion bytes else if Resource Sync Info is Addition bytes bytes null return bytes else For a folder return the folder sync info bytes Folder Sync Info info Eclipse Synchronizer get Instance get Folder Sync I Container resource if info null return null return info get Bytes  getBytes IResource TeamException getType IResource EclipseSynchronizer getInstance getSyncBytes ResourceSyncInfo isDeletion ResourceSyncInfo convertFromDeletion ResourceSyncInfo isAddition FolderSyncInfo EclipseSynchronizer getInstance getFolderSync IContainer getBytes
public boolean is Variant Known I Resource resource throws Team Exception return get Bytes resource null  isVariantKnown IResource TeamException getBytes
return get Bytes resource null public boolean flush Bytes I Resource resource int depth throws Team Exception throw new Unsupported Operation Exception  getBytes flushBytes IResource TeamException UnsupportedOperationException
throw new Unsupported Operation Exception public boolean set Bytes I Resource resource byte bytes throws Team Exception throw new Unsupported Operation Exception  UnsupportedOperationException setBytes IResource TeamException UnsupportedOperationException
throw new Unsupported Operation Exception public boolean delete Bytes I Resource resource throws Team Exception throw new Unsupported Operation Exception  UnsupportedOperationException deleteBytes IResource TeamException UnsupportedOperationException
public I Resource members I Resource resource throws Team Exception if resource get Type I Resource FILE return new I Resource 0 return Eclipse Synchronizer get Instance members I Container resource  IResource IResource TeamException getType IResource IResource EclipseSynchronizer getInstance IContainer

public class CVS Descendant Resource Variant Byte Store extends Descendant Resource Variant Byte Store public CVS Descendant Resource Variant Byte Store Resource Variant Byte Store base Cache Persistant Resource Variant Byte Store remote Cache super base Cache remote Cache  CVSDescendantResourceVariantByteStore DescendantResourceVariantByteStore CVSDescendantResourceVariantByteStore ResourceVariantByteStore baseCache PersistantResourceVariantByteStore remoteCache baseCache remoteCache
protected boolean is Descendant I Resource resource byte base Bytes byte remote Bytes throws Team Exception if resource get Type I Resource FILE return true try return Resource Sync Info is Later Revision On Same Branch remote Bytes base Bytes catch CVS Exception e throw Team Exception as Team Exception e  isDescendant IResource baseBytes remoteBytes TeamException getType IResource ResourceSyncInfo isLaterRevisionOnSameBranch remoteBytes baseBytes CVSException TeamException asTeamException
public boolean set Bytes I Resource resource byte bytes throws Team Exception boolean changed super set Bytes resource bytes if resource get Type I Resource FILE get Bytes resource null parent Has Sync Bytes resource Log a warning if there is no sync bytes available for the resource s parent but there is valid sync bytes for the child CVS Provider Plugin log new Team Exception Policy bind Resource Synchronizer missing Parent Bytes On Set Persistant Resource Variant Byte Store get Remote Store get Sync Name to String resource get Full Path to String NON NLS 1 return changed  setBytes IResource TeamException setBytes getType IResource getBytes parentHasSyncBytes CVSProviderPlugin TeamException ResourceSynchronizer missingParentBytesOnSet PersistantResourceVariantByteStore getRemoteStore getSyncName toString getFullPath toString
Indicates whether the parent of the given local resource has sync bytes for its corresponding remote resource The parent bytes of a remote resource are required by CVS to create a handle to the remote resource protected boolean parent Has Sync Bytes I Resource resource throws Team Exception if resource get Type I Resource PROJECT return true return get Bytes resource get Parent null  parentHasSyncBytes IResource TeamException getType IResource getBytes getParent
see org eclipse team internal core subscribers caches Resource Variant Byte Store is Variant Known org eclipse core resources I Resource public boolean is Variant Known I Resource resource throws Team Exception return Persistant Resource Variant Byte Store get Remote Store is Variant Known resource  ResourceVariantByteStore isVariantKnown IResource isVariantKnown IResource TeamException PersistantResourceVariantByteStore getRemoteStore isVariantKnown
public I Status handle Resource Changes I Resource changed Resources boolean can Modify Workspace IMPORTANT NOTE This will throw exceptions if performed during the POST CHANGE delta phase List errors new Array List for int i 0 i changed Resources length i I Resource resource changed Resources i try if is InCVS Project resource continue if resource get Type I Resource FILE resource exists resource is Phantom byte remote Bytes get Bytes resource if remote Bytes null if is Variant Known resource The remote is known not to exist If the local resource is managed then this information is stale if get Base Store get Bytes resource null if can Modify Workspace flush Bytes resource I Resource DEPTH ZERO else The revision comparison will handle the stale sync bytes TODO Unless the remote is known not to exist see bug 52936 else byte local Bytes get Base Store get Bytes resource if local Bytes null is Descendant resource local Bytes remote Bytes if can Modify Workspace flush Bytes resource I Resource DEPTH ZERO else The remote byte store handles the stale sync bytes else if resource get Type I Resource FOLDER If the base has sync info for the folder purge the remote bytes if get Base Store get Bytes resource null can Modify Workspace flush Bytes resource I Resource DEPTH ZERO catch Team Exception e errors add e for Iterator iter errors iterator iter has Next Team Exception e Team Exception iter next CVS Provider Plugin log e return Status OK STATUS TODO  IStatus handleResourceChanges IResource changedResources canModifyWorkspace POST_CHANGE ArrayList changedResources IResource changedResources isInCVSProject getType IResource isPhantom remoteBytes getBytes remoteBytes isVariantKnown getBaseStore getBytes canModifyWorkspace flushBytes IResource DEPTH_ZERO localBytes getBaseStore getBytes localBytes isDescendant localBytes remoteBytes canModifyWorkspace flushBytes IResource DEPTH_ZERO getType IResource getBaseStore getBytes canModifyWorkspace flushBytes IResource DEPTH_ZERO TeamException hasNext TeamException TeamException CVSProviderPlugin OK_STATUS
private boolean is InCVS Project I Resource resource return Repository Provider get Provider resource get Project CVS Provider Plugin get Type Id null  isInCVSProject IResource RepositoryProvider getProvider getProject CVSProviderPlugin getTypeId

public CVS Resource Variant Tree Resource Variant Byte Store cache CVS Tag tag boolean cache File Contents Hint super cache this tag tag this cache File Contents Hint cache File Contents Hint  CVSResourceVariantTree ResourceVariantByteStore CVSTag cacheFileContentsHint cacheFileContentsHint cacheFileContentsHint
see org eclipse team core subscribers Refresh Operation get Synchronization Cache public Resource Variant Byte Store get Byte Store return super get Byte Store  RefreshOperation getSynchronizationCache ResourceVariantByteStore getByteStore getByteStore
protected byte get Bytes I Resource local I Resource Variant remote throws Team Exception if remote null return super get Bytes local remote else if local get Type I Resource FOLDER If there is no remote use the local sync for the folder return get Base Bytes I Container local get Tag local return null  getBytes IResource IResourceVariant TeamException getBytes getType IResource getBaseBytes IContainer getTag
protected I Resource Variant fetch Members I Resource Variant remote I Progress Monitor progress throws Team Exception ICVS Remote Resource children remote null ICVS Remote Resource Remote Resource remote members progress new ICVS Remote Resource 0 I Resource Variant result new I Resource Variant children length for int i 0 i children length i result i I Resource Variant children i return result  IResourceVariant fetchMembers IResourceVariant IProgressMonitor TeamException ICVSRemoteResource ICVSRemoteResource RemoteResource ICVSRemoteResource IResourceVariant IResourceVariant IResourceVariant
protected I Resource Variant fetch Variant I Resource resource int depth I Progress Monitor monitor throws Team Exception TODO we are currently ignoring the depth parameter because the build remote tree is by default deep return I Resource Variant CVS Workspace Root get Remote Tree resource get Tag resource cache File Contents Hint monitor  IResourceVariant fetchVariant IResource IProgressMonitor TeamException IResourceVariant CVSWorkspaceRoot getRemoteTree getTag cacheFileContentsHint
public I Resource collect Changes I Resource local I Resource Variant remote int depth I Progress Monitor monitor throws Team Exception return super collect Changes local remote depth monitor  IResource collectChanges IResource IResourceVariant IProgressMonitor TeamException collectChanges
see org eclipse team internal core subscribers caches I Resource Variant Tree roots public I Resource roots return subscriber roots  IResourceVariantTree IResource
public I Resource Variant get Resource Variant I Resource resource throws Team Exception byte remote Bytes get Byte Store get Bytes resource if remote Bytes null There is no remote handle for this resource return null else if resource get Type I Resource FILE byte parent Bytes get Parent Bytes resource if parent Bytes null I Project project resource get Project if project exists Repository Provider get Provider project CVS Provider Plugin get Type Id null CVS Provider Plugin log new CVS Exception Policy bind Resource Synchronizer missing Parent Bytes On Get get Sync Name get Byte Store to String resource get Full Path to String NON NLS 1 Assume there is no remote and the problem is a programming error return null return Remote File from Bytes resource remote Bytes parent Bytes else return Remote Folder from Bytes resource remote Bytes  IResourceVariant getResourceVariant IResource TeamException remoteBytes getByteStore getBytes remoteBytes getType IResource parentBytes getParentBytes parentBytes IProject getProject RepositoryProvider getProvider CVSProviderPlugin getTypeId CVSProviderPlugin CVSException ResourceSynchronizer missingParentBytesOnGet getSyncName getByteStore toString getFullPath toString RemoteFile fromBytes remoteBytes parentBytes RemoteFolder fromBytes remoteBytes
private String get Sync Name Resource Variant Byte Store cache if cache instanceof Persistant Resource Variant Byte Store return Persistant Resource Variant Byte Store cache get Sync Name to String return cache get Class get Name  getSyncName ResourceVariantByteStore PersistantResourceVariantByteStore PersistantResourceVariantByteStore getSyncName toString getClass getName
private byte get Parent Bytes I Resource resource throws Team Exception I Container parent resource get Parent byte bytes get Byte Store get Bytes parent if bytes null bytes get Base Bytes parent get Tag resource return bytes  getParentBytes IResource TeamException IContainer getParent getByteStore getBytes getBaseBytes getTag
private byte get Base Bytes I Container parent CVS Tag tag throws CVS Exception byte bytes Look locally for the folder bytes ICVS Folder local CVS Workspace Root getCVS Folder For parent Folder Sync Info info local get Folder Sync Info if info null bytes null else Use the folder sync from the workspace and the tag from the store Folder Sync Info new Info new Folder Sync Info info get Repository info get Root tag false bytes new Info get Bytes return bytes  getBaseBytes IContainer CVSTag CVSException ICVSFolder CVSWorkspaceRoot getCVSFolderFor FolderSyncInfo getFolderSyncInfo FolderSyncInfo newInfo FolderSyncInfo getRepository getRoot newInfo getBytes
private boolean has Local Sync Info I Container folder ICVS Folder local CVS Workspace Root getCVS Folder For folder try return local get Folder Sync Info null catch CVS Exception e Say that there is sync info and let the failure occur elsewhere return true  hasLocalSyncInfo IContainer ICVSFolder CVSWorkspaceRoot getCVSFolderFor getFolderSyncInfo CVSException
public CVS Tag get Tag I Resource resource return tag  CVSTag getTag IResource
Dispose of the underlying byte store public void dispose get Byte Store dispose  getByteStore
protected boolean set Variant I Resource local I Resource Variant remote throws Team Exception if local get Type I Resource FOLDER remote null has Local Sync Info I Folder local has Local Sync Info local get Parent Manage the folder locally since folders exist in all versions etc Use the info from the remote except get the tag from the locla parent CVS Tag tag CVS Workspace Root getCVS Folder For local get Parent get Folder Sync Info get Tag Folder Sync Info info Folder Sync Info get Folder Sync Info remote as Bytes Folder Sync Info new Info new Folder Sync Info info get Repository info get Root tag info get Is Static ICVS Folder cvs Folder CVS Workspace Root getCVS Folder For I Folder local cvs Folder set Folder Sync Info new Info boolean changed super set Variant local remote if local get Type I Resource FILE get Byte Store get Bytes local null parent Has Sync Bytes local Log a warning if there is no sync bytes available for the resource s parent but there is valid sync bytes for the child CVS Provider Plugin log new Team Exception Policy bind Resource Synchronizer missing Parent Bytes On Set get Sync Name get Byte Store local get Full Path to String NON NLS 1 return changed  setVariant IResource IResourceVariant TeamException getType IResource hasLocalSyncInfo IFolder hasLocalSyncInfo getParent CVSTag CVSWorkspaceRoot getCVSFolderFor getParent getFolderSyncInfo getTag FolderSyncInfo FolderSyncInfo getFolderSyncInfo asBytes FolderSyncInfo newInfo FolderSyncInfo getRepository getRoot getIsStatic ICVSFolder cvsFolder CVSWorkspaceRoot getCVSFolderFor IFolder cvsFolder setFolderSyncInfo newInfo setVariant getType IResource getByteStore getBytes parentHasSyncBytes CVSProviderPlugin TeamException ResourceSynchronizer missingParentBytesOnSet getSyncName getByteStore getFullPath toString
private boolean parent Has Sync Bytes I Resource resource throws Team Exception if resource get Type I Resource PROJECT return true return get Parent Bytes resource null  parentHasSyncBytes IResource TeamException getType IResource getParentBytes
protected I Resource collected Members I Resource local I Resource members throws Team Exception Look for resources that have sync bytes but are not in the resources we care about I Resource resources get Stored Members local List children new Array List List changed Resources new Array List children add All Arrays as List members for int i 0 i resources length i I Resource resource resources i if children contains resource These sync bytes are stale Purge them flush Variants resource I Resource DEPTH INFINITE changed Resources add resource return I Resource changed Resources to Array new I Resource changed Resources size  IResource collectedMembers IResource IResource TeamException IResource getStoredMembers ArrayList changedResources ArrayList addAll asList IResource flushVariants IResource DEPTH_INFINITE changedResources IResource changedResources toArray IResource changedResources
Return all the members of that have resource variant information associated with them such as members that are explicitly flagged as not having a resource variant This list is used by the collection algorithm to flush variants for which there is no local and no remote param local the locla resource return the local children that have resource variant information cached throws Team Exception private I Resource get Stored Members I Resource local throws Team Exception try if local get Type I Resource FILE local exists local is Phantom I Resource all Children I Container local members true include phantoms List children With Sync Bytes new Array List for int i 0 i all Children length i I Resource resource all Children i if get Byte Store get Bytes resource null children With Sync Bytes add resource return I Resource children With Sync Bytes to Array new I Resource children With Sync Bytes size catch Core Exception e throw Team Exception as Team Exception e return new I Resource 0  TeamException IResource getStoredMembers IResource TeamException getType IResource isPhantom IResource allChildren IContainer childrenWithSyncBytes ArrayList allChildren IResource allChildren getByteStore getBytes childrenWithSyncBytes IResource childrenWithSyncBytes toArray IResource childrenWithSyncBytes CoreException TeamException asTeamException IResource
protected I Resource refresh I Resource resource int depth I Progress Monitor monitor throws Team Exception I Resource changed Resources null monitor begin Task null 100 Wait up to 10 seconds for build to finish int count 0 while count 10 is Job In Family Running Resources Plugin FAMILY AUTO BUILD is Job In Family Running Resources Plugin FAMILY MANUAL BUILD try Thread sleep 1000 catch Interrupted Exception e Conitinue count Policy check Canceled monitor I Scheduling Rule rule get Scheduling Rule resource try Platform get Job Manager begin Rule rule Policy sub Monitor For monitor 1 if resource get Project is Accessible The project is closed so silently skip it return new I Resource 0 changed Resources super refresh resource depth Policy sub Monitor For monitor 99 finally Platform get Job Manager end Rule rule monitor done if changed Resources null return new I Resource 0 return changed Resources  IResource IResource IProgressMonitor TeamException IResource changedResources beginTask isJobInFamilyRunning ResourcesPlugin FAMILY_AUTO_BUILD isJobInFamilyRunning ResourcesPlugin FAMILY_MANUAL_BUILD InterruptedException checkCanceled ISchedulingRule getSchedulingRule getJobManager beginRule subMonitorFor getProject isAccessible IResource changedResources subMonitorFor getJobManager endRule changedResources IResource changedResources
Return the scheduling rule that should be obtained for the given resource This method is invoked from code refresh I Resource int I Progress Monitor code By default the resource s project is returned Subclasses may override param resource the resource being refreshed return a scheduling rule or code null code protected I Scheduling Rule get Scheduling Rule I Resource resource return resource get Project  IResource IProgressMonitor ISchedulingRule getSchedulingRule IResource getProject
private boolean is Job In Family Running Object family Job jobs Platform get Job Manager find family if jobs null jobs length 0 for int i 0 i jobs length i Job job jobs i if job get State Job NONE return true return false  isJobInFamilyRunning getJobManager getState

public class Deferred Resource Change Handler extends Background Event Handler public Deferred Resource Change Handler super Policy bind Deferred Resource Change Handler 0 Policy bind Deferred Resource Change Handler 1 NON NLS 1 NON NLS 2  DeferredResourceChangeHandler BackgroundEventHandler DeferredResourceChangeHandler DeferredResourceChangeHandler DeferredResourceChangeHandler
protected void process Event Event event I Progress Monitor monitor throws Team Exception int type event get Type switch type case IGNORE FILE CHANGED changed Ignore Files add event get Resource case RECREATED CVS RESOURCE recreated Resources add event get Resource  processEvent IProgressMonitor TeamException getType IGNORE_FILE_CHANGED changedIgnoreFiles getResource RECREATED_CVS_RESOURCE recreatedResources getResource
private I Container get Parents Set files Set parents new Hash Set for Iterator iter files iterator iter has Next I File file I File iter next parents add file get Parent return I Container parents to Array new I Container parents size  IContainer getParents HashSet hasNext IFile IFile getParent IContainer toArray IContainer
public void ignore File Changed I File file queue Event new Event file IGNORE FILE CHANGED I Resource DEPTH ZERO false  ignoreFileChanged IFile queueEvent IGNORE_FILE_CHANGED IResource DEPTH_ZERO
The resource has been added and has sync info that has not been written to disk Queue an event to ensure that the CVS directory files are written to disk param resource the recently add resource public void recreated I Resource resource queue Event new Event resource RECREATED CVS RESOURCE I Resource DEPTH ZERO false  IResource queueEvent RECREATED_CVS_RESOURCE IResource DEPTH_ZERO
protected boolean do Dispatch Events I Progress Monitor monitor throws Team Exception Handle ignore file changes boolean work Done changed Ignore Files is Empty recreated Resources is Empty Eclipse Synchronizer get Instance ignore Files Changed get Parents changed Ignore Files changed Ignore Files clear Handle recreations by project to reduce locking granularity Map recreations get Resources By Project I Resource recreated Resources to Array new I Resource recreated Resources size recreated Resources clear for Iterator iter recreations values iterator iter has Next List resources List iter next try Eclipse Synchronizer get Instance resources Recreated I Resource resources to Array new I Resource resources size monitor catch CVS Exception e Log and continue CVS Provider Plugin log e return work Done  doDispatchEvents IProgressMonitor TeamException workDone changedIgnoreFiles isEmpty recreatedResources isEmpty EclipseSynchronizer getInstance ignoreFilesChanged getParents changedIgnoreFiles changedIgnoreFiles getResourcesByProject IResource recreatedResources toArray IResource recreatedResources recreatedResources hasNext EclipseSynchronizer getInstance resourcesRecreated IResource toArray IResource CVSException CVSProviderPlugin workDone
private Map get Resources By Project I Resource resources Map result new Hash Map for int i 0 i resources length i I Resource resource resources i I Project project resource get Project List project Resources List result get project if project Resources null project Resources new Array List result put project project Resources project Resources add resource return result  getResourcesByProject IResource HashMap IResource IProject getProject projectResources projectResources projectResources ArrayList projectResources projectResources

Construct a folder sync object param repo the relative path of this folder in the repository cannot be code null code param root the location of the repository cannot be code null code param tag the tag set for the folder or code null code if there is no tag applied param is Static to indicate is only part of the folder was fetched from the server public Folder Sync Info String repo String root CVS Tag tag boolean is Static Assert is Not Null repo Assert is Not Null root this repository repo intern the root so that caching of Folder Sync Infos for folders will use less space this root root intern ensure Repository Relative To Root this is Static is Static set Tag tag  isStatic FolderSyncInfo CVSTag isStatic isNotNull isNotNull FolderSyncInfos ensureRepositoryRelativeToRoot isStatic isStatic setTag
Method ensure Repository Relative To Root private void ensure Repository Relative To Root String root Dir try root Dir get Root Directory catch CVS Exception e Ignore the for now Using the root will show the error to the user return if repository starts With root Dir repository repository substring root Dir length if repository starts With Resource Sync Info SEPARATOR repository repository substring Resource Sync Info SEPARATOR length  ensureRepositoryRelativeToRoot ensureRepositoryRelativeToRoot rootDir rootDir getRootDirectory CVSException startsWith rootDir rootDir startsWith ResourceSyncInfo ResourceSyncInfo
public boolean equals Object other if other this return true if other instanceof Folder Sync Info return false Folder Sync Info sync Info Folder Sync Info other if get Root equals sync Info get Root return false if get Repository equals sync Info get Repository return false if get Is Static sync Info get Is Static return false if get Tag null sync Info get Tag null if get Tag null sync Info get Tag null sync Info get Tag get Type CVS Tag HEAD return false else if sync Info get Tag null get Tag null get Tag get Type CVS Tag HEAD return false else if get Tag equals sync Info get Tag return false return true  FolderSyncInfo FolderSyncInfo syncInfo FolderSyncInfo getRoot syncInfo getRoot getRepository syncInfo getRepository getIsStatic syncInfo getIsStatic getTag syncInfo getTag getTag syncInfo getTag syncInfo getTag getType CVSTag syncInfo getTag getTag getTag getType CVSTag getTag syncInfo getTag
Gets the root cannot be code null return Returns a String public String get Root return root  getRoot
Answer the directory portion of the root For example if root pserver user host home user repo then home user repo is return p The root does not neccesarily contain a user name in which cas the format is pserver host home user repo return String private String get Root Directory throws CVS Exception try String root get Root int index root index Of if index 1 If the username is mising we have to find the third index root index Of if index 0 The method is optional so if it s not there there is only one index root index Of index 1 index root index Of index 1 else If the username was there we find the first past the index root index Of index 1 index strip off a leading port if there is one char c root char At index while Character is Digit c c root char At index return root substring index catch Index Out Of Bounds Exception e throw new CVS Exception Policy bind FolderSyncInfo Maleformed root 4 NON NLS 1  getRootDirectory CVSException getRoot indexOf indexOf indexOf indexOf indexOf charAt isDigit charAt IndexOutOfBoundsException CVSException FolderSyncInfo_Maleformed_root_4
Gets the tag may be code null code return Returns a String public CVS Entry Line Tag get Tag return tag  CVSEntryLineTag getTag
Gets the repository may be code null code return Returns a String public String get Repository return repository  getRepository
Gets the is Static return Returns a boolean public boolean get Is Static return is Static  isStatic getIsStatic isStatic
Answers a full path to the folder on the remote server This by appending the repository to the repository location speficied in the root Example root pserver user host home user repo repository folder1 folder2 Returns home users repo folder1 folder2 Note CVS supports repository root directories that end in a slash For these directories the remote location must contain two slashes between the root directory and the rest of the path For example root pserver user host home user repo repository folder1 folder2 must return home users repo folder1 folder2 return the full path of this folder on the server throws a CVS Exception if the root or repository is malformed public String get Remote Location throws CVS Exception return get Root Directory Resource Sync Info SEPARATOR get Repository NON NLS 1  CVSException getRemoteLocation CVSException getRootDirectory ResourceSyncInfo getRepository
same hash Code public int hash Code return get Root hash Code get Repository hash Code  hashCode hashCode getRoot hashCode getRepository hashCode
Sets the tag for the folder param tag The tag to set protected void set Tag CVS Tag tag if tag null tag equals CVS Tag DEFAULT this tag null else this tag new CVS Entry Line Tag tag  setTag CVSTag CVSTag CVSEntryLineTag
see Object to String public String to String return get Root get Repository get Tag NON NLS 1 NON NLS 2  toString toString getRoot getRepository getTag
public Mutable Folder Sync Info clone Mutable Mutable Folder Sync Info new Sync new Mutable Folder Sync Info this return new Sync  MutableFolderSyncInfo cloneMutable MutableFolderSyncInfo newSync MutableFolderSyncInfo newSync
Return true if this Folder Sync Info is mapped to the same remote directory as the other Folder Sync Info passed as a parameter param remote Info return public boolean is Same Mapping Folder Sync Info other if other null return false return this get Root equals other get Root this get Repository equals other get Repository  FolderSyncInfo FolderSyncInfo remoteInfo isSameMapping FolderSyncInfo getRoot getRoot getRepository getRepository
Convert a Folder Sync Info into a byte array that can be stored in the workspace synchronizer public byte get Bytes throws CVS Exception Byte Array Output Stream out new Byte Array Output Stream Data Output Stream dos new Data Output Stream out try dos writeUTF get Root dos writeUTF get Repository CVS Entry Line Tag t get Tag if t null dos writeUTF NON NLS 1 else dos writeUTF t to String dos write Boolean get Is Static dos close catch IO Exception e throw CVS Exception wrap Exception e return out to Byte Array  FolderSyncInfo getBytes CVSException ByteArrayOutputStream ByteArrayOutputStream DataOutputStream DataOutputStream getRoot getRepository CVSEntryLineTag getTag toString writeBoolean getIsStatic IOException CVSException wrapException toByteArray
Convert a byte array that was created using get Bytes Folder Sync Info into a Folder Sync Info public static Folder Sync Info get Folder Sync Info byte bytes throws CVS Exception Byte Array Input Stream in new Byte Array Input Stream bytes Data Input Stream dis new Data Input Stream in String root String repository CVS Entry Line Tag tag boolean is Static try root dis readUTF repository dis readUTF String tag Name dis readUTF if tag Name length 0 tag null else tag new CVS Entry Line Tag tag Name is Static dis read Boolean catch IO Exception e throw CVS Exception wrap Exception e return new Folder Sync Info repository root tag is Static  getBytes FolderSyncInfo FolderSyncInfo FolderSyncInfo getFolderSyncInfo CVSException ByteArrayInputStream ByteArrayInputStream DataInputStream DataInputStream CVSEntryLineTag isStatic tagName tagName CVSEntryLineTag tagName isStatic readBoolean IOException CVSException wrapException FolderSyncInfo isStatic
Return whether the local directory is mapped to an existing remote directory or is just a local placeholder for child folders a return type of code true code indicates that the local folder is not mapped to a remote folder return whether the directory is a local placeholder public boolean is Virtual Directory return get Repository equals VIRTUAL DIRECTORY  isVirtualDirectory getRepository VIRTUAL_DIRECTORY

Map resources new Hash Map public Multi Tag Resource Variant Tree Resource Variant Byte Store cache boolean cache File Contents Hint super cache null cache File Contents Hint  HashMap MultiTagResourceVariantTree ResourceVariantByteStore cacheFileContentsHint cacheFileContentsHint
public void add Resource I Resource resource CVS Tag tag Assert is Not Null resource Assert is Not Null tag resources put resource tag  addResource IResource CVSTag isNotNull isNotNull
see org eclipse team internal ccvs core syncinfo CVS Resource Variant Tree get Tag org eclipse core resources I Resource public CVS Tag get Tag I Resource resource return CVS Tag resources get resource  CVSResourceVariantTree getTag IResource CVSTag getTag IResource CVSTag

Constructor Mutable Folder Sync Info param folder Sync Info public Mutable Folder Sync Info Folder Sync Info info this info get Repository info get Root info get Tag info get Is Static  MutableFolderSyncInfo folderSyncInfo MutableFolderSyncInfo FolderSyncInfo getRepository getRoot getTag getIsStatic
Constructor for Mutable Folder Sync Info param repo param root param tag param is Static public Mutable Folder Sync Info String repo String root CVS Tag tag boolean is Static super repo root tag is Static  MutableFolderSyncInfo isStatic MutableFolderSyncInfo CVSTag isStatic isStatic
see org eclipse team internal ccvs core syncinfo Folder Sync Info set Tag org eclipse team internal ccvs core CVS Tag public void set Tag CVS Tag tag super set Tag tag  FolderSyncInfo setTag CVSTag setTag CVSTag setTag
Method set Repository param string public void set Repository String repository this repository repository  setRepository setRepository

protected Mutable Resource Sync Info Resource Sync Info info this name info get Name set Revision info get Revision set Tag info get Tag this permissions info get Permissions this time Stamp info get Time Stamp this is Directory info is Directory this keyword Mode info get Keyword Mode this is Deleted info is Deleted if info is Merged With Conflicts set Sync Type TYPE MERGED WITH CONFLICTS else if info is Merged set Sync Type TYPE MERGED else set Sync Type TYPE REGULAR  MutableResourceSyncInfo ResourceSyncInfo getName setRevision getRevision setTag getTag getPermissions timeStamp getTimeStamp isDirectory isDirectory keywordMode getKeywordMode isDeleted isDeleted isMergedWithConflicts setSyncType TYPE_MERGED_WITH_CONFLICTS isMerged setSyncType TYPE_MERGED setSyncType TYPE_REGULAR
Creates a default sync info if revision is code null code then the sync info will be considered in the newly added state public Mutable Resource Sync Info String name String revision Assert is Not Null name this name name set Revision revision this reported false this changed false  MutableResourceSyncInfo isNotNull setRevision
void set Resource Info Type int type this sync Type type  setResourceInfoType syncType
Sets the revision param revision The revision to set public void set Revision String revision super set Revision revision  setRevision setRevision
Sets the time Stamp param time Stamp The time Stamp to set public void set Time Stamp Date time Stamp this time Stamp time Stamp this changed true  timeStamp timeStamp timeStamp setTimeStamp timeStamp timeStamp timeStamp
Sets the time Stamp param time Stamp The time Stamp to set public void set Time Stamp Date time Stamp boolean clear Merged set Time Stamp time Stamp if clear Merged set Sync Type TYPE REGULAR  timeStamp timeStamp timeStamp setTimeStamp timeStamp clearMerged setTimeStamp timeStamp clearMerged setSyncType TYPE_REGULAR
Sets the keyword Mode param keyword Mode The keyword Mode to set public void set Keyword Mode K Subst Option keyword Mode this keyword Mode keyword Mode this changed true  keywordMode keywordMode keywordMode setKeywordMode KSubstOption keywordMode keywordMode keywordMode
Sets the tag param tag The tag to set public void set Tag CVS Tag tag super set Tag tag  setTag CVSTag setTag
Sets the permissions param permissions The permissions to set public void set Permissions String permissions this permissions permissions  setPermissions
Sets the deleted state param is Deleted The deleted state of this resource sync public void set Deleted boolean is Deleted this is Deleted is Deleted this changed true  isDeleted setDeleted isDeleted isDeleted isDeleted
Sets to the added state The timestamp and other are cleared public void set Added set Revision ADDED REVISION this changed true  setAdded setRevision ADDED_REVISION
Sets that this resource sync is a result of a non conflicting merge public void set Merged if already merged state then ignore if sync Type TYPE REGULAR this sync Type TYPE MERGED this changed true  setMerged syncType TYPE_REGULAR syncType TYPE_MERGED
public boolean needs Reporting return changed reported  needsReporting
public void reported this reported true 
see org eclipse team internal ccvs core syncinfo Resource Sync Info set Entry Line java lang String public void set Entry Line String entry Line throws CVS Exception super set Entry Line entry Line this changed true  ResourceSyncInfo setEntryLine setEntryLine entryLine CVSException setEntryLine entryLine

Constructor for setting all variables public Notify Info String filename char notification Type Date time Stamp char watches this filename filename this notification Type notification Type this time Stamp time Stamp this watches watches  NotifyInfo notificationType timeStamp notificationType notificationType timeStamp timeStamp
Constructor for a line from the CVS Notify file param line public Notify Info I Container parent String line throws CVS Exception ICVS Folder cvs Folder CVS Workspace Root getCVS Folder For parent String strings Util parse Into Substrings line Resource Sync Info SEPARATOR if strings length 4 throw new CVS Exception Policy bind Notify Info Malformed Line line NON NLS 1 this filename strings 0 String type strings 1 if type length 1 throw new CVS Exception Policy bind Notify Info Malformed Notification Type line NON NLS 1 this notification Type type char At 0 String date strings 2 try this time Stamp CVS Date Formatter entry Line To Date date catch Parse Exception e throw new CVS Exception Policy bind Notify Info Malformed Notify Date line NON NLS 1 String watches String strings 3 if watches String length 0 this watches new char watches String length for int i 0 i watches String length i watches i watches String char At i else this watches null  NotifyInfo IContainer CVSException ICVSFolder cvsFolder CVSWorkspaceRoot getCVSFolderFor parseIntoSubstrings ResourceSyncInfo CVSException NotifyInfo MalformedLine CVSException NotifyInfo MalformedNotificationType notificationType charAt timeStamp CVSDateFormatter entryLineToDate ParseException CVSException NotifyInfo MalformedNotifyDate watchesString watchesString watchesString watchesString watchesString charAt
Answer a Sting formatted to be written to the CVS Notify file XXX NOTE This is a guess at the local format Need to obtain proper format return String public String get Notify Line String Buffer buffer new String Buffer buffer append get Name buffer append Resource Sync Info SEPARATOR buffer append notification Type buffer append Resource Sync Info SEPARATOR buffer append CVS Date Formatter date To Entry Line time Stamp buffer append Resource Sync Info SEPARATOR if watches null for int i 0 i watches length i char c watches i buffer append c return buffer to String  getNotifyLine StringBuffer StringBuffer getName ResourceSyncInfo notificationType ResourceSyncInfo CVSDateFormatter dateToEntryLine timeStamp ResourceSyncInfo toString
Answer a Sting formatted to be sent to the server return String public String get Server Line ICVS Folder parent throws CVS Exception String Buffer buffer new String Buffer buffer append notification Type buffer append TAB SEPARATOR buffer append get Server Timestamp buffer append TAB SEPARATOR buffer append get Host buffer append TAB SEPARATOR buffer append get Working Directory parent buffer append TAB SEPARATOR if watches null for int i 0 i watches length i char c watches i buffer append c return buffer to String  getServerLine ICVSFolder CVSException StringBuffer StringBuffer notificationType TAB_SEPARATOR getServerTimestamp TAB_SEPARATOR getHost TAB_SEPARATOR getWorkingDirectory TAB_SEPARATOR toString
Answer the timestamp in GMT format return String private String get Server Timestamp return CVS Date Formatter date To Notify Server time Stamp  getServerTimestamp CVSDateFormatter dateToNotifyServer timeStamp
Answer the working directory for the receiver s file The format is NOT device dependant i e s are used as the path separator return String private String get Working Directory ICVS Folder parent throws CVS Exception return parent getI Resource get Location to String  getWorkingDirectory ICVSFolder CVSException getIResource getLocation toString
Answer the host name of the client machine return String private String get Host throws CVS Exception try return Inet Address get Local Host get Host Name catch Unknown Host Exception e throw CVS Exception wrap Exception e  getHost CVSException InetAddress getLocalHost getHostName UnknownHostException CVSException wrapException
Answer the name of the file associated with the notification return String public String get Name return filename  getName
Answer the notification type associated with the notification return char public char get Notification Type return notification Type  getNotificationType notificationType

This is a placeholder rule used to indicate that no scheduling rule is needed internal use only static final I Scheduling Rule NULL SCHEDULING RULE new I Scheduling Rule public boolean contains I Scheduling Rule rule return false  ISchedulingRule NULL_SCHEDULING_RULE ISchedulingRule ISchedulingRule
return false public boolean is Conflicting I Scheduling Rule rule return false  isConflicting ISchedulingRule
private I Flush Operation operation private List rules new Array List public Thread Info I Flush Operation operation this operation operation  IFlushOperation ArrayList ThreadInfo IFlushOperation
Push a scheduling rule onto the stack for this thread and acquire the rule if it is not the workspace root param resource public I Scheduling Rule push Rule I Scheduling Rule resource I Progress Monitor monitor The scheduling rule is either the project or the resource s parent I Scheduling Rule rule get Rule For Resoure resource if rule NULL SCHEDULING RULE boolean success false try Platform get Job Manager begin Rule rule monitor add Rule rule success true finally if success The begin was cancelled or some other problem occurred Free the scheduling rule so the clients of Reentrant Lock don t need to do an end Rule when the operation is cancelled try Platform get Job Manager end Rule rule catch Runtime Exception e1 Log and ignore so the original exception is not lost CVS Provider Plugin log CVS Exception wrap Exception e1 else Record the fact that we didn t push a rule so we can match it when we pop add Rule rule return rule  ISchedulingRule pushRule ISchedulingRule IProgressMonitor ISchedulingRule getRuleForResoure NULL_SCHEDULING_RULE getJobManager beginRule addRule ReentrantLock endRule getJobManager endRule RuntimeException CVSProviderPlugin CVSException wrapException addRule
Pop the scheduling rule from the stack and release it if it is not the workspace root Flush any changed sync info to disk if necessary A flush is necessary if the stack is empty or if the top most non null scheduling rule was popped as a result of this operation param monitor throws CVS Exception public void pop Rule I Scheduling Rule rule I Progress Monitor monitor throws CVS Exception try if is Flush Required flush monitor finally I Scheduling Rule stacked Rule remove Rule if rule null rule NULL SCHEDULING RULE Assert is True stacked Rule equals rule end for resource rule does not match stacked rule stacked Rule NON NLS 1 NON NLS 2 NON NLS 3 if rule NULL SCHEDULING RULE Platform get Job Manager end Rule rule  CVSException popRule ISchedulingRule IProgressMonitor CVSException isFlushRequired ISchedulingRule stackedRule removeRule NULL_SCHEDULING_RULE isTrue stackedRule stackedRule NULL_SCHEDULING_RULE getJobManager endRule
private I Scheduling Rule get Rule For Resoure I Scheduling Rule resource Rule I Scheduling Rule rule if resource Rule instanceof I Resource I Resource resource I Resource resource Rule if resource get Type I Resource ROOT Never lock the whole workspace rule NULL SCHEDULING RULE else if resource get Type I Resource PROJECT rule resource else rule resource get Parent else if resource Rule instanceof Multi Rule Create a Multi Rule for all projects from the given rule I Scheduling Rule rules Multi Rule resource Rule get Children Set projects new Hash Set for int i 0 i rules length i I Scheduling Rule child Rule rules i if child Rule instanceof I Resource projects add I Resource child Rule get Project if projects is Empty rule NULL SCHEDULING RULE else if projects size 1 rule I Scheduling Rule projects iterator next else rule new Multi Rule I Scheduling Rule projects to Array new I Scheduling Rule projects size else Rule is not associated with resources so ignore it rule NULL SCHEDULING RULE return rule  ISchedulingRule getRuleForResoure ISchedulingRule resourceRule ISchedulingRule resourceRule IResource IResource IResource resourceRule getType IResource NULL_SCHEDULING_RULE getType IResource getParent resourceRule MultiRule MultiRule ISchedulingRule MultiRule resourceRule getChildren HashSet ISchedulingRule childRule childRule IResource IResource childRule getProject isEmpty NULL_SCHEDULING_RULE ISchedulingRule MultiRule ISchedulingRule toArray ISchedulingRule NULL_SCHEDULING_RULE
Return code true code if we are still nested in an acquire for this thread return public boolean is Nested return rules is Empty  isNested isEmpty
return rules is Empty public void add Changed Resource I Resource resource changed Resources add resource  isEmpty addChangedResource IResource changedResources
changed Resources add resource public void add Changed Folder I Container container changed Folders add container  changedResources addChangedFolder IContainer changedFolders
changed Folders add container public boolean is Empty return changed Folders is Empty changed Resources is Empty  changedFolders isEmpty changedFolders isEmpty changedResources isEmpty
return changed Folders is Empty changed Resources is Empty public I Resource get Changed Resources return I Resource changed Resources to Array new I Resource changed Resources size  changedFolders isEmpty changedResources isEmpty IResource getChangedResources IResource changedResources toArray IResource changedResources
return I Resource changed Resources to Array new I Resource changed Resources size public I Container get Changed Folders return I Container changed Folders to Array new I Container changed Folders size  IResource changedResources toArray IResource changedResources IContainer getChangedFolders IContainer changedFolders toArray IContainer changedFolders
public void flush I Progress Monitor monitor throws CVS Exception try operation flush this monitor catch Out Of Memory Error e throw e catch Error e handle Aborted Flush e throw e catch Runtime Exception e handle Aborted Flush e throw e finally We have to clear the resources no matter what since the next attempt to fluch may not have an appropriate scheduling rule changed Resources clear changed Folders clear  IProgressMonitor CVSException OutOfMemoryError handleAbortedFlush RuntimeException handleAbortedFlush changedResources changedFolders
private boolean is Flush Required return rules size 1 remaining Rules Are Null  isFlushRequired remainingRulesAreNull
private boolean remaining Rules Are Null for int i 0 i rules size 1 i I Scheduling Rule rule I Scheduling Rule rules get i if rule NULL SCHEDULING RULE return false return true  remainingRulesAreNull ISchedulingRule ISchedulingRule NULL_SCHEDULING_RULE
return true private void handle Aborted Flush Throwable t CVS Provider Plugin log new CVS Status I Status ERROR Policy bind Reentrant Lock 9 t NON NLS 1  handleAbortedFlush CVSProviderPlugin CVSStatus IStatus ReentrantLock
CVS Provider Plugin log new CVS Status I Status ERROR Policy bind Reentrant Lock 9 t NON NLS 1 private void add Rule I Scheduling Rule rule rules add rule  CVSProviderPlugin CVSStatus IStatus ReentrantLock addRule ISchedulingRule
rules add rule private I Scheduling Rule remove Rule return I Scheduling Rule rules remove rules size 1  ISchedulingRule removeRule ISchedulingRule
public boolean rule Contains I Resource resource for Iterator iter rules iterator iter has Next I Scheduling Rule rule I Scheduling Rule iter next if rule NULL SCHEDULING RULE rule contains resource return true return false  ruleContains IResource hasNext ISchedulingRule ISchedulingRule NULL_SCHEDULING_RULE
public interface I Flush Operation public void flush Thread Info info I Progress Monitor monitor throws CVS Exception  IFlushOperation ThreadInfo IProgressMonitor CVSException
private Thread Info get Thread Info Thread this Thread Thread current Thread synchronized infos Thread Info info Thread Info infos get this Thread return info  ThreadInfo getThreadInfo thisThread currentThread ThreadInfo ThreadInfo thisThread
private Thread Info get Thread Info I Resource resource synchronized infos for Iterator iter infos values iterator iter has Next Thread Info info Thread Info iter next if info rule Contains resource return info return null  ThreadInfo getThreadInfo IResource hasNext ThreadInfo ThreadInfo ruleContains
public I Scheduling Rule acquire I Scheduling Rule resource Rule I Flush Operation operation I Progress Monitor monitor Thread Info info get Thread Info boolean added false synchronized infos if info null info new Thread Info operation Thread this Thread Thread current Thread infos put this Thread info added true if DEBUG System out println this Thread get Name acquired CVS lock on resource Rule NON NLS 1 NON NLS 2 try return info push Rule resource Rule monitor catch Operation Canceled Exception e The operation was cancelled If this is the outermost acquire then remove the info that was just added if added synchronized infos infos remove Thread current Thread throw e  ISchedulingRule ISchedulingRule resourceRule IFlushOperation IProgressMonitor ThreadInfo getThreadInfo ThreadInfo thisThread currentThread thisThread thisThread getName resourceRule pushRule resourceRule OperationCanceledException currentThread
Release the lock held on any resources by this thread The provided rule must be identical to the rule returned by the corresponding acquire If the rule for the release is non null and all remaining rules held by the lock are null the the flush operation provided in the acquire method will be executed public void release I Scheduling Rule rule I Progress Monitor monitor throws CVS Exception Thread Info info get Thread Info Assert is Not Null info Unmatched acquire release NON NLS 1 Assert is True info is Nested Unmatched acquire release NON NLS 1 info pop Rule rule monitor synchronized infos if info is Nested Thread this Thread Thread current Thread if DEBUG System out println this Thread get Name released CVS lock NON NLS 1 NON NLS 2 infos remove this Thread  ISchedulingRule IProgressMonitor CVSException ThreadInfo getThreadInfo isNotNull isTrue isNested popRule isNested thisThread currentThread thisThread getName thisThread
public void folder Changed I Container folder Thread Info info get Thread Info Assert is Not Null info Folder changed outside of resource lock NON NLS 1 info add Changed Folder folder  folderChanged IContainer ThreadInfo getThreadInfo isNotNull addChangedFolder
public void resource Changed I Resource resource Thread Info info get Thread Info Assert is Not Null info Folder changed outside of resource lock NON NLS 1 info add Changed Resource resource  resourceChanged IResource ThreadInfo getThreadInfo isNotNull addChangedResource
Flush any changes accumulated by the lock so far public void flush I Progress Monitor monitor throws CVS Exception Thread Info info get Thread Info Assert is Not Null info Flush requested outside of resource lock NON NLS 1 info flush monitor  IProgressMonitor CVSException ThreadInfo getThreadInfo isNotNull
public boolean is Within Active Operation Scope I Resource resource synchronized infos return get Thread Info resource null  isWithinActiveOperationScope IResource getThreadInfo

type of sync protected int sync Type TYPE REGULAR protected Resource Sync Info Added for use by subclasses  syncType TYPE_REGULAR ResourceSyncInfo
public Resource Sync Info byte entry Line throws CVS Exception this new String entry Line null null  ResourceSyncInfo entryLine CVSException entryLine
Constructor to create a sync object from entry line formats The entry lines are parsed by this class The constructor can handle parsing entry lines from the server or from an entry file param entry Line the entry line e g new java 1 2 Fri Dec 07 00 17 52 2001 kb param permissions the file permission e g u rw g rw o r May be code null code param timestamp if not included in the entry line May be code null code exception CVS Exception is thrown if the entry cannot be parsed public Resource Sync Info String entry Line String permissions Date timestamp throws CVS Exception Assert is Not Null entry Line set Entry Line entry Line if permissions null this permissions permissions override the timestamp that may of been in entry Line In some cases the timestamp is not in the entry line e g receiving entry lines from the server versus reading them from the Entry file if timestamp null this time Stamp timestamp  entryLine CVSException ResourceSyncInfo entryLine CVSException isNotNull entryLine setEntryLine entryLine entryLine timeStamp
Constructor to create a resource sync object for a folder param name of the resource for which this sync state is associatied cannot be code null code public Resource Sync Info String name Assert is Not Null name this name name this is Directory true  ResourceSyncInfo isNotNull isDirectory
Answers if this sync information is for a folder in which case only a name is available return code true code if the sync information is for a folder and code false code if it is for a file public boolean is Directory return is Directory  isDirectory isDirectory
Answers if this sync information is for a resource that has been merged by the cvs server with conflicts and has not been modified yet relative to the given timestamp param other Timestamp is the timestamp of the file associated with this resource sync return code true code if the sync information is for a file that has been merged and code false code for folders and for files that have not been merged public boolean is Needs Merge Date other Timestamp return sync Type TYPE MERGED WITH CONFLICTS time Stamp equals other Timestamp  otherTimestamp isNeedsMerge otherTimestamp syncType TYPE_MERGED_WITH_CONFLICTS timeStamp otherTimestamp
Answers if this sync information is for a resource that has been merged with conflicts by the cvs server return code true code if the sync information is for a file that has been merged and code false code for folders and for files that have not been merged public boolean is Merged With Conflicts return sync Type TYPE MERGED WITH CONFLICTS  isMergedWithConflicts syncType TYPE_MERGED_WITH_CONFLICTS
Answers if this sync information is for a resource that has been merged by the cvs server return code true code if the sync information is for a file that has been merged and code false code for folders and for files that have not been merged public boolean is Merged return sync Type TYPE MERGED is Merged With Conflicts  isMerged syncType TYPE_MERGED isMergedWithConflicts
Answers if this sync information is for a file that has been added but not comitted to the CVS repository yet return code true code if the sync information is new or code false code if the sync is for an file that exists remotely For folder sync info this returns code false code public boolean is Added if is Directory return get Revision equals ADDED REVISION else return false  isAdded isDirectory getRevision ADDED_REVISION
Answers if this sync information is for a file that is scheduled to be deleted from the repository but the deletion has not yet been comitted return code true code if the sync information is deleted or code false code if the sync is for an file that exists remotely public boolean is Deleted return is Deleted  isDeleted isDeleted
Returns an entry line that can be saved in the CVS Entries file For sending entry lines to the server use code get Server Entry Line code return a file or folder entry line reflecting the state of this sync object public String get Entry Line return get Entry Line true include timestamps null no timestamp override  getServerEntryLine getEntryLine getEntryLine
Same as code get Entry Line code except it considers merged files in entry line timestamp format This is only valid for sending the file to the server param file Timestamp is timestamp of the resource associated with this sync info return a file or folder entry line reflecting the state of this sync object public String get Server Entry Line Date file Timestamp String server Timestamp if file Timestamp null is Merged is Merged With Conflicts if is Needs Merge file Timestamp server Timestamp TIMESTAMP SERVER MERGED WITH CONFLICT else server Timestamp TIMESTAMP SERVER MERGED return get Entry Line true server Timestamp else return get Entry Line false null  getEntryLine fileTimestamp getServerEntryLine fileTimestamp serverTimestamp fileTimestamp isMerged isMergedWithConflicts isNeedsMerge fileTimestamp serverTimestamp TIMESTAMP_SERVER_MERGED_WITH_CONFLICT serverTimestamp TIMESTAMP_SERVER_MERGED getEntryLine serverTimestamp getEntryLine
Anwsers a compatible permissions line for files return a permission line for files and code null code if this sync object is a directory public String get Permission Line if is Directory return null else String permissions this permissions if permissions null permissions DEFAULT PERMISSIONS return SEPARATOR name SEPARATOR permissions  getPermissionLine isDirectory DEFAULT_PERMISSIONS
Gets the permissions Returns code null code for directories and a non null permission for files return a string of the format u rw g rw o r public String get Permissions if is Directory return null else if permissions null return DEFAULT PERMISSIONS else return permissions  getPermissions isDirectory DEFAULT_PERMISSIONS
Gets the tag or code null code if a tag is not available return Returns a String public CVS Tag get Tag return tag  CVSTag getTag
Gets the time Stamp or code null code if a timestamp is not available return a date instance representing the timestamp public Date get Time Stamp return time Stamp  timeStamp getTimeStamp timeStamp
Gets the version or code null code if this is a folder sync info The returned revision will never include the DELETED PREFIX To found out if this sync info is for a deleted resource call is Deleted return Returns a String public String get Revision return revision  DELETED_PREFIX isDeleted getRevision
Gets the name return Returns a String public String get Name return name  getName
Gets the keyword mode return the keyword substitution option public K Subst Option get Keyword Mode return keyword Mode  KSubstOption getKeywordMode keywordMode
Answers the default permissions string public static String get Default Permissions return DEFAULT PERMISSIONS  getDefaultPermissions DEFAULT_PERMISSIONS
Name equality between resource sync info objects public boolean equals Object other if other instanceof Resource Sync Info Resource Sync Info sync Info Resource Sync Info other if other this return true if get Name sync Info get Name return true return get Name equals sync Info get Name else return false  ResourceSyncInfo ResourceSyncInfo syncInfo ResourceSyncInfo getName syncInfo getName getName syncInfo getName
public int hash Code return get Name hash Code  hashCode getName hashCode
see Object to String public String to String return get Entry Line true null no timestamp override  toString toString getEntryLine
return get Entry Line true null no timestamp override public Mutable Resource Sync Info clone Mutable Mutable Resource Sync Info new Sync new Mutable Resource Sync Info this return new Sync  getEntryLine MutableResourceSyncInfo cloneMutable MutableResourceSyncInfo newSync MutableResourceSyncInfo newSync
Sets the tag for the resource protected void set Tag CVS Tag tag if tag null this tag new CVS Entry Line Tag tag else this tag null  setTag CVSTag CVSEntryLineTag
Sets the sync type protected void set Sync Type int sync Type this sync Type sync Type  setSyncType syncType syncType syncType
Sets the version and decides if the revision is for a deleted resource the revision field will not include the deleted prefix param version the version to set protected void set Revision String revision if revision null revision equals ADDED REVISION this revision ADDED REVISION time Stamp null sync Type TYPE REGULAR is Deleted false else if revision starts With DELETED PREFIX this revision revision substring DELETED PREFIX length is Deleted true else this revision revision is Deleted false  setRevision ADDED_REVISION ADDED_REVISION timeStamp syncType TYPE_REGULAR isDeleted startsWith DELETED_PREFIX DELETED_PREFIX isDeleted isDeleted
Set the entry line throws CVS Exception if the entry Line is malformed protected void set Entry Line String entry Line throws CVS Exception String strings Util parse Into Substrings entry Line SEPARATOR if strings length 6 throw new CVS Exception Policy bind Malformed entry line   11 entry Line NON NLS 1 is Directory strings 0 equals DIRECTORY PREFIX name strings 1 if name length 0 throw new CVS Exception Policy bind Malformed entry line  missing name   12 entry Line NON NLS 1 String rev strings 2 if rev length 0 is Directory throw new CVS Exception Policy bind Malformed entry line  missing revision   13 entry Line NON NLS 1 else set Revision rev String date strings 3 possible timestamps are from server and modified from entry line Result of Merge Thu May 25 12 33 33 2002 Result of Merge Thu May 25 12 33 33 2002 The server will send a timestamp of if the file was merged with conflicts The indicates that there are conflicts and the indicate that the timestamp for the file should be used If the merge does not have conflicts simply add a text only timestamp and the file will be regarded as having outgoing changes The purpose for having the two different timestamp options for merges is to dissallow commit of files that have conflicts until they have been manually edited if date index Of Resource Sync Info TIMESTAMP SERVER MERGED 1 sync Type TYPE MERGED date null else if date index Of Resource Sync Info TIMESTAMP SERVER MERGED WITH CONFLICT 1 sync Type TYPE MERGED WITH CONFLICTS date null else if date index Of TIMESTAMP MERGED WITH CONFLICT 1 date date substring date index Of 1 NON NLS 1 sync Type TYPE MERGED WITH CONFLICTS else if date index Of TIMESTAMP MERGED 1 sync Type TYPE MERGED date null if date null equals date NON NLS 1 time Stamp null else try time Stamp CVS Date Formatter entry Line To Date date catch Parse Exception e something we don t understand just make this sync have no timestamp and never be in sync with the server time Stamp null keyword Mode K Subst Option from Mode strings 4 String tag Entry if strings length 6 tag Entry strings 5 else It turns out that CVS supports slashes in the tag even though this breaks the spec See http dev eclipse org bugs show bug cgi id 26717 String Buffer buffer new String Buffer for int i 5 i strings length i buffer append strings i if i strings length 1 buffer append SEPARATOR tag Entry buffer to String if tag Entry length 0 tag new CVS Entry Line Tag tag Entry else tag null  CVSException entryLine setEntryLine entryLine CVSException parseIntoSubstrings entryLine CVSException Malformed_entry_line___11 entryLine isDirectory DIRECTORY_PREFIX CVSException Malformed_entry_line _missing_name___12 entryLine isDirectory CVSException Malformed_entry_line _missing_revision___13 entryLine setRevision indexOf ResourceSyncInfo TIMESTAMP_SERVER_MERGED syncType TYPE_MERGED indexOf ResourceSyncInfo TIMESTAMP_SERVER_MERGED_WITH_CONFLICT syncType TYPE_MERGED_WITH_CONFLICTS indexOf TIMESTAMP_MERGED_WITH_CONFLICT indexOf syncType TYPE_MERGED_WITH_CONFLICTS indexOf TIMESTAMP_MERGED syncType TYPE_MERGED timeStamp timeStamp CVSDateFormatter entryLineToDate ParseException timeStamp keywordMode KSubstOption fromMode tagEntry tagEntry show_bug StringBuffer StringBuffer tagEntry toString tagEntry CVSEntryLineTag tagEntry
private String get Entry Line boolean include Time Stamp String timestamp Override String Buffer result new String Buffer if is Directory result append DIRECTORY PREFIX result append SEPARATOR result append name for int i 0 i 4 i result append SEPARATOR else result append SEPARATOR result append name result append SEPARATOR if is Deleted result append DELETED PREFIX result append revision result append SEPARATOR if include Time Stamp String entry Line Timestamp NON NLS 1 if timestamp Override null entry Line Timestamp timestamp Override else switch sync Type case TYPE REGULAR if time Stamp null entry Line Timestamp TIMESTAMP DUMMY else entry Line Timestamp CVS Date Formatter date To Entry Line time Stamp break case TYPE MERGED entry Line Timestamp TIMESTAMP MERGED break case TYPE MERGED WITH CONFLICTS entry Line Timestamp TIMESTAMP MERGED WITH CONFLICT CVS Date Formatter date To Entry Line time Stamp break result append entry Line Timestamp result append SEPARATOR if keyword Mode null result append keyword Mode to Mode result append SEPARATOR if tag null result append tag to Entry Line Format true return result to String  getEntryLine includeTimeStamp timestampOverride StringBuffer StringBuffer isDirectory DIRECTORY_PREFIX isDeleted DELETED_PREFIX includeTimeStamp entryLineTimestamp timestampOverride entryLineTimestamp timestampOverride syncType TYPE_REGULAR timeStamp entryLineTimestamp TIMESTAMP_DUMMY entryLineTimestamp CVSDateFormatter dateToEntryLine timeStamp TYPE_MERGED entryLineTimestamp TIMESTAMP_MERGED TYPE_MERGED_WITH_CONFLICTS entryLineTimestamp TIMESTAMP_MERGED_WITH_CONFLICT CVSDateFormatter dateToEntryLine timeStamp entryLineTimestamp keywordMode keywordMode toMode toEntryLineFormat toString
public boolean needs Reporting return false  needsReporting
public void reported do nothing 
Method get Bytes return byte public byte get Bytes return get Entry Line get Bytes  getBytes getBytes getEntryLine getBytes
Method get Name param sync Bytes return String public static String get Name byte sync Bytes throws CVS Exception String name Util get Substring sync Bytes SEPARATOR BYTE 1 false if name null throw new CVS Exception Policy bind Resource Sync Info malformed Sync Bytes new String sync Bytes NON NLS 1 return name  getName syncBytes getName syncBytes CVSException getSubstring syncBytes SEPARATOR_BYTE CVSException ResourceSyncInfo malformedSyncBytes syncBytes
Method get Keyword Mode param sync Bytes return String public static K Subst Option get Keyword Mode byte sync Bytes throws CVS Exception String mode Util get Substring sync Bytes SEPARATOR BYTE 4 false if mode null throw new CVS Exception Policy bind Resource Sync Info malformed Sync Bytes new String sync Bytes NON NLS 1 return K Subst Option from Mode mode  getKeywordMode syncBytes KSubstOption getKeywordMode syncBytes CVSException getSubstring syncBytes SEPARATOR_BYTE CVSException ResourceSyncInfo malformedSyncBytes syncBytes KSubstOption fromMode
Method get Keyword Mode param sync Bytes return String public static byte set Keyword Mode byte sync Bytes K Subst Option mode throws CVS Exception return set Keyword Mode sync Bytes mode to Mode get Bytes  getKeywordMode syncBytes setKeywordMode syncBytes KSubstOption CVSException setKeywordMode syncBytes toMode getBytes
Method get Keyword Mode param sync Bytes return String public static byte set Keyword Mode byte sync Bytes byte mode Bytes throws CVS Exception return set Slot sync Bytes 4 mode Bytes  getKeywordMode syncBytes setKeywordMode syncBytes modeBytes CVSException setSlot syncBytes modeBytes
Return whether the provided sync Bytes represent a binary file param sync Bytes return boolean throws CVS Exception public static boolean is Binary byte sync Bytes throws CVS Exception if sync Bytes null return false String mode Util get Substring sync Bytes SEPARATOR BYTE 4 false if mode null throw new CVS Exception Policy bind Resource Sync Info malformed Sync Bytes new String sync Bytes NON NLS 1 return kb equals mode NON NLS 1  syncBytes syncBytes CVSException isBinary syncBytes CVSException syncBytes getSubstring syncBytes SEPARATOR_BYTE CVSException ResourceSyncInfo malformedSyncBytes syncBytes
Method is Folder param sync Bytes return boolean public static boolean is Folder byte sync Bytes return sync Bytes length 0 sync Bytes 0 D  isFolder syncBytes isFolder syncBytes syncBytes syncBytes
Method is Addition param sync Bytes return boolean public static boolean is Addition byte sync Bytes throws CVS Exception int start start Of Slot sync Bytes 2 if start 1 start sync Bytes length throw new CVS Exception Policy bind Resource Sync Info malformed Sync Bytes new String sync Bytes NON NLS 1 return sync Bytes start 1 0  isAddition syncBytes isAddition syncBytes CVSException startOfSlot syncBytes syncBytes CVSException ResourceSyncInfo malformedSyncBytes syncBytes syncBytes
Method is Deleted param sync Bytes return boolean public static boolean is Deletion byte sync Bytes throws CVS Exception int start start Of Slot sync Bytes 2 if start 1 start sync Bytes length throw new CVS Exception Policy bind Resource Sync Info malformed Sync Bytes new String sync Bytes NON NLS 1 return sync Bytes start 1 DELETED PREFIX BYTE  isDeleted syncBytes isDeletion syncBytes CVSException startOfSlot syncBytes syncBytes CVSException ResourceSyncInfo malformedSyncBytes syncBytes syncBytes DELETED_PREFIX_BYTE
Method convert To Deletion param sync Bytes return byte public static byte convert To Deletion byte sync Bytes throws CVS Exception int index start Of Slot sync Bytes 2 if index 1 throw new CVS Exception Policy bind Resource Sync Info malformed Sync Bytes new String sync Bytes NON NLS 1 if sync Bytes length index sync Bytes index 1 DELETED PREFIX BYTE byte new Sync Bytes new byte sync Bytes length 1 System arraycopy sync Bytes 0 new Sync Bytes 0 index 1 new Sync Bytes index 1 DELETED PREFIX BYTE System arraycopy sync Bytes index 1 new Sync Bytes index 2 sync Bytes length index 1 return new Sync Bytes return sync Bytes  convertToDeletion syncBytes convertToDeletion syncBytes CVSException startOfSlot syncBytes CVSException ResourceSyncInfo malformedSyncBytes syncBytes syncBytes syncBytes DELETED_PREFIX_BYTE newSyncBytes syncBytes syncBytes newSyncBytes newSyncBytes DELETED_PREFIX_BYTE syncBytes newSyncBytes syncBytes newSyncBytes syncBytes
Method convert From Deletion param sync Bytes return byte public static byte convert From Deletion byte sync Bytes throws CVS Exception int index start Of Slot sync Bytes 2 if index 1 throw new CVS Exception Policy bind Resource Sync Info malformed Sync Bytes new String sync Bytes NON NLS 1 if sync Bytes length index sync Bytes index 1 DELETED PREFIX BYTE byte new Sync Bytes new byte sync Bytes length 1 System arraycopy sync Bytes 0 new Sync Bytes 0 index 1 System arraycopy sync Bytes index 2 new Sync Bytes index 1 new Sync Bytes length index 1 return new Sync Bytes return sync Bytes  convertFromDeletion syncBytes convertFromDeletion syncBytes CVSException startOfSlot syncBytes CVSException ResourceSyncInfo malformedSyncBytes syncBytes syncBytes syncBytes DELETED_PREFIX_BYTE newSyncBytes syncBytes syncBytes newSyncBytes syncBytes newSyncBytes newSyncBytes newSyncBytes syncBytes
Method start Of Slot returns the index of the slash that occurs before the given slot index The provided index should be 1 which assumes that slot zero occurs before the first slash param sync Bytes param i return int private static int start Of Slot byte sync Bytes int slot int count 0 for int j 0 j sync Bytes length j if sync Bytes j SEPARATOR BYTE count if count slot return j return 1  startOfSlot syncBytes startOfSlot syncBytes syncBytes syncBytes SEPARATOR_BYTE
Method set Slot param sync Bytes param i param b return byte private static byte set Slot byte sync Bytes int slot byte new Bytes throws CVS Exception int start start Of Slot sync Bytes slot if start 1 throw new CVS Exception Policy bind Resource Sync Info malformed Sync Bytes new String sync Bytes NON NLS 1 int end start Of Slot sync Bytes slot 1 int total Length start 1 new Bytes length if end 1 total Length sync Bytes length end byte result new byte total Length System arraycopy sync Bytes 0 result 0 start 1 System arraycopy new Bytes 0 result start 1 new Bytes length if end 1 System arraycopy sync Bytes end result start 1 new Bytes length sync Bytes length end return result  setSlot syncBytes setSlot syncBytes newBytes CVSException startOfSlot syncBytes CVSException ResourceSyncInfo malformedSyncBytes syncBytes startOfSlot syncBytes totalLength newBytes totalLength syncBytes totalLength syncBytes newBytes newBytes syncBytes newBytes syncBytes
Return the timestamp portion of the sync info that is to be sent to the server param sync Bytes param file Timestamp return String public static String get Timestamp To Server byte sync Bytes Date file Timestamp throws CVS Exception if file Timestamp null String sync Timestamp Util get Substring sync Bytes SEPARATOR BYTE 3 false if sync Timestamp null throw new CVS Exception Policy bind Resource Sync Info malformed Sync Bytes new String sync Bytes NON NLS 1 int sync Type get Sync Type sync Timestamp if sync Type TYPE REGULAR if sync Type TYPE MERGED WITH CONFLICTS file Timestamp equals get Timestamp sync Timestamp return TIMESTAMP SERVER MERGED WITH CONFLICT else return TIMESTAMP SERVER MERGED return null  syncBytes fileTimestamp getTimestampToServer syncBytes fileTimestamp CVSException fileTimestamp syncTimestamp getSubstring syncBytes SEPARATOR_BYTE syncTimestamp CVSException ResourceSyncInfo malformedSyncBytes syncBytes syncType getSyncType syncTimestamp syncType TYPE_REGULAR syncType TYPE_MERGED_WITH_CONFLICTS fileTimestamp getTimestamp syncTimestamp TIMESTAMP_SERVER_MERGED_WITH_CONFLICT TIMESTAMP_SERVER_MERGED
Method get Timestamp param sync Timestamp return Object private static Date get Timestamp String sync Timestamp String date String sync Timestamp if sync Timestamp index Of Resource Sync Info TIMESTAMP SERVER MERGED 1 date String null else if sync Timestamp index Of Resource Sync Info TIMESTAMP SERVER MERGED WITH CONFLICT 1 date String null else if sync Timestamp index Of TIMESTAMP MERGED WITH CONFLICT 1 date String sync Timestamp substring sync Timestamp index Of 1 NON NLS 1 else if sync Timestamp index Of TIMESTAMP MERGED 1 date String null if date String null equals date String NON NLS 1 return null else try return CVS Date Formatter entry Line To Date date String catch Parse Exception e something we don t understand just make this sync have no timestamp and never be in sync with the server return null  getTimestamp syncTimestamp getTimestamp syncTimestamp dateString syncTimestamp syncTimestamp indexOf ResourceSyncInfo TIMESTAMP_SERVER_MERGED dateString syncTimestamp indexOf ResourceSyncInfo TIMESTAMP_SERVER_MERGED_WITH_CONFLICT dateString syncTimestamp indexOf TIMESTAMP_MERGED_WITH_CONFLICT dateString syncTimestamp syncTimestamp indexOf syncTimestamp indexOf TIMESTAMP_MERGED dateString dateString dateString CVSDateFormatter entryLineToDate dateString ParseException
Method get Sync Type param sync Timestamp return int private static int get Sync Type String date if date index Of Resource Sync Info TIMESTAMP SERVER MERGED 1 return TYPE MERGED else if date index Of Resource Sync Info TIMESTAMP SERVER MERGED WITH CONFLICT 1 return TYPE MERGED WITH CONFLICTS else if date index Of TIMESTAMP MERGED WITH CONFLICT 1 return TYPE MERGED WITH CONFLICTS else if date index Of TIMESTAMP MERGED 1 return TYPE MERGED return TYPE REGULAR  getSyncType syncTimestamp getSyncType indexOf ResourceSyncInfo TIMESTAMP_SERVER_MERGED TYPE_MERGED indexOf ResourceSyncInfo TIMESTAMP_SERVER_MERGED_WITH_CONFLICT TYPE_MERGED_WITH_CONFLICTS indexOf TIMESTAMP_MERGED_WITH_CONFLICT TYPE_MERGED_WITH_CONFLICTS indexOf TIMESTAMP_MERGED TYPE_MERGED TYPE_REGULAR
Method get Tag param sync Bytes return String public static byte get Tag Bytes byte sync Bytes throws CVS Exception byte tag Util get Bytes For Slot sync Bytes SEPARATOR BYTE 5 true if tag null throw new CVS Exception Policy bind Resource Sync Info malformed Sync Bytes new String sync Bytes NON NLS 1 return tag  getTag syncBytes getTagBytes syncBytes CVSException getBytesForSlot syncBytes SEPARATOR_BYTE CVSException ResourceSyncInfo malformedSyncBytes syncBytes
Method set Tag param sync Bytes param tag String return byte public static byte set Tag byte sync Bytes byte tag Bytes throws CVS Exception return set Slot sync Bytes 5 tag Bytes  setTag syncBytes tagString setTag syncBytes tagBytes CVSException setSlot syncBytes tagBytes
Method set Tag param sync Bytes param tag return Resource Sync Info public static byte set Tag byte sync Bytes CVS Tag tag throws CVS Exception CVS Entry Line Tag entry Tag if tag instanceof CVS Entry Line Tag entry Tag CVS Entry Line Tag tag else entry Tag new CVS Entry Line Tag tag return set Tag sync Bytes entry Tag to Entry Line Format true get Bytes  setTag syncBytes ResourceSyncInfo setTag syncBytes CVSTag CVSException CVSEntryLineTag entryTag CVSEntryLineTag entryTag CVSEntryLineTag entryTag CVSEntryLineTag setTag syncBytes entryTag toEntryLineFormat getBytes
Method get Revision param sync Bytes public static String get Revision byte sync Bytes throws CVS Exception String revision Util get Substring sync Bytes SEPARATOR BYTE 2 false if revision null throw new CVS Exception Policy bind Resource Sync Info malformed Sync Bytes new String sync Bytes NON NLS 1 if revision starts With DELETED PREFIX revision revision substring DELETED PREFIX length return revision  getRevision syncBytes getRevision syncBytes CVSException getSubstring syncBytes SEPARATOR_BYTE CVSException ResourceSyncInfo malformedSyncBytes syncBytes startsWith DELETED_PREFIX DELETED_PREFIX
Method set Revision param sync Bytes param revision return byte public static byte set Revision byte sync Bytes String revision throws CVS Exception return set Slot sync Bytes 2 revision get Bytes  setRevision syncBytes setRevision syncBytes CVSException setSlot syncBytes getBytes
Method is Merge param sync Bytes1 return boolean public static boolean is Merge byte sync Bytes throws CVS Exception String timestamp Util get Substring sync Bytes SEPARATOR BYTE 3 false if timestamp null throw new CVS Exception Policy bind Resource Sync Info malformed Sync Bytes new String sync Bytes NON NLS 1 int sync Type get Sync Type timestamp return sync Type TYPE MERGED sync Type TYPE MERGED WITH CONFLICTS  isMerge syncBytes1 isMerge syncBytes CVSException getSubstring syncBytes SEPARATOR_BYTE CVSException ResourceSyncInfo malformedSyncBytes syncBytes syncType getSyncType syncType TYPE_MERGED syncType TYPE_MERGED_WITH_CONFLICTS
Method is Merge param sync Bytes1 return boolean public static boolean is Merged With Conflicts byte sync Bytes throws CVS Exception String timestamp Util get Substring sync Bytes SEPARATOR BYTE 3 false if timestamp null throw new CVS Exception Policy bind Resource Sync Info malformed Sync Bytes new String sync Bytes NON NLS 1 int sync Type get Sync Type timestamp return sync Type TYPE MERGED WITH CONFLICTS  isMerge syncBytes1 isMergedWithConflicts syncBytes CVSException getSubstring syncBytes SEPARATOR_BYTE CVSException ResourceSyncInfo malformedSyncBytes syncBytes syncType getSyncType syncType TYPE_MERGED_WITH_CONFLICTS
Return code true code if the remote Bytes represents a later revision on the same branch as local Bytes Return code false code if remote Bytes is the same or an earlier revision or if the bytes are on a separate branch or tag param remote Bytes param local Bytes return public static boolean is Later Revision On Same Branch byte remote Bytes byte local Bytes throws CVS Exception If the two byte arrays are the same then the remote isn t a later revision if remote Bytes local Bytes return false If the tags differ then the remote isn t a later revision byte remote Tag Resource Sync Info get Tag Bytes remote Bytes byte local Tag Resource Sync Info get Tag Bytes local Bytes if Util equals remote Tag local Tag return false If the revisions are the same the remote isn t later String remote Revision Resource Sync Info get Revision remote Bytes String local Revision Resource Sync Info get Revision local Bytes if remote Revision equals local Revision return false return is Later Revision remote Revision local Revision  remoteBytes localBytes remoteBytes remoteBytes localBytes isLaterRevisionOnSameBranch remoteBytes localBytes CVSException remoteBytes localBytes remoteTag ResourceSyncInfo getTagBytes remoteBytes localTag ResourceSyncInfo getTagBytes localBytes remoteTag localTag remoteRevision ResourceSyncInfo getRevision remoteBytes localRevision ResourceSyncInfo getRevision localBytes remoteRevision localRevision isLaterRevision remoteRevision localRevision
Return true if the remote Revision represents a later revision than the local revision on the same branch param remote Revision param local Revision return public static boolean is Later Revision String remote Revision String local Revision int local Digits Util convert To Digits local Revision if local Digits length 0 return false int remote Digits Util convert To Digits remote Revision if remote Digits length 0 return false if local Revision equals ADDED REVISION return remote Digits length 2 if local Digits length remote Digits length If there are more digits in the remote revision then all the leading digits must match for int i 0 i local Digits length i int local Digit local Digits i int remote Digit remote Digits i if remote Digit local Digit return false return true They are the same length or the local is longer The last digit must differ and all others must be the same If the local is longer ignore the addition numbers this can occur as the result on an import for int i 0 i remote Digits length 1 i int local Digit local Digits i int remote Digit remote Digits i if remote Digit local Digit return false All the leading digits are equals so the remote is later if the last digit is greater return local Digits remote Digits length 1 remote Digits remote Digits length 1  remoteRevision remoteRevision localRevision isLaterRevision remoteRevision localRevision localDigits convertToDigits localRevision localDigits remoteDigits convertToDigits remoteRevision remoteDigits localRevision ADDED_REVISION remoteDigits localDigits remoteDigits localDigits localDigit localDigits remoteDigit remoteDigits remoteDigit localDigit remoteDigits localDigit localDigits remoteDigit remoteDigits remoteDigit localDigit localDigits remoteDigits remoteDigits remoteDigits

public final class Assert This class is not intended to be instantiated private Assert 
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression return is Legal expression NON NLS 1  IllegalArgumentException IllegalArgumentException isLegal isLegal
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression String message if expression throw new Illegal Argument Exception message return expression  IllegalArgumentException IllegalArgumentException isLegal IllegalArgumentException
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown param object the value to test exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object is Not Null object NON NLS 1  IllegalArgumentException isNotNull isNotNull
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param object the value to test param message the message to include in the exception exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object String message if object null throw new Assertion Failed Exception null argument message NON NLS 1  IllegalArgumentException isNotNull AssertionFailedException
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails public static boolean is True boolean expression return is True expression NON NLS 1  isTrue isTrue
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails public static boolean is True boolean expression String message if expression throw new Assertion Failed Exception assertion failed message NON NLS 1 return expression  isTrue AssertionFailedException

package class Assertion Failed Exception extends Runtime Exception Constructs a new exception public Assertion Failed Exception  AssertionFailedException RuntimeException AssertionFailedException
Constructs a new exception with the given message public Assertion Failed Exception String detail super detail  AssertionFailedException

public static I Resource get Resource For I Project container I Resource destination I Path originating switch destination get Type case I Resource FILE return container get File originating case I Resource FOLDER return container get Folder originating case I Resource PROJECT return Resources Plugin get Workspace get Root get Project originating to String return destination  IResource getResourceFor IProject IResource IPath getType IResource getFile IResource getFolder IResource ResourcesPlugin getWorkspace getRoot getProject toString
see I Resource Delta Visitor visit I Resource Delta public boolean visit I Resource Delta delta throws Core Exception I Resource resource delta get Resource boolean moved From delta get Flags I Resource Delta MOVED FROM 0 switch delta get Kind case I Resource Delta ADDED make sure the added resource isn t a phantom if resource exists if Eclipse Synchronizer get Instance was Phantom resource Eclipse Synchronizer get Instance resources Recreated new I Resource resource null if resource get Type I Resource FOLDER handle Orphaned Subtree I Container resource break case I Resource Delta CHANGED This state means there is a resource before and after but changes were made by deleting and moving For files we shouldn d do anything For folders we should purge the CVS info if moved From resource get Type I Resource FOLDER resource exists When folders are moved purge the CVS folders return handle Orphaned Subtree I Container resource break return true  IResourceDeltaVisitor IResourceDelta IResourceDelta CoreException IResource getResource movedFrom getFlags IResourceDelta MOVED_FROM getKind IResourceDelta EclipseSynchronizer getInstance wasPhantom EclipseSynchronizer getInstance resourcesRecreated IResource getType IResource handleOrphanedSubtree IContainer IResourceDelta movedFrom getType IResource handleOrphanedSubtree IContainer
private boolean handle Orphaned Subtree I Container container try if CVS Workspace Root is Orphaned Subtree container ICVS Folder m Folder CVS Workspace Root getCVS Folder For container m Folder unmanage null return true catch CVS Exception e CVS Provider Plugin log e return false  handleOrphanedSubtree IContainer CVSWorkspaceRoot isOrphanedSubtree ICVSFolder mFolder CVSWorkspaceRoot getCVSFolderFor mFolder CVSException CVSProviderPlugin
folder run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception try delta accept Build Cleanup Listener this catch Core Exception e Util log Error Policy bind Resource Delta Visitor visit Error e NON NLS 1  ICVSRunnable IProgressMonitor CVSException BuildCleanupListener CoreException logError ResourceDeltaVisitor visitError
public void resource Changed I Resource Change Event event try I Resource Delta root event get Delta I Resource Delta project Deltas root get Affected Children for int i 0 i project Deltas length i final I Resource Delta delta project Deltas i I Resource resource delta get Resource if resource get Type I Resource PROJECT If the project is not accessible don t process it if resource is Accessible continue if delta get Flags I Resource Delta OPEN 0 continue Repository Provider provider Repository Provider get Provider resource get Project CVS Provider Plugin get Type Id Make sure that the project is a CVS folder ICVS Folder folder CVS Workspace Root getCVS Folder For resource get Project if provider null try if folder isCVS Folder Repository Provider unmap resource get Project provider null catch Team Exception e CVS Provider Plugin log e if a project is moved the originating project will not be associated with the CVS provider however listeners will probably still be interested in the move delta if delta get Flags I Resource Delta MOVED TO 0 I Resource destination get Resource For resource get Project resource delta get Moved To Path provider Repository Provider get Provider destination get Project if provider null Traverse the delta is a runnable so that files are only written at the end folder run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception try delta accept Build Cleanup Listener this catch Core Exception e Util log Error Policy bind Resource Delta Visitor visit Error e NON NLS 1 Policy monitor For null catch CVS Exception e Util log Error Policy bind Resource Delta Visitor visit Error e NON NLS 1  resourceChanged IResourceChangeEvent IResourceDelta getDelta IResourceDelta projectDeltas getAffectedChildren projectDeltas IResourceDelta projectDeltas IResource getResource getType IResource isAccessible getFlags IResourceDelta RepositoryProvider RepositoryProvider getProvider getProject CVSProviderPlugin getTypeId ICVSFolder CVSWorkspaceRoot getCVSFolderFor getProject isCVSFolder RepositoryProvider getProject TeamException CVSProviderPlugin getFlags IResourceDelta MOVED_TO IResource getResourceFor getProject getMovedToPath RepositoryProvider getProvider getProject ICVSRunnable IProgressMonitor CVSException BuildCleanupListener CoreException logError ResourceDeltaVisitor visitError monitorFor CVSException logError ResourceDeltaVisitor visitError

static synchronized public Date server Stamp To Date String text throws Parse Exception server Format set Time Zone get Time Zone text Date date server Format parse text return date  serverStampToDate ParseException serverFormat setTimeZone getTimeZone serverFormat
static synchronized public String date To Server Stamp Date date server Format set Time Zone Time Zone get Time Zone GMT NON NLS 1 return server Format format date 0000 NON NLS 1  dateToServerStamp serverFormat setTimeZone TimeZone getTimeZone serverFormat
static synchronized public Date entry Line To Date String text throws Parse Exception try if text char At ENTRYLINE TENS DAY OFFSET String Buffer buf new String Buffer text buf set Char At ENTRYLINE TENS DAY OFFSET 0 text buf to String catch String Index Out Of Bounds Exception e throw new Parse Exception e get Message ENTRYLINE TENS DAY OFFSET return entry Line Format parse text  entryLineToDate ParseException charAt ENTRYLINE_TENS_DAY_OFFSET StringBuffer StringBuffer setCharAt ENTRYLINE_TENS_DAY_OFFSET toString StringIndexOutOfBoundsException ParseException getMessage ENTRYLINE_TENS_DAY_OFFSET entryLineFormat
static synchronized public String date To Entry Line Date date if date null return NON NLS 1 String pass One entry Line Format format date if pass One char At ENTRYLINE TENS DAY OFFSET 0 return pass One String Buffer pass Two new String Buffer pass One pass Two set Char At ENTRYLINE TENS DAY OFFSET return pass Two to String  dateToEntryLine passOne entryLineFormat passOne charAt ENTRYLINE_TENS_DAY_OFFSET passOne StringBuffer passTwo StringBuffer passOne passTwo setCharAt ENTRYLINE_TENS_DAY_OFFSET passTwo toString
static synchronized public String date To Notify Server Date date server Format set Time Zone Time Zone get Time Zone GMT NON NLS 1 return server Format format date GMT NON NLS 1  dateToNotifyServer serverFormat setTimeZone TimeZone getTimeZone serverFormat
static private Time Zone get Time Zone String date From Server String tz null String Buffer result Tz new String Buffer GMT NON NLS 1 if date From Server index Of 1 NON NLS 1 result Tz append NON NLS 1 tz date From Server substring date From Server index Of NON NLS 1 else if date From Server index Of 1 NON NLS 1 result Tz append tz date From Server substring date From Server index Of NON NLS 1 try if tz null result Tz append tz substring 1 3 hours tz substring 3 5 minutes NON NLS 1 return Time Zone get Time Zone result Tz to String catch Index Out Of Bounds Exception e return Time Zone get Time Zone GMT NON NLS 1 return Time Zone get Time Zone GMT NON NLS 1  TimeZone getTimeZone dateFromServer StringBuffer resultTz StringBuffer dateFromServer indexOf resultTz dateFromServer dateFromServer indexOf dateFromServer indexOf resultTz dateFromServer dateFromServer indexOf resultTz TimeZone getTimeZone resultTz toString IndexOutOfBoundsException TimeZone getTimeZone TimeZone getTimeZone

private static final String TRUE true NON NLS 1 public File Name Matcher  FileNameMatcher
public File Name Matcher String patterns register patterns  FileNameMatcher
void register String patterns for int i 0 i patterns length i register patterns i TRUE 
public void register String pattern String result Assert is True matchers size results size pattern pattern trim The empty pattern matches everything but we want to match nothing with it so we just do not register anything if pattern length 0 return matchers add new String Matcher pattern false false results add result  isTrue StringMatcher
public String get Match String name String Matcher string Matcher for int i 0 i matchers size i string Matcher String Matcher matchers get i if string Matcher match name return String results get i return null  getMatch StringMatcher stringMatcher stringMatcher StringMatcher stringMatcher
public boolean match String name return get Match name null  getMatch

public static synchronized Known Repositories get Instance if instance null instance new Known Repositories return instance  KnownRepositories getInstance KnownRepositories
private abstract class Notification implements I Safe Runnable private ICVS Listener listener public void handle Exception Throwable exception don t log the exception it is already being logged in Platform run  ISafeRunnable ICVSListener handleException
don t log the exception it is already being logged in Platform run public void run ICVS Listener listener this listener listener Platform run this  ICVSListener
Platform run this public void run throws Exception notify listener 
Subsclasses overide this method to send an event safely to a lsistener param listener 
Register to receive notification of repository creation and disposal public void add Repository Listener ICVS Listener listener synchronized repository Listeners repository Listeners add listener  addRepositoryListener ICVSListener repositoryListeners repositoryListeners
De register a listener public void remove Repository Listener ICVS Listener listener synchronized repository Listeners repository Listeners remove listener  removeRepositoryListener ICVSListener repositoryListeners repositoryListeners
CVS Repository Location repository update Cache fire Notification new Notification public void notify ICVS Listener listener listener repository Added repository  CVSRepositoryLocation updateCache fireNotification ICVSListener repositoryAdded
Add the repository to the receiver s list of known repositories Doing this will enable password caching accross platform invokations public ICVS Repository Location add Repository final ICVS Repository Location repository boolean broadcast Check the cache for an equivalent instance and if there is one just update the cache CVS Repository Location existing Location internal Get Repository repository get Location if existing Location null Store the location store CVS Repository Location repository existing Location CVS Repository Location repository Notify no matter what since it may not have been broadcast before if broadcast CVS Repository Location repository update Cache fire Notification new Notification public void notify ICVS Listener listener listener repository Added repository return existing Location  ICVSRepositoryLocation addRepository ICVSRepositoryLocation CVSRepositoryLocation existingLocation internalGetRepository getLocation existingLocation CVSRepositoryLocation existingLocation CVSRepositoryLocation CVSRepositoryLocation updateCache fireNotification ICVSListener repositoryAdded existingLocation
if get Repositories Map remove repository get Location null fire Notification new Notification public void notify ICVS Listener listener listener repository Removed repository  getRepositoriesMap getLocation fireNotification ICVSListener repositoryRemoved
Dispose of the repository location Removes any cached information about the repository such as a remembered password public void dispose Repository final ICVS Repository Location repository CVS Repository Location repository dispose if get Repositories Map remove repository get Location null fire Notification new Notification public void notify ICVS Listener listener listener repository Removed repository  disposeRepository ICVSRepositoryLocation CVSRepositoryLocation getRepositoriesMap getLocation fireNotification ICVSListener repositoryRemoved
Answer whether the provided repository location is known by the provider or not The location string corresponds to the Strin returned by ICVS Repository Location get Location public boolean is Known Repository String location return internal Get Repository location null  ICVSRepositoryLocation getLocation isKnownRepository internalGetRepository
Return a list of the know repository locations public ICVS Repository Location get Repositories return ICVS Repository Location get Repositories Map values to Array new ICVS Repository Location get Repositories Map size  ICVSRepositoryLocation getRepositories ICVSRepositoryLocation getRepositoriesMap toArray ICVSRepositoryLocation getRepositoriesMap
Get the repository instance which matches the given String The format of the String is the same as that returned by ICVS Repository Location get Location The format is connection user password host port root where indicates optional and the identier meanings are connection The connection method to be used user The username for the connection password The password used for the connection optional host The host where the repository resides port The port to connect to optional root The server directory where the repository is located If the repository is already registered the cahced instance is returned Otherwise a new uncached instance is returned WARNING Providing the password as part of the String will result in the password being part of the location permanently This means that it cannot be modified by the authenticator public ICVS Repository Location get Repository String location throws CVS Exception ICVS Repository Location repository internal Get Repository location if repository null repository CVS Repository Location from String location return repository  ICVSRepositoryLocation getLocation ICVSRepositoryLocation getRepository CVSException ICVSRepositoryLocation internalGetRepository CVSRepositoryLocation fromString
private CVS Repository Location internal Get Repository String location return CVS Repository Location get Repositories Map get location  CVSRepositoryLocation internalGetRepository CVSRepositoryLocation getRepositoriesMap
private void store CVS Repository Location location Cache the location instance for later retrieval get Repositories Map put location get Location location location store Preferences  CVSRepositoryLocation getRepositoriesMap getLocation storePreferences
private Map get Repositories Map if repositories null Load the repositories from the preferences repositories new Hash Map Preferences prefs CVS Repository Location get Parent Preferences try String keys prefs children Names for int i 0 i keys length i String key keys i try Preferences node prefs node key String location node get CVS Repository Location PREF LOCATION null if location null repositories put location CVS Repository Location from String location else node remove Node prefs flush catch CVS Exception e Log and continue CVS Provider Plugin log e if repositories is Empty get Repositories From Projects catch Backing Store Exception e Log and continue although all repos will be missing CVS Provider Plugin log I Status ERROR Policy bind Known Repositories 0 e NON NLS 1 catch CVS Exception e CVS Provider Plugin log e return repositories  getRepositoriesMap HashMap CVSRepositoryLocation getParentPreferences childrenNames CVSRepositoryLocation PREF_LOCATION CVSRepositoryLocation fromString removeNode CVSException CVSProviderPlugin isEmpty getRepositoriesFromProjects BackingStoreException CVSProviderPlugin IStatus KnownRepositories CVSException CVSProviderPlugin
private void get Repositories From Projects throws CVS Exception If the file did not exist then prime the list of repositories with the providers with which the projects in the workspace are shared I Project projects Resources Plugin get Workspace get Root get Projects for int i 0 i projects length i Repository Provider provider Repository Provider get Provider projects i CVS Provider Plugin get Type Id if provider null ICVS Folder folder ICVS Folder CVS Workspace Root getCVS Resource For projects i Folder Sync Info info folder get Folder Sync Info if info null add Repository get Repository info get Root false  getRepositoriesFromProjects CVSException IProject ResourcesPlugin getWorkspace getRoot getProjects RepositoryProvider RepositoryProvider getProvider CVSProviderPlugin getTypeId ICVSFolder ICVSFolder CVSWorkspaceRoot getCVSResourceFor FolderSyncInfo getFolderSyncInfo addRepository getRepository getRoot
private ICVS Listener get Listeners synchronized repository Listeners return ICVS Listener repository Listeners to Array new ICVS Listener repository Listeners size  ICVSListener getListeners repositoryListeners ICVSListener repositoryListeners toArray ICVSListener repositoryListeners
private void fire Notification Notification notification Get a snapshot of the listeners so the list doesn t change while we re firing ICVS Listener listeners get Listeners Notify each listener in a safe manner i e so their exceptions don t kill us for int i 0 i listeners length i ICVS Listener listener listeners i notification run listener  fireNotification ICVSListener getListeners ICVSListener

Eclipse Synchronizer get Instance perform Move Delete new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception try monitor begin Task null 100 Eclipse Synchronizer get Instance prepare For Deletion file Policy sub Monitor For monitor 40 tree standard Delete File file update Flags Policy sub Monitor For monitor 60 finally monitor done  EclipseSynchronizer getInstance performMoveDelete ICVSRunnable IProgressMonitor CVSException beginTask EclipseSynchronizer getInstance prepareForDeletion subMonitorFor standardDeleteFile updateFlags subMonitorFor
see I Move Delete Hook delete File I Resource Tree I File int I Progress Monitor public boolean delete File final I Resource Tree tree final I File file final int update Flags I Progress Monitor monitor try monitor begin Task null 100 No special handling required for team private members if file is Team Private Member return false If the file is ignored by CVS then we can just delete it ICVS File cvs File CVS Workspace Root getCVS File For file if cvs File is Ignored return false If we can t check out the files return if check Out Files tree new I File file Policy sub Monitor For monitor 30 Return that the delete was handled because the checkout will have reported the error to the I Resource Tree return true Otherwise we need to prepare properly for the delete Eclipse Synchronizer get Instance perform Move Delete new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception try monitor begin Task null 100 Eclipse Synchronizer get Instance prepare For Deletion file Policy sub Monitor For monitor 40 tree standard Delete File file update Flags Policy sub Monitor For monitor 60 finally monitor done Policy sub Monitor For monitor 70 catch CVS Exception e tree failed e get Status finally monitor done return true  IMoveDeleteHook deleteFile IResourceTree IFile IProgressMonitor deleteFile IResourceTree IFile updateFlags IProgressMonitor beginTask isTeamPrivateMember ICVSFile cvsFile CVSWorkspaceRoot getCVSFileFor cvsFile isIgnored checkOutFiles IFile subMonitorFor IResourceTree EclipseSynchronizer getInstance performMoveDelete ICVSRunnable IProgressMonitor CVSException beginTask EclipseSynchronizer getInstance prepareForDeletion subMonitorFor standardDeleteFile updateFlags subMonitorFor subMonitorFor CVSException getStatus
Eclipse Synchronizer get Instance perform Move Delete new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception try monitor begin Task null 100 Eclipse Synchronizer get Instance prepare For Deletion folder Policy sub Monitor For monitor 20 tree standard Delete Folder folder update Flags Policy sub Monitor For monitor 50 finally monitor done  EclipseSynchronizer getInstance performMoveDelete ICVSRunnable IProgressMonitor CVSException beginTask EclipseSynchronizer getInstance prepareForDeletion subMonitorFor standardDeleteFolder updateFlags subMonitorFor
see I Move Delete Hook delete Folder I Resource Tree I Folder int I Progress Monitor public boolean delete Folder final I Resource Tree tree final I Folder folder final int update Flags I Progress Monitor monitor No special handling required for team private members if folder is Team Private Member return false monitor begin Task null 100 try final ICVS Folder cvs Folder CVS Workspace Root getCVS Folder For folder if cvs Folder isCVS Folder ensure Checked Out new I Folder folder tree Policy sub Monitor For monitor 30 Eclipse Synchronizer get Instance perform Move Delete new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception try monitor begin Task null 100 Eclipse Synchronizer get Instance prepare For Deletion folder Policy sub Monitor For monitor 20 tree standard Delete Folder folder update Flags Policy sub Monitor For monitor 50 finally monitor done Policy sub Monitor For monitor 70 return true else if cvs Folder is Ignored Eclipse Synchronizer get Instance prepare For Deletion cvs Folder getI Resource Policy sub Monitor For monitor 70 catch CVS Exception e tree failed e get Status finally monitor done return false  IMoveDeleteHook deleteFolder IResourceTree IFolder IProgressMonitor deleteFolder IResourceTree IFolder updateFlags IProgressMonitor isTeamPrivateMember beginTask ICVSFolder cvsFolder CVSWorkspaceRoot getCVSFolderFor cvsFolder isCVSFolder ensureCheckedOut IFolder subMonitorFor EclipseSynchronizer getInstance performMoveDelete ICVSRunnable IProgressMonitor CVSException beginTask EclipseSynchronizer getInstance prepareForDeletion subMonitorFor standardDeleteFolder updateFlags subMonitorFor subMonitorFor cvsFolder isIgnored EclipseSynchronizer getInstance prepareForDeletion cvsFolder getIResource subMonitorFor CVSException getStatus
see I Move Delete Hook delete Project I Resource Tree I Project int I Progress Monitor public boolean delete Project I Resource Tree tree I Project project int update Flags I Progress Monitor monitor We need to flush any remembered folder deletions for the deleted project All other sync info is stored in session and persistant properties which are deleted when the associated resources are deleted try Eclipse Synchronizer get Instance prepare For Deletion project monitor catch CVS Exception e CVS Provider Plugin log e todo Perform a cvs release if there are any edits on the project return false  IMoveDeleteHook deleteProject IResourceTree IProject IProgressMonitor deleteProject IResourceTree IProject updateFlags IProgressMonitor EclipseSynchronizer getInstance prepareForDeletion CVSException CVSProviderPlugin
Eclipse Synchronizer get Instance perform Move Delete new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception try monitor begin Task null 100 Eclipse Synchronizer get Instance prepare For Deletion source Policy sub Monitor For monitor 40 if destination exists Eclipse Synchronizer get Instance prepare For Deletion destination Policy sub Monitor For monitor 20 tree standard Move File source destination update Flags Policy sub Monitor For monitor 40 Eclipse Synchronizer get Instance post Move destination finally monitor done  EclipseSynchronizer getInstance performMoveDelete ICVSRunnable IProgressMonitor CVSException beginTask EclipseSynchronizer getInstance prepareForDeletion subMonitorFor EclipseSynchronizer getInstance prepareForDeletion subMonitorFor standardMoveFile updateFlags subMonitorFor EclipseSynchronizer getInstance postMove
see I Move Delete Hook move File I Resource Tree I File I File int I Progress Monitor public boolean move File final I Resource Tree tree final I File source final I File destination final int update Flags I Progress Monitor monitor try monitor begin Task null 100 ensure we can write to both the source and the destination I File files To Check Out if destination exists files To Check Out new I File source destination else files To Check Out new I File source if check Out Files tree files To Check Out Policy sub Monitor For monitor 30 Return that the move was handled because the checkout will have reported the error to the I Resource Tree return true Perform the move Eclipse Synchronizer get Instance perform Move Delete new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception try monitor begin Task null 100 Eclipse Synchronizer get Instance prepare For Deletion source Policy sub Monitor For monitor 40 if destination exists Eclipse Synchronizer get Instance prepare For Deletion destination Policy sub Monitor For monitor 20 tree standard Move File source destination update Flags Policy sub Monitor For monitor 40 Eclipse Synchronizer get Instance post Move destination finally monitor done Policy sub Monitor For monitor 70 catch CVS Exception e tree failed e get Status finally monitor done return true  IMoveDeleteHook moveFile IResourceTree IFile IFile IProgressMonitor moveFile IResourceTree IFile IFile updateFlags IProgressMonitor beginTask IFile filesToCheckOut filesToCheckOut IFile filesToCheckOut IFile checkOutFiles filesToCheckOut subMonitorFor IResourceTree EclipseSynchronizer getInstance performMoveDelete ICVSRunnable IProgressMonitor CVSException beginTask EclipseSynchronizer getInstance prepareForDeletion subMonitorFor EclipseSynchronizer getInstance prepareForDeletion subMonitorFor standardMoveFile updateFlags subMonitorFor EclipseSynchronizer getInstance postMove subMonitorFor CVSException getStatus
Eclipse Synchronizer get Instance perform Move Delete new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception Eclipse Synchronizer get Instance prepare For Deletion source Policy sub Monitor For monitor 20 if destination exists Eclipse Synchronizer get Instance prepare For Deletion destination Policy sub Monitor For monitor 20 tree standard Move Folder source destination update Flags Policy sub Monitor For monitor 30 purgeCVS Folders destination Policy sub Monitor For monitor 20 Eclipse Synchronizer get Instance post Move destination  EclipseSynchronizer getInstance performMoveDelete ICVSRunnable IProgressMonitor CVSException EclipseSynchronizer getInstance prepareForDeletion subMonitorFor EclipseSynchronizer getInstance prepareForDeletion subMonitorFor standardMoveFolder updateFlags subMonitorFor purgeCVSFolders subMonitorFor EclipseSynchronizer getInstance postMove
destination accept new I Resource Visitor public boolean visit I Resource resource throws Core Exception if resource get Type I Resource FOLDER resource get Name equals Sync File Writer CVS DIRNAME tree standard Delete Folder I Folder resource update Flags monitor return false return true  IResourceVisitor IResource CoreException getType IResource getName SyncFileWriter CVS_DIRNAME standardDeleteFolder IFolder updateFlags
private void purgeCVS Folders I Folder destination final I Progress Monitor monitor throws CVS Exception Delete any CVS folders try destination accept new I Resource Visitor public boolean visit I Resource resource throws Core Exception if resource get Type I Resource FOLDER resource get Name equals Sync File Writer CVS DIRNAME tree standard Delete Folder I Folder resource update Flags monitor return false return true I Resource DEPTH INFINITE I Container INCLUDE TEAM PRIVATE MEMBERS catch Core Exception e throw CVS Exception wrap Exception e  purgeCVSFolders IFolder IProgressMonitor CVSException IResourceVisitor IResource CoreException getType IResource getName SyncFileWriter CVS_DIRNAME standardDeleteFolder IFolder updateFlags IResource DEPTH_INFINITE IContainer INCLUDE_TEAM_PRIVATE_MEMBERS CoreException CVSException wrapException
see I Move Delete Hook move Folder I Resource Tree I Folder I Folder int I Progress Monitor public boolean move Folder final I Resource Tree tree final I Folder source final I Folder destination final int update Flags I Progress Monitor monitor monitor begin Task null 100 try final ICVS Folder cvs Folder CVS Workspace Root getCVS Folder For source if cvs Folder is Managed if ensure Checked Out new I Folder source destination tree Policy sub Monitor For monitor 20 return true Eclipse Synchronizer get Instance perform Move Delete new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception Eclipse Synchronizer get Instance prepare For Deletion source Policy sub Monitor For monitor 20 if destination exists Eclipse Synchronizer get Instance prepare For Deletion destination Policy sub Monitor For monitor 20 tree standard Move Folder source destination update Flags Policy sub Monitor For monitor 30 purgeCVS Folders destination Policy sub Monitor For monitor 20 Eclipse Synchronizer get Instance post Move destination private void purgeCVS Folders I Folder destination final I Progress Monitor monitor throws CVS Exception Delete any CVS folders try destination accept new I Resource Visitor public boolean visit I Resource resource throws Core Exception if resource get Type I Resource FOLDER resource get Name equals Sync File Writer CVS DIRNAME tree standard Delete Folder I Folder resource update Flags monitor return false return true I Resource DEPTH INFINITE I Container INCLUDE TEAM PRIVATE MEMBERS catch Core Exception e throw CVS Exception wrap Exception e Policy sub Monitor For monitor 60 return true else if cvs Folder is Ignored Eclipse Synchronizer get Instance prepare For Deletion cvs Folder getI Resource Policy sub Monitor For monitor 60 catch CVS Exception e tree failed e get Status return true finally monitor done return false  IMoveDeleteHook moveFolder IResourceTree IFolder IFolder IProgressMonitor moveFolder IResourceTree IFolder IFolder updateFlags IProgressMonitor beginTask ICVSFolder cvsFolder CVSWorkspaceRoot getCVSFolderFor cvsFolder isManaged ensureCheckedOut IFolder subMonitorFor EclipseSynchronizer getInstance performMoveDelete ICVSRunnable IProgressMonitor CVSException EclipseSynchronizer getInstance prepareForDeletion subMonitorFor EclipseSynchronizer getInstance prepareForDeletion subMonitorFor standardMoveFolder updateFlags subMonitorFor purgeCVSFolders subMonitorFor EclipseSynchronizer getInstance postMove purgeCVSFolders IFolder IProgressMonitor CVSException IResourceVisitor IResource CoreException getType IResource getName SyncFileWriter CVS_DIRNAME standardDeleteFolder IFolder updateFlags IResource DEPTH_INFINITE IContainer INCLUDE_TEAM_PRIVATE_MEMBERS CoreException CVSException wrapException subMonitorFor cvsFolder isIgnored EclipseSynchronizer getInstance prepareForDeletion cvsFolder getIResource subMonitorFor CVSException getStatus
see I Move Delete Hook move Project I Resource Tree I Project I Project Description int I Progress Monitor public boolean move Project I Resource Tree tree I Project source I Project Description description int update Flags I Progress Monitor monitor We need to move or flush any remembered folder deletions for the deleted project XXX We flush for now This means that deleting a managed folder and then moving the project will mean that the file deletions will be lost It also means that phantom folders are lost try Eclipse Synchronizer get Instance prepare For Deletion source monitor catch CVS Exception e CVS Provider Plugin log e return false  IMoveDeleteHook moveProject IResourceTree IProject IProjectDescription IProgressMonitor moveProject IResourceTree IProject IProjectDescription updateFlags IProgressMonitor EclipseSynchronizer getInstance prepareForDeletion CVSException CVSProviderPlugin
Ensure that the given file is checked out i e not read only Return true if it is OK to procede and false otherwise param tree param file return boolean private boolean check Out Files I Resource Tree tree I File files I Progress Monitor monitor Ensure that the file is checked out i e not read only I File Modification Validator validator get File Modification Validator files if validator instanceof ICVS File Modification Validator I Status status ICVS File Modification Validator validator validate Move Delete files monitor if status isOK return true else tree failed status return false return true  checkOutFiles IResourceTree IFile IProgressMonitor IFileModificationValidator getFileModificationValidator ICVSFileModificationValidator IStatus ICVSFileModificationValidator validateMoveDelete
folder accept new I Resource Visitor public boolean visit I Resource resource throws Core Exception if resource get Type I Resource FILE I File file I File resource if file is Read Only read Only Files add file return true  IResourceVisitor IResource CoreException getType IResource IFile IFile isReadOnly readOnlyFiles
private boolean ensure Checked Out I Folder folders I Resource Tree tree I Progress Monitor monitor final List read Only Files new Array List try Find any read only files for int i 0 i folders length i I Folder folder folders i if folder exists folder accept new I Resource Visitor public boolean visit I Resource resource throws Core Exception if resource get Type I Resource FILE I File file I File resource if file is Read Only read Only Files add file return true if read Only Files is Empty return true Ensure read only files are checked out return check Out Files tree I File read Only Files to Array new I File read Only Files size monitor catch Core Exception e tree failed e get Status return false  ensureCheckedOut IFolder IResourceTree IProgressMonitor readOnlyFiles ArrayList IFolder IResourceVisitor IResource CoreException getType IResource IFile IFile isReadOnly readOnlyFiles readOnlyFiles isEmpty checkOutFiles IFile readOnlyFiles toArray IFile readOnlyFiles CoreException getStatus
private I File Modification Validator get File Modification Validator I File files return get Provider files get File Modification Validator  IFileModificationValidator getFileModificationValidator IFile getProvider getFileModificationValidator
private CVS Team Provider get Provider I File files CVS Team Provider provider CVS Team Provider Repository Provider get Provider files 0 get Project CVS Provider Plugin get Type Id return provider  CVSTeamProvider getProvider IFile CVSTeamProvider CVSTeamProvider RepositoryProvider getProvider getProject CVSProviderPlugin getTypeId

see ICVS Resource Visitor visit File ICVS File public void visit File ICVS File file throws CVS Exception byte sync Bytes file get Sync Bytes if sync Bytes null Delete unmanaged files if the user wants them deleted if CVS Provider Plugin get Plugin is Replace Unmanaged file delete else if Resource Sync Info is Addition sync Bytes file delete file unmanage null else if Resource Sync Info is Deletion sync Bytes If deleted null the sync info so the file will be refetched file unmanage null else if file is Modified null If the file is modified delee and unmanage it and allow the replace operaton to fetch it again This isrequired because update C will fail for locally modified resources that have been deleted remotely file unmanage null file delete monitor worked 1  ICVSResourceVisitor visitFile ICVSFile visitFile ICVSFile CVSException syncBytes getSyncBytes syncBytes CVSProviderPlugin getPlugin isReplaceUnmanaged ResourceSyncInfo isAddition syncBytes ResourceSyncInfo isDeletion syncBytes isModified
see ICVS Resource Visitor visit Folder ICVS Folder public void visit Folder ICVS Folder folder throws CVS Exception Delete unmanaged folders if the user wants them deleted if folder isCVS Folder CVS Provider Plugin get Plugin is Replace Unmanaged folder delete else Visit the children of the folder as appropriate if depth I Resource DEPTH INFINITE folder accept Children this else if depth I Resource DEPTH ONE ICVS Resource files folder members ICVS Folder FILE MEMBERS for int i 0 i files length i files i accept this Also delete ignored child files that start with ICVS Resource ignored Files folder members ICVS Folder FILE MEMBERS ICVS Folder IGNORED MEMBERS for int i 0 i ignored Files length i ICVS Resource cvs Resource ignored Files i if cvs Resource get Name starts With NON NLS 1 cvs Resource delete monitor worked 1  ICVSResourceVisitor visitFolder ICVSFolder visitFolder ICVSFolder CVSException isCVSFolder CVSProviderPlugin getPlugin isReplaceUnmanaged IResource DEPTH_INFINITE acceptChildren IResource DEPTH_ONE ICVSResource ICVSFolder FILE_MEMBERS ICVSResource ignoredFiles ICVSFolder FILE_MEMBERS ICVSFolder IGNORED_MEMBERS ignoredFiles ICVSResource cvsResource ignoredFiles cvsResource getName startsWith cvsResource
CVS Workspace Root getCVS Folder For project run new ICVS Runnable public void run I Progress Monitor pm throws CVS Exception monitor Policy infinite Sub Monitor For pm 100 monitor begin Task null 512 for int i 0 i resources length i if key null monitor sub Task Policy bind key resources i getI Resource get Full Path to String NON NLS 1 resources i accept Prepare For Replace Visitor this monitor done  CVSWorkspaceRoot getCVSFolderFor ICVSRunnable IProgressMonitor CVSException infiniteSubMonitorFor beginTask subTask getIResource getFullPath toString PrepareForReplaceVisitor
public void visit Resources I Project project final ICVS Resource resources final String key int depth I Progress Monitor pm throws CVS Exception this depth depth CVS Workspace Root getCVS Folder For project run new ICVS Runnable public void run I Progress Monitor pm throws CVS Exception monitor Policy infinite Sub Monitor For pm 100 monitor begin Task null 512 for int i 0 i resources length i if key null monitor sub Task Policy bind key resources i getI Resource get Full Path to String NON NLS 1 resources i accept Prepare For Replace Visitor this monitor done pm  visitResources IProject ICVSResource IProgressMonitor CVSException CVSWorkspaceRoot getCVSFolderFor ICVSRunnable IProgressMonitor CVSException infiniteSubMonitorFor beginTask subTask getIResource getFullPath toString PrepareForReplaceVisitor

see ICVS Resource Visitor visit File ICVS File public void visit File final ICVS File file throws CVS Exception byte sync Bytes file get Sync Bytes if sync Bytes null Delete unmanaged files if the user wants them deleted if CVS Provider Plugin get Plugin is Replace Unmanaged file delete else if Resource Sync Info is Addition sync Bytes file delete file unmanage null else byte tag Bytes Resource Sync Info get Tag Bytes sync Bytes boolean is Modified file is Modified null if Resource Sync Info is Deletion sync Bytes If deleted null the sync info so the file will be refetched sync Bytes Resource Sync Info convert From Deletion sync Bytes file set Sync Bytes sync Bytes ICVS File UNKNOWN is Modified true Fetch the file from the server if is Modified ICVS Folder parent file get Parent Folder Sync Info folder Info parent get Folder Sync Info Use the session opened in tghe replace With Base method to make the connection Command UPDATE execute this session Command NO GLOBAL OPTIONS new Local Option Update make Tag Option CVS Tag BASE Update IGNORE LOCAL CHANGES new ICVS Resource file null Policy sub Monitor For monitor 1 Set the tag to be the original tag sync Bytes file get Sync Bytes sync Bytes Resource Sync Info set Tag sync Bytes tag Bytes file set Sync Bytes sync Bytes ICVS File UNKNOWN monitor worked 1  ICVSResourceVisitor visitFile ICVSFile visitFile ICVSFile CVSException syncBytes getSyncBytes syncBytes CVSProviderPlugin getPlugin isReplaceUnmanaged ResourceSyncInfo isAddition syncBytes tagBytes ResourceSyncInfo getTagBytes syncBytes isModified isModified ResourceSyncInfo isDeletion syncBytes syncBytes ResourceSyncInfo convertFromDeletion syncBytes setSyncBytes syncBytes ICVSFile isModified isModified ICVSFolder getParent FolderSyncInfo folderInfo getFolderSyncInfo replaceWithBase NO_GLOBAL_OPTIONS LocalOption makeTagOption CVSTag IGNORE_LOCAL_CHANGES ICVSResource subMonitorFor syncBytes getSyncBytes syncBytes ResourceSyncInfo setTag syncBytes tagBytes setSyncBytes syncBytes ICVSFile
see ICVS Resource Visitor visit Folder ICVS Folder public void visit Folder ICVS Folder folder throws CVS Exception Visit the children of the folder as appropriate if depth I Resource DEPTH INFINITE folder accept Children this else if depth I Resource DEPTH ONE ICVS Resource files folder members ICVS Folder FILE MEMBERS for int i 0 i files length i files i accept this Also delete ignored child files that start with ICVS Resource ignored Files folder members ICVS Folder FILE MEMBERS ICVS Folder IGNORED MEMBERS for int i 0 i ignored Files length i ICVS Resource cvs Resource ignored Files i if cvs Resource get Name starts With NON NLS 1 cvs Resource delete monitor worked 1  ICVSResourceVisitor visitFolder ICVSFolder visitFolder ICVSFolder CVSException IResource DEPTH_INFINITE acceptChildren IResource DEPTH_ONE ICVSResource ICVSFolder FILE_MEMBERS ICVSResource ignoredFiles ICVSFolder FILE_MEMBERS ICVSFolder IGNORED_MEMBERS ignoredFiles ICVSResource cvsResource ignoredFiles cvsResource getName startsWith cvsResource
public void replace With Base I Project project final I Resource resources int depth I Progress Monitor pm throws CVS Exception this depth depth final ICVS Folder root CVS Workspace Root getCVS Folder For project Folder Sync Info folder Info root get Folder Sync Info I Progress Monitor monitor Policy monitor For pm monitor begin Task null 100 this session new Session Known Repositories get Instance get Repository folder Info get Root root true creat e backups this session open Policy sub Monitor For monitor 10 false read only try this monitor Policy infinite Sub Monitor For monitor 90 this monitor begin Task null 512 for int i 0 i resources length i this monitor sub Task Policy bind Replace With Base Visitor replacing resources i get Full Path to String NON NLS 1 CVS Workspace Root getCVS Resource For resources i accept this finally this session close monitor done  replaceWithBase IProject IResource IProgressMonitor CVSException ICVSFolder CVSWorkspaceRoot getCVSFolderFor FolderSyncInfo folderInfo getFolderSyncInfo IProgressMonitor monitorFor beginTask KnownRepositories getInstance getRepository folderInfo getRoot subMonitorFor infiniteSubMonitorFor beginTask subTask ReplaceWithBaseVisitor getFullPath toString CVSWorkspaceRoot getCVSResourceFor

public static synchronized Resource State Change Listeners get Listener if instance null instance new Resource State Change Listeners return instance  ResourceStateChangeListeners getListener ResourceStateChangeListeners
private abstract class Notification implements I Safe Runnable private I Resource State Change Listener listener public void handle Exception Throwable exception don t log the exception it is already being logged in Platform run  ISafeRunnable IResourceStateChangeListener handleException
don t log the exception it is already being logged in Platform run public void run I Resource State Change Listener listener this listener listener Platform run this  IResourceStateChangeListener
Platform run this public void run throws Exception notify listener 
Subsclasses overide this method to send an event safely to a lsistener param listener 
private I Resource State Change Listener get Listeners synchronized listeners return I Resource State Change Listener listeners to Array new I Resource State Change Listener listeners size  IResourceStateChangeListener getListeners IResourceStateChangeListener toArray IResourceStateChangeListener
private void fire Notification Notification notification Get a snapshot of the listeners so the list doesn t change while we re firing I Resource State Change Listener listeners get Listeners Notify each listener in a safe manner i e so their exceptions don t kill us for int i 0 i listeners length i I Resource State Change Listener listener listeners i notification run listener  fireNotification IResourceStateChangeListener getListeners IResourceStateChangeListener
public void add Resource State Change Listener I Resource State Change Listener listener synchronized listeners listeners add listener  addResourceStateChangeListener IResourceStateChangeListener
public void remove Resource State Change Listener I Resource State Change Listener listener synchronized listeners listeners remove listener  removeResourceStateChangeListener IResourceStateChangeListener
fire Notification new Notification public void notify I Resource State Change Listener listener listener resource Sync Info Changed resources  fireNotification IResourceStateChangeListener resourceSyncInfoChanged
public void resource Sync Info Changed final I Resource resources if Policy DEBUG SYNC CHANGE EVENTS print Debug Info Sync info change event resources NON NLS 1 fire Notification new Notification public void notify I Resource State Change Listener listener listener resource Sync Info Changed resources  resourceSyncInfoChanged IResource DEBUG_SYNC_CHANGE_EVENTS printDebugInfo fireNotification IResourceStateChangeListener resourceSyncInfoChanged
fire Notification new Notification public void notify I Resource State Change Listener listener listener external Sync Info Change resources  fireNotification IResourceStateChangeListener externalSyncInfoChange
public void external Sync Info Change final I Resource resources if Policy DEBUG SYNC CHANGE EVENTS print Debug Info External sync info change event resources NON NLS 1 fire Notification new Notification public void notify I Resource State Change Listener listener listener external Sync Info Change resources  externalSyncInfoChange IResource DEBUG_SYNC_CHANGE_EVENTS printDebugInfo fireNotification IResourceStateChangeListener externalSyncInfoChange
fire Notification new Notification public void notify I Resource State Change Listener listener listener resource Modified resources  fireNotification IResourceStateChangeListener resourceModified
public void resource Modified final I Resource resources if Policy DEBUG SYNC CHANGE EVENTS print Debug Info Resource modified change event resources NON NLS 1 fire Notification new Notification public void notify I Resource State Change Listener listener listener resource Modified resources  resourceModified IResource DEBUG_SYNC_CHANGE_EVENTS printDebugInfo fireNotification IResourceStateChangeListener resourceModified
fire Notification new Notification public void notify I Resource State Change Listener listener listener project Configured project  fireNotification IResourceStateChangeListener projectConfigured
public void project Configured final I Project project if Policy DEBUG SYNC CHANGE EVENTS print Debug Info Project configured change event new I Resource project NON NLS 1 fire Notification new Notification public void notify I Resource State Change Listener listener listener project Configured project  projectConfigured IProject DEBUG_SYNC_CHANGE_EVENTS printDebugInfo IResource fireNotification IResourceStateChangeListener projectConfigured
fire Notification new Notification public void notify I Resource State Change Listener listener listener project Deconfigured project  fireNotification IResourceStateChangeListener projectDeconfigured
public void project Deconfigured final I Project project if Policy DEBUG SYNC CHANGE EVENTS print Debug Info Project deconfigured change event new I Resource project NON NLS 1 fire Notification new Notification public void notify I Resource State Change Listener listener listener project Deconfigured project  projectDeconfigured IProject DEBUG_SYNC_CHANGE_EVENTS printDebugInfo IResource fireNotification IResourceStateChangeListener projectDeconfigured
private void print Debug Info String prefix I Resource resources System out print prefix System out print from thread Thread current Thread get Name NON NLS 1 System out print for the following resources length resources NON NLS 1 NON NLS 2 System out println NON NLS 1 for int i 0 i resources length i I Resource resource resources i System out println resource get Full Path to String  printDebugInfo IResource currentThread getName IResource getFullPath toString

int start inclusive int end exclusive public Position int start int end this start start this end end 
this end end public int get Start return start  getStart
return start public int get End return end  getEnd
Find the first occurrence of the pattern between code start code inclusive and code end code exclusive param code text code the String object to search in param code start code the starting index of the search range inclusive param code end code the ending index of the search range exclusive return an code String Matcher Position code object that keeps the starting inclusive and ending positions exclusive of the first occurrence of the pattern in the specified range of the text return null if not found or subtext is empty start end A pair of zeros is returned if pattern is empty string Note that for pattern like abc with leading and trailing stars position of abc is returned For a pattern like in text abcdf 1 3 is returned public String Matcher Position find String text int start int end if f Pattern null text null throw new Illegal Argument Exception int tlen text length if start 0 start 0 if end tlen end tlen if end 0 start end return null if f Length 0 return new Position start start if f Ignore Wild Cards int x pos In text start end if x 0 return null return new Position x x f Length int seg Count f Segments length if seg Count 0 pattern contains only s return new Position start end int cur Pos start int match Start 1 int i for i 0 i seg Count cur Pos end i String current f Segments i int next Match reg Exp Pos In text cur Pos end current if next Match 0 return null if i 0 match Start next Match cur Pos next Match current length if i seg Count return null return new Position match Start cur Pos  StringMatcher StringMatcher fPattern IllegalArgumentException fLength fIgnoreWildCards posIn fLength segCount fSegments segCount curPos matchStart segCount curPos fSegments nextMatch regExpPosIn curPos nextMatch matchStart nextMatch curPos nextMatch segCount matchStart curPos
String Matcher constructor takes in a String object that is a simple pattern which may contain for 0 and many characters and for exactly one character Literal and characters must be escaped in the pattern e g means literal etc Escaping any other character including the escape character itself just results in that character in the pattern e g a means a and means If invoking the String Matcher with string literals in Java don t forget escape characters are represented by param a Pattern the pattern to match text with param ignore Case if true case is ignored param ignore Wild Cards if true wild cards and their escape sequences are ignored everything is taken literally public String Matcher String a Pattern boolean ignore Case boolean ignore Wild Cards f Ignore Case ignore Case f Ignore Wild Cards ignore Wild Cards f Length a Pattern length convert case if f Ignore Case f Pattern a Pattern to Upper Case else f Pattern a Pattern if f Ignore Wild Cards parse No Wild Cards else parse Wild Cards  StringMatcher StringMatcher aPattern ignoreCase ignoreWildCards StringMatcher aPattern ignoreCase ignoreWildCards fIgnoreCase ignoreCase fIgnoreWildCards ignoreWildCards fLength aPattern fIgnoreCase fPattern aPattern toUpperCase fPattern aPattern fIgnoreWildCards parseNoWildCards parseWildCards
Given the starting inclusive and the ending exclusive poisitions in the code text code determine if the given substring matches with a Pattern return true if the specified portion of the text matches the pattern param String code text code a String object that contains the substring to match param int code start code marks the starting position inclusive of the substring param int code end code marks the ending index exclusive of the substring public boolean match String text int start int end if null text throw new Illegal Argument Exception if start end return false if f Ignore Wild Cards return end start f Length f Pattern region Matches f Ignore Case 0 text start f Length int seg Count f Segments length if seg Count 0 f Has Leading Star f Has Trailing Star pattern contains only s return true if start end return f Length 0 if f Length 0 return start end int tlen text length if start 0 start 0 if end tlen end tlen int t Cur Pos start int bound end f Bound if bound 0 return false int i 0 String current f Segments i int seg Length current length process first segment if f Has Leading Star if reg Exp Region Matches text start current 0 seg Length return false else i t Cur Pos t Cur Pos seg Length if f Segments length 1 f Has Leading Star f Has Trailing Star only one segment to match no wildcards specified return t Cur Pos end process middle segments while i seg Count current f Segments i int current Match int k current index Of f Single Wild Card if k 0 current Match text Pos In text t Cur Pos end current if current Match 0 return false else current Match reg Exp Pos In text t Cur Pos end current if current Match 0 return false t Cur Pos current Match current length i process final segment if f Has Trailing Star t Cur Pos end int clen current length return reg Exp Region Matches text end clen current 0 clen return i seg Count  aPattern IllegalArgumentException fIgnoreWildCards fLength fPattern regionMatches fIgnoreCase fLength segCount fSegments segCount fHasLeadingStar fHasTrailingStar fLength fLength tCurPos fBound fSegments segLength fHasLeadingStar regExpRegionMatches segLength tCurPos tCurPos segLength fSegments fHasLeadingStar fHasTrailingStar tCurPos segCount fSegments currentMatch indexOf fSingleWildCard currentMatch textPosIn tCurPos currentMatch currentMatch regExpPosIn tCurPos currentMatch tCurPos currentMatch fHasTrailingStar tCurPos regExpRegionMatches segCount
match the given code text code with the pattern return true if matched eitherwise false param code text code a String object public boolean match String text return match text 0 text length 
This method parses the given pattern into segments separated by wildcard characters Since wildcards are not being used in this case the pattern consists of a single segment private void parse No Wild Cards f Segments new String 1 f Segments 0 f Pattern f Bound f Length  parseNoWildCards fSegments fSegments fPattern fBound fLength
This method parses the given pattern into segments separated by wildcard characters param p a String object that is a simple regular expression with and or private void parse Wild Cards if f Pattern starts With NON NLS 1 f Has Leading Star true if f Pattern ends With NON NLS 1 make sure it s not an escaped wildcard if f Length 1 f Pattern char At f Length 2 f Has Trailing Star true Vector temp new Vector int pos 0 String Buffer buf new String Buffer while pos f Length char c f Pattern char At pos switch c case if pos f Length buf append c else char next f Pattern char At pos if it s an escape sequence if next next next buf append next else not an escape sequence just insert literally buf append c buf append next break case if buf length 0 new segment temp add Element buf to String f Bound buf length buf set Length 0 break case append special character representing single match wildcard buf append f Single Wild Card break default buf append c add last buffer to segment list if buf length 0 temp add Element buf to String f Bound buf length f Segments new String temp size temp copy Into f Segments  parseWildCards fPattern startsWith fHasLeadingStar fPattern endsWith fLength fPattern charAt fLength fHasTrailingStar StringBuffer StringBuffer fLength fPattern charAt fLength fPattern charAt addElement toString fBound setLength fSingleWildCard addElement toString fBound fSegments copyInto fSegments
param code text code a string which contains no wildcard param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive return the starting index in the text of the pattern or 1 if not found protected int pos In String text int start int end no wild card in pattern int max end f Length if f Ignore Case int i text index Of f Pattern start if i 1 i max return 1 return i for int i start i max i if text region Matches true i f Pattern 0 f Length return i return 1  posIn fLength fIgnoreCase indexOf fPattern regionMatches fPattern fLength
param code text code a simple regular expression that may only contain s param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a simple regular expression that may contains param code case Ignored code wether the pattern is not casesensitive return the starting index in the text of the pattern or 1 if not found protected int reg Exp Pos In String text int start int end String p int plen p length int max end plen for int i start i max i if reg Exp Region Matches text i p 0 plen return i return 1  caseIgnored regExpPosIn regExpRegionMatches
return boolean param code text code a String to match param code start code int that indicates the starting index of match inclusive param code end code int that indicates the ending index of match exclusive param code p code String String a simple regular expression that may contain param code ignore Case code boolean indicating wether code p code is case sensitive protected boolean reg Exp Region Matches String text int t Start String p int p Start int plen while plen 0 char tchar text char At t Start char pchar p char At p Start process wild cards if f Ignore Wild Cards skip single wild cards if pchar f Single Wild Card continue if pchar tchar continue if f Ignore Case char tc Character to Upper Case tchar if tc pchar continue return false return true  ignoreCase regExpRegionMatches tStart pStart charAt tStart charAt pStart fIgnoreWildCards fSingleWildCard fIgnoreCase toUpperCase
param code text code the string to match param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a string that has no wildcard param code ignore Case code boolean indicating wether code p code is case sensitive return the starting index in the text of the pattern or 1 if not found protected int text Pos In String text int start int end String p int plen p length int max end plen if f Ignore Case int i text index Of p start if i 1 i max return 1 return i for int i start i max i if text region Matches true i p 0 plen return i return 1  ignoreCase textPosIn fIgnoreCase indexOf regionMatches

This accessor is for use by test cases only return Returns the deferred Handler public static Deferred Resource Change Handler get Deferred Handler return deferred Handler  deferredHandler DeferredResourceChangeHandler getDeferredHandler deferredHandler
public boolean visit I Resource Delta delta I Resource resource delta get Resource if resource get Type I Resource ROOT continue with the delta return true if resource get Type I Resource PROJECT If the project is not accessible don t process it if resource is Accessible return false set Project Opening delta get Flags I Resource Delta OPEN 0 String name resource get Name int kind delta get Kind if the file has changed but not in a way that we care then ignore the change e g marker changes to files if kind I Resource Delta CHANGED delta get Flags INTERESTING CHANGES 0 return true if name equals Sync File Writer CVS DIRNAME handleCVS Dir I Container resource kind if the project is opening there is no need to notify about chagned C Vs meta files they will all be read from disk if is Project Opening return false else Inform the synchronizer about folder creations if is Project Opening return true if is Meta File resource I Resource to Be Notified handle Changed Meta File resource if to Be Notified length 0 is Modified By3rd Party resource for int i 0 i to Be Notified length i changed Containers add to Be Notified i if Policy DEBUG METAFILE CHANGES System out println cvs metafile changed by 3rd party resource get Full Path NON NLS 1 return false don t visit any children we have all the information we need else if is Ignore File resource is Modified By3rd Party resource deferred Handler ignore File Changed I File resource else if is External Deletion resource kind external Deletions add resource else if kind I Resource Delta ADDED is Recreation resource deferred Handler recreated resource return true  IResourceDelta IResource getResource getType IResource getType IResource isAccessible setProjectOpening getFlags IResourceDelta getName getKind IResourceDelta getFlags INTERESTING_CHANGES SyncFileWriter CVS_DIRNAME handleCVSDir IContainer CVs isProjectOpening isProjectOpening isMetaFile IResource toBeNotified handleChangedMetaFile toBeNotified isModifiedBy3rdParty toBeNotified changedContainers toBeNotified DEBUG_METAFILE_CHANGES getFullPath isIgnoreFile isModifiedBy3rdParty deferredHandler ignoreFileChanged IFile isExternalDeletion externalDeletions IResourceDelta isRecreation deferredHandler
public void resource Changed I Resource Change Event event try final Set changed Containers new Hash Set final Set external Deletions new Hash Set set Project Opening false event get Delta accept new I Resource Delta Visitor public boolean visit I Resource Delta delta I Resource resource delta get Resource if resource get Type I Resource ROOT continue with the delta return true if resource get Type I Resource PROJECT If the project is not accessible don t process it if resource is Accessible return false set Project Opening delta get Flags I Resource Delta OPEN 0 String name resource get Name int kind delta get Kind if the file has changed but not in a way that we care then ignore the change e g marker changes to files if kind I Resource Delta CHANGED delta get Flags INTERESTING CHANGES 0 return true if name equals Sync File Writer CVS DIRNAME handleCVS Dir I Container resource kind if the project is opening there is no need to notify about chagned C Vs meta files they will all be read from disk if is Project Opening return false else Inform the synchronizer about folder creations if is Project Opening return true if is Meta File resource I Resource to Be Notified handle Changed Meta File resource if to Be Notified length 0 is Modified By3rd Party resource for int i 0 i to Be Notified length i changed Containers add to Be Notified i if Policy DEBUG METAFILE CHANGES System out println cvs metafile changed by 3rd party resource get Full Path NON NLS 1 return false don t visit any children we have all the information we need else if is Ignore File resource is Modified By3rd Party resource deferred Handler ignore File Changed I File resource else if is External Deletion resource kind external Deletions add resource else if kind I Resource Delta ADDED is Recreation resource deferred Handler recreated resource return true I Container INCLUDE TEAM PRIVATE MEMBERS if changed Containers is Empty external Deletions is Empty Eclipse Synchronizer get Instance sync Files Changed Externally I Container changed Containers to Array new I Container changed Containers size I File external Deletions to Array new I File external Deletions size catch Core Exception e CVS Provider Plugin log e  resourceChanged IResourceChangeEvent changedContainers HashSet externalDeletions HashSet setProjectOpening getDelta IResourceDeltaVisitor IResourceDelta IResource getResource getType IResource getType IResource isAccessible setProjectOpening getFlags IResourceDelta getName getKind IResourceDelta getFlags INTERESTING_CHANGES SyncFileWriter CVS_DIRNAME handleCVSDir IContainer CVs isProjectOpening isProjectOpening isMetaFile IResource toBeNotified handleChangedMetaFile toBeNotified isModifiedBy3rdParty toBeNotified changedContainers toBeNotified DEBUG_METAFILE_CHANGES getFullPath isIgnoreFile isModifiedBy3rdParty deferredHandler ignoreFileChanged IFile isExternalDeletion externalDeletions IResourceDelta isRecreation deferredHandler IContainer INCLUDE_TEAM_PRIVATE_MEMBERS changedContainers isEmpty externalDeletions isEmpty EclipseSynchronizer getInstance syncFilesChangedExternally IContainer changedContainers toArray IContainer changedContainers IFile externalDeletions toArray IFile externalDeletions CoreException CVSProviderPlugin
Treat a resource as an external deletion if it is a file the delta says the file was removed the file is not managed but its parent is a CVS folder There will be some false positives but the reaction to this situation is to purge the cahced CVS meta information so nothing bad will happen for the false positives param resource param kind return protected boolean is External Deletion I Resource resource int kind if kind I Resource Delta REMOVED return false if resource get Type I Resource FILE return false ICVS File file CVS Workspace Root getCVS File For I File resource try return file is Managed file get Parent isCVS Folder file get Parent exists catch CVS Exception e CVS Provider Plugin log e return false  isExternalDeletion IResource IResourceDelta getType IResource ICVSFile CVSWorkspaceRoot getCVSFileFor IFile isManaged getParent isCVSFolder getParent CVSException CVSProviderPlugin
protected boolean is Modified By3rd Party I Resource resource if resource exists return true long mod Stamp resource get Modification Stamp Long when We Wrote try when We Wrote Long resource get Session Property Sync File Writer MODSTAMP KEY catch Core Exception e CVS Provider Plugin log e when We Wrote null return when We Wrote null when We Wrote long Value mod Stamp  isModifiedBy3rdParty IResource modStamp getModificationStamp whenWeWrote whenWeWrote getSessionProperty SyncFileWriter MODSTAMP_KEY CoreException CVSProviderPlugin whenWeWrote whenWeWrote whenWeWrote longValue modStamp
protected void handleCVS Dir I Container cvs Dir int kind if kind I Resource Delta ALL WITH PHANTOMS 0 if kind I Resource Delta ADDED should this dir be made team private If it contains CVS Root and CVS Repository then yes I File root File cvs Dir get File new Path Sync File Writer ROOT I File repository File cvs Dir get File new Path Sync File Writer REPOSITORY if root File exists repository File exists cvs Dir is Team Private Member try TODO Is this considered a tree modification cvs Dir set Team Private Member true if Policy DEBUG METAFILE CHANGES System out println cvs found a new CVS meta folder marking as team private cvs Dir get Full Path NON NLS 1 catch Core Exception e CVS Provider Plugin log CVS Exception wrap Exception cvs Dir Policy bind Sync File Change Listener error Setting Team Private Flag e NON NLS 1  handleCVSDir IContainer cvsDir IResourceDelta ALL_WITH_PHANTOMS IResourceDelta IFile rootFile cvsDir getFile SyncFileWriter IFile repositoryFile cvsDir getFile SyncFileWriter rootFile repositoryFile cvsDir isTeamPrivateMember cvsDir setTeamPrivateMember DEBUG_METAFILE_CHANGES cvsDir getFullPath CoreException CVSProviderPlugin CVSException wrapException cvsDir SyncFileChangeListener errorSettingTeamPrivateFlag
protected boolean is Ignore File I Resource resource return resource get Type I Resource FILE resource get Name equals Sync File Writer IGNORE FILE  isIgnoreFile IResource getType IResource getName SyncFileWriter IGNORE_FILE
private boolean is Recreation I Resource resource return Eclipse Synchronizer get Instance was Phantom resource  isRecreation IResource EclipseSynchronizer getInstance wasPhantom
protected boolean is Meta File I Resource resource I Container parent resource get Parent return resource get Type I Resource FILE parent null parent get Name equals Sync File Writer CVS DIRNAME parent is Team Private Member parent exists  isMetaFile IResource IContainer getParent getType IResource getName SyncFileWriter CVS_DIRNAME isTeamPrivateMember
protected I Container handle Changed Meta File I Resource resource I Container changed Container resource get Parent get Parent if changed Container exists return new I Container changed Container else return new I Container 0  IContainer handleChangedMetaFile IResource IContainer changedContainer getParent getParent changedContainer IContainer changedContainer IContainer
return boolean public boolean is Project Opening return is Project Opening  isProjectOpening isProjectOpening
Sets the is Project Opening param is Project Opening The is Project Opening to set public void set Project Opening boolean is Project Opening this is Project Opening is Project Opening  isProjectOpening isProjectOpening isProjectOpening setProjectOpening isProjectOpening isProjectOpening isProjectOpening

Reads the CVS Entries CVS Entries log and CVS Permissions files from the specified folder and returns Resource Sync Info instances for the data stored therein If the folder does not have a CVS subdirectory then code null code is returned public static byte read All Resource Sync I Container parent throws CVS Exception I Folder cvs Sub Dir getCVS Subdirectory parent if cvs Sub Dir exists return null if Policy DEBUG METAFILE CHANGES System out println Reading Entries file for parent get Full Path NON NLS 1 process Entries file contents String entries read Lines cvs Sub Dir get File ENTRIES if entries null return null Map infos new Tree Map for int i 0 i entries length i String line entries i if FOLDER TAG equals line equals line NON NLS 1 try Resource Sync Info info new Resource Sync Info line null null infos put info get Name info catch CVS Exception e There was a problem parsing the entry line Log the problem and skip the entry CVS Provider Plugin log new CVS Status I Status ERROR Policy bind Sync File Writer 0 parent get Full Path to String e NON NLS 1 process Entries log file contents String entries Log read Lines cvs Sub Dir get File ENTRIES LOG if entries Log null for int i 0 i entries Log length i String line entries Log i if line starts With ADD TAG line line substring ADD TAG length Resource Sync Info info new Resource Sync Info line null null infos put info get Name info else if line starts With REMOVE TAG line line substring REMOVE TAG length Resource Sync Info info new Resource Sync Info line null null infos remove info get Name return Resource Sync Info infos values to Array new Resource Sync Info infos size byte result new byte infos size int i 0 for Iterator iter infos values iterator iter has Next Resource Sync Info info Resource Sync Info iter next result i info get Bytes return result  ResourceSyncInfo readAllResourceSync IContainer CVSException IFolder cvsSubDir getCVSSubdirectory cvsSubDir DEBUG_METAFILE_CHANGES getFullPath readLines cvsSubDir getFile TreeMap FOLDER_TAG ResourceSyncInfo ResourceSyncInfo getName CVSException CVSProviderPlugin CVSStatus IStatus SyncFileWriter getFullPath toString entriesLog readLines cvsSubDir getFile ENTRIES_LOG entriesLog entriesLog entriesLog startsWith ADD_TAG ADD_TAG ResourceSyncInfo ResourceSyncInfo getName startsWith REMOVE_TAG REMOVE_TAG ResourceSyncInfo ResourceSyncInfo getName ResourceSyncInfo toArray ResourceSyncInfo hasNext ResourceSyncInfo ResourceSyncInfo getBytes
public static void write All Resource Sync I Container parent byte infos throws CVS Exception try if Policy DEBUG METAFILE CHANGES System out println Writing Entries file for folder parent get Full Path NON NLS 1 I Folder cvs Sub Dir createCVS Subdirectory parent format file contents String entries new String infos length for int i 0 i infos length i byte info infos i entries i new String info write Entries write Lines cvs Sub Dir get File ENTRIES entries delete Entries log cvs Sub Dir get File ENTRIES LOG delete I Resource NONE null catch Core Exception e throw CVS Exception wrap Exception e  writeAllResourceSync IContainer CVSException DEBUG_METAFILE_CHANGES getFullPath IFolder cvsSubDir createCVSSubdirectory writeLines cvsSubDir getFile cvsSubDir getFile ENTRIES_LOG IResource CoreException CVSException wrapException
Reads the CVS Root CVS Repository CVS Tag and CVS Entries static files from the specified folder and returns a Folder Sync Info instance for the data stored therein If the folder does not have a CVS subdirectory then code null code is returned public static Folder Sync Info read Folder Sync I Container folder throws CVS Exception I Folder cvs Sub Dir getCVS Subdirectory folder if cvs Sub Dir exists return null if Policy DEBUG METAFILE CHANGES System out println Reading Root Repository files for folder get Full Path NON NLS 1 check to make sure the the cvs folder is hidden if cvs Sub Dir is Team Private Member try cvs Sub Dir set Team Private Member true catch Core Exception e CVS Provider Plugin log e read CVS Root String root read First Line cvs Sub Dir get File ROOT if root null return null read CVS Repository String repository read First Line cvs Sub Dir get File REPOSITORY if repository null return null read CVS Tag String tag read First Line cvs Sub Dir get File TAG if Policy DEBUG METAFILE CHANGES tag null System out println Reading Tag file for folder get Full Path NON NLS 1 CVS Tag cvs Tag tag null new CVS Entry Line Tag tag null read Entries Static String static Dir read First Line cvs Sub Dir get File STATIC if Policy DEBUG METAFILE CHANGES static Dir null System out println Reading Static file for folder get Full Path NON NLS 1 boolean is Static static Dir null return folder sync return new Folder Sync Info repository root cvs Tag is Static  FolderSyncInfo FolderSyncInfo readFolderSync IContainer CVSException IFolder cvsSubDir getCVSSubdirectory cvsSubDir DEBUG_METAFILE_CHANGES getFullPath cvsSubDir isTeamPrivateMember cvsSubDir setTeamPrivateMember CoreException CVSProviderPlugin readFirstLine cvsSubDir getFile readFirstLine cvsSubDir getFile readFirstLine cvsSubDir getFile DEBUG_METAFILE_CHANGES getFullPath CVSTag cvsTag CVSEntryLineTag staticDir readFirstLine cvsSubDir getFile DEBUG_METAFILE_CHANGES staticDir getFullPath isStatic staticDir FolderSyncInfo cvsTag isStatic
Writes the CVS Root CVS Repository CVS Tag and CVS Entries static files to the specified folder using the data contained in the specified Folder Sync Info instance public static void write Folder Sync I Container folder Folder Sync Info info throws CVS Exception try if Policy DEBUG METAFILE CHANGES System out println Writing Root Respository files for folder get Full Path NON NLS 1 I Folder cvs Sub Dir createCVS Subdirectory folder write CVS Root write Lines cvs Sub Dir get File ROOT new String info get Root write CVS Repository write Lines cvs Sub Dir get File REPOSITORY new String info get Repository write CVS Tag I File tag File cvs Sub Dir get File TAG if info get Tag null if Policy DEBUG METAFILE CHANGES System out println Writing Tag file for folder get Full Path NON NLS 1 write Lines tag File new String info get Tag to Entry Line Format false else if tag File exists if Policy DEBUG METAFILE CHANGES System out println Deleting Tag file for folder get Full Path NON NLS 1 tag File delete I Resource NONE null write CVS Entries Static I File static File cvs Sub Dir get File STATIC if info get Is Static the existance of the file is all that matters if Policy DEBUG METAFILE CHANGES System out println Writing Static file for folder get Full Path NON NLS 1 write Lines static File new String NON NLS 1 else if static File exists if Policy DEBUG METAFILE CHANGES System out println Deleting Static file for folder get Full Path NON NLS 1 static File delete I Resource NONE null catch Core Exception e throw CVS Exception wrap Exception e  FolderSyncInfo writeFolderSync IContainer FolderSyncInfo CVSException DEBUG_METAFILE_CHANGES getFullPath IFolder cvsSubDir createCVSSubdirectory writeLines cvsSubDir getFile getRoot writeLines cvsSubDir getFile getRepository IFile tagFile cvsSubDir getFile getTag DEBUG_METAFILE_CHANGES getFullPath writeLines tagFile getTag toEntryLineFormat tagFile DEBUG_METAFILE_CHANGES getFullPath tagFile IResource IFile staticFile cvsSubDir getFile getIsStatic DEBUG_METAFILE_CHANGES getFullPath writeLines staticFile staticFile DEBUG_METAFILE_CHANGES getFullPath staticFile IResource CoreException CVSException wrapException
Returns all cvsignore entries for the specified folder public static String readCVS Ignore Entries I Container folder throws CVS Exception I File ignore File folder get File new Path IGNORE FILE if ignore File null return read Lines ignore File return null  readCVSIgnoreEntries IContainer CVSException IFile ignoreFile getFile IGNORE_FILE ignoreFile readLines ignoreFile
Writes all entries to the specified folder s cvsignore file overwriting any previous edition of the file public static void writeCVS Ignore Entries I Container folder String patterns throws CVS Exception I File ignore File folder get File new Path IGNORE FILE write Lines ignore File patterns  writeCVSIgnoreEntries IContainer CVSException IFile ignoreFile getFile IGNORE_FILE writeLines ignoreFile
Delete folder sync is equilavent to removing the CVS subdir public static void delete Folder Sync I Container folder throws CVS Exception try if Policy DEBUG METAFILE CHANGES System out println Deleting CVS directory from folder get Full Path NON NLS 1 getCVS Subdirectory folder delete I Resource NONE null catch Core Exception e throw CVS Exception wrap Exception e  deleteFolderSync IContainer CVSException DEBUG_METAFILE_CHANGES getFullPath getCVSSubdirectory IResource CoreException CVSException wrapException
Reads the CVS Notify file from the specified folder and returns Notify Info instances for the data stored therein If the folder does not have a CVS subdirectory then code null code is returned public static Notify Info read All Notify Info I Container parent throws CVS Exception I Folder cvs Sub Dir getCVS Subdirectory parent if cvs Sub Dir exists return null process Notify file contents String entries read Lines cvs Sub Dir get File NOTIFY if entries null return null Map infos new Tree Map for int i 0 i entries length i String line entries i if equals line NON NLS 1 Notify Info info new Notify Info parent line infos put info get Name info return Notify Info infos values to Array new Notify Info infos size  NotifyInfo NotifyInfo readAllNotifyInfo IContainer CVSException IFolder cvsSubDir getCVSSubdirectory cvsSubDir readLines cvsSubDir getFile TreeMap NotifyInfo NotifyInfo getName NotifyInfo toArray NotifyInfo
Writes the CVS Notify file to the specified folder using the data contained in the specified Notify Info instances A CVS subdirectory must already exist an exception is thrown if it doesn t public static void write All Notify Info I Container parent Notify Info infos throws CVS Exception get the CVS directory I Folder cvs Sub Dir getCVS Subdirectory parent write lines will throw an exception if the CVS directoru does not exist if infos length 0 if there are no notify entries delete the notify file try I File notify File cvs Sub Dir get File NOTIFY if notify File exists notify File delete I Resource NONE null catch Core Exception e throw CVS Exception wrap Exception e else format file contents String entries new String infos length for int i 0 i infos length i Notify Info info infos i entries i info get Notify Line write Notify entries write Lines cvs Sub Dir get File NOTIFY entries  NotifyInfo writeAllNotifyInfo IContainer NotifyInfo CVSException IFolder cvsSubDir getCVSSubdirectory IFile notifyFile cvsSubDir getFile notifyFile notifyFile IResource CoreException CVSException wrapException NotifyInfo getNotifyLine writeLines cvsSubDir getFile
Reads the CVS Baserev file from the specified folder and returns Baserev Info instances for the data stored therein If the folder does not have a CVS subdirectory then code null code is returned public static Baserev Info read All Baserev Info I Container parent throws CVS Exception I Folder cvs Sub Dir getCVS Subdirectory parent if cvs Sub Dir exists return null process Notify file contents String entries read Lines cvs Sub Dir get File BASEREV if entries null return null Map infos new Tree Map for int i 0 i entries length i String line entries i if equals line NON NLS 1 Baserev Info info new Baserev Info line infos put info get Name info return Baserev Info infos values to Array new Baserev Info infos size  BaserevInfo BaserevInfo readAllBaserevInfo IContainer CVSException IFolder cvsSubDir getCVSSubdirectory cvsSubDir readLines cvsSubDir getFile TreeMap BaserevInfo BaserevInfo getName BaserevInfo toArray BaserevInfo
Writes the CVS Baserev file to the specified folder using the data contained in the specified Baserev Info instances A CVS subdirectory must already exist an exception is thrown if it doesn t public static void write All Baserev Info I Container parent Baserev Info infos throws CVS Exception get the CVS directory I Folder cvs Sub Dir getCVS Subdirectory parent write lines will throw an exception if the CVS directory does not exist format file contents String entries new String infos length for int i 0 i infos length i Baserev Info info infos i entries i info get Entry Line write Notify entries write Lines cvs Sub Dir get File BASEREV entries  BaserevInfo writeAllBaserevInfo IContainer BaserevInfo CVSException IFolder cvsSubDir getCVSSubdirectory BaserevInfo getEntryLine writeLines cvsSubDir getFile
Returns the CVS subdirectory for this folder private static I Folder getCVS Subdirectory I Container folder return folder get Folder new Path CVS DIRNAME  IFolder getCVSSubdirectory IContainer getFolder CVS_DIRNAME
Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception Recheck existance in case this method was called without a resource rule if cvs Sub Dir exists cvs Sub Dir create false don t force true make local null cvs Sub Dir set Team Private Member true  ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException cvsSubDir cvsSubDir cvsSubDir setTeamPrivateMember
Creates and makes team private and returns a CVS subdirectory in this folder private static I Folder createCVS Subdirectory I Container folder throws CVS Exception try final I Folder cvs Sub Dir getCVS Subdirectory folder if cvs Sub Dir exists important to have both the folder creation and setting of team private in the same runnable so that the team private flag is set before other delta listeners sees the CVS folder creation Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception Recheck existance in case this method was called without a resource rule if cvs Sub Dir exists cvs Sub Dir create false don t force true make local null cvs Sub Dir set Team Private Member true folder 0 null return cvs Sub Dir catch Core Exception e throw CVS Exception wrap Exception e  IFolder createCVSSubdirectory IContainer CVSException IFolder cvsSubDir getCVSSubdirectory cvsSubDir ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException cvsSubDir cvsSubDir cvsSubDir setTeamPrivateMember cvsSubDir CoreException CVSException wrapException
private static String read First Line I File file throws CVS Exception if file exists return null try Buffered Reader reader new Buffered Reader new Input Stream Reader file get Contents true 512 try String line reader read Line if line null return NON NLS 1 return line finally reader close catch IO Exception e throw CVS Exception wrap Exception e catch Core Exception e If the I File doesn t exist or the underlying File doesn t exist just return null to indicate the absence of the file if e get Status get Code I Resource Status RESOURCE NOT FOUND e get Status get Code I Resource Status FAILED READ LOCAL return null throw CVS Exception wrap Exception e  readFirstLine IFile CVSException BufferedReader BufferedReader InputStreamReader getContents readLine IOException CVSException wrapException CoreException IFile getStatus getCode IResourceStatus RESOURCE_NOT_FOUND getStatus getCode IResourceStatus FAILED_READ_LOCAL CVSException wrapException
private static String read Lines I File file throws CVS Exception try if file exists return null Peform a forced read ignoring out of sync Buffered Reader reader new Buffered Reader new Input Stream Reader file get Contents true List file Content Store new Array List try String line while line reader read Line null file Content Store add line return String file Content Store to Array new String file Content Store size finally reader close catch IO Exception e throw CVS Exception wrap Exception e catch Core Exception e If the I File doesn t exist or the underlying File doesn t exist just return null to indicate the absence of the file if e get Status get Code I Resource Status RESOURCE NOT FOUND e get Status get Code I Resource Status FAILED READ LOCAL return null throw CVS Exception wrap Exception e  readLines IFile CVSException BufferedReader BufferedReader InputStreamReader getContents fileContentStore ArrayList readLine fileContentStore fileContentStore toArray fileContentStore IOException CVSException wrapException CoreException IFile getStatus getCode IResourceStatus RESOURCE_NOT_FOUND getStatus getCode IResourceStatus FAILED_READ_LOCAL CVSException wrapException
public static byte read Lines Input Stream stream throws CVS Exception try Buffered Reader reader new Buffered Reader new Input Stream Reader stream List file Content Store new Array List try String line while line reader read Line null file Content Store add line get Bytes return byte file Content Store to Array new byte file Content Store size finally reader close catch IO Exception e throw CVS Exception wrap Exception e  readLines InputStream CVSException BufferedReader BufferedReader InputStreamReader fileContentStore ArrayList readLine fileContentStore getBytes fileContentStore toArray fileContentStore IOException CVSException wrapException
Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception try Byte Array Output Stream os new Byte Array Output Stream write Lines To Stream And Close os contents if file exists file create new Byte Array Input Stream os to Byte Array I Resource FORCE don t keep history but do force null else file set Contents new Byte Array Input Stream os to Byte Array I Resource FORCE don t keep history but do force null file set Session Property MODSTAMP KEY new Long file get Modification Stamp catch CVS Exception e throw new Core Exception e get Status  ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException ByteArrayOutputStream ByteArrayOutputStream writeLinesToStreamAndClose ByteArrayInputStream toByteArray IResource setContents ByteArrayInputStream toByteArray IResource setSessionProperty MODSTAMP_KEY getModificationStamp CVSException CoreException getStatus
private static void write Lines final I File file final String contents throws CVS Exception try The creation of sync files has to be in a runnable in order for the resulting delta to include the MODSTAMP value If not in a runnable then create set Contents will trigger a delta and the Sync File Writer change listener won t know that the delta was a result of our own creation Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception try Byte Array Output Stream os new Byte Array Output Stream write Lines To Stream And Close os contents if file exists file create new Byte Array Input Stream os to Byte Array I Resource FORCE don t keep history but do force null else file set Contents new Byte Array Input Stream os to Byte Array I Resource FORCE don t keep history but do force null file set Session Property MODSTAMP KEY new Long file get Modification Stamp catch CVS Exception e throw new Core Exception e get Status Resources Plugin get Workspace get Rule Factory create Rule file 0 null catch Core Exception e throw CVS Exception wrap Exception e  writeLines IFile CVSException setContents SyncFileWriter ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException ByteArrayOutputStream ByteArrayOutputStream writeLinesToStreamAndClose ByteArrayInputStream toByteArray IResource setContents ByteArrayInputStream toByteArray IResource setSessionProperty MODSTAMP_KEY getModificationStamp CVSException CoreException getStatus ResourcesPlugin getWorkspace getRuleFactory createRule CoreException CVSException wrapException
private static void write Lines To Stream And Close Output Stream os String contents throws CVS Exception byte line End get Line Delimiter try try for int i 0 i contents length i os write contents i get Bytes os write line End finally os close catch IO Exception e throw CVS Exception wrap Exception e  writeLinesToStreamAndClose OutputStream CVSException lineEnd getLineDelimiter getBytes lineEnd IOException CVSException wrapException
Method write File To Base Directory param file param info public static void write File To Base Directory I File file I Progress Monitor monitor throws CVS Exception monitor Policy monitor For monitor monitor begin Task null 100 try I Folder base Folder get Base Directory file if base Folder exists base Folder create false force true local Policy sub Monitor For monitor 10 I File target base Folder get File new Path file get Name if target exists XXX Should ensure that we haven t already copied it XXX write the revision to the CVS Baserev file if target is Read Only target set Read Only false target delete true Policy sub Monitor For monitor 10 Copy the file so the timestamp is maintained file copy target get Full Path true force Policy sub Monitor For monitor 80 catch Core Exception e throw CVS Exception wrap Exception e finally monitor done  writeFileToBaseDirectory writeFileToBaseDirectory IFile IProgressMonitor CVSException monitorFor beginTask IFolder baseFolder getBaseDirectory baseFolder baseFolder subMonitorFor IFile baseFolder getFile getName isReadOnly setReadOnly subMonitorFor getFullPath subMonitorFor CoreException CVSException wrapException
Method restore File From Base Directory param file param info param monitor public static void restore File From Base Directory I File file I Progress Monitor monitor throws CVS Exception monitor Policy monitor For monitor monitor begin Task null 100 try I Folder base Folder get Base Directory file I File source base Folder get File new Path file get Name if source exists throw new CVS Exception Policy bind Sync File Writer base Not Available file get Full Path to String NON NLS 1 if file exists file delete false force true keep history Policy sub Monitor For monitor 10 Copy the file so the timestamp is maintained source move file get Full Path false force true keep history Policy sub Monitor For monitor 100 catch Core Exception e throw CVS Exception wrap Exception e finally monitor done  restoreFileFromBaseDirectory restoreFileFromBaseDirectory IFile IProgressMonitor CVSException monitorFor beginTask IFolder baseFolder getBaseDirectory IFile baseFolder getFile getName CVSException SyncFileWriter baseNotAvailable getFullPath toString subMonitorFor getFullPath subMonitorFor CoreException CVSException wrapException
Method delete File From Base Directory param file param monitor public static void delete File From Base Directory I File file I Progress Monitor monitor throws CVS Exception monitor Policy monitor For monitor monitor begin Task null 100 try I Folder base Folder get Base Directory file I File source base Folder get File new Path file get Name if source exists if source is Read Only source set Read Only false source delete false false Policy sub Monitor For monitor 100 catch Core Exception e throw CVS Exception wrap Exception e finally monitor done  deleteFileFromBaseDirectory deleteFileFromBaseDirectory IFile IProgressMonitor CVSException monitorFor beginTask IFolder baseFolder getBaseDirectory IFile baseFolder getFile getName isReadOnly setReadOnly subMonitorFor CoreException CVSException wrapException
private static I Folder get Base Directory I File file I Container cvs Folder getCVS Subdirectory file get Parent I Folder base Folder cvs Folder get Folder new Path BASE DIRNAME return base Folder  IFolder getBaseDirectory IFile IContainer cvsFolder getCVSSubdirectory getParent IFolder baseFolder cvsFolder getFolder BASE_DIRNAME baseFolder
Return a handle to the CVS Template file for the given folder param folder return I File throws CVS Exception public static I File get Template File I Container folder throws CVS Exception I Folder cvs Folder createCVS Subdirectory folder return cvs Folder get File Template NON NLS 1  IFile CVSException IFile getTemplateFile IContainer CVSException IFolder cvsFolder createCVSSubdirectory cvsFolder getFile
Method is Edited param resource return boolean public static boolean is Edited I File file I Folder base Folder get Base Directory file I File base File base Folder get File file get Name return base File exists  isEdited isEdited IFile IFolder baseFolder getBaseDirectory IFile baseFile baseFolder getFile getName baseFile
private static byte get Line Delimiter if CVS Provider Plugin get Plugin is Use Platform Lineend String property System get Property line separator NON NLS 1 if property null return property get Bytes return new byte 0x0A NON NLS 1  getLineDelimiter CVSProviderPlugin getPlugin isUsePlatformLineend getProperty getBytes

Return the last segment of the given path param path return String public static String get Last Segment String path int index path last Index Of Session SERVER SEPARATOR if index 1 return path if index path length 1 return get Last Segment path substring 0 index return path substring index 1  getLastSegment lastIndexOf SERVER_SEPARATOR getLastSegment
Return the the given path with the last segment removed param path return String public static String remove Last Segment String path int index path last Index Of Session SERVER SEPARATOR if index 1 return NON NLS 1 else return path substring 0 index  removeLastSegment lastIndexOf SERVER_SEPARATOR
Return the path without a trailing param path return String public static String as Path String path if path ends With Session SERVER SEPARATOR return path substring 0 path length Session SERVER SEPARATOR length return path  asPath endsWith SERVER_SEPARATOR SERVER_SEPARATOR
public static String get Relative Path String root Name String resource Name throws CVS Exception if resource Name starts With root Name root Name length resource Name length throw new CVS Exception Policy bind Util Internal error  resource does not start with root 3 NON NLS 1 Otherwise we would get an Array Out Of Bound Exception in case of two equal Resources if root Name length resource Name length return NON NLS 1 Remove leading slash if there is one String result resource Name substring root Name length replace if result starts With NON NLS 1 result result substring 1 return result  getRelativePath rootName resourceName CVSException resourceName startsWith rootName rootName resourceName CVSException Internal_error _resource_does_not_start_with_root_3 ArrayOutOfBoundException rootName resourceName resourceName rootName startsWith
Append the prefix and suffix to form a valid CVS path public static String append Path String prefix String suffix if prefix length 0 prefix equals Session CURRENT LOCAL FOLDER return suffix else if prefix ends With Session SERVER SEPARATOR if suffix starts With Session SERVER SEPARATOR return prefix suffix substring 1 else return prefix suffix else if suffix starts With Session SERVER SEPARATOR return prefix suffix else return prefix Session SERVER SEPARATOR suffix  appendPath CURRENT_LOCAL_FOLDER endsWith SERVER_SEPARATOR startsWith SERVER_SEPARATOR startsWith SERVER_SEPARATOR SERVER_SEPARATOR
public static void log Error String message Throwable throwable CVS Provider Plugin log I Status ERROR message throwable  logError CVSProviderPlugin IStatus
If the number of segments in the relative path of code resource code to code root code is greater than code split code then the returned path is truncated to code split code number of segments and is shown as the first segment of the path public static String to Truncated Path ICVS Resource resource ICVS Folder root int split try String string Path resource get Relative Path root if string Path equals Session CURRENT LOCAL FOLDER return resource get Name String truncated Path to Truncated Path string Path split return truncated Path catch CVS Exception e return resource get Name  toTruncatedPath ICVSResource ICVSFolder stringPath getRelativePath stringPath CURRENT_LOCAL_FOLDER getName truncatedPath toTruncatedPath stringPath truncatedPath CVSException getName
public static String to Truncated Path String string Path int split Search backwards until split separators are found int count 0 int index string Path length while count split index 1 index string Path last Index Of Session SERVER SEPARATOR index 1 if index 1 return string Path else return Policy bind Util truncated Path string Path substring index NON NLS 1  toTruncatedPath stringPath stringPath stringPath lastIndexOf SERVER_SEPARATOR stringPath truncatedPath stringPath
final Thread thread new Thread new Runnable public void run try Socket new Socket new Socket host port synchronized socket if Thread interrupted we we re either cancelled or timed out so just close the socket new Socket close else socket 0 new Socket catch Unknown Host Exception e exception 0 e catch IO Exception e exception 0 e  newSocket newSocket newSocket UnknownHostException IOException
Helper method that will time out when making a socket connection This is required because there is no way to provide a timeout value when creating a socket and in some instances they don t seem to timeout at all public static Socket create Socket final String host final int port I Progress Monitor monitor throws Unknown Host Exception IO Exception Start a thread to open a socket final Socket socket new Socket null final Exception exception new Exception null final Thread thread new Thread new Runnable public void run try Socket new Socket new Socket host port synchronized socket if Thread interrupted we we re either cancelled or timed out so just close the socket new Socket close else socket 0 new Socket catch Unknown Host Exception e exception 0 e catch IO Exception e exception 0 e thread start Wait the appropriate number of seconds int timeout CVS Provider Plugin get Plugin get Timeout if timeout 0 timeout CVS Provider Plugin DEFAULT TIMEOUT for int i 0 i timeout i try wait for the thread to complete or 1 second which ever comes first thread join 1000 catch Interrupted Exception e I think this means the thread was interupted but not necessarily timed out so we don t need to do anything synchronized socket if the user cancelled clean up before preempting the operation if monitor is Canceled if thread is Alive thread interrupt if socket 0 null socket 0 close this method will throw the proper exception Policy check Canceled monitor If the thread is still running i e we timed out signal that it is too late synchronized socket if thread is Alive thread interrupt if exception 0 null if exception 0 instanceof Unknown Host Exception throw Unknown Host Exception exception 0 else throw IO Exception exception 0 if socket 0 null throw new InterruptedIO Exception Policy bind Util timeout host NON NLS 1 return socket 0  createSocket IProgressMonitor UnknownHostException IOException newSocket newSocket newSocket UnknownHostException IOException CVSProviderPlugin getPlugin getTimeout CVSProviderPlugin DEFAULT_TIMEOUT InterruptedException isCanceled isAlive checkCanceled isAlive UnknownHostException UnknownHostException IOException InterruptedIOException
final Thread thread new Thread new Runnable public void run try Process new Process Runtime get Runtime exec command synchronized process if Thread interrupted we we re either cancelled or timed out so just destroy the process new Process destroy else process 0 new Process catch IO Exception e exception 0 e  newProcess getRuntime newProcess newProcess IOException
Helper method that will time out when running an external command This is required because there is no way to provide a timeout value when executing an external command and in some instances they don t seem to timeout at all public static Process create Process final String command I Progress Monitor monitor throws IO Exception Start a thread to execute the command and get a handle to the process final Process process new Process null final Exception exception new Exception null final Thread thread new Thread new Runnable public void run try Process new Process Runtime get Runtime exec command synchronized process if Thread interrupted we we re either cancelled or timed out so just destroy the process new Process destroy else process 0 new Process catch IO Exception e exception 0 e thread start Wait the appropriate number of seconds int timeout CVS Provider Plugin get Plugin get Timeout if timeout 0 timeout CVS Provider Plugin DEFAULT TIMEOUT for int i 0 i timeout i try wait for the thread to complete or 1 second which ever comes first thread join 1000 catch Interrupted Exception e I think this means the thread was interupted but not necessarily timed out so we don t need to do anything synchronized process if the user cancelled clean up before preempting the operation if monitor is Canceled if thread is Alive thread interrupt if process 0 null process 0 destroy this method will throw the proper exception Policy check Canceled monitor If the thread is still running i e we timed out signal that it is too late synchronized process if thread is Alive thread interrupt if exception 0 null throw IO Exception exception 0 if process 0 null throw new InterruptedIO Exception Policy bind Util process Timeout command 0 NON NLS 1 return process 0  createProcess IProgressMonitor IOException newProcess getRuntime newProcess newProcess IOException CVSProviderPlugin getPlugin getTimeout CVSProviderPlugin DEFAULT_TIMEOUT InterruptedException isCanceled isAlive checkCanceled isAlive IOException InterruptedIOException processTimeout
public static String parse Into Substrings String string String delimiter List result new Array List int start 0 int index string index Of delimiter String next while index 1 next string substring start index result add next start index 1 index string index Of delimiter start if start string length next NON NLS 1 else next string substring start result add next return String result to Array new String result size  parseIntoSubstrings ArrayList indexOf indexOf toArray
Return the substring at the given index starting at 0 where each element is delimited by the provided delimiter param bytes param delimiter param index param include Rest return String public static String get Substring byte bytes byte delimiter int index boolean include Rest byte bytes For Slot get Bytes For Slot bytes delimiter index include Rest if bytes For Slot null return null return new String bytes For Slot  includeRest getSubstring includeRest bytesForSlot getBytesForSlot includeRest bytesForSlot bytesForSlot
Return the offset the the Nth delimeter from the given start index param bytes param delimiter param start param n return int public static int get Offset Of Delimeter byte bytes byte delimiter int start int n int count 0 for int i start i bytes length i if bytes i delimiter count if count n return i the Nth delimeter was not found return 1  getOffsetOfDelimeter
Method get Bytes For Slot param sync Bytes param SEPARATOR BYTE param i param b return byte public static byte get Bytes For Slot byte bytes byte delimiter int index boolean include Rest Find the starting index int start if index 0 make start 1 so that end determination will start at offset 0 start 1 else start get Offset Of Delimeter bytes delimiter 0 index if start 1 return null Find the ending index int end get Offset Of Delimeter bytes delimiter start 1 1 Calculate the length int length if end 1 include Rest length bytes length start 1 else length end start 1 byte result new byte length System arraycopy bytes start 1 result 0 length return result  getBytesForSlot syncBytes SEPARATOR_BYTE getBytesForSlot includeRest getOffsetOfDelimeter getOffsetOfDelimeter includeRest
Method equals param sync Bytes param old Bytes return boolean public static boolean equals byte sync Bytes byte old Bytes if sync Bytes null old Bytes null return sync Bytes old Bytes if sync Bytes length old Bytes length return false for int i 0 i old Bytes length i if old Bytes i sync Bytes i return false return true  syncBytes oldBytes syncBytes oldBytes syncBytes oldBytes syncBytes oldBytes syncBytes oldBytes oldBytes oldBytes syncBytes
Workaround a CVS bug where a CVS Folder with no immediately contained files has an incorrect Tag type stored in the TAG file In this case the tag type is always BRANCH Tv1 The fix is for folders with no files use the tag type for the containing project Since projects almost always have files the TAG file is usually correct For the case where the folder tag name does not match the project tag name we can not do much so we just return the folder tag which will currently always be a branch param resource The I Resource being tested Can not be null param tag The CVS Tag as reported by CVS for the I Resource May be null return CVS Tag The corrected tag for the resource May be null public static CVS Tag get Accurate Folder Tag I Resource resource CVS Tag tag Determine if the folder contains files as immediate children if resource get Type I Resource FOLDER return tag I Resource members null try members I Folder resource members catch Core Exception e1 return tag for int i 0 i members length i if members i get Type I Resource FILE return tag Folder contains no files so this may not really be a branch Make the type the same as the project tag type if both are the same tag name I Project project resource get Project if project null return tag ICVS Folder project Folder CVS Workspace Root getCVS Folder For project Folder Sync Info project Sync Info try project Sync Info project Folder get Folder Sync Info catch CVS Exception e return tag if project Sync Info null return tag CVS Tag project Tag project Sync Info get Tag if project Tag null project Tag get Name equals tag get Name return project Tag else return tag  IResource CVSTag IResource CVSTag CVSTag getAccurateFolderTag IResource CVSTag getType IResource IResource IFolder CoreException getType IResource IProject getProject ICVSFolder projectFolder CVSWorkspaceRoot getCVSFolderFor FolderSyncInfo projectSyncInfo projectSyncInfo projectFolder getFolderSyncInfo CVSException projectSyncInfo CVSTag projectTag projectSyncInfo getTag projectTag projectTag getName getName projectTag
Workaround for CVS bug where CVS ENTRIES file does not contain correct Branch vs Version info Entries files always record a Tv1 so all entries would appear as branches By comparing the revision number to the tag name you can determine if the tag is a branch or version param cvs Resource the resource to test Must nut be null return the correct cVS Tag May be null public static CVS Tag get Accurate File Tag ICVS Resource cvs Resource throws CVS Exception CVS Tag tag null Resource Sync Info info cvs Resource get Sync Info if info null tag info get Tag Folder Sync Info parent Info cvs Resource get Parent get Folder Sync Info CVS Tag parent Tag null if parent Info null parent Tag parent Info get Tag if tag null if tag get Name equals info get Revision tag new CVS Tag tag get Name CVS Tag VERSION else if parent Tag null tag new CVS Tag tag get Name parent Tag get Type else if a file doesn t have tag info very possible for example when the file is in HEAD use the parents tag parent Tag return tag  cvsResource cVSTag CVSTag getAccurateFileTag ICVSResource cvsResource CVSException CVSTag ResourceSyncInfo cvsResource getSyncInfo getTag FolderSyncInfo parentInfo cvsResource getParent getFolderSyncInfo CVSTag parentTag parentInfo parentTag parentInfo getTag getName getRevision CVSTag getName CVSTag parentTag CVSTag getName parentTag getType parentTag
Return the fullest path that we can obtain for the given resource param resource return public static String get Fullest Path ICVS Resource resource try I Resource local resource getI Resource if local null return local get Full Path to String catch CVS Exception e Ignore and try the next method try String remote Path resource get Repository Relative Path if remote Path null return remote Path catch CVS Exception e Ignore and try the next method return resource get Name  getFullestPath ICVSResource IResource getIResource getFullPath toString CVSException remotePath getRepositoryRelativePath remotePath remotePath CVSException getName
public static String get Variable Pattern String pattern String variable Name return variable Name pattern variable Name NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4  getVariablePattern variableName variableName variableName
param local Revision return public static int convert To Digits String local Revision try String digit Strings local Revision split NON NLS 1 int digits new int digit Strings length for int i 0 i digit Strings length i String digit String digit Strings i digits i Integer parse Int digit String return digits catch Number Format Exception e CVS Provider Plugin log CVS Exception wrap Exception e return new int 0  localRevision convertToDigits localRevision digitStrings localRevision digitStrings digitStrings digitString digitStrings parseInt digitString NumberFormatException CVSProviderPlugin CVSException wrapException
public static String to Truncated Path ICVS Storage file ICVS Folder local Root int i if file instanceof ICVS Resource return to Truncated Path ICVS Resource file local Root i return file get Name  toTruncatedPath ICVSStorage ICVSFolder localRoot ICVSResource toTruncatedPath ICVSResource localRoot getName
If the status log returns that the file is in the Attic then remove the Attic segment This is because files added to a branch that are not in the main trunk HEAD are added to the Attic but cvs does magic on update to put them in the correct location e g project Attic file txt project file txt public static String remove Attic Segment String path int last Separator path last Index Of Session SERVER SEPARATOR if last Separator 1 return path int second Last Separator path last Index Of Session SERVER SEPARATOR last Separator 1 if second Last Separator 1 return path String second Last Segment path substring second Last Separator 1 last Separator if second Last Segment equals Attic NON NLS 1 return path substring 0 second Last Separator path substring last Separator return path  removeAtticSegment lastSeparator lastIndexOf SERVER_SEPARATOR lastSeparator secondLastSeparator lastIndexOf SERVER_SEPARATOR lastSeparator secondLastSeparator secondLastSegment secondLastSeparator lastSeparator secondLastSegment secondLastSeparator lastSeparator

public class CVSSSH2 Method implements I Connection Method public String get Name return extssh NON NLS 1  CVSSSH2Method IConnectionMethod getName
public I Server Connection create Connection ICVS Repository Location root String password return new CVSSSH2 Server Connection root password  IServerConnection createConnection ICVSRepositoryLocation CVSSSH2ServerConnection
public void disconnect ICVS Repository Location location  ICVSRepositoryLocation

private static CVSSSH2 Plugin plugin public CVSSSH2 Plugin I Plugin Descriptor d super d plugin this  CVSSSH2Plugin CVSSSH2Plugin IPluginDescriptor
public static CVSSSH2 Plugin get Plugin return plugin  CVSSSH2Plugin getPlugin
public void shutdown throws org eclipse core runtime Core Exception J Sch Session shutdown super shutdown  CoreException JSchSession
public static CVSSSH2 Plugin get Default return plugin  CVSSSH2Plugin getDefault
public static I Workspace get Workspace return Resources Plugin get Workspace  IWorkspace getWorkspace ResourcesPlugin getWorkspace
protected void initialize Default Preferences I Preference Store store CVSSSH2 Preference Page init Defaults store  initializeDefaultPreferences IPreferenceStore CVSSSH2PreferencePage initDefaults
public void startup throws Core Exception Policy localize org eclipse team internal ccvs ssh2 messages NON NLS 1 super startup  CoreException

public CVSSSH2 Preference Page super GRID I Preference Store store CVSSSH2 Plugin get Default get Preference Store set Preference Store store set Description Policy bind CVSSSH2 Preference Page 18 NON NLS 1  CVSSSH2PreferencePage IPreferenceStore CVSSSH2Plugin getDefault getPreferenceStore setPreferenceStore setDescription CVSSSH2PreferencePage
protected Control create Contents Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout container set Layout layout Tab Folder tab Folder new Tab Folder container SWT NONE tab Folder set Layout Data new Grid Data Grid Data FILL BOTH Tab Item tab Item new Tab Item tab Folder SWT NONE tab Item set Text Policy bind CVSSSH2 Preference Page 19 NON NLS 1 tab Item set Control create General Page tab Folder tab Item new Tab Item tab Folder SWT NONE tab Item set Text Policy bind CVSSSH2 Preference Page 20 NON NLS 1 tab Item set Control create Proxy Page tab Folder tab Item new Tab Item tab Folder SWT NONE tab Item set Text Policy bind CVSSSH2 Preference Page 21 NON NLS 1 tab Item set Control create Key Management Page tab Folder I Preference Store store CVSSSH2 Plugin get Default get Preference Store init Defaults store init Controls Dialog apply Dialog Font parent return container  createContents GridLayout GridLayout setLayout TabFolder tabFolder TabFolder tabFolder setLayoutData GridData GridData FILL_BOTH TabItem tabItem TabItem tabFolder tabItem setText CVSSSH2PreferencePage tabItem setControl createGeneralPage tabFolder tabItem TabItem tabFolder tabItem setText CVSSSH2PreferencePage tabItem setControl createProxyPage tabFolder tabItem TabItem tabFolder tabItem setText CVSSSH2PreferencePage tabItem setControl createKeyManagementPage tabFolder IPreferenceStore CVSSSH2Plugin getDefault getPreferenceStore initDefaults initControls applyDialogFont
ssh2 Home Browse add Selection Listener new Selection Adapter public void widget Selected Selection Event e String home ssh2 Home Text get Text if new File home exists while true int foo home last Index Of java io File separator home length if foo 1 break home home substring 0 foo if new File home exists break Directory Dialog dd new Directory Dialog get Shell dd set Filter Path home dd set Message Policy bind CVSSSH2 Preference Page 27 NON NLS 1 String dir dd open if dir null cancel return ssh2 Home Text set Text dir  ssh2HomeBrowse addSelectionListener SelectionAdapter widgetSelected SelectionEvent ssh2HomeText getText lastIndexOf DirectoryDialog DirectoryDialog getShell setFilterPath setMessage CVSSSH2PreferencePage ssh2HomeText setText
private Key Add add Selection Listener new Selection Adapter public void widget Selected Selection Event e String home ssh2 Home Text get Text File Dialog fd new File Dialog get Shell SWT OPEN SWT MULTI fd set Filter Path home Object o fd open if o null cancel return String files fd get File Names String keys private Key Text get Text String dir fd get Filter Path if dir equals home dir NON NLS 1 else dir java io File separator for int i 0 i files length i String foo files i if keys length 0 keys keys NON NLS 1 keys keys dir foo private Key Text set Text keys  privateKeyAdd addSelectionListener SelectionAdapter widgetSelected SelectionEvent ssh2HomeText getText FileDialog FileDialog getShell setFilterPath getFileNames privateKeyText getText getFilterPath privateKeyText setText
private Control create General Page Composite parent Composite group new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 3 group set Layout layout Grid Data data new Grid Data data horizontal Alignment Grid Data FILL group set Layout Data data create Spacer group 3 ssh2 Home Label new Label group SWT NONE ssh2 Home Label set Text Policy bind CVSSSH2 Preference Page 23 NON NLS 1 ssh2 Home Text new Text group SWT SINGLE SWT BORDER ssh2 Home Text set Font group get Font Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 1 ssh2 Home Text set Layout Data gd ssh2 Home Browse new Button group SWT NULL ssh2 Home Browse set Text Policy bind CVSSSH2 Preference Page 24 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 1 ssh2 Home Browse set Layout Data gd create Spacer group 3 private Key Label new Label group SWT NONE private Key Label set Text Policy bind CVSSSH2 Preference Page 25 NON NLS 1 private Key Text new Text group SWT SINGLE SWT BORDER private Key Text set Font group get Font gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 1 private Key Text set Layout Data gd private Key Add new Button group SWT NULL private Key Add set Text Policy bind CVSSSH2 Preference Page 26 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 1 private Key Add set Layout Data gd ssh2 Home Browse add Selection Listener new Selection Adapter public void widget Selected Selection Event e String home ssh2 Home Text get Text if new File home exists while true int foo home last Index Of java io File separator home length if foo 1 break home home substring 0 foo if new File home exists break Directory Dialog dd new Directory Dialog get Shell dd set Filter Path home dd set Message Policy bind CVSSSH2 Preference Page 27 NON NLS 1 String dir dd open if dir null cancel return ssh2 Home Text set Text dir private Key Add add Selection Listener new Selection Adapter public void widget Selected Selection Event e String home ssh2 Home Text get Text File Dialog fd new File Dialog get Shell SWT OPEN SWT MULTI fd set Filter Path home Object o fd open if o null cancel return String files fd get File Names String keys private Key Text get Text String dir fd get Filter Path if dir equals home dir NON NLS 1 else dir java io File separator for int i 0 i files length i String foo files i if keys length 0 keys keys NON NLS 1 keys keys dir foo private Key Text set Text keys return group  createGeneralPage GridLayout GridLayout numColumns setLayout GridData GridData horizontalAlignment GridData setLayoutData createSpacer ssh2HomeLabel ssh2HomeLabel setText CVSSSH2PreferencePage ssh2HomeText ssh2HomeText setFont getFont GridData GridData GridData FILL_HORIZONTAL horizontalSpan ssh2HomeText setLayoutData ssh2HomeBrowse ssh2HomeBrowse setText CVSSSH2PreferencePage GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan ssh2HomeBrowse setLayoutData createSpacer privateKeyLabel privateKeyLabel setText CVSSSH2PreferencePage privateKeyText privateKeyText setFont getFont GridData GridData FILL_HORIZONTAL horizontalSpan privateKeyText setLayoutData privateKeyAdd privateKeyAdd setText CVSSSH2PreferencePage GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan privateKeyAdd setLayoutData ssh2HomeBrowse addSelectionListener SelectionAdapter widgetSelected SelectionEvent ssh2HomeText getText lastIndexOf DirectoryDialog DirectoryDialog getShell setFilterPath setMessage CVSSSH2PreferencePage ssh2HomeText setText privateKeyAdd addSelectionListener SelectionAdapter widgetSelected SelectionEvent ssh2HomeText getText FileDialog FileDialog getShell setFilterPath getFileNames privateKeyText getText getFilterPath privateKeyText setText
proxy Type Combo add Modify Listener new Modify Listener public void modify Text Modify Event e if proxy Port Text null return Combo combo Combo e get Source String foo combo get Text if foo equals HTTP proxy Port Text set Text HTTP DEFAULT PORT else if foo equals SOCKS5 proxy Port Text set Text SOCKS5 DEFAULT PORT  proxyTypeCombo addModifyListener ModifyListener modifyText ModifyEvent proxyPortText getSource getText proxyPortText setText HTTP_DEFAULT_PORT proxyPortText setText SOCKS5_DEFAULT_PORT
proxy Port Text add Modify Listener new Modify Listener public void modify Text Modify Event e if is Valid Port proxy Port Text get Text set Error Message null  proxyPortText addModifyListener ModifyListener modifyText ModifyEvent isValidPort proxyPortText getText setErrorMessage
enable Proxy add Selection Listener new Selection Listener public void widget Selected Selection Event e update Controls  enableProxy addSelectionListener SelectionListener widgetSelected SelectionEvent updateControls
update Controls public void widget Default Selected Selection Event e  updateControls widgetDefaultSelected SelectionEvent
enable Auth add Selection Listener new Selection Listener public void widget Selected Selection Event e update Controls  enableAuth addSelectionListener SelectionListener widgetSelected SelectionEvent updateControls
update Controls public void widget Default Selected Selection Event e  updateControls widgetDefaultSelected SelectionEvent
private Control create Proxy Page Composite parent Composite group new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 3 group set Layout layout Grid Data data new Grid Data data horizontal Alignment Grid Data FILL group set Layout Data data enable Proxy new Button group SWT CHECK enable Proxy set Text Policy bind CVSSSH2 Preference Page 30 NON NLS 1 Grid Data gd new Grid Data gd horizontal Span 3 enable Proxy set Layout Data gd proxy Type Label new Label group SWT NONE proxy Type Label set Text Policy bind CVSSSH2 Preference Page 31 NON NLS 1 proxy Type Combo new Combo group SWT READ ONLY proxy Type Combo set Font group get Font gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 proxy Type Combo set Layout Data gd proxy Type Combo add Modify Listener new Modify Listener public void modify Text Modify Event e if proxy Port Text null return Combo combo Combo e get Source String foo combo get Text if foo equals HTTP proxy Port Text set Text HTTP DEFAULT PORT else if foo equals SOCKS5 proxy Port Text set Text SOCKS5 DEFAULT PORT proxy Type Combo add HTTP proxy Type Combo add SOCKS5 proxy Type Combo select 0 proxy Host Label new Label group SWT NONE proxy Host Label set Text Policy bind CVSSSH2 Preference Page 32 NON NLS 1 proxy Host Text new Text group SWT SINGLE SWT BORDER proxy Host Text set Font group get Font gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 proxy Host Text set Layout Data gd proxy Port Label new Label group SWT NONE proxy Port Label set Text Policy bind CVSSSH2 Preference Page 33 NON NLS 1 proxy Port Text new Text group SWT SINGLE SWT BORDER proxy Port Text set Font group get Font gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 proxy Port Text set Layout Data gd proxy Port Text add Modify Listener new Modify Listener public void modify Text Modify Event e if is Valid Port proxy Port Text get Text set Error Message null create Spacer group 3 enable Auth new Button group SWT CHECK enable Auth set Text Policy bind CVSSSH2 Preference Page 34 NON NLS 1 gd new Grid Data gd horizontal Span 3 enable Auth set Layout Data gd proxy User Label new Label group SWT NONE proxy User Label set Text Policy bind CVSSSH2 Preference Page 35 NON NLS 1 proxy User Text new Text group SWT SINGLE SWT BORDER proxy User Text set Font group get Font gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 proxy User Text set Layout Data gd proxy Pass Label new Label group SWT NONE proxy Pass Label set Text Policy bind CVSSSH2 Preference Page 36 NON NLS 1 proxy Pass Text new Text group SWT SINGLE SWT BORDER proxy Pass Text set Font group get Font gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 proxy Pass Text set Layout Data gd perform Defaults enable Proxy add Selection Listener new Selection Listener public void widget Selected Selection Event e update Controls public void widget Default Selected Selection Event e enable Auth add Selection Listener new Selection Listener public void widget Selected Selection Event e update Controls public void widget Default Selected Selection Event e return group  createProxyPage GridLayout GridLayout numColumns setLayout GridData GridData horizontalAlignment GridData setLayoutData enableProxy enableProxy setText CVSSSH2PreferencePage GridData GridData horizontalSpan enableProxy setLayoutData proxyTypeLabel proxyTypeLabel setText CVSSSH2PreferencePage proxyTypeCombo READ_ONLY proxyTypeCombo setFont getFont GridData GridData FILL_HORIZONTAL horizontalSpan proxyTypeCombo setLayoutData proxyTypeCombo addModifyListener ModifyListener modifyText ModifyEvent proxyPortText getSource getText proxyPortText setText HTTP_DEFAULT_PORT proxyPortText setText SOCKS5_DEFAULT_PORT proxyTypeCombo proxyTypeCombo proxyTypeCombo proxyHostLabel proxyHostLabel setText CVSSSH2PreferencePage proxyHostText proxyHostText setFont getFont GridData GridData FILL_HORIZONTAL horizontalSpan proxyHostText setLayoutData proxyPortLabel proxyPortLabel setText CVSSSH2PreferencePage proxyPortText proxyPortText setFont getFont GridData GridData FILL_HORIZONTAL horizontalSpan proxyPortText setLayoutData proxyPortText addModifyListener ModifyListener modifyText ModifyEvent isValidPort proxyPortText getText setErrorMessage createSpacer enableAuth enableAuth setText CVSSSH2PreferencePage GridData horizontalSpan enableAuth setLayoutData proxyUserLabel proxyUserLabel setText CVSSSH2PreferencePage proxyUserText proxyUserText setFont getFont GridData GridData FILL_HORIZONTAL horizontalSpan proxyUserText setLayoutData proxyPassLabel proxyPassLabel setText CVSSSH2PreferencePage proxyPassText proxyPassText setFont getFont GridData GridData FILL_HORIZONTAL horizontalSpan proxyPassText setLayoutData performDefaults enableProxy addSelectionListener SelectionListener widgetSelected SelectionEvent updateControls widgetDefaultSelected SelectionEvent enableAuth addSelectionListener SelectionListener widgetSelected SelectionEvent updateControls widgetDefaultSelected SelectionEvent
key Comment Text add Modify Listener new Modify Listener public void modify Text Modify Event e if kpair null return try Byte Array Output Stream out new Byte Array Output Stream kpair write Public Key out key Comment Text get Text out close public Key Text set Text out to String catch IO Exception ee  keyCommentText addModifyListener ModifyListener modifyText ModifyEvent ByteArrayOutputStream ByteArrayOutputStream writePublicKey keyCommentText getText publicKeyText setText toString IOException
key Passphrase1 Text add Modify Listener new Modify Listener public void modify Text Modify Event e String pass1 key Passphrase1 Text get Text String pass2 key Passphrase2 Text get Text if kpair null pass1 equals pass2 save Key Pair set Enabled true else save Key Pair set Enabled false if pass2 length 0 set Error Message null return if pass1 equals pass2 set Error Message null else set Error Message Policy bind CVSSSH2 Preference Page 48 NON NLS 1  keyPassphrase1Text addModifyListener ModifyListener modifyText ModifyEvent keyPassphrase1Text getText keyPassphrase2Text getText saveKeyPair setEnabled saveKeyPair setEnabled setErrorMessage setErrorMessage setErrorMessage CVSSSH2PreferencePage
key Passphrase2 Text add Modify Listener new Modify Listener public void modify Text Modify Event e String pass1 key Passphrase1 Text get Text String pass2 key Passphrase2 Text get Text if kpair null pass1 equals pass2 save Key Pair set Enabled true else save Key Pair set Enabled false if pass2 length pass1 length if pass1 starts With pass2 set Error Message null else set Error Message Policy bind CVSSSH2 Preference Page 48 NON NLS 1 return if pass1 equals pass2 set Error Message null else set Error Message Policy bind CVSSSH2 Preference Page 48 NON NLS 1  keyPassphrase2Text addModifyListener ModifyListener modifyText ModifyEvent keyPassphrase1Text getText keyPassphrase2Text getText saveKeyPair setEnabled saveKeyPair setEnabled startsWith setErrorMessage setErrorMessage CVSSSH2PreferencePage setErrorMessage setErrorMessage CVSSSH2PreferencePage
key Passphrase2 Text add Focus Listener new Focus Listener public void focus Gained Focus Event e String pass1 key Passphrase1 Text get Text String pass2 key Passphrase2 Text get Text if pass2 length pass1 length if pass1 starts With pass2 set Error Message null else set Error Message Policy bind CVSSSH2 Preference Page 48 NON NLS 1 return if pass1 equals pass2 set Error Message null else set Error Message Policy bind CVSSSH2 Preference Page 48 NON NLS 1  keyPassphrase2Text addFocusListener FocusListener focusGained FocusEvent keyPassphrase1Text getText keyPassphrase2Text getText startsWith setErrorMessage setErrorMessage CVSSSH2PreferencePage setErrorMessage setErrorMessage CVSSSH2PreferencePage
public void focus Lost Focus Event e String pass1 key Passphrase1 Text get Text String pass2 key Passphrase2 Text get Text if pass1 equals pass2 set Error Message null else set Error Message Policy bind CVSSSH2 Preference Page 48 NON NLS 1  focusLost FocusEvent keyPassphrase1Text getText keyPassphrase2Text getText setErrorMessage setErrorMessage CVSSSH2PreferencePage
new Runnable public void run try  kpair 0 Key Pair gen Key Pair  jsch   type catch J Sch Exception e  e 0 e  _kpair KeyPair genKeyPair _jsch __type JSchException _e
Selection Adapter keygenadapter new Selection Adapter public void widget Selected Selection Event e J Sch jsch J Sch Session getJ Sch boolean ok true String  type NON NLS 1 try int type 0 if e widget key GenerateDSA type Key Pair DSA  type DSA else if e widget key GenerateRSA type Key Pair RSA  type RSA else return final Key Pair  kpair new Key Pair 1 final J Sch  jsch jsch final int   type type final J Sch Exception  e new J Sch Exception 1 Busy Indicator show While get Shell get Display new Runnable public void run try  kpair 0 Key Pair gen Key Pair  jsch   type catch J Sch Exception e  e 0 e if  e 0 null throw  e 0 kpair  kpair 0 Byte Array Output Stream out new Byte Array Output Stream kpair Comment  type 1024 NON NLS 1 kpair write Public Key out kpair Comment out close public Key Text set Text out to String key Finger Print Text set Text kpair get Finger Print key Comment Text set Text kpair Comment key Passphrase1 Text set Text NON NLS 1 key Passphrase2 Text set Text NON NLS 1 update Controls catch IO Exception ee ok false catch J Sch Exception ee ok false if ok Message Dialog open Error get Shell Policy bind CVSSSH2 Preference Page error NON NLS 1 Policy bind CVSSSH2 Preference Page 47 NON NLS 1  SelectionAdapter SelectionAdapter widgetSelected SelectionEvent JSch JSchSession getJSch _type keyGenerateDSA KeyPair _type keyGenerateRSA KeyPair _type KeyPair _kpair KeyPair JSch _jsch __type JSchException _e JSchException BusyIndicator showWhile getShell getDisplay _kpair KeyPair genKeyPair _jsch __type JSchException _e _e _e _kpair ByteArrayOutputStream ByteArrayOutputStream kpairComment _type writePublicKey kpairComment publicKeyText setText toString keyFingerPrintText setText getFingerPrint keyCommentText setText kpairComment keyPassphrase1Text setText keyPassphrase2Text setText updateControls IOException JSchException MessageDialog openError getShell CVSSSH2PreferencePage CVSSSH2PreferencePage
key Load add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean ok true String home ssh2 Home Text get Text File Dialog fd new File Dialog get Shell SWT OPEN fd set Filter Path home Object o fd open if o null cancel return String pkey fd get File Name String pkeyab new File fd get Filter Path pkey get Absolute Path try J Sch jsch J Sch Session getJ Sch Key Pair  kpair Key Pair load jsch pkeyab Passphrase Prompt prompt null while  kpair is Encrypted if prompt null prompt new Passphrase Prompt Policy bind CVSSSH2 Preference Page 126 pkey NON NLS 1 Display get Default sync Exec prompt String passphrase prompt get Passphrase if passphrase null break if  kpair decrypt passphrase break Message Dialog open Error get Shell Policy bind CVSSSH2 Preference Page error NON NLS 1 Policy bind CVSSSH2 Preference Page 129 pkey NON NLS 1 if  kpair is Encrypted return kpair  kpair String  type kpair get Key Type Key Pair DSA DSA RSA Byte Array Output Stream out new Byte Array Output Stream kpair Comment  type 1024 NON NLS 1 kpair write Public Key out kpair Comment out close public Key Text set Text out to String key Finger Print Text set Text kpair get Finger Print key Comment Text set Text kpair Comment key Passphrase1 Text set Text NON NLS 1 key Passphrase2 Text set Text NON NLS 1 update Controls catch IO Exception ee ok false catch J Sch Exception ee ok false if ok Message Dialog open Error get Shell Policy bind CVSSSH2 Preference Page error NON NLS 1 Policy bind CVSSSH2 Preference Page 130 NON NLS 1  keyLoad addSelectionListener SelectionAdapter widgetSelected SelectionEvent ssh2HomeText getText FileDialog FileDialog getShell setFilterPath getFileName getFilterPath getAbsolutePath JSch JSchSession getJSch KeyPair _kpair KeyPair PassphrasePrompt _kpair isEncrypted PassphrasePrompt CVSSSH2PreferencePage getDefault syncExec getPassphrase _kpair MessageDialog openError getShell CVSSSH2PreferencePage CVSSSH2PreferencePage _kpair isEncrypted _kpair _type getKeyType KeyPair ByteArrayOutputStream ByteArrayOutputStream kpairComment _type writePublicKey kpairComment publicKeyText setText toString keyFingerPrintText setText getFingerPrint keyCommentText setText kpairComment keyPassphrase1Text setText keyPassphrase2Text setText updateControls IOException JSchException MessageDialog openError getShell CVSSSH2PreferencePage CVSSSH2PreferencePage
Display get Default sync Exec new Runnable public void run Display display Display get Current Shell shell new Shell display Export Dialog dialog new Export Dialog shell title message dialog open shell dispose target 0 dialog get Target  getDefault syncExec getCurrent ExportDialog ExportDialog getTarget
key Export add Selection Listener new Selection Adapter public void widget Selected Selection Event e if kpair null return set Error Message null final String target new String 1 final String title Policy bind CVSSSH2 Preference Page 106 NON NLS 1 final String message Policy bind CVSSSH2 Preference Page 107 NON NLS 1 Display get Default sync Exec new Runnable public void run Display display Display get Current Shell shell new Shell display Export Dialog dialog new Export Dialog shell title message dialog open shell dispose target 0 dialog get Target if target 0 null return String user NON NLS 1 String host NON NLS 1 int port 22 if target 0 index Of 0 user target 0 substring 0 target 0 index Of host target 0 substring target 0 index Of 1 if host index Of 0 try port Integer parse Int host substring host index Of 1 catch Number Format Exception ee port 1 host host substring 0 host index Of if user length 0 host length 0 port 1 set Error Message Policy bind CVSSSH2 Preference Page 108 target 0 NON NLS 1 return String options NON NLS 1 try Byte Array Output Stream bos new Byte Array Output Stream if options length 0 try bos write options get Bytes NON NLS 1 catch IO Exception eeee kpair write Public Key bos kpair Comment bos close export via sftp user host port ssh authorized keys NON NLS 1 bos to Byte Array catch IO Exception ee catch J Sch Exception ee set Error Message Policy bind CVSSSH2 Preference Page 111 NON NLS 1  keyExport addSelectionListener SelectionAdapter widgetSelected SelectionEvent setErrorMessage CVSSSH2PreferencePage CVSSSH2PreferencePage getDefault syncExec getCurrent ExportDialog ExportDialog getTarget indexOf indexOf indexOf indexOf parseInt indexOf NumberFormatException indexOf setErrorMessage CVSSSH2PreferencePage ByteArrayOutputStream ByteArrayOutputStream getBytes IOException writePublicKey kpairComment export_via_sftp authorized_keys toByteArray IOException JSchException setErrorMessage CVSSSH2PreferencePage
save Key Pair add Selection Listener new Selection Adapter public void widget Selected Selection Event e if kpair null return String pass key Passphrase1 Text get Text if pass equals key Passphrase2 Text get Text set Error Message Policy bind CVSSSH2 Preference Page 48 NON NLS 1 return if pass length 0 if Message Dialog open Confirm get Shell Policy bind CVSSSH2 Preference Page confirmation NON NLS 1 Policy bind CVSSSH2 Preference Page 49 NON NLS 1 return kpair set Passphrase pass I Preference Store store CVSSSH2 Plugin get Default get Preference Store String home ssh2 Home Text get Text File  home new File home if  home exists if Message Dialog open Confirm get Shell Policy bind CVSSSH2 Preference Page confirmation NON NLS 1 Policy bind CVSSSH2 Preference Page 50 home NON NLS 1 return if  home mkdirs set Error Message Policy bind CVSSSH2 Preference Page 100 home NON NLS 1 return File Dialog fd new File Dialog get Shell SWT SAVE fd set Filter Path home String file kpair get Key Type Key Pair RSA id rsa id dsa NON NLS 1 NON NLS 2 fd set File Name file file fd open if file null cancel return if new File file exists if Message Dialog open Confirm get Shell Policy bind CVSSSH2 Preference Page confirmation NON NLS 1 Policy bind CVSSSH2 Preference Page 53 file NON NLS 1 return boolean ok true try kpair write Private Key file kpair write Public Key file pub kpair Comment NON NLS 1 catch Exception ee ok false if ok Message Dialog open Information get Shell Policy bind CVSSSH2 Preference Page information NON NLS 1 Policy bind CVSSSH2 Preference Page 55 NON NLS 1 n NON NLS 1 Policy bind CVSSSH2 Preference Page 57 file NON NLS 1 n NON NLS 1 Policy bind CVSSSH2 Preference Page 59 NON NLS 1 file pub NON NLS 1  saveKeyPair addSelectionListener SelectionAdapter widgetSelected SelectionEvent keyPassphrase1Text getText keyPassphrase2Text getText setErrorMessage CVSSSH2PreferencePage MessageDialog openConfirm getShell CVSSSH2PreferencePage CVSSSH2PreferencePage setPassphrase IPreferenceStore CVSSSH2Plugin getDefault getPreferenceStore ssh2HomeText getText _home _home MessageDialog openConfirm getShell CVSSSH2PreferencePage CVSSSH2PreferencePage _home setErrorMessage CVSSSH2PreferencePage FileDialog FileDialog getShell setFilterPath getKeyType KeyPair id_rsa id_dsa setFileName MessageDialog openConfirm getShell CVSSSH2PreferencePage CVSSSH2PreferencePage writePrivateKey writePublicKey kpairComment MessageDialog openInformation getShell CVSSSH2PreferencePage CVSSSH2PreferencePage CVSSSH2PreferencePage CVSSSH2PreferencePage
private Control create Key Management Page Composite parent int column Span 3 Composite group new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 3 group set Layout layout Grid Data gd new Grid Data gd horizontal Alignment Grid Data FILL group set Layout Data gd key GenerateDSA new Button group SWT NULL key GenerateDSA set Text Policy bind CVSSSH2 Preference Page 131 NON NLS 1 gd new Grid Data gd horizontal Span 1 key GenerateDSA set Layout Data gd key GenerateRSA new Button group SWT NULL key GenerateRSA set Text Policy bind CVSSSH2 Preference Page 132 NON NLS 1 gd new Grid Data gd horizontal Span 1 key GenerateRSA set Layout Data gd key Load new Button group SWT NULL key Load set Text Policy bind CVSSSH2 Preference Page 128 NON NLS 1 gd new Grid Data gd horizontal Span 1 key Load set Layout Data gd public Keylabel new Label group SWT NONE public Keylabel set Text Policy bind CVSSSH2 Preference Page 39 NON NLS 1 gd new Grid Data gd horizontal Span column Span public Keylabel set Layout Data gd public Key Text new Text group SWT MULTI SWT BORDER SWT V SCROLL SWT WRAP public Key Text set Text NON NLS 1 public Key Text set Editable false gd new Grid Data gd horizontal Span column Span gd horizontal Alignment Grid Data FILL gd vertical Alignment Grid Data FILL gd grab Excess Horizontal Space true gd grab Excess Vertical Space true public Key Text set Layout Data gd key Export new Button group SWT NULL key Export set Text Policy bind CVSSSH2 Preference Page 105 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN END gd horizontal Span column Span key Export set Layout Data gd key Finger Print Label new Label group SWT NONE key Finger Print Label set Text Policy bind CVSSSH2 Preference Page 41 NON NLS 1 key Finger Print Text new Text group SWT SINGLE SWT BORDER key Finger Print Text set Font group get Font key Finger Print Text set Editable false gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 key Finger Print Text set Layout Data gd key Comment Label new Label group SWT NONE key Comment Label set Text Policy bind CVSSSH2 Preference Page 42 NON NLS 1 key Comment Text new Text group SWT SINGLE SWT BORDER key Comment Text set Font group get Font gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 key Comment Text set Layout Data gd key Comment Text add Modify Listener new Modify Listener public void modify Text Modify Event e if kpair null return try Byte Array Output Stream out new Byte Array Output Stream kpair write Public Key out key Comment Text get Text out close public Key Text set Text out to String catch IO Exception ee key Passphrase1 Label new Label group SWT NONE key Passphrase1 Label set Text Policy bind CVSSSH2 Preference Page 43 NON NLS 1 key Passphrase1 Text new Text group SWT SINGLE SWT BORDER key Passphrase1 Text set Font group get Font key Passphrase1 Text set Echo Char gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 key Passphrase1 Text set Layout Data gd key Passphrase2 Label new Label group SWT NONE key Passphrase2 Label set Text Policy bind CVSSSH2 Preference Page 44 NON NLS 1 key Passphrase2 Text new Text group SWT SINGLE SWT BORDER key Passphrase2 Text set Font group get Font key Passphrase2 Text set Echo Char gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 key Passphrase2 Text set Layout Data gd key Passphrase1 Text add Modify Listener new Modify Listener public void modify Text Modify Event e String pass1 key Passphrase1 Text get Text String pass2 key Passphrase2 Text get Text if kpair null pass1 equals pass2 save Key Pair set Enabled true else save Key Pair set Enabled false if pass2 length 0 set Error Message null return if pass1 equals pass2 set Error Message null else set Error Message Policy bind CVSSSH2 Preference Page 48 NON NLS 1 key Passphrase2 Text add Modify Listener new Modify Listener public void modify Text Modify Event e String pass1 key Passphrase1 Text get Text String pass2 key Passphrase2 Text get Text if kpair null pass1 equals pass2 save Key Pair set Enabled true else save Key Pair set Enabled false if pass2 length pass1 length if pass1 starts With pass2 set Error Message null else set Error Message Policy bind CVSSSH2 Preference Page 48 NON NLS 1 return if pass1 equals pass2 set Error Message null else set Error Message Policy bind CVSSSH2 Preference Page 48 NON NLS 1 key Passphrase2 Text add Focus Listener new Focus Listener public void focus Gained Focus Event e String pass1 key Passphrase1 Text get Text String pass2 key Passphrase2 Text get Text if pass2 length pass1 length if pass1 starts With pass2 set Error Message null else set Error Message Policy bind CVSSSH2 Preference Page 48 NON NLS 1 return if pass1 equals pass2 set Error Message null else set Error Message Policy bind CVSSSH2 Preference Page 48 NON NLS 1 public void focus Lost Focus Event e String pass1 key Passphrase1 Text get Text String pass2 key Passphrase2 Text get Text if pass1 equals pass2 set Error Message null else set Error Message Policy bind CVSSSH2 Preference Page 48 NON NLS 1 save Key Pair new Button group SWT NULL save Key Pair set Text Policy bind CVSSSH2 Preference Page 45 NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN END gd horizontal Span column Span save Key Pair set Layout Data gd Selection Adapter keygenadapter new Selection Adapter public void widget Selected Selection Event e J Sch jsch J Sch Session getJ Sch boolean ok true String  type NON NLS 1 try int type 0 if e widget key GenerateDSA type Key Pair DSA  type DSA else if e widget key GenerateRSA type Key Pair RSA  type RSA else return final Key Pair  kpair new Key Pair 1 final J Sch  jsch jsch final int   type type final J Sch Exception  e new J Sch Exception 1 Busy Indicator show While get Shell get Display new Runnable public void run try  kpair 0 Key Pair gen Key Pair  jsch   type catch J Sch Exception e  e 0 e if  e 0 null throw  e 0 kpair  kpair 0 Byte Array Output Stream out new Byte Array Output Stream kpair Comment  type 1024 NON NLS 1 kpair write Public Key out kpair Comment out close public Key Text set Text out to String key Finger Print Text set Text kpair get Finger Print key Comment Text set Text kpair Comment key Passphrase1 Text set Text NON NLS 1 key Passphrase2 Text set Text NON NLS 1 update Controls catch IO Exception ee ok false catch J Sch Exception ee ok false if ok Message Dialog open Error get Shell Policy bind CVSSSH2 Preference Page error NON NLS 1 Policy bind CVSSSH2 Preference Page 47 NON NLS 1 key GenerateDSA add Selection Listener keygenadapter key GenerateRSA add Selection Listener keygenadapter key Load add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean ok true String home ssh2 Home Text get Text File Dialog fd new File Dialog get Shell SWT OPEN fd set Filter Path home Object o fd open if o null cancel return String pkey fd get File Name String pkeyab new File fd get Filter Path pkey get Absolute Path try J Sch jsch J Sch Session getJ Sch Key Pair  kpair Key Pair load jsch pkeyab Passphrase Prompt prompt null while  kpair is Encrypted if prompt null prompt new Passphrase Prompt Policy bind CVSSSH2 Preference Page 126 pkey NON NLS 1 Display get Default sync Exec prompt String passphrase prompt get Passphrase if passphrase null break if  kpair decrypt passphrase break Message Dialog open Error get Shell Policy bind CVSSSH2 Preference Page error NON NLS 1 Policy bind CVSSSH2 Preference Page 129 pkey NON NLS 1 if  kpair is Encrypted return kpair  kpair String  type kpair get Key Type Key Pair DSA DSA RSA Byte Array Output Stream out new Byte Array Output Stream kpair Comment  type 1024 NON NLS 1 kpair write Public Key out kpair Comment out close public Key Text set Text out to String key Finger Print Text set Text kpair get Finger Print key Comment Text set Text kpair Comment key Passphrase1 Text set Text NON NLS 1 key Passphrase2 Text set Text NON NLS 1 update Controls catch IO Exception ee ok false catch J Sch Exception ee ok false if ok Message Dialog open Error get Shell Policy bind CVSSSH2 Preference Page error NON NLS 1 Policy bind CVSSSH2 Preference Page 130 NON NLS 1 key Export add Selection Listener new Selection Adapter public void widget Selected Selection Event e if kpair null return set Error Message null final createKeyManagementPage columnSpan GridLayout GridLayout numColumns setLayout GridData GridData horizontalAlignment GridData setLayoutData keyGenerateDSA keyGenerateDSA setText CVSSSH2PreferencePage GridData horizontalSpan keyGenerateDSA setLayoutData keyGenerateRSA keyGenerateRSA setText CVSSSH2PreferencePage GridData horizontalSpan keyGenerateRSA setLayoutData keyLoad keyLoad setText CVSSSH2PreferencePage GridData horizontalSpan keyLoad setLayoutData publicKeylabel publicKeylabel setText CVSSSH2PreferencePage GridData horizontalSpan columnSpan publicKeylabel setLayoutData publicKeyText V_SCROLL publicKeyText setText publicKeyText setEditable GridData horizontalSpan columnSpan horizontalAlignment GridData verticalAlignment GridData grabExcessHorizontalSpace grabExcessVerticalSpace publicKeyText setLayoutData keyExport keyExport setText CVSSSH2PreferencePage GridData GridData HORIZONTAL_ALIGN_END horizontalSpan columnSpan keyExport setLayoutData keyFingerPrintLabel keyFingerPrintLabel setText CVSSSH2PreferencePage keyFingerPrintText keyFingerPrintText setFont getFont keyFingerPrintText setEditable GridData GridData FILL_HORIZONTAL horizontalSpan keyFingerPrintText setLayoutData keyCommentLabel keyCommentLabel setText CVSSSH2PreferencePage keyCommentText keyCommentText setFont getFont GridData GridData FILL_HORIZONTAL horizontalSpan keyCommentText setLayoutData keyCommentText addModifyListener ModifyListener modifyText ModifyEvent ByteArrayOutputStream ByteArrayOutputStream writePublicKey keyCommentText getText publicKeyText setText toString IOException keyPassphrase1Label keyPassphrase1Label setText CVSSSH2PreferencePage keyPassphrase1Text keyPassphrase1Text setFont getFont keyPassphrase1Text setEchoChar GridData GridData FILL_HORIZONTAL horizontalSpan keyPassphrase1Text setLayoutData keyPassphrase2Label keyPassphrase2Label setText CVSSSH2PreferencePage keyPassphrase2Text keyPassphrase2Text setFont getFont keyPassphrase2Text setEchoChar GridData GridData FILL_HORIZONTAL horizontalSpan keyPassphrase2Text setLayoutData keyPassphrase1Text addModifyListener ModifyListener modifyText ModifyEvent keyPassphrase1Text getText keyPassphrase2Text getText saveKeyPair setEnabled saveKeyPair setEnabled setErrorMessage setErrorMessage setErrorMessage CVSSSH2PreferencePage keyPassphrase2Text addModifyListener ModifyListener modifyText ModifyEvent keyPassphrase1Text getText keyPassphrase2Text getText saveKeyPair setEnabled saveKeyPair setEnabled startsWith setErrorMessage setErrorMessage CVSSSH2PreferencePage setErrorMessage setErrorMessage CVSSSH2PreferencePage keyPassphrase2Text addFocusListener FocusListener focusGained FocusEvent keyPassphrase1Text getText keyPassphrase2Text getText startsWith setErrorMessage setErrorMessage CVSSSH2PreferencePage setErrorMessage setErrorMessage CVSSSH2PreferencePage focusLost FocusEvent keyPassphrase1Text getText keyPassphrase2Text getText setErrorMessage setErrorMessage CVSSSH2PreferencePage saveKeyPair saveKeyPair setText CVSSSH2PreferencePage GridData GridData HORIZONTAL_ALIGN_END horizontalSpan columnSpan saveKeyPair setLayoutData SelectionAdapter SelectionAdapter widgetSelected SelectionEvent JSch JSchSession getJSch _type keyGenerateDSA KeyPair _type keyGenerateRSA KeyPair _type KeyPair _kpair KeyPair JSch _jsch __type JSchException _e JSchException BusyIndicator showWhile getShell getDisplay _kpair KeyPair genKeyPair _jsch __type JSchException _e _e _e _kpair ByteArrayOutputStream ByteArrayOutputStream kpairComment _type writePublicKey kpairComment publicKeyText setText toString keyFingerPrintText setText getFingerPrint keyCommentText setText kpairComment keyPassphrase1Text setText keyPassphrase2Text setText updateControls IOException JSchException MessageDialog openError getShell CVSSSH2PreferencePage CVSSSH2PreferencePage keyGenerateDSA addSelectionListener keyGenerateRSA addSelectionListener keyLoad addSelectionListener SelectionAdapter widgetSelected SelectionEvent ssh2HomeText getText FileDialog FileDialog getShell setFilterPath getFileName getFilterPath getAbsolutePath JSch JSchSession getJSch KeyPair _kpair KeyPair PassphrasePrompt _kpair isEncrypted PassphrasePrompt CVSSSH2PreferencePage getDefault syncExec getPassphrase _kpair MessageDialog openError getShell CVSSSH2PreferencePage CVSSSH2PreferencePage _kpair isEncrypted _kpair _type getKeyType KeyPair ByteArrayOutputStream ByteArrayOutputStream kpairComment _type writePublicKey kpairComment publicKeyText setText toString keyFingerPrintText setText getFingerPrint keyCommentText setText kpairComment keyPassphrase1Text setText keyPassphrase2Text setText updateControls IOException JSchException MessageDialog openError getShell CVSSSH2PreferencePage CVSSSH2PreferencePage keyExport addSelectionListener SelectionAdapter widgetSelected SelectionEvent setErrorMessage
private void export via sftp String user String host int port String target byte pkey throws J Sch Exception try int i 0 String authorized keys target String dir String separator i target last Index Of if i 0 i target last Index Of if i 0 separator else if i 0 authorized keys target substring i 1 dir target substring 0 i 1 I Progress Monitor pm new org eclipse core runtime Null Progress Monitor Session session J Sch Session get Session null user host port new J Sch Session Responsive Socket Facory pm NON NLS 1 if session get Server Version index Of OpenSSH 1 NON NLS 1 set Error Message Policy bind CVSSSH2 Preference Page 110 NON NLS 1 return Channel channel session open Channel sftp NON NLS 1 channel connect Channel Sftp c Channel Sftp channel String pwd c pwd SftpATTRS attr null try attr c stat ssh NON NLS 1 catch Sftp Exception ee if attr null try c mkdir ssh NON NLS 1 catch Sftp Exception ee set Error Message ee message return try c cd ssh NON NLS 1 catch Sftp Exception ee set Error Message ee message return try Byte Array Input Stream bis new Byte Array Input Stream pkey c put bis authorized keys null Channel Sftp APPEND NON NLS 1 bis close check Permission c authorized keys NON NLS 1 check Permission c ssh NON NLS 1 c cd NON NLS 1 check Permission c home directory NON NLS 1 catch Sftp Exception ee set Error Message debug ee message Message Dialog open Information get Shell Policy bind CVSSSH2 Preference Page information NON NLS 1 Policy bind CVSSSH2 Preference Page 109 NON NLS 1 user host port 22 port ssh authorized keys NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 c disconnect session disconnect catch IO Exception eee set Error Message eee to String  export_via_sftp JSchException authorized_keys lastIndexOf lastIndexOf authorized_keys IProgressMonitor NullProgressMonitor JSchSession getSession JSchSession ResponsiveSocketFacory getServerVersion indexOf setErrorMessage CVSSSH2PreferencePage openChannel ChannelSftp ChannelSftp SftpException SftpException setErrorMessage SftpException setErrorMessage ByteArrayInputStream ByteArrayInputStream authorized_keys ChannelSftp checkPermission authorized_keys checkPermission checkPermission SftpException setErrorMessage MessageDialog openInformation getShell CVSSSH2PreferencePage CVSSSH2PreferencePage authorized_keys IOException setErrorMessage toString
private void check Permission Channel Sftp c String path throws Sftp Exception SftpATTRS attr c stat path int permissions attr get Permissions if permissions 00022 0 permissions 00022 c chmod permissions path  checkPermission ChannelSftp SftpException getPermissions
private void update Controls boolean enable enable Proxy get Selection proxy Type Label set Enabled enable proxy Type Combo set Enabled enable proxy Port Label set Enabled enable proxy Port Text set Enabled enable proxy Host Label set Enabled enable proxy Host Text set Enabled enable enable Auth set Enabled enable enable enable Auth get Selection proxy User Label set Enabled enable proxy User Text set Enabled enable proxy Pass Label set Enabled enable proxy Pass Text set Enabled enable enable kpair null public Keylabel set Enabled enable public Key Text set Enabled enable key Finger Print Label set Enabled enable key Finger Print Text set Enabled enable key Comment Label set Enabled enable key Comment Text set Enabled enable key Passphrase1 Label set Enabled enable key Passphrase1 Text set Enabled enable key Passphrase2 Label set Enabled enable key Passphrase2 Text set Enabled enable key Export set Enabled enable save Key Pair set Enabled enable  updateControls enableProxy getSelection proxyTypeLabel setEnabled proxyTypeCombo setEnabled proxyPortLabel setEnabled proxyPortText setEnabled proxyHostLabel setEnabled proxyHostText setEnabled enableAuth setEnabled enableAuth getSelection proxyUserLabel setEnabled proxyUserText setEnabled proxyPassLabel setEnabled proxyPassText setEnabled publicKeylabel setEnabled publicKeyText setEnabled keyFingerPrintLabel setEnabled keyFingerPrintText setEnabled keyCommentLabel setEnabled keyCommentText setEnabled keyPassphrase1Label setEnabled keyPassphrase1Text setEnabled keyPassphrase2Label setEnabled keyPassphrase2Text setEnabled keyExport setEnabled saveKeyPair setEnabled
public void init I Workbench workbench super init workbench init Controls  IWorkbench initControls
public void initialize init Controls  initControls
public static void init Defaults I Preference Store store set Default store KEY SSH2HOME J Sch Session default ssh home set Default store KEY PRIVATEKEY privatekeys set Default store KEY PROXY TYPE HTTP set Default store KEY PROXY PORT HTTP DEFAULT PORT set Default store KEY PROXY AUTH false NON NLS 1 set Default store KEY PROXY USER NON NLS 1 set Default store KEY PROXY PASS NON NLS 1  initDefaults IPreferenceStore setDefault KEY_SSH2HOME JSchSession default_ssh_home setDefault KEY_PRIVATEKEY setDefault KEY_PROXY_TYPE setDefault KEY_PROXY_PORT HTTP_DEFAULT_PORT setDefault KEY_PROXY_AUTH setDefault KEY_PROXY_USER setDefault KEY_PROXY_PASS
private static void set Default I Preference Store store String key String value store set Default key value if store get String key length 0 store set Value key value  setDefault IPreferenceStore setDefault getString setValue
private void init Controls I Preference Store store CVSSSH2 Plugin get Default get Preference Store ssh2 Home Text set Text store get String KEY SSH2HOME private Key Text set Text store get String KEY PRIVATEKEY use Proxy store get String KEY PROXY equals true NON NLS 1 enable Proxy set Selection use Proxy proxy Host Text set Text store get String KEY PROXY HOST proxy Type Combo select store get String KEY PROXY TYPE equals HTTP 0 1 proxy Port Text set Text store get String KEY PROXY PORT use Auth store get String KEY PROXY AUTH equals true NON NLS 1 enable Auth set Selection use Auth Map map Platform get Authorization Info FAKE URL proxy AUTH SCHEME NON NLS 1 if map null String username String map get KEY PROXY USER if username null proxy User Text set Text username String password String map get KEY PROXY PASS if password null proxy Pass Text set Text password proxy Pass Text set Echo Char update Controls  initControls IPreferenceStore CVSSSH2Plugin getDefault getPreferenceStore ssh2HomeText setText getString KEY_SSH2HOME privateKeyText setText getString KEY_PRIVATEKEY useProxy getString KEY_PROXY enableProxy setSelection useProxy proxyHostText setText getString KEY_PROXY_HOST proxyTypeCombo getString KEY_PROXY_TYPE proxyPortText setText getString KEY_PROXY_PORT useAuth getString KEY_PROXY_AUTH enableAuth setSelection useAuth getAuthorizationInfo FAKE_URL AUTH_SCHEME KEY_PROXY_USER proxyUserText setText KEY_PROXY_PASS proxyPassText setText proxyPassText setEchoChar updateControls
public boolean perform Ok boolean result super perform Ok if result set Error Message null String home ssh2 Home Text get Text File  home new File home if  home exists if Message Dialog open Question get Shell Policy bind CVSSSH2 Preference Page question NON NLS 1 Policy bind CVSSSH2 Preference Page 99 home NON NLS 1 if  home mkdirs set Error Message Policy bind CVSSSH2 Preference Page 100 home NON NLS 1 return false if enable Proxy get Selection is Valid Port proxy Port Text get Text return false I Preference Store store CVSSSH2 Plugin get Default get Preference Store store set Value KEY SSH2HOME home store set Value KEY PRIVATEKEY private Key Text get Text store set Value KEY PROXY enable Proxy get Selection store set Value KEY PROXY TYPE proxy Type Combo get Text store set Value KEY PROXY HOST proxy Host Text get Text store set Value KEY PROXY PORT proxy Port Text get Text store set Value KEY PROXY AUTH enable Auth get Selection store set Value KEY PROXY USER NON NLS 1 store set Value KEY PROXY PASS NON NLS 1 Map map Platform get Authorization Info FAKE URL proxy AUTH SCHEME NON NLS 1 if map null map new java util Hash Map 10 map put KEY PROXY USER proxy User Text get Text map put KEY PROXY PASS proxy Pass Text get Text try Platform add Authorization Info FAKE URL proxy AUTH SCHEME map NON NLS 1 catch Core Exception e CVSSSH2 Plugin get Default save Plugin Preferences return result  performOk performOk setErrorMessage ssh2HomeText getText _home _home MessageDialog openQuestion getShell CVSSSH2PreferencePage CVSSSH2PreferencePage _home setErrorMessage CVSSSH2PreferencePage enableProxy getSelection isValidPort proxyPortText getText IPreferenceStore CVSSSH2Plugin getDefault getPreferenceStore setValue KEY_SSH2HOME setValue KEY_PRIVATEKEY privateKeyText getText setValue KEY_PROXY enableProxy getSelection setValue KEY_PROXY_TYPE proxyTypeCombo getText setValue KEY_PROXY_HOST proxyHostText getText setValue KEY_PROXY_PORT proxyPortText getText setValue KEY_PROXY_AUTH enableAuth getSelection setValue KEY_PROXY_USER setValue KEY_PROXY_PASS getAuthorizationInfo FAKE_URL AUTH_SCHEME HashMap KEY_PROXY_USER proxyUserText getText KEY_PROXY_PASS proxyPassText getText addAuthorizationInfo FAKE_URL AUTH_SCHEME CoreException CVSSSH2Plugin getDefault savePluginPreferences
private boolean is Valid Port String port int i 1 try i Integer parse Int port catch Number Format Exception ee set Error Message Policy bind CVSSSH2 Preference Page 103 NON NLS 1 return false if i 0 i 65535 set Error Message Policy bind CVSSSH2 Preference Page 104 NON NLS 1 return false return true  isValidPort parseInt NumberFormatException setErrorMessage CVSSSH2PreferencePage setErrorMessage CVSSSH2PreferencePage
public void perform Apply set Error Message null String home ssh2 Home Text get Text File  home new File home if  home exists if Message Dialog open Question get Shell Policy bind CVSSSH2 Preference Page question NON NLS 1 Policy bind CVSSSH2 Preference Page 101 home NON NLS 1 if  home mkdirs set Error Message Policy bind CVSSSH2 Preference Page 102 home NON NLS 1 return if enable Proxy get Selection is Valid Port proxy Port Text get Text return I Preference Store store CVSSSH2 Plugin get Default get Preference Store store set Value KEY SSH2HOME ssh2 Home Text get Text store set Value KEY PRIVATEKEY private Key Text get Text store set Value KEY PROXY enable Proxy get Selection store set Value KEY PROXY TYPE proxy Type Combo get Text store set Value KEY PROXY HOST proxy Host Text get Text store set Value KEY PROXY PORT proxy Port Text get Text store set Value KEY PROXY AUTH enable Auth get Selection Map map Platform get Authorization Info FAKE URL proxy AUTH SCHEME NON NLS 1 if map null map new java util Hash Map 10 map put KEY PROXY USER proxy User Text get Text map put KEY PROXY PASS proxy Pass Text get Text try Platform add Authorization Info FAKE URL proxy AUTH SCHEME map NON NLS 1 catch Core Exception e  performApply setErrorMessage ssh2HomeText getText _home _home MessageDialog openQuestion getShell CVSSSH2PreferencePage CVSSSH2PreferencePage _home setErrorMessage CVSSSH2PreferencePage enableProxy getSelection isValidPort proxyPortText getText IPreferenceStore CVSSSH2Plugin getDefault getPreferenceStore setValue KEY_SSH2HOME ssh2HomeText getText setValue KEY_PRIVATEKEY privateKeyText getText setValue KEY_PROXY enableProxy getSelection setValue KEY_PROXY_TYPE proxyTypeCombo getText setValue KEY_PROXY_HOST proxyHostText getText setValue KEY_PROXY_PORT proxyPortText getText setValue KEY_PROXY_AUTH enableAuth getSelection getAuthorizationInfo FAKE_URL AUTH_SCHEME HashMap KEY_PROXY_USER proxyUserText getText KEY_PROXY_PASS proxyPassText getText addAuthorizationInfo FAKE_URL AUTH_SCHEME CoreException
protected void perform Defaults super perform Defaults enable Proxy set Selection false proxy Host Text set Text NON NLS 1 proxy Port Text set Text HTTP DEFAULT PORT proxy Type Combo select 0 enable Auth set Selection false proxy User Text set Text NON NLS 1 proxy Pass Text set Text NON NLS 1 update Controls  performDefaults performDefaults enableProxy setSelection proxyHostText setText proxyPortText setText HTTP_DEFAULT_PORT proxyTypeCombo enableAuth setSelection proxyUserText setText proxyPassText setText updateControls
protected void create Spacer Composite composite int column Span Label label new Label composite SWT NONE Grid Data gd new Grid Data gd horizontal Span column Span label set Layout Data gd  createSpacer columnSpan GridData GridData horizontalSpan columnSpan setLayoutData
public Export Dialog Shell parent Shell String title String message super parent Shell this title title this message message  ExportDialog parentShell parentShell
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text title  configureShell newShell configureShell newShell newShell setText
public void create super create field set Focus  setFocus
protected Control create Dialog Area Composite parent parent new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 1 parent set Layout layout parent set Layout Data new Grid Data Grid Data FILL HORIZONTAL Composite main new Composite parent SWT NONE layout new Grid Layout layout num Columns 3 main set Layout layout main set Layout Data new Grid Data Grid Data FILL BOTH if message null Label message Label new Label main SWT WRAP message Label set Text message Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 3 message Label set Layout Data data create Target Fields main Dialog apply Dialog Font main return main  createDialogArea GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_HORIZONTAL GridLayout numColumns setLayout setLayoutData GridData GridData FILL_BOTH messageLabel messageLabel setText GridData GridData GridData FILL_HORIZONTAL horizontalSpan messageLabel setLayoutData createTargetFields applyDialogFont
protected void create Target Fields Composite parent new Label parent SWT NONE set Text Policy bind CVSSSH2 Preference Page 125 NON NLS 1 field new Text parent SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint convert HorizontalDL Us To Pixels I Dialog Constants ENTRY FIELD WIDTH data horizontal Span 2 field set Layout Data data  createTargetFields setText CVSSSH2PreferencePage GridData GridData GridData FILL_HORIZONTAL widthHint convertHorizontalDLUsToPixels IDialogConstants ENTRY_FIELD_WIDTH horizontalSpan setLayoutData
public String get Target return target  getTarget
protected void ok Pressed String  target field get Text if  target null  target length 0 return target  target super ok Pressed  okPressed _target getText _target _target _target okPressed
protected void cancel Pressed target null super cancel Pressed  cancelPressed cancelPressed
private String message private String passphrase Passphrase Prompt String message this message message  PassphrasePrompt
public void run Display display Display get Current Shell shell new Shell display Passphrase Dialog dialog new Passphrase Dialog shell message dialog open shell dispose passphrase dialog get Passphrase  getCurrent PassphraseDialog PassphraseDialog getPassphrase
passphrase dialog get Passphrase public String get Passphrase return passphrase  getPassphrase getPassphrase
protected String message null public Passphrase Dialog Shell parent Shell String message super parent Shell this message message  PassphraseDialog parentShell parentShell
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text message  configureShell newShell configureShell newShell newShell setText
public void create super create passphrase Field set Focus  passphraseField setFocus
protected Control create Dialog Area Composite parent Composite main new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 main set Layout layout main set Layout Data new Grid Data Grid Data FILL BOTH if message null Label message Label new Label main SWT WRAP message Label set Text message Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 3 message Label set Layout Data data create Passphrase Fields main return main  createDialogArea GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_BOTH messageLabel messageLabel setText GridData GridData GridData FILL_HORIZONTAL horizontalSpan messageLabel setLayoutData createPassphraseFields
protected void create Passphrase Fields Composite parent new Label parent SWT NONE set Text Policy bind CVSSSH2 Preference Page 127 NON NLS 1 passphrase Field new Text parent SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint convert HorizontalDL Us To Pixels I Dialog Constants ENTRY FIELD WIDTH passphrase Field set Layout Data data passphrase Field set Echo Char new Label parent SWT NONE  createPassphraseFields setText CVSSSH2PreferencePage passphraseField GridData GridData GridData FILL_HORIZONTAL widthHint convertHorizontalDLUsToPixels IDialogConstants ENTRY_FIELD_WIDTH passphraseField setLayoutData passphraseField setEchoChar
public String get Passphrase return passphrase  getPassphrase
protected void ok Pressed String  passphrase passphrase Field get Text if  passphrase null  passphrase length 0 return passphrase  passphrase super ok Pressed  okPressed _passphrase passphraseField getText _passphrase _passphrase _passphrase okPressed
super ok Pressed protected void cancel Pressed passphrase null super cancel Pressed  okPressed cancelPressed cancelPressed

private I Server Connection ssh1 protected CVSSSH2 Server Connection ICVS Repository Location location String password this location location this password password  IServerConnection CVSSSH2ServerConnection ICVSRepositoryLocation
public void close throws IO Exception if ssh1 null ssh1 close ssh1 null return try if input Stream null try input Stream close catch IO Exception e Ignore I O Exception on close finally try if output Stream null try output Stream close catch IO Exception e Ignore I O Exception on close finally if channel null channel disconnect  IOException inputStream inputStream IOException outputStream outputStream IOException
public Input Stream get Input Stream if ssh1 null return ssh1 get Input Stream return input Stream  InputStream getInputStream getInputStream inputStream
public Output Stream get Output Stream if ssh1 null return ssh1 get Output Stream return output Stream  OutputStream getOutputStream getOutputStream outputStream
public void open I Progress Monitor monitor throws IO Exception CVS Authentication Exception if ssh1 null ssh1 open monitor return monitor sub Task Policy bind CVSSSH2 Server Connection open location get Host NON NLS 1 monitor worked 1 internal Open monitor  IProgressMonitor IOException CVSAuthenticationException subTask CVSSSH2ServerConnection getHost internalOpen
int timeout location get Timeout input Stream new Polling Input Stream new Timeout Input Stream new Filter Input Stream channel in public void close throws IO Exception Don t close the underlying stream as it belongs to the session  getTimeout inputStream PollingInputStream TimeoutInputStream FilterInputStream channel_in IOException
8192 buffer Size 1000 read Timeout 1 close Timeout true grow When Full timeout 0 timeout 1 monitor output Stream new Polling Output Stream new Timeout Output Stream new Filter Output Stream channel out public void close throws IO Exception Don t close the underlying stream as it belongs to the session  bufferSize readTimeout closeTimeout growWhenFull outputStream PollingOutputStream TimeoutOutputStream FilterOutputStream channel_out IOException
param monitor throws IO Exception throws CVS Authentication Exception private void internal Open I Progress Monitor monitor throws IO Exception CVS Authentication Exception try String hostname location get Host String username location get Username int port location get Port if port ICVS Repository Location USE DEFAULT PORT port 0 int retry 1 Output Stream channel out Input Stream channel in while true session J Sch Session get Session location username password hostname port new J Sch Session Responsive Socket Facory monitor channel session open Channel exec NON NLS 1 Channel Exec channel set Command COMMAND channel out channel get Output Stream channel in channel get Input Stream try channel connect catch J Sch Exception ee retry if retry 0 throw new CVS Authentication Exception Policy bind CVSSSH2 Server Connection 3 CVS Authentication Exception NO RETRY NON NLS 1 if session is Connected session disconnect continue break int timeout location get Timeout input Stream new Polling Input Stream new Timeout Input Stream new Filter Input Stream channel in public void close throws IO Exception Don t close the underlying stream as it belongs to the session 8192 buffer Size 1000 read Timeout 1 close Timeout true grow When Full timeout 0 timeout 1 monitor output Stream new Polling Output Stream new Timeout Output Stream new Filter Output Stream channel out public void close throws IO Exception Don t close the underlying stream as it belongs to the session 8192 buffersize 1000 write Timeout 1000 close Timeout timeout 0 timeout 1 monitor catch J Sch Exception e if e to String index Of invalid server s version string 1 NON NLS 1 throw new CVS Authentication Exception e to String CVS Authentication Exception NO RETRY ssh1 new SSH Server Connection location password if ssh1 null throw new CVS Authentication Exception e to String CVS Authentication Exception NO RETRY ssh1 open monitor  IOException CVSAuthenticationException internalOpen IProgressMonitor IOException CVSAuthenticationException getHost getUsername getPort ICVSRepositoryLocation USE_DEFAULT_PORT OutputStream channel_out InputStream channel_in JSchSession getSession JSchSession ResponsiveSocketFacory openChannel ChannelExec setCommand channel_out getOutputStream channel_in getInputStream JSchException CVSAuthenticationException CVSSSH2ServerConnection CVSAuthenticationException NO_RETRY isConnected getTimeout inputStream PollingInputStream TimeoutInputStream FilterInputStream channel_in IOException bufferSize readTimeout closeTimeout growWhenFull outputStream PollingOutputStream TimeoutOutputStream FilterOutputStream channel_out IOException writeTimeout closeTimeout JSchException toString indexOf CVSAuthenticationException toString CVSAuthenticationException NO_RETRY SSHServerConnection CVSAuthenticationException toString CVSAuthenticationException NO_RETRY

Output Stream out null public Socket create Socket String host int port throws IO Exception Unknown Host Exception Socket socket null socket new Socket host port return socket  OutputStream createSocket IOException UnknownHostException
public Input Stream get Input Stream Socket socket throws IO Exception if in null in socket get Input Stream return in  InputStream getInputStream IOException getInputStream
public Output Stream get Output Stream Socket socket throws IO Exception if out null out socket get Output Stream return out  OutputStream getOutputStream IOException getOutputStream
public static class Responsive Socket Facory extends Simple Socket Factory private I Progress Monitor monitor public Responsive Socket Facory I Progress Monitor monitor this monitor monitor  ResponsiveSocketFacory SimpleSocketFactory IProgressMonitor ResponsiveSocketFacory IProgressMonitor
public Socket create Socket String host int port throws IO Exception Unknown Host Exception Socket socket null socket Util create Socket host port monitor Null out the monitor so we don t hold onto anything i e the SSH2 session will keep a handle to the socket factory around monitor new Null Progress Monitor Set the socket timeout socket set So Timeout CVS Provider Plugin get Plugin get Timeout 1000 return socket  createSocket IOException UnknownHostException createSocket NullProgressMonitor setSoTimeout CVSProviderPlugin getPlugin getTimeout
My User Info String username ICVS Repository Location location this location location this username username ICVS Repository Location  location location if  location null String dummy extssh dummy dummy NON NLS 1 try  location CVS Repository Location from String dummy catch CVS Exception e authenticator  location get User Authenticator  MyUserInfo ICVSRepositoryLocation ICVSRepositoryLocation _location _location _location CVSRepositoryLocation fromString CVSException _location getUserAuthenticator
public String get Password return password  getPassword
return password public String get Passphrase return passphrase  getPassphrase
public boolean prompt Yes No String str int prompt authenticator prompt location I User Authenticator QUESTION Policy bind J Sch Session 5 NON NLS 1 str new int I User Authenticator YES ID I User Authenticator NO ID 0 yes the default return prompt 0  promptYesNo IUserAuthenticator JSchSession IUserAuthenticator YES_ID IUserAuthenticator NO_ID
final String  password new String 1 I User Info info new I User Info public String get Username return username  _password IUserInfo IUserInfo getUsername
return username public boolean is Username Mutable return false  isUsernameMutable
return false public void set Password String password  password 0 password  setPassword _password
 password 0 password public void set Username String username  _password setUsername
private String prompt Secret String message boolean include Location throws CVS Exception final String  password new String 1 I User Info info new I User Info public String get Username return username public boolean is Username Mutable return false public void set Password String password  password 0 password public void set Username String username try authenticator prompt For User Info include Location location null info message catch Operation Canceled Exception e  password 0 null return  password 0  promptSecret includeLocation CVSException _password IUserInfo IUserInfo getUsername isUsernameMutable setPassword _password setUsername promptForUserInfo includeLocation OperationCanceledException _password _password
public boolean prompt Passphrase String message try String  passphrase prompt Secret message false if  passphrase null passphrase  passphrase return  passphrase null catch CVS Exception e return false  promptPassphrase _passphrase promptSecret _passphrase _passphrase _passphrase CVSException
public boolean prompt Password String message try String  password prompt Secret message true if  password null password  password Cache the password with the repository location on the memory if location null CVS Repository Location location set Password password return  password null catch CVS Exception e return false  promptPassword _password promptSecret _password _password CVSRepositoryLocation setPassword _password CVSException
public void show Message String message authenticator prompt location I User Authenticator INFORMATION Policy bind J Sch Session 5 NON NLS 1 message new int I User Authenticator OK ID I User Authenticator OK ID  showMessage IUserAuthenticator JSchSession IUserAuthenticator OK_ID IUserAuthenticator OK_ID
public String prompt Keyboard Interactive String destination String name String instruction String prompt boolean echo try String result authenticator prompt For Keyborad Interactive location destination name instruction prompt echo return result catch Operation Canceled Exception e return null catch CVS Exception e return null  promptKeyboardInteractive promptForKeyboradInteractive OperationCanceledException CVSException
static Session get Session ICVS Repository Location location String username String password String hostname int port Socket Factory socket Factory throws J Sch Exception if port 0 port SSH DEFAULT PORT I Preference Store store CVSSSH2 Plugin get Default get Preference Store String ssh home store get String CVSSSH2 Preference Page KEY SSH2HOME if current ssh home null current ssh home equals ssh home current ssh home ssh home if ssh home length 0 ssh home default ssh home try java io File file file new java io File ssh home known hosts NON NLS 1 jsch set Known Hosts file get Path String pkeys store get String CVSSSH2 Preference Page KEY PRIVATEKEY String pkey pkeys split NON NLS 1 for int i 0 i pkey length i file new java io File ssh home pkey i if file exists jsch add Identity file get Path catch Exception e String key username hostname port NON NLS 1 NON NLS 2 try Session session Session pool get key if session null session is Connected pool remove key session null if session null session jsch get Session username hostname port boolean use Proxy store get String CVSSSH2 Preference Page KEY PROXY equals true NON NLS 1 if use Proxy String  type store get String CVSSSH2 Preference Page KEY PROXY TYPE String  host store get String CVSSSH2 Preference Page KEY PROXY HOST String  port store get String CVSSSH2 Preference Page KEY PROXY PORT boolean use Auth store get String CVSSSH2 Preference Page KEY PROXY AUTH equals true NON NLS 1 String  user store get String CVSSSH2 Preference Page KEY PROXY USER String  pass store get String CVSSSH2 Preference Page KEY PROXY PASS Proxy proxy null String proxyhost  host  port NON NLS 1 if  type equals CVSSSH2 Preference Page HTTP proxy new ProxyHTTP proxyhost if use Auth ProxyHTTP proxy set User Passwd  user  pass else if  type equals CVSSSH2 Preference Page SOCKS5 proxy new ProxySOCKS5 proxyhost if use Auth ProxySOCKS5 proxy set User Passwd  user  pass else proxy null if proxy null session set Proxy proxy session set Password password User Info ui new My User Info username location session set User Info ui session set Socket Factory socket Factory session connect pool put key session return session catch J Sch Exception e pool remove key if e to String index Of Auth cancel 1 NON NLS 1 throw new Operation Canceled Exception NON NLS 1 throw e  getSession ICVSRepositoryLocation SocketFactory socketFactory JSchException SSH_DEFAULT_PORT IPreferenceStore CVSSSH2Plugin getDefault getPreferenceStore ssh_home getString CVSSSH2PreferencePage KEY_SSH2HOME current_ssh_home current_ssh_home ssh_home current_ssh_home ssh_home ssh_home ssh_home default_ssh_home ssh_home known_hosts setKnownHosts getPath getString CVSSSH2PreferencePage KEY_PRIVATEKEY ssh_home addIdentity getPath isConnected getSession useProxy getString CVSSSH2PreferencePage KEY_PROXY useProxy _type getString CVSSSH2PreferencePage KEY_PROXY_TYPE _host getString CVSSSH2PreferencePage KEY_PROXY_HOST _port getString CVSSSH2PreferencePage KEY_PROXY_PORT useAuth getString CVSSSH2PreferencePage KEY_PROXY_AUTH _user getString CVSSSH2PreferencePage KEY_PROXY_USER _pass getString CVSSSH2PreferencePage KEY_PROXY_PASS _host _port _type CVSSSH2PreferencePage useAuth setUserPasswd _user _pass _type CVSSSH2PreferencePage useAuth setUserPasswd _user _pass setProxy setPassword UserInfo MyUserInfo setUserInfo setSocketFactory socketFactory JSchException toString indexOf OperationCanceledException
static void shutdown if jsch null pool size 0 for Enumeration e pool elements e has More Elements Session session Session e next Element try session disconnect catch Exception ee pool clear  hasMoreElements nextElement
static J Sch getJ Sch return jsch  JSch getJSch

Creates a NLS catalog for the given locale public static void localize String bundle Name bundle Resource Bundle get Bundle bundle Name  bundleName ResourceBundle getBundle bundleName
Gets a string from the resource bundle We don t want to crash because of a missing String Returns the key if not found public static String bind String key try return bundle get String key catch Missing Resource Exception e return key catch Null Pointer Exception e return key NON NLS 1 NON NLS 2  getString MissingResourceException NullPointerException
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string public static String bind String id String binding return bind id new String binding 
Gets a string from the resource bundle and binds it with the given arguments If the key is not found return the key public static String bind String key Object args try return Message Format format bind key args catch Missing Resource Exception e return key catch Null Pointer Exception e return key NON NLS 1 NON NLS 2  MessageFormat MissingResourceException NullPointerException
public static void check Canceled I Progress Monitor monitor if monitor null monitor is Canceled throw new Operation Canceled Exception  checkCanceled IProgressMonitor isCanceled OperationCanceledException

public class P ServerSSH2 Method implements I Connection Method public String get Name return pserverssh2 NON NLS 1  PServerSSH2Method IConnectionMethod getName
return pserverssh2 NON NLS 1 public I Server Connection create Connection ICVS Repository Location root String password return new P ServerSSH2 Server Connection root password  IServerConnection createConnection ICVSRepositoryLocation PServerSSH2ServerConnection
return new P ServerSSH2 Server Connection root password public void disconnect ICVS Repository Location location  PServerSSH2ServerConnection ICVSRepositoryLocation

private I Server Connection psc null protected P ServerSSH2 Server Connection ICVS Repository Location location String password this location location this password password  IServerConnection PServerSSH2ServerConnection ICVSRepositoryLocation
public void close throws IO Exception psc close  IOException
public Input Stream get Input Stream return psc get Input Stream  InputStream getInputStream getInputStream
return psc get Input Stream public Output Stream get Output Stream return psc get Output Stream  getInputStream OutputStream getOutputStream getOutputStream
public void open I Progress Monitor monitor throws IO Exception CVS Authentication Exception monitor sub Task P ServerSSH2 Server Connection open NON NLS 1 monitor worked 1 String cvs root location get Root Directory int cvs port location get Port if cvs port 0 cvs port 2401 String cvs host location get Host String ssh host cvs host String ssh user location get Username String host cvs host if host index Of 1 cvs host host substring host last Index Of 1 host host substring 0 host last Index Of if host index Of 1 ssh host host substring host last Index Of 1 if ssh host length 0 ssh host cvs host ssh user host substring 0 host last Index Of else ssh host host int ssh port 0 if ssh host index Of 1 try ssh port Integer parse Int ssh host substring ssh host last Index Of 1 ssh host ssh host substring 0 ssh host last Index Of catch Exception e int lport cvs port String rhost cvs host equals ssh host localhost cvs host NON NLS 1 int rport cvs port ssh L lport rhost rport ssh user ssh host int retry 1 while true try session J Sch Session get Session location ssh user ssh host ssh port new J Sch Session Responsive Socket Facory monitor NON NLS 1 String list session get Port ForwardingL String name rhost rport NON NLS 1 NON NLS 2 boolean done false for int i 0 i list length i if list i ends With name try String foo list i substring 0 list i index Of lport Integer parse Int foo catch Exception ee done true break if done lport localport session set Port ForwardingL lport rhost rport catch J Sch Exception ee retry if retry 0 throw new CVS Authentication Exception Policy bind CVSSSH2 Server Connection 3 CVS Authentication Exception NO RETRY NON NLS 1 if session is Connected session disconnect continue break password for location will be over written in J Sch Session CVS Repository Location location set Password password CVSROOT pserver localhost lport cvs root try Properties prop new Properties prop put connection pserver NON NLS 1 NON NLS 2 prop put user location get Username NON NLS 1 prop put password password NON NLS 1 prop put host localhost NON NLS 1 NON NLS 2 prop put port Integer to String lport NON NLS 1 prop put root cvs root NON NLS 1 CVS Repository Location cvsrl CVS Repository Location from Properties prop I Connection Method method cvsrl get Method psc method create Connection cvsrl password catch Exception e throw new CVS Authentication Exception e to String CVS Authentication Exception NO RETRY psc open monitor  IProgressMonitor IOException CVSAuthenticationException subTask PServerSSH2ServerConnection cvs_root getRootDirectory cvs_port getPort cvs_port cvs_port cvs_host getHost ssh_host cvs_host ssh_user getUsername cvs_host indexOf cvs_host lastIndexOf lastIndexOf indexOf ssh_host lastIndexOf ssh_host ssh_host cvs_host ssh_user lastIndexOf ssh_host ssh_port ssh_host indexOf ssh_port parseInt ssh_host ssh_host lastIndexOf ssh_host ssh_host ssh_host lastIndexOf cvs_port cvs_host ssh_host cvs_host cvs_port ssh_user ssh_host JSchSession getSession ssh_user ssh_host ssh_port JSchSession ResponsiveSocketFacory getPortForwardingL endsWith indexOf parseInt setPortForwardingL JSchException CVSAuthenticationException CVSSSH2ServerConnection CVSAuthenticationException NO_RETRY isConnected JSchSession CVSRepositoryLocation setPassword cvs_root getUsername toString cvs_root CVSRepositoryLocation CVSRepositoryLocation fromProperties IConnectionMethod getMethod createConnection CVSAuthenticationException toString CVSAuthenticationException NO_RETRY

0x3ac372e6 public void decipher byte src int src Off byte dst int dst Off int len int xL last DecipherXL int xR last DecipherXR int dataXL int dataXR int x LxR new int 2 for int i 0 i len i i 8 dataXL src src Off i 0xff src src Off i 1 0xff 8 src src Off i 2 0xff 16 src src Off i 3 0xff 24 dataXR src src Off i 4 0xff src src Off i 5 0xff 8 src src Off i 6 0xff 16 src src Off i 7 0xff 24 decipher dataXL dataXR x LxR xL x LxR 0 xR x LxR 1 dst dst Off i byte xL 0xff dst dst Off i 1 byte xL 8 0xff dst dst Off i 2 byte xL 16 0xff dst dst Off i 3 byte xL 24 0xff dst dst Off i 4 byte xR 0xff dst dst Off i 5 byte xR 8 0xff dst dst Off i 6 byte xR 16 0xff dst dst Off i 7 byte xR 24 0xff xL dataXL xR dataXR last DecipherXL xL last DecipherXR xR  srcOff dstOff lastDecipherXL lastDecipherXR xLxR srcOff srcOff srcOff srcOff srcOff srcOff srcOff srcOff xLxR xLxR xLxR dstOff dstOff dstOff dstOff dstOff dstOff dstOff dstOff lastDecipherXL lastDecipherXR
private void decipher int xL int xR int x LxR xL P 17 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 16 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 15 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 14 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 13 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 12 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 11 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 10 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 9 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 8 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 7 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 6 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 5 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 4 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 3 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 2 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 1 xR P 0 x LxR 0 xR x LxR 1 xL  xLxR xLxR xLxR
public void encipher byte src int src Off byte dst int dst Off int len int xL last EncipherXL int xR last EncipherXR int x LxR new int 2 for int i 0 i len i i 8 xL src src Off i 0xff src src Off i 1 0xff 8 src src Off i 2 0xff 16 src src Off i 3 0xff 24 xR src src Off i 4 0xff src src Off i 5 0xff 8 src src Off i 6 0xff 16 src src Off i 7 0xff 24 encipher xL xR x LxR xL x LxR 0 xR x LxR 1 dst dst Off i byte xL 0xff dst dst Off i 1 byte xL 8 0xff dst dst Off i 2 byte xL 16 0xff dst dst Off i 3 byte xL 24 0xff dst dst Off i 4 byte xR 0xff dst dst Off i 5 byte xR 8 0xff dst dst Off i 6 byte xR 16 0xff dst dst Off i 7 byte xR 24 0xff last EncipherXL xL last EncipherXR xR  srcOff dstOff lastEncipherXL lastEncipherXR xLxR srcOff srcOff srcOff srcOff srcOff srcOff srcOff srcOff xLxR xLxR xLxR dstOff dstOff dstOff dstOff dstOff dstOff dstOff dstOff lastEncipherXL lastEncipherXR
private void encipher int xL int xR int x LxR xL P 0 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 1 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 2 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 3 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 4 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 5 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 6 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 7 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 8 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 9 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 10 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 11 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 12 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 13 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 14 xR S 0 xL 24 0xff S 1 xL 16 0xff S 2 xL 8 0xff S 3 xL 0xff P 15 xL S 0 xR 24 0xff S 1 xR 16 0xff S 2 xR 8 0xff S 3 xR 0xff P 16 xR P 17 x LxR 0 xR x LxR 1 xL  xLxR xLxR xLxR
public void set Key byte key int data 0 int offset 0 for int i 0 i P length i P i INIT DATA offset for int i 0 i S length i for int j 0 j S i length j S i j INIT DATA offset offset 0 for int i 0 i P length i data 0 for int k 0 k 4 k data data 8 key offset 0xff if offset key length offset 0 P i P i data int lr new int 0 0 for int i 0 i P length i 2 encipher lr 0 lr 1 lr P i lr 0 P i 1 lr 1 for int i 0 i S length i for int j 0 j S i length j 2 encipher lr 0 lr 1 lr S i j lr 0 S i j 1 lr 1 last EncipherXL 0 last EncipherXR 0 last DecipherXL 0 last DecipherXR 0  setKey INIT_DATA INIT_DATA lastEncipherXL lastEncipherXR lastDecipherXL lastDecipherXR

public abstract class Cipher public abstract void decipher byte src int src Pos byte dst int dst Pos int len  srcPos dstPos
public abstract class Cipher public abstract void decipher byte src int src Pos byte dst int dst Pos int len public abstract void encipher byte src int src Pos byte dst int dst Pos int len  srcPos dstPos srcPos dstPos
public abstract void encipher byte src int src Pos byte dst int dst Pos int len public static Cipher get Instance String algorithm try Class c Class for Name org eclipse team internal ccvs ssh algorithm NON NLS 1 return Cipher c new Instance catch Exception e return null  srcPos dstPos getInstance forName newInstance
public abstract void set Key byte key  setKey

public int available throws IO Exception if closed throw new IO Exception Policy bind closed NON NLS 1 int available buffer null 0 buffer available if available 0 socket In available 0 fill if at End return 0 available buffer available return available  IOException IOException socketIn atEnd
public void close throws IO Exception if closed closed true if packet null packet close false buffer null packet null buflen 0  IOException
public int read throws IO Exception if closed throw new IO Exception Policy bind closed NON NLS 1 if at End return 1 if buffer null buffer available 0 fill if at End return 1 return buffer read  IOException IOException atEnd atEnd
public int read byte b int off int len throws IO Exception if closed throw new IO Exception Policy bind closed NON NLS 1 if at End return 1 if buffer null buffer available 0 fill if at End return 1 return buffer read b off len  IOException IOException atEnd atEnd
private void fill throws IO Exception if buffer null buffer close packet skip SSH MSG DEBUG int packet Type packet get Type switch packet Type case SSH SMSG STDOUT DATA case SSH SMSG STDERR DATA case SSH MSG DEBUG buffer packet get Input Stream buflen Misc read Int buffer break case SSH SMSG EXITSTATUS buffer null buflen 0 at End true Input Stream pis packet get Input Stream exit Status Misc read Int pis pis close send SSH CMSG EXIT CONFIRMATION null break case SSH MSG DISCONNECT buffer null buflen 0 at End true handle Disconnect packet get Input Stream break default throw new IO Exception Policy bind Client packet Type new Object new Integer packet Type NON NLS 1  IOException skip_SSH_MSG_DEBUG packetType getType packetType SSH_SMSG_STDOUT_DATA SSH_SMSG_STDERR_DATA SSH_MSG_DEBUG getInputStream readInt SSH_SMSG_EXITSTATUS atEnd InputStream getInputStream exitStatus readInt SSH_CMSG_EXIT_CONFIRMATION SSH_MSG_DISCONNECT atEnd handleDisconnect getInputStream IOException packetType packetType
private void handle Disconnect Input Stream in throws IO Exception String description null try description Misc read String in catch IO Exception e finally in close Log the description provided by the server if description null description Policy bind Client no Disconnect Description NON NLS 1 Throw an IO Exception with the proper text throw new IO Exception Policy bind Client disconnect Description new Object description NON NLS 1  handleDisconnect InputStream IOException readString IOException noDisconnectDescription IOException IOException disconnectDescription
public void close throws IO Exception if closed try flush finally closed true  IOException
public void flush throws IO Exception if closed throw new IO Exception Policy bind closed NON NLS 1 if bufpos 0 send SSH CMSG STDIN DATA buffer 0 bufpos bufpos 0  IOException IOException SSH_CMSG_STDIN_DATA
public void write int b throws IO Exception if closed throw new IO Exception Policy bind closed NON NLS 1 buffer bufpos byte b if bufpos MAX BUFFER SIZE flush  IOException IOException MAX_BUFFER_SIZE
public void write byte b int off int len throws IO Exception if closed throw new IO Exception Policy bind closed NON NLS 1 int bytes Written 0 int total Bytes Written 0 if bufpos 0 bytes Written Math min MAX BUFFER SIZE bufpos len System arraycopy b off buffer bufpos bytes Written bufpos bytes Written total Bytes Written bytes Written if bufpos MAX BUFFER SIZE flush while len total Bytes Written MAX BUFFER SIZE send SSH CMSG STDIN DATA b off total Bytes Written MAX BUFFER SIZE total Bytes Written MAX BUFFER SIZE if total Bytes Written len bytes Written len total Bytes Written System arraycopy b off total Bytes Written buffer 0 bytes Written bufpos bytes Written  IOException IOException bytesWritten totalBytesWritten bytesWritten MAX_BUFFER_SIZE bytesWritten bytesWritten totalBytesWritten bytesWritten MAX_BUFFER_SIZE totalBytesWritten MAX_BUFFER_SIZE SSH_CMSG_STDIN_DATA totalBytesWritten MAX_BUFFER_SIZE totalBytesWritten MAX_BUFFER_SIZE totalBytesWritten bytesWritten totalBytesWritten totalBytesWritten bytesWritten bytesWritten
public Client String host int port String username String password this host host this port port this username username this password password 
this password password public Client String host int port String username String password String command this host port username password this command command 
this command command public Client String host int port String username String password String command int timeout this host port username password command this timeout timeout 
Close all streams and sockets private void cleanup throws IO Exception try if is null is close finally try if os null os close finally try if socket In null socket In close finally try if socket Out null socket Out close finally try if socket null socket close finally socket null  IOException socketIn socketIn socketOut socketOut
Connect to the remote server If an exception is thrown the caller can asssume that all streams and sockets are closed public void connect I Progress Monitor monitor throws IO Exception CVS Authentication Exception If we re already connected just ignore the invokation if connected monitor is Canceled return Otherwise set up the connection try Polling Input Stream polling Input Stream null Create the socket the socket should always be null here if socket null try socket Util create Socket host port monitor Bug 36351 disable buffering and send bytes immediately socket set Tcp No Delay true catch InterruptedIO Exception e If we get this exception chances are the host is not responding throw new InterruptedIO Exception Policy bind Client socket new Object host NON NLS 1 if timeout 0 socket set So Timeout 1000 polling Input Stream new Polling Input Stream socket get Input Stream timeout 0 timeout 1 monitor socket In new Buffered Input Stream polling Input Stream socket Out new Polling Output Stream new Timeout Output Stream socket get Output Stream 8192 buffer Size 1000 write Timeout 1000 close Timeout timeout 0 timeout 1 monitor read the ssh server id The socket creation may of failed if the server cannot accept our connection request We don t expect the socket to be closed at this point Don t allow cancellation during the initial handshake and login since this can potentially cause the SSH server to think that it is being hacked and disable the account socket Out set Is Cancellable false don t allow cancellation polling Input Stream set Is Cancellable false String Buffer buf new String Buffer int c while c socket In read n if c 1 throw new IO Exception Policy bind Client socket Closed NON NLS 1 buf append char c server Id buf to String if Policy DEBUG SSH PROTOCOL System out println SSH server ID server Id NON NLS 1 System out println SSH client ID client Id NON NLS 1 if server Id starts With SSH 1 NON NLS 1 String ssh Version server Id starts With SSH server Id NON NLS 1 NON NLS 2 throw new IO Exception Policy bind Client ssh Protocol Version ssh Version NON NLS 1 send our id socket Out write client Id get Bytes socket Out flush login socket Out set Is Cancellable true allow cancellation polling Input Stream set Is Cancellable true start a shell and enter interactive session or start by executing the given command if command null start Shell else execute Command is new Standard Input Stream os new Standard Output Stream connected true If an exception occurs while connected make sure we disconnect before passing the exception on finally if connected cleanup  IProgressMonitor IOException CVSAuthenticationException isCanceled PollingInputStream pollingInputStream createSocket setTcpNoDelay InterruptedIOException InterruptedIOException setSoTimeout pollingInputStream PollingInputStream getInputStream socketIn BufferedInputStream pollingInputStream socketOut PollingOutputStream TimeoutOutputStream getOutputStream bufferSize writeTimeout closeTimeout socketOut setIsCancellable pollingInputStream setIsCancellable StringBuffer StringBuffer socketIn IOException socketClosed serverId toString DEBUG_SSH_PROTOCOL serverId clientId serverId startsWith sshVersion serverId startsWith serverId IOException sshProtocolVersion sshVersion socketOut clientId getBytes socketOut socketOut setIsCancellable pollingInputStream setIsCancellable startShell executeCommand StandardInputStream StandardOutputStream
Terminate the connection to the server public void disconnect throws IO Exception if Policy DEBUG SSH PROTOCOL System out println Disconnecting NON NLS 1 if connected connected false try send SSH MSG DISCONNECT null finally cleanup  IOException DEBUG_SSH_PROTOCOL SSH_MSG_DISCONNECT
public Input Stream get Input Stream throws IO Exception if connected throw new IO Exception Policy bind Client not Connected NON NLS 1 return is  InputStream getInputStream IOException IOException notConnected
public Output Stream get Output Stream throws IO Exception if connected throw new IO Exception Policy bind Client not Connected NON NLS 1 return os  OutputStream getOutputStream IOException IOException notConnected
private void start Shell throws IO Exception Server Packet packet null int packet Type send SSH CMSG REQUEST PTY try packet skip SSH MSG DEBUG packet Type packet get Type if packet Type SSH SMSG SUCCESS throw new IO Exception Policy bind Client packet Type new Object new Integer packet Type NON NLS 1 finally if packet null packet close true perform crc check send SSH CMSG EXEC SHELL null  startShell IOException ServerPacket packetType send_SSH_CMSG_REQUEST_PTY skip_SSH_MSG_DEBUG packetType getType packetType SSH_SMSG_SUCCESS IOException packetType packetType SSH_CMSG_EXEC_SHELL
private void execute Command throws IO Exception send SSH CMSG EXEC CMD command  executeCommand IOException SSH_CMSG_EXEC_CMD
private void login throws IO Exception CVS Authentication Exception Server Packet packet null int packet Type try packet skip SSH MSG DEBUG packet Type packet get Type if packet Type SSH SMSG PUBLIC KEY throw new IO Exception Policy bind Client packet Type new Object new Integer packet Type NON NLS 1 receive SSH SMSG PUBLIC KEY packet finally if packet null packet close true try packet skip SSH MSG DEBUG packet Type packet get Type if packet Type SSH SMSG SUCCESS throw new IO Exception Policy bind Client packet Type new Object new Integer packet Type NON NLS 1 finally if packet null packet close true send SSH CMSG USER username try packet skip SSH MSG DEBUG packet Type packet get Type if packet Type SSH SMSG FAILURE throw new IO Exception Policy bind Client packet Type new Object new Integer packet Type NON NLS 1 finally if packet null packet close true send SSH CMSG AUTH PASSWORD password try packet skip SSH MSG DEBUG packet Type packet get Type if packet Type SSH SMSG FAILURE throw new CVS Authentication Exception Policy bind Client authentication Failed CVS Authentication Exception RETRY NON NLS 1 if packet Type SSH SMSG SUCCESS throw new IO Exception Policy bind Client packet Type new Object new Integer packet Type NON NLS 1 finally if packet null packet close true  IOException CVSAuthenticationException ServerPacket packetType skip_SSH_MSG_DEBUG packetType getType packetType SSH_SMSG_PUBLIC_KEY IOException packetType packetType receive_SSH_SMSG_PUBLIC_KEY skip_SSH_MSG_DEBUG packetType getType packetType SSH_SMSG_SUCCESS IOException packetType packetType SSH_CMSG_USER skip_SSH_MSG_DEBUG packetType getType packetType SSH_SMSG_FAILURE IOException packetType packetType SSH_CMSG_AUTH_PASSWORD skip_SSH_MSG_DEBUG packetType getType packetType SSH_SMSG_FAILURE CVSAuthenticationException authenticationFailed CVSAuthenticationException packetType SSH_SMSG_SUCCESS IOException packetType packetType
private void receive SSH SMSG PUBLIC KEY Server Packet packet throws IO Exception CVS Authentication Exception Input Stream pis packet get Input Stream byte anti spoofing cookie new byte 8 Misc read Fully pis anti spoofing cookie byte server key bits new byte 4 Misc read Fully pis server key bits byte server key public exponent Misc read Mp Int pis byte server key public modulus Misc read Mp Int pis byte host key bits new byte 4 Misc read Fully pis host key bits byte host key public exponent Misc read Mp Int pis byte host key public modulus Misc read Mp Int pis byte protocol flags new byte 4 Misc read Fully pis protocol flags byte supported ciphers mask new byte 4 Misc read Fully pis supported ciphers mask byte supported authentications mask new byte 4 Misc read Fully pis supported authentications mask pis close send SSH CMSG SESSION KEY anti spoofing cookie host key bits server key public modulus host key public modulus supported ciphers mask server key public exponent host key public exponent  receive_SSH_SMSG_PUBLIC_KEY ServerPacket IOException CVSAuthenticationException InputStream getInputStream anti_spoofing_cookie readFully anti_spoofing_cookie server_key_bits readFully server_key_bits server_key_public_exponent readMpInt server_key_public_modulus readMpInt host_key_bits readFully host_key_bits host_key_public_exponent readMpInt host_key_public_modulus readMpInt protocol_flags readFully protocol_flags supported_ciphers_mask readFully supported_ciphers_mask supported_authentications_mask readFully supported_authentications_mask send_SSH_CMSG_SESSION_KEY anti_spoofing_cookie host_key_bits server_key_public_modulus host_key_public_modulus supported_ciphers_mask server_key_public_exponent host_key_public_exponent
send SSH CMSG SESSION KEY anti spoofing cookie host key bits server key public modulus host key public modulus supported ciphers mask server key public exponent host key public exponent private void send int packet Type String s throws IO Exception byte data s null new byte 0 s get Bytes UTF 8 NON NLS 1 send packet Type data 0 data length  send_SSH_CMSG_SESSION_KEY anti_spoofing_cookie host_key_bits server_key_public_modulus host_key_public_modulus supported_ciphers_mask server_key_public_exponent host_key_public_exponent packetType IOException getBytes packetType
private void send int packet Type byte data int off int len throws IO Exception data data null null Misc length Encode data off len Client Packet packet new Client Packet packet Type data cipher socket Out write packet get Bytes socket Out flush  packetType IOException lengthEncode ClientPacket ClientPacket packetType socketOut getBytes socketOut
private void send SSH CMSG REQUEST PTY throws IO Exception byte packet type SSH CMSG REQUEST PTY byte term Type Misc length Encode dumb get Bytes 0 4 NON NLS 1 byte row 0 0 0 0 byte col 0 0 0 0 byte X Pixels 0 0 0 0 byte Y Pixels 0 0 0 0 byte terminal Modes 0 byte data new byte term Type length row length col length X Pixels length Y Pixels length terminal Modes length int offset 0 System arraycopy term Type 0 data offset term Type length offset term Type length System arraycopy row 0 data offset row length offset row length System arraycopy col 0 data offset col length offset col length System arraycopy X Pixels 0 data offset X Pixels length offset X Pixels length System arraycopy Y Pixels 0 data offset Y Pixels length offset Y Pixels length System arraycopy terminal Modes 0 data offset terminal Modes length Client Packet packet new Client Packet packet type data cipher socket Out write packet get Bytes socket Out flush  send_SSH_CMSG_REQUEST_PTY IOException packet_type SSH_CMSG_REQUEST_PTY termType lengthEncode getBytes XPixels YPixels terminalModes termType XPixels YPixels terminalModes termType termType termType XPixels XPixels XPixels YPixels YPixels YPixels terminalModes terminalModes ClientPacket ClientPacket packet_type socketOut getBytes socketOut
private void send SSH CMSG SESSION KEY byte anti spoofing cookie byte host key bits byte server key public modulus byte host key public modulus byte supported ciphers mask byte server key public exponent byte host key public exponent throws IO Exception CVS Authentication Exception byte packet type SSH CMSG SESSION KEY session id byte session id new byte host key public modulus length server key public modulus length anti spoofing cookie length int offset 0 System arraycopy host key public modulus 0 session id offset host key public modulus length offset host key public modulus length System arraycopy server key public modulus 0 session id offset server key public modulus length offset server key public modulus length System arraycopy anti spoofing cookie 0 session id offset anti spoofing cookie length session id Misc md5 session id cipher type byte cipher type 0 boolean found Supported Cipher false for int i 0 i preferred Cipher Types length found Supported Cipher i cipher type byte preferred Cipher Types i found Supported Cipher supported ciphers mask 3 byte 1 cipher type 0 if found Supported Cipher throw new IO Exception Policy bind Client cipher NON NLS 1 session key byte session key new byte 32 byte session key xored new byte 32 byte session key encrypted null Misc random session key 0 session key length true System arraycopy session key 0 session key xored 0 session key length Misc xor session key xored 0 session id 0 session key xored 0 session id length Big Integer host e new Big Integer 1 host key public exponent Big Integer host n new Big Integer 1 host key public modulus if new Known Hosts verify Key host host key bits host e host n throw new CVS Authentication Exception Policy bind Client host Id Changed CVS Authentication Exception NO RETRY NON NLS 1 byte result if new Big Integer 1 server key public modulus compare To host n 1 result Misc encryptRSA Pkcs1 session key xored server key public exponent server key public modulus result Misc encryptRSA Pkcs1 result host key public exponent host key public modulus else result Misc encryptRSA Pkcs1 session key xored host key public exponent host key public modulus result Misc encryptRSA Pkcs1 result server key public exponent server key public modulus session key encrypted new byte result length 2 session key encrypted 1 byte 8 result length 0xff session key encrypted 0 byte 8 result length 8 0xff for int i 0 i result length i session key encrypted i 2 result i protocol flags byte protocol flags 0 0 0 0 data byte data new byte 1 anti spoofing cookie length session key encrypted length protocol flags length offset 0 data offset byte cipher type System arraycopy anti spoofing cookie 0 data offset anti spoofing cookie length offset anti spoofing cookie length System arraycopy session key encrypted 0 data offset session key encrypted length offset session key encrypted length System arraycopy protocol flags 0 data offset protocol flags length cipher cipher Cipher get Instance cipher Names cipher type cipher set Key session key packet Client Packet packet new Client Packet packet type data null socket Out write packet get Bytes socket Out flush  send_SSH_CMSG_SESSION_KEY anti_spoofing_cookie host_key_bits server_key_public_modulus host_key_public_modulus supported_ciphers_mask server_key_public_exponent host_key_public_exponent IOException CVSAuthenticationException packet_type SSH_CMSG_SESSION_KEY session_id session_id host_key_public_modulus server_key_public_modulus anti_spoofing_cookie host_key_public_modulus session_id host_key_public_modulus host_key_public_modulus server_key_public_modulus session_id server_key_public_modulus server_key_public_modulus anti_spoofing_cookie session_id anti_spoofing_cookie session_id session_id cipher_type cipher_type foundSupportedCipher preferredCipherTypes foundSupportedCipher cipher_type preferredCipherTypes foundSupportedCipher supported_ciphers_mask cipher_type foundSupportedCipher IOException session_key session_key session_key_xored session_key_encrypted session_key session_key session_key session_key_xored session_key session_key_xored session_id session_key_xored session_id BigInteger host_e BigInteger host_key_public_exponent BigInteger host_n BigInteger host_key_public_modulus KnownHosts verifyKey host_key_bits host_e host_n CVSAuthenticationException hostIdChanged CVSAuthenticationException NO_RETRY BigInteger server_key_public_modulus compareTo host_n encryptRSAPkcs1 session_key_xored server_key_public_exponent server_key_public_modulus encryptRSAPkcs1 host_key_public_exponent host_key_public_modulus encryptRSAPkcs1 session_key_xored host_key_public_exponent host_key_public_modulus encryptRSAPkcs1 server_key_public_exponent server_key_public_modulus session_key_encrypted session_key_encrypted session_key_encrypted session_key_encrypted protocol_flags protocol_flags anti_spoofing_cookie session_key_encrypted protocol_flags cipher_type anti_spoofing_cookie anti_spoofing_cookie anti_spoofing_cookie session_key_encrypted session_key_encrypted session_key_encrypted protocol_flags protocol_flags getInstance cipherNames cipher_type setKey session_key ClientPacket ClientPacket packet_type socketOut getBytes socketOut
private Server Packet skip SSH MSG DEBUG throws IO Exception Server Packet packet new Server Packet socket In cipher while packet get Type SSH MSG DEBUG packet close true packet new Server Packet socket In cipher return packet  ServerPacket skip_SSH_MSG_DEBUG IOException ServerPacket ServerPacket socketIn getType SSH_MSG_DEBUG ServerPacket socketIn

byte packet public Client Packet int type byte data Cipher cipher packet Length data null 5 data length 5 padding Length 8 packet Length 8 packet Type type packet new byte 4 padding Length packet Length int packet Off 0 Misc write Int packet Length packet packet Off packet Off 4 if cipher null for int i 0 i padding Length i packet packet Off 0 else Misc random packet packet Off padding Length false packet Off padding Length packet packet Off byte packet Type if data null for int i 0 i data length i packet packet Off data i long crc Misc crc32 packet 4 packet length 8 0 Misc write Int int crc packet packet Off packet Off 4 if cipher null cipher encipher packet 4 packet 4 packet length 4  ClientPacket packetLength paddingLength packetLength packetType paddingLength packetLength packetOff writeInt packetLength packetOff packetOff paddingLength packetOff packetOff paddingLength packetOff paddingLength packetOff packetType packetOff writeInt packetOff packetOff
public byte get Bytes return packet  getBytes

private String filename public Known Hosts String filename this filename filename  KnownHosts
public Known Hosts this filename Known Hosts default Filename  KnownHosts KnownHosts defaultFilename
static String default Filename if Boot Loader getOS equals Boot Loader OS LINUX return internal Filename String HOME System get Property user home NON NLS 1 if HOME null return internal Filename return HOME ssh known hosts NON NLS 1  defaultFilename BootLoader BootLoader OS_LINUX internalFilename getProperty internalFilename known_hosts
private static String internal Filename return SSH Plugin get Plugin get State Location append known hosts toOS String NON NLS 1  internalFilename SSHPlugin getPlugin getStateLocation known_hosts toOSString
Verify if the public key for the specified host is known If the public key matches return true If the key does not match return false If the key is not listed in code known hosts code or code known hosts code does not exist assume we are connecting to the authentic server add the key and return true param e key exponent param n key modulus return boolean whether the key is correct public boolean verify Key String hostname byte host key bits Big Integer e Big Integer n File Reader f Big Integer nbits new Big Integer 1 host key bits try f new File Reader filename catch File Not Found Exception ex create Host File add Host hostname nbits e n return true Buffered Reader r new Buffered Reader f try boolean found false String line while line r read Line null if line trim length 0 continue if line starts With continue NON NLS 1 String tokens sub Strings line if tokens length 4 Character is Digit tokens 1 char At 0 tokens 0 equals Ignore Case hostname if nbits equals new Big Integer tokens 1 e equals new Big Integer tokens 2 n equals new Big Integer tokens 3 f close return true else f close return false f close add Host hostname nbits e n return true catch IO Exception ex SSH Plugin log I Status ERROR Policy bind Known Hosts 8 ex NON NLS 1 return false  known_hosts known_hosts verifyKey host_key_bits BigInteger BigInteger FileReader BigInteger BigInteger host_key_bits FileReader FileNotFoundException createHostFile addHost BufferedReader BufferedReader readLine startsWith subStrings isDigit charAt equalsIgnoreCase BigInteger BigInteger BigInteger addHost IOException SSHPlugin IStatus KnownHosts
void add Host String hostname Big Integer key bits Big Integer e Big Integer n try File Writer w new File Writer default Filename true w write Character LINE SEPARATOR w write hostname key bits to String 10 e to String 10 n to String 10 NON NLS 1 NON NLS 2 NON NLS 3 w close String message Policy bind Client added Host Key new String hostname default Filename NON NLS 1 SSH Plugin log I Status INFO message null catch IO Exception ex SSH Plugin log I Status ERROR Policy bind Known Hosts 9 ex NON NLS 1  addHost BigInteger key_bits BigInteger BigInteger FileWriter FileWriter defaultFilename LINE_SEPARATOR key_bits toString toString toString addedHostKey defaultFilename SSHPlugin IStatus IOException SSHPlugin IStatus KnownHosts
void create Host File try File file new File default Filename Ensure the parent directory exists File parent Dir file get Parent File parent Dir mkdirs Create the file file create New File catch IO Exception ee SSH Plugin log I Status ERROR Policy bind Known Hosts 10 ee NON NLS 1  createHostFile defaultFilename parentDir getParentFile parentDir createNewFile IOException SSHPlugin IStatus KnownHosts
private static String sub Strings String s Vector v sub Strings Vector s String substrings new String v size v copy Into substrings return substrings  subStrings subStringsVector copyInto
private static Vector sub Strings Vector String s Vector v new Vector s s trim if s length 0 return v int first1 s index Of int first2 s index Of t int first if first1 1 first2 1 first 1 else if first1 1 first2 1 first Math min first1 first2 else if first1 1 first first1 else first first2 if first 1 v add s return v v add s substring 0 first v add All sub Strings Vector s substring first 1 return v  subStringsVector indexOf indexOf addAll subStringsVector

0x2d02ef8dL static public long crc32 byte b int off int len return crc32 b off len 0 
Compute the crc Cyclic Redundancy Check with the polynomial 0xedb88320 The polynomial is X 32 X 26 X 23 X 22 X 16 X 12 X 11 X 10 X 8 X 7 X 5 X 4 X 2 X 1 X 0 We take it backwards and put the highest order term in the lowest order bit The X 32 term is implied the LSB is the X 31 term etc The X 0 term usually shown as 1 results in the MSB being 1 so the poly is 0x04c11db7 used for Ethernet The buf will be the Padding Packet type and Data fields The crc is computed before any encryption R X n M rem PM messageP polynomial crcR crc calculated T x x n M x R x property T rem P 0 static public long crc32 byte b int off int len long crc32val for int i 0 i len i crc32val crc32 tab int crc32val b off i 0xff crc32val 8 return crc32val  crcCyclic crc32_tab
static public byte length Encode byte b int off int len throws IO Exception byte result new byte len 4 write Int len result 0 System arraycopy b off result 4 len return result  lengthEncode IOException writeInt
static public byte read Mp Int Input Stream is throws IO Exception int a is read int b is read if a 1 b 1 throw new IO Exception Policy bind stream NON NLS 1 int bits a 0xFF 8 b 0xFF int bytes bits 7 8 byte result new byte bytes read Fully is result return result  readMpInt InputStream IOException IOException readFully
public static byte md5 byte b throws IO Exception if md5 null try md5 Message Digest get Instance MD5 NON NLS 1 catch No Such Algorithm Exception e throw new IO Exception Policy bind Misc missingMD5 e get Message NON NLS 1 return md5 digest b  IOException MessageDigest getInstance NoSuchAlgorithmException IOException getMessage
return md5 digest b public static byte md5 String s throws IO Exception return md5 s get Bytes  IOException getBytes
return md5 s get Bytes public static void read Fully Input Stream is byte b throws IO Exception read Fully is b 0 b length  getBytes readFully InputStream IOException readFully
public static void read Fully Input Stream is byte b int off int len throws IO Exception int bytes Read 0 int total Bytes Read 0 while total Bytes Read len bytes Read is read b total Bytes Read off len total Bytes Read if bytes Read 1 throw new IO Exception Policy bind stream NON NLS 1 total Bytes Read bytes Read  readFully InputStream IOException bytesRead totalBytesRead totalBytesRead bytesRead totalBytesRead totalBytesRead bytesRead IOException totalBytesRead bytesRead
public static int read Int byte arr int off throws IO Exception int a arr off 0xff int b arr off 1 0xff int c arr off 2 0xff int d arr off 3 0xff return a 24 b 16 c 8 d  readInt IOException
public static int read Int Input Stream is throws IO Exception int a is read int b is read int c is read int d is read if a 1 b 1 c 1 d 1 throw new IO Exception Policy bind stream NON NLS 1 return a 24 b 16 c 8 d  readInt InputStream IOException IOException
public static String read String Input Stream is throws IO Exception int size Misc read Int is byte buffer new byte size for int i 0 i buffer length i int next is read if next 1 throw new IO Exception Policy bind stream NON NLS 1 else buffer i byte next return new String buffer  readString InputStream IOException readInt IOException
public static void skip Fully Input Stream is long n throws IO Exception while n 0 int b is read if b 1 if n 0 throw new IO Exception Policy bind stream NON NLS 1 return n  skipFully InputStream IOException IOException
public static void write Int int i byte b int off b off byte i 24 0xff b off 1 byte i 16 0xff b off 2 byte i 8 0xff b off 3 byte i 0xff  writeInt
static public void xor byte src a int off a byte src b int off b byte dst int dst off int len for int i 0 i len i dst i dst off byte src a i off a src b i off b  src_a off_a src_b off_b dst_off dst_off src_a off_a src_b off_b
static public void random byte b int off int len boolean allow Zero Bytes if random null try random Secure Random get Instance SHA1PRNG NON NLS 1 catch No Such Algorithm Exception e If SHA1PRNG is not available just use the default random new Secure Random for int i off i off len i do b i byte random next Int while allow Zero Bytes b i 0  allowZeroBytes SecureRandom getInstance NoSuchAlgorithmException SecureRandom nextInt allowZeroBytes
static public byte encryptRSA Pkcs1 byte data byte public key exponent byte public key modulus byte block int offset 0 block new byte public key modulus length block offset 0 block offset 2 Misc random block offset block length data length 3 false offset block length data length 3 block offset 0 for int i 0 i data length i block offset data i Big Integer m e message byte message Byte m new Big Integer 1 public key modulus e new Big Integer 1 public key exponent message new Big Integer 1 block message message mod Pow e m byte message Byte Temp message to Byte Array message Byte new byte public key modulus length int temp Offset 0 while message Byte Temp temp Offset 0 temp Offset for int i message Byte length message Byte Temp length temp Offset i message Byte length i message Byte i message Byte Temp temp Offset return message Byte  encryptRSAPkcs1 public_key_exponent public_key_modulus public_key_modulus BigInteger messageByte BigInteger public_key_modulus BigInteger public_key_exponent BigInteger modPow messageByteTemp toByteArray messageByte public_key_modulus tempOffset messageByteTemp tempOffset tempOffset messageByte messageByteTemp tempOffset messageByte messageByte messageByteTemp tempOffset messageByte

protected int padding Length protected int packet Type public int get Type return packet Type  paddingLength packetType getType packetType

Creates a NLS catalog for the given locale public static void localize String bundle Name bundle Resource Bundle get Bundle bundle Name  bundleName ResourceBundle getBundle bundleName
Gets a string from the resource bundle We don t want to crash because of a missing String Returns the key if not found public static String bind String key try return bundle get String key catch Missing Resource Exception e return key catch Null Pointer Exception e return key NON NLS 1 NON NLS 2  getString MissingResourceException NullPointerException
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string public static String bind String id String binding return bind id new String binding 
Gets a string from the resource bundle and binds it with the given arguments If the key is not found return the key public static String bind String key Object args try return Message Format format bind key args catch Missing Resource Exception e return key catch Null Pointer Exception e return key NON NLS 1 NON NLS 2  MessageFormat MissingResourceException NullPointerException

public Packet Input Stream Input Stream in long length Cipher cipher super in this remaining length this cipher cipher  PacketInputStream InputStream
public int available throws IO Exception if closed throw new IO Exception Policy bind closed NON NLS 1 return int Math min remaining 4 Integer MAX VALUE  IOException IOException MAX_VALUE
public void close throws IO Exception close true  IOException
public void close boolean do Crc Check throws IO Exception if closed try long to Read do Crc Check remaining 4 remaining try Misc skip Fully this to Read catch IO Exception e we tried our best keep going if do Crc Check if int crc Misc read Int buffer bufpos throw new IO Exception Policy bind Server Packet crc NON NLS 1 finally closed true  doCrcCheck IOException toRead doCrcCheck skipFully toRead IOException doCrcCheck readInt IOException ServerPacket
private void fill throws IO Exception if bufrem 0 System arraycopy buffer bufpos buffer 0 bufrem int total Bytes Read bufrem int read 0 int to Read int Math min remaining total Bytes Read MAX BUFFER SIZE total Bytes Read while to Read 0 read in read buffer total Bytes Read to Read if read 1 throw new IO Exception Policy bind stream NON NLS 1 total Bytes Read read to Read read bufpos 0 buflen total Bytes Read 8 8 bufrem total Bytes Read buflen if cipher null cipher decipher buffer 0 buffer 0 buflen crc Misc crc32 buffer 0 buflen remaining buflen 4 buflen crc  IOException totalBytesRead toRead totalBytesRead MAX_BUFFER_SIZE totalBytesRead toRead totalBytesRead toRead IOException totalBytesRead toRead totalBytesRead totalBytesRead
public int read throws IO Exception if closed throw new IO Exception Policy bind closed NON NLS 1 if remaining 4 0 return 1 if bufpos buflen fill int b buffer bufpos 0xff bufpos remaining return b  IOException IOException
public int read byte b int off int len throws IO Exception if closed throw new IO Exception Policy bind closed NON NLS 1 if remaining 4 0 return 1 if bufpos buflen fill len int Math min len buflen remaining bufpos buflen 4 buflen bufpos System arraycopy buffer bufpos b off len bufpos len remaining len return len  IOException IOException
public Server Packet Input Stream is Cipher cipher throws java io IO Exception packet Length Misc read Int is padding Length 8 packet Length 8 pis new Packet Input Stream is packet Length padding Length cipher Misc skip Fully pis padding Length packet Type byte pis read  ServerPacket InputStream IOException packetLength readInt paddingLength packetLength PacketInputStream packetLength paddingLength skipFully paddingLength packetType
packet Type byte pis read public void close boolean do Crc Check throws IO Exception pis close do Crc Check  packetType doCrcCheck IOException doCrcCheck
pis close do Crc Check public Input Stream get Input Stream return pis  doCrcCheck InputStream getInputStream

public class SSH Method implements I Connection Method see I Connection Method get Name public String get Name return extssh NON NLS 1  SSHMethod IConnectionMethod IConnectionMethod getName getName
see I Connection Method create Connection public I Server Connection create Connection ICVS Repository Location repository Root String password return new SSH Server Connection repository Root password  IConnectionMethod createConnection IServerConnection createConnection ICVSRepositoryLocation repositoryRoot SSHServerConnection repositoryRoot
public void disconnect ICVS Repository Location location  ICVSRepositoryLocation

Log the given exception along with the provided message and severity indicator public static void log int severity String message Throwable e get Plugin get Log log new Status severity ID 0 message e  getPlugin getLog
Constructor for SSH Plugin public SSH Plugin I Plugin Descriptor d super d instance this  SSHPlugin SSHPlugin IPluginDescriptor
see Plugin startup public void startup throws Core Exception super startup Policy localize org eclipse team internal ccvs ssh messages NON NLS 1  CoreException
Method get Plugin public static SSH Plugin get Plugin return instance  getPlugin SSHPlugin getPlugin

Client client public SSH Server Connection ICVS Repository Location location String password this location location this password password  SSHServerConnection ICVSRepositoryLocation
public void close throws IO Exception client disconnect  IOException
Returns the code Input Stream code used to read data from the server public Input Stream get Input Stream return input Stream  InputStream InputStream getInputStream inputStream
Returns the code Output Stream code used to send data to the server public Output Stream get Output Stream return output Stream  OutputStream OutputStream getOutputStream outputStream
Opens the connection and invokes cvs in server mode see Connection open public void open I Progress Monitor monitor throws IO Exception CVS Authentication Exception monitor sub Task Policy bind SSH Server Connection authenticating NON NLS 1 monitor worked 1 String hostname location get Host String username location get Username int port location get Port if port ICVS Repository Location USE DEFAULT PORT port DEFAULT PORT create the connection using host username and password client new Client hostname port username password INVOKE SVR CMD location get Timeout client connect monitor input Stream client get Input Stream output Stream client get Output Stream  IProgressMonitor IOException CVSAuthenticationException subTask SSHServerConnection getHost getUsername getPort ICVSRepositoryLocation USE_DEFAULT_PORT DEFAULT_PORT INVOKE_SVR_CMD getTimeout inputStream getInputStream outputStream getOutputStream

see org eclipse team internal ccvs ui actions CVS Action execute org eclipse jface action I Action public void execute I Action action throws Interrupted Exception Invocation Target Exception if prompt For Add Of Ignored return new Add Operation get Target Part get Selected Resources run  CVSAction IAction IAction InterruptedException InvocationTargetException promptForAddOfIgnored AddOperation getTargetPart getSelectedResources
Method prompt For Add Of Ignored private boolean prompt For Add Of Ignored I Resource resources get Selected Resources boolean prompt false for int i 0 i resources length i ICVS Resource resource CVS Workspace Root getCVS Resource For resources i try if resource is Ignored prompt true break catch CVS Exception e handle e if prompt return Message Dialog open Question get Shell Policy bind Add Action add Ignored Title Policy bind Add Action add Ignored Question NON NLS 1 NON NLS 2 return true  promptForAddOfIgnored promptForAddOfIgnored IResource getSelectedResources ICVSResource CVSWorkspaceRoot getCVSResourceFor isIgnored CVSException MessageDialog openQuestion getShell AddAction addIgnoredTitle AddAction addIgnoredQuestion
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Managed Resources protected boolean is Enabled For Managed Resources return false  WorkspaceAction isEnabledForManagedResources isEnabledForManagedResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Unmanaged Resources protected boolean is Enabled For Unmanaged Resources return true  WorkspaceAction isEnabledForUnmanagedResources isEnabledForUnmanagedResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Ignored Resources protected boolean is Enabled For Ignored Resources return true  WorkspaceAction isEnabledForIgnoredResources isEnabledForIgnoredResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled ForCVS Resource org eclipse team internal ccvs core ICVS Resource protected boolean is Enabled ForCVS Resource ICVS Resource cvs Resource throws CVS Exception Add to version control should never be enabled for linked resources I Resource resource cvs Resource getI Resource if resource is Linked return false return super is Enabled ForCVS Resource cvs Resource  WorkspaceAction isEnabledForCVSResource ICVSResource isEnabledForCVSResource ICVSResource cvsResource CVSException IResource cvsResource getIResource isLinked isEnabledForCVSResource cvsResource

see org eclipse team internal ccvs ui actions CVS Action execute org eclipse jface action I Action public void execute I Action action throws Invocation Target Exception Interrupted Exception new Branch Operation get Target Part get Selected Resources run  CVSAction IAction IAction InvocationTargetException InterruptedException BranchOperation getTargetPart getSelectedResources

see org eclipse team internal ccvs ui actions CVS Action execute org eclipse jface action I Action protected void execute I Action action throws Invocation Target Exception Interrupted Exception new Checkout Multiple Projects Operation get Target Part get Selected Remote Folders null run  CVSAction IAction IAction InvocationTargetException InterruptedException CheckoutMultipleProjectsOperation getTargetPart getSelectedRemoteFolders
protected boolean is Enabled throws Team Exception ICVS Remote Folder folders get Selected Remote Folders if folders length 0 return false only enabled when all folders are in the same repository ICVS Repository Location location folders 0 get Repository for int i 1 i folders length i ICVS Remote Folder folder folders i if folder get Repository equals location return false return true  isEnabled TeamException ICVSRemoteFolder getSelectedRemoteFolders ICVSRepositoryLocation getRepository ICVSRemoteFolder getRepository

public void execute I Action action throws Invocation Target Exception Interrupted Exception ICVS Remote Folder folders get Selected Remote Folders Checkout As Wizard wizard new Checkout As Wizard get Target Part folders allow Project Configuration folders Wizard Dialog dialog new Wizard Dialog shell wizard dialog open  IAction InvocationTargetException InterruptedException ICVSRemoteFolder getSelectedRemoteFolders CheckoutAsWizard CheckoutAsWizard getTargetPart allowProjectConfiguration WizardDialog WizardDialog
the New Project wizard protected boolean allow Project Configuration ICVS Remote Folder folders throws Invocation Target Exception Interrupted Exception if folders length 1 return false return Has Project Meta File Operation has Meta File get Target Part folders 0  allowProjectConfiguration ICVSRemoteFolder InvocationTargetException InterruptedException HasProjectMetaFileOperation hasMetaFile getTargetPart
see org eclipse team internal ui actions Team Action is Enabled protected boolean is Enabled throws Team Exception return get Selected Remote Folders length 0  TeamAction isEnabled isEnabled TeamException getSelectedRemoteFolders

see I Workbench Window Action Delegate dispose public void dispose  IWorkbenchWindowActionDelegate
see I Workbench Window Action Delegate init I Workbench Window public void init I Workbench Window window this shell window get Shell  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow getShell
see I Action Delegate run I Action public void run I Action action Checkout Wizard wizard new Checkout Wizard Wizard Dialog dialog new Wizard Dialog shell wizard dialog open  IActionDelegate IAction IAction CheckoutWizard CheckoutWizard WizardDialog WizardDialog
see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection

run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try ret Val 0 operation perform Prompting monitor catch CVS Exception e new Invocation Target Exception e  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException retVal performPrompting CVSException InvocationTargetException
public void execute I Action action throws Invocation Target Exception Interrupted Exception final Commit Operation operation new Commit Operation get Target Part get Selected Resources null final boolean ret Val true run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try ret Val 0 operation perform Prompting monitor catch CVS Exception e new Invocation Target Exception e false PROGRESS BUSYCURSOR if ret Val 0 operation run  IAction InvocationTargetException InterruptedException CommitOperation CommitOperation getTargetPart getSelectedResources retVal IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException retVal performPrompting CVSException InvocationTargetException PROGRESS_BUSYCURSOR retVal
see org eclipse team internal ccvs ui actions CVS Action get Error Title protected String get Error Title return Policy bind Commit Action commit Failed NON NLS 1  CVSAction getErrorTitle getErrorTitle CommitAction commitFailed
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Unmanaged Resources protected boolean is Enabled For Unmanaged Resources return true  WorkspaceAction isEnabledForUnmanagedResources isEnabledForUnmanagedResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Non Existant Resources protected boolean is Enabled For Non Existant Resources return true  WorkspaceAction isEnabledForNonExistantResources isEnabledForNonExistantResources

public void execute I Action action throws Invocation Target Exception Interrupted Exception ICVS Remote Resource editions get Selected Remote Resources if editions null editions length 2 Message Dialog open Error get Shell Policy bind Compare Remote Resources Action unable To Compare Policy bind Compare Remote Resources Action select Two Resources NON NLS 1 NON NLS 2 return try if is Same Folder editions new Remote Compare Operation null editions 0 Remote Compare Operation get Tag editions 1 run else Resource Edition Node left new Resource Edition Node editions 0 Resource Edition Node right new Resource Edition Node editions 1 CompareUI open Compare Editor On Page new CVS Compare Editor Input left right get Target Page catch CVS Exception e throw new Invocation Target Exception e  IAction InvocationTargetException InterruptedException ICVSRemoteResource getSelectedRemoteResources MessageDialog openError getShell CompareRemoteResourcesAction unableToCompare CompareRemoteResourcesAction selectTwoResources isSameFolder RemoteCompareOperation RemoteCompareOperation getTag ResourceEditionNode ResourceEditionNode ResourceEditionNode ResourceEditionNode openCompareEditorOnPage CVSCompareEditorInput getTargetPage CVSException InvocationTargetException
protected boolean is Same Folder ICVS Remote Resource editions return editions 0 is Container editions 0 get Repository equals editions 1 get Repository editions 0 get Repository Relative Path equals editions 1 get Repository Relative Path  isSameFolder ICVSRemoteResource isContainer getRepository getRepository getRepositoryRelativePath getRepositoryRelativePath
protected boolean is Enabled throws Team Exception ICVS Remote Resource resources get Selected Remote Resources if resources length 2 return false if resources 0 is Container resources 1 is Container return false Don t allow comparisons of two unrelated remote projects return resources 0 is Container is Same Folder resources  isEnabled TeamException ICVSRemoteResource getSelectedRemoteResources isContainer isContainer isContainer isSameFolder

run new I Runnable With Progress public void run I Progress Monitor monitor ICVS Folder folder if resource instanceof ICVS Remote Folder folder ICVS Folder resource else folder resource get Parent tag 0 Tag Selection Dialog get Tag To Compare With get Shell new ICVS Folder folder  IRunnableWithProgress IProgressMonitor ICVSFolder ICVSRemoteFolder ICVSFolder getParent TagSelectionDialog getTagToCompareWith getShell ICVSFolder
see org eclipse team internal ccvs ui actions CVS Action execute org eclipse jface action I Action protected void execute I Action action throws Invocation Target Exception Interrupted Exception ICVS Remote Resource resources get Selected Remote Resources if resources length 0 return Obtain the tag to compare against final ICVS Remote Resource resource resources 0 final CVS Tag tag new CVS Tag null run new I Runnable With Progress public void run I Progress Monitor monitor ICVS Folder folder if resource instanceof ICVS Remote Folder folder ICVS Folder resource else folder resource get Parent tag 0 Tag Selection Dialog get Tag To Compare With get Shell new ICVS Folder folder false cancelable PROGRESS BUSYCURSOR if tag 0 null return Run the compare operation in the background new Remote Compare Operation get Target Part resource tag 0 run  CVSAction IAction IAction InvocationTargetException InterruptedException ICVSRemoteResource getSelectedRemoteResources ICVSRemoteResource CVSTag CVSTag IRunnableWithProgress IProgressMonitor ICVSFolder ICVSRemoteFolder ICVSFolder getParent TagSelectionDialog getTagToCompareWith getShell ICVSFolder PROGRESS_BUSYCURSOR RemoteCompareOperation getTargetPart
see org eclipse team internal ui actions Team Action is Enabled protected boolean is Enabled ICVS Remote Resource resources get Selected Remote Resources Only support single select for now Need to avoid overlap if multi select is supported return resources length 1  TeamAction isEnabled isEnabled ICVSRemoteResource getSelectedRemoteResources

see Team Action set Action Enablement org eclipse jface action I Action protected void set Action Enablement I Action action super set Action Enablement action action set Text calculate Action Tag Value  TeamAction setActionEnablement IAction setActionEnablement IAction setActionEnablement setText calculateActionTagValue
Enable for resources that are managed using super or whose parent is a CVS folder see org eclipse team internal ccvs ui actions Workspace Action is Enabled ForCVS Resource org eclipse team internal ccvs core ICVS Resource protected boolean is Enabled ForCVS Resource ICVS Resource cvs Resource throws CVS Exception return super is Enabled ForCVS Resource cvs Resource cvs Resource get Parent isCVS Folder  WorkspaceAction isEnabledForCVSResource ICVSResource isEnabledForCVSResource ICVSResource cvsResource CVSException isEnabledForCVSResource cvsResource cvsResource getParent isCVSFolder
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Non Existant Resources protected boolean is Enabled For Non Existant Resources return true  WorkspaceAction isEnabledForNonExistantResources isEnabledForNonExistantResources

Returns the selected remote file protected ICVS Remote File get Selected Remote File I Resource resources get Selected Resources if resources length 1 return null if resources 0 instanceof I File return null I File file I File resources 0 try return ICVS Remote File CVS Workspace Root get Remote Resource For file catch Team Exception e handle e null null return null  ICVSRemoteFile getSelectedRemoteFile IResource getSelectedResources IFile IFile IFile ICVSRemoteFile CVSWorkspaceRoot getRemoteResourceFor TeamException
Get the selected file run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception file 0 get Selected Remote File  IRunnableWithProgress IProgressMonitor InvocationTargetException getSelectedRemoteFile
run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try monitor begin Task Policy bind Compare With Revision Action fetching 100 NON NLS 1 entries 0 file 0 get Log Entries Policy sub Monitor For monitor 100 monitor done catch Team Exception e throw new Invocation Target Exception e  IRunnableWithProgress IProgressMonitor InvocationTargetException beginTask CompareWithRevisionAction getLogEntries subMonitorFor TeamException InvocationTargetException
run new I Runnable With Progress public void run I Progress Monitor monitor throws Interrupted Exception Invocation Target Exception CVS Compare Revisions Input input new CVS Compare Revisions Input I File get Selected Resources 0 entries 0 if CVSUI Plugin get Plugin get Preference Store get Boolean ICVSUI Constants PREF SHOW COMPARE REVISION IN DIALOG running with a null progress monitor is fine because we have already pre fetched the log entries above input run new Null Progress Monitor Saveable Part Dialog cd create Compare Dialog get Shell input cd set Block On Open true cd open else CompareUI open Compare Editor input  IRunnableWithProgress IProgressMonitor InterruptedException InvocationTargetException CVSCompareRevisionsInput CVSCompareRevisionsInput IFile getSelectedResources CVSUIPlugin getPlugin getPreferenceStore getBoolean ICVSUIConstants PREF_SHOW_COMPARE_REVISION_IN_DIALOG NullProgressMonitor SaveablePartDialog createCompareDialog getShell setBlockOnOpen openCompareEditor
public void execute I Action action throws Invocation Target Exception Interrupted Exception Setup holders final ICVS Remote File file new ICVS Remote File null final I Log Entry entries new I Log Entry null Get the selected file run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception file 0 get Selected Remote File false cancelable PROGRESS BUSYCURSOR if file 0 null No revisions for selected file Message Dialog open Warning get Shell Policy bind Compare With Revision Action no Revisions Policy bind Compare With Revision Action no Revisions Long NON NLS 1 NON NLS 2 return Fetch the log entries run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try monitor begin Task Policy bind Compare With Revision Action fetching 100 NON NLS 1 entries 0 file 0 get Log Entries Policy sub Monitor For monitor 100 monitor done catch Team Exception e throw new Invocation Target Exception e true cancelable PROGRESS DIALOG if entries 0 null return Show the compare viewer run new I Runnable With Progress public void run I Progress Monitor monitor throws Interrupted Exception Invocation Target Exception CVS Compare Revisions Input input new CVS Compare Revisions Input I File get Selected Resources 0 entries 0 if CVSUI Plugin get Plugin get Preference Store get Boolean ICVSUI Constants PREF SHOW COMPARE REVISION IN DIALOG running with a null progress monitor is fine because we have already pre fetched the log entries above input run new Null Progress Monitor Saveable Part Dialog cd create Compare Dialog get Shell input cd set Block On Open true cd open else CompareUI open Compare Editor input false cancelable PROGRESS BUSYCURSOR  IAction InvocationTargetException InterruptedException ICVSRemoteFile ICVSRemoteFile ILogEntry ILogEntry IRunnableWithProgress IProgressMonitor InvocationTargetException getSelectedRemoteFile PROGRESS_BUSYCURSOR MessageDialog openWarning getShell CompareWithRevisionAction noRevisions CompareWithRevisionAction noRevisionsLong IRunnableWithProgress IProgressMonitor InvocationTargetException beginTask CompareWithRevisionAction getLogEntries subMonitorFor TeamException InvocationTargetException PROGRESS_DIALOG IRunnableWithProgress IProgressMonitor InterruptedException InvocationTargetException CVSCompareRevisionsInput CVSCompareRevisionsInput IFile getSelectedResources CVSUIPlugin getPlugin getPreferenceStore getBoolean ICVSUIConstants PREF_SHOW_COMPARE_REVISION_IN_DIALOG NullProgressMonitor SaveablePartDialog createCompareDialog getShell setBlockOnOpen openCompareEditor PROGRESS_BUSYCURSOR
Return the compare dialog to use to show the compare input protected Saveable Part Dialog create Compare Dialog Shell shell CVS Compare Revisions Input input return new Saveable Part Dialog shell input NON NLS 1  SaveablePartDialog createCompareDialog CVSCompareRevisionsInput SaveablePartDialog
Return the text describing this action protected String get Action Title return Policy bind Compare With Revision Action 4 NON NLS 1  getActionTitle CompareWithRevisionAction
see org eclipse team internal ccvs ui actions CVS Action get Error Title protected String get Error Title return Policy bind Compare With Revision Action compare NON NLS 1  CVSAction getErrorTitle getErrorTitle CompareWithRevisionAction
see org eclipse team internal ccvs ui actions Workspace Action is Enabled ForCVS Resource org eclipse team internal ccvs core ICVS Resource protected boolean is Enabled ForCVS Resource ICVS Resource cvs Resource throws CVS Exception return cvs Resource is Folder super is Enabled ForCVS Resource cvs Resource  WorkspaceAction isEnabledForCVSResource ICVSResource isEnabledForCVSResource ICVSResource cvsResource CVSException cvsResource isFolder isEnabledForCVSResource cvsResource
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Multiple Resources protected boolean is Enabled For Multiple Resources return false  WorkspaceAction isEnabledForMultipleResources isEnabledForMultipleResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Added Resources protected boolean is Enabled For Added Resources return false  WorkspaceAction isEnabledForAddedResources isEnabledForAddedResources

public void execute I Action action throws Invocation Target Exception Interrupted Exception final I Resource resources get Selected Resources CVS Tag tag prompt For Tag resources if tag null return CVS Compare Subscriber compare Subscriber new CVS Compare Subscriber resources tag if Sync Action is Single File resources Sync Action show Single File Comparison get Shell compare Subscriber resources 0 compare Subscriber dispose else try compare Subscriber prime Remote Tree catch CVS Exception e ignore the compare will fail if there is a real problem First check if there is an existing matching participant if so then re use it Compare Participant participant Compare Participant get Matching Participant resources tag if participant null CVS Compare Subscriber s compare Subscriber participant new Compare Participant s get Local Resources Tag resources TeamUI get Synchronize Manager add Synchronize Participants new I Synchronize Participant participant participant refresh resources Policy bind Participant comparing participant get Name null NON NLS 1  IAction InvocationTargetException InterruptedException IResource getSelectedResources CVSTag promptForTag CVSCompareSubscriber compareSubscriber CVSCompareSubscriber SyncAction isSingleFile SyncAction showSingleFileComparison getShell compareSubscriber compareSubscriber compareSubscriber primeRemoteTree CVSException CompareParticipant CompareParticipant getMatchingParticipant CVSCompareSubscriber compareSubscriber CompareParticipant getLocalResourcesTag getSynchronizeManager addSynchronizeParticipants ISynchronizeParticipant getName
protected CVS Tag prompt For Tag I Resource resources I Project projects new I Project resources length for int i 0 i resources length i projects i resources i get Project CVS Tag tag Tag Selection Dialog get Tag To Compare With get Shell projects return tag  CVSTag promptForTag IResource IProject IProject getProject CVSTag TagSelectionDialog getTagToCompareWith getShell
private CVS Tag get Local Resources Tag I Resource resources try for int i 0 i resources length i ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resources i CVS Tag tag null if cvs Resource is Folder Folder Sync Info info ICVS Folder cvs Resource get Folder Sync Info if info null tag info get Tag if tag null tag get Type CVS Tag BRANCH tag Util get Accurate Folder Tag resources i tag else tag Util get Accurate File Tag cvs Resource if tag null tag new CVS Tag return tag return new CVS Tag catch CVS Exception e return new CVS Tag  CVSTag getLocalResourcesTag IResource ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor CVSTag cvsResource isFolder FolderSyncInfo ICVSFolder cvsResource getFolderSyncInfo getTag getType CVSTag getAccurateFolderTag getAccurateFileTag cvsResource CVSTag CVSTag CVSException CVSTag
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Non Existant Resources protected boolean is Enabled For Non Existant Resources return true  WorkspaceAction isEnabledForNonExistantResources isEnabledForNonExistantResources

Returns the selected remote folders protected ICVS Remote Folder get Selected Remote Folders Array List resources null if selection is Empty resources new Array List Iterator elements I Structured Selection selection iterator while elements has Next Object next elements next if next instanceof Remote Module next Remote Module next getCVS Resource if next instanceof ICVS Remote Folder ICVS Remote Folder folder ICVS Remote Folder next if folder is Defined Module resources add next else if new Path ICVS Remote Folder next get Repository Relative Path segment Count 1 resources add next if resources null resources is Empty return ICVS Remote Folder resources to Array new ICVS Remote Folder resources size return new ICVS Remote Folder 0  ICVSRemoteFolder getSelectedRemoteFolders ArrayList isEmpty ArrayList IStructuredSelection hasNext RemoteModule RemoteModule getCVSResource ICVSRemoteFolder ICVSRemoteFolder ICVSRemoteFolder isDefinedModule ICVSRemoteFolder getRepositoryRelativePath segmentCount isEmpty ICVSRemoteFolder toArray ICVSRemoteFolder ICVSRemoteFolder
shell get Display sync Exec new Runnable public void run ICVS Folder cvs Folders new ICVS Folder roots length for int i 0 i roots length i cvs Folders i ICVS Folder roots i Tag Configuration Dialog d new Tag Configuration Dialog shell cvs Folders d open  getDisplay syncExec ICVSFolder cvsFolders ICVSFolder cvsFolders ICVSFolder TagConfigurationDialog TagConfigurationDialog cvsFolders
run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception final ICVS Remote Folder roots get Selected Remote Folders final Shell shell get Shell shell get Display sync Exec new Runnable public void run ICVS Folder cvs Folders new ICVS Folder roots length for int i 0 i roots length i cvs Folders i ICVS Folder roots i Tag Configuration Dialog d new Tag Configuration Dialog shell cvs Folders d open  IRunnableWithProgress IProgressMonitor InvocationTargetException ICVSRemoteFolder getSelectedRemoteFolders getShell getDisplay syncExec ICVSFolder cvsFolders ICVSFolder cvsFolders ICVSFolder TagConfigurationDialog TagConfigurationDialog cvsFolders
public void execute I Action action throws Invocation Target Exception Interrupted Exception run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception final ICVS Remote Folder roots get Selected Remote Folders final Shell shell get Shell shell get Display sync Exec new Runnable public void run ICVS Folder cvs Folders new ICVS Folder roots length for int i 0 i roots length i cvs Folders i ICVS Folder roots i Tag Configuration Dialog d new Tag Configuration Dialog shell cvs Folders d open false cancelable PROGRESS BUSYCURSOR  IAction InvocationTargetException InterruptedException IRunnableWithProgress IProgressMonitor InvocationTargetException ICVSRemoteFolder getSelectedRemoteFolders getShell getDisplay syncExec ICVSFolder cvsFolders ICVSFolder cvsFolders ICVSFolder TagConfigurationDialog TagConfigurationDialog cvsFolders PROGRESS_BUSYCURSOR
protected boolean is Enabled throws Team Exception ICVS Remote Folder roots get Selected Remote Folders if roots length 1 return false return true  isEnabled TeamException ICVSRemoteFolder getSelectedRemoteFolders
see org eclipse team internal ccvs ui actions CVS Action get Error Title protected String get Error Title return Policy bind ConfigureTagsFromRepoViewConfigure Tag Error 1 NON NLS 1  CVSAction getErrorTitle getErrorTitle ConfigureTagsFromRepoViewConfigure_Tag_Error_1

Common run method for all CVS actions final public void run I Action action try if begin Execution action return execute action end Execution catch Invocation Target Exception e Handle the exception and any accumulated errors handle e catch Interrupted Exception e Show any problems that have occured so far handle null catch Team Exception e Handle the exception and any accumulated errors handle e  IAction beginExecution endExecution InvocationTargetException InterruptedException TeamException
This method gets invoked before the code CVS Action execute I Action code method It can preform any prechecking and initialization required before the action is executed Sunclasses may override but must invoke this inherited method to ensure proper initialization of this superclass is performed These included prepartion to accumulate I Status and checking for dirty editors protected boolean begin Execution I Action action throws Team Exception accumulated Status clear if needs To Save Dirty Editors if save All Editors return false return true  CVSAction IAction IStatus beginExecution IAction TeamException accumulatedStatus needsToSaveDirtyEditors saveAllEditors
Actions must override to do their work abstract protected void execute I Action action throws Invocation Target Exception Interrupted Exception  IAction InvocationTargetException InterruptedException
This method gets invoked after code CVS Action execute I Action code if no exception occured Sunclasses may override but should invoke this inherited method to ensure proper handling oy any accumulated I Status protected void end Execution throws Team Exception if accumulated Status is Empty handle null  CVSAction IAction IStatus endExecution TeamException accumulatedStatus isEmpty
Add a status to the list of accumulated status These will be provided to method handle Exception I Status when the action completes protected void add Status I Status status accumulated Status add status  IStatus addStatus IStatus accumulatedStatus
Return the list of status accumulated so far by the action This will include any OK status that were added using add Status I Status protected I Status get Accumulated Status return I Status accumulated Status to Array new I Status accumulated Status size  addStatus IStatus IStatus getAccumulatedStatus IStatus accumulatedStatus toArray IStatus accumulatedStatus
Return the title to be displayed on error dialogs Sunclasses should override to present a custon message protected String get Error Title return Policy bind CVS Action error Title NON NLS 1  getErrorTitle CVSAction errorTitle
Return the title to be displayed on error dialogs when warnigns occur Sunclasses should override to present a custon message protected String get Warning Title return Policy bind CVS Action warning Title NON NLS 1  getWarningTitle CVSAction warningTitle
Return the message to be used for the parent Multi Status when mulitple errors occur during an action Sunclasses should override to present a custon message protected String get Multi Status Message return Policy bind CVS Action multiple Problems Message NON NLS 1  MultiStatus getMultiStatusMessage CVSAction multipleProblemsMessage
Return the status to be displayed in an error dialog for the given list of non OK status This method can be overridden bu subclasses Returning an OK status will prevent the error dialog from being shown protected I Status get Status To Display I Status problems if problems length 1 return problems 0 Multi Status combined Status new Multi Status CVSUI Plugin ID 0 get Multi Status Message null NON NLS 1 for int i 0 i problems length i combined Status merge problems i return combined Status  IStatus getStatusToDisplay IStatus MultiStatus combinedStatus MultiStatus CVSUIPlugin getMultiStatusMessage combinedStatus combinedStatus
Method that implements generic handling of an exception Thsi method will also use any accumulated status when determining what information if any to show the user param exception the exception that occured or null if none occured param status any status accumulated by the action before the end of the action or the exception occured protected void handle Exception exception Get the non OK statii List problems new Array List I Status status get Accumulated Status if status null for int i 0 i status length i I Status i Status status i if i Status isOK i Status get Code CVS Status SERVER ERROR problems add i Status Handle the case where there are no problem statii if problems size 0 if exception null return handle exception get Error Title null return For now display both the exception and the problem status Later we can determine how to display both together if exception null handle exception get Error Title null String message null I Status status To Display get Status To Display I Status problems to Array new I Status problems size if status To Display isOK return if status To Display is Multi Status status To Display get Children length 1 message status To Display get Message status To Display status To Display get Children 0 String title if status To Display get Severity I Status ERROR title get Error Title else title get Warning Title CVSUI Plugin open Error get Shell title message new CVS Exception status To Display  ArrayList IStatus getAccumulatedStatus IStatus iStatus iStatus iStatus getCode CVSStatus SERVER_ERROR iStatus getErrorTitle getErrorTitle IStatus statusToDisplay getStatusToDisplay IStatus toArray IStatus statusToDisplay statusToDisplay isMultiStatus statusToDisplay getChildren statusToDisplay getMessage statusToDisplay statusToDisplay getChildren statusToDisplay getSeverity IStatus getErrorTitle getWarningTitle CVSUIPlugin openError getShell CVSException statusToDisplay
Ensure that no repository view refresh happens until after the action final I Runnable With Progress inner Runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception get Repository Manager run runnable monitor  IRunnableWithProgress innerRunnable IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException getRepositoryManager
Busy Indicator show While Display get Current new Runnable public void run try inner Runnable run new Null Progress Monitor catch Invocation Target Exception e exceptions 0 e catch Interrupted Exception e exceptions 0 e  BusyIndicator showWhile getCurrent innerRunnable NullProgressMonitor InvocationTargetException InterruptedException
Convenience method for running an operation with the appropriate progress Any exceptions are propogated so they can be handled by the code CVS Action run I Action code error handling code param runnable the runnable which executes the operation param cancelable indicate if a progress monitor should be cancelable param progress Kind one of PROGRESS BUSYCURSOR or PROGRESS DIALOG final protected void run final I Runnable With Progress runnable boolean cancelable int progress Kind throws Invocation Target Exception Interrupted Exception final Exception exceptions new Exception null Ensure that no repository view refresh happens until after the action final I Runnable With Progress inner Runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception get Repository Manager run runnable monitor switch progress Kind case PROGRESS BUSYCURSOR Busy Indicator show While Display get Current new Runnable public void run try inner Runnable run new Null Progress Monitor catch Invocation Target Exception e exceptions 0 e catch Interrupted Exception e exceptions 0 e break case PROGRESS DIALOG default new Progress Monitor Dialog get Shell run cancelable true inner Runnable break if exceptions 0 null if exceptions 0 instanceof Invocation Target Exception throw Invocation Target Exception exceptions 0 else throw Interrupted Exception exceptions 0  CVSAction IAction progressKind PROGRESS_BUSYCURSOR PROGRESS_DIALOG IRunnableWithProgress progressKind InvocationTargetException InterruptedException IRunnableWithProgress innerRunnable IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException getRepositoryManager progressKind PROGRESS_BUSYCURSOR BusyIndicator showWhile getCurrent innerRunnable NullProgressMonitor InvocationTargetException InterruptedException PROGRESS_DIALOG ProgressMonitorDialog getShell innerRunnable InvocationTargetException InvocationTargetException InterruptedException
Answers if the action would like dirty editors to saved based on the CVS preference before running the action By default CVS Actions do not save dirty editors protected boolean needs To Save Dirty Editors return false  CVSActions needsToSaveDirtyEditors
Returns the selected CVS resources protected ICVS Resource get SelectedCVS Resources Array List resources null if selection is Empty resources new Array List Iterator elements selection iterator while elements has Next Object next elements next if next instanceof ICVS Resource resources add next continue if next instanceof I Adaptable I Adaptable a I Adaptable next Object adapter a get Adapter ICVS Resource class if adapter instanceof ICVS Resource resources add adapter continue if resources null resources is Empty return ICVS Resource resources to Array new ICVS Resource resources size return new ICVS Resource 0  ICVSResource getSelectedCVSResources ArrayList isEmpty ArrayList hasNext ICVSResource IAdaptable IAdaptable IAdaptable getAdapter ICVSResource ICVSResource isEmpty ICVSResource toArray ICVSResource ICVSResource
Get selected CVS remote folders protected ICVS Remote Folder get Selected Remote Folders Array List resources null if selection is Empty resources new Array List Iterator elements selection iterator while elements has Next Object next elements next if next instanceof ICVS Remote Folder resources add next continue if next instanceof I Adaptable I Adaptable a I Adaptable next Object adapter a get Adapter ICVS Remote Folder class if adapter instanceof ICVS Remote Folder resources add adapter continue if resources null resources is Empty return ICVS Remote Folder resources to Array new ICVS Remote Folder resources size return new ICVS Remote Folder 0  ICVSRemoteFolder getSelectedRemoteFolders ArrayList isEmpty ArrayList hasNext ICVSRemoteFolder IAdaptable IAdaptable IAdaptable getAdapter ICVSRemoteFolder ICVSRemoteFolder isEmpty ICVSRemoteFolder toArray ICVSRemoteFolder ICVSRemoteFolder
Returns the selected remote resources protected ICVS Remote Resource get Selected Remote Resources Array List resources null if selection is Empty resources new Array List Iterator elements selection iterator while elements has Next Object next elements next if next instanceof ICVS Remote Resource resources add next continue if next instanceof I Log Entry resources add I Log Entry next get Remote File continue if next instanceof I Adaptable I Adaptable a I Adaptable next Object adapter a get Adapter ICVS Remote Resource class if adapter instanceof ICVS Remote Resource resources add adapter continue if resources null resources is Empty ICVS Remote Resource result new ICVS Remote Resource resources size resources to Array result return result return new ICVS Remote Resource 0  ICVSRemoteResource getSelectedRemoteResources ArrayList isEmpty ArrayList hasNext ICVSRemoteResource ILogEntry ILogEntry getRemoteFile IAdaptable IAdaptable IAdaptable getAdapter ICVSRemoteResource ICVSRemoteResource isEmpty ICVSRemoteResource ICVSRemoteResource toArray ICVSRemoteResource
return new I Prompt Condition List resources Arrays as List dirty Resources public boolean needs Prompt I Resource resource return resources contains resource  IPromptCondition asList dirtyResources needsPrompt IResource
return resources contains resource public String prompt Message I Resource resource return Policy bind Replace With Action local Changes resource get Name NON NLS 1  promptMessage IResource ReplaceWithAction localChanges getName
A helper prompt condition for prompting for CVS dirty state public static I Prompt Condition get Overwrite Local Changes Prompt final I Resource dirty Resources return new I Prompt Condition List resources Arrays as List dirty Resources public boolean needs Prompt I Resource resource return resources contains resource public String prompt Message I Resource resource return Policy bind Replace With Action local Changes resource get Name NON NLS 1  IPromptCondition getOverwriteLocalChangesPrompt IResource dirtyResources IPromptCondition asList dirtyResources needsPrompt IResource promptMessage IResource ReplaceWithAction localChanges getName
Checks if a the resources parent s tags are different then the given tag Prompts the user that they are adding mixed tags and returns code true code if the user wants to continue or code false code otherwise public static boolean check For Mixing Tags final Shell shell I Resource resources final CVS Tag tag throws CVS Exception final I Preference Store store CVSUI Plugin get Plugin get Preference Store if store get Boolean ICVSUI Constants PREF PROMPT ON MIXED TAGS return true final boolean result new boolean true for int i 0 i resources length i I Resource resource resources i if resource get Type I Resource PROJECT ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource CVS Tag parent Tag cvs Resource get Parent get Folder Sync Info get Tag prompt if the tags are not equal consider BASE to be equal the parent tag since we don t make BASE sticky on replace if CVS Tag equal Tags tag parent Tag CVS Tag equal Tags tag CVS Tag BASE shell get Display sync Exec new Runnable public void run Avoidable Message Dialog dialog new Avoidable Message Dialog shell Policy bind CVS Action mixing Tags Title NON NLS 1 null accept the default window icon Policy bind CVS Action mixing Tags tag get Name NON NLS 1 Message Dialog QUESTION new String I Dialog Constants OK LABEL I Dialog Constants CANCEL LABEL 0 result 0 dialog open 0 if result 0 dialog is Dont Show Again store set Value ICVSUI Constants PREF PROMPT ON MIXED TAGS false only prompt once break return result 0  checkForMixingTags IResource CVSTag CVSException IPreferenceStore CVSUIPlugin getPlugin getPreferenceStore getBoolean ICVSUIConstants PREF_PROMPT_ON_MIXED_TAGS IResource getType IResource ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor CVSTag parentTag cvsResource getParent getFolderSyncInfo getTag CVSTag equalTags parentTag CVSTag equalTags CVSTag getDisplay syncExec AvoidableMessageDialog AvoidableMessageDialog CVSAction mixingTagsTitle CVSAction mixingTags getName MessageDialog IDialogConstants OK_LABEL IDialogConstants CANCEL_LABEL isDontShowAgain setValue ICVSUIConstants PREF_PROMPT_ON_MIXED_TAGS
Display get Default sync Exec new Runnable public void run boolean confirm option ICVSUI Constants OPTION PROMPT I Resource selected Resources get Selected Resources if selected Resources null ok To Continue 0 IDE save All Editors selected Resources confirm  getDefault syncExec ICVSUIConstants OPTION_PROMPT IResource selectedResources getSelectedResources selectedResources okToContinue saveAllEditors selectedResources
Based on the CVS preference for saving dirty editors this method will either ignore dirty editors save them automatically or prompt the user to save them return code true code if the command succeeded and code false code if at least one editor with unsaved changes was not saved private boolean save All Editors final int option CVSUI Plugin get Plugin get Preference Store get Int ICVSUI Constants PREF SAVE DIRTY EDITORS final boolean ok To Continue new boolean true if option ICVSUI Constants OPTION NEVER Display get Default sync Exec new Runnable public void run boolean confirm option ICVSUI Constants OPTION PROMPT I Resource selected Resources get Selected Resources if selected Resources null ok To Continue 0 IDE save All Editors selected Resources confirm return ok To Continue 0  saveAllEditors CVSUIPlugin getPlugin getPreferenceStore getInt ICVSUIConstants PREF_SAVE_DIRTY_EDITORS okToContinue ICVSUIConstants OPTION_NEVER getDefault syncExec ICVSUIConstants OPTION_PROMPT IResource selectedResources getSelectedResources selectedResources okToContinue saveAllEditors selectedResources okToContinue
see org eclipse team internal ui actions Team Action handle java lang Exception java lang String java lang String protected void handle Exception exception String title String message CVSUI Plugin open Error get Shell title message exception CVSUI Plugin LOG NONTEAM EXCEPTIONS  TeamAction CVSUIPlugin openError getShell CVSUIPlugin LOG_NONTEAM_EXCEPTIONS
protected Repository Manager get Repository Manager return CVSUI Plugin get Plugin get Repository Manager  RepositoryManager getRepositoryManager CVSUIPlugin getPlugin getRepositoryManager
see org eclipse team internal ui actions Team Action get Selected Resources protected I Resource get Selected Resources return Utils get Resources selection to Array  TeamAction getSelectedResources IResource getSelectedResources getResources toArray
public void set Active Editor I Action action I Editor Part target Editor  setActiveEditor IAction IEditorPart targetEditor

execute Provider Action new I Provider Action public I Status execute CVS Team Provider provider I Resource resources I Progress Monitor monitor throws CVS Exception provider edit resources false recurse true notify server ICVS File NO NOTIFICATION monitor return Team OK STATUS  executeProviderAction IProviderAction IStatus CVSTeamProvider IResource IProgressMonitor CVSException ICVSFile NO_NOTIFICATION OK_STATUS
PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception execute Provider Action editors Policy sub Monitor For monitor 25 If there are editors show them and prompt the user to execute the edit command if editors prompt To Edit shell return execute Provider Action new I Provider Action public I Status execute CVS Team Provider provider I Resource resources I Progress Monitor monitor throws CVS Exception provider edit resources false recurse true notify server ICVS File NO NOTIFICATION monitor return Team OK STATUS Policy sub Monitor For monitor 75  getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException executeProviderAction subMonitorFor promptToEdit executeProviderAction IProviderAction IStatus CVSTeamProvider IResource IProgressMonitor CVSException ICVSFile NO_NOTIFICATION OK_STATUS subMonitorFor
see org eclipse team internal ccvs ui actions CVS Action execute org eclipse jface action I Action protected void execute I Action action throws Invocation Target Exception Interrupted Exception Get the editors final Editors Action editors new Editors Action PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception execute Provider Action editors Policy sub Monitor For monitor 25 If there are editors show them and prompt the user to execute the edit command if editors prompt To Edit shell return execute Provider Action new I Provider Action public I Status execute CVS Team Provider provider I Resource resources I Progress Monitor monitor throws CVS Exception provider edit resources false recurse true notify server ICVS File NO NOTIFICATION monitor return Team OK STATUS Policy sub Monitor For monitor 75  CVSAction IAction IAction InvocationTargetException InterruptedException EditorsAction EditorsAction getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException executeProviderAction subMonitorFor promptToEdit executeProviderAction IProviderAction IStatus CVSTeamProvider IResource IProgressMonitor CVSException ICVSFile NO_NOTIFICATION OK_STATUS subMonitorFor
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Added Resources protected boolean is Enabled For Added Resources return false  WorkspaceAction isEnabledForAddedResources isEnabledForAddedResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled ForCVS Resource org eclipse team internal ccvs core ICVS Resource protected boolean is Enabled ForCVS Resource ICVS Resource cvs Resource throws CVS Exception if cvs Resource is Folder return false if super is Enabled ForCVS Resource cvs Resource return ICVS File cvs Resource is Read Only else return false  WorkspaceAction isEnabledForCVSResource ICVSResource isEnabledForCVSResource ICVSResource cvsResource CVSException cvsResource isFolder isEnabledForCVSResource cvsResource ICVSFile cvsResource isReadOnly

I Resource f resources public Editors Action  IResource f_resources EditorsAction
public Editors Action CVS Team Provider provider I Resource resources f provider provider f resources resources  EditorsAction CVSTeamProvider IResource f_provider f_resources
see org eclipse team internal ccvs ui actions Workspace Action I Provider Action execute org eclipse team internal ccvs core CVS Team Provider org eclipse core resources I Resource org eclipse core runtime I Progress Monitor public I Status execute CVS Team Provider provider I Resource resources I Progress Monitor monitor throws CVS Exception f editorsInfo provider editors resources monitor return Team OK STATUS  WorkspaceAction IProviderAction CVSTeamProvider IResource IProgressMonitor IStatus CVSTeamProvider IResource IProgressMonitor CVSException f_editorsInfo OK_STATUS
public boolean prompt To Edit Shell shell if is Empty final Editors Dialog view new Editors Dialog shell f editorsInfo Open the dialog using a sync exec there are no guarentees that we were called from the UI thread CVSUI Plugin open Dialog shell new CVSUI Plugin I Openable In Shell public void open Shell shell view open CVSUI Plugin PERFORM SYNC EXEC return view get Return Code Editors Dialog OK return true  promptToEdit isEmpty EditorsDialog EditorsDialog f_editorsInfo CVSUIPlugin openDialog CVSUIPlugin IOpenableInShell CVSUIPlugin PERFORM_SYNC_EXEC getReturnCode EditorsDialog
Contact the server to determine if there are any editors on the associatd files see org eclipse jface operation I Runnable With Progress run org eclipse core runtime I Progress Monitor public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception if f provider null f resources null throw new Invocation Target Exception new Runtime Exception Policy bind Editors Action class Not Initialized this get Class get Name NON NLS 1 try execute f provider f resources monitor catch CVS Exception e throw new Invocation Target Exception e  IRunnableWithProgress IProgressMonitor IProgressMonitor InvocationTargetException InterruptedException f_provider f_resources InvocationTargetException RuntimeException EditorsAction classNotInitialized getClass getName f_provider f_resources CVSException InvocationTargetException
Returns the f editorsInfo return Editors Info public Editors Info get Editors Info return f editorsInfo  f_editorsInfo EditorsInfo EditorsInfo getEditorsInfo f_editorsInfo
Indicates whether there are editors of any of the associated files The code run I Progress Monitor code must be invoked first to fetch any editors from the server return boolean public boolean is Empty return f editorsInfo length 0  IProgressMonitor isEmpty f_editorsInfo

Non javadoc Method declared on I Action Delegate public void execute I Action action final String title Policy bind GenerateCVS Diff title NON NLS 1 final I Resource resources get Selected Resources Generate Diff File Wizard wizard new Generate Diff File Wizard new Structured Selection resources resources 0 wizard set Window Title title Wizard Dialog dialog new Wizard Dialog get Shell wizard dialog set Minimum Page Size 350 250 dialog open  IActionDelegate IAction GenerateCVSDiff IResource getSelectedResources GenerateDiffFileWizard GenerateDiffFileWizard StructuredSelection setWindowTitle WizardDialog WizardDialog getShell setMinimumPageSize
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Multiple Resources protected boolean is Enabled For Multiple Resources return false  WorkspaceAction isEnabledForMultipleResources isEnabledForMultipleResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Unmanaged Resources protected boolean is Enabled For Unmanaged Resources return true  WorkspaceAction isEnabledForUnmanagedResources isEnabledForUnmanagedResources

run new Workspace Modify Operation null public void execute I Progress Monitor monitor throws Interrupted Exception Invocation Target Exception I Resource resources get Selected Resources Ignore Resources Dialog dialog new Ignore Resources Dialog get Shell resources if dialog open Ignore Resources Dialog OK return try for int i 0 i resources length i I Resource resource resources i String pattern dialog get Ignore Pattern For resource ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource cvs Resource set Ignored As pattern fix the action enablement if action null action set Enabled is Enabled catch Team Exception e throw new Invocation Target Exception e  WorkspaceModifyOperation IProgressMonitor InterruptedException InvocationTargetException IResource getSelectedResources IgnoreResourcesDialog IgnoreResourcesDialog getShell IgnoreResourcesDialog IResource getIgnorePatternFor ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor cvsResource setIgnoredAs setEnabled isEnabled TeamException InvocationTargetException
protected void execute final I Action action throws Invocation Target Exception Interrupted Exception run new Workspace Modify Operation null public void execute I Progress Monitor monitor throws Interrupted Exception Invocation Target Exception I Resource resources get Selected Resources Ignore Resources Dialog dialog new Ignore Resources Dialog get Shell resources if dialog open Ignore Resources Dialog OK return try for int i 0 i resources length i I Resource resource resources i String pattern dialog get Ignore Pattern For resource ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource cvs Resource set Ignored As pattern fix the action enablement if action null action set Enabled is Enabled catch Team Exception e throw new Invocation Target Exception e false cancelable PROGRESS BUSYCURSOR  IAction InvocationTargetException InterruptedException WorkspaceModifyOperation IProgressMonitor InterruptedException InvocationTargetException IResource getSelectedResources IgnoreResourcesDialog IgnoreResourcesDialog getShell IgnoreResourcesDialog IResource getIgnorePatternFor ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor cvsResource setIgnoredAs setEnabled isEnabled TeamException InvocationTargetException PROGRESS_BUSYCURSOR
see org eclipse team internal ccvs ui actions CVS Action get Error Title protected String get Error Title return Policy bind Ignore Action ignore NON NLS 1  CVSAction getErrorTitle getErrorTitle IgnoreAction
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Managed Resources protected boolean is Enabled For Managed Resources return false  WorkspaceAction isEnabledForManagedResources isEnabledForManagedResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Unmanaged Resources protected boolean is Enabled For Unmanaged Resources return true  WorkspaceAction isEnabledForUnmanagedResources isEnabledForUnmanagedResources
protected boolean is Enabled ForCVS Resource ICVS Resource cvs Resource throws CVS Exception if super is Enabled ForCVS Resource cvs Resource Perform an extra check against the subscriberto ensue there is no conflict CVS Workspace Subscriber subscriber CVS Provider Plugin get Plugin getCVS Workspace Subscriber I Resource resource cvs Resource getI Resource if resource null return false try Sync Info info subscriber get Sync Info resource return info get Kind Sync Info DIRECTION MASK Sync Info OUTGOING catch Team Exception e Let the enablement happen return true return false  isEnabledForCVSResource ICVSResource cvsResource CVSException isEnabledForCVSResource cvsResource CVSWorkspaceSubscriber CVSProviderPlugin getPlugin getCVSWorkspaceSubscriber IResource cvsResource getIResource SyncInfo getSyncInfo getKind SyncInfo DIRECTION_MASK SyncInfo TeamException

shell get Display sync Exec new Runnable public void run Merge Wizard wizard new Merge Wizard wizard set Resources get Selected Resources Wizard Dialog dialog new Wizard Dialog shell wizard dialog open  getDisplay syncExec MergeWizard MergeWizard setResources getSelectedResources WizardDialog WizardDialog
public void execute I Action action final Shell shell get Shell shell get Display sync Exec new Runnable public void run Merge Wizard wizard new Merge Wizard wizard set Resources get Selected Resources Wizard Dialog dialog new Wizard Dialog shell wizard dialog open  IAction getShell getDisplay syncExec MergeWizard MergeWizard setResources getSelectedResources WizardDialog WizardDialog

see Tag Remote Action prompt For Tag ICVS Folder protected I Tag Operation configure Operation Allow the user to select a tag I Tag Operation operation create Tag Operation Tag Selection Dialog dialog new Tag Selection Dialog get Shell getCVS Folders operation getCVS Resources Policy bind Move Tag Action title NON NLS 1 Policy bind Move Tag Action message NON NLS 1 Tag Selection Dialog INCLUDE BRANCHES Tag Selection Dialog INCLUDE VERSIONS true show recurse I Help Context Ids TAG REMOTE WITH EXISTING DIALOG dialog set Block On Open true if dialog open Dialog CANCEL return null CVS Tag tag dialog get Result if tag null return null operation set Tag tag operation move Tag boolean recursive dialog get Recursive if recursive operation recurse return operation  TagRemoteAction promptForTag ICVSFolder ITagOperation configureOperation ITagOperation createTagOperation TagSelectionDialog TagSelectionDialog getShell getCVSFolders getCVSResources MoveTagAction MoveTagAction TagSelectionDialog INCLUDE_BRANCHES TagSelectionDialog INCLUDE_VERSIONS IHelpContextIds TAG_REMOTE_WITH_EXISTING_DIALOG setBlockOnOpen CVSTag getResult setTag moveTag getRecursive
private ICVS Folder getCVS Folders ICVS Resource resources ICVS Folder folders new ICVS Folder resources length for int i 0 i resources length i if resources i is Folder folders i ICVS Folder resources i else folders i resources i get Parent return folders  ICVSFolder getCVSFolders ICVSResource ICVSFolder ICVSFolder isFolder ICVSFolder getParent

see I Workbench Window Action Delegate dispose public void dispose  IWorkbenchWindowActionDelegate
see I Workbench Window Action Delegate init I Workbench Window public void init I Workbench Window window this shell window get Shell  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow getShell
public void init I View Part view shell view get Site get Shell  IViewPart getSite getShell
see I Action Delegate run I Action public void run I Action action New Location Wizard wizard new New Location Wizard Wizard Dialog dialog new Wizard Dialog shell wizard dialog open  IActionDelegate IAction IAction NewLocationWizard NewLocationWizard WizardDialog WizardDialog
see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection

public class Open Log Entry Action extends CVS Action Returns the selected remote files protected I Log Entry get Selected Log Entries Array List entries null if selection is Empty entries new Array List Iterator elements I Structured Selection selection iterator while elements has Next Object next elements next if next instanceof I Log Entry entries add I Log Entry next continue if next instanceof I Adaptable I Adaptable a I Adaptable next Object adapter a get Adapter I Log Entry class if adapter instanceof I Log Entry entries add adapter continue if entries null entries is Empty I Log Entry result new I Log Entry entries size entries to Array result return result return new I Log Entry 0  OpenLogEntryAction CVSAction ILogEntry getSelectedLogEntries ArrayList isEmpty ArrayList IStructuredSelection hasNext ILogEntry ILogEntry IAdaptable IAdaptable IAdaptable getAdapter ILogEntry ILogEntry isEmpty ILogEntry ILogEntry toArray ILogEntry
run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception I Workbench workbench CVSUI Plugin get Plugin get Workbench I Editor Registry registry workbench get Editor Registry I Workbench Page page workbench get Active Workbench Window get Active Page final I Log Entry entries get Selected Log Entries for int i 0 i entries length i if entries i is Deletion Message Dialog open Error get Shell Policy bind Open Log Entry Action deleted Title Policy bind Open Log Entry Action deleted NON NLS 1 NON NLS 2 else ICVS Remote File file entries i get Remote File String filename file get Name I Editor Descriptor descriptor registry get Default Editor filename String id if descriptor null id org eclipse ui Default Text Editor NON NLS 1 else id descriptor get Id try try page open Editor new Remote File Editor Input file monitor id catch Part Init Exception e if id equals org eclipse ui Default Text Editor NON NLS 1 throw e else page open Editor new Remote File Editor Input file monitor org eclipse ui Default Text Editor NON NLS 1 catch Part Init Exception e throw new Invocation Target Exception e  IRunnableWithProgress IProgressMonitor InvocationTargetException IWorkbench CVSUIPlugin getPlugin getWorkbench IEditorRegistry getEditorRegistry IWorkbenchPage getActiveWorkbenchWindow getActivePage ILogEntry getSelectedLogEntries isDeletion MessageDialog openError getShell OpenLogEntryAction deletedTitle OpenLogEntryAction ICVSRemoteFile getRemoteFile getName IEditorDescriptor getDefaultEditor DefaultTextEditor getId openEditor RemoteFileEditorInput PartInitException DefaultTextEditor openEditor RemoteFileEditorInput DefaultTextEditor PartInitException InvocationTargetException
public void execute I Action action throws Interrupted Exception Invocation Target Exception run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception I Workbench workbench CVSUI Plugin get Plugin get Workbench I Editor Registry registry workbench get Editor Registry I Workbench Page page workbench get Active Workbench Window get Active Page final I Log Entry entries get Selected Log Entries for int i 0 i entries length i if entries i is Deletion Message Dialog open Error get Shell Policy bind Open Log Entry Action deleted Title Policy bind Open Log Entry Action deleted NON NLS 1 NON NLS 2 else ICVS Remote File file entries i get Remote File String filename file get Name I Editor Descriptor descriptor registry get Default Editor filename String id if descriptor null id org eclipse ui Default Text Editor NON NLS 1 else id descriptor get Id try try page open Editor new Remote File Editor Input file monitor id catch Part Init Exception e if id equals org eclipse ui Default Text Editor NON NLS 1 throw e else page open Editor new Remote File Editor Input file monitor org eclipse ui Default Text Editor NON NLS 1 catch Part Init Exception e throw new Invocation Target Exception e false PROGRESS BUSYCURSOR NON NLS 1  IAction InterruptedException InvocationTargetException IRunnableWithProgress IProgressMonitor InvocationTargetException IWorkbench CVSUIPlugin getPlugin getWorkbench IEditorRegistry getEditorRegistry IWorkbenchPage getActiveWorkbenchWindow getActivePage ILogEntry getSelectedLogEntries isDeletion MessageDialog openError getShell OpenLogEntryAction deletedTitle OpenLogEntryAction ICVSRemoteFile getRemoteFile getName IEditorDescriptor getDefaultEditor DefaultTextEditor getId openEditor RemoteFileEditorInput PartInitException DefaultTextEditor openEditor RemoteFileEditorInput DefaultTextEditor PartInitException InvocationTargetException PROGRESS_BUSYCURSOR
protected boolean is Enabled throws Team Exception I Log Entry entries get Selected Log Entries if entries length 0 return false return true  isEnabled TeamException ILogEntry getSelectedLogEntries

public class Open Remote File Action extends CVS Action Returns the selected remote files protected ICVS Remote File get Selected Remote Files Array List resources null if selection is Empty resources new Array List Iterator elements I Structured Selection selection iterator while elements has Next Object next elements next if next instanceof ICVS Remote File resources add next continue if next instanceof I Log Entry resources add I Log Entry next get Remote File continue if next instanceof I Adaptable I Adaptable a I Adaptable next Object adapter a get Adapter ICVS Remote File class if adapter instanceof ICVS Remote File resources add adapter continue if resources null resources is Empty ICVS Remote File result new ICVS Remote File resources size resources to Array result return result return new ICVS Remote File 0  OpenRemoteFileAction CVSAction ICVSRemoteFile getSelectedRemoteFiles ArrayList isEmpty ArrayList IStructuredSelection hasNext ICVSRemoteFile ILogEntry ILogEntry getRemoteFile IAdaptable IAdaptable IAdaptable getAdapter ICVSRemoteFile ICVSRemoteFile isEmpty ICVSRemoteFile ICVSRemoteFile toArray ICVSRemoteFile
run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception I Workbench workbench CVSUI Plugin get Plugin get Workbench I Editor Registry registry workbench get Editor Registry I Workbench Page page workbench get Active Workbench Window get Active Page ICVS Remote File files get Selected Remote Files for int i 0 i files length i ICVS Remote File file files i String filename file get Name I Editor Descriptor descriptor registry get Default Editor filename String id if descriptor null id org eclipse ui Default Text Editor NON NLS 1 else id descriptor get Id try try page open Editor new Remote File Editor Input files i monitor id catch Part Init Exception e if id equals org eclipse ui Default Text Editor NON NLS 1 throw e else page open Editor new Remote File Editor Input files i monitor org eclipse ui Default Text Editor NON NLS 1 catch Part Init Exception e throw new Invocation Target Exception e  IRunnableWithProgress IProgressMonitor InvocationTargetException IWorkbench CVSUIPlugin getPlugin getWorkbench IEditorRegistry getEditorRegistry IWorkbenchPage getActiveWorkbenchWindow getActivePage ICVSRemoteFile getSelectedRemoteFiles ICVSRemoteFile getName IEditorDescriptor getDefaultEditor DefaultTextEditor getId openEditor RemoteFileEditorInput PartInitException DefaultTextEditor openEditor RemoteFileEditorInput DefaultTextEditor PartInitException InvocationTargetException
public void execute I Action action throws Interrupted Exception Invocation Target Exception run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception I Workbench workbench CVSUI Plugin get Plugin get Workbench I Editor Registry registry workbench get Editor Registry I Workbench Page page workbench get Active Workbench Window get Active Page ICVS Remote File files get Selected Remote Files for int i 0 i files length i ICVS Remote File file files i String filename file get Name I Editor Descriptor descriptor registry get Default Editor filename String id if descriptor null id org eclipse ui Default Text Editor NON NLS 1 else id descriptor get Id try try page open Editor new Remote File Editor Input files i monitor id catch Part Init Exception e if id equals org eclipse ui Default Text Editor NON NLS 1 throw e else page open Editor new Remote File Editor Input files i monitor org eclipse ui Default Text Editor NON NLS 1 catch Part Init Exception e throw new Invocation Target Exception e false PROGRESS BUSYCURSOR NON NLS 1  IAction InterruptedException InvocationTargetException IRunnableWithProgress IProgressMonitor InvocationTargetException IWorkbench CVSUIPlugin getPlugin getWorkbench IEditorRegistry getEditorRegistry IWorkbenchPage getActiveWorkbenchWindow getActivePage ICVSRemoteFile getSelectedRemoteFiles ICVSRemoteFile getName IEditorDescriptor getDefaultEditor DefaultTextEditor getId openEditor RemoteFileEditorInput PartInitException DefaultTextEditor openEditor RemoteFileEditorInput DefaultTextEditor PartInitException InvocationTargetException PROGRESS_BUSYCURSOR
protected boolean is Enabled throws Team Exception ICVS Remote File resources get Selected Remote Files if resources length 0 return false return true  isEnabled TeamException ICVSRemoteFile getSelectedRemoteFiles

run new I Runnable With Progress public void run I Progress Monitor monitor throws Interrupted Exception Invocation Target Exception try monitor Policy monitor For monitor monitor begin Task null 100 resources 0 check Overwrite Of Dirty Resources get Selected Resources new Infinite Sub Progress Monitor monitor 100 catch Team Exception e throw new Invocation Target Exception e finally monitor done  IRunnableWithProgress IProgressMonitor InterruptedException InvocationTargetException monitorFor beginTask checkOverwriteOfDirtyResources getSelectedResources InfiniteSubProgressMonitor TeamException InvocationTargetException
public class Replace With Remote Action extends Workspace Action public void execute I Action action throws Invocation Target Exception Interrupted Exception final I Resource resources new I Resource null run new I Runnable With Progress public void run I Progress Monitor monitor throws Interrupted Exception Invocation Target Exception try monitor Policy monitor For monitor monitor begin Task null 100 resources 0 check Overwrite Of Dirty Resources get Selected Resources new Infinite Sub Progress Monitor monitor 100 catch Team Exception e throw new Invocation Target Exception e finally monitor done false cancelable PROGRESS BUSYCURSOR if resources 0 null resources 0 length 0 return Peform the replace in the background new Replace Operation get Target Part resources 0 null true run  ReplaceWithRemoteAction WorkspaceAction IAction InvocationTargetException InterruptedException IResource IResource IRunnableWithProgress IProgressMonitor InterruptedException InvocationTargetException monitorFor beginTask checkOverwriteOfDirtyResources getSelectedResources InfiniteSubProgressMonitor TeamException InvocationTargetException PROGRESS_BUSYCURSOR ReplaceOperation getTargetPart
protected I Prompt Condition get Prompt Condition I Resource dirty Resources return get Overwrite Local Changes Prompt dirty Resources  IPromptCondition getPromptCondition IResource dirtyResources getOverwriteLocalChangesPrompt dirtyResources
see org eclipse team internal ccvs ui actions CVS Action get Error Title protected String get Error Title return Policy bind Replace With Remote Action problem Message NON NLS 1  CVSAction getErrorTitle getErrorTitle ReplaceWithRemoteAction problemMessage
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Added Resources protected boolean is Enabled For Added Resources return false  WorkspaceAction isEnabledForAddedResources isEnabledForAddedResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Non Existant Resources protected boolean is Enabled For Non Existant Resources return true  WorkspaceAction isEnabledForNonExistantResources isEnabledForNonExistantResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled ForCVS Resource org eclipse team internal ccvs core ICVS Resource protected boolean is Enabled ForCVS Resource ICVS Resource cvs Resource throws CVS Exception if super is Enabled ForCVS Resource cvs Resource Don t enable if there are sticky file revisions in the lineup if cvs Resource is Folder Resource Sync Info info cvs Resource get Sync Info if info null info get Tag null String revision info get Revision String tag info get Tag get Name if revision equals tag return false return true else return false  WorkspaceAction isEnabledForCVSResource ICVSResource isEnabledForCVSResource ICVSResource cvsResource CVSException isEnabledForCVSResource cvsResource cvsResource isFolder ResourceSyncInfo cvsResource getSyncInfo getTag getRevision getTag getName
protected void set Action Enablement I Action action super set Action Enablement action action set Text calculate Action Tag Value  setActionEnablement IAction setActionEnablement setText calculateActionTagValue

public Replace Compare Dialog Shell shell CVS Compare Revisions Input input super shell input Don t allow editing of the merge viewers in the replace input get Compare Configuration set Left Editable false input get Compare Configuration set Right Editable false  ReplaceCompareDialog CVSCompareRevisionsInput getCompareConfiguration setLeftEditable getCompareConfiguration setRightEditable
input get Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e I Selection s e get Selection replace Button set Enabled s null s is Empty  getViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection replaceButton setEnabled isEmpty
Add the replace button to the dialog protected void create Buttons For Button Bar Composite parent replace Button create Button parent REPLACE ID Policy bind Replace With Revision Action 0 true NON NLS 1 replace Button set Enabled false input get Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e I Selection s e get Selection replace Button set Enabled s null s is Empty create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false NON NLS 1 Don t call super because we don t want the OK button to appear  createButtonsForButtonBar replaceButton createButton REPLACE_ID ReplaceWithRevisionAction replaceButton setEnabled getViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection replaceButton setEnabled isEmpty createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
If the replace button was pressed protected void button Pressed int button Id if button Id REPLACE ID try input replace Local With Currently Selected Revision catch Core Exception e Utils handle e button Id I Dialog Constants OK ID super button Pressed button Id  buttonPressed buttonId buttonId REPLACE_ID replaceLocalWithCurrentlySelectedRevision CoreException buttonId IDialogConstants OK_ID buttonPressed buttonId
see org eclipse team internal ccvs ui actions Compare With Revision Action create Compare Dialog org eclipse swt widgets Shell org eclipse team internal ccvs ui CVS Compare Revisions Input protected Saveable Part Dialog create Compare Dialog Shell shell CVS Compare Revisions Input input this input input return new Replace Compare Dialog shell input NON NLS 1  CompareWithRevisionAction createCompareDialog CVSCompareRevisionsInput SaveablePartDialog createCompareDialog CVSCompareRevisionsInput ReplaceCompareDialog
see org eclipse team internal ccvs ui actions Compare With Revision Action get Action Title protected String get Action Title return Policy bind Replace With Revision Action 1 NON NLS 1  CompareWithRevisionAction getActionTitle getActionTitle ReplaceWithRevisionAction

run new I Runnable With Progress public void run I Progress Monitor monitor throws Interrupted Exception Invocation Target Exception try resources 0 check Overwrite Of Dirty Resources get Selected Resources null no progress just a busy cursor for now catch CVS Exception e throw new Invocation Target Exception e if resources 0 length 0 nothing to do return show the tags for the projects of the selected resources I Project projects new I Project resources 0 length for int i 0 i resources 0 length i projects i resources 0 i get Project Tag Selection Dialog dialog new Tag Selection Dialog get Shell projects Policy bind Replace With Tag Action message NON NLS 1 Policy bind Tag Selection Dialog Select a Tag 1 NON NLS 1 Tag Selection Dialog INCLUDE ALL TAGS true show recurse I Help Context Ids REPLACE TAG SELECTION DIALOG NON NLS 1 dialog set Block On Open true if dialog open Dialog CANCEL return tag 0 dialog get Result recurse 0 dialog get Recursive For non projects determine if the tag being loaded is the same as the resource s parent If it s not warn the user that they will have strange sync behavior try if CVS Action check For Mixing Tags get Shell resources 0 tag 0 tag 0 null return catch CVS Exception e throw new Invocation Target Exception e  IRunnableWithProgress IProgressMonitor InterruptedException InvocationTargetException checkOverwriteOfDirtyResources getSelectedResources CVSException InvocationTargetException IProject IProject getProject TagSelectionDialog TagSelectionDialog getShell ReplaceWithTagAction TagSelectionDialog Select_a_Tag_1 TagSelectionDialog INCLUDE_ALL_TAGS IHelpContextIds REPLACE_TAG_SELECTION_DIALOG setBlockOnOpen getResult getRecursive CVSAction checkForMixingTags getShell CVSException InvocationTargetException
public void execute I Action action throws Interrupted Exception Invocation Target Exception Setup the holders final I Resource resources new I Resource null final CVS Tag tag new CVS Tag null final boolean recurse new boolean true Show a busy cursor while display the tag selection dialog run new I Runnable With Progress public void run I Progress Monitor monitor throws Interrupted Exception Invocation Target Exception try resources 0 check Overwrite Of Dirty Resources get Selected Resources null no progress just a busy cursor for now catch CVS Exception e throw new Invocation Target Exception e if resources 0 length 0 nothing to do return show the tags for the projects of the selected resources I Project projects new I Project resources 0 length for int i 0 i resources 0 length i projects i resources 0 i get Project Tag Selection Dialog dialog new Tag Selection Dialog get Shell projects Policy bind Replace With Tag Action message NON NLS 1 Policy bind Tag Selection Dialog Select a Tag 1 NON NLS 1 Tag Selection Dialog INCLUDE ALL TAGS true show recurse I Help Context Ids REPLACE TAG SELECTION DIALOG NON NLS 1 dialog set Block On Open true if dialog open Dialog CANCEL return tag 0 dialog get Result recurse 0 dialog get Recursive For non projects determine if the tag being loaded is the same as the resource s parent If it s not warn the user that they will have strange sync behavior try if CVS Action check For Mixing Tags get Shell resources 0 tag 0 tag 0 null return catch CVS Exception e throw new Invocation Target Exception e false cancelable PROGRESS BUSYCURSOR NON NLS 1 if resources 0 null resources 0 length 0 tag 0 null return Peform the replace in the background new Replace Operation get Target Part resources 0 tag 0 recurse 0 run  IAction InterruptedException InvocationTargetException IResource IResource CVSTag CVSTag IRunnableWithProgress IProgressMonitor InterruptedException InvocationTargetException checkOverwriteOfDirtyResources getSelectedResources CVSException InvocationTargetException IProject IProject getProject TagSelectionDialog TagSelectionDialog getShell ReplaceWithTagAction TagSelectionDialog Select_a_Tag_1 TagSelectionDialog INCLUDE_ALL_TAGS IHelpContextIds REPLACE_TAG_SELECTION_DIALOG setBlockOnOpen getResult getRecursive CVSAction checkForMixingTags getShell CVSException InvocationTargetException PROGRESS_BUSYCURSOR ReplaceOperation getTargetPart
see org eclipse team internal ccvs ui actions CVS Action get Error Title protected String get Error Title return Policy bind Replace With Tag Action replace NON NLS 1  CVSAction getErrorTitle getErrorTitle ReplaceWithTagAction
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Non Existant Resources protected boolean is Enabled For Non Existant Resources return true  WorkspaceAction isEnabledForNonExistantResources isEnabledForNonExistantResources

public I Status message Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor Find all RCS file names that contain Attic int index line index Of ATTIC if index 1 return OK Extract the file name and path from the RCS path String file Path line substring index int start line index Of Session SERVER SEPARATOR index String file Name line substring start 1 if file Name ends With RCS FILE POSTFIX file Name file Name substring 0 file Name length RCS FILE POSTFIX length try attic Files add current Folder get File file Name catch CVS Exception e return e get Status return OK  IStatus messageLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor indexOf filePath indexOf SERVER_SEPARATOR fileName fileName endsWith RCS_FILE_POSTFIX fileName fileName fileName RCS_FILE_POSTFIX atticFiles currentFolder getFile fileName CVSException getStatus
public I Status error Line String line ICVS Repository Location location ICVS Folder command Root I Progress Monitor monitor CVS Repository Location repo CVS Repository Location location String folder Path repo get Server Message Without Prefix line SERVER PREFIX if folder Path null if folder Path starts With LOGGING PREFIX folder Path folder Path substring LOGGING PREFIX length try current Folder command Root get Folder folder Path catch CVS Exception e return e get Status return OK return super error Line line location command Root monitor  IStatus errorLine ICVSRepositoryLocation ICVSFolder commandRoot IProgressMonitor CVSRepositoryLocation CVSRepositoryLocation folderPath getServerMessageWithoutPrefix SERVER_PREFIX folderPath folderPath startsWith LOGGING_PREFIX folderPath folderPath LOGGING_PREFIX currentFolder commandRoot getFolder folderPath CVSException getStatus errorLine commandRoot
public ICVS File get Attic File Paths return ICVS File attic Files to Array new ICVS File attic Files size  ICVSFile getAtticFilePaths ICVSFile atticFiles toArray ICVSFile atticFiles
see org eclipse team internal ccvs ui actions CVS Action execute org eclipse jface action I Action protected void execute I Action action throws Invocation Target Exception Interrupted Exception I Container resource I Container get Selected Resources 0 ICVS File files fetch Deleted Files resource if files null return if files length 0 Message Dialog open Information get Shell Policy bind Restore From Repository Action no Files Title Policy bind Restore From Repository Action no Files Message resource get Name NON NLS 1 NON NLS 2 return Restore From Repository Wizard wizard new Restore From Repository Wizard resource files Wizard Dialog dialog new Resizable Wizard Dialog shell wizard dialog set Minimum Page Size 350 250 dialog open  CVSAction IAction IAction InvocationTargetException InterruptedException IContainer IContainer getSelectedResources ICVSFile fetchDeletedFiles MessageDialog openInformation getShell RestoreFromRepositoryAction noFilesTitle RestoreFromRepositoryAction noFilesMessage getName RestoreFromRepositoryWizard RestoreFromRepositoryWizard WizardDialog ResizableWizardDialog setMinimumPageSize
see org eclipse team internal ui actions Team Action is Enabled protected boolean is Enabled throws Team Exception I Resource resources get Selected Resources if resources length 1 return false if resources 0 get Type I Resource FILE return false ICVS Folder folder CVS Workspace Root getCVS Folder For I Container resources 0 if folder isCVS Folder return false return true  TeamAction isEnabled isEnabled TeamException IResource getSelectedResources getType IResource ICVSFolder CVSWorkspaceRoot getCVSFolderFor IContainer isCVSFolder
run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try ICVS Folder folder CVS Workspace Root getCVS Folder For parent Folder Sync Info info folder get Folder Sync Info ICVS Repository Location location Known Repositories get Instance get Repository info get Root files 0 fetch Files In Attic location folder monitor catch CVS Exception e throw new Invocation Target Exception e  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException ICVSFolder CVSWorkspaceRoot getCVSFolderFor FolderSyncInfo getFolderSyncInfo ICVSRepositoryLocation KnownRepositories getInstance getRepository getRoot fetchFilesInAttic CVSException InvocationTargetException
private ICVS File fetch Deleted Files final I Container parent final ICVS File files new ICVS File 1 0 files 0 null try run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try ICVS Folder folder CVS Workspace Root getCVS Folder For parent Folder Sync Info info folder get Folder Sync Info ICVS Repository Location location Known Repositories get Instance get Repository info get Root files 0 fetch Files In Attic location folder monitor catch CVS Exception e throw new Invocation Target Exception e true PROGRESS DIALOG catch Invocation Target Exception e handle e catch Interrupted Exception e return null return files 0  ICVSFile fetchDeletedFiles IContainer ICVSFile ICVSFile IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException ICVSFolder CVSWorkspaceRoot getCVSFolderFor FolderSyncInfo getFolderSyncInfo ICVSRepositoryLocation KnownRepositories getInstance getRepository getRoot fetchFilesInAttic CVSException InvocationTargetException PROGRESS_DIALOG InvocationTargetException InterruptedException
private ICVS File fetch Files In Attic ICVS Repository Location location ICVS Folder parent I Progress Monitor monitor throws CVS Exception monitor Policy monitor For monitor monitor begin Task null 100 Attic Log Listener listener new Attic Log Listener Session session new Session location parent true output to console session open Policy sub Monitor For monitor 10 false read only try Quiet Option quietness CVS Provider Plugin get Plugin get Quietness try CVS Provider Plugin get Plugin set Quietness Command VERBOSE I Status status Command LOG execute session Command NO GLOBAL OPTIONS new Local Option Log RCS FILE NAMES ONLY new ICVS Resource parent listener Policy sub Monitor For monitor 90 if status get Code CVS Status SERVER ERROR throw new CVS Server Exception status finally CVS Provider Plugin get Plugin set Quietness quietness monitor done finally session close return listener get Attic File Paths  ICVSFile fetchFilesInAttic ICVSRepositoryLocation ICVSFolder IProgressMonitor CVSException monitorFor beginTask AtticLogListener AtticLogListener subMonitorFor QuietOption CVSProviderPlugin getPlugin getQuietness CVSProviderPlugin getPlugin setQuietness IStatus NO_GLOBAL_OPTIONS LocalOption RCS_FILE_NAMES_ONLY ICVSResource subMonitorFor getCode CVSStatus SERVER_ERROR CVSServerException CVSProviderPlugin getPlugin setQuietness getAtticFilePaths

public void execute I Action action final I Resource resources get Selected Resources K Subst Wizard wizard new K Subst Wizard resources I Resource DEPTH INFINITE previous Option Wizard Dialog dialog new Resizable Wizard Dialog get Shell wizard wizard set Parent Dialog dialog dialog set Minimum Page Size 350 250 dialog open previous Option wizard getK Subst Option  IAction IResource getSelectedResources KSubstWizard KSubstWizard IResource DEPTH_INFINITE previousOption WizardDialog ResizableWizardDialog getShell setParentDialog setMinimumPageSize previousOption getKSubstOption

Action to open a CVS Annotate View public void execute I Action action throws Invocation Target Exception Interrupted Exception Get the selected resource final ICVS Resource cvs Resource get Single SelectedCVS Resource execute cvs Resource  IAction InvocationTargetException InterruptedException ICVSResource cvsResource getSingleSelectedCVSResource cvsResource
run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task null 100 fetch Annotation listener cvs Resource revision Policy sub Monitor For monitor 80 try if has Charset cvs Resource listener get Contents listener set Contents get Remote Contents cvs Resource Policy sub Monitor For monitor 20 catch Core Exception e Log and continue using the original fetched contents CVSUI Plugin log e monitor done  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask fetchAnnotation cvsResource subMonitorFor hasCharset cvsResource getContents setContents getRemoteContents cvsResource subMonitorFor CoreException CVSUIPlugin
public void execute final ICVS Resource cvs Resource throws Invocation Target Exception Interrupted Exception final Annotate Listener listener new Annotate Listener if cvs Resource null return Get the selected revision final String revision try Resource Sync Info info cvs Resource get Sync Info if info null handle new CVS Exception Policy bind Show Annotation Action no Sync Info cvs Resource get Name NON NLS 1 return revision cvs Resource get Sync Info get Revision catch CVS Exception e throw new Invocation Target Exception e Run the CVS Annotate action with a progress monitor run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task null 100 fetch Annotation listener cvs Resource revision Policy sub Monitor For monitor 80 try if has Charset cvs Resource listener get Contents listener set Contents get Remote Contents cvs Resource Policy sub Monitor For monitor 20 catch Core Exception e Log and continue using the original fetched contents CVSUI Plugin log e monitor done true PROGRESS DIALOG if listener has Error throw new Invocation Target Exception new CVS Exception Policy bind Show Annotation Action 1 listener get Error NON NLS 1 Open the view I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null try PlatformUI get Workbench show Perspective org eclipse team cvs ui cvs Perspective window NON NLS 1 catch Workbench Exception e1 If this does not work we will just open the view in the curren perspective try Annotate View view Annotate View open In Active Perspective view show Annotations cvs Resource listener get Cvs Annotate Blocks listener get Contents catch Part Init Exception e1 handle e1  ICVSResource cvsResource InvocationTargetException InterruptedException AnnotateListener AnnotateListener cvsResource ResourceSyncInfo cvsResource getSyncInfo CVSException ShowAnnotationAction noSyncInfo cvsResource getName cvsResource getSyncInfo getRevision CVSException InvocationTargetException IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask fetchAnnotation cvsResource subMonitorFor hasCharset cvsResource getContents setContents getRemoteContents cvsResource subMonitorFor CoreException CVSUIPlugin PROGRESS_DIALOG hasError InvocationTargetException CVSException ShowAnnotationAction getError IWorkbenchWindow getWorkbench getActiveWorkbenchWindow getWorkbench showPerspective cvsPerspective WorkbenchException AnnotateView AnnotateView openInActivePerspective showAnnotations cvsResource getCvsAnnotateBlocks getContents PartInitException
protected boolean has Charset ICVS Resource cvs Resource Input Stream contents try return Team Plugin get Charset cvs Resource get Name contents null catch IO Exception e Assume that the contents do have a charset return true  hasCharset ICVSResource cvsResource InputStream TeamPlugin getCharset cvsResource getName IOException
Send the CVS annotate command param listener param cvs Resource param revision param monitor throws Invocation Target Exception private void fetch Annotation final Annotate Listener listener final ICVS Resource cvs Resource final String revision I Progress Monitor monitor throws Invocation Target Exception try monitor Policy monitor For monitor monitor begin Task null 100 ICVS Folder folder cvs Resource get Parent final Folder Sync Info info folder get Folder Sync Info ICVS Repository Location location Known Repositories get Instance get Repository info get Root Session session new Session location folder true output to console session open Policy sub Monitor For monitor 10 false read only try Command Quiet Option quietness CVS Provider Plugin get Plugin get Quietness try CVS Provider Plugin get Plugin set Quietness Command VERBOSE final Command Local Option local Option if revision null local Option Command NO LOCAL OPTIONS else local Option new Command Local Option 1 local Option 0 Annotate make Revision Option revision I Status status Command ANNOTATE execute session Command NO GLOBAL OPTIONS local Option new ICVS Resource cvs Resource listener Policy sub Monitor For monitor 90 if status get Code CVS Status SERVER ERROR throw new CVS Server Exception status finally CVS Provider Plugin get Plugin set Quietness quietness monitor done finally session close catch CVS Exception e throw new Invocation Target Exception e  cvsResource InvocationTargetException fetchAnnotation AnnotateListener ICVSResource cvsResource IProgressMonitor InvocationTargetException monitorFor beginTask ICVSFolder cvsResource getParent FolderSyncInfo getFolderSyncInfo ICVSRepositoryLocation KnownRepositories getInstance getRepository getRoot subMonitorFor QuietOption CVSProviderPlugin getPlugin getQuietness CVSProviderPlugin getPlugin setQuietness LocalOption localOption localOption NO_LOCAL_OPTIONS localOption LocalOption localOption makeRevisionOption IStatus NO_GLOBAL_OPTIONS localOption ICVSResource cvsResource subMonitorFor getCode CVSStatus SERVER_ERROR CVSServerException CVSProviderPlugin getPlugin setQuietness CVSException InvocationTargetException
private Input Stream get Remote Contents ICVS Resource resource I Progress Monitor monitor throws Core Exception ICVS Remote Resource remote CVS Workspace Root get Remote Resource For resource if remote null return new Byte Array Input Stream new byte 0 I Storage storage I Resource Variant remote get Storage monitor if storage null return new Byte Array Input Stream new byte 0 return storage get Contents  InputStream getRemoteContents ICVSResource IProgressMonitor CoreException ICVSRemoteResource CVSWorkspaceRoot getRemoteResourceFor ByteArrayInputStream IStorage IResourceVariant getStorage ByteArrayInputStream getContents
Ony enabled for single resource selection protected boolean is Enabled throws Team Exception ICVS Resource resource get Single SelectedCVS Resource return resource null resource is Folder resource is Managed  isEnabled TeamException ICVSResource getSingleSelectedCVSResource isFolder isManaged
This action is called from one of a Resource Navigator a CVS Resource Navigator or a History Log Viewer Return the selected resource as an ICVS Resource return ICVS Resource protected ICVS Resource get Single SelectedCVS Resource Selected from a CVS Resource Navigator ICVS Resource cvs Resources get SelectedCVS Resources if cvs Resources length 1 return cvs Resources 0 Selected from a History Viewer Object log Entries get Selected Resources Log Entry class if log Entries length 1 Log Entry a Log Entry Log Entry log Entries 0 ICVS Remote File cvs Remote File a Log Entry get Remote File return cvs Remote File Selected from a Resource Navigator I Resource resources get Selected Resources if resources length 1 return CVS Workspace Root getCVS Resource For resources 0 return null  ICVSResource ICVSResource ICVSResource getSingleSelectedCVSResource ICVSResource cvsResources getSelectedCVSResources cvsResources cvsResources logEntries getSelectedResources LogEntry logEntries LogEntry aLogEntry LogEntry logEntries ICVSRemoteFile cvsRemoteFile aLogEntry getRemoteFile cvsRemoteFile IResource getSelectedResources CVSWorkspaceRoot getCVSResourceFor

public class ShowCVS Perspective Action extends Action public void run I Workbench workbench PlatformUI get Workbench I Workbench Window active Window workbench get Active Workbench Window if active Window null return I Workbench Page active Page active Window get Active Page if active Page null return I Perspective Descriptor cvs Perspective workbench get Perspective Registry find Perspective With Id org eclipse team cvs ui cvs Perspective NON NLS 1 if cvs Perspective null active Page set Perspective cvs Perspective  ShowCVSPerspectiveAction IWorkbench getWorkbench IWorkbenchWindow activeWindow getActiveWorkbenchWindow activeWindow IWorkbenchPage activePage activeWindow getActivePage activePage IPerspectiveDescriptor cvsPerspective getPerspectiveRegistry findPerspectiveWithId cvsPerspective cvsPerspective activePage setPerspective cvsPerspective

final Editors Action editors Action new Editors Action run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception execute Provider Action editors Action monitor  EditorsAction editorsAction EditorsAction IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException executeProviderAction editorsAction
protected void execute I Action action throws Invocation Target Exception Interrupted Exception final Editors Action editors Action new Editors Action run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception execute Provider Action editors Action monitor true cancelable PROGRESS DIALOG Editors Info infos editors Action get Editors Info Editors View view Editors View show View Editors View VIEW ID if view null view set Input infos  IAction InvocationTargetException InterruptedException EditorsAction editorsAction EditorsAction IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException executeProviderAction editorsAction PROGRESS_DIALOG EditorsInfo editorsAction getEditorsInfo EditorsView EditorsView showView EditorsView VIEW_ID setInput
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Added Resources protected boolean is Enabled For Added Resources return false  WorkspaceAction isEnabledForAddedResources isEnabledForAddedResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Non Existant Resources protected boolean is Enabled For Non Existant Resources return true  WorkspaceAction isEnabledForNonExistantResources isEnabledForNonExistantResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Multiple Resources protected boolean is Enabled For Multiple Resources We support one selected Resource because the editors command will show the editors of all children too return false  WorkspaceAction isEnabledForMultipleResources isEnabledForMultipleResources

public class Show History Action extends CVS Action Returns the selected remote files protected ICVS Remote File get Selected Remote Files Array List resources null if selection is Empty resources new Array List Iterator elements I Structured Selection selection iterator while elements has Next Object next elements next if next instanceof ICVS Remote File resources add next continue if next instanceof I Adaptable I Adaptable a I Adaptable next Object adapter a get Adapter ICVS Remote File class if adapter instanceof ICVS Remote File resources add adapter continue if resources null resources is Empty ICVS Remote File result new ICVS Remote File resources size resources to Array result return result return new ICVS Remote File 0  ShowHistoryAction CVSAction ICVSRemoteFile getSelectedRemoteFiles ArrayList isEmpty ArrayList IStructuredSelection hasNext ICVSRemoteFile IAdaptable IAdaptable IAdaptable getAdapter ICVSRemoteFile ICVSRemoteFile isEmpty ICVSRemoteFile ICVSRemoteFile toArray ICVSRemoteFile
run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception ICVS Remote File files get Selected Remote Files History View view History View show View History View VIEW ID if view null view show History files 0 true refetch  IRunnableWithProgress IProgressMonitor InvocationTargetException ICVSRemoteFile getSelectedRemoteFiles HistoryView HistoryView showView HistoryView VIEW_ID showHistory
public void execute I Action action throws Interrupted Exception Invocation Target Exception run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception ICVS Remote File files get Selected Remote Files History View view History View show View History View VIEW ID if view null view show History files 0 true refetch false cancelable PROGRESS BUSYCURSOR  IAction InterruptedException InvocationTargetException IRunnableWithProgress IProgressMonitor InvocationTargetException ICVSRemoteFile getSelectedRemoteFiles HistoryView HistoryView showView HistoryView VIEW_ID showHistory PROGRESS_BUSYCURSOR
see Team Action is Enabled protected boolean is Enabled throws Team Exception ICVS Remote File resources get Selected Remote Files return resources length 1  TeamAction isEnabled isEnabled TeamException ICVSRemoteFile getSelectedRemoteFiles
see org eclipse team internal ccvs ui actions CVS Action get Error Title protected String get Error Title return Policy bind Show History Action show History NON NLS 1  CVSAction getErrorTitle getErrorTitle ShowHistoryAction showHistory

run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception I Resource resources get Selected Resources if resources length 1 return History View view History View show View History View VIEW ID if view null view show History resources 0 true fetch  IRunnableWithProgress IProgressMonitor InvocationTargetException IResource getSelectedResources HistoryView HistoryView showView HistoryView VIEW_ID showHistory
public void execute I Action action throws Interrupted Exception Invocation Target Exception run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception I Resource resources get Selected Resources if resources length 1 return History View view History View show View History View VIEW ID if view null view show History resources 0 true fetch false cancelable PROGRESS BUSYCURSOR  IAction InterruptedException InvocationTargetException IRunnableWithProgress IProgressMonitor InvocationTargetException IResource getSelectedResources HistoryView HistoryView showView HistoryView VIEW_ID showHistory PROGRESS_BUSYCURSOR
see org eclipse team internal ccvs ui actions CVS Action get Error Title protected String get Error Title return Policy bind Show History Action show History NON NLS 1  CVSAction getErrorTitle getErrorTitle ShowHistoryAction showHistory
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Multiple Resources protected boolean is Enabled For Multiple Resources return false  WorkspaceAction isEnabledForMultipleResources isEnabledForMultipleResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Added Resources protected boolean is Enabled For Added Resources return false  WorkspaceAction isEnabledForAddedResources isEnabledForAddedResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Non Existant Resources protected boolean is Enabled For Non Existant Resources return true  WorkspaceAction isEnabledForNonExistantResources isEnabledForNonExistantResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled ForCVS Resource org eclipse team internal ccvs core ICVS Resource protected boolean is Enabled ForCVS Resource ICVS Resource cvs Resource throws CVS Exception return cvs Resource is Folder super is Enabled ForCVS Resource cvs Resource  WorkspaceAction isEnabledForCVSResource ICVSResource isEnabledForCVSResource ICVSResource cvsResource CVSException cvsResource isFolder isEnabledForCVSResource cvsResource

public void execute I Action action throws Invocation Target Exception final I Resource resources get Resources To Sync if resources null resources length 0 return if is Single File resources show Single File Comparison get Shell CVS Provider Plugin get Plugin getCVS Workspace Subscriber resources 0 else First check if there is an existing matching participant Workspace Synchronize Participant participant Workspace Synchronize Participant Subscriber Participant get Matching Participant Workspace Synchronize Participant ID resources If there isn t create one and add to the manager if participant null participant new Workspace Synchronize Participant new Resource Scope resources TeamUI get Synchronize Manager add Synchronize Participants new I Synchronize Participant participant participant refresh resources Policy bind Participant synchronizing Policy bind Participant synchronizing Detail participant get Name get Target Part get Site NON NLS 1 NON NLS 2  IAction InvocationTargetException IResource getResourcesToSync isSingleFile showSingleFileComparison getShell CVSProviderPlugin getPlugin getCVSWorkspaceSubscriber WorkspaceSynchronizeParticipant WorkspaceSynchronizeParticipant SubscriberParticipant getMatchingParticipant WorkspaceSynchronizeParticipant WorkspaceSynchronizeParticipant ResourceScope getSynchronizeManager addSynchronizeParticipants ISynchronizeParticipant synchronizingDetail getName getTargetPart getSite
PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try subscriber refresh new I Resource resource I Resource DEPTH ZERO monitor catch Team Exception e throw new Invocation Target Exception e  getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException IResource IResource DEPTH_ZERO TeamException InvocationTargetException
shell get Display sync Exec new Runnable public void run if info get Kind Sync Info IN SYNC Message Dialog open Information shell Policy bind Sync Action no Changes Title Policy bind Sync Action no Changes Message NON NLS 1 NON NLS 2 else Sync Info Compare Input input new Sync Info Compare Input subscriber get Name info CompareUI open Compare Editor input  getDisplay syncExec getKind SyncInfo IN_SYNC MessageDialog openInformation SyncAction noChangesTitle SyncAction noChangesMessage SyncInfoCompareInput SyncInfoCompareInput getName openCompareEditor
Refresh the subscriber directly and show the resulting synchronization state in a compare editor If there is no difference the user is prompted param resources the file to refresh and compare public static void show Single File Comparison final Shell shell final Subscriber subscriber final I Resource resource try PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try subscriber refresh new I Resource resource I Resource DEPTH ZERO monitor catch Team Exception e throw new Invocation Target Exception e final Sync Info info subscriber get Sync Info resource if info null return shell get Display sync Exec new Runnable public void run if info get Kind Sync Info IN SYNC Message Dialog open Information shell Policy bind Sync Action no Changes Title Policy bind Sync Action no Changes Message NON NLS 1 NON NLS 2 else Sync Info Compare Input input new Sync Info Compare Input subscriber get Name info CompareUI open Compare Editor input catch Invocation Target Exception e Utils handle e catch Interrupted Exception e catch Team Exception e Utils handle e  showSingleFileComparison IResource getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException IResource IResource DEPTH_ZERO TeamException InvocationTargetException SyncInfo getSyncInfo getDisplay syncExec getKind SyncInfo IN_SYNC MessageDialog openInformation SyncAction noChangesTitle SyncAction noChangesMessage SyncInfoCompareInput SyncInfoCompareInput getName openCompareEditor InvocationTargetException InterruptedException TeamException
public static boolean is Single File I Resource resources return resources length 1 resources 0 get Type I Resource FILE  isSingleFile IResource getType IResource
protected I Resource get Resources To Sync return get Selected Resources  IResource getResourcesToSync getSelectedResources
Enable for resources that are managed using super or whose parent is a CVS folder see org eclipse team internal ccvs ui actions Workspace Action is Enabled ForCVS Resource org eclipse team internal ccvs core ICVS Resource protected boolean is Enabled ForCVS Resource ICVS Resource cvs Resource throws CVS Exception return super is Enabled ForCVS Resource cvs Resource cvs Resource get Parent isCVS Folder cvs Resource is Ignored  WorkspaceAction isEnabledForCVSResource ICVSResource isEnabledForCVSResource ICVSResource cvsResource CVSException isEnabledForCVSResource cvsResource cvsResource getParent isCVSFolder cvsResource isIgnored

get Shell get Display sync Exec new Runnable public void run result 0 configure Operation if result 0 null return  getShell getDisplay syncExec configureOperation
see CVS Action execute I Action public void execute I Action action throws Invocation Target Exception Interrupted Exception set Was Cancelled false if perform Prompting set Was Cancelled true return Prompt for the tag name final I Tag Operation result new I Tag Operation 1 get Shell get Display sync Exec new Runnable public void run result 0 configure Operation if result 0 null return if result 0 null set Was Cancelled true return result 0 run  CVSAction IAction IAction InvocationTargetException InterruptedException setWasCancelled performPrompting setWasCancelled ITagOperation ITagOperation getShell getDisplay syncExec configureOperation setWasCancelled
protected boolean perform Prompting return true  performPrompting
Prompts the user for a tag name Note This method is designed to be overridden by test cases return the operation or null to cancel protected I Tag Operation configure Operation I Preference Store store CVSUI Plugin get Plugin get Preference Store I Tag Operation operation create Tag Operation Tag As Version Dialog dialog new Tag As Version Dialog get Shell Policy bind Tag Action tag Resources NON NLS 1 operation if dialog open Window OK return null The user has indicated they want to force a move Make sure they really do if dialog should Move Tag store get Boolean ICVSUI Constants PREF CONFIRM MOVE TAG Message Dialog With Toggle confirm Dialog Message Dialog With Toggle open Yes No Question get Shell Policy bind Tag Action move Tag Confirm Title NON NLS 1 Policy bind Tag Action move Tag Confirm Message dialog get Tag Name NON NLS 1 null false null null if confirm Dialog get Return Code I Dialog Constants YES ID store set Value ICVSUI Constants PREF CONFIRM MOVE TAG confirm Dialog get Toggle State else return null The user is a cowboy and wants to do it return dialog get Operation  ITagOperation configureOperation IPreferenceStore CVSUIPlugin getPlugin getPreferenceStore ITagOperation createTagOperation TagAsVersionDialog TagAsVersionDialog getShell TagAction tagResources shouldMoveTag getBoolean ICVSUIConstants PREF_CONFIRM_MOVE_TAG MessageDialogWithToggle confirmDialog MessageDialogWithToggle openYesNoQuestion getShell TagAction moveTagConfirmTitle TagAction moveTagConfirmMessage getTagName confirmDialog getReturnCode IDialogConstants YES_ID setValue ICVSUIConstants PREF_CONFIRM_MOVE_TAG confirmDialog getToggleState getOperation
protected abstract I Tag Operation create Tag Operation  ITagOperation createTagOperation
protected abstract I Tag Operation create Tag Operation protected String get Error Title return Policy bind Tag Action tag Error Title NON NLS 1  ITagOperation createTagOperation getErrorTitle TagAction tagErrorTitle
protected String get Warning Title return Policy bind Tag Action tag Warning Title NON NLS 1  getWarningTitle TagAction tagWarningTitle
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Added Resources protected boolean is Enabled For Added Resources return false  WorkspaceAction isEnabledForAddedResources isEnabledForAddedResources
public boolean was Cancelled return was Cancelled  wasCancelled wasCancelled
public void set Was Cancelled boolean b was Cancelled b  setWasCancelled wasCancelled
manager run new I Runnable With Progress public void run I Progress Monitor monitor try for int i 0 i resources length i ICVS Resource resource resources i Cache the new tag creation even if the tag may have had warnings manager add Tags get Root Parent resource new CVS Tag tag catch CVS Exception e CVSUI Plugin log e  IRunnableWithProgress IProgressMonitor ICVSResource addTags getRootParent CVSTag CVSException CVSUIPlugin
private ICVS Resource get Root Parent ICVS Resource resource throws CVS Exception if resource is Managed return resource ICVS Folder parent resource get Parent if parent null return resource Special check for a parent which is the repository itself if parent get Name length 0 return resource return get Root Parent parent  ICVSResource getRootParent ICVSResource CVSException isManaged ICVSFolder getParent getName getRootParent
public static void broadcast Tag Change final ICVS Resource resources final CVS Tag tag throws Invocation Target Exception Interrupted Exception final Repository Manager manager CVSUI Plugin get Plugin get Repository Manager manager run new I Runnable With Progress public void run I Progress Monitor monitor try for int i 0 i resources length i ICVS Resource resource resources i Cache the new tag creation even if the tag may have had warnings manager add Tags get Root Parent resource new CVS Tag tag catch CVS Exception e CVSUI Plugin log e private ICVS Resource get Root Parent ICVS Resource resource throws CVS Exception if resource is Managed return resource ICVS Folder parent resource get Parent if parent null return resource Special check for a parent which is the repository itself if parent get Name length 0 return resource return get Root Parent parent new Null Progress Monitor  broadcastTagChange ICVSResource CVSTag InvocationTargetException InterruptedException RepositoryManager CVSUIPlugin getPlugin getRepositoryManager IRunnableWithProgress IProgressMonitor ICVSResource addTags getRootParent CVSTag CVSException CVSUIPlugin ICVSResource getRootParent ICVSResource CVSException isManaged ICVSFolder getParent getName getRootParent NullProgressMonitor

see Team Action is Enabled protected boolean is Enabled throws Team Exception ICVS Resource resources get SelectedCVS Resources if resources length 0 return false for int i 0 i resources length i if resources i instanceof ICVS Repository Location return false return true  TeamAction isEnabled isEnabled TeamException ICVSResource getSelectedCVSResources ICVSRepositoryLocation
see CVS Action needs To Save Dirty Editors protected boolean needs To Save Dirty Editors return false  CVSAction needsToSaveDirtyEditors needsToSaveDirtyEditors
see org eclipse team internal ccvs ui actions Workspace Action requires Local Sync Info protected boolean requires Local Sync Info return false  WorkspaceAction requiresLocalSyncInfo requiresLocalSyncInfo
protected I Tag Operation create Tag Operation return new Tag In Repository Operation get Target Part get Selected Remote Resources  ITagOperation createTagOperation TagInRepositoryOperation getTargetPart getSelectedRemoteResources

protected boolean perform Prompting Prompt for any uncommitted changes Prompting Dialog prompt new Prompting Dialog get Shell get Selected Resources get Prompt Condition Policy bind Tag Action uncommitted Changes Title NON NLS 1 try resources prompt prompt For Multiple catch Interrupted Exception e return false if resources length 0 nothing to do return false return true  performPrompting PromptingDialog PromptingDialog getShell getSelectedResources getPromptCondition TagAction uncommittedChangesTitle promptForMultiple InterruptedException
protected I Tag Operation create Tag Operation return new Tag Operation get Target Part resources  ITagOperation createTagOperation TagOperation getTargetPart
protected I Prompt Condition get Prompt Condition return new I Prompt Condition public boolean needs Prompt I Resource resource return CVS Lightweight Decorator is Dirty resource  IPromptCondition getPromptCondition IPromptCondition needsPrompt IResource CVSLightweightDecorator isDirty
return CVS Lightweight Decorator is Dirty resource public String prompt Message I Resource resource return Policy bind Tag Action uncommitted Changes resource get Name NON NLS 1  CVSLightweightDecorator isDirty promptMessage IResource TagAction uncommittedChanges getName
Note This method is designed to be overridden by test cases protected I Prompt Condition get Prompt Condition return new I Prompt Condition public boolean needs Prompt I Resource resource return CVS Lightweight Decorator is Dirty resource public String prompt Message I Resource resource return Policy bind Tag Action uncommitted Changes resource get Name NON NLS 1  IPromptCondition getPromptCondition IPromptCondition needsPrompt IResource CVSLightweightDecorator isDirty promptMessage IResource TagAction uncommittedChanges getName
Return the resources that have been selected by the user The user has been given a chance to remove any resources with outgoing changes so all provided resources are to be tagged return Returns the resources protected I Resource get Resources return resources  IResource getResources

public void execute I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception execute Provider Action new I Provider Action public I Status execute CVS Team Provider provider I Resource resources I Progress Monitor monitor throws CVS Exception provider unedit resources false recurse true notify server monitor return Team OK STATUS  IProgressMonitor InvocationTargetException InterruptedException executeProviderAction IProviderAction IStatus CVSTeamProvider IResource IProgressMonitor CVSException OK_STATUS
run new Workspace Modify Operation null public void execute I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception execute Provider Action new I Provider Action public I Status execute CVS Team Provider provider I Resource resources I Progress Monitor monitor throws CVS Exception provider unedit resources false recurse true notify server monitor return Team OK STATUS monitor  WorkspaceModifyOperation IProgressMonitor InvocationTargetException InterruptedException executeProviderAction IProviderAction IStatus CVSTeamProvider IResource IProgressMonitor CVSException OK_STATUS
see org eclipse team internal ccvs ui actions CVS Action execute org eclipse jface action I Action protected void execute I Action action throws Invocation Target Exception Interrupted Exception if Message Dialog open Confirm get Shell Policy bind Uneditaction confirm Title Policy bind Uneditaction confirm Message NON NLS 1 NON NLS 2 return run new Workspace Modify Operation null public void execute I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception execute Provider Action new I Provider Action public I Status execute CVS Team Provider provider I Resource resources I Progress Monitor monitor throws CVS Exception provider unedit resources false recurse true notify server monitor return Team OK STATUS monitor true cancelable PROGRESS DIALOG  CVSAction IAction IAction InvocationTargetException InterruptedException MessageDialog openConfirm getShell confirmTitle confirmMessage WorkspaceModifyOperation IProgressMonitor InvocationTargetException InterruptedException executeProviderAction IProviderAction IStatus CVSTeamProvider IResource IProgressMonitor CVSException OK_STATUS PROGRESS_DIALOG
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Added Resources protected boolean is Enabled For Added Resources return false  WorkspaceAction isEnabledForAddedResources isEnabledForAddedResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Non Existant Resources protected boolean is Enabled For Non Existant Resources return true  WorkspaceAction isEnabledForNonExistantResources isEnabledForNonExistantResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled ForCVS Resource org eclipse team internal ccvs core ICVS Resource protected boolean is Enabled ForCVS Resource ICVS Resource cvs Resource throws CVS Exception if cvs Resource is Folder return false if super is Enabled ForCVS Resource cvs Resource return ICVS File cvs Resource is Read Only ICVS File cvs Resource is Edited else return false  WorkspaceAction isEnabledForCVSResource ICVSResource isEnabledForCVSResource ICVSResource cvsResource CVSException cvsResource isFolder isEnabledForCVSResource cvsResource ICVSFile cvsResource isReadOnly ICVSFile cvsResource isEdited

Delete Project Dialog Shell parent Shell I Project projects super parent Shell get Title projects null accept the default window icon get Message projects Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL 0 yes is the default  DeleteProjectDialog parentShell IProject parentShell getTitle getMessage MessageDialog IDialogConstants YES_LABEL IDialogConstants NO_LABEL
static String get Title I Project projects if projects length 1 return Policy bind Unmanage title NON NLS 1 else return Policy bind Unmanage titleN NON NLS 1  getTitle IProject
static String get Message I Project projects if projects length 1 I Project project projects 0 return Policy bind Unmanage message project get Name NON NLS 1 else return Policy bind Unmanage messageN new Integer projects length to String NON NLS 1  getMessage IProject IProject getName toString
protected Control create Custom Area Composite parent Composite composite new Composite parent SWT NONE composite set Layout new Grid Layout radio1 new Button composite SWT RADIO radio1 add Selection Listener selection Listener radio1 set Text Policy bind Unmanage option2 NON NLS 1 radio2 new Button composite SWT RADIO radio2 add Selection Listener selection Listener radio2 set Text Policy bind Unmanage option1 NON NLS 1 set initial state radio1 set Selection delete Content radio2 set Selection delete Content Workbench Help set Help composite I Help Context Ids DISCONNECT ACTION return composite  createCustomArea setLayout GridLayout addSelectionListener selectionListener setText addSelectionListener selectionListener setText setSelection deleteContent setSelection deleteContent WorkbenchHelp setHelp IHelpContextIds DISCONNECT_ACTION
private Selection Listener selection Listener new Selection Adapter public void widget Selected Selection Event e Button button Button e widget if button get Selection delete Content button radio1  SelectionListener selectionListener SelectionAdapter widgetSelected SelectionEvent getSelection deleteContent
public boolean get Delete Content return delete Content  getDeleteContent deleteContent
public void execute I Action action throws Interrupted Exception Invocation Target Exception if confirm Delete Projects new Disconnect Operation get Target Part get Selected Projects delete Content run  IAction InterruptedException InvocationTargetException confirmDeleteProjects DisconnectOperation getTargetPart getSelectedProjects deleteContent
final Delete Project Dialog dialog new Delete Project Dialog shell projects shell get Display sync Exec new Runnable public void run result 0 dialog open  DeleteProjectDialog DeleteProjectDialog getDisplay syncExec
boolean confirm Delete Projects final int result new int Message Dialog OK I Project projects get Selected Projects final Delete Project Dialog dialog new Delete Project Dialog shell projects shell get Display sync Exec new Runnable public void run result 0 dialog open delete Content dialog get Delete Content return result 0 0 YES  confirmDeleteProjects MessageDialog IProject getSelectedProjects DeleteProjectDialog DeleteProjectDialog getDisplay syncExec deleteContent getDeleteContent
see org eclipse team internal ccvs ui actions CVS Action get Error Title protected String get Error Title return Policy bind Unmanage unmanaging Error NON NLS 1  CVSAction getErrorTitle getErrorTitle unmanagingError
see org eclipse team internal ccvs ui actions Workspace Action is Enabled ForCVS Resource org eclipse team internal ccvs core ICVS Resource protected boolean is Enabled ForCVS Resource ICVS Resource cvs Resource throws CVS Exception I Resource resource cvs Resource getI Resource return resource null resource get Type I Resource PROJECT  WorkspaceAction isEnabledForCVSResource ICVSResource isEnabledForCVSResource ICVSResource cvsResource CVSException IResource cvsResource getIResource getType IResource

public void execute I Action action throws Interrupted Exception Invocation Target Exception Update Wizard wizard new Update Wizard get Target Part get Selected Resources Wizard Dialog dialog new Wizard Dialog get Shell wizard dialog open  IAction InterruptedException InvocationTargetException UpdateWizard UpdateWizard getTargetPart getSelectedResources WizardDialog WizardDialog getShell
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Added Resources protected boolean is Enabled For Added Resources return false  WorkspaceAction isEnabledForAddedResources isEnabledForAddedResources
see org eclipse team internal ccvs ui actions Workspace Action is Enabled For Non Existant Resources protected boolean is Enabled For Non Existant Resources return true  WorkspaceAction isEnabledForNonExistantResources isEnabledForNonExistantResources

public interface I Provider Action public I Status execute CVS Team Provider provider I Resource resources I Progress Monitor monitor throws CVS Exception  IProviderAction IStatus CVSTeamProvider IResource IProgressMonitor CVSException
see org eclipse team internal ccvs ui actions CVS Action begin Execution I Action protected boolean begin Execution I Action action throws Team Exception if super begin Execution action Ensure that the required sync info is loaded if requires Local Sync Info There is a possibility of the selection containing an orphaned subtree If it does they will be purged and enablement rechecked before the operation is performed handle Orphaned Subtrees Check enablement just in case the sync info wasn t loaded if is Enabled Message Dialog open Information get Shell Policy bind CVS Action disabled Title Policy bind CVS Action disabled Message NON NLS 1 NON NLS 2 return false return true else return false  CVSAction beginExecution IAction beginExecution IAction TeamException beginExecution requiresLocalSyncInfo handleOrphanedSubtrees isEnabled MessageDialog openInformation getShell CVSAction disabledTitle CVSAction disabledMessage
private boolean handle Orphaned Subtrees invoke the inherited method so that overlaps are maintained I Resource resources get Selected Resources for int i 0 i resources length i I Resource resource resources i handle Orphaned Subtree resource return false  handleOrphanedSubtrees IResource getSelectedResources IResource handleOrphanedSubtree
private void handle Orphaned Subtree I Resource resource try if CVS Workspace Root is Shared WithCVS resource return ICVS Folder folder if resource get Type I Resource FILE folder CVS Workspace Root getCVS Folder For resource get Parent else folder CVS Workspace Root getCVS Folder For I Container resource handle Orphaned Subtree folder catch CVS Exception e CVS Provider Plugin log e  handleOrphanedSubtree IResource CVSWorkspaceRoot isSharedWithCVS ICVSFolder getType IResource CVSWorkspaceRoot getCVSFolderFor getParent CVSWorkspaceRoot getCVSFolderFor IContainer handleOrphanedSubtree CVSException CVSProviderPlugin
run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try folder unmanage null catch CVS Exception e CVS Provider Plugin log e  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException CVSException CVSProviderPlugin
private void handle Orphaned Subtree final ICVS Folder folder throws CVS Exception if folder getI Resource get Type I Resource PROJECT return if CVS Workspace Root is Orphaned Subtree I Container folder getI Resource try run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try folder unmanage null catch CVS Exception e CVS Provider Plugin log e true PROGRESS BUSYCURSOR catch Invocation Target Exception e Ignore this since we logged the one we care about above catch Interrupted Exception e throw new Operation Canceled Exception handle Orphaned Subtree folder get Parent  handleOrphanedSubtree ICVSFolder CVSException getIResource getType IResource CVSWorkspaceRoot isOrphanedSubtree IContainer getIResource IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException CVSException CVSProviderPlugin PROGRESS_BUSYCURSOR InvocationTargetException InterruptedException OperationCanceledException handleOrphanedSubtree getParent
Return true if the sync info is loaded for all selected resources The purpose of this method is to allow enablement code to be as fast as possible If the sync info is not loaded the menu should be enabled and if choosen the action will verify that it is indeed enabled before performing the associated operation protected boolean is Sync Info Loaded I Resource resources throws CVS Exception return Eclipse Synchronizer get Instance is Sync Info Loaded resources get Enablement Depth  isSyncInfoLoaded IResource CVSException EclipseSynchronizer getInstance isSyncInfoLoaded getEnablementDepth
Returns the resource depth of the action for use in determining if the required sync info is loaded The default is I Resource DEPTH INFINITE Sunclasses can override as required protected int get Action Depth return I Resource DEPTH INFINITE  IResource DEPTH_INFINITE getActionDepth IResource DEPTH_INFINITE
Returns the resource depth of the action enablement for use in determining if the required sync info is loaded The default is I Resource DEPTH ZERO Sunclasses can override as required protected int get Enablement Depth return I Resource DEPTH ZERO  IResource DEPTH_ZERO getEnablementDepth IResource DEPTH_ZERO
Ensure that the sync info for all the provided resources has been loaded If an out of sync resource is found prompt to refresh all the projects involved protected boolean ensure Sync Info Loaded I Resource resources throws CVS Exception boolean keep Trying true while keep Trying try Eclipse Synchronizer get Instance ensure Sync Info Loaded resources get Action Depth keep Trying false catch CVS Exception e if e get Status get Code I Resource Status OUT OF SYNC LOCAL determine the projects of the resources involved Set projects new Hash Set for int i 0 i resources length i I Resource resource resources i projects add resource get Project prompt to refresh if prompt To Refresh get Shell I Resource projects to Array new I Resource projects size e get Status for Iterator iter projects iterator iter has Next I Project project I Project iter next try project refresh Local I Resource DEPTH INFINITE null catch Core Exception core Exception throw CVS Exception wrap Exception core Exception else return false else throw e return true  ensureSyncInfoLoaded IResource CVSException keepTrying keepTrying EclipseSynchronizer getInstance ensureSyncInfoLoaded getActionDepth keepTrying CVSException getStatus getCode IResourceStatus OUT_OF_SYNC_LOCAL HashSet IResource getProject promptToRefresh getShell IResource toArray IResource getStatus hasNext IProject IProject refreshLocal IResource DEPTH_INFINITE CoreException coreException CVSException wrapException coreException
Override to ensure that the sync info is available before performing the real code is Enabled code test see org eclipse team internal ui actions Team Action set Action Enablement I Action protected void set Action Enablement I Action action try boolean requires requires Local Sync Info if requires requires is Sync Info Loaded get Selected Resources super set Action Enablement action else If the sync info is not loaded enable the menu item Performing the action will ensure that the action should really be enabled before anything else is done action set Enabled true catch CVS Exception e We couldn t determine if the sync info was loaded Enable the action so that performing the action will reveal the error to the user action set Enabled true  isEnabled TeamAction setActionEnablement IAction setActionEnablement IAction requiresLocalSyncInfo isSyncInfoLoaded getSelectedResources setActionEnablement setEnabled CVSException setEnabled
Return true if the action requires the sync info for the selected resources If the sync info is required the real enablement code will only be run if the sync info is loaded from disc Otherwise the action is enabled and performing the action will load the sync info and verify that the action is truely enabled before doing anything else This implementation returns code true code Subclasses must override if they do not require the sync info of the selected resources return boolean protected boolean requires Local Sync Info return true  requiresLocalSyncInfo
protected boolean prompt To Refresh final Shell shell final I Resource resources final I Status status final boolean result new boolean false Runnable runnable new Runnable public void run Shell shell To Use shell if shell null shell To Use new Shell Display get Current String question if resources length 1 question Policy bind CVS Action refresh Question status get Message resources 0 get Full Path to String NON NLS 1 else question Policy bind CVS Action refresh Multiple Question status get Message NON NLS 1 result 0 Message Dialog open Question shell To Use Policy bind CVS Action refresh Title question NON NLS 1 Display get Default sync Exec runnable return result 0  promptToRefresh IResource IStatus shellToUse shellToUse getCurrent CVSAction refreshQuestion getMessage getFullPath toString CVSAction refreshMultipleQuestion getMessage MessageDialog openQuestion shellToUse CVSAction refreshTitle getDefault syncExec
Most CVS workspace actions modify the workspace and thus should save dirty editors see org eclipse team internal ccvs ui actions CVS Action needs To Save Dirty Editors protected boolean needs To Save Dirty Editors return true  CVSAction needsToSaveDirtyEditors needsToSaveDirtyEditors
The action is enabled for the appropriate resources This method checks that ol li there is no overlap between a selected file and folder overlapping folders is allowed because of logical vs physical mapping problem in views li the state of the resources match the conditions provided by ul li is Enabled For Ignored Resources li is Enabled For Managed Resources li is Enabled For Un Managed Resources i e not ignored and not managed ul ol see Team Action is Enabled protected boolean is Enabled throws Team Exception invoke the inherited method so that overlaps are maintained I Resource resources super get Selected Resources disable if no resources are selected if resources length 0 return false disable properly for single resource enablement if is Enabled For Multiple Resources resources length 1 return false validate enabled for each resource in the selection List folder Paths new Array List List file Paths new Array List for int i 0 i resources length i I Resource resource resources i only enable for accessible resources if resource get Type I Resource PROJECT if resource is Accessible return false no CVS actions are enabled if the selection contains a linked resource if CVS Workspace Root is Linked Resource resource return false only enable for resources in a project shared with CVS if Repository Provider get Provider resource get Project CVS Provider Plugin get Type Id null return false collect files and folders separately to check for overlap later I Path resource Full Path resource get Full Path if resource get Type I Resource FILE file Paths add resource Full Path else folder Paths add resource Full Path ensure that resource management state matches what the action requires ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource if is Enabled ForCVS Resource cvs Resource return false Ensure that there is no overlap between files and folders NOTE folder overlap must be allowed because of logical vs physical if folder Paths is Empty for Iterator file Iter file Paths iterator file Iter has Next I Path resource Path I Path file Iter next for Iterator it folder Paths iterator it has Next I Path folder Path I Path it next if folder Path is Prefix Of resource Path return false return true  isEnabledForIgnoredResources isEnabledForManagedResources isEnabledForUnManagedResources TeamAction isEnabled isEnabled TeamException IResource getSelectedResources isEnabledForMultipleResources folderPaths ArrayList filePaths ArrayList IResource getType IResource isAccessible CVSWorkspaceRoot isLinkedResource RepositoryProvider getProvider getProject CVSProviderPlugin getTypeId IPath resourceFullPath getFullPath getType IResource filePaths resourceFullPath folderPaths resourceFullPath ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor isEnabledForCVSResource cvsResource folderPaths isEmpty fileIter filePaths fileIter hasNext IPath resourcePath IPath fileIter folderPaths hasNext IPath folderPath IPath folderPath isPrefixOf resourcePath
Method is Enabled ForCVS Resource param cvs Resource return boolean protected boolean is Enabled ForCVS Resource ICVS Resource cvs Resource throws CVS Exception boolean managed false boolean ignored false boolean added false if cvs Resource is Ignored ignored true else if cvs Resource is Folder managed ICVS Folder cvs Resource isCVS Folder else Resource Sync Info info cvs Resource get Sync Info managed info null if managed added info is Added if managed is Enabled For Managed Resources return false if managed is Enabled For Unmanaged Resources return false if ignored is Enabled For Ignored Resources return false if added is Enabled For Added Resources return false if cvs Resource exists is Enabled For Non Existant Resources return false return true  isEnabledForCVSResource cvsResource isEnabledForCVSResource ICVSResource cvsResource CVSException cvsResource isIgnored cvsResource isFolder ICVSFolder cvsResource isCVSFolder ResourceSyncInfo cvsResource getSyncInfo isAdded isEnabledForManagedResources isEnabledForUnmanagedResources isEnabledForIgnoredResources isEnabledForAddedResources cvsResource isEnabledForNonExistantResources
Method is Enabled For Ignored Resources return boolean protected boolean is Enabled For Ignored Resources return false  isEnabledForIgnoredResources isEnabledForIgnoredResources
Method is Enabled For Unmanaged Resources return boolean protected boolean is Enabled For Unmanaged Resources return false  isEnabledForUnmanagedResources isEnabledForUnmanagedResources
Method is Enabled For Managed Resources return boolean protected boolean is Enabled For Managed Resources return true  isEnabledForManagedResources isEnabledForManagedResources
Method is Enabled For Added Resources return boolean protected boolean is Enabled For Added Resources return true  isEnabledForAddedResources isEnabledForAddedResources
Method is Enabled For Added Resources return boolean protected boolean is Enabled For Multiple Resources return true  isEnabledForAddedResources isEnabledForMultipleResources
Method is Enabled For Non Existant Resources return boolean protected boolean is Enabled For Non Existant Resources return false  isEnabledForNonExistantResources isEnabledForNonExistantResources
Collections sort sorted new Comparator public int compare Object arg0 Object arg1 I Resource resource0 I Resource arg0 I Resource resource1 I Resource arg1 return resource0 get Full Path segment Count resource1 get Full Path segment Count  IResource IResource IResource IResource getFullPath segmentCount getFullPath segmentCount
return resource0 get Full Path segment Count resource1 get Full Path segment Count public boolean equals Object arg0 return false  getFullPath segmentCount getFullPath segmentCount
Method get Non Overlapping ensures that a resource is not covered more than once param resources return I Resource public static I Resource get Non Overlapping I Resource resources Sort the resources so the shortest paths are first List sorted new Array List sorted add All Arrays as List resources Collections sort sorted new Comparator public int compare Object arg0 Object arg1 I Resource resource0 I Resource arg0 I Resource resource1 I Resource arg1 return resource0 get Full Path segment Count resource1 get Full Path segment Count public boolean equals Object arg0 return false Collect all non overlapping resources List covered Paths new Array List for Iterator iter sorted iterator iter has Next I Resource resource I Resource iter next I Path resource Full Path resource get Full Path boolean covered false for Iterator it covered Paths iterator it has Next I Path path I Path it next if path is Prefix Of resource Full Path covered true if covered if the resource is covered by a parent remove it iter remove else if the resource is a non covered folder add it to the covered paths if resource get Type I Resource FOLDER covered Paths add resource get Full Path return I Resource sorted to Array new I Resource sorted size  getNonOverlapping IResource IResource getNonOverlapping IResource ArrayList addAll asList IResource IResource IResource IResource getFullPath segmentCount getFullPath segmentCount coveredPaths ArrayList hasNext IResource IResource IPath resourceFullPath getFullPath coveredPaths hasNext IPath IPath isPrefixOf resourceFullPath getType IResource coveredPaths getFullPath IResource toArray IResource
Override to ensure that the selected resources so not overlap This method assumes that all actions are deep see org eclipse team internal ui actions Team Action get Selected Resources protected I Resource get Selected Resources return get Non Overlapping super get Selected Resources  TeamAction getSelectedResources IResource getSelectedResources getNonOverlapping getSelectedResources
protected void execute Provider Action I Provider Action action I Resource resources I Progress Monitor monitor throws Invocation Target Exception Hashtable table get Provider Mapping resources Set key Set table key Set monitor begin Task null key Set size 1000 Iterator iterator key Set iterator while iterator has Next I Progress Monitor sub Monitor new Sub Progress Monitor monitor 1000 CVS Team Provider provider CVS Team Provider iterator next List list List table get provider I Resource provider Resources I Resource list to Array new I Resource list size try add Status action execute provider provider Resources sub Monitor catch CVS Exception e throw new Invocation Target Exception e  executeProviderAction IProviderAction IResource IProgressMonitor InvocationTargetException getProviderMapping keySet keySet beginTask keySet keySet hasNext IProgressMonitor subMonitor SubProgressMonitor CVSTeamProvider CVSTeamProvider IResource providerResources IResource toArray IResource addStatus providerResources subMonitor CVSException InvocationTargetException
protected void execute Provider Action I Provider Action action I Progress Monitor monitor throws Invocation Target Exception execute Provider Action action get Selected Resources monitor  executeProviderAction IProviderAction IProgressMonitor InvocationTargetException executeProviderAction getSelectedResources
Given the current selection this method returns a text label that can be shown to the user that reflects the tags in the current selection These can be used in the b Compare With b and b Replace With b actions protected String calculate Action Tag Value try I Resource resources get Selected Resources CVS Tag common Tag null boolean same Tag Type true boolean multiple Same Names true for int i 0 i resources length i ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resources i CVS Tag tag null if cvs Resource is Folder Folder Sync Info info ICVS Folder cvs Resource get Folder Sync Info if info null tag info get Tag if tag null tag get Type CVS Tag BRANCH tag Util get Accurate Folder Tag resources i tag else tag Util get Accurate File Tag cvs Resource if tag null tag new CVS Tag if common Tag null common Tag tag else if common Tag equals tag if common Tag get Type tag get Type same Tag Type false if common Tag get Name equals tag get Name multiple Same Names false set text to default String action Text Policy bind Replace With Latest Action multiple Tags NON NLS 1 if common Tag null int tag Type common Tag get Type String tag Name common Tag get Name multiple tag names but of the same type if same Tag Type multiple Same Names if tag Type CVS Tag BRANCH action Text Policy bind Replace With Latest Action multiple Branches NON NLS 1 else action Text Policy bind Replace With Latest Action multiple Versions NON NLS 1 same tag names and types else if same Tag Type multiple Same Names if tag Type CVS Tag BRANCH action Text Policy bind Replace With Latest Action single Branch tag Name NON NLS 1 else if tag Type CVS Tag VERSION action Text Policy bind Replace With Latest Action single Version tag Name NON NLS 1 else if tag Type CVS Tag HEAD action Text Policy bind Replace With Latest Action singleHEAD tag Name NON NLS 1 return action Text catch CVS Exception e silently ignore return Policy bind Replace With Latest Action multiple Tags NON NLS 1  calculateActionTagValue IResource getSelectedResources CVSTag commonTag sameTagType multipleSameNames ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor CVSTag cvsResource isFolder FolderSyncInfo ICVSFolder cvsResource getFolderSyncInfo getTag getType CVSTag getAccurateFolderTag getAccurateFileTag cvsResource CVSTag commonTag commonTag commonTag commonTag getType getType sameTagType commonTag getName getName multipleSameNames actionText ReplaceWithLatestAction multipleTags commonTag tagType commonTag getType tagName commonTag getName sameTagType multipleSameNames tagType CVSTag actionText ReplaceWithLatestAction multipleBranches actionText ReplaceWithLatestAction multipleVersions sameTagType multipleSameNames tagType CVSTag actionText ReplaceWithLatestAction singleBranch tagName tagType CVSTag actionText ReplaceWithLatestAction singleVersion tagName tagType CVSTag actionText ReplaceWithLatestAction tagName actionText CVSException ReplaceWithLatestAction multipleTags
protected I Resource check Overwrite Of Dirty Resources I Resource resources I Progress Monitor monitor throws CVS Exception Interrupted Exception List dirty Resources new Array List I Resource selected Resources get Selected Resources try monitor Policy monitor For monitor monitor begin Task null selected Resources length 100 monitor set Task Name Policy bind Replace With Action calculating Dirty Resources NON NLS 1 for int i 0 i selected Resources length i I Resource resource selected Resources i ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource if cvs Resource is Modified Policy sub Monitor For monitor 100 dirty Resources add resource finally monitor done Prompting Dialog dialog new Prompting Dialog get Shell selected Resources get Prompt Condition I Resource dirty Resources to Array new I Resource dirty Resources size Policy bind Replace With Action confirm Overwrite NON NLS 1 return dialog prompt For Multiple  IResource checkOverwriteOfDirtyResources IResource IProgressMonitor CVSException InterruptedException dirtyResources ArrayList IResource selectedResources getSelectedResources monitorFor beginTask selectedResources setTaskName ReplaceWithAction calculatingDirtyResources selectedResources IResource selectedResources ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor cvsResource isModified subMonitorFor dirtyResources PromptingDialog PromptingDialog getShell selectedResources getPromptCondition IResource dirtyResources toArray IResource dirtyResources ReplaceWithAction confirmOverwrite promptForMultiple
This is a helper for the CVS UI automated tests It allows the tests to ignore prompting dialogs param resources protected I Prompt Condition get Prompt Condition I Resource resources return get Overwrite Local Changes Prompt resources  IPromptCondition getPromptCondition IResource getOverwriteLocalChangesPrompt

Constructor for Adaptable Hierarchical Resource List param resources public Adaptable Hierarchical Resource List I Container root I Resource resources super resources this root root  AdaptableHierarchicalResourceList AdaptableHierarchicalResourceList IContainer IResource
see org eclipse ui model I Workbench Adapter get Children java lang Object public Object get Children Object o return get Childen For root  IWorkbenchAdapter getChildren getChildren getChildenFor
private I Resource get Childen For I Container parent Set children new Hash Set I Path parent Path parent get Full Path for int i 0 i resources length i I Resource resource resources i I Path resource Path resource get Full Path if parent instanceof I Workspace Root children add I Workspace Root parent get Project resource Path segment 0 else if parent Path is Prefix Of resource Path I Path parent Relative Path resource Path remove First Segments parent Path segment Count if parent Relative Path segment Count 1 children add resource else if parent Relative Path segment Count 1 children add parent get Folder new Path parent Relative Path segment 0 return I Resource children to Array new I Resource children size  IResource getChildenFor IContainer HashSet IPath parentPath getFullPath IResource IPath resourcePath getFullPath IWorkspaceRoot IWorkspaceRoot getProject resourcePath parentPath isPrefixOf resourcePath IPath parentRelativePath resourcePath removeFirstSegments parentPath segmentCount parentRelativePath segmentCount parentRelativePath segmentCount getFolder parentRelativePath IResource toArray IResource
return new Workbench Content Provider public Object get Children Object o if o instanceof I Container return get Childen For I Container o else return super get Children o  WorkbenchContentProvider getChildren IContainer getChildenFor IContainer getChildren
Returns a content provider for code I Resource code s that returns only children of the given resource type public I Tree Content Provider get Tree Content Provider return new Workbench Content Provider public Object get Children Object o if o instanceof I Container return get Childen For I Container o else return super get Children o  IResource ITreeContentProvider getTreeContentProvider WorkbenchContentProvider getChildren IContainer getChildenFor IContainer getChildren
public void set Resources I Resource resources this resources resources  setResources IResource
Returns the root return I Container public I Container get Root return root  IContainer IContainer getRoot
Sets the root param root The root to set public void set Root I Container root this root root  setRoot IContainer

I Resource resources public Adaptable Resource List I Resource resources this resources resources  IResource AdaptableResourceList IResource
see org eclipse core runtime I Adaptable get Adapter Class public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  IAdaptable getAdapter getAdapter IWorkbenchAdapter
see org eclipse ui model I Workbench Adapter get Children Object public Object get Children Object o return resources  IWorkbenchAdapter getChildren getChildren
see org eclipse ui model I Workbench Adapter get Image Descriptor java lang Object public Image Descriptor get Image Descriptor Object object return null  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor
see org eclipse ui model I Workbench Adapter get Label java lang Object public String get Label Object o return o null o to String NON NLS 1  IWorkbenchAdapter getLabel getLabel toString
see org eclipse ui model I Workbench Adapter get Parent java lang Object public Object get Parent Object o return null  IWorkbenchAdapter getParent getParent

private Checkbox Table Viewer list Viewer Constructor for Add To Version Control Dialog param parent Shell public Add To Version Control Dialog Shell parent Shell I Resource unadded Resources super parent Shell Policy bind Add To Version Control Dialog title NON NLS 1 this unadded Resources unadded Resources  CheckboxTableViewer listViewer AddToVersionControlDialog parentShell AddToVersionControlDialog parentShell IResource unaddedResources parentShell AddToVersionControlDialog unaddedResources unaddedResources
see org eclipse jface dialogs Dialog create Dialog Area org eclipse swt widgets Composite protected void create Main Dialog Area Composite parent Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL BOTH set F1 help Workbench Help set Help composite I Help Context Ids ADD TO VERSION CONTROL DIALOG add a description label if unadded Resources length 1 create Wrapping Label composite Policy bind Add To Version Control Dialog there Is An Unadded Resource new Integer unadded Resources length to String NON NLS 1 else create Wrapping Label composite Policy bind Add To Version Control Dialog there Are Unadded Resources new Integer unadded Resources length to String NON NLS 1  createDialogArea createMainDialogArea setLayout GridLayout setLayoutData GridData GridData FILL_BOTH WorkbenchHelp setHelp IHelpContextIds ADD_TO_VERSION_CONTROL_DIALOG unaddedResources createWrappingLabel AddToVersionControlDialog thereIsAnUnaddedResource unaddedResources toString createWrappingLabel AddToVersionControlDialog thereAreUnaddedResources unaddedResources toString
see org eclipse team internal ui Details Dialog create Drop Down Dialog Area org eclipse swt widgets Composite protected Composite create Drop Down Dialog Area Composite parent create a composite with standard margins and spacing Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH add Unadded Resources Area composite set F1 help Workbench Help set Help composite I Help Context Ids ADD TO VERSION CONTROL DIALOG return composite  DetailsDialog createDropDownDialogArea createDropDownDialogArea GridLayout GridLayout marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING setLayout setLayoutData GridData GridData FILL_BOTH addUnaddedResourcesArea WorkbenchHelp setHelp IHelpContextIds ADD_TO_VERSION_CONTROL_DIALOG
list Viewer set Label Provider new Workbench Label Provider protected String decorate Text String input Object element if element instanceof I Resource return I Resource element get Full Path to String else return input  listViewer setLabelProvider WorkbenchLabelProvider decorateText IResource IResource getFullPath toString
list Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event resources To Add list Viewer get Checked Elements  listViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent resourcesToAdd listViewer getCheckedElements
private void add Unadded Resources Area Composite composite add a description label create Wrapping Label composite Policy bind Release Comment Dialog unadded Resources NON NLS 1 add the selectable checkbox list list Viewer Checkbox Table Viewer new Check List composite SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data height Hint SELECTION HEIGHT HINT data width Hint WIDTH HINT list Viewer get Table set Layout Data data set the contents of the list list Viewer set Label Provider new Workbench Label Provider protected String decorate Text String input Object element if element instanceof I Resource return I Resource element get Full Path to String else return input list Viewer set Content Provider new Workbench Content Provider list Viewer set Input new Adaptable Resource List unadded Resources if resources To Add null list Viewer set All Checked true else list Viewer set Checked Elements resources To Add list Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event resources To Add list Viewer get Checked Elements add Selection Buttons composite  addUnaddedResourcesArea createWrappingLabel ReleaseCommentDialog unaddedResources listViewer CheckboxTableViewer newCheckList GridData GridData GridData FILL_BOTH heightHint SELECTION_HEIGHT_HINT widthHint WIDTH_HINT listViewer getTable setLayoutData listViewer setLabelProvider WorkbenchLabelProvider decorateText IResource IResource getFullPath toString listViewer setContentProvider WorkbenchContentProvider listViewer setInput AdaptableResourceList unaddedResources resourcesToAdd listViewer setAllChecked listViewer setCheckedElements resourcesToAdd listViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent resourcesToAdd listViewer getCheckedElements addSelectionButtons
Button select Button create Button button Composite I Dialog Constants SELECT ALL ID Policy bind Release Comment Dialog select All false NON NLS 1 Selection Listener listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked true resources To Add null  selectButton createButton buttonComposite IDialogConstants SELECT_ALL_ID ReleaseCommentDialog selectAll SelectionListener SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked resourcesToAdd
listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked false resources To Add new Object 0  SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked resourcesToAdd
Add the selection and deselection buttons to the dialog param composite org eclipse swt widgets Composite private void add Selection Buttons Composite composite Composite button Composite new Composite composite SWT RIGHT Grid Layout layout new Grid Layout layout num Columns 2 button Composite set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data GRAB HORIZONTAL data grab Excess Horizontal Space true composite set Data data Button select Button create Button button Composite I Dialog Constants SELECT ALL ID Policy bind Release Comment Dialog select All false NON NLS 1 Selection Listener listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked true resources To Add null select Button add Selection Listener listener Button deselect Button create Button button Composite I Dialog Constants DESELECT ALL ID Policy bind Release Comment Dialog deselect All false NON NLS 1 listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked false resources To Add new Object 0 deselect Button add Selection Listener listener  addSelectionButtons buttonComposite GridLayout GridLayout numColumns buttonComposite setLayout GridData GridData GridData HORIZONTAL_ALIGN_END GridData GRAB_HORIZONTAL grabExcessHorizontalSpace setData selectButton createButton buttonComposite IDialogConstants SELECT_ALL_ID ReleaseCommentDialog selectAll SelectionListener SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked resourcesToAdd selectButton addSelectionListener deselectButton createButton buttonComposite IDialogConstants DESELECT_ALL_ID ReleaseCommentDialog deselectAll SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked resourcesToAdd deselectButton addSelectionListener
see org eclipse team internal ui Details Dialog update Enablements protected void update Enablements  DetailsDialog updateEnablements updateEnablements
Returns the resources To Add return I Resource public I Resource get Resources To Add if resources To Add null return unadded Resources else List result Arrays as List resources To Add return I Resource result to Array new I Resource result size  resourcesToAdd IResource IResource getResourcesToAdd resourcesToAdd unaddedResources asList resourcesToAdd IResource toArray IResource
protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants YES ID I Dialog Constants YES LABEL true create Button parent I Dialog Constants NO ID I Dialog Constants NO LABEL true super create Buttons For Button Bar parent  createButtonsForButtonBar createButton IDialogConstants YES_ID IDialogConstants YES_LABEL createButton IDialogConstants NO_ID IDialogConstants NO_LABEL createButtonsForButtonBar
see org eclipse team internal ui Details Dialog include Ok Button protected boolean include Ok Button return false  DetailsDialog includeOkButton includeOkButton
protected void button Pressed int id hijack yes and no buttons to set the correct return codes if id I Dialog Constants YES ID id I Dialog Constants NO ID set Return Code id close else super button Pressed id  buttonPressed IDialogConstants YES_ID IDialogConstants NO_ID setReturnCode buttonPressed

public Alternate User Validation Dialog Shell parent Shell String user super parent Shell this user user initialize Images  AlternateUserValidationDialog parentShell parentShell initializeImages
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text Policy bind Alternate User Validation Dialog Enter Password 2 NON NLS 1  configureShell newShell configureShell newShell newShell setText AlternateUserValidationDialog Enter_Password_2
password Text add Verify Listener new Verify Listener public void verify Text Verify Event e if in Update return e doit false in Update true switch int e character case 8 backspace pressed if password length 0 password password substring 0 password length 1 get rid of bogus Xs int numX Integer num Xs get num Xs size 1 int Value num Xs remove num Xs size 1 String old Text password Text get Text String new Text old Text substring 0 old Text length numX password Text set Text new Text password Text set Selection new Text length break default String old Text password Text get Text String x get Xs num Xs add num Xs size new Integer x length String new Text old Text x password Text set Text new Text password Text set Selection new Text length password e character in Update false update Images  passwordText addVerifyListener VerifyListener verifyText VerifyEvent inUpdate inUpdate numXs numXs intValue numXs numXs oldText passwordText getText newText oldText oldText passwordText setText newText passwordText setSelection newText oldText passwordText getText getXs numXs numXs newText oldText passwordText setText newText passwordText setSelection newText inUpdate updateImages
b set Layout Data data b add Listener SWT Selection new Listener public void handle Event Event event ok Pressed  setLayoutData addListener handleEvent okPressed
b set Layout Data data b add Listener SWT Selection new Listener public void handle Event Event event cancel Pressed  setLayoutData addListener handleEvent cancelPressed
protected Control create Contents Composite parent Composite main new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 main set Layout layout main set Layout Data new Grid Data Grid Data FILL BOTH Composite icon Composite new Composite main SWT NONE layout new Grid Layout layout num Columns 2 icon Composite set Layout layout icon Composite set Layout Data new Grid Data icon1 create Label icon Composite icon2 create Label icon Composite icon3 create Label icon Composite icon4 create Label icon Composite Composite middle Composite new Composite main SWT NONE middle Composite set Layout new Grid Layout middle Composite set Layout Data new Grid Data Label l new Label middle Composite SWT NULL l set Text Policy bind Alternate User Validation Dialog message user NON NLS 1 l set Layout Data new Grid Data l new Label middle Composite SWT NULL l set Text NON NLS 1 l set Layout Data new Grid Data password Text new Text middle Composite SWT SINGLE SWT BORDER Grid Data data new Grid Data data width Hint 250 password Text set Layout Data data password Text add Verify Listener new Verify Listener public void verify Text Verify Event e if in Update return e doit false in Update true switch int e character case 8 backspace pressed if password length 0 password password substring 0 password length 1 get rid of bogus Xs int numX Integer num Xs get num Xs size 1 int Value num Xs remove num Xs size 1 String old Text password Text get Text String new Text old Text substring 0 old Text length numX password Text set Text new Text password Text set Selection new Text length break default String old Text password Text get Text String x get Xs num Xs add num Xs size new Integer x length String new Text old Text x password Text set Text new Text password Text set Selection new Text length password e character in Update false update Images password Text add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e switch e detail case SWT TRAVERSE ARROW NEXT case SWT TRAVERSE ARROW PREVIOUS e detail SWT TRAVERSE NONE e doit false break Composite button Composite new Composite main SWT NONE button Composite set Layout new Grid Layout button Composite set Layout Data new Grid Data Button b new Button button Composite SWT PUSH b set Text Policy bind Alternate User Validation Dialog OK 6 NON NLS 1 data new Grid Data data width Hint 70 b set Layout Data data b add Listener SWT Selection new Listener public void handle Event Event event ok Pressed button Composite get Shell set Default Button b b new Button button Composite SWT PUSH b set Text Policy bind Alternate User Validation Dialog Cancel 7 NON NLS 1 data new Grid Data data width Hint 70 b set Layout Data data b add Listener SWT Selection new Listener public void handle Event Event event cancel Pressed Dialog apply Dialog Font parent return main  createContents GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_BOTH iconComposite GridLayout numColumns iconComposite setLayout iconComposite setLayoutData GridData createLabel iconComposite createLabel iconComposite createLabel iconComposite createLabel iconComposite middleComposite middleComposite setLayout GridLayout middleComposite setLayoutData GridData middleComposite setText AlternateUserValidationDialog setLayoutData GridData middleComposite setText setLayoutData GridData passwordText middleComposite GridData GridData widthHint passwordText setLayoutData passwordText addVerifyListener VerifyListener verifyText VerifyEvent inUpdate inUpdate numXs numXs intValue numXs numXs oldText passwordText getText newText oldText oldText passwordText setText newText passwordText setSelection newText oldText passwordText getText getXs numXs numXs newText oldText passwordText setText newText passwordText setSelection newText inUpdate updateImages passwordText addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ARROW_NEXT TRAVERSE_ARROW_PREVIOUS TRAVERSE_NONE buttonComposite buttonComposite setLayout GridLayout buttonComposite setLayoutData GridData buttonComposite setText AlternateUserValidationDialog OK_6 GridData widthHint setLayoutData addListener handleEvent okPressed buttonComposite getShell setDefaultButton buttonComposite setText AlternateUserValidationDialog Cancel_7 GridData widthHint setLayoutData addListener handleEvent cancelPressed applyDialogFont
public boolean close boolean result super close if images null for int i 0 i images length i images i dispose images i null images null return result 
return result public String get Password return password  getPassword
Label create Label Composite parent Label result new Label parent SWT NULL Grid Data data new Grid Data data width Hint 22 data height Hint 22 result set Layout Data data result set Image get Image return result  createLabel GridData GridData widthHint heightHint setLayoutData setImage getImage
Image get Image double random Math random random 7 Random number between 0 0 and 7 0 long num Math round random return images int num  getImage
void initialize Images images new Image 8 for int i 0 i images length i images i CVSUI Plugin get Plugin get Image Descriptor glyphs glyph i 1 gif create Image NON NLS 1 NON NLS 2 Font Data fd new Font Data fd set Style SWT BOLD fd set Height 10 On Windows set the font to Sans Serif for an authentic look if System get Property os name index Of Windows 1 NON NLS 1 NON NLS 2 fd set Name Microsoft Sans Serif NON NLS 1  initializeImages CVSUIPlugin getPlugin getImageDescriptor createImage FontData FontData setStyle setHeight getProperty indexOf setName
void update Images icon1 set Image get Image icon2 set Image get Image icon3 set Image get Image icon4 set Image get Image  updateImages setImage getImage setImage getImage setImage getImage setImage getImage
icon4 set Image get Image public void set Username String user this user user  setImage getImage setUsername
String get Xs double random Math random random 2 random 2 long num Math round random Random number between 2 and 4 switch int num case 2 return XX NON NLS 1 case 3 return XXX NON NLS 1 case 4 return XXXX NON NLS 1 return X NON NLS 1  getXs
return X NON NLS 1 protected void cancel Pressed password null super cancel Pressed  cancelPressed cancelPressed

private I Part Listener part Listener new I Part Listener public void part Activated I Workbench Part part  IPartListener partListener IPartListener partActivated IWorkbenchPart
public void part Activated I Workbench Part part public void part Brought To Top I Workbench Part part  partActivated IWorkbenchPart partBroughtToTop IWorkbenchPart
public void part Closed I Workbench Part part if editor null part editor disconnect  partClosed IWorkbenchPart
public void part Deactivated I Workbench Part part  partDeactivated IWorkbenchPart
public void part Deactivated I Workbench Part part public void part Opened I Workbench Part part  partDeactivated IWorkbenchPart partOpened IWorkbenchPart
public Annotate View super  AnnotateView
public void create Part Control Composite parent this top parent Create default contents Label label new Label top SWT WRAP label set Text Policy bind CVS Annotate View view Instructions NON NLS 1 label set Layout Data new Grid Data Grid Data FILL BOTH top layout  createPartControl setText CVSAnnotateView viewInstructions setLayoutData GridData GridData FILL_BOTH
Show the annotation view param cvs Resource param cvs Annotate Blocks param contents throws Invocation Target Exception public void show Annotations ICVS Resource cvs Resource Collection cvs Annotate Blocks Input Stream contents throws Invocation Target Exception show Annotations cvs Resource cvs Annotate Blocks contents true  cvsResource cvsAnnotateBlocks InvocationTargetException showAnnotations ICVSResource cvsResource cvsAnnotateBlocks InputStream InvocationTargetException showAnnotations cvsResource cvsAnnotateBlocks
Show the annotation view param cvs Resource param cvs Annotate Blocks param contents param use History View throws Invocation Target Exception public void show Annotations ICVS Resource cvs Resource Collection cvs Annotate Blocks Input Stream contents boolean use History View throws Invocation Target Exception Disconnect from old annotation editor disconnect Remove old viewer Control old Children top get Children if old Children null for int i 0 i old Children length i old Children i dispose viewer new List Viewer top SWT SINGLE SWT H SCROLL SWT V SCROLL viewer set Content Provider new Array Content Provider viewer set Label Provider new Label Provider viewer add Selection Changed Listener this viewer get Control set Layout Data new Grid Data Grid Data FILL BOTH Workbench Help set Help viewer get Control I Help Context Ids ANNOTATE VIEW top layout this cvs Resource cvs Resource this contents contents this cvs Annotate Blocks cvs Annotate Blocks page CVSUI Plugin get Active Page viewer set Input cvs Annotate Blocks editor I Text Editor open Editor I Document Provider provider editor get Document Provider document provider get Document editor get Editor Input set Part Name Policy bind CVS Annotate View show File Annotation new Object cvs Resource get Name NON NLS 1 try I Resource local Resource cvs Resource getI Resource if local Resource null set Title Tool Tip local Resource get Full Path to String else set Title Tool Tip cvs Resource get Name catch CVS Exception e set Title Tool Tip cvs Resource get Name if use History View return Get hook to the History View try history View History View page show View History View VIEW ID history View show History ICVS Remote File CVS Workspace Root get Remote Resource For cvs Resource false don t refetch catch Part Init Exception e throw new Invocation Target Exception e catch CVS Exception e throw new Invocation Target Exception e  cvsResource cvsAnnotateBlocks useHistoryView InvocationTargetException showAnnotations ICVSResource cvsResource cvsAnnotateBlocks InputStream useHistoryView InvocationTargetException oldChildren getChildren oldChildren oldChildren oldChildren ListViewer H_SCROLL V_SCROLL setContentProvider ArrayContentProvider setLabelProvider LabelProvider addSelectionChangedListener getControl setLayoutData GridData GridData FILL_BOTH WorkbenchHelp setHelp getControl IHelpContextIds ANNOTATE_VIEW cvsResource cvsResource cvsAnnotateBlocks cvsAnnotateBlocks CVSUIPlugin getActivePage setInput cvsAnnotateBlocks ITextEditor openEditor IDocumentProvider getDocumentProvider getDocument getEditorInput setPartName CVSAnnotateView showFileAnnotation cvsResource getName IResource localResource cvsResource getIResource localResource setTitleToolTip localResource getFullPath toString setTitleToolTip cvsResource getName CVSException setTitleToolTip cvsResource getName useHistoryView HistoryView historyView HistoryView showView HistoryView VIEW_ID historyView showHistory ICVSRemoteFile CVSWorkspaceRoot getRemoteResourceFor cvsResource PartInitException InvocationTargetException CVSException InvocationTargetException
protected void disconnect if editor null if editor get Selection Provider instanceof I Post Selection Provider I Post Selection Provider editor get Selection Provider remove Post Selection Changed Listener this editor get Site get Page remove Part Listener part Listener editor null document null  getSelectionProvider IPostSelectionProvider IPostSelectionProvider getSelectionProvider removePostSelectionChangedListener getSite getPage removePartListener partListener
Makes the view visible in the active perspective If there isn t a view registered code null code is returned Otherwise the opened view part is returned public static Annotate View open In Active Perspective throws Part Init Exception return Annotate View CVSUI Plugin get Active Page show View VIEW ID  AnnotateView openInActivePerspective PartInitException AnnotateView CVSUIPlugin getActivePage showView VIEW_ID
Selection changed in either the Annotate List View or the Source editor public void selection Changed Selection Changed Event event if event get Selection instanceof I Structured Selection list Selection Changed I Structured Selection event get Selection else if event get Selection instanceof I Text Selection text Selection Changed I Text Selection event get Selection  selectionChanged SelectionChangedEvent getSelection IStructuredSelection listSelectionChanged IStructuredSelection getSelection getSelection ITextSelection textSelectionChanged ITextSelection getSelection
see org eclipse ui I Workbench Part dispose public void dispose disconnect  IWorkbenchPart
A selection event in the Annotate Source Editor param event private void text Selection Changed I Text Selection selection Track where the last selection event came from to avoid a selection event loop last Selection Was Text true Locate the annotate block containing the selected line number CVS Annotate Block match null for Iterator iterator cvs Annotate Blocks iterator iterator has Next CVS Annotate Block block CVS Annotate Block iterator next if block contains selection get Start Line match block break Select the annotate block in the List View if match null return Structured Selection list Selection new Structured Selection match viewer set Selection list Selection true  textSelectionChanged ITextSelection lastSelectionWasText CVSAnnotateBlock cvsAnnotateBlocks hasNext CVSAnnotateBlock CVSAnnotateBlock getStartLine StructuredSelection listSelection StructuredSelection setSelection listSelection
A selection event in the Annotate List View param selection private void list Selection Changed I Structured Selection selection If the editor was closed reopen it if editor null editor get Selection Provider null try contents reset show Annotations cvs Resource cvs Annotate Blocks contents false catch Invocation Target Exception e return catch IO Exception e return I Selection Provider selection Provider editor get Selection Provider if selection Provider null Failed to open the editor but what else can we do return I Text Selection text Selection I Text Selection selection Provider get Selection CVS Annotate Block list Selection CVS Annotate Block selection get First Element Ignore event if the current text selection is already equal to the corresponding list selection Nothing to do This prevents infinite event looping Extra check to handle single line deltas if text Selection get Start Line list Selection get Start Line text Selection get End Line list Selection get End Line selection equals previous List Selection return If the last selection was a text selection then bale to prevent a selection loop if last Selection Was Text try int start document get Line Offset list Selection get Start Line int end document get Line Offset list Selection get End Line 1 editor select And Reveal start end start if editor null page is Part Visible editor page activate editor catch Bad Location Exception e Ignore nothing we can do Select the revision in the history view if history View null history View select Revision list Selection get Revision last Selection Was Text false  listSelectionChanged IStructuredSelection getSelectionProvider showAnnotations cvsResource cvsAnnotateBlocks InvocationTargetException IOException ISelectionProvider selectionProvider getSelectionProvider selectionProvider ITextSelection textSelection ITextSelection selectionProvider getSelection CVSAnnotateBlock listSelection CVSAnnotateBlock getFirstElement textSelection getStartLine listSelection getStartLine textSelection getEndLine listSelection getEndLine previousListSelection lastSelectionWasText getLineOffset listSelection getStartLine getLineOffset listSelection getEndLine selectAndReveal isPartVisible BadLocationException historyView historyView selectRevision listSelection getRevision lastSelectionWasText
Try and open the correct registered editor type for the file throws Invocation Target Exception private I Editor Part open Editor throws Invocation Target Exception Open the editor I Editor Part part ICVS Remote File file I Editor Registry registry try file ICVS Remote File CVS Workspace Root get Remote Resource For cvs Resource catch CVS Exception e1 throw new Invocation Target Exception e1 registry CVSUI Plugin get Plugin get Workbench get Editor Registry I Editor Descriptor descriptor registry get Default Editor file get Name Determine if the registered editor is an I Text Editor There is currently no support from UI to determine this information This problem has been logged in https bugs eclipse org bugs show bug cgi id 47362 For now use internal classes String id if descriptor null descriptor instanceof Editor Descriptor Editor Descriptor descriptor is Internal id IDE Workbench Plugin DEFAULT TEXT EDITOR ID NON NLS 1 else try Object obj IDE Workbench Plugin create Extension Editor Descriptor descriptor get Configuration Element class NON NLS 1 if obj instanceof I Text Editor id descriptor get Id else id IDE Workbench Plugin DEFAULT TEXT EDITOR ID catch Core Exception e id IDE Workbench Plugin DEFAULT TEXT EDITOR ID Either reuse an existing editor or open a new editor of the correct type try try if editor null editor instanceof I Reusable Editor page is Part Visible editor editor get Site get Id equals id We can reuse the editor I Reusable Editor editor set Input new Remote Annotation Editor Input file contents part editor else We can not reuse the editor so close the existing one and open a new one if editor null page close Editor editor false editor null part page open Editor new Remote Annotation Editor Input file contents id catch Part Init Exception e throw e catch Part Init Exception e Total failure throw new Invocation Target Exception e Hook Editor post selection listener I Text Editor editor I Text Editor part if editor get Selection Provider instanceof I Post Selection Provider I Post Selection Provider editor get Selection Provider add Post Selection Changed Listener this part get Site get Page add Part Listener part Listener return part  InvocationTargetException IEditorPart openEditor InvocationTargetException IEditorPart ICVSRemoteFile IEditorRegistry ICVSRemoteFile CVSWorkspaceRoot getRemoteResourceFor cvsResource CVSException InvocationTargetException CVSUIPlugin getPlugin getWorkbench getEditorRegistry IEditorDescriptor getDefaultEditor getName ITextEditor show_bug EditorDescriptor EditorDescriptor isInternal IDEWorkbenchPlugin DEFAULT_TEXT_EDITOR_ID IDEWorkbenchPlugin createExtension EditorDescriptor getConfigurationElement ITextEditor getId IDEWorkbenchPlugin DEFAULT_TEXT_EDITOR_ID CoreException IDEWorkbenchPlugin DEFAULT_TEXT_EDITOR_ID IReusableEditor isPartVisible getSite getId IReusableEditor setInput RemoteAnnotationEditorInput closeEditor openEditor RemoteAnnotationEditorInput PartInitException PartInitException InvocationTargetException ITextEditor ITextEditor getSelectionProvider IPostSelectionProvider IPostSelectionProvider getSelectionProvider addPostSelectionChangedListener getSite getPage addPartListener partListener
This method implemented to be an I Selection Change Listener but we don t really care when the List or Editor get focus public void set Focus return  ISelectionChangeListener setFocus

boolean show Option public Avoidable Message Dialog Shell shell String dialog Title Image dialog Title Image String dialog Message int dialog Image Type String dialog Button Labels int default Index this shell dialog Title dialog Title Image dialog Message dialog Image Type dialog Button Labels default Index true  showOption AvoidableMessageDialog dialogTitle dialogTitleImage dialogMessage dialogImageType dialogButtonLabels defaultIndex dialogTitle dialogTitleImage dialogMessage dialogImageType dialogButtonLabels defaultIndex
public Avoidable Message Dialog Shell shell String dialog Title Image dialog Title Image String dialog Message int dialog Image Type String dialog Button Labels int default Index boolean show Option super shell dialog Title dialog Title Image dialog Message dialog Image Type dialog Button Labels default Index this show Option show Option  AvoidableMessageDialog dialogTitle dialogTitleImage dialogMessage dialogImageType dialogButtonLabels defaultIndex showOption dialogTitle dialogTitleImage dialogMessage dialogImageType dialogButtonLabels defaultIndex showOption showOption
dont Show Again set Selection dont Show dont Show Again add Selection Listener new Selection Listener public void widget Selected Selection Event e dont Show dont Show Again get Selection  dontShowAgain setSelection dontShow dontShowAgain addSelectionListener SelectionListener widgetSelected SelectionEvent dontShow dontShowAgain getSelection
dont Show dont Show Again get Selection public void widget Default Selected Selection Event e widget Selected e  dontShow dontShowAgain getSelection widgetDefaultSelected SelectionEvent widgetSelected
protected Control create Custom Area Composite composite if show Option return null dont Show false dont Show Again new Button composite SWT CHECK Grid Data data new Grid Data data horizontal Indent 50 dont Show Again set Layout Data data dont Show Again set Text Policy bind Avoidable Message Dialog dont Show Again NON NLS 1 dont Show Again set Selection dont Show dont Show Again add Selection Listener new Selection Listener public void widget Selected Selection Event e dont Show dont Show Again get Selection public void widget Default Selected Selection Event e widget Selected e return dont Show Again  createCustomArea showOption dontShow dontShowAgain GridData GridData horizontalIndent dontShowAgain setLayoutData dontShowAgain setText AvoidableMessageDialog dontShowAgain dontShowAgain setSelection dontShow dontShowAgain addSelectionListener SelectionListener widgetSelected SelectionEvent dontShow dontShowAgain getSelection widgetDefaultSelected SelectionEvent widgetSelected dontShowAgain
public boolean is Dont Show Again return dont Show  isDontShowAgain dontShow

public Branch Prompt Dialog Shell parent Shell String title ICVS Folder folder boolean all Resources Sticky String version Name super parent Shell title this folder folder this all Sticky Resources all Resources Sticky this version Name version Name  BranchPromptDialog parentShell ICVSFolder allResourcesSticky versionName parentShell allStickyResources allResourcesSticky versionName versionName
branch Text add Listener SWT Modify new Listener public void handle Event Event event branch Tag branch Text get Text update Enablements update Version Name branch Tag  branchText addListener handleEvent branchTag branchText getText updateEnablements updateVersionName branchTag
check set Text Policy bind Branch Wizard Page start Working NON NLS 1 check add Listener SWT Selection new Listener public void handle Event Event event update check get Selection  setText BranchWizardPage startWorking addListener handleEvent getSelection
version Text CVS Wizard Page create Text Field composite version Text add Listener SWT Modify new Listener public void handle Event Event event version Tag version Text get Text update Enablements  versionText CVSWizardPage createTextField versionText addListener handleEvent versionTag versionText getText updateEnablements
see Details Dialog create Main Dialog Area Composite protected void create Main Dialog Area Composite composite create message Label label new Label composite SWT WRAP String message if all Sticky Resources message Policy bind Branch Wizard Page page Description Version NON NLS 1 else message Policy bind Branch Wizard Page page Description NON NLS 1 label set Text message Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER data width Hint convert HorizontalDL Us To Pixels I Dialog Constants MINIMUM MESSAGE AREA WIDTH label set Layout Data data CVS Wizard Page create Label composite Policy bind Branch Wizard Page branch Name NON NLS 1 branch Text CVS Wizard Page create Text Field composite branch Text add Listener SWT Modify new Listener public void handle Event Event event branch Tag branch Text get Text update Enablements update Version Name branch Tag final Button check new Button composite SWT CHECK data new Grid Data data horizontal Span 2 check set Layout Data data check set Text Policy bind Branch Wizard Page start Working NON NLS 1 check add Listener SWT Selection new Listener public void handle Event Event event update check get Selection check set Selection true update true label new Label composite SWT WRAP label set Text Policy bind Branch Wizard Page specify Version NON NLS 1 data new Grid Data data horizontal Span 2 data width Hint 350 label set Layout Data data CVS Wizard Page create Label composite Policy bind Branch Wizard Page version Name NON NLS 1 version Text CVS Wizard Page create Text Field composite version Text add Listener SWT Modify new Listener public void handle Event Event event version Tag version Text get Text update Enablements if all Sticky Resources version Text set Editable false version Text set Text version Name F1 Help Workbench Help set Help composite I Help Context Ids BRANCH DIALOG Dialog apply Dialog Font composite branch Text set Focus  DetailsDialog createMainDialogArea createMainDialogArea allStickyResources BranchWizardPage pageDescriptionVersion BranchWizardPage pageDescription setText GridData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER widthHint convertHorizontalDLUsToPixels IDialogConstants MINIMUM_MESSAGE_AREA_WIDTH setLayoutData CVSWizardPage createLabel BranchWizardPage branchName branchText CVSWizardPage createTextField branchText addListener handleEvent branchTag branchText getText updateEnablements updateVersionName branchTag GridData horizontalSpan setLayoutData setText BranchWizardPage startWorking addListener handleEvent getSelection setSelection setText BranchWizardPage specifyVersion GridData horizontalSpan widthHint setLayoutData CVSWizardPage createLabel BranchWizardPage versionName versionText CVSWizardPage createTextField versionText addListener handleEvent versionTag versionText getText updateEnablements allStickyResources versionText setEditable versionText setText versionName WorkbenchHelp setHelp IHelpContextIds BRANCH_DIALOG applyDialogFont branchText setFocus
Updates version name protected void update Version Name String branch Name if version Text null all Sticky Resources version Text set Text Policy bind Branch Wizard Page version Prefix branch Name NON NLS 1  updateVersionName branchName versionText allStickyResources versionText setText BranchWizardPage versionPrefix branchName
public void run get Shell get Display sync Exec new Runnable public void run tag Tree refresh  getShell getDisplay syncExec tagTree
Runnable refresh new Runnable public void run get Shell get Display sync Exec new Runnable public void run tag Tree refresh  getShell getDisplay syncExec tagTree
see Details Dialog create Drop Down Dialog Area Composite protected Composite create Drop Down Dialog Area Composite parent create a composite with standard margins and spacing Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH Label label new Label composite SWT WRAP label set Text Policy bind Branch Wizard Page existing Versions And Branches NON NLS 1 Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER data width Hint convert HorizontalDL Us To Pixels I Dialog Constants MINIMUM MESSAGE AREA WIDTH label set Layout Data data tag Tree create Tree composite tag Tree set Input new Project Element folder Project Element INCLUDE BRANCHES Project Element INCLUDE VERSIONS Runnable refresh new Runnable public void run get Shell get Display sync Exec new Runnable public void run tag Tree refresh Tag Configuration Dialog create Tag Definition Buttons get Shell composite new ICVS Folder folder convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH refresh refresh Dialog apply Dialog Font parent return composite  DetailsDialog createDropDownDialogArea createDropDownDialogArea GridLayout GridLayout marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING setLayout setLayoutData GridData GridData FILL_BOTH setText BranchWizardPage existingVersionsAndBranches GridData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER widthHint convertHorizontalDLUsToPixels IDialogConstants MINIMUM_MESSAGE_AREA_WIDTH setLayoutData tagTree createTree tagTree setInput ProjectElement ProjectElement INCLUDE_BRANCHES ProjectElement INCLUDE_VERSIONS getShell getDisplay syncExec tagTree TagConfigurationDialog createTagDefinitionButtons getShell ICVSFolder convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH applyDialogFont
result set Label Provider new Workbench Label Provider result add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event  setLabelProvider WorkbenchLabelProvider addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent
Creates the existing branch and version tree viewer in the details pane protected Tree Viewer create Tree Composite parent Tree tree new Tree parent SWT SINGLE SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data height Hint TABLE HEIGHT HINT tree set Layout Data data Tree Viewer result new Tree Viewer tree result set Content Provider new Workbench Content Provider result set Label Provider new Workbench Label Provider result add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event result set Sorter new Repository Sorter return result  TreeViewer createTree GridData GridData GridData FILL_BOTH heightHint TABLE_HEIGHT_HINT setLayoutData TreeViewer TreeViewer setContentProvider WorkbenchContentProvider setLabelProvider WorkbenchLabelProvider addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent setSorter RepositorySorter
Validates branch and version names protected void update Enablements String message null boolean complete false if branch Tag length 0 message NON NLS 1 else I Status status CVS Tag validate Tag Name branch Tag if status isOK message Policy bind Branch Wizard branch Name Warning status get Message NON NLS 1 else if version Text null status CVS Tag validate Tag Name version Text get Text if status isOK message Policy bind Branch Wizard version Name Warning status get Message NON NLS 1 else if version Tag length 0 version Tag equals branch Tag message Policy bind Branch Wizard branch And Version Must Be Different NON NLS 1 set Page Complete message null set Error Message message  updateEnablements branchTag IStatus CVSTag validateTagName branchTag BranchWizard branchNameWarning getMessage versionText CVSTag validateTagName versionText getText BranchWizard versionNameWarning getMessage versionTag versionTag branchTag BranchWizard branchAndVersionMustBeDifferent setPageComplete setErrorMessage
Returns the branch tag name public String get Branch Tag Name return branch Tag  getBranchTagName branchTag
Returns the version tag name public String get Version Tag Name return version Tag  getVersionTagName versionTag
Returns the state of the update checkbox public boolean get Update return update  getUpdate

Constructor for Commit Comment Area param parent Dialog param settings public Commit Comment Area Dialog parent Dialog I Dialog Settings settings super parent Dialog settings comments CVSUI Plugin get Plugin get Repository Manager get Previous Comments  CommitCommentArea parentDialog CommitCommentArea parentDialog IDialogSettings parentDialog CVSUIPlugin getPlugin getRepositoryManager getPreviousComments
see org eclipse team internal ccvs ui Dialog Area create Area org eclipse swt widgets Composite public void create Area Composite parent Dialog apply Dialog Font parent Composite composite create Grabbing Composite parent 1 initialize Dialog Units composite Label label new Label composite SWT NULL label set Layout Data new Grid Data label set Text Policy bind Release Comment Dialog enter Comment NON NLS 1 text new Text composite SWT BORDER SWT MULTI SWT H SCROLL SWT V SCROLL Grid Data data new Grid Data Grid Data FILL BOTH data width Hint WIDTH HINT data height Hint HEIGHT HINT text set Layout Data data text select All text add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE RETURN e state Mask SWT CTRL 0 e doit false Commit Comment Area this signal Ctrl Enter text add Modify Listener new Modify Listener public void modify Text Modify Event e comment text get Text label new Label composite SWT NULL label set Layout Data new Grid Data label set Text Policy bind Release Comment Dialog choose Previous NON NLS 1 previous Comments Combo new Combo composite SWT READ ONLY data new Grid Data Grid Data FILL HORIZONTAL data width Hint I Dialog Constants ENTRY FIELD WIDTH previous Comments Combo set Layout Data data Initialize the values before we register any listeners so we don t get any platform specific selection behavior see bug 32078 http bugs eclipse org bugs show bug cgi id 32078 initialize Values previous Comments Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e int index previous Comments Combo get Selection Index if index 1 text set Text comments index  DialogArea createArea createArea applyDialogFont createGrabbingComposite initializeDialogUnits setLayoutData GridData setText ReleaseCommentDialog enterComment H_SCROLL V_SCROLL GridData GridData GridData FILL_BOTH widthHint WIDTH_HINT heightHint HEIGHT_HINT setLayoutData selectAll addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_RETURN stateMask CommitCommentArea signalCtrlEnter addModifyListener ModifyListener modifyText ModifyEvent getText setLayoutData GridData setText ReleaseCommentDialog choosePrevious previousCommentsCombo READ_ONLY GridData GridData FILL_HORIZONTAL widthHint IDialogConstants ENTRY_FIELD_WIDTH previousCommentsCombo setLayoutData show_bug initializeValues previousCommentsCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent previousCommentsCombo getSelectionIndex setText
Method initialize Values private void initialize Values populate the previous comment list for int i 0 i comments length i previous Comments Combo add History View flatten Text comments i We don t want to have an initial selection see bug 32078 http bugs eclipse org bugs show bug cgi id 32078 previous Comments Combo set Text NON NLS 1 determine the initial comment text String initial Comment try initial Comment get Commit Template catch CVS Exception e CVSUI Plugin log e initial Comment null if initial Comment null initial Comment length 0 text set Text initial Comment  initializeValues initializeValues previousCommentsCombo HistoryView flattenText show_bug previousCommentsCombo setText initialComment initialComment getCommitTemplate CVSException CVSUIPlugin initialComment initialComment initialComment setText initialComment
Method signal Ctrl Enter private void signal Ctrl Enter fire Property Change Change OK REQUESTED null null  signalCtrlEnter signalCtrlEnter firePropertyChangeChange OK_REQUESTED
private String get Commit Template throws CVS Exception CVS Team Provider provider get Provider if provider null return NON NLS 1 String template provider get Commit Template if template null template NON NLS 1 return template  getCommitTemplate CVSException CVSTeamProvider getProvider getCommitTemplate
Method get Provider private CVS Team Provider get Provider if main Project null return null return CVS Team Provider Repository Provider get Provider main Project CVS Provider Plugin get Type Id  getProvider CVSTeamProvider getProvider mainProject CVSTeamProvider RepositoryProvider getProvider mainProject CVSProviderPlugin getTypeId
Return the entered comment return the comment public String get Comments return comments  getComments
Returns the comment return String public String get Comment if comment null comment length 0 finished return comment  getComment
Method set Project param i Project public void set Project I Project i Project this main Project i Project  setProject iProject setProject IProject iProject mainProject iProject
private void finished strip template from the comment entered try String commit Template get Commit Template if comment starts With commit Template comment comment substring commit Template length else if comment ends With commit Template comment comment substring 0 comment length commit Template length catch CVS Exception e we couldn t get the commit template Log the error and continue CVSUI Plugin log e if there is still a comment remember it if comment length 0 CVSUI Plugin get Plugin get Repository Manager add Comment comment  commitTemplate getCommitTemplate startsWith commitTemplate commitTemplate endsWith commitTemplate commitTemplate CVSException CVSUIPlugin CVSUIPlugin getPlugin getRepositoryManager addComment
public void set Focus if text null text set Focus  setFocus setFocus

public String line public int type Console Line String line int type this line line this type type  ConsoleLine
Creates an empty console document public Console Document  ConsoleDocument
Clears the console document public void clear line Types null lines null write Index 0 read Index 0  lineTypes writeIndex readIndex
Appends a line of the specified type to the end of the console public void append Console Line int type String line if lines null lines new String BUFFER SIZE line Types new int BUFFER SIZE lines write Index line NON NLS 1 line Types write Index type if write Index BUFFER SIZE write Index 0 if write Index read Index if read Index BUFFER SIZE read Index 0  appendConsoleLine BUFFER_SIZE lineTypes BUFFER_SIZE writeIndex lineTypes writeIndex writeIndex BUFFER_SIZE writeIndex writeIndex readIndex readIndex BUFFER_SIZE readIndex
public Console Line get Lines if is Empty return new Console Line 0 Console Line doc Lines new Console Line read Index write Index BUFFER SIZE write Index int index read Index for int i 0 i doc Lines length i doc Lines i new Console Line lines index line Types index if index BUFFER SIZE index 0 return doc Lines  ConsoleLine getLines isEmpty ConsoleLine ConsoleLine docLines ConsoleLine readIndex writeIndex BUFFER_SIZE writeIndex readIndex docLines docLines ConsoleLine lineTypes BUFFER_SIZE docLines
public boolean is Empty return write Index read Index  isEmpty writeIndex readIndex

public class Console Preferences Page extends Field Editor Preference Page implements I Workbench Preference Page public Console Preferences Page super GRID set Preference Store CVSUI Plugin get Plugin get Preference Store  ConsolePreferencesPage FieldEditorPreferencePage IWorkbenchPreferencePage ConsolePreferencesPage setPreferenceStore CVSUIPlugin getPlugin getPreferenceStore
protected void create Field Editors Composite composite get Field Editor Parent create Label composite Policy bind Console Preference Page console Color Settings NON NLS 1 command Color Editor create Color Field Editor ICVSUI Constants PREF CONSOLE COMMAND COLOR Policy bind Console Preference Page command Color composite NON NLS 1 add Field command Color Editor message Color Editor create Color Field Editor ICVSUI Constants PREF CONSOLE MESSAGE COLOR Policy bind Console Preference Page message Color composite NON NLS 1 add Field message Color Editor error Color Editor create Color Field Editor ICVSUI Constants PREF CONSOLE ERROR COLOR Policy bind Console Preference Page error Color composite NON NLS 1 add Field error Color Editor show On Message new Boolean Field Editor ICVSUI Constants PREF CONSOLE SHOW ON MESSAGE Policy bind Console Preferences Page 4 composite NON NLS 1 add Field show On Message Workbench Help set Help composite I Help Context Ids CONSOLE PREFERENCE PAGE  createFieldEditors getFieldEditorParent createLabel ConsolePreferencePage consoleColorSettings commandColorEditor createColorFieldEditor ICVSUIConstants PREF_CONSOLE_COMMAND_COLOR ConsolePreferencePage commandColor addField commandColorEditor messageColorEditor createColorFieldEditor ICVSUIConstants PREF_CONSOLE_MESSAGE_COLOR ConsolePreferencePage messageColor addField messageColorEditor errorColorEditor createColorFieldEditor ICVSUIConstants PREF_CONSOLE_ERROR_COLOR ConsolePreferencePage errorColor addField errorColorEditor showOnMessage BooleanFieldEditor ICVSUIConstants PREF_CONSOLE_SHOW_ON_MESSAGE ConsolePreferencesPage addField showOnMessage WorkbenchHelp setHelp IHelpContextIds CONSOLE_PREFERENCE_PAGE
Utility method that creates a label instance and sets the default layout data param parent the parent for the new label param text the text for the new label return the new label private Label create Label Composite parent String text Label label new Label parent SWT LEFT label set Text text Grid Data data new Grid Data data horizontal Span 2 data horizontal Alignment Grid Data FILL label set Layout Data data return label  createLabel setText GridData GridData horizontalSpan horizontalAlignment GridData setLayoutData
Creates a new color field editor private Color Field Editor create Color Field Editor String preference Name String label Composite parent Color Field Editor editor new Color Field Editor preference Name label parent editor set Preference Page this editor set Preference Store get Preference Store return editor  ColorFieldEditor createColorFieldEditor preferenceName ColorFieldEditor ColorFieldEditor preferenceName setPreferencePage setPreferenceStore getPreferenceStore
see org eclipse ui I Workbench Preference Page init org eclipse ui I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
see org eclipse jface preference I Preference Page perform Ok public boolean perform Ok CVSUI Plugin get Plugin save Plugin Preferences return super perform Ok  IPreferencePage performOk performOk CVSUIPlugin getPlugin savePluginPreferences performOk

class My Lifecycle implements org eclipse ui console I Console Listener public void consoles Added I Console consoles for int i 0 i consoles length i I Console console consoles i if console CVS Output Console this init  MyLifecycle IConsoleListener consolesAdded IConsole IConsole CVSOutputConsole
public void consoles Removed I Console consoles for int i 0 i consoles length i I Console console consoles i if console CVS Output Console this Console Plugin get Default get Console Manager remove Console Listener this dispose  consolesRemoved IConsole IConsole CVSOutputConsole ConsolePlugin getDefault getConsoleManager removeConsoleListener
Constructor initializes preferences and colors but doesn t create the console page yet public CVS Output Console super CVS CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG CVS CONSOLE NON NLS 1 setup console showing preferences show On Message CVSUI Plugin get Plugin get Preference Store get Boolean ICVSUI Constants PREF CONSOLE SHOW ON MESSAGE show On Error CVSUI Plugin get Plugin get Preference Store get Boolean ICVSUI Constants PREF CONSOLE SHOW ON ERROR document new Console Document CVS Provider Plugin get Plugin set Console Listener CVS Output Console this CVSUI Plugin get Plugin get Preference Store add Property Change Listener CVS Output Console this show Console false  CVSOutputConsole CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_CVS_CONSOLE showOnMessage CVSUIPlugin getPlugin getPreferenceStore getBoolean ICVSUIConstants PREF_CONSOLE_SHOW_ON_MESSAGE showOnError CVSUIPlugin getPlugin getPreferenceStore getBoolean ICVSUIConstants PREF_CONSOLE_SHOW_ON_ERROR ConsoleDocument CVSProviderPlugin getPlugin setConsoleListener CVSOutputConsole CVSUIPlugin getPlugin getPreferenceStore addPropertyChangeListener CVSOutputConsole showConsole
CVSUI Plugin get Standard Display async Exec new Runnable public void run J Face Resources get Font Registry add Listener CVS Output Console this initialize Streams dump  CVSUIPlugin getStandardDisplay asyncExec JFaceResources getFontRegistry addListener CVSOutputConsole initializeStreams
protected void init Called when console is added to the console view super init Ensure that initialization occurs in the ui thread CVSUI Plugin get Standard Display async Exec new Runnable public void run J Face Resources get Font Registry add Listener CVS Output Console this initialize Streams dump  CVSUIPlugin getStandardDisplay asyncExec JFaceResources getFontRegistry addListener CVSOutputConsole initializeStreams
private void initialize Streams synchronized document if initialized command Stream new Message Stream error Stream new Message Stream message Stream new Message Stream install colors command Color create Color CVSUI Plugin get Standard Display ICVSUI Constants PREF CONSOLE COMMAND COLOR command Stream set Color command Color message Color create Color CVSUI Plugin get Standard Display ICVSUI Constants PREF CONSOLE MESSAGE COLOR message Stream set Color message Color error Color create Color CVSUI Plugin get Standard Display ICVSUI Constants PREF CONSOLE ERROR COLOR error Stream set Color error Color install font set Font J Face Resources get Font Registry get ICVSUI Constants PREF CONSOLE FONT initialized true  initializeStreams commandStream newMessageStream errorStream newMessageStream messageStream newMessageStream commandColor createColor CVSUIPlugin getStandardDisplay ICVSUIConstants PREF_CONSOLE_COMMAND_COLOR commandStream setColor commandColor messageColor createColor CVSUIPlugin getStandardDisplay ICVSUIConstants PREF_CONSOLE_MESSAGE_COLOR messageStream setColor messageColor errorColor createColor CVSUIPlugin getStandardDisplay ICVSUIConstants PREF_CONSOLE_ERROR_COLOR errorStream setColor errorColor setFont JFaceResources getFontRegistry ICVSUIConstants PREF_CONSOLE_FONT
private void dump synchronized document visible true Console Document Console Line lines document get Lines for int i 0 i lines length i Console Document Console Line line lines i append Line line type line line document clear  ConsoleDocument ConsoleLine getLines ConsoleDocument ConsoleLine appendLine
private void append Line int type String line synchronized document if visible switch type case Console Document COMMAND command Stream println line break case Console Document MESSAGE message Stream println line NON NLS 1 break case Console Document ERROR error Stream println line NON NLS 1 break else document append Console Line type line  appendLine ConsoleDocument commandStream ConsoleDocument messageStream ConsoleDocument errorStream appendConsoleLine
private void show Console boolean show if show On Message I Console Manager manager Console Plugin get Default get Console Manager if visible manager add Consoles new I Console this if show manager show Console View this  showConsole showOnMessage IConsoleManager ConsolePlugin getDefault getConsoleManager addConsoles IConsole showConsoleView
protected void dispose Here we can t call super dispose because we actually want the partitioner to remain connected but we won t show lines until the console is added to the console manager again Called when console is removed from the console view synchronized document visible false J Face Resources get Font Registry remove Listener this  JFaceResources getFontRegistry removeListener
Clean up created fonts public void shutdown Call super dispose because we want the partitioner to be disconnected super dispose if command Color null command Color dispose if message Color null message Color dispose if error Color null error Color dispose CVSUI Plugin get Plugin get Preference Store remove Property Change Listener this  commandColor commandColor messageColor messageColor errorColor errorColor CVSUIPlugin getPlugin getPreferenceStore removePropertyChangeListener
public void command Invoked String line command Started System current Time Millis append Line Console Document COMMAND Policy bind Console pre Execution Delimiter NON NLS 1 append Line Console Document COMMAND line  commandInvoked commandStarted currentTimeMillis appendLine ConsoleDocument preExecutionDelimiter appendLine ConsoleDocument
see org eclipse team internal ccvs core client listeners I Console Listener message Line Received java lang String public void message Line Received String line append Line Console Document MESSAGE line NON NLS 1  IConsoleListener messageLineReceived messageLineReceived appendLine ConsoleDocument
see org eclipse team internal ccvs core client listeners I Console Listener error Line Received java lang String public void error Line Received String line append Line Console Document ERROR line NON NLS 1  IConsoleListener errorLineReceived errorLineReceived appendLine ConsoleDocument
public void command Completed I Status status Exception exception long command Runtime System current Time Millis command Started String time try time TIME FORMAT format new Date command Runtime catch Runtime Exception e CVSUI Plugin log I Status ERROR Policy bind Console could Not Format Time e NON NLS 1 time NON NLS 1 String status Text if status null if status get Code CVS Status SERVER ERROR status Text Policy bind Console result Server Error status get Message time NON NLS 1 else status Text Policy bind Console result Ok time NON NLS 1 append Line Console Document COMMAND status Text I Status children status get Children if children length 0 if status isOK append Line Console Document COMMAND message Line For Status status else for int i 0 i children length i if children i isOK append Line Console Document COMMAND message Line For Status children i else if exception null if exception instanceof Operation Canceled Exception status Text Policy bind Console result Aborted time NON NLS 1 else status Text Policy bind Console result Exception time NON NLS 1 append Line Console Document COMMAND status Text else status Text Policy bind Console result Ok time NON NLS 1 append Line Console Document COMMAND Policy bind Console post Execution Delimiter NON NLS 1 append Line Console Document COMMAND NON NLS 1  commandCompleted IStatus commandRuntime currentTimeMillis commandStarted TIME_FORMAT commandRuntime RuntimeException CVSUIPlugin IStatus couldNotFormatTime statusText getCode CVSStatus SERVER_ERROR statusText resultServerError getMessage statusText resultOk appendLine ConsoleDocument statusText IStatus getChildren appendLine ConsoleDocument messageLineForStatus appendLine ConsoleDocument messageLineForStatus OperationCanceledException statusText resultAborted statusText resultException appendLine ConsoleDocument statusText statusText resultOk appendLine ConsoleDocument postExecutionDelimiter appendLine ConsoleDocument
public void property Change Property Change Event event String property event get Property colors if visible if property equals ICVSUI Constants PREF CONSOLE COMMAND COLOR Color new Color create Color CVSUI Plugin get Standard Display ICVSUI Constants PREF CONSOLE COMMAND COLOR command Stream set Color new Color command Color dispose command Color new Color else if property equals ICVSUI Constants PREF CONSOLE MESSAGE COLOR Color new Color create Color CVSUI Plugin get Standard Display ICVSUI Constants PREF CONSOLE MESSAGE COLOR message Stream set Color new Color message Color dispose message Color new Color else if property equals ICVSUI Constants PREF CONSOLE ERROR COLOR Color new Color create Color CVSUI Plugin get Standard Display ICVSUI Constants PREF CONSOLE ERROR COLOR error Stream set Color new Color error Color dispose error Color new Color font else if property equals ICVSUI Constants PREF CONSOLE FONT set Font J Face Resources get Font Registry get ICVSUI Constants PREF CONSOLE FONT show preferences if property equals ICVSUI Constants PREF CONSOLE SHOW ON MESSAGE Object value event get New Value if value instanceof String show On Message Boolean get Boolean String event get New Value else show On Message Boolean value boolean Value if show On Message show Console true else I Console Manager manager Console Plugin get Default get Console Manager manager remove Consoles new I Console this Console Plugin get Default get Console Manager add Console Listener new My Lifecycle  propertyChange PropertyChangeEvent getProperty ICVSUIConstants PREF_CONSOLE_COMMAND_COLOR newColor createColor CVSUIPlugin getStandardDisplay ICVSUIConstants PREF_CONSOLE_COMMAND_COLOR commandStream setColor newColor commandColor commandColor newColor ICVSUIConstants PREF_CONSOLE_MESSAGE_COLOR newColor createColor CVSUIPlugin getStandardDisplay ICVSUIConstants PREF_CONSOLE_MESSAGE_COLOR messageStream setColor newColor messageColor messageColor newColor ICVSUIConstants PREF_CONSOLE_ERROR_COLOR newColor createColor CVSUIPlugin getStandardDisplay ICVSUIConstants PREF_CONSOLE_ERROR_COLOR errorStream setColor newColor errorColor errorColor newColor ICVSUIConstants PREF_CONSOLE_FONT setFont JFaceResources getFontRegistry ICVSUIConstants PREF_CONSOLE_FONT ICVSUIConstants PREF_CONSOLE_SHOW_ON_MESSAGE getNewValue showOnMessage getBoolean getNewValue showOnMessage booleanValue showOnMessage showConsole IConsoleManager ConsolePlugin getDefault getConsoleManager removeConsoles IConsole ConsolePlugin getDefault getConsoleManager addConsoleListener MyLifecycle
Returns the NL Sd message based on the status returned from the CVS command param status an NL Sd message based on the status returned from the CVS command private String message Line For Status I Status status if status get Severity I Status ERROR return Policy bind Console error status get Message NON NLS 1 else if status get Severity I Status WARNING return Policy bind Console warning status get Message NON NLS 1 else if status get Severity I Status INFO return Policy bind Console info status get Message NON NLS 1 return status get Message  NLSd NLSd messageLineForStatus IStatus getSeverity IStatus getMessage getSeverity IStatus getMessage getSeverity IStatus getMessage getMessage
Returns a color instance based on data from a preference field private Color create Color Display display String preference RGB rgb Preference Converter get Color CVSUI Plugin get Plugin get Preference Store preference return new Color display rgb  createColor PreferenceConverter getColor CVSUIPlugin getPlugin getPreferenceStore

Creates a new CVS Compare Editor Input public CVS Compare Editor Input Resource Edition Node left Resource Edition Node right this left right null  CVSCompareEditorInput CVSCompareEditorInput ResourceEditionNode ResourceEditionNode
Creates a new CVS Compare Editor Input public CVS Compare Editor Input Resource Edition Node left Resource Edition Node right Resource Edition Node ancestor super new Compare Configuration TODO Invokers of this method should ensure that trees and contents are prefetched this left left this right right this ancestor ancestor if left null this left Image left get Image if right null this right Image right get Image if ancestor null this ancestor Image ancestor get Image  CVSCompareEditorInput CVSCompareEditorInput ResourceEditionNode ResourceEditionNode ResourceEditionNode CompareConfiguration leftImage getImage rightImage getImage ancestorImage getImage
Returns the label for the given input element private String get Label I Typed Element element if element instanceof Resource Edition Node ICVS Remote Resource edition Resource Edition Node element get Remote Resource ICVS Resource resource edition if edition instanceof ICVS Remote File try return Policy bind name And Revision resource get Name ICVS Remote File edition get Revision NON NLS 1 catch Team Exception e fall through try if edition is Container CVS Tag tag ICVS Remote Folder edition get Tag if tag null return Policy bind CVS Compare Editor Input in Head edition get Name NON NLS 1 else if tag get Type CVS Tag BRANCH return Policy bind CVS Compare Editor Input in Branch new Object edition get Name tag get Name NON NLS 1 else return Policy bind CVS Compare Editor Input repository new Object edition get Name tag get Name NON NLS 1 else return Policy bind CVS Compare Editor Input repository new Object edition get Name resource get Sync Info get Revision NON NLS 1 catch Team Exception e handle e Fall through and get the default label return element get Name  getLabel ITypedElement ResourceEditionNode ICVSRemoteResource ResourceEditionNode getRemoteResource ICVSResource ICVSRemoteFile nameAndRevision getName ICVSRemoteFile getRevision TeamException isContainer CVSTag ICVSRemoteFolder getTag CVSCompareEditorInput inHead getName getType CVSTag CVSCompareEditorInput inBranch getName getName CVSCompareEditorInput getName getName CVSCompareEditorInput getName getSyncInfo getRevision TeamException getName
Returns the label for the given input element private String get Version Label I Typed Element element if element instanceof Resource Edition Node ICVS Remote Resource edition Resource Edition Node element get Remote Resource ICVS Resource resource edition try if edition is Container CVS Tag tag ICVS Remote Folder resource get Tag if tag null return Policy bind CVS Compare Editor Input head Label NON NLS 1 else if tag get Type CVS Tag BRANCH return Policy bind CVS Compare Editor Input branch Label tag get Name NON NLS 1 else return tag get Name else return resource get Sync Info get Revision catch Team Exception e handle e Fall through and get the default label return element get Name  getVersionLabel ITypedElement ResourceEditionNode ICVSRemoteResource ResourceEditionNode getRemoteResource ICVSResource isContainer CVSTag ICVSRemoteFolder getTag CVSCompareEditorInput headLabel getType CVSTag CVSCompareEditorInput branchLabel getName getName getSyncInfo getRevision TeamException getName
private String guess Resource Name if left null return left get Name if right null return right get Name if ancestor null return ancestor get Name return NON NLS 1  guessResourceName getName getName getName
private Object guess Resource Path if left null left instanceof Resource Edition Node return Resource Edition Node left get Remote Resource get Repository Relative Path if right null right instanceof Resource Edition Node return Resource Edition Node right get Remote Resource get Repository Relative Path if ancestor null ancestor instanceof Resource Edition Node return Resource Edition Node ancestor get Remote Resource get Repository Relative Path return guess Resource Name  guessResourcePath ResourceEditionNode ResourceEditionNode getRemoteResource getRepositoryRelativePath ResourceEditionNode ResourceEditionNode getRemoteResource getRepositoryRelativePath ResourceEditionNode ResourceEditionNode getRemoteResource getRepositoryRelativePath guessResourceName
Handles a random exception and sanitizes it into a reasonable error message private void handle Exception e create a status Throwable t e unwrap the invocation target exception if t instanceof Invocation Target Exception t Invocation Target Exception t get Target Exception I Status error if t instanceof Core Exception error Core Exception t get Status else if t instanceof Team Exception error Team Exception t get Status else error new Status I Status ERROR CVSUI Plugin ID 1 Policy bind internal t NON NLS 1 set Message error get Message if t instanceof Team Exception CVSUI Plugin log error get Severity error get Message t  InvocationTargetException InvocationTargetException getTargetException IStatus CoreException CoreException getStatus TeamException TeamException getStatus IStatus CVSUIPlugin setMessage getMessage TeamException CVSUIPlugin getSeverity getMessage
Sets up the title and pane labels for the comparison view private void init Labels Compare Configuration cc get Compare Configuration set Labels cc new Structured Selection String title if ancestor null title Policy bind CVS Compare Editor Input title Ancestor new Object guess Resource Name get Version Label ancestor get Version Label left get Version Label right NON NLS 1 tool Tip Text Policy bind CVS Compare Editor Input title Ancestor new Object guess Resource Path get Version Label ancestor get Version Label left get Version Label right NON NLS 1 else String left Name null if left null left Name left get Name String right Name null if right null right Name right get Name if left Name null left Name equals right Name title Policy bind CVS Compare Editor Input title No Ancestor Different new Object left Name get Version Label left right Name get Version Label right NON NLS 1 else title Policy bind CVS Compare Editor Input title No Ancestor new Object guess Resource Name get Version Label left get Version Label right NON NLS 1 title Policy bind CVS Compare Editor Input title No Ancestor new Object guess Resource Path get Version Label left get Version Label right NON NLS 1 set Title title  initLabels CompareConfiguration getCompareConfiguration setLabels StructuredSelection CVSCompareEditorInput titleAncestor guessResourceName getVersionLabel getVersionLabel getVersionLabel toolTipText CVSCompareEditorInput titleAncestor guessResourcePath getVersionLabel getVersionLabel getVersionLabel leftName leftName getName rightName rightName getName leftName leftName rightName CVSCompareEditorInput titleNoAncestorDifferent leftName getVersionLabel rightName getVersionLabel CVSCompareEditorInput titleNoAncestor guessResourceName getVersionLabel getVersionLabel CVSCompareEditorInput titleNoAncestor guessResourcePath getVersionLabel getVersionLabel setTitle
private void set Labels Compare Configuration cc I Structured Selection selection I Typed Element left this left I Typed Element right this right I Typed Element ancestor this ancestor if left null cc set Left Label get Label left cc set Left Image left Image if right null cc set Right Label get Label right cc set Right Image right Image if ancestor null cc set Ancestor Label get Label ancestor cc set Ancestor Image ancestor Image  setLabels CompareConfiguration IStructuredSelection ITypedElement ITypedElement ITypedElement setLeftLabel getLabel setLeftImage leftImage setRightLabel getLabel setRightImage rightImage setAncestorLabel getLabel setAncestorImage ancestorImage
Method declared on Compare Editor Input public boolean is Save Needed return false  CompareEditorInput isSaveNeeded
final Differencer d new Differencer protected boolean contents Equal Object input1 Object input2 int compare team Equal input1 input2 if compare NODE EQUAL return true if compare NODE NOT EQUAL return false revert to slow content comparison return super contents Equal input1 input2  contentsEqual teamEqual NODE_EQUAL NODE_NOT_EQUAL contentsEqual
protected void update Progress I Progress Monitor progress Monitor Object node if node instanceof I Typed Element I Typed Element element I Typed Element node progress Monitor sub Task Policy bind Compare Editor Input file Progress new String element get Name NON NLS 1 progress Monitor worked 1  updateProgress IProgressMonitor progressMonitor ITypedElement ITypedElement ITypedElement progressMonitor subTask CompareEditorInput fileProgress getName progressMonitor
protected Object get Children Object input if input instanceof I Structure Comparator Object children I Structure Comparator input get Children if children null return children return null  getChildren IStructureComparator IStructureComparator getChildren
return null protected Object visit Object data int result Object ancestor Object left Object right return new Diff Node I Diff Container data result I Typed Element ancestor I Typed Element left I Typed Element right  DiffNode IDiffContainer ITypedElement ITypedElement ITypedElement
protected Object prepare Input I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception final boolean three Way ancestor null if right null left null set Message Policy bind CVS Compare Editor Input different NON NLS 1 return null init Labels final Differencer d new Differencer protected boolean contents Equal Object input1 Object input2 int compare team Equal input1 input2 if compare NODE EQUAL return true if compare NODE NOT EQUAL return false revert to slow content comparison return super contents Equal input1 input2 protected void update Progress I Progress Monitor progress Monitor Object node if node instanceof I Typed Element I Typed Element element I Typed Element node progress Monitor sub Task Policy bind Compare Editor Input file Progress new String element get Name NON NLS 1 progress Monitor worked 1 protected Object get Children Object input if input instanceof I Structure Comparator Object children I Structure Comparator input get Children if children null return children return null protected Object visit Object data int result Object ancestor Object left Object right return new Diff Node I Diff Container data result I Typed Element ancestor I Typed Element left I Typed Element right try do the diff Object result null monitor begin Task Policy bind CVS Compare Editor Input comparing 30 NON NLS 1 I Progress Monitor sub new Sub Progress Monitor monitor 30 sub begin Task Policy bind CVS Compare Editor Input comparing 100 NON NLS 1 try result d find Differences three Way sub null ancestor left right finally sub done return result catch Operation Canceled Exception e throw new Interrupted Exception e get Message catch Runtime Exception e handle e return null finally monitor done  prepareInput IProgressMonitor InvocationTargetException InterruptedException threeWay setMessage CVSCompareEditorInput initLabels contentsEqual teamEqual NODE_EQUAL NODE_NOT_EQUAL contentsEqual updateProgress IProgressMonitor progressMonitor ITypedElement ITypedElement ITypedElement progressMonitor subTask CompareEditorInput fileProgress getName progressMonitor getChildren IStructureComparator IStructureComparator getChildren DiffNode IDiffContainer ITypedElement ITypedElement ITypedElement beginTask CVSCompareEditorInput IProgressMonitor SubProgressMonitor beginTask CVSCompareEditorInput findDifferences threeWay OperationCanceledException InterruptedException getMessage RuntimeException
Compares two nodes to determine if they are equal Returns NODE EQUAL of they are the same NODE NOT EQUAL if they are different and NODE UNKNOWN if comparison was not possible protected int team Equal Object left Object right calculate the type for the left contribution ICVS Remote Resource left Edition null if left instanceof Resource Edition Node left Edition Resource Edition Node left get Remote Resource calculate the type for the right contribution ICVS Remote Resource right Edition null if right instanceof Resource Edition Node right Edition Resource Edition Node right get Remote Resource compare them if left Edition null right Edition null return NODE UNKNOWN if they re both non files they re the same if left Edition is Container right Edition is Container return NODE EQUAL if they have different types they re different if left Edition is Container right Edition is Container return NODE NOT EQUAL String left Location left Edition get Repository get Location String right Location right Edition get Repository get Location if left Location equals right Location return NODE UNKNOWN try Resource Sync Info left Info ICVS Resource left Edition get Sync Info Resource Sync Info right Info ICVS Resource right Edition get Sync Info if left Edition get Repository Relative Path equals right Edition get Repository Relative Path left Info get Revision equals right Info get Revision return NODE EQUAL else if consider Content If Revision Or Path Differs return NODE UNKNOWN else return NODE NOT EQUAL catch Team Exception e handle e return NODE UNKNOWN  NODE_EQUAL NODE_NOT_EQUAL NODE_UNKNOWN teamEqual ICVSRemoteResource leftEdition ResourceEditionNode leftEdition ResourceEditionNode getRemoteResource ICVSRemoteResource rightEdition ResourceEditionNode rightEdition ResourceEditionNode getRemoteResource leftEdition rightEdition NODE_UNKNOWN leftEdition isContainer rightEdition isContainer NODE_EQUAL leftEdition isContainer rightEdition isContainer NODE_NOT_EQUAL leftLocation leftEdition getRepository getLocation rightLocation rightEdition getRepository getLocation leftLocation rightLocation NODE_UNKNOWN ResourceSyncInfo leftInfo ICVSResource leftEdition getSyncInfo ResourceSyncInfo rightInfo ICVSResource rightEdition getSyncInfo leftEdition getRepositoryRelativePath rightEdition getRepositoryRelativePath leftInfo getRevision rightInfo getRevision NODE_EQUAL considerContentIfRevisionOrPathDiffers NODE_UNKNOWN NODE_NOT_EQUAL TeamException NODE_UNKNOWN
private boolean consider Content If Revision Or Path Differs return CVSUI Plugin get Plugin get Preference Store get Boolean ICVSUI Constants PREF CONSIDER CONTENTS  considerContentIfRevisionOrPathDiffers CVSUIPlugin getPlugin getPreferenceStore getBoolean ICVSUIConstants PREF_CONSIDER_CONTENTS
Viewer viewer super create Diff Viewer parent viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Compare Configuration cc get Compare Configuration set Labels cc I Structured Selection event get Selection  createDiffViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent CompareConfiguration getCompareConfiguration setLabels IStructuredSelection getSelection
public Viewer create Diff Viewer Composite parent Viewer viewer super create Diff Viewer parent viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Compare Configuration cc get Compare Configuration set Labels cc I Structured Selection event get Selection return viewer  createDiffViewer createDiffViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent CompareConfiguration getCompareConfiguration setLabels IStructuredSelection getSelection
public String get Tool Tip Text if tool Tip Text null return tool Tip Text return super get Tool Tip Text  getToolTipText toolTipText toolTipText getToolTipText

class Typed Buffered Content extends Resource Node public Typed Buffered Content I File resource super resource  TypedBufferedContent ResourceNode TypedBufferedContent IFile
super resource protected Input Stream create Stream throws Core Exception return I File get Resource get Contents  InputStream createStream CoreException IFile getResource getContents
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I File file resource if is null if file exists file create is false monitor else file set Contents is false true monitor else file delete false true monitor catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException IFile setContents CoreException InvocationTargetException
public void set Content byte contents if contents null contents new byte 0 final Input Stream is new Byte Array Input Stream contents I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I File file resource if is null if file exists file create is false monitor else file set Contents is false true monitor else file delete false true monitor catch Core Exception e throw new Invocation Target Exception e try new Progress Monitor Dialog shell run false false runnable catch Invocation Target Exception e CVSUI Plugin open Error CVSUI Plugin get Plugin get Workbench get Active Workbench Window get Shell Policy bind Team File save Changes resource get Name null e NON NLS 1 catch Interrupted Exception e Ignore fire Content Changed  setContent InputStream ByteArrayInputStream IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException IFile setContents CoreException InvocationTargetException ProgressMonitorDialog InvocationTargetException CVSUIPlugin openError CVSUIPlugin getPlugin getWorkbench getActiveWorkbenchWindow getShell TeamFile saveChanges getName InterruptedException fireContentChanged
fire Content Changed public I Typed Element replace I Typed Element child I Typed Element other return null  fireContentChanged ITypedElement ITypedElement ITypedElement
return null public void fire Change fire Content Changed  fireChange fireContentChanged
class Resource Revision Node extends Resource Edition Node I Log Entry entry public Resource Revision Node I Log Entry entry super entry get Remote File this entry entry  ResourceRevisionNode ResourceEditionNode ILogEntry ResourceRevisionNode ILogEntry getRemoteFile
this entry entry public I Log Entry get Log Entry return entry  ILogEntry getLogEntry
public String get Name String revision Name entry get Revision if revision Name null I Resource resource CVS Compare Revisions Input this resource try ICVS Remote File current Edition ICVS Remote File CVS Workspace Root get Remote Resource For resource if current Edition null current Edition get Revision equals revision Name Policy bind current Revision revision Name NON NLS 1 else return revision Name catch Team Exception e handle e return super get Name  getName revisionName getRevision revisionName IResource CVSCompareRevisionsInput ICVSRemoteFile currentEdition ICVSRemoteFile CVSWorkspaceRoot getRemoteResourceFor currentEdition currentEdition getRevision revisionName currentRevision revisionName revisionName TeamException getName
class Version Compare Diff Node extends Diff Node implements I Adaptable public Version Compare Diff Node I Typed Element left I Typed Element right super left right  VersionCompareDiffNode DiffNode IAdaptable VersionCompareDiffNode ITypedElement ITypedElement
super left right public String get Name return get Right get Name  getName getRight getName
public Object get Adapter Class adapter if adapter I Log Entry class return Resource Revision Node get Right get Log Entry return null  getAdapter ILogEntry ResourceRevisionNode getRight getLogEntry
return null public void fire Content Changes fire Change  fireContentChanges fireChange
class Version Compare Content Provider implements I Structured Content Provider public void dispose  VersionCompareContentProvider IStructuredContentProvider
public void dispose public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
public Object get Elements Object input Element if input Element instanceof Diff Container return Diff Container input Element get Children return null  getElements inputElement inputElement DiffContainer DiffContainer inputElement getChildren
public CVS Compare Revisions Input I File resource I Log Entry editions super new Compare Configuration this resource resource this editions editions update Current Edition initialize Actions  CVSCompareRevisionsInput IFile ILogEntry CompareConfiguration updateCurrentEdition initializeActions
public Control create Contents Composite parent Control c super create Contents parent c set Layout Data new Grid Data Grid Data FILL BOTH return c  createContents createContents setLayoutData GridData GridData FILL_BOTH
mm add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mm mm add get Contents Action mm add get Revision Action  addMenuListener IMenuListener menuAboutToShow IMenuManager getContentsAction getRevisionAction
viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Selection selection event get Selection if selection instanceof I Structured Selection get Revision Action set Enabled false get Contents Action set Enabled false return I Structured Selection ss I Structured Selection selection get Revision Action set Enabled ss size 1 get Contents Action set Enabled ss size 1  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection IStructuredSelection getRevisionAction setEnabled getContentsAction setEnabled IStructuredSelection IStructuredSelection getRevisionAction setEnabled getContentsAction setEnabled
public Viewer create Diff Viewer Composite parent this shell parent get Shell viewer get History Table Provider create Table parent Table table viewer get Table table set Data CompareUI COMPARE VIEWER TITLE get Title NON NLS 1 viewer set Content Provider new Version Compare Content Provider Menu Manager mm new Menu Manager mm set Remove All When Shown true mm add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mm mm add get Contents Action mm add get Revision Action table set Menu mm create Context Menu table viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Selection selection event get Selection if selection instanceof I Structured Selection get Revision Action set Enabled false get Contents Action set Enabled false return I Structured Selection ss I Structured Selection selection get Revision Action set Enabled ss size 1 get Contents Action set Enabled ss size 1 Add F1 help Workbench Help set Help table I Help Context Ids COMPARE REVISIONS VIEW return viewer  createDiffViewer getShell getHistoryTableProvider createTable getTable setData COMPARE_VIEWER_TITLE getTitle setContentProvider VersionCompareContentProvider MenuManager MenuManager setRemoveAllWhenShown addMenuListener IMenuListener menuAboutToShow IMenuManager getContentsAction getRevisionAction setMenu createContextMenu addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection IStructuredSelection getRevisionAction setEnabled getContentsAction setEnabled IStructuredSelection IStructuredSelection getRevisionAction setEnabled getContentsAction setEnabled WorkbenchHelp setHelp IHelpContextIds COMPARE_REVISIONS_VIEW
private void init Labels Compare Configuration cc get Compare Configuration cc set Left Editable true cc set Right Editable false String resource Name resource get Name String left Label Policy bind CVS Compare Revisions Input workspace new Object resource Name NON NLS 1 cc set Left Label left Label String right Label Policy bind CVS Compare Revisions Input repository new Object resource Name NON NLS 1 cc set Right Label right Label  initLabels CompareConfiguration getCompareConfiguration setLeftEditable setRightEditable resourceName getName leftLabel CVSCompareRevisionsInput resourceName setLeftLabel leftLabel rightLabel CVSCompareRevisionsInput resourceName setRightLabel rightLabel
new Progress Monitor Dialog shell run false true new Workspace Modify Operation null protected void execute I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception I Structured Selection selection I Structured Selection viewer get Selection if selection size 1 return Version Compare Diff Node node Version Compare Diff Node selection get First Element Resource Edition Node right Resource Edition Node node get Right ICVS Remote Resource edition right get Remote Resource Do the load This just consists of setting the local contents We don t actually want to change the base try CVS Tag revision Tag new CVS Tag ICVS Remote File edition get Revision CVS Tag VERSION if CVS Action check For Mixing Tags shell new I Resource resource revision Tag new Update Operation null new I Resource resource new Command Local Option Update IGNORE LOCAL CHANGES revision Tag run monitor get History Table Provider set File ICVS File edition catch Team Exception e throw new Invocation Target Exception e  ProgressMonitorDialog WorkspaceModifyOperation IProgressMonitor InvocationTargetException InterruptedException IStructuredSelection IStructuredSelection getSelection VersionCompareDiffNode VersionCompareDiffNode getFirstElement ResourceEditionNode ResourceEditionNode getRight ICVSRemoteResource getRemoteResource CVSTag revisionTag CVSTag ICVSRemoteFile getRevision CVSTag CVSAction checkForMixingTags IResource revisionTag UpdateOperation IResource LocalOption IGNORE_LOCAL_CHANGES revisionTag getHistoryTableProvider setFile ICVSFile TeamException InvocationTargetException
get Revision Action new Action Policy bind History View get Revision Action null NON NLS 1 public void run try new Progress Monitor Dialog shell run false true new Workspace Modify Operation null protected void execute I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception I Structured Selection selection I Structured Selection viewer get Selection if selection size 1 return Version Compare Diff Node node Version Compare Diff Node selection get First Element Resource Edition Node right Resource Edition Node node get Right ICVS Remote Resource edition right get Remote Resource Do the load This just consists of setting the local contents We don t actually want to change the base try CVS Tag revision Tag new CVS Tag ICVS Remote File edition get Revision CVS Tag VERSION if CVS Action check For Mixing Tags shell new I Resource resource revision Tag new Update Operation null new I Resource resource new Command Local Option Update IGNORE LOCAL CHANGES revision Tag run monitor get History Table Provider set File ICVS File edition catch Team Exception e throw new Invocation Target Exception e catch Interrupted Exception e Do nothing return catch Invocation Target Exception e handle e fire change I Structured Selection selection I Structured Selection viewer get Selection if selection size 1 return Version Compare Diff Node node Version Compare Diff Node selection get First Element Typed Buffered Content left Typed Buffered Content node get Left left fire Change recompute the labels on the viewer viewer refresh  getRevisionAction HistoryView getRevisionAction ProgressMonitorDialog WorkspaceModifyOperation IProgressMonitor InvocationTargetException InterruptedException IStructuredSelection IStructuredSelection getSelection VersionCompareDiffNode VersionCompareDiffNode getFirstElement ResourceEditionNode ResourceEditionNode getRight ICVSRemoteResource getRemoteResource CVSTag revisionTag CVSTag ICVSRemoteFile getRevision CVSTag CVSAction checkForMixingTags IResource revisionTag UpdateOperation IResource LocalOption IGNORE_LOCAL_CHANGES revisionTag getHistoryTableProvider setFile ICVSFile TeamException InvocationTargetException InterruptedException InvocationTargetException IStructuredSelection IStructuredSelection getSelection VersionCompareDiffNode VersionCompareDiffNode getFirstElement TypedBufferedContent TypedBufferedContent getLeft fireChange
get Contents Action new Action Policy bind History View get Contents Action NON NLS 1 public void run try replace Local With Currently Selected Revision catch Core Exception e Utils handle e  getContentsAction HistoryView getContentsAction replaceLocalWithCurrentlySelectedRevision CoreException
private void initialize Actions get Revision Action new Action Policy bind History View get Revision Action null NON NLS 1 public void run try new Progress Monitor Dialog shell run false true new Workspace Modify Operation null protected void execute I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception I Structured Selection selection I Structured Selection viewer get Selection if selection size 1 return Version Compare Diff Node node Version Compare Diff Node selection get First Element Resource Edition Node right Resource Edition Node node get Right ICVS Remote Resource edition right get Remote Resource Do the load This just consists of setting the local contents We don t actually want to change the base try CVS Tag revision Tag new CVS Tag ICVS Remote File edition get Revision CVS Tag VERSION if CVS Action check For Mixing Tags shell new I Resource resource revision Tag new Update Operation null new I Resource resource new Command Local Option Update IGNORE LOCAL CHANGES revision Tag run monitor get History Table Provider set File ICVS File edition catch Team Exception e throw new Invocation Target Exception e catch Interrupted Exception e Do nothing return catch Invocation Target Exception e handle e fire change I Structured Selection selection I Structured Selection viewer get Selection if selection size 1 return Version Compare Diff Node node Version Compare Diff Node selection get First Element Typed Buffered Content left Typed Buffered Content node get Left left fire Change recompute the labels on the viewer viewer refresh get Contents Action new Action Policy bind History View get Contents Action NON NLS 1 public void run try replace Local With Currently Selected Revision catch Core Exception e Utils handle e  initializeActions getRevisionAction HistoryView getRevisionAction ProgressMonitorDialog WorkspaceModifyOperation IProgressMonitor InvocationTargetException InterruptedException IStructuredSelection IStructuredSelection getSelection VersionCompareDiffNode VersionCompareDiffNode getFirstElement ResourceEditionNode ResourceEditionNode getRight ICVSRemoteResource getRemoteResource CVSTag revisionTag CVSTag ICVSRemoteFile getRevision CVSTag CVSAction checkForMixingTags IResource revisionTag UpdateOperation IResource LocalOption IGNORE_LOCAL_CHANGES revisionTag getHistoryTableProvider setFile ICVSFile TeamException InvocationTargetException InterruptedException InvocationTargetException IStructuredSelection IStructuredSelection getSelection VersionCompareDiffNode VersionCompareDiffNode getFirstElement TypedBufferedContent TypedBufferedContent getLeft fireChange getContentsAction HistoryView getContentsAction replaceLocalWithCurrentlySelectedRevision CoreException
protected Object prepare Input I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception init Labels Diff Node diff Root new Diff Node Differencer NO CHANGE I Typed Element left new Typed Buffered Content resource for int i 0 i editions length i I Typed Element right new Resource Revision Node editions i diff Root add new Version Compare Diff Node left right return diff Root  prepareInput IProgressMonitor InvocationTargetException InterruptedException initLabels DiffNode diffRoot DiffNode NO_CHANGE ITypedElement TypedBufferedContent ITypedElement ResourceRevisionNode diffRoot VersionCompareDiffNode diffRoot
private void update Current Edition try get History Table Provider set File ICVS File CVS Workspace Root get Remote Resource For resource catch Team Exception e handle e  updateCurrentEdition getHistoryTableProvider setFile ICVSFile CVSWorkspaceRoot getRemoteResourceFor TeamException
private void handle Exception e set Message CVSUI Plugin open Error shell null null e CVSUI Plugin LOG NONTEAM EXCEPTIONS get Message  setMessage CVSUIPlugin openError CVSUIPlugin LOG_NONTEAM_EXCEPTIONS getMessage
Returns the history Table Provider return History Table Provider public History Table Provider get History Table Provider if history Table Provider null history Table Provider new History Table Provider return history Table Provider  historyTableProvider HistoryTableProvider HistoryTableProvider getHistoryTableProvider historyTableProvider historyTableProvider HistoryTableProvider historyTableProvider
see org eclipse compare Compare Editor Input save Changes org eclipse core runtime I Progress Monitor public void save Changes I Progress Monitor pm throws Core Exception super save Changes pm  CompareEditorInput saveChanges IProgressMonitor saveChanges IProgressMonitor CoreException saveChanges
public void replace Local With Currently Selected Revision throws Core Exception I Structured Selection selection I Structured Selection viewer get Selection if selection size 1 return Version Compare Diff Node node Version Compare Diff Node selection get First Element Resource Revision Node right Resource Revision Node node get Right Typed Buffered Content left Typed Buffered Content node get Left left set Content Utils read Bytes right get Contents  replaceLocalWithCurrentlySelectedRevision CoreException IStructuredSelection IStructuredSelection getSelection VersionCompareDiffNode VersionCompareDiffNode getFirstElement ResourceRevisionNode ResourceRevisionNode getRight TypedBufferedContent TypedBufferedContent getLeft setContent readBytes getContents
public Viewer get Viewer return viewer  getViewer
see org eclipse compare Compare Editor Input get Title public String get Title String resource Name resource get Name return Policy bind CVS Compare Revisions Input compare Resource And Versions new Object resource get Full Path to String NON NLS 1  CompareEditorInput getTitle getTitle resourceName getName CVSCompareRevisionsInput compareResourceAndVersions getFullPath toString
public void do Save I Progress Monitor monitor try save Changes monitor catch Core Exception e Utils handle e  doSave IProgressMonitor saveChanges CoreException
see org eclipse ui I Saveable Part do Save As public void do Save As noop  ISaveablePart doSaveAs doSaveAs
see org eclipse ui I Saveable Part is Dirty public boolean is Dirty return is Save Needed  ISaveablePart isDirty isDirty isSaveNeeded
see org eclipse ui I Saveable Part is Save As Allowed public boolean is Save As Allowed return true  ISaveablePart isSaveAsAllowed isSaveAsAllowed
see org eclipse ui I Saveable Part is Save On Close Needed public boolean is Save On Close Needed return true  ISaveablePart isSaveOnCloseNeeded isSaveOnCloseNeeded
see org eclipse ui I Workbench Part add Property Listener org eclipse ui I Property Listener public void add Property Listener I Property Listener listener noop  IWorkbenchPart addPropertyListener IPropertyListener addPropertyListener IPropertyListener
see org eclipse ui I Workbench Part create Part Control org eclipse swt widgets Composite public void create Part Control Composite parent create Contents parent  IWorkbenchPart createPartControl createPartControl createContents
see org eclipse ui I Workbench Part dispose public void dispose  IWorkbenchPart
see org eclipse ui I Workbench Part get Site public I Workbench Part Site get Site return null  IWorkbenchPart getSite IWorkbenchPartSite getSite
see org eclipse ui I Workbench Part get Title Tool Tip public String get Title Tool Tip return null  IWorkbenchPart getTitleToolTip getTitleToolTip
see org eclipse ui I Workbench Part remove Property Listener org eclipse ui I Property Listener public void remove Property Listener I Property Listener listener noop  IWorkbenchPart removePropertyListener IPropertyListener removePropertyListener IPropertyListener

public static void decorate I Decoration decoration String format Map bindings String Buffer prefix new String Buffer 80 String Buffer suffix new String Buffer 80 String Buffer output prefix int length format length int start 1 int end length while true if end format index Of start 1 output append format substring start 1 end if start format index Of end 1 String key format substring end 1 start String s We use the RESOURCE NAME key to determine if we are doing the prefix or suffix The name isn t actually part of either if key equals RESOURCE NAME output suffix s null else s String bindings get key if s null output append s else support for removing prefix character if binding is null int cur Length output length if cur Length 0 char c output char At cur Length 1 if c KEYWORD SEPCOLON c KEYWORD SEPAT output delete Char At cur Length 1 else output append format substring end length break else output append format substring start 1 length break if prefix length 0 decoration add Prefix prefix to String if suffix length 0 decoration add Suffix suffix to String  IDecoration StringBuffer StringBuffer StringBuffer StringBuffer StringBuffer indexOf indexOf RESOURCE_NAME RESOURCE_NAME curLength curLength charAt curLength KEYWORD_SEPCOLON KEYWORD_SEPAT deleteCharAt curLength addPrefix toString addSuffix toString
public static String bind String format Map bindings String Buffer output new String Buffer 80 int length format length int start 1 int end length while true if end format index Of start 1 output append format substring start 1 end if start format index Of end 1 String s String bindings get format substring end 1 start if s null output append s else support for removing prefix character if binding is null int cur Length output length if cur Length 0 char c output char At cur Length 1 if c KEYWORD SEPCOLON c KEYWORD SEPAT output delete Char At cur Length 1 else output append format substring end length break else output append format substring start 1 length break return output to String  StringBuffer StringBuffer indexOf indexOf curLength curLength charAt curLength KEYWORD_SEPCOLON KEYWORD_SEPAT deleteCharAt curLength toString

class Text Pair Text Pair Text t1 Text t2 this t1 t1 this t2 t2  TextPair TextPair
Constructor for CVS Decorator Preferences Page public CVS Decorator Preferences Page set Description Policy bind CVS Decorator Preferences Page description NON NLS 1  CVSDecoratorPreferencesPage CVSDecoratorPreferencesPage setDescription CVSDecoratorPreferencesPage
format set Layout Data new Grid Data Grid Data FILL HORIZONTAL format add Modify Listener new Modify Listener public void modify Text Modify Event e update Examples  setLayoutData GridData GridData FILL_HORIZONTAL addModifyListener ModifyListener modifyText ModifyEvent updateExamples
final Text format To Insert format b add Listener SWT Selection new Listener public void handle Event Event event add Variables format To Insert supported Bindings  formatToInsert addListener handleEvent addVariables formatToInsert supportedBindings
protected Text Pair create Format Editor Control Composite composite String title String button Text final Map supported Bindings create Label composite title 1 Text format new Text composite SWT BORDER format set Layout Data new Grid Data Grid Data FILL HORIZONTAL format add Modify Listener new Modify Listener public void modify Text Modify Event e update Examples Button b new Button composite SWT NONE b set Text button Text Grid Data data new Grid Data data horizontal Alignment Grid Data FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint b compute Size SWT DEFAULT SWT DEFAULT true x b set Layout Data data final Text format To Insert format b add Listener SWT Selection new Listener public void handle Event Event event add Variables format To Insert supported Bindings create Label composite Policy bind Example  1 1 NON NLS 1 Text example new Text composite SWT BORDER example set Editable false example set Layout Data new Grid Data Grid Data FILL HORIZONTAL create Label composite 1 spacer NON NLS 1 return new Text Pair format example  TextPair createFormatEditorControl buttonText supportedBindings createLabel setLayoutData GridData GridData FILL_HORIZONTAL addModifyListener ModifyListener modifyText ModifyEvent updateExamples setText buttonText GridData GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize setLayoutData formatToInsert addListener handleEvent addVariables formatToInsert supportedBindings createLabel Example__1 setEditable setLayoutData GridData GridData FILL_HORIZONTAL createLabel TextPair
protected void update Examples String example NON NLS 1 Map bindings new Hash Map try ICVS Repository Location location CVS Repository Location from String pserver username host acme org home cvsroot NON NLS 1 bindings put CVS Decorator Configuration RESOURCE TAG v2 0 NON NLS 1 bindings put CVS Decorator Configuration FILE KEYWORD Command KSUBST TEXT get Short Display Text NON NLS 1 bindings put CVS Decorator Configuration FILE REVISION 1 34 NON NLS 1 bindings put CVS Decorator Configuration DIRTY FLAG dirty Flag get Text bindings put CVS Decorator Configuration ADDED FLAG added Flag get Text bindings put CVS Decorator Configuration REMOTELOCATION HOST location get Host bindings put CVS Decorator Configuration REMOTELOCATION METHOD location get Method get Name bindings put CVS Decorator Configuration REMOTELOCATION USER location get Username bindings put CVS Decorator Configuration REMOTELOCATION ROOT location get Root Directory bindings put CVS Decorator Configuration REMOTELOCATION REPOSITORY org eclipse project1 NON NLS 1 catch CVS Exception e example e get Message bindings put CVS Decorator Configuration RESOURCE NAME file txt NON NLS 1 set Text Format Example bindings bindings remove CVS Decorator Configuration RESOURCE NAME bindings put CVS Decorator Configuration RESOURCE NAME folder NON NLS 1 set Folder Format Example bindings bindings remove CVS Decorator Configuration RESOURCE NAME bindings put CVS Decorator Configuration RESOURCE NAME Project NON NLS 1 set Project Format Example bindings  updateExamples HashMap ICVSRepositoryLocation CVSRepositoryLocation fromString CVSDecoratorConfiguration RESOURCE_TAG v2_0 CVSDecoratorConfiguration FILE_KEYWORD KSUBST_TEXT getShortDisplayText CVSDecoratorConfiguration FILE_REVISION CVSDecoratorConfiguration DIRTY_FLAG dirtyFlag getText CVSDecoratorConfiguration ADDED_FLAG addedFlag getText CVSDecoratorConfiguration REMOTELOCATION_HOST getHost CVSDecoratorConfiguration REMOTELOCATION_METHOD getMethod getName CVSDecoratorConfiguration REMOTELOCATION_USER getUsername CVSDecoratorConfiguration REMOTELOCATION_ROOT getRootDirectory CVSDecoratorConfiguration REMOTELOCATION_REPOSITORY CVSException getMessage CVSDecoratorConfiguration RESOURCE_NAME setTextFormatExample CVSDecoratorConfiguration RESOURCE_NAME CVSDecoratorConfiguration RESOURCE_NAME setFolderFormatExample CVSDecoratorConfiguration RESOURCE_NAME CVSDecoratorConfiguration RESOURCE_NAME setProjectFormatExample
see Preference Page create Contents Composite protected Control create Contents Composite parent create a tab folder for the page Tab Folder tab Folder new Tab Folder parent SWT NONE tab Folder set Layout new Tab Folder Layout tab Folder set Layout Data new Grid Data Grid Data FILL BOTH text decoration options Tab Item tab Item new Tab Item tab Folder SWT NONE tab Item set Text Policy bind Text Labels 12 NON NLS 1 tab Item set Control create Text Decorator Page tab Folder image decoration options tab Item new Tab Item tab Folder SWT NONE tab Item set Text Policy bind Icon Overlays 24 NON NLS 1 tab Item set Control create Icon Decorator Page tab Folder general decoration options tab Item new Tab Item tab Folder SWT NONE tab Item set Text Policy bind CVS Decorator Preferences Page general Tab Folder NON NLS 1 tab Item set Control create General Decorator Page tab Folder initialize Values Workbench Help set Help tab Folder I Help Context Ids DECORATORS PREFERENCE PAGE Dialog apply Dialog Font parent return tab Folder  PreferencePage createContents createContents TabFolder tabFolder TabFolder tabFolder setLayout TabFolderLayout tabFolder setLayoutData GridData GridData FILL_BOTH TabItem tabItem TabItem tabFolder tabItem setText Text_Labels_12 tabItem setControl createTextDecoratorPage tabFolder tabItem TabItem tabFolder tabItem setText Icon_Overlays_24 tabItem setControl createIconDecoratorPage tabFolder tabItem TabItem tabFolder tabItem setText CVSDecoratorPreferencesPage generalTabFolder tabItem setControl createGeneralDecoratorPage tabFolder initializeValues WorkbenchHelp setHelp tabFolder IHelpContextIds DECORATORS_PREFERENCE_PAGE applyDialogFont tabFolder
dirty Flag set Layout Data new Grid Data Grid Data FILL HORIZONTAL dirty Flag add Modify Listener new Modify Listener public void modify Text Modify Event e update Examples  dirtyFlag setLayoutData GridData GridData FILL_HORIZONTAL dirtyFlag addModifyListener ModifyListener modifyText ModifyEvent updateExamples
added Flag set Layout Data new Grid Data Grid Data FILL HORIZONTAL added Flag add Modify Listener new Modify Listener public void modify Text Modify Event e update Examples  addedFlag setLayoutData GridData GridData FILL_HORIZONTAL addedFlag addModifyListener ModifyListener modifyText ModifyEvent updateExamples
private Control create Text Decorator Page Composite parent Composite file Text Group new Composite parent SWT NULL Grid Layoutlayout new Grid Layout layout num Columns 3 file Text Group set Layout layout Grid Data data new Grid Data data horizontal Alignment Grid Data FILL file Text Group set Layout Data data create Label file Text Group Policy bind Select the format for file  folders  and project text labels  13 3 NON NLS 1 Text Pair format create Format Editor Control file Text Group Policy bind File Format  14 Policy bind Add  Variables 15 get File Binding Descriptions NON NLS 1 NON NLS 2 file Text Format format t1 file Text Format Example format t2 format create Format Editor Control file Text Group Policy bind F older Format  16 Policy bind Add Varia bles 17 get Folder Binding Descriptions NON NLS 1 NON NLS 2 folder Text Format format t1 folder Text Format Example format t2 format create Format Editor Control file Text Group Policy bind Project Format  18 Policy bind Add Variable s 19 get Folder Binding Descriptions NON NLS 1 NON NLS 2 project Text Format format t1 project Text Format Example format t2 create Label file Text Group Policy bind Label decoration for outgoing  20 1 NON NLS 1 dirty Flag new Text file Text Group SWT BORDER dirty Flag set Layout Data new Grid Data Grid Data FILL HORIZONTAL dirty Flag add Modify Listener new Modify Listener public void modify Text Modify Event e update Examples create Label file Text Group 1 spacer NON NLS 1 create Label file Text Group Policy bind Label decorat ion for added  22 1 NON NLS 1 added Flag new Text file Text Group SWT BORDER added Flag set Layout Data new Grid Data Grid Data FILL HORIZONTAL added Flag add Modify Listener new Modify Listener public void modify Text Modify Event e update Examples return file Text Group  createTextDecoratorPage fileTextGroup GridLayoutlayout GridLayout numColumns fileTextGroup setLayout GridData GridData horizontalAlignment GridData fileTextGroup setLayoutData createLabel fileTextGroup Select_the_format_for_file _folders _and_project_text_labels__13 TextPair createFormatEditorControl fileTextGroup File_Format__14 Add_ Variables_15 getFileBindingDescriptions fileTextFormat fileTextFormatExample createFormatEditorControl fileTextGroup older_Format__16 Add_Varia bles_17 getFolderBindingDescriptions folderTextFormat folderTextFormatExample createFormatEditorControl fileTextGroup Project_Format__18 Add_Variable s_19 getFolderBindingDescriptions projectTextFormat projectTextFormatExample createLabel fileTextGroup Label_decoration_for_outgoing__20 dirtyFlag fileTextGroup dirtyFlag setLayoutData GridData GridData FILL_HORIZONTAL dirtyFlag addModifyListener ModifyListener modifyText ModifyEvent updateExamples createLabel fileTextGroup createLabel fileTextGroup Label_decorat ion_for_added__22 addedFlag fileTextGroup addedFlag setLayoutData GridData GridData FILL_HORIZONTAL addedFlag addModifyListener ModifyListener modifyText ModifyEvent updateExamples fileTextGroup
private Control create Icon Decorator Page Composite parent Composite image Group new Composite parent SWT NULL Grid Layout layout new Grid Layout image Group set Layout layout Grid Data data new Grid Data data horizontal Alignment Grid Data FILL image Group set Layout Data data create Label image Group Policy bind CVS Decorator Preferences Page icon Description 1 NON NLS 1 image Show Dirty create Check Box image Group Policy bind Sho w outgoing 25 NON NLS 1 image Show Has Remote create Check Box image Group Policy bind Show has  remote 26 NON NLS 1 image Show Added create Check Box image Group Policy bind S how is added 27 NON NLS 1 image Show New Resource create Check Box image Group Policy bind CVS Decorator Preferences Page new Resources NON NLS 1 return image Group  createIconDecoratorPage imageGroup GridLayout GridLayout imageGroup setLayout GridData GridData horizontalAlignment GridData imageGroup setLayoutData createLabel imageGroup CVSDecoratorPreferencesPage iconDescription imageShowDirty createCheckBox imageGroup w_outgoing_25 imageShowHasRemote createCheckBox imageGroup Show_has_ remote_26 imageShowAdded createCheckBox imageGroup how_is_added_27 imageShowNewResource createCheckBox imageGroup CVSDecoratorPreferencesPage newResources imageGroup
private Control create General Decorator Page Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout composite set Layout layout Grid Data data new Grid Data data horizontal Alignment Grid Data FILL composite set Layout Data data create Label composite Policy bind CVS Decorator Preferences Page general Description 1 NON NLS 1 show Dirty create Check Box composite Policy bind Compute deep outgoing state for folders  disabling this will improve decorator performance  28 NON NLS 1 return composite  createGeneralDecoratorPage GridLayout GridLayout setLayout GridData GridData horizontalAlignment GridData setLayoutData createLabel CVSDecoratorPreferencesPage generalDescription showDirty createCheckBox Compute_deep_outgoing_state_for_folders_ disabling_this_will_improve_decorator_performance _28
private Label create Label Composite parent String text int span Label label new Label parent SWT LEFT label set Text text Grid Data data new Grid Data data horizontal Span span data horizontal Alignment Grid Data FILL label set Layout Data data return label  createLabel setText GridData GridData horizontalSpan horizontalAlignment GridData setLayoutData
private Button create Check Box Composite group String label Button button new Button group SWT CHECK button set Text label return button  createCheckBox setText
protected void set Text Format Example Map bindings String example CVS Decorator Configuration bind file Text Format get Text bindings file Text Format Example set Text example  setTextFormatExample CVSDecoratorConfiguration fileTextFormat getText fileTextFormatExample setText
protected void set Folder Format Example Map bindings String example CVS Decorator Configuration bind folder Text Format get Text bindings folder Text Format Example set Text example  setFolderFormatExample CVSDecoratorConfiguration folderTextFormat getText folderTextFormatExample setText
protected void set Project Format Example Map bindings String example CVS Decorator Configuration bind project Text Format get Text bindings project Text Format Example set Text example  setProjectFormatExample CVSDecoratorConfiguration projectTextFormat getText projectTextFormatExample setText
Initializes states of the controls from the preference store private void initialize Values I Preference Store store get Preference Store file Text Format set Text store get String ICVSUI Constants PREF FILETEXT DECORATION folder Text Format set Text store get String ICVSUI Constants PREF FOLDERTEXT DECORATION project Text Format set Text store get String ICVSUI Constants PREF PROJECTTEXT DECORATION added Flag set Text store get String ICVSUI Constants PREF ADDED FLAG dirty Flag set Text store get String ICVSUI Constants PREF DIRTY FLAG image Show Dirty set Selection store get Boolean ICVSUI Constants PREF SHOW DIRTY DECORATION image Show Added set Selection store get Boolean ICVSUI Constants PREF SHOW ADDED DECORATION image Show Has Remote set Selection store get Boolean ICVSUI Constants PREF SHOW HASREMOTE DECORATION image Show New Resource set Selection store get Boolean ICVSUI Constants PREF SHOW NEWRESOURCE DECORATION show Dirty set Selection store get Boolean ICVSUI Constants PREF CALCULATE DIRTY set Valid true  initializeValues IPreferenceStore getPreferenceStore fileTextFormat setText getString ICVSUIConstants PREF_FILETEXT_DECORATION folderTextFormat setText getString ICVSUIConstants PREF_FOLDERTEXT_DECORATION projectTextFormat setText getString ICVSUIConstants PREF_PROJECTTEXT_DECORATION addedFlag setText getString ICVSUIConstants PREF_ADDED_FLAG dirtyFlag setText getString ICVSUIConstants PREF_DIRTY_FLAG imageShowDirty setSelection getBoolean ICVSUIConstants PREF_SHOW_DIRTY_DECORATION imageShowAdded setSelection getBoolean ICVSUIConstants PREF_SHOW_ADDED_DECORATION imageShowHasRemote setSelection getBoolean ICVSUIConstants PREF_SHOW_HASREMOTE_DECORATION imageShowNewResource setSelection getBoolean ICVSUIConstants PREF_SHOW_NEWRESOURCE_DECORATION showDirty setSelection getBoolean ICVSUIConstants PREF_CALCULATE_DIRTY setValid
see I Workbench Preference Page init I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
OK was clicked Store the CVS preferences return whether it is okay to close the preference page public boolean perform Ok I Preference Store store get Preference Store store set Value ICVSUI Constants PREF FILETEXT DECORATION file Text Format get Text store set Value ICVSUI Constants PREF FOLDERTEXT DECORATION folder Text Format get Text store set Value ICVSUI Constants PREF PROJECTTEXT DECORATION project Text Format get Text store set Value ICVSUI Constants PREF ADDED FLAG added Flag get Text store set Value ICVSUI Constants PREF DIRTY FLAG dirty Flag get Text store set Value ICVSUI Constants PREF SHOW DIRTY DECORATION image Show Dirty get Selection store set Value ICVSUI Constants PREF SHOW ADDED DECORATION image Show Added get Selection store set Value ICVSUI Constants PREF SHOW HASREMOTE DECORATION image Show Has Remote get Selection store set Value ICVSUI Constants PREF SHOW NEWRESOURCE DECORATION image Show New Resource get Selection store set Value ICVSUI Constants PREF CALCULATE DIRTY show Dirty get Selection CVSUI Plugin broadcast Property Change new Property Change Event this CVSUI Plugin P DECORATORS CHANGED null null CVSUI Plugin get Plugin save Plugin Preferences return true  performOk IPreferenceStore getPreferenceStore setValue ICVSUIConstants PREF_FILETEXT_DECORATION fileTextFormat getText setValue ICVSUIConstants PREF_FOLDERTEXT_DECORATION folderTextFormat getText setValue ICVSUIConstants PREF_PROJECTTEXT_DECORATION projectTextFormat getText setValue ICVSUIConstants PREF_ADDED_FLAG addedFlag getText setValue ICVSUIConstants PREF_DIRTY_FLAG dirtyFlag getText setValue ICVSUIConstants PREF_SHOW_DIRTY_DECORATION imageShowDirty getSelection setValue ICVSUIConstants PREF_SHOW_ADDED_DECORATION imageShowAdded getSelection setValue ICVSUIConstants PREF_SHOW_HASREMOTE_DECORATION imageShowHasRemote getSelection setValue ICVSUIConstants PREF_SHOW_NEWRESOURCE_DECORATION imageShowNewResource getSelection setValue ICVSUIConstants PREF_CALCULATE_DIRTY showDirty getSelection CVSUIPlugin broadcastPropertyChange PropertyChangeEvent CVSUIPlugin P_DECORATORS_CHANGED CVSUIPlugin getPlugin savePluginPreferences
Defaults was clicked Restore the CVS preferences to their default values protected void perform Defaults super perform Defaults I Preference Store store get Preference Store file Text Format set Text store get Default String ICVSUI Constants PREF FILETEXT DECORATION folder Text Format set Text store get Default String ICVSUI Constants PREF FOLDERTEXT DECORATION project Text Format set Text store get Default String ICVSUI Constants PREF PROJECTTEXT DECORATION added Flag set Text store get Default String ICVSUI Constants PREF ADDED FLAG dirty Flag set Text store get Default String ICVSUI Constants PREF DIRTY FLAG image Show Dirty set Selection store get Default Boolean ICVSUI Constants PREF SHOW DIRTY DECORATION image Show Added set Selection store get Default Boolean ICVSUI Constants PREF SHOW ADDED DECORATION image Show Has Remote set Selection store get Default Boolean ICVSUI Constants PREF SHOW HASREMOTE DECORATION image Show New Resource set Selection store get Default Boolean ICVSUI Constants PREF SHOW NEWRESOURCE DECORATION show Dirty set Selection store get Default Boolean ICVSUI Constants PREF CALCULATE DIRTY  performDefaults performDefaults IPreferenceStore getPreferenceStore fileTextFormat setText getDefaultString ICVSUIConstants PREF_FILETEXT_DECORATION folderTextFormat setText getDefaultString ICVSUIConstants PREF_FOLDERTEXT_DECORATION projectTextFormat setText getDefaultString ICVSUIConstants PREF_PROJECTTEXT_DECORATION addedFlag setText getDefaultString ICVSUIConstants PREF_ADDED_FLAG dirtyFlag setText getDefaultString ICVSUIConstants PREF_DIRTY_FLAG imageShowDirty setSelection getDefaultBoolean ICVSUIConstants PREF_SHOW_DIRTY_DECORATION imageShowAdded setSelection getDefaultBoolean ICVSUIConstants PREF_SHOW_ADDED_DECORATION imageShowHasRemote setSelection getDefaultBoolean ICVSUIConstants PREF_SHOW_HASREMOTE_DECORATION imageShowNewResource setSelection getDefaultBoolean ICVSUIConstants PREF_SHOW_NEWRESOURCE_DECORATION showDirty setSelection getDefaultBoolean ICVSUIConstants PREF_CALCULATE_DIRTY
Returns preference store that belongs to the our plugin This is important because we want to store our preferences separately from the desktop return the preference store for this plugin protected I Preference Store do Get Preference Store return CVSUI Plugin get Plugin get Preference Store  IPreferenceStore doGetPreferenceStore CVSUIPlugin getPlugin getPreferenceStore
I Label Provider label Provider new Label Provider public String get Text Object element return String Pair element s1 String Pair element s2 NON NLS 1  ILabelProvider labelProvider LabelProvider getText StringPair StringPair
I Structured Content Provider contents Provider new I Structured Content Provider public Object get Elements Object input Element return Object variables to Array new String Pair variables size  IStructuredContentProvider contentsProvider IStructuredContentProvider getElements inputElement toArray StringPair
return Object variables to Array new String Pair variables size public void dispose  toArray StringPair
public void dispose public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
Add another project to the list at the end private void add Variables Text target Map bindings final List variables new Array List bindings size I Label Provider label Provider new Label Provider public String get Text Object element return String Pair element s1 String Pair element s2 NON NLS 1 I Structured Content Provider contents Provider new I Structured Content Provider public Object get Elements Object input Element return Object variables to Array new String Pair variables size public void dispose public void input Changed Viewer viewer Object old Input Object new Input for Iterator it bindings key Set iterator it has Next String Pair variable new String Pair variable s1 String it next variable variable s2 String bindings get variable s1 description variables add variable List Selection Dialog dialog new List Selection Dialog this get Shell this contents Provider label Provider Policy bind Select the  variables to add to the decoration format  30 NON NLS 1 dialog set Title Policy bind Add Variables 31 NON NLS 1 if dialog open List Selection Dialog OK return Object result dialog get Result for int i 0 i result length i target insert String Pair result i s1 NON NLS 1 NON NLS 2  addVariables ArrayList ILabelProvider labelProvider LabelProvider getText StringPair StringPair IStructuredContentProvider contentsProvider IStructuredContentProvider getElements inputElement toArray StringPair inputChanged oldInput newInput keySet hasNext StringPair StringPair ListSelectionDialog ListSelectionDialog getShell contentsProvider labelProvider Select_the_ variables_to_add_to_the_decoration_format__30 setTitle Add_Variables_31 ListSelectionDialog getResult StringPair
private Map get Folder Binding Descriptions Map bindings new Hash Map bindings put CVS Decorator Configuration RESOURCE NAME Policy bind name of the resource being decorated 34 NON NLS 1 bindings put CVS Decorator Configuration RESOURCE TAG Policy bind the tag applied to the resource  version  branch  or date  35 NON NLS 1 bindings put CVS Decorator Configuration REMOTELOCATION HOST Policy bind the repository location  s hostname 36 NON NLS 1 bindings put CVS Decorator Configuration REMOTELOCATION METHOD Policy bind the connection method  e g  pserver  ssh  37 NON NLS 1 bindings put CVS Decorator Configuration REMOTELOCATION USER Policy bind user name for the connection 38 NON NLS 1 bindings put CVS Decorator Configuration REMOTELOCATION ROOT Policy bind repository home directory on server 39 NON NLS 1 bindings put CVS Decorator Configuration REMOTELOCATION REPOSITORY Policy bind root relative directory 40 NON NLS 1 bindings put CVS Decorator Configuration DIRTY FLAG Policy bind flag indicating that the folder has a child resource with outgoing changes 41 NON NLS 1 return bindings  getFolderBindingDescriptions HashMap CVSDecoratorConfiguration RESOURCE_NAME name_of_the_resource_being_decorated_34 CVSDecoratorConfiguration RESOURCE_TAG the_tag_applied_to_the_resource_ _branch _or_date _35 CVSDecoratorConfiguration REMOTELOCATION_HOST the_repository_location__s_hostname_36 CVSDecoratorConfiguration REMOTELOCATION_METHOD the_connection_method_ _pserver _ssh _37 CVSDecoratorConfiguration REMOTELOCATION_USER user_name_for_the_connection_38 CVSDecoratorConfiguration REMOTELOCATION_ROOT repository_home_directory_on_server_39 CVSDecoratorConfiguration REMOTELOCATION_REPOSITORY root_relative_directory_40 CVSDecoratorConfiguration DIRTY_FLAG flag_indicating_that_the_folder_has_a_child_resource_with_outgoing_changes_41
private Map get File Binding Descriptions Map bindings new Hash Map bindings put CVS Decorator Configuration RESOURCE NAME Policy bind name of the resource being decorated 42 NON NLS 1 bindings put CVS Decorator Configuration RESOURCE TAG Policy bind the tag applied to the resource 43 NON NLS 1 bindings put CVS Decorator Configuration FILE KEYWORD Policy bind keyword substitution rule for the resource 44 NON NLS 1 bindings put CVS Decorator Configuration FILE REVISION Policy bind last revision loaded into workspace 45 NON NLS 1 bindings put CVS Decorator Configuration DIRTY FLAG Policy bind flag indicating that the file has outgoing changes 46 NON NLS 1 bindings put CVS Decorator Configuration ADDED FLAG Policy bind flag indicating that the file has been added to the server 47 NON NLS 1 return bindings  getFileBindingDescriptions HashMap CVSDecoratorConfiguration RESOURCE_NAME name_of_the_resource_being_decorated_42 CVSDecoratorConfiguration RESOURCE_TAG the_tag_applied_to_the_resource_43 CVSDecoratorConfiguration FILE_KEYWORD keyword_substitution_rule_for_the_resource_44 CVSDecoratorConfiguration FILE_REVISION last_revision_loaded_into_workspace_45 CVSDecoratorConfiguration DIRTY_FLAG flag_indicating_that_the_file_has_outgoing_changes_46 CVSDecoratorConfiguration ADDED_FLAG flag_indicating_that_the_file_has_been_added_to_the_server_47

public abstract class CVS Field Editor Preference Page extends Field Editor Preference Page implements I Workbench Preference Page public static I Preference Store getCVS Preference Store return CVSUI Plugin get Plugin get Preference Store  CVSFieldEditorPreferencePage FieldEditorPreferencePage IWorkbenchPreferencePage IPreferenceStore getCVSPreferenceStore CVSUIPlugin getPlugin getPreferenceStore
Constructor for CVS Field Editor Preference Page public CVS Field Editor Preference Page super GRID set Preference Store getCVS Preference Store String description get Page Description if description null set Description description  CVSFieldEditorPreferencePage CVSFieldEditorPreferencePage setPreferenceStore getCVSPreferenceStore getPageDescription setDescription
see org eclipse jface preference Preference Page create Contents org eclipse swt widgets Composite protected Control create Contents Composite parent Control control super create Contents parent String id get Page Help Context Id if id null Workbench Help set Help control id Dialog apply Dialog Font control return control  PreferencePage createContents createContents createContents getPageHelpContextId WorkbenchHelp setHelp applyDialogFont
see org eclipse ui I Workbench Preference Page init org eclipse ui I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
Method get Page Help Context Id must be overridden by subclasses to provide the help context ID of the page Return null for no page F1 help return String  getPageHelpContextId
Method get Page Description must be overridden by subclasses to provide the description of the page Return null for no description return String  getPageDescription

protected Control create Contents Composite parent initialize no Default And Apply Button Composite composite new Composite parent SWT NULL composite set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout try ICVS File cvs Resource CVS Workspace Root getCVS File For file if cvs Resource is Managed if cvs Resource is Ignored create Label composite Policy bind CVS File Properties Page ignored NON NLS 1 else create Label composite Policy bind CVS File Properties Page not Managed NON NLS 1 create Label composite NON NLS 1 return composite Resource Sync Info sync Info cvs Resource get Sync Info if sync Info is Added create Label composite Policy bind CVS File Properties Page is Added 2 NON NLS 1 else Base create Label composite Policy bind CVS File Properties Page base Revision NON NLS 1 create Label composite sync Info get Revision Date base Time sync Info get Time Stamp if base Time null create Label composite Policy bind CVS File Properties Page base Timestamp NON NLS 1 create Label composite Date Format get Date Time Instance Date Format FULL Date Format FULL format sync Info get Time Stamp Modified create Label composite Policy bind CVS File Properties Page modified NON NLS 1 create Label composite cvs Resource is Modified null Policy bind yes Policy bind no NON NLS 1 NON NLS 2 Keyword Mode create Label composite Policy bind CVS File Properties Page keyword Mode NON NLS 1 create Label composite sync Info get Keyword Mode get Long Display Text Tag create Label composite Policy bind CVS File Properties Page tag NON NLS 1 CVS Tag tag Util get Accurate File Tag cvs Resource create Label composite get Tag Label tag Permissions create Label composite Policy bind CVS File Properties Page permissions NON NLS 1 String permissions sync Info get Permissions if permissions null create Label composite Policy bind CVS File Properties Page not Available NON NLS 1 else create Label composite sync Info get Permissions catch Team Exception e Display error text create Label composite Policy bind CVS File Properties Page error NON NLS 1 create Label composite NON NLS 1 Workbench Help set Help get Control I Help Context Ids FILE PROPERTY PAGE Dialog apply Dialog Font parent return composite  createContents noDefaultAndApplyButton setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout numColumns setLayout ICVSFile cvsResource CVSWorkspaceRoot getCVSFileFor cvsResource isManaged cvsResource isIgnored createLabel CVSFilePropertiesPage createLabel CVSFilePropertiesPage notManaged createLabel ResourceSyncInfo syncInfo cvsResource getSyncInfo syncInfo isAdded createLabel CVSFilePropertiesPage isAdded createLabel CVSFilePropertiesPage baseRevision createLabel syncInfo getRevision baseTime syncInfo getTimeStamp baseTime createLabel CVSFilePropertiesPage baseTimestamp createLabel DateFormat getDateTimeInstance DateFormat DateFormat syncInfo getTimeStamp createLabel CVSFilePropertiesPage createLabel cvsResource isModified createLabel CVSFilePropertiesPage keywordMode createLabel syncInfo getKeywordMode getLongDisplayText createLabel CVSFilePropertiesPage CVSTag getAccurateFileTag cvsResource createLabel getTagLabel createLabel CVSFilePropertiesPage syncInfo getPermissions createLabel CVSFilePropertiesPage notAvailable createLabel syncInfo getPermissions TeamException createLabel CVSFilePropertiesPage createLabel WorkbenchHelp setHelp getControl IHelpContextIds FILE_PROPERTY_PAGE applyDialogFont
Utility method that creates a label instance and sets the default layout data param parent the parent for the new label param text the text for the new label return the new label protected Label create Label Composite parent String text int span Label label new Label parent SWT LEFT label set Text text Grid Data data new Grid Data data horizontal Span span data horizontal Alignment Grid Data FILL label set Layout Data data return label  createLabel setText GridData GridData horizontalSpan horizontalAlignment GridData setLayoutData
return label protected Label create Label Composite parent String text return create Label parent text 1  createLabel createLabel
Initializes the page private void initialize Get the file that is the source of this property page file null I Adaptable element get Element if element instanceof I File file I File element else Object adapter element get Adapter I File class if adapter instanceof I File file I File adapter  IAdaptable getElement IFile IFile getAdapter IFile IFile IFile

disconnect add Listener SWT Selection new Listener public void handle Event Event event perform a disconnect if disconnect Folder root set Text Policy bind CVS File Properties Page none NON NLS 1 repository set Text Policy bind CVS File Properties Page none NON NLS 1 disconnect set Enabled false  addListener handleEvent disconnectFolder setText CVSFilePropertiesPage setText CVSFilePropertiesPage setEnabled
see Preference Page create Contents Composite protected Control create Contents Composite parent initialize no Default And Apply Button Composite composite new Composite parent SWT NULL composite set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout try ICVS Folder cvs Resource CVS Workspace Root getCVS Folder For folder if cvs Resource is Managed if cvs Resource is Ignored create Label composite Policy bind CVS Folder Properties Page ignored 2 NON NLS 1 else create Label composite Policy bind CVS Folder Properties Page not Managed 2 NON NLS 1 else if cvs Resource isCVS Folder We have a managed folder which is not a cvs folder This is really an invalid state but it does happen once in a while create Label composite Policy bind CVS Folder Properties Page notCVS Folder 2 NON NLS 1 else Folder Sync Info sync Info cvs Resource get Folder Sync Info create Label composite Policy bind CVS Folder Properties Page root NON NLS 1 root create Label composite sync Info get Root create Label composite Policy bind CVS Folder Properties Page repository NON NLS 1 repository create Label composite sync Info get Repository Tag create Label composite Policy bind CVS File Properties Page tag NON NLS 1 CVS Tag tag sync Info get Tag if tag null tag get Type CVS Tag BRANCH tag Util get Accurate Folder Tag folder tag create Label composite get Tag Label tag Static ness if sync Info get Is Static create Label composite Policy bind CVS Folder Properties Page static NON NLS 1 create Label composite sync Info get Is Static Policy bind yes Policy bind no NON NLS 1 NON NLS 2 create Label composite 2 spacer NON NLS 1 Allow the folder to be disconnected from CVS control final Button disconnect new Button composite SWT NONE disconnect set Text Policy bind CVS Folder Properties Page disconnect NON NLS 1 Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN END data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint disconnect compute Size SWT DEFAULT SWT DEFAULT true x disconnect set Layout Data data disconnect add Listener SWT Selection new Listener public void handle Event Event event perform a disconnect if disconnect Folder root set Text Policy bind CVS File Properties Page none NON NLS 1 repository set Text Policy bind CVS File Properties Page none NON NLS 1 disconnect set Enabled false catch Team Exception e Display error text create Label composite Policy bind CVS File Properties Page error 2 NON NLS 1 Workbench Help set Help get Control I Help Context Ids FOLDER PROPERTY PAGE Dialog apply Dialog Font parent return composite  PreferencePage createContents createContents noDefaultAndApplyButton setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout numColumns setLayout ICVSFolder cvsResource CVSWorkspaceRoot getCVSFolderFor cvsResource isManaged cvsResource isIgnored createLabel CVSFolderPropertiesPage createLabel CVSFolderPropertiesPage notManaged cvsResource isCVSFolder createLabel CVSFolderPropertiesPage notCVSFolder FolderSyncInfo syncInfo cvsResource getFolderSyncInfo createLabel CVSFolderPropertiesPage createLabel syncInfo getRoot createLabel CVSFolderPropertiesPage createLabel syncInfo getRepository createLabel CVSFilePropertiesPage CVSTag syncInfo getTag getType CVSTag getAccurateFolderTag createLabel getTagLabel syncInfo getIsStatic createLabel CVSFolderPropertiesPage createLabel syncInfo getIsStatic createLabel setText CVSFolderPropertiesPage GridData GridData GridData HORIZONTAL_ALIGN_END heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize setLayoutData addListener handleEvent disconnectFolder setText CVSFilePropertiesPage setText CVSFilePropertiesPage setEnabled TeamException createLabel CVSFilePropertiesPage WorkbenchHelp setHelp getControl IHelpContextIds FOLDER_PROPERTY_PAGE applyDialogFont
Utility method that creates a label instance and sets the default layout data param parent the parent for the new label param text the text for the new label return the new label protected Label create Label Composite parent String text int span Label label new Label parent SWT LEFT label set Text text Grid Data data new Grid Data data horizontal Span span data horizontal Alignment Grid Data FILL label set Layout Data data return label  createLabel setText GridData GridData horizontalSpan horizontalAlignment GridData setLayoutData
protected Label create Label Composite parent String text return create Label parent text 1  createLabel createLabel
Initializes the page private void initialize Get the file that is the source of this property page folder null I Adaptable element get Element if element instanceof I Folder folder I Folder element else Object adapter element get Adapter I Folder class if adapter instanceof I Folder folder I Folder adapter  IAdaptable getElement IFolder IFolder getAdapter IFolder IFolder IFolder
PlatformUI get Workbench get Progress Service run true false new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try cvs Folder unmanage null catch CVS Exception e throw new Invocation Target Exception e  getWorkbench getProgressService IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException cvsFolder CVSException InvocationTargetException
private boolean disconnect Folder if Message Dialog open Question get Shell Policy bind CVS Folder Properties Page disconnect Title Policy bind CVS Folder Properties Page disconnect Question NON NLS 1 NON NLS 2 final ICVS Folder cvs Folder CVS Workspace Root getCVS Folder For folder try PlatformUI get Workbench get Progress Service run true false new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try cvs Folder unmanage null catch CVS Exception e throw new Invocation Target Exception e catch Invocation Target Exception e CVSUI Plugin open Error get Shell null null e return false catch Interrupted Exception e Ignore return true else return false  disconnectFolder MessageDialog openQuestion getShell CVSFolderPropertiesPage disconnectTitle CVSFolderPropertiesPage disconnectQuestion ICVSFolder cvsFolder CVSWorkspaceRoot getCVSFolderFor getWorkbench getProgressService IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException cvsFolder CVSException InvocationTargetException InvocationTargetException CVSUIPlugin openError getShell InterruptedException

Image Descriptor descriptor Image Data data public Cached Image Descriptor Image Descriptor descriptor Assert is Not Null descriptor this descriptor descriptor  ImageDescriptor ImageData CachedImageDescriptor ImageDescriptor isNotNull
public Image Data get Image Data if data null data descriptor get Image Data return data  ImageData getImageData getImageData
see org eclipse jface viewers I Decoration add Prefix java lang String public void add Prefix String prefix this prefix prefix  IDecoration addPrefix addPrefix
see org eclipse jface viewers I Decoration add Suffix java lang String public void add Suffix String suffix this suffix suffix  IDecoration addSuffix addSuffix
see org eclipse jface viewers I Decoration add Overlay org eclipse jface resource Image Descriptor public void add Overlay Image Descriptor overlay this overlay overlay  IDecoration addOverlay ImageDescriptor addOverlay ImageDescriptor
non Javadoc see org eclipse jface viewers I Decoration add Overlay org eclipse jface resource Image Descriptor int public void add Overlay Image Descriptor overlay int quadrant  IDecoration addOverlay ImageDescriptor addOverlay ImageDescriptor
public CVS Lightweight Decorator Resource State Change Listeners get Listener add Resource State Change Listener this TeamUI add Property Change Listener this CVSUI Plugin add Property Change Listener this CVS Provider Plugin broadcast Decorator Enablement Changed true enabled  CVSLightweightDecorator ResourceStateChangeListeners getListener addResourceStateChangeListener addPropertyChangeListener CVSUIPlugin addPropertyChangeListener CVSProviderPlugin broadcastDecoratorEnablementChanged
public static boolean is Dirty final ICVS Resource cvs Resource throws CVS Exception return cvs Resource is Ignored cvs Resource is Modified null  isDirty ICVSResource cvsResource CVSException cvsResource isIgnored cvsResource isModified
public static boolean is Dirty I Resource resource No need to decorate non existant resources if resource exists return false try return is Dirty CVS Workspace Root getCVS Resource For resource catch CVS Exception e if we get an error report it to the log but assume dirty boolean accessible resource get Project is Accessible if accessible We only care about the failure if the project is open handle Exception e Return dirty if the project is open and clean otherwise return accessible  isDirty IResource isDirty CVSWorkspaceRoot getCVSResourceFor CVSException getProject isAccessible handleException
private CVS Team Provider getCVS Provider For I Resource resource Repository Provider p Repository Provider get Provider resource get Project CVS Provider Plugin get Type Id if p null return null return CVS Team Provider p  CVSTeamProvider getCVSProviderFor IResource RepositoryProvider RepositoryProvider getProvider getProject CVSProviderPlugin getTypeId CVSTeamProvider
Returns the resource for the given input object or null if there is no resource associated with it param object the object to find the resource for return the resource for the given object or null private I Resource get Resource Object object if object instanceof I Resource return I Resource object if object instanceof I Adaptable return I Resource I Adaptable object get Adapter I Resource class return null  IResource getResource IResource IResource IAdaptable IResource IAdaptable getAdapter IResource
This method should only be called by the decorator thread see org eclipse jface viewers I Lightweight Label Decorator decorate java lang Object org eclipse jface viewers I Decoration public void decorate Object element I Decoration decoration I Resource resource get Resource element if resource null resource get Type I Resource ROOT return CVS Team Provider cvs Provider getCVS Provider For resource if cvs Provider null return if the resource is ignored return an empty decoration This will force a decoration update event and clear the existing CVS decoration ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource try if cvs Resource is Ignored return catch CVS Exception e The was an exception in is Ignored Don t decorate todo should log this error handle Exception e return determine a if resource has outgoing changes e g is dirty boolean is Dirty false boolean compute Deep Dirty Check is Deep Dirty Calculation Enabled int type resource get Type if type I Resource FILE compute Deep Dirty Check is Dirty CVS Lightweight Decorator is Dirty resource decorate Text Label resource decoration is Dirty true null Image Descriptor overlay get Overlay resource is Dirty cvs Provider if overlay null actually sending null arg would work but this makes logic clearer decoration add Overlay overlay  ILightweightLabelDecorator IDecoration IDecoration IResource getResource getType IResource CVSTeamProvider cvsProvider getCVSProviderFor cvsProvider ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor cvsResource isIgnored CVSException isIgnored handleException isDirty computeDeepDirtyCheck isDeepDirtyCalculationEnabled getType IResource computeDeepDirtyCheck isDirty CVSLightweightDecorator isDirty decorateTextLabel isDirty ImageDescriptor getOverlay isDirty cvsProvider addOverlay
private boolean is Deep Dirty Calculation Enabled I Preference Store store CVSUI Plugin get Plugin get Preference Store return store get Boolean ICVSUI Constants PREF CALCULATE DIRTY  isDeepDirtyCalculationEnabled IPreferenceStore CVSUIPlugin getPlugin getPreferenceStore getBoolean ICVSUIConstants PREF_CALCULATE_DIRTY
todo the show Revisions flag is temp a better solution is Decorator Strategy classes which have most the code below public static void decorate Text Label I Resource resource I Decoration decoration boolean is Dirty boolean show Revisions String override Revision try Map bindings new Hash Map 3 String format NON NLS 1 I Preference Store store CVSUI Plugin get Plugin get Preference Store if the resource does not have a location then return This can happen if the resource has been deleted after we where asked to decorate it if resource is Accessible resource get Location null return int type resource get Type if type I Resource FOLDER format store get String ICVSUI Constants PREF FOLDERTEXT DECORATION else if type I Resource PROJECT format store get String ICVSUI Constants PREF PROJECTTEXT DECORATION else format store get String ICVSUI Constants PREF FILETEXT DECORATION if is Dirty bindings put CVS Decorator Configuration DIRTY FLAG store get String ICVSUI Constants PREF DIRTY FLAG CVS Tag tag get Tag To Show resource if tag null String name tag get Name if tag get Type CVS Tag DATE Date date tag as Date if date null name decorate Formatter format date bindings put CVS Decorator Configuration RESOURCE TAG name if type I Resource FILE ICVS Folder folder CVS Workspace Root getCVS Folder For I Container resource Folder Sync Info folder Info folder get Folder Sync Info if folder Info null ICVS Repository Location location Known Repositories get Instance get Repository folder Info get Root bindings put CVS Decorator Configuration REMOTELOCATION HOST location get Host bindings put CVS Decorator Configuration REMOTELOCATION METHOD location get Method get Name bindings put CVS Decorator Configuration REMOTELOCATION USER location get Username bindings put CVS Decorator Configuration REMOTELOCATION ROOT location get Root Directory bindings put CVS Decorator Configuration REMOTELOCATION REPOSITORY folder Info get Repository else format store get String ICVSUI Constants PREF FILETEXT DECORATION ICVS File file CVS Workspace Root getCVS File For I File resource Resource Sync Info file Info file get Sync Info if file Info null if file Info is Added bindings put CVS Decorator Configuration ADDED FLAG store get String ICVSUI Constants PREF ADDED FLAG else if show Revisions if override Revision null bindings put CVS Decorator Configuration FILE REVISION override Revision else bindings put CVS Decorator Configuration FILE REVISION file Info get Revision K Subst Option option file Info get Keyword Mode null file Info get Keyword Mode K Subst Option from File I File resource bindings put CVS Decorator Configuration FILE KEYWORD option get Short Display Text else only show the type that cvs will use when comitting the file K Subst Option option K Subst Option from File I File resource bindings put CVS Decorator Configuration FILE KEYWORD option get Short Display Text CVS Decorator Configuration decorate decoration format bindings catch CVS Exception e handle Exception e return  showRevisions DecoratorStrategy decorateTextLabel IResource IDecoration isDirty showRevisions overrideRevision HashMap IPreferenceStore CVSUIPlugin getPlugin getPreferenceStore isAccessible getLocation getType IResource getString ICVSUIConstants PREF_FOLDERTEXT_DECORATION IResource getString ICVSUIConstants PREF_PROJECTTEXT_DECORATION getString ICVSUIConstants PREF_FILETEXT_DECORATION isDirty CVSDecoratorConfiguration DIRTY_FLAG getString ICVSUIConstants PREF_DIRTY_FLAG CVSTag getTagToShow getName getType CVSTag asDate decorateFormatter CVSDecoratorConfiguration RESOURCE_TAG IResource ICVSFolder CVSWorkspaceRoot getCVSFolderFor IContainer FolderSyncInfo folderInfo getFolderSyncInfo folderInfo ICVSRepositoryLocation KnownRepositories getInstance getRepository folderInfo getRoot CVSDecoratorConfiguration REMOTELOCATION_HOST getHost CVSDecoratorConfiguration REMOTELOCATION_METHOD getMethod getName CVSDecoratorConfiguration REMOTELOCATION_USER getUsername CVSDecoratorConfiguration REMOTELOCATION_ROOT getRootDirectory CVSDecoratorConfiguration REMOTELOCATION_REPOSITORY folderInfo getRepository getString ICVSUIConstants PREF_FILETEXT_DECORATION ICVSFile CVSWorkspaceRoot getCVSFileFor IFile ResourceSyncInfo fileInfo getSyncInfo fileInfo fileInfo isAdded CVSDecoratorConfiguration ADDED_FLAG getString ICVSUIConstants PREF_ADDED_FLAG showRevisions overrideRevision CVSDecoratorConfiguration FILE_REVISION overrideRevision CVSDecoratorConfiguration FILE_REVISION fileInfo getRevision KSubstOption fileInfo getKeywordMode fileInfo getKeywordMode KSubstOption fromFile IFile CVSDecoratorConfiguration FILE_KEYWORD getShortDisplayText KSubstOption KSubstOption fromFile IFile CVSDecoratorConfiguration FILE_KEYWORD getShortDisplayText CVSDecoratorConfiguration CVSException handleException
Only show the tag if the resources tag is different than the parents Or else tag names will clutter the text decorations protected static CVS Tag get Tag To Show I Resource resource throws CVS Exception ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource CVS Tag tag null for unmanaged resources don t show a tag since they will be added in the context of their parents tag For managed resources only show tags if different than parent boolean managed false if cvs Resource is Folder Folder Sync Info folder Info ICVS Folder cvs Resource get Folder Sync Info if folder Info null tag folder Info get Tag managed true else Resource Sync Info info ICVS File cvs Resource get Sync Info if info null tag info get Tag managed true ICVS Folder parent cvs Resource get Parent if parent null managed Folder Sync Info parent Info parent get Folder Sync Info if parent Info null CVS Tag parent Tag parent Info get Tag parent Tag parent Tag null CVS Tag DEFAULT parent Tag tag tag null CVS Tag DEFAULT tag must compare tags by name because CVS doesn t do a good job of using T and N prefixes for folders and files if parent Tag get Name equals tag get Name tag null return tag  CVSTag getTagToShow IResource CVSException ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor CVSTag cvsResource isFolder FolderSyncInfo folderInfo ICVSFolder cvsResource getFolderSyncInfo folderInfo folderInfo getTag ResourceSyncInfo ICVSFile cvsResource getSyncInfo getTag ICVSFolder cvsResource getParent FolderSyncInfo parentInfo getFolderSyncInfo parentInfo CVSTag parentTag parentInfo getTag parentTag parentTag CVSTag parentTag CVSTag parentTag getName getName
public static Image Descriptor get Overlay I Resource resource boolean is Dirty CVS Team Provider provider for efficiency don t look up a pref until its needed I Preference Store store CVSUI Plugin get Plugin get Preference Store boolean show New Resources store get Boolean ICVSUI Constants PREF SHOW NEWRESOURCE DECORATION show new Resource icon if show New Resources ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource try if cvs Resource exists boolean is New Resource false if cvs Resource is Folder if ICVS Folder cvs Resource isCVS Folder is New Resource true else if cvs Resource is Managed is New Resource true if is New Resource return new Resource catch CVS Exception e handle Exception e return null boolean show Dirty store get Boolean ICVSUI Constants PREF SHOW DIRTY DECORATION show dirty icon if show Dirty is Dirty return dirty boolean show Added store get Boolean ICVSUI Constants PREF SHOW ADDED DECORATION if show Added resource get Type I Resource FILE try if resource get Location null ICVS File cvs File CVS Workspace Root getCVS File For I File resource Resource Sync Info info cvs File get Sync Info show merged icon if file has been merged but has not been edited e g on commit it will be ignored if info null info is Needs Merge cvs File get Time Stamp return merged show added icon if file has been added locally else if info null info is Added todo return added catch CVS Exception e handle Exception e return null if watch edit is enabled show non read only files as being edited boolean decorate Edited try decorate Edited provider is Watch Edit Enabled catch CVS Exception e1 handle Exception e1 decorate Edited false if decorate Edited resource get Type I Resource FILE resource is Read Only CVS Workspace Root has Remote resource return edited boolean show Has Remote store get Boolean ICVSUI Constants PREF SHOW HASREMOTE DECORATION Simplest is that is has remote if show Has Remote CVS Workspace Root has Remote resource if resource get Type I Resource FILE check if the folder is local diectory with no remote ICVS Folder cvs Folder CVS Workspace Root getCVS Folder For I Container resource try Folder Sync Info folder Sync Info cvs Folder get Folder Sync Info if folder Sync Info null folder Sync Info is Virtual Directory return no Remote Dir catch CVS Exception e log the exception and show the shared overlay handle Exception e return checked In nothing matched return null  ImageDescriptor getOverlay IResource isDirty CVSTeamProvider IPreferenceStore CVSUIPlugin getPlugin getPreferenceStore showNewResources getBoolean ICVSUIConstants PREF_SHOW_NEWRESOURCE_DECORATION newResource showNewResources ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor cvsResource isNewResource cvsResource isFolder ICVSFolder cvsResource isCVSFolder isNewResource cvsResource isManaged isNewResource isNewResource newResource CVSException handleException showDirty getBoolean ICVSUIConstants PREF_SHOW_DIRTY_DECORATION showDirty isDirty showAdded getBoolean ICVSUIConstants PREF_SHOW_ADDED_DECORATION showAdded getType IResource getLocation ICVSFile cvsFile CVSWorkspaceRoot getCVSFileFor IFile ResourceSyncInfo cvsFile getSyncInfo isNeedsMerge cvsFile getTimeStamp isAdded CVSException handleException decorateEdited decorateEdited isWatchEditEnabled CVSException handleException decorateEdited decorateEdited getType IResource isReadOnly CVSWorkspaceRoot hasRemote showHasRemote getBoolean ICVSUIConstants PREF_SHOW_HASREMOTE_DECORATION showHasRemote CVSWorkspaceRoot hasRemote getType IResource ICVSFolder cvsFolder CVSWorkspaceRoot getCVSFolderFor IContainer FolderSyncInfo folderSyncInfo cvsFolder getFolderSyncInfo folderSyncInfo folderSyncInfo isVirtualDirectory noRemoteDir CVSException handleException checkedIn
private void add With Parents I Resource resource Set resources I Resource current resource while current get Type I Resource ROOT resources add current current current get Parent  addWithParents IResource IResource getType IResource getParent
Perform a blanket refresh of all CVS decorations public static void refresh CVSUI Plugin get Plugin get Workbench get Decorator Manager update CVSUI Plugin DECORATOR ID  CVSUIPlugin getPlugin getWorkbench getDecoratorManager CVSUIPlugin DECORATOR_ID
try project accept new I Resource Visitor public boolean visit I Resource resource resources add resource return true  IResourceVisitor IResource
public void refresh I Project project final List resources new Array List try project accept new I Resource Visitor public boolean visit I Resource resource resources add resource return true post Label Event new Label Provider Changed Event this resources to Array catch Core Exception e handle Exception e  IProject ArrayList IResourceVisitor IResource postLabelEvent LabelProviderChangedEvent toArray CoreException handleException
see org eclipse team internal ccvs core I Resource State Change Listener resource Sync Info Changed org eclipse core resources I Resource public void resource Sync Info Changed I Resource changed Resources resource State Changed changed Resources  IResourceStateChangeListener resourceSyncInfoChanged IResource resourceSyncInfoChanged IResource changedResources resourceStateChanged changedResources
see org eclipse team internal ccvs core I Resource State Change Listener external Sync Info Change org eclipse core resources I Resource public void external Sync Info Change I Resource changed Resources resource State Changed changed Resources  IResourceStateChangeListener externalSyncInfoChange IResource externalSyncInfoChange IResource changedResources resourceStateChanged changedResources
see org eclipse team internal ccvs core I Resource State Change Listener resource Modification State Changed org eclipse core resources I Resource public void resource Modified I Resource changed Resources resource State Changed changed Resources  IResourceStateChangeListener resourceModificationStateChanged IResource resourceModified IResource changedResources resourceStateChanged changedResources
see org eclipse team internal ccvs core I Resource State Change Listener resource State Changed org eclipse core resources I Resource public void resource State Changed I Resource changed Resources add depth first so that update thread processes parents first System out println State Change Event Set resources To Update new Hash Set boolean showing Deep Dirty Indicators is Deep Dirty Calculation Enabled for int i 0 i changed Resources length i I Resource resource changed Resources i if showing Deep Dirty Indicators add With Parents resource resources To Update else resources To Update add resource post Label Event new Label Provider Changed Event this resources To Update to Array  IResourceStateChangeListener resourceStateChanged IResource resourceStateChanged IResource changedResources resourcesToUpdate HashSet showingDeepDirtyIndicators isDeepDirtyCalculationEnabled changedResources IResource changedResources showingDeepDirtyIndicators addWithParents resourcesToUpdate resourcesToUpdate postLabelEvent LabelProviderChangedEvent resourcesToUpdate toArray
see org eclipse team internal ccvs core I Resource State Change Listener project Configured org eclipse core resources I Project public void project Configured I Project project refresh project  IResourceStateChangeListener projectConfigured IProject projectConfigured IProject
see org eclipse team internal ccvs core I Resource State Change Listener project Deconfigured org eclipse core resources I Project public void project Deconfigured I Project project refresh project  IResourceStateChangeListener projectDeconfigured IProject projectDeconfigured IProject
private void post Label Event final Label Provider Changed Event event Display get Default async Exec new Runnable public void run fire Label Provider Changed event  postLabelEvent LabelProviderChangedEvent getDefault asyncExec fireLabelProviderChanged
Post the label event to the UI thread param events the events to post private void post Label Event final Label Provider Changed Event event Display get Default async Exec new Runnable public void run fire Label Provider Changed event  postLabelEvent LabelProviderChangedEvent getDefault asyncExec fireLabelProviderChanged
public void dispose super dispose CVS Provider Plugin broadcast Decorator Enablement Changed false disabled TeamUI remove Property Change Listener this CVSUI Plugin remove Property Change Listener this  CVSProviderPlugin broadcastDecoratorEnablementChanged removePropertyChangeListener CVSUIPlugin removePropertyChangeListener
Handle exceptions that occur in the decorator private static void handle Exception Exception e exceptions handle Exception e  handleException handleException
public void property Change Property Change Event event String prop event get Property if prop equals TeamUI GLOBAL IGNORES CHANGED refresh else if prop equals CVSUI Plugin P DECORATORS CHANGED refresh  propertyChange PropertyChangeEvent getProperty GLOBAL_IGNORES_CHANGED CVSUIPlugin P_DECORATORS_CHANGED

Method declared on I Perpsective Factory public void create Initial Layout I Page Layout layout define Actions layout define Layout layout  IPerpsectiveFactory createInitialLayout IPageLayout defineActions defineLayout
Defines the initial actions for a page public void define Actions I Page Layout layout Add new wizards layout add New Wizard Shortcut org eclipse ui wizards new project NON NLS 1 layout add New Wizard Shortcut org eclipse ui wizards new folder NON NLS 1 layout add New Wizard Shortcut org eclipse ui wizards new file NON NLS 1 Add show views layout add Show View Shortcut I Page Layout ID RES NAV layout add Show View Shortcut I Page Layout ID OUTLINE layout add Show View Shortcut I Page Layout ID TASK LIST layout add Show View Shortcut History View VIEW ID layout add Show View Shortcut Repositories View VIEW ID layout add Show View Shortcut I Synchronize View VIEW ID Add perspective short cut layout add Perspective Shortcut org eclipse ui resource Perspective NON NLS 1 layout add Perspective Shortcut org eclipse team ui Team Synchronizing Perspective NON NLS 1  defineActions IPageLayout addNewWizardShortcut addNewWizardShortcut addNewWizardShortcut addShowViewShortcut IPageLayout ID_RES_NAV addShowViewShortcut IPageLayout ID_OUTLINE addShowViewShortcut IPageLayout ID_TASK_LIST addShowViewShortcut HistoryView VIEW_ID addShowViewShortcut RepositoriesView VIEW_ID addShowViewShortcut ISynchronizeView VIEW_ID addPerspectiveShortcut resourcePerspective addPerspectiveShortcut TeamSynchronizingPerspective
Defines the initial layout for a page public void define Layout I Page Layout layout String editor Area layout get Editor Area I Folder Layout top layout create Folder top I Page Layout LEFT 0 40f editor Area NON NLS 1 top add View Repositories View VIEW ID layout add View History View VIEW ID I Page Layout BOTTOM 0 70f editor Area layout set Editor Area Visible true  defineLayout IPageLayout editorArea getEditorArea IFolderLayout createFolder IPageLayout editorArea addView RepositoriesView VIEW_ID addView HistoryView VIEW_ID IPageLayout editorArea setEditorAreaVisible

Collections sort ksubst Options new Comparator public int compare Object a Object b String a Key K Subst Option a get Long Display Text String b Key K Subst Option b get Long Display Text return a Key compare To b Key  ksubstOptions aKey KSubstOption getLongDisplayText bKey KSubstOption getLongDisplayText aKey compareTo bKey
public CVS Preferences Page sort the options by display text set Description Policy bind CVS Preference Page description NON NLS 1 K Subst Option options K Subst Option get AllK Subst Options this ksubst Options new Array List for int i 0 i options length i K Subst Option option options i if option is Binary ksubst Options add option Collections sort ksubst Options new Comparator public int compare Object a Object b String a Key K Subst Option a get Long Display Text String b Key K Subst Option b get Long Display Text return a Key compare To b Key  CVSPreferencesPage setDescription CVSPreferencePage KSubstOption KSubstOption getAllKSubstOptions ksubstOptions ArrayList KSubstOption isBinary ksubstOptions ksubstOptions aKey KSubstOption getLongDisplayText bKey KSubstOption getLongDisplayText aKey compareTo bKey
Utility method that creates a combo box param parent the parent for the new label return the new widget protected Combo create Combo Composite parent int width Chars Combo combo new Combo parent SWT READ ONLY Grid Data data new Grid Data Grid Data FILL HORIZONTAL GC gc new GC combo gc set Font combo get Font Font Metrics font Metrics gc get Font Metrics data width Hint Dialog convert Width In Chars To Pixels font Metrics width Chars gc dispose combo set Layout Data data return combo  createCombo widthChars READ_ONLY GridData GridData GridData FILL_HORIZONTAL setFont getFont FontMetrics fontMetrics getFontMetrics widthHint convertWidthInCharsToPixels fontMetrics widthChars setLayoutData
Utility method that creates a combo box param parent the parent for the new label return the new widget protected Combo create Combo Composite parent Combo combo new Combo parent SWT READ ONLY Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint I Dialog Constants ENTRY FIELD WIDTH combo set Layout Data data return combo  createCombo READ_ONLY GridData GridData GridData FILL_HORIZONTAL widthHint IDialogConstants ENTRY_FIELD_WIDTH setLayoutData
Creates composite control and sets the default layout data param parent the parent of the new composite param num Columns the number of columns for the new composite return the newly created coposite private Composite create Composite Composite parent int num Columns Composite composite new Composite parent SWT NULL Grid Layout Grid Layout layout new Grid Layout layout num Columns num Columns layout margin Width 0 layout margin Height 0 composite set Layout layout Grid Data Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL composite set Layout Data data return composite  numColumns createComposite numColumns GridLayout GridLayout GridLayout numColumns numColumns marginWidth marginHeight setLayout GridData GridData GridData verticalAlignment GridData horizontalAlignment GridData setLayoutData
Creates an new checkbox instance and sets the default layout data param group the composite in which to create the checkbox param label the string to set into the checkbox return the new checkbox private Button create Check Box Composite group String label Button button new Button group SWT CHECK SWT LEFT button set Text label Grid Data data new Grid Data data horizontal Span 2 button set Layout Data data return button  createCheckBox setText GridData GridData horizontalSpan setLayoutData
timeout Value add Modify Listener new Modify Listener public void modify Text Modify Event e Parse the timeout value try int x Integer parse Int timeout Value get Text if x 0 set Error Message null set Valid true else set Error Message Policy bind CVS Preferences Page Timeout must not be negative 1 NON NLS 1 set Valid false catch Number Format Exception ex set Error Message Policy bind CVS Preferences Page Timeout must be a number 2 NON NLS 1 set Valid false  timeoutValue addModifyListener ModifyListener modifyText ModifyEvent parseInt timeoutValue getText setErrorMessage setValid setErrorMessage CVSPreferencesPage Timeout_must_not_be_negative_1 setValid NumberFormatException setErrorMessage CVSPreferencesPage Timeout_must_be_a_number_2 setValid
quietness Combo add Selection Listener new Selection Listener public void widget Selected Selection Event e if get Quietness Option For quietness Combo get Selection Index equals Command SILENT Message Dialog open Warning get Shell Policy bind CVS Preference Page silent Warning Title Policy bind CVS Preference Page silent Warning Message NON NLS 1 NON NLS 2  quietnessCombo addSelectionListener SelectionListener widgetSelected SelectionEvent getQuietnessOptionFor quietnessCombo getSelectionIndex MessageDialog openWarning getShell CVSPreferencePage silentWarningTitle CVSPreferencePage silentWarningMessage
public void widget Default Selected Selection Event e widget Selected e  widgetDefaultSelected SelectionEvent widgetSelected
see Preference Page create Contents Composite protected Control create Contents Composite parent Composite composite create Composite parent 2 prune Empty Directories Field create Check Box composite Policy bind CVS Preference Page prune Empty Directories NON NLS 1 consider Contents In Compare create Check Box composite Policy bind CVS Preference Page consider Contents In Compare NON NLS 1 replace Unmanaged create Check Box composite Policy bind CVS Preference Page replace Unmanaged NON NLS 1 repositories Are Binary create Check Box composite Policy bind CVS Preference Page repositories Are Binary NON NLS 1 determine Version Enabled create Check Box composite Policy bind CVS Preference Page determine Version Enabled NON NLS 1 confirm Move Tag create Check Box composite Policy bind CVS Preference Page confirm Move Tag NON NLS 1 debug Protocol create Check Box composite Policy bind CVS Preference Page debug Protocol NON NLS 1 use Platform Lineend create Check Box composite Policy bind CVS Preference Page lineend NON NLS 1 show Compare Revision In Dialog create Check Box composite Policy bind CVS Preference Page show Compare Merge In Sync NON NLS 1 create Label composite create Label composite NON NLS 1 NON NLS 2 create Label composite Policy bind CVS Preference Page timeout Value NON NLS 1 timeout Value create Text Field composite timeout Value add Modify Listener new Modify Listener public void modify Text Modify Event e Parse the timeout value try int x Integer parse Int timeout Value get Text if x 0 set Error Message null set Valid true else set Error Message Policy bind CVS Preferences Page Timeout must not be negative 1 NON NLS 1 set Valid false catch Number Format Exception ex set Error Message Policy bind CVS Preferences Page Timeout must be a number 2 NON NLS 1 set Valid false create Label composite Policy bind CVS Preference Page quietness NON NLS 1 quietness Combo create Combo composite create Label composite Policy bind CVS Preference Page compression Level NON NLS 1 compression Level Combo create Combo composite create Label composite Policy bind CVS Preference Page default TextK Subst NON NLS 1 int chars 0 for Iterator it ksubst Options iterator it has Next K Subst Option option K Subst Option it next int c option get Long Display Text length if c chars chars c ksubst Combo create Combo composite chars create Label composite create Label composite NON NLS 1 NON NLS 2 create Save Combo composite initialize Values quietness Combo add Selection Listener new Selection Listener public void widget Selected Selection Event e if get Quietness Option For quietness Combo get Selection Index equals Command SILENT Message Dialog open Warning get Shell Policy bind CVS Preference Page silent Warning Title Policy bind CVS Preference Page silent Warning Message NON NLS 1 NON NLS 2 public void widget Default Selected Selection Event e widget Selected e Workbench Help set Help prune Empty Directories Field I Help Context Ids PREF PRUNE Workbench Help set Help compression Level Combo I Help Context Ids PREF COMPRESSION Workbench Help set Help quietness Combo I Help Context Ids PREF QUIET Workbench Help set Help ksubst Combo I Help Context Ids PREF KEYWORDMODE Workbench Help set Help use Platform Lineend I Help Context Ids PREF LINEEND Workbench Help set Help timeout Value I Help Context Ids PREF COMMS TIMEOUT Workbench Help set Help consider Contents In Compare I Help Context Ids PREF CONSIDER CONTENT Workbench Help set Help replace Unmanaged I Help Context Ids PREF REPLACE DELETE UNMANAGED Workbench Help set Help repositories Are Binary I Help Context Ids PREF TREAT NEW FILE AS BINARY Workbench Help set Help determine Version Enabled I Help Context Ids PREF DETERMINE SERVER VERSION Workbench Help set Help confirm Move Tag I Help Context Ids PREF CONFIRM MOVE TAG Dialog apply Dialog Font parent return composite  PreferencePage createContents createContents createComposite pruneEmptyDirectoriesField createCheckBox CVSPreferencePage pruneEmptyDirectories considerContentsInCompare createCheckBox CVSPreferencePage considerContentsInCompare replaceUnmanaged createCheckBox CVSPreferencePage replaceUnmanaged repositoriesAreBinary createCheckBox CVSPreferencePage repositoriesAreBinary determineVersionEnabled createCheckBox CVSPreferencePage determineVersionEnabled confirmMoveTag createCheckBox CVSPreferencePage confirmMoveTag debugProtocol createCheckBox CVSPreferencePage debugProtocol usePlatformLineend createCheckBox CVSPreferencePage showCompareRevisionInDialog createCheckBox CVSPreferencePage showCompareMergeInSync createLabel createLabel createLabel CVSPreferencePage timeoutValue timeoutValue createTextField timeoutValue addModifyListener ModifyListener modifyText ModifyEvent parseInt timeoutValue getText setErrorMessage setValid setErrorMessage CVSPreferencesPage Timeout_must_not_be_negative_1 setValid NumberFormatException setErrorMessage CVSPreferencesPage Timeout_must_be_a_number_2 setValid createLabel CVSPreferencePage quietnessCombo createCombo createLabel CVSPreferencePage compressionLevel compressionLevelCombo createCombo createLabel CVSPreferencePage defaultTextKSubst ksubstOptions hasNext KSubstOption KSubstOption getLongDisplayText ksubstCombo createCombo createLabel createLabel createSaveCombo initializeValues quietnessCombo addSelectionListener SelectionListener widgetSelected SelectionEvent getQuietnessOptionFor quietnessCombo getSelectionIndex MessageDialog openWarning getShell CVSPreferencePage silentWarningTitle CVSPreferencePage silentWarningMessage widgetDefaultSelected SelectionEvent widgetSelected WorkbenchHelp setHelp pruneEmptyDirectoriesField IHelpContextIds PREF_PRUNE WorkbenchHelp setHelp compressionLevelCombo IHelpContextIds PREF_COMPRESSION WorkbenchHelp setHelp quietnessCombo IHelpContextIds PREF_QUIET WorkbenchHelp setHelp ksubstCombo IHelpContextIds PREF_KEYWORDMODE WorkbenchHelp setHelp usePlatformLineend IHelpContextIds PREF_LINEEND WorkbenchHelp setHelp timeoutValue IHelpContextIds PREF_COMMS_TIMEOUT WorkbenchHelp setHelp considerContentsInCompare IHelpContextIds PREF_CONSIDER_CONTENT WorkbenchHelp setHelp replaceUnmanaged IHelpContextIds PREF_REPLACE_DELETE_UNMANAGED WorkbenchHelp setHelp repositoriesAreBinary IHelpContextIds PREF_TREAT_NEW_FILE_AS_BINARY WorkbenchHelp setHelp determineVersionEnabled IHelpContextIds PREF_DETERMINE_SERVER_VERSION WorkbenchHelp setHelp confirmMoveTag IHelpContextIds PREF_CONFIRM_MOVE_TAG applyDialogFont
Utility method that creates a label instance and sets the default layout data param parent the parent for the new label param text the text for the new label return the new label private Label create Label Composite parent String text Label label new Label parent SWT LEFT label set Text text Grid Data data new Grid Data data horizontal Span 1 data horizontal Alignment Grid Data FILL label set Layout Data data return label  createLabel setText GridData GridData horizontalSpan horizontalAlignment GridData setLayoutData
Creates an new text widget and sets the default layout data param group the composite in which to create the checkbox return the new text widget private Text create Text Field Composite group Text text new Text group SWT BORDER text set Layout Data new Grid Data Grid Data FILL HORIZONTAL return text  createTextField setLayoutData GridData GridData FILL_HORIZONTAL
Initializes states of the controls from the preference store private void initialize Values I Preference Store store get Preference Store prune Empty Directories Field set Selection store get Boolean ICVSUI Constants PREF PRUNE EMPTY DIRECTORIES show Compare Revision In Dialog set Selection store get Boolean ICVSUI Constants PREF SHOW COMPARE REVISION IN DIALOG timeout Value set Text new Integer store get Int ICVSUI Constants PREF TIMEOUT to String repositories Are Binary set Selection store get Boolean ICVSUI Constants PREF REPOSITORIES ARE BINARY quietness Combo add Policy bind CVS Preference Page notquiet NON NLS 1 quietness Combo add Policy bind CVS Preference Page somewhatquiet NON NLS 1 quietness Combo add Policy bind CVS Preference Page reallyquiet NON NLS 1 quietness Combo select store get Int ICVSUI Constants PREF QUIETNESS for int i 0 i 10 i compression Level Combo add Policy bind CVS Preference Page level i NON NLS 1 compression Level Combo select store get Int ICVSUI Constants PREF COMPRESSION LEVEL for Iterator it ksubst Options iterator it has Next K Subst Option option K Subst Option it next ksubst Combo add option get Long Display Text ksubst Combo select getK Subst Combo Index For store get String ICVSUI Constants PREF TEXT KSUBST use Platform Lineend set Selection store get Boolean ICVSUI Constants PREF USE PLATFORM LINEEND consider Contents In Compare set Selection store get Boolean ICVSUI Constants PREF CONSIDER CONTENTS replace Unmanaged set Selection store get Boolean ICVSUI Constants PREF REPLACE UNMANAGED determine Version Enabled set Selection store get Boolean ICVSUI Constants PREF DETERMINE SERVER VERSION confirm Move Tag set Selection store get Boolean ICVSUI Constants PREF CONFIRM MOVE TAG debug Protocol set Selection store get Boolean ICVSUI Constants PREF DEBUG PROTOCOL initialize Save Radios store get Int ICVSUI Constants PREF SAVE DIRTY EDITORS  initializeValues IPreferenceStore getPreferenceStore pruneEmptyDirectoriesField setSelection getBoolean ICVSUIConstants PREF_PRUNE_EMPTY_DIRECTORIES showCompareRevisionInDialog setSelection getBoolean ICVSUIConstants PREF_SHOW_COMPARE_REVISION_IN_DIALOG timeoutValue setText getInt ICVSUIConstants PREF_TIMEOUT toString repositoriesAreBinary setSelection getBoolean ICVSUIConstants PREF_REPOSITORIES_ARE_BINARY quietnessCombo CVSPreferencePage quietnessCombo CVSPreferencePage quietnessCombo CVSPreferencePage quietnessCombo getInt ICVSUIConstants PREF_QUIETNESS compressionLevelCombo CVSPreferencePage compressionLevelCombo getInt ICVSUIConstants PREF_COMPRESSION_LEVEL ksubstOptions hasNext KSubstOption KSubstOption ksubstCombo getLongDisplayText ksubstCombo getKSubstComboIndexFor getString ICVSUIConstants PREF_TEXT_KSUBST usePlatformLineend setSelection getBoolean ICVSUIConstants PREF_USE_PLATFORM_LINEEND considerContentsInCompare setSelection getBoolean ICVSUIConstants PREF_CONSIDER_CONTENTS replaceUnmanaged setSelection getBoolean ICVSUIConstants PREF_REPLACE_UNMANAGED determineVersionEnabled setSelection getBoolean ICVSUIConstants PREF_DETERMINE_SERVER_VERSION confirmMoveTag setSelection getBoolean ICVSUIConstants PREF_CONFIRM_MOVE_TAG debugProtocol setSelection getBoolean ICVSUIConstants PREF_DEBUG_PROTOCOL initializeSaveRadios getInt ICVSUIConstants PREF_SAVE_DIRTY_EDITORS
see I Workbench Preference Page init I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
OK was clicked Store the CVS preferences return whether it is okay to close the preference page public boolean perform Ok Parse the timeout value int timeout Integer parse Int timeout Value get Text I Preference Store store get Preference Store set the provider preferences first because the preference change listeners invoked from the preference store change may need these values store set Value ICVSUI Constants PREF PRUNE EMPTY DIRECTORIES prune Empty Directories Field get Selection store set Value ICVSUI Constants PREF TIMEOUT timeout store set Value ICVSUI Constants PREF QUIETNESS quietness Combo get Selection Index store set Value ICVSUI Constants PREF COMPRESSION LEVEL compression Level Combo get Selection Index Text mode processed separately to avoid empty string in properties file String mode K Subst Option ksubst Options get ksubst Combo get Selection Index to Mode if mode length 0 mode kkv NON NLS 1 store set Value ICVSUI Constants PREF TEXT KSUBST mode store set Value ICVSUI Constants PREF USE PLATFORM LINEEND use Platform Lineend get Selection store set Value ICVSUI Constants PREF CONSIDER CONTENTS consider Contents In Compare get Selection store set Value ICVSUI Constants PREF REPLACE UNMANAGED replace Unmanaged get Selection store set Value ICVSUI Constants PREF SAVE DIRTY EDITORS get Save Radio store set Value ICVSUI Constants PREF REPOSITORIES ARE BINARY repositories Are Binary get Selection store set Value ICVSUI Constants PREF DETERMINE SERVER VERSION determine Version Enabled get Selection store set Value ICVSUI Constants PREF CONFIRM MOVE TAG confirm Move Tag get Selection store set Value ICVSUI Constants PREF DEBUG PROTOCOL debug Protocol get Selection store set Value ICVSUI Constants PREF SHOW COMPARE REVISION IN DIALOG show Compare Revision In Dialog get Selection CVS Provider Plugin get Plugin set Replace Unmanaged store get Boolean ICVSUI Constants PREF REPLACE UNMANAGED CVS Provider Plugin get Plugin set Prune Empty Directories store get Boolean ICVSUI Constants PREF PRUNE EMPTY DIRECTORIES CVS Provider Plugin get Plugin set Timeout store get Int ICVSUI Constants PREF TIMEOUT CVS Provider Plugin get Plugin set Quietness get Quietness Option For store get Int ICVSUI Constants PREF QUIETNESS CVS Provider Plugin get Plugin set Compression Level store get Int ICVSUI Constants PREF COMPRESSION LEVEL CVS Provider Plugin get Plugin set Debug Protocol store get Boolean ICVSUI Constants PREF DEBUG PROTOCOL CVS Provider Plugin get Plugin set Repositories Are Binary store get Boolean ICVSUI Constants PREF REPOSITORIES ARE BINARY K Subst Option oldK Subst CVS Provider Plugin get Plugin get Default TextK Subst Option K Subst Option newK Subst K Subst Option from Mode store get String ICVSUI Constants PREF TEXT KSUBST CVS Provider Plugin get Plugin set Default TextK Subst Option newK Subst CVS Provider Plugin get Plugin set Use Platform Lineend store get Boolean ICVSUI Constants PREF USE PLATFORM LINEEND CVS Provider Plugin get Plugin set Determine Version Enabled store get Boolean ICVSUI Constants PREF DETERMINE SERVER VERSION CVS Provider Plugin get Plugin set Confirm Move Tag Enabled store get Boolean ICVSUI Constants PREF CONFIRM MOVE TAG changing the default keyword substitution mode for text files may affect information displayed in the decorators if oldK Subst equals newK Subst CVSUI Plugin broadcast Property Change new Property Change Event this CVSUI Plugin P DECORATORS CHANGED null null CVSUI Plugin get Plugin save Plugin Preferences return true  performOk parseInt timeoutValue getText IPreferenceStore getPreferenceStore setValue ICVSUIConstants PREF_PRUNE_EMPTY_DIRECTORIES pruneEmptyDirectoriesField getSelection setValue ICVSUIConstants PREF_TIMEOUT setValue ICVSUIConstants PREF_QUIETNESS quietnessCombo getSelectionIndex setValue ICVSUIConstants PREF_COMPRESSION_LEVEL compressionLevelCombo getSelectionIndex KSubstOption ksubstOptions ksubstCombo getSelectionIndex toMode setValue ICVSUIConstants PREF_TEXT_KSUBST setValue ICVSUIConstants PREF_USE_PLATFORM_LINEEND usePlatformLineend getSelection setValue ICVSUIConstants PREF_CONSIDER_CONTENTS considerContentsInCompare getSelection setValue ICVSUIConstants PREF_REPLACE_UNMANAGED replaceUnmanaged getSelection setValue ICVSUIConstants PREF_SAVE_DIRTY_EDITORS getSaveRadio setValue ICVSUIConstants PREF_REPOSITORIES_ARE_BINARY repositoriesAreBinary getSelection setValue ICVSUIConstants PREF_DETERMINE_SERVER_VERSION determineVersionEnabled getSelection setValue ICVSUIConstants PREF_CONFIRM_MOVE_TAG confirmMoveTag getSelection setValue ICVSUIConstants PREF_DEBUG_PROTOCOL debugProtocol getSelection setValue ICVSUIConstants PREF_SHOW_COMPARE_REVISION_IN_DIALOG showCompareRevisionInDialog getSelection CVSProviderPlugin getPlugin setReplaceUnmanaged getBoolean ICVSUIConstants PREF_REPLACE_UNMANAGED CVSProviderPlugin getPlugin setPruneEmptyDirectories getBoolean ICVSUIConstants PREF_PRUNE_EMPTY_DIRECTORIES CVSProviderPlugin getPlugin setTimeout getInt ICVSUIConstants PREF_TIMEOUT CVSProviderPlugin getPlugin setQuietness getQuietnessOptionFor getInt ICVSUIConstants PREF_QUIETNESS CVSProviderPlugin getPlugin setCompressionLevel getInt ICVSUIConstants PREF_COMPRESSION_LEVEL CVSProviderPlugin getPlugin setDebugProtocol getBoolean ICVSUIConstants PREF_DEBUG_PROTOCOL CVSProviderPlugin getPlugin setRepositoriesAreBinary getBoolean ICVSUIConstants PREF_REPOSITORIES_ARE_BINARY KSubstOption oldKSubst CVSProviderPlugin getPlugin getDefaultTextKSubstOption KSubstOption newKSubst KSubstOption fromMode getString ICVSUIConstants PREF_TEXT_KSUBST CVSProviderPlugin getPlugin setDefaultTextKSubstOption newKSubst CVSProviderPlugin getPlugin setUsePlatformLineend getBoolean ICVSUIConstants PREF_USE_PLATFORM_LINEEND CVSProviderPlugin getPlugin setDetermineVersionEnabled getBoolean ICVSUIConstants PREF_DETERMINE_SERVER_VERSION CVSProviderPlugin getPlugin setConfirmMoveTagEnabled getBoolean ICVSUIConstants PREF_CONFIRM_MOVE_TAG oldKSubst newKSubst CVSUIPlugin broadcastPropertyChange PropertyChangeEvent CVSUIPlugin P_DECORATORS_CHANGED CVSUIPlugin getPlugin savePluginPreferences
Defaults was clicked Restore the CVS preferences to their default values protected void perform Defaults super perform Defaults I Preference Store store get Preference Store prune Empty Directories Field set Selection store get Default Boolean ICVSUI Constants PREF PRUNE EMPTY DIRECTORIES timeout Value set Text new Integer store get Default Int ICVSUI Constants PREF TIMEOUT to String quietness Combo select store get Default Int ICVSUI Constants PREF QUIETNESS compression Level Combo select store get Default Int ICVSUI Constants PREF COMPRESSION LEVEL ksubst Combo select getK Subst Combo Index For store get Default String ICVSUI Constants PREF TEXT KSUBST use Platform Lineend set Selection store get Default Boolean ICVSUI Constants PREF USE PLATFORM LINEEND replace Unmanaged set Selection store get Default Boolean ICVSUI Constants PREF REPLACE UNMANAGED initialize Save Radios store get Default Int ICVSUI Constants PREF SAVE DIRTY EDITORS repositories Are Binary set Selection store get Default Boolean ICVSUI Constants PREF REPOSITORIES ARE BINARY confirm Move Tag set Selection store get Default Boolean ICVSUI Constants PREF CONFIRM MOVE TAG debug Protocol set Selection store get Default Boolean ICVSUI Constants PREF DEBUG PROTOCOL show Compare Revision In Dialog set Selection store get Default Boolean ICVSUI Constants PREF SHOW COMPARE REVISION IN DIALOG  performDefaults performDefaults IPreferenceStore getPreferenceStore pruneEmptyDirectoriesField setSelection getDefaultBoolean ICVSUIConstants PREF_PRUNE_EMPTY_DIRECTORIES timeoutValue setText getDefaultInt ICVSUIConstants PREF_TIMEOUT toString quietnessCombo getDefaultInt ICVSUIConstants PREF_QUIETNESS compressionLevelCombo getDefaultInt ICVSUIConstants PREF_COMPRESSION_LEVEL ksubstCombo getKSubstComboIndexFor getDefaultString ICVSUIConstants PREF_TEXT_KSUBST usePlatformLineend setSelection getDefaultBoolean ICVSUIConstants PREF_USE_PLATFORM_LINEEND replaceUnmanaged setSelection getDefaultBoolean ICVSUIConstants PREF_REPLACE_UNMANAGED initializeSaveRadios getDefaultInt ICVSUIConstants PREF_SAVE_DIRTY_EDITORS repositoriesAreBinary setSelection getDefaultBoolean ICVSUIConstants PREF_REPOSITORIES_ARE_BINARY confirmMoveTag setSelection getDefaultBoolean ICVSUIConstants PREF_CONFIRM_MOVE_TAG debugProtocol setSelection getDefaultBoolean ICVSUIConstants PREF_DEBUG_PROTOCOL showCompareRevisionInDialog setSelection getDefaultBoolean ICVSUIConstants PREF_SHOW_COMPARE_REVISION_IN_DIALOG
private void create Save Combo Composite composite Group group new Group composite SWT NULL Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data horizontal Span 2 group set Layout Data data Grid Layout layout new Grid Layout group set Layout layout group set Text Policy bind CVS Preference Page Save dirty editors before CVS operations 1 NON NLS 1 never new Button group SWT RADIO SWT LEFT never set Layout Data new Grid Data never set Text Policy bind CVS Preference Page Never 2 NON NLS 1 prompt new Button group SWT RADIO SWT LEFT prompt set Layout Data new Grid Data prompt set Text Policy bind CVS Preference Page Prompt 3 NON NLS 1 auto new Button group SWT RADIO SWT LEFT auto set Layout Data new Grid Data auto set Text Policy bind CVS Preference Page Auto save 4 NON NLS 1 Workbench Help set Help group I Help Context Ids PREF SAVE DIRTY EDITORS  createSaveCombo GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL horizontalSpan setLayoutData GridLayout GridLayout setLayout setText CVSPreferencePage Save_dirty_editors_before_CVS_operations_1 setLayoutData GridData setText CVSPreferencePage Never_2 setLayoutData GridData setText CVSPreferencePage Prompt_3 setLayoutData GridData setText CVSPreferencePage save_4 WorkbenchHelp setHelp IHelpContextIds PREF_SAVE_DIRTY_EDITORS
Returns preference store that belongs to the our plugin This is important because we want to store our preferences separately from the desktop return the preference store for this plugin protected I Preference Store do Get Preference Store return CVSUI Plugin get Plugin get Preference Store  IPreferenceStore doGetPreferenceStore CVSUIPlugin getPlugin getPreferenceStore
protected static Quiet Option get Quietness Option For int option switch option case 0 return Command VERBOSE case 1 return Command PARTLY QUIET case 2 return Command SILENT return null  QuietOption getQuietnessOptionFor PARTLY_QUIET
protected int getK Subst Combo Index For String mode K Subst Option ksubst K Subst Option from Mode mode int i 0 for Iterator it ksubst Options iterator it has Next K Subst Option option K Subst Option it next if ksubst equals option return i i unknown option add it to the list ksubst Options add ksubst ksubst Combo add ksubst get Long Display Text return i  getKSubstComboIndexFor KSubstOption KSubstOption fromMode ksubstOptions hasNext KSubstOption KSubstOption ksubstOptions ksubstCombo getLongDisplayText
protected void initialize Save Radios int option auto set Selection false never set Selection false prompt set Selection false switch option case ICVSUI Constants OPTION AUTOMATIC auto set Selection true break case ICVSUI Constants OPTION NEVER never set Selection true break case ICVSUI Constants OPTION PROMPT prompt set Selection true break  initializeSaveRadios setSelection setSelection setSelection ICVSUIConstants OPTION_AUTOMATIC setSelection ICVSUIConstants OPTION_NEVER setSelection ICVSUIConstants OPTION_PROMPT setSelection
protected int get Save Radio if auto get Selection return ICVSUI Constants OPTION AUTOMATIC else if never get Selection return ICVSUI Constants OPTION NEVER else return ICVSUI Constants OPTION PROMPT  getSaveRadio getSelection ICVSUIConstants OPTION_AUTOMATIC getSelection ICVSUIConstants OPTION_NEVER ICVSUIConstants OPTION_PROMPT

public static boolean is Compatible ICVS Repository Location location ICVS Repository Location old Location if location get Host equals old Location get Host return false if location get Root Directory equals old Location get Root Directory return false if location equals old Location return false return true  isCompatible ICVSRepositoryLocation ICVSRepositoryLocation oldLocation getHost oldLocation getHost getRootDirectory oldLocation getRootDirectory oldLocation
boolean show Compatible true public Repository Selection Dialog Shell shell ICVS Repository Location old Location super shell initialize old Location  showCompatible RepositorySelectionDialog ICVSRepositoryLocation oldLocation oldLocation
private void initialize ICVS Repository Location old Location all Locations CVSUI Plugin get Plugin get Repository Manager get Known Repository Locations List locations new Array List for int i 0 i all Locations length i ICVS Repository Location location all Locations i if is Compatible location old Location locations add location compatible Locatons ICVS Repository Location locations to Array new ICVS Repository Location locations size  ICVSRepositoryLocation oldLocation allLocations CVSUIPlugin getPlugin getRepositoryManager getKnownRepositoryLocations ArrayList allLocations ICVSRepositoryLocation allLocations isCompatible oldLocation compatibleLocatons ICVSRepositoryLocation toArray ICVSRepositoryLocation
protected void create Buttons For Button Bar Composite parent create OK and Cancel buttons by default ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true ok Button set Enabled false create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL okButton setEnabled createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
viewer set Content Provider new Workbench Content Provider public Object get Elements Object input Element if show Compatible return compatible Locatons else return all Locations  setContentProvider WorkbenchContentProvider getElements inputElement showCompatible compatibleLocatons allLocations
viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection if selection is Empty selected Location null ok Button set Enabled false else selected Location ICVS Repository Location selection get First Element ok Button set Enabled true  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection isEmpty selectedLocation okButton setEnabled selectedLocation ICVSRepositoryLocation getFirstElement okButton setEnabled
viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event ok Pressed  addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent okPressed
compatible Button set Selection show Compatible compatible Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e show Compatible compatible Button get Selection viewer refresh  compatibleButton setSelection showCompatible compatibleButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent showCompatible compatibleButton getSelection
protected Control create Dialog Area Composite parent parent get Shell set Text Policy bind CVS Project Properties Page Select a Repository 1 NON NLS 1 Composite composite new Composite parent SWT NONE composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL BOTH create Label composite Policy bind CVS Project Properties Page Select a CVS repository location to share the project with  2 1 NON NLS 1 Table table new Table composite SWT SINGLE SWT BORDER SWT H SCROLL SWT V SCROLL Grid Data data new Grid Data data width Hint TABLE WIDTH HINT data height Hint TABLE HEIGHT HINT table set Layout Data data viewer new Table Viewer table viewer set Label Provider new Workbench Label Provider viewer set Content Provider new Workbench Content Provider public Object get Elements Object input Element if show Compatible return compatible Locatons else return all Locations viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection if selection is Empty selected Location null ok Button set Enabled false else selected Location ICVS Repository Location selection get First Element ok Button set Enabled true viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event ok Pressed viewer set Input compatible Locatons final Button compatible Button create Check Box composite Policy bind CVS Project Properties Page 31 NON NLS 1 compatible Button set Selection show Compatible compatible Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e show Compatible compatible Button get Selection viewer refresh return composite  createDialogArea getShell setText CVSProjectPropertiesPage Select_a_Repository_1 setLayout GridLayout setLayoutData GridData GridData FILL_BOTH createLabel CVSProjectPropertiesPage Select_a_CVS_repository_location_to_share_the_project_with__2 H_SCROLL V_SCROLL GridData GridData widthHint TABLE_WIDTH_HINT heightHint TABLE_HEIGHT_HINT setLayoutData TableViewer setLabelProvider WorkbenchLabelProvider setContentProvider WorkbenchContentProvider getElements inputElement showCompatible compatibleLocatons allLocations addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection isEmpty selectedLocation okButton setEnabled selectedLocation ICVSRepositoryLocation getFirstElement okButton setEnabled addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent okPressed setInput compatibleLocatons compatibleButton createCheckBox CVSProjectPropertiesPage compatibleButton setSelection showCompatible compatibleButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent showCompatible compatibleButton getSelection
return composite protected void cancel Pressed selected Location null super cancel Pressed  cancelPressed selectedLocation cancelPressed
super cancel Pressed public ICVS Repository Location get Location return selected Location  cancelPressed ICVSRepositoryLocation getLocation selectedLocation
fetch Button create Check Box composite Policy bind CVS Project Properties Page fetch Absent Directories On Update NON NLS 1 fetch Button add Listener SWT Selection new Listener public void handle Event Event event fetch fetch Button get Selection  fetchButton createCheckBox CVSProjectPropertiesPage fetchAbsentDirectoriesOnUpdate fetchButton addListener handleEvent fetchButton getSelection
watch Edit Button create Check Box composite Policy bind CVS Project Properties Page configure For Watch Edit NON NLS 1 watch Edit Button add Listener SWT Selection new Listener public void handle Event Event event watch Edit watch Edit Button get Selection  watchEditButton createCheckBox CVSProjectPropertiesPage configureForWatchEdit watchEditButton addListener handleEvent watchEdit watchEditButton getSelection
change Button add Listener SWT Selection new Listener public void handle Event Event e Repository Selection Dialog dialog new Repository Selection Dialog get Shell old Location dialog open ICVS Repository Location location dialog get Location if location null return new Location location initialize Values new Location  changeButton addListener handleEvent RepositorySelectionDialog RepositorySelectionDialog getShell oldLocation ICVSRepositoryLocation getLocation newLocation initializeValues newLocation
protected Control create Contents Composite parent initialize Composite composite new Composite parent SWT NULL composite set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout Label label create Label composite Policy bind CVS Project Properties Page connection Type 1 NON NLS 1 method Label create Label composite 1 NON NLS 1 label create Label composite Policy bind CVS Project Properties Page user 1 NON NLS 1 user Label create Label composite 1 NON NLS 1 label create Label composite Policy bind CVS Properties Page host 1 NON NLS 1 host Label create Label composite 1 NON NLS 1 label create Label composite Policy bind CVS Properties Page port 1 NON NLS 1 port Label create Label composite 1 NON NLS 1 label create Label composite Policy bind CVS Properties Page path 1 NON NLS 1 path Label create Label composite 1 NON NLS 1 label create Label composite Policy bind CVS Properties Page module 1 NON NLS 1 module Label create Label composite 1 NON NLS 1 label create Label composite Policy bind CVS Properties Page tag 1 NON NLS 1 tag Label create Label composite 1 NON NLS 1 create Label composite 1 NON NLS 1 Should absent directories be fetched on update fetch Button create Check Box composite Policy bind CVS Project Properties Page fetch Absent Directories On Update NON NLS 1 fetch Button add Listener SWT Selection new Listener public void handle Event Event event fetch fetch Button get Selection Should the project be configured for watch edit watch Edit Button create Check Box composite Policy bind CVS Project Properties Page configure For Watch Edit NON NLS 1 watch Edit Button add Listener SWT Selection new Listener public void handle Event Event event watch Edit watch Edit Button get Selection create Label composite 1 NON NLS 1 create Label composite 1 NON NLS 1 create Label composite 1 NON NLS 1 create Label composite 1 NON NLS 1 label new Label composite SWT WRAP label set Text Policy bind CVS Project Properties Page You can change the sharing of this project to another repository location  However  this is only possible if the new location is   compatible    on the same host with the same repository path  1 NON NLS 1 Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint 200 data horizontal Span 2 label set Layout Data data Button change Button new Button composite SWT PUSH change Button set Text Policy bind CVS Project Properties Page Change Sharing 5 NON NLS 1 data new Grid Data data horizontal Alignment Grid Data FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint change Button compute Size SWT DEFAULT SWT DEFAULT true x change Button set Layout Data data change Button add Listener SWT Selection new Listener public void handle Event Event e Repository Selection Dialog dialog new Repository Selection Dialog get Shell old Location dialog open ICVS Repository Location location dialog get Location if location null return new Location location initialize Values new Location initialize Values old Location Workbench Help set Help get Control I Help Context Ids PROJECT PROPERTY PAGE Dialog apply Dialog Font parent return composite  createContents setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout numColumns setLayout createLabel CVSProjectPropertiesPage connectionType methodLabel createLabel createLabel CVSProjectPropertiesPage userLabel createLabel createLabel CVSPropertiesPage hostLabel createLabel createLabel CVSPropertiesPage portLabel createLabel createLabel CVSPropertiesPage pathLabel createLabel createLabel CVSPropertiesPage moduleLabel createLabel createLabel CVSPropertiesPage tagLabel createLabel createLabel fetchButton createCheckBox CVSProjectPropertiesPage fetchAbsentDirectoriesOnUpdate fetchButton addListener handleEvent fetchButton getSelection watchEditButton createCheckBox CVSProjectPropertiesPage configureForWatchEdit watchEditButton addListener handleEvent watchEdit watchEditButton getSelection createLabel createLabel createLabel createLabel setText CVSProjectPropertiesPage You_can_change_the_sharing_of_this_project_to_another_repository_location _However _this_is_only_possible_if_the_new_location_is___compatible___ on_the_same_host_with_the_same_repository_path _1 GridData GridData GridData FILL_HORIZONTAL widthHint horizontalSpan setLayoutData changeButton changeButton setText CVSProjectPropertiesPage Change_Sharing_5 GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint changeButton computeSize changeButton setLayoutData changeButton addListener handleEvent RepositorySelectionDialog RepositorySelectionDialog getShell oldLocation ICVSRepositoryLocation getLocation newLocation initializeValues newLocation initializeValues oldLocation WorkbenchHelp setHelp getControl IHelpContextIds PROJECT_PROPERTY_PAGE applyDialogFont
Utility method that creates a label instance and sets the default layout data param parent the parent for the new label param text the text for the new label return the new label protected Label create Label Composite parent String text int span Label label new Label parent SWT LEFT label set Text text Grid Data data new Grid Data data horizontal Span span data horizontal Alignment Grid Data FILL label set Layout Data data return label  createLabel setText GridData GridData horizontalSpan horizontalAlignment GridData setLayoutData
Creates a new checkbox instance and sets the default layout data param group the composite in which to create the checkbox param label the string to set into the checkbox return the new checkbox protected Button create Check Box Composite group String label Button button new Button group SWT CHECK SWT LEFT button set Text label Grid Data data new Grid Data data horizontal Span 2 button set Layout Data data return button  createCheckBox setText GridData GridData horizontalSpan setLayoutData
Initializes the page private void initialize Get the project that is the source of this property page project null I Adaptable element get Element if element instanceof I Project project I Project element else Object adapter element get Adapter I Project class if adapter instanceof I Project project I Project adapter Do some pre checks to ensure we re in a good state provider CVS Team Provider Repository Provider get Provider project CVS Provider Plugin get Type Id if provider null return CVS Workspace Root cvs Root provider getCVS Workspace Root try old Location cvs Root get Remote Location fetch provider get Fetch Absent Directories watch Edit provider is Watch Edit Enabled catch Team Exception e handle e  IAdaptable getElement IProject IProject getAdapter IProject IProject IProject CVSTeamProvider RepositoryProvider getProvider CVSProviderPlugin getTypeId CVSWorkspaceRoot cvsRoot getCVSWorkspaceRoot oldLocation cvsRoot getRemoteLocation getFetchAbsentDirectories watchEdit isWatchEditEnabled TeamException
Set the initial values of the widgets private void initialize Values ICVS Repository Location location if provider null return CVS Workspace Root cvs Root provider getCVS Workspace Root ICVS Folder folder cvs Root get Local Root try if folder isCVS Folder return method Label set Text location get Method get Name info location get User Info true user Label set Text info get Username host Label set Text location get Host int port location get Port if port ICVS Repository Location USE DEFAULT PORT port Label set Text Policy bind CVS Properties Page default Port NON NLS 1 else port Label set Text port NON NLS 1 path Label set Text location get Root Directory Folder Sync Info sync Info folder get Folder Sync Info if sync Info null return String label sync Info get Repository if label equals Folder Sync Info VIRTUAL DIRECTORY label Policy bind CVS Properties Page virtual Module label NON NLS 1 module Label set Text label fetch Button set Selection fetch watch Edit Button set Selection watch Edit catch Team Exception e handle e initialize Tag  initializeValues ICVSRepositoryLocation CVSWorkspaceRoot cvsRoot getCVSWorkspaceRoot ICVSFolder cvsRoot getLocalRoot isCVSFolder methodLabel setText getMethod getName getUserInfo userLabel setText getUsername hostLabel setText getHost getPort ICVSRepositoryLocation USE_DEFAULT_PORT portLabel setText CVSPropertiesPage defaultPort portLabel setText pathLabel setText getRootDirectory FolderSyncInfo syncInfo getFolderSyncInfo syncInfo syncInfo getRepository FolderSyncInfo VIRTUAL_DIRECTORY CVSPropertiesPage virtualModule moduleLabel setText fetchButton setSelection watchEditButton setSelection watchEdit TeamException initializeTag
private void initialize Tag provider CVS Team Provider Repository Provider get Provider project CVS Provider Plugin get Type Id if provider null return try ICVS Folder local CVS Workspace Root getCVS Folder For project CVS Tag tag local get Folder Sync Info get Tag tag Label set Text get Tag Label tag catch Team Exception e handle e  initializeTag CVSTeamProvider RepositoryProvider getProvider CVSProviderPlugin getTypeId ICVSFolder CVSWorkspaceRoot getCVSFolderFor CVSTag getFolderSyncInfo getTag tagLabel setText getTagLabel TeamException
new Progress Monitor Dialog get Shell run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try monitor begin Task Policy bind CVS Project Properties Page progress Task Name NON NLS 1 new Location null 0 100 change Read Only 0 100 0 if new Location null provider set Remote Root new Location Policy sub Monitor For monitor 100 if change Read Only 0 set Read Only watch Edit Policy infinite Sub Monitor For monitor 100 catch Team Exception e throw new Invocation Target Exception e  ProgressMonitorDialog getShell IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask CVSProjectPropertiesPage progressTaskName newLocation changeReadOnly newLocation setRemoteRoot newLocation subMonitorFor changeReadOnly setReadOnly watchEdit infiniteSubMonitorFor TeamException InvocationTargetException
public boolean perform Ok final boolean change Read Only false try if fetch provider get Fetch Absent Directories provider set Fetch Absent Directories fetch if watch Edit provider is Watch Edit Enabled provider set Watch Edit Enabled watch Edit change Read Only 0 true catch CVS Exception e handle e if new Location null change Read Only 0 return true try if new Location null is Compatible new Location old Location if Message Dialog open Question get Shell Policy bind CVS Project Properties Page 32 Policy bind CVS Project Properties Page 33 NON NLS 1 NON NLS 2 return false new Progress Monitor Dialog get Shell run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try monitor begin Task Policy bind CVS Project Properties Page progress Task Name NON NLS 1 new Location null 0 100 change Read Only 0 100 0 if new Location null provider set Remote Root new Location Policy sub Monitor For monitor 100 if change Read Only 0 set Read Only watch Edit Policy infinite Sub Monitor For monitor 100 catch Team Exception e throw new Invocation Target Exception e new Location null if change Read Only 0 CVSUI Plugin broadcast Property Change new Property Change Event this CVSUI Plugin P DECORATORS CHANGED null null catch Invocation Target Exception e handle e catch Interrupted Exception e return false return true  performOk changeReadOnly getFetchAbsentDirectories setFetchAbsentDirectories watchEdit isWatchEditEnabled setWatchEditEnabled watchEdit changeReadOnly CVSException newLocation changeReadOnly newLocation isCompatible newLocation oldLocation MessageDialog openQuestion getShell CVSProjectPropertiesPage CVSProjectPropertiesPage ProgressMonitorDialog getShell IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask CVSProjectPropertiesPage progressTaskName newLocation changeReadOnly newLocation setRemoteRoot newLocation subMonitorFor changeReadOnly setReadOnly watchEdit infiniteSubMonitorFor TeamException InvocationTargetException newLocation changeReadOnly CVSUIPlugin broadcastPropertyChange PropertyChangeEvent CVSUIPlugin P_DECORATORS_CHANGED InvocationTargetException InterruptedException
root accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception only change managed unmodified files if file is Managed file is Modified null file set Read Only watch Edit monitor worked 1  ICVSResourceVisitor visitFile ICVSFile CVSException isManaged isModified setReadOnly watchEdit
public void visit Folder ICVS Folder folder throws CVS Exception folder accept Children this  visitFolder ICVSFolder CVSException acceptChildren
param watch Edit protected void set Read Only final boolean watch Edit final I Progress Monitor monitor throws CVS Exception monitor begin Task null 512 String task Name watch Edit Policy bind CVS Project Properties Page set Read Only NON NLS 1 Policy bind CVS Project Properties Page clear Read Only NON NLS 1 monitor sub Task task Name ICVS Folder root CVS Workspace Root getCVS Folder For project root accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception only change managed unmodified files if file is Managed file is Modified null file set Read Only watch Edit monitor worked 1 public void visit Folder ICVS Folder folder throws CVS Exception folder accept Children this monitor done  watchEdit setReadOnly watchEdit IProgressMonitor CVSException beginTask taskName watchEdit CVSProjectPropertiesPage setReadOnly CVSProjectPropertiesPage clearReadOnly subTask taskName ICVSFolder CVSWorkspaceRoot getCVSFolderFor ICVSResourceVisitor visitFile ICVSFile CVSException isManaged isModified setReadOnly watchEdit visitFolder ICVSFolder CVSException acceptChildren
Shows the given errors to the user protected void handle Throwable t CVSUI Plugin open Error get Shell null null t  CVSUIPlugin openError getShell

see I Project Set Serializer as Reference I Project 1 0 repo Location module project Name tag public String as Reference I Project provider Projects Object context I Progress Monitor monitor throws Team Exception String result new String provider Projects length for int i 0 i provider Projects length i String Buffer buffer new String Buffer buffer append 1 0 NON NLS 1 I Project project provider Projects i CVS Team Provider provider CVS Team Provider Repository Provider get Provider project CVS Workspace Root root provider getCVS Workspace Root CVS Repository Location location CVS Repository Location from String root get Remote Location get Location location set User Muteable true String repo Location location get Location buffer append repo Location buffer append NON NLS 1 ICVS Folder folder root get Local Root Folder Sync Info sync Info folder get Folder Sync Info String module sync Info get Repository buffer append module buffer append NON NLS 1 String project Name folder get Name buffer append project Name CVS Tag tag sync Info get Tag if tag null if tag get Type CVS Tag DATE buffer append NON NLS 1 String tag Name tag get Name buffer append tag Name result i buffer to String return result  IProjectSetSerializer asReference IProject repoLocation projectName asReference IProject providerProjects IProgressMonitor TeamException providerProjects providerProjects StringBuffer StringBuffer IProject providerProjects CVSTeamProvider CVSTeamProvider RepositoryProvider getProvider CVSWorkspaceRoot getCVSWorkspaceRoot CVSRepositoryLocation CVSRepositoryLocation fromString getRemoteLocation getLocation setUserMuteable repoLocation getLocation repoLocation ICVSFolder getLocalRoot FolderSyncInfo syncInfo getFolderSyncInfo syncInfo getRepository projectName getName projectName CVSTag syncInfo getTag getType CVSTag tagName getName tagName toString
Workspace Modify Operation op new Workspace Modify Operation public void execute I Progress Monitor monitor throws Interrupted Exception Invocation Target Exception monitor begin Task 1000 num 0 NON NLS 1 try for int i 0 i size i if locations i null ICVS Remote Folder remote new Remote Folder null locations i modules i tags i new Checkout Single Project Operation null no part remote projects i null location true run new Sub Progress Monitor monitor 1000 finally monitor done  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor InterruptedException InvocationTargetException beginTask ICVSRemoteFolder RemoteFolder CheckoutSingleProjectOperation SubProgressMonitor
see I Project Set Serializer add To Workspace String public I Project add To Workspace String reference Strings String filename Object context I Progress Monitor monitor throws Team Exception final int size reference Strings length final I Project projects new I Project size final ICVS Repository Location locations new ICVS Repository Location size final String modules new String size final CVS Tag tags new CVS Tag size for int i 0 i size i String Tokenizer tokenizer new String Tokenizer reference Strings i NON NLS 1 String version tokenizer next Token if version equals 1 0 NON NLS 1 Bail out this is a newer version return null String repo tokenizer next Token locations i get Location From String repo modules i tokenizer next Token String project Name tokenizer next Token projects i Resources Plugin get Workspace get Root get Project project Name if tokenizer has More Tokens String tag Name tokenizer next Token tags i new CVS Tag tag Name CVS Tag BRANCH Check if any projects will be overwritten and warn the user boolean yes To All false int action final int num new int size for int i 0 i size i Shell shell null I Project project projects i if project exists if shell null if context instanceof Shell shell Shell context else return null action confirm Overwrite project yes To All shell yes To All action 2 message dialog switch action no case 1 Remove it from the set locations i null num 0 break yes to all case 2 yes case 0 break cancel case 3 default return null Workspace Modify Operation op new Workspace Modify Operation public void execute I Progress Monitor monitor throws Interrupted Exception Invocation Target Exception monitor begin Task 1000 num 0 NON NLS 1 try for int i 0 i size i if locations i null ICVS Remote Folder remote new Remote Folder null locations i modules i tags i new Checkout Single Project Operation null no part remote projects i null location true run new Sub Progress Monitor monitor 1000 finally monitor done try op run monitor catch Interrupted Exception e catch Invocation Target Exception e Throwable t e get Target Exception if t instanceof Team Exception throw Team Exception t List result new Array List for int i 0 i projects length i if projects i null result add projects i return I Project result to Array new I Project result size  IProjectSetSerializer addToWorkspace IProject addToWorkspace referenceStrings IProgressMonitor TeamException referenceStrings IProject IProject ICVSRepositoryLocation ICVSRepositoryLocation CVSTag CVSTag StringTokenizer StringTokenizer referenceStrings nextToken nextToken getLocationFromString nextToken projectName nextToken ResourcesPlugin getWorkspace getRoot getProject projectName hasMoreTokens tagName nextToken CVSTag tagName CVSTag yesToAll IProject confirmOverwrite yesToAll yesToAll WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor InterruptedException InvocationTargetException beginTask ICVSRemoteFolder RemoteFolder CheckoutSingleProjectOperation SubProgressMonitor InterruptedException InvocationTargetException getTargetException TeamException TeamException ArrayList IProject toArray IProject
private ICVS Repository Location get Location From String String repo throws CVS Exception create the new location ICVS Repository Location new Location CVS Repository Location from String repo if new Location get Username null new Location get Username length 0 look for an existing location that matched ICVS Repository Location locations Known Repositories get Instance get Repositories for int i 0 i locations length i ICVS Repository Location location locations i if location get Method new Location get Method location get Host equals new Location get Host location get Port new Location get Port location get Root Directory equals new Location get Root Directory return location return new Location  ICVSRepositoryLocation getLocationFromString CVSException ICVSRepositoryLocation newLocation CVSRepositoryLocation fromString newLocation getUsername newLocation getUsername ICVSRepositoryLocation KnownRepositories getInstance getRepositories ICVSRepositoryLocation getMethod newLocation getMethod getHost newLocation getHost getPort newLocation getPort getRootDirectory newLocation getRootDirectory newLocation
final int result new int 1 shell get Display sync Exec new Runnable public void run result 0 dialog open  getDisplay syncExec
private int confirm Overwrite I Project project boolean yes To All Shell shell if yes To All return 2 if project exists return 0 final Message Dialog dialog new Message Dialog shell Policy bind CVS Project Set Serializer Confirm Overwrite Project 8 null Policy bind CVS Project Set Serializer The project  0  already exists  Do you wish to overwrite it  9 project get Name Message Dialog QUESTION NON NLS 1 NON NLS 2 new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL I Dialog Constants YES TO ALL LABEL I Dialog Constants CANCEL LABEL 0 final int result new int 1 shell get Display sync Exec new Runnable public void run result 0 dialog open return result 0  confirmOverwrite IProject yesToAll yesToAll MessageDialog MessageDialog CVSProjectSetSerializer Confirm_Overwrite_Project_8 CVSProjectSetSerializer The_project_ _already_exists _Do_you_wish_to_overwrite_it__9 getName MessageDialog IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants YES_TO_ALL_LABEL IDialogConstants CANCEL_LABEL getDisplay syncExec

Return the appropriate Tag label for properties pages based on the tag type param tag return String public static String get Tag Label CVS Tag tag if tag null return Policy bind CVS File Properties Page none NON NLS 1 switch tag get Type case CVS Tag HEAD return tag get Name case CVS Tag VERSION return Policy bind CVS File Properties Page version tag get Name NON NLS 1 case CVS Tag BRANCH return Policy bind CVS File Properties Page branch tag get Name NON NLS 1 case CVS Tag DATE return Policy bind CVS File Properties Page date tag get Name NON NLS 1 default return tag get Name  getTagLabel CVSTag CVSFilePropertiesPage getType CVSTag getName CVSTag CVSFilePropertiesPage getName CVSTag CVSFilePropertiesPage getName CVSTag CVSFilePropertiesPage getName getName

CVSUI Plugin constructor param descriptor the plugin descriptor public CVSUI Plugin I Plugin Descriptor descriptor super descriptor Initialize the images before the singleton is set to avoid accesses before they are initialized initialize Images initialize Preferences plugin this  CVSUIPlugin CVSUIPlugin IPluginDescriptor initializeImages initializePreferences
Returns the standard display to be used The method first checks if the thread calling this method has an associated display If so this display is returned Otherwise the method returns the default display public static Display get Standard Display Display display Display get Current if display null display Display get Default return display  getStandardDisplay getCurrent getDefault
Creates an image and places it in the image registry protected void create Image Descriptor String id URL baseURL URL url null try url new URL baseURL ICVSUI Constants ICON PATH id catch MalformedURL Exception e Image Descriptor desc Image Descriptor create FromURL url image Descriptors put id desc  createImageDescriptor ICVSUIConstants ICON_PATH MalformedURLException ImageDescriptor ImageDescriptor createFromURL imageDescriptors
Returns the active workbench page Note that the active page may not be the one that the usr perceives as active in some situations so this method of obtaining the activae page should only be used if no other method is available return the active workbench page public static I Workbench Page get Active Page return TeamUI Plugin get Active Page  IWorkbenchPage getActivePage TeamUIPlugin getActivePage
Register for changes made to Team properties public static void add Property Change Listener I Property Change Listener listener property Change Listeners add listener  addPropertyChangeListener IPropertyChangeListener propertyChangeListeners
Deregister as a Team property changes public static void remove Property Change Listener I Property Change Listener listener property Change Listeners remove listener  removePropertyChangeListener IPropertyChangeListener propertyChangeListeners
Broadcast a Team property change public static void broadcast Property Change Property Change Event event for Iterator it property Change Listeners iterator it has Next I Property Change Listener listener I Property Change Listener it next listener property Change event  broadcastPropertyChange PropertyChangeEvent propertyChangeListeners hasNext IPropertyChangeListener IPropertyChangeListener propertyChange
Extract or convert to a Team Exception public static Team Exception as Team Exception Invocation Target Exception e Throwable exception e get Target Exception if exception instanceof Team Exception return Team Exception exception else if exception instanceof Core Exception return new Team Exception Core Exception exception get Status else return new Team Exception new Status I Status ERROR CVSUI Plugin ID 0 Policy bind internal exception NON NLS 1  TeamException TeamException asTeamException InvocationTargetException getTargetException TeamException TeamException CoreException TeamException CoreException getStatus TeamException IStatus CVSUIPlugin
Run an operation involving the given resource If an exception is thrown and the code on the status is I Resource Status OUT OF SYNC LOCAL then the user will be prompted to refresh and try again If they agree then the supplied operation will be run again public static void run With Refresh Shell parent I Resource resources I Runnable With Progress runnable I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception boolean first Time true while true try runnable run monitor return catch Invocation Target Exception e if first Time throw e I Status status null if e get Target Exception instanceof Core Exception status Core Exception e get Target Exception get Status else if e get Target Exception instanceof Team Exception status Team Exception e get Target Exception get Status else throw e if status get Code I Resource Status OUT OF SYNC LOCAL if prompt To Refresh parent resources status try for int i 0 i resources length i resources i refresh Local I Resource DEPTH INFINITE null catch Core Exception core Ex Throw the original exception to the caller log core Ex throw e first Time false Fall through and the operation will be tried again else User chose not to continue Treat it as a cancel throw new Interrupted Exception else throw e  IResourceStatus OUT_OF_SYNC_LOCAL runWithRefresh IResource IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException firstTime InvocationTargetException firstTime IStatus getTargetException CoreException CoreException getTargetException getStatus getTargetException TeamException TeamException getTargetException getStatus getCode IResourceStatus OUT_OF_SYNC_LOCAL promptToRefresh refreshLocal IResource DEPTH_INFINITE CoreException coreEx coreEx firstTime InterruptedException
private static boolean prompt To Refresh final Shell shell final I Resource resources final I Status status final boolean result new boolean false Runnable runnable new Runnable public void run Shell shell To Use shell if shell null shell To Use new Shell Display get Current String question if resources length 1 question Policy bind CVSUI Plugin refresh Question status get Message resources 0 get Full Path to String NON NLS 1 else question Policy bind CVSUI Plugin refresh Multiple Question status get Message NON NLS 1 result 0 Message Dialog open Question shell To Use Policy bind CVSUI Plugin refresh Title question NON NLS 1 Display get Default sync Exec runnable return result 0  promptToRefresh IResource IStatus shellToUse shellToUse getCurrent CVSUIPlugin refreshQuestion getMessage getFullPath toString CVSUIPlugin refreshMultipleQuestion getMessage MessageDialog openQuestion shellToUse CVSUIPlugin refreshTitle getDefault syncExec
Creates a busy cursor and runs the specified runnable May be called from a non UI thread param parent the parent Shell for the dialog param cancelable if true the dialog will support cancelation param runnable the runnable exception Invocation Target Exception when an exception is thrown from the runnable exception Interrupted Exception when the progress monitor is cancelled public static void run With Progress Shell parent boolean cancelable final I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception Utils run With Progress parent cancelable runnable  InvocationTargetException InterruptedException runWithProgress IRunnableWithProgress InvocationTargetException InterruptedException runWithProgress
Creates a busy cursor and runs the specified runnable May be called from a non UI thread param parent the parent Shell for the dialog param cancelable if true the dialog will support cancelation param runnable the runnable param flags customizing attributes for the error handling exception Invocation Target Exception when an exception is thrown from the runnable exception Interrupted Exception when the progress monitor is cancelled public static void run With Progress final Shell parent final boolean cancelable final I Runnable With Progress runnable int flags throws Invocation Target Exception Interrupted Exception if flags PERFORM SYNC EXEC 0 create a runnable that deals with exceptions final Exception exception new Exception null Runnable outer Runnable new Runnable public void run try Utils run With Progress parent cancelable runnable catch Invocation Target Exception e exception 0 e catch Interrupted Exception e exception 0 e get a Display and perform the sync Exec Display display if parent null display Display get Current if display null display Display get Default else display parent get Display display sync Exec outer Runnable handle any exception if exception 0 null Exception e exception 0 if e instanceof Invocation Target Exception throw Invocation Target Exception e else if e instanceof Interrupted Exception throw Interrupted Exception e else impossible but we ll handle it anyway throw new Invocation Target Exception e else Utils run With Progress parent cancelable runnable  InvocationTargetException InterruptedException runWithProgress IRunnableWithProgress InvocationTargetException InterruptedException PERFORM_SYNC_EXEC outerRunnable runWithProgress InvocationTargetException InterruptedException syncExec getCurrent getDefault getDisplay syncExec outerRunnable InvocationTargetException InvocationTargetException InterruptedException InterruptedException InvocationTargetException runWithProgress
Returns the image descriptor for the given image ID Returns null if there is no such image public Image Descriptor get Image Descriptor String id return Image Descriptor image Descriptors get id  ImageDescriptor getImageDescriptor ImageDescriptor imageDescriptors
Returns the singleton plug in instance return the plugin instance public static CVSUI Plugin get Plugin return plugin  CVSUIPlugin getPlugin
Returns the repository manager return the repository manager public synchronized Repository Manager get Repository Manager if repository Manager null repository Manager new Repository Manager try repository Manager startup catch Team Exception e CVSUI Plugin log e return repository Manager  RepositoryManager getRepositoryManager repositoryManager repositoryManager RepositoryManager repositoryManager TeamException CVSUIPlugin repositoryManager
Initializes the table of images used in this plugin private void initialize Images URL baseURL get Descriptor get InstallURL objects create Image Descriptor ICVSUI Constants IMG REPOSITORY baseURL create Image Descriptor ICVSUI Constants IMG REFRESH baseURL create Image Descriptor ICVSUI Constants IMG REFRESH ENABLED baseURL create Image Descriptor ICVSUI Constants IMG REFRESH DISABLED baseURL create Image Descriptor ICVSUI Constants IMG LINK WITH EDITOR baseURL create Image Descriptor ICVSUI Constants IMG LINK WITH EDITOR ENABLED baseURL create Image Descriptor ICVSUI Constants IMG COLLAPSE ALL baseURL create Image Descriptor ICVSUI Constants IMG COLLAPSE ALL ENABLED baseURL create Image Descriptor ICVSUI Constants IMG NEWLOCATION baseURL create Image Descriptor ICVSUI Constants IMG CVSLOGO baseURL create Image Descriptor ICVSUI Constants IMG TAG baseURL create Image Descriptor ICVSUI Constants IMG MODULE baseURL create Image Descriptor ICVSUI Constants IMG CLEAR baseURL create Image Descriptor ICVSUI Constants IMG CLEAR ENABLED baseURL create Image Descriptor ICVSUI Constants IMG CLEAR DISABLED baseURL create Image Descriptor ICVSUI Constants IMG BRANCHES CATEGORY baseURL create Image Descriptor ICVSUI Constants IMG VERSIONS CATEGORY baseURL create Image Descriptor ICVSUI Constants IMG DATES CATEGORY baseURL create Image Descriptor ICVSUI Constants IMG PROJECT VERSION baseURL create Image Descriptor ICVSUI Constants IMG WIZBAN MERGE baseURL create Image Descriptor ICVSUI Constants IMG WIZBAN SHARE baseURL create Image Descriptor ICVSUI Constants IMG WIZBAN DIFF baseURL create Image Descriptor ICVSUI Constants IMG WIZBAN KEYWORD baseURL create Image Descriptor ICVSUI Constants IMG WIZBAN NEW LOCATION baseURL create Image Descriptor ICVSUI Constants IMG MERGEABLE CONFLICT baseURL create Image Descriptor ICVSUI Constants IMG QUESTIONABLE baseURL create Image Descriptor ICVSUI Constants IMG MERGED baseURL create Image Descriptor ICVSUI Constants IMG EDITED baseURL create Image Descriptor ICVSUI Constants IMG NO REMOTEDIR baseURL create Image Descriptor ICVSUI Constants IMG CVS CONSOLE baseURL create Image Descriptor ICVSUI Constants IMG DATE baseURL create Image Descriptor ICVSUI Constants IMG CHANGELOG baseURL special create Image Descriptor glyphs glyph1 gif baseURL NON NLS 1 create Image Descriptor glyphs glyph2 gif baseURL NON NLS 1 create Image Descriptor glyphs glyph3 gif baseURL NON NLS 1 create Image Descriptor glyphs glyph4 gif baseURL NON NLS 1 create Image Descriptor glyphs glyph5 gif baseURL NON NLS 1 create Image Descriptor glyphs glyph6 gif baseURL NON NLS 1 create Image Descriptor glyphs glyph7 gif baseURL NON NLS 1 create Image Descriptor glyphs glyph8 gif baseURL NON NLS 1  initializeImages getDescriptor getInstallURL createImageDescriptor ICVSUIConstants IMG_REPOSITORY createImageDescriptor ICVSUIConstants IMG_REFRESH createImageDescriptor ICVSUIConstants IMG_REFRESH_ENABLED createImageDescriptor ICVSUIConstants IMG_REFRESH_DISABLED createImageDescriptor ICVSUIConstants IMG_LINK_WITH_EDITOR createImageDescriptor ICVSUIConstants IMG_LINK_WITH_EDITOR_ENABLED createImageDescriptor ICVSUIConstants IMG_COLLAPSE_ALL createImageDescriptor ICVSUIConstants IMG_COLLAPSE_ALL_ENABLED createImageDescriptor ICVSUIConstants IMG_NEWLOCATION createImageDescriptor ICVSUIConstants IMG_CVSLOGO createImageDescriptor ICVSUIConstants IMG_TAG createImageDescriptor ICVSUIConstants IMG_MODULE createImageDescriptor ICVSUIConstants IMG_CLEAR createImageDescriptor ICVSUIConstants IMG_CLEAR_ENABLED createImageDescriptor ICVSUIConstants IMG_CLEAR_DISABLED createImageDescriptor ICVSUIConstants IMG_BRANCHES_CATEGORY createImageDescriptor ICVSUIConstants IMG_VERSIONS_CATEGORY createImageDescriptor ICVSUIConstants IMG_DATES_CATEGORY createImageDescriptor ICVSUIConstants IMG_PROJECT_VERSION createImageDescriptor ICVSUIConstants IMG_WIZBAN_MERGE createImageDescriptor ICVSUIConstants IMG_WIZBAN_SHARE createImageDescriptor ICVSUIConstants IMG_WIZBAN_DIFF createImageDescriptor ICVSUIConstants IMG_WIZBAN_KEYWORD createImageDescriptor ICVSUIConstants IMG_WIZBAN_NEW_LOCATION createImageDescriptor ICVSUIConstants IMG_MERGEABLE_CONFLICT createImageDescriptor ICVSUIConstants IMG_QUESTIONABLE createImageDescriptor ICVSUIConstants IMG_MERGED createImageDescriptor ICVSUIConstants IMG_EDITED createImageDescriptor ICVSUIConstants IMG_NO_REMOTEDIR createImageDescriptor ICVSUIConstants IMG_CVS_CONSOLE createImageDescriptor ICVSUIConstants IMG_DATE createImageDescriptor ICVSUIConstants IMG_CHANGELOG createImageDescriptor createImageDescriptor createImageDescriptor createImageDescriptor createImageDescriptor createImageDescriptor createImageDescriptor createImageDescriptor
Convenience method for logging statuses to the plugin log param status the status to log public static void log I Status status get Plugin get Log log status  IStatus getPlugin getLog
public static void log Core Exception e log e get Status get Severity Policy bind simple Internal e NON NLS 1  CoreException getStatus getSeverity simpleInternal
Log the given exception along with the provided message and severity indicator public static void log int severity String message Throwable e log new Status severity ID 0 message e 
Convenience method for showing an error dialog param shell a valid shell or null param exception the exception to be report param title the title to be displayed return I Status the status that was displayed to the user public static I Status open Error Shell shell String title String message Throwable exception return open Error shell title message exception LOG OTHER EXCEPTIONS  IStatus IStatus openError openError LOG_OTHER_EXCEPTIONS
Convenience method for showing an error dialog param shell a valid shell or null param exception the exception to be report param title the title to be displayed param flags customizing attributes for the error handling return I Status the status that was displayed to the user public static I Status open Error Shell provided Shell String title String message Throwable exception int flags Unwrap Invocation Target Exceptions if exception instanceof Invocation Target Exception Throwable target Invocation Target Exception exception get Target Exception re throw any runtime exceptions or errors so they can be handled by the workbench if target instanceof Runtime Exception throw Runtime Exception target if target instanceof Error throw Error target return open Error provided Shell title message target flags Determine the status to be displayed and possibly logged I Status status null boolean log false if exception instanceof Core Exception status Core Exception exception get Status log flags LOG CORE EXCEPTIONS 0 else if exception instanceof Team Exception status Team Exception exception get Status log flags LOG TEAM EXCEPTIONS 0 else if exception instanceof Interrupted Exception return new CVS Status I Status OK Policy bind ok NON NLS 1 else if exception null status new CVS Status I Status ERROR Policy bind internal exception NON NLS 1 log flags LOG OTHER EXCEPTIONS 0 if title null title Policy bind Simple Internal NON NLS 1 Check for a build error and report it differently if status get Code I Resource Status BUILD FAILED message Policy bind build Error NON NLS 1 log true Check for multi status with only one child if status is Multi Status status get Children length 1 status status get Children 0 if status isOK return status Log if the user requested it if log CVSUI Plugin log status get Severity status get Message exception Create a runnable that will display the error status final String display Title title final String display Message message final I Status display Status status final I Openable In Shell openable new I Openable In Shell public void open Shell shell if display Status get Severity I Status INFO display Status is Multi Status Message Dialog open Information shell Policy bind information display Status get Message NON NLS 1 else Error Dialog open Error shell display Title display Message display Status open Dialog provided Shell openable flags return the status we display return status  IStatus IStatus openError providedShell InvocationTargetExceptions InvocationTargetException InvocationTargetException getTargetException RuntimeException RuntimeException openError providedShell IStatus CoreException CoreException getStatus LOG_CORE_EXCEPTIONS TeamException TeamException getStatus LOG_TEAM_EXCEPTIONS InterruptedException CVSStatus IStatus CVSStatus IStatus LOG_OTHER_EXCEPTIONS SimpleInternal getCode IResourceStatus BUILD_FAILED buildError isMultiStatus getChildren getChildren CVSUIPlugin getSeverity getMessage displayTitle displayMessage IStatus displayStatus IOpenableInShell IOpenableInShell displayStatus getSeverity IStatus displayStatus isMultiStatus MessageDialog openInformation displayStatus getMessage ErrorDialog openError displayTitle displayMessage displayStatus openDialog providedShell
public interface I Openable In Shell public void open Shell shell  IOpenableInShell
Open the dialog code provided in the I Openable In Shell ensuring that the provided whll is valid This method will provide a shell to the I Openable In Shell if one is not provided to the method param provided Shell param openable param flags public static void open Dialog Shell provided Shell final I Openable In Shell openable int flags If no shell was provided try to get one from the active window if provided Shell null I Workbench Window window CVSUI Plugin get Plugin get Workbench get Active Workbench Window if window null provided Shell window get Shell sync exec when we do this just in case flags flags PERFORM SYNC EXEC Create a runnable that will display the error status final Shell shell provided Shell Runnable outer Runnable new Runnable public void run Shell display Shell if shell null Display display Display get Current display Shell new Shell display else display Shell shell openable open display Shell if shell null display Shell dispose Execute the above runnable as determined by the parameters if shell null flags PERFORM SYNC EXEC 0 Display display if shell null display Display get Current if display null display Display get Default else display shell get Display display sync Exec outer Runnable else outer Runnable run  IOpenableInShell IOpenableInShell providedShell openDialog providedShell IOpenableInShell providedShell IWorkbenchWindow CVSUIPlugin getPlugin getWorkbench getActiveWorkbenchWindow providedShell getShell PERFORM_SYNC_EXEC providedShell outerRunnable displayShell getCurrent displayShell displayShell displayShell displayShell PERFORM_SYNC_EXEC getCurrent getDefault getDisplay syncExec outerRunnable outerRunnable
Initializes the preferences for this plugin if necessary protected void initialize Preferences I Preference Store store get Preference Store Get the plugin preferences for CVS Core Preferences core Prefs CVS Provider Plugin get Plugin get Plugin Preferences store set Default ICVSUI Constants PREF REPOSITORIES ARE BINARY false store set Default ICVSUI Constants PREF SHOW COMMENTS true store set Default ICVSUI Constants PREF SHOW TAGS true store set Default ICVSUI Constants PREF HISTORY VIEW EDITOR LINKING false store set Default ICVSUI Constants PREF PRUNE EMPTY DIRECTORIES CVS Provider Plugin DEFAULT PRUNE store set Default ICVSUI Constants PREF TIMEOUT CVS Provider Plugin DEFAULT TIMEOUT store set Default ICVSUI Constants PREF CONSIDER CONTENTS true store set Default ICVSUI Constants PREF COMPRESSION LEVEL CVS Provider Plugin DEFAULT COMPRESSION LEVEL store set Default ICVSUI Constants PREF TEXT KSUBST CVS Provider Plugin DEFAULT TEXT KSUBST OPTION to Mode store set Default ICVSUI Constants PREF USE PLATFORM LINEEND true store set Default ICVSUI Constants PREF REPLACE UNMANAGED true store set Default ICVSUI Constants PREF CVS RSH CVS Provider Plugin DEFAULT CVS RSH store set Default ICVSUI Constants PREF CVS RSH PARAMETERS CVS Provider Plugin DEFAULT CVS RSH PARAMETERS store set Default ICVSUI Constants PREF CVS SERVER CVS Provider Plugin DEFAULT CVS SERVER store set Default ICVSUI Constants PREF EXT CONNECTION METHOD PROXY ext NON NLS 1 store set Default ICVSUI Constants PREF PROMPT ON CHANGE GRANULARITY true store set Default ICVSUI Constants PREF DETERMINE SERVER VERSION true store set Default ICVSUI Constants PREF CONFIRM MOVE TAG CVS Provider Plugin DEFAULT CONFIRM MOVE TAG store set Default ICVSUI Constants PREF DEBUG PROTOCOL false store set Default ICVSUI Constants PREF WARN REMEMBERING MERGES true store set Default ICVSUI Constants PREF SHOW COMPARE REVISION IN DIALOG false Preference Converter set Default store ICVSUI Constants PREF CONSOLE COMMAND COLOR new RGB 0 0 0 Preference Converter set Default store ICVSUI Constants PREF CONSOLE MESSAGE COLOR new RGB 0 0 255 Preference Converter set Default store ICVSUI Constants PREF CONSOLE ERROR COLOR new RGB 255 0 0 store set Default ICVSUI Constants PREF CONSOLE SHOW ON ERROR false store set Default ICVSUI Constants PREF CONSOLE SHOW ON MESSAGE false store set Default ICVSUI Constants PREF FILETEXT DECORATION CVS Decorator Configuration DEFAULT FILETEXTFORMAT store set Default ICVSUI Constants PREF FOLDERTEXT DECORATION CVS Decorator Configuration DEFAULT FOLDERTEXTFORMAT store set Default ICVSUI Constants PREF PROJECTTEXT DECORATION CVS Decorator Configuration DEFAULT PROJECTTEXTFORMAT store set Default ICVSUI Constants PREF FIRST STARTUP true store set Default ICVSUI Constants PREF ADDED FLAG CVS Decorator Configuration DEFAULT ADDED FLAG store set Default ICVSUI Constants PREF DIRTY FLAG CVS Decorator Configuration DEFAULT DIRTY FLAG store set Default ICVSUI Constants PREF SHOW ADDED DECORATION true store set Default ICVSUI Constants PREF SHOW HASREMOTE DECORATION true store set Default ICVSUI Constants PREF SHOW DIRTY DECORATION false store set Default ICVSUI Constants PREF SHOW NEWRESOURCE DECORATION true store set Default ICVSUI Constants PREF CALCULATE DIRTY true store set Default ICVSUI Constants PREF PROMPT ON MIXED TAGS true store set Default ICVSUI Constants PREF PROMPT ON SAVING IN SYNC true store set Default ICVSUI Constants PREF SAVE DIRTY EDITORS ICVSUI Constants OPTION PROMPT Set the watch edit preferences defaults and values store set Default ICVSUI Constants PREF CHECKOUT READ ONLY core Prefs get Default Boolean CVS Provider Plugin READ ONLY store set Default ICVSUI Constants PREF EDIT ACTION ICVSUI Constants PREF EDIT PROMPT EDIT store set Default ICVSUI Constants PREF EDIT PROMPT ICVSUI Constants PREF EDIT PROMPT IF EDITORS Ensure that the preference values in UI match Core store set Value ICVSUI Constants PREF CHECKOUT READ ONLY core Prefs get Boolean CVS Provider Plugin READ ONLY Forward the values to the CVS plugin CVS Provider Plugin get Plugin set Prune Empty Directories store get Boolean ICVSUI Constants PREF PRUNE EMPTY DIRECTORIES CVS Provider Plugin get Plugin set Timeout store get Int ICVSUI Constants PREF TIMEOUT CVS Provider Plugin get Plugin set Cvs Rsh Command store get String ICVSUI Constants PREF CVS RSH CVS Provider Plugin get Plugin set Cvs Rsh Parameters store get String ICVSUI Constants PREF CVS RSH PARAMETERS CVS Provider Plugin get Plugin set Cvs Server store get String ICVSUI Constants PREF CVS SERVER CVS Repository Location set Ext Connection Method Proxy store get String ICVSUI Constants PREF EXT CONNECTION METHOD PROXY CVS Provider Plugin get Plugin set Quietness CVS Preferences Page get Quietness Option For store get Int ICVSUI Constants PREF QUIETNESS CVS Provider Plugin get Plugin set Compression Level store get Int ICVSUI Constants PREF COMPRESSION LEVEL CVS Provider Plugin get Plugin set Replace Unmanaged store get Boolean ICVSUI Constants PREF REPLACE UNMANAGED CVS Provider Plugin get Plugin set Default TextK Subst Option K Subst Option from Mode store get String ICVSUI Constants PREF TEXT KSUBST CVS Provider Plugin get Plugin set Use Platform Lineend store get Boolean ICVSUI Constants PREF USE PLATFORM LINEEND CVS Provider Plugin get Plugin set Repositories Are Binary store get Boolean ICVSUI Constants PREF REPOSITORIES ARE BINARY CVS Provider Plugin get Plugin set Determine Version Enabled store get Boolean ICVSUI Constants PREF DETERMINE SERVER VERSION CVS Provider Plugin get Plugin set Confirm Move Tag Enabled store get Boolean ICVSUI Constants PREF CONFIRM MOVE TAG CVS Provider Plugin get Plugin set Debug Protocol CVS Provider Plugin get Plugin is Debug Protocol store get Boolean ICVSUI Constants PREF DEBUG PROTOCOL  initializePreferences IPreferenceStore getPreferenceStore corePrefs CVSProviderPlugin getPlugin getPluginPreferences setDefault ICVSUIConstants PREF_REPOSITORIES_ARE_BINARY setDefault ICVSUIConstants PREF_SHOW_COMMENTS setDefault ICVSUIConstants PREF_SHOW_TAGS setDefault ICVSUIConstants PREF_HISTORY_VIEW_EDITOR_LINKING setDefault ICVSUIConstants PREF_PRUNE_EMPTY_DIRECTORIES CVSProviderPlugin DEFAULT_PRUNE setDefault ICVSUIConstants PREF_TIMEOUT CVSProviderPlugin DEFAULT_TIMEOUT setDefault ICVSUIConstants PREF_CONSIDER_CONTENTS setDefault ICVSUIConstants PREF_COMPRESSION_LEVEL CVSProviderPlugin DEFAULT_COMPRESSION_LEVEL setDefault ICVSUIConstants PREF_TEXT_KSUBST CVSProviderPlugin DEFAULT_TEXT_KSUBST_OPTION toMode setDefault ICVSUIConstants PREF_USE_PLATFORM_LINEEND setDefault ICVSUIConstants PREF_REPLACE_UNMANAGED setDefault ICVSUIConstants PREF_CVS_RSH CVSProviderPlugin DEFAULT_CVS_RSH setDefault ICVSUIConstants PREF_CVS_RSH_PARAMETERS CVSProviderPlugin DEFAULT_CVS_RSH_PARAMETERS setDefault ICVSUIConstants PREF_CVS_SERVER CVSProviderPlugin DEFAULT_CVS_SERVER setDefault ICVSUIConstants PREF_EXT_CONNECTION_METHOD_PROXY setDefault ICVSUIConstants PREF_PROMPT_ON_CHANGE_GRANULARITY setDefault ICVSUIConstants PREF_DETERMINE_SERVER_VERSION setDefault ICVSUIConstants PREF_CONFIRM_MOVE_TAG CVSProviderPlugin DEFAULT_CONFIRM_MOVE_TAG setDefault ICVSUIConstants PREF_DEBUG_PROTOCOL setDefault ICVSUIConstants PREF_WARN_REMEMBERING_MERGES setDefault ICVSUIConstants PREF_SHOW_COMPARE_REVISION_IN_DIALOG PreferenceConverter setDefault ICVSUIConstants PREF_CONSOLE_COMMAND_COLOR PreferenceConverter setDefault ICVSUIConstants PREF_CONSOLE_MESSAGE_COLOR PreferenceConverter setDefault ICVSUIConstants PREF_CONSOLE_ERROR_COLOR setDefault ICVSUIConstants PREF_CONSOLE_SHOW_ON_ERROR setDefault ICVSUIConstants PREF_CONSOLE_SHOW_ON_MESSAGE setDefault ICVSUIConstants PREF_FILETEXT_DECORATION CVSDecoratorConfiguration DEFAULT_FILETEXTFORMAT setDefault ICVSUIConstants PREF_FOLDERTEXT_DECORATION CVSDecoratorConfiguration DEFAULT_FOLDERTEXTFORMAT setDefault ICVSUIConstants PREF_PROJECTTEXT_DECORATION CVSDecoratorConfiguration DEFAULT_PROJECTTEXTFORMAT setDefault ICVSUIConstants PREF_FIRST_STARTUP setDefault ICVSUIConstants PREF_ADDED_FLAG CVSDecoratorConfiguration DEFAULT_ADDED_FLAG setDefault ICVSUIConstants PREF_DIRTY_FLAG CVSDecoratorConfiguration DEFAULT_DIRTY_FLAG setDefault ICVSUIConstants PREF_SHOW_ADDED_DECORATION setDefault ICVSUIConstants PREF_SHOW_HASREMOTE_DECORATION setDefault ICVSUIConstants PREF_SHOW_DIRTY_DECORATION setDefault ICVSUIConstants PREF_SHOW_NEWRESOURCE_DECORATION setDefault ICVSUIConstants PREF_CALCULATE_DIRTY setDefault ICVSUIConstants PREF_PROMPT_ON_MIXED_TAGS setDefault ICVSUIConstants PREF_PROMPT_ON_SAVING_IN_SYNC setDefault ICVSUIConstants PREF_SAVE_DIRTY_EDITORS ICVSUIConstants OPTION_PROMPT setDefault ICVSUIConstants PREF_CHECKOUT_READ_ONLY corePrefs getDefaultBoolean CVSProviderPlugin READ_ONLY setDefault ICVSUIConstants PREF_EDIT_ACTION ICVSUIConstants PREF_EDIT_PROMPT_EDIT setDefault ICVSUIConstants PREF_EDIT_PROMPT ICVSUIConstants PREF_EDIT_PROMPT_IF_EDITORS setValue ICVSUIConstants PREF_CHECKOUT_READ_ONLY corePrefs getBoolean CVSProviderPlugin READ_ONLY CVSProviderPlugin getPlugin setPruneEmptyDirectories getBoolean ICVSUIConstants PREF_PRUNE_EMPTY_DIRECTORIES CVSProviderPlugin getPlugin setTimeout getInt ICVSUIConstants PREF_TIMEOUT CVSProviderPlugin getPlugin setCvsRshCommand getString ICVSUIConstants PREF_CVS_RSH CVSProviderPlugin getPlugin setCvsRshParameters getString ICVSUIConstants PREF_CVS_RSH_PARAMETERS CVSProviderPlugin getPlugin setCvsServer getString ICVSUIConstants PREF_CVS_SERVER CVSRepositoryLocation setExtConnectionMethodProxy getString ICVSUIConstants PREF_EXT_CONNECTION_METHOD_PROXY CVSProviderPlugin getPlugin setQuietness CVSPreferencesPage getQuietnessOptionFor getInt ICVSUIConstants PREF_QUIETNESS CVSProviderPlugin getPlugin setCompressionLevel getInt ICVSUIConstants PREF_COMPRESSION_LEVEL CVSProviderPlugin getPlugin setReplaceUnmanaged getBoolean ICVSUIConstants PREF_REPLACE_UNMANAGED CVSProviderPlugin getPlugin setDefaultTextKSubstOption KSubstOption fromMode getString ICVSUIConstants PREF_TEXT_KSUBST CVSProviderPlugin getPlugin setUsePlatformLineend getBoolean ICVSUIConstants PREF_USE_PLATFORM_LINEEND CVSProviderPlugin getPlugin setRepositoriesAreBinary getBoolean ICVSUIConstants PREF_REPOSITORIES_ARE_BINARY CVSProviderPlugin getPlugin setDetermineVersionEnabled getBoolean ICVSUIConstants PREF_DETERMINE_SERVER_VERSION CVSProviderPlugin getPlugin setConfirmMoveTagEnabled getBoolean ICVSUIConstants PREF_CONFIRM_MOVE_TAG CVSProviderPlugin getPlugin setDebugProtocol CVSProviderPlugin getPlugin isDebugProtocol getBoolean ICVSUIConstants PREF_DEBUG_PROTOCOL
see Plugin startup public void startup throws Core Exception super startup Policy localize org eclipse team internal ccvs ui messages NON NLS 1 CVS Adapter Factory factory new CVS Adapter Factory Platform get Adapter Manager register Adapters factory ICVS Remote File class Platform get Adapter Manager register Adapters factory ICVS Remote Folder class Platform get Adapter Manager register Adapters factory ICVS Repository Location class Platform get Adapter Manager register Adapters factory Repository Root class console new CVS Output Console Ensure that known repository locations are cached get Repository Manager startup I Preference Store store get Preference Store if store get Boolean ICVSUI Constants PREF FIRST STARTUP If we enable the decorator in the XML the CVS plugin will be loaded on startup even if the user never uses CVS Therefore we enable the decorator on the first start of the CVS plugin since this indicates that the user has done something with CVS Subsequent startups will load the CVS plugin unless the user disables the decorator In this case we will not reenable since we only enable auatomatically on the first startup PlatformUI get Workbench get Decorator Manager set Enabled CVS Lightweight Decorator ID true store set Value ICVSUI Constants PREF FIRST STARTUP false  CoreException CVSAdapterFactory CVSAdapterFactory getAdapterManager registerAdapters ICVSRemoteFile getAdapterManager registerAdapters ICVSRemoteFolder getAdapterManager registerAdapters ICVSRepositoryLocation getAdapterManager registerAdapters RepositoryRoot CVSOutputConsole getRepositoryManager IPreferenceStore getPreferenceStore getBoolean ICVSUIConstants PREF_FIRST_STARTUP getWorkbench getDecoratorManager setEnabled CVSLightweightDecorator setValue ICVSUIConstants PREF_FIRST_STARTUP
public static I Working Set get Working Set I Resource resources String name I Working Set working Set PlatformUI get Workbench get Working Set Manager get Working Set name if working Set null working Set PlatformUI get Workbench get Working Set Manager create Working Set name resources PlatformUI get Workbench get Working Set Manager add Working Set working Set else working Set set Elements resources return working Set  IWorkingSet getWorkingSet IResource IWorkingSet workingSet getWorkbench getWorkingSetManager getWorkingSet workingSet workingSet getWorkbench getWorkingSetManager createWorkingSet getWorkbench getWorkingSetManager addWorkingSet workingSet workingSet setElements workingSet
see Plugin shutdown public void shutdown throws Core Exception super shutdown try if repository Manager null repository Manager shutdown catch Team Exception e throw new Core Exception e get Status console shutdown  CoreException repositoryManager repositoryManager TeamException CoreException getStatus
return Returns the cvs Workspace Synchronize View Page public Workspace Synchronize Participant get Cvs Workspace Synchronize Participant I Synchronize Participant Reference reference TeamUI get Synchronize Manager get Workspace Synchronize Participant ID null try if reference null return Workspace Synchronize Participant reference get Participant else return null catch Team Exception e return null  cvsWorkspaceSynchronizeViewPage WorkspaceSynchronizeParticipant getCvsWorkspaceSynchronizeParticipant ISynchronizeParticipantReference getSynchronizeManager WorkspaceSynchronizeParticipant WorkspaceSynchronizeParticipant getParticipant TeamException

private Combo from Year Combo public Date Area Dialog parent Dialog I Dialog Settings settings super parent Dialog settings  fromYearCombo DateArea parentDialog IDialogSettings parentDialog
public void create Area Composite parent Composite composite create Composite parent 4 initialize Dialog Units composite create Label composite Policy bind Date Tag Dialog 0 1 NON NLS 1 from Month Combo new Combo composite SWT READ ONLY from Day Combo new Combo composite SWT READ ONLY from Day Combo set Text Limit 2 from Year Combo new Combo composite SWT NONE from Year Combo set Text Limit 4 set day month and year combos with numbers years allows a selection from the past 5 years or any year written in String days new String 31 for int i 0 i 31 i days i String value Of i 1 String months new String 12 Simple Date Format format new Simple Date Format MMMM NON NLS 1 Calendar calendar Calendar get Instance for int i 0 i 12 i calendar set Calendar MONTH i months i format format calendar get Time String years new String 5 Calendar calender Calendar get Instance for int i 0 i 5 i years i String value Of calender get 1 i from Day Combo set Items days from Month Combo set Items months from Year Combo set Items years  createArea createComposite initializeDialogUnits createLabel DateTagDialog fromMonthCombo READ_ONLY fromDayCombo READ_ONLY fromDayCombo setTextLimit fromYearCombo fromYearCombo setTextLimit valueOf SimpleDateFormat SimpleDateFormat getInstance getTime getInstance valueOf fromDayCombo setItems fromMonthCombo setItems fromYearCombo setItems
public void initialize Values Calendar calendar from Day Combo select calendar get Calendar DATE 1 from Month Combo select calendar get Calendar MONTH String year Value String value Of calendar get Calendar YEAR int index from Year Combo index Of year Value if index 1 from Year Combo add year Value index from Year Combo index Of year Value from Year Combo select index time Area initialize Values calendar  initializeValues fromDayCombo fromMonthCombo yearValue valueOf fromYearCombo indexOf yearValue fromYearCombo yearValue fromYearCombo indexOf yearValue fromYearCombo timeArea initializeValues
public void update Widget Enablements Do nothing  updateWidgetEnablements
public void adjust Calendar Calendar calendar calendar set Integer parse Int String value Of from Year Combo get Text from Month Combo get Selection Index Integer parse Int String value Of from Day Combo get Text 0 0 0  adjustCalendar parseInt valueOf fromYearCombo getText fromMonthCombo getSelectionIndex parseInt valueOf fromDayCombo getText
private Button include Time local Time utc Time public Time Area Dialog parent Dialog I Dialog Settings settings super parent Dialog settings  includeTime localTime utcTime TimeArea parentDialog IDialogSettings parentDialog
include Time add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Widget Enablements  includeTime addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateWidgetEnablements
public void create Area Composite parent Composite composite create Composite parent 2 initialize Dialog Units composite include Time create Checkbox composite Policy bind Date Tag Dialog 1 2 NON NLS 1 create Label composite Policy bind Date Tag Dialog 2 1 NON NLS 1 Composite date Composite new Composite composite SWT NONE Grid Layout date Layout new Grid Layout date Layout num Columns 3 date Composite set Layout date Layout hour Combo new Combo date Composite SWT READ ONLY hour Combo set Text Limit 2 minute Combo new Combo date Composite SWT READ ONLY minute Combo set Text Limit 2 second Combo new Combo date Composite SWT READ ONLY second Combo set Text Limit 2 local Time create Radio Button composite Policy bind Date Tag Dialog 3 2 NON NLS 1 utc Time create Radio Button composite Policy bind Date Tag Dialog 4 2 NON NLS 1 String sixty new String 60 for int i 0 i 60 i sixty i String value Of i String hours new String 24 for int i 0 i 24 i hours i String value Of i hour Combo set Items hours minute Combo set Items sixty second Combo set Items sixty include Time add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Widget Enablements  createArea createComposite initializeDialogUnits includeTime createCheckbox DateTagDialog createLabel DateTagDialog dateComposite GridLayout dateLayout GridLayout dateLayout numColumns dateComposite setLayout dateLayout hourCombo dateComposite READ_ONLY hourCombo setTextLimit minuteCombo dateComposite READ_ONLY minuteCombo setTextLimit secondCombo dateComposite READ_ONLY secondCombo setTextLimit localTime createRadioButton DateTagDialog utcTime createRadioButton DateTagDialog valueOf valueOf hourCombo setItems minuteCombo setItems secondCombo setItems includeTime addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateWidgetEnablements
public void initialize Values Calendar calendar hour Combo select calendar get Calendar HOUR OF DAY 24 hour clock minute Combo select calendar get Calendar MINUTE second Combo select calendar get Calendar SECOND include Time set Selection settings get Boolean include Time NON NLS 1 local Time set Selection settings get Boolean utc Time NON NLS 1 utc Time set Selection settings get Boolean utc Time NON NLS 1  initializeValues hourCombo HOUR_OF_DAY minuteCombo secondCombo includeTime setSelection getBoolean includeTime localTime setSelection getBoolean utcTime utcTime setSelection getBoolean utcTime
public void update Widget Enablements hour Combo set Enabled include Time get Selection minute Combo set Enabled include Time get Selection second Combo set Enabled include Time get Selection local Time set Enabled include Time get Selection utc Time set Enabled include Time get Selection  updateWidgetEnablements hourCombo setEnabled includeTime getSelection minuteCombo setEnabled includeTime getSelection secondCombo setEnabled includeTime getSelection localTime setEnabled includeTime getSelection utcTime setEnabled includeTime getSelection
public void adjust Calendar Calendar calendar if include Time get Selection calendar set Calendar HOUR OF DAY hour Combo get Selection Index 24 hour clock calendar set Calendar MINUTE minute Combo get Selection Index calendar set Calendar SECOND second Combo get Selection Index if utc Time get Selection calendar set Time Zone Time Zone get Time Zone GMT NON NLS 1  adjustCalendar includeTime getSelection HOUR_OF_DAY hourCombo getSelectionIndex minuteCombo getSelectionIndex secondCombo getSelectionIndex utcTime getSelection setTimeZone TimeZone getTimeZone
public Date Tag Dialog Shell parent Shell super parent Shell I Dialog Settings workbench Settings CVSUI Plugin get Plugin get Dialog Settings this settings workbench Settings get Section Date Tag Dialog NON NLS 1 if this settings null this settings workbench Settings add New Section Date Tag Dialog NON NLS 1  DateTagDialog parentShell parentShell IDialogSettings workbenchSettings CVSUIPlugin getPlugin getDialogSettings workbenchSettings getSection DateTagDialog workbenchSettings addNewSection DateTagDialog
Method declared on Window protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text Policy bind Date Tag Dialog 5 NON NLS 1  configureShell newShell configureShell newShell newShell setText DateTagDialog
protected Control create Dialog Area Composite parent Composite top Level new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 1 initialize Dialog Units top Level layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN top Level set Layout layout create Date Area top Level create Time Area top Level initialize Values update Widget Enablements set F1 help Workbench Help set Help top Level I Help Context Ids DATE TAG DIALOG Dialog apply Dialog Font parent return top Level  createDialogArea topLevel GridLayout GridLayout numColumns initializeDialogUnits topLevel marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN topLevel setLayout createDateArea topLevel createTimeArea topLevel initializeValues updateWidgetEnablements WorkbenchHelp setHelp topLevel IHelpContextIds DATE_TAG_DIALOG applyDialogFont topLevel
private void create Date Area Composite top Level date Area new Date Area this settings date Area create Area top Level  createDateArea topLevel dateArea DateArea dateArea createArea topLevel
private void create Time Area Composite top Level time Area new Time Area this settings time Area create Area top Level  createTimeArea topLevel timeArea TimeArea timeArea createArea topLevel
private void initialize Values Calendar calendar Calendar get Instance date Area initialize Values calendar time Area initialize Values calendar  initializeValues getInstance dateArea initializeValues timeArea initializeValues
private void update Widget Enablements time Area update Widget Enablements date Area update Widget Enablements  updateWidgetEnablements timeArea updateWidgetEnablements dateArea updateWidgetEnablements
Return the date specified by the user in UTC return the date specified by the user public Date get Date return date Entered  getDate dateEntered
private Date private Get Date Calendar calendar Calendar get Instance date Area adjust Calendar calendar time Area adjust Calendar calendar return calendar get Time  privateGetDate getInstance dateArea adjustCalendar timeArea adjustCalendar getTime
protected void button Pressed int button Id if button Id I Dialog Constants OK ID date Entered private Get Date super button Pressed button Id  buttonPressed buttonId buttonId IDialogConstants OK_ID dateEntered privateGetDate buttonPressed buttonId

Editors Info editors Info public Editors Dialog Shell shell Editors Info infos super shell editors Info infos  EditorsInfo editorsInfo EditorsDialog EditorsInfo editorsInfo
protected Control create Dialog Area Composite container Composite parent Composite super create Dialog Area container Layout layout parent get Layout get Shell set Text Policy bind Editors Dialog title NON NLS 1 create Message Area parent editors View new Editors View editors View create Part Control container editors View set Input editors Info set F1 help Workbench Help set Help parent I Help Context Ids EDITORS DIALOG Dialog apply Dialog Font parent return parent  createDialogArea createDialogArea getLayout getShell setText EditorsDialog createMessageArea editorsView EditorsView editorsView createPartControl editorsView setInput editorsInfo WorkbenchHelp setHelp IHelpContextIds EDITORS_DIALOG applyDialogFont
Method create Message Area param parent private void create Message Area Composite parent Label label new Label parent SWT NONE label set Text Policy bind Editors Dialog question NON NLS 1  createMessageArea createMessageArea setText EditorsDialog

see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return Editors Info input Element  IStructuredContentProvider getElements getElements inputElement EditorsInfo inputElement
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
class Editors Label Provider implements I Table Label Provider see org eclipse jface viewers I Table Label Provider get Column Image java lang Object int public Image get Column Image Object element int column Index return null  EditorsLabelProvider ITableLabelProvider ITableLabelProvider getColumnImage getColumnImage columnIndex
see org eclipse jface viewers I Table Label Provider get Column Text java lang Object int public String get Column Text Object element int column Index if element null return NON NLS 1 Editors Info info Editors Info element String result null switch column Index case 0 result info get File Name break case 1 result info get User Name break case 2 result info get Date String break case 3 result info get Computer Name break This method must not return null if result null result NON NLS 1 return result  ITableLabelProvider getColumnText getColumnText columnIndex EditorsInfo EditorsInfo columnIndex getFileName getUserName getDateString getComputerName
see org eclipse jface viewers I Base Label Provider add Listener org eclipse jface viewers I Label Provider Listener public void add Listener I Label Provider Listener listener  IBaseLabelProvider addListener ILabelProviderListener addListener ILabelProviderListener
see org eclipse jface viewers I Base Label Provider dispose public void dispose  IBaseLabelProvider
see org eclipse jface viewers I Base Label Provider is Label Property java lang Object java lang String public boolean is Label Property Object element String property return false  IBaseLabelProvider isLabelProperty isLabelProperty
see org eclipse jface viewers I Base Label Provider remove Listener org eclipse jface viewers I Label Provider Listener public void remove Listener I Label Provider Listener listener  IBaseLabelProvider removeListener ILabelProviderListener removeListener ILabelProviderListener
see org eclipse ui I Workbench Part create Part Control org eclipse swt widgets Composite public void create Part Control Composite parent table new Table parent SWT H SCROLL SWT V SCROLL SWT FULL SELECTION table set Header Visible true table set Lines Visible true Grid Data grid Data new Grid Data Grid Data FILL BOTH grid Data width Hint 500 grid Data height Hint 100 table set Layout Data grid Data Table Layout layout new Table Layout table set Layout layout table Viewer new Table Viewer table create Columns table layout table Viewer set Content Provider new Editors Content Provider table Viewer set Label Provider new Editors Label Provider set F1 help Workbench Help set Help table Viewer get Control I Help Context Ids CVS EDITORS VIEW  IWorkbenchPart createPartControl createPartControl H_SCROLL V_SCROLL FULL_SELECTION setHeaderVisible setLinesVisible GridData gridData GridData GridData FILL_BOTH gridData widthHint gridData heightHint setLayoutData gridData TableLayout TableLayout setLayout tableViewer TableViewer createColumns tableViewer setContentProvider EditorsContentProvider tableViewer setLabelProvider EditorsLabelProvider WorkbenchHelp setHelp tableViewer getControl IHelpContextIds CVS_EDITORS_VIEW
Workbench Help set Help table Viewer get Control I Help Context Ids CVS EDITORS VIEW public void set Input Editors Info infos table Viewer set Input infos  WorkbenchHelp setHelp tableViewer getControl IHelpContextIds CVS_EDITORS_VIEW setInput EditorsInfo tableViewer setInput
Method create Columns param table param layout param viewer private void create Columns Table table Table Layout layout Table Column col file name col new Table Column table SWT NONE col set Resizable true col set Text Policy bind Editors View file NON NLS 1 layout add Column Data new Column Weight Data 30 true user name col new Table Column table SWT NONE col set Resizable true col set Text Policy bind Editors View user NON NLS 1 layout add Column Data new Column Weight Data 20 true creation date col new Table Column table SWT NONE col set Resizable true col set Text Policy bind Editors View date NON NLS 1 layout add Column Data new Column Weight Data 30 true computer name col new Table Column table SWT NONE col set Resizable true col set Text Policy bind Editors View computer NON NLS 1 layout add Column Data new Column Weight Data 20 true  createColumns createColumns TableLayout TableColumn TableColumn setResizable setText EditorsView addColumnData ColumnWeightData TableColumn setResizable setText EditorsView addColumnData ColumnWeightData TableColumn setResizable setText EditorsView addColumnData ColumnWeightData TableColumn setResizable setText EditorsView addColumnData ColumnWeightData
see org eclipse ui I Workbench Part set Focus public void set Focus  IWorkbenchPart setFocus setFocus
Method get Table public Table get Table return table  getTable getTable

Selection Adapter selection Listener new Selection Adapter public void widget Selected Selection Event e update Enablements  SelectionAdapter selectionListener SelectionAdapter widgetSelected SelectionEvent updateEnablements
protected Control create Contents Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 layout num Columns 1 composite set Layout layout composite set Layout Data new Grid Data Selection Adapter selection Listener new Selection Adapter public void widget Selected Selection Event e update Enablements use External create Radio Button composite Policy bind Ext Method Preference Page 0 1 NON NLS 1 use External add Selection Listener selection Listener external create External Area composite use Internal create Radio Button composite Policy bind Ext Method Preference Page 1 1 NON NLS 1 use Internal add Selection Listener selection Listener internal create Internal Area composite initialize Defaults Workbench Help set Help composite I Help Context Ids EXT PREFERENCE PAGE Dialog apply Dialog Font parent return composite  createContents GridLayout GridLayout marginWidth marginHeight numColumns setLayout setLayoutData GridData SelectionAdapter selectionListener SelectionAdapter widgetSelected SelectionEvent updateEnablements useExternal createRadioButton ExtMethodPreferencePage useExternal addSelectionListener selectionListener createExternalArea useInternal createRadioButton ExtMethodPreferencePage useInternal addSelectionListener selectionListener createInternalArea initializeDefaults WorkbenchHelp setHelp IHelpContextIds EXT_PREFERENCE_PAGE applyDialogFont
private void update Enablements external set Enabled use External get Selection cvs Rsh set Enabled use External get Selection cvs Rsh Parameters set Enabled use External get Selection cvs Server set Enabled use External get Selection internal set Enabled use External get Selection method Type set Enabled use External get Selection  updateEnablements setEnabled useExternal getSelection cvsRsh setEnabled useExternal getSelection cvsRshParameters setEnabled useExternal getSelection cvsServer setEnabled useExternal getSelection setEnabled useExternal getSelection methodType setEnabled useExternal getSelection
private Control create Internal Area Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout margin Width 5 layout margin Height 5 layout num Columns 2 composite set Layout layout composite set Layout Data new Grid Data Label intro new Label composite SWT LEFT SWT WRAP intro set Text Choosing to use another connection method allows the meta information in CVS projects to be compatible with external CVS tools while using a custom connection method NON NLS 1 Grid Data data new Grid Data data horizontal Span 2 data horizontal Alignment Grid Data FILL data width Hint 300 intro set Layout Data data create Label composite Policy bind CVS Properties Page connection Type 1 NON NLS 1 method Type create Combo composite return composite  createInternalArea GridLayout GridLayout marginWidth marginHeight numColumns setLayout setLayoutData GridData setText GridData GridData horizontalSpan horizontalAlignment GridData widthHint setLayoutData createLabel CVSPropertiesPage connectionType methodType createCombo
b add Listener SWT Mouse Down new Listener public void handle Event Event event File Dialog d new File Dialog get Shell d set Text Policy bind ExtMethodPreferencePage Details NON NLS 1 String file d open if file null set Cvs Rsh Text file  addListener MouseDown handleEvent FileDialog FileDialog getShell setText ExtMethodPreferencePage_Details setCvsRshText
protected Control create External Area Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout margin Width 5 layout margin Height 5 layout num Columns 3 composite set Layout layout composite set Layout Data new Grid Data Label intro new Label composite SWT LEFT SWT WRAP intro set Text Policy bind ExtMethodPreferencePage message NON NLS 1 Grid Data data new Grid Data data horizontal Span 3 data horizontal Alignment Grid Data FILL data width Hint 300 intro set Layout Data data new Label composite SWT LEFT set Text Policy bind ExtMethodPreferencePage CVS RSH NON NLS 1 cvs Rsh new Text composite SWT BORDER cvs Rsh set Layout Data new Grid Data Grid Data FILL HORIZONTAL final Button b new Button composite SWT NONE b set Text Policy bind ExtMethodPreferencePage Browse NON NLS 1 data new Grid Data data horizontal Alignment Grid Data FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint b compute Size SWT DEFAULT SWT DEFAULT true x b set Layout Data data b add Listener SWT Mouse Down new Listener public void handle Event Event event File Dialog d new File Dialog get Shell d set Text Policy bind ExtMethodPreferencePage Details NON NLS 1 String file d open if file null set Cvs Rsh Text file new Label composite SWT LEFT set Text Policy bind ExtMethodPreferencePage CVS RSH Parameters NON NLS 1 cvs Rsh Parameters new Text composite SWT BORDER data new Grid Data data horizontal Span 2 data horizontal Alignment Grid Data FILL cvs Rsh Parameters set Layout Data data new Label composite SWT LEFT set Text Policy bind ExtMethodPreferencePage CVS SERVER  7 NON NLS 1 cvs Server new Text composite SWT BORDER data new Grid Data data horizontal Span 2 data horizontal Alignment Grid Data FILL cvs Server set Layout Data data Workbench Help set Help cvs Rsh I Help Context Ids EXT PREFERENCE RSH Workbench Help set Help cvs Rsh Parameters I Help Context Ids EXT PREFERENCE PARAM Workbench Help set Help cvs Server I Help Context Ids EXT PREFERENCE SERVER return composite  createExternalArea GridLayout GridLayout marginWidth marginHeight numColumns setLayout setLayoutData GridData setText ExtMethodPreferencePage_message GridData GridData horizontalSpan horizontalAlignment GridData widthHint setLayoutData setText ExtMethodPreferencePage_CVS_RSH cvsRsh cvsRsh setLayoutData GridData GridData FILL_HORIZONTAL setText ExtMethodPreferencePage_Browse GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize setLayoutData addListener MouseDown handleEvent FileDialog FileDialog getShell setText ExtMethodPreferencePage_Details setCvsRshText setText ExtMethodPreferencePage_CVS_RSH_Parameters cvsRshParameters GridData horizontalSpan horizontalAlignment GridData cvsRshParameters setLayoutData setText ExtMethodPreferencePage_CVS_SERVER__7 cvsServer GridData horizontalSpan horizontalAlignment GridData cvsServer setLayoutData WorkbenchHelp setHelp cvsRsh IHelpContextIds EXT_PREFERENCE_RSH WorkbenchHelp setHelp cvsRshParameters IHelpContextIds EXT_PREFERENCE_PARAM WorkbenchHelp setHelp cvsServer IHelpContextIds EXT_PREFERENCE_SERVER
private void initialize Defaults I Preference Store store get Preference Store cvs Rsh set Text store get String ICVSUI Constants PREF CVS RSH cvs Rsh Parameters set Text store get String ICVSUI Constants PREF CVS RSH PARAMETERS cvs Server set Text store get String ICVSUI Constants PREF CVS SERVER I Connection Method methods CVS Repository Location get Plugged In Connection Methods for int i 0 i methods length i String name methods i get Name if name equals ext NON NLS 1 method Type add name String method store get String ICVSUI Constants PREF EXT CONNECTION METHOD PROXY if method equals ext NON NLS 1 method Type select 0 else method Type select method Type index Of method use External set Selection method equals ext NON NLS 1 use Internal set Selection method equals ext NON NLS 1 update Enablements  initializeDefaults IPreferenceStore getPreferenceStore cvsRsh setText getString ICVSUIConstants PREF_CVS_RSH cvsRshParameters setText getString ICVSUIConstants PREF_CVS_RSH_PARAMETERS cvsServer setText getString ICVSUIConstants PREF_CVS_SERVER IConnectionMethod CVSRepositoryLocation getPluggedInConnectionMethods getName methodType getString ICVSUIConstants PREF_EXT_CONNECTION_METHOD_PROXY methodType methodType methodType indexOf useExternal setSelection useInternal setSelection updateEnablements
Set CVS RSH program protected void set Cvs Rsh Text String s cvs Rsh set Text s  CVS_RSH setCvsRshText cvsRsh setText
see I Workbench Preference Page init I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
public boolean perform Ok I Preference Store store get Preference Store String method if use External get Selection method ext NON NLS 1 store set Value ICVSUI Constants PREF CVS RSH cvs Rsh get Text store set Value ICVSUI Constants PREF CVS RSH PARAMETERS cvs Rsh Parameters get Text store set Value ICVSUI Constants PREF CVS SERVER cvs Server get Text CVS Provider Plugin get Plugin set Cvs Rsh Command cvs Rsh get Text CVS Provider Plugin get Plugin set Cvs Rsh Parameters cvs Rsh Parameters get Text CVS Provider Plugin get Plugin set Cvs Server cvs Server get Text else method method Type get Text store set Value ICVSUI Constants PREF EXT CONNECTION METHOD PROXY method CVS Repository Location set Ext Connection Method Proxy method CVSUI Plugin get Plugin save Plugin Preferences return super perform Ok  performOk IPreferenceStore getPreferenceStore useExternal getSelection setValue ICVSUIConstants PREF_CVS_RSH cvsRsh getText setValue ICVSUIConstants PREF_CVS_RSH_PARAMETERS cvsRshParameters getText setValue ICVSUIConstants PREF_CVS_SERVER cvsServer getText CVSProviderPlugin getPlugin setCvsRshCommand cvsRsh getText CVSProviderPlugin getPlugin setCvsRshParameters cvsRshParameters getText CVSProviderPlugin getPlugin setCvsServer cvsServer getText methodType getText setValue ICVSUIConstants PREF_EXT_CONNECTION_METHOD_PROXY CVSRepositoryLocation setExtConnectionMethodProxy CVSUIPlugin getPlugin savePluginPreferences performOk
see Preference Page do Get Preference Store protected I Preference Store do Get Preference Store return CVSUI Plugin get Plugin get Preference Store  PreferencePage doGetPreferenceStore IPreferenceStore doGetPreferenceStore CVSUIPlugin getPlugin getPreferenceStore
protected Button create Radio Button Composite parent String label int span Button button new Button parent SWT RADIO button set Text label Grid Data data new Grid Data data horizontal Span span button set Layout Data data return button  createRadioButton setText GridData GridData horizontalSpan setLayoutData
protected Label create Label Composite parent String text int span Label label new Label parent SWT LEFT label set Text text Grid Data data new Grid Data data horizontal Span span data horizontal Alignment Grid Data FILL label set Layout Data data return label  createLabel setText GridData GridData horizontalSpan horizontalAlignment GridData setLayoutData
protected Combo create Combo Composite parent Combo combo new Combo parent SWT READ ONLY Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint I Dialog Constants ENTRY FIELD WIDTH data horizontal Span 1 combo set Layout Data data return combo  createCombo READ_ONLY GridData GridData GridData FILL_HORIZONTAL widthHint IDialogConstants ENTRY_FIELD_WIDTH horizontalSpan setLayoutData

public static final I Status OK new Status I Status OK CVSUI Plugin ID 0 Policy bind ok null NON NLS 1 public File Modification Validator  IStatus IStatus CVSUIPlugin FileModificationValidator
see org eclipse core resources I File Modification Validator validate Edit org eclipse core resources I File java lang Object public I Status validate Edit I File files Object context I File read Only Files get Managed Read Only Files files if read Only Files length 0 return OK return edit read Only Files get Shell context  IFileModificationValidator validateEdit IFile IStatus validateEdit IFile IFile readOnlyFiles getManagedReadOnlyFiles readOnlyFiles readOnlyFiles getShell
see org eclipse core resources I File Modification Validator validate Save org eclipse core resources I File public I Status validate Save I File file if needs Checkout file return OK return edit new I File file Shell null  IFileModificationValidator validateSave IFile IStatus validateSave IFile needsCheckout IFile
see org eclipse team internal ccvs core ICVS File Modification Validator validate Move Delete org eclipse core resources I File org eclipse core runtime I Progress Monitor public I Status validate Move Delete I File files I Progress Monitor monitor I File read Only Files get Managed Read Only Files files if read Only Files length 0 return OK try edit read Only Files monitor return OK catch CVS Exception e return e get Status  ICVSFileModificationValidator validateMoveDelete IFile IProgressMonitor IStatus validateMoveDelete IFile IProgressMonitor IFile readOnlyFiles getManagedReadOnlyFiles readOnlyFiles readOnlyFiles CVSException getStatus
private I File get Managed Read Only Files I File files List read Onlys new Array List for int i 0 i files length i I File i File files i if needs Checkout i File read Onlys add i File return I File read Onlys to Array new I File read Onlys size  IFile getManagedReadOnlyFiles IFile readOnlys ArrayList IFile iFile needsCheckout iFile readOnlys iFile IFile readOnlys toArray IFile readOnlys
private boolean needs Checkout I File file try if file is Read Only ICVS File cvs File CVS Workspace Root getCVS File For file return cvs File is Managed catch CVS Exception e Log the exception and assume we don t need a checkout CVSUI Plugin log e return false  needsCheckout IFile isReadOnly ICVSFile cvsFile CVSWorkspaceRoot getCVSFileFor cvsFile isManaged CVSException CVSUIPlugin
private CVS Team Provider get Provider I File files CVS Team Provider provider CVS Team Provider Repository Provider get Provider files 0 get Project CVS Provider Plugin get Type Id return provider  CVSTeamProvider getProvider IFile CVSTeamProvider CVSTeamProvider RepositoryProvider getProvider getProject CVSProviderPlugin getTypeId
private Shell get Shell Object context if context instanceof Shell return Shell context return null  getShell
private I Status get Status Invocation Target Exception e Throwable target e get Target Exception if target instanceof Team Exception return Team Exception target get Status else if target instanceof Core Exception return Core Exception target get Status return new Status I Status ERROR CVSUI Plugin ID 0 Policy bind internal target NON NLS 1  IStatus getStatus InvocationTargetException getTargetException TeamException TeamException getStatus CoreException CoreException getStatus IStatus CVSUIPlugin
CVSUI Plugin run With Progress shell false new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try edit files monitor catch CVS Exception e new Invocation Target Exception e  CVSUIPlugin runWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException CVSException InvocationTargetException
private I Status edit final I File files final Shell shell try if shell null prompt To Edit Files files shell The user didn t want to edit OK is returned but the file remains read only throw new Interrupted Exception Run the edit in a runnable in order to get a busy cursor This runnable is sync Execed in order to get a busy cursor CVSUI Plugin run With Progress shell false new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try edit files monitor catch CVS Exception e new Invocation Target Exception e CVSUI Plugin PERFORM SYNC EXEC catch Invocation Target Exception e return get Status e catch Interrupted Exception e Must return an error to indicate that it is not OK to edit the files return new Status I Status CANCEL CVSUI Plugin ID 0 Policy bind File Modification Validator veto Message null NON NLS 1 return OK  IStatus IFile promptToEditFiles InterruptedException syncExeced CVSUIPlugin runWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException CVSException InvocationTargetException CVSUIPlugin PERFORM_SYNC_EXEC InvocationTargetException getStatus InterruptedException IStatus CVSUIPlugin FileModificationValidator vetoMessage
private boolean prompt To Edit Files I File files Shell shell throws Invocation Target Exception Interrupted Exception if files length 0 return true if is Perform Edit if is Never Prompt return true Contact the server to see if anyone else is editing the files Editors Action editors fetch Editors files shell if editors is Empty if is Always Prompt return prompt Edit shell return true else return editors prompt To Edit shell else Allow the files to be edited without notifying the server for int i 0 i files length i I File file files i file set Read Only false return false  promptToEditFiles IFile InvocationTargetException InterruptedException isPerformEdit isNeverPrompt EditorsAction fetchEditors isEmpty isAlwaysPrompt promptEdit promptToEdit IFile setReadOnly
final boolean result new boolean false CVSUI Plugin open Dialog shell new CVSUI Plugin I Openable In Shell public void open Shell shell result 0 Message Dialog open Question shell Policy bind File Modification Validator 3 Policy bind File Modification Validator 4 NON NLS 1 NON NLS 2  CVSUIPlugin openDialog CVSUIPlugin IOpenableInShell MessageDialog openQuestion FileModificationValidator FileModificationValidator
private boolean prompt Edit Shell shell Open the dialog using a sync exec there are no guarentees that we were called from the UI thread final boolean result new boolean false CVSUI Plugin open Dialog shell new CVSUI Plugin I Openable In Shell public void open Shell shell result 0 Message Dialog open Question shell Policy bind File Modification Validator 3 Policy bind File Modification Validator 4 NON NLS 1 NON NLS 2 CVSUI Plugin PERFORM SYNC EXEC return result 0  promptEdit CVSUIPlugin openDialog CVSUIPlugin IOpenableInShell MessageDialog openQuestion FileModificationValidator FileModificationValidator CVSUIPlugin PERFORM_SYNC_EXEC
private boolean is Perform Edit return ICVSUI Constants PREF EDIT PROMPT EDIT equals CVSUI Plugin get Plugin get Preference Store get String ICVSUI Constants PREF EDIT ACTION  isPerformEdit ICVSUIConstants PREF_EDIT_PROMPT_EDIT CVSUIPlugin getPlugin getPreferenceStore getString ICVSUIConstants PREF_EDIT_ACTION
Fetch the editors in a runnable in order to get the busy cursor CVSUI Plugin run With Progress shell false new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception editors run monitor  CVSUIPlugin runWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException
private Editors Action fetch Editors I File files Shell shell throws Invocation Target Exception Interrupted Exception final Editors Action editors new Editors Action get Provider files files Fetch the editors in a runnable in order to get the busy cursor CVSUI Plugin run With Progress shell false new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception editors run monitor CVSUI Plugin PERFORM SYNC EXEC return editors  EditorsAction fetchEditors IFile InvocationTargetException InterruptedException EditorsAction EditorsAction getProvider CVSUIPlugin runWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException CVSUIPlugin PERFORM_SYNC_EXEC
private boolean is Never Prompt return ICVSUI Constants PREF EDIT PROMPT NEVER equals CVSUI Plugin get Plugin get Preference Store get String ICVSUI Constants PREF EDIT PROMPT  isNeverPrompt ICVSUIConstants PREF_EDIT_PROMPT_NEVER CVSUIPlugin getPlugin getPreferenceStore getString ICVSUIConstants PREF_EDIT_PROMPT
private boolean is Always Prompt return ICVSUI Constants PREF EDIT PROMPT ALWAYS equals CVSUI Plugin get Plugin get Preference Store get String ICVSUI Constants PREF EDIT PROMPT  isAlwaysPrompt ICVSUIConstants PREF_EDIT_PROMPT_ALWAYS CVSUIPlugin getPlugin getPreferenceStore getString ICVSUIConstants PREF_EDIT_PROMPT
private void edit I File files I Progress Monitor monitor throws CVS Exception get Provider files edit files false recurse true notify server ICVS File NO NOTIFICATION monitor  IFile IProgressMonitor CVSException getProvider ICVSFile NO_NOTIFICATION

History View view public History Drop Adapter Structured Viewer viewer History View view super viewer this view view  HistoryView HistoryDropAdapter StructuredViewer HistoryView
public void drag Over Drop Target Event event if event operations DND DROP LINK DND DROP LINK event detail DND DROP LINK super drag Over event  dragOver DropTargetEvent DROP_LINK DROP_LINK DROP_LINK dragOver
to it public void drop Drop Target Event event super drop event event detail DND DROP LINK  DropTargetEvent DROP_LINK
public boolean perform Drop Object data if data null return false I Resource sources I Resource data if sources length 0 return false I Resource resource sources 0 if resource instanceof I File return false view show History resource true fetch return true  performDrop IResource IResource IResource IFile showHistory
public boolean validate Drop Object target int operation Transfer Data transfer Type if transfer Type null Resource Transfer get Instance is Supported Type transfer Type return true return false  validateDrop TransferData transferType transferType ResourceTransfer getInstance isSupportedType transferType

public History Filter History View h View String author String comment Date from Date Date to Date boolean is Or this view h View this author author this comment comment this from Date from Date this to Date to Date this is Or is Or  HistoryFilter HistoryView hView fromDate toDate isOr hView fromDate fromDate toDate toDate isOr isOr
see Viewer Filter select Viewer Object Object public boolean select Viewer aviewer Object parent Element Object element if element instanceof I Log Entry I Log Entry entry I Log Entry element if is Or empty fields should be considered a non match return has Author author Match entry has Date date Match entry has Comment comment Match entry else and search empty fields should be considered a match return has Author author Match entry has Date date Match entry has Comment comment Match entry return false  ViewerFilter parentElement ILogEntry ILogEntry ILogEntry isOr hasAuthor authorMatch hasDate dateMatch hasComment commentMatch hasAuthor authorMatch hasDate dateMatch hasComment commentMatch
return false protected boolean author Match I Log Entry entry return entry get Author equals author  authorMatch ILogEntry getAuthor
return entry get Author equals author protected boolean comment Match I Log Entry entry return entry get Comment to Lower Case index Of comment to Lower Case 1  getAuthor commentMatch ILogEntry getComment toLowerCase indexOf toLowerCase
return entry get Comment to Lower Case index Of comment to Lower Case 1 protected boolean date Match I Log Entry entry return from Date before entry get Date to Date after entry get Date  getComment toLowerCase indexOf toLowerCase dateMatch ILogEntry fromDate getDate toDate getDate
to Date after entry get Date protected boolean has Author return author equals NON NLS 1  toDate getDate hasAuthor
return author equals NON NLS 1 protected boolean has Comment return comment equals NON NLS 1  hasComment
return comment equals NON NLS 1 protected boolean has Date return from Date null to Date null  hasDate fromDate toDate

see I View Action Delegate init I View Part public void init I View Part view this view History View view  IViewActionDelegate IViewPart IViewPart HistoryView
see I Action Delegate run I Action public void run I Action action History Filter Dialog history Dialog new History Filter Dialog view if filter null history Dialog set Filter filter if history Dialog open Window CANCEL return if filter null view get Viewer remove Filter filter filter history Dialog get Filter don t add the filter if it is blank if filter has Author filter has Date filter has Comment return view get Viewer add Filter filter  IActionDelegate IAction IAction HistoryFilterDialog historyDialog HistoryFilterDialog historyDialog setFilter historyDialog getViewer removeFilter historyDialog getFilter hasAuthor hasDate hasComment getViewer addFilter
see I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection

private Text comment public History Filter Dialog History View view super view get View Site get Shell this history View view  HistoryFilterDialog HistoryView getViewSite getShell historyView
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text Policy bind History Filter Dialog title NON NLS 1  configureShell newShell configureShell newShell newShell setText HistoryFilterDialog
protected Control create Dialog Area Composite parent Composite top Level new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN top Level set Layout layout and and or search radio buttons Label label new Label top Level SWT NONE Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 2 label set Layout Data data label set Text Policy bind History Filter Dialog show Matching NON NLS 1 and Radio new Button top Level SWT RADIO and Radio set Text Policy bind History Filter Dialog matching All NON NLS 1 data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 2 and Radio set Layout Data data and Radio set Selection true or Radio new Button top Level SWT RADIO or Radio set Text Policy bind History Filter Dialog matching Any NON NLS 1 data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 2 or Radio set Layout Data data author label new Label top Level SWT NONE label set Text Policy bind History Filter Dialog author NON NLS 1 author new Text top Level SWT BORDER author set Layout Data new Grid Data Grid Data FILL HORIZONTAL comment label new Label top Level SWT NONE label set Text Policy bind History Filter Dialog comment NON NLS 1 comment new Text top Level SWT BORDER comment set Layout Data new Grid Data Grid Data FILL HORIZONTAL from date label new Label top Level SWT NONE label set Text Policy bind History Filter Dialog from Date NON NLS 1 Composite fd Composite new Composite top Level SWT NONE Grid Layout fd Layout new Grid Layout fd Layout num Columns 3 fd Composite set Layout fd Layout from Month Combo new Combo fd Composite SWT READ ONLY from Day Combo new Combo fd Composite SWT READ ONLY from Year Combo new Combo fd Composite SWT NONE from Year Combo set Text Limit 4 to date label new Label top Level SWT NONE label set Text Policy bind History Filter Dialog to Date NON NLS 1 Composite td Composite new Composite top Level SWT NONE Grid Layout td Layout new Grid Layout td Layout num Columns 3 td Composite set Layout td Layout to Month Combo new Combo td Composite SWT READ ONLY to Day Combo new Combo td Composite SWT READ ONLY to Year Combo new Combo td Composite SWT NONE to Year Combo set Text Limit 4 set day month and year combos with numbers years allows a selection from the past 5 years or any year written in String days new String 32 days 0 NON NLS 1 for int i 1 i 32 i days i String value Of i String months new String 13 months 0 NON NLS 1 Simple Date Format format new Simple Date Format MMMM NON NLS 1 Calendar calendar Calendar get Instance for int i 1 i 13 i calendar set Calendar MONTH i 1 months i format format calendar get Time String years new String 5 Calendar calender Calendar get Instance for int i 0 i 5 i years i String value Of calender get 1 i from Day Combo set Items days from Day Combo select 0 to Day Combo set Items days to Day Combo select 0 from Month Combo set Items months from Month Combo select 0 to Month Combo set Items months to Month Combo select 0 from Year Combo set Items years to Year Combo set Items years from Year Combo select 0 to Year Combo select 0 initialize Values set F1 help Workbench Help set Help top Level I Help Context Ids HISTORY FILTER DIALOG Dialog apply Dialog Font parent return top Level  createDialogArea topLevel GridLayout GridLayout numColumns marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN topLevel setLayout topLevel GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData setText HistoryFilterDialog showMatching andRadio topLevel andRadio setText HistoryFilterDialog matchingAll GridData GridData FILL_HORIZONTAL horizontalSpan andRadio setLayoutData andRadio setSelection orRadio topLevel orRadio setText HistoryFilterDialog matchingAny GridData GridData FILL_HORIZONTAL horizontalSpan orRadio setLayoutData topLevel setText HistoryFilterDialog topLevel setLayoutData GridData GridData FILL_HORIZONTAL topLevel setText HistoryFilterDialog topLevel setLayoutData GridData GridData FILL_HORIZONTAL topLevel setText HistoryFilterDialog fromDate fdComposite topLevel GridLayout fdLayout GridLayout fdLayout numColumns fdComposite setLayout fdLayout fromMonthCombo fdComposite READ_ONLY fromDayCombo fdComposite READ_ONLY fromYearCombo fdComposite fromYearCombo setTextLimit topLevel setText HistoryFilterDialog toDate tdComposite topLevel GridLayout tdLayout GridLayout tdLayout numColumns tdComposite setLayout tdLayout toMonthCombo tdComposite READ_ONLY toDayCombo tdComposite READ_ONLY toYearCombo tdComposite toYearCombo setTextLimit valueOf SimpleDateFormat SimpleDateFormat getInstance getTime getInstance valueOf fromDayCombo setItems fromDayCombo toDayCombo setItems toDayCombo fromMonthCombo setItems fromMonthCombo toMonthCombo setItems toMonthCombo fromYearCombo setItems toYearCombo setItems fromYearCombo toYearCombo initializeValues WorkbenchHelp setHelp topLevel IHelpContextIds HISTORY_FILTER_DIALOG applyDialogFont topLevel
void initialize Values if history Filter null return if history Filter author null author set Text history Filter author if history Filter comment null comment set Text history Filter comment or Radio set Selection history Filter is Or and Radio set Selection history Filter is Or Calendar calendar Calendar get Instance if history Filter from Date null calendar set Time history Filter from Date from Day Combo select calendar get Calendar DATE from Month Combo select calendar get Calendar MONTH 1 String year Value String value Of calendar get Calendar YEAR int index from Year Combo index Of year Value if index 1 from Year Combo add year Value index from Year Combo index Of year Value from Year Combo select index if history Filter to Date null calendar set Time history Filter to Date to Day Combo select calendar get Calendar DATE to Month Combo select calendar get Calendar MONTH 1 String year Value String value Of calendar get Calendar YEAR int index to Year Combo index Of year Value if index 1 to Year Combo add year Value index to Year Combo index Of year Value to Year Combo select index  initializeValues historyFilter historyFilter setText historyFilter historyFilter setText historyFilter orRadio setSelection historyFilter isOr andRadio setSelection historyFilter isOr getInstance historyFilter fromDate setTime historyFilter fromDate fromDayCombo fromMonthCombo yearValue valueOf fromYearCombo indexOf yearValue fromYearCombo yearValue fromYearCombo indexOf yearValue fromYearCombo historyFilter toDate setTime historyFilter toDate toDayCombo toMonthCombo yearValue valueOf toYearCombo indexOf yearValue toYearCombo yearValue toYearCombo indexOf yearValue toYearCombo
A button has been pressed Process the dialog contents protected void button Pressed int button Id if I Dialog Constants CANCEL ID button Id super button Pressed button Id return Date from Date null to Date null if from Month Combo get Selection Index 0 to Month Combo get Selection Index 0 from Day Combo get Selection Index 0 to Day Combo get Selection Index 0 from Year Combo get Text length 0 to Year Combo get Text length 0 set the calendar with the user input set the hours minutes and seconds to 00 so as to cover the whole day Calendar calendar Calendar get Instance calendar set Integer parse Int String value Of from Year Combo get Text from Month Combo get Selection Index 1 Integer parse Int String value Of from Day Combo get Text 00 00 00 from Date calendar get Time set the calendar with the user input set the hours minutes and seconds to 23 59 59 so as to cover the whole day calendar set Integer parse Int String value Of to Year Combo get Text to Month Combo get Selection Index 1 Integer parse Int String value Of to Day Combo get Text 23 59 59 to Date calendar get Time create the filter history Filter new History Filter history View author get Text comment get Text from Date to Date or Radio get Selection super button Pressed button Id  buttonPressed buttonId IDialogConstants CANCEL_ID buttonId buttonPressed buttonId fromDate toDate fromMonthCombo getSelectionIndex toMonthCombo getSelectionIndex fromDayCombo getSelectionIndex toDayCombo getSelectionIndex fromYearCombo getText toYearCombo getText getInstance parseInt valueOf fromYearCombo getText fromMonthCombo getSelectionIndex parseInt valueOf fromDayCombo getText fromDate getTime parseInt valueOf toYearCombo getText toMonthCombo getSelectionIndex parseInt valueOf toDayCombo getText toDate getTime historyFilter HistoryFilter historyView getText getText fromDate toDate orRadio getSelection buttonPressed buttonId
Returns the filter that was created from the provided user input public History Filter get Filter return history Filter  HistoryFilter getFilter historyFilter
Set the intial value of the dialog to the given filter public void set Filter History Filter filter this history Filter filter  setFilter HistoryFilter historyFilter

Constructor for History Table Provider public History Table Provider super  HistoryTableProvider HistoryTableProvider
class History Label Provider extends Label Provider implements I Table Label Provider I Color Provider I Font Provider public Image get Column Image Object element int column Index return null  HistoryLabelProvider LabelProvider ITableLabelProvider IColorProvider IFontProvider getColumnImage columnIndex
public String get Column Text Object element int column Index I Log Entry entry adapt To Log Entry element if entry null return NON NLS 1 switch column Index case COL REVISION String revision entry get Revision String current Revision get Current Revision if current Revision null current Revision equals revision revision Policy bind current Revision revision NON NLS 1 return revision case COL TAGS CVS Tag tags entry get Tags String Buffer result new String Buffer for int i 0 i tags length i result append tags i get Name if i tags length 1 result append NON NLS 1 return result to String case COL DATE Date date entry get Date if date null return Policy bind not Available NON NLS 1 return Date Format get Instance format date case COL AUTHOR return entry get Author case COL COMMENT String comment entry get Comment int index comment index Of n NON NLS 1 switch index case 1 return comment case 0 return Policy bind History View  4 NON NLS 1 default return Policy bind CVS Compare Revisions Input truncate comment substring 0 index NON NLS 1 return NON NLS 1  getColumnText columnIndex ILogEntry adaptToLogEntry columnIndex COL_REVISION getRevision currentRevision getCurrentRevision currentRevision currentRevision currentRevision COL_TAGS CVSTag getTags StringBuffer StringBuffer getName toString COL_DATE getDate notAvailable DateFormat getInstance COL_AUTHOR getAuthor COL_COMMENT getComment indexOf HistoryView _4 CVSCompareRevisionsInput
public Color get Foreground Object element I Log Entry entry adapt To Log Entry element if entry is Deletion return Display get Current get System Color SWT COLOR WIDGET NORMAL SHADOW else return null  getForeground ILogEntry adaptToLogEntry isDeletion getCurrent getSystemColor COLOR_WIDGET_NORMAL_SHADOW
see org eclipse jface viewers I Color Provider get Background java lang Object public Color get Background Object element return null  IColorProvider getBackground getBackground
public Font get Font Object element I Log Entry entry adapt To Log Entry element if entry null return null String revision entry get Revision String current Revision get Current Revision if current Revision null current Revision equals revision if current Revision Font null Font default Font J Face Resources get Default Font Font Data data default Font get Font Data for int i 0 i data length i data i set Style SWT BOLD current Revision Font new Font viewer get Table get Display data return current Revision Font return null  getFont ILogEntry adaptToLogEntry getRevision currentRevision getCurrentRevision currentRevision currentRevision currentRevisionFont defaultFont JFaceResources getDefaultFont FontData defaultFont getFontData setStyle currentRevisionFont getTable getDisplay currentRevisionFont
The constructor public History Sorter int column Number this column Number column Number  HistorySorter columnNumber columnNumber columnNumber
Compares two log entries sorting first by the main column of this sorter then by subsequent columns depending on the column sort order public int compare Viewer viewer Object o1 Object o2 I Log Entry e1 adapt To Log Entry o1 I Log Entry e2 adapt To Log Entry o2 int result 0 if e1 null e2 null result super compare viewer o1 o2 else int column Sort Order SORT ORDERS BY COLUMN column Number for int i 0 i column Sort Order length i result compare Column Value column Sort Order i e1 e2 if result 0 break if reversed result result return result  ILogEntry adaptToLogEntry ILogEntry adaptToLogEntry columnSortOrder SORT_ORDERS_BY_COLUMN columnNumber columnSortOrder compareColumnValue columnSortOrder
Compares two markers based only on the value of the specified column int compare Column Value int column Number I Log Entry e1 I Log Entry e2 switch column Number case 0 revision return version Collator compare e1 get Revision e2 get Revision case 1 tags CVS Tag tags1 e1 get Tags CVS Tag tags2 e2 get Tags if tags2 length 0 return 1 if tags1 length 0 return 1 return get Collator compare tags1 0 get Name tags2 0 get Name case 2 date Date date1 e1 get Date Date date2 e2 get Date return date1 compare To date2 case 3 author return get Collator compare e1 get Author e2 get Author case 4 comment return get Collator compare e1 get Comment e2 get Comment default return 0  compareColumnValue columnNumber ILogEntry ILogEntry columnNumber versionCollator getRevision getRevision CVSTag getTags CVSTag getTags getCollator getName getName getDate getDate compareTo getCollator getAuthor getAuthor getCollator getComment getComment
Returns the number of the column by which this is sorting public int get Column Number return column Number  getColumnNumber columnNumber
Returns true for descending or false for ascending sorting order public boolean is Reversed return reversed  isReversed
Sets the sorting order public void set Reversed boolean new Reversed reversed new Reversed  setReversed newReversed newReversed
protected I Log Entry adapt To Log Entry Object element Get the log entry for the provided object I Log Entry entry null if element instanceof I Log Entry entry I Log Entry element else if element instanceof I Adaptable entry I Log Entry I Adaptable element get Adapter I Log Entry class return entry  ILogEntry adaptToLogEntry ILogEntry ILogEntry ILogEntry IAdaptable ILogEntry IAdaptable getAdapter ILogEntry
table add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if current Revision Font null current Revision Font dispose  addDisposeListener DisposeListener widgetDisposed DisposeEvent currentRevisionFont currentRevisionFont
Create a Table Viewer that can be used to display a list of I Log Entry instances Ths method provides the labels and sorter but does not provide a content provider param parent return Table Viewer public Table Viewer create Table Composite parent Table table new Table parent SWT H SCROLL SWT V SCROLL SWT MULTI SWT FULL SELECTION table set Header Visible true table set Lines Visible true Grid Data data new Grid Data Grid Data FILL BOTH table set Layout Data data Table Layout layout new Table Layout table set Layout layout Table Viewer viewer new Table Viewer table create Columns table layout viewer viewer set Label Provider new History Label Provider By default reverse sort by revision History Sorter sorter new History Sorter COL REVISION sorter set Reversed true viewer set Sorter sorter table add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if current Revision Font null current Revision Font dispose this viewer viewer return viewer  TableViewer ILogEntry TableViewer TableViewer createTable H_SCROLL V_SCROLL FULL_SELECTION setHeaderVisible setLinesVisible GridData GridData GridData FILL_BOTH setLayoutData TableLayout TableLayout setLayout TableViewer TableViewer createColumns setLabelProvider HistoryLabelProvider HistorySorter HistorySorter COL_REVISION setReversed setSorter addDisposeListener DisposeListener widgetDisposed DisposeEvent currentRevisionFont currentRevisionFont
table add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if current Revision Font null current Revision Font dispose  addDisposeListener DisposeListener widgetDisposed DisposeEvent currentRevisionFont currentRevisionFont
Create a Check Box Table Viewer that can be used to display a list of I Log Entry instances Ths method provides the labels and sorter but does not provide a content provider param parent return Table Viewer public Checkbox Table Viewer create Check Box Table Composite parent Table table new Table parent SWT CHECK SWT H SCROLL SWT V SCROLL SWT FULL SELECTION table set Header Visible true table set Lines Visible true Grid Data data new Grid Data Grid Data FILL BOTH table set Layout Data data Table Layout layout new Table Layout table set Layout layout Checkbox Table Viewer viewer new Checkbox Table Viewer table create Columns table layout viewer viewer set Label Provider new History Label Provider By default reverse sort by revision History Sorter sorter new History Sorter COL REVISION sorter set Reversed true viewer set Sorter sorter table add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if current Revision Font null current Revision Font dispose this viewer viewer return viewer  CheckBoxTableViewer ILogEntry TableViewer CheckboxTableViewer createCheckBoxTable H_SCROLL V_SCROLL FULL_SELECTION setHeaderVisible setLinesVisible GridData GridData GridData FILL_BOTH setLayoutData TableLayout TableLayout setLayout CheckboxTableViewer CheckboxTableViewer createColumns setLabelProvider HistoryLabelProvider HistorySorter HistorySorter COL_REVISION setReversed setSorter addDisposeListener DisposeListener widgetDisposed DisposeEvent currentRevisionFont currentRevisionFont
Creates the columns for the history table private void create Columns Table table Table Layout layout Table Viewer viewer Selection Listener header Listener get Column Listener viewer revision Table Column col new Table Column table SWT NONE col set Resizable true col set Text Policy bind History View revision NON NLS 1 col add Selection Listener header Listener layout add Column Data new Column Weight Data 20 true tags col new Table Column table SWT NONE col set Resizable true col set Text Policy bind History View tags NON NLS 1 col add Selection Listener header Listener layout add Column Data new Column Weight Data 20 true creation date col new Table Column table SWT NONE col set Resizable true col set Text Policy bind History View date NON NLS 1 col add Selection Listener header Listener layout add Column Data new Column Weight Data 20 true author col new Table Column table SWT NONE col set Resizable true col set Text Policy bind History View author NON NLS 1 col add Selection Listener header Listener layout add Column Data new Column Weight Data 20 true comment col new Table Column table SWT NONE col set Resizable true col set Text Policy bind History View comment NON NLS 1 col add Selection Listener header Listener layout add Column Data new Column Weight Data 50 true  createColumns TableLayout TableViewer SelectionListener headerListener getColumnListener TableColumn TableColumn setResizable setText HistoryView addSelectionListener headerListener addColumnData ColumnWeightData TableColumn setResizable setText HistoryView addSelectionListener headerListener addColumnData ColumnWeightData TableColumn setResizable setText HistoryView addSelectionListener headerListener addColumnData ColumnWeightData TableColumn setResizable setText HistoryView addSelectionListener headerListener addColumnData ColumnWeightData TableColumn setResizable setText HistoryView addSelectionListener headerListener addColumnData ColumnWeightData
return new Selection Adapter Handles the case of user selecting the header area p If the column has not been selected previously it will set the sorter of that column to be the current tasklist sorter Repeated presses on the same column header will toggle sorting order ascending descending public void widget Selected Selection Event e column selected need to sort int column table Viewer get Table index Of Table Column e widget History Sorter old Sorter History Sorter table Viewer get Sorter if old Sorter null column old Sorter get Column Number old Sorter set Reversed old Sorter is Reversed table Viewer refresh else table Viewer set Sorter new History Sorter column  SelectionAdapter widgetSelected SelectionEvent tableViewer getTable indexOf TableColumn HistorySorter oldSorter HistorySorter tableViewer getSorter oldSorter oldSorter getColumnNumber oldSorter setReversed oldSorter isReversed tableViewer tableViewer setSorter HistorySorter
Adds the listener that sets the sorter private Selection Listener get Column Listener final Table Viewer table Viewer This class handles selections of the column headers Selection of the column header will cause resorting of the shown tasks using that column s sorter Repeated selection of the header will toggle sorting order ascending versus descending return new Selection Adapter Handles the case of user selecting the header area p If the column has not been selected previously it will set the sorter of that column to be the current tasklist sorter Repeated presses on the same column header will toggle sorting order ascending descending public void widget Selected Selection Event e column selected need to sort int column table Viewer get Table index Of Table Column e widget History Sorter old Sorter History Sorter table Viewer get Sorter if old Sorter null column old Sorter get Column Number old Sorter set Reversed old Sorter is Reversed table Viewer refresh else table Viewer set Sorter new History Sorter column  SelectionListener getColumnListener TableViewer tableViewer SelectionAdapter widgetSelected SelectionEvent tableViewer getTable indexOf TableColumn HistorySorter oldSorter HistorySorter tableViewer getSorter oldSorter oldSorter getColumnNumber oldSorter setReversed oldSorter isReversed tableViewer tableViewer setSorter HistorySorter
public String get Current Revision return current Revision  getCurrentRevision currentRevision
Method get Revision param current Edition private String get Revision ICVS File current Edition throws CVS Exception if current Edition null return NON NLS 1 Resource Sync Info info current Edition get Sync Info if info null return NON NLS 1 return info get Revision  getRevision currentEdition getRevision ICVSFile currentEdition CVSException currentEdition ResourceSyncInfo currentEdition getSyncInfo getRevision
public void set File ICVS File file throws CVS Exception this current File file this current Revision get Revision this current File  setFile ICVSFile CVSException currentFile currentRevision getRevision currentFile
public ICVS File getICVS File return this current File  ICVSFile getICVSFile currentFile

private I Part Listener part Listener new I Part Listener public void part Activated I Workbench Part part if part instanceof I Editor Part editor Activated I Editor Part part  IPartListener partListener IPartListener partActivated IWorkbenchPart IEditorPart editorActivated IEditorPart
editor Activated I Editor Part part public void part Brought To Top I Workbench Part part if part History View this editor Activated get View Site get Page get Active Editor  editorActivated IEditorPart partBroughtToTop IWorkbenchPart HistoryView editorActivated getViewSite getPage getActiveEditor
editor Activated get View Site get Page get Active Editor public void part Opened I Workbench Part part if part History View this editor Activated get View Site get Page get Active Editor  editorActivated getViewSite getPage getActiveEditor partOpened IWorkbenchPart HistoryView editorActivated getViewSite getPage getActiveEditor
editor Activated get View Site get Page get Active Editor public void part Closed I Workbench Part part  editorActivated getViewSite getPage getActiveEditor partClosed IWorkbenchPart
public void part Closed I Workbench Part part public void part Deactivated I Workbench Part part  partClosed IWorkbenchPart partDeactivated IWorkbenchPart
private I Part Listener2 part Listener2 new I Part Listener2 public void part Activated I Workbench Part Reference ref  IPartListener2 partListener2 IPartListener2 partActivated IWorkbenchPartReference
public void part Activated I Workbench Part Reference ref public void part Brought To Top I Workbench Part Reference ref  partActivated IWorkbenchPartReference partBroughtToTop IWorkbenchPartReference
public void part Brought To Top I Workbench Part Reference ref public void part Closed I Workbench Part Reference ref  partBroughtToTop IWorkbenchPartReference partClosed IWorkbenchPartReference
public void part Closed I Workbench Part Reference ref public void part Deactivated I Workbench Part Reference ref  partClosed IWorkbenchPartReference partDeactivated IWorkbenchPartReference
public void part Deactivated I Workbench Part Reference ref public void part Opened I Workbench Part Reference ref  partDeactivated IWorkbenchPartReference partOpened IWorkbenchPartReference
public void part Opened I Workbench Part Reference ref public void part Hidden I Workbench Part Reference ref  partOpened IWorkbenchPartReference partHidden IWorkbenchPartReference
public void part Hidden I Workbench Part Reference ref public void part Visible I Workbench Part Reference ref if ref get Part true History View this editor Activated get View Site get Page get Active Editor  partHidden IWorkbenchPartReference partVisible IWorkbenchPartReference getPart HistoryView editorActivated getViewSite getPage getActiveEditor
editor Activated get View Site get Page get Active Editor public void part Input Changed I Workbench Part Reference ref  editorActivated getViewSite getPage getActiveEditor partInputChanged IWorkbenchPartReference
private class Fetch Log Entries Job extends Job public ICVS Remote File remote File public Fetch Log Entries Job super Policy bind History View fetch History Job NON NLS 1  FetchLogEntriesJob ICVSRemoteFile remoteFile FetchLogEntriesJob HistoryView fetchHistoryJob
super Policy bind History View fetch History Job NON NLS 1 public void set Remote File ICVS Remote File file this remote File file  HistoryView fetchHistoryJob setRemoteFile ICVSRemoteFile remoteFile
get Site get Shell get Display async Exec new Runnable public void run if entries null table Viewer null table Viewer get Table is Disposed table Viewer add entries select Revision revision Id  getSite getShell getDisplay asyncExec tableViewer tableViewer getTable isDisposed tableViewer selectRevision revisionId
public I Status run I Progress Monitor monitor try if remote File null shutdown entries remote File get Log Entries monitor final String revision Id remote File get Revision get Site get Shell get Display async Exec new Runnable public void run if entries null table Viewer null table Viewer get Table is Disposed table Viewer add entries select Revision revision Id return Status OK STATUS catch Team Exception e return e get Status  IStatus IProgressMonitor remoteFile remoteFile getLogEntries revisionId remoteFile getRevision getSite getShell getDisplay asyncExec tableViewer tableViewer getTable isDisposed tableViewer selectRevision revisionId OK_STATUS TeamException getStatus
CVSUI Plugin plugin CVSUI Plugin get Plugin refresh Action new Action Policy bind History View refresh Label plugin get Image Descriptor ICVSUI Constants IMG REFRESH ENABLED NON NLS 1 public void run refresh  CVSUIPlugin CVSUIPlugin getPlugin refreshAction HistoryView refreshLabel getImageDescriptor ICVSUIConstants IMG_REFRESH_ENABLED
Link with Editor toolbar link With Editor Action new Action Policy bind History View link With Label plugin get Image Descriptor ICVSUI Constants IMG LINK WITH EDITOR ENABLED NON NLS 1 public void run set Linking Enabled is Checked  linkWithEditorAction HistoryView linkWithLabel getImageDescriptor ICVSUIConstants IMG_LINK_WITH_EDITOR_ENABLED setLinkingEnabled isChecked
open Action new Open Log Entry Action table Viewer get Table add Listener SWT Default Selection new Listener public void handle Event Event e open Action selection Changed null table Viewer get Selection open Action run null  openAction OpenLogEntryAction tableViewer getTable addListener DefaultSelection handleEvent openAction selectionChanged tableViewer getSelection openAction
get Contents Action get Context Menu Action Policy bind History View get Contents Action true needs progress new I Workspace Runnable NON NLS 1 public void run I Progress Monitor monitor throws Core Exception ICVS Remote File remote File current Selection get Remote File monitor begin Task null 100 try if confirm Overwrite Input Stream in remote File get Contents new Sub Progress Monitor monitor 50 file set Contents in false true new Sub Progress Monitor monitor 50 catch Team Exception e throw new Core Exception e get Status finally monitor done  getContentsAction getContextMenuAction HistoryView getContentsAction IWorkspaceRunnable IProgressMonitor CoreException ICVSRemoteFile remoteFile currentSelection getRemoteFile beginTask confirmOverwrite InputStream remoteFile getContents SubProgressMonitor setContents SubProgressMonitor TeamException CoreException getStatus
history Table Provider set File remote File Display get Default async Exec new Runnable public void run table Viewer refresh  historyTableProvider setFile remoteFile getDefault asyncExec tableViewer
get Revision Action get Context Menu Action Policy bind History View get Revision Action true needs progress new I Workspace Runnable NON NLS 1 public void run I Progress Monitor monitor throws Core Exception ICVS Remote File remote File current Selection get Remote File try if confirm Overwrite CVS Tag revision Tag new CVS Tag remote File get Revision CVS Tag VERSION if CVS Action check For Mixing Tags get Site get Shell new I Resource file revision Tag new Update Operation null new I Resource file new Command Local Option Update IGNORE LOCAL CHANGES revision Tag run monitor history Table Provider set File remote File Display get Default async Exec new Runnable public void run table Viewer refresh catch Invocation Target Exception e CVS Exception wrap Exception e catch Interrupted Exception e Cancelled by user  getRevisionAction getContextMenuAction HistoryView getRevisionAction IWorkspaceRunnable IProgressMonitor CoreException ICVSRemoteFile remoteFile currentSelection getRemoteFile confirmOverwrite CVSTag revisionTag CVSTag remoteFile getRevision CVSTag CVSAction checkForMixingTags getSite getShell IResource revisionTag UpdateOperation IResource LocalOption IGNORE_LOCAL_CHANGES revisionTag historyTableProvider setFile remoteFile getDefault asyncExec tableViewer InvocationTargetException CVSException wrapException InterruptedException
final I Action Delegate tag Action Delegate new Move Remote Tag Action protected ICVS Resource get SelectedCVS Resources ICVS Resource resources super get SelectedCVS Resources if resources null resources length 0 Array List log Entrie Files null if selection is Empty log Entrie Files new Array List Iterator elements selection iterator while elements has Next Object next elements next if next instanceof I Log Entry log Entrie Files add I Log Entry next get Remote File continue if next instanceof I Adaptable I Adaptable a I Adaptable next Object adapter a get Adapter ICVS Resource class if adapter instanceof ICVS Resource log Entrie Files add I Log Entry adapter get Remote File continue if log Entrie Files null log Entrie Files is Empty return ICVS Resource log Entrie Files to Array new ICVS Resource log Entrie Files size return resources  IActionDelegate tagActionDelegate MoveRemoteTagAction ICVSResource getSelectedCVSResources ICVSResource getSelectedCVSResources ArrayList logEntrieFiles isEmpty logEntrieFiles ArrayList hasNext ILogEntry logEntrieFiles ILogEntry getRemoteFile IAdaptable IAdaptable IAdaptable getAdapter ICVSResource ICVSResource logEntrieFiles ILogEntry getRemoteFile logEntrieFiles logEntrieFiles isEmpty ICVSResource logEntrieFiles toArray ICVSResource logEntrieFiles
Display get Default async Exec new Runnable public void run if Move Remote Tag Action tag Action Delegate was Cancelled refresh  getDefault asyncExec MoveRemoteTagAction tagActionDelegate wasCancelled
tag With Existing Action get Context Menu Action Policy bind History View tag With Existing Action false no progress new I Workspace Runnable NON NLS 1 public void run I Progress Monitor monitor throws Core Exception tag Action Delegate selection Changed tag With Existing Action table Viewer get Selection tag Action Delegate run tag With Existing Action Display get Default async Exec new Runnable public void run if Move Remote Tag Action tag Action Delegate was Cancelled refresh  tagWithExistingAction getContextMenuAction HistoryView tagWithExistingAction IWorkspaceRunnable IProgressMonitor CoreException tagActionDelegate selectionChanged tagWithExistingAction tableViewer getSelection tagActionDelegate tagWithExistingAction getDefault asyncExec MoveRemoteTagAction tagActionDelegate wasCancelled
final I Preference Store store CVSUI Plugin get Plugin get Preference Store toggle Text Action new Action Policy bind History View show Comment NON NLS 1 public void run set Viewer Visibility store set Value ICVSUI Constants PREF SHOW COMMENTS toggle Text Action is Checked  IPreferenceStore CVSUIPlugin getPlugin getPreferenceStore toggleTextAction HistoryView showComment setViewerVisibility setValue ICVSUIConstants PREF_SHOW_COMMENTS toggleTextAction isChecked
Toggle list visible action toggle List Action new Action Policy bind History View show Tags NON NLS 1 public void run set Viewer Visibility store set Value ICVSUI Constants PREF SHOW TAGS toggle List Action is Checked  toggleListAction HistoryView showTags setViewerVisibility setValue ICVSUIConstants PREF_SHOW_TAGS toggleListAction isChecked
Menu menu menu Mgr create Context Menu table Viewer get Table menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager menu Mgr fill Table Menu menu Mgr  menuMgr createContextMenu tableViewer getTable menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager menuMgr fillTableMenu menuMgr
menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager menu Mgr fill Text Menu menu Mgr  menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager menuMgr fillTextMenu menuMgr
Adds the action contributions for this view protected void contribute Actions Refresh toolbar CVSUI Plugin plugin CVSUI Plugin get Plugin refresh Action new Action Policy bind History View refresh Label plugin get Image Descriptor ICVSUI Constants IMG REFRESH ENABLED NON NLS 1 public void run refresh refresh Action set Tool Tip Text Policy bind History View refresh NON NLS 1 refresh Action set Disabled Image Descriptor plugin get Image Descriptor ICVSUI Constants IMG REFRESH DISABLED refresh Action set Hover Image Descriptor plugin get Image Descriptor ICVSUI Constants IMG REFRESH Link with Editor toolbar link With Editor Action new Action Policy bind History View link With Label plugin get Image Descriptor ICVSUI Constants IMG LINK WITH EDITOR ENABLED NON NLS 1 public void run set Linking Enabled is Checked link With Editor Action set Tool Tip Text Policy bind History View link With Label NON NLS 1 link With Editor Action set Hover Image Descriptor plugin get Image Descriptor ICVSUI Constants IMG LINK WITH EDITOR link With Editor Action set Checked is Linking Enabled Double click open action open Action new Open Log Entry Action table Viewer get Table add Listener SWT Default Selection new Listener public void handle Event Event e open Action selection Changed null table Viewer get Selection open Action run null get Contents Action get Context Menu Action Policy bind History View get Contents Action true needs progress new I Workspace Runnable NON NLS 1 public void run I Progress Monitor monitor throws Core Exception ICVS Remote File remote File current Selection get Remote File monitor begin Task null 100 try if confirm Overwrite Input Stream in remote File get Contents new Sub Progress Monitor monitor 50 file set Contents in false true new Sub Progress Monitor monitor 50 catch Team Exception e throw new Core Exception e get Status finally monitor done Workbench Help set Help get Contents Action I Help Context Ids GET FILE CONTENTS ACTION get Revision Action get Context Menu Action Policy bind History View get Revision Action true needs progress new I Workspace Runnable NON NLS 1 public void run I Progress Monitor monitor throws Core Exception ICVS Remote File remote File current Selection get Remote File try if confirm Overwrite CVS Tag revision Tag new CVS Tag remote File get Revision CVS Tag VERSION if CVS Action check For Mixing Tags get Site get Shell new I Resource file revision Tag new Update Operation null new I Resource file new Command Local Option Update IGNORE LOCAL CHANGES revision Tag run monitor history Table Provider set File remote File Display get Default async Exec new Runnable public void run table Viewer refresh catch Invocation Target Exception e CVS Exception wrap Exception e catch Interrupted Exception e Cancelled by user Workbench Help set Help get Revision Action I Help Context Ids GET FILE REVISION ACTION Override Move Remote Tag Action to work for log entries final I Action Delegate tag Action Delegate new Move Remote Tag Action protected ICVS Resource get SelectedCVS Resources ICVS Resource resources super get SelectedCVS Resources if resources null resources length 0 Array List log Entrie Files null if selection is Empty log Entrie Files new Array List Iterator elements selection iterator while elements has Next Object next elements next if next instanceof I Log Entry log Entrie Files add I Log Entry next get Remote File continue if next instanceof I Adaptable I Adaptable a I Adaptable next Object adapter a get Adapter ICVS Resource class if adapter instanceof ICVS Resource log Entrie Files add I Log Entry adapter get Remote File continue if log Entrie Files null log Entrie Files is Empty return ICVS Resource log Entrie Files to Array new ICVS Resource log Entrie Files size return resources tag With Existing Action get Context Menu Action Policy bind History View tag With Existing Action false no progress new I Workspace Runnable NON NLS 1 public void run I Progress Monitor monitor throws Core Exception tag Action Delegate selection Changed tag With Existing Action table Viewer get Selection tag Action Delegate run tag With Existing Action Display get Default async Exec new Runnable public void run if Move Remote Tag Action tag Action Delegate was Cancelled refresh Workbench Help set Help get Revision Action I Help Context Ids TAG WITH EXISTING ACTION Toggle text visible action final I Preference Store store CVSUI Plugin get Plugin get Preference Store toggle Text Action new Action Policy bind History View show Comment NON NLS 1 public void run set Viewer Visibility store set Value ICVSUI Constants PREF SHOW COMMENTS toggle Text Action is Checked toggle Text Action set Checked store get Boolean ICVSUI Constants PREF SHOW COMMENTS Workbench Help set Help toggle Text Action I Help Context Ids SHOW COMMENT IN HISTORY ACTION Toggle list visible action toggle List Action new Action Policy bind History View show Tags NON NLS 1 public void run set Viewer Visibility store set Value ICVSUI Constants PREF SHOW TAGS toggle List Action is Checked toggle List Action set Checked store get Boolean ICVSUI Constants PREF SHOW TAGS Workbench Help set Help toggle List Action I Help Context Ids SHOW TAGS IN HISTORY ACTION Contribute actions to popup menu Menu Manager menu Mgr new Menu Manager Menu menu menu Mgr create Context Menu table Viewer get Table menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager menu Mgr fill Table Menu menu Mgr menu Mgr set Remove All When Shown true table Viewer get Table set Menu menu get Site register Context Menu menu Mgr table Viewer Contribute toggle text visible to the toolbar drop down I Action Bars action Bars get View Site get Action Bars I Menu Manager action Bars Menu action Bars get Menu Manager action Bars Menu add toggle Text Action action Bars Menu add toggle List Action Create the local tool bar I Tool Bar Manager tbm get View Site get Action Bars get Tool Bar Manager tbm add refresh Action tbm add link With Editor Action tbm update false Create actions for the text editor copy Action new Text Viewer Action text Viewer I Text Operation Target COPY copy Action set Text Policy bind History View copy NON NLS 1 action Bars set Global Action Handler I Text Editor Action Constants COPY copy Action select All Action new Text Viewer Action text Viewer I Text Operation Target SELECT ALL select All Action set Text Policy bind History View select All NON NLS 1 action Bars set Global Action Handler I Text Editor Action Constants SELECT ALL select All Action action Bars update Action Bars menu Mgr new Menu Manager menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager menu Mgr fill Text Menu menu Mgr Styled Text text text Viewer get Text Widget menu menu Mgr create Context Menu text text set Menu menu  contributeActions CVSUIPlugin CVSUIPlugin getPlugin refreshAction HistoryView refreshLabel getImageDescriptor ICVSUIConstants IMG_REFRESH_ENABLED refreshAction setToolTipText HistoryView refreshAction setDisabledImageDescriptor getImageDescriptor ICVSUIConstants IMG_REFRESH_DISABLED refreshAction setHoverImageDescriptor getImageDescriptor ICVSUIConstants IMG_REFRESH linkWithEditorAction HistoryView linkWithLabel getImageDescriptor ICVSUIConstants IMG_LINK_WITH_EDITOR_ENABLED setLinkingEnabled isChecked linkWithEditorAction setToolTipText HistoryView linkWithLabel linkWithEditorAction setHoverImageDescriptor getImageDescriptor ICVSUIConstants IMG_LINK_WITH_EDITOR linkWithEditorAction setChecked isLinkingEnabled openAction OpenLogEntryAction tableViewer getTable addListener DefaultSelection handleEvent openAction selectionChanged tableViewer getSelection openAction getContentsAction getContextMenuAction HistoryView getContentsAction IWorkspaceRunnable IProgressMonitor CoreException ICVSRemoteFile remoteFile currentSelection getRemoteFile beginTask confirmOverwrite InputStream remoteFile getContents SubProgressMonitor setContents SubProgressMonitor TeamException CoreException getStatus WorkbenchHelp setHelp getContentsAction IHelpContextIds GET_FILE_CONTENTS_ACTION getRevisionAction getContextMenuAction HistoryView getRevisionAction IWorkspaceRunnable IProgressMonitor CoreException ICVSRemoteFile remoteFile currentSelection getRemoteFile confirmOverwrite CVSTag revisionTag CVSTag remoteFile getRevision CVSTag CVSAction checkForMixingTags getSite getShell IResource revisionTag UpdateOperation IResource LocalOption IGNORE_LOCAL_CHANGES revisionTag historyTableProvider setFile remoteFile getDefault asyncExec tableViewer InvocationTargetException CVSException wrapException InterruptedException WorkbenchHelp setHelp getRevisionAction IHelpContextIds GET_FILE_REVISION_ACTION MoveRemoteTagAction IActionDelegate tagActionDelegate MoveRemoteTagAction ICVSResource getSelectedCVSResources ICVSResource getSelectedCVSResources ArrayList logEntrieFiles isEmpty logEntrieFiles ArrayList hasNext ILogEntry logEntrieFiles ILogEntry getRemoteFile IAdaptable IAdaptable IAdaptable getAdapter ICVSResource ICVSResource logEntrieFiles ILogEntry getRemoteFile logEntrieFiles logEntrieFiles isEmpty ICVSResource logEntrieFiles toArray ICVSResource logEntrieFiles tagWithExistingAction getContextMenuAction HistoryView tagWithExistingAction IWorkspaceRunnable IProgressMonitor CoreException tagActionDelegate selectionChanged tagWithExistingAction tableViewer getSelection tagActionDelegate tagWithExistingAction getDefault asyncExec MoveRemoteTagAction tagActionDelegate wasCancelled WorkbenchHelp setHelp getRevisionAction IHelpContextIds TAG_WITH_EXISTING_ACTION IPreferenceStore CVSUIPlugin getPlugin getPreferenceStore toggleTextAction HistoryView showComment setViewerVisibility setValue ICVSUIConstants PREF_SHOW_COMMENTS toggleTextAction isChecked toggleTextAction setChecked getBoolean ICVSUIConstants PREF_SHOW_COMMENTS WorkbenchHelp setHelp toggleTextAction IHelpContextIds SHOW_COMMENT_IN_HISTORY_ACTION toggleListAction HistoryView showTags setViewerVisibility setValue ICVSUIConstants PREF_SHOW_TAGS toggleListAction isChecked toggleListAction setChecked getBoolean ICVSUIConstants PREF_SHOW_TAGS WorkbenchHelp setHelp toggleListAction IHelpContextIds SHOW_TAGS_IN_HISTORY_ACTION MenuManager menuMgr MenuManager menuMgr createContextMenu tableViewer getTable menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager menuMgr fillTableMenu menuMgr menuMgr setRemoveAllWhenShown tableViewer getTable setMenu getSite registerContextMenu menuMgr tableViewer IActionBars actionBars getViewSite getActionBars IMenuManager actionBarsMenu actionBars getMenuManager actionBarsMenu toggleTextAction actionBarsMenu toggleListAction IToolBarManager getViewSite getActionBars getToolBarManager refreshAction linkWithEditorAction copyAction TextViewerAction textViewer ITextOperationTarget copyAction setText HistoryView actionBars setGlobalActionHandler ITextEditorActionConstants copyAction selectAllAction TextViewerAction textViewer ITextOperationTarget SELECT_ALL selectAllAction setText HistoryView selectAll actionBars setGlobalActionHandler ITextEditorActionConstants SELECT_ALL selectAllAction actionBars updateActionBars menuMgr MenuManager menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager menuMgr fillTextMenu menuMgr StyledText textViewer getTextWidget menuMgr createContextMenu setMenu
private void set Viewer Visibility boolean show Text toggle Text Action is Checked boolean show List toggle List Action is Checked if show Text show List sash Form set Maximized Control null inner Sash Form set Maximized Control null else if show Text sash Form set Maximized Control null inner Sash Form set Maximized Control text Viewer get Text Widget else if show List sash Form set Maximized Control null inner Sash Form set Maximized Control tag Viewer get Table else sash Form set Maximized Control table Viewer get Control  setViewerVisibility showText toggleTextAction isChecked showList toggleListAction isChecked showText showList sashForm setMaximizedControl innerSashForm setMaximizedControl showText sashForm setMaximizedControl innerSashForm setMaximizedControl textViewer getTextWidget showList sashForm setMaximizedControl innerSashForm setMaximizedControl tagViewer getTable sashForm setMaximizedControl tableViewer getControl
public void create Part Control Composite parent settings CVSUI Plugin get Plugin get Preference Store this linking Enabled settings get Boolean ICVSUI Constants PREF HISTORY VIEW EDITOR LINKING initialize Images sash Form new Sash Form parent SWT VERTICAL sash Form set Layout Data new Grid Data Grid Data FILL BOTH table Viewer create Table sash Form inner Sash Form new Sash Form sash Form SWT HORIZONTAL tag Viewer create Tag Table inner Sash Form text Viewer create Text inner Sash Form sash Form set Weights new int 70 30 inner Sash Form set Weights new int 50 50 contribute Actions set Viewer Visibility set F1 help Workbench Help set Help sash Form I Help Context Ids RESOURCE HISTORY VIEW init Drag And Drop add listener for editor page activation this is to support editor linking get Site get Page add Part Listener part Listener get Site get Page add Part Listener part Listener2  createPartControl CVSUIPlugin getPlugin getPreferenceStore linkingEnabled getBoolean ICVSUIConstants PREF_HISTORY_VIEW_EDITOR_LINKING initializeImages sashForm SashForm sashForm setLayoutData GridData GridData FILL_BOTH tableViewer createTable sashForm innerSashForm SashForm sashForm tagViewer createTagTable innerSashForm textViewer createText innerSashForm sashForm setWeights innerSashForm setWeights contributeActions setViewerVisibility WorkbenchHelp setHelp sashForm IHelpContextIds RESOURCE_HISTORY_VIEW initDragAndDrop getSite getPage addPartListener partListener getSite getPage addPartListener partListener2
private void initialize Images CVSUI Plugin plugin CVSUI Plugin get Plugin version Image plugin get Image Descriptor ICVSUI Constants IMG PROJECT VERSION create Image branch Image plugin get Image Descriptor ICVSUI Constants IMG TAG create Image  initializeImages CVSUIPlugin CVSUIPlugin getPlugin versionImage getImageDescriptor ICVSUIConstants IMG_PROJECT_VERSION createImage branchImage getImageDescriptor ICVSUIConstants IMG_TAG createImage
viewer set Content Provider new I Structured Content Provider public Object get Elements Object input Element Short circuit to optimize if entries null return entries if input Element instanceof ICVS Remote File return null final ICVS Remote File remote File ICVS Remote File input Element if fetch Log Entries Job null fetch Log Entries Job new Fetch Log Entries Job if fetch Log Entries Job get State Job NONE fetch Log Entries Job cancel try fetch Log Entries Job join catch Interrupted Exception e CVSUI Plugin log new CVS Exception Policy bind History View error Fetching Entries remote File get Name e NON NLS 1 fetch Log Entries Job set Remote File remote File Utils schedule fetch Log Entries Job get View Site return new Object 0  setContentProvider IStructuredContentProvider getElements inputElement inputElement ICVSRemoteFile ICVSRemoteFile remoteFile ICVSRemoteFile inputElement fetchLogEntriesJob fetchLogEntriesJob FetchLogEntriesJob fetchLogEntriesJob getState fetchLogEntriesJob fetchLogEntriesJob InterruptedException CVSUIPlugin CVSException HistoryView errorFetchingEntries remoteFile getName fetchLogEntriesJob setRemoteFile remoteFile fetchLogEntriesJob getViewSite
return new Object 0 public void dispose 
public void dispose public void input Changed Viewer viewer Object old Input Object new Input entries null  inputChanged oldInput newInput
viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Selection selection event get Selection if selection null selection instanceof I Structured Selection text Viewer set Document new Document NON NLS 1 tag Viewer set Input null return I Structured Selection ss I Structured Selection selection if ss size 1 text Viewer set Document new Document NON NLS 1 tag Viewer set Input null return I Log Entry entry I Log Entry ss get First Element text Viewer set Document new Document entry get Comment tag Viewer set Input entry get Tags  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection IStructuredSelection textViewer setDocument tagViewer setInput IStructuredSelection IStructuredSelection textViewer setDocument tagViewer setInput ILogEntry ILogEntry getFirstElement textViewer setDocument getComment tagViewer setInput getTags
Creates the group that displays lists of the available repositories and team streams param the parent composite to contain the group return the group control protected Table Viewer create Table Composite parent history Table Provider new History Table Provider Table Viewer viewer history Table Provider create Table parent viewer set Content Provider new I Structured Content Provider public Object get Elements Object input Element Short circuit to optimize if entries null return entries if input Element instanceof ICVS Remote File return null final ICVS Remote File remote File ICVS Remote File input Element if fetch Log Entries Job null fetch Log Entries Job new Fetch Log Entries Job if fetch Log Entries Job get State Job NONE fetch Log Entries Job cancel try fetch Log Entries Job join catch Interrupted Exception e CVSUI Plugin log new CVS Exception Policy bind History View error Fetching Entries remote File get Name e NON NLS 1 fetch Log Entries Job set Remote File remote File Utils schedule fetch Log Entries Job get View Site return new Object 0 public void dispose public void input Changed Viewer viewer Object old Input Object new Input entries null viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Selection selection event get Selection if selection null selection instanceof I Structured Selection text Viewer set Document new Document NON NLS 1 tag Viewer set Input null return I Structured Selection ss I Structured Selection selection if ss size 1 text Viewer set Document new Document NON NLS 1 tag Viewer set Input null return I Log Entry entry I Log Entry ss get First Element text Viewer set Document new Document entry get Comment tag Viewer set Input entry get Tags return viewer  TableViewer createTable historyTableProvider HistoryTableProvider TableViewer historyTableProvider createTable setContentProvider IStructuredContentProvider getElements inputElement inputElement ICVSRemoteFile ICVSRemoteFile remoteFile ICVSRemoteFile inputElement fetchLogEntriesJob fetchLogEntriesJob FetchLogEntriesJob fetchLogEntriesJob getState fetchLogEntriesJob fetchLogEntriesJob InterruptedException CVSUIPlugin CVSException HistoryView errorFetchingEntries remoteFile getName fetchLogEntriesJob setRemoteFile remoteFile fetchLogEntriesJob getViewSite inputChanged oldInput newInput addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection IStructuredSelection textViewer setDocument tagViewer setInput IStructuredSelection IStructuredSelection textViewer setDocument tagViewer setInput ILogEntry ILogEntry getFirstElement textViewer setDocument getComment tagViewer setInput getTags
result set Content Provider new Simple Content Provider public Object get Elements Object input Element if input Element null return new Object 0 CVS Tag tags CVS Tag input Element return tags  setContentProvider SimpleContentProvider getElements inputElement inputElement CVSTag CVSTag inputElement
result set Label Provider new Label Provider public Image get Image Object element if element null return null CVS Tag tag CVS Tag element switch tag get Type case CVS Tag BRANCH case CVS Tag HEAD return branch Image case CVS Tag VERSION return version Image return null  setLabelProvider LabelProvider getImage CVSTag CVSTag getType CVSTag CVSTag branchImage CVSTag versionImage
return null public String get Text Object element return CVS Tag element get Name  getText CVSTag getName
result set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 if e1 instanceof CVS Tag e2 instanceof CVS Tag return super compare viewer e1 e2 CVS Tag tag1 CVS Tag e1 CVS Tag tag2 CVS Tag e2 int type1 tag1 get Type int type2 tag2 get Type if type1 type2 return type2 type1 return super compare viewer tag1 tag2  setSorter ViewerSorter CVSTag CVSTag CVSTag CVSTag CVSTag CVSTag getType getType
private Table Viewer create Tag Table Composite parent Table table new Table parent SWT H SCROLL SWT V SCROLL SWT FULL SELECTION SWT BORDER Table Viewer result new Table Viewer table Table Layout layout new Table Layout layout add Column Data new Column Weight Data 100 table set Layout layout result set Content Provider new Simple Content Provider public Object get Elements Object input Element if input Element null return new Object 0 CVS Tag tags CVS Tag input Element return tags result set Label Provider new Label Provider public Image get Image Object element if element null return null CVS Tag tag CVS Tag element switch tag get Type case CVS Tag BRANCH case CVS Tag HEAD return branch Image case CVS Tag VERSION return version Image return null public String get Text Object element return CVS Tag element get Name result set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 if e1 instanceof CVS Tag e2 instanceof CVS Tag return super compare viewer e1 e2 CVS Tag tag1 CVS Tag e1 CVS Tag tag2 CVS Tag e2 int type1 tag1 get Type int type2 tag2 get Type if type1 type2 return type2 type1 return super compare viewer tag1 tag2 return result  TableViewer createTagTable H_SCROLL V_SCROLL FULL_SELECTION TableViewer TableViewer TableLayout TableLayout addColumnData ColumnWeightData setLayout setContentProvider SimpleContentProvider getElements inputElement inputElement CVSTag CVSTag inputElement setLabelProvider LabelProvider getImage CVSTag CVSTag getType CVSTag CVSTag branchImage CVSTag versionImage getText CVSTag getName setSorter ViewerSorter CVSTag CVSTag CVSTag CVSTag CVSTag CVSTag getType getType
Text Viewer result new Text Viewer parent SWT H SCROLL SWT V SCROLL SWT MULTI SWT BORDER SWT READ ONLY result add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event copy Action update  TextViewer TextViewer H_SCROLL V_SCROLL READ_ONLY addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent copyAction
protected Text Viewer create Text Composite parent Text Viewer result new Text Viewer parent SWT H SCROLL SWT V SCROLL SWT MULTI SWT BORDER SWT READ ONLY result add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event copy Action update return result  TextViewer createText TextViewer TextViewer H_SCROLL V_SCROLL READ_ONLY addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent copyAction
public void dispose shutdown true if branch Image null branch Image dispose branch Image null if version Image null version Image dispose version Image null if fetch Log Entries Job null if fetch Log Entries Job get State Job NONE fetch Log Entries Job cancel try fetch Log Entries Job join catch Interrupted Exception e CVSUI Plugin log new CVS Exception Policy bind History View error Fetching Entries e NON NLS 1 NON NLS 2 get Site get Page remove Part Listener part Listener get Site get Page remove Part Listener part Listener2  branchImage branchImage branchImage versionImage versionImage versionImage fetchLogEntriesJob fetchLogEntriesJob getState fetchLogEntriesJob fetchLogEntriesJob InterruptedException CVSUIPlugin CVSException HistoryView errorFetchingEntries getSite getPage removePartListener partListener getSite getPage removePartListener partListener2
Returns the table viewer contained in this view protected Table Viewer get Viewer return table Viewer  TableViewer getViewer tableViewer
Adds drag and drop support to the history view void init Drag And Drop int ops DND DROP MOVE DND DROP COPY DND DROP LINK Transfer transfers new Transfer Resource Transfer get Instance table Viewer add Drop Support ops transfers new History Drop Adapter table Viewer this  initDragAndDrop DROP_MOVE DROP_COPY DROP_LINK ResourceTransfer getInstance tableViewer addDropSupport HistoryDropAdapter tableViewer
private void fill Table Menu I Menu Manager manager file actions go first view file manager add new Separator I Workbench Action Constants GROUP FILE if file null Add the Add to Workspace action if 1 revision is selected I Selection sel table Viewer get Selection if sel is Empty if sel instanceof I Structured Selection if I Structured Selection sel size 1 manager add get Contents Action manager add get Revision Action manager add new Separator manager add tag With Existing Action manager add new Separator additions NON NLS 1 manager add refresh Action manager add new Separator additions end NON NLS 1  fillTableMenu IMenuManager IWorkbenchActionConstants GROUP_FILE ISelection tableViewer getSelection isEmpty IStructuredSelection IStructuredSelection getContentsAction getRevisionAction tagWithExistingAction refreshAction
manager add new Separator additions end NON NLS 1 private void fill Text Menu I Menu Manager manager manager add copy Action manager add select All Action  fillTextMenu IMenuManager copyAction selectAllAction
Makes the history view visible in the active perspective If there isn t a history view registered code null code is returned Otherwise the opened view part is returned public static History View open In Active Perspective try return History View CVSUI Plugin get Active Page show View VIEW ID catch Part Init Exception pe return null  HistoryView openInActivePerspective HistoryView CVSUIPlugin getActivePage showView VIEW_ID PartInitException
Non javadoc Method declared on I Workbench Part public void set Focus if table Viewer null Table control table Viewer get Table if control null control is Disposed control set Focus  IWorkbenchPart setFocus tableViewer tableViewer getTable isDisposed setFocus
Shows the history for the given I Resource in the view Only files are supported for now public void show History I Resource resource boolean refetch if resource instanceof I File I File newfile I File resource if refetch this file null newfile equals this file return this file newfile Repository Provider team Provider Repository Provider get Provider file get Project CVS Provider Plugin get Type Id if team Provider null try for a file this will return the base ICVS Remote File remote File ICVS Remote File CVS Workspace Root get Remote Resource For file if remote File null history Table Provider set File remote File input is set asynchronously so we can t assume that the view has been populated until the job that queries for the history has completed table Viewer set Input remote File set Content Description Policy bind History View title With Argument remote File get Name NON NLS 1 set Title Tool Tip resource get Full Path to String catch Team Exception e CVSUI Plugin open Error get View Site get Shell null null e else this file null table Viewer set Input null set Content Description Policy bind History View title NON NLS 1 set Title Tool Tip NON NLS 1  IResource showHistory IResource IFile IFile IFile RepositoryProvider teamProvider RepositoryProvider getProvider getProject CVSProviderPlugin getTypeId teamProvider ICVSRemoteFile remoteFile ICVSRemoteFile CVSWorkspaceRoot getRemoteResourceFor remoteFile historyTableProvider setFile remoteFile tableViewer setInput remoteFile setContentDescription HistoryView titleWithArgument remoteFile getName setTitleToolTip getFullPath toString TeamException CVSUIPlugin openError getViewSite getShell tableViewer setInput setContentDescription HistoryView setTitleToolTip
An editor has been activated Fetch the history if it is shared with CVS and the history view is visible in the current page param editor the active editor since 3 0 protected void editor Activated I Editor Part editor Only fetch contents if the view is shown in the current page if editor null is Linking Enabled check If Page Is Visible return I Editor Input input editor get Editor Input Handle compare editors opened from the Synchronize View if input instanceof Sync Info Compare Input Sync Info Compare Input sync Input Sync Info Compare Input input Sync Info info sync Input get Sync Info if info instanceof CVS Sync Info info get Local get Type I Resource FILE ICVS Remote File remote ICVS Remote File info get Remote ICVS Remote File base ICVS Remote File info get Base if remote null show History remote false else if base null show History base false Handle editors opened on remote files else if input instanceof Remote File Editor Input ICVS Remote File remote Remote File Editor Input input getCVS Remote File if remote null show History remote false Handle regular file editors else if input instanceof I File Editor Input I File Editor Input file Input I File Editor Input input I File file file Input get File show History file false don t fetch if already cached  editorActivated IEditorPart isLinkingEnabled checkIfPageIsVisible IEditorInput getEditorInput SyncInfoCompareInput SyncInfoCompareInput syncInput SyncInfoCompareInput SyncInfo syncInput getSyncInfo CVSSyncInfo getLocal getType IResource ICVSRemoteFile ICVSRemoteFile getRemote ICVSRemoteFile ICVSRemoteFile getBase showHistory showHistory RemoteFileEditorInput ICVSRemoteFile RemoteFileEditorInput getCVSRemoteFile showHistory IFileEditorInput IFileEditorInput fileInput IFileEditorInput IFile fileInput getFile showHistory
private boolean check If Page Is Visible return get View Site get Page is Part Visible this  checkIfPageIsVisible getViewSite getPage isPartVisible
Shows the history for the given ICVS Remote File in the view public void show History ICVS Remote File remote File boolean refetch try if remote File null table Viewer set Input null set Content Description Policy bind History View title NON NLS 1 set Title Tool Tip NON NLS 1 return ICVS File existing File history Table Provider getICVS File if refetch existing File null existing File equals remote File return this file null history Table Provider set File remote File table Viewer set Input remote File set Content Description Policy bind History View title With Argument remote File get Name NON NLS 1 set Title Tool Tip remote File get Repository Relative Path catch Team Exception e CVSUI Plugin open Error get View Site get Shell null null e  ICVSRemoteFile showHistory ICVSRemoteFile remoteFile remoteFile tableViewer setInput setContentDescription HistoryView setTitleToolTip ICVSFile existingFile historyTableProvider getICVSFile existingFile existingFile remoteFile historyTableProvider setFile remoteFile tableViewer setInput remoteFile setContentDescription HistoryView titleWithArgument remoteFile getName setTitleToolTip remoteFile getRepositoryRelativePath TeamException CVSUIPlugin openError getViewSite getShell
PlatformUI get Workbench get Progress Service run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try action run monitor catch Core Exception e throw new Invocation Target Exception e  getWorkbench getProgressService IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException CoreException InvocationTargetException
return new Action title public void run try if file null return I Selection selection table Viewer get Selection if selection instanceof I Structured Selection return I Structured Selection ss I Structured Selection selection Object o ss get First Element current Selection I Log Entry o if needs Progress Dialog PlatformUI get Workbench get Progress Service run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try action run monitor catch Core Exception e throw new Invocation Target Exception e else try action run null catch Core Exception e throw new Invocation Target Exception e catch Invocation Target Exception e CVSUI Plugin open Error get View Site get Shell null null e CVSUI Plugin LOG NONTEAM EXCEPTIONS catch Interrupted Exception e Do nothing  ISelection tableViewer getSelection IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement currentSelection ILogEntry needsProgressDialog getWorkbench getProgressService IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException CoreException InvocationTargetException CoreException InvocationTargetException InvocationTargetException CVSUIPlugin openError getViewSite getShell CVSUIPlugin LOG_NONTEAM_EXCEPTIONS InterruptedException
public boolean is Enabled I Selection selection table Viewer get Selection if selection instanceof I Structured Selection return false I Structured Selection ss I Structured Selection selection if ss size 1 return false return true  isEnabled ISelection tableViewer getSelection IStructuredSelection IStructuredSelection IStructuredSelection
private Action get Context Menu Action String title final boolean needs Progress Dialog final I Workspace Runnable action return new Action title public void run try if file null return I Selection selection table Viewer get Selection if selection instanceof I Structured Selection return I Structured Selection ss I Structured Selection selection Object o ss get First Element current Selection I Log Entry o if needs Progress Dialog PlatformUI get Workbench get Progress Service run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try action run monitor catch Core Exception e throw new Invocation Target Exception e else try action run null catch Core Exception e throw new Invocation Target Exception e catch Invocation Target Exception e CVSUI Plugin open Error get View Site get Shell null null e CVSUI Plugin LOG NONTEAM EXCEPTIONS catch Interrupted Exception e Do nothing public boolean is Enabled I Selection selection table Viewer get Selection if selection instanceof I Structured Selection return false I Structured Selection ss I Structured Selection selection if ss size 1 return false return true  getContextMenuAction needsProgressDialog IWorkspaceRunnable ISelection tableViewer getSelection IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement currentSelection ILogEntry needsProgressDialog getWorkbench getProgressService IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException CoreException InvocationTargetException CoreException InvocationTargetException InvocationTargetException CVSUIPlugin openError getViewSite getShell CVSUIPlugin LOG_NONTEAM_EXCEPTIONS InterruptedException isEnabled ISelection tableViewer getSelection IStructuredSelection IStructuredSelection IStructuredSelection
final int result new int 1 get View Site get Shell get Display sync Exec new Runnable public void run result 0 dialog open  getViewSite getShell getDisplay syncExec
private boolean confirm Overwrite if file null file exists ICVS File cvs File CVS Workspace Root getCVS File For file try if cvs File is Modified null String title Policy bind History View overwrite Title NON NLS 1 String msg Policy bind History View overwrite Msg NON NLS 1 final Message Dialog dialog new Message Dialog get View Site get Shell title null msg Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants CANCEL LABEL 0 final int result new int 1 get View Site get Shell get Display sync Exec new Runnable public void run result 0 dialog open if result 0 0 cancel return false catch CVS Exception e CVSUI Plugin log e return true  confirmOverwrite ICVSFile cvsFile CVSWorkspaceRoot getCVSFileFor cvsFile isModified HistoryView overwriteTitle HistoryView overwriteMsg MessageDialog MessageDialog getViewSite getShell MessageDialog IDialogConstants YES_LABEL IDialogConstants CANCEL_LABEL getViewSite getShell getDisplay syncExec CVSException CVSUIPlugin
Busy Indicator show While table Viewer get Table get Display new Runnable public void run if a local file was fed to the history view then we will have to refetch the handle to properly display the current revision marker if file null ICVS Remote File remote File try remote File ICVS Remote File CVS Workspace Root get Remote Resource For file history Table Provider set File remote File catch CVS Exception e use previously fetched remote file but log error CVSUI Plugin log e table Viewer refresh  BusyIndicator showWhile tableViewer getTable getDisplay ICVSRemoteFile remoteFile remoteFile ICVSRemoteFile CVSWorkspaceRoot getRemoteResourceFor historyTableProvider setFile remoteFile CVSException CVSUIPlugin tableViewer
private void refresh entries null Busy Indicator show While table Viewer get Table get Display new Runnable public void run if a local file was fed to the history view then we will have to refetch the handle to properly display the current revision marker if file null ICVS Remote File remote File try remote File ICVS Remote File CVS Workspace Root get Remote Resource For file history Table Provider set File remote File catch CVS Exception e use previously fetched remote file but log error CVSUI Plugin log e table Viewer refresh  BusyIndicator showWhile tableViewer getTable getDisplay ICVSRemoteFile remoteFile remoteFile ICVSRemoteFile CVSWorkspaceRoot getRemoteResourceFor historyTableProvider setFile remoteFile CVSException CVSUIPlugin tableViewer
Select the revision in the receiver public void select Revision String revision if entries null return I Log Entry entry null for int i 0 i entries length i if entries i get Revision equals revision entry entries i break if entry null I Structured Selection selection new Structured Selection entry table Viewer set Selection selection true  selectRevision ILogEntry getRevision IStructuredSelection StructuredSelection tableViewer setSelection
Enabled linking to the active editor since 3 0 public void set Linking Enabled boolean enabled this linking Enabled enabled remember the last setting in the dialog settings settings set Value ICVSUI Constants PREF HISTORY VIEW EDITOR LINKING enabled if turning linking on update the selection to correspond to the active editor if enabled editor Activated get Site get Page get Active Editor  setLinkingEnabled linkingEnabled setValue ICVSUIConstants PREF_HISTORY_VIEW_EDITOR_LINKING editorActivated getSite getPage getActiveEditor
Returns if linking to the ative editor is enabled or disabled return boolean indicating state of editor linking private boolean is Linking Enabled return linking Enabled  isLinkingEnabled linkingEnabled
public static String flatten Text String string String Buffer buffer new String Buffer string length 20 boolean skip Adjacent Line Separator true for int i 0 i string length i char c string char At i if c r c n if skip Adjacent Line Separator buffer append Policy bind separator NON NLS 1 skip Adjacent Line Separator true else buffer append c skip Adjacent Line Separator false return buffer to String  flattenText StringBuffer StringBuffer skipAdjacentLineSeparator charAt skipAdjacentLineSeparator skipAdjacentLineSeparator skipAdjacentLineSeparator toString

Creates a new dialog for ignoring resources param shell the parent shell param resources the array of resources to be ignored public Ignore Resources Dialog Shell shell I Resource resources super shell this resources resources I Dialog Settings workbench Settings CVSUI Plugin get Plugin get Dialog Settings this settings workbench Settings get Section Ignore Resources Dialog NON NLS 1 if settings null this settings workbench Settings add New Section Ignore Resources Dialog NON NLS 1 try selected Action settings get Int ACTION KEY catch Number Format Exception e selected Action ADD NAME ENTRY  IgnoreResourcesDialog IResource IDialogSettings workbenchSettings CVSUIPlugin getPlugin getDialogSettings workbenchSettings getSection IgnoreResourcesDialog workbenchSettings addNewSection IgnoreResourcesDialog selectedAction getInt ACTION_KEY NumberFormatException selectedAction ADD_NAME_ENTRY
Determines the ignore pattern to use for a resource given the selected action param resource the resource return the ignore pattern for the specified resource public String get Ignore Pattern For I Resource resource switch selected Action case ADD NAME ENTRY return resource get Name case ADD EXTENSION ENTRY String extension resource get File Extension return extension null resource get Name extension NON NLS 1 case ADD CUSTOM ENTRY return custom Pattern throw new Illegal State Exception  getIgnorePatternFor IResource selectedAction ADD_NAME_ENTRY getName ADD_EXTENSION_ENTRY getFileExtension getName ADD_CUSTOM_ENTRY customPattern IllegalStateException
Method declared on Dialog protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
protected void configure Shell Shell new Shell super configure Shell new Shell if resources length 1 new Shell set Text Policy bind Ignore Resources Dialog title Single resources 0 get Name NON NLS 1 else new Shell set Text Policy bind Ignore Resources Dialog title Many Integer to String resources length NON NLS 1  configureShell newShell configureShell newShell newShell setText IgnoreResourcesDialog titleSingle getName newShell setText IgnoreResourcesDialog titleMany toString
protected Control create Contents Composite parent Control control super create Contents parent update Enablements return control  createContents createContents updateEnablements
protected Control create Dialog Area Composite parent Composite top new Composite parent SWT NONE top set Layout new Grid Layout Workbench Help set Help top I Help Context Ids ADD TO CVSIGNORE create Indented Label top Policy bind Ignore Resources Dialog prompt 0 NON NLS 1 Listener selection Listener new Listener public void handle Event Event event update Enablements Listener modify Listener new Listener public void handle Event Event event validate add Name Entry Button create Radio Button top Policy bind Ignore Resources Dialog add Name Entry Button NON NLS 1 add Name Entry Button add Listener SWT Selection selection Listener add Name Entry Button set Selection selected Action ADD NAME ENTRY create Indented Label top Policy bind Ignore Resources Dialog add Name Entry Example LABEL INDENT WIDTH NON NLS 1 add Extension Entry Button create Radio Button top Policy bind Ignore Resources Dialog add Extension Entry Button NON NLS 1 add Extension Entry Button add Listener SWT Selection selection Listener add Extension Entry Button set Selection selected Action ADD EXTENSION ENTRY create Indented Label top Policy bind Ignore Resources Dialog add Extension Entry Example LABEL INDENT WIDTH NON NLS 1 add Custom Entry Button create Radio Button top Policy bind Ignore Resources Dialog add Custom Entry Button NON NLS 1 add Custom Entry Button add Listener SWT Selection selection Listener add Custom Entry Button set Selection selected Action ADD CUSTOM ENTRY create Indented Label top Policy bind Ignore Resources Dialog add Custom Entry Example LABEL INDENT WIDTH NON NLS 1 custom Entry Text create Indented Text top resources 0 get Name LABEL INDENT WIDTH custom Entry Text add Listener SWT Modify modify Listener status Message Label create Indented Label top 0 NON NLS 1 Dialog apply Dialog Font parent return top  createDialogArea setLayout GridLayout WorkbenchHelp setHelp IHelpContextIds ADD_TO_CVSIGNORE createIndentedLabel IgnoreResourcesDialog selectionListener handleEvent updateEnablements modifyListener handleEvent addNameEntryButton createRadioButton IgnoreResourcesDialog addNameEntryButton addNameEntryButton addListener selectionListener addNameEntryButton setSelection selectedAction ADD_NAME_ENTRY createIndentedLabel IgnoreResourcesDialog addNameEntryExample LABEL_INDENT_WIDTH addExtensionEntryButton createRadioButton IgnoreResourcesDialog addExtensionEntryButton addExtensionEntryButton addListener selectionListener addExtensionEntryButton setSelection selectedAction ADD_EXTENSION_ENTRY createIndentedLabel IgnoreResourcesDialog addExtensionEntryExample LABEL_INDENT_WIDTH addCustomEntryButton createRadioButton IgnoreResourcesDialog addCustomEntryButton addCustomEntryButton addListener selectionListener addCustomEntryButton setSelection selectedAction ADD_CUSTOM_ENTRY createIndentedLabel IgnoreResourcesDialog addCustomEntryExample LABEL_INDENT_WIDTH customEntryText createIndentedText getName LABEL_INDENT_WIDTH customEntryText addListener modifyListener statusMessageLabel createIndentedLabel applyDialogFont
Method declared on Dialog protected void ok Pressed settings put ACTION KEY selected Action super ok Pressed  okPressed ACTION_KEY selectedAction okPressed
private Label create Indented Label Composite parent String text int indent Label label new Label parent SWT LEFT label set Text text Grid Data data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data FILL HORIZONTAL data horizontal Indent indent label set Layout Data data return label  createIndentedLabel setText GridData GridData GridData VERTICAL_ALIGN_FILL GridData FILL_HORIZONTAL horizontalIndent setLayoutData
private Text create Indented Text Composite parent String text int indent Text textbox new Text parent SWT BORDER textbox set Text text Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL data horizontal Indent indent textbox set Layout Data data return textbox  createIndentedText setText GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalIndent setLayoutData
private Label create Wrapping Label Composite parent String text Label label new Label parent SWT WRAP label set Text text Grid Data data new Grid Data Grid Data FILL BOTH data width Hint LABEL WIDTH HINT label set Layout Data data return label  createWrappingLabel setText GridData GridData GridData FILL_BOTH widthHint LABEL_WIDTH_HINT setLayoutData
private Button create Radio Button Composite parent String text Button button new Button parent SWT RADIO button set Text text button set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data FILL HORIZONTAL return button  createRadioButton setText setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData FILL_HORIZONTAL
private void update Enablements if add Name Entry Button get Selection selected Action ADD NAME ENTRY else if add Extension Entry Button get Selection selected Action ADD EXTENSION ENTRY else if add Custom Entry Button get Selection selected Action ADD CUSTOM ENTRY custom Entry Text set Enabled selected Action ADD CUSTOM ENTRY validate  updateEnablements addNameEntryButton getSelection selectedAction ADD_NAME_ENTRY addExtensionEntryButton getSelection selectedAction ADD_EXTENSION_ENTRY addCustomEntryButton getSelection selectedAction ADD_CUSTOM_ENTRY customEntryText setEnabled selectedAction ADD_CUSTOM_ENTRY
private void validate if selected Action ADD CUSTOM ENTRY custom Pattern custom Entry Text get Text if custom Pattern length 0 set Error Policy bind Ignore Resources Dialog pattern Must Not Be Empty NON NLS 1 return File Name Matcher matcher new File Name Matcher new String custom Pattern for int i 0 i resources length i String name resources i get Name if matcher match name set Error Policy bind Ignore Resources Dialog pattern Does Not Match File name NON NLS 1 return set Error null  selectedAction ADD_CUSTOM_ENTRY customPattern customEntryText getText customPattern setError IgnoreResourcesDialog patternMustNotBeEmpty FileNameMatcher FileNameMatcher customPattern getName setError IgnoreResourcesDialog patternDoesNotMatchFile setError
private void set Error String text if text null status Message Label set Text NON NLS 1 get Button I Dialog Constants OK ID set Enabled true else status Message Label set Text text status Message Label set Foreground J Face Colors get Error Text get Shell get Display get Button I Dialog Constants OK ID set Enabled false  setError statusMessageLabel setText getButton IDialogConstants OK_ID setEnabled statusMessageLabel setText statusMessageLabel setForeground JFaceColors getErrorText getShell getDisplay getButton IDialogConstants OK_ID setEnabled

public interface I Repository Listener public void repository Added ICVS Repository Location root  IRepositoryListener repositoryAdded ICVSRepositoryLocation
public interface I Repository Listener public void repository Added ICVS Repository Location root public void repository Removed ICVS Repository Location root  IRepositoryListener repositoryAdded ICVSRepositoryLocation repositoryRemoved ICVSRepositoryLocation
public void repository Added ICVS Repository Location root public void repository Removed ICVS Repository Location root public void repositories Changed ICVS Repository Location roots  repositoryAdded ICVSRepositoryLocation repositoryRemoved ICVSRepositoryLocation repositoriesChanged ICVSRepositoryLocation

Creates a nwe Keyboard Interactive Dialog param parent Shell the parent shell param destication the location param name the name param instruction the instruction param prompt the titles for textfields param echo should be used or not public Keyboard Interactive Dialog Shell parent Shell String location String destination String name String instruction String prompt boolean echo super parent Shell this domain location this destination destination this name name this instruction instruction this prompt prompt this echo echo this message Policy bind Keyborad Interactive Dialog message destination name null name length 0 name NON NLS 1 NON NLS 1 NON NLS 2 NON NLS 3  KeyboardInteractiveDialog parentShell KeyboardInteractiveDialog parentShell parentShell KeyboradInteractiveDialog
see Window configure Shell protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text message  configureShell configureShell newShell configureShell newShell newShell setText
see Window create public void create super create if texts length 0 texts 0 set Focus  setFocus
see Dialog create Dialog Area protected Control create Dialog Area Composite parent Composite main new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 main set Layout layout main set Layout Data new Grid Data Grid Data FILL BOTH set F1 help Workbench Help set Help main I Help Context Ids KEYBOARD INTERACTIVE DIALOG if message null Label message Label new Label main SWT WRAP message Label set Text message Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 3 message Label set Layout Data data if domain null Label label new Label main SWT WRAP label set Text Policy bind Keyboard Interactive Dialog label Repository domain NON NLS 1 Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 3 label set Layout Data data if instruction null instruction length 0 Label message Label new Label main SWT WRAP message Label set Text instruction Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 3 message Label set Layout Data data create Password Fields main return main  createDialogArea createDialogArea GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_BOTH WorkbenchHelp setHelp IHelpContextIds KEYBOARD_INTERACTIVE_DIALOG messageLabel messageLabel setText GridData GridData GridData FILL_HORIZONTAL horizontalSpan messageLabel setLayoutData setText KeyboardInteractiveDialog labelRepository GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData messageLabel messageLabel setText GridData GridData GridData FILL_HORIZONTAL horizontalSpan messageLabel setLayoutData createPasswordFields
Creates the widgets that represent the entry area param parent the parent of the widgets protected void create Password Fields Composite parent texts new Text prompt length for int i 0 i prompt length i new Label parent SWT NONE set Text prompt i texts i new Text parent SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint convert HorizontalDL Us To Pixels I Dialog Constants ENTRY FIELD WIDTH texts i set Layout Data data if echo i texts i set Echo Char new Label parent SWT NONE  createPasswordFields setText GridData GridData GridData FILL_HORIZONTAL widthHint convertHorizontalDLUsToPixels IDialogConstants ENTRY_FIELD_WIDTH setLayoutData setEchoChar
Returns the entered values or null if the user canceled return the entered values public String get Result return result  getResult
Notifies that the ok button of this dialog has been pressed p The default implementation of this framework method sets this dialog s return code to code Window OK code and closes the dialog Subclasses may override p protected void ok Pressed result new String prompt length for int i 0 i texts length i result i texts i get Text super ok Pressed  okPressed getText okPressed
Notifies that the cancel button of this dialog has been pressed p The default implementation of this framework method sets this dialog s return code to code Window CANCEL code and closes the dialog Subclasses may override p protected void cancel Pressed result null super cancel Pressed  cancelPressed cancelPressed

Constructor for List Selection Area param parent Dialog param settings public List Selection Area Dialog parent Dialog Object input I Structured Content Provider content Provider I Label Provider label Provider String message super parent Dialog null this input Element input this content Provider content Provider this label Provider label Provider this message message this initial Selections new Array List  ListSelectionArea parentDialog ListSelectionArea parentDialog IStructuredContentProvider contentProvider ILabelProvider labelProvider parentDialog inputElement contentProvider contentProvider labelProvider labelProvider initialSelections ArrayList
list Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Object checked Elements get Viewer get Checked Elements fire Property Change Change LIST SELECTION previous Checked Elements checked Elements previous Checked Elements checked Elements  listViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent checkedElements getViewer getCheckedElements firePropertyChangeChange LIST_SELECTION previousCheckedElements checkedElements previousCheckedElements checkedElements
see org eclipse team internal ccvs ui Dialog Area create Area org eclipse swt widgets Composite public void create Area Composite parent Dialog apply Dialog Font parent Composite composite create Composite parent 1 initialize Dialog Units composite if message null create Wrapping Label composite message 1 list Viewer Checkbox Table Viewer new Check List composite SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data height Hint SIZING SELECTION WIDGET HEIGHT data width Hint SIZING SELECTION WIDGET WIDTH list Viewer get Table set Layout Data data list Viewer set Label Provider label Provider list Viewer set Content Provider content Provider list Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Object checked Elements get Viewer get Checked Elements fire Property Change Change LIST SELECTION previous Checked Elements checked Elements previous Checked Elements checked Elements add Selection Buttons composite initialize Viewer initialize page if get Initial Element Selections is Empty check Initial Selections  DialogArea createArea createArea applyDialogFont createComposite initializeDialogUnits createWrappingLabel listViewer CheckboxTableViewer newCheckList GridData GridData GridData FILL_BOTH heightHint SIZING_SELECTION_WIDGET_HEIGHT widthHint SIZING_SELECTION_WIDGET_WIDTH listViewer getTable setLayoutData listViewer setLabelProvider labelProvider listViewer setContentProvider contentProvider listViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent checkedElements getViewer getCheckedElements firePropertyChangeChange LIST_SELECTION previousCheckedElements checkedElements previousCheckedElements checkedElements addSelectionButtons initializeViewer getInitialElementSelections isEmpty checkInitialSelections
Initializes this dialog s viewer after it has been laid out private void initialize Viewer list Viewer set Input input Element  initializeViewer listViewer setInput inputElement
Visually checks the previously specified elements in this dialog s list viewer private void check Initial Selections Iterator items To Check get Initial Element Selections iterator while items To Check has Next list Viewer set Checked items To Check next true  checkInitialSelections itemsToCheck getInitialElementSelections itemsToCheck hasNext listViewer setChecked itemsToCheck
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked true  SelectionListener SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked
listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked false  SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked
Add the selection and deselection buttons to the dialog param composite org eclipse swt widgets Composite private void add Selection Buttons Composite composite Composite button Composite new Composite composite SWT RIGHT Grid Layout layout new Grid Layout layout num Columns 2 button Composite set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data GRAB HORIZONTAL data grab Excess Horizontal Space true composite set Data data Button select Button create Button button Composite Policy bind List Selection Area select All Grid Data HORIZONTAL ALIGN FILL NON NLS 1 Selection Listener listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked true select Button add Selection Listener listener Button deselect Button create Button button Composite Policy bind List Selection Area deselect All Grid Data HORIZONTAL ALIGN FILL NON NLS 1 listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked false deselect Button add Selection Listener listener  addSelectionButtons buttonComposite GridLayout GridLayout numColumns buttonComposite setLayout GridData GridData GridData HORIZONTAL_ALIGN_END GridData GRAB_HORIZONTAL grabExcessHorizontalSpace setData selectButton createButton buttonComposite ListSelectionArea selectAll GridData HORIZONTAL_ALIGN_FILL SelectionListener SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked selectButton addSelectionListener deselectButton createButton buttonComposite ListSelectionArea deselectAll GridData HORIZONTAL_ALIGN_FILL SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked deselectButton addSelectionListener
Returns the list of initial element selections return List protected List get Initial Element Selections return initial Selections  getInitialElementSelections initialSelections
Sets the initial selection in this selection dialog to the given elements param selected Elements the array of elements to select public void set Initial Selections Object selected Elements initial Selections new Array List selected Elements length for int i 0 i selected Elements length i initial Selections add selected Elements i  selectedElements setInitialSelections selectedElements initialSelections ArrayList selectedElements selectedElements initialSelections selectedElements
Sets the initial selection in this selection dialog to the given elements param selected Elements the List of elements to select public void set Initial Element Selections List selected Elements initial Selections selected Elements  selectedElements setInitialElementSelections selectedElements initialSelections selectedElements
Returns the list Viewer return Checkbox Table Viewer public Checkbox Table Viewer get Viewer return list Viewer  listViewer CheckboxTableViewer CheckboxTableViewer getViewer listViewer

public void add Pages when merging multiple resources use the tags found on the first selected resource This makes sense because you would typically merge resources that have a common context and are versioned and branched together I Project project For Tag Retrieval resources 0 get Project set Window Title Policy bind Merge Wizard title NON NLS 1 Image Descriptor merge Image CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG WIZBAN MERGE start Page new Merge Wizard Start Page start Page Policy bind Merge Wizard start merge Image NON NLS 1 NON NLS 2 start Page set Project project For Tag Retrieval add Page start Page end Page new Merge Wizard End Page end Page Policy bind Merge Wizard end merge Image start Page NON NLS 1 NON NLS 2 end Page set Project project For Tag Retrieval add Page end Page  addPages IProject projectForTagRetrieval getProject setWindowTitle MergeWizard ImageDescriptor mergeImage CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_WIZBAN_MERGE startPage MergeWizardStartPage startPage MergeWizard mergeImage startPage setProject projectForTagRetrieval addPage startPage endPage MergeWizardEndPage endPage MergeWizard mergeImage startPage endPage setProject projectForTagRetrieval addPage endPage
public boolean perform Finish CVS Tag start Tag start Page get Tag CVS Tag end Tag end Page get Tag First check if there is an existing matching participant if so then re use it Merge Synchronize Participant participant Merge Synchronize Participant get Matching Participant resources start Tag end Tag if participant null CVS Merge Subscriber s new CVS Merge Subscriber resources start Tag end Tag participant new Merge Synchronize Participant s TeamUI get Synchronize Manager add Synchronize Participants new I Synchronize Participant participant participant refresh resources Policy bind Participant merging Policy bind Participant merging Detail participant get Name null NON NLS 1 NON NLS 2 return true  performFinish CVSTag startTag startPage getTag CVSTag endTag endPage getTag MergeSynchronizeParticipant MergeSynchronizeParticipant getMatchingParticipant startTag endTag CVSMergeSubscriber CVSMergeSubscriber startTag endTag MergeSynchronizeParticipant getSynchronizeManager addSynchronizeParticipants ISynchronizeParticipant mergingDetail getName
Set the resources that should be merged public void set Resources I Resource resources this resources resources  setResources IResource

Merge Wizard End Page constructor param page Name the name of the page param title the title of the page param title Image the image for the page public Merge Wizard End Page String page Name String title Image Descriptor title Image Merge Wizard Start Page start Page super page Name title title Image set Description Policy bind Merge Wizard End Page description NON NLS 1 this start Page start Page  MergeWizardEndPage pageName titleImage MergeWizardEndPage pageName ImageDescriptor titleImage MergeWizardStartPage startPage pageName titleImage setDescription MergeWizardEndPage startPage startPage
tree set Sorter new Viewer Sorter public int compare Viewer v Object o1 Object o2 int result super compare v o1 o2 if o1 instanceof Tag Element o2 instanceof Tag Element return result return result  setSorter ViewerSorter TagElement TagElement
tree add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Object selected I Structured Selection tree get Selection get First Element if selected instanceof Tag Element result Tag Element selected get Tag if result equals start Page get Tag set Page Complete true set Message null else set Message Policy bind Merge Wizard End Page duplicate Tag Selected result get Name WARNING NON NLS 1 set Page Complete false else set Message null result null set Page Complete false  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection getSelection getFirstElement TagElement TagElement getTag startPage getTag setPageComplete setMessage setMessage MergeWizardEndPage duplicateTagSelected getName setPageComplete setMessage setPageComplete
public void create Control Composite parent Composite composite create Composite parent 2 set F1 help Workbench Help set Help composite I Help Context Ids MERGE END PAGE tree create Tree composite tree set Content Provider new Workbench Content Provider tree set Label Provider new Workbench Label Provider tree set Sorter new Viewer Sorter public int compare Viewer v Object o1 Object o2 int result super compare v o1 o2 if o1 instanceof Tag Element o2 instanceof Tag Element return result return result tree add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Object selected I Structured Selection tree get Selection get First Element if selected instanceof Tag Element result Tag Element selected get Tag if result equals start Page get Tag set Page Complete true set Message null else set Message Policy bind Merge Wizard End Page duplicate Tag Selected result get Name WARNING NON NLS 1 set Page Complete false else set Message null result null set Page Complete false set Control composite tree set Input new Project Element CVS Workspace Root getCVS Folder For project Project Element INCLUDE ALL TAGS set Page Complete false  createControl createComposite WorkbenchHelp setHelp IHelpContextIds MERGE_END_PAGE createTree setContentProvider WorkbenchContentProvider setLabelProvider WorkbenchLabelProvider setSorter ViewerSorter TagElement TagElement addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection getSelection getFirstElement TagElement TagElement getTag startPage getTag setPageComplete setMessage setMessage MergeWizardEndPage duplicateTagSelected getName setPageComplete setMessage setPageComplete setControl setInput ProjectElement CVSWorkspaceRoot getCVSFolderFor ProjectElement INCLUDE_ALL_TAGS setPageComplete
protected Tree Viewer create Tree Composite parent Tree tree new Tree parent SWT H SCROLL SWT V SCROLL SWT BORDER SWT SINGLE tree set Layout Data new Grid Data Grid Data FILL BOTH return new Tree Viewer tree  TreeViewer createTree H_SCROLL V_SCROLL setLayoutData GridData GridData FILL_BOTH TreeViewer
public void set Project I Project project this project project try this remote ICVS Remote Folder CVS Workspace Root get Remote Resource For project catch Team Exception e To do  setProject IProject ICVSRemoteFolder CVSWorkspaceRoot getRemoteResourceFor TeamException
public CVS Tag get Tag return result  CVSTag getTag
see I Dialog Page set Visible boolean public void set Visible boolean visible super set Visible visible refresh the tree because tags may have been added in the previous page tree refresh if visible tree get Control set Focus  IDialogPage setVisible setVisible setVisible getControl setFocus

Merge Wizard Start Page constructor param page Name the name of the page param title the title of the page param title Image the image for the page public Merge Wizard Start Page String page Name String title Image Descriptor title Image super page Name title title Image set Description Policy bind Merge Wizard Start Page description NON NLS 1  MergeWizardStartPage pageName titleImage MergeWizardStartPage pageName ImageDescriptor titleImage pageName titleImage setDescription MergeWizardStartPage
protected Table Viewer create Table Composite parent Table table new Table parent SWT H SCROLL SWT V SCROLL SWT BORDER SWT SINGLE SWT FULL SELECTION Grid Data data new Grid Data Grid Data FILL BOTH data height Hint TABLE HEIGHT HINT data width Hint TABLE WIDTH HINT table set Layout Data data Table Layout layout new Table Layout layout add Column Data new Column Weight Data 100 true table set Layout layout Table Column col new Table Column table SWT NONE col set Resizable true return new Table Viewer table  TableViewer createTable H_SCROLL V_SCROLL FULL_SELECTION GridData GridData GridData FILL_BOTH heightHint TABLE_HEIGHT_HINT widthHint TABLE_WIDTH_HINT setLayoutData TableLayout TableLayout addColumnData ColumnWeightData setLayout TableColumn TableColumn setResizable TableViewer
table set Sorter new Viewer Sorter public int compare Viewer v Object o1 Object o2 int result super compare v o1 o2 if o1 instanceof Tag Element o2 instanceof Tag Element return result return result  setSorter ViewerSorter TagElement TagElement
table add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection table get Selection if selection is Empty Tag Element element Tag Element I Structured Selection table get Selection get First Element if element null result element get Tag set Page Complete true  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection isEmpty TagElement TagElement IStructuredSelection getSelection getFirstElement getTag setPageComplete
table add Double Click Listener new I Double Click Listener public void double Click Double Click Event event get Container show Page get Next Page  addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getContainer showPage getNextPage
public void run get Shell get Display sync Exec new Runnable public void run table refresh set Page Complete table get Selection is Empty  getShell getDisplay syncExec setPageComplete getSelection isEmpty
Runnable after Refresh new Runnable public void run get Shell get Display sync Exec new Runnable public void run table refresh set Page Complete table get Selection is Empty  afterRefresh getShell getDisplay syncExec setPageComplete getSelection isEmpty
public void run get Shell get Display sync Exec new Runnable public void run initialize  getShell getDisplay syncExec
Runnable after Configure new Runnable public void run get Shell get Display sync Exec new Runnable public void run initialize  afterConfigure getShell getDisplay syncExec
public void create Control Composite parent Composite composite create Composite parent 1 set F1 help Workbench Help set Help composite I Help Context Ids MERGE START PAGE table create Table composite table set Content Provider new Workbench Content Provider table set Label Provider new Workbench Label Provider table set Sorter new Viewer Sorter public int compare Viewer v Object o1 Object o2 int result super compare v o1 o2 if o1 instanceof Tag Element o2 instanceof Tag Element return result return result table add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection table get Selection if selection is Empty Tag Element element Tag Element I Structured Selection table get Selection get First Element if element null result element get Tag set Page Complete true table add Double Click Listener new I Double Click Listener public void double Click Double Click Event event get Container show Page get Next Page Runnable after Refresh new Runnable public void run get Shell get Display sync Exec new Runnable public void run table refresh set Page Complete table get Selection is Empty Runnable after Configure new Runnable public void run get Shell get Display sync Exec new Runnable public void run initialize set Control composite Tag Configuration Dialog create Tag Definition Buttons get Shell composite new ICVS Folder CVS Workspace Root getCVS Folder For project convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH after Refresh after Configure initialize set Page Complete false  createControl createComposite WorkbenchHelp setHelp IHelpContextIds MERGE_START_PAGE createTable setContentProvider WorkbenchContentProvider setLabelProvider WorkbenchLabelProvider setSorter ViewerSorter TagElement TagElement addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection isEmpty TagElement TagElement IStructuredSelection getSelection getFirstElement getTag setPageComplete addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getContainer showPage getNextPage afterRefresh getShell getDisplay syncExec setPageComplete getSelection isEmpty afterConfigure getShell getDisplay syncExec setControl TagConfigurationDialog createTagDefinitionButtons getShell ICVSFolder CVSWorkspaceRoot getCVSFolderFor convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH afterRefresh afterConfigure setPageComplete
set Page Complete false private void initialize ICVS Folder cvs Project CVS Workspace Root getCVS Folder For project table set Input new Tag Root Element cvs Project CVS Tag VERSION  setPageComplete ICVSFolder cvsProject CVSWorkspaceRoot getCVSFolderFor setInput TagRootElement cvsProject CVSTag
table set Input new Tag Root Element cvs Project CVS Tag VERSION public void set Project I Project project this project project  setInput TagRootElement cvsProject CVSTag setProject IProject
this project project public CVS Tag get Tag return result  CVSTag getTag
public void set Visible boolean visible super set Visible visible if visible table get Control set Focus  setVisible setVisible getControl setFocus

public int category Object element if element instanceof Tag Element CVS Tag tag Tag Element element get Tag if tag CVS Tag DEFAULT return 1 if tag CVS Tag BASE return 5 if tag get Type CVS Tag BRANCH return 2 if tag get Type CVS Tag VERSION return 3 if tag get Type CVS Tag DATE return 4 else if element instanceof Tag Root Element if Tag Root Element element get Type Of Tag Root CVS Tag BRANCH return 2 if Tag Root Element element get Type Of Tag Root CVS Tag VERSION return 3 if Tag Root Element element get Type Of Tag Root CVS Tag DATE return 4 return 0  TagElement CVSTag TagElement getTag CVSTag CVSTag getType CVSTag getType CVSTag getType CVSTag TagRootElement TagRootElement getTypeOfTagRoot CVSTag TagRootElement getTypeOfTagRoot CVSTag TagRootElement getTypeOfTagRoot CVSTag
public int compare Viewer viewer Object e1 Object e2 int cat1 category e1 int cat2 category e2 if cat1 cat2 return cat1 cat2 Sort version tags in reverse order if e1 instanceof Tag Element CVS Tag tag1 Tag Element e1 get Tag int type tag1 get Type if type CVS Tag VERSION return 1 super compare viewer e1 e2 else if type CVS Tag DATE return 1 tag1 compare To Tag Element e2 get Tag return super compare viewer e1 e2  TagElement CVSTag TagElement getTag getType CVSTag CVSTag compareTo TagElement getTag
public Project Element ICVS Folder project int include Flags this project project this include Flags include Flags if this include Flags 0 this include Flags INCLUDE ALL TAGS if include Flags INCLUDE BRANCHES 0 branches new Tag Root Element project CVS Tag BRANCH if include Flags INCLUDE VERSIONS 0 versions new Tag Root Element project CVS Tag VERSION if include Flags INCLUDE DATES 0 dates new Tag Root Element project CVS Tag DATE  ProjectElement ICVSFolder includeFlags includeFlags includeFlags includeFlags includeFlags INCLUDE_ALL_TAGS includeFlags INCLUDE_BRANCHES TagRootElement CVSTag includeFlags INCLUDE_VERSIONS TagRootElement CVSTag includeFlags INCLUDE_DATES TagRootElement CVSTag
public Object get Children Object o Array List children new Array List 4 if include Flags INCLUDE HEAD TAG 0 children add new Tag Element CVS Tag DEFAULT if include Flags INCLUDE BASE TAG 0 children add new Tag Element CVS Tag BASE if include Flags INCLUDE BRANCHES 0 children add branches if include Flags INCLUDE VERSIONS 0 children add versions if include Flags INCLUDE DATES 0 children add dates return children to Array new Object children size  getChildren ArrayList ArrayList includeFlags INCLUDE_HEAD_TAG TagElement CVSTag includeFlags INCLUDE_BASE_TAG TagElement CVSTag includeFlags INCLUDE_BRANCHES includeFlags INCLUDE_VERSIONS includeFlags INCLUDE_DATES toArray
return children to Array new Object children size public int get Include Flags return include Flags  toArray getIncludeFlags includeFlags
return include Flags public Tag Root Element get Branches return branches  includeFlags TagRootElement getBranches
return branches public Tag Root Element get Versions return versions  TagRootElement getVersions
return versions public Tag Root Element get Dates return dates  TagRootElement getDates
return dates public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter
return null public Image Descriptor get Image Descriptor Object object return null  ImageDescriptor getImageDescriptor
return null public String get Label Object o return null  getLabel
return null public Object get Parent Object o return null  getParent

public class Tag Element implements I Workbench Adapter I Adaptable CVS Tag tag public Tag Element CVS Tag tag this tag tag  TagElement IWorkbenchAdapter IAdaptable CVSTag TagElement CVSTag
this tag tag public Object get Children Object o return new Object 0  getChildren
return new Object 0 public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter
public Image Descriptor get Image Descriptor Object object if tag get Type CVS Tag BRANCH tag CVS Tag DEFAULT return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG TAG else if tag get Type CVS Tag DATE return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG DATE else return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG PROJECT VERSION  ImageDescriptor getImageDescriptor getType CVSTag CVSTag CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_TAG getType CVSTag CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_DATE CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_PROJECT_VERSION
public String get Label Object o if tag get Type CVS Tag DATE Date date tag as Date if date null return CVS Tag Element to Display String date return tag get Name  getLabel getType CVSTag asDate CVSTagElement toDisplayString getName
return tag get Name public Object get Parent Object o return null  getName getParent
return null public CVS Tag get Tag return tag  CVSTag getTag
see java lang Object hash Code public int hash Code return tag hash Code  hashCode hashCode hashCode
public boolean equals Object obj if obj instanceof Tag Element return tag equals Tag Element obj get Tag return super equals obj  TagElement TagElement getTag

private int type Of Tag Root public Tag Root Element ICVS Folder project int type Of Tag Root this type Of Tag Root type Of Tag Root this project project  typeOfTagRoot TagRootElement ICVSFolder typeOfTagRoot typeOfTagRoot typeOfTagRoot
public Tag Root Element ICVS Folder project int type Of Tag Root CVS Tag tags this project type Of Tag Root add tags  TagRootElement ICVSFolder typeOfTagRoot CVSTag typeOfTagRoot
public Object get Children Object o CVS Tag child Tags new CVS Tag 0 if cached Tags null if type Of Tag Root CVS Tag BRANCH child Tags CVSUI Plugin get Plugin get Repository Manager get Known Tags project CVS Tag BRANCH else if type Of Tag Root CVS Tag VERSION child Tags CVSUI Plugin get Plugin get Repository Manager get Known Tags project CVS Tag VERSION else if type Of Tag Root CVS Tag DATE child Tags CVSUI Plugin get Plugin get Repository Manager get Known Tags project CVS Tag DATE else child Tags get Tags Tag Element result new Tag Element child Tags length for int i 0 i child Tags length i result i new Tag Element child Tags i return result  getChildren CVSTag childTags CVSTag cachedTags typeOfTagRoot CVSTag childTags CVSUIPlugin getPlugin getRepositoryManager getKnownTags CVSTag typeOfTagRoot CVSTag childTags CVSUIPlugin getPlugin getRepositoryManager getKnownTags CVSTag typeOfTagRoot CVSTag childTags CVSUIPlugin getPlugin getRepositoryManager getKnownTags CVSTag childTags getTags TagElement TagElement childTags childTags TagElement childTags
public void remove All if cached Tags null cached Tags clear  removeAll cachedTags cachedTags
public void add CVS Tag tag if cached Tags null cached Tags new Array List cached Tags add tag  CVSTag cachedTags cachedTags ArrayList cachedTags
public void add CVS Tag tags if cached Tags null cached Tags new Array List tags length cached Tags add All Arrays as List tags  CVSTag cachedTags cachedTags ArrayList cachedTags addAll asList
public void remove CVS Tag tag if cached Tags null cached Tags remove tag  CVSTag cachedTags cachedTags
public CVS Tag get Tags if cached Tags null return CVS Tag cached Tags to Array new CVS Tag cached Tags size else return new CVS Tag 0  CVSTag getTags cachedTags CVSTag cachedTags toArray CVSTag cachedTags CVSTag
public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter
public Image Descriptor get Image Descriptor Object object if type Of Tag Root CVS Tag BRANCH return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG BRANCHES CATEGORY else if type Of Tag Root CVS Tag DATE return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG DATES CATEGORY else return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG VERSIONS CATEGORY  ImageDescriptor getImageDescriptor typeOfTagRoot CVSTag CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_BRANCHES_CATEGORY typeOfTagRoot CVSTag CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_DATES_CATEGORY CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_VERSIONS_CATEGORY
public String get Label Object o if type Of Tag Root CVS Tag BRANCH return Policy bind Merge Wizard End Page branches NON NLS 1 else if type Of Tag Root CVS Tag DATE return Policy bind Tag Root Element 0 NON NLS 1 else return Policy bind Versions Element versions NON NLS 1  getLabel typeOfTagRoot CVSTag MergeWizardEndPage typeOfTagRoot CVSTag TagRootElement VersionsElement
public Object get Parent Object o return null  getParent
Gets the type Of Tag Root return Returns a int public int get Type Of Tag Root return type Of Tag Root  typeOfTagRoot getTypeOfTagRoot typeOfTagRoot

public class All Roots Element extends CVS Model Element implements I Adaptable public Image Descriptor get Image Descriptor Object object return null  AllRootsElement CVSModelElement IAdaptable ImageDescriptor getImageDescriptor
return null public Object fetch Children Object o I Progress Monitor monitor return CVSUI Plugin get Plugin get Repository Manager get Known Repository Roots  fetchChildren IProgressMonitor CVSUIPlugin getPlugin getRepositoryManager getKnownRepositoryRoots
return CVSUI Plugin get Plugin get Repository Manager get Known Repository Roots public String get Label Object o return null  CVSUIPlugin getPlugin getRepositoryManager getKnownRepositoryRoots getLabel
return null public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter
return null public Object get Parent Object o return null  getParent

public class Branch Category extends Tag Category public Branch Category ICVS Repository Location repository super repository  BranchCategory TagCategory BranchCategory ICVSRepositoryLocation
protected CVS Tag get Tags I Progress Monitor monitor throws CVS Exception return CVSUI Plugin get Plugin get Repository Manager get Known Tags repository get Working Set CVS Tag BRANCH monitor  CVSTag getTags IProgressMonitor CVSException CVSUIPlugin getPlugin getRepositoryManager getKnownTags getWorkingSet CVSTag
Returns an image descriptor to be used for displaying an object in the workbench Returns null if there is no appropriate image param object The object to get an image descriptor for public Image Descriptor get Image Descriptor Object object return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG BRANCHES CATEGORY  ImageDescriptor getImageDescriptor CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_BRANCHES_CATEGORY
Returns the name of this element This will typically be used to assign a label to this object when displayed in the UI Returns an empty string if there is no appropriate name for this object param object The object to get a label for public String get Label Object o return Policy bind Branch Category Branches 1 NON NLS 1  getLabel BranchCategory Branches_1

Non javadoc Method declared on I Adapter Factory public Object get Adapter Object adaptable Object Class adapter Type if I Workbench Adapter class adapter Type return get Workbench Adapter adaptable Object if I Deferred Workbench Adapter class adapter Type Object o get Workbench Adapter adaptable Object if o null o instanceof I Deferred Workbench Adapter return o return null if I Property Source class adapter Type return get Property Source adaptable Object return null  IAdapterFactory getAdapter adaptableObject adapterType IWorkbenchAdapter adapterType getWorkbenchAdapter adaptableObject IDeferredWorkbenchAdapter adapterType getWorkbenchAdapter adaptableObject IDeferredWorkbenchAdapter IPropertySource adapterType getPropertySource adaptableObject
protected Object get Workbench Adapter Object o if o instanceof ICVS Remote File return file Adapter else if o instanceof ICVS Repository Location return root Adapter else if o instanceof Repository Root return root Adapter else if o instanceof ICVS Remote Folder return folder Adapter return null  getWorkbenchAdapter ICVSRemoteFile fileAdapter ICVSRepositoryLocation rootAdapter RepositoryRoot rootAdapter ICVSRemoteFolder folderAdapter
Non javadoc Method declared on I Adapter Factory public Class get Adapter List return new Class I Workbench Adapter class I Property Source class I Deferred Workbench Adapter class  IAdapterFactory getAdapterList IWorkbenchAdapter IPropertySource IDeferredWorkbenchAdapter
Returns the property source for the given object Caches the result because the property sheet is extremely inefficient it asks for the source seven times in a row public Object get Property Source Object adaptable Object if adaptable Object cached Property Object return cached Property Value cached Property Object adaptable Object if adaptable Object instanceof ICVS Remote File cached Property Value new CVS Remote File Property Source ICVS Remote File adaptable Object else if adaptable Object instanceof ICVS Remote Folder cached Property Value new CVS Remote Folder Property Source ICVS Remote Folder adaptable Object else if adaptable Object instanceof ICVS Repository Location cached Property Value new CVS Repository Location Property Source ICVS Repository Location adaptable Object else if adaptable Object instanceof Repository Root cached Property Value new CVS Repository Location Property Source Repository Root adaptable Object get Root else cached Property Value null return cached Property Value  getPropertySource adaptableObject adaptableObject cachedPropertyObject cachedPropertyValue cachedPropertyObject adaptableObject adaptableObject ICVSRemoteFile cachedPropertyValue CVSRemoteFilePropertySource ICVSRemoteFile adaptableObject adaptableObject ICVSRemoteFolder cachedPropertyValue CVSRemoteFolderPropertySource ICVSRemoteFolder adaptableObject adaptableObject ICVSRepositoryLocation cachedPropertyValue CVSRepositoryLocationPropertySource ICVSRepositoryLocation adaptableObject adaptableObject RepositoryRoot cachedPropertyValue CVSRepositoryLocationPropertySource RepositoryRoot adaptableObject getRoot cachedPropertyValue cachedPropertyValue

private ICVS File file public CVS File Element ICVS File file this file file  ICVSFile CVSFileElement ICVSFile
Initial implementation return null public Object fetch Children Object o I Progress Monitor monitor return new Object 0  fetchChildren IProgressMonitor
Initial implementation return null public Image Descriptor get Image Descriptor Object object return PlatformUI get Workbench get Editor Registry get Image Descriptor file get Name  ImageDescriptor getImageDescriptor getWorkbench getEditorRegistry getImageDescriptor getName
Initial implementation return the file s name and version public String get Label Object o try Resource Sync Info info file get Sync Info if info null return file get Name info get Revision NON NLS 1 else return file get Name catch Team Exception e handle e return null  getLabel ResourceSyncInfo getSyncInfo getName getRevision getName TeamException
see I Workbench Adapter get Parent Object public Object get Parent Object o return null  IWorkbenchAdapter getParent getParent
public ICVS File getCVS File return file  ICVSFile getCVSFile
see CVS Resource Element getCVS Resource public ICVS Resource getCVS Resource return file  CVSResourceElement getCVSResource ICVSResource getCVSResource

private boolean include Unmanaged public CVS Folder Element ICVS Folder folder boolean include Unmanaged this folder folder this include Unmanaged include Unmanaged  includeUnmanaged CVSFolderElement ICVSFolder includeUnmanaged includeUnmanaged includeUnmanaged
Returns CVS Resource Element instances public Object fetch Children Object o I Progress Monitor monitor throws Team Exception ICVS Resource children folder fetch Children monitor CVS Resource Element elements new CVS Resource Element children length for int i 0 i children length i ICVS Resource resource children i if resource is Folder elements i new CVS Folder Element ICVS Folder resource include Unmanaged else elements i new CVS File Element ICVS File resource return elements  CVSResourceElement fetchChildren IProgressMonitor TeamException ICVSResource fetchChildren CVSResourceElement CVSResourceElement ICVSResource isFolder CVSFolderElement ICVSFolder includeUnmanaged CVSFileElement ICVSFile
see org eclipse team internal ccvs ui model CVS Model Element is Remote Element public boolean is Remote Element return true  CVSModelElement isRemoteElement isRemoteElement
Overridden to append the version name to remote folders which have version tags and are top level folders public String get Label Object o return folder get Name  getLabel getName
public Image Descriptor get Image Descriptor Object object return PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG OBJ FOLDER  ImageDescriptor getImageDescriptor getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_OBJ_FOLDER
see I Workbench Adapter get Parent Object public Object get Parent Object o return new CVS Folder Element folder get Parent include Unmanaged  IWorkbenchAdapter getParent getParent CVSFolderElement getParent includeUnmanaged
see CVS Resource Element getCVS Resource public ICVS Resource getCVS Resource return folder  CVSResourceElement getCVSResource ICVSResource getCVSResource

private I Working Set working Set public I Working Set get Working Set return working Set  IWorkingSet workingSet IWorkingSet getWorkingSet workingSet
public void set Working Set I Working Set working Set this working Set working Set  setWorkingSet IWorkingSet workingSet workingSet workingSet
public Object get Adapter Class adapter if adapter I Workbench Adapter class return this if adapter I Deferred Workbench Adapter class this instanceof I Deferred Workbench Adapter return this return null  getAdapter IWorkbenchAdapter IDeferredWorkbenchAdapter IDeferredWorkbenchAdapter
Returns the runnable Context return I Team Runnable Context public I Runnable Context get Runnable Context if runnable Context null return PlatformUI get Workbench get Progress Service return runnable Context  runnableContext ITeamRunnableContext IRunnableContext getRunnableContext runnableContext getWorkbench getProgressService runnableContext
Sets the runnable Context param runnable Context The runnable Context to set public void set Runnable Context I Runnable Context runnable Context this runnable Context runnable Context  runnableContext runnableContext runnableContext setRunnableContext IRunnableContext runnableContext runnableContext runnableContext
public Object get Children Object o return get Children o true  getChildren getChildren
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try result 0 CVS Model Element this fetch Children o monitor catch Team Exception e throw new Invocation Target Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException CVSModelElement fetchChildren TeamException InvocationTargetException
Gets the children of the receiver by invoking the code internal Get Children code A appropriate progress indicator will be used if requested protected Object get Children final Object o boolean needs Progress try if needs Progress final Object result new Object 1 I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try result 0 CVS Model Element this fetch Children o monitor catch Team Exception e throw new Invocation Target Exception e get Runnable Context run true fork true cancelable runnable return result 0 else return fetch Children o null catch Interrupted Exception e catch Invocation Target Exception e handle e catch Team Exception e handle e return new Object 0  internalGetChildren getChildren needsProgress needsProgress IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException CVSModelElement fetchChildren TeamException InvocationTargetException getRunnableContext fetchChildren InterruptedException InvocationTargetException TeamException
abstract protected Object fetch Children Object o I Progress Monitor monitor throws Team Exception  fetchChildren IProgressMonitor TeamException
Handles exceptions that occur in CVS model elements protected void handle Throwable t CVSUI Plugin open Error null null null t CVSUI Plugin LOG NONTEAM EXCEPTIONS  CVSUIPlugin openError CVSUIPlugin LOG_NONTEAM_EXCEPTIONS

Create a Property Source and store its file public CVS Remote File Property Source ICVS Remote File file this file file  PropertySource CVSRemoteFilePropertySource ICVSRemoteFile
Do nothing because properties are read only public Object get Editable Value return this  getEditableValue
Return the Property Descriptors for the receiver public I Property Descriptor get Property Descriptors return property Descriptors  IPropertyDescriptor getPropertyDescriptors propertyDescriptors
public Object get Property Value Object id if initialized initialize initialized true if id equals ICVSUI Constants PROP NAME return file get Name if entry null if id equals ICVSUI Constants PROP REVISION return entry get Revision if id equals ICVSUI Constants PROP DATE return entry get Date if id equals ICVSUI Constants PROP AUTHOR return entry get Author if id equals ICVSUI Constants PROP COMMENT return entry get Comment return NON NLS 1  getPropertyValue ICVSUIConstants PROP_NAME getName ICVSUIConstants PROP_REVISION getRevision ICVSUIConstants PROP_DATE getDate ICVSUIConstants PROP_AUTHOR getAuthor ICVSUIConstants PROP_COMMENT getComment
Answer true if the value of the specified property for this object has been changed from the default public boolean is Property Set Object property return false  isPropertySet
Reset the specified property s value to its default value Do nothing because properties are read only param property The property to reset public void reset Property Value Object property  resetPropertyValue
Do nothing because properties are read only public void set Property Value Object name Object value  setPropertyValue
CVSUI Plugin run With Progress null true cancelable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I Log Entry entries file get Log Entries monitor String revision file get Revision for int i 0 i entries length i if entries i get Revision equals revision entry entries i return catch Team Exception e throw new Invocation Target Exception e  CVSUIPlugin runWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException ILogEntry getLogEntries getRevision getRevision TeamException InvocationTargetException
private void initialize try CVSUI Plugin run With Progress null true cancelable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I Log Entry entries file get Log Entries monitor String revision file get Revision for int i 0 i entries length i if entries i get Revision equals revision entry entries i return catch Team Exception e throw new Invocation Target Exception e catch Interrupted Exception e ignore cancellation catch Invocation Target Exception e CVSUI Plugin open Error null null null e  CVSUIPlugin runWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException ILogEntry getLogEntries getRevision getRevision TeamException InvocationTargetException InterruptedException InvocationTargetException CVSUIPlugin openError

Create a Property Source and store its file public CVS Remote Folder Property Source ICVS Remote Folder folder this folder folder  PropertySource CVSRemoteFolderPropertySource ICVSRemoteFolder
Do nothing because properties are read only public Object get Editable Value return this  getEditableValue
Return the Property Descriptors for the receiver public I Property Descriptor get Property Descriptors return property Descriptors  IPropertyDescriptor getPropertyDescriptors propertyDescriptors
public Object get Property Value Object id if id equals ICVSUI Constants PROP NAME return folder get Name if id equals ICVSUI Constants PROP TAG CVS Tag tag folder get Tag if tag null return Policy bind CVS Remote Folder Property Source none NON NLS 1 return tag get Name return NON NLS 1  getPropertyValue ICVSUIConstants PROP_NAME getName ICVSUIConstants PROP_TAG CVSTag getTag CVSRemoteFolderPropertySource getName
Answer true if the value of the specified property for this object has been changed from the default public boolean is Property Set Object property return false  isPropertySet
Reset the specified property s value to its default value Do nothing because properties are read only param property The property to reset public void reset Property Value Object property  resetPropertyValue
Do nothing because properties are read only public void set Property Value Object name Object value  setPropertyValue

Create a Property Source and store its file public CVS Repository Location Property Source ICVS Repository Location location this location location  PropertySource CVSRepositoryLocationPropertySource ICVSRepositoryLocation
Do nothing because properties are read only public Object get Editable Value return this  getEditableValue
Return the Property Descriptors for the receiver public I Property Descriptor get Property Descriptors return property Descriptors  IPropertyDescriptor getPropertyDescriptors propertyDescriptors
public Object get Property Value Object id if id equals ICVSUI Constants PROP HOST return location get Host if id equals ICVSUI Constants PROP USER return location get Username if id equals ICVSUI Constants PROP METHOD return location get Method get Name if id equals ICVSUI Constants PROP ROOT return location get Root Directory if id equals ICVSUI Constants PROP PORT int port location get Port if port ICVS Repository Location USE DEFAULT PORT return Policy bind CVS Repository Location Property Source default NON NLS 1 return port NON NLS 1 return NON NLS 1  getPropertyValue ICVSUIConstants PROP_HOST getHost ICVSUIConstants PROP_USER getUsername ICVSUIConstants PROP_METHOD getMethod getName ICVSUIConstants PROP_ROOT getRootDirectory ICVSUIConstants PROP_PORT getPort ICVSRepositoryLocation USE_DEFAULT_PORT CVSRepositoryLocationPropertySource
Answer true if the value of the specified property for this object has been changed from the default public boolean is Property Set Object property return false  isPropertySet
Reset the specified property s value to its default value Do nothing because properties are read only param property The property to reset public void reset Property Value Object property  resetPropertyValue
Do nothing because properties are read only public void set Property Value Object name Object value  setPropertyValue

public class CVS Repository Root Element extends CVS Model Element public Image Descriptor get Image Descriptor Object object if object instanceof ICVS Repository Location object instanceof Repository Root return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG REPOSITORY return null  CVSRepositoryRootElement CVSModelElement ImageDescriptor getImageDescriptor ICVSRepositoryLocation RepositoryRoot CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_REPOSITORY
public String get Label Object o if o instanceof ICVS Repository Location ICVS Repository Location root ICVS Repository Location o o CVSUI Plugin get Plugin get Repository Manager get Repository Root For root if o null return root get Location if o instanceof Repository Root Repository Root root Repository Root o String name root get Name if name null return root get Root get Location else return name return null  getLabel ICVSRepositoryLocation ICVSRepositoryLocation ICVSRepositoryLocation CVSUIPlugin getPlugin getRepositoryManager getRepositoryRootFor getLocation RepositoryRoot RepositoryRoot RepositoryRoot getName getRoot getLocation
return null public Object get Parent Object o return null  getParent
public Object fetch Children Object o I Progress Monitor monitor ICVS Repository Location location null if o instanceof ICVS Repository Location location ICVS Repository Location o if o instanceof Repository Root Repository Root root Repository Root o location root get Root if location null return null return new Object new CVS Tag Element CVS Tag DEFAULT location new Branch Category location new Version Category location new Date Tag Category location  fetchChildren IProgressMonitor ICVSRepositoryLocation ICVSRepositoryLocation ICVSRepositoryLocation RepositoryRoot RepositoryRoot RepositoryRoot getRoot CVSTagElement CVSTag BranchCategory VersionCategory DateTagCategory

public abstract class CVS Resource Element extends CVS Model Element implements I Adaptable public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  CVSResourceElement CVSModelElement IAdaptable getAdapter IWorkbenchAdapter
Initial implementation return the resource s name public String get Label Object o if o instanceof ICVS Resource return null return ICVS Resource o get Name  getLabel ICVSResource ICVSResource getName
Return null public Object get Parent Object o if o instanceof ICVS Resource return null return null  getParent ICVSResource
abstract public ICVS Resource getCVS Resource  ICVSResource getCVSResource

ICVS Folder roots public CVS Root Folder Element ICVS Folder roots this roots roots  ICVSFolder CVSRootFolderElement ICVSFolder
see I Workbench Adapter members Object public Object fetch Children Object o I Progress Monitor monitor CVS Folder Element folders new CVS Folder Element roots length for int i 0 i roots length i folders i new CVS Folder Element roots i false return folders  IWorkbenchAdapter fetchChildren IProgressMonitor CVSFolderElement CVSFolderElement CVSFolderElement
see I Workbench Adapter get Image Descriptor Object public Image Descriptor get Image Descriptor Object object return null  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor
see CVS Resource Element getCVS Resource public ICVS Resource getCVS Resource return null  CVSResourceElement getCVSResource ICVSResource getCVSResource
Returns the roots return ICVS Folder public ICVS Folder get Roots return roots  ICVSFolder ICVSFolder getRoots
Sets the roots param roots The roots to set public void set Roots ICVS Folder roots this roots roots  setRoots ICVSFolder

static synchronized public String to Display String Date date String local Time time Column Format format date time Column Format set Time Zone Time Zone get Default if local Time equals 00 00 00 NON NLS 1 return local Short Format format date return local Long Format format date  toDisplayString localTime timeColumnFormat timeColumnFormat setTimeZone TimeZone getDefault localTime localShortFormat localLongFormat
public CVS Tag Element CVS Tag tag ICVS Repository Location root this tag tag this root root  CVSTagElement CVSTag ICVSRepositoryLocation
public ICVS Repository Location get Root return root  ICVSRepositoryLocation getRoot
public CVS Tag get Tag return tag  CVSTag getTag
public boolean equals Object o if o instanceof CVS Tag Element return false CVS Tag Element t CVS Tag Element o if tag equals t tag return false return root equals t root  CVSTagElement CVSTagElement CVSTagElement
public int hash Code return root hash Code tag hash Code  hashCode hashCode hashCode
public Image Descriptor get Image Descriptor Object object if object instanceof CVS Tag Element return null if tag get Type CVS Tag BRANCH tag get Type CVS Tag HEAD return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG TAG else if tag get Type CVS Tag VERSION return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG PROJECT VERSION else This could be a Date tag return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG DATE  ImageDescriptor getImageDescriptor CVSTagElement getType CVSTag getType CVSTag CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_TAG getType CVSTag CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_PROJECT_VERSION CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_DATE
public String get Label Object o if o instanceof CVS Tag Element return null CVS Tag a Tag CVS Tag Element o tag if a Tag get Type CVS Tag DATE Date date tag as Date if date null return to Display String date return a Tag get Name  getLabel CVSTagElement CVSTag aTag CVSTagElement aTag getType CVSTag asDate toDisplayString aTag getName
public String to String return tag get Name  toString getName
public Object get Parent Object o if o instanceof CVS Tag Element return null return CVS Tag Element o root  getParent CVSTagElement CVSTagElement
protected Object fetch Children Object o I Progress Monitor monitor throws Team Exception ICVS Remote Resource children CVSUI Plugin get Plugin get Repository Manager get Folders For Tag root tag monitor if get Working Set null children CVSUI Plugin get Plugin get Repository Manager filter Resources get Working Set children return children  fetchChildren IProgressMonitor TeamException ICVSRemoteResource CVSUIPlugin getPlugin getRepositoryManager getFoldersForTag getWorkingSet CVSUIPlugin getPlugin getRepositoryManager filterResources getWorkingSet
Fetch Members Operation operation new Fetch Members Operation null folder collector operation set Filter new Remote Folder Filter public ICVS Remote Resource filter ICVS Remote Resource folders return CVSUI Plugin get Plugin get Repository Manager filter Resources get Working Set folders  FetchMembersOperation FetchMembersOperation setFilter RemoteFolderFilter ICVSRemoteResource ICVSRemoteResource CVSUIPlugin getPlugin getRepositoryManager filterResources getWorkingSet
Display d CVSUI Plugin get Standard Display d async Exec new Runnable public void run CVSUI Plugin open Error Utils get Shell null Policy bind CVS Tag Element 0 Policy bind CVS Tag Element 1 e NON NLS 1 NON NLS 2  CVSUIPlugin getStandardDisplay asyncExec CVSUIPlugin openError getShell CVSTagElement CVSTagElement
public void fetch Deferred Children Object o I Element Collector collector I Progress Monitor monitor if tag get Type CVS Tag HEAD tag get Type CVS Tag DATE try monitor Policy monitor For monitor Remote Folder folder new Remote Folder null root ICVS Remote Folder REPOSITORY ROOT FOLDER NAME tag monitor begin Task Policy bind Remote Folder Element fetching Remote Children root to String 100 NON NLS 1 Fetch Members Operation operation new Fetch Members Operation null folder collector operation set Filter new Remote Folder Filter public ICVS Remote Resource filter ICVS Remote Resource folders return CVSUI Plugin get Plugin get Repository Manager filter Resources get Working Set folders operation run Policy sub Monitor For monitor 100 catch final Invocation Target Exception e Display d CVSUI Plugin get Standard Display d async Exec new Runnable public void run CVSUI Plugin open Error Utils get Shell null Policy bind CVS Tag Element 0 Policy bind CVS Tag Element 1 e NON NLS 1 NON NLS 2 catch Interrupted Exception e Cancelled by the user finally monitor done else try collector add fetch Children o monitor monitor catch Team Exception e CVSUI Plugin log e  fetchDeferredChildren IElementCollector IProgressMonitor getType CVSTag getType CVSTag monitorFor RemoteFolder RemoteFolder ICVSRemoteFolder REPOSITORY_ROOT_FOLDER_NAME beginTask RemoteFolderElement fetchingRemoteChildren toString FetchMembersOperation FetchMembersOperation setFilter RemoteFolderFilter ICVSRemoteResource ICVSRemoteResource CVSUIPlugin getPlugin getRepositoryManager filterResources getWorkingSet subMonitorFor InvocationTargetException CVSUIPlugin getStandardDisplay asyncExec CVSUIPlugin openError getShell CVSTagElement CVSTagElement InterruptedException fetchChildren TeamException CVSUIPlugin
public I Scheduling Rule get Rule Object element return new Repository Location Scheduling Rule root NON NLS 1  ISchedulingRule getRule RepositoryLocationSchedulingRule
public boolean is Container return true  isContainer

public class Date Tag Category extends Tag Category public Date Tag Category ICVS Repository Location repository super repository  DateTagCategory TagCategory DateTagCategory ICVSRepositoryLocation
see org eclipse team internal ccvs ui model Tag Category get Tags org eclipse core runtime I Progress Monitor protected CVS Tag get Tags I Progress Monitor monitor throws CVS Exception return CVSUI Plugin get Plugin get Repository Manager get Repository Root For repository get Date Tags  TagCategory getTags IProgressMonitor CVSTag getTags IProgressMonitor CVSException CVSUIPlugin getPlugin getRepositoryManager getRepositoryRootFor getDateTags
see org eclipse ui model I Workbench Adapter get Image Descriptor java lang Object public Image Descriptor get Image Descriptor Object object return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG DATES CATEGORY  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_DATES_CATEGORY
see org eclipse ui model I Workbench Adapter get Label java lang Object public String get Label Object o return Policy bind Date Tag Category 0 NON NLS 1  IWorkbenchAdapter getLabel getLabel DateTagCategory
public Object get Adapter Class adapter if adapter equals ICVS Repository Location class return get Repository null return super get Adapter adapter  getAdapter ICVSRepositoryLocation getRepository getAdapter

Project Versions Category constructor public Grouped By Version Category ICVS Repository Location repo super this repository repo  ProjectVersionsCategory GroupedByVersionCategory ICVSRepositoryLocation
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter
Returns the children of this object When this object is displayed in a tree the returned objects will be this element s children Returns an empty enumeration if this object has no children XXX This method looks wrong to me somehow public Object fetch Children Object o I Progress Monitor monitor String C Tags Map mappings CVSUI Plugin get Plugin get Repository Manager get Known Projects And Versions repository Map remote Version Modules new Hash Map for Iterator it mappings key Set iterator it has Next String project String it next CVS Tag versions CVS Tag Hash Set mappings get project to Array new CVS Tag 0 for int i 0 i versions length i CVS Tag tag versions i Remote Version Module module Remote Version Module remote Version Modules get tag if module null module new Remote Version Module tag this remote Version Modules put tag module module add Project new Remote Folder null repository project tag return Remote Version Module remote Version Modules values to Array new Remote Version Module 0  fetchChildren IProgressMonitor CTags CVSUIPlugin getPlugin getRepositoryManager getKnownProjectsAndVersions remoteVersionModules HashMap keySet hasNext CVSTag CVSTag HashSet toArray CVSTag CVSTag RemoteVersionModule RemoteVersionModule remoteVersionModules RemoteVersionModule remoteVersionModules addProject RemoteFolder RemoteVersionModule remoteVersionModules toArray RemoteVersionModule
Returns an image descriptor to be used for displaying an object in the workbench Returns null if there is no appropriate image param object The object to get an image descriptor for public Image Descriptor get Image Descriptor Object object return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG VERSIONS CATEGORY  ImageDescriptor getImageDescriptor CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_VERSIONS_CATEGORY
Returns the name of this element This will typically be used to assign a label to this object when displayed in the UI Returns an empty string if there is no appropriate name for this object param object The object to get a label for public String get Label Object o return Policy bind Grouped By Version Category Versions 1 NON NLS 1  getLabel GroupedByVersionCategory Versions_1
Returns the logical parent of the given object in its tree Returns null if there is no parent or if this object doesn t belong to a tree param object The object to get the parent for public Object get Parent Object o return repository  getParent
Return the repository the given element belongs to public ICVS Repository Location get Repository Object o return repository  ICVSRepositoryLocation getRepository

private ICVS Repository Location repository public Modules Category ICVS Repository Location repository super this repository repository  ICVSRepositoryLocation ModulesCategory ICVSRepositoryLocation
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter
see org eclipse ui model I Workbench Adapter get Children java lang Object public Object fetch Children Object o I Progress Monitor monitor throws Team Exception return repository members CVS Tag DEFAULT true module definitions monitor  IWorkbenchAdapter getChildren fetchChildren IProgressMonitor TeamException CVSTag
see org eclipse ui model I Workbench Adapter get Image Descriptor java lang Object public Image Descriptor get Image Descriptor Object object return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG PROJECT VERSION  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_PROJECT_VERSION
see org eclipse ui model I Workbench Adapter get Label java lang Object public String get Label Object o return Policy bind Modules Category label NON NLS 1  IWorkbenchAdapter getLabel getLabel ModulesCategory
see org eclipse ui model I Workbench Adapter get Parent java lang Object public Object get Parent Object o return repository  IWorkbenchAdapter getParent getParent
see org eclipse team internal ccvs ui model CVS Model Element is Remote Element public boolean is Remote Element return true  CVSModelElement isRemoteElement isRemoteElement
Returns the repository return ICVS Repository Location public ICVS Repository Location get Repository return repository  ICVSRepositoryLocation ICVSRepositoryLocation getRepository
public String to String return get Repository to String modules NON NLS 1  toString getRepository toString

public void input Changed Viewer viewer Object old Input Object new Input if viewer instanceof Abstract Tree Viewer manager new Deferred Tree Content Manager this Abstract Tree Viewer viewer super input Changed viewer old Input new Input  inputChanged oldInput newInput AbstractTreeViewer DeferredTreeContentManager AbstractTreeViewer inputChanged oldInput newInput
public boolean has Children Object element the box will always appear but then disappear if not needed after you first click on it if element instanceof ICVS Remote Resource if element instanceof ICVS Remote Folder return ICVS Remote Folder element is Expandable return ICVS Remote Resource element is Container else if element instanceof CVS Resource Element ICVS Resource r CVS Resource Element element getCVS Resource if r instanceof Remote Resource return r is Folder else if element instanceof Version Category return true else if element instanceof Branch Category return true else if element instanceof Modules Category return true else if element instanceof CVS Tag Element return true else if element instanceof Remote Module return true if manager null if manager is Deferred Adapter element return manager may Have Children element return super has Children element  hasChildren ICVSRemoteResource ICVSRemoteFolder ICVSRemoteFolder isExpandable ICVSRemoteResource isContainer CVSResourceElement ICVSResource CVSResourceElement getCVSResource RemoteResource isFolder VersionCategory BranchCategory ModulesCategory CVSTagElement RemoteModule isDeferredAdapter mayHaveChildren hasChildren
Sets the working Set param working Set The working Set to set public void set Working Set I Working Set working Set this working Set working Set  workingSet workingSet workingSet setWorkingSet IWorkingSet workingSet workingSet workingSet
Returns the working Set return I Working Set public I Working Set get Working Set return working Set  workingSet IWorkingSet IWorkingSet getWorkingSet workingSet
public Object get Children Object element if manager null Object children manager get Children element if children null This will be a placeholder to indicate that the real children are being fetched return children Object children super get Children element for int i 0 i children length i Object object children i if object instanceof CVS Model Element CVS Model Element object set Working Set get Working Set return children  getChildren getChildren getChildren CVSModelElement CVSModelElement setWorkingSet getWorkingSet
public void cancel Jobs Repository Root roots if manager null for int i 0 i roots length i Repository Root root roots i cancel Jobs root get Root  cancelJobs RepositoryRoot RepositoryRoot cancelJobs getRoot
Cancel any jobs that are fetching content from the given location param location public void cancel Jobs ICVS Repository Location location if manager null manager cancel location  cancelJobs ICVSRepositoryLocation

public class Remote File Element extends Remote Resource Element Initial implementation return null public Object fetch Children Object o I Progress Monitor monitor return new Object 0  RemoteFileElement RemoteResourceElement fetchChildren IProgressMonitor
Initial implementation return null public Image Descriptor get Image Descriptor Object object if object instanceof ICVS Remote File return null return PlatformUI get Workbench get Editor Registry get Image Descriptor ICVS Remote File object get Name  ImageDescriptor getImageDescriptor ICVSRemoteFile getWorkbench getEditorRegistry getImageDescriptor ICVSRemoteFile getName
Initial implementation return the file s name and version public String get Label Object o if o instanceof ICVS Remote File return null ICVS Remote File file ICVS Remote File o try return Policy bind name And Revision file get Name file get Revision NON NLS 1 catch Team Exception e handle e return null  getLabel ICVSRemoteFile ICVSRemoteFile ICVSRemoteFile nameAndRevision getName getRevision TeamException

Overridden to append the version name to remote folders which have version tags and are top level folders public String get Label Object o if o instanceof ICVS Remote Folder return null ICVS Remote Folder folder ICVS Remote Folder o CVS Tag tag folder get Tag if tag null tag get Type CVS Tag HEAD if folder get Remote Parent null return Policy bind Remote Folder Element name And Tag folder get Name tag get Name NON NLS 1 return folder get Name  getLabel ICVSRemoteFolder ICVSRemoteFolder ICVSRemoteFolder CVSTag getTag getType CVSTag getRemoteParent RemoteFolderElement nameAndTag getName getName getName
public Image Descriptor get Image Descriptor Object object if object instanceof ICVS Remote Folder return null ICVS Remote Folder folder ICVS Remote Folder object if folder is Defined Module return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG MODULE return PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG OBJ FOLDER  ImageDescriptor getImageDescriptor ICVSRemoteFolder ICVSRemoteFolder ICVSRemoteFolder isDefinedModule CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_MODULE getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_OBJ_FOLDER
public Object fetch Children Object o I Progress Monitor monitor throws Team Exception if o instanceof ICVS Remote Folder return new Object 0 return ICVS Remote Folder o members monitor  fetchChildren IProgressMonitor TeamException ICVSRemoteFolder ICVSRemoteFolder
public void fetch Deferred Children Object o I Element Collector collector I Progress Monitor monitor If it s not a folder return an empty array if o instanceof ICVS Remote Folder collector add new Object 0 monitor try monitor Policy monitor For monitor monitor begin Task Policy bind Remote Folder Element fetching Remote Children get Label o 100 NON NLS 1 Fetch Members Operation operation new Fetch Members Operation null ICVS Remote Folder o collector operation run Policy sub Monitor For monitor 100 catch Invocation Target Exception e CVSUI Plugin log CVS Exception wrap Exception e catch Interrupted Exception e Cancelled by the user finally monitor done  fetchDeferredChildren IElementCollector IProgressMonitor ICVSRemoteFolder monitorFor beginTask RemoteFolderElement fetchingRemoteChildren getLabel FetchMembersOperation FetchMembersOperation ICVSRemoteFolder subMonitorFor InvocationTargetException CVSUIPlugin CVSException wrapException InterruptedException
public I Scheduling Rule get Rule Object element ICVS Repository Location location get Repository Location element return new Repository Location Scheduling Rule location NON NLS 1  ISchedulingRule getRule ICVSRepositoryLocation getRepositoryLocation RepositoryLocationSchedulingRule
private ICVS Repository Location get Repository Location Object o if o instanceof ICVS Remote Folder return null return ICVS Remote Folder o get Repository  ICVSRepositoryLocation getRepositoryLocation ICVSRemoteFolder ICVSRemoteFolder getRepository
public boolean is Container return true  isContainer

Remote Project constructor public Remote Module ICVS Remote Folder folder Version Category parent this folder folder this parent parent  RemoteProject RemoteModule ICVSRemoteFolder VersionCategory
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found public Object get Adapter Class adapter if adapter I Workbench Adapter class return this if adapter I Deferred Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter IDeferredWorkbenchAdapter
Returns an image to be used for displaying an object in the desktop param object The object to get an image for param owner The viewer that the image will be used in The image will be disposed when this viewer is closed If the owner is null a new image is returned and the caller is responsible for disposing it public Image Descriptor get Image Descriptor Object object return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG PROJECT VERSION  ImageDescriptor getImageDescriptor CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_PROJECT_VERSION
Returns the name of this element This will typically be used to assign a label to this object when displayed in the UI public String get Label Object o return folder get Name  getLabel getName
Returns the logical parent of the given object in its tree public Object get Parent Object o return parent  getParent
Return the repository the given element belongs to public ICVS Repository Location get Repository Object o return folder get Repository  ICVSRepositoryLocation getRepository getRepository
Non javadoc For debugging purposes only public String to String return Remote Module folder get Name NON NLS 1 NON NLS 2  toString RemoteModule getName
public ICVS Remote Resource getCVS Resource return folder  ICVSRemoteResource getCVSResource
Returns the children of this object When this object is displayed in a tree the returned objects will be this element s children Returns an empty enumeration if this object has no children The children of the Remote Module are the versions for that module see org eclipse team internal ccvs ui model CVS Model Element internal Get Children java lang Object org eclipse core runtime I Progress Monitor public Object fetch Children Object o I Progress Monitor monitor throws Team Exception Repository Manager manager CVSUI Plugin get Plugin get Repository Manager try manager refresh Defined Tags folder false replace false monitor catch Team Exception e continue CVS Tag tags CVSUI Plugin get Plugin get Repository Manager get Known Tags folder CVS Tag VERSION Object versions new Object tags length for int i 0 i versions length i versions i folder for Tag tags i return versions  RemoteModule CVSModelElement internalGetChildren IProgressMonitor fetchChildren IProgressMonitor TeamException RepositoryManager CVSUIPlugin getPlugin getRepositoryManager refreshDefinedTags TeamException CVSTag CVSUIPlugin getPlugin getRepositoryManager getKnownTags CVSTag forTag
public void fetch Deferred Children Object o I Element Collector collector I Progress Monitor monitor try collector add fetch Children o monitor monitor catch Team Exception e CVSUI Plugin log e  fetchDeferredChildren IElementCollector IProgressMonitor fetchChildren TeamException CVSUIPlugin
public boolean is Container return true  isContainer
public I Scheduling Rule get Rule Object element return new Repository Location Scheduling Rule folder get Repository NON NLS 1  ISchedulingRule getRule RepositoryLocationSchedulingRule getRepository

Constructor for Remote Projects Element public Remote Projects Element super CVS Tag DEFAULT null  RemoteProjectsElement RemoteProjectsElement CVSTag
Constructor for Remote Projects Element public Remote Projects Element ICVS Repository Location root super CVS Tag DEFAULT root  RemoteProjectsElement RemoteProjectsElement ICVSRepositoryLocation CVSTag
Sets the root param root The root to set public void set Root ICVS Repository Location root this root root  setRoot ICVSRepositoryLocation
Sets the tag param tag The tag to set public void set Tag CVS Tag tag this tag tag  setTag CVSTag
see java lang Object equals java lang Object public boolean equals Object o if o instanceof Remote Projects Element return false Remote Projects Element element Remote Projects Element o if root null return element root null tag equals element tag return super equals o  RemoteProjectsElement RemoteProjectsElement RemoteProjectsElement
see org eclipse ui model I Workbench Adapter get Parent java lang Object public Object get Parent Object o return null  IWorkbenchAdapter getParent getParent
see java lang Object hash Code public int hash Code if root null return tag hash Code return super hash Code  hashCode hashCode hashCode hashCode
see org eclipse team internal ccvs ui model CVS Model Element internal Get Children java lang Object org eclipse core runtime I Progress Monitor public Object fetch Children Object o I Progress Monitor monitor throws Team Exception if root null return new Object 0 return super fetch Children o monitor  CVSModelElement internalGetChildren IProgressMonitor fetchChildren IProgressMonitor TeamException fetchChildren

public abstract class Remote Resource Element extends CVS Model Element Initial implementation return the resource s name public String get Label Object o if o instanceof ICVS Remote Resource return null return ICVS Remote Resource o get Name  RemoteResourceElement CVSModelElement getLabel ICVSRemoteResource ICVSRemoteResource getName
Return null public Object get Parent Object o if o instanceof ICVS Remote Resource return null ICVS Remote Resource rr ICVS Remote Resource o return rr get Parent  getParent ICVSRemoteResource ICVSRemoteResource ICVSRemoteResource getParent

Remote Project constructor public Remote Version Module CVS Tag tag Grouped By Version Category parent this tag tag this parent parent  RemoteProject RemoteVersionModule CVSTag GroupedByVersionCategory
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter
public void add Project ICVS Remote Folder project projects add project  addProject ICVSRemoteFolder
Returns the children of this object When this object is displayed in a tree the returned objects will be this element s children Returns an empty enumeration if this object has no children The children of the Remote Module are the versions for that module public Object fetch Children Object o I Progress Monitor monitor return ICVS Remote Folder projects to Array new ICVS Remote Folder projects size  RemoteModule fetchChildren IProgressMonitor ICVSRemoteFolder toArray ICVSRemoteFolder
Returns an image to be used for displaying an object in the desktop param object The object to get an image for param owner The viewer that the image will be used in The image will be disposed when this viewer is closed If the owner is null a new image is returned and the caller is responsible for disposing it public Image Descriptor get Image Descriptor Object object return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG PROJECT VERSION  ImageDescriptor getImageDescriptor CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_PROJECT_VERSION
Returns the name of this element This will typically be used to assign a label to this object when displayed in the UI public String get Label Object o return tag get Name  getLabel getName
Returns the logical parent of the given object in its tree public Object get Parent Object o return parent  getParent
Non javadoc For debugging purposes only public String to String return Remote Version Module tag get Name NON NLS 1 NON NLS 2  toString RemoteVersionModule getName

public class Repository Location Scheduling Rule implements I Scheduling Rule ICVS Repository Location location public Repository Location Scheduling Rule ICVS Repository Location location this location location  RepositoryLocationSchedulingRule ISchedulingRule ICVSRepositoryLocation RepositoryLocationSchedulingRule ICVSRepositoryLocation
public boolean is Conflicting I Scheduling Rule rule if rule instanceof Repository Location Scheduling Rule return Repository Location Scheduling Rule rule location equals location return false  isConflicting ISchedulingRule RepositoryLocationSchedulingRule RepositoryLocationSchedulingRule
return false public boolean contains I Scheduling Rule rule return is Conflicting rule  ISchedulingRule isConflicting

protected ICVS Repository Location repository public Tag Category ICVS Repository Location repository this repository repository  ICVSRepositoryLocation TagCategory ICVSRepositoryLocation
public Object fetch Children Object o I Progress Monitor monitor throws CVS Exception CVS Tag tags get Tags monitor CVS Tag Element elements new CVS Tag Element tags length for int i 0 i tags length i elements i new CVS Tag Element tags i repository return elements  fetchChildren IProgressMonitor CVSException CVSTag getTags CVSTagElement CVSTagElement CVSTagElement
Return the tags that are to be displyed as children of this category param monitor return 
see org eclipse ui model I Workbench Adapter get Parent java lang Object public Object get Parent Object o return repository  IWorkbenchAdapter getParent getParent
Return the repository the given element belongs to public ICVS Repository Location get Repository Object o return repository  ICVSRepositoryLocation getRepository
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter

Project Versions Category constructor public Version Category ICVS Repository Location repo super this repository repo  ProjectVersionsCategory VersionCategory ICVSRepositoryLocation
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found public Object get Adapter Class adapter if adapter I Workbench Adapter class return this if adapter I Deferred Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter IDeferredWorkbenchAdapter
Returns the children of this object When this object is displayed in a tree the returned objects will be this element s children Returns an empty enumeration if this object has no children public Object fetch Children Object o I Progress Monitor monitor throws Team Exception if CVSUI Plugin get Plugin get Repository Manager is Displaying Project Versions repository return get Project Version Children o monitor else return get Version Tag Children o monitor  fetchChildren IProgressMonitor TeamException CVSUIPlugin getPlugin getRepositoryManager isDisplayingProjectVersions getProjectVersionChildren getVersionTagChildren
private Object get Version Tag Children Object o I Progress Monitor monitor throws CVS Exception CVS Tag tags CVSUI Plugin get Plugin get Repository Manager get Known Tags repository get Working Set CVS Tag VERSION monitor CVS Tag Element version Elements new CVS Tag Element tags length for int i 0 i tags length i version Elements i new CVS Tag Element tags i repository return version Elements  getVersionTagChildren IProgressMonitor CVSException CVSTag CVSUIPlugin getPlugin getRepositoryManager getKnownTags getWorkingSet CVSTag CVSTagElement versionElements CVSTagElement versionElements CVSTagElement versionElements
private Object get Project Version Children Object o I Progress Monitor monitor throws Team Exception I Preference Store store CVSUI Plugin get Plugin get Preference Store ICVS Remote Resource resources CVSUI Plugin get Plugin get Repository Manager get Folders For Tag repository CVS Tag DEFAULT monitor if get Working Set null resources CVSUI Plugin get Plugin get Repository Manager filter Resources get Working Set resources Object modules new Object resources length for int i 0 i resources length i modules i new Remote Module ICVS Remote Folder resources i Version Category this return modules  getProjectVersionChildren IProgressMonitor TeamException IPreferenceStore CVSUIPlugin getPlugin getPreferenceStore ICVSRemoteResource CVSUIPlugin getPlugin getRepositoryManager getFoldersForTag CVSTag getWorkingSet CVSUIPlugin getPlugin getRepositoryManager filterResources getWorkingSet RemoteModule ICVSRemoteFolder VersionCategory
Returns an image descriptor to be used for displaying an object in the workbench Returns null if there is no appropriate image param object The object to get an image descriptor for public Image Descriptor get Image Descriptor Object object return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG VERSIONS CATEGORY  ImageDescriptor getImageDescriptor CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_VERSIONS_CATEGORY
Returns the name of this element This will typically be used to assign a label to this object when displayed in the UI Returns an empty string if there is no appropriate name for this object param object The object to get a label for public String get Label Object o return Policy bind Version Category Versions 1 NON NLS 1  getLabel VersionCategory Versions_1
Returns the logical parent of the given object in its tree Returns null if there is no parent or if this object doesn t belong to a tree param object The object to get the parent for public Object get Parent Object o return repository  getParent
Return the repository the given element belongs to public ICVS Repository Location get Repository Object o return repository  ICVSRepositoryLocation getRepository
public void fetch Deferred Children Object o I Element Collector collector I Progress Monitor monitor try collector add fetch Children o monitor monitor catch Team Exception e CVSUI Plugin log e  fetchDeferredChildren IElementCollector IProgressMonitor fetchChildren TeamException CVSUIPlugin
public boolean is Container return true  isContainer
public I Scheduling Rule get Rule Object element return new Repository Location Scheduling Rule repository NON NLS 1  ISchedulingRule getRule RepositoryLocationSchedulingRule

public class Add Operation extends Repository Provider Operation public Add Operation I Workbench Part part I Resource resources super part resources  AddOperation RepositoryProviderOperation AddOperation IWorkbenchPart IResource
see org eclipse team internal ccvs ui operations Repository Provider Operation execute org eclipse team internal ccvs core CVS Team Provider org eclipse core resources I Resource org eclipse core runtime I Progress Monitor protected void execute CVS Team Provider provider I Resource resources I Progress Monitor monitor throws CVS Exception Interrupted Exception add provider resources I Resource DEPTH INFINITE monitor  RepositoryProviderOperation CVSTeamProvider IResource IProgressMonitor CVSTeamProvider IResource IProgressMonitor CVSException InterruptedException IResource DEPTH_INFINITE
see org eclipse team internal ccvs ui operations CVS Operation get Task Name protected String get Task Name return Policy bind Add Action adding NON NLS 1  CVSOperation getTaskName getTaskName AddAction
see org eclipse team internal ccvs ui operations Repository Provider Operation get Task Name org eclipse team internal ccvs core CVS Team Provider protected String get Task Name CVS Team Provider provider return Policy bind Add Operation 0 provider get Project get Name NON NLS 1  RepositoryProviderOperation getTaskName CVSTeamProvider getTaskName CVSTeamProvider AddOperation getProject getName
current Resource accept new I Resource Visitor public boolean visit I Resource resource try ICVS Resource m Resource CVS Workspace Root getCVS Resource For resource Add the resource is its not already managed and it was either added explicitly is equal current Resource or is not ignored if is Managed m Resource current Resource equals resource m Resource is Ignored if resource get Type I Resource FILE K Subst Option ksubst K Subst Option from File I File resource Set set Set files get ksubst if set null set new Hash Set files put ksubst set set add m Resource else folders add m Resource Always return true and let the depth determine if children are visited return true catch CVS Exception e exception 0 e return false  currentResource IResourceVisitor IResource ICVSResource mResource CVSWorkspaceRoot getCVSResourceFor currentResource isManaged mResource currentResource mResource isIgnored getType IResource KSubstOption KSubstOption fromFile IFile HashSet mResource mResource CVSException
private void add CVS Team Provider provider I Resource resources int depth I Progress Monitor progress throws CVS Exception Visit the children of the resources using the depth in order to determine which folders text files and binary files need to be added A Tree Set is needed for the folders so they are in the right order i e parents created before children final Sorted Set folders new Tree Set Sets are required for the files to ensure that files will not appear twice if there parent was added as well and the depth isn t zero final Map from K Subst Option to Set files new Hash Map final CVS Exception e Holder new CVS Exception 1 for int i 0 i resources length i final I Resource current Resource resources i try Auto add parents if they are not already managed I Container parent current Resource get Parent ICVS Resource cvs Parent Resource CVS Workspace Root getCVS Resource For parent while parent get Type I Resource ROOT parent get Type I Resource PROJECT is Managed cvs Parent Resource folders add cvs Parent Resource parent parent get Parent cvs Parent Resource cvs Parent Resource get Parent Auto add children final Team Exception exception new Team Exception null current Resource accept new I Resource Visitor public boolean visit I Resource resource try ICVS Resource m Resource CVS Workspace Root getCVS Resource For resource Add the resource is its not already managed and it was either added explicitly is equal current Resource or is not ignored if is Managed m Resource current Resource equals resource m Resource is Ignored if resource get Type I Resource FILE K Subst Option ksubst K Subst Option from File I File resource Set set Set files get ksubst if set null set new Hash Set files put ksubst set set add m Resource else folders add m Resource Always return true and let the depth determine if children are visited return true catch CVS Exception e exception 0 e return false depth false if exception 0 null throw exception 0 catch Core Exception e throw new CVS Exception new Status I Status ERROR CVS Provider Plugin ID Team Exception UNABLE Policy bind CVS Team Provider visit Error new Object resources i get Full Path e NON NLS 1 If an exception occured during the visit throw it here if e Holder 0 null throw e Holder 0 Add the folders followed by files progress begin Task null files size 10 folders is Empty 0 10 try if folders is Empty Session session new Session get Remote Location provider get Local Root provider true output to console session open Policy sub Monitor For progress 2 true open for modification try I Status status Command ADD execute session Command NO GLOBAL OPTIONS Command NO LOCAL OPTIONS ICVS Resource folders to Array new ICVS Resource folders size null Policy sub Monitor For progress 8 if status get Code CVS Status SERVER ERROR throw new CVS Server Exception status finally session close for Iterator it files entry Set iterator it has Next Map Entry entry Map Entry it next final K Subst Option ksubst K Subst Option entry get Key final Set set Set entry get Value Session session new Session get Remote Location provider get Local Root provider true output to console session open Policy sub Monitor For progress 2 true open for modification try I Status status Command ADD execute session Command NO GLOBAL OPTIONS new Local Option ksubst ICVS Resource set to Array new ICVS Resource set size null Policy sub Monitor For progress 8 if status get Code CVS Status SERVER ERROR throw new CVS Server Exception status finally session close finally progress done  CVSTeamProvider IResource IProgressMonitor CVSException TreeSet SortedSet TreeSet KSubstOption HashMap CVSException eHolder CVSException IResource currentResource IContainer currentResource getParent ICVSResource cvsParentResource CVSWorkspaceRoot getCVSResourceFor getType IResource getType IResource isManaged cvsParentResource cvsParentResource getParent cvsParentResource cvsParentResource getParent TeamException TeamException currentResource IResourceVisitor IResource ICVSResource mResource CVSWorkspaceRoot getCVSResourceFor currentResource isManaged mResource currentResource mResource isIgnored getType IResource KSubstOption KSubstOption fromFile IFile HashSet mResource mResource CVSException CoreException CVSException IStatus CVSProviderPlugin TeamException CVSTeamProvider visitError getFullPath eHolder eHolder beginTask isEmpty isEmpty getRemoteLocation getLocalRoot subMonitorFor IStatus NO_GLOBAL_OPTIONS NO_LOCAL_OPTIONS ICVSResource toArray ICVSResource subMonitorFor getCode CVSStatus SERVER_ERROR CVSServerException entrySet hasNext KSubstOption KSubstOption getKey getValue getRemoteLocation getLocalRoot subMonitorFor IStatus NO_GLOBAL_OPTIONS LocalOption ICVSResource toArray ICVSResource subMonitorFor getCode CVSStatus SERVER_ERROR CVSServerException
Consider a folder managed only if it s also a CVS folder private boolean is Managed ICVS Resource cvs Resource throws CVS Exception return cvs Resource is Managed cvs Resource is Folder ICVS Folder cvs Resource isCVS Folder  isManaged ICVSResource cvsResource CVSException cvsResource isManaged cvsResource isFolder ICVSFolder cvsResource isCVSFolder
see org eclipse team internal ccvs ui operations CVS Operation get Error Message org eclipse core runtime I Status int protected String get Error Message I Status failures int total Operations return Policy bind Add Action add Failed NON NLS 1  CVSOperation getErrorMessage IStatus getErrorMessage IStatus totalOperations AddAction addFailed

private CVS Tag branch Tag public Branch Operation I Workbench Part part I Resource resources super part resources  CVSTag branchTag BranchOperation IWorkbenchPart IResource
public void set Tags CVS Tag root Version Tag CVS Tag branch Tag boolean update To Branch this root Version Tag root Version Tag this branch Tag branch Tag this update update To Branch  setTags CVSTag rootVersionTag CVSTag branchTag updateToBranch rootVersionTag rootVersionTag branchTag branchTag updateToBranch
protected boolean should Run I Resource resources get Resources boolean all Sticky are All Resources Sticky resources ICVS Folder folder CVS Workspace Root getCVS Folder For resources 0 get Project final Branch Prompt Dialog dialog new Branch Prompt Dialog get Shell Policy bind Branch Wizard title NON NLS 1 folder all Sticky calculate Initial Version Name resources all Sticky if dialog open Input Dialog OK return false Capture the dialog info in local variables final String tag String dialog get Branch Tag Name update dialog get Update final String version String dialog get Version Tag Name root Version Tag version String null null new CVS Tag version String CVS Tag VERSION branch Tag new CVS Tag tag String CVS Tag BRANCH For non projects determine if the tag being loaded is the same as the resource s parent If it s not warn the user that they will be mixing tags if update try if CVS Action check For Mixing Tags get Shell resources branch Tag return false catch CVS Exception e CVSUI Plugin log e return super should Run  shouldRun IResource getResources allSticky areAllResourcesSticky ICVSFolder CVSWorkspaceRoot getCVSFolderFor getProject BranchPromptDialog BranchPromptDialog getShell BranchWizard allSticky calculateInitialVersionName allSticky InputDialog tagString getBranchTagName getUpdate versionString getVersionTagName rootVersionTag versionString CVSTag versionString CVSTag branchTag CVSTag tagString CVSTag CVSAction checkForMixingTags getShell branchTag CVSException CVSUIPlugin shouldRun
protected void execute CVS Team Provider provider I Resource provider Resources I Progress Monitor monitor throws CVS Exception Interrupted Exception try monitor begin Task null 100 make Branch provider provider Resources root Version Tag branch Tag update Policy sub Monitor For monitor 90 update Remembered Tags provider Resources if update update Workspace Subscriber provider getCVS Arguments provider Resources Policy sub Monitor For monitor 10 collect Status Status OK STATUS catch Team Exception e Accumulate the status which will be displayed by CVS Action end Operation I Action collect Status e get Status finally monitor done  CVSTeamProvider IResource providerResources IProgressMonitor CVSException InterruptedException beginTask makeBranch providerResources rootVersionTag branchTag subMonitorFor updateRememberedTags providerResources updateWorkspaceSubscriber getCVSArguments providerResources subMonitorFor collectStatus OK_STATUS TeamException CVSAction endOperation IAction collectStatus getStatus
private void make Branch CVS Team Provider provider I Resource resources final CVS Tag version Tag final CVS Tag branch Tag boolean move To Branch I Progress Monitor monitor throws Team Exception Determine the total amount of work int total Work version Tag null 60 40 move To Branch 20 0 monitor begin Task Policy bind CVS Team Provider make Branch total Work NON NLS 1 try Build the arguments list final ICVS Resource arguments getCVS Arguments resources Tag the remote resources I Status status null if version Tag null Version using a custom tag command that skips added but not commited reesources Session session new Session get Remote Location provider get Local Root provider true output to console session open Policy sub Monitor For monitor 5 true open for modification try status Command CUSTOM TAG execute session Command NO GLOBAL OPTIONS Command NO LOCAL OPTIONS version Tag arguments null Policy sub Monitor For monitor 35 finally session close if status isOK Branch using the tag session new Session get Remote Location provider get Local Root provider true output to console session open Policy sub Monitor For monitor 5 true open for modification try status Command CUSTOM TAG execute session Command NO GLOBAL OPTIONS Command NO LOCAL OPTIONS branch Tag arguments null Policy sub Monitor For monitor 15 finally session close else Just branch using tag Session session new Session get Remote Location provider get Local Root provider true output to console session open Policy sub Monitor For monitor 5 true open for modification try status Command CUSTOM TAG execute session Command NO GLOBAL OPTIONS Command NO LOCAL OPTIONS branch Tag arguments null Policy sub Monitor For monitor 35 finally session close if status isOK throw new CVS Server Exception status Set the tag of the local resources to the branch tag The update command will not properly update cvs added and cvs removed resources so a custom visitor is used if move To Branch set Tag provider resources branch Tag Policy sub Monitor For monitor 20 finally monitor done  makeBranch CVSTeamProvider IResource CVSTag versionTag CVSTag branchTag moveToBranch IProgressMonitor TeamException totalWork versionTag moveToBranch beginTask CVSTeamProvider makeBranch totalWork ICVSResource getCVSArguments IStatus versionTag getRemoteLocation getLocalRoot subMonitorFor CUSTOM_TAG NO_GLOBAL_OPTIONS NO_LOCAL_OPTIONS versionTag subMonitorFor getRemoteLocation getLocalRoot subMonitorFor CUSTOM_TAG NO_GLOBAL_OPTIONS NO_LOCAL_OPTIONS branchTag subMonitorFor getRemoteLocation getLocalRoot subMonitorFor CUSTOM_TAG NO_GLOBAL_OPTIONS NO_LOCAL_OPTIONS branchTag subMonitorFor CVSServerException moveToBranch setTag branchTag subMonitorFor
CVS Workspace Root getCVS Resource For resources i accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception monitor worked 1 Resource Sync Info info file get Sync Info byte sync Bytes file get Sync Bytes if sync Bytes null monitor sub Task Policy bind CVS Team Provider updating File file get Name NON NLS 1 file set Sync Bytes Resource Sync Info set Tag sync Bytes tag ICVS File UNKNOWN  CVSWorkspaceRoot getCVSResourceFor ICVSResourceVisitor visitFile ICVSFile CVSException ResourceSyncInfo getSyncInfo syncBytes getSyncBytes syncBytes subTask CVSTeamProvider updatingFile getName setSyncBytes ResourceSyncInfo setTag syncBytes ICVSFile
public void visit Folder ICVS Folder folder throws CVS Exception monitor worked 1 Folder Sync Info info folder get Folder Sync Info if info null monitor sub Task Policy bind CVS Team Provider updating Folder info get Repository NON NLS 1 folder set Folder Sync Info new Folder Sync Info info get Repository info get Root tag info get Is Static folder accept Children this  visitFolder ICVSFolder CVSException FolderSyncInfo getFolderSyncInfo subTask CVSTeamProvider updatingFolder getRepository setFolderSyncInfo FolderSyncInfo getRepository getRoot getIsStatic acceptChildren
get Local Root provider run new ICVS Runnable public void run I Progress Monitor progress throws CVS Exception try 512 ticks gives us a maximum of 2048 which seems reasonable for folders and files in a project progress begin Task null 100 final I Progress Monitor monitor Policy infinite Sub Monitor For progress 100 monitor begin Task Policy bind CVS Team Provider folder Info provider get Project get Name 512 NON NLS 1 Visit all the children folders in order to set the root in the folder sync info for int i 0 i resources length i CVS Workspace Root getCVS Resource For resources i accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception monitor worked 1 Resource Sync Info info file get Sync Info byte sync Bytes file get Sync Bytes if sync Bytes null monitor sub Task Policy bind CVS Team Provider updating File file get Name NON NLS 1 file set Sync Bytes Resource Sync Info set Tag sync Bytes tag ICVS File UNKNOWN public void visit Folder ICVS Folder folder throws CVS Exception monitor worked 1 Folder Sync Info info folder get Folder Sync Info if info null monitor sub Task Policy bind CVS Team Provider updating Folder info get Repository NON NLS 1 folder set Folder Sync Info new Folder Sync Info info get Repository info get Root tag info get Is Static folder accept Children this finally progress done  getLocalRoot ICVSRunnable IProgressMonitor CVSException beginTask IProgressMonitor infiniteSubMonitorFor beginTask CVSTeamProvider folderInfo getProject getName CVSWorkspaceRoot getCVSResourceFor ICVSResourceVisitor visitFile ICVSFile CVSException ResourceSyncInfo getSyncInfo syncBytes getSyncBytes syncBytes subTask CVSTeamProvider updatingFile getName setSyncBytes ResourceSyncInfo setTag syncBytes ICVSFile visitFolder ICVSFolder CVSException FolderSyncInfo getFolderSyncInfo subTask CVSTeamProvider updatingFolder getRepository setFolderSyncInfo FolderSyncInfo getRepository getRoot getIsStatic acceptChildren
private void set Tag final CVS Team Provider provider final I Resource resources final CVS Tag tag I Progress Monitor monitor throws Team Exception get Local Root provider run new ICVS Runnable public void run I Progress Monitor progress throws CVS Exception try 512 ticks gives us a maximum of 2048 which seems reasonable for folders and files in a project progress begin Task null 100 final I Progress Monitor monitor Policy infinite Sub Monitor For progress 100 monitor begin Task Policy bind CVS Team Provider folder Info provider get Project get Name 512 NON NLS 1 Visit all the children folders in order to set the root in the folder sync info for int i 0 i resources length i CVS Workspace Root getCVS Resource For resources i accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception monitor worked 1 Resource Sync Info info file get Sync Info byte sync Bytes file get Sync Bytes if sync Bytes null monitor sub Task Policy bind CVS Team Provider updating File file get Name NON NLS 1 file set Sync Bytes Resource Sync Info set Tag sync Bytes tag ICVS File UNKNOWN public void visit Folder ICVS Folder folder throws CVS Exception monitor worked 1 Folder Sync Info info folder get Folder Sync Info if info null monitor sub Task Policy bind CVS Team Provider updating Folder info get Repository NON NLS 1 folder set Folder Sync Info new Folder Sync Info info get Repository info get Root tag info get Is Static folder accept Children this finally progress done monitor  setTag CVSTeamProvider IResource CVSTag IProgressMonitor TeamException getLocalRoot ICVSRunnable IProgressMonitor CVSException beginTask IProgressMonitor infiniteSubMonitorFor beginTask CVSTeamProvider folderInfo getProject getName CVSWorkspaceRoot getCVSResourceFor ICVSResourceVisitor visitFile ICVSFile CVSException ResourceSyncInfo getSyncInfo syncBytes getSyncBytes syncBytes subTask CVSTeamProvider updatingFile getName setSyncBytes ResourceSyncInfo setTag syncBytes ICVSFile visitFolder ICVSFolder CVSException FolderSyncInfo getFolderSyncInfo subTask CVSTeamProvider updatingFolder getRepository setFolderSyncInfo FolderSyncInfo getRepository getRoot getIsStatic acceptChildren
private void update Remembered Tags I Resource provider Resources throws CVS Exception if root Version Tag null update for int i 0 i provider Resources length i ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For provider Resources i Repository Manager manager CVSUI Plugin get Plugin get Repository Manager if root Version Tag null manager add Tags cvs Resource new CVS Tag root Version Tag if update manager add Tags cvs Resource new CVS Tag branch Tag  updateRememberedTags IResource providerResources CVSException rootVersionTag providerResources ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor providerResources RepositoryManager CVSUIPlugin getPlugin getRepositoryManager rootVersionTag addTags cvsResource CVSTag rootVersionTag addTags cvsResource CVSTag branchTag
see org eclipse team internal ccvs ui operations CVS Operation get Task Name protected String get Task Name return Policy bind Branch Operation 0 NON NLS 1  CVSOperation getTaskName getTaskName BranchOperation
see org eclipse team internal ccvs ui operations Repository Provider Operation get Task Name org eclipse team internal ccvs core CVS Team Provider protected String get Task Name CVS Team Provider provider return Policy bind Branch Operation 1 provider get Project get Name NON NLS 1  RepositoryProviderOperation getTaskName CVSTeamProvider getTaskName CVSTeamProvider BranchOperation getProject getName
Answers code true code if all resources in the array have a sticky tag private boolean are All Resources Sticky I Resource resources for int i 0 i resources length i if has Sticky Tag resources i return false return true  areAllResourcesSticky IResource hasStickyTag
Answers code true code if the resource has a sticky tag private boolean has Sticky Tag I Resource resource try ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource CVS Tag tag if cvs Resource is Folder Folder Sync Info folder Info ICVS Folder cvs Resource get Folder Sync Info tag folder Info get Tag else Resource Sync Info info cvs Resource get Sync Info tag info get Tag if tag null int tag Type tag get Type if tag Type CVS Tag VERSION return true catch CVS Exception e CVSUI Plugin log e return false return false  hasStickyTag IResource ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor CVSTag cvsResource isFolder FolderSyncInfo folderInfo ICVSFolder cvsResource getFolderSyncInfo folderInfo getTag ResourceSyncInfo cvsResource getSyncInfo getTag tagType getType tagType CVSTag CVSException CVSUIPlugin
private String calculate Initial Version Name I Resource resources boolean all Sticky String version Name NON NLS 1 try if all Sticky I Resource sticky Resource resources 0 if sticky Resource get Type I Resource FILE ICVS File cvs File CVS Workspace Root getCVS File For I File sticky Resource version Name cvs File get Sync Info get Tag get Name else ICVS Folder cvs Folder CVS Workspace Root getCVS Folder For I Container sticky Resource version Name cvs Folder get Folder Sync Info get Tag get Name catch CVS Exception e CVSUI Plugin log e version Name NON NLS 1 return version Name  calculateInitialVersionName IResource allSticky versionName allSticky IResource stickyResource stickyResource getType IResource ICVSFile cvsFile CVSWorkspaceRoot getCVSFileFor IFile stickyResource versionName cvsFile getSyncInfo getTag getName ICVSFolder cvsFolder CVSWorkspaceRoot getCVSFolderFor IContainer stickyResource versionName cvsFolder getFolderSyncInfo getTag getName CVSException CVSUIPlugin versionName versionName

Constructor which takes a set of remote folders and the local folder into which the folders should be loaded public Checkout Into Operation I Workbench Part part ICVS Remote Folder remote Folders I Container local Folder boolean recursive super part remote Folders this recursive recursive this local Folder CVS Workspace Root getCVS Folder For local Folder  CheckoutIntoOperation IWorkbenchPart ICVSRemoteFolder remoteFolders IContainer localFolder remoteFolders localFolder CVSWorkspaceRoot getCVSFolderFor localFolder
Constructor which takes a single remote folder and the target local folder public Checkout Into Operation I Workbench Part part ICVS Remote Folder remote Folder I Container local Folder boolean recursive this part new ICVS Remote Folder remote Folder local Folder get Parent recursive this local Folder Name local Folder get Name  CheckoutIntoOperation IWorkbenchPart ICVSRemoteFolder remoteFolder IContainer localFolder ICVSRemoteFolder remoteFolder localFolder getParent localFolderName localFolder getName
protected String get Task Name ICVS Remote Folder remote Folders get Remote Folders String local Folder Name NON NLS 1 try local Folder Name get Local Folder getI Resource get Full Path to String catch CVS Exception e CVSUI Plugin log e return Policy bind Checkout Into Operation taskname new Integer remote Folders length to String local Folder Name NON NLS 1  getTaskName ICVSRemoteFolder remoteFolders getRemoteFolders localFolderName localFolderName getLocalFolder getIResource getFullPath toString CVSException CVSUIPlugin CheckoutIntoOperation remoteFolders toString localFolderName
return public ICVS Folder get Local Folder return local Folder  ICVSFolder getLocalFolder localFolder
return public boolean is Recursive return recursive  isRecursive
from their parent see manage Folders Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception result 0 checkout folder get Local Folder is Recursive monitor  manageFolders ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException getLocalFolder isRecursive
protected I Status checkout final ICVS Remote Folder folder I Progress Monitor monitor throws CVS Exception final I Status result new I Status null try Wrap in a workspace runnable to avoid auto build This is necessary because CVS has a POST BUILD listener that will clear the sync info from orphaned i e unmanaged subtrees and we will purposely create some which we subsequently manage from their parent see manage Folders Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception result 0 checkout folder get Local Folder is Recursive monitor get Scheduling Rule 0 monitor catch Core Exception e result 0 CVS Exception wrap Exception e get Status return result 0  IStatus ICVSRemoteFolder IProgressMonitor CVSException IStatus IStatus POST_BUILD manageFolders ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException getLocalFolder isRecursive getSchedulingRule CoreException CVSException wrapException getStatus
Eclipse Synchronizer get Instance run get Scheduling Rule new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception monitor begin Task null 100 try Obtain a scheduling rule on the projects were about to overwrite Checkout Into Operation super checkout folders Policy sub Monitor For monitor 90 refresh Root get Local Root get Local Folder Policy sub Monitor For monitor 10 finally monitor done  EclipseSynchronizer getInstance getSchedulingRule ICVSRunnable IProgressMonitor CVSException beginTask CheckoutIntoOperation subMonitorFor refreshRoot getLocalRoot getLocalFolder subMonitorFor
protected void checkout final ICVS Remote Folder folders I Progress Monitor monitor throws CVS Exception Batch sync info changes with the CVS synchronizer to optimize cache writing Eclipse Synchronizer get Instance run get Scheduling Rule new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception monitor begin Task null 100 try Obtain a scheduling rule on the projects were about to overwrite Checkout Into Operation super checkout folders Policy sub Monitor For monitor 90 refresh Root get Local Root get Local Folder Policy sub Monitor For monitor 10 finally monitor done Policy monitor For monitor  ICVSRemoteFolder IProgressMonitor CVSException EclipseSynchronizer getInstance getSchedulingRule ICVSRunnable IProgressMonitor CVSException beginTask CheckoutIntoOperation subMonitorFor refreshRoot getLocalRoot getLocalFolder subMonitorFor monitorFor
private ICVS Folder prepare Local Folders Session session ICVS Remote Folder remote Folder ICVS Folder parent Folder String local Folder Name I Progress Monitor monitor throws CVS Exception Set target Folder Set new Hash Set monitor begin Task null 30 if local Folder Name null Determine which local folders will be afected I Status status Request EXPAND MODULES execute session new String remote Folder get Repository Relative Path Policy sub Monitor For monitor 10 if status get Code CVS Status SERVER ERROR add Error status return null Convert the module expansions to target folders String expansions session get Module Expansions for int j 0 j expansions length j String child Path new Path expansions j segment 0 ICVS Resource resource parent Folder get Child child Path if resource null resource is Folder The target folder conflicts with an existing file add Error new CVS Status I Status ERROR Policy bind Checkout Into Operation target Is File remote Folder get Name resource getI Resource get Full Path to String NON NLS 1 return null target Folder Set add parent Folder get Folder child Path else target Folder Set add parent Folder get Folder local Folder Name final ICVS Folder target Folders ICVS Folder target Folder Set to Array new ICVS Folder target Folder Set size Ensure that the checkout will not conflict with existing resources I Status status validate Target Folders remote Folder target Folders Policy sub Monitor For monitor 10 if status isOK add Error status return null Prepare the target projects to receive resources status scrub Folders remote Folder target Folders Policy sub Monitor For monitor 10 return the target projects if the scrub succeeded if status isOK return target Folders else add Error status return null  ICVSFolder prepareLocalFolders ICVSRemoteFolder remoteFolder ICVSFolder parentFolder localFolderName IProgressMonitor CVSException targetFolderSet HashSet beginTask localFolderName IStatus EXPAND_MODULES remoteFolder getRepositoryRelativePath subMonitorFor getCode CVSStatus SERVER_ERROR addError getModuleExpansions childPath ICVSResource parentFolder getChild childPath isFolder addError CVSStatus IStatus CheckoutIntoOperation targetIsFile remoteFolder getName getIResource getFullPath toString targetFolderSet parentFolder getFolder childPath targetFolderSet parentFolder getFolder localFolderName ICVSFolder targetFolders ICVSFolder targetFolderSet toArray ICVSFolder targetFolderSet IStatus validateTargetFolders remoteFolder targetFolders subMonitorFor addError scrubFolders remoteFolder targetFolders subMonitorFor targetFolders addError
private I Status validate Target Folders ICVS Remote Folder remote Folder ICVS Folder target Folders I Progress Monitor monitor throws CVS Exception for int i 0 i target Folders length i ICVS Folder target Folder target Folders i Folder Sync Info local Info target Folder get Folder Sync Info Folder Sync Info remote Info remote Folder get Folder Sync Info if remote Info is Same Mapping local Info if local Info null if is Remote Child Of Parent target Folder if the local folder is child of it s parent remotely i e path of child is parent child then the remote cannot be loaded String message if target Folder exists message Policy bind Checkout Into Operation target Is Folder remote Folder get Name target Folder getI Resource get Full Path to String NON NLS 1 else message Policy bind Checkout Into Operation target Is Pruned Folder remote Folder get Name target Folder get Folder Sync Info get Repository NON NLS 1 return new CVS Status I Status ERROR message Verify that no other folders in the local workspace are mapped to the remote folder I Status status validate Unique Mapping remote Folder target Folder Policy sub Monitor For monitor 10 if status isOK return status return OK  IStatus validateTargetFolders ICVSRemoteFolder remoteFolder ICVSFolder targetFolders IProgressMonitor CVSException targetFolders ICVSFolder targetFolder targetFolders FolderSyncInfo localInfo targetFolder getFolderSyncInfo FolderSyncInfo remoteInfo remoteFolder getFolderSyncInfo remoteInfo isSameMapping localInfo localInfo isRemoteChildOfParent targetFolder targetFolder CheckoutIntoOperation targetIsFolder remoteFolder getName targetFolder getIResource getFullPath toString CheckoutIntoOperation targetIsPrunedFolder remoteFolder getName targetFolder getFolderSyncInfo getRepository CVSStatus IStatus IStatus validateUniqueMapping remoteFolder targetFolder subMonitorFor
private boolean is Remote Child Of Parent ICVS Folder target Folder throws CVS Exception Folder Sync Info local Info target Folder get Folder Sync Info if local Info null return false Folder Sync Info parent Info target Folder get Parent get Folder Sync Info if parent Info null return false I Path child Path new Path local Info get Repository I Path parent Path new Path parent Info get Repository return parent Path is Prefix Of child Path  isRemoteChildOfParent ICVSFolder targetFolder CVSException FolderSyncInfo localInfo targetFolder getFolderSyncInfo localInfo FolderSyncInfo parentInfo targetFolder getParent getFolderSyncInfo parentInfo IPath childPath localInfo getRepository IPath parentPath parentInfo getRepository parentPath isPrefixOf childPath
param target Folder return private I Container get Local Root ICVS Folder target Folder throws CVS Exception return target Folder getI Resource get Project  targetFolder IContainer getLocalRoot ICVSFolder targetFolder CVSException targetFolder getIResource getProject
try cvs Folder accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception do nothing  cvsFolder ICVSResourceVisitor visitFile ICVSFile CVSException
public void visit Folder ICVS Folder folder throws CVS Exception if folder isCVS Folder return I Resource resource folder getI Resource if resource null return Folder Sync Info info folder get Folder Sync Info if info is Same Mapping remote Info throw new CVS Exception Policy bind Checkout Into Operation mapping Already Exists NON NLS 1 new Object remote Folder get Name target Folder getI Resource get Full Path to String resource get Full Path to String folder accept Children this  visitFolder ICVSFolder CVSException isCVSFolder IResource getIResource FolderSyncInfo getFolderSyncInfo isSameMapping remoteInfo CVSException CheckoutIntoOperation mappingAlreadyExists remoteFolder getName targetFolder getIResource getFullPath toString getFullPath toString acceptChildren
private I Status validate Unique Mapping final ICVS Remote Folder remote Folder final ICVS Folder target Folder I Progress Monitor i Progress Monitor throws CVS Exception final I Container root get Local Root target Folder final Folder Sync Info remote Info remote Folder get Folder Sync Info if remote Info equals Folder Sync Info VIRTUAL DIRECTORY We can t really check the mapping ahead of time so we ll let the operation continue return OK ICVS Folder cvs Folder CVS Workspace Root getCVS Folder For root try cvs Folder accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception do nothing public void visit Folder ICVS Folder folder throws CVS Exception if folder isCVS Folder return I Resource resource folder getI Resource if resource null return Folder Sync Info info folder get Folder Sync Info if info is Same Mapping remote Info throw new CVS Exception Policy bind Checkout Into Operation mapping Already Exists NON NLS 1 new Object remote Folder get Name target Folder getI Resource get Full Path to String resource get Full Path to String folder accept Children this catch CVS Exception e return e get Status return OK  IStatus validateUniqueMapping ICVSRemoteFolder remoteFolder ICVSFolder targetFolder IProgressMonitor iProgressMonitor CVSException IContainer getLocalRoot targetFolder FolderSyncInfo remoteInfo remoteFolder getFolderSyncInfo remoteInfo FolderSyncInfo VIRTUAL_DIRECTORY ICVSFolder cvsFolder CVSWorkspaceRoot getCVSFolderFor cvsFolder ICVSResourceVisitor visitFile ICVSFile CVSException visitFolder ICVSFolder CVSException isCVSFolder IResource getIResource FolderSyncInfo getFolderSyncInfo isSameMapping remoteInfo CVSException CheckoutIntoOperation mappingAlreadyExists remoteFolder getName targetFolder getIResource getFullPath toString getFullPath toString acceptChildren CVSException getStatus
private I Status scrub Folders ICVS Remote Folder remote Folder ICVS Folder target Folders I Progress Monitor monitor throws CVS Exception monitor begin Task null 100 target Folders length Prompt first before any work is done if target Folders length 1 set Involves Multiple Resources true for int i 0 i target Folders length i ICVS Folder target Folder target Folders i if needs Prompt For Overwrite target Folder Policy sub Monitor For monitor 50 prompt To Overwrite target Folder return new CVS Status I Status INFO Policy bind Checkout Into Operation cancelled remote Folder get Name NON NLS 1 for int i 0 i target Folders length i I Status status scrub Folder target Folders i Policy sub Monitor For monitor 50 if status isOK return status monitor done return OK  IStatus scrubFolders ICVSRemoteFolder remoteFolder ICVSFolder targetFolders IProgressMonitor CVSException beginTask targetFolders targetFolders setInvolvesMultipleResources targetFolders ICVSFolder targetFolder targetFolders needsPromptForOverwrite targetFolder subMonitorFor promptToOverwrite targetFolder CVSStatus IStatus CheckoutIntoOperation remoteFolder getName targetFolders IStatus scrubFolder targetFolders subMonitorFor
private boolean needs Prompt For Overwrite ICVS Folder target Folder I Progress Monitor monitor throws CVS Exception return target Folder is Modified monitor  needsPromptForOverwrite ICVSFolder targetFolder IProgressMonitor CVSException targetFolder isModified
private boolean prompt To Overwrite ICVS Folder folder return prompt To Overwrite Policy bind Checkout Operation confirm Overwrite NON NLS 1 Policy bind Checkout Into Operation overwrite Message folder get Name NON NLS 1  promptToOverwrite ICVSFolder promptToOverwrite CheckoutOperation confirmOverwrite CheckoutIntoOperation overwriteMessage getName
private I Status scrub Folder ICVS Folder folder I Progress Monitor monitor throws CVS Exception if folder exists folder isCVS Folder Unmanage first so we don t get outgoing deletions folder unmanage Policy sub Monitor For monitor 50 if folder exists folder delete return OK  IStatus scrubFolder ICVSFolder IProgressMonitor CVSException isCVSFolder subMonitorFor
private I Status checkout final ICVS Remote Folder remote Folder ICVS Folder parent Folder boolean recurse I Progress Monitor monitor throws CVS Exception Open a connection session to the repository monitor begin Task null 100 ICVS Repository Location repository remote Folder get Repository Session session new Session repository parent Folder try session open Policy sub Monitor For monitor 5 false read only Determine which local folders will be affected String local Name local Folder Name if local Name null I Path path new Path remote Folder get Repository Relative Path if path segment Count 1 local Name path last Segment ICVS Folder target Folders prepare Local Folders session remote Folder parent Folder local Name Policy sub Monitor For monitor 5 if target Folders null an error occured and has been added to the operation s error list return get Last Error Add recurse option List local Options new Array List if recurse local Options add Update DO NOT RECURSE if local Name null local Options add Checkout make Directory Name Option local Name Prune empty directories if pruning enabled if CVS Provider Plugin get Plugin get Prune Empty Directories local Options add Checkout PRUNE EMPTY DIRECTORIES Add the options related to the CVS Tag CVS Tag tag remote Folder get Tag if tag null A null tag in a remote resource indicates HEAD tag CVS Tag DEFAULT local Options add Update make Tag Option tag Perform the checkout I Status status Command CHECKOUT execute session Command NO GLOBAL OPTIONS Local Option local Options to Array new Local Option local Options size new String remote Folder get Repository Relative Path null Policy sub Monitor For monitor 80 if status isOK return status manage Folders target Folders repository get Location return OK finally session close  IStatus ICVSRemoteFolder remoteFolder ICVSFolder parentFolder IProgressMonitor CVSException beginTask ICVSRepositoryLocation remoteFolder getRepository parentFolder subMonitorFor localName localFolderName localName IPath remoteFolder getRepositoryRelativePath segmentCount localName lastSegment ICVSFolder targetFolders prepareLocalFolders remoteFolder parentFolder localName subMonitorFor targetFolders getLastError localOptions ArrayList localOptions DO_NOT_RECURSE localName localOptions makeDirectoryNameOption localName CVSProviderPlugin getPlugin getPruneEmptyDirectories localOptions PRUNE_EMPTY_DIRECTORIES CVSTag CVSTag remoteFolder getTag CVSTag localOptions makeTagOption IStatus NO_GLOBAL_OPTIONS LocalOption localOptions toArray LocalOption localOptions remoteFolder getRepositoryRelativePath subMonitorFor manageFolders targetFolders getLocation
private void manage Folders ICVS Folder target Folders String root throws CVS Exception for int i 0 i target Folders length i manage Folder target Folders i root  manageFolders ICVSFolder targetFolders CVSException targetFolders manageFolder targetFolders
private static void manage Folder ICVS Folder folder String root throws CVS Exception Ensure that the parent is a CVS folder ICVS Folder parent folder get Parent if parent isCVS Folder parent set Folder Sync Info new Folder Sync Info Folder Sync Info VIRTUAL DIRECTORY root CVS Tag DEFAULT true I Resource resource parent getI Resource if resource get Type I Resource PROJECT manage Folder parent root reset the folder sync info so it will be managed by it s parent folder set Folder Sync Info folder get Folder Sync Info  manageFolder ICVSFolder CVSException ICVSFolder getParent isCVSFolder setFolderSyncInfo FolderSyncInfo FolderSyncInfo VIRTUAL_DIRECTORY CVSTag IResource getIResource getType IResource manageFolder setFolderSyncInfo getFolderSyncInfo
private static void refresh Root I Container root I Progress Monitor monitor throws CVS Exception try I Project project root get Project CVS Team Provider provider CVS Team Provider Repository Provider get Provider project CVS Provider Plugin get Type Id if provider null ICVS Folder folder CVS Workspace Root getCVS Folder For project if folder isCVS Folder Register the project with Team Repository Provider map project CVS Provider Plugin get Type Id TODO This should be somewhere else provider CVS Team Provider Repository Provider get Provider project CVS Provider Plugin get Type Id provider set Watch Edit Enabled CVS Provider Plugin get Plugin is Watch Edit Enabled catch Team Exception e throw CVS Exception wrap Exception e  refreshRoot IContainer IProgressMonitor CVSException IProject getProject CVSTeamProvider CVSTeamProvider RepositoryProvider getProvider CVSProviderPlugin getTypeId ICVSFolder CVSWorkspaceRoot getCVSFolderFor isCVSFolder RepositoryProvider CVSProviderPlugin getTypeId CVSTeamProvider RepositoryProvider getProvider CVSProviderPlugin getTypeId setWatchEditEnabled CVSProviderPlugin getPlugin isWatchEditEnabled TeamException CVSException wrapException
public String get Name return get Task Name  getName getTaskName
protected I Scheduling Rule get Scheduling Rule try Use the project of the target folder as the scheduling rule return get Local Folder getI Resource get Project catch CVS Exception e CVSUI Plugin log e return null  ISchedulingRule getSchedulingRule getLocalFolder getIResource getProject CVSException CVSUIPlugin

public Checkout Multiple Projects Operation I Workbench Part part ICVS Remote Folder remote Folders String target Location super part remote Folders target Location has Target Location target Location null set Involves Multiple Resources remote Folders length 1  CheckoutMultipleProjectsOperation IWorkbenchPart ICVSRemoteFolder remoteFolders targetLocation remoteFolders targetLocation hasTargetLocation targetLocation setInvolvesMultipleResources remoteFolders
Return the target location where the given project should be located or null if the default location should be used param project protected I Path get Target Location For I Project project I Path target Location super get Target Location For project if target Location null return null return target Location append project get Name  IPath getTargetLocationFor IProject IPath targetLocation getTargetLocationFor targetLocation targetLocation getName
see org eclipse team internal ccvs ui operations Checkout Operation checkout org eclipse team internal ccvs core ICVS Remote Folder org eclipse core runtime I Progress Monitor protected I Status checkout ICVS Remote Folder folder I Progress Monitor monitor throws CVS Exception return checkout folder null monitor  CheckoutOperation ICVSRemoteFolder IProgressMonitor IStatus ICVSRemoteFolder IProgressMonitor CVSException

public abstract class Checkout Operation extends Remote Operation public Checkout Operation I Workbench Part part ICVS Remote Folder remote Folders super part remote Folders  CheckoutOperation RemoteOperation CheckoutOperation IWorkbenchPart ICVSRemoteFolder remoteFolders remoteFolders
see org eclipse team internal ccvs ui operations CVS Operation execute org eclipse core runtime I Progress Monitor public void execute I Progress Monitor monitor throws CVS Exception Interrupted Exception ICVS Remote Folder folders get Remote Folders checkout folders monitor  CVSOperation IProgressMonitor IProgressMonitor CVSException InterruptedException ICVSRemoteFolder getRemoteFolders
This method invokes code checkout ICVS Remote Folder I Progress Monitor code for each remote folder of the operation param folders the remote folders for the operation param monitor the progress monitor throws CVS Exception if an error occured that should prevent the remaining folders from being checked out protected void checkout ICVS Remote Folder folders I Progress Monitor monitor throws CVS Exception monitor begin Task null folders length 100 for int i 0 i folders length i ICVS Remote Folder folder folders i I Status result checkout folder Policy sub Monitor For monitor 100 collect Status result Policy check Canceled monitor monitor done  ICVSRemoteFolder IProgressMonitor CVSException ICVSRemoteFolder IProgressMonitor CVSException beginTask ICVSRemoteFolder IStatus subMonitorFor collectStatus checkCanceled
protected ICVS Remote Folder get Remote Folders return ICVS Remote Folder get Remote Resources  ICVSRemoteFolder getRemoteFolders ICVSRemoteFolder getRemoteResources
Checkout the selected remote folders in a form appropriate for the operation subclass param folders param monitor 
see org eclipse team internal ccvs ui operations CVS Operation can Run As Job public boolean can Run As Job return true  CVSOperation canRunAsJob canRunAsJob

private String target Location public Checkout Project Operation I Workbench Part part ICVS Remote Folder remote Folders String target Location super part remote Folders this target Location target Location  targetLocation CheckoutProjectOperation IWorkbenchPart ICVSRemoteFolder remoteFolders targetLocation remoteFolders targetLocation targetLocation
Create and open the project using a custom location if there is one param project param monitor throws CVS Exception protected void create And Open Project I Project project I Progress Monitor monitor throws CVS Exception try monitor begin Task null 5 I Project Description desc get Description For project if project exists if desc null project move desc true Policy sub Monitor For monitor 3 else if desc null create in default location project create Policy sub Monitor For monitor 3 else create in some other location project create desc Policy sub Monitor For monitor 3 if project is Open project open Policy sub Monitor For monitor 2 catch Core Exception e throw CVS Exception wrap Exception e finally monitor done  CVSException createAndOpenProject IProject IProgressMonitor CVSException beginTask IProjectDescription getDescriptionFor subMonitorFor subMonitorFor subMonitorFor isOpen subMonitorFor CoreException CVSException wrapException
protected I Project Description get Description For I Project project if target Location null return null String project Name project get Name I Project Description description Resources Plugin get Workspace new Project Description project Name description set Location get Target Location For project return description  IProjectDescription getDescriptionFor IProject targetLocation projectName getName IProjectDescription ResourcesPlugin getWorkspace newProjectDescription projectName setLocation getTargetLocationFor
Return the target location where the given project should be located or null if the default location should be used param project protected I Path get Target Location For I Project project if target Location null return null return new Path target Location  IPath getTargetLocationFor IProject targetLocation targetLocation
protected String get Remote Module Name ICVS Remote Folder resource String module Name if resource is Defined Module module Name resource get Name else module Name resource get Repository Relative Path return module Name  getRemoteModuleName ICVSRemoteFolder moduleName isDefinedModule moduleName getName moduleName getRepositoryRelativePath moduleName
else Eclipse Synchronizer get Instance run scheduling Rule new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception result 0 perform Checkout session resource target Projects send Module Name monitor  EclipseSynchronizer getInstance schedulingRule ICVSRunnable IProgressMonitor CVSException performCheckout targetProjects sendModuleName
protected I Status checkout final ICVS Remote Folder resource I Project project I Progress Monitor pm throws CVS Exception Get the location and the workspace root ICVS Folder root CVS Workspace Root getCVS Folder For Resources Plugin get Workspace get Root ICVS Repository Location repository resource get Repository Open a connection session to the repository final Session session new Session repository root pm begin Task null 100 Policy check Canceled pm session open Policy sub Monitor For pm 5 false read only try Check to see if the entire repo is being checked out if project null resource get Name equals NON NLS 1 No project was specified but we need on for this to work String name new Path resource get Repository get Root Directory last Segment project Resources Plugin get Workspace get Root get Project name Determine the local target projects either the project provider or the module expansions Note Module expansions can be run over the same connection as a checkout final I Project target Projects determine Projects session resource project Policy sub Monitor For pm 5 if target Projects null An error occurred and was recorded so return it return get Last Error else if target Projects length 0 return OK final boolean send Module Name project null final I Status result new I Status null I Scheduling Rule scheduling Rule get Scheduling Rule target Projects if scheduling Rule instanceof I Resource I Resource scheduling Rule get Type I Resource ROOT One of the projects is mapped to a provider that locks the workspace Just return the workspace root rule try Platform get Job Manager begin Rule scheduling Rule pm result 0 perform Checkout session resource target Projects send Module Name Policy sub Monitor For pm 90 finally Platform get Job Manager end Rule scheduling Rule else Eclipse Synchronizer get Instance run scheduling Rule new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception result 0 perform Checkout session resource target Projects send Module Name monitor Policy sub Monitor For pm 90 return result 0 catch CVS Exception e An exception occurred either during the module expansion or checkout Since we were able to make a connection return the status so the checkout of any other modules can proceed return e get Status finally session close pm done  IStatus ICVSRemoteFolder IProject IProgressMonitor CVSException ICVSFolder CVSWorkspaceRoot getCVSFolderFor ResourcesPlugin getWorkspace getRoot ICVSRepositoryLocation getRepository beginTask checkCanceled subMonitorFor getName getRepository getRootDirectory lastSegment ResourcesPlugin getWorkspace getRoot getProject IProject targetProjects determineProjects subMonitorFor targetProjects getLastError targetProjects sendModuleName IStatus IStatus ISchedulingRule schedulingRule getSchedulingRule targetProjects schedulingRule IResource IResource schedulingRule getType IResource getJobManager beginRule schedulingRule performCheckout targetProjects sendModuleName subMonitorFor getJobManager endRule schedulingRule EclipseSynchronizer getInstance schedulingRule ICVSRunnable IProgressMonitor CVSException performCheckout targetProjects sendModuleName subMonitorFor CVSException getStatus
private I Scheduling Rule get Scheduling Rule I Project projects if projects length 1 return Resources Plugin get Workspace get Rule Factory modify Rule projects 0 else Set rules new Hash Set for int i 0 i projects length i I Scheduling Rule modify Rule Resources Plugin get Workspace get Rule Factory modify Rule projects i if modify Rule instanceof I Resource I Resource modify Rule get Type I Resource ROOT One of the projects is mapped to a provider that locks the workspace Just return the workspace root rule return modify Rule rules add modify Rule return new Multi Rule I Scheduling Rule rules to Array new I Scheduling Rule rules size  ISchedulingRule getSchedulingRule IProject ResourcesPlugin getWorkspace getRuleFactory modifyRule HashSet ISchedulingRule modifyRule ResourcesPlugin getWorkspace getRuleFactory modifyRule modifyRule IResource IResource modifyRule getType IResource modifyRule modifyRule MultiRule ISchedulingRule toArray ISchedulingRule
private I Status perform Checkout Session session ICVS Remote Folder resource I Project target Projects boolean send Module Name I Progress Monitor pm throws CVS Exception Set the task name of the progress monitor to let the user know which project we re on Don t use sub Task since that will be changed when the checkout command is run String task Name if target Projects length 1 task Name Policy bind Checkout Project Operation 8 resource get Name target Projects 0 get Name NON NLS 1 else task Name Policy bind Checkout Project Operation 9 resource get Name String value Of target Projects length NON NLS 1 pm begin Task task Name 100 pm set Task Name task Name Policy check Canceled pm try Scrub the local contents if requested if perform Scrub Projects I Status result scrub Projects resource target Projects Policy sub Monitor For pm 9 if result isOK return result Determine if t in which case we ll use d to flatten the directory structure Only flatten the directory structure if the folder is not a root folder I Project project null if target Projects length 1 if send Module Name project target Projects 0 else if target Projects 0 get Name equals resource get Name The target project has the same name as the remote folder If the repository relative path has multiple segments we will want to flatten the directory structure String path resource get Repository Relative Path if path equals Folder Sync Info VIRTUAL DIRECTORY new Path path segment Count 1 project target Projects 0 try Build the local options List local Options new Array List Add the option to load into the target project if one was supplied if project null local Options add Checkout make Directory Name Option project get Name Prune empty directories if pruning enabled if CVS Provider Plugin get Plugin get Prune Empty Directories local Options add Checkout PRUNE EMPTY DIRECTORIES Add the options related to the CVS Tag CVS Tag tag resource get Tag if tag null A null tag in a remote resource indicates HEAD tag CVS Tag DEFAULT local Options add Update make Tag Option tag Perform the checkout I Status status Command CHECKOUT execute session Command NO GLOBAL OPTIONS Local Option local Options to Array new Local Option local Options size new String get Remote Module Name resource null Policy sub Monitor For pm 90 if status get Code CVS Status SERVER ERROR Any created projects will exist but will not be mapped to CVS return status finally Map the projects if they have CVS meta infomation even if a failure occurred refresh Projects target Projects Policy sub Monitor For pm 1 return OK finally pm done  IStatus performCheckout ICVSRemoteFolder IProject targetProjects sendModuleName IProgressMonitor CVSException subTask taskName targetProjects taskName CheckoutProjectOperation getName targetProjects getName taskName CheckoutProjectOperation getName valueOf targetProjects beginTask taskName setTaskName taskName checkCanceled performScrubProjects IStatus scrubProjects targetProjects subMonitorFor IProject targetProjects sendModuleName targetProjects targetProjects getName getName getRepositoryRelativePath FolderSyncInfo VIRTUAL_DIRECTORY segmentCount targetProjects localOptions ArrayList localOptions makeDirectoryNameOption getName CVSProviderPlugin getPlugin getPruneEmptyDirectories localOptions PRUNE_EMPTY_DIRECTORIES CVSTag CVSTag getTag CVSTag localOptions makeTagOption IStatus NO_GLOBAL_OPTIONS LocalOption localOptions toArray LocalOption localOptions getRemoteModuleName subMonitorFor getCode CVSStatus SERVER_ERROR refreshProjects targetProjects subMonitorFor
private I Project determine Projects Session session final ICVS Remote Folder remote Folder I Project project I Progress Monitor pm throws CVS Exception Set target Project Set new Hash Set String module Name get Remote Module Name remote Folder if project null Fetch the module expansions Policy check Canceled pm I Status status Request EXPAND MODULES execute session new String module Name pm if status get Code CVS Status SERVER ERROR collect Status status return null Convert the module expansions to local projects String expansions session get Module Expansions if expansions length 1 expansions 0 equals module Name For a remote folder use the last segment as the project to be created String last Segment new Path expansions 0 last Segment target Project Set add Resources Plugin get Workspace get Root get Project last Segment else for int j 0 j expansions length j target Project Set add Resources Plugin get Workspace get Root get Project new Path expansions j segment 0 else target Project Set add project Return the local projects affected by the checkout I Project target Projects I Project target Project Set to Array new I Project target Project Set size return target Projects  IProject determineProjects ICVSRemoteFolder remoteFolder IProject IProgressMonitor CVSException targetProjectSet HashSet moduleName getRemoteModuleName remoteFolder checkCanceled IStatus EXPAND_MODULES moduleName getCode CVSStatus SERVER_ERROR collectStatus getModuleExpansions moduleName lastSegment lastSegment targetProjectSet ResourcesPlugin getWorkspace getRoot getProject lastSegment targetProjectSet ResourcesPlugin getWorkspace getRoot getProject targetProjectSet IProject targetProjects IProject targetProjectSet toArray IProject targetProjectSet targetProjects
Return true if the target projects should be scrubbed before the checkout occurs Default is to scrub the projects Can be overridden by subclasses protected boolean perform Scrub Projects return true  performScrubProjects
private I Status scrub Projects ICVS Remote Folder remote Folder I Project projects I Progress Monitor monitor throws CVS Exception if projects null monitor done return OK Prompt first before any work is done if projects length 1 set Involves Multiple Resources true for int i 0 i projects length i I Project project projects i Policy check Canceled monitor if needs Prompt For Overwrite project prompt To Overwrite remote Folder project User said no to this project but not no to all return new CVS Status I Status INFO CVS Status CANCEL Policy bind Checkout Project Operation 0 remote Folder get Repository Relative Path NON NLS 1 Create the projects and remove any previous content monitor begin Task null projects length 100 NON NLS 1 for int i 0 i projects length i I Project project projects i create And Open Project project Policy sub Monitor For monitor 10 scrub Project project Policy sub Monitor For monitor 90 monitor done return OK  IStatus scrubProjects ICVSRemoteFolder remoteFolder IProject IProgressMonitor CVSException setInvolvesMultipleResources IProject checkCanceled needsPromptForOverwrite promptToOverwrite remoteFolder CVSStatus IStatus CVSStatus CheckoutProjectOperation remoteFolder getRepositoryRelativePath beginTask IProject createAndOpenProject subMonitorFor scrubProject subMonitorFor
private void scrub Project I Project project I Progress Monitor monitor throws CVS Exception try unmap the project from any previous repository provider if Repository Provider get Provider project null Repository Provider unmap project We do not want to delete the project to avoid a project deletion delta We do not want to delete the project to avoid core exceptions I Resource children project members I Container INCLUDE TEAM PRIVATE MEMBERS Policy check Canceled monitor monitor begin Task null 100 children length 100 monitor sub Task Policy bind Checkout Operation scrubbing Project project get Name NON NLS 1 try for int j 0 j children length j if children j get Name equals project NON NLS 1 children j delete true force Policy sub Monitor For monitor 100 Make sure there is no sync info cached for the project since a reader thread may have caused it to be loaded since the unmap Eclipse Synchronizer get Instance flush project true Policy sub Monitor For monitor 100 finally monitor done catch Team Exception e throw CVS Exception wrap Exception e catch Core Exception e throw CVS Exception wrap Exception e  scrubProject IProject IProgressMonitor CVSException RepositoryProvider getProvider RepositoryProvider IResource IContainer INCLUDE_TEAM_PRIVATE_MEMBERS checkCanceled beginTask subTask CheckoutOperation scrubbingProject getName getName subMonitorFor EclipseSynchronizer getInstance subMonitorFor TeamException CVSException wrapException CoreException CVSException wrapException
protected boolean needs Prompt For Overwrite I Project project First check the description location I Project Description desc get Description For project if desc null File local Location desc get Location to File if local Location exists return true Next check if the resource itself exists if project exists return true Finally check if the location in the workspace exists File local Location get File Location project if local Location exists return true The target doesn t exist return false  needsPromptForOverwrite IProject IProjectDescription getDescriptionFor localLocation getLocation toFile localLocation localLocation getFileLocation localLocation
protected File get File Location I Project project return new File project get Parent get Location to File project get Name  getFileLocation IProject getParent getLocation toFile getName
private boolean prompt To Overwrite ICVS Remote Folder remote Folder I Project project First if the project exists in the workspace prompt if project exists if prompt To Overwrite Policy bind Checkout Operation confirm Overwrite NON NLS 1 Policy bind Checkout Operation this Resource Exists project get Name get Remote Module Name remote Folder NON NLS 1 return false Even if the project exists check the target location I Path path get Target Location For project File local Location null if path null try There is no custom location However still prompt if the project directory in the workspace directory would be overwritten if project exists project is Open project get Description get Location null local Location get File Location project catch Core Exception e CVSUI Plugin log e else local Location path to File if local Location null local Location exists try return prompt To Overwrite Policy bind Checkout Operation confirm Overwrite NON NLS 1 Policy bind Checkout Operation this External File Exists local Location get Canonical Path get Remote Module Name remote Folder NON NLS 1 catch IO Exception e CVSUI Plugin log CVS Exception wrap Exception e return true  promptToOverwrite ICVSRemoteFolder remoteFolder IProject promptToOverwrite CheckoutOperation confirmOverwrite CheckoutOperation thisResourceExists getName getRemoteModuleName remoteFolder IPath getTargetLocationFor localLocation isOpen getDescription getLocation localLocation getFileLocation CoreException CVSUIPlugin localLocation toFile localLocation localLocation promptToOverwrite CheckoutOperation confirmOverwrite CheckoutOperation thisExternalFileExists localLocation getCanonicalPath getRemoteModuleName remoteFolder IOException CVSUIPlugin CVSException wrapException
protected String get Overwrite Prompt Message ICVS Remote Folder remote Folder I Project project if project exists return Policy bind Checkout Operation this Resource Exists project get Name get Remote Module Name remote Folder NON NLS 1 else return Policy bind Checkout Operation this External File Exists project get Name get Remote Module Name remote Folder NON NLS 1  getOverwritePromptMessage ICVSRemoteFolder remoteFolder IProject CheckoutOperation thisResourceExists getName getRemoteModuleName remoteFolder CheckoutOperation thisExternalFileExists getName getRemoteModuleName remoteFolder
private void refresh Projects I Project projects I Progress Monitor monitor throws CVS Exception monitor begin Task null projects length 100 try for int i 0 i projects length i I Project project projects i Register the project with Team try monitor sub Task Policy bind Checkout Operation refreshing Project project get Name NON NLS 1 ICVS Folder folder CVS Workspace Root getCVS Folder For project if folder isCVS Folder Repository Provider map project CVS Provider Plugin get Type Id catch Team Exception e throw CVS Exception wrap Exception e CVS Team Provider provider CVS Team Provider Repository Provider get Provider project CVS Provider Plugin get Type Id if provider null provider set Watch Edit Enabled CVS Provider Plugin get Plugin is Watch Edit Enabled finally monitor done  refreshProjects IProject IProgressMonitor CVSException beginTask IProject subTask CheckoutOperation refreshingProject getName ICVSFolder CVSWorkspaceRoot getCVSFolderFor isCVSFolder RepositoryProvider CVSProviderPlugin getTypeId TeamException CVSException wrapException CVSTeamProvider CVSTeamProvider RepositoryProvider getProvider CVSProviderPlugin getTypeId setWatchEditEnabled CVSProviderPlugin getPlugin isWatchEditEnabled
protected String get Task Name ICVS Remote Folder remote Folders get Remote Folders if remote Folders length 1 return Policy bind Checkout Single Project Operation taskname remote Folders 0 get Name NON NLS 1 else return Policy bind Checkout Multiple Projects Operation task Name new Integer remote Folders length to String NON NLS 1  getTaskName ICVSRemoteFolder remoteFolders getRemoteFolders remoteFolders CheckoutSingleProjectOperation remoteFolders getName CheckoutMultipleProjectsOperation taskName remoteFolders toString

public Checkout Single Project Operation I Workbench Part part ICVS Remote Folder remote Folder I Project target Project String target Location boolean preconfigured super part new ICVS Remote Folder remote Folder target Location this target Project target Project this preconfigured preconfigured  CheckoutSingleProjectOperation IWorkbenchPart ICVSRemoteFolder remoteFolder IProject targetProject targetLocation ICVSRemoteFolder remoteFolder targetLocation targetProject targetProject
private boolean is Preconfigured return preconfigured  isPreconfigured
public boolean needs Prompt For Overwrite I Project project No need to prompt if the project was preconfigured if is Preconfigured return false return super needs Prompt For Overwrite project  needsPromptForOverwrite IProject isPreconfigured needsPromptForOverwrite
see org eclipse team internal ccvs ui operations Checkout Project Operation perform Scrub Projects protected boolean perform Scrub Projects Do not scrub the projects if they were preconfigured return is Preconfigured  CheckoutProjectOperation performScrubProjects performScrubProjects isPreconfigured
see org eclipse team internal ccvs ui operations Checkout Operation checkout org eclipse team internal ccvs core ICVS Remote Folder org eclipse core runtime I Progress Monitor protected I Status checkout ICVS Remote Folder folder I Progress Monitor monitor throws CVS Exception return checkout folder target Project monitor  CheckoutOperation ICVSRemoteFolder IProgressMonitor IStatus ICVSRemoteFolder IProgressMonitor CVSException targetProject

public class Created Response Handler extends Updated Handler public Created Response Handler super Updated Handler HANDLE CREATED  CreatedResponseHandler UpdatedHandler CreatedResponseHandler UpdatedHandler HANDLE_CREATED
protected void receive Target File Session session ICVS File m File String entry Line Date mod Time boolean binary boolean read Only I Progress Monitor monitor throws CVS Exception if m File instanceof Remote File Remote File m File about To Receive Contents entry Line get Bytes super receive Target File session m File entry Line mod Time binary read Only monitor Remote File m File done Receiving Contents else super receive Target File session m File entry Line mod Time binary read Only monitor  receiveTargetFile ICVSFile mFile entryLine modTime readOnly IProgressMonitor CVSException mFile RemoteFile RemoteFile mFile aboutToReceiveContents entryLine getBytes receiveTargetFile mFile entryLine modTime readOnly RemoteFile mFile doneReceivingContents receiveTargetFile mFile entryLine modTime readOnly
protected I Status command Finished Session session Global Option global Options Local Option local Options ICVS Resource resources I Progress Monitor monitor I Status status throws CVS Exception Don t do anything i e don t prune return status  IStatus commandFinished GlobalOption globalOptions LocalOption localOptions ICVSResource IProgressMonitor IStatus CVSException
protected I Status do Execute Session session Global Option global Options Local Option local Options String arguments I Command Output Listener listener I Progress Monitor monitor throws CVS Exception Response Handler new Created new Created Response Handler Response Handler old Created session get Response Handler new Created get ResponseID session register Response Handler new Created try return super do Execute session global Options local Options arguments listener monitor finally session register Response Handler old Created  IStatus doExecute GlobalOption globalOptions LocalOption localOptions ICommandOutputListener IProgressMonitor CVSException ResponseHandler newCreated CreatedResponseHandler ResponseHandler oldCreated getResponseHandler newCreated getResponseID registerResponseHandler newCreated doExecute globalOptions localOptions registerResponseHandler oldCreated
public static ICVS Remote Folder checkout Remote Folder I Workbench Part part ICVS Remote Folder folder I Progress Monitor monitor throws CVS Exception Invocation Target Exception Interrupted Exception Checkout To Remote Folder Operation op new Checkout To Remote Folder Operation part folder op run monitor return op get Resulting Folder  ICVSRemoteFolder checkoutRemoteFolder IWorkbenchPart ICVSRemoteFolder IProgressMonitor CVSException InvocationTargetException InterruptedException CheckoutToRemoteFolderOperation CheckoutToRemoteFolderOperation getResultingFolder
return op get Resulting Folder public Checkout To Remote Folder Operation I Workbench Part part ICVS Remote Folder remote Folder super part new ICVS Remote Folder remote Folder  getResultingFolder CheckoutToRemoteFolderOperation IWorkbenchPart ICVSRemoteFolder remoteFolder ICVSRemoteFolder remoteFolder
protected I Status checkout ICVS Remote Folder folder I Progress Monitor monitor throws CVS Exception I Path sandbox Path new Path folder get Repository Relative Path remove Last Segments 1 String path String if sandbox Path is Empty path String ICVS Remote Folder REPOSITORY ROOT FOLDER NAME else path String sandbox Path to String sandbox new Remote Folder Sandbox null folder get Repository path String folder get Tag return checkout folder sandbox monitor  IStatus ICVSRemoteFolder IProgressMonitor CVSException IPath sandboxPath getRepositoryRelativePath removeLastSegments pathString sandboxPath isEmpty pathString ICVSRemoteFolder REPOSITORY_ROOT_FOLDER_NAME pathString sandboxPath toString RemoteFolderSandbox getRepository pathString getTag
see org eclipse team internal ccvs ui operations CVS Operation get Task Name protected String get Task Name return Policy bind Checkout To Remote Folder Operation 0 get Remote Folders 0 get Name NON NLS 1  CVSOperation getTaskName getTaskName CheckoutToRemoteFolderOperation getRemoteFolders getName
protected I Status checkout final ICVS Remote Folder resource final ICVS Folder sandbox I Progress Monitor pm throws CVS Exception Get the location and the workspace root ICVS Repository Location repository resource get Repository Open a connection session to the repository final Session session new Session repository sandbox pm begin Task null 100 Policy check Canceled pm session open Policy sub Monitor For pm 5 false read only try Build the local options List local Options new Array List Add the options related to the CVS Tag CVS Tag tag resource get Tag if tag null A null tag in a remote resource indicates HEAD tag CVS Tag DEFAULT local Options add Update make Tag Option tag local Options add Checkout make Directory Name Option resource get Name Perform the checkout I Status status new Sandbox Checkout execute session Command NO GLOBAL OPTIONS Local Option local Options to Array new Local Option local Options size new String resource get Repository Relative Path null Policy sub Monitor For pm 90 if status get Code CVS Status SERVER ERROR Any created projects will exist but will not be mapped to CVS return status return OK catch CVS Exception e An exception occurred either during the module expansion or checkout Since we were able to make a connection return the status so the checkout of any other modules can proceed return e get Status finally session close pm done  IStatus ICVSRemoteFolder ICVSFolder IProgressMonitor CVSException ICVSRepositoryLocation getRepository beginTask checkCanceled subMonitorFor localOptions ArrayList CVSTag CVSTag getTag CVSTag localOptions makeTagOption localOptions makeDirectoryNameOption getName IStatus SandboxCheckout NO_GLOBAL_OPTIONS LocalOption localOptions toArray LocalOption localOptions getRepositoryRelativePath subMonitorFor getCode CVSStatus SERVER_ERROR CVSException getStatus
public ICVS Remote Folder get Resulting Folder throws CVS Exception return ICVS Remote Folder sandbox get Folder get Remote Folders 0 get Name  ICVSRemoteFolder getResultingFolder CVSException ICVSRemoteFolder getFolder getRemoteFolders getName

public class Commit Operation extends Single Command Operation public Commit Operation I Workbench Part part I Resource resources Local Option options super part resources options  CommitOperation SingleCommandOperation CommitOperation IWorkbenchPart IResource LocalOption
Perform prompting for unadded resources and comment param monitor a progess monitor return code true code if execution should continue public boolean perform Prompting I Progress Monitor monitor throws CVS Exception Invocation Target Exception Interrupted Exception monitor begin Task null 20 I Resource resources To Be Added prompt For Resources To Be Added Policy sub Monitor For monitor 10 String comment prompt For Comment get Resources if comment null return false add Local Option Commit make Argument Option Command MESSAGE OPTION comment if resources To Be Added length 0 new Add Operation get Part resources To Be Added run Policy sub Monitor For monitor 10 set Resources get Shared Resources get Resources monitor done return true  performPrompting IProgressMonitor CVSException InvocationTargetException InterruptedException beginTask IResource resourcesToBeAdded promptForResourcesToBeAdded subMonitorFor promptForComment getResources addLocalOption makeArgumentOption MESSAGE_OPTION resourcesToBeAdded AddOperation getPart resourcesToBeAdded subMonitorFor setResources getSharedResources getResources
public void execute I Progress Monitor monitor throws CVS Exception Interrupted Exception Ensure that a comment has been provided if Command MESSAGE OPTION is Element Of get Local Options String comment prompt For Comment get Resources if comment null return add Local Option Commit make Argument Option Command MESSAGE OPTION comment super execute monitor  IProgressMonitor CVSException InterruptedException MESSAGE_OPTION isElementOf getLocalOptions promptForComment getResources addLocalOption makeArgumentOption MESSAGE_OPTION
protected I Status execute Command Session session CVS Team Provider provider ICVS Resource resources I Progress Monitor monitor throws CVS Exception Interrupted Exception return Command COMMIT execute session Command NO GLOBAL OPTIONS get Local Options resources null monitor  IStatus executeCommand CVSTeamProvider ICVSResource IProgressMonitor CVSException InterruptedException NO_GLOBAL_OPTIONS getLocalOptions
protected void handle Errors I Status errors throws CVS Exception We are only concerned with server errors List server Errors new Array List for int i 0 i errors length i I Status status errors i if status get Code CVS Status SERVER ERROR server Errors add status if server Errors is Empty return super handle Errors I Status server Errors to Array new I Status server Errors size  handleErrors IStatus CVSException serverErrors ArrayList IStatus getCode CVSStatus SERVER_ERROR serverErrors serverErrors isEmpty handleErrors IStatus serverErrors toArray IStatus serverErrors
see org eclipse team internal ccvs ui operations CVS Operation get Task Name protected String get Task Name return Policy bind Repository Manager committing NON NLS 1  CVSOperation getTaskName getTaskName RepositoryManager
see org eclipse team internal ccvs ui operations Repository Provider Operation get Task Name org eclipse team internal ccvs core CVS Team Provider protected String get Task Name CVS Team Provider provider return Policy bind Commit Operation 0 provider get Project get Name NON NLS 1  RepositoryProviderOperation getTaskName CVSTeamProvider getTaskName CVSTeamProvider CommitOperation getProject getName
see org eclipse team internal ccvs ui operations CVS Operation get Error Message org eclipse core runtime I Status int protected String get Error Message I Status failures int total Operations return Policy bind Commit Action commit Failed NON NLS 1  CVSOperation getErrorMessage IStatus getErrorMessage IStatus totalOperations CommitAction commitFailed
resource accept new I Resource Visitor public boolean visit I Resource resource throws Core Exception ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource skip ignored resources and their children try if cvs Resource is Ignored return false visit the children of shared resources if cvs Resource is Managed return true if cvs Resource is Folder ICVS Folder cvs Resource isCVS Folder return true catch CVS Exception e exception 0 e don t add folders to avoid comitting empty folders if resource get Type I Resource FOLDER return true file is unshared so record it unadded add resource no need to go into children because add is deep return false  IResourceVisitor IResource CoreException ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor cvsResource isIgnored cvsResource isManaged cvsResource isFolder ICVSFolder cvsResource isCVSFolder CVSException getType IResource
private I Resource get Unadded Resources I Resource resources I Progress Monitor i Progress Monitor throws CVS Exception final List unadded new Array List final CVS Exception exception new CVS Exception null for int i 0 i resources length i I Resource resource resources i visit each resource deeply try resource accept new I Resource Visitor public boolean visit I Resource resource throws Core Exception ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource skip ignored resources and their children try if cvs Resource is Ignored return false visit the children of shared resources if cvs Resource is Managed return true if cvs Resource is Folder ICVS Folder cvs Resource isCVS Folder return true catch CVS Exception e exception 0 e don t add folders to avoid comitting empty folders if resource get Type I Resource FOLDER return true file is unshared so record it unadded add resource no need to go into children because add is deep return false catch Core Exception e throw CVS Exception wrap Exception e if exception 0 null throw exception 0 return I Resource unadded to Array new I Resource unadded size  IResource getUnaddedResources IResource IProgressMonitor iProgressMonitor CVSException ArrayList CVSException CVSException IResource IResourceVisitor IResource CoreException ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor cvsResource isIgnored cvsResource isManaged cvsResource isFolder ICVSFolder cvsResource isCVSFolder CVSException getType IResource CoreException CVSException wrapException IResource toArray IResource
protected I Resource prompt For Resources To Be Added I Progress Monitor monitor throws CVS Exception I Resource unadded get Unadded Resources get Resources monitor Repository Manager manager CVSUI Plugin get Plugin get Repository Manager return manager prompt For Resources To Be Added get Shell unadded  IResource promptForResourcesToBeAdded IProgressMonitor CVSException IResource getUnaddedResources getResources RepositoryManager CVSUIPlugin getPlugin getRepositoryManager promptForResourcesToBeAdded getShell
protected String prompt For Comment I Resource resources To Commit Repository Manager manager CVSUI Plugin get Plugin get Repository Manager return manager prompt For Comment get Shell resources To Commit  promptForComment IResource resourcesToCommit RepositoryManager CVSUIPlugin getPlugin getRepositoryManager promptForComment getShell resourcesToCommit
private I Resource get Shared Resources I Resource resources throws CVS Exception List shared new Array List for int i 0 i resources length i I Resource resource resources i ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource if cvs Resource is Managed cvs Resource is Folder ICVS Folder cvs Resource isCVS Folder shared add resource return I Resource shared to Array new I Resource shared size  IResource getSharedResources IResource CVSException ArrayList IResource ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor cvsResource isManaged cvsResource isFolder ICVSFolder cvsResource isCVSFolder IResource toArray IResource
see org eclipse team internal ccvs ui operations Single Command Operation is Server Modification Operation protected boolean is Server Modification Operation return true  SingleCommandOperation isServerModificationOperation isServerModificationOperation

private boolean confirm Overwrite true protected CVS Operation I Workbench Part part super part  confirmOverwrite CVSOperation IWorkbenchPart
see org eclipse team internal ui actions Team Operation get Job Name protected String get Job Name return get Task Name  TeamOperation getJobName getJobName getTaskName
protected URL get Operation Icon URL url null try URL baseURL CVSUI Plugin get Plugin get Descriptor get InstallURL return new URL baseURL ICVSUI Constants ICON PATH ICVSUI Constants IMG CVS PERSPECTIVE catch MalformedURL Exception e return null  getOperationIcon CVSUIPlugin getPlugin getDescriptor getInstallURL ICVSUIConstants ICON_PATH ICVSUIConstants IMG_CVS_PERSPECTIVE MalformedURLException
public final void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception start Operation try monitor Policy monitor For monitor monitor begin Task null 100 monitor set Task Name get Task Name execute Policy sub Monitor For monitor 100 end Operation catch CVS Exception e TODO errors may not be empty i e end Operation has not been executed throw new Invocation Target Exception e finally monitor done  IProgressMonitor InvocationTargetException InterruptedException startOperation monitorFor beginTask setTaskName getTaskName subMonitorFor endOperation CVSException endOperation InvocationTargetException
protected void start Operation status Count 0 reset Errors confirm Overwrite true  startOperation statusCount resetErrors confirmOverwrite
protected void end Operation throws CVS Exception handle Errors I Status errors to Array new I Status errors size  endOperation CVSException handleErrors IStatus toArray IStatus
Subclasses must override this method to perform the operation Clients should never call this method directly param monitor throws CVS Exception throws Interrupted Exception  CVSException InterruptedException
protected void add Error I Status status if status isOK return if is Last Error status return errors add status  addError IStatus isLastError
protected void collect Status I Status status if is Last Error status return status Count if status isOK add Error status  collectStatus IStatus isLastError statusCount addError
protected void reset Errors errors clear status Count 0  resetErrors statusCount
Get the last error taht occured This can be useful when a method has a return type but wants to signal an error The method in question can add the error using code add Error I Status code and return null The caller can then query the error using this method Also code add Error I Status code will not add the error if it is already on the end of the list using identity comparison which allows the caller to still perform a code collect Status I Status code to get a valid operation count return protected I Status get Last Error Assert is True errors size 0 I Status status I Status errors get errors size 1 return status  addError IStatus addError IStatus collectStatus IStatus IStatus getLastError isTrue IStatus IStatus
private boolean is Last Error I Status status return errors size 0 get Last Error status  isLastError IStatus getLastError
protected void handle Errors I Status errors throws CVS Exception if errors length 0 return if errors length 1 status Count 1 throw new CVS Exception errors 0 Multi Status result new Multi Status CVSUI Plugin ID 0 get Error Message errors status Count null for int i 0 i errors length i I Status s errors i if s is Multi Status result add new CVS Status s get Severity s get Message s get Exception result add All s else result add s throw new CVS Exception result  handleErrors IStatus CVSException statusCount CVSException MultiStatus MultiStatus CVSUIPlugin getErrorMessage statusCount IStatus isMultiStatus CVSStatus getSeverity getMessage getException addAll CVSException
protected String get Error Message I Status failures int total Operations return Policy bind CVS Operation 0 String value Of failures length String value Of total Operations NON NLS 1  getErrorMessage IStatus totalOperations CVSOperation valueOf valueOf totalOperations
new Runnable public void run Message Dialog dialog new Message Dialog display Shell title null msg Message Dialog QUESTION buttons 0 dialog open code 0 dialog get Return Code  MessageDialog MessageDialog displayShell MessageDialog getReturnCode
This method prompts the user to overwrite an existing resource It uses the code involves Multiple Resources code to determine what buttons to show param project return protected boolean prompt To Overwrite final String title final String msg if confirm Overwrite return true final String buttons if involves Multiple Resources buttons new String I Dialog Constants YES LABEL I Dialog Constants YES TO ALL LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL else buttons new String I Dialog Constants OK LABEL I Dialog Constants CANCEL LABEL final Shell display Shell get Shell if display Shell null We couldn t get a shell perhaps due to shutdown return false run in sync Exec because callback is from an operation which is probably not running in the UI thread final int code new int 0 display Shell get Display sync Exec new Runnable public void run Message Dialog dialog new Message Dialog display Shell title null msg Message Dialog QUESTION buttons 0 dialog open code 0 dialog get Return Code if involves Multiple Resources switch code 0 case 0 Yes return true case 1 Yes to all confirm Overwrite false return true case 2 No return false case 3 Cancel default throw new Operation Canceled Exception else return code 0 0  involvesMultipleResources promptToOverwrite confirmOverwrite involvesMultipleResources IDialogConstants YES_LABEL IDialogConstants YES_TO_ALL_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL IDialogConstants OK_LABEL IDialogConstants CANCEL_LABEL displayShell getShell displayShell syncExec displayShell getDisplay syncExec MessageDialog MessageDialog displayShell MessageDialog getReturnCode involvesMultipleResources confirmOverwrite OperationCanceledException
This method is used by code prompt To Overwrite code to determine which buttons to show in the prompter return protected boolean involves Multiple Resources return involves Multiple Resources  promptToOverwrite involvesMultipleResources involvesMultipleResources
public void set Involves Multiple Resources boolean b involves Multiple Resources b  setInvolvesMultipleResources involvesMultipleResources
Return the string that is to be used as the task name for the operation param remote Folders return  remoteFolders
Return true if any of the accumulated status have a severity of ERROR return protected boolean errors Occurred for Iterator iter errors iterator iter has Next I Status status I Status iter next if status get Severity I Status ERROR return true return false  errorsOccurred hasNext IStatus IStatus getSeverity IStatus
protected Shell get Shell Use the shell assigned to the operation if possible if shell null shell is Disposed return shell return super get Shell  getShell isDisposed getShell
Set the shell to be used by the operation This only needs to be done if the operation does not have a workbench part For example if the operation is being run in a wizard param shell The shell to set public void set Shell Shell shell this shell shell  setShell
see org eclipse team ui Team Operation can Run As Job protected boolean can Run As Job Put CVS jobs in the background by default return true  TeamOperation canRunAsJob canRunAsJob

private boolean unmanage public Disconnect Operation I Workbench Part part I Project projects boolean unmanage super part projects this unmanage unmanage  DisconnectOperation IWorkbenchPart IProject
protected void execute CVS Team Provider provider I Resource resources I Progress Monitor monitor throws CVS Exception Interrupted Exception This method will be invoked for each provider being disconnected I Project project provider get Project try Repository Provider unmap project catch Team Exception e throw CVS Exception wrap Exception e if unmanage ICVS Folder cvs Folder CVS Workspace Root getCVS Folder For project cvs Folder unmanage monitor Eclipse Synchronizer get Instance deconfigure project monitor  CVSTeamProvider IResource IProgressMonitor CVSException InterruptedException IProject getProject RepositoryProvider TeamException CVSException wrapException ICVSFolder cvsFolder CVSWorkspaceRoot getCVSFolderFor cvsFolder EclipseSynchronizer getInstance
see org eclipse team internal ccvs ui operations CVS Operation get Task Name protected String get Task Name return Policy bind Disconnect Operation 0 NON NLS 1  CVSOperation getTaskName getTaskName DisconnectOperation
see org eclipse team internal ccvs ui operations Repository Provider Operation get Task Name org eclipse team internal ccvs core CVS Team Provider protected String get Task Name CVS Team Provider provider return Policy bind Disconnect Operation 1 provider get Project get Name NON NLS 1  RepositoryProviderOperation getTaskName CVSTeamProvider getTaskName CVSTeamProvider DisconnectOperation getProject getName
see org eclipse team internal ccvs ui operations CVS Operation can Run As Job public boolean can Run As Job Do not run in the background return false  CVSOperation canRunAsJob canRunAsJob

public static class Remote Folder Filter public ICVS Remote Resource filter ICVS Remote Resource resource return resource  RemoteFolderFilter ICVSRemoteResource ICVSRemoteResource
List unsent new Array List long interval Start protected Internal Remote Folder Member Fetcher Remote Folder parent Folder CVS Tag tag super parent Folder tag  ArrayList intervalStart InternalRemoteFolderMemberFetcher RemoteFolder parentFolder CVSTag parentFolder
protected void parent Does Not Exist super parent Does Not Exist Indicate that there are no children collector add new Object 0 get Progress Monitor  parentDoesNotExist parentDoesNotExist getProgressMonitor
protected Remote Folder record Folder String name Remote Folder folder super record Folder name unsent add folder if is Time To Send send Folders return folder  RemoteFolder recordFolder RemoteFolder recordFolder isTimeToSend sendFolders
return folder private boolean is Time To Send long current Time System current Time Millis return current Time interval Start send Increment unsent size send Increment  isTimeToSend currentTime currentTimeMillis currentTime intervalStart sendIncrement sendIncrement
protected I Status perform Update I Progress Monitor progress CVS Tag tag throws CVS Exception interval Start System current Time Millis I Status status super perform Update progress tag send Folders return status  IStatus performUpdate IProgressMonitor CVSTag CVSException intervalStart currentTimeMillis IStatus performUpdate sendFolders
return status protected void update File Revisions ICVS File files I Progress Monitor monitor throws CVS Exception super update File Revisions files monitor send Files  updateFileRevisions ICVSFile IProgressMonitor CVSException updateFileRevisions sendFiles
private void send Folders update Parent Folder Children collector add filter filter ICVS Remote Folder unsent to Array new ICVS Remote Folder unsent size get Progress Monitor unsent clear interval Start System current Time Millis  sendFolders updateParentFolderChildren ICVSRemoteFolder toArray ICVSRemoteFolder getProgressMonitor intervalStart currentTimeMillis
interval Start System current Time Millis private void send Files collector add get Files get Progress Monitor unsent clear  intervalStart currentTimeMillis sendFiles getFiles getProgressMonitor
unsent clear private I Progress Monitor get Progress Monitor return null  IProgressMonitor getProgressMonitor
public Fetch Members Operation I Workbench Part part ICVS Remote Folder folder I Element Collector collector super part new ICVS Remote Resource folder this collector collector  FetchMembersOperation IWorkbenchPart ICVSRemoteFolder IElementCollector ICVSRemoteResource
protected void execute I Progress Monitor monitor throws CVS Exception Interrupted Exception ICVS Remote Folder remote get Remote Folder if remote get Class equals Remote Folder class monitor Policy monitor For monitor boolean is Root remote get Name equals ICVS Remote Folder REPOSITORY ROOT FOLDER NAME monitor begin Task null 100 is Root 30 0 Remote Folder Member Fetcher fetcher new Internal Remote Folder Member Fetcher Remote Folder remote remote get Tag fetcher fetch Members Policy sub Monitor For monitor 100 if is Root ICVS Remote Resource modules CVSUI Plugin get Plugin get Repository Manager get Repository Root For remote get Repository get Defined Modules remote get Tag Policy sub Monitor For monitor 25 collector add filter filter modules Policy sub Monitor For monitor 5 else monitor Policy monitor For monitor try monitor begin Task null 100 ICVS Remote Resource children remote members Policy sub Monitor For monitor 95 collector add children Policy sub Monitor For monitor 5 catch Team Exception e throw CVS Exception wrap Exception e finally monitor done  IProgressMonitor CVSException InterruptedException ICVSRemoteFolder getRemoteFolder getClass RemoteFolder monitorFor isRoot getName ICVSRemoteFolder REPOSITORY_ROOT_FOLDER_NAME beginTask isRoot RemoteFolderMemberFetcher InternalRemoteFolderMemberFetcher RemoteFolder getTag fetchMembers subMonitorFor isRoot ICVSRemoteResource CVSUIPlugin getPlugin getRepositoryManager getRepositoryRootFor getRepository getDefinedModules getTag subMonitorFor subMonitorFor monitorFor beginTask ICVSRemoteResource subMonitorFor subMonitorFor TeamException CVSException wrapException
see org eclipse team internal ccvs ui operations CVS Operation get Task Name protected String get Task Name return Policy bind Fetch Members Operation 0 get Remote Folder get Name NON NLS 1  CVSOperation getTaskName getTaskName FetchMembersOperation getRemoteFolder getName
private ICVS Remote Folder get Remote Folder return ICVS Remote Folder get Remote Resources 0  ICVSRemoteFolder getRemoteFolder ICVSRemoteFolder getRemoteResources
public Remote Folder Filter get Filter return filter  RemoteFolderFilter getFilter
public void set Filter Remote Folder Filter filter this filter filter  setFilter RemoteFolderFilter

public static boolean has Meta File I Workbench Part part ICVS Remote Folder remote Folder throws Invocation Target Exception Interrupted Exception Has Project Meta File Operation op new Has Project Meta File Operation part remote Folder op run return op meta File Exists  hasMetaFile IWorkbenchPart ICVSRemoteFolder remoteFolder InvocationTargetException InterruptedException HasProjectMetaFileOperation HasProjectMetaFileOperation remoteFolder metaFileExists
public Has Project Meta File Operation I Workbench Part part ICVS Remote Folder remote Folder super part this remote Folder remote Folder  HasProjectMetaFileOperation IWorkbenchPart ICVSRemoteFolder remoteFolder remoteFolder remoteFolder
private boolean has Meta File ICVS Remote Folder folder I Progress Monitor monitor throws CVS Exception make a copy of the folder so that we will not effect the original folder when we refetch the members TODO this is a strange thing to need to do We shold fix this folder ICVS Remote Folder folder for Tag remote Folder get Tag try folder members monitor catch Team Exception e throw CVS Exception wrap Exception e Check for the existance of the project file try folder get File project NON NLS 1 return true catch Team Exception e We couldn t retrieve the meta file so assume it doesn t exist return false  hasMetaFile ICVSRemoteFolder IProgressMonitor CVSException ICVSRemoteFolder forTag remoteFolder getTag TeamException CVSException wrapException getFile TeamException
see org eclipse team internal ccvs ui operations CVS Operation execute org eclipse core runtime I Progress Monitor public void execute I Progress Monitor monitor throws CVS Exception Interrupted Exception meta File Exists has Meta File remote Folder monitor  CVSOperation IProgressMonitor IProgressMonitor CVSException InterruptedException metaFileExists hasMetaFile remoteFolder
Return true if the meta file exists remotely This method should only be invoked after the operation has been executed return public boolean meta File Exists return meta File Exists  metaFileExists metaFileExists
protected String get Task Name return Policy bind Has Project Meta File task Name NON NLS 1  getTaskName HasProjectMetaFile taskName
see org eclipse team internal ccvs ui operations CVS Operation can Run As Job public boolean can Run As Job This operation should never be run in the background return false  CVSOperation canRunAsJob canRunAsJob

public interface I Tag Operation public abstract CVS Tag get Tag  ITagOperation CVSTag getTag
public interface I Tag Operation public abstract CVS Tag get Tag public abstract void set Tag CVS Tag tag  ITagOperation CVSTag getTag setTag CVSTag
public abstract CVS Tag get Tag public abstract void set Tag CVS Tag tag public abstract void run throws Invocation Target Exception Interrupted Exception  CVSTag getTag setTag CVSTag InvocationTargetException InterruptedException
public abstract void set Tag CVS Tag tag public abstract void run throws Invocation Target Exception Interrupted Exception public abstract ICVS Resource getCVS Resources  setTag CVSTag InvocationTargetException InterruptedException ICVSResource getCVSResources
public abstract void run throws Invocation Target Exception Interrupted Exception public abstract ICVS Resource getCVS Resources public abstract void move Tag  InvocationTargetException InterruptedException ICVSResource getCVSResources moveTag
public abstract ICVS Resource getCVS Resources public abstract void move Tag public abstract void recurse  ICVSResource getCVSResources moveTag

private I Resource conflicting Additions public Override And Update Operation I Workbench Part part I Resource all Resources I Resource conflicting Additions CVS Tag tag boolean recurse super part all Resources tag recurse this conflicting Additions conflicting Additions  IResource conflictingAdditions OverrideAndUpdateOperation IWorkbenchPart IResource allResources IResource conflictingAdditions CVSTag allResources conflictingAdditions conflictingAdditions
protected ICVS Resource get Resources To Update ICVS Resource resources throws CVS Exception Add the conflicting additions to the list of resources to update Set update new Hash Set ICVS Resource conflicts getCVS Arguments conflicting Additions update add All Arrays as List conflicts update add All Arrays as List super get Resources To Update resources return ICVS Resource update to Array new ICVS Resource update size  ICVSResource getResourcesToUpdate ICVSResource CVSException HashSet ICVSResource getCVSArguments conflictingAdditions addAll asList addAll asList getResourcesToUpdate ICVSResource toArray ICVSResource
see org eclipse team internal ccvs ui operations Repository Provider Operation update Workspace Subscriber org eclipse team internal ccvs core CVS Team Provider org eclipse team internal ccvs core ICVS Resource org eclipse core runtime I Progress Monitor protected void update Workspace Subscriber CVS Team Provider provider ICVS Resource resources I Progress Monitor monitor No need to update the workspace subscriber since we know this operation will do it properly by itself  RepositoryProviderOperation updateWorkspaceSubscriber CVSTeamProvider ICVSResource IProgressMonitor updateWorkspaceSubscriber CVSTeamProvider ICVSResource IProgressMonitor

private CVS Workspace Subscriber subscriber CVS Provider Plugin get Plugin getCVS Workspace Subscriber public Reconcile Project Operation Shell shell I Project project ICVS Remote Folder folder super shell folder get Repository project folder get Repository Relative Path this folder folder  CVSWorkspaceSubscriber CVSProviderPlugin getPlugin getCVSWorkspaceSubscriber ReconcileProjectOperation IProject ICVSRemoteFolder getRepository getRepositoryRelativePath
see org eclipse team internal ccvs ui operations CVS Operation get Task Name protected String get Task Name return Policy bind Reconcile Project Operation 0 get Project get Name folder get Repository Relative Path NON NLS 1  CVSOperation getTaskName getTaskName ReconcileProjectOperation getProject getName getRepositoryRelativePath
see org eclipse team internal ccvs ui operations Share Project Operation create Remote Folder org eclipse core runtime I Progress Monitor protected ICVS Remote Folder create Remote Folder I Progress Monitor monitor throws CVS Exception The folder already exists so just return the handle return folder  ShareProjectOperation createRemoteFolder IProgressMonitor ICVSRemoteFolder createRemoteFolder IProgressMonitor CVSException
protected void map Project To Remote Folder ICVS Remote Folder remote I Progress Monitor monitor throws Team Exception Map the project monitor begin Task null 100 super map Project To Remote Folder remote Policy sub Monitor For monitor 10 Reconcile the sync info reconcile Sync Info Policy sub Monitor For monitor 90 monitor done  mapProjectToRemoteFolder ICVSRemoteFolder IProgressMonitor TeamException beginTask mapProjectToRemoteFolder subMonitorFor reconcileSyncInfo subMonitorFor
protected void reconcile Sync Info I Progress Monitor monitor throws CVS Exception try monitor begin Task null 100 Fetch the entire remote tree ICVS Remote Folder remote Checkout To Remote Folder Operation checkout Remote Folder get Part folder Policy sub Monitor For monitor 80 Traverse the tree and populate the workspace base or remote with the sync info depending on file contents populate Workspace remote Policy sub Monitor For monitor 20 catch Invocation Target Exception e throw CVS Exception wrap Exception e catch Team Exception e throw CVS Exception wrap Exception e catch Interrupted Exception e throw new Operation Canceled Exception finally monitor done  reconcileSyncInfo IProgressMonitor CVSException beginTask ICVSRemoteFolder CheckoutToRemoteFolderOperation checkoutRemoteFolder getPart subMonitorFor populateWorkspace subMonitorFor InvocationTargetException CVSException wrapException TeamException CVSException wrapException InterruptedException OperationCanceledException
private void populate Workspace final ICVS Remote Folder remote I Progress Monitor monitor throws CVS Exception CVS Workspace Root getCVS Folder For get Project run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception populate Workspace get Project remote monitor  populateWorkspace ICVSRemoteFolder IProgressMonitor CVSException CVSWorkspaceRoot getCVSFolderFor getProject ICVSRunnable IProgressMonitor CVSException populateWorkspace getProject
private void populate Workspace final ICVS Remote Folder remote I Progress Monitor monitor throws CVS Exception CVS Workspace Root getCVS Folder For get Project run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception populate Workspace get Project remote monitor monitor  populateWorkspace ICVSRemoteFolder IProgressMonitor CVSException CVSWorkspaceRoot getCVSFolderFor getProject ICVSRunnable IProgressMonitor CVSException populateWorkspace getProject
private void populate Workspace I Resource resource ICVS Remote Resource remote I Progress Monitor monitor throws CVS Exception try if resource get Type I Resource FILE if remote is Container CVSUI Plugin log I Status ERROR Policy bind Reconcile Project Operation 1 resource get Full Path to String remote get Repository Relative Path null NON NLS 1 else I File file I File resource I Resource Variant variant I Resource Variant remote if file exists variant null content Compare compare Contents file variant monitor The contents are the same so populate the local workspace with the remote sync info and make the file in sync make In Sync file remote monitor else Would like to put the bytes in the remote but this is complicated due to subscriber events We ll refresh the subcriber at the end else if remote is Container CVSUI Plugin log I Status ERROR Policy bind Reconcile Project Operation 2 resource get Full Path to String remote get Repository Relative Path null NON NLS 1 else Map the local folder to the remote folder Note that this will make phantoms for non exisiting local folders ICVS Folder folder ICVS Folder CVS Workspace Root getCVS Resource For resource folder set Folder Sync Info ICVS Folder remote get Folder Sync Info Traverse the children of the remote The members were prefetched ICVS Remote Resource members remote members monitor for int i 0 i members length i ICVS Remote Resource member members i populate Workspace get Local Child I Container resource member member monitor catch Team Exception e throw CVS Exception wrap Exception e  populateWorkspace IResource ICVSRemoteResource IProgressMonitor CVSException getType IResource isContainer CVSUIPlugin IStatus ReconcileProjectOperation getFullPath toString getRepositoryRelativePath IFile IFile IResourceVariant IResourceVariant contentCompare compareContents makeInSync isContainer CVSUIPlugin IStatus ReconcileProjectOperation getFullPath toString getRepositoryRelativePath ICVSFolder ICVSFolder CVSWorkspaceRoot getCVSResourceFor setFolderSyncInfo ICVSFolder getFolderSyncInfo ICVSRemoteResource ICVSRemoteResource populateWorkspace getLocalChild IContainer TeamException CVSException wrapException
private I Resource get Local Child I Container parent ICVS Remote Resource member I Resource resource parent find Member member get Name if resource null if member is Container resource parent get Folder new Path member get Name else resource parent get File new Path member get Name return resource  IResource getLocalChild IContainer ICVSRemoteResource IResource findMember getName isContainer getFolder getName getFile getName
private void make In Sync I File file ICVS Remote Resource remote I Progress Monitor monitor throws CVS Exception ICVS File cvs File CVS Workspace Root getCVS File For file Resource Sync Info info remote get Sync Info Date mod Time info get Time Stamp if mod Time null cvs File set Time Stamp mod Time mod Time cvs File get Time Stamp Mutable Resource Sync Info new Info With Timestamp info clone Mutable new Info With Timestamp set Time Stamp mod Time cvs File set Sync Info new Info With Timestamp ICVS File CLEAN  makeInSync IFile ICVSRemoteResource IProgressMonitor CVSException ICVSFile cvsFile CVSWorkspaceRoot getCVSFileFor ResourceSyncInfo getSyncInfo modTime getTimeStamp modTime cvsFile setTimeStamp modTime modTime cvsFile getTimeStamp MutableResourceSyncInfo newInfoWithTimestamp cloneMutable newInfoWithTimestamp setTimeStamp modTime cvsFile setSyncInfo newInfoWithTimestamp ICVSFile

public static CVS Tag get Tag ICVS Remote Resource resource throws CVS Exception CVS Tag tag null try if resource is Container tag ICVS Remote Folder resource get Tag else ICVS Remote File file ICVS Remote File resource String revision file get Revision if revision equals Resource Sync Info ADDED REVISION Resource Sync Info info file get Sync Info if info null tag info get Tag else tag new CVS Tag revision CVS Tag VERSION catch Team Exception e throw CVS Exception wrap Exception e if tag null tag CVS Tag DEFAULT return tag  CVSTag getTag ICVSRemoteResource CVSException CVSTag isContainer ICVSRemoteFolder getTag ICVSRemoteFile ICVSRemoteFile getRevision ResourceSyncInfo ADDED_REVISION ResourceSyncInfo getSyncInfo getTag CVSTag CVSTag TeamException CVSException wrapException CVSTag
Compare two versions of the given remote resource param shell param remote Resource the resource whose tags are being compared param left the earlier tag not null param right the later tag not null public Remote Compare Operation I Workbench Part part ICVS Remote Resource remote Resource CVS Tag tag super part new ICVS Remote Resource remote Resource Assert is Not Null tag this right tag try this left get Tag remote Resource catch CVS Exception e This shouldn t happen but log it just in case CVS Provider Plugin log e if this left null this left CVS Tag DEFAULT  remoteResource RemoteCompareOperation IWorkbenchPart ICVSRemoteResource remoteResource CVSTag ICVSRemoteResource remoteResource isNotNull getTag remoteResource CVSException CVSProviderPlugin CVSTag
This command only supports the use of a single resource private ICVS Remote Resource get Remote Resource return get Remote Resources 0  ICVSRemoteResource getRemoteResource getRemoteResources
protected void execute I Progress Monitor monitor throws CVS Exception left Tree right Tree null boolean fetch Contents CVSUI Plugin get Plugin get Plugin Preferences get Boolean ICVSUI Constants PREF CONSIDER CONTENTS monitor begin Task get Task Name 50 fetch Contents 100 0 try ICVS Remote Resource resource get Remote Resource I Status status build Trees resource Policy sub Monitor For monitor 50 if status isOK fetch Contents String overlapping File Paths get Overlapping File Paths if overlapping File Paths length 0 fetch File Contents left Tree overlapping File Paths Policy sub Monitor For monitor 50 fetch File Contents right Tree overlapping File Paths Policy sub Monitor For monitor 50 collect Status status open Compare Editor left Tree right Tree finally monitor done  IProgressMonitor CVSException leftTree rightTree fetchContents CVSUIPlugin getPlugin getPluginPreferences getBoolean ICVSUIConstants PREF_CONSIDER_CONTENTS beginTask getTaskName fetchContents ICVSRemoteResource getRemoteResource IStatus buildTrees subMonitorFor fetchContents overlappingFilePaths getOverlappingFilePaths overlappingFilePaths fetchFileContents leftTree overlappingFilePaths subMonitorFor fetchFileContents rightTree overlappingFilePaths subMonitorFor collectStatus openCompareEditor leftTree rightTree
private String get Overlapping File Paths String left Files get File Paths left Tree String right Files get File Paths right Tree Set set new Hash Set for int i 0 i right Files length i String right File right Files i for int j 0 j left Files length j String left File left Files j if left File equals right File set add left File return String set to Array new String set size  getOverlappingFilePaths leftFiles getFilePaths leftTree rightFiles getFilePaths rightTree HashSet rightFiles rightFile rightFiles leftFiles leftFile leftFiles leftFile rightFile leftFile toArray
private void fetch File Contents Remote Folder Tree tree String overlapping File Paths I Progress Monitor monitor throws CVS Exception File Content Caching Service fetch File Contents tree overlapping File Paths monitor  fetchFileContents RemoteFolderTree overlappingFilePaths IProgressMonitor CVSException FileContentCachingService fetchFileContents overlappingFilePaths
private String get File Paths Remote Folder Tree tree ICVS Remote Resource children tree get Children List result new Array List for int i 0 i children length i ICVS Remote Resource resource children i if resource is Container result add All Arrays as List get File Paths Remote Folder Tree resource else result add resource get Repository Relative Path return String result to Array new String result size  getFilePaths RemoteFolderTree ICVSRemoteResource getChildren ArrayList ICVSRemoteResource isContainer addAll asList getFilePaths RemoteFolderTree getRepositoryRelativePath toArray
private I Status build Trees ICVS Remote Resource resource I Progress Monitor monitor throws CVS Exception Initialize the resulting trees left Tree new Remote Folder Tree null resource get Repository ICVS Remote Folder REPOSITORY ROOT FOLDER NAME left left Tree set Children new ICVS Remote Resource 0 right Tree new Remote Folder Tree null resource get Repository ICVS Remote Folder REPOSITORY ROOT FOLDER NAME right right Tree set Children new ICVS Remote Resource 0 Command Quiet Option old Option CVS Provider Plugin get Plugin get Quietness Session session new Session resource get Repository left Tree false try monitor begin Task get Task Name 100 CVS Provider Plugin get Plugin set Quietness Command VERBOSE session open Policy sub Monitor For monitor 10 I Status status Command RDIFF execute session Command NO GLOBAL OPTIONS get Local Options new ICVS Resource resource new R Diff Summary Listener this Policy sub Monitor For monitor 90 return status finally try session close finally CVS Provider Plugin get Plugin set Quietness old Option monitor done  IStatus buildTrees ICVSRemoteResource IProgressMonitor CVSException leftTree RemoteFolderTree getRepository ICVSRemoteFolder REPOSITORY_ROOT_FOLDER_NAME leftTree setChildren ICVSRemoteResource rightTree RemoteFolderTree getRepository ICVSRemoteFolder REPOSITORY_ROOT_FOLDER_NAME rightTree setChildren ICVSRemoteResource QuietOption oldOption CVSProviderPlugin getPlugin getQuietness getRepository leftTree beginTask getTaskName CVSProviderPlugin getPlugin setQuietness subMonitorFor IStatus NO_GLOBAL_OPTIONS getLocalOptions ICVSResource RDiffSummaryListener subMonitorFor CVSProviderPlugin getPlugin setQuietness oldOption
private Local Option get Local Options return new Local Option R Diff SUMMARY R Diff make Tag Option left R Diff make Tag Option right  LocalOption getLocalOptions LocalOption RDiff RDiff makeTagOption RDiff makeTagOption
see org eclipse team internal ccvs ui operations CVS Operation get Task Name protected String get Task Name return Policy bind Remote Compare Operation 0 new Object left get Name right get Name get Remote Resource get Repository Relative Path NON NLS 1  CVSOperation getTaskName getTaskName RemoteCompareOperation getName getName getRemoteResource getRepositoryRelativePath
public void file Diff String remote File Path String left Revision String right Revision try add File right Tree right new Path remote File Path right Revision catch CVS Exception e CVSUI Plugin log e try add File left Tree left new Path remote File Path left Revision catch CVS Exception e CVSUI Plugin log e  fileDiff remoteFilePath leftRevision rightRevision addFile rightTree remoteFilePath rightRevision CVSException CVSUIPlugin addFile leftTree remoteFilePath leftRevision CVSException CVSUIPlugin
public void new File String remote File Path String right Revision try add File right Tree right new Path remote File Path right Revision catch CVS Exception e CVSUI Plugin log e  newFile remoteFilePath rightRevision addFile rightTree remoteFilePath rightRevision CVSException CVSUIPlugin
public void deleted File String remote File Path String left Revision The left Revision may be null in which case the tag is used try add File left Tree left new Path remote File Path left Revision catch CVS Exception e CVSUI Plugin log e  deletedFile remoteFilePath leftRevision leftRevision addFile leftTree remoteFilePath leftRevision CVSException CVSUIPlugin
public void directory String remote Folder Path try get Folder left Tree left new Path remote Folder Path Path EMPTY catch CVS Exception e CVSUI Plugin log e try get Folder right Tree right new Path remote Folder Path Path EMPTY catch CVS Exception e CVSUI Plugin log e  remoteFolderPath getFolder leftTree remoteFolderPath CVSException CVSUIPlugin getFolder rightTree remoteFolderPath CVSException CVSUIPlugin
private ICVS Remote Folder get Folder Remote Folder Tree tree CVS Tag tag I Path remote Folder Path I Path parent Path throws CVS Exception if remote Folder Path segment Count 0 return tree String name remote Folder Path segment 0 ICVS Resource child I Path child Path parent Path append name if tree child Exists name child tree get Child name else child new Remote Folder Tree tree tree get Repository child Path to String tag Remote Folder Tree child set Children new ICVS Remote Resource 0 add Child tree ICVS Remote Resource child return get Folder Remote Folder Tree child tag remote Folder Path remove First Segments 1 child Path  ICVSRemoteFolder getFolder RemoteFolderTree CVSTag IPath remoteFolderPath IPath parentPath CVSException remoteFolderPath segmentCount remoteFolderPath ICVSResource IPath childPath parentPath childExists getChild RemoteFolderTree getRepository childPath toString RemoteFolderTree setChildren ICVSRemoteResource addChild ICVSRemoteResource getFolder RemoteFolderTree remoteFolderPath removeFirstSegments childPath
private void add Child Remote Folder Tree tree ICVS Remote Resource resource ICVS Remote Resource children tree get Children ICVS Remote Resource new Children if children null new Children new ICVS Remote Resource resource else new Children new ICVS Remote Resource children length 1 System arraycopy children 0 new Children 0 children length new Children children length resource tree set Children new Children  addChild RemoteFolderTree ICVSRemoteResource ICVSRemoteResource getChildren ICVSRemoteResource newChildren newChildren ICVSRemoteResource newChildren ICVSRemoteResource newChildren newChildren setChildren newChildren
private void add File Remote Folder Tree tree CVS Tag tag Path file Path String revision throws CVS Exception Remote Folder Tree parent Remote Folder Tree get Folder tree tag file Path remove Last Segments 1 Path EMPTY String name file Path last Segment ICVS Remote File file new Remote File parent 0 name revision null tag add Child parent file  addFile RemoteFolderTree CVSTag filePath CVSException RemoteFolderTree RemoteFolderTree getFolder filePath removeLastSegments filePath lastSegment ICVSRemoteFile RemoteFile addChild
Display get Default async Exec new Runnable public void run CompareUI open Compare Editor On Page new CVS Compare Editor Input new Resource Edition Node left Tree new Resource Edition Node right Tree get Target Page  getDefault asyncExec openCompareEditorOnPage CVSCompareEditorInput ResourceEditionNode leftTree ResourceEditionNode rightTree getTargetPage
protected void open Compare Editor final ICVS Remote Folder left Tree final ICVS Remote Folder right Tree if left Tree null right Tree null return Display get Default async Exec new Runnable public void run CompareUI open Compare Editor On Page new CVS Compare Editor Input new Resource Edition Node left Tree new Resource Edition Node right Tree get Target Page  openCompareEditor ICVSRemoteFolder leftTree ICVSRemoteFolder rightTree leftTree rightTree getDefault asyncExec openCompareEditorOnPage CVSCompareEditorInput ResourceEditionNode leftTree ResourceEditionNode rightTree getTargetPage
protected I Workbench Page get Target Page return TeamUI Plugin get Active Page  IWorkbenchPage getTargetPage TeamUIPlugin getActivePage

private CVS Tag tag2 public Remote Log Operation I Workbench Part part ICVS Remote Resource remote Resources this part remote Resources null null  CVSTag RemoteLogOperation IWorkbenchPart ICVSRemoteResource remoteResources remoteResources
public Remote Log Operation I Workbench Part part ICVS Remote Resource remote Resources CVS Tag tag1 CVS Tag tag2 super part remote Resources this tag1 tag1 this tag2 tag2  RemoteLogOperation IWorkbenchPart ICVSRemoteResource remoteResources CVSTag CVSTag remoteResources
Return the log entry that was fetch for the given resource or code null code if no entry was fetched param resource the resource return the fetched log entry or code null code public I Log Entry get Log Entry ICVS Remote Resource resource return I Log Entry entries get resource  ILogEntry getLogEntry ICVSRemoteResource ILogEntry
Return the log entries that were fetched for the given resource or an empty list if no entry was fetched param resource the resource return the fetched log entries or an empty list is none were found public I Log Entry get Log Entries ICVS Remote Resource resource return I Log Entry all Entries get resource  ILogEntry getLogEntries ICVSRemoteResource ILogEntry allEntries
public void clear Entries For ICVS Remote Resource resource entries remove resource all Entries remove resource  clearEntriesFor ICVSRemoteResource allEntries
public void clear Entries entries clear all Entries clear  clearEntries allEntries
protected void execute ICVS Repository Location location ICVS Remote Resource remote Resources I Progress Monitor monitor throws CVS Exception monitor begin Task Policy bind Remote Log Operation 0 location get Host 100 NON NLS 1 Session s new Session location CVS Workspace Root getCVS Folder For Resources Plugin get Workspace get Root Log Listener listener new Log Listener ICVS Remote Resource remotes remote Resources Command Local Option local Options if tag1 null tag2 null local Options new Command Local Option R Log NO TAGS R Log make Tag Option tag1 tag2 else local Options new Command Local Option R Log NO TAGS Optimize the cases were we are only fetching the history for a single revision If it is already cached don t fetch it again Array List un Cached Remotes new Array List for int i 0 i remote Resources length i ICVS Remote Resource r remote Resources i if entries get r null un Cached Remotes add r remotes ICVS Remote Resource un Cached Remotes to Array new ICVS Remote Resource un Cached Remotes size if remotes length 0 try s open Policy sub Monitor For monitor 10 I Status status rlog execute s Command NO GLOBAL OPTIONS local Options remotes listener Policy sub Monitor For monitor 90 collect Status status finally s close Record the log entries for the files we want for int i 0 i remotes length i ICVS Remote Resource resource remotes i if resource is Container ICVS Remote File file ICVS Remote File resource I Log Entry entry listener get Entry For file if entry null entries put file entry I Log Entry all Logs listener get Entries For file all Entries put file all Logs  ICVSRepositoryLocation ICVSRemoteResource remoteResources IProgressMonitor CVSException beginTask RemoteLogOperation getHost CVSWorkspaceRoot getCVSFolderFor ResourcesPlugin getWorkspace getRoot LogListener LogListener ICVSRemoteResource remoteResources LocalOption localOptions localOptions LocalOption RLog NO_TAGS RLog makeTagOption localOptions LocalOption RLog NO_TAGS ArrayList unCachedRemotes ArrayList remoteResources ICVSRemoteResource remoteResources unCachedRemotes ICVSRemoteResource unCachedRemotes toArray ICVSRemoteResource unCachedRemotes subMonitorFor IStatus NO_GLOBAL_OPTIONS localOptions subMonitorFor collectStatus ICVSRemoteResource isContainer ICVSRemoteFile ICVSRemoteFile ILogEntry getEntryFor ILogEntry allLogs getEntriesFor allEntries allLogs
see org eclipse team internal ccvs ui operations CVS Operation get Task Name protected String get Task Name return Policy bind Remote Log Operation 1 NON NLS 1  CVSOperation getTaskName getTaskName RemoteLogOperation

private ICVS Remote Resource remote Resources protected Remote Operation I Workbench Part part ICVS Remote Resource remote Resources super part this remote Resources remote Resources  ICVSRemoteResource remoteResources RemoteOperation IWorkbenchPart ICVSRemoteResource remoteResources remoteResources remoteResources
protected ICVS Remote Resource get Remote Resources return remote Resources  ICVSRemoteResource getRemoteResources remoteResources
public void set Remote Resources ICVS Remote Resource remote Resources this remote Resources remote Resources  setRemoteResources ICVSRemoteResource remoteResources remoteResources remoteResources
public ICVS Resource getCVS Resources ICVS Resource cvs Resources new ICVS Resource remote Resources length for int i 0 i remote Resources length i cvs Resources i remote Resources i return cvs Resources  ICVSResource getCVSResources ICVSResource cvsResources ICVSResource remoteResources remoteResources cvsResources remoteResources cvsResources

boolean recurse true public Replace Operation I Workbench Part part I Resource resources CVS Tag tag boolean recurse super part resources get Replace Options recurse tag this recurse recurse  ReplaceOperation IWorkbenchPart IResource CVSTag getReplaceOptions
private static Local Option get Replace Options boolean recurse List options new Array List options add Update IGNORE LOCAL CHANGES if recurse options add Command DO NOT RECURSE return Local Option options to Array new Local Option options size  LocalOption getReplaceOptions ArrayList IGNORE_LOCAL_CHANGES DO_NOT_RECURSE LocalOption toArray LocalOption
see org eclipse team internal ccvs ui operations CVS Operation get Task Name protected String get Task Name return Policy bind Replace Operation task Name NON NLS 1  CVSOperation getTaskName getTaskName ReplaceOperation taskName
protected I Status execute Command Session session CVS Team Provider provider ICVS Resource resources I Progress Monitor monitor throws CVS Exception Interrupted Exception monitor begin Task null 100 ICVS Resource managed Resources get Resources To Update resources try Purge any unmanaged or added files new Prepare For Replace Visitor visit Resources provider get Project resources CVS Team Provider scrubbing Resource TODO This is a key in CVS core NON NLS 1 recurse I Resource DEPTH INFINITE I Resource DEPTH ZERO Policy sub Monitor For monitor 30 NON NLS 1 Only perform the remote command if some of the resources being replaced were managed I Status status OK if managed Resources length 0 Perform an update ignoring any local file modifications status super execute Command session provider managed Resources Policy sub Monitor For monitor 70 Prune any empty folders left after the resources were purged This is done to prune any empty folders that contained only unmanaged resources if status isOK CVS Provider Plugin get Plugin get Prune Empty Directories new Prune Folder Visitor visit session resources return status finally monitor done  IStatus executeCommand CVSTeamProvider ICVSResource IProgressMonitor CVSException InterruptedException beginTask ICVSResource managedResources getResourcesToUpdate PrepareForReplaceVisitor visitResources getProject CVSTeamProvider scrubbingResource IResource DEPTH_INFINITE IResource DEPTH_ZERO subMonitorFor IStatus managedResources executeCommand managedResources subMonitorFor CVSProviderPlugin getPlugin getPruneEmptyDirectories PruneFolderVisitor
Return the resources that need to be updated from the server By default this is all resources that are managed param resources all resources being replaced return resources that ae to be updated from the server throws CVS Exception protected ICVS Resource get Resources To Update ICVS Resource resources throws CVS Exception Accumulate the managed resources from the list of provided resources List managed Resources new Array List for int i 0 i resources length i ICVS Resource resource resources i if resource is Folder ICVS Folder resource isCVS Folder managed Resources add resource else if resource is Folder byte sync Bytes ICVS File resource get Sync Bytes if sync Bytes null Resource Sync Info is Addition sync Bytes managed Resources add resource return ICVS Resource managed Resources to Array new ICVS Resource managed Resources size  CVSException ICVSResource getResourcesToUpdate ICVSResource CVSException managedResources ArrayList ICVSResource isFolder ICVSFolder isCVSFolder managedResources isFolder syncBytes ICVSFile getSyncBytes syncBytes ResourceSyncInfo isAddition syncBytes managedResources ICVSResource managedResources toArray ICVSResource managedResources
see org eclipse team internal ccvs ui operations Update Operation get Update Command protected Update get Update Command return Command REPLACE  UpdateOperation getUpdateCommand getUpdateCommand
see org eclipse team internal ccvs ui operations Repository Provider Operation get Task Name org eclipse team internal ccvs core CVS Team Provider protected String get Task Name CVS Team Provider provider return Policy bind Replace Operation 0 provider get Project get Name NON NLS 1  RepositoryProviderOperation getTaskName CVSTeamProvider getTaskName CVSTeamProvider ReplaceOperation getProject getName

public abstract class Repository Location Operation extends Remote Operation protected Repository Location Operation I Workbench Part part ICVS Remote Resource remote Resources super part remote Resources  RepositoryLocationOperation RemoteOperation RepositoryLocationOperation IWorkbenchPart ICVSRemoteResource remoteResources remoteResources
public void execute I Progress Monitor monitor throws CVS Exception Interrupted Exception Map table get Location Mapping get Remote Resources Set key Set table key Set monitor begin Task null key Set size 100 Iterator iterator key Set iterator while iterator has Next ICVS Repository Location location ICVS Repository Location iterator next List list List table get location ICVS Remote Resource remote Resources ICVS Remote Resource list to Array new ICVS Remote Resource list size execute location remote Resources Policy sub Monitor For monitor 100  IProgressMonitor CVSException InterruptedException getLocationMapping getRemoteResources keySet keySet beginTask keySet keySet hasNext ICVSRepositoryLocation ICVSRepositoryLocation ICVSRemoteResource remoteResources ICVSRemoteResource toArray ICVSRemoteResource remoteResources subMonitorFor
Perform the operation for the given resources found on the given repository param location the repository location param resources the resources of this operation found in the repository param monitor a progres monitor 
private Map get Location Mapping ICVS Remote Resource remote Resources Map locations Map new Hash Map for int i 0 i remote Resources length i ICVS Remote Resource resource remote Resources i ICVS Repository Location location resource get Repository List resources List locations Map get location if resources null resources new Array List locations Map put location resources resources add resource return locations Map  getLocationMapping ICVSRemoteResource remoteResources locationsMap HashMap remoteResources ICVSRemoteResource remoteResources ICVSRepositoryLocation getRepository locationsMap ArrayList locationsMap locationsMap

param shell public Repository Provider Operation I Workbench Part part I Resource resources super part this resources resources  RepositoryProviderOperation IWorkbenchPart IResource
public void execute I Progress Monitor monitor throws CVS Exception Interrupted Exception Map table get Provider Mapping get Resources Set key Set table key Set monitor begin Task null key Set size 1000 Iterator iterator key Set iterator while iterator has Next I Progress Monitor sub Monitor new Sub Progress Monitor monitor 1000 CVS Team Provider provider CVS Team Provider iterator next List list List table get provider I Resource provider Resources I Resource list to Array new I Resource list size I Scheduling Rule rule get Scheduling Rule provider try Platform get Job Manager begin Rule rule monitor monitor set Task Name get Task Name provider execute provider provider Resources sub Monitor finally Platform get Job Manager end Rule rule  IProgressMonitor CVSException InterruptedException getProviderMapping getResources keySet keySet beginTask keySet keySet hasNext IProgressMonitor subMonitor SubProgressMonitor CVSTeamProvider CVSTeamProvider IResource providerResources IResource toArray IResource ISchedulingRule getSchedulingRule getJobManager beginRule setTaskName getTaskName providerResources subMonitor getJobManager endRule
Return the taskname to be shown in the progress monitor while operating on the given provider param provider the provider being processed return the taskname to be shown in the progress monitor 
Retgurn the scheduling rule to be obtained before work begins on the given provider By default it is the provider s project This can be changed by subclasses param provider return protected I Scheduling Rule get Scheduling Rule CVS Team Provider provider return provider get Project  ISchedulingRule getSchedulingRule CVSTeamProvider getProject
private Map get Provider Mapping I Resource resources Map result new Hash Map for int i 0 i resources length i Repository Provider provider Repository Provider get Provider resources i get Project CVS Provider Plugin get Type Id List list List result get provider if list null list new Array List result put provider list list add resources i return result  getProviderMapping IResource HashMap RepositoryProvider RepositoryProvider getProvider getProject CVSProviderPlugin getTypeId ArrayList
Return the resources that the operation is being performed on return protected I Resource get Resources return resources  IResource getResources
Set the resources that the operation is to be performed on param resources protected void set Resources I Resource resources this resources resources  setResources IResource
Execute the operation on the resources for the given provider param provider param provider Resources param sub Monitor throws CVS Exception throws Interrupted Exception  providerResources subMonitor CVSException InterruptedException
protected ICVS Resource getCVS Arguments I Resource resources ICVS Resource cvs Resources new ICVS Resource resources length for int i 0 i cvs Resources length i cvs Resources i CVS Workspace Root getCVS Resource For resources i return cvs Resources  ICVSResource getCVSArguments IResource ICVSResource cvsResources ICVSResource cvsResources cvsResources CVSWorkspaceRoot getCVSResourceFor cvsResources
protected String get String Arguments I Resource resources throws CVS Exception List arguments new Array List resources length for int i 0 i resources length i I Path cvs Path resources i get Full Path remove First Segments 1 if cvs Path segment Count 0 arguments add Session CURRENT LOCAL FOLDER else arguments add cvs Path to String return String arguments to Array new String arguments size  getStringArguments IResource CVSException ArrayList IPath cvsPath getFullPath removeFirstSegments cvsPath segmentCount CURRENT_LOCAL_FOLDER cvsPath toString toArray
public ICVS Resource getCVS Resources ICVS Resource cvs Resources new ICVS Resource resources length for int i 0 i resources length i cvs Resources i CVS Workspace Root getCVS Resource For resources i return cvs Resources  ICVSResource getCVSResources ICVSResource cvsResources ICVSResource cvsResources CVSWorkspaceRoot getCVSResourceFor cvsResources
protected ICVS Repository Location get Remote Location CVS Team Provider provider throws CVS Exception CVS Workspace Root workspace Root provider getCVS Workspace Root return workspace Root get Remote Location  ICVSRepositoryLocation getRemoteLocation CVSTeamProvider CVSException CVSWorkspaceRoot workspaceRoot getCVSWorkspaceRoot workspaceRoot getRemoteLocation
protected ICVS Folder get Local Root CVS Team Provider provider throws CVS Exception CVS Workspace Root workspace Root provider getCVS Workspace Root return workspace Root get Local Root  ICVSFolder getLocalRoot CVSTeamProvider CVSException CVSWorkspaceRoot workspaceRoot getCVSWorkspaceRoot workspaceRoot getLocalRoot
Update the workspace subscriber for an update operation performed on the given resources After an update the remote tree is flushed in order to ensure that stale incoming additions are removed This need only be done for folders At the time of writting all update operations are deep so the flush is deep as well param provider the provider projedct for all the given resources param resources the resources that were updated param monitor a progress monitor protected void update Workspace Subscriber CVS Team Provider provider ICVS Resource resources I Progress Monitor monitor CVS Workspace Subscriber s CVS Provider Plugin get Plugin getCVS Workspace Subscriber monitor begin Task null 100 resources length for int i 0 i resources length i ICVS Resource resource resources i if resource is Folder try s update Remote provider ICVS Folder resource Policy sub Monitor For monitor 100 catch Team Exception e Just log the error and continue CVSUI Plugin log e else monitor worked 100  updateWorkspaceSubscriber CVSTeamProvider ICVSResource IProgressMonitor CVSWorkspaceSubscriber CVSProviderPlugin getPlugin getCVSWorkspaceSubscriber beginTask ICVSResource isFolder updateRemote ICVSFolder subMonitorFor TeamException CVSUIPlugin

public Share Project Operation Shell shell ICVS Repository Location location I Project project String module Name super null this shell shell this module Name module Name this project project this location location  ShareProjectOperation ICVSRepositoryLocation IProject moduleName moduleName moduleName
Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception try map Project To Remote Folder remote monitor catch Team Exception e exception 0 e  ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException mapProjectToRemoteFolder TeamException
protected void execute I Progress Monitor monitor throws CVS Exception Interrupted Exception try monitor begin Task get Task Name 100 Create the remote module final ICVS Remote Folder remote create Remote Folder Policy sub Monitor For monitor 50 Map the project to the module in a workspace runnable final Team Exception exception new Team Exception null Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception try map Project To Remote Folder remote monitor catch Team Exception e exception 0 e Resources Plugin get Workspace get Rule Factory modify Rule project 0 Policy sub Monitor For monitor 100 if exception 0 null throw exception 0 catch Core Exception e throw CVS Exception wrap Exception e finally monitor done  IProgressMonitor CVSException InterruptedException beginTask getTaskName ICVSRemoteFolder createRemoteFolder subMonitorFor TeamException TeamException ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException mapProjectToRemoteFolder TeamException ResourcesPlugin getWorkspace getRuleFactory modifyRule subMonitorFor CoreException CVSException wrapException
Create the remote folder to which the project is being mapped as well as any ancestors and return it If the remote folder does not exist remotely this method will create it param monitor a progress monitor return the existing remote folder to which the project is being mapped throws CVS Exception protected ICVS Remote Folder create Remote Folder I Progress Monitor monitor throws CVS Exception String project Name project get Name if module Name null module Name project Name Remote Folder Tree root new Remote Folder Tree null location Path EMPTY to String null Path path new Path module Name try monitor begin Task get Task Name 100 path segment Count return ensure Tree Exists root path monitor catch Team Exception e throw CVS Exception wrap Exception e finally monitor done  CVSException ICVSRemoteFolder createRemoteFolder IProgressMonitor CVSException projectName getName moduleName moduleName projectName RemoteFolderTree RemoteFolderTree toString moduleName beginTask getTaskName segmentCount ensureTreeExists TeamException CVSException wrapException
Map the project to the remote folder by associating the CVS Repository Provider with the project and at the very least assigning the folder sync info for the remote folder as the folder sync info for the project param remote the remote folder to which the projetc is being mapped param monitor a progress monitor throws CVS Exception protected void map Project To Remote Folder final ICVS Remote Folder remote I Progress Monitor monitor throws Team Exception monitor begin Task null 100 purge AnyCVS Folders Link the project to the newly created module ICVS Folder folder ICVS Folder CVS Workspace Root getCVS Resource For project folder set Folder Sync Info remote get Folder Sync Info Register it with Team If it already is no harm done Repository Provider map project CVS Provider Plugin get Type Id monitor done  CVSException mapProjectToRemoteFolder ICVSRemoteFolder IProgressMonitor TeamException beginTask purgeAnyCVSFolders ICVSFolder ICVSFolder CVSWorkspaceRoot getCVSResourceFor setFolderSyncInfo getFolderSyncInfo RepositoryProvider CVSProviderPlugin getTypeId
private Remote Folder Tree create Child Remote Folder Tree parent String name I Progress Monitor monitor throws CVS Exception Team Exception Remote Folder Tree child new Remote Folder Tree parent name location new Path parent get Repository Relative Path append name to String null parent set Children new ICVS Remote Resource child if child exists Policy sub Monitor For monitor 50 The child exists so get the handle that was received from the server return Remote Folder Tree parent get Folder name else Create the folder remotely create Folder child Policy sub Monitor For monitor 50 return child  RemoteFolderTree createChild RemoteFolderTree IProgressMonitor CVSException TeamException RemoteFolderTree RemoteFolderTree getRepositoryRelativePath toString setChildren ICVSRemoteResource subMonitorFor RemoteFolderTree getFolder createFolder subMonitorFor
private ICVS Remote Folder ensure Tree Exists Remote Folder Tree folder I Path path I Progress Monitor monitor throws Team Exception if path is Empty return folder String name path segment 0 Remote Folder Tree child create Child folder name monitor return ensure Tree Exists child path remove First Segments 1 monitor  ICVSRemoteFolder ensureTreeExists RemoteFolderTree IPath IProgressMonitor TeamException isEmpty RemoteFolderTree createChild ensureTreeExists removeFirstSegments
private void create Folder Remote Folder Tree folder I Progress Monitor monitor throws Team Exception Session s new Session location folder get Parent s open monitor true open for modification try I Status status Command ADD execute s Command NO GLOBAL OPTIONS Command NO LOCAL OPTIONS new String folder get Name null monitor If we get a warning the operation most likely failed so check that the status is OK if status get Code CVS Status SERVER ERROR status isOK throw new CVS Server Exception status finally s close  createFolder RemoteFolderTree IProgressMonitor TeamException getParent IStatus NO_GLOBAL_OPTIONS NO_LOCAL_OPTIONS getName getCode CVSStatus SERVER_ERROR CVSServerException
see org eclipse team internal ccvs ui operations CVS Operation get Task Name protected String get Task Name return Policy bind Share Project Operation 0 project get Name module Name NON NLS 1  CVSOperation getTaskName getTaskName ShareProjectOperation getName moduleName
return Returns the project public I Project get Project return project  IProject getProject
see org eclipse team internal ccvs ui operations CVS Operation get Shell protected Shell get Shell return shell  CVSOperation getShell getShell
ICVS Folder folder CVS Workspace Root getCVS Folder For project folder accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception nothing to do for files  ICVSFolder CVSWorkspaceRoot getCVSFolderFor ICVSResourceVisitor visitFile ICVSFile CVSException
public void visit Folder ICVS Folder folder throws CVS Exception if folder isCVS Folder for now just unmanage folder unmanage null  visitFolder ICVSFolder CVSException isCVSFolder
Method find Common Root In Subfolders return String private void purge AnyCVS Folders try ICVS Folder folder CVS Workspace Root getCVS Folder For project folder accept new ICVS Resource Visitor public void visit File ICVS File file throws CVS Exception nothing to do for files public void visit Folder ICVS Folder folder throws CVS Exception if folder isCVS Folder for now just unmanage folder unmanage null true recurse catch CVS Exception e log the exception and return null CVSUI Plugin log e  findCommonRootInSubfolders purgeAnyCVSFolders ICVSFolder CVSWorkspaceRoot getCVSFolderFor ICVSResourceVisitor visitFile ICVSFile CVSException visitFolder ICVSFolder CVSException isCVSFolder CVSException CVSUIPlugin

public Single Command Operation I Workbench Part part I Resource resources Local Option options super part resources if options null this options options  SingleCommandOperation IWorkbenchPart IResource LocalOption
protected void execute CVS Team Provider provider I Resource resources I Progress Monitor monitor throws CVS Exception Interrupted Exception monitor begin Task null 100 Session session new Session get Remote Location provider get Local Root provider true output to console session open Policy sub Monitor For monitor 10 is Server Modification Operation try TODO This does not properly count the number of operations Changing it causes an error in the test cases I Status status execute Command session provider getCVS Arguments resources Policy sub Monitor For monitor 90 collect Status status finally session close  CVSTeamProvider IResource IProgressMonitor CVSException InterruptedException beginTask getRemoteLocation getLocalRoot subMonitorFor isServerModificationOperation IStatus executeCommand getCVSArguments subMonitorFor collectStatus
Indicate whether the operation requires write access to the server i e the operation changes state on the server whether it be to commit tag admin etc return protected boolean is Server Modification Operation return false  isServerModificationOperation
Method overridden by subclasses to issue the command to the CVS repository using the given session protected abstract I Status execute Command Session session CVS Team Provider provider ICVS Resource resources I Progress Monitor monitor throws CVS Exception Interrupted Exception  IStatus executeCommand CVSTeamProvider ICVSResource IProgressMonitor CVSException InterruptedException
protected abstract I Status execute Command Session session CVS Team Provider provider ICVS Resource resources I Progress Monitor monitor throws CVS Exception Interrupted Exception protected Local Option get Local Options return options  IStatus executeCommand CVSTeamProvider ICVSResource IProgressMonitor CVSException InterruptedException LocalOption getLocalOptions
protected void set Local Options Local Option options this options options  setLocalOptions LocalOption
protected void add Local Option Local Option option Local Option new Options new Local Option options length 1 System arraycopy options 0 new Options 0 options length new Options options length option options new Options  addLocalOption LocalOption LocalOption newOptions LocalOption newOptions newOptions newOptions

private CVS Tag tag public Tag In Repository Operation I Workbench Part part ICVS Remote Resource remote Resource super part remote Resource  CVSTag TagInRepositoryOperation IWorkbenchPart ICVSRemoteResource remoteResource remoteResource
public void execute I Progress Monitor monitor throws CVS Exception Interrupted Exception ICVS Remote Resource resources get Remote Resources monitor begin Task null 1000 resources length for int i 0 i resources length i I Status status resources i tag get Tag get Local Options new Sub Progress Monitor monitor 1000 collect Status status if errors Occurred try Tag Action broadcast Tag Change getCVS Resources get Tag catch Invocation Target Exception e throw CVS Exception wrap Exception e  IProgressMonitor CVSException InterruptedException ICVSRemoteResource getRemoteResources beginTask IStatus getTag getLocalOptions SubProgressMonitor collectStatus errorsOccurred TagAction broadcastTagChange getCVSResources getTag InvocationTargetException CVSException wrapException
Override to dislay the number of tag operations that succeeded protected String get Error Message I Status problems int operation Count if operation Count 1 return Policy bind Tag In Repository Action tag Problems Message NON NLS 1 else return Policy bind Tag In Repository Action tag Problems Message Multiple NON NLS 1 Integer to String operation Count problems length Integer to String problems length  getErrorMessage IStatus operationCount operationCount TagInRepositoryAction tagProblemsMessage TagInRepositoryAction tagProblemsMessageMultiple toString operationCount toString
private Local Option get Local Options return Local Option local Options to Array new Local Option local Options size  LocalOption getLocalOptions LocalOption localOptions toArray LocalOption localOptions
see org eclipse team internal ccvs ui operations I Tag Operation get Tag public CVS Tag get Tag return tag  ITagOperation getTag CVSTag getTag
see org eclipse team internal ccvs ui operations I Tag Operation set Tag org eclipse team internal ccvs core CVS Tag public void set Tag CVS Tag tag this tag tag  ITagOperation setTag CVSTag setTag CVSTag
see org eclipse team internal ccvs ui operations I Tag Operation add Local Option org eclipse team internal ccvs core client Command Local Option public void add Local Option Local Option option local Options add option  ITagOperation addLocalOption LocalOption addLocalOption LocalOption localOptions
public void move Tag add Local Option R Tag FORCE REASSIGNMENT add Local Option R Tag CLEAR FROM REMOVED if tag null tag get Type CVS Tag BRANCH add Local Option R Tag FORCE BRANCH REASSIGNMENT  moveTag addLocalOption RTag FORCE_REASSIGNMENT addLocalOption RTag CLEAR_FROM_REMOVED getType CVSTag addLocalOption RTag FORCE_BRANCH_REASSIGNMENT
see org eclipse team internal ccvs ui operations I Tag Operation recurse public void recurse add Local Option Command DO NOT RECURSE  ITagOperation addLocalOption DO_NOT_RECURSE
protected String get Task Name return Policy bind Tag From Repository task Name NON NLS 1  getTaskName TagFromRepository taskName

private CVS Tag tag public Tag Operation I Workbench Part part I Resource resources super part resources  CVSTag TagOperation IWorkbenchPart IResource
TODO needed to prevent re release of releng tool Shoudl eb able to remove eventually public Tag Operation Shell shell I Resource resources super null resources  TagOperation IResource
public CVS Tag get Tag return tag  CVSTag getTag
public void set Tag CVS Tag tag this tag tag  setTag CVSTag
see org eclipse team internal ccvs ui operations Repository Provider Operation execute org eclipse team internal ccvs core CVS Team Provider org eclipse core resources I Resource org eclipse core runtime I Progress Monitor protected void execute CVS Team Provider provider I Resource resources I Progress Monitor monitor throws CVS Exception Interrupted Exception I Status status tag provider resources monitor collect Status status  RepositoryProviderOperation CVSTeamProvider IResource IProgressMonitor CVSTeamProvider IResource IProgressMonitor CVSException InterruptedException IStatus collectStatus
private ICVS Resource getCVS Resources I Resource resources ICVS Resource cvs Resources new ICVS Resource resources length for int i 0 i cvs Resources length i cvs Resources i CVS Workspace Root getCVS Resource For resources i return cvs Resources  ICVSResource getCVSResources IResource ICVSResource cvsResources ICVSResource cvsResources cvsResources CVSWorkspaceRoot getCVSResourceFor cvsResources
Override to dislay the number of tag operations that succeeded protected String get Error Message I Status problems int operation Count We accumulated 1 status per resource above if operation Count 1 return Policy bind Tag Action tag Problems Message NON NLS 1 else return Policy bind Tag Action tag Problems Message Multiple NON NLS 1 Integer to String operation Count problems length Integer to String problems length  getErrorMessage IStatus operationCount operationCount TagAction tagProblemsMessage TagAction tagProblemsMessageMultiple toString operationCount toString
Tag the resources in the CVS repository with the given tag The returned I Status will be a status containing any errors or warnings If the returned I Status is a multi status the code indicates the severity Possible codes are CVS Status OK Nothing to report CVS Status SERVER ERROR The server reported an error any other code warning messages received from the server public I Status tag CVS Team Provider provider I Resource resources I Progress Monitor progress throws CVS Exception Local Option command Options Local Option local Options to Array new Local Option local Options size Build the arguments list String arguments get String Arguments resources Execute the command CVS Workspace Root root provider getCVS Workspace Root Session s new Session root get Remote Location root get Local Root progress begin Task null 100 try Opening the session takes 20 of the time s open Policy sub Monitor For progress 20 true open for modification return Command TAG execute s Command NO GLOBAL OPTIONS command Options tag arguments null Policy sub Monitor For progress 80 finally s close progress done  IStatus IStatus CVSStatus CVSStatus SERVER_ERROR IStatus CVSTeamProvider IResource IProgressMonitor CVSException LocalOption commandOptions LocalOption localOptions toArray LocalOption localOptions getStringArguments CVSWorkspaceRoot getCVSWorkspaceRoot getRemoteLocation getLocalRoot beginTask subMonitorFor NO_GLOBAL_OPTIONS commandOptions subMonitorFor
public void add Local Option Local Option option local Options add option  addLocalOption LocalOption localOptions
see org eclipse team internal ccvs ui operations I Tag Operation move Tag public void move Tag add Local Option Tag FORCE REASSIGNMENT  ITagOperation moveTag moveTag addLocalOption FORCE_REASSIGNMENT
see org eclipse team internal ccvs ui operations I Tag Operation recurse public void recurse add Local Option Command DO NOT RECURSE  ITagOperation addLocalOption DO_NOT_RECURSE
protected String get Task Name return Policy bind Tag From Workspace task Name NON NLS 1  getTaskName TagFromWorkspace taskName
see org eclipse team internal ccvs ui operations Repository Provider Operation get Task Name org eclipse team internal ccvs core CVS Team Provider protected String get Task Name CVS Team Provider provider return Policy bind Tag Operation 0 provider get Project get Name NON NLS 1  RepositoryProviderOperation getTaskName CVSTeamProvider getTaskName CVSTeamProvider TagOperation getProject getName
public void execute I Progress Monitor monitor throws CVS Exception Interrupted Exception super execute monitor if errors Occurred try Tag Action broadcast Tag Change getCVS Resources get Tag catch Invocation Target Exception e throw CVS Exception wrap Exception e  IProgressMonitor CVSException InterruptedException errorsOccurred TagAction broadcastTagChange getCVSResources getTag InvocationTargetException CVSException wrapException

List skipped Files new Array List public Update Only Mergable Operation I Workbench Part part I Resource resources Local Option local Options super part resources local Options  skippedFiles ArrayList UpdateOnlyMergableOperation IWorkbenchPart IResource LocalOption localOptions localOptions
protected I Status execute Command Session session CVS Team Provider provider ICVS Resource resources I Progress Monitor monitor throws CVS Exception Interrupted Exception Update Mergable Only update new Update Mergable Only I Status status update execute session Command NO GLOBAL OPTIONS get Local Options resources null monitor if status get Code I Status ERROR add Skipped Files update get Skipped Files return OK return status  IStatus executeCommand CVSTeamProvider ICVSResource IProgressMonitor CVSException InterruptedException UpdateMergableOnly UpdateMergableOnly IStatus NO_GLOBAL_OPTIONS getLocalOptions getCode IStatus addSkippedFiles getSkippedFiles
see org eclipse team internal ccvs ui operations Repository Provider Operation get Task Name protected String get Task Name return Policy bind Update Only Mergeable task Name NON NLS 1  RepositoryProviderOperation getTaskName getTaskName UpdateOnlyMergeable taskName
see org eclipse team internal ccvs ui operations Repository Provider Operation get Task Name org eclipse team internal ccvs core CVS Team Provider protected String get Task Name CVS Team Provider provider return Policy bind Update Operation 0 provider get Project get Name NON NLS 1  RepositoryProviderOperation getTaskName CVSTeamProvider getTaskName CVSTeamProvider UpdateOperation getProject getName
protected void add Skipped Files I File files skipped Files add All Arrays as List files  addSkippedFiles IFile skippedFiles addAll asList
public I File get Skipped Files return I File skipped Files to Array new I File skipped Files size  IFile getSkippedFiles IFile skippedFiles toArray IFile skippedFiles

Create an Update Operation that will perform on update on the given resources using the given local option If a tag is provided it will be added to the local options using the appropriate argument r or D If the tag is code null code then the tag will be omitted from the local options and the tags on the local resources will be used param shell param resources param options param tag public Update Operation I Workbench Part part I Resource resources Local Option options CVS Tag tag super part resources options this tag tag  UpdateOperation UpdateOperation IWorkbenchPart IResource LocalOption CVSTag
protected I Status execute Command Session session CVS Team Provider provider ICVS Resource resources I Progress Monitor monitor throws CVS Exception Interrupted Exception Build the local options List local Options new Array List Use the appropriate tag options if tag null local Options add Update make Tag Option tag Build the arguments list local Options add All Arrays as List get Local Options Local Option command Options Local Option local Options to Array new Local Option local Options size monitor begin Task null 100 I Status execute get Update Command execute session Command NO GLOBAL OPTIONS command Options resources get Command Output Listener Policy sub Monitor For monitor 95 update Workspace Subscriber provider resources Policy sub Monitor For monitor 5 monitor done return execute  IStatus executeCommand CVSTeamProvider ICVSResource IProgressMonitor CVSException InterruptedException localOptions ArrayList localOptions makeTagOption localOptions addAll asList getLocalOptions LocalOption commandOptions LocalOption localOptions toArray LocalOption localOptions beginTask IStatus getUpdateCommand NO_GLOBAL_OPTIONS commandOptions getCommandOutputListener subMonitorFor updateWorkspaceSubscriber subMonitorFor
protected Update get Update Command return Command UPDATE  getUpdateCommand
see org eclipse team internal ccvs ui operations CVS Operation get Task Name protected String get Task Name return Policy bind Update Operation task Name NON NLS 1  CVSOperation getTaskName getTaskName UpdateOperation taskName
see org eclipse team internal ccvs ui operations Repository Provider Operation get Task Name org eclipse team internal ccvs core CVS Team Provider protected String get Task Name CVS Team Provider provider return Policy bind Update Operation 0 provider get Project get Name NON NLS 1  RepositoryProviderOperation getTaskName CVSTeamProvider getTaskName CVSTeamProvider UpdateOperation getProject getName
Return the listener that is used to process E and M messages The default is code null code return protected I Command Output Listener get Command Output Listener return null  ICommandOutputListener getCommandOutputListener
protected void handle Errors I Status errors throws CVS Exception We are only concerned with server errors List server Errors new Array List for int i 0 i errors length i I Status status errors i if status get Code CVS Status SERVER ERROR server Errors add status else if status get Code CVS Status UNMEGERED BINARY CONFLICT server Errors add status else if status is Multi Status I Status children status get Children for int j 0 j children length j I Status child children j if child get Code CVS Status UNMEGERED BINARY CONFLICT server Errors add status break if server Errors is Empty return super handle Errors I Status server Errors to Array new I Status server Errors size  handleErrors IStatus CVSException serverErrors ArrayList IStatus getCode CVSStatus SERVER_ERROR serverErrors getCode CVSStatus UNMEGERED_BINARY_CONFLICT serverErrors isMultiStatus IStatus getChildren IStatus getCode CVSStatus UNMEGERED_BINARY_CONFLICT serverErrors serverErrors isEmpty handleErrors IStatus serverErrors toArray IStatus serverErrors
see org eclipse team internal ccvs ui operations CVS Operation get Error Message org eclipse core runtime I Status int protected String get Error Message I Status failures int total Operations return Policy bind Update Action update NON NLS 1  CVSOperation getErrorMessage IStatus getErrorMessage IStatus totalOperations UpdateAction

Returns and caches an image corresponding to the specified icon param icon the icon return the image public Image get Image For Overlay Icon icon Image image Image cache get icon if image null image icon create Image cache put icon image return image  getImageFor OverlayIcon createImage
Disposes of all images in the cache public void dispose All for Iterator it cache values iterator it has Next Image image Image it next image dispose cache clear  disposeAll hasNext

class Table Label Provider extends Label Provider implements I Table Label Provider public String get Column Text Object element int column Index ICVS Repository Location entry ICVS Repository Location element switch column Index case 0 return entry to String case 1 return entry get Username default return null  TableLabelProvider LabelProvider ITableLabelProvider getColumnText columnIndex ICVSRepositoryLocation ICVSRepositoryLocation columnIndex toString getUsername
public Image get Column Image Object element int column Index return null  getColumnImage columnIndex
public void init I Workbench workbench set Description Policy bind Password Management Preference Page 2 NON NLS 1  IWorkbench setDescription PasswordManagementPreferencePage
table set Layout Data gd table add Listener SWT Selection new Listener public void handle Event Event e handle Selection  setLayoutData addListener handleEvent handleSelection
viewer set Label Provider new Table Label Provider viewer set Content Provider new I Structured Content Provider public void dispose  setLabelProvider TableLabelProvider setContentProvider IStructuredContentProvider
public void dispose public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
public Object get Elements Object input Element if input Element null return null ICVS Repository Location locations Known Repositories input Element get Repositories List repos new Array List for int i 0 i locations length i ICVS Repository Location l locations i if l get User Info Cached repos add l return ICVS Repository Location repos to Array new ICVS Repository Location repos size  getElements inputElement inputElement ICVSRepositoryLocation KnownRepositories inputElement getRepositories ArrayList ICVSRepositoryLocation getUserInfoCached ICVSRepositoryLocation toArray ICVSRepositoryLocation
remove Button set Enabled false remove Button add Listener SWT Selection new Listener public void handle Event Event e remove  removeButton setEnabled removeButton addListener handleEvent
remove All Button set Enabled true remove All Button add Listener SWT Selection new Listener public void handle Event Event e remove All  removeAllButton setEnabled removeAllButton addListener handleEvent removeAll
Creates preference page controls on demand param parent the parent for the preference page protected Control create Contents Composite ancestor Composite parent new Composite ancestor SWT NULL Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 layout num Columns 2 parent set Layout layout Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL parent set Layout Data data viewer new Table Viewer parent SWT MULTI SWT FULL SELECTION SWT H SCROLL SWT V SCROLL SWT BORDER Table table viewer get Table new Table Editor table table set Header Visible true table set Lines Visible true Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint convert Width In Chars To Pixels 30 The hardcoded hint does not look elegant but in reality it does not make anything bound to this 100 pixel value because in any case the tree on the left is taller and that s what really determines the height gd height Hint 100 table set Layout Data gd table add Listener SWT Selection new Listener public void handle Event Event e handle Selection Create the table columns new Table Column table SWT NULL new Table Column table SWT NULL Table Column columns table get Columns columns 0 set Text Policy bind Password Management Preference Page 3 NON NLS 1 columns 1 set Text Policy bind Password Management Preference Page 4 NON NLS 1 viewer set Column Properties new String location username NON NLS 1 NON NLS 2 viewer set Label Provider new Table Label Provider viewer set Content Provider new I Structured Content Provider public void dispose public void input Changed Viewer viewer Object old Input Object new Input public Object get Elements Object input Element if input Element null return null ICVS Repository Location locations Known Repositories input Element get Repositories List repos new Array List for int i 0 i locations length i ICVS Repository Location l locations i if l get User Info Cached repos add l return ICVS Repository Location repos to Array new ICVS Repository Location repos size Table Layout tl new Table Layout tl add Column Data new Column Weight Data 15 tl add Column Data new Column Weight Data 1 100 table set Layout tl Composite buttons new Composite parent SWT NULL buttons set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING layout new Grid Layout layout margin Height 0 layout margin Width 0 buttons set Layout layout remove Button new Button buttons SWT PUSH remove Button set Text Policy bind Password Management Preference Page 5 NON NLS 1 data new Grid Data data horizontal Alignment Grid Data FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint remove Button compute Size SWT DEFAULT SWT DEFAULT true x remove Button set Layout Data data remove Button set Enabled false remove Button add Listener SWT Selection new Listener public void handle Event Event e remove remove All Button new Button buttons SWT PUSH remove All Button set Text Policy bind Password Management Preference Page 6 NON NLS 1 data new Grid Data data horizontal Alignment Grid Data FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint remove Button compute Size SWT DEFAULT SWT DEFAULT true x remove All Button set Layout Data data remove All Button set Enabled true remove All Button add Listener SWT Selection new Listener public void handle Event Event e remove All Dialog apply Dialog Font ancestor viewer set Input Known Repositories get Instance handle Selection Workbench Help set Help get Control I Help Context Ids PASSWORD MANAGEMENT PAGE return parent  createContents GridLayout GridLayout marginWidth marginHeight numColumns setLayout GridData GridData verticalAlignment GridData horizontalAlignment GridData setLayoutData TableViewer FULL_SELECTION H_SCROLL V_SCROLL getTable TableEditor setHeaderVisible setLinesVisible GridData GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels heightHint setLayoutData addListener handleEvent handleSelection TableColumn TableColumn TableColumn getColumns setText PasswordManagementPreferencePage setText PasswordManagementPreferencePage setColumnProperties setLabelProvider TableLabelProvider setContentProvider IStructuredContentProvider inputChanged oldInput newInput getElements inputElement inputElement ICVSRepositoryLocation KnownRepositories inputElement getRepositories ArrayList ICVSRepositoryLocation getUserInfoCached ICVSRepositoryLocation toArray ICVSRepositoryLocation TableLayout TableLayout addColumnData ColumnWeightData addColumnData ColumnWeightData setLayout setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING GridLayout marginHeight marginWidth setLayout removeButton removeButton setText PasswordManagementPreferencePage GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint removeButton computeSize removeButton setLayoutData removeButton setEnabled removeButton addListener handleEvent removeAllButton removeAllButton setText PasswordManagementPreferencePage GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint removeButton computeSize removeAllButton setLayoutData removeAllButton setEnabled removeAllButton addListener handleEvent removeAll applyDialogFont setInput KnownRepositories getInstance handleSelection WorkbenchHelp setHelp getControl IHelpContextIds PASSWORD_MANAGEMENT_PAGE
public boolean perform Ok return true  performOk
protected void perform Defaults super perform Defaults  performDefaults performDefaults
private void remove I Structured Selection s I Structured Selection viewer get Selection for Iterator it s iterator it has Next ICVS Repository Location location ICVS Repository Location it next location flush User Info viewer refresh handle Selection  IStructuredSelection IStructuredSelection getSelection hasNext ICVSRepositoryLocation ICVSRepositoryLocation flushUserInfo handleSelection
private void remove All ICVS Repository Location locations Known Repositories get Instance get Repositories for int i 0 i locations length i ICVS Repository Location l locations i if l get User Info Cached l flush User Info viewer refresh handle Selection  removeAll ICVSRepositoryLocation KnownRepositories getInstance getRepositories ICVSRepositoryLocation getUserInfoCached flushUserInfo handleSelection
private void handle Selection if viewer get Table get Selection Count 0 remove Button set Enabled true else remove Button set Enabled false remove All Button set Enabled viewer get Table get Item Count 0  handleSelection getTable getSelectionCount removeButton setEnabled removeButton setEnabled removeAllButton setEnabled getTable getItemCount

Creates a NLS catalog for the given locale public static void localize String bundle Name bundle Resource Bundle get Bundle bundle Name  bundleName ResourceBundle getBundle bundleName
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string public static String bind String id String binding return bind id new String binding 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings public static String bind String id String binding1 String binding2 return bind id new String binding1 binding2 
Gets a string from the resource bundle We don t want to crash because of a missing String Returns the key if not found public static String bind String key try return bundle get String key catch Missing Resource Exception e return key catch Null Pointer Exception e return key NON NLS 1 NON NLS 2  getString MissingResourceException NullPointerException
Gets a string from the resource bundle and binds it with the given arguments If the key is not found return the key public static String bind String key Object args try return Message Format format bind key args catch Missing Resource Exception e return key catch Null Pointer Exception e return key NON NLS 1 NON NLS 2  MessageFormat MissingResourceException NullPointerException
Progress monitor helpers public static void check Canceled I Progress Monitor monitor if monitor is Canceled cancel Operation  checkCanceled IProgressMonitor isCanceled cancelOperation
cancel Operation public static void cancel Operation throw new Operation Canceled Exception  cancelOperation cancelOperation OperationCanceledException
public static I Progress Monitor monitor For I Progress Monitor monitor if monitor null return new Null Progress Monitor return monitor  IProgressMonitor monitorFor IProgressMonitor NullProgressMonitor
public static I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks  IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor
public static I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks int style if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks style  IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor
public static I Progress Monitor infinite Sub Monitor For I Progress Monitor monitor int ticks if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Infinite Sub Progress Monitor monitor ticks  IProgressMonitor infiniteSubMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor InfiniteSubProgressMonitor
public static Resource Bundle get Bundle return bundle  ResourceBundle getBundle

Release Comment Dialog constructor param parent Shell the parent of this dialog public Release Comment Dialog Shell parent Shell I Resource resources To Commit int depth super parent Shell Policy bind Release Comment Dialog title NON NLS 1 this resources To Commit resources To Commit this depth depth int shell Style get Shell Style set Shell Style shell Style SWT RESIZE SWT MAX commit Comment Area new Commit Comment Area this null Get a project from which the commit template can be obtained if resources To Commit length 0 commit Comment Area set Project resources To Commit 0 get Project I Dialog Settings workbench Settings CVSUI Plugin get Plugin get Dialog Settings this settings workbench Settings get Section Release Comment Dialog NON NLS 1 if settings null this settings workbench Settings add New Section Release Comment Dialog NON NLS 1  ReleaseCommentDialog parentShell ReleaseCommentDialog parentShell IResource resourcesToCommit parentShell ReleaseCommentDialog resourcesToCommit resourcesToCommit shellStyle getShellStyle setShellStyle shellStyle commitCommentArea CommitCommentArea resourcesToCommit commitCommentArea setProject resourcesToCommit getProject IDialogSettings workbenchSettings CVSUIPlugin getPlugin getDialogSettings workbenchSettings getSection ReleaseCommentDialog workbenchSettings addNewSection ReleaseCommentDialog
see org eclipse team internal ui dialogs Details Dialog include Details Button protected boolean include Details Button return false  DetailsDialog includeDetailsButton includeDetailsButton
see org eclipse team internal ui dialogs Details Dialog include Error Message protected boolean include Error Message return false  DetailsDialog includeErrorMessage includeErrorMessage
commit Comment Area create Area composite commit Comment Area add Property Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property Commit Comment Area OK REQUESTED ok Pressed  commitCommentArea createArea commitCommentArea addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty CommitCommentArea OK_REQUESTED okPressed
protected void create Main Dialog Area Composite parent get Shell set Text Policy bind Release Comment Dialog title NON NLS 1 Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL BOTH commit Comment Area create Area composite commit Comment Area add Property Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property Commit Comment Area OK REQUESTED ok Pressed set F1 help Workbench Help set Help composite I Help Context Ids RELEASE COMMENT DIALOG Dialog apply Dialog Font parent  createMainDialogArea getShell setText ReleaseCommentDialog setLayout GridLayout setLayoutData GridData GridData FILL_BOTH commitCommentArea createArea commitCommentArea addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty CommitCommentArea OK_REQUESTED okPressed WorkbenchHelp setHelp IHelpContextIds RELEASE_COMMENT_DIALOG applyDialogFont
protected Point get Initial Size int width height try height settings get Int HEIGHT KEY width settings get Int WIDTH KEY catch Number Format Exception e return super get Initial Size Point p super get Initial Size return new Point width p y  getInitialSize getInt HEIGHT_KEY getInt WIDTH_KEY NumberFormatException getInitialSize getInitialSize
public String get Comment return commit Comment Area get Comment  getComment commitCommentArea getComment
public I Resource get Resources To Commit return null  IResource getResourcesToCommit
see org eclipse team internal ui dialogs Details Dialog create Drop Down Dialog Area org eclipse swt widgets Composite protected Composite create Drop Down Dialog Area Composite parent return null  DetailsDialog createDropDownDialogArea createDropDownDialogArea
see org eclipse team internal ui dialogs Details Dialog update Enablements protected void update Enablements  DetailsDialog updateEnablements updateEnablements
public boolean close Rectangle bounds get Shell get Bounds settings put HEIGHT KEY bounds height settings put WIDTH KEY bounds width return super close  getShell getBounds HEIGHT_KEY WIDTH_KEY
protected Control create Contents Composite parent Control c super create Contents parent commit Comment Area set Focus return c  createContents createContents commitCommentArea setFocus

Input Stream contents public Remote Annotation Editor Input ICVS Remote File file Input Stream contents super file new Null Progress Monitor this contents contents  InputStream RemoteAnnotationEditorInput ICVSRemoteFile InputStream NullProgressMonitor
protected void initialize Storage ICVS Remote File file I Progress Monitor monitor throws Team Exception if contents null storage new Remote Annotation Storage file contents  initializeStorage ICVSRemoteFile IProgressMonitor TeamException RemoteAnnotationStorage

private ICVS Remote File file public Remote Annotation Storage ICVS Remote File file Input Stream contents this file file this contents contents  ICVSRemoteFile RemoteAnnotationStorage ICVSRemoteFile InputStream
public Input Stream get Contents throws Core Exception try Contents are a Byte Array Input Stream which can be reset to the beginning contents reset catch IO Exception e CVSUI Plugin log CVS Exception wrap Exception e return contents  InputStream getContents CoreException ByteArrayInputStream IOException CVSUIPlugin CVSException wrapException
public String get Charset throws Core Exception Input Stream contents get Contents try String char Set Team Plugin get Charset get Name contents return char Set catch IO Exception e throw new CVS Exception new Status I Status ERROR CVSUI Plugin ID I Resource Status FAILED DESCRIBING CONTENTS Policy bind Remote Annotation Storage 1 get Full Path to String e NON NLS 1 finally try contents close catch IO Exception e1 Ignore  getCharset CoreException InputStream getContents charSet TeamPlugin getCharset getName charSet IOException CVSException IStatus CVSUIPlugin IResourceStatus FAILED_DESCRIBING_CONTENTS RemoteAnnotationStorage getFullPath toString IOException
public I Path get Full Path ICVS Repository Location location file get Repository I Path path new Path location get Root Directory path path set Device location get Host Path DEVICE SEPARATOR path path append file get Repository Relative Path return path  IPath getFullPath ICVSRepositoryLocation getRepository IPath getRootDirectory setDevice getHost DEVICE_SEPARATOR getRepositoryRelativePath
return path public String get Name return file get Name  getName getName
return file get Name public boolean is Read Only return true  getName isReadOnly

Creates File Edition Editor Input on the given file public Remote File Editor Input ICVS Remote File file I Progress Monitor monitor this file file try initialize Storage file monitor catch Team Exception e Log and continue CVSUI Plugin log e  FileEditionEditorInput RemoteFileEditorInput ICVSRemoteFile IProgressMonitor initializeStorage TeamException CVSUIPlugin
Initialize the strogae of this instance from the given file param file the file being displayed param monitor a progress monitor protected void initialize Storage ICVS Remote File file I Progress Monitor monitor throws Team Exception Cache the contents of the file for use in the editor storage I Resource Variant file get Storage monitor  initializeStorage ICVSRemoteFile IProgressMonitor TeamException IResourceVariant getStorage
Returns whether the editor input exists p This method is primarily used to determine if an editor input should appear in the File Most Recently Used menu An editor input will appear in the list until the return value of code exists code becomes code false code or it drops off the bottom of the list return code true code if the editor input exists code false code otherwise public boolean exists return true 
public boolean equals Object o if o instanceof Remote File Editor Input return false Remote File Editor Input input Remote File Editor Input o return file equals input file  RemoteFileEditorInput RemoteFileEditorInput RemoteFileEditorInput
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found param adapter the adapter class to look up return a object castable to the given class or code null code if this object does not have an adapter for the given class public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter
Returns the children of this object When this object is displayed in a tree the returned objects will be this element s children Returns an empty array if this object has no children param object The object to get the children for public Object get Children Object o return new Object 0  getChildren
Returns the content type of the input For instance if the input wraps an code I File code the content type would be derived from the extension or mime type If the input wraps another object it may just be the object type The content type is used for editor mapping public String get Content Type String name file get Name return name substring name last Index Of 1  IFile getContentType getName lastIndexOf
Returns the fully qualified path name of the input public String get Full Path use path to make sure slashes are correct ICVS Repository Location location file get Repository I Path path new Path location get Root Directory path path set Device location get Host Path DEVICE SEPARATOR path path append file get Repository Relative Path String full Path try String revision file get Revision full Path Policy bind Remote File Editor Input full Path And Revision path to String revision NON NLS 1 catch Team Exception e CVSUI Plugin log e full Path path to String return full Path  getFullPath ICVSRepositoryLocation getRepository IPath getRootDirectory setDevice getHost DEVICE_SEPARATOR getRepositoryRelativePath fullPath getRevision fullPath RemoteFileEditorInput fullPathAndRevision toString TeamException CVSUIPlugin fullPath toString fullPath
Returns the image descriptor for this input return the image descriptor for this input public Image Descriptor get Image Descriptor I Workbench Adapter file Adapter I Workbench Adapter file get Adapter I Workbench Adapter class return file Adapter null null file Adapter get Image Descriptor file  ImageDescriptor getImageDescriptor IWorkbenchAdapter fileAdapter IWorkbenchAdapter getAdapter IWorkbenchAdapter fileAdapter fileAdapter getImageDescriptor
see I Workbench Adapter get Image Descriptor public Image Descriptor get Image Descriptor Object object I Workbench Adapter file Adapter I Workbench Adapter file get Adapter I Workbench Adapter class return file Adapter null null file Adapter get Image Descriptor file  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor IWorkbenchAdapter fileAdapter IWorkbenchAdapter getAdapter IWorkbenchAdapter fileAdapter fileAdapter getImageDescriptor
see I Workbench Adapter get Label public String get Label Object o return file get Name  IWorkbenchAdapter getLabel getLabel getName
Returns the input name for display purposes For instance if the fully qualified input name is a b My File gif the return value for code get Name code is My File gif public String get Name String name file get Name try return Policy bind name And Revision name file get Revision NON NLS 1 catch Team Exception e return name  MyFile getName MyFile getName getName nameAndRevision getRevision TeamException
Returns the logical parent of the given object in its tree Returns code null code if there is no parent or if this object doesn t belong to a tree param object The object to get the parent for public Object get Parent Object o return null  getParent
cannot be persisted this method returns code null code public I Persistable Element get Persistable not persistable return null  IPersistableElement getPersistable
Returns the underlying I Storage object return an I Storage object exception Core Exception if this method fails public I Storage get Storage throws Core Exception if storage null initialize Storage file new Null Progress Monitor return storage  IStorage IStorage CoreException IStorage getStorage CoreException initializeStorage NullProgressMonitor
Returns the tool tip text for this editor input This text is used to differentiate between two input with the same name For instance My Class java in folder X and My Class java in folder Y p The format of the path will vary with each input type For instance if the editor input is of type code I File Editor Input code this method should return the fully qualified resource path For editor input of other types it may be different p return the tool tip text public String get Tool Tip Text return get Full Path  MyClass MyClass IFileEditorInput getToolTipText getFullPath
Returns the remote CVS file shown in this editor input return the remote file handle public ICVS Remote File getCVS Remote File return file  ICVSRemoteFile getCVSRemoteFile

private I Subscriber Change Listener team Change Listener new I Subscriber Change Listener public void subscriber Resource Changed I Subscriber Change Event deltas if f Reference Initialized for int i 0 i deltas length i I Subscriber Change Event delta deltas i I Resource resource delta get Resource if resource get Type I Resource FILE f Last Sync State null resource equals f Last Sync State get Local if delta get Flags I Subscriber Change Event SYNC CHANGED fetch Contents In Job  ISubscriberChangeListener teamChangeListener ISubscriberChangeListener subscriberResourceChanged ISubscriberChangeEvent fReferenceInitialized ISubscriberChangeEvent IResource getResource getType IResource fLastSyncState fLastSyncState getLocal getFlags ISubscriberChangeEvent SYNC_CHANGED fetchContentsInJob
private I Element State Listener document Listener new I Element State Listener public void element Dirty State Changed Object element boolean is Dirty  IElementStateListener documentListener IElementStateListener elementDirtyStateChanged isDirty
public void element Content About To Be Replaced Object element  elementContentAboutToBeReplaced
public void element Content Replaced Object element if f Editor null f Editor get Editor Input element fetch Contents In Job  elementContentReplaced fEditor fEditor getEditorInput fetchContentsInJob
public void element Deleted Object element  elementDeleted
public void element Moved Object original Element Object moved Element  elementMoved originalElement movedElement
public I Document get Reference I Progress Monitor monitor throws Core Exception if f Reference Initialized return null if f Reference null read Document monitor return f Reference  IDocument getReference IProgressMonitor CoreException fReferenceInitialized fReference readDocument fReference
public void set Active Editor I Text Editor target Editor if target Editor get Editor Input instanceof I File Editor Input return f Editor target Editor f Document Provider f Editor get Document Provider if f Document Provider null CVS Provider Plugin get Plugin getCVS Workspace Subscriber add Listener team Change Listener I Document Provider f Document Provider add Element State Listener document Listener f Reference Initialized true  setActiveEditor ITextEditor targetEditor targetEditor getEditorInput IFileEditorInput fEditor targetEditor fDocumentProvider fEditor getDocumentProvider fDocumentProvider CVSProviderPlugin getPlugin getCVSWorkspaceSubscriber addListener teamChangeListener IDocumentProvider fDocumentProvider addElementStateListener documentListener fReferenceInitialized
public boolean is Enabled if f Reference Initialized return false try return get ManagedCVS File null catch CVS Exception e return false  isEnabled fReferenceInitialized getManagedCVSFile CVSException
public void dispose f Reference Initialized false stop update job if f Update Job null f Update Job get State Job NONE f Update Job cancel remove listeners if f Document Provider null f Document Provider remove Element State Listener document Listener CVS Provider Plugin get Plugin getCVS Workspace Subscriber remove Listener team Change Listener  fReferenceInitialized fUpdateJob fUpdateJob getState fUpdateJob fDocumentProvider fDocumentProvider removeElementStateListener documentListener CVSProviderPlugin getPlugin getCVSWorkspaceSubscriber removeListener teamChangeListener
see org eclipse quickdiff Quick Diff Test Plugin I Quick Diff Provider Implementation set Id java lang String public void set Id String id f Id id  QuickDiffTestPlugin IQuickDiffProviderImplementation setId setId fId
see org eclipse jface text source diff Document Line Differ I Quick Diff Reference Provider get Id public String get Id return f Id  DocumentLineDiffer IQuickDiffReferenceProvider getId getId fId
Determine if the file represented by this quickdiff provider has changed with respect to it s remote state Return true if the remote contents should be refreshed and false if not private boolean compute Change I Progress Monitor monitor throws Team Exception boolean need To Update Reference Document false if f Reference Initialized Sync Info info get Sync State get File From Editor if info null f Last Sync State null return true else if info null return false int kind info get Kind if f Last Sync State null need To Update Reference Document true else if f Last Sync State equals info need To Update Reference Document true if DEBUG debug f Last Sync State info f Last Sync State info return need To Update Reference Document  computeChange IProgressMonitor TeamException needToUpdateReferenceDocument fReferenceInitialized SyncInfo getSyncState getFileFromEditor fLastSyncState getKind fLastSyncState needToUpdateReferenceDocument fLastSyncState needToUpdateReferenceDocument fLastSyncState fLastSyncState needToUpdateReferenceDocument
private void debug Sync Info last Sync State Sync Info info String last none NON NLS 1 if last Sync State null last last Sync State to String System out println CVS Quick Diff was last is info to String NON NLS 1 NON NLS 2  SyncInfo lastSyncState SyncInfo lastSyncState lastSyncState toString CVSQuickDiff toString
private Sync Info get Sync State I Resource resource throws Team Exception if resource null return null ICVS File cvs File get ManagedCVS File return CVS Provider Plugin get Plugin getCVS Workspace Subscriber get Sync Info resource  SyncInfo getSyncState IResource TeamException ICVSFile cvsFile getManagedCVSFile CVSProviderPlugin getPlugin getCVSWorkspaceSubscriber getSyncInfo
Creates a document and initializes it with the contents of a CVS remote resource param monitor the progress monitor throws Core Exception private void read Document I Progress Monitor monitor throws Core Exception if f Reference Initialized return if f Reference null f Reference new Document if compute Change monitor ICVS Remote File remote File ICVS Remote File f Last Sync State get Remote if f Last Sync State get Remote null f Document Provider instanceof I Storage Document Provider I Storage Document Provider provider I Storage Document Provider f Document Provider String encoding provider get Encoding f Editor get Editor Input if encoding null encoding provider get Default Encoding if monitor is Canceled return Input Stream stream remote File get Contents monitor if stream null monitor is Canceled f Reference Initialized return set Document Content f Reference stream encoding else the remote is null so ensure that the document is null if monitor is Canceled return f Reference set NON NLS 1 if DEBUG System out println CVS Quick Diff updating document f Reference null remote found remote empty NON NLS 1 NON NLS 2 NON NLS 3  CoreException readDocument IProgressMonitor CoreException fReferenceInitialized fReference fReference computeChange ICVSRemoteFile remoteFile ICVSRemoteFile fLastSyncState getRemote fLastSyncState getRemote fDocumentProvider IStorageDocumentProvider IStorageDocumentProvider IStorageDocumentProvider fDocumentProvider getEncoding fEditor getEditorInput getDefaultEncoding isCanceled InputStream remoteFile getContents isCanceled fReferenceInitialized setDocumentContent fReference isCanceled fReference CVSQuickDiff fReference
Intitializes the given document with the given stream using the given encoding param document the document to be initialized param content Stream the stream which delivers the document content param encoding the character encoding for reading the given stream exception Core Exception if the given stream can not be read private static void set Document Content I Document document Input Stream content Stream String encoding throws Core Exception Reader in null try final int DEFAULT FILE SIZE 15 1024 in new Buffered Reader new Input Stream Reader content Stream encoding DEFAULT FILE SIZE Char Array Writer caw new Char Array Writer DEFAULT FILE SIZE char read Buffer new char 2048 int n in read read Buffer while n 0 caw write read Buffer 0 n n in read read Buffer document set caw to String System out println CVS Quick Diff updating document caw to String catch IO Exception x throw new CVS Exception Policy bind Remote Revision Quick Diff Provider reading File x NON NLS 1 finally if in null try in close catch IO Exception x throw new CVS Exception Policy bind Remote Revision Quick Diff Provider closing File x NON NLS 1  contentStream CoreException setDocumentContent IDocument InputStream contentStream CoreException DEFAULT_FILE_SIZE BufferedReader InputStreamReader contentStream DEFAULT_FILE_SIZE CharArrayWriter CharArrayWriter DEFAULT_FILE_SIZE readBuffer readBuffer readBuffer readBuffer toString CVSQuickDiff toString IOException CVSException RemoteRevisionQuickDiffProvider readingFile IOException CVSException RemoteRevisionQuickDiffProvider closingFile
Returns the ICVS File associated with he active editor or code null code if the provider doesn t not have access to a CVS managed file return the handle to a CVS file private ICVS File get ManagedCVS File throws CVS Exception if f Editor null I File file get File From Editor if file null CVS Workspace Root is Shared WithCVS file return CVS Workspace Root getCVS File For file return null  ICVSFile ICVSFile getManagedCVSFile CVSException fEditor IFile getFileFromEditor CVSWorkspaceRoot isSharedWithCVS CVSWorkspaceRoot getCVSFileFor
private I File get File From Editor if f Editor null I Editor Input input f Editor get Editor Input if input instanceof I File Editor Input return I File Editor Input input get File return null  IFile getFileFromEditor fEditor IEditorInput fEditor getEditorInput IFileEditorInput IFileEditorInput getFile
f Update Job new Job Policy bind Remote Revision Quick Diff Provider fetching File NON NLS 1 protected I Status run I Progress Monitor monitor try read Document monitor catch Core Exception e continue and return ok for now The error will be reported when the quick diff supports calls get Reference again continue return Status OK STATUS  fUpdateJob RemoteRevisionQuickDiffProvider fetchingFile IStatus IProgressMonitor readDocument CoreException getReference OK_STATUS
Runs a job that updates the document If a previous job is already running it is stopped before the new job can start private void fetch Contents In Job if f Reference Initialized return if f Update Job null f Update Job get State Job NONE f Update Job cancel f Update Job new Job Policy bind Remote Revision Quick Diff Provider fetching File NON NLS 1 protected I Status run I Progress Monitor monitor try read Document monitor catch Core Exception e continue and return ok for now The error will be reported when the quick diff supports calls get Reference again continue return Status OK STATUS f Update Job schedule  fetchContentsInJob fReferenceInitialized fUpdateJob fUpdateJob getState fUpdateJob fUpdateJob RemoteRevisionQuickDiffProvider fetchingFile IStatus IProgressMonitor readDocument CoreException getReference OK_STATUS fUpdateJob

I Input Validator validator new I Input Validator public String is Valid String new Text I Status status CVS Tag validate Tag Name new Text if status isOK return null return status get Message  IInputValidator IInputValidator isValid newText IStatus CVSTag validateTagName newText getMessage
shell get Display sync Exec new Runnable public void run Input Dialog dialog new Input Dialog get Shell Policy bind Add To Branch Action enter Tag Policy bind Add To Branch Action enter Tag Long null validator NON NLS 1 NON NLS 2 if dialog open Input Dialog OK CVS Tag tag new CVS Tag dialog get Value CVS Tag BRANCH try CVSUI Plugin get Plugin get Repository Manager add Tags folder new CVS Tag tag catch CVS Exception e exception 0 e  getDisplay syncExec InputDialog InputDialog getShell AddToBranchAction enterTag AddToBranchAction enterTagLong InputDialog CVSTag CVSTag getValue CVSTag CVSUIPlugin getPlugin getRepositoryManager addTags CVSTag CVSException
run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception final ICVS Remote Folder folder get Selected Root Folder if folder null return Shell shell get Shell final CVS Exception exception new CVS Exception null shell get Display sync Exec new Runnable public void run Input Dialog dialog new Input Dialog get Shell Policy bind Add To Branch Action enter Tag Policy bind Add To Branch Action enter Tag Long null validator NON NLS 1 NON NLS 2 if dialog open Input Dialog OK CVS Tag tag new CVS Tag dialog get Value CVS Tag BRANCH try CVSUI Plugin get Plugin get Repository Manager add Tags folder new CVS Tag tag catch CVS Exception e exception 0 e if exception 0 null throw new Invocation Target Exception exception 0  IRunnableWithProgress IProgressMonitor InvocationTargetException ICVSRemoteFolder getSelectedRootFolder getShell CVSException CVSException getDisplay syncExec InputDialog InputDialog getShell AddToBranchAction enterTag AddToBranchAction enterTagLong InputDialog CVSTag CVSTag getValue CVSTag CVSUIPlugin getPlugin getRepositoryManager addTags CVSTag CVSException InvocationTargetException
see org eclipse team internal ccvs ui actions CVS Action execute org eclipse jface action I Action protected void execute I Action action throws Invocation Target Exception Interrupted Exception run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception final ICVS Remote Folder folder get Selected Root Folder if folder null return Shell shell get Shell final CVS Exception exception new CVS Exception null shell get Display sync Exec new Runnable public void run Input Dialog dialog new Input Dialog get Shell Policy bind Add To Branch Action enter Tag Policy bind Add To Branch Action enter Tag Long null validator NON NLS 1 NON NLS 2 if dialog open Input Dialog OK CVS Tag tag new CVS Tag dialog get Value CVS Tag BRANCH try CVSUI Plugin get Plugin get Repository Manager add Tags folder new CVS Tag tag catch CVS Exception e exception 0 e if exception 0 null throw new Invocation Target Exception exception 0 false PROGRESS BUSYCURSOR NON NLS 1  CVSAction IAction IAction InvocationTargetException InterruptedException IRunnableWithProgress IProgressMonitor InvocationTargetException ICVSRemoteFolder getSelectedRootFolder getShell CVSException CVSException getDisplay syncExec InputDialog InputDialog getShell AddToBranchAction enterTag AddToBranchAction enterTagLong InputDialog CVSTag CVSTag getValue CVSTag CVSUIPlugin getPlugin getRepositoryManager addTags CVSTag CVSException InvocationTargetException PROGRESS_BUSYCURSOR
see org eclipse team internal ui actions Team Action is Enabled protected boolean is Enabled throws Team Exception return get Selected Root Folder null  TeamAction isEnabled isEnabled TeamException getSelectedRootFolder
protected ICVS Remote Folder get Selected Root Folder ICVS Remote Folder folders get Selected Remote Folders ICVS Remote Folder selected Folder null for int i 0 i folders length i ICVS Remote Folder folder folders i if folder is Defined Module new Path folder get Repository Relative Path segment Count 1 only return a folder if one valid one is selected if selected Folder null return null selected Folder folder return selected Folder  ICVSRemoteFolder getSelectedRootFolder ICVSRemoteFolder getSelectedRemoteFolders ICVSRemoteFolder selectedFolder ICVSRemoteFolder isDefinedModule getRepositoryRelativePath segmentCount selectedFolder selectedFolder selectedFolder

private String Buffer buffer private Vector comments public Comment History Content Handler  StringBuffer CommentHistoryContentHandler
see Content Handler characters char int int public void characters char chars int start Index int length throws SAX Exception if buffer null return buffer append chars start Index length  ContentHandler startIndex SAXException startIndex
see Content Handler start Element java lang String java lang String java lang String org xml sax Attributes public void start Element String namespaceURI String local Name String q Name Attributes atts throws SAX Exception String element Name get Element Name namespaceURI local Name q Name if element Name equals Repository Manager ELEMENT COMMIT COMMENT buffer new String Buffer return if element Name equals Repository Manager ELEMENT COMMIT HISTORY comments new Vector Repository Manager MAX COMMENTS return  ContentHandler startElement startElement localName qName SAXException elementName getElementName localName qName elementName RepositoryManager ELEMENT_COMMIT_COMMENT StringBuffer elementName RepositoryManager ELEMENT_COMMIT_HISTORY RepositoryManager MAX_COMMENTS
see org xml sax Content Handler end Element java lang String java lang String java lang String public void end Element String namespaceURI String local Name String q Name String element Name get Element Name namespaceURI local Name q Name if element Name equals Repository Manager ELEMENT COMMIT COMMENT comments add buffer to String buffer null return if element Name equals Repository Manager ELEMENT COMMIT HISTORY Repository Manager previous Comments new String comments size comments copy Into Repository Manager previous Comments return  ContentHandler endElement endElement localName qName elementName getElementName localName qName elementName RepositoryManager ELEMENT_COMMIT_COMMENT toString elementName RepositoryManager ELEMENT_COMMIT_HISTORY RepositoryManager previousComments copyInto RepositoryManager previousComments
private String get Element Name String namespaceURI String local Name String q Name if local Name null local Name length 0 return local Name else return q Name  getElementName localName qName localName localName localName qName

public class Copy Repository Name Action extends CVS Action protected boolean is Enabled throws Team Exception return true  CopyRepositoryNameAction CVSAction isEnabled TeamException
public void execute I Action action ICVS Repository Location locations get Selected Repositories String Buffer buffer new String Buffer for int i 0 i locations length i buffer append locations i get Location if i locations length 1 buffer append n NON NLS 1 copy To Clipbard Display get Default buffer to String  IAction ICVSRepositoryLocation getSelectedRepositories StringBuffer StringBuffer getLocation copyToClipbard getDefault toString
protected ICVS Repository Location get Selected Repositories Array List repositories null if selection is Empty repositories new Array List Iterator elements I Structured Selection selection iterator while elements has Next Object next get Adapter elements next ICVS Repository Location class if next instanceof ICVS Repository Location repositories add next continue if repositories null repositories is Empty ICVS Repository Location result new ICVS Repository Location repositories size repositories to Array result return result return new ICVS Repository Location 0  ICVSRepositoryLocation getSelectedRepositories ArrayList isEmpty ArrayList IStructuredSelection hasNext getAdapter ICVSRepositoryLocation ICVSRepositoryLocation isEmpty ICVSRepositoryLocation ICVSRepositoryLocation toArray ICVSRepositoryLocation
private void copy To Clipbard Display display String str Clipboard clipboard new Clipboard display clipboard set Contents new String str new Transfer Text Transfer get Instance clipboard dispose  copyToClipbard setContents TextTransfer getInstance

label Group set Layout layout Listener label Listener new Listener public void handle Event Event event update Widget Enablements  labelGroup setLayout labelListener handleEvent updateWidgetEnablements
allow Caching Button set Layout Data data allow Caching Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e allow Caching allow Caching Button get Selection  allowCachingButton setLayoutData allowCachingButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent allowCaching allowCachingButton getSelection
update Widget Enablements Listener connection Info Changed Listener new Listener public void handle Event Event event connection Info Changed true update Widget Enablements  updateWidgetEnablements connectionInfoChangedListener handleEvent connectionInfoChanged updateWidgetEnablements
password Text add Listener SWT Modify new Listener public void handle Event Event event password Changed password Text get Text equals FAKE PASSWORD  passwordText addListener handleEvent passwordChanged passwordText getText FAKE_PASSWORD
protected Control create Contents Composite parent initialize Composite composite new Composite parent SWT NULL composite set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout layout new Grid Layout layout num Columns 3 composite set Layout layout Repository Label create a composite to ensure the radio buttons come in the correct order Composite label Group new Composite composite SWT NONE Grid Data data new Grid Data data horizontal Span 3 label Group set Layout Data data layout new Grid Layout layout num Columns 3 layout margin Height 0 layout margin Width 0 label Group set Layout layout Listener label Listener new Listener public void handle Event Event event update Widget Enablements use Location As Label create Radio Button label Group Policy bind CVS Repository Properties Page use Location As Label 3 NON NLS 1 use Custom Label create Radio Button label Group Policy bind CVS Repository Properties Page use Custom Label 1 NON NLS 1 use Custom Label add Listener SWT Selection label Listener label Text create Text Field label Group label Text add Listener SWT Modify label Listener Add some extra space create Label composite 3 NON NLS 1 create Label composite Policy bind CVS Properties Page connection Type 1 NON NLS 1 method Type create Combo composite create Label composite Policy bind CVS Properties Page user 1 NON NLS 1 user Text create Text Field composite create Label composite Policy bind CVS Properties Page password 1 NON NLS 1 password Text create Password Field composite create Label composite Policy bind CVS Properties Page host 1 NON NLS 1 host Text create Text Field composite create Label composite Policy bind CVS Properties Page path 1 NON NLS 1 path Text create Text Field composite Port number create a composite to ensure the radio buttons come in the correct order Composite port Group new Composite composite SWT NONE data new Grid Data data horizontal Span 3 port Group set Layout Data data layout new Grid Layout layout num Columns 3 layout margin Height 0 layout margin Width 0 port Group set Layout layout use Default Port create Radio Button port Group Policy bind Configuration Wizard Main Page use Default Port 3 NON NLS 1 use Custom Port create Radio Button port Group Policy bind Configuration Wizard Main Page use Port 1 NON NLS 1 port Text create Text Field port Group Add some extra space create Label composite 3 NON NLS 1 allow Caching Button new Button composite SWT CHECK allow Caching Button set Text Policy bind User Validation Dialog 6 NON NLS 1 data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL data horizontal Span 3 allow Caching Button set Layout Data data allow Caching Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e allow Caching allow Caching Button get Selection Composite warning Composite new Composite composite SWT NONE layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Height 0 warning Composite set Layout layout data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 3 warning Composite set Layout Data data Label warning Label new Label warning Composite SWT NONE warning Label set Image Dialog get Image Dialog DLG IMG MESSAGE WARNING warning Label set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data HORIZONTAL ALIGN BEGINNING Label warning Text new Label warning Composite SWT WRAP warning Text set Text Policy bind User Validation Dialog 7 NON NLS 1 data new Grid Data Grid Data FILL HORIZONTAL data width Hint 300 warning Text set Layout Data data Add some extra space create Label composite 3 NON NLS 1 initialize Values update Widget Enablements Listener connection Info Changed Listener new Listener public void handle Event Event event connection Info Changed true update Widget Enablements password Text add Listener SWT Modify new Listener public void handle Event Event event password Changed password Text get Text equals FAKE PASSWORD user Text add Listener SWT Modify connection Info Changed Listener method Type add Listener SWT Modify connection Info Changed Listener host Text add Listener SWT Modify connection Info Changed Listener port Text add Listener SWT Modify connection Info Changed Listener use Custom Port add Listener SWT Selection connection Info Changed Listener path Text add Listener SWT Modify connection Info Changed Listener Workbench Help set Help get Control I Help Context Ids REPOSITORY LOCATION PROPERTY PAGE Dialog apply Dialog Font parent return composite  createContents setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout numColumns setLayout labelGroup GridData GridData horizontalSpan labelGroup setLayoutData GridLayout numColumns marginHeight marginWidth labelGroup setLayout labelListener handleEvent updateWidgetEnablements useLocationAsLabel createRadioButton labelGroup CVSRepositoryPropertiesPage useLocationAsLabel useCustomLabel createRadioButton labelGroup CVSRepositoryPropertiesPage useCustomLabel useCustomLabel addListener labelListener labelText createTextField labelGroup labelText addListener labelListener createLabel createLabel CVSPropertiesPage connectionType methodType createCombo createLabel CVSPropertiesPage userText createTextField createLabel CVSPropertiesPage passwordText createPasswordField createLabel CVSPropertiesPage hostText createTextField createLabel CVSPropertiesPage pathText createTextField portGroup GridData horizontalSpan portGroup setLayoutData GridLayout numColumns marginHeight marginWidth portGroup setLayout useDefaultPort createRadioButton portGroup ConfigurationWizardMainPage useDefaultPort useCustomPort createRadioButton portGroup ConfigurationWizardMainPage usePort portText createTextField portGroup createLabel allowCachingButton allowCachingButton setText UserValidationDialog GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL horizontalSpan allowCachingButton setLayoutData allowCachingButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent allowCaching allowCachingButton getSelection warningComposite GridLayout numColumns marginHeight marginHeight warningComposite setLayout GridData GridData FILL_HORIZONTAL horizontalSpan warningComposite setLayoutData warningLabel warningComposite warningLabel setImage getImage DLG_IMG_MESSAGE_WARNING warningLabel setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING GridData HORIZONTAL_ALIGN_BEGINNING warningText warningComposite warningText setText UserValidationDialog GridData GridData FILL_HORIZONTAL widthHint warningText setLayoutData createLabel initializeValues updateWidgetEnablements connectionInfoChangedListener handleEvent connectionInfoChanged updateWidgetEnablements passwordText addListener handleEvent passwordChanged passwordText getText FAKE_PASSWORD userText addListener connectionInfoChangedListener methodType addListener connectionInfoChangedListener hostText addListener connectionInfoChangedListener portText addListener connectionInfoChangedListener useCustomPort addListener connectionInfoChangedListener pathText addListener connectionInfoChangedListener WorkbenchHelp setHelp getControl IHelpContextIds REPOSITORY_LOCATION_PROPERTY_PAGE applyDialogFont
Utility method that creates a combo box param parent the parent for the new label return the new widget protected Combo create Combo Composite parent Combo combo new Combo parent SWT READ ONLY Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint I Dialog Constants ENTRY FIELD WIDTH data horizontal Span 2 combo set Layout Data data return combo  createCombo READ_ONLY GridData GridData GridData FILL_HORIZONTAL widthHint IDialogConstants ENTRY_FIELD_WIDTH horizontalSpan setLayoutData
Utility method that creates a label instance and sets the default layout data param parent the parent for the new label param text the text for the new label return the new label protected Label create Label Composite parent String text int span Label label new Label parent SWT LEFT label set Text text Grid Data data new Grid Data data horizontal Span span data horizontal Alignment Grid Data FILL label set Layout Data data return label  createLabel setText GridData GridData horizontalSpan horizontalAlignment GridData setLayoutData
Create a text field specific for this application param parent the parent of the new text field return the new text field protected Text create Text Field Composite parent Text text new Text parent SWT SINGLE SWT BORDER return layout Text Field text  createTextField layoutTextField
Create a password field specific for this application param parent the parent of the new text field return the new text field protected Text create Password Field Composite parent Text text new Text parent SWT SINGLE SWT BORDER SWT PASSWORD return layout Text Field text  createPasswordField layoutTextField
Layout a text or password field specific for this application param parent the parent of the new text field return the new text field protected Text layout Text Field Text text Grid Data data new Grid Data Grid Data FILL HORIZONTAL data vertical Alignment Grid Data CENTER data grab Excess Vertical Space false data width Hint I Dialog Constants ENTRY FIELD WIDTH data horizontal Span 2 text set Layout Data data return text  layoutTextField GridData GridData GridData FILL_HORIZONTAL verticalAlignment GridData grabExcessVerticalSpace widthHint IDialogConstants ENTRY_FIELD_WIDTH horizontalSpan setLayoutData
Utility method to create a radio button param parent the parent of the radio button param label the label of the radio button param span the number of columns to span return the created radio button protected Button create Radio Button Composite parent String label int span Button button new Button parent SWT RADIO button set Text label Grid Data data new Grid Data data horizontal Span span button set Layout Data data return button  createRadioButton setText GridData GridData horizontalSpan setLayoutData
Initializes the page private void initialize location null I Adaptable element get Element if element instanceof ICVS Repository Location location ICVS Repository Location element else Object adapter element get Adapter ICVS Repository Location class if adapter instanceof ICVS Repository Location location ICVS Repository Location adapter  IAdaptable getElement ICVSRepositoryLocation ICVSRepositoryLocation getAdapter ICVSRepositoryLocation ICVSRepositoryLocation ICVSRepositoryLocation
Set the initial values of the widgets private void initialize Values password Changed false connection Info Changed false I Connection Method methods CVS Repository Location get Plugged In Connection Methods for int i 0 i methods length i method Type add methods i get Name String method location get Method get Name method Type select method Type index Of method info location get User Info true user Text set Text info get Username password Text set Text FAKE PASSWORD host Text set Text location get Host int port location get Port if port ICVS Repository Location USE DEFAULT PORT use Default Port set Selection true use Custom Port set Selection false port Text set Enabled false else use Default Port set Selection false use Custom Port set Selection true port Text set Text port NON NLS 1 path Text set Text location get Root Directory allow Caching Button set Selection location get User Info Cached get the repository label String label null Repository Root root CVSUI Plugin get Plugin get Repository Manager get Repository Root For location label root get Name use Location As Label set Selection label null use Custom Label set Selection use Location As Label get Selection if label null label location get Location label Text set Text label  initializeValues passwordChanged connectionInfoChanged IConnectionMethod CVSRepositoryLocation getPluggedInConnectionMethods methodType getName getMethod getName methodType methodType indexOf getUserInfo userText setText getUsername passwordText setText FAKE_PASSWORD hostText setText getHost getPort ICVSRepositoryLocation USE_DEFAULT_PORT useDefaultPort setSelection useCustomPort setSelection portText setEnabled useDefaultPort setSelection useCustomPort setSelection portText setText pathText setText getRootDirectory allowCachingButton setSelection getUserInfoCached RepositoryRoot CVSUIPlugin getPlugin getRepositoryManager getRepositoryRootFor getName useLocationAsLabel setSelection useCustomLabel setSelection useLocationAsLabel getSelection getLocation labelText setText
PlatformUI get Workbench get Progress Service run false false new Workspace Modify Operation null public void execute I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try Create a new repository location with the new information CVS Repository Location new Location CVS Repository Location from Properties create Properties location set Allow Caching allow Caching try For each project shared with the old location set connection info to the new one List projects new Array List I Project all Projects Resources Plugin get Workspace get Root get Projects for int i 0 i all Projects length i Repository Provider team Provider Repository Provider get Provider all Projects i CVS Provider Plugin get Type Id if team Provider null CVS Team Provider cvs Provider CVS Team Provider team Provider if cvs Provider getCVS Workspace Root get Remote Location equals location projects add all Projects i if projects size 0 To do warn the user Details Dialog With Projects dialog new Details Dialog With Projects get Shell Policy bind CVS Repository Properties Page Confirm Project Sharing Changes 1 NON NLS 1 Policy bind CVS Repository Properties Page There are projects in the workspace shared with this repository 2 NON NLS 1 Policy bind CVS Repository Properties Page shared Project location to String NON NLS 1 I Project projects to Array new I Project projects size true Details Dialog With Projects DLG IMG WARNING int r dialog open if r Details Dialog With Projects OK result 0 false return monitor begin Task null 1000 projects size try Iterator it projects iterator while it has Next I Project project I Project it next Repository Provider team Provider Repository Provider get Provider project CVS Provider Plugin get Type Id CVS Team Provider cvs Provider CVS Team Provider team Provider cvs Provider set Remote Root new Location Policy sub Monitor For monitor 1000 finally monitor done Dispose the old repository location CVSUI Plugin get Plugin get Repository Manager replace Repository Location location new Location finally Even if we failed ensure that the new location appears in the repo view new Location CVS Repository Location Known Repositories get Instance add Repository new Location Known Repositories get Instance is Known Repository new Location get Location Set the location of the page to the new location in case Apply was chosen location new Location connection Info Changed false password Changed false catch Team Exception e throw new Invocation Target Exception e result 0 true  getWorkbench getProgressService WorkspaceModifyOperation IProgressMonitor InvocationTargetException InterruptedException CVSRepositoryLocation newLocation CVSRepositoryLocation fromProperties createProperties setAllowCaching allowCaching ArrayList IProject allProjects ResourcesPlugin getWorkspace getRoot getProjects allProjects RepositoryProvider teamProvider RepositoryProvider getProvider allProjects CVSProviderPlugin getTypeId teamProvider CVSTeamProvider cvsProvider CVSTeamProvider teamProvider cvsProvider getCVSWorkspaceRoot getRemoteLocation allProjects DetailsDialogWithProjects DetailsDialogWithProjects getShell CVSRepositoryPropertiesPage Confirm_Project_Sharing_Changes_1 CVSRepositoryPropertiesPage There_are_projects_in_the_workspace_shared_with_this_repository_2 CVSRepositoryPropertiesPage sharedProject toString IProject toArray IProject DetailsDialogWithProjects DLG_IMG_WARNING DetailsDialogWithProjects beginTask hasNext IProject IProject RepositoryProvider teamProvider RepositoryProvider getProvider CVSProviderPlugin getTypeId CVSTeamProvider cvsProvider CVSTeamProvider teamProvider cvsProvider setRemoteRoot newLocation subMonitorFor CVSUIPlugin getPlugin getRepositoryManager replaceRepositoryLocation newLocation newLocation CVSRepositoryLocation KnownRepositories getInstance addRepository newLocation KnownRepositories getInstance isKnownRepository newLocation getLocation newLocation connectionInfoChanged passwordChanged TeamException InvocationTargetException
private boolean perform Connection Info Changes Set the caching mode of the location if connection Info Changed location set Allow Caching allow Caching if password Changed CVS Repository Location location update Cache Don t do anything else if there wasn t a password or connection change if password Changed connection Info Changed return true try Check if the password was the only thing to change if password Changed connection Info Changed CVS Repository Location old Location CVS Repository Location location old Location set Password get New Password if allow Caching old Location update Cache password Changed false return true Otherwise change the connection info and the password This operation is done inside a workspace operation in case the sharing info for existing projects is changed if location get Host equals host Text get Text location get Root Directory equals path Text get Text The host or path has changed if Message Dialog open Confirm get Shell Policy bind CVS Repository Properties Page 0 NON NLS 1 Policy bind CVS Repository Properties Page 1 NON NLS 1 return false final boolean result new boolean false PlatformUI get Workbench get Progress Service run false false new Workspace Modify Operation null public void execute I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try Create a new repository location with the new information CVS Repository Location new Location CVS Repository Location from Properties create Properties location set Allow Caching allow Caching try For each project shared with the old location set connection info to the new one List projects new Array List I Project all Projects Resources Plugin get Workspace get Root get Projects for int i 0 i all Projects length i Repository Provider team Provider Repository Provider get Provider all Projects i CVS Provider Plugin get Type Id if team Provider null CVS Team Provider cvs Provider CVS Team Provider team Provider if cvs Provider getCVS Workspace Root get Remote Location equals location projects add all Projects i if projects size 0 To do warn the user Details Dialog With Projects dialog new Details Dialog With Projects get Shell Policy bind CVS Repository Properties Page Confirm Project Sharing Changes 1 NON NLS 1 Policy bind CVS Repository Properties Page There are projects in the workspace shared with this repository 2 NON NLS 1 Policy bind CVS Repository Properties Page shared Project location to String NON NLS 1 I Project projects to Array new I Project projects size true Details Dialog With Projects DLG IMG WARNING int r dialog open if r Details Dialog With Projects OK result 0 false return monitor begin Task null 1000 projects size try Iterator it projects iterator while it has Next I Project project I Project it next Repository Provider team Provider Repository Provider get Provider project CVS Provider Plugin get Type Id CVS Team Provider cvs Provider CVS Team Provider team Provider cvs Provider set Remote Root new Location Policy sub Monitor For monitor 1000 finally monitor done Dispose the old repository location CVSUI Plugin get Plugin get Repository Manager replace Repository Location location new Location finally Even if we failed ensure that the new location appears in the repo view new Location CVS Repository Location Known Repositories get Instance add Repository new Location Known Repositories get Instance is Known Repository new Location get Location Set the location of the page to the new location in case Apply was chosen location new Location connection Info Changed false password Changed false catch Team Exception e throw new Invocation Target Exception e result 0 true return result 0 catch Invocation Target Exception e handle e catch Interrupted Exception e return false we only get here if an exception occurred  performConnectionInfoChanges connectionInfoChanged setAllowCaching allowCaching passwordChanged CVSRepositoryLocation updateCache passwordChanged connectionInfoChanged passwordChanged connectionInfoChanged CVSRepositoryLocation oldLocation CVSRepositoryLocation oldLocation setPassword getNewPassword allowCaching oldLocation updateCache passwordChanged getHost hostText getText getRootDirectory pathText getText MessageDialog openConfirm getShell CVSRepositoryPropertiesPage CVSRepositoryPropertiesPage getWorkbench getProgressService WorkspaceModifyOperation IProgressMonitor InvocationTargetException InterruptedException CVSRepositoryLocation newLocation CVSRepositoryLocation fromProperties createProperties setAllowCaching allowCaching ArrayList IProject allProjects ResourcesPlugin getWorkspace getRoot getProjects allProjects RepositoryProvider teamProvider RepositoryProvider getProvider allProjects CVSProviderPlugin getTypeId teamProvider CVSTeamProvider cvsProvider CVSTeamProvider teamProvider cvsProvider getCVSWorkspaceRoot getRemoteLocation allProjects DetailsDialogWithProjects DetailsDialogWithProjects getShell CVSRepositoryPropertiesPage Confirm_Project_Sharing_Changes_1 CVSRepositoryPropertiesPage There_are_projects_in_the_workspace_shared_with_this_repository_2 CVSRepositoryPropertiesPage sharedProject toString IProject toArray IProject DetailsDialogWithProjects DLG_IMG_WARNING DetailsDialogWithProjects beginTask hasNext IProject IProject RepositoryProvider teamProvider RepositoryProvider getProvider CVSProviderPlugin getTypeId CVSTeamProvider cvsProvider CVSTeamProvider teamProvider cvsProvider setRemoteRoot newLocation subMonitorFor CVSUIPlugin getPlugin getRepositoryManager replaceRepositoryLocation newLocation newLocation CVSRepositoryLocation KnownRepositories getInstance addRepository newLocation KnownRepositories getInstance isKnownRepository newLocation getLocation newLocation connectionInfoChanged passwordChanged TeamException InvocationTargetException InvocationTargetException InterruptedException
private void perform Non Connection Info Changes record New Label CVS Repository Location location  performNonConnectionInfoChanges recordNewLabel CVSRepositoryLocation
public boolean perform Ok if perform Connection Info Changes perform Non Connection Info Changes return true return false  performOk performConnectionInfoChanges performNonConnectionInfoChanges
see org eclipse jface preference Preference Page perform Defaults protected void perform Defaults super perform Defaults initialize Values  PreferencePage performDefaults performDefaults performDefaults initializeValues
Shows the given errors to the user protected void handle Throwable e CVSUI Plugin open Error get Shell null null e  CVSUIPlugin openError getShell
Updates widget enablements and sets error message if appropriate protected void update Widget Enablements if use Location As Label get Selection label Text set Enabled false else label Text set Enabled true if use Default Port get Selection port Text set Enabled false else port Text set Enabled true validate Fields  updateWidgetEnablements useLocationAsLabel getSelection labelText setEnabled labelText setEnabled useDefaultPort getSelection portText setEnabled portText setEnabled validateFields
private void validate Fields if label Text is Enabled if label Text get Text length 0 set Valid false return String user user Text get Text I Status status Configuration Wizard Main Page validate User Name user if is StatusOK status return String host host Text get Text status Configuration Wizard Main Page validate Host host if is StatusOK status return if port Text is Enabled String port port Text get Text status Configuration Wizard Main Page validate Port port if is StatusOK status return String path String path Text get Text if is StatusOK status return set Error Message null set Valid true  validateFields labelText isEnabled labelText getText setValid userText getText IStatus ConfigurationWizardMainPage validateUserName isStatusOK hostText getText ConfigurationWizardMainPage validateHost isStatusOK portText isEnabled portText getText ConfigurationWizardMainPage validatePort isStatusOK pathString pathText getText isStatusOK setErrorMessage setValid
private boolean is StatusOK I Status status if status isOK set Error Message status get Message set Valid false return false return true  isStatusOK IStatus setErrorMessage getMessage setValid
private void record New Label CVS Repository Location location String new Label get New Label location if new Label null String old Label get Old Label location if old Label null old Label equals location get Location return else if new Label equals get Old Label location return try CVSUI Plugin get Plugin get Repository Manager set Label location new Label catch CVS Exception e CVSUI Plugin log e  recordNewLabel CVSRepositoryLocation newLabel getNewLabel newLabel oldLabel getOldLabel oldLabel oldLabel getLocation newLabel getOldLabel CVSUIPlugin getPlugin getRepositoryManager setLabel newLabel CVSException CVSUIPlugin
private String get Old Label CVS Repository Location location return CVSUI Plugin get Plugin get Repository Manager get Repository Root For location get Name  getOldLabel CVSRepositoryLocation CVSUIPlugin getPlugin getRepositoryManager getRepositoryRootFor getName
private String get New Label CVS Repository Location location String label null if use Custom Label get Selection label label Text get Text if label equals location get Location label null return label  getNewLabel CVSRepositoryLocation useCustomLabel getSelection labelText getText getLocation
return label internal use only String get New Password return password Text get Text  getNewPassword passwordText getText
private Properties create Properties Properties result new Properties result set Property connection method Type get Text NON NLS 1 result set Property user user Text get Text NON NLS 1 if password Changed result set Property password password Text get Text NON NLS 1 result set Property host host Text get Text NON NLS 1 if use Custom Port get Selection result set Property port port Text get Text NON NLS 1 result set Property root path Text get Text NON NLS 1 return result  createProperties setProperty methodType getText setProperty userText getText passwordChanged setProperty passwordText getText setProperty hostText getText useCustomPort getSelection setProperty portText getText setProperty pathText getText

Returns the selected CVS Repository locations protected ICVS Repository Location get Selected Repository Locations Array List tags new Array List if selection is Empty Iterator elements selection iterator while elements has Next Object element elements next Object adapter get Adapter element ICVS Repository Location class if adapter null tags add adapter else adapter get Adapter element Branch Category class if adapter null tags add Branch Category adapter get Repository adapter return ICVS Repository Location tags to Array new ICVS Repository Location tags size  ICVSRepositoryLocation getSelectedRepositoryLocations ArrayList ArrayList isEmpty hasNext getAdapter ICVSRepositoryLocation getAdapter BranchCategory BranchCategory getRepository ICVSRepositoryLocation toArray ICVSRepositoryLocation

Create an encoding filed editor param name the name of the preference this field editor works on param label Text the label text of the field editor param parent the parent of the field editor s control public Encoding Field Editor String name String label Text Composite parent super name label Text parent  labelText EncodingFieldEditor labelText labelText
see org eclipse jface preference Field Editor adjust For Num Columns int protected void adjust For Num Columns int num Columns Grid Data get Container get Layout Data horizontal Span num Columns  FieldEditor adjustForNumColumns adjustForNumColumns numColumns GridData getContainer getLayoutData horizontalSpan numColumns
see org eclipse jface preference Field Editor do Fill Into Grid org eclipse swt widgets Composite int protected void do Fill Into Grid Composite parent int num Columns container create Encoding Group parent num Columns  FieldEditor doFillIntoGrid doFillIntoGrid numColumns createEncodingGroup numColumns
protected void do Load if encoding Combo null String value get Preference Store get String get Preference Name if value equals default Enc do Load Default else encoding Combo set Text value old Selected Encoding value update Encoding State false  doLoad encodingCombo getPreferenceStore getString getPreferenceName defaultEnc doLoadDefault encodingCombo setText oldSelectedEncoding updateEncodingState
see org eclipse jface preference Field Editor do Load Default protected void do Load Default update Encoding State true  FieldEditor doLoadDefault doLoadDefault updateEncodingState
protected void do Store String encoding get Selected Encoding if encoding equals default Enc get Preference Store set To Default get Preference Name else get Preference Store set Value get Preference Name encoding  doStore getSelectedEncoding defaultEnc getPreferenceStore setToDefault getPreferenceName getPreferenceStore setValue getPreferenceName
see org eclipse jface preference Field Editor get Number Of Controls public int get Number Of Controls return 1  FieldEditor getNumberOfControls getNumberOfControls
see org eclipse jface preference Field Editor is Valid public boolean is Valid return is Valid  FieldEditor isValid isValid isValid
see org eclipse jface preference Field Editor refresh Valid State protected void refresh Valid State update Valid State  FieldEditor refreshValidState refreshValidState updateValidState
public void set Preference Store I Preference Store store super set Preference Store store default Enc store get Default String get Preference Name update Default Encoding  setPreferenceStore IPreferenceStore setPreferenceStore defaultEnc getDefaultString getPreferenceName updateDefaultEncoding
private void update Default Encoding default Encoding Button set Text IDE Workbench Messages format Workbench Preference default Encoding new String default Enc NON NLS 1  updateDefaultEncoding defaultEncodingButton setText IDEWorkbenchMessages WorkbenchPreference defaultEncoding defaultEnc
private Composite get Container return container  getContainer
Selection Adapter button Listener new Selection Adapter public void widget Selected Selection Event e update Encoding State default Encoding Button get Selection update Valid State  SelectionAdapter buttonListener SelectionAdapter widgetSelected SelectionEvent updateEncodingState defaultEncodingButton getSelection updateValidState
encoding Combo set Layout Data data encoding Combo add Modify Listener new Modify Listener public void modify Text Modify Event e update Valid State  encodingCombo setLayoutData encodingCombo addModifyListener ModifyListener modifyText ModifyEvent updateValidState
encoding Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Valid State  encodingCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateValidState
private Group create Encoding Group Composite parent int num Columns Font font parent get Font Group group new Group parent SWT NONE Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span num Columns group set Layout Data data Grid Layout layout new Grid Layout layout num Columns 2 group set Layout layout group set Text get Label Text NON NLS 1 group set Font font Selection Adapter button Listener new Selection Adapter public void widget Selected Selection Event e update Encoding State default Encoding Button get Selection update Valid State if default Enc null default Enc System get Property file encoding UTF 8 NON NLS 1 NON NLS 2 default Encoding Button new Button group SWT RADIO update Default Encoding data new Grid Data data horizontal Span 2 default Encoding Button set Layout Data data default Encoding Button add Selection Listener button Listener default Encoding Button set Font font other Encoding Button new Button group SWT RADIO other Encoding Button set Text IDE Workbench Messages get String Workbench Preference other Encoding NON NLS 1 other Encoding Button add Selection Listener button Listener other Encoding Button set Font font encoding Combo new Combo group SWT NONE encoding Combo set Font font data new Grid Data data width Hint convert Width In Chars To Pixels encoding Combo 15 encoding Combo set Layout Data data encoding Combo add Modify Listener new Modify Listener public void modify Text Modify Event e update Valid State encoding Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Valid State Array List encodings new Array List int n 0 try n Integer parse Int IDE Workbench Messages get String Workbench Preference num Default Encodings NON NLS 1 catch Number Format Exception e Ignore for int i 0 i n i String enc IDE Workbench Messages get String Workbench Preference default Encoding i 1 null NON NLS 1 if enc null encodings add enc if encodings contains default Enc encodings add default Enc String enc Resources Plugin get Plugin get Plugin Preferences get String Resources Plugin PREF ENCODING boolean is Default enc null enc length 0 if is Default encodings contains enc encodings add enc Collections sort encodings for int i 0 i encodings size i encoding Combo add String encodings get i encoding Combo set Text is Default default Enc enc update Encoding State is Default return group  createEncodingGroup numColumns getFont GridData GridData GridData FILL_HORIZONTAL horizontalSpan numColumns setLayoutData GridLayout GridLayout numColumns setLayout setText getLabelText setFont SelectionAdapter buttonListener SelectionAdapter widgetSelected SelectionEvent updateEncodingState defaultEncodingButton getSelection updateValidState defaultEnc defaultEnc getProperty defaultEncodingButton updateDefaultEncoding GridData horizontalSpan defaultEncodingButton setLayoutData defaultEncodingButton addSelectionListener buttonListener defaultEncodingButton setFont otherEncodingButton otherEncodingButton setText IDEWorkbenchMessages getString WorkbenchPreference otherEncoding otherEncodingButton addSelectionListener buttonListener otherEncodingButton setFont encodingCombo encodingCombo setFont GridData widthHint convertWidthInCharsToPixels encodingCombo encodingCombo setLayoutData encodingCombo addModifyListener ModifyListener modifyText ModifyEvent updateValidState encodingCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateValidState ArrayList ArrayList parseInt IDEWorkbenchMessages getString WorkbenchPreference numDefaultEncodings NumberFormatException IDEWorkbenchMessages getString WorkbenchPreference defaultEncoding defaultEnc defaultEnc ResourcesPlugin getPlugin getPluginPreferences getString ResourcesPlugin PREF_ENCODING isDefault isDefault encodingCombo encodingCombo setText isDefault defaultEnc updateEncodingState isDefault
private int convert Width In Chars To Pixels Control control int chars GC gc new GC control gc set Font control get Font Font Metrics font Metrics gc get Font Metrics int result Dialog convert Width In Chars To Pixels font Metrics chars gc dispose return result  convertWidthInCharsToPixels setFont getFont FontMetrics fontMetrics getFontMetrics convertWidthInCharsToPixels fontMetrics
private void update Encoding State boolean use Default default Encoding Button set Selection use Default other Encoding Button set Selection use Default encoding Combo set Enabled use Default update Valid State  updateEncodingState useDefault defaultEncodingButton setSelection useDefault otherEncodingButton setSelection useDefault encodingCombo setEnabled useDefault updateValidState
private void update Valid State boolean is Valid Now is Encoding Valid if is Valid Now is Valid is Valid is Valid Now if is Valid clear Error Message else show Error Message IDE Workbench Messages get String Workbench Preference unsupported Encoding NON NLS 1 fire State Changed IS VALID is Valid is Valid String new Value get Selected Encoding if is Valid new Value equals old Selected Encoding fire Value Changed VALUE old Selected Encoding new Value old Selected Encoding new Value  updateValidState isValidNow isEncodingValid isValidNow isValid isValid isValidNow isValid clearErrorMessage showErrorMessage IDEWorkbenchMessages getString WorkbenchPreference unsupportedEncoding fireStateChanged IS_VALID isValid isValid newValue getSelectedEncoding isValid newValue oldSelectedEncoding fireValueChanged oldSelectedEncoding newValue oldSelectedEncoding newValue
private String get Selected Encoding if default Encoding Button get Selection return default Enc else return encoding Combo get Text  getSelectedEncoding defaultEncodingButton getSelection defaultEnc encodingCombo getText
private boolean is Encoding Valid return default Encoding Button get Selection is Valid Encoding encoding Combo get Text  isEncodingValid defaultEncodingButton getSelection isValidEncoding encodingCombo getText
private boolean is Valid Encoding String enc try new String new byte 0 enc return true catch Unsupported Encoding Exception e return false  isValidEncoding UnsupportedEncodingException

public class NewCVS Repository Action extends Action public void run Shell shell I Workbench Window window CVSUI Plugin get Plugin get Workbench get Active Workbench Window if window null shell window get Shell else Display display Display get Current shell new Shell display New Location Wizard wizard new New Location Wizard Wizard Dialog dialog new Wizard Dialog shell wizard dialog open  NewCVSRepositoryAction IWorkbenchWindow CVSUIPlugin getPlugin getWorkbench getActiveWorkbenchWindow getShell getCurrent NewLocationWizard NewLocationWizard WizardDialog WizardDialog

protected void execute I Action action throws Invocation Target Exception Interrupted Exception ICVS Repository Location locations get Selected Repository Locations if locations length 1 return CVS Tag tag get Date Tag get Shell locations 0 CVSUI Plugin get Plugin get Repository Manager add Date Tag locations 0 tag  IAction InvocationTargetException InterruptedException ICVSRepositoryLocation getSelectedRepositoryLocations CVSTag getDateTag getShell CVSUIPlugin getPlugin getRepositoryManager addDateTag
public static CVS Tag get Date Tag Shell shell ICVS Repository Location location Date Tag Dialog dialog new Date Tag Dialog shell if dialog open Window OK Date date dialog get Date CVS Tag tag new CVS Tag date return tag return null  CVSTag getDateTag ICVSRepositoryLocation DateTagDialog DateTagDialog getDate CVSTag CVSTag
protected boolean is Enabled ICVS Repository Location locations get Selected Repository Locations if locations length 1 return false return true  isEnabled ICVSRepositoryLocation getSelectedRepositoryLocations

private class Input Element implements I Workbench Adapter I Adaptable public Object get Children Object o return root Folders  InputElement IWorkbenchAdapter IAdaptable getChildren rootFolders
return root Folders public Image Descriptor get Image Descriptor Object object return null  rootFolders ImageDescriptor getImageDescriptor
return null public String get Label Object o return null  getLabel
return null public Object get Parent Object o return null  getParent
return null public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter
Constructor for Remote Project Selection Page param page Name param title param title Image param description public Refresh Remote Project Selection Page String page Name String title Image Descriptor title Image String description Dialog parent Dialog I Dialog Settings settings ICVS Repository Location root ICVS Remote Resource root Folders super page Name title title Image description this parent Dialog parent Dialog this settings settings this root root this root Folders root Folders  RemoteProjectSelectionPage pageName titleImage RefreshRemoteProjectSelectionPage pageName ImageDescriptor titleImage parentDialog IDialogSettings ICVSRepositoryLocation ICVSRemoteResource rootFolders pageName titleImage parentDialog parentDialog rootFolders rootFolders
list Area create Area composite list Area add Property Change Listener new I Property Change Listener public void property Change Property Change Event event update Enablement  listArea createArea listArea addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent updateEnablement
set Working Set working Set working Set Area add Property Change Listener new I Property Change Listener public void property Change Property Change Event event working Set I Working Set event get New Value handle Working Set Change  setWorkingSet workingSet workingSetArea addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent workingSet IWorkingSet getNewValue handleWorkingSetChange
see org eclipse jface dialogs I Dialog Page create Control org eclipse swt widgets Composite public void create Control Composite parent Composite composite create Composite parent 1 set Control composite set F1 help Workbench Help set Help composite I Help Context Ids REFRESH REMOTE PROJECT SELECTION PAGE list Area new List Selection Area parent Dialog new Input Element new Remote Content Provider new Workbench Label Provider Policy bind Refresh Remote Project Selection Page select Remote Projects NON NLS 1 list Area create Area composite list Area add Property Change Listener new I Property Change Listener public void property Change Property Change Event event update Enablement list Area get Viewer set Sorter new Repository Sorter working Set Area new Working Set Selection Area parent Dialog Policy bind Refresh Remote Project Selection Page no Working Set Policy bind Refresh Remote Project Selection Page working Set settings NON NLS 1 NON NLS 2 set Working Set working Set working Set Area add Property Change Listener new I Property Change Listener public void property Change Property Change Event event working Set I Working Set event get New Value handle Working Set Change working Set Area create Area composite Dialog apply Dialog Font parent  IDialogPage createControl createControl createComposite setControl WorkbenchHelp setHelp IHelpContextIds REFRESH_REMOTE_PROJECT_SELECTION_PAGE listArea ListSelectionArea parentDialog InputElement RemoteContentProvider WorkbenchLabelProvider RefreshRemoteProjectSelectionPage selectRemoteProjects listArea createArea listArea addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent updateEnablement listArea getViewer setSorter RepositorySorter workingSetArea WorkingSetSelectionArea parentDialog RefreshRemoteProjectSelectionPage noWorkingSet RefreshRemoteProjectSelectionPage workingSet setWorkingSet workingSet workingSetArea addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent workingSet IWorkingSet getNewValue handleWorkingSetChange workingSetArea createArea applyDialogFont
Sets the working set that should be selected in the most recently used working set list param working Set the working set that should be selected has to exist in the list returned by org eclipse ui I Working Set Manager get Recent Working Sets Must not be null public void set Working Set I Working Set working Set this working Set working Set if working Set Area null working Set Area set Working Set working Set  workingSet IWorkingSetManager getRecentWorkingSets setWorkingSet IWorkingSet workingSet workingSet workingSet workingSetArea workingSetArea setWorkingSet workingSet
private void handle Working Set Change if working Set null check any projects in the working set list Area get Viewer set All Checked false Repository Manager manager CVSUI Plugin get Plugin get Repository Manager ICVS Remote Resource resources manager filter Resources working Set root Folders for int i 0 i resources length i ICVS Remote Resource resource resources i list Area get Viewer set Checked resource true  handleWorkingSetChange workingSet listArea getViewer setAllChecked RepositoryManager CVSUIPlugin getPlugin getRepositoryManager ICVSRemoteResource filterResources workingSet rootFolders ICVSRemoteResource listArea getViewer setChecked
private void update Enablement boolean at Least One list Area get Viewer get Checked Elements length 0 set Page Complete at Least One  updateEnablement atLeastOne listArea getViewer getCheckedElements setPageComplete atLeastOne
Method get Selected Remote Project return ICVS Remote Resource public ICVS Remote Resource get Selected Remote Project Object checked list Area get Viewer get Checked Elements return ICVS Remote Resource Arrays as List checked to Array new ICVS Remote Resource checked length  getSelectedRemoteProject ICVSRemoteResource ICVSRemoteResource getSelectedRemoteProject listArea getViewer getCheckedElements ICVSRemoteResource asList toArray ICVSRemoteResource

public static boolean execute Shell shell final ICVS Repository Location root final ICVS Remote Resource root Folders new ICVS Remote Resource 1 0 root Folders 0 null try new Progress Monitor Dialog shell run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try root Folders 0 CVSUI Plugin get Plugin get Repository Manager get Folders For Tag root CVS Tag DEFAULT monitor catch CVS Exception e throw new Invocation Target Exception e catch Invocation Target Exception e CVSUI Plugin open Error shell null null e return false catch Interrupted Exception e return false Refresh Remote Project Wizard wizard new Refresh Remote Project Wizard root root Folders 0 Wizard Dialog dialog new Wizard Dialog shell wizard wizard set Parent Dialog dialog return dialog open Window OK  ICVSRepositoryLocation ICVSRemoteResource rootFolders ICVSRemoteResource rootFolders ProgressMonitorDialog IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException rootFolders CVSUIPlugin getPlugin getRepositoryManager getFoldersForTag CVSTag CVSException InvocationTargetException InvocationTargetException CVSUIPlugin openError InterruptedException RefreshRemoteProjectWizard RefreshRemoteProjectWizard rootFolders WizardDialog WizardDialog setParentDialog
public Refresh Remote Project Wizard ICVS Repository Location root ICVS Remote Resource root Folders this root root this root Folders root Folders I Dialog Settings workbench Settings CVSUI Plugin get Plugin get Dialog Settings this settings workbench Settings get Section Refresh Remote Project Wizard NON NLS 1 if settings null this settings workbench Settings add New Section Refresh Remote Project Wizard NON NLS 1 set Window Title Policy bind Refresh Remote Project Wizard title NON NLS 1  RefreshRemoteProjectWizard ICVSRepositoryLocation ICVSRemoteResource rootFolders rootFolders rootFolders IDialogSettings workbenchSettings CVSUIPlugin getPlugin getDialogSettings workbenchSettings getSection RefreshRemoteProjectWizard workbenchSettings addNewSection RefreshRemoteProjectWizard setWindowTitle RefreshRemoteProjectWizard
see org eclipse jface wizard I Wizard add Pages public void add Pages set Needs Progress Monitor true Image Descriptor subst Image CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG WIZBAN NEW LOCATION project Selection Page new Refresh Remote Project Selection Page Project Selection Page NON NLS 1 Policy bind Refresh Remote Project Selection Page page Title NON NLS 1 subst Image Policy bind Refresh Remote Project Selection Page page Description NON NLS 1 parent Dialog settings root root Folders add Page project Selection Page  IWizard addPages addPages setNeedsProgressMonitor ImageDescriptor substImage CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_WIZBAN_NEW_LOCATION projectSelectionPage RefreshRemoteProjectSelectionPage ProjectSelectionPage RefreshRemoteProjectSelectionPage pageTitle substImage RefreshRemoteProjectSelectionPage pageDescription parentDialog rootFolders addPage projectSelectionPage
manager run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task null 100 selected Folders length try for int i 0 i selected Folders length i ICVS Remote Resource resource selected Folders i if resource instanceof ICVS Folder manager refresh Defined Tags ICVS Folder resource true replace true Policy sub Monitor For monitor 100 catch Team Exception e throw new Invocation Target Exception e finally monitor done  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask selectedFolders selectedFolders ICVSRemoteResource selectedFolders ICVSFolder refreshDefinedTags ICVSFolder subMonitorFor TeamException InvocationTargetException
get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception final Repository Manager manager CVSUI Plugin get Plugin get Repository Manager Run in the manager to avoid multiple repo view updates manager run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task null 100 selected Folders length try for int i 0 i selected Folders length i ICVS Remote Resource resource selected Folders i if resource instanceof ICVS Folder manager refresh Defined Tags ICVS Folder resource true replace true Policy sub Monitor For monitor 100 catch Team Exception e throw new Invocation Target Exception e finally monitor done monitor  getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException RepositoryManager CVSUIPlugin getPlugin getRepositoryManager IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask selectedFolders selectedFolders ICVSRemoteResource selectedFolders ICVSFolder refreshDefinedTags ICVSFolder subMonitorFor TeamException InvocationTargetException
see org eclipse jface wizard Wizard perform Finish public boolean perform Finish final ICVS Remote Resource selected Folders project Selection Page get Selected Remote Project try get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception final Repository Manager manager CVSUI Plugin get Plugin get Repository Manager Run in the manager to avoid multiple repo view updates manager run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task null 100 selected Folders length try for int i 0 i selected Folders length i ICVS Remote Resource resource selected Folders i if resource instanceof ICVS Folder manager refresh Defined Tags ICVS Folder resource true replace true Policy sub Monitor For monitor 100 catch Team Exception e throw new Invocation Target Exception e finally monitor done monitor return true catch Invocation Target Exception e CVSUI Plugin open Error get Shell null null e catch Interrupted Exception e return false  performFinish performFinish ICVSRemoteResource selectedFolders projectSelectionPage getSelectedRemoteProject getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException RepositoryManager CVSUIPlugin getPlugin getRepositoryManager IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask selectedFolders selectedFolders ICVSRemoteResource selectedFolders ICVSFolder refreshDefinedTags ICVSFolder subMonitorFor TeamException InvocationTargetException InvocationTargetException CVSUIPlugin openError getShell InterruptedException
Sets the parent Dialog param parent Dialog The parent Dialog to set public void set Parent Dialog Dialog parent Dialog this parent Dialog parent Dialog  parentDialog parentDialog parentDialog setParentDialog parentDialog parentDialog parentDialog

see org eclipse team internal ccvs ui actions CVS Action execute org eclipse jface action I Action protected void execute I Action action ICVS Repository Location locations get Selected Repository Locations Refresh Remote Project Wizard execute get Shell locations 0  CVSAction IAction IAction ICVSRepositoryLocation getSelectedRepositoryLocations RefreshRemoteProjectWizard getShell
see org eclipse team internal ui actions Team Action is Enabled protected boolean is Enabled ICVS Repository Location locations get Selected Repository Locations if locations length 1 return false return true  TeamAction isEnabled isEnabled ICVSRepositoryLocation getSelectedRepositoryLocations

Constructor for Remote Projects View param part Name public Remote Projects View super VIEW ID  RemoteProjectsView partName RemoteProjectsView VIEW_ID
protected void initialize Listeners listen for selection changes in the repo view get Site get Workbench Window get Selection Service add Post Selection Listener Repositories View VIEW ID this get Site get Workbench Window get Selection Service add Post Selection Listener Remote Tags View VIEW ID this  initializeListeners getSite getWorkbenchWindow getSelectionService addPostSelectionListener RepositoriesView VIEW_ID getSite getWorkbenchWindow getSelectionService addPostSelectionListener RemoteTagsView VIEW_ID
see org eclipse ui I Workbench Part dispose public void dispose get Site get Workbench Window get Selection Service remove Post Selection Listener Repositories View VIEW ID this get Site get Workbench Window get Selection Service remove Post Selection Listener Remote Tags View VIEW ID this super dispose  IWorkbenchPart getSite getWorkbenchWindow getSelectionService removePostSelectionListener RepositoriesView VIEW_ID getSite getWorkbenchWindow getSelectionService removePostSelectionListener RemoteTagsView VIEW_ID
see org eclipse ui I Selection Listener selection Changed org eclipse ui I Workbench Part org eclipse jface viewers I Selection public void selection Changed I Workbench Part part I Selection selection Object selected Team Action get Selected Adaptables selection ICVS Repository Location class if selected length 0 root set Root ICVS Repository Location selected 0 else selected Team Action get Selected Adaptables selection CVS Tag Element class if selected length 0 CVS Tag Element element CVS Tag Element selected 0 root set Root element get Root root set Tag element get Tag refresh Viewer  ISelectionListener selectionChanged IWorkbenchPart ISelection selectionChanged IWorkbenchPart ISelection TeamAction getSelectedAdaptables ICVSRepositoryLocation setRoot ICVSRepositoryLocation TeamAction getSelectedAdaptables CVSTagElement CVSTagElement CVSTagElement setRoot getRoot setTag getTag refreshViewer
see org eclipse team internal ccvs ui repo Remote View Part get Tree Input protected Object get Tree Input root new Remote Projects Element return root  RemoteViewPart getTreeInput getTreeInput RemoteProjectsElement

Constructor for Remote Tags View param part Name public Remote Tags View super VIEW ID  RemoteTagsView partName RemoteTagsView VIEW_ID
see org eclipse team internal ccvs ui repo Remote View Part get Tree Input protected Object get Tree Input return null  RemoteViewPart getTreeInput getTreeInput
protected void initialize Listeners listen for selection changes in the repo view get Site get Workbench Window get Selection Service add Post Selection Listener Repositories View VIEW ID this  initializeListeners getSite getWorkbenchWindow getSelectionService addPostSelectionListener RepositoriesView VIEW_ID
see org eclipse ui I Workbench Part dispose public void dispose get Site get Workbench Window get Selection Service remove Post Selection Listener Repositories View VIEW ID this super dispose  IWorkbenchPart getSite getWorkbenchWindow getSelectionService removePostSelectionListener RepositoriesView VIEW_ID
see org eclipse ui I Selection Listener selection Changed org eclipse ui I Workbench Part org eclipse jface viewers I Selection public void selection Changed I Workbench Part part I Selection selection Object selected Team Action get Selected Adaptables selection ICVS Repository Location class if selected length 0 get Viewer set Input null else get Viewer set Input ICVS Repository Location selected 0 refresh Viewer  ISelectionListener selectionChanged IWorkbenchPart ISelection selectionChanged IWorkbenchPart ISelection TeamAction getSelectedAdaptables ICVSRepositoryLocation getViewer setInput getViewer setInput ICVSRepositoryLocation refreshViewer

private class Change Working Set Action extends Action String name public Change Working Set Action String name int index super Policy bind Repositories View working Set Menu Item new Integer index to String name NON NLS 1 this name name  ChangeWorkingSetAction ChangeWorkingSetAction RepositoriesView workingSetMenuItem toString
this name name public void run I Working Set Manager manager PlatformUI get Workbench get Working Set Manager set Working Set manager get Working Set name true  IWorkingSetManager getWorkbench getWorkingSetManager setWorkingSet getWorkingSet
protected Remote View Part String part Name I Dialog Settings workbench Settings CVSUI Plugin get Plugin get Dialog Settings settings workbench Settings get Section part Name if settings null settings workbench Settings add New Section part Name String name settings get SELECTED WORKING SET I Working Set set null if name null set PlatformUI get Workbench get Working Set Manager get Working Set name set Working Set set false  RemoteViewPart partName IDialogSettings workbenchSettings CVSUIPlugin getPlugin getDialogSettings workbenchSettings getSection partName workbenchSettings addNewSection partName SELECTED_WORKING_SET IWorkingSet getWorkbench getWorkingSetManager getWorkingSet setWorkingSet
see org eclipse ui part Workbench Part create Part Control org eclipse swt widgets Composite public void create Part Control Composite parent viewer new Tree Viewer parent SWT MULTI SWT H SCROLL SWT V SCROLL viewer set Content Provider get Content Provider viewer set Label Provider new Workbench Label Provider get Site set Selection Provider viewer viewer set Input get Tree Input viewer set Sorter new Repository Sorter viewer get Control add Key Listener get Key Listener drill Part new Drill Down Adapter viewer contribute Actions initialize Listeners F1 Help String helpID get Help Context Id if helpID null Workbench Help set Help viewer get Control helpID  WorkbenchPart createPartControl createPartControl TreeViewer H_SCROLL V_SCROLL setContentProvider getContentProvider setLabelProvider WorkbenchLabelProvider getSite setSelectionProvider setInput getTreeInput setSorter RepositorySorter getControl addKeyListener getKeyListener drillPart DrillDownAdapter contributeActions initializeListeners getHelpContextId WorkbenchHelp setHelp getControl
see Workbench Part set Focus public void set Focus viewer get Control set Focus  WorkbenchPart setFocus setFocus getControl setFocus
Method get Help Context Id should be overridden by subclasses to provide the appropriate help id return String protected String get Help Context Id return null  getHelpContextId getHelpContextId
Method get Tree Input return Object  getTreeInput
see org eclipse team internal ccvs ui repo Remote View Part get Content Provider protected Remote Content Provider get Content Provider if content Provider null content Provider new Remote Content Provider return content Provider  RemoteViewPart getContentProvider RemoteContentProvider getContentProvider contentProvider contentProvider RemoteContentProvider contentProvider
protected Key Adapter get Key Listener return new Key Adapter public void key Pressed Key Event event if event key Code SWT F5 refresh Action run  KeyAdapter getKeyListener KeyAdapter keyPressed KeyEvent keyCode refreshAction
protected void initialize Listeners listen for selection changes in the repo view get Site get Workbench Window get Selection Service add Post Selection Listener this  initializeListeners getSite getWorkbenchWindow getSelectionService addPostSelectionListener
protected I Working Set get Working Set return get Content Provider get Working Set  IWorkingSet getWorkingSet getContentProvider getWorkingSet
protected void set Working Set I Working Set working Set boolean refresh Viewer if settings null String name null if working Set null name working Set get Name settings put SELECTED WORKING SET name get Content Provider set Working Set working Set String tool Tip if working Set null tool Tip null else tool Tip Policy bind Remote View Part working Set Tool Tip working Set get Name NON NLS 1 set Title Tool Tip tool Tip if refresh Viewer refresh Viewer  setWorkingSet IWorkingSet workingSet refreshViewer workingSet workingSet getName SELECTED_WORKING_SET getContentProvider setWorkingSet workingSet toolTip workingSet toolTip toolTip RemoteViewPart workingSetToolTip workingSet getName setTitleToolTip toolTip refreshViewer refreshViewer
CVSUI Plugin plugin CVSUI Plugin get Plugin refresh Action new Action Policy bind Repositories View refresh CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG REFRESH ENABLED NON NLS 1 public void run refresh All  CVSUIPlugin CVSUIPlugin getPlugin refreshAction RepositoriesView CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_REFRESH_ENABLED refreshAll
collapse All Action new Action Policy bind Repositories View collapse All CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG COLLAPSE ALL ENABLED NON NLS 1 public void run collapse All  collapseAllAction RepositoriesView collapseAll CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_COLLAPSE_ALL_ENABLED collapseAll
select Working Set Action new Action Policy bind Repositories View new Working Set NON NLS 1 public void run I Working Set Manager manager PlatformUI get Workbench get Working Set Manager I Working Set Selection Dialog dialog manager create Working Set Selection Dialog shell false I Working Set working Set null if working Set null dialog set Selection new I Working Set working Set if dialog open Window OK I Working Set result dialog get Selection if result null result length 0 set Working Set result 0 true manager add Recent Working Set result 0 else set Working Set null true  selectWorkingSetAction RepositoriesView newWorkingSet IWorkingSetManager getWorkbench getWorkingSetManager IWorkingSetSelectionDialog createWorkingSetSelectionDialog IWorkingSet workingSet workingSet setSelection IWorkingSet workingSet IWorkingSet getSelection setWorkingSet addRecentWorkingSet setWorkingSet
Deselect Working Set popup deselect Working Set Action new Action Policy bind Repositories View deselect Working Set NON NLS 1 public void run set Working Set null true  deselectWorkingSetAction RepositoriesView deselectWorkingSet setWorkingSet
edit Working Set Action new Action Policy bind Repositories View edit Working Set NON NLS 1 public void run I Working Set Manager manager PlatformUI get Workbench get Working Set Manager I Working Set working Set get Working Set if working Set null set Enabled false return I Working Set Edit Wizard wizard manager create Working Set Edit Wizard working Set if wizard null todo String title Policy bind Edit Working Set Action error nowizard title NON NLS 1 String message Policy bind Edit Working Set Action error nowizard message NON NLS 1 CVSUI Plugin open Error shell title message null return Wizard Dialog dialog new Wizard Dialog shell wizard dialog create if dialog open Wizard Dialog OK set Working Set wizard get Selection true  editWorkingSetAction RepositoriesView editWorkingSet IWorkingSetManager getWorkbench getWorkingSetManager IWorkingSet workingSet getWorkingSet workingSet setEnabled IWorkingSetEditWizard createWorkingSetEditWizard workingSet EditWorkingSetAction EditWorkingSetAction CVSUIPlugin openError WizardDialog WizardDialog WizardDialog setWorkingSet getSelection
Menu menu menu Mgr create Context Menu tree menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager add Workbench Actions manager  menuMgr createContextMenu menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager addWorkbenchActions
open Action new Open Remote File Action viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event e handle Double Click e  openAction OpenRemoteFileAction addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleDoubleClick
Contribute actions to the view protected void contribute Actions final Shell shell get Shell Refresh toolbar CVSUI Plugin plugin CVSUI Plugin get Plugin refresh Action new Action Policy bind Repositories View refresh CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG REFRESH ENABLED NON NLS 1 public void run refresh All refresh Action set Tool Tip Text Policy bind Repositories View refresh Tooltip NON NLS 1 refresh Action set Disabled Image Descriptor plugin get Image Descriptor ICVSUI Constants IMG REFRESH DISABLED refresh Action set Hover Image Descriptor plugin get Image Descriptor ICVSUI Constants IMG REFRESH get View Site get Action Bars set Global Action Handler Action Factory REFRESH get Id refresh Action collapse All Action new Action Policy bind Repositories View collapse All CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG COLLAPSE ALL ENABLED NON NLS 1 public void run collapse All collapse All Action set Tool Tip Text Policy bind Repositories View collapse All Tooltip NON NLS 1 collapse All Action set Hover Image Descriptor plugin get Image Descriptor ICVSUI Constants IMG COLLAPSE ALL Select Working Set popup select Working Set Action new Action Policy bind Repositories View new Working Set NON NLS 1 public void run I Working Set Manager manager PlatformUI get Workbench get Working Set Manager I Working Set Selection Dialog dialog manager create Working Set Selection Dialog shell false I Working Set working Set null if working Set null dialog set Selection new I Working Set working Set if dialog open Window OK I Working Set result dialog get Selection if result null result length 0 set Working Set result 0 true manager add Recent Working Set result 0 else set Working Set null true Workbench Help set Help select Working Set Action I Help Context Ids SELECT WORKING SET ACTION Deselect Working Set popup deselect Working Set Action new Action Policy bind Repositories View deselect Working Set NON NLS 1 public void run set Working Set null true Workbench Help set Help deselect Working Set Action I Help Context Ids DESELECT WORKING SET ACTION Edit Working Set popup edit Working Set Action new Action Policy bind Repositories View edit Working Set NON NLS 1 public void run I Working Set Manager manager PlatformUI get Workbench get Working Set Manager I Working Set working Set get Working Set if working Set null set Enabled false return I Working Set Edit Wizard wizard manager create Working Set Edit Wizard working Set if wizard null todo String title Policy bind Edit Working Set Action error nowizard title NON NLS 1 String message Policy bind Edit Working Set Action error nowizard message NON NLS 1 CVSUI Plugin open Error shell title message null return Wizard Dialog dialog new Wizard Dialog shell wizard dialog create if dialog open Wizard Dialog OK set Working Set wizard get Selection true Workbench Help set Help edit Working Set Action I Help Context Ids EDIT WORKING SET ACTION Create the popup menu Menu Manager menu Mgr new Menu Manager Tree tree viewer get Tree Menu menu menu Mgr create Context Menu tree menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager add Workbench Actions manager menu Mgr set Remove All When Shown true tree set Menu menu get Site register Context Menu menu Mgr viewer Create the local tool bar I Action Bars bars get View Site get Action Bars I Tool Bar Manager tbm bars get Tool Bar Manager drill Part add Navigation Actions tbm tbm add refresh Action tbm add new Separator tbm add collapse All Action tbm update false Create the open action for double clicks open Action new Open Remote File Action viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event e handle Double Click e update Working Set Menu bars update Action Bars  contributeActions getShell CVSUIPlugin CVSUIPlugin getPlugin refreshAction RepositoriesView CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_REFRESH_ENABLED refreshAll refreshAction setToolTipText RepositoriesView refreshTooltip refreshAction setDisabledImageDescriptor getImageDescriptor ICVSUIConstants IMG_REFRESH_DISABLED refreshAction setHoverImageDescriptor getImageDescriptor ICVSUIConstants IMG_REFRESH getViewSite getActionBars setGlobalActionHandler ActionFactory getId refreshAction collapseAllAction RepositoriesView collapseAll CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_COLLAPSE_ALL_ENABLED collapseAll collapseAllAction setToolTipText RepositoriesView collapseAllTooltip collapseAllAction setHoverImageDescriptor getImageDescriptor ICVSUIConstants IMG_COLLAPSE_ALL selectWorkingSetAction RepositoriesView newWorkingSet IWorkingSetManager getWorkbench getWorkingSetManager IWorkingSetSelectionDialog createWorkingSetSelectionDialog IWorkingSet workingSet workingSet setSelection IWorkingSet workingSet IWorkingSet getSelection setWorkingSet addRecentWorkingSet setWorkingSet WorkbenchHelp setHelp selectWorkingSetAction IHelpContextIds SELECT_WORKING_SET_ACTION deselectWorkingSetAction RepositoriesView deselectWorkingSet setWorkingSet WorkbenchHelp setHelp deselectWorkingSetAction IHelpContextIds DESELECT_WORKING_SET_ACTION editWorkingSetAction RepositoriesView editWorkingSet IWorkingSetManager getWorkbench getWorkingSetManager IWorkingSet workingSet getWorkingSet workingSet setEnabled IWorkingSetEditWizard createWorkingSetEditWizard workingSet EditWorkingSetAction EditWorkingSetAction CVSUIPlugin openError WizardDialog WizardDialog WizardDialog setWorkingSet getSelection WorkbenchHelp setHelp editWorkingSetAction IHelpContextIds EDIT_WORKING_SET_ACTION MenuManager menuMgr MenuManager getTree menuMgr createContextMenu menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager addWorkbenchActions menuMgr setRemoveAllWhenShown setMenu getSite registerContextMenu menuMgr IActionBars getViewSite getActionBars IToolBarManager getToolBarManager drillPart addNavigationActions refreshAction collapseAllAction openAction OpenRemoteFileAction addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleDoubleClick updateWorkingSetMenu updateActionBars
Add the menu actions that were contributed in plugin xml param manager protected void add Workbench Actions I Menu Manager manager File actions go first view file manager add new Separator I Workbench Action Constants GROUP FILE Misc additions manager add new Separator checkout Group NON NLS 1 manager add new Separator tag Group NON NLS 1 manager add new Separator misc Group NON NLS 1 manager add new Separator I Workbench Action Constants MB ADDITIONS manager add refresh Action  addWorkbenchActions IMenuManager IWorkbenchActionConstants GROUP_FILE checkoutGroup tagGroup miscGroup IWorkbenchActionConstants MB_ADDITIONS refreshAction
Method get Shell return Shell protected Shell get Shell return viewer get Tree get Shell  getShell getShell getTree getShell
public void update Working Set Menu I Action Bars bars get View Site get Action Bars I Menu Manager mgr bars get Menu Manager mgr remove All mgr add select Working Set Action mgr add deselect Working Set Action deselect Working Set Action set Enabled get Working Set null mgr add edit Working Set Action edit Working Set Action set Enabled get Working Set null mgr add new Separator I Working Set Manager manager PlatformUI get Workbench get Working Set Manager I Working Set working Sets manager get Working Sets for int i 0 i working Sets length i String name working Sets i get Name Change Working Set Action action new Change Working Set Action name i 1 mgr add action action set Checked get Working Set null get Working Set get Name equals name bars update Action Bars  updateWorkingSetMenu IActionBars getViewSite getActionBars IMenuManager getMenuManager removeAll selectWorkingSetAction deselectWorkingSetAction deselectWorkingSetAction setEnabled getWorkingSet editWorkingSetAction editWorkingSetAction setEnabled getWorkingSet IWorkingSetManager getWorkbench getWorkingSetManager IWorkingSet workingSets getWorkingSets workingSets workingSets getName ChangeWorkingSetAction ChangeWorkingSetAction setChecked getWorkingSet getWorkingSet getName updateActionBars
protected void refresh All CVSUI Plugin get Plugin get Repository Manager clear Caches refresh Viewer  refreshAll CVSUIPlugin getPlugin getRepositoryManager clearCaches refreshViewer
protected void refresh Viewer if viewer null return Remote Content Provider viewer get Content Provider cancel Jobs CVSUI Plugin get Plugin get Repository Manager get Known Repository Roots CVSUI Plugin get Plugin get Repository Manager purge Cache update Working Set Menu viewer refresh  refreshViewer RemoteContentProvider getContentProvider cancelJobs CVSUIPlugin getPlugin getRepositoryManager getKnownRepositoryRoots CVSUIPlugin getPlugin getRepositoryManager purgeCache updateWorkingSetMenu
public void collapse All if viewer null return viewer get Control set Redraw false viewer collapse To Level viewer get Input Tree Viewer ALL LEVELS viewer get Control set Redraw true  collapseAll getControl setRedraw collapseToLevel getInput TreeViewer ALL_LEVELS getControl setRedraw
The mouse has been double clicked in the tree perform appropriate behaviour private void handle Double Click Double Click Event e Only act on single selection I Selection selection e get Selection if selection instanceof I Structured Selection I Structured Selection structured I Structured Selection selection if structured size 1 Object first structured get First Element if first instanceof ICVS Remote File It s a file open it open Action selection Changed null selection open Action run null else Try to expand contract viewer set Expanded State first viewer get Expanded State first  handleDoubleClick DoubleClickEvent ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement ICVSRemoteFile openAction selectionChanged openAction setExpandedState getExpandedState
Returns the viewer return Tree Viewer protected Tree Viewer get Viewer return viewer  TreeViewer TreeViewer getViewer
see org eclipse ui I Selection Listener selection Changed org eclipse ui I Workbench Part org eclipse jface viewers I Selection public void selection Changed I Workbench Part part I Selection selection  ISelectionListener selectionChanged IWorkbenchPart ISelection selectionChanged IWorkbenchPart ISelection
see org eclipse ui I Workbench Part dispose public void dispose get Site get Workbench Window get Selection Service remove Post Selection Listener this super dispose viewer null  IWorkbenchPart getSite getWorkbenchWindow getSelectionService removePostSelectionListener

private I Structured Selection selection public Remove Date Tag Action super Policy bind Remove Date Tag Action 0 NON NLS 1  IStructuredSelection RemoveDateTagAction RemoveDateTagAction
public void run CVS Tag Element elements get SelectedCVS Tag Elements if elements length 0 return for int i 0 i elements length i Repository Manager mgr CVSUI Plugin get Plugin get Repository Manager CVS Tag tag elements i get Tag if tag get Type CVS Tag DATE mgr remove Date Tag elements i get Root tag  CVSTagElement getSelectedCVSTagElements RepositoryManager CVSUIPlugin getPlugin getRepositoryManager CVSTag getTag getType CVSTag removeDateTag getRoot
protected boolean update Selection I Structured Selection selection this selection selection boolean b contains Data Tag set Enabled b return b  updateSelection IStructuredSelection containsDataTag setEnabled
private boolean contains Data Tag CVS Tag Element elements get SelectedCVS Tag Elements if elements length 0 for int i 0 i elements length i CVS Tag tag elements i get Tag if tag get Type CVS Tag DATE return true return false  containsDataTag CVSTagElement getSelectedCVSTagElements CVSTag getTag getType CVSTag
Returns the selected CVS date tag elements private CVS Tag Element get SelectedCVS Tag Elements Array List cvs Tag Elements null if selection null selection is Empty cvs Tag Elements new Array List Iterator elements I Structured Selection selection iterator while elements has Next Object next CVS Action get Adapter elements next CVS Tag Element class if next instanceof CVS Tag Element cvs Tag Elements add next if cvs Tag Elements null cvs Tag Elements is Empty CVS Tag Element result new CVS Tag Element cvs Tag Elements size cvs Tag Elements to Array result return result return new CVS Tag Element 0  CVSTagElement getSelectedCVSTagElements ArrayList cvsTagElements isEmpty cvsTagElements ArrayList IStructuredSelection hasNext CVSAction getAdapter CVSTagElement CVSTagElement cvsTagElements cvsTagElements cvsTagElements isEmpty CVSTagElement CVSTagElement cvsTagElements cvsTagElements toArray CVSTagElement

public Remove Root Action Shell shell Repositories View view super Policy bind Remote Root Action label NON NLS 1 this view view this shell shell  RemoveRootAction RepositoriesView RemoteRootAction
Returns the selected remote files protected ICVS Repository Location get Selected Remote Roots Array List resources null if selection null selection is Empty resources new Array List Iterator elements I Structured Selection selection iterator while elements has Next Object next CVS Action get Adapter elements next Repository Root class if next instanceof Repository Root resources add Repository Root next get Root if resources null resources is Empty ICVS Repository Location result new ICVS Repository Location resources size resources to Array result return result return new ICVS Repository Location 0  ICVSRepositoryLocation getSelectedRemoteRoots ArrayList isEmpty ArrayList IStructuredSelection hasNext CVSAction getAdapter RepositoryRoot RepositoryRoot RepositoryRoot getRoot isEmpty ICVSRepositoryLocation ICVSRepositoryLocation toArray ICVSRepositoryLocation
protected String get Error Title return Policy bind Remove Root Action removeRoot 3 NON NLS 1  getErrorTitle RemoveRootAction removeRoot_3
shell get Display sync Exec new Runnable public void run Details Dialog With Projects dialog new Details Dialog With Projects shell Policy bind Remote Root Action Unable to Discard Location 1 NON NLS 1 Policy bind Remote Root Action Projects in the local workspace are shared with  2 location NON NLS 1 Policy bind Remote Root Action The projects that are shared with the above repository are  4 NON NLS 1 I Project shared to Array new I Project shared size false Details Dialog With Projects DLG IMG ERROR dialog open  getDisplay syncExec DetailsDialogWithProjects DetailsDialogWithProjects RemoteRootAction Unable_to_Discard_Location_1 RemoteRootAction Projects_in_the_local_workspace_are_shared_with__2 RemoteRootAction The_projects_that_are_shared_with_the_above_repository_are__4 IProject toArray IProject DetailsDialogWithProjects DLG_IMG_ERROR
manager busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception I Scheduling Rule rule new Repository Location Scheduling Rule root try Platform get Job Manager begin Rule rule monitor view get Content Provider cancel Jobs root Known Repositories get Instance dispose Repository root finally Platform get Job Manager end Rule rule  busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException ISchedulingRule RepositoryLocationSchedulingRule getJobManager beginRule getContentProvider cancelJobs KnownRepositories getInstance disposeRepository getJobManager endRule
public void run ICVS Repository Location roots get Selected Remote Roots if roots length 0 return final CVS Provider Plugin provider CVS Provider Plugin get Plugin for int i 0 i roots length i final ICVS Repository Location root roots i try Check if any projects are shared with the repository I Project projects Resources Plugin get Workspace get Root get Projects final Array List shared new Array List for int j 0 j projects length j Repository Provider team Provider Repository Provider get Provider projects j CVS Provider Plugin get Type Id if team Provider null CVS Team Provider cvs Provider CVS Team Provider team Provider if cvs Provider getCVS Workspace Root get Remote Location equals roots i shared add projects j This will notify the Repository Manager of the removal if shared is Empty final String location roots i get Location shell get Display sync Exec new Runnable public void run Details Dialog With Projects dialog new Details Dialog With Projects shell Policy bind Remote Root Action Unable to Discard Location 1 NON NLS 1 Policy bind Remote Root Action Projects in the local workspace are shared with  2 location NON NLS 1 Policy bind Remote Root Action The projects that are shared with the above repository are  4 NON NLS 1 I Project shared to Array new I Project shared size false Details Dialog With Projects DLG IMG ERROR dialog open else I Progress Service manager PlatformUI get Workbench get Progress Service try manager busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception I Scheduling Rule rule new Repository Location Scheduling Rule root try Platform get Job Manager begin Rule rule monitor view get Content Provider cancel Jobs root Known Repositories get Instance dispose Repository root finally Platform get Job Manager end Rule rule catch Invocation Target Exception e throw CVS Exception wrap Exception e catch Interrupted Exception e Canceled return catch CVS Exception e CVSUI Plugin open Error view get Shell null null e CVSUI Plugin PERFORM SYNC EXEC CVSUI Plugin LOG TEAM EXCEPTIONS CVSUI Plugin LOG NONTEAM EXCEPTIONS  ICVSRepositoryLocation getSelectedRemoteRoots CVSProviderPlugin CVSProviderPlugin getPlugin ICVSRepositoryLocation IProject ResourcesPlugin getWorkspace getRoot getProjects ArrayList ArrayList RepositoryProvider teamProvider RepositoryProvider getProvider CVSProviderPlugin getTypeId teamProvider CVSTeamProvider cvsProvider CVSTeamProvider teamProvider cvsProvider getCVSWorkspaceRoot getRemoteLocation RepositoryManager isEmpty getLocation getDisplay syncExec DetailsDialogWithProjects DetailsDialogWithProjects RemoteRootAction Unable_to_Discard_Location_1 RemoteRootAction Projects_in_the_local_workspace_are_shared_with__2 RemoteRootAction The_projects_that_are_shared_with_the_above_repository_are__4 IProject toArray IProject DetailsDialogWithProjects DLG_IMG_ERROR IProgressService getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException ISchedulingRule RepositoryLocationSchedulingRule getJobManager beginRule getContentProvider cancelJobs KnownRepositories getInstance disposeRepository getJobManager endRule InvocationTargetException CVSException wrapException InterruptedException CVSException CVSUIPlugin openError getShell CVSUIPlugin PERFORM_SYNC_EXEC CVSUIPlugin LOG_TEAM_EXCEPTIONS CVSUIPlugin LOG_NONTEAM_EXCEPTIONS
protected boolean update Selection I Structured Selection selection this selection selection ICVS Repository Location roots get Selected Remote Roots boolean b roots length 0 set Enabled b return b  updateSelection IStructuredSelection ICVSRepositoryLocation getSelectedRemoteRoots setEnabled

public void repository Added final ICVS Repository Location root get Viewer get Control get Display sync Exec new Runnable public void run refresh Viewer get Viewer set Selection new Structured Selection root  repositoryAdded ICVSRepositoryLocation getViewer getControl getDisplay syncExec refreshViewer getViewer setSelection StructuredSelection
I Repository Listener listener new I Repository Listener public void repository Added final ICVS Repository Location root get Viewer get Control get Display sync Exec new Runnable public void run refresh Viewer get Viewer set Selection new Structured Selection root  IRepositoryListener IRepositoryListener repositoryAdded ICVSRepositoryLocation getViewer getControl getDisplay syncExec refreshViewer getViewer setSelection StructuredSelection
public void repository Removed ICVS Repository Location root refresh  repositoryRemoved ICVSRepositoryLocation
refresh public void repositories Changed ICVS Repository Location roots refresh  repositoriesChanged ICVSRepositoryLocation
Display display get Viewer get Control get Display display sync Exec new Runnable public void run Repositories View this refresh Viewer  getViewer getControl getDisplay syncExec RepositoriesView refreshViewer
private void refresh Display display get Viewer get Control get Display display sync Exec new Runnable public void run Repositories View this refresh Viewer  getViewer getControl getDisplay syncExec RepositoriesView refreshViewer
Constructor for Repositories View param part Name public Repositories View super VIEW ID  RepositoriesView partName RepositoriesView VIEW_ID
new Action new Action Policy bind Repositories View new CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG NEWLOCATION NON NLS 1 public void run New Location Wizard wizard new New Location Wizard Wizard Dialog dialog new Wizard Dialog shell wizard dialog open  newAction RepositoriesView CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_NEWLOCATION NewLocationWizard NewLocationWizard WizardDialog WizardDialog
new Anon Action new Action Policy bind Repositories View new AnonCVS CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG NEWLOCATION NON NLS 1 public void run Properties p new Properties p set Property connection pserver NON NLS 1 NON NLS 2 p set Property user anonymous NON NLS 1 NON NLS 2 p set Property host dev eclipse org NON NLS 1 NON NLS 2 p set Property root home eclipse NON NLS 1 NON NLS 2 New Location Wizard wizard new New Location Wizard p Wizard Dialog dialog new Wizard Dialog shell wizard dialog open  newAnonAction RepositoriesView newAnonCVS CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_NEWLOCATION setProperty setProperty setProperty setProperty NewLocationWizard NewLocationWizard WizardDialog WizardDialog
get Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection ss I Structured Selection event get Selection boolean enabled ss size 1 ss get First Element instanceof Repository Root properties Action set Enabled enabled  getViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection getFirstElement RepositoryRoot propertiesAction setEnabled
remove Action new Action public void run if remove Root Action is Enabled remove Root Action run if remove Date Tag Action is Enabled remove Date Tag Action run  removeAction removeRootAction isEnabled removeRootAction removeDateTagAction isEnabled removeDateTagAction
Contribute actions to the view protected void contribute Actions final Shell shell get Shell Create actions New Repository popup new Action new Action Policy bind Repositories View new CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG NEWLOCATION NON NLS 1 public void run New Location Wizard wizard new New Location Wizard Wizard Dialog dialog new Wizard Dialog shell wizard dialog open Workbench Help set Help new Action I Help Context Ids NEW REPOSITORY LOCATION ACTION if include Anon Connection new Anon Action new Action Policy bind Repositories View new AnonCVS CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG NEWLOCATION NON NLS 1 public void run Properties p new Properties p set Property connection pserver NON NLS 1 NON NLS 2 p set Property user anonymous NON NLS 1 NON NLS 2 p set Property host dev eclipse org NON NLS 1 NON NLS 2 p set Property root home eclipse NON NLS 1 NON NLS 2 New Location Wizard wizard new New Location Wizard p Wizard Dialog dialog new Wizard Dialog shell wizard dialog open Workbench Help set Help new Anon Action I Help Context Ids NEW DEV ECLIPSE REPOSITORY LOCATION ACTION Properties properties Action new Property Dialog Action shell get Viewer get View Site get Action Bars set Global Action Handler Action Factory PROPERTIES get Id properties Action I Structured Selection selection I Structured Selection get Viewer get Selection if selection size 1 selection get First Element instanceof Repository Root properties Action set Enabled true else properties Action set Enabled false get Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection ss I Structured Selection event get Selection boolean enabled ss size 1 ss get First Element instanceof Repository Root properties Action set Enabled enabled remove Root Action new Remove Root Action viewer get Control get Shell this remove Root Action selection Changed I Structured Selection null remove Date Tag Action new Remove Date Tag Action remove Date Tag Action selection Changed I Structured Selection null remove Action new Action public void run if remove Root Action is Enabled remove Root Action run if remove Date Tag Action is Enabled remove Date Tag Action run Workbench Help set Help remove Root Action I Help Context Ids REMOVE REPOSITORY LOCATION ACTION I Action Bars bars get View Site get Action Bars bars set Global Action Handler Action Factory DELETE get Id remove Action super contribute Actions  contributeActions getShell newAction RepositoriesView CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_NEWLOCATION NewLocationWizard NewLocationWizard WizardDialog WizardDialog WorkbenchHelp setHelp newAction IHelpContextIds NEW_REPOSITORY_LOCATION_ACTION includeAnonConnection newAnonAction RepositoriesView newAnonCVS CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_NEWLOCATION setProperty setProperty setProperty setProperty NewLocationWizard NewLocationWizard WizardDialog WizardDialog WorkbenchHelp setHelp newAnonAction IHelpContextIds NEW_DEV_ECLIPSE_REPOSITORY_LOCATION_ACTION propertiesAction PropertyDialogAction getViewer getViewSite getActionBars setGlobalActionHandler ActionFactory getId propertiesAction IStructuredSelection IStructuredSelection getViewer getSelection getFirstElement RepositoryRoot propertiesAction setEnabled propertiesAction setEnabled getViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection getFirstElement RepositoryRoot propertiesAction setEnabled removeRootAction RemoveRootAction getControl getShell removeRootAction selectionChanged IStructuredSelection removeDateTagAction RemoveDateTagAction removeDateTagAction selectionChanged IStructuredSelection removeAction removeRootAction isEnabled removeRootAction removeDateTagAction isEnabled removeDateTagAction WorkbenchHelp setHelp removeRootAction IHelpContextIds REMOVE_REPOSITORY_LOCATION_ACTION IActionBars getViewSite getActionBars setGlobalActionHandler ActionFactory getId removeAction contributeActions
Method include Eclipse Connection return boolean private boolean include Anon Connection return System get Property eclipse cvs anon null NON NLS 1  includeEclipseConnection includeAnonConnection getProperty
see org eclipse team internal ccvs ui repo Remote View Part add Workbench Actions org eclipse jface action I Menu Manager protected void add Workbench Actions I Menu Manager manager New actions go next Menu Manager sub new Menu Manager Policy bind Repositories View new Submenu I Workbench Action Constants GROUP ADD NON NLS 1 manager add sub super add Workbench Actions manager I Structured Selection selection I Structured Selection get Viewer get Selection remove Root Action selection Changed selection remove Date Tag Action selection Changed selection if remove Root Action is Enabled manager add remove Root Action if remove Date Tag Action is Enabled manager add remove Date Tag Action if selection size 1 selection get First Element instanceof Repository Root manager add new Separator manager add properties Action sub add new Action if new Anon Action null sub add new Anon Action sub add new Separator group1 NON NLS 1  RemoteViewPart addWorkbenchActions IMenuManager addWorkbenchActions IMenuManager MenuManager MenuManager RepositoriesView newSubmenu IWorkbenchActionConstants GROUP_ADD addWorkbenchActions IStructuredSelection IStructuredSelection getViewer getSelection removeRootAction selectionChanged removeDateTagAction selectionChanged removeRootAction isEnabled removeRootAction removeDateTagAction isEnabled removeDateTagAction getFirstElement RepositoryRoot propertiesAction newAction newAnonAction newAnonAction
see Workbench Part create Part Control public void create Part Control Composite parent super create Part Control parent CVSUI Plugin get Plugin get Repository Manager add Repository Listener listener  WorkbenchPart createPartControl createPartControl createPartControl CVSUIPlugin getPlugin getRepositoryManager addRepositoryListener
see Workbench Part dispose public void dispose CVSUI Plugin get Plugin get Repository Manager remove Repository Listener listener super dispose  WorkbenchPart CVSUIPlugin getPlugin getRepositoryManager removeRepositoryListener
Initialize the repositories and actions private void initialize root new All Roots Element  AllRootsElement
viewer add Selection Changed Listener remove Date Tag Action viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection handle Change selection  addSelectionChangedListener removeDateTagAction addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection handleChange
protected void initialize Listeners super initialize Listeners viewer add Selection Changed Listener remove Root Action viewer add Selection Changed Listener remove Date Tag Action viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection handle Change selection  initializeListeners initializeListeners addSelectionChangedListener removeRootAction addSelectionChangedListener removeDateTagAction addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection handleChange
see org eclipse team internal ccvs ui repo Remote View Part get Tree Input protected Object get Tree Input initialize return root  RemoteViewPart getTreeInput getTreeInput
see org eclipse ui I Selection Listener selection Changed org eclipse ui I Workbench Part org eclipse jface viewers I Selection public void selection Changed I Workbench Part part I Selection selection String msg get Status Line Message selection get View Site get Action Bars get Status Line Manager set Message msg  ISelectionListener selectionChanged IWorkbenchPart ISelection selectionChanged IWorkbenchPart ISelection getStatusLineMessage getViewSite getActionBars getStatusLineManager setMessage
private String get Status Line Message I Selection selection if selection null selection is Empty return NON NLS 1 if selection instanceof I Structured Selection return NON NLS 1 I Structured Selection s I Structured Selection selection if s size 1 return Policy bind Repositories View N Items Selected String value Of s size NON NLS 1 Object element CVS Action get Adapter s get First Element ICVS Resource class if element instanceof ICVS Remote Resource ICVS Remote Resource res ICVS Remote Resource element String name if res is Container name res get Repository Relative Path else try name res get Repository Relative Path ICVS Remote File res get Revision NON NLS 1 catch Team Exception e Team Plugin log I Status ERROR Policy bind Repositories View Cannot Get Revision e NON NLS 1 name res get Repository Relative Path return Policy bind Repositories View Resource In Repository name res get Repository get Location NON NLS 1 return Policy bind Repositories View One Item Selected NON NLS 1  getStatusLineMessage ISelection isEmpty IStructuredSelection IStructuredSelection IStructuredSelection RepositoriesView NItemsSelected valueOf CVSAction getAdapter getFirstElement ICVSResource ICVSRemoteResource ICVSRemoteResource ICVSRemoteResource isContainer getRepositoryRelativePath getRepositoryRelativePath ICVSRemoteFile getRevision TeamException TeamPlugin IStatus RepositoriesView CannotGetRevision getRepositoryRelativePath RepositoriesView ResourceInRepository getRepository getLocation RepositoriesView OneItemSelected
see org eclipse team internal ccvs ui repo Remote View Part get Help Context Id protected String get Help Context Id return I Help Context Ids REPOSITORIES VIEW  RemoteViewPart getHelpContextId getHelpContextId IHelpContextIds REPOSITORIES_VIEW
return new Key Adapter public void key Pressed Key Event event if event key Code SWT F5 if Workbench User Authenticator USE ALTERNATE PROMPTER ICVS Repository Location locations Known Repositories get Instance get Repositories for int i 0 i locations length i locations i flush User Info else refresh All else if event key Code SWT F9 Workbench User Authenticator USE ALTERNATE PROMPTER refresh All  KeyAdapter keyPressed KeyEvent keyCode WorkbenchUserAuthenticator USE_ALTERNATE_PROMPTER ICVSRepositoryLocation KnownRepositories getInstance getRepositories flushUserInfo refreshAll keyCode WorkbenchUserAuthenticator USE_ALTERNATE_PROMPTER refreshAll
see org eclipse team internal ccvs ui repo Remote View Part get Key Listener protected Key Adapter get Key Listener return new Key Adapter public void key Pressed Key Event event if event key Code SWT F5 if Workbench User Authenticator USE ALTERNATE PROMPTER ICVS Repository Location locations Known Repositories get Instance get Repositories for int i 0 i locations length i locations i flush User Info else refresh All else if event key Code SWT F9 Workbench User Authenticator USE ALTERNATE PROMPTER refresh All  RemoteViewPart getKeyListener KeyAdapter getKeyListener KeyAdapter keyPressed KeyEvent keyCode WorkbenchUserAuthenticator USE_ALTERNATE_PROMPTER ICVSRepositoryLocation KnownRepositories getInstance getRepositories flushUserInfo refreshAll keyCode WorkbenchUserAuthenticator USE_ALTERNATE_PROMPTER refreshAll
private void handle Change I Structured Selection selection remove Root Action update Selection selection remove Date Tag Action update Selection selection remove Action set Enabled remove Root Action is Enabled remove Date Tag Action is Enabled  handleChange IStructuredSelection removeRootAction updateSelection removeDateTagAction updateSelection removeAction setEnabled removeRootAction isEnabled removeDateTagAction isEnabled

private boolean ignore Elements public Repositories View Content Handler Repository Manager manager this manager manager  ignoreElements RepositoriesViewContentHandler RepositoryManager
see Content Handler characters char int int public void characters char chars int start Index int length throws SAX Exception buffer append chars start Index length  ContentHandler startIndex SAXException startIndex
see Content Handler end Element java lang String java lang String java lang String public void end Element String namespaceURI String local Name String q Name throws SAX Exception String element Name get Element Name namespaceURI local Name q Name if element Name equals tag Stack peek throw new SAX Exception Policy bind Repositories View Content Handler unmatched Tag element Name NON NLS 1 if element Name equals REPOSITORIES VIEW TAG all done else if element Name equals REPOSITORY TAG if ignore Elements manager add current Repository Root current Repository Root null else if element Name equals WORKING SET TAG This tag is no longer used ignore Elements false else if element Name equals CURRENT WORKING SET TAG This tag is no longer used ignore Elements false else if element Name equals MODULE TAG if ignore Elements current Repository Root null current Repository Root add Tags current Remote Path CVS Tag tags to Array new CVS Tag tags size current Repository Root set Auto Refresh Files current Remote Path String auto Refresh Files to Array new String auto Refresh Files size else if element Name equals DATE TAG TAG if ignore Elements current Repository Root null Iterator iter date Tags iterator while iter has Next CVS Tag tag CVS Tag iter next current Repository Root add Date Tag tag tag Stack pop  ContentHandler endElement endElement localName qName SAXException elementName getElementName localName qName elementName tagStack SAXException RepositoriesViewContentHandler unmatchedTag elementName elementName REPOSITORIES_VIEW_TAG elementName REPOSITORY_TAG ignoreElements currentRepositoryRoot currentRepositoryRoot elementName WORKING_SET_TAG ignoreElements elementName CURRENT_WORKING_SET_TAG ignoreElements elementName MODULE_TAG ignoreElements currentRepositoryRoot currentRepositoryRoot addTags currentRemotePath CVSTag toArray CVSTag currentRepositoryRoot setAutoRefreshFiles currentRemotePath autoRefreshFiles toArray autoRefreshFiles elementName DATE_TAG_TAG ignoreElements currentRepositoryRoot dateTags hasNext CVSTag CVSTag currentRepositoryRoot addDateTag tagStack
see Content Handler start Element java lang String java lang String java lang String org xml sax Attributes public void start Element String namespaceURI String local Name String q Name Attributes atts throws SAX Exception String element Name get Element Name namespaceURI local Name q Name if element Name equals REPOSITORIES VIEW TAG just started else if element Name equals REPOSITORY TAG String id atts get Value ID ATTRIBUTE if id null throw new SAX Exception Policy bind Repositories View Content Handler missing Attribute REPOSITORY TAG ID ATTRIBUTE NON NLS 1 ICVS Repository Location root try root Known Repositories get Instance get Repository id if Known Repositories get Instance is Known Repository id Known Repositories get Instance add Repository root false catch CVS Exception e throw new SAX Exception Policy bind Repositories View Content Handler error Creating Root id e NON NLS 1 current Repository Root new Repository Root root String name atts get Value NAME ATTRIBUTE if name null current Repository Root set Name name else if element Name equals DATE TAGS TAG prepare to collect date tag date Tags new Array List else if element Name equals DATE TAG TAG String name atts get Value NAME ATTRIBUTE if name null throw new SAX Exception Policy bind Repositories View Content Handler missing Attribute DATE TAGS TAG NAME ATTRIBUTE NON NLS 1 date Tags add new CVS Tag name CVS Tag DATE else if element Name equals WORKING SET TAG String name atts get Value NAME ATTRIBUTE if name null throw new SAX Exception Policy bind Repositories View Content Handler missing Attribute WORKING SET TAG NAME ATTRIBUTE NON NLS 1 Ignore any elements until the corresponding end tag is reached ignore Elements true else if element Name equals MODULE TAG String path atts get Value PATH ATTRIBUTE if path null throw new SAX Exception Policy bind Repositories View Content Handler missing Attribute MODULE TAG PATH ATTRIBUTE NON NLS 1 String type atts get Value TYPE ATTRIBUTE if type null type equals DEFINED MODULE TYPE path Repository Root as Defined Module Path path start Module path else if element Name equals TAG TAG String type atts get Value TYPE ATTRIBUTE if type null type DEFAULT TAG TYPE String name atts get Value NAME ATTRIBUTE if name null throw new SAX Exception Policy bind Repositories View Content Handler missing Attribute TAG TAG NAME ATTRIBUTE NON NLS 1 tags add new CVS Tag name getCVS Tag Type type else if element Name equals AUTO REFRESH FILE TAG String path atts get Value FULL PATH ATTRIBUTE if path null get the old path attribute format which was relative to the module path atts get Value PATH ATTRIBUTE if path null throw new SAX Exception Policy bind Repositories View Content Handler missing Attribute AUTO REFRESH FILE TAG FULL PATH ATTRIBUTE NON NLS 1 if Repository Root is Defined Module Name current Remote Path path null else path new Path current Remote Path append path to String if path null auto Refresh Files add path else if element Name equals CURRENT WORKING SET TAG Ignore any elements until the corresponding end tag is reached ignore Elements true empty buffer buffer new String Buffer tag Stack push element Name  ContentHandler startElement startElement localName qName SAXException elementName getElementName localName qName elementName REPOSITORIES_VIEW_TAG elementName REPOSITORY_TAG getValue ID_ATTRIBUTE SAXException RepositoriesViewContentHandler missingAttribute REPOSITORY_TAG ID_ATTRIBUTE ICVSRepositoryLocation KnownRepositories getInstance getRepository KnownRepositories getInstance isKnownRepository KnownRepositories getInstance addRepository CVSException SAXException RepositoriesViewContentHandler errorCreatingRoot currentRepositoryRoot RepositoryRoot getValue NAME_ATTRIBUTE currentRepositoryRoot setName elementName DATE_TAGS_TAG dateTags ArrayList elementName DATE_TAG_TAG getValue NAME_ATTRIBUTE SAXException RepositoriesViewContentHandler missingAttribute DATE_TAGS_TAG NAME_ATTRIBUTE dateTags CVSTag CVSTag elementName WORKING_SET_TAG getValue NAME_ATTRIBUTE SAXException RepositoriesViewContentHandler missingAttribute WORKING_SET_TAG NAME_ATTRIBUTE ignoreElements elementName MODULE_TAG getValue PATH_ATTRIBUTE SAXException RepositoriesViewContentHandler missingAttribute MODULE_TAG PATH_ATTRIBUTE getValue TYPE_ATTRIBUTE DEFINED_MODULE_TYPE RepositoryRoot asDefinedModulePath startModule elementName TAG_TAG getValue TYPE_ATTRIBUTE DEFAULT_TAG_TYPE getValue NAME_ATTRIBUTE SAXException RepositoriesViewContentHandler missingAttribute TAG_TAG NAME_ATTRIBUTE CVSTag getCVSTagType elementName AUTO_REFRESH_FILE_TAG getValue FULL_PATH_ATTRIBUTE getValue PATH_ATTRIBUTE SAXException RepositoriesViewContentHandler missingAttribute AUTO_REFRESH_FILE_TAG FULL_PATH_ATTRIBUTE RepositoryRoot isDefinedModuleName currentRemotePath currentRemotePath toString autoRefreshFiles elementName CURRENT_WORKING_SET_TAG ignoreElements StringBuffer tagStack elementName
private void start Module String path current Remote Path path tags new Array List auto Refresh Files new Array List  startModule currentRemotePath ArrayList autoRefreshFiles ArrayList
Method getCVS Tag Type param type public int getCVS Tag Type String type for int i 0 i TAG TYPES length i if TAG TYPES i equals type return i return CVS Tag VERSION  getCVSTagType getCVSTagType TAG_TYPES TAG_TYPES CVSTag
private String get Element Name String namespaceURI String local Name String q Name if local Name null local Name length 0 return local Name else return q Name  getElementName localName qName localName localName localName qName

Create a wrapper for the given OSGI preferences node param preferences an OSGI preferences node public OSGI Preference Store Preferences preferences Preferences defaults this preferences preferences this defaults defaults  OSGIPreferenceStore
see org eclipse jface preference I Preference Store add Property Change Listener org eclipse jface util I Property Change Listener public void add Property Change Listener I Property Change Listener listener TODO Auto generated method stub  IPreferenceStore addPropertyChangeListener IPropertyChangeListener addPropertyChangeListener IPropertyChangeListener
see org eclipse jface preference I Preference Store remove Property Change Listener org eclipse jface util I Property Change Listener public void remove Property Change Listener I Property Change Listener listener TODO Auto generated method stub  IPreferenceStore removePropertyChangeListener IPropertyChangeListener removePropertyChangeListener IPropertyChangeListener
see org eclipse jface preference I Preference Store fire Property Change Event java lang String java lang Object java lang Object public void fire Property Change Event String name Object old Value Object new Value TODO Auto generated method stub  IPreferenceStore firePropertyChangeEvent firePropertyChangeEvent oldValue newValue
public boolean contains String name try String keys preferences keys for int i 0 i keys length i String string keys i if string equals name return true return false catch Backing Store Exception e CVSUI Plugin log new CVS Status I Status ERROR Policy bind internal e NON NLS 1 return false  BackingStoreException CVSUIPlugin CVSStatus IStatus
see org eclipse jface preference I Preference Store get Boolean java lang String public boolean get Boolean String name return preferences get Boolean name get Default Boolean name  IPreferenceStore getBoolean getBoolean getBoolean getDefaultBoolean
public boolean get Default Boolean String name if defaults null return defaults get Boolean name false return false  getDefaultBoolean getBoolean
public double get Default Double String name if defaults null return defaults get Double name 0 return 0  getDefaultDouble getDouble
public float get Default Float String name if defaults null return defaults get Float name 0 return 0  getDefaultFloat getFloat
public int get Default Int String name if defaults null return defaults get Int name 0 return 0  getDefaultInt getInt
public long get Default Long String name if defaults null return defaults get Long name 0 return 0  getDefaultLong getLong
public String get Default String String name if defaults null return defaults get name null return null  getDefaultString
see org eclipse jface preference I Preference Store get Double java lang String public double get Double String name return preferences get Double name get Default Double name  IPreferenceStore getDouble getDouble getDouble getDefaultDouble
see org eclipse jface preference I Preference Store get Float java lang String public float get Float String name return preferences get Float name get Default Float name  IPreferenceStore getFloat getFloat getFloat getDefaultFloat
see org eclipse jface preference I Preference Store get Int java lang String public int get Int String name return preferences get Int name get Default Int name  IPreferenceStore getInt getInt getInt getDefaultInt
see org eclipse jface preference I Preference Store get Long java lang String public long get Long String name return preferences get Long name get Default Long name  IPreferenceStore getLong getLong getLong getDefaultLong
see org eclipse jface preference I Preference Store get String java lang String public String get String String name return preferences get name get Default String name  IPreferenceStore getString getString getDefaultString
see org eclipse jface preference I Preference Store is Default java lang String public boolean is Default String name return contains name  IPreferenceStore isDefault isDefault
see org eclipse jface preference I Preference Store needs Saving public boolean needs Saving return dirty  IPreferenceStore needsSaving needsSaving
see org eclipse jface preference I Preference Store put Value java lang String java lang String public void put Value String name String value preferences put name value dirty true  IPreferenceStore putValue putValue
see org eclipse jface preference I Preference Store set Default java lang String double public void set Default String name double value Defaults cannot be set this way  IPreferenceStore setDefault setDefault
see org eclipse jface preference I Preference Store set Default java lang String float public void set Default String name float value Defaults cannot be set this way  IPreferenceStore setDefault setDefault
see org eclipse jface preference I Preference Store set Default java lang String int public void set Default String name int value Defaults cannot be set this way  IPreferenceStore setDefault setDefault
see org eclipse jface preference I Preference Store set Default java lang String long public void set Default String name long value Defaults cannot be set this way  IPreferenceStore setDefault setDefault
see org eclipse jface preference I Preference Store set Default java lang String java lang String public void set Default String name String default Object Defaults cannot be set this way  IPreferenceStore setDefault setDefault defaultObject
see org eclipse jface preference I Preference Store set Default java lang String boolean public void set Default String name boolean value Defaults cannot be set this way  IPreferenceStore setDefault setDefault
see org eclipse jface preference I Preference Store set To Default java lang String public void set To Default String name preferences remove name dirty true  IPreferenceStore setToDefault setToDefault
see org eclipse jface preference I Preference Store set Value java lang String double public void set Value String name double value preferences put Double name value dirty true  IPreferenceStore setValue setValue putDouble
see org eclipse jface preference I Preference Store set Value java lang String float public void set Value String name float value preferences put Float name value dirty true  IPreferenceStore setValue setValue putFloat
see org eclipse jface preference I Preference Store set Value java lang String int public void set Value String name int value preferences put Int name value dirty true  IPreferenceStore setValue setValue putInt
see org eclipse jface preference I Preference Store set Value java lang String long public void set Value String name long value preferences put Long name value dirty true  IPreferenceStore setValue setValue putLong
see org eclipse jface preference I Preference Store set Value java lang String java lang String public void set Value String name String value put Value name value  IPreferenceStore setValue setValue putValue
see org eclipse jface preference I Preference Store set Value java lang String boolean public void set Value String name boolean value preferences put Boolean name value dirty true  IPreferenceStore setValue setValue putBoolean
protected Control create Contents Composite parent initialize Composite composite new Composite parent SWT NULL composite set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout layout new Grid Layout composite set Layout layout create Wrapping Label composite Policy bind Repository Encoding Property Page 2 1 NON NLS 1 encoding new Encoding Field Editor CVS Repository Location PREF SERVER ENCODING Policy bind Repository Encoding Property Page 3 composite NON NLS 1 encoding set Preference Page this encoding set Preference Store get Location Preference Store encoding load encoding set Property Change Listener this create Wrapping Label composite Policy bind Repository Encoding Property Page 4 1 NON NLS 1 Workbench Help set Help get Control I Help Context Ids REPOSITORY ENCODING PROPERTY PAGE Dialog apply Dialog Font parent return composite  createContents setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout setLayout createWrappingLabel RepositoryEncodingPropertyPage EncodingFieldEditor CVSRepositoryLocation PREF_SERVER_ENCODING RepositoryEncodingPropertyPage setPreferencePage setPreferenceStore getLocationPreferenceStore setPropertyChangeListener createWrappingLabel RepositoryEncodingPropertyPage WorkbenchHelp setHelp getControl IHelpContextIds REPOSITORY_ENCODING_PROPERTY_PAGE applyDialogFont
private I Preference Store get Location Preference Store return new OSGI Preference Store CVS Repository Location location get Preferences CVS Repository Location get Default Preferences  IPreferenceStore getLocationPreferenceStore OSGIPreferenceStore CVSRepositoryLocation getPreferences CVSRepositoryLocation getDefaultPreferences
private void initialize location null I Adaptable element get Element if element instanceof ICVS Repository Location location ICVS Repository Location element else Object adapter element get Adapter ICVS Repository Location class if adapter instanceof ICVS Repository Location location ICVS Repository Location adapter  IAdaptable getElement ICVSRepositoryLocation ICVSRepositoryLocation getAdapter ICVSRepositoryLocation ICVSRepositoryLocation ICVSRepositoryLocation
public void property Change Property Change Event event if event get Property Field Editor IS VALID set Valid Boolean event get New Value boolean Value return  propertyChange PropertyChangeEvent getProperty FieldEditor IS_VALID setValid getNewValue booleanValue
public boolean perform Ok if Known Repositories get Instance is Known Repository location get Location The location may have been replaced by the main properties page Message Dialog open Information get Shell Policy bind Repository Encoding Property Page 0 Policy bind Repository Encoding Property Page 1 location get Location NON NLS 1 NON NLS 2 return true encoding store try CVS Repository Location location get Preferences flush catch Backing Store Exception e Log and ignore CVSUI Plugin log new CVS Status I Status ERROR Policy bind internal e NON NLS 1 return true  performOk KnownRepositories getInstance isKnownRepository getLocation MessageDialog openInformation getShell RepositoryEncodingPropertyPage RepositoryEncodingPropertyPage getLocation CVSRepositoryLocation getPreferences BackingStoreException CVSUIPlugin CVSStatus IStatus
private Label create Wrapping Label Composite parent String text int horizontal Span Label label new Label parent SWT LEFT SWT WRAP label set Text text label set Font parent get Font Grid Data data new Grid Data data horizontal Span horizontal Span data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true data width Hint LABEL WIDTH HINT label set Layout Data data return label  createWrappingLabel horizontalSpan setText setFont getFont GridData GridData horizontalSpan horizontalSpan horizontalAlignment GridData grabExcessHorizontalSpace widthHint LABEL_WIDTH_HINT setLayoutData

Answer an array of all known remote roots public ICVS Repository Location get Known Repository Locations return Known Repositories get Instance get Repositories  ICVSRepositoryLocation getKnownRepositoryLocations KnownRepositories getInstance getRepositories
Method get Repository Roots param iCVS Repository Locations return Repository Root private Repository Root get Repository Roots ICVS Repository Location locations List roots new Array List for int i 0 i locations length i ICVS Repository Location location locations i Repository Root root get Repository Root For location if root null roots add root return Repository Root roots to Array new Repository Root roots size  getRepositoryRoots iCVSRepositoryLocations RepositoryRoot RepositoryRoot getRepositoryRoots ICVSRepositoryLocation ArrayList ICVSRepositoryLocation RepositoryRoot getRepositoryRootFor RepositoryRoot toArray RepositoryRoot
public Repository Root get Known Repository Roots return get Repository Roots get Known Repository Locations  RepositoryRoot getKnownRepositoryRoots getRepositoryRoots getKnownRepositoryLocations
Get the list of known branch tags for a given remote root public CVS Tag get Known Tags ICVS Folder project int tag Type try CVS Tag tags get Known Tags project Set result new Hash Set for int i 0 i tags length i CVS Tag tag tags i if tag get Type tag Type result add tag return CVS Tag result to Array new CVS Tag result size catch CVS Exception e CVSUI Plugin log e return new CVS Tag 0  CVSTag getKnownTags ICVSFolder tagType CVSTag getKnownTags HashSet CVSTag getType tagType CVSTag toArray CVSTag CVSException CVSUIPlugin CVSTag
Get the list of known version tags for a given project public CVS Tag get Known Tags ICVS Repository Location location int tag Type Set result new Hash Set Repository Root root Repository Root repository Roots get location get Location if root null String paths root get Known Remote Paths for int i 0 i paths length i String path paths i CVS Tag tags root get All Known Tags path for int j 0 j tags length j CVS Tag tag tags j if tag get Type tag Type result add tag return CVS Tag result to Array new CVS Tag 0  CVSTag getKnownTags ICVSRepositoryLocation tagType HashSet RepositoryRoot RepositoryRoot repositoryRoots getLocation getKnownRemotePaths CVSTag getAllKnownTags CVSTag getType tagType CVSTag toArray CVSTag
Method get Known Tags param repository param set param i param monitor return CVS Tag public CVS Tag get Known Tags ICVS Repository Location repository I Working Set set int tag Type I Progress Monitor monitor throws CVS Exception if set null return get Known Tags repository tag Type ICVS Remote Resource folders get Folders For Tag repository CVS Tag DEFAULT monitor folders filter Resources set folders Set tags new Hash Set for int i 0 i folders length i ICVS Remote Folder folder ICVS Remote Folder folders i tags add All Arrays as List get Known Tags folder tag Type return CVS Tag tags to Array new CVS Tag tags size  getKnownTags CVSTag CVSTag getKnownTags ICVSRepositoryLocation IWorkingSet tagType IProgressMonitor CVSException getKnownTags tagType ICVSRemoteResource getFoldersForTag CVSTag filterResources HashSet ICVSRemoteFolder ICVSRemoteFolder addAll asList getKnownTags tagType CVSTag toArray CVSTag
public CVS Tag get Known Tags ICVS Folder project throws CVS Exception Repository Root root get Repository Root For project String remote Path Repository Root get Remote Path For project return root get All Known Tags remote Path  CVSTag getKnownTags ICVSFolder CVSException RepositoryRoot getRepositoryRootFor remotePath RepositoryRoot getRemotePathFor getAllKnownTags remotePath
public Map get Known Projects And Versions ICVS Repository Location location Map known Tags new Hash Map Repository Root root get Repository Root For location String paths root get Known Remote Paths for int i 0 i paths length i String path paths i Set result new Hash Set result add All Arrays as List root get All Known Tags path known Tags put path result return known Tags  getKnownProjectsAndVersions ICVSRepositoryLocation knownTags HashMap RepositoryRoot getRepositoryRootFor getKnownRemotePaths HashSet addAll asList getAllKnownTags knownTags knownTags
public ICVS Remote Resource get Folders For Tag ICVS Repository Location location CVS Tag tag I Progress Monitor monitor throws CVS Exception monitor Policy monitor For monitor try monitor begin Task Policy bind Repository Manager fetching Remote Folders tag get Name 100 NON NLS 1 if tag get Type CVS Tag HEAD ICVS Remote Resource resources location members tag false Policy sub Monitor For monitor 60 Repository Root root get Repository Root For location ICVS Remote Resource modules root get Defined Modules tag Policy sub Monitor For monitor 40 ICVS Remote Resource result new ICVS Remote Resource resources length modules length System arraycopy resources 0 result 0 resources length System arraycopy modules 0 result resources length modules length return result if tag get Type CVS Tag DATE ICVS Remote Resource resources location members tag false Policy sub Monitor For monitor 60 Repository Root root get Repository Root For location ICVS Remote Resource modules root get Defined Modules tag Policy sub Monitor For monitor 40 ICVS Remote Resource result new ICVS Remote Resource resources length modules length System arraycopy resources 0 result 0 resources length System arraycopy modules 0 result resources length modules length return result Set result new Hash Set Get the tags for the location Repository Root root get Repository Root For location String paths root get Known Remote Paths for int i 0 i paths length i String path paths i List tags Arrays as List root get All Known Tags path if tags contains tag ICVS Remote Folder remote root get Remote Folder path tag Policy sub Monitor For monitor 100 result add remote return ICVS Remote Resource result to Array new ICVS Remote Resource result size finally monitor done  ICVSRemoteResource getFoldersForTag ICVSRepositoryLocation CVSTag IProgressMonitor CVSException monitorFor beginTask RepositoryManager fetchingRemoteFolders getName getType CVSTag ICVSRemoteResource subMonitorFor RepositoryRoot getRepositoryRootFor ICVSRemoteResource getDefinedModules subMonitorFor ICVSRemoteResource ICVSRemoteResource getType CVSTag ICVSRemoteResource subMonitorFor RepositoryRoot getRepositoryRootFor ICVSRemoteResource getDefinedModules subMonitorFor ICVSRemoteResource ICVSRemoteResource HashSet RepositoryRoot getRepositoryRootFor getKnownRemotePaths asList getAllKnownTags ICVSRemoteFolder getRemoteFolder subMonitorFor ICVSRemoteResource toArray ICVSRemoteResource
public void refresh Defined Tags ICVS Folder project boolean replace boolean notify I Progress Monitor monitor throws Team Exception Repository Root root get Repository Root For project String remote Path Repository Root get Remote Path For project root refresh Defined Tags remote Path replace monitor if notify broadcast Repository Change root  refreshDefinedTags ICVSFolder IProgressMonitor TeamException RepositoryRoot getRepositoryRootFor remotePath RepositoryRoot getRemotePathFor refreshDefinedTags remotePath broadcastRepositoryChange
A repository root has been added Notify any listeners public void root Added ICVS Repository Location root Iterator it listeners iterator while it has Next I Repository Listener listener I Repository Listener it next listener repository Added root  rootAdded ICVSRepositoryLocation hasNext IRepositoryListener IRepositoryListener repositoryAdded
A repository root has been removed Remove the tags defined for this root and notify any listeners public void root Removed ICVS Repository Location root Repository Root repo Root Repository Root repository Roots remove root get Location if repo Root null broadcast Repository Change repo Root  rootRemoved ICVSRepositoryLocation RepositoryRoot repoRoot RepositoryRoot repositoryRoots getLocation repoRoot broadcastRepositoryChange repoRoot
Accept tags for any CVS resource However for the time being the given version tags are added to the list of known tags for the remote ancestor of the resource that is a direct child of the remote root public void add Tags ICVS Resource resource CVS Tag tags throws CVS Exception Repository Root root get Repository Root For resource XXX could be a file or folder String remote Path Repository Root get Remote Path For resource root add Tags remote Path tags broadcast Repository Change root  addTags ICVSResource CVSTag CVSException RepositoryRoot getRepositoryRootFor remotePath RepositoryRoot getRemotePathFor addTags remotePath broadcastRepositoryChange
public void add Date Tag ICVS Repository Location location CVS Tag tag if tag null return Repository Root root get Repository Root For location root add Date Tag tag broadcast Repository Change root  addDateTag ICVSRepositoryLocation CVSTag RepositoryRoot getRepositoryRootFor addDateTag broadcastRepositoryChange
public void remove Date Tag ICVS Repository Location location CVS Tag tag Repository Root root get Repository Root For location root remove Date Tag tag broadcast Repository Change root  removeDateTag ICVSRepositoryLocation CVSTag RepositoryRoot getRepositoryRootFor removeDateTag broadcastRepositoryChange
public void set Auto Refresh Files ICVS Folder project String file Paths throws CVS Exception Repository Root root get Repository Root For project String remote Path Repository Root get Remote Path For project root set Auto Refresh Files remote Path file Paths  setAutoRefreshFiles ICVSFolder filePaths CVSException RepositoryRoot getRepositoryRootFor remotePath RepositoryRoot getRemotePathFor setAutoRefreshFiles remotePath filePaths
public void remove Auto Refresh Files ICVS Folder project String relative File Paths throws CVS Exception Repository Root root get Repository Root For project String remote Path Repository Root get Remote Path For project Set set new Hash Set set add All Arrays as List root get Auto Refresh Files remote Path set remove All Arrays as List relative File Paths root set Auto Refresh Files remote Path String set to Array new String set size  removeAutoRefreshFiles ICVSFolder relativeFilePaths CVSException RepositoryRoot getRepositoryRootFor remotePath RepositoryRoot getRemotePathFor HashSet addAll asList getAutoRefreshFiles remotePath removeAll asList relativeFilePaths setAutoRefreshFiles remotePath toArray
public String get Auto Refresh Files ICVS Folder project throws CVS Exception Repository Root root get Repository Root For project String remote Path Repository Root get Remote Path For project return root get Auto Refresh Files remote Path  getAutoRefreshFiles ICVSFolder CVSException RepositoryRoot getRepositoryRootFor remotePath RepositoryRoot getRemotePathFor getAutoRefreshFiles remotePath
Remove the given tags from the list of known tags for the given remote root public void remove Tags ICVS Folder project CVS Tag tags throws CVS Exception Repository Root root get Repository Root For project String remote Path Repository Root get Remote Path For project root remove Tags remote Path tags broadcast Repository Change root  removeTags ICVSFolder CVSTag CVSException RepositoryRoot getRepositoryRootFor remotePath RepositoryRoot getRemotePathFor removeTags remotePath broadcastRepositoryChange
load Comment History CVS Provider Plugin get Plugin add Repository Listener new ICVS Listener public void repository Added ICVS Repository Location root root Added root  loadCommentHistory CVSProviderPlugin getPlugin addRepositoryListener ICVSListener repositoryAdded ICVSRepositoryLocation rootAdded
root Added root public void repository Removed ICVS Repository Location root root Removed root  rootAdded repositoryRemoved ICVSRepositoryLocation rootRemoved
public void startup throws Team Exception load State load Comment History CVS Provider Plugin get Plugin add Repository Listener new ICVS Listener public void repository Added ICVS Repository Location root root Added root public void repository Removed ICVS Repository Location root root Removed root  TeamException loadState loadCommentHistory CVSProviderPlugin getPlugin addRepositoryListener ICVSListener repositoryAdded ICVSRepositoryLocation rootAdded repositoryRemoved ICVSRepositoryLocation rootRemoved
public void shutdown throws Team Exception save State save Comment History  TeamException saveState saveCommentHistory
private void load State throws Team Exception I Path plugin State Location CVSUI Plugin get Plugin get State Location append REPOSITORIES VIEW FILE File file plugin State Location to File if file exists try Buffered Input Stream is new Buffered Input Stream new File Input Stream file try read State is finally is close catch IO Exception e CVSUI Plugin log Status ERROR Policy bind Repository Manager io Exception e NON NLS 1 catch Team Exception e CVSUI Plugin log e else I Path old Plugin State Location CVSUI Plugin get Plugin get State Location append STATE FILE file old Plugin State Location to File if file exists try Data Input Stream dis new Data Input Stream new File Input Stream file try read Old State dis finally dis close save State file delete catch IO Exception e CVSUI Plugin log Status ERROR Policy bind Repository Manager io Exception e NON NLS 1 catch Team Exception e CVSUI Plugin log e  loadState TeamException IPath pluginStateLocation CVSUIPlugin getPlugin getStateLocation REPOSITORIES_VIEW_FILE pluginStateLocation toFile BufferedInputStream BufferedInputStream FileInputStream readState IOException CVSUIPlugin RepositoryManager ioException TeamException CVSUIPlugin IPath oldPluginStateLocation CVSUIPlugin getPlugin getStateLocation STATE_FILE oldPluginStateLocation toFile DataInputStream DataInputStream FileInputStream readOldState saveState IOException CVSUIPlugin RepositoryManager ioException TeamException CVSUIPlugin
private void load Comment History throws Team Exception I Path plugin State Location CVSUI Plugin get Plugin get State Location append COMMENT HIST FILE File file plugin State Location to File if file exists return try Buffered Input Stream is new Buffered Input Stream new File Input Stream file try read Comment History is finally is close catch IO Exception e CVSUI Plugin log Status ERROR Policy bind Repository Manager io Exception e NON NLS 1 catch Team Exception e CVSUI Plugin log e  loadCommentHistory TeamException IPath pluginStateLocation CVSUIPlugin getPlugin getStateLocation COMMENT_HIST_FILE pluginStateLocation toFile BufferedInputStream BufferedInputStream FileInputStream readCommentHistory IOException CVSUIPlugin RepositoryManager ioException TeamException CVSUIPlugin
protected void save State throws Team Exception I Path plugin State Location CVSUI Plugin get Plugin get State Location File temp File plugin State Location append REPOSITORIES VIEW FILE tmp to File NON NLS 1 File state File plugin State Location append REPOSITORIES VIEW FILE to File try XML Writer writer new XML Writer new Buffered Output Stream new File Output Stream temp File try write State writer finally writer close if state File exists state File delete boolean renamed temp File rename To state File if renamed throw new Team Exception new Status Status ERROR CVSUI Plugin ID Team Exception UNABLE Policy bind Repository Manager rename temp File get Absolute Path null NON NLS 1 catch IO Exception e throw new Team Exception new Status Status ERROR CVSUI Plugin ID Team Exception UNABLE Policy bind Repository Manager save state File get Absolute Path e NON NLS 1  saveState TeamException IPath pluginStateLocation CVSUIPlugin getPlugin getStateLocation tempFile pluginStateLocation REPOSITORIES_VIEW_FILE toFile stateFile pluginStateLocation REPOSITORIES_VIEW_FILE toFile XMLWriter XMLWriter BufferedOutputStream FileOutputStream tempFile writeState stateFile stateFile tempFile renameTo stateFile TeamException CVSUIPlugin TeamException RepositoryManager tempFile getAbsolutePath IOException TeamException CVSUIPlugin TeamException RepositoryManager stateFile getAbsolutePath
private void write State XML Writer writer throws IO Exception CVS Exception writer start Tag Repositories View Content Handler REPOSITORIES VIEW TAG null true Write the repositories Collection repos Arrays as List get Known Repository Locations Iterator it repos iterator while it has Next CVS Repository Location location CVS Repository Location it next Repository Root root get Repository Root For location root write State writer writer end Tag Repositories View Content Handler REPOSITORIES VIEW TAG  writeState XMLWriter IOException CVSException startTag RepositoriesViewContentHandler REPOSITORIES_VIEW_TAG asList getKnownRepositoryLocations hasNext CVSRepositoryLocation CVSRepositoryLocation RepositoryRoot getRepositoryRootFor writeState endTag RepositoriesViewContentHandler REPOSITORIES_VIEW_TAG
private void read State Input Stream stream throws IO Exception Team Exception try SAX Parser Factory factory SAX Parser Factory new Instance SAX Parser parser factory newSAX Parser parser parse new Input Source stream new Repositories View Content Handler this catch SAX Exception ex throw new CVS Exception Policy bind Repository Manager parsing Problem REPOSITORIES VIEW FILE ex NON NLS 1 catch Parser Configuration Exception ex throw new CVS Exception Policy bind Repository Manager parsing Problem REPOSITORIES VIEW FILE ex NON NLS 1  readState InputStream IOException TeamException SAXParserFactory SAXParserFactory newInstance SAXParser newSAXParser InputSource RepositoriesViewContentHandler SAXException CVSException RepositoryManager parsingProblem REPOSITORIES_VIEW_FILE ParserConfigurationException CVSException RepositoryManager parsingProblem REPOSITORIES_VIEW_FILE
private void read Comment History Input Stream stream throws IO Exception Team Exception try SAX Parser Factory factory SAX Parser Factory new Instance SAX Parser parser factory newSAX Parser parser parse new Input Source stream new Comment History Content Handler catch SAX Exception ex throw new CVS Exception Policy bind Repository Manager parsing Problem COMMENT HIST FILE ex NON NLS 1 catch Parser Configuration Exception ex throw new CVS Exception Policy bind Repository Manager parsing Problem COMMENT HIST FILE ex NON NLS 1  readCommentHistory InputStream IOException TeamException SAXParserFactory SAXParserFactory newInstance SAXParser newSAXParser InputSource CommentHistoryContentHandler SAXException CVSException RepositoryManager parsingProblem COMMENT_HIST_FILE ParserConfigurationException CVSException RepositoryManager parsingProblem COMMENT_HIST_FILE
private void read Old State Data Input Stream dis throws IO Exception Team Exception int repo Size dis read Int boolean version1 false if repo Size STATE FILE VERSION 1 version1 true repo Size dis read Int for int i 0 i repo Size i ICVS Repository Location root Known Repositories get Instance get Repository dis readUTF Repository Root repo Root get Repository Root For root read branch tags associated with this root int tags Size dis read Int CVS Tag branch Tags new CVS Tag tags Size for int j 0 j tags Size j String tag Name dis readUTF int tag Type dis read Int branch Tags j new CVS Tag tag Name tag Type Ignore the branch tags since they are handled differently now add Branch Tags root branch Tags read the number of projects for this root that have version tags int proj Size dis read Int if proj Size 0 for int j 0 j proj Size j String name dis readUTF Set tag Set new Hash Set int num Tags dis read Int for int k 0 k num Tags k tag Set add new CVS Tag dis readUTF CVS Tag VERSION CVS Tag tags CVS Tag tag Set to Array new CVS Tag tag Set size repo Root add Tags name tags read the auto refresh filenames for this project if version1 try proj Size dis read Int if proj Size 0 for int j 0 j proj Size j String name dis readUTF Set filenames new Hash Set int num Filenames dis read Int for int k 0 k num Filenames k filenames add dis readUTF repo Root set Auto Refresh Files name String filenames to Array new String filenames size catch EOF Exception e auto refresh files are not persisted continue and save them next time broadcast Repository Change repo Root  readOldState DataInputStream IOException TeamException repoSize readInt repoSize STATE_FILE_VERSION_1 repoSize readInt repoSize ICVSRepositoryLocation KnownRepositories getInstance getRepository RepositoryRoot repoRoot getRepositoryRootFor tagsSize readInt CVSTag branchTags CVSTag tagsSize tagsSize tagName tagType readInt branchTags CVSTag tagName tagType addBranchTags branchTags projSize readInt projSize projSize tagSet HashSet numTags readInt numTags tagSet CVSTag CVSTag CVSTag CVSTag tagSet toArray CVSTag tagSet repoRoot addTags projSize readInt projSize projSize HashSet numFilenames readInt numFilenames repoRoot setAutoRefreshFiles toArray EOFException broadcastRepositoryChange repoRoot
protected void save Comment History throws Team Exception I Path plugin State Location CVSUI Plugin get Plugin get State Location File temp File plugin State Location append COMMENT HIST FILE tmp to File NON NLS 1 File hist File plugin State Location append COMMENT HIST FILE to File try XML Writer writer new XML Writer new Buffered Output Stream new File Output Stream temp File try write Comment History writer finally writer close if hist File exists hist File delete boolean renamed temp File rename To hist File if renamed throw new Team Exception new Status Status ERROR CVSUI Plugin ID Team Exception UNABLE Policy bind Repository Manager rename temp File get Absolute Path null NON NLS 1 catch IO Exception e throw new Team Exception new Status Status ERROR CVSUI Plugin ID Team Exception UNABLE Policy bind Repository Manager save hist File get Absolute Path e NON NLS 1  saveCommentHistory TeamException IPath pluginStateLocation CVSUIPlugin getPlugin getStateLocation tempFile pluginStateLocation COMMENT_HIST_FILE toFile histFile pluginStateLocation COMMENT_HIST_FILE toFile XMLWriter XMLWriter BufferedOutputStream FileOutputStream tempFile writeCommentHistory histFile histFile tempFile renameTo histFile TeamException CVSUIPlugin TeamException RepositoryManager tempFile getAbsolutePath IOException TeamException CVSUIPlugin TeamException RepositoryManager histFile getAbsolutePath
private void write Comment History XML Writer writer throws IO Exception CVS Exception writer start Tag ELEMENT COMMIT HISTORY null false for int i 0 i previous Comments length i MAX COMMENTS i writer print Simple Tag ELEMENT COMMIT COMMENT previous Comments i writer end Tag ELEMENT COMMIT HISTORY  writeCommentHistory XMLWriter IOException CVSException startTag ELEMENT_COMMIT_HISTORY previousComments MAX_COMMENTS printSimpleTag ELEMENT_COMMIT_COMMENT previousComments endTag ELEMENT_COMMIT_HISTORY
public void add Repository Listener I Repository Listener listener listeners add listener  addRepositoryListener IRepositoryListener
public void remove Repository Listener I Repository Listener listener listeners remove listener  removeRepositoryListener IRepositoryListener
Method get Current Comment return String private String get Current Comment if previous Comments length 0 return NON NLS 1 return previous Comments 0  getCurrentComment getCurrentComment previousComments previousComments
Return the entered comment or null if canceled public String prompt For Comment final Shell shell I Resource resources To Commit final int result new int 1 final Release Comment Dialog dialog new Release Comment Dialog shell resources To Commit I Resource DEPTH INFINITE shell get Display sync Exec new Runnable public void run result 0 dialog open if result 0 Release Comment Dialog OK return if result 0 Release Comment Dialog OK return null return dialog get Comment  promptForComment IResource resourcesToCommit ReleaseCommentDialog ReleaseCommentDialog resourcesToCommit IResource DEPTH_INFINITE getDisplay syncExec ReleaseCommentDialog ReleaseCommentDialog getComment
Prompt to add all or some of the provided resources to version control The value null is returned if the dialog is cancelled param shell param unadded return I Resource public I Resource prompt For Resources To Be Added Shell shell I Resource unadded if unadded null return new I Resource 0 if unadded length 0 return unadded final I Resource result new I Resource 1 0 result 0 null final Add To Version Control Dialog dialog new Add To Version Control Dialog shell unadded shell get Display sync Exec new Runnable public void run int code dialog open if code I Dialog Constants YES ID result 0 dialog get Resources To Add else if code I Dialog Constants NO ID allow the commit to continue result 0 new I Resource 0 return result 0  IResource IResource promptForResourcesToBeAdded IResource IResource IResource IResource AddToVersionControlDialog AddToVersionControlDialog getDisplay syncExec IDialogConstants YES_ID getResourcesToAdd IDialogConstants NO_ID IResource
public ICVS Repository Location get Repository Location For ICVS Resource resource try return internal Get Repository Location For resource catch CVS Exception e CVSUI Plugin log e return null  ICVSRepositoryLocation getRepositoryLocationFor ICVSResource internalGetRepositoryLocationFor CVSException CVSUIPlugin
private ICVS Repository Location internal Get Repository Location For ICVS Resource resource throws CVS Exception ICVS Folder folder if resource is Folder folder ICVS Folder resource else folder resource get Parent if folder isCVS Folder ICVS Repository Location location Known Repositories get Instance get Repository folder get Folder Sync Info get Root return location XXX This is asking for trouble return null  ICVSRepositoryLocation internalGetRepositoryLocationFor ICVSResource CVSException ICVSFolder isFolder ICVSFolder getParent isCVSFolder ICVSRepositoryLocation KnownRepositories getInstance getRepository getFolderSyncInfo getRoot
private Repository Root get Repository Root For ICVS Resource resource throws CVS Exception ICVS Repository Location location internal Get Repository Location For resource if location null return null return get Repository Root For location  RepositoryRoot getRepositoryRootFor ICVSResource CVSException ICVSRepositoryLocation internalGetRepositoryLocationFor getRepositoryRootFor
public Repository Root get Repository Root For ICVS Repository Location location Repository Root root Repository Root repository Roots get location get Location if root null root new Repository Root location add root return root  RepositoryRoot getRepositoryRootFor ICVSRepositoryLocation RepositoryRoot RepositoryRoot repositoryRoots getLocation RepositoryRoot
Add the given repository root to the receiver The provided instance of Repository Root is used to provide extra information about the repository location param current Repository Root public void add Repository Root root repository Roots put root get Root get Location root broadcast Repository Change root  RepositoryRoot currentRepositoryRoot RepositoryRoot repositoryRoots getRoot getLocation broadcastRepositoryChange
private void broadcast Repository Change Repository Root root if notification Level 0 broadcast Repositories Changed new ICVS Repository Location root get Root else changed Repositories put root get Root get Location root get Root  broadcastRepositoryChange RepositoryRoot notificationLevel broadcastRepositoriesChanged ICVSRepositoryLocation getRoot changedRepositories getRoot getLocation getRoot
private void broadcast Repositories Changed ICVS Repository Location roots if roots length 0 return Iterator it listeners iterator while it has Next I Repository Listener listener I Repository Listener it next listener repositories Changed roots  broadcastRepositoriesChanged ICVSRepositoryLocation hasNext IRepositoryListener IRepositoryListener repositoriesChanged
Run the given runnable waiting until the end to perform a refresh param runnable param monitor public void run I Runnable With Progress runnable I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try notification Level runnable run monitor finally notification Level Math max 0 notification Level 1 if notification Level 0 try Collection roots changed Repositories values broadcast Repositories Changed ICVS Repository Location roots to Array new ICVS Repository Location roots size finally changed Repositories clear  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException notificationLevel notificationLevel notificationLevel notificationLevel changedRepositories broadcastRepositoriesChanged ICVSRepositoryLocation toArray ICVSRepositoryLocation changedRepositories
Method is Displaying Project Versions param repository return boolean public boolean is Displaying Project Versions ICVS Repository Location repository return true  isDisplayingProjectVersions isDisplayingProjectVersions ICVSRepositoryLocation
Method filter Resources filters the given resources using the given working set param current param resources return ICVS Remote Resource public ICVS Remote Resource filter Resources I Working Set working Set ICVS Remote Resource resources if working Set null return resources get the projects associated with the working set I Adaptable adaptables working Set get Elements Set projects new Hash Set for int i 0 i adaptables length i I Adaptable adaptable adaptables i Object adapted adaptable get Adapter I Resource class if adapted null Can this code be generalized I Project project I Resource adapted get Project projects add project List result new Array List for int i 0 i resources length i ICVS Remote Resource resource resources i for Iterator iter projects iterator iter has Next I Project project I Project iter next if project get Name equals resource get Name result add resource break return ICVS Remote Resource result to Array new ICVS Remote Resource result size  filterResources ICVSRemoteResource ICVSRemoteResource filterResources IWorkingSet workingSet ICVSRemoteResource workingSet IAdaptable workingSet getElements HashSet IAdaptable getAdapter IResource IProject IResource getProject ArrayList ICVSRemoteResource hasNext IProject IProject getName getName ICVSRemoteResource toArray ICVSRemoteResource
Method set Label param location param label public void set Label CVS Repository Location location String label throws CVS Exception Repository Root root get Repository Root For location String old Label root get Name if old Label null if label null return root set Name label else if label null root set Name label else if label equals old Label return else root set Name label broadcast Repository Change root  setLabel setLabel CVSRepositoryLocation CVSException RepositoryRoot getRepositoryRootFor oldLabel getName oldLabel setName setName oldLabel setName broadcastRepositoryChange
run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception Repository Root root get Repository Root For old Location Disposing of the old location will result in the deletion of the cached root through a listener callback Known Repositories get Instance dispose Repository old Location Get the new location from the CVS plugin to ensure we use the instance that will be returned by future calls to get Repository boolean is New Known Repositories get Instance is Known Repository new Location get Location root set Repository Location Known Repositories get Instance add Repository new Location is New broadcast add root  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException RepositoryRoot getRepositoryRootFor oldLocation KnownRepositories getInstance disposeRepository oldLocation getRepository isNew KnownRepositories getInstance isKnownRepository newLocation getLocation setRepositoryLocation KnownRepositories getInstance addRepository newLocation isNew
Replace the old repository location with the new one assuming that they are the same location with different authentication informations param location param new Location public void replace Repository Location final ICVS Repository Location old Location final CVS Repository Location new Location try run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception Repository Root root get Repository Root For old Location Disposing of the old location will result in the deletion of the cached root through a listener callback Known Repositories get Instance dispose Repository old Location Get the new location from the CVS plugin to ensure we use the instance that will be returned by future calls to get Repository boolean is New Known Repositories get Instance is Known Repository new Location get Location root set Repository Location Known Repositories get Instance add Repository new Location is New broadcast add root Policy monitor For null catch Invocation Target Exception e CVS Exception wrap Exception e catch Interrupted Exception e  newLocation replaceRepositoryLocation ICVSRepositoryLocation oldLocation CVSRepositoryLocation newLocation IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException RepositoryRoot getRepositoryRootFor oldLocation KnownRepositories getInstance disposeRepository oldLocation getRepository isNew KnownRepositories getInstance isKnownRepository newLocation getLocation setRepositoryLocation KnownRepositories getInstance addRepository newLocation isNew monitorFor InvocationTargetException CVSException wrapException InterruptedException
Purge any cahced information public void purge Cache for Iterator iter repository Roots values iterator iter has Next Repository Root root Repository Root iter next root clear Cache  purgeCache repositoryRoots hasNext RepositoryRoot RepositoryRoot clearCache
Answer the list of comments that were previously used when committing return String public String get Previous Comments return previous Comments  getPreviousComments previousComments
Method add Comment param string public void add Comment String comment Only add the comment if its not there already if contains Comment comment return Insert the comment as the first element String new Comments new String Math min previous Comments length 1 MAX COMMENTS new Comments 0 comment for int i 1 i new Comments length i new Comments i previous Comments i 1 previous Comments new Comments  addComment addComment containsComment newComments previousComments MAX_COMMENTS newComments newComments newComments previousComments previousComments newComments
private boolean contains Comment String comment for int i 0 i previous Comments length i if previous Comments i equals comment return true return false  containsComment previousComments previousComments

List date Tags new Array List public Repository Root ICVS Repository Location root this root root  dateTags ArrayList RepositoryRoot ICVSRepositoryLocation
Returns the name return String public String get Name return name  getName
Method get Remote Folder param path param tag return ICVS Remote Folder public ICVS Remote Folder get Remote Folder String path CVS Tag tag I Progress Monitor monitor if is Defined Module Name path return get Defined Module get Defined Module Name path tag monitor else return root get Remote Folder path tag  getRemoteFolder ICVSRemoteFolder ICVSRemoteFolder getRemoteFolder CVSTag IProgressMonitor isDefinedModuleName getDefinedModule getDefinedModuleName getRemoteFolder
static boolean is Defined Module Name String path return path starts With DEFINED MODULE PREFIX  isDefinedModuleName startsWith DEFINED_MODULE_PREFIX
static String get Defined Module Name String path return path substring DEFINED MODULE PREFIX length  getDefinedModuleName DEFINED_MODULE_PREFIX
static String as Defined Module Path String path return DEFINED MODULE PREFIX path  asDefinedModulePath DEFINED_MODULE_PREFIX
Method get Defined Module param path param tag param monitor return ICVS Remote Folder private ICVS Remote Folder get Defined Module String path CVS Tag tag I Progress Monitor monitor Map cache get Defined Modules Cache tag monitor ICVS Remote Folder folder ICVS Remote Folder cache get path if folder null folder ICVS Remote Folder folder for Tag tag return folder  getDefinedModule ICVSRemoteFolder ICVSRemoteFolder getDefinedModule CVSTag IProgressMonitor getDefinedModulesCache ICVSRemoteFolder ICVSRemoteFolder ICVSRemoteFolder forTag
private Map get Defined Modules Cache CVS Tag tag I Progress Monitor monitor if modules Cache null modules Cache new Hash Map synchronized modules Cache try ICVS Remote Resource folders root members CVS Tag DEFAULT true monitor for int i 0 i folders length i ICVS Remote Resource resource folders i modules Cache put resource get Name resource catch CVS Exception e we could t fetch the modules Log the problem and continue CVSUI Plugin log e return modules Cache  getDefinedModulesCache CVSTag IProgressMonitor modulesCache modulesCache HashMap modulesCache ICVSRemoteResource CVSTag ICVSRemoteResource modulesCache getName CVSException CVSUIPlugin modulesCache
public ICVS Remote Resource get Defined Modules CVS Tag tag I Progress Monitor monitor Map cache get Defined Modules Cache tag monitor return ICVS Remote Resource cache values to Array new ICVS Remote Resource cache size  ICVSRemoteResource getDefinedModules CVSTag IProgressMonitor getDefinedModulesCache ICVSRemoteResource toArray ICVSRemoteResource
public static String get Remote Path For ICVS Resource resource throws CVS Exception if resource is Folder if resource instanceof ICVS Remote Folder ICVS Remote Folder remote Folder ICVS Remote Folder resource if remote Folder is Defined Module return as Defined Module Path remote Folder get Name Folder Sync Info info ICVS Folder resource get Folder Sync Info if info null throw new CVS Exception Policy bind Repository Root folder Info Missing resource get Name NON NLS 1 return info get Repository else Folder Sync Info info resource get Parent get Folder Sync Info if info null throw new CVS Exception Policy bind Repository Root folder Info Missing resource get Parent get Name NON NLS 1 String path new Path info get Repository append resource get Name to String return path  getRemotePathFor ICVSResource CVSException isFolder ICVSRemoteFolder ICVSRemoteFolder remoteFolder ICVSRemoteFolder remoteFolder isDefinedModule asDefinedModulePath remoteFolder getName FolderSyncInfo ICVSFolder getFolderSyncInfo CVSException RepositoryRoot folderInfoMissing getName getRepository FolderSyncInfo getParent getFolderSyncInfo CVSException RepositoryRoot folderInfoMissing getParent getName getRepository getName toString
Returns the root return ICVS Repository Location public ICVS Repository Location get Root return root  ICVSRepositoryLocation ICVSRepositoryLocation getRoot
Sets the name param name The name to set public void set Name String name this name name  setName
Accept the tags for any remote path that represents a folder However for the time being the given version tags are added to the list of known tags for the remote ancestor of the resource that is a direct child of the remote root It is the reponsibility of the caller to ensure that the given remote path is valid public void add Tags String remote Path CVS Tag tags add Date Tags tags add Version And Branch Tags remote Path tags  addTags remotePath CVSTag addDateTags addVersionAndBranchTags remotePath
private void add Date Tags CVS Tag tags for int i 0 i tags length i if tags i get Type CVS Tag DATE date Tags add tags i  addDateTags CVSTag getType CVSTag dateTags
private void add Version And Branch Tags String remote Path CVS Tag tags Get the name to cache the version tags with String name get Cache Path For remote Path Make sure there is a table for the ancestor that holds the tags Set set Set version And Branch Tags get name if set null set new Hash Set version And Branch Tags put name set Store the tag with the appropriate ancestor for int i 0 i tags length i if tags i get Type CVS Tag DATE set add tags i  addVersionAndBranchTags remotePath CVSTag getCachePathFor remotePath versionAndBranchTags HashSet versionAndBranchTags getType CVSTag
Add the given date tag to the list of date tags associated with the repository param tag a date tag public void add Date Tag CVS Tag tag if date Tags contains tag date Tags add tag  addDateTag CVSTag dateTags dateTags
public void remove Date Tag CVS Tag tag if date Tags contains tag date Tags remove tag  removeDateTag CVSTag dateTags dateTags
Return the list of date tags assocaiated with the repository return the list of date tags public CVS Tag get Date Tags return CVS Tag date Tags to Array new CVS Tag date Tags size  CVSTag getDateTags CVSTag dateTags toArray CVSTag dateTags
Remove the given tags from the receiver param remote Path param tags public void remove Tags String remote Path CVS Tag tags remove Date Tags tags remove Version And Branch Tags remote Path tags  remotePath removeTags remotePath CVSTag removeDateTags removeVersionAndBranchTags remotePath
private void remove Date Tags CVS Tag tags if date Tags is Empty return Store the tag with the appropriate ancestor for int i 0 i tags length i date Tags remove tags i  removeDateTags CVSTag dateTags isEmpty dateTags
private void remove Version And Branch Tags String remote Path CVS Tag tags Get the name to cache the version tags with String name get Cache Path For remote Path Make sure there is a table for the ancestor that holds the tags Set set Set version And Branch Tags get name if set null return Store the tag with the appropriate ancestor for int i 0 i tags length i set remove tags i  removeVersionAndBranchTags remotePath CVSTag getCachePathFor remotePath versionAndBranchTags
Returns the absolute paths of the auto refresh files relative to the repository return String public String get Auto Refresh Files String remote Path String name get Cache Path For remote Path Set files Set auto Refresh Files get name if files null files is Empty convert the default relative file paths to full paths if is Defined Module Name remote Path return new String 0 List result new Array List for int i 0 i DEFAULT AUTO REFRESH FILES length i String relative Path DEFAULT AUTO REFRESH FILES i result add new Path remote Path append relative Path to String return String result to Array new String result size else return String files to Array new String files size  getAutoRefreshFiles remotePath getCachePathFor remotePath autoRefreshFiles isEmpty isDefinedModuleName remotePath ArrayList DEFAULT_AUTO_REFRESH_FILES relativePath DEFAULT_AUTO_REFRESH_FILES remotePath relativePath toString toArray toArray
Sets the auto refresh files for the given remote path to the given string values which are absolute file paths relative to the receiver param auto Refresh Files The auto Refresh Files to set public void set Auto Refresh Files String remote Path String auto Refresh Files Set new Files new Hash Set Arrays as List auto Refresh Files Check to see if the auto refresh files are the default files if auto Refresh Files length DEFAULT AUTO REFRESH FILES length boolean is Default true for int i 0 i DEFAULT AUTO REFRESH FILES length i String file Path DEFAULT AUTO REFRESH FILES i if new Files contains new Path remote Path append file Path to String is Default false break if is Default this auto Refresh Files remove get Cache Path For remote Path return this auto Refresh Files put get Cache Path For remote Path new Files  autoRefreshFiles autoRefreshFiles setAutoRefreshFiles remotePath autoRefreshFiles newFiles HashSet asList autoRefreshFiles autoRefreshFiles DEFAULT_AUTO_REFRESH_FILES isDefault DEFAULT_AUTO_REFRESH_FILES filePath DEFAULT_AUTO_REFRESH_FILES newFiles remotePath filePath toString isDefault isDefault autoRefreshFiles getCachePathFor remotePath autoRefreshFiles getCachePathFor remotePath newFiles
Fetches tags from auto refresh files public void refresh Defined Tags String remote Path boolean replace I Progress Monitor monitor throws Team Exception String files To Refresh get Auto Refresh Files remote Path monitor begin Task null files To Refresh length 10 NON NLS 1 try List tags new Array List for int i 0 i files To Refresh length i ICVS Remote File file root get Remote File files To Refresh i CVS Tag DEFAULT tags add All Arrays as List fetch Tags file Policy sub Monitor For monitor 5 if tags is Empty add Tags remote Path CVS Tag tags to Array new CVS Tag tags size finally monitor done  refreshDefinedTags remotePath IProgressMonitor TeamException filesToRefresh getAutoRefreshFiles remotePath beginTask filesToRefresh ArrayList filesToRefresh ICVSRemoteFile getRemoteFile filesToRefresh CVSTag addAll asList fetchTags subMonitorFor isEmpty addTags remotePath CVSTag toArray CVSTag
Returns Branch and Version tags for the given files private CVS Tag fetch Tags ICVS Remote File file I Progress Monitor monitor throws Team Exception try Set tag Set new Hash Set I Log Entry entries file get Log Entries monitor for int j 0 j entries length j CVS Tag tags entries j get Tags for int k 0 k tags length k tag Set add tags k return CVS Tag tag Set to Array new CVS Tag 0 catch Team Exception e I Status status e get Status if status get Code CVS Status SERVER ERROR status is Multi Status I Status children status get Children if children length 1 children 0 get Code CVS Status DOES NOT EXIST return new CVS Tag 0 throw e  CVSTag fetchTags ICVSRemoteFile IProgressMonitor TeamException tagSet HashSet ILogEntry getLogEntries CVSTag getTags tagSet CVSTag tagSet toArray CVSTag TeamException IStatus getStatus getCode CVSStatus SERVER_ERROR isMultiStatus IStatus getChildren getCode CVSStatus DOES_NOT_EXIST CVSTag
private String get Cache Path For String remote Path String root new Path remote Path segment 0 if is Defined Module Name remote Path return as Defined Module Path root return root  getCachePathFor remotePath remotePath isDefinedModuleName remotePath asDefinedModulePath
Write out the state of the receiver as XML on the given XML Writer param writer throws IO Exception public void write State XML Writer writer Hash Map attributes new Hash Map attributes clear attributes put Repositories View Content Handler ID ATTRIBUTE root get Location if name null attributes put Repositories View Content Handler NAME ATTRIBUTE name writer start Tag Repositories View Content Handler REPOSITORY TAG attributes true put date tag under repository if date Tags is Empty writer start Tag Repositories View Content Handler DATE TAGS TAG attributes true Iterator iter date Tags iterator while iter has Next CVS Tag tag CVS Tag iter next writeA Tag writer attributes tag Repositories View Content Handler DATE TAG TAG writer end Tag Repositories View Content Handler DATE TAGS TAG Gather all the modules that have tags and or auto refresh files for each module write the moduel tags and auto refresh files String paths get Known Remote Paths for int i 0 i paths length i String path paths i attributes clear String name path if is Defined Module Name path name get Defined Module Name path attributes put Repositories View Content Handler TYPE ATTRIBUTE Repositories View Content Handler DEFINED MODULE TYPE attributes put Repositories View Content Handler PATH ATTRIBUTE name writer start Tag Repositories View Content Handler MODULE TAG attributes true Set tag Set Set version And Branch Tags get path if tag Set null Iterator tag It tag Set iterator while tag It has Next CVS Tag tag CVS Tag tag It next writeA Tag writer attributes tag Repositories View Content Handler TAG TAG Set refresh Set Set auto Refresh Files get path if refresh Set null Iterator filename It refresh Set iterator while filename It has Next String filename String filename It next attributes clear attributes put Repositories View Content Handler FULL PATH ATTRIBUTE filename writer start And End Tag Repositories View Content Handler AUTO REFRESH FILE TAG attributes true writer end Tag Repositories View Content Handler MODULE TAG writer end Tag Repositories View Content Handler REPOSITORY TAG  XMLWriter IOException writeState XMLWriter HashMap HashMap RepositoriesViewContentHandler ID_ATTRIBUTE getLocation RepositoriesViewContentHandler NAME_ATTRIBUTE startTag RepositoriesViewContentHandler REPOSITORY_TAG dateTags isEmpty startTag RepositoriesViewContentHandler DATE_TAGS_TAG dateTags hasNext CVSTag CVSTag writeATag RepositoriesViewContentHandler DATE_TAG_TAG endTag RepositoriesViewContentHandler DATE_TAGS_TAG getKnownRemotePaths isDefinedModuleName getDefinedModuleName RepositoriesViewContentHandler TYPE_ATTRIBUTE RepositoriesViewContentHandler DEFINED_MODULE_TYPE RepositoriesViewContentHandler PATH_ATTRIBUTE startTag RepositoriesViewContentHandler MODULE_TAG tagSet versionAndBranchTags tagSet tagIt tagSet tagIt hasNext CVSTag CVSTag tagIt writeATag RepositoriesViewContentHandler TAG_TAG refreshSet autoRefreshFiles refreshSet filenameIt refreshSet filenameIt hasNext filenameIt RepositoriesViewContentHandler FULL_PATH_ATTRIBUTE startAndEndTag RepositoriesViewContentHandler AUTO_REFRESH_FILE_TAG endTag RepositoriesViewContentHandler MODULE_TAG endTag RepositoriesViewContentHandler REPOSITORY_TAG
private void writeA Tag XML Writer writer Hash Map attributes CVS Tag tag String s attributes clear attributes put Repositories View Content Handler NAME ATTRIBUTE tag get Name attributes put Repositories View Content Handler TYPE ATTRIBUTE Repositories View Content Handler TAG TYPES tag get Type writer start And End Tag s attributes true  writeATag XMLWriter HashMap CVSTag RepositoriesViewContentHandler NAME_ATTRIBUTE getName RepositoriesViewContentHandler TYPE_ATTRIBUTE RepositoriesViewContentHandler TAG_TYPES getType startAndEndTag
Method get Known Tags param remote Path return CVS Tag public CVS Tag get All Known Tags String remote Path Set tag Set Set version And Branch Tags get get Cache Path For remote Path if tag Set null CVS Tag tags1 CVS Tag tag Set to Array new CVS Tag tag Set size CVS Tag tags2 get Date Tags int len tags1 length tags2 length CVS Tag tags new CVS Tag len for int i 0 i len i if i tags1 length tags i tags1 i else tags i tags2 i tags1 length return tags return get Date Tags  getKnownTags remotePath CVSTag CVSTag getAllKnownTags remotePath tagSet versionAndBranchTags getCachePathFor remotePath tagSet CVSTag CVSTag tagSet toArray CVSTag tagSet CVSTag getDateTags CVSTag CVSTag getDateTags
public String get Known Remote Paths Set paths new Hash Set paths add All version And Branch Tags key Set paths add All auto Refresh Files key Set return String paths to Array new String paths size  getKnownRemotePaths HashSet addAll versionAndBranchTags keySet addAll autoRefreshFiles keySet toArray
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter if ICVS Repository Location class equals adapter return get Root return super get Adapter adapter  IAdaptable getAdapter getAdapter ICVSRepositoryLocation getRoot getAdapter
public ICVS Remote Resource filter Resources ICVS Remote Resource resource List result new Array List for int i 0 i resource length i ICVS Remote Resource remote Resource resource i if remote Resource instanceof ICVS Remote Folder ICVS Remote Folder folder ICVS Remote Folder remote Resource if tag Is Known remote Resource result add folder return ICVS Remote Resource result to Array new ICVS Remote Resource result size  ICVSRemoteResource filterResources ICVSRemoteResource ArrayList ICVSRemoteResource remoteResource remoteResource ICVSRemoteFolder ICVSRemoteFolder ICVSRemoteFolder remoteResource tagIsKnown remoteResource ICVSRemoteResource toArray ICVSRemoteResource
Method tag Is Known param remote Resource return boolean public boolean tag Is Known ICVS Remote Resource remote Resource if remote Resource instanceof ICVS Remote Folder ICVS Remote Folder folder ICVS Remote Folder remote Resource String path get Cache Path For folder get Repository Relative Path CVS Tag tags get All Known Tags path CVS Tag tag folder get Tag for int i 0 i tags length i CVS Tag known Tag tags i if known Tag equals tag return true return false  tagIsKnown remoteResource tagIsKnown ICVSRemoteResource remoteResource remoteResource ICVSRemoteFolder ICVSRemoteFolder ICVSRemoteFolder remoteResource getCachePathFor getRepositoryRelativePath CVSTag getAllKnownTags CVSTag getTag CVSTag knownTag knownTag
This method is invoked whenever the refresh button in the Repositories View is pressed void clear Cache if modules Cache null return synchronized modules Cache modules Cache null  RepositoriesView clearCache modulesCache modulesCache modulesCache
Sets the root param root The root to set void set Repository Location ICVS Repository Location root this root root  setRepositoryLocation ICVSRepositoryLocation

public class Repository Sorter extends Viewer Sorter public int category Object element if element instanceof ICVS Remote Folder if ICVS Remote Folder element is Defined Module return 7 return 1 if element instanceof Remote Module ICVS Remote Resource resource Remote Module element getCVS Resource if resource instanceof ICVS Remote Folder ICVS Remote Folder folder ICVS Remote Folder resource if folder is Defined Module return 7 return 1 if element instanceof ICVS Remote File return 2 if element instanceof CVS Tag Element CVS Tag Element tag Element CVS Tag Element element if tag Element get Tag get Type CVS Tag HEAD return 0 else if tag Element get Tag get Type CVS Tag BRANCH return 4 else if tag Element get Tag get Type CVS Tag VERSION return 5 else if tag Element get Tag get Type CVS Tag DATE return 6 else return 7 if element instanceof Branch Category return 4 if element instanceof Version Category return 5 if element instanceof Date Tag Category return 6 return 0  RepositorySorter ViewerSorter ICVSRemoteFolder ICVSRemoteFolder isDefinedModule RemoteModule ICVSRemoteResource RemoteModule getCVSResource ICVSRemoteFolder ICVSRemoteFolder ICVSRemoteFolder isDefinedModule ICVSRemoteFile CVSTagElement CVSTagElement tagElement CVSTagElement tagElement getTag getType CVSTag tagElement getTag getType CVSTag tagElement getTag getType CVSTag tagElement getTag getType CVSTag BranchCategory VersionCategory DateTagCategory
public int compare Viewer viewer Object o1 Object o2 int cat1 category o1 int cat2 category o2 if cat1 cat2 return cat1 cat2 if o1 instanceof CVS Tag Element o2 instanceof CVS Tag Element CVS Tag tag1 CVS Tag Element o1 get Tag CVS Tag tag2 CVS Tag Element o2 get Tag if tag1 get Type CVS Tag BRANCH return tag1 compare To tag2 else return 1 tag1 compare To tag2 Sort versions in reverse alphabetical order if o1 instanceof ICVS Remote Folder o2 instanceof ICVS Remote Folder ICVS Remote Folder f1 ICVS Remote Folder o1 ICVS Remote Folder f2 ICVS Remote Folder o2 if f1 get Name equals f2 get Name return compare f1 f2 if o1 instanceof ICVS Repository Location o2 instanceof ICVS Repository Location return ICVS Repository Location o1 get Location compare To ICVS Repository Location o2 get Location return super compare viewer o1 o2  CVSTagElement CVSTagElement CVSTag CVSTagElement getTag CVSTag CVSTagElement getTag getType CVSTag compareTo compareTo ICVSRemoteFolder ICVSRemoteFolder ICVSRemoteFolder ICVSRemoteFolder ICVSRemoteFolder ICVSRemoteFolder getName getName ICVSRepositoryLocation ICVSRepositoryLocation ICVSRepositoryLocation getLocation compareTo ICVSRepositoryLocation getLocation
private int compare ICVS Remote Folder f1 ICVS Remote Folder f2 CVS Tag tag1 f1 get Tag CVS Tag tag2 f2 get Tag if tag1 null return 1 if tag2 null return 1 return tag2 compare To tag1  ICVSRemoteFolder ICVSRemoteFolder CVSTag getTag CVSTag getTag compareTo

public class Resizable Wizard Dialog extends Wizard Dialog Creates a new resizable wizard dialog public Resizable Wizard Dialog Shell parent I Wizard wizard super parent wizard set Shell Style get Shell Style SWT RESIZE  ResizableWizardDialog WizardDialog ResizableWizardDialog IWizard setShellStyle getShellStyle

Creates a new Resource Edition Node on the given resource edition public Resource Edition Node ICVS Remote Resource resource Edition this resource resource Edition  ResourceEditionNode ResourceEditionNode ICVSRemoteResource resourceEdition resourceEdition
Returns true if both resources names are identical The content is not considered see I Comparator equals public boolean equals Object other if other instanceof I Typed Element String other Name I Typed Element other get Name return get Name equals other Name return super equals other  IComparator ITypedElement otherName ITypedElement getName getName otherName
CVSUI Plugin run With Progress null true cancelable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try ICVS Remote Resource members resource members monitor children new Resource Edition Node members length for int i 0 i members length i children i new Resource Edition Node members i catch Team Exception e throw new Invocation Target Exception e  CVSUIPlugin runWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException ICVSRemoteResource ResourceEditionNode ResourceEditionNode TeamException InvocationTargetException
Enumerate children of this node if any public Object get Children if children null children new Resource Edition Node 0 if resource null try CVSUI Plugin run With Progress null true cancelable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try ICVS Remote Resource members resource members monitor children new Resource Edition Node members length for int i 0 i members length i children i new Resource Edition Node members i catch Team Exception e throw new Invocation Target Exception e catch Interrupted Exception e operation canceled catch Invocation Target Exception e Throwable t e get Target Exception if t instanceof Team Exception CVSUI Plugin log Team Exception t return children  getChildren ResourceEditionNode CVSUIPlugin runWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException ICVSRemoteResource ResourceEditionNode ResourceEditionNode TeamException InvocationTargetException InterruptedException InvocationTargetException getTargetException TeamException CVSUIPlugin TeamException
see I Stream Content Accessor get Contents public Input Stream get Contents throws Core Exception I Storage storage get Storage if storage null return storage get Contents return new Byte Array Input Stream new byte 0  IStreamContentAccessor getContents InputStream getContents CoreException IStorage getStorage getContents ByteArrayInputStream
public Image get Image return CompareUI get Image resource  getImage getImage
Returns the name of this node public String get Name return resource null resource get Name NON NLS 1  getName getName
public ICVS Remote Resource get Remote Resource return resource  ICVSRemoteResource getRemoteResource
Returns the comparison type for this node public String get Type if resource null return UNKNOWN TYPE if resource is Container return FOLDER TYPE String name resource get Name name name substring name last Index Of 1 return name length 0 UNKNOWN TYPE name  getType UNKNOWN_TYPE isContainer FOLDER_TYPE getName lastIndexOf UNKNOWN_TYPE
see I Comparator equals public int hash Code return get Name hash Code  IComparator hashCode getName hashCode
public String get Charset throws Core Exception Use the local file encoding if there is one I Resource local resource getI Resource if local null local get Type I Resource FILE return I File local get Charset See if the remote file has an encoding I Storage storage get Storage if storage instanceof I Encoded Storage String charset I Encoded Storage storage get Charset if charset null return charset return null  getCharset CoreException IResource getIResource getType IResource IFile getCharset IStorage getStorage IEncodedStorage IEncodedStorage getCharset
CVSUI Plugin run With Progress null true cancelable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try holder 0 I Resource Variant resource get Storage monitor catch Team Exception e throw new Invocation Target Exception e  CVSUIPlugin runWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException IResourceVariant getStorage TeamException InvocationTargetException
private I Storage get Storage throws Team Exception if resource null return null final I Storage holder new I Storage 1 try CVSUI Plugin run With Progress null true cancelable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try holder 0 I Resource Variant resource get Storage monitor catch Team Exception e throw new Invocation Target Exception e catch Invocation Target Exception e throw Team Exception as Team Exception e catch Interrupted Exception e Shouldn t happen Ignore return holder 0  IStorage getStorage TeamException IStorage IStorage CVSUIPlugin runWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException IResourceVariant getStorage TeamException InvocationTargetException InvocationTargetException TeamException asTeamException InterruptedException

protected Control create Contents Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height layout margin Width 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL try I Resource resource get Selected Element if resource null ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource if cvs Resource is Managed create Pair composite Policy bind Resource Properties Page status Policy bind Resource Properties Page not Managed NON NLS 1 NON NLS 2 else boolean has Remote false if cvs Resource is Folder has Remote ICVS Folder cvs Resource isCVS Folder else Resource Sync Info info cvs Resource get Sync Info if info null info is Added has Remote true create Pair composite Policy bind Resource Properties Page status has Remote Policy bind Resource Properties Page versioned Policy bind Resource Properties Page not Versioned NON NLS 1 NON NLS 2 NON NLS 3 catch Team Exception e create Pair composite Policy bind Resource Properties Page error e get Message NON NLS 1 Dialog apply Dialog Font parent return composite  createContents GridLayout GridLayout numColumns marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_HORIZONTAL IResource getSelectedElement ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor cvsResource isManaged createPair ResourcePropertiesPage ResourcePropertiesPage notManaged hasRemote cvsResource isFolder hasRemote ICVSFolder cvsResource isCVSFolder ResourceSyncInfo cvsResource getSyncInfo isAdded hasRemote createPair ResourcePropertiesPage hasRemote ResourcePropertiesPage ResourcePropertiesPage notVersioned TeamException createPair ResourcePropertiesPage getMessage applyDialogFont
Creates a key value property pair in the given parent param parent the parent for the labels param left the string for the left label param right the string for the right label protected void create Pair Composite parent String left String right Label label new Label parent SWT NONE label set Text left label new Label parent SWT NONE label set Text right label set Tool Tip Text right label set Layout Data new Grid Data Grid Data FILL HORIZONTAL  createPair setText setText setToolTipText setLayoutData GridData GridData FILL_HORIZONTAL
Returns the element selected when the properties was run return the selected element protected I Resource get Selected Element get the resource that is the source of this property page I Resource resource null I Adaptable element get Element if element instanceof I Resource resource I Resource element else Object adapter element get Adapter I Resource class if adapter instanceof I Resource resource I Resource adapter return resource  IResource getSelectedElement IResource IAdaptable getElement IResource IResource getAdapter IResource IResource IResource

Simple Content Provider constructor public Simple Content Provider super  SimpleContentProvider SimpleContentProvider
see Simple Content Provider dispose public void dispose  SimpleContentProvider
see Simple Content Provider get Elements public Object get Elements Object element return new Object 0  SimpleContentProvider getElements getElements
see Simple Content Provider input Changed public void input Changed Viewer viewer Object old Input Object new Input  SimpleContentProvider inputChanged inputChanged oldInput newInput

private I Log Entry log Entry public Change Log Diff Node I Synchronize Model Element parent I Log Entry log Entry super parent this log Entry log Entry  ILogEntry logEntry ChangeLogDiffNode ISynchronizeModelElement ILogEntry logEntry logEntry logEntry
public I Log Entry get Comment return log Entry  ILogEntry getComment logEntry
public boolean equals Object obj if obj this return true if obj instanceof Change Log Diff Node return false Change Log Diff Node other Change Log Diff Node obj I Log Entry other Log other get Comment I Log Entry this Log get Comment return this Log get Comment equals other Log get Comment this Log get Author equals other Log get Author  ChangeLogDiffNode ChangeLogDiffNode ChangeLogDiffNode ILogEntry otherLog getComment ILogEntry thisLog getComment thisLog getComment otherLog getComment thisLog getAuthor otherLog getAuthor
see org eclipse ui model I Workbench Adapter get Image Descriptor java lang Object public Image Descriptor get Image Descriptor Object object return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG CHANGELOG  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_CHANGELOG
public String get Name String date Date Format get Date Time Instance format log Entry get Date String comment History View flatten Text log Entry get Comment return log Entry get Author date comment NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4  getName DateFormat getDateTimeInstance logEntry getDate HistoryView flattenText logEntry getComment logEntry getAuthor
see org eclipse team ui synchronize Sync Info Model Element to String public String to String return get Name  SyncInfoModelElement toString toString getName
see org eclipse team ui synchronize viewers Synchronize Model Element get Resource public I Resource get Resource return null  SynchronizeModelElement getResource IResource getResource

private CVS Tag tag2 public Change Log Model Manager I Synchronize Page Configuration configuration this configuration null null  CVSTag ChangeLogModelManager ISynchronizePageConfiguration
public Change Log Model Manager I Synchronize Page Configuration configuration CVS Tag tag1 CVS Tag tag2 super configuration this tag1 tag1 this tag2 tag2 configuration add Property Change Listener this  ChangeLogModelManager ISynchronizePageConfiguration CVSTag CVSTag addPropertyChangeListener
see org eclipse team internal ui synchronize Synchronize Model Manager dispose public void dispose get Configuration remove Property Change Listener this super dispose  SynchronizeModelManager getConfiguration removePropertyChangeListener
protected I Synchronize Model Provider Descriptor get Supported Model Providers return new I Synchronize Model Provider Descriptor new Hierarchical Model Provider Hierarchical Model Provider Descriptor new Compressed Folders Model Provider Compressed Folder Model Provider Descriptor new Change Log Model Provider Change Log Model Provider Descriptor  ISynchronizeModelProviderDescriptor getSupportedModelProviders ISynchronizeModelProviderDescriptor HierarchicalModelProvider HierarchicalModelProviderDescriptor CompressedFoldersModelProvider CompressedFolderModelProviderDescriptor ChangeLogModelProvider ChangeLogModelProviderDescriptor
protected I Synchronize Model Provider create Model Provider String id if id null if get Show Compressed Folders id Compressed Folders Model Provider Compressed Folder Model Provider Descriptor ID else id Hierarchical Model Provider Hierarchical Model Provider Descriptor ID if id ends With Compressed Folders Model Provider Compressed Folder Model Provider Descriptor ID return new Compressed Folders Model Provider get Configuration get Sync Info Set else if id ends With Hierarchical Model Provider Hierarchical Model Provider Descriptor ID return new Hierarchical Model Provider get Configuration get Sync Info Set else return new Change Log Model Provider get Configuration get Sync Info Set tag1 tag2  ISynchronizeModelProvider createModelProvider getShowCompressedFolders CompressedFoldersModelProvider CompressedFolderModelProviderDescriptor HierarchicalModelProvider HierarchicalModelProviderDescriptor endsWith CompressedFoldersModelProvider CompressedFolderModelProviderDescriptor CompressedFoldersModelProvider getConfiguration getSyncInfoSet endsWith HierarchicalModelProvider HierarchicalModelProviderDescriptor HierarchicalModelProvider getConfiguration getSyncInfoSet ChangeLogModelProvider getConfiguration getSyncInfoSet
private Sync Info Tree get Sync Info Set return Sync Info Tree get Configuration get Property I Synchronize Page Configuration P SYNC INFO SET  SyncInfoTree getSyncInfoSet SyncInfoTree getConfiguration getProperty ISynchronizePageConfiguration P_SYNC_INFO_SET
Return the state of the compressed folder setting return the state of the compressed folder setting private boolean get Show Compressed Folders return TeamUI Plugin get Plugin get Preference Store get Boolean I Preference Ids SYNCVIEW COMPRESS FOLDERS  getShowCompressedFolders TeamUIPlugin getPlugin getPreferenceStore getBoolean IPreferenceIds SYNCVIEW_COMPRESS_FOLDERS
see org eclipse jface util I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent

public final static int COMMENT 2 protected Toggle Sort Order Action String name int criteria int sort Type int default Criteria super name Action AS RADIO BUTTON this criteria criteria this sort Type sort Type set Checked criteria default Criteria  ToggleSortOrderAction sortType defaultCriteria AS_RADIO_BUTTON sortType sortType setChecked defaultCriteria
public void run Structured Viewer viewer get Viewer if viewer null viewer get Control is Disposed Change Log Model Sorter sorter Change Log Model Sorter viewer get Sorter if is Checked sorter null get Criteria sorter criteria viewer set Sorter create Sorter sorter String key sort Type RESOURCE NAME P LAST RESOURCESORT P LAST COMMENTSORT I Dialog Settings page Settings get Configuration get Site get Page Settings if page Settings null page Settings put key criteria update  StructuredViewer getViewer getControl isDisposed ChangeLogModelSorter ChangeLogModelSorter getSorter isChecked getCriteria setSorter createSorter sortType RESOURCE_NAME P_LAST_RESOURCESORT P_LAST_COMMENTSORT IDialogSettings pageSettings getConfiguration getSite getPageSettings pageSettings pageSettings
public void update Structured Viewer viewer get Viewer if viewer null viewer get Control is Disposed Change Log Model Sorter sorter Change Log Model Sorter viewer get Sorter if sorter null set Checked get Criteria sorter criteria  StructuredViewer getViewer getControl isDisposed ChangeLogModelSorter ChangeLogModelSorter getSorter setChecked getCriteria
protected Change Log Model Sorter create Sorter Change Log Model Sorter sorter if sort Type COMMENT return new Change Log Model Sorter criteria sorter get Resource Criteria else return new Change Log Model Sorter sorter get Comment Criteria criteria  ChangeLogModelSorter createSorter ChangeLogModelSorter sortType ChangeLogModelSorter getResourceCriteria ChangeLogModelSorter getCommentCriteria
protected int get Criteria Change Log Model Sorter sorter if sort Type COMMENT return sorter get Comment Criteria else return sorter get Resource Criteria  getCriteria ChangeLogModelSorter sortType getCommentCriteria getResourceCriteria
private Menu Manager sort By Resource public void initialize I Synchronize Page Configuration configuration super initialize configuration sort By Comment new Menu Manager Policy bind Change Log Model Provider 0 NON NLS 1 sort By Resource new Menu Manager Policy bind Change Log Model Provider 6 NON NLS 1 append To Group I Synchronize Page Configuration P CONTEXT MENU SORT ORDER GROUP sort By Comment append To Group I Synchronize Page Configuration P CONTEXT MENU SORT ORDER GROUP sort By Resource Change Log Model Sorter sorter Change Log Model Sorter get Viewer Sorter sort By Comment add new Toggle Sort Order Action Policy bind Change Log Model Provider 1 Change Log Model Sorter COMMENT Toggle Sort Order Action COMMENT sorter get Comment Criteria NON NLS 1 sort By Comment add new Toggle Sort Order Action Policy bind Change Log Model Provider 2 Change Log Model Sorter DATE Toggle Sort Order Action COMMENT sorter get Comment Criteria NON NLS 1 sort By Comment add new Toggle Sort Order Action Policy bind Change Log Model Provider 3 Change Log Model Sorter USER Toggle Sort Order Action COMMENT sorter get Comment Criteria NON NLS 1 sort By Resource add new Toggle Sort Order Action Policy bind Change Log Model Provider 8 Change Log Model Sorter PATH Toggle Sort Order Action RESOURCE NAME sorter get Resource Criteria NON NLS 1 sort By Resource add new Toggle Sort Order Action Policy bind Change Log Model Provider 7 Change Log Model Sorter NAME Toggle Sort Order Action RESOURCE NAME sorter get Resource Criteria NON NLS 1 sort By Resource add new Toggle Sort Order Action Policy bind Change Log Model Provider 9 Change Log Model Sorter PARENT NAME Toggle Sort Order Action RESOURCE NAME sorter get Resource Criteria NON NLS 1  MenuManager sortByResource ISynchronizePageConfiguration sortByComment MenuManager ChangeLogModelProvider sortByResource MenuManager ChangeLogModelProvider appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU SORT_ORDER_GROUP sortByComment appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU SORT_ORDER_GROUP sortByResource ChangeLogModelSorter ChangeLogModelSorter getViewerSorter sortByComment ToggleSortOrderAction ChangeLogModelProvider ChangeLogModelSorter ToggleSortOrderAction getCommentCriteria sortByComment ToggleSortOrderAction ChangeLogModelProvider ChangeLogModelSorter ToggleSortOrderAction getCommentCriteria sortByComment ToggleSortOrderAction ChangeLogModelProvider ChangeLogModelSorter ToggleSortOrderAction getCommentCriteria sortByResource ToggleSortOrderAction ChangeLogModelProvider ChangeLogModelSorter ToggleSortOrderAction RESOURCE_NAME getResourceCriteria sortByResource ToggleSortOrderAction ChangeLogModelProvider ChangeLogModelSorter ToggleSortOrderAction RESOURCE_NAME getResourceCriteria sortByResource ToggleSortOrderAction ChangeLogModelProvider ChangeLogModelSorter PARENT_NAME ToggleSortOrderAction RESOURCE_NAME getResourceCriteria
public void dispose sort By Comment dispose sort By Resource dispose sort By Comment remove All sort By Resource remove All super dispose  sortByComment sortByResource sortByComment removeAll sortByResource removeAll
public static class Full Path Sync Info Element extends Sync Info Model Element public Full Path Sync Info Element I Diff Container parent Sync Info info super parent info  FullPathSyncInfoElement SyncInfoModelElement FullPathSyncInfoElement IDiffContainer SyncInfo
super parent info public String get Name I Resource resource get Resource return resource get Name resource get Full Path to String NON NLS 1  getName IResource getResource getName getFullPath toString
public class CVS Updatable Sync Info extends CVS Sync Info public int kind public CVS Updatable Sync Info int kind I Resource local I Resource Variant base I Resource Variant remote Subscriber s super local base remote s this kind kind  CVSUpdatableSyncInfo CVSSyncInfo CVSUpdatableSyncInfo IResource IResourceVariant IResourceVariant
protected int calculate Kind throws Team Exception return kind  calculateKind TeamException
private class Fetch Log Entries Job extends Job private Set sync Sets new Hash Set public Fetch Log Entries Job super Policy bind Change Log Model Provider 4 NON NLS 1 set User false  FetchLogEntriesJob syncSets HashSet FetchLogEntriesJob ChangeLogModelProvider setUser
set User false public boolean belongs To Object family return family I Synchronize Manager FAMILY SYNCHRONIZE OPERATION  setUser belongsTo ISynchronizeManager FAMILY_SYNCHRONIZE_OPERATION
public I Status run I Progress Monitor monitor if sync Sets null shutdown Determine the sync sets for which to fetch comment nodes Sync Info Set updates synchronized sync Sets updates Sync Info Set sync Sets to Array new Sync Info Set sync Sets size sync Sets clear for int i 0 i updates length i calculate Roots updates i monitor refresh Viewer return Status OK STATUS  IStatus IProgressMonitor syncSets SyncInfoSet syncSets SyncInfoSet syncSets toArray SyncInfoSet syncSets syncSets calculateRoots refreshViewer OK_STATUS
public void add Sync Info Set set synchronized sync Sets sync Sets add set schedule  SyncInfoSet syncSets syncSets
schedule public boolean should Run return sync Sets is Empty  shouldRun syncSets isEmpty
public static class Change Log Model Provider Descriptor implements I Synchronize Model Provider Descriptor public static final String ID TeamUI Plugin ID modelprovider cvs changelog NON NLS 1 public String get Id return ID  ChangeLogModelProviderDescriptor ISynchronizeModelProviderDescriptor TeamUIPlugin modelprovider_cvs_changelog getId
return ID public String get Name return Policy bind Change Log Model Provider 5 NON NLS 1  getName ChangeLogModelProvider
return Policy bind Change Log Model Provider 5 NON NLS 1 public Image Descriptor get Image Descriptor return CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG CHANGELOG  ChangeLogModelProvider ImageDescriptor getImageDescriptor CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_CHANGELOG
public Change Log Model Provider I Synchronize Page Configuration configuration Sync Info Set set CVS Tag tag1 CVS Tag tag2 super configuration set this tag1 tag1 this tag2 tag2 configuration add Menu Group I Synchronize Page Configuration P CONTEXT MENU SORT ORDER GROUP this sort Group new Change Log Action Group configuration add Action Contribution sort Group  ChangeLogModelProvider ISynchronizePageConfiguration SyncInfoSet CVSTag CVSTag addMenuGroup ISynchronizePageConfiguration P_CONTEXT_MENU SORT_ORDER_GROUP sortGroup ChangeLogActionGroup addActionContribution sortGroup
see org eclipse team internal ui synchronize I Synchronize Model Provider get Descriptor public I Synchronize Model Provider Descriptor get Descriptor return descriptor  ISynchronizeModelProvider getDescriptor ISynchronizeModelProviderDescriptor getDescriptor
protected I Diff Element build Model Objects I Synchronize Model Element node if node get Model Root Cancel any existing fetching jobs try if fetch Log Entries Job null fetch Log Entries Job get State Job NONE fetch Log Entries Job cancel fetch Log Entries Job join catch Interrupted Exception e Start building the model from scratch start Update Job get Sync Info Set return new I Diff Element 0  IDiffElement buildModelObjects ISynchronizeModelElement getModelRoot fetchLogEntriesJob fetchLogEntriesJob getState fetchLogEntriesJob fetchLogEntriesJob InterruptedException startUpdateJob getSyncInfoSet IDiffElement
private void start Update Job Sync Info Set set if fetch Log Entries Job null fetch Log Entries Job new Fetch Log Entries Job fetch Log Entries Job add set  startUpdateJob SyncInfoSet fetchLogEntriesJob fetchLogEntriesJob FetchLogEntriesJob fetchLogEntriesJob
Busy Indicator show While get Display new Runnable public void run Structured Viewer tree get Viewer tree refresh I Synchronize Model Element root get Model Root if root instanceof Synchronize Model Element Synchronize Model Element root fire Changes  BusyIndicator showWhile getDisplay StructuredViewer getViewer ISynchronizeModelElement getModelRoot SynchronizeModelElement SynchronizeModelElement fireChanges
UI Job updateUI new UI Job NON NLS 1 public I Status run InUI Thread I Progress Monitor monitor Busy Indicator show While get Display new Runnable public void run Structured Viewer tree get Viewer tree refresh I Synchronize Model Element root get Model Root if root instanceof Synchronize Model Element Synchronize Model Element root fire Changes return Status OK STATUS  UIJob UIJob IStatus runInUIThread IProgressMonitor BusyIndicator showWhile getDisplay StructuredViewer getViewer ISynchronizeModelElement getModelRoot SynchronizeModelElement SynchronizeModelElement fireChanges OK_STATUS
private void refresh Viewer UI Job updateUI new UI Job NON NLS 1 public I Status run InUI Thread I Progress Monitor monitor Busy Indicator show While get Display new Runnable public void run Structured Viewer tree get Viewer tree refresh I Synchronize Model Element root get Model Root if root instanceof Synchronize Model Element Synchronize Model Element root fire Changes return Status OK STATUS updateUI set System true updateUI schedule  refreshViewer UIJob UIJob IStatus runInUIThread IProgressMonitor BusyIndicator showWhile getDisplay StructuredViewer getViewer ISynchronizeModelElement getModelRoot SynchronizeModelElement SynchronizeModelElement fireChanges OK_STATUS setSystem
private void calculate Roots Sync Info Set set I Progress Monitor monitor try monitor begin Task null 100 Decide which nodes we have to fetch log histories Sync Info infos set get Sync Infos Array List comment Nodes new Array List Array List resource Nodes new Array List for int i 0 i infos length i Sync Info info infos i if is Interesting Change info comment Nodes add info else resource Nodes add info Show elements that don t need their log histories retreived for Iterator it resource Nodes iterator it has Next Sync Info info Sync Info it next add New Element For info null null if resource Nodes is Empty refresh Viewer Fetch log histories then add elements Sync Info comment Infos Sync Info comment Nodes to Array new Sync Info comment Nodes size Remote Log Operation logs get Sync Info Comment comment Infos Policy sub Monitor For monitor 80 add Log Entries comment Infos logs Policy sub Monitor For monitor 20 catch CVS Exception e Utils handle e catch Interrupted Exception e finally monitor done  calculateRoots SyncInfoSet IProgressMonitor beginTask SyncInfo getSyncInfos ArrayList commentNodes ArrayList ArrayList resourceNodes ArrayList SyncInfo isInterestingChange commentNodes resourceNodes resourceNodes hasNext SyncInfo SyncInfo addNewElementFor resourceNodes isEmpty refreshViewer SyncInfo commentInfos SyncInfo commentNodes toArray SyncInfo commentNodes RemoteLogOperation getSyncInfoComment commentInfos subMonitorFor addLogEntries commentInfos subMonitorFor CVSException InterruptedException
Add the followinf sync info elements to the viewer It is assumed that these elements have associated log entries cached in the log operation private void add Log Entries Sync Info comment Infos Remote Log Operation logs I Progress Monitor monitor try monitor begin Task null comment Infos length 10 if logs null for int i 0 i comment Infos length i add Sync Info To Comment Node comment Infos i logs monitor worked 10 Don t cache log entries when in two way mode if get Configuration get Comparison Type equals I Synchronize Page Configuration TWO WAY logs clear Entries finally monitor done  addLogEntries SyncInfo commentInfos RemoteLogOperation IProgressMonitor beginTask commentInfos commentInfos addSyncInfoToCommentNode commentInfos getConfiguration getComparisonType ISynchronizePageConfiguration TWO_WAY clearEntries
Create a node for the given sync info object The logs should contain the log for this info param info the info for which to create a node in the model param log the cvs log for this node private void add Sync Info To Comment Node Sync Info info Remote Log Operation logs ICVS Remote Resource remote Resource get Remote Resource CVS Sync Info info if tag1 null tag2 null add Multiple Revisions info logs remote Resource else add Single Revision info logs remote Resource  addSyncInfoToCommentNode SyncInfo RemoteLogOperation ICVSRemoteResource remoteResource getRemoteResource CVSSyncInfo addMultipleRevisions remoteResource addSingleRevision remoteResource
Add multiple log entries to the model param info param logs param remote Resource private void add Multiple Revisions Sync Info info Remote Log Operation logs ICVS Remote Resource remote Resource I Log Entry log Entries logs get Log Entries remote Resource if log Entries null log Entries length 0 If for some reason we don t have a log entry try the latest remote add New Element For info null null else for int i 0 i log Entries length i I Log Entry entry log Entries i add New Element For info remote Resource entry  remoteResource addMultipleRevisions SyncInfo RemoteLogOperation ICVSRemoteResource remoteResource ILogEntry logEntries getLogEntries remoteResource logEntries logEntries addNewElementFor logEntries ILogEntry logEntries addNewElementFor remoteResource
Add a single log entry to the model param info param logs param remote Resource private void add Single Revision Sync Info info Remote Log Operation logs ICVS Remote Resource remote Resource I Log Entry log Entry logs get Log Entry remote Resource For incoming deletions grab the comment for the latest on the same branch which is now in the attic try String remote Revision ICVS Remote File remote Resource get Revision if is Deleted Remotely info I Log Entry log Entries logs get Log Entries remote Resource for int i 0 i log Entries length i I Log Entry entry log Entries i String revision entry get Revision if entry is Deletion Resource Sync Info is Later Revision revision remote Revision log Entry entry catch Team Exception e continue and skip deletion checks add New Element For info remote Resource log Entry  remoteResource addSingleRevision SyncInfo RemoteLogOperation ICVSRemoteResource remoteResource ILogEntry logEntry getLogEntry remoteResource remoteRevision ICVSRemoteFile remoteResource getRevision isDeletedRemotely ILogEntry logEntries getLogEntries remoteResource logEntries ILogEntry logEntries getRevision isDeletion ResourceSyncInfo isLaterRevision remoteRevision logEntry TeamException addNewElementFor remoteResource logEntry
private boolean is Deleted Remotely Sync Info info int kind info get Kind if kind Sync Info INCOMING Sync Info DELETION return true if Sync Info get Direction kind Sync Info CONFLICTING info get Remote null return true return false  isDeletedRemotely SyncInfo getKind SyncInfo SyncInfo SyncInfo getDirection SyncInfo getRemote
private void add New Element For Sync Info info ICVS Remote Resource remote Resource I Log Entry log Entry I Synchronize Model Element element If the element has a comment then group with common comment if remote Resource null log Entry null is Interesting Change info Change Log Diff Node change Root get Change Log Diff Node For log Entry if change Root null change Root new Change Log Diff Node get Model Root log Entry add To Viewer change Root if requires Custom Sync Info info remote Resource log Entry info new CVS Updatable Sync Info info get Kind info get Local info get Base Remote Resource log Entry get Remote File CVS Sync Info info get Subscriber try info init catch Team Exception e this shouldn t happen we ve provided our own calculate kind element new Full Path Sync Info Element change Root info else For nodes without comments simply parent with the root These will be outgoing additions element new Full Path Sync Info Element get Model Root info add To Viewer element  addNewElementFor SyncInfo ICVSRemoteResource remoteResource ILogEntry logEntry ISynchronizeModelElement remoteResource logEntry isInterestingChange ChangeLogDiffNode changeRoot getChangeLogDiffNodeFor logEntry changeRoot changeRoot ChangeLogDiffNode getModelRoot logEntry addToViewer changeRoot requiresCustomSyncInfo remoteResource logEntry CVSUpdatableSyncInfo getKind getLocal getBase RemoteResource logEntry getRemoteFile CVSSyncInfo getSubscriber TeamException FullPathSyncInfoElement changeRoot FullPathSyncInfoElement getModelRoot addToViewer
private boolean requires Custom Sync Info Sync Info info ICVS Remote Resource remote Resource I Log Entry log Entry Only interested in non deletions if log Entry is Deletion info instanceof CVS Sync Info return false Only require a custom sync info if the remote of the sync info differs from the remote in the log entry I Resource Variant remote info get Remote if remote null return true return remote equals remote Resource  requiresCustomSyncInfo SyncInfo ICVSRemoteResource remoteResource ILogEntry logEntry logEntry isDeletion CVSSyncInfo IResourceVariant getRemote remoteResource
private Change Log Diff Node get Change Log Diff Node For I Log Entry entry I Diff Element elements get Model Root get Children for int i 0 i elements length i I Diff Element element elements i if element instanceof Change Log Diff Node Change Log Diff Node other Change Log Diff Node element I Log Entry this Log other get Comment if this Log get Comment equals entry get Comment this Log get Author equals entry get Author return other return null  ChangeLogDiffNode getChangeLogDiffNodeFor ILogEntry IDiffElement getModelRoot getChildren IDiffElement ChangeLogDiffNode ChangeLogDiffNode ChangeLogDiffNode ILogEntry thisLog getComment thisLog getComment getComment thisLog getAuthor getAuthor
private boolean is Interesting Change Sync Info info int kind info get Kind if info get Local get Type I Resource FILE return false if info get Comparator is Three Way return kind Sync Info DIRECTION MASK Sync Info OUTGOING return true  isInterestingChange SyncInfo getKind getLocal getType IResource getComparator isThreeWay SyncInfo DIRECTION_MASK SyncInfo
How do we tell which revision has the interesting log message Use the later revision since it probably has the most up to date comment private Remote Log Operation get Sync Info Comment Sync Info infos I Progress Monitor monitor throws CVS Exception Interrupted Exception List remotes new Array List for int i 0 i infos length i CVS Sync Info info CVS Sync Info infos i if info get Local get Type I Resource FILE continue ICVS Remote Resource remote get Remote Resource info if remote null remotes add remote ICVS Remote Resource remote Resources ICVS Remote Resource remotes to Array new ICVS Remote Resource remotes size if log Operation null log Operation new Remote Log Operation null remote Resources tag1 tag2 if remotes is Empty log Operation set Remote Resources remote Resources log Operation execute monitor return log Operation  RemoteLogOperation getSyncInfoComment SyncInfo IProgressMonitor CVSException InterruptedException ArrayList CVSSyncInfo CVSSyncInfo getLocal getType IResource ICVSRemoteResource getRemoteResource ICVSRemoteResource remoteResources ICVSRemoteResource toArray ICVSRemoteResource logOperation logOperation RemoteLogOperation remoteResources isEmpty logOperation setRemoteResources remoteResources logOperation logOperation
private ICVS Remote Resource get Remote Resource CVS Sync Info info try ICVS Remote Resource remote ICVS Remote Resource info get Remote ICVS Remote Resource local ICVS Remote File CVS Workspace Root get Remote Resource For info get Local if local null local ICVS Remote Resource info get Base String remote Revision get Revision String remote String local Revision get Revision String local boolean use Remote true if local null remote null use Remote Resource Sync Info is Later Revision remote Revision local Revision else if remote null use Remote false if use Remote return remote else if local null return local return null catch CVS Exception e CVSUI Plugin log e return null  ICVSRemoteResource getRemoteResource CVSSyncInfo ICVSRemoteResource ICVSRemoteResource getRemote ICVSRemoteResource ICVSRemoteFile CVSWorkspaceRoot getRemoteResourceFor getLocal ICVSRemoteResource getBase remoteRevision getRevisionString localRevision getRevisionString useRemote useRemote ResourceSyncInfo isLaterRevision remoteRevision localRevision useRemote useRemote CVSException CVSUIPlugin
private String get Revision String ICVS Remote Resource remote File if remote File instanceof Remote File return Remote File remote File get Revision return null  getRevisionString ICVSRemoteResource remoteFile remoteFile RemoteFile RemoteFile remoteFile getRevision
public void dispose shutdown true if fetch Log Entries Job null fetch Log Entries Job get State Job NONE fetch Log Entries Job cancel sort Group dispose super dispose  fetchLogEntriesJob fetchLogEntriesJob getState fetchLogEntriesJob sortGroup
public Viewer Sorter get Viewer Sorter int comment Sort Change Log Model Sorter DATE int resource Sort Change Log Model Sorter PATH try I Dialog Settings page Settings get Configuration get Site get Page Settings if page Settings null comment Sort page Settings get Int P LAST COMMENTSORT resource Sort page Settings get Int P LAST RESOURCESORT catch Number Format Exception e ignore and use the defaults return new Change Log Model Sorter comment Sort resource Sort  ViewerSorter getViewerSorter commentSort ChangeLogModelSorter resourceSort ChangeLogModelSorter IDialogSettings pageSettings getConfiguration getSite getPageSettings pageSettings commentSort pageSettings getInt P_LAST_COMMENTSORT resourceSort pageSettings getInt P_LAST_RESOURCESORT NumberFormatException ChangeLogModelSorter commentSort resourceSort
see org eclipse team ui synchronize viewers Synchronize Model Provider do Add org eclipse team ui synchronize viewers Synchronize Model Element org eclipse team ui synchronize viewers Synchronize Model Element protected void do Add I Synchronize Model Element parent I Synchronize Model Element element Abstract Tree Viewer viewer Abstract Tree Viewer get Viewer viewer add parent element  SynchronizeModelProvider doAdd SynchronizeModelElement SynchronizeModelElement doAdd ISynchronizeModelElement ISynchronizeModelElement AbstractTreeViewer AbstractTreeViewer getViewer
see org eclipse team ui synchronize viewers Synchronize Model Provider do Remove org eclipse team ui synchronize viewers Synchronize Model Element protected void do Remove I Synchronize Model Element element Abstract Tree Viewer viewer Abstract Tree Viewer get Viewer viewer remove element  SynchronizeModelProvider doRemove SynchronizeModelElement doRemove ISynchronizeModelElement AbstractTreeViewer AbstractTreeViewer getViewer
see org eclipse team ui synchronize viewers Synchronize Model Provider handle Resource Additions org eclipse team core synchronize I Sync Info Tree Change Event protected void handle Resource Additions I Sync Info Tree Change Event event start Update Job new Sync Info Set event get Added Resources  SynchronizeModelProvider handleResourceAdditions ISyncInfoTreeChangeEvent handleResourceAdditions ISyncInfoTreeChangeEvent startUpdateJob SyncInfoSet getAddedResources
protected void handle Resource Changes I Sync Info Tree Change Event event Refresh the viewer for each changed resource Sync Info infos event get Changed Resources for int i 0 i infos length i Sync Info info infos i I Resource local info get Local remove From Viewer local start Update Job new Sync Info Set event get Changed Resources  handleResourceChanges ISyncInfoTreeChangeEvent SyncInfo getChangedResources SyncInfo IResource getLocal removeFromViewer startUpdateJob SyncInfoSet getChangedResources
protected void handle Resource Removals I Sync Info Tree Change Event event I Resource removed Roots event get Removed Subtree Roots for int i 0 i removed Roots length i remove From Viewer removed Roots i We have to look for folders that may no longer be in the set i e are in sync but still have descendants in the set I Resource removed Resources event get Removed Resources for int i 0 i removed Resources length i remove From Viewer removed Resources i  handleResourceRemovals ISyncInfoTreeChangeEvent IResource removedRoots getRemovedSubtreeRoots removedRoots removeFromViewer removedRoots IResource removedResources getRemovedResources removedResources removeFromViewer removedResources
protected void remove From Viewer I Resource resource First clear the log history cache for the remote element if log Operation null I Synchronize Model Element element get Model Object resource if element instanceof Full Path Sync Info Element CVS Sync Info info CVS Sync Info Full Path Sync Info Element element get Sync Info if info null ICVS Remote Resource remote get Remote Resource info log Operation clear Entries For remote Clear the multiple element cache if multiple Resource Map null List elements List multiple Resource Map get resource if elements null for Iterator it elements iterator it has Next I Synchronize Model Element element I Synchronize Model Element it next super remove From Viewer element multiple Resource Map remove resource Remove the object now super remove From Viewer resource  removeFromViewer IResource logOperation ISynchronizeModelElement getModelObject FullPathSyncInfoElement CVSSyncInfo CVSSyncInfo FullPathSyncInfoElement getSyncInfo ICVSRemoteResource getRemoteResource logOperation clearEntriesFor multipleResourceMap multipleResourceMap hasNext ISynchronizeModelElement ISynchronizeModelElement removeFromViewer multipleResourceMap removeFromViewer
protected void add To Viewer I Synchronize Model Element node Save model elements in our own mapper so that we can support multiple elements for the same resource I Resource r node get Resource if r null if multiple Resource Map null multiple Resource Map new Hash Map 5 List elements List multiple Resource Map get r if elements null elements new Array List 2 multiple Resource Map put r elements elements add node The super class will do all the interesting work super add To Viewer node  addToViewer ISynchronizeModelElement IResource getResource multipleResourceMap multipleResourceMap HashMap multipleResourceMap ArrayList multipleResourceMap addToViewer

public Change Log Model Sorter int comment Criteria int resource Criteria super this comment Criteria comment Criteria this resource Criteria resource Criteria  ChangeLogModelSorter commentCriteria resourceCriteria commentCriteria commentCriteria resourceCriteria resourceCriteria
protected int class Comparison Object element if element instanceof Change Log Diff Node return 0 return 1  classComparison ChangeLogDiffNode
protected int compare Class Object element1 Object element2 return class Comparison element1 class Comparison element2  compareClass classComparison classComparison
protected int compare Names String s1 String s2 return collator compare s1 s2  compareNames
public int compare Viewer viewer Object o1 Object o2 have to deal with non resources in navigator if one or both objects are not resources returned a comparison based on class if o1 instanceof Change Log Diff Node o2 instanceof Change Log Diff Node I Log Entry r1 Change Log Diff Node o1 get Comment I Log Entry r2 Change Log Diff Node o2 get Comment if comment Criteria DATE return r1 get Date compare To r2 get Date else if comment Criteria COMMENT return compare Names r1 get Comment r2 get Comment else if comment Criteria USER return compare Names r1 get Author r2 get Author else return 0 if o1 instanceof Change Log Model Provider Full Path Sync Info Element o2 instanceof Change Log Model Provider Full Path Sync Info Element I Resource r1 I Synchronize Model Element o1 get Resource I Resource r2 I Synchronize Model Element o2 get Resource if resource Criteria NAME return compare Names r1 get Name r2 get Name else if resource Criteria PATH return compare Names r1 get Full Path to String r2 get Full Path to String else if resource Criteria PARENT NAME return compare Names r1 get Parent get Name r2 get Parent get Name else return 0 else if o1 instanceof I Synchronize Model Element return 1 else if o2 instanceof I Synchronize Model Element return 1 return 0  ChangeLogDiffNode ChangeLogDiffNode ILogEntry ChangeLogDiffNode getComment ILogEntry ChangeLogDiffNode getComment commentCriteria getDate compareTo getDate commentCriteria compareNames getComment getComment commentCriteria compareNames getAuthor getAuthor ChangeLogModelProvider FullPathSyncInfoElement ChangeLogModelProvider FullPathSyncInfoElement IResource ISynchronizeModelElement getResource IResource ISynchronizeModelElement getResource resourceCriteria compareNames getName getName resourceCriteria compareNames getFullPath toString getFullPath toString resourceCriteria PARENT_NAME compareNames getParent getName getParent getName ISynchronizeModelElement ISynchronizeModelElement
public int get Comment Criteria return comment Criteria  getCommentCriteria commentCriteria
public int get Resource Criteria return resource Criteria  getResourceCriteria resourceCriteria

public class Compare Participant Action Contribution extends Synchronize Page Action Group public void initialize I Synchronize Page Configuration configuration super initialize configuration append To Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP new Compare Revert Action configuration if configuration get Site is Modal append To Group I Synchronize Page Configuration P CONTEXT MENU NON MODAL CONTEXT MENU CONTRIBUTION GROUP new CVS Action Delegate Wrapper new Show Annotation Action configuration append To Group I Synchronize Page Configuration P CONTEXT MENU NON MODAL CONTEXT MENU CONTRIBUTION GROUP new CVS Action Delegate Wrapper new Show Resource In History Action configuration  CompareParticipantActionContribution SynchronizePageActionGroup ISynchronizePageConfiguration appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP CompareRevertAction getSite isModal appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP CVSActionDelegateWrapper ShowAnnotationAction appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP CVSActionDelegateWrapper ShowResourceInHistoryAction
private Sync Info Filter content Comparison new Sync Info Filter private Sync Info Filter content Compare new Sync Info Filter Content Comparison Sync Info Filter public boolean select Sync Info info I Progress Monitor monitor Want to select infos whose contents do not match return content Compare select info monitor  SyncInfoFilter contentComparison SyncInfoFilter SyncInfoFilter contentCompare SyncInfoFilter ContentComparisonSyncInfoFilter SyncInfo IProgressMonitor contentCompare
public Compare Participant CVS Compare Subscriber subscriber this subscriber null  CompareParticipant CVSCompareSubscriber
public Compare Participant CVS Compare Subscriber subscriber CVS Tag local Tag set Subscriber subscriber this local Tag local Tag  CompareParticipant CVSCompareSubscriber CVSTag localTag setSubscriber localTag localTag
protected void set Subscriber Subscriber subscriber super set Subscriber subscriber if CVSUI Plugin get Plugin get Plugin Preferences get Boolean ICVSUI Constants PREF CONSIDER CONTENTS set Sync Info Filter content Comparison try I Synchronize Participant Descriptor descriptor TeamUI get Synchronize Manager get Participant Descriptor CVS Compare Subscriber ID set Initialization Data descriptor CVS Compare Subscriber s CVS Compare Subscriber get Subscriber set Secondary Id s get Id get Local Name catch Core Exception e CVSUI Plugin log e CVSUI Plugin get Plugin get Plugin Preferences add Property Change Listener this  setSubscriber setSubscriber CVSUIPlugin getPlugin getPluginPreferences getBoolean ICVSUIConstants PREF_CONSIDER_CONTENTS setSyncInfoFilter contentComparison ISynchronizeParticipantDescriptor getSynchronizeManager getParticipantDescriptor CVSCompareSubscriber setInitializationData CVSCompareSubscriber CVSCompareSubscriber getSubscriber setSecondaryId getId getLocalName CoreException CVSUIPlugin CVSUIPlugin getPlugin getPluginPreferences addPropertyChangeListener
see org eclipse team ui synchronize Abstract Synchronize Participant get Name public String get Name return Policy bind Compare Participant 0 get Subscriber get Name Utils convert Selection get Subscriber roots NON NLS 1  AbstractSynchronizeParticipant getName getName CompareParticipant getSubscriber getName convertSelection getSubscriber
Returns the tag this participant is comparing against protected CVS Tag get Tag return CVS Compare Subscriber get Subscriber get Tag  CVSTag getTag CVSCompareSubscriber getSubscriber getTag
public static Compare Participant get Matching Participant I Resource resources CVS Tag tag I Synchronize Participant Reference refs TeamUI get Synchronize Manager get Synchronize Participants for int i 0 i refs length i I Synchronize Participant Reference reference refs i if reference get Id equals CVS Compare Subscriber ID Compare Participant p try p Compare Participant reference get Participant catch Team Exception e continue CVS Tag existing Tag p get Tag The tag can be null if the compare participant has a different tag for each root if existing Tag null I Resource roots p get Resources Arrays sort resources Utils resource Comparator Arrays sort roots Utils resource Comparator if Arrays equals resources roots existing Tag equals tag return p return null  CompareParticipant getMatchingParticipant IResource CVSTag ISynchronizeParticipantReference getSynchronizeManager getSynchronizeParticipants ISynchronizeParticipantReference getId CVSCompareSubscriber CompareParticipant CompareParticipant getParticipant TeamException CVSTag existingTag getTag existingTag IResource getResources resourceComparator resourceComparator existingTag
protected void initialize Configuration I Synchronize Page Configuration configuration super initialize Configuration configuration configuration add Menu Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP configuration add Menu Group I Synchronize Page Configuration P CONTEXT MENU NON MODAL CONTEXT MENU CONTRIBUTION GROUP configuration add Action Contribution new Compare Participant Action Contribution if local Tag null non api use of Synchronize Page Configuration configuration set Property Synchronize Page Configuration P MODEL MANAGER new Change Log Model Manager configuration local Tag get Tag  initializeConfiguration ISynchronizePageConfiguration initializeConfiguration addMenuGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP addMenuGroup ISynchronizePageConfiguration P_CONTEXT_MENU NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP addActionContribution CompareParticipantActionContribution localTag SynchronizePageConfiguration setProperty SynchronizePageConfiguration P_MODEL_MANAGER ChangeLogModelManager localTag getTag
see org eclipse team ui synchronize Subscriber Participant dispose public void dispose super dispose CVSUI Plugin get Plugin get Plugin Preferences remove Property Change Listener this  SubscriberParticipant CVSUIPlugin getPlugin getPluginPreferences removePropertyChangeListener
public void property Change Property Change Event event if event get Property equals ICVSUI Constants PREF CONSIDER CONTENTS if CVSUI Plugin get Plugin get Plugin Preferences get Boolean ICVSUI Constants PREF CONSIDER CONTENTS set Sync Info Filter content Comparison else set Sync Info Filter new Fast Sync Info Filter  propertyChange PropertyChangeEvent getProperty ICVSUIConstants PREF_CONSIDER_CONTENTS CVSUIPlugin getPlugin getPluginPreferences getBoolean ICVSUIConstants PREF_CONSIDER_CONTENTS setSyncInfoFilter contentComparison setSyncInfoFilter FastSyncInfoFilter
see org eclipse team ui synchronize Subscriber Participant get Long Task Name protected String get Long Task Name return get Name  SubscriberParticipant getLongTaskName getLongTaskName getName
see org eclipse team ui synchronize Subscriber Participant get Short Task Name protected String get Short Task Name return Policy bind Participant comparing NON NLS 1  SubscriberParticipant getShortTaskName getShortTaskName

public class Compare Revert Action extends CVS Participant Action public Compare Revert Action I Synchronize Page Configuration configuration super configuration  CompareRevertAction CVSParticipantAction CompareRevertAction ISynchronizePageConfiguration
see org eclipse team internal ui actions Subscriber Action get Subscriber Operation org eclipse compare structuremergeviewer I Diff Element protected Synchronize Model Operation get Subscriber Operation I Synchronize Page Configuration configuration I Diff Element elements return new Compare Revert Operation configuration elements  SubscriberAction getSubscriberOperation IDiffElement SynchronizeModelOperation getSubscriberOperation ISynchronizePageConfiguration IDiffElement CompareRevertOperation

public class Compare Revert Operation extends CVS Subscriber Operation protected Compare Revert Operation I Synchronize Page Configuration configuration I Diff Element elements super configuration elements  CompareRevertOperation CVSSubscriberOperation CompareRevertOperation ISynchronizePageConfiguration IDiffElement
protected String get Job Name Sync Info Set sync Set get Sync Info Set return Policy bind Compare Revert Action 0 new Integer sync Set size to String NON NLS 1  getJobName SyncInfoSet syncSet getSyncInfoSet CompareRevertAction syncSet toString
protected void run Sync Info Set sync Set I Progress Monitor monitor throws Team Exception Sync Info changed sync Set get Sync Infos if changed length 0 return if prompt For Overwrite sync Set return The list of sync resources to be updated using cvs update List update Shallow new Array List A list of sync resource folders which need to be created locally incoming addition or previously pruned Set parent Creation Elements new Hash Set for int i 0 i changed length i Sync Info changed Node changed i Make sure that parent folders exist Sync Info parent get Parent changed Node if parent null is Out Of Sync parent We need to ensure that parents that are either incoming folder additions or previously pruned folders are recreated parent Creation Elements add parent I Resource resource changed Node get Local if resource get Type I Resource FILE if changed Node get Local exists update Shallow add changed Node else if changed Node get Remote null update Shallow add changed Node else Special handling for folders to support shallow operations on files i e folder operations are performed using the sync info already contained in the sync info if is Out Of Sync changed Node parent Creation Elements add changed Node try monitor begin Task null 100 if parent Creation Elements size 0 make In Sync Sync Info parent Creation Elements to Array new Sync Info parent Creation Elements size Policy sub Monitor For monitor 25 if update Shallow size 0 run Update Sync Info update Shallow to Array new Sync Info update Shallow size Policy sub Monitor For monitor 75 finally monitor done return  SyncInfoSet syncSet IProgressMonitor TeamException SyncInfo syncSet getSyncInfos promptForOverwrite syncSet updateShallow ArrayList parentCreationElements HashSet SyncInfo changedNode SyncInfo getParent changedNode isOutOfSync parentCreationElements IResource changedNode getLocal getType IResource changedNode getLocal updateShallow changedNode changedNode getRemote updateShallow changedNode isOutOfSync changedNode parentCreationElements changedNode beginTask parentCreationElements makeInSync SyncInfo parentCreationElements toArray SyncInfo parentCreationElements subMonitorFor updateShallow runUpdate SyncInfo updateShallow toArray SyncInfo updateShallow subMonitorFor
private void run Update Sync Info infos I Progress Monitor monitor throws Team Exception monitor begin Task null 100 infos length for int i 0 i infos length i Sync Info info infos i make Remote Local info Policy sub Monitor For monitor 100 monitor done  runUpdate SyncInfo IProgressMonitor TeamException beginTask SyncInfo makeRemoteLocal subMonitorFor

public class Confirm Merged Action extends CVS Participant Action public Confirm Merged Action I Synchronize Page Configuration configuration super configuration  ConfirmMergedAction CVSParticipantAction ConfirmMergedAction ISynchronizePageConfiguration
see org eclipse team ui sync Subscriber Action get Sync Info Filter protected Fast Sync Info Filter get Sync Info Filter return new Sync Info Direction Filter new int Sync Info CONFLICTING  SubscriberAction getSyncInfoFilter FastSyncInfoFilter getSyncInfoFilter SyncInfoDirectionFilter SyncInfo
see org eclipse team internal ui actions Subscriber Action get Subscriber Operation org eclipse compare structuremergeviewer I Diff Element protected Synchronize Model Operation get Subscriber Operation I Synchronize Page Configuration configuration I Diff Element elements return new Confirm Merged Operation configuration elements  SubscriberAction getSubscriberOperation IDiffElement SynchronizeModelOperation getSubscriberOperation ISynchronizePageConfiguration IDiffElement ConfirmMergedOperation

public class Confirm Merged Operation extends CVS Subscriber Operation public Confirm Merged Operation I Synchronize Page Configuration configuration I Diff Element elements super configuration elements  ConfirmMergedOperation CVSSubscriberOperation ConfirmMergedOperation ISynchronizePageConfiguration IDiffElement
see org eclipse team internal ui actions Team Operation get Job Name protected String get Job Name Sync Info Set sync Set get Sync Info Set return Policy bind Subscriber Confirm Merged Action job Name new Integer sync Set size to String NON NLS 1  TeamOperation getJobName getJobName SyncInfoSet syncSet getSyncInfoSet SubscriberConfirmMergedAction jobName syncSet toString
protected void run Sync Info Set sync Set I Progress Monitor monitor throws CVS Exception Sync Info sync Resources sync Set get Sync Infos monitor begin Task null 100 sync Resources length try for int i 0 i sync Resources length i Sync Info info sync Resources i if make Outgoing info Policy sub Monitor For monitor 100 Failure was logged in make Outgoing catch Team Exception e handle e finally monitor done  SyncInfoSet syncSet IProgressMonitor CVSException SyncInfo syncResources syncSet getSyncInfos beginTask syncResources syncResources SyncInfo syncResources makeOutgoing subMonitorFor makeOutgoing TeamException
private boolean make Outgoing Sync Info info I Progress Monitor monitor throws CVS Exception Team Exception monitor begin Task null 100 try CVS Sync Info cvs Info getCVS Sync Info info if cvs Info null CVSUI Plugin log I Status ERROR Policy bind Subscriber Confirm Merged Action 0 cvs Info get Local get Full Path to String null NON NLS 1 return false Make sure the parent is managed ICVS Folder parent CVS Workspace Root getCVS Folder For cvs Info get Local get Parent if parent isCVS Folder the parents must be made outgoing before the child can Sync Info parent Info cvs Info get Subscriber get Sync Info parent getI Resource if make Outgoing parent Info Policy sub Monitor For monitor 20 return false I Status status cvs Info make Outgoing Policy sub Monitor For monitor 80 if status get Severity I Status ERROR log Error status return false return true finally monitor done  makeOutgoing SyncInfo IProgressMonitor CVSException TeamException beginTask CVSSyncInfo cvsInfo getCVSSyncInfo cvsInfo CVSUIPlugin IStatus SubscriberConfirmMergedAction cvsInfo getLocal getFullPath toString ICVSFolder CVSWorkspaceRoot getCVSFolderFor cvsInfo getLocal getParent isCVSFolder SyncInfo parentInfo cvsInfo getSubscriber getSyncInfo getIResource makeOutgoing parentInfo subMonitorFor IStatus cvsInfo makeOutgoing subMonitorFor getSeverity IStatus logError

public class CVS Action Delegate Wrapper extends Action Delegate Wrapper public CVS Action Delegate Wrapper I Action Delegate delegate I Synchronize Page Configuration configuration super delegate configuration Utils init Action this get Bundle Key Prefix Policy get Bundle  CVSActionDelegateWrapper ActionDelegateWrapper CVSActionDelegateWrapper IActionDelegate ISynchronizePageConfiguration initAction getBundleKeyPrefix getBundle
Return the key to the action text in the resource bundle The default is the class name followed by a dot return the bundle key prefix protected String get Bundle Key Prefix String name get Delegate get Class get Name int last Dot name last Index Of NON NLS 1 if last Dot 1 return name return name substring last Dot 1 NON NLS 1  getBundleKeyPrefix getDelegate getClass getName lastDot lastIndexOf lastDot lastDot

protected void initialize Configuration I Synchronize Page Configuration configuration super initialize Configuration configuration The decorator adds itself to the configuration I Label Decorator label Decorator new CVS Participant Label Decorator configuration configuration add Label Decorator label Decorator  initializeConfiguration ISynchronizePageConfiguration initializeConfiguration ILabelDecorator labelDecorator CVSParticipantLabelDecorator addLabelDecorator labelDecorator

public abstract class CVS Participant Action extends Synchronize Model Action protected CVS Participant Action I Synchronize Page Configuration configuration super null configuration Utils init Action this get Bundle Key Prefix Policy get Bundle  CVSParticipantAction SynchronizeModelAction CVSParticipantAction ISynchronizePageConfiguration initAction getBundleKeyPrefix getBundle
protected CVS Participant Action I Synchronize Page Configuration configuration I Selection Provider provider String bundle Key super null configuration provider Utils init Action this bundle Key Policy get Bundle  CVSParticipantAction ISynchronizePageConfiguration ISelectionProvider bundleKey initAction bundleKey getBundle
Return the key to the action text in the resource bundle The default is the class name followed by a dot return the bundle key prefix protected String get Bundle Key Prefix String name get Class get Name int last Dot name last Index Of NON NLS 1 if last Dot 1 return name return name substring last Dot 1 NON NLS 1  getBundleKeyPrefix getClass getName lastDot lastIndexOf lastDot lastDot
protected boolean needs To Save Dirty Editors int option CVSUI Plugin get Plugin get Preference Store get Int ICVSUI Constants PREF SAVE DIRTY EDITORS return option ICVSUI Constants OPTION NEVER  needsToSaveDirtyEditors CVSUIPlugin getPlugin getPreferenceStore getInt ICVSUIConstants PREF_SAVE_DIRTY_EDITORS ICVSUIConstants OPTION_NEVER
see org eclipse team ui synchronize Synchronize Model Action confirm Save Of Dirty Editor protected boolean confirm Save Of Dirty Editor int option CVSUI Plugin get Plugin get Preference Store get Int ICVSUI Constants PREF SAVE DIRTY EDITORS return option ICVSUI Constants OPTION PROMPT  SynchronizeModelAction confirmSaveOfDirtyEditor confirmSaveOfDirtyEditor CVSUIPlugin getPlugin getPreferenceStore getInt ICVSUIConstants PREF_SAVE_DIRTY_EDITORS ICVSUIConstants OPTION_PROMPT

private I Synchronize Page Configuration configuration public CVS Participant Label Decorator I Synchronize Page Configuration configuration this configuration configuration Listen for decorator changed to refresh the viewer s labels CVSUI Plugin add Property Change Listener this  ISynchronizePageConfiguration CVSParticipantLabelDecorator ISynchronizePageConfiguration CVSUIPlugin addPropertyChangeListener
public String decorate Text String input Object element String text input if element instanceof I Synchronize Model Element I Resource resource I Synchronize Model Element element get Resource if resource null resource get Type I Resource ROOT CVS Lightweight Decorator Decoration decoration new CVS Lightweight Decorator Decoration CVS Lightweight Decorator decorate Text Label resource decoration false true get Revision Number I Synchronize Model Element element String Buffer output new String Buffer 25 if decoration prefix null output append decoration prefix output append text if decoration suffix null output append decoration suffix return output to String return text  decorateText ISynchronizeModelElement IResource ISynchronizeModelElement getResource getType IResource CVSLightweightDecorator CVSLightweightDecorator CVSLightweightDecorator decorateTextLabel getRevisionNumber ISynchronizeModelElement StringBuffer StringBuffer toString
return text public Image decorate Image Image base Object element return base  decorateImage
public void property Change Property Change Event event String property event get Property if property equals CVSUI Plugin P DECORATORS CHANGED Viewer viewer configuration get Page get Viewer if viewer instanceof Structured Viewer viewer get Control is Disposed Structured Viewer viewer refresh true  propertyChange PropertyChangeEvent getProperty CVSUIPlugin P_DECORATORS_CHANGED getPage getViewer StructuredViewer getControl isDisposed StructuredViewer
public void dispose CVSUI Plugin remove Property Change Listener this  CVSUIPlugin removePropertyChangeListener
protected String get Revision Number I Synchronize Model Element element if element instanceof Sync Info Model Element Sync Info info Sync Info Model Element element get Sync Info if info null info get Local get Type I Resource FILE info instanceof CVS Sync Info CVS Sync Info cvs Info CVS Sync Info info ICVS Remote Resource remote ICVS Remote Resource cvs Info get Remote ICVS Remote Resource local try local ICVS Remote File CVS Workspace Root get Remote Resource For info get Local catch CVS Exception e local null if local null local ICVS Remote Resource info get Base String Buffer revision String new String Buffer String remote Revision get Revision String remote String local Revision get Revision String local if local Revision null revision String append local Revision if remote Revision null revision String append local Revision null remote Revision NON NLS 1 NON NLS 2 return revision String to String return null  getRevisionNumber ISynchronizeModelElement SyncInfoModelElement SyncInfo SyncInfoModelElement getSyncInfo getLocal getType IResource CVSSyncInfo CVSSyncInfo cvsInfo CVSSyncInfo ICVSRemoteResource ICVSRemoteResource cvsInfo getRemote ICVSRemoteResource ICVSRemoteFile CVSWorkspaceRoot getRemoteResourceFor getLocal CVSException ICVSRemoteResource getBase StringBuffer revisionString StringBuffer remoteRevision getRevisionString localRevision getRevisionString localRevision revisionString localRevision remoteRevision revisionString localRevision remoteRevision revisionString toString
private String get Revision String ICVS Remote Resource remote File if remote File instanceof Remote File return Remote File remote File get Revision return null  getRevisionString ICVSRemoteResource remoteFile remoteFile RemoteFile RemoteFile remoteFile getRevision

public abstract class CVS Subscriber Operation extends Synchronize Model Operation protected CVS Subscriber Operation I Synchronize Page Configuration configuration I Diff Element elements super configuration elements  CVSSubscriberOperation SynchronizeModelOperation CVSSubscriberOperation ISynchronizePageConfiguration IDiffElement
new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception try CVS Subscriber Operation this run Sync Info Set project Sync Infos get project monitor catch Team Exception e throw CVS Exception wrap Exception e  ICVSRunnable IProgressMonitor CVSException CVSSubscriberOperation SyncInfoSet projectSyncInfos TeamException CVSException wrapException
public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception Divide the sync info by project final Map project Sync Infos get Project Sync Info Set Map monitor begin Task null project Sync Infos size 100 for Iterator iter project Sync Infos key Set iterator iter has Next final I Project project I Project iter next try Pass the scheduling rule to the synchronizer so that sync change events and cache commits to disk are batched Eclipse Synchronizer get Instance run project new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception try CVS Subscriber Operation this run Sync Info Set project Sync Infos get project monitor catch Team Exception e throw CVS Exception wrap Exception e Policy sub Monitor For monitor 100 catch Team Exception e throw new Invocation Target Exception e monitor done  IProgressMonitor InvocationTargetException InterruptedException projectSyncInfos getProjectSyncInfoSetMap beginTask projectSyncInfos projectSyncInfos keySet hasNext IProject IProject EclipseSynchronizer getInstance ICVSRunnable IProgressMonitor CVSException CVSSubscriberOperation SyncInfoSet projectSyncInfos TeamException CVSException wrapException subMonitorFor TeamException InvocationTargetException
Run the operation on the sync info in the given set The sync info will be all from the same project param set the sync info set param monitor a progress monitor 
protected boolean is Out Of Sync Sync Info resource if resource null return false return resource get Kind 0 resource get Local exists resource get Remote null  isOutOfSync SyncInfo getKind getLocal getRemote
protected void make In Sync Sync Info folders I Progress Monitor monitor throws Team Exception If a node has a parent that is an incoming folder creation we have to create that folder locally and set its sync info before we can get the node itself We must do this for all incoming folder creations recursively in the case where there are multiple levels of incoming folder creations monitor begin Task null folders length for int i 0 i folders length i Sync Info resource folders i make In Sync resource monitor worked 1 monitor done  makeInSync SyncInfo IProgressMonitor TeamException beginTask SyncInfo makeInSync
protected boolean make In Sync Sync Info info throws Team Exception if is Out Of Sync info Sync Info parent get Parent info if parent null if info get Local get Type I Resource ROOT ROOT should be null return true else No other ancestors should be null Log the problem CVSUI Plugin log I Status WARNING Policy bind CVS Subscriber Action 0 info get Local get Full Path to String null NON NLS 1 return false else if make In Sync parent The failed make In Sync will log any errors return false if info instanceof CVS Sync Info CVS Sync Info cvs Info CVS Sync Info info I Status status cvs Info make In Sync if status get Severity I Status ERROR log Error status return false return true return false else return true  makeInSync SyncInfo TeamException isOutOfSync SyncInfo getParent getLocal getType IResource CVSUIPlugin IStatus CVSSubscriberAction getLocal getFullPath toString makeInSync makeInSync CVSSyncInfo CVSSyncInfo cvsInfo CVSSyncInfo IStatus cvsInfo makeInSync getSeverity IStatus logError
protected void make Outgoing Sync Info folders I Progress Monitor monitor throws Team Exception If a node has a parent that is an incoming folder creation we have to create that folder locally and set its sync info before we can get the node itself We must do this for all incoming folder creations recursively in the case where there are multiple levels of incoming folder creations monitor begin Task null 100 folders length for int i 0 i folders length i Sync Info info folders i make Outgoing info Policy sub Monitor For monitor 100 monitor done  makeOutgoing SyncInfo IProgressMonitor TeamException beginTask SyncInfo makeOutgoing subMonitorFor
private void make Outgoing Sync Info info I Progress Monitor monitor throws Team Exception if info null return if info instanceof CVS Sync Info CVS Sync Info cvs Info CVS Sync Info info I Status status cvs Info make Outgoing monitor if status get Severity I Status ERROR log Error status  makeOutgoing SyncInfo IProgressMonitor TeamException CVSSyncInfo CVSSyncInfo cvsInfo CVSSyncInfo IStatus cvsInfo makeOutgoing getSeverity IStatus logError
Log an error associated with an operation param status protected void log Error I Status status CVSUI Plugin log status  logError IStatus CVSUIPlugin
Handle the exception by showing an error dialog to the user Sync actions seem to need to be sync execed to work param t protected void handle Exception t CVSUI Plugin open Error get Shell get Error Title null t CVSUI Plugin PERFORM SYNC EXEC CVSUI Plugin LOG NONTEAM EXCEPTIONS  CVSUIPlugin openError getShell getErrorTitle CVSUIPlugin PERFORM_SYNC_EXEC CVSUIPlugin LOG_NONTEAM_EXCEPTIONS
Return the error title that will appear in any error dialogs shown to the user return protected String get Error Title return null  getErrorTitle
protected boolean can Run As Job return true  canRunAsJob
protected void prune Empty Parents Sync Info nodes throws CVS Exception TODO A more explicit tie in to the pruning mechanism would be prefereable i e I don t like referencing the option and visitor directly if CVS Provider Plugin get Plugin get Prune Empty Directories return ICVS Resource cvs Resources new ICVS Resource nodes length for int i 0 i cvs Resources length i cvs Resources i CVS Workspace Root getCVS Resource For nodes i get Local new Prune Folder Visitor visit CVS Workspace Root getCVS Folder For Resources Plugin get Workspace get Root cvs Resources  pruneEmptyParents SyncInfo CVSException CVSProviderPlugin getPlugin getPruneEmptyDirectories ICVSResource cvsResources ICVSResource cvsResources cvsResources CVSWorkspaceRoot getCVSResourceFor getLocal PruneFolderVisitor CVSWorkspaceRoot getCVSFolderFor ResourcesPlugin getWorkspace getRoot cvsResources
public CVS Sync Info getCVS Sync Info Sync Info info if info instanceof CVS Sync Info return CVS Sync Info info return null  CVSSyncInfo getCVSSyncInfo SyncInfo CVSSyncInfo CVSSyncInfo
protected Sync Info get Parent Sync Info info throws Team Exception return CVS Sync Info info get Subscriber get Sync Info info get Local get Parent  SyncInfo getParent SyncInfo TeamException CVSSyncInfo getSubscriber getSyncInfo getLocal getParent
protected I Resource getI Resources From Sync Info nodes List resources new Array List nodes length for int i 0 i nodes length i resources add nodes i get Local return I Resource resources to Array new I Resource resources size  IResource getIResourcesFrom SyncInfo ArrayList getLocal IResource toArray IResource
final int result new int Dialog CANCEL TeamUI Plugin get Standard Display sync Exec new Runnable public void run Update Dialog dialog new Update Dialog get Shell sync Set result 0 dialog open  TeamUIPlugin getStandardDisplay syncExec UpdateDialog UpdateDialog getShell syncSet
Prompt to overwrite those resources that could not be safely updated Note This method is designed to be overridden by test cases return whether to perform the overwrite protected boolean prompt For Overwrite final Sync Info Set sync Set final int result new int Dialog CANCEL TeamUI Plugin get Standard Display sync Exec new Runnable public void run Update Dialog dialog new Update Dialog get Shell sync Set result 0 dialog open return result 0 Update Dialog YES  promptForOverwrite SyncInfoSet syncSet TeamUIPlugin getStandardDisplay syncExec UpdateDialog UpdateDialog getShell syncSet UpdateDialog
Make the contents of the local resource match that of the remote without modifying the sync info of the local resource If called on a new folder the sync info will be copied protected void make Remote Local Sync Info info I Progress Monitor monitor throws Team Exception I Resource Variant remote info get Remote I Resource local info get Local try if remote null if local exists local delete I Resource KEEP HISTORY monitor else if remote is Container ensure Container Exists info else monitor begin Task null 200 try I File local File I File local if local exists local File set Contents remote get Storage Policy sub Monitor For monitor 100 get Contents false don t force true keep history Policy sub Monitor For monitor 100 else ensure Container Exists get Parent info local File create remote get Storage Policy sub Monitor For monitor 100 get Contents false don t force Policy sub Monitor For monitor 100 finally monitor done catch Core Exception e throw new CVS Exception Policy bind UpdateMergeActionProblems merging remote resources into workspace 1 e NON NLS 1  makeRemoteLocal SyncInfo IProgressMonitor TeamException IResourceVariant getRemote IResource getLocal IResource KEEP_HISTORY isContainer ensureContainerExists beginTask IFile localFile IFile localFile setContents getStorage subMonitorFor getContents subMonitorFor ensureContainerExists getParent localFile getStorage subMonitorFor getContents subMonitorFor CoreException CVSException UpdateMergeActionProblems_merging_remote_resources_into_workspace_1
private boolean ensure Container Exists Sync Info info throws Team Exception I Resource local info get Local make sure that the parent exists if local exists if ensure Container Exists get Parent info return false make sure that the folder sync info is set if is Out Of Sync info if info instanceof CVS Sync Info CVS Sync Info cvs Info CVS Sync Info info I Status status cvs Info make In Sync if status get Severity I Status ERROR log Error status return false create the folder if it doesn t exist ICVS Folder cvs Folder CVS Workspace Root getCVS Folder For I Container local if cvs Folder exists cvs Folder mkdir return true  ensureContainerExists SyncInfo TeamException IResource getLocal ensureContainerExists getParent isOutOfSync CVSSyncInfo CVSSyncInfo cvsInfo CVSSyncInfo IStatus cvsInfo makeInSync getSeverity IStatus logError ICVSFolder cvsFolder CVSWorkspaceRoot getCVSFolderFor IContainer cvsFolder cvsFolder
private Map get Project Sync Info Set Map Map map new Hash Map Sync Info Set all get Sync Info Set Sync Info infos all get Sync Infos for int i 0 i infos length i Sync Info info infos i I Project project info get Local get Project Sync Info Set set Sync Info Set map get project if set null set new Sync Info Set map put project set set add info return map  getProjectSyncInfoSetMap HashMap SyncInfoSet getSyncInfoSet SyncInfo getSyncInfos SyncInfo IProject getLocal getProject SyncInfoSet SyncInfoSet SyncInfoSet

public class CVS Synchronize Wizard extends Subscriber Participant Wizard protected I Resource get Root Resources return CVS Provider Plugin get Plugin getCVS Workspace Subscriber roots  CVSSynchronizeWizard SubscriberParticipantWizard IResource getRootResources CVSProviderPlugin getPlugin getCVSWorkspaceSubscriber
protected String get Name I Synchronize Participant Descriptor desc TeamUI get Synchronize Manager get Participant Descriptor Workspace Synchronize Participant ID if desc null return desc get Name else return Policy bind CVS Synchronize Wizard 0 NON NLS 1  getName ISynchronizeParticipantDescriptor getSynchronizeManager getParticipantDescriptor WorkspaceSynchronizeParticipant getName CVSSynchronizeWizard
protected Subscriber Participant create Participant I Synchronize Scope scope First check if there is an existing matching participant I Resource roots scope get Roots if roots null roots CVS Provider Plugin get Plugin getCVS Workspace Subscriber roots Workspace Synchronize Participant participant Workspace Synchronize Participant Subscriber Participant get Matching Participant Workspace Synchronize Participant ID roots If there isn t create one and add to the manager if participant null return new Workspace Synchronize Participant scope else return participant  SubscriberParticipant createParticipant ISynchronizeScope IResource getRoots CVSProviderPlugin getPlugin getCVSWorkspaceSubscriber WorkspaceSynchronizeParticipant WorkspaceSynchronizeParticipant SubscriberParticipant getMatchingParticipant WorkspaceSynchronizeParticipant WorkspaceSynchronizeParticipant
see org eclipse team internal ui synchronize Subscriber Participant Wizard get Import Wizard protected I Wizard get Import Wizard return new Checkout Wizard  SubscriberParticipantWizard getImportWizard IWizard getImportWizard CheckoutWizard

private Merge Update Action update Action public void initialize I Synchronize Page Configuration configuration super initialize configuration update Action new Merge Update Action configuration get Visible Roots Selection Provider Workspace Toolbar Update Action NON NLS 1 update Action set Prompt Before Update true append To Group I Synchronize Page Configuration P TOOLBAR MENU TOOLBAR CONTRIBUTION GROUP update Action append To Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP new Merge Update Action configuration append To Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP new Confirm Merged Action configuration if configuration get Site is Modal append To Group I Synchronize Page Configuration P CONTEXT MENU NON MODAL CONTEXT MENU CONTRIBUTION GROUP new CVS Action Delegate Wrapper new Show Annotation Action configuration append To Group I Synchronize Page Configuration P CONTEXT MENU NON MODAL CONTEXT MENU CONTRIBUTION GROUP new CVS Action Delegate Wrapper new Show Resource In History Action configuration  MergeUpdateAction updateAction ISynchronizePageConfiguration updateAction MergeUpdateAction getVisibleRootsSelectionProvider WorkspaceToolbarUpdateAction updateAction setPromptBeforeUpdate appendToGroup ISynchronizePageConfiguration P_TOOLBAR_MENU TOOLBAR_CONTRIBUTION_GROUP updateAction appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP MergeUpdateAction appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP ConfirmMergedAction getSite isModal appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP CVSActionDelegateWrapper ShowAnnotationAction appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP CVSActionDelegateWrapper ShowResourceInHistoryAction
public Merge Synchronize Participant super  MergeSynchronizeParticipant
public Merge Synchronize Participant CVS Merge Subscriber subscriber set Subscriber subscriber  MergeSynchronizeParticipant CVSMergeSubscriber setSubscriber
public void set Subscriber Subscriber subscriber super set Subscriber subscriber try I Synchronize Participant Descriptor descriptor TeamUI get Synchronize Manager get Participant Descriptor CVS Merge Subscriber ID set Initialization Data descriptor CVS Merge Subscriber s CVS Merge Subscriber get Subscriber set Secondary Id s get Id get Local Name catch Core Exception e CVSUI Plugin log e  setSubscriber setSubscriber ISynchronizeParticipantDescriptor getSynchronizeManager getParticipantDescriptor CVSMergeSubscriber setInitializationData CVSMergeSubscriber CVSMergeSubscriber getSubscriber setSecondaryId getId getLocalName CoreException CVSUIPlugin
public void init String seconday Id I Memento memento throws Part Init Exception super init seconday Id memento if memento null I Synchronize Participant Descriptor descriptor TeamUI get Synchronize Manager get Participant Descriptor CVS Merge Subscriber ID String qualifier descriptor get Id String localname seconday Id if qualifier null localname null throw new Part Init Exception Policy bind Merge Synchronize Participant 8 NON NLS 1 try set Subscriber read new Qualified Name qualifier localname memento catch CVS Exception e throw new Part Init Exception Policy bind Merge Synchronize Participant 9 e NON NLS 1  secondayId IMemento PartInitException secondayId ISynchronizeParticipantDescriptor getSynchronizeManager getParticipantDescriptor CVSMergeSubscriber getId secondayId PartInitException MergeSynchronizeParticipant setSubscriber QualifiedName CVSException PartInitException MergeSynchronizeParticipant
public void save State I Memento memento super save State memento CVS Merge Subscriber s CVS Merge Subscriber get Subscriber write s memento  saveState IMemento saveState CVSMergeSubscriber CVSMergeSubscriber getSubscriber
public void dispose super dispose if TeamUI get Synchronize Manager get get Id get Secondary Id null If the participant isn t managed by the synchronize manager then we must ensure that the state cached in the synchronizer is flushed flush State Cache  getSynchronizeManager getId getSecondaryId flushStateCache
see org eclipse team ui synchronize I Synchronize Participant get Name public String get Name return Policy bind Compare Participant 0 CVS Merge Subscriber get Subscriber get Name Utils convert Selection get Subscriber roots NON NLS 1  ISynchronizeParticipant getName getName CompareParticipant CVSMergeSubscriber getSubscriber getName convertSelection getSubscriber
Returns the start tag for this merge participant The start tag is actually stored with the subscriber protected CVS Tag get Start Tag return CVS Merge Subscriber get Subscriber get Start Tag  CVSTag getStartTag CVSMergeSubscriber getSubscriber getStartTag
Returns the end tag for this merge participant The end tag is actually stored with the subscriber protected CVS Tag get End Tag return CVS Merge Subscriber get Subscriber get End Tag  CVSTag getEndTag CVSMergeSubscriber getSubscriber getEndTag
public static Merge Synchronize Participant get Matching Participant I Resource resources CVS Tag start Tag CVS Tag end Tag I Synchronize Participant Reference refs TeamUI get Synchronize Manager get Synchronize Participants for int i 0 i refs length i I Synchronize Participant Reference reference refs i if reference get Id equals CVS Merge Subscriber ID Merge Synchronize Participant p try p Merge Synchronize Participant reference get Participant catch Team Exception e continue I Resource roots p get Resources Arrays sort resources Utils resource Comparator Arrays sort roots Utils resource Comparator if Arrays equals resources roots p get Start Tag equals start Tag p get End Tag equals end Tag return p return null  MergeSynchronizeParticipant getMatchingParticipant IResource CVSTag startTag CVSTag endTag ISynchronizeParticipantReference getSynchronizeManager getSynchronizeParticipants ISynchronizeParticipantReference getId CVSMergeSubscriber MergeSynchronizeParticipant MergeSynchronizeParticipant getParticipant TeamException IResource getResources resourceComparator resourceComparator getStartTag startTag getEndTag endTag
private void write CVS Merge Subscriber s I Memento memento start and end tags CVS Tag start s get Start Tag CVS Tag end s get End Tag memento put String CTX START TAG start get Name memento put Integer CTX START TAG TYPE start get Type memento put String CTX END TAG end get Name memento put Integer CTX END TAG TYPE end get Type resource roots I Resource roots s roots for int i 0 i roots length i I Resource resource roots i I Memento root Node memento create Child CTX ROOT root Node put String CTX ROOT PATH resource get Full Path to String  CVSMergeSubscriber IMemento CVSTag getStartTag CVSTag getEndTag putString CTX_START_TAG getName putInteger CTX_START_TAG_TYPE getType putString CTX_END_TAG getName putInteger CTX_END_TAG_TYPE getType IResource IResource IMemento rootNode createChild CTX_ROOT rootNode putString CTX_ROOT_PATH getFullPath toString
private CVS Merge Subscriber read Qualified Name id I Memento memento throws CVS Exception CVS Tag start new CVS Tag memento get String CTX START TAG memento get Integer CTX START TAG TYPE int Value NON NLS 1 NON NLS 2 CVS Tag end new CVS Tag memento get String CTX END TAG memento get Integer CTX END TAG TYPE int Value NON NLS 1 NON NLS 2 I Memento root Nodes memento get Children CTX ROOT if root Nodes null root Nodes length 0 throw new CVS Exception Policy bind Merge Synchronize Participant 10 id to String NON NLS 1 List resources new Array List for int i 0 i root Nodes length i I Memento root Node root Nodes i I Path path new Path root Node get String CTX ROOT PATH NON NLS 1 I Resource resource Resources Plugin get Workspace get Root find Member path true include phantoms if resource null resources add resource else log that a resource previously in the merge set is no longer in the workspace CVS Provider Plugin log CVS Status INFO Policy bind Merge Synchronize Participant 11 path to String null NON NLS 1 if resources is Empty throw new CVS Exception Policy bind Merge Synchronize Participant 12 id to String NON NLS 1 I Resource roots I Resource resources to Array new I Resource resources size return new CVS Merge Subscriber id roots start end  CVSMergeSubscriber QualifiedName IMemento CVSException CVSTag CVSTag getString CTX_START_TAG getInteger CTX_START_TAG_TYPE intValue CVSTag CVSTag getString CTX_END_TAG getInteger CTX_END_TAG_TYPE intValue IMemento rootNodes getChildren CTX_ROOT rootNodes rootNodes CVSException MergeSynchronizeParticipant toString ArrayList rootNodes IMemento rootNode rootNodes IPath rootNode getString CTX_ROOT_PATH IResource ResourcesPlugin getWorkspace getRoot findMember CVSProviderPlugin CVSStatus MergeSynchronizeParticipant toString isEmpty CVSException MergeSynchronizeParticipant toString IResource IResource toArray IResource CVSMergeSubscriber
private void flush State Cache CVS Merge Subscriber get Subscriber cancel  flushStateCache CVSMergeSubscriber getSubscriber
protected void initialize Configuration I Synchronize Page Configuration configuration super initialize Configuration configuration configuration add Menu Group I Synchronize Page Configuration P TOOLBAR MENU TOOLBAR CONTRIBUTION GROUP configuration add Menu Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP configuration add Menu Group I Synchronize Page Configuration P CONTEXT MENU NON MODAL CONTEXT MENU CONTRIBUTION GROUP configuration set Supported Modes I Synchronize Page Configuration INCOMING MODE I Synchronize Page Configuration CONFLICTING MODE configuration set Mode I Synchronize Page Configuration INCOMING MODE configuration add Action Contribution new Merge Participant Action Contribution non api use of Synchronize Page Configuration configuration set Property Synchronize Page Configuration P MODEL MANAGER new Change Log Model Manager configuration  initializeConfiguration ISynchronizePageConfiguration initializeConfiguration addMenuGroup ISynchronizePageConfiguration P_TOOLBAR_MENU TOOLBAR_CONTRIBUTION_GROUP addMenuGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP addMenuGroup ISynchronizePageConfiguration P_CONTEXT_MENU NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP setSupportedModes ISynchronizePageConfiguration INCOMING_MODE ISynchronizePageConfiguration CONFLICTING_MODE setMode ISynchronizePageConfiguration INCOMING_MODE addActionContribution MergeParticipantActionContribution SynchronizePageConfiguration setProperty SynchronizePageConfiguration P_MODEL_MANAGER ChangeLogModelManager
see org eclipse team ui synchronize Subscriber Participant get Long Task Name protected String get Long Task Name return get Name  SubscriberParticipant getLongTaskName getLongTaskName getName
see org eclipse team ui synchronize Subscriber Participant get Short Task Name protected String get Short Task Name return Policy bind Participant merging NON NLS 1  SubscriberParticipant getShortTaskName getShortTaskName

public class Merge Update Action extends CVS Participant Action public Merge Update Action I Synchronize Page Configuration configuration super configuration  MergeUpdateAction CVSParticipantAction MergeUpdateAction ISynchronizePageConfiguration
public Merge Update Action I Synchronize Page Configuration configuration I Selection Provider provider String bundle Key super configuration provider bundle Key  MergeUpdateAction ISynchronizePageConfiguration ISelectionProvider bundleKey bundleKey
protected Fast Sync Info Filter get Sync Info Filter Update works for all incoming and conflicting nodes return new Or Sync Info Filter new Fast Sync Info Filter new Sync Info Direction Filter Sync Info INCOMING new Sync Info Direction Filter Sync Info CONFLICTING  FastSyncInfoFilter getSyncInfoFilter OrSyncInfoFilter FastSyncInfoFilter SyncInfoDirectionFilter SyncInfo SyncInfoDirectionFilter SyncInfo
see org eclipse team internal ui actions Subscriber Action get Subscriber Operation org eclipse compare structuremergeviewer I Diff Element protected Synchronize Model Operation get Subscriber Operation I Synchronize Page Configuration configuration I Diff Element elements return new Merge Update Operation configuration elements prompt Before Update  SubscriberAction getSubscriberOperation IDiffElement SynchronizeModelOperation getSubscriberOperation ISynchronizePageConfiguration IDiffElement MergeUpdateOperation promptBeforeUpdate
public void set Prompt Before Update boolean prompt prompt Before Update prompt  setPromptBeforeUpdate promptBeforeUpdate

Subscriber current Subcriber null protected Merge Update Operation I Synchronize Page Configuration configuration I Diff Element elements boolean prompt Before Update super configuration elements prompt Before Update  currentSubcriber MergeUpdateOperation ISynchronizePageConfiguration IDiffElement promptBeforeUpdate promptBeforeUpdate
see org eclipse team internal ccvs ui subscriber CVS Subscriber Action get Job Name org eclipse team ui sync Sync Info Set protected String get Job Name Sync Info Set sync Set get Sync Info Set return Policy bind Merge Update Action job Name new Integer sync Set size to String NON NLS 1  CVSSubscriberAction getJobName SyncInfoSet getJobName SyncInfoSet syncSet getSyncInfoSet MergeUpdateAction jobName syncSet toString
see org eclipse team internal ccvs ui subscriber Safe Update Operation get Overwrite Local Changes protected boolean get Overwrite Local Changes return true  SafeUpdateOperation getOverwriteLocalChanges getOverwriteLocalChanges
protected void updated I Resource resources throws Team Exception Mark all succesfully updated resources as merged if resources length 0 current Subcriber null CVS Merge Subscriber current Subcriber merged resources  IResource TeamException currentSubcriber CVSMergeSubscriber currentSubcriber
protected void run Update Deletions Sync Info nodes I Progress Monitor monitor throws Team Exception When merging update deletions become outgoing deletions so just delete the files locally without unmanaging so the sync info is kept to indicate an outgoing deletion try monitor begin Task null 100 nodes length for int i 0 i nodes length i I Resource resource nodes i get Local if resource get Type I Resource FILE I File resource delete false force true keep local history Policy sub Monitor For monitor 100 catch Core Exception e throw CVS Exception wrap Exception e finally monitor done  runUpdateDeletions SyncInfo IProgressMonitor TeamException beginTask IResource getLocal getType IResource IFile subMonitorFor CoreException CVSException wrapException
protected void run Safe Update Sync Info nodes I Progress Monitor monitor throws Team Exception if nodes length 0 set Subscriber nodes 0 CVS Tag start Tag CVS Merge Subscriber current Subcriber get Start Tag CVS Tag end Tag CVS Merge Subscriber current Subcriber get End Tag Incoming additions require different handling then incoming changes and deletions List additions new Array List List changes new Array List for int i 0 i nodes length i Sync Info resource nodes i int kind resource get Kind if kind Sync Info CHANGE MASK Sync Info ADDITION additions add resource else changes add resource try monitor begin Task null additions size changes size 100 if additions is Empty safe Update getI Resources From Sync Info additions to Array new Sync Info additions size new Command Local Option Command DO NOT RECURSE Command make Argument Option Update JOIN end Tag get Name Policy sub Monitor For monitor additions size 100 if changes is Empty safe Update getI Resources From Sync Info changes to Array new Sync Info changes size new Command Local Option Command DO NOT RECURSE Command make Argument Option Update JOIN start Tag get Name Command make Argument Option Update JOIN end Tag get Name Policy sub Monitor For monitor changes size 100 finally monitor done  runSafeUpdate SyncInfo IProgressMonitor TeamException setSubscriber CVSTag startTag CVSMergeSubscriber currentSubcriber getStartTag CVSTag endTag CVSMergeSubscriber currentSubcriber getEndTag ArrayList ArrayList SyncInfo getKind SyncInfo CHANGE_MASK SyncInfo beginTask isEmpty safeUpdate getIResourcesFrom SyncInfo toArray SyncInfo LocalOption DO_NOT_RECURSE makeArgumentOption endTag getName subMonitorFor isEmpty safeUpdate getIResourcesFrom SyncInfo toArray SyncInfo LocalOption DO_NOT_RECURSE makeArgumentOption startTag getName makeArgumentOption endTag getName subMonitorFor
param nodes throws CVS Exception private void set Subscriber Sync Info node throws CVS Exception Assumption that all nodes are from the same subscriber current Subcriber CVS Sync Info node get Subscriber if current Subcriber instanceof CVS Merge Subscriber throw new CVS Exception Policy bind Merge Update Action invalid Subscriber current Subcriber to String NON NLS 1  CVSException setSubscriber SyncInfo CVSException currentSubcriber CVSSyncInfo getSubscriber currentSubcriber CVSMergeSubscriber CVSException MergeUpdateAction invalidSubscriber currentSubcriber toString
protected void overwrite Update Sync Info Set set I Progress Monitor monitor throws Team Exception Sync Info nodes set get Sync Infos if nodes length 0 return set Subscriber nodes 0 monitor begin Task null 1000 nodes length try for int i 0 i nodes length i make Remote Local nodes i Policy sub Monitor For monitor 1000 finally monitor done  overwriteUpdate SyncInfoSet IProgressMonitor TeamException SyncInfo getSyncInfos setSubscriber beginTask makeRemoteLocal subMonitorFor

public class Override And Commit Action extends CVS Participant Action public Override And Commit Action I Synchronize Page Configuration configuration super configuration  OverrideAndCommitAction CVSParticipantAction OverrideAndCommitAction ISynchronizePageConfiguration
see org eclipse team internal ui actions Subscriber Action get Sync Info Filter protected Fast Sync Info Filter get Sync Info Filter return new Sync Info Direction Filter new int Sync Info CONFLICTING Sync Info INCOMING  SubscriberAction getSyncInfoFilter FastSyncInfoFilter getSyncInfoFilter SyncInfoDirectionFilter SyncInfo SyncInfo
see org eclipse team internal ui actions Subscriber Action get Subscriber Operation org eclipse compare structuremergeviewer I Diff Element protected Synchronize Model Operation get Subscriber Operation I Synchronize Page Configuration configuration I Diff Element elements return new Workspace Commit Operation configuration elements true override  SubscriberAction getSubscriberOperation IDiffElement SynchronizeModelOperation getSubscriberOperation ISynchronizePageConfiguration IDiffElement WorkspaceCommitOperation

public class Override And Update Action extends CVS Participant Action public Override And Update Action I Synchronize Page Configuration configuration super configuration  OverrideAndUpdateAction CVSParticipantAction OverrideAndUpdateAction ISynchronizePageConfiguration
see org eclipse team ui sync Subscriber Action get Sync Info Filter protected Fast Sync Info Filter get Sync Info Filter return new Sync Info Direction Filter new int Sync Info CONFLICTING Sync Info OUTGOING  SubscriberAction getSyncInfoFilter FastSyncInfoFilter getSyncInfoFilter SyncInfoDirectionFilter SyncInfo SyncInfo
protected Synchronize Model Operation get Subscriber Operation I Synchronize Page Configuration configuration I Diff Element elements return new Override And Update Subscriber Operation configuration elements  SynchronizeModelOperation getSubscriberOperation ISynchronizePageConfiguration IDiffElement OverrideAndUpdateSubscriberOperation

public class Override And Update Subscriber Operation extends CVS Subscriber Operation protected Override And Update Subscriber Operation I Synchronize Page Configuration configuration I Diff Element elements super configuration elements  OverrideAndUpdateSubscriberOperation CVSSubscriberOperation OverrideAndUpdateSubscriberOperation ISynchronizePageConfiguration IDiffElement
see org eclipse team ui Team Operation should Run public boolean should Run Sync Info Set sync Set get Sync Info Set return prompt For Overwrite sync Set  TeamOperation shouldRun shouldRun SyncInfoSet syncSet getSyncInfoSet promptForOverwrite syncSet
protected void run Sync Info Set set I Progress Monitor monitor throws Team Exception try Sync Info conflicts set get Nodes get Conflicting Addition Filter List conflicting Resources new Array List for int i 0 i conflicts length i Sync Info info conflicts i conflicting Resources add info get Local new Override And Update Operation get Part set get Resources I Resource conflicting Resources to Array new I Resource conflicting Resources size null tag false recurse run monitor catch Invocation Target Exception e throw CVS Exception wrap Exception e catch Interrupted Exception e Policy cancel Operation  SyncInfoSet IProgressMonitor TeamException SyncInfo getNodes getConflictingAdditionFilter conflictingResources ArrayList SyncInfo conflictingResources getLocal OverrideAndUpdateOperation getPart getResources IResource conflictingResources toArray IResource conflictingResources InvocationTargetException CVSException wrapException InterruptedException cancelOperation
private Fast Sync Info Filter get Conflicting Addition Filter return new Fast Sync Info Filter And Sync Info Filter new Fast Sync Info Filter new Fast Sync Info Filter Sync Info Direction Filter new int Sync Info CONFLICTING new Fast Sync Info Filter Sync Info Change Type Filter new int Sync Info ADDITION  FastSyncInfoFilter getConflictingAdditionFilter FastSyncInfoFilter AndSyncInfoFilter FastSyncInfoFilter FastSyncInfoFilter SyncInfoDirectionFilter SyncInfo FastSyncInfoFilter SyncInfoChangeTypeFilter SyncInfo
see org eclipse team internal ccvs ui subscriber CVS Subscriber Action get Job Name org eclipse team ui sync Sync Info Set protected String get Job Name Sync Info Set sync Set get Sync Info Set return Policy bind Update Action job Name new Integer sync Set size to String NON NLS 1  CVSSubscriberAction getJobName SyncInfoSet getJobName SyncInfoSet syncSet getSyncInfoSet UpdateAction jobName syncSet toString

public class Refresh Dirty State Action extends CVS Participant Action public Refresh Dirty State Action I Synchronize Page Configuration configuration super configuration  RefreshDirtyStateAction CVSParticipantAction RefreshDirtyStateAction ISynchronizePageConfiguration
protected Fast Sync Info Filter get Sync Info Filter Only interested in outgoing changes return new And Sync Info Filter new Fast Sync Info Filter new Sync Info Direction Filter new int Sync Info OUTGOING Sync Info CONFLICTING new Sync Info Change Type Filter Sync Info CHANGE  FastSyncInfoFilter getSyncInfoFilter AndSyncInfoFilter FastSyncInfoFilter SyncInfoDirectionFilter SyncInfo SyncInfo SyncInfoChangeTypeFilter SyncInfo
see org eclipse team ui synchronize Synchronize Model Action get Subscriber Operation org eclipse ui I Workbench Part org eclipse compare structuremergeviewer I Diff Element protected Synchronize Model Operation get Subscriber Operation I Synchronize Page Configuration configuration I Diff Element elements return new Refresh Dirty State Operation configuration elements  SynchronizeModelAction getSubscriberOperation IWorkbenchPart IDiffElement SynchronizeModelOperation getSubscriberOperation ISynchronizePageConfiguration IDiffElement RefreshDirtyStateOperation

public class Refresh Dirty State Operation extends CVS Subscriber Operation protected Refresh Dirty State Operation I Synchronize Page Configuration configuration I Diff Element elements super configuration elements  RefreshDirtyStateOperation CVSSubscriberOperation RefreshDirtyStateOperation ISynchronizePageConfiguration IDiffElement
folder run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception monitor begin Task null infos length 100 for int i 0 i infos length i Sync Info info infos i I Resource resource info get Local if resource get Type I Resource FILE if comparator compare Contents I File resource info get Base Policy sub Monitor For monitor 100 ICVS File cvs File CVS Workspace Root getCVS File For I File resource cvs File checked In null monitor done  ICVSRunnable IProgressMonitor CVSException beginTask SyncInfo IResource getLocal getType IResource compareContents IFile getBase subMonitorFor ICVSFile cvsFile CVSWorkspaceRoot getCVSFileFor IFile cvsFile checkedIn
protected void run Sync Info Set set I Progress Monitor monitor throws Team Exception final Content Comparison Sync Info Filter comparator new Sync Info Filter Content Comparison Sync Info Filter false final Sync Info infos set get Sync Infos if infos length 0 return I Project project infos 0 get Local get Project ICVS Folder folder CVS Workspace Root getCVS Folder For project folder run new ICVS Runnable public void run I Progress Monitor monitor throws CVS Exception monitor begin Task null infos length 100 for int i 0 i infos length i Sync Info info infos i I Resource resource info get Local if resource get Type I Resource FILE if comparator compare Contents I File resource info get Base Policy sub Monitor For monitor 100 ICVS File cvs File CVS Workspace Root getCVS File For I File resource cvs File checked In null monitor done monitor  SyncInfoSet IProgressMonitor TeamException ContentComparisonSyncInfoFilter SyncInfoFilter ContentComparisonSyncInfoFilter SyncInfo getSyncInfos IProject getLocal getProject ICVSFolder CVSWorkspaceRoot getCVSFolderFor ICVSRunnable IProgressMonitor CVSException beginTask SyncInfo IResource getLocal getType IResource compareContents IFile getBase subMonitorFor ICVSFile cvsFile CVSWorkspaceRoot getCVSFileFor IFile cvsFile checkedIn
protected String get Error Title return Policy bind Refresh Dirty State Operation 0 NON NLS 1  getErrorTitle RefreshDirtyStateOperation
see org eclipse team internal ccvs ui subscriber CVS Subscriber Action get Job Name org eclipse team ui sync Sync Info Set protected String get Job Name return Policy bind Refresh Dirty State Operation 1 NON NLS 1  CVSSubscriberAction getJobName SyncInfoSet getJobName RefreshDirtyStateOperation

private Sync Info Set skipped new Sync Info Set protected Safe Update Operation I Synchronize Page Configuration configuration I Diff Element elements boolean prompt Before Update super configuration elements this prompt Before Update prompt Before Update  SyncInfoSet SyncInfoSet SafeUpdateOperation ISynchronizePageConfiguration IDiffElement promptBeforeUpdate promptBeforeUpdate promptBeforeUpdate
see org eclipse team ui Team Operation should Run public boolean should Run return prompt If Needed  TeamOperation shouldRun shouldRun promptIfNeeded
public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception skipped clear super run monitor try handle Failed Updates monitor catch Team Exception e throw new Invocation Target Exception e  IProgressMonitor InvocationTargetException InterruptedException handleFailedUpdates TeamException InvocationTargetException
Remove all failed conflicts from the original sync set sync Set reject Nodes new Fast Sync Info Filter public boolean select Sync Info info return skipped get Sync Info info get Local null  syncSet rejectNodes FastSyncInfoFilter SyncInfo getSyncInfo getLocal
public void run Sync Info Set sync Set I Progress Monitor monitor throws Team Exception try monitor begin Task null 100 Remove the cases that are known to fail adding them to skipped list remove Known Failure Cases sync Set Run the update on the remaining nodes in the set The update will fail for conflicts that turn out to be non automergable safe Update sync Set Policy sub Monitor For monitor 100 Remove all failed conflicts from the original sync set sync Set reject Nodes new Fast Sync Info Filter public boolean select Sync Info info return skipped get Sync Info info get Local null Signal for the ones that were updated updated sync Set get Resources finally monitor done  SyncInfoSet syncSet IProgressMonitor TeamException beginTask removeKnownFailureCases syncSet safeUpdate syncSet subMonitorFor syncSet rejectNodes FastSyncInfoFilter SyncInfo getSyncInfo getLocal syncSet getResources
param sync Set return private Sync Info Set remove Known Failure Cases Sync Info Set sync Set First remove any known failure cases Fast Sync Info Filter fail Filter get Known Failure Cases Sync Info will Fail sync Set get Nodes fail Filter sync Set reject Nodes fail Filter for int i 0 i will Fail length i Sync Info info will Fail i skipped add info return sync Set  syncSet SyncInfoSet removeKnownFailureCases SyncInfoSet syncSet FastSyncInfoFilter failFilter getKnownFailureCases SyncInfo willFail syncSet getNodes failFilter syncSet rejectNodes failFilter willFail SyncInfo willFail syncSet
private void handle Failed Updates I Progress Monitor monitor throws Team Exception Handle conflicting files that can t be merged ask the user what should be done if skipped is Empty if get Overwrite Local Changes Ask the user if a replace should be performed on the remaining nodes if prompt For Overwrite skipped overwrite Update skipped monitor if skipped is Empty updated skipped get Resources else Warn the user that some nodes could not be updated This can happen if there are files with conflicts that are not auto mergeable warn About Failed Resources skipped  handleFailedUpdates IProgressMonitor TeamException isEmpty getOverwriteLocalChanges promptForOverwrite overwriteUpdate isEmpty getResources warnAboutFailedResources
protected boolean get Overwrite Local Changes return false  getOverwriteLocalChanges
Perform a safe update on the resources in the provided set Any included resources that cannot be updated safely wil be added to the skipped Files list param sync Set the set containing the resources to be updated param monitor protected void safe Update Sync Info Set sync Set I Progress Monitor monitor throws Team Exception Sync Info changed sync Set get Sync Infos if changed length 0 return The list of sync resources to be updated using cvs update List update Shallow new Array List A list of sync resource folders which need to be created locally incoming addition or previously pruned Set parent Creation Elements new Hash Set A list of sync resources that are incoming deletions We do these first to avoid case conflicts List update Deletions new Array List for int i 0 i changed length i Sync Info changed Node changed i Make sure that parent folders exist Sync Info parent get Parent changed Node if parent null is Out Of Sync parent We need to ensure that parents that are either incoming folder additions or previously pruned folders are recreated parent Creation Elements add parent I Resource resource changed Node get Local int kind changed Node get Kind boolean will Be Attempted false if resource get Type I Resource FILE Not all change types will require a cvs update Some can be deleted locally without performing an update switch kind Sync Info DIRECTION MASK case Sync Info INCOMING switch kind Sync Info CHANGE MASK case Sync Info DELETION Incoming deletions can just be deleted instead of updated update Deletions add changed Node will Be Attempted true break default add the file to the list of files to be updated update Shallow add changed Node will Be Attempted true break break case Sync Info CONFLICTING switch kind Sync Info CHANGE MASK case Sync Info CHANGE add the file to the list of files to be updated update Shallow add changed Node will Be Attempted true break break if will Be Attempted skipped add sync Set get Sync Info resource else Special handling for folders to support shallow operations on files i e folder operations are performed using the sync info already contained in the sync info if is Out Of Sync changed Node parent Creation Elements add changed Node try monitor begin Task null 100 if parent Creation Elements size 0 make In Sync Sync Info parent Creation Elements to Array new Sync Info parent Creation Elements size Policy sub Monitor For monitor 25 if update Deletions size 0 run Update Deletions Sync Info update Deletions to Array new Sync Info update Deletions size Policy sub Monitor For monitor 25 if update Shallow size 0 run Safe Update Sync Info update Shallow to Array new Sync Info update Shallow size Policy sub Monitor For monitor 50 finally monitor done return  skippedFiles syncSet safeUpdate SyncInfoSet syncSet IProgressMonitor TeamException SyncInfo syncSet getSyncInfos updateShallow ArrayList parentCreationElements HashSet updateDeletions ArrayList SyncInfo changedNode SyncInfo getParent changedNode isOutOfSync parentCreationElements IResource changedNode getLocal changedNode getKind willBeAttempted getType IResource SyncInfo DIRECTION_MASK SyncInfo SyncInfo CHANGE_MASK SyncInfo updateDeletions changedNode willBeAttempted updateShallow changedNode willBeAttempted SyncInfo SyncInfo CHANGE_MASK SyncInfo updateShallow changedNode willBeAttempted willBeAttempted syncSet getSyncInfo isOutOfSync changedNode parentCreationElements changedNode beginTask parentCreationElements makeInSync SyncInfo parentCreationElements toArray SyncInfo parentCreationElements subMonitorFor updateDeletions runUpdateDeletions SyncInfo updateDeletions toArray SyncInfo updateDeletions subMonitorFor updateShallow runSafeUpdate SyncInfo updateShallow toArray SyncInfo updateShallow subMonitorFor
Perform an overwrite unsafe update on the resources in the provided set The passed sync set may containe resources from multiple projects and it cannot be assumed that any scheduling rule is held when this method is invoked param sync Set the set containing the resources to be updated param monitor  syncSet
Fast Sync Info Filter get Direction And Change Filter Sync Info CONFLICTING Sync Info ADDITION new Fast Sync Info Filter public boolean select Sync Info info return info get Local get Type I Resource FILE  FastSyncInfoFilter getDirectionAndChangeFilter SyncInfo SyncInfo FastSyncInfoFilter SyncInfo getLocal getType IResource
new Fast Sync Info Filter public boolean select Sync Info info if info get Local get Type I Resource FILE try ICVS File cvs File CVS Workspace Root getCVS File For I File info get Local byte sync Bytes cvs File get Sync Bytes return sync Bytes null Resource Sync Info is Addition sync Bytes catch CVS Exception e CVSUI Plugin log e Fall though and try to update return false  FastSyncInfoFilter SyncInfo getLocal getType IResource ICVSFile cvsFile CVSWorkspaceRoot getCVSFileFor IFile getLocal syncBytes cvsFile getSyncBytes syncBytes ResourceSyncInfo isAddition syncBytes CVSException CVSUIPlugin
new Fast Sync Info Filter public boolean select Sync Info info I Resource Variant remote info get Remote I Resource Variant base info get Base if info get Local exists local base and no remote will fail return base null remote null else no local and base remote return base null remote null base equals remote  FastSyncInfoFilter SyncInfo IResourceVariant getRemote IResourceVariant getBase getLocal
new Fast Sync Info Filter public boolean select Sync Info info I Resource local info get Local if local get Type I Resource FILE try ICVS File file CVS Workspace Root getCVS File For I File local byte sync Bytes file get Sync Bytes if sync Bytes null return Resource Sync Info is Binary sync Bytes catch CVS Exception e There was an error obtaining or interpreting the sync bytes Log it and skip the file CVS Provider Plugin log e return true return false  FastSyncInfoFilter SyncInfo IResource getLocal getType IResource ICVSFile CVSWorkspaceRoot getCVSFileFor IFile syncBytes getSyncBytes syncBytes ResourceSyncInfo isBinary syncBytes CVSException CVSProviderPlugin
protected Fast Sync Info Filter get Known Failure Cases return new Or Sync Info Filter new Fast Sync Info Filter Conflicting additions of files will fail new And Sync Info Filter new Fast Sync Info Filter Fast Sync Info Filter get Direction And Change Filter Sync Info CONFLICTING Sync Info ADDITION new Fast Sync Info Filter public boolean select Sync Info info return info get Local get Type I Resource FILE Conflicting changes of files will fail if the local is not managed or is an addition new And Sync Info Filter new Fast Sync Info Filter Fast Sync Info Filter get Direction And Change Filter Sync Info CONFLICTING Sync Info CHANGE new Fast Sync Info Filter public boolean select Sync Info info if info get Local get Type I Resource FILE try ICVS File cvs File CVS Workspace Root getCVS File For I File info get Local byte sync Bytes cvs File get Sync Bytes return sync Bytes null Resource Sync Info is Addition sync Bytes catch CVS Exception e CVSUI Plugin log e Fall though and try to update return false Conflicting changes involving a deletion on one side will aways fail new And Sync Info Filter new Fast Sync Info Filter Fast Sync Info Filter get Direction And Change Filter Sync Info CONFLICTING Sync Info CHANGE new Fast Sync Info Filter public boolean select Sync Info info I Resource Variant remote info get Remote I Resource Variant base info get Base if info get Local exists local base and no remote will fail return base null remote null else no local and base remote return base null remote null base equals remote Conflicts where the file type is binary will work but are not merged so they should be skipped new And Sync Info Filter new Fast Sync Info Filter Fast Sync Info Filter get Direction And Change Filter Sync Info CONFLICTING Sync Info CHANGE new Fast Sync Info Filter public boolean select Sync Info info I Resource local info get Local if local get Type I Resource FILE try ICVS File file CVS Workspace Root getCVS File For I File local byte sync Bytes file get Sync Bytes if sync Bytes null return Resource Sync Info is Binary sync Bytes catch CVS Exception e There was an error obtaining or interpreting the sync bytes Log it and skip the file CVS Provider Plugin log e return true return false Outgoing changes may not fail but they are skipped as well new Sync Info Direction Filter Sync Info OUTGOING  FastSyncInfoFilter getKnownFailureCases OrSyncInfoFilter FastSyncInfoFilter AndSyncInfoFilter FastSyncInfoFilter FastSyncInfoFilter getDirectionAndChangeFilter SyncInfo SyncInfo FastSyncInfoFilter SyncInfo getLocal getType IResource AndSyncInfoFilter FastSyncInfoFilter FastSyncInfoFilter getDirectionAndChangeFilter SyncInfo SyncInfo FastSyncInfoFilter SyncInfo getLocal getType IResource ICVSFile cvsFile CVSWorkspaceRoot getCVSFileFor IFile getLocal syncBytes cvsFile getSyncBytes syncBytes ResourceSyncInfo isAddition syncBytes CVSException CVSUIPlugin AndSyncInfoFilter FastSyncInfoFilter FastSyncInfoFilter getDirectionAndChangeFilter SyncInfo SyncInfo FastSyncInfoFilter SyncInfo IResourceVariant getRemote IResourceVariant getBase getLocal AndSyncInfoFilter FastSyncInfoFilter FastSyncInfoFilter getDirectionAndChangeFilter SyncInfo SyncInfo FastSyncInfoFilter SyncInfo IResource getLocal getType IResource ICVSFile CVSWorkspaceRoot getCVSFileFor IFile syncBytes getSyncBytes syncBytes ResourceSyncInfo isBinary syncBytes CVSException CVSProviderPlugin SyncInfoDirectionFilter SyncInfo
TeamUI Plugin get Standard Display sync Exec new Runnable public void run Message Dialog open Information get Shell Policy bind Safe Update Action warn Files With Conflicts Title NON NLS 1 Policy bind Safe Update Action warn Files With Conflicts Description NON NLS 1  TeamUIPlugin getStandardDisplay syncExec MessageDialog openInformation getShell SafeUpdateAction warnFilesWithConflictsTitle SafeUpdateAction warnFilesWithConflictsDescription
Warn user that some files could not be updated Note This method is designed to be overridden by test cases protected void warn About Failed Resources final Sync Info Set sync Set TeamUI Plugin get Standard Display sync Exec new Runnable public void run Message Dialog open Information get Shell Policy bind Safe Update Action warn Files With Conflicts Title NON NLS 1 Policy bind Safe Update Action warn Files With Conflicts Description NON NLS 1  warnAboutFailedResources SyncInfoSet syncSet TeamUIPlugin getStandardDisplay syncExec MessageDialog openInformation getShell SafeUpdateAction warnFilesWithConflictsTitle SafeUpdateAction warnFilesWithConflictsDescription
This method is invoked for all resources in the sync set that are incoming deletions It is done separately to allow deletions to be performed before additions that may be the same name with different letter case param nodes the Sync Info nodes that are incoming deletions param monitor throws Team Exception  SyncInfo TeamException
This method is invoked for all resources in the sync set that are incoming changes but not deletions see run Update Deletions or conflicting changes This method should only update those conflicting resources that are automergable param nodes the incoming or conflicting Sync Info nodes param monitor throws Team Exception  runUpdateDeletions SyncInfo TeamException
protected void safe Update I Resource resources Local Option local Options I Progress Monitor monitor throws Team Exception try Update Only Mergable Operation operation new Update Only Mergable Operation get Part resources local Options operation run monitor add Skipped Files operation get Skipped Files catch Invocation Target Exception e throw CVS Exception wrap Exception e catch Interrupted Exception e Policy cancel Operation  safeUpdate IResource LocalOption localOptions IProgressMonitor TeamException UpdateOnlyMergableOperation UpdateOnlyMergableOperation getPart localOptions addSkippedFiles getSkippedFiles InvocationTargetException CVSException wrapException InterruptedException cancelOperation
Notification of all resource that were updated either safely or othrwise protected abstract void updated I Resource resources throws Team Exception  IResource TeamException
private void add Skipped Files I File files Sync Info Set set get Sync Info Set for int i 0 i files length i I File file files i skipped add set get Sync Info file  addSkippedFiles IFile SyncInfoSet getSyncInfoSet IFile getSyncInfo
protected String get Error Title return Policy bind Update Action update NON NLS 1  getErrorTitle UpdateAction
see org eclipse team internal ccvs ui subscriber CVS Subscriber Action get Job Name org eclipse team ui sync Sync Info Set protected String get Job Name Sync Info Set sync Set get Sync Info Set return Policy bind Update Action job Name new Integer sync Set size to String NON NLS 1  CVSSubscriberAction getJobName SyncInfoSet getJobName SyncInfoSet syncSet getSyncInfoSet UpdateAction jobName syncSet toString
TeamUI Plugin get Standard Display sync Exec new Runnable public void run String size String Integer to String set size String message set size 1 Policy bind Update Action prompt For Update Several size String Policy bind Update Action prompt For Update One size String NON NLS 1 NON NLS 2 result 0 Message Dialog open Question get Shell Policy bind Update Action prompt For Update Title size String message NON NLS 1  TeamUIPlugin getStandardDisplay syncExec sizeString toString UpdateAction promptForUpdateSeveral sizeString UpdateAction promptForUpdateOne sizeString MessageDialog openQuestion getShell UpdateAction promptForUpdateTitle sizeString
Confirm with the user what we are going to be doing By default the update action doesn t prompt because the user has usually selected resources first But in some cases for example when performing a toolbar action a confirmation prompt is nice param set the resources to be updated return code true code if the update operation can continue and code false code if the update has been cancelled by the user private boolean prompt If Needed final Sync Info Set set get Sync Info Set final boolean result new boolean true if get Prompt Before Update TeamUI Plugin get Standard Display sync Exec new Runnable public void run String size String Integer to String set size String message set size 1 Policy bind Update Action prompt For Update Several size String Policy bind Update Action prompt For Update One size String NON NLS 1 NON NLS 2 result 0 Message Dialog open Question get Shell Policy bind Update Action prompt For Update Title size String message NON NLS 1 return result 0  promptIfNeeded SyncInfoSet getSyncInfoSet getPromptBeforeUpdate TeamUIPlugin getStandardDisplay syncExec sizeString toString UpdateAction promptForUpdateSeveral sizeString UpdateAction promptForUpdateOne sizeString MessageDialog openQuestion getShell UpdateAction promptForUpdateTitle sizeString
public void set Prompt Before Update boolean prompt this prompt Before Update prompt  setPromptBeforeUpdate promptBeforeUpdate
public boolean get Prompt Before Update return prompt Before Update  getPromptBeforeUpdate promptBeforeUpdate

param parent Shell param dialog Title public Sync Info Set Details Dialog Shell parent Shell String dialog Title String details Title Sync Info Set sync Set super parent Shell dialog Title this sync Set sync Set this details Title details Title  parentShell dialogTitle SyncInfoSetDetailsDialog parentShell dialogTitle detailsTitle SyncInfoSet syncSet parentShell dialogTitle syncSet syncSet detailsTitle detailsTitle
protected Composite create Drop Down Dialog Area Composite parent Composite composite create Composite parent add Resources Area composite TODO set F1 help Workbench Help set Help composite I Help Context Ids ADD TO VERSION CONTROL DIALOG return composite  createDropDownDialogArea createComposite addResourcesArea WorkbenchHelp setHelp IHelpContextIds ADD_TO_VERSION_CONTROL_DIALOG
list Viewer set Label Provider new Workbench Label Provider protected String decorate Text String input Object element if element instanceof I Resource return I Resource element get Full Path to String else return input  listViewer setLabelProvider WorkbenchLabelProvider decorateText IResource IResource getFullPath toString
set Viewer Input list Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event selected Resources list Viewer get Checked Elements  setViewerInput listViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent selectedResources listViewer getCheckedElements
param composite private void add Resources Area Composite composite create Wrapping Label composite details Title add the selectable checkbox list list Viewer Checkbox Table Viewer new Check List composite SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data height Hint SELECTION HEIGHT HINT data width Hint WIDTH HINT list Viewer get Table set Layout Data data set the contents of the list list Viewer set Label Provider new Workbench Label Provider protected String decorate Text String input Object element if element instanceof I Resource return I Resource element get Full Path to String else return input list Viewer set Content Provider new Workbench Content Provider set Viewer Input list Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event selected Resources list Viewer get Checked Elements add Selection Buttons composite  addResourcesArea createWrappingLabel detailsTitle listViewer CheckboxTableViewer newCheckList GridData GridData GridData FILL_BOTH heightHint SELECTION_HEIGHT_HINT widthHint WIDTH_HINT listViewer getTable setLayoutData listViewer setLabelProvider WorkbenchLabelProvider decorateText IResource IResource getFullPath toString listViewer setContentProvider WorkbenchContentProvider setViewerInput listViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent selectedResources listViewer getCheckedElements addSelectionButtons
Button select Button create Button button Composite I Dialog Constants SELECT ALL ID Policy bind Release Comment Dialog select All false NON NLS 1 Selection Listener listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked true selected Resources null  selectButton createButton buttonComposite IDialogConstants SELECT_ALL_ID ReleaseCommentDialog selectAll SelectionListener SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked selectedResources
listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked false selected Resources new Object 0  SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked selectedResources
Add the selection and deselection buttons to the dialog param composite org eclipse swt widgets Composite private void add Selection Buttons Composite composite Composite button Composite new Composite composite SWT RIGHT Grid Layout layout new Grid Layout layout num Columns 2 button Composite set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data GRAB HORIZONTAL data grab Excess Horizontal Space true composite set Data data Button select Button create Button button Composite I Dialog Constants SELECT ALL ID Policy bind Release Comment Dialog select All false NON NLS 1 Selection Listener listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked true selected Resources null select Button add Selection Listener listener Button deselect Button create Button button Composite I Dialog Constants DESELECT ALL ID Policy bind Release Comment Dialog deselect All false NON NLS 1 listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked false selected Resources new Object 0 deselect Button add Selection Listener listener  addSelectionButtons buttonComposite GridLayout GridLayout numColumns buttonComposite setLayout GridData GridData GridData HORIZONTAL_ALIGN_END GridData GRAB_HORIZONTAL grabExcessHorizontalSpace setData selectButton createButton buttonComposite IDialogConstants SELECT_ALL_ID ReleaseCommentDialog selectAll SelectionListener SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked selectedResources selectButton addSelectionListener deselectButton createButton buttonComposite IDialogConstants DESELECT_ALL_ID ReleaseCommentDialog deselectAll SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked selectedResources deselectButton addSelectionListener
protected void set Viewer Input if list Viewer null list Viewer get Control is Disposed return list Viewer set Input new Adaptable Resource List get All Resources if selected Resources null list Viewer set All Checked true else list Viewer set Checked Elements selected Resources  setViewerInput listViewer listViewer getControl isDisposed listViewer setInput AdaptableResourceList getAllResources selectedResources listViewer setAllChecked listViewer setCheckedElements selectedResources
protected void reset Viewer Input selected Resources null set Viewer Input  resetViewerInput selectedResources setViewerInput
Return a list of all the resources that are currently under consideration by the dialog protected I Resource get All Resources return sync Set get Resources  IResource getAllResources syncSet getResources
see org eclipse team internal ui Details Dialog update Enablements protected void update Enablements  DetailsDialog updateEnablements updateEnablements
return public Sync Info Set get Sync Set return sync Set  SyncInfoSet getSyncSet syncSet
protected void button Pressed int id if id I Dialog Constants OK ID filter Sync Set super button Pressed id  buttonPressed IDialogConstants OK_ID filterSyncSet buttonPressed
get Sync Set select Nodes new Fast Sync Info Filter public boolean select Sync Info info I Resource local info get Local for int i 0 i selected Resources length i if local equals selected Resources i return true return false  getSyncSet selectNodes FastSyncInfoFilter SyncInfo IResource getLocal selectedResources selectedResources
protected void filter Sync Set Keep only the checked resources if selected Resources null get Sync Set select Nodes new Fast Sync Info Filter public boolean select Sync Info info I Resource local info get Local for int i 0 i selected Resources length i if local equals selected Resources i return true return false  filterSyncSet selectedResources getSyncSet selectNodes FastSyncInfoFilter SyncInfo IResource getLocal selectedResources selectedResources

public static final int YES I Dialog Constants YES ID public Update Dialog Shell parent Shell Sync Info Set sync Set super parent Shell Policy bind Update Dialog overwrite Title Policy bind Update Dialog overwrite Details Title sync Set NON NLS 1 NON NLS 2  IDialogConstants YES_ID UpdateDialog parentShell SyncInfoSet syncSet parentShell UpdateDialog overwriteTitle UpdateDialog overwriteDetailsTitle syncSet
protected void create Main Dialog Area Composite parent Composite composite new Composite parent SWT NONE composite set Layout new Grid Layout TODO set F1 help Workbench Help set Help composite I Help Context Ids ADD TO VERSION CONTROL DIALOG create Wrapping Label composite Policy bind Update Dialog overwrite Message NON NLS 1  createMainDialogArea setLayout GridLayout WorkbenchHelp setHelp IHelpContextIds ADD_TO_VERSION_CONTROL_DIALOG createWrappingLabel UpdateDialog overwriteMessage
protected void create Buttons For Button Bar Composite parent create Button parent YES I Dialog Constants YES LABEL true create Button parent I Dialog Constants NO ID I Dialog Constants NO LABEL true super create Buttons For Button Bar parent  createButtonsForButtonBar createButton IDialogConstants YES_LABEL createButton IDialogConstants NO_ID IDialogConstants NO_LABEL createButtonsForButtonBar
protected boolean include Ok Button return false  includeOkButton
protected boolean include Cancel Button return false  includeCancelButton
protected void button Pressed int id hijack yes and no buttons to set the correct return codes if id YES id I Dialog Constants NO ID set Return Code id filter Sync Set close else super button Pressed id  buttonPressed IDialogConstants NO_ID setReturnCode filterSyncSet buttonPressed

public class Workspace Commit Action extends CVS Participant Action public Workspace Commit Action I Synchronize Page Configuration configuration super configuration  WorkspaceCommitAction CVSParticipantAction WorkspaceCommitAction ISynchronizePageConfiguration
public Workspace Commit Action I Synchronize Page Configuration configuration I Selection Provider provider String bundle Key super configuration provider bundle Key  WorkspaceCommitAction ISynchronizePageConfiguration ISelectionProvider bundleKey bundleKey
see org eclipse team ui sync Subscriber Action get Sync Info Filter protected Fast Sync Info Filter get Sync Info Filter return new Sync Info Direction Filter new int Sync Info OUTGOING  SubscriberAction getSyncInfoFilter FastSyncInfoFilter getSyncInfoFilter SyncInfoDirectionFilter SyncInfo
see org eclipse team internal ui actions Subscriber Action get Subscriber Operation org eclipse compare structuremergeviewer I Diff Element protected Synchronize Model Operation get Subscriber Operation I Synchronize Page Configuration configuration I Diff Element elements return new Workspace Commit Operation configuration elements false override  SubscriberAction getSubscriberOperation IDiffElement SynchronizeModelOperation getSubscriberOperation ISynchronizePageConfiguration IDiffElement WorkspaceCommitOperation

private boolean override public Workspace Commit Operation I Synchronize Page Configuration configuration I Diff Element elements boolean override super configuration elements this override override  WorkspaceCommitOperation ISynchronizePageConfiguration IDiffElement
see org eclipse team internal ccvs ui subscriber CVS Subscriber Operation get Error Title protected String get Error Title return Policy bind Commit Action commit Failed NON NLS 1  CVSSubscriberOperation getErrorTitle getErrorTitle CommitAction commitFailed
see org eclipse team internal ui actions Team Operation get Job Name protected String get Job Name Sync Info Set sync Set get Sync Info Set return Policy bind Commit Action job Name new Integer sync Set size to String NON NLS 1  TeamOperation getJobName getJobName SyncInfoSet syncSet getSyncInfoSet CommitAction jobName syncSet toString
see org eclipse team ui Team Operation should Run public boolean should Run Sync Info Set set get Sync Info Set return set is Empty  TeamOperation shouldRun shouldRun SyncInfoSet getSyncInfoSet isEmpty
protected Sync Info Set get Sync Info Set if sync Set null sync Set super get Sync Info Set if prompt For Conflict Handling sync Set sync Set clear return sync Set try if prompt For Unadded Handling sync Set sync Set clear return sync Set catch CVS Exception e Utils handle e sync Set clear return sync Set  SyncInfoSet getSyncInfoSet syncSet syncSet getSyncInfoSet promptForConflictHandling syncSet syncSet syncSet promptForUnaddedHandling syncSet syncSet syncSet CVSException syncSet syncSet
protected boolean prompt For Conflict Handling Sync Info Set sync Set if sync Set has Conflicts sync Set has Incoming Changes if override If overriding prompt to ensure that is what the user wants switch prompt For Conflicts sync Set case 0 Yes synchronize conflicts as well break case 1 No stop here return false case 2 default Cancel return false else If there is a conflict in the sync Set remove from sync set sync Set remove Conflicting Nodes sync Set remove Incoming Nodes return true  promptForConflictHandling SyncInfoSet syncSet syncSet hasConflicts syncSet hasIncomingChanges promptForConflicts syncSet syncSet syncSet removeConflictingNodes syncSet removeIncomingNodes
public void run Sync Info Set sync Set I Progress Monitor monitor throws Team Exception final Sync Info changed sync Set get Sync Infos if changed length 0 return A list of files to be committed final List commits new Array List of I Resource New resources that are not yet under CVS control and need a cvs add final List additions new Array List of I Resource A list of incoming or conflicting file changes to be made outgoing changes final List make Outgoing new Array List of Sync Info A list of out of sync folders that must be made in sync final List make In Sync new Array List of Sync Info for int i 0 i changed length i Sync Info changed Node changed i int kind changed Node get Kind I Resource resource changed Node get Local Any parent folders should be made in sync Steps will be taken after the commit to prune any empty folders Sync Info parent get Parent changed Node if parent null if is Out Of Sync parent make In Sync add parent if resource get Type I Resource FILE By default all files are committed commits add resource Determine what other work needs to be done for the file switch kind Sync Info DIRECTION MASK case Sync Info INCOMING Convert the incoming change to an outgoing change make Outgoing add changed Node break case Sync Info OUTGOING switch kind Sync Info CHANGE MASK case Sync Info ADDITION Outgoing addition add it before committing if is Added resource additions add resource break case Sync Info DELETION Outgoing deletion is handled by move delete hook and Eclipse Synchronizer break case Sync Info CHANGE Outgoing change Just commit it break break case Sync Info CONFLICTING Convert the conflicting change to an outgoing change make Outgoing add changed Node break else if kind Sync Info DIRECTION MASK Sync Info OUTGOING kind Sync Info CHANGE MASK Sync Info ADDITION Outgoing folder additions must be added additions add changed Node get Local else if is Out Of Sync changed Node otherwise make any out of sync folders in sync using the remote info make In Sync add changed Node monitor begin Task null 200 if make In Sync size 0 make In Sync Sync Info make In Sync to Array new Sync Info make In Sync size Policy sub Monitor For monitor 25 if make Outgoing size 0 make Outgoing Sync Info make Outgoing to Array new Sync Info make In Sync size Policy sub Monitor For monitor 25 if additions size 0 add I Resource additions to Array new I Resource 0 Policy sub Monitor For monitor 50 commit I Resource commits to Array new I Resource commits size Policy sub Monitor For monitor 100  SyncInfoSet syncSet IProgressMonitor TeamException SyncInfo syncSet getSyncInfos ArrayList IResource ArrayList IResource makeOutgoing ArrayList SyncInfo makeInSync ArrayList SyncInfo SyncInfo changedNode changedNode getKind IResource changedNode getLocal SyncInfo getParent changedNode isOutOfSync makeInSync getType IResource SyncInfo DIRECTION_MASK SyncInfo makeOutgoing changedNode SyncInfo SyncInfo CHANGE_MASK SyncInfo isAdded SyncInfo EclipseSynchronizer SyncInfo SyncInfo makeOutgoing changedNode SyncInfo DIRECTION_MASK SyncInfo SyncInfo CHANGE_MASK SyncInfo changedNode getLocal isOutOfSync changedNode makeInSync changedNode beginTask makeInSync makeInSync SyncInfo makeInSync toArray SyncInfo makeInSync subMonitorFor makeOutgoing makeOutgoing SyncInfo makeOutgoing toArray SyncInfo makeInSync subMonitorFor IResource toArray IResource subMonitorFor IResource toArray IResource subMonitorFor
private void commit I Resource commits I Progress Monitor monitor throws Team Exception try new Commit Operation get Part commits new Command Local Option Commit make Argument Option Command MESSAGE OPTION comment run monitor catch Invocation Target Exception e throw Team Exception as Team Exception e catch Interrupted Exception e throw new Operation Canceled Exception  IResource IProgressMonitor TeamException CommitOperation getPart LocalOption makeArgumentOption MESSAGE_OPTION InvocationTargetException TeamException asTeamException InterruptedException OperationCanceledException
private void add I Resource additions I Progress Monitor monitor throws Team Exception try new Add Operation get Part additions run monitor catch Invocation Target Exception e1 throw Team Exception as Team Exception e1 catch Interrupted Exception e1 throw new Operation Canceled Exception  IResource IProgressMonitor TeamException AddOperation getPart InvocationTargetException TeamException asTeamException InterruptedException OperationCanceledException
final Tool Tip Message Dialog dialog new Tool Tip Message Dialog shell title null question Message Dialog QUESTION buttons tips 0 shell get Display sync Exec new Runnable public void run dialog open  ToolTipMessageDialog ToolTipMessageDialog MessageDialog getDisplay syncExec
Prompts the user to determine how conflicting changes should be handled Note This method is designed to be overridden by test cases return 0 to sync conflicts 1 to sync all non conflicts 2 to cancel protected int prompt For Conflicts Sync Info Set sync Set String buttons new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL String question Policy bind Commit Sync Action question Release NON NLS 1 String title Policy bind Commit Sync Action title Release NON NLS 1 String tips new String Policy bind Commit Sync Action release All NON NLS 1 Policy bind Commit Sync Action release Part NON NLS 1 Policy bind Commit Sync Action cancel Release NON NLS 1 Shell shell get Shell final Tool Tip Message Dialog dialog new Tool Tip Message Dialog shell title null question Message Dialog QUESTION buttons tips 0 shell get Display sync Exec new Runnable public void run dialog open return dialog get Return Code  promptForConflicts SyncInfoSet syncSet IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL CommitSyncAction questionRelease CommitSyncAction titleRelease CommitSyncAction releaseAll CommitSyncAction releasePart CommitSyncAction cancelRelease getShell ToolTipMessageDialog ToolTipMessageDialog MessageDialog getDisplay syncExec getReturnCode
Prompts the user for a release comment Note This method is designed to be overridden by test cases return the comment or null to cancel protected String prompt For Comment Repository Manager manager I Resource resources To Commit return manager prompt For Comment get Shell resources To Commit  promptForComment RepositoryManager IResource resourcesToCommit promptForComment getShell resourcesToCommit
protected I Resource prompt For Resources To Be Added Repository Manager manager I Resource unadded return manager prompt For Resources To Be Added get Shell unadded  IResource promptForResourcesToBeAdded RepositoryManager IResource promptForResourcesToBeAdded getShell
private boolean prompt For Unadded Handling Sync Info Set sync Set throws CVS Exception if sync Set is Empty return false accumulate any resources that are not under version control I Resource unadded get Unadded Resources sync Set prompt to get comment and any resources to be added to version control Repository Manager manager CVSUI Plugin get Plugin get Repository Manager I Resource to Be Added prompt For Resources To Be Added manager unadded if to Be Added null return false User cancelled comment prompt For Comment manager sync Set get Resources if comment null return false User cancelled remove unshared resources that were not selected by the user if unadded null unadded length 0 List resources To Remove new Array List unadded length for int i 0 i unadded length i I Resource unadded Resource unadded i boolean included false for int j 0 j to Be Added length j I Resource resource To Add to Be Added j if unadded Resource equals resource To Add included true break if included resources To Remove add unadded Resource sync Set remove All I Resource resources To Remove to Array new I Resource resources To Remove size return true  promptForUnaddedHandling SyncInfoSet syncSet CVSException syncSet isEmpty IResource getUnaddedResources syncSet RepositoryManager CVSUIPlugin getPlugin getRepositoryManager IResource toBeAdded promptForResourcesToBeAdded toBeAdded promptForComment syncSet getResources resourcesToRemove ArrayList IResource unaddedResource toBeAdded IResource resourceToAdd toBeAdded unaddedResource resourceToAdd resourcesToRemove unaddedResource syncSet removeAll IResource resourcesToRemove toArray IResource resourcesToRemove
private I Resource get Unadded Resources Sync Info Set sync Set throws CVS Exception TODO Should only get outgoing additions since conflicting additions could be considered to be under version control already I Resource resources sync Set get Resources List result new Array List for int i 0 i resources length i I Resource resource resources i if is Added resource result add resource return I Resource result to Array new I Resource result size  IResource getUnaddedResources SyncInfoSet syncSet CVSException IResource syncSet getResources ArrayList IResource isAdded IResource toArray IResource
private boolean is Added I Resource resource throws CVS Exception ICVS Resource cvs Resource CVS Workspace Root getCVS Resource For resource if cvs Resource is Folder return ICVS Folder cvs Resource isCVS Folder else return cvs Resource is Managed  isAdded IResource CVSException ICVSResource cvsResource CVSWorkspaceRoot getCVSResourceFor cvsResource isFolder ICVSFolder cvsResource isCVSFolder cvsResource isManaged

public void initialize I Synchronize Page Configuration configuration super initialize configuration update Toolbar new Workspace Update Action configuration get Visible Roots Selection Provider Workspace Toolbar Update Action NON NLS 1 update Toolbar set Prompt Before Update true append To Group I Synchronize Page Configuration P TOOLBAR MENU TOOLBAR CONTRIBUTION GROUP update Toolbar commit Toolbar new Workspace Commit Action configuration get Visible Roots Selection Provider Workspace Toolbar Commit Action NON NLS 1 append To Group I Synchronize Page Configuration P TOOLBAR MENU TOOLBAR CONTRIBUTION GROUP commit Toolbar append To Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP 1 new Workspace Update Action configuration append To Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP 1 new Workspace Commit Action configuration append To Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP 2 new Override And Update Action configuration append To Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP 2 new Override And Commit Action configuration append To Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP 2 new Confirm Merged Action configuration append To Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP 3 new CVS Action Delegate Wrapper new Ignore Action configuration if configuration get Site is Modal append To Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP 3 new CVS Action Delegate Wrapper new Generate Diff File Action configuration append To Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP 3 new CVS Action Delegate Wrapper new Branch Action configuration append To Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP 3 new CVS Action Delegate Wrapper new Show Annotation Action configuration append To Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP 3 new CVS Action Delegate Wrapper new Show Resource In History Action configuration append To Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP 4 new Refresh Dirty State Action configuration  ISynchronizePageConfiguration updateToolbar WorkspaceUpdateAction getVisibleRootsSelectionProvider WorkspaceToolbarUpdateAction updateToolbar setPromptBeforeUpdate appendToGroup ISynchronizePageConfiguration P_TOOLBAR_MENU TOOLBAR_CONTRIBUTION_GROUP updateToolbar commitToolbar WorkspaceCommitAction getVisibleRootsSelectionProvider WorkspaceToolbarCommitAction appendToGroup ISynchronizePageConfiguration P_TOOLBAR_MENU TOOLBAR_CONTRIBUTION_GROUP commitToolbar appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP_1 WorkspaceUpdateAction appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP_1 WorkspaceCommitAction appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP_2 OverrideAndUpdateAction appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP_2 OverrideAndCommitAction appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP_2 ConfirmMergedAction appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP_3 CVSActionDelegateWrapper IgnoreAction getSite isModal appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP_3 CVSActionDelegateWrapper GenerateDiffFileAction appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP_3 CVSActionDelegateWrapper BranchAction appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP_3 CVSActionDelegateWrapper ShowAnnotationAction appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP_3 CVSActionDelegateWrapper ShowResourceInHistoryAction appendToGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP_4 RefreshDirtyStateAction
No arg contructor used for creation of persisted participant after startup public Workspace Synchronize Participant  WorkspaceSynchronizeParticipant
public Workspace Synchronize Participant I Synchronize Scope scope super scope set Subscriber CVS Provider Plugin get Plugin getCVS Workspace Subscriber  WorkspaceSynchronizeParticipant ISynchronizeScope setSubscriber CVSProviderPlugin getPlugin getCVSWorkspaceSubscriber
see org eclipse team ui synchronize I Synchronize Participant init org eclipse ui I Memento public void init String secondary Id I Memento memento throws Part Init Exception super init secondary Id memento set Subscriber CVS Provider Plugin get Plugin getCVS Workspace Subscriber  ISynchronizeParticipant IMemento secondaryId IMemento PartInitException secondaryId setSubscriber CVSProviderPlugin getPlugin getCVSWorkspaceSubscriber
protected void initialize Configuration I Synchronize Page Configuration configuration super initialize Configuration configuration I Label Decorator label Decorator new CVS Participant Label Decorator configuration configuration add Label Decorator label Decorator configuration add Menu Group I Synchronize Page Configuration P TOOLBAR MENU TOOLBAR CONTRIBUTION GROUP configuration add Action Contribution new Workspace Action Contribution configuration set Supported Modes I Synchronize Page Configuration ALL MODES configuration set Mode I Synchronize Page Configuration BOTH MODE non api use of Synchronize Page Configuration configuration set Property Synchronize Page Configuration P MODEL MANAGER new Change Log Model Manager configuration Add context menu groups here to give the client displaying the page a chance to remove the context menu configuration add Menu Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP 1 configuration add Menu Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP 2 configuration add Menu Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP 3 configuration add Menu Group I Synchronize Page Configuration P CONTEXT MENU CONTEXT MENU CONTRIBUTION GROUP 4  initializeConfiguration ISynchronizePageConfiguration initializeConfiguration ILabelDecorator labelDecorator CVSParticipantLabelDecorator addLabelDecorator labelDecorator addMenuGroup ISynchronizePageConfiguration P_TOOLBAR_MENU TOOLBAR_CONTRIBUTION_GROUP addActionContribution WorkspaceActionContribution setSupportedModes ISynchronizePageConfiguration ALL_MODES setMode ISynchronizePageConfiguration BOTH_MODE SynchronizePageConfiguration setProperty SynchronizePageConfiguration P_MODEL_MANAGER ChangeLogModelManager addMenuGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP_1 addMenuGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP_2 addMenuGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP_3 addMenuGroup ISynchronizePageConfiguration P_CONTEXT_MENU CONTEXT_MENU_CONTRIBUTION_GROUP_4
protected I Synchronize Participant Descriptor get Descriptor return TeamUI get Synchronize Manager get Participant Descriptor ID  ISynchronizeParticipantDescriptor getDescriptor getSynchronizeManager getParticipantDescriptor

private boolean prompt Before Update public Workspace Update Action I Synchronize Page Configuration configuration super configuration  promptBeforeUpdate WorkspaceUpdateAction ISynchronizePageConfiguration
public Workspace Update Action I Synchronize Page Configuration configuration I Selection Provider provider String bundle Key super configuration provider bundle Key  WorkspaceUpdateAction ISynchronizePageConfiguration ISelectionProvider bundleKey bundleKey
see org eclipse team ui sync Subscriber Action get Sync Info Filter protected Fast Sync Info Filter get Sync Info Filter return new Sync Info Direction Filter new int Sync Info INCOMING Sync Info CONFLICTING  SubscriberAction getSyncInfoFilter FastSyncInfoFilter getSyncInfoFilter SyncInfoDirectionFilter SyncInfo SyncInfo
see org eclipse team internal ui actions Subscriber Action get Subscriber Operation org eclipse compare structuremergeviewer I Diff Element protected Synchronize Model Operation get Subscriber Operation I Synchronize Page Configuration configuration I Diff Element elements return new Workspace Update Operation configuration elements prompt Before Update  SubscriberAction getSubscriberOperation IDiffElement SynchronizeModelOperation getSubscriberOperation ISynchronizePageConfiguration IDiffElement WorkspaceUpdateOperation promptBeforeUpdate
public void set Prompt Before Update boolean prompt prompt Before Update prompt  setPromptBeforeUpdate promptBeforeUpdate

public class Workspace Update Operation extends Safe Update Operation protected Workspace Update Operation I Synchronize Page Configuration configuration I Diff Element elements boolean prompt Before Update super configuration elements prompt Before Update  WorkspaceUpdateOperation SafeUpdateOperation WorkspaceUpdateOperation ISynchronizePageConfiguration IDiffElement promptBeforeUpdate promptBeforeUpdate
protected void run Update Deletions Sync Info nodes I Progress Monitor monitor throws Team Exception monitor begin Task null nodes length 100 for int i 0 i nodes length i Sync Info node nodes i unmanage node Policy sub Monitor For monitor 50 delete And Keep History node get Local Policy sub Monitor For monitor 50 prune Empty Parents nodes monitor done  runUpdateDeletions SyncInfo IProgressMonitor TeamException beginTask SyncInfo subMonitorFor deleteAndKeepHistory getLocal subMonitorFor pruneEmptyParents
see org eclipse team internal ccvs ui subscriber Safe Update Operation run Safe Update org eclipse team core synchronize Sync Info org eclipse core runtime I Progress Monitor protected void run Safe Update Sync Info nodes I Progress Monitor monitor throws Team Exception safe Update getI Resources From nodes new Local Option Command DO NOT RECURSE monitor  SafeUpdateOperation runSafeUpdate SyncInfo IProgressMonitor runSafeUpdate SyncInfo IProgressMonitor TeamException safeUpdate getIResourcesFrom LocalOption DO_NOT_RECURSE
protected void overwrite Update Sync Info Set sync Set I Progress Monitor monitor throws Team Exception try new Replace Operation get Part sync Set get Resources null tag false recurse run monitor catch Invocation Target Exception e throw CVS Exception wrap Exception e catch Interrupted Exception e Policy cancel Operation  overwriteUpdate SyncInfoSet syncSet IProgressMonitor TeamException ReplaceOperation getPart syncSet getResources InvocationTargetException CVSException wrapException InterruptedException cancelOperation
see org eclipse team internal ccvs ui subscriber Safe Update Operation updated org eclipse core resources I Resource protected void updated I Resource resources throws Team Exception Do nothing  SafeUpdateOperation IResource IResource TeamException
private void unmanage Sync Info element I Progress Monitor monitor throws CVS Exception CVS Workspace Root getCVS Resource For element get Local unmanage monitor  SyncInfo IProgressMonitor CVSException CVSWorkspaceRoot getCVSResourceFor getLocal
private void delete And Keep History I Resource resource I Progress Monitor monitor throws CVS Exception try if resource exists return if resource get Type I Resource FILE I File resource delete false force true keep history monitor else if resource get Type I Resource FOLDER I Folder resource delete false force true keep history monitor catch Core Exception e throw CVS Exception wrap Exception e  deleteAndKeepHistory IResource IProgressMonitor CVSException getType IResource IFile getType IResource IFolder CoreException CVSException wrapException

Creates a filter selection dialog param parent Shell the parent shell param input the root element to populate this dialog with param content Provider the content provider for navigating the model param label Provider the label provider for displaying model elements param message the message to be displayed at the top of this dialog or code null code to display a default message public Synchronize Projects Dialog Shell parent Shell super parent Shell I Dialog Settings workbench Settings CVSUI Plugin get Plugin get Dialog Settings this settings workbench Settings get Section Synchronize Projects Dialog NON NLS 1 if settings null this settings workbench Settings add New Section Synchronize Projects Dialog NON NLS 1  parentShell contentProvider labelProvider SynchronizeProjectsDialog parentShell parentShell IDialogSettings workbenchSettings CVSUIPlugin getPlugin getDialogSettings workbenchSettings getSection SynchronizeProjectsDialog workbenchSettings addNewSection SynchronizeProjectsDialog
set Working Set working Set working Set Area add Property Change Listener new I Property Change Listener public void property Change Property Change Event event working Set I Working Set event get New Value  setWorkingSet workingSet workingSetArea addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent workingSet IWorkingSet getNewValue
outgoing Changes Button create Checkbox composite Policy bind Synchronize Projects Dialog sync Outgoing Changes NON NLS 1 outgoing Changes Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e sync Outgoing Changes outgoing Changes Button get Selection  outgoingChangesButton createCheckbox SynchronizeProjectsDialog syncOutgoingChanges outgoingChangesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent syncOutgoingChanges outgoingChangesButton getSelection
Overrides method in Dialog see org eclipse jface dialogs Dialog create Dialog Area Composite protected Control create Dialog Area Composite parent page group Composite composite Composite super create Dialog Area parent working Set Area new Working Set Selection Area this Policy bind Synchronize Projects Dialog all Shared Projects Policy bind Synchronize Projects Dialog shared Working Set Projects settings NON NLS 1 NON NLS 2 set Working Set working Set working Set Area add Property Change Listener new I Property Change Listener public void property Change Property Change Event event working Set I Working Set event get New Value working Set Area create Area composite Create the checkbox to enable disable working set use outgoing Changes Button create Checkbox composite Policy bind Synchronize Projects Dialog sync Outgoing Changes NON NLS 1 outgoing Changes Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e sync Outgoing Changes outgoing Changes Button get Selection if settings null sync Outgoing Changes settings get Boolean SYNC OUTGOING CHANGES outgoing Changes Button set Selection sync Outgoing Changes F1 Help Workbench Help set Help composite I Help Context Ids SYNCHRONIZE PROJECTS DIALOG Dialog apply Dialog Font parent return composite  createDialogArea createDialogArea createDialogArea workingSetArea WorkingSetSelectionArea SynchronizeProjectsDialog allSharedProjects SynchronizeProjectsDialog sharedWorkingSetProjects setWorkingSet workingSet workingSetArea addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent workingSet IWorkingSet getNewValue workingSetArea createArea outgoingChangesButton createCheckbox SynchronizeProjectsDialog syncOutgoingChanges outgoingChangesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent syncOutgoingChanges outgoingChangesButton getSelection syncOutgoingChanges getBoolean SYNC_OUTGOING_CHANGES outgoingChangesButton setSelection syncOutgoingChanges WorkbenchHelp setHelp IHelpContextIds SYNCHRONIZE_PROJECTS_DIALOG applyDialogFont
Method declared on Window protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text Policy bind Synchronize Projects Dialog title NON NLS 1  configureShell newShell configureShell newShell newShell setText SynchronizeProjectsDialog
Returns the selected working set or null if none is selected return the selected working set or null if none is selected public I Working Set get Working Set return working Set  IWorkingSet getWorkingSet workingSet
Overrides method in Dialog see org eclipse jface dialogs Dialog ok Pressed protected void ok Pressed working Set working Set Area get Working Set if working Set null working Set Area use Selected Working Set if settings null settings put SYNC OUTGOING CHANGES outgoing Changes Button get Selection super ok Pressed  okPressed okPressed workingSet workingSetArea getWorkingSet workingSet workingSetArea useSelectedWorkingSet SYNC_OUTGOING_CHANGES outgoingChangesButton getSelection okPressed
Sets the working set that should be selected in the most recently used working set list param working Set the working set that should be selected has to exist in the list returned by org eclipse ui I Working Set Manager get Recent Working Sets Must not be null public void set Working Set I Working Set working Set this working Set working Set if working Set Area null working Set Area set Working Set working Set  workingSet IWorkingSetManager getRecentWorkingSets setWorkingSet IWorkingSet workingSet workingSet workingSet workingSetArea workingSetArea setWorkingSet workingSet
protected Button create Checkbox Composite parent String label Button button new Button parent SWT CHECK SWT LEFT button set Text label Grid Data data new Grid Data button set Layout Data data return button  createCheckbox setText GridData GridData setLayoutData
protected Label create Label Composite composite String text Label label new Label composite SWT NONE if text null label set Text text return label  createLabel setText
return boolean public boolean is Sync Outgoing Changes return sync Outgoing Changes  isSyncOutgoingChanges syncOutgoingChanges

private String button Tool Tips Same as the Message Dialog constructor with the addition of a button tooltip argument The number of button tool tips must match the number of button labels public Tool Tip Message Dialog Shell parent Shell String dialog Title Image dialog Title Image String dialog Message int dialog Image Type String dialog Button Labels String button Tool Tips int default Index super parent Shell dialog Title dialog Title Image dialog Message dialog Image Type dialog Button Labels default Index this button Tool Tips button Tool Tips  buttonToolTips MessageDialog ToolTipMessageDialog parentShell dialogTitle dialogTitleImage dialogMessage dialogImageType dialogButtonLabels buttonToolTips defaultIndex parentShell dialogTitle dialogTitleImage dialogMessage dialogImageType dialogButtonLabels defaultIndex buttonToolTips buttonToolTips
Method declared on Message Dialog protected void create Buttons For Button Bar Composite parent super create Buttons For Button Bar parent if button Tool Tips null for int i 0 i button Tool Tips length i get Button i set Tool Tip Text button Tool Tips i  MessageDialog createButtonsForButtonBar createButtonsForButtonBar buttonToolTips buttonToolTips getButton setToolTipText buttonToolTips

public Tag As Version Dialog Shell parent Shell String title I Tag Operation operation super parent Shell title this folder get First Folder operation getCVS Resources this operation operation  TagAsVersionDialog parentShell ITagOperation parentShell getFirstFolder getCVSResources
private ICVS Folder get First Folder ICVS Resource resources if resources 0 is Folder return ICVS Folder resources 0 else return resources 0 get Parent  ICVSFolder getFirstFolder ICVSResource isFolder ICVSFolder getParent
tag Text add Modify Listener new Modify Listener public void modify Text Modify Event e tag Name tag Text get Text update Enablements  tagText addModifyListener ModifyListener modifyText ModifyEvent tagName tagText getText updateEnablements
move Tag Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e move Tag move Tag Button get Selection  moveTagButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent moveTag moveTagButton getSelection
see Details Dialog create Main Dialog Area Composite protected void create Main Dialog Area Composite parent create message Label label new Label parent SWT WRAP label set Text Policy bind Tag Action enter Tag NON NLS 1 Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER data width Hint convert HorizontalDL Us To Pixels I Dialog Constants MINIMUM MESSAGE AREA WIDTH label set Layout Data data tag Text new Text parent SWT SINGLE SWT BORDER tag Text set Layout Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL tag Text add Modify Listener new Modify Listener public void modify Text Modify Event e tag Name tag Text get Text update Enablements move Tag Button new Button parent SWT CHECK move Tag Button set Text Policy bind Tag Action move Tag NON NLS 1 move Tag Button set Layout Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER move Tag Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e move Tag move Tag Button get Selection Add F1 help Workbench Help set Help parent I Help Context Ids TAG AS VERSION DIALOG Dialog apply Dialog Font parent  DetailsDialog createMainDialogArea createMainDialogArea setText TagAction enterTag GridData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER widthHint convertHorizontalDLUsToPixels IDialogConstants MINIMUM_MESSAGE_AREA_WIDTH setLayoutData tagText tagText setLayoutData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL tagText addModifyListener ModifyListener modifyText ModifyEvent tagName tagText getText updateEnablements moveTagButton moveTagButton setText TagAction moveTag moveTagButton setLayoutData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER moveTagButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent moveTag moveTagButton getSelection WorkbenchHelp setHelp IHelpContextIds TAG_AS_VERSION_DIALOG applyDialogFont
public boolean should Move Tag return move Tag  shouldMoveTag moveTag
protected Table Viewer create Table Composite parent Table table new Table parent SWT H SCROLL SWT V SCROLL SWT BORDER SWT SINGLE SWT FULL SELECTION Grid Data data new Grid Data Grid Data FILL BOTH data height Hint TABLE HEIGHT HINT table set Layout Data data Table Layout layout new Table Layout layout add Column Data new Column Weight Data 100 true table set Layout layout Table Column col new Table Column table SWT NONE col set Resizable true return new Table Viewer table  TableViewer createTable H_SCROLL V_SCROLL FULL_SELECTION GridData GridData GridData FILL_BOTH heightHint TABLE_HEIGHT_HINT setLayoutData TableLayout TableLayout addColumnData ColumnWeightData setLayout TableColumn TableColumn setResizable TableViewer
existing Version Table set Sorter new Viewer Sorter public int compare Viewer v Object o1 Object o2 int result super compare v o1 o2 if o1 instanceof Tag Element o2 instanceof Tag Element return result return result  existingVersionTable setSorter ViewerSorter TagElement TagElement
existing Version Table add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection existing Version Table get Selection if selection is Empty Tag Element element Tag Element I Structured Selection existing Version Table get Selection get First Element if element null tag Text set Text element get Tag get Name  existingVersionTable addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection existingVersionTable getSelection isEmpty TagElement TagElement IStructuredSelection existingVersionTable getSelection getFirstElement tagText setText getTag getName
public void run get Shell get Display sync Exec new Runnable public void run existing Version Table refresh  getShell getDisplay syncExec existingVersionTable
Runnable after Refresh new Runnable public void run get Shell get Display sync Exec new Runnable public void run existing Version Table refresh  afterRefresh getShell getDisplay syncExec existingVersionTable
public void run get Shell get Display sync Exec new Runnable public void run existing Version Table set Input new Tag Root Element folder CVS Tag VERSION  getShell getDisplay syncExec existingVersionTable setInput TagRootElement CVSTag
Runnable after Configure new Runnable public void run get Shell get Display sync Exec new Runnable public void run existing Version Table set Input new Tag Root Element folder CVS Tag VERSION  afterConfigure getShell getDisplay syncExec existingVersionTable setInput TagRootElement CVSTag
see Details Dialog create Drop Down Dialog Area Composite protected Composite create Drop Down Dialog Area Composite parent create a composite with standard margins and spacing Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH Label label new Label composite SWT WRAP label set Text Policy bind Tag Action existing Versions NON NLS 1 Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER data width Hint convert HorizontalDL Us To Pixels I Dialog Constants MINIMUM MESSAGE AREA WIDTH label set Layout Data data existing Version Table create Table composite existing Version Table set Content Provider new Workbench Content Provider existing Version Table set Label Provider new Workbench Label Provider existing Version Table set Sorter new Viewer Sorter public int compare Viewer v Object o1 Object o2 int result super compare v o1 o2 if o1 instanceof Tag Element o2 instanceof Tag Element return result return result existing Version Table add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection existing Version Table get Selection if selection is Empty Tag Element element Tag Element I Structured Selection existing Version Table get Selection get First Element if element null tag Text set Text element get Tag get Name Runnable after Refresh new Runnable public void run get Shell get Display sync Exec new Runnable public void run existing Version Table refresh Runnable after Configure new Runnable public void run get Shell get Display sync Exec new Runnable public void run existing Version Table set Input new Tag Root Element folder CVS Tag VERSION Tag Configuration Dialog create Tag Definition Buttons get Shell composite new ICVS Folder folder convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH after Refresh after Configure existing Version Table set Input new Tag Root Element folder CVS Tag VERSION Dialog apply Dialog Font parent return composite  DetailsDialog createDropDownDialogArea createDropDownDialogArea GridLayout GridLayout marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING setLayout setLayoutData GridData GridData FILL_BOTH setText TagAction existingVersions GridData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER widthHint convertHorizontalDLUsToPixels IDialogConstants MINIMUM_MESSAGE_AREA_WIDTH setLayoutData existingVersionTable createTable existingVersionTable setContentProvider WorkbenchContentProvider existingVersionTable setLabelProvider WorkbenchLabelProvider existingVersionTable setSorter ViewerSorter TagElement TagElement existingVersionTable addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection existingVersionTable getSelection isEmpty TagElement TagElement IStructuredSelection existingVersionTable getSelection getFirstElement tagText setText getTag getName afterRefresh getShell getDisplay syncExec existingVersionTable afterConfigure getShell getDisplay syncExec existingVersionTable setInput TagRootElement CVSTag TagConfigurationDialog createTagDefinitionButtons getShell ICVSFolder convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH afterRefresh afterConfigure existingVersionTable setInput TagRootElement CVSTag applyDialogFont
Validates tag name protected void update Enablements String message null boolean exists false if tag Name length 0 message NON NLS 1 else I Status status CVS Tag validate Tag Name tag Name if status isOK message status get Message set Page Complete message null set Error Message message  updateEnablements tagName IStatus CVSTag validateTagName tagName getMessage setPageComplete setErrorMessage
Returns the tag name entered into this dialog public String get Tag Name return tag Name  getTagName tagName
return public I Tag Operation get Operation operation set Tag new CVS Tag tag Name CVS Tag VERSION if move Tag operation move Tag return operation  ITagOperation getOperation setTag CVSTag tagName CVSTag moveTag moveTag

class File Sorter extends Viewer Sorter public int compare Viewer viewer Object e1 Object e2 boolean one Is File e1 instanceof CVS File Element boolean two Is File e2 instanceof CVS File Element if one Is File two Is File return one Is File 1 1 return super compare viewer e1 e2  FileSorter ViewerSorter oneIsFile CVSFileElement twoIsFile CVSFileElement oneIsFile twoIsFile oneIsFile
public Tag Configuration Dialog Shell shell ICVS Folder roots super shell set Shell Style SWT CLOSE SWT RESIZE SWT APPLICATION MODAL this roots roots this root roots 0 if roots length 1 allow Setting Auto Refresh Files false I Dialog Settings workbench Settings CVSUI Plugin get Plugin get Dialog Settings this settings workbench Settings get Section Tag Configuration Dialog NON NLS 1 if settings null this settings workbench Settings add New Section Tag Configuration Dialog NON NLS 1  TagConfigurationDialog ICVSFolder setShellStyle APPLICATION_MODAL allowSettingAutoRefreshFiles IDialogSettings workbenchSettings CVSUIPlugin getPlugin getDialogSettings workbenchSettings getSection TagConfigurationDialog workbenchSettings addNewSection TagConfigurationDialog
see Window configure Shell Shell protected void configure Shell Shell new Shell super configure Shell new Shell if roots length 1 new Shell set Text Policy bind Tag Configuration Dialog 1 roots 0 get Name NON NLS 1 else new Shell set Text Policy bind Tag Configuration Dialog 2 Integer to String roots length NON NLS 1 NON NLS 2  configureShell configureShell newShell configureShell newShell newShell setText TagConfigurationDialog getName newShell setText TagConfigurationDialog toString
see Dialog create Dialog Area Composite protected Control create Dialog Area Composite parent Composite shell new Composite parent SWT NONE Grid Data data new Grid Data Grid Data FILL BOTH shell set Layout Data data Grid Layout grid Layout new Grid Layout grid Layout num Columns 2 grid Layout make Columns Equal Width true grid Layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN grid Layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN shell set Layout grid Layout Composite comp new Composite shell SWT NULL grid Layout new Grid Layout grid Layout num Columns 1 grid Layout margin Width 0 grid Layout margin Height 0 comp set Layout grid Layout comp set Layout Data new Grid Data Grid Data FILL BOTH Label cvs Resource Tree Label new Label comp SWT NONE cvs Resource Tree Label set Text Policy bind Tag Configuration Dialog 5 NON NLS 1 data new Grid Data data horizontal Span 1 cvs Resource Tree Label set Layout Data data Tree tree new Tree comp SWT BORDER SWT MULTI cvs Resource Tree new Tree Viewer tree cvs Resource Tree set Content Provider new Remote Content Provider cvs Resource Tree set Label Provider new Workbench Label Provider data new Grid Data Grid Data FILL BOTH data height Hint 150 data horizontal Span 1 cvs Resource Tree get Tree set Layout Data data if roots length 1 cvs Resource Tree set Input new CVS Folder Element roots 0 false don t include unmanaged resources else cvs Resource Tree set Input new CVS Root Folder Element roots cvs Resource Tree set Sorter new File Sorter cvs Resource Tree add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Shown Tags update Enablements comp new Composite shell SWT NULL grid Layout new Grid Layout grid Layout num Columns 1 grid Layout margin Width 0 grid Layout margin Height 0 comp set Layout grid Layout comp set Layout Data new Grid Data Grid Data FILL BOTH Label cvs Tag Tree Label new Label comp SWT NONE cvs Tag Tree Label set Text Policy bind Tag Configuration Dialog 6 NON NLS 1 data new Grid Data data horizontal Span 1 cvs Tag Tree Label set Layout Data data final Table table new Table comp SWT H SCROLL SWT V SCROLL SWT BORDER SWT MULTI SWT FULL SELECTION SWT CHECK data new Grid Data Grid Data FILL BOTH data height Hint 150 data horizontal Span 1 table set Layout Data data Table Layout layout new Table Layout layout add Column Data new Column Weight Data 60 true table set Layout layout Table Column col new Table Column table SWT NONE col set Resizable true cvs Tag Tree new Checkbox Table Viewer table cvs Tag Tree set Content Provider new Workbench Content Provider cvs Tag Tree set Label Provider new Workbench Label Provider cvs Tag Tree add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Enablements Composite select Comp new Composite comp SWT NONE Grid Layout select Layout new Grid Layout 2 true select Layout margin Height select Layout margin Width 0 select Comp set Layout select Layout select Comp set Layout Data new Grid Data Grid Data FILL HORIZONTAL Button select All Button new Button select Comp SWT PUSH select All Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL select All Button set Text Policy bind Release Comment Dialog select All NON NLS 1 select All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e int n Items table get Item Count for int j 0 j n Items j table get Item j set Checked true Button deselect All Button new Button select Comp SWT PUSH deselect All Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL deselect All Button set Text Policy bind Release Comment Dialog deselect All NON NLS 1 deselect All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e int n Items table get Item Count for int j 0 j n Items j table get Item j set Checked false cvs Tag Tree set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 if e1 instanceof Tag Element e2 instanceof Tag Element return super compare viewer e1 e2 CVS Tag tag1 Tag Element e1 get Tag CVS Tag tag2 Tag Element e2 get Tag int type1 tag1 get Type int type2 tag2 get Type if type1 type2 return type1 type2 Sort in reverse order so larger numbered versions are at the top return tag1 compare To tag2 Composite remembered Tags new Composite shell SWT NONE data new Grid Data Grid Data FILL BOTH data horizontal Span 2 remembered Tags set Layout Data data grid Layout new Grid Layout grid Layout num Columns 2 grid Layout margin Height 0 grid Layout margin Width 0 remembered Tags set Layout grid Layout Label remembered Tags Label new Label remembered Tags SWT NONE remembered Tags Label set Text Policy bind Tag Configuration Dialog 7 NON NLS 1 data new Grid Data data horizontal Span 2 remembered Tags Label set Layout Data data tree new Tree remembered Tags SWT BORDER SWT MULTI cvs Defined Tags Tree new Tree Viewer tree cvs Defined Tags Tree set Content Provider new Workbench Content Provider cvs Defined Tags Tree set Label Provider new Workbench Label Provider data new Grid Data Grid Data FILL BOTH data height Hint 100 data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true cvs Defined Tags Tree get Tree set Layout Data data cvs Defined Tags Root Element new Project Element roots 0 Project Element INCLUDE BRANCHES Project Element INCLUDE VERSIONS Project Element INCLUDE DATES cvs Defined Tags Root Element get Branches add CVSUI Plugin get Plugin get Repository Manager get Known Tags root CVS Tag BRANCH cvs Defined Tags Root Element get Versions add CVSUI Plugin get Plugin get Repository Manager get Known Tags root CVS Tag VERSION cvs Defined Tags Root Element get Dates add CVSUI Plugin get Plugin get Repository Manager get Known Tags root CVS Tag DATE cvs Defined Tags Tree set Input cvs Defined Tags Root Element cvs Defined Tags Tree add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Enablements cvs Defined Tags Tree set Sorter new Project Element Sorter Composite button Composite new Composite remembered Tags SWT NONE data new Grid Data data vertical Alignment Grid Data BEGINNING button Composite set Layout Data data grid Layout new Grid Layout grid Layout margin Height 0 grid Layout margin Width 0 button Composite set Layout grid Layout add Selected Tags Button new Button button Composite SWT PUSH add Selected Tags Button set Text Policy bind Tag Configuration Dialog 8 NON NLS 1 data get Standard Button Data add Selected Tags Button data horizontal Alignment Grid Data FILL add Selected Tags Button set Layout Data data add Selected Tags Button add Listener SWT Selection new Listener public void handle Event Event event remember Checked Tags update Shown Tags update Enablements Button add Dates Button new Button button Composite SWT PUSH add Dates Button set Text Policy bind Tag Configuration Dialog 0 NON NLS 1 data get Standard Button Data add Dates Button data horizontal Alignment Grid Data FILL add Dates Button set Layout Data data add Dates Button add Listener SWT Selection new Listener public void handle Event Event event CVS Tag date Tag New Date Tag Action get Date Tag get Shell CVSUI Plugin get Plugin get Repository Manager get Repository Location For root add Date Tags Selected date Tag update Shown Tags update Enablements remove Tag Button new Button button Composite SWT PUSH remove Tag Button set Text Policy bind Tag Configuration Dialog 9 NON NLS 1 data get Standard Button Data remove Tag Button data horizontal Alignment Grid Data FILL remove Tag Button set Layout Data data remove Tag Button add Listener SWT Selection new Listener public void handle Event Event event delete Selected update Shown Tags update Enablements Button remove All Tags new Button button Composite SWT PUSH remove All Tags set Text Policy bind Tag Configuration Dialog 10 NON NLS 1 data get Standard Button Data remove All Tags data horizontal Alignment Grid Data FILL remove All Tags set Layout Data data remove All Tags add Listener SWT Selection new Listener public void handle Event Event event remove All Known Tags update Shown Tags update Enablements if allow Setting Auto Refresh Files Label explanation new Label remembered Tags SWT WRAP explanation set Text Policy bind Tag Configuration Dialog 11 NON NLS 1 data new Grid Data data horizontal Span 2 data width Hint 300 explanation set Layout Data data auto Refresh File List new org eclipse swt widgets List remembered Tags SWT BORDER SWT MULTI data new Grid Data data height Hint 45 data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true auto Refresh File List set Layout Data data try auto Refresh File List set Items CVSUI Plugin get Plugin get Repository Manager get Auto Refresh Files roots 0 catch CVS Exception e auto Refresh File List set Items new String 0 CVSUI Plugin log e auto Refresh File List add Selection Listener new Selection Listener public void widget Selected Selection Event e update Enablements public void widget Default Selected Selection Event e update Enablements Composite button Composite2 new Composite remembered Tags SWT NONE data new Grid Data data vertical Alignment Grid Data BEGINNING button Composite2 set Layout Data data grid Layout new Grid Layout grid Layout margin Height 0 grid Layout margin Width 0 button Composite2 set Layout grid Layout add Selected Files Button new createDialogArea createDialogArea GridData GridData GridData FILL_BOTH setLayoutData GridLayout gridLayout GridLayout gridLayout numColumns gridLayout makeColumnsEqualWidth gridLayout marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN gridLayout marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN setLayout gridLayout gridLayout GridLayout gridLayout numColumns gridLayout marginWidth gridLayout marginHeight setLayout gridLayout setLayoutData GridData GridData FILL_BOTH cvsResourceTreeLabel cvsResourceTreeLabel setText TagConfigurationDialog GridData horizontalSpan cvsResourceTreeLabel setLayoutData cvsResourceTree TreeViewer cvsResourceTree setContentProvider RemoteContentProvider cvsResourceTree setLabelProvider WorkbenchLabelProvider GridData GridData FILL_BOTH heightHint horizontalSpan cvsResourceTree getTree setLayoutData cvsResourceTree setInput CVSFolderElement cvsResourceTree setInput CVSRootFolderElement cvsResourceTree setSorter FileSorter cvsResourceTree addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateShownTags updateEnablements gridLayout GridLayout gridLayout numColumns gridLayout marginWidth gridLayout marginHeight setLayout gridLayout setLayoutData GridData GridData FILL_BOTH cvsTagTreeLabel cvsTagTreeLabel setText TagConfigurationDialog GridData horizontalSpan cvsTagTreeLabel setLayoutData H_SCROLL V_SCROLL FULL_SELECTION GridData GridData FILL_BOTH heightHint horizontalSpan setLayoutData TableLayout TableLayout addColumnData ColumnWeightData setLayout TableColumn TableColumn setResizable cvsTagTree CheckboxTableViewer cvsTagTree setContentProvider WorkbenchContentProvider cvsTagTree setLabelProvider WorkbenchLabelProvider cvsTagTree addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateEnablements selectComp GridLayout selectLayout GridLayout selectLayout marginHeight selectLayout marginWidth selectComp setLayout selectLayout selectComp setLayoutData GridData GridData FILL_HORIZONTAL selectAllButton selectComp selectAllButton setLayoutData GridData GridData FILL_HORIZONTAL selectAllButton setText ReleaseCommentDialog selectAll selectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent nItems getItemCount nItems getItem setChecked deselectAllButton selectComp deselectAllButton setLayoutData GridData GridData FILL_HORIZONTAL deselectAllButton setText ReleaseCommentDialog deselectAll deselectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent nItems getItemCount nItems getItem setChecked cvsTagTree setSorter ViewerSorter TagElement TagElement CVSTag TagElement getTag CVSTag TagElement getTag getType getType compareTo rememberedTags GridData GridData FILL_BOTH horizontalSpan rememberedTags setLayoutData gridLayout GridLayout gridLayout numColumns gridLayout marginHeight gridLayout marginWidth rememberedTags setLayout gridLayout rememberedTagsLabel rememberedTags rememberedTagsLabel setText TagConfigurationDialog GridData horizontalSpan rememberedTagsLabel setLayoutData rememberedTags cvsDefinedTagsTree TreeViewer cvsDefinedTagsTree setContentProvider WorkbenchContentProvider cvsDefinedTagsTree setLabelProvider WorkbenchLabelProvider GridData GridData FILL_BOTH heightHint horizontalAlignment GridData grabExcessHorizontalSpace cvsDefinedTagsTree getTree setLayoutData cvsDefinedTagsRootElement ProjectElement ProjectElement INCLUDE_BRANCHES ProjectElement INCLUDE_VERSIONS ProjectElement INCLUDE_DATES cvsDefinedTagsRootElement getBranches CVSUIPlugin getPlugin getRepositoryManager getKnownTags CVSTag cvsDefinedTagsRootElement getVersions CVSUIPlugin getPlugin getRepositoryManager getKnownTags CVSTag cvsDefinedTagsRootElement getDates CVSUIPlugin getPlugin getRepositoryManager getKnownTags CVSTag cvsDefinedTagsTree setInput cvsDefinedTagsRootElement cvsDefinedTagsTree addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateEnablements cvsDefinedTagsTree setSorter ProjectElementSorter buttonComposite rememberedTags GridData verticalAlignment GridData buttonComposite setLayoutData gridLayout GridLayout gridLayout marginHeight gridLayout marginWidth buttonComposite setLayout gridLayout addSelectedTagsButton buttonComposite addSelectedTagsButton setText TagConfigurationDialog getStandardButtonData addSelectedTagsButton horizontalAlignment GridData addSelectedTagsButton setLayoutData addSelectedTagsButton addListener handleEvent rememberCheckedTags updateShownTags updateEnablements addDatesButton buttonComposite addDatesButton setText TagConfigurationDialog getStandardButtonData addDatesButton horizontalAlignment GridData addDatesButton setLayoutData addDatesButton addListener handleEvent CVSTag dateTag NewDateTagAction getDateTag getShell CVSUIPlugin getPlugin getRepositoryManager getRepositoryLocationFor addDateTagsSelected dateTag updateShownTags updateEnablements removeTagButton buttonComposite removeTagButton setText TagConfigurationDialog getStandardButtonData removeTagButton horizontalAlignment GridData removeTagButton setLayoutData removeTagButton addListener handleEvent deleteSelected updateShownTags updateEnablements removeAllTags buttonComposite removeAllTags setText TagConfigurationDialog getStandardButtonData removeAllTags horizontalAlignment GridData removeAllTags setLayoutData removeAllTags addListener handleEvent removeAllKnownTags updateShownTags updateEnablements allowSettingAutoRefreshFiles rememberedTags setText TagConfigurationDialog GridData horizontalSpan widthHint setLayoutData autoRefreshFileList rememberedTags GridData heightHint horizontalAlignment GridData grabExcessHorizontalSpace autoRefreshFileList setLayoutData autoRefreshFileList setItems CVSUIPlugin getPlugin getRepositoryManager getAutoRefreshFiles CVSException autoRefreshFileList setItems CVSUIPlugin autoRefreshFileList addSelectionListener SelectionListener widgetSelected SelectionEvent updateEnablements widgetDefaultSelected SelectionEvent updateEnablements buttonComposite2 rememberedTags GridData verticalAlignment GridData buttonComposite2 setLayoutData gridLayout GridLayout gridLayout marginHeight gridLayout marginWidth buttonComposite2 setLayout gridLayout addSelectedFilesButton
CVSUI Plugin run With Progress get Shell true cancelable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task Policy bind Tag Configuration Dialog 22 files Selection length NON NLS 1 try for int i 0 i files Selection length i ICVS File file files Selection i getCVS File tags add All Arrays as List get Tags For file Policy sub Monitor For monitor 1 catch Team Exception e ignore the exception finally monitor done  CVSUIPlugin runWithProgress getShell IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask TagConfigurationDialog filesSelection filesSelection ICVSFile filesSelection getCVSFile addAll asList getTagsFor subMonitorFor TeamException
private void update Shown Tags final CVS File Element files Selection get Selected Files final Set tags new Hash Set if files Selection length 0 try CVSUI Plugin run With Progress get Shell true cancelable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task Policy bind Tag Configuration Dialog 22 files Selection length NON NLS 1 try for int i 0 i files Selection length i ICVS File file files Selection i getCVS File tags add All Arrays as List get Tags For file Policy sub Monitor For monitor 1 catch Team Exception e ignore the exception finally monitor done catch Interrupted Exception e operation cancelled catch Invocation Target Exception e can t happen since we re ignoring all possible exceptions cvs Tag Tree get Table remove All for Iterator it tags iterator it has Next CVS Tag tag CVS Tag it next List known Tags new Array List known Tags add All Arrays as List cvs Defined Tags Root Element get Branches get Tags known Tags add All Arrays as List cvs Defined Tags Root Element get Versions get Tags known Tags add All Arrays as List cvs Defined Tags Root Element get Dates get Tags if known Tags contains tag Tag Element tag Elem new Tag Element tag cvs Tag Tree add tag Elem cvs Tag Tree set Checked tag Elem true  updateShownTags CVSFileElement filesSelection getSelectedFiles HashSet filesSelection CVSUIPlugin runWithProgress getShell IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask TagConfigurationDialog filesSelection filesSelection ICVSFile filesSelection getCVSFile addAll asList getTagsFor subMonitorFor TeamException InterruptedException InvocationTargetException cvsTagTree getTable removeAll hasNext CVSTag CVSTag knownTags ArrayList knownTags addAll asList cvsDefinedTagsRootElement getBranches getTags knownTags addAll asList cvsDefinedTagsRootElement getVersions getTags knownTags addAll asList cvsDefinedTagsRootElement getDates getTags knownTags TagElement tagElem TagElement cvsTagTree tagElem cvsTagTree setChecked tagElem
private CVS File Element get Selected Files I Structured Selection selection I Structured Selection cvs Resource Tree get Selection if selection is Empty final List files Selection new Array List Iterator it selection iterator while it has Next Object o it next if o instanceof CVS File Element files Selection add o return CVS File Element files Selection to Array new CVS File Element files Selection size return new CVS File Element 0  CVSFileElement getSelectedFiles IStructuredSelection IStructuredSelection cvsResourceTree getSelection isEmpty filesSelection ArrayList hasNext CVSFileElement filesSelection CVSFileElement filesSelection toArray CVSFileElement filesSelection CVSFileElement
private void add Selection To Auto Refresh List I Structured Selection selection I Structured Selection cvs Resource Tree get Selection if selection is Empty final List files Selection new Array List Iterator it selection iterator while it has Next Object o it next if o instanceof CVS File Element files Selection add o if files Selection is Empty for it files Selection iterator it has Next try ICVS File file CVS File Element it next getCVS File ICVS Folder file Parent file get Parent String file Path new Path file Parent get Folder Sync Info get Repository append file get Relative Path file Parent to String if auto Refresh File List index Of file Path 1 auto Refresh File List add file Path catch CVS Exception e CVSUI Plugin open Error get Shell null null e  addSelectionToAutoRefreshList IStructuredSelection IStructuredSelection cvsResourceTree getSelection isEmpty filesSelection ArrayList hasNext CVSFileElement filesSelection filesSelection isEmpty filesSelection hasNext ICVSFile CVSFileElement getCVSFile ICVSFolder fileParent getParent filePath fileParent getFolderSyncInfo getRepository getRelativePath fileParent toString autoRefreshFileList indexOf filePath autoRefreshFileList filePath CVSException CVSUIPlugin openError getShell
private CVS Tag get Tags For ICVS File file I Progress Monitor monitor throws Team Exception Set tag Set new Hash Set I Log Entry entries file get Log Entries monitor for int j 0 j entries length j CVS Tag tags entries j get Tags for int k 0 k tags length k tag Set add tags k return CVS Tag tag Set to Array new CVS Tag tag Set size  CVSTag getTagsFor ICVSFile IProgressMonitor TeamException tagSet HashSet ILogEntry getLogEntries CVSTag getTags tagSet CVSTag tagSet toArray CVSTag tagSet
private void remember Checked Tags Object checked cvs Tag Tree get Checked Elements for int i 0 i checked length i CVS Tag tag Tag Element checked i get Tag if tag get Type CVS Tag BRANCH cvs Defined Tags Root Element get Branches add new CVS Tag tag else if tag get Type CVS Tag DATE cvs Defined Tags Root Element get Dates add new CVS Tag tag else cvs Defined Tags Root Element get Versions add new CVS Tag tag cvs Defined Tags Tree refresh  rememberCheckedTags cvsTagTree getCheckedElements CVSTag TagElement getTag getType CVSTag cvsDefinedTagsRootElement getBranches CVSTag getType CVSTag cvsDefinedTagsRootElement getDates CVSTag cvsDefinedTagsRootElement getVersions CVSTag cvsDefinedTagsTree
private void delete Selected I Structured Selection selection I Structured Selection cvs Defined Tags Tree get Selection if selection is Empty Iterator it selection iterator while it has Next Object o it next if o instanceof Tag Element CVS Tag tag Tag Element o get Tag if tag get Type CVS Tag BRANCH cvs Defined Tags Root Element get Branches remove tag else if tag get Type CVS Tag VERSION cvs Defined Tags Root Element get Versions remove tag else if tag get Type CVS Tag DATE cvs Defined Tags Root Element get Dates remove tag cvs Defined Tags Tree refresh cvs Defined Tags Tree get Tree set Focus  deleteSelected IStructuredSelection IStructuredSelection cvsDefinedTagsTree getSelection isEmpty hasNext TagElement CVSTag TagElement getTag getType CVSTag cvsDefinedTagsRootElement getBranches getType CVSTag cvsDefinedTagsRootElement getVersions getType CVSTag cvsDefinedTagsRootElement getDates cvsDefinedTagsTree cvsDefinedTagsTree getTree setFocus
private void add Date Tags Selected CVS Tag tag if tag null return List known Tags new Array List known Tags add All Arrays as List cvs Defined Tags Root Element get Dates get Tags if known Tags contains tag cvs Defined Tags Root Element get Dates add tag cvs Defined Tags Tree refresh cvs Defined Tags Tree get Tree set Focus  addDateTagsSelected CVSTag knownTags ArrayList knownTags addAll asList cvsDefinedTagsRootElement getDates getTags knownTags cvsDefinedTagsRootElement getDates cvsDefinedTagsTree cvsDefinedTagsTree getTree setFocus
private boolean is Tag Selected In Known Tag Tree I Structured Selection selection I Structured Selection cvs Defined Tags Tree get Selection if selection is Empty final List versions new Array List final List branches new Array List Iterator it selection iterator while it has Next Object o it next if o instanceof Tag Element return true return false  isTagSelectedInKnownTagTree IStructuredSelection IStructuredSelection cvsDefinedTagsTree getSelection isEmpty ArrayList ArrayList hasNext TagElement
private void remove All Known Tags cvs Defined Tags Root Element get Branches remove All cvs Defined Tags Root Element get Versions remove All cvs Defined Tags Root Element get Dates remove All cvs Defined Tags Tree refresh  removeAllKnownTags cvsDefinedTagsRootElement getBranches removeAll cvsDefinedTagsRootElement getVersions removeAll cvsDefinedTagsRootElement getDates removeAll cvsDefinedTagsTree
private void update Enablements add checked tags Object checked cvs Tag Tree get Checked Elements add Selected Tags Button set Enabled checked length 0 true false Remove known tags remove Tag Button set Enabled is Tag Selected In Known Tag Tree true false if allow Setting Auto Refresh Files add selected files add Selected Files Button set Enabled get Selected Files length 0 true false remove auto refresh files remove File Button set Enabled auto Refresh File List get Selection length 0 true false  updateEnablements cvsTagTree getCheckedElements addSelectedTagsButton setEnabled removeTagButton setEnabled isTagSelectedInKnownTagTree allowSettingAutoRefreshFiles addSelectedFilesButton setEnabled getSelectedFiles removeFileButton setEnabled autoRefreshFileList getSelection
manager run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception CVS Tag branches cvs Defined Tags Root Element get Branches get Tags CVS Tag versions cvs Defined Tags Root Element get Versions get Tags CVS Tag dates cvs Defined Tags Root Element get Dates get Tags try for int i 0 i roots length i CVS Tag old Tags manager get Known Tags roots i manager remove Tags roots i old Tags if branches length 0 manager add Tags roots i branches if versions length 0 manager add Tags roots i versions if dates length 0 manager add Tags roots i dates catch CVS Exception e throw new Invocation Target Exception e  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException CVSTag cvsDefinedTagsRootElement getBranches getTags CVSTag cvsDefinedTagsRootElement getVersions getTags CVSTag cvsDefinedTagsRootElement getDates getTags CVSTag oldTags getKnownTags removeTags oldTags addTags addTags addTags CVSException InvocationTargetException
see Dialog ok Pressed protected void ok Pressed try save auto refresh file names if allow Setting Auto Refresh Files Repository Manager manager CVSUI Plugin get Plugin get Repository Manager manager set Auto Refresh Files root auto Refresh File List get Items save defined tags and update all project with the same version tags final Repository Manager manager CVSUI Plugin get Plugin get Repository Manager manager run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception CVS Tag branches cvs Defined Tags Root Element get Branches get Tags CVS Tag versions cvs Defined Tags Root Element get Versions get Tags CVS Tag dates cvs Defined Tags Root Element get Dates get Tags try for int i 0 i roots length i CVS Tag old Tags manager get Known Tags roots i manager remove Tags roots i old Tags if branches length 0 manager add Tags roots i branches if versions length 0 manager add Tags roots i versions if dates length 0 manager add Tags roots i dates catch CVS Exception e throw new Invocation Target Exception e null super ok Pressed catch CVS Exception e CVSUI Plugin open Error get Shell null null e catch Invocation Target Exception e CVSUI Plugin open Error get Shell null null e catch Interrupted Exception e  okPressed okPressed allowSettingAutoRefreshFiles RepositoryManager CVSUIPlugin getPlugin getRepositoryManager setAutoRefreshFiles autoRefreshFileList getItems RepositoryManager CVSUIPlugin getPlugin getRepositoryManager IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException CVSTag cvsDefinedTagsRootElement getBranches getTags CVSTag cvsDefinedTagsRootElement getVersions getTags CVSTag cvsDefinedTagsRootElement getDates getTags CVSTag oldTags getKnownTags removeTags oldTags addTags addTags addTags CVSException InvocationTargetException okPressed CVSException CVSUIPlugin openError getShell InvocationTargetException CVSUIPlugin openError getShell InterruptedException
private static Button create Tag Refresh Button final Shell shell Composite composite String title final ICVS Folder folder final Runnable runnable Button refresh Button new Button composite SWT PUSH refresh Button set Text title refresh Button add Listener SWT Selection new Listener public void handle Event Event event try PlatformUI get Workbench get Progress Service run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try CVSUI Plugin get Plugin get Repository Manager refresh Defined Tags folder false replace true monitor Display get Default async Exec runnable catch Team Exception e throw new Invocation Target Exception e catch Interrupted Exception e operation cancelled catch Invocation Target Exception e CVSUI Plugin open Error shell Policy bind Tag Configuration Dialog 14 null e NON NLS 1 update Enablement On Refresh Button refresh Button folder return refresh Button  createTagRefreshButton ICVSFolder refreshButton refreshButton setText refreshButton addListener handleEvent getWorkbench getProgressService IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException CVSUIPlugin getPlugin getRepositoryManager refreshDefinedTags getDefault asyncExec TeamException InvocationTargetException InterruptedException InvocationTargetException CVSUIPlugin openError TagConfigurationDialog updateEnablementOnRefreshButton refreshButton refreshButton
public static Control create Tag Definition Buttons final Shell shell Composite composite final ICVS Folder folders int h Hint int w Hint final Runnable after Refresh final Runnable after Configure Composite button Comp new Composite composite SWT NONE Grid Data data new Grid Data data horizontal Alignment Grid Data END button Comp set Layout Data data Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 button Comp set Layout layout final Button refresh Button Tag Configuration Dialog create Tag Refresh Button shell button Comp Policy bind Tag Configuration Dialog 20 folders 0 after Refresh NON NLS 1 data new Grid Data if h Hint 0 w Hint 0 data height Hint h Hint don t crop labels with large font int width Hint w Hint data width Hint Math max width Hint refresh Button compute Size SWT DEFAULT SWT DEFAULT true x data horizontal Alignment Grid Data END data horizontal Span 1 refresh Button set Layout Data data Button add Button new Button button Comp SWT PUSH add Button set Text Policy bind Tag Configuration Dialog 21 NON NLS 1 data new Grid Data if h Hint 0 w Hint 0 data height Hint h Hint don t crop labels with large font int width Hint w Hint data width Hint Math max width Hint add Button compute Size SWT DEFAULT SWT DEFAULT true x data horizontal Alignment Grid Data END data horizontal Span 1 add Button set Layout Data data add Button add Listener SWT Selection new Listener public void handle Event Event event Tag Configuration Dialog d new Tag Configuration Dialog shell folders d open update Enablement On Refresh Button refresh Button folders 0 after Configure run Workbench Help set Help refresh Button I Help Context Ids TAG CONFIGURATION REFRESHACTION Workbench Help set Help add Button I Help Context Ids TAG CONFIGURATION OVERVIEW return button Comp  createTagDefinitionButtons ICVSFolder hHint wHint afterRefresh afterConfigure buttonComp GridData GridData horizontalAlignment GridData buttonComp setLayoutData GridLayout GridLayout numColumns marginHeight marginWidth buttonComp setLayout refreshButton TagConfigurationDialog createTagRefreshButton buttonComp TagConfigurationDialog afterRefresh GridData hHint wHint heightHint hHint widthHint wHint widthHint widthHint refreshButton computeSize horizontalAlignment GridData horizontalSpan refreshButton setLayoutData addButton buttonComp addButton setText TagConfigurationDialog GridData hHint wHint heightHint hHint widthHint wHint widthHint widthHint addButton computeSize horizontalAlignment GridData horizontalSpan addButton setLayoutData addButton addListener handleEvent TagConfigurationDialog TagConfigurationDialog updateEnablementOnRefreshButton refreshButton afterConfigure WorkbenchHelp setHelp refreshButton IHelpContextIds TAG_CONFIGURATION_REFRESHACTION WorkbenchHelp setHelp addButton IHelpContextIds TAG_CONFIGURATION_OVERVIEW buttonComp
private static void update Enablement On Refresh Button Button refresh Button ICVS Folder project try String files CVSUI Plugin get Plugin get Repository Manager get Auto Refresh Files project refresh Button set Enabled files length 0 catch CVS Exception e refresh Button set Enabled false CVSUI Plugin log e  updateEnablementOnRefreshButton refreshButton ICVSFolder CVSUIPlugin getPlugin getRepositoryManager getAutoRefreshFiles refreshButton setEnabled CVSException refreshButton setEnabled CVSUIPlugin
see Window get Initial Size protected Point get Initial Size int width height if allow Setting Auto Refresh Files try height settings get Int ALLOWREFRESH HEIGHT KEY width settings get Int ALLOWREFRESH WIDTH KEY catch Number Format Exception e return super get Initial Size else try height settings get Int NOREFRESH HEIGHT KEY width settings get Int NOREFRESH WIDTH KEY catch Number Format Exception e return super get Initial Size return new Point width height  getInitialSize getInitialSize allowSettingAutoRefreshFiles getInt ALLOWREFRESH_HEIGHT_KEY getInt ALLOWREFRESH_WIDTH_KEY NumberFormatException getInitialSize getInt NOREFRESH_HEIGHT_KEY getInt NOREFRESH_WIDTH_KEY NumberFormatException getInitialSize
see Dialog cancel Pressed protected void cancel Pressed super cancel Pressed  cancelPressed cancelPressed cancelPressed
private Grid Data get Standard Button Data Button button Grid Data data new Grid Data data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT don t crop labels with large font int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x return data  GridData getStandardButtonData GridData GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize
see Window close public boolean close Rectangle bounds get Shell get Bounds if allow Setting Auto Refresh Files settings put ALLOWREFRESH HEIGHT KEY bounds height settings put ALLOWREFRESH WIDTH KEY bounds width else settings put NOREFRESH HEIGHT KEY bounds height settings put NOREFRESH WIDTH KEY bounds width return super close  getShell getBounds allowSettingAutoRefreshFiles ALLOWREFRESH_HEIGHT_KEY ALLOWREFRESH_WIDTH_KEY NOREFRESH_HEIGHT_KEY NOREFRESH_WIDTH_KEY

Constructor param parent Shell public Taget Location Selection Dialog Shell parent Shell String title I Project target Project this parent Shell title new I Project target Project  parentShell TagetLocationSelectionDialog parentShell IProject targetProject parentShell IProject targetProject
Constructor param parent Shell public Taget Location Selection Dialog Shell parent Shell String title I Project target Projects super parent Shell set Title title this target Projects target Projects if target Projects length 1 new Project Name target Projects 0 get Name  parentShell TagetLocationSelectionDialog parentShell IProject targetProjects parentShell setTitle targetProjects targetProjects targetProjects newProjectName targetProjects getName
protected Control create Dialog Area Composite parent page group Composite composite Composite super create Dialog Area parent composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL BOTH if is Single Checkout create Project Name Group composite create Project Location Group composite Add in a label for status messages if required status Message Label new Label composite SWT NONE status Message Label set Layout Data new Grid Data Grid Data FILL BOTH Dialog apply Dialog Font parent return composite  createDialogArea createDialogArea setLayout GridLayout setLayoutData GridData GridData FILL_BOTH isSingleCheckout createProjectNameGroup createProjectLocationGroup statusMessageLabel statusMessageLabel setLayoutData GridData GridData FILL_BOTH applyDialogFont
Creates the project name specification controls param parent the parent composite private void create Project Name Group Composite parent project specification group Composite project Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 project Group set Layout layout project Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL new project label Label project Label new Label project Group SWT NONE project Label set Text Policy bind Target Location Selection Dialog project Name Label NON NLS 1 new project name entry field project Name Field new Text project Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH project Name Field set Layout Data data Set the initial value first before listener to avoid handling an event during the creation project Name Field set Text get New Project Name project Name Field select All create Name Listener  createProjectNameGroup projectGroup GridLayout GridLayout numColumns projectGroup setLayout projectGroup setLayoutData GridData GridData FILL_HORIZONTAL projectLabel projectGroup projectLabel setText TargetLocationSelectionDialog projectNameLabel projectNameField projectGroup GridData GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH projectNameField setLayoutData projectNameField setText getNewProjectName projectNameField selectAll createNameListener
Listener listener new Listener public void handle Event Event event new Project Name project Name Field get Text set Location For Selection false apply Validation Result check Valid  handleEvent newProjectName projectNameField getText setLocationForSelection applyValidationResult checkValid
Create the listener that is used to validate the entries for the receiver private void create Name Listener Listener listener new Listener public void handle Event Event event new Project Name project Name Field get Text set Location For Selection false apply Validation Result check Valid this project Name Field add Listener SWT Modify listener  createNameListener handleEvent newProjectName projectNameField getText setLocationForSelection applyValidationResult checkValid projectNameField addListener
Set the location to the default location if we are set to use Defaults private void set Location For Selection boolean changed if use Defaults I Path default Path null if is Single Checkout try default Path get Single Project get Description get Location catch Core Exception e ignore if default Path null default Path Platform get Location append get Single Project get Name else default Path Platform get Location location Path Field set Text default Path toOS String target Location null else if changed I Path location null try location this target Projects 0 get Description get Location catch Core Exception e ignore the exception if location null target Location null location Path Field set Text NON NLS 1 else if is Single Checkout target Location location toOS String else target Location location remove Last Segments 1 toOS String location Path Field set Text target Location  useDefaults setLocationForSelection useDefaults IPath defaultPath isSingleCheckout defaultPath getSingleProject getDescription getLocation CoreException defaultPath defaultPath getLocation getSingleProject getName defaultPath getLocation locationPathField setText defaultPath toOSString targetLocation IPath targetProjects getDescription getLocation CoreException targetLocation locationPathField setText isSingleCheckout targetLocation toOSString targetLocation removeLastSegments toOSString locationPathField setText targetLocation
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e use Defaults use Defaults Button get Selection browse Button set Enabled use Defaults location Path Field set Enabled use Defaults location Label set Enabled use Defaults set Location For Selection true  SelectionListener SelectionAdapter widgetSelected SelectionEvent useDefaults useDefaultsButton getSelection browseButton setEnabled useDefaults locationPathField setEnabled useDefaults locationLabel setEnabled useDefaults setLocationForSelection
Creates the project location specification controls param parent the parent composite private final void create Project Location Group Composite parent project specification group Composite project Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 project Group set Layout layout project Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL final Button use Defaults Button new Button project Group SWT CHECK SWT RIGHT use Defaults Button set Text Policy bind Target Location Selection Dialog use Default Label NON NLS 1 use Defaults Button set Selection this use Defaults Grid Data button Data new Grid Data button Data horizontal Span 3 use Defaults Button set Layout Data button Data create User Specified Project Location Group project Group this use Defaults Selection Listener listener new Selection Adapter public void widget Selected Selection Event e use Defaults use Defaults Button get Selection browse Button set Enabled use Defaults location Path Field set Enabled use Defaults location Label set Enabled use Defaults set Location For Selection true use Defaults Button add Selection Listener listener  createProjectLocationGroup projectGroup GridLayout GridLayout numColumns projectGroup setLayout projectGroup setLayoutData GridData GridData FILL_HORIZONTAL useDefaultsButton projectGroup useDefaultsButton setText TargetLocationSelectionDialog useDefaultLabel useDefaultsButton setSelection useDefaults GridData buttonData GridData buttonData horizontalSpan useDefaultsButton setLayoutData buttonData createUserSpecifiedProjectLocationGroup projectGroup useDefaults SelectionListener SelectionAdapter widgetSelected SelectionEvent useDefaults useDefaultsButton getSelection browseButton setEnabled useDefaults locationPathField setEnabled useDefaults locationLabel setEnabled useDefaults setLocationForSelection useDefaultsButton addSelectionListener
this browse Button set Text Policy bind Target Location Selection Dialog browse Label NON NLS 1 this browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Location Browse Button Pressed  browseButton setText TargetLocationSelectionDialog browseLabel browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLocationBrowseButtonPressed
Creates the project location specification controls return the parent of the widgets created param project Group the parent composite param enabled sets the initial enabled state of the widgets private Composite create User Specified Project Location Group Composite project Group boolean enabled location label location Label new Label project Group SWT NONE if is Single Checkout location Label set Text Policy bind Target Location Selection Dialog location Label NON NLS 1 else location Label set Text Policy bind Target Location Selection Dialog parent Directory Label NON NLS 1 location Label set Enabled enabled project location entry field location Path Field new Text project Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH location Path Field set Layout Data data location Path Field set Enabled enabled browse button this browse Button new Button project Group SWT PUSH this browse Button set Text Policy bind Target Location Selection Dialog browse Label NON NLS 1 this browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Location Browse Button Pressed this browse Button set Enabled enabled set Button Layout Data this browse Button Set the initial value first before listener to avoid handling an event during the creation set Location For Selection true create Location Listener return project Group  projectGroup createUserSpecifiedProjectLocationGroup projectGroup locationLabel projectGroup isSingleCheckout locationLabel setText TargetLocationSelectionDialog locationLabel locationLabel setText TargetLocationSelectionDialog parentDirectoryLabel locationLabel setEnabled locationPathField projectGroup GridData GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH locationPathField setLayoutData locationPathField setEnabled browseButton projectGroup browseButton setText TargetLocationSelectionDialog browseLabel browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLocationBrowseButtonPressed browseButton setEnabled setButtonLayoutData browseButton setLocationForSelection createLocationListener projectGroup
Open an appropriate directory browser private void handle Location Browse Button Pressed Directory Dialog dialog new Directory Dialog location Path Field get Shell if is Single Checkout dialog set Message Policy bind Target Location Selection Dialog message For Single new Project Name NON NLS 1 else dialog set Message Policy bind Target Location Selection Dialog message For Multi new Integer target Projects length to String NON NLS 1 String dir Name location Path Field get Text if dir Name equals NON NLS 1 File path new File dir Name if path exists dialog set Filter Path dir Name String selected Directory dialog open if selected Directory null if target Projects length 1 location Path Field set Text new Path selected Directory append new Project Name toOS String else location Path Field set Text new Path selected Directory toOS String target Location location Path Field get Text  handleLocationBrowseButtonPressed DirectoryDialog DirectoryDialog locationPathField getShell isSingleCheckout setMessage TargetLocationSelectionDialog messageForSingle newProjectName setMessage TargetLocationSelectionDialog messageForMulti targetProjects toString dirName locationPathField getText dirName dirName setFilterPath dirName selectedDirectory selectedDirectory targetProjects locationPathField setText selectedDirectory newProjectName toOSString locationPathField setText selectedDirectory toOSString targetLocation locationPathField getText
Method is Single Checkout return boolean private boolean is Single Checkout return target Projects length 1  isSingleCheckout isSingleCheckout targetProjects
private I Project get Single Project if new Project Name null new Project Name length 0 target Projects 0 get Name equals new Project Name return target Projects 0 else return Resources Plugin get Workspace get Root get Project new Project Name  IProject getSingleProject newProjectName newProjectName targetProjects getName newProjectName targetProjects ResourcesPlugin getWorkspace getRoot getProject newProjectName
Listener listener new Listener public void handle Event Event event apply Validation Result check Valid  handleEvent applyValidationResult checkValid
Create the listener that is used to validate the location entered by the iser private void create Location Listener Listener listener new Listener public void handle Event Event event apply Validation Result check Valid this location Path Field add Listener SWT Modify listener  createLocationListener handleEvent applyValidationResult checkValid locationPathField addListener
Check the message If it is null then continue otherwise inform the user via the status value and disable the OK param message the error message to show if it is not null private void apply Validation Result String error Msg if error Msg null status Message Label set Text NON NLS 1 get Ok Button set Enabled true else status Message Label set Foreground J Face Colors get Error Text status Message Label get Display status Message Label set Text error Msg get Ok Button set Enabled false  applyValidationResult errorMsg errorMsg statusMessageLabel setText getOkButton setEnabled statusMessageLabel setForeground JFaceColors getErrorText statusMessageLabel getDisplay statusMessageLabel setText errorMsg getOkButton setEnabled
Check whether the entries are valid If so return null Otherwise return a string that indicates the problem private String check Valid if is Single Checkout String valid check Valid Name if valid null return valid return check Valid Location  checkValid isSingleCheckout checkValidName checkValidLocation
Check if the entry in the widget location is valid If it is valid return null Otherwise return a string that indicates the problem private String check Valid Location if use Defaults target Location null return null else target Location location Path Field get Text if target Location equals NON NLS 1 return Policy bind Taget Location Selection Dialog location Empty NON NLS 1 else I Path path new Path NON NLS 1 if path is Valid Path target Location return Policy bind Taget Location Selection Dialog invalid Location NON NLS 1 if is Single Checkout I Status location Status Resources Plugin get Workspace validate Project Location get Single Project new Path target Location if location Status isOK return location Status get Message else for int i 0 i target Projects length i Resources Plugin get Workspace validate Project Location target Projects i new Path target Location append target Projects i get Name return null  checkValidLocation useDefaults targetLocation targetLocation locationPathField getText targetLocation TagetLocationSelectionDialog locationEmpty IPath isValidPath targetLocation TagetLocationSelectionDialog invalidLocation isSingleCheckout IStatus locationStatus ResourcesPlugin getWorkspace validateProjectLocation getSingleProject targetLocation locationStatus locationStatus getMessage targetProjects ResourcesPlugin getWorkspace validateProjectLocation targetProjects targetLocation targetProjects getName
Check if the entries in the widget are valid If they are return null otherwise return a string that indicates the problem private String check Valid Name new Project Name this project Name Field get Text I Workspace workspace Resources Plugin get Workspace I Status name Status workspace validate Name new Project Name I Resource PROJECT if name Status isOK return name Status get Message I Project new Project workspace get Root get Project new Project Name if new Project exists return Policy bind Taget Location Selection Dialog already Exists new Project Name NON NLS 1 return null  checkValidName newProjectName projectNameField getText IWorkspace ResourcesPlugin getWorkspace IStatus nameStatus validateName newProjectName IResource nameStatus nameStatus getMessage IProject newProject getRoot getProject newProjectName newProject TagetLocationSelectionDialog alreadyExists newProjectName
return String public String get New Project Name return new Project Name  getNewProjectName newProjectName
return String public String get Target Location return target Location  getTargetLocation targetLocation

private static final int SIZING DIALOG HEIGHT 250 public static CVS Tag get Tag To Compare With Shell shell I Project projects return get Tag To Compare With shell getCVS Folders For projects  SIZING_DIALOG_HEIGHT CVSTag getTagToCompareWith IProject getTagToCompareWith getCVSFoldersFor
public static CVS Tag get Tag To Compare With Shell shell ICVS Folder folders Tag Selection Dialog dialog new Tag Selection Dialog shell folders Policy bind Compare With Tag Action message NON NLS 1 Policy bind Tag Selection Dialog Select a Tag 1 NON NLS 1 Tag Selection Dialog INCLUDE ALL TAGS false show recurse I Help Context Ids COMPARE TAG SELECTION DIALOG dialog set Block On Open true int result dialog open if result Dialog CANCEL return null return dialog get Result  CVSTag getTagToCompareWith ICVSFolder TagSelectionDialog TagSelectionDialog CompareWithTagAction TagSelectionDialog Select_a_Tag_1 TagSelectionDialog INCLUDE_ALL_TAGS IHelpContextIds COMPARE_TAG_SELECTION_DIALOG setBlockOnOpen getResult
Creates a new Tag Selection Dialog param resource The resource to select a version for public Tag Selection Dialog Shell parent Shell I Project projects String title String message int include Flags boolean show Recurse String help Context this parent Shell getCVS Folders For projects title message include Flags show Recurse help Context NON NLS 1  TagSelectionDialog TagSelectionDialog parentShell IProject includeFlags showRecurse helpContext parentShell getCVSFoldersFor includeFlags showRecurse helpContext
private static ICVS Folder getCVS Folders For I Project projects ICVS Folder folders new ICVS Folder projects length for int i 0 i projects length i folders i CVS Workspace Root getCVS Folder For projects i return folders  ICVSFolder getCVSFoldersFor IProject ICVSFolder ICVSFolder CVSWorkspaceRoot getCVSFolderFor
Creates a new Tag Selection Dialog param resource The resource to select a version for public Tag Selection Dialog Shell parent Shell ICVS Folder folders String title String message int include Flags boolean show Recurse String help Context super parent Shell this folders folders this title title this message message this include Flags include Flags this show Recurse show Recurse this help Context help Context set Shell Style get Shell Style SWT RESIZE  TagSelectionDialog TagSelectionDialog parentShell ICVSFolder includeFlags showRecurse helpContext parentShell includeFlags includeFlags showRecurse showRecurse helpContext helpContext setShellStyle getShellStyle
Method declared on Window protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text title  configureShell newShell configureShell newShell newShell setText
Creates this window s widgetry p The default implementation of this framework method creates this window s shell by calling code create Shell code its control by calling code create Contents code and initializes this window s shell bounds by calling code initialize Bounds code This framework method may be overridden however code super create code must be called p public void create super create initialize  createShell createContents initializeBounds
Add buttons to the dialog s button bar param parent the button bar composite protected void create Buttons For Button Bar Composite parent create OK and Cancel buttons by default ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true ok Button set Enabled false create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL okButton setEnabled createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
Creates and returns the contents of the upper part of this dialog above the button bar p The default implementation of this framework method creates and returns a new code Composite code with standard margins and spacing Subclasses should override p param the parent composite to contain the dialog area return the dialog area control protected Control create Dialog Area Composite parent Composite top Composite super create Dialog Area parent Add F1 help if help Context null Workbench Help set Help top help Context Composite inner new Composite top SWT NULL Grid Data data new Grid Data Grid Data FILL BOTH data width Hint SIZING DIALOG WIDTH data height Hint SIZING DIALOG HEIGHT inner set Layout Data data Grid Layout layout new Grid Layout inner set Layout layout Label l new Label inner SWT NONE l set Text message NON NLS 1 tag Tree create Tree inner tag Tree set Input new Project Element folders 0 include Flags tag Tree set Sorter new Project Element Sorter Runnable refresh new Runnable public void run get Shell get Display sync Exec new Runnable public void run tag Tree refresh Create the popup menu Menu Manager menu Mgr new Menu Manager Tree tree tag Tree get Tree Menu menu menu Mgr create Context Menu tree menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager add Menu Item Actions manager menu Mgr set Remove All When Shown true tree set Menu menu if show Recurse final Button recurse Check new Button top SWT CHECK recurse Check set Text Policy bind Tag Selection Dialog recurse Option NON NLS 1 recurse Check add Listener SWT Selection new Listener public void handle Event Event event recurse recurse Check get Selection recurse Check set Selection true Tag Configuration Dialog create Tag Definition Buttons get Shell top folders convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH refresh refresh Label seperator new Label top SWT SEPARATOR SWT HORIZONTAL data new Grid Data Grid Data FILL BOTH data horizontal Span 2 seperator set Layout Data data update Enablement Dialog apply Dialog Font parent return top  createDialogArea createDialogArea helpContext WorkbenchHelp setHelp helpContext GridData GridData GridData FILL_BOTH widthHint SIZING_DIALOG_WIDTH heightHint SIZING_DIALOG_HEIGHT setLayoutData GridLayout GridLayout setLayout setText tagTree createTree tagTree setInput ProjectElement includeFlags tagTree setSorter ProjectElementSorter getShell getDisplay syncExec tagTree MenuManager menuMgr MenuManager tagTree getTree menuMgr createContextMenu menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager addMenuItemActions menuMgr setRemoveAllWhenShown setMenu showRecurse recurseCheck recurseCheck setText TagSelectionDialog recurseOption recurseCheck addListener handleEvent recurseCheck getSelection recurseCheck setSelection TagConfigurationDialog createTagDefinitionButtons getShell convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH GridData GridData FILL_BOTH horizontalSpan setLayoutData updateEnablement applyDialogFont
Utility method that creates a label instance and sets the default layout data param parent the parent for the new label param text the text for the new label return the new label protected Label create Label Composite parent String text Label label new Label parent SWT LEFT label set Text text Grid Data data new Grid Data data horizontal Span 1 data horizontal Alignment Grid Data FILL label set Layout Data data return label  createLabel setText GridData GridData horizontalSpan horizontalAlignment GridData setLayoutData
protected Tree Viewer create Tree Composite parent Tree tree new Tree parent SWT MULTI SWT BORDER tree set Layout Data new Grid Data Grid Data FILL BOTH Tree Viewer result new Tree Viewer tree result set Content Provider new Workbench Content Provider result set Label Provider new Workbench Label Provider result add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Enablement select and close on double click To do use defaultselection instead of double click result get Tree add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e I Structured Selection selection I Structured Selection tag Tree get Selection if selection is Empty selection get First Element instanceof Tag Element ok Pressed result get Control add Key Listener new Key Listener public void key Pressed Key Event event handle Key Pressed event public void key Released Key Event event handle Key Released event result set Sorter new Repository Sorter return result  TreeViewer createTree setLayoutData GridData GridData FILL_BOTH TreeViewer TreeViewer setContentProvider WorkbenchContentProvider setLabelProvider WorkbenchLabelProvider addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateEnablement getTree addMouseListener MouseAdapter mouseDoubleClick MouseEvent IStructuredSelection IStructuredSelection tagTree getSelection isEmpty getFirstElement TagElement okPressed getControl addKeyListener KeyListener keyPressed KeyEvent handleKeyPressed keyReleased KeyEvent handleKeyReleased setSorter RepositorySorter
Returns the selected tag public CVS Tag get Result return result  CVSTag getResult
public boolean get Recursive return recurse  getRecursive
Initializes the dialog contents protected void initialize ok Button set Enabled false  okButton setEnabled
Notifies that the ok button of this dialog has been pressed p The default implementation of this framework method sets this dialog s return code to code Window OK code and closes the dialog Subclasses may override p protected void ok Pressed I Structured Selection selection I Structured Selection tag Tree get Selection Object o selection get First Element Tag Element element Tag Element o result element get Tag super ok Pressed  okPressed IStructuredSelection IStructuredSelection tagTree getSelection getFirstElement TagElement TagElement getTag okPressed
Updates the dialog enablement protected void update Enablement selection I Structured Selection tag Tree get Selection if ok Button null if selection is Empty selection size 1 selection get First Element instanceof Tag Element ok Button set Enabled false else ok Button set Enabled true  updateEnablement IStructuredSelection tagTree getSelection okButton isEmpty getFirstElement TagElement okButton setEnabled okButton setEnabled
public void handle Key Pressed Key Event event if event character SWT DEL event state Mask 0 delete Date Tag  handleKeyPressed KeyEvent stateMask deleteDateTag
private void delete Date Tag Tag Element selected Date Tag Elements get Selected Date Tag Element if selected Date Tag Elements length 0 return for int i 0 i selected Date Tag Elements length i Repository Manager mgr CVSUI Plugin get Plugin get Repository Manager CVS Tag tag selected Date Tag Elements i get Tag if tag get Type CVS Tag DATE mgr remove Date Tag get Location tag tag Tree refresh update Enablement  deleteDateTag TagElement selectedDateTagElements getSelectedDateTagElement selectedDateTagElements selectedDateTagElements RepositoryManager CVSUIPlugin getPlugin getRepositoryManager CVSTag selectedDateTagElements getTag getType CVSTag removeDateTag getLocation tagTree updateEnablement
protected void handle Key Released Key Event event  handleKeyReleased KeyEvent
private ICVS Repository Location get Location Repository Manager mgr CVSUI Plugin get Plugin get Repository Manager ICVS Repository Location location mgr get Repository Location For folders 0 return location  ICVSRepositoryLocation getLocation RepositoryManager CVSUIPlugin getPlugin getRepositoryManager ICVSRepositoryLocation getRepositoryLocationFor
Returns the selected date tag elements private Tag Element get Selected Date Tag Element Array List date Tag Elements null if selection null selection is Empty date Tag Elements new Array List Iterator elements selection iterator while elements has Next Object next CVS Action get Adapter elements next Tag Element class if next instanceof Tag Element if Tag Element next get Tag get Type CVS Tag DATE date Tag Elements add next if date Tag Elements null date Tag Elements is Empty Tag Element result new Tag Element date Tag Elements size date Tag Elements to Array result return result return new Tag Element 0  TagElement getSelectedDateTagElement ArrayList dateTagElements isEmpty dateTagElements ArrayList hasNext CVSAction getAdapter TagElement TagElement TagElement getTag getType CVSTag dateTagElements dateTagElements dateTagElements isEmpty TagElement TagElement dateTagElements dateTagElements toArray TagElement
private void add Date Tag CVS Tag tag if tag null return List date Tags new Array List date Tags add All Arrays as List CVSUI Plugin get Plugin get Repository Manager get Known Tags folders 0 CVS Tag DATE if date Tags contains tag CVSUI Plugin get Plugin get Repository Manager add Date Tag get Location tag try tag Tree get Control set Redraw false tag Tree refresh TODO Hack to instantiate the model before revealing the selection Object expanded tag Tree get Expanded Elements tag Tree expand To Level 2 tag Tree collapse All for int i 0 i expanded length i Object object expanded i tag Tree expand To Level object 1 Reveal the selection tag Tree reveal new Tag Element tag tag Tree set Selection new Structured Selection new Tag Element tag finally tag Tree get Control set Redraw true update Enablement  addDateTag CVSTag dateTags ArrayList dateTags addAll asList CVSUIPlugin getPlugin getRepositoryManager getKnownTags CVSTag dateTags CVSUIPlugin getPlugin getRepositoryManager addDateTag getLocation tagTree getControl setRedraw tagTree tagTree getExpandedElements tagTree expandToLevel tagTree collapseAll tagTree expandToLevel tagTree TagElement tagTree setSelection StructuredSelection TagElement tagTree getControl setRedraw updateEnablement
private void add Menu Item Actions I Menu Manager manager manager add new Action Policy bind Tag Selection Dialog 0 NON NLS 1 public void run CVS Tag date Tag New Date Tag Action get Date Tag get Shell CVSUI Plugin get Plugin get Repository Manager get Repository Location For folders 0 add Date Tag date Tag  addMenuItemActions IMenuManager TagSelectionDialog CVSTag dateTag NewDateTagAction getDateTag getShell CVSUIPlugin getPlugin getRepositoryManager getRepositoryLocationFor addDateTag dateTag
if get Selected Date Tag Element length 0 manager add new Action Policy bind Tag Selection Dialog 1 NON NLS 1 public void run delete Date Tag  getSelectedDateTagElement TagSelectionDialog deleteDateTag
private void add Menu Item Actions I Menu Manager manager manager add new Action Policy bind Tag Selection Dialog 0 NON NLS 1 public void run CVS Tag date Tag New Date Tag Action get Date Tag get Shell CVSUI Plugin get Plugin get Repository Manager get Repository Location For folders 0 add Date Tag date Tag if get Selected Date Tag Element length 0 manager add new Action Policy bind Tag Selection Dialog 1 NON NLS 1 public void run delete Date Tag  addMenuItemActions IMenuManager TagSelectionDialog CVSTag dateTag NewDateTagAction getDateTag getShell CVSUIPlugin getPlugin getRepositoryManager getRepositoryLocationFor addDateTag dateTag getSelectedDateTagElement TagSelectionDialog deleteDateTag

public Text Viewer Action I Text Viewer viewer int operation Code this operation Code operation Code operation Target viewer get Text Operation Target update  TextViewerAction ITextViewer operationCode operationCode operationCode operationTarget getTextOperationTarget
public void update boolean was Enabled is Enabled boolean is Enabled operation Target null operation Target can Do Operation operation Code set Enabled is Enabled if was Enabled is Enabled fire Property Change ENABLED was Enabled Boolean TRUE Boolean FALSE is Enabled Boolean TRUE Boolean FALSE  wasEnabled isEnabled isEnabled operationTarget operationTarget canDoOperation operationCode setEnabled isEnabled wasEnabled isEnabled firePropertyChange wasEnabled isEnabled
public void run if operation Code 1 operation Target null operation Target do Operation operation Code  operationCode operationTarget operationTarget doOperation operationCode

Creates a progress monitor dialog under the given shell The dialog has a standard title and no image code open code is non blocking param parent the parent shell param timeout the delay after which the dialog will be opened during a run public Timeout Progress Monitor Dialog Shell parent int timeout super parent this timeout timeout  TimeoutProgressMonitorDialog
final Display display get Shell get Display display timer Exec timeout new Runnable public void run Shell shell get Shell if shell null shell is Disposed open  getShell getDisplay timerExec getShell isDisposed
Busy Indicator show While display new Runnable public void run try Modal Context run runnable fork get Progress Monitor display catch Invocation Target Exception ite holder 0 ite catch Interrupted Exception ie holder 0 ie  BusyIndicator showWhile ModalContext getProgressMonitor InvocationTargetException InterruptedException
public void run final boolean fork boolean cancelable final I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception set Cancelable cancelable create create the Shell but don t open it yet try running Runnables final Display display get Shell get Display display timer Exec timeout new Runnable public void run Shell shell get Shell if shell null shell is Disposed open final Exception holder new Exception 1 Busy Indicator show While display new Runnable public void run try Modal Context run runnable fork get Progress Monitor display catch Invocation Target Exception ite holder 0 ite catch Interrupted Exception ie holder 0 ie if holder 0 null if holder 0 instanceof Invocation Target Exception throw Invocation Target Exception holder 0 else if holder 0 instanceof Interrupted Exception throw Interrupted Exception holder 0 finally running Runnables close  IRunnableWithProgress InvocationTargetException InterruptedException setCancelable runningRunnables getShell getDisplay timerExec getShell isDisposed BusyIndicator showWhile ModalContext getProgressMonitor InvocationTargetException InterruptedException InvocationTargetException InvocationTargetException InterruptedException InterruptedException runningRunnables
public boolean close if running Runnables 0 return super close return false  runningRunnables

Creates a new User Validation Dialog param parent Shell the parent shell param location the location param default Name the default user name param message a mesage to display to the user public User Validation Dialog Shell parent Shell String location String default Name String message super parent Shell this default Username default Name this domain location this message message  UserValidationDialog parentShell defaultName UserValidationDialog parentShell defaultName parentShell defaultUsername defaultName
see Window configure Shell protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text Policy bind User Validation Dialog required NON NLS 1 set F1 help Workbench Help set Help new Shell I Help Context Ids USER VALIDATION DIALOG  configureShell configureShell newShell configureShell newShell newShell setText UserValidationDialog WorkbenchHelp setHelp newShell IHelpContextIds USER_VALIDATION_DIALOG
see Window create public void create super create add some default values username Field set Text default Username if is Username Mutable give focus to username field username Field select All username Field set Focus else username Field set Editable false password Field set Focus  usernameField setText defaultUsername isUsernameMutable usernameField selectAll usernameField setFocus usernameField setEditable passwordField setFocus
see Dialog create Dialog Area protected Control create Dialog Area Composite parent Composite top new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 top set Layout layout top set Layout Data new Grid Data Grid Data FILL HORIZONTAL Composite image Composite new Composite top SWT NONE layout new Grid Layout image Composite set Layout layout image Composite set Layout Data new Grid Data Grid Data FILL VERTICAL Composite main new Composite top SWT NONE layout new Grid Layout layout num Columns 3 main set Layout layout main set Layout Data new Grid Data Grid Data FILL HORIZONTAL Label image Label new Label image Composite SWT NONE key Lock Image Team Images get Image Descriptor I TeamUI Images IMG KEY LOCK create Image image Label set Image key Lock Image Grid Data data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL image Label set Layout Data data if message null Label message Label new Label main SWT WRAP message Label set Text message data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL data horizontal Span 3 data width Hint 300 message Label set Layout Data data if domain null Label d new Label main SWT WRAP d set Text Policy bind User Validation Dialog 5 NON NLS 1 data new Grid Data d set Layout Data data Label label new Label main SWT WRAP if is Username Mutable label set Text Policy bind User Validation Dialog label User domain NON NLS 1 else label set Text Policy bind User Validation Dialog label Password new Object default Username domain NON NLS 1 data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL data horizontal Span 2 data width Hint 300 label set Layout Data data create Username Fields main create Password Fields main if domain null show Allow Caching Button allow Caching Button new Button main SWT CHECK allow Caching Button set Text Policy bind User Validation Dialog 6 NON NLS 1 data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL data horizontal Span 3 allow Caching Button set Layout Data data allow Caching Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e allow Caching allow Caching Button get Selection Composite warning Composite new Composite main SWT NONE layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Height 0 warning Composite set Layout layout data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 3 warning Composite set Layout Data data Label warning Label new Label warning Composite SWT NONE warning Label set Image get Image DLG IMG MESSAGE WARNING warning Label set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data HORIZONTAL ALIGN BEGINNING Label warning Text new Label warning Composite SWT WRAP warning Text set Text Policy bind User Validation Dialog 7 NON NLS 1 data new Grid Data Grid Data FILL HORIZONTAL data width Hint 300 warning Text set Layout Data data Dialog apply Dialog Font parent return main  createDialogArea createDialogArea GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_HORIZONTAL imageComposite GridLayout imageComposite setLayout imageComposite setLayoutData GridData GridData FILL_VERTICAL GridLayout numColumns setLayout setLayoutData GridData GridData FILL_HORIZONTAL imageLabel imageComposite keyLockImage TeamImages getImageDescriptor ITeamUIImages IMG_KEY_LOCK createImage imageLabel setImage keyLockImage GridData GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL imageLabel setLayoutData messageLabel messageLabel setText GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL horizontalSpan widthHint messageLabel setLayoutData setText UserValidationDialog GridData setLayoutData isUsernameMutable setText UserValidationDialog labelUser setText UserValidationDialog labelPassword defaultUsername GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL horizontalSpan widthHint setLayoutData createUsernameFields createPasswordFields showAllowCachingButton allowCachingButton allowCachingButton setText UserValidationDialog GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL horizontalSpan allowCachingButton setLayoutData allowCachingButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent allowCaching allowCachingButton getSelection warningComposite GridLayout numColumns marginHeight marginHeight warningComposite setLayout GridData GridData FILL_HORIZONTAL horizontalSpan warningComposite setLayoutData warningLabel warningComposite warningLabel setImage getImage DLG_IMG_MESSAGE_WARNING warningLabel setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING GridData HORIZONTAL_ALIGN_BEGINNING warningText warningComposite warningText setText UserValidationDialog GridData GridData FILL_HORIZONTAL widthHint warningText setLayoutData applyDialogFont
Create a spacer protected void create Spacer Composite top int column Span int vert Span Label l new Label top SWT NONE Grid Data data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL data horizontal Span column Span data vertical Span vert Span l set Layout Data data  createSpacer columnSpan vertSpan GridData GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL horizontalSpan columnSpan verticalSpan vertSpan setLayoutData
Creates the three widgets that represent the password entry area param parent the parent of the widgets protected void create Password Fields Composite parent new Label parent SWT NONE set Text Policy bind User Validation Dialog password NON NLS 1 password Field new Text parent SWT BORDER SWT PASSWORD Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 2 data width Hint convert HorizontalDL Us To Pixels I Dialog Constants ENTRY FIELD WIDTH password Field set Layout Data data  createPasswordFields setText UserValidationDialog passwordField GridData GridData GridData FILL_HORIZONTAL horizontalSpan widthHint convertHorizontalDLUsToPixels IDialogConstants ENTRY_FIELD_WIDTH passwordField setLayoutData
Creates the three widgets that represent the user name entry area param parent the parent of the widgets protected void create Username Fields Composite parent new Label parent SWT NONE set Text Policy bind User Validation Dialog user NON NLS 1 username Field new Text parent SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 2 data width Hint convert HorizontalDL Us To Pixels I Dialog Constants ENTRY FIELD WIDTH username Field set Layout Data data  createUsernameFields setText UserValidationDialog usernameField GridData GridData GridData FILL_HORIZONTAL horizontalSpan widthHint convertHorizontalDLUsToPixels IDialogConstants ENTRY_FIELD_WIDTH usernameField setLayoutData
Returns the password entered by the user or null if the user canceled return the entered password public String get Password return password  getPassword
Returns the username entered by the user or null if the user canceled return the entered username public String get Username return username  getUsername
Returns code true code if the save password checkbox was selected return code true code if the save password checkbox was selected and code false code otherwise public boolean get Allow Caching return allow Caching  getAllowCaching allowCaching
Notifies that the ok button of this dialog has been pressed p The default implementation of this framework method sets this dialog s return code to code Window OK code and closes the dialog Subclasses may override p protected void ok Pressed password password Field get Text username username Field get Text super ok Pressed  okPressed passwordField getText usernameField getText okPressed
Sets whether or not the username field should be mutable This method must be called before create otherwise it will be ignored param value whether the username is mutable public void set Username Mutable boolean value is Username Mutable value  setUsernameMutable isUsernameMutable
public void set Show Allow Caching Button boolean value show Allow Caching Button value  setShowAllowCachingButton showAllowCachingButton
public boolean close if key Lock Image null key Lock Image dispose return super close  keyLockImage keyLockImage

public class Version Collator public int compare String revision1 String revision2 if revision1 null revision2 null return 0 if revision1 null return 1 if revision2 null return 1 int revision1 Segments get Int Segments revision1 int revision2 Segments get Int Segments revision2 for int i 0 i revision1 Segments length i revision2 Segments length i int i1 revision1 Segments i int i2 revision2 Segments i if i1 i2 return i1 i2 1 1 if revision1 Segments length revision2 Segments length return revision1 Segments length revision2 Segments length 1 1 return 0  VersionCollator revision1Segments getIntSegments revision2Segments getIntSegments revision1Segments revision2Segments revision1Segments revision2Segments revision1Segments revision2Segments revision1Segments revision2Segments
int get Int Segments String string int size string length if size 0 return new int 0 String Buffer buffer new String Buffer List list new Array List for int i 0 i size i char ch string char At i if ch list add new Integer buffer to String buffer new String Buffer else buffer append ch list add new Integer buffer to String int result new int list size Iterator it list iterator for int i 0 i result length i result i Integer it next int Value return result  getIntSegments StringBuffer StringBuffer ArrayList charAt toString StringBuffer toString intValue

see org eclipse team internal ccvs ui CVS Preference Page get Page Help Context Id protected String get Page Help Context Id return I Help Context Ids WATCH EDIT PREFERENCE PAGE  CVSPreferencePage getPageHelpContextId getPageHelpContextId IHelpContextIds WATCH_EDIT_PREFERENCE_PAGE
see org eclipse team internal ccvs ui CVS Field Editor Preference Page get Page Description protected String get Page Description return Policy bind Watch Edit Preference Page description NON NLS 1  CVSFieldEditorPreferencePage getPageDescription getPageDescription WatchEditPreferencePage
see org eclipse jface preference Field Editor Preference Page create Field Editors protected void create Field Editors add Field new Boolean Field Editor ICVSUI Constants PREF CHECKOUT READ ONLY Policy bind Watch Edit Preference Page checkout Read Only NON NLS 1 Boolean Field Editor DEFAULT get Field Editor Parent action Editor new Radio Group Field Editor ICVSUI Constants PREF EDIT ACTION Policy bind Watch Edit Preference Page validate Edit Save Action NON NLS 1 1 new String Policy bind Watch Edit Preference Page edit ICVSUI Constants PREF EDIT PROMPT EDIT NON NLS 1 Policy bind Watch Edit Preference Page highjack ICVSUI Constants PREF EDIT PROMPT HIGHJACK NON NLS 1 NON NLS 1 NON NLS 2 get Field Editor Parent true add Field action Editor prompt Editor new Radio Group Field Editor ICVSUI Constants PREF EDIT PROMPT Policy bind Watch Edit Preference Page edit Prompt NON NLS 1 1 new String Policy bind Watch Edit Preference Page always Prompt ICVSUI Constants PREF EDIT PROMPT ALWAYS NON NLS 1 Policy bind Watch Edit Preference Page only Prompt ICVSUI Constants PREF EDIT PROMPT IF EDITORS NON NLS 1 Policy bind Watch Edit Preference Page never Prompt ICVSUI Constants PREF EDIT PROMPT NEVER NON NLS 1 NON NLS 1 NON NLS 2 get Field Editor Parent true store getCVS Preference Store add Field prompt Editor  FieldEditorPreferencePage createFieldEditors createFieldEditors addField BooleanFieldEditor ICVSUIConstants PREF_CHECKOUT_READ_ONLY WatchEditPreferencePage checkoutReadOnly BooleanFieldEditor getFieldEditorParent actionEditor RadioGroupFieldEditor ICVSUIConstants PREF_EDIT_ACTION WatchEditPreferencePage validateEditSaveAction WatchEditPreferencePage ICVSUIConstants PREF_EDIT_PROMPT_EDIT WatchEditPreferencePage ICVSUIConstants PREF_EDIT_PROMPT_HIGHJACK getFieldEditorParent addField actionEditor promptEditor RadioGroupFieldEditor ICVSUIConstants PREF_EDIT_PROMPT WatchEditPreferencePage editPrompt WatchEditPreferencePage alwaysPrompt ICVSUIConstants PREF_EDIT_PROMPT_ALWAYS WatchEditPreferencePage onlyPrompt ICVSUIConstants PREF_EDIT_PROMPT_IF_EDITORS WatchEditPreferencePage neverPrompt ICVSUIConstants PREF_EDIT_PROMPT_NEVER getFieldEditorParent getCVSPreferenceStore addField promptEditor
private boolean is Edit Enabled return store get String ICVSUI Constants PREF EDIT ACTION equals ICVSUI Constants PREF EDIT PROMPT EDIT  isEditEnabled getString ICVSUIConstants PREF_EDIT_ACTION ICVSUIConstants PREF_EDIT_PROMPT_EDIT
see org eclipse jface preference I Preference Page perform Ok public boolean perform Ok if super perform Ok return false push Preferences return true  IPreferencePage performOk performOk performOk pushPreferences
private void push Preferences store getCVS Preference Store Preferences target CVS Provider Plugin get Plugin get Plugin Preferences target set Value CVS Provider Plugin READ ONLY store get Boolean ICVSUI Constants PREF CHECKOUT READ ONLY  pushPreferences getCVSPreferenceStore CVSProviderPlugin getPlugin getPluginPreferences setValue CVSProviderPlugin READ_ONLY getBoolean ICVSUIConstants PREF_CHECKOUT_READ_ONLY
public void property Change Property Change Event event if event get Source action Editor prompt Editor set Enabled event get New Value equals ICVSUI Constants PREF EDIT PROMPT EDIT get Field Editor Parent super property Change event  propertyChange PropertyChangeEvent getSource actionEditor promptEditor setEnabled getNewValue ICVSUIConstants PREF_EDIT_PROMPT_EDIT getFieldEditorParent propertyChange
see org eclipse jface preference Field Editor Preference Page initialize protected void initialize super initialize prompt Editor set Enabled is Edit Enabled get Field Editor Parent  FieldEditorPreferencePage promptEditor setEnabled isEditEnabled getFieldEditorParent

param page Name param title param title Image param description public Checkout As Location Selection Page Image Descriptor title Image ICVS Remote Folder remote Folders super NAME Policy bind Checkout As Location Selection Page title title Image Policy bind Checkout As Location Selection Page description NON NLS 1 NON NLS 2 this remote Folders remote Folders  pageName titleImage CheckoutAsLocationSelectionPage ImageDescriptor titleImage ICVSRemoteFolder remoteFolders CheckoutAsLocationSelectionPage titleImage CheckoutAsLocationSelectionPage remoteFolders remoteFolders
return private boolean is Single Folder return remote Folders length 1  isSingleFolder remoteFolders
param string public void set Project I Project project single Project project  setProject IProject singleProject
param string public void set Project Name String string if string null string equals return NON NLS 1 if single Project null single Project get Name equals string return set Project Resources Plugin get Workspace get Root get Project string  setProjectName singleProject singleProject getName setProject ResourcesPlugin getWorkspace getRoot getProject
private I Project get Single Project if single Project null set Project Name remote Folders 0 get Name return single Project  IProject getSingleProject singleProject setProjectName remoteFolders getName singleProject
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e use Defaults use Defaults Button get Selection browse Button set Enabled use Defaults location Path Field set Enabled use Defaults location Label set Enabled use Defaults set Location For Selection true set Error Message use Defaults null check Valid Location  SelectionListener SelectionAdapter widgetSelected SelectionEvent useDefaults useDefaultsButton getSelection browseButton setEnabled useDefaults locationPathField setEnabled useDefaults locationLabel setEnabled useDefaults setLocationForSelection setErrorMessage useDefaults checkValidLocation
public void create Control Composite parent Composite composite create Composite parent 1 set Control composite required in order to use set Button Layout Data initialize Dialog Units composite Workbench Help set Help composite I Help Context Ids CHECKOUT LOCATION SELECTION PAGE final Button use Defaults Button new Button composite SWT CHECK SWT RIGHT use Defaults Button set Text Policy bind Checkout As Location Selection Page use Default Label NON NLS 1 use Defaults Button set Selection this use Defaults create User Specified Project Location Group composite this use Defaults Selection Listener listener new Selection Adapter public void widget Selected Selection Event e use Defaults use Defaults Button get Selection browse Button set Enabled use Defaults location Path Field set Enabled use Defaults location Label set Enabled use Defaults set Location For Selection true set Error Message use Defaults null check Valid Location use Defaults Button add Selection Listener listener Dialog apply Dialog Font parent  createControl createComposite setControl setButtonLayoutData initializeDialogUnits WorkbenchHelp setHelp IHelpContextIds CHECKOUT_LOCATION_SELECTION_PAGE useDefaultsButton useDefaultsButton setText CheckoutAsLocationSelectionPage useDefaultLabel useDefaultsButton setSelection useDefaults createUserSpecifiedProjectLocationGroup useDefaults SelectionListener SelectionAdapter widgetSelected SelectionEvent useDefaults useDefaultsButton getSelection browseButton setEnabled useDefaults locationPathField setEnabled useDefaults locationLabel setEnabled useDefaults setLocationForSelection setErrorMessage useDefaults checkValidLocation useDefaultsButton addSelectionListener applyDialogFont
this browse Button set Text Policy bind Checkout As Location Selection Page browse Label NON NLS 1 this browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Location Browse Button Pressed  browseButton setText CheckoutAsLocationSelectionPage browseLabel browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLocationBrowseButtonPressed
set Location For Selection true location Path Field add Modify Listener new Modify Listener public void modify Text Modify Event e set Error Message check Valid Location  setLocationForSelection locationPathField addModifyListener ModifyListener modifyText ModifyEvent setErrorMessage checkValidLocation
Creates the project location specification controls return the parent of the widgets created param project Group the parent composite param enabled sets the initial enabled state of the widgets private Composite create User Specified Project Location Group Composite parent boolean enabled This group needs 3 columns Composite project Group create Composite parent 3 location label location Label new Label project Group SWT NONE if is Single Folder location Label set Text Policy bind Checkout As Location Selection Page location Label NON NLS 1 else location Label set Text Policy bind Checkout As Location Selection Page parent Directory Label NON NLS 1 location Label set Enabled enabled project location entry field location Path Field new Text project Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH location Path Field set Layout Data data location Path Field set Enabled enabled browse button this browse Button new Button project Group SWT PUSH this browse Button set Text Policy bind Checkout As Location Selection Page browse Label NON NLS 1 this browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Location Browse Button Pressed this browse Button set Enabled enabled set Button Layout Data this browse Button Set the initial value first before listener to avoid handling an event during the creation set Location For Selection true location Path Field add Modify Listener new Modify Listener public void modify Text Modify Event e set Error Message check Valid Location return project Group  projectGroup createUserSpecifiedProjectLocationGroup projectGroup createComposite locationLabel projectGroup isSingleFolder locationLabel setText CheckoutAsLocationSelectionPage locationLabel locationLabel setText CheckoutAsLocationSelectionPage parentDirectoryLabel locationLabel setEnabled locationPathField projectGroup GridData GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH locationPathField setLayoutData locationPathField setEnabled browseButton projectGroup browseButton setText CheckoutAsLocationSelectionPage browseLabel browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLocationBrowseButtonPressed browseButton setEnabled setButtonLayoutData browseButton setLocationForSelection locationPathField addModifyListener ModifyListener modifyText ModifyEvent setErrorMessage checkValidLocation projectGroup
Check if the entry in the widget location is valid If it is valid return null Otherwise return a string that indicates the problem private String check Valid Location if use Defaults target Location null return null else target Location location Path Field get Text if target Location equals NON NLS 1 return Policy bind Checkout As Location Selection Page location Empty NON NLS 1 else I Path path new Path NON NLS 1 if path is Valid Path target Location return Policy bind Checkout As Location Selection Page invalid Location NON NLS 1 if is Single Folder I Status location Status Resources Plugin get Workspace validate Project Location get Single Project new Path target Location if location Status isOK return location Status get Message else for int i 0 i remote Folders length i String project Name remote Folders i get Name I Status location Status Resources Plugin get Workspace validate Project Location Resources Plugin get Workspace get Root get Project project Name new Path target Location append project Name if location Status isOK return location Status get Message return null  checkValidLocation useDefaults targetLocation targetLocation locationPathField getText targetLocation CheckoutAsLocationSelectionPage locationEmpty IPath isValidPath targetLocation CheckoutAsLocationSelectionPage invalidLocation isSingleFolder IStatus locationStatus ResourcesPlugin getWorkspace validateProjectLocation getSingleProject targetLocation locationStatus locationStatus getMessage remoteFolders projectName remoteFolders getName IStatus locationStatus ResourcesPlugin getWorkspace validateProjectLocation ResourcesPlugin getWorkspace getRoot getProject projectName targetLocation projectName locationStatus locationStatus getMessage
Set the location to the default location if we are set to use Defaults private void set Location For Selection boolean changed if use Defaults I Path default Path null if is Single Folder I Project single Project get Single Project if single Project null try default Path single Project get Description get Location catch Core Exception e ignore if default Path null default Path Platform get Location append single Project get Name else default Path Platform get Location if default Path null location Path Field set Text default Path toOS String target Location null else if changed I Path location null I Project project get Single Project if project null try location project get Description get Location catch Core Exception e ignore the exception if location null target Location null location Path Field set Text NON NLS 1 else if is Single Folder target Location location toOS String else target Location location remove Last Segments 1 toOS String location Path Field set Text target Location  useDefaults setLocationForSelection useDefaults IPath defaultPath isSingleFolder IProject singleProject getSingleProject singleProject defaultPath singleProject getDescription getLocation CoreException defaultPath defaultPath getLocation singleProject getName defaultPath getLocation defaultPath locationPathField setText defaultPath toOSString targetLocation IPath IProject getSingleProject getDescription getLocation CoreException targetLocation locationPathField setText isSingleFolder targetLocation toOSString targetLocation removeLastSegments toOSString locationPathField setText targetLocation
Open an appropriate directory browser private void handle Location Browse Button Pressed Directory Dialog dialog new Directory Dialog location Path Field get Shell if is Single Folder dialog set Message Policy bind Checkout As Location Selection Page message For Single get Single Project get Name NON NLS 1 else dialog set Message Policy bind Checkout As Location Selection Page message For Multi new Integer remote Folders length to String NON NLS 1 String dir Name location Path Field get Text if dir Name equals NON NLS 1 File path new File dir Name if path exists dialog set Filter Path dir Name String selected Directory dialog open if selected Directory null if is Single Folder location Path Field set Text new Path selected Directory append get Single Project get Name toOS String else location Path Field set Text new Path selected Directory toOS String target Location location Path Field get Text  handleLocationBrowseButtonPressed DirectoryDialog DirectoryDialog locationPathField getShell isSingleFolder setMessage CheckoutAsLocationSelectionPage messageForSingle getSingleProject getName setMessage CheckoutAsLocationSelectionPage messageForMulti remoteFolders toString dirName locationPathField getText dirName dirName setFilterPath dirName selectedDirectory selectedDirectory isSingleFolder locationPathField setText selectedDirectory getSingleProject getName toOSString locationPathField setText selectedDirectory toOSString targetLocation locationPathField getText
Return the custom location for a single project In this case the specified location is used as the location of the project param project return public String get Target Location if is Custom Location Specified return target Location else return null  getTargetLocation isCustomLocationSpecified targetLocation
return private boolean is Custom Location Specified return use Defaults  isCustomLocationSpecified useDefaults

param page Name param title param title Image param description public Checkout As Main Page Image Descriptor title Image ICVS Remote Folder folders boolean allow Project Configuration super NAME Policy bind Checkout As Main Page title title Image Policy bind Checkout As Main Page description NON NLS 1 NON NLS 2 this folders folders this allow Project Configuration allow Project Configuration  pageName titleImage CheckoutAsMainPage ImageDescriptor titleImage ICVSRemoteFolder allowProjectConfiguration CheckoutAsMainPage titleImage CheckoutAsMainPage allowProjectConfiguration allowProjectConfiguration
public void create Control Composite parent Composite composite create Composite parent 1 set Control composite Workbench Help set Help composite I Help Context Ids CHECKOUT CONFIGURATION PAGE if is Single Folder create Single Folder Area composite else create Multiple Folders Area composite update Enablements Dialog apply Dialog Font parent  createControl createComposite setControl WorkbenchHelp setHelp IHelpContextIds CHECKOUT_CONFIGURATION_PAGE isSingleFolder createSingleFolderArea createMultipleFoldersArea updateEnablements applyDialogFont
Is the input to the wizard a single folder or multiple folders private boolean is Single Folder return folders length 1  isSingleFolder
private String get Folder Name String name folders 0 get Name if name equals NON NLS 1 name new Path folders 0 get Repository get Root Directory last Segment return name  getFolderName getName getRepository getRootDirectory lastSegment
private void create Single Folder Area Composite composite create Label composite Policy bind Checkout As Main Page single Folder get Folder Name NON NLS 1 configured Project Button create Radio Button composite Policy bind Checkout As Main Page as Configured Project 1 NON NLS 1 if allow Project Configuration configured Project Button set Enabled false Label configured Label create Wrapping Label composite Policy bind Checkout As Main Page 10 5 NON NLS 1 configured Label set Enabled false create Checkout As Project Radio Area composite create Checkout Into Radio Area composite if allow Project Configuration configured Project Button set Selection true else simple Project Button set Selection true  createSingleFolderArea createLabel CheckoutAsMainPage singleFolder getFolderName configuredProjectButton createRadioButton CheckoutAsMainPage asConfiguredProject allowProjectConfiguration configuredProjectButton setEnabled configuredLabel createWrappingLabel CheckoutAsMainPage configuredLabel setEnabled createCheckoutAsProjectRadioArea createCheckoutIntoRadioArea allowProjectConfiguration configuredProjectButton setSelection simpleProjectButton setSelection
private void create Multiple Folders Area Composite composite create Label composite Policy bind Checkout As Main Page multiple Folders new Integer folders length to String NON NLS 1 create Checkout As Project Radio Area composite create Checkout Into Radio Area composite simple Project Button set Selection true  createMultipleFoldersArea createLabel CheckoutAsMainPage multipleFolders toString createCheckoutAsProjectRadioArea createCheckoutIntoRadioArea simpleProjectButton setSelection
param composite private void create Checkout As Project Radio Area Composite composite if is Single Folder simple Project Button create Radio Button composite Policy bind Checkout As Main Page as Simple Project 1 NON NLS 1 create Project Name Group composite else simple Project Button create Radio Button composite Policy bind Checkout As Main Page as Projects 1 NON NLS 1  createCheckoutAsProjectRadioArea isSingleFolder simpleProjectButton createRadioButton CheckoutAsMainPage asSimpleProject createProjectNameGroup simpleProjectButton createRadioButton CheckoutAsMainPage asProjects
param composite private void create Checkout Into Radio Area Composite composite into Project Button create Radio Button composite Policy bind Checkout As Main Page into Project 1 NON NLS 1  createCheckoutIntoRadioArea intoProjectButton createRadioButton CheckoutAsMainPage intoProject
Set the listener to capture modify events project Name Field add Modify Listener new Modify Listener public void modify Text Modify Event e update Enablements  projectNameField addModifyListener ModifyListener modifyText ModifyEvent updateEnablements
Creates the project name specification controls param parent the parent composite private void create Project Name Group Composite parent project specification group Composite project Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 project Group set Layout layout project Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL new project label Label project Label new Label project Group SWT NONE project Label set Text Policy bind Checkout As Main Page project Name Label NON NLS 1 new project name entry field project Name Field new Text project Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL project Name Field set Layout Data data Set the initial value first before listener to avoid handling an event during the creation new Project Name get Folder Name project Name Field set Text new Project Name project Name Field select All Set the listener to capture modify events project Name Field add Modify Listener new Modify Listener public void modify Text Modify Event e update Enablements  createProjectNameGroup projectGroup GridLayout GridLayout numColumns projectGroup setLayout projectGroup setLayoutData GridData GridData FILL_HORIZONTAL projectLabel projectGroup projectLabel setText CheckoutAsMainPage projectNameLabel projectNameField projectGroup GridData GridData GridData FILL_HORIZONTAL projectNameField setLayoutData newProjectName getFolderName projectNameField setText newProjectName projectNameField selectAll projectNameField addModifyListener ModifyListener modifyText ModifyEvent updateEnablements
Check if the entries in the widget are valid If they are return null otherwise return a string that indicates the problem private void update Enablements if project Name Field null project Name Field set Enabled simple Project Button get Selection if project Name Field is Enabled new Project Name this project Name Field get Text I Workspace workspace Resources Plugin get Workspace I Status name Status workspace validate Name new Project Name I Resource PROJECT if name Status isOK set Error Message name Status get Message set Page Complete false set Error Message null set Page Complete true  updateEnablements projectNameField projectNameField setEnabled simpleProjectButton getSelection projectNameField isEnabled newProjectName projectNameField getText IWorkspace ResourcesPlugin getWorkspace IStatus nameStatus validateName newProjectName IResource nameStatus setErrorMessage nameStatus getMessage setPageComplete setErrorMessage setPageComplete
public String get Project Name if is Single Folder simple Project Button get Selection return new Project Name return null  getProjectName isSingleFolder simpleProjectButton getSelection newProjectName
public boolean is Perform Configure if configured Project Button null return false return configured Project Button get Selection  isPerformConfigure configuredProjectButton configuredProjectButton getSelection
public boolean is Perform Checkout Into return into Project Button get Selection  isPerformCheckoutInto intoProjectButton getSelection
public boolean is Perform Checkout As return simple Project Button get Selection  isPerformCheckoutAs simpleProjectButton getSelection
Button radio super create Radio Button parent label span radio add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Enablements  createRadioButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateEnablements
protected Button create Radio Button Composite parent String label int span Button radio super create Radio Button parent label span radio add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Enablements return radio  createRadioButton createRadioButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateEnablements

Constructor for Checkout Into Project Selection Page param page Name param title param title Image public Checkout As Project Selection Page Image Descriptor title Image ICVS Remote Folder remote Folders super NAME Policy bind Checkout As Project Selection Page title title Image Policy bind Checkout As Project Selection Page description NON NLS 1 NON NLS 2 this remote Folders remote Folders  CheckoutIntoProjectSelectionPage pageName titleImage CheckoutAsProjectSelectionPage ImageDescriptor titleImage ICVSRemoteFolder remoteFolders CheckoutAsProjectSelectionPage titleImage CheckoutAsProjectSelectionPage remoteFolders remoteFolders
return private boolean is Single Folder return remote Folders length 1  isSingleFolder remoteFolders
For the single folder case return the name of the folder private String get Input Folder Name return remote Folders 0 get Name  getInputFolderName remoteFolders getName
private String get Repository throws CVS Exception return remote Folders 0 get Folder Sync Info get Root  getRepository CVSException remoteFolders getFolderSyncInfo getRoot
name Field create Text Field composite name Field add Listener SWT Modify new Listener public void handle Event Event event folder Name name Field get Text update Widget Enablements  nameField createTextField nameField addListener handleEvent folderName nameField getText updateWidgetEnablements
tree create Resource Selection Tree composite I Resource PROJECT I Resource FOLDER 2 horizontal span tree add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Resource Selection event  createResourceSelectionTree IResource IResource addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleResourceSelection
filter List create Combo filter Composite filter List add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Filter Selection  filterList createCombo filterComposite filterList addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleFilterSelection
recurse Check create Check Box composite Policy bind Checkout As Project Selection Page recurse NON NLS 1 recurse Check add Listener SWT Selection new Listener public void handle Event Event event recurse recurse Check get Selection update Widget Enablements  recurseCheck createCheckBox CheckoutAsProjectSelectionPage recurseCheck addListener handleEvent recurseCheck getSelection updateWidgetEnablements
see org eclipse jface dialogs I Dialog Page create Control org eclipse swt widgets Composite public void create Control Composite parent Composite composite create Composite parent 2 set Control composite Workbench Help set Help composite I Help Context Ids CHECKOUT PROJECT SELECTION PAGE if is Single Folder create Label composite Policy bind Checkout As Project Selection Page name NON NLS 1 name Field create Text Field composite name Field add Listener SWT Modify new Listener public void handle Event Event event folder Name name Field get Text update Widget Enablements create Wrapping Label composite Policy bind Checkout As Project Selection Page tree Label 0 2 NON NLS 1 tree create Resource Selection Tree composite I Resource PROJECT I Resource FOLDER 2 horizontal span tree add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Resource Selection event Composite filter Composite create Composite composite 2 Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL data horizontal Span 2 filter Composite set Layout Data data create Label filter Composite Policy bind Checkout As Project Selection Page show Label NON NLS 1 filter List create Combo filter Composite filter List add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Filter Selection create Wrapping Label composite 0 2 NON NLS 1 Should subfolders of the folder be checked out recurse Check create Check Box composite Policy bind Checkout As Project Selection Page recurse NON NLS 1 recurse Check add Listener SWT Selection new Listener public void handle Event Event event recurse recurse Check get Selection update Widget Enablements initialize Values update Widget Enablements tree get Control set Focus Dialog apply Dialog Font parent  IDialogPage createControl createControl createComposite setControl WorkbenchHelp setHelp IHelpContextIds CHECKOUT_PROJECT_SELECTION_PAGE isSingleFolder createLabel CheckoutAsProjectSelectionPage nameField createTextField nameField addListener handleEvent folderName nameField getText updateWidgetEnablements createWrappingLabel CheckoutAsProjectSelectionPage treeLabel createResourceSelectionTree IResource IResource addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleResourceSelection filterComposite createComposite GridData GridData verticalAlignment GridData horizontalAlignment GridData horizontalSpan filterComposite setLayoutData createLabel filterComposite CheckoutAsProjectSelectionPage showLabel filterList createCombo filterComposite filterList addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleFilterSelection createWrappingLabel recurseCheck createCheckBox CheckoutAsProjectSelectionPage recurseCheck addListener handleEvent recurseCheck getSelection updateWidgetEnablements initializeValues updateWidgetEnablements getControl setFocus applyDialogFont
Method initialize Values private void initialize Values if is Single Folder name Field set Text get Input Folder Name tree set Input Resources Plugin get Workspace get Root recurse true recurse Check set Selection recurse filter 0 update Tree Contents filter filter List add Policy bind Checkout As Project Selection Page show All NON NLS 1 filter List add Policy bind Checkout As Project Selection Page show Unshared NON NLS 1 filter List add Policy bind Checkout As Project Selection Page show Same Repo NON NLS 1 filter List select filter  initializeValues initializeValues isSingleFolder nameField setText getInputFolderName setInput ResourcesPlugin getWorkspace getRoot recurseCheck setSelection updateTreeContents filterList CheckoutAsProjectSelectionPage showAll filterList CheckoutAsProjectSelectionPage showUnshared filterList CheckoutAsProjectSelectionPage showSameRepo filterList
private void handle Resource Selection Selection Changed Event event I Selection sel event get Selection if sel is Empty this selection null else if sel instanceof I Structured Selection this selection I Resource I Structured Selection sel get First Element update Widget Enablements  handleResourceSelection SelectionChangedEvent ISelection getSelection isEmpty IStructuredSelection IResource IStructuredSelection getFirstElement updateWidgetEnablements
Method update Widget Enablement private void update Widget Enablements if is Single Folder Path EMPTY is Valid Segment folder Name set Page Complete false set Error Message Policy bind Checkout As Project Selection Page invalid Folder Name folder Name NON NLS 1 return boolean complete selection null selection get Type I Resource FILE set Error Message null set Page Complete complete  updateWidgetEnablement updateWidgetEnablements isSingleFolder isValidSegment folderName setPageComplete setErrorMessage CheckoutAsProjectSelectionPage invalidFolderName folderName getType IResource setErrorMessage setPageComplete
Returns the selection return I Resource public I Resource get Selection return selection  IResource IResource getSelection
Returns the folder Name return String public String get Folder Name return folder Name  folderName getFolderName folderName
private void update Tree Contents int selected try if selected 0 tree set Input new Adaptable Resource List get Projects get Repository true else if selected 1 tree set Input new Adaptable Resource List get Projects null true else if selected 2 tree set Input new Adaptable Resource List get Projects get Repository false catch CVS Exception e CVSUI Plugin log e  updateTreeContents setInput AdaptableResourceList getProjects getRepository setInput AdaptableResourceList getProjects setInput AdaptableResourceList getProjects getRepository CVSException CVSUIPlugin
Method get Valid Target Projects returns the set of projects that match the provided criteria return I Resource private I Project get Projects String root boolean unshared throws CVS Exception List valid Targets new Array List try I Resource projects Resources Plugin get Workspace get Root members for int i 0 i projects length i I Resource resource projects i if resource instanceof I Project I Project project I Project resource if project is Accessible Repository Provider provider Repository Provider get Provider project if provider null unshared valid Targets add project else if provider null provider getID equals CVS Provider Plugin get Type Id ICVS Folder cvs Folder CVS Workspace Root getCVS Folder For project Folder Sync Info info cvs Folder get Folder Sync Info if root null info null root equals info get Root valid Targets add project catch Core Exception e throw CVS Exception wrap Exception e return I Project valid Targets to Array new I Project valid Targets size  getValidTargetProjects IResource IProject getProjects CVSException validTargets ArrayList IResource ResourcesPlugin getWorkspace getRoot IResource IProject IProject IProject isAccessible RepositoryProvider RepositoryProvider getProvider validTargets CVSProviderPlugin getTypeId ICVSFolder cvsFolder CVSWorkspaceRoot getCVSFolderFor FolderSyncInfo cvsFolder getFolderSyncInfo getRoot validTargets CoreException CVSException wrapException IProject validTargets toArray IProject validTargets
public I Container get Local Folder if Path EMPTY is Valid Segment folder Name return I Container get Selection get Folder new Path folder Name else return null  IContainer getLocalFolder isValidSegment folderName IContainer getSelection getFolder folderName
public I Container get Parent Folder return I Container get Selection  IContainer getParentFolder IContainer getSelection
Returns the recurse return boolean public boolean is Recurse return recurse  isRecurse
private void handle Filter Selection filter filter List get Selection Index update Tree Contents filter  handleFilterSelection filterList getSelectionIndex updateTreeContents

private I Project new Project null see I Resource Change Listener resource Changed I Resource Change Event public void resource Changed I Resource Change Event event I Resource Delta root event get Delta I Resource Delta project Deltas root get Affected Children for int i 0 i project Deltas length i I Resource Delta delta project Deltas i I Resource resource delta get Resource if delta get Kind I Resource Delta ADDED new Project I Project resource  IProject newProject IResourceChangeListener resourceChanged IResourceChangeEvent resourceChanged IResourceChangeEvent IResourceDelta getDelta IResourceDelta projectDeltas getAffectedChildren projectDeltas IResourceDelta projectDeltas IResource getResource getKind IResourceDelta newProject IProject
Gets the new Project return Returns a I Project public I Project get New Project return new Project  newProject IProject IProject getNewProject newProject
public Checkout As Wizard I Workbench Part part ICVS Remote Folder remote Folders boolean allow Project Configuration this part part this remote Folders remote Folders set Window Title Policy bind Checkout As Wizard title NON NLS 1 this allow Project Configuration allow Project Configuration  CheckoutAsWizard IWorkbenchPart ICVSRemoteFolder remoteFolders allowProjectConfiguration remoteFolders remoteFolders setWindowTitle CheckoutAsWizard allowProjectConfiguration allowProjectConfiguration
see org eclipse jface wizard I Wizard add Pages public void add Pages set Needs Progress Monitor true Image Descriptor subst Image CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG WIZBAN CHECKOUT main Page new Checkout As Main Page subst Image remote Folders allow Project Configuration add Page main Page project Selection Page new Checkout As Project Selection Page subst Image remote Folders add Page project Selection Page location Selection Page new Checkout As Location Selection Page subst Image remote Folders add Page location Selection Page tag Selection Page new Tag Selection Wizard Page tag Page Policy bind Checkout As Wizard 3 subst Image Policy bind Checkout As Wizard 4 Policy bind Checkout As Wizard 5 Project Element INCLUDE ALL TAGS NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 tag Selection Page set Folders remote Folders tag Selection Page set Help Contxt Id I Help Context Ids CHECKOUT TAG SELETION PAGE add Page tag Selection Page  IWizard addPages addPages setNeedsProgressMonitor ImageDescriptor substImage CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_WIZBAN_CHECKOUT mainPage CheckoutAsMainPage substImage remoteFolders allowProjectConfiguration addPage mainPage projectSelectionPage CheckoutAsProjectSelectionPage substImage remoteFolders addPage projectSelectionPage locationSelectionPage CheckoutAsLocationSelectionPage substImage remoteFolders addPage locationSelectionPage tagSelectionPage TagSelectionWizardPage tagPage CheckoutAsWizard substImage CheckoutAsWizard CheckoutAsWizard ProjectElement INCLUDE_ALL_TAGS tagSelectionPage setFolders remoteFolders tagSelectionPage setHelpContxtId IHelpContextIds CHECKOUT_TAG_SELETION_PAGE addPage tagSelectionPage
public boolean perform Finish try if main Page is Perform Configure return perform Configure And Checkout else if main Page is Perform Checkout As if is Single Folder return perform Single Checkout As else return perform Multiple Checkout As else if main Page is Perform Checkout Into return perform Checkout Into catch Invocation Target Exception e handle e drop through catch Interrupted Exception e drop through return false  performFinish mainPage isPerformConfigure performConfigureAndCheckout mainPage isPerformCheckoutAs isSingleFolder performSingleCheckoutAs performMultipleCheckoutAs mainPage isPerformCheckoutInto performCheckoutInto InvocationTargetException InterruptedException
return private boolean is Single Folder return remote Folders length 1  isSingleFolder remoteFolders
public boolean can Finish return main Page is Page Complete main Page is Perform Configure main Page is Perform Checkout Into project Selection Page is Page Complete main Page is Perform Checkout As location Selection Page is Page Complete  canFinish mainPage isPageComplete mainPage isPerformConfigure mainPage isPerformCheckoutInto projectSelectionPage isPageComplete mainPage isPerformCheckoutAs locationSelectionPage isPageComplete
public I Wizard Page get Next Page I Wizard Page page if page main Page if main Page is Perform Configure return tag Selection Page if main Page is Perform Checkout Into return project Selection Page if main Page is Perform Checkout As if is Single Folder location Selection Page set Project Name main Page get Project Name else location Selection Page set Project null return location Selection Page The tag selection page is always shown as the last page if page tag Selection Page return tag Selection Page return null  IWizardPage getNextPage IWizardPage mainPage mainPage isPerformConfigure tagSelectionPage mainPage isPerformCheckoutInto projectSelectionPage mainPage isPerformCheckoutAs isSingleFolder locationSelectionPage setProjectName mainPage getProjectName locationSelectionPage setProject locationSelectionPage tagSelectionPage tagSelectionPage
private void handle Throwable e CVSUI Plugin open Error get Shell Policy bind Checkout As Wizard error null e NON NLS 1  CVSUIPlugin openError getShell CheckoutAsWizard
private boolean perform Configure And Checkout throws Invocation Target Exception Interrupted Exception I Project new Project get New Project if new Project null return false Run the checkout in the background ICVS Remote Folder folder get Remote Folder new Checkout Single Project Operation part folder new Project null true run return true  performConfigureAndCheckout InvocationTargetException InterruptedException IProject newProject getNewProject newProject ICVSRemoteFolder getRemoteFolder CheckoutSingleProjectOperation newProject
private ICVS Remote Folder get Remote Folder ICVS Remote Folder folder remote Folders 0 folder ICVS Remote Folder folder for Tag get Selected Tag return folder  ICVSRemoteFolder getRemoteFolder ICVSRemoteFolder remoteFolders ICVSRemoteFolder forTag getSelectedTag
private ICVS Remote Folder get Remote Folders ICVS Remote Folder folders new ICVS Remote Folder remote Folders length for int i 0 i remote Folders length i ICVS Remote Folder remote remote Folders i folders i ICVS Remote Folder remote for Tag get Selected Tag return folders  ICVSRemoteFolder getRemoteFolders ICVSRemoteFolder ICVSRemoteFolder remoteFolders remoteFolders ICVSRemoteFolder remoteFolders ICVSRemoteFolder forTag getSelectedTag
private CVS Tag get Selected Tag return tag Selection Page get Selected Tag  CVSTag getSelectedTag tagSelectionPage getSelectedTag
private boolean perform Single Checkout As throws Invocation Target Exception Interrupted Exception I Project new Project Resources Plugin get Workspace get Root get Project main Page get Project Name String target Location location Selection Page get Target Location Run the checkout in the background ICVS Remote Folder folder get Remote Folder new Checkout Single Project Operation part folder new Project target Location false run return true  performSingleCheckoutAs InvocationTargetException InterruptedException IProject newProject ResourcesPlugin getWorkspace getRoot getProject mainPage getProjectName targetLocation locationSelectionPage getTargetLocation ICVSRemoteFolder getRemoteFolder CheckoutSingleProjectOperation newProject targetLocation
Check out multiple folders to the workspace using a custom location if one is specified private boolean perform Multiple Checkout As throws Invocation Target Exception Interrupted Exception String target Location location Selection Page get Target Location Run the checkout in the background new Checkout Multiple Projects Operation part get Remote Folders target Location run return true  performMultipleCheckoutAs InvocationTargetException InterruptedException targetLocation locationSelectionPage getTargetLocation CheckoutMultipleProjectsOperation getRemoteFolders targetLocation
private boolean perform Checkout Into throws Invocation Target Exception Interrupted Exception Checkout Into Operation operation boolean recursive project Selection Page is Recurse if is Single Folder ICVS Remote Folder folder get Remote Folder operation new Checkout Into Operation part folder project Selection Page get Local Folder recursive else operation new Checkout Into Operation part get Remote Folders project Selection Page get Parent Folder recursive Run the checkout in the background operation run return true  performCheckoutInto InvocationTargetException InterruptedException CheckoutIntoOperation projectSelectionPage isRecurse isSingleFolder ICVSRemoteFolder getRemoteFolder CheckoutIntoOperation projectSelectionPage getLocalFolder CheckoutIntoOperation getRemoteFolders projectSelectionPage getParentFolder
Get a new project that is configured by the new project wizard This is currently the only way to do this private I Project get New Project New Project Listener listener new New Project Listener Resources Plugin get Workspace add Resource Change Listener listener I Resource Change Event POST CHANGE new New Project Action PlatformUI get Workbench get Active Workbench Window run Resources Plugin get Workspace remove Resource Change Listener listener I Project project listener get New Project return project  IProject getNewProject NewProjectListener NewProjectListener ResourcesPlugin getWorkspace addResourceChangeListener IResourceChangeEvent POST_CHANGE NewProjectAction getWorkbench getActiveWorkbenchWindow ResourcesPlugin getWorkspace removeResourceChangeListener IProject getNewProject

private CVS Wizard Page dummy Page public Checkout Wizard set Window Title Checkout from CVS NON NLS 1  CVSWizardPage dummyPage CheckoutWizard setWindowTitle
Dummy page to allow lazy creation of Checkout As Wizard dummy Page new CVS Wizard Page dummy Page NON NLS 1 public void create Control Composite parent Composite composite create Composite parent 1 set Control composite  CheckoutAsWizard dummyPage CVSWizardPage dummyPage createControl createComposite setControl
public void add Pages set Needs Progress Monitor true Image Descriptor subst Image CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG WIZBAN CHECKOUT ICVS Repository Location locations CVSUI Plugin get Plugin get Repository Manager get Known Repository Locations if locations length 0 location Page new Repository Selection Page location Selection Policy bind Checkout Wizard 7 subst Image NON NLS 1 NON NLS 2 location Page set Description Policy bind Sharing Wizard import Title Description NON NLS 1 location Page set Extended Description Policy bind Checkout Wizard 8 NON NLS 1 add Page location Page create Location Page new Configuration Wizard Main Page create Location Page Policy bind Sharing Wizard enter Information subst Image NON NLS 1 NON NLS 2 create Location Page set Description Policy bind Sharing Wizard enter Information Description NON NLS 1 add Page create Location Page create Location Page set Dialog Settings New Location Wizard get Location Dialog Settings module Page new Module Selection Page module Selection Policy bind Checkout Wizard 10 subst Image NON NLS 1 NON NLS 2 module Page set Description Policy bind Checkout Wizard 11 NON NLS 1 module Page set Help Contxt Id I Help Context Ids CHECKOUT MODULE SELECTION PAGE module Page set Supports Multi Selection true add Page module Page Dummy page to allow lazy creation of Checkout As Wizard dummy Page new CVS Wizard Page dummy Page NON NLS 1 public void create Control Composite parent Composite composite create Composite parent 1 set Control composite add Page dummy Page  addPages setNeedsProgressMonitor ImageDescriptor substImage CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_WIZBAN_CHECKOUT ICVSRepositoryLocation CVSUIPlugin getPlugin getRepositoryManager getKnownRepositoryLocations locationPage RepositorySelectionPage locationSelection CheckoutWizard substImage locationPage setDescription SharingWizard importTitleDescription locationPage setExtendedDescription CheckoutWizard addPage locationPage createLocationPage ConfigurationWizardMainPage createLocationPage SharingWizard enterInformation substImage createLocationPage setDescription SharingWizard enterInformationDescription addPage createLocationPage createLocationPage setDialogSettings NewLocationWizard getLocationDialogSettings modulePage ModuleSelectionPage moduleSelection CheckoutWizard substImage modulePage setDescription CheckoutWizard modulePage setHelpContxtId IHelpContextIds CHECKOUT_MODULE_SELECTION_PAGE modulePage setSupportsMultiSelection addPage modulePage CheckoutAsWizard dummyPage CVSWizardPage dummyPage createControl createComposite setControl addPage dummyPage
see org eclipse jface wizard Wizard can Finish public boolean can Finish return wizard null get Selected Modules length 0 wizard null wizard can Finish  canFinish canFinish getSelectedModules canFinish
public boolean perform Finish if wizard null The finish of the child wizard will get called directly We only get here if it completed successfully if is New Location Known Repositories get Instance add Repository location true broadcast return true else try new Checkout Multiple Projects Operation get Part get Selected Modules null run if is New Location Known Repositories get Instance add Repository location true broadcast return true catch Invocation Target Exception e CVSUI Plugin open Error get Shell null null e catch Interrupted Exception e Cancelled fall through return false  performFinish isNewLocation KnownRepositories getInstance addRepository CheckoutMultipleProjectsOperation getPart getSelectedModules isNewLocation KnownRepositories getInstance addRepository InvocationTargetException CVSUIPlugin openError getShell InterruptedException
private I Workbench Part get Part This wizard doesn t have a part return null  IWorkbenchPart getPart
public boolean perform Cancel if location null is New Location Known Repositories get Instance dispose Repository location location null return wizard null wizard perform Cancel  performCancel isNewLocation KnownRepositories getInstance disposeRepository performCancel
public I Wizard Page get Next Page I Wizard Page page Assume the page is about to be shown when this method is invoked return get Next Page page true about to show  IWizardPage getNextPage IWizardPage getNextPage
public I Wizard Page get Next Page I Wizard Page page boolean about To Show if page location Page if location Page get Location null return create Location Page else if about To Show try module Page set Location get Location catch Team Exception e1 CVSUI Plugin log e1 return module Page if page create Location Page if about To Show try ICVS Repository Location l get Location if l null module Page set Location l catch Team Exception e1 CVSUI Plugin log e1 return module Page if page module Page ICVS Remote Folder selected Modules get Selected Modules if selected Modules length 0 return null for int i 0 i selected Modules length i ICVS Remote Folder folder selected Modules i if folder is Defined Module No further configuration is possible for defined modules return null if about To Show try boolean has Metafile true if selected Modules length 1 Only allow configuration if one module is selected has Metafile has Project Metafile selected Modules 0 wizard new Checkout As Wizard get Part selected Modules has Metafile allow configuration wizard add Pages return wizard get Starting Page catch Invocation Target Exception e Show the error and fall through to return null as the next page CVSUI Plugin open Error get Shell null null e catch Interrupted Exception e Cancelled by user Fall through and return null return null else if wizard null return dummy Page else return wizard get Starting Page if wizard null return wizard get Next Page page return null  IWizardPage getNextPage IWizardPage aboutToShow locationPage locationPage getLocation createLocationPage aboutToShow modulePage setLocation getLocation TeamException CVSUIPlugin modulePage createLocationPage aboutToShow ICVSRepositoryLocation getLocation modulePage setLocation TeamException CVSUIPlugin modulePage modulePage ICVSRemoteFolder selectedModules getSelectedModules selectedModules selectedModules ICVSRemoteFolder selectedModules isDefinedModule aboutToShow hasMetafile selectedModules hasMetafile hasProjectMetafile selectedModules CheckoutAsWizard getPart selectedModules hasMetafile addPages getStartingPage InvocationTargetException CVSUIPlugin openError getShell InterruptedException dummyPage getStartingPage getNextPage
get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception Has Project Meta File Operation op new Has Project Meta File Operation get Part selected Module op run monitor result 0 op meta File Exists  getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException HasProjectMetaFileOperation HasProjectMetaFileOperation getPart selectedModule metaFileExists
private boolean has Project Metafile final ICVS Remote Folder selected Module throws Invocation Target Exception Interrupted Exception final boolean result new boolean true get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception Has Project Meta File Operation op new Has Project Meta File Operation get Part selected Module op run monitor result 0 op meta File Exists return result 0  hasProjectMetafile ICVSRemoteFolder selectedModule InvocationTargetException InterruptedException getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException HasProjectMetaFileOperation HasProjectMetaFileOperation getPart selectedModule metaFileExists
private ICVS Remote Folder get Selected Modules if module Page null return null return module Page get Selected Modules  ICVSRemoteFolder getSelectedModules modulePage modulePage getSelectedModules
get Shell get Display sync Exec new Runnable public void run try locations 0 create Location Page get Location catch CVS Exception e exception 0 e  getShell getDisplay syncExec createLocationPage getLocation CVSException
Return an ICVS Repository Location private ICVS Repository Location get Location throws Team Exception If the location page has a location use it if location Page null ICVS Repository Location new Location location Page get Location if new Location null return record Location new Location Otherwise get the location from the create location page final ICVS Repository Location locations new ICVS Repository Location null final CVS Exception exception new CVS Exception null get Shell get Display sync Exec new Runnable public void run try locations 0 create Location Page get Location catch CVS Exception e exception 0 e if exception 0 null throw exception 0 return record Location locations 0  ICVSRepositoryLocation ICVSRepositoryLocation getLocation TeamException locationPage ICVSRepositoryLocation newLocation locationPage getLocation newLocation recordLocation newLocation ICVSRepositoryLocation ICVSRepositoryLocation CVSException CVSException getShell getDisplay syncExec createLocationPage getLocation CVSException recordLocation
private ICVS Repository Location record Location ICVS Repository Location new Location if new Location null return location if location null new Location equals location if location null is New Location Dispose of the previous location Known Repositories get Instance dispose Repository location location new Location is New Location Known Repositories get Instance is Known Repository new Location get Location if is New Location Add the location silently so we can work with it location Known Repositories get Instance add Repository location false silently return location  ICVSRepositoryLocation recordLocation ICVSRepositoryLocation newLocation newLocation newLocation isNewLocation KnownRepositories getInstance disposeRepository newLocation isNewLocation KnownRepositories getInstance isKnownRepository newLocation getLocation isNewLocation KnownRepositories getInstance addRepository
see org eclipse ui I Workbench Wizard init org eclipse ui I Workbench org eclipse jface viewers I Structured Selection public void init I Workbench workbench I Structured Selection selection  IWorkbenchWizard IWorkbench IStructuredSelection IWorkbench IStructuredSelection

ICVS Repository Location location public Configuration Wizard Autoconnect Page String page Name String title Image Descriptor title Image super page Name title title Image  ICVSRepositoryLocation ConfigurationWizardAutoconnectPage pageName ImageDescriptor titleImage pageName titleImage
check set Text Policy bind Configuration Wizard Autoconnect Page validate NON NLS 1 check add Listener SWT Selection new Listener public void handle Event Event event validate check get Selection  setText ConfigurationWizardAutoconnectPage addListener handleEvent getSelection
public void create Control Composite parent Composite composite create Composite parent 2 set Control composite set F1 help Workbench Help set Help composite I Help Context Ids SHARING AUTOCONNECT PAGE Label description new Label composite SWT WRAP Grid Data data new Grid Data data horizontal Span 2 data width Hint 350 description set Layout Data data description set Text Policy bind Configuration Wizard Autoconnect Page description NON NLS 1 if location null return Spacer create Label composite NON NLS 1 create Label composite NON NLS 1 create Label composite Policy bind Configuration Wizard Autoconnect Page user NON NLS 1 create Label composite location get Username create Label composite Policy bind Configuration Wizard Autoconnect Page host NON NLS 1 create Label composite location get Host create Label composite Policy bind Configuration Wizard Autoconnect Page port NON NLS 1 int port location get Port if port ICVS Repository Location USE DEFAULT PORT create Label composite Policy bind Configuration Wizard Autoconnect Page default NON NLS 1 else create Label composite port NON NLS 1 create Label composite Policy bind Configuration Wizard Autoconnect Page connection Type NON NLS 1 create Label composite location get Method get Name create Label composite Policy bind Configuration Wizard Autoconnect Page repository Path NON NLS 1 create Label composite location get Root Directory create Label composite Policy bind Configuration Wizard Autoconnect Page module NON NLS 1 create Label composite info get Repository Spacer create Label composite NON NLS 1 create Label composite NON NLS 1 final Button check new Button composite SWT CHECK data new Grid Data data horizontal Span 2 check set Text Policy bind Configuration Wizard Autoconnect Page validate NON NLS 1 check add Listener SWT Selection new Listener public void handle Event Event event validate check get Selection check set Selection true Dialog apply Dialog Font parent  createControl createComposite setControl WorkbenchHelp setHelp IHelpContextIds SHARING_AUTOCONNECT_PAGE GridData GridData horizontalSpan widthHint setLayoutData setText ConfigurationWizardAutoconnectPage createLabel createLabel createLabel ConfigurationWizardAutoconnectPage createLabel getUsername createLabel ConfigurationWizardAutoconnectPage createLabel getHost createLabel ConfigurationWizardAutoconnectPage getPort ICVSRepositoryLocation USE_DEFAULT_PORT createLabel ConfigurationWizardAutoconnectPage createLabel createLabel ConfigurationWizardAutoconnectPage connectionType createLabel getMethod getName createLabel ConfigurationWizardAutoconnectPage repositoryPath createLabel getRootDirectory createLabel ConfigurationWizardAutoconnectPage createLabel getRepository createLabel createLabel GridData horizontalSpan setText ConfigurationWizardAutoconnectPage addListener handleEvent getSelection setSelection applyDialogFont
public Folder Sync Info get Folder Sync Info return info  FolderSyncInfo getFolderSyncInfo
return info public boolean get Validate return validate  getValidate
public void set Project I Project project try ICVS Folder folder ICVS Folder CVS Workspace Root getCVS Resource For project info folder get Folder Sync Info if info null This should never happen CVSUI Plugin open Error null Policy bind Configuration Wizard Autoconnect Page no Sync Info Policy bind Configuration Wizard Autoconnect Page noCVS Directory null NON NLS 1 NON NLS 2 return location CVS Repository Location from String info get Root catch Team Exception e CVSUI Plugin open Error null null null e  setProject IProject ICVSFolder ICVSFolder CVSWorkspaceRoot getCVSResourceFor getFolderSyncInfo CVSUIPlugin openError ConfigurationWizardAutoconnectPage noSyncInfo ConfigurationWizardAutoconnectPage noCVSDirectory CVSRepositoryLocation fromString getRoot TeamException CVSUIPlugin openError
public Folder Sync Info get Sharing return info  FolderSyncInfo getSharing
Gets the location return Returns a ICVS Repository Location public ICVS Repository Location get Location return location  ICVSRepositoryLocation ICVSRepositoryLocation getLocation

Configuration Wizard Main Page constructor param page Name the name of the page param title the title of the page param title Image the image for the page public Configuration Wizard Main Page String page Name String title Image Descriptor title Image super page Name title title Image  ConfigurationWizardMainPage pageName titleImage ConfigurationWizardMainPage pageName ImageDescriptor titleImage pageName titleImage
Adds an entry to a history while taking care of duplicate history items and excessively long histories The assumption is made that all histories should be of length code Configuration Wizard Main Page COMBO HISTORY LENGTH code param history the current history param new Entry the entry to add to the history return the history with the new entry appended private String add To History String history String new Entry Array List l new Array List Arrays as List history add To History l new Entry String r new String l size l to Array r return r  ConfigurationWizardMainPage COMBO_HISTORY_LENGTH newEntry addToHistory newEntry ArrayList ArrayList asList addToHistory newEntry toArray
return r protected I Dialog Settings get Dialog Settings return settings  IDialogSettings getDialogSettings
return settings protected void set Dialog Settings I Dialog Settings settings this settings settings  setDialogSettings IDialogSettings
Adds an entry to a history while taking care of duplicate history items and excessively long histories The assumption is made that all histories should be of length code Configuration Wizard Main Page COMBO HISTORY LENGTH code param history the current history param new Entry the entry to add to the history private void add To History List history String new Entry history remove new Entry history add 0 new Entry since only one new item was added we can be over the limit by at most one item if history size COMBO HISTORY LENGTH history remove COMBO HISTORY LENGTH  ConfigurationWizardMainPage COMBO_HISTORY_LENGTH newEntry addToHistory newEntry newEntry newEntry COMBO_HISTORY_LENGTH COMBO_HISTORY_LENGTH
Listener listener new Listener public void handle Event Event event if location null old Location location location null update Widget Enablements  handleEvent oldLocation updateWidgetEnablements
validate Button set Text Policy bind Configuration Wizard Autoconnect Page validate NON NLS 1 validate Button add Listener SWT Selection new Listener public void handle Event Event e validate validate Button get Selection  validateButton setText ConfigurationWizardAutoconnectPage validateButton addListener handleEvent validateButton getSelection
allow Caching Button set Layout Data data allow Caching Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e allow Caching allow Caching Button get Selection  allowCachingButton setLayoutData allowCachingButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent allowCaching allowCachingButton getSelection
Creates the UI part of the page param parent the parent of the created widgets public void create Control Composite parent Composite composite create Composite parent 2 set F1 help Workbench Help set Help composite I Help Context Ids SHARING NEW REPOSITORY PAGE Listener listener new Listener public void handle Event Event event if location null old Location location location null update Widget Enablements Group g create Group composite Policy bind Configuration Wizard Main Page Location 1 NON NLS 1 Host name create Label g Policy bind Configuration Wizard Main Page host NON NLS 1 host Combo create Editable Combo g host Combo add Listener SWT Selection listener host Combo add Listener SWT Modify listener Repository Path create Label g Policy bind Configuration Wizard Main Page repository Path NON NLS 1 repository Path Combo create Editable Combo g repository Path Combo add Listener SWT Selection listener repository Path Combo add Listener SWT Modify listener g create Group composite Policy bind Configuration Wizard Main Page Authentication 2 NON NLS 1 User name create Label g Policy bind Configuration Wizard Main Page user Name NON NLS 1 user Combo create Editable Combo g user Combo add Listener SWT Selection listener user Combo add Listener SWT Modify listener Password create Label g Policy bind Configuration Wizard Main Page password NON NLS 1 password Text create Password Field g password Text add Listener SWT Modify listener g create Group composite Policy bind Configuration Wizard Main Page Connection 3 NON NLS 1 Connection type create Label g Policy bind Configuration Wizard Main Page connection NON NLS 1 connection Method Combo create Combo g connection Method Combo add Listener SWT Selection listener Port number create a composite to ensure the radio buttons come in the correct order Composite port Group new Composite g SWT NONE Grid Data data new Grid Data data horizontal Span 2 port Group set Layout Data data Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 port Group set Layout layout use Default Port create Radio Button port Group Policy bind Configuration Wizard Main Page use Default Port 2 NON NLS 1 use Custom Port create Radio Button port Group Policy bind Configuration Wizard Main Page use Port 1 NON NLS 1 use Custom Port add Listener SWT Selection listener port Text create Text Field port Group port Text add Listener SWT Modify listener create a composite to ensure the validate button is in its own tab group if show Validate Composite validate Button Tab Group new Composite composite SWT NONE data new Grid Data data horizontal Span 2 validate Button Tab Group set Layout Data data validate Button Tab Group set Layout new Fill Layout validate Button new Button validate Button Tab Group SWT CHECK validate Button set Text Policy bind Configuration Wizard Autoconnect Page validate NON NLS 1 validate Button add Listener SWT Selection new Listener public void handle Event Event e validate validate Button get Selection allow Caching Button new Button composite SWT CHECK allow Caching Button set Text Policy bind User Validation Dialog 6 NON NLS 1 data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL data horizontal Span 3 allow Caching Button set Layout Data data allow Caching Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e allow Caching allow Caching Button get Selection Composite warning Composite new Composite composite SWT NONE layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Height 0 warning Composite set Layout layout data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 3 warning Composite set Layout Data data Label warning Label new Label warning Composite SWT NONE warning Label set Image Dialog get Image Dialog DLG IMG MESSAGE WARNING warning Label set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data HORIZONTAL ALIGN BEGINNING Label warning Text new Label warning Composite SWT WRAP warning Text set Text Policy bind User Validation Dialog 7 NON NLS 1 data new Grid Data Grid Data FILL HORIZONTAL data width Hint 300 GC gc new GC composite gc set Font parent get Font Font Metrics font Metrics gc get Font Metrics gc dispose data height Hint Dialog convert Height In Chars To Pixels font Metrics 3 warning Text set Layout Data data initialize Values update Widget Enablements host Combo set Focus set Control composite Dialog apply Dialog Font parent  createControl createComposite WorkbenchHelp setHelp IHelpContextIds SHARING_NEW_REPOSITORY_PAGE handleEvent oldLocation updateWidgetEnablements createGroup ConfigurationWizardMainPage Location_1 createLabel ConfigurationWizardMainPage hostCombo createEditableCombo hostCombo addListener hostCombo addListener createLabel ConfigurationWizardMainPage repositoryPath repositoryPathCombo createEditableCombo repositoryPathCombo addListener repositoryPathCombo addListener createGroup ConfigurationWizardMainPage Authentication_2 createLabel ConfigurationWizardMainPage userName userCombo createEditableCombo userCombo addListener userCombo addListener createLabel ConfigurationWizardMainPage passwordText createPasswordField passwordText addListener createGroup ConfigurationWizardMainPage Connection_3 createLabel ConfigurationWizardMainPage connectionMethodCombo createCombo connectionMethodCombo addListener portGroup GridData GridData horizontalSpan portGroup setLayoutData GridLayout GridLayout numColumns marginHeight marginWidth portGroup setLayout useDefaultPort createRadioButton portGroup ConfigurationWizardMainPage useDefaultPort useCustomPort createRadioButton portGroup ConfigurationWizardMainPage usePort useCustomPort addListener portText createTextField portGroup portText addListener showValidate validateButtonTabGroup GridData horizontalSpan validateButtonTabGroup setLayoutData validateButtonTabGroup setLayout FillLayout validateButton validateButtonTabGroup validateButton setText ConfigurationWizardAutoconnectPage validateButton addListener handleEvent validateButton getSelection allowCachingButton allowCachingButton setText UserValidationDialog GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL horizontalSpan allowCachingButton setLayoutData allowCachingButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent allowCaching allowCachingButton getSelection warningComposite GridLayout numColumns marginHeight marginHeight warningComposite setLayout GridData GridData FILL_HORIZONTAL horizontalSpan warningComposite setLayoutData warningLabel warningComposite warningLabel setImage getImage DLG_IMG_MESSAGE_WARNING warningLabel setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING GridData HORIZONTAL_ALIGN_BEGINNING warningText warningComposite warningText setText UserValidationDialog GridData GridData FILL_HORIZONTAL widthHint setFont getFont FontMetrics fontMetrics getFontMetrics heightHint convertHeightInCharsToPixels fontMetrics warningText setLayoutData initializeValues updateWidgetEnablements hostCombo setFocus setControl applyDialogFont
Utility method to create an editable combo box param parent the parent of the combo box return the created combo protected Combo create Editable Combo Composite parent Combo combo new Combo parent SWT NULL Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint I Dialog Constants ENTRY FIELD WIDTH combo set Layout Data data return combo  createEditableCombo GridData GridData GridData FILL_HORIZONTAL widthHint IDialogConstants ENTRY_FIELD_WIDTH setLayoutData
protected Group create Group Composite parent String text Group group new Group parent SWT NULL group set Text text Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 2 data width Hint GROUP WIDTH group set Layout Data data Grid Layout layout new Grid Layout layout num Columns 2 group set Layout layout return group  createGroup setText GridData GridData GridData FILL_HORIZONTAL horizontalSpan widthHint GROUP_WIDTH setLayoutData GridLayout GridLayout numColumns setLayout
private Properties create Properties Properties result new Properties result set Property connection connection Method Combo get Text NON NLS 1 result set Property user user Combo get Text NON NLS 1 result set Property password password Text get Text NON NLS 1 result set Property host host Combo get Text NON NLS 1 if use Custom Port get Selection result set Property port port Text get Text NON NLS 1 result set Property root repository Path Combo get Text NON NLS 1 return result  createProperties setProperty connectionMethodCombo getText setProperty userCombo getText setProperty passwordText getText setProperty hostCombo getText useCustomPort getSelection setProperty portText getText setProperty repositoryPathCombo getText
Crate a new location with the information entered on the page The location will exists and can be sed for connecting but is not registered for persistance This method must be called from the UI thread return a location or code null code throws CVS Exception public ICVS Repository Location get Location throws CVS Exception if location null if is Page Complete return null location CVS Repository Location from Properties create Properties if location equals old Location location old Location location set Allow Caching allow Caching old Location null save Widget Values return location  CVSException ICVSRepositoryLocation getLocation CVSException isPageComplete CVSRepositoryLocation fromProperties createProperties oldLocation oldLocation setAllowCaching allowCaching oldLocation saveWidgetValues
Initializes states of the controls private void initialize Values Set remembered values I Dialog Settings settings get Dialog Settings if settings null String host Names settings get Array STORE HOSTNAME ID if host Names null for int i 0 i host Names length i host Combo add host Names i String paths settings get Array STORE PATH ID if paths null for int i 0 i paths length i repository Path Combo add paths i String user Names settings get Array STORE USERNAME ID if user Names null for int i 0 i user Names length i user Combo add user Names i if show Validate validate settings get Boolean STORE DONT VALIDATE ID validate Button set Selection validate Initialize other values and widget states I Connection Method methods CVS Repository Location get Plugged In Connection Methods for int i 0 i methods length i connection Method Combo add methods i get Name connection Method Combo select 0 use Default Port set Selection true if properties null String method properties get Property connection NON NLS 1 if method null connection Method Combo select 0 else connection Method Combo select connection Method Combo index Of method String user properties get Property user NON NLS 1 if user null user Combo set Text user String password properties get Property password NON NLS 1 if password null password Text set Text password String host properties get Property host NON NLS 1 if host null host Combo set Text host String port properties get Property port NON NLS 1 if port null use Custom Port set Selection true port Text set Text port String repository Path properties get Property root NON NLS 1 if repository Path null repository Path Combo set Text repository Path  initializeValues IDialogSettings getDialogSettings hostNames getArray STORE_HOSTNAME_ID hostNames hostNames hostCombo hostNames getArray STORE_PATH_ID repositoryPathCombo userNames getArray STORE_USERNAME_ID userNames userNames userCombo userNames showValidate getBoolean STORE_DONT_VALIDATE_ID validateButton setSelection IConnectionMethod CVSRepositoryLocation getPluggedInConnectionMethods connectionMethodCombo getName connectionMethodCombo useDefaultPort setSelection getProperty connectionMethodCombo connectionMethodCombo connectionMethodCombo indexOf getProperty userCombo setText getProperty passwordText setText getProperty hostCombo setText getProperty useCustomPort setSelection portText setText repositoryPath getProperty repositoryPath repositoryPathCombo setText repositoryPath
Saves the widget values private void save Widget Values Update history I Dialog Settings settings get Dialog Settings if settings null String user Names settings get Array STORE USERNAME ID if user Names null user Names new String 0 user Names add To History user Names user Combo get Text settings put STORE USERNAME ID user Names String host Names settings get Array STORE HOSTNAME ID if host Names null host Names new String 0 host Names add To History host Names host Combo get Text settings put STORE HOSTNAME ID host Names String paths settings get Array STORE PATH ID if paths null paths new String 0 paths add To History paths repository Path Combo get Text settings put STORE PATH ID paths if show Validate settings put STORE DONT VALIDATE ID validate  saveWidgetValues IDialogSettings getDialogSettings userNames getArray STORE_USERNAME_ID userNames userNames userNames addToHistory userNames userCombo getText STORE_USERNAME_ID userNames hostNames getArray STORE_HOSTNAME_ID hostNames hostNames hostNames addToHistory hostNames hostCombo getText STORE_HOSTNAME_ID hostNames getArray STORE_PATH_ID addToHistory repositoryPathCombo getText STORE_PATH_ID showValidate STORE_DONT_VALIDATE_ID
public void set Show Validate boolean show Validate this show Validate show Validate  setShowValidate showValidate showValidate showValidate
Sets the properties for the repository connection param properties the properties or null public void set Properties Properties properties this properties properties  setProperties
Updates widget enablements and sets error message if appropriate protected void update Widget Enablements if use Default Port get Selection port Text set Enabled false else port Text set Enabled true validate Fields  updateWidgetEnablements useDefaultPort getSelection portText setEnabled portText setEnabled validateFields
Validates the contents of the editable fields and set page completion and error messages appropriately private void validate Fields String user user Combo get Text I Status status validate User Name user if is StatusOK status return String host host Combo get Text status validate Host host if is StatusOK status return if port Text is Enabled String port port Text get Text status validate Port port if is StatusOK status return String path String repository Path Combo get Text status validate Path path String if is StatusOK status return try CVS Repository Location l CVS Repository Location from Properties create Properties if l equals old Location Known Repositories get Instance is Known Repository l get Location set Error Message Policy bind Configuration Wizard Main Page 0 NON NLS 1 set Page Complete false return catch CVS Exception e CVSUI Plugin log e Let it pass Creation should fail Everything passed so we re good to go set Error Message null set Page Complete true  validateFields userCombo getText IStatus validateUserName isStatusOK hostCombo getText validateHost isStatusOK portText isEnabled portText getText validatePort isStatusOK pathString repositoryPathCombo getText validatePath pathString isStatusOK CVSRepositoryLocation CVSRepositoryLocation fromProperties createProperties oldLocation KnownRepositories getInstance isKnownRepository getLocation setErrorMessage ConfigurationWizardMainPage setPageComplete CVSException CVSUIPlugin setErrorMessage setPageComplete
private boolean is StatusOK I Status status if status isOK if status get Code REQUIRED FIELD Don t set the message for an empty field set Error Message null else set Error Message status get Message set Page Complete false return false return true  isStatusOK IStatus getCode REQUIRED_FIELD setErrorMessage setErrorMessage getMessage setPageComplete
public boolean get Validate return validate  getValidate
public void set Visible boolean visible super set Visible visible if visible host Combo set Focus  setVisible setVisible hostCombo setFocus
public static final int INVALID FIELD CONTENTS 1 public static final I Status validate User Name String user if user length 0 return new Status I Status ERROR CVSUI Plugin ID REQUIRED FIELD Policy bind Configuration Wizard Main Page 1 null NON NLS 1 if user index Of 1 user index Of 1 return new Status I Status ERROR CVSUI Plugin ID INVALID FIELD CONTENTS Policy bind Configuration Wizard Main Page invalid User Name null NON NLS 1 return Status OK STATUS  INVALID_FIELD_CONTENTS IStatus validateUserName IStatus CVSUIPlugin REQUIRED_FIELD ConfigurationWizardMainPage indexOf indexOf IStatus CVSUIPlugin INVALID_FIELD_CONTENTS ConfigurationWizardMainPage invalidUserName OK_STATUS
public static final I Status validate Host String host if host length 0 return new Status I Status ERROR CVSUI Plugin ID REQUIRED FIELD Policy bind Configuration Wizard Main Page 2 null NON NLS 1 if host index Of 1 return new Status I Status ERROR CVSUI Plugin ID INVALID FIELD CONTENTS Policy bind Configuration Wizard Main Page invalid Host Name null NON NLS 1 return Status OK STATUS  IStatus validateHost IStatus CVSUIPlugin REQUIRED_FIELD ConfigurationWizardMainPage indexOf IStatus CVSUIPlugin INVALID_FIELD_CONTENTS ConfigurationWizardMainPage invalidHostName OK_STATUS
public static final I Status validate Port String port if port length 0 return new Status I Status ERROR CVSUI Plugin ID REQUIRED FIELD Policy bind Configuration Wizard Main Page 3 null NON NLS 1 try Integer parse Int port catch Number Format Exception e return new Status I Status ERROR CVSUI Plugin ID INVALID FIELD CONTENTS Policy bind Configuration Wizard Main Page invalid Port null NON NLS 1 return Status OK STATUS  IStatus validatePort IStatus CVSUIPlugin REQUIRED_FIELD ConfigurationWizardMainPage parseInt NumberFormatException IStatus CVSUIPlugin INVALID_FIELD_CONTENTS ConfigurationWizardMainPage invalidPort OK_STATUS
public static final I Status validate Path String path String if path String length 0 return new Status I Status ERROR CVSUI Plugin ID REQUIRED FIELD Policy bind Configuration Wizard Main Page 4 null NON NLS 1 I Path path new Path path String String segments path segments for int i 0 i segments length i String string segments i if string char At 0 string char At string length 1 return new Status I Status ERROR CVSUI Plugin ID INVALID FIELD CONTENTS Policy bind Configuration Wizard Main Page invalid Path With Spaces null NON NLS 1 look for and inform the user that we support use of C cvs root instead of c cvs root if path String index Of 1 NON NLS 1 if path String index Of 2 NON NLS 1 The user is probably trying to specify a CVSNT path return new Status I Status ERROR CVSUI Plugin ID INVALID FIELD CONTENTS Policy bind Configuration Wizard Main Page useNT Format null NON NLS 1 else return new Status I Status ERROR CVSUI Plugin ID INVALID FIELD CONTENTS Policy bind Configuration Wizard Main Page invalid Path With Slashes null NON NLS 1 return Status OK STATUS  IStatus validatePath pathString pathString IStatus CVSUIPlugin REQUIRED_FIELD ConfigurationWizardMainPage IPath pathString charAt charAt IStatus CVSUIPlugin INVALID_FIELD_CONTENTS ConfigurationWizardMainPage invalidPathWithSpaces pathString indexOf pathString indexOf IStatus CVSUIPlugin INVALID_FIELD_CONTENTS ConfigurationWizardMainPage useNTFormat IStatus CVSUIPlugin INVALID_FIELD_CONTENTS ConfigurationWizardMainPage invalidPathWithSlashes OK_STATUS

CVS Wizard Page constructor comment param page Name the name of the page public CVS Wizard Page String page Name super page Name  CVSWizardPage pageName CVSWizardPage pageName pageName
CVS Wizard Page constructor comment param page Name the name of the page param title the title of the page param title Image the image for the page public CVS Wizard Page String page Name String title Image Descriptor title Image super page Name title title Image  CVSWizardPage pageName titleImage CVSWizardPage pageName ImageDescriptor titleImage pageName titleImage
CVS Wizard Page constructor comment param page Name the name of the page param title the title of the page param title Image the image for the page param description the description of the page public CVS Wizard Page String page Name String title Image Descriptor title Image String description super page Name title title Image set Description description  CVSWizardPage pageName titleImage CVSWizardPage pageName ImageDescriptor titleImage pageName titleImage setDescription
Creates a new checkbox instance and sets the default layout data param group the composite in which to create the checkbox param label the string to set into the checkbox return the new checkbox protected Button create Check Box Composite group String label Button button new Button group SWT CHECK SWT LEFT button set Text label Grid Data data new Grid Data data horizontal Span 2 button set Layout Data data return button  createCheckBox setText GridData GridData horizontalSpan setLayoutData
Utility method that creates a combo box param parent the parent for the new label return the new widget protected Combo create Combo Composite parent Combo combo new Combo parent SWT READ ONLY Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint I Dialog Constants ENTRY FIELD WIDTH combo set Layout Data data return combo  createCombo READ_ONLY GridData GridData GridData FILL_HORIZONTAL widthHint IDialogConstants ENTRY_FIELD_WIDTH setLayoutData
Creates composite control and sets the default layout data param parent the parent of the new composite param num Columns the number of columns for the new composite return the newly created coposite protected Composite create Composite Composite parent int num Columns Composite composite new Composite parent SWT NULL Grid Layout Grid Layout layout new Grid Layout layout num Columns num Columns composite set Layout layout Grid Data Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL composite set Layout Data data return composite  numColumns createComposite numColumns GridLayout GridLayout GridLayout numColumns numColumns setLayout GridData GridData GridData verticalAlignment GridData horizontalAlignment GridData setLayoutData
Utility method that creates a label instance and sets the default layout data param parent the parent for the new label param text the text for the new label return the new label public static Label create Label Composite parent String text return create Indented Label parent text 0  createLabel createIndentedLabel
Utility method that creates a label instance indented by the specified number of pixels and sets the default layout data param parent the parent for the new label param text the text for the new label param indent the indent in pixels or 0 for none return the new label public static Label create Indented Label Composite parent String text int indent Label label new Label parent SWT LEFT label set Text text Grid Data data new Grid Data data horizontal Span 1 data horizontal Alignment Grid Data FILL data horizontal Indent indent label set Layout Data data return label  createIndentedLabel setText GridData GridData horizontalSpan horizontalAlignment GridData horizontalIndent setLayoutData
Utility method that creates a label instance with word wrap and sets the default layout data param parent the parent for the new label param text the text for the new label param indent the indent in pixels or 0 for none param width Hint the nominal width of the label return the new label protected Label create Wrapping Label Composite parent String text int indent return create Wrapping Label parent text indent 1  widthHint createWrappingLabel createWrappingLabel
protected Label create Wrapping Label Composite parent String text int indent int horizontal Span Label label new Label parent SWT LEFT SWT WRAP label set Text text Grid Data data new Grid Data data horizontal Span horizontal Span data horizontal Alignment Grid Data FILL data horizontal Indent indent data grab Excess Horizontal Space true data width Hint LABEL WIDTH HINT label set Layout Data data return label  createWrappingLabel horizontalSpan setText GridData GridData horizontalSpan horizontalSpan horizontalAlignment GridData horizontalIndent grabExcessHorizontalSpace widthHint LABEL_WIDTH_HINT setLayoutData
Create a text field specific for this application param parent the parent of the new text field return the new text field static public Text create Text Field Composite parent Text text new Text parent SWT SINGLE SWT BORDER return layout Text Field text  createTextField layoutTextField
Create a password field specific for this application param parent the parent of the new text field return the new text field static public Text create Password Field Composite parent Text text new Text parent SWT SINGLE SWT BORDER SWT PASSWORD return layout Text Field text  createPasswordField layoutTextField
Layout a text or password field specific for this application param parent the parent of the new text field return the new text field static public Text layout Text Field Text text Grid Data data new Grid Data Grid Data FILL HORIZONTAL data vertical Alignment Grid Data CENTER data grab Excess Vertical Space false data width Hint I Dialog Constants ENTRY FIELD WIDTH text set Layout Data data return text  layoutTextField GridData GridData GridData FILL_HORIZONTAL verticalAlignment GridData grabExcessVerticalSpace widthHint IDialogConstants ENTRY_FIELD_WIDTH setLayoutData
Utility method to create a radio button param parent the parent of the radio button param label the label of the radio button param span the number of columns to span return the created radio button protected Button create Radio Button Composite parent String label int span Button button new Button parent SWT RADIO button set Text label Grid Data data new Grid Data data horizontal Span span button set Layout Data data return button  createRadioButton setText GridData GridData horizontalSpan setLayoutData
Utility method to create a full width separator preceeded by a blank space param parent the parent of the separator param vertical Space the vertical whitespace to insert before the label protected void create Separator Composite parent int vertical Space space Label label new Label parent SWT NONE Grid Data data new Grid Data data height Hint vertical Space label set Layout Data data separator label new Label parent SWT SEPARATOR SWT HORIZONTAL data new Grid Data Grid Data FILL HORIZONTAL label set Layout Data data  verticalSpace createSeparator verticalSpace GridData GridData heightHint verticalSpace setLayoutData GridData GridData FILL_HORIZONTAL setLayoutData
Creates a List Viewer whose input is an array of I Files param parent the parent of the viewer param title the text for the title label param height Hint the nominal height of the list return the created list viewer public List Viewer create File List Viewer Composite parent String title int height Hint create Label parent title List Viewer list Viewer new List Viewer parent SWT READ ONLY SWT V SCROLL SWT H SCROLL SWT BORDER list Viewer set Content Provider new I Structured Content Provider public Object get Elements Object input Element return Object input Element public void dispose public void input Changed Viewer viewer Object old Input Object new Input list Viewer set Label Provider new Label Provider public String get Text Object element return I File element get Full Path to String list Viewer set Sorter new Workbench Viewer Sorter Grid Data data new Grid Data Grid Data FILL BOTH data height Hint height Hint list Viewer get List set Layout Data data return list Viewer  ListViewer IFiles heightHint ListViewer createFileListViewer heightHint createLabel ListViewer listViewer ListViewer READ_ONLY V_SCROLL H_SCROLL listViewer setContentProvider IStructuredContentProvider getElements inputElement inputElement inputChanged oldInput newInput listViewer setLabelProvider LabelProvider getText IFile getFullPath toString listViewer setSorter WorkbenchViewerSorter GridData GridData GridData FILL_BOTH heightHint heightHint listViewer getList setLayoutData listViewer
protected Tree Viewer create Resource Selection Tree Composite composite int types int span Tree Viewer tree new Tree Viewer composite SWT H SCROLL SWT V SCROLL SWT BORDER tree set Use Hashlookup true tree set Content Provider get Resource Provider types tree set Label Provider new Decorating Label Provider new Workbench Label Provider CVSUI Plugin get Plugin get Workbench get Decorator Manager get Label Decorator tree set Sorter new Resource Sorter Resource Sorter NAME Grid Data data new Grid Data Grid Data FILL BOTH Grid Data GRAB VERTICAL data height Hint LIST HEIGHT HINT data horizontal Span span tree get Control set Layout Data data return tree  TreeViewer createResourceSelectionTree TreeViewer TreeViewer H_SCROLL V_SCROLL setUseHashlookup setContentProvider getResourceProvider setLabelProvider DecoratingLabelProvider WorkbenchLabelProvider CVSUIPlugin getPlugin getWorkbench getDecoratorManager getLabelDecorator setSorter ResourceSorter ResourceSorter GridData GridData GridData FILL_BOTH GridData GRAB_VERTICAL heightHint LIST_HEIGHT_HINT horizontalSpan getControl setLayoutData
return new Workbench Content Provider public Object get Children Object o if o instanceof I Container I Resource members null try members I Container o members catch Core Exception e just return an empty set of children return new Object 0 filter out the desired resource types Array List results new Array List for int i 0 i members length i And the test bits with the resource types to see if they are what we want if members i get Type resource Type 0 results add members i return results to Array else return super get Children o  WorkbenchContentProvider getChildren IContainer IResource IContainer CoreException ArrayList ArrayList getType resourceType toArray getChildren
Returns a content provider for code I Resource code s that returns only children of the given resource type protected I Tree Content Provider get Resource Provider final int resource Type return new Workbench Content Provider public Object get Children Object o if o instanceof I Container I Resource members null try members I Container o members catch Core Exception e just return an empty set of children return new Object 0 filter out the desired resource types Array List results new Array List for int i 0 i members length i And the test bits with the resource types to see if they are what we want if members i get Type resource Type 0 results add members i return results to Array else return super get Children o  IResource ITreeContentProvider getResourceProvider resourceType WorkbenchContentProvider getChildren IContainer IResource IContainer CoreException ArrayList ArrayList getType resourceType toArray getChildren
protected Repository Manager get Repository Manager return CVSUI Plugin get Plugin get Repository Manager  RepositoryManager getRepositoryManager CVSUIPlugin getPlugin getRepositoryManager
protected ICVS Wizard getCVS Wizard if wizard null return wizard I Wizard wizard get Wizard if wizard instanceof ICVS Wizard This is the method that is invoked when the next button is pressed Hence assume that the page s about to be shown return ICVS Wizard wizard return null  ICVSWizard getCVSWizard IWizard getWizard ICVSWizard ICVSWizard
public void setCVS Wizard ICVS Wizard wizard this wizard wizard  setCVSWizard ICVSWizard
public I Wizard Page get Next Page ICVS Wizard w getCVS Wizard if w null This is the method that is invoked when the next button is pressed Hence assume that the page s about to be shown return w get Next Page this true about to show return super get Next Page  IWizardPage getNextPage ICVSWizard getCVSWizard getNextPage getNextPage
public boolean can Flip To Next Page ICVS Wizard w getCVS Wizard if w null return is Page Complete w get Next Page this false about to show null return super can Flip To Next Page  canFlipToNextPage ICVSWizard getCVSWizard isPageComplete getNextPage canFlipToNextPage

Generate Diff File Operation I Resource resource File file boolean to Clipboard Local Option options Shell shell this resource resource this output File file this shell shell this options options this to Clipboard to Clipboard  GenerateDiffFileOperation IResource toClipboard LocalOption outputFile toClipboard toClipboard
shell get Display sync Exec new Runnable public void run Text Transfer plain Text Transfer Text Transfer get Instance Clipboard clipboard new Clipboard shell get Display clipboard set Contents new String baos to String new Transfer plain Text Transfer clipboard dispose  getDisplay syncExec TextTransfer plainTextTransfer TextTransfer getInstance getDisplay setContents toString plainTextTransfer
CVSUI Plugin open Dialog shell new CVSUI Plugin I Openable In Shell public void open Shell shell Message Dialog open Information shell Policy bind GenerateCVS Diff no Diffs Found Title NON NLS 1 Policy bind GenerateCVS Diff no Diffs Found Msg NON NLS 1  CVSUIPlugin openDialog CVSUIPlugin IOpenableInShell MessageDialog openInformation GenerateCVSDiff noDiffsFoundTitle GenerateCVSDiff noDiffsFoundMsg
see I Runnable With Progress run I Progress Monitor public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try monitor begin Task 500 NON NLS 1 monitor set Task Name Policy bind GenerateCVS Diff working NON NLS 1 Output Stream os if to Clipboard os new Byte Array Output Stream else os new File Output Stream output File try CVS Team Provider provider CVS Team Provider Repository Provider get Provider resource get Project CVS Provider Plugin get Type Id provider diff resource options new Print Stream os new Sub Progress Monitor monitor 500 finally os close boolean empty Diff false if to Clipboard final Byte Array Output Stream baos Byte Array Output Stream os if baos size 0 empty Diff true else shell get Display sync Exec new Runnable public void run Text Transfer plain Text Transfer Text Transfer get Instance Clipboard clipboard new Clipboard shell get Display clipboard set Contents new String baos to String new Transfer plain Text Transfer clipboard dispose else if output File length 0 empty Diff true output File delete check for empty diff and report if empty Diff CVSUI Plugin open Dialog shell new CVSUI Plugin I Openable In Shell public void open Shell shell Message Dialog open Information shell Policy bind GenerateCVS Diff no Diffs Found Title NON NLS 1 Policy bind GenerateCVS Diff no Diffs Found Msg NON NLS 1 CVSUI Plugin PERFORM SYNC EXEC catch Team Exception e throw new Invocation Target Exception e catch IO Exception e throw new Invocation Target Exception e finally monitor done  IRunnableWithProgress IProgressMonitor IProgressMonitor InvocationTargetException InterruptedException beginTask setTaskName GenerateCVSDiff OutputStream toClipboard ByteArrayOutputStream FileOutputStream outputFile CVSTeamProvider CVSTeamProvider RepositoryProvider getProvider getProject CVSProviderPlugin getTypeId PrintStream SubProgressMonitor emptyDiff toClipboard ByteArrayOutputStream ByteArrayOutputStream emptyDiff getDisplay syncExec TextTransfer plainTextTransfer TextTransfer getInstance getDisplay setContents toString plainTextTransfer outputFile emptyDiff outputFile emptyDiff CVSUIPlugin openDialog CVSUIPlugin IOpenableInShell MessageDialog openInformation GenerateCVSDiff noDiffsFoundTitle GenerateCVSDiff noDiffsFoundMsg CVSUIPlugin PERFORM_SYNC_EXEC TeamException InvocationTargetException IOException InvocationTargetException

private static final int SIZING SELECTION PANE WIDTH 200 Patch File Selection Page String page Name String title Image Descriptor image I Structured Selection selection super page Name title image set Page Complete false  SIZING_SELECTION_PANE_WIDTH PatchFileSelectionPage pageName ImageDescriptor IStructuredSelection pageName setPageComplete
Allow the user to finish if a valid file has been entered protected boolean validate Page boolean valid false switch get Save Type case WORKSPACE if selected Container null get Workspace File null valid true break case FILESYSTEM File file new File get Filesystem File valid is Valid File file break case CLIPBOARD valid true break Avoid draw flicker by clearing error message if all is valid if valid set Message null set Error Message null else set Error Message Policy bind Enter a valid file name or select the clipboard option 1 NON NLS 1 set Page Complete valid return valid  validatePage getSaveType selectedContainer getWorkspaceFile getFilesystemFile isValidFile setMessage setErrorMessage setErrorMessage Enter_a_valid_file_name_or_select_the_clipboard_option_1 setPageComplete
private boolean is Valid File File file if file is Absolute return false if file is Directory return false File parent file get Parent File if parent null return false if parent exists return false if parent is Directory return false return true  isValidFile isAbsolute isDirectory getParentFile isDirectory
Answers a full path to a file system file or code null code if the user selected to save the patch in the workspace public String get Filesystem File if save In Filesystem get Selection return filename Combo get Text return null  getFilesystemFile saveInFilesystem getSelection filenameCombo getText
Answers a workspace file or code null code if the user selected to save the patch outside of the workspace public I File get Workspace File if save In Workspace get Selection selected Container null String filename workspace Filename get Text if filename null filename length 0 return null return selected Container get File new Path workspace Filename get Text return null  IFile getWorkspaceFile saveInWorkspace getSelection selectedContainer workspaceFilename getText selectedContainer getFile workspaceFilename getText
save To Clipboard set Text Policy bind Save To Clipboard 2 NON NLS 1 save To Clipboard add Listener SWT Selection new Listener public void handle Event Event event validate Page update Enablements  saveToClipboard setText Save_To_Clipboard_2 saveToClipboard addListener handleEvent validatePage updateEnablements
save In Filesystem set Text Policy bind Save In File System 3 NON NLS 1 save In Filesystem add Listener SWT Selection new Listener public void handle Event Event event validate Page update Enablements  saveInFilesystem setText Save_In_File_System_3 saveInFilesystem addListener handleEvent validatePage updateEnablements
filename Combo set Layout Data gd filename Combo add Modify Listener new Modify Listener public void modify Text Modify Event e validate Page  filenameCombo setLayoutData filenameCombo addModifyListener ModifyListener modifyText ModifyEvent validatePage
browse Button add Listener SWT Selection new Listener public void handle Event Event event File Dialog d new File Dialog get Shell SWT PRIMARY MODAL SWT SAVE d set Text Policy bind Save Patch As 5 NON NLS 1 d set File Name Policy bind patch txt 6 NON NLS 1 String file d open if file null I Path path new Path file set Filesystem Filename path toOS String  browseButton addListener handleEvent FileDialog FileDialog getShell PRIMARY_MODAL setText Save_Patch_As_5 setFileName txt_6 IPath setFilesystemFilename toOSString
save In Workspace set Text Policy bind Save In Workspace 7 NON NLS 1 save In Workspace add Listener SWT Selection new Listener public void handle Event Event event validate Page update Enablements  saveInWorkspace setText Save_In_Workspace_7 saveInWorkspace addListener handleEvent validatePage updateEnablements
Allow the user to chose to save the patch to the workspace or outside of the workspace public void create Control Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout composite set Layout layout composite set Layout Data new Grid Data set Control composite initialize Dialog Units composite set F1 help Workbench Help set Help composite I Help Context Ids PATCH SELECTION PAGE Clipboard save To Clipboard new Button composite SWT RADIO save To Clipboard set Text Policy bind Save To Clipboard 2 NON NLS 1 save To Clipboard add Listener SWT Selection new Listener public void handle Event Event event validate Page update Enablements File System save In Filesystem new Button composite SWT RADIO save In Filesystem set Text Policy bind Save In File System 3 NON NLS 1 save In Filesystem add Listener SWT Selection new Listener public void handle Event Event event validate Page update Enablements Composite name Group new Composite composite SWT NONE layout new Grid Layout layout num Columns 2 layout margin Width 0 name Group set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL name Group set Layout Data data filename Combo new Text name Group SWT BORDER Grid Data gd new Grid Data Grid Data FILL HORIZONTAL filename Combo set Layout Data gd filename Combo add Modify Listener new Modify Listener public void modify Text Modify Event e validate Page browse Button new Button name Group SWT NULL browse Button set Text Policy bind Browse  4 NON NLS 1 data new Grid Data Grid Data HORIZONTAL ALIGN END data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT data width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH browse Button set Layout Data data browse Button add Listener SWT Selection new Listener public void handle Event Event event File Dialog d new File Dialog get Shell SWT PRIMARY MODAL SWT SAVE d set Text Policy bind Save Patch As 5 NON NLS 1 d set File Name Policy bind patch txt 6 NON NLS 1 String file d open if file null I Path path new Path file set Filesystem Filename path toOS String Workspace save In Workspace new Button composite SWT RADIO save In Workspace set Text Policy bind Save In Workspace 7 NON NLS 1 save In Workspace add Listener SWT Selection new Listener public void handle Event Event event validate Page update Enablements create Tree Viewer composite save To Clipboard set Selection true validate Page update Enablements  createControl GridLayout GridLayout setLayout setLayoutData GridData setControl initializeDialogUnits WorkbenchHelp setHelp IHelpContextIds PATCH_SELECTION_PAGE saveToClipboard saveToClipboard setText Save_To_Clipboard_2 saveToClipboard addListener handleEvent validatePage updateEnablements saveInFilesystem saveInFilesystem setText Save_In_File_System_3 saveInFilesystem addListener handleEvent validatePage updateEnablements nameGroup GridLayout numColumns marginWidth nameGroup setLayout GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL nameGroup setLayoutData filenameCombo nameGroup GridData GridData GridData FILL_HORIZONTAL filenameCombo setLayoutData filenameCombo addModifyListener ModifyListener modifyText ModifyEvent validatePage browseButton nameGroup browseButton setText _4 GridData GridData HORIZONTAL_ALIGN_END heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH browseButton setLayoutData browseButton addListener handleEvent FileDialog FileDialog getShell PRIMARY_MODAL setText Save_Patch_As_5 setFileName txt_6 IPath setFilesystemFilename toOSString saveInWorkspace saveInWorkspace setText Save_In_Workspace_7 saveInWorkspace addListener handleEvent validatePage updateEnablements createTreeViewer saveToClipboard setSelection validatePage updateEnablements
Sets the file name in the file system text protected void set Filesystem Filename String filename filename Combo set Text filename  setFilesystemFilename filenameCombo setText
new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection container Selection Changed I Container selection get First Element allow null validate Page  ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection containerSelectionChanged IContainer getFirstElement validatePage
new I Double Click Listener public void double Click Double Click Event event I Selection selection event get Selection if selection instanceof I Structured Selection Object item I Structured Selection selection get First Element if tree Viewer get Expanded State item tree Viewer collapse To Level item 1 else tree Viewer expand To Level item 1  IDoubleClickListener doubleClick DoubleClickEvent ISelection getSelection IStructuredSelection IStructuredSelection getFirstElement treeViewer getExpandedState treeViewer collapseToLevel treeViewer expandToLevel
workspace Filename set Layout Data data workspace Filename add Modify Listener new Modify Listener public void modify Text Modify Event e validate Page  workspaceFilename setLayoutData workspaceFilename addModifyListener ModifyListener modifyText ModifyEvent validatePage
Create the tree viewer that shows the container available in the workspace The user can then enter a filename in the text box below the viewer protected void create Tree Viewer Composite parent Create tree viewer inside drill down new Label parent SWT LEFT set Text Policy bind Select a folder then type in the file name  8 NON NLS 1 tree Viewer new Tree Viewer parent SWT BORDER Container Content Provider cp new Container Content Provider cp show Closed Projects false Grid Data data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL data width Hint SIZING SELECTION PANE WIDTH data height Hint SIZING SELECTION PANE HEIGHT tree Viewer get Tree set Layout Data data tree Viewer set Content Provider cp tree Viewer set Label Provider new Workbench Label Provider tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection container Selection Changed I Container selection get First Element allow null validate Page tree Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event I Selection selection event get Selection if selection instanceof I Structured Selection Object item I Structured Selection selection get First Element if tree Viewer get Expanded State item tree Viewer collapse To Level item 1 else tree Viewer expand To Level item 1 This has to be done after the viewer has been laid out tree Viewer set Input Resources Plugin get Workspace name group Composite name Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width 0 name Group set Layout layout data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL name Group set Layout Data data Label label new Label name Group SWT NONE label set Text Policy bind Fi le name  9 NON NLS 1 resource name entry field workspace Filename new Text name Group SWT BORDER data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL workspace Filename set Layout Data data workspace Filename add Modify Listener new Modify Listener public void modify Text Modify Event e validate Page  createTreeViewer setText Select_a_folder_then_type_in_the_file_name__8 treeViewer TreeViewer ContainerContentProvider ContainerContentProvider showClosedProjects GridData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL widthHint SIZING_SELECTION_PANE_WIDTH heightHint SIZING_SELECTION_PANE_HEIGHT treeViewer getTree setLayoutData treeViewer setContentProvider treeViewer setLabelProvider WorkbenchLabelProvider treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection containerSelectionChanged IContainer getFirstElement validatePage treeViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent ISelection getSelection IStructuredSelection IStructuredSelection getFirstElement treeViewer getExpandedState treeViewer collapseToLevel treeViewer expandToLevel treeViewer setInput ResourcesPlugin getWorkspace nameGroup GridLayout GridLayout numColumns marginWidth nameGroup setLayout GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL nameGroup setLayoutData nameGroup setText le_name__9 workspaceFilename nameGroup GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL workspaceFilename setLayoutData workspaceFilename addModifyListener ModifyListener modifyText ModifyEvent validatePage
Enable and disable controls based on the selected radio button protected void update Enablements int type get Save Type browse Button set Enabled type FILESYSTEM filename Combo set Enabled type FILESYSTEM tree Viewer get Tree set Enabled type WORKSPACE workspace Filename set Enabled type WORKSPACE  updateEnablements getSaveType browseButton setEnabled filenameCombo setEnabled treeViewer getTree setEnabled workspaceFilename setEnabled
Answers the type of the patch file destination public int get Save Type if save In Filesystem get Selection return FILESYSTEM else if save To Clipboard get Selection return CLIPBOARD else return WORKSPACE  getSaveType saveInFilesystem getSelection saveToClipboard getSelection
Remember the container selected in the tree viewer public void container Selection Changed I Container container selected Container container  containerSelectionChanged IContainer selectedContainer
Constructor for Patch File Creation Options Page protected Patch File Creation Options Page String page Name super page Name  PatchFileCreationOptionsPage PatchFileCreationOptionsPage pageName pageName
Constructor for Patch File Creation Options Page protected Patch File Creation Options Page String page Name String title Image Descriptor title Image super page Name title title Image  PatchFileCreationOptionsPage PatchFileCreationOptionsPage pageName ImageDescriptor titleImage pageName titleImage
public void create Control Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout composite set Layout layout composite set Layout Data new Grid Data set Control composite set F1 help Workbench Help set Help composite I Help Context Ids PATCH OPTIONS PAGE recurse Option new Button composite SWT CHECK recurse Option set Text Policy bind Do not recurse into sub folders 10 NON NLS 1 recurse Option set Selection true include New Files Options new Button composite SWT CHECK include New Files Options set Text Policy bind Do not include new files in patch 11 NON NLS 1 include New Files Options set Selection true Group diff Type Group new Group composite SWT NONE layout new Grid Layout layout margin Height 0 diff Type Group set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL diff Type Group set Layout Data data diff Type Group set Text Policy bind Diff output format 12 NON NLS 1 unified Diff Option new Button diff Type Group SWT RADIO unified Diff Option set Text Policy bind Unified  format required by Compare With Patch feature  13 NON NLS 1 unified Diff Option set Selection true context Diff Option new Button diff Type Group SWT RADIO context Diff Option set Text Policy bind Context 14 NON NLS 1 regular Diff Option new Button diff Type Group SWT RADIO regular Diff Option set Text Policy bind Standard 15 NON NLS 1  createControl GridLayout GridLayout setLayout setLayoutData GridData setControl WorkbenchHelp setHelp IHelpContextIds PATCH_OPTIONS_PAGE recurseOption recurseOption setText Do_not_recurse_into_sub folders_10 recurseOption setSelection includeNewFilesOptions includeNewFilesOptions setText Do_not_include_new_files_in_patch_11 includeNewFilesOptions setSelection diffTypeGroup GridLayout marginHeight diffTypeGroup setLayout GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL diffTypeGroup setLayoutData diffTypeGroup setText Diff_output_format_12 unifiedDiffOption diffTypeGroup unifiedDiffOption setText Unified_ format_required_by_Compare_With_Patch_feature _13 unifiedDiffOption setSelection contextDiffOption diffTypeGroup contextDiffOption setText Context_14 regularDiffOption diffTypeGroup regularDiffOption setText Standard_15
Answers if the difference operation should be run recursively public boolean is Recursive return recurse Option get Selection  isRecursive recurseOption getSelection
Return the list of Diff command options configured on this page public Local Option get Options List options new Array List 5 if include New Files Options get Selection options add Diff INCLUDE NEWFILES if recurse Option get Selection options add Diff DO NOT RECURSE if unified Diff Option get Selection options add Diff UNIFIED FORMAT else if context Diff Option get Selection options add Diff CONTEXT FORMAT return Local Option options to Array new Local Option options size  LocalOption getOptions ArrayList includeNewFilesOptions getSelection INCLUDE_NEWFILES recurseOption getSelection DO_NOT_RECURSE unifiedDiffOption getSelection UNIFIED_FORMAT contextDiffOption getSelection CONTEXT_FORMAT LocalOption toArray LocalOption
public void set Visible boolean visible super set Visible visible if visible recurse Option set Focus  setVisible setVisible recurseOption setFocus
public Generate Diff File Wizard I Structured Selection selection I Resource resource super this selection selection this resource resource set Window Title Policy bind GenerateCVS Diff title NON NLS 1 initialize Default Page Image Descriptor  GenerateDiffFileWizard IStructuredSelection IResource setWindowTitle GenerateCVSDiff initializeDefaultPageImageDescriptor
public void add Pages String page Title Policy bind GenerateCVS Diff page Title NON NLS 1 String page Description Policy bind GenerateCVS Diff page Description NON NLS 1 main Page new Patch File Selection Page page Title page Title CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG WIZBAN DIFF selection main Page set Description page Description add Page main Page page Title Policy bind Advanced options 19 NON NLS 1 page Description Policy bind Configure the options used for the CVS diff command 20 NON NLS 1 options Page new Patch File Creation Options Page page Title page Title CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG WIZBAN DIFF options Page set Description page Description add Page options Page  addPages pageTitle GenerateCVSDiff pageTitle pageDescription GenerateCVSDiff pageDescription mainPage PatchFileSelectionPage pageTitle pageTitle CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_WIZBAN_DIFF mainPage setDescription pageDescription addPage mainPage pageTitle Advanced_options_19 pageDescription Configure_the_options_used_for_the_CVS_diff_command_20 optionsPage PatchFileCreationOptionsPage pageTitle pageTitle CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_WIZBAN_DIFF optionsPage setDescription pageDescription addPage optionsPage
Initializes this creation wizard using the passed workbench and object selection param workbench the current workbench param selection the current object selection public void init I Workbench workbench I Structured Selection selection  IWorkbench IStructuredSelection
Declares the wizard banner iamge descriptor protected void initialize Default Page Image Descriptor String icon Path icon Path icons full NON NLS 1 try URL installURL CVSUI Plugin get Plugin get Descriptor get InstallURL URL url new URL installURL icon Path wizards newconnect wiz gif NON NLS 1 Image Descriptor desc Image Descriptor create FromURL url set Default Page Image Descriptor desc catch MalformedURL Exception e Should not happen Ignore  initializeDefaultPageImageDescriptor iconPath iconPath CVSUIPlugin getPlugin getDescriptor getInstallURL iconPath newconnect_wiz ImageDescriptor ImageDescriptor createFromURL setDefaultPageImageDescriptor MalformedURLException
Method declared on I Wizard public boolean needs Progress Monitor return true  IWizard needsProgressMonitor
Completes processing of the wizard If this method returns code true code the wizard will close otherwise it will stay active public boolean perform Finish String fs main Page get Filesystem File I File ws main Page get Workspace File int type main Page get Save Type try if type main Page CLIPBOARD File file new File fs null fs ws get Location toOS String if file exists prompt then delete String title Policy bind GenerateCVS Diff overwrite Title NON NLS 1 String msg Policy bind GenerateCVS Diff overwrite Msg NON NLS 1 final Message Dialog dialog new Message Dialog get Shell title null msg Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants CANCEL LABEL 0 dialog open if dialog get Return Code 0 cancel return false get Container run true true new Generate Diff File Operation resource file false options Page get Options get Shell if type main Page WORKSPACE ws get Parent refresh Local I Resource DEPTH ONE null else get Container run true true new Generate Diff File Operation resource null true options Page get Options get Shell return true catch Interrupted Exception e1 return true catch Core Exception e CVSUI Plugin open Error get Shell Policy bind GenerateCVS Diff error null e NON NLS 1 return false catch Invocation Target Exception e2 CVSUI Plugin open Error get Shell Policy bind GenerateCVS Diff error null e2 NON NLS 1 return false  performFinish mainPage getFilesystemFile IFile mainPage getWorkspaceFile mainPage getSaveType mainPage getLocation toOSString GenerateCVSDiff overwriteTitle GenerateCVSDiff overwriteMsg MessageDialog MessageDialog getShell MessageDialog IDialogConstants YES_LABEL IDialogConstants CANCEL_LABEL getReturnCode getContainer GenerateDiffFileOperation optionsPage getOptions getShell mainPage getParent refreshLocal IResource DEPTH_ONE getContainer GenerateDiffFileOperation optionsPage getOptions getShell InterruptedException CoreException CVSUIPlugin openError getShell GenerateCVSDiff InvocationTargetException CVSUIPlugin openError getShell GenerateCVSDiff

Get the wizard page that follows the given page If about To Show is true then the page will be shown Otherwise only its state will be queried param page a wizard page param about To Show true iof the page returned will be shown return the next wizard page  aboutToShow aboutToShow

private K Subst Change Element I File file int classification boolean excluded K Subst Option fromK Subst K Subst Option toK Subst this file file this classification classification this excluded excluded this fromK Subst fromK Subst this toK Subst toK Subst  KSubstChangeElement IFile KSubstOption fromKSubst KSubstOption toKSubst fromKSubst fromKSubst toKSubst toKSubst
this toK Subst toK Subst public boolean matches Filter int filter return classification filter 0  toKSubst toKSubst matchesFilter
return classification filter 0 public boolean is Excluded return excluded  isExcluded
return excluded public void set Excluded boolean excluded this excluded excluded  setExcluded
this excluded excluded public boolean is NewK Subst Mode return fromK Subst equals toK Subst  isNewKSubstMode fromKSubst toKSubst
return fromK Subst equals toK Subst public void setK Subst K Subst Option toK Subst this toK Subst toK Subst  fromKSubst toKSubst setKSubst KSubstOption toKSubst toKSubst toKSubst
this toK Subst toK Subst public K Subst Option getK Subst return toK Subst  toKSubst toKSubst KSubstOption getKSubst toKSubst
return toK Subst public I File get File return file  toKSubst IFile getFile
Creates a wizard to set the keyword substitution mode for the specified resources param resources the resources to alter param depth the recursion depth param default Option the keyword substitution option to select by default public K Subst Wizard I Resource resources int depth K Subst Option default Option super this defaultK Subst default Option this resources resources this depth depth set Window Title Policy bind K Subst Wizard title NON NLS 1  defaultOption KSubstWizard IResource KSubstOption defaultOption defaultKSubst defaultOption setWindowTitle KSubstWizard
Returns the keyword substitution option that was selected at the time the Finish button was pressed public K Subst Option getK Subst Option return defaultK Subst  KSubstOption getKSubstOption defaultKSubst
public void add Pages Image Descriptor subst Image CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG WIZBAN KEYWORD add main page String page Title Policy bind K Subst Wizard Selection Page page Title NON NLS 1 String page Description Policy bind K Subst Wizard Selection Page page Description NON NLS 1 main Page new K Subst Wizard Selection Page page Title page Title subst Image defaultK Subst main Page set Description page Description main Page set Title page Title add Page main Page add summary page page Title Policy bind K Subst Wizard Summary Page page Title NON NLS 1 page Description Policy bind K Subst Wizard Summary Page page Description NON NLS 1 summary Page new K Subst Wizard Summary Page page Title page Title subst Image false summary Page set Description page Description add Page summary Page add shared files warning page page Title Policy bind K Subst Wizard Shared Files Page page Title NON NLS 1 page Description Policy bind K Subst Wizard Shared Files Page page Description NON NLS 1 shared Files Page new K Subst Wizard Shared Files Page page Title page Title subst Image false shared Files Page set Description page Description add Page shared Files Page add changed files warning page page Title Policy bind K Subst Wizard Dirty Files Page page Title NON NLS 1 page Description Policy bind K Subst Wizard Dirty Files Page page Description NON NLS 1 dirty Files Page new K Subst Wizard Dirty Files Page page Title page Title subst Image false dirty Files Page set Description page Description add Page dirty Files Page add commit comment page page Title Policy bind K Subst Wizard Commit Comment Page page Title NON NLS 1 page Description Policy bind K Subst Wizard Commit Comment Page page Description NON NLS 1 commit Comment Page new K Subst Wizard Commit Comment Page parent Dialog page Title page Title subst Image page Description add Page commit Comment Page  addPages ImageDescriptor substImage CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_WIZBAN_KEYWORD pageTitle KSubstWizardSelectionPage pageTitle pageDescription KSubstWizardSelectionPage pageDescription mainPage KSubstWizardSelectionPage pageTitle pageTitle substImage defaultKSubst mainPage setDescription pageDescription mainPage setTitle pageTitle addPage mainPage pageTitle KSubstWizardSummaryPage pageTitle pageDescription KSubstWizardSummaryPage pageDescription summaryPage KSubstWizardSummaryPage pageTitle pageTitle substImage summaryPage setDescription pageDescription addPage summaryPage pageTitle KSubstWizardSharedFilesPage pageTitle pageDescription KSubstWizardSharedFilesPage pageDescription sharedFilesPage KSubstWizardSharedFilesPage pageTitle pageTitle substImage sharedFilesPage setDescription pageDescription addPage sharedFilesPage pageTitle KSubstWizardDirtyFilesPage pageTitle pageDescription KSubstWizardDirtyFilesPage pageDescription dirtyFilesPage KSubstWizardDirtyFilesPage pageTitle pageTitle substImage dirtyFilesPage setDescription pageDescription addPage dirtyFilesPage pageTitle KSubstWizardCommitCommentPage pageTitle pageDescription KSubstWizardCommitCommentPage pageDescription commitCommentPage KSubstWizardCommitCommentPage parentDialog pageTitle pageTitle substImage pageDescription addPage commitCommentPage
public I Wizard Page get Next Page I Wizard Page page if page main Page if prepare Shared Files Page return shared Files Page else if page shared Files Page if shared Files Page include Shared Files prepare Dirty Files Page return dirty Files Page else if page summary Page return null prepare Summary Page if page commit Comment Page return commit Comment Page return summary Page  IWizardPage getNextPage IWizardPage mainPage prepareSharedFilesPage sharedFilesPage sharedFilesPage sharedFilesPage includeSharedFiles prepareDirtyFilesPage dirtyFilesPage summaryPage prepareSummaryPage commitCommentPage commitCommentPage summaryPage
public I Wizard Page get Previous Page I Wizard Page page if page summary Page return commit Comment Page else if page commit Comment Page if shared Files Page include Shared Files prepare Dirty Files Page return dirty Files Page if prepare Shared Files Page return shared Files Page return main Page else if page dirty Files Page if prepare Shared Files Page return shared Files Page return main Page else if page shared Files Page return main Page return null  IWizardPage getPreviousPage IWizardPage summaryPage commitCommentPage commitCommentPage sharedFilesPage includeSharedFiles prepareDirtyFilesPage dirtyFilesPage prepareSharedFilesPage sharedFilesPage mainPage dirtyFilesPage prepareSharedFilesPage sharedFilesPage mainPage sharedFilesPage mainPage
Method declared on I Wizard public boolean needs Progress Monitor return true  IWizard needsProgressMonitor
Method declared on I Wizard public boolean needs Previous And Next Buttons return true  IWizard needsPreviousAndNextButtons
get Container run false fork true cancelable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try monitor begin Task 10000 NON NLS 1 monitor set Task Name Policy bind K Subst Wizard working NON NLS 1 compute Change List main Page getK Subst Option Map table get Provider Mapping int work Per Provider 10000 table size 1 monitor worked work Per Provider for Iterator it table entry Set iterator it has Next Map Entry entry Map Entry it next CVS Team Provider provider CVS Team Provider entry get Key Map provider Files Map entry get Value String comment commit Comment Page get Comment I Status status provider set Keyword Substitution provider Files comment Policy sub Monitor For monitor work Per Provider if status get Code CVS Status OK messages add status catch Team Exception e throw new Invocation Target Exception e finally monitor done  getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask setTaskName KSubstWizard computeChangeList mainPage getKSubstOption getProviderMapping workPerProvider workPerProvider entrySet hasNext CVSTeamProvider CVSTeamProvider getKey providerFiles getValue commitCommentPage getComment IStatus setKeywordSubstitution providerFiles subMonitorFor workPerProvider getCode CVSStatus TeamException InvocationTargetException
public boolean perform Finish try if shared Files Page include Shared Files Message Dialog open Confirm get Shell null Policy bind K Subst Wizard Shared Files Page contents NON NLS 1 return false defaultK Subst main Page getK Subst Option final List messages new Array List get Container run false fork true cancelable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try monitor begin Task 10000 NON NLS 1 monitor set Task Name Policy bind K Subst Wizard working NON NLS 1 compute Change List main Page getK Subst Option Map table get Provider Mapping int work Per Provider 10000 table size 1 monitor worked work Per Provider for Iterator it table entry Set iterator it has Next Map Entry entry Map Entry it next CVS Team Provider provider CVS Team Provider entry get Key Map provider Files Map entry get Value String comment commit Comment Page get Comment I Status status provider set Keyword Substitution provider Files comment Policy sub Monitor For monitor work Per Provider if status get Code CVS Status OK messages add status catch Team Exception e throw new Invocation Target Exception e finally monitor done Check for any status messages and display them if messages is Empty boolean error false Multi Status combined Status new Multi Status CVSUI Plugin ID 0 Policy bind K Subst Wizard problems Message null NON NLS 1 for int i 0 i messages size i I Status status I Status messages get i if status get Severity I Status ERROR status get Code CVS Status SERVER ERROR error true combined Status merge status String message null I Status status To Display if combined Status get Children length 1 message combined Status get Message status To Display combined Status get Children 0 else status To Display combined Status String title if error title Policy bind K Subst Wizard error Title NON NLS 1 else title Policy bind K Subst Wizard warning Title NON NLS 1 CVSUI Plugin open Error get Shell title message new CVS Exception status To Display return true catch Interrupted Exception e1 return true catch Invocation Target Exception e2 CVSUI Plugin open Error get Shell Policy bind K Subst Wizard problems Message null e2 NON NLS 1 return false  performFinish sharedFilesPage includeSharedFiles MessageDialog openConfirm getShell KSubstWizardSharedFilesPage defaultKSubst mainPage getKSubstOption ArrayList getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask setTaskName KSubstWizard computeChangeList mainPage getKSubstOption getProviderMapping workPerProvider workPerProvider entrySet hasNext CVSTeamProvider CVSTeamProvider getKey providerFiles getValue commitCommentPage getComment IStatus setKeywordSubstitution providerFiles subMonitorFor workPerProvider getCode CVSStatus TeamException InvocationTargetException isEmpty MultiStatus combinedStatus MultiStatus CVSUIPlugin KSubstWizard problemsMessage IStatus IStatus getSeverity IStatus getCode CVSStatus SERVER_ERROR combinedStatus IStatus statusToDisplay combinedStatus getChildren combinedStatus getMessage statusToDisplay combinedStatus getChildren statusToDisplay combinedStatus KSubstWizard errorTitle KSubstWizard warningTitle CVSUIPlugin openError getShell CVSException statusToDisplay InterruptedException InvocationTargetException CVSUIPlugin openError getShell KSubstWizard problemsMessage
private boolean prepare Dirty Files Page Busy Indicator show While get Container get Shell get Display new Runnable public void run compute Change List main Page getK Subst Option dirty Files Page set Change List change List  prepareDirtyFilesPage BusyIndicator showWhile getContainer getShell getDisplay computeChangeList mainPage getKSubstOption dirtyFilesPage setChangeList changeList
private boolean prepare Dirty Files Page Busy Indicator show While get Container get Shell get Display new Runnable public void run compute Change List main Page getK Subst Option dirty Files Page set Change List change List return dirty Files Page is List Empty  prepareDirtyFilesPage BusyIndicator showWhile getContainer getShell getDisplay computeChangeList mainPage getKSubstOption dirtyFilesPage setChangeList changeList dirtyFilesPage isListEmpty
private boolean prepare Shared Files Page Busy Indicator show While get Container get Shell get Display new Runnable public void run compute Change List main Page getK Subst Option shared Files Page set Change List change List  prepareSharedFilesPage BusyIndicator showWhile getContainer getShell getDisplay computeChangeList mainPage getKSubstOption sharedFilesPage setChangeList changeList
private boolean prepare Shared Files Page Busy Indicator show While get Container get Shell get Display new Runnable public void run compute Change List main Page getK Subst Option shared Files Page set Change List change List return shared Files Page is List Empty  prepareSharedFilesPage BusyIndicator showWhile getContainer getShell getDisplay computeChangeList mainPage getKSubstOption sharedFilesPage setChangeList changeList sharedFilesPage isListEmpty
private void prepare Summary Page Busy Indicator show While get Container get Shell get Display new Runnable public void run compute Change List main Page getK Subst Option summary Page set Change List change List get Filters  prepareSummaryPage BusyIndicator showWhile getContainer getShell getDisplay computeChangeList mainPage getKSubstOption summaryPage setChangeList changeList getFilters
private void prepare Summary Page Busy Indicator show While get Container get Shell get Display new Runnable public void run compute Change List main Page getK Subst Option summary Page set Change List change List get Filters  prepareSummaryPage BusyIndicator showWhile getContainer getShell getDisplay computeChangeList mainPage getKSubstOption summaryPage setChangeList changeList getFilters
current Resource accept new I Resource Visitor public boolean visit I Resource resource throws Core Exception try if resource get Type I Resource FILE resource exists seen contains resource seen add resource I File file I File resource ICVS File cvs File CVS Workspace Root getCVS File For file if cvs File is Managed Resource Sync Info info cvs File get Sync Info classify the change final int classification if info is Added classification K Subst Change Element ADDED FILE else if info is Deleted return true else if cvs File is Modified null classification K Subst Change Element CHANGED FILE else classification K Subst Change Element UNCHANGED FILE determine the to from substitution modes K Subst Option fromK Subst info get Keyword Mode K Subst Option toK Subst ksubst if ksubst null toK Subst K Subst Option from File file change List add new K Subst Change Element file classification false fromK Subst toK Subst catch Team Exception e throw new Core Exception e get Status always return true and let the depth determine if children are visited return true  currentResource IResourceVisitor IResource CoreException getType IResource IFile IFile ICVSFile cvsFile CVSWorkspaceRoot getCVSFileFor cvsFile isManaged ResourceSyncInfo cvsFile getSyncInfo isAdded KSubstChangeElement ADDED_FILE isDeleted cvsFile isModified KSubstChangeElement CHANGED_FILE KSubstChangeElement UNCHANGED_FILE KSubstOption fromKSubst getKeywordMode KSubstOption toKSubst toKSubst KSubstOption fromFile changeList KSubstChangeElement fromKSubst toKSubst TeamException CoreException getStatus
param ksubst the desired keyword substitution mode if null chooses for each file code K Subst Option from Pattern file Name is Binary KSUBST BINARY KSUBST TEXT code private void compute Change List final K Subst Option ksubst if change List null if change Option ksubst return change List clear else change List new Array List change Option ksubst recurse over all specified resources considering each exactly once final Set seen new Hash Set for int i 0 i resources length i final I Resource current Resource resources i try current Resource accept new I Resource Visitor public boolean visit I Resource resource throws Core Exception try if resource get Type I Resource FILE resource exists seen contains resource seen add resource I File file I File resource ICVS File cvs File CVS Workspace Root getCVS File For file if cvs File is Managed Resource Sync Info info cvs File get Sync Info classify the change final int classification if info is Added classification K Subst Change Element ADDED FILE else if info is Deleted return true else if cvs File is Modified null classification K Subst Change Element CHANGED FILE else classification K Subst Change Element UNCHANGED FILE determine the to from substitution modes K Subst Option fromK Subst info get Keyword Mode K Subst Option toK Subst ksubst if ksubst null toK Subst K Subst Option from File file change List add new K Subst Change Element file classification false fromK Subst toK Subst catch Team Exception e throw new Core Exception e get Status always return true and let the depth determine if children are visited return true depth false catch Core Exception e CVSUI Plugin open Error get Shell Policy bind K Subst Wizard problems Message null e NON NLS 1  KSubstOption fromPattern fileName isBinary KSUBST_BINARY KSUBST_TEXT computeChangeList KSubstOption changeList changeOption changeList changeList ArrayList changeOption HashSet IResource currentResource currentResource IResourceVisitor IResource CoreException getType IResource IFile IFile ICVSFile cvsFile CVSWorkspaceRoot getCVSFileFor cvsFile isManaged ResourceSyncInfo cvsFile getSyncInfo isAdded KSubstChangeElement ADDED_FILE isDeleted cvsFile isModified KSubstChangeElement CHANGED_FILE KSubstChangeElement UNCHANGED_FILE KSubstOption fromKSubst getKeywordMode KSubstOption toKSubst toKSubst KSubstOption fromFile changeList KSubstChangeElement fromKSubst toKSubst TeamException CoreException getStatus CoreException CVSUIPlugin openError getShell KSubstWizard problemsMessage
private int get Filters return K Subst Change Element ADDED FILE shared Files Page include Shared Files K Subst Change Element UNCHANGED FILE dirty Files Page include Dirty Files K Subst Change Element CHANGED FILE 0 0  getFilters KSubstChangeElement ADDED_FILE sharedFilesPage includeSharedFiles KSubstChangeElement UNCHANGED_FILE dirtyFilesPage includeDirtyFiles KSubstChangeElement CHANGED_FILE
private Map get Provider Mapping Map table new Hash Map int filter get Filters for Iterator it change List iterator it has Next K Subst Change Element change K Subst Change Element it next if change is Excluded change is NewK Subst Mode change matches Filter filter classify file according to its provider I File file change get File Repository Provider provider Repository Provider get Provider file get Project CVS Provider Plugin get Type Id Map provider Map Map table get provider if provider Map null provider Map new Hash Map table put provider provider Map provider Map put file change toK Subst return table  getProviderMapping HashMap getFilters changeList hasNext KSubstChangeElement KSubstChangeElement isExcluded isNewKSubstMode matchesFilter IFile getFile RepositoryProvider RepositoryProvider getProvider getProject CVSProviderPlugin getTypeId providerMap providerMap providerMap HashMap providerMap providerMap toKSubst
Method set Parent Dialog param dialog public void set Parent Dialog Dialog dialog this parent Dialog dialog  setParentDialog setParentDialog parentDialog

Constructor for K Subst Wizard Commit Comment Page param page Name param title param title Image param description public K Subst Wizard Commit Comment Page Dialog parent Dialog String page Name String title Image Descriptor title Image String description super page Name title title Image description commit Comment Area new Commit Comment Area parent Dialog null  KSubstWizardCommitCommentPage pageName titleImage KSubstWizardCommitCommentPage parentDialog pageName ImageDescriptor titleImage pageName titleImage commitCommentArea CommitCommentArea parentDialog
see org eclipse jface dialogs I Dialog Page create Control org eclipse swt widgets Composite public void create Control Composite parent Composite top new Composite parent SWT NONE top set Layout new Grid Layout set Control top set F1 help Workbench Help set Help top I Help Context Ids KEYWORD SUBSTITUTION COMMIT COMMENT PAGE commit Comment Area create Area top Dialog apply Dialog Font parent  IDialogPage createControl createControl setLayout GridLayout setControl WorkbenchHelp setHelp IHelpContextIds KEYWORD_SUBSTITUTION_COMMIT_COMMENT_PAGE commitCommentArea createArea applyDialogFont
Method get Comment return String public String get Comment return commit Comment Area get Comment  getComment getComment commitCommentArea getComment
public void set Visible boolean visible super set Visible visible if visible commit Comment Area set Focus  setVisible setVisible commitCommentArea setFocus

private List Viewer list Viewer public K Subst Wizard Dirty Files Page String page Name String title Image Descriptor image boolean include Dirty Files super page Name title image this include Dirty Files include Dirty Files  ListViewer listViewer KSubstWizardDirtyFilesPage pageName ImageDescriptor includeDirtyFiles pageName includeDirtyFiles includeDirtyFiles
include Dirty Files Button set Selection include Dirty Files include Dirty Files Button add Listener SWT Selection new Listener public void handle Event Event e include Dirty Files include Dirty Files Button get Selection  includeDirtyFilesButton setSelection includeDirtyFiles includeDirtyFilesButton addListener handleEvent includeDirtyFiles includeDirtyFilesButton getSelection
public void create Control Composite parent Composite top new Composite parent SWT NONE top set Layout new Grid Layout set Control top set F1 help Workbench Help set Help top I Help Context Ids KEYWORD SUBSTITUTION CHANGED PAGE create Wrapping Label top Policy bind K Subst Wizard Dirty Files Page contents 0 NON NLS 1 include Dirty Files Button new Button top SWT CHECK include Dirty Files Button set Text Policy bind K Subst Wizard Dirty Files Page include Dirty Files NON NLS 1 include Dirty Files Button set Selection include Dirty Files include Dirty Files Button add Listener SWT Selection new Listener public void handle Event Event e include Dirty Files include Dirty Files Button get Selection create Separator top SPACER HEIGHT list Viewer create File List Viewer top Policy bind K Subst Wizard Dirty Files Page dirty Files Viewer title LIST HEIGHT HINT NON NLS 1 Dialog apply Dialog Font parent  createControl setLayout GridLayout setControl WorkbenchHelp setHelp IHelpContextIds KEYWORD_SUBSTITUTION_CHANGED_PAGE createWrappingLabel KSubstWizardDirtyFilesPage includeDirtyFilesButton includeDirtyFilesButton setText KSubstWizardDirtyFilesPage includeDirtyFiles includeDirtyFilesButton setSelection includeDirtyFiles includeDirtyFilesButton addListener handleEvent includeDirtyFiles includeDirtyFilesButton getSelection createSeparator SPACER_HEIGHT listViewer createFileListViewer KSubstWizardDirtyFilesPage dirtyFilesViewer LIST_HEIGHT_HINT applyDialogFont
public boolean include Dirty Files return include Dirty Files  includeDirtyFiles includeDirtyFiles
public void set Change List List changes List filtered Files new Array List for Iterator it changes iterator it has Next K Subst Change Element change K Subst Change Element it next if change matches Filter K Subst Change Element CHANGED FILE filtered Files add change get File list Viewer set Input filtered Files to Array  setChangeList filteredFiles ArrayList hasNext KSubstChangeElement KSubstChangeElement matchesFilter KSubstChangeElement CHANGED_FILE filteredFiles getFile listViewer setInput filteredFiles toArray
public boolean is List Empty returns true iff the list is empty after filtering return list Viewer get List get Item Count 0  isListEmpty listViewer getList getItemCount
public void set Visible boolean visible super set Visible visible if visible include Dirty Files Button set Focus  setVisible setVisible includeDirtyFilesButton setFocus

Collections sort ksubst Options new Comparator public int compare Object a Object b String a Key K Subst Option a get Long Display Text String b Key K Subst Option b get Long Display Text return a Key compare To b Key  ksubstOptions aKey KSubstOption getLongDisplayText bKey KSubstOption getLongDisplayText aKey compareTo bKey
public K Subst Wizard Selection Page String page Name String title Image Descriptor image K Subst Option defaultK Subst super page Name title image this ksubst defaultK Subst sort the options by display text K Subst Option options K Subst Option get AllK Subst Options this ksubst Options new Array List for int i 0 i options length i K Subst Option option options i if Command KSUBST BINARY equals option Command KSUBST TEXT equals option ksubst Options add option Collections sort ksubst Options new Comparator public int compare Object a Object b String a Key K Subst Option a get Long Display Text String b Key K Subst Option b get Long Display Text return a Key compare To b Key  KSubstWizardSelectionPage pageName ImageDescriptor KSubstOption defaultKSubst pageName defaultKSubst KSubstOption KSubstOption getAllKSubstOptions ksubstOptions ArrayList KSubstOption KSUBST_BINARY KSUBST_TEXT ksubstOptions ksubstOptions aKey KSubstOption getLongDisplayText bKey KSubstOption getLongDisplayText aKey compareTo bKey
Listener selection Listener new Listener public void handle Event Event event update Enablements  selectionListener handleEvent updateEnablements
public void create Control Composite parent Composite top new Composite parent SWT NONE top set Layout new Grid Layout set Control top set F1 help Workbench Help set Help top I Help Context Ids KEYWORD SUBSTITUTION SELECTION PAGE Listener selection Listener new Listener public void handle Event Event event update Enablements Automatic automatic Radio Button create Radio Button top Policy bind K Subst Wizard Selection Page automatic Button 1 NON NLS 1 automatic Radio Button add Listener SWT Selection selection Listener automatic Radio Button set Selection ksubst null create Wrapping Label top Policy bind K Subst Wizard Selection Page automatic Label NON NLS 1 Command KSUBST BINARY get Long Display Text CVS Provider Plugin get Plugin get Default TextK Subst Option get Long Display Text LABEL INDENT WIDTH Binary binary Radio Button create Radio Button top Policy bind K Subst Wizard Selection Page binary Button 1 NON NLS 1 binary Radio Button add Listener SWT Selection selection Listener binary Radio Button set Selection Command KSUBST BINARY equals ksubst create Indented Label top Policy bind K Subst Wizard Selection Page binary Label LABEL INDENT WIDTH NON NLS 1 Text without keyword substitution text Radio Button create Radio Button top Policy bind K Subst Wizard Selection Page text Button 1 NON NLS 1 text Radio Button add Listener SWT Selection selection Listener text Radio Button set Selection Command KSUBST TEXT equals ksubst create Indented Label top Policy bind K Subst Wizard Selection Page text Label LABEL INDENT WIDTH NON NLS 1 Text with keyword substitution ksubst Radio Button create Radio Button top Policy bind K Subst Wizard Selection Page text With Substitutions Button 1 NON NLS 1 ksubst Radio Button add Listener SWT Selection selection Listener ksubst Radio Button set Selection false create Indented Label top Policy bind K Subst Wizard Selection Page text With Substitutions Label LABEL INDENT WIDTH NON NLS 1 ksubst Option Combo new Combo top SWT READ ONLY ksubst Option Combo add Listener SWT Selection selection Listener Grid Data data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN BEGINNING data horizontal Indent LABEL INDENT WIDTH ksubst Option Combo set Layout Data data populate the combo box and select the default option for int i 0 i ksubst Options size i K Subst Option option K Subst Option ksubst Options get i ksubst Option Combo add option get Long Display Text if option equals ksubst ksubst Option Combo select i ksubst Radio Button set Selection true else if option equals Command KSUBST TEXT EXPAND if no expansion mode selected show KSUBST TEXT EXPAND since it is the server default if ksubst Radio Button get Selection ksubst Option Combo select i update Enablements Dialog apply Dialog Font parent  createControl setLayout GridLayout setControl WorkbenchHelp setHelp IHelpContextIds KEYWORD_SUBSTITUTION_SELECTION_PAGE selectionListener handleEvent updateEnablements automaticRadioButton createRadioButton KSubstWizardSelectionPage automaticButton automaticRadioButton addListener selectionListener automaticRadioButton setSelection createWrappingLabel KSubstWizardSelectionPage automaticLabel KSUBST_BINARY getLongDisplayText CVSProviderPlugin getPlugin getDefaultTextKSubstOption getLongDisplayText LABEL_INDENT_WIDTH binaryRadioButton createRadioButton KSubstWizardSelectionPage binaryButton binaryRadioButton addListener selectionListener binaryRadioButton setSelection KSUBST_BINARY createIndentedLabel KSubstWizardSelectionPage binaryLabel LABEL_INDENT_WIDTH textRadioButton createRadioButton KSubstWizardSelectionPage textButton textRadioButton addListener selectionListener textRadioButton setSelection KSUBST_TEXT createIndentedLabel KSubstWizardSelectionPage textLabel LABEL_INDENT_WIDTH ksubstRadioButton createRadioButton KSubstWizardSelectionPage textWithSubstitutionsButton ksubstRadioButton addListener selectionListener ksubstRadioButton setSelection createIndentedLabel KSubstWizardSelectionPage textWithSubstitutionsLabel LABEL_INDENT_WIDTH ksubstOptionCombo READ_ONLY ksubstOptionCombo addListener selectionListener GridData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_BEGINNING horizontalIndent LABEL_INDENT_WIDTH ksubstOptionCombo setLayoutData ksubstOptions KSubstOption KSubstOption ksubstOptions ksubstOptionCombo getLongDisplayText ksubstOptionCombo ksubstRadioButton setSelection KSUBST_TEXT_EXPAND KSUBST_TEXT_EXPAND ksubstRadioButton getSelection ksubstOptionCombo updateEnablements applyDialogFont
Enable and disable controls based on the selected radio button protected void update Enablements if ksubst Radio Button get Selection ksubst Option Combo set Enabled true ksubst K Subst Option ksubst Options get ksubst Option Combo get Selection Index else ksubst Option Combo set Enabled false if automatic Radio Button get Selection ksubst null else if binary Radio Button get Selection ksubst Command KSUBST BINARY else if text Radio Button get Selection ksubst Command KSUBST TEXT  updateEnablements ksubstRadioButton getSelection ksubstOptionCombo setEnabled KSubstOption ksubstOptions ksubstOptionCombo getSelectionIndex ksubstOptionCombo setEnabled automaticRadioButton getSelection binaryRadioButton getSelection KSUBST_BINARY textRadioButton getSelection KSUBST_TEXT
public K Subst Option getK Subst Option return ksubst  KSubstOption getKSubstOption

private List Viewer list Viewer public K Subst Wizard Shared Files Page String page Name String title Image Descriptor image boolean include Shared Files super page Name title image this include Shared Files include Shared Files  ListViewer listViewer KSubstWizardSharedFilesPage pageName ImageDescriptor includeSharedFiles pageName includeSharedFiles includeSharedFiles
include Shared Files Button set Selection include Shared Files include Shared Files Button add Listener SWT Selection new Listener public void handle Event Event e include Shared Files include Shared Files Button get Selection  includeSharedFilesButton setSelection includeSharedFiles includeSharedFilesButton addListener handleEvent includeSharedFiles includeSharedFilesButton getSelection
public void create Control Composite parent Composite top new Composite parent SWT NONE top set Layout new Grid Layout set Control top create Wrapping Label top Policy bind K Subst Wizard Shared Files Page contents 0 NON NLS 1 set F1 help Workbench Help set Help top I Help Context Ids KEYWORD SUBSTITUTION SHARED PAGE include Shared Files Button new Button top SWT CHECK include Shared Files Button set Text Policy bind K Subst Wizard Shared Files Page include Shared Files NON NLS 1 include Shared Files Button set Selection include Shared Files include Shared Files Button add Listener SWT Selection new Listener public void handle Event Event e include Shared Files include Shared Files Button get Selection create Separator top SPACER HEIGHT list Viewer create File List Viewer top Policy bind K Subst Wizard Shared Files Page shared Files Viewer title LIST HEIGHT HINT NON NLS 1 Dialog apply Dialog Font parent  createControl setLayout GridLayout setControl createWrappingLabel KSubstWizardSharedFilesPage WorkbenchHelp setHelp IHelpContextIds KEYWORD_SUBSTITUTION_SHARED_PAGE includeSharedFilesButton includeSharedFilesButton setText KSubstWizardSharedFilesPage includeSharedFiles includeSharedFilesButton setSelection includeSharedFiles includeSharedFilesButton addListener handleEvent includeSharedFiles includeSharedFilesButton getSelection createSeparator SPACER_HEIGHT listViewer createFileListViewer KSubstWizardSharedFilesPage sharedFilesViewer LIST_HEIGHT_HINT applyDialogFont
public boolean include Shared Files return include Shared Files  includeSharedFiles includeSharedFiles
public void set Change List List changes List filtered Files new Array List for Iterator it changes iterator it has Next K Subst Change Element change K Subst Change Element it next if change matches Filter K Subst Change Element CHANGED FILE K Subst Change Element UNCHANGED FILE filtered Files add change get File list Viewer set Input filtered Files to Array  setChangeList filteredFiles ArrayList hasNext KSubstChangeElement KSubstChangeElement matchesFilter KSubstChangeElement CHANGED_FILE KSubstChangeElement UNCHANGED_FILE filteredFiles getFile listViewer setInput filteredFiles toArray
public boolean is List Empty returns true iff the list is empty after filtering return list Viewer get List get Item Count 0  isListEmpty listViewer getList getItemCount
public void set Visible boolean visible super set Visible visible if visible include Shared Files Button set Focus  setVisible setVisible includeSharedFilesButton setFocus

Arrays sort ksubst Options new Comparator public int compare Object a Object b String a Key get Mode Display Text K Subst Option a String b Key get Mode Display Text K Subst Option b return a Key compare To b Key  ksubstOptions aKey getModeDisplayText KSubstOption bKey getModeDisplayText KSubstOption aKey compareTo bKey
public K Subst Wizard Summary Page String page Name String title Image Descriptor image boolean show Unaffected Files super page Name title image this show Unaffected Files show Unaffected Files sort the options by display text ksubst Options K Subst Option get AllK Subst Options ksubst Options Display Text new String ksubst Options length Arrays sort ksubst Options new Comparator public int compare Object a Object b String a Key get Mode Display Text K Subst Option a String b Key get Mode Display Text K Subst Option b return a Key compare To b Key for int i 0 i ksubst Options length i ksubst Options Display Text i get Mode Display Text ksubst Options i  KSubstWizardSummaryPage pageName ImageDescriptor showUnaffectedFiles pageName showUnaffectedFiles showUnaffectedFiles ksubstOptions KSubstOption getAllKSubstOptions ksubstOptionsDisplayText ksubstOptions ksubstOptions aKey getModeDisplayText KSubstOption bKey getModeDisplayText KSubstOption aKey compareTo bKey ksubstOptions ksubstOptionsDisplayText getModeDisplayText ksubstOptions
public void handle Event Event e Busy Indicator show While get Container get Shell get Display new Runnable public void run show Unaffected Files show Unaffected Files Button get Selection refresh false  handleEvent BusyIndicator showWhile getContainer getShell getDisplay showUnaffectedFiles showUnaffectedFilesButton getSelection
show Unaffected Files Button add Listener SWT Selection new Listener public void handle Event Event e Busy Indicator show While get Container get Shell get Display new Runnable public void run show Unaffected Files show Unaffected Files Button get Selection refresh false  showUnaffectedFilesButton addListener handleEvent BusyIndicator showWhile getContainer getShell getDisplay showUnaffectedFiles showUnaffectedFilesButton getSelection
public void create Control Composite parent Composite top new Composite parent SWT NONE top set Layout new Grid Layout set Control top create Wrapping Label top Policy bind K Subst Wizard Summary Page contents 0 NON NLS 1 set F1 help Workbench Help set Help top I Help Context Ids KEYWORD SUBSTITUTION SUMMARY PAGE create Separator top 0 show Unaffected Files Button new Button top SWT CHECK show Unaffected Files Button set Text Policy bind K Subst Wizard Summary Page show Unaffected Files NON NLS 1 show Unaffected Files Button set Selection show Unaffected Files show Unaffected Files Button add Listener SWT Selection new Listener public void handle Event Event e Busy Indicator show While get Container get Shell get Display new Runnable public void run show Unaffected Files show Unaffected Files Button get Selection refresh false table Viewer create File Table Viewer top Policy bind K Subst Wizard Summary Page summary Viewer title NON NLS 1 Policy bind K Subst Wizard Summary Page summary Viewer file Header NON NLS 1 Policy bind K Subst Wizard Summary Page summary Viewer ksubst Header NON NLS 1 LIST HEIGHT HINT Dialog apply Dialog Font parent  createControl setLayout GridLayout setControl createWrappingLabel KSubstWizardSummaryPage WorkbenchHelp setHelp IHelpContextIds KEYWORD_SUBSTITUTION_SUMMARY_PAGE createSeparator showUnaffectedFilesButton showUnaffectedFilesButton setText KSubstWizardSummaryPage showUnaffectedFiles showUnaffectedFilesButton setSelection showUnaffectedFiles showUnaffectedFilesButton addListener handleEvent BusyIndicator showWhile getContainer getShell getDisplay showUnaffectedFiles showUnaffectedFilesButton getSelection tableViewer createFileTableViewer KSubstWizardSummaryPage summaryViewer KSubstWizardSummaryPage summaryViewer fileHeader KSubstWizardSummaryPage summaryViewer ksubstHeader LIST_HEIGHT_HINT applyDialogFont
final Checkbox Table Viewer table Viewer new Checkbox Table Viewer table table Viewer set Content Provider new I Structured Content Provider public Object get Elements Object input Element return Object input Element  CheckboxTableViewer tableViewer CheckboxTableViewer tableViewer setContentProvider IStructuredContentProvider getElements inputElement inputElement
return Object input Element public void dispose  inputElement
public void dispose public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
show file name and keyword substitution mode table Viewer set Label Provider new I Table Label Provider public Image get Column Image Object element int column Index return null  tableViewer setLabelProvider ITableLabelProvider getColumnImage columnIndex
public String get Column Text Object element int column Index K Subst Change Element change K Subst Change Element element if column Index 0 return change get File get Full Path to String else if column Index 1 return get Mode Display Text change getK Subst return null  getColumnText columnIndex KSubstChangeElement KSubstChangeElement columnIndex getFile getFullPath toString columnIndex getModeDisplayText getKSubst
return null public void add Listener I Label Provider Listener listener  addListener ILabelProviderListener
public void add Listener I Label Provider Listener listener public void dispose  addListener ILabelProviderListener
public void dispose public boolean is Label Property Object element String property return false  isLabelProperty
return false public void remove Listener I Label Provider Listener listener  removeListener ILabelProviderListener
table Viewer set Sorter new Workbench Viewer Sorter public int compare Viewer viewer Object e1 Object e2 I File file1 K Subst Change Element e1 get File I File file2 K Subst Change Element e2 get File return super compare viewer file1 file2  tableViewer setSorter WorkbenchViewerSorter IFile KSubstChangeElement getFile IFile KSubstChangeElement getFile
filter table Viewer add Filter new Viewer Filter public boolean select Viewer viewer Object parent Element Object element K Subst Change Element change K Subst Change Element element return show Unaffected Files change is NewK Subst Mode change matches Filter filter Type  tableViewer addFilter ViewerFilter parentElement KSubstChangeElement KSubstChangeElement showUnaffectedFiles isNewKSubstMode matchesFilter filterType
table Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event K Subst Change Element change K Subst Change Element event get Element if table Viewer get Grayed change if it s grayed then give it the appearance of being disabled update Check Status change else otherwise record the change change set Excluded event get Checked  tableViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent KSubstChangeElement KSubstChangeElement getElement tableViewer getGrayed updateCheckStatus setExcluded getChecked
table Viewer set Cell Modifier new I Cell Modifier public Object get Value Object element String property K Subst Change Element change K Subst Change Element element K Subst Option option change getK Subst for int i 0 i ksubst Options length i if ksubst Options i equals option return new Integer i XXX need to handle this better return null  tableViewer setCellModifier ICellModifier getValue KSubstChangeElement KSubstChangeElement KSubstOption getKSubst ksubstOptions ksubstOptions
return null public boolean can Modify Object element String property return true  canModify
public void modify Object element String property Object value XXX The runtime type of element seems to be a Table Item instead of the actual element data as with the other methods As a workaround use the table s selection mechanism instead I Structured Selection selection I Structured Selection table Viewer get Selection element selection get First Element int index Integer value int Value selection will be 1 if some arbitrary text was entered since the combo box is not read only if index 1 K Subst Change Element change K Subst Change Element element K Subst Option new Option ksubst Options index if new Option equals change getK Subst the option has been changed include it by default now if it wasn t before since the user has shown interest in it change setK Subst new Option change set Excluded false table Viewer refresh change true update Labels update Check Status change  TableItem IStructuredSelection IStructuredSelection tableViewer getSelection getFirstElement intValue KSubstChangeElement KSubstChangeElement KSubstOption newOption ksubstOptions newOption getKSubst setKSubst newOption setExcluded tableViewer updateLabels updateCheckStatus
Creates a Table Viewer whose input is a Map from I File to K Subst Option param parent the parent of the viewer param title the text for the title label param height Hint the nominal height of the list return the created list viewer public Checkbox Table Viewer create File Table Viewer Composite parent String title String file Header String ksubst Header int height Hint create Label parent title create a table Table table new Table parent SWT CHECK SWT V SCROLL SWT H SCROLL SWT BORDER SWT FULL SELECTION Grid Data data new Grid Data Grid Data FILL BOTH data height Hint height Hint table set Layout Data data table set Lines Visible true table set Header Visible true add the columns Table Column column new Table Column table SWT LEFT column set Text file Header column new Table Column table SWT LEFT column set Text ksubst Header Table Layout table Layout new Table Layout table set Layout table Layout table Layout add Column Data new Column Weight Data 1 true table Layout add Column Data new Column Weight Data 1 true create a viewer for the table final Checkbox Table Viewer table Viewer new Checkbox Table Viewer table table Viewer set Content Provider new I Structured Content Provider public Object get Elements Object input Element return Object input Element public void dispose public void input Changed Viewer viewer Object old Input Object new Input show file name and keyword substitution mode table Viewer set Label Provider new I Table Label Provider public Image get Column Image Object element int column Index return null public String get Column Text Object element int column Index K Subst Change Element change K Subst Change Element element if column Index 0 return change get File get Full Path to String else if column Index 1 return get Mode Display Text change getK Subst return null public void add Listener I Label Provider Listener listener public void dispose public boolean is Label Property Object element String property return false public void remove Listener I Label Provider Listener listener sort by file name table Viewer set Sorter new Workbench Viewer Sorter public int compare Viewer viewer Object e1 Object e2 I File file1 K Subst Change Element e1 get File I File file2 K Subst Change Element e2 get File return super compare viewer file1 file2 filter table Viewer add Filter new Viewer Filter public boolean select Viewer viewer Object parent Element Object element K Subst Change Element change K Subst Change Element element return show Unaffected Files change is NewK Subst Mode change matches Filter filter Type add a check state listener table Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event K Subst Change Element change K Subst Change Element event get Element if table Viewer get Grayed change if it s grayed then give it the appearance of being disabled update Check Status change else otherwise record the change change set Excluded event get Checked add a cell editor in the Keyword Substitution Mode column Table Editor table Editor new Table Editor table Cell Editor cell Editor new Combo Box Cell Editor table ksubst Options Display Text table Viewer set Cell Editors new Cell Editor null cell Editor table Viewer set Column Properties new String file mode NON NLS 1 NON NLS 2 table Viewer set Cell Modifier new I Cell Modifier public Object get Value Object element String property K Subst Change Element change K Subst Change Element element K Subst Option option change getK Subst for int i 0 i ksubst Options length i if ksubst Options i equals option return new Integer i XXX need to handle this better return null public boolean can Modify Object element String property return true public void modify Object element String property Object value XXX The runtime type of element seems to be a Table Item instead of the actual element data as with the other methods As a workaround use the table s selection mechanism instead I Structured Selection selection I Structured Selection table Viewer get Selection element selection get First Element int index Integer value int Value selection will be 1 if some arbitrary text was entered since the combo box is not read only if index 1 K Subst Change Element change K Subst Change Element element K Subst Option new Option ksubst Options index if new Option equals change getK Subst the option has been changed include it by default now if it wasn t before since the user has shown interest in it change setK Subst new Option change set Excluded false table Viewer refresh change true update Labels update Check Status change return table Viewer  TableViewer IFile KSubstOption heightHint CheckboxTableViewer createFileTableViewer fileHeader ksubstHeader heightHint createLabel V_SCROLL H_SCROLL FULL_SELECTION GridData GridData GridData FILL_BOTH heightHint heightHint setLayoutData setLinesVisible setHeaderVisible TableColumn TableColumn setText fileHeader TableColumn setText ksubstHeader TableLayout tableLayout TableLayout setLayout tableLayout tableLayout addColumnData ColumnWeightData tableLayout addColumnData ColumnWeightData CheckboxTableViewer tableViewer CheckboxTableViewer tableViewer setContentProvider IStructuredContentProvider getElements inputElement inputElement inputChanged oldInput newInput tableViewer setLabelProvider ITableLabelProvider getColumnImage columnIndex getColumnText columnIndex KSubstChangeElement KSubstChangeElement columnIndex getFile getFullPath toString columnIndex getModeDisplayText getKSubst addListener ILabelProviderListener isLabelProperty removeListener ILabelProviderListener tableViewer setSorter WorkbenchViewerSorter IFile KSubstChangeElement getFile IFile KSubstChangeElement getFile tableViewer addFilter ViewerFilter parentElement KSubstChangeElement KSubstChangeElement showUnaffectedFiles isNewKSubstMode matchesFilter filterType tableViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent KSubstChangeElement KSubstChangeElement getElement tableViewer getGrayed updateCheckStatus setExcluded getChecked TableEditor tableEditor TableEditor CellEditor cellEditor ComboBoxCellEditor ksubstOptionsDisplayText tableViewer setCellEditors CellEditor cellEditor tableViewer setColumnProperties tableViewer setCellModifier ICellModifier getValue KSubstChangeElement KSubstChangeElement KSubstOption getKSubst ksubstOptions ksubstOptions canModify TableItem IStructuredSelection IStructuredSelection tableViewer getSelection getFirstElement intValue KSubstChangeElement KSubstChangeElement KSubstOption newOption ksubstOptions newOption getKSubst setKSubst newOption setExcluded tableViewer updateLabels updateCheckStatus tableViewer
public void set Change List List changes int filter Type this filter Type filter Type table Viewer set Input changes to Array refresh true  setChangeList filterType filterType filterType tableViewer setInput toArray
private void refresh boolean update Labels table Viewer refresh update Labels Object elements Object table Viewer get Input for int i 0 i elements length i K Subst Change Element change K Subst Change Element elements i update Check Status change  updateLabels tableViewer updateLabels tableViewer getInput KSubstChangeElement KSubstChangeElement updateCheckStatus
private void update Check Status K Subst Change Element change if change is NewK Subst Mode if the mode differs the checkbox indicates the inclusion exclusion status table Viewer set Grayed change false table Viewer set Checked change change is Excluded else otherwise the checkbox is meaningless except to indicate that the file will not be changed table Viewer set Grayed change true table Viewer set Checked change false  updateCheckStatus KSubstChangeElement isNewKSubstMode tableViewer setGrayed tableViewer setChecked isExcluded tableViewer setGrayed tableViewer setChecked
private String get Mode Display Text K Subst Option option return option get Long Display Text  getModeDisplayText KSubstOption getLongDisplayText
public void set Visible boolean visible super set Visible visible if visible show Unaffected Files Button set Focus  setVisible setVisible showUnaffectedFilesButton setFocus

private boolean supports Multi Selection public Module Selection Page String page Name String title Image Descriptor title Image super page Name title title Image  supportsMultiSelection ModuleSelectionPage pageName ImageDescriptor titleImage pageName titleImage
public void set Help Contxt Id String help Context Id this help Context Id help Context Id  setHelpContxtId helpContextId helpContextId helpContextId
Listener listener new Listener public void handle Event Event event update Enablements false  handleEvent updateEnablements
public void create Control Composite parent Composite composite create Composite parent 2 if help Context Id null Workbench Help set Help composite help Context Id Listener listener new Listener public void handle Event Event event update Enablements false if project null use Project Name Button create Radio Button composite Policy bind Module Selection Page module Is Project 2 NON NLS 1 use Project Name Button add Listener SWT Selection listener use Specified Name Button create Radio Button composite Policy bind Module Selection Page specify Module 1 NON NLS 1 use Specified Name Button add Listener SWT Selection listener text create Text Field composite text add Listener SWT Modify listener select Module Button create Radio Button composite Policy bind Module Selection Page 2 2 NON NLS 1 select Module Button add Listener SWT Selection listener module List create Module Tree composite 2 Set the initial enablement if use Project Name Button null use Project Name Button set Selection true use Specified Name Button set Selection false else use Specified Name Button set Selection true select Module Button set Selection false update Enablements false set Control composite Dialog apply Dialog Font parent  createControl createComposite helpContextId WorkbenchHelp setHelp helpContextId handleEvent updateEnablements useProjectNameButton createRadioButton ModuleSelectionPage moduleIsProject useProjectNameButton addListener useSpecifiedNameButton createRadioButton ModuleSelectionPage specifyModule useSpecifiedNameButton addListener createTextField addListener selectModuleButton createRadioButton ModuleSelectionPage selectModuleButton addListener moduleList createModuleTree useProjectNameButton useProjectNameButton setSelection useSpecifiedNameButton setSelection useSpecifiedNameButton setSelection selectModuleButton setSelection updateEnablements setControl applyDialogFont
public void set Visible boolean visible super set Visible visible if visible if use Project Name Button null use Project Name Button get Selection use Project Name Button set Focus else if use Specified Name Button get Selection text set Focus else module List get Control set Focus  setVisible setVisible useProjectNameButton useProjectNameButton getSelection useProjectNameButton setFocus useSpecifiedNameButton getSelection setFocus moduleList getControl setFocus
get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try location validate Connection monitor catch CVS Exception e throw new Invocation Target Exception e  getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException validateConnection CVSException InvocationTargetException
protected void update Enablements boolean update Modules List if use Project Name Button null use Project Name Button get Selection text set Enabled false module List get Control set Enabled false module Name null set Page Complete true else if use Specified Name Button get Selection text set Enabled true module List get Control set Enabled false module Name text get Text if module Name length 0 module Name null set Page Complete false else set Page Complete true else if bad Location text set Enabled false module List get Control set Enabled true module Name null if module List get Input null update Modules List The input is set after the page is shown to avoid fetching if the user wants to specify the name manually try Validate the location first since the module fecthing is done in a deferred fashion get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try location validate Connection monitor catch CVS Exception e throw new Invocation Target Exception e catch Invocation Target Exception e if bad Location bad Location true CVSUI Plugin open Error get Shell null null e catch Interrupted Exception e Canceled by the user set Module List Input set Page Complete internal Get Selected Modules length 0  updateEnablements updateModulesList useProjectNameButton useProjectNameButton getSelection setEnabled moduleList getControl setEnabled moduleName setPageComplete useSpecifiedNameButton getSelection setEnabled moduleList getControl setEnabled moduleName getText moduleName moduleName setPageComplete setPageComplete badLocation setEnabled moduleList getControl setEnabled moduleName moduleList getInput updateModulesList getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException validateConnection CVSException InvocationTargetException InvocationTargetException badLocation badLocation CVSUIPlugin openError getShell InterruptedException setModuleListInput setPageComplete internalGetSelectedModules
private ICVS Remote Folder internal Get Selected Modules if module List null module List get Control is Enabled I Selection selection module List get Selection if selection is Empty selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection Array List result new Array List for Iterator iter ss iterator iter has Next Object element iter next if element instanceof ICVS Remote Folder result add element return ICVS Remote Folder result to Array new ICVS Remote Folder result size else ICVS Remote Folder folder null if module Name null folder internal Create Module Handle module Name else if project null folder internal Create Module Handle project get Name if folder null return new ICVS Remote Folder folder return new ICVS Remote Folder 0  ICVSRemoteFolder internalGetSelectedModules moduleList moduleList getControl isEnabled ISelection moduleList getSelection isEmpty IStructuredSelection IStructuredSelection IStructuredSelection ArrayList ArrayList hasNext ICVSRemoteFolder ICVSRemoteFolder toArray ICVSRemoteFolder ICVSRemoteFolder moduleName internalCreateModuleHandle moduleName internalCreateModuleHandle getName ICVSRemoteFolder ICVSRemoteFolder
private ICVS Remote Folder internal Create Module Handle String name ICVS Repository Location location get Location if location null return null return location get Remote Folder name CVS Tag DEFAULT  ICVSRemoteFolder internalCreateModuleHandle ICVSRepositoryLocation getLocation getRemoteFolder CVSTag
Return the selected existing remote folder If this method returns code null code then code get Module Name code can be used to get the name entered manually by the use return the selected exisiting remote module public ICVS Remote Folder get Selected Module ICVS Remote Folder selected Modules get Selected Modules if selected Modules length 0 return selected Modules 0 else return null  getModuleName ICVSRemoteFolder getSelectedModule ICVSRemoteFolder selectedModules getSelectedModules selectedModules selectedModules
final ICVS Remote Folder folder new ICVS Remote Folder null Display get Default sync Exec new Runnable public void run folder 0 internal Get Selected Modules  ICVSRemoteFolder ICVSRemoteFolder getDefault syncExec internalGetSelectedModules
public ICVS Remote Folder get Selected Modules final ICVS Remote Folder folder new ICVS Remote Folder null Display get Default sync Exec new Runnable public void run folder 0 internal Get Selected Modules return folder 0  ICVSRemoteFolder getSelectedModules ICVSRemoteFolder ICVSRemoteFolder getDefault syncExec internalGetSelectedModules
public boolean is Expandable Object element I Tree Content Provider cp I Tree Content Provider get Content Provider if cp null return false return cp has Children element  isExpandable ITreeContentProvider ITreeContentProvider getContentProvider hasChildren
result set Label Provider new Workbench Label Provider result add Filter new Viewer Filter public boolean select Viewer viewer Object parent Element Object element return element instanceof ICVS Remote File  setLabelProvider WorkbenchLabelProvider addFilter ViewerFilter parentElement ICVSRemoteFile
result add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Enablements false ICVS Remote Folder modules internal Get Selected Modules if modules length 1 There is at 1 module selected ICVS Remote Folder selected Module modules 0 String repository Relative Path selected Module get Repository Relative Path if repository Relative Path equals Folder Sync Info VIRTUAL DIRECTORY text set Text repository Relative Path else text set Text NON NLS 1  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateEnablements ICVSRemoteFolder internalGetSelectedModules ICVSRemoteFolder selectedModule repositoryRelativePath selectedModule getRepositoryRelativePath repositoryRelativePath FolderSyncInfo VIRTUAL_DIRECTORY setText repositoryRelativePath setText
result get Tree add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e if get Selected Module null Module Selection Page this get Container show Page get Next Page  getTree addMouseListener MouseAdapter mouseDoubleClick MouseEvent getSelectedModule ModuleSelectionPage getContainer showPage getNextPage
private Tree Viewer create Module Tree Composite composite int horizontal Span Tree tree new Tree composite supports Multi Selection SWT MULTI SWT SINGLE SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data horizontal Span horizontal Span tree set Layout Data data Tree Viewer result new Tree Viewer tree Fix to allow filtering to be used without triggering fetching of the contents of all children see bug 62268 public boolean is Expandable Object element I Tree Content Provider cp I Tree Content Provider get Content Provider if cp null return false return cp has Children element result set Content Provider new Remote Content Provider result set Label Provider new Workbench Label Provider result add Filter new Viewer Filter public boolean select Viewer viewer Object parent Element Object element return element instanceof ICVS Remote File result add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Enablements false ICVS Remote Folder modules internal Get Selected Modules if modules length 1 There is at 1 module selected ICVS Remote Folder selected Module modules 0 String repository Relative Path selected Module get Repository Relative Path if repository Relative Path equals Folder Sync Info VIRTUAL DIRECTORY text set Text repository Relative Path else text set Text NON NLS 1 result get Tree add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e if get Selected Module null Module Selection Page this get Container show Page get Next Page result set Sorter new Repository Sorter return result  TreeViewer createModuleTree horizontalSpan supportsMultiSelection GridData GridData GridData FILL_BOTH horizontalSpan horizontalSpan setLayoutData TreeViewer TreeViewer isExpandable ITreeContentProvider ITreeContentProvider getContentProvider hasChildren setContentProvider RemoteContentProvider setLabelProvider WorkbenchLabelProvider addFilter ViewerFilter parentElement ICVSRemoteFile addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateEnablements ICVSRemoteFolder internalGetSelectedModules ICVSRemoteFolder selectedModule repositoryRelativePath selectedModule getRepositoryRelativePath repositoryRelativePath FolderSyncInfo VIRTUAL_DIRECTORY setText repositoryRelativePath setText getTree addMouseListener MouseAdapter mouseDoubleClick MouseEvent getSelectedModule ModuleSelectionPage getContainer showPage getNextPage setSorter RepositorySorter
private void set Module List Input ICVS Repository Location location get Location if location null bad Location return module List set Input location get Remote Folder ICVS Remote Folder REPOSITORY ROOT FOLDER NAME CVS Tag DEFAULT  setModuleListInput ICVSRepositoryLocation getLocation badLocation moduleList setInput getRemoteFolder ICVSRemoteFolder REPOSITORY_ROOT_FOLDER_NAME CVSTag
private ICVS Repository Location get Location return location  ICVSRepositoryLocation getLocation
public void set Location ICVS Repository Location location boolean refresh location null location equals this location this location location bad Location false if module List null update Enablements refresh  setLocation ICVSRepositoryLocation badLocation moduleList updateEnablements
public void set Project I Project project this project project  setProject IProject
this project project public void set Supports Multi Selection boolean supports Multi Selection this supports Multi Selection supports Multi Selection  setSupportsMultiSelection supportsMultiSelection supportsMultiSelection supportsMultiSelection

Return the settings used for all location pages public static I Dialog Settings get Location Dialog Settings I Dialog Settings workbench Settings CVSUI Plugin get Plugin get Dialog Settings I Dialog Settings section workbench Settings get Section New Location Wizard NON NLS 1 if section null section workbench Settings add New Section New Location Wizard NON NLS 1 return section  IDialogSettings getLocationDialogSettings IDialogSettings workbenchSettings CVSUIPlugin getPlugin getDialogSettings IDialogSettings workbenchSettings getSection NewLocationWizard workbenchSettings addNewSection NewLocationWizard
public New Location Wizard I Dialog Settings section get Location Dialog Settings set Dialog Settings section set Window Title Policy bind New Location Wizard title NON NLS 1  NewLocationWizard IDialogSettings getLocationDialogSettings setDialogSettings setWindowTitle NewLocationWizard
public New Location Wizard Properties initial Properties this this properties initial Properties  NewLocationWizard initialProperties initialProperties
Creates the wizard pages public void add Pages main Page new Configuration Wizard Main Page repository Page1 Policy bind New Location Wizard heading CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG WIZBAN NEW LOCATION NON NLS 1 NON NLS 2 if properties null main Page set Properties properties main Page set Show Validate true main Page set Description Policy bind New Location Wizard description NON NLS 1 main Page set Dialog Settings get Dialog Settings add Page main Page  addPages mainPage ConfigurationWizardMainPage repositoryPage1 NewLocationWizard CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_WIZBAN_NEW_LOCATION mainPage setProperties mainPage setShowValidate mainPage setDescription NewLocationWizard mainPage setDialogSettings getDialogSettings addPage mainPage
new Progress Monitor Dialog get Shell run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try location 0 validate Connection monitor catch Team Exception e throw new Invocation Target Exception e  ProgressMonitorDialog getShell IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException validateConnection TeamException InvocationTargetException
public boolean perform Finish final ICVS Repository Location location new ICVS Repository Location null boolean keep Location false try Create a handle to a repository location location 0 main Page get Location Add the location quitely so we can validate location 0 Known Repositories get Instance add Repository location 0 false don t tell anybody if main Page get Validate try new Progress Monitor Dialog get Shell run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try location 0 validate Connection monitor catch Team Exception e throw new Invocation Target Exception e keep Location true catch Interrupted Exception e Cancelled by user Fall through to dispose of location catch Invocation Target Exception e Throwable t e get Target Exception if t instanceof Team Exception throw Team Exception t else if t instanceof Exception throw CVS Exception wrap Exception Exception t else throw CVS Exception wrap Exception e else keep Location true catch Team Exception e if location 0 null Exception creating the root we cannot continue CVSUI Plugin open Error get Container get Shell Policy bind New Location Wizard exception null e NON NLS 1 return false else Exception validating We can continue if the user wishes I Status error e get Status if error is Multi Status error get Children length 1 error error get Children 0 if error is Multi Status CVSUI Plugin open Error get Container get Shell Policy bind New Location Wizard validation Failed Title null e NON NLS 1 else keep Location Message Dialog open Question get Container get Shell Policy bind New Location Wizard validation Failed Title NON NLS 1 Policy bind New Location Wizard validation Failed Text new Object error get Message NON NLS 1 if keep Location Known Repositories get Instance add Repository location 0 true let the world know else Known Repositories get Instance dispose Repository location 0 return keep Location  performFinish ICVSRepositoryLocation ICVSRepositoryLocation keepLocation mainPage getLocation KnownRepositories getInstance addRepository mainPage getValidate ProgressMonitorDialog getShell IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException validateConnection TeamException InvocationTargetException keepLocation InterruptedException InvocationTargetException getTargetException TeamException TeamException CVSException wrapException CVSException wrapException keepLocation TeamException CVSUIPlugin openError getContainer getShell NewLocationWizard IStatus getStatus isMultiStatus getChildren getChildren isMultiStatus CVSUIPlugin openError getContainer getShell NewLocationWizard validationFailedTitle keepLocation MessageDialog openQuestion getContainer getShell NewLocationWizard validationFailedTitle NewLocationWizard validationFailedText getMessage keepLocation KnownRepositories getInstance addRepository KnownRepositories getInstance disposeRepository keepLocation

Repository Selection Page constructor param page Name the name of the page param title the title of the page param title Image the image for the page public Repository Selection Page String page Name String title Image Descriptor title Image super page Name title title Image  RepositorySelectionPage pageName titleImage RepositorySelectionPage pageName ImageDescriptor titleImage pageName titleImage
protected Table Viewer create Table Composite parent int span Table table new Table parent SWT H SCROLL SWT V SCROLL SWT BORDER SWT SINGLE SWT FULL SELECTION Grid Data data new Grid Data Grid Data FILL BOTH Grid Data GRAB HORIZONTAL data horizontal Span span data width Hint 200 table set Layout Data data Table Layout layout new Table Layout layout add Column Data new Column Weight Data 100 true table set Layout layout Table Column col new Table Column table SWT NONE col set Resizable true return new Table Viewer table  TableViewer createTable H_SCROLL V_SCROLL FULL_SELECTION GridData GridData GridData FILL_BOTH GridData GRAB_HORIZONTAL horizontalSpan widthHint setLayoutData TableLayout TableLayout addColumnData ColumnWeightData setLayout TableColumn TableColumn setResizable TableViewer
table set Label Provider new Workbench Label Provider table add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event result ICVS Repository Location I Structured Selection table get Selection get First Element set Page Complete true  setLabelProvider WorkbenchLabelProvider addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ICVSRepositoryLocation IStructuredSelection getSelection getFirstElement setPageComplete
table add Double Click Listener new I Double Click Listener public void double Click Double Click Event event get Container show Page get Next Page  addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getContainer showPage getNextPage
use Existing Repo add Listener SWT Selection new Listener public void handle Event Event event if use New Repo get Selection table get Table set Enabled false result null else table get Table set Enabled true result ICVS Repository Location I Structured Selection table get Selection get First Element set Page Complete true  useExistingRepo addListener handleEvent useNewRepo getSelection getTable setEnabled getTable setEnabled ICVSRepositoryLocation IStructuredSelection getSelection getFirstElement setPageComplete
Creates the UI part of the page param parent the parent of the created widgets public void create Control Composite parent Composite composite create Composite parent 1 set F1 help Workbench Help set Help composite I Help Context Ids SHARING SELECT REPOSITORY PAGE if extended Description null extended Description Policy bind Repository Selection Page description NON NLS 1 create Wrapping Label composite extended Description 0 indent 1 columns use New Repo create Radio Button composite Policy bind Repository Selection Page use New 1 NON NLS 1 use Existing Repo create Radio Button composite Policy bind Repository Selection Page use Existing 1 NON NLS 1 table create Table composite 1 table set Content Provider new Workbench Content Provider table set Label Provider new Workbench Label Provider table add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event result ICVS Repository Location I Structured Selection table get Selection get First Element set Page Complete true table add Double Click Listener new I Double Click Listener public void double Click Double Click Event event get Container show Page get Next Page use Existing Repo add Listener SWT Selection new Listener public void handle Event Event event if use New Repo get Selection table get Table set Enabled false result null else table get Table set Enabled true result ICVS Repository Location I Structured Selection table get Selection get First Element set Page Complete true set Control composite initialize Values Dialog apply Dialog Font parent  createControl createComposite WorkbenchHelp setHelp IHelpContextIds SHARING_SELECT_REPOSITORY_PAGE extendedDescription extendedDescription RepositorySelectionPage createWrappingLabel extendedDescription useNewRepo createRadioButton RepositorySelectionPage useNew useExistingRepo createRadioButton RepositorySelectionPage useExisting createTable setContentProvider WorkbenchContentProvider setLabelProvider WorkbenchLabelProvider addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ICVSRepositoryLocation IStructuredSelection getSelection getFirstElement setPageComplete addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getContainer showPage getNextPage useExistingRepo addListener handleEvent useNewRepo getSelection getTable setEnabled getTable setEnabled ICVSRepositoryLocation IStructuredSelection getSelection getFirstElement setPageComplete setControl initializeValues applyDialogFont
Initializes states of the controls private void initialize Values ICVS Repository Location locations CVSUI Plugin get Plugin get Repository Manager get Known Repository Locations Adaptable List input new Adaptable List locations table set Input input if locations length 0 use New Repo set Selection true else use Existing Repo set Selection true table set Selection new Structured Selection locations 0  initializeValues ICVSRepositoryLocation CVSUIPlugin getPlugin getRepositoryManager getKnownRepositoryLocations AdaptableList AdaptableList setInput useNewRepo setSelection useExistingRepo setSelection setSelection StructuredSelection
public ICVS Repository Location get Location return result  ICVSRepositoryLocation getLocation
public void set Visible boolean visible super set Visible visible if visible use Existing Repo set Focus  setVisible setVisible useExistingRepo setFocus
public void set Extended Description String extended Description this extended Description extended Description  setExtendedDescription extendedDescription extendedDescription extendedDescription

I Log Entry log Entry History Input I File file I Log Entry log Entry this file file this log Entry log Entry  ILogEntry logEntry HistoryInput IFile ILogEntry logEntry logEntry logEntry
public Input Stream get Contents throws Core Exception I Storage s get Storage From Log Entry log Entry if s null return null return new Buffered Input Stream s get Contents  InputStream getContents CoreException IStorage getStorageFromLogEntry logEntry BufferedInputStream getContents
return new Buffered Input Stream s get Contents public String get Name return file get Name  BufferedInputStream getContents getName getName
return file get Name public String get Type return file get File Extension  getName getType getFileExtension
return file get File Extension public Image get Image return CompareUI get Image file  getFileExtension getImage getImage
return CompareUI get Image file public long get Modification Date return log Entry get Date get Time  getImage getModificationDate logEntry getDate getTime
public String get Charset throws Core Exception I Storage s get Storage From Log Entry log Entry if s instanceof I Encoded Storage return I Encoded Storage s get Charset return null  getCharset CoreException IStorage getStorageFromLogEntry logEntry IEncodedStorage IEncodedStorage getCharset
Constructor for Restore From Repository File Selection Page param page Name param title param title Image param description public Restore From Repository File Selection Page String page Name String title Image Descriptor title Image String description super page Name title title Image description  RestoreFromRepositoryFileSelectionPage pageName titleImage RestoreFromRepositoryFileSelectionPage pageName ImageDescriptor titleImage pageName titleImage
Bottom File content viewer file Content Pane new Compare Viewer Switching Pane vsplitter SWT BORDER SWT FLAT protected Viewer get Viewer Viewer old Viewer Object input return CompareUI find Content Viewer old Viewer input this null  fileContentPane CompareViewerSwitchingPane getViewer oldViewer findContentViewer oldViewer
see org eclipse jface dialogs I Dialog Page create Control org eclipse swt widgets Composite public void create Control Composite parent Composite composite create Composite parent 1 set Control composite Workbench Help set Help composite I Help Context Ids RESTORE FROM REPOSITORY FILE SELECTION PAGE Top and bottom panes top is the two selection panes bottom is the file content viewer Splitter vsplitter new Splitter composite SWT VERTICAL Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Grid Data VERTICAL ALIGN FILL Grid Data GRAB VERTICAL Set the width to be extra wide to accomodate the two selection lists data width Hint WIZARD WIDTH vsplitter set Layout Data data Top left and top right panes the left for the files the right for the log entries Splitter hsplitter new Splitter vsplitter SWT HORIZONTAL Top left file selection pane file Selection Pane new Compare Viewer Pane hsplitter SWT BORDER SWT FLAT data new Grid Data Grid Data FILL HORIZONTAL Grid Data FILL VERTICAL file Selection Pane set Layout Data data file Tree create File Selection Tree file Selection Pane Top right Revision selection pane revision Selection Pane new Compare Viewer Pane hsplitter SWT BORDER SWT FLAT data new Grid Data Grid Data FILL HORIZONTAL Grid Data FILL VERTICAL revision Selection Pane set Layout Data data history Table Provider new History Table Provider revisions Table create Revision Selection Table revision Selection Pane history Table Provider revision Selection Pane set Text Policy bind Restore From Repository File Selection Page empty Revision Pane NON NLS 1 Bottom File content viewer file Content Pane new Compare Viewer Switching Pane vsplitter SWT BORDER SWT FLAT protected Viewer get Viewer Viewer old Viewer Object input return CompareUI find Content Viewer old Viewer input this null initialize Values update Widget Enablements Dialog apply Dialog Font parent  IDialogPage createControl createControl createComposite setControl WorkbenchHelp setHelp IHelpContextIds RESTORE_FROM_REPOSITORY_FILE_SELECTION_PAGE GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridData VERTICAL_ALIGN_FILL GridData GRAB_VERTICAL widthHint WIZARD_WIDTH setLayoutData fileSelectionPane CompareViewerPane GridData GridData FILL_HORIZONTAL GridData FILL_VERTICAL fileSelectionPane setLayoutData fileTree createFileSelectionTree fileSelectionPane revisionSelectionPane CompareViewerPane GridData GridData FILL_HORIZONTAL GridData FILL_VERTICAL revisionSelectionPane setLayoutData historyTableProvider HistoryTableProvider revisionsTable createRevisionSelectionTable revisionSelectionPane historyTableProvider revisionSelectionPane setText RestoreFromRepositoryFileSelectionPage emptyRevisionPane fileContentPane CompareViewerSwitchingPane getViewer oldViewer findContentViewer oldViewer initializeValues updateWidgetEnablements applyDialogFont
table set Content Provider new I Structured Content Provider public Object get Elements Object input Element I Log Entry entries get Selected Entries if entries null return entries return new Object 0  setContentProvider IStructuredContentProvider getElements inputElement ILogEntry getSelectedEntries
return new Object 0 public void dispose 
public void dispose public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
new Selection Adapter public void widget Selected Selection Event e Handle check selection in the check state listener if e detail SWT CHECK return handle Revision Selection e item  SelectionAdapter widgetSelected SelectionEvent handleRevisionSelection
table add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event handle Revision Checked event  addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent handleRevisionChecked
protected Checkbox Table Viewer create Revision Selection Table Compare Viewer Pane composite History Table Provider table Provider Checkbox Table Viewer table table Provider create Check Box Table composite table set Content Provider new I Structured Content Provider public Object get Elements Object input Element I Log Entry entries get Selected Entries if entries null return entries return new Object 0 public void dispose public void input Changed Viewer viewer Object old Input Object new Input table set Input this table get Table add Selection Listener new Selection Adapter public void widget Selected Selection Event e Handle check selection in the check state listener if e detail SWT CHECK return handle Revision Selection e item table add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event handle Revision Checked event composite set Content table get Control return table  CheckboxTableViewer createRevisionSelectionTable CompareViewerPane HistoryTableProvider tableProvider CheckboxTableViewer tableProvider createCheckBoxTable setContentProvider IStructuredContentProvider getElements inputElement ILogEntry getSelectedEntries inputChanged oldInput newInput setInput getTable addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleRevisionSelection addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent handleRevisionChecked setContent getControl
new Workbench Label Provider protected String decorate Text String input Object element String text if element instanceof I Folder element equals folder text super decorate Text folder get Project Relative Path to String element else I Log Entry entry I Log Entry files To Restore get element text super decorate Text input element if entry null text Policy bind Restore From Repository File Selection Page file To Restore text entry get Revision NON NLS 1 return text  WorkbenchLabelProvider decorateText IFolder decorateText getProjectRelativePath toString ILogEntry ILogEntry filesToRestore decorateText RestoreFromRepositoryFileSelectionPage fileToRestore getRevision
tree get Tree set Layout Data data tree add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle File Selection event  getTree setLayoutData addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleFileSelection
protected Tree Viewer create File Selection Tree Compare Viewer Pane composite Tree Viewer tree new Tree Viewer composite SWT H SCROLL SWT V SCROLL SWT BORDER tree set Use Hashlookup true tree set Content Provider tree Input get Tree Content Provider tree set Label Provider new Decorating Label Provider new Workbench Label Provider protected String decorate Text String input Object element String text if element instanceof I Folder element equals folder text super decorate Text folder get Project Relative Path to String element else I Log Entry entry I Log Entry files To Restore get element text super decorate Text input element if entry null text Policy bind Restore From Repository File Selection Page file To Restore text entry get Revision NON NLS 1 return text CVSUI Plugin get Plugin get Workbench get Decorator Manager get Label Decorator tree set Sorter new Resource Sorter Resource Sorter NAME tree set Input tree Input Grid Data data new Grid Data Grid Data FILL BOTH Grid Data GRAB VERTICAL tree get Tree set Layout Data data tree add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle File Selection event composite set Content tree get Control return tree  TreeViewer createFileSelectionTree CompareViewerPane TreeViewer TreeViewer H_SCROLL V_SCROLL setUseHashlookup setContentProvider treeInput getTreeContentProvider setLabelProvider DecoratingLabelProvider WorkbenchLabelProvider decorateText IFolder decorateText getProjectRelativePath toString ILogEntry ILogEntry filesToRestore decorateText RestoreFromRepositoryFileSelectionPage fileToRestore getRevision CVSUIPlugin getPlugin getWorkbench getDecoratorManager getLabelDecorator setSorter ResourceSorter ResourceSorter setInput treeInput GridData GridData GridData FILL_BOTH GridData GRAB_VERTICAL getTree setLayoutData addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleFileSelection setContent getControl
Method update Widget Enablements private void update Widget Enablements if files To Restore is Empty set Page Complete false set Error Message null return for Iterator iter files To Restore key Set iterator iter has Next I File file I File iter next if file exists set Page Complete false set Error Message Policy bind Restore From Repository File Selection Page file Exists file get Name NON NLS 1 return I Log Entry entry I Log Entry files To Restore get file if entry is Deletion set Page Complete false set Error Message Policy bind Restore From Repository File Selection Page revision Is Deletion entry get Revision file get Name NON NLS 1 return set Page Complete true set Error Message null  updateWidgetEnablements updateWidgetEnablements filesToRestore isEmpty setPageComplete setErrorMessage filesToRestore keySet hasNext IFile IFile setPageComplete setErrorMessage RestoreFromRepositoryFileSelectionPage fileExists getName ILogEntry ILogEntry filesToRestore isDeletion setPageComplete setErrorMessage RestoreFromRepositoryFileSelectionPage revisionIsDeletion getRevision getName setPageComplete setErrorMessage
Method initialize Values private void initialize Values refresh  initializeValues initializeValues
Sets the folder param folder The folder to set public void set Input I Container folder ICVS File files if folder equals this folder return this folder folder set Tree Input folder files initialize Values update Widget Enablements  setInput IContainer ICVSFile setTreeInput initializeValues updateWidgetEnablements
private void set Tree Input I Container folder ICVS File cvs Files reset I Resource files new I Resource cvs Files length for int i 0 i cvs Files length i try files i cvs Files i getI Resource catch CVS Exception e In practive this error shold not occur It may if there is an existing folder with a name that matches the file but this is bad in general when using CVS CVSUI Plugin log e tree Input set Resources files kludge to avoid auto selection of first element set the root to the folder s parent so the folder appears in the tree tree Input set Root folder get Parent refresh  setTreeInput IContainer ICVSFile cvsFiles IResource IResource cvsFiles cvsFiles cvsFiles getIResource CVSException CVSUIPlugin treeInput setResources treeInput setRoot getParent
private void reset this selected File null this selected Revision null tree Input set Resources null files To Restore new Hash Map if file Content Pane null file Content Pane is Disposed file Content Pane set Input null update Widget Enablements  selectedFile selectedRevision treeInput setResources filesToRestore HashMap fileContentPane fileContentPane isDisposed fileContentPane setInput updateWidgetEnablements
Method refresh private void refresh if folder null return if file Selection Pane null file Selection Pane is Disposed file Selection Pane set Text Policy bind Restore From Repository File Selection Page file Selection Pane Title folder get Project get Name NON NLS 1 file Selection Pane set Image CompareUI get Image folder get Project if revision Selection Pane null revision Selection Pane is Disposed if selected File null revision Selection Pane set Text Policy bind Restore From Repository File Selection Page empty Revision Pane NON NLS 1 revision Selection Pane set Image null Empty the file content viewer if file Content Pane null file Content Pane is Disposed file Content Pane set Input null refresh the tree if file Tree null If the parent folder is in the tree make sure it is expanded file Tree set Expanded State folder true file Tree refresh if revisions Table null revisions Table refresh  fileSelectionPane fileSelectionPane isDisposed fileSelectionPane setText RestoreFromRepositoryFileSelectionPage fileSelectionPaneTitle getProject getName fileSelectionPane setImage getImage getProject revisionSelectionPane revisionSelectionPane isDisposed selectedFile revisionSelectionPane setText RestoreFromRepositoryFileSelectionPage emptyRevisionPane revisionSelectionPane setImage fileContentPane fileContentPane isDisposed fileContentPane setInput fileTree fileTree setExpandedState fileTree revisionsTable revisionsTable
private void set Log Entry Table Input I Log Entry entries this selected Revision null Refresh the table so it picks up the selected entries through its content provider revisions Table refresh Check the previously checked entry if one exists I Log Entry selected Entry I Log Entry files To Restore get selected File if selected Entry null revisions Table set Checked selected Entry true Disable entries that represent deletions since they can t be loaded for int i 0 i entries length i I Log Entry entry entries i if entry is Deletion revisions Table set Grayed entry true Set the titlebar text for the revisions table revision Selection Pane set Text Policy bind Restore From Repository File Selection Page revision Selection Pane Title selected File get Name NON NLS 1 revision Selection Pane set Image CompareUI get Image selected File Clear the file content pane file Content Pane set Input null  setLogEntryTableInput ILogEntry selectedRevision revisionsTable ILogEntry selectedEntry ILogEntry filesToRestore selectedFile selectedEntry revisionsTable setChecked selectedEntry ILogEntry isDeletion revisionsTable setGrayed revisionSelectionPane setText RestoreFromRepositoryFileSelectionPage revisionSelectionPaneTitle selectedFile getName revisionSelectionPane setImage getImage selectedFile fileContentPane setInput
private void handle File Selection Selection Changed Event event I Selection selection event get Selection if selection null selection is Empty clear Selection else if selection instanceof Structured Selection Structured Selection structured Selection Structured Selection selection I Resource resource I Resource structured Selection get First Element if resource instanceof I File handle File Selection I File resource else clear Selection  handleFileSelection SelectionChangedEvent ISelection getSelection isEmpty clearSelection StructuredSelection StructuredSelection structuredSelection StructuredSelection IResource IResource structuredSelection getFirstElement IFile handleFileSelection IFile clearSelection
get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try fetch the entries I Log Entry entries remote File get Log Entries monitor cache the entries with the selected file entries Cache put selected File entries catch Team Exception e throw new Invocation Target Exception e  getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException ILogEntry remoteFile getLogEntries entriesCache selectedFile TeamException InvocationTargetException
Method handle File Selection param file private void handle File Selection I File file if this selected File file return this selected File file if entries Cache get file null try First we need to create a remote file handle so we can get the log entries ICVS Folder parent CVS Workspace Root getCVS Folder For file get Parent Folder Sync Info info parent get Folder Sync Info ICVS Repository Location location Known Repositories get Instance get Repository info get Root final ICVS Remote File remote File location get Remote File new Path info get Repository append file get Name to String CVS Tag DEFAULT Then we need to fetch the log entries get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try fetch the entries I Log Entry entries remote File get Log Entries monitor cache the entries with the selected file entries Cache put selected File entries catch Team Exception e throw new Invocation Target Exception e catch CVS Exception e set Error Message CVSUI Plugin open Error get Shell null null e CVSUI Plugin PERFORM SYNC EXEC get Message return catch Invocation Target Exception e set Error Message CVSUI Plugin open Error get Shell null null e CVSUI Plugin PERFORM SYNC EXEC get Message return catch Interrupted Exception e return Set the log table to display the entries for the selected file set Log Entry Table Input get Selected Entries  handleFileSelection handleFileSelection IFile selectedFile selectedFile entriesCache ICVSFolder CVSWorkspaceRoot getCVSFolderFor getParent FolderSyncInfo getFolderSyncInfo ICVSRepositoryLocation KnownRepositories getInstance getRepository getRoot ICVSRemoteFile remoteFile getRemoteFile getRepository getName toString CVSTag getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException ILogEntry remoteFile getLogEntries entriesCache selectedFile TeamException InvocationTargetException CVSException setErrorMessage CVSUIPlugin openError getShell CVSUIPlugin PERFORM_SYNC_EXEC getMessage InvocationTargetException setErrorMessage CVSUIPlugin openError getShell CVSUIPlugin PERFORM_SYNC_EXEC getMessage InterruptedException setLogEntryTableInput getSelectedEntries
private I Log Entry get Selected Entries return I Log Entry entries Cache get selected File  ILogEntry getSelectedEntries ILogEntry entriesCache selectedFile
get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try ICVS Remote File remote File log Entry get Remote File s 0 I Resource Variant remote File get Storage monitor catch Team Exception e throw new Invocation Target Exception e  getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException ICVSRemoteFile remoteFile logEntry getRemoteFile IResourceVariant remoteFile getStorage TeamException InvocationTargetException
private I Storage get Storage From Log Entry final I Log Entry log Entry final I Storage s new I Storage null try get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try ICVS Remote File remote File log Entry get Remote File s 0 I Resource Variant remote File get Storage monitor catch Team Exception e throw new Invocation Target Exception e catch Invocation Target Exception e set Error Message CVSUI Plugin open Error get Shell null null e CVSUI Plugin PERFORM SYNC EXEC get Message return null catch Interrupted Exception e return null return s 0  IStorage getStorageFromLogEntry ILogEntry logEntry IStorage IStorage getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException ICVSRemoteFile remoteFile logEntry getRemoteFile IResourceVariant remoteFile getStorage TeamException InvocationTargetException InvocationTargetException setErrorMessage CVSUIPlugin openError getShell CVSUIPlugin PERFORM_SYNC_EXEC getMessage InterruptedException
private void handle Revision Checked Check State Changed Event event if event get Checked revisions Table set Checked Elements new Object event get Element files To Restore put selected File event get Element if revisions Table get Checked Elements length 0 files To Restore remove selected File file Tree refresh update Widget Enablements  handleRevisionChecked CheckStateChangedEvent getChecked revisionsTable setCheckedElements getElement filesToRestore selectedFile getElement revisionsTable getCheckedElements filesToRestore selectedFile fileTree updateWidgetEnablements
private void handle Revision Selection Widget w if file Content Pane null file Content Pane is Disposed Object o w get Data if o instanceof I Log Entry I Log Entry selected I Log Entry o if this selected Revision selected return this selected Revision selected if selected is Deletion file Content Pane set Input null else file Content Pane set Input new History Input selected File selected file Content Pane set Text get Edition Label selected File selected file Content Pane set Image CompareUI get Image selected File else file Content Pane set Input null  handleRevisionSelection fileContentPane fileContentPane isDisposed getData ILogEntry ILogEntry ILogEntry selectedRevision selectedRevision isDeletion fileContentPane setInput fileContentPane setInput HistoryInput selectedFile fileContentPane setText getEditionLabel selectedFile fileContentPane setImage getImage selectedFile fileContentPane setInput
Method get Edition Label param selected File param selected return String private String get Edition Label I File selected File I Log Entry selected return Policy bind Restore From Repository File Selection Page file Content Pane Title NON NLS 1 new Object selected File get Name selected get Revision selected File get Full Path make Relative remove Last Segments 1 to String  getEditionLabel selectedFile getEditionLabel IFile selectedFile ILogEntry RestoreFromRepositoryFileSelectionPage fileContentPaneTitle selectedFile getName getRevision selectedFile getFullPath makeRelative removeLastSegments toString
get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try monitor begin Task null 100 files To Restore size for Iterator iter files To Restore key Set iterator iter has Next I File file I File iter next I Log Entry entry I Log Entry files To Restore get file ensure Parent Exists file file create entry get Remote File get Contents Policy sub Monitor For monitor 50 false Policy sub Monitor For monitor 50 catch Team Exception e throw new Invocation Target Exception e catch Core Exception e throw new Invocation Target Exception e finally monitor done  getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask filesToRestore filesToRestore keySet hasNext IFile IFile ILogEntry ILogEntry filesToRestore ensureParentExists getRemoteFile getContents subMonitorFor subMonitorFor TeamException InvocationTargetException CoreException InvocationTargetException
public boolean restore Selected Files try get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try monitor begin Task null 100 files To Restore size for Iterator iter files To Restore key Set iterator iter has Next I File file I File iter next I Log Entry entry I Log Entry files To Restore get file ensure Parent Exists file file create entry get Remote File get Contents Policy sub Monitor For monitor 50 false Policy sub Monitor For monitor 50 catch Team Exception e throw new Invocation Target Exception e catch Core Exception e throw new Invocation Target Exception e finally monitor done catch Invocation Target Exception e set Error Message CVSUI Plugin open Error get Shell null null e CVSUI Plugin PERFORM SYNC EXEC get Message return false catch Interrupted Exception e return false return true  restoreSelectedFiles getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask filesToRestore filesToRestore keySet hasNext IFile IFile ILogEntry ILogEntry filesToRestore ensureParentExists getRemoteFile getContents subMonitorFor subMonitorFor TeamException InvocationTargetException CoreException InvocationTargetException InvocationTargetException setErrorMessage CVSUIPlugin openError getShell CVSUIPlugin PERFORM_SYNC_EXEC getMessage InterruptedException
Method ensure Parent Exists param file private void ensure Parent Exists I Resource resource throws Core Exception I Container parent resource get Parent if parent exists parent get Type I Resource FOLDER ensure Parent Exists parent I Folder parent create false true null  ensureParentExists ensureParentExists IResource CoreException IContainer getParent getType IResource ensureParentExists IFolder
private void clear Selection this selected File null this selected Revision null refresh  clearSelection selectedFile selectedRevision

Constructor for Restore From Repository Wizard public Restore From Repository Wizard I Container parent ICVS File files this parent parent this files files set Window Title Policy bind Restore From Repository Wizard file Selection Page Title NON NLS 1  RestoreFromRepositoryWizard RestoreFromRepositoryWizard IContainer ICVSFile setWindowTitle RestoreFromRepositoryWizard fileSelectionPageTitle
see org eclipse jface wizard I Wizard perform Finish public boolean perform Finish return file Selection Page restore Selected Files  IWizard performFinish performFinish fileSelectionPage restoreSelectedFiles
see org eclipse jface wizard I Wizard add Pages public void add Pages set Needs Progress Monitor true Image Descriptor subst Image CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG WIZBAN CHECKOUT file Selection Page new Restore From Repository File Selection Page File Selection Page Policy bind Restore From Repository Wizard file Selection Page Title subst Image Policy bind Restore From Repository Wizard file Selection Page Description NON NLS 1 NON NLS 2 NON NLS 3 file Selection Page set Input parent files add Page file Selection Page  IWizard addPages addPages setNeedsProgressMonitor ImageDescriptor substImage CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_WIZBAN_CHECKOUT fileSelectionPage RestoreFromRepositoryFileSelectionPage FileSelectionPage RestoreFromRepositoryWizard fileSelectionPageTitle substImage RestoreFromRepositoryWizard fileSelectionPageDescription fileSelectionPage setInput addPage fileSelectionPage

public Sharing Wizard I Dialog Settings cvs Settings CVSUI Plugin get Plugin get Dialog Settings I Dialog Settings section cvs Settings get Section Sharing Wizard NON NLS 1 if section null section cvs Settings add New Section Sharing Wizard NON NLS 1 set Dialog Settings section set Needs Progress Monitor true set Window Title Policy bind Sharing Wizard title NON NLS 1  SharingWizard IDialogSettings cvsSettings CVSUIPlugin getPlugin getDialogSettings IDialogSettings cvsSettings getSection SharingWizard cvsSettings addNewSection SharingWizard setDialogSettings setNeedsProgressMonitor setWindowTitle SharingWizard
public void add Pages Image Descriptor sharing Image CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG WIZBAN SHARE if doesCVS Directory Exist autoconnect Page new Configuration Wizard Autoconnect Page autoconnect Page Policy bind Sharing Wizard auto Connect Title sharing Image NON NLS 1 NON NLS 2 autoconnect Page set Project project autoconnect Page set Description Policy bind Sharing Wizard auto Connect Title Description NON NLS 1 add Page autoconnect Page else ICVS Repository Location locations CVSUI Plugin get Plugin get Repository Manager get Known Repository Locations if locations length 0 location Page new Repository Selection Page import Page Policy bind Sharing Wizard import Title sharing Image NON NLS 1 NON NLS 2 location Page set Description Policy bind Sharing Wizard import Title Description NON NLS 1 add Page location Page create Location Page new Configuration Wizard Main Page create Location Page Policy bind Sharing Wizard enter Information sharing Image NON NLS 1 NON NLS 2 create Location Page set Description Policy bind Sharing Wizard enter Information Description NON NLS 1 create Location Page setCVS Wizard this create Location Page set Dialog Settings New Location Wizard get Location Dialog Settings add Page create Location Page module Page new Module Selection Page module Page Policy bind Sharing Wizard enter Module Name sharing Image NON NLS 1 NON NLS 2 module Page set Description Policy bind Sharing Wizard enter Module Name Description NON NLS 1 module Page setCVS Wizard this module Page set Project project module Page set Help Contxt Id I Help Context Ids SHARING MODULE PAGE add Page module Page add Tag Page sharing Image add Sync Page sharing Image  addPages ImageDescriptor sharingImage CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_WIZBAN_SHARE doesCVSDirectoryExist autoconnectPage ConfigurationWizardAutoconnectPage autoconnectPage SharingWizard autoConnectTitle sharingImage autoconnectPage setProject autoconnectPage setDescription SharingWizard autoConnectTitleDescription addPage autoconnectPage ICVSRepositoryLocation CVSUIPlugin getPlugin getRepositoryManager getKnownRepositoryLocations locationPage RepositorySelectionPage importPage SharingWizard importTitle sharingImage locationPage setDescription SharingWizard importTitleDescription addPage locationPage createLocationPage ConfigurationWizardMainPage createLocationPage SharingWizard enterInformation sharingImage createLocationPage setDescription SharingWizard enterInformationDescription createLocationPage setCVSWizard createLocationPage setDialogSettings NewLocationWizard getLocationDialogSettings addPage createLocationPage modulePage ModuleSelectionPage modulePage SharingWizard enterModuleName sharingImage modulePage setDescription SharingWizard enterModuleNameDescription modulePage setCVSWizard modulePage setProject modulePage setHelpContxtId IHelpContextIds SHARING_MODULE_PAGE addPage modulePage addTagPage sharingImage addSyncPage sharingImage
private void add Tag Page Image Descriptor sharing Image tag Page new Tag Selection Wizard Page tag Page NON NLS 1 Policy bind Sharing Wizard select Tag Title NON NLS 1 sharing Image Policy bind Sharing Wizard select Tag NON NLS 1 Policy bind Sharing Wizard select Tag NON NLS 1 Project Element INCLUDE HEAD TAG Project Element INCLUDE BRANCHES NON NLS 1 tag Page setCVS Wizard this tag Page set Help Contxt Id I Help Context Ids SHARING TAG SELETION PAGE add Page tag Page  addTagPage ImageDescriptor sharingImage tagPage TagSelectionWizardPage tagPage SharingWizard selectTagTitle sharingImage SharingWizard selectTag SharingWizard selectTag ProjectElement INCLUDE_HEAD_TAG ProjectElement INCLUDE_BRANCHES tagPage setCVSWizard tagPage setHelpContxtId IHelpContextIds SHARING_TAG_SELETION_PAGE addPage tagPage
private void add Sync Page Image Descriptor sharing Image sync Page new Sharing Wizard Sync Page sync Page Page NON NLS 1 Policy bind Sharing Wizard 23 NON NLS 1 sharing Image Policy bind Sharing Wizard 24 NON NLS 1 sync Page set Project project sync Page setCVS Wizard this add Page sync Page  addSyncPage ImageDescriptor sharingImage syncPage SharingWizardSyncPage syncPagePage SharingWizard sharingImage SharingWizard syncPage setProject syncPage setCVSWizard addPage syncPage
public boolean can Finish I Wizard Page page get Container get Current Page return page autoconnect Page page sync Page  canFinish IWizardPage getContainer getCurrentPage autoconnectPage syncPage
protected String get Main Page Description return Policy bind Sharing Wizard description NON NLS 1  getMainPageDescription SharingWizard
protected String get Main Page Title return Policy bind Sharing Wizard heading NON NLS 1  getMainPageTitle SharingWizard
public I Wizard Page get Next Page I Wizard Page page Assume the page is about to be shown when this method is invoked return get Next Page page true about to show  IWizardPage getNextPage IWizardPage getNextPage
public I Wizard Page get Next Page I Wizard Page page boolean about To Show if page autoconnect Page return null if page location Page if location Page get Location null return create Location Page else if about To Show try module Page set Location get Location catch Team Exception e1 CVSUI Plugin log e1 return module Page if page create Location Page if about To Show try module Page set Location get Location catch Team Exception e1 CVSUI Plugin log e1 return module Page try if page module Page if about To Show ICVS Remote Folder remote Folder get Remote Folder if exists remote Folder prepare Tag Page remote Folder return tag Page else try populate Sync Page false remote exists catch Invocation Target Exception e CVSUI Plugin open Error get Shell null null e if Repository Provider is Shared project Only stay on the current page if the sharing was a total failure return null return sync Page else return sync Page if page tag Page if about To Show populate Sync Page true remote exists return sync Page catch Invocation Target Exception e Show the error and fall through to return null as the next page CVSUI Plugin open Error get Shell null null e catch Interrupted Exception e The user cancelled Falll through and return null as the next page return null  IWizardPage getNextPage IWizardPage aboutToShow autoconnectPage locationPage locationPage getLocation createLocationPage aboutToShow modulePage setLocation getLocation TeamException CVSUIPlugin modulePage createLocationPage aboutToShow modulePage setLocation getLocation TeamException CVSUIPlugin modulePage modulePage aboutToShow ICVSRemoteFolder remoteFolder getRemoteFolder remoteFolder prepareTagPage remoteFolder tagPage populateSyncPage InvocationTargetException CVSUIPlugin openError getShell RepositoryProvider isShared syncPage syncPage tagPage aboutToShow populateSyncPage syncPage InvocationTargetException CVSUIPlugin openError getShell InterruptedException
get Container run true fork true cancel new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try result 0 autoconnectCVS Project monitor catch Team Exception e throw new Invocation Target Exception e finally monitor done  getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException autoconnectCVSProject TeamException InvocationTargetException
public boolean perform Finish final boolean result new boolean true if is Autoconnect try get Container run true fork true cancel new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try result 0 autoconnectCVS Project monitor catch Team Exception e throw new Invocation Target Exception e finally monitor done catch Interrupted Exception e return true catch Invocation Target Exception e CVSUI Plugin open Error get Container get Shell null null e result 0 false Add the location to the provider if it is new if result 0 is New Location Known Repositories get Instance add Repository location true broadcast if get Container get Current Page sync Page sync Page save Settings sync Page prompt To Commit return result 0  performFinish isAutoconnect getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException autoconnectCVSProject TeamException InvocationTargetException InterruptedException InvocationTargetException CVSUIPlugin openError getContainer getShell isNewLocation KnownRepositories getInstance addRepository getContainer getCurrentPage syncPage syncPage saveSettings syncPage promptToCommit
try get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception new Disconnect Operation null new I Project project true run monitor  getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException DisconnectOperation IProject
public boolean perform Cancel boolean dispose Location is New Location ICVS Repository Location location try location get Location catch Team Exception e CVSUI Plugin log e return true if location null return true If on the last page offer to disconnect if get Container get Current Page sync Page Repository Provider get Provider project null Prompt to see if we should undo out work if prompt To Keep Mapping If we didn t disconnect don t dispose the repo dispose Location false Add the location to the provider if it is new if is New Location Known Repositories get Instance add Repository location true broadcast else try get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception new Disconnect Operation null new I Project project true run monitor catch Invocation Target Exception e CVSUI Plugin log I Status ERROR e get Message e get Target Exception catch Interrupted Exception e Ignore Dispose of the location if appropriate if dispose Location Known Repositories get Instance dispose Repository location return super perform Cancel  performCancel disposeLocation isNewLocation ICVSRepositoryLocation getLocation TeamException CVSUIPlugin getContainer getCurrentPage syncPage RepositoryProvider getProvider promptToKeepMapping disposeLocation isNewLocation KnownRepositories getInstance addRepository getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException DisconnectOperation IProject InvocationTargetException CVSUIPlugin IStatus getMessage getTargetException InterruptedException disposeLocation KnownRepositories getInstance disposeRepository performCancel
private boolean prompt To Keep Mapping return Message Dialog open Question get Shell Policy bind Sharing Wizard 26 Policy bind Sharing Wizard 27 project get Name NON NLS 1 NON NLS 2  promptToKeepMapping MessageDialog openQuestion getShell SharingWizard SharingWizard getName
private void reconcile Project I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception new Reconcile Project Operation get Shell project get Remote Folder run monitor  reconcileProject IProgressMonitor InvocationTargetException InterruptedException ReconcileProjectOperation getShell getRemoteFolder
get Shell get Display sync Exec new Runnable public void run try locations 0 create Location Page get Location catch CVS Exception e exception 0 e  getShell getDisplay syncExec createLocationPage getLocation CVSException
Return an ICVS Repository Location private ICVS Repository Location get Location throws Team Exception If there is an autoconnect page then it has the location if autoconnect Page null return record Location autoconnect Page get Location If the location page has a location use it if location Page null ICVS Repository Location new Location location Page get Location if new Location null return record Location new Location Otherwise get the location from the create location page final ICVS Repository Location locations new ICVS Repository Location null final CVS Exception exception new CVS Exception null get Shell get Display sync Exec new Runnable public void run try locations 0 create Location Page get Location catch CVS Exception e exception 0 e if exception 0 null throw exception 0 return record Location locations 0  ICVSRepositoryLocation ICVSRepositoryLocation getLocation TeamException autoconnectPage recordLocation autoconnectPage getLocation locationPage ICVSRepositoryLocation newLocation locationPage getLocation newLocation recordLocation newLocation ICVSRepositoryLocation ICVSRepositoryLocation CVSException CVSException getShell getDisplay syncExec createLocationPage getLocation CVSException recordLocation
private ICVS Repository Location record Location ICVS Repository Location new Location if new Location null return location if location null new Location equals location if location null is New Location Dispose of the previous location Known Repositories get Instance dispose Repository location location new Location is New Location Known Repositories get Instance is Known Repository new Location get Location if is New Location Add the location silently so we can work with it location Known Repositories get Instance add Repository location false silently return location  ICVSRepositoryLocation recordLocation ICVSRepositoryLocation newLocation newLocation newLocation isNewLocation KnownRepositories getInstance disposeRepository newLocation isNewLocation KnownRepositories getInstance isKnownRepository newLocation getLocation isNewLocation KnownRepositories getInstance addRepository
see I Configuration Wizard init I Workbench I Project public void init I Workbench workbench I Project project this project project  IConfigurationWizard IWorkbench IProject IWorkbench IProject
CVSUI Plugin run With Refresh shell new I Resource project new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try ICVS Folder folder ICVS Folder CVS Workspace Root getCVS Resource For project Folder Sync Info info folder get Folder Sync Info isCVS Folder 0 info null catch final Team Exception e throw new Invocation Target Exception e  CVSUIPlugin runWithRefresh IResource IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException ICVSFolder ICVSFolder CVSWorkspaceRoot getCVSResourceFor FolderSyncInfo getFolderSyncInfo isCVSFolder TeamException InvocationTargetException
private boolean doesCVS Directory Exist Determine if there is an existing CVS directory from which configuration information can be retrieved Shell shell null if get Container null shell get Container get Shell final boolean isCVS Folder new boolean false try CVSUI Plugin run With Refresh shell new I Resource project new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try ICVS Folder folder ICVS Folder CVS Workspace Root getCVS Resource For project Folder Sync Info info folder get Folder Sync Info isCVS Folder 0 info null catch final Team Exception e throw new Invocation Target Exception e null catch Invocation Target Exception e CVSUI Plugin open Error shell null null e catch Interrupted Exception e Cancelled Just fall through return isCVS Folder 0  doesCVSDirectoryExist getContainer getContainer getShell isCVSFolder CVSUIPlugin runWithRefresh IResource IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException ICVSFolder ICVSFolder CVSWorkspaceRoot getCVSResourceFor FolderSyncInfo getFolderSyncInfo isCVSFolder TeamException InvocationTargetException InvocationTargetException CVSUIPlugin openError InterruptedException isCVSFolder
Shoudl the project be auto connected private boolean is Autoconnect return autoconnect Page null doesCVS Directory Exist  isAutoconnect autoconnectPage doesCVSDirectoryExist
get Shell get Display sync Exec new Runnable public void run keep 0 Message Dialog open Question get Container get Shell Policy bind Sharing Wizard validation Failed Title NON NLS 1 Policy bind Sharing Wizard validation Failed Text new Object e get Status get Message NON NLS 1  getShell getDisplay syncExec MessageDialog openQuestion getContainer getShell SharingWizard validationFailedTitle SharingWizard validationFailedText getStatus getMessage
private boolean autoconnectCVS Project I Progress Monitor monitor throws Team Exception try monitor begin Task null 100 Folder Sync Info info autoconnect Page get Folder Sync Info if info null Error return false Get the repository location the get will add the locatin to the provider ICVS Repository Location location get Location Validate the connection if the user wants to boolean validate autoconnect Page get Validate if validate Do the validation try location validate Connection Policy sub Monitor For monitor 50 catch final Team Exception e Exception validating We can continue if the user wishes final boolean keep new boolean false get Shell get Display sync Exec new Runnable public void run keep 0 Message Dialog open Question get Container get Shell Policy bind Sharing Wizard validation Failed Title NON NLS 1 Policy bind Sharing Wizard validation Failed Text new Object e get Status get Message NON NLS 1 if keep 0 return false They want to keep the connection anyway Fall through Set the sharing CVS Workspace Root set Sharing project info Policy sub Monitor For monitor 50 return true finally monitor done  autoconnectCVSProject IProgressMonitor TeamException beginTask FolderSyncInfo autoconnectPage getFolderSyncInfo ICVSRepositoryLocation getLocation autoconnectPage getValidate validateConnection subMonitorFor TeamException getShell getDisplay syncExec MessageDialog openQuestion getContainer getShell SharingWizard validationFailedTitle SharingWizard validationFailedText getStatus getMessage CVSWorkspaceRoot setSharing subMonitorFor
private boolean share Project I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task null 100 ICVS Repository Location location null try location get Location location validate Connection Policy sub Monitor For monitor 50 catch Team Exception e CVSUI Plugin open Error get Shell null null e CVSUI Plugin PERFORM SYNC EXEC if is New Location location null location flush User Info return false Create the remote module for the project Share Project Operation op new Share Project Operation null location project get Remote Folder get Repository Relative Path op set Shell get Shell op run Policy sub Monitor For monitor 50 return true  shareProject IProgressMonitor InvocationTargetException InterruptedException beginTask ICVSRepositoryLocation getLocation validateConnection subMonitorFor TeamException CVSUIPlugin openError getShell CVSUIPlugin PERFORM_SYNC_EXEC isNewLocation flushUserInfo ShareProjectOperation ShareProjectOperation getRemoteFolder getRepositoryRelativePath setShell getShell subMonitorFor
private CVS Tag get Tag if tag Page null tag Page get Selected Tag null return CVS Tag DEFAULT return tag Page get Selected Tag  CVSTag getTag tagPage tagPage getSelectedTag CVSTag tagPage getSelectedTag
private ICVS Remote Folder get Remote Folder ICVS Remote Folder folder module Page get Selected Module return ICVS Remote Folder folder for Tag get Tag  ICVSRemoteFolder getRemoteFolder ICVSRemoteFolder modulePage getSelectedModule ICVSRemoteFolder forTag getTag
private boolean exists ICVS Remote Folder folder I Progress Monitor monitor throws Team Exception if existing Remote null existing Remote equals folder return true if folder exists monitor existing Remote folder return true else existing Remote null return false  ICVSRemoteFolder IProgressMonitor TeamException existingRemote existingRemote existingRemote existingRemote
get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try result 0 exists folder monitor catch Team Exception e throw new Invocation Target Exception e  getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException TeamException InvocationTargetException
private boolean exists final ICVS Remote Folder folder throws Invocation Target Exception Interrupted Exception final boolean result new boolean false get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try result 0 exists folder monitor catch Team Exception e throw new Invocation Target Exception e return result 0  ICVSRemoteFolder InvocationTargetException InterruptedException getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException TeamException InvocationTargetException
get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task null 100 if exists reconcile Project Policy sub Monitor For monitor 50 else share Project Policy sub Monitor For monitor 50 get Participant refresh Now new I Resource project Policy bind Share Project Operation 1 Policy sub Monitor For monitor 50 NON NLS 1 if monitor is Canceled throw new Interrupted Exception monitor done  getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask reconcileProject subMonitorFor shareProject subMonitorFor getParticipant refreshNow IResource ShareProjectOperation subMonitorFor isCanceled InterruptedException
private void populate Sync Page final boolean exists throws Invocation Target Exception Interrupted Exception get Container run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception monitor begin Task null 100 if exists reconcile Project Policy sub Monitor For monitor 50 else share Project Policy sub Monitor For monitor 50 get Participant refresh Now new I Resource project Policy bind Share Project Operation 1 Policy sub Monitor For monitor 50 NON NLS 1 if monitor is Canceled throw new Interrupted Exception monitor done  populateSyncPage InvocationTargetException InterruptedException getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException beginTask reconcileProject subMonitorFor shareProject subMonitorFor getParticipant refreshNow IResource ShareProjectOperation subMonitorFor isCanceled InterruptedException
public I Wizard Page get Previous Page I Wizard Page page if page sync Page There s no going back from the sync page return null return super get Previous Page page  IWizardPage getPreviousPage IWizardPage syncPage getPreviousPage
private void prepare Tag Page ICVS Remote Folder remote tag Page set Folder remote tag Page set Description Policy bind Sharing Wizard 25 remote get Repository Relative Path NON NLS 1  prepareTagPage ICVSRemoteFolder tagPage setFolder tagPage setDescription SharingWizard getRepositoryRelativePath
private Workspace Synchronize Participant get Participant return sync Page get Participant  WorkspaceSynchronizeParticipant getParticipant syncPage getParticipant

class Sharing Commit Action extends CVS Participant Action public Sharing Commit Action I Synchronize Page Configuration configuration I Selection Provider provider super configuration provider Sharing Commit Action NON NLS 1  SharingCommitAction CVSParticipantAction SharingCommitAction ISynchronizePageConfiguration ISelectionProvider SharingCommitAction
super configuration provider Sharing Commit Action NON NLS 1 protected Fast Sync Info Filter get Sync Info Filter return new Sync Info Direction Filter new int Sync Info CONFLICTING Sync Info OUTGOING  SharingCommitAction FastSyncInfoFilter getSyncInfoFilter SyncInfoDirectionFilter SyncInfo SyncInfo
return new Sync Info Direction Filter new int Sync Info CONFLICTING Sync Info OUTGOING protected Synchronize Model Operation get Subscriber Operation I Synchronize Page Configuration configuration I Diff Element elements return new Workspace Commit Operation configuration elements true override  SyncInfoDirectionFilter SyncInfo SyncInfo SynchronizeModelOperation getSubscriberOperation ISynchronizePageConfiguration IDiffElement WorkspaceCommitOperation
ACTION GROUP new CVS Action Delegate Wrapper new Ignore Action configuration protected String get Bundle Key Prefix return Sharing Wizard Ignore NON NLS 1  ACTION_GROUP CVSActionDelegateWrapper IgnoreAction getBundleKeyPrefix SharingWizardIgnore
public void initialize I Synchronize Page Configuration configuration super initialize configuration configuration add Menu Group I Synchronize Page Configuration P TOOLBAR MENU ACTION GROUP commit Action new Sharing Commit Action configuration get Visible Roots Selection Provider append To Group I Synchronize Page Configuration P TOOLBAR MENU ACTION GROUP commit Action append To Group I Synchronize Page Configuration P TOOLBAR MENU ACTION GROUP new CVS Action Delegate Wrapper new Ignore Action configuration protected String get Bundle Key Prefix return Sharing Wizard Ignore NON NLS 1  ISynchronizePageConfiguration addMenuGroup ISynchronizePageConfiguration P_TOOLBAR_MENU ACTION_GROUP commitAction SharingCommitAction getVisibleRootsSelectionProvider appendToGroup ISynchronizePageConfiguration P_TOOLBAR_MENU ACTION_GROUP commitAction appendToGroup ISynchronizePageConfiguration P_TOOLBAR_MENU ACTION_GROUP CVSActionDelegateWrapper IgnoreAction getBundleKeyPrefix SharingWizardIgnore
return Returns the commit Action public Synchronize Model Action get Commit Action return commit Action  commitAction SynchronizeModelAction getCommitAction commitAction

private Sharing Wizard Page Action Group sharing Wizard Page Action Group public Sharing Wizard Sync Page String page Name String title Image Descriptor title Image String description super page Name title title Image description  SharingWizardPageActionGroup sharingWizardPageActionGroup SharingWizardSyncPage pageName ImageDescriptor titleImage pageName titleImage
public void set Project I Project project this project project  setProject IProject
public void create Control Composite parent Composite composite create Composite parent 1 set Control composite set F1 help Workbench Help set Help composite I Help Context Ids SHARING SYNC PAGE page Book new Page Book composite SWT NONE Grid Data data new Grid Data Grid Data FILL BOTH data grab Excess Horizontal Space true data grab Excess Vertical Space true page Book set Layout Data data input create Compare Input input create Part Control page Book sync Page input get Control infos configuration get Sync Info Set infos add Sync Set Changed Listener this no Changes Page create No Changes Page page Book no Changes Page set Layout Data new Grid Data Grid Data FILL BOTH error Page create Error Page page Book error Page set Layout Data new Grid Data Grid Data FILL BOTH update Page Dialog apply Dialog Font parent  createControl createComposite setControl WorkbenchHelp setHelp IHelpContextIds SHARING_SYNC_PAGE pageBook PageBook GridData GridData GridData FILL_BOTH grabExcessHorizontalSpace grabExcessVerticalSpace pageBook setLayoutData createCompareInput createPartControl pageBook syncPage getControl getSyncInfoSet addSyncSetChangedListener noChangesPage createNoChangesPage pageBook noChangesPage setLayoutData GridData GridData FILL_BOTH errorPage createErrorPage pageBook errorPage setLayoutData GridData GridData FILL_BOTH updatePage applyDialogFont
private Control create No Changes Page Page Book page Book Composite composite create Composite page Book 1 create Wrapping Label composite Policy bind Sharing Wizard Sync Page 3 project get Name 0 NON NLS 1 return composite  createNoChangesPage PageBook pageBook createComposite pageBook createWrappingLabel SharingWizardSyncPage getName
show Errors set Layout Data data show Errors add Selection Listener new Selection Adapter public void widget Selected Selection Event e show Errors  showErrors setLayoutData showErrors addSelectionListener SelectionAdapter widgetSelected SelectionEvent showErrors
private Control create Error Page Page Book page Book Composite composite new Composite page Book SWT NONE Grid Layout layout new Grid Layout composite set Layout layout create Wrapping Label composite Policy bind Sharing Wizard Sync Page 4 0 NON NLS 1 Button show Errors new Button composite SWT PUSH show Errors set Text Policy bind Sharing Wizard Sync Page 5 NON NLS 1 Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN END show Errors set Layout Data data show Errors add Selection Listener new Selection Adapter public void widget Selected Selection Event e show Errors return composite  createErrorPage PageBook pageBook pageBook GridLayout GridLayout setLayout createWrappingLabel SharingWizardSyncPage showErrors showErrors setText SharingWizardSyncPage GridData GridData GridData HORIZONTAL_ALIGN_END showErrors setLayoutData showErrors addSelectionListener SelectionAdapter widgetSelected SelectionEvent showErrors
private void show Errors I Team Status status infos get Errors String title Policy bind Sharing Wizard Sync Page 8 NON NLS 1 if status length 1 I Status s status 0 if s get Exception instanceof Core Exception s Core Exception s get Exception get Status Error Dialog open Error get Shell title null s else Multi Status multi new Multi Status CVSUI Plugin ID 0 status Policy bind Sharing Wizard Sync Page 9 null NON NLS 1 Error Dialog open Error get Shell title null multi  showErrors ITeamStatus getErrors SharingWizardSyncPage IStatus getException CoreException CoreException getException getStatus ErrorDialog openError getShell MultiStatus MultiStatus CVSUIPlugin SharingWizardSyncPage ErrorDialog openError getShell
private Participant Page Saveable Part create Compare Input Workspace Synchronize Participant participant new Workspace Synchronize Participant new Resource Scope new I Resource project configuration participant create Page Configuration configuration set Property I Synchronize Page Configuration P TOOLBAR MENU new String I Synchronize Page Configuration LAYOUT GROUP Sharing Wizard Page Action Group ACTION GROUP sharing Wizard Page Action Group new Sharing Wizard Page Action Group configuration add Action Contribution sharing Wizard Page Action Group configuration set Runnable Context get Container Compare Configuration cc new Compare Configuration cc set Left Editable false cc set Right Editable false Participant Page Saveable Part part new Participant Page Saveable Part get Shell cc configuration participant return part  ParticipantPageSaveablePart createCompareInput WorkspaceSynchronizeParticipant WorkspaceSynchronizeParticipant ResourceScope IResource createPageConfiguration setProperty ISynchronizePageConfiguration P_TOOLBAR_MENU ISynchronizePageConfiguration LAYOUT_GROUP SharingWizardPageActionGroup ACTION_GROUP sharingWizardPageActionGroup SharingWizardPageActionGroup addActionContribution sharingWizardPageActionGroup setRunnableContext getContainer CompareConfiguration CompareConfiguration setLeftEditable setRightEditable ParticipantPageSaveablePart ParticipantPageSaveablePart getShell
public void dispose if input null input get Participant dispose input dispose  getParticipant
see org eclipse jface wizard Wizard Page set Previous Page org eclipse jface wizard I Wizard Page public void set Previous Page I Wizard Page page There s no going back from this page super set Previous Page null  WizardPage setPreviousPage IWizardPage setPreviousPage IWizardPage setPreviousPage
see org eclipse team core synchronize I Sync Info Set Change Listener sync Info Set Reset org eclipse team core synchronize Sync Info Set org eclipse core runtime I Progress Monitor public void sync Info Set Reset Sync Info Set set I Progress Monitor monitor update Page  ISyncInfoSetChangeListener syncInfoSetReset SyncInfoSet IProgressMonitor syncInfoSetReset SyncInfoSet IProgressMonitor updatePage
see org eclipse team core synchronize I Sync Info Set Change Listener sync Info Changed org eclipse team core synchronize I Sync Info Set Change Event org eclipse core runtime I Progress Monitor public void sync Info Changed I Sync Info Set Change Event event I Progress Monitor monitor update Page  ISyncInfoSetChangeListener syncInfoChanged ISyncInfoSetChangeEvent IProgressMonitor syncInfoChanged ISyncInfoSetChangeEvent IProgressMonitor updatePage
see org eclipse team core synchronize I Sync Info Set Change Listener sync Info Set Errors org eclipse team core synchronize Sync Info Set org eclipse team core I Team Status org eclipse core runtime I Progress Monitor public void sync Info Set Errors Sync Info Set set I Team Status errors I Progress Monitor monitor update Page  ISyncInfoSetChangeListener syncInfoSetErrors SyncInfoSet ITeamStatus IProgressMonitor syncInfoSetErrors SyncInfoSet ITeamStatus IProgressMonitor updatePage
Display get Default sync Exec new Runnable public void run if page Book is Disposed return if infos get Errors length 0 page Book show Page error Page else if infos is Empty page Book show Page no Changes Page else page Book show Page sync Page  getDefault syncExec pageBook isDisposed getErrors pageBook showPage errorPage isEmpty pageBook showPage noChangesPage pageBook showPage syncPage
private void update Page Display get Default sync Exec new Runnable public void run if page Book is Disposed return if infos get Errors length 0 page Book show Page error Page else if infos is Empty page Book show Page no Changes Page else page Book show Page sync Page  updatePage getDefault syncExec pageBook isDisposed getErrors pageBook showPage errorPage isEmpty pageBook showPage noChangesPage pageBook showPage syncPage
public void show Error Team Status status infos add Error status  showError TeamStatus addError
public Workspace Synchronize Participant get Participant return Workspace Synchronize Participant configuration get Participant  WorkspaceSynchronizeParticipant getParticipant WorkspaceSynchronizeParticipant getParticipant
public void set Visible boolean visible super set Visible visible if sync Page is Visible initialize Size get Shell set Size Math max width 300 Math max height 300  setVisible setVisible syncPage isVisible initializeSize getShell setSize
private void initialize Size I Dialog Settings settings get Dialog Settings if settings null try width settings get Int PAGE WIDTH height settings get Int PAGE HEIGHT catch Number Format Exception e Ignore and go on if width 0 width 640 if height 0 height 480  initializeSize IDialogSettings getDialogSettings getInt PAGE_WIDTH getInt PAGE_HEIGHT NumberFormatException
Save the size of the page so it can be opened with the same size next time public void save Settings I Dialog Settings settings get Dialog Settings if settings null Point size get Shell get Size settings put PAGE WIDTH size x settings put PAGE HEIGHT size y  saveSettings IDialogSettings getDialogSettings getShell getSize PAGE_WIDTH PAGE_HEIGHT
Prompt to commit any leftovers public void prompt To Commit if sharing Wizard Page Action Group null if sharing Wizard Page Action Group get Commit Action is Enabled if Message Dialog open Question get Shell Policy bind Sharing Wizard Sync Page 10 Policy bind Sharing Wizard Sync Page 11 NON NLS 1 NON NLS 2 Null the context so the commit will run in the background configuration set Runnable Context null sharing Wizard Page Action Group get Commit Action run  promptToCommit sharingWizardPageActionGroup sharingWizardPageActionGroup getCommitAction isEnabled MessageDialog openQuestion getShell SharingWizardSyncPage SharingWizardSyncPage setRunnableContext sharingWizardPageActionGroup getCommitAction

public Tag Selection Wizard Page String page Name String title Image Descriptor title Image String description String label int include Flags super page Name title title Image description this label label this include Flags include Flags  TagSelectionWizardPage pageName ImageDescriptor titleImage includeFlags pageName titleImage includeFlags includeFlags
public void set Help Contxt Id String help Context Id this help Context Id help Context Id  setHelpContxtId helpContextId helpContextId helpContextId
if allow No Tag Selection Listener listener new Selection Adapter public void widget Selected Selection Event e use Resource Tag use Resource Tag Button get Selection update Enablement  allowNoTag SelectionListener SelectionAdapter widgetSelected SelectionEvent useResourceTag useResourceTagButton getSelection updateEnablement
public void create Control Composite parent composite create Composite parent 1 set Control composite set F1 help if help Context Id null Workbench Help set Help composite help Context Id if allow No Tag Selection Listener listener new Selection Adapter public void widget Selected Selection Event e use Resource Tag use Resource Tag Button get Selection update Enablement use Resource Tag true use Resource Tag Button create Radio Button composite Policy bind Tag Selection Wizard Page 0 1 NON NLS 1 select Tag Button create Radio Button composite Policy bind Tag Selection Wizard Page 1 1 NON NLS 1 use Resource Tag Button set Selection use Resource Tag select Tag Button set Selection use Resource Tag use Resource Tag Button add Selection Listener listener select Tag Button add Selection Listener listener else if label null create Wrapping Label composite label 0 tag Tree create Tree composite tag Tree set Sorter new Project Element Sorter set Input Dialog apply Dialog Font parent  createControl createComposite setControl helpContextId WorkbenchHelp setHelp helpContextId allowNoTag SelectionListener SelectionAdapter widgetSelected SelectionEvent useResourceTag useResourceTagButton getSelection updateEnablement useResourceTag useResourceTagButton createRadioButton TagSelectionWizardPage selectTagButton createRadioButton TagSelectionWizardPage useResourceTagButton setSelection useResourceTag selectTagButton setSelection useResourceTag useResourceTagButton addSelectionListener selectTagButton addSelectionListener createWrappingLabel tagTree createTree tagTree setSorter ProjectElementSorter setInput applyDialogFont
public void run get Shell get Display sync Exec new Runnable public void run tag Tree refresh  getShell getDisplay syncExec tagTree
Runnable refresh new Runnable public void run get Shell get Display sync Exec new Runnable public void run tag Tree refresh  getShell getDisplay syncExec tagTree
private void set Input if remote Folders null remote Folders length 0 tag Tree null tag Tree get Control is Disposed tag Tree set Input new Project Element remote Folders 0 include Flags try selected Tag remote Folders 0 get Folder Sync Info get Tag catch CVS Exception e CVSUI Plugin log e if selected Tag null selected Tag CVS Tag DEFAULT TODO Hack to instantiate the model before revealing the selection tag Tree expand To Level 2 tag Tree collapse All Reveal the selection tag Tree reveal new Tag Element selected Tag tag Tree set Selection new Structured Selection new Tag Element selected Tag if buttons null buttons dispose buttons null Runnable refresh new Runnable public void run get Shell get Display sync Exec new Runnable public void run tag Tree refresh buttons Tag Configuration Dialog create Tag Definition Buttons get Shell composite remote Folders convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH refresh refresh composite layout  setInput remoteFolders remoteFolders tagTree tagTree getControl isDisposed tagTree setInput ProjectElement remoteFolders includeFlags selectedTag remoteFolders getFolderSyncInfo getTag CVSException CVSUIPlugin selectedTag selectedTag CVSTag tagTree expandToLevel tagTree collapseAll tagTree TagElement selectedTag tagTree setSelection StructuredSelection TagElement selectedTag getShell getDisplay syncExec tagTree TagConfigurationDialog createTagDefinitionButtons getShell remoteFolders convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH
result add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection if selection is Empty selection get First Element instanceof Tag Element selected Tag null else selected Tag Tag Element selection get First Element get Tag update Enablement  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection isEmpty getFirstElement TagElement selectedTag selectedTag TagElement getFirstElement getTag updateEnablement
result get Tree add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e I Structured Selection selection I Structured Selection tag Tree get Selection if selection is Empty selection get First Element instanceof Tag Element goto Next Page  getTree addMouseListener MouseAdapter mouseDoubleClick MouseEvent IStructuredSelection IStructuredSelection tagTree getSelection isEmpty getFirstElement TagElement gotoNextPage
private Tree Viewer create Tree Composite parent Tree tree new Tree parent SWT SINGLE SWT BORDER Grid Data grid Data new Grid Data Grid Data FILL BOTH tree set Layout Data grid Data grid Data height Hint 150 Tree Viewer result new Tree Viewer tree result set Content Provider new Workbench Content Provider result set Label Provider new Workbench Label Provider result add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection if selection is Empty selection get First Element instanceof Tag Element selected Tag null else selected Tag Tag Element selection get First Element get Tag update Enablement result get Tree add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e I Structured Selection selection I Structured Selection tag Tree get Selection if selection is Empty selection get First Element instanceof Tag Element goto Next Page result set Sorter new Repository Sorter return result  TreeViewer createTree GridData gridData GridData GridData FILL_BOTH setLayoutData gridData gridData heightHint TreeViewer TreeViewer setContentProvider WorkbenchContentProvider setLabelProvider WorkbenchLabelProvider addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection isEmpty getFirstElement TagElement selectedTag selectedTag TagElement getFirstElement getTag updateEnablement getTree addMouseListener MouseAdapter mouseDoubleClick MouseEvent IStructuredSelection IStructuredSelection tagTree getSelection isEmpty getFirstElement TagElement gotoNextPage setSorter RepositorySorter
private void update Enablement tag Tree get Control set Enabled use Resource Tag set Page Complete use Resource Tag selected Tag null  updateEnablement tagTree getControl setEnabled useResourceTag setPageComplete useResourceTag selectedTag
public ICVS Folder get Folder return remote Folders 0  ICVSFolder getFolder remoteFolders
public void set Folder ICVS Folder remote set Folders new ICVS Folder remote  setFolder ICVSFolder setFolders ICVSFolder
public CVS Tag get Selected Tag if use Resource Tag return null return selected Tag  CVSTag getSelectedTag useResourceTag selectedTag
protected void goto Next Page Tag Selection Wizard Page this get Container show Page get Next Page  gotoNextPage TagSelectionWizardPage getContainer showPage getNextPage
public void set Folders ICVS Folder remote Folders this remote Folders remote Folders set Input  setFolders ICVSFolder remoteFolders remoteFolders remoteFolders setInput
public void set Allow No Tag boolean b allow No Tag b  setAllowNoTag allowNoTag

public Update Wizard I Workbench Part part I Resource resources this part part this resources resources set Window Title Policy bind Update Wizard title NON NLS 1  UpdateWizard IWorkbenchPart IResource setWindowTitle UpdateWizard
public void add Pages Image Descriptor subst Image CVSUI Plugin get Plugin get Image Descriptor ICVSUI Constants IMG WIZBAN CHECKOUT tag Selection Page new Tag Selection Wizard Page tag Page Policy bind Update Wizard 0 subst Image Policy bind Update Wizard 1 null no laqbel Project Element INCLUDE ALL TAGS NON NLS 1 NON NLS 2 NON NLS 3 tag Selection Page set Allow No Tag true tag Selection Page set Folders getCVS Folders tag Selection Page set Help Contxt Id I Help Context Ids UPDATE TAG SELETION PAGE add Page tag Selection Page  addPages ImageDescriptor substImage CVSUIPlugin getPlugin getImageDescriptor ICVSUIConstants IMG_WIZBAN_CHECKOUT tagSelectionPage TagSelectionWizardPage tagPage UpdateWizard substImage UpdateWizard ProjectElement INCLUDE_ALL_TAGS tagSelectionPage setAllowNoTag tagSelectionPage setFolders getCVSFolders tagSelectionPage setHelpContxtId IHelpContextIds UPDATE_TAG_SELETION_PAGE addPage tagSelectionPage
private ICVS Folder getCVS Folders Set projects new Hash Set for int i 0 i resources length i I Resource resource resources i projects add resource get Project ICVS Folder folders new ICVS Folder projects size int i 0 for Iterator iter projects iterator iter has Next I Project project I Project iter next folders i CVS Workspace Root getCVS Folder For project return folders  ICVSFolder getCVSFolders HashSet IResource getProject ICVSFolder ICVSFolder hasNext IProject IProject CVSWorkspaceRoot getCVSFolderFor
public boolean perform Finish try new Update Operation part resources Command NO LOCAL OPTIONS tag Selection Page get Selected Tag run catch Invocation Target Exception e CVSUI Plugin open Error get Shell null null e return false catch Interrupted Exception e return false return true  performFinish UpdateOperation NO_LOCAL_OPTIONS tagSelectionPage getSelectedTag InvocationTargetException CVSUIPlugin openError getShell InterruptedException

Workbench User Authenticator constructor public Workbench User Authenticator super Initialize USE ALTERNATE PROMPTER I Ignore Info ignores Team get All Ignores boolean found false for int i 0 i ignores length i if ignores i get Pattern equals notes NON NLS 1 found true if found return I File Type Info types Team get All Types for int i 0 i types length i if types i get Extension equals notes NON NLS 1 USE ALTERNATE PROMPTER true return USE ALTERNATE PROMPTER false  WorkbenchUserAuthenticator WorkbenchUserAuthenticator USE_ALTERNATE_PROMPTER IIgnoreInfo getAllIgnores getPattern IFileTypeInfo getAllTypes getExtension USE_ALTERNATE_PROMPTER USE_ALTERNATE_PROMPTER
sync exec in default thread Display get Default sync Exec new Runnable public void run allow Caching 0 prompt For Password location userinfo get Username message userinfo is Username Mutable result  getDefault syncExec allowCaching promptForPassword getUsername isUsernameMutable
see I User Authenticator authenticate User public void prompt For User Info final ICVS Repository Location location final I User Info userinfo final String message throws CVS Exception if userinfo is Username Mutable USE ALTERNATE PROMPTER alternate Prompt For User Info userinfo return ask the user for a password final String result new String 2 Display display Display get Current final boolean allow Caching false if display null allow Caching 0 prompt For Password location userinfo get Username message userinfo is Username Mutable result else sync exec in default thread Display get Default sync Exec new Runnable public void run allow Caching 0 prompt For Password location userinfo get Username message userinfo is Username Mutable result if result 0 null throw new Operation Canceled Exception Policy bind Workbench User Authenticator cancelled NON NLS 1 if userinfo is Username Mutable userinfo set Username result 0 userinfo set Password result 1 if location null if userinfo is Username Mutable location set Username result 0 location set Password result 1 location set Allow Caching allow Caching 0  IUserAuthenticator authenticateUser promptForUserInfo ICVSRepositoryLocation IUserInfo CVSException isUsernameMutable USE_ALTERNATE_PROMPTER alternatePromptForUserInfo getCurrent allowCaching allowCaching promptForPassword getUsername isUsernameMutable getDefault syncExec allowCaching promptForPassword getUsername isUsernameMutable OperationCanceledException WorkbenchUserAuthenticator isUsernameMutable setUsername setPassword isUsernameMutable setUsername setPassword setAllowCaching allowCaching
Asks the user to enter a password Places the results in the supplied string result 0 must contain the username result 1 must contain the password If the user canceled both values must be zero param location the location to obtain the password for param username the username param message a message to display to the user param user Mutable whether the user can be changed in the dialog param result a String array of length two in which to put the result private boolean prompt For Password final ICVS Repository Location location final String username final String message final boolean user Mutable final String result Shell shell Utils find Shell if shell null return false String domain location null null location get Location User Validation Dialog dialog new User Validation Dialog shell domain username null username message NON NLS 1 dialog set Username Mutable user Mutable dialog open result 0 dialog get Username result 1 dialog get Password return dialog get Allow Caching  userMutable promptForPassword ICVSRepositoryLocation userMutable findShell getLocation UserValidationDialog UserValidationDialog setUsernameMutable userMutable getUsername getPassword getAllowCaching
sync exec in default thread Display get Default sync Exec new Runnable public void run result 0  promptForUserInteractive location destination name instruction prompt echo  getDefault syncExec _promptForUserInteractive
Asks the user to enter values param location the location to obtain the password for param destication the location param name the name param instruction the instruction param prompt the titles for textfields param echo should be used or not param result the entered values or null if user canceled public String prompt For Keyborad Interactive final ICVS Repository Location location final String destination final String name final String instruction final String prompt final boolean echo throws CVS Exception final String result new String 1 Display display Display get Current if display null result 0  promptForUserInteractive location destination name instruction prompt echo else sync exec in default thread Display get Default sync Exec new Runnable public void run result 0  promptForUserInteractive location destination name instruction prompt echo return result 0  promptForKeyboradInteractive ICVSRepositoryLocation CVSException getCurrent _promptForUserInteractive getDefault syncExec _promptForUserInteractive
private String  promptForUserInteractive final ICVS Repository Location location final String destination final String name final String instruction final String prompt final boolean echo Shell shell Utils find Shell if shell null return new String 0 String domain location null null location get Location Keyboard Interactive Dialog dialog new Keyboard Interactive Dialog shell domain destination name instruction prompt echo dialog open return dialog get Result  _promptForUserInteractive ICVSRepositoryLocation findShell getLocation KeyboardInteractiveDialog KeyboardInteractiveDialog getResult
Special alternate prompting Returns the password Username must be fixed private String alternate Prompt For Password final String username Shell shell Utils find Shell Alternate User Validation Dialog dialog new Alternate User Validation Dialog shell username null username NON NLS 1 dialog set Username username int result dialog open if result Dialog CANCEL return null return dialog get Password  alternatePromptForPassword findShell AlternateUserValidationDialog AlternateUserValidationDialog setUsername getPassword
sync exec in default thread Display get Default sync Exec new Runnable public void run result 0 alternate Prompt For Password userinfo get Username  getDefault syncExec alternatePromptForPassword getUsername
Special alternate prompting public void alternate Prompt For User Info final I User Info userinfo throws CVS Exception ask the user for a password final String result new String 1 Display display Display get Current if display null result 0 alternate Prompt For Password userinfo get Username else sync exec in default thread Display get Default sync Exec new Runnable public void run result 0 alternate Prompt For Password userinfo get Username if result 0 null throw new Operation Canceled Exception Policy bind Workbench User Authenticator The operation was canceled by the user 1 NON NLS 1 userinfo set Password result 0  alternatePromptForUserInfo IUserInfo CVSException getCurrent alternatePromptForPassword getUsername getDefault syncExec alternatePromptForPassword getUsername OperationCanceledException WorkbenchUserAuthenticator The_operation_was_canceled_by_the_user_1 setPassword
display sync Exec new Runnable public void run final Message Dialog dialog new Message Dialog new Shell display title null title image message prompt Type buttons 1 retval 0 dialog open  syncExec MessageDialog MessageDialog promptType
public int prompt ICVS Repository Location location final int prompt Type final String title final String message final int prompt Responses final int default Response final Display display CVSUI Plugin get Standard Display final int retval new int 1 final String buttons new String prompt Responses length for int i 0 i prompt Responses length i int prompt prompt Responses i switch prompt case I User Authenticator OK ID buttons i I Dialog Constants OK LABEL break case I User Authenticator CANCEL ID buttons i I Dialog Constants CANCEL LABEL break case I User Authenticator NO ID buttons i I Dialog Constants NO LABEL break case I User Authenticator YES ID buttons i I Dialog Constants YES LABEL break display sync Exec new Runnable public void run final Message Dialog dialog new Message Dialog new Shell display title null title image message prompt Type buttons 1 retval 0 dialog open return retval 0  ICVSRepositoryLocation promptType promptResponses defaultResponse CVSUIPlugin getStandardDisplay promptResponses promptResponses promptResponses IUserAuthenticator OK_ID IDialogConstants OK_LABEL IUserAuthenticator CANCEL_ID IDialogConstants CANCEL_LABEL IUserAuthenticator NO_ID IDialogConstants NO_LABEL IUserAuthenticator YES_ID IDialogConstants YES_LABEL syncExec MessageDialog MessageDialog promptType

private I Property Change Listener working Set Change Listener new I Property Change Listener public void property Change Property Change Event event String property event get Property Object new Value event get New Value if I Working Set Manager CHANGE WORKING SET NAME CHANGE equals property new Value instanceof I Working Set String new Name I Working Set new Value get Name int count mru List get Item Count for int i 0 i count i String item mru List get Item i I Working Set working Set I Working Set mru List get Data item if working Set new Value boolean is Top Item mru List get Data mru List get Text working Set mru List remove i mru List add new Name i mru List set Data new Name working Set if is Top Item mru List set Text new Name break  IPropertyChangeListener workingSetChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty newValue getNewValue IWorkingSetManager CHANGE_WORKING_SET_NAME_CHANGE newValue IWorkingSet newName IWorkingSet newValue getName mruList getItemCount mruList getItem IWorkingSet workingSet IWorkingSet mruList getData workingSet newValue isTopItem mruList getData mruList getText workingSet mruList mruList newName mruList setData newName workingSet isTopItem mruList setText newName
public Working Set Selection Area Dialog parent Dialog super parent Dialog null  WorkingSetSelectionArea parentDialog parentDialog
public Working Set Selection Area Dialog parent Dialog String no Working Set Text String working Set Text I Dialog Settings settings super parent Dialog settings this no Working Set Text no Working Set Text this working Set Text working Set Text  WorkingSetSelectionArea parentDialog noWorkingSetText workingSetText IDialogSettings parentDialog noWorkingSetText noWorkingSetText workingSetText workingSetText
working Set Button create Radio Button composite working Set Text 2 working Set Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Working Set Button Selection  workingSetButton createRadioButton workingSetText workingSetButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleWorkingSetButtonSelection
select Button create Button composite Policy bind Working Set Selection Area working Set Other Grid Data HORIZONTAL ALIGN FILL NON NLS 1 select Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Working Set Selection  selectButton createButton WorkingSetSelectionArea workingSetOther GridData HORIZONTAL_ALIGN_FILL selectButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleWorkingSetSelection
mru List add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Mru Selection  mruList addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleMruSelection
Overrides method in Dialog see org eclipse jface dialogs Dialog create Dialog Area Composite public void create Area Composite parent Dialog apply Dialog Font parent Composite composite create Composite parent 2 initialize Dialog Units composite Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER composite set Layout Data data Grid Layout layout new Grid Layout layout margin Width 0 layout num Columns 2 composite set Layout layout Create the checkbox to enable disable working set use no Working Set Button create Radio Button composite no Working Set Text 2 working Set Button create Radio Button composite working Set Text 2 working Set Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Working Set Button Selection boolean use Working Set false if settings null use Working Set settings get Boolean USE WORKING SET no Working Set Button set Selection use Working Set working Set Button set Selection use Working Set Create the combo button which allows working set selection mru List new Combo composite SWT DROP DOWN SWT READ ONLY data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER data horizontal Indent 15 mru List set Layout Data data select Button create Button composite Policy bind Working Set Selection Area working Set Other Grid Data HORIZONTAL ALIGN FILL NON NLS 1 select Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Working Set Selection initialize Mru initialize Working Set mru List add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Mru Selection  createDialogArea createArea applyDialogFont createComposite initializeDialogUnits GridData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER setLayoutData GridLayout GridLayout marginWidth numColumns setLayout noWorkingSetButton createRadioButton noWorkingSetText workingSetButton createRadioButton workingSetText workingSetButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleWorkingSetButtonSelection useWorkingSet useWorkingSet getBoolean USE_WORKING_SET noWorkingSetButton setSelection useWorkingSet workingSetButton setSelection useWorkingSet mruList DROP_DOWN READ_ONLY GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER horizontalIndent mruList setLayoutData selectButton createButton WorkingSetSelectionArea workingSetOther GridData HORIZONTAL_ALIGN_FILL selectButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleWorkingSetSelection initializeMru initializeWorkingSet mruList addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleMruSelection
Method handle Mru Selection private void handle Mru Selection String selected Working Set mru List get Text old Working Set working Set working Set I Working Set mru List get Data selected Working Set if settings null settings put SELECTED WORKING SET selected Working Set handle Working Set Change  handleMruSelection handleMruSelection selectedWorkingSet mruList getText oldWorkingSet workingSet workingSet IWorkingSet mruList getData selectedWorkingSet SELECTED_WORKING_SET selectedWorkingSet handleWorkingSetChange
Opens the working set selection dialog if the Other item is selected in the most recently used working set list private void handle Working Set Selection I Working Set Selection Dialog dialog PlatformUI get Workbench get Working Set Manager create Working Set Selection Dialog get Shell false I Working Set Manager working Set Manager PlatformUI get Workbench get Working Set Manager I Working Set working Set working Set Manager get Working Set mru List get Text if working Set null dialog set Selection new I Working Set working Set add a change listener to detect a working set name change working Set Manager add Property Change Listener working Set Change Listener if dialog open Window OK I Working Set result dialog get Selection if result null result length 0 working Set result 0 String working Set Name working Set get Name if mru List index Of working Set Name 1 mru List remove working Set Name mru List add working Set Name 0 mru List set Text working Set Name mru List set Data working Set Name working Set handle Mru Selection else working Set null remove deleted working sets from the mru list box String mru Names mru List get Items for int i 0 i mru Names length i if working Set Manager get Working Set mru Names i null mru List remove mru Names i working Set Manager remove Property Change Listener working Set Change Listener  handleWorkingSetSelection IWorkingSetSelectionDialog getWorkbench getWorkingSetManager createWorkingSetSelectionDialog getShell IWorkingSetManager workingSetManager getWorkbench getWorkingSetManager IWorkingSet workingSet workingSetManager getWorkingSet mruList getText workingSet setSelection IWorkingSet workingSet workingSetManager addPropertyChangeListener workingSetChangeListener IWorkingSet getSelection workingSet workingSetName workingSet getName mruList indexOf workingSetName mruList workingSetName mruList workingSetName mruList setText workingSetName mruList setData workingSetName workingSet handleMruSelection workingSet mruNames mruList getItems mruNames workingSetManager getWorkingSet mruNames mruList mruNames workingSetManager removePropertyChangeListener workingSetChangeListener
Sets the enabled state of the most recently used working set list based on the checked state of the working set check box private void handle Working Set Button Selection boolean use Working Set working Set Button get Selection if settings null settings put USE WORKING SET use Working Set mru List set Enabled use Working Set select Button set Enabled use Working Set if use Working Set mru List get Selection Index 0 handle Mru Selection else if use Working Set handle Deselection  handleWorkingSetButtonSelection useWorkingSet workingSetButton getSelection USE_WORKING_SET useWorkingSet mruList setEnabled useWorkingSet selectButton setEnabled useWorkingSet useWorkingSet mruList getSelectionIndex handleMruSelection useWorkingSet handleDeselection
private void handle Deselection old Working Set working Set working Set null handle Working Set Change  handleDeselection oldWorkingSet workingSet workingSet handleWorkingSetChange
private void handle Working Set Change fire Property Change Change SELECTED WORKING SET old Working Set working Set  handleWorkingSetChange firePropertyChangeChange SELECTED_WORKING_SET oldWorkingSet workingSet
Populates the most recently used working set list with MRU items from the working set manager as well as adds an item to enable selection of a working set not in the MRU list private void initialize Mru I Working Set working Sets PlatformUI get Workbench get Working Set Manager get Recent Working Sets for int i 0 i working Sets length i String working Set Name working Sets i get Name mru List add working Set Name mru List set Data working Set Name working Sets i if working Sets length 0 mru List set Text working Sets 0 get Name  initializeMru IWorkingSet workingSets getWorkbench getWorkingSetManager getRecentWorkingSets workingSets workingSetName workingSets getName mruList workingSetName mruList setData workingSetName workingSets workingSets mruList setText workingSets getName
Initializes the state of the working set part of the dialog private void initialize Working Set if working Set null settings null settings get Boolean USE WORKING SET I Working Set mru Set PlatformUI get Workbench get Working Set Manager get Working Set settings get SELECTED WORKING SET if mru Set null the call to set Working Set will re invoke the initialize Working Set method set Working Set mru Set return working Set Button set Selection working Set null handle Working Set Button Selection if working Set null mru List index Of working Set get Name 1 mru List set Text working Set get Name handle Working Set Change  initializeWorkingSet workingSet getBoolean USE_WORKING_SET IWorkingSet mruSet getWorkbench getWorkingSetManager getWorkingSet SELECTED_WORKING_SET mruSet setWorkingSet initializeWorkingSet setWorkingSet mruSet workingSetButton setSelection workingSet handleWorkingSetButtonSelection workingSet mruList indexOf workingSet getName mruList setText workingSet getName handleWorkingSetChange
Returns the selected working set or null if none is selected return the selected working set or null if none is selected public I Working Set get Working Set return working Set  IWorkingSet getWorkingSet workingSet
Indicate that the selected working set is actually being used so it can be added to the most recently used list public void use Selected Working Set Add the selected working set to the MRU list before returning it if working Set null PlatformUI get Workbench get Working Set Manager add Recent Working Set working Set  useSelectedWorkingSet workingSet getWorkbench getWorkingSetManager addRecentWorkingSet workingSet
Sets the working set that should be selected in the most recently used working set list param working Set the working set that should be selected has to exist in the list returned by org eclipse ui I Working Set Manager get Recent Working Sets Must not be null public void set Working Set I Working Set working Set old Working Set this working Set this working Set working Set if working Set Button null mru List null initialize Working Set  workingSet IWorkingSetManager getRecentWorkingSets setWorkingSet IWorkingSet workingSet oldWorkingSet workingSet workingSet workingSet workingSetButton mruList initializeWorkingSet

public Work In Progress Preference Page super GRID set Title Policy bind Work In Progress Preference Page 0 NON NLS 1 set Description Policy bind Work In Progress Preference Page 1 NON NLS 1 set Preference Store CVSUI Plugin get Plugin get Preference Store  WorkInProgressPreferencePage setTitle WorkInProgressPreferencePage setDescription WorkInProgressPreferencePage setPreferenceStore CVSUIPlugin getPlugin getPreferenceStore
see org eclipse jface dialogs I Dialog Page create Control org eclipse swt widgets Composite public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Debug Help Context Ids CONSOLE PREFERENCE PAGE  IDialogPage createControl createControl createControl WorkbenchHelp setHelp getControl IDebugHelpContextIds CONSOLE_PREFERENCE_PAGE
see org eclipse jface preference Field Editor Preference Page create Field Editors public void create Field Editors  FieldEditorPreferencePage createFieldEditors createFieldEditors
see org eclipse ui I Workbench Preference Page init org eclipse ui I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench

public XML Writer Output Stream output throws Unsupported Encoding Exception super new Output Stream Writer output UTF8 NON NLS 1 tab 0 println XML VERSION  XMLWriter OutputStream UnsupportedEncodingException OutputStreamWriter XML_VERSION
println XML VERSION public void end Tag String name tab print Tag name null  XML_VERSION endTag printTag
public void print Simple Tag String name Object value if value null print Tag name null true false print get Escaped String value Of value print Tag name null false true  printSimpleTag printTag getEscaped valueOf printTag
public void print Tabulation for int i 0 i tab i super print t  printTabulation
super print t private void print Tag String name Hash Map parameters print Tag name parameters true true  printTag HashMap printTag
print Tag name parameters true true private void print Tag String name Hash Map parameters boolean tab boolean new Line print Tag name parameters tab new Line false  printTag printTag HashMap newLine printTag newLine
private void print Tag String name Hash Map parameters boolean tab boolean new Line boolean end String Buffer sb new String Buffer sb append NON NLS 1 sb append name if parameters null for Enumeration enum Collections enumeration parameters key Set enum has More Elements sb append NON NLS 1 String key String enum next Element sb append key sb append NON NLS 1 sb append get Escaped String value Of parameters get key sb append NON NLS 1 if end sb append sb append NON NLS 1 if tab print Tabulation if new Line println sb to String else print sb to String  printTag HashMap newLine StringBuffer StringBuffer keySet hasMoreElements nextElement getEscaped valueOf printTabulation newLine toString toString
print sb to String public void start Tag String name Hash Map parameters start Tag name parameters true  toString startTag HashMap startTag
start Tag name parameters true public void start Tag String name Hash Map parameters boolean new Line print Tag name parameters true new Line tab  startTag startTag HashMap newLine printTag newLine
tab public void start And End Tag String name Hash Map parameters boolean new Line print Tag name parameters true true true  startAndEndTag HashMap newLine printTag
private static void append Escaped Char String Buffer buffer char c String replacement get Replacement c if replacement null buffer append buffer append replacement buffer append else buffer append c  appendEscapedChar StringBuffer getReplacement
public static String get Escaped String s String Buffer result new String Buffer s length 10 for int i 0 i s length i append Escaped Char result s char At i return result to String  getEscaped StringBuffer StringBuffer appendEscapedChar charAt toString
private static String get Replacement char c Encode special XML characters into the equivalent character references These five are defined by default for all XML documents switch c case return lt NON NLS 1 case return gt NON NLS 1 case return quot NON NLS 1 case return apos NON NLS 1 case return amp NON NLS 1 return null  getReplacement

public final class Assert public static class Assertion Failed Exception extends Runtime Exception public Assertion Failed Exception  AssertionFailedException RuntimeException AssertionFailedException
public Assertion Failed Exception public Assertion Failed Exception String detail super Policy bind Assert assertion Failed detail NON NLS 1  AssertionFailedException AssertionFailedException assertionFailed
This class is not intended to be instantiated private Assert 
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression return is Legal expression NON NLS 1  IllegalArgumentException IllegalArgumentException isLegal isLegal
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression String message if expression throw new Illegal Argument Exception message return expression  IllegalArgumentException IllegalArgumentException isLegal IllegalArgumentException
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown param object the value to test exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object if object null throw new Assertion Failed Exception null argument NON NLS 1  IllegalArgumentException isNotNull AssertionFailedException
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param object the value to test param message the message to include in the exception exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object String message if object null throw new Assertion Failed Exception null argument non NLS message NON NLS 1  IllegalArgumentException isNotNull AssertionFailedException
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails public static boolean is True boolean expression return is True expression nonNLS NON NLS 1  isTrue isTrue
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails public static boolean is True boolean expression String message if expression throw new Assertion Failed Exception assert failed non NLS message NON NLS 1 return expression  isTrue AssertionFailedException
Indicates that the caller has not implemented the method Usually this is a temporary condition public static void not Yet Implemented  notYetImplemented

int depth public Event I Resource resource int type int depth this resource resource this type type this depth depth  IResource
this depth depth public int get Depth return depth  getDepth
return depth public I Resource get Resource return resource  IResource getResource
return resource public int get Type return type  getType
public String to String String Buffer buffer new String Buffer buffer append resource NON NLS 1 buffer append resource get Full Path buffer append type NON NLS 1 buffer append get Type String buffer append depth NON NLS 1 buffer append get Depth String return buffer to String  toString StringBuffer StringBuffer getFullPath getTypeString getDepthString toString
protected String get Depth String switch depth case I Resource DEPTH ZERO return DEPTH ZERO NON NLS 1 case I Resource DEPTH ONE return DEPTH ONE NON NLS 1 case I Resource DEPTH INFINITE return DEPTH INFINITE NON NLS 1 default return INVALID NON NLS 1  getDepthString IResource DEPTH_ZERO DEPTH_ZERO IResource DEPTH_ONE DEPTH_ONE IResource DEPTH_INFINITE DEPTH_INFINITE
protected String get Type String return String value Of type  getTypeString valueOf
protected Background Event Handler String job Name String error Title this job Name job Name errors new Exception Collector error Title Team Plugin ID I Status ERROR null don t log create Event Handling Job schedule  BackgroundEventHandler jobName errorTitle jobName jobName ExceptionCollector errorTitle TeamPlugin IStatus createEventHandlingJob
protected void create Event Handling Job event Handler Job new Job get Name public I Status run I Progress Monitor monitor return process Events monitor  createEventHandlingJob eventHandlerJob getName IStatus IProgressMonitor processEvents
return process Events monitor public boolean should Run return is Queue Empty  processEvents shouldRun isQueueEmpty
return is Queue Empty public boolean should Schedule return is Queue Empty  isQueueEmpty shouldSchedule isQueueEmpty
event Handler Job add Job Change Listener new Job Change Adapter public void done I Job Change Event event job Done event  eventHandlerJob addJobChangeListener JobChangeAdapter IJobChangeEvent jobDone
Create the job used for processing the events in the queue The job stops working when the queue is empty protected void create Event Handling Job event Handler Job new Job get Name public I Status run I Progress Monitor monitor return process Events monitor public boolean should Run return is Queue Empty public boolean should Schedule return is Queue Empty event Handler Job add Job Change Listener new Job Change Adapter public void done I Job Change Event event job Done event event Handler Job set System true event Handler Job set Priority Job SHORT  createEventHandlingJob eventHandlerJob getName IStatus IProgressMonitor processEvents shouldRun isQueueEmpty shouldSchedule isQueueEmpty eventHandlerJob addJobChangeListener JobChangeAdapter IJobChangeEvent jobDone eventHandlerJob setSystem eventHandlerJob setPriority
This method is invoked when the processing job completes The default behavior of the handler is to restart the job if the queue is no longer empty and to clear the queue if the handler was shut down protected void job Done I Job Change Event event if is Shutdown The handler has been shutdown Clean up the queue synchronized this awaiting Processing clear else if is Queue Empty An event squeaked in as the job was finishing Reschedule the job schedule  jobDone IJobChangeEvent isShutdown awaitingProcessing isQueueEmpty
Schedule the job to process the events now protected void schedule event Handler Job schedule  eventHandlerJob
Shutdown the event handler Any events on the queue will be removed from the queue and will not be processed public void shutdown shutdown true event Handler Job cancel  eventHandlerJob
Returns whether the handle has been shutdown return Returns whether the handle has been shutdown public boolean is Shutdown return shutdown  isShutdown
Queue the event and start the job if it s not already doing work If the job is already running then notify in case it was waiting param event the event to be queued protected synchronized void queue Event Event event boolean front if Policy DEBUG BACKGROUND EVENTS System out println Event queued on get Name event to String NON NLS 1 NON NLS 2 if front awaiting Processing add 0 event else awaiting Processing add event if is Shutdown event Handler Job null if event Handler Job get State Job NONE schedule else notify  queueEvent DEBUG_BACKGROUND_EVENTS getName toString awaitingProcessing awaitingProcessing isShutdown eventHandlerJob eventHandlerJob getState
Return the name that is to be associated with the background job return the job name protected String get Name return job Name  getName jobName
protected synchronized Event next Element if is Shutdown is Queue Empty return null return Event awaiting Processing remove 0  nextElement isShutdown isQueueEmpty awaitingProcessing
protected synchronized Event peek if is Shutdown is Queue Empty return null return Event awaiting Processing get 0  isShutdown isQueueEmpty awaitingProcessing
Return whether there are unprocessed events on the event queue return whether there are unprocessed events on the queue protected synchronized boolean is Queue Empty return awaiting Processing is Empty  isQueueEmpty awaitingProcessing isEmpty
Process events from the events queue and dispatch results This method does not directly check for or handle cancelation of the provided monitor However it does invoke code process Event Event code which may check for and handle cancelation by shuting down the receiver p The code is Ready For Dispatch code method is used in conjuntion with the code dispatch Events I Progress Monitor code to allow the output of the event handler to be batched in order to avoid fine grained UI updating param monitor a progress monitor protected I Status process Events I Progress Monitor monitor errors clear try It s hard to know how much work is going to happen since the queue can grow Use the current queue size as a hint to an infinite progress monitor monitor begin Task null I Progress Monitor UNKNOWN I Progress Monitor sub Monitor Policy infinite Sub Monitor For monitor 90 sub Monitor begin Task null 1024 Event event time Of Last Dispatch System current Time Millis dispatch Count 1 while event next Element null is Shutdown try process Event event sub Monitor if Policy DEBUG BACKGROUND EVENTS System out println Event processed on get Name event to String NON NLS 1 NON NLS 2 if is Ready For Dispatch true wait if queue is empty dispatch Events Policy sub Monitor For sub Monitor 1 catch Core Exception e handle exception but keep going handle Exception e finally monitor done return errors get Status  processEvent isReadyForDispatch dispatchEvents IProgressMonitor IStatus processEvents IProgressMonitor beginTask IProgressMonitor IProgressMonitor subMonitor infiniteSubMonitorFor subMonitor beginTask timeOfLastDispatch currentTimeMillis dispatchCount nextElement isShutdown processEvent subMonitor DEBUG_BACKGROUND_EVENTS getName toString isReadyForDispatch dispatchEvents subMonitorFor subMonitor CoreException handleException getStatus
Dispatch any accumulated events by invoking code do Dispatch Events code and then rest the dispatch counters param monitor a progress monitor throws Team Exception protected final void dispatch Events I Progress Monitor monitor throws Team Exception if do Dispatch Events monitor something was dispatched so adjust dispatch count dispatch Count time Of Last Dispatch System current Time Millis  doDispatchEvents TeamException dispatchEvents IProgressMonitor TeamException doDispatchEvents dispatchCount timeOfLastDispatch currentTimeMillis
Notify clients of processed events param monitor a progress monitor 
Returns code true code if processed events should be dispatched and code false code otherwise Events are dispatched at regular intervals to avoid fine grain events causing the UI to be too jumpy Also if the events queue is empty we will wait a small amount of time to allow pending events to be queued The queue Event notifies when events are queued return code true code if processed events should be dispatched and code false code otherwise protected boolean is Ready For Dispatch boolean wait long duration System current Time Millis time Of Last Dispatch if dispatch Count DISPATCH THRESHOLD duration DISPATCH DELAY duration LONG DISPATCH DELAY return true synchronized this if is Queue Empty wait return false try wait WAIT DELAY catch Interrupted Exception e just continue return is Queue Empty  queueEvent isReadyForDispatch currentTimeMillis timeOfLastDispatch dispatchCount DISPATCH_THRESHOLD DISPATCH_DELAY LONG_DISPATCH_DELAY isQueueEmpty WAIT_DELAY InterruptedException isQueueEmpty
Handle the exception by recording it in the errors list param e protected void handle Exception Core Exception e errors handle Exception e  handleException CoreException handleException
Process the event in the context of a running background job Subclasses may but are not required to check the provided monitor for cancelation and shut down the receiver by invoking the code shutdown code method p In many cases a background event handler will translate incoming events into outgoing events If this is the case the handler should accumulate these events in the code proceess Event code method and propogate them from the code dispatch Event code method which is invoked periodically in order to batch outgoing events and avoid the UI becoming too jumpy param event the code Event code to be processed param monitor a progress monitor  proceessEvent dispatchEvent
Return the job from which the code processed Event code method is invoked return Returns the background event handlig job public Job get Event Handler Job return event Handler Job  processedEvent getEventHandlerJob eventHandlerJob

private I Status get Default Status I File file return file is Read Only new Status I Status ERROR Team Plugin ID I Resource Status READ ONLY LOCAL Policy bind File Modification Validator file Is Read Only file get Full Path to String null NON NLS 1 OK  IStatus getDefaultStatus IFile isReadOnly IStatus TeamPlugin IResourceStatus READ_ONLY_LOCAL FileModificationValidator fileIsReadOnly getFullPath toString
see I File Modification Validator validate Edit I File Object public I Status validate Edit I File files Object context if files length 1 return get Default Status files 0 I Status stati new Status files length boolean allOK true for int i 0 i files length i stati i get Default Status files i if stati i isOK allOK false return new Multi Status Team Plugin ID 0 stati Policy bind allOK File Modification Validator ok NON NLS 1 File Modification Validator some Read Only NON NLS 1 null  IFileModificationValidator validateEdit IFile IStatus validateEdit IFile getDefaultStatus IStatus getDefaultStatus MultiStatus TeamPlugin FileModificationValidator FileModificationValidator someReadOnly
see I File Modification Validator validate Save I File public I Status validate Save I File file return get Default Status file  IFileModificationValidator validateSave IFile IStatus validateSave IFile getDefaultStatus

see I Move Delete Hook delete File I Resource Tree I File int I Progress Monitor public boolean delete File I Resource Tree tree I File file int update Flags I Progress Monitor monitor return false  IMoveDeleteHook deleteFile IResourceTree IFile IProgressMonitor deleteFile IResourceTree IFile updateFlags IProgressMonitor
see I Move Delete Hook delete Folder I Resource Tree I Folder int I Progress Monitor public boolean delete Folder I Resource Tree tree I Folder folder int update Flags I Progress Monitor monitor return false  IMoveDeleteHook deleteFolder IResourceTree IFolder IProgressMonitor deleteFolder IResourceTree IFolder updateFlags IProgressMonitor
see I Move Delete Hook delete Project I Resource Tree I Project int I Progress Monitor public boolean delete Project I Resource Tree tree I Project project int update Flags I Progress Monitor monitor return false  IMoveDeleteHook deleteProject IResourceTree IProject IProgressMonitor deleteProject IResourceTree IProject updateFlags IProgressMonitor
see I Move Delete Hook move File I Resource Tree I File I File int I Progress Monitor public boolean move File I Resource Tree tree I File source I File destination int update Flags I Progress Monitor monitor return false  IMoveDeleteHook moveFile IResourceTree IFile IFile IProgressMonitor moveFile IResourceTree IFile IFile updateFlags IProgressMonitor
see I Move Delete Hook move Folder I Resource Tree I Folder I Folder int I Progress Monitor public boolean move Folder I Resource Tree tree I Folder source I Folder destination int update Flags I Progress Monitor monitor return false  IMoveDeleteHook moveFolder IResourceTree IFolder IFolder IProgressMonitor moveFolder IResourceTree IFolder IFolder updateFlags IProgressMonitor
see I Move Delete Hook move Project I Resource Tree I Project I Project Description int I Progress Monitor public boolean move Project I Resource Tree tree I Project source I Project Description description int update Flags I Progress Monitor monitor return false  IMoveDeleteHook moveProject IResourceTree IProject IProjectDescription IProgressMonitor moveProject IResourceTree IProject IProjectDescription updateFlags IProgressMonitor

Creates a collector and initializes the parameters for the top level exception that would be returned from code get Status code is exceptions are collected param message a human readable message localized to the current locale param plugin Id the unique identifier of the relevant plug in param severity the severity one of code OK code code ERROR code code INFO code or code WARNING code param code the plug in specific status code or code OK code param log the log to output the exceptions to or code null code if exceptions should not be logged public Exception Collector String message String plugin Id int severity I Log log this message message this plugin Id plugin Id this severity severity this log log  getStatus pluginId ExceptionCollector pluginId ILog pluginId pluginId
Clears the exceptions collected public void clear statuses clear exception Bucket clear  exceptionBucket
Returns a status that represents the exceptions collected If the collector is empty code I Status OK code is returned Otherwise a Multi Status containing all collected exceptions is returned return a multistatus containing the exceptions collected or I Status OK if the collector is empty public I Status get Status if statuses is Empty return Status OK STATUS else Multi Status multi Status new Multi Status plugin Id severity message null Iterator it statuses iterator while it has Next I Status status I Status it next multi Status merge status return multi Status  IStatus MultiStatus IStatus IStatus getStatus isEmpty OK_STATUS MultiStatus multiStatus MultiStatus pluginId hasNext IStatus IStatus multiStatus multiStatus
Returns whether duplicate exceptions are being ignored return code true code if this collector is ignoring duplicate exceptions and code false code otherwise public boolean is Ignore Duplicates return ignore Duplicates  isIgnoreDuplicates ignoreDuplicates
Sets whether duplicate exceptions are being ignored param ignore Duplicates code true code if this collector should ignore duplicate exceptions and code false code otherwise public void set Ignore Duplicates boolean ignore Duplicates this ignore Duplicates ignore Duplicates  ignoreDuplicates setIgnoreDuplicates ignoreDuplicates ignoreDuplicates ignoreDuplicates
Add this exception to the collector If a log was specified in the constructor then the exception will be output to the log You can retreive exceptions using code get Status code param exception the exception to collect public void handle Exception Exception e I Status status null if e instanceof Core Exception status Core Exception e get Status if status null log Status status I Status children status get Children for int i 0 i children length i I Status status2 children i log Status status2  getStatus handleException IStatus CoreException CoreException getStatus logStatus IStatus getChildren IStatus logStatus
Log and accumulate exceptions once for each plugid code combination private void log Status I Status status String plugin Id status get Plugin List codes List exception Bucket get plugin Id Integer code new Integer status get Code if codes null if codes contains code is Ignore Duplicates return collect the status statuses add status update counts for this exception codes new Array List 1 codes add code exception Bucket put plugin Id codes log if necessary if log null log log new Status status get Severity plugin Id status get Code message status get Exception  logStatus IStatus pluginId getPlugin exceptionBucket pluginId getCode isIgnoreDuplicates ArrayList exceptionBucket pluginId getSeverity pluginId getCode getException

public I Status validate Edit I File files Object context Array List return Stati new Array List map provider to the files under that provider s control Map providers To Files new Hash Map files length for each file determine which provider map providers to files for int i 0 i files length i I File file files i Repository Provider provider Repository Provider get Provider file get Project if providers To Files contains Key provider providers To Files put provider new Array List Array List providers To Files get provider add file Iterator providers Iterator providers To Files key Set iterator boolean allOK true for each provider validate its files while providers Iterator has Next Repository Provider provider Repository Provider providers Iterator next Array List files List Array List providers To Files get provider I File files Array I File files List to Array new I File files List size I File Modification Validator validator DEFAULT VALIDATOR if no provider or no validator use the default validator if provider null I File Modification Validator v provider get File Modification Validator if v null validator v I Status status validator validate Edit files Array context if status isOK allOK false return Stati add status if return Stati size 1 return I Status return Stati get 0 return new Multi Status Team Plugin ID 0 I Status return Stati to Array new I Status return Stati size Policy bind allOK File Modification Validator ok NON NLS 1 File Modification Validator edit Failed NON NLS 1 null NON NLS 1  IStatus validateEdit IFile ArrayList returnStati ArrayList providersToFiles HashMap IFile RepositoryProvider RepositoryProvider getProvider getProject providersToFiles containsKey providersToFiles ArrayList ArrayList providersToFiles providersIterator providersToFiles keySet providersIterator hasNext RepositoryProvider RepositoryProvider providersIterator ArrayList filesList ArrayList providersToFiles IFile filesArray IFile filesList toArray IFile filesList IFileModificationValidator DEFAULT_VALIDATOR IFileModificationValidator getFileModificationValidator IStatus validateEdit filesArray returnStati returnStati IStatus returnStati MultiStatus TeamPlugin IStatus returnStati toArray IStatus returnStati FileModificationValidator FileModificationValidator editFailed
public I Status validate Save I File file Repository Provider provider Repository Provider get Provider file get Project I File Modification Validator validator DEFAULT VALIDATOR if no provider or no validator use the default validator if provider null I File Modification Validator v provider get File Modification Validator if v null validator v return validator validate Save file  IStatus validateSave IFile RepositoryProvider RepositoryProvider getProvider getProject IFileModificationValidator DEFAULT_VALIDATOR IFileModificationValidator getFileModificationValidator validateSave

public interface I Job Listener public void started Qualified Name job Type  IJobListener QualifiedName jobType
public interface I Job Listener public void started Qualified Name job Type public void finished Qualified Name job Type  IJobListener QualifiedName jobType QualifiedName jobType

Constructor for Infinite Sub Progress Monitor param monitor param ticks public Infinite Sub Progress Monitor I Progress Monitor monitor int ticks this monitor ticks 0  InfiniteSubProgressMonitor InfiniteSubProgressMonitor IProgressMonitor
Constructor for Infinite Sub Progress Monitor param monitor param ticks param style public Infinite Sub Progress Monitor I Progress Monitor monitor int ticks int style super monitor ticks style  InfiniteSubProgressMonitor InfiniteSubProgressMonitor IProgressMonitor
public void begin Task String name int total Work super begin Task name total Work this total Work total Work this half Way total Work 2 this current Increment 1 this next Progress current Increment this worked 0  beginTask totalWork beginTask totalWork totalWork totalWork halfWay totalWork currentIncrement nextProgress currentIncrement
public void worked int work if worked total Work return if next Progress 0 super worked 1 worked if worked half Way we have passed the current halfway point so double the increment and reset the halfway point current Increment 2 half Way total Work half Way 2 reset the progress counter to another full increment next Progress current Increment  totalWork nextProgress halfWay currentIncrement halfWay totalWork halfWay nextProgress currentIncrement
Don t allow clearing of the subtask This will stop the flickering of the subtask in the progress dialogs see I Progress Monitor sub Task String public void sub Task String name if name null name equals NON NLS 1 super sub Task name  IProgressMonitor subTask subTask subTask

private I Move Delete Hook get Hook For I Resource resource I Project project resource get Project Repository Provider provider Repository Provider get Provider project if provider null return DEFAULT HOOK I Move Delete Hook hook provider get Move Delete Hook if hook null return DEFAULT HOOK return hook  IMoveDeleteHook getHookFor IResource IProject getProject RepositoryProvider RepositoryProvider getProvider DEFAULT_HOOK IMoveDeleteHook getMoveDeleteHook DEFAULT_HOOK
public boolean delete File I Resource Tree tree I File file int update Flags I Progress Monitor monitor return get Hook For file delete File tree file update Flags monitor  deleteFile IResourceTree IFile updateFlags IProgressMonitor getHookFor deleteFile updateFlags
public boolean delete Folder I Resource Tree tree I Folder folder int update Flags I Progress Monitor monitor return get Hook For folder delete Folder tree folder update Flags monitor  deleteFolder IResourceTree IFolder updateFlags IProgressMonitor getHookFor deleteFolder updateFlags
public boolean delete Project I Resource Tree tree I Project project int update Flags I Progress Monitor monitor return get Hook For project delete Project tree project update Flags monitor  deleteProject IResourceTree IProject updateFlags IProgressMonitor getHookFor deleteProject updateFlags
public boolean move File I Resource Tree tree I File source I File destination int update Flags I Progress Monitor monitor return get Hook For source move File tree source destination update Flags monitor  moveFile IResourceTree IFile IFile updateFlags IProgressMonitor getHookFor moveFile updateFlags
public boolean move Folder I Resource Tree tree I Folder source I Folder destination int update Flags I Progress Monitor monitor return get Hook For source move Folder tree source destination update Flags monitor  moveFolder IResourceTree IFolder IFolder updateFlags IProgressMonitor getHookFor moveFolder updateFlags
public boolean move Project I Resource Tree tree I Project source I Project Description description int update Flags I Progress Monitor monitor return get Hook For source move Project tree source description update Flags monitor  moveProject IResourceTree IProject IProjectDescription updateFlags IProgressMonitor getHookFor moveProject updateFlags

public class Null Sub Progress Monitor extends Sub Progress Monitor Constructor for Infinite Sub Progress Monitor param monitor param ticks public Null Sub Progress Monitor I Progress Monitor monitor super monitor 0 0  NullSubProgressMonitor SubProgressMonitor InfiniteSubProgressMonitor NullSubProgressMonitor IProgressMonitor
see I Progress Monitor begin Task String int public void begin Task String name int total Work  IProgressMonitor beginTask beginTask totalWork
see I Progress Monitor done public void done  IProgressMonitor
see I Progress Monitor internal Worked double public void internal Worked double work  IProgressMonitor internalWorked internalWorked
see I Progress Monitor sub Task String public void sub Task String name  IProgressMonitor subTask subTask
see I Progress Monitor worked int public void worked int work  IProgressMonitor

see org eclipse core resources I Resource Rule Factory copy Rule org eclipse core resources I Resource org eclipse core resources I Resource public I Scheduling Rule copy Rule I Resource source I Resource destination return root  IResourceRuleFactory copyRule IResource IResource ISchedulingRule copyRule IResource IResource
see org eclipse core resources I Resource Rule Factory create Rule org eclipse core resources I Resource public I Scheduling Rule create Rule I Resource resource return root  IResourceRuleFactory createRule IResource ISchedulingRule createRule IResource
see org eclipse core resources I Resource Rule Factory delete Rule org eclipse core resources I Resource public I Scheduling Rule delete Rule I Resource resource return root  IResourceRuleFactory deleteRule IResource ISchedulingRule deleteRule IResource
see org eclipse core resources I Resource Rule Factory modify Rule org eclipse core resources I Resource public I Scheduling Rule modify Rule I Resource resource return root  IResourceRuleFactory modifyRule IResource ISchedulingRule modifyRule IResource
see org eclipse core resources I Resource Rule Factory move Rule org eclipse core resources I Resource org eclipse core resources I Resource public I Scheduling Rule move Rule I Resource source I Resource destination return root  IResourceRuleFactory moveRule IResource IResource ISchedulingRule moveRule IResource IResource
see org eclipse core resources I Resource Rule Factory refresh Rule org eclipse core resources I Resource public I Scheduling Rule refresh Rule I Resource resource return root  IResourceRuleFactory refreshRule IResource ISchedulingRule refreshRule IResource
see org eclipse core resources I Resource Rule Factory validate Edit Rule org eclipse core resources I Resource public I Scheduling Rule validate Edit Rule I Resource resources return root  IResourceRuleFactory validateEditRule IResource ISchedulingRule validateEditRule IResource

Creates a NLS catalog for the given locale public static void localize String bundle Name bundle Resource Bundle get Bundle bundle Name  bundleName ResourceBundle getBundle bundleName
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string public static String bind String id String binding return bind id new String binding 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings public static String bind String id String binding1 String binding2 return bind id new String binding1 binding2 
Gets a string from the resource bundle We don t want to crash because of a missing String Returns the key if not found public static String bind String key try return bundle get String key catch Missing Resource Exception e return key catch Null Pointer Exception e return key NON NLS 1 NON NLS 2  getString MissingResourceException NullPointerException
Gets a string from the resource bundle and binds it with the given arguments If the key is not found return the key public static String bind String key Object args try return Message Format format bind key args catch Missing Resource Exception e return key catch Null Pointer Exception e return key NON NLS 1 NON NLS 2  MessageFormat MissingResourceException NullPointerException
Progress monitor helpers public static void check Canceled I Progress Monitor monitor if monitor null monitor is Canceled throw new Operation Canceled Exception  checkCanceled IProgressMonitor isCanceled OperationCanceledException
public static I Progress Monitor monitor For I Progress Monitor monitor if monitor null return new Null Progress Monitor return monitor  IProgressMonitor monitorFor IProgressMonitor NullProgressMonitor
public static I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks  IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor
public static I Progress Monitor infinite Sub Monitor For I Progress Monitor monitor int ticks if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Infinite Sub Progress Monitor monitor ticks  IProgressMonitor infiniteSubMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor InfiniteSubProgressMonitor

Enables the use of remote contents caching for the given cache Id The cache ID must be unique A good candidate for this ID is the plugin ID of the plugin peforming the caching param cache Id the unique Id of the cache being enabled throws Team Exception if the cache area on disk could not be properly initialized public static synchronized void enable Caching String cache Id if is Caching Enabled cache Id return Resource Variant Cache cache new Resource Variant Cache cache Id cache create Cache Directory caches put cache Id cache  cacheId cacheId TeamException enableCaching cacheId isCachingEnabled cacheId ResourceVariantCache ResourceVariantCache cacheId createCacheDirectory cacheId
Returns whether caching has been enabled for the given Id A cache should only be enabled once It is conceivable that a cache be persisted over workbench invocations thus leading to a cahce that is enabled on startup without intervention by the owning plugin param cache Id the unique Id of the cache return true if caching for the given Id is enabled public static boolean is Caching Enabled String cache Id return get Cache cache Id null  cacheId isCachingEnabled cacheId getCache cacheId
Disable the cache dispoing of any file contents in the cache param cache Id the unique Id of the cache throws Team Exception if the cached contents could not be deleted from disk public static void disable Cache String cache Id Resource Variant Cache cache get Cache cache Id if cache null There is no cache to dispose of return caches remove cache Id cache delete Cache Directory  cacheId TeamException disableCache cacheId ResourceVariantCache getCache cacheId cacheId deleteCacheDirectory
Return the cache for the given id or null if caching is not enabled for the given id param cache Id return public static synchronized Resource Variant Cache get Cache String cache Id return Resource Variant Cache caches get cache Id  cacheId ResourceVariantCache getCache cacheId ResourceVariantCache cacheId
public static synchronized void shutdown for Iterator iter caches key Set iterator iter has Next String id String iter next disable Cache id  keySet hasNext disableCache
private Resource Variant Cache String name this name name  ResourceVariantCache
Return whether the cache contains an entry for the given id Register a hit if it does param id the id of the cache entry return true if there are contents cached for the id public boolean has Entry String id return internal Get Cache Entry id null  hasEntry internalGetCacheEntry
protected I Path get Cache Path return get State Location append CACHE DIRECTORY append name  IPath getCachePath getStateLocation CACHE_DIRECTORY
private I Path get State Location return Team Plugin get Plugin get State Location  IPath getStateLocation TeamPlugin getPlugin getStateLocation
private synchronized void clear Old Cache Entries long current new Date get Time if last Cache Cleanup 1 current last Cache Cleanup CACHE FILE LIFESPAN return List stale new Array List for Iterator iter cache Entries values iterator iter has Next Resource Variant Cache Entry entry Resource Variant Cache Entry iter next long last Hit entry get Last Access Time Stamp if current last Hit CACHE FILE LIFESPAN stale add entry for Iterator iter stale iterator iter has Next Resource Variant Cache Entry entry Resource Variant Cache Entry iter next entry dispose  clearOldCacheEntries getTime lastCacheCleanup lastCacheCleanup CACHE_FILE_LIFESPAN ArrayList cacheEntries hasNext ResourceVariantCacheEntry ResourceVariantCacheEntry lastHit getLastAccessTimeStamp lastHit CACHE_FILE_LIFESPAN hasNext ResourceVariantCacheEntry ResourceVariantCacheEntry
private synchronized void purge From Cache String id Resource Variant Cache Entry entry Resource Variant Cache Entry cache Entries get id File f entry get File try delete File f catch Team Exception e Ignore the deletion failure A failure only really matters when purging the directory on startup cache Entries remove id  purgeFromCache ResourceVariantCacheEntry ResourceVariantCacheEntry cacheEntries getFile deleteFile TeamException cacheEntries
private synchronized void create Cache Directory I Path cache Location get Cache Path File file cache Location to File if file exists try delete File file catch Team Exception e Check to see if were in an acceptable state if file exists file is Directory file list Files length 0 Team Plugin log e if file exists file mkdirs Team Plugin log new Team Exception Policy bind Remote Contents Cache file Error file get Absolute Path NON NLS 1 cache Entries new Hash Map last Cache Cleanup 1 cache Dir Size 0  createCacheDirectory IPath cacheLocation getCachePath cacheLocation toFile deleteFile TeamException isDirectory listFiles TeamPlugin TeamPlugin TeamException RemoteContentsCache fileError getAbsolutePath cacheEntries HashMap lastCacheCleanup cacheDirSize
private synchronized void delete Cache Directory cache Entries null last Cache Cleanup 1 cache Dir Size 0 I Path cache Location get Cache Path File file cache Location to File if file exists try delete File file catch Team Exception e Don t worry about problems deleting The only case that matters is when the cache directory is created  deleteCacheDirectory cacheEntries lastCacheCleanup cacheDirSize IPath cacheLocation getCachePath cacheLocation toFile deleteFile TeamException
private void delete File File file throws Team Exception if file is Directory File children file list Files for int i 0 i children length i delete File children i if file delete throw new Team Exception Policy bind Remote Contents Cache file Error file get Absolute Path NON NLS 1  deleteFile TeamException isDirectory listFiles deleteFile TeamException RemoteContentsCache fileError getAbsolutePath
Purge the given cache entry from the cache This method should only be invoked from an instance of Resource Variant Cache Entry after it has set it s state to DISPOSED param entry protected void purge From Cache Resource Variant Cache Entry entry purge From Cache entry get Id  ResourceVariantCacheEntry purgeFromCache ResourceVariantCacheEntry purgeFromCache getId
private synchronized Resource Variant Cache Entry internal Get Cache Entry String id if cache Entries null This probably means that the cache has been disposed throw new Illegal State Exception Policy bind Remote Contents Cache cache Disposed name NON NLS 1 Resource Variant Cache Entry entry Resource Variant Cache Entry cache Entries get id if entry null entry register Hit return entry  ResourceVariantCacheEntry internalGetCacheEntry cacheEntries IllegalStateException RemoteContentsCache cacheDisposed ResourceVariantCacheEntry ResourceVariantCacheEntry cacheEntries registerHit
param id the id that uniquely identifes the remote resource that is cached return public Resource Variant Cache Entry get Cache Entry String id return internal Get Cache Entry id  ResourceVariantCacheEntry getCacheEntry internalGetCacheEntry
public synchronized Resource Variant Cache Entry add String id Cached Resource Variant resource clear Old Cache Entries String file Path String value Of cache Dir Size Resource Variant Cache Entry entry new Resource Variant Cache Entry this lock id file Path entry set Resource Variant resource cache Entries put id entry return entry  ResourceVariantCacheEntry CachedResourceVariant clearOldCacheEntries filePath valueOf cacheDirSize ResourceVariantCacheEntry ResourceVariantCacheEntry filePath setResourceVariant cacheEntries
public String get Name return name  getName

public Resource Variant Cache Entry Resource Variant Cache cache I Lock lock String id String file Path this lock lock state UNINITIALIZED this cache cache this id id this file Path file Path register Hit  ResourceVariantCacheEntry ResourceVariantCache ILock filePath filePath filePath registerHit
public Input Stream get Contents throws Team Exception if state READY return null register Hit File io File get File try try if io File exists return new File Input Stream io File catch IO Exception e Try to purge the cache and continue cache purge From Cache this throw e catch IO Exception e We will end up here if we couldn t read or delete the cache file throw new Team Exception Policy bind Remote Contents Cache file Error io File get Absolute Path e NON NLS 1 This can occur when there is no remote contents return new Byte Array Input Stream new byte 0  InputStream getContents TeamException registerHit ioFile getFile ioFile FileInputStream ioFile IOException purgeFromCache IOException TeamException RemoteContentsCache fileError ioFile getAbsolutePath ByteArrayInputStream
protected File get File return new File cache get Cache Path to File file Path  getFile getCachePath toFile filePath
Set the contents of for this cache entry This method supports concurrency by only allowing one cache entry to be written at a time In the case of two concurrent writes to the same cache entry the contents from the first write is used and the content from subsequent writes is ignored param stream an Input Stream that provides the contents to be cached param monitor a progress monitor throws Team Exception if the entry is DISPOSED or an I O error occurres public void set Contents Input Stream stream I Progress Monitor monitor throws Team Exception Use a lock to only allow one write at a time begin Operation try internal Set Contents stream monitor finally end Operation  InputStream TeamException setContents InputStream IProgressMonitor TeamException beginOperation internalSetContents endOperation
private void end Operation lock release  endOperation
private void begin Operation lock acquire  beginOperation
private void internal Set Contents Input Stream stream I Progress Monitor monitor throws Team Exception if the state is DISPOSED then there is a problem if state DISPOSED throw new Team Exception Policy bind Remote Contents Cache Entry 3 cache get Name id NON NLS 1 Otherwise the state is UNINITIALIZED or READY so we can proceed register Hit File io File get File try Open the cache file for writing Output Stream out try if state UNINITIALIZED out new Buffered Output Stream new File Output Stream io File else If the entry is READY the contents must have been read in another thread We still need to red the contents but they can be ignored since presumably they are the same out new Byte Array Output Stream catch File Not Found Exception e throw new Team Exception Policy bind Remote Contents Cache file Error io File get Absolute Path e NON NLS 1 Transfer the contents try try byte buffer new byte 1024 int read while read stream read buffer 0 Policy check Canceled monitor out write buffer 0 read finally out close catch IO Exception e Make sure we don t leave the cache file around as it may not have the right contents cache purge From Cache this throw e Mark the cache entry as ready state READY catch IO Exception e throw new Team Exception Policy bind Remote Contents Cache file Error io File get Absolute Path e NON NLS 1 finally try stream close catch IO Exception e1 Ignore close errors  internalSetContents InputStream IProgressMonitor TeamException TeamException RemoteContentsCacheEntry getName registerHit ioFile getFile OutputStream BufferedOutputStream FileOutputStream ioFile ByteArrayOutputStream FileNotFoundException TeamException RemoteContentsCache fileError ioFile getAbsolutePath checkCanceled IOException purgeFromCache IOException TeamException RemoteContentsCache fileError ioFile getAbsolutePath IOException
see org eclipse team core sync I Cache Entry get State public int get State return state  ICacheEntry getState getState
public long get Size if state READY return 0 File io File get File if io File exists return io File length return 0  getSize ioFile getFile ioFile ioFile
see org eclipse team core sync I Cache Entry get Last Access Time Stamp public long get Last Access Time Stamp return last Access  ICacheEntry getLastAccessTimeStamp getLastAccessTimeStamp lastAccess
Registers a hit on this cache entry This updates the last access timestamp Thsi method is intended to only be invokded from inside this class or the cahce itself Other clients should not use it protected void register Hit last Access new Date get Time  registerHit lastAccess getTime
public void dispose Use a lock to avoid changing state while another thread may be writting begin Operation try state DISPOSED cache purge From Cache this finally end Operation  beginOperation purgeFromCache endOperation
public String get Id return id  getId
public Cached Resource Variant get Resource Variant return resource Variant  CachedResourceVariant getResourceVariant resourceVariant
public void set Resource Variant Cached Resource Variant resource Variant this resource Variant resource Variant  setResourceVariant CachedResourceVariant resourceVariant resourceVariant resourceVariant

ul public void get I Resource resources int depth I Progress Monitor progress throws Team Exception  IResource IProgressMonitor TeamException
see checkin I Resource int I Progress Monitor public void checkout I Resource resources int depth I Progress Monitor progress throws Team Exception  IResource IProgressMonitor IResource IProgressMonitor TeamException
see checkout I Resource int I Progress Monitor public void checkin I Resource resources int depth I Progress Monitor progress throws Team Exception  IResource IProgressMonitor IResource IProgressMonitor TeamException
see uncheckout I Resource public void uncheckout I Resource resources int depth I Progress Monitor progress throws Team Exception  IResource IResource IProgressMonitor TeamException
ul public void delete I Resource resources I Progress Monitor progress throws Team Exception  IResource IProgressMonitor TeamException
ul public void moved I Path source I Resource target I Progress Monitor progress throws Team Exception  IPath IResource IProgressMonitor TeamException
see checkout I Resource int I Progress Monitor public boolean is Checked Out I Resource resource  IResource IProgressMonitor isCheckedOut IResource
see refresh State I Resource int I Progress Monitor public boolean has Remote I Resource resource  refreshState IResource IProgressMonitor hasRemote IResource
timestamp and code false code otherwise public boolean is Dirty I Resource resource  isDirty IResource

public abstract class Sorter Returns true is element Two is greater than element One This is the ordering method of the sort operation Each subclass overides this method with the particular implementation of the greater than concept for the objects being sorted  elementTwo elementOne
public abstract boolean compare Object element One Object element Two Sort the objects in sorted collection and return that collection private Object quick Sort Object sorted Collection int left int right int original Left left int original Right right Object mid sorted Collection left right 2 do while compare sorted Collection left mid left while compare mid sorted Collection right right if left right Object tmp sorted Collection left sorted Collection left sorted Collection right sorted Collection right tmp left right while left right if original Left right sorted Collection quick Sort sorted Collection original Left right if left original Right sorted Collection quick Sort sorted Collection left original Right return sorted Collection  elementOne elementTwo quickSort sortedCollection originalLeft originalRight sortedCollection sortedCollection sortedCollection sortedCollection sortedCollection sortedCollection sortedCollection originalLeft sortedCollection quickSort sortedCollection originalLeft originalRight sortedCollection quickSort sortedCollection originalRight sortedCollection
Return a new sorted collection from this unsorted collection Sort using quick sort public Object sort Object un Sorted Collection int size un Sorted Collection length Object sorted Collection new Object size copy the array so can return a new sorted collection System arraycopy un Sorted Collection 0 sorted Collection 0 size if size 1 quick Sort sorted Collection 0 size 1 return sorted Collection  unSortedCollection unSortedCollection sortedCollection unSortedCollection sortedCollection quickSort sortedCollection sortedCollection

Creates a new filtered input stream param in the underlying input stream public CRL FtoLF Input Stream Input Stream in super in  CRLFtoLFInputStream InputStream
Wraps the underlying stream s method Translates CR LF sequences to L Fs transparently throws InterruptedIO Exception if the operation was interrupted before all of the bytes specified have been skipped bytes Transferred will be zero throws IO Exception if an i o error occurs public int read throws IO Exception if pending Byte last Byte in read ok if this throws pending Byte true remember the byte in case we throw an exception later on if last Byte r last Byte in read ok if this throws if last Byte n if last Byte 1 pending Byte false return r leaves the byte pending for later pending Byte false return last Byte  LFs InterruptedIOException bytesTransferred IOException IOException pendingByte lastByte pendingByte lastByte lastByte lastByte lastByte pendingByte pendingByte lastByte
Wraps the underlying stream s method Translates CR LF sequences to L Fs transparently throws InterruptedIO Exception if the operation was interrupted before all of the bytes specified have been skipped bytes Transferred may be non zero throws IO Exception if an i o error occurs public int read byte buffer int off int len throws IO Exception handle boundary cases cleanly if len 0 return 0 else if len 1 int b read if b 1 return 1 buffer off byte b return 1 read some bytes from the stream prefix with pending byte from last read if any int count 0 if pending Byte buffer off byte last Byte pending Byte false count 1 InterruptedIO Exception iioe null try len in read buffer off count len count if len 1 return count 0 1 count catch InterruptedIO Exception e len e bytes Transferred iioe e count len strip out CR s in CR LF pairs pending Byte will be true iff previous byte was a CR int j off for int i off i off count i invariant j i last Byte buffer i if last Byte r if pending Byte buffer j r write out orphan CR else pending Byte true else if pending Byte if last Byte n buffer j r if LF don t write the CR pending Byte false buffer j byte last Byte if iioe null iioe bytes Transferred j off throw iioe return j off  LFs InterruptedIOException bytesTransferred IOException IOException pendingByte lastByte pendingByte InterruptedIOException InterruptedIOException bytesTransferred pendingByte lastByte lastByte pendingByte pendingByte pendingByte lastByte pendingByte lastByte bytesTransferred
Calls read to skip the specified number of bytes throws InterruptedIO Exception if the operation was interrupted before all of the bytes specified have been skipped bytes Transferred may be non zero throws IO Exception if an i o error occurs public long skip long count throws IO Exception int actual Count 0 assumes count Integer MAX INT try while count 0 read 1 actual Count skip the specified number of bytes return actual Count catch InterruptedIO Exception e e bytes Transferred actual Count throw e  InterruptedIOException bytesTransferred IOException IOException actualCount MAX_INT actualCount actualCount InterruptedIOException bytesTransferred actualCount
Wraps the underlying stream s method Returns the number of bytes that can be read without blocking accounts for possible translation of CR LF sequences to L Fs in these bytes throws IO Exception if an i o error occurs public int available throws IO Exception return in available 2 we can guarantee at least this amount after contraction  LFs IOException IOException
Mark is not supported by the wrapper even if the underlying stream does returns false public boolean mark Supported return false  markSupported

Creates a new filtered input stream param in the underlying input stream public L FtoCRLF Input Stream Input Stream in super in  LFtoCRLFInputStream InputStream
Wraps the underlying stream s method Translates L Fs to CR LF sequences transparently throws InterruptedIO Exception if the operation was interrupted before all of the bytes specified have been skipped bytes Transferred will be zero throws IO Exception if an i o error occurs public int read throws IO Exception if must ReturnLF must ReturnLF false return n int b in read ok if this throws if b n must ReturnLF true b r return b  LFs InterruptedIOException bytesTransferred IOException IOException mustReturnLF mustReturnLF mustReturnLF
Wraps the underlying stream s method Translates L Fs to CR LF sequences transparently throws InterruptedIO Exception if the operation was interrupted before all of the bytes specified have been skipped bytes Transferred may be non zero throws IO Exception if an i o error occurs public int read byte buffer int off int len throws IO Exception handle boundary cases cleanly if len 0 return 0 else if len 1 int b read if b 1 return 1 buffer off byte b return 1 prefix with remembered n from last read but don t expand it a second time int count 0 if must ReturnLF must ReturnLF false buffer off n len count 1 if len 2 return count is there still enough room to expand more read some bytes from the stream into the back half of the buffer this guarantees that there is always room to expand len 2 int j off len InterruptedIO Exception iioe null try len in read buffer j len if len 1 return count 0 1 count catch InterruptedIO Exception e len e bytes Transferred iioe e count len copy bytes from the middle to the front of the array expanding LF CR LF while len 0 byte b buffer j if b n buffer off r count buffer off b if iioe null iioe bytes Transferred count throw iioe return count  LFs InterruptedIOException bytesTransferred IOException IOException mustReturnLF mustReturnLF InterruptedIOException InterruptedIOException bytesTransferred bytesTransferred
Calls read to skip the specified number of bytes throws InterruptedIO Exception if the operation was interrupted before all of the bytes specified have been skipped bytes Transferred may be non zero throws IO Exception if an i o error occurs public long skip long count throws IO Exception int actual Count 0 assumes count Integer MAX INT try while count 0 read 1 actual Count skip the specified number of bytes return actual Count catch InterruptedIO Exception e e bytes Transferred actual Count throw e  InterruptedIOException bytesTransferred IOException IOException actualCount MAX_INT actualCount actualCount InterruptedIOException bytesTransferred actualCount
Wraps the underlying stream s method Returns the number of bytes that can be read without blocking accounts for possible translation of L Fs to CR LF sequences in these bytes throws IO Exception if an i o error occurs public int available throws IO Exception return in available we can guarantee at least this amount after expansion  LFs IOException IOException
Mark is not supported by the wrapper even if the underlying stream does returns false public boolean mark Supported return false  markSupported

Creates a new polling input stream param in the underlying input stream param num Attempts the number of attempts before issuing an InterruptedIO Exception if 0 retries indefinitely until canceled param monitor the progress monitor to be polled for cancellation public Polling Input Stream Input Stream in int num Attempts I Progress Monitor monitor super in this num Attempts num Attempts this monitor monitor this cancellable true  numAttempts InterruptedIOException PollingInputStream InputStream numAttempts IProgressMonitor numAttempts numAttempts
Wraps the underlying stream s method It may be important to wait for an input stream to be closed because it holds an implicit lock on a system resoure such as a file while it is open Closing a stream may take time if the underlying stream is still servicing a previous request throws Operation Canceled Exception if the progress monitor is canceled throws InterruptedIO Exception if the underlying operation times out num Attempts times throws IO Exception if an i o error occurs public void close throws IO Exception int attempts 0 try read Pending Input catch IO Exception e We shouldn t get an exception when we re getting the available input If we do just log it so we can close Team Plugin log I Status ERROR e get Message e finally boolean stop false while stop try in close stop true catch InterruptedIO Exception e if check Cancellation throw new Operation Canceled Exception if attempts num Attempts throw new InterruptedIO Exception Policy bind Polling Input Stream close Timeout NON NLS 1 if DEBUG System out println close retry attempts NON NLS 1  OperationCanceledException InterruptedIOException numAttempts IOException IOException readPendingInput IOException TeamPlugin IStatus getMessage InterruptedIOException checkCancellation OperationCanceledException numAttempts InterruptedIOException PollingInputStream closeTimeout
Wraps the underlying stream s method throws Operation Canceled Exception if the progress monitor is canceled throws InterruptedIO Exception if the underlying operation times out num Attempts times and no data was received bytes Transferred will be zero throws IO Exception if an i o error occurs public int read throws IO Exception int attempts 0 for if check Cancellation throw new Operation Canceled Exception try return in read catch InterruptedIO Exception e if attempts num Attempts throw new InterruptedIO Exception Policy bind Polling Input Stream read Timeout NON NLS 1 if DEBUG System out println read retry attempts NON NLS 1  OperationCanceledException InterruptedIOException numAttempts bytesTransferred IOException IOException checkCancellation OperationCanceledException InterruptedIOException numAttempts InterruptedIOException PollingInputStream readTimeout
Wraps the underlying stream s method throws Operation Canceled Exception if the progress monitor is canceled throws InterruptedIO Exception if the underlying operation times out num Attempts times and no data was received bytes Transferred will be zero throws IO Exception if an i o error occurs public int read byte buffer int off int len throws IO Exception int attempts 0 for if check Cancellation throw new Operation Canceled Exception try return in read buffer off len catch InterruptedIO Exception e if e bytes Transferred 0 return e bytes Transferred keep partial transfer if attempts num Attempts throw new InterruptedIO Exception Policy bind Polling Input Stream read Timeout NON NLS 1 if DEBUG System out println read retry attempts NON NLS 1  OperationCanceledException InterruptedIOException numAttempts bytesTransferred IOException IOException checkCancellation OperationCanceledException InterruptedIOException bytesTransferred bytesTransferred numAttempts InterruptedIOException PollingInputStream readTimeout
Wraps the underlying stream s method throws Operation Canceled Exception if the progress monitor is canceled throws InterruptedIO Exception if the underlying operation times out num Attempts times and no data was received bytes Transferred will be zero throws IO Exception if an i o error occurs public long skip long count throws IO Exception int attempts 0 for if check Cancellation throw new Operation Canceled Exception try return in skip count catch InterruptedIO Exception e if e bytes Transferred 0 return e bytes Transferred keep partial transfer if attempts num Attempts throw new InterruptedIO Exception Policy bind Polling Input Stream read Timeout NON NLS 1 if DEBUG System out println read retry attempts NON NLS 1  OperationCanceledException InterruptedIOException numAttempts bytesTransferred IOException IOException checkCancellation OperationCanceledException InterruptedIOException bytesTransferred bytesTransferred numAttempts InterruptedIOException PollingInputStream readTimeout
Reads any pending input from the input stream so that the stream can savely be closed protected void read Pending Input throws IO Exception byte buffer new byte 2048 while true int available in available if available 1 break if available buffer length available buffer length if in read buffer 0 available 1 break  readPendingInput IOException
Called to set whether cancellation will be checked by this stream Turning cancellation checking off can be very useful for protecting critical portions of a protocol that shouldn t be interrupted For example it is often necessary to protect login sequences param cancellable a flag controlling whether this stream will check for cancellation public void set Is Cancellable boolean cancellable this cancellable cancellable  setIsCancellable
Checked whether the monitor for this stream has been cancelled If the cancellable flag is code false code then the monitor is never cancelled return code true code if the monitor has been cancelled and code false code otherwise private boolean check Cancellation if cancellable return monitor is Canceled else return false  checkCancellation isCanceled

Creates a new polling output stream param in the underlying output stream param num Attempts the number of attempts before issuing an InterruptedIO Exception if 0 retries indefinitely until canceled param monitor the progress monitor to be polled for cancellation public Polling Output Stream Output Stream out int num Attempts I Progress Monitor monitor super out this num Attempts num Attempts this monitor monitor this cancellable true  numAttempts InterruptedIOException PollingOutputStream OutputStream numAttempts IProgressMonitor numAttempts numAttempts
Wraps the underlying stream s method throws Operation Canceled Exception if the progress monitor is canceled throws InterruptedIO Exception if the underlying operation times out num Attempts times and no data was sent bytes Transferred will be zero throws IO Exception if an i o error occurs public void write int b throws IO Exception int attempts 0 for if check Cancellation throw new Operation Canceled Exception try out write b return catch InterruptedIO Exception e if attempts num Attempts throw new InterruptedIO Exception Policy bind Polling Output Stream write Timeout NON NLS 1 if DEBUG System out println write retry attempts NON NLS 1  OperationCanceledException InterruptedIOException numAttempts bytesTransferred IOException IOException checkCancellation OperationCanceledException InterruptedIOException numAttempts InterruptedIOException PollingOutputStream writeTimeout
Wraps the underlying stream s method throws Operation Canceled Exception if the progress monitor is canceled throws InterruptedIO Exception if the underlying operation times out num Attempts times bytes Transferred will reflect the number of bytes sent throws IO Exception if an i o error occurs public void write byte buffer int off int len throws IO Exception int count 0 int attempts 0 for if check Cancellation throw new Operation Canceled Exception try out write buffer off len return catch InterruptedIO Exception e int amount e bytes Transferred if amount 0 keep partial transfer len amount if len 0 return off amount count amount attempts 0 made some progress don t time out quite yet if attempts num Attempts e new InterruptedIO Exception Policy bind Polling Output Stream write Timeout NON NLS 1 e bytes Transferred count throw e if DEBUG System out println write retry attempts NON NLS 1  OperationCanceledException InterruptedIOException numAttempts bytesTransferred IOException IOException checkCancellation OperationCanceledException InterruptedIOException bytesTransferred numAttempts InterruptedIOException PollingOutputStream writeTimeout bytesTransferred
Wraps the underlying stream s method throws Operation Canceled Exception if the progress monitor is canceled throws InterruptedIO Exception if the underlying operation times out num Attempts times bytes Transferred will reflect the number of bytes sent throws IO Exception if an i o error occurs public void flush throws IO Exception int count 0 int attempts 0 for if check Cancellation throw new Operation Canceled Exception try out flush return catch InterruptedIO Exception e int amount e bytes Transferred if amount 0 keep partial transfer count amount attempts 0 made some progress don t time out quite yet if attempts num Attempts e new InterruptedIO Exception Policy bind Polling Output Stream write Timeout NON NLS 1 e bytes Transferred count throw e if DEBUG System out println write retry attempts NON NLS 1  OperationCanceledException InterruptedIOException numAttempts bytesTransferred IOException IOException checkCancellation OperationCanceledException InterruptedIOException bytesTransferred numAttempts InterruptedIOException PollingOutputStream writeTimeout bytesTransferred
Calls flush then close on the underlying stream throws Operation Canceled Exception if the progress monitor is canceled throws InterruptedIO Exception if the underlying operation times out num Attempts times bytes Transferred will reflect the number of bytes sent during the flush throws IO Exception if an i o error occurs public void close throws IO Exception int attempts num Attempts 1 fail fast if flush does times out try out flush attempts 0 finally boolean stop false while stop try out close stop true catch InterruptedIO Exception e if check Cancellation throw new Operation Canceled Exception if attempts num Attempts throw new InterruptedIO Exception Policy bind Polling Output Stream close Timeout NON NLS 1 if DEBUG System out println close retry attempts NON NLS 1  OperationCanceledException InterruptedIOException numAttempts bytesTransferred IOException IOException numAttempts InterruptedIOException checkCancellation OperationCanceledException numAttempts InterruptedIOException PollingOutputStream closeTimeout
Called to set whether cancellation will be checked by this stream Turning cancellation checking off can be very useful for protecting critical portions of a protocol that shouldn t be interrupted For example it is often necessary to protect login sequences param cancellable a flag controlling whether this stream will check for cancellation public void set Is Cancellable boolean cancellable this cancellable cancellable  setIsCancellable
Checked whether the monitor for this stream has been cancelled If the cancellable flag is code false code then the monitor is never cancelled return code true code if the monitor has been cancelled and code false code otherwise private boolean check Cancellation if cancellable return monitor is Canceled else return false  checkCancellation isCanceled

Creates a progress monitoring input stream param in the underlying input stream param bytes Total the number of bytes to read in total passed to update Monitor param update Increment the number of bytes read between updates param monitor the progress monitor public Progress Monitor Input Stream Input Stream in long bytes Total int update Increment I Progress Monitor monitor super in this bytes Total bytes Total this update Increment update Increment this monitor monitor update true  bytesTotal updateMonitor updateIncrement ProgressMonitorInputStream InputStream bytesTotal updateIncrement IProgressMonitor bytesTotal bytesTotal updateIncrement updateIncrement
protected abstract void update Monitor long bytes Read long size I Progress Monitor monitor  updateMonitor bytesRead IProgressMonitor
Wraps the underlying stream s method Updates the progress monitor to the final number of bytes read throws IO Exception if an i o error occurs public void close throws IO Exception try in close finally update true  IOException IOException
Wraps the underlying stream s method Updates the progress monitor if the next update increment has been reached throws InterruptedIO Exception if the operation was interrupted before all of the bytes specified have been skipped bytes Transferred will be zero throws IO Exception if an i o error occurs public int read throws IO Exception int b in read if b 1 bytes Read 1 update false return b  InterruptedIOException bytesTransferred IOException IOException bytesRead
Wraps the underlying stream s method Updates the progress monitor if the next update increment has been reached throws InterruptedIO Exception if the operation was interrupted before all of the bytes specified have been skipped bytes Transferred may be non zero throws IO Exception if an i o error occurs public int read byte buffer int offset int length throws IO Exception try int count in read buffer offset length if count 1 bytes Read count update false return count catch InterruptedIO Exception e bytes Read e bytes Transferred update false throw e  InterruptedIOException bytesTransferred IOException IOException bytesRead InterruptedIOException bytesRead bytesTransferred
Wraps the underlying stream s method Updates the progress monitor if the next update increment has been reached throws InterruptedIO Exception if the operation was interrupted before all of the bytes specified have been skipped bytes Transferred may be non zero throws IO Exception if an i o error occurs public long skip long amount throws IO Exception try long count in skip amount bytes Read count update false return count catch InterruptedIO Exception e bytes Read e bytes Transferred update false throw e  InterruptedIOException bytesTransferred IOException IOException bytesRead InterruptedIOException bytesRead bytesTransferred
Mark is not supported by the wrapper even if the underlying stream does returns false public boolean mark Supported return false  markSupported
private void update boolean now if bytes Read next Update now next Update bytes Read bytes Read update Increment if next Update last Update update Monitor next Update bytes Total monitor last Update next Update next Update update Increment  bytesRead nextUpdate nextUpdate bytesRead bytesRead updateIncrement nextUpdate lastUpdate updateMonitor nextUpdate bytesTotal lastUpdate nextUpdate nextUpdate updateIncrement

Creates a size contrained input stream param in the underlying input stream never actually closed by this filter param size the maximum number of bytes of the underlying input stream that can be read through this filter param discard On Close if true discards remaining unread bytes on close public Size Constrained Input Stream Input Stream in long size boolean discard On Close super in this bytes Remaining size this discard On Close discard On Close  discardOnClose SizeConstrainedInputStream InputStream discardOnClose bytesRemaining discardOnClose discardOnClose
Prevents further reading from the stream but does not close the underlying stream If discard On Close skip s over any remaining unread bytes in the constrained region throws IO Exception if an i o error occurs public void close throws IO Exception try if discard On Close while bytes Remaining 0 skip bytes Remaining 0 catch Operation Canceled Exception e The receiver is likely wrapping a Polling Input Stream which could throw an Operation Canceled Exception on a skip Since we re closing just ignore the cancel and let the caller check the monitor finally bytes Remaining 0  discardOnClose IOException IOException discardOnClose bytesRemaining bytesRemaining OperationCanceledException PollingInputStream OperationCanceledException bytesRemaining
Wraps the underlying stream s method Simulates an end of file condition if the end of the constrained region has been reached throws IO Exception if an i o error occurs public int available throws IO Exception int amount in available if amount bytes Remaining amount int bytes Remaining return amount  IOException IOException bytesRemaining bytesRemaining
Wraps the underlying stream s method Simulates an end of file condition if the end of the constrained region has been reached throws InterruptedIO Exception if the operation was interrupted before all of the bytes specified have been skipped bytes Transferred will be zero throws IO Exception if an i o error occurs public int read throws IO Exception if bytes Remaining 0 return 1 int b in read if b 1 bytes Remaining 1 return b  InterruptedIOException bytesTransferred IOException IOException bytesRemaining bytesRemaining
Wraps the underlying stream s method Simulates an end of file condition if the end of the constrained region has been reached throws InterruptedIO Exception if the operation was interrupted before all of the bytes specified have been skipped bytes Transferred may be non zero throws IO Exception if an i o error occurs public int read byte buffer int offset int length throws IO Exception if length bytes Remaining if bytes Remaining 0 return 1 length int bytes Remaining try int count in read buffer offset length if count 1 bytes Remaining count return count catch InterruptedIO Exception e bytes Remaining e bytes Transferred throw e  InterruptedIOException bytesTransferred IOException IOException bytesRemaining bytesRemaining bytesRemaining bytesRemaining InterruptedIOException bytesRemaining bytesTransferred
Wraps the underlying stream s method Simulates an end of file condition if the end of the constrained region has been reached throws InterruptedIO Exception if the operation was interrupted before all of the bytes specified have been skipped bytes Transferred may be non zero throws IO Exception if an i o error occurs public long skip long amount throws IO Exception if amount bytes Remaining amount bytes Remaining try long count in skip amount bytes Remaining count return count catch InterruptedIO Exception e bytes Remaining e bytes Transferred throw e  InterruptedIOException bytesTransferred IOException IOException bytesRemaining bytesRemaining bytesRemaining InterruptedIOException bytesRemaining bytesTransferred
Mark is not supported by the wrapper even if the underlying stream does returns false public boolean mark Supported return false  markSupported

this iobuffer new byte buffer Size thread new Thread new Runnable public void run run Thread  bufferSize runThread
Creates a timeout wrapper for an input stream param in the underlying input stream param buffer Size the buffer size in bytes should be large enough to mitigate Thread synchronization and context switching overhead param read Timeout the number of milliseconds to block for a read or skip before throwing an InterruptedIO Exception 0 blocks indefinitely param close Timeout the number of milliseconds to block for a close before throwing an InterruptedIO Exception 0 blocks indefinitely 1 closes the stream in the background public Timeout Input Stream Input Stream in int buffer Size long read Timeout long close Timeout super in this read Timeout read Timeout this close Timeout close Timeout this iobuffer new byte buffer Size thread new Thread new Runnable public void run run Thread Timeout Input Stream NON NLS 1 thread set Daemon true thread start  bufferSize readTimeout InterruptedIOException closeTimeout InterruptedIOException TimeoutInputStream InputStream bufferSize readTimeout closeTimeout readTimeout readTimeout closeTimeout closeTimeout bufferSize runThread TimeoutInputStream setDaemon
public Timeout Input Stream Input Stream in int buffer Size long read Timeout long close Timeout boolean grow When Full this in buffer Size read Timeout close Timeout this grow When Full grow When Full  TimeoutInputStream InputStream bufferSize readTimeout closeTimeout growWhenFull bufferSize readTimeout closeTimeout growWhenFull growWhenFull
Wraps the underlying stream s method It may be important to wait for a stream to actually be closed because it holds an implicit lock on a system resoure such as a file while it is open Closing a stream may take time if the underlying stream is still servicing a previous request throws InterruptedIO Exception if the timeout expired throws IO Exception if an i o error occurs public void close throws IO Exception Thread old Thread synchronized this if thread null return old Thread thread close Requested true thread interrupt check Error if close Timeout 1 return try old Thread join close Timeout catch Interrupted Exception e Thread current Thread interrupt we weren t expecting to be interrupted synchronized this check Error if thread null throw new InterruptedIO Exception  InterruptedIOException IOException IOException oldThread oldThread closeRequested checkError closeTimeout oldThread closeTimeout InterruptedException currentThread checkError InterruptedIOException
Returns the number of unread bytes in the buffer throws IO Exception if an i o error occurs public synchronized int available throws IO Exception if length 0 check Error return length 0 length 0  IOException IOException checkError
Reads a byte from the stream throws InterruptedIO Exception if the timeout expired and no data was received bytes Transferred will be zero throws IO Exception if an i o error occurs public synchronized int read throws IO Exception if sync Fill return 1 EOF reached int b iobuffer head 255 if head iobuffer length head 0 length notify return b  InterruptedIOException bytesTransferred IOException IOException syncFill
Reads multiple bytes from the stream throws InterruptedIO Exception if the timeout expired and no data was received bytes Transferred will be zero throws IO Exception if an i o error occurs public synchronized int read byte buffer int off int len throws IO Exception if sync Fill return 1 EOF reached int pos off if len length len length while len 0 buffer pos iobuffer head if head iobuffer length head 0 length notify return pos off  InterruptedIOException bytesTransferred IOException IOException syncFill
Skips multiple bytes in the stream throws InterruptedIO Exception if the timeout expired before all of the bytes specified have been skipped bytes Transferred may be non zero throws IO Exception if an i o error occurs public synchronized long skip long count throws IO Exception long amount 0 try do if sync Fill break EOF reached int skip int Math min count amount length head head skip iobuffer length length skip amount skip while amount count catch InterruptedIO Exception e e bytes Transferred int amount assumes amount Integer MAX INT throw e notify return amount  InterruptedIOException bytesTransferred IOException IOException syncFill InterruptedIOException bytesTransferred MAX_INT
Mark is not supported by the wrapper even if the underlying stream does returns false public boolean mark Supported return false  markSupported
Waits for the buffer to fill if it is empty and the stream has not reached EOF return true if bytes are available false if EOF has been reached throws InterruptedIO Exception if EOF not reached but no bytes are available private boolean sync Fill throws IO Exception if length 0 return true check Error check errors only after we have read all remaining bytes if waiting For Close return false notify try wait read Timeout catch Interrupted Exception e Thread current Thread interrupt we weren t expecting to be interrupted if length 0 return true check Error check errors only after we have read all remaining bytes if waiting For Close return false throw new InterruptedIO Exception  InterruptedIOException syncFill IOException checkError waitingForClose readTimeout InterruptedException currentThread checkError waitingForClose InterruptedIOException
If an exception is pending throws it private void check Error throws IO Exception if ioe null IO Exception e ioe ioe null throw e  checkError IOException IOException
Runs the thread in the background private void run Thread try read Until Done catch IO Exception e synchronized this ioe e finally wait Until Closed try in close catch IO Exception e synchronized this ioe e finally synchronized this thread null notify  runThread readUntilDone IOException waitUntilClosed IOException
Waits until we have been requested to close the stream private synchronized void wait Until Closed waiting For Close true notify while close Requested try wait catch Interrupted Exception e close Requested true alternate quit signal  waitUntilClosed waitingForClose closeRequested InterruptedException closeRequested
Reads bytes into the buffer until EOF closed or error private void read Until Done throws IO Exception for int off len synchronized this while is Buffer Full if close Requested return quit signal wait For Read off head length iobuffer length len head off head iobuffer length off int count try the i o operation might block without releasing the lock so we do this outside of the synchronized block count in read iobuffer off len if count 1 return EOF encountered catch InterruptedIO Exception e count e bytes Transferred keep partial transfer synchronized this length count notify  readUntilDone IOException isBufferFull closeRequested waitForRead InterruptedIOException bytesTransferred
private synchronized void wait For Read try if grow When Full wait a second before growing to let reads catch up wait read Timeout else wait catch Interrupted Exception e close Requested true alternate quit signal If the buffer is still full give it a chance to grow if grow When Full is Buffer Full grow Buffer  waitForRead growWhenFull readTimeout InterruptedException closeRequested growWhenFull isBufferFull growBuffer
private synchronized void grow Buffer int new Size 2 iobuffer length if new Size iobuffer length if Policy DEBUG STREAMS System out println Input Stream growing to new Size bytes NON NLS 1 NON NLS 2 byte new Buffer new byte new Size int pos 0 int len length while len 0 new Buffer pos iobuffer head if head iobuffer length head 0 iobuffer new Buffer head 0 length instance variable was not changed by this method  growBuffer newSize newSize DEBUG_STREAMS InputStream newSize newBuffer newSize newBuffer newBuffer
private boolean is Buffer Full return length iobuffer length  isBufferFull

this iobuffer new byte buffer Size thread new Thread new Runnable public void run run Thread  bufferSize runThread
Creates a timeout wrapper for an output stream param out the underlying input stream param buffer Size the buffer size in bytes should be large enough to mitigate Thread synchronization and context switching overhead param write Timeout the number of milliseconds to block for a write or flush before throwing an InterruptedIO Exception 0 blocks indefinitely param close Timeout the number of milliseconds to block for a close before throwing an InterruptedIO Exception 0 blocks indefinitely 1 closes the stream in the background public Timeout Output Stream Output Stream out int buffer Size long write Timeout long close Timeout super new Buffered Output Stream out buffer Size this write Timeout write Timeout this close Timeout close Timeout this iobuffer new byte buffer Size thread new Thread new Runnable public void run run Thread Timeout Output Stream NON NLS 1 thread set Daemon true thread start  bufferSize writeTimeout InterruptedIOException closeTimeout InterruptedIOException TimeoutOutputStream OutputStream bufferSize writeTimeout closeTimeout BufferedOutputStream bufferSize writeTimeout writeTimeout closeTimeout closeTimeout bufferSize runThread TimeoutOutputStream setDaemon
Wraps the underlying stream s method It may be important to wait for a stream to actually be closed because it holds an implicit lock on a system resoure such as a file while it is open Closing a stream may take time if the underlying stream is still servicing a previous request throws InterruptedIO Exception if the timeout expired bytes Transferred will reflect the number of bytes flushed from the buffer throws IO Exception if an i o error occurs public void close throws IO Exception Thread old Thread synchronized this if thread null return old Thread thread close Requested true thread interrupt check Error if close Timeout 1 return try old Thread join close Timeout catch Interrupted Exception e Thread current Thread interrupt we weren t expecting to be interrupted synchronized this check Error if thread null throw new InterruptedIO Exception  InterruptedIOException bytesTransferred IOException IOException oldThread oldThread closeRequested checkError closeTimeout oldThread closeTimeout InterruptedException currentThread checkError InterruptedIOException
Writes a byte to the stream throws InterruptedIO Exception if the timeout expired and no data was sent bytes Transferred will be zero throws IO Exception if an i o error occurs public synchronized void write int b throws IO Exception sync Commit true iobuffer head length iobuffer length byte b length notify  InterruptedIOException bytesTransferred IOException IOException syncCommit
Writes multiple bytes to the stream throws InterruptedIO Exception if the timeout expired bytes Transferred will reflect the number of bytes sent throws IO Exception if an i o error occurs public synchronized void write byte buffer int off int len throws IO Exception int amount 0 try do sync Commit true while amount len length iobuffer length iobuffer head length iobuffer length buffer off length amount while amount len catch InterruptedIO Exception e e bytes Transferred amount throw e notify  InterruptedIOException bytesTransferred IOException IOException syncCommit InterruptedIOException bytesTransferred
Flushes the stream throws InterruptedIO Exception if the timeout expired bytes Transferred will reflect the number of bytes flushed from the buffer throws IO Exception if an i o error occurs public synchronized void flush throws IO Exception int old Length length flush Requested true try sync Commit false catch InterruptedIO Exception e e bytes Transferred old Length length throw e notify  InterruptedIOException bytesTransferred IOException IOException oldLength flushRequested syncCommit InterruptedIOException bytesTransferred oldLength
Waits for the buffer to drain if it is full param partial if true waits until the buffer is partially empty else drains it entirely throws InterruptedIO Exception if the buffer could not be drained as requested private void sync Commit boolean partial throws IO Exception check Error check errors before allowing the addition of new bytes if partial length iobuffer length length 0 return if waiting For Close throw new IO Exception Policy bind Timeout Output Stream cannot Write To Stream NON NLS 1 notify try wait write Timeout catch Interrupted Exception e Thread current Thread interrupt we weren t expecting to be interrupted check Error check errors before allowing the addition of new bytes if partial length iobuffer length length 0 return throw new InterruptedIO Exception  InterruptedIOException syncCommit IOException checkError waitingForClose IOException TimeoutOutputStream cannotWriteToStream writeTimeout InterruptedException currentThread checkError InterruptedIOException
If an exception is pending throws it private void check Error throws IO Exception if ioe null IO Exception e ioe ioe null throw e  checkError IOException IOException
Runs the thread in the background private void run Thread try write Until Done catch IO Exception e synchronized this ioe e finally wait Until Closed try out close catch IO Exception e synchronized this ioe e finally synchronized this thread null notify  runThread writeUntilDone IOException waitUntilClosed IOException
Waits until we have been requested to close the stream private synchronized void wait Until Closed waiting For Close true notify while close Requested try wait catch Interrupted Exception e close Requested true alternate quit signal  waitUntilClosed waitingForClose closeRequested InterruptedException closeRequested
Writes bytes from the buffer until closed and buffer is empty private void write Until Done throws IO Exception int bytes Until Flush 1 if 0 then we will flush after that many bytes have been written for int off len synchronized this for if close Requested length 0 return quit signal if length 0 flush Requested break try wait catch Interrupted Exception e close Requested true alternate quit signal off head len iobuffer length head if len length len length if flush Requested bytes Until Flush 0 flush Requested false bytes Until Flush length If there are bytes to be written write them if len 0 write out all remaining bytes from the buffer before flushing try the i o operation might block without releasing the lock so we do this outside of the synchronized block out write iobuffer off len catch InterruptedIO Exception e len e bytes Transferred If there was a pending flush do it if bytes Until Flush 0 bytes Until Flush len if bytes Until Flush 0 flush the buffer now try out flush catch InterruptedIO Exception e bytes Until Flush 1 might have been 0 If bytes were written update the circular buffer if len 0 synchronized this head head len iobuffer length length len notify  writeUntilDone IOException bytesUntilFlush closeRequested flushRequested InterruptedException closeRequested flushRequested bytesUntilFlush flushRequested bytesUntilFlush InterruptedIOException bytesTransferred bytesUntilFlush bytesUntilFlush bytesUntilFlush InterruptedIOException bytesUntilFlush

int start inclusive int end exclusive public Position int start int end this start start this end end 
this end end public int get Start return start  getStart
return start public int get End return end  getEnd
Find the first occurrence of the pattern between code start code inclusive and code end code exclusive param code text code the String object to search in param code start code the starting index of the search range inclusive param code end code the ending index of the search range exclusive return an code String Matcher Position code object that keeps the starting inclusive and ending positions exclusive of the first occurrence of the pattern in the specified range of the text return null if not found or subtext is empty start end A pair of zeros is returned if pattern is empty string Note that for pattern like abc with leading and trailing stars position of abc is returned For a pattern like in text abcdf 1 3 is returned public String Matcher Position find String text int start int end if f Pattern null text null throw new Illegal Argument Exception int tlen text length if start 0 start 0 if end tlen end tlen if end 0 start end return null if f Length 0 return new Position start start if f Ignore Wild Cards int x pos In text start end if x 0 return null return new Position x x f Length int seg Count f Segments length if seg Count 0 pattern contains only s return new Position start end int cur Pos start int match Start 1 int i for i 0 i seg Count cur Pos end i String current f Segments i int next Match reg Exp Pos In text cur Pos end current if next Match 0 return null if i 0 match Start next Match cur Pos next Match current length if i seg Count return null return new Position match Start cur Pos  StringMatcher StringMatcher fPattern IllegalArgumentException fLength fIgnoreWildCards posIn fLength segCount fSegments segCount curPos matchStart segCount curPos fSegments nextMatch regExpPosIn curPos nextMatch matchStart nextMatch curPos nextMatch segCount matchStart curPos
String Matcher constructor takes in a String object that is a simple pattern which may contain for 0 and many characters and for exactly one character Literal and characters must be escaped in the pattern e g means literal etc Escaping any other character including the escape character itself just results in that character in the pattern e g a means a and means If invoking the String Matcher with string literals in Java don t forget escape characters are represented by param a Pattern the pattern to match text with param ignore Case if true case is ignored param ignore Wild Cards if true wild cards and their escape sequences are ignored everything is taken literally public String Matcher String a Pattern boolean ignore Case boolean ignore Wild Cards f Ignore Case ignore Case f Ignore Wild Cards ignore Wild Cards f Length a Pattern length convert case if f Ignore Case f Pattern a Pattern to Upper Case else f Pattern a Pattern if f Ignore Wild Cards parse No Wild Cards else parse Wild Cards  StringMatcher StringMatcher aPattern ignoreCase ignoreWildCards StringMatcher aPattern ignoreCase ignoreWildCards fIgnoreCase ignoreCase fIgnoreWildCards ignoreWildCards fLength aPattern fIgnoreCase fPattern aPattern toUpperCase fPattern aPattern fIgnoreWildCards parseNoWildCards parseWildCards
Given the starting inclusive and the ending exclusive poisitions in the code text code determine if the given substring matches with a Pattern return true if the specified portion of the text matches the pattern param String code text code a String object that contains the substring to match param int code start code marks the starting position inclusive of the substring param int code end code marks the ending index exclusive of the substring public boolean match String text int start int end if null text throw new Illegal Argument Exception if start end return false if f Ignore Wild Cards return end start f Length f Pattern region Matches f Ignore Case 0 text start f Length int seg Count f Segments length if seg Count 0 f Has Leading Star f Has Trailing Star pattern contains only s return true if start end return f Length 0 if f Length 0 return start end int tlen text length if start 0 start 0 if end tlen end tlen int t Cur Pos start int bound end f Bound if bound 0 return false int i 0 String current f Segments i int seg Length current length process first segment if f Has Leading Star if reg Exp Region Matches text start current 0 seg Length return false else i t Cur Pos t Cur Pos seg Length if f Segments length 1 f Has Leading Star f Has Trailing Star only one segment to match no wildcards specified return t Cur Pos end process middle segments while i seg Count current f Segments i int current Match int k current index Of f Single Wild Card if k 0 current Match text Pos In text t Cur Pos end current if current Match 0 return false else current Match reg Exp Pos In text t Cur Pos end current if current Match 0 return false t Cur Pos current Match current length i process final segment if f Has Trailing Star t Cur Pos end int clen current length return reg Exp Region Matches text end clen current 0 clen return i seg Count  aPattern IllegalArgumentException fIgnoreWildCards fLength fPattern regionMatches fIgnoreCase fLength segCount fSegments segCount fHasLeadingStar fHasTrailingStar fLength fLength tCurPos fBound fSegments segLength fHasLeadingStar regExpRegionMatches segLength tCurPos tCurPos segLength fSegments fHasLeadingStar fHasTrailingStar tCurPos segCount fSegments currentMatch indexOf fSingleWildCard currentMatch textPosIn tCurPos currentMatch currentMatch regExpPosIn tCurPos currentMatch tCurPos currentMatch fHasTrailingStar tCurPos regExpRegionMatches segCount
match the given code text code with the pattern return true if matched eitherwise false param code text code a String object public boolean match String text return match text 0 text length 
This method parses the given pattern into segments seperated by wildcard characters Since wildcards are not being used in this case the pattern consists of a single segment private void parse No Wild Cards f Segments new String 1 f Segments 0 f Pattern f Bound f Length  parseNoWildCards fSegments fSegments fPattern fBound fLength
This method parses the given pattern into segments seperated by wildcard characters param p a String object that is a simple regular expression with and or private void parse Wild Cards if f Pattern starts With NON NLS 1 f Has Leading Star true if f Pattern ends With NON NLS 1 make sure it s not an escaped wildcard if f Length 1 f Pattern char At f Length 2 f Has Trailing Star true Vector temp new Vector int pos 0 String Buffer buf new String Buffer while pos f Length char c f Pattern char At pos switch c case if pos f Length buf append c else char next f Pattern char At pos if it s an escape sequence if next next next buf append next else not an escape sequence just insert literally buf append c buf append next break case if buf length 0 new segment temp add Element buf to String f Bound buf length buf set Length 0 break case append special character representing single match wildcard buf append f Single Wild Card break default buf append c add last buffer to segment list if buf length 0 temp add Element buf to String f Bound buf length f Segments new String temp size temp copy Into f Segments  parseWildCards fPattern startsWith fHasLeadingStar fPattern endsWith fLength fPattern charAt fLength fHasTrailingStar StringBuffer StringBuffer fLength fPattern charAt fLength fPattern charAt addElement toString fBound setLength fSingleWildCard addElement toString fBound fSegments copyInto fSegments
param code text code a string which contains no wildcard param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive return the starting index in the text of the pattern or 1 if not found protected int pos In String text int start int end no wild card in pattern int max end f Length if f Ignore Case int i text index Of f Pattern start if i 1 i max return 1 return i for int i start i max i if text region Matches true i f Pattern 0 f Length return i return 1  posIn fLength fIgnoreCase indexOf fPattern regionMatches fPattern fLength
param code text code a simple regular expression that may only contain s param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a simple regular expression that may contains param code case Ignored code wether the pattern is not casesensitive return the starting index in the text of the pattern or 1 if not found protected int reg Exp Pos In String text int start int end String p int plen p length int max end plen for int i start i max i if reg Exp Region Matches text i p 0 plen return i return 1  caseIgnored regExpPosIn regExpRegionMatches
return boolean param code text code a String to match param code start code int that indicates the starting index of match inclusive param code end code int that indicates the ending index of match exclusive param code p code String String a simple regular expression that may contain param code ignore Case code boolean indicating wether code p code is case sensitive protected boolean reg Exp Region Matches String text int t Start String p int p Start int plen while plen 0 char tchar text char At t Start char pchar p char At p Start process wild cards if f Ignore Wild Cards skip single wild cards if pchar f Single Wild Card continue if pchar tchar continue if f Ignore Case char tc Character to Upper Case tchar if tc pchar continue return false return true  ignoreCase regExpRegionMatches tStart pStart charAt tStart charAt pStart fIgnoreWildCards fSingleWildCard fIgnoreCase toUpperCase
param code text code the string to match param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a string that has no wildcard param code ignore Case code boolean indicating wether code p code is case sensitive return the starting index in the text of the pattern or 1 if not found protected int text Pos In String text int start int end String p int plen p length int max end plen if f Ignore Case int i text index Of p start if i 1 i max return 1 return i for int i start i max i if text region Matches true i p 0 plen return i return 1  ignoreCase textPosIn fIgnoreCase indexOf regionMatches

This is a placeholder rule used to indicate that no scheduling rule is needed internal use only static final I Scheduling Rule NULL SCHEDULING RULE new I Scheduling Rule public boolean contains I Scheduling Rule rule return false  ISchedulingRule NULL_SCHEDULING_RULE ISchedulingRule ISchedulingRule
return false public boolean is Conflicting I Scheduling Rule rule return false  isConflicting ISchedulingRule
private I Flush Operation operation private List rules new Array List public Thread Info I Flush Operation operation this operation operation  IFlushOperation ArrayList ThreadInfo IFlushOperation
Push a scheduling rule onto the stack for this thread and acquire the rule if it is not the workspace root param resource public I Scheduling Rule push Rule I Scheduling Rule resource I Progress Monitor monitor The scheduling rule is either the project or the resource s parent I Scheduling Rule rule get Rule For Resoure resource if rule NULL SCHEDULING RULE boolean success false try Platform get Job Manager begin Rule rule monitor add Rule rule success true finally if success try Platform get Job Manager end Rule rule catch Runtime Exception e Log and ignore so the original exception is not lost Team Plugin log I Status ERROR Failed to end scheduling rule e NON NLS 1 else Record the fact that we didn t push a rule so we can match it when we pop add Rule rule return rule  ISchedulingRule pushRule ISchedulingRule IProgressMonitor ISchedulingRule getRuleForResoure NULL_SCHEDULING_RULE getJobManager beginRule addRule getJobManager endRule RuntimeException TeamPlugin IStatus addRule
Pop the scheduling rule from the stack and release it if it is not the workspace root Flush any changed sync info to disk if necessary A flush is necessary if the stack is empty or if the top most non null scheduling rule was popped as a result of this operation param monitor throws CVS Exception public void pop Rule I Scheduling Rule rule I Progress Monitor monitor throws Team Exception try if is Flush Required flush monitor finally I Scheduling Rule stacked Rule remove Rule if rule null rule NULL SCHEDULING RULE Assert is True stacked Rule equals rule end for resource rule does not match stacked rule stacked Rule NON NLS 1 NON NLS 2 NON NLS 3 if rule NULL SCHEDULING RULE Platform get Job Manager end Rule rule  CVSException popRule ISchedulingRule IProgressMonitor TeamException isFlushRequired ISchedulingRule stackedRule removeRule NULL_SCHEDULING_RULE isTrue stackedRule stackedRule NULL_SCHEDULING_RULE getJobManager endRule
private I Scheduling Rule get Rule For Resoure I Scheduling Rule resource Rule I Scheduling Rule rule if resource Rule instanceof I Resource I Resource resource I Resource resource Rule if resource get Type I Resource ROOT Never lock the whole workspace rule NULL SCHEDULING RULE else if resource get Type I Resource PROJECT rule resource else rule resource get Parent else if resource Rule instanceof Multi Rule Create a Multi Rule for all projects from the given rule I Scheduling Rule rules Multi Rule resource Rule get Children Set projects new Hash Set for int i 0 i rules length i I Scheduling Rule child Rule rules i if child Rule instanceof I Resource projects add I Resource child Rule get Project if projects is Empty rule NULL SCHEDULING RULE else if projects size 1 rule I Scheduling Rule projects iterator next else rule new Multi Rule I Scheduling Rule projects to Array new I Scheduling Rule projects size else Rule is not associated with resources so ignore it rule NULL SCHEDULING RULE return rule  ISchedulingRule getRuleForResoure ISchedulingRule resourceRule ISchedulingRule resourceRule IResource IResource IResource resourceRule getType IResource NULL_SCHEDULING_RULE getType IResource getParent resourceRule MultiRule MultiRule ISchedulingRule MultiRule resourceRule getChildren HashSet ISchedulingRule childRule childRule IResource IResource childRule getProject isEmpty NULL_SCHEDULING_RULE ISchedulingRule MultiRule ISchedulingRule toArray ISchedulingRule NULL_SCHEDULING_RULE
Return code true code if we are still nested in an acquire for this thread return public boolean is Nested return rules is Empty  isNested isEmpty
return rules is Empty public void add Changed Resource I Resource resource changed Resources add resource  isEmpty addChangedResource IResource changedResources
changed Resources add resource public boolean is Empty return changed Resources is Empty  changedResources isEmpty changedResources isEmpty
return changed Resources is Empty public I Resource get Changed Resources return I Resource changed Resources to Array new I Resource changed Resources size  changedResources isEmpty IResource getChangedResources IResource changedResources toArray IResource changedResources
public void flush I Progress Monitor monitor throws Team Exception try operation flush this monitor catch Out Of Memory Error e throw e catch Error e handle Aborted Flush e throw e catch Runtime Exception e handle Aborted Flush e throw e changed Resources clear  IProgressMonitor TeamException OutOfMemoryError handleAbortedFlush RuntimeException handleAbortedFlush changedResources
changed Resources clear private boolean is Flush Required return rules size 1 remaining Rules Are Null  changedResources isFlushRequired remainingRulesAreNull
private boolean remaining Rules Are Null for int i 0 i rules size 1 i I Scheduling Rule rule I Scheduling Rule rules get i if rule NULL SCHEDULING RULE return false return true  remainingRulesAreNull ISchedulingRule ISchedulingRule NULL_SCHEDULING_RULE
return true private void handle Aborted Flush Throwable t Team Plugin log I Status ERROR Policy bind Batching Lock 11 t NON NLS 1  handleAbortedFlush TeamPlugin IStatus BatchingLock
Team Plugin log I Status ERROR Policy bind Batching Lock 11 t NON NLS 1 private void add Rule I Scheduling Rule rule rules add rule  TeamPlugin IStatus BatchingLock addRule ISchedulingRule
rules add rule private I Scheduling Rule remove Rule return I Scheduling Rule rules remove rules size 1  ISchedulingRule removeRule ISchedulingRule
public boolean rule Contains I Resource resource for Iterator iter rules iterator iter has Next I Scheduling Rule rule I Scheduling Rule iter next if rule NULL SCHEDULING RULE rule contains resource return true return false  ruleContains IResource hasNext ISchedulingRule ISchedulingRule NULL_SCHEDULING_RULE
public interface I Flush Operation public void flush Thread Info info I Progress Monitor monitor throws Team Exception  IFlushOperation ThreadInfo IProgressMonitor TeamException
private Thread Info get Thread Info Thread this Thread Thread current Thread synchronized infos Thread Info info Thread Info infos get this Thread return info  ThreadInfo getThreadInfo thisThread currentThread ThreadInfo ThreadInfo thisThread
private Thread Info get Thread Info I Resource resource synchronized infos for Iterator iter infos values iterator iter has Next Thread Info info Thread Info iter next if info rule Contains resource return info return null  ThreadInfo getThreadInfo IResource hasNext ThreadInfo ThreadInfo ruleContains
public I Scheduling Rule acquire I Scheduling Rule resource Rule I Flush Operation operation I Progress Monitor monitor Thread Info info get Thread Info boolean added false synchronized infos if info null info new Thread Info operation Thread this Thread Thread current Thread infos put this Thread info added true if DEBUG System out println this Thread get Name acquired batching lock on resource Rule NON NLS 1 NON NLS 2 try return info push Rule resource Rule monitor catch Operation Canceled Exception e The operation was cancelled If this is the outermost acquire then remove the info that was just added if added synchronized infos infos remove Thread current Thread throw e  ISchedulingRule ISchedulingRule resourceRule IFlushOperation IProgressMonitor ThreadInfo getThreadInfo ThreadInfo thisThread currentThread thisThread thisThread getName resourceRule pushRule resourceRule OperationCanceledException currentThread
Release the lock held on any resources by this thread The provided rule must be identical to the rule returned by the corresponding acquire If the rule for the release is non null and all remaining rules held by the lock are null the the flush operation provided in the acquire method will be executed public void release I Scheduling Rule rule I Progress Monitor monitor throws Team Exception Thread Info info get Thread Info Assert is Not Null info Unmatched acquire release NON NLS 1 Assert is True info is Nested Unmatched acquire release NON NLS 1 info pop Rule rule monitor synchronized infos if info is Nested Thread this Thread Thread current Thread if DEBUG System out println this Thread get Name released batching lock NON NLS 1 NON NLS 2 infos remove this Thread  ISchedulingRule IProgressMonitor TeamException ThreadInfo getThreadInfo isNotNull isTrue isNested popRule isNested thisThread currentThread thisThread getName thisThread
public void resource Changed I Resource resource Thread Info info get Thread Info Assert is Not Null info Folder changed outside of resource lock NON NLS 1 info add Changed Resource resource  resourceChanged IResource ThreadInfo getThreadInfo isNotNull addChangedResource
Flush any changes accumulated by the lock so far public void flush I Progress Monitor monitor throws Team Exception Thread Info info get Thread Info Assert is Not Null info Flush requested outside of resource lock NON NLS 1 info flush monitor  IProgressMonitor TeamException ThreadInfo getThreadInfo isNotNull
public boolean is Within Active Operation Scope I Resource resource synchronized infos return get Thread Info resource null  isWithinActiveOperationScope IResource getThreadInfo

private boolean ignore Whitespace false public Content Comparator boolean ignore Whitespace this ignore Whitespace ignore Whitespace  ignoreWhitespace ContentComparator ignoreWhitespace ignoreWhitespace ignoreWhitespace
public boolean compare Object e1 Object e2 I Progress Monitor monitor Input Stream is1 null Input Stream is2 null try monitor begin Task null 100 is1 get Contents e1 Policy sub Monitor For monitor 50 is2 get Contents e2 Policy sub Monitor For monitor 50 return contents Equal is1 is2 should Ignore Whitespace catch Team Exception e Team Plugin log e return false finally try try if is1 null is1 close finally if is2 null is2 close catch IO Exception e Ignore monitor done  IProgressMonitor InputStream InputStream beginTask getContents subMonitorFor getContents subMonitorFor contentsEqual shouldIgnoreWhitespace TeamException TeamPlugin IOException
protected boolean should Ignore Whitespace return ignore Whitespace  shouldIgnoreWhitespace ignoreWhitespace
Returns code true code if both input streams byte contents is identical param input1 first input to contents compare param input2 second input to contents compare return code true code if content is equal private boolean contents Equal Input Stream is1 Input Stream is2 boolean ignore Whitespace try if is1 is2 return true if is1 null is2 null no byte contents return true if is1 null is2 null only one has contents return false while true int c1 is1 read while should Ignore Whitespace is Whitespace c1 c1 is1 read int c2 is2 read while should Ignore Whitespace is Whitespace c2 c2 is2 read if c1 1 c2 1 return true if c1 c2 break catch IO Exception ex finally try try if is1 null is1 close finally if is2 null is2 close catch IO Exception e Ignore return false  contentsEqual InputStream InputStream ignoreWhitespace shouldIgnoreWhitespace isWhitespace shouldIgnoreWhitespace isWhitespace IOException IOException
private boolean is Whitespace int c if c 1 return false return Character is Whitespace char c  isWhitespace isWhitespace
private Input Stream get Contents Object resource I Progress Monitor monitor throws Team Exception try if resource instanceof I File return new Buffered Input Stream I File resource get Contents else if resource instanceof I Resource Variant I Resource Variant remote I Resource Variant resource if remote is Container return new Buffered Input Stream remote get Storage monitor get Contents return null catch Core Exception e throw Team Exception as Team Exception e  InputStream getContents IProgressMonitor TeamException IFile BufferedInputStream IFile getContents IResourceVariant IResourceVariant IResourceVariant isContainer BufferedInputStream getStorage getContents CoreException TeamException asTeamException

Resource Variant Byte Store base Store remote Store public Descendant Resource Variant Byte Store Resource Variant Byte Store base Cache Resource Variant Byte Store remote Cache this base Store base Cache this remote Store remote Cache  ResourceVariantByteStore baseStore remoteStore DescendantResourceVariantByteStore ResourceVariantByteStore baseCache ResourceVariantByteStore remoteCache baseStore baseCache remoteStore remoteCache
This method will dispose the remote cache but not the base cache see org eclipse team core variants Resource Variant Byte Store dispose public void dispose remote Store dispose  ResourceVariantByteStore remoteStore
public byte get Bytes I Resource resource throws Team Exception byte remote Bytes remote Store get Bytes resource byte base Bytes base Store get Bytes resource if base Bytes null There is no base so use the remote bytes return remote Bytes if remote Bytes null if is Variant Known resource The remote is known to not exist TODO The check for NO REMOTE does not take into consideration the line of descent return remote Bytes else The remote was either never queried or was the same as the base In either of these cases the base bytes are used return base Bytes if is Descendant resource base Bytes remote Bytes Only use the remote bytes if they are later on the same line of descent as the base return remote Bytes Use the base sbytes since the remote bytes must be stale i e are not on the same line of descent return base Bytes  getBytes IResource TeamException remoteBytes remoteStore getBytes baseBytes baseStore getBytes baseBytes remoteBytes remoteBytes isVariantKnown NO_REMOTE remoteBytes baseBytes isDescendant baseBytes remoteBytes remoteBytes baseBytes
public boolean set Bytes I Resource resource byte bytes throws Team Exception byte base Bytes base Store get Bytes resource if base Bytes null equals base Bytes bytes Remove the existing bytes so the base will be used thus saving space return remote Store flush Bytes resource I Resource DEPTH ZERO else return remote Store set Bytes resource bytes  setBytes IResource TeamException baseBytes baseStore getBytes baseBytes baseBytes remoteStore flushBytes IResource DEPTH_ZERO remoteStore setBytes
see org eclipse team internal core subscribers caches Resource Variant Byte Store remove Bytes org eclipse core resources I Resource int public boolean flush Bytes I Resource resource int depth throws Team Exception return remote Store flush Bytes resource depth  ResourceVariantByteStore removeBytes IResource flushBytes IResource TeamException remoteStore flushBytes
Return code true code if the variant associated with the given local resource has been cached This method is useful for those cases when there are no bytes for a resource variant and the client wants to know if this means that the remote does exist i e this method returns code true code or the remote has not been fetched i e this method returns code false code param resource the local resource return code true code if the variant associated with the given local resource has been cached throws Team Exception  TeamException
This method indicates whether the remote bytes are a later revision or version on the same line of descent as the base A line of descent may be a branch or a fork depending on the terminology used by the versioing server If this method returns code false code then the remote bytes will be ignored by this tree param resource the local resource param base Bytes the base bytes for the local resoource param remote Bytes the remote bytes for the local resoource return whether the remote bytes are later on the same line of descent as the base bytes  baseBytes remoteBytes
see org eclipse team internal core subscribers caches Resource Variant Byte Store set Variant Does Not Exist org eclipse core resources I Resource public boolean delete Bytes I Resource resource throws Team Exception return remote Store delete Bytes resource  ResourceVariantByteStore setVariantDoesNotExist IResource deleteBytes IResource TeamException remoteStore deleteBytes
Return the base tree from which the remote is descendant return Returns the base tree protected Resource Variant Byte Store get Base Store return base Store  ResourceVariantByteStore getBaseStore baseStore
Return the remote tree which contains bytes only for the resource variants that differ from those in the base tree return Returns the remote tree protected Resource Variant Byte Store get Remote Store return remote Store  ResourceVariantByteStore getRemoteStore remoteStore
public I Resource members I Resource resource throws Team Exception I Resource remote Members get Remote Store members resource I Resource base Members get Base Store members resource Set members new Hash Set for int i 0 i remote Members length i members add remote Members i for int i 0 i base Members length i I Resource member base Members i Add the base only if the remote does not know about it i e hasn t marked it as deleted if is Variant Known member members add member return I Resource members to Array new I Resource members size  IResource IResource TeamException IResource remoteMembers getRemoteStore IResource baseMembers getBaseStore HashSet remoteMembers remoteMembers baseMembers IResource baseMembers isVariantKnown IResource toArray IResource
see org eclipse team core variants Resource Variant Byte Store run org eclipse core resources I Resource org eclipse core resources I Workspace Runnable org eclipse core runtime I Progress Monitor public void run I Resource root I Workspace Runnable runnable I Progress Monitor monitor throws Team Exception remote Store run root runnable monitor  ResourceVariantByteStore IResource IWorkspaceRunnable IProgressMonitor IResource IWorkspaceRunnable IProgressMonitor TeamException remoteStore

Sync Info result Subscriber Event I Resource resource int type int depth super resource type depth  SyncInfo SubscriberEvent IResource
public Subscriber Event I Resource resource int type int depth Sync Info result this resource type depth this result result  SubscriberEvent IResource SyncInfo
this result result public Sync Info get Result return result  SyncInfo getResult
protected String get Type String switch get Type case REMOVAL return REMOVAL NON NLS 1 case CHANGE return CHANGE NON NLS 1 case INITIALIZE return INITIALIZE NON NLS 1 default return INVALID NON NLS 1  getTypeString getType
private boolean preemtive public Runnable Event I Workspace Runnable runnable boolean preemtive super Resources Plugin get Workspace get Root RUNNABLE I Resource DEPTH ZERO this runnable runnable this preemtive preemtive  RunnableEvent IWorkspaceRunnable ResourcesPlugin getWorkspace getRoot IResource DEPTH_ZERO
this preemtive preemtive public void run I Progress Monitor monitor throws Core Exception runnable run monitor  IProgressMonitor CoreException
runnable run monitor public boolean is Preemtive return preemtive  isPreemtive
Create a handler This will initialize all resources for the subscriber associated with the set param set the subscriber set to feed changes into public Subscriber Event Handler Subscriber subscriber I Resource roots super Policy bind Subscriber Event Handler job Name subscriber get Name NON NLS 1 Policy bind Subscriber Event Handler errors subscriber get Name NON NLS 1 this roots roots this sync Set Input new Sync Set Input From Subscriber subscriber this  SubscriberEventHandler IResource SubscriberEventHandler jobName getName SubscriberEventHandler getName syncSetInput SyncSetInputFromSubscriber
Start the event handler by queuing events to prime the sync set input with the out of sync resources of the subscriber public synchronized void start Set the started flag to enable event queueing We are gaurenteed to be the first since this method is synchronized started true I Resource resources this roots if resources null resources sync Set Input get Subscriber roots reset resources Subscriber Event INITIALIZE initializing false  IResource syncSetInput getSubscriber SubscriberEvent
protected synchronized void queue Event Event event boolean front Only post events if the handler is started if started super queue Event event front  queueEvent queueEvent
Schedule the job or process the events now public void schedule Job job get Event Handler Job if job get State Job NONE if progress Group null job set System false job set Progress Group progress Group ticks else job set System initializing get Event Handler Job schedule  getEventHandlerJob getState progressGroup setSystem setProgressGroup progressGroup setSystem getEventHandlerJob
see org eclipse team internal core Background Event Handler job Done org eclipse core runtime jobs I Job Change Event protected void job Done I Job Change Event event super job Done event progress Group null  BackgroundEventHandler jobDone IJobChangeEvent jobDone IJobChangeEvent jobDone progressGroup
First reset the sync set input to clear the sync set run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception sync Set Input reset monitor  IWorkspaceRunnable IProgressMonitor CoreException syncSetInput
Initialize all resources for the subscriber associated with the set This will basically recalculate all synchronization information for the subscriber p This method is sycnrhonized with the queue Event method to ensure that the two events queued by this method are back to back public synchronized void reset I Resource roots if roots null roots sync Set Input get Subscriber roots else this roots roots First reset the sync set input to clear the sync set run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception sync Set Input reset monitor false keep ordering the same Then prime the set from the subscriber reset roots Subscriber Event CHANGE  queueEvent IResource syncSetInput getSubscriber IWorkspaceRunnable IProgressMonitor CoreException syncSetInput SubscriberEvent
Called by a client to indicate that a resource has changed and its synchronization state should be recalculated param resource the changed resource param depth the depth of the change calculation public void change I Resource resource int depth queue Event new Subscriber Event resource Subscriber Event CHANGE depth false  IResource queueEvent SubscriberEvent SubscriberEvent
Called by a client to indicate that a resource has been removed and should be removed The removal will propagate to the set param resource the resource that was removed public void remove I Resource resource queue Event new Subscriber Event resource Subscriber Event REMOVAL I Resource DEPTH INFINITE false  IResource queueEvent SubscriberEvent SubscriberEvent IResource DEPTH_INFINITE
Collect the calculated synchronization information for the given resource at the given depth The results are added to the provided list private void collect I Resource resource int depth I Progress Monitor monitor handle any preemtive events before continuing handle Preemptive Events monitor if resource get Type I Resource FILE depth I Resource DEPTH ZERO try I Resource members sync Set Input get Subscriber members resource for int i 0 i members length i collect members i depth I Resource DEPTH INFINITE I Resource DEPTH INFINITE I Resource DEPTH ZERO monitor catch Team Exception e handle Exception e resource I Team Status SYNC INFO SET ERROR Policy bind Subscriber Event Handler 8 resource get Full Path to String e get Message NON NLS 1 monitor sub Task Policy bind Subscriber Event Handler 2 resource get Full Path to String NON NLS 1 try Sync Info info sync Set Input get Subscriber get Sync Info resource resource is no longer under the subscriber control if info null result Cache add new Subscriber Event resource Subscriber Event REMOVAL I Resource DEPTH ZERO else result Cache add new Subscriber Event resource Subscriber Event CHANGE I Resource DEPTH ZERO info handle Pending Dispatch monitor catch Team Exception e handle Exception e resource I Team Status RESOURCE SYNC INFO ERROR Policy bind Subscriber Event Handler 9 resource get Full Path to String e get Message NON NLS 1 monitor worked 1  IResource IProgressMonitor handlePreemptiveEvents getType IResource IResource DEPTH_ZERO IResource syncSetInput getSubscriber IResource DEPTH_INFINITE IResource DEPTH_INFINITE IResource DEPTH_ZERO TeamException handleException ITeamStatus SYNC_INFO_SET_ERROR SubscriberEventHandler getFullPath toString getMessage subTask SubscriberEventHandler getFullPath toString SyncInfo syncSetInput getSubscriber getSyncInfo resultCache SubscriberEvent SubscriberEvent IResource DEPTH_ZERO resultCache SubscriberEvent SubscriberEvent IResource DEPTH_ZERO handlePendingDispatch TeamException handleException ITeamStatus RESOURCE_SYNC_INFO_ERROR SubscriberEventHandler getFullPath toString getMessage
private void handle Pending Dispatch I Progress Monitor monitor if is Ready For Dispatch false don t wait if queue is empty try dispatch Events Policy sub Monitor For monitor 5 catch Team Exception e handle Exception e null I Team Status SYNC INFO SET ERROR e get Message  handlePendingDispatch IProgressMonitor isReadyForDispatch dispatchEvents subMonitorFor TeamException handleException ITeamStatus SYNC_INFO_SET_ERROR getMessage
accordingly private void handle Exception Core Exception e I Resource resource int code String message handle Exception e sync Set Input handle Error new Team Status I Status ERROR Team Plugin ID code message e resource  handleException CoreException IResource handleException syncSetInput handleError TeamStatus IStatus TeamPlugin
I Progress Monitor collection Monitor new Sub Progress Monitor monitor I Progress Monitor UNKNOWN boolean dispatching false public void sub Task String name dispatch super sub Task name  IProgressMonitor collectionMonitor SubProgressMonitor IProgressMonitor subTask subTask
private void dispatch if dispatching return try dispatching true handle Preemptive Events this handle Pending Dispatch this finally dispatching false  handlePreemptiveEvents handlePendingDispatch
public void worked int work dispatch super worked work 
Sync Info Set collection Set new Sync Info Set public void add Sync Info info super add info result Cache add new Subscriber Event info get Local Subscriber Event CHANGE I Resource DEPTH ZERO info  SyncInfoSet collectionSet SyncInfoSet SyncInfo resultCache SubscriberEvent getLocal SubscriberEvent IResource DEPTH_ZERO
public void add Error I Team Status status super add Error status Team Plugin get Plugin get Log log status sync Set Input handle Error status  addError ITeamStatus addError TeamPlugin getPlugin getLog syncSetInput handleError
public void remove I Resource resource super remove resource result Cache add new Subscriber Event resource Subscriber Event REMOVAL I Resource DEPTH ZERO  IResource resultCache SubscriberEvent SubscriberEvent IResource DEPTH_ZERO
Called to initialize to calculate the synchronization information using the optimized subscriber method For subscribers that don t support the optimization all resources in the subscriber are manually re calculated param resources the resources to check param depth the depth param monitor return Event the change events throws Team Exception private void collect All I Resource resource int depth I Progress Monitor monitor monitor begin Task null I Progress Monitor UNKNOWN try Create a monitor that will handle preemptions and dispatch if required I Progress Monitor collection Monitor new Sub Progress Monitor monitor I Progress Monitor UNKNOWN boolean dispatching false public void sub Task String name dispatch super sub Task name private void dispatch if dispatching return try dispatching true handle Preemptive Events this handle Pending Dispatch this finally dispatching false public void worked int work dispatch super worked work Create a sync set that queues up resources and errors for dispatch Sync Info Set collection Set new Sync Info Set public void add Sync Info info super add info result Cache add new Subscriber Event info get Local Subscriber Event CHANGE I Resource DEPTH ZERO info public void add Error I Team Status status super add Error status Team Plugin get Plugin get Log log status sync Set Input handle Error status public void remove I Resource resource super remove resource result Cache add new Subscriber Event resource Subscriber Event REMOVAL I Resource DEPTH ZERO sync Set Input get Subscriber collect Out Of Sync new I Resource resource depth collection Set collection Monitor finally monitor done  TeamException collectAll IResource IProgressMonitor beginTask IProgressMonitor IProgressMonitor collectionMonitor SubProgressMonitor IProgressMonitor subTask subTask handlePreemptiveEvents handlePendingDispatch SyncInfoSet collectionSet SyncInfoSet SyncInfo resultCache SubscriberEvent getLocal SubscriberEvent IResource DEPTH_ZERO addError ITeamStatus addError TeamPlugin getPlugin getLog syncSetInput handleError IResource resultCache SubscriberEvent SubscriberEvent IResource DEPTH_ZERO syncSetInput getSubscriber collectOutOfSync IResource collectionSet collectionMonitor
Feed the given events to the set The appropriate method on the set is called for each event type param events private void dispatch Events Subscriber Event events I Progress Monitor monitor this will batch the following set changes until end Input is called try sync Set Input get Sync Set begin Input for int i 0 i events length i Subscriber Event event events i switch event get Type case Subscriber Event CHANGE sync Set Input collect event get Result monitor break case Subscriber Event REMOVAL sync Set Input get Sync Set remove event get Resource event get Depth break finally sync Set Input get Sync Set end Input monitor  dispatchEvents SubscriberEvent IProgressMonitor endInput syncSetInput getSyncSet beginInput SubscriberEvent getType SubscriberEvent syncSetInput getResult SubscriberEvent syncSetInput getSyncSet getResource getDepth syncSetInput getSyncSet endInput
Initialize all resources for the subscriber associated with the set This will basically recalculate all synchronization information for the subscriber param type can be Event CHANGE to recalculate all states or Event INITIALIZE to perform the optimized recalculation if supported by the subscriber private void reset I Resource roots int type I Resource resources roots for int i 0 i resources length i queue Event new Subscriber Event resources i type I Resource DEPTH INFINITE false  IResource IResource queueEvent SubscriberEvent IResource DEPTH_INFINITE
protected void process Event Event event I Progress Monitor monitor try Cancellation is dangerous because this will leave the sync info in a bad state Purposely not checking int type event get Type switch type case Runnable Event RUNNABLE execute Runnable event monitor break case Subscriber Event REMOVAL result Cache add event break case Subscriber Event CHANGE collect event get Resource event get Depth monitor break case Subscriber Event INITIALIZE monitor sub Task Policy bind Subscriber Event Handler 2 event get Resource get Full Path to String NON NLS 1 collect All event get Resource event get Depth Policy sub Monitor For monitor 64 break catch Operation Canceled Exception e the job has been cancelled Clear the queue and propogate the cancellation through the sets result Cache clear sync Set Input handle Error new Team Status I Status ERROR Team Plugin ID I Team Status SYNC INFO SET CANCELLATION Policy bind Subscriber Event Handler 12 e Resources Plugin get Workspace get Root NON NLS 1 catch Runtime Exception e handle the exception and keep processing handle Exception new Team Exception Policy bind Subscriber Event Handler 10 e event get Resource I Team Status SYNC INFO SET ERROR Policy bind Subscriber Event Handler 11 event get Resource get Full Path to String e get Message NON NLS 1 NON NLS 2  processEvent IProgressMonitor getType RunnableEvent executeRunnable SubscriberEvent resultCache SubscriberEvent getResource getDepth SubscriberEvent subTask SubscriberEventHandler getResource getFullPath toString collectAll getResource getDepth subMonitorFor OperationCanceledException resultCache syncSetInput handleError TeamStatus IStatus TeamPlugin ITeamStatus SYNC_INFO_SET_CANCELLATION SubscriberEventHandler ResourcesPlugin getWorkspace getRoot RuntimeException handleException TeamException SubscriberEventHandler getResource ITeamStatus SYNC_INFO_SET_ERROR SubscriberEventHandler getResource getFullPath toString getMessage
private void execute Runnable Event event I Progress Monitor monitor try Dispatch any queued results to clear pending output events dispatch Events Policy sub Monitor For monitor 1 catch Team Exception e handle Exception e event get Resource I Team Status SYNC INFO SET ERROR e get Message try Runnable Event event run Policy sub Monitor For monitor 1 catch Core Exception e handle Exception e event get Resource I Team Status SYNC INFO SET ERROR e get Message  executeRunnable IProgressMonitor dispatchEvents subMonitorFor TeamException handleException getResource ITeamStatus SYNC_INFO_SET_ERROR getMessage RunnableEvent subMonitorFor CoreException handleException getResource ITeamStatus SYNC_INFO_SET_ERROR getMessage
protected boolean do Dispatch Events I Progress Monitor monitor if result Cache is Empty dispatch Events Subscriber Event result Cache to Array new Subscriber Event result Cache size monitor result Cache clear return true return false  doDispatchEvents IProgressMonitor resultCache isEmpty dispatchEvents SubscriberEvent resultCache toArray SubscriberEvent resultCache resultCache
Queue up the given runnable in an event to be processed by this job param runnable the runnable to be run by the handler public void run I Workspace Runnable runnable boolean front On Queue queue Event new Runnable Event runnable front On Queue front On Queue  IWorkspaceRunnable frontOnQueue queueEvent RunnableEvent frontOnQueue frontOnQueue
Return the sync set input that was created by this event handler return public Sync Set Input From Subscriber get Sync Set Input return sync Set Input  SyncSetInputFromSubscriber getSyncSetInput syncSetInput
public void set Progress Group Hint I Progress Monitor progress Group int ticks this progress Group progress Group this ticks ticks  setProgressGroupHint IProgressMonitor progressGroup progressGroup progressGroup
return Returns the started protected boolean is Started return started  isStarted
private void handle Preemptive Events I Progress Monitor monitor Event event peek if event instanceof Runnable Event Runnable Event event is Preemtive execute Runnable next Element monitor  handlePreemptiveEvents IProgressMonitor RunnableEvent RunnableEvent isPreemtive executeRunnable nextElement

filtered Input new Sync Set Input From Sync Set subscriber Input get Sync Set get Event Handler filtered Input set Filter new Sync Info Filter public boolean select Sync Info info I Progress Monitor monitor return true  filteredInput SyncSetInputFromSyncSet subscriberInput getSyncSet getEventHandler filteredInput setFilter SyncInfoFilter SyncInfo IProgressMonitor
Create a collector that collects out of sync resources that are children of the given roots If the roots are code null code then all out of sync resources from the subscriber are collected An empty array of roots will cause no resources to be collected The code start code method must be called after creation to rpime the collector s sync sets param subscriber the Subscriber param roots the roots of the out of sync resources to be collected public Subscriber Sync Info Collector Subscriber subscriber I Resource roots this roots roots this subscriber subscriber Assert is Not Null subscriber this event Handler new Subscriber Event Handler subscriber roots this subscriber Input event Handler get Sync Set Input filtered Input new Sync Set Input From Sync Set subscriber Input get Sync Set get Event Handler filtered Input set Filter new Sync Info Filter public boolean select Sync Info info I Progress Monitor monitor return true Resources Plugin get Workspace add Resource Change Listener this I Resource Change Event POST CHANGE subscriber add Listener this  SubscriberSyncInfoCollector IResource isNotNull eventHandler SubscriberEventHandler subscriberInput eventHandler getSyncSetInput filteredInput SyncSetInputFromSyncSet subscriberInput getSyncSet getEventHandler filteredInput setFilter SyncInfoFilter SyncInfo IProgressMonitor ResourcesPlugin getWorkspace addResourceChangeListener IResourceChangeEvent POST_CHANGE addListener
public void set Progress Group I Progress Monitor monitor int ticks get Event Handler set Progress Group Hint monitor ticks  setProgressGroup IProgressMonitor getEventHandler setProgressGroupHint
Start the collector public void start event Handler start  eventHandler
This causes the calling thread to wait any background collection of out of sync resources to stop before returning param monitor a progress monitor public void wait For Collector I Progress Monitor monitor monitor worked 1 wait for the event handler to process changes while event Handler get Event Handler Job get State Job NONE monitor worked 1 try Thread sleep 10 catch Interrupted Exception e Policy check Canceled monitor monitor worked 1  waitForCollector IProgressMonitor eventHandler getEventHandlerJob getState InterruptedException checkCanceled
Clears this collector s sync info sets and causes them to be recreated from the associated code Subscriber code The reset will occur in the background If the caller wishes to wait for the reset to complete they should call link wait For Collector I Progress Monitor public void reset event Handler reset get Roots  waitForCollector IProgressMonitor eventHandler getRoots
Returns the code Subscriber code associated with this collector return the code Subscriber code associated with this collector public Subscriber get Subscriber return subscriber  getSubscriber
Disposes of the background job associated with this collector and deregisters all it s listeners This method must be called when the collector is no longer referenced and could be garbage collected public void dispose event Handler shutdown subscriber Input disconnect if filtered Input null filtered Input disconnect get Subscriber remove Listener this Resources Plugin get Workspace remove Resource Change Listener this  eventHandler subscriberInput filteredInput filteredInput getSubscriber removeListener ResourcesPlugin getWorkspace removeResourceChangeListener
Process the resource delta and posts all necessary events to the background event handler param delta the resource delta to analyse private void process Delta I Resource Delta delta I Resource roots I Resource resource delta get Resource int kind delta get Kind if resource get Type I Resource PROJECT Handle a deleted project if kind I Resource Delta REMOVED 0 event Handler remove resource return Handle a closed project if delta get Flags I Resource Delta OPEN 0 I Project resource is Open event Handler remove resource return Only interested in projects mapped to the provider if is Ancestor Of Root resource roots If the project has any entries in the sync set remove them if get Subscriber Sync Info Set has Members resource event Handler remove resource return boolean visit Children false if is Descendant Of Root resource roots visit Children true If the resource has changed type remove the old resource handle and add the new one if delta get Flags I Resource Delta TYPE 0 event Handler remove resource event Handler change resource I Resource DEPTH INFINITE Check the flags for changes the Sync Set cares about Notice we don t care about MARKERS currently int change Flags delta get Flags if change Flags I Resource Delta OPEN I Resource Delta CONTENT 0 event Handler change resource I Resource DEPTH ZERO Check the kind and deal with those we care about if delta get Kind I Resource Delta REMOVED I Resource Delta ADDED 0 event Handler change resource I Resource DEPTH ZERO Handle changed children if visit Children is Ancestor Of Root resource roots I Resource Delta affected Children delta get Affected Children I Resource Delta CHANGED I Resource Delta REMOVED I Resource Delta ADDED for int i 0 i affected Children length i process Delta affected Children i roots  processDelta IResourceDelta IResource IResource getResource getKind getType IResource IResourceDelta eventHandler getFlags IResourceDelta IProject isOpen eventHandler isAncestorOfRoot getSubscriberSyncInfoSet hasMembers eventHandler visitChildren isDescendantOfRoot visitChildren getFlags IResourceDelta eventHandler eventHandler IResource DEPTH_INFINITE SyncSet changeFlags getFlags changeFlags IResourceDelta IResourceDelta eventHandler IResource DEPTH_ZERO getKind IResourceDelta IResourceDelta eventHandler IResource DEPTH_ZERO visitChildren isAncestorOfRoot IResourceDelta affectedChildren getAffectedChildren IResourceDelta IResourceDelta IResourceDelta affectedChildren processDelta affectedChildren
private boolean is Ancestor Of Root I Resource parent I Resource roots Always traverse into projects in case a root was removed if parent get Type I Resource ROOT return true for int i 0 i roots length i I Resource resource roots i if parent get Full Path is Prefix Of resource get Full Path return true return false  isAncestorOfRoot IResource IResource getType IResource IResource getFullPath isPrefixOf getFullPath
private boolean is Descendant Of Root I Resource resource I Resource roots for int i 0 i roots length i I Resource root roots i if root get Full Path is Prefix Of resource get Full Path return true return false  isDescendantOfRoot IResource IResource IResource getFullPath isPrefixOf getFullPath
Return the roots that are being considered by this collector By default the collector is interested in the roots of its subscriber However the set can be reduced using link set Roots I Resource return public I Resource get Roots if roots null return get Subscriber roots else return roots  setRoots IResource IResource getRoots getSubscriber
roots of the subscriber and code false code otherwise public boolean is All Roots Included return roots null  isAllRootsIncluded
see org eclipse core resources I Resource Change Listener resource Changed org eclipse core resources I Resource Change Event public void resource Changed I Resource Change Event event process Delta event get Delta get Roots  IResourceChangeListener resourceChanged IResourceChangeEvent resourceChanged IResourceChangeEvent processDelta getDelta getRoots
public void subscriber Resource Changed I Subscriber Change Event deltas I Resource roots get Roots for int i 0 i deltas length i switch deltas i get Flags case I Subscriber Change Event SYNC CHANGED if is All Roots Included is Descendant Of Root deltas i get Resource roots event Handler change deltas i get Resource I Resource DEPTH ZERO break case I Subscriber Change Event ROOT REMOVED event Handler remove deltas i get Resource break case I Subscriber Change Event ROOT ADDED if is All Roots Included is Descendant Of Root deltas i get Resource roots event Handler change deltas i get Resource I Resource DEPTH INFINITE break  subscriberResourceChanged ISubscriberChangeEvent IResource getRoots getFlags ISubscriberChangeEvent SYNC_CHANGED isAllRootsIncluded isDescendantOfRoot getResource eventHandler getResource IResource DEPTH_ZERO ISubscriberChangeEvent ROOT_REMOVED eventHandler getResource ISubscriberChangeEvent ROOT_ADDED isAllRootsIncluded isDescendantOfRoot getResource eventHandler getResource IResource DEPTH_INFINITE
Return the event handler that performs the background processing for this collector The event handler also serves the purpose of serializing the modifications and adjustments to the collector s sync sets in order to ensure that the state of the sets is kept consistent return Returns the event Handler protected Subscriber Event Handler get Event Handler return event Handler  eventHandler SubscriberEventHandler getEventHandler eventHandler
Return the code Sync Info Set code that contains all the all the out of sync resources for the subscriber that are descendants of the roots of this collector The set will contain only those resources that are children of the roots of the collector unless the roots of the colletor has been set to code null code in which case all out of sync resources from the subscriber are collected return the subscriber sync info set public Sync Info Tree get Subscriber Sync Info Set return subscriber Input get Sync Set  SyncInfoSet SyncInfoTree getSubscriberSyncInfoSet subscriberInput getSyncSet
public Sync Info Tree get Sync Info Set return filtered Input get Sync Set  SyncInfoTree getSyncInfoSet filteredInput getSyncSet
Set the filter for this collector Only elements that match the filter will be in the out sync info set see get Sync Info Set param filter the sync info filter public void set Filter Sync Info Filter filter filtered Input set Filter filter filtered Input reset  getSyncInfoSet setFilter SyncInfoFilter filteredInput setFilter filteredInput
Return the filter that is filtering the output of this collector return a sync info filter public Sync Info Filter get Filter if filtered Input null return filtered Input get Filter return null  SyncInfoFilter getFilter filteredInput filteredInput getFilter
param roots2 public void set Roots I Resource roots this roots roots reset  setRoots IResource

protected Subscriber Event Handler handler public Subscriber Sync Info Set Subscriber Event Handler handler this handler handler  SubscriberEventHandler SubscriberSyncInfoSet SubscriberEventHandler
public void connect I Sync Info Set Change Listener listener I Progress Monitor monitor if handler null super connect listener monitor else connect listener  ISyncInfoSetChangeListener IProgressMonitor
handler run new I Workspace Runnable public void run I Progress Monitor monitor try begin Input monitor begin Task null 100 remove Sync Set Changed Listener listener add Sync Set Changed Listener listener listener sync Info Set Reset Subscriber Sync Info Set this Policy sub Monitor For monitor 95 finally end Input Policy sub Monitor For monitor 5 monitor done  IWorkspaceRunnable IProgressMonitor beginInput beginTask removeSyncSetChangedListener addSyncSetChangedListener syncInfoSetReset SubscriberSyncInfoSet subMonitorFor endInput subMonitorFor
Variation of connect that does not need progress and does not throw an exception Progress is provided by the background event handler and errors are passed through the chain to the view param listener public void connect final I Sync Info Set Change Listener listener if handler null Should only use this connect if the set has a handler throw new Unsupported Operation Exception else handler run new I Workspace Runnable public void run I Progress Monitor monitor try begin Input monitor begin Task null 100 remove Sync Set Changed Listener listener add Sync Set Changed Listener listener listener sync Info Set Reset Subscriber Sync Info Set this Policy sub Monitor For monitor 95 finally end Input Policy sub Monitor For monitor 5 monitor done true high priority  ISyncInfoSetChangeListener UnsupportedOperationException IWorkspaceRunnable IProgressMonitor beginInput beginTask removeSyncSetChangedListener addSyncSetChangedListener syncInfoSetReset SubscriberSyncInfoSet subMonitorFor endInput subMonitorFor

public static String parse Into Substrings String string String delimiter List result new Array List int start 0 int index string index Of delimiter String next while index 1 next string substring start index result add next start index 1 index string index Of delimiter start if start string length next NON NLS 1 else next string substring start result add next return String result to Array new String result size  parseIntoSubstrings ArrayList indexOf indexOf toArray
Method set Slot param sync Bytes param i param b return byte public static byte set Slot byte sync Bytes int slot byte new Bytes throws Team Exception int start start Of Slot sync Bytes slot if start 1 throw new Team Exception Policy bind Sync Byte Converter 1 new String sync Bytes NON NLS 1 int end start Of Slot sync Bytes slot 1 int total Length start 1 new Bytes length if end 1 total Length sync Bytes length end byte result new byte total Length System arraycopy sync Bytes 0 result 0 start 1 System arraycopy new Bytes 0 result start 1 new Bytes length if end 1 System arraycopy sync Bytes end result start 1 new Bytes length sync Bytes length end return result  setSlot syncBytes setSlot syncBytes newBytes TeamException startOfSlot syncBytes TeamException SyncByteConverter syncBytes startOfSlot syncBytes totalLength newBytes totalLength syncBytes totalLength syncBytes newBytes newBytes syncBytes newBytes syncBytes
Method start Of Slot returns the index of the slash that occurs before the given slot index The provided index should be 1 which assumes that slot zero occurs before the first slash param sync Bytes param i return int private static int start Of Slot byte sync Bytes int slot int count 0 for int j 0 j sync Bytes length j if sync Bytes j SEPARATOR BYTE count if count slot return j return 1  startOfSlot syncBytes startOfSlot syncBytes syncBytes syncBytes SEPARATOR_BYTE
Return the offset the the Nth delimeter from the given start index param bytes param delimiter param start param n return int private static int get Offset Of Delimeter byte bytes byte delimiter int start int n int count 0 for int i start i bytes length i if bytes i delimiter count if count n return i the Nth delimeter was not found return 1  getOffsetOfDelimeter
Method get Bytes For Slot param sync Bytes param SEPARATOR BYTE param i param b return byte public static byte get Slot byte bytes int index boolean include Rest Find the starting index byte delimiter SEPARATOR BYTE int start if index 0 make start 1 so that end determination will start at offset 0 start 1 else start get Offset Of Delimeter bytes delimiter 0 index if start 1 return null Find the ending index int end get Offset Of Delimeter bytes delimiter start 1 1 Calculate the length int length if end 1 include Rest length bytes length start 1 else length end start 1 byte result new byte length System arraycopy bytes start 1 result 0 length return result  getBytesForSlot syncBytes SEPARATOR_BYTE getSlot includeRest SEPARATOR_BYTE getOffsetOfDelimeter getOffsetOfDelimeter includeRest
public static byte to Bytes String slots String Buffer buffer new String Buffer for int i 0 i slots length i String string slots i buffer append string buffer append new String new byte Sync Byte Converter SEPARATOR BYTE return buffer to String get Bytes  toBytes StringBuffer StringBuffer SyncByteConverter SEPARATOR_BYTE toString getBytes

Count this sync kind Only the type of the sync info is stored param info the new info public void add Sync Info info update statistics Long count Long stats get new Integer info get Kind if count null count new Long 0 stats put new Integer info get Kind new Long count long Value 1  SyncInfo getKind getKind longValue
Remove this sync kind param info the info type to remove public void remove Sync Info info update stats Integer kind new Integer info get Kind Long count Long stats get kind if count null error condition shouldn t be removing if we haven t added yet programmer error calling remove before add else long new Count count int Value 1 if new Count 0 stats put kind new Long new Count else stats remove kind  SyncInfo getKind newCount intValue newCount newCount
Return the count of sync infos for the specified sync kind A mask can be used to acucmulate counts for specific directions or change types To return the number of outgoing changes long outgoing Changes stats count For Sync Info OUTGOING Sync Info DIRECTION MASK param kind the sync kind for which to return the count param mask the mask applied to the stored sync kind return the number of sync info types added for the specific kind public long count For int kind int mask if mask 0 Long count Long stats get new Integer kind return count null 0 count long Value else Iterator it stats key Set iterator long count 0 while it has Next Integer key Integer it next if key int Value mask kind count Long stats get key int Value return count  outgoingChanges countFor SyncInfo SyncInfo DIRECTION_MASK countFor longValue keySet hasNext intValue intValue
Clear the statistics counts All calls to count For will return 0 until new sync infos are added public void clear stats clear  countFor
For debugging public String to String String Buffer out new String Buffer Iterator it stats key Set iterator while it has Next Integer kind Integer it next out append Sync Info kind To String kind int Value Long stats get kind n NON NLS 1 NON NLS 2 return out to String  toString StringBuffer StringBuffer keySet hasNext SyncInfo kindToString intValue toString

private Set added Subtrees new Hash Set public Sync Info Tree Change Event Sync Info Set set super set  addedSubtrees HashSet SyncInfoTreeChangeEvent SyncInfoSet
public void removed Subtree Root I Resource root if added Subtrees contains root The root was added and removed which is a no op added Subtrees remove root else if is Descendant Of Added Root root Nothing needs to be done since no listeners ever knew about the root else check if the root is a child of an existing root in which case it need not be added Also remove any exisiting roots that are children of the new root for Iterator iter removed Subtrees iterator iter has Next I Resource element I Resource iter next check if the root is already in the list if root equals element return if is Parent root element the root invalidates the current element iter remove else if is Parent element root the root is a child of an existing element return removed Subtrees add root  removedSubtreeRoot IResource addedSubtrees addedSubtrees isDescendantOfAddedRoot removedSubtrees hasNext IResource IResource isParent isParent removedSubtrees
private boolean is Parent I Resource root I Resource element return root get Full Path is Prefix Of element get Full Path  isParent IResource IResource getFullPath isPrefixOf getFullPath
public void added Subtree Root I Resource parent if removed Subtrees contains parent The root was re added Just removing the removed Root may not give the proper event Since we can t be sure just force a reset reset else only add the root if their isn t a higher root in the list already if is Descendant Of Added Root parent added Subtrees add parent  addedSubtreeRoot IResource removedSubtrees removedRoot isDescendantOfAddedRoot addedSubtrees
private boolean is Descendant Of Added Root I Resource resource for Iterator iter added Subtrees iterator iter has Next I Resource root I Resource iter next if is Parent root resource There is a higher added root already in the list return true return false  isDescendantOfAddedRoot IResource addedSubtrees hasNext IResource IResource isParent
public I Resource get Added Subtree Roots return I Resource added Subtrees to Array new I Resource added Subtrees size  IResource getAddedSubtreeRoots IResource addedSubtrees toArray IResource addedSubtrees
public I Resource get Removed Subtree Roots return I Resource removed Subtrees to Array new I Resource removed Subtrees size  IResource getRemovedSubtreeRoots IResource removedSubtrees toArray IResource removedSubtrees
public boolean is Empty return super is Empty removed Subtrees is Empty added Subtrees is Empty  isEmpty isEmpty removedSubtrees isEmpty addedSubtrees isEmpty

public boolean select Sync Info info if there s no set the resource is included if is Empty return true return is Included info get Local  SyncInfo isEmpty isIncluded getLocal
private boolean is Included I Resource resource otherwise if their is a parent of the resource in the set it is included List result new Array List for int i 0 i resources length i I Resource set Resource resources i if is Parent set Resource resource return true return false  isIncluded IResource ArrayList IResource setResource isParent setResource
private boolean is Parent I Resource parent I Resource child return parent get Full Path is Prefix Of child get Full Path  isParent IResource IResource getFullPath isPrefixOf getFullPath
public I Resource get Roots Subscriber subscriber I Resource roots subscriber roots if is Empty return roots filter the roots by the selected working set Set result new Hash Set for int i 0 i roots length i I Resource resource roots i result add All Arrays as List get Intersection With Set subscriber resource return I Resource result to Array new I Resource result size  IResource getRoots IResource isEmpty HashSet IResource addAll asList getIntersectionWithSet IResource toArray IResource
private I Resource get Intersection With Set Subscriber subscriber I Resource resource List result new Array List for int i 0 i resources length i I Resource set Resource resources i if set Resource null if is Parent resource set Resource try if subscriber is Supervised set Resource result add set Resource catch Team Exception e Log the exception and add the resource to the list Team Plugin log e result add set Resource else if is Parent set Resource resource result add resource return I Resource result to Array new I Resource result size  IResource getIntersectionWithSet IResource ArrayList IResource setResource setResource isParent setResource isSupervised setResource setResource TeamException TeamPlugin setResource isParent setResource IResource toArray IResource
public void set Working Set I Resource resources this resources resources  setWorkingSet IResource
public I Resource get Working Set return this resources  IResource getWorkingSet
private boolean is Empty return resources null resources length 0  isEmpty

private List errors new Array List public Sync Set Changed Event Sync Info Set set super this set set  ArrayList SyncSetChangedEvent SyncInfoSet
public void added Sync Info info if removed Resources contains info get Local A removal followed by an addition is treated as a change removed Resources remove info get Local changed info else added Resources put info get Local info  SyncInfo removedResources getLocal removedResources getLocal addedResources getLocal
public void removed I Resource resource Sync Info info if changed Resources contains Key resource No use in reporting the change since it has subsequently been removed changed Resources remove resource else if added Resources contains Key resource An addition followed by a removal can be dropped added Resources remove resource return removed Resources add resource  IResource SyncInfo changedResources containsKey changedResources addedResources containsKey addedResources removedResources
public void changed Sync Info info I Resource resource info get Local if added Resources contains Key resource An addition followed by a change is an addition added Resources put resource info return changed Resources put resource info  SyncInfo IResource getLocal addedResources containsKey addedResources changedResources
public Sync Info get Added Resources return Sync Info added Resources values to Array new Sync Info added Resources size  SyncInfo getAddedResources SyncInfo addedResources toArray SyncInfo addedResources
public Sync Info get Changed Resources return Sync Info changed Resources values to Array new Sync Info changed Resources size  SyncInfo getChangedResources SyncInfo changedResources toArray SyncInfo changedResources
public I Resource get Removed Resources return I Resource removed Resources to Array new I Resource removed Resources size  IResource getRemovedResources IResource removedResources toArray IResource removedResources
public Sync Info Set get Set return set  SyncInfoSet getSet
public void reset reset true 
public boolean is Reset return reset  isReset
public boolean is Empty return changed Resources is Empty removed Resources is Empty added Resources is Empty errors is Empty  isEmpty changedResources isEmpty removedResources isEmpty addedResources isEmpty isEmpty
public void error Occurred I Team Status status errors add status  errorOccurred ITeamStatus
public I Team Status get Errors return I Team Status errors to Array new I Team Status errors size  ITeamStatus getErrors ITeamStatus toArray ITeamStatus

private Sync Info Filter filter new Fast Sync Info Filter public Sync Set Input Subscriber Event Handler handler sync Set new Subscriber Sync Info Set handler  SyncInfoFilter FastSyncInfoFilter SyncSetInput SubscriberEventHandler syncSet SubscriberSyncInfoSet
public Subscriber Sync Info Set get Sync Set return sync Set  SubscriberSyncInfoSet getSyncSet syncSet
This method is invoked from reset to get all the sync information from the input source 
protected abstract void fetch Input I Progress Monitor monitor throws Team Exception The input is no longer being used Disconnect it from its source public abstract void disconnect  fetchInput IProgressMonitor TeamException
Reset the input This will clear the current contents of the sync set and obtain the contents from the input source public void reset I Progress Monitor monitor throws Team Exception try sync Set begin Input monitor Policy monitor For monitor monitor begin Task null 100 sync Set clear fetch Input Policy sub Monitor For monitor 90 finally sync Set end Input Policy sub Monitor For monitor 10 monitor done  IProgressMonitor TeamException syncSet beginInput monitorFor beginTask syncSet fetchInput subMonitorFor syncSet endInput subMonitorFor
Collect the change in the provided sync info protected void collect Sync Info info I Progress Monitor monitor boolean is Out Of Sync filter select info monitor Sync Info old Info sync Set get Sync Info info get Local boolean was Out Of Sync old Info null if is Out Of Sync sync Set add info else if was Out Of Sync sync Set remove info get Local  SyncInfo IProgressMonitor isOutOfSync SyncInfo oldInfo syncSet getSyncInfo getLocal wasOutOfSync oldInfo isOutOfSync syncSet wasOutOfSync syncSet getLocal
protected void remove I Resource resource Sync Info old Info sync Set get Sync Info resource boolean was Out Of Sync old Info null if old Info null sync Set remove resource  IResource SyncInfo oldInfo syncSet getSyncInfo wasOutOfSync oldInfo oldInfo syncSet
public Sync Info Filter get Filter return filter  SyncInfoFilter getFilter
public void set Filter Sync Info Filter filter this filter filter  setFilter SyncInfoFilter

private Subscriber subscriber public Sync Set Input From Subscriber Subscriber subscriber Subscriber Event Handler handler super handler this subscriber subscriber  SyncSetInputFromSubscriber SubscriberEventHandler
public void disconnect 
public Subscriber get Subscriber return subscriber  getSubscriber
protected void fetch Input I Progress Monitor monitor throws Team Exception don t calculate changes The Subscriber Event Handler will fetch the input in a job and update this sync set when the changes are calculated  fetchInput IProgressMonitor TeamException SubscriberEventHandler
Handle an error that occurred while populating the receiver s set The code I Team Status code includes the resource for which the error occurred This error is propogated to any set listeners param status the error status public void handle Error I Team Status status get Sync Set add Error status  ITeamStatus handleError ITeamStatus getSyncSet addError

public Sync Set Input From Sync Set Subscriber Sync Info Set set Subscriber Event Handler handler super handler this input Sync Set set input Sync Set add Sync Set Changed Listener this  SyncSetInputFromSyncSet SubscriberSyncInfoSet SubscriberEventHandler inputSyncSet inputSyncSet addSyncSetChangedListener
public Sync Info Set get Input Sync Set return input Sync Set  SyncInfoSet getInputSyncSet inputSyncSet
public void disconnect if input Sync Set null return input Sync Set remove Sync Set Changed Listener this input Sync Set null  inputSyncSet inputSyncSet removeSyncSetChangedListener inputSyncSet
protected void fetch Input I Progress Monitor monitor if input Sync Set null return Sync Info infos input Sync Set get Sync Infos for int i 0 i infos length i collect infos i monitor  fetchInput IProgressMonitor inputSyncSet SyncInfo inputSyncSet getSyncInfos
public void sync Info Changed I Sync Info Set Change Event event I Progress Monitor monitor Sync Info Set sync Set get Sync Set try sync Set begin Input monitor begin Task null 105 sync Set Changed event get Changed Resources Policy sub Monitor For monitor 50 sync Set Changed event get Added Resources Policy sub Monitor For monitor 50 remove event get Removed Resources finally sync Set end Input Policy sub Monitor For monitor 5  syncInfoChanged ISyncInfoSetChangeEvent IProgressMonitor SyncInfoSet syncSet getSyncSet syncSet beginInput beginTask syncSetChanged getChangedResources subMonitorFor syncSetChanged getAddedResources subMonitorFor getRemovedResources syncSet endInput subMonitorFor
private void sync Set Changed Sync Info infos I Progress Monitor monitor for int i 0 i infos length i collect infos i monitor  syncSetChanged SyncInfo IProgressMonitor
private void remove I Resource resources for int i 0 i resources length i remove resources i  IResource
public void reset input Sync Set connect this  inputSyncSet
public void sync Info Set Reset Sync Info Set set I Progress Monitor monitor if input Sync Set null set remove Sync Set Changed Listener this else Sync Info Set sync Set get Sync Set try sync Set begin Input monitor begin Task null 100 sync Set clear fetch Input Policy sub Monitor For monitor 95 finally sync Set end Input Policy sub Monitor For monitor 5 monitor done  syncInfoSetReset SyncInfoSet IProgressMonitor inputSyncSet removeSyncSetChangedListener SyncInfoSet syncSet getSyncSet syncSet beginInput beginTask syncSet fetchInput subMonitorFor syncSet endInput subMonitorFor
public void sync Info Set Errors Sync Info Set set I Team Status errors I Progress Monitor monitor Subscriber Sync Info Set sync Set get Sync Set try sync Set begin Input for int i 0 i errors length i I Team Status status errors i sync Set add Error status finally sync Set end Input monitor  syncInfoSetErrors SyncInfoSet ITeamStatus IProgressMonitor SubscriberSyncInfoSet syncSet getSyncSet syncSet beginInput ITeamStatus syncSet addError syncSet endInput

static class Base Resource Variant Byte Store extends Resource Variant Byte Store private Three Way Subscriber subscriber public Base Resource Variant Byte Store Three Way Subscriber subscriber this subscriber subscriber  BaseResourceVariantByteStore ResourceVariantByteStore ThreeWaySubscriber BaseResourceVariantByteStore ThreeWaySubscriber
this subscriber subscriber public void dispose Nothing to do 
Nothing to do public byte get Bytes I Resource resource throws Team Exception return subscriber get Synchronizer get Base Bytes resource  getBytes IResource TeamException getSynchronizer getBaseBytes
return subscriber get Synchronizer get Base Bytes resource public boolean set Bytes I Resource resource byte bytes throws Team Exception Base bytes are set directly in the synchronizer return false  getSynchronizer getBaseBytes setBytes IResource TeamException
return false public boolean flush Bytes I Resource resource int depth throws Team Exception Base bytes are flushed directly in the synchronizer return false  flushBytes IResource TeamException
return false public boolean delete Bytes I Resource resource throws Team Exception Base bytes are deleted directly in the synchronizer return false  deleteBytes IResource TeamException
return false public I Resource members I Resource resource throws Team Exception return subscriber get Synchronizer members resource  IResource IResource TeamException getSynchronizer
Create a base resource variant tree that accesses the base bytes from a three way synchronizer param subscriber the three way subscriber public Three Way Base Tree Three Way Subscriber subscriber super new Base Resource Variant Byte Store subscriber this subscriber subscriber  ThreeWayBaseTree ThreeWaySubscriber BaseResourceVariantByteStore
see org eclipse team internal core subscribers caches Abstract Resource Variant Tree refresh org eclipse core resources I Resource int org eclipse core runtime I Progress Monitor public I Resource refresh I Resource resources int depth I Progress Monitor monitor throws Team Exception return new I Resource 0  AbstractResourceVariantTree IResource IProgressMonitor IResource IResource IProgressMonitor TeamException IResource
see org eclipse team internal core subscribers caches Abstract Resource Variant Tree fetch Members org eclipse team core synchronize I Resource Variant org eclipse core runtime I Progress Monitor protected I Resource Variant fetch Members I Resource Variant variant I Progress Monitor progress throws Team Exception Refresh not supported return new I Resource Variant 0  AbstractResourceVariantTree fetchMembers IResourceVariant IProgressMonitor IResourceVariant fetchMembers IResourceVariant IProgressMonitor TeamException IResourceVariant
see org eclipse team internal core subscribers caches Abstract Resource Variant Tree fetch Variant org eclipse core resources I Resource int org eclipse core runtime I Progress Monitor protected I Resource Variant fetch Variant I Resource resource int depth I Progress Monitor monitor throws Team Exception Refresh not supported return null  AbstractResourceVariantTree fetchVariant IResource IProgressMonitor IResourceVariant fetchVariant IResource IProgressMonitor TeamException
see org eclipse team internal core subscribers caches I Resource Variant Tree roots public I Resource roots return get Subscriber roots  IResourceVariantTree IResource getSubscriber
see org eclipse team internal core subscribers caches I Resource Variant Tree get Resource Variant org eclipse core resources I Resource public I Resource Variant get Resource Variant I Resource resource throws Team Exception return get Subscriber get Resource Variant resource get Byte Store get Bytes resource  IResourceVariantTree getResourceVariant IResource IResourceVariant getResourceVariant IResource TeamException getSubscriber getResourceVariant getByteStore getBytes
private Three Way Subscriber get Subscriber return subscriber  ThreeWaySubscriber getSubscriber

filtered Input new Sync Set Input From Sync Set working Set Input get Sync Set get Event Handler filtered Input set Filter new Sync Info Filter public boolean select Sync Info info I Progress Monitor monitor return true  filteredInput SyncSetInputFromSyncSet workingSetInput getSyncSet getEventHandler filteredInput setFilter SyncInfoFilter SyncInfo IProgressMonitor
Create a collector that collects out of sync resources that are children of the given roots If the roots are code null code then all out of sync resources from the subscriber are collected An empty array of roots will cause no resources to be collected The code start code method must be called after creation to rpime the collector s sync sets param subscriber the Subscriber param roots the roots of the out of sync resources to be collected public Working Set Filtered Sync Info Collector Subscriber Sync Info Collector collector I Resource roots this roots roots this event Handler collector get Event Handler TODO optimize and don t use working set if no roots are passed in working Set Input new Working Set Sync Set Input Subscriber Sync Info Set collector get Sync Info Set get Event Handler filtered Input new Sync Set Input From Sync Set working Set Input get Sync Set get Event Handler filtered Input set Filter new Sync Info Filter public boolean select Sync Info info I Progress Monitor monitor return true  WorkingSetFilteredSyncInfoCollector SubscriberSyncInfoCollector IResource eventHandler getEventHandler workingSetInput WorkingSetSyncSetInput SubscriberSyncInfoSet getSyncInfoSet getEventHandler filteredInput SyncSetInputFromSyncSet workingSetInput getSyncSet getEventHandler filteredInput setFilter SyncInfoFilter SyncInfo IProgressMonitor
Return the set that provides access to the out of sync resources for the collector s subscriber that are descendants of the roots for the collector are in the collector s working set and match the collectors filter see get Subscriber Sync Info Set see get Working Set Sync Info Set return a Sync Info Set containing out of sync resources public Sync Info Tree get Sync Info Tree return filtered Input get Sync Set  getSubscriberSyncInfoSet getWorkingSetSyncInfoSet SyncInfoSet SyncInfoTree getSyncInfoTree filteredInput getSyncSet
This causes the calling thread to wait any background collection of out of sync resources to stop before returning param monitor a progress monitor public void wait For Collector I Progress Monitor monitor monitor worked 1 wait for the event handler to process changes while event Handler get Event Handler Job get State Job NONE monitor worked 1 try Thread sleep 10 catch Interrupted Exception e Policy check Canceled monitor monitor worked 1  waitForCollector IProgressMonitor eventHandler getEventHandlerJob getState InterruptedException checkCanceled
Return the roots that are being considered by this collector By default the collector is interested in the roots of its subscriber However the set can be reduced using link set Roots I Resource return public I Resource get Roots return roots  setRoots IResource IResource getRoots
Clears this collector s sync info sets and causes them to be recreated from the associated code Subscriber code The reset will occur in the background If the caller wishes to wait for the reset to complete they should call link wait For Collector I Progress Monitor public void reset working Set Input reset  waitForCollector IProgressMonitor workingSetInput
Disposes of the background job associated with this collector and deregisters all it s listeners This method must be called when the collector is no longer referenced and could be garbage collected public void dispose working Set Input disconnect if filtered Input null filtered Input disconnect  workingSetInput filteredInput filteredInput
Return the event handler that performs the background processing for this collector The event handler also serves the purpose of serializing the modifications and adjustments to the collector s sync sets in order to ensure that the state of the sets is kept consistent return Returns the event Handler protected Subscriber Event Handler get Event Handler return event Handler  eventHandler SubscriberEventHandler getEventHandler eventHandler
Set the working set resources used to filter the output code Sync Info Set code see get Working Set Sync Info Set param resources the working set resources public void set Working Set I Resource resources working Set Input set Working Set resources working Set Input reset  SyncInfoSet getWorkingSetSyncInfoSet setWorkingSet IResource workingSetInput setWorkingSet workingSetInput
Get th working set resources used to filter the output sync info set return the working set resources public I Resource get Working Set return working Set Input get Working Set  IResource getWorkingSet workingSetInput getWorkingSet
Set the filter for this collector Only elements that match the filter will be in the out sync info set see get Sync Info Set param filter the sync info filter public void set Filter Sync Info Filter filter filtered Input set Filter filter filtered Input reset  getSyncInfoSet setFilter SyncInfoFilter filteredInput setFilter filteredInput
Return the filter that is filtering the output of this collector return a sync info filter public Sync Info Filter get Filter if filtered Input null return filtered Input get Filter return null  SyncInfoFilter getFilter filteredInput filteredInput getFilter
Return a code Sync Info Set code that contains the out of sync elements from the subsciber sync info set filtered by the working set resources but not the collector s code Sync Info Filter code see get Subscriber Sync Info Set return a code Sync Info Set code public Sync Info Set get Working Set Sync Info Set return working Set Input get Sync Set  SyncInfoSet SyncInfoFilter getSubscriberSyncInfoSet SyncInfoSet SyncInfoSet getWorkingSetSyncInfoSet workingSetInput getSyncSet
Run the given runnable in the event handler of the collector param runnable a runnable public void run I Workspace Runnable runnable event Handler run runnable true front of queue  IWorkspaceRunnable eventHandler

private Sync Info Working Set Filter working Set Filter new Sync Info Working Set Filter public Working Set Sync Set Input Subscriber Sync Info Set set Subscriber Event Handler handler super set handler set Filter working Set Filter  SyncInfoWorkingSetFilter workingSetFilter SyncInfoWorkingSetFilter WorkingSetSyncSetInput SubscriberSyncInfoSet SubscriberEventHandler setFilter workingSetFilter
public void set Working Set I Resource resources working Set Filter set Working Set resources  setWorkingSet IResource workingSetFilter setWorkingSet
public I Resource get Working Set return working Set Filter get Working Set  IResource getWorkingSet workingSetFilter getWorkingSet
public I Resource roots Subscriber subscriber return working Set Filter get Roots subscriber  IResource workingSetFilter getRoots

public static void set Provider Rule Factory I Project project I Resource Rule Factory factory if instance null if factory null factory default Factory instance set Rule Factory project factory  setProviderRuleFactory IProject IResourceRuleFactory defaultFactory setRuleFactory
public Team Hook Dispatcher instance this  TeamHookDispatcher
see org eclipse core resources team Team Hook validate Create Link org eclipse core resources I File int org eclipse core runtime I Path public I Status validate Create Link I File file int update Flags I Path location Repository Provider provider get Provider file if provider null return super validate Create Link file update Flags location else return provider validate Create Link file update Flags location  TeamHook validateCreateLink IFile IPath IStatus validateCreateLink IFile updateFlags IPath RepositoryProvider getProvider validateCreateLink updateFlags validateCreateLink updateFlags
see org eclipse core resources team Team Hook validate Create Link org eclipse core resources I Folder int org eclipse core runtime I Path public I Status validate Create Link I Folder folder int update Flags I Path location Repository Provider provider get Provider folder if provider null return super validate Create Link folder update Flags location else return provider validate Create Link folder update Flags location  TeamHook validateCreateLink IFolder IPath IStatus validateCreateLink IFolder updateFlags IPath RepositoryProvider getProvider validateCreateLink updateFlags validateCreateLink updateFlags
Method get Provider param folder return Repository Provider private Repository Provider get Provider I Resource resource return Repository Provider get Provider resource get Project  getProvider RepositoryProvider RepositoryProvider getProvider IResource RepositoryProvider getProvider getProject
public I Resource Rule Factory get Rule Factory I Project project if Repository Provider is Shared project Repository Provider provider get Provider project Provider can be null if the provider plugin is not available if provider null return provider get Rule Factory Use the default provided by the superclass return super get Rule Factory project  IResourceRuleFactory getRuleFactory IProject RepositoryProvider isShared RepositoryProvider getProvider getRuleFactory getRuleFactory

Constructs a plug in runtime class for the given plug in descriptor public Team Plugin I Plugin Descriptor plugin Descriptor super plugin Descriptor plugin this  TeamPlugin IPluginDescriptor pluginDescriptor pluginDescriptor
see Plugin startup public void startup throws Core Exception Policy localize org eclipse team internal core messages NON NLS 1 Team startup  CoreException
see Plugin shutdown public void shutdown Team shutdown Resource Variant Cache shutdown  ResourceVariantCache
Returns the Team plug in return the single instance of this plug in runtime class public static Team Plugin get Plugin return plugin  TeamPlugin getPlugin
Log the given exception alloing with the provided message and severity indicator public static void log int severity String message Throwable e plugin get Log log new Status severity ID 0 message e  getLog
Log the given Core Exception in a manner that will include the stacktrace of the exception in the log public static void log Core Exception e log e get Status get Severity e get Message e  CoreException CoreException getStatus getSeverity getMessage
Static helper methods for creating exceptions public static Team Exception wrap Exception Exception e return new Team Exception new Status I Status ERROR ID 0 e get Message null e get Message e NON NLS 1  TeamException wrapException TeamException IStatus getMessage getMessage
public static Team Exception wrap Exception Core Exception e I Status status e get Status return new Team Exception new Status status get Severity ID status get Code status get Message e  TeamException wrapException CoreException IStatus getStatus TeamException getSeverity getCode getMessage
public static String get Charset String name Input Stream stream throws IO Exception I Content Description description get Content Description name stream return description null null description get Charset  getCharset InputStream IOException IContentDescription getContentDescription getCharset
public static I Content Description get Content Description String name Input Stream stream throws IO Exception tries to obtain a description for this file contents I Content Type Manager content Type Manager Platform get Content Type Manager try return content Type Manager get Description For stream name I Content Description ALL finally if stream null try stream close catch IO Exception e Ignore exceptions on close  IContentDescription getContentDescription InputStream IOException IContentTypeManager contentTypeManager getContentTypeManager contentTypeManager getDescriptionFor IContentDescription IOException

public class Configure Project Action extends Team Action implements I Workbench Window Action Delegate private static class Resize Wizard Dialog extends Wizard Dialog public Resize Wizard Dialog Shell parent Shell I Wizard new Wizard super parent Shell new Wizard set Shell Style get Shell Style SWT RESIZE  ConfigureProjectAction TeamAction IWorkbenchWindowActionDelegate ResizeWizardDialog WizardDialog ResizeWizardDialog parentShell IWizard newWizard parentShell newWizard setShellStyle getShellStyle
run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I Project project get Selected Projects 0 Configure Project Wizard wizard new Configure Project Wizard wizard init null project Wizard Dialog dialog new Resize Wizard Dialog get Shell wizard dialog dialog open catch Exception e throw new Invocation Target Exception e  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException IProject getSelectedProjects ConfigureProjectWizard ConfigureProjectWizard WizardDialog ResizeWizardDialog getShell InvocationTargetException
public void run I Action action run new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I Project project get Selected Projects 0 Configure Project Wizard wizard new Configure Project Wizard wizard init null project Wizard Dialog dialog new Resize Wizard Dialog get Shell wizard dialog dialog open catch Exception e throw new Invocation Target Exception e Policy bind Configure Project Action configure Project PROGRESS BUSYCURSOR NON NLS 1  IAction IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException IProject getSelectedProjects ConfigureProjectWizard ConfigureProjectWizard WizardDialog ResizeWizardDialog getShell InvocationTargetException ConfigureProjectAction configureProject PROGRESS_BUSYCURSOR
see Team Action is Enabled protected boolean is Enabled I Project selected Projects get Selected Projects if selected Projects length 1 return false if selected Projects 0 is Accessible return false if Repository Provider is Shared selected Projects 0 return true return false  TeamAction isEnabled isEnabled IProject selectedProjects getSelectedProjects selectedProjects selectedProjects isAccessible RepositoryProvider isShared selectedProjects
see org eclipse ui I Workbench Window Action Delegate init org eclipse ui I Workbench Window public void init I Workbench Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow

Run the given runnable in the context of the receiver By default the progress is provided by the active workbench windows but subclasses may override this to provide progress in some other way Progress Monitor or job 
Get a shell that can be used to prompt the user return a shell 

private I Action goto Action public Job Runnable Context String job Name this job Name null null false null null  IAction gotoAction JobRunnableContext jobName jobName
public Job Runnable Context String job Name URL icon I Action action boolean keep I Job Change Listener listener I Workbench Site site this job Name job Name this listener listener this site site By default team actions are user initiated this is User true this goto Action action this icon icon this keep keep  JobRunnableContext jobName IAction IJobChangeListener IWorkbenchSite jobName jobName isUser gotoAction
public void run I Runnable With Progress runnable Job job if scheduling Rule null postpone Build job get Basic Job runnable else job get Workspace Job runnable if scheduling Rule null job set Rule scheduling Rule if listener null job add Job Change Listener listener job set User is User configure Job job Utils schedule job site  IRunnableWithProgress schedulingRule postponeBuild getBasicJob getWorkspaceJob schedulingRule setRule schedulingRule addJobChangeListener setUser isUser configureJob
private void configure Job Job job if keep job set Property I Progress Constants KEEP PROPERTY Boolean TRUE if goto Action null job set Property I Progress Constants ACTION PROPERTY goto Action if icon null job set Property I Progress Constants ICON PROPERTY icon  configureJob setProperty IProgressConstants KEEP_PROPERTY gotoAction setProperty IProgressConstants ACTION_PROPERTY gotoAction setProperty IProgressConstants ICON_PROPERTY
Display get Default sync Exec new Runnable public void run new Shell 0 Utils get Shell site  getDefault syncExec newShell getShell
public Shell get Shell final Shell new Shell new Shell null Display get Default sync Exec new Runnable public void run new Shell 0 Utils get Shell site return new Shell 0  getShell newShell getDefault syncExec newShell getShell newShell
Returns whether the auto build will be postponed while this context is executing a runnable return whether the auto build will be postponed while this context is executing a runnable public boolean is Postpone Build return postpone Build  isPostponeBuild postponeBuild
Set whether the auto build will be postponed while this context is executing a runnable param postpone Build whether to postpone the auto build public void set Postpone Build boolean postpone Build this postpone Build postpone Build  postponeBuild setPostponeBuild postponeBuild postponeBuild postponeBuild
Return the scheduling rule that will be obtained before the context executes a runnable or code null code if no scheduling rule is to be onbtained return the scheduling Rule to be obtained or code null code public I Scheduling Rule get Scheduling Rule return scheduling Rule  schedulingRule ISchedulingRule getSchedulingRule schedulingRule
Return whether this job context is user initiated param boolean code true code if the job is a result of a user initiated actions and code false code otherwise public boolean is User return is User  isUser isUser
Set wheter the job is user initiated By default the job created by this runnable context is a user job param is User code true code if the job is a result of a user initiated actions and code false code otherwise public void set User boolean is User this is User is User  isUser setUser isUser isUser isUser
Set the scheduling rule that will be obtained before the context executes a runnable or code null code if no scheduling rule is to be onbtained param scheduling Rule The scheduling Rule to be obtained or code null code public void set Scheduling Rule I Scheduling Rule scheduling Rule this scheduling Rule scheduling Rule  schedulingRule schedulingRule setSchedulingRule ISchedulingRule schedulingRule schedulingRule schedulingRule
private I Status run I Runnable With Progress runnable I Progress Monitor monitor try runnable run monitor catch Invocation Target Exception e return Team Exception as Team Exception e get Status catch Interrupted Exception e return Status OK STATUS return Status OK STATUS  IStatus IRunnableWithProgress IProgressMonitor InvocationTargetException TeamException asTeamException getStatus InterruptedException OK_STATUS OK_STATUS
private Job get Basic Job final I Runnable With Progress runnable return new Job job Name public I Status run I Progress Monitor monitor return Job Runnable Context this run runnable monitor  getBasicJob IRunnableWithProgress jobName IStatus IProgressMonitor JobRunnableContext
private Job get Basic Job final I Runnable With Progress runnable return new Job job Name public I Status run I Progress Monitor monitor return Job Runnable Context this run runnable monitor  getBasicJob IRunnableWithProgress jobName IStatus IProgressMonitor JobRunnableContext
private Job get Workspace Job final I Runnable With Progress runnable return new Workspace Job job Name public I Status run In Workspace I Progress Monitor monitor throws Core Exception return Job Runnable Context this run runnable monitor  getWorkspaceJob IRunnableWithProgress WorkspaceJob jobName IStatus runInWorkspace IProgressMonitor CoreException JobRunnableContext
private Job get Workspace Job final I Runnable With Progress runnable return new Workspace Job job Name public I Status run In Workspace I Progress Monitor monitor throws Core Exception return Job Runnable Context this run runnable monitor  getWorkspaceJob IRunnableWithProgress WorkspaceJob jobName IStatus runInWorkspace IProgressMonitor CoreException JobRunnableContext

private boolean postpone Build public Progress Dialog Runnable Context Shell shell this shell shell  postponeBuild ProgressDialogRunnableContext
Returns whether the auto build will be postponed while this context is executing a runnable return whether the auto build will be postponed while this context is executing a runnable public boolean is Postpone Build return postpone Build  isPostponeBuild postponeBuild
Set whether the auto build will be postponed while this context is executing a runnable param postpone Build whether to postpone the auto build public void set Postpone Build boolean postpone Build this postpone Build postpone Build  postponeBuild setPostponeBuild postponeBuild postponeBuild postponeBuild
Return the scheduling rule that will be obtained before the context executes a runnable or code null code if no scheduling rule is to be onbtained return the scheduling Rule to be obtained or code null code public I Scheduling Rule get Scheduling Rule return scheduling Rule  schedulingRule ISchedulingRule getSchedulingRule schedulingRule
Set the scheduling rule that will be obtained before the context executes a runnable or code null code if no scheduling rule is to be onbtained param scheduling Rule The scheduling Rule to be obtained or code null code public void set Scheduling Rule I Scheduling Rule scheduling Rule this scheduling Rule scheduling Rule  schedulingRule schedulingRule setSchedulingRule ISchedulingRule schedulingRule schedulingRule schedulingRule
see org eclipse team internal ccvs ui operations CVS Runnable Context get Shell public Shell get Shell return shell  CVSRunnableContext getShell getShell
Set the runnable context that is used to execute the runnable By default the workbench s progress service is used by clients can provide their own param runnable Context the runnable contentx used to execute runnables public void set Runnable Context I Runnable Context runnable Context this runnable Context runnable Context  runnableContext setRunnableContext IRunnableContext runnableContext runnableContext runnableContext
see org eclipse team internal ui actions I Team Runnable Context run org eclipse jface operation I Runnable With Progress public void run I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception get Runnable Context run true fork true cancelable wrap Runnable runnable  ITeamRunnableContext IRunnableWithProgress IRunnableWithProgress InvocationTargetException InterruptedException getRunnableContext wrapRunnable
return new I Runnable Context public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception I Progress Service manager PlatformUI get Workbench get Progress Service manager busy Cursor While runnable  IRunnableContext IRunnableWithProgress InvocationTargetException InterruptedException IProgressService getWorkbench getProgressService busyCursorWhile
private I Runnable Context get Runnable Context if runnable Context null return new I Runnable Context public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception I Progress Service manager PlatformUI get Workbench get Progress Service manager busy Cursor While runnable return runnable Context  IRunnableContext getRunnableContext runnableContext IRunnableContext IRunnableWithProgress InvocationTargetException InterruptedException IProgressService getWorkbench getProgressService busyCursorWhile runnableContext
Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor pm throws Core Exception try runnable run pm catch Invocation Target Exception e exception 0 e catch Interrupted Exception e exception 0 e  ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException InvocationTargetException InterruptedException
return new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try if scheduling Rule null postpone Build runnable run monitor else final Exception exception new Exception null Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor pm throws Core Exception try runnable run pm catch Invocation Target Exception e exception 0 e catch Interrupted Exception e exception 0 e scheduling Rule 0 allow updates monitor if exception 0 null if exception 0 instanceof Invocation Target Exception throw Invocation Target Exception exception 0 else if exception 0 instanceof Interrupted Exception throw Interrupted Exception exception 0 catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException schedulingRule postponeBuild ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException InvocationTargetException InterruptedException schedulingRule InvocationTargetException InvocationTargetException InterruptedException InterruptedException CoreException InvocationTargetException
private I Runnable With Progress wrap Runnable final I Runnable With Progress runnable return new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try if scheduling Rule null postpone Build runnable run monitor else final Exception exception new Exception null Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor pm throws Core Exception try runnable run pm catch Invocation Target Exception e exception 0 e catch Interrupted Exception e exception 0 e scheduling Rule 0 allow updates monitor if exception 0 null if exception 0 instanceof Invocation Target Exception throw Invocation Target Exception exception 0 else if exception 0 instanceof Interrupted Exception throw Interrupted Exception exception 0 catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress wrapRunnable IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException schedulingRule postponeBuild ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException InvocationTargetException InterruptedException schedulingRule InvocationTargetException InvocationTargetException InterruptedException InterruptedException CoreException InvocationTargetException

Creates an array of the given class type containing all the objects in the selection that adapt to the given class param selection param c return public static Object get Selected Adaptables I Selection selection Class c Array List result null if selection is Empty result new Array List Iterator elements I Structured Selection selection iterator while elements has Next Object adapter get Adapter elements next c if c is Instance adapter result add adapter if result null result is Empty return result to Array Object Array new Instance c result size return Object Array new Instance c 0  getSelectedAdaptables ISelection ArrayList isEmpty ArrayList IStructuredSelection hasNext getAdapter isInstance isEmpty toArray newInstance newInstance
Find the object associated with the given object when it is adapted to the provided class Null is returned if the given object does not adapt to the given class param selection param c return Object public static Object get Adapter Object adaptable Class c if c is Instance adaptable return adaptable if adaptable instanceof I Adaptable I Adaptable a I Adaptable adaptable Object adapter a get Adapter c if c is Instance adapter return adapter return null  getAdapter isInstance IAdaptable IAdaptable IAdaptable getAdapter isInstance
Returns the selected projects return the selected projects protected I Project get Selected Projects I Resource selected Resources get Selected Resources if selected Resources length 0 return new I Project 0 Array List projects new Array List for int i 0 i selected Resources length i I Resource resource selected Resources i if resource get Type I Resource PROJECT projects add resource return I Project projects to Array new I Project projects size  IProject getSelectedProjects IResource selectedResources getSelectedResources selectedResources IProject ArrayList ArrayList selectedResources IResource selectedResources getType IResource IProject toArray IProject
Returns an array of the given class type c that contains all instances of c that are either contained in the selection or are adapted from objects contained in the selection param c return protected Object get Selected Resources Class c return get Selected Adaptables selection c  getSelectedResources getSelectedAdaptables
Returns the selected resources return the selected resources protected I Resource get Selected Resources return I Resource get Selected Resources I Resource class  IResource getSelectedResources IResource getSelectedResources IResource
Convenience method for getting the current shell return the shell protected Shell get Shell if shell null return shell else I Workbench workbench TeamUI Plugin get Plugin get Workbench if workbench null return null I Workbench Window window workbench get Active Workbench Window if window null return null return window get Shell  getShell IWorkbench TeamUIPlugin getPlugin getWorkbench IWorkbenchWindow getActiveWorkbenchWindow getShell
Busy Indicator show While Display get Current new Runnable public void run try runnable run new Null Progress Monitor catch Invocation Target Exception e exceptions 0 e catch Interrupted Exception e exceptions 0 null  BusyIndicator showWhile getCurrent NullProgressMonitor InvocationTargetException InterruptedException
Convenience method for running an operation with progress and error feedback param runnable the runnable which executes the operation param problem Message the message to display in the case of errors param progress Kind one of PROGRESS BUSYCURSOR or PROGRESS DIALOG final protected void run final I Runnable With Progress runnable final String problem Message int progress Kind final Exception exceptions new Exception null switch progress Kind case PROGRESS BUSYCURSOR Busy Indicator show While Display get Current new Runnable public void run try runnable run new Null Progress Monitor catch Invocation Target Exception e exceptions 0 e catch Interrupted Exception e exceptions 0 null break default case PROGRESS DIALOG try new Progress Monitor Dialog get Shell run true true runnable catch Invocation Target Exception e exceptions 0 e catch Interrupted Exception e exceptions 0 null break if exceptions 0 null handle exceptions 0 null problem Message  problemMessage progressKind PROGRESS_BUSYCURSOR PROGRESS_DIALOG IRunnableWithProgress problemMessage progressKind progressKind PROGRESS_BUSYCURSOR BusyIndicator showWhile getCurrent NullProgressMonitor InvocationTargetException InterruptedException PROGRESS_DIALOG ProgressMonitorDialog getShell InvocationTargetException InterruptedException problemMessage
public void selection Changed I Action action I Selection selection if selection instanceof I Structured Selection this selection I Structured Selection selection if action null set Action Enablement action  selectionChanged IAction ISelection IStructuredSelection IStructuredSelection setActionEnablement
Method invoked from code selection Changed I Action I Selection code to set the enablement status of the action The instance variable code selection code will contain the latest selection so the methods code get Selected Resources code and code get Selected Projects code will provide the proper objects This method can be overridden by subclasses but should not be invoked by them protected void set Action Enablement I Action action try action set Enabled is Enabled catch Team Exception e if e get Status get Code I Resource Status OUT OF SYNC LOCAL Enable the action to allow the user to discover the problem action set Enabled true else action set Enabled false We should not open a dialog when determining menu enablements so log it instead Team Plugin log e  selectionChanged IAction ISelection getSelectedResources getSelectedProjects setActionEnablement IAction setEnabled isEnabled TeamException getStatus getCode IResourceStatus OUT_OF_SYNC_LOCAL setEnabled setEnabled TeamPlugin
public void set Active Part I Action action I Workbench Part target Part if target Part null this shell target Part get Site get Shell this target Part target Part  setActivePart IAction IWorkbenchPart targetPart targetPart targetPart getSite getShell targetPart targetPart
Shows the given errors to the user param status the status containing the error param title the title of the error dialog param message the message for the error dialog param shell the shell to open the error dialog in protected void handle Exception exception String title String message Utils handle Error get Shell exception title message  handleError getShell
Concrete action enablement code Subclasses must implement return whether the action is enabled throws Team Exception if an error occurs during enablement detection  TeamException
Convenience method that maps the selected resources to their providers The returned Hashtable has keys which are I Team Providers and values which are Lists of I Resources that are shared with that provider return a hashtable mapping providers to their selected resources protected Hashtable get Provider Mapping return get Provider Mapping get Selected Resources  ITeamProviders IResources getProviderMapping getProviderMapping getSelectedResources
Convenience method that maps the given resources to their providers The returned Hashtable has keys which are I Team Providers and values which are Lists of I Resources that are shared with that provider return a hashtable mapping providers to their resources protected Hashtable get Provider Mapping I Resource resources Hashtable result new Hashtable for int i 0 i resources length i Repository Provider provider Repository Provider get Provider resources i get Project List list List result get provider if list null list new Array List result put provider list list add resources i return result  ITeamProviders IResources getProviderMapping IResource RepositoryProvider RepositoryProvider getProvider getProject ArrayList
return I Workbench Part protected I Workbench Part get Target Part return target Part  IWorkbenchPart IWorkbenchPart getTargetPart targetPart
Return the path that was active when the menu item was selected return I Workbench Page protected I Workbench Page get Target Page if get Target Part null return TeamUI Plugin get Active Page return get Target Part get Site get Page  IWorkbenchPage IWorkbenchPage getTargetPage getTargetPart TeamUIPlugin getActivePage getTargetPart getSite getPage
Show the view with the given ID in the perspective from which the action was executed Returns null if the view is not registered param view Id return I View Part protected I View Part show View String view Id try return get Target Page show View view Id catch Part Init Exception pe return null  viewId IViewPart IViewPart showView viewId getTargetPage showView viewId PartInitException
see org eclipse ui I View Action Delegate init org eclipse ui I View Part public void init I View Part view target Part view  IViewActionDelegate IViewPart IViewPart targetPart

Creates a details pane dialog Note that the dialog will have no visual representation no widgets until it is told to open param parent Shell the shell under which to create this dialog param dialog Title the title to use for this dialog param message the message to show in this dialog param status the error to show to the user param display Mask the mask to use to filter the displaying of child items as per code I Status matches code see org eclipse core runtime I Status matches public Details Dialog Shell parent Shell String dialog Title super parent Shell this title dialog Title set Shell Style SWT DIALOG TRIM SWT RESIZE SWT APPLICATION MODAL  parentShell dialogTitle displayMask IStatus IStatus DetailsDialog parentShell dialogTitle parentShell dialogTitle setShellStyle DIALOG_TRIM APPLICATION_MODAL
protected void button Pressed int id if id I Dialog Constants DETAILS ID was the details button pressed toggle Details Area else super button Pressed id  buttonPressed IDialogConstants DETAILS_ID toggleDetailsArea buttonPressed
Method declared in Window protected void configure Shell Shell shell super configure Shell shell shell set Text title  configureShell configureShell setText
protected void create Buttons For Button Bar Composite parent create OK and Details buttons if include Ok Button ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true if include Cancel Button create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false if include Details Button details Button create Button parent I Dialog Constants DETAILS ID get Details Button Label Show false update Enablements  createButtonsForButtonBar includeOkButton okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL includeCancelButton createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL includeDetailsButton detailsButton createButton IDialogConstants DETAILS_ID getDetailsButtonLabelShow updateEnablements
protected String get Details Button Label Show return I Dialog Constants SHOW DETAILS LABEL  getDetailsButtonLabelShow IDialogConstants SHOW_DETAILS_LABEL
protected String get Details Button Label Hide return I Dialog Constants HIDE DETAILS LABEL  getDetailsButtonLabelHide IDialogConstants HIDE_DETAILS_LABEL
final protected Control create Dialog Area Composite parent create composite Composite composite Composite super create Dialog Area parent create image String key get Image Key Image image null if key null image J Face Resources get Image Registry get key if image null create a composite to split the dialog area in two Composite top new Composite composite SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout vertical Spacing 0 layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING layout num Columns 2 top set Layout layout top set Layout Data new Grid Data Grid Data FILL BOTH add the image to the left of the composite Label label new Label top 0 image set Background label get Background label set Image image label set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN CENTER Grid Data VERTICAL ALIGN BEGINNING add a composite to the right to contain the custom components Composite right new Composite top SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING right set Layout layout right set Layout Data new Grid Data Grid Data FILL BOTH create Main Dialog Area right else create Main Dialog Area composite if include Error Message error Message Label new Label composite SWT NONE error Message Label set Layout Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL error Message Label set Foreground get Shell get Display get System Color SWT COLOR RED Dialog apply Dialog Font parent return composite  createDialogArea createDialogArea getImageKey JFaceResources getImageRegistry GridLayout GridLayout marginHeight marginWidth verticalSpacing horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING numColumns setLayout setLayoutData GridData GridData FILL_BOTH setBackground getBackground setImage setLayoutData GridData GridData HORIZONTAL_ALIGN_CENTER GridData VERTICAL_ALIGN_BEGINNING GridLayout marginHeight marginWidth verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING setLayout setLayoutData GridData GridData FILL_BOTH createMainDialogArea createMainDialogArea includeErrorMessage errorMessageLabel errorMessageLabel setLayoutData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL errorMessageLabel setForeground getShell getDisplay getSystemColor COLOR_RED applyDialogFont
Creates the dialog s top composite param parent the parent composite 
Create this dialog s drop down list component param parent the parent composite return the drop down list component 
Toggles the unfolding of the details area This is triggered by the user pressing the details button private void toggle Details Area Point window Size get Shell get Size Point old Size get Contents compute Size SWT DEFAULT SWT DEFAULT if details Created details Composite dispose details Created false details Button set Text get Details Button Label Show else details Composite create Drop Down Dialog Area Composite get Contents details Created true details Button set Text get Details Button Label Hide Dialog apply Dialog Font get Contents Point new Size get Contents compute Size SWT DEFAULT SWT DEFAULT get Shell set Size new Point window Size x window Size y new Size y old Size y  toggleDetailsArea windowSize getShell getSize oldSize getContents computeSize detailsCreated detailsComposite detailsCreated detailsButton setText getDetailsButtonLabelShow detailsComposite createDropDownDialogArea getContents detailsCreated detailsButton setText getDetailsButtonLabelHide applyDialogFont getContents newSize getContents computeSize getShell setSize windowSize windowSize newSize oldSize
final protected void set Error Message String error if error Message Label null if error null error length 0 error Message Label set Text NON NLS 1 else error Message Label set Text error error Message Label update  setErrorMessage errorMessageLabel errorMessageLabel setText errorMessageLabel setText errorMessageLabel
final protected void set Page Complete boolean complete if ok Button null ok Button set Enabled complete  setPageComplete okButton okButton setEnabled
abstract protected void update Enablements  updateEnablements
abstract protected void update Enablements protected boolean include Cancel Button return true  updateEnablements includeCancelButton
protected boolean include Ok Button return true  includeOkButton
Returns the image Key return String protected String get Image Key return image Key  imageKey getImageKey imageKey
Sets the image Key param image Key The image Key to set protected void set Image Key String image Key this image Key image Key  imageKey imageKey imageKey setImageKey imageKey imageKey imageKey
protected static final int LABEL WIDTH HINT 400 protected Label create Wrapping Label Composite parent String text Label label new Label parent SWT LEFT SWT WRAP label set Text text Grid Data data new Grid Data data horizontal Span 1 data horizontal Alignment Grid Data FILL data horizontal Indent 0 data grab Excess Horizontal Space true data width Hint LABEL WIDTH HINT label set Layout Data data return label  LABEL_WIDTH_HINT createWrappingLabel setText GridData GridData horizontalSpan horizontalAlignment GridData horizontalIndent grabExcessHorizontalSpace widthHint LABEL_WIDTH_HINT setLayoutData
protected Composite create Composite Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH return composite  createComposite GridLayout GridLayout marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING setLayout setLayoutData GridData GridData FILL_BOTH
protected boolean is Details Visible return details Created  isDetailsVisible detailsCreated
protected boolean include Error Message return true  includeErrorMessage
protected boolean include Details Button return true  includeDetailsButton

Constructor for Details Dialog With Projects param parent Shell param dialog Title public Details Dialog With Projects Shell parent Shell String dialog Title String dialog Message String details Title I Project projects boolean include Cancel Button String image Key super parent Shell dialog Title set Image Key image Key this message dialog Message this details Title details Title this projects projects this include Cancel Button include Cancel Button  DetailsDialogWithProjects parentShell dialogTitle DetailsDialogWithProjects parentShell dialogTitle dialogMessage detailsTitle IProject includeCancelButton imageKey parentShell dialogTitle setImageKey imageKey dialogMessage detailsTitle detailsTitle includeCancelButton includeCancelButton
see Details Dialog create Main Dialog Area Composite protected void create Main Dialog Area Composite composite Label label new Label composite SWT WRAP label set Text message NON NLS 1 Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER data width Hint convert HorizontalDL Us To Pixels I Dialog Constants MINIMUM MESSAGE AREA WIDTH label set Layout Data data update Enablements  DetailsDialog createMainDialogArea createMainDialogArea setText GridData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER widthHint convertHorizontalDLUsToPixels IDialogConstants MINIMUM_MESSAGE_AREA_WIDTH setLayoutData updateEnablements
see Details Dialog create Drop Down Dialog Area Composite protected Composite create Drop Down Dialog Area Composite parent create a composite with standard margins and spacing Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH details List new org eclipse swt widgets List composite SWT BORDER SWT MULTI SWT H SCROLL SWT V SCROLL Grid Data data new Grid Data data height Hint 75 data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true details List set Layout Data data if details Title null details List add details Title for int i 0 i projects length i I Project project projects i details List add projects i get Name NON NLS 1 return composite  DetailsDialog createDropDownDialogArea createDropDownDialogArea GridLayout GridLayout marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING setLayout setLayoutData GridData GridData FILL_BOTH detailsList H_SCROLL V_SCROLL GridData GridData heightHint horizontalAlignment GridData grabExcessHorizontalSpace detailsList setLayoutData detailsTitle detailsList detailsTitle IProject detailsList getName
see Details Dialog update Enablements protected void update Enablements set Page Complete true  DetailsDialog updateEnablements updateEnablements setPageComplete
see Details Dialog include Cancel Button protected boolean include Cancel Button return include Cancel Button  DetailsDialog includeCancelButton includeCancelButton includeCancelButton

Create a dialog area param parent Dialog the parent dialog or code null code param settings the dialog settings stroe or code null code protected Dialog Area Dialog parent Dialog I Dialog Settings settings this listeners new Array List this parent Dialog parent Dialog this settings settings  parentDialog DialogArea parentDialog IDialogSettings ArrayList parentDialog parentDialog
Listener for property change events The only event of interest is for property SELECTED WORKING SET which contains the selected working set or code null code if none is selected param listener public void add Property Change Listener I Property Change Listener listener if listeners contains listener listeners add listener  SELECTED_WORKING_SET addPropertyChangeListener IPropertyChangeListener
Remove the provided listener from the receiver param listener public void remove Property Change Listener I Property Change Listener listener listeners remove listener  removePropertyChangeListener IPropertyChangeListener
protected void fire Property Change Change String property Object old Value Object new Value Property Change Event event new Property Change Event this property old Value new Value for Iterator iter listeners iterator iter has Next I Property Change Listener listener I Property Change Listener iter next listener property Change event  firePropertyChangeChange oldValue newValue PropertyChangeEvent PropertyChangeEvent oldValue newValue hasNext IPropertyChangeListener IPropertyChangeListener propertyChange
Code copied from code org eclipse jface dialogs Dialog code to obtain a Font Metrics param control a control from which to obtain the current font see org eclipse jface dialogs Dialog protected void initialize Dialog Units Control control Compute and store a font metric GC gc new GC control gc set Font control get Font font Metrics gc get Font Metrics gc dispose  FontMetrics initializeDialogUnits setFont getFont fontMetrics getFontMetrics
Create the area using the given parent as the containing composite param parent 
Returns a shell that can be used to show error conditions etc This method will return code null code if there is no parent dialog return a shell or code null code protected Shell get Shell if parent Dialog null return null return parent Dialog get Shell  getShell parentDialog parentDialog getShell
protected Button create Checkbox Composite parent String label int span Button button new Button parent SWT CHECK SWT LEFT button set Text label button set Font parent get Font Grid Data data new Grid Data data horizontal Span span button set Layout Data data return button  createCheckbox setText setFont getFont GridData GridData horizontalSpan setLayoutData
protected Button create Button Composite parent String label int style Button button new Button parent SWT PUSH button set Text label we need to explicitly set the font to the parent s font for dialogs button set Font parent get Font Grid Data data new Grid Data style data height Hint Dialog convert VerticalDL Us To Pixels font Metrics I Dialog Constants BUTTON HEIGHT int width Hint Dialog convert HorizontalDL Us To Pixels font Metrics I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x button set Layout Data data return button  createButton setText setFont getFont GridData GridData heightHint convertVerticalDLUsToPixels fontMetrics IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels fontMetrics IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize setLayoutData
protected Button create Radio Button Composite parent String label int span Button button new Button parent SWT RADIO button set Text label Grid Data data new Grid Data data horizontal Span span button set Layout Data data return button  createRadioButton setText GridData GridData horizontalSpan setLayoutData
protected Label create Wrapping Label Composite parent String text int horizontal Span Label label new Label parent SWT LEFT SWT WRAP label set Text text label set Font parent get Font Grid Data data new Grid Data data horizontal Span horizontal Span data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true data width Hint LABEL WIDTH HINT label set Layout Data data return label  createWrappingLabel horizontalSpan setText setFont getFont GridData GridData horizontalSpan horizontalSpan horizontalAlignment GridData grabExcessHorizontalSpace widthHint LABEL_WIDTH_HINT setLayoutData
protected Label create Label Composite parent String text int horizontal Span Label label new Label parent SWT LEFT label set Text text Grid Data data new Grid Data data horizontal Span horizontal Span data horizontal Alignment Grid Data FILL label set Layout Data data return label  createLabel horizontalSpan setText GridData GridData horizontalSpan horizontalSpan horizontalAlignment GridData setLayoutData
Creates composite control and sets the default layout data param parent the parent of the new composite param num Columns the number of columns for the new composite return the newly created coposite protected Composite create Composite Composite parent int num Columns Composite composite new Composite parent SWT NULL Font font parent get Font composite set Font font Grid Layout Grid Layout layout new Grid Layout layout num Columns num Columns composite set Layout layout Grid Data Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL composite set Layout Data data return composite  numColumns createComposite numColumns getFont setFont GridLayout GridLayout GridLayout numColumns numColumns setLayout GridData GridData GridData verticalAlignment GridData horizontalAlignment GridData setLayoutData
Creates composite control and sets the default layout data param parent the parent of the new composite param num Columns the number of columns for the new composite return the newly created coposite protected Composite create Grabbing Composite Composite parent int num Columns Composite composite new Composite parent SWT NULL Font font parent get Font composite set Font font Grid Layout Grid Layout layout new Grid Layout layout num Columns num Columns layout margin Height 0 layout margin Width 0 composite set Layout layout Grid Data Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true data grab Excess Vertical Space true composite set Layout Data data return composite  numColumns createGrabbingComposite numColumns getFont setFont GridLayout GridLayout GridLayout numColumns numColumns marginHeight marginWidth setLayout GridData GridData GridData verticalAlignment GridData horizontalAlignment GridData grabExcessHorizontalSpace grabExcessVerticalSpace setLayoutData

public interface I Prompt Condition Answers code true code if a prompt is required for this resource and false otherwise  IPromptCondition
public boolean needs Prompt I Resource resource Answers the message to include in the prompt public String prompt Message I Resource resource  needsPrompt IResource promptMessage IResource

private class Page Layout extends Layout public void layout Composite composite boolean force Rectangle rect composite get Client Area Control children composite get Children for int i 0 i children length i children i set Size rect width rect height  PageLayout getClientArea getChildren setSize
public Point compute Size Composite composite int w Hint int h Hint boolean force if w Hint SWT DEFAULT h Hint SWT DEFAULT return new Point w Hint h Hint int x f Minimum Page Size x int y f Minimum Page Size y Control children composite get Children for int i 0 i children length i Point size children i compute Size SWT DEFAULT SWT DEFAULT force x Math max x size x y Math max y size y if w Hint SWT DEFAULT x w Hint if h Hint SWT DEFAULT y h Hint return new Point x y  computeSize wHint hHint wHint hHint wHint hHint fMinimumPageSize fMinimumPageSize getChildren computeSize wHint wHint hHint hHint
private Point f Minimum Page Size new Point 200 200 public Preference Page Container Dialog Shell shell Preference Page page super shell this page page  fMinimumPageSize PreferencePageContainerDialog PreferencePage
final List changed Properties new Array List 5 get Preference Store add Property Change Listener new I Property Change Listener public void property Change Property Change Event event changed Properties add event get Property  changedProperties ArrayList getPreferenceStore addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent changedProperties getProperty
see Dialog ok Pressed protected void ok Pressed final List changed Properties new Array List 5 get Preference Store add Property Change Listener new I Property Change Listener public void property Change Property Change Event event changed Properties add event get Property page perform Ok handle Save super ok Pressed  okPressed okPressed changedProperties ArrayList getPreferenceStore addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent changedProperties getProperty performOk handleSave okPressed
Sets the title for this dialog param title the title public void set Title String title Shell shell get Shell if shell null shell is Disposed shell set Text title  setTitle getShell isDisposed setText
see Dialog create Dialog Area Composite protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent Grid Layout composite get Layout num Columns 1 Build the title area and separator line Composite title Composite new Composite composite SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout vertical Spacing 0 layout horizontal Spacing 0 title Composite set Layout layout title Composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL create Title Area title Composite Label title Bar Separator new Label title Composite SWT HORIZONTAL SWT SEPARATOR Grid Data gd new Grid Data Grid Data FILL HORIZONTAL title Bar Separator set Layout Data gd Build the Page container f Page Container create Page Container composite f Page Container set Layout Data new Grid Data Grid Data FILL BOTH page set Container this page create Control f Page Container set Title page get Title Build the separator line Label separator new Label composite SWT HORIZONTAL SWT SEPARATOR gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 separator set Layout Data gd apply Dialog Font parent return composite  createDialogArea createDialogArea createDialogArea GridLayout getLayout numColumns titleComposite GridLayout GridLayout marginHeight marginWidth verticalSpacing horizontalSpacing titleComposite setLayout titleComposite setLayoutData GridData GridData FILL_HORIZONTAL createTitleArea titleComposite titleBarSeparator titleComposite GridData GridData GridData FILL_HORIZONTAL titleBarSeparator setLayoutData fPageContainer createPageContainer fPageContainer setLayoutData GridData GridData FILL_BOTH setContainer createControl fPageContainer setTitle getTitle GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData applyDialogFont
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 J Face Resources DIALOG FONT equals event get Property update Message  IPropertyChangeListener fontListener IPropertyChangeListener propertyChange PropertyChangeEvent JFaceResources BANNER_FONT getProperty JFaceResources DIALOG_FONT getProperty updateMessage
f Message Label add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event J Face Resources get Font Registry remove Listener font Listener  fMessageLabel addDisposeListener DisposeListener widgetDisposed DisposeEvent JFaceResources getFontRegistry removeListener fontListener
Creates the dialog s title area param parent the SWT parent for the title area composite return the created title area composite private Composite create Title Area Composite parent Font font parent get Font Create the title area which will contain a title message and image f Title Area new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout vertical Spacing 0 layout horizontal Spacing 0 layout num Columns 2 Get the colors for the title area Display display parent get Display Color bg J Face Colors get Banner Background display Color fg J Face Colors get Banner Foreground display Grid Data layout Data new Grid Data Grid Data FILL BOTH f Title Area set Layout layout f Title Area set Layout Data layout Data f Title Area set Background bg Message label f Message Label new C Label f Title Area SWT LEFT f Message Label set Background bg f Message Label set Foreground fg f Message Label set Text NON NLS 1 f Message Label set Font J Face Resources get Banner Font 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 J Face Resources DIALOG FONT equals event get Property update Message f Message Label add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event J Face Resources get Font Registry remove Listener font Listener J Face Resources get Font Registry add Listener font Listener Grid Data gd new Grid Data Grid Data FILL BOTH f Message Label set Layout Data gd Title image f Title Image new Label f Title Area SWT LEFT f Title Image set Background bg f Title Image set Image TeamUI Plugin get Plugin get Image Registry get PREF DLG TITLE IMG gd new Grid Data gd horizontal Alignment Grid Data END f Title Image set Layout Data gd update Message return f Title Area  createTitleArea getFont fTitleArea GridLayout GridLayout marginHeight marginWidth verticalSpacing horizontalSpacing numColumns getDisplay JFaceColors getBannerBackground JFaceColors getBannerForeground GridData layoutData GridData GridData FILL_BOTH fTitleArea setLayout fTitleArea setLayoutData layoutData fTitleArea setBackground fMessageLabel CLabel fTitleArea fMessageLabel setBackground fMessageLabel setForeground fMessageLabel setText fMessageLabel setFont JFaceResources getBannerFont IPropertyChangeListener fontListener IPropertyChangeListener propertyChange PropertyChangeEvent JFaceResources BANNER_FONT getProperty JFaceResources DIALOG_FONT getProperty updateMessage fMessageLabel addDisposeListener DisposeListener widgetDisposed DisposeEvent JFaceResources getFontRegistry removeListener fontListener JFaceResources getFontRegistry addListener fontListener GridData GridData GridData FILL_BOTH fMessageLabel setLayoutData fTitleImage fTitleArea fTitleImage setBackground fTitleImage setImage TeamUIPlugin getPlugin getImageRegistry PREF_DLG_TITLE_IMG GridData horizontalAlignment GridData fTitleImage setLayoutData updateMessage fTitleArea
Creates the inner page container private Composite create Page Container Composite parent Composite result new Composite parent SWT NULL result set Layout new Page Layout return result  createPageContainer setLayout PageLayout
Sets the minimum page size param size the page size encoded as code new Point width height code see set Minimum Page Size int int public void set Minimum Page Size Point size f Minimum Page Size x size x f Minimum Page Size y size y  setMinimumPageSize setMinimumPageSize fMinimumPageSize fMinimumPageSize
Display the given error message The currently displayed message is saved and will be redisplayed when the error message is set to code null code param error Message the error Message to display or code null code public void set Error Message String error Message if error Message null if f Message Label get Image null we were previously showing an error f Message Label set Background f Normal Msg Area Background f Message Label set Image null f Title Image set Image TeamUI Plugin get Plugin get Image Registry get PREF DLG TITLE IMG f Title Area layout true show the message set Message f Message else f Message Label set Text error Message if f Message Label get Image null we were not previously showing an error lazy initialize the error background color and image if f Error Msg Image null f Error Msg Image TeamUI Plugin get Plugin get Image Registry get PREF DLG IMG TITLE ERROR show the error f Normal Msg Area Background f Message Label get Background f Message Label set Background J Face Colors get Error Background f Message Label get Display f Message Label set Image f Error Msg Image f Title Image set Image null f Title Area layout true  errorMessage errorMessage setErrorMessage errorMessage errorMessage fMessageLabel getImage fMessageLabel setBackground fNormalMsgAreaBackground fMessageLabel setImage fTitleImage setImage TeamUIPlugin getPlugin getImageRegistry PREF_DLG_TITLE_IMG fTitleArea setMessage fMessage fMessageLabel setText errorMessage fMessageLabel getImage fErrorMsgImage fErrorMsgImage TeamUIPlugin getPlugin getImageRegistry PREF_DLG_IMG_TITLE_ERROR fNormalMsgAreaBackground fMessageLabel getBackground fMessageLabel setBackground JFaceColors getErrorBackground fMessageLabel getDisplay fMessageLabel setImage fErrorMsgImage fTitleImage setImage fTitleArea
Set the message text If the message line currently displays an error the message is stored and will be shown after a call to clear Error Message public void set Message String new Message f Message new Message if f Message null f Message NON NLS 1 if f Message Label get Image null we are not showing an error f Message Label set Text f Message  clearErrorMessage setMessage newMessage fMessage newMessage fMessage fMessage fMessageLabel getImage fMessageLabel setText fMessage
see I Preference Page Container update Message public void update Message String page Message page get Message String page Error Message page get Error Message Adjust the font if page Message null page Error Message null f Message Label set Font J Face Resources get Banner Font else f Message Label set Font J Face Resources get Dialog Font Set the message and error message if page Message null set Message page get Title else set Message page Message set Error Message page Error Message  IPreferencePageContainer updateMessage updateMessage pageMessage getMessage pageErrorMessage getErrorMessage pageMessage pageErrorMessage fMessageLabel setFont JFaceResources getBannerFont fMessageLabel setFont JFaceResources getDialogFont pageMessage setMessage getTitle setMessage pageMessage setErrorMessage pageErrorMessage
see I Preference Page Container get Preference Store public I Preference Store get Preference Store return page get Preference Store  IPreferencePageContainer getPreferenceStore IPreferenceStore getPreferenceStore getPreferenceStore
see I Preference Page Container update Buttons public void update Buttons if f Ok Button null f Ok Button set Enabled page is Valid  IPreferencePageContainer updateButtons updateButtons fOkButton fOkButton setEnabled isValid
see I Preference Page Container update Title public void update Title set Title page get Title  IPreferencePageContainer updateTitle updateTitle setTitle getTitle
see Dialog create Buttons For Button Bar Composite protected void create Buttons For Button Bar Composite parent f Ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButtonsForButtonBar fOkButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
Save the values specified in the pages p The default implementation of this framework method saves all pages of type code Preference Page code if their store needs saving and is a code Preference Store code p p Subclasses may override p protected void handle Save if page instanceof Preference Page Save now in case tbe workbench does not shutdown cleanly I Preference Store store Preference Page page get Preference Store if store null store needs Saving store instanceof I Persistent Preference Store try I Persistent Preference Store store save catch IO Exception e Utils handle e  PreferencePage PreferenceStore handleSave PreferencePage IPreferenceStore PreferencePage getPreferenceStore needsSaving IPersistentPreferenceStore IPersistentPreferenceStore IOException

Prompt for the given resources using the specific condition The prompt dialog will have the title specified public Prompting Dialog Shell shell I Resource resources I Prompt Condition condition String title this shell resources condition title false all or nothing  PromptingDialog IResource IPromptCondition
public Prompting Dialog Shell shell I Resource resources I Prompt Condition condition String title boolean all Or Nothing this condition condition this resources resources this title title this shell shell this has Multiple Resources resources length 1 this all Or Nothing all Or Nothing if has Multiple Resources if all Or Nothing buttons new String I Dialog Constants YES LABEL I Dialog Constants YES TO ALL LABEL I Dialog Constants CANCEL LABEL else buttons new String I Dialog Constants YES LABEL I Dialog Constants YES TO ALL LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL else buttons new String I Dialog Constants OK LABEL I Dialog Constants CANCEL LABEL  PromptingDialog IResource IPromptCondition allOrNothing hasMultipleResources allOrNothing allOrNothing hasMultipleResources allOrNothing IDialogConstants YES_LABEL IDialogConstants YES_TO_ALL_LABEL IDialogConstants CANCEL_LABEL IDialogConstants YES_LABEL IDialogConstants YES_TO_ALL_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL IDialogConstants OK_LABEL IDialogConstants CANCEL_LABEL
Call to calculate and show prompt If no resources satisfy the prompt condition a dialog won t be shown The resources for which the user confirmed the action are returned public I Resource prompt For Multiple throws Interrupted Exception List target Resources new Array List for int i 0 i resources length i I Resource resource resources i if condition needs Prompt resource confirm Overwrite if confirm Overwrite condition prompt Message resource target Resources add resource else target Resources add resource return I Resource target Resources to Array new I Resource target Resources size  IResource promptForMultiple InterruptedException targetResources ArrayList IResource needsPrompt confirmOverwrite confirmOverwrite promptMessage targetResources targetResources IResource targetResources toArray IResource targetResources
shell get Display sync Exec new Runnable public void run dialog open  getDisplay syncExec
Opens the confirmation dialog based on the prompt condition settings private boolean confirm Overwrite String msg throws Interrupted Exception if confirm Overwrite return true final Message Dialog dialog new Message Dialog shell title null msg Message Dialog QUESTION buttons 0 run in sync Exec because callback is from an operation which is probably not running in the UI thread shell get Display sync Exec new Runnable public void run dialog open if has Multiple Resources switch dialog get Return Code case 0 Yes return true case 1 Yes to all confirm Overwrite false return true case 2 No or CANCEL for all or nothing if all Or Nothing throw new Interrupted Exception return false case 3 Cancel default throw new Interrupted Exception else return dialog get Return Code 0  confirmOverwrite InterruptedException confirmOverwrite MessageDialog MessageDialog MessageDialog syncExec getDisplay syncExec hasMultipleResources getReturnCode confirmOverwrite allOrNothing InterruptedException InterruptedException getReturnCode

Overlay Icon constructor param base the base image param overlays the overlay images param locations the location of each image param size the size public Overlay Icon Image base Image Descriptor overlays int locations Point size this base base this descriptor Base null this overlays overlays this locations locations this size size  OverlayIcon OverlayIcon ImageDescriptor descriptorBase
Overlay Icon constructor param base the base image param overlays the overlay images param locations the location of each image param size the size public Overlay Icon Image Descriptor descriptor Base Image Descriptor overlays int locations Point size this descriptor Base descriptor Base this base null this overlays overlays this locations locations this size size  OverlayIcon OverlayIcon ImageDescriptor descriptorBase ImageDescriptor descriptorBase descriptorBase
protected void draw Overlays Image Descriptor overlays int locations Point size get Size for int i 0 i overlays length i Image Descriptor overlay overlays i Image Data overlay Data overlay get Image Data switch locations i case TOP LEFT draw Image overlay Data 0 0 break case TOP RIGHT draw Image overlay Data size x overlay Data width 0 break case BOTTOM LEFT draw Image overlay Data 0 size y overlay Data height break case BOTTOM RIGHT draw Image overlay Data size x overlay Data width size y overlay Data height break  drawOverlays ImageDescriptor getSize ImageDescriptor ImageData overlayData getImageData TOP_LEFT drawImage overlayData TOP_RIGHT drawImage overlayData overlayData BOTTOM_LEFT drawImage overlayData overlayData BOTTOM_RIGHT drawImage overlayData overlayData overlayData
public boolean equals Object o if o instanceof Overlay Icon return false Overlay Icon other Overlay Icon o return base equals other base Arrays equals overlays other overlays  OverlayIcon OverlayIcon OverlayIcon
public int hash Code int code base hash Code for int i 0 i overlays length i code overlays i hash Code return code  hashCode hashCode hashCode
protected void draw Composite Image int width int height if descriptor Base null Image Data bg if descriptor Base null bg descriptor Base get Image Data null bg DEFAULT IMAGE DATA draw Image bg 0 0 else draw Image base get Image Data 0 0 draw Overlays overlays locations  drawCompositeImage descriptorBase ImageData descriptorBase descriptorBase getImageData DEFAULT_IMAGE_DATA drawImage drawImage getImageData drawOverlays
protected Point get Size return size  getSize

Creates a NLS catalog for the given locale param bundle Name the name of the bundle public static void localize String bundle Name bundle Resource Bundle get Bundle bundle Name  bundleName bundleName ResourceBundle getBundle bundleName
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string param id the id to look up param binding the string to bind to the result return the bound string public static String bind String id String binding return bind id new String binding 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings param id the id to look up param binding1 the first string to bind to the result param binding2 the second string to bind to the result return the bound string public static String bind String id String binding1 String binding2 return bind id new String binding1 binding2 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings param id the id to look up param binding1 the first string to bind to the result param binding2 the second string to bind to the result param binding3 the third string to bind to the result return the bound string public static String bind String id String binding1 String binding2 String binding3 return bind id new String binding1 binding2 binding3 
Gets a string from the resource bundle We don t want to crash because of a missing String Returns the key if not found param key the id to look up return the string with the given key public static String bind String key Resource Bundle b try return b get String key catch Missing Resource Exception e return key catch Null Pointer Exception e return key NON NLS 1 NON NLS 2  ResourceBundle getString MissingResourceException NullPointerException
Gets a string from the resource bundle We don t want to crash because of a missing String Returns the key if not found param key the id to look up return the string with the given key public static String bind String key try return bundle get String key catch Missing Resource Exception e return key catch Null Pointer Exception e return key NON NLS 1 NON NLS 2  getString MissingResourceException NullPointerException
Gets a string from the resource bundle and binds it with the given arguments If the key is not found return the key param key the id to look up param args the strings to bind to the result return the bound string public static String bind String key Object args try return Message Format format bind key args catch Missing Resource Exception e return key catch Null Pointer Exception e return key NON NLS 1 NON NLS 2  MessageFormat MissingResourceException NullPointerException
Checks if the progress monitor is canceled param monitor the onitor to check for cancellation throws Operation Canceled Exception if the monitor is canceled public static void check Canceled I Progress Monitor monitor if monitor is Canceled throw new Operation Canceled Exception  OperationCanceledException checkCanceled IProgressMonitor isCanceled OperationCanceledException
Returns a monitor for the given monitor param monitor the monitor to return a monitor for return a monitor for the given monitor public static I Progress Monitor monitor For I Progress Monitor monitor if monitor null return new Null Progress Monitor return monitor  IProgressMonitor monitorFor IProgressMonitor NullProgressMonitor
public static I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks  IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor
public static I Progress Monitor sub Infinite Monitor For I Progress Monitor monitor int ticks if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Infinite Sub Progress Monitor monitor ticks  IProgressMonitor subInfiniteMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor InfiniteSubProgressMonitor
public static I Progress Monitor sub Null Monitor For I Progress Monitor monitor if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Null Sub Progress Monitor monitor  IProgressMonitor subNullMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor NullSubProgressMonitor
public static String to Truncated Path I Path path int split Search backwards until split separators are found int count 0 String string Path path to String int index string Path length while count split index 1 index string Path last Index Of I Path SEPARATOR index 1 if index 1 return string Path else return string Path substring index NON NLS 1  toTruncatedPath IPath stringPath toString stringPath stringPath lastIndexOf IPath stringPath stringPath
public static Resource Bundle get Bundle return bundle  ResourceBundle getBundle

public Combo Field Editor String name String label Text String entry Names And Values Composite parent init name label Text Assert is True check Array entry Names And Values f Entry Names And Values entry Names And Values create Control parent  ComboFieldEditor labelText entryNamesAndValues labelText isTrue checkArray entryNamesAndValues fEntryNamesAndValues entryNamesAndValues createControl
Checks whether given code String code is of type code String 2 code return code true code if it is ok and code false code otherwise private boolean check Array String table if table null return false for int i 0 i table length i String array table i if array null array length 2 return false return true  checkArray
protected void adjust For Num Columns int num Columns Control control get Label Control if control null Grid Data control get Layout Data horizontal Span num Columns Grid Data f Combo get Layout Data horizontal Span num Columns  adjustForNumColumns numColumns getLabelControl GridData getLayoutData horizontalSpan numColumns GridData fCombo getLayoutData horizontalSpan numColumns
protected void do Fill Into Grid Composite parent int num Columns Control control get Label Control parent Grid Data gd new Grid Data gd horizontal Span num Columns control set Layout Data gd control get Combo Box Control parent gd new Grid Data gd horizontal Span num Columns control set Layout Data gd  doFillIntoGrid numColumns getLabelControl GridData GridData horizontalSpan numColumns setLayoutData getComboBoxControl GridData horizontalSpan numColumns setLayoutData
see Field Editor do Load protected void do Load update Combo For Value get Preference Store get String get Preference Name  FieldEditor doLoad doLoad updateComboForValue getPreferenceStore getString getPreferenceName
see Field Editor do Load Default protected void do Load Default update Combo For Value get Preference Store get Default String get Preference Name  FieldEditor doLoadDefault doLoadDefault updateComboForValue getPreferenceStore getDefaultString getPreferenceName
protected void do Store if f Value null get Preference Store set To Default get Preference Name return get Preference Store set Value get Preference Name f Value  doStore fValue getPreferenceStore setToDefault getPreferenceName getPreferenceStore setValue getPreferenceName fValue
see Field Editor get Number Of Controls public int get Number Of Controls return 1  FieldEditor getNumberOfControls getNumberOfControls
Lazily create and return the Combo control public Combo get Combo Box Control Composite parent if f Combo null f Combo new Combo parent SWT READ ONLY for int i 0 i f Entry Names And Values length i f Combo add f Entry Names And Values i 0 i f Combo set Font parent get Font f Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event evt String old Value f Value String name f Combo get Text f Value get Value For Name name set Presents Default Value false fire Value Changed VALUE old Value f Value return f Combo  getComboBoxControl fCombo fCombo READ_ONLY fEntryNamesAndValues fCombo fEntryNamesAndValues fCombo setFont getFont fCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent oldValue fValue fCombo getText fValue getValueForName setPresentsDefaultValue fireValueChanged oldValue fValue fCombo
Given the name label of an entry return the corresponding value protected String get Value For Name String name for int i 0 i f Entry Names And Values length i String entry f Entry Names And Values i if name equals entry 0 return entry 1 return f Entry Names And Values 0 0  getValueForName fEntryNamesAndValues fEntryNamesAndValues fEntryNamesAndValues
Set the name in the combo widget to match the specified value protected void update Combo For Value String value f Value value for int i 0 i f Entry Names And Values length i if value equals f Entry Names And Values i 1 f Combo set Text f Entry Names And Values i 0 return if f Entry Names And Values length 0 f Value f Entry Names And Values 0 1 f Combo set Text f Entry Names And Values 0 0  updateComboForValue fValue fEntryNamesAndValues fEntryNamesAndValues fCombo setText fEntryNamesAndValues fEntryNamesAndValues fValue fEntryNamesAndValues fCombo setText fEntryNamesAndValues

private Button add Button private Button remove Button public void init I Workbench workbench set Description Policy bind Ignore Preference Page description NON NLS 1  addButton removeButton IWorkbench setDescription IgnorePreferencePage
ignore Table set Layout Data gd ignore Table add Listener SWT Selection new Listener public void handle Event Event e handle Selection  ignoreTable setLayoutData ignoreTable addListener handleEvent handleSelection
add Button set Layout Data data add Button add Listener SWT Selection new Listener public void handle Event Event e add Ignore  addButton setLayoutData addButton addListener handleEvent addIgnore
remove Button set Enabled false remove Button add Listener SWT Selection new Listener public void handle Event Event e remove Ignore  removeButton setEnabled removeButton addListener handleEvent removeIgnore
Creates preference page controls on demand param parent the parent for the preference page protected Control create Contents Composite ancestor Composite parent new Composite ancestor SWT NULL Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 layout num Columns 2 parent set Layout layout Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL parent set Layout Data data set F1 help Workbench Help set Help parent I Help Context Ids IGNORE PREFERENCE PAGE Label l1 new Label parent SWT NULL l1 set Text Policy bind Ignore Preference Page ignore Patterns NON NLS 1 data new Grid Data Grid Data VERTICAL ALIGN BEGINNING data horizontal Span 2 l1 set Layout Data data ignore Table new Table parent SWT CHECK SWT BORDER Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint convert Width In Chars To Pixels 30 gd height Hint 300 ignore Table set Layout Data gd ignore Table add Listener SWT Selection new Listener public void handle Event Event e handle Selection Composite buttons new Composite parent SWT NULL buttons set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING layout new Grid Layout layout margin Height 0 layout margin Width 0 buttons set Layout layout add Button new Button buttons SWT PUSH add Button set Text Policy bind Ignore Preference Page add NON NLS 1 data new Grid Data data horizontal Alignment Grid Data FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint add Button compute Size SWT DEFAULT SWT DEFAULT true x add Button set Layout Data data add Button add Listener SWT Selection new Listener public void handle Event Event e add Ignore remove Button new Button buttons SWT PUSH remove Button set Text Policy bind Ignore Preference Page remove NON NLS 1 data new Grid Data data horizontal Alignment Grid Data FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint remove Button compute Size SWT DEFAULT SWT DEFAULT true x remove Button set Layout Data data remove Button set Enabled false remove Button add Listener SWT Selection new Listener public void handle Event Event e remove Ignore fill Table Team get All Ignores Dialog apply Dialog Font ancestor return parent  createContents GridLayout GridLayout marginWidth marginHeight numColumns setLayout GridData GridData verticalAlignment GridData horizontalAlignment GridData setLayoutData WorkbenchHelp setHelp IHelpContextIds IGNORE_PREFERENCE_PAGE setText IgnorePreferencePage ignorePatterns GridData GridData VERTICAL_ALIGN_BEGINNING horizontalSpan setLayoutData ignoreTable GridData GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels heightHint ignoreTable setLayoutData ignoreTable addListener handleEvent handleSelection setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING GridLayout marginHeight marginWidth setLayout addButton addButton setText IgnorePreferencePage GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint addButton computeSize addButton setLayoutData addButton addListener handleEvent addIgnore removeButton removeButton setText IgnorePreferencePage GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint removeButton computeSize removeButton setLayoutData removeButton setEnabled removeButton addListener handleEvent removeIgnore fillTable getAllIgnores applyDialogFont
Do anything necessary because the OK button has been pressed return whether it is okay to close the preference page public boolean perform Ok int count ignore Table get Item Count String patterns new String count boolean enabled new boolean count Table Item items ignore Table get Items for int i 0 i count i patterns i items i get Text enabled i items i get Checked Team set All Ignores patterns enabled TeamUI Plugin broadcast Property Change new Property Change Event this TeamUI GLOBAL IGNORES CHANGED null null return true  performOk ignoreTable getItemCount TableItem ignoreTable getItems getText getChecked setAllIgnores TeamUIPlugin broadcastPropertyChange PropertyChangeEvent GLOBAL_IGNORES_CHANGED
protected void perform Defaults super perform Defaults ignore Table remove All I Ignore Info ignore Team get Default Ignores fill Table ignore  performDefaults performDefaults ignoreTable removeAll IIgnoreInfo getDefaultIgnores fillTable
param ignore private void fill Table I Ignore Info ignore for int i 0 i ignore length i I Ignore Info info ignore i Table Item item new Table Item ignore Table SWT NONE item set Text info get Pattern item set Checked info get Enabled  fillTable IIgnoreInfo IIgnoreInfo TableItem TableItem ignoreTable setText getPattern setChecked getEnabled
private void add Ignore Input Dialog dialog new Input Dialog get Shell Policy bind Ignore Preference Page enter Pattern Short Policy bind Ignore Preference Page enter Pattern Long null null NON NLS 1 NON NLS 2 dialog open if dialog get Return Code Input Dialog OK return String pattern dialog get Value if pattern equals return NON NLS 1 Check if the item already exists Table Item items ignore Table get Items for int i 0 i items length i if items i get Text equals pattern Message Dialog open Warning get Shell Policy bind Ignore Preference Page pattern Exists Short Policy bind Ignore Preference Page pattern Exists Long NON NLS 1 NON NLS 2 return Table Item item new Table Item ignore Table SWT NONE item set Text pattern item set Checked true  addIgnore InputDialog InputDialog getShell IgnorePreferencePage enterPatternShort IgnorePreferencePage enterPatternLong getReturnCode InputDialog getValue TableItem ignoreTable getItems getText MessageDialog openWarning getShell IgnorePreferencePage patternExistsShort IgnorePreferencePage patternExistsLong TableItem TableItem ignoreTable setText setChecked
private void remove Ignore int selection ignore Table get Selection Indices ignore Table remove selection  removeIgnore ignoreTable getSelectionIndices ignoreTable
private void handle Selection if ignore Table get Selection Count 0 remove Button set Enabled true else remove Button set Enabled false  handleSelection ignoreTable getSelectionCount removeButton setEnabled removeButton setEnabled

public int compare Object o1 Object o2 if o1 instanceof I Perspective Descriptor o2 instanceof I Perspective Descriptor String id1 I Perspective Descriptor o1 get Label String id2 I Perspective Descriptor o2 get Label return Collator get Instance compare id1 id2 return 0  IPerspectiveDescriptor IPerspectiveDescriptor IPerspectiveDescriptor getLabel IPerspectiveDescriptor getLabel getInstance
public Sync Viewer Preference Page super GRID set Title Policy bind Sync Viewer Preference Page 6 NON NLS 1 set Description Policy bind Sync Viewer Preference Page 7 NON NLS 1 set Preference Store TeamUI Plugin get Plugin get Preference Store  SyncViewerPreferencePage setTitle SyncViewerPreferencePage setDescription SyncViewerPreferencePage setPreferenceStore TeamUIPlugin getPlugin getPreferenceStore
see org eclipse jface dialogs I Dialog Page create Control org eclipse swt widgets Composite public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Debug Help Context Ids CONSOLE PREFERENCE PAGE  IDialogPage createControl createControl createControl WorkbenchHelp setHelp getControl IDebugHelpContextIds CONSOLE_PREFERENCE_PAGE
public void create Field Editors compress Folders new Boolean Field Editor SYNCVIEW COMPRESS FOLDERS Policy bind Sync Viewer Preference Page 9 SWT NONE get Field Editor Parent NON NLS 1 add Field compress Folders show Sync In Labels new Boolean Field Editor SYNCVIEW VIEW SYNCINFO IN LABEL Policy bind Sync Viewer Preference Page 19 SWT NONE get Field Editor Parent NON NLS 1 add Field show Sync In Labels synchronize Perspective Switch new Radio Group Field Editor SYNCHRONIZING COMPLETE PERSPECTIVE Policy bind Sync Viewer Preference Page 13 3 NON NLS 1 new String Policy bind Sync Viewer Preference Page 14 Message Dialog With Toggle ALWAYS NON NLS 1 Policy bind Sync Viewer Preference Page 42 Message Dialog With Toggle NEVER NON NLS 1 Policy bind Sync Viewer Preference Page 16 Message Dialog With Toggle PROMPT NON NLS 1 get Field Editor Parent true add Field synchronize Perspective Switch Group perspective Group create Group get Field Editor Parent Policy bind Sync Viewer Preference Page 15 NON NLS 1 create Label perspective Group Policy bind Synchronization View Preference default Perspective Description 1 NON NLS 1 handle Deleted Perspectives String perspective Names And Ids get Perspective Names And Ids Combo Field Editor combo Editor new Combo Field Editor SYNCVIEW DEFAULT PERSPECTIVE Policy bind Synchronization View Preference default Perspective Label NON NLS 1 perspective Names And Ids perspective Group add Field combo Editor Dialog apply Dialog Font get Field Editor Parent update Layout perspective Group get Field Editor Parent layout true  createFieldEditors compressFolders BooleanFieldEditor SYNCVIEW_COMPRESS_FOLDERS SyncViewerPreferencePage getFieldEditorParent addField compressFolders showSyncInLabels BooleanFieldEditor SYNCVIEW_VIEW_SYNCINFO_IN_LABEL SyncViewerPreferencePage getFieldEditorParent addField showSyncInLabels synchronizePerspectiveSwitch RadioGroupFieldEditor SYNCHRONIZING_COMPLETE_PERSPECTIVE SyncViewerPreferencePage SyncViewerPreferencePage MessageDialogWithToggle SyncViewerPreferencePage MessageDialogWithToggle SyncViewerPreferencePage MessageDialogWithToggle getFieldEditorParent addField synchronizePerspectiveSwitch perspectiveGroup createGroup getFieldEditorParent SyncViewerPreferencePage createLabel perspectiveGroup SynchronizationViewPreference defaultPerspectiveDescription handleDeletedPerspectives perspectiveNamesAndIds getPerspectiveNamesAndIds ComboFieldEditor comboEditor ComboFieldEditor SYNCVIEW_DEFAULT_PERSPECTIVE SynchronizationViewPreference defaultPerspectiveLabel perspectiveNamesAndIds perspectiveGroup addField comboEditor applyDialogFont getFieldEditorParent updateLayout perspectiveGroup getFieldEditorParent
private Label create Label Composite parent String title int spacer Grid Data data Label l new Label parent SWT WRAP l set Font parent get Font data new Grid Data data horizontal Span 2 if spacer 0 data vertical Span spacer data horizontal Alignment Grid Data FILL l set Layout Data data if title null l set Text title NON NLS 1 return l  createLabel GridData setFont getFont GridData horizontalSpan verticalSpan horizontalAlignment GridData setLayoutData setText
private Group create Group Composite parent String title Group display new Group parent SWT NONE update Layout display Grid Data data new Grid Data data horizontal Span 2 data horizontal Alignment Grid Data FILL display set Layout Data data display set Text title return display  createGroup updateLayout GridData GridData horizontalSpan horizontalAlignment GridData setLayoutData setText
private void update Layout Composite composite Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width 5 layout margin Height 5 layout horizontal Spacing 5 layout vertical Spacing 5 composite set Layout layout  updateLayout GridLayout GridLayout numColumns marginWidth marginHeight horizontalSpacing verticalSpacing setLayout
private void update Last Run Time Label label String text long mills 0 if mills 0 String never Policy bind Sync View Preference Page last Refresh Run Never NON NLS 1 text Policy bind Sync View Preference Page last Refresh Run never NON NLS 1 else Date last Time Run new Date mills String s Last Time Run Date Format get Date Time Instance Date Format SHORT Date Format SHORT format last Time Run text Policy bind Sync View Preference Page last Refresh Run s Last Time Run NON NLS 1 label set Text text  updateLastRunTime SyncViewPreferencePage lastRefreshRunNever SyncViewPreferencePage lastRefreshRun lastTimeRun sLastTimeRun DateFormat getDateTimeInstance DateFormat DateFormat lastTimeRun SyncViewPreferencePage lastRefreshRun sLastTimeRun setText
see org eclipse ui I Workbench Preference Page init org eclipse ui I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
public void property Change Property Change Event event if event get Source bkg Scheduled Refresh event get Source scheduled Delay update Enablements super property Change event  propertyChange PropertyChangeEvent getSource bkgScheduledRefresh getSource scheduledDelay updateEnablements propertyChange
see org eclipse jface preference I Preference Page perform Ok public boolean perform Ok TeamUI Plugin get Plugin save Plugin Preferences return super perform Ok  IPreferencePage performOk performOk TeamUIPlugin getPlugin savePluginPreferences performOk
see org eclipse jface preference Field Editor Preference Page check State protected void initialize super initialize update Enablements  FieldEditorPreferencePage checkState updateEnablements
protected void update Enablements boolean enabled bkg Scheduled Refresh get Boolean Value scheduled Delay set Enabled enabled refresh Group scheduled Delay refresh Valid State  updateEnablements bkgScheduledRefresh getBooleanValue scheduledDelay setEnabled refreshGroup scheduledDelay refreshValidState
Return a 2 dimensional array of perspective names and ids private String get Perspective Names And Ids I Perspective Registry registry PlatformUI get Workbench get Perspective Registry I Perspective Descriptor perspective Descriptors registry get Perspectives Arrays sort perspective Descriptors new Perspective Descriptor Comparator String table new String perspective Descriptors length 1 2 table 0 0 Policy bind Synchronization View Preference default Perspective None NON NLS 1 table 0 1 SYNCVIEW DEFAULT PERSPECTIVE NONE for int i 0 i perspective Descriptors length i table i 1 0 perspective Descriptors i get Label table i 1 1 perspective Descriptors i get Id return table  getPerspectiveNamesAndIds IPerspectiveRegistry getWorkbench getPerspectiveRegistry IPerspectiveDescriptor perspectiveDescriptors getPerspectives perspectiveDescriptors PerspectiveDescriptorComparator perspectiveDescriptors SynchronizationViewPreference defaultPerspectiveNone SYNCVIEW_DEFAULT_PERSPECTIVE_NONE perspectiveDescriptors perspectiveDescriptors getLabel perspectiveDescriptors getId
private static void handle Deleted Perspectives I Preference Store store TeamUI Plugin get Plugin get Preference Store String id store get String SYNCVIEW DEFAULT PERSPECTIVE if PlatformUI get Workbench get Perspective Registry find Perspective With Id id null store put Value SYNCVIEW DEFAULT PERSPECTIVE SYNCVIEW DEFAULT PERSPECTIVE NONE  handleDeletedPerspectives IPreferenceStore TeamUIPlugin getPlugin getPreferenceStore getString SYNCVIEW_DEFAULT_PERSPECTIVE getWorkbench getPerspectiveRegistry findPerspectiveWithId putValue SYNCVIEW_DEFAULT_PERSPECTIVE SYNCVIEW_DEFAULT_PERSPECTIVE_NONE

Button sync Mode Button public Team Preference Page set Description Policy bind Team Preference Page General settings for Team support 1 NON NLS 1  syncModeButton TeamPreferencePage setDescription TeamPreferencePage General_settings_for_Team_support_1
see Preference Page create Contents Composite protected Control create Contents Composite parent Composite composite new Composite parent SWT NULL set F1 help Workbench Help set Help composite I Help Context Ids TEAM PREFERENCE PAGE Grid Layout Grid Layout layout new Grid Layout layout num Columns 1 layout margin Width 0 layout margin Height 0 composite set Layout layout Grid Data Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL composite set Layout Data data Create the checkbox for sync mode sync Mode Button create Check Box composite Policy bind Team Preference Page Use Incoming Outgoing mode when synchronizing 2 NON NLS 1 initialize Values Dialog apply Dialog Font parent return composite  PreferencePage createContents createContents WorkbenchHelp setHelp IHelpContextIds TEAM_PREFERENCE_PAGE GridLayout GridLayout GridLayout numColumns marginWidth marginHeight setLayout GridData GridData GridData verticalAlignment GridData horizontalAlignment GridData setLayoutData syncModeButton createCheckBox TeamPreferencePage Use_Incoming Outgoing_mode_when_synchronizing_2 initializeValues applyDialogFont
Creates an new checkbox instance and sets the default layout data param group the composite in which to create the checkbox param label the string to set into the checkbox return the new checkbox private Button create Check Box Composite group String label Button button new Button group SWT CHECK SWT LEFT button set Text label Grid Data data new Grid Data data horizontal Span 1 button set Layout Data data return button  createCheckBox setText GridData GridData horizontalSpan setLayoutData
Returns preference store that belongs to the our plugin This is important because we want to store our preferences separately from the desktop return the preference store for this plugin protected I Preference Store do Get Preference Store return TeamUI Plugin get Plugin get Preference Store  IPreferenceStore doGetPreferenceStore TeamUIPlugin getPlugin getPreferenceStore
Defaults was clicked Restore the CVS preferences to their default values protected void perform Defaults super perform Defaults I Preference Store store get Preference Store sync Mode Button set Selection store get Default Boolean I Shared Images PREF ALWAYS IN INCOMING OUTGOING  performDefaults performDefaults IPreferenceStore getPreferenceStore syncModeButton setSelection getDefaultBoolean ISharedImages PREF_ALWAYS_IN_INCOMING_OUTGOING
OK was clicked Store the CVS preferences return whether it is okay to close the preference page public boolean perform Ok I Preference Store store get Preference Store store set Value I Shared Images PREF ALWAYS IN INCOMING OUTGOING sync Mode Button get Selection TeamUI Plugin get Plugin save Plugin Preferences return true  performOk IPreferenceStore getPreferenceStore setValue ISharedImages PREF_ALWAYS_IN_INCOMING_OUTGOING syncModeButton getSelection TeamUIPlugin getPlugin savePluginPreferences
Initializes states of the controls from the preference store private void initialize Values I Preference Store store get Preference Store sync Mode Button set Selection store get Boolean I Shared Images PREF ALWAYS IN INCOMING OUTGOING  initializeValues IPreferenceStore getPreferenceStore syncModeButton setSelection getBoolean ISharedImages PREF_ALWAYS_IN_INCOMING_OUTGOING
see I Workbench Preference Page init I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench

String ext String value public Table Entry String ext String value this ext ext this value value  TableEntry
this value value public String get Extension return ext  getExtension
return ext public String get Value return value  getValue
return value public void set Value String value this value value  setValue
class Table Label Provider extends Label Provider implements I Table Label Provider public String get Column Text Object element int column Index Table Entry entry Table Entry element switch column Index case 0 return entry get Extension case 1 return entry get Value default return null  TableLabelProvider LabelProvider ITableLabelProvider getColumnText columnIndex TableEntry TableEntry columnIndex getExtension getValue
public Image get Column Image Object element int column Index return null  getColumnImage columnIndex
Method declared on I Workbench Preference Page public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench
table set Layout Data gd table add Listener SWT Selection new Listener public void handle Event Event e handle Selection  setLayoutData addListener handleEvent handleSelection
viewer set Cell Modifier new I Cell Modifier public Object get Value Object element String property String value Table Entry element get Value if value equals TEXT return new Integer 0 else return new Integer 1  setCellModifier ICellModifier getValue TableEntry getValue
public boolean can Modify Object element String property return true  canModify
public void modify Object element String property Object value I Structured Selection selection I Structured Selection viewer get Selection Table Entry entry Table Entry selection get First Element if Integer value int Value 0 entry set Value TEXT else entry set Value BINARY viewer refresh entry  IStructuredSelection IStructuredSelection getSelection TableEntry TableEntry getFirstElement intValue setValue setValue
viewer set Label Provider new Table Label Provider viewer set Content Provider new I Structured Content Provider public void dispose  setLabelProvider TableLabelProvider setContentProvider IStructuredContentProvider
public void dispose public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
public void input Changed Viewer viewer Object old Input Object new Input public Object get Elements Object input Element if input Element null return null return List input Element to Array  inputChanged oldInput newInput getElements inputElement inputElement inputElement toArray
viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event I Selection selection event get Selection if selection null selection instanceof I Structured Selection return viewer edit Element I Structured Selection selection get First Element 1  addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent ISelection getSelection IStructuredSelection editElement IStructuredSelection getFirstElement
viewer set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 Table Entry entry1 Table Entry e1 Table Entry entry2 Table Entry e2 return super compare viewer entry1 get Extension entry2 get Extension  setSorter ViewerSorter TableEntry TableEntry TableEntry TableEntry getExtension getExtension
add Button set Layout Data data add Button add Listener SWT Selection new Listener public void handle Event Event e add Pattern  addButton setLayoutData addButton addListener handleEvent addPattern
change Button set Enabled false change Button add Listener SWT Selection new Listener public void handle Event Event e change Pattern  changeButton setEnabled changeButton addListener handleEvent changePattern
remove Button set Enabled false remove Button add Listener SWT Selection new Listener public void handle Event Event e remove Pattern  removeButton setEnabled removeButton addListener handleEvent removePattern
protected Control create Contents Composite ancestor Composite parent new Composite ancestor SWT NULL Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 layout num Columns 2 parent set Layout layout set F1 help Workbench Help set Help parent I Help Context Ids FILE TYPE PREFERENCE PAGE Label l1 new Label parent SWT NULL l1 set Text Policy bind Text Preference Page description NON NLS 1 Grid Data data new Grid Data Grid Data VERTICAL ALIGN BEGINNING data horizontal Span 2 l1 set Layout Data data viewer new Table Viewer parent SWT MULTI SWT FULL SELECTION SWT H SCROLL SWT V SCROLL SWT BORDER Table table viewer get Table new Table Editor table table set Header Visible true table set Lines Visible true Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint convert Width In Chars To Pixels 30 The hardcoded hint does not look elegant but in reality it does not make anything bound to this 100 pixel value because in any case the tree on the left is taller and that s what really determines the height gd height Hint 100 table set Layout Data gd table add Listener SWT Selection new Listener public void handle Event Event e handle Selection Create the table columns new Table Column table SWT NULL new Table Column table SWT NULL Table Column columns table get Columns columns 0 set Text Policy bind Text Preference Page extension NON NLS 1 columns 1 set Text Policy bind Text Preference Page contents NON NLS 1 Cell Editor editor new Combo Box Cell Editor table new String TEXT BINARY viewer set Cell Editors new Cell Editor null editor viewer set Column Properties new String extension contents NON NLS 1 NON NLS 2 viewer set Cell Modifier new I Cell Modifier public Object get Value Object element String property String value Table Entry element get Value if value equals TEXT return new Integer 0 else return new Integer 1 public boolean can Modify Object element String property return true public void modify Object element String property Object value I Structured Selection selection I Structured Selection viewer get Selection Table Entry entry Table Entry selection get First Element if Integer value int Value 0 entry set Value TEXT else entry set Value BINARY viewer refresh entry viewer set Label Provider new Table Label Provider viewer set Content Provider new I Structured Content Provider public void dispose public void input Changed Viewer viewer Object old Input Object new Input public Object get Elements Object input Element if input Element null return null return List input Element to Array viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event I Selection selection event get Selection if selection null selection instanceof I Structured Selection return viewer edit Element I Structured Selection selection get First Element 1 viewer set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 Table Entry entry1 Table Entry e1 Table Entry entry2 Table Entry e2 return super compare viewer entry1 get Extension entry2 get Extension Table Layout tl new Table Layout tl add Column Data new Column Weight Data 50 tl add Column Data new Column Weight Data 50 table set Layout tl Composite buttons new Composite parent SWT NULL buttons set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING layout new Grid Layout layout margin Height 0 layout margin Width 0 buttons set Layout layout Button add Button new Button buttons SWT PUSH add Button set Text Policy bind Text Preference Page add NON NLS 1 data new Grid Data data horizontal Alignment Grid Data FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint add Button compute Size SWT DEFAULT SWT DEFAULT true x add Button set Layout Data data add Button add Listener SWT Selection new Listener public void handle Event Event e add Pattern change Button new Button buttons SWT PUSH change Button set Text Policy bind Text Preference Page change NON NLS 1 data new Grid Data data horizontal Alignment Grid Data FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint change Button compute Size SWT DEFAULT SWT DEFAULT true x change Button set Layout Data data change Button set Enabled false change Button add Listener SWT Selection new Listener public void handle Event Event e change Pattern remove Button new Button buttons SWT PUSH remove Button set Text Policy bind Text Preference Page remove NON NLS 1 data new Grid Data data horizontal Alignment Grid Data FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint remove Button compute Size SWT DEFAULT SWT DEFAULT true x remove Button set Layout Data data remove Button set Enabled false remove Button add Listener SWT Selection new Listener public void handle Event Event e remove Pattern fill Table Team get All Types Dialog apply Dialog Font parent return parent  createContents GridLayout GridLayout marginWidth marginHeight numColumns setLayout WorkbenchHelp setHelp IHelpContextIds FILE_TYPE_PREFERENCE_PAGE setText TextPreferencePage GridData GridData GridData VERTICAL_ALIGN_BEGINNING horizontalSpan setLayoutData TableViewer FULL_SELECTION H_SCROLL V_SCROLL getTable TableEditor setHeaderVisible setLinesVisible GridData GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels heightHint setLayoutData addListener handleEvent handleSelection TableColumn TableColumn TableColumn getColumns setText TextPreferencePage setText TextPreferencePage CellEditor ComboBoxCellEditor setCellEditors CellEditor setColumnProperties setCellModifier ICellModifier getValue TableEntry getValue canModify IStructuredSelection IStructuredSelection getSelection TableEntry TableEntry getFirstElement intValue setValue setValue setLabelProvider TableLabelProvider setContentProvider IStructuredContentProvider inputChanged oldInput newInput getElements inputElement inputElement inputElement toArray addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent ISelection getSelection IStructuredSelection editElement IStructuredSelection getFirstElement setSorter ViewerSorter TableEntry TableEntry TableEntry TableEntry getExtension getExtension TableLayout TableLayout addColumnData ColumnWeightData addColumnData ColumnWeightData setLayout setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING GridLayout marginHeight marginWidth setLayout addButton addButton setText TextPreferencePage GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint addButton computeSize addButton setLayoutData addButton addListener handleEvent addPattern changeButton changeButton setText TextPreferencePage GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint changeButton computeSize changeButton setLayoutData changeButton setEnabled changeButton addListener handleEvent changePattern removeButton removeButton setText TextPreferencePage GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint removeButton computeSize removeButton setLayoutData removeButton setEnabled removeButton addListener handleEvent removePattern fillTable getAllTypes applyDialogFont
protected void perform Defaults super perform Defaults I File Type Info infos Team get Default Types fill Table infos  performDefaults performDefaults IFileTypeInfo getDefaultTypes fillTable
Do anything necessary because the OK button has been pressed return whether it is okay to close the preference page public boolean perform Ok int size input size String extensions new String size int types new int size int i 0 Iterator it input iterator while it has Next Table Entry entry Table Entry it next String value entry get Value if value equals TEXT types i Team TEXT else types i Team BINARY extensions i entry get Extension i Team set All Types extensions types return true  performOk hasNext TableEntry TableEntry getValue getExtension setAllTypes
Fill the table with the values from the file type registry private void fill Table I File Type Info infos this input new Array List for int i 0 i infos length i I File Type Info info infos i int type info get Type switch type case Team TEXT input add new Table Entry info get Extension TEXT break case Team BINARY input add new Table Entry info get Extension BINARY break viewer set Input input  fillTable IFileTypeInfo ArrayList IFileTypeInfo getType TableEntry getExtension TableEntry getExtension setInput
Add a new item to the table with the default type of Text private void add Pattern Input Dialog dialog new Input Dialog get Shell Policy bind Text Preference Page enter Extension Short Policy bind Text Preference Page enter Extension Long null null NON NLS 1 NON NLS 2 dialog open if dialog get Return Code Input Dialog OK return String pattern dialog get Value if pattern equals return NON NLS 1 Check if the item already exists Iterator it input iterator while it has Next Table Entry entry Table Entry it next if entry get Extension equals pattern Message Dialog open Warning get Shell Policy bind Text Preference Page extension Exists Short Policy bind Text Preference Page extension Exists Long NON NLS 1 NON NLS 2 return input add new Table Entry pattern TEXT viewer refresh  addPattern InputDialog InputDialog getShell TextPreferencePage enterExtensionShort TextPreferencePage enterExtensionLong getReturnCode InputDialog getValue hasNext TableEntry TableEntry getExtension MessageDialog openWarning getShell TextPreferencePage extensionExistsShort TextPreferencePage extensionExistsLong TableEntry
Remove the selected items from the table private void remove Pattern I Selection selection viewer get Selection if selection null selection instanceof I Structured Selection return I Structured Selection ss I Structured Selection selection Iterator it ss iterator while it has Next Table Entry entry Table Entry it next input remove entry viewer refresh  removePattern ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection hasNext TableEntry TableEntry
Toggle the selected items content types private void change Pattern I Selection selection viewer get Selection if selection null selection instanceof I Structured Selection return I Structured Selection ss I Structured Selection selection Iterator it ss iterator while it has Next Table Entry entry Table Entry it next String string entry get Value if string equals TEXT entry set Value BINARY else entry set Value TEXT viewer refresh entry  changePattern ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection hasNext TableEntry TableEntry getValue setValue setValue
The table viewer selection has changed Update the remove and change button enablement private void handle Selection boolean empty viewer get Selection is Empty remove Button set Enabled empty change Button set Enabled empty  handleSelection getSelection isEmpty removeButton setEnabled changeButton setEnabled

see Content Handler start Element String String String Attributes public void start Element String namespaceURI String local Name String q Name Attributes atts throws SAX Exception String element Name get Element Name namespaceURI local Name q Name if element Name equals psf NON NLS 1 NON NLS 2 map new Hash Map in Psf true String version atts get Value version NON NLS 1 is Version One version equals 1 0 NON NLS 1 return if is Version One return if element Name equals provider NON NLS 1 NON NLS 2 if in Psf throw new SAX Exception Policy bind Project Set Content Handler Element provider must be contained in element psf 4 NON NLS 1 in Provider true id atts get Value id NON NLS 1 references new Array List return if element Name equals project NON NLS 1 NON NLS 2 if in Provider throw new SAX Exception Policy bind Project Set Content Handler Element project must be contained in element provider 7 NON NLS 1 in Project true String reference atts get Value reference NON NLS 1 references add reference return  ContentHandler startElement startElement localName qName SAXException elementName getElementName localName qName elementName HashMap inPsf getValue isVersionOne isVersionOne elementName inPsf SAXException ProjectSetContentHandler Element_provider_must_be_contained_in_element_psf_4 inProvider getValue ArrayList elementName inProvider SAXException ProjectSetContentHandler Element_project_must_be_contained_in_element_provider_7 inProject getValue
see Content Handler end Element String String String public void end Element String namespaceURI String local Name String q Name throws SAX Exception String element Name get Element Name namespaceURI local Name q Name if element Name equals psf NON NLS 1 NON NLS 2 in Psf false return if is Version One return if element Name equals provider NON NLS 1 NON NLS 2 map put id references references null in Provider false return if element Name equals project NON NLS 1 NON NLS 2 in Project false return  ContentHandler endElement endElement localName qName SAXException elementName getElementName localName qName elementName inPsf isVersionOne elementName inProvider elementName inProject
public Map get References return map  getReferences
public boolean is Version One return is Version One  isVersionOne isVersionOne
private String get Element Name String namespaceURI String local Name String q Name if local Name null local Name length 0 return local Name else return q Name  getElementName localName qName localName localName localName qName

protected static Hashtable extension Points new Hashtable The constructor protected Registry Reader  extensionPoints RegistryReader
This method extracts description as a subelement of the given element return description string if defined or empty string if not protected String get Description I Configuration Element config I Configuration Element children config get Children TAG DESCRIPTION if children length 1 return children 0 get Value return NON NLS 1  getDescription IConfigurationElement IConfigurationElement getChildren TAG_DESCRIPTION getValue
Logs the error in the workbench log using the provided text and the information in the configuration element protected void log Error I Configuration Element element String text I Extension extension element get Declaring Extension I Plugin Descriptor descriptor extension get Declaring Plugin Descriptor String Buffer buf new String Buffer buf append Plugin descriptor get Unique Identifier extension extension get Extension Point Unique Identifier NON NLS 2 NON NLS 1 buf append n text NON NLS 1 Workbench Plugin log buf to String  logError IConfigurationElement IExtension getDeclaringExtension IPluginDescriptor getDeclaringPluginDescriptor StringBuffer StringBuffer getUniqueIdentifier getExtensionPointUniqueIdentifier WorkbenchPlugin toString
Logs a very common registry error when a required attribute is missing protected void log Missing Attribute I Configuration Element element String attribute Name log Error element Required attribute attribute Name not defined NON NLS 2 NON NLS 1  logMissingAttribute IConfigurationElement attributeName logError attributeName
Logs a very common registry error when a required child is missing protected void log Missing Element I Configuration Element element String element Name log Error element Required sub element element Name not defined NON NLS 2 NON NLS 1  logMissingElement IConfigurationElement elementName logError elementName
Logs a registry error when the configuration element is unknown protected void log Unknown Element I Configuration Element element log Error element Unknown extension tag found element get Name NON NLS 1  logUnknownElement IConfigurationElement logError getName
Sorter sorter new Sorter public boolean compare Object extension1 Object extension2 String s1 I Extension extension1 get Declaring Plugin Descriptor get Unique Identifier String s2 I Extension extension2 get Declaring Plugin Descriptor get Unique Identifier Return true if element Two is greater than element One return s2 compare To Ignore Case s1 0  IExtension getDeclaringPluginDescriptor getUniqueIdentifier IExtension getDeclaringPluginDescriptor getUniqueIdentifier elementTwo elementOne compareToIgnoreCase
Apply a reproducable order to the list of extensions provided such that the order will not change as extensions are added or removed protected I Extension order Extensions I Extension extensions By default the order is based on plugin id sorted in ascending order The order for a plugin providing more than one extension for an extension point is dependent in the order listed in the XML file Sorter sorter new Sorter public boolean compare Object extension1 Object extension2 String s1 I Extension extension1 get Declaring Plugin Descriptor get Unique Identifier String s2 I Extension extension2 get Declaring Plugin Descriptor get Unique Identifier Return true if element Two is greater than element One return s2 compare To Ignore Case s1 0 Object sorted sorter sort extensions I Extension sorted Extension new I Extension sorted length System arraycopy sorted 0 sorted Extension 0 sorted length return sorted Extension  IExtension orderExtensions IExtension IExtension getDeclaringPluginDescriptor getUniqueIdentifier IExtension getDeclaringPluginDescriptor getUniqueIdentifier elementTwo elementOne compareToIgnoreCase IExtension sortedExtension IExtension sortedExtension sortedExtension
Implement this method to read element s attributes If children should also be read then implementor is responsible for calling code read Element Children code Implementor is also responsible for logging missing attributes return true if element was recognized false if not  readElementChildren
protected abstract boolean read Element I Configuration Element element Read the element s children This is called by the subclass read Element method when it wants to read the children of the element protected void read Element Children I Configuration Element element read Elements element get Children  readElement IConfigurationElement readElement readElementChildren IConfigurationElement readElements getChildren
Read each element one at a time by calling the subclass implementation of code read Element code Logs an error if the element was not recognized protected void read Elements I Configuration Element elements for int i 0 i elements length i if read Element elements i log Unknown Element elements i  readElement readElements IConfigurationElement readElement logUnknownElement
Read one extension by looping through its configuration elements protected void read Extension I Extension extension read Elements extension get Configuration Elements  readExtension IExtension readElements getConfigurationElements
Start the registry reading process using the supplied plugin ID and extension point public void read Registry I Plugin Registry registry String plugin Id String extension Point String point Id plugin Id extension Point NON NLS 1 I Extension extensions I Extension extension Points get point Id if extensions null I Extension Point point registry get Extension Point plugin Id extension Point if point null return extensions point get Extensions extension Points put point Id extensions for int i 0 i extensions length i read Extension extensions i  readRegistry IPluginRegistry pluginId extensionPoint pointId pluginId extensionPoint IExtension IExtension extensionPoints pointId IExtensionPoint getExtensionPoint pluginId extensionPoint getExtensions extensionPoints pointId readExtension

Create a new View Descriptor for an extension public Synchronize Participant Descriptor I Configuration Element e String desc throws Core Exception config Element e description desc load From Extension  ViewDescriptor SynchronizeParticipantDescriptor IConfigurationElement CoreException configElement loadFromExtension
public I Configuration Element get Configuration Element return config Element  IConfigurationElement getConfigurationElement configElement
Returns this view s description This is the value of its code description code attribute return the description public String get Description return description  getDescription
public String get Id return id  getId
public String get Type return type  getType
public Image Descriptor get Image Descriptor if image Descriptor null return image Descriptor String icon Name config Element get Attribute ATT ICON if icon Name null return null image Descriptor TeamUI Plugin get Image Descriptor From Extension config Element get Declaring Extension icon Name return image Descriptor  ImageDescriptor getImageDescriptor imageDescriptor imageDescriptor iconName configElement getAttribute ATT_ICON iconName imageDescriptor TeamUIPlugin getImageDescriptorFromExtension configElement getDeclaringExtension iconName imageDescriptor
public String get Name return label  getName
see org eclipse team ui synchronize I Synchronize Participant Descriptor is Persistent public boolean is Persistent return persistent  ISynchronizeParticipantDescriptor isPersistent isPersistent
load a view descriptor from the registry private void load From Extension throws Core Exception String identifier config Element get Attribute ATT ID label config Element get Attribute ATT NAME class Name config Element get Attribute ATT CLASS type config Element get Attribute ATT TYPE String persistent String config Element get Attribute ATT PERSISTENT if persistent String null persistent true else persistent Boolean value Of persistent String boolean Value Sanity check if label null class Name null identifier null throw new Core Exception new Status I Status ERROR config Element get Declaring Extension get Declaring Plugin Descriptor get Unique Identifier 0 Invalid extension missing label or class name identifier NON NLS 1 null id identifier  loadFromExtension CoreException configElement getAttribute ATT_ID configElement getAttribute ATT_NAME className configElement getAttribute ATT_CLASS configElement getAttribute ATT_TYPE persistentString configElement getAttribute ATT_PERSISTENT persistentString valueOf persistentString booleanValue className CoreException IStatus configElement getDeclaringExtension getDeclaringPluginDescriptor getUniqueIdentifier
Returns a string representation of this descriptor For debugging purposes only public String to String return Synchronize Participant get Id NON NLS 2 NON NLS 1  toString getId

private Map participants new Hash Map public Synchronize Participant Registry super  HashMap SynchronizeParticipantRegistry
protected boolean read Element I Configuration Element element if element get Name equals TAG SYNCPARTICIPANT String desc Text get Description element Synchronize Participant Descriptor desc try desc new Synchronize Participant Descriptor element desc Text participants put desc get Id desc catch Core Exception e TeamUI Plugin log e return true return false  readElement IConfigurationElement getName TAG_SYNCPARTICIPANT descText getDescription SynchronizeParticipantDescriptor SynchronizeParticipantDescriptor descText getId CoreException TeamUIPlugin
public Synchronize Participant Descriptor get Synchronize Participants return Synchronize Participant Descriptor participants values to Array new Synchronize Participant Descriptor participants size  SynchronizeParticipantDescriptor getSynchronizeParticipants SynchronizeParticipantDescriptor toArray SynchronizeParticipantDescriptor
public Synchronize Participant Descriptor find String id return Synchronize Participant Descriptor participants get id  SynchronizeParticipantDescriptor SynchronizeParticipantDescriptor

private I Configuration Element config Element public Synchronize Wizard Description I Configuration Element e String desc Text throws Core Exception config Element e load From Extension  IConfigurationElement configElement SynchronizeWizardDescription IConfigurationElement descText CoreException configElement loadFromExtension
public I Wizard create Wizard throws Core Exception Object obj Workbench Plugin create Extension config Element ATT CLASS return I Wizard obj  IWizard createWizard CoreException WorkbenchPlugin createExtension configElement ATT_CLASS IWizard
private void load From Extension throws Core Exception String identifier config Element get Attribute ATT ID label config Element get Attribute ATT NAME class Name config Element get Attribute ATT CLASS description config Element get Attribute ATT DESCRIPTION Sanity check if label null class Name null identifier null description null throw new Core Exception new Status I Status ERROR config Element get Declaring Extension get Declaring Plugin Descriptor get Unique Identifier 0 Invalid extension missing label or class name identifier NON NLS 1 null id identifier  loadFromExtension CoreException configElement getAttribute ATT_ID configElement getAttribute ATT_NAME className configElement getAttribute ATT_CLASS configElement getAttribute ATT_DESCRIPTION className CoreException IStatus configElement getDeclaringExtension getDeclaringPluginDescriptor getUniqueIdentifier
public String get Id return id  getId
public String get Description return description  getDescription
public Image Descriptor get Image Descriptor if image Descriptor null return image Descriptor String icon Name config Element get Attribute ATT ICON if icon Name null return null image Descriptor TeamUI Plugin get Image Descriptor From Extension config Element get Declaring Extension icon Name return image Descriptor  ImageDescriptor getImageDescriptor imageDescriptor imageDescriptor iconName configElement getAttribute ATT_ICON iconName imageDescriptor TeamUIPlugin getImageDescriptorFromExtension configElement getDeclaringExtension iconName imageDescriptor
public String get Name return label  getName
public String to String return Synchronize Participant Creation Wizard get Id NON NLS 2 NON NLS 1  toString getId

protected boolean read Element I Configuration Element element if element get Name equals TAG SYNCHRONIZE WIZARD String desc Text get Description element Synchronize Wizard Description desc try desc new Synchronize Wizard Description element desc Text wizards put desc get Id desc catch Core Exception e TeamUI Plugin log e return true return false  readElement IConfigurationElement getName TAG_SYNCHRONIZE_WIZARD descText getDescription SynchronizeWizardDescription SynchronizeWizardDescription descText getId CoreException TeamUIPlugin
public Synchronize Wizard Description get Synchronize Wizards return Synchronize Wizard Description wizards values to Array new Synchronize Wizard Description wizards size  SynchronizeWizardDescription getSynchronizeWizards SynchronizeWizardDescription toArray SynchronizeWizardDescription
public Synchronize Wizard Description find String id return Synchronize Wizard Description wizards get id  SynchronizeWizardDescription SynchronizeWizardDescription

public Action Delegate Wrapper I Action Delegate delegate I Synchronize Page Configuration configuration this delegate delegate I Workbench Part part configuration get Site get Part if part null if delegate instanceof I Object Action Delegate I Object Action Delegate delegate set Active Part this part if part instanceof I View Part delegate instanceof I View Action Delegate I View Action Delegate delegate init I View Part part if part instanceof I Editor Part delegate instanceof I View Action Delegate I Editor Action Delegate delegate set Active Editor this I Editor Part part initialize configuration  ActionDelegateWrapper IActionDelegate ISynchronizePageConfiguration IWorkbenchPart getSite getPart IObjectActionDelegate IObjectActionDelegate setActivePart IViewPart IViewActionDelegate IViewActionDelegate IViewPart IEditorPart IViewActionDelegate IEditorActionDelegate setActiveEditor IEditorPart
configuration get Site get Selection Provider add Selection Changed Listener this configuration get Page get Viewer get Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e configuration get Site get Selection Provider remove Selection Changed Listener Action Delegate Wrapper this  getSite getSelectionProvider addSelectionChangedListener getPage getViewer getControl addDisposeListener DisposeListener widgetDisposed DisposeEvent getSite getSelectionProvider removeSelectionChangedListener ActionDelegateWrapper
Method invoked from the constructor when a configuration is provided The default implementation registers the action as a selection change listener Subclass may override param configuration the synchronize page configuration protected void initialize final I Synchronize Page Configuration configuration configuration get Site get Selection Provider add Selection Changed Listener this configuration get Page get Viewer get Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e configuration get Site get Selection Provider remove Selection Changed Listener Action Delegate Wrapper this  ISynchronizePageConfiguration getSite getSelectionProvider addSelectionChangedListener getPage getViewer getControl addDisposeListener DisposeListener widgetDisposed DisposeEvent getSite getSelectionProvider removeSelectionChangedListener ActionDelegateWrapper
see org eclipse jface viewers I Selection Changed Listener selection Changed org eclipse jface viewers Selection Changed Event public void selection Changed Selection Changed Event event get Delegate selection Changed this event get Selection  ISelectionChangedListener selectionChanged SelectionChangedEvent selectionChanged SelectionChangedEvent getDelegate selectionChanged getSelection
see org eclipse jface action I Action run public void run get Delegate run this  IAction getDelegate
Return the delegate associated with this action return the delegate associated with this action public I Action Delegate get Delegate return delegate  IActionDelegate getDelegate

refactor Actions new Refactor Action Group site configuration set Property Synchronize Page Configuration P OPEN ACTION new Action public void run open With Actions open In Compare Editor  refactorActions RefactorActionGroup setProperty SynchronizePageConfiguration P_OPEN_ACTION openWithActions openInCompareEditor
public void initialize I Synchronize Page Configuration configuration super initialize configuration I Synchronize Page Site site configuration get Site I Workbench Site ws site get Workbench Site if ws instanceof I View Site open With Actions new Open With Action Group site configuration get Participant get Name refactor Actions new Refactor Action Group site configuration set Property Synchronize Page Configuration P OPEN ACTION new Action public void run open With Actions open In Compare Editor else TODO Add open menu action which opens in compare editor input  ISynchronizePageConfiguration ISynchronizePageSite getSite IWorkbenchSite getWorkbenchSite IViewSite openWithActions OpenWithActionGroup getParticipant getName refactorActions RefactorActionGroup setProperty SynchronizePageConfiguration P_OPEN_ACTION openWithActions openInCompareEditor
public void fill Context Menu I Menu Manager manager I Contribution Item group find Group manager I Synchronize Page Configuration FILE GROUP if open With Actions null group null open With Actions fill Context Menu manager group get Id group find Group manager I Synchronize Page Configuration EDIT GROUP if refactor Actions null group null refactor Actions fill Context Menu manager group get Id  fillContextMenu IMenuManager IContributionItem findGroup ISynchronizePageConfiguration FILE_GROUP openWithActions openWithActions fillContextMenu getId findGroup ISynchronizePageConfiguration EDIT_GROUP refactorActions refactorActions fillContextMenu getId
public void dispose if refactor Actions null refactor Actions dispose if open With Actions null open With Actions dispose super dispose  refactorActions refactorActions openWithActions openWithActions

public Direction Filter Action String prefix String command Id int mode Id super AS RADIO BUTTON NON NLS 1 this mode Id mode Id Utils init Action this prefix Policy get Bundle  DirectionFilterAction commandId modeId AS_RADIO_BUTTON modeId modeId initAction getBundle
public void run if is Checked configuration set Mode mode Id  isChecked setMode modeId
public int get Mode Id return mode Id  getModeId modeId
Creates a direction filter group with the given supported modes The possible values for modes are defined by the link Subscriber Participant class see Subscriber Participant BOTH MODE see Subscriber Participant OUTGOING MODE see Subscriber Participant INCOMING MODE see Subscriber Participant CONFLICTING MODE see Subscriber Participant ALL MODES param participant the participant showing this group param supported Modes the modes to be shown public Direction Filter Action Group I Synchronize Page Configuration configuration this configuration configuration create Actions configuration add Property Change Listener this check Mode configuration get Mode  SubscriberParticipant SubscriberParticipant BOTH_MODE SubscriberParticipant OUTGOING_MODE SubscriberParticipant INCOMING_MODE SubscriberParticipant CONFLICTING_MODE SubscriberParticipant ALL_MODES supportedModes DirectionFilterActionGroup ISynchronizePageConfiguration createActions addPropertyChangeListener checkMode getMode
Sets up the sync modes and the actions for switching between them private void create Actions Create the actions int supported Modes configuration get Supported Modes if supported Modes 0 return int current Mode configuration get Mode if supported Modes current Mode 0 current Mode get Supported Mode supported Modes if current Mode 0 return configuration set Mode current Mode if supported Modes I Synchronize Page Configuration INCOMING MODE 0 incoming Mode new Direction Filter Action action direction Filter Incoming org eclipse team ui syncview incoming Filter I Synchronize Page Configuration INCOMING MODE NON NLS 1 NON NLS 2 actions add incoming Mode incoming Mode set Checked current Mode I Synchronize Page Configuration INCOMING MODE if supported Modes I Synchronize Page Configuration OUTGOING MODE 0 outgoing Mode new Direction Filter Action action direction Filter Outgoing org eclipse team ui syncview outgoing Filter I Synchronize Page Configuration OUTGOING MODE NON NLS 1 NON NLS 2 actions add outgoing Mode outgoing Mode set Checked current Mode I Synchronize Page Configuration OUTGOING MODE if supported Modes I Synchronize Page Configuration BOTH MODE 0 both Mode new Direction Filter Action action direction Filter Both org eclipse team ui syncview both Filter I Synchronize Page Configuration BOTH MODE NON NLS 1 NON NLS 2 actions add both Mode both Mode set Checked current Mode I Synchronize Page Configuration BOTH MODE if supported Modes I Synchronize Page Configuration CONFLICTING MODE 0 conflicts Mode new Direction Filter Action action direction Filter Conflicts org eclipse team ui syncview conflicts Filter I Synchronize Page Configuration CONFLICTING MODE NON NLS 1 NON NLS 2 actions add conflicts Mode conflicts Mode set Checked current Mode I Synchronize Page Configuration CONFLICTING MODE  createActions supportedModes getSupportedModes supportedModes currentMode getMode supportedModes currentMode currentMode getSupportedMode supportedModes currentMode setMode currentMode supportedModes ISynchronizePageConfiguration INCOMING_MODE incomingMode DirectionFilterAction directionFilterIncoming incomingFilter ISynchronizePageConfiguration INCOMING_MODE incomingMode incomingMode setChecked currentMode ISynchronizePageConfiguration INCOMING_MODE supportedModes ISynchronizePageConfiguration OUTGOING_MODE outgoingMode DirectionFilterAction directionFilterOutgoing outgoingFilter ISynchronizePageConfiguration OUTGOING_MODE outgoingMode outgoingMode setChecked currentMode ISynchronizePageConfiguration OUTGOING_MODE supportedModes ISynchronizePageConfiguration BOTH_MODE bothMode DirectionFilterAction directionFilterBoth bothFilter ISynchronizePageConfiguration BOTH_MODE bothMode bothMode setChecked currentMode ISynchronizePageConfiguration BOTH_MODE supportedModes ISynchronizePageConfiguration CONFLICTING_MODE conflictsMode DirectionFilterAction directionFilterConflicts conflictsFilter ISynchronizePageConfiguration CONFLICTING_MODE conflictsMode conflictsMode setChecked currentMode ISynchronizePageConfiguration CONFLICTING_MODE
param supported Modes return private int get Supported Mode int supported Modes if supported Modes I Synchronize Page Configuration INCOMING MODE 0 return I Synchronize Page Configuration INCOMING MODE if supported Modes I Synchronize Page Configuration OUTGOING MODE 0 return I Synchronize Page Configuration OUTGOING MODE if supported Modes I Synchronize Page Configuration BOTH MODE 0 return I Synchronize Page Configuration BOTH MODE if supported Modes I Synchronize Page Configuration CONFLICTING MODE 0 return I Synchronize Page Configuration CONFLICTING MODE return 0  supportedModes getSupportedMode supportedModes supportedModes ISynchronizePageConfiguration INCOMING_MODE ISynchronizePageConfiguration INCOMING_MODE supportedModes ISynchronizePageConfiguration OUTGOING_MODE ISynchronizePageConfiguration OUTGOING_MODE supportedModes ISynchronizePageConfiguration BOTH_MODE ISynchronizePageConfiguration BOTH_MODE supportedModes ISynchronizePageConfiguration CONFLICTING_MODE ISynchronizePageConfiguration CONFLICTING_MODE
public void fill Action Bars I Action Bars action Bars String group super fill Action Bars action Bars I Tool Bar Manager tool Bar action Bars get Tool Bar Manager for Iterator it actions iterator it has Next Direction Filter Action action Direction Filter Action it next if group null tool Bar append To Group group action else tool Bar add action  fillActionBars IActionBars actionBars fillActionBars actionBars IToolBarManager toolBar actionBars getToolBarManager hasNext DirectionFilterAction DirectionFilterAction toolBar appendToGroup toolBar
public void fill Tool Bar String group Id I Tool Bar Manager tool Bar for Iterator it actions iterator it has Next Direction Filter Action action Direction Filter Action it next tool Bar append To Group group Id action  fillToolBar groupId IToolBarManager toolBar hasNext DirectionFilterAction DirectionFilterAction toolBar appendToGroup groupId
public void fill Menu I Contribution Manager manager for Iterator it actions iterator it has Next Direction Filter Action action Direction Filter Action it next manager add action  fillMenu IContributionManager hasNext DirectionFilterAction DirectionFilterAction
private void check Mode int mode for Iterator it actions iterator it has Next Direction Filter Action action Direction Filter Action it next if action get Mode Id mode action set Checked true else action set Checked false  checkMode hasNext DirectionFilterAction DirectionFilterAction getModeId setChecked setChecked
public void property Change Property Change Event event if event get Property equals I Synchronize Page Configuration P MODE Integer mode Integer event get New Value check Mode mode int Value  propertyChange PropertyChangeEvent getProperty ISynchronizePageConfiguration P_MODE getNewValue checkMode intValue
see org eclipse ui actions Action Group dispose public void dispose super dispose  ActionGroup

private final Abstract Tree Viewer viewer public Expand All Action Abstract Tree Viewer viewer this viewer viewer viewer add Selection Changed Listener this  AbstractTreeViewer ExpandAllAction AbstractTreeViewer addSelectionChangedListener
viewer add Selection Changed Listener this public void run expand All From Selection  addSelectionChangedListener expandAllFromSelection
protected void expand All From Selection Abstract Tree Viewer tree viewer if tree null return I Selection selection tree get Selection if selection is Empty Iterator elements I Structured Selection selection iterator try tree get Control set Redraw false while elements has Next Object next elements next tree expand To Level next Abstract Tree Viewer ALL LEVELS finally tree get Control set Redraw true  expandAllFromSelection AbstractTreeViewer ISelection getSelection isEmpty IStructuredSelection getControl setRedraw hasNext expandToLevel AbstractTreeViewer ALL_LEVELS getControl setRedraw
public void selection Changed Selection Changed Event event I Selection selection event get Selection if selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection set Enabled ss is Empty return set Enabled false  selectionChanged SelectionChangedEvent ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection setEnabled isEmpty setEnabled

public void run TeamUI Plugin get Plugin get Preference Store set Value I Preference Ids SYNCHRONIZING DEFAULT PARTICIPANT participant get Id TeamUI Plugin get Plugin get Preference Store set Value I Preference Ids SYNCHRONIZING DEFAULT PARTICIPANT SEC ID participant get Secondary Id Global Refresh Action this run participant  TeamUIPlugin getPlugin getPreferenceStore setValue IPreferenceIds SYNCHRONIZING_DEFAULT_PARTICIPANT getId TeamUIPlugin getPlugin getPreferenceStore setValue IPreferenceIds SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID getSecondaryId GlobalRefreshAction
public Refresh Participant Action int prefix I Synchronize Participant Reference participant super prefix Utils shorten Text Synchronize View MAX NAME LENGTH participant get Display Name NON NLS 1 NON NLS 2 this participant participant set Image Descriptor participant get Descriptor get Image Descriptor  RefreshParticipantAction ISynchronizeParticipantReference shortenText SynchronizeView MAX_NAME_LENGTH getDisplayName setImageDescriptor getDescriptor getImageDescriptor
synchronize Action new Action Policy bind Global Refresh Action 4 NON NLS 1 public void run I Wizard wizard new Global Synchronize Wizard Wizard Dialog dialog new Wizard Dialog window get Shell wizard dialog open  synchronizeAction GlobalRefreshAction IWizard GlobalSynchronizeWizard WizardDialog WizardDialog getShell
public Global Refresh Action synchronize Action new Action Policy bind Global Refresh Action 4 NON NLS 1 public void run I Wizard wizard new Global Synchronize Wizard Wizard Dialog dialog new Wizard Dialog window get Shell wizard dialog open synchronize Action set Image Descriptor Team Images get Image Descriptor I TeamUI Images IMG SYNC VIEW hook up actions to the commands I Handler handler new Action Handler synchronize Action sync All new Handler Submission null null null org eclipse team ui synchronize All handler Priority MEDIUM NON NLS 1 PlatformUI get Workbench get Command Support add Handler Submission sync All handler new Action Handler this sync Latest new Handler Submission null null null org eclipse team ui synchronize Last handler Priority MEDIUM NON NLS 1 PlatformUI get Workbench get Command Support add Handler Submission sync Latest set Menu Creator this TeamUI get Synchronize Manager add Synchronize Participant Listener this  GlobalRefreshAction synchronizeAction GlobalRefreshAction IWizard GlobalSynchronizeWizard WizardDialog WizardDialog getShell synchronizeAction setImageDescriptor TeamImages getImageDescriptor ITeamUIImages IMG_SYNC_VIEW IHandler ActionHandler synchronizeAction syncAll HandlerSubmission synchronizeAll getWorkbench getCommandSupport addHandlerSubmission syncAll ActionHandler syncLatest HandlerSubmission synchronizeLast getWorkbench getCommandSupport addHandlerSubmission syncLatest setMenuCreator getSynchronizeManager addSynchronizeParticipantListener
public void dispose if f Menu null f Menu dispose TeamUI get Synchronize Manager remove Synchronize Participant Listener this PlatformUI get Workbench get Command Support remove Handler Submission sync All sync All get Handler dispose PlatformUI get Workbench get Command Support remove Handler Submission sync Latest sync Latest get Handler dispose  fMenu fMenu getSynchronizeManager removeSynchronizeParticipantListener getWorkbench getCommandSupport removeHandlerSubmission syncAll syncAll getHandler getWorkbench getCommandSupport removeHandlerSubmission syncLatest syncLatest getHandler
see org eclipse jface action I Menu Creator get Menu org eclipse swt widgets Menu public Menu get Menu Menu parent return null  IMenuCreator getMenu getMenu
public Menu get Menu Control parent if f Menu null f Menu dispose f Menu new Menu parent I Synchronize Participant Reference participants TeamUI get Synchronize Manager get Synchronize Participants for int i 0 i participants length i I Synchronize Participant Reference description participants i Action action new Refresh Participant Action i 1 description add Action To Menu f Menu action if participants length 0 add Menu Separator add Action To Menu f Menu synchronize Action return f Menu  getMenu fMenu fMenu fMenu ISynchronizeParticipantReference getSynchronizeManager getSynchronizeParticipants ISynchronizeParticipantReference RefreshParticipantAction addActionToMenu fMenu addMenuSeparator addActionToMenu fMenu synchronizeAction fMenu
protected void add Action To Menu Menu parent Action action Action Contribution Item item new Action Contribution Item action item fill parent 1  addActionToMenu ActionContributionItem ActionContributionItem
protected void add Menu Separator new Menu Item f Menu SWT SEPARATOR  addMenuSeparator MenuItem fMenu
see org eclipse ui I Workbench Window Action Delegate init org eclipse ui I Workbench Window public void init I Workbench Window window this window window  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow
public void run String id TeamUI Plugin get Plugin get Preference Store get String I Preference Ids SYNCHRONIZING DEFAULT PARTICIPANT String secondary Id TeamUI Plugin get Plugin get Preference Store get String I Preference Ids SYNCHRONIZING DEFAULT PARTICIPANT SEC ID I Wizard wizard new Global Synchronize Wizard I Synchronize Participant Reference participant TeamUI get Synchronize Manager get id secondary Id if participant null run participant else synchronize Action run  TeamUIPlugin getPlugin getPreferenceStore getString IPreferenceIds SYNCHRONIZING_DEFAULT_PARTICIPANT secondaryId TeamUIPlugin getPlugin getPreferenceStore getString IPreferenceIds SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID IWizard GlobalSynchronizeWizard ISynchronizeParticipantReference getSynchronizeManager secondaryId synchronizeAction
public void run I Action action run action Proxy action update Tooltip Text  IAction actionProxy updateTooltipText
private void run I Synchronize Participant Reference participant I Synchronize Participant p try p participant get Participant p run null no workbench part update Tooltip Text catch Team Exception e Utils handle e  ISynchronizeParticipantReference ISynchronizeParticipant getParticipant updateTooltipText TeamException
Display display TeamUI Plugin get Standard Display display async Exec new Runnable public void run update Tooltip Text  TeamUIPlugin getStandardDisplay asyncExec updateTooltipText
public void participants Added I Synchronize Participant consoles Display display TeamUI Plugin get Standard Display display async Exec new Runnable public void run update Tooltip Text  participantsAdded ISynchronizeParticipant TeamUIPlugin getStandardDisplay asyncExec updateTooltipText
display async Exec new Runnable public void run if f Menu null f Menu dispose update Tooltip Text  asyncExec fMenu fMenu updateTooltipText
public void participants Removed I Synchronize Participant consoles Display display TeamUI Plugin get Standard Display display async Exec new Runnable public void run if f Menu null f Menu dispose update Tooltip Text  participantsRemoved ISynchronizeParticipant TeamUIPlugin getStandardDisplay asyncExec fMenu fMenu updateTooltipText
org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection action Proxy action  ISelection selectionChanged IAction ISelection actionProxy
protected void update Tooltip Text if action Proxy null String id TeamUI Plugin get Plugin get Preference Store get String I Preference Ids SYNCHRONIZING DEFAULT PARTICIPANT String secondary Id TeamUI Plugin get Plugin get Preference Store get String I Preference Ids SYNCHRONIZING DEFAULT PARTICIPANT SEC ID if id equals NO DEFAULT PARTICPANT I Synchronize Participant Reference ref TeamUI get Synchronize Manager get id secondary Id if ref null action Proxy set Tool Tip Text Policy bind Global Refresh Action 5 ref get Display Name NON NLS 1 return action Proxy set Tool Tip Text Policy bind Global Refresh Action 4 NON NLS 1  updateTooltipText actionProxy TeamUIPlugin getPlugin getPreferenceStore getString IPreferenceIds SYNCHRONIZING_DEFAULT_PARTICIPANT secondaryId TeamUIPlugin getPlugin getPreferenceStore getString IPreferenceIds SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID NO_DEFAULT_PARTICPANT ISynchronizeParticipantReference getSynchronizeManager secondaryId actionProxy setToolTipText GlobalRefreshAction getDisplayName actionProxy setToolTipText GlobalRefreshAction

public Navigate Action I Synchronize Page Site site String title I Synchronize Page Configuration configuration boolean next this site site this title title this configuration configuration this next next I Action Bars bars site get Action Bars if next Utils init Action this action navigate Next NON NLS 1 if bars null bars set Global Action Handler Action Factory NEXT get Id this else Utils init Action this action navigate Previous NON NLS 1 if bars null bars set Global Action Handler Action Factory PREVIOUS get Id this  NavigateAction ISynchronizePageSite ISynchronizePageConfiguration IActionBars getActionBars initAction navigateNext setGlobalActionHandler ActionFactory getId initAction navigatePrevious setGlobalActionHandler ActionFactory getId
Two types of navigation is supported navigation that is specific to coordinating between a view and a compare editor and navigation simply using the configured navigator public void run I Workbench Site ws site get Workbench Site I Navigatable nav I Navigatable configuration get Property Synchronize Page Configuration P NAVIGATOR if nav null ws null ws instanceof I View Site navigate nav else nav goto Difference next  IWorkbenchSite getWorkbenchSite INavigatable INavigatable getProperty SynchronizePageConfiguration P_NAVIGATOR IViewSite gotoDifference
private void navigate I Navigatable nav Sync Info info get Sync Info From Selection if info null if nav goto Difference next return else info get Sync Info From Selection if info null return if info get Local get Type I Resource FILE if nav goto Difference next info get Sync Info From Selection Open In Compare Action open Compare Editor get Title info true keep focus site return I Workbench Site ws site get Workbench Site if ws instanceof I Workbench Part Site I Editor Part editor Open In Compare Action find Open Compare Editor I Workbench Part Site ws info get Local Compare Editor Input input I Compare Navigator navigator if editor null if an existing editor is open on the current selection use it input Compare Editor Input editor get Editor Input navigator I Compare Navigator input get Adapter I Compare Navigator class if navigator null if navigator select Change next if nav goto Difference next info get Sync Info From Selection Open In Compare Action open Compare Editor get Title info true keep focus site else otherwise select the next change and open a compare editor which will automatically show the first change Open In Compare Action open Compare Editor get Title info true keep focus site  INavigatable SyncInfo getSyncInfoFromSelection gotoDifference getSyncInfoFromSelection getLocal getType IResource gotoDifference getSyncInfoFromSelection OpenInCompareAction openCompareEditor getTitle IWorkbenchSite getWorkbenchSite IWorkbenchPartSite IEditorPart OpenInCompareAction findOpenCompareEditor IWorkbenchPartSite getLocal CompareEditorInput ICompareNavigator CompareEditorInput getEditorInput ICompareNavigator getAdapter ICompareNavigator selectChange gotoDifference getSyncInfoFromSelection OpenInCompareAction openCompareEditor getTitle OpenInCompareAction openCompareEditor getTitle
private Sync Info get Sync Info From Selection I Structured Selection selection I Structured Selection site get Selection Provider get Selection if selection null return null Object obj selection get First Element if obj instanceof Sync Info Model Element return Sync Info Model Element obj get Sync Info else return null  SyncInfo getSyncInfoFromSelection IStructuredSelection IStructuredSelection getSelectionProvider getSelection getFirstElement SyncInfoModelElement SyncInfoModelElement getSyncInfo
private String get Title return title  getTitle

public class Open File In System Editor Action extends Open File Action public Open File In System Editor Action I Workbench Page page super page  OpenFileInSystemEditorAction OpenFileAction OpenFileInSystemEditorAction IWorkbenchPage
protected List get Selected Resources I Structured Selection selection get Structured Selection I Resource resources Utils get Resources selection to Array return Arrays as List resources  getSelectedResources IStructuredSelection getStructuredSelection IResource getResources toArray asList
see org eclipse ui actions Selection Listener Action get Selected Non Resources protected List get Selected Non Resources return Collections EMPTY LIST  SelectionListenerAction getSelectedNonResources getSelectedNonResources EMPTY_LIST

public Open In Compare Action I Synchronize Page Site site String name this name name this site site Utils init Action this action open In Compare Editor NON NLS 1  OpenInCompareAction ISynchronizePageSite initAction openInCompareEditor
public void run I Selection selection site get Selection Provider get Selection if selection instanceof I Structured Selection Object obj I Structured Selection selection get First Element if obj instanceof Sync Info Model Element Sync Info info Sync Info Model Element obj get Sync Info if info null open Compare Editor name info false don t keep focus site  ISelection getSelectionProvider getSelection IStructuredSelection IStructuredSelection getFirstElement SyncInfoModelElement SyncInfo SyncInfoModelElement getSyncInfo openCompareEditor
public static Sync Info Compare Input open Compare Editor String name Sync Info info boolean keep Focus I Synchronize Page Site site Assert is Not Null info Assert is Not Null name if info get Local get Type I Resource FILE return null Sync Info Compare Input input new Sync Info Compare Input name info I Workbench Page page null if site null I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null page window get Active Page else page site get Workbench Site get Page if page null I Editor Part editor find Reusable Compare Editor page if editor null I Editor Input other Input editor get Editor Input if other Input equals input simply provide focus to editor page activate editor else if editor is currently not open on that input either re use existing CompareUI reuse Compare Editor input I Reusable Editor editor page activate editor else CompareUI open Compare Editor input if site null keep Focus site set Focus return input return null  SyncInfoCompareInput openCompareEditor SyncInfo keepFocus ISynchronizePageSite isNotNull isNotNull getLocal getType IResource SyncInfoCompareInput SyncInfoCompareInput IWorkbenchPage IWorkbenchWindow getWorkbench getActiveWorkbenchWindow getActivePage getWorkbenchSite getPage IEditorPart findReusableCompareEditor IEditorInput otherInput getEditorInput otherInput reuseCompareEditor IReusableEditor openCompareEditor keepFocus setFocus
Returns an editor that can be re used An open compare editor that has un saved changes cannot be re used public static I Editor Part find Reusable Compare Editor I Workbench Page page I Editor Reference editor Refs page get Editor References for int i 0 i editor Refs length i I Editor Part part editor Refs i get Editor true if part null part get Editor Input instanceof Sync Info Compare Input part instanceof I Reusable Editor if part is Dirty return part return null  IEditorPart findReusableCompareEditor IWorkbenchPage IEditorReference editorRefs getEditorReferences editorRefs IEditorPart editorRefs getEditor getEditorInput SyncInfoCompareInput IReusableEditor isDirty
site get Shell get Display async Exec new Runnable public void run I Editor Part editor find Open Compare Editor site resource if editor null site get Page close Editor editor true save changes if required  getShell getDisplay asyncExec IEditorPart findOpenCompareEditor getPage closeEditor
Close a compare editor that is opened on the given I Resource param site the view site in which to close the editors param resource the resource to use to find the compare editor public static void close Compare Editor For final I Workbench Part Site site final I Resource resource site get Shell get Display async Exec new Runnable public void run I Editor Part editor find Open Compare Editor site resource if editor null site get Page close Editor editor true save changes if required  IResource closeCompareEditorFor IWorkbenchPartSite IResource getShell getDisplay asyncExec IEditorPart findOpenCompareEditor getPage closeEditor
Returns an editor handle if a Sync Info Compare Input compare editor is opened on the given I Resource param site the view site in which to search for editors param resource the resource to use to find the compare editor return an editor handle if found and code null code otherwise public static I Editor Part find Open Compare Editor I Workbench Part Site site I Resource resource I Workbench Page page site get Page I Editor Reference editor Refs page get Editor References for int i 0 i editor Refs length i final I Editor Part part editor Refs i get Editor false don t restore editor if part null I Editor Input input part get Editor Input if part null input instanceof Sync Info Compare Input Sync Info input Info Sync Info Compare Input input get Sync Info if input Info get Local equals resource return part return null  SyncInfoCompareInput IResource IEditorPart findOpenCompareEditor IWorkbenchPartSite IResource IWorkbenchPage getPage IEditorReference editorRefs getEditorReferences editorRefs IEditorPart editorRefs getEditor IEditorInput getEditorInput SyncInfoCompareInput SyncInfo inputInfo SyncInfoCompareInput getSyncInfo inputInfo getLocal

public Open With Action Group I Synchronize Page Site site String name this name name this site site make Actions  OpenWithActionGroup ISynchronizePageSite makeActions
protected void make Actions I Workbench Site ws site get Workbench Site if ws null open File Action new Open File In System Editor Action ws get Page open In Compare Action new Open In Compare Action site name  makeActions IWorkbenchSite getWorkbenchSite openFileAction OpenFileInSystemEditorAction getPage openInCompareAction OpenInCompareAction
public void fill Context Menu I Menu Manager menu String group Id I Selection selection site get Selection Provider get Selection if selection instanceof I Structured Selection fill Open With Menu menu group Id I Structured Selection selection  fillContextMenu IMenuManager groupId ISelection getSelectionProvider getSelection IStructuredSelection fillOpenWithMenu groupId IStructuredSelection
Adds the Open With submenu to the context menu param menu the context menu param selection the current selection private void fill Open With Menu I Menu Manager menu String group Id I Structured Selection selection Only supported if exactly one file is selected if selection null selection size 1 return Object element selection get First Element I Resource resources Utils get Resources new Object element I Resource resource null if resources length 0 return resource resources 0 if resource get Type I Resource FILE return menu append To Group group Id open In Compare Action if resource exists return if open File Action null open File Action selection Changed selection menu append To Group group Id open File Action I Workbench Site ws site get Workbench Site if ws null Menu Manager submenu new Menu Manager Resource Navigator Messages get String Resource Navigator open With NON NLS 1 submenu add new Open With Menu ws get Page resource menu append To Group group Id submenu  OpenWith fillOpenWithMenu IMenuManager groupId IStructuredSelection getFirstElement IResource getResources IResource getType IResource appendToGroup groupId openInCompareAction openFileAction openFileAction selectionChanged appendToGroup groupId openFileAction IWorkbenchSite getWorkbenchSite MenuManager MenuManager ResourceNavigatorMessages getString ResourceNavigator openWith OpenWithMenu getPage appendToGroup groupId
public void open In Compare Editor open In Compare Action run  openInCompareEditor openInCompareAction

private I Synchronize Participant participant public Pin Participant Action super Utils init Action this action pin Participant Policy get Bundle NON NLS 1  ISynchronizeParticipant PinParticipantAction initAction pinParticipant getBundle
public void set Participant I Synchronize Participant participant if this participant null this participant remove Property Change Listener this this participant participant set Enabled participant null if participant null participant add Property Change Listener this update State  setParticipant ISynchronizeParticipant removePropertyChangeListener setEnabled addPropertyChangeListener updateState
private void update State set Checked participant null participant is Pinned  updateState setChecked isPinned
PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception participant set Pinned participant is Pinned update State  getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException setPinned isPinned updateState
public void run if participant null try PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception participant set Pinned participant is Pinned update State catch Invocation Target Exception e Utils handle e catch Interrupted Exception e Cancelled Just ignore  getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException setPinned isPinned updateState InvocationTargetException InterruptedException
public void property Change Property Change Event event if event get Source participant update State  propertyChange PropertyChangeEvent getSource updateState

private Delete Resource Action delete Action public Refactor Action Group I Synchronize Page Site site this site site make Actions  DeleteResourceAction deleteAction RefactorActionGroup ISynchronizePageSite makeActions
public void fill Context Menu I Menu Manager parent Menu String group Id I Structured Selection selection get Selection if selection null return boolean any Resource Selected selection is Empty all Resources Are Of Type selection I Resource PROJECT I Resource FOLDER I Resource FILE Menu Manager menu new Menu Manager Policy bind Refactor Action Group 0 NON NLS 1 I Structured Selection converted Selection convert Selection selection if any Resource Selected delete Action selection Changed converted Selection menu add delete Action move Action selection Changed converted Selection menu add move Action rename Action selection Changed converted Selection menu add rename Action parent Menu append To Group group Id menu  fillContextMenu IMenuManager parentMenu groupId IStructuredSelection getSelection anyResourceSelected isEmpty allResourcesAreOfType IResource IResource IResource MenuManager MenuManager RefactorActionGroup IStructuredSelection convertedSelection convertSelection anyResourceSelected deleteAction selectionChanged convertedSelection deleteAction moveAction selectionChanged convertedSelection moveAction renameAction selectionChanged convertedSelection renameAction parentMenu appendToGroup groupId
private I Structured Selection convert Selection I Structured Selection selection return new Structured Selection Utils get Resources selection to Array  IStructuredSelection convertSelection IStructuredSelection StructuredSelection getResources toArray
public void fill Action Bars I Action Bars action Bars text Action Handler new Text Action Handler action Bars hooks handlers text Action Handler set Delete Action delete Action rename Action set Text Action Handler text Action Handler delete Action selection Changed get Selection  fillActionBars IActionBars actionBars textActionHandler TextActionHandler actionBars textActionHandler setDeleteAction deleteAction renameAction setTextActionHandler textActionHandler deleteAction selectionChanged getSelection
delete Action new Delete Resource Action shell protected List get Selected Resources return Arrays as List Utils get Resources get Selection to Array  deleteAction DeleteResourceAction getSelectedResources asList getResources getSelection toArray
protected void make Actions Shell shell site get Shell I Shared Images images PlatformUI get Workbench get Shared Images move Action new Move Resource Action shell rename Action new Rename Resource Action shell delete Action new Delete Resource Action shell protected List get Selected Resources return Arrays as List Utils get Resources get Selection to Array delete Action set Image Descriptor images get Image Descriptor I Shared Images IMG TOOL DELETE delete Action set Action Definition Id org eclipse ui edit delete NON NLS 1 Get the key binding service for registering actions with commands I Key Binding Service key Binding Service site get Key Binding Service if key Binding Service null key Binding Service register Action delete Action  makeActions getShell ISharedImages getWorkbench getSharedImages moveAction MoveResourceAction renameAction RenameResourceAction deleteAction DeleteResourceAction getSelectedResources asList getResources getSelection toArray deleteAction setImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_DELETE deleteAction setActionDefinitionId IKeyBindingService keyBindingService getKeyBindingService keyBindingService keyBindingService registerAction deleteAction
public void dispose if delete Action null I Key Binding Service key Binding Service site get Key Binding Service if key Binding Service null key Binding Service unregister Action delete Action super dispose  deleteAction IKeyBindingService keyBindingService getKeyBindingService keyBindingService keyBindingService unregisterAction deleteAction
public void update Action Bars I Structured Selection selection get Selection delete Action selection Changed selection move Action selection Changed selection rename Action selection Changed selection  updateActionBars IStructuredSelection getSelection deleteAction selectionChanged moveAction selectionChanged renameAction selectionChanged
private I Structured Selection get Selection return I Structured Selection site get Selection Provider get Selection  IStructuredSelection getSelection IStructuredSelection getSelectionProvider getSelection
private boolean all Resources Are Of Type I Structured Selection selection int resource Mask Iterator resources selection iterator while resources has Next Object next resources next I Resource resource null if next instanceof I Resource resource I Resource next else if next instanceof I Adaptable I Adaptable adaptable I Adaptable next resource I Resource adaptable get Adapter I Resource class if resource null I Resource r Utils get Resources new Object next if r length 1 resource r 0 if resource null resource get Type resource Mask 0 return false return true  allResourcesAreOfType IStructuredSelection resourceMask hasNext IResource IResource IResource IAdaptable IAdaptable IAdaptable IResource getAdapter IResource IResource getResources getType resourceMask

public class Remove From View Action extends Synchronize Model Action protected Remove From View Action I Synchronize Page Configuration configuration super null configuration Utils init Action this action remove From View Policy get Bundle NON NLS 1  RemoveFromViewAction SynchronizeModelAction RemoveFromViewAction ISynchronizePageConfiguration initAction removeFromView getBundle
public void run if confirm Remove super run  confirmRemove
protected Synchronize Model Operation get Subscriber Operation I Synchronize Page Configuration configuration I Diff Element elements return new Synchronize Model Operation configuration elements public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception Sync Info Set set get Sync Info Set remove From View set  SynchronizeModelOperation getSubscriberOperation ISynchronizePageConfiguration IDiffElement SynchronizeModelOperation IProgressMonitor InvocationTargetException InterruptedException SyncInfoSet getSyncInfoSet removeFromView
remove From View set protected boolean can Run As Job return false  removeFromView canRunAsJob
final Working Set Filtered Sync Info Collector collector Subscriber Participant Page page get Collector collector run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception collector get Working Set Sync Info Set remove All set get Resources  WorkingSetFilteredSyncInfoCollector SubscriberParticipantPage getCollector IWorkspaceRunnable IProgressMonitor CoreException getWorkingSetSyncInfoSet removeAll getResources
Remove the sync info contained in the given set from the view param set the sync info set private void remove From View final Sync Info Set set I Synchronize Page page get Configuration get Page if page instanceof Subscriber Participant Page final Working Set Filtered Sync Info Collector collector Subscriber Participant Page page get Collector collector run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception collector get Working Set Sync Info Set remove All set get Resources  removeFromView SyncInfoSet ISynchronizePage getConfiguration getPage SubscriberParticipantPage WorkingSetFilteredSyncInfoCollector SubscriberParticipantPage getCollector IWorkspaceRunnable IProgressMonitor CoreException getWorkingSetSyncInfoSet removeAll getResources
protected Synchronize Model Operation get Subscriber Operation I Synchronize Page Configuration configuration I Diff Element elements return new Synchronize Model Operation configuration elements public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception Sync Info Set set get Sync Info Set remove From View set protected boolean can Run As Job return false Remove the sync info contained in the given set from the view param set the sync info set private void remove From View final Sync Info Set set I Synchronize Page page get Configuration get Page if page instanceof Subscriber Participant Page final Working Set Filtered Sync Info Collector collector Subscriber Participant Page page get Collector collector run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception collector get Working Set Sync Info Set remove All set get Resources  SynchronizeModelOperation getSubscriberOperation ISynchronizePageConfiguration IDiffElement SynchronizeModelOperation IProgressMonitor InvocationTargetException InterruptedException SyncInfoSet getSyncInfoSet removeFromView canRunAsJob removeFromView SyncInfoSet ISynchronizePage getConfiguration getPage SubscriberParticipantPage WorkingSetFilteredSyncInfoCollector SubscriberParticipantPage getCollector IWorkspaceRunnable IProgressMonitor CoreException getWorkingSetSyncInfoSet removeAll getResources
see org eclipse team ui synchronize Synchronize Model Action needs To Save Dirty Editors protected boolean needs To Save Dirty Editors return false  SynchronizeModelAction needsToSaveDirtyEditors needsToSaveDirtyEditors
private boolean confirm Remove I Preference Store store TeamUI Plugin get Plugin get Preference Store if store get Boolean I Preference Ids SYNCVIEW REMOVE FROM VIEW NO PROMPT return true else Message Dialog With Toggle dialog Message Dialog With Toggle open Ok Cancel Confirm get Configuration get Site get Shell Policy bind Remove From View warning Title NON NLS 1 Policy bind Remove From View warning Message NON NLS 1 Policy bind Remove From View warning Dont Show NON NLS 1 false null null store set Value I Preference Ids SYNCVIEW REMOVE FROM VIEW NO PROMPT dialog get Toggle State return dialog get Return Code Dialog OK  confirmRemove IPreferenceStore TeamUIPlugin getPlugin getPreferenceStore getBoolean IPreferenceIds SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT MessageDialogWithToggle MessageDialogWithToggle openOkCancelConfirm getConfiguration getSite getShell RemoveFromView warningTitle RemoveFromView warningMessage RemoveFromView warningDontShow setValue IPreferenceIds SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT getToggleState getReturnCode

public Remove Synchronize Participant Action I Synchronize View view boolean remove All this view view this remove All remove All if remove All Utils init Action this action remove All Page Policy get Bundle NON NLS 1 else Utils init Action this action remove Page Policy get Bundle NON NLS 1  RemoveSynchronizeParticipantAction ISynchronizeView removeAll removeAll removeAll removeAll initAction removeAllPage getBundle initAction removePage getBundle
PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception if remove All remove All else remove Current  getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException removeAll removeAll removeCurrent
public void run try PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception if remove All remove All else remove Current catch Invocation Target Exception e Utils handle e catch Interrupted Exception e Cancelled Just ignore  getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException removeAll removeAll removeCurrent InvocationTargetException InterruptedException
Display get Default sync Exec new Runnable public void run bail 0 Message Dialog open Question view get Site get Shell Policy bind Remove Synchronize Participant Action 0 NON NLS 1 Policy bind Remove Synchronize Participant Action 1 NON NLS 1  getDefault syncExec MessageDialog openQuestion getSite getShell RemoveSynchronizeParticipantAction RemoveSynchronizeParticipantAction
private void remove Current final I Synchronize Participant participant view get Participant if participant null if participant is Pinned final boolean bail new boolean false Display get Default sync Exec new Runnable public void run bail 0 Message Dialog open Question view get Site get Shell Policy bind Remove Synchronize Participant Action 0 NON NLS 1 Policy bind Remove Synchronize Participant Action 1 NON NLS 1 if bail 0 return TeamUI get Synchronize Manager remove Synchronize Participants new I Synchronize Participant participant  removeCurrent ISynchronizeParticipant getParticipant isPinned getDefault syncExec MessageDialog openQuestion getSite getShell RemoveSynchronizeParticipantAction RemoveSynchronizeParticipantAction getSynchronizeManager removeSynchronizeParticipants ISynchronizeParticipant
private void remove All I Synchronize Manager manager TeamUI get Synchronize Manager I Synchronize Participant Reference refs manager get Synchronize Participants Array List removals new Array List for int i 0 i refs length i I Synchronize Participant Reference reference refs i I Synchronize Participant p try p reference get Participant if p is Pinned removals add p catch Team Exception e keep going manager remove Synchronize Participants I Synchronize Participant removals to Array new I Synchronize Participant removals size  removeAll ISynchronizeManager getSynchronizeManager ISynchronizeParticipantReference getSynchronizeParticipants ArrayList ArrayList ISynchronizeParticipantReference ISynchronizeParticipant getParticipant isPinned TeamException removeSynchronizeParticipants ISynchronizeParticipant toArray ISynchronizeParticipant

public void run try if f Page equals f View get Participant f View display f Page get Participant catch Team Exception e Utils handle e  fPage fView getParticipant fView fPage getParticipant TeamException
Constructs an action to display the given synchronize participant in the synchronize view param view the synchronize view in which the given page is contained param participant the participant to show public Show Synchronize Participant Action I Synchronize View view I Synchronize Participant Reference ref super Utils shorten Text Synchronize View MAX NAME LENGTH ref get Display Name Action AS RADIO BUTTON f Page ref f View view set Image Descriptor ref get Descriptor get Image Descriptor  ShowSynchronizeParticipantAction ISynchronizeView ISynchronizeParticipantReference shortenText SynchronizeView MAX_NAME_LENGTH getDisplayName AS_RADIO_BUTTON fPage fView setImageDescriptor getDescriptor getImageDescriptor

private String tooltip public Status LineC Label Contribution String id this id DEFAULT CHAR WIDTH  StatusLineCLabelContribution DEFAULT_CHAR_WIDTH
public Status LineC Label Contribution String id int char Width super id this char Width char Width set Visible false no text to start with  StatusLineCLabelContribution charWidth charWidth charWidth setVisible
public void fill Composite parent Label sep new Label parent SWT SEPARATOR label new C Label parent SWT SHADOW NONE Status Line Layout Data status Line Layout Data new Status Line Layout Data if width Hint 0 GC gc new GC parent gc set Font parent get Font Font Metrics fm gc get Font Metrics width Hint fm get Average Char Width char Width height Hint fm get Height gc dispose status Line Layout Data width Hint width Hint label set Layout Data status Line Layout Data label set Text text label set Image image if listener null label add Listener event Type listener if tooltip null label set Tool Tip Text tooltip status Line Layout Data new Status Line Layout Data status Line Layout Data height Hint height Hint sep set Layout Data status Line Layout Data  CLabel SHADOW_NONE StatusLineLayoutData statusLineLayoutData StatusLineLayoutData widthHint setFont getFont FontMetrics getFontMetrics widthHint getAverageCharWidth charWidth heightHint getHeight statusLineLayoutData widthHint widthHint setLayoutData statusLineLayoutData setText setImage addListener eventType setToolTipText statusLineLayoutData StatusLineLayoutData statusLineLayoutData heightHint heightHint setLayoutData statusLineLayoutData
public void add Listener int event Type Listener listener this event Type event Type this listener listener  addListener eventType eventType eventType
public String get Text return text  getText
public void set Text String text if text null throw new Null Pointer Exception this text text if label null label is Disposed label set Text this text if this text length 0 if is Visible set Visible false I Contribution Manager contribution Manager get Parent if contribution Manager null contribution Manager update true else if is Visible set Visible true I Contribution Manager contribution Manager get Parent if contribution Manager null contribution Manager update true  setText NullPointerException isDisposed setText isVisible setVisible IContributionManager contributionManager getParent contributionManager contributionManager isVisible setVisible IContributionManager contributionManager getParent contributionManager contributionManager
public void set Tooltip String tooltip if tooltip null throw new Null Pointer Exception this tooltip tooltip if label null label is Disposed label set Tool Tip Text this tooltip  setTooltip NullPointerException isDisposed setToolTipText
public void set Image Image image if image null throw new Null Pointer Exception this image image if label null label is Disposed label set Image this image if is Visible set Visible true I Contribution Manager contribution Manager get Parent if contribution Manager null contribution Manager update true  setImage NullPointerException isDisposed setImage isVisible setVisible IContributionManager contributionManager getParent contributionManager contributionManager

public Status Line Contribution Group final Shell shell I Synchronize Page Configuration configuration this configuration configuration if is Three Way this incoming create Status Line Contribution INCOMING ID I Synchronize Page Configuration INCOMING MODE 0 incoming Image NON NLS 1 this outgoing create Status Line Contribution OUTGOING ID I Synchronize Page Configuration OUTGOING MODE 0 outgoing Image NON NLS 1 this conflicting create Status Line Contribution CONFLICTING ID I Synchronize Page Configuration CONFLICTING MODE 0 conflicting Image NON NLS 1 else this total Changes new Status LineC Label Contribution TOTALS ID TEXT FIELD MAX SIZE Listen to changes to update the counts Sync Info Set set get Sync Info Set set add Sync Set Changed Listener this update Counts  StatusLineContributionGroup ISynchronizePageConfiguration isThreeWay createStatusLineContribution INCOMING_ID ISynchronizePageConfiguration INCOMING_MODE incomingImage createStatusLineContribution OUTGOING_ID ISynchronizePageConfiguration OUTGOING_MODE outgoingImage createStatusLineContribution CONFLICTING_ID ISynchronizePageConfiguration CONFLICTING_MODE conflictingImage totalChanges StatusLineCLabelContribution TOTALS_ID TEXT_FIELD_MAX_SIZE SyncInfoSet getSyncInfoSet addSyncSetChangedListener updateCounts
private boolean is Three Way return configuration get Comparison Type I Synchronize Page Configuration THREE WAY  isThreeWay getComparisonType ISynchronizePageConfiguration THREE_WAY
private Subscriber Participant get Participant return Subscriber Participant configuration get Participant  SubscriberParticipant getParticipant SubscriberParticipant getParticipant
Status LineC Label Contribution item new Status LineC Label Contribution id 15 item add Listener SWT Mouse Down new Listener public void handle Event Event event configuration set Mode mode  StatusLineCLabelContribution StatusLineCLabelContribution addListener MouseDown handleEvent setMode
private Status LineC Label Contribution create Status Line Contribution String id final int mode String label Image image Status LineC Label Contribution item new Status LineC Label Contribution id 15 item add Listener SWT Mouse Down new Listener public void handle Event Event event configuration set Mode mode item set Text label NON NLS 1 item set Image image return item  StatusLineCLabelContribution createStatusLineContribution StatusLineCLabelContribution StatusLineCLabelContribution addListener MouseDown handleEvent setMode setText setImage
public void dispose get Sync Info Set remove Sync Set Changed Listener this if is Three Way incoming Image dispose outgoing Image dispose conflicting Image dispose  getSyncInfoSet removeSyncSetChangedListener isThreeWay incomingImage outgoingImage conflictingImage
see org eclipse team internal ui sync sets I Sync Set Changed Listener sync Set Changed org eclipse team internal ui sync sets Sync Set Changed Event public void sync Info Changed I Sync Info Set Change Event event I Progress Monitor monitor update Counts  ISyncSetChangedListener syncSetChanged SyncSetChangedEvent syncInfoChanged ISyncInfoSetChangeEvent IProgressMonitor updateCounts
TeamUI Plugin get Standard Display async Exec new Runnable public void run if is Three Way conflicting set Text new Integer workspace Conflicting to String NON NLS 1 incoming set Text new Integer workspace Incoming to String NON NLS 1 outgoing set Text new Integer workspace Outgoing to String NON NLS 1 conflicting set Tooltip Policy bind Statistics Panel numbers Tooltip Policy bind Statistics Panel conflicting NON NLS 1 NON NLS 2 outgoing set Tooltip Policy bind Statistics Panel numbers Tooltip Policy bind Statistics Panel outgoing NON NLS 1 NON NLS 2 incoming set Tooltip Policy bind Statistics Panel numbers Tooltip Policy bind Statistics Panel incoming NON NLS 1 NON NLS 2 else if total 1 total Changes set Text Policy bind Statistics Panel number Total Singular Integer to String total NON NLS 1 else total Changes set Text Policy bind Statistics Panel number Total Plural Integer to String total NON NLS 1  TeamUIPlugin getStandardDisplay asyncExec isThreeWay setText workspaceConflicting toString setText workspaceIncoming toString setText workspaceOutgoing toString setTooltip StatisticsPanel numbersTooltip StatisticsPanel setTooltip StatisticsPanel numbersTooltip StatisticsPanel setTooltip StatisticsPanel numbersTooltip StatisticsPanel totalChanges setText StatisticsPanel numberTotalSingular toString totalChanges setText StatisticsPanel numberTotalPlural toString
private void update Counts if get Participant get Subscriber null Sync Info Set workspace Set Stats get Sync Info Set final int total workspace Set Stats size final int workspace Conflicting int workspace Set Stats count For Sync Info CONFLICTING Sync Info DIRECTION MASK final int workspace Outgoing int workspace Set Stats count For Sync Info OUTGOING Sync Info DIRECTION MASK final int workspace Incoming int workspace Set Stats count For Sync Info INCOMING Sync Info DIRECTION MASK TeamUI Plugin get Standard Display async Exec new Runnable public void run if is Three Way conflicting set Text new Integer workspace Conflicting to String NON NLS 1 incoming set Text new Integer workspace Incoming to String NON NLS 1 outgoing set Text new Integer workspace Outgoing to String NON NLS 1 conflicting set Tooltip Policy bind Statistics Panel numbers Tooltip Policy bind Statistics Panel conflicting NON NLS 1 NON NLS 2 outgoing set Tooltip Policy bind Statistics Panel numbers Tooltip Policy bind Statistics Panel outgoing NON NLS 1 NON NLS 2 incoming set Tooltip Policy bind Statistics Panel numbers Tooltip Policy bind Statistics Panel incoming NON NLS 1 NON NLS 2 else if total 1 total Changes set Text Policy bind Statistics Panel number Total Singular Integer to String total NON NLS 1 else total Changes set Text Policy bind Statistics Panel number Total Plural Integer to String total NON NLS 1  updateCounts getParticipant getSubscriber SyncInfoSet workspaceSetStats getSyncInfoSet workspaceSetStats workspaceConflicting workspaceSetStats countFor SyncInfo SyncInfo DIRECTION_MASK workspaceOutgoing workspaceSetStats countFor SyncInfo SyncInfo DIRECTION_MASK workspaceIncoming workspaceSetStats countFor SyncInfo SyncInfo DIRECTION_MASK TeamUIPlugin getStandardDisplay asyncExec isThreeWay setText workspaceConflicting toString setText workspaceIncoming toString setText workspaceOutgoing toString setTooltip StatisticsPanel numbersTooltip StatisticsPanel setTooltip StatisticsPanel numbersTooltip StatisticsPanel setTooltip StatisticsPanel numbersTooltip StatisticsPanel totalChanges setText StatisticsPanel numberTotalSingular toString totalChanges setText StatisticsPanel numberTotalPlural toString
public void fill Action Bars I Action Bars action Bars I Status Line Manager mgr action Bars get Status Line Manager if is Three Way mgr add incoming mgr add outgoing mgr add conflicting else mgr add total Changes  fillActionBars IActionBars actionBars IStatusLineManager actionBars getStatusLineManager isThreeWay totalChanges
see org eclipse team core subscribers I Sync Info Set Change Listener sync Info Set Reset org eclipse team core subscribers Sync Info Set org eclipse core runtime I Progress Monitor public void sync Info Set Reset Sync Info Set set I Progress Monitor monitor update Counts  ISyncInfoSetChangeListener syncInfoSetReset SyncInfoSet IProgressMonitor syncInfoSetReset SyncInfoSet IProgressMonitor updateCounts
see org eclipse team core subscribers I Sync Info Set Change Listener sync Info Set Error org eclipse team core subscribers Sync Info Set org eclipse team core I Team Status org eclipse core runtime I Progress Monitor public void sync Info Set Errors Sync Info Set set I Team Status errors I Progress Monitor monitor Nothing to do for errors  ISyncInfoSetChangeListener syncInfoSetError SyncInfoSet ITeamStatus IProgressMonitor syncInfoSetErrors SyncInfoSet ITeamStatus IProgressMonitor
private Sync Info Set get Sync Info Set return Sync Info Set configuration get Property Synchronize Page Configuration P WORKING SET SYNC INFO SET  SyncInfoSet getSyncInfoSet SyncInfoSet getProperty SynchronizePageConfiguration P_WORKING_SET_SYNC_INFO_SET

refresh Selection Action new Action public void run I Structured Selection selection I Structured Selection site get Selection Provider get Selection I Resource resources Utils get Resources selection to Array if resources length 0 Refresh all participant resources resources participant get Resources participant refresh resources Policy bind Participant synchronizing Policy bind Participant synchronizing Details participant get Name site get Workbench Site NON NLS 1 NON NLS 2  refreshSelectionAction IStructuredSelection IStructuredSelection getSelectionProvider getSelection IResource getResources toArray getResources synchronizingDetails getName getWorkbenchSite
configure Schedule new Action public void run Configure Refresh Schedule Dialog d new Configure Refresh Schedule Dialog site get Shell participant get Refresh Schedule d set Block On Open false d open  configureSchedule ConfigureRefreshScheduleDialog ConfigureRefreshScheduleDialog getShell getRefreshSchedule setBlockOnOpen
public void initialize final I Synchronize Page Configuration configuration super initialize configuration final Subscriber Participant participant Subscriber Participant configuration get Participant final I Synchronize Page Site site configuration get Site toolbar if participant does Support Synchronize refresh Selection Action new Action public void run I Structured Selection selection I Structured Selection site get Selection Provider get Selection I Resource resources Utils get Resources selection to Array if resources length 0 Refresh all participant resources resources participant get Resources participant refresh resources Policy bind Participant synchronizing Policy bind Participant synchronizing Details participant get Name site get Workbench Site NON NLS 1 NON NLS 2 Utils init Action refresh Selection Action action refresh With Remote NON NLS 1 configure Schedule new Action public void run Configure Refresh Schedule Dialog d new Configure Refresh Schedule Dialog site get Shell participant get Refresh Schedule d set Block On Open false d open Utils init Action configure Schedule action configure Schedulel NON NLS 1 show Preferences new Sync Viewer Show Preferences Action site get Shell remove From View Action new Remove From View Action configuration  ISynchronizePageConfiguration SubscriberParticipant SubscriberParticipant getParticipant ISynchronizePageSite getSite doesSupportSynchronize refreshSelectionAction IStructuredSelection IStructuredSelection getSelectionProvider getSelection IResource getResources toArray getResources synchronizingDetails getName getWorkbenchSite initAction refreshSelectionAction refreshWithRemote configureSchedule ConfigureRefreshScheduleDialog ConfigureRefreshScheduleDialog getShell getRefreshSchedule setBlockOnOpen initAction configureSchedule configureSchedulel showPreferences SyncViewerShowPreferencesAction getShell removeFromViewAction RemoveFromViewAction
public void fill Context Menu I Menu Manager manager if find Group manager I Synchronize Page Configuration SYNCHRONIZE GROUP null find Group manager I Synchronize Page Configuration NAVIGATE GROUP null Place synchronize with navigato to save space append To Group manager I Synchronize Page Configuration NAVIGATE GROUP refresh Selection Action append To Group manager I Synchronize Page Configuration NAVIGATE GROUP remove From View Action else append To Group manager I Synchronize Page Configuration SYNCHRONIZE GROUP refresh Selection Action append To Group manager I Synchronize Page Configuration SYNCHRONIZE GROUP remove From View Action  fillContextMenu IMenuManager findGroup ISynchronizePageConfiguration SYNCHRONIZE_GROUP findGroup ISynchronizePageConfiguration NAVIGATE_GROUP appendToGroup ISynchronizePageConfiguration NAVIGATE_GROUP refreshSelectionAction appendToGroup ISynchronizePageConfiguration NAVIGATE_GROUP removeFromViewAction appendToGroup ISynchronizePageConfiguration SYNCHRONIZE_GROUP refreshSelectionAction appendToGroup ISynchronizePageConfiguration SYNCHRONIZE_GROUP removeFromViewAction
public void fill Action Bars I Action Bars action Bars if action Bars null view menu I Menu Manager menu action Bars get Menu Manager if find Group menu I Synchronize Page Configuration SYNCHRONIZE GROUP null find Group menu I Synchronize Page Configuration PREFERENCES GROUP null append To Group menu I Synchronize Page Configuration PREFERENCES GROUP configure Schedule else append To Group menu I Synchronize Page Configuration SYNCHRONIZE GROUP configure Schedule append To Group menu I Synchronize Page Configuration PREFERENCES GROUP show Preferences  fillActionBars IActionBars actionBars actionBars IMenuManager actionBars getMenuManager findGroup ISynchronizePageConfiguration SYNCHRONIZE_GROUP findGroup ISynchronizePageConfiguration PREFERENCES_GROUP appendToGroup ISynchronizePageConfiguration PREFERENCES_GROUP configureSchedule appendToGroup ISynchronizePageConfiguration SYNCHRONIZE_GROUP configureSchedule appendToGroup ISynchronizePageConfiguration PREFERENCES_GROUP showPreferences

see org eclipse ui texteditor I Update update public void update update Tooltip Text  IUpdate updateTooltipText
protected I Synchronize Participant Reference get Participants return TeamUI get Synchronize Manager get Synchronize Participants  ISynchronizeParticipantReference getParticipants getSynchronizeManager getSynchronizeParticipants
protected boolean select I Synchronize Participant Reference ref return true  ISynchronizeParticipantReference
synchronize Action new Action Policy bind Global Refresh Action 4 NON NLS 1 public void run I Wizard wizard new Global Synchronize Wizard Wizard Dialog dialog new Wizard Dialog f View get View Site get Shell wizard dialog open  synchronizeAction GlobalRefreshAction IWizard GlobalSynchronizeWizard WizardDialog WizardDialog fView getViewSite getShell
public Synchronize Page Drop Down Action I Synchronize View view f View view Utils init Action this action refresh Subscriber NON NLS 1 synchronize Action new Action Policy bind Global Refresh Action 4 NON NLS 1 public void run I Wizard wizard new Global Synchronize Wizard Wizard Dialog dialog new Wizard Dialog f View get View Site get Shell wizard dialog open synchronize Action set Image Descriptor Team Images get Image Descriptor I TeamUI Images IMG SYNC VIEW set Menu Creator this update  SynchronizePageDropDownAction ISynchronizeView fView initAction refreshSubscriber synchronizeAction GlobalRefreshAction IWizard GlobalSynchronizeWizard WizardDialog WizardDialog fView getViewSite getShell synchronizeAction setImageDescriptor TeamImages getImageDescriptor ITeamUIImages IMG_SYNC_VIEW setMenuCreator
public void dispose if f Menu null f Menu dispose f Menu null TeamUI get Synchronize Manager remove Synchronize Participant Listener this  fMenu fMenu fMenu getSynchronizeManager removeSynchronizeParticipantListener
see org eclipse jface action I Menu Creator get Menu org eclipse swt widgets Menu public Menu get Menu Menu parent return null  IMenuCreator getMenu getMenu
public Menu get Menu Control parent if f Menu null f Menu dispose f Menu new Menu parent final I Synchronize Participant Reference participants TeamUI get Synchronize Manager get Synchronize Participants add Participants To Menu f Menu participants if participants length 0 add Menu Separator add Action To Menu f Menu synchronize Action TeamUI get Synchronize Manager add Synchronize Participant Listener this return f Menu  getMenu fMenu fMenu fMenu ISynchronizeParticipantReference getSynchronizeManager getSynchronizeParticipants addParticipantsToMenu fMenu addMenuSeparator addActionToMenu fMenu synchronizeAction getSynchronizeManager addSynchronizeParticipantListener fMenu
protected void add Participants To Menu Menu parent I Synchronize Participant Reference refs I Synchronize Participant current f View get Participant for int i 0 i refs length i I Synchronize Participant Reference page refs i Action action new Show Synchronize Participant Action f View page try boolean is Current page get Participant equals current action set Checked is Current catch Team Exception e continue add Action To Menu f Menu action  addParticipantsToMenu ISynchronizeParticipantReference ISynchronizeParticipant fView getParticipant ISynchronizeParticipantReference ShowSynchronizeParticipantAction fView isCurrent getParticipant setChecked isCurrent TeamException addActionToMenu fMenu
protected void add Action To Menu Menu parent Action action Action Contribution Item item new Action Contribution Item action item fill parent 1  addActionToMenu ActionContributionItem ActionContributionItem
protected void add Menu Separator new Menu Item f Menu SWT SEPARATOR  addMenuSeparator MenuItem fMenu
public void run I Synchronize Participant current f View get Participant if current null current run f View else synchronize Action run update  ISynchronizeParticipant fView getParticipant fView synchronizeAction
Display display TeamUI Plugin get Standard Display display async Exec new Runnable public void run update  TeamUIPlugin getStandardDisplay asyncExec
public void participants Added I Synchronize Participant consoles Display display TeamUI Plugin get Standard Display display async Exec new Runnable public void run update  participantsAdded ISynchronizeParticipant TeamUIPlugin getStandardDisplay asyncExec
display async Exec new Runnable public void run if f Menu null f Menu dispose update  asyncExec fMenu fMenu
public void participants Removed I Synchronize Participant consoles Display display TeamUI Plugin get Standard Display display async Exec new Runnable public void run if f Menu null f Menu dispose update  participantsRemoved ISynchronizeParticipant TeamUIPlugin getStandardDisplay asyncExec fMenu fMenu
private void update Tooltip Text I Synchronize Participant current f View get Participant I Synchronize Participant Reference refs TeamUI get Synchronize Manager get Synchronize Participants String text null if current null refs length 0 text Policy bind Global Refresh Action 5 Utils shorten Text Synchronize View MAX NAME LENGTH current get Name NON NLS 1 set Tool Tip Text text set Text text else text Policy bind Global Refresh Action 4 NON NLS 1 set Tool Tip Text text set Text text  updateTooltipText ISynchronizeParticipant fView getParticipant ISynchronizeParticipantReference getSynchronizeManager getSynchronizeParticipants GlobalRefreshAction shortenText SynchronizeView MAX_NAME_LENGTH getName setToolTipText setText GlobalRefreshAction setToolTipText setText

private final Shell shell public Sync Viewer Show Preferences Action Shell shell this shell shell Utils init Action this action sync View Preferences NON NLS 1  SyncViewerShowPreferencesAction initAction syncViewPreferences
public void run Preference Page page new Sync Viewer Preference Page Dialog dialog new Preference Page Container Dialog shell page dialog set Block On Open true dialog open  PreferencePage SyncViewerPreferencePage PreferencePageContainerDialog setBlockOnOpen

private Synchronize Page Action Group changed Listener new Synchronize Page Action Group public void model Changed I Synchronize Model Element root calculate Description  SynchronizePageActionGroup changedListener SynchronizePageActionGroup modelChanged ISynchronizeModelElement calculateDescription
private I Sync Info Set Change Listener subscriber Listener new I Sync Info Set Change Listener public void sync Info Set Reset Sync Info Set set I Progress Monitor monitor Handled by output set listener  ISyncInfoSetChangeListener subscriberListener ISyncInfoSetChangeListener syncInfoSetReset SyncInfoSet IProgressMonitor
Handled by output set listener public void sync Info Changed I Sync Info Set Change Event event I Progress Monitor monitor calculate Description  syncInfoChanged ISyncInfoSetChangeEvent IProgressMonitor calculateDescription
calculate Description public void sync Info Set Errors Sync Info Set set I Team Status errors I Progress Monitor monitor Handled by output set listener  calculateDescription syncInfoSetErrors SyncInfoSet ITeamStatus IProgressMonitor
private I Sync Info Set Change Listener output Set Listener new I Sync Info Set Change Listener public void sync Info Set Reset Sync Info Set set I Progress Monitor monitor calculate Description  ISyncInfoSetChangeListener outputSetListener ISyncInfoSetChangeListener syncInfoSetReset SyncInfoSet IProgressMonitor calculateDescription
calculate Description public void sync Info Changed I Sync Info Set Change Event event I Progress Monitor monitor Input changed listener will call calculate Description The input will then react to output set changes  calculateDescription syncInfoChanged ISyncInfoSetChangeEvent IProgressMonitor calculateDescription
The input will then react to output set changes public void sync Info Set Errors Sync Info Set set I Team Status errors I Progress Monitor monitor calculate Description  syncInfoSetErrors SyncInfoSet ITeamStatus IProgressMonitor calculateDescription
Create a changes section on the following page param parent the parent control param page the page showing this section public Changes Section Composite parent Sync Info Set Synchronize Page page I Synchronize Page Configuration configuration super parent SWT NONE this page page this configuration configuration this participant configuration get Participant Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH data grab Excess Vertical Space true set Layout Data data forms new Form Toolkit parent get Display forms set Background get Background Color Hyperlink Group group forms get Hyperlink Group group set Background get Background Color changes Section Container new Page Book this SWT NONE data new Grid Data Grid Data FILL BOTH data grab Excess Horizontal Space true data grab Excess Vertical Space true changes Section Container set Layout Data data  ChangesSection SyncInfoSetSynchronizePage ISynchronizePageConfiguration getParticipant GridLayout GridLayout marginHeight marginWidth setLayout GridData GridData GridData FILL_BOTH grabExcessVerticalSpace setLayoutData FormToolkit getDisplay setBackground getBackgroundColor HyperlinkGroup getHyperlinkGroup setBackground getBackgroundColor changesSectionContainer PageBook GridData GridData FILL_BOTH grabExcessHorizontalSpace grabExcessVerticalSpace changesSectionContainer setLayoutData
public Composite get Composite return changes Section Container  getComposite changesSectionContainer
public void set Viewer Viewer viewer this changes Viewer viewer calculate Description configuration add Action Contribution changed Listener get Working Set Sync Info Set add Sync Set Changed Listener subscriber Listener get Sync Info Tree add Sync Set Changed Listener output Set Listener  setViewer changesViewer calculateDescription addActionContribution changedListener getWorkingSetSyncInfoSet addSyncSetChangedListener subscriberListener getSyncInfoTree addSyncSetChangedListener outputSetListener
TeamUI Plugin get Standard Display async Exec new Runnable public void run if changes Section Container is Disposed return if filtered Container null filtered Container dispose filtered Container null filtered Container get Error Composite changes Section Container changes Section Container show Page filtered Container showing Error true  TeamUIPlugin getStandardDisplay asyncExec changesSectionContainer isDisposed filteredContainer filteredContainer filteredContainer filteredContainer getErrorComposite changesSectionContainer changesSectionContainer showPage filteredContainer showingError
TeamUI Plugin get Standard Display async Exec new Runnable public void run if changes Section Container is Disposed return if filtered Container null filtered Container dispose filtered Container null filtered Container get Empty Changes Composite changes Section Container changes Section Container show Page filtered Container  TeamUIPlugin getStandardDisplay asyncExec changesSectionContainer isDisposed filteredContainer filteredContainer filteredContainer filteredContainer getEmptyChangesComposite changesSectionContainer changesSectionContainer showPage filteredContainer
TeamUI Plugin get Standard Display async Exec new Runnable public void run if filtered Container null filtered Container dispose filtered Container null Control control changes Viewer get Control if changes Section Container is Disposed control is Disposed changes Section Container show Page control  TeamUIPlugin getStandardDisplay asyncExec filteredContainer filteredContainer filteredContainer changesViewer getControl changesSectionContainer isDisposed isDisposed changesSectionContainer showPage
private void calculate Description Sync Info Tree sync Info Tree get Sync Info Tree if sync Info Tree get Errors length 0 if showing Error TeamUI Plugin get Standard Display async Exec new Runnable public void run if changes Section Container is Disposed return if filtered Container null filtered Container dispose filtered Container null filtered Container get Error Composite changes Section Container changes Section Container show Page filtered Container showing Error true return showing Error false if sync Info Tree size 0 TeamUI Plugin get Standard Display async Exec new Runnable public void run if changes Section Container is Disposed return if filtered Container null filtered Container dispose filtered Container null filtered Container get Empty Changes Composite changes Section Container changes Section Container show Page filtered Container else TeamUI Plugin get Standard Display async Exec new Runnable public void run if filtered Container null filtered Container dispose filtered Container null Control control changes Viewer get Control if changes Section Container is Disposed control is Disposed changes Section Container show Page control  calculateDescription SyncInfoTree syncInfoTree getSyncInfoTree syncInfoTree getErrors showingError TeamUIPlugin getStandardDisplay asyncExec changesSectionContainer isDisposed filteredContainer filteredContainer filteredContainer filteredContainer getErrorComposite changesSectionContainer changesSectionContainer showPage filteredContainer showingError showingError syncInfoTree TeamUIPlugin getStandardDisplay asyncExec changesSectionContainer isDisposed filteredContainer filteredContainer filteredContainer filteredContainer getEmptyChangesComposite changesSectionContainer changesSectionContainer showPage filteredContainer TeamUIPlugin getStandardDisplay asyncExec filteredContainer filteredContainer filteredContainer changesViewer getControl changesSectionContainer isDisposed isDisposed changesSectionContainer showPage
private boolean is Three Way return I Synchronize Page Configuration THREE WAY equals configuration get Comparison Type  isThreeWay ISynchronizePageConfiguration THREE_WAY getComparisonType
Hyperlink link forms create Hyperlink composite Policy bind Changes Section filter Change Utils mode To String new Mode SWT WRAP NON NLS 1 link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e configuration set Mode new Mode  createHyperlink ChangesSection filterChange modeToString newMode addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent setMode newMode
private Composite get Empty Changes Composite Composite parent Composite composite new Composite parent SWT NONE composite set Background get Background Color Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH data grab Excess Vertical Space true composite set Layout Data data if is Three Way create Description Label composite Policy bind Changes Section no Changes participant get Name NON NLS 1 return composite Sync Info Set working Set get Working Set Sync Info Set Sync Info Set filtered Set get Sync Info Tree int changes In Working Set working Set size int changes In Filter filtered Set size long outgoing Changes working Set count For Sync Info OUTGOING Sync Info DIRECTION MASK long incoming Changes working Set count For Sync Info INCOMING Sync Info DIRECTION MASK if changes In Filter 0 changes In Working Set 0 final int new Mode outgoing Changes 0 I Synchronize Page Configuration OUTGOING MODE I Synchronize Page Configuration INCOMING MODE long num Changes outgoing Changes 0 outgoing Changes incoming Changes String Buffer text new String Buffer text append Policy bind Changes Section filter Hides Utils mode To String configuration get Mode NON NLS 1 if num Changes 1 text append Policy bind Changes Section filter Hides Plural Long to String num Changes Utils mode To String new Mode NON NLS 1 else text append Policy bind Changes Section filter Hides Singular Long to String num Changes Utils mode To String new Mode NON NLS 1 Label warning new Label composite SWT NONE warning set Image TeamUI Plugin get Plugin get Image I Shared Images IMG WARNING OVR Hyperlink link forms create Hyperlink composite Policy bind Changes Section filter Change Utils mode To String new Mode SWT WRAP NON NLS 1 link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e configuration set Mode new Mode forms get Hyperlink Group add link create Description Label composite text to String else create Description Label composite Policy bind Changes Section no Changes participant get Name NON NLS 1 return composite  getEmptyChangesComposite setBackground getBackgroundColor GridLayout GridLayout numColumns setLayout GridData GridData GridData FILL_BOTH grabExcessVerticalSpace setLayoutData isThreeWay createDescriptionLabel ChangesSection noChanges getName SyncInfoSet workingSet getWorkingSetSyncInfoSet SyncInfoSet filteredSet getSyncInfoTree changesInWorkingSet workingSet changesInFilter filteredSet outgoingChanges workingSet countFor SyncInfo SyncInfo DIRECTION_MASK incomingChanges workingSet countFor SyncInfo SyncInfo DIRECTION_MASK changesInFilter changesInWorkingSet newMode outgoingChanges ISynchronizePageConfiguration OUTGOING_MODE ISynchronizePageConfiguration INCOMING_MODE numChanges outgoingChanges outgoingChanges incomingChanges StringBuffer StringBuffer ChangesSection filterHides modeToString getMode numChanges ChangesSection filterHidesPlural toString numChanges modeToString newMode ChangesSection filterHidesSingular toString numChanges modeToString newMode setImage TeamUIPlugin getPlugin getImage ISharedImages IMG_WARNING_OVR createHyperlink ChangesSection filterChange modeToString newMode addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent setMode newMode getHyperlinkGroup createDescriptionLabel toString createDescriptionLabel ChangesSection noChanges getName
private Label create Description Label Composite parent String text Label description new Label parent SWT WRAP Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 2 data width Hint 100 description set Layout Data data description set Text text description set Background get Background Color return description  createDescriptionLabel GridData GridData GridData FILL_HORIZONTAL horizontalSpan widthHint setLayoutData setText setBackground getBackgroundColor
public void dispose super dispose forms dispose configuration remove Action Contribution changed Listener get Working Set Sync Info Set remove Sync Set Changed Listener subscriber Listener get Sync Info Tree remove Sync Set Changed Listener output Set Listener  removeActionContribution changedListener getWorkingSetSyncInfoSet removeSyncSetChangedListener subscriberListener getSyncInfoTree removeSyncSetChangedListener outputSetListener
link set Text Policy bind Changes Section 8 NON NLS 1 link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e show Errors  setText ChangesSection addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent showErrors
link set Text Policy bind Changes Section 9 NON NLS 1 link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e page reset  setText ChangesSection addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent
private Composite get Error Composite Composite parent Composite composite new Composite parent SWT NONE composite set Background get Background Color Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH data grab Excess Vertical Space true composite set Layout Data data Hyperlink link new Hyperlink composite SWT WRAP link set Text Policy bind Changes Section 8 NON NLS 1 link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e show Errors link set Background get Background Color link set Underlined true link new Hyperlink composite SWT WRAP link set Text Policy bind Changes Section 9 NON NLS 1 link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e page reset link set Background get Background Color link set Underlined true create Description Label composite Policy bind Changes Section 10 participant get Name NON NLS 1 return composite  getErrorComposite setBackground getBackgroundColor GridLayout GridLayout numColumns setLayout GridData GridData GridData FILL_BOTH grabExcessVerticalSpace setLayoutData setText ChangesSection addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent showErrors setBackground getBackgroundColor setUnderlined setText ChangesSection addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent setBackground getBackgroundColor setUnderlined createDescriptionLabel ChangesSection getName
private void show Errors I Team Status status get Sync Info Tree get Errors String title Policy bind Changes Section 11 NON NLS 1 if status length 1 Error Dialog open Error get Shell title status 0 get Message status 0 else Multi Status multi new Multi Status TeamUI Plugin ID 0 status Policy bind Changes Section 12 null NON NLS 1 Error Dialog open Error get Shell title null multi  showErrors ITeamStatus getSyncInfoTree getErrors ChangesSection ErrorDialog openError getShell getMessage MultiStatus MultiStatus TeamUIPlugin ChangesSection ErrorDialog openError getShell
protected Color get Background Color return get Shell get Display get System Color SWT COLOR LIST BACKGROUND  getBackgroundColor getShell getDisplay getSystemColor COLOR_LIST_BACKGROUND
private Sync Info Tree get Sync Info Tree return Sync Info Tree configuration get Property I Synchronize Page Configuration P SYNC INFO SET  SyncInfoTree getSyncInfoTree SyncInfoTree getProperty ISynchronizePageConfiguration P_SYNC_INFO_SET
private Sync Info Set get Working Set Sync Info Set return Sync Info Set configuration get Property Synchronize Page Configuration P WORKING SET SYNC INFO SET  SyncInfoSet getWorkingSetSyncInfoSet SyncInfoSet getProperty SynchronizePageConfiguration P_WORKING_SET_SYNC_INFO_SET

protected class Unchanged Compressed Diff Node extends Unchanged Resource Model Element public Unchanged Compressed Diff Node I Diff Container parent I Resource resource super parent resource  UnchangedCompressedDiffNode UnchangedResourceModelElement UnchangedCompressedDiffNode IDiffContainer IResource
see org eclipse compare structuremergeviewer Diff Node get Name public String get Name I Resource resource get Resource return resource get Project Relative Path to String  DiffNode getName getName IResource getResource getProjectRelativePath toString
see org eclipse team ui synchronize Sync Info Model Element get Image Descriptor java lang Object public Image Descriptor get Image Descriptor Object object return TeamUI Plugin get Image Descriptor I TeamUI Images IMG COMPRESSED FOLDER  SyncInfoModelElement getImageDescriptor ImageDescriptor getImageDescriptor TeamUIPlugin getImageDescriptor ITeamUIImages IMG_COMPRESSED_FOLDER
public class Compressed Folder Diff Node extends Sync Info Model Element public Compressed Folder Diff Node I Diff Container parent Sync Info info super parent info  CompressedFolderDiffNode SyncInfoModelElement CompressedFolderDiffNode IDiffContainer SyncInfo
see org eclipse compare structuremergeviewer Diff Node get Name public String get Name I Resource resource get Resource return resource get Project Relative Path to String  DiffNode getName getName IResource getResource getProjectRelativePath toString
see org eclipse team ui synchronize Sync Info Model Element get Image Descriptor java lang Object public Image Descriptor get Image Descriptor Object object return TeamUI Plugin get Image Descriptor I TeamUI Images IMG COMPRESSED FOLDER  SyncInfoModelElement getImageDescriptor ImageDescriptor getImageDescriptor TeamUIPlugin getImageDescriptor ITeamUIImages IMG_COMPRESSED_FOLDER
public static class Compressed Folder Model Provider Descriptor implements I Synchronize Model Provider Descriptor public static final String ID TeamUI Plugin ID modelprovider compressedfolders NON NLS 1 public String get Id return ID  CompressedFolderModelProviderDescriptor ISynchronizeModelProviderDescriptor TeamUIPlugin modelprovider_compressedfolders getId
return ID public String get Name return Policy bind Compressed Folders Model Provider 0 NON NLS 1  getName CompressedFoldersModelProvider
return Policy bind Compressed Folders Model Provider 0 NON NLS 1 public Image Descriptor get Image Descriptor return TeamUI Plugin get Image Descriptor I TeamUI Images IMG COMPRESSED FOLDER  CompressedFoldersModelProvider ImageDescriptor getImageDescriptor TeamUIPlugin getImageDescriptor ITeamUIImages IMG_COMPRESSED_FOLDER
private static final Compressed Folder Model Provider Descriptor compressed Descriptor new Compressed Folder Model Provider Descriptor public Compressed Folders Model Provider I Synchronize Page Configuration configuration Sync Info Tree set super configuration set  CompressedFolderModelProviderDescriptor compressedDescriptor CompressedFolderModelProviderDescriptor CompressedFoldersModelProvider ISynchronizePageConfiguration SyncInfoTree
see org eclipse team internal ui synchronize Hierarchical Model Provider get Descriptor public I Synchronize Model Provider Descriptor get Descriptor return compressed Descriptor  HierarchicalModelProvider getDescriptor ISynchronizeModelProviderDescriptor getDescriptor compressedDescriptor
return new Synchronize Model Element Sorter protected int compare Names I Resource resource1 I Resource resource2 if resource1 get Type I Resource FOLDER resource2 get Type I Resource FOLDER return collator compare resource1 get Project Relative Path to String resource2 get Project Relative Path to String return super compare Names resource1 resource2  SynchronizeModelElementSorter compareNames IResource IResource getType IResource getType IResource getProjectRelativePath toString getProjectRelativePath toString compareNames
public Viewer Sorter get Viewer Sorter return new Synchronize Model Element Sorter protected int compare Names I Resource resource1 I Resource resource2 if resource1 get Type I Resource FOLDER resource2 get Type I Resource FOLDER return collator compare resource1 get Project Relative Path to String resource2 get Project Relative Path to String return super compare Names resource1 resource2  ViewerSorter getViewerSorter SynchronizeModelElementSorter compareNames IResource IResource getType IResource getType IResource getProjectRelativePath toString getProjectRelativePath toString compareNames
protected I Diff Element create Model Objects I Synchronize Model Element container I Resource resource null if container get Model Root resource Resources Plugin get Workspace get Root else resource container get Resource if resource null if resource get Type I Resource PROJECT return get Project Children container I Project resource if resource get Type I Resource FOLDER return get Folder Children container resource return super create Model Objects container  IDiffElement createModelObjects ISynchronizeModelElement IResource getModelRoot ResourcesPlugin getWorkspace getRoot getResource getType IResource getProjectChildren IProject getType IResource getFolderChildren createModelObjects
private I Diff Element get Folder Children I Synchronize Model Element parent I Resource resource Folders will only contain out of sync children I Resource children get Sync Info Tree members resource List result new Array List for int i 0 i children length i I Resource child children i if child get Type I Resource FILE result add create Model Object parent child return I Diff Element result to Array new I Diff Element result size  IDiffElement getFolderChildren ISynchronizeModelElement IResource IResource getSyncInfoTree ArrayList IResource getType IResource createModelObject IDiffElement toArray IDiffElement
private I Diff Element get Project Children I Synchronize Model Element parent I Project project The out of sync elements could possibly include the project so the code below is written to ignore the project Sync Info out Of Sync get Sync Info Tree get Sync Infos project I Resource DEPTH INFINITE Set result new Hash Set Set resources To Show new Hash Set for int i 0 i out Of Sync length i Sync Info info out Of Sync i I Resource local info get Local if local get Project Relative Path segment Count 1 local get Type I Resource FILE resources To Show add local else if local get Type I Resource FILE resources To Show add local get Parent else if local get Type I Resource FOLDER resources To Show add local for Iterator iter resources To Show iterator iter has Next I Resource resource I Resource iter next result add create Model Object parent resource return I Diff Element result to Array new I Diff Element result size  IDiffElement getProjectChildren ISynchronizeModelElement IProject SyncInfo outOfSync getSyncInfoTree getSyncInfos IResource DEPTH_INFINITE HashSet resourcesToShow HashSet outOfSync SyncInfo outOfSync IResource getLocal getProjectRelativePath segmentCount getType IResource resourcesToShow getType IResource resourcesToShow getParent getType IResource resourcesToShow resourcesToShow hasNext IResource IResource createModelObject IDiffElement toArray IDiffElement
protected I Synchronize Model Element create Model Object I Synchronize Model Element parent I Resource resource if resource get Type I Resource FOLDER Sync Info info get Sync Info Tree get Sync Info resource I Synchronize Model Element new Node if info null new Node new Compressed Folder Diff Node parent info else new Node new Unchanged Compressed Diff Node parent resource add To Viewer new Node return new Node return super create Model Object parent resource  ISynchronizeModelElement createModelObject ISynchronizeModelElement IResource getType IResource SyncInfo getSyncInfoTree getSyncInfo ISynchronizeModelElement newNode newNode CompressedFolderDiffNode newNode UnchangedCompressedDiffNode addToViewer newNode newNode createModelObject
Update the viewer for the sync set additions in the provided event This method is invoked by code handle Changes I Sync Info Set Change Event code Subclasses may override param event protected void handle Resource Additions I Sync Info Tree Change Event event Sync Info infos event get Added Resources for int i 0 i infos length i Sync Info info infos i add Resource info  handleChanges ISyncInfoSetChangeEvent handleResourceAdditions ISyncInfoTreeChangeEvent SyncInfo getAddedResources SyncInfo addResource
private void add Resource Sync Info info I Resource local info get Local I Synchronize Model Element existing Node get Model Object local if existing Node null if local get Type I Resource FILE I Synchronize Model Element parent Node get Model Object local get Parent if parent Node null I Synchronize Model Element project Node get Model Object local get Project if project Node null project Node create Model Object get Model Root local get Project if local get Parent get Type I Resource PROJECT parent Node project Node else parent Node create Model Object project Node local get Parent create Model Object parent Node local else I Synchronize Model Element project Node get Model Object local get Project if project Node null project Node create Model Object get Model Root local get Project create Model Object project Node local else Either The folder node was added as the parent of a newly added out of sync file or the file was somehow already there so just refresh handle Change existing Node info  addResource SyncInfo IResource getLocal ISynchronizeModelElement existingNode getModelObject existingNode getType IResource ISynchronizeModelElement parentNode getModelObject getParent parentNode ISynchronizeModelElement projectNode getModelObject getProject projectNode projectNode createModelObject getModelRoot getProject getParent getType IResource parentNode projectNode parentNode createModelObject projectNode getParent createModelObject parentNode ISynchronizeModelElement projectNode getModelObject getProject projectNode projectNode createModelObject getModelRoot getProject createModelObject projectNode handleChange existingNode
protected void handle Resource Removals I Sync Info Tree Change Event event I Resource roots event get Removed Subtree Roots First deal with any projects that have been removed List removed Projects new Array List for int i 0 i roots length i I Resource resource roots i if resource get Type I Resource PROJECT remove From Viewer resource removed Projects add resource I Resource resources event get Removed Resources for int i 0 i resources length i I Resource resource resources i if removed Projects contains resource get Project if resource get Type I Resource FILE if is Compressed Parent Empty resource The parent compressed folder is also empty so remove it remove From Viewer resource get Parent else remove From Viewer resource else A folder has been removed i e is in sync but may still contain children remove From Viewer resource if has File Members I Container resource create Model Object get Model Object resource get Project resource build Model Objects get Model Object resource  handleResourceRemovals ISyncInfoTreeChangeEvent IResource getRemovedSubtreeRoots removedProjects ArrayList IResource getType IResource removeFromViewer removedProjects IResource getRemovedResources IResource removedProjects getProject getType IResource isCompressedParentEmpty removeFromViewer getParent removeFromViewer removeFromViewer hasFileMembers IContainer createModelObject getModelObject getProject buildModelObjects getModelObject
protected int get Logical Model Depth I Resource resource if resource get Type I Resource PROJECT return I Resource DEPTH INFINITE else return I Resource DEPTH ONE  getLogicalModelDepth IResource getType IResource IResource DEPTH_INFINITE IResource DEPTH_ONE
private boolean is Compressed Parent Empty I Resource resource I Container parent resource get Parent if parent null parent get Type I Resource ROOT parent get Type I Resource PROJECT return false return has File Members parent  isCompressedParentEmpty IResource IContainer getParent getType IResource getType IResource hasFileMembers
private boolean has File Members I Container parent Check if the sync set has any file children of the parent I Resource members get Sync Info Tree members parent for int i 0 i members length i I Resource member members i if member get Type I Resource FILE return true The parent does not contain any files return false  hasFileMembers IContainer IResource getSyncInfoTree IResource getType IResource

private Subscriber Refresh Schedule schedule public Configure Refresh Schedule Dialog Shell parent Shell Subscriber Refresh Schedule schedule super parent Shell Policy bind Configure Refresh Schedule Dialog 0 Utils get Type Name schedule get Participant NON NLS 1 this schedule schedule  SubscriberRefreshSchedule ConfigureRefreshScheduleDialog parentShell SubscriberRefreshSchedule parentShell ConfigureRefreshScheduleDialog getTypeName getParticipant
protected void create Main Dialog Area Composite parent I Page Validator validator new I Page Validator public void set Complete String error Message set Page Complete error Message null set Error Message error Message schedule Composite new Configure Synchronize Schedule Composite parent schedule validator Dialog apply Dialog Font parent  createMainDialogArea IPageValidator IPageValidator setComplete errorMessage setPageComplete errorMessage setErrorMessage errorMessage scheduleComposite ConfigureSynchronizeScheduleComposite applyDialogFont
see org eclipse jface dialogs Dialog ok Pressed protected void ok Pressed schedule Composite save Values super ok Pressed  okPressed okPressed scheduleComposite saveValues okPressed
see org eclipse team internal ui dialogs Details Dialog include Details Button protected boolean include Details Button return false  DetailsDialog includeDetailsButton includeDetailsButton
see org eclipse team internal ui dialogs Details Dialog create Drop Down Dialog Area org eclipse swt widgets Composite protected Composite create Drop Down Dialog Area Composite parent return null  DetailsDialog createDropDownDialogArea createDropDownDialogArea
see org eclipse team internal ui dialogs Details Dialog update Enablements protected void update Enablements  DetailsDialog updateEnablements updateEnablements

public Configure Synchronize Schedule Composite Composite parent Subscriber Refresh Schedule schedule I Page Validator validator super parent SWT NONE this schedule schedule this validator validator create Main Dialog Area parent  ConfigureSynchronizeScheduleComposite SubscriberRefreshSchedule IPageValidator createMainDialogArea
private void initialize Values boolean enable Background schedule is Enabled boolean hours false user Refresh Only set Selection enable Background enable Background Refresh set Selection enable Background long seconds schedule get Refresh Interval if seconds 60 seconds 60 long minutes seconds 60 if minutes 60 minutes minutes 60 hours true hours Or Seconds select hours 0 1 time set Text Long to String minutes  initializeValues enableBackground isEnabled userRefreshOnly setSelection enableBackground enableBackgroundRefresh setSelection enableBackground getRefreshInterval hoursOrSeconds setText toString
user Refresh Only set Text Policy bind Configure Refresh Schedule Dialog 2 NON NLS 1 user Refresh Only add Selection Listener new Selection Listener public void widget Selected Selection Event e update Enablements  userRefreshOnly setText ConfigureRefreshScheduleDialog userRefreshOnly addSelectionListener SelectionListener widgetSelected SelectionEvent updateEnablements
update Enablements public void widget Default Selected Selection Event e  updateEnablements widgetDefaultSelected SelectionEvent
enable Background Refresh set Text Policy bind Configure Refresh Schedule Dialog 3 NON NLS 1 enable Background Refresh add Selection Listener new Selection Listener public void widget Selected Selection Event e update Enablements  enableBackgroundRefresh setText ConfigureRefreshScheduleDialog enableBackgroundRefresh addSelectionListener SelectionListener widgetSelected SelectionEvent updateEnablements
update Enablements public void widget Default Selected Selection Event e  updateEnablements widgetDefaultSelected SelectionEvent
time set Layout Data gridData 1 time add Modify Listener new Modify Listener public void modify Text Modify Event e update Enablements  setLayoutData gridData_1 addModifyListener ModifyListener modifyText ModifyEvent updateEnablements
protected void create Main Dialog Area Composite parent final Grid Layout grid Layout new Grid Layout grid Layout num Columns 2 set Layout grid Layout set Layout Data new Grid Data Composite area this create Wrapping Label area Policy bind Configure Refresh Schedule Dialog 1 schedule get Participant get Name 0 2 NON NLS 1 final Label label new Label area SWT WRAP final Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL grid Data horizontal Span 2 label set Layout Data grid Data label set Text Policy bind Configure Refresh Schedule Dialog 1a Subscriber Refresh Schedule refresh Event As String schedule get Last Refresh Event NON NLS 1 user Refresh Only new Button area SWT RADIO final Grid Data grid Data new Grid Data grid Data horizontal Span 2 user Refresh Only set Layout Data grid Data user Refresh Only set Text Policy bind Configure Refresh Schedule Dialog 2 NON NLS 1 user Refresh Only add Selection Listener new Selection Listener public void widget Selected Selection Event e update Enablements public void widget Default Selected Selection Event e enable Background Refresh new Button area SWT RADIO final Grid Data grid Data new Grid Data grid Data horizontal Span 2 enable Background Refresh set Layout Data grid Data enable Background Refresh set Text Policy bind Configure Refresh Schedule Dialog 3 NON NLS 1 enable Background Refresh add Selection Listener new Selection Listener public void widget Selected Selection Event e update Enablements public void widget Default Selected Selection Event e final Composite composite new Composite area SWT NONE final Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB VERTICAL Grid Data VERTICAL ALIGN BEGINNING grid Data horizontal Span 2 composite set Layout Data grid Data final Grid Layout gridLayout 1 new Grid Layout gridLayout 1 num Columns 3 composite set Layout gridLayout 1 final Label label new Label composite SWT NONE label set Text Policy bind Configure Refresh Schedule Dialog 4 NON NLS 1 time new Text composite SWT BORDER SWT RIGHT final Grid Data gridData 1 new Grid Data gridData 1 width Hint 35 time set Layout Data gridData 1 time add Modify Listener new Modify Listener public void modify Text Modify Event e update Enablements hours Or Seconds new Combo composite SWT READ ONLY hours Or Seconds set Items new String Policy bind Configure Refresh Schedule Dialog 5 Policy bind Configure Refresh Schedule Dialog 6 NON NLS 1 NON NLS 2 final Grid Data gridData 1 new Grid Data gridData 1 width Hint 75 hours Or Seconds set Layout Data gridData 1 initialize Values  createMainDialogArea GridLayout gridLayout GridLayout gridLayout numColumns setLayout gridLayout setLayoutData GridData createWrappingLabel ConfigureRefreshScheduleDialog getParticipant getName GridData gridData GridData GridData FILL_HORIZONTAL gridData horizontalSpan setLayoutData gridData setText ConfigureRefreshScheduleDialog SubscriberRefreshSchedule refreshEventAsString getLastRefreshEvent userRefreshOnly GridData gridData GridData gridData horizontalSpan userRefreshOnly setLayoutData gridData userRefreshOnly setText ConfigureRefreshScheduleDialog userRefreshOnly addSelectionListener SelectionListener widgetSelected SelectionEvent updateEnablements widgetDefaultSelected SelectionEvent enableBackgroundRefresh GridData gridData GridData gridData horizontalSpan enableBackgroundRefresh setLayoutData gridData enableBackgroundRefresh setText ConfigureRefreshScheduleDialog enableBackgroundRefresh addSelectionListener SelectionListener widgetSelected SelectionEvent updateEnablements widgetDefaultSelected SelectionEvent GridData gridData GridData GridData FILL_HORIZONTAL GridData GRAB_VERTICAL GridData VERTICAL_ALIGN_BEGINNING gridData horizontalSpan setLayoutData gridData GridLayout gridLayout_1 GridLayout gridLayout_1 numColumns setLayout gridLayout_1 setText ConfigureRefreshScheduleDialog GridData gridData_1 GridData gridData_1 widthHint setLayoutData gridData_1 addModifyListener ModifyListener modifyText ModifyEvent updateEnablements hoursOrSeconds READ_ONLY hoursOrSeconds setItems ConfigureRefreshScheduleDialog ConfigureRefreshScheduleDialog GridData gridData_1 GridData gridData_1 widthHint hoursOrSeconds setLayoutData gridData_1 initializeValues
public void save Values int hours hours Or Seconds get Selection Index long seconds Long parse Long time get Text if hours 0 seconds seconds 3600 else seconds seconds 60 schedule set Refresh Interval seconds if schedule is Enabled enable Background Refresh get Selection schedule set Enabled enable Background Refresh get Selection true allow to start update schedule Subscriber Participant participant schedule get Participant if participant is Pinned schedule is Enabled participant set Pinned Message Dialog open Question get Shell Policy bind Configure Synchronize Schedule Composite 0 Utils get Type Name participant NON NLS 1 Policy bind Configure Synchronize Schedule Composite 1 Utils get Type Name participant NON NLS 1 participant set Refresh Schedule schedule  saveValues hoursOrSeconds getSelectionIndex parseLong getText setRefreshInterval isEnabled enableBackgroundRefresh getSelection setEnabled enableBackgroundRefresh getSelection SubscriberParticipant getParticipant isPinned isEnabled setPinned MessageDialog openQuestion getShell ConfigureSynchronizeScheduleComposite getTypeName ConfigureSynchronizeScheduleComposite getTypeName setRefreshSchedule
public void update Enablements boolean complete false try long number Long parse Long time get Text if number 0 validator set Complete Policy bind Configure Refresh Schedule Dialog 7 NON NLS 1 else validator set Complete null complete true catch Number Format Exception e validator set Complete Policy bind Configure Refresh Schedule Dialog 8 NON NLS 1 time set Enabled enable Background Refresh get Selection hours Or Seconds set Enabled enable Background Refresh get Selection  updateEnablements parseLong getText setComplete ConfigureRefreshScheduleDialog setComplete NumberFormatException setComplete ConfigureRefreshScheduleDialog setEnabled enableBackgroundRefresh getSelection hoursOrSeconds setEnabled enableBackgroundRefresh getSelection
protected void set Error Message String error this error Message error  setErrorMessage errorMessage
public String get Error Message return error Message  getErrorMessage errorMessage
private Label create Wrapping Label Composite parent String text int indent int horizontal Span Label label new Label parent SWT LEFT SWT WRAP label set Text text Grid Data data new Grid Data data horizontal Span horizontal Span data horizontal Alignment Grid Data FILL data horizontal Indent indent data grab Excess Horizontal Space true data width Hint 400 label set Layout Data data return label  createWrappingLabel horizontalSpan setText GridData GridData horizontalSpan horizontalSpan horizontalAlignment GridData horizontalIndent grabExcessHorizontalSpace widthHint setLayoutData

private I Label Decorator decorators public Multi Label Decorator I Label Decorator decorators this decorators decorators  ILabelDecorator MultiLabelDecorator ILabelDecorator
public Image decorate Image Image image Object element for int i 0 i decorators length i I Label Decorator decorator decorators i Image new Image decorator decorate Image image element if new Image null image new Image return image  decorateImage ILabelDecorator newImage decorateImage newImage newImage
public String decorate Text String text Object element for int i 0 i decorators length i I Label Decorator decorator decorators i String new Text decorator decorate Text text element if new Text null text new Text return text  decorateText ILabelDecorator newText decorateText newText newText
public void dispose for int i 0 i decorators length i I Label Decorator d decorators i d dispose  ILabelDecorator
public Decorating Color Label Provider I Label Provider provider I Label Decorator decorators super provider new Multi Label Decorator decorators  DecoratingColorLabelProvider ILabelProvider ILabelDecorator MultiLabelDecorator
public Color get Foreground Object element I Label Provider p get Label Provider if p instanceof I Color Provider return I Color Provider p get Foreground element return null  getForeground ILabelProvider getLabelProvider IColorProvider IColorProvider getForeground
public Color get Background Object element I Label Provider p get Label Provider if p instanceof I Color Provider return I Color Provider p get Background element return null  getBackground ILabelProvider getLabelProvider IColorProvider IColorProvider getBackground
public Font get Font Object element I Label Provider p get Label Provider if p instanceof I Font Provider return I Font Provider p get Font element return null  getFont ILabelProvider getLabelProvider IFontProvider IFontProvider getFont

see org eclipse ui model I Workbench Adapter get Children java lang Object public Object get Children Object o Diff Node node get Diff Node o return node null node get Children new Object 0  IWorkbenchAdapter getChildren getChildren DiffNode getDiffNode getChildren
public Image Descriptor get Image Descriptor Object o Diff Node node get Diff Node o if node instanceof I Synchronize Model Element return I Synchronize Model Element node get Image Descriptor o return null  ImageDescriptor getImageDescriptor DiffNode getDiffNode ISynchronizeModelElement ISynchronizeModelElement getImageDescriptor
see org eclipse ui model I Workbench Adapter get Label java lang Object public String get Label Object o Diff Node node get Diff Node o return node null node get Name NON NLS 1  IWorkbenchAdapter getLabel getLabel DiffNode getDiffNode getName
see org eclipse ui model I Workbench Adapter get Parent java lang Object public Object get Parent Object o Diff Node node get Diff Node o return node null node get Parent null  IWorkbenchAdapter getParent getParent DiffNode getDiffNode getParent
private Diff Node get Diff Node Object element if element instanceof Diff Node return Diff Node element return null  DiffNode getDiffNode DiffNode DiffNode

class My Content Provider extends Base Workbench Content Provider public Object get Children Object element if element instanceof List return I Resource List element to Array new I Resource List element size return super get Children element  MyContentProvider BaseWorkbenchContentProvider getChildren IResource toArray IResource getChildren
private Label Provider workbench Provider new Workbench Label Provider public String get Text Object element if element instanceof I Container I Container c I Container element if c get Type I Resource PROJECT resources contains c return c get Full Path to String return workbench Provider get Text element  LabelProvider workbenchProvider WorkbenchLabelProvider getText IContainer IContainer IContainer getType IResource getFullPath toString workbenchProvider getText
return workbench Provider get Text element public Image get Image Object element return workbench Provider get Image element  workbenchProvider getText getImage workbenchProvider getImage
Create a new page for the given participant The scope hint will determine the initial selection param participant the participant to synchronize public Global Refresh Resource Selection Page I Resource resources super Policy bind Global Refresh Resource Selection Page 1 NON NLS 1 Caching the roots so that the decorator doesn t have to recompute all the time this resources Arrays as List resources set Description Policy bind Global Refresh Resource Selection Page 2 NON NLS 1 set Title Policy bind Global Refresh Resource Selection Page 3 NON NLS 1 I Dialog Settings s TeamUI Plugin get Plugin get Dialog Settings this settings s get Section STORE SECTION if settings null settings s add New Section STORE SECTION  GlobalRefreshResourceSelectionPage IResource GlobalRefreshResourceSelectionPage asList setDescription GlobalRefreshResourceSelectionPage setTitle GlobalRefreshResourceSelectionPage IDialogSettings TeamUIPlugin getPlugin getDialogSettings getSection STORE_SECTION addNewSection STORE_SECTION
f Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event updateOK Status  fViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent updateOKStatus
public void widget Selected Selection Event e participant Scope set Selection true selected Resources Scope set Selection false working Set Scope set Selection false update Participant Scope scope Checking Element true updateOK Status scope Checking Element false  widgetSelected SelectionEvent participantScope setSelection selectedResourcesScope setSelection workingSetScope setSelection updateParticipantScope scopeCheckingElement updateOKStatus scopeCheckingElement
de Select All add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Viewer set Checked Elements new Object 0 updateOK Status  deSelectAll addSelectionListener SelectionAdapter widgetSelected SelectionEvent fViewer setCheckedElements updateOKStatus
participant Scope add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Participant Scope  participantScope addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateParticipantScope
selected Resources Scope add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Selected Resources Scope  selectedResourcesScope addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateSelectedResourcesScope
public void widget Selected Selection Event e if working Set Scope get Selection update Working Set Scope  widgetSelected SelectionEvent workingSetScope getSelection updateWorkingSetScope
select Working Set Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select Working Set Action  selectWorkingSetButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectWorkingSetAction
public void create Control Composite parent2 Composite top new Composite parent2 SWT NULL top set Layout new Grid Layout initialize Dialog Units top Grid Data data new Grid Data Grid Data FILL BOTH data width Hint 50 top set Layout Data data set Control top Workbench Help set Help get Control I Help Context Ids SYNC RESOURCE SELECTION PAGE Label l new Label top SWT NULL l set Text Policy bind Global Refresh Resource Selection Page 5 NON NLS 1 The viewer f Viewer new Container Checked Tree Viewer top SWT BORDER data new Grid Data Grid Data FILL BOTH data width Hint 200 data height Hint 100 f Viewer get Control set Layout Data data f Viewer set Content Provider new My Content Provider f Viewer set Label Provider new Decorating Label Provider new My Label Provider PlatformUI get Workbench get Decorator Manager get Label Decorator f Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event updateOK Status f Viewer set Sorter new Resource Sorter Resource Sorter NAME f Viewer set Input resources Composite select Group new Composite top SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 layout make Columns Equal Width false select Group set Layout layout data new Grid Data Grid Data FILL HORIZONTAL select Group set Layout Data data Button select All new Button select Group SWT NULL select All set Text Policy bind Global Refresh Resource Selection Page 12 NON NLS 1 select All add Selection Listener new Selection Adapter public void widget Selected Selection Event e participant Scope set Selection true selected Resources Scope set Selection false working Set Scope set Selection false update Participant Scope scope Checking Element true updateOK Status scope Checking Element false set Button Layout Data select All Button de Select All new Button select Group SWT NULL de Select All set Text Policy bind Global Refresh Resource Selection Page 13 NON NLS 1 de Select All add Selection Listener new Selection Adapter public void widget Selected Selection Event e f Viewer set Checked Elements new Object 0 updateOK Status set Button Layout Data de Select All Scopes Group scope Group new Group top SWT NULL scope Group set Text Policy bind Global Refresh Resource Selection Page 6 NON NLS 1 layout new Grid Layout layout num Columns 3 layout make Columns Equal Width false scope Group set Layout layout data new Grid Data Grid Data FILL HORIZONTAL data width Hint 50 scope Group set Layout Data data participant Scope new Button scope Group SWT RADIO participant Scope set Text Policy bind Global Refresh Resource Selection Page 7 NON NLS 1 participant Scope add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Participant Scope selected Resources Scope new Button scope Group SWT RADIO selected Resources Scope set Text Policy bind Global Refresh Resource Selection Page 8 NON NLS 1 selected Resources Scope add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Selected Resources Scope data new Grid Data data horizontal Span 2 selected Resources Scope set Layout Data data working Set Scope new Button scope Group SWT RADIO working Set Scope set Text Policy bind Global Refresh Resource Selection Page 10 NON NLS 1 working Set Scope add Selection Listener new Selection Adapter public void widget Selected Selection Event e if working Set Scope get Selection update Working Set Scope working Set Label new Text scope Group SWT BORDER working Set Label set Editable false data new Grid Data Grid Data FILL HORIZONTAL working Set Label set Layout Data data Button select Working Set Button new Button scope Group SWT NULL select Working Set Button set Text Policy bind Global Refresh Resource Selection Page 11 NON NLS 1 select Working Set Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select Working Set Action data new Grid Data Grid Data HORIZONTAL ALIGN END select Working Set Button set Layout Data data Dialog apply Dialog Font select Working Set Button initialize Scoping Hint Dialog apply Dialog Font top  createControl setLayout GridLayout initializeDialogUnits GridData GridData GridData FILL_BOTH widthHint setLayoutData setControl WorkbenchHelp setHelp getControl IHelpContextIds SYNC_RESOURCE_SELECTION_PAGE setText GlobalRefreshResourceSelectionPage fViewer ContainerCheckedTreeViewer GridData GridData FILL_BOTH widthHint heightHint fViewer getControl setLayoutData fViewer setContentProvider MyContentProvider fViewer setLabelProvider DecoratingLabelProvider MyLabelProvider getWorkbench getDecoratorManager getLabelDecorator fViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent updateOKStatus fViewer setSorter ResourceSorter ResourceSorter fViewer setInput selectGroup GridLayout GridLayout numColumns marginHeight marginWidth makeColumnsEqualWidth selectGroup setLayout GridData GridData FILL_HORIZONTAL selectGroup setLayoutData selectAll selectGroup selectAll setText GlobalRefreshResourceSelectionPage selectAll addSelectionListener SelectionAdapter widgetSelected SelectionEvent participantScope setSelection selectedResourcesScope setSelection workingSetScope setSelection updateParticipantScope scopeCheckingElement updateOKStatus scopeCheckingElement setButtonLayoutData selectAll deSelectAll selectGroup deSelectAll setText GlobalRefreshResourceSelectionPage deSelectAll addSelectionListener SelectionAdapter widgetSelected SelectionEvent fViewer setCheckedElements updateOKStatus setButtonLayoutData deSelectAll scopeGroup scopeGroup setText GlobalRefreshResourceSelectionPage GridLayout numColumns makeColumnsEqualWidth scopeGroup setLayout GridData GridData FILL_HORIZONTAL widthHint scopeGroup setLayoutData participantScope scopeGroup participantScope setText GlobalRefreshResourceSelectionPage participantScope addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateParticipantScope selectedResourcesScope scopeGroup selectedResourcesScope setText GlobalRefreshResourceSelectionPage selectedResourcesScope addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateSelectedResourcesScope GridData horizontalSpan selectedResourcesScope setLayoutData workingSetScope scopeGroup workingSetScope setText GlobalRefreshResourceSelectionPage workingSetScope addSelectionListener SelectionAdapter widgetSelected SelectionEvent workingSetScope getSelection updateWorkingSetScope workingSetLabel scopeGroup workingSetLabel setEditable GridData GridData FILL_HORIZONTAL workingSetLabel setLayoutData selectWorkingSetButton scopeGroup selectWorkingSetButton setText GlobalRefreshResourceSelectionPage selectWorkingSetButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectWorkingSetAction GridData GridData HORIZONTAL_ALIGN_END selectWorkingSetButton setLayoutData applyDialogFont selectWorkingSetButton initializeScopingHint applyDialogFont
Allow the finish button to be pressed if there are checked resources protected void updateOK Status if f Viewer null if scope Checking Element if selected Resources Scope get Selection selected Resources Scope set Selection true participant Scope set Selection false working Set Scope set Selection false update Selected Resources Scope set Page Complete are Any Elements Checked null else set Page Complete false  updateOKStatus fViewer scopeCheckingElement selectedResourcesScope getSelection selectedResourcesScope setSelection participantScope setSelection workingSetScope setSelection updateSelectedResourcesScope setPageComplete areAnyElementsChecked setPageComplete
Returns code true code if any of the root resources are grayed private I Resource are Any Elements Checked Tree Item item f Viewer get Tree get Items for int i 0 i item length i Tree Item child item i if child get Checked child get Grayed return I Resource child get Data return null  IResource areAnyElementsChecked TreeItem fViewer getTree getItems TreeItem getChecked getGrayed IResource getData
Return the list of top most resources that have been checked return the list of top most resources that have been checked or an empty list if nothing is selected public I Resource get Root Resources Tree Item item f Viewer get Tree get Items List checked new Array List for int i 0 i item length i Tree Item child item i collect Checked Items child checked return I Resource checked to Array new I Resource checked size  IResource getRootResources TreeItem fViewer getTree getItems ArrayList TreeItem collectCheckedItems IResource toArray IResource
public I Synchronize Scope get Synchronize Scope if working Set Scope get Selection return new Working Set Scope working Sets if participant Scope get Selection return new Workspace Scope return new Resource Scope get Root Resources  ISynchronizeScope getSynchronizeScope workingSetScope getSelection WorkingSetScope workingSets participantScope getSelection WorkspaceScope ResourceScope getRootResources
private void initialize Scoping Hint String working sets settings get STORE WORKING SETS if working sets null participant Scope set Selection true update Participant Scope else String Tokenizer st new String Tokenizer working sets NON NLS 1 Array List ws new Array List while st has More Tokens String working Set Name st next Token if working Set Name null working Set Name equals false NON NLS 1 I Working Set Manager working Set Manager PlatformUI get Workbench get Working Set Manager I Working Set working Set working Set Manager get Working Set working Set Name if working Set null ws add working Set if ws is Empty this working Sets I Working Set ws to Array new I Working Set ws size update Working Set Scope update Working Set Label participant Scope set Selection false selected Resources Scope set Selection false working Set Scope set Selection true  initializeScopingHint working_sets STORE_WORKING_SETS working_sets participantScope setSelection updateParticipantScope StringTokenizer StringTokenizer working_sets ArrayList ArrayList hasMoreTokens workingSetName nextToken workingSetName workingSetName IWorkingSetManager workingSetManager getWorkbench getWorkingSetManager IWorkingSet workingSet workingSetManager getWorkingSet workingSetName workingSet workingSet isEmpty workingSets IWorkingSet toArray IWorkingSet updateWorkingSetScope updateWorkingSetLabel participantScope setSelection selectedResourcesScope setSelection workingSetScope setSelection
public void dispose if working Sets null working Set Scope get Selection String concats Working Sets make Working Set Label settings put STORE WORKING SETS concats Working Sets else settings put STORE WORKING SETS String null  workingSets workingSetScope getSelection concatsWorkingSets makeWorkingSetLabel STORE_WORKING_SETS concatsWorkingSets STORE_WORKING_SETS
private void update Participant Scope if participant Scope get Selection scope Checking Element true f Viewer set Checked Elements resources to Array set Page Complete get Root Resources length 0 scope Checking Element false  updateParticipantScope participantScope getSelection scopeCheckingElement fViewer setCheckedElements toArray setPageComplete getRootResources scopeCheckingElement
private void update Selected Resources Scope set Page Complete get Root Resources length 0  updateSelectedResourcesScope setPageComplete getRootResources
private void select Working Set Action I Working Set Manager manager PlatformUI get Workbench get Working Set Manager I Working Set Selection Dialog dialog manager create Working Set Selection Dialog get Shell true dialog open I Working Set sets dialog get Selection if sets null working Sets sets else dialog cancelled return update Working Set Scope update Working Set Label participant Scope set Selection false selected Resources Scope set Selection false working Set Scope set Selection true  selectWorkingSetAction IWorkingSetManager getWorkbench getWorkingSetManager IWorkingSetSelectionDialog createWorkingSetSelectionDialog getShell IWorkingSet getSelection workingSets updateWorkingSetScope updateWorkingSetLabel participantScope setSelection selectedResourcesScope setSelection workingSetScope setSelection
private void update Working Set Scope if working Sets null List all Working Set Resources new Array List for int i 0 i working Sets length i I Working Set set working Sets i all Working Set Resources add All IDE compute Selected Resources new Structured Selection set get Elements scope Checking Element true f Viewer set Checked Elements all Working Set Resources to Array new I Resource all Working Set Resources size scope Checking Element false set Page Complete true else scope Checking Element true f Viewer set Checked Elements new Object 0 scope Checking Element false set Page Complete false  updateWorkingSetScope workingSets allWorkingSetResources ArrayList workingSets IWorkingSet workingSets allWorkingSetResources addAll computeSelectedResources StructuredSelection getElements scopeCheckingElement fViewer setCheckedElements allWorkingSetResources toArray IResource allWorkingSetResources scopeCheckingElement setPageComplete scopeCheckingElement fViewer setCheckedElements scopeCheckingElement setPageComplete
private void collect Checked Items Tree Item item List checked if item get Checked item get Grayed checked add item get Data else if item get Grayed Tree Item children item get Items for int i 0 i children length i Tree Item child children i collect Checked Items child checked  collectCheckedItems TreeItem getChecked getGrayed getData getGrayed TreeItem getItems TreeItem collectCheckedItems
private void update Working Set Label if working Sets null working Set Label set Text Policy bind Statistics Panel no Working Set NON NLS 1 else working Set Label set Text make Working Set Label  updateWorkingSetLabel workingSets workingSetLabel setText StatisticsPanel noWorkingSet workingSetLabel setText makeWorkingSetLabel
return private String make Working Set Label String Buffer buffer new String Buffer for int i 0 i working Sets length i I Working Set set working Sets i if i 0 buffer append NON NLS 1 buffer append set get Name return buffer to String  makeWorkingSetLabel StringBuffer StringBuffer workingSets IWorkingSet workingSets getName toString

param configuration public Hierarchical Model Manager I Synchronize Page Configuration configuration super configuration  HierarchicalModelManager ISynchronizePageConfiguration
protected I Synchronize Model Provider Descriptor get Supported Model Providers return new I Synchronize Model Provider Descriptor new Hierarchical Model Provider Hierarchical Model Provider Descriptor new Compressed Folders Model Provider Compressed Folder Model Provider Descriptor  ISynchronizeModelProviderDescriptor getSupportedModelProviders ISynchronizeModelProviderDescriptor HierarchicalModelProvider HierarchicalModelProviderDescriptor CompressedFoldersModelProvider CompressedFolderModelProviderDescriptor
protected I Synchronize Model Provider create Model Provider String id if id null if get Show Compressed Folders id Compressed Folders Model Provider Compressed Folder Model Provider Descriptor ID else id Hierarchical Model Provider Hierarchical Model Provider Descriptor ID if id ends With Compressed Folders Model Provider Compressed Folder Model Provider Descriptor ID return new Compressed Folders Model Provider get Configuration get Sync Info Set else return new Hierarchical Model Provider get Configuration get Sync Info Set  ISynchronizeModelProvider createModelProvider getShowCompressedFolders CompressedFoldersModelProvider CompressedFolderModelProviderDescriptor HierarchicalModelProvider HierarchicalModelProviderDescriptor endsWith CompressedFoldersModelProvider CompressedFolderModelProviderDescriptor CompressedFoldersModelProvider getConfiguration getSyncInfoSet HierarchicalModelProvider getConfiguration getSyncInfoSet
private Sync Info Tree get Sync Info Set return Sync Info Tree get Configuration get Property I Synchronize Page Configuration P SYNC INFO SET  SyncInfoTree getSyncInfoSet SyncInfoTree getConfiguration getProperty ISynchronizePageConfiguration P_SYNC_INFO_SET
Return the state of the compressed folder setting return the state of the compressed folder setting private boolean get Show Compressed Folders return TeamUI Plugin get Plugin get Preference Store get Boolean I Preference Ids SYNCVIEW COMPRESS FOLDERS  getShowCompressedFolders TeamUIPlugin getPlugin getPreferenceStore getBoolean IPreferenceIds SYNCVIEW_COMPRESS_FOLDERS

public static class Hierarchical Model Provider Descriptor implements I Synchronize Model Provider Descriptor public static final String ID TeamUI Plugin ID modelprovider hierarchical NON NLS 1 public String get Id return ID  HierarchicalModelProviderDescriptor ISynchronizeModelProviderDescriptor TeamUIPlugin modelprovider_hierarchical getId
return ID public String get Name return Policy bind Hierarchical Model Provider 0 NON NLS 1  getName HierarchicalModelProvider
return Policy bind Hierarchical Model Provider 0 NON NLS 1 public Image Descriptor get Image Descriptor return Team Images get Image Descriptor I TeamUI Images IMG HIERARCHICAL  HierarchicalModelProvider ImageDescriptor getImageDescriptor TeamImages getImageDescriptor ITeamUIImages IMG_HIERARCHICAL
Create an input based on the provide sync set The input is not initialized until code prepare Input code is called param set the sync set used as the basis for the model created by this input public Hierarchical Model Provider I Synchronize Page Configuration configuration Sync Info Tree set super configuration set  prepareInput HierarchicalModelProvider ISynchronizePageConfiguration SyncInfoTree
see org eclipse team internal ui synchronize I Synchronize Model Provider get Descriptor public I Synchronize Model Provider Descriptor get Descriptor return hierarchical Descriptor  ISynchronizeModelProvider getDescriptor ISynchronizeModelProviderDescriptor getDescriptor hierarchicalDescriptor
public Viewer Sorter get Viewer Sorter return new Synchronize Model Element Sorter  ViewerSorter getViewerSorter SynchronizeModelElementSorter
protected Sync Info Tree get Sync Info Tree return Sync Info Tree get Sync Info Set  SyncInfoTree getSyncInfoTree SyncInfoTree getSyncInfoSet
Invoked by the code build Model Object code method to create the childen of the given node This method can be overriden by subclasses but subclasses should inv param container return protected I Diff Element create Model Objects I Synchronize Model Element container I Resource resource null if container get Model Root resource Resources Plugin get Workspace get Root else resource container get Resource if resource null Sync Info Tree info Tree get Sync Info Tree I Resource children info Tree members resource I Synchronize Model Element nodes new I Synchronize Model Element children length for int i 0 i children length i nodes i create Model Object container children i return nodes return new I Diff Element 0  buildModelObject IDiffElement createModelObjects ISynchronizeModelElement IResource getModelRoot ResourcesPlugin getWorkspace getRoot getResource SyncInfoTree infoTree getSyncInfoTree IResource infoTree ISynchronizeModelElement ISynchronizeModelElement createModelObject IDiffElement
protected I Synchronize Model Element create Model Object I Synchronize Model Element parent I Resource resource Sync Info info get Sync Info Tree get Sync Info resource Synchronize Model Element new Node if info null new Node new Sync Info Model Element parent info else new Node new Unchanged Resource Model Element parent resource add To Viewer new Node return new Node  ISynchronizeModelElement createModelObject ISynchronizeModelElement IResource SyncInfo getSyncInfoTree getSyncInfo SynchronizeModelElement newNode newNode SyncInfoModelElement newNode UnchangedResourceModelElement addToViewer newNode newNode
Invokes code get Model Object Object code on an array of resources param resources the resources return the model objects for the resources protected Object get Model Objects I Resource resources Object result new Object resources length for int i 0 i resources length i result i get Model Object resources i return result  getModelObject getModelObjects IResource getModelObject
Handle the change for the existing diff node The diff node should be changed to have the given sync info param diff Node the diff node to be changed param info the new sync info for the diff node protected void handle Change I Synchronize Model Element diff Node Sync Info info I Resource local info get Local if diff Node instanceof Sync Info Model Element Sync Info Model Element diff Node update info propogate Conflict State diff Node false else remove From Viewer local add Resources new I Resource local  diffNode handleChange ISynchronizeModelElement diffNode SyncInfo IResource getLocal diffNode SyncInfoModelElement SyncInfoModelElement diffNode propogateConflictState diffNode removeFromViewer addResources IResource
protected void add Resources I Resource added for int i 0 i added length i I Resource resource added i I Synchronize Model Element node get Model Object resource if node null Somehow the node exists Remove it and read it to ensure what is shown matches the contents of the sync set remove From Viewer resource Build the sub tree rooted at this node I Synchronize Model Element parent get Model Object resource get Parent if parent null node create Model Object parent resource build Model Objects node  addResources IResource IResource ISynchronizeModelElement getModelObject removeFromViewer ISynchronizeModelElement getModelObject getParent createModelObject buildModelObjects
protected I Diff Element build Model Objects I Synchronize Model Element node I Diff Element children create Model Objects node for int i 0 i children length i I Diff Element element children i if element instanceof I Synchronize Model Element build Model Objects I Synchronize Model Element element return children  IDiffElement buildModelObjects ISynchronizeModelElement IDiffElement createModelObjects IDiffElement ISynchronizeModelElement buildModelObjects ISynchronizeModelElement
see org eclipse team ui synchronize viewers Synchronize Model Provider do Add org eclipse team ui synchronize viewers Synchronize Model Element org eclipse team ui synchronize viewers Synchronize Model Element protected void do Add I Synchronize Model Element parent I Synchronize Model Element element Abstract Tree Viewer viewer Abstract Tree Viewer get Viewer viewer add parent element  SynchronizeModelProvider doAdd SynchronizeModelElement SynchronizeModelElement doAdd ISynchronizeModelElement ISynchronizeModelElement AbstractTreeViewer AbstractTreeViewer getViewer
see org eclipse team ui synchronize viewers Synchronize Model Provider do Remove org eclipse team ui synchronize viewers Synchronize Model Element protected void do Remove I Synchronize Model Element element Abstract Tree Viewer viewer Abstract Tree Viewer get Viewer viewer remove element  SynchronizeModelProvider doRemove SynchronizeModelElement doRemove ISynchronizeModelElement AbstractTreeViewer AbstractTreeViewer getViewer
see org eclipse team ui synchronize viewers Synchronize Model Provider handle Resource Additions org eclipse team core synchronize I Sync Info Tree Change Event protected void handle Resource Additions I Sync Info Tree Change Event event I Resource added event get Added Subtree Roots add Resources added  SynchronizeModelProvider handleResourceAdditions ISyncInfoTreeChangeEvent handleResourceAdditions ISyncInfoTreeChangeEvent IResource getAddedSubtreeRoots addResources
protected void handle Resource Changes I Sync Info Tree Change Event event Refresh the viewer for each changed resource Sync Info infos event get Changed Resources for int i 0 i infos length i Sync Info info infos i I Resource local info get Local I Synchronize Model Element diff Node get Model Object local if diff Node null handle Change diff Node info  handleResourceChanges ISyncInfoTreeChangeEvent SyncInfo getChangedResources SyncInfo IResource getLocal ISynchronizeModelElement diffNode getModelObject diffNode handleChange diffNode
protected void handle Resource Removals I Sync Info Tree Change Event event Remove the removed subtrees I Resource removed Roots event get Removed Subtree Roots for int i 0 i removed Roots length i remove From Viewer removed Roots i We have to look for folders that may no longer be in the set i e are in sync but still have descendants in the set I Resource removed Resources event get Removed Resources for int i 0 i removed Resources length i I Resource resource removed Resources i if resource get Type I Resource FILE I Synchronize Model Element node get Model Object resource if node null remove From Viewer resource add Resources new I Resource resource  handleResourceRemovals ISyncInfoTreeChangeEvent IResource removedRoots getRemovedSubtreeRoots removedRoots removeFromViewer removedRoots IResource removedResources getRemovedResources removedResources IResource removedResources getType IResource ISynchronizeModelElement getModelObject removeFromViewer addResources IResource

public interface I Page Validator If error Message in code null code then the page is complete otherwise the error message indicates that the reason why the page is not complete  IPageValidator errorMessage

Returns the type of this event The returned value will be one of code SCHEDULED REFRESH code code USER REFRESH code return the type of this event see SCHEDULED REFRESH see USER REFRESH  SCHEDULED_REFRESH USER_REFRESH SCHEDULED_REFRESH USER_REFRESH
The subscriber that was refreshed return the subscriber that was refreshed 
The changes found during the refresh or an empty list if no changes were found return the changes found during the refresh or an empty list if no changes were found 
The time in milliseconds at which the refresh was started return the time in milliseconds at which the refresh was started 
The time in milliseconds at which the refresh was completed return the time in milliseconds at which the refresh was completed 
Returns the status of the refresh operation This can be used to determine if the refresh completed successfuly with an error or was cancelled return the status of the refresh operation 
Returns the list of resources that were refreshed return the list of resources that were refreshed 

public interface I Refresh Subscriber Listener Notification that a refresh is about to start The event contains the resources that will be refreshed param event an event describing the state of the refresh  IRefreshSubscriberListener
Notification that a refresh has completed The event contains the changes found during the refresh as well as the status of the refresh param event the event describing the result of the refresh 

Returns the sync set this model provider is showing return the sync set this model provider is showing 
Returns the description for this model provider return the description for this model provider 
Return the code Abstract Tree Viewer code asociated with this content provider or code null code if the viewer is not of the proper type return  AbstractTreeViewer
Installed the viewer to be used to display the model param viewer the viewer in which to diplay the model 
Builds the viewer model based on the contents of the sync set return the root element of the generated model 
The provider can try and return a mapping for the provided object Providers often use mappings to store the source of a logical element they have created For example when displaying resource based logical elements a provider will cache the resource element mapping for quick retrieval of the element when resource based changes are made param object the object to query for a mapping return an object created by this provider that would be shown in a viewer or code null code if the provided object is not mapped by this provider 
public abstract Object get Mapping Object object Dispose of the builder public abstract void dispose  getMapping
Returns the input created by this controller or code null code if link prepare Input I Progress Monitor hasn t been called on this object yet return  prepareInput IProgressMonitor
Returns the sorter for this model return the sorter for this model 
Allows the provider to save state Is usually called before provider is disposed and it is safe to access the viewer 

public interface I Synchronize Model Provider Descriptor Returns the name of this model provider This can be shown to the user return the name of this model provider  ISynchronizeModelProviderDescriptor
Returns the unique identifier for this model provider return the unique identifier for this model provider 
Returns the image that represents this model provider This image will be shown to the user return the image that represents this model provider 

Creates a code Resource Node code for the given resource param resource the resource public Local Resource Typed Element I Resource resource super resource  ResourceNode LocalResourceTypedElement IResource
protected I Structure Comparator create Child I Resource child return new Local Resource Typed Element child  IStructureComparator createChild IResource LocalResourceTypedElement
public void set Content byte contents f Dirty true super set Content contents  setContent fDirty setContent
public void update I Resource resource this discard Buffer fire Content Changed  IResource discardBuffer fireContentChanged
Commits buffered contents to resource public void commit I Progress Monitor pm throws Core Exception if f Dirty if f Delete File null f Delete File delete true true pm return I Resource resource get Resource if resource instanceof I File Byte Array Input Stream is new Byte Array Input Stream get Content try I File file I File resource if file exists file set Contents is false true pm else file create is false pm f Dirty false finally fire Content Changed if is null try is close catch IO Exception ex  IProgressMonitor CoreException fDirty fDeleteFile fDeleteFile IResource getResource IFile ByteArrayInputStream ByteArrayInputStream getContent IFile IFile setContents fDirty fireContentChanged IOException
public I Typed Element replace I Typed Element child I Typed Element other if child null add resource create a node without a resource behind it I Resource resource get Resource if resource instanceof I Folder I Folder folder I Folder resource I File file folder get File other get Name child new Buffered Resource Node file if other null delete resource I Resource resource get Resource if resource instanceof I Folder I Folder folder I Folder resource I File file folder get File child get Name if file null file exists f Delete File file f Dirty true return null if other instanceof I Stream Content Accessor child instanceof I Editable Content I Editable Content dst I Editable Content child try Input Stream is I Stream Content Accessor other get Contents byte bytes read Bytes is if bytes null dst set Content bytes catch Core Exception ex fire Content Changed return child  ITypedElement ITypedElement ITypedElement IResource getResource IFolder IFolder IFolder IFile getFile getName BufferedResourceNode IResource getResource IFolder IFolder IFolder IFile getFile getName fDeleteFile fDirty IStreamContentAccessor IEditableContent IEditableContent IEditableContent InputStream IStreamContentAccessor getContents readBytes setContent CoreException fireContentChanged
public static byte read Bytes Input Stream in Byte Array Output Stream bos new Byte Array Output Stream try while true int c in read if c 1 break bos write c catch IO Exception ex return null finally if in null try in close catch IO Exception x try bos close catch IO Exception x return bos to Byte Array  readBytes InputStream ByteArrayOutputStream ByteArrayOutputStream IOException IOException IOException toByteArray
public Input Stream get Contents throws Core Exception if get Resource exists return super get Contents return null  InputStream getContents CoreException getResource getContents

private boolean f Next First Time true public Part Navigator Object panes f Panes panes  fNextFirstTime PartNavigator fPanes
public Object get Panes return f Panes  getPanes fPanes
public boolean goto Difference boolean next f Last Direction next Fix for http dev eclipse org bugs show bug cgi id 20106 if next f Next First Time must Open f Next First Time false open Element find most down stream Compare Viewer Pane int n 0 I Navigatable navigators new I Navigatable 4 for int i 0 i f Panes length i navigators n get Navigator f Panes i if navigators n null n while n 0 n if navigators n goto Difference next at end of this navigator continue else not at end return false return true  gotoDifference fLastDirection show_bug fNextFirstTime mustOpen fNextFirstTime openElement CompareViewerPane INavigatable INavigatable fPanes getNavigator fPanes gotoDifference
private static I Navigatable get Navigator Object p if p null return null Control control null if p instanceof Compare Viewer Switching Pane Compare Viewer Switching Pane pane Compare Viewer Switching Pane p if pane is Empty return null Viewer viewer pane get Viewer if viewer null return null control viewer get Control if control null return null Object data control get Data I Navigatable NAVIGATOR PROPERTY if data instanceof I Navigatable return I Navigatable data else if p instanceof I Adaptable return I Navigatable I Adaptable p get Adapter I Navigatable class return null  INavigatable getNavigator CompareViewerSwitchingPane CompareViewerSwitchingPane CompareViewerSwitchingPane isEmpty getViewer getControl getData INavigatable NAVIGATOR_PROPERTY INavigatable INavigatable IAdaptable INavigatable IAdaptable getAdapter INavigatable
private static Compare Navigator find Navigator Control c while c null c is Disposed PR 1GEUVV2 Object data c get Data if data instanceof Compare Editor Input Compare Editor Input cei Compare Editor Input data Object adapter cei get Adapter Compare Navigator class if adapter instanceof Compare Navigator return Compare Navigator adapter c c get Parent return null  CompareNavigator findNavigator isDisposed getData CompareEditorInput CompareEditorInput CompareEditorInput getAdapter CompareNavigator CompareNavigator CompareNavigator getParent
private boolean reset Direction boolean last f Last Direction f Last Direction true return last  resetDirection fLastDirection fLastDirection
private boolean must Open if f Panes null f Panes length 0 return false for int i 1 i f Panes length i Object p f Panes i if p instanceof Compare Viewer Switching Pane Compare Viewer Switching Pane pane Compare Viewer Switching Pane p if pane null pane get Input null return false return true  mustOpen fPanes fPanes fPanes fPanes CompareViewerSwitchingPane CompareViewerSwitchingPane CompareViewerSwitchingPane getInput
private void open Element if f Panes null f Panes length 0 return I Openable openable get Openable f Panes 0 if openable null openable open Selected  openElement fPanes fPanes IOpenable getOpenable fPanes openSelected
private static I Openable get Openable Object p if p instanceof Compare Viewer Switching Pane Compare Viewer Switching Pane pane Compare Viewer Switching Pane p if pane null return null if pane is Empty return null Viewer viewer pane get Viewer if viewer null return null Control control viewer get Control if control null return null Object data control get Data I Openable OPENABLE PROPERTY if data instanceof I Openable return I Openable data return null  IOpenable getOpenable CompareViewerSwitchingPane CompareViewerSwitchingPane CompareViewerSwitchingPane isEmpty getViewer getControl getData IOpenable OPENABLE_PROPERTY IOpenable IOpenable

public class Ref Rec public Ref Rec Object id Object value this id id this value value add Ref  RefRec RefRec addRef
add Ref public Object get Id return id  addRef getId
return id public Object get Value return value  getValue
return value public int add Ref ref Count return ref Count  addRef refCount refCount
return ref Count public int remove Ref ref Count return ref Count  refCount removeRef refCount refCount
return ref Count public int get Ref return ref Count  refCount getRef refCount
return ref Count public boolean is Not Referenced return ref Count 0  refCount isNotReferenced refCount
Creates a new counter public Reference Counter super  ReferenceCounter
Adds one reference to an object in the counter param id is a unique ID for the object return the new ref count public int add Ref Object id Ref Rec rec Ref Rec map Id To Rec get id if rec null return 0 return rec add Ref  addRef RefRec RefRec mapIdToRec addRef
Returns the object defined by an ID If the ID is not found code null code is returned return the object or code null code public Object get Object id Ref Rec rec Ref Rec map Id To Rec get id if rec null return null return rec get Value  RefRec RefRec mapIdToRec getValue
Returns a complete list of the keys in the counter return a Set containing the ID for each public Set key Set return map Id To Rec key Set  keySet mapIdToRec keySet
Adds an object to the counter for counting and gives it an initial ref count of 1 param id is a unique ID for the object param value is the object itself public void put Object id Object value Ref Rec rec new Ref Rec id value map Id To Rec put id rec  RefRec RefRec mapIdToRec
Removes one reference from an object in the counter If the ref count drops to 0 the object is removed from the counter completely param id is a unique ID for the object return the new ref count public int remove Ref Object id Ref Rec rec Ref Rec map Id To Rec get id if rec null return 0 int new Count rec remove Ref if new Count 0 map Id To Rec remove id return new Count  removeRef RefRec RefRec mapIdToRec newCount removeRef newCount mapIdToRec newCount
Returns a complete list of the values in the counter return a Collection containing the values public List values int size map Id To Rec size Array List list new Array List size Iterator iter map Id To Rec values iterator while iter has Next Ref Rec rec Ref Rec iter next list add rec get Value return list  mapIdToRec ArrayList ArrayList mapIdToRec hasNext RefRec RefRec getValue

private Subscriber Sync Info Collector collector public Refresh Change Listener Subscriber Sync Info Collector collector this collector collector  SubscriberSyncInfoCollector RefreshChangeListener SubscriberSyncInfoCollector
public void subscriber Resource Changed I Subscriber Change Event deltas for int i 0 i deltas length i I Subscriber Change Event delta deltas i if delta get Flags I Subscriber Change Event SYNC CHANGED changes add delta  subscriberResourceChanged ISubscriberChangeEvent ISubscriberChangeEvent getFlags ISubscriberChangeEvent SYNC_CHANGED
public Sync Info get Changes collector wait For Collector new Null Progress Monitor List changed Sync Infos new Array List Sync Info Set set collector get Sync Info Set for Iterator it changes iterator it has Next I Subscriber Change Event delta I Subscriber Change Event it next Sync Info info set get Sync Info delta get Resource if info null interesting Change info changed Sync Infos add info return Sync Info changed Sync Infos to Array new Sync Info changed Sync Infos size  SyncInfo getChanges waitForCollector NullProgressMonitor changedSyncInfos ArrayList SyncInfoSet getSyncInfoSet hasNext ISubscriberChangeEvent ISubscriberChangeEvent SyncInfo getSyncInfo getResource interestingChange changedSyncInfos SyncInfo changedSyncInfos toArray SyncInfo changedSyncInfos
private boolean interesting Change Sync Info info int kind info get Kind if is Three Way int direction Sync Info get Direction kind return direction Sync Info INCOMING direction Sync Info CONFLICTING else return Sync Info get Change kind Sync Info IN SYNC  interestingChange SyncInfo getKind isThreeWay SyncInfo getDirection SyncInfo SyncInfo SyncInfo getChange SyncInfo IN_SYNC
private boolean is Three Way return collector get Subscriber get Resource Comparator is Three Way  isThreeWay getSubscriber getResourceComparator isThreeWay
public void clear changes clear 

public Refresh Event int type I Resource resources Subscriber subscriber this type type this subscriber subscriber this resources resources  RefreshEvent IResource
public int get Refresh Type return type  getRefreshType
public Subscriber get Subscriber return subscriber  getSubscriber
public Sync Info get Changes return changes null changes new Sync Info 0  SyncInfo getChanges SyncInfo
public void set Changes Sync Info changes this changes changes  setChanges SyncInfo
public long get Start Time return start Time  getStartTime startTime
public void set Start Time long start Time this start Time start Time  setStartTime startTime startTime startTime
public long get Stop Time return stop Time  getStopTime stopTime
public void set Stop Time long stop Time this stop Time stop Time  setStopTime stopTime stopTime stopTime
public I Status get Status return status  IStatus getStatus
public void set Status I Status status this status status  setStatus IStatus
public I Resource get Resources return resources  IResource getResources

private abstract class Notification implements I Safe Runnable private I Refresh Subscriber Listener listener public void handle Exception Throwable exception don t log the exception it is already being logged in Platform run  ISafeRunnable IRefreshSubscriberListener handleException
don t log the exception it is already being logged in Platform run public void run I Refresh Subscriber Listener listener this listener listener Platform run this  IRefreshSubscriberListener
Platform run this public void run throws Exception notify listener 
Subsclasses overide this method to send an event safely to a lsistener param listener 
private static final int THRESHOLD 250 private boolean was Blocking false protected Nonblocking Progress Monitor I Progress Monitor monitor Refresh Subscriber Job job super monitor this job job  wasBlocking NonblockingProgressMonitor IProgressMonitor RefreshSubscriberJob
public boolean is Canceled if super is Canceled return true if job should Reschedule job is Blocking if block Time 0 block Time System current Time Millis else if System current Time Millis block Time THRESHOLD We ve been blocking for too long was Blocking true return true else block Time 0 was Blocking false return false  isCanceled isCanceled shouldReschedule isBlocking blockTime blockTime currentTimeMillis currentTimeMillis blockTime wasBlocking blockTime wasBlocking
return false public boolean was Blocking return was Blocking  wasBlocking wasBlocking
add Job Change Listener new Job Change Adapter public void done I Job Change Event event if should Reschedule I Status result event get Result if result get Severity I Status CANCEL restart On Cancel return long delay schedule Delay if result POSTPONED Restart in 5 seconds delay 5000 Refresh Subscriber Job this schedule delay restart On Cancel true  addJobChangeListener JobChangeAdapter IJobChangeEvent shouldReschedule IStatus getResult getSeverity IStatus restartOnCancel scheduleDelay RefreshSubscriberJob restartOnCancel
Create a job to refresh the specified resources with the subscriber param participant the subscriber participant param name param resources param subscriber public Refresh Subscriber Job Subscriber Participant participant String job Name String task Name I Resource resources I Refresh Subscriber Listener listener super task Name Assert is Not Null resources Assert is Not Null participant Assert is Not Null resources this resources resources this participant participant this task Name job Name set Priority Job DECORATE set Refresh Interval 3600 1 hour Handle restarting of job if it is configured as a scheduled refresh job add Job Change Listener new Job Change Adapter public void done I Job Change Event event if should Reschedule I Status result event get Result if result get Severity I Status CANCEL restart On Cancel return long delay schedule Delay if result POSTPONED Restart in 5 seconds delay 5000 Refresh Subscriber Job this schedule delay restart On Cancel true if listener null initialize listener  RefreshSubscriberJob SubscriberParticipant jobName taskName IResource IRefreshSubscriberListener taskName isNotNull isNotNull isNotNull taskName jobName setPriority setRefreshInterval addJobChangeListener JobChangeAdapter IJobChangeEvent shouldReschedule IStatus getResult getSeverity IStatus restartOnCancel scheduleDelay RefreshSubscriberJob restartOnCancel
If a collector is available then run the refresh and the background event processing within the same progess group public boolean should Run Ensure that any progress shown as a result of this refresh occurs hidden in a progress group return get Subscriber null  shouldRun getSubscriber
public boolean belongs To Object family if family instanceof Refresh Subscriber Job return Refresh Subscriber Job family get Subscriber get Subscriber else if family instanceof Subscriber Participant return family participant else return family get Family family I Synchronize Manager FAMILY SYNCHRONIZE OPERATION  belongsTo RefreshSubscriberJob RefreshSubscriberJob getSubscriber getSubscriber SubscriberParticipant getFamily ISynchronizeManager FAMILY_SYNCHRONIZE_OPERATION
public static Object get Family return FAMILY ID  getFamily FAMILY_ID
This is run by the job scheduler A list of subscribers will be refreshed errors will not stop the job and it will continue to refresh the other subscribers public I Status run I Progress Monitor monitor Perform a pre check for auto build or manual build jobs when auto refreshing if should Reschedule is Job In Family Running Resources Plugin FAMILY AUTO BUILD is Job In Family Running Resources Plugin FAMILY MANUAL BUILD return POSTPONED Only allow one refresh job at a time NOTE It would be cleaner if this was done by a scheduling rule but at the time of writting it is not possible due to the scheduling rule containment rules Acquiring lock to ensure only one refresh job is running at a particular time boolean acquired false try while acquired try acquired lock acquire 1000 catch Interrupted Exception e1 acquired false Policy check Canceled monitor Subscriber subscriber get Subscriber I Resource roots get Resources if there are no resources to refresh just return if subscriber null roots null return Status OK STATUS Subscriber Sync Info Collector collector get Collector Refresh Event event new Refresh Event reschedule I Refresh Event SCHEDULED REFRESH I Refresh Event USER REFRESH roots collector get Subscriber Refresh Change Listener change Listener new Refresh Change Listener collector I Status status null Nonblocking Progress Monitor wrapped Monitor null try event set Start Time System current Time Millis if monitor is Canceled return Status CANCEL STATUS Set up change listener so that we can determine the changes found during this refresh subscriber add Listener change Listener Pre Notify notify Listeners STARTED event Perform the refresh monitor set Task Name get Name wrapped Monitor new Nonblocking Progress Monitor monitor this subscriber refresh roots I Resource DEPTH INFINITE wrapped Monitor Prepare the results set Property I Progress Constants KEEPONE PROPERTY Boolean value Of is Job Modal catch Operation Canceled Exception e2 if monitor is Canceled The refresh was cancelled by the user status Status CANCEL STATUS else The refresh was cancelled due to a blockage or a cancelled authentication if wrapped Monitor null wrapped Monitor was Blocking status POSTPONED else status Status CANCEL STATUS catch Team Exception e status e get Status finally event set Stop Time System current Time Millis subscriber remove Listener change Listener monitor done Post Notify event set Changes change Listener get Changes if status null status calculate Status event event set Status status notify Listeners DONE event return event get Status finally if acquired lock release  IStatus IProgressMonitor shouldReschedule isJobInFamilyRunning ResourcesPlugin FAMILY_AUTO_BUILD isJobInFamilyRunning ResourcesPlugin FAMILY_MANUAL_BUILD InterruptedException checkCanceled getSubscriber IResource getResources OK_STATUS SubscriberSyncInfoCollector getCollector RefreshEvent RefreshEvent IRefreshEvent SCHEDULED_REFRESH IRefreshEvent USER_REFRESH getSubscriber RefreshChangeListener changeListener RefreshChangeListener IStatus NonblockingProgressMonitor wrappedMonitor setStartTime currentTimeMillis isCanceled CANCEL_STATUS addListener changeListener notifyListeners setTaskName getName wrappedMonitor NonblockingProgressMonitor IResource DEPTH_INFINITE wrappedMonitor setProperty IProgressConstants KEEPONE_PROPERTY valueOf isJobModal OperationCanceledException isCanceled CANCEL_STATUS wrappedMonitor wrappedMonitor wasBlocking CANCEL_STATUS TeamException getStatus setStopTime currentTimeMillis removeListener changeListener setChanges changeListener getChanges calculateStatus setStatus notifyListeners getStatus
private boolean is Job In Family Running Object family Job jobs Platform get Job Manager find family if jobs null jobs length 0 for int i 0 i jobs length i Job job jobs i if job get State Job NONE return true return false  isJobInFamilyRunning getJobManager getState
private I Status calculate Status I Refresh Event event String Buffer text new String Buffer int code I Status OK Sync Info changes event get Changes Subscriber Sync Info Collector collector get Collector if collector null int num Changes refreshed Resources Contain Changes event if num Changes 0 code I Refresh Event STATUS CHANGES if changes length 0 New changes found String num New Changes Integer to String event get Changes length if event get Changes length 1 text append Policy bind Refresh Complete Dialog new Changes Singular new Object get Name num New Changes NON NLS 1 else text append Policy bind Refresh Complete Dialog new Changes Plural new Object get Name num New Changes NON NLS 1 else Refreshed resources contain changes if num Changes 1 text append Policy bind Refresh Complete Dialog changes Singular new Object get Name new Integer num Changes NON NLS 1 else text append Policy bind Refresh Complete Dialog changes Plural new Object get Name new Integer num Changes NON NLS 1 else No changes found code I Refresh Event STATUS NO CHANGES text append Policy bind Refresh Complete Dialog 6 get Name NON NLS 1 return new Status I Status OK TeamUI Plugin ID code text to String null return Status OK STATUS  IStatus calculateStatus IRefreshEvent StringBuffer StringBuffer IStatus SyncInfo getChanges SubscriberSyncInfoCollector getCollector numChanges refreshedResourcesContainChanges numChanges IRefreshEvent STATUS_CHANGES numNewChanges toString getChanges getChanges RefreshCompleteDialog newChangesSingular getName numNewChanges RefreshCompleteDialog newChangesPlural getName numNewChanges numChanges RefreshCompleteDialog changesSingular getName numChanges RefreshCompleteDialog changesPlural getName numChanges IRefreshEvent STATUS_NO_CHANGES RefreshCompleteDialog getName IStatus TeamUIPlugin toString OK_STATUS
private int refreshed Resources Contain Changes I Refresh Event event int num Changes 0 Subscriber Sync Info Collector collector get Collector if collector null Sync Info Tree set collector get Sync Info Set I Resource resources event get Resources for int i 0 i resources length i I Resource resource resources i Sync Info infos set get Sync Infos resource I Resource DEPTH INFINITE if infos null infos length 0 num Changes infos length return num Changes  refreshedResourcesContainChanges IRefreshEvent numChanges SubscriberSyncInfoCollector getCollector SyncInfoTree getSyncInfoSet IResource getResources IResource SyncInfo getSyncInfos IResource DEPTH_INFINITE numChanges numChanges
final I Workbench Action action Wrapper new Workbench Action public void run if goto Action 0 null goto Action 0 run  IWorkbenchAction actionWrapper WorkbenchAction gotoAction gotoAction
public boolean is Enabled if goto Action 0 null return goto Action 0 is Enabled return true  isEnabled gotoAction gotoAction isEnabled
public String get Tool Tip Text if goto Action 0 null return goto Action 0 get Tool Tip Text return super get Tool Tip Text  getToolTipText gotoAction gotoAction getToolTipText getToolTipText
public void dispose super dispose if goto Action 0 null goto Action 0 dispose  gotoAction gotoAction
I Refresh Subscriber Listener auto Listener new I Refresh Subscriber Listener public void refresh Started I Refresh Event event if listener null listener refresh Started event  IRefreshSubscriberListener autoListener IRefreshSubscriberListener refreshStarted IRefreshEvent refreshStarted
final I Action r new I Action runnable Job update new UI Job NON NLS 1 public I Status run InUI Thread I Progress Monitor monitor r 0 run return Status OK STATUS  IAction IAction UIJob IStatus runInUIThread IProgressMonitor OK_STATUS
runnable add Property Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals I Action ENABLED Boolean bool Boolean event get New Value action Wrapper set Enabled bool boolean Value  addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty IAction getNewValue actionWrapper setEnabled booleanValue
public Action Factory I Workbench Action refresh Done I Refresh Event event if listener null boolean is Modal is Job Modal Action Factory I Workbench Action runnable listener refresh Done event if runnable null If the job is being run modally then simply prompt the user immediatly if is Modal if runnable null final I Action r new I Action runnable Job update new UI Job NON NLS 1 public I Status run InUI Thread I Progress Monitor monitor r 0 run return Status OK STATUS update set System true update schedule If the job is being run in the background don t interrupt the user and simply update the goto action to perform the results else goto Action 0 runnable action Wrapper set Enabled runnable is Enabled action Wrapper set Tool Tip Text runnable get Tool Tip Text runnable add Property Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals I Action ENABLED Boolean bool Boolean event get New Value action Wrapper set Enabled bool boolean Value Refresh Subscriber Job remove Refresh Listener this return null  ActionFactory IWorkbenchAction refreshDone IRefreshEvent isModal isJobModal ActionFactory IWorkbenchAction refreshDone isModal IAction IAction UIJob IStatus runInUIThread IProgressMonitor OK_STATUS setSystem gotoAction actionWrapper setEnabled isEnabled actionWrapper setToolTipText getToolTipText addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty IAction getNewValue actionWrapper setEnabled booleanValue RefreshSubscriberJob removeRefreshListener
private void initialize final I Refresh Subscriber Listener listener final I Workbench Action goto Action new I Workbench Action null final I Workbench Action action Wrapper new Workbench Action public void run if goto Action 0 null goto Action 0 run public boolean is Enabled if goto Action 0 null return goto Action 0 is Enabled return true public String get Tool Tip Text if goto Action 0 null return goto Action 0 get Tool Tip Text return super get Tool Tip Text public void dispose super dispose if goto Action 0 null goto Action 0 dispose I Progress Monitor group Platform get Job Manager create Progress Group group begin Task task Name 100 set Progress Group group 80 get Collector set Progress Group group 20 set Property I Progress Constants ICON PROPERTY participant get Image Descriptor set Property I Progress Constants ACTION PROPERTY action Wrapper set Property I Progress Constants KEEPONE PROPERTY Boolean value Of is Job Modal Listener delagate I Refresh Subscriber Listener auto Listener new I Refresh Subscriber Listener public void refresh Started I Refresh Event event if listener null listener refresh Started event public Action Factory I Workbench Action refresh Done I Refresh Event event if listener null boolean is Modal is Job Modal Action Factory I Workbench Action runnable listener refresh Done event if runnable null If the job is being run modally then simply prompt the user immediatly if is Modal if runnable null final I Action r new I Action runnable Job update new UI Job NON NLS 1 public I Status run InUI Thread I Progress Monitor monitor r 0 run return Status OK STATUS update set System true update schedule If the job is being run in the background don t interrupt the user and simply update the goto action to perform the results else goto Action 0 runnable action Wrapper set Enabled runnable is Enabled action Wrapper set Tool Tip Text runnable get Tool Tip Text runnable add Property Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals I Action ENABLED Boolean bool Boolean event get New Value action Wrapper set Enabled bool boolean Value Refresh Subscriber Job remove Refresh Listener this return null if listener null Refresh Subscriber Job add Refresh Listener auto Listener  IRefreshSubscriberListener IWorkbenchAction gotoAction IWorkbenchAction IWorkbenchAction actionWrapper WorkbenchAction gotoAction gotoAction isEnabled gotoAction gotoAction isEnabled getToolTipText gotoAction gotoAction getToolTipText getToolTipText gotoAction gotoAction IProgressMonitor getJobManager createProgressGroup beginTask taskName setProgressGroup getCollector setProgressGroup setProperty IProgressConstants ICON_PROPERTY getImageDescriptor setProperty IProgressConstants ACTION_PROPERTY actionWrapper setProperty IProgressConstants KEEPONE_PROPERTY valueOf isJobModal IRefreshSubscriberListener autoListener IRefreshSubscriberListener refreshStarted IRefreshEvent refreshStarted ActionFactory IWorkbenchAction refreshDone IRefreshEvent isModal isJobModal ActionFactory IWorkbenchAction refreshDone isModal IAction IAction UIJob IStatus runInUIThread IProgressMonitor OK_STATUS setSystem gotoAction actionWrapper setEnabled isEnabled actionWrapper setToolTipText getToolTipText addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty IAction getNewValue actionWrapper setEnabled booleanValue RefreshSubscriberJob removeRefreshListener RefreshSubscriberJob addRefreshListener autoListener
protected I Resource get Resources return resources  IResource getResources
protected Subscriber get Subscriber return participant get Subscriber  getSubscriber getSubscriber
protected Subscriber Sync Info Collector get Collector return participant get Subscriber Sync Info Collector  SubscriberSyncInfoCollector getCollector getSubscriberSyncInfoCollector
public long get Schedule Delay return schedule Delay  getScheduleDelay scheduleDelay
protected void start if get State Job NONE if should Reschedule schedule get Schedule Delay  getState shouldReschedule getScheduleDelay
Specify the interval in seconds at which this job is scheduled param seconds delay specified in seconds public void set Refresh Interval long seconds boolean restart false if get State Job SLEEPING restart true cancel schedule Delay seconds 1000 if restart start  setRefreshInterval getState scheduleDelay
Returns the interval of this job in seconds return public long get Refresh Interval return schedule Delay 1000  getRefreshInterval scheduleDelay
public void set Restart On Cancel boolean restart On Cancel this restart On Cancel restart On Cancel  setRestartOnCancel restartOnCancel restartOnCancel restartOnCancel
public void set Reschedule boolean reschedule this reschedule reschedule  setReschedule
public boolean should Reschedule return reschedule  shouldReschedule
public static void add Refresh Listener I Refresh Subscriber Listener listener synchronized listeners if listeners contains listener listeners add listener  addRefreshListener IRefreshSubscriberListener
public static void remove Refresh Listener I Refresh Subscriber Listener listener synchronized listeners listeners remove listener  removeRefreshListener IRefreshSubscriberListener
Notification notification new Notification protected void notify I Refresh Subscriber Listener listener switch state case STARTED listener refresh Started event break case DONE listener refresh Done event break default break  IRefreshSubscriberListener refreshStarted refreshDone
protected void notify Listeners final int state final I Refresh Event event Get a snapshot of the listeners so the list doesn t change while we re firing I Refresh Subscriber Listener listener Array synchronized listeners listener Array I Refresh Subscriber Listener listeners to Array new I Refresh Subscriber Listener listeners size Notify each listener in a safe manner i e so their exceptions don t kill us for int i 0 i listener Array length i I Refresh Subscriber Listener listener listener Array i Notification notification new Notification protected void notify I Refresh Subscriber Listener listener switch state case STARTED listener refresh Started event break case DONE listener refresh Done event break default break notification run listener  notifyListeners IRefreshEvent IRefreshSubscriberListener listenerArray listenerArray IRefreshSubscriberListener toArray IRefreshSubscriberListener listenerArray IRefreshSubscriberListener listenerArray IRefreshSubscriberListener refreshStarted refreshDone
private boolean is Job Modal Boolean is Modal Boolean get Property I Progress Constants PROPERTY IN DIALOG if is Modal null return false return is Modal boolean Value  isJobModal isModal getProperty IProgressConstants PROPERTY_IN_DIALOG isModal isModal booleanValue

private Subscriber Participant participant public Refresh User Notification Policy Subscriber Participant participant this participant participant  SubscriberParticipant RefreshUserNotificationPolicy SubscriberParticipant
TeamUI Plugin get Standard Display async Exec new Runnable public void run if event get Refresh Type I Refresh Event USER REFRESH I Synchronize View view TeamUI get Synchronize Manager show Synchronize View In Active Page if view null view display participant  TeamUIPlugin getStandardDisplay asyncExec getRefreshType IRefreshEvent USER_REFRESH ISynchronizeView getSynchronizeManager showSynchronizeViewInActivePage
public void refresh Started final I Refresh Event event TeamUI Plugin get Standard Display async Exec new Runnable public void run if event get Refresh Type I Refresh Event USER REFRESH I Synchronize View view TeamUI get Synchronize Manager show Synchronize View In Active Page if view null view display participant  refreshStarted IRefreshEvent TeamUIPlugin getStandardDisplay asyncExec getRefreshType IRefreshEvent USER_REFRESH ISynchronizeView getSynchronizeManager showSynchronizeViewInActivePage
return new Workbench Action public void run boolean prompt event get Status get Code I Refresh Event STATUS NO CHANGES Sync Info infos event get Changes List selected Resources new Array List selected Resources add All Arrays as List event get Resources for int i 0 i infos length i selected Resources add infos i get Local I Resource resources I Resource selected Resources to Array new I Resource selected Resources size If it s a file simply show the compare editor if resources length 1 resources 0 get Type I Resource FILE I Resource file resources 0 Sync Info info participant get Subscriber Sync Info Collector get Sync Info Set get Sync Info file if info null Open In Compare Action open Compare Editor participant get Name info false null prompt false Prompt user if preferences are set for this type of refresh if prompt notify If Needed Modal event set Tool Tip Text get Tool Tip Text  WorkbenchAction getStatus getCode IRefreshEvent STATUS_NO_CHANGES SyncInfo getChanges selectedResources ArrayList selectedResources addAll asList getResources selectedResources getLocal IResource IResource selectedResources toArray IResource selectedResources getType IResource IResource SyncInfo getSubscriberSyncInfoCollector getSyncInfoSet getSyncInfo OpenInCompareAction openCompareEditor getName notifyIfNeededModal setToolTipText getToolTipText
public String get Tool Tip Text boolean prompt event get Status get Code I Refresh Event STATUS NO CHANGES if prompt return Policy bind Refresh Subscriber Job 2a NON NLS 1 else return Policy bind Refresh Subscriber Job 2b participant get Name NON NLS 1  getToolTipText getStatus getCode IRefreshEvent STATUS_NO_CHANGES RefreshSubscriberJob RefreshSubscriberJob getName
public Action Factory I Workbench Action refresh Done final I Refresh Event event Ensure that this event was generated for this participant if event get Subscriber participant get Subscriber Sync Info Collector get Subscriber return null If the event is for a cancelled operation there s nothing to do int severity event get Status get Severity if severity Status CANCEL severity Status ERROR return null Decide on what action to take after the refresh is completed return new Workbench Action public void run boolean prompt event get Status get Code I Refresh Event STATUS NO CHANGES Sync Info infos event get Changes List selected Resources new Array List selected Resources add All Arrays as List event get Resources for int i 0 i infos length i selected Resources add infos i get Local I Resource resources I Resource selected Resources to Array new I Resource selected Resources size If it s a file simply show the compare editor if resources length 1 resources 0 get Type I Resource FILE I Resource file resources 0 Sync Info info participant get Subscriber Sync Info Collector get Sync Info Set get Sync Info file if info null Open In Compare Action open Compare Editor participant get Name info false null prompt false Prompt user if preferences are set for this type of refresh if prompt notify If Needed Modal event set Tool Tip Text get Tool Tip Text public String get Tool Tip Text boolean prompt event get Status get Code I Refresh Event STATUS NO CHANGES if prompt return Policy bind Refresh Subscriber Job 2a NON NLS 1 else return Policy bind Refresh Subscriber Job 2b participant get Name NON NLS 1  ActionFactory IWorkbenchAction refreshDone IRefreshEvent getSubscriber getSubscriberSyncInfoCollector getSubscriber getStatus getSeverity WorkbenchAction getStatus getCode IRefreshEvent STATUS_NO_CHANGES SyncInfo getChanges selectedResources ArrayList selectedResources addAll asList getResources selectedResources getLocal IResource IResource selectedResources toArray IResource selectedResources getType IResource IResource SyncInfo getSubscriberSyncInfoCollector getSyncInfoSet getSyncInfo OpenInCompareAction openCompareEditor getName notifyIfNeededModal setToolTipText getToolTipText getToolTipText getStatus getCode IRefreshEvent STATUS_NO_CHANGES RefreshSubscriberJob RefreshSubscriberJob getName
TeamUI Plugin get Standard Display async Exec new Runnable public void run String title event get Refresh Type I Refresh Event SCHEDULED REFRESH Policy bind Refresh Complete Dialog 4a Utils get Type Name participant NON NLS 1 Policy bind Refresh Complete Dialog 4 Utils get Type Name participant NON NLS 1 Message Dialog open Information Utils get Shell null title event get Status get Message  TeamUIPlugin getStandardDisplay asyncExec getRefreshType IRefreshEvent SCHEDULED_REFRESH RefreshCompleteDialog getTypeName RefreshCompleteDialog getTypeName MessageDialog openInformation getShell getStatus getMessage
private void notify If Needed Modal final I Refresh Event event TeamUI Plugin get Standard Display async Exec new Runnable public void run String title event get Refresh Type I Refresh Event SCHEDULED REFRESH Policy bind Refresh Complete Dialog 4a Utils get Type Name participant NON NLS 1 Policy bind Refresh Complete Dialog 4 Utils get Type Name participant NON NLS 1 Message Dialog open Information Utils get Shell null title event get Status get Message  notifyIfNeededModal IRefreshEvent TeamUIPlugin getStandardDisplay asyncExec getRefreshType IRefreshEvent SCHEDULED_REFRESH RefreshCompleteDialog getTypeName RefreshCompleteDialog getTypeName MessageDialog openInformation getShell getStatus getMessage

public Refresh User Notification Policy In Modal Dialog Shell shell String title I Synchronize Page Configuration configuration Subscriber Participant participant this title title this configuration configuration this participant participant this shell shell  RefreshUserNotificationPolicyInModalDialog ISynchronizePageConfiguration SubscriberParticipant
public void refresh Started I Refresh Event event  refreshStarted IRefreshEvent
return new Workbench Action public void run If there are no changes if event get Status get Code I Refresh Event STATUS NO CHANGES Message Dialog open Information shell Policy bind Open Compared Dialog no Change Title Policy bind Open Compared Dialog no Changes Message NON NLS 1 NON NLS 2 return compare And Open Dialog event participant set Enabled false  WorkbenchAction getStatus getCode IRefreshEvent STATUS_NO_CHANGES MessageDialog openInformation OpenComparedDialog noChangeTitle OpenComparedDialog noChangesMessage compareAndOpenDialog setEnabled
public void dispose if TeamUI get Synchronize Manager get participant get Id participant get Secondary Id null participant dispose  getSynchronizeManager getId getSecondaryId
public Action Factory I Workbench Action refresh Done final I Refresh Event event Ensure that this event was generated for this participant if event get Subscriber participant get Subscriber return null If the event is for a cancelled operation there s nothing to do int severity event get Status get Severity if severity Status CANCEL severity Status ERROR return null return new Workbench Action public void run If there are no changes if event get Status get Code I Refresh Event STATUS NO CHANGES Message Dialog open Information shell Policy bind Open Compared Dialog no Change Title Policy bind Open Compared Dialog no Changes Message NON NLS 1 NON NLS 2 return compare And Open Dialog event participant set Enabled false public void dispose if TeamUI get Synchronize Manager get participant get Id participant get Secondary Id null participant dispose  ActionFactory IWorkbenchAction refreshDone IRefreshEvent getSubscriber getSubscriber getStatus getSeverity WorkbenchAction getStatus getCode IRefreshEvent STATUS_NO_CHANGES MessageDialog openInformation OpenComparedDialog noChangeTitle OpenComparedDialog noChangesMessage compareAndOpenDialog setEnabled getSynchronizeManager getId getSecondaryId
protected boolean is Single File Compare I Resource resources return resources length 1 resources 0 get Type I Resource FILE  isSingleFileCompare IResource getType IResource
Compare Configuration cc new Compare Configuration Participant Page Saveable Part input new Participant Page Saveable Part Utils get Shell null cc configuration participant public String get Title return Refresh User Notification Policy In Modal Dialog this title  CompareConfiguration CompareConfiguration ParticipantPageSaveablePart ParticipantPageSaveablePart getShell getTitle RefreshUserNotificationPolicyInModalDialog
protected void compare And Open Dialog final I Refresh Event event final Subscriber Participant participant Compare Configuration cc new Compare Configuration Participant Page Saveable Part input new Participant Page Saveable Part Utils get Shell null cc configuration participant public String get Title return Refresh User Notification Policy In Modal Dialog this title Participant Page Dialog dialog new Participant Page Dialog shell input participant dialog set Block On Open true dialog open  compareAndOpenDialog IRefreshEvent SubscriberParticipant CompareConfiguration CompareConfiguration ParticipantPageSaveablePart ParticipantPageSaveablePart getShell getTitle RefreshUserNotificationPolicyInModalDialog ParticipantPageDialog ParticipantPageDialog setBlockOnOpen

Creates a new content buffer for the given team node public Remote Resource Typed Element I Resource Variant remote Assert is Not Null remote this remote remote  RemoteResourceTypedElement IResourceVariant isNotNull
public Image get Image return CompareUI get Image get Type  getImage getImage getType
public String get Name return remote get Name  getName getName
public String get Content Identifier return remote get Content Identifier  getContentIdentifier getContentIdentifier
public String get Type if remote is Container return I Typed Element FOLDER TYPE String name get Name if name null int index name last Index Of if index 1 return NON NLS 1 if index name length 1 return NON NLS 1 return name substring index 1 return I Typed Element FOLDER TYPE  getType isContainer ITypedElement FOLDER_TYPE getName lastIndexOf ITypedElement FOLDER_TYPE
Returns true if this object can be modified If it returns code false code the other methods must not be called return code true code if this object can be modified public boolean is Editable return false  isEditable
This is not the definitive API This method is called on a parent to add a child remove a child copy the contents of a child What to do is encoded in the two arguments as follows add child nullother null remove child nullother null copy child nullother null public I Typed Element replace I Typed Element child I Typed Element other return null  ITypedElement ITypedElement ITypedElement
protected Input Stream create Stream throws Core Exception if buffered Contents null cache Contents new Null Progress Monitor if buffered Contents null return buffered Contents get Contents return null  InputStream createStream CoreException bufferedContents cacheContents NullProgressMonitor bufferedContents bufferedContents getContents
public I Resource Variant get Remote return remote  IResourceVariant getRemote
Cache the contents for the remote resource in a local buffer param monitor public void cache Contents I Progress Monitor monitor throws Team Exception buffered Contents remote get Storage monitor  cacheContents IProgressMonitor TeamException bufferedContents getStorage
Update the remote handle in this typed element param variant the new remote handle public void update I Resource Variant variant Assert is Not Null variant discard Buffer remote variant fire Content Changed  IResourceVariant isNotNull discardBuffer fireContentChanged
public String get Charset throws Core Exception if buffered Contents null cache Contents new Null Progress Monitor if buffered Contents instanceof I Encoded Storage return I Encoded Storage buffered Contents get Charset return null  getCharset CoreException bufferedContents cacheContents NullProgressMonitor bufferedContents IEncodedStorage IEncodedStorage bufferedContents getCharset

No arg contructor used to create workspace scope and for creation of persisted participant after startup public Scopable Subscriber Participant  ScopableSubscriberParticipant
public Scopable Subscriber Participant I Synchronize Scope scope super scope  ScopableSubscriberParticipant ISynchronizeScope
protected void set Subscriber Subscriber subscriber super set Subscriber subscriber try I Synchronize Participant Descriptor descriptor get Descriptor set Initialization Data descriptor catch Core Exception e TeamUI Plugin log e if get Secondary Id null set Secondary Id Long to String System current Time Millis  setSubscriber setSubscriber ISynchronizeParticipantDescriptor getDescriptor setInitializationData CoreException TeamUIPlugin getSecondaryId setSecondaryId toString currentTimeMillis
Return the descriptor for this participant return the descriptor for this participant 

private I Property Change Listener property Listener new I Property Change Listener public void property Change Property Change Event event Change to showing of sync state in text labels preference if event get Property equals I Preference Ids SYNCVIEW VIEW SYNCINFO IN LABEL if viewer null viewer get Control is Disposed viewer refresh true update labels  IPropertyChangeListener propertyListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty IPreferenceIds SYNCVIEW_VIEW_SYNCINFO_IN_LABEL getControl isDisposed
Create an advisor that will allow viewer contributions with the given code targetID code This advisor will provide a presentation model based on the given sync info set The model is disposed when the viewer is disposed param targetID the targetID defined in the viewer contributions in a plugin xml file param site the workbench site with which to register the menu Id Can be code null code in which case a site will be found using the default workbench page param set the set of code Sync Info code objects that are to be shown to the user public Structured Viewer Advisor I Synchronize Page Configuration configuration this configuration configuration configuration set Property Synchronize Page Configuration P ADVISOR this Allow the configuration to provide it s own model manager but if one isn t initialized then simply use the default provided by the advisor model Manager Synchronize Model Manager configuration get Property Synchronize Page Configuration P MODEL MANAGER if model Manager null model Manager create Model Manager configuration Assert is Not Null model Manager model manager must be set NON NLS 1 model Manager set Viewer Advisor this  menuId SyncInfo StructuredViewerAdvisor ISynchronizePageConfiguration setProperty SynchronizePageConfiguration P_ADVISOR modelManager SynchronizeModelManager getProperty SynchronizePageConfiguration P_MODEL_MANAGER modelManager modelManager createModelManager isNotNull modelManager modelManager setViewerAdvisor
Create the model manager to be used by this advisor param configuration 
Install a viewer to be configured with this advisor An advisor can only be installed with one viewer at a time When this method completes the viewer is considered initialized and can be shown to the user param viewer the viewer being installed public final void initialize Viewer final Structured Viewer viewer Assert is True this viewer null Can only be initialized once NON NLS 1 Assert is True validate Viewer viewer this viewer viewer initialize Listeners viewer viewer set Label Provider get Label Provider viewer set Content Provider get Content Provider hook Context Menu viewer  initializeViewer StructuredViewer isTrue isTrue validateViewer initializeListeners setLabelProvider getLabelProvider setContentProvider getContentProvider hookContextMenu
if nav null nav new I Navigatable public boolean goto Difference boolean next return Structured Viewer Advisor this navigate next  INavigatable gotoDifference StructuredViewerAdvisor
public Object get Adapter Class adapter if adapter I Navigatable class if nav null nav new I Navigatable public boolean goto Difference boolean next return Structured Viewer Advisor this navigate next return nav return null  getAdapter INavigatable INavigatable gotoDifference StructuredViewerAdvisor
private void initialize Status Line status Line new Status Line Contribution Group configuration get Site get Shell configuration  initializeStatusLine statusLine StatusLineContributionGroup getSite getShell
Must be called when an advisor is no longer needed public void dispose if status Line null status Line dispose if get Action Group null get Action Group dispose TeamUI Plugin get Plugin get Preference Store remove Property Change Listener property Listener  statusLine statusLine getActionGroup getActionGroup TeamUIPlugin getPlugin getPreferenceStore removePropertyChangeListener propertyListener
Subclasses must implement to allow navigation of their viewers param next if code true code then navigate forwards otherwise navigate backwards return code true code if the end is reached and code false code otherwise 
Sets a new selection for this viewer and optionally makes it visible This is required because the model provider controls the actual model elements in the viewer and must be consulted in order to understand what objects can be selected in the viewer param object the objects to select param reveal code true code if the selection is to be made visible and code false code otherwise public void set Selection I Selection selection boolean reveal if selection is Empty viewer set Selection selection reveal  setSelection ISelection isEmpty setSelection
protected void initialize Listeners final Structured Viewer viewer viewer get Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e Structured Viewer Advisor this dispose  initializeListeners StructuredViewer getControl addDisposeListener DisposeListener widgetDisposed DisposeEvent StructuredViewerAdvisor
viewer add Open Listener new I Open Listener public void open Open Event event handle Open  addOpenListener IOpenListener OpenEvent handleOpen
viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Double Click viewer event  addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleDoubleClick
viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Update the action bars enablement for any contributed action groups update Action Bars I Structured Selection viewer get Selection  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateActionBars IStructuredSelection getSelection
Method invoked from code initialize Viewer Composite Structured Viewer code in order to initialize any listeners for the viewer param viewer the viewer being initialize protected void initialize Listeners final Structured Viewer viewer viewer get Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e Structured Viewer Advisor this dispose viewer add Open Listener new I Open Listener public void open Open Event event handle Open viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Double Click viewer event viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Update the action bars enablement for any contributed action groups update Action Bars I Structured Selection viewer get Selection TeamUI Plugin get Plugin get Preference Store add Property Change Listener property Listener  initializeViewer StructuredViewer initializeListeners StructuredViewer getControl addDisposeListener DisposeListener widgetDisposed DisposeEvent StructuredViewerAdvisor addOpenListener IOpenListener OpenEvent handleOpen addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleDoubleClick addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateActionBars IStructuredSelection getSelection TeamUIPlugin getPlugin getPreferenceStore addPropertyChangeListener propertyListener
protected boolean handle Double Click Structured Viewer viewer Double Click Event event I Structured Selection selection I Structured Selection event get Selection Diff Node node Diff Node selection get First Element if node null node instanceof Sync Info Model Element Sync Info Model Element sync Node Sync Info Model Element node I Resource resource sync Node get Resource if sync Node null resource null resource get Type I Resource FILE handle Open return true return false  handleDoubleClick StructuredViewer DoubleClickEvent IStructuredSelection IStructuredSelection getSelection DiffNode DiffNode getFirstElement SyncInfoModelElement SyncInfoModelElement syncNode SyncInfoModelElement IResource syncNode getResource syncNode getType IResource handleOpen
private void handle Open Object o get Configuration get Property Synchronize Page Configuration P OPEN ACTION if o instanceof I Action I Action action I Action o action run  handleOpen getConfiguration getProperty SynchronizePageConfiguration P_OPEN_ACTION IAction IAction IAction
Subclasses can validate that the viewer being initialized with this advisor is of the correct type param viewer the viewer to validate return code true code if the viewer is valid code false code otherwise 
Returns the content provider for the viewer return the content provider for the viewer protected I Structured Content Provider get Content Provider return new Base Workbench Content Provider  IStructuredContentProvider getContentProvider BaseWorkbenchContentProvider
Get the label provider that will be assigned to the viewer initialized by this configuration Subclass may override but should either wrap the default one provided by this method or subclass code Team Subscriber Participant Label Provider code In the later case the logical label provider should still be assigned to the subclass of code Team Subscriber Participant Label Provider code param logical Provider the label provider for the selected logical view return a label provider see Synchronize Model Element Label Provider protected I Label Provider get Label Provider I Label Provider provider new Synchronize Model Element Label Provider I Label Decorator decorators I Label Decorator get Configuration get Property I Synchronize Page Configuration P LABEL DECORATORS if decorators null return provider return new Decorating Color Label Provider provider decorators  TeamSubscriberParticipantLabelProvider TeamSubscriberParticipantLabelProvider logicalProvider SynchronizeModelElementLabelProvider ILabelProvider getLabelProvider ILabelProvider SynchronizeModelElementLabelProvider ILabelDecorator ILabelDecorator getConfiguration getProperty ISynchronizePageConfiguration P_LABEL_DECORATORS DecoratingColorLabelProvider
Returns the viewer configured by this advisor return the viewer configured by this advisor public final Structured Viewer get Viewer return viewer  StructuredViewer getViewer
get Action Group model Changed model Root model Root add Compare Input Change Listener new I Compare Input Change Listener public void compare Input Changed I Compare Input source get Action Group model Changed model Root  getActionGroup modelChanged modelRoot modelRoot addCompareInputChangeListener ICompareInputChangeListener compareInputChanged ICompareInput getActionGroup modelChanged modelRoot
Called to set the input to a viewer The input to a viewer is always the model created by the model provider param viewer the viewer to set the input public final void set Input I Synchronize Model Provider model Provider final I Synchronize Model Element model Root model Provider get Model Root get Action Group model Changed model Root model Root add Compare Input Change Listener new I Compare Input Change Listener public void compare Input Changed I Compare Input source get Action Group model Changed model Root if viewer null model Provider set Viewer viewer viewer set Sorter model Provider get Viewer Sorter viewer set Input model Root  setInput ISynchronizeModelProvider modelProvider ISynchronizeModelElement modelRoot modelProvider getModelRoot getActionGroup modelChanged modelRoot modelRoot addCompareInputChangeListener ICompareInputChangeListener compareInputChanged ICompareInput getActionGroup modelChanged modelRoot modelProvider setViewer setSorter modelProvider getViewerSorter setInput modelRoot
return Returns the configuration public I Synchronize Page Configuration get Configuration return configuration  ISynchronizePageConfiguration getConfiguration
Method invoked from the synchronize page when the action bars are set The advisor uses the configuration to determine which groups appear in the action bar menus and allows all action groups registered with the configuration to fill the action bars param action Bars the Action bars for the page public final void set Action Bars I Action Bars action Bars if action Bars null I Tool Bar Manager manager action Bars get Tool Bar Manager Populate the toobar menu with the configured groups Object o configuration get Property I Synchronize Page Configuration P TOOLBAR MENU if o instanceof String o I Synchronize Page Configuration DEFAULT TOOLBAR MENU String groups String o for int i 0 i groups length i String group groups i The group Ids must be converted to be unique since the toolbar is shared manager add new Separator get Group Id group view menu I Menu Manager menu action Bars get Menu Manager if menu null Populate the view dropdown menu with the configured groups o configuration get Property I Synchronize Page Configuration P VIEW MENU if o instanceof String o I Synchronize Page Configuration DEFAULT VIEW MENU groups String o initialize Status Line for int i 0 i groups length i String group groups i The group Ids must be converted to be unique since the view menu is shared menu add new Separator get Group Id group status line I Status Line Manager status Line Mgr action Bars get Status Line Manager if status Line Mgr null status Line null status Line fill Action Bars action Bars get Action Group fill Action Bars action Bars update Action Bars I Structured Selection get Viewer get Selection Object input viewer get Input if input instanceof I Synchronize Model Element get Action Group model Changed I Synchronize Model Element input  actionBars setActionBars IActionBars actionBars actionBars IToolBarManager actionBars getToolBarManager getProperty ISynchronizePageConfiguration P_TOOLBAR_MENU ISynchronizePageConfiguration DEFAULT_TOOLBAR_MENU groupIds getGroupId IMenuManager actionBars getMenuManager getProperty ISynchronizePageConfiguration P_VIEW_MENU ISynchronizePageConfiguration DEFAULT_VIEW_MENU initializeStatusLine groupIds getGroupId IStatusLineManager statusLineMgr actionBars getStatusLineManager statusLineMgr statusLine statusLine fillActionBars actionBars getActionGroup fillActionBars actionBars updateActionBars IStructuredSelection getViewer getSelection getInput ISynchronizeModelElement getActionGroup modelChanged ISynchronizeModelElement
menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager fill Context Menu viewer manager  menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu
menu add Menu Listener new Menu Listener public void menu Hidden Menu Event e  addMenuListener MenuListener menuHidden MenuEvent
TODO Is this hack still needed public void menu Shown Menu Event e I Contribution Item items menu Mgr get Items for int i 0 i items length i I Contribution Item item items i if item instanceof Action Contribution Item I Action action Item Action Contribution Item item get Action if action Item instanceof Synchronize Model Action Synchronize Model Action action Item selection Changed viewer get Selection  menuShown MenuEvent IContributionItem menuMgr getItems IContributionItem ActionContributionItem IAction actionItem ActionContributionItem getAction actionItem SynchronizeModelAction SynchronizeModelAction actionItem selectionChanged getSelection
private void hook Context Menu final Structured Viewer viewer final Menu Manager menu Mgr new Menu Manager null NON NLS 1 menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager fill Context Menu viewer manager Menu menu menu Mgr create Context Menu viewer get Control menu add Menu Listener new Menu Listener public void menu Hidden Menu Event e Hack to allow action contributions to update their state before the menu is shown This is required when the state of the selection changes and the contributions need to update enablement based on this TODO Is this hack still needed public void menu Shown Menu Event e I Contribution Item items menu Mgr get Items for int i 0 i items length i I Contribution Item item items i if item instanceof Action Contribution Item I Action action Item Action Contribution Item item get Action if action Item instanceof Synchronize Model Action Synchronize Model Action action Item selection Changed viewer get Selection viewer get Control set Menu menu  hookContextMenu StructuredViewer MenuManager menuMgr MenuManager menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu menuMgr createContextMenu getControl addMenuListener MenuListener menuHidden MenuEvent menuShown MenuEvent IContributionItem menuMgr getItems IContributionItem ActionContributionItem IAction actionItem ActionContributionItem getAction actionItem SynchronizeModelAction SynchronizeModelAction actionItem selectionChanged getSelection getControl setMenu
private void fill Context Menu Structured Viewer viewer final I Menu Manager manager Populate the menu with the configured groups Object o configuration get Property I Synchronize Page Configuration P CONTEXT MENU if o instanceof String o I Synchronize Page Configuration DEFAULT CONTEXT MENU String groups String o for int i 0 i groups length i String group groups i There is no need to adjust the group ids in a contetx menu see set Action Bars manager add new Separator group get Action Group set Context new Action Context viewer get Selection get Action Group fill Context Menu manager  fillContextMenu StructuredViewer IMenuManager getProperty ISynchronizePageConfiguration P_CONTEXT_MENU ISynchronizePageConfiguration DEFAULT_CONTEXT_MENU setActionBars getActionGroup setContext ActionContext getSelection getActionGroup fillContextMenu
private void update Action Bars I Structured Selection selection Action Group group get Action Group if group null group set Context new Action Context selection group update Action Bars  updateActionBars IStructuredSelection ActionGroup getActionGroup setContext ActionContext updateActionBars
private Synchronize Page Action Group get Action Group return Synchronize Page Action Group configuration  SynchronizePageActionGroup getActionGroup SynchronizePageActionGroup
private String get Group Id String group return Synchronize Page Configuration configuration get Group Id group  getGroupId SynchronizePageConfiguration getGroupId
return Returns the model Manager public Synchronize Model Manager get Model Manager return model Manager  modelManager SynchronizeModelManager getModelManager modelManager

Constructs a new Synchronize View public Subscriber Participant Page I Synchronize Page Configuration configuration Subscriber Sync Info Collector subscriber Collector super configuration this participant Subscriber Participant configuration get Participant configuration set Comparison Type is Three Way I Synchronize Page Configuration THREE WAY I Synchronize Page Configuration TWO WAY configuration add Action Contribution new Subscriber Action Contribution initialize Collector configuration subscriber Collector  SynchronizeView SubscriberParticipantPage ISynchronizePageConfiguration SubscriberSyncInfoCollector subscriberCollector SubscriberParticipant getParticipant setComparisonType isThreeWay ISynchronizePageConfiguration THREE_WAY ISynchronizePageConfiguration TWO_WAY addActionContribution SubscriberActionContribution initializeCollector subscriberCollector
return Returns the participant public Subscriber Participant get Participant return participant  SubscriberParticipant getParticipant
protected void update Mode int mode if collector null is Three Way int mode Filter BOTH MODE FILTER switch mode case I Synchronize Page Configuration INCOMING MODE mode Filter INCOMING MODE FILTER break case I Synchronize Page Configuration OUTGOING MODE mode Filter OUTGOING MODE FILTER break case I Synchronize Page Configuration BOTH MODE mode Filter BOTH MODE FILTER break case I Synchronize Page Configuration CONFLICTING MODE mode Filter CONFLICTING MODE FILTER break collector set Filter new Fast Sync Info Filter And Sync Info Filter new Fast Sync Info Filter new Fast Sync Info Filter Sync Info Direction Filter mode Filter  updateMode isThreeWay modeFilter BOTH_MODE_FILTER ISynchronizePageConfiguration INCOMING_MODE modeFilter INCOMING_MODE_FILTER ISynchronizePageConfiguration OUTGOING_MODE modeFilter OUTGOING_MODE_FILTER ISynchronizePageConfiguration BOTH_MODE modeFilter BOTH_MODE_FILTER ISynchronizePageConfiguration CONFLICTING_MODE modeFilter CONFLICTING_MODE_FILTER setFilter FastSyncInfoFilter AndSyncInfoFilter FastSyncInfoFilter FastSyncInfoFilter SyncInfoDirectionFilter modeFilter
private void initialize Collector I Synchronize Page Configuration configuration Subscriber Sync Info Collector subscriber Collector Subscriber Participant participant get Participant collector new Working Set Filtered Sync Info Collector subscriber Collector participant get Subscriber roots update Mode configuration get Mode collector reset configuration set Property I Synchronize Page Configuration P SYNC INFO SET collector get Sync Info Tree configuration set Property Synchronize Page Configuration P WORKING SET SYNC INFO SET collector get Working Set Sync Info Set  initializeCollector ISynchronizePageConfiguration SubscriberSyncInfoCollector subscriberCollector SubscriberParticipant getParticipant WorkingSetFilteredSyncInfoCollector subscriberCollector getSubscriber updateMode getMode setProperty ISynchronizePageConfiguration P_SYNC_INFO_SET getSyncInfoTree setProperty SynchronizePageConfiguration P_WORKING_SET_SYNC_INFO_SET getWorkingSetSyncInfoSet
see org eclipse team ui synchronize Sync Info Set Synchronize Page is Three Way protected boolean is Three Way return get Participant get Subscriber get Resource Comparator is Three Way  SyncInfoSetSynchronizePage isThreeWay isThreeWay getParticipant getSubscriber getResourceComparator isThreeWay
see org eclipse team internal ui synchronize Sync Info Set Synchronize Page reset public void reset get Participant reset  SyncInfoSetSynchronizePage getParticipant
return Returns the collector public Working Set Filtered Sync Info Collector get Collector return collector  WorkingSetFilteredSyncInfoCollector getCollector

private I Wizard import Wizard public Subscriber Participant Wizard set Default Page Image Descriptor Team Images get Image Descriptor I TeamUI Images IMG WIZBAN SHARE set Needs Progress Monitor false  IWizard importWizard SubscriberParticipantWizard setDefaultPageImageDescriptor TeamImages getImageDescriptor ITeamUIImages IMG_WIZBAN_SHARE setNeedsProgressMonitor
see org eclipse jface wizard Wizard get Window Title public String get Window Title return Policy bind Global Refresh Subscriber Page 0 NON NLS 1  getWindowTitle getWindowTitle GlobalRefreshSubscriberPage
public void add Pages if get Root Resources length 0 import Wizard get Import Wizard import Wizard set Container get Container import Wizard add Pages I Wizard Page starting Page import Wizard get Starting Page if starting Page null starting Page set Title Policy bind Subscriber Participant Wizard 0 get Name NON NLS 1 starting Page set Description Policy bind Subscriber Participant Wizard 1 import Wizard get Window Title NON NLS 1 else selection Page new Global Refresh Resource Selection Page get Root Resources selection Page set Title Policy bind Global Refresh Subscriber Page 1 get Name NON NLS 1 selection Page set Message Policy bind Global Refresh Subscriber Page 2 NON NLS 1 add Page selection Page  addPages getRootResources importWizard getImportWizard importWizard setContainer getContainer importWizard addPages IWizardPage startingPage importWizard getStartingPage startingPage startingPage setTitle SubscriberParticipantWizard getName startingPage setDescription SubscriberParticipantWizard importWizard getWindowTitle selectionPage GlobalRefreshResourceSelectionPage getRootResources selectionPage setTitle GlobalRefreshSubscriberPage getName selectionPage setMessage GlobalRefreshSubscriberPage addPage selectionPage
public boolean perform Finish if import Wizard null return import Wizard perform Finish else I Resource resources selection Page get Root Resources if resources null resources length 0 Subscriber Participant participant create Participant selection Page get Synchronize Scope TeamUI get Synchronize Manager add Synchronize Participants new I Synchronize Participant participant We don t know in which site to show progress because a participant could actually be shown in multiple sites participant run null no site return true  performFinish importWizard importWizard performFinish IResource selectionPage getRootResources SubscriberParticipant createParticipant selectionPage getSynchronizeScope getSynchronizeManager addSynchronizeParticipants ISynchronizeParticipant
public I Wizard Page get Next Page I Wizard Page page if import Wizard null return import Wizard get Next Page page return super get Next Page page  IWizardPage getNextPage IWizardPage importWizard importWizard getNextPage getNextPage
public boolean perform Cancel if import Wizard null return import Wizard perform Cancel return super perform Cancel  performCancel importWizard importWizard performCancel performCancel
public boolean can Finish if import Wizard null return import Wizard can Finish return super can Finish  canFinish importWizard importWizard canFinish canFinish
public I Wizard Page get Starting Page if import Wizard null return import Wizard get Starting Page return super get Starting Page  IWizardPage getStartingPage importWizard importWizard getStartingPage getStartingPage
protected abstract I Resource get Root Resources  IResource getRootResources
protected abstract I Resource get Root Resources protected abstract Subscriber Participant create Participant I Synchronize Scope scope  IResource getRootResources SubscriberParticipant createParticipant ISynchronizeScope
protected abstract Subscriber Participant create Participant I Synchronize Scope scope protected abstract String get Name  SubscriberParticipant createParticipant ISynchronizeScope getName
protected abstract String get Name protected abstract I Wizard get Import Wizard  getName IWizard getImportWizard

private I Refresh Subscriber Listener refresh Subscriber Listener new I Refresh Subscriber Listener public void refresh Started I Refresh Event event  IRefreshSubscriberListener refreshSubscriberListener IRefreshSubscriberListener refreshStarted IRefreshEvent
public Action Factory I Workbench Action refresh Done final I Refresh Event event if event get Subscriber participant get Subscriber last Refresh Event event if enabled event get Refresh Type I Refresh Event SCHEDULED REFRESH Refresh User Notification Policy policy new Refresh User Notification Policy participant policy refresh Done event return null  ActionFactory IWorkbenchAction refreshDone IRefreshEvent getSubscriber getSubscriber lastRefreshEvent getRefreshType IRefreshEvent SCHEDULED_REFRESH RefreshUserNotificationPolicy RefreshUserNotificationPolicy refreshDone
public Subscriber Refresh Schedule Subscriber Participant participant this participant participant Refresh Subscriber Job add Refresh Listener refresh Subscriber Listener  SubscriberRefreshSchedule SubscriberParticipant RefreshSubscriberJob addRefreshListener refreshSubscriberListener
return Returns the enabled public boolean is Enabled return enabled  isEnabled
param enabled The enabled to set public void set Enabled boolean enabled boolean allowed To Start boolean was Enabled is Enabled this enabled enabled if enabled was Enabled if allowed To Start start Job else stop Job  setEnabled allowedToStart wasEnabled isEnabled wasEnabled allowedToStart startJob stopJob
return Returns the refresh Interval in seconds public long get Refresh Interval return refresh Interval  refreshInterval getRefreshInterval refreshInterval
public Subscriber Participant get Participant return participant  SubscriberParticipant getParticipant
param refresh Interval The refresh Interval to set public void set Refresh Interval long refresh Interval if refresh Interval get Refresh Interval stop Job this refresh Interval refresh Interval if is Enabled start Job  refreshInterval refreshInterval setRefreshInterval refreshInterval refreshInterval getRefreshInterval stopJob refreshInterval refreshInterval isEnabled startJob
public void start Job Sync Info Set set participant get Subscriber Sync Info Collector get Sync Info Set if set null return if job null Subscriber Participant participant get Participant job new Refresh Subscriber Job participant Policy bind Refresh Schedule 14 Policy bind Refresh Schedule 15 participant get Name get Refresh Interval As String participant get Resources new Refresh User Notification Policy get Participant NON NLS 1 NON NLS 2 job set User false else if job get State Job NONE stop Job job set Refresh Interval get Refresh Interval job set Restart On Cancel true job set Reschedule true Schedule delay is in mills job schedule get Refresh Interval 1000  startJob SyncInfoSet getSubscriberSyncInfoCollector getSyncInfoSet SubscriberParticipant getParticipant RefreshSubscriberJob RefreshSchedule RefreshSchedule getName getRefreshIntervalAsString getResources RefreshUserNotificationPolicy getParticipant setUser getState stopJob setRefreshInterval getRefreshInterval setRestartOnCancel setReschedule getRefreshInterval
protected void stop Job if job null job set Restart On Cancel false don t restart the job job set Reschedule false job cancel job null  stopJob setRestartOnCancel setReschedule
public void dispose stop Job Refresh Subscriber Job remove Refresh Listener refresh Subscriber Listener  stopJob RefreshSubscriberJob removeRefreshListener refreshSubscriberListener
public void save State I Memento memento memento put String CTX REFRESHSCHEDULE ENABLED Boolean to String enabled memento put Integer CTX REFRESHSCHEDULE INTERVAL int refresh Interval  saveState IMemento putString CTX_REFRESHSCHEDULE_ENABLED toString putInteger CTX_REFRESHSCHEDULE_INTERVAL refreshInterval
public static Subscriber Refresh Schedule init I Memento memento Subscriber Participant participant Subscriber Refresh Schedule schedule new Subscriber Refresh Schedule participant if memento null String enabled memento get String CTX REFRESHSCHEDULE ENABLED int interval memento get Integer CTX REFRESHSCHEDULE INTERVAL int Value schedule set Refresh Interval interval schedule set Enabled true equals enabled true false false don t start job NON NLS 1 Use the defaults if a schedule hasn t been saved or can t be found return schedule  SubscriberRefreshSchedule IMemento SubscriberParticipant SubscriberRefreshSchedule SubscriberRefreshSchedule getString CTX_REFRESHSCHEDULE_ENABLED getInteger CTX_REFRESHSCHEDULE_INTERVAL intValue setRefreshInterval setEnabled
public static String refresh Event As String I Refresh Event event if event null return Policy bind Sync View Preference Page last Refresh Run Never NON NLS 1 long stop Mills event get Stop Time long start Mills event get Start Time String Buffer text new String Buffer if stop Mills 0 text append Policy bind Sync View Preference Page last Refresh Run Never NON NLS 1 else Date last Time Run new Date stop Mills text append Date Format get Date Time Instance Date Format SHORT Date Format SHORT format last Time Run Sync Info changes event get Changes if changes length 0 text append Policy bind Refresh Schedule 7 NON NLS 1 else if changes length 1 text append Policy bind Refresh Schedule changes Singular Integer to String changes length NON NLS 1 else text append Policy bind Refresh Schedule changes Plural Integer to String changes length NON NLS 1 return text to String  refreshEventAsString IRefreshEvent SyncViewPreferencePage lastRefreshRunNever stopMills getStopTime startMills getStartTime StringBuffer StringBuffer stopMills SyncViewPreferencePage lastRefreshRunNever lastTimeRun stopMills DateFormat getDateTimeInstance DateFormat DateFormat lastTimeRun SyncInfo getChanges RefreshSchedule RefreshSchedule changesSingular toString RefreshSchedule changesPlural toString toString
public String get Schedule As String if is Enabled return Policy bind Refresh Schedule 8 NON NLS 1 return get Refresh Interval As String  getScheduleAsString isEnabled RefreshSchedule getRefreshIntervalAsString
public I Refresh Event get Last Refresh Event return last Refresh Event  IRefreshEvent getLastRefreshEvent lastRefreshEvent
private String get Refresh Interval As String boolean hours false long seconds get Refresh Interval if seconds 60 seconds 60 long minutes seconds 60 if minutes 60 minutes minutes 60 hours true String unit if minutes 1 unit hours Policy bind Refresh Schedule 9 Policy bind Refresh Schedule 10 NON NLS 1 NON NLS 2 else unit hours Policy bind Refresh Schedule 11 Policy bind Refresh Schedule 12 NON NLS 1 NON NLS 2 return Policy bind Refresh Schedule 13 Long to String minutes unit NON NLS 1  getRefreshIntervalAsString getRefreshInterval RefreshSchedule RefreshSchedule RefreshSchedule RefreshSchedule RefreshSchedule toString

private I Synchronize Participant f Changed public void handle Exception Throwable exception TeamUI Plugin log I Status ERROR Policy bind Synchronize Manager 7 exception NON NLS 1  ISynchronizeParticipant fChanged handleException TeamUIPlugin IStatus SynchronizeManager
public void run throws Exception switch f Type case ADDED f Listener participants Added f Changed break case REMOVED f Listener participants Removed f Changed break  fType fListener participantsAdded fChanged fListener participantsRemoved fChanged
Notifies the given listener of the adds removes param participants the participants that changed param update the type of change public void notify I Synchronize Participant participants int update if f Listeners null return f Changed participants f Type update Object copied Listeners f Listeners get Listeners for int i 0 i copied Listeners length i f Listener I Synchronize Participant Listener copied Listeners i Platform run this f Changed null f Listener null  ISynchronizeParticipant fListeners fChanged fType copiedListeners fListeners getListeners copiedListeners fListener ISynchronizeParticipantListener copiedListeners fChanged fListener
public Participant Instance Synchronize Participant Descriptor descriptor String secondary Id String display Name I Memento saved State this counter new Reference Counter this secondary Id secondary Id this saved State saved State this descriptor descriptor this display Name display Name  ParticipantInstance SynchronizeParticipantDescriptor secondaryId displayName IMemento savedState ReferenceCounter secondaryId secondaryId savedState savedState displayName displayName
public void save I Memento memento if dead return String key Utils get Key descriptor get Id get Secondary Id I Synchronize Participant ref I Synchronize Participant counter get key if ref null ref save State memento else if saved State null memento put Memento saved State  IMemento getKey getId getSecondaryId ISynchronizeParticipant ISynchronizeParticipant saveState savedState putMemento savedState
public boolean equals Object other if other this return true if other instanceof I Synchronize Participant Reference return false I Synchronize Participant Reference other Ref I Synchronize Participant Reference other String other Secondary Id other Ref get Secondary Id return other Ref get Id equals get Id Utils equal Object get Secondary Id other Secondary Id  ISynchronizeParticipantReference ISynchronizeParticipantReference otherRef ISynchronizeParticipantReference otherSecondaryId otherRef getSecondaryId otherRef getId getId equalObject getSecondaryId otherSecondaryId
see org eclipse team ui synchronize I Synchronize Participant Reference get Id public String get Id return descriptor get Id  ISynchronizeParticipantReference getId getId getId
see org eclipse team ui synchronize I Synchronize Participant Reference get Secondary Id public String get Secondary Id return secondary Id  ISynchronizeParticipantReference getSecondaryId getSecondaryId secondaryId
see org eclipse team ui synchronize I Synchronize Participant Reference get Display Name public String get Display Name return display Name null display Name descriptor get Name  ISynchronizeParticipantReference getDisplayName getDisplayName displayName displayName getName
public boolean is Instantiated String key Utils get Key descriptor get Id get Secondary Id return I Synchronize Participant counter get key null  isInstantiated getKey getId getSecondaryId ISynchronizeParticipant
public I Synchronize Participant get Participant throws Team Exception if dead return null String key Utils get Key descriptor get Id get Secondary Id try I Synchronize Participant participant I Synchronize Participant counter get key if participant null participant instantiate if participant null counter put key participant return participant catch Team Exception e TeamUI Plugin log e participant References remove key throw new Team Exception Policy bind Synchronize Manager 8 e NON NLS 1  ISynchronizeParticipant getParticipant TeamException getKey getId getSecondaryId ISynchronizeParticipant ISynchronizeParticipant TeamException TeamUIPlugin participantReferences TeamException SynchronizeManager
public void set Participant I Synchronize Participant participant String key Utils get Key descriptor get Id get Secondary Id counter put key participant  setParticipant ISynchronizeParticipant getKey getId getSecondaryId
see org eclipse team ui synchronize I Synchronize Participant Reference get Descriptor public I Synchronize Participant Descriptor get Descriptor return descriptor  ISynchronizeParticipantReference getDescriptor ISynchronizeParticipantDescriptor getDescriptor
private I Synchronize Participant instantiate throws Team Exception try I Synchronize Participant participant I Synchronize Participant TeamUI Plugin create Extension descriptor get Configuration Element Synchronize Participant Descriptor ATT CLASS participant set Initialization Data descriptor get Configuration Element null null participant init get Secondary Id saved State saved State null return participant catch Part Init Exception e throw new Team Exception Policy bind Synchronize Manager 11 descriptor get Name e NON NLS 1 catch Core Exception e throw Team Exception as Team Exception e catch Exception e throw new Team Exception Policy bind Synchronize Manager 11 descriptor get Name e NON NLS 1  ISynchronizeParticipant TeamException ISynchronizeParticipant ISynchronizeParticipant TeamUIPlugin createExtension getConfigurationElement SynchronizeParticipantDescriptor ATT_CLASS setInitializationData getConfigurationElement getSecondaryId savedState savedState PartInitException TeamException SynchronizeManager getName CoreException TeamException asTeamException TeamException SynchronizeManager getName
Dispose of the reference public void dispose try I Synchronize Participant participant get Participant if participant null participant dispose catch Team Exception e Ignore since we are disposing anyway finally dead true  ISynchronizeParticipant getParticipant TeamException
public Synchronize Manager init  SynchronizeManager
public void add Synchronize Participant Listener I Synchronize Participant Listener listener if f Listeners null f Listeners new Listener List 5 f Listeners add listener  addSynchronizeParticipantListener ISynchronizeParticipantListener fListeners fListeners ListenerList fListeners
public void remove Synchronize Participant Listener I Synchronize Participant Listener listener if f Listeners null f Listeners remove listener  removeSynchronizeParticipantListener ISynchronizeParticipantListener fListeners fListeners
Creates a new participant reference with of the provided type If the seconday Id is specified it is used as the qualifier for multiple instances of the same type p The returned participant reference is a light weight handle describing the participant The plug in defining the participant is not loaded To instantiate a participant a client must call link I Synchronize Participant Reference create Participant and must call link I Synchronize Participant Reference release Participant when finished with the participant p param type the type of the participant param secondary Id a unique id for multiple instance support return a reference to a participant private Participant Instance create Participant Reference String type String secondary Id String display Name throws Part Init Exception Synchronize Participant Descriptor desc participant Registry find type ensure that the view id is valid if desc null throw new Part Init Exception Policy bind Synchronize Manager 19 type NON NLS 1 ensure that multiple instances are allowed if a secondary id is given if secondary Id null if desc is Multiple Instances throw new Part Init Exception Policy bind Synchronize Manager 20 type NON NLS 1 String key Utils get Key type secondary Id Participant Instance ref Participant Instance participant References get key if ref null ref new Participant Instance desc secondary Id display Name null return ref  secondayId ISynchronizeParticipantReference createParticipant ISynchronizeParticipantReference releaseParticipant secondaryId ParticipantInstance createParticipantReference secondaryId displayName PartInitException SynchronizeParticipantDescriptor participantRegistry PartInitException SynchronizeManager secondaryId isMultipleInstances PartInitException SynchronizeManager getKey secondaryId ParticipantInstance ParticipantInstance participantReferences ParticipantInstance secondaryId displayName
public synchronized void add Synchronize Participants I Synchronize Participant participants renamed to create Synchronize Participant id List added new Array List participants length for int i 0 i participants length i I Synchronize Participant participant participants i String key Utils get Key participant get Id participant get Secondary Id if participant References contains Key key try Participant Instance ref create Participant Reference participant get Id participant get Secondary Id participant get Name ref set Participant participant remove Matching Pinned Participant participant get Id participant References put key ref added add participant catch Part Init Exception e TeamUI Plugin log e continue if added is Empty save State fire Update I Synchronize Participant added to Array new I Synchronize Participant added size ADDED  addSynchronizeParticipants ISynchronizeParticipant createSynchronizeParticipant ArrayList ISynchronizeParticipant getKey getId getSecondaryId participantReferences containsKey ParticipantInstance createParticipantReference getId getSecondaryId getName setParticipant removeMatchingPinnedParticipant getId participantReferences PartInitException TeamUIPlugin isEmpty saveState fireUpdate ISynchronizeParticipant toArray ISynchronizeParticipant
private void remove Matching Pinned Participant String id I Synchronize Participant Reference refs get id if refs length 0 Find an un pinned participant and replace it for int i 0 i refs length i I Synchronize Participant Reference reference refs i I Synchronize Participant p try p reference get Participant if p is Pinned remove Synchronize Participants new I Synchronize Participant p break catch Team Exception e continue  removeMatchingPinnedParticipant ISynchronizeParticipantReference ISynchronizeParticipantReference ISynchronizeParticipant getParticipant isPinned removeSynchronizeParticipants ISynchronizeParticipant TeamException
public synchronized void remove Synchronize Participants I Synchronize Participant participants List removed new Array List participants length for int i 0 i participants length i I Synchronize Participant participant participants i String key Utils get Key participant get Id participant get Secondary Id if participant References contains Key key Participant Instance ref Participant Instance participant References remove key if ref is Instantiated ref dispose removed add participant if removed is Empty save State fire Update I Synchronize Participant removed to Array new I Synchronize Participant removed size REMOVED  removeSynchronizeParticipants ISynchronizeParticipant ArrayList ISynchronizeParticipant getKey getId getSecondaryId participantReferences containsKey ParticipantInstance ParticipantInstance participantReferences isInstantiated isEmpty saveState fireUpdate ISynchronizeParticipant toArray ISynchronizeParticipant
see org eclipse team ui synchronize I Synchronize Manager get java lang String public I Synchronize Participant Reference get String id String secondary Id String key Utils get Key id secondary Id return I Synchronize Participant Reference participant References get key  ISynchronizeManager ISynchronizeParticipantReference secondaryId getKey secondaryId ISynchronizeParticipantReference participantReferences
public I Synchronize Participant Reference get String id I Synchronize Participant Reference refs get Synchronize Participants Array List refs For Id new Array List for int i 0 i refs length i I Synchronize Participant Reference reference refs i if reference get Id equals id refs For Id add reference return I Synchronize Participant Reference refs For Id to Array new I Synchronize Participant Reference refs For Id size  ISynchronizeParticipantReference ISynchronizeParticipantReference getSynchronizeParticipants ArrayList refsForId ArrayList ISynchronizeParticipantReference getId refsForId ISynchronizeParticipantReference refsForId toArray ISynchronizeParticipantReference refsForId
see org eclipse team ui sync I Synchronize Manager get Synchronize Participants public synchronized I Synchronize Participant Reference get Synchronize Participants return I Synchronize Participant Reference participant References values to Array new I Synchronize Participant Reference participant References values size  ISynchronizeManager getSynchronizeParticipants ISynchronizeParticipantReference getSynchronizeParticipants ISynchronizeParticipantReference participantReferences toArray ISynchronizeParticipantReference participantReferences
public I Synchronize View show Synchronize View In Active Page I Workbench workbench TeamUI Plugin get Plugin get Workbench I Workbench Window window workbench get Active Workbench Window boolean switch Perspectives prompt For Perspective Switch I Workbench Page active Page null if switch Perspectives try String p Id TeamUI Plugin get Plugin get Preference Store get String I Preference Ids SYNCVIEW DEFAULT PERSPECTIVE active Page workbench show Perspective p Id window catch Workbench Exception e Utils handle Error window get Shell e Policy bind Synchronize View 14 e get Message NON NLS 1 try if active Page null active Page TeamUI Plugin get Active Page if active Page null return null I View Part part active Page show View I Synchronize View VIEW ID Long to String System current Time Millis I Workbench Page VIEW ACTIVATE I View Part part active Page show View I Synchronize View VIEW ID try return I Synchronize View part catch Class Cast Exception e Strange that we cannot cast the part see bug 53671 TeamUI Plugin log I Status ERROR Policy bind Synchronize Manager 18 part get Class get Name e NON NLS 1 return null catch Part Init Exception pe Utils handle Error window get Shell pe Policy bind Synchronize View 16 pe get Message NON NLS 1 return null  ISynchronizeView showSynchronizeViewInActivePage IWorkbench TeamUIPlugin getPlugin getWorkbench IWorkbenchWindow getActiveWorkbenchWindow switchPerspectives promptForPerspectiveSwitch IWorkbenchPage activePage switchPerspectives pId TeamUIPlugin getPlugin getPreferenceStore getString IPreferenceIds SYNCVIEW_DEFAULT_PERSPECTIVE activePage showPerspective pId WorkbenchException handleError getShell SynchronizeView getMessage activePage activePage TeamUIPlugin getActivePage activePage IViewPart activePage showView ISynchronizeView VIEW_ID toString currentTimeMillis IWorkbenchPage VIEW_ACTIVATE IViewPart activePage showView ISynchronizeView VIEW_ID ISynchronizeView ClassCastException TeamUIPlugin IStatus SynchronizeManager getClass getName PartInitException handleError getShell SynchronizeView getMessage
Decides what action to take when switching perspectives and showing the synchronize view Basically there are a set of user preferences that control how perspective switching private boolean prompt For Perspective Switch Decide if a prompt is even required I Preference Store store TeamUI Plugin get Plugin get Preference Store String option store get String I Preference Ids SYNCHRONIZING COMPLETE PERSPECTIVE if option equals Message Dialog With Toggle ALWAYS return true else if option equals Message Dialog With Toggle NEVER return false Otherwise determine if a prompt is required I Perspective Registry registry PlatformUI get Workbench get Perspective Registry String default Sync Perspective Id store get String I Preference Ids SYNCVIEW DEFAULT PERSPECTIVE I Perspective Descriptor perspective Descriptor registry find Perspective With Id default Sync Perspective Id I Workbench Page page TeamUI Plugin get Active Page if page null I Perspective Descriptor p page get Perspective if p null p get Id equals default Sync Perspective Id currently in default perspective return false if perspective Descriptor null String perspective Name perspective Descriptor get Label Message Dialog With Toggle m Message Dialog With Toggle open Yes No Question Utils get Shell null Policy bind Synchronize Manager 27 NON NLS 1 Policy bind Synchronize Manager 30 perspective Descriptor get Label NON NLS 1 Policy bind Synchronize Manager 31 NON NLS 1 false toggle state store I Preference Ids SYNCHRONIZING COMPLETE PERSPECTIVE int result m get Return Code switch result yes ok case I Dialog Constants YES ID case I Dialog Constants OK ID return true no case I Dialog Constants NO ID return false return false  promptForPerspectiveSwitch IPreferenceStore TeamUIPlugin getPlugin getPreferenceStore getString IPreferenceIds SYNCHRONIZING_COMPLETE_PERSPECTIVE MessageDialogWithToggle MessageDialogWithToggle IPerspectiveRegistry getWorkbench getPerspectiveRegistry defaultSyncPerspectiveId getString IPreferenceIds SYNCVIEW_DEFAULT_PERSPECTIVE IPerspectiveDescriptor perspectiveDescriptor findPerspectiveWithId defaultSyncPerspectiveId IWorkbenchPage TeamUIPlugin getActivePage IPerspectiveDescriptor getPerspective getId defaultSyncPerspectiveId perspectiveDescriptor perspectiveName perspectiveDescriptor getLabel MessageDialogWithToggle MessageDialogWithToggle openYesNoQuestion getShell SynchronizeManager SynchronizeManager perspectiveDescriptor getLabel SynchronizeManager IPreferenceIds SYNCHRONIZING_COMPLETE_PERSPECTIVE getReturnCode IDialogConstants YES_ID IDialogConstants OK_ID IDialogConstants NO_ID
Creates the participant registry and restore any saved participants Will also instantiate any static participants public void init try Initialize the participant registry reads all participant extension descriptions participant Registry read Registry Platform get Plugin Registry TeamUI Plugin ID Synchronize Participant Registry PT SYNCPARTICIPANTS Initialize the wizard registry wizard Registry read Registry Platform get Plugin Registry TeamUI Plugin ID Synchronize Wizard Registry PT SYNCHRONIZE WIZARDS Instantiate and register any dynamic participants saved from a previous session restore Saved Participants catch Core Exception e TeamUI Plugin log new Status I Status ERROR TeamUI Plugin ID 1 Policy bind Synchronize Manager 8 e NON NLS 1  participantRegistry readRegistry getPluginRegistry TeamUIPlugin SynchronizeParticipantRegistry PT_SYNCPARTICIPANTS wizardRegistry readRegistry getPluginRegistry TeamUIPlugin SynchronizeWizardRegistry PT_SYNCHRONIZE_WIZARDS restoreSavedParticipants CoreException TeamUIPlugin IStatus TeamUIPlugin SynchronizeManager
Allow participant instances to clean up public void dispose save state and settings for existing participants save State for Iterator it participant References values iterator it has Next Participant Instance ref Participant Instance it next if ref is Instantiated try ref get Participant dispose catch Team Exception e continue participant References null  saveState participantReferences hasNext ParticipantInstance ParticipantInstance isInstantiated getParticipant TeamException participantReferences
Restores participants that have been saved between sessions private void restore Saved Participants throws Core Exception File file get State File Reader reader try reader new Buffered Reader new File Reader file catch File Not Found Exception e return I Memento memento XML Memento create Read Root reader I Memento participant Nodes memento get Children CTX PARTICIPANT for int i 0 i participant Nodes length i I Memento memento2 participant Nodes i String id memento2 get String CTX ID String seconday Id memento2 get String CTX SECONDARY ID if seconday Id null String display Name memento2 get String CTX PARTICIPANT DISPLAY NAME Synchronize Participant Descriptor desc participant Registry find id if desc null String key Utils get Key id seconday Id participant References put key new Participant Instance desc seconday Id display Name memento2 get Child CTX PARTICIPANT DATA else TeamUI Plugin log new Status I Status ERROR TeamUI Plugin ID 1 Policy bind Synchronize Manager 9 id null NON NLS 1  restoreSavedParticipants CoreException getStateFile BufferedReader FileReader FileNotFoundException IMemento XMLMemento createReadRoot IMemento participantNodes getChildren CTX_PARTICIPANT participantNodes IMemento participantNodes getString CTX_ID secondayId getString CTX_SECONDARY_ID secondayId displayName getString CTX_PARTICIPANT_DISPLAY_NAME SynchronizeParticipantDescriptor participantRegistry getKey secondayId participantReferences ParticipantInstance secondayId displayName getChild CTX_PARTICIPANT_DATA TeamUIPlugin IStatus TeamUIPlugin SynchronizeManager
Saves a file containing the list of participant ids that are registered with this manager Each initialized participant is also given the chance to save it s state private void save State XML Memento xml Memento XML Memento create Write Root CTX PARTICIPANTS List children new Array List for Iterator it participant References values iterator it has Next Participant Instance ref Participant Instance it next Participants can opt out of being saved between sessions if ref get Descriptor is Persistent continue Create the state placeholder for a participant I Memento participant Node xml Memento create Child CTX PARTICIPANT participant Node put String CTX ID ref get Id String secondary Id ref get Secondary Id if secondary Id null participant Node put String CTX SECONDARY ID secondary Id participant Node put String CTX PARTICIPANT DISPLAY NAME ref get Display Name I Memento participant Data participant Node create Child CTX PARTICIPANT DATA ref save participant Data try Writer writer new Buffered Writer new File Writer get State File try xml Memento save writer finally writer close catch IO Exception e TeamUI Plugin log new Status I Status ERROR TeamUI Plugin ID 1 Policy bind Synchronize Manager 10 e NON NLS 1  saveState XMLMemento xmlMemento XMLMemento createWriteRoot CTX_PARTICIPANTS ArrayList participantReferences hasNext ParticipantInstance ParticipantInstance getDescriptor isPersistent IMemento participantNode xmlMemento createChild CTX_PARTICIPANT participantNode putString CTX_ID getId secondaryId getSecondaryId secondaryId participantNode putString CTX_SECONDARY_ID secondaryId participantNode putString CTX_PARTICIPANT_DISPLAY_NAME getDisplayName IMemento participantData participantNode createChild CTX_PARTICIPANT_DATA participantData BufferedWriter FileWriter getStateFile xmlMemento IOException TeamUIPlugin IStatus TeamUIPlugin SynchronizeManager
private File get State File I Path plugin State Location TeamUI Plugin get Plugin get State Location return plugin State Location append FILENAME to File NON NLS 1  getStateFile IPath pluginStateLocation TeamUIPlugin getPlugin getStateLocation pluginStateLocation toFile
Fires notification param participants participants added removed param type ADD or REMOVE private void fire Update I Synchronize Participant participants int type new Synchronize View Page Notifier notify participants type  fireUpdate ISynchronizeParticipant SynchronizeViewPageNotifier
see org eclipse team ui synchronize I Synchronize Manager get Descriptor public I Synchronize Participant Descriptor get Participant Descriptor String id return participant Registry find id  ISynchronizeManager getDescriptor ISynchronizeParticipantDescriptor getParticipantDescriptor participantRegistry
public Synchronize Wizard Description get Wizard Descriptors return wizard Registry get Synchronize Wizards  SynchronizeWizardDescription getWizardDescriptors wizardRegistry getSynchronizeWizards

private Synchronize Model Element parent public Synchronize Model Element I Diff Container parent super parent Sync Info IN SYNC internal Set Parent parent  SynchronizeModelElement SynchronizeModelElement IDiffContainer SyncInfo IN_SYNC internalSetParent
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return Platform get Adapter Manager get Adapter this adapter  IAdaptable getAdapter getAdapter getAdapterManager getAdapter
public synchronized void add Property Change Listener I Property Change Listener listener if listeners null listeners new Listener List listeners add listener  addPropertyChangeListener IPropertyChangeListener ListenerList
public synchronized void remove Property Change Listener I Property Change Listener listener if listeners null listeners remove listener if listeners is Empty listeners null  removePropertyChangeListener IPropertyChangeListener isEmpty
see org eclipse compare structuremergeviewer I Diff Element set Parent org eclipse compare structuremergeviewer I Diff Container public void set Parent I Diff Container parent super set Parent parent internal Set Parent parent  IDiffElement setParent IDiffContainer setParent IDiffContainer setParent internalSetParent
Return whether this node has the given property set param property Name the flag to test return code true code if the property is set public boolean get Property String property Name return get Flags get Flag property Name 0  propertyName getProperty propertyName getFlags getFlag propertyName
Add the flag to the flags for this node param property Name the flag to add public void set Property String property Name boolean value if value if get Property property Name int flag get Flag property Name flags flag fire Property Change property Name else if get Property property Name int flag get Flag property Name flags flag fire Property Change property Name  propertyName setProperty propertyName getProperty propertyName getFlag propertyName firePropertyChange propertyName getProperty propertyName getFlag propertyName firePropertyChange propertyName
public void set Property To Root String property Name boolean value if value add To Root property Name else remove To Root property Name  setPropertyToRoot propertyName addToRoot propertyName removeToRoot propertyName
public void fire Changes fire Change  fireChanges fireChange
public Image Descriptor get Image Descriptor Object object I Resource resource get Resource if resource null I Workbench Adapter adapter I Workbench Adapter I Adaptable resource get Adapter I Workbench Adapter class return adapter get Image Descriptor resource return null  ImageDescriptor getImageDescriptor IResource getResource IWorkbenchAdapter IWorkbenchAdapter IAdaptable getAdapter IWorkbenchAdapter getImageDescriptor
public abstract I Resource get Resource  IResource getResource
private void add To Root String flag set Property flag true if parent null if parent get Property flag return parent add To Root flag  addToRoot setProperty getProperty addToRoot
final I Property Change Listener listener I Property Change Listener object Platform run new I Safe Runnable public void handle Exception Throwable exception Exceptions logged by the platform  IPropertyChangeListener IPropertyChangeListener ISafeRunnable handleException
Exceptions logged by the platform public void run throws Exception listener property Change event  propertyChange
private void fire Property Change String property Name Object all Listeners synchronized this if listeners null return all Listeners listeners get Listeners boolean set get Property property Name final Property Change Event event new Property Change Event this property Name Boolean value Of set Boolean value Of set for int i 0 i all Listeners length i Object object all Listeners i if object instanceof I Property Change Listener final I Property Change Listener listener I Property Change Listener object Platform run new I Safe Runnable public void handle Exception Throwable exception Exceptions logged by the platform public void run throws Exception listener property Change event  firePropertyChange propertyName allListeners allListeners getListeners getProperty propertyName PropertyChangeEvent PropertyChangeEvent propertyName valueOf valueOf allListeners allListeners IPropertyChangeListener IPropertyChangeListener IPropertyChangeListener ISafeRunnable handleException propertyChange
private int get Flag String property Name if property Name BUSY PROPERTY return BUSY FLAG else if property Name PROPAGATED CONFLICT PROPERTY return PROPAGATED CONFLICT FLAG else if property Name PROPAGATED ERROR MARKER PROPERTY return PROPAGATED ERROR FLAG else if property Name PROPAGATED WARNING MARKER PROPERTY return PROPAGATED WARNING FLAG return 0  getFlag propertyName propertyName BUSY_PROPERTY BUSY_FLAG propertyName PROPAGATED_CONFLICT_PROPERTY PROPAGATED_CONFLICT_FLAG propertyName PROPAGATED_ERROR_MARKER_PROPERTY PROPAGATED_ERROR_FLAG propertyName PROPAGATED_WARNING_MARKER_PROPERTY PROPAGATED_WARNING_FLAG
private int get Flags return flags  getFlags
private boolean has Child With Flag String flag I Diff Element childen get Children for int i 0 i childen length i I Diff Element element childen i if Synchronize Model Element element get Property flag return true return false  hasChildWithFlag IDiffElement getChildren IDiffElement SynchronizeModelElement getProperty
private void remove To Root String flag boolean has Property get Property flag if has Property set Property flag false if parent null If the parent doesn t have the tag no recalculation is required Also if the parent still has a child with the tag no recalculation is needed if parent get Property flag parent has Child With Flag flag The parent no longer has the flag so propogate the recalculation parent remove To Root flag  removeToRoot hasProperty getProperty hasProperty setProperty getProperty hasChildWithFlag removeToRoot
private void internal Set Parent I Diff Container parent if parent null parent instanceof Synchronize Model Element this parent Synchronize Model Element parent  internalSetParent IDiffContainer SynchronizeModelElement SynchronizeModelElement
Synchronize model elements are not copied so use identity as the equality check param object The object to test return true if the objects are identical public boolean equals Object object return this object 
public int hash Code Use the name to get the hash Code to ensure that we can find equal elements The inherited hash Code uses the path which can change when items are removed return get Name hash Code  hashCode hashCode hashCode getName hashCode

private Font busy Font public Synchronize Model Element Label Provider  busyFont SynchronizeModelElementLabelProvider
see org eclipse jface viewers I Color Provider get Foreground java lang Object public Color get Foreground Object element return null  IColorProvider getForeground getForeground
see org eclipse jface viewers I Color Provider get Background java lang Object public Color get Background Object element return null  IColorProvider getBackground getBackground
public Font get Font Object element if element instanceof I Synchronize Model Element I Synchronize Model Element node I Synchronize Model Element element if node get Property I Synchronize Model Element BUSY PROPERTY if busy Font null Font default Font J Face Resources get Default Font Font Data data default Font get Font Data for int i 0 i data length i data i set Style SWT ITALIC busy Font new Font TeamUI Plugin get Standard Display data return busy Font return null  getFont ISynchronizeModelElement ISynchronizeModelElement ISynchronizeModelElement getProperty ISynchronizeModelElement BUSY_PROPERTY busyFont defaultFont JFaceResources getDefaultFont FontData defaultFont getFontData setStyle busyFont TeamUIPlugin getStandardDisplay busyFont
public Image get Image Object element Image base workbench Label Provider get Image element if base null if element instanceof I Synchronize Model Element I Synchronize Model Element sync Node I Synchronize Model Element element int kind sync Node get Kind Image decorated Image decorated Image get Compare Image base kind The reason we still overlay the compare image is to ensure that the image width for all images shown in the viewer are consistent return propagate Conflicts decorated Image sync Node return base  getImage workbenchLabelProvider getImage ISynchronizeModelElement ISynchronizeModelElement syncNode ISynchronizeModelElement syncNode getKind decoratedImage decoratedImage getCompareImage propagateConflicts decoratedImage syncNode
public String get Text Object element String base workbench Label Provider get Text element if element instanceof Diff Node if TeamUI Plugin get Plugin get Preference Store get Boolean I Preference Ids SYNCVIEW VIEW SYNCINFO IN LABEL if the folder is already conflicting then don t bother propagating the conflict int kind Diff Node element get Kind if kind Sync Info IN SYNC String sync Kind String Sync Info kind To String kind return Policy bind Team Subscriber Sync Page label With Sync Kind base sync Kind String NON NLS 1 return base  getText workbenchLabelProvider getText DiffNode TeamUIPlugin getPlugin getPreferenceStore getBoolean IPreferenceIds SYNCVIEW_VIEW_SYNCINFO_IN_LABEL DiffNode getKind SyncInfo IN_SYNC syncKindString SyncInfo kindToString TeamSubscriberSyncPage labelWithSyncKind syncKindString
protected Image get Compare Image Image base int kind switch kind Sync Info DIRECTION MASK case Sync Info OUTGOING kind kind Sync Info OUTGOING Sync Info INCOMING break case Sync Info INCOMING kind kind Sync Info INCOMING Sync Info OUTGOING break return compare Config get Image base kind  getCompareImage SyncInfo DIRECTION_MASK SyncInfo SyncInfo SyncInfo SyncInfo SyncInfo SyncInfo compareConfig getImage
private Image propagate Conflicts Image base I Synchronize Model Element element if the folder is already conflicting then don t bother propagating the conflict List overlays new Array List List locations new Array List Decorate with the busy indicator if element get Property I Synchronize Model Element BUSY PROPERTY overlays add TeamUI Plugin get Image Descriptor I Shared Images IMG HOURGLASS OVR locations add new Integer Overlay Icon TOP LEFT Decorate with propagated conflicts and problem markers int kind element get Kind if kind Sync Info DIRECTION MASK Sync Info CONFLICTING if has Decendant Conflicts element overlays add TeamUI Plugin get Image Descriptor I Shared Images IMG CONFLICT OVR locations add new Integer Overlay Icon BOTTOM RIGHT if has Error Marker element overlays add TeamUI Plugin get Image Descriptor I Shared Images IMG ERROR OVR locations add new Integer Overlay Icon BOTTOM LEFT else if has Warning Marker element overlays add TeamUI Plugin get Image Descriptor I Shared Images IMG WARNING OVR locations add new Integer Overlay Icon BOTTOM LEFT if overlays is Empty Image Descriptor overlay Images Image Descriptor overlays to Array new Image Descriptor overlays size int location Ints new int locations size for int i 0 i locations size i location Ints i Integer locations get i int Value Image Descriptor overlay new Overlay Icon base overlay Images location Ints new Point base get Bounds width base get Bounds height if fg Image Cache null fg Image Cache new Hash Map 10 Image conflict Decorated Image Image fg Image Cache get overlay if conflict Decorated Image null conflict Decorated Image overlay create Image fg Image Cache put overlay conflict Decorated Image return conflict Decorated Image return base  propagateConflicts ISynchronizeModelElement ArrayList ArrayList getProperty ISynchronizeModelElement BUSY_PROPERTY TeamUIPlugin getImageDescriptor ISharedImages IMG_HOURGLASS_OVR OverlayIcon TOP_LEFT getKind SyncInfo DIRECTION_MASK SyncInfo hasDecendantConflicts TeamUIPlugin getImageDescriptor ISharedImages IMG_CONFLICT_OVR OverlayIcon BOTTOM_RIGHT hasErrorMarker TeamUIPlugin getImageDescriptor ISharedImages IMG_ERROR_OVR OverlayIcon BOTTOM_LEFT hasWarningMarker TeamUIPlugin getImageDescriptor ISharedImages IMG_WARNING_OVR OverlayIcon BOTTOM_LEFT isEmpty ImageDescriptor overlayImages ImageDescriptor toArray ImageDescriptor locationInts locationInts intValue ImageDescriptor OverlayIcon overlayImages locationInts getBounds getBounds fgImageCache fgImageCache HashMap conflictDecoratedImage fgImageCache conflictDecoratedImage conflictDecoratedImage createImage fgImageCache conflictDecoratedImage conflictDecoratedImage
Return whether this diff node has descendant conflicts in the view in which it appears return whether the node has descendant conflicts private boolean has Decendant Conflicts I Synchronize Model Element node return I Synchronize Model Element node get Property I Synchronize Model Element PROPAGATED CONFLICT PROPERTY  hasDecendantConflicts ISynchronizeModelElement ISynchronizeModelElement getProperty ISynchronizeModelElement PROPAGATED_CONFLICT_PROPERTY
Return whether this diff node has descendant conflicts in the view in which it appears return whether the node has descendant conflicts private boolean has Error Marker I Synchronize Model Element node return node get Property I Synchronize Model Element PROPAGATED ERROR MARKER PROPERTY  hasErrorMarker ISynchronizeModelElement getProperty ISynchronizeModelElement PROPAGATED_ERROR_MARKER_PROPERTY
Return whether this diff node has descendant conflicts in the view in which it appears return whether the node has descendant conflicts private boolean has Warning Marker I Synchronize Model Element node return node get Property I Synchronize Model Element PROPAGATED WARNING MARKER PROPERTY  hasWarningMarker ISynchronizeModelElement getProperty ISynchronizeModelElement PROPAGATED_WARNING_MARKER_PROPERTY
public void dispose if busy Font null busy Font dispose compare Config dispose if fg Image Cache null Iterator it fg Image Cache values iterator while it has Next Image element Image it next element dispose  busyFont busyFont compareConfig fgImageCache fgImageCache hasNext

public class Synchronize Model Element Sorter extends Resource Sorter public Synchronize Model Element Sorter super Resource Sorter NAME  SynchronizeModelElementSorter ResourceSorter SynchronizeModelElementSorter ResourceSorter
public int compare Viewer viewer Object o1 Object o2 I Resource resource1 get Resource o1 I Resource resource2 get Resource o2 int result if resource1 null resource2 null result super compare viewer resource1 resource2 else result super compare viewer o1 o2 return result  IResource getResource IResource getResource
protected I Resource get Resource Object obj I Resource resources Utils get Resources new Object obj return resources length 1 resources 0 null  IResource getResource IResource getResources

private I Synchronize Model Provider Descriptor descriptor protected Toggle Model Provider Action I Synchronize Model Provider Descriptor descriptor super descriptor get Name Action AS RADIO BUTTON set Image Descriptor descriptor get Image Descriptor set Tool Tip Text descriptor get Name this descriptor descriptor update configuration add Property Change Listener this  ISynchronizeModelProviderDescriptor ToggleModelProviderAction ISynchronizeModelProviderDescriptor getName AS_RADIO_BUTTON setImageDescriptor getImageDescriptor setToolTipText getName addPropertyChangeListener
public void run I Synchronize Model Provider mp get Active Model Provider if mp get Descriptor get Id equals descriptor get Id mp save State internal Prepare Input descriptor get Id null set Input  ISynchronizeModelProvider getActiveModelProvider getDescriptor getId getId saveState internalPrepareInput getId setInput
public void update I Synchronize Model Provider mp get Active Model Provider if mp null set Checked mp get Descriptor get Id equals descriptor get Id  ISynchronizeModelProvider getActiveModelProvider setChecked getDescriptor getId getId
public void property Change Property Change Event event if event get Property equals Synchronize Page Configuration P MODEL update  propertyChange PropertyChangeEvent getProperty SynchronizePageConfiguration P_MODEL
public Synchronize Model Manager I Synchronize Page Configuration configuration Assert is Not Null configuration configuration cannot be null NON NLS 1 this configuration configuration configuration add Action Contribution this  SynchronizeModelManager ISynchronizePageConfiguration isNotNull addActionContribution
Initialize the model manager to be used with the provided advisor public void set Viewer Advisor Structured Viewer Advisor advisor this advisor advisor  setViewerAdvisor StructuredViewerAdvisor
Return the list of supported model providers for this advisor param viewer return 
Get the model provider that will be used to create the input for the adviser s viewer return the model provider 
protected abstract I Synchronize Model Provider create Model Provider String id protected I Synchronize Model Provider get Active Model Provider return model Provider  ISynchronizeModelProvider createModelProvider ISynchronizeModelProvider getActiveModelProvider modelProvider
protected Object internal Prepare Input String id I Progress Monitor monitor if model Provider null model Provider dispose model Provider create Model Provider id I Dialog Settings page Settings get Configuration get Site get Page Settings if page Settings null page Settings put P LAST PROVIDER model Provider get Descriptor get Id return model Provider prepare Input monitor  internalPrepareInput IProgressMonitor modelProvider modelProvider modelProvider createModelProvider IDialogSettings pageSettings getConfiguration getSite getPageSettings pageSettings pageSettings P_LAST_PROVIDER modelProvider getDescriptor getId modelProvider prepareInput
Gets a new selection that contains the view model objects that correspond to the given objects The advisor will try and convert the objects into the appropriate viewer objects This is required because the model provider controls the actual model elements in the viewer and must be consulted in order to understand what objects can be selected in the viewer p This method does not affect the selection of the viewer itself It s main purpose is for testing and should not be used by other clients p param object the objects to select return a selection corresponding to the given objects public I Selection get Selection Object objects if model Provider null Object viewer Objects new Object objects length for int i 0 i objects length i viewer Objects i model Provider get Mapping objects i return new Structured Selection viewer Objects else return Structured Selection EMPTY  ISelection getSelection modelProvider viewerObjects viewerObjects modelProvider getMapping StructuredSelection viewerObjects StructuredSelection
Sets a new selection for this viewer and optionally makes it visible The advisor will try and convert the objects into the appropriate viewer objects This is required because the model provider controls the actual model elements in the viewer and must be consulted in order to understand what objects can be selected in the viewer param object the objects to select param reveal code true code if the selection is to be made visible and code false code otherwise protected void set Selection Object objects boolean reveal I Selection selection get Selection objects if selection is Empty advisor set Selection selection reveal  setSelection ISelection getSelection isEmpty setSelection
public void initialize I Synchronize Page Configuration configuration super initialize configuration I Synchronize Model Provider Descriptor providers get Supported Model Providers We only need switching of layouts if there is more than one model provider if providers length 1 toggle Model Provider Actions new Array List for int i 0 i providers length i final I Synchronize Model Provider Descriptor provider providers i toggle Model Provider Actions add new Toggle Model Provider Action provider The input may of been set already In that case don t change it and simply assign it to the view if model Provider null String default Provider Id null use providers prefered I Dialog Settings page Settings configuration get Site get Page Settings if page Settings null default Provider Id page Settings get P LAST PROVIDER internal Prepare Input default Provider Id null set Input  ISynchronizePageConfiguration ISynchronizeModelProviderDescriptor getSupportedModelProviders toggleModelProviderActions ArrayList ISynchronizeModelProviderDescriptor toggleModelProviderActions ToggleModelProviderAction modelProvider defaultProviderId IDialogSettings pageSettings getSite getPageSettings pageSettings defaultProviderId pageSettings P_LAST_PROVIDER internalPrepareInput defaultProviderId setInput
Set the input of the viewer protected void set Input configuration set Property Synchronize Page Configuration P MODEL model Provider get Model Root if advisor null advisor set Input model Provider  setInput setProperty SynchronizePageConfiguration P_MODEL modelProvider getModelRoot setInput modelProvider
public void fill Action Bars I Action Bars action Bars if toggle Model Provider Actions null return I Tool Bar Manager toolbar action Bars get Tool Bar Manager I Menu Manager menu action Bars get Menu Manager I Contribution Item group find Group menu I Synchronize Page Configuration LAYOUT GROUP if menu null group null Menu Manager layout new Menu Manager Policy bind action layout label NON NLS 1 menu append To Group group get Id layout append To Menu null layout else if toolbar null group find Group toolbar I Synchronize Page Configuration LAYOUT GROUP if group null append To Menu group get Id toolbar  fillActionBars IActionBars actionBars toggleModelProviderActions IToolBarManager actionBars getToolBarManager IMenuManager actionBars getMenuManager IContributionItem findGroup ISynchronizePageConfiguration LAYOUT_GROUP MenuManager MenuManager appendToGroup getId appendToMenu findGroup ISynchronizePageConfiguration LAYOUT_GROUP appendToMenu getId
private void append To Menu String group Id I Contribution Manager menu for Iterator iter toggle Model Provider Actions iterator iter has Next if group Id null menu add Action iter next else menu append To Group group Id Action iter next  appendToMenu groupId IContributionManager toggleModelProviderActions hasNext groupId appendToGroup groupId
public void dispose if model Provider null model Provider dispose super dispose  modelProvider modelProvider
return Returns the configuration public I Synchronize Page Configuration get Configuration return configuration  ISynchronizePageConfiguration getConfiguration

private I Property Change Listener listener new I Property Change Listener public void property Change final Property Change Event event if event get Property Synchronize Model Element BUSY PROPERTY label Updater add event get Source Boolean event get New Value boolean Value  IPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty SynchronizeModelElement BUSY_PROPERTY labelUpdater getSource getNewValue booleanValue
public static final int BATCH WAIT INCREMENT 100 Set nodes new Hash Set public Label Update Job super Policy bind Hierarchical Model Provider 0 NON NLS 1 set System true  BATCH_WAIT_INCREMENT HashSet LabelUpdateJob HierarchicalModelProvider setSystem
public I Status run InUI Thread I Progress Monitor monitor Object updates synchronized nodes updates nodes to Array new Object nodes size nodes clear if can Update Viewer Structured Viewer tree get Viewer tree update updates null schedule BATCH WAIT INCREMENT return Status OK STATUS  IStatus runInUIThread IProgressMonitor toArray canUpdateViewer StructuredViewer getViewer BATCH_WAIT_INCREMENT OK_STATUS
public void add Object node boolean is Busy synchronized nodes nodes add node if is Busy schedule BATCH WAIT INCREMENT else Wait when unbusying to give the events a chance to propogate through the collector schedule BATCH WAIT INCREMENT 10  isBusy isBusy BATCH_WAIT_INCREMENT BATCH_WAIT_INCREMENT
public boolean should Run return nodes is Empty  shouldRun isEmpty
Override to ensure that the diff viewer will appear in Compare Editor Inputs public boolean has Children return true  CompareEditorInputs hasChildren
Create an input based on the provide sync set The input is not initialized until code prepare Input code is called param set the sync set used as the basis for the model created by this input public Synchronize Model Provider I Synchronize Page Configuration configuration Sync Info Set set this new Unchanged Resource Model Element null Resources Plugin get Workspace get Root Override to ensure that the diff viewer will appear in Compare Editor Inputs public boolean has Children return true configuration set  prepareInput SynchronizeModelProvider ISynchronizePageConfiguration SyncInfoSet UnchangedResourceModelElement ResourcesPlugin getWorkspace getRoot CompareEditorInputs hasChildren
public Synchronize Model Provider Synchronize Model Element parent I Synchronize Page Configuration configuration Sync Info Set set Assert is Not Null set Assert is Not Null parent this root parent this set set this configuration configuration  SynchronizeModelProvider SynchronizeModelElement ISynchronizePageConfiguration SyncInfoSet isNotNull isNotNull
Return the set that contains the elements this provider is using as a basis for creating a presentation model This cannot be null return the set that contains the elements this provider is using as a basis for creating a presentation model public Sync Info Set get Sync Info Set return set  SyncInfoSet getSyncInfoSet
Return the page configuration for this provider return the page configuration for this provider public I Synchronize Page Configuration get Configuration return configuration  ISynchronizePageConfiguration getConfiguration
Return the code Abstract Tree Viewer code asociated with this content provider or code null code if the viewer is not of the proper type return public Structured Viewer get Viewer return viewer  AbstractTreeViewer StructuredViewer getViewer
public void set Viewer Structured Viewer viewer Assert is True viewer instanceof Abstract Tree Viewer this viewer Abstract Tree Viewer viewer  setViewer StructuredViewer isTrue AbstractTreeViewer AbstractTreeViewer
Builds the viewer model based on the contents of the sync set public I Synchronize Model Element prepare Input I Progress Monitor monitor Connect to the sync set which will register us as a listener and give us a reset event in a background thread get Sync Info Set connect this monitor Resources Plugin get Workspace add Resource Change Listener this return get Model Root  ISynchronizeModelElement prepareInput IProgressMonitor getSyncInfoSet ResourcesPlugin getWorkspace addResourceChangeListener getModelRoot
The provider can try and return a mapping for the provided object Providers often use mappings to store the source of a logical element they have created For example when displaying resource based logical elements a provider will cache the resource element mapping for quick retrieval of the element when resource based changes are made param object the object to query for a mapping return an object created by this provider that would be shown in a viewer or code null code if the provided object is not mapped by this provider public Object get Mapping Object object return resource Map get object  getMapping resourceMap
Dispose of the builder public void dispose resource Map clear get Sync Info Set remove Sync Set Changed Listener this Resources Plugin get Workspace remove Resource Change Listener this this disposed true  resourceMap getSyncInfoSet removeSyncSetChangedListener ResourcesPlugin getWorkspace removeResourceChangeListener
Returns the input created by this provider or code null code if link prepare Input I Progress Monitor hasn t been called on this object yet return the input created by this provider public I Synchronize Model Element get Model Root return root  prepareInput IProgressMonitor ISynchronizeModelElement getModelRoot
Returns the sorter for this model provider return the sorter for this model provider 
Return the model object i e an instance of code Sync Info Model Element code or one of its subclasses for the given I Resource param resource the resource return the code Sync Info Model Element code for the given resource protected I Synchronize Model Element get Model Object I Resource resource return I Synchronize Model Element resource Map get resource  SyncInfoModelElement IResource SyncInfoModelElement ISynchronizeModelElement getModelObject IResource ISynchronizeModelElement resourceMap
Busy Indicator show While ctrl get Display new Runnable public void run handle Changes I Sync Info Tree Change Event event I Synchronize Model Element root get Model Root if root instanceof Synchronize Model Element Synchronize Model Element root fire Changes  BusyIndicator showWhile getDisplay handleChanges ISyncInfoTreeChangeEvent ISynchronizeModelElement getModelRoot SynchronizeModelElement SynchronizeModelElement fireChanges
ctrl get Display sync Exec new Runnable public void run if ctrl is Disposed Busy Indicator show While ctrl get Display new Runnable public void run handle Changes I Sync Info Tree Change Event event I Synchronize Model Element root get Model Root if root instanceof Synchronize Model Element Synchronize Model Element root fire Changes  getDisplay syncExec isDisposed BusyIndicator showWhile getDisplay handleChanges ISyncInfoTreeChangeEvent ISynchronizeModelElement getModelRoot SynchronizeModelElement SynchronizeModelElement fireChanges
public void sync Info Changed final I Sync Info Set Change Event event I Progress Monitor monitor synchronized this if event instanceof I Sync Info Tree Change Event reset else final Control ctrl get Viewer get Control if ctrl null ctrl is Disposed ctrl get Display sync Exec new Runnable public void run if ctrl is Disposed Busy Indicator show While ctrl get Display new Runnable public void run handle Changes I Sync Info Tree Change Event event I Synchronize Model Element root get Model Root if root instanceof Synchronize Model Element Synchronize Model Element root fire Changes  syncInfoChanged ISyncInfoSetChangeEvent IProgressMonitor ISyncInfoTreeChangeEvent getViewer getControl isDisposed getDisplay syncExec isDisposed BusyIndicator showWhile getDisplay handleChanges ISyncInfoTreeChangeEvent ISynchronizeModelElement getModelRoot SynchronizeModelElement SynchronizeModelElement fireChanges
For each node create children based on the contents of param node return 
protected abstract I Diff Element build Model Objects I Synchronize Model Element node protected abstract void do Add I Synchronize Model Element parent I Synchronize Model Element element  IDiffElement buildModelObjects ISynchronizeModelElement doAdd ISynchronizeModelElement ISynchronizeModelElement
protected abstract void do Add I Synchronize Model Element parent I Synchronize Model Element element protected abstract void do Remove I Synchronize Model Element element  doAdd ISynchronizeModelElement ISynchronizeModelElement doRemove ISynchronizeModelElement
protected void associate Diff Node I Synchronize Model Element node I Resource resource node get Resource if resource null resource Map put resource node  associateDiffNode ISynchronizeModelElement IResource getResource resourceMap
protected void unassociate Diff Node I Resource resource resource Map remove resource  unassociateDiffNode IResource resourceMap
Handle the changes made to the viewer s code Sync Info Set code This method delegates the changes to the three methods code handle Resource Changes I Sync Info Set Change Event code code handle Resource Removals I Sync Info Set Change Event code and code handle Resource Additions I Sync Info Set Change Event code param event the event containing the changed resourcses protected final void handle Changes I Sync Info Tree Change Event event Structured Viewer viewer get Viewer try viewer get Control set Redraw false handle Resource Changes event handle Resource Removals event handle Resource Additions event fire Pending Label Updates finally viewer get Control set Redraw true  SyncInfoSet handleResourceChanges ISyncInfoSetChangeEvent handleResourceRemovals ISyncInfoSetChangeEvent handleResourceAdditions ISyncInfoSetChangeEvent handleChanges ISyncInfoTreeChangeEvent StructuredViewer getViewer getControl setRedraw handleResourceChanges handleResourceRemovals handleResourceAdditions firePendingLabelUpdates getControl setRedraw
Update the viewer for the sync set additions in the provided event This method is invoked by code handle Changes I Sync Info Set Change Event code Subclasses may override param event  handleChanges ISyncInfoSetChangeEvent
Update the viewer for the sync set changes in the provided event This method is invoked by code handle Changes I Sync Info Set Change Event code Subclasses may override param event  handleChanges ISyncInfoSetChangeEvent
protected abstract void handle Resource Changes I Sync Info Tree Change Event event protected boolean is Conflicting I Synchronize Model Element diff Node return diff Node get Kind Sync Info DIRECTION MASK Sync Info CONFLICTING  handleResourceChanges ISyncInfoTreeChangeEvent isConflicting ISynchronizeModelElement diffNode diffNode getKind SyncInfo DIRECTION_MASK SyncInfo
Update the viewer for the sync set removals in the provided event This method is invoked by code handle Changes I Sync Info Set Change Event code Subclasses may override param event  handleChanges ISyncInfoSetChangeEvent
TeamUI Plugin get Standard Display async Exec new Runnable public void run Structured Viewer viewer get Viewer if viewer null viewer get Control is Disposed viewer refresh restore expansion state restore Viewer State  TeamUIPlugin getStandardDisplay asyncExec StructuredViewer getViewer getControl isDisposed restoreViewerState
protected void reset save expansion state if resource Map is Empty save Viewer State Clear existing model but keep the root node resource Map clear pending Label Updates clear clear Model Objects get Model Root remove all from tree viewer I Diff Element elements get Model Root get Children for int i 0 i elements length i do Remove I Synchronize Model Element elements i Rebuild the model associate Diff Node get Model Root build Model Objects get Model Root Notify listeners that model has changed I Synchronize Model Element root get Model Root if root instanceof Synchronize Model Element Synchronize Model Element root fire Changes TeamUI Plugin get Standard Display async Exec new Runnable public void run Structured Viewer viewer get Viewer if viewer null viewer get Control is Disposed viewer refresh restore expansion state restore Viewer State  resourceMap isEmpty saveViewerState resourceMap pendingLabelUpdates clearModelObjects getModelRoot IDiffElement getModelRoot getChildren doRemove ISynchronizeModelElement associateDiffNode getModelRoot buildModelObjects getModelRoot ISynchronizeModelElement getModelRoot SynchronizeModelElement SynchronizeModelElement fireChanges TeamUIPlugin getStandardDisplay asyncExec StructuredViewer getViewer getControl isDisposed restoreViewerState
Remove any traces of the model element and any of it s descendants in the hiearchy defined by the content provider from the content provider and the viewer it is associated with param node the model element to remove protected void remove From Viewer I Synchronize Model Element node propogate Conflict State node true clear the conflict clear Model Objects node if can Update Viewer do Remove node  removeFromViewer ISynchronizeModelElement propogateConflictState clearModelObjects canUpdateViewer doRemove
Helper method to remove a resource from the viewer If the resource is not mapped to a model element this is a no op param resource the resource to remove protected void remove From Viewer I Resource resource I Synchronize Model Element element get Model Object resource if element null remove From Viewer element  removeFromViewer IResource ISynchronizeModelElement getModelObject removeFromViewer
Clear the model objects from the diff tree cleaning up any cached state such as resource to model object map This method recurses deeply on the tree to allow the cleanup of any cached state for the children as well param node the root node protected void clear Model Objects I Synchronize Model Element node I Diff Element children node get Children for int i 0 i children length i I Diff Element element children i if element instanceof I Synchronize Model Element clear Model Objects I Synchronize Model Element element I Resource resource node get Resource if resource null unassociate Diff Node resource I Diff Container parent node get Parent if parent null parent remove To Root node  clearModelObjects ISynchronizeModelElement IDiffElement getChildren IDiffElement ISynchronizeModelElement clearModelObjects ISynchronizeModelElement IResource getResource unassociateDiffNode IDiffContainer getParent removeToRoot
protected void add To Viewer I Synchronize Model Element node associate Diff Node node node add Property Change Listener listener propogate Conflict State node false Set the marker property on this node There is no need to propogate this to the parents as they will be displaying the proper marker already String property calculate Problem Marker node if property null node set Property property true if can Update Viewer do Add Synchronize Model Element node get Parent node  addToViewer ISynchronizeModelElement associateDiffNode addPropertyChangeListener propogateConflictState calculateProblemMarker setProperty canUpdateViewer doAdd SynchronizeModelElement getParent
Calculate the problem marker that should be shown on the given element param element a synchronize model element return the marker property that should be displayed on the element or code null code if no marker should be displayed private String calculate Problem Marker I Synchronize Model Element element I Resource resource element get Resource String property null if resource null resource exists try I Marker markers resource find Markers I Marker PROBLEM true get Logical Model Depth resource for int i 0 i markers length i I Marker marker markers i try Integer severity Integer marker get Attribute I Marker SEVERITY if severity null if severity int Value I Marker SEVERITY ERROR property I Synchronize Model Element PROPAGATED ERROR MARKER PROPERTY break else if severity int Value I Marker SEVERITY WARNING property I Synchronize Model Element PROPAGATED WARNING MARKER PROPERTY Keep going because there may be errors on other resources catch Core Exception e if resource exists The resource was deleted concurrently Forget any previously found property property null break If the marker exists log the exception and continue Otherwise just ignore the exception and keep going if marker exists Team Plugin log e catch Core Exception e If the resource exists log the exception and continue Otherwise just ignore the exception if resource exists e get Status get Code I Resource Status RESOURCE NOT FOUND Team Plugin log e return property  calculateProblemMarker ISynchronizeModelElement IResource getResource IMarker findMarkers IMarker getLogicalModelDepth IMarker getAttribute IMarker intValue IMarker SEVERITY_ERROR ISynchronizeModelElement PROPAGATED_ERROR_MARKER_PROPERTY intValue IMarker SEVERITY_WARNING ISynchronizeModelElement PROPAGATED_WARNING_MARKER_PROPERTY CoreException TeamPlugin CoreException getStatus getCode IResourceStatus RESOURCE_NOT_FOUND TeamPlugin
public void sync Info Set Reset Sync Info Set set I Progress Monitor monitor if disposed set remove Sync Set Changed Listener this else reset  syncInfoSetReset SyncInfoSet IProgressMonitor removeSyncSetChangedListener
public void sync Info Set Errors Sync Info Set set I Team Status errors I Progress Monitor monitor When errors occur we currently don t process them It may be possible to decorate elements in the model with errors but currently we prefer to let ignore and except another listener to display them  syncInfoSetErrors SyncInfoSet ITeamStatus IProgressMonitor
viewer get Control get Display sync Exec new Runnable public void run if viewer null viewer get Control is Disposed expanded Elements 0 Abstract Tree Viewer viewer get Visible Expanded Elements selected Elements 0 I Structured Selection viewer get Selection to Array  getControl getDisplay syncExec getControl isDisposed expandedElements AbstractTreeViewer getVisibleExpandedElements selectedElements IStructuredSelection getSelection toArray
protected void save Viewer State save visible expanded elements and selection if viewer null viewer get Control is Disposed viewer instanceof Abstract Tree Viewer final Object expanded Elements new Object 1 1 final Object selected Elements new Object 1 1 viewer get Control get Display sync Exec new Runnable public void run if viewer null viewer get Control is Disposed expanded Elements 0 Abstract Tree Viewer viewer get Visible Expanded Elements selected Elements 0 I Structured Selection viewer get Selection to Array Save expansion if expanded Elements 0 length 0 I Synchronize Page Configuration config get Configuration Array List saved Expansion State new Array List for int i 0 i expanded Elements 0 length i if expanded Elements 0 i instanceof I Synchronize Model Element I Resource resource I Synchronize Model Element expanded Elements 0 i get Resource if resource null saved Expansion State add resource get Full Path to String config set Property P VIEWER EXPANSION STATE saved Expansion State Save selection if selected Elements 0 length 0 I Synchronize Page Configuration config get Configuration Array List saved Selected State new Array List for int i 0 i selected Elements 0 length i if selected Elements 0 i instanceof I Synchronize Model Element I Resource resource I Synchronize Model Element selected Elements 0 i get Resource if resource null saved Selected State add resource get Full Path to String config set Property P VIEWER SELECTION STATE saved Selected State  saveViewerState getControl isDisposed AbstractTreeViewer expandedElements selectedElements getControl getDisplay syncExec getControl isDisposed expandedElements AbstractTreeViewer getVisibleExpandedElements selectedElements IStructuredSelection getSelection toArray expandedElements ISynchronizePageConfiguration getConfiguration ArrayList savedExpansionState ArrayList expandedElements expandedElements ISynchronizeModelElement IResource ISynchronizeModelElement expandedElements getResource savedExpansionState getFullPath toString setProperty P_VIEWER_EXPANSION_STATE savedExpansionState selectedElements ISynchronizePageConfiguration getConfiguration ArrayList savedSelectedState ArrayList selectedElements selectedElements ISynchronizeModelElement IResource ISynchronizeModelElement selectedElements getResource savedSelectedState getFullPath toString setProperty P_VIEWER_SELECTION_STATE savedSelectedState
async Exec new Runnable public void run Abstract Tree Viewer viewer set Expanded Elements expanded Elements to Array viewer set Selection new Structured Selection selected Elements  asyncExec AbstractTreeViewer setExpandedElements expandedElements toArray setSelection StructuredSelection selectedElements
protected void restore Viewer State restore expansion state and selection state if viewer null viewer get Control is Disposed viewer instanceof Abstract Tree Viewer List saved Expansion State List configuration get Property P VIEWER EXPANSION STATE List saved Selection State List configuration get Property P VIEWER SELECTION STATE I Container container Resources Plugin get Workspace get Root final Array List expanded Elements new Array List if saved Expansion State null for Iterator it saved Expansion State iterator it has Next String path String it next I Resource resource container find Member path true include phantoms I Synchronize Model Element element get Model Object resource if element null expanded Elements add element final Array List selected Elements new Array List if saved Selection State null for Iterator it saved Selection State iterator it has Next String path String it next I Resource resource container find Member path true include phantoms I Synchronize Model Element element get Model Object resource if element null selected Elements add element async Exec new Runnable public void run Abstract Tree Viewer viewer set Expanded Elements expanded Elements to Array viewer set Selection new Structured Selection selected Elements  restoreViewerState getControl isDisposed AbstractTreeViewer savedExpansionState getProperty P_VIEWER_EXPANSION_STATE savedSelectionState getProperty P_VIEWER_SELECTION_STATE IContainer ResourcesPlugin getWorkspace getRoot ArrayList expandedElements ArrayList savedExpansionState savedExpansionState hasNext IResource findMember ISynchronizeModelElement getModelObject expandedElements ArrayList selectedElements ArrayList savedSelectionState savedSelectionState hasNext IResource findMember ISynchronizeModelElement getModelObject selectedElements asyncExec AbstractTreeViewer setExpandedElements expandedElements toArray setSelection StructuredSelection selectedElements
see org eclipse team internal ui synchronize I Synchronize Model Provider save State public void save State save Viewer State  ISynchronizeModelProvider saveState saveState saveViewerState
Update the label of the given diff node Diff nodes are accumulated and updated in a single call param diff Node the diff node to be updated protected void queue For Label Update I Synchronize Model Element diff Node pending Label Updates add diff Node  diffNode queueForLabelUpdate ISynchronizeModelElement diffNode pendingLabelUpdates diffNode
private boolean can Update Viewer Structured Viewer viewer get Viewer if viewer null viewer get Control is Disposed return false Display display viewer get Control get Display if display null return false if display get Thread Thread current Thread return false return true  canUpdateViewer StructuredViewer getViewer getControl isDisposed getControl getDisplay getThread currentThread
Forces the viewer to update the labels for queued elemens whose label has changed during this round of changes This method should only be invoked in the UI thread protected void fire Pending Label Updates if can Update Viewer return try Object updates pending Label Updates to Array new Object pending Label Updates size update Labels updates finally pending Label Updates clear  firePendingLabelUpdates canUpdateViewer pendingLabelUpdates toArray pendingLabelUpdates updateLabels pendingLabelUpdates
private void update Labels Object elements if can Update Viewer Structured Viewer tree get Viewer tree update elements null  updateLabels canUpdateViewer StructuredViewer getViewer
Method invoked when a sync element is added or removed or its state changes This method can be invoked from the UI thread or a background thread param element synchronize element param clear code true code if the conflict bit of the element was cleared i e the element has been deleted protected void propogate Conflict State I Synchronize Model Element element boolean clear boolean is Conflict clear false is Conflicting element boolean was Conflict element get Property I Synchronize Model Element PROPAGATED CONFLICT PROPERTY Only propogate and update parent labels if the state of the element has changed if is Conflict was Conflict element set Property To Root I Synchronize Model Element PROPAGATED CONFLICT PROPERTY is Conflict update Parent Labels element  propogateConflictState ISynchronizeModelElement isConflict isConflicting wasConflict getProperty ISynchronizeModelElement PROPAGATED_CONFLICT_PROPERTY isConflict wasConflict setPropertyToRoot ISynchronizeModelElement PROPAGATED_CONFLICT_PROPERTY isConflict updateParentLabels
Calculate and propagate problem markers in the element model param element the ssynchronize element private void propagate Problem Markers I Synchronize Model Element element I Resource resource element get Resource if resource null String property calculate Problem Marker element If it doesn t have a direct change a parent might boolean recalculate Parent Decorations had Problem Property element property if recalculate Parent Decorations I Synchronize Model Element parent I Synchronize Model Element element get Parent if parent null propagate Problem Markers parent  propagateProblemMarkers ISynchronizeModelElement IResource getResource calculateProblemMarker recalculateParentDecorations hadProblemProperty recalculateParentDecorations ISynchronizeModelElement ISynchronizeModelElement getParent propagateProblemMarkers
error warning private boolean had Problem Property I Synchronize Model Element element String property boolean had Error element get Property I Synchronize Model Element PROPAGATED ERROR MARKER PROPERTY boolean had Warning element get Property I Synchronize Model Element PROPAGATED WARNING MARKER PROPERTY Force recalculation of parents of phantom resources I Resource resource element get Resource if resource null resource is Phantom return true if had Error if property I Synchronize Model Element PROPAGATED ERROR MARKER PROPERTY element set Property To Root I Synchronize Model Element PROPAGATED ERROR MARKER PROPERTY false if property null error warning element set Property To Root property true error none recalculate parents return true return false else if had Warning if property I Synchronize Model Element PROPAGATED WARNING MARKER PROPERTY element set Property To Root I Synchronize Model Element PROPAGATED WARNING MARKER PROPERTY false if property null warning error element set Property To Root property true return false warning none return true return false else if property I Synchronize Model Element PROPAGATED ERROR MARKER PROPERTY none error element set Property To Root property true return false else if property I Synchronize Model Element PROPAGATED WARNING MARKER PROPERTY none warning element set Property To Root property true return true return false  hadProblemProperty ISynchronizeModelElement hadError getProperty ISynchronizeModelElement PROPAGATED_ERROR_MARKER_PROPERTY hadWarning getProperty ISynchronizeModelElement PROPAGATED_WARNING_MARKER_PROPERTY IResource getResource isPhantom hadError ISynchronizeModelElement PROPAGATED_ERROR_MARKER_PROPERTY setPropertyToRoot ISynchronizeModelElement PROPAGATED_ERROR_MARKER_PROPERTY setPropertyToRoot hadWarning ISynchronizeModelElement PROPAGATED_WARNING_MARKER_PROPERTY setPropertyToRoot ISynchronizeModelElement PROPAGATED_WARNING_MARKER_PROPERTY setPropertyToRoot ISynchronizeModelElement PROPAGATED_ERROR_MARKER_PROPERTY setPropertyToRoot ISynchronizeModelElement PROPAGATED_WARNING_MARKER_PROPERTY setPropertyToRoot
private void update Parent Labels I Synchronize Model Element diff Node queue For Label Update diff Node while diff Node get Parent null diff Node I Synchronize Model Element diff Node get Parent queue For Label Update diff Node  updateParentLabels ISynchronizeModelElement diffNode queueForLabelUpdate diffNode diffNode getParent diffNode ISynchronizeModelElement diffNode getParent queueForLabelUpdate diffNode
public void resource Changed final I Resource Change Event event String marker Types get Marker Types Map changes new Hash Map Accumulate all distinct resources that have had problem marker changes for int idx 0 idx marker Types length idx I Marker Delta marker Deltas event find Marker Deltas marker Types idx true for int i 0 i marker Deltas length i I Marker Delta delta marker Deltas i I Resource resource delta get Resource if changes contains Key resource I Synchronize Model Element element get Closest Existing Parent delta get Resource if element null changes put resource element if changes is Empty start Marker Update Job I Synchronize Model Element changes values to Array new I Synchronize Model Element changes size  resourceChanged IResourceChangeEvent markerTypes getMarkerTypes HashMap markerTypes IMarkerDelta markerDeltas findMarkerDeltas markerTypes markerDeltas IMarkerDelta markerDeltas IResource getResource containsKey ISynchronizeModelElement getClosestExistingParent getResource isEmpty startMarkerUpdateJob ISynchronizeModelElement toArray ISynchronizeModelElement
Fire label changed async Exec new Runnable public void run fire Pending Label Updates  asyncExec firePendingLabelUpdates
Job job new Job Policy bind Synchronize Model Provider 0 NON NLS 1 protected I Status run I Progress Monitor monitor long start System current Time Millis synchronized this Changes contains all elements that need their labels updated for int i 0 i changes length i I Synchronize Model Element element changes i propagate Problem Markers element update Parent Labels element if DEBUG long time System current Time Millis start Date Format TIME FORMAT new Simple Date Format m ss SSS NON NLS 1 String took TIME FORMAT format new Date time System out println took for changes length files NON NLS 1 NON NLS 2 Fire label changed async Exec new Runnable public void run fire Pending Label Updates return Status OK STATUS  SynchronizeModelProvider IStatus IProgressMonitor currentTimeMillis ISynchronizeModelElement propagateProblemMarkers updateParentLabels currentTimeMillis DateFormat TIME_FORMAT SimpleDateFormat TIME_FORMAT asyncExec firePendingLabelUpdates OK_STATUS
Calculate the properties for affected resources in our model and fire label changes for changed elements This will happen in a background job param changes the model elements that have changed and need their labels updated Note that this will update the annotations on the label because the element will already have the correct image and text private void start Marker Update Job final I Synchronize Model Element changes Job job new Job Policy bind Synchronize Model Provider 0 NON NLS 1 protected I Status run I Progress Monitor monitor long start System current Time Millis synchronized this Changes contains all elements that need their labels updated for int i 0 i changes length i I Synchronize Model Element element changes i propagate Problem Markers element update Parent Labels element if DEBUG long time System current Time Millis start Date Format TIME FORMAT new Simple Date Format m ss SSS NON NLS 1 String took TIME FORMAT format new Date time System out println took for changes length files NON NLS 1 NON NLS 2 Fire label changed async Exec new Runnable public void run fire Pending Label Updates return Status OK STATUS job set System true job schedule  startMarkerUpdateJob ISynchronizeModelElement SynchronizeModelProvider IStatus IProgressMonitor currentTimeMillis ISynchronizeModelElement propagateProblemMarkers updateParentLabels currentTimeMillis DateFormat TIME_FORMAT SimpleDateFormat TIME_FORMAT asyncExec firePendingLabelUpdates OK_STATUS setSystem
protected I Synchronize Model Element get Closest Existing Parent I Resource resource I Synchronize Model Element element get Model Object resource if element null do resource resource get Parent element get Model Object resource while element null resource null return element  ISynchronizeModelElement getClosestExistingParent IResource ISynchronizeModelElement getModelObject getParent getModelObject
protected int get Logical Model Depth I Resource resource return I Resource DEPTH INFINITE  getLogicalModelDepth IResource IResource DEPTH_INFINITE
protected String get Marker Types return new String I Marker PROBLEM  getMarkerTypes IMarker
ctrl get Display async Exec new Runnable public void run if ctrl is Disposed Busy Indicator show While ctrl get Display r  getDisplay asyncExec isDisposed BusyIndicator showWhile getDisplay
private void async Exec final Runnable r Structured Viewer v get Viewer if v null return final Control ctrl v get Control if ctrl null ctrl is Disposed ctrl get Display async Exec new Runnable public void run if ctrl is Disposed Busy Indicator show While ctrl get Display r  asyncExec StructuredViewer getViewer getControl isDisposed getDisplay asyncExec isDisposed BusyIndicator showWhile getDisplay

Create a configuration for creating a page from the given particpant param participant the particpant whose page is being configured public Synchronize Page Configuration I Synchronize Participant participant this participant participant set Property P CONTEXT MENU DEFAULT CONTEXT MENU set Property P TOOLBAR MENU DEFAULT TOOLBAR MENU set Property P VIEW MENU DEFAULT VIEW MENU set Property P COMPARISON TYPE THREE WAY add Action Contribution new Default Synchronize Page Actions  SynchronizePageConfiguration ISynchronizeParticipant setProperty P_CONTEXT_MENU DEFAULT_CONTEXT_MENU setProperty P_TOOLBAR_MENU DEFAULT_TOOLBAR_MENU setProperty P_VIEW_MENU DEFAULT_VIEW_MENU setProperty P_COMPARISON_TYPE THREE_WAY addActionContribution DefaultSynchronizePageActions
see org eclipse team ui synchronize I Synchronize Page Configuration get Participant public I Synchronize Participant get Participant return participant  ISynchronizePageConfiguration getParticipant ISynchronizeParticipant getParticipant
see org eclipse team ui synchronize I Synchronize Page Configuration get Site public I Synchronize Page Site get Site return site  ISynchronizePageConfiguration getSite ISynchronizePageSite getSite
Set the site that is associated with the page that was configured using this configuration param site a synchronize page site public void set Site I Synchronize Page Site site this site site  setSite ISynchronizePageSite
public void add Property Change Listener I Property Change Listener listener synchronized property Change Listeners property Change Listeners add listener  addPropertyChangeListener IPropertyChangeListener propertyChangeListeners propertyChangeListeners
public void remove Property Change Listener I Property Change Listener listener synchronized property Change Listeners property Change Listeners remove listener  removePropertyChangeListener IPropertyChangeListener propertyChangeListeners propertyChangeListeners
public void set Property String key Object new Value Object old Value properties get key if page null page about To Change Property this key new Value properties put key new Value if old Value null old Value equals new Value fire Property Change key old Value new Value  setProperty newValue oldValue aboutToChangeProperty newValue newValue oldValue oldValue newValue firePropertyChange oldValue newValue
see org eclipse team ui synchronize I Synchronize Page Configuration get Property java lang String public Object get Property String key return properties get key  ISynchronizePageConfiguration getProperty getProperty
public void add Action Contribution Synchronize Page Action Group contribution synchronized action Contributions action Contributions add contribution if actions Initialized contribution initialize this  addActionContribution SynchronizePageActionGroup actionContributions actionContributions actionsInitialized
public void remove Action Contribution Synchronize Page Action Group contribution synchronized action Contributions action Contributions remove contribution  removeActionContribution SynchronizePageActionGroup actionContributions actionContributions
final I Property Change Listener listener I Property Change Listener listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Error is logged by platform  IPropertyChangeListener IPropertyChangeListener ISafeRunnable handleException
Error is logged by platform public void run throws Exception listener property Change event  propertyChange
private void fire Property Change String key Object old Value Object new Value Object listeners synchronized property Change Listeners listeners property Change Listeners get Listeners final Property Change Event event new Property Change Event this key old Value new Value for int i 0 i listeners length i final I Property Change Listener listener I Property Change Listener listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Error is logged by platform public void run throws Exception listener property Change event  firePropertyChange oldValue newValue propertyChangeListeners propertyChangeListeners getListeners PropertyChangeEvent PropertyChangeEvent oldValue newValue IPropertyChangeListener IPropertyChangeListener ISafeRunnable handleException propertyChange
final Synchronize Page Action Group contribution Synchronize Page Action Group listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Logged by Platform  SynchronizePageActionGroup SynchronizePageActionGroup ISafeRunnable handleException
Logged by Platform public void run throws Exception contribution initialize configuration 
public void initialize final I Synchronize Page Configuration configuration super initialize configuration actions Initialized true final Object listeners action Contributions get Listeners for int i 0 i listeners length i final Synchronize Page Action Group contribution Synchronize Page Action Group listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Logged by Platform public void run throws Exception contribution initialize configuration  ISynchronizePageConfiguration actionsInitialized actionContributions getListeners SynchronizePageActionGroup SynchronizePageActionGroup ISafeRunnable handleException
final Synchronize Page Action Group contribution Synchronize Page Action Group listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Logged by Platform  SynchronizePageActionGroup SynchronizePageActionGroup ISafeRunnable handleException
Logged by Platform public void run throws Exception contribution set Context context  setContext
public void set Context final Action Context context super set Context context final Object listeners action Contributions get Listeners for int i 0 i listeners length i final Synchronize Page Action Group contribution Synchronize Page Action Group listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Logged by Platform public void run throws Exception contribution set Context context  setContext ActionContext setContext actionContributions getListeners SynchronizePageActionGroup SynchronizePageActionGroup ISafeRunnable handleException setContext
final Synchronize Page Action Group contribution Synchronize Page Action Group listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Logged by Platform  SynchronizePageActionGroup SynchronizePageActionGroup ISafeRunnable handleException
Logged by Platform public void run throws Exception contribution fill Context Menu manager  fillContextMenu
Callback invoked from the advisor each time the context menu is about to be shown param manager the context menu manager public void fill Context Menu final I Menu Manager manager final Object listeners action Contributions get Listeners for int i 0 i listeners length i final Synchronize Page Action Group contribution Synchronize Page Action Group listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Logged by Platform public void run throws Exception contribution fill Context Menu manager  fillContextMenu IMenuManager actionContributions getListeners SynchronizePageActionGroup SynchronizePageActionGroup ISafeRunnable handleException fillContextMenu
final Synchronize Page Action Group contribution Synchronize Page Action Group listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Logged by Platform  SynchronizePageActionGroup SynchronizePageActionGroup ISafeRunnable handleException
Logged by Platform public void run throws Exception contribution fill Action Bars action Bars  fillActionBars actionBars
Callback invoked from the page to fil the action bars param action Bars the action bars of the view public void fill Action Bars final I Action Bars action Bars if actions Initialized initialize this final Object listeners action Contributions get Listeners for int i 0 i listeners length i final Synchronize Page Action Group contribution Synchronize Page Action Group listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Logged by Platform public void run throws Exception contribution fill Action Bars action Bars  actionBars fillActionBars IActionBars actionBars actionsInitialized actionContributions getListeners SynchronizePageActionGroup SynchronizePageActionGroup ISafeRunnable handleException fillActionBars actionBars
final Synchronize Page Action Group contribution Synchronize Page Action Group listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Logged by Platform  SynchronizePageActionGroup SynchronizePageActionGroup ISafeRunnable handleException
Logged by Platform public void run throws Exception contribution update Action Bars  updateActionBars
public void update Action Bars final Object listeners action Contributions get Listeners for int i 0 i listeners length i final Synchronize Page Action Group contribution Synchronize Page Action Group listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Logged by Platform public void run throws Exception contribution update Action Bars  updateActionBars actionContributions getListeners SynchronizePageActionGroup SynchronizePageActionGroup ISafeRunnable handleException updateActionBars
final Synchronize Page Action Group contribution Synchronize Page Action Group listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Logged by Platform  SynchronizePageActionGroup SynchronizePageActionGroup ISafeRunnable handleException
Logged by Platform public void run throws Exception contribution model Changed root  modelChanged
public void model Changed final I Synchronize Model Element root final Object listeners action Contributions get Listeners for int i 0 i listeners length i final Synchronize Page Action Group contribution Synchronize Page Action Group listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Logged by Platform public void run throws Exception contribution model Changed root  modelChanged ISynchronizeModelElement actionContributions getListeners SynchronizePageActionGroup SynchronizePageActionGroup ISafeRunnable handleException modelChanged
final Synchronize Page Action Group contribution Synchronize Page Action Group listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Logged by Platform  SynchronizePageActionGroup SynchronizePageActionGroup ISafeRunnable handleException
Logged by Platform public void run throws Exception contribution dispose 
public void dispose super dispose final Object listeners action Contributions get Listeners for int i 0 i listeners length i final Synchronize Page Action Group contribution Synchronize Page Action Group listeners i Platform run new I Safe Runnable public void handle Exception Throwable exception Logged by Platform public void run throws Exception contribution dispose  actionContributions getListeners SynchronizePageActionGroup SynchronizePageActionGroup ISafeRunnable handleException
see org eclipse team ui synchronize I Synchronize Page Configuration set Menu java lang String java lang String public void set Menu Groups String menu Property Id String groups set Property menu Property Id groups  ISynchronizePageConfiguration setMenu setMenuGroups menuPropertyId setProperty menuPropertyId
public void add Menu Group String menu Property Id String group Id String menu Groups String get Property menu Property Id if menu Groups null menu Groups get Default menu Property Id String new Groups new String menu Groups length 1 System arraycopy menu Groups 0 new Groups 0 menu Groups length new Groups menu Groups length group Id set Property menu Property Id new Groups  addMenuGroup menuPropertyId groupId menuGroups getProperty menuPropertyId menuGroups menuGroups getDefault menuPropertyId newGroups menuGroups menuGroups newGroups menuGroups newGroups menuGroups groupId setProperty menuPropertyId newGroups
public boolean has Menu Group String menu Property Id String group Id String groups String get Property menu Property Id if groups null groups get Default menu Property Id for int i 0 i groups length i String string groups i if string equals group Id return true return false  hasMenuGroup menuPropertyId groupId getProperty menuPropertyId getDefault menuPropertyId groupId
protected String get Default String menu Property Id if menu Property Id equals P CONTEXT MENU return DEFAULT CONTEXT MENU else if menu Property Id equals P VIEW MENU return DEFAULT VIEW MENU else if menu Property Id equals P TOOLBAR MENU return DEFAULT TOOLBAR MENU else return new String 0  getDefault menuPropertyId menuPropertyId P_CONTEXT_MENU DEFAULT_CONTEXT_MENU menuPropertyId P_VIEW_MENU DEFAULT_VIEW_MENU menuPropertyId P_TOOLBAR_MENU DEFAULT_TOOLBAR_MENU
public void add Label Decorator I Label Decorator decorator I Label Decorator decorators I Label Decorator get Property P LABEL DECORATORS if decorators null decorators new I Label Decorator 0 Ensure we don t have it registered already for int i 0 i decorators length i I Label Decorator d decorators i if d decorator return I Label Decorator new Decorators new I Label Decorator decorators length 1 System arraycopy decorators 0 new Decorators 0 decorators length new Decorators decorators length decorator set Property P LABEL DECORATORS new Decorators  addLabelDecorator ILabelDecorator ILabelDecorator ILabelDecorator getProperty P_LABEL_DECORATORS ILabelDecorator ILabelDecorator ILabelDecorator newDecorators ILabelDecorator newDecorators newDecorators setProperty P_LABEL_DECORATORS newDecorators
param group return public String get Group Id String group String id get Participant get Id if get Participant get Secondary Id null id NON NLS 1 id get Participant get Secondary Id return id group NON NLS 1  getGroupId getParticipant getId getParticipant getSecondaryId getParticipant getSecondaryId
public int get Mode Object o get Property P MODE if o instanceof Integer return Integer o int Value return 0  getMode getProperty P_MODE intValue
see org eclipse team ui synchronize subscribers I Subscriber Page Configuration set Mode int public void set Mode int mode set Property P MODE new Integer mode  ISubscriberPageConfiguration setMode setMode setProperty P_MODE
public int get Supported Modes Object o get Property P SUPPORTED MODES if o instanceof Integer return Integer o int Value return 0  getSupportedModes getProperty P_SUPPORTED_MODES intValue
see org eclipse team ui synchronize subscribers I Subscriber Page Configuration set Supported Modes int public void set Supported Modes int modes set Property P SUPPORTED MODES new Integer modes  ISubscriberPageConfiguration setSupportedModes setSupportedModes setProperty P_SUPPORTED_MODES
return Returns the page public I Synchronize Page get Page return page  ISynchronizePage getPage
param page The page to set public void set Page I Synchronize Page page this page page  setPage ISynchronizePage
return public int get Viewer Style Object o get Property P VIEWER STYLE if o instanceof Integer return Integer o int Value return 0  getViewerStyle getProperty P_VIEWER_STYLE intValue
param style public void set Viewer Style int style set Property P VIEWER STYLE new Integer style  setViewerStyle setProperty P_VIEWER_STYLE
public Sync Info Set get Sync Info Set Object o get Property P SYNC INFO SET if o instanceof Sync Info Set return Sync Info Set o return null  SyncInfoSet getSyncInfoSet getProperty P_SYNC_INFO_SET SyncInfoSet SyncInfoSet
see org eclipse team ui synchronize I Synchronize Page Configuration get Comparison Type public String get Comparison Type return String get Property P COMPARISON TYPE  ISynchronizePageConfiguration getComparisonType getComparisonType getProperty P_COMPARISON_TYPE
see org eclipse team ui synchronize I Synchronize Page Configuration set Comparison Type java lang String public void set Comparison Type String type set Property P COMPARISON TYPE type  ISynchronizePageConfiguration setComparisonType setComparisonType setProperty P_COMPARISON_TYPE
see org eclipse team ui synchronize I Synchronize Page Configuration set Runnable Context org eclipse jface operation I Runnable Context public void set Runnable Context I Runnable Context context this context context  ISynchronizePageConfiguration setRunnableContext IRunnableContext setRunnableContext IRunnableContext
see org eclipse team ui synchronize I Synchronize Page Configuration get Runnable Context public I Runnable Context get Runnable Context return context  ISynchronizePageConfiguration getRunnableContext IRunnableContext getRunnableContext

public void property Change Property Change Event event Object source event get Source if source instanceof I Synchronize Participant event get Property equals I Basic Property Constants P TEXT if source equals get Participant update Title  propertyChange PropertyChangeEvent getSource ISynchronizeParticipant getProperty IBasicPropertyConstants P_TEXT getParticipant updateTitle
see org eclipse ui I Part Listener part Closed org eclipse ui I Workbench Part public void part Closed I Workbench Part part super part Closed part  IPartListener partClosed IWorkbenchPart partClosed IWorkbenchPart partClosed
see org eclipse team ui sync I Synchronize View get Participant public I Synchronize Participant get Participant return active Participant Ref  ISynchronizeView getParticipant ISynchronizeParticipant getParticipant activeParticipantRef
protected void show Page Rec Page Rec page Rec super show Page Rec page Rec active Participant Ref I Synchronize Participant f Part To Participant get page Rec part update Action Enablements update Title  showPageRec PageRec pageRec showPageRec pageRec activeParticipantRef ISynchronizeParticipant fPartToParticipant pageRec updateActionEnablements updateTitle
protected void update Title I Synchronize Participant participant get Participant if participant null set Content Description NON NLS 1 else Synchronize View Workbench Part part Synchronize View Workbench Part f Participant To Part get participant set Content Description Utils shorten Text MAX NAME LENGTH part get Participant get Name NON NLS 1  updateTitle ISynchronizeParticipant getParticipant setContentDescription SynchronizeViewWorkbenchPart SynchronizeViewWorkbenchPart fParticipantToPart setContentDescription shortenText MAX_NAME_LENGTH getParticipant getName
protected void do Destroy Page I Workbench Part part Page Rec page Record I Page page page Record page page dispose page Record dispose Synchronize View Workbench Part sync Part Synchronize View Workbench Part part I Synchronize Participant participant sync Part get Participant clear Cross Reference Cache part participant  doDestroyPage IWorkbenchPart PageRec pageRecord IPage pageRecord pageRecord SynchronizeViewWorkbenchPart syncPart SynchronizeViewWorkbenchPart ISynchronizeParticipant syncPart getParticipant clearCrossReferenceCache
private void clear Cross Reference Cache I Workbench Part part I Synchronize Participant participant participant remove Property Change Listener this f Part To Participant remove part f Participant To Part remove participant  clearCrossReferenceCache IWorkbenchPart ISynchronizeParticipant removePropertyChangeListener fPartToParticipant fParticipantToPart
protected Page Rec do Create Page I Workbench Part dummy Part Synchronize View Workbench Part part Synchronize View Workbench Part dummy Part I Synchronize Participant participant part get Participant participant add Property Change Listener this I Synchronize Page Configuration configuration participant create Page Configuration I Page Book View Page page participant create Page configuration if page null init Page page init Page configuration page page create Control get Page Book Page Rec rec new Page Rec dummy Part page return rec return null  PageRec doCreatePage IWorkbenchPart dummyPart SynchronizeViewWorkbenchPart SynchronizeViewWorkbenchPart dummyPart ISynchronizeParticipant getParticipant addPropertyChangeListener ISynchronizePageConfiguration createPageConfiguration IPageBookViewPage createPage initPage initPage createControl getPageBook PageRec PageRec dummyPart
protected void init Page I Synchronize Page Configuration configuration I Page Book View Page page A page site does not provide everything the page may need Also provide the synchronize page site if the page is a synchronize view page Synchronize Page Configuration configuration set Site new Workbench Part Synchronize Page Site this page get Site get Dialog Settings configuration get Participant if page instanceof I Synchronize Page try I Synchronize Page page init configuration get Site catch Part Init Exception e TeamUI Plugin log I Status ERROR e get Message e page get Site get Action Bars set Global Action Handler Action Factory REFRESH get Id f Page Drop Down page get Site get Action Bars update Action Bars  initPage ISynchronizePageConfiguration IPageBookViewPage SynchronizePageConfiguration setSite WorkbenchPartSynchronizePageSite getSite getDialogSettings getParticipant ISynchronizePage ISynchronizePage getSite PartInitException TeamUIPlugin IStatus getMessage getSite getActionBars setGlobalActionHandler ActionFactory getId fPageDropDown getSite getActionBars updateActionBars
see org eclipse ui part Page Book View is Important org eclipse ui I Workbench Part protected boolean is Important I Workbench Part part return part instanceof Synchronize View Workbench Part  PageBookView isImportant IWorkbenchPart isImportant IWorkbenchPart SynchronizeViewWorkbenchPart
public void dispose super dispose TeamUI get Synchronize Manager remove Synchronize Participant Listener this if active Participant Ref null I Dialog Settings section get Dialog Settings section put KEY LAST ACTIVE PARTICIPANT active Participant Ref get Id f Participant To Part null f Part To Participant null  getSynchronizeManager removeSynchronizeParticipantListener activeParticipantRef IDialogSettings getDialogSettings KEY_LAST_ACTIVE_PARTICIPANT activeParticipantRef getId fParticipantToPart fPartToParticipant
protected I Page create Default Page Page Book book Page page new Message Page page create Control get Page Book init Page page return page  IPage createDefaultPage PageBook MessagePage createControl getPageBook initPage
public void participants Added final I Synchronize Participant participants for int i 0 i participants length i I Synchronize Participant participant participants i if is Available select TeamUI get Synchronize Manager get participant get Id participant get Secondary Id Synchronize View Workbench Part part new Synchronize View Workbench Part participant get Site f Participant To Part put participant part f Part To Participant put part participant  participantsAdded ISynchronizeParticipant ISynchronizeParticipant isAvailable getSynchronizeManager getId getSecondaryId SynchronizeViewWorkbenchPart SynchronizeViewWorkbenchPart getSite fParticipantToPart fPartToParticipant
Runnable r new Runnable public void run for int i 0 i participants length i I Synchronize Participant participant participants i if is Available Synchronize View Workbench Part part Synchronize View Workbench Part f Participant To Part get participant if part null part Closed part clear Cross Reference Cache part participant Remove any settings created for the participant remove Dialog Settings participant if get Participant null I Synchronize Participant Reference available TeamUI get Synchronize Manager get Synchronize Participants if available length 0 I Synchronize Participant p try p available available length 1 get Participant catch Team Exception e return display p  ISynchronizeParticipant isAvailable SynchronizeViewWorkbenchPart SynchronizeViewWorkbenchPart fParticipantToPart partClosed clearCrossReferenceCache removeDialogSettings getParticipant ISynchronizeParticipantReference getSynchronizeManager getSynchronizeParticipants ISynchronizeParticipant getParticipant TeamException
public void participants Removed final I Synchronize Participant participants if is Available Runnable r new Runnable public void run for int i 0 i participants length i I Synchronize Participant participant participants i if is Available Synchronize View Workbench Part part Synchronize View Workbench Part f Participant To Part get participant if part null part Closed part clear Cross Reference Cache part participant Remove any settings created for the participant remove Dialog Settings participant if get Participant null I Synchronize Participant Reference available TeamUI get Synchronize Manager get Synchronize Participants if available length 0 I Synchronize Participant p try p available available length 1 get Participant catch Team Exception e return display p async Exec r  participantsRemoved ISynchronizeParticipant isAvailable ISynchronizeParticipant isAvailable SynchronizeViewWorkbenchPart SynchronizeViewWorkbenchPart fParticipantToPart partClosed clearCrossReferenceCache removeDialogSettings getParticipant ISynchronizeParticipantReference getSynchronizeManager getSynchronizeParticipants ISynchronizeParticipant getParticipant TeamException asyncExec
Constructs a synchronize view public Synchronize View super f Participant To Part new Hash Map f Part To Participant new Hash Map update Title  SynchronizeView fParticipantToPart HashMap fPartToParticipant HashMap updateTitle
Create the default actions for the view These will be shown regardless of the participant being displayed protected void create Actions f Page Drop Down new Synchronize Page Drop Down Action this f Pin Action new Pin Participant Action f Remove Current Action new Remove Synchronize Participant Action this false f Remove All Action new Remove Synchronize Participant Action this true update Action Enablements  createActions fPageDropDown SynchronizePageDropDownAction fPinAction PinParticipantAction fRemoveCurrentAction RemoveSynchronizeParticipantAction fRemoveAllAction RemoveSynchronizeParticipantAction updateActionEnablements
private void update Action Enablements if f Pin Action null f Pin Action set Participant active Participant Ref if f Remove All Action null f Remove All Action set Enabled get Participant null if f Remove Current Action null f Remove Current Action set Enabled get Participant null  updateActionEnablements fPinAction fPinAction setParticipant activeParticipantRef fRemoveAllAction fRemoveAllAction setEnabled getParticipant fRemoveCurrentAction fRemoveCurrentAction setEnabled getParticipant
Add the actions to the toolbar param mgr toolbar manager protected void configure Tool Bar I Action Bars bars I Tool Bar Manager mgr bars get Tool Bar Manager mgr add f Page Drop Down mgr add f Pin Action I Menu Manager menu bars get Menu Manager menu add f Remove Current Action menu add f Remove All Action  configureToolBar IActionBars IToolBarManager getToolBarManager fPageDropDown fPinAction IMenuManager getMenuManager fRemoveCurrentAction fRemoveAllAction
public void display I Synchronize Participant participant Synchronize View Workbench Part part Synchronize View Workbench Part f Participant To Part get participant if part null part Activated part f Page Drop Down update  ISynchronizeParticipant SynchronizeViewWorkbenchPart SynchronizeViewWorkbenchPart fParticipantToPart partActivated fPageDropDown
see org eclipse ui part Page Book View get Bootstrap Part protected I Workbench Part get Bootstrap Part return null  PageBookView getBootstrapPart IWorkbenchPart getBootstrapPart
Registers the given runnable with the display associated with this view s control if any public void async Exec Runnable r if is Available get Page Book get Display async Exec r  asyncExec isAvailable getPageBook getDisplay asyncExec
Creates this view s underlying viewer and actions Hooks a pop up menu to the underlying viewer s control as well as a key listener When the delete key is pressed the code REMOVE ACTION code is invoked Hooks help to this view Subclasses must implement the following methods which are called in the following order when a view is created ul li code create Viewer Composite code the context menu is hooked to the viewer s control li li code create Actions code li li code configure Tool Bar I Tool Bar Manager code li li code get Help Context Id code li ul see I Workbench Part create Part Control Composite public void create Part Control Composite parent super create Part Control parent create Actions configure Tool Bar get View Site get Action Bars update For Existing Participants get View Site get Action Bars update Action Bars update Title I Workbench Site Progress Service progress I Workbench Site Progress Service get Site get Adapter I Workbench Site Progress Service class if progress null progress show Busy For Family I Synchronize Manager FAMILY SYNCHRONIZE OPERATION  REMOVE_ACTION createViewer createActions configureToolBar IToolBarManager getHelpContextId IWorkbenchPart createPartControl createPartControl createPartControl createActions configureToolBar getViewSite getActionBars updateForExistingParticipants getViewSite getActionBars updateActionBars updateTitle IWorkbenchSiteProgressService IWorkbenchSiteProgressService getSite getAdapter IWorkbenchSiteProgressService showBusyForFamily ISynchronizeManager FAMILY_SYNCHRONIZE_OPERATION
Initialize for existing participants private void update For Existing Participants I Synchronize Manager manager TeamUI get Synchronize Manager List participants Arrays as List get Participants boolean error Occurred false for int i 0 i participants size i try I Synchronize Participant Reference ref I Synchronize Participant Reference participants get i participants Added new I Synchronize Participant ref get Participant catch Team Exception e error Occurred true continue if error Occurred participants Arrays as List get Participants try decide which participant to showon startup if participants size 0 I Synchronize Participant Reference participant To Select I Synchronize Participant Reference participants get 0 I Dialog Settings section get Dialog Settings String selected Participant Id section get KEY LAST ACTIVE PARTICIPANT if selected Participant Id null I Synchronize Participant Reference selected Participant manager get selected Participant Id null if selected Participant null participant To Select selected Participant display participant To Select get Participant add as a listener to update when new participants are added manager add Synchronize Participant Listener this catch Team Exception e Utils handle e  updateForExistingParticipants ISynchronizeManager getSynchronizeManager asList getParticipants errorOccurred ISynchronizeParticipantReference ISynchronizeParticipantReference participantsAdded ISynchronizeParticipant getParticipant TeamException errorOccurred errorOccurred asList getParticipants ISynchronizeParticipantReference participantToSelect ISynchronizeParticipantReference IDialogSettings getDialogSettings selectedParticipantId KEY_LAST_ACTIVE_PARTICIPANT selectedParticipantId ISynchronizeParticipantReference selectedParticipant selectedParticipantId selectedParticipant participantToSelect selectedParticipant participantToSelect getParticipant addSynchronizeParticipantListener TeamException
private I Synchronize Participant Reference get Participants I Synchronize Manager manager TeamUI get Synchronize Manager create pages List participants new Array List I Synchronize Participant Reference refs manager get Synchronize Participants for int i 0 i refs length i I Synchronize Participant Reference ref refs i if select ref participants add ref return I Synchronize Participant Reference participants to Array new I Synchronize Participant Reference participants size  ISynchronizeParticipantReference getParticipants ISynchronizeManager getSynchronizeManager ArrayList ISynchronizeParticipantReference getSynchronizeParticipants ISynchronizeParticipantReference ISynchronizeParticipantReference toArray ISynchronizeParticipantReference
private boolean is Available return get Page Book null get Page Book is Disposed  isAvailable getPageBook getPageBook isDisposed
public I Page get Page I Synchronize Participant participant I Workbench Part part I Workbench Part f Participant To Part get participant if part null return null try return get Page Rec part page catch Null Pointer Exception e The Page Rec class is not visible so we can t do a null check before accessing the page return null  IPage getPage ISynchronizeParticipant IWorkbenchPart IWorkbenchPart fParticipantToPart getPageRec NullPointerException PageRec
protected boolean select I Synchronize Participant Reference ref return true  ISynchronizeParticipantReference
private I Dialog Settings get Dialog Settings I Dialog Settings workbench Settings TeamUI Plugin get Plugin get Dialog Settings I Dialog Settings sync View Settings workbench Settings get Section KEY SETTINGS SECTION NON NLS 1 if sync View Settings null sync View Settings workbench Settings add New Section KEY SETTINGS SECTION return sync View Settings  IDialogSettings getDialogSettings IDialogSettings workbenchSettings TeamUIPlugin getPlugin getDialogSettings IDialogSettings syncViewSettings workbenchSettings getSection KEY_SETTINGS_SECTION syncViewSettings syncViewSettings workbenchSettings addNewSection KEY_SETTINGS_SECTION syncViewSettings
private String get Settings Key I Synchronize Participant participant String id participant get Id String secondary Id participant get Secondary Id return secondary Id null id id secondary Id  getSettingsKey ISynchronizeParticipant getId secondaryId getSecondaryId secondaryId secondaryId
private I Dialog Settings get Dialog Settings I Synchronize Participant participant String key get Settings Key participant I Dialog Settings views Settings get Dialog Settings I Dialog Settings settings views Settings get Section key if settings null settings views Settings add New Section key return settings  IDialogSettings getDialogSettings ISynchronizeParticipant getSettingsKey IDialogSettings viewsSettings getDialogSettings IDialogSettings viewsSettings getSection viewsSettings addNewSection
private void remove Dialog Settings I Synchronize Participant participant String key get Settings Key participant I Dialog Settings settings get Dialog Settings if settings get Section key null There isn t an explicit remove so just make sure That the old settings are forgotten get Dialog Settings add Section new Dialog Settings key  removeDialogSettings ISynchronizeParticipant getSettingsKey IDialogSettings getDialogSettings getSection getDialogSettings addSection DialogSettings

see java lang Object equals java lang Object public boolean equals Object obj return obj instanceof Synchronize View Workbench Part participant equals Synchronize View Workbench Part participant get Participant  SynchronizeViewWorkbenchPart SynchronizeViewWorkbenchPart getParticipant
see java lang Object hash Code public int hash Code return participant hash Code  hashCode hashCode hashCode
Constructs a part for the given participant that binds to the given site public Synchronize View Workbench Part I Synchronize Participant participant I Workbench Part Site site this participant participant this site site  SynchronizeViewWorkbenchPart ISynchronizeParticipant IWorkbenchPartSite
see org eclipse ui I Workbench Part add Property Listener org eclipse ui I Property Listener public void add Property Listener I Property Listener listener  IWorkbenchPart addPropertyListener IPropertyListener addPropertyListener IPropertyListener
see org eclipse ui I Workbench Part create Part Control org eclipse swt widgets Composite public void create Part Control Composite parent  IWorkbenchPart createPartControl createPartControl
see org eclipse ui I Workbench Part dispose public void dispose  IWorkbenchPart
see org eclipse ui I Workbench Part get Site public I Workbench Part Site get Site return site  IWorkbenchPart getSite IWorkbenchPartSite getSite
see org eclipse ui I Workbench Part get Title public String get Title return NON NLS 1  IWorkbenchPart getTitle getTitle
see org eclipse ui I Workbench Part get Title Image public Image get Title Image return null  IWorkbenchPart getTitleImage getTitleImage
see org eclipse ui I Workbench Part get Title Tool Tip public String get Title Tool Tip return NON NLS 1  IWorkbenchPart getTitleToolTip getTitleToolTip
see org eclipse ui I Workbench Part remove Property Listener org eclipse ui I Property Listener public void remove Property Listener I Property Listener listener  IWorkbenchPart removePropertyListener IPropertyListener removePropertyListener IPropertyListener
see org eclipse ui I Workbench Part set Focus public void set Focus  IWorkbenchPart setFocus setFocus
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return null  IAdaptable getAdapter getAdapter
Returns the participant associated with this part return participant associated with this part public I Synchronize Participant get Participant return participant  ISynchronizeParticipant getParticipant

Construct a code Sync Info Model Element code for the given resource param set The set associated with the diff tree veiwer param resource The resource for the node public Sync Info Model Element I Diff Container parent Sync Info info super parent Assert is Not Null info this info info update state set Kind info get Kind local set Left create Local Type Element info remote set Right create Remote Type Element info base set Ancestor create Base Type Element info fire Change  SyncInfoModelElement SyncInfoModelElement IDiffContainer SyncInfo isNotNull setKind getKind setLeft createLocalTypeElement setRight createRemoteTypeElement setAncestor createBaseTypeElement fireChange
Update this element with a changed sync info The remote and base handles have to be updated with the new handles in the sync info param info the new sync info public void update Sync Info info this info info update state set Kind info get Kind Remote Remote Resource Typed Element right El Remote Resource Typed Element get Right I Resource Variant remote info get Remote if right El null remote null set Right create Remote Type Element info else if right El null if remote null set Right null else right El update remote Base Remote Resource Typed Element ancestor El Remote Resource Typed Element get Ancestor I Resource Variant base info get Base if ancestor El null base null set Ancestor create Base Type Element info else if ancestor El null if base null set Ancestor null else ancestor El update base fire Change  SyncInfo setKind getKind RemoteResourceTypedElement rightEl RemoteResourceTypedElement getRight IResourceVariant getRemote rightEl setRight createRemoteTypeElement rightEl setRight rightEl RemoteResourceTypedElement ancestorEl RemoteResourceTypedElement getAncestor IResourceVariant getBase ancestorEl setAncestor createBaseTypeElement ancestorEl setAncestor ancestorEl fireChange
public int get Kind Sync Info info get Sync Info if info null return info get Kind else return Sync Info IN SYNC  getKind SyncInfo getSyncInfo getKind SyncInfo IN_SYNC
We have to track the base because code Diff Node code doesn t provide a setter See https bugs eclipse org bugs show bug cgi id 52261 public void set Ancestor I Typed Element ancestor this ancestor ancestor  DiffNode show_bug setAncestor ITypedElement
see org eclipse compare structuremergeviewer Diff Node get Ancestor public I Typed Element get Ancestor return this ancestor  DiffNode getAncestor ITypedElement getAncestor
public String get Name I Resource resource get Resource if resource null return resource get Name else return super get Name  getName IResource getResource getName getName
public Object get Adapter Class adapter if adapter Sync Info class return get Sync Info return super get Adapter adapter  getAdapter SyncInfo getSyncInfo getAdapter
Helper method that returns the resource associated with this node A node is not required to have an associated local resource return the resource associated with this node or code null code if the local contributor is not a resource public I Resource get Resource return info get Local  IResource getResource getLocal
see java lang Object to String public String to String return get Resource get Full Path to String  toString toString getResource getFullPath toString
Cache the contents for the base and remote param monitor public void cache Contents I Progress Monitor monitor throws Team Exception I Typed Element base get Ancestor I Typed Element remote get Right int work Math min remote null 0 50 base null 0 50 10 monitor begin Task null work try if base null base instanceof Remote Resource Typed Element Remote Resource Typed Element base cache Contents Policy sub Monitor For monitor 50 if remote null remote instanceof Remote Resource Typed Element Remote Resource Typed Element remote cache Contents Policy sub Monitor For monitor 50 finally monitor done  cacheContents IProgressMonitor TeamException ITypedElement getAncestor ITypedElement getRight beginTask RemoteResourceTypedElement RemoteResourceTypedElement cacheContents subMonitorFor RemoteResourceTypedElement RemoteResourceTypedElement cacheContents subMonitorFor
public Sync Info get Sync Info return info  SyncInfo getSyncInfo
return new Local Resource Typed Element resource public boolean is Editable if resource exists Sync Info get Direction kind Sync Info OUTGOING Sync Info get Change kind Sync Info DELETION return false return super is Editable  LocalResourceTypedElement isEditable SyncInfo getDirection SyncInfo SyncInfo getChange SyncInfo isEditable
Create an I Typed Element for the given local resource The returned I Typed Element will prevent editing of outgoing deletions private static I Typed Element create Type Element final I Resource resource final int kind if resource null return new Local Resource Typed Element resource public boolean is Editable if resource exists Sync Info get Direction kind Sync Info OUTGOING Sync Info get Change kind Sync Info DELETION return false return super is Editable return null  ITypedElement ITypedElement ITypedElement createTypeElement IResource LocalResourceTypedElement isEditable SyncInfo getDirection SyncInfo SyncInfo getChange SyncInfo isEditable
Create an I Typed Element for the given remote resource The contents for the remote resource will be retrieved from the given I Storage which is a local cache used to buffer the remote contents protected static I Typed Element create Type Element I Resource Variant remote Resource return new Remote Resource Typed Element remote Resource  ITypedElement IStorage ITypedElement createTypeElement IResourceVariant remoteResource RemoteResourceTypedElement remoteResource
protected static I Typed Element create Remote Type Element Sync Info info if info null info get Remote null return create Type Element info get Remote return null  ITypedElement createRemoteTypeElement SyncInfo getRemote createTypeElement getRemote
protected static I Typed Element create Local Type Element Sync Info info if info null info get Local null return create Type Element info get Local info get Kind return null  ITypedElement createLocalTypeElement SyncInfo getLocal createTypeElement getLocal getKind
protected static I Typed Element create Base Type Element Sync Info info if info null info get Base null return create Type Element info get Base return null  ITypedElement createBaseTypeElement SyncInfo getBase createTypeElement getBase

private Direction Filter Action Group modes public void initialize I Synchronize Page Configuration configuration super initialize configuration if is Three Way modes new Direction Filter Action Group configuration  DirectionFilterActionGroup ISynchronizePageConfiguration isThreeWay DirectionFilterActionGroup
public void fill Action Bars I Action Bars action Bars super fill Action Bars action Bars if modes null return I Tool Bar Manager manager action Bars get Tool Bar Manager I Contribution Item group find Group manager I Synchronize Page Configuration MODE GROUP if manager null group null modes fill Tool Bar group get Id manager I Menu Manager view Menu action Bars get Menu Manager group find Group manager I Synchronize Page Configuration MODE GROUP if view Menu null group null I Contribution Item layout Group find Group manager I Synchronize Page Configuration LAYOUT GROUP if layout Group null Put the modes in the layout group to save space group layout Group Menu Manager modes Item new Menu Manager Policy bind action modes label NON NLS 1 view Menu append To Group group get Id modes Item modes fill Menu modes Item  fillActionBars IActionBars actionBars fillActionBars actionBars IToolBarManager actionBars getToolBarManager IContributionItem findGroup ISynchronizePageConfiguration MODE_GROUP fillToolBar getId IMenuManager viewMenu actionBars getMenuManager findGroup ISynchronizePageConfiguration MODE_GROUP viewMenu IContributionItem layoutGroup findGroup ISynchronizePageConfiguration LAYOUT_GROUP layoutGroup layoutGroup MenuManager modesItem MenuManager viewMenu appendToGroup getId modesItem fillMenu modesItem
private boolean is Three Way return I Synchronize Page Configuration THREE WAY equals configuration get Comparison Type  isThreeWay ISynchronizePageConfiguration THREE_WAY getComparisonType
Create a new instance of the page param configuration a synchronize page configuration protected Sync Info Set Synchronize Page I Synchronize Page Configuration configuration this configuration configuration configuration set Page this configuration add Action Contribution new Sync Info Set Actions  SyncInfoSetSynchronizePage ISynchronizePageConfiguration setPage addActionContribution SyncInfoSetActions
public void create Control Composite parent composite new Composite parent SWT NONE sc set Content composite Grid Layout grid Layout new Grid Layout grid Layout make Columns Equal Width false grid Layout margin Width 0 grid Layout margin Height 0 grid Layout vertical Spacing 0 composite set Layout grid Layout Grid Data data new Grid Data Grid Data FILL BOTH data grab Excess Vertical Space true composite set Layout Data data Create the changes section which in turn creates the changes viewer and its configuration this changes Section new Changes Section composite this configuration this changes Viewer create Changes Viewer changes Section get Composite changes Section set Viewer changes Viewer  createControl setContent GridLayout gridLayout GridLayout gridLayout makeColumnsEqualWidth gridLayout marginWidth gridLayout marginHeight gridLayout verticalSpacing setLayout gridLayout GridData GridData GridData FILL_BOTH grabExcessVerticalSpace setLayoutData changesSection ChangesSection changesViewer createChangesViewer changesSection getComposite changesSection setViewer changesViewer
protected Viewer create Changes Viewer Composite parent viewer Advisor new Tree Viewer Advisor parent configuration return viewer Advisor get Viewer  createChangesViewer viewerAdvisor TreeViewerAdvisor viewerAdvisor getViewer
public Structured Viewer Advisor get Viewer Advisor return viewer Advisor  StructuredViewerAdvisor getViewerAdvisor viewerAdvisor
see org eclipse ui part I Page get Control public Control get Control return composite  IPage getControl getControl
see org eclipse ui part I Page set Focus public void set Focus changes Section set Focus  IPage setFocus setFocus changesSection setFocus
public void init I Synchronize Page Site site this site site I Dialog Settings settings get Settings if settings null try int mode settings get Int I Synchronize Page Configuration P MODE if mode 0 configuration set Mode mode catch Number Format Exception e The mode settings does not exist Leave the mode as is assuming the participant initialized it to an appropriate value  ISynchronizePageSite IDialogSettings getSettings getInt ISynchronizePageConfiguration P_MODE setMode NumberFormatException
see org eclipse ui part I Page set Action Bars org eclipse ui I Action Bars public void set Action Bars I Action Bars action Bars Delegate menu creation to the advisor viewer Advisor set Action Bars action Bars  IPage setActionBars IActionBars setActionBars IActionBars actionBars viewerAdvisor setActionBars actionBars
public void dispose changes Section dispose composite dispose super dispose  changesSection
see org eclipse team ui synchronize I Synchronize Page get Viewer public Viewer get Viewer return changes Viewer  ISynchronizePage getViewer getViewer changesViewer
public boolean about To Change Property I Synchronize Page Configuration configuration String key Object new Value if key equals I Synchronize Page Configuration P MODE return internal Set Mode configuration get Mode Integer new Value int Value return true  aboutToChangeProperty ISynchronizePageConfiguration newValue ISynchronizePageConfiguration P_MODE internalSetMode getMode newValue intValue
private boolean internal Set Mode int old Mode int mode if old Mode mode return false update Mode mode I Dialog Settings settings get Settings if settings null settings put I Synchronize Page Configuration P MODE mode return true  internalSetMode oldMode oldMode updateMode IDialogSettings getSettings ISynchronizePageConfiguration P_MODE
return new I Show In Source public Show In Context get Show In Context Structured Viewer v Structured Viewer changes Viewer if v null return null I Selection s v get Selection if s instanceof I Structured Selection Object resources Utils get Resources I Structured Selection s to Array return new Show In Context null new Structured Selection resources return null  IShowInSource ShowInContext getShowInContext StructuredViewer StructuredViewer changesViewer ISelection getSelection IStructuredSelection getResources IStructuredSelection toArray ShowInContext StructuredSelection
if key I Show In Target List class return new I Show In Target List public String get Show In Target Ids return new String I Page Layout ID RES NAV  IShowInTargetList IShowInTargetList getShowInTargetIds IPageLayout ID_RES_NAV
public Object get Adapter Class key if key equals I Selection Provider class return changes Viewer if key I Show In Source class return new I Show In Source public Show In Context get Show In Context Structured Viewer v Structured Viewer changes Viewer if v null return null I Selection s v get Selection if s instanceof I Structured Selection Object resources Utils get Resources I Structured Selection s to Array return new Show In Context null new Structured Selection resources return null if key I Show In Target List class return new I Show In Target List public String get Show In Target Ids return new String I Page Layout ID RES NAV return null  getAdapter ISelectionProvider changesViewer IShowInSource IShowInSource ShowInContext getShowInContext StructuredViewer StructuredViewer changesViewer ISelection getSelection IStructuredSelection getResources IStructuredSelection toArray ShowInContext StructuredSelection IShowInTargetList IShowInTargetList getShowInTargetIds IPageLayout ID_RES_NAV
Return the page site that was assigned to this page return the page site that was assigned to this page public I Synchronize Page Site get Synchronize Page Site return site  ISynchronizePageSite getSynchronizePageSite
Return the synchronize page configuration that was used to create this page return Returns the configuration public I Synchronize Page Configuration get Configuration return configuration  ISynchronizePageConfiguration getConfiguration
Return the settings for the page from the configuration os code null code if settings can not be persisted for the page return the persisted page settings protected I Dialog Settings get Settings return configuration get Site get Page Settings  IDialogSettings getSettings getSite getPageSettings
Callback from the changes section that indicates that the user has chosen to reset the view contents after an error has occurred 
Change the mode to the given mode This method is invoked when the mode in the configuration is changed by a client param mode the mode to be used 

Method declared on I Perpsective Factory public void create Initial Layout I Page Layout layout define Actions layout define Layout layout  IPerpsectiveFactory createInitialLayout IPageLayout defineActions defineLayout
Defines the initial actions for a page public void define Actions I Page Layout layout Add new wizards layout add New Wizard Shortcut org eclipse ui wizards new project NON NLS 1 layout add New Wizard Shortcut org eclipse ui wizards new folder NON NLS 1 layout add New Wizard Shortcut org eclipse ui wizards new file NON NLS 1 Add show views layout add Show View Shortcut Synchronize View VIEW ID layout add Show View Shortcut I Page Layout ID RES NAV layout add Show View Shortcut I Page Layout ID OUTLINE layout add Show View Shortcut I Page Layout ID TASK LIST layout add Show View Shortcut I Page Layout ID PROBLEM VIEW Add action sets layout add Action Set org eclipse team ui action Set NON NLS 1 Add perspective short cuts layout add Perspective Shortcut org eclipse ui resource Perspective NON NLS 1  defineActions IPageLayout addNewWizardShortcut addNewWizardShortcut addNewWizardShortcut addShowViewShortcut SynchronizeView VIEW_ID addShowViewShortcut IPageLayout ID_RES_NAV addShowViewShortcut IPageLayout ID_OUTLINE addShowViewShortcut IPageLayout ID_TASK_LIST addShowViewShortcut IPageLayout ID_PROBLEM_VIEW addActionSet actionSet addPerspectiveShortcut resourcePerspective
Defines the initial layout for a page public void define Layout I Page Layout layout String editor Area layout get Editor Area I Folder Layout top layout create Folder top I Page Layout LEFT 0 25f editor Area NON NLS 1 top add View Synchronize View VIEW ID I Folder Layout top2 layout create Folder top2 I Page Layout BOTTOM 0 80f editor Area NON NLS 1 top2 add View I Page Layout ID TASK LIST top2 add View I Page Layout ID PROBLEM VIEW layout set Editor Area Visible true  defineLayout IPageLayout editorArea getEditorArea IFolderLayout createFolder IPageLayout editorArea addView SynchronizeView VIEW_ID IFolderLayout createFolder IPageLayout editorArea addView IPageLayout ID_TASK_LIST addView IPageLayout ID_PROBLEM_VIEW setEditorAreaVisible

collapse All new Action public void run if viewer null viewer get Control is Disposed viewer instanceof Abstract Tree Viewer return viewer get Control set Redraw false Abstract Tree Viewer viewer collapse To Level viewer get Input Tree Viewer ALL LEVELS viewer get Control set Redraw true  collapseAll getControl isDisposed AbstractTreeViewer getControl setRedraw AbstractTreeViewer collapseToLevel getInput TreeViewer ALL_LEVELS getControl setRedraw
class Navigation Action Group extends Synchronize Page Action Group public void initialize I Synchronize Page Configuration configuration super initialize configuration final Structured Viewer viewer get Viewer if viewer instanceof Abstract Tree Viewer expand All Action new Expand All Action Abstract Tree Viewer viewer Utils init Action expand All Action action expand All NON NLS 1 collapse All new Action public void run if viewer null viewer get Control is Disposed viewer instanceof Abstract Tree Viewer return viewer get Control set Redraw false Abstract Tree Viewer viewer collapse To Level viewer get Input Tree Viewer ALL LEVELS viewer get Control set Redraw true Utils init Action collapse All action collapse All NON NLS 1 I Synchronize Participant participant configuration get Participant I Synchronize Page Site site configuration get Site goto Next new Navigate Action site participant get Name configuration true next goto Previous new Navigate Action site participant get Name configuration false previous  NavigationActionGroup SynchronizePageActionGroup ISynchronizePageConfiguration StructuredViewer getViewer AbstractTreeViewer expandAllAction ExpandAllAction AbstractTreeViewer initAction expandAllAction expandAll collapseAll getControl isDisposed AbstractTreeViewer getControl setRedraw AbstractTreeViewer collapseToLevel getInput TreeViewer ALL_LEVELS getControl setRedraw initAction collapseAll collapseAll ISynchronizeParticipant getParticipant ISynchronizePageSite getSite gotoNext NavigateAction getName gotoPrevious NavigateAction getName
public void fill Context Menu I Menu Manager manager append To Group manager I Synchronize Page Configuration NAVIGATE GROUP expand All Action  fillContextMenu IMenuManager appendToGroup ISynchronizePageConfiguration NAVIGATE_GROUP expandAllAction
public void fill Action Bars I Action Bars action Bars I Tool Bar Manager manager action Bars get Tool Bar Manager append To Group manager I Synchronize Page Configuration NAVIGATE GROUP goto Next append To Group manager I Synchronize Page Configuration NAVIGATE GROUP goto Previous append To Group manager I Synchronize Page Configuration NAVIGATE GROUP collapse All  fillActionBars IActionBars actionBars IToolBarManager actionBars getToolBarManager appendToGroup ISynchronizePageConfiguration NAVIGATE_GROUP gotoNext appendToGroup ISynchronizePageConfiguration NAVIGATE_GROUP gotoPrevious appendToGroup ISynchronizePageConfiguration NAVIGATE_GROUP collapseAll
public interface I Tree Viewer Accessor public void create Children Tree Item item  ITreeViewerAccessor createChildren TreeItem
public interface I Tree Viewer Accessor public void create Children Tree Item item public void open Selection  ITreeViewerAccessor createChildren TreeItem openSelection
public static class Navigable Checkbox Tree Viewer extends Container Checked Tree Viewer implements I Tree Viewer Accessor public Navigable Checkbox Tree Viewer Composite parent int style super parent style  NavigableCheckboxTreeViewer ContainerCheckedTreeViewer ITreeViewerAccessor NavigableCheckboxTreeViewer
public void create Children Tree Item item super create Children item  createChildren TreeItem createChildren
public void open Selection fire Open new Open Event this get Selection  openSelection fireOpen OpenEvent getSelection
public static class Navigable Tree Viewer extends Tree Viewer implements I Tree Viewer Accessor public Navigable Tree Viewer Composite parent int style super parent style  NavigableTreeViewer TreeViewer ITreeViewerAccessor NavigableTreeViewer
public void create Children Tree Item item super create Children item  createChildren TreeItem createChildren
public void open Selection fire Open new Open Event this get Selection  openSelection fireOpen OpenEvent getSelection
public static Structured Viewer create Viewer Composite parent I Synchronize Page Configuration configuration int style Synchronize Page Configuration configuration get Viewer Style if style CHECKBOX 0 Navigable Checkbox Tree Viewer v new Tree Viewer Advisor Navigable Checkbox Tree Viewer parent SWT MULTI SWT H SCROLL SWT V SCROLL configuration get Site set Selection Provider v return v else Navigable Tree Viewer v new Tree Viewer Advisor Navigable Tree Viewer parent SWT MULTI SWT H SCROLL SWT V SCROLL configuration get Site set Selection Provider v return v  StructuredViewer createViewer ISynchronizePageConfiguration SynchronizePageConfiguration getViewerStyle NavigableCheckboxTreeViewer TreeViewerAdvisor NavigableCheckboxTreeViewer H_SCROLL V_SCROLL getSite setSelectionProvider NavigableTreeViewer TreeViewerAdvisor NavigableTreeViewer H_SCROLL V_SCROLL getSite setSelectionProvider
Create an advisor that will allow viewer contributions with the given code targetID code This advisor will provide a presentation model based on the given sync info set Note that it s important to call link dispose when finished with an advisor param targetID the targetID defined in the viewer contributions in a plugin xml file param site the workbench site with which to register the menu Id Can be code null code in which case a site will be found using the default workbench page param set the set of code Sync Info code objects that are to be shown to the user public Tree Viewer Advisor Composite parent I Synchronize Page Configuration configuration super configuration I Navigatable nav I Navigatable configuration get Property Synchronize Page Configuration P NAVIGATOR if nav null configuration set Property Synchronize Page Configuration P NAVIGATOR get Adapter I Navigatable class configuration add Action Contribution new Navigation Action Group Structured Viewer viewer Tree Viewer Advisor create Viewer parent configuration Grid Data data new Grid Data Grid Data FILL BOTH viewer get Control set Layout Data data initialize Viewer viewer  menuId SyncInfo TreeViewerAdvisor ISynchronizePageConfiguration INavigatable INavigatable getProperty SynchronizePageConfiguration P_NAVIGATOR setProperty SynchronizePageConfiguration P_NAVIGATOR getAdapter INavigatable addActionContribution NavigationActionGroup StructuredViewer TreeViewerAdvisor createViewer GridData GridData GridData FILL_BOTH getControl setLayoutData initializeViewer
Create the model manager to be used by this advisor param configuration protected Synchronize Model Manager create Model Manager I Synchronize Page Configuration configuration return new Hierarchical Model Manager configuration  SynchronizeModelManager createModelManager ISynchronizePageConfiguration HierarchicalModelManager
see org eclipse team ui synchronize viewers Structured Viewer Advisor navigate boolean public boolean navigate boolean next return Tree Viewer Advisor navigate Tree Viewer get Viewer next false false  StructuredViewerAdvisor TreeViewerAdvisor TreeViewer getViewer
see org eclipse team ui synchronize viewers Structured Viewer Advisor initialize Viewer org eclipse jface viewers Structured Viewer public boolean validate Viewer Structured Viewer viewer return viewer instanceof Abstract Tree Viewer  StructuredViewerAdvisor initializeViewer StructuredViewer validateViewer StructuredViewer AbstractTreeViewer
Handles a double click event from the viewer Expands or collapses a folder when double clicked param viewer the viewer param event the double click event protected boolean handle Double Click Structured Viewer viewer Double Click Event event if super handle Double Click viewer event return true I Structured Selection selection I Structured Selection event get Selection Object element selection get First Element Abstract Tree Viewer tree Viewer Abstract Tree Viewer get Viewer if element null if tree Viewer get Expanded State element tree Viewer collapse To Level element Abstract Tree Viewer ALL LEVELS else Tree Viewer Advisor navigate Tree Viewer get Viewer true next false no open true only expand return true  handleDoubleClick StructuredViewer DoubleClickEvent handleDoubleClick IStructuredSelection IStructuredSelection getSelection getFirstElement AbstractTreeViewer treeViewer AbstractTreeViewer getViewer treeViewer getExpandedState treeViewer collapseToLevel AbstractTreeViewer ALL_LEVELS TreeViewerAdvisor TreeViewer getViewer
super initialize Listeners viewer viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Status Line I Structured Selection event get Selection  initializeListeners addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateStatusLine IStructuredSelection getSelection
protected void initialize Listeners final Structured Viewer viewer super initialize Listeners viewer viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Status Line I Structured Selection event get Selection  initializeListeners StructuredViewer initializeListeners addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateStatusLine IStructuredSelection getSelection
private void update Status Line I Structured Selection selection I Workbench Site ws get Configuration get Site get Workbench Site if ws null ws instanceof I View Site String msg get Status Line Message selection I View Site ws get Action Bars get Status Line Manager set Message msg  updateStatusLine IStructuredSelection IWorkbenchSite getConfiguration getSite getWorkbenchSite IViewSite getStatusLineMessage IViewSite getActionBars getStatusLineManager setMessage
private String get Status Line Message I Structured Selection selection if selection size 1 Object first selection get First Element if first instanceof Sync Info Model Element Sync Info Model Element node Sync Info Model Element first I Resource resource node get Resource if resource null return node get Name else return resource get Full Path make Relative to String if selection size 1 return selection size Policy bind Synchronize View 13 NON NLS 1 return NON NLS 1  getStatusLineMessage IStructuredSelection getFirstElement SyncInfoModelElement SyncInfoModelElement SyncInfoModelElement IResource getResource getName getFullPath makeRelative toString SynchronizeView
private static Tree Item find Next Prev Tree Viewer viewer Tree Item item boolean next if item null viewer instanceof I Tree Viewer Accessor return null Tree Item children null I Tree Viewer Accessor tree Accessor I Tree Viewer Accessor viewer if next Tree Item parent item get Parent Item if parent null children parent get Items else children item get Parent get Items if children null children length 0 goto previous child int index 0 for index children length index if children index item break if index 0 item children index 1 while true tree Accessor create Children item int n item get Item Count if n 0 break item set Expanded true item item get Items n 1 previous return item go up return parent else item set Expanded true tree Accessor create Children item if item get Item Count 0 has children go down children item get Items return children 0 while item null children null Tree Item parent item get Parent Item if parent null children parent get Items else children item get Parent get Items if children null children length 0 goto next child int index 0 for index children length index if children index item break if index children length 1 next return children index 1 go up item parent return item  TreeItem findNextPrev TreeViewer TreeItem ITreeViewerAccessor TreeItem ITreeViewerAccessor treeAccessor ITreeViewerAccessor TreeItem getParentItem getItems getParent getItems treeAccessor createChildren getItemCount setExpanded getItems setExpanded treeAccessor createChildren getItemCount getItems TreeItem getParentItem getItems getParent getItems
private static void set Selection Tree Viewer viewer Tree Item ti boolean fire Open boolean expand Only if ti null Object data ti get Data if data null Fix for http dev eclipse org bugs show bug cgi id 20106 I Selection selection new Structured Selection data if expand Only viewer expand To Level data 0 else viewer set Selection selection true I Selection current Selection viewer get Selection if fire Open current Selection null selection equals current Selection if viewer instanceof I Tree Viewer Accessor I Tree Viewer Accessor viewer open Selection  setSelection TreeViewer TreeItem fireOpen expandOnly getData show_bug ISelection StructuredSelection expandOnly expandToLevel setSelection ISelection currentSelection getSelection fireOpen currentSelection currentSelection ITreeViewerAccessor ITreeViewerAccessor openSelection
Selects the next or previous node of the current selection If there is no current selection the first last node in the tree is selected Wraps around at end or beginning Clients may not override param next if code true code the next node is selected otherwise the previous node return code true code if at end or beginning public static boolean navigate Tree Viewer viewer boolean next boolean fire Open boolean expand Only Tree tree viewer get Tree if tree null return false Tree Item item null Tree Item children tree get Selection if children null children length 0 item children 0 if item null children tree get Items if children null children length 0 item children 0 if item null item get Item Count 0 set Selection viewer item fire Open expand Only Fix for http dev eclipse org bugs show bug cgi id 20106 return false while true item find Next Prev viewer item next if item null break if item get Item Count 0 break if item null set Selection viewer item fire Open expand Only Fix for http dev eclipse org bugs show bug cgi id 20106 return false return true  TreeViewer fireOpen expandOnly getTree TreeItem TreeItem getSelection getItems getItemCount setSelection fireOpen expandOnly show_bug findNextPrev getItemCount setSelection fireOpen expandOnly show_bug

private I Resource resource public Unchanged Resource Model Element I Diff Container parent I Resource resource super parent this resource resource  IResource UnchangedResourceModelElement IDiffContainer IResource
return Returns the resource public I Resource get Resource return resource  IResource getResource
see org eclipse compare structuremergeviewer Diff Node get Name public String get Name return resource get Name  DiffNode getName getName getName

see org eclipse ui actions Action Factory I Workbench Action dispose public void dispose  ActionFactory IWorkbenchAction

public Workbench Part Synchronize Page Site I Workbench Part part I Page Site site I Dialog Settings settings this part part this site site this settings settings  WorkbenchPartSynchronizePageSite IWorkbenchPart IPageSite IDialogSettings
see org eclipse team ui synchronize I Synchronize Page Site get Part public I Workbench Part get Part return part  ISynchronizePageSite getPart IWorkbenchPart getPart
see org eclipse team ui synchronize I Synchronize Page Site get Shell public Shell get Shell return part get Site get Shell  ISynchronizePageSite getShell getShell getSite getShell
see org eclipse team ui synchronize I Synchronize Page Site get Selection Provider public I Selection Provider get Selection Provider return site get Selection Provider  ISynchronizePageSite getSelectionProvider ISelectionProvider getSelectionProvider getSelectionProvider
see org eclipse team ui synchronize I Synchronize Page Site set Selection Provider org eclipse jface viewers I Selection Provider public void set Selection Provider I Selection Provider provider site set Selection Provider provider  ISynchronizePageSite setSelectionProvider ISelectionProvider setSelectionProvider ISelectionProvider setSelectionProvider
see org eclipse team ui synchronize I Synchronize Page Site get Workbench Site public I Workbench Site get Workbench Site return part get Site  ISynchronizePageSite getWorkbenchSite IWorkbenchSite getWorkbenchSite getSite
see org eclipse team ui synchronize I Synchronize Page Site get Key Binding Service public I Key Binding Service get Key Binding Service return part get Site get Key Binding Service  ISynchronizePageSite getKeyBindingService IKeyBindingService getKeyBindingService getSite getKeyBindingService
see org eclipse team ui synchronize I Synchronize Page Site set Focus public void set Focus part get Site get Page activate part  ISynchronizePageSite setFocus setFocus getSite getPage
see org eclipse team ui synchronize I Synchronize Page Site get Page Settings public I Dialog Settings get Page Settings return settings  ISynchronizePageSite getPageSettings IDialogSettings getPageSettings
see org eclipse team ui synchronize I Synchronize Page Site get Action Bars public I Action Bars get Action Bars return site get Action Bars  ISynchronizePageSite getActionBars IActionBars getActionBars getActionBars
see org eclipse team ui synchronize I Synchronize Page Site is Modal public boolean is Modal return false  ISynchronizePageSite isModal isModal

public Object get Adapter Object adaptable Object Class adapter Type if adaptable Object instanceof Diff Node adapter Type I Workbench Adapter class return diff Node Adapter return null  getAdapter adaptableObject adapterType adaptableObject DiffNode adapterType IWorkbenchAdapter diffNodeAdapter
see org eclipse core runtime I Adapter Factory get Adapter List public Class get Adapter List TODO Auto generated method stub return new Class I Workbench Adapter class  IAdapterFactory getAdapterList getAdapterList IWorkbenchAdapter

Get the singleton instance of this class return the singleton instance of this class since 3 0 public static Team Capability Helper get Instance if singleton null singleton new Team Capability Helper return singleton  TeamCapabilityHelper getInstance TeamCapabilityHelper
Create a new code IDE Workbench Activity Helper code which will listen for workspace changes and promote activities accordingly private Team Capability Helper provider Id To Plugin Id new Hash Map load Repository Provider Ids crawl the initial projects I Project projects Resources Plugin get Workspace get Root get Projects I Workbench Activity Support workbench Activity Support PlatformUI get Workbench get Activity Support for int i 0 i projects length i try process Project projects i workbench Activity Support catch Core Exception e do nothing  IDEWorkbenchActivityHelper TeamCapabilityHelper providerIdToPluginId HashMap loadRepositoryProviderIds IProject ResourcesPlugin getWorkspace getRoot getProjects IWorkbenchActivitySupport workbenchActivitySupport getWorkbench getActivitySupport processProject workbenchActivitySupport CoreException
provider Id To Plugin Id put id new I Plugin Contribution public String get Local Id return id  providerIdToPluginId IPluginContribution getLocalId
return id public String get Plugin Id return plugin Id  getPluginId pluginId
Loads the list of registered provider types public void load Repository Provider Ids provider Id To Plugin Id clear I Extension Point point Platform get Extension Registry get Extension Point org eclipse team core repository NON NLS 1 if point null I Extension extensions point get Extensions for int i 0 i extensions length i I Extension extension extensions i I Configuration Element elements extension get Configuration Elements for int j 0 j elements length j I Configuration Element element elements j final String plugin Id extension get Declaring Plugin Descriptor get Unique Identifier if element get Name equals Team Plugin REPOSITORY EXTENSION final String id element get Attribute id NON NLS 1 if id null bad extension point continue provider Id To Plugin Id put id new I Plugin Contribution public String get Local Id return id public String get Plugin Id return plugin Id  loadRepositoryProviderIds providerIdToPluginId IExtensionPoint getExtensionRegistry getExtensionPoint IExtension getExtensions IExtension IConfigurationElement getConfigurationElements IConfigurationElement pluginId getDeclaringPluginDescriptor getUniqueIdentifier getName TeamPlugin REPOSITORY_EXTENSION getAttribute providerIdToPluginId IPluginContribution getLocalId getPluginId pluginId
Handle natures for the given project param project the project param workbench Activity Support the activity support protected void process Project I Project project I Workbench Activity Support workbench Activity Support throws Core Exception if project is Open return I Activity Manager activity Manager workbench Activity Support get Activity Manager String id get Provider Id For project if id null return Set activities new Hash Set activity Manager get Enabled Activity Ids boolean changed false I Plugin Contribution contribution I Plugin Contribution provider Id To Plugin Id get id if contribution null return bad provider ID I Identifier identifier activity Manager get Identifier Workbench Activity Helper create Unified Id contribution if activities add All identifier get Activity Ids changed true if changed workbench Activity Support set Enabled Activity Ids activities  workbenchActivitySupport processProject IProject IWorkbenchActivitySupport workbenchActivitySupport CoreException isOpen IActivityManager activityManager workbenchActivitySupport getActivityManager getProviderIdFor HashSet activityManager getEnabledActivityIds IPluginContribution IPluginContribution providerIdToPluginId IIdentifier activityManager getIdentifier WorkbenchActivityHelper createUnifiedId addAll getActivityIds workbenchActivitySupport setEnabledActivityIds
Returns the provider id for this project or code null code if no providers are mapped to this project Note that this won t instantiate the provider but instead will simply query the persistent property param project the project to query return the provider id for this project or code null code if no providers are mapped to this project throws Core Exception public String get Provider Id For I Project project throws Core Exception String id null if project is Accessible First look for the session property Repository Provider provider Repository Provider project get Session Property PROVIDER PROP KEY if provider null id provider getID Next check if it has the ID as a persistent property id project get Persistent Property PROVIDER PROP KEY return id  CoreException getProviderIdFor IProject CoreException isAccessible RepositoryProvider RepositoryProvider getSessionProperty PROVIDER_PROP_KEY getPersistentProperty PROVIDER_PROP_KEY

Creates a new TeamUI Plugin param descriptor the plugin descriptor public TeamUI Plugin I Plugin Descriptor descriptor super descriptor initialize Images this initialize Preferences instance this  TeamUIPlugin TeamUIPlugin IPluginDescriptor initializeImages initializePreferences
Busy Indicator show While null new Runnable public void run try ret 0 element create Executable Extension class Attribute catch Core Exception e exc 0 e  BusyIndicator showWhile createExecutableExtension classAttribute CoreException
Creates an extension If the extension plugin has not been loaded a busy cursor will be activated during the duration of the load param element the config element defining the extension param class Attribute the name of the attribute carrying the class return the extension object public static Object create Extension final I Configuration Element element final String class Attribute throws Core Exception If plugin has been loaded create extension Otherwise show busy cursor then create extension I Plugin Descriptor plugin element get Declaring Extension get Declaring Plugin Descriptor if plugin is Plugin Activated return element create Executable Extension class Attribute else final Object ret new Object 1 final Core Exception exc new Core Exception 1 Busy Indicator show While null new Runnable public void run try ret 0 element create Executable Extension class Attribute catch Core Exception e exc 0 e if exc 0 null throw exc 0 else return ret 0  classAttribute createExtension IConfigurationElement classAttribute CoreException IPluginDescriptor getDeclaringExtension getDeclaringPluginDescriptor isPluginActivated createExecutableExtension classAttribute CoreException CoreException BusyIndicator showWhile createExecutableExtension classAttribute CoreException
Convenience method to get the currently active workbench page Note that the active page may not be the one that the usr perceives as active in some situations so this method of obtaining the activae page should only be used if no other method is available return the active workbench page public static I Workbench Page get Active Page I Workbench Window window get Plugin get Workbench get Active Workbench Window if window null return null return window get Active Page  IWorkbenchPage getActivePage IWorkbenchWindow getPlugin getWorkbench getActiveWorkbenchWindow getActivePage
Return the default instance of the receiver This represents the runtime plugin return the singleton plugin instance public static TeamUI Plugin get Plugin return instance  TeamUIPlugin getPlugin
Initializes the preferences for this plugin if necessary protected void initialize Preferences I Preference Store store get Preference Store store set Default I Preference Ids SYNCVIEW VIEW SYNCINFO IN LABEL false store set Default I Preference Ids SYNCVIEW COMPRESS FOLDERS true store set Default I Preference Ids SYNCVIEW DEFAULT PERSPECTIVE Team Synchronizing Perspective ID store set Default I Preference Ids SYNCHRONIZING DEFAULT PARTICIPANT Global Refresh Action NO DEFAULT PARTICPANT store set Default I Preference Ids SYNCHRONIZING DEFAULT PARTICIPANT SEC ID Global Refresh Action NO DEFAULT PARTICPANT store set Default I Preference Ids SYNCHRONIZING COMPLETE PERSPECTIVE Message Dialog With Toggle PROMPT store set Default I Preference Ids SYNCVIEW REMOVE FROM VIEW NO PROMPT false store set Default I Preference Ids PREF WORKSPACE FIRST TIME true  initializePreferences IPreferenceStore getPreferenceStore setDefault IPreferenceIds SYNCVIEW_VIEW_SYNCINFO_IN_LABEL setDefault IPreferenceIds SYNCVIEW_COMPRESS_FOLDERS setDefault IPreferenceIds SYNCVIEW_DEFAULT_PERSPECTIVE TeamSynchronizingPerspective setDefault IPreferenceIds SYNCHRONIZING_DEFAULT_PARTICIPANT GlobalRefreshAction NO_DEFAULT_PARTICPANT setDefault IPreferenceIds SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID GlobalRefreshAction NO_DEFAULT_PARTICPANT setDefault IPreferenceIds SYNCHRONIZING_COMPLETE_PERSPECTIVE MessageDialogWithToggle setDefault IPreferenceIds SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT setDefault IPreferenceIds PREF_WORKSPACE_FIRST_TIME
Convenience method for logging statuses to the plugin log param status the status to log public static void log I Status status get Plugin get Log log status  IStatus getPlugin getLog
Convenience method for logging a Team Exception in such a way that the stacktrace is logged as well param e public static void log Core Exception e I Status status e get Status log status get Severity status get Message e  TeamException CoreException IStatus getStatus getSeverity getMessage
Log the given exception along with the provided message and severity indicator public static void log int severity String message Throwable e log new Status severity ID 0 message e 
Job capability Initializer new Job NON NLS 1 protected I Status run I Progress Monitor monitor Team Capability Helper get Instance get Preference Store set Value I Preference Ids PREF WORKSPACE FIRST TIME false return Status OK STATUS  capabilityInitializer IStatus IProgressMonitor TeamCapabilityHelper getInstance getPreferenceStore setValue IPreferenceIds PREF_WORKSPACE_FIRST_TIME OK_STATUS
see Plugin startup public void startup throws Core Exception Policy localize org eclipse team internal ui messages NON NLS 1 initialize Preferences I Adapter Factory factory new Team Adapter Factory Platform get Adapter Manager register Adapters factory Diff Node class This is a backwards compatibility check to ensure that repository provider capability are enabled automatically if an old workspace is opened for the first time and contains projects shared with a disabled capability We defer the actual processing of the projects to another job since it is not critical to the startup of the team ui plugin I Preference Store store get Preference Store if store get Boolean I Preference Ids PREF WORKSPACE FIRST TIME Job capability Initializer new Job NON NLS 1 protected I Status run I Progress Monitor monitor Team Capability Helper get Instance get Preference Store set Value I Preference Ids PREF WORKSPACE FIRST TIME false return Status OK STATUS capability Initializer set System true capability Initializer set Priority Job DECORATE capability Initializer schedule 1000  CoreException initializePreferences IAdapterFactory TeamAdapterFactory getAdapterManager registerAdapters DiffNode IPreferenceStore getPreferenceStore getBoolean IPreferenceIds PREF_WORKSPACE_FIRST_TIME capabilityInitializer IStatus IProgressMonitor TeamCapabilityHelper getInstance getPreferenceStore setValue IPreferenceIds PREF_WORKSPACE_FIRST_TIME OK_STATUS capabilityInitializer setSystem capabilityInitializer setPriority capabilityInitializer
see org eclipse core runtime Plugin shutdown public void shutdown throws Core Exception super shutdown Synchronize Manager TeamUI get Synchronize Manager dispose  CoreException SynchronizeManager getSynchronizeManager
Register for changes made to Team properties public static void add Property Change Listener I Property Change Listener listener property Change Listeners add listener  addPropertyChangeListener IPropertyChangeListener propertyChangeListeners
Deregister as a Team property changes public static void remove Property Change Listener I Property Change Listener listener property Change Listeners remove listener  removePropertyChangeListener IPropertyChangeListener propertyChangeListeners
Broadcast a Team property change public static void broadcast Property Change Property Change Event event for Iterator it property Change Listeners iterator it has Next I Property Change Listener listener I Property Change Listener it next listener property Change event  broadcastPropertyChange PropertyChangeEvent propertyChangeListeners hasNext IPropertyChangeListener IPropertyChangeListener propertyChange
Creates an image and places it in the image registry param id the identifier for the image param baseURL the base URL for the image protected static void create Image Descriptor TeamUI Plugin plugin String id URL baseURL Delegate to the plugin instance to avoid concurrent class loading problems plugin private Create Image Descriptor id baseURL  createImageDescriptor TeamUIPlugin privateCreateImageDescriptor
private void private Create Image Descriptor String id URL baseURL URL url null try url new URL baseURL ICON PATH id catch MalformedURL Exception e Image Descriptor desc Image Descriptor create FromURL url image Descriptors put id desc  privateCreateImageDescriptor ICON_PATH MalformedURLException ImageDescriptor ImageDescriptor createFromURL imageDescriptors
Returns the image descriptor for the given image ID Returns null if there is no such image param id the identifier for the image to retrieve return the image associated with the given ID public static Image Descriptor get Image Descriptor String id Delegate to the plugin instance to avoid concurrent class loading problems return get Plugin private Get Image Descriptor id  ImageDescriptor getImageDescriptor getPlugin privateGetImageDescriptor
private Image Descriptor private Get Image Descriptor String id if image Descriptors contains Key id URL baseURL TeamUI Plugin get Plugin get Descriptor get InstallURL create Image Descriptor get Plugin id baseURL return Image Descriptor image Descriptors get id  ImageDescriptor privateGetImageDescriptor imageDescriptors containsKey TeamUIPlugin getPlugin getDescriptor getInstallURL createImageDescriptor getPlugin ImageDescriptor imageDescriptors
Convenience method to get an image descriptor for an extension param extension the extension declaring the image param subdirectory And Filename the path to the image return the image public static Image Descriptor get Image Descriptor From Extension I Extension extension String subdirectory And Filename I Plugin Descriptor plugin Descriptor extension get Declaring Plugin Descriptor URL path plugin Descriptor get InstallURL URL full Path String null try full Path String new URL path subdirectory And Filename return Image Descriptor create FromURL full Path String catch MalformedURL Exception e return null  subdirectoryAndFilename ImageDescriptor getImageDescriptorFromExtension IExtension subdirectoryAndFilename IPluginDescriptor pluginDescriptor getDeclaringPluginDescriptor pluginDescriptor getInstallURL fullPathString fullPathString subdirectoryAndFilename ImageDescriptor createFromURL fullPathString MalformedURLException
private void initialize Images TeamUI Plugin plugin URL baseURL plugin get Descriptor get InstallURL Overlays create Image Descriptor plugin I Shared Images IMG DIRTY OVR baseURL create Image Descriptor plugin I Shared Images IMG CONFLICT OVR baseURL create Image Descriptor plugin I Shared Images IMG CHECKEDIN OVR baseURL create Image Descriptor plugin I Shared Images IMG CHECKEDOUT OVR baseURL create Image Descriptor plugin I Shared Images IMG ERROR OVR baseURL create Image Descriptor plugin I Shared Images IMG WARNING OVR baseURL create Image Descriptor plugin I Shared Images IMG HOURGLASS OVR baseURL Target Management Icons create Image Descriptor plugin I TeamUI Images IMG SITE ELEMENT baseURL Sync View Icons create Image Descriptor plugin I TeamUI Images IMG DLG SYNC INCOMING baseURL create Image Descriptor plugin I TeamUI Images IMG DLG SYNC OUTGOING baseURL create Image Descriptor plugin I TeamUI Images IMG DLG SYNC CONFLICTING baseURL create Image Descriptor plugin I TeamUI Images IMG REFRESH baseURL create Image Descriptor plugin I TeamUI Images IMG CHANGE FILTER baseURL create Image Descriptor plugin I TeamUI Images IMG IGNORE WHITESPACE baseURL create Image Descriptor plugin I TeamUI Images IMG COLLAPSE ALL baseURL create Image Descriptor plugin I TeamUI Images IMG COLLAPSE ALL ENABLED baseURL create Image Descriptor plugin I TeamUI Images IMG DLG SYNC INCOMING DISABLED baseURL create Image Descriptor plugin I TeamUI Images IMG DLG SYNC OUTGOING DISABLED baseURL create Image Descriptor plugin I TeamUI Images IMG DLG SYNC CONFLICTING DISABLED baseURL create Image Descriptor plugin I TeamUI Images IMG REFRESH DISABLED baseURL create Image Descriptor plugin I TeamUI Images IMG IGNORE WHITESPACE DISABLED baseURL create Image Descriptor plugin I TeamUI Images IMG SYNC MODE CATCHUP baseURL create Image Descriptor plugin I TeamUI Images IMG SYNC MODE RELEASE baseURL create Image Descriptor plugin I TeamUI Images IMG SYNC MODE FREE baseURL create Image Descriptor plugin I TeamUI Images IMG SYNC MODE CATCHUP DISABLED baseURL create Image Descriptor plugin I TeamUI Images IMG SYNC MODE RELEASE DISABLED baseURL create Image Descriptor plugin I TeamUI Images IMG SYNC MODE FREE DISABLED baseURL create Image Descriptor plugin I TeamUI Images IMG SYNC MODE CATCHUP ENABLED baseURL create Image Descriptor plugin I TeamUI Images IMG SYNC MODE RELEASE ENABLED baseURL create Image Descriptor plugin I TeamUI Images IMG SYNC MODE FREE ENABLED baseURL Wizard banners create Image Descriptor plugin I TeamUI Images IMG PROJECTSET IMPORT BANNER baseURL create Image Descriptor plugin I TeamUI Images IMG PROJECTSET EXPORT BANNER baseURL create Image Descriptor plugin I TeamUI Images IMG WIZBAN SHARE baseURL Live Sync View icons create Image Descriptor plugin I TeamUI Images IMG COMPRESSED FOLDER baseURL create Image Descriptor plugin I TeamUI Images IMG SYNC VIEW baseURL create Image Descriptor plugin I TeamUI Images IMG HIERARCHICAL baseURL  initializeImages TeamUIPlugin getDescriptor getInstallURL createImageDescriptor ISharedImages IMG_DIRTY_OVR createImageDescriptor ISharedImages IMG_CONFLICT_OVR createImageDescriptor ISharedImages IMG_CHECKEDIN_OVR createImageDescriptor ISharedImages IMG_CHECKEDOUT_OVR createImageDescriptor ISharedImages IMG_ERROR_OVR createImageDescriptor ISharedImages IMG_WARNING_OVR createImageDescriptor ISharedImages IMG_HOURGLASS_OVR createImageDescriptor ITeamUIImages IMG_SITE_ELEMENT createImageDescriptor ITeamUIImages IMG_DLG_SYNC_INCOMING createImageDescriptor ITeamUIImages IMG_DLG_SYNC_OUTGOING createImageDescriptor ITeamUIImages IMG_DLG_SYNC_CONFLICTING createImageDescriptor ITeamUIImages IMG_REFRESH createImageDescriptor ITeamUIImages IMG_CHANGE_FILTER createImageDescriptor ITeamUIImages IMG_IGNORE_WHITESPACE createImageDescriptor ITeamUIImages IMG_COLLAPSE_ALL createImageDescriptor ITeamUIImages IMG_COLLAPSE_ALL_ENABLED createImageDescriptor ITeamUIImages IMG_DLG_SYNC_INCOMING_DISABLED createImageDescriptor ITeamUIImages IMG_DLG_SYNC_OUTGOING_DISABLED createImageDescriptor ITeamUIImages IMG_DLG_SYNC_CONFLICTING_DISABLED createImageDescriptor ITeamUIImages IMG_REFRESH_DISABLED createImageDescriptor ITeamUIImages IMG_IGNORE_WHITESPACE_DISABLED createImageDescriptor ITeamUIImages IMG_SYNC_MODE_CATCHUP createImageDescriptor ITeamUIImages IMG_SYNC_MODE_RELEASE createImageDescriptor ITeamUIImages IMG_SYNC_MODE_FREE createImageDescriptor ITeamUIImages IMG_SYNC_MODE_CATCHUP_DISABLED createImageDescriptor ITeamUIImages IMG_SYNC_MODE_RELEASE_DISABLED createImageDescriptor ITeamUIImages IMG_SYNC_MODE_FREE_DISABLED createImageDescriptor ITeamUIImages IMG_SYNC_MODE_CATCHUP_ENABLED createImageDescriptor ITeamUIImages IMG_SYNC_MODE_RELEASE_ENABLED createImageDescriptor ITeamUIImages IMG_SYNC_MODE_FREE_ENABLED createImageDescriptor ITeamUIImages IMG_PROJECTSET_IMPORT_BANNER createImageDescriptor ITeamUIImages IMG_PROJECTSET_EXPORT_BANNER createImageDescriptor ITeamUIImages IMG_WIZBAN_SHARE createImageDescriptor ITeamUIImages IMG_COMPRESSED_FOLDER createImageDescriptor ITeamUIImages IMG_SYNC_VIEW createImageDescriptor ITeamUIImages IMG_HIERARCHICAL
Returns the standard display to be used The method first checks if the thread calling this method has an associated display If so this display is returned Otherwise the method returns the default display public static Display get Standard Display Display display Display get Current if display null display Display get Default return display  getStandardDisplay getCurrent getDefault
public Image get Image String key Image image get Image Registry get key if image null Image Descriptor d get Image Descriptor key image d create Image get Image Registry put key image return image  getImage getImageRegistry ImageDescriptor getImageDescriptor createImage getImageRegistry
public static void run I Runnable With Progress runnable try PlatformUI get Workbench get Active Workbench Window run true true runnable catch Invocation Target Exception e Utils handle Error get Standard Display get Active Shell e null null catch Interrupted Exception e2 Nothing to be done  IRunnableWithProgress getWorkbench getActiveWorkbenchWindow InvocationTargetException handleError getStandardDisplay getActiveShell InterruptedException

Construct a new instance param shell The parent shell for this UI context public UI Project Set Serialization Context Shell shell String filename super filename Assert is Not Null shell this shell shell  UIProjectSetSerializationContext isNotNull
Answer the shell associated with this UI context return the shell not code null code public Object get Shell return shell  getShell
I Prompt Condition prompt new I Prompt Condition List resources Arrays as List projects public boolean needs Prompt I Resource resource return resources contains resource  IPromptCondition IPromptCondition asList needsPrompt IResource
return resources contains resource public String prompt Message I Resource resource return Policy bind UI Project Set Serialization Context 0 resource get Name NON NLS 1  promptMessage IResource UIProjectSetSerializationContext getName
Given an array of projects that currently exist in the workspace prompt the user to determine which of those projects should be overwritten p This default implementation prompts the user to determine which projects should be overwritten Subclasses may override this as appropriate param projects an array of projects currently existing in the workspace that are desired to be overwritten not code null code contains no code null code s return an array of zero or more projects that should be overwritten or code null code if the operation is to be canceled see org eclipse team core Project Set Serialization Context confirm Overwrite org eclipse core resources I Project public I Project confirm Overwrite final I Project projects throws Team Exception I Prompt Condition prompt new I Prompt Condition List resources Arrays as List projects public boolean needs Prompt I Resource resource return resources contains resource public String prompt Message I Resource resource return Policy bind UI Project Set Serialization Context 0 resource get Name NON NLS 1 Prompting Dialog dialog new Prompting Dialog Shell get Shell projects prompt Policy bind UI Project Set Serialization Context 1 NON NLS 1 I Resource resources To Overwrite try resources To Overwrite dialog prompt For Multiple catch Interrupted Exception e Return null indicating that the user canceled the operation return null I Project projects To Overwrite new I Project resources To Overwrite length System arraycopy resources To Overwrite 0 projects To Overwrite 0 resources To Overwrite length return projects To Overwrite  ProjectSetSerializationContext confirmOverwrite IProject IProject confirmOverwrite IProject TeamException IPromptCondition IPromptCondition asList needsPrompt IResource promptMessage IResource UIProjectSetSerializationContext getName PromptingDialog PromptingDialog getShell UIProjectSetSerializationContext IResource resourcesToOverwrite resourcesToOverwrite promptForMultiple InterruptedException IProject projectsToOverwrite IProject resourcesToOverwrite resourcesToOverwrite projectsToOverwrite resourcesToOverwrite projectsToOverwrite

Returns true is element Two is greater than element One This is the ordering method of the sort operation Each subclass overides this method with the particular implementation of the greater than concept for the objects being sorted  elementTwo elementOne
Sort the objects in sorted collection and return that collection private Object quick Sort Object sorted Collection int left int right int original Left left int original Right right Object mid sorted Collection left right 2 do while compare sorted Collection left mid left while compare mid sorted Collection right right if left right Object tmp sorted Collection left sorted Collection left sorted Collection right sorted Collection right tmp left right while left right if original Left right sorted Collection quick Sort sorted Collection original Left right if left original Right sorted Collection quick Sort sorted Collection left original Right return sorted Collection  quickSort sortedCollection originalLeft originalRight sortedCollection sortedCollection sortedCollection sortedCollection sortedCollection sortedCollection sortedCollection originalLeft sortedCollection quickSort sortedCollection originalLeft originalRight sortedCollection quickSort sortedCollection originalRight sortedCollection
Return a new sorted collection from this unsorted collection Sort using quick sort public Object sort Object un Sorted Collection int size un Sorted Collection length Object sorted Collection new Object size copy the array so can return a new sorted collection System arraycopy un Sorted Collection 0 sorted Collection 0 size if size 1 quick Sort sorted Collection 0 size 1 return sorted Collection  unSortedCollection unSortedCollection sortedCollection unSortedCollection sortedCollection quickSort sortedCollection sortedCollection
public static final Comparator resource Comparator new Comparator public boolean equals Object obj return false  resourceComparator
public int compare Object o1 Object o2 I Resource resource0 I Resource o1 I Resource resource1 I Resource o2 return resource0 get Full Path to String compare To resource1 get Full Path to String  IResource IResource IResource IResource getFullPath toString compareTo getFullPath toString
Shows the given errors to the user param Exception the exception containing the error param title the title of the error dialog param message the message for the error dialog param shell the shell to open the error dialog in public static void handle Error Shell shell Exception exception String title String message I Status status null boolean log false boolean dialog false Throwable t exception if exception instanceof Team Exception status Team Exception exception get Status log false dialog true else if exception instanceof Invocation Target Exception t Invocation Target Exception exception get Target Exception if t instanceof Team Exception status Team Exception t get Status log false dialog true else if t instanceof Core Exception status Core Exception t get Status log true dialog true else if t instanceof Interrupted Exception return else status new Status I Status ERROR TeamUI Plugin ID 1 Policy bind Team Action internal t NON NLS 1 log true dialog true if status null return if status isOK I Status to Show status if status is Multi Status I Status children status get Children if children length 1 to Show children 0 if title null title status get Message if message null message status get Message if dialog shell null Error Dialog open Error shell title message to Show if log shell null TeamUI Plugin log to Show get Severity message t  handleError IStatus TeamException TeamException getStatus InvocationTargetException InvocationTargetException getTargetException TeamException TeamException getStatus CoreException CoreException getStatus InterruptedException IStatus TeamUIPlugin TeamAction IStatus toShow isMultiStatus IStatus getChildren toShow getMessage getMessage ErrorDialog openError toShow TeamUIPlugin toShow getSeverity
public static void run With Progress Shell parent boolean cancelable final I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception boolean created Shell false try if parent null parent is Disposed Display display Display get Current if display null cannot provide progress not in UI thread runnable run new Null Progress Monitor return get the active shell or a suitable top level shell parent display get Active Shell if parent null parent new Shell display created Shell true pop up progress dialog after a short delay final Exception holder new Exception 1 Busy Indicator show While parent get Display new Runnable public void run try runnable run new Null Progress Monitor catch Invocation Target Exception e holder 0 e catch Interrupted Exception e holder 0 e if holder 0 null if holder 0 instanceof Invocation Target Exception throw Invocation Target Exception holder 0 else throw Interrupted Exception holder 0 new Timeout Progress Monitor Dialog parent TIMEOUT run true fork cancelable runnable finally if created Shell parent dispose  runWithProgress IRunnableWithProgress InvocationTargetException InterruptedException createdShell isDisposed getCurrent NullProgressMonitor getActiveShell createdShell BusyIndicator showWhile getDisplay NullProgressMonitor InvocationTargetException InterruptedException InvocationTargetException InvocationTargetException InterruptedException TimeoutProgressMonitorDialog createdShell
Creates a progress monitor and runs the specified runnable param parent the parent Shell for the dialog param cancelable if true the dialog will support cancelation param runnable the runnable exception Invocation Target Exception when an exception is thrown from the runnable exception Interrupted Exception when the progress monitor is cancelled public static void run With Progress Dialog Shell parent boolean cancelable final I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception new Progress Monitor Dialog parent run cancelable cancelable runnable  InvocationTargetException InterruptedException runWithProgressDialog IRunnableWithProgress InvocationTargetException InterruptedException ProgressMonitorDialog
public static Shell get Shell I Workbench Site site if site null Shell shell site get Shell if shell is Disposed return shell I Workbench workbench TeamUI Plugin get Plugin get Workbench if workbench null I Workbench Window window workbench get Active Workbench Window if window null return window get Shell Fallback to using the display Display display Display get Default if display is Disposed return null return new Shell display  getShell IWorkbenchSite getShell isDisposed IWorkbench TeamUIPlugin getPlugin getWorkbench IWorkbenchWindow getActiveWorkbenchWindow getShell getDefault isDisposed
TeamUI Plugin get Standard Display async Exec new Runnable public void run I Status error null Throwable t exception if t instanceof Invocation Target Exception t Invocation Target Exception t get Target Exception if t instanceof Core Exception error Core Exception t get Status else if t instanceof Team Exception error Team Exception t get Status else error new Status I Status ERROR TeamUI Plugin ID 1 Policy bind simple Internal t NON NLS 1 Shell shell new Shell Display get Default if error get Severity I Status INFO Message Dialog open Information shell Policy bind information error get Message NON NLS 1 else Error Dialog open Error shell Policy bind exception null error NON NLS 1 shell dispose Let s log non team exceptions if t instanceof Team Exception TeamUI Plugin log error get Severity error get Message t  TeamUIPlugin getStandardDisplay asyncExec IStatus InvocationTargetException InvocationTargetException getTargetException CoreException CoreException getStatus TeamException TeamException getStatus IStatus TeamUIPlugin simpleInternal getDefault getSeverity IStatus MessageDialog openInformation getMessage ErrorDialog openError TeamException TeamUIPlugin getSeverity getMessage
public static void handle final Throwable exception TeamUI Plugin get Standard Display async Exec new Runnable public void run I Status error null Throwable t exception if t instanceof Invocation Target Exception t Invocation Target Exception t get Target Exception if t instanceof Core Exception error Core Exception t get Status else if t instanceof Team Exception error Team Exception t get Status else error new Status I Status ERROR TeamUI Plugin ID 1 Policy bind simple Internal t NON NLS 1 Shell shell new Shell Display get Default if error get Severity I Status INFO Message Dialog open Information shell Policy bind information error get Message NON NLS 1 else Error Dialog open Error shell Policy bind exception null error NON NLS 1 shell dispose Let s log non team exceptions if t instanceof Team Exception TeamUI Plugin log error get Severity error get Message t  TeamUIPlugin getStandardDisplay asyncExec IStatus InvocationTargetException InvocationTargetException getTargetException CoreException CoreException getStatus TeamException TeamException getStatus IStatus TeamUIPlugin simpleInternal getDefault getSeverity IStatus MessageDialog openInformation getMessage ErrorDialog openError TeamException TeamUIPlugin getSeverity getMessage
public static Shell find Shell I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null return window get Shell Display display Display get Current if display null display Display get Default return display get Active Shell worst case just create our own return new Shell TeamUI Plugin get Standard Display  findShell IWorkbenchWindow getWorkbench getActiveWorkbenchWindow getShell getCurrent getDefault getActiveShell TeamUIPlugin getStandardDisplay
public static I Workbench Part Site find Site Control c while c null c is Disposed Object data c get Data if data instanceof I Workbench Part return I Workbench Part data get Site c c get Parent return null  IWorkbenchPartSite findSite isDisposed getData IWorkbenchPart IWorkbenchPart getSite getParent
public static I Workbench Part Site find Site I Workbench workbench TeamUI Plugin get Plugin get Workbench I Workbench Window window workbench get Active Workbench Window if window null I Workbench Page page window get Active Page if page null I Workbench Part part page get Active Part if part null return part get Site return null  IWorkbenchPartSite findSite IWorkbench TeamUIPlugin getPlugin getWorkbench IWorkbenchWindow getActiveWorkbenchWindow IWorkbenchPage getActivePage IWorkbenchPart getActivePart getSite
public static void init Action I Action a String prefix Utils init Action a prefix Policy bundle  initAction IAction initAction
public static void update Labels Sync Info sync Compare Configuration config final I Resource Variant remote sync get Remote final I Resource Variant base sync get Base String local Content Id sync get Local Content Identifier if local Content Id null config set Left Label Policy bind Sync Info Compare Input local Label Exists local Content Id NON NLS 1 else config set Left Label Policy bind Sync Info Compare Input local Label NON NLS 1 if remote null config set Right Label Policy bind Sync Info Compare Input remote Label Exists remote get Content Identifier NON NLS 1 else config set Right Label Policy bind Sync Info Compare Input remote Label NON NLS 1 if base null config set Ancestor Label Policy bind Sync Info Compare Input base Label Exists base get Content Identifier NON NLS 1 else config set Ancestor Label Policy bind Sync Info Compare Input base Label NON NLS 1  updateLabels SyncInfo CompareConfiguration IResourceVariant getRemote IResourceVariant getBase localContentId getLocalContentIdentifier localContentId setLeftLabel SyncInfoCompareInput localLabelExists localContentId setLeftLabel SyncInfoCompareInput localLabel setRightLabel SyncInfoCompareInput remoteLabelExists getContentIdentifier setRightLabel SyncInfoCompareInput remoteLabel setAncestorLabel SyncInfoCompareInput baseLabelExists getContentIdentifier setAncestorLabel SyncInfoCompareInput baseLabel
Initialize the given Action from a Resource Bundle public static void init Action I Action a String prefix Resource Bundle bundle String label Key label NON NLS 1 String tooltip Key tooltip NON NLS 1 String image Key image NON NLS 1 String description Key description NON NLS 1 if prefix null prefix length 0 label Key prefix label Key tooltip Key prefix tooltip Key image Key prefix image Key description Key prefix description Key String s Policy bind label Key bundle if s null a set Text s s Policy bind tooltip Key bundle if s null a set Tool Tip Text s s Policy bind description Key bundle if s null a set Description s String rel Path Policy bind image Key bundle if rel Path null rel Path equals image Key rel Path trim length 0 String c Path String d Path String e Path if rel Path index Of 0 NON NLS 1 String path rel Path substring 1 d Path d path e Path e path else d Path dlcl16 rel Path NON NLS 1 e Path elcl16 rel Path NON NLS 1 Image Descriptor id Team Images get Image Descriptor d Path if id null a set Disabled Image Descriptor id id TeamUI Plugin get Image Descriptor e Path if id null a set Image Descriptor id  ResourceBundle initAction IAction ResourceBundle labelKey tooltipKey imageKey descriptionKey labelKey labelKey tooltipKey tooltipKey imageKey imageKey descriptionKey descriptionKey labelKey setText tooltipKey setToolTipText descriptionKey setDescription relPath imageKey relPath relPath imageKey relPath cPath dPath ePath relPath indexOf relPath dPath ePath dPath relPath ePath relPath ImageDescriptor TeamImages getImageDescriptor dPath setDisabledImageDescriptor TeamUIPlugin getImageDescriptor ePath setImageDescriptor
public static String mode To String int mode switch mode case I Synchronize Page Configuration INCOMING MODE return Policy bind Utils 22 NON NLS 1 case I Synchronize Page Configuration OUTGOING MODE return Policy bind Utils 23 NON NLS 1 case I Synchronize Page Configuration BOTH MODE return Policy bind Utils 24 NON NLS 1 case I Synchronize Page Configuration CONFLICTING MODE return Policy bind Utils 25 NON NLS 1 return Policy bind Utils 26 NON NLS 1  modeToString ISynchronizePageConfiguration INCOMING_MODE ISynchronizePageConfiguration OUTGOING_MODE ISynchronizePageConfiguration BOTH_MODE ISynchronizePageConfiguration CONFLICTING_MODE
public static String working Set To String I Working Set set int max Length String text Policy bind Statistics Panel no Working Set NON NLS 1 if set null text set get Name if text length max Length text text substring 0 max Length 3 NON NLS 1 return text  workingSetToString IWorkingSet maxLength StatisticsPanel noWorkingSet getName maxLength maxLength
Returns the list of resources contained in the given elements param elements return the list of resources contained in the given elements public static I Resource get Resources Object elements List resources new Array List for int i 0 i elements length i Object element elements i I Resource resource null if element instanceof I Resource resource I Resource element else if element instanceof I Synchronize Model Element resource I Synchronize Model Element element get Resource else resource I Resource get Adapter element I Resource class if resource null resource get Type I Resource ROOT continue if resource null resources add resource return I Resource resources to Array new I Resource resources size  IResource getResources ArrayList IResource IResource IResource ISynchronizeModelElement ISynchronizeModelElement getResource IResource getAdapter IResource getType IResource IResource toArray IResource
public static Object get Adapter Object element Class adapter if element instanceof I Adaptable return I Adaptable element get Adapter adapter return null  getAdapter IAdaptable IAdaptable getAdapter
Return whether any sync nodes in the given selection or their descendants match the given filter param selection a selection param filter a sync info filter return whether any sync nodes in the given selection or their descendants match the given filter public static boolean has Matching Descendant I Structured Selection selection Fast Sync Info Filter filter for Iterator iter selection iterator iter has Next Object o iter next if o instanceof I Synchronize Model Element if has Matching Descendant I Synchronize Model Element o filter return true return false  hasMatchingDescendant IStructuredSelection FastSyncInfoFilter hasNext ISynchronizeModelElement hasMatchingDescendant ISynchronizeModelElement
private static boolean has Matching Descendant I Synchronize Model Element element Fast Sync Info Filter filter if element get Kind Sync Info IN SYNC element instanceof Sync Info Model Element Sync Info info Sync Info Model Element element get Sync Info if info null filter select info return true I Diff Element children element get Children for int i 0 i children length i I Diff Element child children i if child instanceof I Synchronize Model Element if has Matching Descendant I Synchronize Model Element child filter return true return false  hasMatchingDescendant ISynchronizeModelElement FastSyncInfoFilter getKind SyncInfo IN_SYNC SyncInfoModelElement SyncInfo SyncInfoModelElement getSyncInfo IDiffElement getChildren IDiffElement ISynchronizeModelElement hasMatchingDescendant ISynchronizeModelElement
This method returns all out of sync Sync Infos that are in the current selection return the list of selected sync infos public static I Diff Element get Diff Nodes Object selected Set result new Hash Set for int i 0 i selected length i Object object selected i if object instanceof I Diff Element collect All Nodes I Diff Element object result return I Diff Element result to Array new I Diff Element result size  SyncInfos IDiffElement getDiffNodes HashSet IDiffElement collectAllNodes IDiffElement IDiffElement toArray IDiffElement
private static void collect All Nodes I Diff Element element Set nodes if element get Kind Sync Info IN SYNC nodes add element if element instanceof I Diff Container I Diff Element children I Diff Container element get Children for int i 0 i children length i collect All Nodes children i nodes  collectAllNodes IDiffElement getKind SyncInfo IN_SYNC IDiffContainer IDiffElement IDiffContainer getChildren collectAllNodes
public static void schedule Job job I Workbench Site site if site null I Workbench Site Progress Service site Progress I Workbench Site Progress Service site get Adapter I Workbench Site Progress Service class if site Progress null site Progress schedule job 0 true use half busy cursor return job schedule  IWorkbenchSite IWorkbenchSiteProgressService siteProgress IWorkbenchSiteProgressService getAdapter IWorkbenchSiteProgressService siteProgress siteProgress
public static byte read Bytes Input Stream in Byte Array Output Stream bos new Byte Array Output Stream try while true int c in read if c 1 break bos write c catch IO Exception ex return null finally if in null try in close catch IO Exception x silently ignored try bos close catch IO Exception x silently ignored return bos to Byte Array  readBytes InputStream ByteArrayOutputStream ByteArrayOutputStream IOException IOException IOException toByteArray
public static boolean equal Object Object o1 Object o2 if o1 null o2 null return true if o1 null o2 null return false return o1 equals o2  equalObject
public static String get Key String id String secondary Id return secondary Id null id id secondary Id  getKey secondaryId secondaryId secondaryId
public static String strip Ampersand String string if string index Of 1 String Buffer buffer new String Buffer string char last x for int i string length 1 i 1 i char c string char At i if c buffer delete Char At i break return buffer to String return string  stripAmpersand indexOf StringBuffer StringBuffer charAt deleteCharAt toString
public static String convert Selection I Resource resources String Buffer buffer new String Buffer for int i 0 i resources length i I Resource resource resources i if i 0 buffer append NON NLS 1 buffer append resource get Full Path return buffer to String  convertSelection IResource StringBuffer StringBuffer IResource getFullPath toString
Shorten the given text code t code so that its length doesn t exceed the given width This implementation replaces characters in the center of the original string with an ellipsis public static String shorten Text int max Width String text Value int length text Value length if length max Width return text Value int ellipsis Width 3 int pivot length 2 int start pivot int end pivot 1 while start 0 end length String s1 text Value substring 0 start String s2 text Value substring end length int l1 s1 length int l2 s2 length if l1 ellipsis Width l2 max Width return s1 s2 NON NLS 1 start end return text Value  shortenText maxWidth textValue textValue maxWidth textValue ellipsisWidth textValue textValue ellipsisWidth maxWidth textValue
public static String get Type Name I Synchronize Participant participant I Synchronize Manager manager TeamUI get Synchronize Manager return manager get Participant Descriptor participant get Id get Name  getTypeName ISynchronizeParticipant ISynchronizeManager getSynchronizeManager getParticipantDescriptor getId getName

Creates a new instance of this class param name the name of the element public Configuration Wizard Element String name this name name  ConfigurationWizardElement
Create an the instance of the object described by the configuration element That is create the instance of the class the isv supplied in the extension point throws Core Exception if an error occurs creating the extension public Object create Executable Extension throws Core Exception return TeamUI Plugin create Extension configuration Element Configure Project Wizard ATT CLASS  CoreException createExecutableExtension CoreException TeamUIPlugin createExtension configurationElement ConfigureProjectWizard ATT_CLASS
public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return Platform get Adapter Manager get Adapter this adapter  getAdapter IWorkbenchAdapter getAdapterManager getAdapter
Returns the configuration element return the configuration element public I Configuration Element get Configuration Element return configuration Element  IConfigurationElement getConfigurationElement configurationElement
Returns the description parameter of this element return the description of this elemnet public String get Description return description  getDescription
Returns the image for the given element param element the element to get the image for return the image for the given element public Image Descriptor get Image Descriptor Object element return image Descriptor  ImageDescriptor getImageDescriptor imageDescriptor
Returns the label for the given element param element the element to get the label for return the label for the given element public String get Label Object element return name  getLabel
Returns the id as specified in the extension return java lang String public String getID return id 
Returns the image for this element return the image for this element public Image Descriptor get Image Descriptor return image Descriptor  ImageDescriptor getImageDescriptor imageDescriptor
Set the configuration element param new Configuration Element the new configuration element public void set Configuration Element I Configuration Element new Configuration Element configuration Element new Configuration Element  newConfigurationElement setConfigurationElement IConfigurationElement newConfigurationElement configurationElement newConfigurationElement
Set the description parameter of this element param value the new desrciption public void set Description String value description value  setDescription
Sets the id parameter of this element param value the new ID public void setID String value id value 
Sets the image for this element param value the new image public void set Image Descriptor Image Descriptor value image Descriptor value  setImageDescriptor ImageDescriptor imageDescriptor
see org eclipse ui I Plugin Contribution get Local Id public String get Local Id return configuration Element get Attribute Configure Project Wizard ATT ID  IPluginContribution getLocalId getLocalId configurationElement getAttribute ConfigureProjectWizard ATT_ID
see org eclipse ui I Plugin Contribution get Plugin Id public String get Plugin Id return configuration Element get Declaring Extension get Declaring Plugin Descriptor get Unique Identifier  IPluginContribution getPluginId getPluginId configurationElement getDeclaringExtension getDeclaringPluginDescriptor getUniqueIdentifier

Create a new Configuration Wizard Node param element the configuration wizard element for this node public Configuration Wizard Node Configuration Wizard Element element this element element  ConfigurationWizardNode ConfigurationWizardNode ConfigurationWizardElement
public void dispose if wizard null wizard dispose wizard null 
Method declared on I Wizard Node public Point get Extent return new Point 1 1  IWizardNode getExtent
public I Wizard get Wizard if wizard null try wizard I Wizard element create Executable Extension catch Core Exception e System out println Policy bind Configuration Wizard exception Creating Wizard NON NLS 1 return wizard  IWizard getWizard IWizard createExecutableExtension CoreException ConfigurationWizard exceptionCreatingWizard
Method declared on I Wizard Node public boolean is Content Created return wizard null  IWizardNode isContentCreated

protected final static String ATT ID id NON NLS 1 public Configure Project Wizard set Needs Progress Monitor true set Window Title get Wizard Window Title NON NLS 1  ATT_ID ConfigureProjectWizard setNeedsProgressMonitor setWindowTitle getWizardWindowTitle
protected String get Extension Point return PT CONFIGURATION  getExtensionPoint PT_CONFIGURATION
protected String get Wizard Window Title return Policy bind Configure Project Wizard title NON NLS 1  getWizardWindowTitle ConfigureProjectWizard
protected String get Wizard Label return Policy bind Configure Project Wizard configure Project NON NLS 1  getWizardLabel ConfigureProjectWizard configureProject
protected String get Wizard Description return Policy bind Configure Project Wizard description NON NLS 1  getWizardDescription ConfigureProjectWizard
public void add Pages Adaptable List disabled Wizards new Adaptable List Adaptable List wizards get Available Wizards disabled Wizards if wizards size 1 disabled Wizards size 0 If there is only one wizard skip the first page Only skip the first page if the one wizard has at least one page Configuration Wizard Element element Configuration Wizard Element wizards get Children 0 try this wizard I Configuration Wizard element create Executable Extension wizard init workbench project wizard add Pages if wizard get Page Count 0 wizard set Container get Container I Wizard Page pages wizard get Pages for int i 0 i pages length i add Page pages i return catch Core Exception e TeamUI Plugin log e return main Page new Configure Project Wizard Main Page configure Page1 get Wizard Label TeamUI Plugin get Image Descriptor I TeamUI Images IMG WIZBAN SHARE wizards disabled Wizards NON NLS 1 main Page set Description get Wizard Description main Page set Project project main Page set Workbench workbench add Page main Page  addPages AdaptableList disabledWizards AdaptableList AdaptableList getAvailableWizards disabledWizards disabledWizards ConfigurationWizardElement ConfigurationWizardElement getChildren IConfigurationWizard createExecutableExtension addPages getPageCount setContainer getContainer IWizardPage getPages addPage CoreException TeamUIPlugin mainPage ConfigureProjectWizardMainPage configurePage1 getWizardLabel TeamUIPlugin getImageDescriptor ITeamUIImages IMG_WIZBAN_SHARE disabledWizards mainPage setDescription getWizardDescription mainPage setProject mainPage setWorkbench addPage mainPage
public I Wizard Page get Next Page I Wizard Page page if wizard null return wizard get Next Page page return super get Next Page page  IWizardPage getNextPage IWizardPage getNextPage getNextPage
public boolean can Finish If we are on the first page never allow finish unless the selected wizard has no pages if get Container get Current Page main Page if main Page get Selected Wizard null main Page get Next Page null return true return false if wizard null return wizard can Finish return super can Finish  canFinish getContainer getCurrentPage mainPage mainPage getSelectedWizard mainPage getNextPage canFinish canFinish
public boolean perform Finish There is only one wizard with at least one page if wizard null return wizard perform Finish If we are on the first page and the selected wizard has no pages then allow it to finish if get Container get Current Page main Page I Configuration Wizard no Page Wizard main Page get Selected Wizard if no Page Wizard null if no Page Wizard can Finish return no Page Wizard perform Finish If the wizard has pages and there are several wizards registered then the registered wizard will call it s own perform Finish return true  performFinish performFinish getContainer getCurrentPage mainPage IConfigurationWizard noPageWizard mainPage getSelectedWizard noPageWizard noPageWizard canFinish noPageWizard performFinish performFinish
public boolean perform Cancel if wizard null return wizard perform Cancel return super perform Cancel  performCancel performCancel performCancel
Returns the configuration wizards that are available for invocation return the available wizards protected Adaptable List get Available Wizards Adaptable List disabled Wizards Adaptable List result new Adaptable List I Plugin Registry registry Platform get Plugin Registry I Extension Point point registry get Extension Point plugin Id get Extension Point if point null I Extension extensions point get Extensions for int i 0 i extensions length i I Configuration Element elements extensions i get Configuration Elements for int j 0 j elements length j I Configuration Element element elements j if element get Name equals TAG WIZARD Configuration Wizard Element wizard create Wizard Element element if wizard null filter Item element disabled Wizards add wizard else if wizard null result add wizard return result  AdaptableList getAvailableWizards AdaptableList disabledWizards AdaptableList AdaptableList IPluginRegistry getPluginRegistry IExtensionPoint getExtensionPoint pluginId getExtensionPoint IExtension getExtensions IConfigurationElement getConfigurationElements IConfigurationElement getName TAG_WIZARD ConfigurationWizardElement createWizardElement filterItem disabledWizards
private boolean filter Item I Configuration Element element String extension Id element get Attribute ATT ID String extension Plugin Id element get Declaring Extension get Declaring Plugin Descriptor get Unique Identifier I Activity Manager activity Mgr PlatformUI get Workbench get Activity Support get Activity Manager I Identifier id activity Mgr get Identifier extension Plugin Id extension Id NON NLS 1 return id is Enabled  filterItem IConfigurationElement extensionId getAttribute ATT_ID extensionPluginId getDeclaringExtension getDeclaringPluginDescriptor getUniqueIdentifier IActivityManager activityMgr getWorkbench getActivitySupport getActivityManager IIdentifier activityMgr getIdentifier extensionPluginId extensionId isEnabled
Returns a new Configuration Wizard Element configured according to the parameters contained in the passed Registry May answer null if there was not enough information in the Extension to create an adequate wizard param element the element for which to create a wizard element return the wizard element for the given element protected Configuration Wizard Element create Wizard Element I Configuration Element element Wizard Elements must have a name attribute String name String element get Attribute ATT NAME if name String null Missing attribute return null Configuration Wizard Element result new Configuration Wizard Element name String if initialize Wizard result element initialization was successful return result return null  ConfigurationWizardElement ConfigurationWizardElement createWizardElement IConfigurationElement WizardElements nameString getAttribute ATT_NAME nameString ConfigurationWizardElement ConfigurationWizardElement nameString initializeWizard
Initialize the passed element s properties based on the contents of the passed registry Answer a boolean indicating whether the element was able to be adequately initialized param element the element to initialize the properties for param extension the registry to get properties from return whether initialization was successful protected boolean initialize Wizard Configuration Wizard Element element I Configuration Element config element setID config get Attribute ATT ID String description NON NLS 1 I Configuration Element children config get Children TAG DESCRIPTION if children length 1 description children 0 get Value element set Description description apply CLASS and ICON properties element set Configuration Element config String icon Name config get Attribute ATT ICON if icon Name null I Extension extension config get Declaring Extension element set Image Descriptor TeamUI Plugin get Image Descriptor From Extension extension icon Name ensure that a class was specified if element get Configuration Element null Missing attribute return false set Force Previous And Next Buttons true return true  initializeWizard ConfigurationWizardElement IConfigurationElement getAttribute ATT_ID IConfigurationElement getChildren TAG_DESCRIPTION getValue setDescription setConfigurationElement iconName getAttribute ATT_ICON iconName IExtension getDeclaringExtension setImageDescriptor TeamUIPlugin getImageDescriptorFromExtension iconName getConfigurationElement setForcePreviousAndNextButtons
Method declared on I Configuration Wizard public void init I Workbench workbench I Project project this workbench workbench this project project  IConfigurationWizard IWorkbench IProject

Create a new Configure Project Wizard Main Page param page Name the name of the page param title the title of the page param title Image the image for the page title param wizards the wizards to populate the table with public Configure Project Wizard Main Page String page Name String title Image Descriptor title Image Adaptable List wizards Adaptable List disabled Wizards this page Name title title Image wizards disabled Wizards Policy bind Configure Project Wizard Main Page select Repository NON NLS 1  ConfigureProjectWizardMainPage pageName titleImage ConfigureProjectWizardMainPage pageName ImageDescriptor titleImage AdaptableList AdaptableList disabledWizards pageName titleImage disabledWizards ConfigureProjectWizardMainPage selectRepository
Create a new Configure Project Wizard Main Page param page Name the name of the page param title the title of the page param title Image the image for the page title param wizards the wizards to populate the table with param description The string to use as a description label public Configure Project Wizard Main Page String page Name String title Image Descriptor title Image Adaptable List wizards Adaptable List disabled Wizards String description super page Name title title Image this wizards wizards this disabled Wizards disabled Wizards this description description  ConfigureProjectWizardMainPage pageName titleImage ConfigureProjectWizardMainPage pageName ImageDescriptor titleImage AdaptableList AdaptableList disabledWizards pageName titleImage disabledWizards disabledWizards
public I Configuration Wizard get Selected Wizard return selected Wizard  IConfigurationWizard getSelectedWizard selectedWizard
see Wizard Page can Flip To Next Page public boolean can Flip To Next Page return selected Wizard null selected Wizard get Page Count 0  WizardPage canFlipToNextPage canFlipToNextPage selectedWizard selectedWizard getPageCount
viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Initialize the wizard so we can tell whether to enable the Next button I Selection selection event get Selection if selection null selection instanceof I Structured Selection selected Wizard null set Page Complete false return I Structured Selection ss I Structured Selection selection if ss size 1 selected Wizard null set Page Complete false return Configuration Wizard Element selected Element Configuration Wizard Element ss get First Element try selected Wizard I Configuration Wizard selected Element create Executable Extension selected Wizard init workbench project catch Core Exception e return selected Wizard add Pages Ask the container to update button enablement set Page Complete true  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection IStructuredSelection selectedWizard setPageComplete IStructuredSelection IStructuredSelection selectedWizard setPageComplete ConfigurationWizardElement selectedElement ConfigurationWizardElement getFirstElement selectedWizard IConfigurationWizard selectedElement createExecutableExtension selectedWizard CoreException selectedWizard addPages setPageComplete
viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event get Wizard get Container show Page get Next Page  addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getWizard getContainer showPage getNextPage
show All Toggle add Selection Listener new Selection Adapter public void widget Selected Selection Event e Array List all new Array List Arrays as List wizards get Children if show All Toggle get Selection all add All Arrays as List disabled Wizards get Children viewer set Input new Adaptable List all  showAllToggle addSelectionListener SelectionAdapter widgetSelected SelectionEvent ArrayList ArrayList asList getChildren showAllToggle getSelection addAll asList disabledWizards getChildren setInput AdaptableList
public void create Control Composite parent Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL BOTH set Control composite set F1 help Workbench Help set Help composite I Help Context Ids SHARE PROJECT PAGE Label label new Label composite SWT LEFT label set Text description Grid Data data new Grid Data data horizontal Alignment Grid Data FILL label set Layout Data data table new Table composite SWT SINGLE SWT BORDER data new Grid Data Grid Data FILL BOTH data height Hint table get Item Height 7 table set Layout Data data viewer new Table Viewer table viewer set Content Provider new Workbench Content Provider viewer set Label Provider new Workbench Label Provider viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Initialize the wizard so we can tell whether to enable the Next button I Selection selection event get Selection if selection null selection instanceof I Structured Selection selected Wizard null set Page Complete false return I Structured Selection ss I Structured Selection selection if ss size 1 selected Wizard null set Page Complete false return Configuration Wizard Element selected Element Configuration Wizard Element ss get First Element try selected Wizard I Configuration Wizard selected Element create Executable Extension selected Wizard init workbench project catch Core Exception e return selected Wizard add Pages Ask the container to update button enablement set Page Complete true viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event get Wizard get Container show Page get Next Page if disabled Wizards size 0 show All Toggle new Button composite SWT CHECK show All Toggle set Text Policy bind Configure Project Wizard show All NON NLS 1 show All Toggle add Selection Listener new Selection Adapter public void widget Selected Selection Event e Array List all new Array List Arrays as List wizards get Children if show All Toggle get Selection all add All Arrays as List disabled Wizards get Children viewer set Input new Adaptable List all if wizards size 0 show All Toggle null show All Toggle set Selection true Array List all new Array List Arrays as List wizards get Children all add All Arrays as List disabled Wizards get Children viewer set Input new Adaptable List all else viewer set Input wizards Dialog apply Dialog Font parent  createControl setLayout GridLayout setLayoutData GridData GridData FILL_BOTH setControl WorkbenchHelp setHelp IHelpContextIds SHARE_PROJECT_PAGE setText GridData GridData horizontalAlignment GridData setLayoutData GridData GridData FILL_BOTH heightHint getItemHeight setLayoutData TableViewer setContentProvider WorkbenchContentProvider setLabelProvider WorkbenchLabelProvider addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection IStructuredSelection selectedWizard setPageComplete IStructuredSelection IStructuredSelection selectedWizard setPageComplete ConfigurationWizardElement selectedElement ConfigurationWizardElement getFirstElement selectedWizard IConfigurationWizard selectedElement createExecutableExtension selectedWizard CoreException selectedWizard addPages setPageComplete addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getWizard getContainer showPage getNextPage disabledWizards showAllToggle showAllToggle setText ConfigureProjectWizard showAll showAllToggle addSelectionListener SelectionAdapter widgetSelected SelectionEvent ArrayList ArrayList asList getChildren showAllToggle getSelection addAll asList disabledWizards getChildren setInput AdaptableList showAllToggle showAllToggle setSelection ArrayList ArrayList asList getChildren addAll asList disabledWizards getChildren setInput AdaptableList setInput applyDialogFont
The code Wizard Selection Page code implementation of this code I Wizard Page code method returns the first page of the currently selected wizard if there is one see Wizard Page get Next Page public I Wizard Page get Next Page if selected Wizard null return null if Workbench Activity Helper allow Use Of I Structured Selection viewer get Selection get First Element return null return selected Wizard get Starting Page  WizardSelectionPage IWizardPage WizardPage getNextPage IWizardPage getNextPage selectedWizard WorkbenchActivityHelper allowUseOf IStructuredSelection getSelection getFirstElement selectedWizard getStartingPage
Set the workbench to the argument param workbench the workbench to set public void set Workbench I Workbench workbench this workbench workbench  setWorkbench IWorkbench
Set the project to the argument param project the project to set public void set Project I Project project this project project  setProject IProject
public void set Visible boolean visible super set Visible visible if visible table set Focus  setVisible setVisible setFocus

class Project Content Provider extends Workbench Content Provider public Object get Elements Object element if element instanceof I Project return I Project element return null  ProjectContentProvider WorkbenchContentProvider getElements IProject IProject
public Export Project Set Main Page String page Name String title Image Descriptor title Image super page Name title title Image set Description Policy bind Export Project Set Main Page description NON NLS 1  ExportProjectSetMainPage pageName ImageDescriptor titleImage pageName titleImage setDescription ExportProjectSetMainPage
table Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event I Project project I Project event get Element if event get Checked selected Projects add project else selected Projects remove project update Enablement  tableViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent IProject IProject getElement getChecked selectedProjects selectedProjects updateEnablement
if file null file Text set Text file file Text add Listener SWT Modify new Listener public void handle Event Event event file file Text get Text update Enablement  fileText setText fileText addListener handleEvent fileText getText updateEnablement
browse Button add Listener SWT Selection new Listener public void handle Event Event event File Dialog d new File Dialog get Shell SWT SAVE d set Filter Extensions new String psf NON NLS 1 d set Filter Names new String Policy bind Export Project Set Main Page Project Set Files 3 NON NLS 1 d set File Name Policy bind Export Project Set Main Page default NON NLS 1 d set Filter Path new File get Absolute Path NON NLS 1 String f d open if f null file Text set Text f file f  browseButton addListener handleEvent FileDialog FileDialog getShell setFilterExtensions setFilterNames ExportProjectSetMainPage Project_Set_Files_3 setFileName ExportProjectSetMainPage setFilterPath getAbsolutePath fileText setText
public void create Control Composite parent Composite composite create Composite parent 1 initialize Dialog Units composite set F1 help Workbench Help set Help composite I Help Context Ids EXPORT PROJECT SET PAGE create Label composite Policy bind Export Project Set Main Page Select the projects to include in the project set  2 NON NLS 1 table new Table composite SWT CHECK SWT BORDER SWT V SCROLL SWT H SCROLL table Viewer new Checkbox Table Viewer table table set Layout new Table Layout Grid Data data new Grid Data Grid Data FILL BOTH data height Hint 300 table set Layout Data data table Viewer set Content Provider new Project Content Provider table Viewer set Label Provider new Workbench Label Provider table Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event I Project project I Project event get Element if event get Checked selected Projects add project else selected Projects remove project update Enablement create Label composite Policy bind Export Project Set Main Page Project Set File Name  3 NON NLS 1 Composite inner new Composite composite SWT NULL inner set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout layout new Grid Layout layout num Columns 3 layout margin Height 0 layout margin Width 0 inner set Layout layout create Label inner Policy bind Export Project Set Main Page File name  1 NON NLS 1 file Text create Text Field inner if file null file Text set Text file file Text add Listener SWT Modify new Listener public void handle Event Event event file file Text get Text update Enablement browse Button new Button inner SWT PUSH browse Button set Text Policy bind Export Project Set Main Page Browse 4 NON NLS 1 data new Grid Data data horizontal Alignment Grid Data FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint browse Button compute Size SWT DEFAULT SWT DEFAULT true x browse Button set Layout Data data browse Button add Listener SWT Selection new Listener public void handle Event Event event File Dialog d new File Dialog get Shell SWT SAVE d set Filter Extensions new String psf NON NLS 1 d set Filter Names new String Policy bind Export Project Set Main Page Project Set Files 3 NON NLS 1 d set File Name Policy bind Export Project Set Main Page default NON NLS 1 d set Filter Path new File get Absolute Path NON NLS 1 String f d open if f null file Text set Text f file f initialize Projects set Control composite update Enablement Dialog apply Dialog Font parent  createControl createComposite initializeDialogUnits WorkbenchHelp setHelp IHelpContextIds EXPORT_PROJECT_SET_PAGE createLabel ExportProjectSetMainPage Select_the_projects_to_include_in_the_project_set__2 V_SCROLL H_SCROLL tableViewer CheckboxTableViewer setLayout TableLayout GridData GridData GridData FILL_BOTH heightHint setLayoutData tableViewer setContentProvider ProjectContentProvider tableViewer setLabelProvider WorkbenchLabelProvider tableViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent IProject IProject getElement getChecked selectedProjects selectedProjects updateEnablement createLabel ExportProjectSetMainPage Project_Set_File_Name__3 setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout numColumns marginHeight marginWidth setLayout createLabel ExportProjectSetMainPage File_name__1 fileText createTextField fileText setText fileText addListener handleEvent fileText getText updateEnablement browseButton browseButton setText ExportProjectSetMainPage Browse_4 GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint browseButton computeSize browseButton setLayoutData browseButton addListener handleEvent FileDialog FileDialog getShell setFilterExtensions setFilterNames ExportProjectSetMainPage Project_Set_Files_3 setFileName ExportProjectSetMainPage setFilterPath getAbsolutePath fileText setText initializeProjects setControl updateEnablement applyDialogFont
private void initialize Projects List project List new Array List I Project workspace Projects Resources Plugin get Workspace get Root get Projects for int i 0 i workspace Projects length i if Repository Provider get Provider workspace Projects i null project List add workspace Projects i table Viewer set Input I Project project List to Array new I Project project List size Check any necessary projects if selected Projects null table Viewer set Checked Elements I Project selected Projects to Array new I Project selected Projects size  initializeProjects projectList ArrayList IProject workspaceProjects ResourcesPlugin getWorkspace getRoot getProjects workspaceProjects RepositoryProvider getProvider workspaceProjects projectList workspaceProjects tableViewer setInput IProject projectList toArray IProject projectList selectedProjects tableViewer setCheckedElements IProject selectedProjects toArray IProject selectedProjects
private void update Enablement boolean complete if selected Projects size 0 set Message null complete false else if file length 0 set Message null complete false else File f new File file if f is Directory set Message Policy bind Export Project Set Main Page You have specified a folder 5 ERROR NON NLS 1 complete false else complete true if complete set Message null set Page Complete complete  updateEnablement selectedProjects setMessage setMessage isDirectory setMessage ExportProjectSetMainPage You_have_specified_a_folder_5 setMessage setPageComplete
public String get File Name return file  getFileName
public void set File Name String file if file null this file file  setFileName
public I Project get Selected Projects return I Project selected Projects to Array new I Project selected Projects size  IProject getSelectedProjects IProject selectedProjects toArray IProject selectedProjects
return I Project selected Projects to Array new I Project selected Projects size public void set Selected Projects I Project selected Projects this selected Projects add All Arrays as List selected Projects  IProject selectedProjects toArray IProject selectedProjects setSelectedProjects IProject selectedProjects selectedProjects addAll asList selectedProjects
public void set Visible boolean visible super set Visible visible if visible file Text set Focus  setVisible setVisible fileText setFocus

class My Content Provider extends Base Workbench Content Provider public Object get Children Object element if element instanceof Synchronize Manager Synchronize Manager manager Synchronize Manager element return manager get Wizard Descriptors return super get Children element  MyContentProvider BaseWorkbenchContentProvider getChildren SynchronizeManager SynchronizeManager SynchronizeManager getWizardDescriptors getChildren
class My Label Provider extends Label Provider public String get Text Object element if element instanceof Synchronize Wizard Description Synchronize Wizard Description descriptor Synchronize Wizard Description element return descriptor get Name return null  MyLabelProvider LabelProvider getText SynchronizeWizardDescription SynchronizeWizardDescription SynchronizeWizardDescription getName
public Image get Image Object element if element instanceof Synchronize Wizard Description Synchronize Wizard Description descriptor Synchronize Wizard Description element Image Descriptor d descriptor get Image Descriptor if created Images null created Images new Array List 3 Image image d create Image created Images add image return image return null  getImage SynchronizeWizardDescription SynchronizeWizardDescription SynchronizeWizardDescription ImageDescriptor getImageDescriptor createdImages createdImages ArrayList createImage createdImages
public Global Refresh Wizard Selection Page super Policy bind Global Refresh Participant Selection Page 0 NON NLS 1 set Description Policy bind Global Refresh Participant Selection Page 1 NON NLS 1 set Title Policy bind Global Refresh Participant Selection Page 2 NON NLS 1  GlobalRefreshWizardSelectionPage GlobalRefreshParticipantSelectionPage setDescription GlobalRefreshParticipantSelectionPage setTitle GlobalRefreshParticipantSelectionPage
public void dispose if created Images null for Iterator it created Images iterator it has Next Image image Image it next image dispose  createdImages createdImages hasNext
public void create Control Composite parent2 Composite top new Composite parent2 SWT NULL top set Layout new Grid Layout set Control top Label l new Label top SWT NULL l set Text Policy bind Global Refresh Participant Selection Page 3 NON NLS 1 f Viewer new Table Viewer top SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH f Viewer get Control set Layout Data data f Viewer set Content Provider new My Content Provider f Viewer add Double Click Listener this f Viewer set Label Provider new My Label Provider f Viewer set Sorter new Resource Sorter Resource Sorter NAME f Viewer set Input TeamUI get Synchronize Manager f Viewer add Selection Changed Listener this f Viewer get Table set Focus Dialog apply Dialog Font parent2  createControl setLayout GridLayout setControl setText GlobalRefreshParticipantSelectionPage fViewer TableViewer GridData GridData GridData FILL_BOTH fViewer getControl setLayoutData fViewer setContentProvider MyContentProvider fViewer addDoubleClickListener fViewer setLabelProvider MyLabelProvider fViewer setSorter ResourceSorter ResourceSorter fViewer setInput getSynchronizeManager fViewer addSelectionChangedListener fViewer getTable setFocus applyDialogFont
public void double Click Double Click Event event selection Changed new Selection Changed Event event get Viewer event get Viewer get Selection get Container show Page get Next Page  doubleClick DoubleClickEvent selectionChanged SelectionChangedEvent getViewer getViewer getSelection getContainer showPage getNextPage
public void selection Changed Selection Changed Event event Initialize the wizard so we can tell whether to enable the Next button I Selection selection event get Selection if selection null selection instanceof I Structured Selection wizard null set Page Complete false return I Structured Selection ss I Structured Selection selection if ss size 1 wizard null set Page Complete false return Synchronize Wizard Description selected Descriptor Synchronize Wizard Description ss get First Element try wizard selected Descriptor create Wizard wizard add Pages Ask the container to update button enablement set Page Complete true set Description selected Descriptor get Description catch Core Exception e Utils handle e set Page Complete false  selectionChanged SelectionChangedEvent ISelection getSelection IStructuredSelection setPageComplete IStructuredSelection IStructuredSelection setPageComplete SynchronizeWizardDescription selectedDescriptor SynchronizeWizardDescription getFirstElement selectedDescriptor createWizard addPages setPageComplete setDescription selectedDescriptor getDescription CoreException setPageComplete
public I Wizard get Selected Wizard return this wizard  IWizard getSelectedWizard
public I Wizard Page get Next Page if wizard null return null return wizard get Starting Page  IWizardPage getNextPage getStartingPage
public void set Visible boolean visible super set Visible visible if visible f Viewer get Table set Focus  setVisible setVisible fViewer getTable setFocus

public Global Synchronize Wizard set Window Title Policy bind Global Synchronize Wizard 11 NON NLS 1 set Default Page Image Descriptor Team Images get Image Descriptor I TeamUI Images IMG WIZBAN SHARE set Force Previous And Next Buttons true set Needs Progress Monitor false  GlobalSynchronizeWizard setWindowTitle GlobalSynchronizeWizard setDefaultPageImageDescriptor TeamImages getImageDescriptor ITeamUIImages IMG_WIZBAN_SHARE setForcePreviousAndNextButtons setNeedsProgressMonitor
public void add Pages Synchronize Wizard Description wizards get Wizards main Page new Global Refresh Wizard Selection Page add Page main Page  addPages SynchronizeWizardDescription getWizards mainPage GlobalRefreshWizardSelectionPage addPage mainPage
public boolean can Finish If we are on the first page never allow finish unless the selected wizard has no pages if get Container get Current Page main Page if main Page get Selected Wizard null main Page get Next Page null return true return false return super can Finish  canFinish getContainer getCurrentPage mainPage mainPage getSelectedWizard mainPage getNextPage canFinish
public boolean perform Finish If we are on the first page and the selected wizard has no pages then allow it to finish if get Container get Current Page main Page I Wizard no Page Wizard main Page get Selected Wizard if no Page Wizard null if no Page Wizard can Finish return no Page Wizard perform Finish return true  performFinish getContainer getCurrentPage mainPage IWizard noPageWizard mainPage getSelectedWizard noPageWizard noPageWizard canFinish noPageWizard performFinish
protected Synchronize Wizard Description get Wizards Synchronize Manager manager Synchronize Manager TeamUI get Synchronize Manager return manager get Wizard Descriptors  SynchronizeWizardDescription getWizards SynchronizeManager SynchronizeManager getSynchronizeManager getWizardDescriptors

private static final int SIZING TEXT FIELD WIDTH 80 public Import Project Set Main Page String page Name String title Image Descriptor title Image super page Name title title Image set Description Policy bind Import Project Set Main Page description NON NLS 1  SIZING_TEXT_FIELD_WIDTH ImportProjectSetMainPage pageName ImageDescriptor titleImage pageName titleImage setDescription ImportProjectSetMainPage
if file null file Text set Text file file Text add Listener SWT Modify new Listener public void handle Event Event event file file Text get Text update Enablement  fileText setText fileText addListener handleEvent fileText getText updateEnablement
browse Button add Listener SWT Selection new Listener public void handle Event Event event File Dialog d new File Dialog get Shell d set Filter Extensions new String psf NON NLS 1 NON NLS 2 d set Filter Names new String Policy bind Import Project Set Main Page Project Set Files 2 Policy bind Import Project Set Main Page all Files NON NLS 1 NON NLS 2 d set Filter Path new File get Absolute Path NON NLS 1 String f d open if f null file Text set Text f file f  browseButton addListener handleEvent FileDialog FileDialog getShell setFilterExtensions setFilterNames ImportProjectSetMainPage Project_Set_Files_2 ImportProjectSetMainPage allFiles setFilterPath getAbsolutePath fileText setText
public void create Control Composite parent Composite composite create Composite parent 1 initialize Dialog Units composite set F1 help Workbench Help set Help composite I Help Context Ids IMPORT PROJECT SET PAGE Composite inner new Composite composite SWT NULL inner set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout layout new Grid Layout layout num Columns 3 layout margin Height 0 layout margin Width 0 inner set Layout layout create Label inner Policy bind Import Project Set Main Page Project Set File Name  2 NON NLS 1 file Text create Text Field inner if file null file Text set Text file file Text add Listener SWT Modify new Listener public void handle Event Event event file file Text get Text update Enablement browse Button new Button inner SWT PUSH browse Button set Text Policy bind Import Project Set Main Page Browse 3 NON NLS 1 Grid Data data new Grid Data data horizontal Alignment Grid Data FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint browse Button compute Size SWT DEFAULT SWT DEFAULT true x browse Button set Layout Data data browse Button add Listener SWT Selection new Listener public void handle Event Event event File Dialog d new File Dialog get Shell d set Filter Extensions new String psf NON NLS 1 NON NLS 2 d set Filter Names new String Policy bind Import Project Set Main Page Project Set Files 2 Policy bind Import Project Set Main Page all Files NON NLS 1 NON NLS 2 d set Filter Path new File get Absolute Path NON NLS 1 String f d open if f null file Text set Text f file f create Workin Set Creation Area inner 3 set Control composite update Enablement Dialog apply Dialog Font parent  createControl createComposite initializeDialogUnits WorkbenchHelp setHelp IHelpContextIds IMPORT_PROJECT_SET_PAGE setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout numColumns marginHeight marginWidth setLayout createLabel ImportProjectSetMainPage Project_Set_File_Name__2 fileText createTextField fileText setText fileText addListener handleEvent fileText getText updateEnablement browseButton browseButton setText ImportProjectSetMainPage Browse_3 GridData GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint browseButton computeSize browseButton setLayoutData browseButton addListener handleEvent FileDialog FileDialog getShell setFilterExtensions setFilterNames ImportProjectSetMainPage Project_Set_Files_2 ImportProjectSetMainPage allFiles setFilterPath getAbsolutePath fileText setText createWorkinSetCreationArea setControl updateEnablement applyDialogFont
create Working Set Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e create Working Set create Working Set Button get Selection label set Enabled create Working Set working Set Name Field set Enabled create Working Set update Enablement  createWorkingSetButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent createWorkingSet createWorkingSetButton getSelection setEnabled createWorkingSet workingSetNameField setEnabled createWorkingSet updateEnablement
working Set Name Field add Modify Listener new Modify Listener public void modify Text Modify Event e update Enablement  workingSetNameField addModifyListener ModifyListener modifyText ModifyEvent updateEnablement
Method create Workin Set Creation Area param inner private void create Workin Set Creation Area Composite composite int num Columns create Working Set Button new Button composite SWT CHECK SWT RIGHT create Working Set Button set Text Policy bind Import Project Set Main Page create Working Set Label NON NLS 1 create Working Set Button set Selection create Working Set Grid Data data new Grid Data data horizontal Span num Columns create Working Set Button set Layout Data data final Label label new Label composite SWT NONE label set Text Policy bind Import Project Set Main Page working Set Label NON NLS 1 data new Grid Data data horizontal Span 1 label set Layout Data data label set Enabled create Working Set working Set Name Field new Text composite SWT BORDER data new Grid Data Grid Data FILL HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH data horizontal Span 1 working Set Name Field set Layout Data data working Set Name Field set Enabled create Working Set create Working Set Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e create Working Set create Working Set Button get Selection label set Enabled create Working Set working Set Name Field set Enabled create Working Set update Enablement working Set Name Field add Modify Listener new Modify Listener public void modify Text Modify Event e update Enablement  createWorkinSetCreationArea createWorkinSetCreationArea numColumns createWorkingSetButton createWorkingSetButton setText ImportProjectSetMainPage createWorkingSetLabel createWorkingSetButton setSelection createWorkingSet GridData GridData horizontalSpan numColumns createWorkingSetButton setLayoutData setText ImportProjectSetMainPage workingSetLabel GridData horizontalSpan setLayoutData setEnabled createWorkingSet workingSetNameField GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH horizontalSpan workingSetNameField setLayoutData workingSetNameField setEnabled createWorkingSet createWorkingSetButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent createWorkingSet createWorkingSetButton getSelection setEnabled createWorkingSet workingSetNameField setEnabled createWorkingSet updateEnablement workingSetNameField addModifyListener ModifyListener modifyText ModifyEvent updateEnablement
private boolean validate Working Set Name if create Working Set working Set Name working Set Name Field get Text if working Set Name length 0 set Message Policy bind Import Project Set Main Page working Set Name Empty ERROR NON NLS 1 return false else todo verify name doesn t already exist I Working Set existing Set TeamUI Plugin get Plugin get Workbench get Working Set Manager get Working Set working Set Name if existing Set null set Message Policy bind Import Project Set Main Page working Set Name Exists WARNING NON NLS 1 return true set Message null return true  validateWorkingSetName createWorkingSet workingSetName workingSetNameField getText workingSetName setMessage ImportProjectSetMainPage workingSetNameEmpty IWorkingSet existingSet TeamUIPlugin getPlugin getWorkbench getWorkingSetManager getWorkingSet workingSetName existingSet setMessage ImportProjectSetMainPage workingSetNameExists setMessage
private void update Enablement boolean complete set Message null if file length 0 complete false else See if the file exists File f new File file if f exists set Message Policy bind Import Project Set Main Page The specified file does not exist 4 ERROR NON NLS 1 complete false else if f is Directory set Message Policy bind Import Project Set Main Page You have specified a folder 5 ERROR NON NLS 1 complete false else complete validate Working Set Name set Page Complete complete  updateEnablement setMessage setMessage ImportProjectSetMainPage The_specified_file_does_not_exist_4 isDirectory setMessage ImportProjectSetMainPage You_have_specified_a_folder_5 validateWorkingSetName setPageComplete
public String get File Name return file  getFileName
public void set File Name String file if file null this file file  setFileName
public void set Visible boolean visible super set Visible visible if visible file Text set Focus  setVisible setVisible fileText setFocus
return String public String get Working Set Name if create Working Set return null return working Set Name  getWorkingSetName createWorkingSet workingSetName

I Structured Selection selection public Project Set Export Wizard set Needs Progress Monitor true set Window Title Policy bind Project Set Export Wizard Project Set 1 NON NLS 1  IStructuredSelection ProjectSetExportWizard setNeedsProgressMonitor setWindowTitle ProjectSetExportWizard Project_Set_1
public void add Pages main Page new Export Project Set Main Page project Set Main Page Policy bind Project Set Export Wizard Export a Project Set 3 TeamUI Plugin get Image Descriptor I TeamUI Images IMG PROJECTSET EXPORT BANNER NON NLS 1 NON NLS 2 I Project projects I Project selection to List to Array new I Project 0 main Page set Selected Projects projects main Page set File Name Project Set Import Wizard last File add Page main Page  addPages mainPage ExportProjectSetMainPage projectSetMainPage ProjectSetExportWizard Export_a_Project_Set_3 TeamUIPlugin getImageDescriptor ITeamUIImages IMG_PROJECTSET_EXPORT_BANNER IProject IProject toList toArray IProject mainPage setSelectedProjects mainPage setFileName ProjectSetImportWizard lastFile addPage mainPage
get Container run false false new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception String filename main Page get File Name Path path new Path filename if path get File Extension null filename filename psf NON NLS 1 Project Set Import Wizard last File filename File file new File filename File parent File file get Parent File if parent File null parent File exists boolean r Message Dialog open Question get Shell Policy bind Project Set Export Wizard Question 4 Policy bind Project Set Export Wizard Target directory does not exist  Would you like to create it  5 NON NLS 1 NON NLS 2 if r result 0 false return r parent File mkdirs if r Message Dialog open Error get Shell Policy bind Project Set Export Wizard Export Problems 6 Policy bind Project Set Export Wizard An error occurred creating the target directory 7 NON NLS 1 NON NLS 2 result 0 false return if file exists file is File boolean r Message Dialog open Question get Shell Policy bind Project Set Export Wizard Question 8 Policy bind Project Set Export Wizard Target already exists  Would you like to overwrite it  9 NON NLS 1 NON NLS 2 if r result 0 false return Hash the projects by provider I Project projects main Page get Selected Projects Map map new Hash Map for int i 0 i projects length i I Project project projects i Repository Provider provider Repository Provider get Provider project if provider null String id provider getID List list List map get id if list null list new Array List map put id list list add project UI Project Set Serialization Context context new UI Project Set Serialization Context get Shell filename Buffered Writer writer null try writer new Buffered Writer new Output Stream Writer new File Output Stream file UTF 8 NON NLS 1 writer write xml version 1 0 encoding UTF 8 NON NLS 1 writer new Line writer write psf version 2 0 NON NLS 1 writer new Line For each provider id do the writing Iterator it map key Set iterator monitor begin Task null 1000 map key Set size while it has Next String id String it next writer write t provider id NON NLS 1 writer write id writer write NON NLS 1 writer new Line List list List map get id I Project project Array I Project list to Array new I Project list size Repository Provider Type provider Type Repository Provider Type get Provider Type id Project Set Capability serializer provider Type get Project Set Capability Project Set Capability ensure Backwards Compatible provider Type serializer if serializer null String references serializer as Reference project Array context new Sub Progress Monitor monitor 990 for int i 0 i references length i writer write t t project reference NON NLS 1 writer write references i writer write NON NLS 1 writer new Line writer write t provider NON NLS 1 writer new Line writer write psf NON NLS 1 writer new Line result 0 true catch IO Exception e throw new Invocation Target Exception e catch Team Exception e throw new Invocation Target Exception e finally if writer null try writer close catch IO Exception e throw new Invocation Target Exception e notify provider types of the project set write for Iterator iter map key Set iterator iter has Next String id String iter next Repository Provider Type type Repository Provider Type get Provider Type id if type null Project Set Capability capability type get Project Set Capability if capability null capability project Set Created file context new Sub Progress Monitor monitor 10 monitor done  getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException mainPage getFileName getFileExtension ProjectSetImportWizard lastFile parentFile getParentFile parentFile parentFile MessageDialog openQuestion getShell ProjectSetExportWizard Question_4 ProjectSetExportWizard Target_directory_does_not_exist _Would_you_like_to_create_it__5 parentFile MessageDialog openError getShell ProjectSetExportWizard Export_Problems_6 ProjectSetExportWizard An_error_occurred_creating_the_target_directory_7 isFile MessageDialog openQuestion getShell ProjectSetExportWizard Question_8 ProjectSetExportWizard Target_already_exists _Would_you_like_to_overwrite_it__9 IProject mainPage getSelectedProjects HashMap IProject RepositoryProvider RepositoryProvider getProvider ArrayList UIProjectSetSerializationContext UIProjectSetSerializationContext getShell BufferedWriter BufferedWriter OutputStreamWriter FileOutputStream newLine newLine keySet beginTask keySet hasNext newLine IProject projectArray IProject toArray IProject RepositoryProviderType providerType RepositoryProviderType getProviderType ProjectSetCapability providerType getProjectSetCapability ProjectSetCapability ensureBackwardsCompatible providerType asReference projectArray SubProgressMonitor newLine newLine newLine IOException InvocationTargetException TeamException InvocationTargetException IOException InvocationTargetException keySet hasNext RepositoryProviderType RepositoryProviderType getProviderType ProjectSetCapability getProjectSetCapability projectSetCreated SubProgressMonitor
public boolean perform Finish final boolean result new boolean false try get Container run false false new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception String filename main Page get File Name Path path new Path filename if path get File Extension null filename filename psf NON NLS 1 Project Set Import Wizard last File filename File file new File filename File parent File file get Parent File if parent File null parent File exists boolean r Message Dialog open Question get Shell Policy bind Project Set Export Wizard Question 4 Policy bind Project Set Export Wizard Target directory does not exist  Would you like to create it  5 NON NLS 1 NON NLS 2 if r result 0 false return r parent File mkdirs if r Message Dialog open Error get Shell Policy bind Project Set Export Wizard Export Problems 6 Policy bind Project Set Export Wizard An error occurred creating the target directory 7 NON NLS 1 NON NLS 2 result 0 false return if file exists file is File boolean r Message Dialog open Question get Shell Policy bind Project Set Export Wizard Question 8 Policy bind Project Set Export Wizard Target already exists  Would you like to overwrite it  9 NON NLS 1 NON NLS 2 if r result 0 false return Hash the projects by provider I Project projects main Page get Selected Projects Map map new Hash Map for int i 0 i projects length i I Project project projects i Repository Provider provider Repository Provider get Provider project if provider null String id provider getID List list List map get id if list null list new Array List map put id list list add project UI Project Set Serialization Context context new UI Project Set Serialization Context get Shell filename Buffered Writer writer null try writer new Buffered Writer new Output Stream Writer new File Output Stream file UTF 8 NON NLS 1 writer write xml version 1 0 encoding UTF 8 NON NLS 1 writer new Line writer write psf version 2 0 NON NLS 1 writer new Line For each provider id do the writing Iterator it map key Set iterator monitor begin Task null 1000 map key Set size while it has Next String id String it next writer write t provider id NON NLS 1 writer write id writer write NON NLS 1 writer new Line List list List map get id I Project project Array I Project list to Array new I Project list size Repository Provider Type provider Type Repository Provider Type get Provider Type id Project Set Capability serializer provider Type get Project Set Capability Project Set Capability ensure Backwards Compatible provider Type serializer if serializer null String references serializer as Reference project Array context new Sub Progress Monitor monitor 990 for int i 0 i references length i writer write t t project reference NON NLS 1 writer write references i writer write NON NLS 1 writer new Line writer write t provider NON NLS 1 writer new Line writer write psf NON NLS 1 writer new Line result 0 true catch IO Exception e throw new Invocation Target Exception e catch Team Exception e throw new Invocation Target Exception e finally if writer null try writer close catch IO Exception e throw new Invocation Target Exception e notify provider types of the project set write for Iterator iter map key Set iterator iter has Next String id String iter next Repository Provider Type type Repository Provider Type get Provider Type id if type null Project Set Capability capability type get Project Set Capability if capability null capability project Set Created file context new Sub Progress Monitor monitor 10 monitor done catch Interrupted Exception e return true catch Invocation Target Exception e Throwable target e get Target Exception if target instanceof Team Exception Error Dialog open Error get Shell null null Team Exception target get Status return false if target instanceof Runtime Exception throw Runtime Exception target if target instanceof Error throw Error target return result 0  performFinish getContainer IRunnableWithProgress IProgressMonitor InvocationTargetException mainPage getFileName getFileExtension ProjectSetImportWizard lastFile parentFile getParentFile parentFile parentFile MessageDialog openQuestion getShell ProjectSetExportWizard Question_4 ProjectSetExportWizard Target_directory_does_not_exist _Would_you_like_to_create_it__5 parentFile MessageDialog openError getShell ProjectSetExportWizard Export_Problems_6 ProjectSetExportWizard An_error_occurred_creating_the_target_directory_7 isFile MessageDialog openQuestion getShell ProjectSetExportWizard Question_8 ProjectSetExportWizard Target_already_exists _Would_you_like_to_overwrite_it__9 IProject mainPage getSelectedProjects HashMap IProject RepositoryProvider RepositoryProvider getProvider ArrayList UIProjectSetSerializationContext UIProjectSetSerializationContext getShell BufferedWriter BufferedWriter OutputStreamWriter FileOutputStream newLine newLine keySet beginTask keySet hasNext newLine IProject projectArray IProject toArray IProject RepositoryProviderType providerType RepositoryProviderType getProviderType ProjectSetCapability providerType getProjectSetCapability ProjectSetCapability ensureBackwardsCompatible providerType asReference projectArray SubProgressMonitor newLine newLine newLine IOException InvocationTargetException TeamException InvocationTargetException IOException InvocationTargetException keySet hasNext RepositoryProviderType RepositoryProviderType getProviderType ProjectSetCapability getProjectSetCapability projectSetCreated SubProgressMonitor InterruptedException InvocationTargetException getTargetException TeamException ErrorDialog openError getShell TeamException getStatus RuntimeException RuntimeException
public void init I Workbench workbench I Structured Selection selection this selection selection  IWorkbench IStructuredSelection

public static String last File public Project Set Import Wizard set Needs Progress Monitor true set Window Title Policy bind Project Set Import Wizard Project Set 1 NON NLS 1  lastFile ProjectSetImportWizard setNeedsProgressMonitor setWindowTitle ProjectSetImportWizard Project_Set_1
public void add Pages main Page new Import Project Set Main Page project Set Main Page Policy bind Project Set Import Wizard Import a Project Set 3 TeamUI Plugin get Image Descriptor I TeamUI Images IMG PROJECTSET IMPORT BANNER NON NLS 1 NON NLS 2 main Page set File Name last File add Page main Page  addPages mainPage ImportProjectSetMainPage projectSetMainPage ProjectSetImportWizard Import_a_Project_Set_3 TeamUIPlugin getImageDescriptor ITeamUIImages IMG_PROJECTSET_IMPORT_BANNER mainPage setFileName lastFile addPage mainPage
get Container run true true new Workspace Modify Operation null public void execute I Progress Monitor monitor throws Invocation Target Exception Input Stream Reader reader null try String filename main Page get File Name last File filename reader new Input Stream Reader new File Input Stream filename UTF 8 NON NLS 1 SAX Parser Factory factory SAX Parser Factory new Instance SAX Parser parser factory newSAX Parser Project Set Content Handler handler new Project Set Content Handler Input Source source new Input Source reader parser parse source handler Map map handler get References List new Projects new Array List if map size 0 handler is Version One I Project Set Serializer serializer Team get Project Set Serializer version One Serializer NON NLS 1 if serializer null I Project projects serializer add To Workspace new String 0 filename get Shell monitor if projects null new Projects add All Arrays as List projects else UI Project Set Serialization Context context new UI Project Set Serialization Context get Shell filename Iterator it map key Set iterator while it has Next String id String it next List references List map get id Repository Provider Type provider Type Repository Provider Type get Provider Type id Project Set Capability serializer provider Type get Project Set Capability Project Set Capability ensure Backwards Compatible provider Type serializer if serializer null I Project projects serializer add To Workspace String references to Array new String references size context monitor if projects null new Projects add All Arrays as List projects if working Set Name null create Working Set working Set Name I Project new Projects to Array new I Project new Projects size result 0 true catch IO Exception e throw new Invocation Target Exception e catch SAX Exception e throw new Invocation Target Exception e catch Team Exception e throw new Invocation Target Exception e catch Parser Configuration Exception e throw new Invocation Target Exception e finally if reader null try reader close catch IO Exception e throw new Invocation Target Exception e  getContainer WorkspaceModifyOperation IProgressMonitor InvocationTargetException InputStreamReader mainPage getFileName lastFile InputStreamReader FileInputStream SAXParserFactory SAXParserFactory newInstance SAXParser newSAXParser ProjectSetContentHandler ProjectSetContentHandler InputSource InputSource getReferences newProjects ArrayList isVersionOne IProjectSetSerializer getProjectSetSerializer versionOneSerializer IProject addToWorkspace getShell newProjects addAll asList UIProjectSetSerializationContext UIProjectSetSerializationContext getShell keySet hasNext RepositoryProviderType providerType RepositoryProviderType getProviderType ProjectSetCapability providerType getProjectSetCapability ProjectSetCapability ensureBackwardsCompatible providerType IProject addToWorkspace toArray newProjects addAll asList workingSetName createWorkingSet workingSetName IProject newProjects toArray IProject newProjects IOException InvocationTargetException SAXException InvocationTargetException TeamException InvocationTargetException ParserConfigurationException InvocationTargetException IOException InvocationTargetException
public boolean perform Finish check if the desired working set exists final String working Set Name main Page get Working Set Name if working Set Name null I Working Set existing Set TeamUI Plugin get Plugin get Workbench get Working Set Manager get Working Set working Set Name if existing Set null Message Dialog open Confirm get Shell Policy bind Project Set Import Wizard working Set Exists Title Policy bind Project Set Import Wizard working Set Exists Message working Set Name NON NLS 1 NON NLS 2 return false final boolean result new boolean false try get Container run true true new Workspace Modify Operation null public void execute I Progress Monitor monitor throws Invocation Target Exception Input Stream Reader reader null try String filename main Page get File Name last File filename reader new Input Stream Reader new File Input Stream filename UTF 8 NON NLS 1 SAX Parser Factory factory SAX Parser Factory new Instance SAX Parser parser factory newSAX Parser Project Set Content Handler handler new Project Set Content Handler Input Source source new Input Source reader parser parse source handler Map map handler get References List new Projects new Array List if map size 0 handler is Version One I Project Set Serializer serializer Team get Project Set Serializer version One Serializer NON NLS 1 if serializer null I Project projects serializer add To Workspace new String 0 filename get Shell monitor if projects null new Projects add All Arrays as List projects else UI Project Set Serialization Context context new UI Project Set Serialization Context get Shell filename Iterator it map key Set iterator while it has Next String id String it next List references List map get id Repository Provider Type provider Type Repository Provider Type get Provider Type id Project Set Capability serializer provider Type get Project Set Capability Project Set Capability ensure Backwards Compatible provider Type serializer if serializer null I Project projects serializer add To Workspace String references to Array new String references size context monitor if projects null new Projects add All Arrays as List projects if working Set Name null create Working Set working Set Name I Project new Projects to Array new I Project new Projects size result 0 true catch IO Exception e throw new Invocation Target Exception e catch SAX Exception e throw new Invocation Target Exception e catch Team Exception e throw new Invocation Target Exception e catch Parser Configuration Exception e throw new Invocation Target Exception e finally if reader null try reader close catch IO Exception e throw new Invocation Target Exception e catch Interrupted Exception e return true catch Invocation Target Exception e Throwable target e get Target Exception if target instanceof Team Exception Error Dialog open Error get Shell null null Team Exception target get Status return false if target instanceof Runtime Exception throw Runtime Exception target if target instanceof Error throw Error target return result 0  performFinish workingSetName mainPage getWorkingSetName workingSetName IWorkingSet existingSet TeamUIPlugin getPlugin getWorkbench getWorkingSetManager getWorkingSet workingSetName existingSet MessageDialog openConfirm getShell ProjectSetImportWizard workingSetExistsTitle ProjectSetImportWizard workingSetExistsMessage workingSetName getContainer WorkspaceModifyOperation IProgressMonitor InvocationTargetException InputStreamReader mainPage getFileName lastFile InputStreamReader FileInputStream SAXParserFactory SAXParserFactory newInstance SAXParser newSAXParser ProjectSetContentHandler ProjectSetContentHandler InputSource InputSource getReferences newProjects ArrayList isVersionOne IProjectSetSerializer getProjectSetSerializer versionOneSerializer IProject addToWorkspace getShell newProjects addAll asList UIProjectSetSerializationContext UIProjectSetSerializationContext getShell keySet hasNext RepositoryProviderType providerType RepositoryProviderType getProviderType ProjectSetCapability providerType getProjectSetCapability ProjectSetCapability ensureBackwardsCompatible providerType IProject addToWorkspace toArray newProjects addAll asList workingSetName createWorkingSet workingSetName IProject newProjects toArray IProject newProjects IOException InvocationTargetException SAXException InvocationTargetException TeamException InvocationTargetException ParserConfigurationException InvocationTargetException IOException InvocationTargetException InterruptedException InvocationTargetException getTargetException TeamException ErrorDialog openError getShell TeamException getStatus RuntimeException RuntimeException
private void create Working Set String working Set Name I Project projects I Working Set Manager manager TeamUI Plugin get Plugin get Workbench get Working Set Manager I Working Set old Set manager get Working Set working Set Name if old Set null I Working Set new Set manager create Working Set working Set Name projects manager add Working Set new Set else old Set set Elements projects  createWorkingSet workingSetName IProject IWorkingSetManager TeamUIPlugin getPlugin getWorkbench getWorkingSetManager IWorkingSet oldSet getWorkingSet workingSetName oldSet IWorkingSet newSet createWorkingSet workingSetName addWorkingSet newSet oldSet setElements
public void init I Workbench workbench I Structured Selection selection  IWorkbench IStructuredSelection

public abstract class Team Wizard Page extends Wizard Page CVS Wizard Page constructor comment param page Name the name of the page public Team Wizard Page String page Name super page Name  TeamWizardPage WizardPage CVSWizardPage pageName TeamWizardPage pageName pageName
CVS Wizard Page constructor comment param page Name the name of the page param title the title of the page param title Image the image for the page public Team Wizard Page String page Name String title Image Descriptor title Image super page Name title title Image  CVSWizardPage pageName titleImage TeamWizardPage pageName ImageDescriptor titleImage pageName titleImage
Creates composite control and sets the default layout data param parent the parent of the new composite param num Columns the number of columns for the new composite return the newly created coposite protected Composite create Composite Composite parent int num Columns Composite composite new Composite parent SWT NULL Grid Layout Grid Layout layout new Grid Layout layout num Columns num Columns composite set Layout layout Grid Data Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL composite set Layout Data data return composite  numColumns createComposite numColumns GridLayout GridLayout GridLayout numColumns numColumns setLayout GridData GridData GridData verticalAlignment GridData horizontalAlignment GridData setLayoutData
Utility method that creates a label instance and sets the default layout data param parent the parent for the new label param text the text for the new label return the new label protected Label create Label Composite parent String text return create Indented Label parent text 0  createLabel createIndentedLabel
Utility method that creates a label instance indented by the specified number of pixels and sets the default layout data param parent the parent for the new label param text the text for the new label param indent the indent in pixels or 0 for none return the new label protected Label create Indented Label Composite parent String text int indent Label label new Label parent SWT LEFT label set Text text Grid Data data new Grid Data data horizontal Span 1 data horizontal Alignment Grid Data FILL data horizontal Indent indent label set Layout Data data return label  createIndentedLabel setText GridData GridData horizontalSpan horizontalAlignment GridData horizontalIndent setLayoutData
Create a text field specific for this application param parent the parent of the new text field return the new text field protected Text create Text Field Composite parent Text text new Text parent SWT SINGLE SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data vertical Alignment Grid Data CENTER data grab Excess Vertical Space false data width Hint I Dialog Constants ENTRY FIELD WIDTH text set Layout Data data return text  createTextField GridData GridData GridData FILL_HORIZONTAL verticalAlignment GridData grabExcessVerticalSpace widthHint IDialogConstants ENTRY_FIELD_WIDTH setLayoutData

public interface I Configuration Wizard extends I Wizard Initializes this creation wizard using the passed workbench and object selection p This method is called after the no argument constructor and before other methods are called p param workbench the current workbench param project the selected project  IConfigurationWizard IWizard

see org eclipse ui I Saveable Part do Save As public void do Save As  ISaveablePart doSaveAs doSaveAs
see org eclipse ui I Saveable Part is Save As Allowed public boolean is Save As Allowed return false  ISaveablePart isSaveAsAllowed isSaveAsAllowed
see org eclipse ui I Saveable Part is Save On Close Needed public boolean is Save On Close Needed return false  ISaveablePart isSaveOnCloseNeeded isSaveOnCloseNeeded
see org eclipse ui I Workbench Part add Property Listener org eclipse ui I Property Listener public void add Property Listener I Property Listener listener  IWorkbenchPart addPropertyListener IPropertyListener addPropertyListener IPropertyListener
see org eclipse ui I Workbench Part dispose public void dispose  IWorkbenchPart
see org eclipse ui I Workbench Part get Site public I Workbench Part Site get Site return null  IWorkbenchPart getSite IWorkbenchPartSite getSite
see org eclipse ui I Workbench Part get Title Tool Tip public String get Title Tool Tip return null  IWorkbenchPart getTitleToolTip getTitleToolTip
see org eclipse ui I Workbench Part remove Property Listener org eclipse ui I Property Listener public void remove Property Listener I Property Listener listener  IWorkbenchPart removePropertyListener IPropertyListener removePropertyListener IPropertyListener
see org eclipse ui I Workbench Part set Focus public void set Focus  IWorkbenchPart setFocus setFocus
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return null  IAdaptable getAdapter getAdapter

Creates a dialog with the given title and input The input is not created until the dialog is opened param shell the parent shell or code null code to create a top level shell param input the part to show in the dialog public Saveable Part Dialog Shell shell I Saveable Workbench Part input super shell null this input input  SaveablePartDialog ISaveableWorkbenchPart
Method declared on Dialog protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL
protected Control create Dialog Area Composite parent2 Composite parent Composite super create Dialog Area parent2 input create Part Control parent Shell shell get Shell shell set Text input get Title shell set Image input get Title Image Dialog apply Dialog Font parent2 return parent  createDialogArea createDialogArea createPartControl getShell setText getTitle setImage getTitleImage applyDialogFont
see org eclipse compare internal Resizable Dialog close public boolean close save Changes return super close  ResizableDialog saveChanges
if input is Dirty dialog open I Dialog Constants YES ID Busy Indicator show While null new Runnable public void run input do Save new Null Progress Monitor  isDirty IDialogConstants YES_ID BusyIndicator showWhile doSave NullProgressMonitor
Save any changes to the compare editor private void save Changes Message Dialog dialog new Message Dialog get Shell Policy bind Participant Compare Dialog 2 null NON NLS 1 Policy bind Participant Compare Dialog 3 Message Dialog QUESTION new String I Dialog Constants YES LABEL NON NLS 1 I Dialog Constants NO LABEL 0 YES is the default if input is Dirty dialog open I Dialog Constants YES ID Busy Indicator show While null new Runnable public void run input do Save new Null Progress Monitor  saveChanges MessageDialog MessageDialog getShell ParticipantCompareDialog ParticipantCompareDialog MessageDialog IDialogConstants YES_LABEL IDialogConstants NO_LABEL isDirty IDialogConstants YES_ID BusyIndicator showWhile doSave NullProgressMonitor

see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception TeamUI Plugin log I Status ERROR Policy bind Abstract Synchronize Participant 5 exception NON NLS 1  ISafeRunnable handleException handleException TeamUIPlugin IStatus AbstractSynchronizeParticipant
see org eclipse core runtime I Safe Runnable run public void run throws Exception f Listener property Change f Event  ISafeRunnable fListener propertyChange fEvent
Notifies listeners of the property change param property the property that has changed public void notify Property Change Event event if f Listeners null return f Event event Object copied Listeners f Listeners get Listeners for int i 0 i copied Listeners length i f Listener I Property Change Listener copied Listeners i Platform run this f Listener null  PropertyChangeEvent fListeners fEvent copiedListeners fListeners getListeners copiedListeners fListener IPropertyChangeListener copiedListeners fListener
Default constructor is a no op Subclasses that are persistable must support a no arg constructor and public Abstract Synchronize Participant  AbstractSynchronizeParticipant
see org eclipse team ui synchronize I Synchronize Participant get Name public String get Name return f Name  ISynchronizeParticipant getName getName fName
see org eclipse team ui synchronize I Synchronize Participant get Image Descriptor public Image Descriptor get Image Descriptor return f Image Descriptor  ISynchronizeParticipant getImageDescriptor ImageDescriptor getImageDescriptor fImageDescriptor
see org eclipse team ui synchronize I Synchronize Participant get Id public String get Id return f Id  ISynchronizeParticipant getId getId fId
see org eclipse team ui synchronize I Synchronize Participant get Secondary Id public String get Secondary Id return f Secondary Id  ISynchronizeParticipant getSecondaryId getSecondaryId fSecondaryId
public final void set Pinned boolean pinned this pinned pinned pinned pinned fire Property Change this P PINNED Boolean value Of pinned Boolean value Of pinned  setPinned firePropertyChange P_PINNED valueOf valueOf
see org eclipse team ui synchronize I Synchronize Participant is Pinned public final boolean is Pinned return pinned  ISynchronizeParticipant isPinned isPinned
Called when the pinned state is changed Allows subclasses to react to pin state changes param pinned whether the participant is pinned protected void pinned boolean pinned Subclasses can re act to changes in the pinned state 
public boolean equals Object obj if obj this return true if obj instanceof I Synchronize Participant return false I Synchronize Participant other I Synchronize Participant obj return get Id equals other get Id Utils equal Object get Secondary Id other get Secondary Id  ISynchronizeParticipant ISynchronizeParticipant ISynchronizeParticipant getId getId equalObject getSecondaryId getSecondaryId
see java lang Object hash Code public int hash Code return Utils get Key get Id get Secondary Id hash Code  hashCode hashCode getKey getId getSecondaryId hashCode
see org eclipse team ui synchronize I Synchronize Participant does Support Refresh public boolean does Support Synchronize return true  ISynchronizeParticipant doesSupportRefresh doesSupportSynchronize
public void add Property Change Listener I Property Change Listener listener if f Listeners null f Listeners new Listener List f Listeners add listener  addPropertyChangeListener IPropertyChangeListener fListeners fListeners ListenerList fListeners
public void remove Property Change Listener I Property Change Listener listener if f Listeners null f Listeners remove listener  removePropertyChangeListener IPropertyChangeListener fListeners fListeners
Notify all listeners that the given property has changed param source the object on which a property has changed param property identifier of the property that has changed param old Value the old value of the property or code null code param new Value the new value of the property or code null code public void fire Property Change Object source String property Object old Value Object new Value if f Listeners null return Property Notifier notifier new Property Notifier notifier notify new Property Change Event source property old Value new Value  oldValue newValue firePropertyChange oldValue newValue fListeners PropertyNotifier PropertyNotifier PropertyChangeEvent oldValue newValue
public void set Initialization Data I Configuration Element config String property Name Object data throws Core Exception Save config element config Element config Id f Id config get Attribute id NON NLS 1 Title f Name config get Attribute name NON NLS 1 if config null f Name Unknown NON NLS 1 Icon String str Icon config get Attribute icon NON NLS 1 if str Icon null f Image Descriptor Team Images get Image Descriptor From Extension config Element get Declaring Extension str Icon  setInitializationData IConfigurationElement propertyName CoreException configElement fId getAttribute fName getAttribute fName strIcon getAttribute strIcon fImageDescriptor TeamImages getImageDescriptorFromExtension configElement getDeclaringExtension strIcon
protected void set Initialization Data I Synchronize Participant Descriptor descriptor throws Core Exception if descriptor instanceof Synchronize Participant Descriptor set Initialization Data Synchronize Participant Descriptor descriptor get Configuration Element null null else throw new Team Exception Policy bind Abstract Synchronize Participant 4 NON NLS 1  setInitializationData ISynchronizeParticipantDescriptor CoreException SynchronizeParticipantDescriptor setInitializationData SynchronizeParticipantDescriptor getConfigurationElement TeamException AbstractSynchronizeParticipant
Sets the name of this participant to the specified value and notifies property listeners of the change param name the new name protected void set Name String name String old f Name f Name name fire Property Change this I Basic Property Constants P TEXT old name  setName fName fName firePropertyChange IBasicPropertyConstants P_TEXT
Sets the image descriptor for this participant to the specified value and notifies property listeners of the change param image Descriptor the new image descriptor protected void set Image Descriptor Image Descriptor image Descriptor Image Descriptor old f Image Descriptor f Image Descriptor image Descriptor fire Property Change this I Basic Property Constants P IMAGE old image Descriptor  imageDescriptor setImageDescriptor ImageDescriptor imageDescriptor ImageDescriptor fImageDescriptor fImageDescriptor imageDescriptor firePropertyChange IBasicPropertyConstants P_IMAGE imageDescriptor
Sets the secondary id for this participant param secondary Id the secondary id for this participant protected void set Secondary Id String secondary Id this f Secondary Id secondary Id  secondaryId setSecondaryId secondaryId fSecondaryId secondaryId
Classes that are persisted must override this method and perform the following initialization pre super init secondary Id memento try I Synchronize Participant Descriptor descriptor TeamUI get Synchronize Manager get Participant Descriptor PARTICIPANT ID set Initialization Data descriptor catch Core Exception e TeamUI Plugin log e pre where code PARTICIPANT ID code is the id of the particant as defined in the plugin manifest p see org eclipse team ui synchronize I Synchronize Participant init String org eclipse ui I Memento public void init String secondary Id I Memento memento throws Part Init Exception set Secondary Id secondary Id pinned Boolean value Of memento get String CTX PINNED boolean Value  secondaryId ISynchronizeParticipantDescriptor getSynchronizeManager getParticipantDescriptor PARTICIPANT_ID setInitializationData CoreException TeamUIPlugin PARTICIPANT_ID ISynchronizeParticipant IMemento secondaryId IMemento PartInitException setSecondaryId secondaryId valueOf getString CTX_PINNED booleanValue
see org eclipse team ui synchronize I Synchronize Participant save State org eclipse ui I Memento public void save State I Memento memento memento put String CTX PINNED Boolean to String pinned  ISynchronizeParticipant saveState IMemento saveState IMemento putString CTX_PINNED toString
public final I Synchronize Page Configuration create Page Configuration Synchronize Page Configuration configuration new Synchronize Page Configuration this initialize Configuration configuration return configuration  ISynchronizePageConfiguration createPageConfiguration SynchronizePageConfiguration SynchronizePageConfiguration initializeConfiguration
This method is invoked after a page configuration is created but before it is returned by the code create Page Configuration code method Subclasses can implement this method to tailor the configuration in ways appropriate to the participant param configuration the newly create page configuration  createPageConfiguration

Save the scope to the given memento param scope a scope param memento a memento protected static void save Scope I Synchronize Scope scope I Memento settings settings put String CTX SUBSCRIBER SCOPE TYPE get Type scope Abstract Synchronize Scope scope save State settings  saveScope ISynchronizeScope IMemento putString CTX_SUBSCRIBER_SCOPE_TYPE getType AbstractSynchronizeScope saveState
Restore a scope from the given memento param scope a scope param memento a memento protected static I Synchronize Scope create Scope I Memento settings String type settings get String CTX SUBSCRIBER SCOPE TYPE if type null return new Workspace Scope if type equals Resource Scope NON NLS 1 return new Resource Scope settings if type equals Working Set Scope NON NLS 1 return new Working Set Scope settings return new Workspace Scope  ISynchronizeScope createScope IMemento getString CTX_SUBSCRIBER_SCOPE_TYPE WorkspaceScope ResourceScope ResourceScope WorkingSetScope WorkingSetScope WorkspaceScope
private static String get Type I Synchronize Scope scope String name scope get Class get Name int last Dot name last Index Of NON NLS 1 if last Dot 1 return name return name substring last Dot 1 NON NLS 1  getType ISynchronizeScope getClass getName lastDot lastIndexOf lastDot lastDot
Constuctor a scope from scratch protected Abstract Synchronize Scope  AbstractSynchronizeScope
Constuctor a scope from a previously saved state protected Abstract Synchronize Scope I Memento memento init memento  AbstractSynchronizeScope IMemento
public void add Property Change Listener I Property Change Listener listener synchronized listeners listeners add listener  addPropertyChangeListener IPropertyChangeListener
public void remove Property Change Listener I Property Change Listener listener synchronized listeners listeners remove listeners  removePropertyChangeListener IPropertyChangeListener
see org eclipse team ui synchronize I Synchronize Scope dispose public void dispose Do nothing by default  ISynchronizeScope
final I Property Change Listener listener I Property Change Listener all Listeners i Platform run new Safe Runnable public void run throws Exception listener property Change event  IPropertyChangeListener IPropertyChangeListener allListeners SafeRunnable propertyChange
Fires the given property change event to all registered listsners param event the property change event to be fired protected void fire Property Changed Event final Property Change Event event Object all Listeners synchronized listeners all Listeners listeners get Listeners for int i 0 i all Listeners length i final I Property Change Listener listener I Property Change Listener all Listeners i Platform run new Safe Runnable public void run throws Exception listener property Change event  firePropertyChangedEvent PropertyChangeEvent allListeners allListeners getListeners allListeners IPropertyChangeListener IPropertyChangeListener allListeners SafeRunnable propertyChange
Firs a change event for property code I Synchronize Scope ROOTS code containing the new roots The old roots are not provided in the event protected void fire Roots Changes fire Property Changed Event new Property Change Event this ROOTS new I Resource 0 get Roots  ISynchronizeScope fireRootsChanges firePropertyChangedEvent PropertyChangeEvent IResource getRoots
Persist the state of this scope Clients must persist enough additional state to know what type i e subclass of scope to be recreated param memento the memento into which the scope is to be saved public void save State I Memento memento Do nothing by default  saveState IMemento
Method invoked from the contructor which repopulats the fields of this scope param memento the memento into which the scope was previously saved protected void init I Memento memento Do nothing by default  IMemento

Registers the given listener for participant notifications Has no effect if an identical listener is already registered param listener listener to register 
Deregisters the given listener for participant notifications Has no effect if an identical listener is not already registered param listener listener to deregister 
Adds the given participants to the synchronize manager Has no effect for equivalent participants are already registered The participants will be added to any existing synchronize views param participants participants to add 
Removes the given participants from the synchronize manager If the participants are being displayed in any synchronize views their associated pages will be closed param participants participants to remove 
Returns a collection of synchronize participant references registered with the synchronize manager return a collection of synchronize participants registered with the synchronize manager 
Returns the registered synchronize participants with the given type id It is possible to have multiple instances of the same participant type param id the type indentifier for the participant return the registered synchronize participants with the given id or an empty list if there are none with that id registered 
Returns the registered synchronize participants with the given type id and instance id param id the type indentifier for the participant param secondary Id the instance identifier for this participant type or code null code if this participant doesn t support multiple instances return the registered synchronize participants with the given id or code null code if none with that id is not registered  secondaryId
Opens the synchronize view in the perspective defined by the user in the team synchronize perferences return the opened synchronize view or code null code if it can t be opened 
Returns the participant descriptor for the given participant type id or code null code if a descriptor is not found for that id return the participant descriptor for the given participant id or code null code if a descriptor is not found for that id 

public interface I Synchronize Model Change Listener Called whenever the input model shown in a diff node viewer is updated param input the root code Diff Node code of the model  ISynchronizeModelChangeListener DiffNode

Adds a listener for changes to properties of this synchronize element Has no effect if an identical listener is already registered param listener the listener to register 
Removes the given property change listener from this model element Has no effect if the listener is not registered param listener the listener to remove 
Assigns the given property to this element and all it s parents param property Name the property name to set param value the value of the property  propertyName
Assigns the given property to this element param property Name the property name param value the value of the property  propertyName
Return whether this element has the given property assigned param property Name the property to test for return code true code if the property is set and code false code otherwise  propertyName
The image descriptor describing the given element param element the model element for which to return an image return the image descriptor for the given element 
Returns the resource this element is showing synchronization information for or code null code if the element does not have an associated local resource return the resource this element is showing synchronization information for or code null code if the element does not have an associated local resource 

Initialize this page with workbench part that contains the page This method will be called after the code Page init I Page Site code but before code Page create Control Composite code param part the workbench part for the view containing the page throws Part Init Exception  IPageSite createControl PartInitException
Returns the viewer associated with this page or code null code if the page doesn t have a viewer return the viewer associated with this page or code null code if the page doesn t have a viewer 
Callback that is invoked from the synchronize configuration whenever a property s value is about to be changed The page can react to the change before change events are fired or veto the change param configuration the synchronize page configuration param key the property key param new Value return code true code if the property change should continue to be fired to other listeners or code false code to veto the property change notification  newValue

Return the particpant associated with the page to shich this configuration is associated return the particpant 
Return the site which provieds access to certain workbench services return the page site 
Return the page created from and associated with this configuration return Returns the page for this configuration 
Set the page for this configuration This methpd should only be called once by the link I Synchronze Participant that created the page param page the configuration s page  ISynchronzeParticipant
Add a property change listener to the configuration Registered listeners will receive notification when any property changes param listener a property change listener 
Remove the registered change listener Removing an unregistered listener has no effects param listener a property change listener 
Sets the property with the given name If the new value differs from the old a code Property Change Event code is sent to registered listeners param property Name the name of the property to set param value the new value of the property  PropertyChangeEvent propertyName
Returns the property with the given name or code null code if no such property exists param property Name the name of the property to retrieve return the property with the given name or code null code if not found  propertyName
Register the action group with the configuration The registered action groups will have the oportunity to add actions to the action bars and context menu of the synchronize page created using the configuration param group a synchronize page action group 
Remove a previously registered action group Removing a group that is not registered has no effect param group a synchronize page action group 
Add a label decorator to the page configuration param decorator a label decorator 
Set the groups that are to be added to the menu identified by the menu property id param menu Property Id the menu property id one of code P CONTEXT MENU code code P VIEW MENU code or code P TOOLBAR MENU code param groups a array of groups Ids  menuPropertyId P_CONTEXT_MENU P_VIEW_MENU P_TOOLBAR_MENU
Adds a menu group of the gievn id to the end of the menu groups list for the given menu property id param menu Property Id the menu property id one of code P CONTEXT MENU code code P VIEW MENU code or code P TOOLBAR MENU code param group Id the id of the group to be added to the end of the menu group list  menuPropertyId P_CONTEXT_MENU P_VIEW_MENU P_TOOLBAR_MENU groupId
Returns whether the given group appears in the given menu param menu Property Id the property id that identifies the menu param group Id the id of the group return code true code if the group identified by the group Id appears in the menu identified by the menu Property Id and code false code otherwise  menuPropertyId groupId groupId menuPropertyId
Return the value of the P MODE property of this configuration return the mode property value  P_MODE
Set the P MODE property of this configuration to the given mode flag one of code INCOMING MODE code code OUTGOING MODE code code BOTH MODE code or code CONFLICTING MODE code param mode the mode value  P_MODE INCOMING_MODE OUTGOING_MODE BOTH_MODE CONFLICTING_MODE
Return the value of the P SUPPORTED MODES property of this configuration return the supported modes property value  P_SUPPORTED_MODES
Set the P SUPPORTED MODES property of this configuration to the O Red combination of one or more mode flags code INCOMING MODE code code OUTGOING MODE code code BOTH MODE code and code CONFLICTING MODE code param modes the supported modes  P_SUPPORTED_MODES ORed INCOMING_MODE OUTGOING_MODE BOTH_MODE CONFLICTING_MODE
Return the set associated with the P SYNC INFO SET property or code null code if the property is not set return the set associated with the P SYNC INFO SET property or code null code if the property is not set  P_SYNC_INFO_SET P_SYNC_INFO_SET
Return the comparison type used by the page s code Sync Info code modes return comparison type could be code TWO WAY code code THREE WAY code or a cusom type  SyncInfo TWO_WAY THREE_WAY
Set the comparison type used by the page s code Sync Info code modes The default type is code THREE WAY code param type the comparison type could be code TWO WAY code code THREE WAY code or a cusom type  SyncInfo THREE_WAY TWO_WAY THREE_WAY
Sets the runnable context that can be used by the page s actions to display progress param context a runnable context or null 
Return the runnable context If code null code is returned actions can use their own method of progress feedback either using a background job or the progress service return a runnable context or code null code 

Return the workbench site for the page or code null code if a workbench site is not available e g if the page is being shown in a dialog return the workbench site for the page or code null code 
Return the workbench part for the page or code null code if a workbench part is not available e g if the page is being shown in a dialog return the workbench part for the page or code null code 
Returns the shell for this site return the shell for this site 
Get the selection provider that gives access to the selection of the synchronize page associated with this page site return the selection provider for the page 
Sets the selection provider for this workbench site param provider the selection provider or code null code to clear it 
Get the keybinding service for the site or code null code if one is not available return the keybinding service for the site or code null code if one is not available 
I Key Binding Service get Key Binding Service Give the page focus void set Focus  IKeyBindingService getKeyBindingService setFocus
Return a settings node that can be used by the page to save state A code null code value is returned if the site does not allow for persisted settings return a settings node or code null code 
Returns the action bars for this synchronize page site return the action bars 
Returns whether the site is associated with a page being shown in a modal dialog return whether the site is associated with a page being shown in a modal dialog 

public interface I Synchronize Participant extends I Executable Extension Returns the unique id that identified the i type i of this synchronize participant The synchronize manager supports registering several instances of the same participant type return the unique id that identified the i type i of this synchronize participant  ISynchronizeParticipant IExecutableExtension
Returns the instance id that identified the unique instance of this participant The synchronize manager supports registering several instances of the same participant type and this id is used to differentiate between them return the instance id that identified the unique instance of this participant or code null code if this participant doesn t support multiple instances 
Returns the name of this synchronize participant This name is displayed to the user return the name of this synchronize participant 
Returns an image descriptor for this synchronize participant or code null code if none return an image descriptor for this synchronize participant or code null code if none 
Returns if this participant is pinned Pinned participants will only be removed from the synchronize manager until they are un pinned return code true code if this participant is pinned and code false code otherwise 
Sets whether this participant is pinned param pinned sets if the participant is pinned 
Creates the configuration for the participant page The configuration controls the options for displaying the participant The configuration used to initialize the page when link create Page I Synchronize Page Configuration is called and as such can be used to pre configure visual properties of the displayed page return the configuration for the participant page  createPage ISynchronizePageConfiguration
Creates and returns a new page for this synchronize participant The page is displayed using the parameters from the configuration For example the configuration defines the context in which the page is shown via the link I Synchronize Page Site param configuration used to initialize the page return a page book view page representation of this synchronize participant  ISynchronizePageSite
Runs the participants action Typically this would be some action to refresh the synchronization state of the participant This action is run from the global synchronize drop down param part the part in which the action is run or code null code if the action is not being run in a workbench part 
Initializes this participant with the given participant state A memento is passed to the participant which contains a snapshot of the participants state from a previous session p This method is automatically called by the team plugin shortly after participant construction It marks the start of the views lifecycle Clients must not call this method p param secondary Id the seconday Id of this participant instance or code null code if this participant doesn t support multiple instances param memento the participant state or code null code if there is no previous saved state exception Part Init Exception if this participant was not initialized successfully  secondaryId secondayId PartInitException
Disposes of this synchronize participant and is called to free the resources associated with a participant When a participant is added to the link I Synchronize Manager this method is called when the manager is shutdown or the participant is removed from the manager p p Within this method a participant may release any resources fonts images etc held by this part It is also very important to deregister all listeners p p Clients should not call this method the synchronize manager calls this method at appropriate times p  ISynchronizeManager
Saves the participants object state within the memento This state will be available when the participant is restored via code init code p This method can be called multiple times during the lifetime of the participant object p param memento a memento to receive the object state 
Adds a listener for changes to properties of this synchronize participant Has no effect if an identical listener is already registered p The changes supported by the synchronize view are as follows ul li code I Basic Property Constants P TEXT code indicates the name of a synchronize participant has changed li li code I Basic Property Constants P IMAGE code indicates the image of a synchronize participant has changed li ul p p Clients may define additional properties as required p param listener a property change listener  IBasicPropertyConstants P_TEXT IBasicPropertyConstants P_IMAGE
Removes the given property listener from this synchronize participant Has no effect if an identical listener is not alread registered param listener a property listener 

public interface I Synchronize Participant Descriptor Returns the name of this participant This can be shown to the user return the name of this participant This can be shown to the user  ISynchronizeParticipantDescriptor
Returns a string describing this participant type return a string describing this participant type 
Returns the unique id that identifies this participant type return the unique id that identifies this participant type 
Returns the image descriptor for this participant type return the image descriptor for this participant type 
Returns if this participant can be persisted between sessions return code true code if this participant can be persisted between sessions and false otherwise 

public interface I Synchronize Participant Listener Notification the given participants have been added to the synchronize manager param participants added participants  ISynchronizeParticipantListener
Notification the given participants have been removed from the synchronize manager param participants removed participants 

public interface I Synchronize Participant Reference Returns the id of the participant type referenced by this handle return the id of the participant type references by this handle  ISynchronizeParticipantReference
Returns the secondary id e g instance id of the participant type referenced by this handle or code null code if the participant doesn t support multiple instances return the secondary id of the participant type referenced by this handle or code null code if the participant doesn t support multiple instances 
Returns the fully qualified name of this participant reference This includes the secondary Id if available This can be displayed in the user interface to allow the user to distinguish between multiple instances of a participant return the fully qualified name of this participant reference  secondaryId
Returns the participant referenced by this handle This may trigger loading of the participant and and a result may be long running The method may return code null code if the participant cannot be de referenced return the participant referencesd by this handle 
Returns the descriptor for this participant type return the descriptor for this participant type 

Return the name of the scope return the name of the scope 
Return the root resources that define this scope A return value of code null code indicates that the participant should use its default set of resources return the root resources of code null code 
Add a propety change listener that will get invoked when a property of the reciever cnahges param listener 
Remove a propety change listener Removing an unregistered listener has no effect param listener 
public void remove Property Change Listener I Property Change Listener listener Dispose of the scope when it is no longer needed public void dispose  removePropertyChangeListener IPropertyChangeListener

Displays the given synchronize participant in the Synchronize View This has no effect if this participant is already being displayed param participant participant to be displayed cannot be code null code 
Returns the participant currently being displayed in the Synchronize View or code null code if none return the participant currently being displayed in the Synchronize View or code null code if none 

Creates a dialog with the given title and input The input is not created until the dialog is opened param shell the parent shell or code null code to create a top level shell param title the shell s title param input the compare input to show in the dialog public Participant Page Dialog Shell shell Saveable Part Adapter input I Synchronize Participant participant super shell input this participant participant  ParticipantPageDialog SaveablePartAdapter ISynchronizeParticipant
protected Control create Dialog Area Composite parent2 Composite parent Composite super create Dialog Area parent2 I Synchronize Participant Reference participants TeamUI get Synchronize Manager get Synchronize Participants if participant null particant Registered With Synchronize Manager participant remember Participant Button new Button parent SWT CHECK remember Participant Button set Text Policy bind Participant Compare Dialog 1 NON NLS 1 Dialog apply Dialog Font parent2 return parent  createDialogArea createDialogArea ISynchronizeParticipantReference getSynchronizeManager getSynchronizeParticipants particantRegisteredWithSynchronizeManager rememberParticipantButton rememberParticipantButton setText ParticipantCompareDialog applyDialogFont
protected void button Pressed int button Id if button Id I Dialog Constants OK ID is Remember Participant remember Participant super button Pressed button Id  buttonPressed buttonId buttonId IDialogConstants OK_ID isRememberParticipant rememberParticipant buttonPressed buttonId
private boolean is Remember Participant return get Participant null remember Participant Button null remember Participant Button get Selection  isRememberParticipant getParticipant rememberParticipantButton rememberParticipantButton getSelection
private boolean particant Registered With Synchronize Manager I Synchronize Participant participant return TeamUI get Synchronize Manager get participant get Id participant get Secondary Id null  particantRegisteredWithSynchronizeManager ISynchronizeParticipant getSynchronizeManager getId getSecondaryId
private void remember Participant if get Participant null I Synchronize Manager mgr TeamUI get Synchronize Manager I Synchronize View view mgr show Synchronize View In Active Page mgr add Synchronize Participants new I Synchronize Participant get Participant view display participant  rememberParticipant getParticipant ISynchronizeManager getSynchronizeManager ISynchronizeView showSynchronizeViewInActivePage addSynchronizeParticipants ISynchronizeParticipant getParticipant
Returns the participant showing in this dialog return the participant showing in this dialog protected I Synchronize Participant get Participant return participant  ISynchronizeParticipant getParticipant

class Compare Viewer Pane Site implements I Synchronize Page Site I Selection Provider selection Provider public I Workbench Page get Page return null  CompareViewerPaneSite ISynchronizePageSite ISelectionProvider selectionProvider IWorkbenchPage getPage
public I Selection Provider get Selection Provider if selection Provider null return selection Provider return viewer  ISelectionProvider getSelectionProvider selectionProvider selectionProvider
return viewer public Shell get Shell return dialog Shell  getShell dialogShell
return dialog Shell public I Workbench Window get Workbench Window return null  dialogShell IWorkbenchWindow getWorkbenchWindow
return null public void set Selection Provider I Selection Provider provider selection Provider provider  setSelectionProvider ISelectionProvider selectionProvider
selection Provider provider public Object get Adapter Class adapter return null  selectionProvider getAdapter
return null public I Workbench Site get Workbench Site return null  IWorkbenchSite getWorkbenchSite
return null public I Workbench Part get Part return null  IWorkbenchPart getPart
return null public I Key Binding Service get Key Binding Service return null  IKeyBindingService getKeyBindingService
return null public void set Focus  setFocus
public void set Focus public I Dialog Settings get Page Settings return null  setFocus IDialogSettings getPageSettings
return null public I Action Bars get Action Bars return Participant Page Saveable Part this get Action Bars  IActionBars getActionBars ParticipantPageSaveablePart getActionBars
see org eclipse team ui synchronize I Synchronize Page Site is Modal public boolean is Modal return true  ISynchronizePageSite isModal isModal
Creates a part for the provided participant The page configuration is used when creating the participant page and the resulting compare merge panes will be configured with the provided compare configuration p For example clients can decide if the user can edit the compare panes by calling link Compare Configuration set Left Editable boolean or link Compare Configuration set Right Editable boolean p param shell the parent shell for this part param cc the compare configuration that will be used to create the compare panes param page Configuration the configuration that will be provided to the participant prior to creating the page param participant the participant whose page will be displayed in this part public Participant Page Saveable Part Shell shell Compare Configuration cc I Synchronize Page Configuration page Configuration I Synchronize Participant participant this cc cc this shell shell this participant participant this page Configuration page Configuration f Dirty State Listener new I Property Change Listener public void property Change Property Change Event e String property Name e get Property if Compare Editor Input DIRTY STATE equals property Name boolean changed false Object new Value e get New Value if new Value instanceof Boolean changed Boolean new Value boolean Value set Dirty e get Source changed  CompareConfiguration setLeftEditable CompareConfiguration setRightEditable pageConfiguration ParticipantPageSaveablePart CompareConfiguration ISynchronizePageConfiguration pageConfiguration ISynchronizeParticipant pageConfiguration pageConfiguration fDirtyStateListener IPropertyChangeListener propertyChange PropertyChangeEvent propertyName getProperty CompareEditorInput DIRTY_STATE propertyName newValue getNewValue newValue newValue booleanValue setDirty getSource
public void dispose if title Image null title Image dispose I Workbench Command Support cm PlatformUI get Workbench get Command Support for Iterator it action Handlers iterator it has Next Handler Submission handler Handler Submission it next cm remove Handler Submission handler super dispose  titleImage titleImage IWorkbenchCommandSupport getWorkbench getCommandSupport actionHandlers hasNext HandlerSubmission HandlerSubmission removeHandlerSubmission
public Image get Title Image if title Image null title Image participant get Image Descriptor create Image return title Image  getTitleImage titleImage titleImage getImageDescriptor createImage titleImage
see org eclipse ui I Workbench Part get Title public String get Title return participant get Name  IWorkbenchPart getTitle getTitle getName
see org eclipse ui I Saveable Part is Dirty public boolean is Dirty return f Dirty f Dirty Viewers size 0  ISaveablePart isDirty isDirty fDirty fDirtyViewers
public void content Changed I Content Change Notifier source try if source instanceof Diff Node commit new Null Progress Monitor Diff Node source else if source instanceof Local Resource Typed Element Local Resource Typed Element source commit new Null Progress Monitor catch Core Exception e Utils handle e  contentChanged IContentChangeNotifier DiffNode NullProgressMonitor DiffNode LocalResourceTypedElement LocalResourceTypedElement NullProgressMonitor CoreException
public void do Save I Progress Monitor pm super save Changes pm I Synchronize Model Element root I Synchronize Model Element viewer get Input if root null root instanceof Diff Node try commit pm Diff Node root catch Core Exception e Utils handle e finally set Dirty false  doSave IProgressMonitor saveChanges ISynchronizeModelElement ISynchronizeModelElement getInput DiffNode DiffNode CoreException setDirty
public void create Part Control Composite parent2 Composite parent new Composite parent2 SWT NULL Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout vertical Spacing 0 Grid Data data new Grid Data Grid Data FILL BOTH data grab Excess Horizontal Space true parent set Layout layout parent set Layout Data data dialog Shell parent2 get Shell Splitter vsplitter new Splitter parent SWT VERTICAL vsplitter set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Grid Data VERTICAL ALIGN FILL Grid Data GRAB VERTICAL we need two panes the left for the elements the right one for the structured diff Splitter hsplitter new Splitter vsplitter SWT HORIZONTAL f Edition Pane new Compare Viewer Pane hsplitter SWT BORDER SWT FLAT f Structured Compare Pane new Compare Viewer Switching Pane hsplitter SWT BORDER SWT FLAT false protected Viewer get Viewer Viewer old Viewer Object input if input instanceof I Compare Input return CompareUI find Structure Viewer old Viewer I Compare Input input this cc return null f Structured Compare Pane add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e feed Input2 e get Selection f Edition Pane set Text Policy bind Participant Page Saveable Part 0 NON NLS 1 I Page Book View Page page participant create Page page Configuration Synchronize Page Configuration page Configuration set Site new Compare Viewer Pane Site Tool Bar Manager tbm Compare Viewer Pane get Tool Bar Manager f Edition Pane create Action Bars tbm try I Synchronize Page page init page Configuration get Site catch Part Init Exception e1 page create Control f Edition Pane if page instanceof I Synchronize Page I Synchronize Page page get Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Selection sel event get Selection if sel instanceof I Structured Selection I Structured Selection ss I Structured Selection sel if ss size 1 set Input ss get First Element initialize Diff Viewer I Synchronize Page page get Viewer page set Action Bars get Action Bars f Edition Pane set Content page get Control tbm update true if page instanceof I Synchronize Page this viewer I Synchronize Page page get Viewer f Content Pane new Compare Viewer Switching Pane vsplitter SWT BORDER SWT FLAT protected Viewer get Viewer Viewer old Viewer Object input Viewer new Viewer CompareUI find Content Viewer old Viewer input this cc boolean is New Viewer new Viewer old Viewer if is New Viewer new Viewer instanceof I Property Change Notifier final I Property Change Notifier dsp I Property Change Notifier new Viewer dsp add Property Change Listener f Dirty State Listener Control c new Viewer get Control c add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dsp remove Property Change Listener f Dirty State Listener return new Viewer vsplitter set Weights new int 30 70 set Navigator page Configuration control parent  createPartControl GridLayout GridLayout marginHeight marginWidth verticalSpacing GridData GridData GridData FILL_BOTH grabExcessHorizontalSpace setLayout setLayoutData dialogShell getShell setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridData VERTICAL_ALIGN_FILL GridData GRAB_VERTICAL fEditionPane CompareViewerPane fStructuredComparePane CompareViewerSwitchingPane getViewer oldViewer ICompareInput findStructureViewer oldViewer ICompareInput fStructuredComparePane addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent feedInput2 getSelection fEditionPane setText ParticipantPageSaveablePart IPageBookViewPage createPage pageConfiguration SynchronizePageConfiguration pageConfiguration setSite CompareViewerPaneSite ToolBarManager CompareViewerPane getToolBarManager fEditionPane createActionBars ISynchronizePage pageConfiguration getSite PartInitException createControl fEditionPane ISynchronizePage ISynchronizePage getViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection setInput getFirstElement initializeDiffViewer ISynchronizePage getViewer setActionBars getActionBars fEditionPane setContent getControl ISynchronizePage ISynchronizePage getViewer fContentPane CompareViewerSwitchingPane getViewer oldViewer newViewer findContentViewer oldViewer isNewViewer newViewer oldViewer isNewViewer newViewer IPropertyChangeNotifier IPropertyChangeNotifier IPropertyChangeNotifier newViewer addPropertyChangeListener fDirtyStateListener newViewer getControl addDisposeListener DisposeListener widgetDisposed DisposeEvent removePropertyChangeListener fDirtyStateListener newViewer setWeights setNavigator pageConfiguration
This method should not be called from clients TODO using internal compare classes to support page navigation This is required because we are building our own compare editor input that includes a participant page instead of a viewer public void set Navigator I Synchronize Page Configuration configuration configuration set Property Synchronize Page Configuration P NAVIGATOR new Part Navigator new Object configuration get Property Synchronize Page Configuration P ADVISOR f Structured Compare Pane f Content Pane  setNavigator ISynchronizePageConfiguration setProperty SynchronizePageConfiguration P_NAVIGATOR PartNavigator getProperty SynchronizePageConfiguration P_ADVISOR fStructuredComparePane fContentPane
private void set Input Object input f Content Pane set Input input if f Structured Compare Pane null f Structured Compare Pane set Input input  setInput fContentPane setInput fStructuredComparePane fStructuredComparePane setInput
private void feed Input2 I Selection sel if sel instanceof I Structured Selection I Structured Selection ss I Structured Selection sel if ss size 1 f Content Pane set Input ss get First Element  feedInput2 ISelection IStructuredSelection IStructuredSelection IStructuredSelection fContentPane setInput getFirstElement
Returns the primary control for this part return the primary control for this part public Control get Control return control  getControl
manager busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try node cache Contents monitor hook Content Change Listener node catch Team Exception e Utils handle e finally Update the labels even if the content wasn t fetched correctly This is required because the selection would still of changed Utils update Labels node get Sync Info cc  busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException cacheContents hookContentChangeListener TeamException updateLabels getSyncInfo
Structured Viewer viewer add Open Listener new I Open Listener public void open Open Event event I Selection s event get Selection final Sync Info Model Element node get Element s if node null I Resource resource node get Resource int kind node get Kind if resource null resource get Type I Resource FILE Cache the contents because compare doesn t show progress when calling get Contents on a diff node I Progress Service manager PlatformUI get Workbench get Progress Service try manager busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try node cache Contents monitor hook Content Change Listener node catch Team Exception e Utils handle e finally Update the labels even if the content wasn t fetched correctly This is required because the selection would still of changed Utils update Labels node get Sync Info cc catch Invocation Target Exception e Utils handle e catch Interrupted Exception e return  StructuredViewer addOpenListener IOpenListener OpenEvent ISelection getSelection SyncInfoModelElement getElement IResource getResource getKind getType IResource getContents IProgressService getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException cacheContents hookContentChangeListener TeamException updateLabels getSyncInfo InvocationTargetException InterruptedException
Initialize the diff viewer created for this compare input If a subclass overrides the code create Diff Viewer Composite code method it should invoke this method on the created viewer in order to get the proper labelling in the compare input s contents viewers param viewer the diff viewer created by the compare input private void initialize Diff Viewer Viewer viewer if viewer instanceof Structured Viewer Structured Viewer viewer add Open Listener new I Open Listener public void open Open Event event I Selection s event get Selection final Sync Info Model Element node get Element s if node null I Resource resource node get Resource int kind node get Kind if resource null resource get Type I Resource FILE Cache the contents because compare doesn t show progress when calling get Contents on a diff node I Progress Service manager PlatformUI get Workbench get Progress Service try manager busy Cursor While new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try node cache Contents monitor hook Content Change Listener node catch Team Exception e Utils handle e finally Update the labels even if the content wasn t fetched correctly This is required because the selection would still of changed Utils update Labels node get Sync Info cc catch Invocation Target Exception e Utils handle e catch Interrupted Exception e return  createDiffViewer initializeDiffViewer StructuredViewer StructuredViewer addOpenListener IOpenListener OpenEvent ISelection getSelection SyncInfoModelElement getElement IResource getResource getKind getType IResource getContents IProgressService getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException cacheContents hookContentChangeListener TeamException updateLabels getSyncInfo InvocationTargetException InterruptedException
private void hook Content Change Listener Diff Node node I Typed Element left node get Left if left instanceof I Content Change Notifier I Content Change Notifier left add Content Change Listener this I Typed Element right node get Right if right instanceof I Content Change Notifier I Content Change Notifier right add Content Change Listener this  hookContentChangeListener DiffNode ITypedElement getLeft IContentChangeNotifier IContentChangeNotifier addContentChangeListener ITypedElement getRight IContentChangeNotifier IContentChangeNotifier addContentChangeListener
private Sync Info Model Element get Element I Selection selection if selection null selection instanceof I Structured Selection I Structured Selection ss I Structured Selection selection if ss size 1 Object o ss get First Element if o instanceof Sync Info Model Element return Sync Info Model Element o return null  SyncInfoModelElement getElement ISelection IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement SyncInfoModelElement SyncInfoModelElement
private static void commit I Progress Monitor pm Diff Node node throws Core Exception I Typed Element left node get Left if left instanceof Local Resource Typed Element Local Resource Typed Element left commit pm I Typed Element right node get Right if right instanceof Local Resource Typed Element Local Resource Typed Element right commit pm I Diff Element children node get Children for int i 0 i children length i commit pm Diff Node children i  IProgressMonitor DiffNode CoreException ITypedElement getLeft LocalResourceTypedElement LocalResourceTypedElement ITypedElement getRight LocalResourceTypedElement LocalResourceTypedElement IDiffElement getChildren DiffNode
private void set Dirty boolean dirty boolean confirm Save true Object o cc get Property Compare Editor CONFIRM SAVE PROPERTY if o instanceof Boolean confirm Save Boolean o boolean Value if confirm Save f Dirty dirty if f Dirty f Dirty Viewers clear  setDirty confirmSave getProperty CompareEditor CONFIRM_SAVE_PROPERTY confirmSave booleanValue confirmSave fDirty fDirty fDirtyViewers
private void set Dirty Object source boolean dirty Assert is Not Null source boolean old Dirty f Dirty Viewers size 0 if dirty f Dirty Viewers add source else f Dirty Viewers remove source boolean new Dirty f Dirty Viewers size 0  setDirty isNotNull oldDirty fDirtyViewers fDirtyViewers fDirtyViewers newDirty fDirtyViewers
if action Bars null action Bars new I Action Bars public void clear Global Action Handlers  actionBars actionBars IActionBars clearGlobalActionHandlers
public void clear Global Action Handlers public I Action get Global Action Handler String action Id return null  clearGlobalActionHandlers IAction getGlobalActionHandler actionId
return null public I Menu Manager get Menu Manager return null  IMenuManager getMenuManager
return null public I Status Line Manager get Status Line Manager return null  IStatusLineManager getStatusLineManager
return null public I Tool Bar Manager get Tool Bar Manager return toolbar  IToolBarManager getToolBarManager
public void set Global Action Handler String action Id I Action action I Handler handler new Action Handler action Handler Submission handler Submission new Handler Submission null dialog Shell null action Id handler Priority MEDIUM PlatformUI get Workbench get Command Support add Handler Submission handler Submission action Handlers add handler Submission  setGlobalActionHandler actionId IAction IHandler ActionHandler HandlerSubmission handlerSubmission HandlerSubmission dialogShell actionId getWorkbench getCommandSupport addHandlerSubmission handlerSubmission actionHandlers handlerSubmission
public void update Action Bars  updateActionBars
private void create Action Bars final I Tool Bar Manager toolbar if action Bars null action Bars new I Action Bars public void clear Global Action Handlers public I Action get Global Action Handler String action Id return null public I Menu Manager get Menu Manager return null public I Status Line Manager get Status Line Manager return null public I Tool Bar Manager get Tool Bar Manager return toolbar public void set Global Action Handler String action Id I Action action I Handler handler new Action Handler action Handler Submission handler Submission new Handler Submission null dialog Shell null action Id handler Priority MEDIUM PlatformUI get Workbench get Command Support add Handler Submission handler Submission action Handlers add handler Submission public void update Action Bars  createActionBars IToolBarManager actionBars actionBars IActionBars clearGlobalActionHandlers IAction getGlobalActionHandler actionId IMenuManager getMenuManager IStatusLineManager getStatusLineManager IToolBarManager getToolBarManager setGlobalActionHandler actionId IAction IHandler ActionHandler HandlerSubmission handlerSubmission HandlerSubmission dialogShell actionId getWorkbench getCommandSupport addHandlerSubmission handlerSubmission actionHandlers handlerSubmission updateActionBars
private I Action Bars get Action Bars return action Bars  IActionBars getActionBars actionBars
Return the synchronize page configiration for this part return Returns the page Configuration public I Synchronize Page Configuration get Page Configuration return page Configuration  pageConfiguration ISynchronizePageConfiguration getPageConfiguration pageConfiguration
Return the Synchronize participant for this part return Returns the participant public I Synchronize Participant get Participant return participant  ISynchronizeParticipant getParticipant

Create the resource scope for the given resources param resources the resources that define this scope public Resource Scope I Resource resources this resources resources  ResourceScope IResource
Create this scope from it s previously saved state param memento persisted state that can be restored protected Resource Scope I Memento memento super memento  ResourceScope IMemento
Set the resources that define this scope param resources the resources that define this scope public void set Resources I Resource resources this resources resources fire Roots Changes  setResources IResource fireRootsChanges
see org eclipse team internal ui synchronize Scopable Subscriber Participant I Synchronize Scope get Name public String get Name return Utils convert Selection resources  ScopableSubscriberParticipant ISynchronizeScope getName getName convertSelection
see org eclipse team internal ui synchronize Scopable Subscriber Participant I Synchronize Scope get Roots public I Resource get Roots return resources  ScopableSubscriberParticipant ISynchronizeScope getRoots IResource getRoots
see org eclipse team internal ui synchronize Scopable Subscriber Participant I Synchronize Scope dispose public void dispose Nothing to dispose  ScopableSubscriberParticipant ISynchronizeScope
public void save State I Memento memento if resources null for int i 0 i resources length i I Resource resource resources i I Memento root Node memento create Child CTX ROOT root Node put String CTX ROOT PATH resource get Full Path to String  saveState IMemento IResource IMemento rootNode createChild CTX_ROOT rootNode putString CTX_ROOT_PATH getFullPath toString
protected void init I Memento memento I Memento root Nodes memento get Children CTX ROOT if root Nodes null List resources new Array List for int i 0 i root Nodes length i I Memento root Node root Nodes i I Path path new Path root Node get String CTX ROOT PATH NON NLS 1 I Resource resource Resources Plugin get Workspace get Root find Member path true include phantoms if resource null resources add resource this resources I Resource resources to Array new I Resource resources size  IMemento IMemento rootNodes getChildren CTX_ROOT rootNodes ArrayList rootNodes IMemento rootNode rootNodes IPath rootNode getString CTX_ROOT_PATH IResource ResourcesPlugin getWorkspace getRoot findMember IResource toArray IResource

Constructor initializes the schedule Subclasses must call this method public Subscriber Participant refresh Schedule new Subscriber Refresh Schedule this  SubscriberParticipant refreshSchedule SubscriberRefreshSchedule
Constructor which should be called when creating a particpant whose resources are to be scoped param scope a synchronize scope public Subscriber Participant I Synchronize Scope scope this this scope scope scope add Property Change Listener this  SubscriberParticipant ISynchronizeScope addPropertyChangeListener
see org eclipse team ui sync I Synchronize View Page create Page org eclipse team ui sync I Synchronize View public final I Page Book View Page create Page I Synchronize Page Configuration configuration validate Configuration configuration return new Subscriber Participant Page configuration get Subscriber Sync Info Collector  ISynchronizeViewPage createPage ISynchronizeView IPageBookViewPage createPage ISynchronizePageConfiguration validateConfiguration SubscriberParticipantPage getSubscriberSyncInfoCollector
Returns the resources supervised by this participant It will either be the roots of the subscriber or the resource scope provided when the subscriber was set return the resources supervised by this participant public I Resource get Resources return collector get Roots  IResource getResources getRoots
to consider all roots of the subscriber private void set Resources I Resource roots collector set Roots roots  setResources IResource setRoots
Refresh this participants synchronization state and displays the result in a model dialog param resources param task Name param site public final void refresh In Dialog Shell shell I Resource resources String job Name String task Name I Synchronize Page Configuration configuration I Workbench Site site I Refresh Subscriber Listener listener new Refresh User Notification Policy In Modal Dialog shell task Name configuration this internal Refresh resources job Name task Name site listener  taskName refreshInDialog IResource jobName taskName ISynchronizePageConfiguration IWorkbenchSite IRefreshSubscriberListener RefreshUserNotificationPolicyInModalDialog taskName internalRefresh jobName taskName
Refresh a participant in the background the result of the refresh are shown in the progress view Refreshing can also be considered synchronizing or refreshing the synchronization state Basically this is a long running operation that will update the participants sync info sets with new changes detected on the server param resources the resources to be refreshed param short Task Name the task Name of the background job that will run the synchronize param long Task Name the task Name of the progress monitor running the synchronize param site the workbench site the synchronize is running from This can be used to notify the site that a job is running public final void refresh I Resource resources String short Task Name String long Task Name I Workbench Site site I Refresh Subscriber Listener listener new Refresh User Notification Policy this internal Refresh resources short Task Name long Task Name site listener  shortTaskName taskName longTaskName taskName IResource shortTaskName longTaskName IWorkbenchSite IRefreshSubscriberListener RefreshUserNotificationPolicy internalRefresh shortTaskName longTaskName
Refresh a participant The returned status describes the result of the refresh public final I Status refresh Now I Resource resources String task Name I Progress Monitor monitor Platform get Job Manager cancel this Refresh Subscriber Job job new Refresh Subscriber Job this task Name task Name resources null return job run monitor  IStatus refreshNow IResource taskName IProgressMonitor getJobManager RefreshSubscriberJob RefreshSubscriberJob taskName taskName
public void dispose Platform get Job Manager cancel this refresh Schedule dispose TeamUI remove Property Change Listener this collector dispose scope dispose  getJobManager refreshSchedule removePropertyChangeListener
see org eclipse team ui synchronize Abstract Synchronize Participant get Name public String get Name String name super get Name return Policy bind Subscriber Participant name Pattern name scope get Name NON NLS 1  AbstractSynchronizeParticipant getName getName getName SubscriberParticipant namePattern getName
Returns the code Sync Info Tree code for this participant This set contains the out of sync resources supervised by this participant return the sync info set that contains the out of sync resources for this participant public Sync Info Tree get Sync Info Set return get Subscriber Sync Info Collector get Sync Info Set  SyncInfoTree SyncInfoTree getSyncInfoSet getSubscriberSyncInfoCollector getSyncInfoSet
Return the code Subscriber code associated with this this participant This method will only return code null code if the participant has not been initialized yet return the code Subscriber code associated with this this participant public Subscriber get Subscriber if collector null return null return collector get Subscriber  getSubscriber getSubscriber
Returns a participant that matches the given resource scoping param ID the type id of participants to match param resources the resources to match in the scope return a participant that matches the given resource scoping public static Subscriber Participant get Matching Participant String ID I Resource resources I Synchronize Participant Reference refs TeamUI get Synchronize Manager get Synchronize Participants for int i 0 i refs length i I Synchronize Participant Reference reference refs i if reference get Id equals ID Subscriber Participant p try p Subscriber Participant reference get Participant catch Team Exception e continue I Resource roots p get Resources Arrays sort resources Utils resource Comparator Arrays sort roots Utils resource Comparator if Arrays equals resources roots return p return null  SubscriberParticipant getMatchingParticipant IResource ISynchronizeParticipantReference getSynchronizeManager getSynchronizeParticipants ISynchronizeParticipantReference getId SubscriberParticipant SubscriberParticipant getParticipant TeamException IResource getResources resourceComparator resourceComparator
public void property Change Property Change Event event if event get Property equals TeamUI GLOBAL IGNORES CHANGED collector reset if event get Property equals I Synchronize Scope ROOTS set Resources scope get Roots  propertyChange PropertyChangeEvent getProperty GLOBAL_IGNORES_CHANGED getProperty ISynchronizeScope setResources getRoots
public void init String secondary Id I Memento memento throws Part Init Exception super init secondary Id memento if memento null I Memento settings memento get Child CTX SUBSCRIBER PARTICIPANT SETTINGS if settings null Subscriber Refresh Schedule schedule Subscriber Refresh Schedule init settings get Child CTX SUBSCRIBER SCHEDULE SETTINGS this set Refresh Schedule schedule this scope Abstract Synchronize Scope create Scope settings scope add Property Change Listener this  secondaryId IMemento PartInitException secondaryId IMemento getChild CTX_SUBSCRIBER_PARTICIPANT_SETTINGS SubscriberRefreshSchedule SubscriberRefreshSchedule getChild CTX_SUBSCRIBER_SCHEDULE_SETTINGS setRefreshSchedule AbstractSynchronizeScope createScope addPropertyChangeListener
public void save State I Memento memento super save State memento I Memento settings memento create Child CTX SUBSCRIBER PARTICIPANT SETTINGS refresh Schedule save State settings create Child CTX SUBSCRIBER SCHEDULE SETTINGS Abstract Synchronize Scope save Scope scope settings  saveState IMemento saveState IMemento createChild CTX_SUBSCRIBER_PARTICIPANT_SETTINGS refreshSchedule saveState createChild CTX_SUBSCRIBER_SCHEDULE_SETTINGS AbstractSynchronizeScope saveScope
Reset the sync set of the particpant by repopulating it from scratch public void reset get Subscriber Sync Info Collector reset  getSubscriberSyncInfoCollector
return the code Subscriber Sync Info Collector code for this participant public Subscriber Sync Info Collector get Subscriber Sync Info Collector return collector  SubscriberSyncInfoCollector SubscriberSyncInfoCollector getSubscriberSyncInfoCollector
public void set Refresh Schedule Subscriber Refresh Schedule schedule if refresh Schedule schedule return if refresh Schedule null refresh Schedule dispose this refresh Schedule schedule  setRefreshSchedule SubscriberRefreshSchedule refreshSchedule refreshSchedule refreshSchedule refreshSchedule
Not to be called by clients public Subscriber Refresh Schedule get Refresh Schedule return refresh Schedule  SubscriberRefreshSchedule getRefreshSchedule refreshSchedule
see org eclipse team ui synchronize Abstract Synchronize Participant initialize Configuration org eclipse team ui synchronize I Synchronize Page Configuration protected void initialize Configuration I Synchronize Page Configuration configuration configuration set Property Synchronize Page Configuration P PARTICIPANT SYNC INFO SET collector get Sync Info Set  AbstractSynchronizeParticipant initializeConfiguration ISynchronizePageConfiguration initializeConfiguration ISynchronizePageConfiguration setProperty SynchronizePageConfiguration P_PARTICIPANT_SYNC_INFO_SET getSyncInfoSet
see org eclipse team ui synchronize I Synchronize Participant run org eclipse ui I Workbench Part public void run I Workbench Part part refresh get Resources get Short Task Name get Long Task Name part null part get Site null  ISynchronizeParticipant IWorkbenchPart IWorkbenchPart getResources getShortTaskName getLongTaskName getSite
Returns the short task name e g no more than 25 characters to describe the behavior of the refresh operation to the user This is typically shown in the status line when this subcriber is refreshed in the backgroud When refreshed in the foreground only the long task name is shown return the short task name to show in the status line protected String get Short Task Name return Policy bind Participant synchronizing NON NLS 1  getShortTaskName
Returns the short task name e g no more than 25 characters to describe the behavior of the refresh operation to the user This is typically shown in the status line when this subcriber is refreshed in the backgroud When refreshed in the foreground only the long task name is shown return the short task name to show in the status line protected String get Long Task Name return Policy bind Participant synchronizing NON NLS 1  getLongTaskName
This method is invoked before the given configuration is used to create the page see code create Page I Synchronize Page Configuration code The configuration would have been initialized by code initialize Configuration I Synchronize Page Configuration code but may have also been tailored further This method gives the particpant a chance to validate those changes before the page is created param configuration the page configuration that is about to be used to create a page protected void validate Configuration I Synchronize Page Configuration configuration Do nothing by default  createPage ISynchronizePageConfiguration initializeConfiguration ISynchronizePageConfiguration validateConfiguration ISynchronizePageConfiguration
Subclasses must call this method to initialize the participant Typically this method is called in link init String I Memento This method will initialize the sync info collector param subscriber the subscriber to associate with this participant param roots the root resources to be consider by this participant or code null code if all roots of the subscriber should be considered protected void set Subscriber Subscriber subscriber if scope null scope new Workspace Scope collector new Subscriber Sync Info Collector subscriber scope get Roots listen for global ignore changes TeamUI add Property Change Listener this Start collecting changes collector start Start the refresh now that a subscriber has been added Subscriber Refresh Schedule schedule get Refresh Schedule if schedule is Enabled get Refresh Schedule start Job  IMemento setSubscriber WorkspaceScope SubscriberSyncInfoCollector getRoots addPropertyChangeListener SubscriberRefreshSchedule getRefreshSchedule isEnabled getRefreshSchedule startJob
Provide a filter that is used to filter the contents of the sync info set for the participant Normally all out of sync resources from the subscriber will be included in the participant s set However a filter can be used to exclude some of these out of sync resources if desired p Subsclasses can invoke this method any time after code set Subscriber code has been invoked p param filter a sync info filter protected void set Sync Info Filter Sync Info Filter filter collector set Filter filter  setSubscriber setSyncInfoFilter SyncInfoFilter setFilter
private void internal Refresh I Resource resources String job Name String task Name I Workbench Site site I Refresh Subscriber Listener listener Platform get Job Manager cancel this Refresh Subscriber Job job new Refresh Subscriber Job this job Name task Name resources listener job set User true Utils schedule job site Remember the last participant synchronized TeamUI Plugin get Plugin get Preference Store set Value I Preference Ids SYNCHRONIZING DEFAULT PARTICIPANT get Id TeamUI Plugin get Plugin get Preference Store set Value I Preference Ids SYNCHRONIZING DEFAULT PARTICIPANT SEC ID get Secondary Id  internalRefresh IResource jobName taskName IWorkbenchSite IRefreshSubscriberListener getJobManager RefreshSubscriberJob RefreshSubscriberJob jobName taskName setUser TeamUIPlugin getPlugin getPreferenceStore setValue IPreferenceIds SYNCHRONIZING_DEFAULT_PARTICIPANT getId TeamUIPlugin getPlugin getPreferenceStore setValue IPreferenceIds SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID getSecondaryId
Return the scope that defines the resources displayed by this participant return Returns the scope public I Synchronize Scope get Scope return scope  ISynchronizeScope getScope

Create an action with the given text and configuration By default the action registers for selection change with the selection provider from the configuration s site param text the action s text param configuration the actions synchronize page configuration protected Synchronize Model Action String text I Synchronize Page Configuration configuration this text configuration configuration get Site get Selection Provider  SynchronizeModelAction ISynchronizePageConfiguration getSite getSelectionProvider
Create an action with the given text and configuration By default the action registers for selection change with the given selection provider param text the action s text param configuration the actions synchronize page configuration param selection Provider a selection provider protected Synchronize Model Action String text I Synchronize Page Configuration configuration I Selection Provider selection Provider super text this configuration configuration initialize configuration selection Provider  selectionProvider SynchronizeModelAction ISynchronizePageConfiguration ISelectionProvider selectionProvider selectionProvider
selection Provider add Selection Changed Listener this configuration get Page get Viewer get Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e selection Provider remove Selection Changed Listener Synchronize Model Action this  selectionProvider addSelectionChangedListener getPage getViewer getControl addDisposeListener DisposeListener widgetDisposed DisposeEvent selectionProvider removeSelectionChangedListener SynchronizeModelAction
Method invoked from the constructor The default implementation registers the action as a selection change listener Subclasses may override param configuration the synchronize page configuration param selection Provider a selection provider protected void initialize final I Synchronize Page Configuration configuration final I Selection Provider selection Provider selection Provider add Selection Changed Listener this configuration get Page get Viewer get Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e selection Provider remove Selection Changed Listener Synchronize Model Action this  selectionProvider ISynchronizePageConfiguration ISelectionProvider selectionProvider selectionProvider addSelectionChangedListener getPage getViewer getControl addDisposeListener DisposeListener widgetDisposed DisposeEvent selectionProvider removeSelectionChangedListener SynchronizeModelAction
public void run if needs To Save Dirty Editors if save All Editors confirm Save Of Dirty Editor return try get Subscriber Operation configuration get Filtered Diff Elements run catch Invocation Target Exception e handle e catch Interrupted Exception e handle e  needsToSaveDirtyEditors saveAllEditors confirmSaveOfDirtyEditor getSubscriberOperation getFilteredDiffElements InvocationTargetException InterruptedException
Return whether dirty editor should be saved before this action is run Default is code true code return whether dirty editor should be saved before this action is run protected boolean needs To Save Dirty Editors return true  needsToSaveDirtyEditors
Returns whether the user should be prompted to save dirty editors The default is code true code return whether the user should be prompted to save dirty editors protected boolean confirm Save Of Dirty Editor return true  confirmSaveOfDirtyEditor
Return the subscriber operation associated with this action This operation will be run when the action is run Subclass may implement this method and provide an operation subclass or may override the code run I Action code method directly if they choose not to implement a code Synchronize Model Operation code param configuration the synchronize page configuration for the page to which this action is associated param elements the selected diff element for which this action is enabled return the subscriber operation to be run by this action  IAction SynchronizeModelOperation
Generic error handling code that uses an error dialog to show the error to the user Subclasses can use this method and or override it param e the exception that occurred protected void handle Exception e Utils handle e 
see org eclipse ui actions Base Selection Listener Action update Selection org eclipse jface viewers I Structured Selection protected boolean update Selection I Structured Selection selection super update Selection selection return is Enabled For Selection selection  BaseSelectionListenerAction updateSelection IStructuredSelection updateSelection IStructuredSelection updateSelection isEnabledForSelection
private boolean is Enabled For Selection I Structured Selection selection return Utils has Matching Descendant selection get Sync Info Filter  isEnabledForSelection IStructuredSelection hasMatchingDescendant getSyncInfoFilter
This method returns all instances of I Diff Element that are in the current selection return the selected elements protected final I Diff Element get Selected Diff Elements return Utils get Diff Nodes get Structured Selection to Array  IDiffElement IDiffElement getSelectedDiffElements getDiffNodes getStructuredSelection toArray
Filter uses to filter the user selection to contain only those elements for which this action is enabled Default filter includes all out of sync elements in the current selection Subsclasses may override return a sync info filter which selects all out of sync resources protected Fast Sync Info Filter get Sync Info Filter return new Fast Sync Info Filter  FastSyncInfoFilter getSyncInfoFilter FastSyncInfoFilter
Return the selected diff element for which this action is enabled return the list of selected diff elements for which this action is enabled protected final I Diff Element get Filtered Diff Elements I Diff Element elements get Selected Diff Elements List filtered new Array List for int i 0 i elements length i I Diff Element e elements i if e instanceof Sync Info Model Element Sync Info info Sync Info Model Element e get Sync Info if info null get Sync Info Filter select info filtered add e return I Diff Element filtered to Array new I Diff Element filtered size  IDiffElement getFilteredDiffElements IDiffElement getSelectedDiffElements ArrayList IDiffElement SyncInfoModelElement SyncInfo SyncInfoModelElement getSyncInfo getSyncInfoFilter IDiffElement toArray IDiffElement
Set the selection of this action to the given selection param selection the selection public void selection Changed I Selection selection if selection instanceof I Structured Selection super selection Changed I Structured Selection selection else super selection Changed Structured Selection EMPTY  selectionChanged ISelection IStructuredSelection selectionChanged IStructuredSelection selectionChanged StructuredSelection
Returns the configuration showing this action return the configuration showing this action public I Synchronize Page Configuration get Configuration return configuration  ISynchronizePageConfiguration getConfiguration
Save all dirty editors in the workbench that are open on files that may be affected by this operation Opens a dialog to prompt the user if code confirm code is true Return true if successful Return false if the user has cancelled the command Must be called from the UI thread param confirm prompt the user if true return boolean false if the operation was cancelled public final boolean save All Editors boolean confirm return IDE save All Editors Utils get Resources get Filtered Diff Elements confirm  saveAllEditors saveAllEditors getResources getFilteredDiffElements

private static I Workbench Part get Part I Synchronize Page Configuration configuration if configuration null I Synchronize Page Site site configuration get Site if site null return site get Part return null  IWorkbenchPart getPart ISynchronizePageConfiguration ISynchronizePageSite getSite getPart
private static I Runnable Context get Runnable Context I Synchronize Page Configuration configuration if configuration null return configuration get Runnable Context return null  IRunnableContext getRunnableContext ISynchronizePageConfiguration getRunnableContext
Create an operation that will operate on the given diff elements param configuration the participant configuration in which this operation is run param elements the model elements this operation will run with protected Synchronize Model Operation I Synchronize Page Configuration configuration I Diff Element elements super get Part configuration get Runnable Context configuration this elements elements  SynchronizeModelOperation ISynchronizePageConfiguration IDiffElement getPart getRunnableContext
Returns a sync info set that contains the link Sync Info for the elements of this operations return the sync info set that contains the elements this operation is operating on protected Sync Info Set get Sync Info Set return make Sync Info Set From Selection get Sync Infos  SyncInfo SyncInfoSet getSyncInfoSet makeSyncInfoSetFromSelection getSyncInfos
see org eclipse core runtime jobs Job Change Adapter scheduled org eclipse core runtime jobs I Job Change Event public void scheduled I Job Change Event event super scheduled event mark Busy elements true  JobChangeAdapter IJobChangeEvent IJobChangeEvent markBusy
see org eclipse core runtime jobs Job Change Adapter done org eclipse core runtime jobs I Job Change Event public void done I Job Change Event event mark Busy elements false super done event  JobChangeAdapter IJobChangeEvent IJobChangeEvent markBusy
private void mark Busy I Diff Element elements boolean is Busy for int i 0 i elements length i I Diff Element element elements i if element instanceof I Synchronize Model Element I Synchronize Model Element element set Property To Root I Synchronize Model Element BUSY PROPERTY is Busy  markBusy IDiffElement isBusy IDiffElement ISynchronizeModelElement ISynchronizeModelElement setPropertyToRoot ISynchronizeModelElement BUSY_PROPERTY isBusy
private Sync Info get Sync Infos List filtered new Array List for int i 0 i elements length i I Diff Element e elements i if e instanceof Sync Info Model Element filtered add Sync Info Model Element e get Sync Info return Sync Info filtered to Array new Sync Info filtered size  SyncInfo getSyncInfos ArrayList IDiffElement SyncInfoModelElement SyncInfoModelElement getSyncInfo SyncInfo toArray SyncInfo
Return a sync info set that contains the given sync info private Sync Info Set make Sync Info Set From Selection Sync Info infos return new Sync Info Set infos  SyncInfoSet makeSyncInfoSetFromSelection SyncInfo SyncInfoSet

private I Selection selection protected Visible Roots Selection Provider I Synchronize Model Element element model Changed element  ISelection VisibleRootsSelectionProvider ISynchronizeModelElement modelChanged
public void model Changed I Synchronize Model Element root if root null set Selection Structured Selection EMPTY else set Selection new Structured Selection root  modelChanged ISynchronizeModelElement setSelection StructuredSelection setSelection StructuredSelection
Method declared on I Selection Provider public void add Selection Changed Listener I Selection Changed Listener listener selection Changed Listeners add listener  ISelectionProvider addSelectionChangedListener ISelectionChangedListener selectionChangedListeners
Method declared on I Selection Provider public void remove Selection Changed Listener I Selection Changed Listener listener selection Changed Listeners remove listener  ISelectionProvider removeSelectionChangedListener ISelectionChangedListener selectionChangedListeners
Method declared on I Selection Provider public I Selection get Selection return selection  ISelectionProvider ISelection getSelection
Method declared on I Selection Provider public void set Selection I Selection selection this selection selection selection Changed new Selection Changed Event this get Selection  ISelectionProvider setSelection ISelection selectionChanged SelectionChangedEvent getSelection
final I Selection Changed Listener l I Selection Changed Listener listeners i Platform run new Safe Runnable public void run l selection Changed event  ISelectionChangedListener ISelectionChangedListener SafeRunnable selectionChanged
private void selection Changed final Selection Changed Event event pass on the notification to listeners Object listeners selection Changed Listeners get Listeners for int i 0 i listeners length i final I Selection Changed Listener l I Selection Changed Listener listeners i Platform run new Safe Runnable public void run l selection Changed event  selectionChanged SelectionChangedEvent selectionChangedListeners getListeners ISelectionChangedListener ISelectionChangedListener SafeRunnable selectionChanged
Initialize the actions of this contribution This method will be invoked once before any calls are made to code fille Context Menu code or code set Action Bars code but after the control for the page has been created As a result of this the site of the configuration can be accessed Sublcasses may override this method but must invoke the overriden method param configuration the configuration for the part to which the contribution is associated public void initialize I Synchronize Page Configuration configuration this configuration configuration if visible Root Selection Provider null configuration add Action Contribution visible Root Selection Provider  filleContextMenu setActionBars ISynchronizePageConfiguration visibleRootSelectionProvider addActionContribution visibleRootSelectionProvider
This method is invoked whenever the model being displayed in the view changes This includes when the input to the view changes and when the children of the input change The default implementation of this method does nothing Subclasses may override param root the root of the model being viewed public void model Changed I Synchronize Model Element root Do nothing by default  modelChanged ISynchronizeModelElement
Dispose of the action group Subclasses may override but must invoke the overriden method public void dispose super dispose if configuration null configuration remove Action Contribution this  removeActionContribution
Helper method to find the group of the given id for the page associated with the configuration of this action group The id of the returned group will not match that of the provided id since the group must be modified to ensure that groups are unique accross pages param menu the menu param group Id the id of the group being searched for return the group for the given id or code null code protected I Contribution Item find Group I Contribution Manager menu String group Id if menu null return null I Contribution Item item menu find Synchronize Page Configuration configuration get Group Id group Id if item null Context menus do not change the id item menu find group Id return item  groupId IContributionItem findGroup IContributionManager groupId IContributionItem SynchronizePageConfiguration getGroupId groupId groupId
Helper method to add an action to a group in a menu The action is only added to the menu if the group exists in the menu Calling this method also has no effect if either the menu or action are code null code param manager the menu manager param group Id the group to append the action to param action the action to add return code true code if the group exists and the action was added and code false code if the action was not added protected boolean append To Group I Contribution Manager manager String group Id I Action action if manager null action null return false I Contribution Item group find Group manager group Id if group null manager append To Group group get Id action return true return false  groupId appendToGroup IContributionManager groupId IAction IContributionItem findGroup groupId appendToGroup getId
Helper method to add a contribution item to a group in a menu The item is only added to the menu if the group exists in the menu Calling this method also has no effect if either the menu or item are code null code param manager the menu manager param group Id the group to append the action to param item the item to add return code true code if the group exists and the action was added and code false code if the action was not added protected boolean append To Group I Contribution Manager manager String group Id I Contribution Item item if manager null item null return false I Contribution Item group find Group manager group Id if group null manager append To Group group get Id item return true return false  groupId appendToGroup IContributionManager groupId IContributionItem IContributionItem findGroup groupId appendToGroup getId
Helper method that can be invoked during initialization to add an action to a particular menu one of P TOOLBAR MENU P VIEW MENU P CONTEXT MENU from I Synchronize Page Configuration The action is added to the given group if it is present Otherwise the action is not added to the menu param menu Id the menu id one of P TOOLBAR MENU P VIEW MENU P CONTEXT MENU from I Synchronize Page Configuration param group Id the group id in the menu to which the action is to be added param action the action to be added protected void append To Group String menu Id String group Id I Action action internal Append To Group menu Id group Id action  P_TOOLBAR_MENU P_VIEW_MENU P_CONTEXT_MENU ISynchronizePageConfiguration menuId P_TOOLBAR_MENU P_VIEW_MENU P_CONTEXT_MENU ISynchronizePageConfiguration groupId appendToGroup menuId groupId IAction internalAppendToGroup menuId groupId
Helper method that can be invoked during initialization to add an item to a particular menu one of P TOOLBAR MENU P VIEW MENU P CONTEXT MENU from I Synchronize Page Configuration The item is added to the given group if it is present Otherwise the item is not added to the menu param menu Id the menu id one of P TOOLBAR MENU P VIEW MENU P CONTEXT MENU from I Synchronize Page Configuration param group Id the group id in the menu to which the item is to be added param item the item to be added protected void append To Group String menu Id String group Id I Contribution Item item internal Append To Group menu Id group Id item  P_TOOLBAR_MENU P_VIEW_MENU P_CONTEXT_MENU ISynchronizePageConfiguration menuId P_TOOLBAR_MENU P_VIEW_MENU P_CONTEXT_MENU ISynchronizePageConfiguration groupId appendToGroup menuId groupId IContributionItem internalAppendToGroup menuId groupId
Return a selection provider whose selection includes all roots of the elements visible in the page Selection change events are fired when the elements visible in the view change return a selection provider whgose selection is the roots of all elements visible in the page protected I Selection Provider get Visible Roots Selection Provider if visible Root Selection Provider null I Synchronize Model Element root null if configuration null root I Synchronize Model Element configuration get Property Synchronize Page Configuration P MODEL visible Root Selection Provider new Visible Roots Selection Provider root if configuration null configuration add Action Contribution visible Root Selection Provider return visible Root Selection Provider  ISelectionProvider getVisibleRootsSelectionProvider visibleRootSelectionProvider ISynchronizeModelElement ISynchronizeModelElement getProperty SynchronizePageConfiguration P_MODEL visibleRootSelectionProvider VisibleRootsSelectionProvider addActionContribution visibleRootSelectionProvider visibleRootSelectionProvider
see org eclipse ui actions Action Group fill Context Menu org eclipse jface action I Menu Manager public void fill Context Menu I Menu Manager menu super fill Context Menu menu fill Menu menu I Synchronize Page Configuration P CONTEXT MENU  ActionGroup fillContextMenu IMenuManager fillContextMenu IMenuManager fillContextMenu fillMenu ISynchronizePageConfiguration P_CONTEXT_MENU
public void fill Action Bars I Action Bars action Bars super fill Action Bars action Bars if action Bars null fill Menu action Bars get Menu Manager I Synchronize Page Configuration P VIEW MENU fill Menu action Bars get Tool Bar Manager I Synchronize Page Configuration P TOOLBAR MENU  fillActionBars IActionBars actionBars fillActionBars actionBars actionBars fillMenu actionBars getMenuManager ISynchronizePageConfiguration P_VIEW_MENU fillMenu actionBars getToolBarManager ISynchronizePageConfiguration P_TOOLBAR_MENU
private void fill Menu I Contribution Manager menu String menu Id Map groups Map menu Contributions get menu Id if menu null groups null for Iterator iter groups key Set iterator iter has Next String group Id String iter next List actions List groups get group Id if actions null for Iterator iter2 actions iterator iter2 has Next Object element iter2 next if element instanceof I Action append To Group menu group Id I Action element else if element instanceof I Contribution Item append To Group menu group Id I Contribution Item element  fillMenu IContributionManager menuId menuContributions menuId keySet hasNext groupId groupId hasNext IAction appendToGroup groupId IAction IContributionItem appendToGroup groupId IContributionItem
private void internal Append To Group String menu Id String group Id Object action Map groups Map menu Contributions get menu Id if groups null groups new Hash Map menu Contributions put menu Id groups List actions List groups get group Id if actions null actions new Array List groups put group Id actions actions add action  internalAppendToGroup menuId groupId menuContributions menuId HashMap menuContributions menuId groupId ArrayList groupId

private static class My Diff Node extends Sync Info Model Element public My Diff Node I Diff Container parent Sync Info info super parent info  MyDiffNode SyncInfoModelElement MyDiffNode IDiffContainer SyncInfo
super parent info public void fire Change super fire Change  fireChange fireChange
Creates a compare editor input based on an existing code Sync Info code param description a description of the context of this sync info This is displayed to the user param sync the code Sync Info code used as the base for the compare input public Sync Info Compare Input String description Sync Info sync super get Default Compare Configuration Assert is Not Null sync Assert is Not Null description this description description this resource sync get Local timestamp resource get Local Time Stamp this node new My Diff Node null sync initialize Content Change Listeners  SyncInfo SyncInfo SyncInfoCompareInput SyncInfo getDefaultCompareConfiguration isNotNull isNotNull getLocal getLocalTimeStamp MyDiffNode initializeContentChangeListeners
timestamp resource get Local Time Stamp control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dispose  getLocalTimeStamp addDisposeListener DisposeListener widgetDisposed DisposeEvent
public Control create Contents Composite parent Add a dispose listener to the created control so that we can use this to de register our resource change listener final Control control super create Contents parent See bug 66349 Resources Plugin get Workspace add Resource Change Listener this timestamp resource get Local Time Stamp control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dispose return control  createContents createContents ResourcesPlugin getWorkspace addResourceChangeListener getLocalTimeStamp addDisposeListener DisposeListener widgetDisposed DisposeEvent
public Object get Adapter Class adapter if I File class equals adapter resource get Type I Resource FILE return I File resource return super get Adapter adapter  getAdapter IFile getType IResource IFile getAdapter
private static Compare Configuration get Default Compare Configuration Compare Configuration cc new Compare Configuration cc set Property Compare Configuration USE OUTLINE VIEW true return cc  CompareConfiguration getDefaultCompareConfiguration CompareConfiguration CompareConfiguration setProperty CompareConfiguration USE_OUTLINE_VIEW
I Content Change Notifier te add Content Change Listener new I Content Change Listener public void content Changed I Content Change Notifier source try if is Saving save Changes new Null Progress Monitor catch Core Exception e  IContentChangeNotifier addContentChangeListener IContentChangeListener contentChanged IContentChangeNotifier isSaving saveChanges NullProgressMonitor CoreException
private void initialize Content Change Listeners I Typed Element te node get Left if te instanceof I Content Change Notifier I Content Change Notifier te add Content Change Listener new I Content Change Listener public void content Changed I Content Change Notifier source try if is Saving save Changes new Null Progress Monitor catch Core Exception e  initializeContentChangeListeners ITypedElement getLeft IContentChangeNotifier IContentChangeNotifier addContentChangeListener IContentChangeListener contentChanged IContentChangeNotifier isSaving saveChanges NullProgressMonitor CoreException
UI Job job new UI Job NON NLS 1 public I Status run InUI Thread I Progress Monitor monitor if is Save Needed update Node return Status OK STATUS  UIJob UIJob IStatus runInUIThread IProgressMonitor isSaveNeeded updateNode OK_STATUS
Note that until the compare editor inputs can be part of the compare editors lifecycle we can t register as a listener because there is no dispose method to remove the listener public void resource Changed I Resource Change Event event I Resource Delta delta event get Delta if delta null I Resource Delta resource Delta delta find Member resource get Full Path if resource Delta null UI Job job new UI Job NON NLS 1 public I Status run InUI Thread I Progress Monitor monitor if is Save Needed update Node return Status OK STATUS job set System true job schedule  resourceChanged IResourceChangeEvent IResourceDelta getDelta IResourceDelta resourceDelta findMember getFullPath resourceDelta UIJob UIJob IStatus runInUIThread IProgressMonitor isSaveNeeded updateNode OK_STATUS setSystem
private void dispose See bug 66349 Resources Plugin get Workspace remove Resource Change Listener this  ResourcesPlugin getWorkspace removeResourceChangeListener
public Image get Title Image Image Registry reg TeamUI Plugin get Plugin get Image Registry Image image reg get I TeamUI Images IMG SYNC VIEW if image null image get Image Descriptor create Image reg put I TeamUI Images IMG SYNC VIEW image return image  getTitleImage ImageRegistry TeamUIPlugin getPlugin getImageRegistry ITeamUIImages IMG_SYNC_VIEW getImageDescriptor createImage ITeamUIImages IMG_SYNC_VIEW
protected Object prepare Input I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception update the title now that the remote revision number as been fetched from the server set Title get Title Utils update Labels node get Sync Info get Compare Configuration try node cache Contents monitor catch Team Exception e throw new Invocation Target Exception e return node  prepareInput IProgressMonitor InvocationTargetException InterruptedException setTitle getTitle updateLabels getSyncInfo getCompareConfiguration cacheContents TeamException InvocationTargetException
see org eclipse compare Compare Editor Input get Title public String get Title return Policy bind Sync Info Compare Input title node get Name NON NLS 1  CompareEditorInput getTitle getTitle SyncInfoCompareInput getName
see org eclipse ui I Editor Input get Image Descriptor public Image Descriptor get Image Descriptor return TeamUI Plugin get Image Descriptor I TeamUI Images IMG SYNC VIEW  IEditorInput getImageDescriptor ImageDescriptor getImageDescriptor TeamUIPlugin getImageDescriptor ITeamUIImages IMG_SYNC_VIEW
see org eclipse ui I Editor Input get Tool Tip Text public String get Tool Tip Text return Policy bind Sync Info Compare Input tooltip Utils shorten Text 30 description node get Resource get Full Path to String NON NLS 1  IEditorInput getToolTipText getToolTipText SyncInfoCompareInput shortenText getResource getFullPath toString
public boolean equals Object other if other this return true if other instanceof Sync Info Compare Input Sync Info other Sync Info Sync Info Compare Input other get Sync Info Sync Info this Sync Info get Sync Info I Resource other Resource other Sync Info get Local return this Sync Info equals other Sync Info timestamp other Resource get Local Time Stamp return false  SyncInfoCompareInput SyncInfo otherSyncInfo SyncInfoCompareInput getSyncInfo SyncInfo thisSyncInfo getSyncInfo IResource otherResource otherSyncInfo getLocal thisSyncInfo otherSyncInfo otherResource getLocalTimeStamp
public void save Changes I Progress Monitor pm throws Core Exception if check Update Conflict return try is Saving true super save Changes pm if node null commit pm node finally node fire Change set Dirty false is Saving false timestamp resource get Local Time Stamp  saveChanges IProgressMonitor CoreException checkUpdateConflict isSaving saveChanges fireChange setDirty isSaving getLocalTimeStamp
private boolean check Update Conflict long new Timestamp resource get Local Time Stamp if new Timestamp timestamp final Message Dialog dialog new Message Dialog TeamUI Plugin get Standard Display get Active Shell Policy bind Sync Info Compare Input 0 NON NLS 1 null Policy bind Sync Info Compare Input 1 NON NLS 1 Message Dialog QUESTION new String Policy bind Sync Info Compare Input 2 NON NLS 1 I Dialog Constants CANCEL LABEL 0 int retval dialog open switch retval save case 0 return false cancel case 1 return true return false  checkUpdateConflict newTimestamp getLocalTimeStamp newTimestamp MessageDialog MessageDialog TeamUIPlugin getStandardDisplay getActiveShell SyncInfoCompareInput SyncInfoCompareInput MessageDialog SyncInfoCompareInput IDialogConstants CANCEL_LABEL
private static void commit I Progress Monitor pm Diff Node node throws Core Exception I Typed Element left node get Left if left instanceof Local Resource Typed Element Local Resource Typed Element left commit pm I Typed Element right node get Right if right instanceof Local Resource Typed Element Local Resource Typed Element right commit pm  IProgressMonitor DiffNode CoreException ITypedElement getLeft LocalResourceTypedElement LocalResourceTypedElement ITypedElement getRight LocalResourceTypedElement LocalResourceTypedElement
public Sync Info get Sync Info return node get Sync Info  SyncInfo getSyncInfo getSyncInfo

Create the scope for the subscriber and working set param subscriber the subscriber that defines this scope param set the working set that defines this scope public Working Set Scope I Working Set sets this sets sets PlatformUI get Workbench get Working Set Manager add Property Change Listener this  WorkingSetScope IWorkingSet getWorkbench getWorkingSetManager addPropertyChangeListener
Create this scope from it s previously saved state param memento the memento containing a previous scope information that is used to initialize this scope protected Working Set Scope I Memento memento super memento  WorkingSetScope IMemento
public String get Name if sets length 0 return Policy bind Working Set Scope 0 NON NLS 1 String Buffer name new String Buffer for int i 0 i sets length i I Working Set set sets i name append set get Name if i sets length 1 name append NON NLS 1 return name to String  getName WorkingSetScope StringBuffer StringBuffer IWorkingSet getName toString
public I Resource get Roots if sets length 0 return null Hash Set roots new Hash Set for int i 0 i sets length i I Working Set set sets i I Resource resources Utils get Resources set get Elements add Non Overlapping roots resources return I Resource roots to Array new I Resource roots size  IResource getRoots HashSet HashSet IWorkingSet IResource getResources getElements addNonOverlapping IResource toArray IResource
private void add Non Overlapping Hash Set roots I Resource resources for int i 0 i resources length i I Resource new Resource resources i boolean add true for Iterator iter roots iterator iter has Next I Resource existing Resource I Resource iter next if existing Resource equals new Resource No need to add it since it is already there add false break if existing Resource get Full Path is Prefix Of new Resource get Full Path No need to add it since a parent is already there add false break if new Resource get Full Path is Prefix Of existing Resource get Full Path Remove existing and continue iter remove if add roots add new Resource  addNonOverlapping HashSet IResource IResource newResource hasNext IResource existingResource IResource existingResource newResource existingResource getFullPath isPrefixOf newResource getFullPath newResource getFullPath isPrefixOf existingResource getFullPath newResource
public void property Change Property Change Event event if event get Property I Working Set Manager CHANGE WORKING SET CONTENT CHANGE I Working Set new Set I Working Set event get New Value for int i 0 i sets length i I Working Set set sets i if new Set set fire Roots Changes return  propertyChange PropertyChangeEvent getProperty IWorkingSetManager CHANGE_WORKING_SET_CONTENT_CHANGE IWorkingSet newSet IWorkingSet getNewValue IWorkingSet newSet fireRootsChanges
see org eclipse team ui synchronize I Synchronize Scope dispose public void dispose super dispose PlatformUI get Workbench get Working Set Manager remove Property Change Listener this  ISynchronizeScope getWorkbench getWorkingSetManager removePropertyChangeListener
public void save State I Memento memento super save State memento for int i 0 i sets length i I Working Set set sets i I Memento root Node memento create Child CTX SETS root Node put String CTX SET NAME set get Name  saveState IMemento saveState IWorkingSet IMemento rootNode createChild CTX_SETS rootNode putString CTX_SET_NAME getName
protected void init I Memento memento super init memento I Memento root Nodes memento get Children CTX SETS if root Nodes null List sets new Array List for int i 0 i root Nodes length i I Memento root Node root Nodes i String set Name root Node get String CTX SET NAME I Working Set set PlatformUI get Workbench get Working Set Manager get Working Set set Name if set null sets add set this sets I Working Set sets to Array new I Working Set sets size  IMemento IMemento rootNodes getChildren CTX_SETS rootNodes ArrayList rootNodes IMemento rootNode rootNodes setName rootNode getString CTX_SET_NAME IWorkingSet getWorkbench getWorkingSetManager getWorkingSet setName IWorkingSet toArray IWorkingSet

Create the resource scope that indicates that the subscriber roots should be used public Workspace Scope  WorkspaceScope
see org eclipse team internal ui synchronize Scopable Subscriber Participant I Synchronize Scope get Name public String get Name return Policy bind Workspace Scope 0 NON NLS 1  ScopableSubscriberParticipant ISynchronizeScope getName getName WorkspaceScope
see org eclipse team internal ui synchronize Scopable Subscriber Participant I Synchronize Scope get Roots public I Resource get Roots Return null which indicates to use the subscriber roots return null  ScopableSubscriberParticipant ISynchronizeScope getRoots IResource getRoots

public class Team Images Returns the image descriptor for the given image ID Returns code null code if there is no such image param id the identifier for the image to retrieve return the image descriptor associated with the given ID public static Image Descriptor get Image Descriptor String id return TeamUI Plugin get Image Descriptor id  TeamImages ImageDescriptor getImageDescriptor TeamUIPlugin getImageDescriptor
Convenience method to get an image descriptor for an extension param extension the extension declaring the image param subdirectory And Filename the path to the image return the image descriptor for the extension public static Image Descriptor get Image Descriptor From Extension I Extension extension String subdirectory And Filename return TeamUI Plugin get Image Descriptor From Extension extension subdirectory And Filename  subdirectoryAndFilename ImageDescriptor getImageDescriptorFromExtension IExtension subdirectoryAndFilename TeamUIPlugin getImageDescriptorFromExtension subdirectoryAndFilename

Create an team operation associated with the given part param part the part the operation is associated with or code null code if the operation is to be run without a part protected Team Operation I Workbench Part part this part null  TeamOperation IWorkbenchPart
Create an team operation that will run in the given context param context a runnable context protected Team Operation I Runnable Context context this null context  TeamOperation IRunnableContext
Create an team operation associated with the given part that will run in the given context param part the part the operation is associated with or code null code param context a runnable context protected Team Operation I Workbench Part part I Runnable Context context this part part this context context  TeamOperation IWorkbenchPart IRunnableContext
Return the part that is associated with this operation return Returns the part or code null code public I Workbench Part get Part return part  IWorkbenchPart getPart
Run the operation in a context that is determined by the link can Run As Job hint If this operation can run as a job then it will be run in a background thread Otherwise it will run in the foreground and block the caller public final void run throws Invocation Target Exception Interrupted Exception if should Run get Runnable Context run this  canRunAsJob InvocationTargetException InterruptedException shouldRun getRunnableContext
This method is invoked from the code run code method before the operation is run in the operation s context Subclasses may override in order to perform prechecks to determine if the operation should run This may include prompting the user for information etc return whether the operation should be run protected boolean should Run return true  shouldRun
Returns the scheduling rule that is to be obtained before this operation is executed by it s context or code null code if no scheduling rule is to be obtained If the operation is run as a job the schdulin rule is used as the schduling rule of the job Otherwise it is obtained before execution of the operation occurs p By default no scheduling rule is obtained Sublcasses can override to in order ot obtain a scheduling rule or can obtain schduling rules withing their operation if finer grained schduling is desired return the schduling rule to be obtained by this operation or code null code protected I Scheduling Rule get Scheduling Rule return null  ISchedulingRule getSchedulingRule
Return whether the auto build should be postponed until after the operation is complete The default is to postpone the auto build subclas can override return whether to postpone the auto build while the operation is executing protected boolean is Postpone Autobuild return true  isPostponeAutobuild
If this operation can safely be run in the background then subclasses can override this method and return code true code This will make their action run in a link org eclipse core runtime jobs Job Subsclass that override this method should also override the code get Job Name code method return code true code if this action can be run in the background and code false code otherwise protected boolean can Run As Job return false  getJobName canRunAsJob
Return the job name to be used if the action can run as a job i e if code can Run As Job code returns code true code return the string to be used as the job name protected String get Job Name return NON NLS 1  canRunAsJob getJobName
This method is called to allow subclasses to configure an action that could be run to show the results of the action to the user Default is to return null return an action that could be run to see the results of this operation protected I Action get Goto Action return null  IAction getGotoAction
This method is called to allow subclasses to configure an icon to show when running this operation return an URL to an icon protected URL get Operation Icon return null  getOperationIcon
This method is called to allow subclasses to have the operation remain in the progress indicator even after the job is done return code true code to keep the operation and code false code otherwise protected boolean get Keep Operation return false  getKeepOperation
if can Run As Job Display get Default sync Exec new Runnable public void run shell 0 Utils get Shell get Site  canRunAsJob getDefault syncExec getShell getSite
Return a shell that can be used by the operation to display dialogs etc return a shell protected Shell get Shell final Shell shell new Shell null if can Run As Job Display get Default sync Exec new Runnable public void run shell 0 Utils get Shell get Site else shell 0 Utils get Shell get Site return shell 0  getShell canRunAsJob getDefault syncExec getShell getSite getShell getSite
private I Team Runnable Context get Runnable Context if context null can Run As Job Job Runnable Context context new Job Runnable Context get Job Name get Operation Icon get Goto Action get Keep Operation this get Site context set Postpone Build is Postpone Autobuild context set Scheduling Rule get Scheduling Rule return context else Progress Dialog Runnable Context context new Progress Dialog Runnable Context get Shell context set Postpone Build is Postpone Autobuild context set Scheduling Rule get Scheduling Rule if this context null context set Runnable Context this context return context  ITeamRunnableContext getRunnableContext canRunAsJob JobRunnableContext JobRunnableContext getJobName getOperationIcon getGotoAction getKeepOperation getSite setPostponeBuild isPostponeAutobuild setSchedulingRule getSchedulingRule ProgressDialogRunnableContext ProgressDialogRunnableContext getShell setPostponeBuild isPostponeAutobuild setSchedulingRule getSchedulingRule setRunnableContext
private I Workbench Site get Site I Workbench Site site null if part null site part get Site return site  IWorkbenchSite getSite IWorkbenchSite getSite

Return the synchronize manager return the synchronize manager since 3 0 public static I Synchronize Manager get Synchronize Manager if synchronize Manager null synchronize Manager new Synchronize Manager return synchronize Manager  ISynchronizeManager getSynchronizeManager synchronizeManager synchronizeManager SynchronizeManager synchronizeManager
Register for changes made to Team properties param listener the listener to add public static void add Property Change Listener I Property Change Listener listener TeamUI Plugin add Property Change Listener listener  addPropertyChangeListener IPropertyChangeListener TeamUIPlugin addPropertyChangeListener
Deregister as a Team property changes param listener the listener to remove public static void remove Property Change Listener I Property Change Listener listener TeamUI Plugin remove Property Change Listener listener  removePropertyChangeListener IPropertyChangeListener TeamUIPlugin removePropertyChangeListener

Creates a new tt Copy Range Marker tt for the given offset and length param offset the marker s offset param length the marker s length public Copying Range Marker int offset int length super offset length  CopyRangeMarker CopyingRangeMarker
Copy constructor private Copying Range Marker Copying Range Marker other super other f Text other f Text  CopyingRangeMarker CopyingRangeMarker fText fText
see Text Edit do Copy protected Text Edit do Copy return new Copying Range Marker this  TextEdit doCopy TextEdit doCopy CopyingRangeMarker
protected void accept0 Text Edit Visitor visitor boolean visit Children visitor visit this if visit Children accept Children visitor  TextEditVisitor visitChildren visitChildren acceptChildren
package int perform Document Updating I Document document throws Bad Location Exception f Text document get get Offset get Length f Delta 0 return f Delta  performDocumentUpdating IDocument BadLocationException fText getOffset getLength fDelta fDelta
see Text Edit delete Children package boolean delete Children return false  TextEdit deleteChildren deleteChildren

public static Text Edit perform Text Edit source Partial Copier copier new Partial Copier source accept copier return copier f Result  TextEdit TextEdit PartialCopier PartialCopier fResult
private void manage Copy Text Edit copy if f Result null f Result copy if f Current Parent null f Current Parent add Child copy f Parents add f Current Parent f Current Parent copy  manageCopy TextEdit fResult fResult fCurrentParent fCurrentParent addChild fParents fCurrentParent fCurrentParent
f Current Parent copy public void post Visit Text Edit edit f Current Parent Text Edit f Parents remove f Parents size 1  fCurrentParent postVisit TextEdit fCurrentParent TextEdit fParents fParents
f Current Parent Text Edit f Parents remove f Parents size 1 public boolean visit Node Text Edit edit manage Copy edit do Copy return true  fCurrentParent TextEdit fParents fParents visitNode TextEdit manageCopy doCopy
return true public boolean visit Copy Source Edit edit manage Copy new Range Marker edit get Offset edit get Length return true  CopySourceEdit manageCopy RangeMarker getOffset getLength
return true public boolean visit Copy Target Edit edit manage Copy new Insert Edit edit get Offset edit get Source Edit get Content return true  CopyTargetEdit manageCopy InsertEdit getOffset getSourceEdit getContent
return true public boolean visit Move Source Edit edit manage Copy new Delete Edit edit get Offset edit get Length return true  MoveSourceEdit manageCopy DeleteEdit getOffset getLength
return true public boolean visit Move Target Edit edit manage Copy new Insert Edit edit get Offset edit get Source Edit get Content return true  MoveTargetEdit manageCopy InsertEdit getOffset getSourceEdit getContent
Constructs a new copy source edit param offset the edit s offset param length the edit s length public Copy Source Edit int offset int length super offset length  CopySourceEdit
Constructs a new copy source edit param offset the edit s offset param length the edit s length param target the edit s target public Copy Source Edit int offset int length Copy Target Edit target this offset length set Target Edit target  CopySourceEdit CopyTargetEdit setTargetEdit
private Copy Source Edit Copy Source Edit other super other if other f Modifier null f Modifier other f Modifier copy  CopySourceEdit CopySourceEdit fModifier fModifier fModifier
Returns the associated traget edit or code null code if no target edit is associated yet return the target edit or code null code public Copy Target Edit get Target Edit return f Target  CopyTargetEdit getTargetEdit fTarget
Sets the target edit param edit the new target edit exception Malformed Tree Exception is thrown if the target edit is a direct or indirect child of the source edit public void set Target Edit Copy Target Edit edit throws Malformed Tree Exception Assert is Not Null edit if f Target edit f Target edit f Target set Source Edit this  MalformedTreeException setTargetEdit CopyTargetEdit MalformedTreeException isNotNull fTarget fTarget fTarget setSourceEdit
Returns the current source modifier or code null code if no source modifier is set return the source modifier public I Source Modifier get Source Modifier return f Modifier  ISourceModifier getSourceModifier fModifier
Sets the optional source modifier param modifier the source modifier or code null code if no source modification is need public void set Source Modifier I Source Modifier modifier f Modifier modifier  setSourceModifier ISourceModifier fModifier
see Text Edit do Copy protected Text Edit do Copy return new Copy Source Edit this  TextEdit doCopy TextEdit doCopy CopySourceEdit
protected void accept0 Text Edit Visitor visitor boolean visit Children visitor visit this if visit Children accept Children visitor  TextEditVisitor visitChildren visitChildren acceptChildren
package String get Content The source content can be null if the edit wasn t executed due to an exclusion list of the text edit processor Return the empty string which can be moved without any harm if f Source Content null return NON NLS 1 return f Source Content  getContent fSourceContent fSourceContent
package void clear Content f Source Content null  clearContent fSourceContent
protected void post Process Copy Text Edit Copier copier if f Target null Copy Source Edit source Copy Source Edit copier get Copy this Copy Target Edit target Copy Target Edit copier get Copy f Target if source null target null source set Target Edit target  postProcessCopy TextEditCopier fTarget CopySourceEdit CopySourceEdit getCopy CopyTargetEdit CopyTargetEdit getCopy fTarget setTargetEdit
package int traverse Consistency Check Text Edit Processor processor I Document document List source Edits int result super traverse Consistency Check processor document source Edits Since source computation takes place in a recursive fashion see perform Source Computation we only do something if we don t have a computated source already if f Source Content null if source Edits size result List list new Array List list add this for int i source Edits size i result i source Edits add null source Edits add list else List list List source Edits get result if list null list new Array List source Edits add result list list add this return result  traverseConsistencyCheck TextEditProcessor IDocument sourceEdits traverseConsistencyCheck sourceEdits performSourceComputation fSourceContent sourceEdits ArrayList sourceEdits sourceEdits sourceEdits sourceEdits ArrayList sourceEdits
package void perform Consistency Check Text Edit Processor processor I Document document throws Malformed Tree Exception if f Target null throw new Malformed Tree Exception get Parent this Text Edit Messages get String Copy Source Edit no target NON NLS 1 if f Target get Source Edit this throw new Malformed Tree Exception get Parent this Text Edit Messages get String Copy Source Edit different source NON NLS 1  performConsistencyCheck TextEditProcessor IDocument MalformedTreeException fTarget MalformedTreeException getParent TextEditMessages getString CopySourceEdit no_target fTarget getSourceEdit MalformedTreeException getParent TextEditMessages getString CopySourceEdit different_source
package void traverse Source Computation Text Edit Processor processor I Document document if processor consider Edit this perform Source Computation processor document  traverseSourceComputation TextEditProcessor IDocument considerEdit performSourceComputation
package void perform Source Computation Text Edit Processor processor I Document document try Multi Text Edit root new Multi Text Edit get Offset get Length root internal Set Children internal Get Children f Source Content document get get Offset get Length f Source Root Partial Copier perform root f Source Root move Tree get Offset if f Source Root has Children Edit Document sub Document new Edit Document f Source Content f Source Root apply sub Document Text Edit NONE if needs Transformation apply Transformation sub Document f Source Content sub Document get f Source Root null else if needs Transformation Edit Document sub Document new Edit Document f Source Content apply Transformation sub Document f Source Content sub Document get catch Bad Location Exception cannot Happen Assert is True false  performSourceComputation TextEditProcessor IDocument MultiTextEdit MultiTextEdit getOffset getLength internalSetChildren internalGetChildren fSourceContent getOffset getLength fSourceRoot PartialCopier fSourceRoot moveTree getOffset fSourceRoot hasChildren EditDocument subDocument EditDocument fSourceContent fSourceRoot subDocument TextEdit needsTransformation applyTransformation subDocument fSourceContent subDocument fSourceRoot needsTransformation EditDocument subDocument EditDocument fSourceContent applyTransformation subDocument fSourceContent subDocument BadLocationException cannotHappen isTrue
private boolean needs Transformation return f Modifier null  needsTransformation fModifier
private void apply Transformation I Document document throws Malformed Tree Exception Text Edit new Edit new Multi Text Edit 0 document get Length Replace Edit replaces f Modifier get Modifications document get for int i 0 i replaces length i new Edit add Child replaces i try new Edit apply document Text Edit NONE catch Bad Location Exception cannot Happen Assert is True false  applyTransformation IDocument MalformedTreeException TextEdit newEdit MultiTextEdit getLength ReplaceEdit fModifier getModifications newEdit addChild newEdit TextEdit BadLocationException cannotHappen isTrue
document updating package int perform Document Updating I Document document throws Bad Location Exception f Delta 0 return f Delta  performDocumentUpdating IDocument BadLocationException fDelta fDelta
see Text Edit delete Children package boolean delete Children return false  TextEdit deleteChildren deleteChildren

Constructs a new copy target edit param offset the edit s offset public Copy Target Edit int offset super offset 0  CopyTargetEdit
Constructs an new copy target edit param offset the edit s offset param source the corresponding source edit public Copy Target Edit int offset Copy Source Edit source this offset set Source Edit source  CopyTargetEdit CopySourceEdit setSourceEdit
Copy constructor private Copy Target Edit Copy Target Edit other super other  CopyTargetEdit CopyTargetEdit
Returns the associated source edit or code null code if no source edit is associated yet return the source edit or code null code public Copy Source Edit get Source Edit return f Source  CopySourceEdit getSourceEdit fSource
Sets the source edit param edit the source edit exception Malformed Tree Exception is thrown if the target edit is a direct or indirect child of the source edit public void set Source Edit Copy Source Edit edit throws Malformed Tree Exception Assert is Not Null edit if f Source edit f Source edit f Source set Target Edit this Text Edit parent get Parent while parent null if parent f Source throw new Malformed Tree Exception parent this Text Edit Messages get String Copy Target Edit wrong parent NON NLS 1 parent parent get Parent  MalformedTreeException setSourceEdit CopySourceEdit MalformedTreeException isNotNull fSource fSource fSource setTargetEdit TextEdit getParent fSource MalformedTreeException TextEditMessages getString CopyTargetEdit wrong_parent getParent
see Text Edit do Copy protected Text Edit do Copy return new Copy Target Edit this  TextEdit doCopy TextEdit doCopy CopyTargetEdit
protected void post Process Copy Text Edit Copier copier if f Source null Copy Target Edit target Copy Target Edit copier get Copy this Copy Source Edit source Copy Source Edit copier get Copy f Source if target null source null target set Source Edit source  postProcessCopy TextEditCopier fSource CopyTargetEdit CopyTargetEdit getCopy CopySourceEdit CopySourceEdit getCopy fSource setSourceEdit
protected void accept0 Text Edit Visitor visitor boolean visit Children visitor visit this if visit Children accept Children visitor  TextEditVisitor visitChildren visitChildren acceptChildren
see Text Edit traverse Consistency Check package int traverse Consistency Check Text Edit Processor processor I Document document List source Edits return super traverse Consistency Check processor document source Edits 1  TextEdit traverseConsistencyCheck traverseConsistencyCheck TextEditProcessor IDocument sourceEdits traverseConsistencyCheck sourceEdits
package void perform Consistency Check Text Edit Processor processor I Document document throws Malformed Tree Exception if f Source null throw new Malformed Tree Exception get Parent this Text Edit Messages get String Copy Target Edit no source NON NLS 1 if f Source get Target Edit this throw new Malformed Tree Exception get Parent this Text Edit Messages get String Copy Target Edit different target NON NLS 1  performConsistencyCheck TextEditProcessor IDocument MalformedTreeException fSource MalformedTreeException getParent TextEditMessages getString CopyTargetEdit no_source fSource getTargetEdit MalformedTreeException getParent TextEditMessages getString CopyTargetEdit different_target
package int perform Document Updating I Document document throws Bad Location Exception String source f Source get Content document replace get Offset get Length source f Delta source length get Length f Source clear Content return f Delta  performDocumentUpdating IDocument BadLocationException fSource getContent getOffset getLength fDelta getLength fSource clearContent fDelta
see Text Edit delete Children package boolean delete Children return false  TextEdit deleteChildren deleteChildren

Constructs a new delete edit param offset the offset of the range to replace param length the length of the range to replace public Delete Edit int offset int length super offset length  DeleteEdit
Copy constructor private Delete Edit Delete Edit other super other  DeleteEdit DeleteEdit
see Text Edit do Copy protected Text Edit do Copy return new Delete Edit this  TextEdit doCopy TextEdit doCopy DeleteEdit
protected void accept0 Text Edit Visitor visitor boolean visit Children visitor visit this if visit Children accept Children visitor  TextEditVisitor visitChildren visitChildren acceptChildren
package int perform Document Updating I Document document throws Bad Location Exception document replace get Offset get Length NON NLS 1 f Delta get Length return f Delta  performDocumentUpdating IDocument BadLocationException getOffset getLength fDelta getLength fDelta
see Text Edit delete Children package boolean delete Children return true  TextEdit deleteChildren deleteChildren

private String Buffer f Buffer public Edit Document String content f Buffer new String Buffer content  StringBuffer fBuffer EditDocument fBuffer StringBuffer
public void add Document Listener I Document Listener listener throw new Unsupported Operation Exception  addDocumentListener IDocumentListener UnsupportedOperationException
public void add Document Partitioning Listener I Document Partitioning Listener listener throw new Unsupported Operation Exception  addDocumentPartitioningListener IDocumentPartitioningListener UnsupportedOperationException
public void add Position Position position throws Bad Location Exception throw new Unsupported Operation Exception  addPosition BadLocationException UnsupportedOperationException
public void add Position String category Position position throws Bad Location Exception Bad Position Category Exception throw new Unsupported Operation Exception  addPosition BadLocationException BadPositionCategoryException UnsupportedOperationException
public void add Position Category String category throw new Unsupported Operation Exception  addPositionCategory UnsupportedOperationException
public void add Position Updater I Position Updater updater throw new Unsupported Operation Exception  addPositionUpdater IPositionUpdater UnsupportedOperationException
public void add Prenotified Document Listener I Document Listener document Adapter throw new Unsupported Operation Exception  addPrenotifiedDocumentListener IDocumentListener documentAdapter UnsupportedOperationException
public int compute Index In Category String category int offset throws Bad Location Exception Bad Position Category Exception throw new Unsupported Operation Exception  computeIndexInCategory BadLocationException BadPositionCategoryException UnsupportedOperationException
public int compute Number Of Lines String text throw new Unsupported Operation Exception  computeNumberOfLines UnsupportedOperationException
public I Typed Region compute Partitioning int offset int length throws Bad Location Exception throw new Unsupported Operation Exception  ITypedRegion computePartitioning BadLocationException UnsupportedOperationException
public boolean contains Position String category int offset int length throw new Unsupported Operation Exception  containsPosition UnsupportedOperationException
public boolean contains Position Category String category throw new Unsupported Operation Exception  containsPositionCategory UnsupportedOperationException
public String get return f Buffer to String  fBuffer toString
public String get int offset int length throws Bad Location Exception char result new char length f Buffer get Chars offset offset length result 0 return new String result  BadLocationException fBuffer getChars
public char get Char int offset throws Bad Location Exception throw new Unsupported Operation Exception  getChar BadLocationException UnsupportedOperationException
public String get Content Type int offset throws Bad Location Exception throw new Unsupported Operation Exception  getContentType BadLocationException UnsupportedOperationException
public I Document Partitioner get Document Partitioner throw new Unsupported Operation Exception  IDocumentPartitioner getDocumentPartitioner UnsupportedOperationException
public String get Legal Content Types throw new Unsupported Operation Exception  getLegalContentTypes UnsupportedOperationException
public String get Legal Line Delimiters throw new Unsupported Operation Exception  getLegalLineDelimiters UnsupportedOperationException
public int get Length return f Buffer length  getLength fBuffer
public String get Line Delimiter int line throws Bad Location Exception throw new Unsupported Operation Exception  getLineDelimiter BadLocationException UnsupportedOperationException
public I Region get Line Information int line throws Bad Location Exception throw new Unsupported Operation Exception  IRegion getLineInformation BadLocationException UnsupportedOperationException
public I Region get Line Information Of Offset int offset throws Bad Location Exception throw new Unsupported Operation Exception  IRegion getLineInformationOfOffset BadLocationException UnsupportedOperationException
public int get Line Length int line throws Bad Location Exception throw new Unsupported Operation Exception  getLineLength BadLocationException UnsupportedOperationException
public int get Line Offset int line throws Bad Location Exception throw new Unsupported Operation Exception  getLineOffset BadLocationException UnsupportedOperationException
public int get Line Of Offset int offset throws Bad Location Exception throw new Unsupported Operation Exception  getLineOfOffset BadLocationException UnsupportedOperationException
public int get Number Of Lines throw new Unsupported Operation Exception  getNumberOfLines UnsupportedOperationException
public int get Number Of Lines int offset int length throws Bad Location Exception throw new Unsupported Operation Exception  getNumberOfLines BadLocationException UnsupportedOperationException
public I Typed Region get Partition int offset throws Bad Location Exception throw new Unsupported Operation Exception  ITypedRegion getPartition BadLocationException UnsupportedOperationException
public String get Position Categories throw new Unsupported Operation Exception  getPositionCategories UnsupportedOperationException
public Position get Positions String category throws Bad Position Category Exception throw new Unsupported Operation Exception  getPositions BadPositionCategoryException UnsupportedOperationException
public I Position Updater get Position Updaters throw new Unsupported Operation Exception  IPositionUpdater getPositionUpdaters UnsupportedOperationException
public void insert Position Updater I Position Updater updater int index throw new Unsupported Operation Exception  insertPositionUpdater IPositionUpdater UnsupportedOperationException
public void remove Document Listener I Document Listener listener throw new Unsupported Operation Exception  removeDocumentListener IDocumentListener UnsupportedOperationException
public void remove Document Partitioning Listener I Document Partitioning Listener listener throw new Unsupported Operation Exception  removeDocumentPartitioningListener IDocumentPartitioningListener UnsupportedOperationException
public void remove Position Position position throw new Unsupported Operation Exception  removePosition UnsupportedOperationException
public void remove Position String category Position position throws Bad Position Category Exception throw new Unsupported Operation Exception  removePosition BadPositionCategoryException UnsupportedOperationException
public void remove Position Category String category throws Bad Position Category Exception throw new Unsupported Operation Exception  removePositionCategory BadPositionCategoryException UnsupportedOperationException
public void remove Position Updater I Position Updater updater throw new Unsupported Operation Exception  removePositionUpdater IPositionUpdater UnsupportedOperationException
public void remove Prenotified Document Listener I Document Listener document Adapter throw new Unsupported Operation Exception  removePrenotifiedDocumentListener IDocumentListener documentAdapter UnsupportedOperationException
public void replace int offset int length String text throws Bad Location Exception f Buffer replace offset offset length text  BadLocationException fBuffer
public int search int start Offset String find String boolean forward Search boolean case Sensitive boolean whole Word throws Bad Location Exception throw new Unsupported Operation Exception  startOffset findString forwardSearch caseSensitive wholeWord BadLocationException UnsupportedOperationException
public void set String text throw new Unsupported Operation Exception  UnsupportedOperationException
public void set Document Partitioner I Document Partitioner partitioner throw new Unsupported Operation Exception  setDocumentPartitioner IDocumentPartitioner UnsupportedOperationException

Constructs a new insert edit param offset the insertion offset param text the text to insert public Insert Edit int offset String text super offset 0 f Text text  InsertEdit fText
Copy constructor private Insert Edit Insert Edit other super other f Text other f Text  InsertEdit InsertEdit fText fText
Returns the text to be inserted return the edit s text public String get Text return f Text  getText fText
see Text Edit do Copy protected Text Edit do Copy return new Insert Edit this  TextEdit doCopy TextEdit doCopy InsertEdit
protected void accept0 Text Edit Visitor visitor boolean visit Children visitor visit this if visit Children accept Children visitor  TextEditVisitor visitChildren visitChildren acceptChildren
package int perform Document Updating I Document document throws Bad Location Exception document replace get Offset get Length f Text f Delta f Text length get Length return f Delta  performDocumentUpdating IDocument BadLocationException getOffset getLength fText fDelta fText getLength fDelta
see Text Edit delete Children package boolean delete Children return false  TextEdit deleteChildren deleteChildren
see java lang Object to String public String to String return super to String f Text NON NLS 1  toString toString toString fText

public interface I Source Modifier Returns the modification to be done to the passed string in form of replace edits The set of returned replace edits must modify disjoint text regions Violating this requirement will result in a code Bad Location Exception code while executing the associated move or copy edit p The caller of this method is responsible to apply the returned edits to the passed source param source the source to be copied or moved return an array of code Replace Edits code describing the modifications  ISourceModifier BadLocationException ReplaceEdits
Creates a copy of this source modifier object The copy will be used in a different text edit object So it should be created in a way that is doesn t conflict with other text edits refering to this source modifier return the copy of the source modifier 

Constructs a new malformed tree exception param parent the parent edit param child the child edit param message the detail message public Malformed Tree Exception Text Edit parent Text Edit child String message super message f Parent parent f Child child  MalformedTreeException TextEdit TextEdit fParent fChild
Returns the parent edit that caused the exception return the parent edit public Text Edit get Parent return f Parent  TextEdit getParent fParent
Returns the child edit that caused the exception return the child edit public Text Edit get Child return f Child  TextEdit getChild fChild
package void set Parent Text Edit parent f Parent parent  setParent TextEdit fParent

Constructs a new move source edit param offset the edit s offset param length the edit s length public Move Source Edit int offset int length super offset length  MoveSourceEdit
Constructs a new copy source edit param offset the edit s offset param length the edit s length param target the edit s target public Move Source Edit int offset int length Move Target Edit target this offset length set Target Edit target  MoveSourceEdit MoveTargetEdit setTargetEdit
private Move Source Edit Move Source Edit other super other if other f Modifier null f Modifier other f Modifier copy  MoveSourceEdit MoveSourceEdit fModifier fModifier fModifier
Returns the associated traget edit or code null code if no target edit is associated yet return the target edit or code null code public Move Target Edit get Target Edit return f Target  MoveTargetEdit getTargetEdit fTarget
Sets the target edit param edit the new target edit exception Malformed Tree Exception is thrown if the target edit is a direct or indirect child of the source edit public void set Target Edit Move Target Edit edit f Target edit f Target set Source Edit this  MalformedTreeException setTargetEdit MoveTargetEdit fTarget fTarget setSourceEdit
Returns the current source modifier or code null code if no source modifier is set return the source modifier public I Source Modifier get Source Modifier return f Modifier  ISourceModifier getSourceModifier fModifier
Sets the optional source modifier param modifier the source modifier or code null code if no source modification is need public void set Source Modifier I Source Modifier modifier f Modifier modifier  setSourceModifier ISourceModifier fModifier
package String get Content The source content can be null if the edit wasn t executed due to an exclusion list of the text edit processor Return the empty string which can be moved without any harm if f Source Content null return NON NLS 1 return f Source Content  getContent fSourceContent fSourceContent
package Multi Text Edit get Root return f Source Root  MultiTextEdit getRoot fSourceRoot
package void clear Content f Source Content null f Source Root null  clearContent fSourceContent fSourceRoot
see Text Edit do Copy protected Text Edit do Copy return new Move Source Edit this  TextEdit doCopy TextEdit doCopy MoveSourceEdit
protected void post Process Copy Text Edit Copier copier if f Target null Move Source Edit source Move Source Edit copier get Copy this Move Target Edit target Move Target Edit copier get Copy f Target if source null target null source set Target Edit target  postProcessCopy TextEditCopier fTarget MoveSourceEdit MoveSourceEdit getCopy MoveTargetEdit MoveTargetEdit getCopy fTarget setTargetEdit
protected void accept0 Text Edit Visitor visitor boolean visit Children visitor visit this if visit Children accept Children visitor  TextEditVisitor visitChildren visitChildren acceptChildren
package int traverse Consistency Check Text Edit Processor processor I Document document List source Edits int result super traverse Consistency Check processor document source Edits Since source computation takes place in a recursive fashion see perform Source Computation we only do something if we don t have a computated source already if f Source Content null if source Edits size result List list new Array List list add this for int i source Edits size i result i source Edits add null source Edits add list else List list List source Edits get result if list null list new Array List source Edits add result list list add this return result  traverseConsistencyCheck TextEditProcessor IDocument sourceEdits traverseConsistencyCheck sourceEdits performSourceComputation fSourceContent sourceEdits ArrayList sourceEdits sourceEdits sourceEdits sourceEdits ArrayList sourceEdits
package void perform Consistency Check Text Edit Processor processor I Document document throws Malformed Tree Exception if f Target null throw new Malformed Tree Exception get Parent this Text Edit Messages get String Move Source Edit no target NON NLS 1 if f Target get Source Edit this throw new Malformed Tree Exception get Parent this Text Edit Messages get String Move Source Edit different source NON NLS 1  performConsistencyCheck TextEditProcessor IDocument MalformedTreeException fTarget MalformedTreeException getParent TextEditMessages getString MoveSourceEdit no_target fTarget getSourceEdit MalformedTreeException getParent TextEditMessages getString MoveSourceEdit different_source
package void traverse Source Computation Text Edit Processor processor I Document document if processor consider Edit this perform Source Computation processor document  traverseSourceComputation TextEditProcessor IDocument considerEdit performSourceComputation
package void perform Source Computation Text Edit Processor processor I Document document try Text Edit children remove Children if children length 0 String content document get get Offset get Length Edit Document sub Document new Edit Document content f Source Root new Multi Text Edit get Offset get Length f Source Root add Children children f Source Root move Tree get Offset int processing Style get Style processor f Source Root apply sub Document processing Style if needs Transformation apply Transformation sub Document processing Style f Source Content sub Document get else f Source Content document get get Offset get Length if needs Transformation Edit Document sub Document new Edit Document f Source Content apply Transformation sub Document get Style processor f Source Content sub Document get catch Bad Location Exception cannot Happen Assert is True false  performSourceComputation TextEditProcessor IDocument TextEdit removeChildren getOffset getLength EditDocument subDocument EditDocument fSourceRoot MultiTextEdit getOffset getLength fSourceRoot addChildren fSourceRoot moveTree getOffset processingStyle getStyle fSourceRoot subDocument processingStyle needsTransformation applyTransformation subDocument processingStyle fSourceContent subDocument fSourceContent getOffset getLength needsTransformation EditDocument subDocument EditDocument fSourceContent applyTransformation subDocument getStyle fSourceContent subDocument BadLocationException cannotHappen isTrue
private int get Style Text Edit Processor processor we never need undo while performing local edits if processor get Style Text Edit UPDATE REGIONS 0 return Text Edit UPDATE REGIONS return Text Edit NONE  getStyle TextEditProcessor getStyle TextEdit UPDATE_REGIONS TextEdit UPDATE_REGIONS TextEdit
package int perform Document Updating I Document document throws Bad Location Exception document replace get Offset get Length NON NLS 1 f Delta get Length return f Delta  performDocumentUpdating IDocument BadLocationException getOffset getLength fDelta getLength fDelta
see Text Edit delete Children package boolean delete Children return false  TextEdit deleteChildren deleteChildren
content transformation private boolean needs Transformation return f Modifier null  needsTransformation fModifier
private void apply Transformation I Document document int style throws Malformed Tree Exception if style Text Edit UPDATE REGIONS 0 f Source Root null Map edit Map new Hash Map Text Edit new Edit create Edit edit Map List replaces new Array List Arrays as List f Modifier get Modifications document get insert Edits new Edit replaces try new Edit apply document style catch Bad Location Exception cannot Happen Assert is True false restore Positions edit Map else Multi Text Edit new Edit new Multi Text Edit 0 document get Length Text Edit replaces f Modifier get Modifications document get for int i 0 i replaces length i new Edit add Child replaces i try new Edit apply document style catch Bad Location Exception cannot Happen Assert is True false  applyTransformation IDocument MalformedTreeException TextEdit UPDATE_REGIONS fSourceRoot editMap HashMap TextEdit newEdit createEdit editMap ArrayList asList fModifier getModifications insertEdits newEdit newEdit BadLocationException cannotHappen isTrue restorePositions editMap MultiTextEdit newEdit MultiTextEdit getLength TextEdit fModifier getModifications newEdit addChild newEdit BadLocationException cannotHappen isTrue
private Text Edit create Edit Map edit Map Multi Text Edit result new Multi Text Edit 0 f Source Root get Length edit Map put result f Source Root create Edit f Source Root result edit Map return result  TextEdit createEdit editMap MultiTextEdit MultiTextEdit fSourceRoot getLength editMap fSourceRoot createEdit fSourceRoot editMap
private static void create Edit Text Edit source Text Edit target Map edit Map Text Edit children source get Children for int i 0 i children length i Text Edit child children i a deleted child remains deleted even if the temporary buffer gets modified if child is Deleted continue Range Marker marker new Range Marker child get Offset child get Length target add Child marker edit Map put marker child create Edit child marker edit Map  createEdit TextEdit TextEdit editMap TextEdit getChildren TextEdit isDeleted RangeMarker RangeMarker getOffset getLength addChild editMap createEdit editMap
private void insert Edits Text Edit root List edits while edits size 0 Replace Edit edit Replace Edit edits remove 0 insert root edit edits  insertEdits TextEdit ReplaceEdit ReplaceEdit
private static void insert Text Edit parent Replace Edit edit List edits if parent has Children parent add Child edit return Text Edit children parent get Children First dive down to find the right parent for int i 0 i children length i Text Edit child children i if child covers edit insert child edit edits return else if edit covers child parent remove Child i edit add Child child else I Region intersect intersect edit child if intersect null Replace Edit splits split Edit edit intersect insert child splits 0 edits edits add splits 1 parent add Child edit  TextEdit ReplaceEdit hasChildren addChild TextEdit getChildren TextEdit removeChild addChild IRegion ReplaceEdit splitEdit addChild
public static I Region intersect Text Edit op1 Text Edit op2 int offset1 op1 get Offset int length1 op1 get Length int end1 offset1 length1 1 int offset2 op2 get Offset if end1 offset2 return null int length2 op2 get Length int end2 offset2 length2 1 if end2 offset1 return null if offset1 offset2 int end Math max end1 end2 return new Region offset2 end offset2 1 else int end Math max end1 end2 return new Region offset1 end offset1 1  IRegion TextEdit TextEdit getOffset getLength getOffset getLength
private static Replace Edit split Edit Replace Edit edit I Region intersect if edit get Offset intersect get Offset return split Intersect Right edit intersect else return split Intersect Left edit intersect  ReplaceEdit splitEdit ReplaceEdit IRegion getOffset getOffset splitIntersectRight splitIntersectLeft
private static Replace Edit split Intersect Right Replace Edit edit I Region intersect Replace Edit result new Replace Edit 2 this is the actual delete We use replace to only deal with one type result 0 new Replace Edit intersect get Offset intersect get Length NON NLS 1 result 1 new Replace Edit edit get Offset intersect get Offset edit get Offset edit get Text return result  ReplaceEdit splitIntersectRight ReplaceEdit IRegion ReplaceEdit ReplaceEdit ReplaceEdit getOffset getLength ReplaceEdit getOffset getOffset getOffset getText
private static Replace Edit split Intersect Left Replace Edit edit I Region intersect Replace Edit result new Replace Edit 2 result 0 new Replace Edit intersect get Offset intersect get Length edit get Text result 1 new Replace Edit this is the actual delete We use replace to only deal with one type intersect get Offset intersect get Length edit get Length intersect get Length NON NLS 1 return result  ReplaceEdit splitIntersectLeft ReplaceEdit IRegion ReplaceEdit ReplaceEdit ReplaceEdit getOffset getLength getText ReplaceEdit getOffset getLength getLength getLength
private static void restore Positions Map edit Map for Iterator iter edit Map key Set iterator iter has Next Text Edit marker Text Edit iter next Text Edit edit Text Edit edit Map get marker if marker is Deleted edit mark As Deleted else edit adjust Offset marker get Offset edit get Offset edit adjust Length marker get Length edit get Length  restorePositions editMap editMap keySet hasNext TextEdit TextEdit TextEdit TextEdit editMap isDeleted markAsDeleted adjustOffset getOffset getOffset adjustLength getLength getLength

Constructs a new move target edit param offset the edit s offset public Move Target Edit int offset super offset 0  MoveTargetEdit
Constructs an new move target edit param offset the edit s offset param source the corresponding source edit public Move Target Edit int offset Move Source Edit source this offset set Source Edit source  MoveTargetEdit MoveSourceEdit setSourceEdit
Copy constructor private Move Target Edit Move Target Edit other super other  MoveTargetEdit MoveTargetEdit
Returns the associated source edit or code null code if no source edit is associated yet return the source edit or code null code public Move Source Edit get Source Edit return f Source  MoveSourceEdit getSourceEdit fSource
Sets the source edit param edit the source edit exception Malformed Tree Exception is thrown if the target edit is a direct or indirect child of the source edit public void set Source Edit Move Source Edit edit if f Source edit f Source edit f Source set Target Edit this Text Edit parent get Parent while parent null if parent f Source throw new Malformed Tree Exception parent this Text Edit Messages get String Move Target Edit wrong parent NON NLS 1 parent parent get Parent  MalformedTreeException setSourceEdit MoveSourceEdit fSource fSource fSource setTargetEdit TextEdit getParent fSource MalformedTreeException TextEditMessages getString MoveTargetEdit wrong_parent getParent
see Text Edit do Copy protected Text Edit do Copy return new Move Target Edit this  TextEdit doCopy TextEdit doCopy MoveTargetEdit
protected void post Process Copy Text Edit Copier copier if f Source null Move Target Edit target Move Target Edit copier get Copy this Move Source Edit source Move Source Edit copier get Copy f Source if target null source null target set Source Edit source  postProcessCopy TextEditCopier fSource MoveTargetEdit MoveTargetEdit getCopy MoveSourceEdit MoveSourceEdit getCopy fSource setSourceEdit
protected void accept0 Text Edit Visitor visitor boolean visit Children visitor visit this if visit Children accept Children visitor  TextEditVisitor visitChildren visitChildren acceptChildren
see Text Edit traverse Consistency Check package int traverse Consistency Check Text Edit Processor processor I Document document List source Edits return super traverse Consistency Check processor document source Edits 1  TextEdit traverseConsistencyCheck traverseConsistencyCheck TextEditProcessor IDocument sourceEdits traverseConsistencyCheck sourceEdits
package void perform Consistency Check Text Edit Processor processor I Document document throws Malformed Tree Exception if f Source null throw new Malformed Tree Exception get Parent this Text Edit Messages get String Move Target Edit no source NON NLS 1 if f Source get Target Edit this throw new Malformed Tree Exception get Parent this Text Edit Messages get String Move Target Edit different target NON NLS 1  performConsistencyCheck TextEditProcessor IDocument MalformedTreeException fSource MalformedTreeException getParent TextEditMessages getString MoveTargetEdit no_source fSource getTargetEdit MalformedTreeException getParent TextEditMessages getString MoveTargetEdit different_target
package int perform Document Updating I Document document throws Bad Location Exception String source f Source get Content document replace get Offset get Length source f Delta source length get Length Multi Text Edit source Root f Source get Root if source Root null source Root move Tree get Offset Text Edit source Children source Root remove Children List children new Array List source Children length for int i 0 i source Children length i Text Edit child source Children i child internal Set Parent this children add child internal Set Children children f Source clear Content return f Delta  performDocumentUpdating IDocument BadLocationException fSource getContent getOffset getLength fDelta getLength MultiTextEdit sourceRoot fSource getRoot sourceRoot sourceRoot moveTree getOffset TextEdit sourceChildren sourceRoot removeChildren ArrayList sourceChildren sourceChildren TextEdit sourceChildren internalSetParent internalSetChildren fSource clearContent fDelta
package int traverse Region Updating Text Edit Processor processor I Document document int accumulated Delta boolean delete the children got already updated normalized while they got removed from the source edit So we only have to adjust the offset computed to far if delete delete Tree else move Tree accumulated Delta return accumulated Delta f Delta  traverseRegionUpdating TextEditProcessor IDocument accumulatedDelta deleteTree moveTree accumulatedDelta accumulatedDelta fDelta
package boolean delete Children return false  deleteChildren

Creates a new code Multi Text Edit code The range of the edit is determined by the range of its children Adding this edit to a parent edit sets its range to the range covered by its children If the edit doesn t have any children its offset is set to the parent s offset and its length is set to 0 public Multi Text Edit super 0 Integer MAX VALUE f Defined false  MultiTextEdit MultiTextEdit MAX_VALUE fDefined
Creates a new code Multi Text Edit code for the given range Adding a child to this edit which isn t covered by the given range will result in an exception param offset the edit s offset param length the edit s length see Text Edit add Child Text Edit see Text Edit add Children Text Edit public Multi Text Edit int offset int length super offset length f Defined true  MultiTextEdit TextEdit addChild TextEdit TextEdit addChildren TextEdit MultiTextEdit fDefined
Copy constructor protected Multi Text Edit Multi Text Edit other super other  MultiTextEdit MultiTextEdit
Checks the edit s integrity p Note that this method b should only be called b by the edit framework and not by normal clients p p This default implementation does nothing Subclasses may override if needed p exception Malformed Tree Exception if the edit isn t in a valid state and can therefore not be executed protected void check Integrity throws Malformed Tree Exception does nothing  MalformedTreeException checkIntegrity MalformedTreeException
see org eclipse text edits Text Edit can Zero Length Cover protected boolean can Zero Length Cover return true  TextEdit canZeroLengthCover canZeroLengthCover
see Text Edit copy protected Text Edit do Copy Assert is True Multi Text Edit class get Class Subclasses must reimplement copy0 NON NLS 1 return new Multi Text Edit this  TextEdit TextEdit doCopy isTrue MultiTextEdit getClass MultiTextEdit
protected void accept0 Text Edit Visitor visitor boolean visit Children visitor visit this if visit Children accept Children visitor  TextEditVisitor visitChildren visitChildren acceptChildren
see Text Edit perform Consistency Check package void perform Consistency Check Text Edit Processor processor I Document document throws Malformed Tree Exception check Integrity  TextEdit performConsistencyCheck performConsistencyCheck TextEditProcessor IDocument MalformedTreeException checkIntegrity
see Text Edit perform Document Updating package int perform Document Updating I Document document throws Bad Location Exception f Delta 0 return f Delta  TextEdit performDocumentUpdating performDocumentUpdating IDocument BadLocationException fDelta fDelta
see Text Edit delete Children package boolean delete Children return false  TextEdit deleteChildren deleteChildren
package void about To Be Added Text Edit parent define Region parent get Offset  aboutToBeAdded TextEdit defineRegion getOffset
package void define Region int parent Offset if f Defined return if has Children I Region region get Coverage get Children internal Set Offset region get Offset internal Set Length region get Length else internal Set Offset parent Offset internal Set Length 0 f Defined true  defineRegion parentOffset fDefined hasChildren IRegion getCoverage getChildren internalSetOffset getOffset internalSetLength getLength internalSetOffset parentOffset internalSetLength fDefined

Creates a new range marker for the given offset and length param offset the marker s offset param length the marker s length public Range Marker int offset int length super offset length  RangeMarker
Copy constructor private Range Marker Range Marker other super other  RangeMarker RangeMarker
see Text Edit copy protected Text Edit do Copy return new Range Marker this  TextEdit TextEdit doCopy RangeMarker
protected void accept0 Text Edit Visitor visitor boolean visit Children visitor visit this if visit Children accept Children visitor  TextEditVisitor visitChildren visitChildren acceptChildren
see Text Edit perform Document Updating package int perform Document Updating I Document document throws Bad Location Exception f Delta 0 return f Delta  TextEdit performDocumentUpdating performDocumentUpdating IDocument BadLocationException fDelta fDelta
see Text Edit delete Children package boolean delete Children return false  TextEdit deleteChildren deleteChildren

Constructs a new replace edit param offset the offset of the range to replace param length the length of the range to replace param text the new text public Replace Edit int offset int length String text super offset length Assert is Not Null text f Text text  ReplaceEdit isNotNull fText
param other the edit to copy from private Replace Edit Replace Edit other super other f Text other f Text  ReplaceEdit ReplaceEdit fText fText
Returns the new text replacing the text denoted by the edit return the edit s text public String get Text return f Text  getText fText
see Text Edit do Copy protected Text Edit do Copy return new Replace Edit this  TextEdit doCopy TextEdit doCopy ReplaceEdit
protected void accept0 Text Edit Visitor visitor boolean visit Children visitor visit this if visit Children accept Children visitor  TextEditVisitor visitChildren visitChildren acceptChildren
package int perform Document Updating I Document document throws Bad Location Exception document replace get Offset get Length f Text f Delta f Text length get Length return f Delta  performDocumentUpdating IDocument BadLocationException getOffset getLength fText fDelta fText getLength fDelta
see Text Edit delete Children package boolean delete Children return true  TextEdit deleteChildren deleteChildren
see java lang Object to String public String to String return super to String f Text NON NLS 1  toString toString toString fText

private static class Insertion Comparator implements Comparator public int compare Object o1 Object o2 Text Edit edit1 Text Edit o1 Text Edit edit2 Text Edit o2 int offset1 edit1 get Offset int length1 edit1 get Length int offset2 edit2 get Offset int length2 edit2 get Length make sure that a duplicate insertion point at the same offet is inserted last Have to double check with the spec It says the with identical values there is no guarantee which one will be found if offset1 offset2 length1 0 length2 0 return 1 if offset1 length1 1 offset2 return 1 if offset2 length2 1 offset1 return 1 throw new Malformed Tree Exception null edit1 Text Edit Messages get String Text Edit overlapping NON NLS 1  InsertionComparator TextEdit TextEdit TextEdit TextEdit getOffset getLength getOffset getLength MalformedTreeException TextEditMessages getString TextEdit
Create a new text edit Parent is initialized to code null code and the edit doesn t have any children param offset the edit s offset param length the edit s length protected Text Edit int offset int length Assert is True offset 0 length 0 f Offset offset f Length length f Delta 0  TextEdit isTrue fOffset fLength fDelta
Copy constructor param source the source to copy form protected Text Edit Text Edit source f Offset source f Offset f Length source f Length f Delta 0  TextEdit TextEdit fOffset fOffset fLength fLength fDelta
Returns the range that this edit is manipulating The returned code I Region code contains the edit s offset and length at the point in time when this call is made Any subsequent changes to the edit s offset and length aren t reflected in the returned region object p Creating a region for a deleted edit will result in an assertion failure return the manipulated region public final I Region get Region return new Region f Offset f Length  IRegion IRegion getRegion fOffset fLength
Returns the offset of the edit An offset is a 0 based character index Returns code 1 code if the edit is marked as deleted return the offset of the edit public final int get Offset return f Offset  getOffset fOffset
Returns the length of the edit Returns code 1 code if the edit is marked as deleted return the length of the edit public final int get Length return f Length  getLength fLength
Returns the inclusive end position of this edit The inclusive end position denotes the last character of the region manipulated by this edit The returned value is the result of the following calculation pre get Offset get Length 1 pre return the inclusive end position public final int get Inclusive End return f Offset f Length 1  getOffset getLength getInclusiveEnd fOffset fLength
Returns the exclusive end position of this edit The exclusive end position denotes the next character of the region manipulated by this edit The returned value is the result of the following calculation pre get Offset get Length pre return the exclusive end position public final int get Exclusive End return f Offset f Length  getOffset getLength getExclusiveEnd fOffset fLength
Returns whether this edit has been deleted or not return code true code if the edit has been deleted otherwise code false code is returned public final boolean is Deleted return f Offset DELETED VALUE f Length DELETED VALUE  isDeleted fOffset DELETED_VALUE fLength DELETED_VALUE
Returns code true code if the edit covers the given edit code other code It is up to the concrete text edit to decide if a edit of length zero can cover another edit param other the other edit return code true code if the edit covers the other edit otherwise code false code is returned public final boolean covers Text Edit other if f Length 0 can Zero Length Cover return false else int other Offset other f Offset return f Offset other Offset other Offset other f Length f Offset f Length  TextEdit fLength canZeroLengthCover otherOffset fOffset fOffset otherOffset otherOffset fLength fOffset fLength
Returns code true code if an edit with length zero can cover another edit Returns code false code otherwise return whether an edit of length zero can cover another edit protected boolean can Zero Length Cover return false  canZeroLengthCover
Returns the edit s parent The method returns code null code if this edit hasn t been add to another edit return the edit s parent public final Text Edit get Parent return f Parent  TextEdit getParent fParent
Adds the given edit code child code to this edit param child the child edit to add exception Malformed Tree Exception is thrown if the child edit can t be added to this edit This is the case if the child overlaps with one of its siblings or if the child edit s region isn t fully covered by this edit public final void add Child Text Edit child throws Malformed Tree Exception internal Add child  MalformedTreeException addChild TextEdit MalformedTreeException internalAdd
Adds all edits in code edits code to this edit param edits the text edits to add exception Malformed Tree Exception is thrown if one of the given edits can t be added to this edit see add Child Text Edit public final void add Children Text Edit edits throws Malformed Tree Exception for int i 0 i edits length i internal Add edits i  MalformedTreeException addChild TextEdit addChildren TextEdit MalformedTreeException internalAdd
Removes the edit specified by the given index from the list of children Returns the child edit that was removed from the list of children The parent of the returned edit is set to code null code param index the index of the edit to remove return the removed edit exception Index Out Of Bounds Exception if the index is out of range public final Text Edit remove Child int index if f Children null throw new Index Out Of Bounds Exception Index index Size 0 NON NLS 1 NON NLS 2 Text Edit result Text Edit f Children remove index result internal Set Parent null if f Children is Empty f Children null return result  IndexOutOfBoundsException TextEdit removeChild fChildren IndexOutOfBoundsException TextEdit TextEdit fChildren internalSetParent fChildren isEmpty fChildren
Removes the first occurrence of the given child from the list of children param child the child to be removed return code true code if the edit contained the given child otherwise code false code is returned public final boolean remove Child Text Edit child Assert is Not Null child if f Children null return false boolean result f Children remove child if result child internal Set Parent null if f Children is Empty f Children null return result  removeChild TextEdit isNotNull fChildren fChildren internalSetParent fChildren isEmpty fChildren
Removes all child edits from and returns them The parent of the removed edits is set to code null code return an array of the removed edits public final Text Edit remove Children if f Children null return EMPTY ARRAY int size f Children size Text Edit result new Text Edit size for int i 0 i size i result i Text Edit f Children get i result i internal Set Parent null f Children null return result  TextEdit removeChildren fChildren EMPTY_ARRAY fChildren TextEdit TextEdit TextEdit fChildren internalSetParent fChildren
Returns code true code if this edit has children Otherwise code false code is returned return code true code if this edit has children otherwise code false code is returned public final boolean has Children return f Children null f Children is Empty  hasChildren fChildren fChildren isEmpty
Returns the edit s children If the edit doesn t have any children an empty array is returned return the edit s children public final Text Edit get Children if f Children null return EMPTY ARRAY return Text Edit f Children to Array new Text Edit f Children size  TextEdit getChildren fChildren EMPTY_ARRAY TextEdit fChildren toArray TextEdit fChildren
Returns the size of the managed children return the size of the children public final int get Children Size if f Children null return 0 return f Children size  getChildrenSize fChildren fChildren
Returns the text range spawned by the given array of text edits The method requires that the given array contains at least one edit If all edits passed are deleted the method returns code null code param edits an array of edits return the text range spawned by the given array of edits or code null code if all edits are marked as deleted public static I Region get Coverage Text Edit edits Assert is True edits null edits length 0 int offset Integer MAX VALUE int end Integer MIN VALUE int deleted 0 for int i 0 i edits length i Text Edit edit edits i if edit is Deleted deleted else offset Math min offset edit get Offset end Math max end edit get Exclusive End if edits length deleted return null else return new Region offset end offset  IRegion getCoverage TextEdit isTrue MAX_VALUE MIN_VALUE TextEdit isDeleted getOffset getExclusiveEnd
parent package void about To Be Added Text Edit parent  aboutToBeAdded TextEdit
The code Edit code implementation of this code Object code method uses object identity param obj the other object return code true code iff code this obj code otherwise code false code is returned see Object equals java lang Object public final boolean equals Object obj return this obj equivalent to Object equals 
The code Edit code implementation of this code Object code method calls uses code Object hash Code code to compute its hash code return the object s hash code value see Object hash Code public final int hash Code return super hash Code  hashCode hashCode hashCode hashCode
public String to String String Buffer buffer new String Buffer NON NLS 1 String name get Class get Name int index name last Index Of if index 1 buffer append name substring index 1 else buffer append name buffer append NON NLS 1 if is Deleted buffer append deleted NON NLS 1 else buffer append NON NLS 1 buffer append f Offset buffer append NON NLS 1 buffer append f Length buffer append NON NLS 1 return buffer to String  toString StringBuffer StringBuffer getClass getName lastIndexOf isDeleted fOffset fLength toString
Creates a deep copy of the edit tree rooted at this edit return a deep copy of the edit tree see do Copy public final Text Edit copy Text Edit Copier copier new Text Edit Copier this return copier perform  doCopy TextEdit TextEditCopier TextEditCopier
Creates and returns a copy of this edit The copy method should be implemented in a way so that the copy can executed without causing any harm to the original edit Implementors of this method are responsible for creating deep or shallow copies of referenced object to fullfil this requirement p Implementers of this method should use the copy constructor code Edit Edit Edit source to initialize the edit part of the copy Implementors aren t responsible to actually copy the children or to set the right parent p This method b should not be called b from outside the framework Please use code copy code to create a copy of a edit tree return a copy of this edit see copy see post Process Copy Text Edit Copier see Text Edit Copier  postProcessCopy TextEditCopier TextEditCopier
This method is called on every edit of the copied tree to do some post processing like connected an edit to a different edit in the tree p This default implementation does nothing param copier the copier that manages a map between original and copied edit see Text Edit Copier protected void post Process Copy Text Edit Copier copier  TextEditCopier postProcessCopy TextEditCopier
Accepts the given visitor on a visit of the current edit param visitor the visitor object exception Illegal Argument Exception if the visitor is null public final void accept Text Edit Visitor visitor Assert is Not Null visitor begin with the generic pre visit visitor pre Visit this dynamic dispatch to internal method for type specific visit end Visit accept0 visitor end with the generic post visit visitor post Visit this  IllegalArgumentException TextEditVisitor isNotNull preVisit endVisit postVisit
Accepts the given visitor on a type specific visit of the current edit This method must be implemented in all concrete text edits p General template for implementation on each concrete Text Edit class pre code boolean visit Children visitor visit this if visit Children accept Children visitor code pre Note that the caller code accept code takes care of invoking code visitor pre Visit this code and code visitor post Visit this code p param visitor the visitor object  TextEdit visitChildren visitChildren acceptChildren preVisit postVisit
Accepts the given visitor on the edits children p This method must be used by the concrete implementations of code accept code to traverse list values properties it encapsulates the proper handling of on the fly changes to the list p param visitor the visitor object protected final void accept Children Text Edit Visitor visitor if f Children null return Iterator iterator f Children iterator while iterator has Next Text Edit curr Text Edit iterator next curr accept visitor  acceptChildren TextEditVisitor fChildren fChildren hasNext TextEdit TextEdit
Applies the edit tree rooted by this edit to the given document To check if the edit tree can be applied to the document either catch code Malformed Tree Exception code or use code Text Edit Processor code to execute an edit tree param document the document to be manipulated param style flags controlling the execution of the edit tree Valid flags are code CREATE UNDO code and code UPDATE REGIONS code return a undo edit if code CREATE UNDO code is specified Otherwise code null code is returned exception Malformed Tree Exception is thrown if the tree isn t in a valid state This exception is thrown before any edit is executed So the document is still in its original state exception Bad Location Exception is thrown if one of the edits in the tree can t be executed The state of the document is undefined if this exception is thrown see Text Edit Processor perform Edits public final Undo Edit apply I Document document int style throws Malformed Tree Exception Bad Location Exception try Text Edit Processor processor new Text Edit Processor document this style return processor perform Edits finally unconnect from text edit processor f Parent null  MalformedTreeException TextEditProcessor CREATE_UNDO UPDATE_REGIONS CREATE_UNDO MalformedTreeException BadLocationException TextEditProcessor performEdits UndoEdit IDocument MalformedTreeException BadLocationException TextEditProcessor TextEditProcessor performEdits fParent
Applies the edit tree rooted by this edit to the given document This method is a convenience method for code apply document CREATE UNDO UPDATE REGIONS code param document the document to which to apply this edit return a undo edit if code CREATE UNDO code is specified Otherwise code null code is returned exception Malformed Tree Exception is thrown if the tree isn t in a valid state This exception is thrown before any edit is executed So the document is still in its original state exception Bad Location Exception is thrown if one of the edits in the tree can t be executed The state of the document is undefined if this exception is thrown see apply I Document int public final Undo Edit apply I Document document throws Malformed Tree Exception Bad Location Exception return apply document CREATE UNDO UPDATE REGIONS  CREATE_UNDO UPDATE_REGIONS CREATE_UNDO MalformedTreeException BadLocationException IDocument UndoEdit IDocument MalformedTreeException BadLocationException CREATE_UNDO UPDATE_REGIONS
package Undo Edit dispatch Perform Edits Text Edit Processor processor throws Bad Location Exception return processor execute Do  UndoEdit dispatchPerformEdits TextEditProcessor BadLocationException executeDo
package void dispatch Check Integrity Text Edit Processor processor throws Malformed Tree Exception processor check Integrity Do  dispatchCheckIntegrity TextEditProcessor MalformedTreeException checkIntegrityDo
package void internal Set Parent Text Edit parent if parent null Assert is True f Parent null f Parent parent  internalSetParent TextEdit isTrue fParent fParent
package void internal Set Offset int offset Assert is True offset 0 f Offset offset  internalSetOffset isTrue fOffset
package void internal Set Length int length Assert is True length 0 f Length length  internalSetLength isTrue fLength
package List internal Get Children return f Children  internalGetChildren fChildren
package void internal Set Children List children f Children children  internalSetChildren fChildren
package void internal Add Text Edit child throws Malformed Tree Exception child about To Be Added this if child is Deleted throw new Malformed Tree Exception this child Text Edit Messages get String Text Edit deleted edit NON NLS 1 if covers child throw new Malformed Tree Exception this child Text Edit Messages get String Text Edit range outside NON NLS 1 if f Children null f Children new Array List 2 int index compute Insertion Index child f Children add index child child internal Set Parent this  internalAdd TextEdit MalformedTreeException aboutToBeAdded isDeleted MalformedTreeException TextEditMessages getString TextEdit deleted_edit MalformedTreeException TextEditMessages getString TextEdit range_outside fChildren fChildren ArrayList computeInsertionIndex fChildren internalSetParent
private int compute Insertion Index Text Edit edit int size f Children size if size 0 return 0 Text Edit last Text Edit f Children get size 1 if last get Exclusive End edit get Offset return size try return Collections binary Search f Children edit INSERTION COMPARATOR 1 catch Malformed Tree Exception e e set Parent this throw e  computeInsertionIndex TextEdit fChildren TextEdit TextEdit fChildren getExclusiveEnd getOffset binarySearch fChildren INSERTION_COMPARATOR MalformedTreeException setParent
Adjusts the edits offset according to the given delta This method doesn t update any children param delta the delta of the text replace operation package void adjust Offset int delta if is Deleted return f Offset delta Assert is True f Offset 0  adjustOffset isDeleted fOffset isTrue fOffset
Adjusts the edits length according to the given delta This method doesn t update any children param delta the delta of the text replace operation package void adjust Length int delta if is Deleted return f Length delta Assert is True f Length 0  adjustLength isDeleted fLength isTrue fLength
Marks the edit as deleted This method doesn t update any children package void mark As Deleted f Offset DELETED VALUE f Length DELETED VALUE  markAsDeleted fOffset DELETED_VALUE fLength DELETED_VALUE
package int traverse Consistency Check Text Edit Processor processor I Document document List source Edits int result 0 if f Children null for int i f Children size 1 i 0 i Text Edit child Text Edit f Children get i result Math max result child traverse Consistency Check processor document source Edits if processor consider Edit this perform Consistency Check processor document return result  traverseConsistencyCheck TextEditProcessor IDocument sourceEdits fChildren fChildren TextEdit TextEdit fChildren traverseConsistencyCheck sourceEdits considerEdit performConsistencyCheck
package void perform Consistency Check Text Edit Processor processor I Document document  performConsistencyCheck TextEditProcessor IDocument
package void traverse Source Computation Text Edit Processor processor I Document document  traverseSourceComputation TextEditProcessor IDocument
package void perform Source Computation Text Edit Processor processor I Document document  performSourceComputation TextEditProcessor IDocument
package int traverse Document Updating Text Edit Processor processor I Document document throws Bad Location Exception int delta 0 if f Children null for int i f Children size 1 i 0 i Text Edit child Text Edit f Children get i delta child traverse Document Updating processor document if processor consider Edit this if delta 0 adjust Length delta int r perform Document Updating document if r 0 adjust Length r delta r return delta  traverseDocumentUpdating TextEditProcessor IDocument BadLocationException fChildren fChildren TextEdit TextEdit fChildren traverseDocumentUpdating considerEdit adjustLength performDocumentUpdating adjustLength
package abstract int perform Document Updating I Document document throws Bad Location Exception  performDocumentUpdating IDocument BadLocationException
package int traverse Region Updating Text Edit Processor processor I Document document int accumulated Delta boolean delete perform Region Updating accumulated Delta delete if f Children null boolean child Delete delete delete Children for Iterator iter f Children iterator iter has Next Text Edit child Text Edit iter next accumulated Delta child traverse Region Updating processor document accumulated Delta child Delete return accumulated Delta f Delta  traverseRegionUpdating TextEditProcessor IDocument accumulatedDelta performRegionUpdating accumulatedDelta fChildren childDelete deleteChildren fChildren hasNext TextEdit TextEdit accumulatedDelta traverseRegionUpdating accumulatedDelta childDelete accumulatedDelta fDelta
package void perform Region Updating int accumulated Delta boolean delete if delete mark As Deleted else adjust Offset accumulated Delta  performRegionUpdating accumulatedDelta markAsDeleted adjustOffset accumulatedDelta
package abstract boolean delete Children  deleteChildren
package void move Tree int delta adjust Offset delta if f Children null for Iterator iter f Children iterator iter has Next Text Edit iter next move Tree delta  moveTree adjustOffset fChildren fChildren hasNext TextEdit moveTree
package void delete Tree mark As Deleted if f Children null for Iterator iter f Children iterator iter has Next Text Edit child Text Edit iter next child delete Tree  deleteTree markAsDeleted fChildren fChildren hasNext TextEdit TextEdit deleteTree

Constructs a new code Text Edit Copier code for the given edit The actual copy is done by calling code perform code param edit the edit to copy see perform public Text Edit Copier Text Edit edit super Assert is Not Null edit f Edit edit f Copies new Hash Map  TextEditCopier TextEditCopier TextEdit isNotNull fEdit fCopies HashMap
Performs the actual copying return the copy public Text Edit perform Text Edit result do Copy f Edit if result null for Iterator iter f Copies key Set iterator iter has Next Text Edit edit Text Edit iter next edit post Process Copy this return result  TextEdit TextEdit doCopy fEdit fCopies keySet hasNext TextEdit TextEdit postProcessCopy
Returns the copy for the original text edit param original the original for which the copy is requested return the copy of the original edit or code null code if the original isn t managed by this copier public Text Edit get Copy Text Edit original Assert is Not Null original return Text Edit f Copies get original  TextEdit getCopy TextEdit isNotNull TextEdit fCopies
private Text Edit do Copy Text Edit edit Text Edit result edit do Copy List children edit internal Get Children if children null List new Children new Array List children size for Iterator iter children iterator iter has Next Text Edit child Copy do Copy Text Edit iter next child Copy internal Set Parent result new Children add child Copy result internal Set Children new Children add Copy edit result return result  TextEdit doCopy TextEdit TextEdit doCopy internalGetChildren newChildren ArrayList hasNext TextEdit childCopy doCopy TextEdit childCopy internalSetParent newChildren childCopy internalSetChildren newChildren addCopy
private void add Copy Text Edit original Text Edit copy f Copies put original copy  addCopy TextEdit TextEdit fCopies

Creates a new text edit group with the given name param name the name of the text edit group Must be a human readable string public Text Edit Group String name super Assert is Not Null name f Description name f Edits new Array List 3  TextEditGroup isNotNull fDescription fEdits ArrayList
Creates a new text edit group with a name and a single link Text Edit param name the name of the text edit group Must be a human readable string param edit the edit to manage public Text Edit Group String name Text Edit edit Assert is Not Null name Assert is Not Null edit f Description name f Edits new Array List 1 f Edits add edit  TextEdit TextEditGroup TextEdit isNotNull isNotNull fDescription fEdits ArrayList fEdits
Creates a new text edit group with the given name and array of edits param name the name of the text edit group Must be a human readable string param edits the array of edits public Text Edit Group String name Text Edit edits super Assert is Not Null name Assert is Not Null edits f Description name f Edits new Array List Arrays as List edits  TextEditGroup TextEdit isNotNull isNotNull fDescription fEdits ArrayList asList
Returns the edit group s name return the edit group s name public String get Name return f Description  getName fDescription
Adds the given link Text Edit to this group param edit the edit to add public void add Text Edit Text Edit edit f Edits add edit  TextEdit addTextEdit TextEdit fEdits
Returns code true code if the list of managed link Text Edit s is empty otherwise code false code is returned return whether the list of managed text edits is empty or not public boolean is Empty return f Edits is Empty  TextEdit isEmpty fEdits isEmpty
Returns an array of link Text Edit s containing the edits managed by this group return the managed text edits public Text Edit get Text Edits return Text Edit f Edits to Array new Text Edit f Edits size  TextEdit TextEdit getTextEdits TextEdit fEdits toArray TextEdit fEdits
Returns the text region covered by the edits managed via this edit group If the group doesn t manage any edits code null code is returned return the text region covered by this edit group or code null code if no edits are managed public I Region get Region int size f Edits size if size 0 return null else if size 1 return Text Edit f Edits get 0 get Region else return Text Edit get Coverage Text Edit f Edits to Array new Text Edit f Edits size  IRegion getRegion fEdits TextEdit fEdits getRegion TextEdit getCoverage TextEdit fEdits toArray TextEdit fEdits

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Text Edit Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME TextEditMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException
public static String get Formatted String String key Object arg return get Formatted String key new Object arg  getFormattedString getFormattedString
public static String get Formatted String String key Object args return Message Format format get String key args  getFormattedString MessageFormat getString

Constructs a new edit processor for the given document param document the document to manipulate param root the root of the text edit tree describing the modifications By passing a text edit a a text edit processor the ownership of the edit is transfered to the text edit processors Clients must not modify the edit e g adding new children any longer param style link Text Edit NONE link Text Edit CREATE UNDO or link Text Edit UPDATE REGIONS public Text Edit Processor I Document document Text Edit root int style Assert is Not Null document Assert is Not Null root f Document document f Root root if f Root instanceof Multi Text Edit Multi Text Edit f Root define Region 0 f Style style  TextEdit TextEdit CREATE_UNDO TextEdit UPDATE_REGIONS TextEditProcessor IDocument TextEdit isNotNull isNotNull fDocument fRoot fRoot MultiTextEdit MultiTextEdit fRoot defineRegion fStyle
Returns the document to be manipulated return the document public I Document get Document return f Document  IDocument getDocument fDocument
Returns the edit processor s root edit return the processor s root edit public Text Edit get Root return f Root  TextEdit getRoot fRoot
Returns the style bits of the text edit processor return the style bits see Text Edit CREATE UNDO see Text Edit UPDATE REGIONS public int get Style return f Style  TextEdit CREATE_UNDO TextEdit UPDATE_REGIONS getStyle fStyle
Checks if the processor can execute all its edits return code true code if the edits can be executed Return code false code otherwise One major reason why edits cannot be executed are wrong offset or length values of edits Calling perform in this case will very likely end in a code Bad Location Exception code public boolean can Perform Edits try f Root dispatch Check Integrity this f Checked true catch Malformed Tree Exception e f Exception e return false return true  BadLocationException canPerformEdits fRoot dispatchCheckIntegrity fChecked MalformedTreeException fException
Executes the text edits return an object representing the undo of the executed edits exception Malformed Tree Exception is thrown if the edit tree isn t in a valid state This exception is thrown before any edit is executed So the document is still in its original state exception Bad Location Exception is thrown if one of the edits in the tree can t be executed The state of the document is undefined if this exception is thrown public Undo Edit perform Edits throws Malformed Tree Exception Bad Location Exception if f Checked f Root dispatch Check Integrity this else if f Exception null throw f Exception return f Root dispatch Perform Edits this  MalformedTreeException BadLocationException UndoEdit performEdits MalformedTreeException BadLocationException fChecked fRoot dispatchCheckIntegrity fException fException fRoot dispatchPerformEdits
Class isn t intended to be sublcassed protected boolean consider Edit Text Edit edit return true  considerEdit TextEdit
package void check Integrity Do throws Malformed Tree Exception f Source Edits new Array List f Root traverse Consistency Check this f Document f Source Edits if f Root get Exclusive End f Document get Length throw new Malformed Tree Exception null f Root Text Edit Messages get String Text Edit Processor invalid length NON NLS 1  checkIntegrityDo MalformedTreeException fSourceEdits ArrayList fRoot traverseConsistencyCheck fDocument fSourceEdits fRoot getExclusiveEnd fDocument getLength MalformedTreeException fRoot TextEditMessages getString TextEditProcessor invalid_length
package void check Integrity Undo if f Root get Exclusive End f Document get Length throw new Malformed Tree Exception null f Root Text Edit Messages get String Text Edit Processor invalid length NON NLS 1  checkIntegrityUndo fRoot getExclusiveEnd fDocument getLength MalformedTreeException fRoot TextEditMessages getString TextEditProcessor invalid_length
package Undo Edit execute Do throws Bad Location Exception Undo Collector collector new Undo Collector f Root try if create Undo collector connect f Document compute Sources f Root traverse Document Updating this f Document if update Regions f Root traverse Region Updating this f Document 0 false finally collector disconnect f Document return collector undo  UndoEdit executeDo BadLocationException UndoCollector UndoCollector fRoot createUndo fDocument computeSources fRoot traverseDocumentUpdating fDocument updateRegions fRoot traverseRegionUpdating fDocument fDocument
private void compute Sources for Iterator iter f Source Edits iterator iter has Next List list List iter next if list null for Iterator edits list iterator edits has Next Text Edit edit Text Edit edits next edit traverse Source Computation this f Document  computeSources fSourceEdits hasNext hasNext TextEdit TextEdit traverseSourceComputation fDocument
package Undo Edit execute Undo throws Bad Location Exception Undo Collector collector new Undo Collector f Root try if create Undo collector connect f Document Text Edit edits f Root get Children for int i edits length 1 i 0 i edits i perform Document Updating f Document finally collector disconnect f Document return collector undo  UndoEdit executeUndo BadLocationException UndoCollector UndoCollector fRoot createUndo fDocument TextEdit fRoot getChildren performDocumentUpdating fDocument fDocument
private boolean create Undo return f Style Text Edit CREATE UNDO 0  createUndo fStyle TextEdit CREATE_UNDO
private boolean update Regions return f Style Text Edit UPDATE REGIONS 0  updateRegions fStyle TextEdit UPDATE_REGIONS

Visits the given text edit prior to the type specific visit before code visit code p The default implementation does nothing Subclasses may reimplement p param edit the node to visit public void pre Visit Text Edit edit default implementation do nothing  preVisit TextEdit
Visits the given text edit following the type specific visit after code end Visit code p The default implementation does nothing Subclasses may reimplement p param edit the node to visit public void post Visit Text Edit edit default implementation do nothing  endVisit postVisit TextEdit
Visits the given text edit This method is called by default from type specific visits It is not called by a edit s accept method The default implementation returns code true code param edit the node to visit return If code true code is returned the given node s child nodes will be visited next however if code false code is returned the given node s child nodes will not be visited public boolean visit Node Text Edit edit return true  visitNode TextEdit
Visits a code Copy Source Edit code instance param edit the node to visit return If code true code is returned the given node s child nodes will be visited next however if code false code is returned the given node s child nodes will not be visited public boolean visit Copy Source Edit edit return visit Node edit  CopySourceEdit CopySourceEdit visitNode
Visits a code Copy Target Edit code instance param edit the node to visit return If code true code is returned the given node s child nodes will be visited next however if code false code is returned the given node s child nodes will not be visited public boolean visit Copy Target Edit edit return visit Node edit  CopyTargetEdit CopyTargetEdit visitNode
Visits a code Move Source Edit code instance param edit the node to visit return If code true code is returned the given node s child nodes will be visited next however if code false code is returned the given node s child nodes will not be visited public boolean visit Move Source Edit edit return visit Node edit  MoveSourceEdit MoveSourceEdit visitNode
Visits a code Move Target Edit code instance param edit the node to visit return If code true code is returned the given node s child nodes will be visited next however if code false code is returned the given node s child nodes will not be visited public boolean visit Move Target Edit edit return visit Node edit  MoveTargetEdit MoveTargetEdit visitNode
Visits a code Range Marker code instance param edit the node to visit return If code true code is returned the given node s child nodes will be visited next however if code false code is returned the given node s child nodes will not be visited public boolean visit Range Marker edit return visit Node edit  RangeMarker RangeMarker visitNode
Visits a code Copying Range Marker code instance param edit the node to visit return If code true code is returned the given node s child nodes will be visited next however if code false code is returned the given node s child nodes will not be visited public boolean visit Copying Range Marker edit return visit Node edit  CopyingRangeMarker CopyingRangeMarker visitNode
Visits a code Delete Edit code instance param edit the node to visit return If code true code is returned the given node s child nodes will be visited next however if code false code is returned the given node s child nodes will not be visited public boolean visit Delete Edit edit return visit Node edit  DeleteEdit DeleteEdit visitNode
Visits a code Insert Edit code instance param edit the node to visit return If code true code is returned the given node s child nodes will be visited next however if code false code is returned the given node s child nodes will not be visited public boolean visit Insert Edit edit return visit Node edit  InsertEdit InsertEdit visitNode
Visits a code Replace Edit code instance param edit the node to visit return If code true code is returned the given node s child nodes will be visited next however if code false code is returned the given node s child nodes will not be visited public boolean visit Replace Edit edit return visit Node edit  ReplaceEdit ReplaceEdit visitNode
Visits a code Undo Edit code instance param edit the node to visit return If code true code is returned the given node s child nodes will be visited next however if code false code is returned the given node s child nodes will not be visited public boolean visit Undo Edit edit return visit Node edit  UndoEdit UndoEdit visitNode
Visits a code Multi Text Edit code instance param edit the node to visit return If code true code is returned the given node s child nodes will be visited next however if code false code is returned the given node s child nodes will not be visited public boolean visit Multi Text Edit edit return visit Node edit  MultiTextEdit MultiTextEdit visitNode

public static interface Visitor public void visit Text Edit edit  TextEdit
private int f Index Stack new int 10 public int get Size return f Mark 1  fIndexStack getSize fMark
public void push Text Edit edits if f Mark f Edit Stack length Text Edit t1 new Text Edit f Edit Stack length 2 System arraycopy f Edit Stack 0 t1 0 f Edit Stack length f Edit Stack t1 int t2 new int f Edit Stack length System arraycopy f Index Stack 0 t2 0 f Index Stack length f Index Stack t2 f Edit Stack f Mark edits f Index Stack f Mark 1  TextEdit fMark fEditStack TextEdit TextEdit fEditStack fEditStack fEditStack fEditStack fEditStack fIndexStack fIndexStack fIndexStack fEditStack fMark fIndexStack fMark
f Index Stack f Mark 1 public void set Index int index f Index Stack f Mark index  fIndexStack fMark setIndex fIndexStack fMark
public void pop f Edit Stack f Mark null f Index Stack f Mark 1 f Mark  fEditStack fMark fIndexStack fMark fMark
public void accept Visitor visitor for int i f Mark i 0 i Assert is True f Index Stack i 0 int start f Index Stack i 1 Text Edit edits f Edit Stack i for int s start s edits length s visitor visit edits s  fMark isTrue fIndexStack fIndexStack TextEdit fEditStack

private int f Length public Undo Collector Text Edit root f Offset root get Offset f Length root get Length  fLength UndoCollector TextEdit fOffset getOffset fLength getLength
public void connect I Document document document add Document Listener this undo new Undo Edit  IDocument addDocumentListener UndoEdit
public void disconnect I Document document if undo null document remove Document Listener this undo define Region f Offset f Length  IDocument removeDocumentListener defineRegion fOffset fLength
public void document Changed Document Event event f Length get Delta event  documentChanged DocumentEvent fLength getDelta
private static int get Delta Document Event event String text event get Text return text null event get Length text length event get Length  getDelta DocumentEvent getText getLength getLength
public void document About To Be Changed Document Event event int offset event get Offset int current Length event get Length String current Text null try current Text event get Document get offset current Length catch Bad Location Exception cannot Happen Assert is True false Can t happen NON NLS 1 String new Text event get Text undo add new Replace Edit offset new Text null new Text length 0 current Text  documentAboutToBeChanged DocumentEvent getOffset currentLength getLength currentText currentText getDocument currentLength BadLocationException cannotHappen isTrue newText getText ReplaceEdit newText newText currentText

public final class Undo Edit extends Text Edit package Undo Edit super 0 Integer MAX VALUE  UndoEdit TextEdit UndoEdit MAX_VALUE
private Undo Edit Undo Edit other super other  UndoEdit UndoEdit
see org eclipse text edits Text Edit internal Add org eclipse text edits Text Edit package void internal Add Text Edit child throws Malformed Tree Exception throw new Malformed Tree Exception null this Text Edit Messages get String Undo Edit no children NON NLS 1  TextEdit internalAdd TextEdit internalAdd TextEdit MalformedTreeException MalformedTreeException TextEditMessages getString UndoEdit no_children
see org eclipse text edits Multi Text Edit about To Be Added org eclipse text edits Text Edit package void about To Be Added Text Edit parent throw new Malformed Tree Exception parent this Text Edit Messages get String Undo Edit can not be added NON NLS 1  MultiTextEdit aboutToBeAdded TextEdit aboutToBeAdded TextEdit MalformedTreeException TextEditMessages getString UndoEdit can_not_be_added
package Undo Edit dispatch Perform Edits Text Edit Processor processor throws Bad Location Exception return processor execute Undo  UndoEdit dispatchPerformEdits TextEditProcessor BadLocationException executeUndo
package void dispatch Check Integrity Text Edit Processor processor throws Malformed Tree Exception processor check Integrity Undo  dispatchCheckIntegrity TextEditProcessor MalformedTreeException checkIntegrityUndo
see org eclipse text edits Text Edit do Copy protected Text Edit do Copy return new Undo Edit this  TextEdit doCopy TextEdit doCopy UndoEdit
protected void accept0 Text Edit Visitor visitor boolean visit Children visitor visit this if visit Children accept Children visitor  TextEditVisitor visitChildren visitChildren acceptChildren
see Text Edit perform Document Updating package int perform Document Updating I Document document throws Bad Location Exception f Delta 0 return f Delta  TextEdit performDocumentUpdating performDocumentUpdating IDocument BadLocationException fDelta fDelta
package void add Replace Edit edit List children internal Get Children if children null children new Array List 2 internal Set Children children children add edit  ReplaceEdit internalGetChildren ArrayList internalSetChildren
package void define Region int offset int length internal Set Offset offset internal Set Length length  defineRegion internalSetOffset internalSetLength
package boolean delete Children return false  deleteChildren

Return descriptive information about this Valve implementation public String get Info return info  getInfo
Invoke the next Valve in the sequence When the invoke returns check the response state and output an error report is necessary param request The servlet request to be processed param response The servlet response to be created param context The valve context used to invoke the next valve in the current processing pipeline exception IO Exception if an input output error occurs exception Servlet Exception if a servlet error occurs public void invoke Request request Response response Valve Context context throws IO Exception Servlet Exception Perform the request context invoke Next request response Servlet Request sreq Servlet Request request Throwable throwable Throwable sreq get Attribute Globals EXCEPTION ATTR Servlet Response sresp Servlet Response response if sresp is Committed return if throwable null The response is an error response set Error Reset the response if possible try sresp reset catch Illegal State Exception e Servlet Response sresponse Servlet Response response if sresponse instanceof Http Servlet Response Http Servlet Response sresponse send Error Http Servlet Response SC INTERNAL SERVER ERROR response set Suspended false try report request response throwable catch Throwable tt tt print Stack Trace  IOException ServletException ValveContext IOException ServletException invokeNext ServletRequest ServletRequest getAttribute EXCEPTION_ATTR ServletResponse ServletResponse isCommitted setError IllegalStateException ServletResponse ServletResponse HttpServletResponse HttpServletResponse sendError HttpServletResponse SC_INTERNAL_SERVER_ERROR setSuspended printStackTrace
Return a String rendering of this object public String to String String Buffer sb new String Buffer Eclipse Error Report Valve sb append container get Name sb append return sb to String  toString StringBuffer StringBuffer EclipseErrorReportValve getName toString
Prints out an error report param request The request being processed param response The response being generated param exception The exception that occurred which possibly wraps a root cause exception protected void report Request request Response response Throwable throwable throws IO Exception Do nothing on non HTTP responses if response instanceof Http Response return Http Response hresponse Http Response response if response instanceof Http Servlet Response return Http Servlet Response hres Http Servlet Response response int status Code hresponse get Status String message Request Util filter hresponse get Message if message null message Do nothing on a 1xx 2xx and 3xx status if status Code 400 return FIXME Reset part of the request try if hresponse is Error hresponse reset status Code message catch Illegal State Exception e Throwable root Cause null if throwable null if throwable instanceof Servlet Exception root Cause Servlet Exception throwable get Root Cause Do nothing if there is no report for the specified status code String report null try report sm get String http status Code message catch Throwable t if report null return String Buffer sb new String Buffer sb append html head title sb append sm get String error Report Valve error Report sb append title if status Code 404 sb append head body sb append Tomcat Resources get String no Document else sb append STYLE sb append H1 font family sans serif Arial Tahoma color white background color black sb append H3 font family sans serif Arial Tahoma color white background color black sb append BODY font family sans serif Arial Tahoma color black background color white sb append B color white background color black sb append HR color black sb append STYLE sb append head body sb append h1 sb append sm get String error Report Valve status Header status Code message append h1 sb append HR size 1 noshade sb append p b type b if throwable null sb append sm get String error Report Valve exception Report else sb append sm get String error Report Valve status Report sb append p sb append p b sb append sm get String error Report Valve message sb append b u sb append message append u p sb append p b sb append sm get String error Report Valve description sb append b u sb append report sb append u p if throwable null boolean self Hosting Mode false String args Platform get Command Line Args for int i 0 i args length i if pdelaunch equals args i self Hosting Mode true break if self Hosting Mode String Writer stack Trace new String Writer throwable print Stack Trace new Print Writer stack Trace sb append p b sb append sm get String error Report Valve exception sb append b pre sb append Request Util filter stack Trace to String sb append pre p if root Cause null stack Trace new String Writer root Cause print Stack Trace new Print Writer stack Trace sb append p b sb append sm get String error Report Valve root Cause sb append b pre sb append Request Util filter stack Trace to String sb append pre p sb append body html try Writer writer response get Reporter if writer null Locale locale Locale get Default try hres set Content Type text html hres set Locale locale catch Throwable t if debug 1 log status set Content Type t If writer is null it s an indication that the response has been hard committed already which should never happen writer write sb to String writer flush catch IO Exception e catch Illegal State Exception e  IOException HttpResponse HttpResponse HttpResponse HttpServletResponse HttpServletResponse HttpServletResponse statusCode getStatus RequestUtil getMessage statusCode isError statusCode IllegalStateException rootCause ServletException rootCause ServletException getRootCause getString statusCode StringBuffer StringBuffer getString errorReportValve errorReport statusCode TomcatResources getString noDocument getString errorReportValve statusHeader statusCode getString errorReportValve exceptionReport getString errorReportValve statusReport getString errorReportValve getString errorReportValve selfHostingMode getCommandLineArgs selfHostingMode selfHostingMode StringWriter stackTrace StringWriter printStackTrace PrintWriter stackTrace getString errorReportValve RequestUtil stackTrace toString rootCause stackTrace StringWriter rootCause printStackTrace PrintWriter stackTrace getString errorReportValve rootCause RequestUtil stackTrace toString getReporter getDefault setContentType setLocale setContentType toString IOException IllegalStateException
Log a message on the Logger associated with our Container if any param message Message to be logged protected void log String message Logger logger container get Logger if logger null logger log this to String message else System out println this to String message  getLogger toString toString
Log a message on the Logger associated with our Container if any param message Message to be logged param throwable Associated exception protected void log String message Throwable throwable Logger logger container get Logger if logger null logger log this to String message throwable else System out println this to String message throwable print Stack Trace System out  getLogger toString toString printStackTrace

implements URL Stream Handler Service public URL Connection open Connection URL u throws java io IO Exception return super open Connection u  URLStreamHandlerService URLConnection openConnection IOException openConnection
Parse a URL using the tt URL Stream Handler Setter tt object This method sets the tt real Handler tt field with the specified tt URL Stream Handler Setter tt object and then calls tt parseURL URL String int int tt param real Handler The object on which the tt setURL tt method must be invoked for the specified URL see java net URL Stream Handler parseURL public void parseURL URL Stream Handler Setter real Handler URL u String spec int start int limit this real Handler real Handler parseURL u spec start limit  URLStreamHandlerSetter realHandler URLStreamHandlerSetter realHandler URLStreamHandler URLStreamHandlerSetter realHandler realHandler realHandler
This method calls tt super to External Form tt see java net URL Stream Handler to External Form public String to External Form URL u return super to External Form u  toExternalForm URLStreamHandler toExternalForm toExternalForm toExternalForm
This method calls tt super equals URL URL tt see java net URL Stream Handler equals URL URL public boolean equals URL u1 URL u2 return super equals u1 u2  URLStreamHandler
This method calls tt super get Default Port tt see java net URL Stream Handler get Default Port public int get Default Port return super get Default Port  getDefaultPort URLStreamHandler getDefaultPort getDefaultPort getDefaultPort
This method calls tt super get Host Address tt see java net URL Stream Handler get Host Address public Inet Address get Host Address URL u return super get Host Address u  getHostAddress URLStreamHandler getHostAddress InetAddress getHostAddress getHostAddress
This method calls tt super hash Code URL tt see java net URL Stream Handler hash Code URL public int hash Code URL u return super hash Code u  hashCode URLStreamHandler hashCode hashCode hashCode
This method calls tt super hosts Equal tt see java net URL Stream Handler hosts Equal public boolean hosts Equal URL u1 URL u2 return super hosts Equal u1 u2  hostsEqual URLStreamHandler hostsEqual hostsEqual hostsEqual
This method calls tt super same File tt see java net URL Stream Handler same File public boolean same File URL u1 URL u2 return super same File u1 u2  sameFile URLStreamHandler sameFile sameFile sameFile
This method calls tt real Handler setURL URL String String int String String tt see java net URL Stream Handler setURL URL String String int String String deprecated This method is only for compatibility with handlers written for JDK 1 1 protected void setURL URL u String proto String host int port String file String ref real Handler setURL u proto host port file ref  realHandler URLStreamHandler realHandler
This method calls tt real Handler setURL URL String String int String String String String tt see java net URL Stream Handler setURL URL String String int String String String String protected void setURL URL u String proto String host int port String auth String user String path String query String ref real Handler setURL u proto host port auth user path query ref  realHandler URLStreamHandler realHandler

Returns a free port number or 1 if none found public static int find Unused Local Port Inet Address address try if address null address Inet Address get By Address new byte 127 0 0 1 catch Unknown Host Exception uhe return 1 int port find Unused Port address 49152 65535 if port 1 port find Free Port return port  findUnusedLocalPort InetAddress InetAddress getByAddress UnknownHostException findUnusedPort findFreePort
private static int find Unused Port Inet Address address int from int to for int i 0 i 12 i Server Socket ss null int port get Random Port from to try ss new Server Socket Socket Address sa new Inet Socket Address address port ss bind sa return ss get Local Port catch IO Exception e finally if ss null try ss close catch IO Exception ioe return 1  findUnusedPort InetAddress ServerSocket getRandomPort ServerSocket SocketAddress InetSocketAddress getLocalPort IOException IOException
private static int get Random Port int low int high return int random next Float high low low  getRandomPort nextFloat
private static int find Free Port Server Socket socket null try socket new Server Socket 0 return socket get Local Port catch IO Exception e finally if socket null try socket close catch IO Exception e return 1  findFreePort ServerSocket ServerSocket getLocalPort IOException IOException

Constructs this class but does not instantiates or start Tomcat classes until webapp are added public Tomcat App Server  TomcatAppServer
there is no exception so add a listener connector Impl add Lifecycle Listener new Lifecycle Listener public void lifecycle Event Lifecycle Event event if start equals event get Type NON NLS 1 running true  connectorImpl addLifecycleListener LifecycleListener lifecycleEvent LifecycleEvent getType
see org eclipse help internal appserver I Webapp Server start int java lang String public void start int port String host Address throws Core Exception this host Address host Address this port port if is Started return is Started true try File Logger logger new File Logger logger set Directory Tomcat Plugin get Default get State Location toOS String embedded new Embedded logger new Memory Realm embedded set Debug 0 embedded set Logger logger URL installURL Tomcat Plugin get Default get Bundle get Entry NON NLS 1 URL resolvedURL Platform resolve installURL String home Platform as LocalURL resolvedURL get File System set Property catalina home home NON NLS 1 String base home System set Property catalina base base NON NLS 1 start now and then add all the contexts embedded start Create a very basic container hierarchy engine embedded create Engine host embedded create Host localhost home webapps NON NLS 1 NON NLS 2 all request go to our only host engine set Default Host host get Name if host instanceof Standard Host Standard Host host set Error Report Valve Class org eclipse tomcat internal Eclipse Error Report Valve NON NLS 1 engine add Child host Install the assembled container hierarchy Print Stream sys Out System out reassign standard output to prevent Tomcat from writing its version message there System set Out new Print Stream new Byte Array Output Stream try embedded add Engine engine finally System set Out sys Out Root context Context root embedded create Context home webapps ROOT NON NLS 1 NON NLS 2 this line should be replaced once tomcat provides support for setting the working directory if root instanceof Standard Context Standard Context root set Work Dir get Working Directory ROOT NON NLS 1 root set Loader embedded create Loader this get Class get Class Loader host add Child root Inet Address i Address null if this host Address null try i Address Inet Address get By Name this host Address catch Unknown Host Exception uhe will default to all interfaces if this port 0 this port Socket Util find Unused Local Port i Address NON NLS 1 if this port 1 throw new Core Exception new Status I Status ERROR Tomcat Plugin PLUGIN ID I Status OK Tomcat Resources get String Tomcat App Server start Cannot Obtain Port NON NLS 1 null Create Connector Connector connector embedded create Connector null this port false Override defaults on Coyote Connector if connector instanceof Coyote Connector Coyote Connector connector Impl Coyote Connector connector if i Address null bug in Embedded that incorrectly sets host on connector pass null when creating connector and set host here if it is specified connector Impl set Address i Address get Host Address Preferences pref Tomcat Plugin get Default get Plugin Preferences int accept Count pref get Int Tomcat Plugin PREF ACCEPT COUNT if accept Count 0 connector Impl set Accept Count accept Count int max Processors pref get Int Tomcat Plugin PREF MAX PROCESSORS if max Processors 0 connector Impl set Max Processors max Processors int min Processors pref get Int Tomcat Plugin PREF MIN PROCESSORS if min Processors 0 connector Impl set Min Processors min Processors connector Impl set Debug 0 If there is problem in embedded add Connector there is no exception so add a listener connector Impl add Lifecycle Listener new Lifecycle Listener public void lifecycle Event Lifecycle Event event if start equals event get Type NON NLS 1 running true add Connector to Tomcat Print Stream sys Err System err reassign standard error to prevent Coyote from writing its version message there System set Err new Print Stream new Byte Array Output Stream try embedded add Connector connector finally System set Err sys Err if null passed for host Address use local host if this host Address null this host Address 127 0 0 1 NON NLS 1 running true catch Exception exc Tomcat Plugin log Error Tomcat Resources get String Tomcat App Server start NON NLS 1 exc if exc instanceof Core Exception throw Core Exception exc else throw new Core Exception new Status I Status ERROR Tomcat Plugin PLUGIN ID I Status OK Tomcat Resources get String Tomcat App Server start NON NLS 1 exc if running throw new Core Exception new Status I Status ERROR Tomcat Plugin PLUGIN ID I Status OK Tomcat Resources get String Tomcat App Server start null NON NLS 1  IWebappServer hostAddress CoreException hostAddress hostAddress isStarted isStarted FileLogger FileLogger setDirectory TomcatPlugin getDefault getStateLocation toOSString MemoryRealm setDebug setLogger TomcatPlugin getDefault getBundle getEntry asLocalURL getFile setProperty setProperty createEngine createHost setDefaultHost getName StandardHost StandardHost setErrorReportValveClass EclipseErrorReportValve addChild PrintStream sysOut setOut PrintStream ByteArrayOutputStream addEngine setOut sysOut createContext StandardContext StandardContext setWorkDir getWorkingDirectory setLoader createLoader getClass getClassLoader addChild InetAddress iAddress hostAddress iAddress InetAddress getByName hostAddress UnknownHostException SocketUtil findUnusedLocalPort iAddress CoreException IStatus TomcatPlugin PLUGIN_ID IStatus TomcatResources getString TomcatAppServer CannotObtainPort createConnector CoyoteConnector CoyoteConnector CoyoteConnector connectorImpl CoyoteConnector iAddress connectorImpl setAddress iAddress getHostAddress TomcatPlugin getDefault getPluginPreferences acceptCount getInt TomcatPlugin PREF_ACCEPT_COUNT acceptCount connectorImpl setAcceptCount acceptCount maxProcessors getInt TomcatPlugin PREF_MAX_PROCESSORS maxProcessors connectorImpl setMaxProcessors maxProcessors minProcessors getInt TomcatPlugin PREF_MIN_PROCESSORS minProcessors connectorImpl setMinProcessors minProcessors connectorImpl setDebug addConnector connectorImpl addLifecycleListener LifecycleListener lifecycleEvent LifecycleEvent getType PrintStream sysErr setErr PrintStream ByteArrayOutputStream addConnector setErr sysErr hostAddress hostAddress hostAddress TomcatPlugin logError TomcatResources getString TomcatAppServer CoreException CoreException CoreException IStatus TomcatPlugin PLUGIN_ID IStatus TomcatResources getString TomcatAppServer CoreException IStatus TomcatPlugin PLUGIN_ID IStatus TomcatResources getString TomcatAppServer
see org eclipse help internal appserver I Webapp Server start java lang String org eclipse core runtime I Path java lang Class Loader public void start String webapp Name I Path path Class Loader custom Loader throws Core Exception if is Started start port host Address if running throw new Core Exception new Status I Status ERROR Tomcat Plugin PLUGIN ID I Status OK Tomcat Resources get String Tomcat App Server adding Webapp NON NLS 1 webapp Name path toOS String null String context Path webapp Name if context Path starts With NON NLS 1 context Path context Path NON NLS 1 try Context context embedded create Context context Path path toOS String if context instanceof Standard Context Standard Context context set Work Dir get Working Directory webapp Name Web App Class Loader webapp Loader new Web App Class Loader custom Loader context set Loader embedded create Loader webapp Loader host add Child context catch Exception exc throw new Core Exception new Status I Status ERROR Tomcat Plugin PLUGIN ID I Status OK Tomcat Resources get String Tomcat App Server adding Webapp NON NLS 1 webapp Name path toOS String exc  IWebappServer IPath ClassLoader webappName IPath ClassLoader customLoader CoreException isStarted hostAddress CoreException IStatus TomcatPlugin PLUGIN_ID IStatus TomcatResources getString TomcatAppServer addingWebapp webappName toOSString contextPath webappName contextPath startsWith contextPath contextPath createContext contextPath toOSString StandardContext StandardContext setWorkDir getWorkingDirectory webappName WebAppClassLoader webappLoader WebAppClassLoader customLoader setLoader createLoader webappLoader addChild CoreException IStatus TomcatPlugin PLUGIN_ID IStatus TomcatResources getString TomcatAppServer addingWebapp webappName toOSString
see org eclipse help internal appserver I Webapp Server stop java lang String public void stop String webapp Name throws Core Exception if running return Context context Context host find Child webapp Name NON NLS 1 if context null embedded remove Context context  IWebappServer webappName CoreException findChild webappName removeContext
see org eclipse help internal appserver I Webapp Server get Host public String get Host if running return null return host Address  IWebappServer getHost getHost hostAddress
see org eclipse help internal appserver I Webapp Server get Port public int get Port if running return 0 return port  IWebappServer getPort getPort
see org eclipse help internal appserver I Webapp Server is Running public boolean is Running return running  IWebappServer isRunning isRunning
see org eclipse help internal appserver I Webapp Server stop public void stop throws Core Exception if running return running false Remove the engine which should trigger removing the connector try embedded remove Engine engine catch Exception exc throw new Core Exception new Status I Status ERROR Tomcat Plugin PLUGIN ID I Status OK Tomcat Resources get String Tomcat App Server engine Remove NON NLS 1 exc Shut down this tomcat server should have nothing left to do try embedded stop catch Lifecycle Exception e throw new Core Exception new Status I Status ERROR Tomcat Plugin PLUGIN ID I Status OK Tomcat Resources get String Tomcat App Server embedded Stop NON NLS 1 e  IWebappServer CoreException removeEngine CoreException IStatus TomcatPlugin PLUGIN_ID IStatus TomcatResources getString TomcatAppServer engineRemove LifecycleException CoreException IStatus TomcatPlugin PLUGIN_ID IStatus TomcatResources getString TomcatAppServer embeddedStop
private String get Working Directory String web App return Tomcat Plugin get Default get State Location append web App toOS String  getWorkingDirectory webApp TomcatPlugin getDefault getStateLocation webApp toOSString

private Service Registration jndiURL Service Registration public Tomcat Plugin super  ServiceRegistration jndiURLServiceRegistration TomcatPlugin
Logs an Error message with an exception Note that the message should already be localized to proper locale ie Tomcat 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 Tomcat Plugin get Default get Log log error Status  TomcatResources getString logError errorStatus IStatus PLUGIN_ID IStatus TomcatPlugin getDefault getLog errorStatus
public static Tomcat Plugin get Default return plugin  TomcatPlugin getDefault
public void start Bundle Context context throws Exception super start context plugin this bundle Context context register JndiURL context  BundleContext bundleContext registerJndiURL
public void stop Bundle Context context throws Exception unregister JndiURL plugin null bundle Context null super stop context  BundleContext unregisterJndiURL bundleContext
private void register JndiURL Bundle Context context Hashtable properties new Hashtable properties put URL Constants URL HANDLER PROTOCOL new String jndi NON NLS 1 try jndiURL Service Registration context register Service URL Stream Handler Service class get Name new JndiURL Handler properties catch Error t log Error t get Message t throw t  registerJndiURL BundleContext URLConstants URL_HANDLER_PROTOCOL jndiURLServiceRegistration registerService URLStreamHandlerService getName JndiURLHandler logError getMessage
private void unregister JndiURL if jndiURL Service Registration null jndiURL Service Registration unregister  unregisterJndiURL jndiURLServiceRegistration jndiURLServiceRegistration

Resources constructor public Tomcat Resources super  TomcatResources
Returns a string from a property file public static String get String String name try return res Bundle get String name catch Exception e return name  getString resBundle getString
Returns a string from a property file public static String get String String name String replace0 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 String replace3 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 replace3 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 String replace3 String replace4 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 replace3 replace4 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
Returns a string from a property file public static String get String String name String replace0 String replace1 String replace2 String replace3 String replace4 String replace5 try String string From Properties File res Bundle get String name string From Properties File Message Format format string From Properties File new Object replace0 replace1 replace2 replace3 replace4 replace5 return string From Properties File catch Exception e return name  getString stringFromPropertiesFile resBundle getString stringFromPropertiesFile MessageFormat stringFromPropertiesFile stringFromPropertiesFile
private static Locale get Default Locale String nl Platform getNL sanity test if nl null return Locale get Default break the string into tokens to get the Locale object String Tokenizer locales new String Tokenizer nl   NON NLS 1 if locales count Tokens 1 return new Locale locales next Token NON NLS 1 else if locales count Tokens 2 return new Locale locales next Token locales next Token else if locales count Tokens 3 return new Locale locales next Token locales next Token locales next Token else return Locale get Default  getDefaultLocale getDefault StringTokenizer StringTokenizer _ countTokens nextToken countTokens nextToken nextToken countTokens nextToken nextToken nextToken getDefault

public Web App Class Loader Class Loader plugin Loader super new URL 0 this plugin Loader plugin Loader this tomcat Plugin Loader new Plugin Class Loader Wrapper Tomcat Plugin PLUGIN ID  WebAppClassLoader ClassLoader pluginLoader pluginLoader pluginLoader tomcatPluginLoader PluginClassLoaderWrapper TomcatPlugin PLUGIN_ID
public Class load Class String class Name throws Class Not Found Exception First check tomcat plugin loader then the webapp plugin loader Class c null try c tomcat Plugin Loader load Class class Name catch Class Not Found Exception e c plugin Loader load Class class Name finally return c  loadClass className ClassNotFoundException tomcatPluginLoader loadClass className ClassNotFoundException pluginLoader loadClass className
public URL get Resource String res Name First check the plugin loader then current loader URL u plugin Loader get Resource res Name if u null return tomcat Plugin Loader get Resource res Name else return u  getResource resName pluginLoader getResource resName tomcatPluginLoader getResource resName
This is a workaround for the jsp compiler that needs to know the classpath NOTE for now assume that the web app plugin requires the tomcat plugin public URL getUR Ls URL plugin LoaderUR Ls if plugin Loader instanceof URL Class Loader plugin LoaderUR Ls URL Class Loader plugin Loader getUR Ls else plugin LoaderUR Ls new URL 0 URL tomcat Plugin LoaderUR Ls tomcat Plugin Loader getUR Ls URL urls new URL plugin LoaderUR Ls length tomcat Plugin LoaderUR Ls length System arraycopy plugin LoaderUR Ls 0 urls 0 plugin LoaderUR Ls length System arraycopy tomcat Plugin LoaderUR Ls 0 urls plugin LoaderUR Ls length tomcat Plugin LoaderUR Ls length return urls  getURLs pluginLoaderURLs pluginLoader URLClassLoader pluginLoaderURLs URLClassLoader pluginLoader getURLs pluginLoaderURLs tomcatPluginLoaderURLs tomcatPluginLoader getURLs pluginLoaderURLs tomcatPluginLoaderURLs pluginLoaderURLs pluginLoaderURLs tomcatPluginLoaderURLs pluginLoaderURLs tomcatPluginLoaderURLs

public interface I System Summary Section A method that puts the section s information into the system summary s configuration details log param writer puts information into the system summary  ISystemSummarySection

Creates a new action context with the given selection public Action Context I Selection selection set Selection selection  ActionContext ISelection setSelection
Returns the selection public I Selection get Selection return selection  ISelection getSelection
Sets the selection public void set Selection I Selection selection this selection selection  setSelection ISelection
Returns the input element public Object get Input return input  getInput
Sets the input element param input public void set Input Object input this input input  setInput

public abstract class Action Delegate implements I Action Delegate2 The code Action Delegate code implementation of this code I Action Delegate code method does nothing Subclasses may reimplement p b Note b This method is not called directly by the proxy action Only by the default implementation of code run With Event code of this abstract class public void run I Action action  ActionDelegate IActionDelegate2 ActionDelegate IActionDelegate runWithEvent IAction
The code Action Delegate code implementation of this code I Action Delegate code method does nothing Subclasses may reimplement public void selection Changed I Action action I Selection selection  ActionDelegate IActionDelegate selectionChanged IAction ISelection
The code Action Delegate code implementation of this code I Action Delegate2 code method does nothing Subclasses may reimplement public void init I Action action  ActionDelegate IActionDelegate2 IAction
The code Action Delegate code implementation of this code I Action Delegate2 code method does nothing Subclasses may reimplement public void dispose  ActionDelegate IActionDelegate2
The code Action Delegate code implementation of this code I Action Delegate2 code method redirects to the code run code method Subclasses may reimplement public void run With Event I Action action Event event run action  ActionDelegate IActionDelegate2 runWithEvent IAction

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
non javadoc method declared on Action Factory 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 Workbench Messages format About Action text new Object product Name NON NLS 1 action set Tool Tip Text Workbench Messages format About Action tool Tip new Object product Name NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction AboutAction setId getId IProduct getProduct productName productName getName productName productName setText WorkbenchMessages AboutAction productName setToolTipText WorkbenchMessages AboutAction toolTip productName
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction ActivateEditorAction setId getId
non javadoc method declared on Action Factory 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 get String Workbench back NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench back Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui navigate back NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction LabelRetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString backToolTip getPartService addPartListener setActionDefinitionId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction NavigationHistoryAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction CloseEditorAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction CloseAllAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction CloseAllPerspectivesAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction CloseAllSavedAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction ClosePerspectiveAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction IntroAction setId getId
non javadoc method declared on Action Factory 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 get String Workbench copy NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench copy Tool Tip NON NLS 1 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString copyToolTip getPartService addPartListener setActionDefinitionId ISharedImages sharedImages getWorkbench getSharedImages setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_COPY setDisabledImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_COPY_DISABLED
non javadoc method declared on Action Factory 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 get String Workbench cut NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench cut Tool Tip NON NLS 1 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString cutToolTip getPartService addPartListener setActionDefinitionId ISharedImages sharedImages getWorkbench getSharedImages setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_CUT setDisabledImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_CUT_DISABLED
non javadoc method declared on Action Factory 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 get String Workbench delete NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench delete Tool Tip NON NLS 1 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 Workbench Help set Help action I 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString deleteToolTip getPartService addPartListener setActionDefinitionId enableAccelerator WorkbenchHelp setHelp IHelpContextIds DELETE_RETARGET_ACTION ISharedImages sharedImages getWorkbench getSharedImages setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_DELETE setDisabledImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_DELETE_DISABLED
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction EditActionSetsAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction ExportResourcesAction setId getId
non javadoc method declared on Action Factory 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 get String Workbench find Replace NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench find Replace Tool Tip NON NLS 1 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId WorkbenchMessages getString findReplace setToolTipText WorkbenchMessages getString findReplaceToolTip getPartService addPartListener setActionDefinitionId findReplace setImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_SEARCH_SRC setDisabledImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_SEARCH_SRC_DISABLED
non javadoc method declared on Action Factory 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 get String Workbench forward NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench forward Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui navigate forward NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction LabelRetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString forwardToolTip getPartService addPartListener setActionDefinitionId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction NavigationHistoryAction setId getId
non javadoc method declared on Action Factory 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 get String Workbench go Into NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench go Into Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui navigate go Into NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction LabelRetargetAction getId WorkbenchMessages getString goInto setToolTipText WorkbenchMessages getString goIntoToolTip getPartService addPartListener setActionDefinitionId goInto
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction ImportResourcesAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction LockToolBarAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction MaximizePartAction setId getId
non javadoc method declared on Action Factory 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 get String Workbench move NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench move Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui edit move NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString moveToolTip getPartService addPartListener setActionDefinitionId
non javadoc method declared on Action Factory 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 indicate that a new wizard submenu has been created Workbench Window window add Submenu Workbench Window NEW WIZARD SUBMENU return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction NewWizardAction setId getId WorkbenchWindow addSubmenu WorkbenchWindow NEW_WIZARD_SUBMENU
non javadoc method declared on Action Factory 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 get String Workbench next NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench next Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui navigate next NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction LabelRetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString nextToolTip getPartService addPartListener setActionDefinitionId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction CycleEditorAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction CyclePartAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction CyclePerspectiveAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction OpenInNewWindowAction setId getId
non javadoc method declared on Action Factory 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 get String Workbench paste NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench paste Tool Tip NON NLS 1 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString pasteToolTip getPartService addPartListener setActionDefinitionId ISharedImages sharedImages getWorkbench getSharedImages setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_PASTE setDisabledImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_PASTE_DISABLED
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction OpenPreferencesAction setId getId
non javadoc method declared on Action Factory 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 get String Workbench previous NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench previous Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui navigate previous NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction LabelRetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString previousToolTip getPartService addPartListener setActionDefinitionId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction CycleEditorAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction CyclePartAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction CyclePerspectiveAction setId getId
non javadoc method declared on Action Factory 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 get String Workbench print NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench print Tool Tip NON NLS 1 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString printToolTip getPartService addPartListener setActionDefinitionId setImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_PRINT_EDIT setDisabledImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_PRINT_EDIT_DISABLED
non javadoc method declared on Action Factory 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 get String Workbench properties NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench properties Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui file properties NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString propertiesToolTip getPartService addPartListener setActionDefinitionId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction QuitAction setId getId
non javadoc method declared on Action Factory 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 get String Workbench redo NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench redo Tool Tip NON NLS 1 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException LabelRetargetAction LabelRetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString redoToolTip getPartService addPartListener setActionDefinitionId ISharedImages sharedImages getWorkbench getSharedImages setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_REDO setDisabledImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_REDO_DISABLED
non javadoc method declared on Action Factory 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 get String Workbench refresh NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench refresh Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui file refresh NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString refreshToolTip getPartService addPartListener setActionDefinitionId
non javadoc method declared on Action Factory 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 get String Workbench rename NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench rename Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui edit rename NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString renameToolTip getPartService addPartListener setActionDefinitionId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction ResetPerspectiveAction setId getId
non javadoc method declared on Action Factory 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 get String Workbench revert NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench revert Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui file revert NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString revertToolTip getPartService addPartListener setActionDefinitionId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction SaveAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction SaveAllAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction SaveAsAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction SavePerspectiveAction setId getId
non javadoc method declared on Action Factory 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 get String Workbench select All NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench select All Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui edit select All NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId WorkbenchMessages getString selectAll setToolTipText WorkbenchMessages getString selectAllToolTip getPartService addPartListener setActionDefinitionId selectAll
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction ToggleEditorsVisibilityAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction WorkbenchEditorsAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction WorkbookEditorsAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction ShowPartPaneMenuAction setId getId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction ShowViewMenuAction setId getId
non javadoc method declared on Action Factory 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 get String Workbench undo NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench undo Tool Tip NON NLS 1 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException LabelRetargetAction LabelRetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString undoToolTip getPartService addPartListener setActionDefinitionId ISharedImages sharedImages getWorkbench getSharedImages setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_UNDO setDisabledImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_UNDO_DISABLED
non javadoc method declared on Action Factory 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 get String Workbench up NON NLS 1 NON NLS 2 action set Tool Tip Text Workbench Messages get String Workbench up Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui navigate up NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction LabelRetargetAction getId WorkbenchMessages getString setToolTipText WorkbenchMessages getString upToolTip getPartService addPartListener setActionDefinitionId
non javadoc method declared on Action Factory 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  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction HelpContentsAction 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

Returns the context used to determine which actions are added and what their enabled state should be public Action Context get Context return context  ActionContext getContext
Sets the context used to determine which actions are added and what their enabled state should be param context the context to use public void set Context Action Context context this context context  setContext ActionContext
Adds the applicable actions to a context menu based on the state of the code Action Context code p The default implementation does nothing Subclasses may override or extend this method p param menu the context menu manager public void fill Context Menu I Menu Manager menu do nothing  ActionContext fillContextMenu IMenuManager
Adds the applicable actions to a part s action bars including setting any global action handlers p The default implementation does nothing Subclasses may override or extend this method p param action Bars the part s action bars public void fill Action Bars I Action Bars action Bars do nothing  actionBars fillActionBars IActionBars actionBars
Updates the state of the actions added to the action bars including any global action handlers based on the state of the code Action Context code p The default implementation does nothing Subclasses may override or extend this method p public void update Action Bars do nothing  ActionContext updateActionBars
This method is called by the user of an action group to signal that the group is no longer needed Subclasses typically implement this method to deregister any listeners or to free other resources p The default implementation calls code set Context null code Subclasses may extend this method p public void dispose set Context null  setContext setContext

Creates a new bookmark action By default prompts the user for the bookmark name param shell the shell for any dialogs public Add Bookmark Action Shell shell this shell true  AddBookmarkAction
Creates a new bookmark action param shell the shell for any dialogs param prompt For Name whether to ask the user for the bookmark name public Add Bookmark Action Shell shell boolean prompt For Name super IDE Workbench Messages get String Add Bookmark Label NON NLS 1 set Id ID if shell null throw new Illegal Argument Exception this shell shell this prompt For Name prompt For Name set Tool Tip Text IDE Workbench Messages get String Add Bookmark Tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids ADD BOOKMARK ACTION  promptForName AddBookmarkAction promptForName IDEWorkbenchMessages getString AddBookmarkLabel setId IllegalArgumentException promptForName promptForName setToolTipText IDEWorkbenchMessages getString AddBookmarkToolTip WorkbenchHelp setHelp IHelpContextIds ADD_BOOKMARK_ACTION
Creates a marker of the given type on each of the files in the current selection param marker Type the marker type void create Marker String marker Type I Structured Selection selection get Structured Selection for Iterator i selection iterator i has Next Object o i next if o instanceof I File create Marker I File o marker Type else if o instanceof I Adaptable Object resource I Adaptable o get Adapter I Resource class if resource instanceof I File create Marker I File resource marker Type  markerType createMarker markerType IStructuredSelection getStructuredSelection hasNext IFile createMarker IFile markerType IAdaptable IAdaptable getAdapter IResource IFile createMarker IFile markerType
new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception String marker Message file get Name if prompt For Name marker Message ask For Label marker Message if marker Message null I Marker marker file create Marker marker Type marker set Attribute I Marker MESSAGE marker Message  IWorkspaceRunnable IProgressMonitor CoreException markerMessage getName promptForName markerMessage askForLabel markerMessage markerMessage IMarker createMarker markerType setAttribute IMarker markerMessage
Creates a marker of the given type on the given file resource param file the file resource param marker Type the marker type void create Marker final I File file final String marker Type try file get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception String marker Message file get Name if prompt For Name marker Message ask For Label marker Message if marker Message null I Marker marker file create Marker marker Type marker set Attribute I Marker MESSAGE marker Message null catch Core Exception e IDE Workbench Plugin log null e get Status We don t care  markerType createMarker IFile markerType getWorkspace IWorkspaceRunnable IProgressMonitor CoreException markerMessage getName promptForName markerMessage askForLabel markerMessage markerMessage IMarker createMarker markerType setAttribute IMarker markerMessage CoreException IDEWorkbenchPlugin getStatus
Method declared on I Action public void run create Marker I Marker BOOKMARK  IAction createMarker IMarker
The code Add Bookmark Action code implementation of this code Selection Listener Action code method enables the action only if the selection is not empty and contains just file resources protected boolean update Selection I Structured Selection selection issue typed selections return super update Selection selection selection is Empty selection Is Of Type I File FILE  AddBookmarkAction SelectionListenerAction updateSelection IStructuredSelection updateSelection isEmpty selectionIsOfType IFile
I Input Validator input Validator new I Input Validator public String is Valid String new Text return new Text null new Text length 0 null NON NLS 1  IInputValidator inputValidator IInputValidator isValid newText newText newText
Asks the user for a bookmark name param proposal the suggested bookmark name return the bookmark name or code null code if cancelled String ask For Label String proposal String title IDE Workbench Messages get String Add Bookmark Dialog title NON NLS 1 String message IDE Workbench Messages get String Add Bookmark Dialog message NON NLS 1 I Input Validator input Validator new I Input Validator public String is Valid String new Text return new Text null new Text length 0 null NON NLS 1 Input Dialog dialog new Input Dialog shell title message proposal input Validator if dialog open Window CANCEL String name dialog get Value if name null return null name name trim return name length 0 null name else return null  askForLabel IDEWorkbenchMessages getString AddBookmarkDialog IDEWorkbenchMessages getString AddBookmarkDialog IInputValidator inputValidator IInputValidator isValid newText newText newText InputDialog InputDialog inputValidator getValue

Creates a new instance of the receiver param shell shell to use to show any dialogs public Add Task Action Shell shell super IDE Workbench Messages get String Add Task Label NON NLS 1 set Id ID this shell shell Assert is Not Null shell set Tool Tip Text IDE Workbench Messages get String Add Task Tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids ADD TASK ACTION  AddTaskAction IDEWorkbenchMessages getString AddTaskLabel setId isNotNull setToolTipText IDEWorkbenchMessages getString AddTaskToolTip WorkbenchHelp setHelp IHelpContextIds ADD_TASK_ACTION
private I Resource get Element I Structured Selection selection if selection size 1 return null Object element selection get First Element I Resource resource null if element instanceof I Resource resource I Resource element if element instanceof I Adaptable resource I Resource I Adaptable element get Adapter I Resource class if resource null resource instanceof I Project I Project project I Project resource if project is Open false resource null return resource  IResource getElement IStructuredSelection getFirstElement IResource IResource IResource IAdaptable IResource IAdaptable getAdapter IResource IProject IProject IProject isOpen
public void run I Resource resource get Element get Structured Selection if resource null Dialog Task Properties dialog new Dialog Task Properties shell dialog set Resource resource dialog open  IResource getElement getStructuredSelection DialogTaskProperties DialogTaskProperties setResource
The code Add Task Action code implementation of this code Selection Listener Action code method enables the action only if the selection contains a single resource and the resource is not a closed project param selection the selection to update the enabled state for protected boolean update Selection I Structured Selection selection return super update Selection selection get Element selection null  AddTaskAction SelectionListenerAction updateSelection IStructuredSelection updateSelection getElement

Creates a new action with the given text param text the string used as the text for the action or code null code if there is no text protected Base Selection Listener Action String text super text  BaseSelectionListenerAction
Clears any cached state associated with the selection Called when the selection changes p The code Base Selection Listener Action code implementation of this method does nothing Subclasses may override p protected void clear Cache do nothing  BaseSelectionListenerAction clearCache
Returns the current structured selection in the workbench or an empty selection if nothing is selected or if selection does not include objects for example raw text return the current structured selection in the workbench public I Structured Selection get Structured Selection return selection  IStructuredSelection getStructuredSelection
Notifies this action that the given structured selection has changed p The code Base Selection Listener Action code implementation of this method records the given selection for future reference and calls code update Selection code updating the enable state of this action based on the outcome Subclasses should override code update Selection code to react to selection changes p param selection the new selection public final void selection Changed I Structured Selection selection Ignore any incoming selection change while the action is running otherwise the action can have unpredictable results including lost data if it operates on a different selection than what it initially validated See Bug 60606 Navigator data loss Navigator deletes moves the wrong file if running deferred Selection selection return this selection selection clear Cache set Enabled update Selection selection  BaseSelectionListenerAction updateSelection updateSelection selectionChanged IStructuredSelection deferredSelection clearCache setEnabled updateSelection
The code Base Selection Listener Action code implementation of this code I Selection Changed Listener code method calls code selection Changed I Structured Selection code assuming the selection is a structured one Subclasses should override the code update Selection code method to react to selection changes public final void selection Changed Selection Changed Event event I Selection selection event get Selection if selection instanceof I Structured Selection selection Changed I Structured Selection selection else selection Changed Structured Selection EMPTY  BaseSelectionListenerAction ISelectionChangedListener selectionChanged IStructuredSelection updateSelection selectionChanged SelectionChangedEvent ISelection getSelection IStructuredSelection selectionChanged IStructuredSelection selectionChanged StructuredSelection
Updates this action in response to the given selection p The code Base Selection Listener Action code implementation of this method returns code true code Subclasses may extend to react to selection changes however if the super method returns code false code the overriding method must also return code false code p param selection the new selection return code true code if the action should be enabled for this selection and code false code otherwise protected boolean update Selection I Structured Selection selection return true  BaseSelectionListenerAction updateSelection IStructuredSelection
public void run With Event Event event Set the running flag during the run so that selection changes are deferred See selection Changed I Structured Selection for more details running true try run finally running false I Structured Selection s deferred Selection deferred Selection null if s null selection Changed s  runWithEvent selectionChanged IStructuredSelection IStructuredSelection deferredSelection deferredSelection selectionChanged

Creates a new action of the appropriate type The action id is code ID BUILD code for incremental builds and code ID REBUILD ALL code for full builds param shell the shell for any dialogs param type the type of build one of code Incremental Project Builder INCREMENTAL BUILD code or code Incremental Project Builder FULL BUILD code public Build Action Shell shell int type super shell NON NLS 1 if type Incremental Project Builder INCREMENTAL BUILD set Text IDE Workbench Messages get String Build Action text NON NLS 1 set Tool Tip Text IDE Workbench Messages get String Build Action tool Tip NON NLS 1 set Id ID BUILD Workbench Help set Help this I Help Context Ids INCREMENTAL BUILD ACTION else set Text IDE Workbench Messages get String Rebuild Action text NON NLS 1 set Tool Tip Text IDE Workbench Messages get String Rebuild Action tooltip NON NLS 1 set Id ID REBUILD ALL Workbench Help set Help this I Help Context Ids FULL BUILD ACTION this build Type type  ID_BUILD ID_REBUILD_ALL IncrementalProjectBuilder INCREMENTAL_BUILD IncrementalProjectBuilder FULL_BUILD BuildAction IncrementalProjectBuilder INCREMENTAL_BUILD setText IDEWorkbenchMessages getString BuildAction setToolTipText IDEWorkbenchMessages getString BuildAction toolTip setId ID_BUILD WorkbenchHelp setHelp IHelpContextIds INCREMENTAL_BUILD_ACTION setText IDEWorkbenchMessages getString RebuildAction setToolTipText IDEWorkbenchMessages getString RebuildAction setId ID_REBUILD_ALL WorkbenchHelp setHelp IHelpContextIds FULL_BUILD_ACTION buildType
Adds the given project and all of its prerequisities transitively to the provided set private void add All Projects I Project project Hash Set projects if project null project is Accessible projects contains project return projects add project try I Project pre Reqs project get Referenced Projects for int i 0 i pre Reqs length i add All Projects pre Reqs i projects catch Core Exception e ignore inaccessible projects  addAllProjects IProject HashSet isAccessible IProject preReqs getReferencedProjects preReqs addAllProjects preReqs CoreException
Method declared on Workspace Action protected List get Action Resources return get Projects To Build  WorkspaceAction getActionResources getProjectsToBuild
Method declared on Workspace Action String get Operation Message return IDE Workbench Messages get String Build Action operation Message NON NLS 1  WorkspaceAction getOperationMessage IDEWorkbenchMessages getString BuildAction operationMessage
Method declared on Workspace Action String get Problems Message return IDE Workbench Messages get String Build Action problem Message NON NLS 1  WorkspaceAction getProblemsMessage IDEWorkbenchMessages getString BuildAction problemMessage
Method declared on Workspace Action String get Problems Title return IDE Workbench Messages get String Build Action problem Title NON NLS 1  WorkspaceAction getProblemsTitle IDEWorkbenchMessages getString BuildAction problemTitle
Returns the projects to build This contains the set of projects which have builders across all selected resources List get Projects To Build if projects To Build null projects To Build new Array List 3 for Iterator i get Selected Resources iterator i has Next I Resource resource I Resource i next I Project project resource get Project if project null if projects To Build contains project if has Builder project projects To Build add project return projects To Build  getProjectsToBuild projectsToBuild projectsToBuild ArrayList getSelectedResources hasNext IResource IResource IProject getProject projectsToBuild hasBuilder projectsToBuild projectsToBuild
Returns whether there are builders configured on the given project return code true code if it has builders code false code if not or if this couldn t be determined boolean has Builder I Project project try I Command commands project get Description get Build Spec if commands length 0 return true catch Core Exception e this method is called when selection changes so just fall through if it fails this shouldn t happen anyway since the list of selected resources has already been checked for accessibility before this is called return false  hasBuilder IProject ICommand getDescription getBuildSpec CoreException
Method declared on Workspace Action void invoke Operation I Resource resource I Progress Monitor monitor throws Core Exception I Project resource build build Type monitor  WorkspaceAction invokeOperation IResource IProgressMonitor CoreException IProject buildType
Returns whether the user s preference is set to automatically save modified resources before a manual build is done return code true code if Save All Before Build is enabled public static boolean is Save All Set I Preference Store store IDE Workbench Plugin get Default get Preference Store return store get Boolean IDE Internal Preferences SAVE ALL BEFORE BUILD  isSaveAllSet IPreferenceStore IDEWorkbenchPlugin getDefault getPreferenceStore getBoolean IDEInternalPreferences SAVE_ALL_BEFORE_BUILD
List prune Resources List resource Collection recursively compute project prerequisites Hash Set to Build new Hash Set for Iterator it resource Collection iterator it has Next add All Projects I Project it next to Build Optimize if to Build size 2 return resource Collection Try the workspace s description build order if specified String ordered Names Resources Plugin get Workspace get Description get Build Order if ordered Names null List ordered Projects new Array List to Build size I Workspace Root root Resources Plugin get Workspace get Root for int i 0 i ordered Names length i I Project handle root get Project ordered Names i if to Build contains handle ordered Projects add handle to Build remove handle Add anything not specified before we return ordered Projects add All to Build return ordered Projects Try the project prerequisite order then I Project projects new I Project to Build size projects I Project to Build to Array projects I Workspace Project Order po Resources Plugin get Workspace compute Project Order projects Array List ordered Projects new Array List ordered Projects add All Arrays as List po projects return ordered Projects  pruneResources resourceCollection HashSet toBuild HashSet resourceCollection hasNext addAllProjects IProject toBuild toBuild resourceCollection orderedNames ResourcesPlugin getWorkspace getDescription getBuildOrder orderedNames orderedProjects ArrayList toBuild IWorkspaceRoot ResourcesPlugin getWorkspace getRoot orderedNames IProject getProject orderedNames toBuild orderedProjects toBuild orderedProjects addAll toBuild orderedProjects IProject IProject toBuild IProject toBuild toArray IWorkspace ProjectOrder ResourcesPlugin getWorkspace computeProjectOrder ArrayList orderedProjects ArrayList orderedProjects addAll asList orderedProjects
public void run Save all resources prior to doing build save All Resources run In Background Resources Plugin get Workspace get Rule Factory build Rule  saveAllResources runInBackground ResourcesPlugin getWorkspace getRuleFactory buildRule
Causes all editors to save any modified resources depending on the user s preference void save All Resources List projects get Selected Resources if projects null projects is Empty return if is Save All Set return I Workbench Window windows PlatformUI get Workbench get Workbench Windows for int i 0 i windows length i I Workbench Page pages windows i get Pages for int j 0 j pages length j I Workbench Page page pages j I Editor Part editors page get Dirty Editors for int k 0 k editors length k I Editor Part editor editors k I Editor Input input editor get Editor Input if input instanceof I File Editor Input I File input File I File Editor Input input get File if projects contains input File get Project page save Editor editor false  saveAllResources getSelectedResources isEmpty isSaveAllSet IWorkbenchWindow getWorkbench getWorkbenchWindows IWorkbenchPage getPages IWorkbenchPage IEditorPart getDirtyEditors IEditorPart IEditorInput getEditorInput IFileEditorInput IFile inputFile IFileEditorInput getFile inputFile getProject saveEditor
Method declared on Workspace Action boolean should Perform Resource Pruning return true  WorkspaceAction shouldPerformResourcePruning
The code Build Action code implementation of this code Selection Listener Action code method ensures that this action is enabled only if all of the selected resources have buildable projects protected boolean update Selection I Structured Selection s projects To Build null return Resources Plugin get Workspace is Auto Building super update Selection s get Projects To Build size 0  BuildAction SelectionListenerAction updateSelection IStructuredSelection projectsToBuild ResourcesPlugin getWorkspace isAutoBuilding updateSelection getProjectsToBuild

public static final String ID PlatformUI PLUGIN ID Close Resource Action NON NLS 1 Creates a new action param shell the shell for any dialogs public Close Resource Action Shell shell super shell IDE Workbench Messages get String Close Resource Action text NON NLS 1 set Id ID set Tool Tip Text IDE Workbench Messages get String Close Resource Action tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids CLOSE RESOURCE ACTION  PLUGIN_ID CloseResourceAction CloseResourceAction IDEWorkbenchMessages getString CloseResourceAction setId setToolTipText IDEWorkbenchMessages getString CloseResourceAction toolTip WorkbenchHelp setHelp IHelpContextIds CLOSE_RESOURCE_ACTION
Return a list of dirty editors associated with the given projects Return editors from all perspectives return List the dirty editors List get Dirty Editors List projects List dirty Editors new Array List 0 I Workbench Window windows PlatformUI get Workbench get Workbench Windows for int i 0 i windows length i I Workbench Page pages windows i get Pages for int j 0 j pages length j I Workbench Page page pages j I Editor Part editors page get Dirty Editors for int k 0 k editors length k I Editor Part editor editors k I Editor Input input editor get Editor Input if input instanceof I File Editor Input I File input File I File Editor Input input get File if projects contains input File get Project if editor is Dirty dirty Editors add editor return dirty Editors  getDirtyEditors dirtyEditors ArrayList IWorkbenchWindow getWorkbench getWorkbenchWindows IWorkbenchPage getPages IWorkbenchPage IEditorPart getDirtyEditors IEditorPart IEditorInput getEditorInput IFileEditorInput IFile inputFile IFileEditorInput getFile inputFile getProject isDirty dirtyEditors dirtyEditors
Open a dialog that can be used to select which of the given editors to save Return the list of editors to save A value of null implies that the operation was cancelled return List the editors to save List get Editors To Save List dirty Editors if dirty Editors is Empty return new Array List 0 The list may have multiple editors opened for the same input so process the list for duplicates List save Editors new Array List 0 List dirty Inputs new Array List 0 Iterator iter dirty Editors iterator while iter has Next I Editor Part editor I Editor Part iter next I Editor Input input editor get Editor Input I File input File I File Editor Input input get File if the same file is open in multiple perspectives we don t want to count it as dirty multiple times if dirty Inputs contains input File dirty Inputs add input File save Editors add editor Adaptable List input new Adaptable List save Editors List Selection Dialog dlg new List Selection Dialog get Shell input new Workbench Content Provider new Workbench Part Label Provider IDE Workbench Messages get String Editor Manager save Resources Message NON NLS 1 dlg set Initial Selections save Editors to Array new Object save Editors size dlg set Title IDE Workbench Messages get String Editor Manager save Resources Title NON NLS 1 int result dlg open if result I Dialog Constants CANCEL ID return null return Arrays as List dlg get Result  getEditorsToSave dirtyEditors dirtyEditors isEmpty ArrayList saveEditors ArrayList dirtyInputs ArrayList dirtyEditors hasNext IEditorPart IEditorPart IEditorInput getEditorInput IFile inputFile IFileEditorInput getFile dirtyInputs inputFile dirtyInputs inputFile saveEditors AdaptableList AdaptableList saveEditors ListSelectionDialog ListSelectionDialog getShell WorkbenchContentProvider WorkbenchPartLabelProvider IDEWorkbenchMessages getString EditorManager saveResourcesMessage setInitialSelections saveEditors toArray saveEditors setTitle IDEWorkbenchMessages getString EditorManager saveResourcesTitle IDialogConstants CANCEL_ID asList getResult
Method declared on Workspace Action String get Operation Message return NON NLS 1  WorkspaceAction getOperationMessage
Method declared on Workspace Action String get Problems Message return IDE Workbench Messages get String Close Resource Action problem Message NON NLS 1  WorkspaceAction getProblemsMessage IDEWorkbenchMessages getString CloseResourceAction problemMessage
Method declared on Workspace Action String get Problems Title return IDE Workbench Messages get String Close Resource Action title NON NLS 1  WorkspaceAction getProblemsTitle IDEWorkbenchMessages getString CloseResourceAction
Method declared on Workspace Action void invoke Operation I Resource resource I Progress Monitor monitor throws Core Exception I Project resource close monitor  WorkspaceAction invokeOperation IResource IProgressMonitor CoreException IProject
The implementation of this code Workspace Action code method method saves and closes the resource s dirty editors before closing it public void run if save Dirty Editors return super run  WorkspaceAction saveDirtyEditors
Busy Indicator show While get Shell get Display new Runnable public void run Iterator iter dirty Editors iterator while iter has Next I Editor Part editor I Editor Part iter next I Workbench Page page editor get Editor Site get Page if save Editors contains editor do a direct save vs using page save Editor so that progress dialogs do not flash up on the screen multiple times editor do Save new Null Progress Monitor page close Editor editor false  BusyIndicator showWhile getShell getDisplay dirtyEditors hasNext IEditorPart IEditorPart IWorkbenchPage getEditorSite getPage saveEditors saveEditor doSave NullProgressMonitor closeEditor
Causes all dirty editors associated to the resource s to be saved if so specified by the user and closed boolean save Dirty Editors Get the items to close List projects get Selected Resources if projects null projects is Empty no action needs to be taken since no projects are selected return false Collect all the dirty editors that are associated to the projects that are to be closed final List dirty Editors get Dirty Editors projects See which editors should be saved final List save Editors get Editors To Save dirty Editors if save Editors null the operation was cancelled return false Save and close the dirty editors Busy Indicator show While get Shell get Display new Runnable public void run Iterator iter dirty Editors iterator while iter has Next I Editor Part editor I Editor Part iter next I Workbench Page page editor get Editor Site get Page if save Editors contains editor do a direct save vs using page save Editor so that progress dialogs do not flash up on the screen multiple times editor do Save new Null Progress Monitor page close Editor editor false return true  saveDirtyEditors getSelectedResources isEmpty dirtyEditors getDirtyEditors saveEditors getEditorsToSave dirtyEditors saveEditors BusyIndicator showWhile getShell getDisplay dirtyEditors hasNext IEditorPart IEditorPart IWorkbenchPage getEditorSite getPage saveEditors saveEditor doSave NullProgressMonitor closeEditor
Method declared on Workspace Action boolean should Perform Resource Pruning return false  WorkspaceAction shouldPerformResourcePruning
The code Close Resource Action code implementation of this code Selection Listener Action code method ensures that this action is enabled only if one of the selections is an open project protected boolean update Selection I Structured Selection s don t call super since we want to enable if open project is selected if selection Is Of Type I Resource PROJECT return false Iterator resources get Selected Resources iterator while resources has Next I Project current Resource I Project resources next if current Resource is Open return true return false  CloseResourceAction SelectionListenerAction updateSelection IStructuredSelection selectionIsOfType IResource getSelectedResources hasNext IProject currentResource IProject currentResource isOpen
Handles a resource changed event by updating the enablement if one of the selected projects is opened or closed public void resource Changed I Resource Change Event event Warning code duplicated in Open Resource Action List sel get Selected Resources don t bother looking at delta if selection not applicable if selection Is Of Type I Resource PROJECT I Resource Delta delta event get Delta if delta null I Resource Delta proj Deltas delta get Affected Children I Resource Delta CHANGED for int i 0 i proj Deltas length i I Resource Delta proj Delta proj Deltas i if proj Delta get Flags I Resource Delta OPEN 0 if sel contains proj Delta get Resource selection Changed get Structured Selection return  resourceChanged IResourceChangeEvent OpenResourceAction getSelectedResources selectionIsOfType IResource IResourceDelta getDelta IResourceDelta projDeltas getAffectedChildren IResourceDelta projDeltas IResourceDelta projDelta projDeltas projDelta getFlags IResourceDelta projDelta getResource selectionChanged getStructuredSelection

Creates a new workbench contribution item factory with the given id param contribution Item Id the id of contribution items created by this factory protected Contribution Item Factory String contribution Item Id this contribution Item Id contribution Item Id  contributionItemId ContributionItemFactory contributionItemId contributionItemId contributionItemId
Creates a new standard contribution item for the given workbench window p A typical contribution item automatically registers listeners against the workbench window so that it can keep its 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 a contribution item while the window is still open the client must call I Contribution Item dispose to give the item an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench contribution item  IContributionItem
Returns the id of this contribution item factory return the id of contribution items created by this factory public String get Id return contribution Item Id  getId contributionItemId
non javadoc method declared on Contribution Item Factory public I Contribution Item create I Workbench Window window if window null throw new Illegal Argument Exception Pin Editor Action action new Pin Editor Action window action set Id get Id I Contribution Item item new Pin Editor Contribution Item action window return item  ContributionItemFactory IContributionItem IWorkbenchWindow IllegalArgumentException PinEditorAction PinEditorAction setId getId IContributionItem PinEditorContributionItem
non javadoc method declared on Contribution Item Factory public I Contribution Item create I Workbench Window window if window null throw new Illegal Argument Exception I Contribution Item item new Switch To Window Menu window get Id true return item  ContributionItemFactory IContributionItem IWorkbenchWindow IllegalArgumentException IContributionItem SwitchToWindowMenu getId
non javadoc method declared on Contribution Item Factory public I Contribution Item create I Workbench Window window if window null throw new Illegal Argument Exception indicate that a show views submenu has been created Workbench Window window add Submenu Workbench Window SHOW VIEW SUBMENU I Contribution Item item new Show View Menu window get Id return item  ContributionItemFactory IContributionItem IWorkbenchWindow IllegalArgumentException WorkbenchWindow addSubmenu WorkbenchWindow SHOW_VIEW_SUBMENU IContributionItem ShowViewMenu getId
non javadoc method declared on Contribution Item Factory public I Contribution Item create I Workbench Window window if window null throw new Illegal Argument Exception I Contribution Item item new Show In Menu window get Id return item  ContributionItemFactory IContributionItem IWorkbenchWindow IllegalArgumentException IContributionItem ShowInMenu getId
non javadoc method declared on Contribution Item Factory public I Contribution Item create I Workbench Window window if window null throw new Illegal Argument Exception I Contribution Item item new Reopen Editor Menu window get Id true return item  ContributionItemFactory IContributionItem IWorkbenchWindow IllegalArgumentException IContributionItem ReopenEditorMenu getId
non javadoc method declared on Contribution Item Factory public I Contribution Item create I Workbench Window window if window null throw new Illegal Argument Exception indicate that a open perspectives submenu has been created Workbench Window window add Submenu Workbench Window OPEN PERSPECTIVE SUBMENU I Contribution Item item new Change To Perspective Menu window get Id return item  ContributionItemFactory IContributionItem IWorkbenchWindow IllegalArgumentException WorkbenchWindow addSubmenu WorkbenchWindow OPEN_PERSPECTIVE_SUBMENU IContributionItem ChangeToPerspectiveMenu getId

Returns a new name for a copy of the resource at the given path in the given workspace This name is determined automatically param original Name the full path of the resource param workspace the workspace return the new full path for the copy static I Path get Auto New Name For I Path original Name I Workspace workspace int counter 1 String resource Name original Name last Segment I Path leadup Segment original Name remove Last Segments 1 while true String name Segment if counter 1 name Segment IDE Workbench Messages format Copy Files And Folders Operation copy Name Two Args new Object new Integer counter resource Name NON NLS 1 else name Segment IDE Workbench Messages format Copy Files And Folders Operation copy Name One Arg new Object resource Name NON NLS 1 I Path path To Try leadup Segment append name Segment if workspace get Root exists path To Try return path To Try counter  originalName IPath getAutoNewNameFor IPath originalName IWorkspace resourceName originalName lastSegment IPath leadupSegment originalName removeLastSegments nameSegment nameSegment IDEWorkbenchMessages CopyFilesAndFoldersOperation copyNameTwoArgs resourceName nameSegment IDEWorkbenchMessages CopyFilesAndFoldersOperation copyNameOneArg resourceName IPath pathToTry leadupSegment nameSegment getRoot pathToTry pathToTry
Creates a new operation initialized with a shell param shell parent shell for error dialogs public Copy Files And Folders Operation Shell shell parent Shell shell  CopyFilesAndFoldersOperation parentShell
Returns whether this operation is able to perform on the fly auto renaming of resources with name collisions return code true code if auto rename is supported and code false code otherwise protected boolean can Perform Auto Rename return true  canPerformAutoRename
Returns the message for querying deep copy move of a linked resource param source resource the query is made for return the deep query message protected String get Deep Check Question I Resource source return IDE Workbench Messages format Copy Files And Folders Operation deep Copy Question NON NLS 1 new Object source get Full Path make Relative  getDeepCheckQuestion IResource IDEWorkbenchMessages CopyFilesAndFoldersOperation deepCopyQuestion getFullPath makeRelative
Checks whether the files with the given names exist param names path to the file must not be null If the path is not valid it will not be tested return Multi status with one error message for each missing file I Status check Exist String names Multi Status multi Status new Multi Status PlatformUI PLUGIN ID I Status OK get Problems Message null for int i 0 i names length i I Path path new Path names i File file path to File if file null file exists false String message IDE Workbench Messages format Copy Files And Folders Operation resource Deleted NON NLS 1 new Object file get Name I Status status new Status I Status ERROR PlatformUI PLUGIN ID I Status OK message null multi Status add status return multi Status  IStatus checkExist MultiStatus multiStatus MultiStatus PLUGIN_ID IStatus getProblemsMessage IPath toFile IDEWorkbenchMessages CopyFilesAndFoldersOperation resourceDeleted getName IStatus IStatus PLUGIN_ID IStatus multiStatus multiStatus
Checks whether the files with the given names exist param names path to the file must not be null If the path is not valid it will not be tested return Multi status with one error message for each missing file I Status check Exist I Resource resources Multi Status multi Status new Multi Status PlatformUI PLUGIN ID I Status OK get Problems Message null for int i 0 i resources length i I Resource resource resources i if resource null I Path location resource get Location String message null if location null File file location to File if file exists false if resource is Linked message IDE Workbench Messages format Copy Files And Folders Operation missing Link Target NON NLS 1 new Object resource get Name else message IDE Workbench Messages format Copy Files And Folders Operation resource Deleted NON NLS 1 new Object resource get Name if message null I Status status new Status I Status ERROR PlatformUI PLUGIN ID I Status OK message null multi Status add status return multi Status  IStatus checkExist IResource MultiStatus multiStatus MultiStatus PLUGIN_ID IStatus getProblemsMessage IResource IPath getLocation toFile isLinked IDEWorkbenchMessages CopyFilesAndFoldersOperation missingLinkTarget getName IDEWorkbenchMessages CopyFilesAndFoldersOperation resourceDeleted getName IStatus IStatus PLUGIN_ID IStatus multiStatus multiStatus
Check if the user wishes to overwrite the supplied resource or all resources param shell the shell to create the overwrite prompt dialog in param source the source resource param destination the resource to be overwritten return one of I Dialog Constants YES ID I Dialog Constants YES TO ALL ID I Dialog Constants NO ID I Dialog Constants CANCEL ID indicating whether the current resource or all resources can be overwritten or if the operation should be canceled private int check Overwrite final Shell shell final I Resource source final I Resource destination final int result new int 1 Dialogs need to be created and opened in the UI thread Runnable query new Runnable public void run String message int result Id I Dialog Constants YES ID I Dialog Constants YES TO ALL ID I Dialog Constants NO ID I Dialog Constants CANCEL ID String labels new String I Dialog Constants YES LABEL I Dialog Constants YES TO ALL LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL if destination get Type I Resource FOLDER if homogenous Resources source destination message IDE Workbench Messages format Copy Files And Folders Operation overwrite Merge Question NON NLS 1 new Object destination get Full Path make Relative else if destination is Linked message IDE Workbench Messages format Copy Files And Folders Operation overwrite No Merge Link Question NON NLS 1 new Object destination get Full Path make Relative else message IDE Workbench Messages format Copy Files And Folders Operation overwrite No Merge No Link Question NON NLS 1 new Object destination get Full Path make Relative result Id new int I Dialog Constants YES ID I Dialog Constants NO ID I Dialog Constants CANCEL ID labels new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL else message IDE Workbench Messages format Copy Files And Folders Operation overwrite Question NON NLS 1 new Object destination get Full Path make Relative Message Dialog dialog new Message Dialog shell IDE Workbench Messages get String Copy Files And Folders Operation resource Exists NON NLS 1 null message Message Dialog QUESTION labels 0 dialog open result 0 result Id dialog get Return Code shell get Display sync Exec query return result 0  IDialogConstants YES_ID IDialogConstants YES_TO_ALL_ID IDialogConstants NO_ID IDialogConstants CANCEL_ID checkOverwrite IResource IResource resultId IDialogConstants YES_ID IDialogConstants YES_TO_ALL_ID IDialogConstants NO_ID IDialogConstants CANCEL_ID IDialogConstants YES_LABEL IDialogConstants YES_TO_ALL_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL getType IResource homogenousResources IDEWorkbenchMessages CopyFilesAndFoldersOperation overwriteMergeQuestion getFullPath makeRelative isLinked IDEWorkbenchMessages CopyFilesAndFoldersOperation overwriteNoMergeLinkQuestion getFullPath makeRelative IDEWorkbenchMessages CopyFilesAndFoldersOperation overwriteNoMergeNoLinkQuestion getFullPath makeRelative resultId IDialogConstants YES_ID IDialogConstants NO_ID IDialogConstants CANCEL_ID IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL IDEWorkbenchMessages CopyFilesAndFoldersOperation overwriteQuestion getFullPath makeRelative MessageDialog MessageDialog IDEWorkbenchMessages getString CopyFilesAndFoldersOperation resourceExists MessageDialog resultId getReturnCode getDisplay syncExec
Recursively collects existing files in the specified destination path param destination Path destination path to check for existing files param copy Resources resources that may exist in the destination param existing holds the collected existing files private void collect Existing Readonly Files I Path destination Path I Resource copy Resources Array List existing I Workspace Root workspace Root Resources Plugin get Workspace get Root for int i 0 i copy Resources length i I Resource source copy Resources i I Path new Destination Path destination Path append source get Name I Resource new Destination workspace Root find Member new Destination Path I Folder folder if new Destination null continue folder get Folder new Destination if folder null I Folder source Folder get Folder source if source Folder null try collect Existing Readonly Files new Destination Path source Folder members existing catch Core Exception exception record Error exception else I File file get File new Destination if file null if file is Read Only existing add file if get Validate Conflict Source I File source File get File source if source File null existing add source File  destinationPath copyResources collectExistingReadonlyFiles IPath destinationPath IResource copyResources ArrayList IWorkspaceRoot workspaceRoot ResourcesPlugin getWorkspace getRoot copyResources IResource copyResources IPath newDestinationPath destinationPath getName IResource newDestination workspaceRoot findMember newDestinationPath IFolder newDestination getFolder newDestination IFolder sourceFolder getFolder sourceFolder collectExistingReadonlyFiles newDestinationPath sourceFolder CoreException recordError IFile getFile newDestination isReadOnly getValidateConflictSource IFile sourceFile getFile sourceFile sourceFile
Copies the resources to the given destination This method is called recursively to merge folders during folder copy param resources the resources to copy param destination destination to which resources will be copied param sub Monitor a progress monitor for showing progress and for cancelation protected void copy I Resource resources I Path destination I Progress Monitor sub Monitor throws Core Exception for int i 0 i resources length i I Resource source resources i I Path destination Path destination append source get Name I Workspace workspace source get Workspace I Workspace Root workspace Root workspace get Root I Resource existing workspace Root find Member destination Path if source get Type I Resource FOLDER existing null the resource is a folder and it exists in the destination copy the children of the folder if homogenous Resources source existing I Resource children I Container source members copy children destination Path sub Monitor else delete the destination folder copying a linked folder over an unlinked one or vice versa Fixes bug 28772 delete existing new Sub Progress Monitor sub Monitor 0 source copy destination Path I Resource SHALLOW new Sub Progress Monitor sub Monitor 0 else if existing null if homogenous Resources source existing copy Existing source existing sub Monitor else Copying a linked resource over unlinked or vice versa Can t use set Contents here Fixes bug 28772 delete existing new Sub Progress Monitor sub Monitor 0 source copy destination Path I Resource SHALLOW new Sub Progress Monitor sub Monitor 0 else source copy destination Path I Resource SHALLOW new Sub Progress Monitor sub Monitor 0 sub Monitor worked 1 if sub Monitor is Canceled throw new Operation Canceled Exception  subMonitor IResource IPath IProgressMonitor subMonitor CoreException IResource IPath destinationPath getName IWorkspace getWorkspace IWorkspaceRoot workspaceRoot getRoot IResource workspaceRoot findMember destinationPath getType IResource homogenousResources IResource IContainer destinationPath subMonitor SubProgressMonitor subMonitor destinationPath IResource SubProgressMonitor subMonitor homogenousResources copyExisting subMonitor setContents SubProgressMonitor subMonitor destinationPath IResource SubProgressMonitor subMonitor destinationPath IResource SubProgressMonitor subMonitor subMonitor subMonitor isCanceled OperationCanceledException
Sets the content of the existing file to the source file content param source source file to copy param existing existing file to set the source content in param sub Monitor a progress monitor for showing progress and for cancelation throws Core Exception set Contents failed private void copy Existing I Resource source I Resource existing I Progress Monitor sub Monitor throws Core Exception I File existing File get File existing if existing File null I File source File get File source if source File null existing File set Contents source File get Contents I Resource KEEP HISTORY new Sub Progress Monitor sub Monitor 0  subMonitor CoreException setContents copyExisting IResource IResource IProgressMonitor subMonitor CoreException IFile existingFile getFile existingFile IFile sourceFile getFile sourceFile existingFile setContents sourceFile getContents IResource KEEP_HISTORY SubProgressMonitor subMonitor
Workspace Modify Operation op new Workspace Modify Operation public void execute I Progress Monitor monitor I Resource copy Resources resources Fix for bug 31116 Do not provide a task name when creating the task monitor begin Task 100 NON NLS 1 monitor set Task Name get Operation Title monitor worked 10 show some initial progress Checks only required if this is an exisiting container path boolean copy With Auto Rename false I Workspace Root root Resources Plugin get Workspace get Root if root exists destination Path I Container container I Container root find Member destination Path If we re copying to the source container then perform auto renames on all resources to avoid name collisions if is Destination Same As Source copy Resources container can Perform Auto Rename copy With Auto Rename true else If no auto renaming will be happening check for potential name collisions at the target resource copy Resources validate No Name Collisions container copy Resources monitor if copy Resources null if canceled return display Error IDE Workbench Messages get String Copy Files And Folders Operation name Collision NON NLS 1 return if validate Edit container copy Resources false return error Status null if copy Resources length 0 if copy With Auto Rename perform Copy With Auto Rename copy Resources destination Path monitor else perform Copy copy Resources destination Path monitor copied Resources 0 copy Resources  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor IResource copyResources beginTask setTaskName getOperationTitle copyWithAutoRename IWorkspaceRoot ResourcesPlugin getWorkspace getRoot destinationPath IContainer IContainer findMember destinationPath isDestinationSameAsSource copyResources canPerformAutoRename copyWithAutoRename copyResources validateNoNameCollisions copyResources copyResources displayError IDEWorkbenchMessages getString CopyFilesAndFoldersOperation nameCollision validateEdit copyResources errorStatus copyResources copyWithAutoRename performCopyWithAutoRename copyResources destinationPath performCopy copyResources destinationPath copiedResources copyResources
Copies the given resources to the destination param resources the resources to copy param destination destination to which resources will be copied public I Resource copy Resources final I Resource resources I Container destination final I Path destination Path destination get Full Path final I Resource copied Resources new I Resource 1 0 test resources for existence separate from validate API Validate is performance critical and resource exists check is potentially slow Fixes bugs 16129 28602 I Status resource Status check Exist resources if resource Status get Severity I Status OK Error Dialog open Error parent Shell get Problems Title null no special message resource Status return copied Resources 0 String error Msg validate Destination destination resources if error Msg null display Error error Msg return copied Resources 0 Workspace Modify Operation op new Workspace Modify Operation public void execute I Progress Monitor monitor I Resource copy Resources resources Fix for bug 31116 Do not provide a task name when creating the task monitor begin Task 100 NON NLS 1 monitor set Task Name get Operation Title monitor worked 10 show some initial progress Checks only required if this is an exisiting container path boolean copy With Auto Rename false I Workspace Root root Resources Plugin get Workspace get Root if root exists destination Path I Container container I Container root find Member destination Path If we re copying to the source container then perform auto renames on all resources to avoid name collisions if is Destination Same As Source copy Resources container can Perform Auto Rename copy With Auto Rename true else If no auto renaming will be happening check for potential name collisions at the target resource copy Resources validate No Name Collisions container copy Resources monitor if copy Resources null if canceled return display Error IDE Workbench Messages get String Copy Files And Folders Operation name Collision NON NLS 1 return if validate Edit container copy Resources false return error Status null if copy Resources length 0 if copy With Auto Rename perform Copy With Auto Rename copy Resources destination Path monitor else perform Copy copy Resources destination Path monitor copied Resources 0 copy Resources try new Progress Monitor Jobs Dialog parent Shell run true true op catch Interrupted Exception e return copied Resources 0 catch Invocation Target Exception e Core Exceptions are collected above but unexpected runtime exceptions and errors may still occur Platform get Plugin PlatformUI PLUGIN ID get Log log Status Util new Status I Status ERROR Message Format format Exception in 0 perform Copy 1 NON NLS 1 new Object get Class get Name e get Target Exception null display Error IDE Workbench Messages format Copy Files And Folders Operation internal Error NON NLS 1 new Object e get Target Exception get Message If errors occurred open an Error dialog if error Status null Error Dialog open Error parent Shell get Problems Title null no special message error Status error Status null return copied Resources 0  IResource copyResources IResource IContainer IPath destinationPath getFullPath IResource copiedResources IResource IStatus resourceStatus checkExist resourceStatus getSeverity IStatus ErrorDialog openError parentShell getProblemsTitle resourceStatus copiedResources errorMsg validateDestination errorMsg displayError errorMsg copiedResources WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor IResource copyResources beginTask setTaskName getOperationTitle copyWithAutoRename IWorkspaceRoot ResourcesPlugin getWorkspace getRoot destinationPath IContainer IContainer findMember destinationPath isDestinationSameAsSource copyResources canPerformAutoRename copyWithAutoRename copyResources validateNoNameCollisions copyResources copyResources displayError IDEWorkbenchMessages getString CopyFilesAndFoldersOperation nameCollision validateEdit copyResources errorStatus copyResources copyWithAutoRename performCopyWithAutoRename copyResources destinationPath performCopy copyResources destinationPath copiedResources copyResources ProgressMonitorJobsDialog parentShell InterruptedException copiedResources InvocationTargetException CoreExceptions getPlugin PLUGIN_ID getLog StatusUtil newStatus IStatus MessageFormat performCopy getClass getName getTargetException displayError IDEWorkbenchMessages CopyFilesAndFoldersOperation internalError getTargetException getMessage errorStatus ErrorDialog openError parentShell getProblemsTitle errorStatus errorStatus copiedResources
Workspace Modify Operation op new Workspace Modify Operation public void execute I Progress Monitor monitor Checks only required if this is an exisiting container path I Workspace Root root Resources Plugin get Workspace get Root if root exists destination Path I Container container I Container root find Member destination Path perform File Import get Files file Names container monitor  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor IWorkspaceRoot ResourcesPlugin getWorkspace getRoot destinationPath IContainer IContainer findMember destinationPath performFileImport getFiles fileNames
Copies the given files and folders to the destination param file Names names of the files to copy param destination destination to which files will be copied public void copy Files final String file Names I Container destination always Overwrite false test files for existence separate from validate API because an external file may not exist until the copy actually takes place e g Win Zip contents I Status file Status check Exist file Names if file Status get Severity I Status OK Error Dialog open Error parent Shell get Problems Title null no special message file Status return String error Msg validate Import Destination destination file Names if error Msg null display Error error Msg return final I Path destination Path destination get Full Path Workspace Modify Operation op new Workspace Modify Operation public void execute I Progress Monitor monitor Checks only required if this is an exisiting container path I Workspace Root root Resources Plugin get Workspace get Root if root exists destination Path I Container container I Container root find Member destination Path perform File Import get Files file Names container monitor try new Progress Monitor Jobs Dialog parent Shell run true true op catch Interrupted Exception e return catch Invocation Target Exception e Core Exceptions are collected above but unexpected runtime exceptions and errors may still occur Platform get Plugin PlatformUI PLUGIN ID get Log log Status Util new Status I Status ERROR Message Format format Exception in 0 perform Copy 1 NON NLS 1 new Object get Class get Name e get Target Exception null display Error IDE Workbench Messages format Copy Files And Folders Operation internal Error new Object e get Target Exception get Message NON NLS 1 If errors occurred open an Error dialog if error Status null Error Dialog open Error parent Shell get Problems Title NON NLS 1 null no special message error Status error Status null  fileNames copyFiles fileNames IContainer alwaysOverwrite WinZip IStatus fileStatus checkExist fileNames fileStatus getSeverity IStatus ErrorDialog openError parentShell getProblemsTitle fileStatus errorMsg validateImportDestination fileNames errorMsg displayError errorMsg IPath destinationPath getFullPath WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor IWorkspaceRoot ResourcesPlugin getWorkspace getRoot destinationPath IContainer IContainer findMember destinationPath performFileImport getFiles fileNames ProgressMonitorJobsDialog parentShell InterruptedException InvocationTargetException CoreExceptions getPlugin PLUGIN_ID getLog StatusUtil newStatus IStatus MessageFormat performCopy getClass getName getTargetException displayError IDEWorkbenchMessages CopyFilesAndFoldersOperation internalError getTargetException getMessage errorStatus ErrorDialog openError parentShell getProblemsTitle errorStatus errorStatus
Creates a file or folder handle for the source resource as if it were to be created in the destination container param destination destination container param source source resource return I Resource file or folder handle depending on the source type I Resource create Linked Resource Handle I Container destination I Resource source I Workspace workspace destination get Workspace I Workspace Root workspace Root workspace get Root I Path link Path destination get Full Path append source get Name I Resource link Handle if source get Type I Resource FOLDER link Handle workspace Root get Folder link Path else link Handle workspace Root get File link Path return link Handle  IResource IResource createLinkedResourceHandle IContainer IResource IWorkspace getWorkspace IWorkspaceRoot workspaceRoot getRoot IPath linkPath getFullPath getName IResource linkHandle getType IResource linkHandle workspaceRoot getFolder linkPath linkHandle workspaceRoot getFile linkPath linkHandle
Removes the given resource from the workspace param resource resource to remove from the workspace param monitor a progress monitor for showing progress and for cancelation return true the resource was deleted successfully false the resource was not deleted because a Core Exception occurred boolean delete I Resource resource I Progress Monitor monitor throws Core Exception boolean force false don t force deletion of out of sync resources if resource get Type I Resource PROJECT if it s a project ask whether content should be deleted too I Project project I Project resource try project delete true force monitor catch Core Exception e record Error e log error return false else if it s not a project just delete it int flags I Resource KEEP HISTORY if force flags flags I Resource FORCE try resource delete flags monitor catch Core Exception e record Error e log error return false return true  CoreException IResource IProgressMonitor CoreException getType IResource IProject IProject CoreException recordError IResource KEEP_HISTORY IResource CoreException recordError
private void display Error final String message parent Shell get Display sync Exec new Runnable public void run Message Dialog open Error parent Shell get Problems Title message  displayError parentShell getDisplay syncExec MessageDialog openError parentShell getProblemsTitle
Opens an error dialog to display the given message param message the error message to show private void display Error final String message parent Shell get Display sync Exec new Runnable public void run Message Dialog open Error parent Shell get Problems Title message  displayError parentShell getDisplay syncExec MessageDialog openError parentShell getProblemsTitle
Returns the resource either casted to or adapted to an I File param resource resource to cast adapt return the resource either casted to or adapted to an I File code null code if the resource does not adapt to I File protected I File get File I Resource resource if resource instanceof I File return I File resource if resource instanceof I Adaptable return I File I Adaptable resource get Adapter I File class return null  IFile IFile IFile IFile getFile IResource IFile IFile IAdaptable IFile IAdaptable getAdapter IFile
Returns java io File objects for the given file names param file Names files to return File object for return java io File objects for the given file names protected File get Files String file Names File files new File file Names length for int i 0 i file Names length i files i new File file Names i return files  fileNames getFiles fileNames fileNames fileNames fileNames
Returns the resource either casted to or adapted to an I Folder param resource resource to cast adapt return the resource either casted to or adapted to an I Folder code null code if the resource does not adapt to I Folder protected I Folder get Folder I Resource resource if resource instanceof I Folder return I Folder resource if resource instanceof I Adaptable return I Folder I Adaptable resource get Adapter I Folder class return null  IFolder IFolder IFolder IFolder getFolder IResource IFolder IFolder IAdaptable IFolder IAdaptable getAdapter IFolder
I Input Validator validator new I Input Validator public String is Valid String string if resource get Name equals string return IDE Workbench Messages get String Copy Files And Folders Operation name Must Be Different NON NLS 1 I Status status workspace validate Name string resource get Type if status isOK return status get Message if workspace get Root exists prefix append string return IDE Workbench Messages get String Copy Files And Folders Operation name Exists NON NLS 1 return null  IInputValidator IInputValidator isValid getName IDEWorkbenchMessages getString CopyFilesAndFoldersOperation nameMustBeDifferent IStatus validateName getType getMessage getRoot IDEWorkbenchMessages getString CopyFilesAndFoldersOperation nameExists
parent Shell get Display sync Exec new Runnable public void run I Input Validator validator new I Input Validator public String is Valid String string if resource get Name equals string return IDE Workbench Messages get String Copy Files And Folders Operation name Must Be Different NON NLS 1 I Status status workspace validate Name string resource get Type if status isOK return status get Message if workspace get Root exists prefix append string return IDE Workbench Messages get String Copy Files And Folders Operation name Exists NON NLS 1 return null Input Dialog dialog new Input Dialog parent Shell IDE Workbench Messages get String Copy Files And Folders Operation input Dialog Title NON NLS 1 IDE Workbench Messages format Copy Files And Folders Operation input Dialog Message new String resource get Name NON NLS 1 get Auto New Name For original Name workspace last Segment to String validator dialog set Block On Open true dialog open if dialog get Return Code Window CANCEL return Value 0 null else return Value 0 dialog get Value  parentShell getDisplay syncExec IInputValidator IInputValidator isValid getName IDEWorkbenchMessages getString CopyFilesAndFoldersOperation nameMustBeDifferent IStatus validateName getType getMessage getRoot IDEWorkbenchMessages getString CopyFilesAndFoldersOperation nameExists InputDialog InputDialog parentShell IDEWorkbenchMessages getString CopyFilesAndFoldersOperation inputDialogTitle IDEWorkbenchMessages CopyFilesAndFoldersOperation inputDialogMessage getName getAutoNewNameFor originalName lastSegment toString setBlockOnOpen getReturnCode returnValue returnValue getValue
Returns a new name for a copy of the resource at the given path in the given workspace param original Name the full path of the resource param workspace the workspace return the new full path for the copy or code null code if the resource should not be copied private I Path get New Name For final I Path original Name final I Workspace workspace final I Resource resource workspace get Root find Member original Name final I Path prefix resource get Full Path remove Last Segments 1 final String return Value NON NLS 1 parent Shell get Display sync Exec new Runnable public void run I Input Validator validator new I Input Validator public String is Valid String string if resource get Name equals string return IDE Workbench Messages get String Copy Files And Folders Operation name Must Be Different NON NLS 1 I Status status workspace validate Name string resource get Type if status isOK return status get Message if workspace get Root exists prefix append string return IDE Workbench Messages get String Copy Files And Folders Operation name Exists NON NLS 1 return null Input Dialog dialog new Input Dialog parent Shell IDE Workbench Messages get String Copy Files And Folders Operation input Dialog Title NON NLS 1 IDE Workbench Messages format Copy Files And Folders Operation input Dialog Message new String resource get Name NON NLS 1 get Auto New Name For original Name workspace last Segment to String validator dialog set Block On Open true dialog open if dialog get Return Code Window CANCEL return Value 0 null else return Value 0 dialog get Value if return Value 0 null throw new Operation Canceled Exception return prefix append return Value 0  originalName IPath getNewNameFor IPath originalName IWorkspace IResource getRoot findMember originalName IPath getFullPath removeLastSegments returnValue parentShell getDisplay syncExec IInputValidator IInputValidator isValid getName IDEWorkbenchMessages getString CopyFilesAndFoldersOperation nameMustBeDifferent IStatus validateName getType getMessage getRoot IDEWorkbenchMessages getString CopyFilesAndFoldersOperation nameExists InputDialog InputDialog parentShell IDEWorkbenchMessages getString CopyFilesAndFoldersOperation inputDialogTitle IDEWorkbenchMessages CopyFilesAndFoldersOperation inputDialogMessage getName getAutoNewNameFor originalName lastSegment toString setBlockOnOpen getReturnCode returnValue returnValue getValue returnValue OperationCanceledException returnValue
Returns the task title for this operation s progress dialog return the task title protected String get Operation Title return IDE Workbench Messages get String Copy Files And Folders Operation operation Title NON NLS 1  getOperationTitle IDEWorkbenchMessages getString CopyFilesAndFoldersOperation operationTitle
Returns the message for this operation s problems dialog return the problems message protected String get Problems Message return IDE Workbench Messages get String Copy Files And Folders Operation problem Message NON NLS 1  getProblemsMessage IDEWorkbenchMessages getString CopyFilesAndFoldersOperation problemMessage
Returns the title for this operation s problems dialog return the problems dialog title protected String get Problems Title return IDE Workbench Messages get String Copy Files And Folders Operation copy Failed Title NON NLS 1  getProblemsTitle IDEWorkbenchMessages getString CopyFilesAndFoldersOperation copyFailedTitle
Returns whether the source file in a destination collision will be validate Edited together with the collision itself Returns false Should return true if the source file is to be deleted after the operation return boolean code true code if the source file in a destination collision should be validate Edited code false code if only the destination should be validated protected boolean get Validate Conflict Source return false  validateEdited validateEdited getValidateConflictSource
Returns whether the given resources are either both linked or both unlinked param source source resource param destination destination resource return boolean code true code if both resources are either linked or unlinked code false code otherwise protected boolean homogenous Resources I Resource source I Resource destination boolean is Source Linked source is Linked boolean is Destination Linked destination is Linked return is Source Linked is Destination Linked is Source Linked false is Destination Linked false  homogenousResources IResource IResource isSourceLinked isLinked isDestinationLinked isLinked isSourceLinked isDestinationLinked isSourceLinked isDestinationLinked
Returns whether the given resource is accessible Files and folders are always considered accessible and a project is accessible if it is open param resource the resource return code true code if the resource is accessible and code false code if it is not private boolean is Accessible I Resource resource switch resource get Type case I Resource FILE return true case I Resource FOLDER return true case I Resource PROJECT return I Project resource is Open default return false  isAccessible IResource getType IResource IResource IResource IProject isOpen
Returns whether any of the given source resources are being recopied to their current container param source Resources the source resources param destination the destination container return code true code if at least one of the given source resource s parent container is the same as the destination boolean is Destination Same As Source I Resource source Resources I Container destination I Path destination Location destination get Location for int i 0 i source Resources length i I Resource source Resource source Resources i if source Resource get Parent equals destination return true else if destination Location null do thorough check to catch linked resources Fixes bug 29913 I Path source Location source Resource get Location I Path destination Resource destination Location append source Resource get Name if source Location null source Location is Prefix Of destination Resource return true return false  sourceResources isDestinationSameAsSource IResource sourceResources IContainer IPath destinationLocation getLocation sourceResources IResource sourceResource sourceResources sourceResource getParent destinationLocation IPath sourceLocation sourceResource getLocation IPath destinationResource destinationLocation sourceResource getName sourceLocation sourceLocation isPrefixOf destinationResource
Copies the given resources to the destination container with the given name p Note the destination container may need to be created prior to copying the resources p param resources the resources to copy param destination the path of the destination container param monitor a progress monitor for showing progress and for cancelation return code true code if the copy operation completed without errors private boolean perform Copy I Resource resources I Path destination I Progress Monitor monitor try Container Generator generator new Container Generator destination generator generate Container new Sub Progress Monitor monitor 10 I Progress Monitor sub Monitor new Sub Progress Monitor monitor 75 copy resources destination sub Monitor catch Core Exception e record Error e log error return false finally monitor done return true  performCopy IResource IPath IProgressMonitor ContainerGenerator ContainerGenerator generateContainer SubProgressMonitor IProgressMonitor subMonitor SubProgressMonitor subMonitor CoreException recordError
Individually copies the given resources to the specified destination container checking for name collisions If a collision is detected it is saved with a new name p Note the destination container may need to be created prior to copying the resources p param resources the resources to copy param destination the path of the destination container return code true code if the copy operation completed without errors private boolean perform Copy With Auto Rename I Resource resources I Path destination I Progress Monitor monitor I Workspace workspace resources 0 get Workspace try Container Generator generator new Container Generator destination generator generate Container new Sub Progress Monitor monitor 10 I Progress Monitor sub Monitor new Sub Progress Monitor monitor 75 sub Monitor begin Task get Operation Title resources length for int i 0 i resources length i I Resource source resources i I Path destination Path destination append source get Name if workspace get Root exists destination Path destination Path get New Name For destination Path workspace if destination Path null try source copy destination Path I Resource SHALLOW new Sub Progress Monitor sub Monitor 0 catch Core Exception e record Error e log error return false sub Monitor worked 1 if sub Monitor is Canceled throw new Operation Canceled Exception catch Core Exception e record Error e log error return false finally monitor done return true  performCopyWithAutoRename IResource IPath IProgressMonitor IWorkspace getWorkspace ContainerGenerator ContainerGenerator generateContainer SubProgressMonitor IProgressMonitor subMonitor SubProgressMonitor subMonitor beginTask getOperationTitle IResource IPath destinationPath getName getRoot destinationPath destinationPath getNewNameFor destinationPath destinationPath destinationPath IResource SubProgressMonitor subMonitor CoreException recordError subMonitor subMonitor isCanceled OperationCanceledException CoreException recordError
parent Shell get Display sync Exec new Runnable public void run Message Dialog dialog new Message Dialog parent Shell IDE Workbench Messages get String Copy Files And Folders Operation question null msg Message Dialog QUESTION options 0 NON NLS 1 dialog open int return Val dialog get Return Code String return Codes YES ALL NO CANCEL return Code 0 return Val 1 CANCEL return Codes return Val  parentShell getDisplay syncExec MessageDialog MessageDialog parentShell IDEWorkbenchMessages getString CopyFilesAndFoldersOperation MessageDialog returnVal getReturnCode returnCodes returnCode returnVal returnCodes returnVal
I Overwrite Query query new I Overwrite Query public String query Overwrite String path String if always Overwrite return ALL final String return Code CANCEL final String msg IDE Workbench Messages format Copy Files And Folders Operation overwrite Question new Object path String NON NLS 1 final String options I Dialog Constants YES LABEL I Dialog Constants YES TO ALL LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL parent Shell get Display sync Exec new Runnable public void run Message Dialog dialog new Message Dialog parent Shell IDE Workbench Messages get String Copy Files And Folders Operation question null msg Message Dialog QUESTION options 0 NON NLS 1 dialog open int return Val dialog get Return Code String return Codes YES ALL NO CANCEL return Code 0 return Val 1 CANCEL return Codes return Val if return Code 0 ALL always Overwrite true else if return Code 0 CANCEL canceled true return return Code 0  IOverwriteQuery IOverwriteQuery queryOverwrite pathString alwaysOverwrite returnCode IDEWorkbenchMessages CopyFilesAndFoldersOperation overwriteQuestion pathString IDialogConstants YES_LABEL IDialogConstants YES_TO_ALL_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL parentShell getDisplay syncExec MessageDialog MessageDialog parentShell IDEWorkbenchMessages getString CopyFilesAndFoldersOperation MessageDialog returnVal getReturnCode returnCodes returnCode returnVal returnCodes returnVal returnCode alwaysOverwrite returnCode returnCode
parent Shell get Display sync Exec new Runnable public void run Error Dialog open Error parent Shell IDE Workbench Messages get String Copy Files And Folders Operation import Error Dialog Title NON NLS 1 null no special message status  parentShell getDisplay syncExec ErrorDialog openError parentShell IDEWorkbenchMessages getString CopyFilesAndFoldersOperation importErrorDialogTitle
Performs an import of the given files into the provided container Returns a status indicating if the import was successful param files files that are to be imported param target container to which the import will be done param monitor a progress monitor for showing progress and for cancelation private void perform File Import File files I Container target I Progress Monitor monitor I Overwrite Query query new I Overwrite Query public String query Overwrite String path String if always Overwrite return ALL final String return Code CANCEL final String msg IDE Workbench Messages format Copy Files And Folders Operation overwrite Question new Object path String NON NLS 1 final String options I Dialog Constants YES LABEL I Dialog Constants YES TO ALL LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL parent Shell get Display sync Exec new Runnable public void run Message Dialog dialog new Message Dialog parent Shell IDE Workbench Messages get String Copy Files And Folders Operation question null msg Message Dialog QUESTION options 0 NON NLS 1 dialog open int return Val dialog get Return Code String return Codes YES ALL NO CANCEL return Code 0 return Val 1 CANCEL return Codes return Val if return Code 0 ALL always Overwrite true else if return Code 0 CANCEL canceled true return return Code 0 Import Operation op new Import Operation target get Full Path null File System Structure Provider INSTANCE query Arrays as List files op set Context parent Shell op set Create Container Structure false try op run monitor catch Interrupted Exception e return catch Invocation Target Exception e if e get Target Exception instanceof Core Exception final I Status status Core Exception e get Target Exception get Status parent Shell get Display sync Exec new Runnable public void run Error Dialog open Error parent Shell IDE Workbench Messages get String Copy Files And Folders Operation import Error Dialog Title NON NLS 1 null no special message status else Core Exceptions are handled above but unexpected runtime exceptions and errors may still occur Platform get Plugin PlatformUI PLUGIN ID get Log log Status Util new Status I Status ERROR Message Format format Exception in 0 perform File Import 1 NON NLS 1 new Object get Class get Name e get Target Exception null display Error IDE Workbench Messages format Copy Files And Folders Operation internal Error NON NLS 1 new Object e get Target Exception get Message return Special case since Import Operation doesn t throw a Core Exception on failure I Status status op get Status if status isOK if error Status null error Status new Multi Status PlatformUI PLUGIN ID I Status ERROR get Problems Message null NON NLS 1 error Status merge status  performFileImport IContainer IProgressMonitor IOverwriteQuery IOverwriteQuery queryOverwrite pathString alwaysOverwrite returnCode IDEWorkbenchMessages CopyFilesAndFoldersOperation overwriteQuestion pathString IDialogConstants YES_LABEL IDialogConstants YES_TO_ALL_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL parentShell getDisplay syncExec MessageDialog MessageDialog parentShell IDEWorkbenchMessages getString CopyFilesAndFoldersOperation MessageDialog returnVal getReturnCode returnCodes returnCode returnVal returnCodes returnVal returnCode alwaysOverwrite returnCode returnCode ImportOperation ImportOperation getFullPath FileSystemStructureProvider asList setContext parentShell setCreateContainerStructure InterruptedException InvocationTargetException getTargetException CoreException IStatus CoreException getTargetException getStatus parentShell getDisplay syncExec ErrorDialog openError parentShell IDEWorkbenchMessages getString CopyFilesAndFoldersOperation importErrorDialogTitle CoreExceptions getPlugin PLUGIN_ID getLog StatusUtil newStatus IStatus MessageFormat performFileImport getClass getName getTargetException displayError IDEWorkbenchMessages CopyFilesAndFoldersOperation internalError getTargetException getMessage ImportOperation CoreException IStatus getStatus errorStatus errorStatus MultiStatus PLUGIN_ID IStatus getProblemsMessage errorStatus
Records the core exception to be displayed to the user once the action is finished param error a code Core Exception code private void record Error Core Exception error if error Status null error Status new Multi Status PlatformUI PLUGIN ID I Status ERROR get Problems Message error NON NLS 1 error Status merge error get Status  CoreException recordError CoreException errorStatus errorStatus MultiStatus PLUGIN_ID IStatus getProblemsMessage errorStatus getStatus
Checks whether the destination is valid for copying the source resources p Note this method is for internal use only It is not API p param destination the destination container param source Resources the source resources return an error message or code null code if the path is valid public String validate Destination I Container destination I Resource source Resources if is Accessible destination return IDE Workbench Messages get String Copy Files And Folders Operation destination Access Error NON NLS 1 String destination Message validate Destination Location destination if destination Message null return destination Message I Container first Parent null I Path destination Location destination get Location for int i 0 i source Resources length i I Resource source Resource source Resources i if first Parent null first Parent source Resource get Parent else if first Parent equals source Resource get Parent false Resources must have common parent Fixes bug 33398 return IDE Workbench Messages get String Copy Files And Folders Operation parent Not Equal NON NLS 1 I Path source Location source Resource get Location if source Location null if source Resource is Linked Don t allow copying linked resources with undefined path variables See bug 28754 return IDE Workbench Messages format Copy Files And Folders Operation missing Path Variable NON NLS 1 new Object source Resource get Name else return IDE Workbench Messages format Copy Files And Folders Operation resource Deleted NON NLS 1 new Object source Resource get Name else if source Location equals destination Location return IDE Workbench Messages format Copy Files And Folders Operation same Source And Dest NON NLS 1 new Object source Resource get Name is the source a parent of the destination if source Location is Prefix Of destination Location return IDE Workbench Messages get String Copy Files And Folders Operation destination Descendent Error NON NLS 1 String linked Resource Message validate Linked Resource destination source Resource if linked Resource Message null return linked Resource Message return null  sourceResources validateDestination IContainer IResource sourceResources isAccessible IDEWorkbenchMessages getString CopyFilesAndFoldersOperation destinationAccessError destinationMessage validateDestinationLocation destinationMessage destinationMessage IContainer firstParent IPath destinationLocation getLocation sourceResources IResource sourceResource sourceResources firstParent firstParent sourceResource getParent firstParent sourceResource getParent IDEWorkbenchMessages getString CopyFilesAndFoldersOperation parentNotEqual IPath sourceLocation sourceResource getLocation sourceLocation sourceResource isLinked IDEWorkbenchMessages CopyFilesAndFoldersOperation missingPathVariable sourceResource getName IDEWorkbenchMessages CopyFilesAndFoldersOperation resourceDeleted sourceResource getName sourceLocation destinationLocation IDEWorkbenchMessages CopyFilesAndFoldersOperation sameSourceAndDest sourceResource getName sourceLocation isPrefixOf destinationLocation IDEWorkbenchMessages getString CopyFilesAndFoldersOperation destinationDescendentError linkedResourceMessage validateLinkedResource sourceResource linkedResourceMessage linkedResourceMessage
Validates whether the destination location exists Linked resources created on undefined path variables have an undefined location param destination destination container return error message or null if destination location is valid non code null code private String validate Destination Location I Container destination I Path destination Location destination get Location if destination Location null if destination is Linked return IDE Workbench Messages format Copy Files And Folders Operation missing Path Variable NON NLS 1 new Object destination get Name else return IDE Workbench Messages format Copy Files And Folders Operation resource Deleted NON NLS 1 new Object destination get Name return null  validateDestinationLocation IContainer IPath destinationLocation getLocation destinationLocation isLinked IDEWorkbenchMessages CopyFilesAndFoldersOperation missingPathVariable getName IDEWorkbenchMessages CopyFilesAndFoldersOperation resourceDeleted getName
Validates that the given source resources can be copied to the destination as decided by the VCM provider param destination copy destination param source Resources source resources return code true code all files passed validation or there were no files to validate code false code one or more files did not pass validation private boolean validate Edit I Container destination I Resource source Resources Array List copy Files new Array List collect Existing Readonly Files destination get Full Path source Resources copy Files if copy Files size 0 I File files I File copy Files to Array new I File copy Files size I Workspace workspace Resources Plugin get Workspace I Status status workspace validate Edit files parent Shell canceled status isOK false return status isOK return true  sourceResources validateEdit IContainer IResource sourceResources ArrayList copyFiles ArrayList collectExistingReadonlyFiles getFullPath sourceResources copyFiles copyFiles IFile IFile copyFiles toArray IFile copyFiles IWorkspace ResourcesPlugin getWorkspace IStatus validateEdit parentShell
Checks whether the destination is valid for copying the source files p Note this method is for internal use only It is not API p param destination the destination container param source Names the source file names return an error message or code null code if the path is valid public String validate Import Destination I Container destination String source Names if is Accessible destination return IDE Workbench Messages get String Copy Files And Folders Operation destination Access Error NON NLS 1 String destination Message validate Destination Location destination if destination Message null return destination Message work around bug 16202 revert when fixed I Path destination Path destination get Location File destination File destination Path to File for int i 0 i source Names length i I Path source Path new Path source Names i File source File source Path to File File source Parent File source Path remove Last Segments 1 to File if source File null if destination File compare To source File 0 source Parent File null destination File compare To source Parent File 0 return IDE Workbench Messages format Copy Files And Folders Operation import Same Source And Dest NON NLS 1 new Object source File get Name work around bug 16202 replacement for source Path is Prefix Of destination Path I Path destination Parent destination Path remove Last Segments 1 while destination Parent is Empty false destination Parent is Root false destination File destination Parent to File if source File compare To destination File 0 return IDE Workbench Messages get String Copy Files And Folders Operation destination Descendent Error NON NLS 1 destination Parent destination Parent remove Last Segments 1 return null  sourceNames validateImportDestination IContainer sourceNames isAccessible IDEWorkbenchMessages getString CopyFilesAndFoldersOperation destinationAccessError destinationMessage validateDestinationLocation destinationMessage destinationMessage IPath destinationPath getLocation destinationFile destinationPath toFile sourceNames IPath sourcePath sourceNames sourceFile sourcePath toFile sourceParentFile sourcePath removeLastSegments toFile sourceFile destinationFile compareTo sourceFile sourceParentFile destinationFile compareTo sourceParentFile IDEWorkbenchMessages CopyFilesAndFoldersOperation importSameSourceAndDest sourceFile getName sourcePath isPrefixOf destinationPath IPath destinationParent destinationPath removeLastSegments destinationParent isEmpty destinationParent isRoot destinationFile destinationParent toFile sourceFile compareTo destinationFile IDEWorkbenchMessages getString CopyFilesAndFoldersOperation destinationDescendentError destinationParent destinationParent removeLastSegments
Check if the destination is valid for the given source resource param destination destination container of the operation param source source resource return String error message or null if the destination is valid private String validate Linked Resource I Container destination I Resource source if source is Linked false return null I Workspace workspace destination get Workspace I Resource link Handle create Linked Resource Handle destination source I Status location Status workspace validate Link Location link Handle source get Raw Location if location Status get Severity I Status ERROR return location Status get Message I Path source Location source get Location if source get Project equals destination get Project false source get Type I Resource FOLDER source Location null prevent merging linked folders that point to the same file system folder try I Resource members destination members for int j 0 j members length j if source Location equals members j get Location source get Name equals members j get Name return IDE Workbench Messages format Copy Files And Folders Operation same Source And Dest NON NLS 1 new Object source get Name catch Core Exception exception display Error IDE Workbench Messages format Copy Files And Folders Operation internal Error NON NLS 1 new Object exception get Message return null  validateLinkedResource IContainer IResource isLinked IWorkspace getWorkspace IResource linkHandle createLinkedResourceHandle IStatus locationStatus validateLinkLocation linkHandle getRawLocation locationStatus getSeverity IStatus locationStatus getMessage IPath sourceLocation getLocation getProject getProject getType IResource sourceLocation IResource sourceLocation getLocation getName getName IDEWorkbenchMessages CopyFilesAndFoldersOperation sameSourceAndDest getName CoreException displayError IDEWorkbenchMessages CopyFilesAndFoldersOperation internalError getMessage
Runnable notice new Runnable public void run Message Dialog open Error parent Shell IDE Workbench Messages get String Copy Files And Folders Operation overwrite Problem Title NON NLS 1 IDE Workbench Messages format Copy Files And Folders Operation overwrite Problem NON NLS 1 new Object destination Path source Path  MessageDialog openError parentShell IDEWorkbenchMessages getString CopyFilesAndFoldersOperation overwriteProblemTitle IDEWorkbenchMessages CopyFilesAndFoldersOperation overwriteProblem destinationPath sourcePath
Returns whether moving all of the given source resources to the given destination container could be done without causing name collisions param destination the destination container param source Resources the list of resources param monitor a progress monitor for showing progress and for cancelation return code true code if there would be no name collisions and code false code if there would private I Resource validate No Name Collisions I Container destination I Resource source Resources I Progress Monitor monitor List copy Items new Array List I Workspace Root workspace Root destination get Workspace get Root int overwrite I Dialog Constants NO ID Check to see if we would be overwriting a parent folder Cancel entire copy operation if we do for int i 0 i source Resources length i final I Resource source Resource source Resources i final I Path destination Path destination get Full Path append source Resource get Name final I Path source Path source Resource get Full Path I Resource new Resource workspace Root find Member destination Path if new Resource null destination Path is Prefix Of source Path Run it inside of a runnable to make sure we get to parent off of the shell as we are not in the UI thread Runnable notice new Runnable public void run Message Dialog open Error parent Shell IDE Workbench Messages get String Copy Files And Folders Operation overwrite Problem Title NON NLS 1 IDE Workbench Messages format Copy Files And Folders Operation overwrite Problem NON NLS 1 new Object destination Path source Path parent Shell get Display sync Exec notice canceled true return null Check for overwrite conflicts for int i 0 i source Resources length i final I Resource source source Resources i final I Path destination Path destination get Full Path append source get Name I Resource new Resource workspace Root find Member destination Path if new Resource null if overwrite I Dialog Constants YES TO ALL ID new Resource get Type I Resource FOLDER homogenous Resources source destination false overwrite check Overwrite parent Shell source new Resource if overwrite I Dialog Constants YES ID overwrite I Dialog Constants YES TO ALL ID copy Items add source else if overwrite I Dialog Constants CANCEL ID canceled true return null else copy Items add source return I Resource copy Items to Array new I Resource copy Items size  sourceResources IResource validateNoNameCollisions IContainer IResource sourceResources IProgressMonitor copyItems ArrayList IWorkspaceRoot workspaceRoot getWorkspace getRoot IDialogConstants NO_ID sourceResources IResource sourceResource sourceResources IPath destinationPath getFullPath sourceResource getName IPath sourcePath sourceResource getFullPath IResource newResource workspaceRoot findMember destinationPath newResource destinationPath isPrefixOf sourcePath MessageDialog openError parentShell IDEWorkbenchMessages getString CopyFilesAndFoldersOperation overwriteProblemTitle IDEWorkbenchMessages CopyFilesAndFoldersOperation overwriteProblem destinationPath sourcePath parentShell getDisplay syncExec sourceResources IResource sourceResources IPath destinationPath getFullPath getName IResource newResource workspaceRoot findMember destinationPath newResource IDialogConstants YES_TO_ALL_ID newResource getType IResource homogenousResources checkOverwrite parentShell newResource IDialogConstants YES_ID IDialogConstants YES_TO_ALL_ID copyItems IDialogConstants CANCEL_ID copyItems IResource copyItems toArray IResource copyItems

protected I Status error Status Creates a new project copy action with the default text param shell the shell for any dialogs public Copy Project Action Shell shell this shell COPY TITLE Workbench Help set Help this I Help Context Ids COPY PROJECT ACTION  IStatus errorStatus CopyProjectAction COPY_TITLE WorkbenchHelp setHelp IHelpContextIds COPY_PROJECT_ACTION
Creates a new project copy action with the given text param shell the shell for any dialogs param name the string used as the text for the action or code null code if there is no text Copy Project Action Shell shell String name super name set Tool Tip Text COPY TOOL TIP set Id Copy Project Action ID if shell null throw new Illegal Argument Exception this shell shell  CopyProjectAction setToolTipText COPY_TOOL_TIP setId CopyProjectAction IllegalArgumentException
Create a new I Project Description for the copy using the name and path selected from the dialog return I Project Description param project the source project param project Name the name for the new project param root Location the path the new project will be stored under protected I Project Description create Description I Project project String project Name I Path root Location throws Core Exception Get a copy of the current description and modify it I Project Description new Description project get Description new Description set Name project Name If the location is the default then set the location to null if root Location equals Platform get Location new Description set Location null else new Description set Location root Location return new Description  IProjectDescription IProjectDescription projectName rootLocation IProjectDescription createDescription IProject projectName IPath rootLocation CoreException IProjectDescription newDescription getDescription newDescription setName projectName rootLocation getLocation newDescription setLocation newDescription setLocation rootLocation newDescription
Opens an error dialog to display the given message p Note that this method must be called from UI thread p param message the message void display Error String message Message Dialog open Error this shell get Errors Title message  displayError MessageDialog openError getErrorsTitle
Return the title of the errors dialog return java lang String protected String get Errors Title return PROBLEMS TITLE  getErrorsTitle PROBLEMS_TITLE
Get the plugin used by a copy action return AbstractUI Plugin protected org eclipse ui plugin AbstractUI Plugin get Plugin return AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID  AbstractUIPlugin AbstractUIPlugin getPlugin AbstractUIPlugin getPlugin PLUGIN_ID
Workspace Modify Operation op new Workspace Modify Operation public void execute I Progress Monitor monitor monitor begin Task COPY PROGRESS TITLE 100 try if monitor is Canceled throw new Operation Canceled Exception Get a copy of the current description and modify it I Project Description new Description create Description project project Name new Location monitor worked 50 project copy new Description I Resource SHALLOW I Resource FORCE monitor monitor worked 50 catch Core Exception e record Error e log error finally monitor done  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor beginTask COPY_PROGRESS_TITLE isCanceled OperationCanceledException IProjectDescription newDescription createDescription projectName newLocation newDescription IResource IResource CoreException recordError
Copies the project to the new values param project the project to copy param project Name the name of the copy param new Location I Path return code true code if the copy operation completed and code false code if it was abandoned part way boolean perform Copy final I Project project final String project Name final I Path new Location Workspace Modify Operation op new Workspace Modify Operation public void execute I Progress Monitor monitor monitor begin Task COPY PROGRESS TITLE 100 try if monitor is Canceled throw new Operation Canceled Exception Get a copy of the current description and modify it I Project Description new Description create Description project project Name new Location monitor worked 50 project copy new Description I Resource SHALLOW I Resource FORCE monitor monitor worked 50 catch Core Exception e record Error e log error finally monitor done try new Progress Monitor Jobs Dialog shell run true true op catch Interrupted Exception e return false catch Invocation Target Exception e display Error IDE Workbench Messages format Copy Project Action internal Error new Object e get Target Exception get Message NON NLS 1 return false return true  projectName newLocation IPath performCopy IProject projectName IPath newLocation WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor beginTask COPY_PROGRESS_TITLE isCanceled OperationCanceledException IProjectDescription newDescription createDescription projectName newLocation newDescription IResource IResource CoreException recordError ProgressMonitorJobsDialog InterruptedException InvocationTargetException displayError IDEWorkbenchMessages CopyProjectAction internalError getTargetException getMessage
Query for a new project name and destination using the parameters in the existing project return Object or null if the selection is cancelled param project the project we are going to copy protected Object query Destination Parameters I Project project Project Location Selection Dialog dialog new Project Location Selection Dialog shell project dialog set Title IDE Workbench Messages get String Copy Project Action copy Title NON NLS 1 dialog open return dialog get Result  queryDestinationParameters IProject ProjectLocationSelectionDialog ProjectLocationSelectionDialog setTitle IDEWorkbenchMessages getString CopyProjectAction copyTitle getResult
Records the core exception to be displayed to the user once the action is finished param error a code Core Exception code final void record Error Core Exception error this error Status error get Status  CoreException recordError CoreException errorStatus getStatus
Implementation of method defined on code I Action code public void run error Status null I Project project I Project get Selected Resources get 0 Get the project name and location in a two element list Object destination Paths query Destination Parameters project if destination Paths null return String new Name String destination Paths 0 I Path new Location new Path String destination Paths 1 boolean completed perform Copy project new Name new Location if completed ie canceled return not appropriate to show errors If errors occurred open an Error dialog if error Status null Error Dialog open Error this shell get Errors Title null error Status error Status null  IAction errorStatus IProject IProject getSelectedResources destinationPaths queryDestinationParameters destinationPaths newName destinationPaths IPath newLocation destinationPaths performCopy newName newLocation errorStatus ErrorDialog openError getErrorsTitle errorStatus errorStatus
The code Copy Resource Action code implementation of this code Selection Listener Action code method enables this action only if there is a single selection which is a project protected boolean update Selection I Structured Selection selection if super update Selection selection return false if get Selected Non Resources size 0 return false to enable this command there must be one project selected and nothing else List selected Resources get Selected Resources if selected Resources size 1 return false I Resource source I Resource selected Resources get 0 if source instanceof I Project I Project source is Open return true return false  CopyResourceAction SelectionListenerAction updateSelection IStructuredSelection updateSelection getSelectedNonResources selectedResources getSelectedResources selectedResources IResource IResource selectedResources IProject IProject isOpen

Create a new operation initialized with a shell param shell parent shell for error dialogs public Copy Project Operation Shell shell parent Shell shell  CopyProjectOperation parentShell
Paste a copy of the project on the clipboard to the workspace public void copy Project I Project project error Status null Get the project name and location in a two element list Project Location Selection Dialog dialog new Project Location Selection Dialog parent Shell project dialog set Title IDE Workbench Messages get String Copy Project Operation copy Project NON NLS 1 if dialog open Dialog OK return Object destination Paths dialog get Result if destination Paths null return String new Name String destination Paths 0 I Path new Location new Path String destination Paths 1 boolean completed perform Project Copy project new Name new Location if completed ie canceled return not appropriate to show errors If errors occurred open an Error dialog if error Status null Error Dialog open Error parent Shell IDE Workbench Messages get String Copy Project Operation copy Failed Title NON NLS 1 null error Status error Status null  copyProject IProject errorStatus ProjectLocationSelectionDialog ProjectLocationSelectionDialog parentShell setTitle IDEWorkbenchMessages getString CopyProjectOperation copyProject destinationPaths getResult destinationPaths newName destinationPaths IPath newLocation destinationPaths performProjectCopy newName newLocation errorStatus ErrorDialog openError parentShell IDEWorkbenchMessages getString CopyProjectOperation copyFailedTitle errorStatus errorStatus
Workspace Modify Operation op new Workspace Modify Operation public void execute I Progress Monitor monitor monitor begin Task IDE Workbench Messages get String Copy Project Operation progress Title 100 NON NLS 1 try if monitor is Canceled throw new Operation Canceled Exception Get a copy of the current description and modify it I Project Description new Description create Project Description project project Name new Location monitor worked 50 project copy new Description I Resource SHALLOW I Resource FORCE monitor monitor worked 50 catch Core Exception e record Error e log error finally monitor done  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor beginTask IDEWorkbenchMessages getString CopyProjectOperation progressTitle isCanceled OperationCanceledException IProjectDescription newDescription createProjectDescription projectName newLocation newDescription IResource IResource CoreException recordError
parent Shell get Display sync Exec new Runnable public void run Message Dialog open Error parent Shell IDE Workbench Messages get String Copy Project Operation copy Failed Title NON NLS 1 IDE Workbench Messages format Copy Project Operation internal Error NON NLS 1 new Object message  parentShell getDisplay syncExec MessageDialog openError parentShell IDEWorkbenchMessages getString CopyProjectOperation copyFailedTitle IDEWorkbenchMessages CopyProjectOperation internalError
Copies the project to the new values param project the project to copy param project Name the name of the copy param new Location I Path return code true code if the copy operation completed and code false code if it was abandoned part way private boolean perform Project Copy final I Project project final String project Name final I Path new Location Workspace Modify Operation op new Workspace Modify Operation public void execute I Progress Monitor monitor monitor begin Task IDE Workbench Messages get String Copy Project Operation progress Title 100 NON NLS 1 try if monitor is Canceled throw new Operation Canceled Exception Get a copy of the current description and modify it I Project Description new Description create Project Description project project Name new Location monitor worked 50 project copy new Description I Resource SHALLOW I Resource FORCE monitor monitor worked 50 catch Core Exception e record Error e log error finally monitor done try new Progress Monitor Jobs Dialog parent Shell run true true op catch Interrupted Exception e return false catch Invocation Target Exception e final String message e get Target Exception get Message parent Shell get Display sync Exec new Runnable public void run Message Dialog open Error parent Shell IDE Workbench Messages get String Copy Project Operation copy Failed Title NON NLS 1 IDE Workbench Messages format Copy Project Operation internal Error NON NLS 1 new Object message return false return true  projectName newLocation IPath performProjectCopy IProject projectName IPath newLocation WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor beginTask IDEWorkbenchMessages getString CopyProjectOperation progressTitle isCanceled OperationCanceledException IProjectDescription newDescription createProjectDescription projectName newLocation newDescription IResource IResource CoreException recordError ProgressMonitorJobsDialog parentShell InterruptedException InvocationTargetException getTargetException getMessage parentShell getDisplay syncExec MessageDialog openError parentShell IDEWorkbenchMessages getString CopyProjectOperation copyFailedTitle IDEWorkbenchMessages CopyProjectOperation internalError
Create a new I Project Description for the copy using the auto generated name and path return I Project Description param project the source project param project Name the name for the new project param root Location the path the new project will be stored under private I Project Description create Project Description I Project project String project Name I Path root Location throws Core Exception Get a copy of the current description and modify it I Project Description new Description project get Description new Description set Name project Name If the location is the default then set the location to null if root Location equals Platform get Location new Description set Location null else new Description set Location root Location return new Description  IProjectDescription IProjectDescription projectName rootLocation IProjectDescription createProjectDescription IProject projectName IPath rootLocation CoreException IProjectDescription newDescription getDescription newDescription setName projectName rootLocation getLocation newDescription setLocation newDescription setLocation rootLocation newDescription
Records the core exception to be displayed to the user once the action is finished param exception a code Core Exception code private void record Error Core Exception error if error Status null error Status new Multi Status PlatformUI PLUGIN ID I Status ERROR IDE Workbench Messages get String Copy Project Operation copy Failed Message NON NLS 1 error error Status merge error get Status  CoreException recordError CoreException errorStatus errorStatus MultiStatus PLUGIN_ID IStatus IDEWorkbenchMessages getString CopyProjectOperation copyFailedMessage errorStatus getStatus

Returns a new name for a copy of the resource at the given path in the given workspace This name could be determined either automatically or by querying the user This name will b not b be verified by the caller so it must be valid and unique p Note this method is for internal use only p param original Name the full path of the resource param workspace the workspace return the new full path for the copy or code null code if the resource should not be copied public static I Path get New Name For I Path original Name I Workspace workspace return Copy Files And Folders Operation get Auto New Name For original Name workspace  originalName IPath getNewNameFor IPath originalName IWorkspace CopyFilesAndFoldersOperation getAutoNewNameFor originalName
Creates a new action param shell the shell for any dialogs public Copy Resource Action Shell shell this shell IDE Workbench Messages get String Copy Resource Action title NON NLS 1 Workbench Help set Help this I Help Context Ids COPY RESOURCE ACTION  CopyResourceAction IDEWorkbenchMessages getString CopyResourceAction WorkbenchHelp setHelp IHelpContextIds COPY_RESOURCE_ACTION
Creates a new action with the given text param shell the shell for any dialogs param name the string used as the name for the action or code null code if there is no name Copy Resource Action Shell shell String name super name set Tool Tip Text IDE Workbench Messages get String Copy Resource Action tool Tip NON NLS 1 set Id Copy Resource Action ID if shell null throw new Illegal Argument Exception this shell shell  CopyResourceAction setToolTipText IDEWorkbenchMessages getString CopyResourceAction toolTip setId CopyResourceAction IllegalArgumentException
Returns the operation to perform when this action runs return the operation to perform when this action runs protected Copy Files And Folders Operation create Operation return new Copy Files And Folders Operation get Shell  CopyFilesAndFoldersOperation createOperation CopyFilesAndFoldersOperation getShell
Returns the path of the container to initially select in the container selection dialog or code null code if there is no initial selection return The initial container code null code if none I Container get Initial Container List resources get Selected Resources if resources size 0 I Resource resource I Resource resources get 0 return resource get Parent return null  IContainer getInitialContainer getSelectedResources IResource IResource getParent
Returns an array of resources to use for the operation from the provided list param resource List The list of resources to converted into an array return an array of resources to use for the operation protected I Resource get Resources List resource List return I Resource resource List to Array new I Resource resource List size  resourceList IResource getResources resourceList IResource resourceList toArray IResource resourceList
Returns the shell in which to show any dialogs return The shell for parenting dialogs never code null code Shell get Shell return shell  getShell
The code Copy Resource Action code implementation of this code I Selection Validator code method checks whether the given path is a good place to copy the selected resources public String is Valid Object destination I Workspace Root root IDE Workbench Plugin get Plugin Workspace get Root I Container container I Container root find Member I Path destination if container null create a new operation here is Valid is API and may be called in any context Copy Files And Folders Operation new Operation create Operation List sources get Selected Resources I Resource resources I Resource sources to Array new I Resource sources size return new Operation validate Destination container resources return null  CopyResourceAction ISelectionValidator isValid IWorkspaceRoot IDEWorkbenchPlugin getPluginWorkspace getRoot IContainer IContainer findMember IPath isValid CopyFilesAndFoldersOperation newOperation createOperation getSelectedResources IResource IResource toArray IResource newOperation validateDestination
Asks the user for the destination of this action return the path on an existing or new resource container or code null code if the operation should be abandoned I Path query Destination Resource start traversal at root resource should probably start at a better location in the tree Container Selection Dialog dialog new Container Selection Dialog shell get Initial Container true IDE Workbench Messages get String Copy Resource Action select Destination NON NLS 1 dialog set Validator this dialog show Closed Projects false dialog open Object result dialog get Result if result null result length 1 return I Path result 0 return null  IPath queryDestinationResource ContainerSelectionDialog ContainerSelectionDialog getInitialContainer IDEWorkbenchMessages getString CopyResourceAction selectDestination setValidator showClosedProjects getResult IPath
public void run try operation create Operation WARNING do not query the selected resources more than once since the selection may change during the run e g due to window activation when the prompt dialog is dismissed For more details see Bug 60606 Navigator data loss Navigator deletes moves the wrong file List sources get Selected Resources I Path destination query Destination Resource if destination null return I Workspace Root root IDE Workbench Plugin get Plugin Workspace get Root I Container container I Container root find Member destination if container null return run Operation get Resources sources container finally operation null  createOperation getSelectedResources IPath queryDestinationResource IWorkspaceRoot IDEWorkbenchPlugin getPluginWorkspace getRoot IContainer IContainer findMember runOperation getResources
Runs the operation created in code create Operaiton code param resources source resources to pass to the operation param destination destination container to pass to the operation protected void run Operation I Resource resources I Container destination operation copy Resources resources destination  createOperaiton runOperation IResource IContainer copyResources
The code Copy Resource Action code implementation of this code Selection Listener Action code method enables this action only if all of the one or more selections are sibling resources which are local depth infinity protected boolean update Selection I Structured Selection selection if super update Selection selection return false if get Selected Non Resources size 0 return false to enable this command all selected resources must be siblings List selected Resources get Selected Resources if selected Resources size 0 return false I Container first Parent I Resource selected Resources get 0 get Parent if first Parent null return false Iterator resources Enum selected Resources iterator while resources Enum has Next I Resource current Resource I Resource resources Enum next if current Resource exists return false if current Resource get Type I Resource PROJECT return false I Container parent current Resource get Parent if parent null parent equals first Parent return false return true  CopyResourceAction SelectionListenerAction updateSelection IStructuredSelection updateSelection getSelectedNonResources selectedResources getSelectedResources selectedResources IContainer firstParent IResource selectedResources getParent firstParent resourcesEnum selectedResources resourcesEnum hasNext IResource currentResource IResource resourcesEnum currentResource currentResource getType IResource IContainer currentResource getParent firstParent

private Shell shell Creates a new action for creating a file resource param shell the shell for any dialogs deprecated see deprecated tag on class public Create File Action Shell shell super IDE Workbench Messages get String Create File Action text NON NLS 1 if shell null throw new Illegal Argument Exception this shell shell set Tool Tip Text IDE Workbench Messages get String Create File Action tool Tip NON NLS 1 set Image Descriptor PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG OBJ FILE set Id ID Workbench Help set Help this I Help Context Ids CREATE FILE ACTION  CreateFileAction IDEWorkbenchMessages getString CreateFileAction IllegalArgumentException setToolTipText IDEWorkbenchMessages getString CreateFileAction toolTip setImageDescriptor getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_OBJ_FILE setId WorkbenchHelp setHelp IHelpContextIds CREATE_FILE_ACTION
The code Create File Action code implementation of this code I Action code method opens a code Basic New File Resource Wizard code in a wizard dialog under the shell passed to the constructor public void run Basic New File Resource Wizard wizard new Basic New File Resource Wizard wizard init PlatformUI get Workbench get Structured Selection wizard set Needs Progress Monitor true Wizard Dialog dialog new Wizard Dialog shell wizard dialog create dialog get Shell set Text IDE Workbench Messages get String Create File Action title NON NLS 1 Workbench Help set Help dialog get Shell I Help Context Ids NEW FILE WIZARD dialog open  CreateFileAction IAction BasicNewFileResourceWizard BasicNewFileResourceWizard BasicNewFileResourceWizard getWorkbench getStructuredSelection setNeedsProgressMonitor WizardDialog WizardDialog getShell setText IDEWorkbenchMessages getString CreateFileAction WorkbenchHelp setHelp getShell IHelpContextIds NEW_FILE_WIZARD
The code Create File Action code implementation of this code Selection Listener Action code method enables the action only if the selection contains folders and open projects protected boolean update Selection I Structured Selection s if super update Selection s return false Iterator resources get Selected Resources iterator while resources has Next I Resource resource I Resource resources next if resource Is Type resource I Resource PROJECT I Resource FOLDER resource is Accessible return false return true  CreateFileAction SelectionListenerAction updateSelection IStructuredSelection updateSelection getSelectedResources hasNext IResource IResource resourceIsType IResource IResource isAccessible

private Shell shell Creates a new action for creating a folder resource param shell the shell for any dialogs deprecated see deprecated tag on class public Create Folder Action Shell shell super IDE Workbench Messages get String Create Folder Action text NON NLS 1 if shell null throw new Illegal Argument Exception this shell shell set Image Descriptor PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG OBJ FOLDER set Tool Tip Text IDE Workbench Messages get String Create Folder Action tool Tip NON NLS 1 set Id ID Workbench Help set Help this I Help Context Ids CREATE FOLDER ACTION  CreateFolderAction IDEWorkbenchMessages getString CreateFolderAction IllegalArgumentException setImageDescriptor getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_OBJ_FOLDER setToolTipText IDEWorkbenchMessages getString CreateFolderAction toolTip setId WorkbenchHelp setHelp IHelpContextIds CREATE_FOLDER_ACTION
The code Create Folder Action code implementation of this code I Action code method opens a code Basic New Folder Resource Wizard code in a wizard dialog under the shell passed to the constructor public void run Basic New Folder Resource Wizard wizard new Basic New Folder Resource Wizard wizard init PlatformUI get Workbench get Structured Selection wizard set Needs Progress Monitor true Wizard Dialog dialog new Wizard Dialog shell wizard dialog create dialog get Shell set Text IDE Workbench Messages get String Create Folder Action title NON NLS 1 Workbench Help set Help dialog get Shell I Help Context Ids NEW FOLDER WIZARD dialog open  CreateFolderAction IAction BasicNewFolderResourceWizard BasicNewFolderResourceWizard BasicNewFolderResourceWizard getWorkbench getStructuredSelection setNeedsProgressMonitor WizardDialog WizardDialog getShell setText IDEWorkbenchMessages getString CreateFolderAction WorkbenchHelp setHelp getShell IHelpContextIds NEW_FOLDER_WIZARD
The code Create Folder Action code implementation of this code Selection Listener Action code method enables the action only if the selection contains folders and open projects protected boolean update Selection I Structured Selection s if super update Selection s return false Iterator resources get Selected Resources iterator while resources has Next I Resource resource I Resource resources next if resource Is Type resource I Resource PROJECT I Resource FOLDER resource is Accessible return false return true  CreateFolderAction SelectionListenerAction updateSelection IStructuredSelection updateSelection getSelectedResources hasNext IResource IResource resourceIsType IResource IResource isAccessible

Creates a new action for launching the new project selection wizard param window the workbench window to query the current selection and shell for opening the wizard public Create Project Action I Workbench Window window super IDE Workbench Messages get String Create Project Action text NON NLS 1 if window null throw new Illegal Argument Exception this window window I Shared Images images PlatformUI get Workbench get Shared Images set Image Descriptor images get Image Descriptor I Shared Images IMG TOOL NEW WIZARD set Disabled Image Descriptor images get Image Descriptor I Shared Images IMG TOOL NEW WIZARD DISABLED set Tool Tip Text IDE Workbench Messages get String Create Project Action tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids NEW ACTION  CreateProjectAction IWorkbenchWindow IDEWorkbenchMessages getString CreateProjectAction IllegalArgumentException ISharedImages getWorkbench getSharedImages setImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_NEW_WIZARD setDisabledImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_NEW_WIZARD_DISABLED setToolTipText IDEWorkbenchMessages getString CreateProjectAction toolTip WorkbenchHelp setHelp IHelpContextIds NEW_ACTION
Returns the selection to initialized the wizard with protected I Structured Selection get Initial Selection I Selection selection window get Selection Service get Selection I Structured Selection selection To Pass Structured Selection EMPTY if selection instanceof I Structured Selection selection To Pass I Structured Selection selection return selection To Pass  IStructuredSelection getInitialSelection ISelection getSelectionService getSelection IStructuredSelection selectionToPass StructuredSelection IStructuredSelection selectionToPass IStructuredSelection selectionToPass
Sets the initial categories to be selected Ignores any I Ds which do not represent valid categories param ids initial category ids to select public void set Initial Selected Categories String ids if ids null ids length 0 initial Selected Categories null else Capability Registry reg IDE Workbench Plugin get Default get Capability Registry Array List results new Array List ids length for int i 0 i ids length i Category cat reg find Category ids i if cat null results add cat if results is Empty initial Selected Categories null else initial Selected Categories new Category results size results to Array initial Selected Categories  IDs setInitialSelectedCategories initialSelectedCategories CapabilityRegistry IDEWorkbenchPlugin getDefault getCapabilityRegistry ArrayList ArrayList findCategory isEmpty initialSelectedCategories initialSelectedCategories toArray initialSelectedCategories
Sets the initial project capabilities to be selected Ignores any I Ds which do not represent valid capabilities param ids initial project capability ids to select public void set Initial Project Capabilities String ids if ids null ids length 0 initial Project Capabilities null else Capability Registry reg IDE Workbench Plugin get Default get Capability Registry Array List results new Array List ids length for int i 0 i ids length i Capability cap reg find Capability ids i if cap null cap is Valid results add cap if results is Empty initial Project Capabilities null else initial Project Capabilities new Capability results size results to Array initial Project Capabilities  IDs setInitialProjectCapabilities initialProjectCapabilities CapabilityRegistry IDEWorkbenchPlugin getDefault getCapabilityRegistry ArrayList ArrayList findCapability isValid isEmpty initialProjectCapabilities initialProjectCapabilities toArray initialProjectCapabilities
Sets the initial project name Leading and trailing spaces in the name are ignored param name initial project name public void set Initial Project Name String name if name null initial Project Name null else initial Project Name name trim  setInitialProjectName initialProjectName initialProjectName
public void run Create a new project wizard New Project Wizard wizard new New Project Wizard wizard init window get Workbench get Initial Selection wizard set Initial Project Name initial Project Name wizard set Initial Project Capabilities initial Project Capabilities wizard set Initial Selected Categories initial Selected Categories Create a wizard dialog Wizard Dialog dialog new Multi Step Wizard Dialog window get Shell wizard dialog create dialog get Shell set Size Math max SIZING WIZARD WIDTH dialog get Shell get Size x SIZING WIZARD HEIGHT Workbench Help set Help dialog get Shell I Help Context Ids NEW PROJECT WIZARD Open the wizard dialog open  NewProjectWizard NewProjectWizard getWorkbench getInitialSelection setInitialProjectName initialProjectName setInitialProjectCapabilities initialProjectCapabilities setInitialSelectedCategories initialSelectedCategories WizardDialog MultiStepWizardDialog getShell getShell setSize SIZING_WIZARD_WIDTH getShell getSize SIZING_WIZARD_HEIGHT WorkbenchHelp setHelp getShell IHelpContextIds NEW_PROJECT_WIZARD

Delete Project Dialog Shell parent Shell I Resource projects super parent Shell get Title projects null accept the default window icon get Message projects Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL 0 yes is the default this projects projects  DeleteProjectDialog parentShell IResource parentShell getTitle getMessage MessageDialog IDialogConstants YES_LABEL IDialogConstants NO_LABEL
static String get Title I Resource projects if projects length 1 return IDE Workbench Messages get String Delete Resource Action title Project1 NON NLS 1 else return IDE Workbench Messages get String Delete Resource Action title ProjectN NON NLS 1  getTitle IResource IDEWorkbenchMessages getString DeleteResourceAction titleProject1 IDEWorkbenchMessages getString DeleteResourceAction titleProjectN
static String get Message I Resource projects if projects length 1 I Project project I Project projects 0 return IDE Workbench Messages format Delete Resource Action confirm Project1 new Object project get Name NON NLS 1 else return IDE Workbench Messages format Delete Resource Action confirm ProjectN new Object new Integer projects length NON NLS 1  getMessage IResource IProject IProject IDEWorkbenchMessages DeleteResourceAction confirmProject1 getName IDEWorkbenchMessages DeleteResourceAction confirmProjectN
Method declared on Window protected void configure Shell Shell new Shell super configure Shell new Shell Workbench Help set Help new Shell I Help Context Ids DELETE PROJECT DIALOG  configureShell newShell configureShell newShell WorkbenchHelp setHelp newShell IHelpContextIds DELETE_PROJECT_DIALOG
protected Control create Custom Area Composite parent Composite composite new Composite parent SWT NONE composite set Layout new Grid Layout radio1 new Button composite SWT RADIO radio1 add Selection Listener selection Listener String text1 if projects length 1 I Project project I Project projects 0 if project null project get Location null text1 IDE Workbench Messages get String Delete Resource Action delete ContentsN NON NLS 1 else text1 IDE Workbench Messages format Delete Resource Action delete Contents1 new Object project get Location toOS String NON NLS 1 else text1 IDE Workbench Messages get String Delete Resource Action delete ContentsN NON NLS 1 radio1 set Text text1 radio1 set Font parent get Font radio2 new Button composite SWT RADIO radio2 add Selection Listener selection Listener String text2 IDE Workbench Messages get String Delete Resource Action do Not Delete Contents NON NLS 1 radio2 set Text text2 radio2 set Font parent get Font set initial state radio1 set Selection delete Content radio2 set Selection delete Content return composite  createCustomArea setLayout GridLayout addSelectionListener selectionListener IProject IProject getLocation IDEWorkbenchMessages getString DeleteResourceAction deleteContentsN IDEWorkbenchMessages DeleteResourceAction deleteContents1 getLocation toOSString IDEWorkbenchMessages getString DeleteResourceAction deleteContentsN setText setFont getFont addSelectionListener selectionListener IDEWorkbenchMessages getString DeleteResourceAction doNotDeleteContents setText setFont getFont setSelection deleteContent setSelection deleteContent
private Selection Listener selection Listener new Selection Adapter public void widget Selected Selection Event e Button button Button e widget if button get Selection delete Content button radio1  SelectionListener selectionListener SelectionAdapter widgetSelected SelectionEvent getSelection deleteContent
public boolean get Delete Content return delete Content  getDeleteContent deleteContent
private boolean force Out Of Sync Delete false Creates a new delete resource action param shell the shell for any dialogs public Delete Resource Action Shell shell super IDE Workbench Messages get String Delete Resource Action text NON NLS 1 set Tool Tip Text IDE Workbench Messages get String Delete Resource Action tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids DELETE RESOURCE ACTION set Id ID if shell null throw new Illegal Argument Exception this shell shell  forceOutOfSyncDelete DeleteResourceAction IDEWorkbenchMessages getString DeleteResourceAction setToolTipText IDEWorkbenchMessages getString DeleteResourceAction toolTip WorkbenchHelp setHelp IHelpContextIds DELETE_RESOURCE_ACTION setId IllegalArgumentException
Returns whether delete can be performed on the current selection param resources the selected resources return code true code if the resources can be deleted and code false code if the selection contains non resources or phantom resources private boolean can Delete I Resource resources allow only projects or only non projects to be selected note that the selection may contain multiple types of resource if contains Only Projects resources contains Only Non Projects resources return false if resources length 0 return false Return true if everything in the selection exists for int i 0 i resources length i I Resource resource resources i if resource is Phantom return false return true  canDelete IResource containsOnlyProjects containsOnlyNonProjects IResource isPhantom
Returns whether the selection contains linked resources param resources the selected resources return code true code if the resources contain linked resources and code false code otherwise private boolean contains Linked Resource I Resource resources for int i 0 i resources length i I Resource resource resources i if resource is Linked return true return false  containsLinkedResource IResource IResource isLinked
Returns whether the selection contains only non projects param resources the selected resources return code true code if the resources contains only non projects and code false code otherwise private boolean contains Only Non Projects I Resource resources int types get Selected Resource Types resources check for empty selection if types 0 return false note that the selection may contain multiple types of resource return types I Resource PROJECT 0  containsOnlyNonProjects IResource getSelectedResourceTypes IResource
Returns whether the selection contains only projects param resources the selected resources return code true code if the resources contains only projects and code false code otherwise private boolean contains Only Projects I Resource resources int types get Selected Resource Types resources note that the selection may contain multiple types of resource return types I Resource PROJECT  containsOnlyProjects IResource getSelectedResourceTypes IResource
Asks the user to confirm a delete operation param resources the selected resources return code true code if the user says to go ahead and code false code if the deletion should be abandoned private boolean confirm Delete I Resource resources if contains Only Projects resources return confirm Delete Projects resources else return confirm Delete Non Projects resources  confirmDelete IResource containsOnlyProjects confirmDeleteProjects confirmDeleteNonProjects
Asks the user to confirm a delete operation where the selection contains no projects param resources the selected resources return code true code if the user says to go ahead and code false code if the deletion should be abandoned private boolean confirm Delete Non Projects I Resource resources String title String msg if resources length 1 title IDE Workbench Messages get String Delete Resource Action title1 NON NLS 1 I Resource resource resources 0 if resource is Linked msg IDE Workbench Messages format Delete Resource Action confirm Linked Resource1 new Object resource get Name NON NLS 1 else msg IDE Workbench Messages format Delete Resource Action confirm1 new Object resource get Name NON NLS 1 else title IDE Workbench Messages get String Delete Resource Action titleN NON NLS 1 if contains Linked Resource resources msg IDE Workbench Messages format Delete Resource Action confirm Linked ResourceN new Object new Integer resources length NON NLS 1 else msg IDE Workbench Messages format Delete Resource Action confirmN new Object new Integer resources length NON NLS 1 return Message Dialog open Question shell title msg  confirmDeleteNonProjects IResource IDEWorkbenchMessages getString DeleteResourceAction IResource isLinked IDEWorkbenchMessages DeleteResourceAction confirmLinkedResource1 getName IDEWorkbenchMessages DeleteResourceAction getName IDEWorkbenchMessages getString DeleteResourceAction containsLinkedResource IDEWorkbenchMessages DeleteResourceAction confirmLinkedResourceN IDEWorkbenchMessages DeleteResourceAction MessageDialog openQuestion
Asks the user to confirm a delete operation where the selection contains only projects Also remembers whether project content should be deleted param resources the selected resources return code true code if the user says to go ahead and code false code if the deletion should be abandoned private boolean confirm Delete Projects I Resource resources Delete Project Dialog dialog new Delete Project Dialog shell resources int code dialog open delete Content dialog get Delete Content return code 0 YES  confirmDeleteProjects IResource DeleteProjectDialog DeleteProjectDialog deleteContent getDeleteContent
Deletes the given resources private void delete I Resource resources To Delete I Progress Monitor monitor throws Core Exception final List exceptions new Array List force Out Of Sync Delete false monitor begin Task resources To Delete length NON NLS 1 for int i 0 i resources To Delete length i if monitor is Canceled throw new Operation Canceled Exception try delete resources To Delete i new Sub Progress Monitor monitor 1 Sub Progress Monitor PREPEND MAIN LABEL TO SUBTASK catch Core Exception e exceptions add e Check to see if any problems occurred during processing final int exception Count exceptions size if exception Count 1 throw Core Exception exceptions get 0 else if exception Count 1 final Multi Status multi new Multi Status IDE Workbench Plugin IDE WORKBENCH 0 IDE Workbench Messages get String Delete Resource Action deletion Exception Message new Exception NON NLS 1 for int i 0 i exception Count i Core Exception exception Core Exception exceptions get 0 I Status status exception get Status multi add new Status status get Severity status get Plugin status get Code status get Message exception throw new Core Exception multi Signal that the job has completed successfully monitor done  IResource resourcesToDelete IProgressMonitor CoreException ArrayList forceOutOfSyncDelete beginTask resourcesToDelete resourcesToDelete isCanceled OperationCanceledException resourcesToDelete SubProgressMonitor SubProgressMonitor PREPEND_MAIN_LABEL_TO_SUBTASK CoreException exceptionCount exceptionCount CoreException exceptionCount MultiStatus MultiStatus IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchMessages getString DeleteResourceAction deletionExceptionMessage exceptionCount CoreException CoreException IStatus getStatus getSeverity getPlugin getCode getMessage CoreException
Deletes the given resource private void delete I Resource resource To Delete I Progress Monitor monitor throws Core Exception boolean force false don t force deletion of out of sync resources try if resource To Delete get Type I Resource PROJECT if it s a project ask whether content should be deleted too I Project project I Project resource To Delete project delete delete Content force monitor else if it s not a project just delete it resource To Delete delete I Resource KEEP HISTORY monitor catch Core Exception exception if resource To Delete get Type I Resource FILE I Status children exception get Status get Children if children length 1 children 0 get Code I Resource Status OUT OF SYNC LOCAL if force Out Of Sync Delete resource To Delete delete I Resource KEEP HISTORY I Resource FORCE monitor else int result query Delete Out Of Sync resource To Delete if result I Dialog Constants YES ID resource To Delete delete I Resource KEEP HISTORY I Resource FORCE monitor else if result I Dialog Constants YES TO ALL ID force Out Of Sync Delete true resource To Delete delete I Resource KEEP HISTORY I Resource FORCE monitor else if result I Dialog Constants CANCEL ID throw new Operation Canceled Exception else throw exception else throw exception  IResource resourceToDelete IProgressMonitor CoreException resourceToDelete getType IResource IProject IProject resourceToDelete deleteContent resourceToDelete IResource KEEP_HISTORY CoreException resourceToDelete getType IResource IStatus getStatus getChildren getCode IResourceStatus OUT_OF_SYNC_LOCAL forceOutOfSyncDelete resourceToDelete IResource KEEP_HISTORY IResource queryDeleteOutOfSync resourceToDelete IDialogConstants YES_ID resourceToDelete IResource KEEP_HISTORY IResource IDialogConstants YES_TO_ALL_ID forceOutOfSyncDelete resourceToDelete IResource KEEP_HISTORY IResource IDialogConstants CANCEL_ID OperationCanceledException
Return an array of the currently selected resources return the selected resources private I Resource get Selected Resources Array List selection get Selected Resources I Resource resources new I Resource selection size selection to Array resources return resources  IResource getSelectedResourcesArray getSelectedResources IResource IResource toArray
Returns a bit mask containing the types of resources in the selection param resources the selected resources private int get Selected Resource Types I Resource resources int types 0 for int i 0 i resources length i types resources i get Type return types  getSelectedResourceTypes IResource getType
try Workspace Modify Operation op new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception delete resources To Delete monitor  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException resourcesToDelete
public void run I Resource resources get Selected Resources Array WARNING do not query the selected resources more than once since the selection may change during the run e g due to window activation when the prompt dialog is dismissed For more details see Bug 60606 Navigator data loss Navigator deletes moves the wrong file if confirm Delete resources return final I Resource resources To Delete get Resources To Delete resources if resources To Delete length 0 return try Workspace Modify Operation op new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception delete resources To Delete monitor new Progress Monitor Jobs Dialog shell run true true op catch Invocation Target Exception e Throwable t e get Target Exception if t instanceof Core Exception Core Exception exception Core Exception t I Status status exception get Status I Status children status get Children boolean out Of Sync Error false for int i 0 i children length i if children i get Code I Resource Status OUT OF SYNC LOCAL out Of Sync Error true break IDE Workbench Plugin log Message Format format Exception in 0 run 1 new Object get Class get Name t status NON NLS 1 if out Of Sync Error Error Dialog open Error shell IDE Workbench Messages get String Delete Resource Action error Title NON NLS 1 IDE Workbench Messages get String Delete Resource Action out Of Sync Error NON NLS 1 status else Error Dialog open Error shell IDE Workbench Messages get String Delete Resource Action error Title no special message NON NLS 1 null status else Core Exceptions are collected above but unexpected runtime exceptions and errors may still occur IDE Workbench Plugin log Message Format format Exception in 0 run 1 new Object get Class get Name t NON NLS 1 Message Dialog open Error shell IDE Workbench Messages get String Delete Resource Action message Title NON NLS 1 IDE Workbench Messages format Delete Resource Action internal Error new Object t get Message NON NLS 1 catch Interrupted Exception e just return  IResource getSelectedResourcesArray confirmDelete IResource resourcesToDelete getResourcesToDelete resourcesToDelete WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException resourcesToDelete ProgressMonitorJobsDialog InvocationTargetException getTargetException CoreException CoreException CoreException IStatus getStatus IStatus getChildren outOfSyncError getCode IResourceStatus OUT_OF_SYNC_LOCAL outOfSyncError IDEWorkbenchPlugin MessageFormat getClass getName outOfSyncError ErrorDialog openError IDEWorkbenchMessages getString DeleteResourceAction errorTitle IDEWorkbenchMessages getString DeleteResourceAction outOfSyncError ErrorDialog openError IDEWorkbenchMessages getString DeleteResourceAction errorTitle CoreExceptions IDEWorkbenchPlugin MessageFormat getClass getName MessageDialog openError IDEWorkbenchMessages getString DeleteResourceAction messageTitle IDEWorkbenchMessages DeleteResourceAction internalError getMessage InterruptedException
Returns the resources to delete based on the selection and their read only status param resources the selected resources return the resources to delete private I Resource get Resources To Delete I Resource resources if contains Only Projects resources delete Content We can just return the selection return resources Read Only State Checker checker new Read Only State Checker this shell IDE Workbench Messages get String Delete Resource Action title1 NON NLS 1 IDE Workbench Messages get String Delete Resource Action read Only Question NON NLS 1 return checker check Read Only Resources resources  IResource getResourcesToDelete IResource containsOnlyProjects deleteContent ReadOnlyStateChecker ReadOnlyStateChecker IDEWorkbenchMessages getString DeleteResourceAction IDEWorkbenchMessages getString DeleteResourceAction readOnlyQuestion checkReadOnlyResources
The code Delete Resource Action code implementation of this code Selection Listener Action code method disables the action if the selection contains phantom resources or non resources protected boolean update Selection I Structured Selection selection return super update Selection selection can Delete get Selected Resources Array  DeleteResourceAction SelectionListenerAction updateSelection IStructuredSelection updateSelection canDelete getSelectedResourcesArray
0 shell get Display sync Exec new Runnable public void run dialog open  getDisplay syncExec
Ask the user whether the given resource should be deleted despite being out of sync with the file system param resource the out of sync resource return One of the I Dialog Constants constants indicating which of the Yes Yes to All No Cancel options has been selected by the user private int query Delete Out Of Sync I Resource resource final Message Dialog dialog new Message Dialog shell IDE Workbench Messages get String Delete Resource Action message Title NON NLS 1 null IDE Workbench Messages format Delete Resource Action out Of Sync Question new Object resource get Name NON NLS 1 Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants YES TO ALL LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL 0 shell get Display sync Exec new Runnable public void run dialog open int result dialog get Return Code if result 0 return I Dialog Constants YES ID if result 1 return I Dialog Constants YES TO ALL ID if result 2 return I Dialog Constants NO ID return I Dialog Constants CANCEL ID  IDialogConstants queryDeleteOutOfSync IResource MessageDialog MessageDialog IDEWorkbenchMessages getString DeleteResourceAction messageTitle IDEWorkbenchMessages DeleteResourceAction outOfSyncQuestion getName MessageDialog IDialogConstants YES_LABEL IDialogConstants YES_TO_ALL_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL getDisplay syncExec getReturnCode IDialogConstants YES_ID IDialogConstants YES_TO_ALL_ID IDialogConstants NO_ID IDialogConstants CANCEL_ID

private final I Selection Listener selection Listener new I Selection Listener public void selection Changed I Workbench Part part I Selection selection if selection instanceof I Structured Selection I Structured Selection structured I Structured Selection selection Export Resources Action this selection Changed structured  ISelectionListener selectionListener ISelectionListener selectionChanged IWorkbenchPart ISelection IStructuredSelection IStructuredSelection IStructuredSelection ExportResourcesAction selectionChanged
Create a new instance of this class public Export Resources Action I Workbench Window window this window Workbench Messages get String Export Resources Action text NON NLS 1  ExportResourcesAction IWorkbenchWindow WorkbenchMessages getString ExportResourcesAction
Create a new instance of this class public Export Resources Action I Workbench Window window String label super label NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window set Action Definition Id org eclipse ui file export NON NLS 1 set Tool Tip Text Workbench Messages get String Export Resources Action tool Tip NON NLS 1 set Id export NON NLS 1 Workbench Help set Help this I Help Context Ids EXPORT ACTION self register selection listener new for 3 0 workbench Window get Selection Service add Selection Listener selection Listener set Text Workbench Messages get String Export Resources Action file Menu Text NON NLS 1 set Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL EXPORT WIZ set Disabled Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL EXPORT WIZ DISABLED  ExportResourcesAction IWorkbenchWindow IllegalArgumentException workbenchWindow setActionDefinitionId setToolTipText WorkbenchMessages getString ExportResourcesAction toolTip setId WorkbenchHelp setHelp IHelpContextIds EXPORT_ACTION workbenchWindow getSelectionService addSelectionListener selectionListener setText WorkbenchMessages getString ExportResourcesAction fileMenuText setImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_EXPORT_WIZ setDisabledImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_EXPORT_WIZ_DISABLED
Create a new instance of this class deprecated use the constructor code Export Resources Action I Workbench Window code public Export Resources Action I Workbench workbench this workbench get Active Workbench Window  ExportResourcesAction IWorkbenchWindow ExportResourcesAction IWorkbench getActiveWorkbenchWindow
Create a new instance of this class deprecated use the constructor code Export Resources Action I Workbench Window String code public Export Resources Action I Workbench workbench String label this workbench get Active Workbench Window label  ExportResourcesAction IWorkbenchWindow ExportResourcesAction IWorkbench getActiveWorkbenchWindow
Invoke the Export wizards selection Wizard public void run if workbench Window null action has been disposed return Export Wizard wizard new Export Wizard I Structured Selection selection To Pass get the current workbench selection I Selection workbench Selection workbench Window get Selection Service get Selection if workbench Selection instanceof I Structured Selection selection To Pass I Structured Selection workbench Selection else selection To Pass Structured Selection EMPTY wizard init workbench Window get Workbench selection To Pass I Dialog Settings workbench Settings Workbench Plugin get Default get Dialog Settings I Dialog Settings wizard Settings workbench Settings get Section Export Resources Action NON NLS 1 if wizard Settings null wizard Settings workbench Settings add New Section Export Resources Action NON NLS 1 wizard set Dialog Settings wizard Settings wizard set Force Previous And Next Buttons true Shell parent workbench Window get Shell Wizard Dialog dialog new Wizard Dialog parent wizard dialog create dialog get Shell set Size Math max SIZING WIZARD WIDTH dialog get Shell get Size x SIZING WIZARD HEIGHT Workbench Help set Help dialog get Shell I Help Context Ids EXPORT WIZARD dialog open  workbenchWindow ExportWizard ExportWizard IStructuredSelection selectionToPass ISelection workbenchSelection workbenchWindow getSelectionService getSelection workbenchSelection IStructuredSelection selectionToPass IStructuredSelection workbenchSelection selectionToPass StructuredSelection workbenchWindow getWorkbench selectionToPass IDialogSettings workbenchSettings WorkbenchPlugin getDefault getDialogSettings IDialogSettings wizardSettings workbenchSettings getSection ExportResourcesAction wizardSettings wizardSettings workbenchSettings addNewSection ExportResourcesAction setDialogSettings wizardSettings setForcePreviousAndNextButtons workbenchWindow getShell WizardDialog WizardDialog getShell setSize SIZING_WIZARD_WIDTH getShell getSize SIZING_WIZARD_HEIGHT WorkbenchHelp setHelp getShell IHelpContextIds EXPORT_WIZARD
Sets the current selection In for backwards compatability Use selection Changed instead param selection the new selection deprecated public void set Selection I Structured Selection selection selection Changed selection  selectionChanged setSelection IStructuredSelection selectionChanged
public void dispose if workbench Window null action has already been disposed return workbench Window get Selection Service remove Selection Listener selection Listener workbench Window null  workbenchWindow workbenchWindow getSelectionService removeSelectionListener selectionListener workbenchWindow

private I Workbench Window workbench Window Creates a new action of the appropriate type The action id is code I Workbench Action Constants BUILD code for incremental builds and code I Workbench Action Constants REBUILD ALL code for full builds param workbench the active workbench param shell the shell for any dialogs param type the type of build one of code Incremental Project Builder INCREMENTAL BUILD code or code Incremental Project Builder FULL BUILD code deprecated use Global Build Action I Workbench Window type instead public Global Build Action I Workbench workbench Shell shell int type always use active window ignore shell this workbench get Active Workbench Window type if shell null throw new Illegal Argument Exception  IWorkbenchWindow workbenchWindow IWorkbenchActionConstants IWorkbenchActionConstants REBUILD_ALL IncrementalProjectBuilder INCREMENTAL_BUILD IncrementalProjectBuilder FULL_BUILD GlobalBuildAction IWorkbenchWindow GlobalBuildAction IWorkbench getActiveWorkbenchWindow IllegalArgumentException
Creates a new action of the appropriate type The action id is code I Workbench Action Constants BUILD code for incremental builds and code I Workbench Action Constants REBUILD ALL code for full builds param window the window in which this action appears param type the type of build one of code Incremental Project Builder INCREMENTAL BUILD code or code Incremental Project Builder FULL BUILD code public Global Build Action I Workbench Window window int type if window null throw new Illegal Argument Exception this workbench Window window set Build Type type  IWorkbenchActionConstants IWorkbenchActionConstants REBUILD_ALL IncrementalProjectBuilder INCREMENTAL_BUILD IncrementalProjectBuilder FULL_BUILD GlobalBuildAction IWorkbenchWindow IllegalArgumentException workbenchWindow setBuildType
Sets the build type param type the type of build one of code Incremental Project Builder INCREMENTAL BUILD code or code Incremental Project Builder FULL BUILD code private void set Build Type int type allow AUTO BUILD as well for backwards compatibility but treat it the same as INCREMENTAL BUILD switch type case Incremental Project Builder INCREMENTAL BUILD case Incremental Project Builder AUTO BUILD set Text IDE Workbench Messages get String Global Build Action text NON NLS 1 set Tool Tip Text IDE Workbench Messages get String Global Build Action tool Tip NON NLS 1 set Id build NON NLS 1 Workbench Help set Help this I Help Context Ids GLOBAL INCREMENTAL BUILD ACTION set Image Descriptor IDE Internal Workbench Images get Image Descriptor IDE Internal Workbench Images IMG ETOOL BUILD EXEC set Disabled Image Descriptor IDE Internal Workbench Images get Image Descriptor IDE Internal Workbench Images IMG ETOOL BUILD EXEC DISABLED set Action Definition Id org eclipse ui project build All NON NLS 1 break case Incremental Project Builder FULL BUILD set Text IDE Workbench Messages get String Global Build Action rebuild Text NON NLS 1 set Tool Tip Text IDE Workbench Messages get String Global Build Action rebuild Tool Tip NON NLS 1 set Id rebuild All NON NLS 1 Workbench Help set Help this I Help Context Ids GLOBAL FULL BUILD ACTION set Action Definition Id org eclipse ui project rebuild All NON NLS 1 break default throw new Illegal Argument Exception Invalid build type NON NLS 1 this build Type type  IncrementalProjectBuilder INCREMENTAL_BUILD IncrementalProjectBuilder FULL_BUILD setBuildType AUTO_BUILD INCREMENTAL_BUILD IncrementalProjectBuilder INCREMENTAL_BUILD IncrementalProjectBuilder AUTO_BUILD setText IDEWorkbenchMessages getString GlobalBuildAction setToolTipText IDEWorkbenchMessages getString GlobalBuildAction toolTip setId WorkbenchHelp setHelp IHelpContextIds GLOBAL_INCREMENTAL_BUILD_ACTION setImageDescriptor IDEInternalWorkbenchImages getImageDescriptor IDEInternalWorkbenchImages IMG_ETOOL_BUILD_EXEC setDisabledImageDescriptor IDEInternalWorkbenchImages getImageDescriptor IDEInternalWorkbenchImages IMG_ETOOL_BUILD_EXEC_DISABLED setActionDefinitionId buildAll IncrementalProjectBuilder FULL_BUILD setText IDEWorkbenchMessages getString GlobalBuildAction rebuildText setToolTipText IDEWorkbenchMessages getString GlobalBuildAction rebuildToolTip setId rebuildAll WorkbenchHelp setHelp IHelpContextIds GLOBAL_FULL_BUILD_ACTION setActionDefinitionId rebuildAll IllegalArgumentException buildType
Returns the shell to use private Shell get Shell return workbench Window get Shell  getShell workbenchWindow getShell
Returns the operation name to use private String get Operation Message if build Type Incremental Project Builder INCREMENTAL BUILD return IDE Workbench Messages get String Global Build Action build Operation Title NON NLS 1 else return IDE Workbench Messages get String Global Build Action rebuild All Operation Title NON NLS 1  getOperationMessage buildType IncrementalProjectBuilder INCREMENTAL_BUILD IDEWorkbenchMessages getString GlobalBuildAction buildOperationTitle IDEWorkbenchMessages getString GlobalBuildAction rebuildAllOperationTitle
Builds all projects within the workspace Does not save any open editors public void do Build do Build Operation  doBuild doBuildOperation
protected I Status run I Progress Monitor monitor final Multi Status status new Multi Status PlatformUI PLUGIN ID 0 IDE Workbench Messages get String Global Build Action build Problems NON NLS 1 null monitor begin Task get Operation Message 100 NON NLS 1 try Resources Plugin get Workspace build build Type new Sub Progress Monitor monitor 100 catch Core Exception e status add e get Status finally monitor done return status  IStatus IProgressMonitor MultiStatus MultiStatus PLUGIN_ID IDEWorkbenchMessages getString GlobalBuildAction buildProblems beginTask getOperationMessage ResourcesPlugin getWorkspace buildType SubProgressMonitor CoreException getStatus
see org eclipse core runtime jobs Job belongs To java lang Object public boolean belongs To Object family return Resources Plugin FAMILY MANUAL BUILD family  belongsTo belongsTo ResourcesPlugin FAMILY_MANUAL_BUILD
Invokes a build on all projects within the workspace Reports any errors with the build to the user package void do Build Operation Job build Job new Job IDE Workbench Messages get String Global Build Action job Title NON NLS 1 non Javadoc see org eclipse core runtime jobs Job run org eclipse core runtime I Progress Monitor protected I Status run I Progress Monitor monitor final Multi Status status new Multi Status PlatformUI PLUGIN ID 0 IDE Workbench Messages get String Global Build Action build Problems NON NLS 1 null monitor begin Task get Operation Message 100 NON NLS 1 try Resources Plugin get Workspace build build Type new Sub Progress Monitor monitor 100 catch Core Exception e status add e get Status finally monitor done return status non Javadoc see org eclipse core runtime jobs Job belongs To java lang Object public boolean belongs To Object family return Resources Plugin FAMILY MANUAL BUILD family build Job set Rule Resources Plugin get Workspace get Rule Factory build Rule build Job set User true build Job schedule  doBuildOperation buildJob IDEWorkbenchMessages getString GlobalBuildAction jobTitle IProgressMonitor IStatus IProgressMonitor MultiStatus MultiStatus PLUGIN_ID IDEWorkbenchMessages getString GlobalBuildAction buildProblems beginTask getOperationMessage ResourcesPlugin getWorkspace buildType SubProgressMonitor CoreException getStatus belongsTo belongsTo ResourcesPlugin FAMILY_MANUAL_BUILD buildJob setRule ResourcesPlugin getWorkspace getRuleFactory buildRule buildJob setUser buildJob
Returns an array of all projects in the workspace package I Project get Workspace Projects return Resources Plugin get Workspace get Root get Projects  IProject getWorkspaceProjects ResourcesPlugin getWorkspace getRoot getProjects
public void run if workbench Window null action has been disposed return Do nothing if there are no projects I Project roots get Workspace Projects if roots length 1 return Verify that there are builders registered on at least one project if verify Builders Available roots return if verify No Manual Running return Save all resources prior to doing build save All Resources Perform the build on all the projects do Build Operation  workbenchWindow IProject getWorkspaceProjects verifyBuildersAvailable verifyNoManualRunning saveAllResources doBuildOperation
Causes all editors to save any modified resources depending on the user s preference package void save All Resources if Build Action is Save All Set return I Workbench Window windows PlatformUI get Workbench get Workbench Windows for int i 0 i windows length i I Workbench Page perspectives windows i get Pages for int j 0 j perspectives length j perspectives j save All Editors false  saveAllResources BuildAction isSaveAllSet IWorkbenchWindow getWorkbench getWorkbenchWindows IWorkbenchPage getPages saveAllEditors
Checks that there is at least one project with a builder registered on it package boolean verify Builders Available I Project roots try for int i 0 i roots length i if roots i is Accessible if roots i get Description get Build Spec length 0 return true catch Core Exception e IDE Workbench Plugin log Exception in get Class get Name run e NON NLS 2 NON NLS 1 Error Dialog open Error get Shell IDE Workbench Messages get String Global Build Action build Problems NON NLS 1 IDE Workbench Messages format Global Build Action internal Error new Object e get Message NON NLS 1 e get Status return false return false  verifyBuildersAvailable IProject isAccessible getDescription getBuildSpec CoreException IDEWorkbenchPlugin getClass getName ErrorDialog openError getShell IDEWorkbenchMessages getString GlobalBuildAction buildProblems IDEWorkbenchMessages GlobalBuildAction internalError getMessage getStatus
public void dispose if workbench Window null action has already been disposed return workbench Window null  workbenchWindow workbenchWindow
Verify that no manual build is running If it is then give the use the option to cancel If they cancel cancel the jobs and return true otherwise return false return whether or not there is a manual build job running private boolean verify No Manual Running Job build Jobs Job Manager get Instance find Resources Plugin FAMILY MANUAL BUILD if build Jobs length 0 return true boolean cancel Message Dialog open Question workbench Window get Shell IDE Workbench Messages get String Global Build Action Build Running Title NON NLS 1 IDE Workbench Messages get String Global Build Action Build Running Message NON NLS 1 if cancel for int i 0 i build Jobs length i Job job build Jobs i job cancel If they cancelled get them to do it again return false  verifyNoManualRunning buildJobs JobManager getInstance ResourcesPlugin FAMILY_MANUAL_BUILD buildJobs MessageDialog openQuestion workbenchWindow getShell IDEWorkbenchMessages getString GlobalBuildAction BuildRunningTitle IDEWorkbenchMessages getString GlobalBuildAction BuildRunningMessage buildJobs buildJobs

private final I Selection Listener selection Listener new I Selection Listener public void selection Changed I Workbench Part part I Selection selection if selection instanceof I Structured Selection I Structured Selection structured I Structured Selection selection Import Resources Action this selection Changed structured  ISelectionListener selectionListener ISelectionListener selectionChanged IWorkbenchPart ISelection IStructuredSelection IStructuredSelection IStructuredSelection ImportResourcesAction selectionChanged
Create a new instance of this class public Import Resources Action I Workbench Window window super Workbench Messages get String Import Resources Action text NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window set Action Definition Id org eclipse ui file import NON NLS 1 set Tool Tip Text Workbench Messages get String Import Resources Action tool Tip NON NLS 1 set Id import NON NLS 1 Workbench Help set Help this I Help Context Ids IMPORT ACTION self register selection listener new for 3 0 workbench Window get Selection Service add Selection Listener selection Listener set Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL IMPORT WIZ set Disabled Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL IMPORT WIZ DISABLED  ImportResourcesAction IWorkbenchWindow WorkbenchMessages getString ImportResourcesAction IllegalArgumentException workbenchWindow setActionDefinitionId setToolTipText WorkbenchMessages getString ImportResourcesAction toolTip setId WorkbenchHelp setHelp IHelpContextIds IMPORT_ACTION workbenchWindow getSelectionService addSelectionListener selectionListener setImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_IMPORT_WIZ setDisabledImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_IMPORT_WIZ_DISABLED
Create a new instance of this class deprecated use the constructor code Import Resources Action I Workbench Window code public Import Resources Action I Workbench workbench this workbench get Active Workbench Window  ImportResourcesAction IWorkbenchWindow ImportResourcesAction IWorkbench getActiveWorkbenchWindow
Invoke the Import wizards selection Wizard public void run if workbench Window null action has been disposed return Import Wizard wizard new Import Wizard I Structured Selection selection To Pass get the current workbench selection I Selection workbench Selection workbench Window get Selection Service get Selection if workbench Selection instanceof I Structured Selection selection To Pass I Structured Selection workbench Selection else selection To Pass Structured Selection EMPTY wizard init workbench Window get Workbench selection To Pass I Dialog Settings workbench Settings Workbench Plugin get Default get Dialog Settings I Dialog Settings wizard Settings workbench Settings get Section Import Resources Action NON NLS 1 if wizard Settings null wizard Settings workbench Settings add New Section Import Resources Action NON NLS 1 wizard set Dialog Settings wizard Settings wizard set Force Previous And Next Buttons true Shell parent workbench Window get Shell Wizard Dialog dialog new Wizard Dialog parent wizard dialog create dialog get Shell set Size Math max SIZING WIZARD WIDTH dialog get Shell get Size x SIZING WIZARD HEIGHT Workbench Help set Help dialog get Shell I Help Context Ids IMPORT WIZARD dialog open  workbenchWindow ImportWizard ImportWizard IStructuredSelection selectionToPass ISelection workbenchSelection workbenchWindow getSelectionService getSelection workbenchSelection IStructuredSelection selectionToPass IStructuredSelection workbenchSelection selectionToPass StructuredSelection workbenchWindow getWorkbench selectionToPass IDialogSettings workbenchSettings WorkbenchPlugin getDefault getDialogSettings IDialogSettings wizardSettings workbenchSettings getSection ImportResourcesAction wizardSettings wizardSettings workbenchSettings addNewSection ImportResourcesAction setDialogSettings wizardSettings setForcePreviousAndNextButtons workbenchWindow getShell WizardDialog WizardDialog getShell setSize SIZING_WIZARD_WIDTH getShell getSize SIZING_WIZARD_HEIGHT WorkbenchHelp setHelp getShell IHelpContextIds IMPORT_WIZARD
Sets the current selection In for backwards compatability Use selection Changed instead param selection the new selection deprecated public void set Selection I Structured Selection selection selection Changed selection  selectionChanged setSelection IStructuredSelection selectionChanged
public void dispose if workbench Window null action has already been disposed return workbench Window get Selection Service remove Selection Listener selection Listener workbench Window null  workbenchWindow workbenchWindow getSelectionService removeSelectionListener selectionListener workbenchWindow

Constructs a Label Retarget Action with the given action id and text param actionID the retargetable action id param text the action s text or code null code if there is no text public Label Retarget Action String actionID String text this actionID text I Action AS UNSPECIFIED  LabelRetargetAction LabelRetargetAction IAction AS_UNSPECIFIED
Constructs a Retarget Action with the given action id text and style param actionID the retargetable action id 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 since 3 0 public Label Retarget Action String actionID String text int style super actionID text style this default Text text this default Tool Tip Text text accelerator Text extract Accelerator Text text  RetargetAction AS_PUSH_BUTTON AS_CHECK_BOX AS_DROP_DOWN_MENU AS_RADIO_BUTTON AS_UNSPECIFIED LabelRetargetAction defaultText defaultToolTipText acceleratorText extractAcceleratorText
The action handler has changed Update self protected void propagate Change Property Change Event event super propagate Change event String prop event get Property if prop equals Action TEXT String str String event get New Value super set Text append Accelerator str else if prop equals Action TOOL TIP TEXT String str String event get New Value super set Tool Tip Text str else if prop equals Action IMAGE update Images get Action Handler  propagateChange PropertyChangeEvent propagateChange getProperty getNewValue setText appendAccelerator TOOL_TIP_TEXT getNewValue setToolTipText updateImages getActionHandler
Sets the action handler Update self protected void set Action Handler I Action handler Run the default behavior super set Action Handler handler Now update the label tooltip and images if handler null super set Text default Text super set Tool Tip Text default Tool Tip Text else If no text is specified by the handler use the default text Fixes 22529 String handler Text handler get Text if handler Text null handler Text length 0 handler Text default Text super set Text append Accelerator handler Text super set Tool Tip Text handler get Tool Tip Text update Images handler  setActionHandler IAction setActionHandler setText defaultText setToolTipText defaultToolTipText handlerText getText handlerText handlerText handlerText defaultText setText appendAccelerator handlerText setToolTipText getToolTipText updateImages
Method declared on I Action public void set Disabled Image Descriptor Image Descriptor image super set Disabled Image Descriptor image default Disabled Image image  IAction setDisabledImageDescriptor ImageDescriptor setDisabledImageDescriptor defaultDisabledImage
Method declared on I Action public void set Hover Image Descriptor Image Descriptor image super set Hover Image Descriptor image default Hover Image image  IAction setHoverImageDescriptor ImageDescriptor setHoverImageDescriptor defaultHoverImage
Method declared on I Action public void set Image Descriptor Image Descriptor image super set Image Descriptor image default Image image  IAction setImageDescriptor ImageDescriptor setImageDescriptor defaultImage
Sets the action s label text to the given value public void set Text String text super set Text text accelerator Text extract Accelerator Text text default Text text  setText setText acceleratorText extractAcceleratorText defaultText
Sets the tooltip text to the given text The value code null code clears the tooltip text public void set Tool Tip Text String text super set Tool Tip Text text default Tool Tip Text text  setToolTipText setToolTipText defaultToolTipText
Ensures the accelerator is correct in the text handlers are not allowed to change the accelerator private String append Accelerator String new Text if new Text null return null Remove any accelerator String str remove Accelerator Text new Text Append our accelerator if accelerator Text null str str accelerator Text return str  appendAccelerator newText newText removeAcceleratorText newText acceleratorText acceleratorText
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 including or t or code null code private String extract Accelerator Text String text if text null return null int index text last Index Of t if index 1 index text last Index Of if index 0 return text substring index return null  extractAcceleratorText lastIndexOf lastIndexOf
Updates the images for this action based on the given handler private void update Images I Action handler if handler null super set Hover Image Descriptor default Hover Image super set Image Descriptor default Image super set Disabled Image Descriptor default Disabled Image else use the default images if the handler has no images set Image Descriptor hover Image handler get Hover Image Descriptor Image Descriptor image handler get Image Descriptor Image Descriptor disabled Image handler get Disabled Image Descriptor if hover Image null image null disabled Image null super set Hover Image Descriptor hover Image super set Image Descriptor image super set Disabled Image Descriptor disabled Image else super set Hover Image Descriptor default Hover Image super set Image Descriptor default Image super set Disabled Image Descriptor default Disabled Image  updateImages IAction setHoverImageDescriptor defaultHoverImage setImageDescriptor defaultImage setDisabledImageDescriptor defaultDisabledImage ImageDescriptor hoverImage getHoverImageDescriptor ImageDescriptor getImageDescriptor ImageDescriptor disabledImage getDisabledImageDescriptor hoverImage disabledImage setHoverImageDescriptor hoverImage setImageDescriptor setDisabledImageDescriptor disabledImage setHoverImageDescriptor defaultHoverImage setImageDescriptor defaultImage setDisabledImageDescriptor defaultDisabledImage

Creates a new operation initialized with a shell param shell parent shell for error dialogs public Move Files And Folders Operation Shell shell super shell  MoveFilesAndFoldersOperation
Returns whether this operation is able to perform on the fly auto renaming of resources with name collisions return code true code if auto rename is supported and code false code otherwise protected boolean can Perform Auto Rename return false  canPerformAutoRename
Moves the resources to the given destination This method is called recursively to merge folders during folder move param resources the resources to move param destination destination to which resources will be moved param sub Monitor a progress monitor for showing progress and for cancelation protected void copy I Resource resources I Path destination I Progress Monitor sub Monitor throws Core Exception for int i 0 i resources length i I Resource source resources i I Path destination Path destination append source get Name I Workspace workspace source get Workspace I Workspace Root workspace Root workspace get Root I Resource existing workspace Root find Member destination Path if source get Type I Resource FOLDER existing null the resource is a folder and it exists in the destination move the children of the folder if homogenous Resources source existing I Resource children I Container source members copy children destination Path sub Monitor delete source sub Monitor else delete the destination folder moving a linked folder over an unlinked one or vice versa Fixes bug 28772 delete existing new Sub Progress Monitor sub Monitor 0 source move destination Path I Resource SHALLOW I Resource KEEP HISTORY new Sub Progress Monitor sub Monitor 0 else if we re merging folders we could be overwriting an existing file if existing null if homogenous Resources source existing move Existing source existing sub Monitor else Moving a linked resource over unlinked or vice versa Can t use set Contents here Fixes bug 28772 delete existing new Sub Progress Monitor sub Monitor 0 source move destination Path I Resource SHALLOW I Resource KEEP HISTORY new Sub Progress Monitor sub Monitor 0 else source move destination Path I Resource SHALLOW I Resource KEEP HISTORY new Sub Progress Monitor sub Monitor 0 sub Monitor worked 1 if sub Monitor is Canceled throw new Operation Canceled Exception  subMonitor IResource IPath IProgressMonitor subMonitor CoreException IResource IPath destinationPath getName IWorkspace getWorkspace IWorkspaceRoot workspaceRoot getRoot IResource workspaceRoot findMember destinationPath getType IResource homogenousResources IResource IContainer destinationPath subMonitor subMonitor SubProgressMonitor subMonitor destinationPath IResource IResource KEEP_HISTORY SubProgressMonitor subMonitor homogenousResources moveExisting subMonitor setContents SubProgressMonitor subMonitor destinationPath IResource IResource KEEP_HISTORY SubProgressMonitor subMonitor destinationPath IResource IResource KEEP_HISTORY SubProgressMonitor subMonitor subMonitor subMonitor isCanceled OperationCanceledException
Returns the message for querying deep copy move of a linked resource param source resource the query is made for return the deep query message protected String get Deep Check Question I Resource source return IDE Workbench Messages format Copy Files And Folders Operation deep Move Question NON NLS 1 new Object source get Full Path make Relative  getDeepCheckQuestion IResource IDEWorkbenchMessages CopyFilesAndFoldersOperation deepMoveQuestion getFullPath makeRelative
Returns the task title for this operation s progress dialog return the task title protected String get Operation Title return IDE Workbench Messages get String Move Files And Folders Operation operation Title NON NLS 1  getOperationTitle IDEWorkbenchMessages getString MoveFilesAndFoldersOperation operationTitle
Returns the message for this operation s problems dialog return the problems message protected String get Problems Message return IDE Workbench Messages get String Move Files And Folders Operation problem Message NON NLS 1  getProblemsMessage IDEWorkbenchMessages getString MoveFilesAndFoldersOperation problemMessage
Returns the title for this operation s problems dialog return the problems dialog title protected String get Problems Title return IDE Workbench Messages get String Move Files And Folders Operation move Failed Title NON NLS 1  getProblemsTitle IDEWorkbenchMessages getString MoveFilesAndFoldersOperation moveFailedTitle
Returns whether the source file in a destination collision will be validate Edited together with the collision itself Returns true return boolean code true code the source file in a destination collision should be validate Edited protected boolean get Validate Conflict Source return true  validateEdited validateEdited getValidateConflictSource
Sets the content of the existing file to the source file content Deletes the source file param source source file to move param existing existing file to set the source content in param sub Monitor a progress monitor for showing progress and for cancelation throws Core Exception set Contents failed private void move Existing I Resource source I Resource existing I Progress Monitor sub Monitor throws Core Exception I File existing File get File existing if existing File null I File source File get File source if source File null existing File set Contents source File get Contents I Resource KEEP HISTORY new Sub Progress Monitor sub Monitor 0 delete source File sub Monitor  subMonitor CoreException setContents moveExisting IResource IResource IProgressMonitor subMonitor CoreException IFile existingFile getFile existingFile IFile sourceFile getFile sourceFile existingFile setContents sourceFile getContents IResource KEEP_HISTORY SubProgressMonitor subMonitor sourceFile subMonitor
public String validate Destination I Container destination I Resource source Resources I Path destination Location destination get Location for int i 0 i source Resources length i I Resource source Resource source Resources i is the source being copied onto itself if source Resource get Parent equals destination return IDE Workbench Messages format Move Files And Folders Operation same Source And Dest NON NLS 1 new Object source Resource get Name test if linked source is copied onto itself Fixes bug 29913 if destination Location null I Path source Location source Resource get Location I Path destination Resource destination Location append source Resource get Name if source Location null source Location is Prefix Of destination Resource return IDE Workbench Messages format Move Files And Folders Operation same Source And Dest NON NLS 1 new Object source Resource get Name return super validate Destination destination source Resources  validateDestination IContainer IResource sourceResources IPath destinationLocation getLocation sourceResources IResource sourceResource sourceResources sourceResource getParent IDEWorkbenchMessages MoveFilesAndFoldersOperation sameSourceAndDest sourceResource getName destinationLocation IPath sourceLocation sourceResource getLocation IPath destinationResource destinationLocation sourceResource getName sourceLocation sourceLocation isPrefixOf destinationResource IDEWorkbenchMessages MoveFilesAndFoldersOperation sameSourceAndDest sourceResource getName validateDestination sourceResources

Creates a new project move action with the given text param shell the shell for any dialogs public Move Project Action Shell shell super shell MOVE TITLE set Tool Tip Text MOVE TOOL TIP set Id Move Project Action ID Workbench Help set Help this I Help Context Ids MOVE PROJECT ACTION  MoveProjectAction MOVE_TITLE setToolTipText MOVE_TOOL_TIP setId MoveProjectAction WorkbenchHelp setHelp IHelpContextIds MOVE_PROJECT_ACTION
Return the title of the errors dialog return java lang String protected String get Errors Title return PROBLEMS TITLE  getErrorsTitle PROBLEMS_TITLE
Workspace Modify Operation op new Workspace Modify Operation public void execute I Progress Monitor monitor monitor begin Task MOVE PROGRESS TITLE 100 try if monitor is Canceled throw new Operation Canceled Exception Get a copy of the current description and modify it I Project Description new Description create Description project project Name new Location monitor worked 50 project move new Description I Resource FORCE I Resource SHALLOW monitor monitor worked 50 catch Core Exception e record Error e log error finally monitor done  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor beginTask MOVE_PROGRESS_TITLE isCanceled OperationCanceledException IProjectDescription newDescription createDescription projectName newLocation newDescription IResource IResource CoreException recordError
Moves the project to the new values param project the project to copy param project Name the name of the copy param new Location I Path return code true code if the copy operation completed and code false code if it was abandoned part way boolean perform Move final I Project project final String project Name final I Path new Location Workspace Modify Operation op new Workspace Modify Operation public void execute I Progress Monitor monitor monitor begin Task MOVE PROGRESS TITLE 100 try if monitor is Canceled throw new Operation Canceled Exception Get a copy of the current description and modify it I Project Description new Description create Description project project Name new Location monitor worked 50 project move new Description I Resource FORCE I Resource SHALLOW monitor monitor worked 50 catch Core Exception e record Error e log error finally monitor done try new Progress Monitor Jobs Dialog shell run true true op catch Interrupted Exception e return false catch Invocation Target Exception e Core Exceptions are collected above but unexpected runtime exceptions and errors may still occur IDE Workbench Plugin log Message Format format Exception in 0 perform Move 1 new Object get Class get Name e get Target Exception NON NLS 1 display Error IDE Workbench Messages format Move Project Action internal Error new Object e get Target Exception get Message NON NLS 1 return false return true  projectName newLocation IPath performMove IProject projectName IPath newLocation WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor beginTask MOVE_PROGRESS_TITLE isCanceled OperationCanceledException IProjectDescription newDescription createDescription projectName newLocation newDescription IResource IResource CoreException recordError ProgressMonitorJobsDialog InterruptedException InvocationTargetException CoreExceptions IDEWorkbenchPlugin MessageFormat performMove getClass getName getTargetException displayError IDEWorkbenchMessages MoveProjectAction internalError getTargetException getMessage
Query for a new project destination using the parameters in the existing project return Object or null if the selection is cancelled param project the project we are going to move protected Object query Destination Parameters I Project project Project Location Move Dialog dialog new Project Location Move Dialog shell project dialog set Title IDE Workbench Messages get String Move Project Action move Title NON NLS 1 dialog open return dialog get Result  queryDestinationParameters IProject ProjectLocationMoveDialog ProjectLocationMoveDialog setTitle IDEWorkbenchMessages getString MoveProjectAction moveTitle getResult
Implementation of method defined on code I Action code public void run error Status null I Project project I Project get Selected Resources get 0 Get the project name and location in a two element list Object destination Paths query Destination Parameters project if destination Paths null return String project Name String destination Paths 0 I Path new Location new Path String destination Paths 1 boolean completed perform Move project project Name new Location if completed ie canceled return not appropriate to show errors If errors occurred open an Error dialog if error Status null Error Dialog open Error this shell PROBLEMS TITLE null error Status error Status null  IAction errorStatus IProject IProject getSelectedResources destinationPaths queryDestinationParameters destinationPaths projectName destinationPaths IPath newLocation destinationPaths performMove projectName newLocation errorStatus ErrorDialog openError PROBLEMS_TITLE errorStatus errorStatus

Creates a new action param shell the shell for any dialogs public Move Resource Action Shell shell super shell IDE Workbench Messages get String Move Resource Action text NON NLS 1 set Tool Tip Text IDE Workbench Messages get String Move Resource Action tool Tip NON NLS 1 set Id Move Resource Action ID Workbench Help set Help this I Help Context Ids MOVE RESOURCE ACTION  MoveResourceAction IDEWorkbenchMessages getString MoveResourceAction setToolTipText IDEWorkbenchMessages getString MoveResourceAction toolTip setId MoveResourceAction WorkbenchHelp setHelp IHelpContextIds MOVE_RESOURCE_ACTION
Overrides method in Copy Resource Action protected Copy Files And Folders Operation create Operation return new Move Files And Folders Operation get Shell  CopyResourceAction CopyFilesAndFoldersOperation createOperation MoveFilesAndFoldersOperation getShell
Returns the destination resources for the resources that have been moved so far return list of destination code I Resource code s protected List get Destinations return destinations  IResource getDestinations
protected I Resource get Resources List resource List Read Only State Checker checker new Read Only State Checker get Shell IDE Workbench Messages get String Move Resource Action title NON NLS 1 IDE Workbench Messages get String Move Resource Action check Move Message NON NLS 1 return checker check Read Only Resources super get Resources resource List  IResource getResources resourceList ReadOnlyStateChecker ReadOnlyStateChecker getShell IDEWorkbenchMessages getString MoveResourceAction IDEWorkbenchMessages getString MoveResourceAction checkMoveMessage checkReadOnlyResources getResources resourceList
protected void run Operation I Resource resources I Container destination Initialize the destinations destinations new Array List I Resource copied Resources operation copy Resources resources destination for int i 0 i copied Resources length i destinations add destination get Full Path append copied Resources i get Name  runOperation IResource IContainer ArrayList IResource copiedResources copyResources copiedResources getFullPath copiedResources getName

This default constructor allows the the action to be called from the welcome page public New Example Action this PlatformUI get Workbench get Active Workbench Window  NewExampleAction getWorkbench getActiveWorkbenchWindow
Creates a new action for launching the new project selection wizard param window the workbench window to query the current selection and shell for opening the wizard public New Example Action I Workbench Window window super IDE Workbench Messages get String New Example Action text NON NLS 1 if window null throw new Illegal Argument Exception this window window I Shared Images images PlatformUI get Workbench get Shared Images set Image Descriptor images get Image Descriptor I Shared Images IMG TOOL NEW WIZARD set Disabled Image Descriptor images get Image Descriptor I Shared Images IMG TOOL NEW WIZARD DISABLED set Tool Tip Text IDE Workbench Messages get String New Example Action tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids NEW ACTION  NewExampleAction IWorkbenchWindow IDEWorkbenchMessages getString NewExampleAction IllegalArgumentException ISharedImages getWorkbench getSharedImages setImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_NEW_WIZARD setDisabledImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_NEW_WIZARD_DISABLED setToolTipText IDEWorkbenchMessages getString NewExampleAction toolTip WorkbenchHelp setHelp IHelpContextIds NEW_ACTION
public void run Create wizard selection wizard I Workbench workbench PlatformUI get Workbench New Wizard wizard new New Wizard wizard set Category Id New Wizards Registry Reader FULL EXAMPLES WIZARD CATEGORY I Selection selection window get Selection Service get Selection I Structured Selection selection To Pass Structured Selection EMPTY if selection instanceof I Structured Selection selection To Pass I Structured Selection selection wizard init workbench selection To Pass I Dialog Settings workbench Settings IDE Workbench Plugin get Default get Dialog Settings I Dialog Settings wizard Settings workbench Settings get Section New Wizard Action NON NLS 1 if wizard Settings null wizard Settings workbench Settings add New Section New Wizard Action NON NLS 1 wizard set Dialog Settings wizard Settings wizard set Force Previous And Next Buttons true Create wizard dialog Shell parent window get Shell Wizard Dialog dialog new Wizard Dialog parent wizard dialog create wizard set Window Title IDE Workbench Messages get String New Example title NON NLS 1 dialog get Shell set Size Math max SIZING WIZARD WIDTH dialog get Shell get Size x SIZING WIZARD HEIGHT Workbench Help set Help dialog get Shell I Help Context Ids NEW PROJECT WIZARD Open wizard dialog open  IWorkbench getWorkbench NewWizard NewWizard setCategoryId NewWizardsRegistryReader FULL_EXAMPLES_WIZARD_CATEGORY ISelection getSelectionService getSelection IStructuredSelection selectionToPass StructuredSelection IStructuredSelection selectionToPass IStructuredSelection selectionToPass IDialogSettings workbenchSettings IDEWorkbenchPlugin getDefault getDialogSettings IDialogSettings wizardSettings workbenchSettings getSection NewWizardAction wizardSettings wizardSettings workbenchSettings addNewSection NewWizardAction setDialogSettings wizardSettings setForcePreviousAndNextButtons getShell WizardDialog WizardDialog setWindowTitle IDEWorkbenchMessages getString NewExample getShell setSize SIZING_WIZARD_WIDTH getShell getSize SIZING_WIZARD_HEIGHT WorkbenchHelp setHelp getShell IHelpContextIds NEW_PROJECT_WIZARD

This default constructor allows the the action to be called from the welcome page public New Project Action this PlatformUI get Workbench get Active Workbench Window  NewProjectAction getWorkbench getActiveWorkbenchWindow
Creates a new action for launching the new project selection wizard param window the workbench window to query the current selection and shell for opening the wizard public New Project Action I Workbench Window window super IDE Workbench Messages get String New Project Action text NON NLS 1 if window null throw new Illegal Argument Exception this window window I Shared Images images PlatformUI get Workbench get Shared Images set Image Descriptor images get Image Descriptor I Shared Images IMG TOOL NEW WIZARD set Disabled Image Descriptor images get Image Descriptor I Shared Images IMG TOOL NEW WIZARD DISABLED set Tool Tip Text IDE Workbench Messages get String New Project Action tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids NEW ACTION  NewProjectAction IWorkbenchWindow IDEWorkbenchMessages getString NewProjectAction IllegalArgumentException ISharedImages getWorkbench getSharedImages setImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_NEW_WIZARD setDisabledImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_NEW_WIZARD_DISABLED setToolTipText IDEWorkbenchMessages getString NewProjectAction toolTip WorkbenchHelp setHelp IHelpContextIds NEW_ACTION
public void run Create wizard selection wizard I Workbench workbench PlatformUI get Workbench New Wizard wizard new New Wizard wizard set Projects Only true I Selection selection window get Selection Service get Selection I Structured Selection selection To Pass Structured Selection EMPTY if selection instanceof I Structured Selection selection To Pass I Structured Selection selection wizard init workbench selection To Pass I Dialog Settings workbench Settings IDE Workbench Plugin get Default get Dialog Settings I Dialog Settings wizard Settings workbench Settings get Section New Wizard Action NON NLS 1 if wizard Settings null wizard Settings workbench Settings add New Section New Wizard Action NON NLS 1 wizard set Dialog Settings wizard Settings wizard set Force Previous And Next Buttons true Create wizard dialog Shell parent window get Shell Wizard Dialog dialog new Wizard Dialog parent wizard dialog create dialog get Shell set Size Math max SIZING WIZARD WIDTH dialog get Shell get Size x SIZING WIZARD HEIGHT Workbench Help set Help dialog get Shell I Help Context Ids NEW PROJECT WIZARD Open wizard dialog open  IWorkbench getWorkbench NewWizard NewWizard setProjectsOnly ISelection getSelectionService getSelection IStructuredSelection selectionToPass StructuredSelection IStructuredSelection selectionToPass IStructuredSelection selectionToPass IDialogSettings workbenchSettings IDEWorkbenchPlugin getDefault getDialogSettings IDialogSettings wizardSettings workbenchSettings getSection NewWizardAction wizardSettings wizardSettings workbenchSettings addNewSection NewWizardAction setDialogSettings wizardSettings setForcePreviousAndNextButtons getShell WizardDialog WizardDialog getShell setSize SIZING_WIZARD_WIDTH getShell getSize SIZING_WIZARD_HEIGHT WorkbenchHelp setHelp getShell IHelpContextIds NEW_PROJECT_WIZARD

Create a new instance of this class param window public New Wizard Action I Workbench Window window super Workbench Messages get String New Wizard Action text NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window issues should be IDE specific images I Shared Images images PlatformUI get Workbench get Shared Images set Image Descriptor images get Image Descriptor I Shared Images IMG TOOL NEW WIZARD set Disabled Image Descriptor images get Image Descriptor I Shared Images IMG TOOL NEW WIZARD DISABLED set Tool Tip Text Workbench Messages get String New Wizard Action tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids NEW ACTION set Action Definition Id org eclipse ui new Wizard NON NLS 1  NewWizardAction IWorkbenchWindow WorkbenchMessages getString NewWizardAction IllegalArgumentException workbenchWindow ISharedImages getWorkbench getSharedImages setImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_NEW_WIZARD setDisabledImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_NEW_WIZARD_DISABLED setToolTipText WorkbenchMessages getString NewWizardAction toolTip WorkbenchHelp setHelp IHelpContextIds NEW_ACTION setActionDefinitionId newWizard
Create a new instance of this class deprecated use the constructor code New Wizard Action I Workbench Window code public New Wizard Action this PlatformUI get Workbench get Active Workbench Window  NewWizardAction IWorkbenchWindow NewWizardAction getWorkbench getActiveWorkbenchWindow
Returns the id of the category of wizards to show or code null code to show all categories return String public String get Category Id return category Id  getCategoryId categoryId
Sets the id of the category of wizards to show or code null code to show all categories param id public void set Category Id String id category Id id  setCategoryId categoryId
public void run if workbench Window null action has been disposed return New Wizard wizard new New Wizard wizard set Category Id category Id I Selection selection workbench Window get Selection Service get Selection I Structured Selection selection To Pass Structured Selection EMPTY if selection instanceof I Structured Selection selection To Pass I Structured Selection selection else issue the following is resource specific legacy code Build the selection from the I File of the editor Class resource Class Legacy Resource Support get Resource Class if resource Class null I Workbench Part part workbench Window get Part Service get Active Part if part instanceof I Editor Part I Editor Input input I Editor Part part get Editor Input Object resource input get Adapter resource Class if resource null selection To Pass new Structured Selection resource wizard init workbench Window get Workbench selection To Pass I Dialog Settings workbench Settings Workbench Plugin get Default get Dialog Settings I Dialog Settings wizard Settings workbench Settings get Section New Wizard Action NON NLS 1 if wizard Settings null wizard Settings workbench Settings add New Section New Wizard Action NON NLS 1 wizard set Dialog Settings wizard Settings wizard set Force Previous And Next Buttons true Shell parent workbench Window get Shell Wizard Dialog dialog new Wizard Dialog parent wizard dialog create dialog get Shell set Size Math max SIZING WIZARD WIDTH dialog get Shell get Size x SIZING WIZARD HEIGHT Workbench Help set Help dialog get Shell I Help Context Ids NEW WIZARD dialog open  workbenchWindow NewWizard NewWizard setCategoryId categoryId ISelection workbenchWindow getSelectionService getSelection IStructuredSelection selectionToPass StructuredSelection IStructuredSelection selectionToPass IStructuredSelection IFile resourceClass LegacyResourceSupport getResourceClass resourceClass IWorkbenchPart workbenchWindow getPartService getActivePart IEditorPart IEditorInput IEditorPart getEditorInput getAdapter resourceClass selectionToPass StructuredSelection workbenchWindow getWorkbench selectionToPass IDialogSettings workbenchSettings WorkbenchPlugin getDefault getDialogSettings IDialogSettings wizardSettings workbenchSettings getSection NewWizardAction wizardSettings wizardSettings workbenchSettings addNewSection NewWizardAction setDialogSettings wizardSettings setForcePreviousAndNextButtons workbenchWindow getShell WizardDialog WizardDialog getShell setSize SIZING_WIZARD_WIDTH getShell getSize SIZING_WIZARD_HEIGHT WorkbenchHelp setHelp getShell IHelpContextIds NEW_WIZARD
public void dispose if workbench Window null action has already been disposed return workbench Window null  workbenchWindow workbenchWindow

private boolean dirty true private I Menu Listener menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager manager mark Dirty dirty true  IMenuListener menuListener IMenuListener menuAboutToShow IMenuManager markDirty
Create a new wizard shortcut menu p If the menu will appear on a semi permanent basis for instance within a toolbar or menubar the value passed for code register code should be true If set the menu will listen to perspective activation and update itself to suit In this case clients are expected to call code deregister code when the menu is no longer needed This will unhook any perspective listeners p param inner Mgr the location for the shortcut menu contents param window the window containing the menu param register if code true code the menu listens to perspective changes in the window public New Wizard Menu I Menu Manager inner Mgr I Workbench Window window boolean register this window fill Menu inner Mgr Must be done after constructor to ensure field initialization  innerMgr NewWizardMenu IMenuManager innerMgr IWorkbenchWindow fillMenu innerMgr
public New Wizard Menu I Workbench Window window super this window window show Dlg Action Action Factory NEW create window new Project Action new New Project Action window new Example Action new New Example Action window  NewWizardMenu IWorkbenchWindow showDlgAction ActionFactory newProjectAction NewProjectAction newExampleAction NewExampleAction
private void fill Menu I Contribution Manager inner Mgr Remove all inner Mgr remove All if this enabled Add new project inner Mgr add new Project Action Get visible actions List actions null I Workbench Page page window get Active Page if page null actions Workbench Page page get New Wizard Action Ids if actions null if actions size 0 inner Mgr add new Separator for Iterator i actions iterator i has Next String id String i next I Action action get Action id if action null if Workbench Activity Helper filter Item action continue inner Mgr add action if has Examples Add examples inner Mgr add new Separator inner Mgr add new Example Action Add other inner Mgr add new Separator inner Mgr add show Dlg Action  fillMenu IContributionManager innerMgr innerMgr removeAll innerMgr newProjectAction IWorkbenchPage getActivePage WorkbenchPage getNewWizardActionIds innerMgr hasNext IAction getAction WorkbenchActivityHelper filterItem innerMgr hasExamples innerMgr innerMgr newExampleAction innerMgr innerMgr showDlgAction
private I Action get Action String id Keep a cache rather than creating a new action each time so that image caching in Action Contribution Item works I Action action I Action actions get id if action null Workbench Wizard Element element reader find Wizard id if element null action new New Wizard Shortcut Action window element actions put id action return action  IAction getAction ActionContributionItem IAction IAction WorkbenchWizardElement findWizard NewWizardShortcutAction
Method declared on I Contribution Item public boolean is Enabled return enabled  IContributionItem isEnabled
Method declared on I Contribution Item public boolean is Dynamic return true  IContributionItem isDynamic
Method declared on I Contribution Item public boolean is Dirty return dirty  IContributionItem isDirty
Sets the enabled state of the receiver param enabled Value if code true code the menu is enabled else it is disabled public void set Enabled boolean enabled Value this enabled enabled Value  enabledValue setEnabled enabledValue enabledValue
Removes all listeners from the containing workbench window p This method should only be called if the shortcut menu is created with code register true code p deprecated public void deregister Listeners  deregisterListeners
public void fill Menu menu int index if get Parent instanceof Menu Manager Menu Manager get Parent add Menu Listener menu Listener if dirty return Menu Manager manager new Menu Manager fill Menu manager I Contribution Item items manager get Items for int i 0 i items length i items i fill menu index dirty false  getParent MenuManager MenuManager getParent addMenuListener menuListener MenuManager MenuManager fillMenu IContributionItem getItems
Return whether or not any examples are in the current install return boolean private boolean has Examples New Wizards Registry Reader rdr new New Wizards Registry Reader false Object children rdr get Wizard Elements get Children null for int i 0 i children length i Wizard Collection Element current Child Wizard Collection Element children i if current Child get Id equals New Wizards Registry Reader FULL EXAMPLES WIZARD CATEGORY return true return false  hasExamples NewWizardsRegistryReader NewWizardsRegistryReader getWizardElements getChildren WizardCollectionElement currentChild WizardCollectionElement currentChild getId NewWizardsRegistryReader FULL_EXAMPLES_WIZARD_CATEGORY

Creates a new action that will open editors on the then selected file resources Equivalent to code Open File Action page null code param page the workbench page in which to open the editor public Open File Action I Workbench Page page this page null  OpenFileAction OpenFileAction IWorkbenchPage
Creates a new action that will open instances of the specified editor on the then selected file resources param page the workbench page in which to open the editor param descriptor the editor descriptor or code null code if unspecified public Open File Action I Workbench Page page I Editor Descriptor descriptor super page set Text descriptor null IDE Workbench Messages get String Open File Action text descriptor get Label NON NLS 1 Workbench Help set Help this I Help Context Ids OPEN FILE ACTION set Tool Tip Text IDE Workbench Messages get String Open File Action tool Tip NON NLS 1 set Id ID this editor Descriptor descriptor  OpenFileAction IWorkbenchPage IEditorDescriptor setText IDEWorkbenchMessages getString OpenFileAction getLabel WorkbenchHelp setHelp IHelpContextIds OPEN_FILE_ACTION setToolTipText IDEWorkbenchMessages getString OpenFileAction toolTip setId editorDescriptor
Ensures that the contents of the given file resource are local param file the file resource return code true code if the file is local and code false code if it could not be made local for some reason boolean ensure File Local final I File file Currently fails due to Core PR Don t do it for now 1G5I6PV ITPCORE WINNT I Resource set Local attempts to modify immutable tree file set Local true I Resource DEPTH ZERO return true  ensureFileLocal IFile IResource setLocal setLocal IResource DEPTH_ZERO
Opens an editor on the given file resource param file the file resource void open File I File file try boolean activate Open Strategy activate On Open if editor Descriptor null IDE open Editor get Workbench Page file activate else if ensure File Local file get Workbench Page open Editor new File Editor Input file editor Descriptor get Id activate catch Part Init Exception e Dialog Util open Error get Workbench Page get Workbench Window get Shell IDE Workbench Messages get String Open File Action open File Shell Title NON NLS 1 e get Message e  openFile IFile OpenStrategy activateOnOpen editorDescriptor openEditor getWorkbenchPage ensureFileLocal getWorkbenchPage openEditor FileEditorInput editorDescriptor getId PartInitException DialogUtil openError getWorkbenchPage getWorkbenchWindow getShell IDEWorkbenchMessages getString OpenFileAction openFileShellTitle getMessage

Creates a new code Open In New Window Action code Sets the new window page s input to be an application specific default param window the workbench window containing this action public Open In New Window Action I Workbench Window window this window Workbench window get Workbench get Default Page Input  OpenInNewWindowAction OpenInNewWindowAction IWorkbenchWindow getWorkbench getDefaultPageInput
Creates a new code Open In New Window Action code param window the workbench window containing this action param input the input for the new window s page public Open In New Window Action I Workbench Window window I Adaptable input super Workbench Messages get String Open In New Window Action text NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window issue missing action id set Tool Tip Text Workbench Messages get String Open In New Window Action tool Tip NON NLS 1 page Input input Workbench Help set Help this I Help Context Ids OPEN NEW WINDOW ACTION  OpenInNewWindowAction OpenInNewWindowAction IWorkbenchWindow IAdaptable WorkbenchMessages getString OpenInNewWindowAction IllegalArgumentException workbenchWindow setToolTipText WorkbenchMessages getString OpenInNewWindowAction toolTip pageInput WorkbenchHelp setHelp IHelpContextIds OPEN_NEW_WINDOW_ACTION
Set the input to use for the new window s page public void set Page Input I Adaptable input page Input input  setPageInput IAdaptable pageInput
The implementation of this code I Action code method opens a new window The initial perspective for the new window will be the same type as the active perspective in the window which this action is running in public void run if workbench Window null action has been disposed return try String persp Id I Workbench Page page workbench Window get Active Page if page null page get Perspective null persp Id page get Perspective get Id else persp Id workbench Window get Workbench get Perspective Registry get Default Perspective workbench Window get Workbench open Workbench Window persp Id page Input catch Workbench Exception e Error Dialog open Error workbench Window get Shell Workbench Messages get String Open In New Window Action error Title NON NLS 1 e get Message e get Status  IAction workbenchWindow perspId IWorkbenchPage workbenchWindow getActivePage getPerspective perspId getPerspective getId perspId workbenchWindow getWorkbench getPerspectiveRegistry getDefaultPerspective workbenchWindow getWorkbench openWorkbenchWindow perspId pageInput WorkbenchException ErrorDialog openError workbenchWindow getShell WorkbenchMessages getString OpenInNewWindowAction errorTitle getMessage getStatus
since 3 0 public void dispose workbench Window null  workbenchWindow

private I Adaptable page Input Constructs a new instance of code Open New Page Menu code p If this method is used be sure to set the page input by invoking code set Page Input code The page input is required when the user selects an item in the menu At that point the menu will attempt to open a new page with the selected perspective and page input If there is no page input an error dialog will be opened p param window the window where a new page is created if an item within the menu is selected public Open New Page Menu I Workbench Window window this window null  IAdaptable pageInput OpenNewPageMenu setPageInput OpenNewPageMenu IWorkbenchWindow
Constructs a new instance of code Open New Page Menu code param window the window where a new page is created if an item within the menu is selected param input the page input public Open New Page Menu I Workbench Window window I Adaptable input super window Open New Page Menu NON NLS 1 this page Input input  OpenNewPageMenu OpenNewPageMenu IWorkbenchWindow IAdaptable pageInput
protected void run I Perspective Descriptor desc Verify page input if page Input null Message Dialog open Error get Window get Shell Workbench Messages get String Open New Page Menu dialog Title NON NLS 1 Workbench Messages get String Open New Page Menu unknown Page Input NON NLS 1 return Open the page try get Window open Page desc get Id page Input catch Workbench Exception e Message Dialog open Error get Window get Shell Workbench Messages get String Open New Page Menu dialog Title NON NLS 1 e get Message  IPerspectiveDescriptor pageInput MessageDialog openError getWindow getShell WorkbenchMessages getString OpenNewPageMenu dialogTitle WorkbenchMessages getString OpenNewPageMenu unknownPageInput getWindow openPage getId pageInput WorkbenchException MessageDialog openError getWindow getShell WorkbenchMessages getString OpenNewPageMenu dialogTitle getMessage
Sets the page input param input the page input public void set Page Input I Adaptable input page Input input  setPageInput IAdaptable pageInput

private I Adaptable page Input Constructs a new instance of code Open New Page Menu code p If this method is used be sure to set the page input by invoking code set Page Input code The page input is required when the user selects an item in the menu At that point the menu will attempt to open a new page with the selected perspective and page input If there is no page input an error dialog will be opened p param window the window where a new page is created if an item within the menu is selected public Open New Window Menu I Workbench Window window this window null  IAdaptable pageInput OpenNewPageMenu setPageInput OpenNewWindowMenu IWorkbenchWindow
Constructs a new instance of code Open New Page Menu code param window the window where a new page is created if an item within the menu is selected param input the page input public Open New Window Menu I Workbench Window window I Adaptable input super window Open New Page Menu NON NLS 1 this page Input input  OpenNewPageMenu OpenNewWindowMenu IWorkbenchWindow IAdaptable pageInput
protected void run I Perspective Descriptor desc Verify page input if page Input null Message Dialog open Error get Window get Shell Workbench Messages get String Open New Window Menu dialog Title NON NLS 1 Workbench Messages get String Open New Window Menu unknown Input NON NLS 1 return Open the page try get Window get Workbench open Workbench Window desc get Id page Input catch Workbench Exception e Message Dialog open Error get Window get Shell Workbench Messages get String Open New Window Menu dialog Title NON NLS 1 e get Message  IPerspectiveDescriptor pageInput MessageDialog openError getWindow getShell WorkbenchMessages getString OpenNewWindowMenu dialogTitle WorkbenchMessages getString OpenNewWindowMenu unknownInput getWindow getWorkbench openWorkbenchWindow getId pageInput WorkbenchException MessageDialog openError getWindow getShell WorkbenchMessages getString OpenNewWindowMenu dialogTitle getMessage
Sets the page input param input the page input public void set Page Input I Adaptable input page Input input  setPageInput IAdaptable pageInput

private static String PAGE PROBLEMS MESSAGE Workbench Messages get String Open Perspective Menu error Unknown Input NON NLS 1 Constructs a new menu public Open Perspective Menu I Menu Manager menu Manager I Workbench Window window this window this parent Menu Manager menu Manager  PAGE_PROBLEMS_MESSAGE WorkbenchMessages getString OpenPerspectiveMenu errorUnknownInput OpenPerspectiveMenu IMenuManager menuManager IWorkbenchWindow parentMenuManager menuManager
Constructs a new instance of code Open New Page Menu code p If this method is used be sure to set the page input by invoking code set Page Input code The page input is required when the user selects an item in the menu At that point the menu will attempt to open a new page with the selected perspective and page input If there is no page input an error dialog will be opened p param window the window where a new page is created if an item within the menu is selected public Open Perspective Menu I Workbench Window window this window null show Active true  OpenNewPageMenu setPageInput OpenPerspectiveMenu IWorkbenchWindow showActive
Constructs a new instance of code Open New Page Menu code param window the window where a new page is created if an item within the menu is selected param input the page input public Open Perspective Menu I Workbench Window window I Adaptable input super window Open New Page Menu NON NLS 1 this page Input input  OpenNewPageMenu OpenPerspectiveMenu IWorkbenchWindow IAdaptable pageInput
Return whether or not the menu can be run Answer true unless the current mode is replace and the replace Enabled flag is false private boolean can Run if open Perspective Setting equals I Workbench Preference Constants OPEN PERSPECTIVE REPLACE return replace Enabled return true  replaceEnabled canRun openPerspectiveSetting IWorkbenchPreferenceConstants OPEN_PERSPECTIVE_REPLACE replaceEnabled
Return the current perspective setting private String open Perspective Setting return Pref Util getAPI Preference Store get String I Workbench Preference Constants OPEN NEW PERSPECTIVE  openPerspectiveSetting PrefUtil getAPIPreferenceStore getString IWorkbenchPreferenceConstants OPEN_NEW_PERSPECTIVE
Runs an action for a particular perspective Opens the perspective supplied in a new window or a new page depending on the workbench preference param desc the selected perspective protected void run I Perspective Descriptor desc open Page desc 0  IPerspectiveDescriptor openPage
Runs an action for a particular perspective Check for shift or control events to decide which event to run param desc the selected perspective param event the event sent along with the selection callback protected void run I Perspective Descriptor desc Selection Event event open Page desc event state Mask  IPerspectiveDescriptor SelectionEvent openPage stateMask
private void open Page I Perspective Descriptor desc int key State Mask Verify page input if page Input null Message Dialog open Error get Window get Shell PAGE PROBLEMS TITLE PAGE PROBLEMS MESSAGE return Open the page try get Window get Workbench show Perspective desc get Id get Window page Input catch Workbench Exception e Message Dialog open Error get Window get Shell PAGE PROBLEMS TITLE e get Message  openPage IPerspectiveDescriptor keyStateMask pageInput MessageDialog openError getWindow getShell PAGE_PROBLEMS_TITLE PAGE_PROBLEMS_MESSAGE getWindow getWorkbench showPerspective getId getWindow pageInput WorkbenchException MessageDialog openError getWindow getShell PAGE_PROBLEMS_TITLE getMessage
Sets the page input param input the page input public void set Page Input I Adaptable input page Input input  setPageInput IAdaptable pageInput
Set whether replace menu item is enabled within its parent menu public void set Replace Enabled boolean is Enabled if replace Enabled is Enabled replace Enabled is Enabled if can Run parent Menu Manager null parent Menu Manager update true  setReplaceEnabled isEnabled replaceEnabled isEnabled replaceEnabled isEnabled canRun parentMenuManager parentMenuManager

public static final String ID PlatformUI PLUGIN ID Open Resource Action NON NLS 1 Creates a new action param shell the shell for any dialogs public Open Resource Action Shell shell super shell IDE Workbench Messages get String Open Resource Action text NON NLS 1 Workbench Help set Help this I Help Context Ids OPEN RESOURCE ACTION set Tool Tip Text IDE Workbench Messages get String Open Resource Action tool Tip NON NLS 1 set Id ID  PLUGIN_ID OpenResourceAction OpenResourceAction IDEWorkbenchMessages getString OpenResourceAction WorkbenchHelp setHelp IHelpContextIds OPEN_RESOURCE_ACTION setToolTipText IDEWorkbenchMessages getString OpenResourceAction toolTip setId
Method declared on Workspace Action String get Operation Message return NON NLS 1  WorkspaceAction getOperationMessage
Method declared on Workspace Action String get Problems Message return IDE Workbench Messages get String Open Resource Action problem Message NON NLS 1  WorkspaceAction getProblemsMessage IDEWorkbenchMessages getString OpenResourceAction problemMessage
Method declared on Workspace Action String get Problems Title return IDE Workbench Messages get String Open Resource Action dialog Title NON NLS 1  WorkspaceAction getProblemsTitle IDEWorkbenchMessages getString OpenResourceAction dialogTitle
Method declared on Workspace Action void invoke Operation I Resource resource I Progress Monitor monitor throws Core Exception I Project resource open monitor  WorkspaceAction invokeOperation IResource IProgressMonitor CoreException IProject
Method declared on Workspace Action boolean should Perform Resource Pruning return false  WorkspaceAction shouldPerformResourcePruning
The code Open Resource Action code implementation of this code Selection Listener Action code method ensures that this action is enabled only if one of the selections is a closed project protected boolean update Selection I Structured Selection s don t call super since we want to enable if closed project is selected if selection Is Of Type I Resource PROJECT return false Iterator resources get Selected Resources iterator while resources has Next I Project current Resource I Project resources next if current Resource is Open return true return false  OpenResourceAction SelectionListenerAction updateSelection IStructuredSelection selectionIsOfType IResource getSelectedResources hasNext IProject currentResource IProject currentResource isOpen
Handles a resource changed event by updating the enablement if one of the selected projects is opened or closed public void resource Changed I Resource Change Event event Warning code duplicated in Close Resource Action List sel get Selected Resources don t bother looking at delta if selection not applicable if selection Is Of Type I Resource PROJECT I Resource Delta delta event get Delta if delta null I Resource Delta proj Deltas delta get Affected Children I Resource Delta CHANGED for int i 0 i proj Deltas length i I Resource Delta proj Delta proj Deltas i if proj Delta get Flags I Resource Delta OPEN 0 if sel contains proj Delta get Resource selection Changed get Structured Selection return  resourceChanged IResourceChangeEvent CloseResourceAction getSelectedResources selectionIsOfType IResource IResourceDelta getDelta IResourceDelta projDeltas getAffectedChildren IResourceDelta projDeltas IResourceDelta projDelta projDeltas projDelta getFlags IResourceDelta projDelta getResource selectionChanged getStructuredSelection

private I Workbench Page workbench Page Creates a new action that will open system editors on the then selected file resources param page the workbench page in which to open the editor public Open System Editor Action I Workbench Page page super IDE Workbench Messages get String Open System Editor Action text NON NLS 1 set Tool Tip Text IDE Workbench Messages get String Open System Editor Action tool Tip NON NLS 1 set Id ID Workbench Help set Help this I Help Context Ids OPEN SYSTEM EDITOR ACTION if page null throw new Illegal Argument Exception this workbench Page page  IWorkbenchPage workbenchPage OpenSystemEditorAction IWorkbenchPage IDEWorkbenchMessages getString OpenSystemEditorAction setToolTipText IDEWorkbenchMessages getString OpenSystemEditorAction toolTip setId WorkbenchHelp setHelp IHelpContextIds OPEN_SYSTEM_EDITOR_ACTION IllegalArgumentException workbenchPage
Return the workbench page to open the editor in return the workbench page to open the editor in package final I Workbench Page get Workbench Page return workbench Page  IWorkbenchPage getWorkbenchPage workbenchPage
Opens a system editor on the given file resource param file the file resource package void open File I File file try get Workbench Page open Editor new File Editor Input file I Editor Registry SYSTEM EXTERNAL EDITOR ID catch Part Init Exception e Dialog Util open Error get Workbench Page get Workbench Window get Shell IDE Workbench Messages get String Open System Editor Action dialog Title NON NLS 1 e get Message e  openFile IFile getWorkbenchPage openEditor FileEditorInput IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID PartInitException DialogUtil openError getWorkbenchPage getWorkbenchWindow getShell IDEWorkbenchMessages getString OpenSystemEditorAction dialogTitle getMessage
public void run Iterator enum get Selected Resources iterator while enum has Next I Resource resource I Resource enum next if resource instanceof I File open File I File resource  getSelectedResources hasNext IResource IResource IFile openFile IFile
The code Open System Editor Action code implementation of this code Selection Listener Action code method enables the action only if the selection contains just file resources protected boolean update Selection I Structured Selection selection return super update Selection selection selection Is Of Type I Resource FILE  OpenSystemEditorAction SelectionListenerAction updateSelection IStructuredSelection updateSelection selectionIsOfType IResource

public int compare Object arg0 Object arg1 String s1 I Editor Descriptor arg0 get Label String s2 I Editor Descriptor arg1 get Label return collator compare s1 s2  IEditorDescriptor getLabel IEditorDescriptor getLabel
Constructs a new instance of code Open With Menu code p If this method is used be sure to set the selected file by invoking code set File code The file input is required when the user selects an item in the menu At that point the menu will attempt to open an editor with the file as its input p param page the page where the editor is opened if an item within the menu is selected public Open With Menu I Workbench Page page this page null  OpenWithMenu setFile OpenWithMenu IWorkbenchPage
Constructs a new instance of code Open With Menu code param page the page where the editor is opened if an item within the menu is selected param file the selected file public Open With Menu I Workbench Page page I Adaptable file super ID this page page this file file  OpenWithMenu OpenWithMenu IWorkbenchPage IAdaptable
Returns an image to show for the corresponding editor descriptor param editor Desc the editor descriptor or null for the system editor return the image or null private Image get Image I Editor Descriptor editor Desc Image Descriptor image Desc get Image Descriptor editor Desc if image Desc null return null Image image Image image Cache get image Desc if image null image image Desc create Image image Cache put image Desc image return image  editorDesc getImage IEditorDescriptor editorDesc ImageDescriptor imageDesc getImageDescriptor editorDesc imageDesc imageCache imageDesc imageDesc createImage imageCache imageDesc
Returns the image descriptor for the given editor descriptor or null if it has no image private Image Descriptor get Image Descriptor I Editor Descriptor editor Desc Image Descriptor image Desc null if editor Desc null image Desc registry get Image Descriptor get File Resource get Name else image Desc editor Desc get Image Descriptor if image Desc null if editor Desc get Id equals I Editor Registry SYSTEM EXTERNAL EDITOR ID image Desc registry get System External Editor Image Descriptor get File Resource get Name return image Desc  ImageDescriptor getImageDescriptor IEditorDescriptor editorDesc ImageDescriptor imageDesc editorDesc imageDesc getImageDescriptor getFileResource getName imageDesc editorDesc getImageDescriptor imageDesc editorDesc getId IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID imageDesc getSystemExternalEditorImageDescriptor getFileResource getName imageDesc
Listener listener new Listener public void handle Event Event event switch event type case SWT Selection if menu Item get Selection open Editor descriptor break  handleEvent menuItem getSelection openEditor
Creates the menu item for the editor descriptor param menu the menu to add the item to param descriptor the editor descriptor or null for the system editor param preferred Editor the descriptor of the preferred editor or code null code private void create Menu Item Menu menu final I Editor Descriptor descriptor final I Editor Descriptor preferred Editor XXX Would be better to use bold here but SWT does not support it final Menu Item menu Item new Menu Item menu SWT RADIO boolean is Preferred preferred Editor null descriptor get Id equals preferred Editor get Id menu Item set Selection is Preferred menu Item set Text descriptor get Label Image image get Image descriptor if image null menu Item set Image image Listener listener new Listener public void handle Event Event event switch event type case SWT Selection if menu Item get Selection open Editor descriptor break menu Item add Listener SWT Selection listener  preferredEditor createMenuItem IEditorDescriptor IEditorDescriptor preferredEditor MenuItem menuItem MenuItem isPreferred preferredEditor getId preferredEditor getId menuItem setSelection isPreferred menuItem setText getLabel getImage menuItem setImage handleEvent menuItem getSelection openEditor menuItem addListener
public void fill Menu menu int index I File file get File Resource if file null return I Editor Descriptor default Editor registry find Editor IDE Workbench Plugin DEFAULT TEXT EDITOR ID may be null I Editor Descriptor preferred Editor IDE get Default Editor file may be null Object editors registry get Editors file get Name Collections sort Arrays as List editors comparer boolean default Found false Check that we don t add it twice This is possible if the same editor goes to two mappings Array List already Mapped new Array List for int i 0 i editors length i I Editor Descriptor editor I Editor Descriptor editors i if already Mapped contains editor create Menu Item menu editor preferred Editor if default Editor null editor get Id equals default Editor get Id default Found true already Mapped add editor Only add a separator if there is something to separate if editors length 0 new Menu Item menu SWT SEPARATOR Add default editor Check it if it is saved as the preference if default Found default Editor null create Menu Item menu default Editor preferred Editor Add system editor should never be null I Editor Descriptor descriptor registry find Editor I Editor Registry SYSTEM EXTERNAL EDITOR ID create Menu Item menu descriptor preferred Editor Add system in place editor can be null descriptor registry find Editor I Editor Registry SYSTEM INPLACE EDITOR ID if descriptor null create Menu Item menu descriptor preferred Editor create Default Menu Item menu file  IFile getFileResource IEditorDescriptor defaultEditor findEditor IDEWorkbenchPlugin DEFAULT_TEXT_EDITOR_ID IEditorDescriptor preferredEditor getDefaultEditor getEditors getName asList defaultFound ArrayList alreadyMapped ArrayList IEditorDescriptor IEditorDescriptor alreadyMapped createMenuItem preferredEditor defaultEditor getId defaultEditor getId defaultFound alreadyMapped MenuItem defaultFound defaultEditor createMenuItem defaultEditor preferredEditor IEditorDescriptor findEditor IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID createMenuItem preferredEditor findEditor IEditorRegistry SYSTEM_INPLACE_EDITOR_ID createMenuItem preferredEditor createDefaultMenuItem
Converts the I Adaptable file to I File or null private I File get File Resource if this file instanceof I File return I File this file else I Resource resource I Resource this file get Adapter I Resource class if resource instanceof I File return I File resource return null  IAdaptable IFile IFile getFileResource IFile IFile IResource IResource getAdapter IResource IFile IFile
Returns whether this menu is dynamic public boolean is Dynamic return true  isDynamic
Opens the given editor on the selected file param editor the editor descriptor or null for the system editor private void open Editor I Editor Descriptor editor I File file get File Resource if file null return try String editor Id editor null I Editor Registry SYSTEM EXTERNAL EDITOR ID editor get Id page open Editor new File Editor Input file editor Id only remember the default editor if the open succeeds IDE set Default Editor file editor Id catch Part Init Exception e Dialog Util open Error page get Workbench Window get Shell IDE Workbench Messages get String Open With Menu dialog Title NON NLS 1 e get Message e  openEditor IEditorDescriptor IFile getFileResource editorId IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID getId openEditor FileEditorInput editorId setDefaultEditor editorId PartInitException DialogUtil openError getWorkbenchWindow getShell IDEWorkbenchMessages getString OpenWithMenu dialogTitle getMessage
Listener listener new Listener public void handle Event Event event switch event type case SWT Selection if menu Item get Selection IDE set Default Editor file null try IDE open Editor page file true catch Part Init Exception e Dialog Util open Error page get Workbench Window get Shell IDE Workbench Messages get String Open With Menu dialog Title NON NLS 1 e get Message e break  handleEvent menuItem getSelection setDefaultEditor openEditor PartInitException DialogUtil openError getWorkbenchWindow getShell IDEWorkbenchMessages getString OpenWithMenu dialogTitle getMessage
Creates the menu item for clearing the current selection param menu the menu to add the item to param file the file bing edited param registry the editor registry private void create Default Menu Item Menu menu final I File file final Menu Item menu Item new Menu Item menu SWT RADIO menu Item set Selection IDE get Default Editor file null menu Item set Text IDE Workbench Messages get String Default Editor Description name NON NLS 1 Listener listener new Listener public void handle Event Event event switch event type case SWT Selection if menu Item get Selection IDE set Default Editor file null try IDE open Editor page file true catch Part Init Exception e Dialog Util open Error page get Workbench Window get Shell IDE Workbench Messages get String Open With Menu dialog Title NON NLS 1 e get Message e break menu Item add Listener SWT Selection listener  createDefaultMenuItem IFile MenuItem menuItem MenuItem menuItem setSelection getDefaultEditor menuItem setText IDEWorkbenchMessages getString DefaultEditorDescription handleEvent menuItem getSelection setDefaultEditor openEditor PartInitException DialogUtil openError getWorkbenchWindow getShell IDEWorkbenchMessages getString OpenWithMenu dialogTitle getMessage menuItem addListener

private I Workbench Part active Part Creates a new action with the given text param text the action s text or code null code if there is no text protected Part Event Action String text super text  IWorkbenchPart activePart PartEventAction
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 since 3 0 protected Part Event Action String text int style super text style  AS_PUSH_BUTTON AS_CHECK_BOX AS_DROP_DOWN_MENU AS_RADIO_BUTTON AS_UNSPECIFIED PartEventAction
Returns the currently active part in the workbench return currently active part in the workbench or code null code if none public I Workbench Part get Active Part return active Part  IWorkbenchPart getActivePart activePart
The code Part Event Action code implementation of this code I Part Listener code method records that the given part is active Subclasses may extend this method if action availability has to be recalculated public void part Activated I Workbench Part part active Part part  PartEventAction IPartListener partActivated IWorkbenchPart activePart
The code Part Event Action code implementation of this code I Part Listener code method does nothing Subclasses should extend this method if action availability has to be recalculated public void part Brought To Top I Workbench Part part do nothing  PartEventAction IPartListener partBroughtToTop IWorkbenchPart
The code Part Event Action code implementation of this code I Part Listener code method clears the active part if it just closed Subclasses may extend this method if action availability has to be recalculated public void part Closed I Workbench Part part if part active Part active Part null  PartEventAction IPartListener partClosed IWorkbenchPart activePart activePart
The code Part Event Action code implementation of this code I Part Listener code method records that there is no active part Subclasses may extend this method if action availability has to be recalculated public void part Deactivated I Workbench Part part active Part null  PartEventAction IPartListener partDeactivated IWorkbenchPart activePart
The code Part Event Action code implementation of this code I Part Listener code method does nothing Subclasses should extend this method if action availability has to be recalculated public void part Opened I Workbench Part part do nothing  PartEventAction IPartListener partOpened IWorkbenchPart

private boolean dirty true private I Menu Listener menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager manager mark Dirty dirty true  IMenuListener menuListener IMenuListener menuAboutToShow IMenuManager markDirty
public int compare Object ob1 Object ob2 I Perspective Descriptor d1 I Perspective Descriptor ob1 I Perspective Descriptor d2 I Perspective Descriptor ob2 return collator compare d1 get Label d2 get Label  IPerspectiveDescriptor IPerspectiveDescriptor IPerspectiveDescriptor IPerspectiveDescriptor getLabel getLabel
Constructs a new instance of code Perspective Menu code param window the window containing this menu param id the menu id public Perspective Menu I Workbench Window window String id super id this window window if reg null reg PlatformUI get Workbench get Perspective Registry  PerspectiveMenu PerspectiveMenu IWorkbenchWindow getWorkbench getPerspectiveRegistry
package void create Menu Item Menu menu int index final I Perspective Descriptor desc boolean b Check Menu Item mi new Menu Item menu b Check SWT RADIO SWT PUSH index mi set Text desc get Label Image image get Image desc if image null mi set Image image mi set Selection b Check mi add Selection Listener new Selection Adapter public void widget Selected Selection Event e run desc e Workbench Help set Help mi I Help Context Ids OPEN PERSPECTIVE ACTION  createMenuItem IPerspectiveDescriptor bCheck MenuItem MenuItem bCheck setText getLabel getImage setImage setSelection bCheck addSelectionListener SelectionAdapter widgetSelected SelectionEvent WorkbenchHelp setHelp IHelpContextIds OPEN_PERSPECTIVE_ACTION
package void create Other Item Menu menu int index Menu Item mi new Menu Item menu SWT PUSH index mi set Text Workbench Messages get String Perspective Menu other Item NON NLS 1 mi add Selection Listener new Selection Adapter public void widget Selected Selection Event e run Other e Workbench Help set Help mi I Help Context Ids OPEN PERSPECTIVE OTHER ACTION  createOtherItem MenuItem MenuItem setText WorkbenchMessages getString PerspectiveMenu otherItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent runOther WorkbenchHelp setHelp IHelpContextIds OPEN_PERSPECTIVE_OTHER_ACTION
public void fill Menu menu int index if get Parent instanceof Menu Manager Menu Manager get Parent add Menu Listener menu Listener if dirty return String checkID null if show Active I Workbench Page active Page window get Active Page if active Page null active Page get Perspective null checkID active Page get Perspective get Id Collect and sort perspective items Array List persps get Perspective Items Collections sort persps comparator Add perspective shortcut for int i 0 i persps size i I Perspective Descriptor desc I Perspective Descriptor persps get i create Menu Item menu index desc desc get Id equals checkID Add others item if persps size 0 new Menu Item menu SWT SEPARATOR index create Other Item menu index dirty false  getParent MenuManager MenuManager getParent addMenuListener menuListener showActive IWorkbenchPage activePage getActivePage activePage activePage getPerspective activePage getPerspective getId ArrayList getPerspectiveItems IPerspectiveDescriptor IPerspectiveDescriptor createMenuItem getId MenuItem createOtherItem
Returns an image to show for the corresponding perspective descriptor param persp Desc the perspective descriptor return the image or null private Image get Image I Perspective Descriptor persp Desc Image Descriptor image Desc persp Desc get Image Descriptor if image Desc null image Desc Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL DEF PERSPECTIVE HOVER if image Desc null return null Image image Image image Cache get image Desc if image null image image Desc create Image image Cache put image Desc image return image  perspDesc getImage IPerspectiveDescriptor perspDesc ImageDescriptor imageDesc perspDesc getImageDescriptor imageDesc imageDesc WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_DEF_PERSPECTIVE_HOVER imageDesc imageCache imageDesc imageDesc createImage imageCache imageDesc
private Array List get Perspective Shortcuts Array List list new Array List I Workbench Page page window get Active Page if page null return list Array List ids Workbench Page page get Perspective Action Ids if ids null return list for int i 0 i ids size i String perspID String ids get i I Perspective Descriptor desc reg find Perspective With Id perspID if desc null list contains desc if Workbench Activity Helper filter Item desc continue list add desc return list  ArrayList getPerspectiveShortcuts ArrayList ArrayList IWorkbenchPage getActivePage ArrayList WorkbenchPage getPerspectiveActionIds IPerspectiveDescriptor findPerspectiveWithId WorkbenchActivityHelper filterItem
Returns the available list of perspectives to display in the menu p By default the list contains the perspective shortcuts for the current perspective p p Subclasses can override this method to return a different list p return an code Array List code of perspective items code I Perspective Descriptor code protected Array List get Perspective Items Allow the user to see all the perspectives they have selected via Customize Perspective Bugzilla bug 23445 Array List shortcuts get Perspective Shortcuts Array List list new Array List shortcuts size Add perspective shortcuts from the active perspective int size shortcuts size for int i 0 i size i if list contains shortcuts get i list add shortcuts get i return list  ArrayList IPerspectiveDescriptor ArrayList getPerspectiveItems ArrayList getPerspectiveShortcuts ArrayList ArrayList
Returns whether the menu item representing the active perspective will have a check mark return code true code if a check mark is shown code false code otherwise protected boolean get Show Active return show Active  getShowActive showActive
Returns the window for this menu return the window protected I Workbench Window get Window return window  IWorkbenchWindow getWindow
Returns whether this menu is dynamic public boolean is Dirty return dirty  isDirty
Returns whether this menu is dynamic public boolean is Dynamic return true  isDynamic
Runs an action for a particular perspective The behavior of the action is defined by the subclass param desc the selected perspective 
Runs an action for a particular perspective The behavior of the action is defined by the subclass param desc the selected perspective param event Selection Event the event send along with the selection callback protected void run I Perspective Descriptor desc Selection Event event Do a run without the event by default run desc  SelectionEvent IPerspectiveDescriptor SelectionEvent
void run Other Selection Event event Select Perspective Dialog dlg new Select Perspective Dialog window get Shell reg dlg open if dlg get Return Code Window CANCEL return I Perspective Descriptor desc dlg get Selection if desc null run desc event  runOther SelectionEvent SelectPerspectiveDialog SelectPerspectiveDialog getShell getReturnCode IPerspectiveDescriptor getSelection
Sets the show Active flag If code show Active true code then the active perspective is hilighted with a check mark param b the new show Active flag protected void show Active boolean b show Active b  showActive showActive showActive showActive showActive

Create an instance of this class p This consructor added to support calling the action from the welcome page p public Quick Start Action this PlatformUI get Workbench get Active Workbench Window  QuickStartAction getWorkbench getActiveWorkbenchWindow
Creates an instance of this action for use in the given window public Quick Start Action I Workbench Window window super IDE Workbench Messages get String Quick Start text NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window set Tool Tip Text IDE Workbench Messages get String Quick Start tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids QUICK START ACTION set Action Definition Id org eclipse ui help quick Start Action NON NLS 1  QuickStartAction IWorkbenchWindow IDEWorkbenchMessages getString QuickStart IllegalArgumentException workbenchWindow setToolTipText IDEWorkbenchMessages getString QuickStart toolTip WorkbenchHelp setHelp IHelpContextIds QUICK_START_ACTION setActionDefinitionId quickStartAction
The user has invoked this action Prompts for a feature with a welcome page then opens the corresponding welcome page public void run if workbench Window null action has been disposed return try About Info feature prompt For Feature if feature null open Welcome Page feature catch Workbench Exception e Error Dialog open Error workbench Window get Shell IDE Workbench Messages get String Quick Start Action error Dialog Title NON NLS 1 IDE Workbench Messages get String Quick Start Action info Read Error NON NLS 1 e get Status  workbenchWindow AboutInfo promptForFeature openWelcomePage WorkbenchException ErrorDialog openError workbenchWindow getShell IDEWorkbenchMessages getString QuickStartAction errorDialogTitle IDEWorkbenchMessages getString QuickStartAction infoReadError getStatus
Prompts the user for a feature that has a welcome page return the chosen feature or code null code if none was chosen private About Info prompt For Feature throws Workbench Exception Ask the user to select a feature Array List welcome Features new Array List URL product Url null I Product product Platform get Product if product null product Url Product Properties get Welcome Page Url product welcome Features add new About Info product About Info features IDE Workbench Plugin get Default get Feature Infos for int i 0 i features length i URL url features i get Welcome PageURL if url null url equals product Url welcome Features add features i Shell shell workbench Window get Shell if welcome Features size 0 Message Dialog open Information shell IDE Workbench Messages get String Quick Start Message Dialog title NON NLS 1 IDE Workbench Messages get String Quick Start Message Dialog message NON NLS 1 return null features new About Info welcome Features size welcome Features to Array features Feature Selection Dialog d new Feature Selection Dialog shell features product null null product get Id IDE Workbench Messages get String Welcome Page Selection Dialog title NON NLS 1 IDE Workbench Messages get String Welcome Page Selection Dialog message NON NLS 1 I Help Context Ids WELCOME PAGE SELECTION DIALOG if d open Window OK d get Result length 1 return null return About Info d get Result 0  AboutInfo promptForFeature WorkbenchException ArrayList welcomeFeatures ArrayList productUrl IProduct getProduct productUrl ProductProperties getWelcomePageUrl welcomeFeatures AboutInfo AboutInfo IDEWorkbenchPlugin getDefault getFeatureInfos getWelcomePageURL productUrl welcomeFeatures workbenchWindow getShell welcomeFeatures MessageDialog openInformation IDEWorkbenchMessages getString QuickStartMessageDialog IDEWorkbenchMessages getString QuickStartMessageDialog AboutInfo welcomeFeatures welcomeFeatures toArray FeatureSelectionDialog FeatureSelectionDialog getId IDEWorkbenchMessages getString WelcomePageSelectionDialog IDEWorkbenchMessages getString WelcomePageSelectionDialog IHelpContextIds WELCOME_PAGE_SELECTION_DIALOG getResult AboutInfo getResult
Opens the welcome page for the given feature param feature Id the about info for the feature return code true code if successful code false code otherwise public boolean open Welcome Page String feature Id throws Workbench Exception About Info feature find Feature feature Id if feature null feature get Welcome PageURL null return false return open Welcome Page feature  featureId openWelcomePage featureId WorkbenchException AboutInfo findFeature featureId getWelcomePageURL openWelcomePage
Returns the about info for the feature with the given id or code null code if there is no such feature return the about info for the feature with the given id or code null code if there is no such feature private About Info find Feature String feature Id throws Workbench Exception About Info features IDE Workbench Plugin get Default get Feature Infos for int i 0 i features length i About Info info features i if info get Feature Id equals feature Id return info return null  AboutInfo findFeature featureId WorkbenchException AboutInfo IDEWorkbenchPlugin getDefault getFeatureInfos AboutInfo getFeatureId featureId
Opens the welcome page for a feature param feature the about info for the feature return code true code if successful code false code otherwise private boolean open Welcome Page About Info feature I Workbench Page page null See if the feature wants a specific perspective String perspective Id feature get Welcome Perspective Id if perspective Id null Just use the current perspective unless one is not open in which case use the default page workbench Window get Active Page if page null page get Perspective null perspective Id PlatformUI get Workbench get Perspective Registry get Default Perspective if perspective Id null try page PlatformUI get Workbench show Perspective perspective Id workbench Window catch Workbench Exception e IDE Workbench Plugin log Error opening perspective perspective Id e get Status NON NLS 1 return false page set Editor Area Visible true create input Welcome Editor Input input new Welcome Editor Input feature see if we already have a welcome editorz I Editor Part editor page find Editor input if editor null page activate editor return true try page open Editor input EDITOR ID catch Part Init Exception e IDE Workbench Plugin log Error opening welcome editor for feature feature get Feature Id NON NLS 1 I Status status new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH 1 IDE Workbench Messages get String Quick Start Action open Editor Exception e NON NLS 1 Error Dialog open Error workbench Window get Shell IDE Workbench Messages get String Workbench open Editor Error Dialog Title NON NLS 1 IDE Workbench Messages get String Workbench open Editor Error Dialog Message NON NLS 1 status return false return true  openWelcomePage AboutInfo IWorkbenchPage perspectiveId getWelcomePerspectiveId perspectiveId workbenchWindow getActivePage getPerspective perspectiveId getWorkbench getPerspectiveRegistry getDefaultPerspective perspectiveId getWorkbench showPerspective perspectiveId workbenchWindow WorkbenchException IDEWorkbenchPlugin perspectiveId getStatus setEditorAreaVisible WelcomeEditorInput WelcomeEditorInput IEditorPart findEditor openEditor EDITOR_ID PartInitException IDEWorkbenchPlugin getFeatureId IStatus IStatus IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchMessages getString QuickStartAction openEditorException ErrorDialog openError workbenchWindow getShell IDEWorkbenchMessages getString openEditorErrorDialogTitle IDEWorkbenchMessages getString openEditorErrorDialogMessage
public void dispose if workbench Window null action has already been disposed return workbench Window null  workbenchWindow workbenchWindow

Create a new checker that parents the dialog off of parent using the supplied title and message param parent the shell used for dialogs param title the title for dialogs param message the message for a dialog this will be prefaced with the name of the resource public Read Only State Checker Shell parent String title String message this shell parent this title Message title this main Message message  ReadOnlyStateChecker titleMessage mainMessage
Check an individual resource to see if it passed the read only query If it is a file just add it otherwise it is a container and the children need to be checked too Return true if all items are selected and false if any are skipped private boolean check Accepted Resource I Resource resource To Check List selected Children throws Core Exception if resource To Check get Type I Resource FILE selected Children add resource To Check else Now check below int child Check check Read Only Resources I Container resource To Check members selected Children Add in the resource only if nothing was left out if child Check I Dialog Constants YES TO ALL ID selected Children add resource To Check else Something was left out return false return false return true  checkAcceptedResource IResource resourceToCheck selectedChildren CoreException resourceToCheck getType IResource selectedChildren resourceToCheck childCheck checkReadOnlyResources IContainer resourceToCheck selectedChildren childCheck IDialogConstants YES_TO_ALL_ID selectedChildren resourceToCheck
shell get Display sync Exec new Runnable public void run Error Dialog open Error shell READ ONLY EXCEPTION MESSAGE null exception get Status  getDisplay syncExec ErrorDialog openError READ_ONLY_EXCEPTION_MESSAGE getStatus
Check the supplied resources to see if they are read only If so then prompt the user to see if they can be deleted Return those that were accepted return the resulting selected resources package public I Resource check Read Only Resources I Resource items To Check List selections new Array List int result I Dialog Constants CANCEL ID try result check Read Only Resources items To Check selections catch final Core Exception exception shell get Display sync Exec new Runnable public void run Error Dialog open Error shell READ ONLY EXCEPTION MESSAGE null exception get Status if result I Dialog Constants CANCEL ID return new I Resource 0 All were selected so return the original items if result I Dialog Constants YES TO ALL ID return items To Check I Resource return Value new I Resource selections size selections to Array return Value return return Value  IResource checkReadOnlyResources IResource itemsToCheck ArrayList IDialogConstants CANCEL_ID checkReadOnlyResources itemsToCheck CoreException getDisplay syncExec ErrorDialog openError READ_ONLY_EXCEPTION_MESSAGE getStatus IDialogConstants CANCEL_ID IResource IDialogConstants YES_TO_ALL_ID itemsToCheck IResource returnValue IResource toArray returnValue returnValue
Check the children of the container to see if they are read only return int one of YES TO ALL ID all elements were selected NO ID No was hit at some point CANCEL ID cancel was hit param items To Check I Resource param all Selected the List of currently selected resources to add to private int check Read Only Resources I Resource items To Check List all Selected throws Core Exception Shortcut If the user has already selected yes to all then just return it if yes To All Selected return I Dialog Constants YES TO ALL ID boolean none Skipped true List selected Children new Array List for int i 0 i items To Check length i I Resource resource To Check items To Check i if yes To All Selected resource To Check is Read Only int action query Yes To All No Cancel resource To Check if action I Dialog Constants YES ID boolean child Result check Accepted Resource resource To Check selected Children if child Result none Skipped false if action I Dialog Constants NO ID none Skipped false if action I Dialog Constants CANCEL ID cancel Selected true return I Dialog Constants CANCEL ID if action I Dialog Constants YES TO ALL ID yes To All Selected true selected Children add resource To Check else boolean child Result check Accepted Resource resource To Check selected Children if cancel Selected return I Dialog Constants CANCEL ID if child Result none Skipped false if none Skipped return I Dialog Constants YES TO ALL ID else all Selected add All selected Children return I Dialog Constants NO ID  YES_TO_ALL_ID NO_ID CANCEL_ID itemsToCheck IResource allSelected checkReadOnlyResources IResource itemsToCheck allSelected CoreException yesToAllSelected IDialogConstants YES_TO_ALL_ID noneSkipped selectedChildren ArrayList itemsToCheck IResource resourceToCheck itemsToCheck yesToAllSelected resourceToCheck isReadOnly queryYesToAllNoCancel resourceToCheck IDialogConstants YES_ID childResult checkAcceptedResource resourceToCheck selectedChildren childResult noneSkipped IDialogConstants NO_ID noneSkipped IDialogConstants CANCEL_ID cancelSelected IDialogConstants CANCEL_ID IDialogConstants YES_TO_ALL_ID yesToAllSelected selectedChildren resourceToCheck childResult checkAcceptedResource resourceToCheck selectedChildren cancelSelected IDialogConstants CANCEL_ID childResult noneSkipped noneSkipped IDialogConstants YES_TO_ALL_ID allSelected addAll selectedChildren IDialogConstants NO_ID
0 shell get Display sync Exec new Runnable public void run dialog open  getDisplay syncExec
Open a message dialog with Yes No Yes To All and Cancel buttons Return the code that indicates the selection return int one of YES TO ALL ID YES ID NO ID CANCEL ID param resource the resource being queried private int query Yes To All No Cancel I Resource resource final Message Dialog dialog new Message Dialog this shell this title Message null Message Format format this main Message new Object resource get Name Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants YES TO ALL LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL 0 shell get Display sync Exec new Runnable public void run dialog open int result dialog get Return Code if result 0 return I Dialog Constants YES ID if result 1 return I Dialog Constants YES TO ALL ID if result 2 return I Dialog Constants NO ID return I Dialog Constants CANCEL ID  YES_TO_ALL_ID YES_ID NO_ID CANCEL_ID queryYesToAllNoCancel IResource MessageDialog MessageDialog titleMessage MessageFormat mainMessage getName MessageDialog IDialogConstants YES_LABEL IDialogConstants YES_TO_ALL_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL getDisplay syncExec getReturnCode IDialogConstants YES_ID IDialogConstants YES_TO_ALL_ID IDialogConstants NO_ID IDialogConstants CANCEL_ID

public static final String ID PlatformUI PLUGIN ID Refresh Action NON NLS 1 Creates a new action param shell the shell for any dialogs public Refresh Action Shell shell super shell IDE Workbench Messages get String Refresh Action text NON NLS 1 set Tool Tip Text IDE Workbench Messages get String Refresh Action tool Tip NON NLS 1 set Id ID Workbench Help set Help this I Help Context Ids REFRESH ACTION  PLUGIN_ID RefreshAction RefreshAction IDEWorkbenchMessages getString RefreshAction setToolTipText IDEWorkbenchMessages getString RefreshAction toolTip setId WorkbenchHelp setHelp IHelpContextIds REFRESH_ACTION
Must prompt user in UI thread we re in the operation thread here get Shell get Display sync Exec new Runnable public void run dialog open  getShell getDisplay syncExec
Checks whether the given project s location has been deleted If so prompts the user with whether to delete the project or not void check Location Deleted I Project project throws Core Exception if project exists return File location project get Location to File if location exists String message IDE Workbench Messages format Refresh Action location Deleted Message new Object project get Name location get Absolute Path NON NLS 1 final Message Dialog dialog new Message Dialog get Shell IDE Workbench Messages get String Refresh Action dialog Title dialog title NON NLS 1 null use default window icon message Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL 0 yes is the default Must prompt user in UI thread we re in the operation thread here get Shell get Display sync Exec new Runnable public void run dialog open Do the deletion back in the operation thread if dialog get Return Code 0 yes was chosen project delete true true null  checkLocationDeleted IProject CoreException getLocation toFile IDEWorkbenchMessages RefreshAction locationDeletedMessage getName getAbsolutePath MessageDialog MessageDialog getShell IDEWorkbenchMessages getString RefreshAction dialogTitle MessageDialog IDialogConstants YES_LABEL IDialogConstants NO_LABEL getShell getDisplay syncExec getReturnCode
Method declared on Workspace Action String get Operation Message return IDE Workbench Messages get String Refresh Action progress Message NON NLS 1  WorkspaceAction getOperationMessage IDEWorkbenchMessages getString RefreshAction progressMessage
Method declared on Workspace Action String get Problems Message return IDE Workbench Messages get String Refresh Action problem Message NON NLS 1  WorkspaceAction getProblemsMessage IDEWorkbenchMessages getString RefreshAction problemMessage
Method declared on Workspace Action String get Problems Title return IDE Workbench Messages get String Refresh Action problem Title NON NLS 1  WorkspaceAction getProblemsTitle IDEWorkbenchMessages getString RefreshAction problemTitle
Returns a list containing the workspace root if the selection would otherwise be empty protected List get Selected Resources List resources super get Selected Resources if resources is Empty resources new Array List resources add Resources Plugin get Workspace get Root return resources  getSelectedResources getSelectedResources isEmpty ArrayList ResourcesPlugin getWorkspace getRoot
void invoke Operation I Resource resource I Progress Monitor monitor throws Core Exception Check if project s location has been deleted as per 1G83UCE ITPUI WINNT Refresh from local doesn t detect new or deleted projects and also for bug report 18283 if resource get Type I Resource PROJECT check Location Deleted I Project resource else if resource get Type I Resource ROOT I Project projects I Workspace Root resource get Projects for int i 0 i projects length i check Location Deleted projects i resource refresh Local I Resource DEPTH INFINITE monitor  invokeOperation IResource IProgressMonitor CoreException getType IResource checkLocationDeleted IProject getType IResource IProject IWorkspaceRoot getProjects checkLocationDeleted refreshLocal IResource DEPTH_INFINITE
The code Refresh Action code implementation of this code Selection Listener Action code method ensures that this action is enabled if the selection is empty but is disabled if any of the selected elements are not resources protected boolean update Selection I Structured Selection s return super update Selection s s is Empty get Selected Non Resources size 0  RefreshAction SelectionListenerAction updateSelection IStructuredSelection updateSelection isEmpty getSelectedNonResources
Handle the key release public void handle Key Released Key Event event if event key Code SWT F5 event state Mask 0 refresh All  handleKeyReleased KeyEvent keyCode stateMask refreshAll
Refreshes the entire workspace public void refresh All I Structured Selection current Selection get Structured Selection selection Changed Structured Selection EMPTY run selection Changed current Selection  refreshAll IStructuredSelection currentSelection getStructuredSelection selectionChanged StructuredSelection selectionChanged currentSelection

private static String RENAMING MESSAGE IDE Workbench Messages get String Rename Resource Action progress Message NON NLS 1 Creates a new action Using this constructor directly will rename using a dialog rather than the inline editor of a Resource Navigator param shell the shell for any dialogs public Rename Resource Action Shell shell super shell IDE Workbench Messages get String Rename Resource Action text NON NLS 1 set Tool Tip Text IDE Workbench Messages get String Rename Resource Action tool Tip NON NLS 1 set Id ID Workbench Help set Help this I Help Context Ids RENAME RESOURCE ACTION  RENAMING_MESSAGE IDEWorkbenchMessages getString RenameResourceAction progressMessage ResourceNavigator RenameResourceAction IDEWorkbenchMessages getString RenameResourceAction setToolTipText IDEWorkbenchMessages getString RenameResourceAction toolTip setId WorkbenchHelp setHelp IHelpContextIds RENAME_RESOURCE_ACTION
Creates a new action param shell the shell for any dialogs public Rename Resource Action Shell shell Tree tree this shell this navigator Tree tree this tree Editor new Tree Editor tree  RenameResourceAction navigatorTree treeEditor TreeEditor
Check if the user wishes to overwrite the supplied resource returns true if there is no collision or delete was successful param shell the shell to create the dialog in param destination the resource to be overwritten private boolean check Overwrite final Shell shell final I Resource destination final boolean result new boolean 1 Run it inside of a runnable to make sure we get to parent off of the shell as we are not in the UI thread Runnable query new Runnable public void run String path Name destination get Full Path make Relative to String result 0 Message Dialog open Question shell RESOURCE EXISTS TITLE Message Format format RESOURCE EXISTS MESSAGE new Object path Name shell get Display sync Exec query return result 0  checkOverwrite IResource pathName getFullPath makeRelative toString MessageDialog openQuestion RESOURCE_EXISTS_TITLE MessageFormat RESOURCE_EXISTS_MESSAGE pathName getDisplay syncExec
Check if the supplied resource is read only or null If it is then ask the user if they want to continue Return true if the resource is not read only or if the user has given permission return boolean private boolean check Read Only And Null I Resource current Resource Do a quick read only and null check if current Resource null return false Do a quick read only check if current Resource is Read Only return Message Dialog open Question get Shell CHECK RENAME TITLE Message Format format CHECK RENAME MESSAGE new Object current Resource get Name else return true  checkReadOnlyAndNull IResource currentResource currentResource currentResource isReadOnly MessageDialog openQuestion getShell CHECK_RENAME_TITLE MessageFormat CHECK_RENAME_MESSAGE currentResource getName
Composite create Parent Tree tree get Tree Composite result new Composite tree SWT NONE Tree Item selected Items tree get Selection tree Editor horizontal Alignment SWT LEFT tree Editor grab Horizontal true tree Editor set Editor result selected Items 0 return result  createParent getTree TreeItem selectedItems getSelection treeEditor horizontalAlignment treeEditor grabHorizontal treeEditor setEditor selectedItems
On Mac the text widget already provides a border when it has focus so there is no need to draw another one The value of returned by this method is usd to control the inset we apply to the text field bound s in order to get space for drawing a border A value of 1 means a one pixel wide border around the text field A negative value supresses the border However in M9 the system property org eclipse swt internal carbon no Focus Ring has been introduced as a temporary workaround for bug 28842 The existence of the property turns the native focus ring off if the widget is contained in a main window not dialog The check for the property should be removed after a final fix for 28842 has been provided private static int get Cell Editor Inset Control c if carbon equals SWT get Platform special case for MacOS X NON NLS 1 if System get Property org eclipse swt internal carbon no Focus Ring null c get Shell get Parent null NON NLS 1 return 2 native border return 1 one pixel wide black border  noFocusRing getCellEditorInset getPlatform getProperty noFocusRing getShell getParent
text Editor Parent add Listener SWT Paint new Listener public void handle Event Event e Point text Size text Editor get Size Point parent Size text Editor Parent get Size e gc draw Rectangle 0 0 Math min text Size x 4 parent Size x 1 parent Size y 1  textEditorParent addListener handleEvent textSize textEditor getSize parentSize textEditorParent getSize drawRectangle textSize parentSize parentSize
text Editor add Listener SWT Modify new Listener public void handle Event Event e Point text Size text Editor compute Size SWT DEFAULT SWT DEFAULT text Size x text Size y Add extra space for new characters Point parent Size text Editor Parent get Size text Editor set Bounds 2 inset Math min text Size x parent Size x 4 parent Size y 2 inset text Editor Parent redraw  textEditor addListener handleEvent textSize textEditor computeSize textSize textSize parentSize textEditorParent getSize textEditor setBounds textSize parentSize parentSize textEditorParent
text Editor add Listener SWT Traverse new Listener public void handle Event Event event Workaround for Bug 20214 due to extra traverse events switch event detail case SWT TRAVERSE ESCAPE Do nothing in this case dispose Text Widget event doit true event detail SWT TRAVERSE NONE break case SWT TRAVERSE RETURN save Changes And Dispose resource event doit true event detail SWT TRAVERSE NONE break  textEditor addListener handleEvent TRAVERSE_ESCAPE disposeTextWidget TRAVERSE_NONE TRAVERSE_RETURN saveChangesAndDispose TRAVERSE_NONE
text Editor add Focus Listener new Focus Adapter public void focus Lost Focus Event fe save Changes And Dispose resource  textEditor addFocusListener FocusAdapter focusLost FocusEvent saveChangesAndDispose
Create the text editor widget param resource the resource to rename private void create Text Editor final I Resource resource Create text editor parent This draws a nice bounding rect text Editor Parent create Parent text Editor Parent set Visible false final int inset get Cell Editor Inset text Editor Parent if inset 0 only register for paint events if we have a border text Editor Parent add Listener SWT Paint new Listener public void handle Event Event e Point text Size text Editor get Size Point parent Size text Editor Parent get Size e gc draw Rectangle 0 0 Math min text Size x 4 parent Size x 1 parent Size y 1 Create inner text editor text Editor new Text text Editor Parent SWT NONE text Editor set Font navigator Tree get Font text Editor Parent set Background text Editor get Background text Editor add Listener SWT Modify new Listener public void handle Event Event e Point text Size text Editor compute Size SWT DEFAULT SWT DEFAULT text Size x text Size y Add extra space for new characters Point parent Size text Editor Parent get Size text Editor set Bounds 2 inset Math min text Size x parent Size x 4 parent Size y 2 inset text Editor Parent redraw text Editor add Listener SWT Traverse new Listener public void handle Event Event event Workaround for Bug 20214 due to extra traverse events switch event detail case SWT TRAVERSE ESCAPE Do nothing in this case dispose Text Widget event doit true event detail SWT TRAVERSE NONE break case SWT TRAVERSE RETURN save Changes And Dispose resource event doit true event detail SWT TRAVERSE NONE break text Editor add Focus Listener new Focus Adapter public void focus Lost Focus Event fe save Changes And Dispose resource if text Action Handler null text Action Handler add Text text Editor  createTextEditor IResource textEditorParent createParent textEditorParent setVisible getCellEditorInset textEditorParent textEditorParent addListener handleEvent textSize textEditor getSize parentSize textEditorParent getSize drawRectangle textSize parentSize parentSize textEditor textEditorParent textEditor setFont navigatorTree getFont textEditorParent setBackground textEditor getBackground textEditor addListener handleEvent textSize textEditor computeSize textSize textSize parentSize textEditorParent getSize textEditor setBounds textSize parentSize parentSize textEditorParent textEditor addListener handleEvent TRAVERSE_ESCAPE disposeTextWidget TRAVERSE_NONE TRAVERSE_RETURN saveChangesAndDispose TRAVERSE_NONE textEditor addFocusListener FocusAdapter focusLost FocusEvent saveChangesAndDispose textActionHandler textActionHandler addText textEditor
Close the text widget and reset the editor Text field private void dispose Text Widget if text Action Handler null text Action Handler remove Text text Editor if text Editor Parent null text Editor Parent dispose text Editor Parent null text Editor null tree Editor set Editor null null  editorText disposeTextWidget textActionHandler textActionHandler removeText textEditor textEditorParent textEditorParent textEditorParent textEditor treeEditor setEditor
Returns the elements that the action is to be performed on Return the resource cached by the action as we cannot rely on the selection being correct for inlined text return list of resource elements element type code I Resource code protected List get Action Resources if inlined Resource null return super get Action Resources List action Resources new Array List action Resources add inlined Resource return action Resources  IResource getActionResources inlinedResource getActionResources actionResources ArrayList actionResources inlinedResource actionResources
Method declared on Workspace Action String get Operation Message return IDE Workbench Messages get String Rename Resource Action progress NON NLS 1  WorkspaceAction getOperationMessage IDEWorkbenchMessages getString RenameResourceAction
Method declared on Workspace Action String get Problems Message return IDE Workbench Messages get String Rename Resource Action problem Message NON NLS 1  WorkspaceAction getProblemsMessage IDEWorkbenchMessages getString RenameResourceAction problemMessage
Method declared on Workspace Action String get Problems Title return IDE Workbench Messages get String Rename Resource Action problem Title NON NLS 1  WorkspaceAction getProblemsTitle IDEWorkbenchMessages getString RenameResourceAction problemTitle
Get the Tree being edited return Tree private Tree get Tree return this navigator Tree  returnTree getTree navigatorTree
void invoke Operation I Resource resource I Progress Monitor monitor throws Core Exception monitor begin Task RENAMING MESSAGE 100 I Workspace Root workspace Root resource get Workspace get Root I Resource new Resource workspace Root find Member new Path if new Resource null if check Overwrite get Shell new Resource if resource get Type I Resource FILE new Resource get Type I Resource FILE I File file I File resource I File new File I File new Resource if validate Edit file new File get Shell I Progress Monitor sub Monitor new Sub Progress Monitor monitor 50 new File set Contents file get Contents I Resource KEEP HISTORY sub Monitor file delete I Resource KEEP HISTORY sub Monitor monitor worked 100 return else new Resource delete I Resource KEEP HISTORY new Sub Progress Monitor monitor 50 else monitor worked 100 return if resource get Type I Resource PROJECT I Project project I Project resource I Project Description description project get Description description set Name new Path segment 0 project move description I Resource FORCE I Resource SHALLOW monitor else resource move new Path I Resource KEEP HISTORY I Resource SHALLOW new Sub Progress Monitor monitor 50  invokeOperation IResource IProgressMonitor CoreException beginTask RENAMING_MESSAGE IWorkspaceRoot workspaceRoot getWorkspace getRoot IResource newResource workspaceRoot findMember newPath newResource checkOverwrite getShell newResource getType IResource newResource getType IResource IFile IFile IFile newFile IFile newResource validateEdit newFile getShell IProgressMonitor subMonitor SubProgressMonitor newFile setContents getContents IResource KEEP_HISTORY subMonitor IResource KEEP_HISTORY subMonitor newResource IResource KEEP_HISTORY SubProgressMonitor getType IResource IProject IProject IProjectDescription getDescription setName newPath IResource IResource newPath IResource KEEP_HISTORY IResource SubProgressMonitor
I Input Validator validator new I Input Validator public String is Valid String string if resource get Name equals string return IDE Workbench Messages get String Rename Resource Action name Must Be Different NON NLS 1 I Status status workspace validate Name string resource get Type if status isOK return status get Message if workspace get Root exists prefix append string return IDE Workbench Messages get String Rename Resource Action name Exists NON NLS 1 return null  IInputValidator IInputValidator isValid getName IDEWorkbenchMessages getString RenameResourceAction nameMustBeDifferent IStatus validateName getType getMessage getRoot IDEWorkbenchMessages getString RenameResourceAction nameExists
Return the new name to be given to the target resource return java lang String param resource the resource to query status on protected String query New Resource Name final I Resource resource final I Workspace workspace IDE Workbench Plugin get Plugin Workspace final I Path prefix resource get Full Path remove Last Segments 1 I Input Validator validator new I Input Validator public String is Valid String string if resource get Name equals string return IDE Workbench Messages get String Rename Resource Action name Must Be Different NON NLS 1 I Status status workspace validate Name string resource get Type if status isOK return status get Message if workspace get Root exists prefix append string return IDE Workbench Messages get String Rename Resource Action name Exists NON NLS 1 return null Input Dialog dialog new Input Dialog get Shell IDE Workbench Messages get String Rename Resource Action input Dialog Title NON NLS 1 IDE Workbench Messages get String Rename Resource Action input Dialog Message NON NLS 1 resource get Name validator dialog set Block On Open true dialog open return dialog get Value  queryNewResourceName IResource IWorkspace IDEWorkbenchPlugin getPluginWorkspace IPath getFullPath removeLastSegments IInputValidator IInputValidator isValid getName IDEWorkbenchMessages getString RenameResourceAction nameMustBeDifferent IStatus validateName getType getMessage getRoot IDEWorkbenchMessages getString RenameResourceAction nameExists InputDialog InputDialog getShell IDEWorkbenchMessages getString RenameResourceAction inputDialogTitle IDEWorkbenchMessages getString RenameResourceAction inputDialogMessage getName setBlockOnOpen getValue
Return the new name to be given to the target resource or code null code if the query was canceled Rename the currently selected resource using the table editor Continue the action when the user is done return java lang String param resource the resource to rename private void query New Resource Name Inline final I Resource resource Make sure text editor is created only once Simply reset text editor when action is executed more than once Fixes bug 22269 if text Editor Parent null create Text Editor resource text Editor set Text resource get Name Open text editor with initial size text Editor Parent set Visible true Point text Size text Editor compute Size SWT DEFAULT SWT DEFAULT text Size x text Size y Add extra space for new characters Point parent Size text Editor Parent get Size int inset get Cell Editor Inset text Editor Parent text Editor set Bounds 2 inset Math min text Size x parent Size x 4 parent Size y 2 inset text Editor Parent redraw text Editor select All text Editor set Focus  queryNewResourceNameInline IResource textEditorParent createTextEditor textEditor setText getName textEditorParent setVisible textSize textEditor computeSize textSize textSize parentSize textEditorParent getSize getCellEditorInset textEditorParent textEditor setBounds textSize parentSize parentSize textEditorParent textEditor selectAll textEditor setFocus
public void run if this navigator Tree null List resources get Selected Resources if resources size 0 return I Resource current Resource I Resource resources get 0 if current Resource exists return Do a quick read only and null check if check Read Only And Null current Resource return String new Name query New Resource Name current Resource if new Name null new Name equals NON NLS 1 return new Path current Resource get Full Path remove Last Segments 1 append new Name super run else run With Inline Editor  navigatorTree getSelectedResources IResource currentResource IResource currentResource checkReadOnlyAndNull currentResource newName queryNewResourceName currentResource newName newName newPath currentResource getFullPath removeLastSegments newName runWithInlineEditor
private void run With Inline Editor I Resource current Resource I Resource get Structured Selection get First Element if check Read Only And Null current Resource return query New Resource Name Inline current Resource  runWithInlineEditor IResource currentResource IResource getStructuredSelection getFirstElement checkReadOnlyAndNull currentResource queryNewResourceNameInline currentResource
Run the action to completion using the supplied path protected void run With New Path I Path path I Resource resource this new Path path super run  runWithNewPath IPath IResource newPath
Runnable query new Runnable public void run try if new Name equals inlined Resource get Name I Workspace workspace IDE Workbench Plugin get Plugin Workspace I Status status workspace validate Name new Name inlined Resource get Type if status isOK display Error status get Message else I Path new Path inlined Resource get Full Path remove Last Segments 1 append new Name run With New Path new Path inlined Resource inlined Resource null Dispose the text widget regardless dispose Text Widget Ensure the Navigator tree has focus which it may not if the text widget previously had focus if navigator Tree null navigator Tree is Disposed navigator Tree set Focus finally saving false  newName inlinedResource getName IWorkspace IDEWorkbenchPlugin getPluginWorkspace IStatus validateName newName inlinedResource getType displayError getMessage IPath newPath inlinedResource getFullPath removeLastSegments newName runWithNewPath newPath inlinedResource inlinedResource disposeTextWidget navigatorTree navigatorTree isDisposed navigatorTree setFocus
Save the changes and dispose of the text widget param resource the resource to move private void save Changes And Dispose I Resource resource if saving true return saving true Cache the resource to avoid selection loss since a selection of another item can trigger this method inlined Resource resource final String new Name text Editor get Text Run this in an async to make sure that the operation that triggered this action is completed Otherwise this leads to problems when the icon of the item being renamed is clicked i e which causes the rename text widget to lose focus and trigger this method Runnable query new Runnable public void run try if new Name equals inlined Resource get Name I Workspace workspace IDE Workbench Plugin get Plugin Workspace I Status status workspace validate Name new Name inlined Resource get Type if status isOK display Error status get Message else I Path new Path inlined Resource get Full Path remove Last Segments 1 append new Name run With New Path new Path inlined Resource inlined Resource null Dispose the text widget regardless dispose Text Widget Ensure the Navigator tree has focus which it may not if the text widget previously had focus if navigator Tree null navigator Tree is Disposed navigator Tree set Focus finally saving false get Tree get Shell get Display async Exec query  saveChangesAndDispose IResource inlinedResource newName textEditor getText newName inlinedResource getName IWorkspace IDEWorkbenchPlugin getPluginWorkspace IStatus validateName newName inlinedResource getType displayError getMessage IPath newPath inlinedResource getFullPath removeLastSegments newName runWithNewPath newPath inlinedResource inlinedResource disposeTextWidget navigatorTree navigatorTree isDisposed navigatorTree setFocus getTree getShell getDisplay asyncExec
The code Rename Resource Action code implementation of this code Selection Listener Action code method ensures that this action is disabled if any of the selections are not resources or resources that are not local protected boolean update Selection I Structured Selection selection dispose Text Widget if selection size 1 return false if super update Selection selection return false List resources get Selected Resources if resources size 1 return false I Resource current Resource I Resource resources get 0 if current Resource exists return false return true  RenameResourceAction SelectionListenerAction updateSelection IStructuredSelection disposeTextWidget updateSelection getSelectedResources IResource currentResource IResource currentResource
return true public void set Text Action Handler Text Action Handler action Handler text Action Handler action Handler  setTextActionHandler TextActionHandler actionHandler textActionHandler actionHandler
Validates the destination file if it is read only and additionally the source file if both are read only Returns true if both files could be made writeable param source source file param destination destination file param shell ui context for the validation return boolean code true code both files could be made writeable code false code either one or both files were not made writeable boolean validate Edit I File source I File destination Shell shell if destination is Read Only I Workspace workspace Resources Plugin get Workspace I Status status if source is Read Only status workspace validate Edit new I File source destination shell else status workspace validate Edit new I File destination shell return status isOK return true  validateEdit IFile IFile isReadOnly IWorkspace ResourcesPlugin getWorkspace IStatus isReadOnly validateEdit IFile validateEdit IFile

private I Action handler private I Property Change Listener property Change Listener new I Property Change Listener public void property Change Property Change Event event Retarget Action this propagate Change event  IAction IPropertyChangeListener propertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent RetargetAction propagateChange
Constructs a Retarget Action with the given action id and text param actionID the retargetable action id param text the action s text or code null code if there is no text public Retarget Action String actionID String text this actionID text I Action AS UNSPECIFIED  RetargetAction RetargetAction IAction AS_UNSPECIFIED
super set Help Listener new Help Listener public void help Requested Help Event e Help Listener listener null if handler null if we have a handler see if it has a help listener listener handler get Help Listener if listener null use our own help listener listener local Help Listener if listener null pass on the event listener help Requested e  setHelpListener HelpListener helpRequested HelpEvent HelpListener getHelpListener localHelpListener helpRequested
Constructs a Retarget Action with the given action id text and style param actionID the retargetable action id 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 since 3 0 public Retarget Action String actionID String text int style super text style set Id actionID set Enabled false super set Help Listener new Help Listener public void help Requested Help Event e Help Listener listener null if handler null if we have a handler see if it has a help listener listener handler get Help Listener if listener null use our own help listener listener local Help Listener if listener null pass on the event listener help Requested e  RetargetAction AS_PUSH_BUTTON AS_CHECK_BOX AS_DROP_DOWN_MENU AS_RADIO_BUTTON AS_UNSPECIFIED RetargetAction setId setEnabled setHelpListener HelpListener helpRequested HelpEvent HelpListener getHelpListener localHelpListener helpRequested
Disposes of the action and any resources held public void dispose if handler null handler remove Property Change Listener property Change Listener handler null  removePropertyChangeListener propertyChangeListener
Enables the accelerator for this action param b the new enable state public void enable Accelerator boolean b enable Accelerator b  enableAccelerator enableAccelerator
public int get Accelerator if enable Accelerator return super get Accelerator else return 0  getAccelerator enableAccelerator getAccelerator
A workbench part has been activated Try to connect to it param part the workbench part that has been activated public void part Activated I Workbench Part part super part Activated part I Workbench Part Site site part get Site Sub Action Bars bars Sub Action Bars Part Site site get Action Bars bars add Property Change Listener property Change Listener set Action Handler bars get Global Action Handler get Id  partActivated IWorkbenchPart partActivated IWorkbenchPartSite getSite SubActionBars SubActionBars PartSite getActionBars addPropertyChangeListener propertyChangeListener setActionHandler getGlobalActionHandler getId
A workbench part has been closed param part the workbench part that has been closed public void part Closed I Workbench Part part I Workbench Part active Part part get Site get Page get Active Part if active Part null We are going to get a part activated message so don t bother setting the action handler to null This prevents enablement flash in the toolbar return if part get Active Part set Action Handler null super part Closed part  partClosed IWorkbenchPart IWorkbenchPart activePart getSite getPage getActivePart activePart getActivePart setActionHandler partClosed
A workbench part has been deactivated Disconnect from it param part the workbench part that has been deactivated public void part Deactivated I Workbench Part part super part Deactivated part I Workbench Part Site site part get Site Sub Action Bars bars Sub Action Bars Part Site site get Action Bars bars remove Property Change Listener property Change Listener I Workbench Part active Part part get Site get Page get Active Part if active Part null We are going to get a part activated message so don t bother setting the action handler to null This prevents enablement flash in the toolbar return set Action Handler null  partDeactivated IWorkbenchPart partDeactivated IWorkbenchPartSite getSite SubActionBars SubActionBars PartSite getActionBars removePropertyChangeListener propertyChangeListener IWorkbenchPart activePart getSite getPage getActivePart activePart setActionHandler
Either the action handler itself has changed or the configured action handlers on the action bars have changed Update self protected void propagate Change Property Change Event event if event get Property equals Action ENABLED Boolean bool Boolean event get New Value set Enabled bool boolean Value else if event get Property equals Action CHECKED Boolean bool Boolean event get New Value set Checked bool boolean Value else if event get Property equals Sub Action Bars P ACTION HANDLERS set Action Handler I Action Bars event get Source get Global Action Handler get Id  propagateChange PropertyChangeEvent getProperty getNewValue setEnabled booleanValue getProperty getNewValue setChecked booleanValue getProperty SubActionBars P_ACTION_HANDLERS setActionHandler IActionBars getSource getGlobalActionHandler getId
Invoked when an action occurs public void run if handler null handler run 
Invoked when an action occurs public void run With Event Event event if handler null handler run With Event event  runWithEvent runWithEvent
Returns the action handler This method was made public in 3 0 return The current action handling this retargettable action This handler will be code null code if there is no current handler public I Action get Action Handler return handler  IAction getActionHandler
Sets the action handler protected void set Action Handler I Action new Handler Optimize if new Handler handler return Clear old action if handler null handler remove Property Change Listener property Change Listener handler null Set new action handler new Handler if handler null set Enabled false if get Style AS CHECK BOX get Style AS RADIO BUTTON set Checked false else set Enabled handler is Enabled if get Style AS CHECK BOX get Style AS RADIO BUTTON set Checked handler is Checked handler add Property Change Listener property Change Listener  setActionHandler IAction newHandler newHandler removePropertyChangeListener propertyChangeListener newHandler setEnabled getStyle AS_CHECK_BOX getStyle AS_RADIO_BUTTON setChecked setEnabled isEnabled getStyle AS_CHECK_BOX getStyle AS_RADIO_BUTTON setChecked isChecked addPropertyChangeListener propertyChangeListener
public void set Checked boolean checked super set Checked checked This call may come from the SWT control event handler itself so notify the handler action to keep things in sync if handler null handler set Checked checked  setChecked setChecked setChecked
The code Retarget Action code implementation of this method declared on code I Action code stores the help listener in a local field The supplied listener is only used if there is no hanlder public void set Help Listener Help Listener listener local Help Listener listener  RetargetAction IAction setHelpListener HelpListener localHelpListener

public static final String ID org eclipse ui Scrub Local Action NON NLS 1 Creates a new action param shell the shell for any dialogs public Scrub Local Action Shell shell super shell IDE Workbench Messages get String Scrub Local Action text NON NLS 1 set Tool Tip Text IDE Workbench Messages get String Scrub Local Action tool Tip NON NLS 1 set Id ID Workbench Help set Help this I Help Context Ids SCRUB LOCAL ACTION  ScrubLocalAction ScrubLocalAction IDEWorkbenchMessages getString ScrubLocalAction setToolTipText IDEWorkbenchMessages getString ScrubLocalAction toolTip setId WorkbenchHelp setHelp IHelpContextIds SCRUB_LOCAL_ACTION
Method declared on Workspace Action String get Operation Message return IDE Workbench Messages get String Scrub Local Action progress NON NLS 1  WorkspaceAction getOperationMessage IDEWorkbenchMessages getString ScrubLocalAction
Method declared on Workspace Action String get Problems Message return IDE Workbench Messages get String Scrub Local Action problems Message NON NLS 1  WorkspaceAction getProblemsMessage IDEWorkbenchMessages getString ScrubLocalAction problemsMessage
Method declared on Workspace Action String get Problems Title return IDE Workbench Messages get String Scrub Local Action problems Title NON NLS 1  WorkspaceAction getProblemsTitle IDEWorkbenchMessages getString ScrubLocalAction problemsTitle
Method declared on Workspace Action void invoke Operation I Resource resource I Progress Monitor monitor throws Core Exception resource set Local false I Resource DEPTH INFINITE monitor  WorkspaceAction invokeOperation IResource IProgressMonitor CoreException setLocal IResource DEPTH_INFINITE
The code Scrub Local Action code implementation of this code Selection Listener Action code method ensures that this action is disabled if any of the selections are not resources protected boolean update Selection I Structured Selection s return super update Selection s get Selected Non Resources size 0  ScrubLocalAction SelectionListenerAction updateSelection IStructuredSelection updateSelection getSelectedNonResources

Creates a new action with the given text param text the string used as the text for the action or code null code if there is no text protected Selection Listener Action String text super text  SelectionListenerAction
The code Selection Listener Action code implementation of this code Base Selection Listener Action code method clears the cached resources and non resources protected void clear Cache selection Dirty true clear out the lists in case compute Resources does not get called immediately resources null non Resources null  SelectionListenerAction BaseSelectionListenerAction clearCache selectionDirty computeResources nonResources
Extracts code I Resource code s from the current selection and adds them to the resources list and the rest into the non resources list private final void compute Resources resources null non Resources null for Iterator e get Structured Selection iterator e has Next Object next e next if next instanceof I Resource if resources null assume selection contains mostly resources most times resources new Array List get Structured Selection size resources add next continue if next instanceof I Adaptable Object resource I Adaptable next get Adapter I Resource class if resource null if resources null assume selection contains mostly resources most times resources new Array List get Structured Selection size resources add resource continue if non Resources null assume selection contains mostly resources most times non Resources new Array List 1 non Resources add next  IResource computeResources nonResources getStructuredSelection hasNext IResource ArrayList getStructuredSelection IAdaptable IAdaptable getAdapter IResource ArrayList getStructuredSelection nonResources nonResources ArrayList nonResources
Returns the elements in the current selection that are not code I Resource code s return list of elements element type code Object code protected List get Selected Non Resources recompute if selection has changed if selection Dirty compute Resources selection Dirty false if non Resources null return EMPTY LIST else return non Resources  IResource getSelectedNonResources selectionDirty computeResources selectionDirty nonResources EMPTY_LIST nonResources
Returns the elements in the current selection that are code I Resource code s return list of resource elements element type code I Resource code protected List get Selected Resources recompute if selection has changed if selection Dirty compute Resources selection Dirty false if resources null return EMPTY LIST else return resources  IResource IResource getSelectedResources selectionDirty computeResources selectionDirty EMPTY_LIST
Returns whether the type of the given resource is among those in the given resource type mask param resource the resource param resource Mask a bitwise OR of resource types code I Resource code code FILE code code FOLDER code code PROJECT code code ROOT code return code true code if the resource type matches and code false code otherwise see I Resource protected boolean resource Is Type I Resource resource int resource Mask return resource get Type resource Mask 0  resourceMask IResource IResource resourceIsType IResource resourceMask getType resourceMask
Returns whether the current selection consists entirely of resources whose types are among those in the given resource type mask param resource Mask a bitwise OR of resource types code I Resource code code FILE code code FOLDER code code PROJECT code code ROOT code return code true code if all resources in the current selection are of the specified types or if the current selection is empty and code false code if some elements are resources of a different type or not resources see I Resource protected boolean selection Is Of Type int resource Mask if get Selected Non Resources size 0 return false for Iterator e get Selected Resources iterator e has Next I Resource next I Resource e next if resource Is Type next resource Mask return false return true  resourceMask IResource IResource selectionIsOfType resourceMask getSelectedNonResources getSelectedResources hasNext IResource IResource resourceIsType resourceMask

private I Selection Provider provider Creates a new action with the given text that monitors selection changes within the given selection provider The resulting action is added as a listener on the selection provider param provider the selection provider that will provide selection notification param text the string used as the text for the action or code null code if there is no text protected Selection Provider Action I Selection Provider provider String text super text this provider provider provider add Selection Changed Listener this  ISelectionProvider SelectionProviderAction ISelectionProvider addSelectionChangedListener
Disposes this action by removing it as a listener from the selection provider This must be called by the creator of the action when the action is no longer needed public void dispose provider remove Selection Changed Listener this  removeSelectionChangedListener
Returns the current selection in the selection provider return the current selection in the selection provider public I Selection get Selection return provider get Selection  ISelection getSelection getSelection
Returns the selection provider that is the target of this action return the target selection provider of this action public I Selection Provider get Selection Provider return provider  ISelectionProvider getSelectionProvider
Returns the current structured selection in the selection provider or an empty selection if nothing is selected or if selection does not include objects for example raw text return the current structured selection in the selection provider public I Structured Selection get Structured Selection I Selection selection provider get Selection if selection instanceof I Structured Selection return I Structured Selection selection else return new Structured Selection  IStructuredSelection getStructuredSelection ISelection getSelection IStructuredSelection IStructuredSelection StructuredSelection
Notifies this action that the given non structured selection has changed in the selection provider p The code Selection Provider Action code implementation of this method does nothing Subclasses may reimplement to react to this selection change p param selection the new selection public void selection Changed I Selection selection  SelectionProviderAction selectionChanged ISelection
Notifies this action that the given structured selection has changed in the selection provider p The code Selection Provider Action code implementation of this method does nothing Subclasses may reimplement to react to this selection change p param selection the new selection public void selection Changed I Structured Selection selection Hook in subclass  SelectionProviderAction selectionChanged IStructuredSelection
The code Selection Provider Action code implementation of this code I Selection Changed Listener code method calls code selection Changed I Structured Selection code if the selection is a structured selection but code selection Changed I Selection code if it is not Subclasses should override either of those methods method to react to selection changes public final void selection Changed Selection Changed Event event I Selection selection event get Selection if selection instanceof I Structured Selection selection Changed I Structured Selection selection else selection Changed selection  SelectionProviderAction ISelectionChangedListener selectionChanged IStructuredSelection selectionChanged ISelection selectionChanged SelectionChangedEvent ISelection getSelection IStructuredSelection selectionChanged IStructuredSelection selectionChanged

public final class Simple Wildcard Tester Returns whether a string matches a particular pattern param pattern the input pattern param str the string to test return code true code if a match occurs code false code otherwise public static boolean test Wildcard String pattern String str if pattern equals NON NLS 1 return true else if pattern starts With NON NLS 1 if pattern ends With NON NLS 1 if pattern length 2 return true return str index Of pattern substring 1 pattern length 1 0 return str ends With pattern substring 1 else if pattern ends With NON NLS 1 return str starts With pattern substring 0 pattern length 1 else return str equals pattern  SimpleWildcardTester testWildcard startsWith endsWith indexOf endsWith endsWith startsWith
Returns whether a string matches a particular pattern Both string and pattern are converted to lower case before pattern matching occurs param pattern the input pattern param str the string to test return code true code if a match occurs code false code otherwise public static boolean test Wildcard Ignore Case String pattern String str If str is null there was no extension to test if str null return false pattern pattern to Lower Case str str to Lower Case return test Wildcard pattern str  testWildcardIgnoreCase toLowerCase toLowerCase testWildcard

private Mouse Adapter mouse Adapter new Mouse Adapter public void mouse Up Mouse Event e update Actions Enable State  MouseAdapter mouseAdapter MouseAdapter mouseUp MouseEvent updateActionsEnableState
private Key Adapter key Adapter new Key Adapter public void key Released Key Event e update Actions Enable State  KeyAdapter keyAdapter KeyAdapter keyReleased KeyEvent updateActionsEnableState
private class Text Control Listener implements Listener public void handle Event Event event switch event type case SWT Activate active Text Control Text event widget update Actions Enable State break case SWT Deactivate active Text Control null update Actions Enable State break default break  TextControlListener handleEvent activeTextControl updateActionsEnableState activeTextControl updateActionsEnableState
private class Property Change Listener implements I Property Change Listener private I Action action Handler protected Property Change Listener I Action action Handler super this action Handler action Handler  PropertyChangeListener IPropertyChangeListener IAction actionHandler PropertyChangeListener IAction actionHandler actionHandler actionHandler
public void property Change Property Change Event event if active Text Control null return if event get Property equals I Action ENABLED Boolean bool Boolean event get New Value action Handler set Enabled bool boolean Value  propertyChange PropertyChangeEvent activeTextControl getProperty IAction getNewValue actionHandler setEnabled booleanValue
private class Delete Action Handler extends Action protected Delete Action Handler super IDE Workbench Messages get String Delete NON NLS 1 set Id Text Delete Action Handler NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids TEXT DELETE ACTION  DeleteActionHandler DeleteActionHandler IDEWorkbenchMessages getString setId TextDeleteActionHandler setEnabled WorkbenchHelp setHelp IHelpContextIds TEXT_DELETE_ACTION
public void run With Event Event event if active Text Control null active Text Control is Disposed active Text Control clear Selection return if delete Action null delete Action run With Event event return  runWithEvent activeTextControl activeTextControl isDisposed activeTextControl clearSelection deleteAction deleteAction runWithEvent
public void update Enabled State if active Text Control null active Text Control is Disposed set Enabled active Text Control get Selection Count 0 active Text Control get Caret Position active Text Control get Char Count return if delete Action null set Enabled delete Action is Enabled return set Enabled false  updateEnabledState activeTextControl activeTextControl isDisposed setEnabled activeTextControl getSelectionCount activeTextControl getCaretPosition activeTextControl getCharCount deleteAction setEnabled deleteAction isEnabled setEnabled
private class Cut Action Handler extends Action protected Cut Action Handler super IDE Workbench Messages get String Cut NON NLS 1 set Id Text Cut Action Handler NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids TEXT CUT ACTION  CutActionHandler CutActionHandler IDEWorkbenchMessages getString setId TextCutActionHandler setEnabled WorkbenchHelp setHelp IHelpContextIds TEXT_CUT_ACTION
public void run With Event Event event if active Text Control null active Text Control is Disposed active Text Control cut return if cut Action null cut Action run With Event event return  runWithEvent activeTextControl activeTextControl isDisposed activeTextControl cutAction cutAction runWithEvent
public void update Enabled State if active Text Control null active Text Control is Disposed set Enabled active Text Control get Selection Count 0 return if cut Action null set Enabled cut Action is Enabled return set Enabled false  updateEnabledState activeTextControl activeTextControl isDisposed setEnabled activeTextControl getSelectionCount cutAction setEnabled cutAction isEnabled setEnabled
private class Copy Action Handler extends Action protected Copy Action Handler super IDE Workbench Messages get String Copy NON NLS 1 set Id Text Copy Action Handler NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids TEXT COPY ACTION  CopyActionHandler CopyActionHandler IDEWorkbenchMessages getString setId TextCopyActionHandler setEnabled WorkbenchHelp setHelp IHelpContextIds TEXT_COPY_ACTION
public void run With Event Event event if active Text Control null active Text Control is Disposed active Text Control copy return if copy Action null copy Action run With Event event return  runWithEvent activeTextControl activeTextControl isDisposed activeTextControl copyAction copyAction runWithEvent
public void update Enabled State if active Text Control null active Text Control is Disposed set Enabled active Text Control get Selection Count 0 return if copy Action null set Enabled copy Action is Enabled return set Enabled false  updateEnabledState activeTextControl activeTextControl isDisposed setEnabled activeTextControl getSelectionCount copyAction setEnabled copyAction isEnabled setEnabled
private class Paste Action Handler extends Action protected Paste Action Handler super IDE Workbench Messages get String Paste NON NLS 1 set Id Text Paste Action Handler NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids TEXT PASTE ACTION  PasteActionHandler PasteActionHandler IDEWorkbenchMessages getString setId TextPasteActionHandler setEnabled WorkbenchHelp setHelp IHelpContextIds TEXT_PASTE_ACTION
public void run With Event Event event if active Text Control null active Text Control is Disposed active Text Control paste return if paste Action null paste Action run With Event event return  runWithEvent activeTextControl activeTextControl isDisposed activeTextControl pasteAction pasteAction runWithEvent
public void update Enabled State if active Text Control null active Text Control is Disposed set Enabled true return if paste Action null set Enabled paste Action is Enabled return set Enabled false  updateEnabledState activeTextControl activeTextControl isDisposed setEnabled pasteAction setEnabled pasteAction isEnabled setEnabled
private class Select All Action Handler extends Action protected Select All Action Handler super IDE Workbench Messages get String Text Action select All NON NLS 1 set Id Text Select All Action Handler NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids TEXT SELECT ALL ACTION  SelectAllActionHandler SelectAllActionHandler IDEWorkbenchMessages getString TextAction selectAll setId TextSelectAllActionHandler setEnabled WorkbenchHelp setHelp IHelpContextIds TEXT_SELECT_ALL_ACTION
public void run With Event Event event if active Text Control null active Text Control is Disposed active Text Control select All return if select All Action null select All Action run With Event event return  runWithEvent activeTextControl activeTextControl isDisposed activeTextControl selectAll selectAllAction selectAllAction runWithEvent
public void update Enabled State if active Text Control null active Text Control is Disposed set Enabled true return if select All Action null set Enabled select All Action is Enabled return set Enabled false  updateEnabledState activeTextControl activeTextControl isDisposed setEnabled selectAllAction setEnabled selectAllAction isEnabled setEnabled
Creates a code Text code control action handler for the global Cut Copy Paste Delete and Select All of the action bar param action Bar the action bar to register global action handlers for Cut Copy Paste Delete and Select All public Text Action Handler I Action Bars action Bar super action Bar set Global Action Handler Action Factory CUT get Id text Cut Action action Bar set Global Action Handler Action Factory COPY get Id text Copy Action action Bar set Global Action Handler Action Factory PASTE get Id text Paste Action action Bar set Global Action Handler Action Factory SELECT ALL get Id text Select All Action action Bar set Global Action Handler Action Factory DELETE get Id text Delete Action  actionBar TextActionHandler IActionBars actionBar actionBar setGlobalActionHandler ActionFactory getId textCutAction actionBar setGlobalActionHandler ActionFactory getId textCopyAction actionBar setGlobalActionHandler ActionFactory getId textPasteAction actionBar setGlobalActionHandler ActionFactory SELECT_ALL getId textSelectAllAction actionBar setGlobalActionHandler ActionFactory getId textDeleteAction
Add a code Text code control to the handler so that the Cut Copy Paste Delete and Select All actions are redirected to it when active param text Control the inline code Text code control public void add Text Text text Control if text Control null return active Text Control text Control text Control add Listener SWT Activate text Control Listener text Control add Listener SWT Deactivate text Control Listener We really want a selection listener but it is not supported so we use a key listener and a mouse listener to know when selection changes may have occured text Control add Key Listener key Adapter text Control add Mouse Listener mouse Adapter  textControl addText textControl textControl activeTextControl textControl textControl addListener textControlListener textControl addListener textControlListener textControl addKeyListener keyAdapter textControl addMouseListener mouseAdapter
Dispose of this action handler public void dispose set Cut Action null set Copy Action null set Paste Action null set Select All Action null set Delete Action null  setCutAction setCopyAction setPasteAction setSelectAllAction setDeleteAction
Removes a code Text code control from the handler so that the Cut Copy Paste Delete and Select All actions are no longer redirected to it when active param text Control the inline code Text code control public void remove Text Text text Control if text Control null return text Control remove Listener SWT Activate text Control Listener text Control remove Listener SWT Deactivate text Control Listener text Control remove Mouse Listener mouse Adapter text Control remove Key Listener key Adapter active Text Control null update Actions Enable State  textControl removeText textControl textControl textControl removeListener textControlListener textControl removeListener textControlListener textControl removeMouseListener mouseAdapter textControl removeKeyListener keyAdapter activeTextControl updateActionsEnableState
Set the default code I Action code handler for the Copy action This code I Action code is run only if no active inline text control param action the code I Action code to run for the Copy action or code null null if not interested public void set Copy Action I Action action if copy Action action return if copy Action null copy Action remove Property Change Listener copy Action Listener copy Action action if copy Action null copy Action add Property Change Listener copy Action Listener text Copy Action update Enabled State  IAction IAction IAction setCopyAction IAction copyAction copyAction copyAction removePropertyChangeListener copyActionListener copyAction copyAction copyAction addPropertyChangeListener copyActionListener textCopyAction updateEnabledState
Set the default code I Action code handler for the Cut action This code I Action code is run only if no active inline text control param action the code I Action code to run for the Cut action or code null null if not interested public void set Cut Action I Action action if cut Action action return if cut Action null cut Action remove Property Change Listener cut Action Listener cut Action action if cut Action null cut Action add Property Change Listener cut Action Listener text Cut Action update Enabled State  IAction IAction IAction setCutAction IAction cutAction cutAction cutAction removePropertyChangeListener cutActionListener cutAction cutAction cutAction addPropertyChangeListener cutActionListener textCutAction updateEnabledState
Set the default code I Action code handler for the Paste action This code I Action code is run only if no active inline text control param action the code I Action code to run for the Paste action or code null null if not interested public void set Paste Action I Action action if paste Action action return if paste Action null paste Action remove Property Change Listener paste Action Listener paste Action action if paste Action null paste Action add Property Change Listener paste Action Listener text Paste Action update Enabled State  IAction IAction IAction setPasteAction IAction pasteAction pasteAction pasteAction removePropertyChangeListener pasteActionListener pasteAction pasteAction pasteAction addPropertyChangeListener pasteActionListener textPasteAction updateEnabledState
Set the default code I Action code handler for the Select All action This code I Action code is run only if no active inline text control param action the code I Action code to run for the Select All action or code null null if not interested public void set Select All Action I Action action if select All Action action return if select All Action null select All Action remove Property Change Listener select All Action Listener select All Action action if select All Action null select All Action add Property Change Listener select All Action Listener text Select All Action update Enabled State  IAction IAction IAction setSelectAllAction IAction selectAllAction selectAllAction selectAllAction removePropertyChangeListener selectAllActionListener selectAllAction selectAllAction selectAllAction addPropertyChangeListener selectAllActionListener textSelectAllAction updateEnabledState
Set the default code I Action code handler for the Delete action This code I Action code is run only if no active inline text control param action the code I Action code to run for the Delete action or code null null if not interested public void set Delete Action I Action action if delete Action action return if delete Action null delete Action remove Property Change Listener delete Action Listener delete Action action if delete Action null delete Action add Property Change Listener delete Action Listener text Delete Action update Enabled State  IAction IAction IAction setDeleteAction IAction deleteAction deleteAction deleteAction removePropertyChangeListener deleteActionListener deleteAction deleteAction deleteAction addPropertyChangeListener deleteActionListener textDeleteAction updateEnabledState
Update the enable state of the Cut Copy Paste Delete and Select All action handlers private void update Actions Enable State text Cut Action update Enabled State text Copy Action update Enabled State text Paste Action update Enabled State text Select All Action update Enabled State text Delete Action update Enabled State  updateActionsEnableState textCutAction updateEnabledState textCopyAction updateEnabledState textPasteAction updateEnabledState textSelectAllAction updateEnabledState textDeleteAction updateEnabledState

Creates a new instance of the receiver param shell shell to open dialogs and wizards on param working Set Updater property change listener notified when a working set is set public Working Set Filter Action Group Shell shell I Property Change Listener working Set Updater Assert is Not Null shell this working Set Updater working Set Updater clear Working Set Action new Clear Working Set Action this select Working Set Action new Select Working Set Action this shell edit Working Set Action new Edit Working Set Action this shell  workingSetUpdater WorkingSetFilterActionGroup IPropertyChangeListener workingSetUpdater isNotNull workingSetUpdater workingSetUpdater clearWorkingSetAction ClearWorkingSetAction selectWorkingSetAction SelectWorkingSetAction editWorkingSetAction EditWorkingSetAction
Adds actions for the most recently used working sets to the specified menu manager param menu Manager menu manager to add actions to private void add Mru Working Set Actions I Menu Manager menu Manager I Working Set working Sets PlatformUI get Workbench get Working Set Manager get Recent Working Sets List sorted Working Sets Arrays as List working Sets Collections sort sorted Working Sets new Working Set Comparator Iterator iter sorted Working Sets iterator mru Menu Count 0 while iter has Next I Working Set working Set I Working Set iter next if working Set null I Contribution Item item new Working Set Menu Contribution Item mru Menu Count this working Set menu Manager insert Before SEPARATOR ID item  menuManager addMruWorkingSetActions IMenuManager menuManager IWorkingSet workingSets getWorkbench getWorkingSetManager getRecentWorkingSets sortedWorkingSets asList workingSets sortedWorkingSets WorkingSetComparator sortedWorkingSets mruMenuCount hasNext IWorkingSet workingSet IWorkingSet workingSet IContributionItem WorkingSetMenuContributionItem mruMenuCount workingSet menuManager insertBefore SEPARATOR_ID
Removes the menu listener see Action Group dispose public void dispose if menu Manager null menu Manager remove Menu Listener menu Listener super dispose  ActionGroup menuManager menuManager removeMenuListener menuListener
menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager remove Previous Mru Working Set Actions manager add Mru Working Set Actions manager  menuListener IMenuListener menuAboutToShow IMenuManager removePreviousMruWorkingSetActions addMruWorkingSetActions
Adds working set actions to the specified action bar param action Bars action bar to add working set actions to see Action Group fill Action Bars I Action Bars public void fill Action Bars I Action Bars action Bars menu Manager action Bars get Menu Manager menu Manager add select Working Set Action menu Manager add clear Working Set Action menu Manager add edit Working Set Action menu Manager add new Separator menu Manager add new Separator SEPARATOR ID menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager remove Previous Mru Working Set Actions manager add Mru Working Set Actions manager menu Manager add Menu Listener menu Listener  actionBars ActionGroup fillActionBars IActionBars fillActionBars IActionBars actionBars menuManager actionBars getMenuManager menuManager selectWorkingSetAction menuManager clearWorkingSetAction menuManager editWorkingSetAction menuManager menuManager SEPARATOR_ID menuListener IMenuListener menuAboutToShow IMenuManager removePreviousMruWorkingSetActions addMruWorkingSetActions menuManager addMenuListener menuListener
Returns the working set which is currently selected return the working set which is currently selected public I Working Set get Working Set return working Set  IWorkingSet getWorkingSet workingSet
Removes the most recently used working set actions that were added to the specified menu param menu Manager menu manager to remove actions from private void remove Previous Mru Working Set Actions I Menu Manager menu Manager for int i 1 i mru Menu Count i menu Manager remove Working Set Menu Contribution Item get Id i  menuManager removePreviousMruWorkingSetActions IMenuManager menuManager mruMenuCount menuManager WorkingSetMenuContributionItem getId
Sets the current working set param new Working Set the new working set public void set Working Set I Working Set new Working Set I Working Set old Working Set working Set working Set new Working Set Update action clear Working Set Action set Enabled new Working Set null edit Working Set Action set Enabled new Working Set null Update viewer if working Set Updater null working Set Updater property Change new Property Change Event this Working Set Filter Action Group CHANGE WORKING SET old Working Set new Working Set  newWorkingSet setWorkingSet IWorkingSet newWorkingSet IWorkingSet oldWorkingSet workingSet workingSet newWorkingSet clearWorkingSetAction setEnabled newWorkingSet editWorkingSetAction setEnabled newWorkingSet workingSetUpdater workingSetUpdater propertyChange PropertyChangeEvent WorkingSetFilterActionGroup CHANGE_WORKING_SET oldWorkingSet newWorkingSet

private Shell shell Creates a new action with the given text param shell the shell for the modal progress dialog and error messages param text the string used as the text for the action or code null code if there is no text protected Workspace Action Shell shell String text super text if shell null throw new Illegal Argument Exception this shell shell  WorkspaceAction IllegalArgumentException
Opens an error dialog to display the given message p Note that this method must be called from UI thread p param message the message void display Error String message if message null message IDE Workbench Messages get String Workbench Action internal Error NON NLS 1 Message Dialog open Error shell get Problems Title message  displayError IDEWorkbenchMessages getString WorkbenchAction internalError MessageDialog openError getProblemsTitle
Runs code invoke Operation code on each of the selected resources reporting progress and fielding cancel requests from the given progress monitor param monitor a progress monitor final void execute I Progress Monitor monitor 1FTIMQN ITPCORE WIN clients required to do too much iteration work List resources get Action Resources if should Perform Resource Pruning resources prune Resources resources Iterator resources Enum resources iterator 1FV0B3Y ITPUI ALL sub progress monitors granularity issues monitor begin Task resources size 1000 NON NLS 1 Fix for bug 31768 Don t provide a task name in begin Task as it will be appended to each sub Task message Need to call set Task Name as its the only was to assure the task name is set in the monitor see bug 31824 monitor set Task Name get Operation Message try while resources Enum has Next I Resource resource I Resource resources Enum next try 1FV0B3Y ITPUI ALL sub progress monitors granularity issues invoke Operation resource new Sub Progress Monitor monitor 1000 catch Core Exception e record Error e if monitor is Canceled throw new Operation Canceled Exception finally monitor done  invokeOperation IProgressMonitor getActionResources shouldPerformResourcePruning pruneResources resourcesEnum beginTask beginTask subTask setTaskName setTaskName getOperationMessage resourcesEnum hasNext IResource IResource resourcesEnum invokeOperation SubProgressMonitor CoreException recordError isCanceled OperationCanceledException
Returns the string to display for this action s operation p Note that this hook method is invoked in a non UI thread p p Subclasses must implement this method p return the message 
abstract String get Operation Message Returns the string to display for this action s problems dialog p The code Workspace Action code implementation of this method returns a vague message localized counterpart of something like The following problems occurred Subclasses may reimplement to provide something more suited to the particular action p return the problems message String get Problems Message return IDE Workbench Messages get String Workbench Action problems Message NON NLS 1  getOperationMessage WorkspaceAction getProblemsMessage IDEWorkbenchMessages getString WorkbenchAction problemsMessage
Returns the title for this action s problems dialog p The code Workspace Action code implementation of this method returns a generic title localized counterpart of Problems Subclasses may reimplement to provide something more suited to the particular action p return the problems dialog title String get Problems Title return IDE Workbench Messages get String Workspace Action problems Title NON NLS 1  WorkspaceAction getProblemsTitle IDEWorkbenchMessages getString WorkspaceAction problemsTitle
Returns the shell for this action This shell is used for the modal progress and error dialogs return the shell Shell get Shell return shell  getShell
Performs this action s operation on each of the selected resources reporting progress to and fielding cancel requests from the given progress monitor p Note that this method is invoked in a non UI thread p p Subclasses must implement this method p param resource one of the selected resources param monitor a progress monitor exception Core Exception if the operation fails abstract void invoke Operation I Resource resource I Progress Monitor monitor  CoreException invokeOperation IResource IProgressMonitor
throws Core Exception Returns whether the given resource is accessible where files and folders are always considered accessible and where a project is accessible iff it is open param resource the resource return code true code if the resource is accessible and code false code if it is not boolean is Accessible I Resource resource switch resource get Type case I Resource FILE return true case I Resource FOLDER return true case I Resource PROJECT return I Project resource is Open default return false  CoreException isAccessible IResource getType IResource IResource IResource IProject isOpen
Returns whether the given resource is a descendent of any of the resources in the given list param resources the list of resources element type code I Resource code param child the resource to check return code true code if code child code is a descendent of any of the elements of code resources code boolean is Descendent List resources I Resource child I Resource parent child get Parent return parent null resources contains parent is Descendent resources parent  IResource isDescendent IResource IResource getParent isDescendent
Performs pruning on the given list of resources as described in code should Perform Resource Pruning code param resource Collection the list of resources element type code I Resource code return the list of resources element type code I Resource code after pruning see should Perform Resource Pruning List prune Resources List resource Collection List pruned List new Array List resource Collection Iterator elements Enum pruned List iterator while elements Enum has Next I Resource current Resource I Resource elements Enum next if is Descendent pruned List current Resource elements Enum remove Removes current Resource return pruned List  shouldPerformResourcePruning resourceCollection IResource IResource shouldPerformResourcePruning pruneResources resourceCollection prunedList ArrayList resourceCollection elementsEnum prunedList elementsEnum hasNext IResource currentResource IResource elementsEnum isDescendent prunedList currentResource elementsEnum currentResource prunedList
Records the core exception to be displayed to the user once the action is finished param error a code Core Exception code private void record Error Core Exception error if error Status null error Status new Multi Status IDE Workbench Plugin IDE WORKBENCH I Status ERROR get Problems Message error error Status merge error get Status  CoreException recordError CoreException errorStatus errorStatus MultiStatus IDEWorkbenchPlugin IDE_WORKBENCH IStatus getProblemsMessage errorStatus getStatus
try Workspace Modify Operation op new Workspace Modify Operation public void execute I Progress Monitor monitor Workspace Action this execute monitor  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor WorkspaceAction
The code Core Wrapper Action code implementation of this code I Action code method uses a code Progress Monitor Dialog code to run the operation The operation calls code execute code which in turn calls code invoke Operation code Afterwards any code Core Exception code s encountered while running the operation are reported to the user via a problems dialog p Subclasses may extend this method p public void run try Workspace Modify Operation op new Workspace Modify Operation public void execute I Progress Monitor monitor Workspace Action this execute monitor new Progress Monitor Jobs Dialog shell run true true op catch Interrupted Exception e return catch Invocation Target Exception e we catch Core Exception in execute but unexpected runtime exceptions or errors may still occur String msg IDE Workbench Messages format Workspace Action log Title new Object NON NLS 1 get Class get Name e get Target Exception IDE Workbench Plugin log msg Status Util new Status I Status ERROR msg e get Target Exception display Error e get Target Exception get Message If errors occurred open an Error dialog build a multi status error for it if error Status null Error Dialog open Error shell get Problems Title null no special message error Status error Status null  CoreWrapperAction IAction ProgressMonitorDialog invokeOperation CoreException WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor WorkspaceAction ProgressMonitorJobsDialog InterruptedException InvocationTargetException CoreException IDEWorkbenchMessages WorkspaceAction logTitle getClass getName getTargetException IDEWorkbenchPlugin StatusUtil newStatus IStatus getTargetException displayError getTargetException getMessage errorStatus ErrorDialog openError getProblemsTitle errorStatus errorStatus
Returns whether this action should attempt to optimize the resources being operated on This kind of pruning makes sense when the operation has depth infinity semantics when the operation is applied explicitly to a resource then it is also applied implicitly to all the resource s descendents p The code Workspace Action code implementation of this method returns code true code Subclasses should reimplement to return code false code if pruning is not required p return code true code if pruning should be performed and code false code if pruning is not desired boolean should Perform Resource Pruning return true  WorkspaceAction shouldPerformResourcePruning
The code Workspace Action code implementation of this code Selection Listener Action code method ensures that this action is disabled if any of the selected resources are inaccessible Subclasses may extend to react to selection changes however if the super method returns code false code the overriding method should also return code false code protected boolean update Selection I Structured Selection selection if super update Selection selection selection is Empty return false for Iterator i get Selected Resources iterator i has Next I Resource r I Resource i next if is Accessible r return false return true  WorkspaceAction SelectionListenerAction updateSelection IStructuredSelection updateSelection isEmpty getSelectedResources hasNext IResource IResource isAccessible
Returns the elements that the action is to be performed on By default return the selected resources return list of resource elements element type code I Resource code protected List get Action Resources return get Selected Resources  IResource getActionResources getSelectedResources
protected I Status run I Progress Monitor monitor monitor begin Task 1 NON NLS 1 Fix for bug 31768 Don t provide a task name in begin Task as it will be appended to each sub Task message Need to call set Task Name as its the only was to assure the task name is set in the monitor see bug 31824 monitor set Task Name get Operation Message Workspace Action this execute monitor monitor done I Status return Status Status OK STATUS If errors occurred open an Error dialog build a multi status error for it if error Status null return Status error Status error Status null return return Status  IStatus IProgressMonitor beginTask beginTask subTask setTaskName setTaskName getOperationMessage WorkspaceAction IStatus returnStatus OK_STATUS errorStatus returnStatus errorStatus errorStatus returnStatus
Run the action in the background rather than with the progress dialog param rule The rule to apply to the background job or code null code if there isn t one public void run In Background I Scheduling Rule rule Job background Job new Job remove Mnemonics get Text non Javadoc see org eclipse core runtime jobs Job run org eclipse core runtime I Progress Monitor protected I Status run I Progress Monitor monitor monitor begin Task 1 NON NLS 1 Fix for bug 31768 Don t provide a task name in begin Task as it will be appended to each sub Task message Need to call set Task Name as its the only was to assure the task name is set in the monitor see bug 31824 monitor set Task Name get Operation Message Workspace Action this execute monitor monitor done I Status return Status Status OK STATUS If errors occurred open an Error dialog build a multi status error for it if error Status null return Status error Status error Status null return return Status if rule null background Job set Rule rule background Job set User true background Job schedule  runInBackground ISchedulingRule backgroundJob removeMnemonics getText IProgressMonitor IStatus IProgressMonitor beginTask beginTask subTask setTaskName setTaskName getOperationMessage WorkspaceAction IStatus returnStatus OK_STATUS errorStatus returnStatus errorStatus errorStatus returnStatus backgroundJob setRule backgroundJob setUser backgroundJob

Creates a new operation which will delegate its work to the given runnable using the provided scheduling rule param content the runnable to delegate to when this operation is executed param rule The I Scheduling Rule to use or code null code public Workspace Modify Delegating Operation I Runnable With Progress content I Scheduling Rule rule super rule this content content  ISchedulingRule WorkspaceModifyDelegatingOperation IRunnableWithProgress ISchedulingRule
Creates a new operation which will delegate its work to the given runnable Schedule using the supplied s param content the runnable to delegate to when this operation is executed public Workspace Modify Delegating Operation I Runnable With Progress content super this content content  WorkspaceModifyDelegatingOperation IRunnableWithProgress
protected void execute I Progress Monitor monitor throws Core Exception Interrupted Exception try content run monitor catch Invocation Target Exception e if e get Target Exception instanceof Core Exception throw Core Exception e get Target Exception if e get Target Exception instanceof Runtime Exception throw Runtime Exception e get Target Exception if e get Target Exception instanceof Error throw Error e get Target Exception e get Target Exception print Stack Trace  IProgressMonitor CoreException InterruptedException InvocationTargetException getTargetException CoreException CoreException getTargetException getTargetException RuntimeException RuntimeException getTargetException getTargetException getTargetException getTargetException printStackTrace

private I Scheduling Rule rule Creates a new operation protected Workspace Modify Operation this IDE Workbench Plugin get Plugin Workspace get Root  ISchedulingRule WorkspaceModifyOperation IDEWorkbenchPlugin getPluginWorkspace getRoot
Creates a new operation that will run using the provided scheduling rule param rule The I Scheduling Rule to use or code null code since 3 0 protected Workspace Modify Operation I Scheduling Rule rule this rule rule  ISchedulingRule WorkspaceModifyOperation ISchedulingRule
Performs the steps that are to be treated as a single logical workspace change p Subclasses must implement this method p param monitor the progress monitor to use to display progress and field user requests to cancel exception Core Exception if the operation fails due to a Core Exception exception Invocation Target Exception if the operation fails due to an exception other than Core Exception exception Interrupted Exception if the operation detects a request to cancel using code I Progress Monitor is Canceled code it should exit by throwing code Interrupted Exception code It is also possible to throw code Operation Canceled Exception code which gets mapped to code Interrupted Exception code by the code run code method  CoreException CoreException InvocationTargetException CoreException InterruptedException IProgressMonitor isCanceled InterruptedException OperationCanceledException InterruptedException
I Workspace Runnable workspace Runnable new I Workspace Runnable public void run I Progress Monitor pm throws Core Exception try execute pm catch Invocation Target Exception e Pass it outside the workspace runnable ite Holder 0 e catch Interrupted Exception e Re throw as Operation Canceled Exception which will be caught and re thrown as Interrupted Exception below throw new Operation Canceled Exception e get Message Core Exception and Operation Canceled Exception are propagated  IWorkspaceRunnable workspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException InvocationTargetException iteHolder InterruptedException OperationCanceledException InterruptedException OperationCanceledException getMessage CoreException OperationCanceledException
protected abstract void execute I Progress Monitor monitor throws Core Exception Invocation Target Exception Interrupted Exception The code Workspace Modify Operation code implementation of this code I Runnable With Progress code method initiates a batch of changes by invoking the code execute code method as a workspace runnable code I Workspace Runnable code public synchronized final void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception final Invocation Target Exception ite Holder new Invocation Target Exception 1 try I Workspace Runnable workspace Runnable new I Workspace Runnable public void run I Progress Monitor pm throws Core Exception try execute pm catch Invocation Target Exception e Pass it outside the workspace runnable ite Holder 0 e catch Interrupted Exception e Re throw as Operation Canceled Exception which will be caught and re thrown as Interrupted Exception below throw new Operation Canceled Exception e get Message Core Exception and Operation Canceled Exception are propagated IDE Workbench Plugin get Plugin Workspace run workspace Runnable rule I Resource NONE monitor catch Core Exception e throw new Invocation Target Exception e catch Operation Canceled Exception e throw new Interrupted Exception e get Message Re throw the Invocation Target Exception if any occurred if ite Holder 0 null throw ite Holder 0  IProgressMonitor CoreException InvocationTargetException InterruptedException WorkspaceModifyOperation IRunnableWithProgress IWorkspaceRunnable IProgressMonitor InvocationTargetException InterruptedException InvocationTargetException iteHolder InvocationTargetException IWorkspaceRunnable workspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException InvocationTargetException iteHolder InterruptedException OperationCanceledException InterruptedException OperationCanceledException getMessage CoreException OperationCanceledException IDEWorkbenchPlugin getPluginWorkspace workspaceRunnable IResource CoreException InvocationTargetException OperationCanceledException InterruptedException getMessage InvocationTargetException iteHolder iteHolder

Creates a new instance of this class param activity the instance of the interface that changed param activity Requirement Bindings Changed code true code iff the activity Requirement Bindings property changed param activity Pattern Bindings Changed code true code iff the activity Pattern Bindings property changed param defined Changed code true code iff the defined property changed param description Changed code true code iff the description property changed param enabled Changed code true code iff the enabled property changed param name Changed code true code iff the name property changed public Activity Event I Activity activity boolean activity Requirement Bindings Changed boolean activity Pattern Bindings Changed boolean defined Changed boolean description Changed boolean enabled Changed boolean name Changed if activity null throw new Null Pointer Exception this activity activity this activity Requirement Bindings Changed activity Requirement Bindings Changed this activity Pattern Bindings Changed activity Pattern Bindings Changed this defined Changed defined Changed this enabled Changed enabled Changed this name Changed name Changed this description Changed description Changed  activityRequirementBindingsChanged activityRequirementBindings activityPatternBindingsChanged activityPatternBindings definedChanged descriptionChanged enabledChanged nameChanged ActivityEvent IActivity activityRequirementBindingsChanged activityPatternBindingsChanged definedChanged descriptionChanged enabledChanged nameChanged NullPointerException activityRequirementBindingsChanged activityRequirementBindingsChanged activityPatternBindingsChanged activityPatternBindingsChanged definedChanged definedChanged enabledChanged enabledChanged nameChanged nameChanged descriptionChanged descriptionChanged
Returns the instance of the interface that changed return the instance of the interface that changed Guaranteed not to be code null code public I Activity get Activity return activity  IActivity getActivity
Returns whether or not the defined property changed return code true code iff the defined property changed public boolean has Defined Changed return defined Changed  hasDefinedChanged definedChanged
Returns whether or not the enabled property changed return code true code iff the enabled property changed public boolean has Enabled Changed return enabled Changed  hasEnabledChanged enabledChanged
Returns whether or not the name property changed return code true code iff the name property changed public boolean has Name Changed return name Changed  hasNameChanged nameChanged
Returns whether or not the description property changed return code true code iff the description property changed public boolean has Description Changed return description Changed  hasDescriptionChanged descriptionChanged
Returns whether or not the activity Requirement Bindings property changed return code true code iff the activity Requirement Bindings property changed public boolean have Activity Requirement Bindings Changed return activity Requirement Bindings Changed  activityRequirementBindings activityRequirementBindings haveActivityRequirementBindingsChanged activityRequirementBindingsChanged
Returns whether or not the activity Pattern Bindings property changed return code true code iff the activity Pattern Bindings property changed public boolean have Activity Pattern Bindings Changed return activity Pattern Bindings Changed  activityPatternBindings activityPatternBindings haveActivityPatternBindingsChanged activityPatternBindingsChanged

Creates a new instance of this class param activity Manager the instance of the interface that changed param defined Activity Ids Changed code true code iff the defined Activity Ids property changed param defined Category Ids Changed code true code iff the defined Category Ids property changed param enabled Activity Ids Changed code true code iff the enabled Activity Ids property changed param previously Defined Activity Ids the set of identifiers to previously defined activities This set may be empty If this set is not empty it must only contain instances of code String code This set must be code null code if defined Activity Ids Changed is code false code and must not be null if defined Activity Ids Changed is code true code param previously Defined Category Ids the set of identifiers to previously defined category This set may be empty If this set is not empty it must only contain instances of code String code This set must be code null code if defined Category Ids Changed is code false code and must not be null if defined Category Ids Changed is code true code param previously Enabled Activity Ids the set of identifiers to previously enabled activities This set may be empty If this set is not empty it must only contain instances of code String code This set must be code null code if enabled Activity Ids Changed is code false code and must not be null if enabled Activity Ids Changed is code true code public Activity Manager Event I Activity Manager activity Manager boolean defined Activity Ids Changed boolean defined Category Ids Changed boolean enabled Activity Ids Changed final Set previously Defined Activity Ids final Set previously Defined Category Ids final Set previously Enabled Activity Ids if activity Manager null throw new Null Pointer Exception if defined Activity Ids Changed previously Defined Activity Ids null throw new Illegal Argument Exception if defined Category Ids Changed previously Defined Category Ids null throw new Illegal Argument Exception if enabled Activity Ids Changed previously Enabled Activity Ids null throw new Illegal Argument Exception if defined Activity Ids Changed this previously Defined Activity Ids Util safe Copy previously Defined Activity Ids String class else this previously Defined Activity Ids null if defined Category Ids Changed this previously Defined Category Ids Util safe Copy previously Defined Category Ids String class else this previously Defined Category Ids null if enabled Activity Ids Changed this previously Enabled Activity Ids Util safe Copy previously Enabled Activity Ids String class else this previously Enabled Activity Ids null this activity Manager activity Manager this defined Activity Ids Changed defined Activity Ids Changed this defined Category Ids Changed defined Category Ids Changed this enabled Activity Ids Changed enabled Activity Ids Changed  activityManager definedActivityIdsChanged definedActivityIds definedCategoryIdsChanged definedCategoryIds enabledActivityIdsChanged enabledActivityIds previouslyDefinedActivityIds definedActivityIdsChanged definedActivityIdsChanged previouslyDefinedCategoryIds definedCategoryIdsChanged definedCategoryIdsChanged previouslyEnabledActivityIds enabledActivityIdsChanged enabledActivityIdsChanged ActivityManagerEvent IActivityManager activityManager definedActivityIdsChanged definedCategoryIdsChanged enabledActivityIdsChanged previouslyDefinedActivityIds previouslyDefinedCategoryIds previouslyEnabledActivityIds activityManager NullPointerException definedActivityIdsChanged previouslyDefinedActivityIds IllegalArgumentException definedCategoryIdsChanged previouslyDefinedCategoryIds IllegalArgumentException enabledActivityIdsChanged previouslyEnabledActivityIds IllegalArgumentException definedActivityIdsChanged previouslyDefinedActivityIds safeCopy previouslyDefinedActivityIds previouslyDefinedActivityIds definedCategoryIdsChanged previouslyDefinedCategoryIds safeCopy previouslyDefinedCategoryIds previouslyDefinedCategoryIds enabledActivityIdsChanged previouslyEnabledActivityIds safeCopy previouslyEnabledActivityIds previouslyEnabledActivityIds activityManager activityManager definedActivityIdsChanged definedActivityIdsChanged definedCategoryIdsChanged definedCategoryIdsChanged enabledActivityIdsChanged enabledActivityIdsChanged
Returns the instance of the interface that changed return the instance of the interface that changed Guaranteed not to be code null code public I Activity Manager get Activity Manager return activity Manager  IActivityManager getActivityManager activityManager
Returns the activity identifiers that were previously defined return The set of defined activity identifiers before the changed may be empty but never code null code This set will only contain strings public final Set get Previously Defined Activity Ids return previously Defined Activity Ids  getPreviouslyDefinedActivityIds previouslyDefinedActivityIds
Returns the category identifiers that were previously defined return The set of defined category identifiers before the changed may be empty but never code null code This set will only contain strings public final Set get Previously Defined Category Ids return previously Defined Category Ids  getPreviouslyDefinedCategoryIds previouslyDefinedCategoryIds
Returns the activity identifiers that were previously enabled return The set of enabled activity identifiers before the changed may be empty but never code null code This set will only contain strings public final Set get Previously Enabled Activity Ids return previously Enabled Activity Ids  getPreviouslyEnabledActivityIds previouslyEnabledActivityIds
Returns whether or not the defined Activity Ids property changed return code true code iff the defined Activity Ids property changed public boolean have Defined Activity Ids Changed return defined Activity Ids Changed  definedActivityIds definedActivityIds haveDefinedActivityIdsChanged definedActivityIdsChanged
Returns whether or not the defined Category Ids property changed return code true code iff the defined Category Ids property changed public boolean have Defined Category Ids Changed return defined Category Ids Changed  definedCategoryIds definedCategoryIds haveDefinedCategoryIdsChanged definedCategoryIdsChanged
Returns whether or not the enabled Activity Ids property changed return code true code iff the enabled Activity Ids property changed public boolean have Enabled Activity Ids Changed return enabled Activity Ids Changed  enabledActivityIds enabledActivityIds haveEnabledActivityIdsChanged enabledActivityIdsChanged

Creates a new instance of this class param category the instance of the interface that changed param category Activity Bindings Changed code true code iff the category Activity Bindings property changed param defined Changed code true code iff the defined property changed param description Changed code true code iff the description property changed param name Changed code true code iff the name property changed public Category Event I Category category boolean category Activity Bindings Changed boolean defined Changed boolean description Changed boolean name Changed if category null throw new Null Pointer Exception this category category this category Activity Bindings Changed category Activity Bindings Changed this defined Changed defined Changed this name Changed name Changed this description Changed description Changed  categoryActivityBindingsChanged categoryActivityBindings definedChanged descriptionChanged nameChanged CategoryEvent ICategory categoryActivityBindingsChanged definedChanged descriptionChanged nameChanged NullPointerException categoryActivityBindingsChanged categoryActivityBindingsChanged definedChanged definedChanged nameChanged nameChanged descriptionChanged descriptionChanged
Returns the instance of the interface that changed return the instance of the interface that changed Guaranteed not to be code null code public I Category get Category return category  ICategory getCategory
Returns whether or not the defined property changed return code true code iff the defined property changed public boolean has Defined Changed return defined Changed  hasDefinedChanged definedChanged
Returns whether or not the name property changed return code true code iff the name property changed public boolean has Name Changed return name Changed  hasNameChanged nameChanged
Returns whether or not the description property changed return code true code iff the description property changed public boolean has Description Changed return description Changed  hasDescriptionChanged descriptionChanged
Returns whether or not the category Activity Bindings property changed return code true code iff the category Activity Bindings property changed public boolean have Category Activity Bindings Changed return category Activity Bindings Changed  categoryActivityBindings categoryActivityBindings haveCategoryActivityBindingsChanged categoryActivityBindingsChanged

Registers an instance of code I Activity Listener code to listen for changes to properties of this instance param activity Listener the instance to register Must not be code null code If an attempt is made to register an instance which is already registered with this instance no operation is performed  IActivityListener activityListener
Returns the set of activity activity bindings for this instance p This method will return all activity activity bindings for this instance whether or not this instance is defined p p Notification is sent to all registered listeners if this property changes p return the set of activity activity bindings This set may be empty but is guaranteed not to be code null code If this set is not empty it is guaranteed to only contain instances of code I Activity Requirement Binding code see I Activity Requirement Binding  IActivityRequirementBinding IActivityRequirementBinding
Returns the set of activity pattern bindings for this instance p This method will return all activity pattern bindings for this instance whether or not this instance is defined p p Notification is sent to all registered listeners if this property changes p return the set of activity pattern bindings This set may be empty but is guaranteed not to be code null code If this set is not empty it is guaranteed to only contain instances of code I Activity Pattern Binding code see I Activity Pattern Binding  IActivityPatternBinding IActivityPatternBinding
Returns the identifier of this instance return the identifier of this instance Guaranteed not to be code null code 
Returns the name of this instance suitable for display to the user p Notification is sent to all registered listeners if this property changes p return the name of this instance Guaranteed not to be code null code throws Not Defined Exception if this instance is not defined  NotDefinedException
Returns the description of this instance suitable for display to the user p Notification is sent to all registered listeners if this property changes p return the description of this instance Guaranteed not to be code null code throws Not Defined Exception if this instance is not defined  NotDefinedException
Returns whether or not this instance is defined A defined activity may have a name description and bindings both pattern and relational p Notification is sent to all registered listeners if this property changes p return code true code iff this instance is defined 
Returns whether or not this instance is enabled p Notification is sent to all registered listeners if this property changes p return code true code iff this instance is enabled 
Removes an instance of code I Activity Listener code listening for changes to properties of this instance param activity Listener the instance to remove Must not be code null code If an attempt is made to remove an instance which is not already registered with this instance no operation is performed  IActivityListener activityListener

Notifies that one or more properties of an instance of code I Activity code have changed Specific details are described in the code Activity Event code param activity Event the activity event Guaranteed not to be code null code  IActivity ActivityEvent activityEvent

Registers an instance of code I Activity Manager Listener code to listen for changes to properties of this instance param activity Manager Listener the instance to register Must not be code null code If an attempt is made to register an instance which is already registered with this instance no operation is performed  IActivityManagerListener activityManagerListener
Returns an instance of code I Activity code given an identifier param activity Id an identifier Must not be code null code return an instance of code I Activity code  IActivity activityId IActivity
Returns an instance of code I Category code given an identifier param category Id an identifier Must not be code null code return an instance of code I Category code  ICategory categoryId ICategory
Returns the set of identifiers to defined activities p Notification is sent to all registered listeners if this property changes p return the set of identifiers to defined activities This set may be empty but is guaranteed not to be code null code If this set is not empty it is guaranteed to only contain instances of code String code 
Returns the set of identifiers to defined categories p Notification is sent to all registered listeners if this property changes p return the set of identifiers to defined categories This set may be empty but is guaranteed not to be code null code If this set is not empty it is guaranteed to only contain instances of code String code 
Returns the set of identifiers to enabled activities p Notification is sent to all registered listeners if this property changes p return the set of identifiers to enabled activities This set may be empty but is guaranteed not to be code null code If this set is not empty it is guaranteed to only contain instances of code String code 
Returns an instance of code I Identifier code given an identifier param identifier Id an identifier Must not be code null code return an instance of code I Identifier code  IIdentifier identifierId IIdentifier
Removes an instance of code I Activity Manager Listener code listening for changes to properties of this instance param activity Manager Listener the instance to remove Must not be code null code If an attempt is made to remove an instance which is not already registered with this instance no operation is performed  IActivityManagerListener activityManagerListener

Notifies that one or more properties of an instance of code I Activity Manager code have changed Specific details are described in the code Activity Manager Event code param activity Manager Event the activity manager event Guaranteed not to be code null code  IActivityManager ActivityManagerEvent activityManagerEvent

Returns the identifier of the activity represented in this binding return the identifier of the activity represented in this binding Guaranteed not to be code null code 
Returns the pattern represented in this binding This pattern should conform to the regular expression syntax described by the code java util regex Pattern code class return the pattern Guaranteed not to be code null code 

Returns the identifier of the activity represented in this binding return the identifier of the activity represented in this binding Guaranteed not to be code null code 
Returns the identifier of the required activity represented in this binding The enablement of the activity described by link get Activity Id requires the enablement of this activity return the identifier of the required activity represented in this binding Guaranteed not to be code null code  getActivityId

Registers an instance of code I Category Listener code to listen for changes to properties of this instance param category Listener the instance to register Must not be code null code If an attempt is made to register an instance which is already registered with this instance no operation is performed  ICategoryListener categoryListener
Returns the set of category activity bindings for this instance p This method will return all category activity bindings for this instance whether or not this instance is defined p p Notification is sent to all registered listeners if this property changes p return the set of category activity bindings This set may be empty but is guaranteed not to be code null code If this set is not empty it is guaranteed to only contain instances of code I Category Activity Binding code see I Category Activity Binding  ICategoryActivityBinding ICategoryActivityBinding
Returns the identifier of this instance return the identifier of this instance Guaranteed not to be code null code 
Returns the name of this instance suitable for display to the user p Notification is sent to all registered listeners if this property changes p return the name of this instance Guaranteed not to be code null code throws Not Defined Exception if this instance is not defined  NotDefinedException
Returns the description of this instance suitable for display to the user p Notification is sent to all registered listeners if this property changes p return the description of this instance Guaranteed not to be code null code throws Not Defined Exception if this instance is not defined  NotDefinedException
Returns whether or not this instance is defined p Notification is sent to all registered listeners if this property changes p return code true code iff this instance is defined 
Removes an instance of code I Category Listener code listening for changes to properties of this instance param category Listener the instance to remove Must not be code null code If an attempt is made to remove an instance which is not already registered with this instance no operation is performed  ICategoryListener categoryListener

Returns the identifier of the activity represented in this binding return the identifier of the activity represented in this binding Guaranteed not to be code null code 
Returns the identifier of the category represented in this binding return the identifier of the category represented in this binding Guaranteed not to be code null code 

Notifies that one or more properties of an instance of code I Category code have changed Specific details are described in the code Category Event code param category Event the category event Guaranteed not to be code null code  ICategory CategoryEvent categoryEvent

Creates a new instance of this class param identifier the instance of the interface that changed param activity Ids Changed code true code iff the activity Ids property changed param enabled Changed code true code iff the enabled property changed public Identifier Event I Identifier identifier boolean activity Ids Changed boolean enabled Changed if identifier null throw new Null Pointer Exception this identifier identifier this activity Ids Changed activity Ids Changed this enabled Changed enabled Changed  activityIdsChanged activityIds enabledChanged IdentifierEvent IIdentifier activityIdsChanged enabledChanged NullPointerException activityIdsChanged activityIdsChanged enabledChanged enabledChanged
Returns the instance of the interface that changed return the instance of the interface that changed Guaranteed not to be code null code public I Identifier get Identifier return identifier  IIdentifier getIdentifier
Returns whether or not the activity Ids property changed return code true code iff the activity Ids property changed public boolean has Activity Ids Changed return activity Ids Changed  activityIds activityIds hasActivityIdsChanged activityIdsChanged
Returns whether or not the enabled property changed return code true code iff the enabled property changed public boolean has Enabled Changed return enabled Changed  hasEnabledChanged enabledChanged

Registers an instance of code I Identifier Listener code to listen for changes to properties of this instance param identifier Listener the instance to register Must not be code null code If an attempt is made to register an instance which is already registered with this instance no operation is performed  IIdentifierListener identifierListener
Returns the set of activity ids that this instance matches Each activity in this set will have at least one pattern binding that matches the string returned by link get Id p Notification is sent to all registered listeners if this property changes p return the set of activity ids that this instance matches This set may be empty but is guaranteed not to be code null code If this set is not empty it is guaranteed to only contain instances of code String code  getId
Returns the identifier of this instance return the identifier of this instance Guaranteed not to be code null code 
Returns whether or not this instance is enabled An identifier is always considered enabled unless it matches only disabled activities p Notification is sent to all registered listeners if this property changes p return code true code iff this instance is enabled 
Removes an instance of code I Identifier Listener code listening for changes to properties of this instance param identifier Listener the instance to remove Must not be code null code If an attempt is made to remove an instance which is not already registered with this instance no operation is performed  IIdentifierListener identifierListener

Notifies that one or more properties of an instance of code I Identifier code have changed Specific details are described in the code Identifier Event code param identifier Event the identifier event Guaranteed not to be code null code  IIdentifier IdentifierEvent identifierEvent

Sets the set of identifiers to enabled activities param enabled Activity Ids the set of identifiers to enabled activities This set may be empty but it must not be code null code If this set is not empty it must only contain instances of code String code  enabledActivityIds

Returns the activity manager for the workbench return the activity manager for the workbench Guaranteed not to be code null code since 3 0 
Sets the set of identifiers to enabled activities param enabled Activity Ids the set of identifiers to enabled activities This set may be empty but it must not be code null code If this set is not empty it must only contain instances of code String code  enabledActivityIds

Creates a new instance of this class with no specified detail message public Not Defined Exception no op  NotDefinedException
Creates a new instance of this class with the specified detail message param s the detail message public Not Defined Exception String s super s  NotDefinedException

Answers whether a given contribution is allowed to be used based on activity enablement If it is currently disabled then a dialog is opened and the user is prompted to activate the requried activities If the user declines their activation then false is returned In all other cases code true code is returned param object the contribution to test return whether the contribution is allowed to be used based on activity enablement public static boolean allow Use Of Object object if is Filtering return true if object instanceof I Plugin Contribution I Plugin Contribution contribution I Plugin Contribution object I Workbench Activity Support workbench Activity Support PlatformUI get Workbench get Activity Support I Identifier identifier workbench Activity Support get Activity Manager get Identifier create Unified Id contribution return allow identifier return true  allowUseOf isFiltering IPluginContribution IPluginContribution IPluginContribution IWorkbenchActivitySupport workbenchActivitySupport getWorkbench getActivitySupport IIdentifier workbenchActivitySupport getActivityManager getIdentifier createUnifiedId
Answers whether a given identifier is enabled If it is not enabled then a dialog is opened and the user is prompted to enable the associated activities param identifier the identifier to test return whether the identifier is enabled private static boolean allow I Identifier identifier if identifier is Enabled return true if PlatformUI get Workbench get Preference Store get Boolean I Preference Constants SHOULD PROMPT FOR ENABLEMENT enable Identifier identifier return true Enablement Dialog dialog new Enablement Dialog PlatformUI get Workbench get Display get Active Shell identifier get Activity Ids if dialog open Window OK enabled Activities dialog get Activities To Enable if dialog get Dont Ask PlatformUI get Workbench get Preference Store set Value I Preference Constants SHOULD PROMPT FOR ENABLEMENT false Workbench Plugin get Default save Plugin Preferences return true return false  IIdentifier isEnabled getWorkbench getPreferenceStore getBoolean IPreferenceConstants SHOULD_PROMPT_FOR_ENABLEMENT enableIdentifier EnablementDialog EnablementDialog getWorkbench getDisplay getActiveShell getActivityIds enabledActivities getActivitiesToEnable getDontAsk getWorkbench getPreferenceStore setValue IPreferenceConstants SHOULD_PROMPT_FOR_ENABLEMENT WorkbenchPlugin getDefault savePluginPreferences
Utility method to create a code String code containing the plugin and extension ids of a contribution This will have the form pre plugin Id extension Id pre If the I Plugin Contribution does not define a plugin id then the extension id alone is returned param contribution the contribution to use return the unified id public static final String create Unified Id I Plugin Contribution contribution if contribution get Plugin Id null return contribution get Plugin Id contribution get Local Id return contribution get Local Id  pluginId extensionId IPluginContribution createUnifiedId IPluginContribution getPluginId getPluginId getLocalId getLocalId
Enables the set of activities param activities the activities to enable private static void enabled Activities Collection activities I Workbench Activity Support activity Support PlatformUI get Workbench get Activity Support Set new Set new Hash Set activity Support get Activity Manager get Enabled Activity Ids new Set add All activities activity Support set Enabled Activity Ids new Set  enabledActivities IWorkbenchActivitySupport activitySupport getWorkbench getActivitySupport newSet HashSet activitySupport getActivityManager getEnabledActivityIds newSet addAll activitySupport setEnabledActivityIds newSet
Enables the activities associated with the given identifier param identifier the identifier to enable private static final void enable Identifier I Identifier identifier I Workbench Activity Support activity Support PlatformUI get Workbench get Activity Support Set new Set new Hash Set activity Support get Activity Manager get Enabled Activity Ids new Set add All identifier get Activity Ids activity Support set Enabled Activity Ids new Set  enableIdentifier IIdentifier IWorkbenchActivitySupport activitySupport getWorkbench getActivitySupport newSet HashSet activitySupport getActivityManager getEnabledActivityIds newSet addAll getActivityIds activitySupport setEnabledActivityIds newSet
Answers whether the provided object should be filtered from the UI based on activity state Returns code false code except when the object is an instance of code I Plugin Contribution code whos unified id matches an code I Identifier code that is currently disabled param object the object to test return whether the object should be filtered see create Unified Id I Plugin Contribution public static final boolean filter Item Object object if object instanceof I Plugin Contribution I Plugin Contribution contribution I Plugin Contribution object I Workbench Activity Support workbench Activity Support PlatformUI get Workbench get Activity Support I Identifier identifier workbench Activity Support get Activity Manager get Identifier create Unified Id contribution if identifier is Enabled return true return false  IPluginContribution IIdentifier createUnifiedId IPluginContribution filterItem IPluginContribution IPluginContribution IPluginContribution IWorkbenchActivitySupport workbenchActivitySupport getWorkbench getActivitySupport IIdentifier workbenchActivitySupport getActivityManager getIdentifier createUnifiedId isEnabled
Returns whether the UI is set up to filter contributions This is the case if there are defined activities return whether the UI is set up to filter contributions public static final boolean is Filtering return PlatformUI get Workbench get Activity Support get Activity Manager get Defined Activity Ids is Empty  isFiltering getWorkbench getActivitySupport getActivityManager getDefinedActivityIds isEmpty
Not intended to be instantiated private Workbench Activity Helper no op  WorkbenchActivityHelper

public interface I Action Bar Configurer Returns the menu manager for the main menu bar of a workbench window return the menu manager  IActionBarConfigurer
Returns the status line manager of a workbench window return the status line manager 
Returns the cool bar manager of the workbench window return the cool bar manager 
Register the action as a global action with a workbench window p For a workbench retarget action link org eclipse ui actions Retarget Action Retarget Action to work it must be registered You should also register actions that will participate in custom key bindings p param action the global action see org eclipse ui actions Retarget Action  RetargetAction RetargetAction RetargetAction

Returns the underlying workbench return the workbench 
Returns whether the workbench state should be saved on close and restored on subsequent open p The initial value is code false code p return code true code to save and restore workbench state or code false code to forget current workbench state on close 
Sets whether the workbench state should be saved on close and restored on subsequent open param enabled code true code to save and restore workbench state or code false code to forget current workbench state on close 
Returns the workbench window manager return the workbench window manager Note I Workbench Window is implemented using J Face s Window and therefore uses Window Manager but this is an implementation detail  IWorkbenchWindow JFace WindowManager
Declares a workbench image p The workbench remembers the given image descriptor under the given name and makes the image available to plug ins via link I Workbench get Shared Images I Workbench get Shared Images For shared images the workbench remembers the image descriptor and will manages the image object create from it clients retrieve shared images via link org eclipse ui I Shared Images get Image I Shared Images get Image For the other non shared images the workbench remembers only the image descriptor clients retrieve the image descriptor via link org eclipse ui I Shared Images get Image Descriptor I Shared Images get Image Descriptor and are entirely responsible for managing the image objects they create from it This is made confusing by the historical fact that the API interface is called I Shared Images p param symbolic Name the symbolic name of the image param descriptor the image descriptor param shared code true code if this is a shared image and code false code if this is not a shared image see org eclipse ui I Shared Images get Image see org eclipse ui I Shared Images get Image Descriptor  IWorkbench getSharedImages IWorkbench getSharedImages ISharedImages getImage ISharedImages getImage ISharedImages getImageDescriptor ISharedImages getImageDescriptor ISharedImages symbolicName ISharedImages getImage ISharedImages getImageDescriptor
Forces the workbench to close due to an emergency This method should only be called when the workbench is in dire straights and cannot continue and cannot even risk a normal workbench close think out of memory or unable to create shell When this method is called an abbreviated workbench shutdown sequence is performed less critical steps may be skipped The workbench advisor is still called however it must not attempt to communicate with the user While an emergency close is in progress code emergency Closing code returns code true code Workbench advisor methods should always check this flag before communicating with the user see emergency Closing  emergencyClosing emergencyClosing
Returns whether the workbench is being closed due to an emergency When this method returns code true code the workbench is in dire straights and cannot continue Indeed things are so bad that we cannot even risk a normal workbench close Workbench advisor methods should always check this flag before attempting to communicate with the user return code true code if the workbench is in the process of being closed under emergency conditions and code false code otherwise 
Returns an object that can be used to configure the given window param window a workbench window return a workbench window configurer 
Returns the data associated with the workbench at the given key param key the key return the data or code null code if there is no data at the given key 
Sets the data associated with the workbench at the given key param key the key param data the data or code null code to delete existing data 
Restores the workbench state saved from the previous session if any This includes any open windows and their open perspectives open views and editors layout information and any customizations to the open perspectives p This is typically called from the advisor s code open Windows code method p return a status object indicating whether the restore was successful see RESTORE CODE RESET see RESTORE CODE EXIT see Workbench Advisor open Windows  openWindows RESTORE_CODE_RESET RESTORE_CODE_EXIT WorkbenchAdvisor openWindows
Opens the first time window using the default perspective and default page input p This is typically called from the advisor s code open Windows code method p see Workbench Advisor open Windows  openWindows WorkbenchAdvisor openWindows

public interface I Workbench Window Configurer Returns the underlying workbench window return the workbench window  IWorkbenchWindowConfigurer
Returns the workbench configurer return the workbench configurer 
Returns the action bar configurer for this workbench window return the action bar configurer 
Returns the title of the underlying workbench window return the window title 
Sets the title of the underlying workbench window param title the window title 
Returns whether the underlying workbench window has a menu bar p The initial value is code true code p return code true code for a menu bar and code false code for no menu bar 
Sets whether the underlying workbench window has a menu bar param show code true code for a menu bar and code false code for no menu bar 
Returns whether the underlying workbench window has a cool bar p The initial value is code true code p return code true code for a cool bar and code false code for no cool bar 
Sets whether the underlying workbench window has a cool bar param show code true code for a cool bar and code false code for no cool bar 
Returns whether the underlying workbench window has a status line p The initial value is code true code p return code true code for a status line and code false code for no status line 
Sets whether the underlying workbench window has a status line param show code true code for a status line and code false code for no status line 
Returns whether the underlying workbench window has a perspective bar the perspective bar provides buttons to quickly switch between perspectives p The initial value is code false code p return code true code for a perspective bar and code false code for no perspective bar 
Sets whether the underlying workbench window has a perspective bar the perspective bar provides buttons to quickly switch between perspectives param show code true code for a perspective bar and code false code for no perspective bar 
Returns whether the underlying workbench window has fast view bars p The initial value is code false code p return code true code for fast view bars and code false code for no fast view bars 
Sets whether the underlying workbench window has fast view bars param enable code true code for fast view bars and code false code for no fast view bars 
Returns whether the underlying workbench window has a progress indicator p The initial value is code false code p return code true code for a progress indicator and code false code for no progress indicator 
Sets whether the underlying workbench window has a progress indicator param show code true code for a progress indicator and code false code for no progress indicator 
Returns the style bits to use for the window s shell when it is created The default is code SWT SHELL TRIM code return the shell style bits  SHELL_TRIM
Sets the style bits to use for the window s shell when it is created This method has no effect after the shell is created That is it must be called within the code pre Window Open code callback on code Workbench Advisor code param shell Style the shell style bits  preWindowOpen WorkbenchAdvisor shellStyle
Returns the size to use for the window s shell when it is created The default is 800x600 return the initial size to use for the shell 
Sets the size to use for the window s shell when it is created This method has no effect after the shell is created That is it must be called within the code pre Window Open code callback on code Workbench Advisor code param initial Size the initial size to use for the shell  preWindowOpen WorkbenchAdvisor initialSize
Returns the data associated with this workbench window at the given key param key the key return the data or code null code if there is no data at the given key 
Sets the data associated with this workbench window at the given key param key the key param data the data or code null code to delete existing data 
Adds the given drag and drop code Transfer code type to the ones supported for drag and drop on the editor area of this workbench window p The workbench advisor would ordinarily call this method from the code pre Window Open code callback A newly created workbench window supports no drag and drop transfer types Adding code Editor Input Transfer get Instance code enables code I Editor Input code s to be transferred p p Note that drag and drop to the editor area requires adding one or more transfer types using code add Editor Area Transfer code and configuring a drop target listener with code configure Editor Area Drop Listener code capable of handling any of those transfer types p param transfer a drag and drop transfer object see configure Editor Area Drop Listener see org eclipse ui part Editor Input Transfer  preWindowOpen EditorInputTransfer getInstance IEditorInput addEditorAreaTransfer configureEditorAreaDropListener configureEditorAreaDropListener EditorInputTransfer
Configures the drop target listener for the editor area of this workbench window p The workbench advisor ordinarily calls this method from the code pre Window Open code callback A newly created workbench window has no configured drop target listener for its editor area p p Note that drag and drop to the editor area requires adding one or more transfer types using code add Editor Area Transfer code and configuring a drop target listener with code configure Editor Area Drop Listener code capable of handling any of those transfer types p param drop Target Listener the drop target listener that will handle requests to drop an object on to the editor area of this window see add Editor Area Transfer  preWindowOpen addEditorAreaTransfer configureEditorAreaDropListener dropTargetListener addEditorAreaTransfer
Returns the presentation factory for this window The window consults its presentation factory for the presentation aspects of views editors status lines and other components of the window p If no presentation factory has been set a default one is returned p return the presentation factory used for this window deprecated the presentation factory is now obtained via extension point and a preference on org eclipse ui specifying which one to use see I Workbench Preference Constants PRESENTATION FACTORY ID  IWorkbenchPreferenceConstants PRESENTATION_FACTORY_ID
Sets the presentation factory The window consults its presentation factory for the presentation aspects of views editors status lines and other components of the window p This must be called before the window s controls are created for example in code pre Window Open code p param factory the presentation factory to use for this window deprecated the presentation factory is now obtained via extension point and a preference on org eclipse ui specifying which one to use see I Workbench Preference Constants PRESENTATION FACTORY ID  preWindowOpen IWorkbenchPreferenceConstants PRESENTATION_FACTORY_ID
Creates the menu bar for the window s shell p This should only be called if the advisor is defining custom window contents in code create Window Contents code The caller must set it in the shell using code Shell set Menu Bar Menu code but must not make add remove or change items in the result The menu bar is populated by the window s menu manager The application can add to the menu manager in the advisor s code fill Action Bars code method instead p return the menu bar suitable for setting in the shell  createWindowContents setMenuBar fillActionBars
Creates the cool bar control p This should only be called if the advisor is defining custom window contents in code create Window Contents code The caller must lay out the cool bar appropriately within the parent but must not add remove or change items in the result hence the return type of code Control code The cool bar is populated by the window s cool bar manager The application can add to the cool bar manager in the advisor s code fill Action Bars code method instead p param parent the parent composite return the cool bar control suitable for laying out in the parent  createWindowContents fillActionBars
Creates the status line control p This should only be called if the advisor is defining custom window contents in code create Window Contents code The caller must lay out the status line appropriately within the parent but must not add remove or change items in the result hence the return type of code Control code The status line is populated by the window s status line manager The application can add to the status line manager in the advisor s code fill Action Bars code method instead p param parent the parent composite return the status line control suitable for laying out in the parent  createWindowContents fillActionBars
Creates the page composite in which the window s pages and their views and editors appear p This should only be called if the advisor is defining custom window contents in code create Window Contents code The caller must lay out the page composite appropriately within the parent but must not add remove or change items in the result hence the return type of code Control code The page composite is populated by the workbench p param parent the parent composite return the page composite suitable for laying out in the parent  createWindowContents

Creates and initializes a new workbench advisor instance protected Workbench Advisor do nothing  WorkbenchAdvisor
Remembers the configurer and calls code initialize code p For internal use by the workbench only p param configurer an object for configuring the workbench public final void internal Basic Initialize I Workbench Configurer configurer if workbench Configurer null throw new Illegal State Exception this workbench Configurer configurer initialize configurer  internalBasicInitialize IWorkbenchConfigurer workbenchConfigurer IllegalStateException workbenchConfigurer
Performs arbitrary initialization before the workbench starts running p This method is called during workbench initialization prior to any windows being opened Clients must not call this method directly although super calls are okay The default implementation does nothing Subclasses may override Typical clients will use the configurer passed in to tweak the workbench If further tweaking is required in the future the configurer may be obtained using code get Workbench Configurer code p param configurer an object for configuring the workbench public void initialize I Workbench Configurer configurer do nothing  getWorkbenchConfigurer IWorkbenchConfigurer
Returns the workbench configurer for the advisor Can be code null code if the advisor is not initialized yet return the workbench configurer or code null code if the advisor is not initialized yet protected I Workbench Configurer get Workbench Configurer return workbench Configurer  IWorkbenchConfigurer getWorkbenchConfigurer workbenchConfigurer
Performs arbitrary actions just before the first workbench window is opened or restored p This method is called after the workbench has been initialized and just before the first window is about to be opened Clients must not call this method directly although super calls are okay The default implementation does nothing Subclasses may override p public void pre Startup do nothing  preStartup
Performs arbitrary actions after the workbench windows have been opened or restored but before the main event loop is run p This method is called just after the windows have been opened Clients must not call this method directly although super calls are okay The default implementation does nothing Subclasses may override It is okay to call code I Workbench close code from this method p public void post Startup do nothing  IWorkbench postStartup
Performs arbitrary finalization before the workbench is about to shut down p This method is called immediately prior to workbench shutdown before any windows have been closed Clients must not call this method directly although super calls are okay The default implementation returns code true code Subclasses may override p p The advisor may veto a regular shutdown by returning code false code although this will be ignored if the workbench is being forced to shut down p return code true code to allow the workbench to proceed with shutdown code false code to veto a non forced shutdown public boolean pre Shutdown return true  preShutdown
Performs arbitrary finalization after the workbench stops running p This method is called during workbench shutdown after all windows have been closed Clients must not call this method directly although super calls are okay The default implementation does nothing Subclasses may override p public void post Shutdown do nothing  postShutdown
Performs arbitrary actions when the event loop crashes the code that handles a UI event throws an exception that is not caught p This method is called when the code handling a UI event throws an exception In a perfectly functioning application this method would never be called In practice it comes into play when there are bugs in the code that trigger unchecked runtime exceptions It is also activated when the system runs short of memory etc Fatal errors Thread Death are not passed on to this method as there is nothing that could be done p p Clients must not call this method directly although super calls are okay The default implementation logs the problem so that it does not go unnoticed Subclasses may override or extend this method It is generally a bad idea to override with an empty method and you should be especially careful when handling Errors p param exception the uncaught exception that was thrown inside the UI event loop public void event Loop Exception Throwable exception Protection from client doing super null call if exception null return try Log the exception String msg exception get Message if msg null msg exception to String Workbench Plugin log Unhandled event loop exception NON NLS 1 new Status I Status ERROR PlatformUI PLUGIN ID 0 msg exception Handle nested exception from SWT see bug 6312 Throwable nested null if exception instanceof SWT Exception nested SWT Exception exception throwable else if exception instanceof SWT Error nested SWT Error exception throwable if nested null msg nested get Message if msg null msg nested to String Workbench Plugin log SWT nested exception NON NLS 1 new Status I Status ERROR PlatformUI PLUGIN ID 0 msg nested Print it onto the console if debugging if Workbench Plugin DEBUG exception print Stack Trace catch Throwable e One of the log listeners probably failed Core should have logged the exception since its the first listener System err println Error while logging event loop exception NON NLS 1 exception print Stack Trace System err println Logging exception NON NLS 1 e print Stack Trace  ThreadDeath eventLoopException getMessage toString WorkbenchPlugin IStatus PLUGIN_ID SWTException SWTException SWTError SWTError getMessage toString WorkbenchPlugin IStatus PLUGIN_ID WorkbenchPlugin printStackTrace printStackTrace printStackTrace
Performs arbitrary work or yields when there are no events to be processed p This method is called when there are currently no more events on the queue to be processed at the moment p p Clients must not call this method directly although super calls are okay The default implementation yields until new events enter the queue Subclasses may override or extend this method It is generally a bad idea to override with an empty method It is okay to call code I Workbench close code from this method p param display the main display of the workbench UI public void event Loop Idle Display display default yield cpu until new events enter the queue display sleep  IWorkbench eventLoopIdle
Performs arbitrary actions before the given workbench window is opened p This method is called before the window s controls have been created Clients must not call this method directly although super calls are okay The default implementation does nothing Subclasses may override Typical clients will use the configurer passed in to tweak the workbench window in an application specific way however filling the window s menu bar tool bar and status line must be done in link fill Action Bars fill Action Bars which is called immediately after this method is called p param configurer an object for configuring the particular workbench window being opened public void pre Window Open I Workbench Window Configurer configurer do nothing  fillActionBars fillActionBars preWindowOpen IWorkbenchWindowConfigurer
Configures the action bars using the given action bar configurer Under normal circumstances code flags code does not include code FILL PROXY code meaning this is a request to fill the actions bars of the given workbench window the remaining flags indicate which combination of the menu bar code FILL MENU BAR code the tool bar code FILL COOL BAR code and the status line code FILL STATUS LINE code are to be filled p If code flags code does include code FILL PROXY code then this is a request to describe the actions bars of the given workbench window which will already have been filled again the remaining flags indicate which combination of the menu bar the tool bar and the status line are to be described The actions included in the proxy action bars can be the same instances as in the actual window s action bars Calling code Action Factory code to create new action instances is not recommended because these actions internally register listeners with the window and there is no opportunity to dispose of these actions p p This method is called just after link pre Window Open pre Window Open Clients must not call this method directly although super calls are okay The default implementation does nothing Subclasses may override p param window the workbench window param configurer the action bar configurer object param flags bit mask composed from the constants link FILL MENU BAR FILL MENU BAR link FILL COOL BAR FILL COOL BAR link FILL STATUS LINE FILL STATUS LINE and link FILL PROXY FILL PROXY Note should 1st param be I Workbench Window Configurer to be more consistent with other methods Note suggest adding Action Builder as API to encapsulate the action building outside of the advisor and to handle the common pattern of hanging onto the action builder in order to properly handle FILL PROXY public void fill Action Bars I Workbench Window window I Action Bar Configurer configurer int flags do nothing by default  FILL_PROXY FILL_MENU_BAR FILL_COOL_BAR FILL_STATUS_LINE FILL_PROXY ActionFactory preWindowOpen preWindowOpen FILL_MENU_BAR FILL_MENU_BAR FILL_COOL_BAR FILL_COOL_BAR FILL_STATUS_LINE FILL_STATUS_LINE FILL_PROXY FILL_PROXY IWorkbenchWindowConfigurer ActionBuilder FILL_PROXY fillActionBars IWorkbenchWindow IActionBarConfigurer
Performs arbitrary actions after the given workbench window has been restored but before it is opened p This method is called after a previously saved window have been recreated This method is not called when a new window is created from scratch This method is never called when a workbench is started for the very first time or when workbench state is not saved or restored Clients must not call this method directly although super calls are okay The default implementation does nothing Subclasses may override It is okay to call code I Workbench close code from this method p param configurer an object for configuring the particular workbench window just restored Note document checked exception public void post Window Restore I Workbench Window Configurer configurer throws Workbench Exception do nothing  IWorkbench postWindowRestore IWorkbenchWindowConfigurer WorkbenchException
Opens the introduction componenet p Clients must not call this method directly although super calls are okay The default implementation opens the intro in the first window provided the preference I Workbench Preferences SHOW INTRO is code true code If an intro is shown then this preference will be set to code false code Subsequently and intro will be shown only if code Workbench Configurer get Save And Restore code returns code true code and the introduction was visible on last shutdown Subclasses may override p param configurer configurer an object for configuring the particular workbench window just created public void open Intro I Workbench Window Configurer configurer if intro Opened return intro Opened true boolean show Intro Pref Util getAPI Preference Store get Boolean I Workbench Preference Constants SHOW INTRO if show Intro return if get Workbench Configurer get Workbench get Intro Manager has Intro get Workbench Configurer get Workbench get Intro Manager show Intro configurer get Window false Pref Util getAPI Preference Store set Value I Workbench Preference Constants SHOW INTRO false Pref Util saveAPI Prefs  IWorkbenchPreferences SHOW_INTRO WorkbenchConfigurer getSaveAndRestore openIntro IWorkbenchWindowConfigurer introOpened introOpened showIntro PrefUtil getAPIPreferenceStore getBoolean IWorkbenchPreferenceConstants SHOW_INTRO showIntro getWorkbenchConfigurer getWorkbench getIntroManager hasIntro getWorkbenchConfigurer getWorkbench getIntroManager showIntro getWindow PrefUtil getAPIPreferenceStore setValue IWorkbenchPreferenceConstants SHOW_INTRO PrefUtil saveAPIPrefs
Performs arbitrary actions after the given workbench window has been created possibly after being restored but has not yet been opened p This method is called after a new window has been created from scratch or when a previously saved window has been restored In the latter case this method is called after code post Window Restore code Clients must not call this method directly although super calls are okay The default implementation does nothing Subclasses may override p param configurer an object for configuring the particular workbench window just created public void post Window Create I Workbench Window Configurer configurer do nothing  postWindowRestore postWindowCreate IWorkbenchWindowConfigurer
Performs arbitrary actions after the given workbench window has been opened possibly after being restored p This method is called after a window has been opened This method is called after a new window has been created from scratch or when a previously saved window has been restored Clients must not call this method directly although super calls are okay The default implementation does nothing Subclasses may override p param configurer an object for configuring the particular workbench window just opened public void post Window Open I Workbench Window Configurer configurer do nothing  postWindowOpen IWorkbenchWindowConfigurer
Performs arbitrary actions as the given workbench window s shell is being closed directly and possibly veto the close p This method is called from a Shell Listener associated with the workbench window It is not called when the window is being closed for other reasons Clients must not call this method directly although super calls are okay The default implementation does nothing Subclasses may override Typical clients may use the configurer passed in to access the workbench window being closed If this method returns code false code then the user s request to close the shell is ignored This gives the workbench advisor an opportunity to query the user and or veto the closing of a window under some circumstances p param configurer an object for configuring the particular workbench window whose shell is being closed return code true code to allow the window to close and code false code to prevent the window from closing see org eclipse ui I Workbench Window close public boolean pre Window Shell Close I Workbench Window Configurer configurer do nothing but allow the close to proceed return true  ShellListener IWorkbenchWindow preWindowShellClose IWorkbenchWindowConfigurer
Performs arbitrary actions after the given workbench window is closed p This method is called after the window s controls have been disposed Clients must not call this method directly although super calls are okay The default implementation does nothing Subclasses may override Typical clients will use the configurer passed in to tweak the workbench window in an application specific way p param configurer an object for configuring the particular workbench window being closed public void post Window Close I Workbench Window Configurer configurer do nothing  postWindowClose IWorkbenchWindowConfigurer
Returns whether the menu with the given id is an application menu of the given window This is used during OLE in place editing Application menus should be preserved during menu merging All other menus may be removed from the window p The default implementation returns false Subclasses may override p param configurer an object for configuring the workbench window param menu Id the menu id return code true code for application menus and code false code for part specific menus public boolean is Application Menu I Workbench Window Configurer configurer String menu Id default not an application menu return false  menuId isApplicationMenu IWorkbenchWindowConfigurer menuId
Returns the default input for newly created workbench pages p The default implementation returns code null code Subclasses may override p return the default input for a new workbench window page or code null code if none public I Adaptable get Default Page Input default no input return null  IAdaptable getDefaultPageInput
Returns the id of the perspective to use for the initial workbench window p This method is called during startup when the workbench is creating the first new window Subclasses must implement p p If the link I Workbench Preference Constants DEFAULT PERSPECTIVE ID preference is specified it supercedes the perspective specified here p return the id of the perspective for the initial window  IWorkbenchPreferenceConstants DEFAULT_PERSPECTIVE_ID
Returns the id of the preference page that should be presented most prominently p The default implementation returns code null code Subclasses may override p return the id of the preference page or code null code if none public String get Main Preference Page Id default no opinion return null  getMainPreferencePageId
Creates the contents of the window p The default implementation adds a menu bar a cool bar a status line a perspective bar and a fast view bar The visibility of these controls can be configured using the code set Show code methods on code I Workbench Window Configurer code p p Subclasses may override to define custom window contents and layout but must call code I Workbench Window Configurer create Page Composite code p param configurer the window configurer param shell the window s shell see I Workbench Window Configurer create Menu Bar see I Workbench Window Configurer create Cool Bar Control see I Workbench Window Configurer create Status Line Control see I Workbench Window Configurer create Page Composite public void create Window Contents I Workbench Window Configurer configurer Shell shell Workbench Window Configurer configurer create Default Contents shell  setShow IWorkbenchWindowConfigurer IWorkbenchWindowConfigurer createPageComposite IWorkbenchWindowConfigurer createMenuBar IWorkbenchWindowConfigurer createCoolBarControl IWorkbenchWindowConfigurer createStatusLineControl IWorkbenchWindowConfigurer createPageComposite createWindowContents IWorkbenchWindowConfigurer WorkbenchWindowConfigurer createDefaultContents
Opens the workbench windows on startup The default implementation tries to restore the previously saved workbench state using code I Workbench Configurer restore Workbench State code If there was no previously saved state or if the restore failed then a first time window is opened using code I Workbench Configurer open First Time Window code return code true code to proceed with workbench startup or code false code to exit public boolean open Windows I Status status get Workbench Configurer restore State if status isOK if status get Code I Workbench Configurer RESTORE CODE EXIT return false if status get Code I Workbench Configurer RESTORE CODE RESET get Workbench Configurer open First Time Window return true  IWorkbenchConfigurer restoreWorkbenchState IWorkbenchConfigurer openFirstTimeWindow openWindows IStatus getWorkbenchConfigurer restoreState getCode IWorkbenchConfigurer RESTORE_CODE_EXIT getCode IWorkbenchConfigurer RESTORE_CODE_RESET getWorkbenchConfigurer openFirstTimeWindow

public CarbonUI Enhancer if fg About Action Name null Resource Bundle resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE try fg About Action Name resource Bundle get String About Action name NON NLS 1 catch Missing Resource Exception e fg About Action Name About NON NLS 1  CarbonUIEnhancer fgAboutActionName ResourceBundle resourceBundle ResourceBundle getBundle RESOURCE_BUNDLE fgAboutActionName resourceBundle getString AboutAction MissingResourceException fgAboutActionName
display sync Exec new Runnable public void run hook Application Menu display  syncExec hookApplicationMenu
public void early Startup final Display display Display get Default display sync Exec new Runnable public void run hook Application Menu display  earlyStartup getDefault syncExec hookApplicationMenu
Object target new Object int command Proc int next Handler int the Event int user Data if OS Get Event Kind the Event OS k Event Process Command HI Command command new HI Command OS Get Event Parameter the Event OS k Event Param Direct Object OS typeHI Command null HI Command sizeof null command switch command commandID case kHI Command Preferences return run Action preferences NON NLS 1 case kHI Command About return run Action about NON NLS 1 default break return OS event Not Handled Err  commandProc nextHandler theEvent userData GetEventKind theEvent kEventProcessCommand HICommand HICommand GetEventParameter theEvent kEventParamDirectObject typeHICommand HICommand kHICommandPreferences runAction kHICommandAbout runAction eventNotHandledErr
display dispose Exec new Runnable public void run command Callback dispose  disposeExec commandCallback
See Apple Technical Q A 1079 http developer apple com qa qa2001 qa1079 html private void hook Application Menu Display display Callback target Object target new Object int command Proc int next Handler int the Event int user Data if OS Get Event Kind the Event OS k Event Process Command HI Command command new HI Command OS Get Event Parameter the Event OS k Event Param Direct Object OS typeHI Command null HI Command sizeof null command switch command commandID case kHI Command Preferences return run Action preferences NON NLS 1 case kHI Command About return run Action about NON NLS 1 default break return OS event Not Handled Err final Callback command Callback new Callback target command Proc 3 NON NLS 1 int command Proc command Callback get Address if command Proc 0 command Callback dispose return give up Install event handler for commands int mask new int OS k Event Class Command OS k Event Process Command OS Install Event Handler OS Get Application Event Target command Proc mask length 2 mask 0 null create About Eclipse menu command int out Menu new int 1 short out Index new short 1 if OS Get Ind Menu Item With CommandID 0 kHI Command Preferences 1 out Menu out Index OS no Err out Menu 0 0 int menu out Menu 0 int l fg About Action Name length char buffer new char l fg About Action Name get Chars 0 l buffer 0 int str OS CF String Create With Characters OS kCF Allocator Default buffer l OS Insert Menu Item Text WithCF String menu str short 0 0 kHI Command About OS CF Release str add separator between About Preferences OS Insert Menu Item Text WithCF String menu 0 short 1 OS k Menu Item Attr Separator 0 enable pref menu OS Enable Menu Command menu kHI Command Preferences disable services menu OS Disable Menu Command menu kHI Command Services schedule disposal of callback object display dispose Exec new Runnable public void run command Callback dispose  hookApplicationMenu commandProc nextHandler theEvent userData GetEventKind theEvent kEventProcessCommand HICommand HICommand GetEventParameter theEvent kEventParamDirectObject typeHICommand HICommand kHICommandPreferences runAction kHICommandAbout runAction eventNotHandledErr commandCallback commandProc commandProc commandCallback getAddress commandProc commandCallback kEventClassCommand kEventProcessCommand InstallEventHandler GetApplicationEventTarget commandProc outMenu outIndex GetIndMenuItemWithCommandID kHICommandPreferences outMenu outIndex noErr outMenu outMenu fgAboutActionName fgAboutActionName getChars CFStringCreateWithCharacters kCFAllocatorDefault InsertMenuItemTextWithCFString kHICommandAbout CFRelease InsertMenuItemTextWithCFString kMenuItemAttrSeparator EnableMenuCommand kHICommandPreferences DisableMenuCommand kHICommandServices disposeExec commandCallback
Locate an action with the given id in the current menubar and run it private int run Action String action Id I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null Shell shell window get Shell Menu menubar shell get Menu Bar if menubar null for int i 0 i menubar get Item Count i Menu Item mi menubar get Item i Menu m mi get Menu for int j 0 j m get Item Count j Menu Item mi2 m get Item j Object o mi2 get Data if o instanceof Action Contribution Item Action Contribution Item aci Action Contribution Item o String id aci get Id if id null id equals action Id I Action action aci get Action if action null action is Enabled action run return OS no Err return OS event Not Handled Err  runAction actionId IWorkbenchWindow getWorkbench getActiveWorkbenchWindow getShell getMenuBar getItemCount MenuItem getItem getMenu getItemCount MenuItem getItem getData ActionContributionItem ActionContributionItem ActionContributionItem getId actionId IAction getAction isEnabled noErr eventNotHandledErr

Creates a new item element extension for handling the XML attributes of the given name param attribute Name the name of the attribute that this item extension handles exception Illegal Argument Exception if code attribute Name code is code null code public Abstract Item Extension Element String attribute Name if attribute Name null throw new Illegal Argument Exception this attribute Name attribute Name  attributeName IllegalArgumentException attributeName AbstractItemExtensionElement attributeName attributeName IllegalArgumentException attributeName attributeName
Returns the name of the XML attribute that this item extension handles return the name of the attribute that this item extension handles public final String get Attribute Name return this attribute Name  getAttributeName attributeName
Called by the cheat sheet framework to parse and extract information from the string value of the XML attribute param attribute Value the attribute value specified in the cheat sheet content file  attributeValue
Called by the cheat sheet framework when creating the visual representation of a step This method should add a small button suggested size 16x16 pixels to the given composite to decorate the step p Important note In some presentations of the cheatsheet the color of the background is varied to emphasize the current step Because of this it is important to always use the background color of the composite code composite get Background code as the background color for any additional controls otherwise the new controls will not match their surrounding p param composite the composite to add extra controls to  getBackground
Called by the cheat sheet framework to dispose of this item element extension p This is the last method called on the code Abstract Item Extension Element code At this point the controls if they were ever created have been disposed as part of an SWT composite There is no guarantee that create Control has been called so the controls may never have been created p p Within this method an item element extension may release any resources fonts images etc nbsp held by this part It is also very important to deregister all listeners p p Clients should not call this method the cheat sheet framework calls this method at appropriate times p  AbstractItemExtensionElement createControl

Creates a new cheat sheet listener public Cheat Sheet Listener do nothing  CheatSheetListener
Notifies this listener of the given cheat sheet event param event the cheat sheet event 

Non instantiable private Cheat Sheet Viewer Factory do nothing  CheatSheetViewerFactory
Creates a new cheat sheet viewer The viewer does not show any cheat sheet initially return a new cheat sheet viewer public static I Cheat Sheet Viewer create Cheat Sheet View return new Cheat Sheet Viewer  ICheatSheetViewer createCheatSheetView CheatSheetViewer

Runs this Cheat sheet aware action param params an array of strings param manager the cheat sheet manager 

Returns the type of this cheat sheet event return the event type code one of the event type constants declared on this class 
Returns the id of the cheat sheet that generated this event return the cheat sheet id 
Returns the cheat sheet manager responsible for executing the cheat sheet return the cheat sheet manager 

Returns the id of the cheat sheet managed by this manager return the cheat sheet id 
Returns the data value associated with the given key param key the key return the string data associated with the key or code null code none exception Illegal Argument Exception if code key code is code null code  IllegalArgumentException
Sets the data value associated with the given key p Data associated with a cheat sheet manager is remembered for the life of the manager All data is discarded when the cheat sheet is completed or restarted p param key the key param data the string data associated with the key or code null code to remove exception Illegal Argument Exception if code key code is code null code  IllegalArgumentException

Creates the SWT controls for this cheat sheet viewer p When the parent Composite is disposed this will automatically dispose the controls added by this viewer and release any other viewer specific state p param parent the parent control 
Returns the primary control associated with this viewer return the SWT control which displays this viewer s content or code null code if this viewer s controls have not yet been created 
Returns the id of the cheat sheet showing in this view return id the cheat sheet id or code null code if the view is not showing a cheat sheet 
public String get Cheat SheetID Asks this cheat sheet viewer to take focus public void set Focus  getCheatSheetID setFocus
Sets the cheat sheet viewer to show the cheat sheet with the given id The cheat sheet content file is located via the code org eclipse ui cheatsheet cheat Sheet Content code extension point The viewer shows an error message if there is no cheat sheet with the given id p p The execution states of open cheat sheets are maintained and persisted globally using the cheat sheet id as the key p param id the cheat sheet id or code null code to show no cheat sheet in this viewer  cheatSheetContent
Sets the cheat sheet viewer to show the cheat sheet with the given cheat sheet content file The viewer shows an error message if the cheat sheet content file cannot be opened or parsed p The execution states of open cheat sheets are maintained and persisted globally using the cheat sheet id as the key This means that each cheat sheet must have a distinct id including ones opened from UR Ls p p Use the other code set Input code method to clear the viewer that is call code set Input null code p param id the id to give this cheat sheet param name the name to give this cheat sheet param url URL of the cheat sheet content file exception Illegal Argument Exception if the parameters are code null code  URLs setInput setInput IllegalArgumentException

Creates an action that opens the cheat sheet with the given id The cheat sheet content file is located via the code org eclipse ui cheatsheet cheat Sheet Content code extension point param id the cheat sheet id exception Illegal Argument Exception if code id code is code null code public Open Cheat Sheet Action String id if id null throw new Illegal Argument Exception this id id  cheatSheetContent IllegalArgumentException OpenCheatSheetAction IllegalArgumentException
Creates an action that opens the cheat sheet with the given cheat sheet content file param id the id to give this cheat sheet param name the name to give this cheat sheet param url URL of the cheat sheet content file exception Illegal Argument Exception if the parameters are code null code public Open Cheat Sheet Action String id String name URL url if id null name null url null throw new Illegal Argument Exception this id id this name name this url url  IllegalArgumentException OpenCheatSheetAction IllegalArgumentException
public void run I Workbench workbench Cheat Sheet Plugin get Plugin get Workbench I Workbench Window window workbench get Active Workbench Window I Workbench Page page window get Active Page Cheat Sheet View view Cheat Sheet View page find View I Cheat Sheet Resource CHEAT SHEET VIEW ID if view null if url null view set Input id else view set Input id name url page bring To Top view else try view Cheat Sheet View page show View I Cheat Sheet Resource CHEAT SHEET VIEW ID page activate view if url null view set Input id else view set Input id name url catch Part Init Exception pie String message Cheat Sheet Plugin get Resource String I Cheat Sheet Resource LAUNCH SHEET ERROR I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message pie Cheat Sheet Plugin get Plugin get Log log status org eclipse jface dialogs Error Dialog open Error window get Shell Cheat Sheet Plugin get Resource String I Cheat Sheet Resource CHEAT SHEET ERROR OPENING null pie get Status return  IWorkbench CheatSheetPlugin getPlugin getWorkbench IWorkbenchWindow getActiveWorkbenchWindow IWorkbenchPage getActivePage CheatSheetView CheatSheetView findView ICheatSheetResource CHEAT_SHEET_VIEW_ID setInput setInput bringToTop CheatSheetView showView ICheatSheetResource CHEAT_SHEET_VIEW_ID setInput setInput PartInitException CheatSheetPlugin getResourceString ICheatSheetResource LAUNCH_SHEET_ERROR IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog ErrorDialog openError getShell CheatSheetPlugin getResourceString ICheatSheetResource CHEAT_SHEET_ERROR_OPENING getStatus

Creates a new live help action public Open Cheat Sheet From Help Action super  OpenCheatSheetFromHelpAction
see I Live Help Action set Initialization String String public void set Initialization String String data cheatsheetID data  ILiveHelpAction setInitializationString setInitializationString
Active help does not run on the UI thread so we must use sync Exec Display get Default sync Exec new Runnable public void run new Open Cheat Sheet Action cheatsheetID run  syncExec getDefault syncExec OpenCheatSheetAction
public void run Active help does not run on the UI thread so we must use sync Exec Display get Default sync Exec new Runnable public void run new Open Cheat Sheet Action cheatsheetID run  syncExec getDefault syncExec OpenCheatSheetAction

see I Handler add Handler Listener I Handler Listener public void add Handler Listener I Handler Listener handler Listener if handler Listener null throw new Null Pointer Exception if handler Listeners null handler Listeners new Array List if handler Listeners contains handler Listener handler Listeners add handler Listener  IHandler addHandlerListener IHandlerListener addHandlerListener IHandlerListener handlerListener handlerListener NullPointerException handlerListeners handlerListeners ArrayList handlerListeners handlerListener handlerListeners handlerListener
The default implementation does nothing Subclasses who attach listeners to other objects are encouraged to detach them in this method see org eclipse ui commands I Handler dispose public void dispose Do nothing  IHandler
Fires an event to all registered listeners describing changes to this instance param handler Event the event describing changes to this instance Must not be code null code protected void fire Handler Changed Handler Event handler Event if handler Event null throw new Null Pointer Exception if handler Listeners null for int i 0 i handler Listeners size i I Handler Listener handler Listeners get i handler Changed handler Event  handlerEvent fireHandlerChanged HandlerEvent handlerEvent handlerEvent NullPointerException handlerListeners handlerListeners IHandlerListener handlerListeners handlerChanged handlerEvent
This simply return an empty map The default implementation has no attributes see I Handler get Attribute Values By Name public Map get Attribute Values By Name return Collections EMPTY MAP  IHandler getAttributeValuesByName getAttributeValuesByName EMPTY_MAP
see I Handler remove Handler Listener I Handler Listener public void remove Handler Listener I Handler Listener handler Listener if handler Listener null throw new Null Pointer Exception if handler Listeners null handler Listeners remove handler Listener  IHandler removeHandlerListener IHandlerListener removeHandlerListener IHandlerListener handlerListener handlerListener NullPointerException handlerListeners handlerListeners handlerListener

public void property Change Property Change Event property Change Event String property property Change Event get Property if I Action ENABLED equals property I Action CHECKED equals property Map previous Attribute Values By Name attribute Values By Name attribute Values By Name get Attribute Values By Name From Action if attribute Values By Name equals previous Attribute Values By Name fire Handler Changed new Handler Event Action Handler this true previous Attribute Values By Name  propertyChange PropertyChangeEvent propertyChangeEvent propertyChangeEvent getProperty IAction IAction previousAttributeValuesByName attributeValuesByName attributeValuesByName getAttributeValuesByNameFromAction attributeValuesByName previousAttributeValuesByName fireHandlerChanged HandlerEvent ActionHandler previousAttributeValuesByName
Creates a new instance of this class given an instance of code I Action code param action the action Must not be code null code public Action Handler I Action action if action null throw new Null Pointer Exception this action action this attribute Values By Name get Attribute Values By Name From Action property Change Listener new I Property Change Listener public void property Change Property Change Event property Change Event String property property Change Event get Property if I Action ENABLED equals property I Action CHECKED equals property Map previous Attribute Values By Name attribute Values By Name attribute Values By Name get Attribute Values By Name From Action if attribute Values By Name equals previous Attribute Values By Name fire Handler Changed new Handler Event Action Handler this true previous Attribute Values By Name this action add Property Change Listener property Change Listener  IAction ActionHandler IAction NullPointerException attributeValuesByName getAttributeValuesByNameFromAction propertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent propertyChangeEvent propertyChangeEvent getProperty IAction IAction previousAttributeValuesByName attributeValuesByName attributeValuesByName getAttributeValuesByNameFromAction attributeValuesByName previousAttributeValuesByName fireHandlerChanged HandlerEvent ActionHandler previousAttributeValuesByName addPropertyChangeListener propertyChangeListener
Removes the property change listener from the action see org eclipse ui commands I Handler dispose public void dispose action remove Property Change Listener property Change Listener  IHandler removePropertyChangeListener propertyChangeListener
see I Handler execute Map public Object execute Map parameter Values By Name throws Execution Exception if action get Style I Action AS CHECK BOX action get Style I Action AS RADIO BUTTON action set Checked action is Checked try action run With Event new Event catch Exception e throw new Execution Exception While executing the action an exception occurred e NON NLS 1 return null  IHandler parameterValuesByName ExecutionException getStyle IAction AS_CHECK_BOX getStyle IAction AS_RADIO_BUTTON setChecked isChecked runWithEvent ExecutionException
see I Handler get Attribute Values By Name public Map get Attribute Values By Name return attribute Values By Name  IHandler getAttributeValuesByName getAttributeValuesByName attributeValuesByName
An accessor for the attribute names from the action This reads out all of the attributes from an action into a local map return A map of the attribute values indexed by the attribute name The attributes names are strings but the values can by any object private Map get Attribute Values By Name From Action Map map new Hash Map map put ATTRIBUTE CHECKED action is Checked Boolean TRUE Boolean FALSE map put ATTRIBUTE ENABLED action is Enabled Boolean TRUE Boolean FALSE boolean handled true if action instanceof Retarget Action Retarget Action retarget Action Retarget Action action handled retarget Action get Action Handler null map put ATTRIBUTE HANDLED handled Boolean TRUE Boolean FALSE map put ATTRIBUTE ID action get Id map put ATTRIBUTE STYLE new Integer action get Style return Collections unmodifiable Map map  getAttributeValuesByNameFromAction HashMap ATTRIBUTE_CHECKED isChecked ATTRIBUTE_ENABLED isEnabled RetargetAction RetargetAction retargetAction RetargetAction retargetAction getActionHandler ATTRIBUTE_HANDLED ATTRIBUTE_ID getId ATTRIBUTE_STYLE getStyle unmodifiableMap

Creates a new instance of this class param category the instance of the interface that changed param defined Changed true iff the defined property changed param name Changed true iff the name property changed public Category Event I Category category boolean defined Changed boolean name Changed if category null throw new Null Pointer Exception this category category this defined Changed defined Changed this name Changed name Changed  definedChanged nameChanged CategoryEvent ICategory definedChanged nameChanged NullPointerException definedChanged definedChanged nameChanged nameChanged
Returns the instance of the interface that changed return the instance of the interface that changed Guaranteed not to be code null code public I Category get Category return category  ICategory getCategory
Returns whether or not the defined property changed return true iff the defined property changed public boolean has Defined Changed return defined Changed  hasDefinedChanged definedChanged
Returns whether or not the name property changed return true iff the name property changed public boolean has Name Changed return name Changed  hasNameChanged nameChanged

Creates a new instance of this class param command the instance of the interface that changed param attribute Values By Name Changed true iff the attribute Values By Name property changed param category Id Changed true iff the category Id property changed param defined Changed true iff the defined property changed param description Changed true iff the description property changed param handled Changed true iff the handled property changed param key Sequence Bindings Changed true iff the key Sequence Bindings property changed param name Changed true iff the name property changed param previous Attribute Values By Name the map of previous attribute values by name This map may be empty If this map is not empty it s collection of keys must only contain instances of code String code This map must be code null code if attribute Values By Name Changed is code false code and must not be null if attribute Values By Name Changed is code true code public Command Event I Command command boolean attribute Values By Name Changed boolean category Id Changed boolean defined Changed boolean description Changed boolean handled Changed boolean key Sequence Bindings Changed boolean name Changed Map previous Attribute Values By Name if command null throw new Null Pointer Exception if attribute Values By Name Changed previous Attribute Values By Name null throw new Illegal Argument Exception if attribute Values By Name Changed this previous Attribute Values By Name Util safe Copy previous Attribute Values By Name String class Object class false true this command command this attribute Values By Name Changed attribute Values By Name Changed this category Id Changed category Id Changed this defined Changed defined Changed this description Changed description Changed this handled Changed handled Changed this key Sequence Bindings Changed key Sequence Bindings Changed this name Changed name Changed  attributeValuesByNameChanged attributeValuesByName categoryIdChanged categoryId definedChanged descriptionChanged handledChanged keySequenceBindingsChanged keySequenceBindings nameChanged previousAttributeValuesByName attributeValuesByNameChanged attributeValuesByNameChanged CommandEvent ICommand attributeValuesByNameChanged categoryIdChanged definedChanged descriptionChanged handledChanged keySequenceBindingsChanged nameChanged previousAttributeValuesByName NullPointerException attributeValuesByNameChanged previousAttributeValuesByName IllegalArgumentException attributeValuesByNameChanged previousAttributeValuesByName safeCopy previousAttributeValuesByName attributeValuesByNameChanged attributeValuesByNameChanged categoryIdChanged categoryIdChanged definedChanged definedChanged descriptionChanged descriptionChanged handledChanged handledChanged keySequenceBindingsChanged keySequenceBindingsChanged nameChanged nameChanged
Returns the instance of the interface that changed return the instance of the interface that changed Guaranteed not to be code null code public I Command get Command return command  ICommand getCommand
Returns the map of previous attribute values by name return the map of previous attribute values by name This map may be empty If this map is not empty it s collection of keys is guaranteed to only contain instances of code String code This map is guaranteed to be code null code if have Attribute Values By Name Changed is code false code and is guaranteed to not be null if have Attribute Values By Name Changed is code true code public Map get Previous Attribute Values By Name return previous Attribute Values By Name  haveAttributeValuesByNameChanged haveAttributeValuesByNameChanged getPreviousAttributeValuesByName previousAttributeValuesByName
Returns whether or not the category Id property changed return true iff the category Id property changed public boolean has Category Id Changed return category Id Changed  categoryId categoryId hasCategoryIdChanged categoryIdChanged
Returns whether or not the defined property changed return true iff the defined property changed public boolean has Defined Changed return defined Changed  hasDefinedChanged definedChanged
Returns whether or not the description property changed return true iff the description property changed public boolean has Description Changed return description Changed  hasDescriptionChanged descriptionChanged
Returns whether or not the handled property changed return true iff the handled property changed public boolean has Handled Changed return handled Changed  hasHandledChanged handledChanged
Returns whether or not the name property changed return true iff the name property changed public boolean has Name Changed return name Changed  hasNameChanged nameChanged
Returns whether or not the attribute Values By Name property changed return true iff the attribute Values By Name property changed public boolean have Attribute Values By Name Changed return attribute Values By Name Changed  attributeValuesByName attributeValuesByName haveAttributeValuesByNameChanged attributeValuesByNameChanged
Returns whether or not the key Sequence Bindings property changed return true iff the key Sequence Bindings property changed public boolean have Key Sequence Bindings Changed return key Sequence Bindings Changed  keySequenceBindings keySequenceBindings haveKeySequenceBindingsChanged keySequenceBindingsChanged

Creates a new instance of this class with the specified detail message param message the detail message public Command Exception String message super message  CommandException
Creates a new instance of this class with the specified detail message and cause param message the detail message param cause the cause public Command Exception String message Throwable cause super message cause  CommandException

Creates a new instance of this class param command Manager the instance of the interface that changed param active Context Ids Changed true iff the active Context Ids Changed property changed param active Key Configuration Id Changed true iff the active Key Configuration Id Changed property changed param active Locale Changed true iff the active Locale Changed property changed param active Platform Changed true iff the active Platform Changed property changed param defined Category Ids Changed true iff the defined Category Ids Changed property changed param defined Command Ids Changed true iff the defined Command Ids Changed property changed param defined Key Configuration Ids Changed true iff the defined Key Configuration Ids Changed property changed param previously Defined Category Ids the set of identifiers to previously defined categories This set may be empty If this set is not empty it must only contain instances of code String code This set must be code null code if defined Category Ids Changed is code false code and must not be null if defined Category Ids Changed is code true code param previously Defined Command Ids the set of identifiers to previously defined commands This set may be empty If this set is not empty it must only contain instances of code String code This set must be code null code if defined Command Ids Changed is code false code and must not be null if defined Context Ids Changed is code true code param previously Defined Key Configuration Ids the set of identifiers to previously defined key configurations This set may be empty If this set is not empty it must only contain instances of code String code This set must be code null code if defined Key Configuration Ids Changed is code false code and must not be null if defined Key Configuration Ids Changed is code true code public Command Manager Event I Command Manager command Manager boolean active Context Ids Changed boolean active Key Configuration Id Changed boolean active Locale Changed boolean active Platform Changed boolean defined Category Ids Changed boolean defined Command Ids Changed boolean defined Key Configuration Ids Changed Set previously Defined Category Ids Set previously Defined Command Ids Set previously Defined Key Configuration Ids if command Manager null throw new Null Pointer Exception if defined Category Ids Changed previously Defined Category Ids null throw new Illegal Argument Exception if defined Command Ids Changed previously Defined Command Ids null throw new Illegal Argument Exception if defined Key Configuration Ids Changed previously Defined Key Configuration Ids null throw new Illegal Argument Exception if defined Category Ids Changed this previously Defined Category Ids Util safe Copy previously Defined Category Ids String class else this previously Defined Category Ids null if defined Command Ids Changed this previously Defined Command Ids Util safe Copy previously Defined Command Ids String class else this previously Defined Command Ids null if defined Key Configuration Ids Changed this previously Defined Key Configuration Ids Util safe Copy previously Defined Key Configuration Ids String class else this previously Defined Key Configuration Ids null this command Manager command Manager this active Context Ids Changed active Context Ids Changed this active Key Configuration Id Changed active Key Configuration Id Changed this active Locale Changed active Locale Changed this active Platform Changed active Platform Changed this defined Category Ids Changed defined Category Ids Changed this defined Command Ids Changed defined Command Ids Changed this defined Key Configuration Ids Changed defined Key Configuration Ids Changed  commandManager activeContextIdsChanged activeContextIdsChanged activeKeyConfigurationIdChanged activeKeyConfigurationIdChanged activeLocaleChanged activeLocaleChanged activePlatformChanged activePlatformChanged definedCategoryIdsChanged definedCategoryIdsChanged definedCommandIdsChanged definedCommandIdsChanged definedKeyConfigurationIdsChanged definedKeyConfigurationIdsChanged previouslyDefinedCategoryIds definedCategoryIdsChanged definedCategoryIdsChanged previouslyDefinedCommandIds definedCommandIdsChanged definedContextIdsChanged previouslyDefinedKeyConfigurationIds definedKeyConfigurationIdsChanged definedKeyConfigurationIdsChanged CommandManagerEvent ICommandManager commandManager activeContextIdsChanged activeKeyConfigurationIdChanged activeLocaleChanged activePlatformChanged definedCategoryIdsChanged definedCommandIdsChanged definedKeyConfigurationIdsChanged previouslyDefinedCategoryIds previouslyDefinedCommandIds previouslyDefinedKeyConfigurationIds commandManager NullPointerException definedCategoryIdsChanged previouslyDefinedCategoryIds IllegalArgumentException definedCommandIdsChanged previouslyDefinedCommandIds IllegalArgumentException definedKeyConfigurationIdsChanged previouslyDefinedKeyConfigurationIds IllegalArgumentException definedCategoryIdsChanged previouslyDefinedCategoryIds safeCopy previouslyDefinedCategoryIds previouslyDefinedCategoryIds definedCommandIdsChanged previouslyDefinedCommandIds safeCopy previouslyDefinedCommandIds previouslyDefinedCommandIds definedKeyConfigurationIdsChanged previouslyDefinedKeyConfigurationIds safeCopy previouslyDefinedKeyConfigurationIds previouslyDefinedKeyConfigurationIds commandManager commandManager activeContextIdsChanged activeContextIdsChanged activeKeyConfigurationIdChanged activeKeyConfigurationIdChanged activeLocaleChanged activeLocaleChanged activePlatformChanged activePlatformChanged definedCategoryIdsChanged definedCategoryIdsChanged definedCommandIdsChanged definedCommandIdsChanged definedKeyConfigurationIdsChanged definedKeyConfigurationIdsChanged
Returns the instance of the interface that changed return the instance of the interface that changed Guaranteed not to be code null code public I Command Manager get Command Manager return command Manager  ICommandManager getCommandManager commandManager
Returns the set of identifiers to previously defined categories return the set of identifiers to previously defined categories This set may be empty If this set is not empty it is guaranteed to only contain instances of code String code This set is guaranteed to be code null code if have Defined Category Ids Changed is code false code and is guaranteed to not be null if have Defined Category Ids Changed is code true code public Set get Previously Defined Category Ids return previously Defined Category Ids  haveDefinedCategoryIdsChanged haveDefinedCategoryIdsChanged getPreviouslyDefinedCategoryIds previouslyDefinedCategoryIds
Returns the set of identifiers to previously defined commands return the set of identifiers to previously defined commands This set may be empty If this set is not empty it is guaranteed to only contain instances of code String code This set is guaranteed to be code null code if have Defined Command Ids Changed is code false code and is guaranteed to not be null if have Defined Command Ids Changed is code true code public Set get Previously Defined Command Ids return previously Defined Command Ids  haveDefinedCommandIdsChanged haveDefinedCommandIdsChanged getPreviouslyDefinedCommandIds previouslyDefinedCommandIds
Returns the set of identifiers to previously defined key conigurations return the set of identifiers to previously defined key configurations This set may be empty If this set is not empty it is guaranteed to only contain instances of code String code This set is guaranteed to be code null code if have Defined Key Configuration Ids Changed is code false code and is guaranteed to not be null if have Defined Key Configuration Ids Changed is code true code public Set get Previously Defined Key Configuration Ids return previously Defined Key Configuration Ids  haveDefinedKeyConfigurationIdsChanged haveDefinedKeyConfigurationIdsChanged getPreviouslyDefinedKeyConfigurationIds previouslyDefinedKeyConfigurationIds
Returns whether or not the active Key Configuration Id property changed return true iff the active Key Configuration Id property changed public boolean has Active Key Configuration Id Changed return active Key Configuration Id Changed  activeKeyConfigurationId activeKeyConfigurationId hasActiveKeyConfigurationIdChanged activeKeyConfigurationIdChanged
Returns whether or not the active Locale property changed return true iff the active Locale property changed public boolean has Active Locale Changed return active Locale Changed  activeLocale activeLocale hasActiveLocaleChanged activeLocaleChanged
Returns whether or not the active Platform property changed return true iff the active Platform property changed public boolean has Active Platform Changed return active Platform Changed  activePlatform activePlatform hasActivePlatformChanged activePlatformChanged
Returns whether or not the active Context Ids property changed return true iff the active Context Ids property changed public boolean have Active Context Ids Changed return active Context Ids Changed  activeContextIds activeContextIds haveActiveContextIdsChanged activeContextIdsChanged
Returns whether or not the defined Category Ids property changed return true iff the defined Category Ids property changed public boolean have Defined Category Ids Changed return defined Category Ids Changed  definedCategoryIds definedCategoryIds haveDefinedCategoryIdsChanged definedCategoryIdsChanged
Returns whether or not the defined Command Ids property changed return true iff the defined Command Ids property changed public boolean have Defined Command Ids Changed return defined Command Ids Changed  definedCommandIds definedCommandIds haveDefinedCommandIdsChanged definedCommandIdsChanged
Returns whether or not the defined Key Configuration Ids property changed return true iff the defined Key Configuration Ids property changed public boolean have Defined Key Configuration Ids Changed return defined Key Configuration Ids Changed  definedKeyConfigurationIds definedKeyConfigurationIds haveDefinedKeyConfigurationIdsChanged definedKeyConfigurationIdsChanged

Creates a new instance of this class with the specified detail message and cause param message the detail message param cause the cause public Execution Exception String message Throwable cause super message cause  ExecutionException

Creates a new instance of this class param handler the instance of the interface that changed param attribute Values By Name Changed true iff the attribute Values By Name property changed param previous Attribute Values By Name the map of previous attribute values by name This map may be empty If this map is not empty it s collection of keys must only contain instances of code String code This map must be code null code if attribute Values By Name Changed is code false code and must not be null if attribute Values By Name Changed is code true code public Handler Event I Handler handler boolean attribute Values By Name Changed Map previous Attribute Values By Name if handler null throw new Null Pointer Exception if attribute Values By Name Changed previous Attribute Values By Name null throw new Illegal Argument Exception if attribute Values By Name Changed this previous Attribute Values By Name Util safe Copy previous Attribute Values By Name String class Object class false true else this previous Attribute Values By Name null this handler handler this attribute Values By Name Changed attribute Values By Name Changed  attributeValuesByNameChanged attributeValuesByName previousAttributeValuesByName attributeValuesByNameChanged attributeValuesByNameChanged HandlerEvent IHandler attributeValuesByNameChanged previousAttributeValuesByName NullPointerException attributeValuesByNameChanged previousAttributeValuesByName IllegalArgumentException attributeValuesByNameChanged previousAttributeValuesByName safeCopy previousAttributeValuesByName previousAttributeValuesByName attributeValuesByNameChanged attributeValuesByNameChanged
Returns the instance of the interface that changed return the instance of the interface that changed Guaranteed not to be code null code public I Handler get Handler return handler  IHandler getHandler
Returns the map of previous attribute values by name return the map of previous attribute values by name This map may be empty If this map is not empty it s collection of keys is guaranteed to only contain instances of code String code This map is guaranteed to be code null code if have Attribute Values By Name Changed is code false code and is guaranteed to not be null if have Attribute Values By Name Changed is code true code public Map get Previous Attribute Values By Name return previous Attribute Values By Name  haveAttributeValuesByNameChanged haveAttributeValuesByNameChanged getPreviousAttributeValuesByName previousAttributeValuesByName
Returns whether or not the attribute Values By Name property changed return true iff the attribute Values By Name property changed public boolean have Attribute Values By Name Changed return attribute Values By Name Changed  attributeValuesByName attributeValuesByName haveAttributeValuesByNameChanged attributeValuesByNameChanged

Creates a new instance of this class param active Part Id the identifier of the part that must be active for this request to be considered May be code null code param active Shell the shell that must be active for this request to be considered May be code null code param active Workbench Part Site the workbench part site of the part that must be active for this request to be considered May be code null code param command Id the identifier of the command to be handled Must not be code null code param handler the handler Must not be code null code param priority the priority Must not be code null code public Handler Submission String active Part Id Shell active Shell I Workbench Part Site active Workbench Part Site String command Id I Handler handler Priority priority if command Id null handler null priority null throw new Null Pointer Exception this active Part Id active Part Id this active Shell active Shell this active Workbench Part Site active Workbench Part Site this command Id command Id this handler handler this priority priority  activePartId activeShell activeWorkbenchPartSite commandId HandlerSubmission activePartId activeShell IWorkbenchPartSite activeWorkbenchPartSite commandId IHandler commandId NullPointerException activePartId activePartId activeShell activeShell activeWorkbenchPartSite activeWorkbenchPartSite commandId commandId
see Comparable compare To java lang Object public int compare To Object object Handler Submission casted Object Handler Submission object int compare To Util compare active Workbench Part Site casted Object active Workbench Part Site if compare To 0 compare To Util compare active Part Id casted Object active Part Id if compare To 0 compare To Util compare active Shell casted Object active Shell if compare To 0 compare To Util compare priority casted Object priority if compare To 0 compare To Util compare command Id casted Object command Id if compare To 0 compare To Util compare handler casted Object handler return compare To  compareTo compareTo HandlerSubmission castedObject HandlerSubmission compareTo activeWorkbenchPartSite castedObject activeWorkbenchPartSite compareTo compareTo activePartId castedObject activePartId compareTo compareTo activeShell castedObject activeShell compareTo compareTo castedObject compareTo compareTo commandId castedObject commandId compareTo compareTo castedObject compareTo
Returns the identifier of the part that must be active for this request to be considered return the identifier of the part that must be active for this request to be considered May be code null code public String get Active Part Id return active Part Id  getActivePartId activePartId
Returns the shell that must be active for this request to be considered return the shell that must be active for this request to be considered May be code null code public Shell get Active Shell return active Shell  getActiveShell activeShell
Returns the workbench part site of the part that must be active for this request to be considered return the workbench part site of the part that must be active for this request to be considered May be code null code public I Workbench Part Site get Active Workbench Part Site return active Workbench Part Site  IWorkbenchPartSite getActiveWorkbenchPartSite activeWorkbenchPartSite
Returns the identifier of the command to be handled return the identifier of the command to be handled Guaranteed not to be code null code public String get Command Id return command Id  getCommandId commandId
Returns the handler return the handler Guaranteed not to be code null code public I Handler get Handler return handler  IHandler getHandler
Returns the priority return the priority Guaranteed not to be code null code public Priority get Priority return priority  getPriority
see Object hash Code public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code active Part Id hash Code hash Code HASH FACTOR Util hash Code active Shell hash Code hash Code HASH FACTOR Util hash Code active Workbench Part Site hash Code hash Code HASH FACTOR Util hash Code command Id hash Code hash Code HASH FACTOR Util hash Code handler hash Code hash Code HASH FACTOR Util hash Code priority hash Code Computed true return hash Code  hashCode hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode activePartId hashCode hashCode HASH_FACTOR hashCode activeShell hashCode hashCode HASH_FACTOR hashCode activeWorkbenchPartSite hashCode hashCode HASH_FACTOR hashCode commandId hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCodeComputed hashCode
see Object to String public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append active Part Id NON NLS 1 string Buffer append active Part Id string Buffer append active Shell NON NLS 1 string Buffer append active Shell string Buffer append active Workbench Site NON NLS 1 string Buffer append active Workbench Part Site string Buffer append command Id NON NLS 1 string Buffer append command Id string Buffer append handler NON NLS 1 string Buffer append handler string Buffer append priority NON NLS 1 string Buffer append priority string Buffer append string string Buffer to String return string  toString toString StringBuffer stringBuffer StringBuffer stringBuffer activePartId stringBuffer activePartId stringBuffer activeShell stringBuffer activeShell stringBuffer activeWorkbenchSite stringBuffer activeWorkbenchPartSite stringBuffer commandId stringBuffer commandId stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer toString

Registers an instance of code I Category Listener code to listen for changes to attributes of this instance param category Listener the instance of code I Category Listener code to register Must not be code null code If an attempt is made to register an instance of code I Category Listener code which is already registered with this instance no operation is performed  ICategoryListener categoryListener ICategoryListener ICategoryListener
p Returns the description of the category represented by this handle suitable for display to the user p p Notification is sent to all registered listeners if this attribute changes p return the description of the category represented by this handle Guaranteed not to be code null code throws Not Defined Exception if the category represented by this handle is not defined  NotDefinedException
Returns the identifier of this handle return the identifier of this handle Guaranteed not to be code null code 
p Returns the name of the category represented by this handle suitable for display to the user p p Notification is sent to all registered listeners if this attribute changes p return the name of the category represented by this handle Guaranteed not to be code null code throws Not Defined Exception if the category represented by this handle is not defined  NotDefinedException
p Returns whether or not the category represented by this handle is defined p p Notification is sent to all registered listeners if this attribute changes p return code true code iff the category represented by this handle is defined 
Unregisters an instance of code I Category Listener code listening for changes to attributes of this instance param category Listener the instance of code I Category Listener code to unregister Must not be code null code If an attempt is made to unregister an instance of code I Category Listener code which is not already registered with this instance no operation is performed  ICategoryListener categoryListener ICategoryListener ICategoryListener

Notifies that one or more attributes of an instance of code I Category code have changed Specific details are described in the code Category Event code param category Event the category event Guaranteed not to be code null code  ICategory CategoryEvent categoryEvent

Registers an instance of code I Command Listener code to listen for changes to attributes of this instance param command Listener the instance of code I Command Listener code to register Must not be code null code If an attempt is made to register an instance of code I Command Listener code which is already registered with this instance no operation is performed  ICommandListener commandListener ICommandListener ICommandListener
Executes with the map of parameter values by name param parameter Values By Name the map of parameter values by name Reserved for future use must be code null code return the result of the execution Reserved for future use must be code null code throws Execution Exception if an exception occurred during execution throws Not Handled Exception if this is not handled Object execute Map parameter Values By Name throws Execution Exception  parameterValuesByName ExecutionException NotHandledException parameterValuesByName ExecutionException
Returns the map of attribute values by name p Notification is sent to all registered listeners if this property changes p return the map of attribute values by name This map may be empty but is guaranteed not to be code null code If this map is not empty its collection of keys is guaranteed to only contain instances of code String code throws Not Handled Exception if this is not handled  NotHandledException
p Returns the identifier of the category of the command represented by this handle p p Notification is sent to all registered listeners if this attribute changes p return the identifier of the category of the command represented by this handle May be code null code throws Not Defined Exception if the command represented by this handle is not defined  NotDefinedException
p Returns the description of the command represented by this handle suitable for display to the user p p Notification is sent to all registered listeners if this attribute changes p return the description of the command represented by this handle Guaranteed not to be code null code throws Not Defined Exception if the command represented by this handle is not defined  NotDefinedException
Returns the identifier of this handle return the identifier of this handle Guaranteed not to be code null code 
p Returns the list of key sequence bindings for this handle This method will return all key sequence bindings for this handle s identifier whether or not the command represented by this handle is defined p p Notification is sent to all registered listeners if this attribute changes p return the list of key sequence bindings This list may be empty but is guaranteed not to be code null code If this list is not empty it is guaranteed to only contain instances of code Key Sequence code  KeySequence
p Returns the name of the command represented by this handle suitable for display to the user p p Notification is sent to all registered listeners if this attribute changes p return the name of the command represented by this handle Guaranteed not to be code null code throws Not Defined Exception if the command represented by this handle is not defined  NotDefinedException
p Returns whether or not the command represented by this handle is defined p p Notification is sent to all registered listeners if this attribute changes p return code true code iff the command represented by this handle is defined 
p Returns whether or not this command is handled A command is handled if it currently has an code I Handler code instance associated with it A command needs a handler to carry out the link I Command execute Map method p p Notification is sent to all registered listeners if this attribute changes p return code true code iff this command is enabled  IHandler ICommand
Unregisters an instance of code I Command Listener code listening for changes to attributes of this instance param command Listener the instance of code I Command Listener code to unregister Must not be code null code If an attempt is made to unregister an instance of code I Command Listener code which is not already registered with this instance no operation is performed  ICommandListener commandListener ICommandListener ICommandListener

Notifies that one or more properties of an instance of code I Command code have changed Specific details are described in the code Command Event code param command Event the command event Guaranteed not to be code null code  ICommand CommandEvent commandEvent

Registers an instance of code I Command Manager Listener code to listen for changes to attributes of this instance param command Manager Listener the instance of code I Command Manager Listener code to register Must not be code null code If an attempt is made to register an instance of code I Command Manager Listener code which is already registered with this instance no operation is performed void add Command Manager Listener  ICommandManagerListener commandManagerListener ICommandManagerListener ICommandManagerListener addCommandManagerListener
Returns the set of identifiers to active contexts p Notification is sent to all registered listeners if this property changes p return the set of identifiers to active contexts This set may be empty but is guaranteed not to be code null code If this set is not empty it is guaranteed to only contain instances of code String code 
Returns the active key configuration p Notification is sent to all registered listeners if this property changes p return the active key configuration identifier This set may be empty but it is guaranteed to not be code null code If this set is not empty it is guaranteed to only contains instances of code String code 
Returns the active locale While this property tends to be simply the result of link java util Locale get Default it may also be changed at runtime by different implementations of command manager p Notification is sent to all registered listeners if this property changes p return the active locale May be code null code  getDefault
Returns the active platform While this property tends to be simply the result of link org eclipse swt SWT get Platform it may also be changed at runtime by different implementations of command manager p Notification is sent to all registered listeners if this property changes p return the active platform May be code null code  getPlatform
Returns a handle to a category given an identifier param category Id an identifier Must not be code null code return a handle to a category  categoryId
Returns a handle to a command given an identifier param command Id an identifier Must not be code null code return a handle to a command  commandId
p Returns the set of identifiers to defined categories p p Notification is sent to all registered listeners if this attribute changes p return the set of identifiers to defined categories This set may be empty but is guaranteed not to be code null code If this set is not empty it is guaranteed to only contain instances of code String code 
p Returns the set of identifiers to defined commands p p Notification is sent to all registered listeners if this attribute changes p return the set of identifiers to defined commands This set may be empty but is guaranteed not to be code null code If this set is not empty it is guaranteed to only contain instances of code String code 
p Returns the set of identifiers to defined key configurations p p Notification is sent to all registered listeners if this attribute changes p return the set of identifiers to defined key configurations This set may be empty but is guaranteed not to be code null code If this set is not empty it is guaranteed to only contain instances of code String code 
Returns a handle to a key configuration given an identifier param key Configuration Id an identifier Must not be code null code return a handle to a key configuration  keyConfigurationId
Finds all of the commands which have key bindings that start with the given key sequence param key Sequence The prefix to look for must not be code null code return A map of all of the matching key sequences code Key Sequence code to command identifiers code String code This map may be empty but it is never code null code  keySequence KeySequence
Finds the command which has the given key sequence as one of its key bindings param key Sequence The key binding to look for must not be code null code return The command id for the matching command if any code null code if none  keySequence
Checks to see whether there are any commands which have key bindings that start with the given key sequence param key Sequence The prefix to look for must not be code null code return code true code if at least one command has a key binding that starts with code key Sequence code code false code otherwise  keySequence keySequence
Checks to see if there is a command with the given key sequence as one of its key bindings param key Sequence The key binding to look for must not be code null code return code true code if a command has a matching key binding code false code otherwise  keySequence
Unregisters an instance of code I Command Manager Listener code listening for changes to attributes of this instance param command Manager Listener the instance of code I Command Manager Listener code to unregister Must not be code null code If an attempt is made to unregister an instance of code I Command Manager Listener code which is not already registered with this instance no operation is performed void remove Command Manager Listener  ICommandManagerListener commandManagerListener ICommandManagerListener ICommandManagerListener removeCommandManagerListener

Notifies that one or more properties of an instance of code I Command Manager code have changed Specific details are described in the code Command Manager Event code param command Manager Event the command Manager event Guaranteed not to be code null code  ICommandManager CommandManagerEvent commandManagerEvent commandManager

Registers an instance of code I Handler Listener code to listen for changes to properties of this instance param handler Listener the instance to register Must not be code null code If an attempt is made to register an instance which is already registered with this instance no operation is performed  IHandlerListener handlerListener
Disposes of this handler This method is run once when the object is no longer referenced This can be used as an opportunity to unhook listeners from other objects 
Executes with the map of parameter values by name param parameter Values By Name the map of parameter values by name Reserved for future use must be code null code return the result of the execution Reserved for future use must be code null code throws Execution Exception if an exception occurred during execution  parameterValuesByName ExecutionException
Returns the map of attribute values by name p Notification is sent to all registered listeners if this property changes p return the map of attribute values by name This map may be empty but is guaranteed not to be code null code If this map is not empty its collection of keys is guaranteed to only contain instances of code String code 
Unregisters an instance of code I Property Listener code listening for changes to properties of this instance param handler Listener the instance to unregister Must not be code null code If an attempt is made to unregister an instance which is not already registered with this instance no operation is performed  IPropertyListener handlerListener

Notifies that one or more properties of an instance of code I Handler code have changed Specific details are described in the code Handler Event code param handler Event the handler event Guaranteed not to be code null code  IHandler HandlerEvent handlerEvent

Registers an instance of code I Key Configuration Listener code to listen for changes to attributes of this instance param key Configuration Listener the instance of code I Key Configuration Listener code to register Must not be code null code If an attempt is made to register an instance of code I Key Configuration Listener code which is already registered with this instance no operation is performed  IKeyConfigurationListener keyConfigurationListener IKeyConfigurationListener IKeyConfigurationListener
p Returns the description of the key configuration represented by this handle suitable for display to the user p p Notification is sent to all registered listeners if this attribute changes p return the description of the key configuration represented by this handle Guaranteed not to be code null code throws Not Defined Exception if the key configuration represented by this handle is not defined  NotDefinedException
Returns the identifier of this handle return the identifier of this handle Guaranteed not to be code null code 
p Returns the name of the key configuration represented by this handle suitable for display to the user p p Notification is sent to all registered listeners if this attribute changes p return the name of the key configuration represented by this handle Guaranteed not to be code null code throws Not Defined Exception if the key configuration represented by this handle is not defined  NotDefinedException
p Returns the identifier of the parent of the key configuration represented by this handle p p Notification is sent to all registered listeners if this attribute changes p return the identifier of the parent of the key configuration represented by this handle May be code null code throws Not Defined Exception if the key configuration represented by this handle is not defined  NotDefinedException
p Returns whether or not this command is active Instances of code I Command code are activated and deactivated by the instance of code I Command Manager code from whence they were brokered p p Notification is sent to all registered listeners if this attribute changes p return code true code iff this command is active  ICommand ICommandManager
p Returns whether or not the key configuration represented by this handle is defined p p Notification is sent to all registered listeners if this attribute changes p return code true code iff the key configuration represented by this handle is defined 
Unregisters an instance of code I Key Configuration Listener code listening for changes to attributes of this instance param key Configuration Listener the instance of code I Key Configuration Listener code to unregister Must not be code null code If an attempt is made to unregister an instance of code I Key Configuration Listener code which is not already registered with this instance no operation is performed  IKeyConfigurationListener keyConfigurationListener IKeyConfigurationListener IKeyConfigurationListener

Notifies that one or more attributes of an instance of code I Key Configuration code have changed Specific details are described in the code Key Configuration Event code param key Configuration Event the key Configuration event Guaranteed not to be code null code  IKeyConfiguration KeyConfigurationEvent keyConfigurationEvent keyConfiguration

Returns the key sequence represented in this binding return the key sequence Guaranteed not to be code null code 

Adds a single handler submissions for consideration by the workbench The submission indicates to the workbench a set of conditions under which the handler should become active The workbench however ultimately decides which handler becomes active in the event of conflicts or changes in state This could cause the handlers for one or more commands to change param handler Submission The submission to be added must not be code null code  handlerSubmission
Adds a collection of handler submissions for consideration by the workbench The submission indicates to the workbench a set of conditions under which the handler should become active The workbench however ultimately decides which handler becomes active in the event of conflicts or changes in state This could cause the handlers for one or more commands to change param handler Submissions The submissions to be added must not be code null code and must contain zero or more instances of code Handler Submission code  handlerSubmissions HandlerSubmission
Returns the command manager for the workbench return the command manager for the workbench Guaranteed not to be code null code 
Removes a single handler submission from consideration by the workbench The handler submission must be the same as the one added not just equivalent This could cause the handlers for one or more commands to change param handler Submission The submission to be removed must not be code null code  handlerSubmission
Removes a single handler submission from consideration by the workbench The handler submission must be the same as the one added not just equivalent This could cause the handlers for one or more commands to change param handler Submissions The submissions to be removed must not be code null code and must contain instances of code Handler Submission code only  handlerSubmissions HandlerSubmission

Creates a new instance of this class param key Configuration the instance of the interface that changed param active Changed true iff the active property changed param defined Changed true iff the defined property changed param name Changed true iff the name property changed param parent Id Changed true iff the parent Id property changed public Key Configuration Event I Key Configuration key Configuration boolean active Changed boolean defined Changed boolean name Changed boolean parent Id Changed if key Configuration null throw new Null Pointer Exception this key Configuration key Configuration this active Changed active Changed this defined Changed defined Changed this name Changed name Changed this parent Id Changed parent Id Changed  keyConfiguration activeChanged definedChanged nameChanged parentIdChanged parentId KeyConfigurationEvent IKeyConfiguration keyConfiguration activeChanged definedChanged nameChanged parentIdChanged keyConfiguration NullPointerException keyConfiguration keyConfiguration activeChanged activeChanged definedChanged definedChanged nameChanged nameChanged parentIdChanged parentIdChanged
Returns the instance of the interface that changed return the instance of the interface that changed Guaranteed not to be code null code public I Key Configuration get Key Configuration return key Configuration  IKeyConfiguration getKeyConfiguration keyConfiguration
Returns whether or not the active property changed return true iff the active property changed public boolean has Active Changed return active Changed  hasActiveChanged activeChanged
Returns whether or not the defined property changed return true iff the defined property changed public boolean has Defined Changed return defined Changed  hasDefinedChanged definedChanged
Returns whether or not the name property changed return true iff the name property changed public boolean has Name Changed return name Changed  hasNameChanged nameChanged
Returns whether or not the parent Id property changed return true iff the parent Id property changed public boolean has Parent Id Changed return parent Id Changed  parentId parentId hasParentIdChanged parentIdChanged

Creates a new instance of this class with the specified detail message param s the detail message public Not Defined Exception String s super s  NotDefinedException

Creates a new instance of this class with the specified detail message param s the detail message public Not Handled Exception String s super s  NotHandledException

Constructs a new instance of code Priority code using a value This constructor should only be used internally Priority instances should be retrieved from the static members defined above param value The priority value a lesser integer is consider to have a higher priority value private Priority int value this value value 
see Comparable compare To java lang Object public int compare To Object object Priority casted Object Priority object int compare To Util compare value casted Object value return compare To  compareTo compareTo castedObject compareTo castedObject compareTo
The value for this priority The lesser the value the higher priority this represents return The integer priority value int get Value return value  getValue
see Object hash Code public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code value hash Code Computed true return hash Code  hashCode hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode hashCodeComputed hashCode
see Object to String public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append value NON NLS 1 string Buffer append value string Buffer append string string Buffer to String return string  toString toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer stringBuffer stringBuffer toString

public void consoles Added I Console consoles for int i 0 i consoles length i I Console console consoles i if console Abstract Console this init  consolesAdded IConsole IConsole AbstractConsole
public void consoles Removed I Console consoles for int i 0 i consoles length i I Console console consoles i if console Abstract Console this Console Plugin get Default get Console Manager remove Console Listener this dispose  consolesRemoved IConsole IConsole AbstractConsole ConsolePlugin getDefault getConsoleManager removeConsoleListener
see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception I Status status new Status I Status ERROR Console Plugin get Unique Identifier I Console Constants INTERNAL ERROR Console Messages get String Abstract Console 0 exception NON NLS 1 Console Plugin log status  ISafeRunnable handleException handleException IStatus IStatus ConsolePlugin getUniqueIdentifier IConsoleConstants INTERNAL_ERROR ConsoleMessages getString AbstractConsole ConsolePlugin
see org eclipse core runtime I Safe Runnable run public void run throws Exception f Listener property Change f Event  ISafeRunnable fListener propertyChange fEvent
Notifies listeners of the property change param event the event that describes the property that has changed public void notify Property Change Event event if f Listeners null return f Event event Object copied Listeners f Listeners get Listeners for int i 0 i copied Listeners length i f Listener I Property Change Listener copied Listeners i Platform run this f Listener null  PropertyChangeEvent fListeners fEvent copiedListeners fListeners getListeners copiedListeners fListener IPropertyChangeListener copiedListeners fListener
Constructs a new console with the given name and image param name console name cannot be code null code param image Descriptor image descriptor or code null code if none public Abstract Console String name Image Descriptor image Descriptor set Name name set Image Descriptor image Descriptor Console Plugin get Default get Console Manager add Console Listener new Lifecycle  imageDescriptor AbstractConsole ImageDescriptor imageDescriptor setName setImageDescriptor imageDescriptor ConsolePlugin getDefault getConsoleManager addConsoleListener
see org eclipse ui console I Console get Name public String get Name return f Name  IConsole getName getName fName
Sets the name of this console to the specified value and notifies property listeners of the change param name the new name protected void set Name String name String old f Name f Name name fire Property Change this I Basic Property Constants P TEXT old name  setName fName fName firePropertyChange IBasicPropertyConstants P_TEXT
see org eclipse ui console I Console get Image Descriptor public Image Descriptor get Image Descriptor return f Image Descriptor  IConsole getImageDescriptor ImageDescriptor getImageDescriptor fImageDescriptor
Sets the image descriptor for this console to the specified value and notifies property listeners of the change param image Descriptor the new image descriptor protected void set Image Descriptor Image Descriptor image Descriptor Image Descriptor old f Image Descriptor f Image Descriptor image Descriptor fire Property Change this I Basic Property Constants P IMAGE old image Descriptor  imageDescriptor setImageDescriptor ImageDescriptor imageDescriptor ImageDescriptor fImageDescriptor fImageDescriptor imageDescriptor firePropertyChange IBasicPropertyConstants P_IMAGE imageDescriptor
public void add Property Change Listener I Property Change Listener listener if f Listeners null f Listeners new Listener List f Listeners add listener  addPropertyChangeListener IPropertyChangeListener fListeners fListeners ListenerList fListeners
public void remove Property Change Listener I Property Change Listener listener if f Listeners null f Listeners remove listener  removePropertyChangeListener IPropertyChangeListener fListeners fListeners
Notify all listeners that the given property has changed param source the object on which a property has changed param property identifier of the property that has changed param old Value the old value of the property or code null code param new Value the new value of the property or code null code public void fire Property Change Object source String property Object old Value Object new Value if f Listeners null return Property Notifier notifier new Property Notifier notifier notify new Property Change Event source property old Value new Value  oldValue newValue firePropertyChange oldValue newValue fListeners PropertyNotifier PropertyNotifier PropertyChangeEvent oldValue newValue
Called when this console is added to the console manager Default implementation does nothing Subclasses may override protected void init 
Called when this console is removed from the console manager Default implementation does nothing Subclasses may override protected void dispose 

public Clear Output Action I Text Viewer viewer super Console Messages get String Clear Output Action title NON NLS 1 f Viewer viewer set Tool Tip Text Console Messages get String Clear Output Action tool Tip Text NON NLS 1 set Hover Image Descriptor Console Plugin Images get Image Descriptor I Console Constants IMG LCL CLEAR set Disabled Image Descriptor Console Plugin Images get Image Descriptor I Internal Console Constants IMG DLCL CLEAR set Image Descriptor Console Plugin Images get Image Descriptor I Internal Console Constants IMG ELCL CLEAR Workbench Help set Help this I Console Help Context Ids CLEAR CONSOLE ACTION  ClearOutputAction ITextViewer ConsoleMessages getString ClearOutputAction fViewer setToolTipText ConsoleMessages getString ClearOutputAction toolTipText setHoverImageDescriptor ConsolePluginImages getImageDescriptor IConsoleConstants IMG_LCL_CLEAR setDisabledImageDescriptor ConsolePluginImages getImageDescriptor IInternalConsoleConstants IMG_DLCL_CLEAR setImageDescriptor ConsolePluginImages getImageDescriptor IInternalConsoleConstants IMG_ELCL_CLEAR WorkbenchHelp setHelp IConsoleHelpContextIds CLEAR_CONSOLE_ACTION
Busy Indicator show While Console Plugin get Standard Display new Runnable public void run I Document document f Viewer get Document if document null document set NON NLS 1 f Viewer set Selected Range 0 0  BusyIndicator showWhile ConsolePlugin getStandardDisplay IDocument fViewer getDocument fViewer setSelectedRange
public void run Busy Indicator show While Console Plugin get Standard Display new Runnable public void run I Document document f Viewer get Document if document null document set NON NLS 1 f Viewer set Selected Range 0 0  BusyIndicator showWhile ConsolePlugin getStandardDisplay IDocument fViewer getDocument fViewer setSelectedRange

Constructs a new action in the given text viewer with the specified operation code param viewer param operation Code public Text Viewer Action I Text Viewer viewer int operation Code f Operation Code operation Code f Operation Target viewer get Text Operation Target update  operationCode TextViewerAction ITextViewer operationCode fOperationCode operationCode fOperationTarget getTextOperationTarget
public void update boolean was Enabled is Enabled boolean is Enabled f Operation Target null f Operation Target can Do Operation f Operation Code set Enabled is Enabled if was Enabled is Enabled fire Property Change ENABLED was Enabled Boolean TRUE Boolean FALSE is Enabled Boolean TRUE Boolean FALSE  wasEnabled isEnabled isEnabled fOperationTarget fOperationTarget canDoOperation fOperationCode setEnabled isEnabled wasEnabled isEnabled firePropertyChange wasEnabled isEnabled
public void run if f Operation Code 1 f Operation Target null f Operation Target do Operation f Operation Code  fOperationCode fOperationTarget fOperationTarget doOperation fOperationCode
Configures this action with a label tool tip and description param text action label param tool Tip Text action tool tip param description action description public void configure Action String text String tool Tip Text String description set Text text set Tool Tip Text tool Tip Text set Description description  toolTipText configureAction toolTipText setText setToolTipText toolTipText setDescription

public String is Valid String input try int i Integer parse Int input if i 0 f Last Line i return Console Messages get String Text Viewer Goto Line Action Line number out of range 1 NON NLS 1 catch Number Format Exception x return Console Messages get String Text Viewer Goto Line Action Not a number 2 NON NLS 1 return null  isValid parseInt fLastLine ConsoleMessages getString TextViewerGotoLineAction Line_number_out_of_range_1 NumberFormatException ConsoleMessages getString TextViewerGotoLineAction Not_a_number_2
Constructs a goto line action for the viewer using the provided resource bundle public Text Viewer Goto Line Action I Text Viewer viewer super viewer 1 f Text Viewer viewer set Text Console Messages get String Text Viewer Goto Line Action Go to  Line Ctrl L 4 NON NLS 1 set Tool Tip Text Console Messages get String Text Viewer Goto Line Action Go To Line 1 NON NLS 1 set Description Console Messages get String Text Viewer Goto Line Action Go To Line 1 NON NLS 1  TextViewerGotoLineAction ITextViewer fTextViewer setText ConsoleMessages getString TextViewerGotoLineAction Go_to_ L_4 setToolTipText ConsoleMessages getString TextViewerGotoLineAction Go_To_Line_1 setDescription ConsoleMessages getString TextViewerGotoLineAction Go_To_Line_1
see Text Viewer Action update public void update  TextViewerAction
Jumps to the line protected void goto Line int line I Document document f Text Viewer get Document try int start document get Line Offset line int length document get Line Length line f Text Viewer get Text Widget set Selection start start length f Text Viewer reveal Range start length catch Bad Location Exception x Console Plugin error Dialog f Text Viewer get Text Widget get Shell Console Messages get String Text Viewer Goto Line Action Go To Line 1 Console Messages get String Text Viewer Goto Line Action Exceptions occurred attempt to go to line 2 x NON NLS 1 NON NLS 2  gotoLine IDocument fTextViewer getDocument getLineOffset getLineLength fTextViewer getTextWidget setSelection fTextViewer revealRange BadLocationException ConsolePlugin errorDialog fTextViewer getTextWidget getShell ConsoleMessages getString TextViewerGotoLineAction Go_To_Line_1 ConsoleMessages getString TextViewerGotoLineAction Exceptions_occurred_attempt_to_go_to_line_2
public void run try Point selection f Text Viewer get Text Widget get Selection I Document document f Text Viewer get Document f Last Line document get Line Of Offset document get Length 1 int start Line selection null 1 f Text Viewer get Text Widget get Line At Offset selection x 1 String title Console Messages get String Text Viewer Goto Line Action Go To Line 1 NON NLS 1 String message Message Format format Console Messages get String Text Viewer Goto Line Action Enter line number  8 new Object new Integer f Last Line NON NLS 1 String value Integer to String start Line Shell active Shell f Text Viewer get Text Widget get Shell Input Dialog d new Input Dialog active Shell title message value new Number Validator if d open Window OK try int line Integer parse Int d get Value goto Line line 1 catch Number Format Exception x Console Plugin error Dialog active Shell Console Messages get String Text Viewer Goto Line Action Go To Line 1 Console Messages get String Text Viewer Goto Line Action Exceptions occurred attempt to go to line 2 x NON NLS 1 NON NLS 2 catch Bad Location Exception x Console Plugin error Dialog f Text Viewer get Text Widget get Shell Console Messages get String Text Viewer Goto Line Action Go To Line 1 Console Messages get String Text Viewer Goto Line Action Exceptions occurred attempt to go to line 2 x NON NLS 1 NON NLS 2 return  fTextViewer getTextWidget getSelection IDocument fTextViewer getDocument fLastLine getLineOfOffset getLength startLine fTextViewer getTextWidget getLineAtOffset ConsoleMessages getString TextViewerGotoLineAction Go_To_Line_1 MessageFormat ConsoleMessages getString TextViewerGotoLineAction Enter_line_number__8 fLastLine toString startLine activeShell fTextViewer getTextWidget getShell InputDialog InputDialog activeShell NumberValidator parseInt getValue gotoLine NumberFormatException ConsolePlugin errorDialog activeShell ConsoleMessages getString TextViewerGotoLineAction Go_To_Line_1 ConsoleMessages getString TextViewerGotoLineAction Exceptions_occurred_attempt_to_go_to_line_2 BadLocationException ConsolePlugin errorDialog fTextViewer getTextWidget getShell ConsoleMessages getString TextViewerGotoLineAction Go_To_Line_1 ConsoleMessages getString TextViewerGotoLineAction Exceptions_occurred_attempt_to_go_to_line_2

Returns the singleton instance of the console plugin public static Console Plugin get Default return fg Plugin  ConsolePlugin getDefault fgPlugin
public Console Plugin super fg Plugin this  ConsolePlugin fgPlugin
Convenience method which returns the unique identifier of this plugin public static String get Unique Identifier return PI UI CONSOLE  getUniqueIdentifier PI_UI_CONSOLE
Logs the specified status with this plug in s log param status status to log public static void log I Status status get Default get Log log status  IStatus getDefault getLog
Logs the specified throwable with this plug in s log param t throwable to log public static void log Throwable t log new Error Status Error logged from Console plug in t NON NLS 1  newErrorStatus
Returns a new error status for this plugin with the given message param message the message to be included in the status param exception the exception to be included in the status or code null code if none return a new error status public static I Status new Error Status String message Throwable exception return new Status I Status ERROR get Unique Identifier I Console Constants INTERNAL ERROR message exception  IStatus newErrorStatus IStatus getUniqueIdentifier IConsoleConstants INTERNAL_ERROR
Returns the console manager The manager will be created lazily on the first access return I Console Manager public I Console Manager get Console Manager if f Console Manager null f Console Manager new Console Manager return f Console Manager  IConsoleManager IConsoleManager getConsoleManager fConsoleManager fConsoleManager ConsoleManager fConsoleManager
Returns the standard display to be used The method first checks if the thread calling this method has an associated display If so this display is returned Otherwise the method returns the default display public static Display get Standard Display Display display Display get Current if display null display Display get Default return display  getStandardDisplay getCurrent getDefault
Utility method with conventions public static void error Dialog Shell shell String title String message Throwable t I Status status if t instanceof Core Exception status Core Exception t get Status if the message resource string and the I Status message are the same don t show both in the dialog if status null message equals status get Message message null else status new Status I Status ERROR get Unique Identifier I Console Constants INTERNAL ERROR Error within Debug UI t NON NLS 1 log status Error Dialog open Error shell title message status  errorDialog IStatus CoreException CoreException getStatus IStatus getMessage IStatus getUniqueIdentifier IConsoleConstants INTERNAL_ERROR ErrorDialog openError

Returns the name of this console return the name of this console 
Returns an image descriptor for this console or code null code if none return an image descriptor for this console or code null code if none 
Creates and returns a new page for this console The page is displayed for this console in the console given view param view the view in which the page is to be created return a page book view page representation of this console 
Adds a listener for changes to properties of this console Has no effect if an identical listener is already registered p The changes supported by the console view are as follows ul li code I Basic Property Constants P TEXT code indicates the name of a console has changed li li code I Basic Property Constants P IMAGE code indicates the image of a console has changed li ul p p Clients may define additional properties as required p param listener a property change listener  IBasicPropertyConstants P_TEXT IBasicPropertyConstants P_IMAGE
Removes the given property listener from this console page Has no effect if an identical listener is not alread registered param listener a property listener 

Notification the given consoles have been added to the console manager param consoles added consoles 
Notification the given consoles have been removed from the console manager param consoles removed consoles 

Registers the given listener for console notifications Has no effect if an identical listener is already registered param listener listener to register 
Deregisters the given listener for console notifications Has no effect if an identical listener is not already registered param listener listener to deregister 
Adds the given consoles to the console manager Has no effect for equivalent consoles already registered The consoles will be added to any existing console views param consoles consoles to add 
Removes the given consoles from the console manager If the consoles are being displayed in any console views the associated pages will be closed param consoles consoles to remove 
Returns a collection of consoles registered with the console manager return a collection of consoles registered with the console manager 
Opens the console view and displays given the console If the view is already open it is brought to the front unless the view is pinned on a console other than the given console param console console to display 
Warns that the content of the given console has changed in all console views param console the console that has changed 

Displays the page for the given console in this console view Has no effect if this console view has a pinned console param console console to display cannot be code null code 
Displays and pins the given console in this console view No other console can be displayed until this console view is un pinned Specifying code null code un pins this console param console console to pin or code null code to un pin 
Returns whether this console view is currently pinned to a specific console return whether this console view is currently pinned to a specific console 
Returns the console currently being displayed or code null code if none return the console currently being displayed or code null code if none 
Warns that the content of the given console has changed param console the console that has changed 

Constructs a new message console param name console name param image Descriptor console image descriptor or code null code if none public Message Console String name Image Descriptor image Descriptor super name image Descriptor f Partitioner new Message Console Partitioner  imageDescriptor MessageConsole ImageDescriptor imageDescriptor imageDescriptor fPartitioner MessageConsolePartitioner
Returns the maximum number of characters that the console will display at once This is analagous to the size of the text buffer this console maintains return the maximum number of characters that the console will display public int get High Water Mark return f Partitioner get High Water Mark  getHighWaterMark fPartitioner getHighWaterMark
Sets the text buffer size for this console The high water mark indicates the maximum number of characters stored in the buffer The low water mark indicates the number of characters remaining in the buffer when the high water mark is exceeded param low the number of characters remaining in the buffer when the high water mark is exceeded param high the maximum number of characters this console will cache in its text buffer exception Illegal Argument Exception if low high public void set Water Marks int low int high f Partitioner set Water Marks low high  IllegalArgumentException setWaterMarks fPartitioner setWaterMarks
Returns the number of characters that will remain in this console when its high water mark is exceeded return the number of characters that will remain in this console when its high water mark is exceeded public int get Low Water Mark return f Partitioner get Low Water Mark  getLowWaterMark fPartitioner getLowWaterMark
see org eclipse ui console Abstract Console dispose protected void dispose f Partitioner disconnect  AbstractConsole fPartitioner
see org eclipse ui console I Console create Page org eclipse ui console I Console View public I Page Book View Page create Page I Console View view return new Message Console Page view this  IConsole createPage IConsoleView IPageBookViewPage createPage IConsoleView MessageConsolePage
Sets the font used by this console param font font public void set Font Font font Font old f Font f Font font fire Property Change this P FONT old font  setFont fFont fFont firePropertyChange P_FONT
Returns the font for this console return font for this console public Font get Font if f Font null return J Face Resources get Text Font return f Font  getFont fFont JFaceResources getTextFont fFont
Returns a new message stream connected to this console return a new message stream connected to this console public Message Console Stream new Message Stream return new Message Console Stream this  MessageConsoleStream newMessageStream MessageConsoleStream
Appends the given message to this console from the specified stream param text message param stream stream the message belongs to protected synchronized void append To Document String text Message Console Stream stream f Partitioner append To Document text stream  appendToDocument MessageConsoleStream fPartitioner appendToDocument
Returns the document this console writes to return the document this console wites to public I Document get Document return f Partitioner get Document  IDocument getDocument fPartitioner getDocument
Sets the tab width param tab Size The tab width public void set Tab Width int tab Width int old this tab Width this tab Width tab Width fire Property Change this P TAB SIZE new Integer old new Integer tab Width  tabSize setTabWidth tabWidth tabWidth tabWidth tabWidth firePropertyChange P_TAB_SIZE tabWidth
Returns the tab width return tab width public int get Tab Width return tab Width  getTabWidth tabWidth

Constructs a new stream connected to the given console param console the console to write messages to public Message Console Stream Message Console console f Console console  MessageConsoleStream MessageConsole fConsole
Appends the specified message to this stream param message message to append public void print String message f Console append To Document message this  fConsole appendToDocument
Appends a line separator string to this stream public void println print n NON NLS 1 
Appends the specified message to this stream followed by a line separator string param message message to print public void println String message print message println 
Sets the color of this message stream param color color of this message stream possibly code null code public void set Color Color color Color old f Color f Color color f Console fire Property Change this Message Console P STREAM COLOR old color  setColor fColor fColor fConsole firePropertyChange MessageConsole P_STREAM_COLOR
Returns the color of this message stream or code null code if default return the color of this message stream or code null code public Color get Color return f Color  getColor fColor
Returns the console this stream is connected to return the console this stream is connected to public Message Console get Console return f Console  MessageConsole getConsole fConsole

Creates a new link Content Assist Handler for the given link Combo Only a single link Content Assist Handler may be installed on a link Combo instance Content Assist is enabled by default param combo target combo param content Assistant a configured content assistant return a new link Content Assist Handler public static Content Assist Handler create Handler For Combo Combo combo Subject Control Content Assistant content Assistant return new Content Assist Handler combo new Combo Content Assist Subject Adapter combo content Assistant  ContentAssistHandler ContentAssistHandler contentAssistant ContentAssistHandler ContentAssistHandler createHandlerForCombo SubjectControlContentAssistant contentAssistant ContentAssistHandler ComboContentAssistSubjectAdapter contentAssistant
Creates a new link Content Assist Handler for the given link Text Only a single link Content Assist Handler may be installed on a link Text instance Content Assist is enabled by default param text target text param content Assistant a configured content assistant return a new link Content Assist Handler public static Content Assist Handler create Handler For Text Text text Subject Control Content Assistant content Assistant return new Content Assist Handler text new Text Content Assist Subject Adapter text content Assistant  ContentAssistHandler ContentAssistHandler contentAssistant ContentAssistHandler ContentAssistHandler createHandlerForText SubjectControlContentAssistant contentAssistant ContentAssistHandler TextContentAssistSubjectAdapter contentAssistant
set Enabled true f Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e set Enabled false  setEnabled fControl addDisposeListener DisposeListener widgetDisposed DisposeEvent setEnabled
Internal constructor param control target control param subject Adapter content assist subject adapter param content Assistant content assistant private Content Assist Handler Control control Abstract Control Content Assist Subject Adapter subject Adapter Subject Control Content Assistant content Assistant f Control control f Content Assistant content Assistant f Content Assist Subject Adapter subject Adapter set Enabled true f Control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e set Enabled false  subjectAdapter contentAssistant ContentAssistHandler AbstractControlContentAssistSubjectAdapter subjectAdapter SubjectControlContentAssistant contentAssistant fControl fContentAssistant contentAssistant fContentAssistSubjectAdapter subjectAdapter setEnabled fControl addDisposeListener DisposeListener widgetDisposed DisposeEvent setEnabled
return code true code iff content assist is enabled public boolean is Enabled return f Focus Listener null  isEnabled fFocusListener
Controls enablement of content assist When enabled a cue is shown next to the focused field and the affordance hover shows the shortcut param enable enable content assist iff true public void set Enabled boolean enable if enable is Enabled return if enable enable else disable  setEnabled isEnabled
Enable content assist private void enable if f Control is Disposed f Content Assistant install f Content Assist Subject Adapter install Cue Label Provider install Focus Listener if f Control is Focus Control activate Handler  fControl isDisposed fContentAssistant fContentAssistSubjectAdapter installCueLabelProvider installFocusListener fControl isFocusControl activateHandler
Disable content assist private void disable if f Control is Disposed f Content Assistant uninstall f Content Assist Subject Adapter set Content Assist Cue Provider null f Control remove Focus Listener f Focus Listener f Focus Listener null if f Handler Submission null deactivate Handler  fControl isDisposed fContentAssistant fContentAssistSubjectAdapter setContentAssistCueProvider fControl removeFocusListener fFocusListener fFocusListener fHandlerSubmission deactivateHandler
I Label Provider label Provider new Label Provider inherit Doc public String get Text Object element I Command Manager command Manager PlatformUI get Workbench get Command Support get Command Manager I Command command command Manager get Command I Text Editor Action Definition Ids CONTENT ASSIST PROPOSALS List bindings command get Key Sequence Bindings if bindings size 0 return Content Assist Messages get String Content Assist Handler content Assist Available NON NLS 1 else I Key Sequence Binding ksb I Key Sequence Binding bindings get 0 Object args ksb get Key Sequence format return Content Assist Messages get Formatted String Content Assist Handler content Assist Available With Key Binding args NON NLS 1  ILabelProvider labelProvider LabelProvider inheritDoc getText ICommandManager commandManager getWorkbench getCommandSupport getCommandManager ICommand commandManager getCommand ITextEditorActionDefinitionIds CONTENT_ASSIST_PROPOSALS getKeySequenceBindings ContentAssistMessages getString ContentAssistHandler contentAssistAvailable IKeySequenceBinding IKeySequenceBinding getKeySequence ContentAssistMessages getFormattedString ContentAssistHandler contentAssistAvailableWithKeyBinding
Create and install the link Label Provider for f Content Assist Subject Adapter private void install Cue Label Provider I Label Provider label Provider new Label Provider inherit Doc public String get Text Object element I Command Manager command Manager PlatformUI get Workbench get Command Support get Command Manager I Command command command Manager get Command I Text Editor Action Definition Ids CONTENT ASSIST PROPOSALS List bindings command get Key Sequence Bindings if bindings size 0 return Content Assist Messages get String Content Assist Handler content Assist Available NON NLS 1 else I Key Sequence Binding ksb I Key Sequence Binding bindings get 0 Object args ksb get Key Sequence format return Content Assist Messages get Formatted String Content Assist Handler content Assist Available With Key Binding args NON NLS 1 f Content Assist Subject Adapter set Content Assist Cue Provider label Provider  LabelProvider fContentAssistSubjectAdapter installCueLabelProvider ILabelProvider labelProvider LabelProvider inheritDoc getText ICommandManager commandManager getWorkbench getCommandSupport getCommandManager ICommand commandManager getCommand ITextEditorActionDefinitionIds CONTENT_ASSIST_PROPOSALS getKeySequenceBindings ContentAssistMessages getString ContentAssistHandler contentAssistAvailable IKeySequenceBinding IKeySequenceBinding getKeySequence ContentAssistMessages getFormattedString ContentAssistHandler contentAssistAvailableWithKeyBinding fContentAssistSubjectAdapter setContentAssistCueProvider labelProvider
private void install Focus Listener f Focus Listener new Focus Listener public void focus Gained final Focus Event e activate Handler  installFocusListener fFocusListener FocusListener focusGained FocusEvent activateHandler
activate Handler public void focus Lost Focus Event e if f Handler Submission null deactivate Handler  activateHandler focusLost FocusEvent fHandlerSubmission deactivateHandler
Create f Focus Listener and install it on f Control private void install Focus Listener f Focus Listener new Focus Listener public void focus Gained final Focus Event e activate Handler public void focus Lost Focus Event e if f Handler Submission null deactivate Handler f Control add Focus Listener f Focus Listener  fFocusListener fControl installFocusListener fFocusListener FocusListener focusGained FocusEvent activateHandler focusLost FocusEvent fHandlerSubmission deactivateHandler fControl addFocusListener fFocusListener
final I Handler handler new Abstract Handler public Object execute Map parameter Values By Name throws Execution Exception if is Enabled f Content Assistant show Possible Completions return null  IHandler AbstractHandler parameterValuesByName ExecutionException isEnabled fContentAssistant showPossibleCompletions
Create and register f Handler Submission private void activate Handler final I Handler handler new Abstract Handler public Object execute Map parameter Values By Name throws Execution Exception if is Enabled f Content Assistant show Possible Completions return null f Handler Submission new Handler Submission null f Control get Shell null I Text Editor Action Definition Ids CONTENT ASSIST PROPOSALS handler Priority MEDIUM I Workbench Command Support command Support PlatformUI get Workbench get Command Support command Support add Handler Submission f Handler Submission  fHandlerSubmission activateHandler IHandler AbstractHandler parameterValuesByName ExecutionException isEnabled fContentAssistant showPossibleCompletions fHandlerSubmission HandlerSubmission fControl getShell ITextEditorActionDefinitionIds CONTENT_ASSIST_PROPOSALS IWorkbenchCommandSupport commandSupport getWorkbench getCommandSupport commandSupport addHandlerSubmission fHandlerSubmission
Unregister the link Handler Submission from the shell private void deactivate Handler I Workbench Command Support command Support PlatformUI get Workbench get Command Support command Support remove Handler Submission f Handler Submission f Handler Submission null  HandlerSubmission deactivateHandler IWorkbenchCommandSupport commandSupport getWorkbench getCommandSupport commandSupport removeHandlerSubmission fHandlerSubmission fHandlerSubmission

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Content Assist Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE ContentAssistMessages
Gets a string from the resource bundle param key the string used to get the bundle value must not be null return the string from the resource bundle public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException
Gets a string from the resource bundle and formats it with the given arguments param key the string used to get the bundle value must not be null param args the arguments used to format the string return the formatted string public static String get Formatted String String key Object args String format null try format fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1 return Message Format format format args  getFormattedString fgResourceBundle getString MissingResourceException MessageFormat
Gets a string from the resource bundle and formats it with the given argument param key the string used to get the bundle value must not be null param arg the argument used to format the string return the formatted string public static String get Formatted String String key Object arg String format null try format fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1 if arg null arg NON NLS 1 return Message Format format format new Object arg  getFormattedString fgResourceBundle getString MissingResourceException MessageFormat

Creates a new instance of this class param context the instance of the interface that changed param defined Changed true iff the defined property changed param enabled Changed true iff the enabled property changed param name Changed true iff the name property changed param parent Id Changed true iff the parent Id property changed public Context Event I Context context boolean defined Changed boolean enabled Changed boolean name Changed boolean parent Id Changed if context null throw new Null Pointer Exception this context context this defined Changed defined Changed this enabled Changed enabled Changed this name Changed name Changed this parent Id Changed parent Id Changed  definedChanged enabledChanged nameChanged parentIdChanged parentId ContextEvent IContext definedChanged enabledChanged nameChanged parentIdChanged NullPointerException definedChanged definedChanged enabledChanged enabledChanged nameChanged nameChanged parentIdChanged parentIdChanged
Returns the instance of the interface that changed return the instance of the interface that changed Guaranteed not to be code null code public I Context get Context return context  IContext getContext
Returns whether or not the defined property changed return true iff the defined property changed public boolean has Defined Changed return defined Changed  hasDefinedChanged definedChanged
Returns whether or not the enabled property changed return true iff the enabled property changed public boolean has Enabled Changed return enabled Changed  hasEnabledChanged enabledChanged
Returns whether or not the name property changed return true iff the name property changed public boolean has Name Changed return name Changed  hasNameChanged nameChanged
Returns whether or not the parent Id property changed return true iff the parent Id property changed public boolean has Parent Id Changed return parent Id Changed  parentId parentId hasParentIdChanged parentIdChanged

Creates a new instance of this class with the specified detail message param message the detail message public Context Exception String message super message  ContextException
Creates a new instance of this class with the specified detail message and cause param message the detail message param cause the cause public Context Exception String message Throwable cause super message cause  ContextException

Creates a new instance of this class param context Manager the instance of the interface that changed param defined Context Ids Changed true iff the defined Context Ids property changed param enabled Context Ids Changed true iff the enabled Context Ids property changed param previously Defined Context Ids the set of identifiers to previously defined contexts This set may be empty If this set is not empty it must only contain instances of code String code This set must be code null code if defined Context Ids Changed is code false code and must not be null if defined Context Ids Changed is code true code param previously Enabled Context Ids the set of identifiers to previously enabled contexts This set may be empty If this set is not empty it must only contain instances of code String code This set must be code null code if enabled Context Ids Changed is code false code and must not be null if enabled Context Ids Changed is code true code public Context Manager Event I Context Manager context Manager boolean defined Context Ids Changed boolean enabled Context Ids Changed Set previously Defined Context Ids Set previously Enabled Context Ids if context Manager null throw new Null Pointer Exception if defined Context Ids Changed previously Defined Context Ids null throw new Illegal Argument Exception if enabled Context Ids Changed previously Enabled Context Ids null throw new Illegal Argument Exception if defined Context Ids Changed this previously Defined Context Ids Util safe Copy previously Defined Context Ids String class else this previously Defined Context Ids null if enabled Context Ids Changed this previously Enabled Context Ids Util safe Copy previously Enabled Context Ids String class else this previously Enabled Context Ids null this context Manager context Manager this defined Context Ids Changed defined Context Ids Changed this enabled Context Ids Changed enabled Context Ids Changed  contextManager definedContextIdsChanged definedContextIds enabledContextIdsChanged enabledContextIds previouslyDefinedContextIds definedContextIdsChanged definedContextIdsChanged previouslyEnabledContextIds enabledContextIdsChanged enabledContextIdsChanged ContextManagerEvent IContextManager contextManager definedContextIdsChanged enabledContextIdsChanged previouslyDefinedContextIds previouslyEnabledContextIds contextManager NullPointerException definedContextIdsChanged previouslyDefinedContextIds IllegalArgumentException enabledContextIdsChanged previouslyEnabledContextIds IllegalArgumentException definedContextIdsChanged previouslyDefinedContextIds safeCopy previouslyDefinedContextIds previouslyDefinedContextIds enabledContextIdsChanged previouslyEnabledContextIds safeCopy previouslyEnabledContextIds previouslyEnabledContextIds contextManager contextManager definedContextIdsChanged definedContextIdsChanged enabledContextIdsChanged enabledContextIdsChanged
Returns the instance of the interface that changed return the instance of the interface that changed Guaranteed not to be code null code public I Context Manager get Context Manager return context Manager  IContextManager getContextManager contextManager
Returns the set of identifiers to previously defined contexts return the set of identifiers to previously defined contexts This set may be empty If this set is not empty it is guaranteed to only contain instances of code String code This set is guaranteed to be code null code if have Defined Context Ids Changed is code false code and is guaranteed to not be null if have Defined Context Ids Changed is code true code public Set get Previously Defined Context Ids return previously Defined Context Ids  haveDefinedContextIdsChanged haveDefinedContextIdsChanged getPreviouslyDefinedContextIds previouslyDefinedContextIds
Returns the set of identifiers to previously enabled contexts return the set of identifiers to previously enabled contexts This set may be empty If this set is not empty it is guaranteed to only contain instances of code String code This set is guaranteed to be code null code if have Enabled Context Ids Changed is code false code and is guaranteed to not be null if have Enabled Context Ids Changed is code true code public Set get Previously Enabled Context Ids return previously Enabled Context Ids  haveEnabledContextIdsChanged haveEnabledContextIdsChanged getPreviouslyEnabledContextIds previouslyEnabledContextIds
Returns whether or not the defined Context Ids property changed return true iff the defined Context Ids property changed public boolean have Defined Context Ids Changed return defined Context Ids Changed  definedContextIds definedContextIds haveDefinedContextIdsChanged definedContextIdsChanged
Returns whether or not the enabled Context Ids property changed return true iff the enabled Context Ids property changed public boolean have Enabled Context Ids Changed return enabled Context Ids Changed  enabledContextIds enabledContextIds haveEnabledContextIdsChanged enabledContextIdsChanged

Creates a new instance of this class param active Part Id the identifier of the part that must be active for this request to be considered May be code null code param active Shell the shell that must be active for this request to be considered May be code null code param active Workbench Part Site the workbench part site of the part that must be active for this request to be considered May be code null code param context Id the identifier of the context to be enabled Must not be code null code public Enabled Submission String active Part Id Shell active Shell I Workbench Part Site active Workbench Part Site String context Id if context Id null throw new Null Pointer Exception this active Part Id active Part Id this active Shell active Shell this active Workbench Part Site active Workbench Part Site this context Id context Id  activePartId activeShell activeWorkbenchPartSite contextId EnabledSubmission activePartId activeShell IWorkbenchPartSite activeWorkbenchPartSite contextId contextId NullPointerException activePartId activePartId activeShell activeShell activeWorkbenchPartSite activeWorkbenchPartSite contextId contextId
see Comparable compare To java lang Object public int compare To Object object Enabled Submission casted Object Enabled Submission object int compare To Util compare active Workbench Part Site casted Object active Workbench Part Site if compare To 0 compare To Util compare active Part Id casted Object active Part Id if compare To 0 compare To Util compare active Shell casted Object active Shell if compare To 0 compare To Util compare context Id casted Object context Id return compare To  compareTo compareTo EnabledSubmission castedObject EnabledSubmission compareTo activeWorkbenchPartSite castedObject activeWorkbenchPartSite compareTo compareTo activePartId castedObject activePartId compareTo compareTo activeShell castedObject activeShell compareTo compareTo contextId castedObject contextId compareTo
Returns the identifier of the part that must be active for this request to be considered return the identifier of the part that must be active for this request to be considered May be code null code public String get Active Part Id return active Part Id  getActivePartId activePartId
Returns the shell that must be active for this request to be considered return the shell that must be active for this request to be considered May be code null code public Shell get Active Shell return active Shell  getActiveShell activeShell
Returns the workbench part site of the part that must be active for this request to be considered return the workbench part site of the part that must be active for this request to be considered May be code null code public I Workbench Part Site get Active Workbench Part Site return active Workbench Part Site  IWorkbenchPartSite getActiveWorkbenchPartSite activeWorkbenchPartSite
Returns the identifier of the context to be enabled return the identifier of the context to be enabled Guaranteed not to be code null code public String get Context Id return context Id  getContextId contextId
see Object hash Code public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code active Part Id hash Code hash Code HASH FACTOR Util hash Code active Shell hash Code hash Code HASH FACTOR Util hash Code active Workbench Part Site hash Code hash Code HASH FACTOR Util hash Code context Id hash Code Computed true return hash Code  hashCode hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode activePartId hashCode hashCode HASH_FACTOR hashCode activeShell hashCode hashCode HASH_FACTOR hashCode activeWorkbenchPartSite hashCode hashCode HASH_FACTOR hashCode contextId hashCodeComputed hashCode
see Object to String public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append active Part Id NON NLS 1 string Buffer append active Part Id string Buffer append active Shell NON NLS 1 string Buffer append active Shell string Buffer append active Workbench Site NON NLS 1 string Buffer append active Workbench Part Site string Buffer append context Id NON NLS 1 string Buffer append context Id string Buffer append string string Buffer to String return string  toString toString StringBuffer stringBuffer StringBuffer stringBuffer activePartId stringBuffer activePartId stringBuffer activeShell stringBuffer activeShell stringBuffer activeWorkbenchSite stringBuffer activeWorkbenchPartSite stringBuffer contextId stringBuffer contextId stringBuffer stringBuffer toString

Registers an instance of code I Context Listener code to listen for changes to properties of this instance param context Listener the instance to register Must not be code null code If an attempt is made to register an instance which is already registered with this instance no operation is performed  IContextListener contextListener
Returns the identifier of this instance return the identifier of this instance Guaranteed not to be code null code 
Returns the name of this instance suitable for display to the user p Notification is sent to all registered listeners if this property changes p return the name of this instance Guaranteed not to be code null code throws Not Defined Exception if this instance is not defined  NotDefinedException
Returns the identifier of the parent of this instance p Notification is sent to all registered listeners if this property changes p return the identifier of the parent of this instance May be code null code throws Not Defined Exception if this instance is not defined  NotDefinedException
Returns whether or not this instance is defined p Notification is sent to all registered listeners if this property changes p return true iff this instance is defined 
Returns whether or not this instance is enabled p Notification is sent to all registered listeners if this property changes p return true iff this instance is enabled 
Unregisters an instance of code I Context Listener code listening for changes to properties of this instance param context Listener the instance to unregister Must not be code null code If an attempt is made to unregister an instance which is not already registered with this instance no operation is performed  IContextListener contextListener

Notifies that one or more properties of an instance of code I Context code have changed Specific details are described in the code Context Event code param context Event the context event Guaranteed not to be code null code  IContext ContextEvent contextEvent

Registers an instance of code I Context Manager Listener code to listen for changes to properties of this instance param context Manager Listener the instance to register Must not be code null code If an attempt is made to register an instance which is already registered with this instance no operation is performed void add Context Manager Listener  IContextManagerListener contextManagerListener addContextManagerListener
Returns an instance of code I Context code given an identifier param context Id an identifier Must not be code null code return an instance of code I Context code  IContext contextId IContext
Returns the set of identifiers to defined contexts The set is sorted by the depth of the context within the tree of contexts So for example a child context will always appear before its parent p Notification is sent to all registered listeners if this property changes p return the set of identifiers to defined contexts This set may be empty but is guaranteed not to be code null code If this set is not empty it is guaranteed to only contain instances of code String code 
Returns the set of identifiers to enabled contexts The set is sorted by the depth of the context within the tree of contexts So for example a child context will always appear before its parent p Notification is sent to all registered listeners if this property changes p return the set of identifiers to enabled contexts This set may be empty but is guaranteed not to be code null code If this set is not empty it is guaranteed to only contain instances of code String code 
Unregisters an instance of code I Context Manager Listener code listening for changes to properties of this instance param context Manager Listener the instance to unregister Must not be code null code If an attempt is made to unregister an instance which is not already registered with this instance no operation is performed void remove Context Manager Listener  IContextManagerListener contextManagerListener removeContextManagerListener

Notifies that one or more properties of an instance of code I Context Manager code have changed Specific details are described in the code Context Manager Event code param context Manager Event the context manager event Guaranteed not to be code null code  IContextManager ContextManagerEvent contextManagerEvent

p Add a single enabled submission for consideration An enabled submission is a description of certain criteria under which a particular context should become active All added submissions will be check when the conditions in the workbench change and zero or more contexts will be selected as active p p Just because an enabled submission is added it does not mean that the corresponding context will become active The workbench will consider the request but other factors such as conflicts may prevent the context from becoming active p param enabled Submission The enabled submission to be considered must not be code null code  enabledSubmission
p Adds zero or more enabled submissions for consideration An enabled submission is a description of certain criteria under which a particular context should become active All added submissions will be check when the conditions in the workbench change and zero or more contexts will be selected as active p p Just because an enabled submission is added it does not mean that the corresponding context will become active The workbench will consider the request but other factors such as conflicts may prevent the context from becoming active p param enabled Submissions The enabled submissions to be considered must not be code null code but may be empty Every element in the collection must be an instance of code Enabled Submission code  enabledSubmissions EnabledSubmission
Returns the context manager for the workbench return the context manager for the workbench Guaranteed not to be code null code 
Tests whether the global key binding architecture is currently active return code true code if the key bindings are active code false code otherwise 
p Registers a shell to automatically promote or demote some basic types of contexts The In Dialogs and In Windows contexts are provided by the system This a convenience method to ensure that these contexts are promoted when the given is shell is active p p If a shell is registered as a window then the In Windows context is enabled when that shell is active If a shell is registered as a dialog or is not registered but has a parent shell then the In Dialogs context is enabled when that shell is active If the shell is registered as none or is not registered but has no parent shell then the neither of the contexts will be enabled by us someone else can always enabled them p p If the provided shell has already been registered then this method will change the registration p param shell The shell to register for key bindings must not be code null code param type The type of shell being registered This value must be one of the constants given in this interface return code true code if the shell had already been registered i e the registration has changed code false code otherwise 
p Removes a single enabled submission from consideration Only the same enabled submission will be removed equivalent submissions will not be removed Removing an enabled submission does not necessarily mean that the corresponding context will become inactive It is possible that other parts of the application have requested that the context be enabled p p There is no way to disable a context It is only possible to not enable it p param enabled Submission The enabled submission to be removed must not be code null code  enabledSubmission
p Removes a collection of enabled submissions from consideration Only the same enabled submissions will be removed equivalent submissions will not be removed Removing an enabled submission does not necessarily mean that the corresponding context will become inactive It is possible that other parts of the application have requested that the context be enabled p p There is no way to disable a context It is only possible to not enable it p param enabled Submissions The enabled submissions to be removed must not be code null code but may be empty The collection must only contain instances of code Enabled Submission code  enabledSubmissions EnabledSubmission
Enables or disables the global key binding architecture The architecture should be enabled by default When enabled keyboard shortcuts are active and that key events can trigger commands This also means that widgets may not see all key events as they might be trapped as a keyboard shortcut When disabled no key events will trapped as keyboard shortcuts and that no commands can be triggered by keyboard events Exception it is possible that someone listening for key events on a widget could trigger a command param enabled Whether the key filter should be enabled 
p Unregisters a shell that was previously registered After this method completes the shell will be treated as if it had never been registered at all If you have registered a shell you should ensure that this method is called when the shell is disposed Otherwise a potential memory leak will exist p p If the shell was never registered or if the shell is code null code then this method returns code false code and does nothing param shell The shell to be unregistered does nothing if this value is code null code return code true code if the shell had been registered code false code otherwise 

Creates a new instance of this class with the specified detail message param message the detail message public Not Defined Exception String message super message  NotDefinedException

Constructs a list selection dialog param parent The parent for the list param renderer I Label Provider for the list protected Abstract Element List Selection Dialog Shell parent I Label Provider renderer super parent f Renderer renderer int shell Style get Shell Style set Shell Style shell Style SWT MAX SWT RESIZE  ILabelProvider AbstractElementListSelectionDialog ILabelProvider fRenderer shellStyle getShellStyle setShellStyle shellStyle
Handles default selection double click By default the OK button is pressed protected void handle Default Selected if validate Current Selection button Pressed I Dialog Constants OK ID  handleDefaultSelected validateCurrentSelection buttonPressed IDialogConstants OK_ID
Specifies if sorting filtering and folding is case sensitive param ignore Case public void set Ignore Case boolean ignore Case f Ignore Case ignore Case  ignoreCase setIgnoreCase ignoreCase fIgnoreCase ignoreCase
Returns if sorting filtering and folding is case sensitive return boolean public boolean is Case Ignored return f Ignore Case  isCaseIgnored fIgnoreCase
Specifies whether everything or nothing should be filtered on empty filter string param match Empty String boolean public void set Match Empty String boolean match Empty String f Match Empty String match Empty String  matchEmptyString setMatchEmptyString matchEmptyString fMatchEmptyString matchEmptyString
Specifies if multiple selection is allowed param multiple Selection public void set Multiple Selection boolean multiple Selection f Is Multiple Selection multiple Selection  multipleSelection setMultipleSelection multipleSelection fIsMultipleSelection multipleSelection
Specifies whether duplicate entries are displayed or not param allow Duplicates public void set Allow Duplicates boolean allow Duplicates f Allow Duplicates allow Duplicates  allowDuplicates setAllowDuplicates allowDuplicates fAllowDuplicates allowDuplicates
Sets the list size in unit of characters param width the width of the list param height the height of the list public void set Size int width int height f Width width f Height height  setSize fWidth fHeight
Sets the message to be displayed if the list is empty param message the message to be displayed public void set Empty List Message String message f Empty List Message message  setEmptyListMessage fEmptyListMessage
Sets the message to be displayed if the selection is empty param message the message to be displayed public void set Empty Selection Message String message f Empty Selection Message message  setEmptySelectionMessage fEmptySelectionMessage
Sets an optional validator to check if the selection is valid The validator is invoked whenever the selection changes param validator the validator to validate the selection public void set Validator I Selection Status Validator validator f Validator validator  setValidator ISelectionStatusValidator fValidator
Sets the elements of the list widget To be called within open param elements the elements of the list protected void set List Elements Object elements Assert is Not Null f Filtered List f Filtered List set Elements elements  setListElements isNotNull fFilteredList fFilteredList setElements
Sets the filter pattern param filter the filter pattern public void set Filter String filter if f Filter Text null f Filter filter else f Filter Text set Text filter  setFilter fFilterText fFilter fFilterText setText
Returns the current filter pattern return returns the current filter pattern or code null code if filter was not set public String get Filter if f Filtered List null return f Filter else return f Filtered List get Filter  getFilter fFilteredList fFilter fFilteredList getFilter
Returns the indices referring the current selection To be called within open return returns the indices of the current selection protected int get Selection Indices Assert is Not Null f Filtered List return f Filtered List get Selection Indices  getSelectionIndices isNotNull fFilteredList fFilteredList getSelectionIndices
Returns an index referring the first current selection To be called within open return returns the indices of the current selection protected int get Selection Index Assert is Not Null f Filtered List return f Filtered List get Selection Index  getSelectionIndex isNotNull fFilteredList fFilteredList getSelectionIndex
Sets the selection referenced by an array of elements Empty or null array removes selection To be called within open param selection the indices of the selection protected void set Selection Object selection Assert is Not Null f Filtered List f Filtered List set Selection selection  setSelection isNotNull fFilteredList fFilteredList setSelection
Returns an array of the currently selected elements To be called within or after open return returns an array of the currently selected elements protected Object get Selected Elements Assert is Not Null f Filtered List return f Filtered List get Selection  getSelectedElements isNotNull fFilteredList fFilteredList getSelection
Returns all elements which are folded together to one entry in the list param index the index selecting the entry in the list return returns an array of elements folded together public Object get Folded Elements int index Assert is Not Null f Filtered List return f Filtered List get Folded Elements index  getFoldedElements isNotNull fFilteredList fFilteredList getFoldedElements
Creates the message text widget and sets layout data param composite the parent composite of the message area protected Label create Message Area Composite composite Label label super create Message Area composite Grid Data data new Grid Data data grab Excess Vertical Space false data grab Excess Horizontal Space true data horizontal Alignment Grid Data FILL data vertical Alignment Grid Data BEGINNING label set Layout Data data f Message label return label  createMessageArea createMessageArea GridData GridData grabExcessVerticalSpace grabExcessHorizontalSpace horizontalAlignment GridData verticalAlignment GridData setLayoutData fMessage
Handles a selection changed event By default the current selection is validated protected void handle Selection Changed validate Current Selection  handleSelectionChanged validateCurrentSelection
Validates the current selection and updates the status line accordingly return boolean code true code if the current selection is valid protected boolean validate Current Selection Assert is Not Null f Filtered List I Status status Object elements get Selected Elements if elements length 0 if f Validator null status f Validator validate elements else status new Status I Status OK PlatformUI PLUGIN ID I Status OK NON NLS 1 null else if f Filtered List is Empty status new Status I Status ERROR PlatformUI PLUGIN ID I Status ERROR f Empty List Message null else status new Status I Status ERROR PlatformUI PLUGIN ID I Status ERROR f Empty Selection Message null update Status status return status isOK  validateCurrentSelection isNotNull fFilteredList IStatus getSelectedElements fValidator fValidator IStatus PLUGIN_ID IStatus fFilteredList isEmpty IStatus PLUGIN_ID IStatus fEmptyListMessage IStatus PLUGIN_ID IStatus fEmptySelectionMessage updateStatus
see Dialog cancel Pressed protected void cancel Pressed set Result null super cancel Pressed  cancelPressed cancelPressed setResult cancelPressed
list add Selection Listener new Selection Listener public void widget Default Selected Selection Event e handle Default Selected  addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent handleDefaultSelected
handle Default Selected public void widget Selected Selection Event e handle Widget Selected  handleDefaultSelected widgetSelected SelectionEvent handleWidgetSelected
Creates a filtered list param parent the parent composite return returns the filtered list widget protected Filtered List create Filtered List Composite parent int flags SWT BORDER SWT V SCROLL SWT H SCROLL f Is Multiple Selection SWT MULTI SWT SINGLE Filtered List list new Filtered List parent flags f Renderer f Ignore Case f Allow Duplicates f Match Empty String Grid Data data new Grid Data data width Hint convert Width In Chars To Pixels f Width data height Hint convert Height In Chars To Pixels f Height data grab Excess Vertical Space true data grab Excess Horizontal Space true data horizontal Alignment Grid Data FILL data vertical Alignment Grid Data FILL list set Layout Data data list set Font parent get Font list set Filter f Filter null f Filter NON NLS 1 list add Selection Listener new Selection Listener public void widget Default Selected Selection Event e handle Default Selected public void widget Selected Selection Event e handle Widget Selected f Filtered List list return list  FilteredList createFilteredList V_SCROLL H_SCROLL fIsMultipleSelection FilteredList FilteredList fRenderer fIgnoreCase fAllowDuplicates fMatchEmptyString GridData GridData widthHint convertWidthInCharsToPixels fWidth heightHint convertHeightInCharsToPixels fHeight grabExcessVerticalSpace grabExcessHorizontalSpace horizontalAlignment GridData verticalAlignment GridData setLayoutData setFont getFont setFilter fFilter fFilter addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent handleDefaultSelected widgetSelected SelectionEvent handleWidgetSelected fFilteredList
3515 private void handle Widget Selected Object new Selection f Filtered List get Selection if new Selection length f Selection length f Selection new Selection handle Selection Changed else for int i 0 i new Selection length i if new Selection i equals f Selection i f Selection new Selection handle Selection Changed break  handleWidgetSelected newSelection fFilteredList getSelection newSelection fSelection fSelection newSelection handleSelectionChanged newSelection newSelection fSelection fSelection newSelection handleSelectionChanged
Listener listener new Listener public void handle Event Event e f Filtered List set Filter f Filter Text get Text  handleEvent fFilteredList setFilter fFilterText getText
text add Key Listener new Key Listener public void key Pressed Key Event e if e key Code SWT ARROW DOWN f Filtered List set Focus  addKeyListener KeyListener keyPressed KeyEvent keyCode ARROW_DOWN fFilteredList setFocus
public void key Released Key Event e  keyReleased KeyEvent
protected Text create Filter Text Composite parent Text text new Text parent SWT BORDER Grid Data data new Grid Data data grab Excess Vertical Space false data grab Excess Horizontal Space true data horizontal Alignment Grid Data FILL data vertical Alignment Grid Data BEGINNING text set Layout Data data text set Font parent get Font text set Text f Filter null f Filter NON NLS 1 Listener listener new Listener public void handle Event Event e f Filtered List set Filter f Filter Text get Text text add Listener SWT Modify listener text add Key Listener new Key Listener public void key Pressed Key Event e if e key Code SWT ARROW DOWN f Filtered List set Focus public void key Released Key Event e f Filter Text text return text  createFilterText GridData GridData grabExcessVerticalSpace grabExcessHorizontalSpace horizontalAlignment GridData verticalAlignment GridData setLayoutData setFont getFont setText fFilter fFilter handleEvent fFilteredList setFilter fFilterText getText addListener addKeyListener KeyListener keyPressed KeyEvent keyCode ARROW_DOWN fFilteredList setFocus keyReleased KeyEvent fFilterText
see org eclipse jface window Window open public int open super open return get Return Code  getReturnCode
private void access super Create super create  superCreate
Busy Indicator show While null new Runnable public void run access super Create Assert is Not Null f Filtered List if f Filtered List is Empty handle Empty List else validate Current Selection f Filter Text select All f Filter Text set Focus  BusyIndicator showWhile superCreate isNotNull fFilteredList fFilteredList isEmpty handleEmptyList validateCurrentSelection fFilterText selectAll fFilterText setFocus
public void create Busy Indicator show While null new Runnable public void run access super Create Assert is Not Null f Filtered List if f Filtered List is Empty handle Empty List else validate Current Selection f Filter Text select All f Filter Text set Focus  BusyIndicator showWhile superCreate isNotNull fFilteredList fFilteredList isEmpty handleEmptyList validateCurrentSelection fFilterText selectAll fFilterText setFocus
Handles empty list by disabling widgets protected void handle Empty List f Message set Enabled false f Filter Text set Enabled false f Filtered List set Enabled false update Ok State  handleEmptyList fMessage setEnabled fFilterText setEnabled fFilteredList setEnabled updateOkState
Update the enablement of the OK button based on whether or not there is a selection protected void update Ok State Button ok Button get Ok Button if ok Button null ok Button set Enabled get Selected Elements length 0  updateOkState okButton getOkButton okButton okButton setEnabled getSelectedElements

private Object f Expanded Elements Constructs an instance of code Element Tree Selection Dialog code param parent The shell to parent from param label Provider the label provider to render the entries param content Provider the content provider to evaluate the tree structure public Checked Tree Selection Dialog Shell parent I Label Provider label Provider I Tree Content Provider content Provider super parent f Label Provider label Provider f Content Provider content Provider set Result new Array List 0 set Status Line Above Buttons true f Container Mode false f Expanded Elements null int shell Style get Shell Style set Shell Style shell Style SWT MAX SWT RESIZE  fExpandedElements ElementTreeSelectionDialog labelProvider contentProvider CheckedTreeSelectionDialog ILabelProvider labelProvider ITreeContentProvider contentProvider fLabelProvider labelProvider fContentProvider contentProvider setResult ArrayList setStatusLineAboveButtons fContainerMode fExpandedElements shellStyle getShellStyle setShellStyle shellStyle
If set the checked gray state of containers inner nodes is derived from the checked state of its leaf nodes param container Mode The container Mode to set public void set Container Mode boolean container Mode f Container Mode container Mode  containerMode containerMode setContainerMode containerMode fContainerMode containerMode
Sets the initial selection Convenience method param selection the initial selection public void set Initial Selection Object selection set Initial Selections new Object selection  setInitialSelection setInitialSelections
Sets the message to be displayed if the list is empty param message the message to be displayed public void set Empty List Message String message f Empty List Message message  setEmptyListMessage fEmptyListMessage
Sets the sorter used by the tree viewer param sorter public void set Sorter Viewer Sorter sorter f Sorter sorter  setSorter ViewerSorter fSorter
Adds a filter to the tree viewer param filter a filter public void add Filter Viewer Filter filter if f Filters null f Filters new Array List 4 f Filters add filter  addFilter ViewerFilter fFilters fFilters ArrayList fFilters
Sets an optional validator to check if the selection is valid The validator is invoked whenever the selection changes param validator the validator to validate the selection public void set Validator I Selection Status Validator validator f Validator validator  setValidator ISelectionStatusValidator fValidator
Sets the tree input param input the tree input public void set Input Object input f Input input  setInput fInput
Expands elements in the tree param elements The elements that will be expanded public void set Expanded Elements Object elements f Expanded Elements elements  setExpandedElements fExpandedElements
Sets the size of the tree in unit of characters param width the width of the tree param height the height of the tree public void set Size int width int height f Width width f Height height  setSize fWidth fHeight
Validate the receiver and update the status with the result protected void updateOK Status if f Is Empty if f Validator null f Curr Status f Validator validate f Viewer get Checked Elements update Status f Curr Status else if f Curr Status isOK f Curr Status new Status I Status OK PlatformUI PLUGIN ID I Status OK NON NLS 1 null else f Curr Status new Status I Status ERROR PlatformUI PLUGIN ID I Status OK f Empty List Message null update Status f Curr Status  updateOKStatus fIsEmpty fValidator fCurrStatus fValidator fViewer getCheckedElements updateStatus fCurrStatus fCurrStatus fCurrStatus IStatus PLUGIN_ID IStatus fCurrStatus IStatus PLUGIN_ID IStatus fEmptyListMessage updateStatus fCurrStatus
public int open f Is Empty evaluate If Tree Empty f Input super open return get Return Code  fIsEmpty evaluateIfTreeEmpty fInput getReturnCode
return get Return Code private void access super Create super create  getReturnCode superCreate
Handles cancel button pressed event protected void cancel Pressed set Result null super cancel Pressed  cancelPressed setResult cancelPressed
see Selection Status Dialog compute Result protected void compute Result set Result Arrays as List f Viewer get Checked Elements  SelectionStatusDialog computeResult computeResult setResult asList fViewer getCheckedElements
Busy Indicator show While null new Runnable public void run access super Create f Viewer set Checked Elements get Initial Element Selections to Array if f Expanded Elements null f Viewer set Expanded Elements f Expanded Elements updateOK Status  BusyIndicator showWhile superCreate fViewer setCheckedElements getInitialElementSelections toArray fExpandedElements fViewer setExpandedElements fExpandedElements updateOKStatus
public void create Busy Indicator show While null new Runnable public void run access super Create f Viewer set Checked Elements get Initial Element Selections to Array if f Expanded Elements null f Viewer set Expanded Elements f Expanded Elements updateOK Status  BusyIndicator showWhile superCreate fViewer setCheckedElements getInitialElementSelections toArray fExpandedElements fViewer setExpandedElements fExpandedElements updateOKStatus
protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent Label message Label create Message Area composite Checkbox Tree Viewer tree Viewer create Tree Viewer composite Control button Composite create Selection Buttons composite Grid Data data new Grid Data Grid Data FILL BOTH data width Hint convert Width In Chars To Pixels f Width data height Hint convert Height In Chars To Pixels f Height Tree tree Widget tree Viewer get Tree tree Widget set Layout Data data tree Widget set Font parent get Font if f Is Empty message Label set Enabled false tree Widget set Enabled false button Composite set Enabled false return composite  createDialogArea createDialogArea messageLabel createMessageArea CheckboxTreeViewer treeViewer createTreeViewer buttonComposite createSelectionButtons GridData GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels fWidth heightHint convertHeightInCharsToPixels fHeight treeWidget treeViewer getTree treeWidget setLayoutData treeWidget setFont getFont fIsEmpty messageLabel setEnabled treeWidget setEnabled buttonComposite setEnabled
f Viewer set Label Provider f Label Provider f Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event updateOK Status  fViewer setLabelProvider fLabelProvider fViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent updateOKStatus
Creates the tree viewer param parent the parent composite return the tree viewer protected Checkbox Tree Viewer create Tree Viewer Composite parent if f Container Mode f Viewer new Container Checked Tree Viewer parent SWT BORDER else f Viewer new Checkbox Tree Viewer parent SWT BORDER f Viewer set Content Provider f Content Provider f Viewer set Label Provider f Label Provider f Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event updateOK Status f Viewer set Sorter f Sorter if f Filters null for int i 0 i f Filters size i f Viewer add Filter Viewer Filter f Filters get i f Viewer set Input f Input return f Viewer  CheckboxTreeViewer createTreeViewer fContainerMode fViewer ContainerCheckedTreeViewer fViewer CheckboxTreeViewer fViewer setContentProvider fContentProvider fViewer setLabelProvider fLabelProvider fViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent updateOKStatus fViewer setSorter fSorter fFilters fFilters fViewer addFilter ViewerFilter fFilters fViewer setInput fInput fViewer
Returns the tree viewer return the tree viewer protected Checkbox Tree Viewer get Tree Viewer return f Viewer  CheckboxTreeViewer getTreeViewer fViewer
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e Object viewer Elements f Content Provider get Elements f Input if f Container Mode f Viewer set Checked Elements viewer Elements else for int i 0 i viewer Elements length i f Viewer set Subtree Checked viewer Elements i true updateOK Status  SelectionListener SelectionAdapter widgetSelected SelectionEvent viewerElements fContentProvider getElements fInput fContainerMode fViewer setCheckedElements viewerElements viewerElements fViewer setSubtreeChecked viewerElements updateOKStatus
false listener new Selection Adapter public void widget Selected Selection Event e f Viewer set Checked Elements new Object 0 updateOK Status  SelectionAdapter widgetSelected SelectionEvent fViewer setCheckedElements updateOKStatus
Adds the selection and deselection buttons to the dialog param composite the parent composite return Composite the composite the buttons were created in protected Composite create Selection Buttons Composite composite Composite button Composite new Composite composite SWT RIGHT Grid Layout layout new Grid Layout layout num Columns 2 button Composite set Layout layout button Composite set Font composite get Font Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data GRAB HORIZONTAL data grab Excess Horizontal Space true composite set Data data Button select Button create Button button Composite I Dialog Constants SELECT ALL ID Workbench Messages get String Checked Tree Selection Dialog select all NON NLS 1 false Selection Listener listener new Selection Adapter public void widget Selected Selection Event e Object viewer Elements f Content Provider get Elements f Input if f Container Mode f Viewer set Checked Elements viewer Elements else for int i 0 i viewer Elements length i f Viewer set Subtree Checked viewer Elements i true updateOK Status select Button add Selection Listener listener Button deselect Button create Button button Composite I Dialog Constants DESELECT ALL ID Workbench Messages get String Checked Tree Selection Dialog deselect all NON NLS 1 false listener new Selection Adapter public void widget Selected Selection Event e f Viewer set Checked Elements new Object 0 updateOK Status deselect Button add Selection Listener listener return button Composite  createSelectionButtons buttonComposite GridLayout GridLayout numColumns buttonComposite setLayout buttonComposite setFont getFont GridData GridData GridData HORIZONTAL_ALIGN_END GridData GRAB_HORIZONTAL grabExcessHorizontalSpace setData selectButton createButton buttonComposite IDialogConstants SELECT_ALL_ID WorkbenchMessages getString CheckedTreeSelectionDialog select_all SelectionListener SelectionAdapter widgetSelected SelectionEvent viewerElements fContentProvider getElements fInput fContainerMode fViewer setCheckedElements viewerElements viewerElements fViewer setSubtreeChecked viewerElements updateOKStatus selectButton addSelectionListener deselectButton createButton buttonComposite IDialogConstants DESELECT_ALL_ID WorkbenchMessages getString CheckedTreeSelectionDialog deselect_all SelectionAdapter widgetSelected SelectionEvent fViewer setCheckedElements updateOKStatus deselectButton addSelectionListener buttonComposite
private boolean evaluate If Tree Empty Object input Object elements f Content Provider get Elements input if elements length 0 if f Filters null for int i 0 i f Filters size i Viewer Filter curr Viewer Filter f Filters get i elements curr filter f Viewer input elements return elements length 0  evaluateIfTreeEmpty fContentProvider getElements fFilters fFilters ViewerFilter ViewerFilter fFilters fViewer

private I Container container Creates a generator for the container resource folder or project at the given workspace path Assumes the path has already been validated p Call code get Container code to create any missing resources along the path p param container Path the workspace path of the container public Container Generator I Path container Path super this container Full Path container Path  IContainer getContainer containerPath ContainerGenerator IPath containerPath containerFullPath containerPath
Creates a folder resource for the given folder handle param folder Handle the handle to create a folder resource param monitor the progress monitor to show visual progress return the folder handle code folder Handle code exception Core Exception if the operation fails exception Operation Canceled Exception if the operation is canceled private I Folder create Folder I Folder folder Handle I Progress Monitor monitor throws Core Exception folder Handle create false true monitor if monitor is Canceled throw new Operation Canceled Exception return folder Handle  folderHandle folderHandle CoreException OperationCanceledException IFolder createFolder IFolder folderHandle IProgressMonitor CoreException folderHandle isCanceled OperationCanceledException folderHandle
Creates a folder resource handle for the folder with the given name This method does not create the folder resource this is the responsibility of code create Folder code param container the resource container param folder Name the name of the folder return the new folder resource handle private I Folder create Folder Handle I Container container String folder Name return container get Folder new Path folder Name  createFolder folderName IFolder createFolderHandle IContainer folderName getFolder folderName
Creates a project resource for the given project handle param project Handle the handle to create a project resource param monitor the progress monitor to show visual progress return the project handle code project Handle code exception Core Exception if the operation fails exception Operation Canceled Exception if the operation is canceled private I Project create Project I Project project Handle I Progress Monitor monitor throws Core Exception try monitor begin Task 2000 NON NLS 1 project Handle create new Sub Progress Monitor monitor 1000 if monitor is Canceled throw new Operation Canceled Exception project Handle open new Sub Progress Monitor monitor 1000 if monitor is Canceled throw new Operation Canceled Exception finally monitor done return project Handle  projectHandle projectHandle CoreException OperationCanceledException IProject createProject IProject projectHandle IProgressMonitor CoreException beginTask projectHandle SubProgressMonitor isCanceled OperationCanceledException projectHandle SubProgressMonitor isCanceled OperationCanceledException projectHandle
Creates a project resource handle for the project with the given name This method does not create the project resource this is the responsibility of code create Project code param root the workspace root resource param project Name the name of the project return the new project resource handle private I Project create Project Handle I Workspace Root root String project Name return root get Project project Name  createProject projectName IProject createProjectHandle IWorkspaceRoot projectName getProject projectName
IDE Workbench Plugin get Plugin Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception monitor begin Task IDE Workbench Messages get String Container Generator progress Message 1000 container Full Path segment Count NON NLS 1 if container null return Does the container exist already I Workspace Root root get Workspace Root container I Container root find Member container Full Path if container null return Create the container for the given path container root for int i 0 i container Full Path segment Count i String current Segment container Full Path segment i I Resource resource container find Member current Segment if resource null container I Container resource monitor worked 1000 else if i 0 I Project project Handle create Project Handle root current Segment container create Project project Handle new Sub Progress Monitor monitor 1000 else I Folder folder Handle create Folder Handle container current Segment container create Folder folder Handle new Sub Progress Monitor monitor 1000  IDEWorkbenchPlugin getPluginWorkspace IWorkspaceRunnable IProgressMonitor CoreException beginTask IDEWorkbenchMessages getString ContainerGenerator progressMessage containerFullPath segmentCount IWorkspaceRoot getWorkspaceRoot IContainer findMember containerFullPath containerFullPath segmentCount currentSegment containerFullPath IResource findMember currentSegment IContainer IProject projectHandle createProjectHandle currentSegment createProject projectHandle SubProgressMonitor IFolder folderHandle createFolderHandle currentSegment createFolder folderHandle SubProgressMonitor
Ensures that this generator s container resource exists Creates any missing resource containers along the path does nothing if the container resource already exists p Note This method should be called within a workspace modify operation since it may create resources p param monitor a progress monitor return the container resource exception Core Exception if the operation fails exception Operation Canceled Exception if the operation is canceled public I Container generate Container I Progress Monitor monitor throws Core Exception IDE Workbench Plugin get Plugin Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception monitor begin Task IDE Workbench Messages get String Container Generator progress Message 1000 container Full Path segment Count NON NLS 1 if container null return Does the container exist already I Workspace Root root get Workspace Root container I Container root find Member container Full Path if container null return Create the container for the given path container root for int i 0 i container Full Path segment Count i String current Segment container Full Path segment i I Resource resource container find Member current Segment if resource null container I Container resource monitor worked 1000 else if i 0 I Project project Handle create Project Handle root current Segment container create Project project Handle new Sub Progress Monitor monitor 1000 else I Folder folder Handle create Folder Handle container current Segment container create Folder folder Handle new Sub Progress Monitor monitor 1000 monitor return container  CoreException OperationCanceledException IContainer generateContainer IProgressMonitor CoreException IDEWorkbenchPlugin getPluginWorkspace IWorkspaceRunnable IProgressMonitor CoreException beginTask IDEWorkbenchMessages getString ContainerGenerator progressMessage containerFullPath segmentCount IWorkspaceRoot getWorkspaceRoot IContainer findMember containerFullPath containerFullPath segmentCount currentSegment containerFullPath IResource findMember currentSegment IContainer IProject projectHandle createProjectHandle currentSegment createProject projectHandle SubProgressMonitor IFolder folderHandle createFolderHandle currentSegment createFolder folderHandle SubProgressMonitor
Returns the workspace root resource handle return the workspace root resource handle private I Workspace Root get Workspace Root return IDE Workbench Plugin get Plugin Workspace get Root  IWorkspaceRoot getWorkspaceRoot IDEWorkbenchPlugin getPluginWorkspace getRoot

private boolean show Closed Projects true Creates a resource container selection dialog rooted at the given resource All selections are considered valid param parent Shell the parent shell param initial Root the initial selection in the tree param allow New Container Name code true code to enable the user to type in a new container name and code false code to restrict the user to just selecting from existing ones param message the message to be displayed at the top of this dialog or code null code to display a default message public Container Selection Dialog Shell parent Shell I Container initial Root boolean allow New Container Name String message super parent Shell set Title IDE Workbench Messages get String Container Selection Dialog title NON NLS 1 this initial Selection initial Root this allow New Container Name allow New Container Name if message null set Message message else set Message IDE Workbench Messages get String Container Selection Dialog message NON NLS 1 set Shell Style get Shell Style SWT RESIZE  showClosedProjects parentShell initialRoot allowNewContainerName ContainerSelectionDialog parentShell IContainer initialRoot allowNewContainerName parentShell setTitle IDEWorkbenchMessages getString ContainerSelectionDialog initialSelection initialRoot allowNewContainerName allowNewContainerName setMessage setMessage IDEWorkbenchMessages getString ContainerSelectionDialog setShellStyle getShellStyle
protected void configure Shell Shell shell super configure Shell shell Workbench Help set Help shell I Help Context Ids CONTAINER SELECTION DIALOG  configureShell configureShell WorkbenchHelp setHelp IHelpContextIds CONTAINER_SELECTION_DIALOG
Listener listener new Listener public void handle Event Event event if status Message null validator null String error Msg validator is Valid group get Container Full Path if error Msg null error Msg equals NON NLS 1 status Message set Text NON NLS 1 get Ok Button set Enabled true else status Message set Foreground J Face Colors get Error Text status Message get Display status Message set Text error Msg get Ok Button set Enabled false  handleEvent statusMessage errorMsg isValid getContainerFullPath errorMsg errorMsg statusMessage setText getOkButton setEnabled statusMessage setForeground JFaceColors getErrorText statusMessage getDisplay statusMessage setText errorMsg getOkButton setEnabled
protected Control create Dialog Area Composite parent create composite Composite area Composite super create Dialog Area parent Listener listener new Listener public void handle Event Event event if status Message null validator null String error Msg validator is Valid group get Container Full Path if error Msg null error Msg equals NON NLS 1 status Message set Text NON NLS 1 get Ok Button set Enabled true else status Message set Foreground J Face Colors get Error Text status Message get Display status Message set Text error Msg get Ok Button set Enabled false container selection group group new Container Selection Group area listener allow New Container Name get Message show Closed Projects if initial Selection null group set Selected Container initial Selection status Message new Label parent SWT NONE status Message set Layout Data new Grid Data Grid Data FILL HORIZONTAL status Message set Font parent get Font return dialog Area  createDialogArea createDialogArea handleEvent statusMessage errorMsg isValid getContainerFullPath errorMsg errorMsg statusMessage setText getOkButton setEnabled statusMessage setForeground JFaceColors getErrorText statusMessage getDisplay statusMessage setText errorMsg getOkButton setEnabled ContainerSelectionGroup allowNewContainerName getMessage showClosedProjects initialSelection setSelectedContainer initialSelection statusMessage statusMessage setLayoutData GridData GridData FILL_HORIZONTAL statusMessage setFont getFont dialogArea
The code Container Selection Dialog code implementation of this code Dialog code method builds a list of the selected resource containers for later retrieval by the client and closes this dialog protected void ok Pressed List chosen Container Path List new Array List I Path return Value group get Container Full Path if return Value null chosen Container Path List add return Value set Result chosen Container Path List super ok Pressed  ContainerSelectionDialog okPressed chosenContainerPathList ArrayList IPath returnValue getContainerFullPath returnValue chosenContainerPathList returnValue setResult chosenContainerPathList okPressed
Sets the validator to use param validator A selection validator public void set Validator I Selection Validator validator this validator validator  setValidator ISelectionValidator
Set whether or not closed projects should be shown in the selection dialog param show Whether or not to show closed projects public void show Closed Projects boolean show this show Closed Projects show  showClosedProjects showClosedProjects

Creates a list selection dialog param parent the parent widget param renderer the label renderer public Element List Selection Dialog Shell parent I Label Provider renderer super parent renderer  ElementListSelectionDialog ILabelProvider
Sets the elements of the list param elements the elements of the list public void set Elements Object elements f Elements elements  setElements fElements
see Selection Status Dialog compute Result protected void compute Result set Result Arrays as List get Selected Elements  SelectionStatusDialog computeResult computeResult setResult asList getSelectedElements
protected Control create Dialog Area Composite parent Composite contents Composite super create Dialog Area parent create Message Area contents create Filter Text contents create Filtered List contents set List Elements f Elements set Selection get Initial Element Selections to Array return contents  createDialogArea createDialogArea createMessageArea createFilterText createFilteredList setListElements fElements setSelection getInitialElementSelections toArray

Constructs an instance of code Element Tree Selection Dialog code param parent The parent shell for the dialog param label Provider the label provider to render the entries param content Provider the content provider to evaluate the tree structure public Element Tree Selection Dialog Shell parent I Label Provider label Provider I Tree Content Provider content Provider super parent f Label Provider label Provider f Content Provider content Provider set Result new Array List 0 set Status Line Above Buttons true int shell Style get Shell Style set Shell Style shell Style SWT MAX SWT RESIZE  ElementTreeSelectionDialog labelProvider contentProvider ElementTreeSelectionDialog ILabelProvider labelProvider ITreeContentProvider contentProvider fLabelProvider labelProvider fContentProvider contentProvider setResult ArrayList setStatusLineAboveButtons shellStyle getShellStyle setShellStyle shellStyle
Sets the initial selection Convenience method param selection the initial selection public void set Initial Selection Object selection set Initial Selections new Object selection  setInitialSelection setInitialSelections
Sets the message to be displayed if the list is empty param message the message to be displayed public void set Empty List Message String message f Empty List Message message  setEmptyListMessage fEmptyListMessage
Specifies if multiple selection is allowed param allow Multiple public void set Allow Multiple boolean allow Multiple f Allow Multiple allow Multiple  allowMultiple setAllowMultiple allowMultiple fAllowMultiple allowMultiple
Specifies if default selected events double click are created param double Click Selects public void set Double Click Selects boolean double Click Selects f Double Click Selects double Click Selects  doubleClickSelects setDoubleClickSelects doubleClickSelects fDoubleClickSelects doubleClickSelects
Sets the sorter used by the tree viewer param sorter public void set Sorter Viewer Sorter sorter f Sorter sorter  setSorter ViewerSorter fSorter
Adds a filter to the tree viewer param filter a filter public void add Filter Viewer Filter filter if f Filters null f Filters new Array List 4 f Filters add filter  addFilter ViewerFilter fFilters fFilters ArrayList fFilters
Sets an optional validator to check if the selection is valid The validator is invoked whenever the selection changes param validator the validator to validate the selection public void set Validator I Selection Status Validator validator f Validator validator  setValidator ISelectionStatusValidator fValidator
Sets the tree input param input the tree input public void set Input Object input f Input input  setInput fInput
Sets the size of the tree in unit of characters param width the width of the tree param height the height of the tree public void set Size int width int height f Width width f Height height  setSize fWidth fHeight
Validate the receiver and update the ok status protected void updateOK Status if f Is Empty if f Validator null f Curr Status f Validator validate get Result update Status f Curr Status else f Curr Status new Status I Status OK PlatformUI PLUGIN ID I Status OK NON NLS 1 null else f Curr Status new Status I Status ERROR PlatformUI PLUGIN ID I Status ERROR f Empty List Message null update Status f Curr Status  updateOKStatus fIsEmpty fValidator fCurrStatus fValidator getResult updateStatus fCurrStatus fCurrStatus IStatus PLUGIN_ID IStatus fCurrStatus IStatus PLUGIN_ID IStatus fEmptyListMessage updateStatus fCurrStatus
public int open f Is Empty evaluate If Tree Empty f Input super open return get Return Code  fIsEmpty evaluateIfTreeEmpty fInput getReturnCode
private void access super Create super create  superCreate
Handles cancel button pressed event protected void cancel Pressed set Result null super cancel Pressed  cancelPressed setResult cancelPressed
see Selection Status Dialog compute Result protected void compute Result set Result I Structured Selection f Viewer get Selection to List  SelectionStatusDialog computeResult computeResult setResult IStructuredSelection fViewer getSelection toList
Busy Indicator show While null new Runnable public void run access super Create f Viewer set Selection new Structured Selection get Initial Element Selections true updateOK Status  BusyIndicator showWhile superCreate fViewer setSelection StructuredSelection getInitialElementSelections updateOKStatus
public void create Busy Indicator show While null new Runnable public void run access super Create f Viewer set Selection new Structured Selection get Initial Element Selections true updateOK Status  BusyIndicator showWhile superCreate fViewer setSelection StructuredSelection getInitialElementSelections updateOKStatus
protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent Label message Label create Message Area composite Tree Viewer tree Viewer create Tree Viewer composite Grid Data data new Grid Data Grid Data FILL BOTH data width Hint convert Width In Chars To Pixels f Width data height Hint convert Height In Chars To Pixels f Height Tree tree Widget tree Viewer get Tree tree Widget set Layout Data data tree Widget set Font parent get Font if f Is Empty message Label set Enabled false tree Widget set Enabled false return composite  createDialogArea createDialogArea messageLabel createMessageArea TreeViewer treeViewer createTreeViewer GridData GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels fWidth heightHint convertHeightInCharsToPixels fHeight treeWidget treeViewer getTree treeWidget setLayoutData treeWidget setFont getFont fIsEmpty messageLabel setEnabled treeWidget setEnabled
f Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event access set Result I Structured Selection event get Selection to List updateOK Status  fViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent setResult IStructuredSelection getSelection toList updateOKStatus
tree add Selection Listener new Selection Adapter public void widget Default Selected Selection Event e updateOK Status if f Curr Status isOK access super Button Pressed I Dialog Constants OK ID  addSelectionListener SelectionAdapter widgetDefaultSelected SelectionEvent updateOKStatus fCurrStatus superButtonPressed IDialogConstants OK_ID
f Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event updateOK Status If it is not OK or if double click does not select then expand if f Double Click Selects f Curr Status isOK I Selection selection event get Selection if selection instanceof I Structured Selection Object item I Structured Selection selection get First Element if f Viewer get Expanded State item f Viewer collapse To Level item 1 else f Viewer expand To Level item 1  fViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent updateOKStatus fDoubleClickSelects fCurrStatus ISelection getSelection IStructuredSelection IStructuredSelection getFirstElement fViewer getExpandedState fViewer collapseToLevel fViewer expandToLevel
Creates the tree viewer param parent the parent composite return the tree viewer protected Tree Viewer create Tree Viewer Composite parent int style SWT BORDER f Allow Multiple SWT MULTI SWT SINGLE f Viewer new Tree Viewer new Tree parent style f Viewer set Content Provider f Content Provider f Viewer set Label Provider f Label Provider f Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event access set Result I Structured Selection event get Selection to List updateOK Status f Viewer set Sorter f Sorter if f Filters null for int i 0 i f Filters size i f Viewer add Filter Viewer Filter f Filters get i if f Double Click Selects Tree tree f Viewer get Tree tree add Selection Listener new Selection Adapter public void widget Default Selected Selection Event e updateOK Status if f Curr Status isOK access super Button Pressed I Dialog Constants OK ID f Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event updateOK Status If it is not OK or if double click does not select then expand if f Double Click Selects f Curr Status isOK I Selection selection event get Selection if selection instanceof I Structured Selection Object item I Structured Selection selection get First Element if f Viewer get Expanded State item f Viewer collapse To Level item 1 else f Viewer expand To Level item 1 f Viewer set Input f Input return f Viewer  TreeViewer createTreeViewer fAllowMultiple fViewer TreeViewer fViewer setContentProvider fContentProvider fViewer setLabelProvider fLabelProvider fViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent setResult IStructuredSelection getSelection toList updateOKStatus fViewer setSorter fSorter fFilters fFilters fViewer addFilter ViewerFilter fFilters fDoubleClickSelects fViewer getTree addSelectionListener SelectionAdapter widgetDefaultSelected SelectionEvent updateOKStatus fCurrStatus superButtonPressed IDialogConstants OK_ID fViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent updateOKStatus fDoubleClickSelects fCurrStatus ISelection getSelection IStructuredSelection IStructuredSelection getFirstElement fViewer getExpandedState fViewer collapseToLevel fViewer expandToLevel fViewer setInput fInput fViewer
Returns the tree viewer return the tree viewer protected Tree Viewer get Tree Viewer return f Viewer  TreeViewer getTreeViewer fViewer
private boolean evaluate If Tree Empty Object input Object elements f Content Provider get Elements input if elements length 0 if f Filters null for int i 0 i f Filters size i Viewer Filter curr Viewer Filter f Filters get i elements curr filter f Viewer input elements return elements length 0  evaluateIfTreeEmpty fContentProvider getElements fFilters fFilters ViewerFilter ViewerFilter fFilters fViewer
Set the result using the super class implementation of button Pressed param id see org eclipse jface dialogs Dialog button Pressed int protected void access super Button Pressed int id super button Pressed id  buttonPressed buttonPressed superButtonPressed buttonPressed
Set the result using the super class implementation of set Result param result see Selection Status Dialog set Result int Object protected void access set Result List result super set Result result  setResult SelectionStatusDialog setResult setResult setResult
see org eclipse jface window Window handle Shell Close Event protected void handle Shell Close Event super handle Shell Close Event Handle the closing of the shell by selecting the close icon if get Return Code CANCEL set Result null  handleShellCloseEvent handleShellCloseEvent handleShellCloseEvent getReturnCode setResult

public final static File Editor Mapping Content Provider INSTANCE new File Editor Mapping Content Provider Creates an instance of this class The private visibility of this constructor ensures that this class is only usable as a singleton private File Editor Mapping Content Provider super  FileEditorMappingContentProvider FileEditorMappingContentProvider FileEditorMappingContentProvider
Method declared on I Content Provider public void dispose  IContentProvider
Method declared on I Structured Content Provider public Object get Elements Object element I File Editor Mapping array I File Editor Mapping element return array null new Object 0 array  IStructuredContentProvider getElements IFileEditorMapping IFileEditorMapping
Method declared on I Content Provider public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged oldInput newInput

private List images To Dispose new Array List Creates an instance of this class The private visibility of this constructor ensures that this class is only usable as a singleton private File Editor Mapping Label Provider super  imagesToDispose ArrayList FileEditorMappingLabelProvider
public void dispose super dispose for Iterator e images To Dispose iterator e has Next Image e next dispose images To Dispose clear  imagesToDispose hasNext imagesToDispose
The code Resource Type Editor Mapping Label Provider code implementation of this code I Table Label Provider code method creates and returns an new image The image is remembered internally and will be deallocated by code dispose code public Image get Column Image Object element int row return get Image element  ResourceTypeEditorMappingLabelProvider ITableLabelProvider getColumnImage getImage
Method declared on I Table Label Provider public String get Column Text Object element int row return get Text element  ITableLabelProvider getColumnText getText
The code Resource Type Editor Mapping Label Provider code implementation of this code I Label Provider code method creates and returns an new image The image is remembered internally and will be deallocated by code dispose code public Image get Image Object element if element instanceof I File Editor Mapping Image image I File Editor Mapping element get Image Descriptor create Image images To Dispose add image return image return null  ResourceTypeEditorMappingLabelProvider ILabelProvider getImage IFileEditorMapping IFileEditorMapping getImageDescriptor createImage imagesToDispose
public String get Text Object element if element instanceof I File Editor Mapping return I File Editor Mapping element get Label return null  getText IFileEditorMapping IFileEditorMapping getLabel

privatestatic final int SIZING SELECTION WIDGET HEIGHT 250 Creates a file selection dialog rooted at the given file system element param parent Shell the parent shell param file System Element the root element to populate this dialog with param message the message to be displayed at the top of this dialog or code null code to display a default message public File Selection Dialog Shell parent Shell File System Element file System Element String message super parent Shell set Title IDE Workbench Messages get String File Selection Dialog title NON NLS 1 root file System Element if message null set Message message else set Message IDE Workbench Messages get String File Selection Dialog message NON NLS 1  SIZING_SELECTION_WIDGET_HEIGHT parentShell fileSystemElement FileSelectionDialog parentShell FileSystemElement fileSystemElement parentShell setTitle IDEWorkbenchMessages getString FileSelectionDialog fileSystemElement setMessage setMessage IDEWorkbenchMessages getString FileSelectionDialog
select Button set Text SELECT ALL TITLE Selection Listener listener new Selection Adapter public void widget Selected Selection Event e selection Group set All Selections true  selectButton setText SELECT_ALL_TITLE SelectionListener SelectionAdapter widgetSelected SelectionEvent selectionGroup setAllSelections
deselect Button set Text DESELECT ALL TITLE listener new Selection Adapter public void widget Selected Selection Event e selection Group set All Selections false  deselectButton setText DESELECT_ALL_TITLE SelectionAdapter widgetSelected SelectionEvent selectionGroup setAllSelections
Add the selection and deselection buttons to the dialog param composite org eclipse swt widgets Composite private void add Selection Buttons Composite composite Composite button Composite new Composite composite SWT RIGHT Grid Layout layout new Grid Layout layout num Columns 2 button Composite set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN END composite set Data data Button select Button new Button button Composite SWT PUSH select Button set Text SELECT ALL TITLE Selection Listener listener new Selection Adapter public void widget Selected Selection Event e selection Group set All Selections true select Button add Selection Listener listener Button deselect Button new Button button Composite SWT PUSH deselect Button set Text DESELECT ALL TITLE listener new Selection Adapter public void widget Selected Selection Event e selection Group set All Selections false deselect Button add Selection Listener listener  addSelectionButtons buttonComposite GridLayout GridLayout numColumns buttonComposite setLayout GridData GridData GridData HORIZONTAL_ALIGN_END setData selectButton buttonComposite selectButton setText SELECT_ALL_TITLE SelectionListener SelectionAdapter widgetSelected SelectionEvent selectionGroup setAllSelections selectButton addSelectionListener deselectButton buttonComposite deselectButton setText DESELECT_ALL_TITLE SelectionAdapter widgetSelected SelectionEvent selectionGroup setAllSelections deselectButton addSelectionListener
Visually checks the previously specified elements in the container left portion of this dialog s file selection viewer private void check Initial Selections Iterator items To Check get Initial Element Selections iterator while items To Check has Next File System Element current Element File System Element items To Check next if current Element is Directory selection Group initial Check Tree Item current Element else selection Group initial Check List Item current Element  checkInitialSelections itemsToCheck getInitialElementSelections itemsToCheck hasNext FileSystemElement currentElement FileSystemElement itemsToCheck currentElement isDirectory selectionGroup initialCheckTreeItem currentElement selectionGroup initialCheckListItem currentElement
Method declared in Window protected void configure Shell Shell shell super configure Shell shell Workbench Help set Help shell I Help Context Ids FILE SELECTION DIALOG  configureShell configureShell WorkbenchHelp setHelp IHelpContextIds FILE_SELECTION_DIALOG
Workbench Help set Help shell I Help Context Ids FILE SELECTION DIALOG public void create super create initialize Dialog  WorkbenchHelp setHelp IHelpContextIds FILE_SELECTION_DIALOG initializeDialog
I Check State Listener listener new I Check State Listener public void check State Changed Check State Changed Event event get Ok Button set Enabled selection Group get Checked Element Count 0  ICheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getOkButton setEnabled selectionGroup getCheckedElementCount
protected Control create Dialog Area Composite parent page group Composite composite Composite super create Dialog Area parent create Message Area composite Create a fake parent of the root to be the dialog input element Use an empty label so that display of the element s full name doesn t include a confusing label File System Element input new File System Element null true NON NLS 1 input add Child root root set Parent input selection Group new Checkbox Tree And List Group composite input get Folder Provider new Workbench Label Provider get File Provider new Workbench Label Provider SWT NONE SIZING SELECTION WIDGET WIDTH since this page has no other significantly sized SIZING SELECTION WIDGET HEIGHT widgets we need to hardcode the combined widget s size otherwise it will open too small I Check State Listener listener new I Check State Listener public void check State Changed Check State Changed Event event get Ok Button set Enabled selection Group get Checked Element Count 0 Workbench Viewer Sorter sorter new Workbench Viewer Sorter selection Group set Tree Sorter sorter selection Group set List Sorter sorter selection Group add Check State Listener listener add Selection Buttons composite return composite  createDialogArea createDialogArea createMessageArea FileSystemElement FileSystemElement addChild setParent selectionGroup CheckboxTreeAndListGroup getFolderProvider WorkbenchLabelProvider getFileProvider WorkbenchLabelProvider SIZING_SELECTION_WIDGET_WIDTH SIZING_SELECTION_WIDGET_HEIGHT ICheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getOkButton setEnabled selectionGroup getCheckedElementCount WorkbenchViewerSorter WorkbenchViewerSorter selectionGroup setTreeSorter selectionGroup setListSorter selectionGroup addCheckStateListener addSelectionButtons
Returns whether the tree view of the file system element will be fully expanded when the dialog is opened return true to expand all on dialog open false otherwise public boolean get Expand All On Open return expand All On Open  getExpandAllOnOpen expandAllOnOpen
return new Workbench Content Provider public Object get Children Object o if o instanceof File System Element return File System Element o get Files get Children o return new Object 0  WorkbenchContentProvider getChildren FileSystemElement FileSystemElement getFiles getChildren
Returns a content provider for code File System Element code s that returns only files as children private I Tree Content Provider get File Provider return new Workbench Content Provider public Object get Children Object o if o instanceof File System Element return File System Element o get Files get Children o return new Object 0  FileSystemElement ITreeContentProvider getFileProvider WorkbenchContentProvider getChildren FileSystemElement FileSystemElement getFiles getChildren
return new Workbench Content Provider public Object get Children Object o if o instanceof File System Element return File System Element o get Folders get Children o return new Object 0  WorkbenchContentProvider getChildren FileSystemElement FileSystemElement getFolders getChildren
Returns a content provider for code File System Element code s that returns only folders as children private I Tree Content Provider get Folder Provider return new Workbench Content Provider public Object get Children Object o if o instanceof File System Element return File System Element o get Folders get Children o return new Object 0  FileSystemElement ITreeContentProvider getFolderProvider WorkbenchContentProvider getChildren FileSystemElement FileSystemElement getFolders getChildren
Initializes this dialog s controls private void initialize Dialog initialize page if get Initial Element Selections is Empty get Ok Button set Enabled false else check Initial Selections selection Group about To Open if expand All On Open selection Group expand All  initializeDialog getInitialElementSelections isEmpty getOkButton setEnabled checkInitialSelections selectionGroup aboutToOpen expandAllOnOpen selectionGroup expandAll
The code File Selection Dialog code implementation of this code Dialog code method builds a list of the selected files for later retrieval by the client and closes this dialog protected void ok Pressed Iterator result Enum selection Group get All Checked List Items Array List list new Array List while result Enum has Next list add result Enum next set Result list super ok Pressed  FileSelectionDialog okPressed resultEnum selectionGroup getAllCheckedListItems ArrayList ArrayList resultEnum hasNext resultEnum setResult okPressed
Set whether the tree view of the file system element will be fully expanded when the dialog is opened param expand All true to expand all on dialog open false otherwise public void set Expand All On Open boolean expand All expand All On Open expand All  expandAll setExpandAllOnOpen expandAll expandAllOnOpen expandAll

private I Workbench Adapter workbench Adapter new I Workbench Adapter Answer the children property of this element public Object get Children Object o return get Folders get Children o  IWorkbenchAdapter workbenchAdapter IWorkbenchAdapter getChildren getFolders getChildren
Returns the parent of this element public Object get Parent Object o return parent  getParent
Returns an appropriate label for this file system element public String get Label Object o return name  getLabel
Returns an image descriptor for this file system element public Image Descriptor get Image Descriptor Object object if is Directory return Workbench Images get Image Descriptor I Shared Images IMG OBJ FOLDER else return Workbench Plugin get Default get Editor Registry get Image Descriptor name  ImageDescriptor getImageDescriptor isDirectory WorkbenchImages getImageDescriptor ISharedImages IMG_OBJ_FOLDER WorkbenchPlugin getDefault getEditorRegistry getImageDescriptor
Creates a new code File System Element code and initializes it and its parent if applicable param name The name of the element param parent The parent element May be code null code param is Directory if code true code this is representing a directory otherwise it is a file public File System Element String name File System Element parent boolean is Directory this name name this parent parent this is Directory is Directory if parent null parent add Child this  FileSystemElement isDirectory FileSystemElement FileSystemElement isDirectory isDirectory isDirectory addChild
Adds the passed child to this object s collection of children param child File System Element public void add Child File System Element child if child is Directory if folders null folders new Adaptable List 1 folders add child else if files null files new Adaptable List 1 files add child  FileSystemElement addChild FileSystemElement isDirectory AdaptableList AdaptableList
Returns the adapter public Object get Adapter Class adapter if adapter I Workbench Adapter class return workbench Adapter defer to the platform return Platform get Adapter Manager get Adapter this adapter  getAdapter IWorkbenchAdapter workbenchAdapter getAdapterManager getAdapter
Returns the extension of this element s filename return The extension or an empty string if there is no extension public String get File Name Extension int last Dot name last Index Of return last Dot 0 name substring last Dot 1 NON NLS 1  getFileNameExtension lastDot lastIndexOf lastDot lastDot
Answer the files property of this element Answer an empty list if the files property is null This method should not be used to add children to the receiver Use add Child File System Element instead return Adaptable List The list of files parented by the receiver public Adaptable List get Files if files null lazily initialize can t share result since it s modifiable files new Adaptable List 0 return files  addChild FileSystemElement AdaptableList AdaptableList getFiles AdaptableList
Returns the file system object property of this element return the file system object public Object get File System Object return file System Object  getFileSystemObject fileSystemObject
Returns a list of the folders that are immediate children of this folder Answer an empty list if the folders property is null This method should not be used to add children to the receiver Use add Child File System Element instead return Adapatable List The list of folders parented by the receiver public Adaptable List get Folders if folders null lazily initialize can t share result since it s modifiable folders new Adaptable List 0 return folders  addChild FileSystemElement AdapatableList AdaptableList getFolders AdaptableList
Return the parent of this element return the parent file system element or code null code if this is the root public File System Element get Parent return this parent  FileSystemElement getParent
return boolean code true code if this element represents a directory and code false code otherwise public boolean is Directory return is Directory  isDirectory isDirectory
Removes a sub folder from this file system element param child The child to remove public void remove Folder File System Element child if folders null return folders remove child child set Parent null  removeFolder FileSystemElement setParent
Set the file system object property of this element param value the file system object public void set File System Object Object value file System Object value  setFileSystemObject fileSystemObject
Sets the parent of this file system element param element The new parent public void set Parent File System Element element parent element  setParent FileSystemElement
For debugging purposes only public String to String String Buffer buf new String Buffer if is Directory buf append Folder NON NLS 1 else buf append File NON NLS 1 buf append name append NON NLS 1 if is Directory return buf to String buf append folders NON NLS 1 buf append folders buf append files NON NLS 1 buf append files return buf to String  toString StringBuffer StringBuffer isDirectory isDirectory toString toString

public interface Filter Matcher Sets the filter param pattern the filter pattern param ignore Case a flag indicating whether pattern matching is case insensitive or not param ignore Wild Cards a flag indicating whether wildcard characters are interpreted or not void set Filter String pattern boolean ignore Case  FilterMatcher ignoreCase ignoreWildCards setFilter ignoreCase
boolean ignore Wild Cards param element The element to test against return code true code if the object matches the pattern code false code otherwise code set Filter code must have been called at least once prior to a call to this method  ignoreWildCards setFilter
private String Matcher f Matcher public void set Filter String pattern boolean ignore Case boolean ignore Wild Cards f Matcher new String Matcher pattern ignore Case ignore Wild Cards  StringMatcher fMatcher setFilter ignoreCase ignoreWildCards fMatcher StringMatcher ignoreCase ignoreWildCards
ignore Wild Cards public boolean match Object element return f Matcher match f Label Provider get Text element  ignoreWildCards fMatcher fLabelProvider getText
public final Image image Create a new instance of label param string param image public Label String string Image image this string string this image image 
Return whether or not the receiver is the same as label param label return boolean public boolean equals Label label if label null return false If the string portions match whether null or not fall through and check the image portion if string null label string null return false if string null string equals label string return false if image null return label image null return image equals label image 
private final class Label Comparator implements Comparator private boolean label Ignore Case Label Comparator boolean ignore Case label Ignore Case ignore Case  LabelComparator labelIgnoreCase LabelComparator ignoreCase labelIgnoreCase ignoreCase
public int compare Object left Object right Label left Label Label left Label right Label Label right int value if f Comparator null value label Ignore Case left Label string compare To Ignore Case right Label string left Label string compare To right Label string else value f Comparator compare left Label string right Label string if value 0 return value images are allowed to be null if left Label image null return right Label image null 0 1 else if right Label image null return 1 else return f Images index Of left Label image f Images index Of right Label image  leftLabel rightLabel fComparator labelIgnoreCase leftLabel compareToIgnoreCase rightLabel leftLabel compareTo rightLabel fComparator leftLabel rightLabel leftLabel rightLabel rightLabel fImages indexOf leftLabel fImages indexOf rightLabel
f List add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e f Label Provider dispose if f Update Job null f Update Job cancel  fList addDisposeListener DisposeListener widgetDisposed DisposeEvent fLabelProvider fUpdateJob fUpdateJob
Constructs a new filtered list param parent the parent composite param style the widget style param label Provider the label renderer param ignore Case specifies whether sorting and folding is case sensitive param allow Duplicates specifies whether folding of duplicates is desired param match Empty String specifies whether empty filter strings should filter everything or nothing public Filtered List Composite parent int style I Label Provider label Provider boolean ignore Case boolean allow Duplicates boolean match Empty String super parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 set Layout layout f List new Table this style f List set Layout Data new Grid Data Grid Data FILL BOTH f List set Font parent get Font f List add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e f Label Provider dispose if f Update Job null f Update Job cancel f Label Provider label Provider f Ignore Case ignore Case f Sorter new Two Array Quick Sorter new Label Comparator ignore Case f Allow Duplicates allow Duplicates f Match Empty String match Empty String  labelProvider ignoreCase allowDuplicates matchEmptyString FilteredList ILabelProvider labelProvider ignoreCase allowDuplicates matchEmptyString GridLayout GridLayout marginHeight marginWidth setLayout fList fList setLayoutData GridData GridData FILL_BOTH fList setFont getFont fList addDisposeListener DisposeListener widgetDisposed DisposeEvent fLabelProvider fUpdateJob fUpdateJob fLabelProvider labelProvider fIgnoreCase ignoreCase fSorter TwoArrayQuickSorter LabelComparator ignoreCase fAllowDuplicates allowDuplicates fMatchEmptyString matchEmptyString
Sets the list of elements param elements the elements to be shown in the list public void set Elements Object elements if elements null f Elements new Object 0 else copy list for sorting f Elements new Object elements length System arraycopy elements 0 f Elements 0 elements length int length f Elements length fill labels f Labels new Label length Set image Set new Hash Set for int i 0 i length i String text f Label Provider get Text f Elements i Image image f Label Provider get Image f Elements i f Labels i new Label text image image Set add image f Images clear f Images add All image Set f Sorter sort f Labels f Elements f Filtered Indices new int length f Folded Indices new int length update List  setElements fElements fElements fElements fElements fLabels imageSet HashSet fLabelProvider getText fElements fLabelProvider getImage fElements fLabels imageSet fImages fImages addAll imageSet fSorter fLabels fElements fFilteredIndices fFoldedIndices updateList
Tests if the list before folding and filtering is empty return returns code true code if the list is empty code false code otherwise public boolean is Empty return f Elements null f Elements length 0  isEmpty fElements fElements
Sets the filter matcher param filter Matcher public void set Filter Matcher Filter Matcher filter Matcher Assert is Not Null filter Matcher f Filter Matcher filter Matcher  filterMatcher setFilterMatcher FilterMatcher filterMatcher isNotNull filterMatcher fFilterMatcher filterMatcher
Sets a custom comparator for sorting the list param comparator public void set Comparator Comparator comparator Assert is Not Null comparator f Comparator comparator  setComparator isNotNull fComparator
Adds a selection listener to the list param listener the selection listener to be added public void add Selection Listener Selection Listener listener f List add Selection Listener listener  addSelectionListener SelectionListener fList addSelectionListener
Removes a selection listener from the list param listener the selection listener to be removed public void remove Selection Listener Selection Listener listener f List remove Selection Listener listener  removeSelectionListener SelectionListener fList removeSelectionListener
Sets the selection of the list Empty or null array removes selection param selection an array of indices specifying the selection public void set Selection int selection if selection null selection length 0 f List deselect All else If there is a current working update defer the setting if f Update Job null f Update Job get State Job RUNNING f List set Selection selection f List notify Listeners SWT Selection new Event else f Update Job update Selection selection  setSelection fList deselectAll fUpdateJob fUpdateJob getState fList setSelection fList notifyListeners fUpdateJob updateSelection
Returns the selection of the list return returns an array of indices specifying the current selection public int get Selection Indices return f List get Selection Indices  getSelectionIndices fList getSelectionIndices
Returns the selection of the list This is a convenience function for code get Selection Indices code return returns the index of the selection 1 for no selection public int get Selection Index return f List get Selection Index  getSelectionIndices getSelectionIndex fList getSelectionIndex
Sets the selection of the list Empty or null array removes selection param elements the array of elements to be selected public void set Selection Object elements if elements null elements length 0 f List deselect All return if f Elements null return fill indices int indices new int elements length for int i 0 i elements length i int j for j 0 j f Folded Count j int max j f Folded Count 1 f Filtered Count f Folded Indices j 1 int l for l f Folded Indices j l max l found matching element if f Elements f Filtered Indices l equals elements i indices i j break if l max break not found if j f Folded Count indices i 0 set Selection indices  setSelection fList deselectAll fElements fFoldedCount fFoldedCount fFilteredCount fFoldedIndices fFoldedIndices fElements fFilteredIndices fFoldedCount setSelection
Returns an array of the selected elements The type of the elements returned in the list are the same as the ones passed with code set Elements code The array does not contain the rendered strings return returns the array of selected elements public Object get Selection if f List is Disposed f List get Selection Count 0 return new Object 0 int indices f List get Selection Indices Object elements new Object indices length for int i 0 i indices length i elements i f Elements f Filtered Indices f Folded Indices indices i return elements  setElements getSelection fList isDisposed fList getSelectionCount fList getSelectionIndices fElements fFilteredIndices fFoldedIndices
Sets the filter pattern Current only prefix filter patterns are supported param filter the filter pattern public void set Filter String filter f Filter filter null filter NON NLS 1 update List  setFilter fFilter updateList
private void update List f Filtered Count filter f Folded Count fold if f Update Job null f Update Job cancel f Update Job new Table Update Job f List f Folded Count f Update Job schedule  updateList fFilteredCount fFoldedCount fUpdateJob fUpdateJob fUpdateJob TableUpdateJob fList fFoldedCount fUpdateJob
Returns the filter pattern return returns the filter pattern public String get Filter return f Filter  getFilter fFilter
Returns all elements which are folded together to one entry in the list param index the index selecting the entry in the list return returns an array of elements folded together code null code if index is out of range public Object get Folded Elements int index if index 0 index f Folded Count return null int start f Folded Indices index int count index f Folded Count 1 f Filtered Count start f Folded Indices index 1 start Object elements new Object count for int i 0 i count i elements i f Elements f Filtered Indices start i return elements  getFoldedElements fFoldedCount fFoldedIndices fFoldedCount fFilteredCount fFoldedIndices fElements fFilteredIndices
private int fold if f Allow Duplicates for int i 0 i f Filtered Count i f Folded Indices i i identity mapping return f Filtered Count else int k 0 Label last null for int i 0 i f Filtered Count i int j f Filtered Indices i Label current f Labels j if current equals last f Folded Indices k i k last current return k  fAllowDuplicates fFilteredCount fFoldedIndices fFilteredCount fFilteredCount fFilteredIndices fLabels fFoldedIndices
private int filter if f Filter null f Filter length 0 f Match Empty String return 0 f Filter Matcher set Filter f Filter trim f Ignore Case false int k 0 for int i 0 i f Elements length i if f Filter Matcher match f Elements i f Filtered Indices k i return k  fFilter fFilter fMatchEmptyString fFilterMatcher setFilter fFilter fIgnoreCase fElements fFilterMatcher fElements fFilteredIndices
int indices To Select Create a new instance of a job used to update the table param table param count The number of items to update per running public Table Update Job Table table int count super Workbench Messages get String Filtered List Update Job Name NON NLS 1 set System true f Table table f Count count  indicesToSelect TableUpdateJob WorkbenchMessages getString FilteredList UpdateJobName setSystem fTable fCount
public I Status run InUI Thread I Progress Monitor monitor if f Table is Disposed return Status CANCEL STATUS int item Count f Table get Item Count Remove excess items if f Count item Count f Table set Redraw false f Table remove f Count item Count 1 f Table set Redraw true item Count f Table get Item Count table empty no selection if f Count 0 f Table notify Listeners SWT Selection new Event return Status OK STATUS How many we are going to do this time int iterations Math min 10 f Count current Index for int i 0 i iterations i if monitor is Canceled return Status CANCEL STATUS final Table Item item current Index item Count f Table get Item current Index new Table Item f Table SWT NONE final Label label f Labels f Filtered Indices f Folded Indices current Index item set Text label string item set Image label image current Index if monitor is Canceled return Status CANCEL STATUS if current Index f Count schedule 100 else if indices To Select null if f Count 0 default Select else update Selection indices To Select return Status OK STATUS  IStatus runInUIThread IProgressMonitor fTable isDisposed CANCEL_STATUS itemCount fTable getItemCount fCount itemCount fTable setRedraw fTable fCount itemCount fTable setRedraw itemCount fTable getItemCount fCount fTable notifyListeners OK_STATUS fCount currentIndex isCanceled CANCEL_STATUS TableItem currentIndex itemCount fTable getItem currentIndex TableItem fTable fLabels fFilteredIndices fFoldedIndices currentIndex setText setImage currentIndex isCanceled CANCEL_STATUS currentIndex fCount indicesToSelect fCount defaultSelect updateSelection indicesToSelect OK_STATUS
Update the selection for the supplied indices param indices void update Selection final int indices indices To Select indices  updateSelection indicesToSelect
Select the first element if there is no selection private void default Select Reset to the first selection if no index has been queued select And Notify new int 0  defaultSelect selectAndNotify
Select the supplied indices and notify any listeners param indices private void select And Notify final int indices It is possible that the table was disposed before the update finished If so then leave if f Table is Disposed return f Table set Selection indices f Table notify Listeners SWT Selection new Event  selectAndNotify fTable isDisposed fTable setSelection fTable notifyListeners
Returns whether or not duplicates are allowed return code true code indicates duplicates are allowed public boolean get Allow Duplicates return f Allow Duplicates  getAllowDuplicates fAllowDuplicates
Sets whether or not duplicates are allowed If this value is set the items should be set again for this value to take effect param allow Duplicates code true code indicates duplicates are allowed public void set Allow Duplicates boolean allow Duplicates this f Allow Duplicates allow Duplicates  allowDuplicates setAllowDuplicates allowDuplicates fAllowDuplicates allowDuplicates
Returns whether or not case should be ignored return code true code if case should be ignored public boolean get Ignore Case return f Ignore Case  getIgnoreCase fIgnoreCase
Sets whether or not case should be ignored If this value is set the items should be set again for this value to take effect param ignore Case code true code if case should be ignored public void set Ignore Case boolean ignore Case this f Ignore Case ignore Case  ignoreCase setIgnoreCase ignoreCase fIgnoreCase ignoreCase
Returns whether empty filter strings should filter everything or nothing return code true code for the empty string to match all items code false code to match none public boolean get Match Empty String return f Match Empty String  getMatchEmptyString fMatchEmptyString
Sets whether empty filter strings should filter everything or nothing If this value is set the items should be set again for this value to take effect param match Empty String code true code for the empty string to match all items code false code to match none public void set Match Empty String boolean match Empty String this f Match Empty String match Empty String  matchEmptyString setMatchEmptyString matchEmptyString fMatchEmptyString matchEmptyString
Returns the label provider for the items return the label provider public I Label Provider get Label Provider return f Label Provider  ILabelProvider getLabelProvider fLabelProvider
Sets the label provider If this value is set the items should be set again for this value to take effect param label Provider the label provider public void set Label Provider I Label Provider label Provider this f Label Provider label Provider  labelProvider setLabelProvider ILabelProvider labelProvider fLabelProvider labelProvider

public static final String NO ALL NOALL NON NLS 1 Returns one of the return code constants declared on this interface indicating whether the entity represented by the passed String should be overwritten p This method may be called from a non UI thread in which case this method must run the query in a sync exec in the UI thread if it needs to query the user p param path String the path representing the entity to be overwritten return one of the return code constants declared on this interface  NO_ALL pathString

Validates an array of elements and returns the resulting status param selection The elements to validate return The resulting status 

public interface I Selection Validator Returns a string indicating whether the given selection is valid If the result is code null code the selection is considered to be valid if the result is non empty it contains the error message to be displayed to the user param selection the selection to be validated return the error message or code null code indicating that the value is valid  ISelectionValidator

public interface I Working Set Edit Wizard extends I Wizard Returns the working set edited in the wizard return the working set edited in the wizard  IWorkingSetEditWizard IWizard

public interface I Working Set Page extends I Wizard Page Called when the working set wizard is closed by selecting the finish button Implementers may store the page result new changed working set returned in get Selection here  IWorkingSetPage IWizardPage getSelection
public void finish Returns the working set edited or created on the page after the wizard has closed Returns the working set that was initially set using code set Selection code if the wizard has not been closed yet Implementors should return the object set in set Selection instead of making a copy and returning the changed copy return the working set edited or created on the page  setSelection setSelection
public I Working Set get Selection Sets the working set edited on the page Implementors should not make a copy of this working set The passed object can be edited as is and should be returned in get Selection param working Set the working set edited on the page  IWorkingSet getSelection getSelection workingSet

public interface I Working Set Selection Dialog Returns the working sets selected in the dialog or code null code if the dialog was canceled return the working sets selected in the dialog  IWorkingSetSelectionDialog
public I Working Set get Selection Displays the working set selection dialog return Window OK if the dialog closes with the working set selection confirmed Window CANCEL if the dialog closes with the working set selection dismissed see org eclipse jface window Window  IWorkingSet getSelection
public int open Sets the working sets that are initially selected in the dialog param working Sets the working sets to select in the dialog  workingSets

Create a new instance of the receiver with parent shell of parent param parent public List Dialog Shell parent super parent  ListDialog
param input The input for the list public void set Input Object input f Input input  setInput fInput
param sp The content provider for the list public void set Content Provider I Structured Content Provider sp f Content Provider sp  setContentProvider IStructuredContentProvider fContentProvider
param lp The label Provider for the list public void set Label Provider I Label Provider lp f Label Provider lp  labelProvider setLabelProvider ILabelProvider fLabelProvider
param add Cancel Button if code true code there will be a cancel button public void set Add Cancel Button boolean add Cancel Button f Add Cancel Button add Cancel Button  addCancelButton setAddCancelButton addCancelButton fAddCancelButton addCancelButton
return the Table Viewer for the receiver public Table Viewer get Table Viewer return f Table Viewer  TableViewer TableViewer getTableViewer fTableViewer
protected void create Buttons For Button Bar Composite parent if f Add Cancel Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true else super create Buttons For Button Bar parent  createButtonsForButtonBar fAddCancelButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButtonsForButtonBar
f Table Viewer set Input f Input f Table Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if f Add Cancel Button ok Pressed  fTableViewer setInput fInput fTableViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent fAddCancelButton okPressed
protected Control create Dialog Area Composite container Composite parent Composite super create Dialog Area container create Message Area parent f Table Viewer new Table Viewer parent get Table Style f Table Viewer set Content Provider f Content Provider f Table Viewer set Label Provider f Label Provider f Table Viewer set Input f Input f Table Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if f Add Cancel Button ok Pressed List initial Selection get Initial Element Selections if initial Selection null f Table Viewer set Selection new Structured Selection initial Selection Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint convert Height In Chars To Pixels height In Chars gd width Hint convert Width In Chars To Pixels width In Chars Table table f Table Viewer get Table table set Layout Data gd table set Font container get Font return parent  createDialogArea createDialogArea createMessageArea fTableViewer TableViewer getTableStyle fTableViewer setContentProvider fContentProvider fTableViewer setLabelProvider fLabelProvider fTableViewer setInput fInput fTableViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent fAddCancelButton okPressed initialSelection getInitialElementSelections initialSelection fTableViewer setSelection StructuredSelection initialSelection GridData GridData GridData FILL_BOTH heightHint convertHeightInCharsToPixels heightInChars widthHint convertWidthInCharsToPixels widthInChars fTableViewer getTable setLayoutData setFont getFont
Return the style flags for the table viewer return int protected int get Table Style return SWT SINGLE SWT H SCROLL SWT V SCROLL SWT BORDER  getTableStyle H_SCROLL V_SCROLL
protected void ok Pressed Build a list of selected children I Structured Selection selection I Structured Selection f Table Viewer get Selection set Result selection to List super ok Pressed  okPressed IStructuredSelection IStructuredSelection fTableViewer getSelection setResult toList okPressed
Returns the initial height of the dialog in number of characters return the initial height of the dialog in number of characters public int get Height In Chars return height In Chars  getHeightInChars heightInChars
Returns the initial width of the dialog in number of characters return the initial width of the dialog in number of characters public int get Width In Chars return width In Chars  getWidthInChars widthInChars
Sets the initial height of the dialog in number of characters param height In Chars the initialheight of the dialog in number of characters public void set Height In Chars int height In Chars this height In Chars height In Chars  heightInChars setHeightInChars heightInChars heightInChars heightInChars
Sets the initial width of the dialog in number of characters param width In Chars the initial width of the dialog in number of characters public void set Width In Chars int width In Chars this width In Chars width In Chars  widthInChars setWidthInChars widthInChars widthInChars widthInChars

private final static int SIZING SELECTION WIDGET WIDTH 300 Creates a list selection dialog param parent Shell the parent shell param inputthe root element to populate this dialog with param content Provider the content provider for navigating the model param label Provider the label provider for displaying model elements param message the message to be displayed at the top of this dialog or code null code to display a default message public List Selection Dialog Shell parent Shell Object input I Structured Content Provider content Provider I Label Provider label Provider String message super parent Shell set Title Workbench Messages get String List Selection title NON NLS 1 input Element input this content Provider content Provider this label Provider label Provider if message null set Message message else set Message Workbench Messages get String List Selection message NON NLS 1  SIZING_SELECTION_WIDGET_WIDTH parentShell contentProvider labelProvider ListSelectionDialog parentShell IStructuredContentProvider contentProvider ILabelProvider labelProvider parentShell setTitle WorkbenchMessages getString ListSelection inputElement contentProvider contentProvider labelProvider labelProvider setMessage setMessage WorkbenchMessages getString ListSelection
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked true  SelectionListener SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked
listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked false  SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked
Add the selection and deselection buttons to the dialog param composite org eclipse swt widgets Composite private void add Selection Buttons Composite composite Composite button Composite new Composite composite SWT RIGHT Grid Layout layout new Grid Layout layout num Columns 2 button Composite set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data GRAB HORIZONTAL data grab Excess Horizontal Space true composite set Data data Button select Button create Button button Composite I Dialog Constants SELECT ALL ID SELECT ALL TITLE false Selection Listener listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked true select Button add Selection Listener listener Button deselect Button create Button button Composite I Dialog Constants DESELECT ALL ID DESELECT ALL TITLE false listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked false deselect Button add Selection Listener listener  addSelectionButtons buttonComposite GridLayout GridLayout numColumns buttonComposite setLayout GridData GridData GridData HORIZONTAL_ALIGN_END GridData GRAB_HORIZONTAL grabExcessHorizontalSpace setData selectButton createButton buttonComposite IDialogConstants SELECT_ALL_ID SELECT_ALL_TITLE SelectionListener SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked selectButton addSelectionListener deselectButton createButton buttonComposite IDialogConstants DESELECT_ALL_ID DESELECT_ALL_TITLE SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked deselectButton addSelectionListener
Visually checks the previously specified elements in this dialog s list viewer private void check Initial Selections Iterator items To Check get Initial Element Selections iterator while items To Check has Next list Viewer set Checked items To Check next true  checkInitialSelections itemsToCheck getInitialElementSelections itemsToCheck hasNext listViewer setChecked itemsToCheck
see org eclipse jface window Window configure Shell org eclipse swt widgets Shell protected void configure Shell Shell shell super configure Shell shell Workbench Help set Help shell I Help Context Ids LIST SELECTION DIALOG  configureShell configureShell configureShell WorkbenchHelp setHelp IHelpContextIds LIST_SELECTION_DIALOG
protected Control create Dialog Area Composite parent page group Composite composite Composite super create Dialog Area parent Font font parent get Font composite set Font font create Message Area composite list Viewer Checkbox Table Viewer new Check List composite SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data height Hint SIZING SELECTION WIDGET HEIGHT data width Hint SIZING SELECTION WIDGET WIDTH list Viewer get Table set Layout Data data list Viewer set Label Provider label Provider list Viewer set Content Provider content Provider list Viewer get Control set Font font add Selection Buttons composite initialize Viewer initialize page if get Initial Element Selections is Empty check Initial Selections return composite  createDialogArea createDialogArea getFont setFont createMessageArea listViewer CheckboxTableViewer newCheckList GridData GridData GridData FILL_BOTH heightHint SIZING_SELECTION_WIDGET_HEIGHT widthHint SIZING_SELECTION_WIDGET_WIDTH listViewer getTable setLayoutData listViewer setLabelProvider labelProvider listViewer setContentProvider contentProvider listViewer getControl setFont addSelectionButtons initializeViewer getInitialElementSelections isEmpty checkInitialSelections
Returns the viewer used to show the list return the viewer or code null code if not yet created protected Checkbox Table Viewer get Viewer return list Viewer  CheckboxTableViewer getViewer listViewer
Initializes this dialog s viewer after it has been laid out private void initialize Viewer list Viewer set Input input Element  initializeViewer listViewer setInput inputElement
The code List Selection Dialog code implementation of this code Dialog code method builds a list of the selected elements for later retrieval by the client and closes this dialog protected void ok Pressed Get the input children Object children content Provider get Elements input Element Build a list of selected children if children null Array List list new Array List for int i 0 i children length i Object element children i if list Viewer get Checked element list add element set Result list super ok Pressed  ListSelectionDialog okPressed contentProvider getElements inputElement ArrayList ArrayList listViewer getChecked setResult okPressed

Creates an instance of this dialog to display the given resolutions p There must be at least one resolution p param shell the parent shell param marker Resolutions the resolutions to display public Marker Resolution Selection Dialog Shell shell I Marker Resolution marker Resolutions super shell if marker Resolutions null marker Resolutions length 0 throw new Illegal Argument Exception resolutions marker Resolutions set Title IDE Workbench Messages get String Marker Resolution Selection Dialog title NON NLS 1 set Message IDE Workbench Messages get String Marker Resolution Selection Dialog message Label NON NLS 1 set Initial Selections new Object marker Resolutions 0  markerResolutions MarkerResolutionSelectionDialog IMarkerResolution markerResolutions markerResolutions markerResolutions IllegalArgumentException markerResolutions setTitle IDEWorkbenchMessages getString MarkerResolutionSelectionDialog setMessage IDEWorkbenchMessages getString MarkerResolutionSelectionDialog messageLabel setInitialSelections markerResolutions
Method declared on Window protected void configure Shell Shell new Shell super configure Shell new Shell Workbench Help set Help new Shell I Help Context Ids MARKER RESOLUTION SELECTION DIALOG  configureShell newShell configureShell newShell WorkbenchHelp setHelp newShell IHelpContextIds MARKER_RESOLUTION_SELECTION_DIALOG
Set the label provider list Viewer set Label Provider new Label Provider public String get Text Object element Return the resolution s label return element null I Marker Resolution element get Label NON NLS 1  listViewer setLabelProvider LabelProvider getText IMarkerResolution getLabel
Add a selection change listener list Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Update OK button enablement get Ok Button set Enabled event get Selection is Empty  listViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getOkButton setEnabled getSelection isEmpty
Add double click listener list Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event ok Pressed  listViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent okPressed
protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent Create label create Message Area composite Create list viewer list Viewer new List Viewer composite SWT SINGLE SWT H SCROLL SWT V SCROLL SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data height Hint convert Height In Chars To Pixels LIST HEIGHT data width Hint convert Width In Chars To Pixels LIST WIDTH list Viewer get List set Layout Data data list Viewer get List set Font parent get Font Set the label provider list Viewer set Label Provider new Label Provider public String get Text Object element Return the resolution s label return element null I Marker Resolution element get Label NON NLS 1 Set the content provider Simple List Content Provider cp new Simple List Content Provider cp set Elements resolutions list Viewer set Content Provider cp list Viewer set Input new Object it is ignored but must be non null Set the initial selection list Viewer set Selection new Structured Selection get Initial Element Selections true Add a selection change listener list Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Update OK button enablement get Ok Button set Enabled event get Selection is Empty Add double click listener list Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event ok Pressed return composite  createDialogArea createDialogArea createMessageArea listViewer ListViewer H_SCROLL V_SCROLL GridData GridData GridData FILL_BOTH heightHint convertHeightInCharsToPixels LIST_HEIGHT widthHint convertWidthInCharsToPixels LIST_WIDTH listViewer getList setLayoutData listViewer getList setFont getFont listViewer setLabelProvider LabelProvider getText IMarkerResolution getLabel SimpleListContentProvider SimpleListContentProvider setElements listViewer setContentProvider listViewer setInput listViewer setSelection StructuredSelection getInitialElementSelections listViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getOkButton setEnabled getSelection isEmpty listViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent okPressed
protected void ok Pressed I Structured Selection selection I Structured Selection list Viewer get Selection set Result selection to List super ok Pressed  okPressed IStructuredSelection IStructuredSelection listViewer getSelection setResult toList okPressed

Creates a New Folder Dialog param parent Shell parent of the new dialog param container parent of the new folder public New Folder Dialog Shell parent Shell I Container container super parent Shell this container container set Title IDE Workbench Messages get String New Folder Dialog title NON NLS 1 set Shell Style get Shell Style SWT RESIZE set Status Line Above Buttons true  NewFolderDialog parentShell NewFolderDialog parentShell IContainer parentShell setTitle IDEWorkbenchMessages getString NewFolderDialog setShellStyle getShellStyle setStatusLineAboveButtons
Creates the folder using the name and link target entered by the user Sets the dialog result to the created folder protected void compute Result String link Target linked Resource Group get Link Target I Folder folder create New Folder folder Name Field get Text link Target if folder null return set Selection Result new I Folder folder  computeResult linkTarget linkedResourceGroup getLinkTarget IFolder createNewFolder folderNameField getText linkTarget setSelectionResult IFolder
Method declared in Window protected void configure Shell Shell shell super configure Shell shell Workbench Help set Help shell I Help Context Ids NEW FOLDER DIALOG  configureShell configureShell WorkbenchHelp setHelp IHelpContextIds NEW_FOLDER_DIALOG
see org eclipse jface window Window create public void create super create initially disable the ok button since we don t preset the folder name field get Button I Dialog Constants OK ID set Enabled false  getButton IDialogConstants OK_ID setEnabled
advanced Button set Layout Data data advanced Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Advanced Button Select  advancedButton setLayoutData advancedButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAdvancedButtonSelect
I Resource FOLDER new Listener public void handle Event Event e validate Linked Resource first Link Check false  IResource handleEvent validateLinkedResource firstLinkCheck
Creates the widget for advanced options param parent the parent composite protected void create Advanced Controls Composite parent Preferences preferences Resources Plugin get Plugin get Plugin Preferences if preferences get Boolean Resources Plugin PREF DISABLE LINKING false is Valid Container linked Resource Parent new Composite parent SWT NONE linked Resource Parent set Font parent get Font linked Resource Parent set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 linked Resource Parent set Layout layout advanced Button new Button linked Resource Parent SWT PUSH advanced Button set Font linked Resource Parent get Font advanced Button set Text IDE Workbench Messages get String show Advanced NON NLS 1 set Button Layout Data advanced Button Grid Data data Grid Data advanced Button get Layout Data data horizontal Alignment Grid Data BEGINNING advanced Button set Layout Data data advanced Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Advanced Button Select linked Resource Group new Create Linked Resource Group I Resource FOLDER new Listener public void handle Event Event e validate Linked Resource first Link Check false  createAdvancedControls ResourcesPlugin getPlugin getPluginPreferences getBoolean ResourcesPlugin PREF_DISABLE_LINKING isValidContainer linkedResourceParent linkedResourceParent setFont getFont linkedResourceParent setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout marginHeight marginWidth linkedResourceParent setLayout advancedButton linkedResourceParent advancedButton setFont linkedResourceParent getFont advancedButton setText IDEWorkbenchMessages getString showAdvanced setButtonLayoutData advancedButton GridData GridData advancedButton getLayoutData horizontalAlignment GridData advancedButton setLayoutData advancedButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAdvancedButtonSelect linkedResourceGroup CreateLinkedResourceGroup IResource handleEvent validateLinkedResource firstLinkCheck
protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL BOTH create Folder Name Group composite create Advanced Controls composite return composite  createDialogArea createDialogArea setLayout GridLayout setLayoutData GridData GridData FILL_BOTH createFolderNameGroup createAdvancedControls
folder Name Field set Font font folder Name Field add Listener SWT Modify new Listener public void handle Event Event event validate Linked Resource  folderNameField setFont folderNameField addListener handleEvent validateLinkedResource
Creates the folder name specification controls param parent the parent composite private void create Folder Name Group Composite parent Font font parent get Font project specification group Composite folder Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 folder Group set Layout layout folder Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL new project label Label folder Label new Label folder Group SWT NONE folder Label set Font font folder Label set Text IDE Workbench Messages get String New Folder Dialog name Label NON NLS 1 new project name entry field folder Name Field new Text folder Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint I Dialog Constants ENTRY FIELD WIDTH folder Name Field set Layout Data data folder Name Field set Font font folder Name Field add Listener SWT Modify new Listener public void handle Event Event event validate Linked Resource  createFolderNameGroup getFont folderGroup GridLayout GridLayout numColumns folderGroup setLayout folderGroup setLayoutData GridData GridData FILL_HORIZONTAL folderLabel folderGroup folderLabel setFont folderLabel setText IDEWorkbenchMessages getString NewFolderDialog nameLabel folderNameField folderGroup GridData GridData GridData FILL_HORIZONTAL widthHint IDialogConstants ENTRY_FIELD_WIDTH folderNameField setLayoutData folderNameField setFont folderNameField addListener handleEvent validateLinkedResource
Creates a folder resource handle for the folder with the given name The folder handle is created relative to the container specified during object creation param folder Name the name of the folder resource to create a handle for return the new folder resource handle private I Folder create Folder Handle String folder Name I Workspace Root workspace Root container get Workspace get Root I Path folder Path container get Full Path append folder Name I Folder folder Handle workspace Root get Folder folder Path return folder Handle  folderName IFolder createFolderHandle folderName IWorkspaceRoot workspaceRoot getWorkspace getRoot IPath folderPath getFullPath folderName IFolder folderHandle workspaceRoot getFolder folderPath folderHandle
Workspace Modify Operation operation new Workspace Modify Operation public void execute I Progress Monitor monitor throws Core Exception try monitor begin Task IDE Workbench Messages get String New Folder Dialog progress 2000 NON NLS 1 if monitor is Canceled throw new Operation Canceled Exception if link Target Name null folder Handle create false true monitor else folder Handle create Link new Path link Target Name I Resource ALLOW MISSING LOCAL monitor if monitor is Canceled throw new Operation Canceled Exception finally monitor done  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException beginTask IDEWorkbenchMessages getString NewFolderDialog isCanceled OperationCanceledException linkTargetName folderHandle folderHandle createLink linkTargetName IResource ALLOW_MISSING_LOCAL isCanceled OperationCanceledException
Creates a new folder with the given name and optionally linking to the specified link target param folder Name name of the new folder param link Target Name name of the link target folder may be null return I Folder the new folder private I Folder create New Folder String folder Name final String link Target Name final I Folder folder Handle create Folder Handle folder Name Workspace Modify Operation operation new Workspace Modify Operation public void execute I Progress Monitor monitor throws Core Exception try monitor begin Task IDE Workbench Messages get String New Folder Dialog progress 2000 NON NLS 1 if monitor is Canceled throw new Operation Canceled Exception if link Target Name null folder Handle create false true monitor else folder Handle create Link new Path link Target Name I Resource ALLOW MISSING LOCAL monitor if monitor is Canceled throw new Operation Canceled Exception finally monitor done try new Progress Monitor Jobs Dialog get Shell run true true operation catch Interrupted Exception exception return null catch Invocation Target Exception exception if exception get Target Exception instanceof Core Exception Error Dialog open Error get Shell IDE Workbench Messages get String New Folder Dialog error Title NON NLS 1 null no special message Core Exception exception get Target Exception get Status else Core Exceptions are handled above but unexpected runtime exceptions and errors may still occur IDE Workbench Plugin log Message Format format Exception in 0 create New Folder 1 NON NLS 1 new Object get Class get Name exception get Target Exception Message Dialog open Error get Shell IDE Workbench Messages get String New Folder Dialog error Title NON NLS 1 IDE Workbench Messages format New Folder Dialog internal Error NON NLS 1 new Object exception get Target Exception get Message return null return folder Handle  folderName linkTargetName IFolder IFolder createNewFolder folderName linkTargetName IFolder folderHandle createFolderHandle folderName WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException beginTask IDEWorkbenchMessages getString NewFolderDialog isCanceled OperationCanceledException linkTargetName folderHandle folderHandle createLink linkTargetName IResource ALLOW_MISSING_LOCAL isCanceled OperationCanceledException ProgressMonitorJobsDialog getShell InterruptedException InvocationTargetException getTargetException CoreException ErrorDialog openError getShell IDEWorkbenchMessages getString NewFolderDialog errorTitle CoreException getTargetException getStatus CoreExceptions IDEWorkbenchPlugin MessageFormat createNewFolder getClass getName getTargetException MessageDialog openError getShell IDEWorkbenchMessages getString NewFolderDialog errorTitle IDEWorkbenchMessages NewFolderDialog internalError getTargetException getMessage folderHandle
Shows hides the advanced option widgets protected void handle Advanced Button Select Shell shell get Shell Point shell Size shell get Size Composite composite Composite get Dialog Area if linked Resource Composite null linked Resource Composite dispose linked Resource Composite null composite layout shell set Size shell Size x basic Shell Height advanced Button set Text IDE Workbench Messages get String show Advanced NON NLS 1 else if basic Shell Height 1 basic Shell Height shell compute Size SWT DEFAULT SWT DEFAULT true y linked Resource Composite linked Resource Group create Contents linked Resource Parent shell Size shell compute Size SWT DEFAULT SWT DEFAULT true shell set Size shell Size composite layout advanced Button set Text IDE Workbench Messages get String hide Advanced NON NLS 1  handleAdvancedButtonSelect getShell shellSize getSize getDialogArea linkedResourceComposite linkedResourceComposite linkedResourceComposite setSize shellSize basicShellHeight advancedButton setText IDEWorkbenchMessages getString showAdvanced basicShellHeight basicShellHeight computeSize linkedResourceComposite linkedResourceGroup createContents linkedResourceParent shellSize computeSize setSize shellSize advancedButton setText IDEWorkbenchMessages getString hideAdvanced
Returns whether the container specified in the constructor is a valid parent for creating linked resources return boolean code true code if the container specified in the constructor is a valid parent for creating linked resources code false code if no linked resources may be created with the specified container as a parent private boolean is Valid Container if container get Type I Resource PROJECT return false try I Workspace workspace IDE Workbench Plugin get Plugin Workspace I Project project I Project container String nature Ids project get Description get Nature Ids for int i 0 i nature Ids length i I Project Nature Descriptor descriptor workspace get Nature Descriptor nature Ids i if descriptor null descriptor is Linking Allowed false return false catch Core Exception exception project does not exist or is closed return false return true  isValidContainer getType IResource IWorkspace IDEWorkbenchPlugin getPluginWorkspace IProject IProject natureIds getDescription getNatureIds natureIds IProjectNatureDescriptor getNatureDescriptor natureIds isLinkingAllowed CoreException
Update the dialog s status line to reflect the given status It is safe to call this method before the dialog has been opened protected void update Status I Status status if first Link Check status null don t show the first validation result as an error fixes bug 29659 Status new Status new Status I Status OK status get Plugin status get Code status get Message status get Exception super update Status new Status else super update Status status  updateStatus IStatus firstLinkCheck newStatus IStatus getPlugin getCode getMessage getException updateStatus newStatus updateStatus
Update the dialog s status line to reflect the given status It is safe to call this method before the dialog has been opened private void update Status int severity String message update Status new Status severity IDE Workbench Plugin get Default get Descriptor get Unique Identifier severity message null  updateStatus updateStatus IDEWorkbenchPlugin getDefault getDescriptor getUniqueIdentifier
Checks whether the folder name and link location are valid return null if the folder name and link location are valid a message that indicates the problem otherwise private void validate Linked Resource boolean valid validate Folder Name if valid I Folder link Handle create Folder Handle folder Name Field get Text I Status status linked Resource Group validate Link Location link Handle if status get Severity I Status ERROR get Ok Button set Enabled true else get Ok Button set Enabled false if status isOK false update Status status else get Ok Button set Enabled false  validateLinkedResource validateFolderName IFolder linkHandle createFolderHandle folderNameField getText IStatus linkedResourceGroup validateLinkLocation linkHandle getSeverity IStatus getOkButton setEnabled getOkButton setEnabled updateStatus getOkButton setEnabled
Checks if the folder name is valid return null if the new folder name is valid a message that indicates the problem otherwise private boolean validate Folder Name String name folder Name Field get Text I Workspace workspace container get Workspace I Status name Status workspace validate Name name I Resource FOLDER if equals name NON NLS 1 update Status I Status ERROR IDE Workbench Messages get String New Folder Dialog folder Name Empty NON NLS 1 return false if name Status isOK false update Status name Status return false I Path path new Path name if container get Folder path exists container get File path exists update Status I Status ERROR IDE Workbench Messages format New Folder Dialog already Exists new Object name NON NLS 1 return false update Status I Status OK NON NLS 1 return true  validateFolderName folderNameField getText IWorkspace getWorkspace IStatus nameStatus validateName IResource updateStatus IStatus IDEWorkbenchMessages getString NewFolderDialog folderNameEmpty nameStatus updateStatus nameStatus IPath getFolder getFile updateStatus IStatus IDEWorkbenchMessages NewFolderDialog alreadyExists updateStatus IStatus

Create a Project Location Move Dialog on the supplied project parented by the parent Shell param parent Shell param existing Project public Project Location Move Dialog Shell parent Shell I Project existing Project super parent Shell set Title PROJECT LOCATION SELECTION TITLE this project existing Project try this original Path this get Project get Description get Location this use Defaults this original Path null catch Core Exception exception Leave it as the default  ProjectLocationMoveDialog parentShell parentShell existingProject ProjectLocationMoveDialog parentShell IProject existingProject parentShell setTitle PROJECT_LOCATION_SELECTION_TITLE existingProject originalPath getProject getDescription getLocation useDefaults originalPath CoreException
Check the message If it is null then continue otherwise inform the user via the status value and disable the OK param message the error message to show if it is not null private void apply Validation Result String error Msg if error Msg null status Message Label set Text NON NLS 1 status Message Label set Tool Tip Text NON NLS 1 get Ok Button set Enabled true else status Message Label set Foreground J Face Colors get Error Text status Message Label get Display status Message Label set Text error Msg status Message Label set Tool Tip Text error Msg get Ok Button set Enabled false  applyValidationResult errorMsg errorMsg statusMessageLabel setText statusMessageLabel setToolTipText getOkButton setEnabled statusMessageLabel setForeground JFaceColors getErrorText statusMessageLabel getDisplay statusMessageLabel setText errorMsg statusMessageLabel setToolTipText errorMsg getOkButton setEnabled
Check whether the entries are valid If so return null Otherwise return a string that indicates the problem private String check Valid return check Valid Location  checkValid checkValidLocation
Check if the entry in the widget location is valid If it is valid return null Otherwise return a string that indicates the problem private String check Valid Location if use Defaults if this original Path null return INVALID LOCATION MESSAGE return null else String location Field Contents location Path Field get Text if location Field Contents equals NON NLS 1 return IDE Workbench Messages get String Wizard New Project Creation Page project Location Empty NON NLS 1 else I Path path new Path NON NLS 1 if path is Valid Path location Field Contents return INVALID LOCATION MESSAGE Path new Path new Path location Field Contents I Status location Status this project get Workspace validate Project Location this project new Path if location Status isOK return location Status get Message if original Path null original Path equals new Path return INVALID LOCATION MESSAGE return null  checkValidLocation useDefaults originalPath INVALID_LOCATION_MESSAGE locationFieldContents locationPathField getText locationFieldContents IDEWorkbenchMessages getString WizardNewProjectCreationPage projectLocationEmpty IPath isValidPath locationFieldContents INVALID_LOCATION_MESSAGE newPath locationFieldContents IStatus locationStatus getWorkspace validateProjectLocation newPath locationStatus locationStatus getMessage originalPath originalPath newPath INVALID_LOCATION_MESSAGE
Method declared in Window protected void configure Shell Shell shell super configure Shell shell Workbench Help set Help shell I Help Context Ids PROJECT LOCATION SELECTION DIALOG  configureShell configureShell WorkbenchHelp setHelp IHelpContextIds PROJECT_LOCATION_SELECTION_DIALOG
protected Control create Contents Composite parent Control content super create Contents parent get Ok Button set Enabled false return content  createContents createContents getOkButton setEnabled
protected Control create Dialog Area Composite parent page group Composite composite Composite super create Dialog Area parent composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL BOTH create Project Location Group composite Add in a label for status messages if required status Message Label new Label composite SWT WRAP status Message Label set Layout Data new Grid Data Grid Data FILL BOTH status Message Label set Font parent get Font Make it two lines status Message Label set Text n NON NLS 1 return composite  createDialogArea createDialogArea setLayout GridLayout setLayoutData GridData GridData FILL_BOTH createProjectLocationGroup statusMessageLabel statusMessageLabel setLayoutData GridData GridData FILL_BOTH statusMessageLabel setFont getFont statusMessageLabel setText
Listener listener new Listener public void handle Event Event event apply Validation Result check Valid  handleEvent applyValidationResult checkValid
Create the listener that is used to validate the location entered by the iser private void create Location Listener Listener listener new Listener public void handle Event Event event apply Validation Result check Valid this location Path Field add Listener SWT Modify listener  createLocationListener handleEvent applyValidationResult checkValid locationPathField addListener
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e use Defaults use Defaults Button get Selection browse Button set Enabled use Defaults location Path Field set Enabled use Defaults location Label set Enabled use Defaults set Location For Selection if use Defaults if original Path null location Path Field set Text original Path toOS String else location Path Field set Text NON NLS 1  SelectionListener SelectionAdapter widgetSelected SelectionEvent useDefaults useDefaultsButton getSelection browseButton setEnabled useDefaults locationPathField setEnabled useDefaults locationLabel setEnabled useDefaults setLocationForSelection useDefaults originalPath locationPathField setText originalPath toOSString locationPathField setText
Creates the project location specification controls param parent the parent composite private final void create Project Location Group Composite parent Font font parent get Font project specification group Composite project Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 project Group set Layout layout project Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL project Group set Font font final Button use Defaults Button new Button project Group SWT CHECK SWT RIGHT use Defaults Button set Font font use Defaults Button set Text IDE Workbench Messages get String Project Location Selection Dialog use Default Label NON NLS 1 use Defaults Button set Selection this use Defaults Grid Data button Data new Grid Data button Data horizontal Span 3 use Defaults Button set Layout Data button Data create User Specified Project Location Group project Group this use Defaults Selection Listener listener new Selection Adapter public void widget Selected Selection Event e use Defaults use Defaults Button get Selection browse Button set Enabled use Defaults location Path Field set Enabled use Defaults location Label set Enabled use Defaults set Location For Selection if use Defaults if original Path null location Path Field set Text original Path toOS String else location Path Field set Text NON NLS 1 use Defaults Button add Selection Listener listener  createProjectLocationGroup getFont projectGroup GridLayout GridLayout numColumns projectGroup setLayout projectGroup setLayoutData GridData GridData FILL_HORIZONTAL projectGroup setFont useDefaultsButton projectGroup useDefaultsButton setFont useDefaultsButton setText IDEWorkbenchMessages getString ProjectLocationSelectionDialog useDefaultLabel useDefaultsButton setSelection useDefaults GridData buttonData GridData buttonData horizontalSpan useDefaultsButton setLayoutData buttonData createUserSpecifiedProjectLocationGroup projectGroup useDefaults SelectionListener SelectionAdapter widgetSelected SelectionEvent useDefaults useDefaultsButton getSelection browseButton setEnabled useDefaults locationPathField setEnabled useDefaults locationLabel setEnabled useDefaults setLocationForSelection useDefaults originalPath locationPathField setText originalPath toOSString locationPathField setText useDefaultsButton addSelectionListener
this browse Button set Text BROWSE LABEL this browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Location Browse Button Pressed  browseButton setText BROWSE_LABEL browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLocationBrowseButtonPressed
Creates the project location specification controls return the parent of the widgets created param project Group the parent composite param enabled sets the initial enabled state of the widgets private Composite create User Specified Project Location Group Composite project Group boolean enabled Font font project Group get Font location label location Label new Label project Group SWT NONE location Label set Font font location Label set Text LOCATION LABEL location Label set Enabled enabled project location entry field location Path Field new Text project Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH location Path Field set Layout Data data location Path Field set Font font location Path Field set Enabled enabled browse button this browse Button new Button project Group SWT PUSH this browse Button set Font font this browse Button set Text BROWSE LABEL this browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Location Browse Button Pressed this browse Button set Enabled enabled set Button Layout Data this browse Button Set the initial value first before listener to avoid handling an event during the creation if original Path null set Location For Selection else location Path Field set Text original Path toOS String create Location Listener return project Group  projectGroup createUserSpecifiedProjectLocationGroup projectGroup projectGroup getFont locationLabel projectGroup locationLabel setFont locationLabel setText LOCATION_LABEL locationLabel setEnabled locationPathField projectGroup GridData GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH locationPathField setLayoutData locationPathField setFont locationPathField setEnabled browseButton projectGroup browseButton setFont browseButton setText BROWSE_LABEL browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLocationBrowseButtonPressed browseButton setEnabled setButtonLayoutData browseButton originalPath setLocationForSelection locationPathField setText originalPath toOSString createLocationListener projectGroup
Get the project being manipulated private I Project get Project return this project  IProject getProject
Open an appropriate directory browser private void handle Location Browse Button Pressed Directory Dialog dialog new Directory Dialog location Path Field get Shell dialog set Message DIRECTORY DIALOG LABEL String dir Name location Path Field get Text if dir Name equals NON NLS 1 File path new File dir Name if path exists dialog set Filter Path dir Name String selected Directory dialog open if selected Directory null location Path Field set Text selected Directory  handleLocationBrowseButtonPressed DirectoryDialog DirectoryDialog locationPathField getShell setMessage DIRECTORY_DIALOG_LABEL dirName locationPathField getText dirName dirName setFilterPath dirName selectedDirectory selectedDirectory locationPathField setText selectedDirectory
The code Project Location Move Dialog code implementation of this code Dialog code method builds a two element list the first element is the project name and the second one is the location protected void ok Pressed Array List list new Array List list add get Project get Name if use Defaults list add Platform get Location to String else list add this location Path Field get Text set Result list super ok Pressed  ProjectLocationMoveDialog okPressed ArrayList ArrayList getProject getName useDefaults getLocation toString locationPathField getText setResult okPressed
Set the location to the default location if we are set to use Defaults private void set Location For Selection if use Defaults I Path default Path Platform get Location append get Project get Name location Path Field set Text default Path toOS String  useDefaults setLocationForSelection useDefaults IPath defaultPath getLocation getProject getName locationPathField setText defaultPath toOSString

Create a Project Location Selection Dialog on the supplied project parented by the parent Shell param parent Shell param existing Project public Project Location Selection Dialog Shell parent Shell I Project existing Project super parent Shell set Shell Style get Shell Style SWT RESIZE set Title PROJECT LOCATION SELECTION TITLE set Status Line Above Buttons true this project existing Project try this use Defaults this get Project get Description get Location null catch Core Exception exception Leave it as the default if we get a selection  ProjectLocationSelectionDialog parentShell parentShell existingProject ProjectLocationSelectionDialog parentShell IProject existingProject parentShell setShellStyle getShellStyle setTitle PROJECT_LOCATION_SELECTION_TITLE setStatusLineAboveButtons existingProject useDefaults getProject getDescription getLocation CoreException
Check the message If it is null then continue otherwise inform the user via the status value and disable the OK param message the error message to show if it is not null private void apply Validation Result String error Msg int code boolean allow Finish false if error Msg null code I Status OK error Msg NON NLS 1 allow Finish true else if first Location Check code I Status OK else code I Status ERROR update Status new Status code IDE Workbench Plugin get Default get Descriptor get Unique Identifier code error Msg null get Ok Button set Enabled allow Finish  applyValidationResult errorMsg allowFinish errorMsg IStatus errorMsg allowFinish firstLocationCheck IStatus IStatus updateStatus IDEWorkbenchPlugin getDefault getDescriptor getUniqueIdentifier errorMsg getOkButton setEnabled allowFinish
Check whether the entries are valid If so return null Otherwise return a string that indicates the problem private String check Valid String valid check Valid Name if valid null return valid return check Valid Location  checkValid checkValidName checkValidLocation
Check if the entry in the widget location is valid If it is valid return null Otherwise return a string that indicates the problem private String check Valid Location if use Defaults return null else String location Field Contents location Path Field get Text if location Field Contents equals NON NLS 1 return IDE Workbench Messages get String Wizard New Project Creation Page project Location Empty NON NLS 1 else I Path path new Path NON NLS 1 if path is Valid Path location Field Contents return INVALID LOCATION MESSAGE I Status location Status this project get Workspace validate Project Location this project new Path location Field Contents if location Status isOK return location Status get Message return null  checkValidLocation useDefaults locationFieldContents locationPathField getText locationFieldContents IDEWorkbenchMessages getString WizardNewProjectCreationPage projectLocationEmpty IPath isValidPath locationFieldContents INVALID_LOCATION_MESSAGE IStatus locationStatus getWorkspace validateProjectLocation locationFieldContents locationStatus locationStatus getMessage
Check if the entries in the widget are valid If they are return null otherwise return a string that indicates the problem private String check Valid Name String name this project Name Field get Text I Workspace workspace get Project get Workspace I Status name Status workspace validate Name name I Resource PROJECT if name Status isOK return name Status get Message I Project new Project workspace get Root get Project name if new Project exists return IDE Workbench Messages format Copy Project Action already Exists new Object name NON NLS 1 return null  checkValidName projectNameField getText IWorkspace getProject getWorkspace IStatus nameStatus validateName IResource nameStatus nameStatus getMessage IProject newProject getRoot getProject newProject IDEWorkbenchMessages CopyProjectAction alreadyExists
The code Project Location Selection Dialog code implementation of this code Selection Status Dialog code method builds a two element list the first element is the project name and the second one is the location protected void compute Result Array List list new Array List list add this project Name Field get Text if use Defaults list add Platform get Location to String else list add this location Path Field get Text set Result list  ProjectLocationSelectionDialog SelectionStatusDialog computeResult ArrayList ArrayList projectNameField getText useDefaults getLocation toString locationPathField getText setResult
Method declared in Window protected void configure Shell Shell shell super configure Shell shell Workbench Help set Help shell I Help Context Ids PROJECT LOCATION SELECTION DIALOG  configureShell configureShell WorkbenchHelp setHelp IHelpContextIds PROJECT_LOCATION_SELECTION_DIALOG
protected Control create Dialog Area Composite parent page group Composite composite Composite super create Dialog Area parent composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL BOTH create Project Name Group composite create Project Location Group composite return composite  createDialogArea createDialogArea setLayout GridLayout setLayoutData GridData GridData FILL_BOTH createProjectNameGroup createProjectLocationGroup
Listener listener new Listener public void handle Event Event event first Location Check false apply Validation Result check Valid  handleEvent firstLocationCheck applyValidationResult checkValid
Create the listener that is used to validate the location entered by the iser private void create Location Listener Listener listener new Listener public void handle Event Event event first Location Check false apply Validation Result check Valid this location Path Field add Listener SWT Modify listener  createLocationListener handleEvent firstLocationCheck applyValidationResult checkValid locationPathField addListener
Listener listener new Listener public void handle Event Event event set Location For Selection apply Validation Result check Valid  handleEvent setLocationForSelection applyValidationResult checkValid
Create the listener that is used to validate the entries for the receiver private void create Name Listener Listener listener new Listener public void handle Event Event event set Location For Selection apply Validation Result check Valid this project Name Field add Listener SWT Modify listener  createNameListener handleEvent setLocationForSelection applyValidationResult checkValid projectNameField addListener
Creates the project location specification controls param parent the parent composite private final void create Project Location Group Composite parent Font font parent get Font project specification group Composite project Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 project Group set Layout layout project Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL project Group set Font font final Button use Defaults Button new Button project Group SWT CHECK SWT RIGHT use Defaults Button set Text IDE Workbench Messages get String Project Location Selection Dialog use Default Label NON NLS 1 use Defaults Button set Selection this use Defaults Grid Data button Data new Grid Data button Data horizontal Span 3 use Defaults Button set Layout Data button Data use Defaults Button set Font font create User Specified Project Location Group project Group this use Defaults Selection Listener listener new Selection Adapter public void widget Selected Selection Event e use Defaults use Defaults Button get Selection browse Button set Enabled use Defaults location Path Field set Enabled use Defaults location Label set Enabled use Defaults set Location For Selection if use Defaults first Location Check true apply Validation Result check Valid use Defaults Button add Selection Listener listener  createProjectLocationGroup getFont projectGroup GridLayout GridLayout numColumns projectGroup setLayout projectGroup setLayoutData GridData GridData FILL_HORIZONTAL projectGroup setFont useDefaultsButton projectGroup useDefaultsButton setText IDEWorkbenchMessages getString ProjectLocationSelectionDialog useDefaultLabel useDefaultsButton setSelection useDefaults GridData buttonData GridData buttonData horizontalSpan useDefaultsButton setLayoutData buttonData useDefaultsButton setFont createUserSpecifiedProjectLocationGroup projectGroup useDefaults SelectionListener SelectionAdapter widgetSelected SelectionEvent useDefaults useDefaultsButton getSelection browseButton setEnabled useDefaults locationPathField setEnabled useDefaults locationLabel setEnabled useDefaults setLocationForSelection useDefaults firstLocationCheck applyValidationResult checkValid useDefaultsButton addSelectionListener
Creates the project name specification controls param parent the parent composite private void create Project Name Group Composite parent Font font parent get Font project specification group Composite project Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 project Group set Layout layout project Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL new project label Label project Label new Label project Group SWT NONE project Label set Font font project Label set Text PROJECT NAME LABEL new project name entry field project Name Field new Text project Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH project Name Field set Layout Data data project Name Field set Font font Set the initial value first before listener to avoid handling an event during the creation project Name Field set Text get Copy Name For get Project get Name project Name Field select All create Name Listener  createProjectNameGroup getFont projectGroup GridLayout GridLayout numColumns projectGroup setLayout projectGroup setLayoutData GridData GridData FILL_HORIZONTAL projectLabel projectGroup projectLabel setFont projectLabel setText PROJECT_NAME_LABEL projectNameField projectGroup GridData GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH projectNameField setLayoutData projectNameField setFont projectNameField setText getCopyNameFor getProject getName projectNameField selectAll createNameListener
Creates the project location specification controls return the parent of the widgets created param project Group the parent composite param enabled sets the initial enabled state of the widgets private Composite create User Specified Project Location Group Composite project Group boolean enabled Font font project Group get Font location label location Label new Label project Group SWT NONE location Label set Font font location Label set Text LOCATION LABEL location Label set Enabled enabled project location entry field location Path Field new Text project Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH location Path Field set Layout Data data location Path Field set Font font location Path Field set Enabled enabled browse button this browse Button new Button project Group SWT PUSH this browse Button set Font font this browse Button set Text BROWSE LABEL this browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Location Browse Button Pressed this browse Button set Enabled enabled set Button Layout Data this browse Button Set the initial value first before listener to avoid handling an event during the creation try I Path location this get Project get Description get Location if location null set Location For Selection else location Path Field set Text location to String catch Core Exception exception Set it to the default if possible as there is no info yet set Location For Selection create Location Listener return project Group  projectGroup createUserSpecifiedProjectLocationGroup projectGroup projectGroup getFont locationLabel projectGroup locationLabel setFont locationLabel setText LOCATION_LABEL locationLabel setEnabled locationPathField projectGroup GridData GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH locationPathField setLayoutData locationPathField setFont locationPathField setEnabled browseButton projectGroup browseButton setFont browseButton setText BROWSE_LABEL browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLocationBrowseButtonPressed browseButton setEnabled setButtonLayoutData browseButton IPath getProject getDescription getLocation setLocationForSelection locationPathField setText toString CoreException setLocationForSelection createLocationListener projectGroup
Generates a new name for the project that does not have any collisions private String get Copy Name For String project Name I Workspace workspace get Project get Workspace if workspace get Root get Project project Name exists return project Name int counter 1 while true String name Segment if counter 1 name Segment IDE Workbench Messages format Copy Project Action copy Name Two Args new Object new Integer counter project Name NON NLS 1 else name Segment IDE Workbench Messages format Copy Project Action copy Name One Arg new Object project Name NON NLS 1 if workspace get Root get Project name Segment exists return name Segment counter  getCopyNameFor projectName IWorkspace getProject getWorkspace getRoot getProject projectName projectName nameSegment nameSegment IDEWorkbenchMessages CopyProjectAction copyNameTwoArgs projectName nameSegment IDEWorkbenchMessages CopyProjectAction copyNameOneArg projectName getRoot getProject nameSegment nameSegment
Get the project being manipulated private I Project get Project return this project  IProject getProject
Open an appropriate directory browser private void handle Location Browse Button Pressed Directory Dialog dialog new Directory Dialog location Path Field get Shell dialog set Message DIRECTORY DIALOG LABEL String dir Name location Path Field get Text if dir Name equals NON NLS 1 File path new File dir Name if path exists dialog set Filter Path dir Name String selected Directory dialog open if selected Directory null location Path Field set Text selected Directory  handleLocationBrowseButtonPressed DirectoryDialog DirectoryDialog locationPathField getShell setMessage DIRECTORY_DIALOG_LABEL dirName locationPathField getText dirName dirName setFilterPath dirName selectedDirectory selectedDirectory locationPathField setText selectedDirectory
Set the location to the default location if we are set to use Defaults private void set Location For Selection if use Defaults I Path default Path Platform get Location append project Name Field get Text location Path Field set Text default Path toOS String  useDefaults setLocationForSelection useDefaults IPath defaultPath getLocation projectNameField getText locationPathField setText defaultPath toOSString

private Shell shell Creates a new action for opening a property dialog on the elements from the given selection provider param shell the shell in which the dialog will open param provider the selection provider whose elements the property dialog will describe public Property Dialog Action Shell shell I Selection Provider provider super provider Workbench Messages get String Property Dialog text NON NLS 1 Assert is Not Null shell this shell shell set Tool Tip Text Workbench Messages get String Property Dialog tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids PROPERTY DIALOG ACTION  PropertyDialogAction ISelectionProvider WorkbenchMessages getString PropertyDialog isNotNull setToolTipText WorkbenchMessages getString PropertyDialog toolTip WorkbenchHelp setHelp IHelpContextIds PROPERTY_DIALOG_ACTION
Returns the name of the given element param element the element return the name of the element private String get Name I Adaptable element I Workbench Adapter adapter I Workbench Adapter element get Adapter I Workbench Adapter class if adapter null return adapter get Label element else return NON NLS 1  getName IAdaptable IWorkbenchAdapter IWorkbenchAdapter getAdapter IWorkbenchAdapter getLabel
Returns whether the provided object has pages registered in the property page manager param object return boolean private boolean has Property Pages For Object object Property Page Contributor Manager manager Property Page Contributor Manager get Manager return manager has Contributors For object  hasPropertyPagesFor PropertyPageContributorManager PropertyPageContributorManager getManager hasContributorsFor
Returns whether this action is actually applicable to the current selection If this action is disabled it will return code false code without further calculation If it is enabled it will check with the workbench s property page manager to see if there are any property pages registered for the selected element s type p This method is generally too expensive to use when updating the enabled state of the action on each selection change p return code true code if the selection is of size 1 and there are property pages for the selected element and code false code otherwise public boolean is Applicable For Selection if is Enabled return false return is Applicable For Selection get Structured Selection  isApplicableForSelection isEnabled isApplicableForSelection getStructuredSelection
Returns whether this action is applicable to the current selection This checks that the selection is of size 1 and checks with the workbench s property page manager to see if there are any property pages registered for the selected element s type p This method is generally too expensive to use when updating the enabled state of the action on each selection change p param selection The selection to test return code true code if the selection is of size 1 and there are property pages for the selected element and code false code otherwise public boolean is Applicable For Selection I Structured Selection selection return selection size 1 has Property Pages For selection get First Element  isApplicableForSelection IStructuredSelection hasPropertyPagesFor getFirstElement
The code Property Dialog Action code implementation of this code I Action code method performs the action by opening the Property Page Dialog for the current selection If no pages are found an informative message dialog is presented instead public void run Property Page Manager page Manager new Property Page Manager String title NON NLS 1 get selection I Adaptable element I Adaptable get Structured Selection get First Element if element null return load pages for the selection fill the manager with contributions from the matching contributors Property Page Contributor Manager get Manager contribute page Manager element testing if there are pages in the manager Iterator pages page Manager get Elements Preference Manager PRE ORDER iterator String name get Name element if pages has Next Message Dialog open Information shell Workbench Messages get String Property Dialog message Title NON NLS 1 Workbench Messages format Property Dialog no Property Message new Object name NON NLS 1 return else title Workbench Messages format Property Dialog property Message new Object name NON NLS 1 Property Dialog property Dialog new Property Dialog shell page Manager get Structured Selection property Dialog create property Dialog get Shell set Text title Workbench Help set Help property Dialog get Shell I Help Context Ids PROPERTY DIALOG property Dialog open  PropertyDialogAction IAction PropertyPageManager pageManager PropertyPageManager IAdaptable IAdaptable getStructuredSelection getFirstElement PropertyPageContributorManager getManager pageManager pageManager getElements PreferenceManager PRE_ORDER getName hasNext MessageDialog openInformation WorkbenchMessages getString PropertyDialog messageTitle WorkbenchMessages PropertyDialog noPropertyMessage WorkbenchMessages PropertyDialog propertyMessage PropertyDialog propertyDialog PropertyDialog pageManager getStructuredSelection propertyDialog propertyDialog getShell setText WorkbenchHelp setHelp propertyDialog getShell IHelpContextIds PROPERTY_DIALOG propertyDialog
The code Property Dialog Action code implementation of this code Selection Provider Action code method enables the action only if the given selection contains exactly one element public void selection Changed I Structured Selection selection set Enabled selection size 1 selection get First Element null  PropertyDialogAction SelectionProviderAction selectionChanged IStructuredSelection setEnabled getFirstElement

private I Adaptable element Creates a new property page public Property Page  IAdaptable PropertyPage
see org eclipse ui I Workbench Property Page get Element public I Adaptable get Element return element  IWorkbenchPropertyPage getElement IAdaptable getElement
Sets the element that owns properties shown on this page param element the element public void set Element I Adaptable element this element element  setElement IAdaptable

Array List resources new Array List boolean resources Sorted true public int compare To Object o return collator compare label Resource Descriptor o label  ArrayList ArrayList resourcesSorted compareTo ResourceDescriptor
display sync Exec new Runnable public void run Be sure the widget still exists if resource Names is Disposed disposed 0 true return item Count 0 resource Names get Item Count  syncExec resourceNames isDisposed itemCount resourceNames getItemCount
display sync Exec new Runnable public void run if stop resource Names is Disposed return update Item index item Index 0 item Count 0 item Index 0  syncExec resourceNames isDisposed updateItem itemIndex itemCount itemIndex
display sync Exec new Runnable public void run if stop resource Names is Disposed return update Item index item Index 0 item Count 0 item Index 0  syncExec resourceNames isDisposed updateItem itemIndex itemCount itemIndex
display sync Exec new Runnable public void run if resource Names is Disposed return item Count 0 resource Names get Item Count if item Index 0 item Count 0 resource Names set Redraw false resource Names remove item Index 0 item Count 0 1 resource Names set Redraw true If no resources remove remaining folder entries if resource Names get Item Count 0 folder Names remove All  syncExec resourceNames isDisposed itemCount resourceNames getItemCount itemIndex itemCount resourceNames setRedraw resourceNames itemIndex itemCount resourceNames setRedraw resourceNames getItemCount folderNames removeAll
public void run Display display resource Names get Display final int item Index 0 final int item Count 0 Keep track of if the widget got disposed so that we can abort if required final boolean disposed false display sync Exec new Runnable public void run Be sure the widget still exists if resource Names is Disposed disposed 0 true return item Count 0 resource Names get Item Count if disposed 0 return int last if pattern String index Of 1 pattern String ends With NON NLS 1 pattern String index Of pattern String length 1 Use a binary search to get first and last match when the pattern string ends with and has no other embedded special characters For this case we can be smarter about getting the first and last match since the items are in sorted order first Match get First Match if first Match 1 first Match 0 last Match 1 else last Match get Last Match last last Match for int i first Match i last Match i if i 50 0 try Thread sleep 10 catch Interrupted Exception e if stop resource Names is Disposed disposed 0 true return final int index i display sync Exec new Runnable public void run if stop resource Names is Disposed return update Item index item Index 0 item Count 0 item Index 0 else last last Match boolean set First Match true for int i first Match i last Match i if i 50 0 try Thread sleep 10 catch Interrupted Exception e if stop resource Names is Disposed disposed 0 true return final int index i if match descriptors index label if set First Match set First Match false first Match index last index display sync Exec new Runnable public void run if stop resource Names is Disposed return update Item index item Index 0 item Count 0 item Index 0 if disposed 0 return last Match last display sync Exec new Runnable public void run if resource Names is Disposed return item Count 0 resource Names get Item Count if item Index 0 item Count 0 resource Names set Redraw false resource Names remove item Index 0 item Count 0 1 resource Names set Redraw true If no resources remove remaining folder entries if resource Names get Item Count 0 folder Names remove All  resourceNames getDisplay itemIndex itemCount syncExec resourceNames isDisposed itemCount resourceNames getItemCount patternString indexOf patternString endsWith patternString indexOf patternString firstMatch getFirstMatch firstMatch firstMatch lastMatch lastMatch getLastMatch lastMatch firstMatch lastMatch InterruptedException resourceNames isDisposed syncExec resourceNames isDisposed updateItem itemIndex itemCount itemIndex lastMatch setFirstMatch firstMatch lastMatch InterruptedException resourceNames isDisposed setFirstMatch setFirstMatch firstMatch syncExec resourceNames isDisposed updateItem itemIndex itemCount itemIndex lastMatch syncExec resourceNames isDisposed itemCount resourceNames getItemCount itemIndex itemCount resourceNames setRedraw resourceNames itemIndex itemCount resourceNames setRedraw resourceNames getItemCount folderNames removeAll
display sync Exec new Runnable public void run Be sure the widget still exists if resource Names is Disposed disposed 0 true return item Count 0 resource Names get Item Count  syncExec resourceNames isDisposed itemCount resourceNames getItemCount
display sync Exec new Runnable public void run if stop resource Names is Disposed return update Item index item Index 0 item Count 0 item Index 0  syncExec resourceNames isDisposed updateItem itemIndex itemCount itemIndex
display sync Exec new Runnable public void run if stop resource Names is Disposed return update Item index item Index 0 item Count 0 item Index 0  syncExec resourceNames isDisposed updateItem itemIndex itemCount itemIndex
display sync Exec new Runnable public void run if resource Names is Disposed return item Count 0 resource Names get Item Count if item Index 0 item Count 0 resource Names set Redraw false resource Names remove item Index 0 item Count 0 1 resource Names set Redraw true If no resources remove remaining folder entries if resource Names get Item Count 0 folder Names remove All  syncExec resourceNames isDisposed itemCount resourceNames getItemCount itemIndex itemCount resourceNames setRedraw resourceNames itemIndex itemCount resourceNames setRedraw resourceNames getItemCount folderNames removeAll
public void run Display display resource Names get Display final int item Index 0 final int item Count 0 Keep track of if the widget got disposed so that we can abort if required final boolean disposed false display sync Exec new Runnable public void run Be sure the widget still exists if resource Names is Disposed disposed 0 true return item Count 0 resource Names get Item Count if disposed 0 return if refilter for int i 0 i last Match i if i 50 0 try Thread sleep 10 catch Interrupted Exception e if stop resource Names is Disposed disposed 0 true return final int index i display sync Exec new Runnable public void run if stop resource Names is Disposed return update Item index item Index 0 item Count 0 item Index 0 else we re filtering the previous list for int i first Match i last Match i if i 50 0 try Thread sleep 10 catch Interrupted Exception e if stop resource Names is Disposed disposed 0 true return final int index i if match descriptors index label display sync Exec new Runnable public void run if stop resource Names is Disposed return update Item index item Index 0 item Count 0 item Index 0 if disposed 0 return display sync Exec new Runnable public void run if resource Names is Disposed return item Count 0 resource Names get Item Count if item Index 0 item Count 0 resource Names set Redraw false resource Names remove item Index 0 item Count 0 1 resource Names set Redraw true If no resources remove remaining folder entries if resource Names get Item Count 0 folder Names remove All  resourceNames getDisplay itemIndex itemCount syncExec resourceNames isDisposed itemCount resourceNames getItemCount lastMatch InterruptedException resourceNames isDisposed syncExec resourceNames isDisposed updateItem itemIndex itemCount itemIndex firstMatch lastMatch InterruptedException resourceNames isDisposed syncExec resourceNames isDisposed updateItem itemIndex itemCount itemIndex syncExec resourceNames isDisposed itemCount resourceNames getItemCount itemIndex itemCount resourceNames setRedraw resourceNames itemIndex itemCount resourceNames setRedraw resourceNames getItemCount folderNames removeAll
Creates a new instance of the class param parent Shell shell to parent the dialog on param resources resources to display in the dialog public Resource List Selection Dialog Shell parent Shell I Resource resources super parent Shell set Shell Style get Shell Style SWT RESIZE gather Resources Dynamically false init Descriptors resources  parentShell ResourceListSelectionDialog parentShell IResource parentShell setShellStyle getShellStyle gatherResourcesDynamically initDescriptors
Creates a new instance of the class When this constructor is used to create the dialog resources will be gathered dynamically as the pattern string is specified Only resources of the given types that match the pattern string will be listed To further filter the matching resources see select I Resource param parent Shell shell to parent the dialog on param container container to get resources from param type Mask mask containing I Resource types to be considered public Resource List Selection Dialog Shell parent Shell I Container container int type Mask super parent Shell this container container this type Mask type Mask set Shell Style get Shell Style SWT RESIZE  IResource parentShell typeMask IResource ResourceListSelectionDialog parentShell IContainer typeMask parentShell typeMask typeMask setShellStyle getShellStyle
Adjust the pattern string for matching protected String adjust Pattern String text pattern get Text trim if text equals NON NLS 1 text index Of 1 text index Of 1 text index Of 1 text text NON NLS 1 return text if text ends With NON NLS 1 the character indicates an exact match search return text substring 0 text length 1 return text  adjustPattern getText indexOf indexOf indexOf endsWith
see org eclipse jface dialogs Dialog cancel Pressed protected void cancel Pressed set Result null super cancel Pressed  cancelPressed cancelPressed setResult cancelPressed
see org eclipse jface window Window close public boolean close boolean result super close label Provider dispose return result  labelProvider
see org eclipse jface window Window create public void create super create pattern set Focus  setFocus
Creates the contents of this dialog initializes the listener and the update thread param parent parent to create the dialog widgets in protected Control create Dialog Area Composite parent Composite dialog Area Composite super create Dialog Area parent Label l new Label dialog Area SWT NONE l set Text IDE Workbench Messages get String Resource Selection Dialog label NON NLS 1 Grid Data data new Grid Data Grid Data FILL HORIZONTAL l set Layout Data data l new Label dialog Area SWT NONE l set Text IDE Workbench Messages get String Resource Selection Dialog pattern NON NLS 1 data new Grid Data Grid Data FILL HORIZONTAL l set Layout Data data pattern new Text dialog Area SWT SINGLE SWT BORDER pattern set Layout Data new Grid Data Grid Data FILL HORIZONTAL l new Label dialog Area SWT NONE l set Text IDE Workbench Messages get String Resource Selection Dialog matching NON NLS 1 data new Grid Data Grid Data FILL HORIZONTAL l set Layout Data data resource Names new Table dialog Area SWT SINGLE SWT BORDER SWT V SCROLL data new Grid Data Grid Data FILL BOTH data height Hint 12 resource Names get Item Height resource Names set Layout Data data l new Label dialog Area SWT NONE l set Text IDE Workbench Messages get String Resource Selection Dialog folders NON NLS 1 data new Grid Data Grid Data FILL HORIZONTAL l set Layout Data data folder Names new Table dialog Area SWT SINGLE SWT BORDER SWT V SCROLL SWT H SCROLL data new Grid Data Grid Data FILL BOTH data width Hint 300 data height Hint 4 folder Names get Item Height folder Names set Layout Data data if gather Resources Dynamically update Gather Thread new Update Gather Thread else update Filter Thread new Update Filter Thread pattern add Key Listener new Key Adapter public void key Released Key Event e if e key Code SWT ARROW DOWN resource Names set Focus pattern add Modify Listener new Modify Listener public void modify Text Modify Event e text Changed resource Names add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Folders Resource Descriptor e item get Data public void widget Default Selected Selection Event e ok Pressed folder Names add Selection Listener new Selection Adapter public void widget Default Selected Selection Event e ok Pressed apply Dialog Font dialog Area return dialog Area  createDialogArea dialogArea createDialogArea dialogArea setText IDEWorkbenchMessages getString ResourceSelectionDialog GridData GridData GridData FILL_HORIZONTAL setLayoutData dialogArea setText IDEWorkbenchMessages getString ResourceSelectionDialog GridData GridData FILL_HORIZONTAL setLayoutData dialogArea setLayoutData GridData GridData FILL_HORIZONTAL dialogArea setText IDEWorkbenchMessages getString ResourceSelectionDialog GridData GridData FILL_HORIZONTAL setLayoutData resourceNames dialogArea V_SCROLL GridData GridData FILL_BOTH heightHint resourceNames getItemHeight resourceNames setLayoutData dialogArea setText IDEWorkbenchMessages getString ResourceSelectionDialog GridData GridData FILL_HORIZONTAL setLayoutData folderNames dialogArea V_SCROLL H_SCROLL GridData GridData FILL_BOTH widthHint heightHint folderNames getItemHeight folderNames setLayoutData gatherResourcesDynamically updateGatherThread UpdateGatherThread updateFilterThread UpdateFilterThread addKeyListener KeyAdapter keyReleased KeyEvent keyCode ARROW_DOWN resourceNames setFocus addModifyListener ModifyListener modifyText ModifyEvent textChanged resourceNames addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateFolders ResourceDescriptor getData widgetDefaultSelected SelectionEvent okPressed folderNames addSelectionListener SelectionAdapter widgetDefaultSelected SelectionEvent okPressed applyDialogFont dialogArea dialogArea
private void filter Resources String old Pattern pattern String pattern String adjust Pattern if pattern String equals old Pattern return update Filter Thread stop true string Matcher new String Matcher pattern String true false Update Filter Thread old Thread update Filter Thread update Filter Thread new Update Filter Thread if pattern String equals NON NLS 1 update Filter Thread first Match 0 update Filter Thread last Match 1 update Filter Thread start return if old Pattern null old Pattern length 0 old Pattern ends With pattern String ends With NON NLS 1 NON NLS 2 int match Length old Pattern length 1 if pattern String region Matches 0 old Pattern 0 match Length filter the previous list of items this is done when the new pattern is a derivative of the old pattern update Filter Thread first Match old Thread first Match update Filter Thread last Match old Thread last Match update Filter Thread start return filter the entire list update Filter Thread first Match 0 update Filter Thread last Match descriptors Size 1 update Filter Thread start  filterResources oldPattern patternString patternString adjustPattern patternString oldPattern updateFilterThread stringMatcher StringMatcher patternString UpdateFilterThread oldThread updateFilterThread updateFilterThread UpdateFilterThread patternString updateFilterThread firstMatch updateFilterThread lastMatch updateFilterThread oldPattern oldPattern oldPattern endsWith patternString endsWith matchLength oldPattern patternString regionMatches oldPattern matchLength updateFilterThread firstMatch oldThread firstMatch updateFilterThread lastMatch oldThread lastMatch updateFilterThread updateFilterThread firstMatch updateFilterThread lastMatch descriptorsSize updateFilterThread
Use a binary search to get the first match for the pattern String This method assumes the pattern String does not contain any characters and that it contains only one character at the end of the string private int get First Match int high descriptors Size int low 1 boolean match false Resource Descriptor desc new Resource Descriptor desc label pattern String substring 0 pattern String length 1 while high low 1 int index high low 2 String label descriptors index label if match label high index match true else int compare descriptors index compare To desc if compare 1 low index else high index if match return high else return 1  patternString patternString getFirstMatch descriptorsSize ResourceDescriptor ResourceDescriptor patternString patternString compareTo
Busy Indicator show While get Shell get Display new Runnable public void run get Matching Resources resources I Resource resources Array new I Resource resources size resources to Array resources Array init Descriptors resources Array  BusyIndicator showWhile getShell getDisplay getMatchingResources IResource resourcesArray IResource toArray resourcesArray initDescriptors resourcesArray
private void gather Resources String old Pattern pattern String pattern String adjust Pattern if pattern String equals old Pattern return update Gather Thread stop true update Gather Thread new Update Gather Thread if pattern String equals NON NLS 1 update Gather Thread start return string Matcher new String Matcher pattern String true false if old Pattern null old Pattern length 0 old Pattern ends With pattern String ends With NON NLS 1 NON NLS 2 see if the new pattern is a derivative of the old pattern int match Length old Pattern length 1 if pattern String region Matches 0 old Pattern 0 match Length update Gather Thread refilter true update Gather Thread first Match 0 update Gather Thread last Match descriptors Size 1 update Gather Thread start return final Array List resources new Array List Busy Indicator show While get Shell get Display new Runnable public void run get Matching Resources resources I Resource resources Array new I Resource resources size resources to Array resources Array init Descriptors resources Array update Gather Thread first Match 0 update Gather Thread last Match descriptors Size 1 update Gather Thread start  gatherResources oldPattern patternString patternString adjustPattern patternString oldPattern updateGatherThread updateGatherThread UpdateGatherThread patternString updateGatherThread stringMatcher StringMatcher patternString oldPattern oldPattern oldPattern endsWith patternString endsWith matchLength oldPattern patternString regionMatches oldPattern matchLength updateGatherThread updateGatherThread firstMatch updateGatherThread lastMatch descriptorsSize updateGatherThread ArrayList ArrayList BusyIndicator showWhile getShell getDisplay getMatchingResources IResource resourcesArray IResource toArray resourcesArray initDescriptors resourcesArray updateGatherThread firstMatch updateGatherThread lastMatch descriptorsSize updateGatherThread
Return an image for a resource descriptor param desc resource descriptor to return image for return an image for a resource descriptor private Image get Image Resource Descriptor desc I Resource r I Resource desc resources get 0 return label Provider get Image r  getImage ResourceDescriptor IResource IResource labelProvider getImage
Use a binary search to get the last match for the pattern String This method assumes the pattern String does not contain any characters and that it contains only one character at the end of the string private int get Last Match int high descriptors Size int low 1 boolean match false Resource Descriptor desc new Resource Descriptor desc label pattern String substring 0 pattern String length 1 while high low 1 int index high low 2 String label descriptors index label if match label low index match true else int compare descriptors index compare To desc if compare 1 low index else high index if match return low else return 1  patternString patternString getLastMatch descriptorsSize ResourceDescriptor ResourceDescriptor patternString patternString compareTo
container accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy int type proxy get Type if type Mask type 0 if match proxy get Name I Resource res proxy request Resource if select res resources add res return true else return false if type I Resource FILE return false return true  IResourceProxyVisitor IResourceProxy getType typeMask getName IResource requestResource IResource
Gather the resources of the specified type that match the current pattern string Gather the resources using the proxy visitor since this is quicker than getting the entire resource param resources resources that match private void get Matching Resources final Array List resources try container accept new I Resource Proxy Visitor public boolean visit I Resource Proxy proxy int type proxy get Type if type Mask type 0 if match proxy get Name I Resource res proxy request Resource if select res resources add res return true else return false if type I Resource FILE return false return true I Resource NONE catch Core Exception e  getMatchingResources ArrayList IResourceProxyVisitor IResourceProxy getType typeMask getName IResource requestResource IResource IResource CoreException
private Image get Parent Image I Resource resource I Resource parent resource get Parent return label Provider get Image parent  getParentImage IResource IResource getParent labelProvider getImage
private String get Parent Label I Resource resource I Resource parent resource get Parent String text if parent get Type I Resource ROOT Get readable name for workspace root Workspace without duplicating language specific string here text label Provider get Text parent else text parent get Full Path make Relative to String return text  getParentLabel IResource IResource getParent getType IResource labelProvider getText getFullPath makeRelative toString
Busy Indicator show While null new Runnable public void run descriptors new Resource Descriptor resources length for int i 0 i resources length i I Resource r resources i Resource Descriptor d new Resource Descriptor TDB Should use the label provider and compare performance d label r get Name d resources add r descriptors i d Arrays sort descriptors descriptors Size descriptors length Merge the resource descriptor with the same label and type int index 0 if descriptors Size 2 return Resource Descriptor current descriptors index I Resource current Resource I Resource current resources get 0 for int i 1 i descriptors Size i Resource Descriptor next descriptors i I Resource next Resource I Resource next resources get 0 if next Resource get Type current Resource get Type next label equals current label current resources add next Resource else if current resources size 1 current resources Sorted false descriptors index 1 descriptors i index current descriptors index current Resource I Resource current resources get 0 descriptors Size index 1  BusyIndicator showWhile ResourceDescriptor IResource ResourceDescriptor ResourceDescriptor getName descriptorsSize descriptorsSize ResourceDescriptor IResource currentResource IResource descriptorsSize ResourceDescriptor IResource nextResource IResource nextResource getType currentResource getType nextResource resourcesSorted currentResource IResource descriptorsSize
Creates a Resource Descriptor for each I Resource sorts them and removes the duplicated ones param resources resources to create resource descriptors for private void init Descriptors final I Resource resources Busy Indicator show While null new Runnable public void run descriptors new Resource Descriptor resources length for int i 0 i resources length i I Resource r resources i Resource Descriptor d new Resource Descriptor TDB Should use the label provider and compare performance d label r get Name d resources add r descriptors i d Arrays sort descriptors descriptors Size descriptors length Merge the resource descriptor with the same label and type int index 0 if descriptors Size 2 return Resource Descriptor current descriptors index I Resource current Resource I Resource current resources get 0 for int i 1 i descriptors Size i Resource Descriptor next descriptors i I Resource next Resource I Resource next resources get 0 if next Resource get Type current Resource get Type next label equals current label current resources add next Resource else if current resources size 1 current resources Sorted false descriptors index 1 descriptors i index current descriptors index current Resource I Resource current resources get 0 descriptors Size index 1  ResourceDescriptor IResource initDescriptors IResource BusyIndicator showWhile ResourceDescriptor IResource ResourceDescriptor ResourceDescriptor getName descriptorsSize descriptorsSize ResourceDescriptor IResource currentResource IResource descriptorsSize ResourceDescriptor IResource nextResource IResource nextResource getType currentResource getType nextResource resourcesSorted currentResource IResource descriptorsSize
Returns true if the label matches the chosen pattern param label label to match with the current pattern return true if the label matches the chosen pattern false otherwise private boolean match String label if pattern String null pattern String equals pattern String equals NON NLS 2 NON NLS 1 return true return string Matcher match label  patternString patternString patternString stringMatcher
The user has selected a resource and the dialog is closing Set the selected resource as the dialog result protected void ok Pressed Table Item items folder Names get Selection if items length 1 Array List result new Array List result add items 0 get Data set Result result super ok Pressed  okPressed TableItem folderNames getSelection ArrayList ArrayList getData setResult okPressed
Use this method to further filter resources As resources are gathered if a resource matches the current pattern string this method will be called If this method answers false the resource will not be included in the list of matches and the resource s children will NOT be considered for matching protected boolean select I Resource resource return true  IResource
The text in the pattern text entry has changed Create a new string matcher and start a new update tread private void text Changed if gather Resources Dynamically gather Resources else filter Resources  textChanged gatherResourcesDynamically gatherResources filterResources
Collections sort desc resources new Comparator public int compare Object o1 Object o2 String s1 get Parent Label I Resource o1 String s2 get Parent Label I Resource o2 return collator compare s1 s2  getParentLabel IResource getParentLabel IResource
Busy Indicator show While get Shell get Display new Runnable public void run if desc resources Sorted sort the folder names Collections sort desc resources new Comparator public int compare Object o1 Object o2 String s1 get Parent Label I Resource o1 String s2 get Parent Label I Resource o2 return collator compare s1 s2 desc resources Sorted true folder Names remove All for int i 0 i desc resources size i Table Item new Item new Table Item folder Names SWT NONE I Resource r I Resource desc resources get i new Item set Text get Parent Label r new Item set Image get Parent Image r new Item set Data r folder Names set Selection 0  BusyIndicator showWhile getShell getDisplay resourcesSorted getParentLabel IResource getParentLabel IResource resourcesSorted folderNames removeAll TableItem newItem TableItem folderNames IResource IResource newItem setText getParentLabel newItem setImage getParentImage newItem setData folderNames setSelection
A new resource has been selected Change the contents of the folder names list desc resource descriptor of the selected resource private void update Folders final Resource Descriptor desc Busy Indicator show While get Shell get Display new Runnable public void run if desc resources Sorted sort the folder names Collections sort desc resources new Comparator public int compare Object o1 Object o2 String s1 get Parent Label I Resource o1 String s2 get Parent Label I Resource o2 return collator compare s1 s2 desc resources Sorted true folder Names remove All for int i 0 i desc resources size i Table Item new Item new Table Item folder Names SWT NONE I Resource r I Resource desc resources get i new Item set Text get Parent Label r new Item set Image get Parent Image r new Item set Data r folder Names set Selection 0  updateFolders ResourceDescriptor BusyIndicator showWhile getShell getDisplay resourcesSorted getParentLabel IResource getParentLabel IResource resourcesSorted folderNames removeAll TableItem newItem TableItem folderNames IResource IResource newItem setText getParentLabel newItem setImage getParentImage newItem setData folderNames setSelection
Update the specified item with the new info from the resource descriptor Create a new table item if there is no item param index index of the resource descriptor param item Pos position of the existing item to update param item Count number of items in the resources table widget private void update Item int index int item Pos int item Count Resource Descriptor desc descriptors index Table Item item if item Pos item Count item resource Names get Item item Pos if item get Data desc item set Text desc label item set Data desc item set Image get Image desc if item Pos 0 resource Names set Selection 0 update Folders desc else item new Table Item resource Names SWT NONE item set Text desc label item set Data desc item set Image get Image desc if item Pos 0 resource Names set Selection 0 update Folders desc  itemPos itemCount updateItem itemPos itemCount ResourceDescriptor TableItem itemPos itemCount resourceNames getItem itemPos getData setText setData setImage getImage itemPos resourceNames setSelection updateFolders TableItem resourceNames setText setData setImage getImage itemPos resourceNames setSelection updateFolders

private final static intSIZING SELECTION WIDGET HEIGHT 300 Creates a resource selection dialog rooted at the given element param parent Shell the parent shell param root Element the root element to populate this dialog with param message the message to be displayed at the top of this dialog or code null code to display a default message public Resource Selection Dialog Shell parent Shell I Adaptable root Element String message super parent Shell set Title IDE Workbench Messages get String Resource Selection Dialog title NON NLS 1 root root Element if message null set Message message else set Message IDE Workbench Messages get String Resource Selection Dialog message NON NLS 1 set Shell Style get Shell Style SWT RESIZE  intSIZING_SELECTION_WIDGET_HEIGHT parentShell rootElement ResourceSelectionDialog parentShell IAdaptable rootElement parentShell setTitle IDEWorkbenchMessages getString ResourceSelectionDialog rootElement setMessage setMessage IDEWorkbenchMessages getString ResourceSelectionDialog setShellStyle getShellStyle
Visually checks the previously specified elements in the container left portion of this dialog s resource selection viewer private void check Initial Selections Iterator items To Check get Initial Element Selections iterator while items To Check has Next I Resource current Element I Resource items To Check next if current Element get Type I Resource FILE selection Group initial Check List Item current Element else selection Group initial Check Tree Item current Element  checkInitialSelections itemsToCheck getInitialElementSelections itemsToCheck hasNext IResource currentElement IResource itemsToCheck currentElement getType IResource selectionGroup initialCheckListItem currentElement selectionGroup initialCheckTreeItem currentElement
Method declared on I Check State Listener public void check State Changed Check State Changed Event event get Ok Button set Enabled selection Group get Checked Element Count 0  ICheckStateListener checkStateChanged CheckStateChangedEvent getOkButton setEnabled selectionGroup getCheckedElementCount
Method declared in Window protected void configure Shell Shell shell super configure Shell shell Workbench Help set Help shell I Help Context Ids RESOURCE SELECTION DIALOG  configureShell configureShell WorkbenchHelp setHelp IHelpContextIds RESOURCE_SELECTION_DIALOG
Workbench Help set Help shell I Help Context Ids RESOURCE SELECTION DIALOG public void create super create initialize Dialog  WorkbenchHelp setHelp IHelpContextIds RESOURCE_SELECTION_DIALOG initializeDialog
composite add Control Listener new Control Listener public void control Moved Control Event e  addControlListener ControlListener controlMoved ControlEvent
public void control Moved Control Event e public void control Resized Control Event e Also try and reset the size of the columns as appropriate Table Column columns selection Group get List Table get Columns for int i 0 i columns length i columns i pack  controlMoved ControlEvent controlResized ControlEvent TableColumn selectionGroup getListTable getColumns
protected Control create Dialog Area Composite parent page group Composite composite Composite super create Dialog Area parent create the input element which has the root resource as its only child Array List input new Array List input add root create Message Area composite selection Group new Checkbox Tree And List Group composite input get Resource Provider I Resource FOLDER I Resource PROJECT I Resource ROOT Workbench Label Provider get Decorating Workbench Label Provider get Resource Provider I Resource FILE Workbench Label Provider get Decorating Workbench Label Provider SWT NONE since this page has no other significantly sized widgets we need to hardcode the combined widget s size otherwise it will open too small SIZING SELECTION WIDGET WIDTH SIZING SELECTION WIDGET HEIGHT composite add Control Listener new Control Listener public void control Moved Control Event e public void control Resized Control Event e Also try and reset the size of the columns as appropriate Table Column columns selection Group get List Table get Columns for int i 0 i columns length i columns i pack return composite  createDialogArea createDialogArea ArrayList ArrayList createMessageArea selectionGroup CheckboxTreeAndListGroup getResourceProvider IResource IResource IResource WorkbenchLabelProvider getDecoratingWorkbenchLabelProvider getResourceProvider IResource WorkbenchLabelProvider getDecoratingWorkbenchLabelProvider SIZING_SELECTION_WIDGET_WIDTH SIZING_SELECTION_WIDGET_HEIGHT addControlListener ControlListener controlMoved ControlEvent controlResized ControlEvent TableColumn selectionGroup getListTable getColumns
return new Workbench Content Provider public Object get Children Object o if o instanceof I Container I Resource members null try members I Container o members catch Core Exception e just return an empty set of children return new Object 0 filter out the desired resource types Array List results new Array List for int i 0 i members length i And the test bits with the resource types to see if they are what we want if members i get Type resource Type 0 results add members i return results to Array else input element case if o instanceof Array List return Array List o to Array else return new Object 0  WorkbenchContentProvider getChildren IContainer IResource IContainer CoreException ArrayList ArrayList getType resourceType toArray ArrayList ArrayList toArray
Returns a content provider for code I Resource code s that returns only children of the given resource type private I Tree Content Provider get Resource Provider final int resource Type return new Workbench Content Provider public Object get Children Object o if o instanceof I Container I Resource members null try members I Container o members catch Core Exception e just return an empty set of children return new Object 0 filter out the desired resource types Array List results new Array List for int i 0 i members length i And the test bits with the resource types to see if they are what we want if members i get Type resource Type 0 results add members i return results to Array else input element case if o instanceof Array List return Array List o to Array else return new Object 0  IResource ITreeContentProvider getResourceProvider resourceType WorkbenchContentProvider getChildren IContainer IResource IContainer CoreException ArrayList ArrayList getType resourceType toArray ArrayList ArrayList toArray
private void initialize Dialog selection Group add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event get Ok Button set Enabled selection Group get Checked Element Count 0  initializeDialog selectionGroup addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getOkButton setEnabled selectionGroup getCheckedElementCount
Initializes this dialog s controls private void initialize Dialog selection Group add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event get Ok Button set Enabled selection Group get Checked Element Count 0 if get Initial Element Selections is Empty get Ok Button set Enabled false else check Initial Selections  initializeDialog selectionGroup addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getOkButton setEnabled selectionGroup getCheckedElementCount getInitialElementSelections isEmpty getOkButton setEnabled checkInitialSelections
The code Resource Selection Dialog code implementation of this code Dialog code method builds a list of the selected resources for later retrieval by the client and closes this dialog protected void ok Pressed Iterator result Enum selection Group get All Checked List Items Array List list new Array List while result Enum has Next list add result Enum next set Result list super ok Pressed  ResourceSelectionDialog okPressed resultEnum selectionGroup getAllCheckedListItems ArrayList ArrayList resultEnum hasNext resultEnum setResult okPressed

Creates a new Save As dialog for no specific file param parent Shell the parent shell public Save As Dialog Shell parent Shell super parent Shell  parentShell SaveAsDialog parentShell parentShell
protected void configure Shell Shell shell super configure Shell shell shell set Text IDE Workbench Messages get String Save As Dialog text NON NLS 1 Workbench Help set Help shell I Help Context Ids SAVE AS DIALOG  configureShell configureShell setText IDEWorkbenchMessages getString SaveAsDialog WorkbenchHelp setHelp IHelpContextIds SAVE_AS_DIALOG
protected Control create Contents Composite parent Control contents super create Contents parent initialize Controls validate Page resource Group set Focus set Title IDE Workbench Messages get String Save As Dialog title NON NLS 1 dlg Title Image IDE Internal Workbench Images get Image Descriptor IDE Internal Workbench Images IMG DLGBAN SAVEAS DLG create Image set Title Image dlg Title Image set Message IDE Workbench Messages get String Save As Dialog message NON NLS 1 return contents  createContents createContents initializeControls validatePage resourceGroup setFocus setTitle IDEWorkbenchMessages getString SaveAsDialog dlgTitleImage IDEInternalWorkbenchImages getImageDescriptor IDEInternalWorkbenchImages IMG_DLGBAN_SAVEAS_DLG createImage setTitleImage dlgTitleImage setMessage IDEWorkbenchMessages getString SaveAsDialog
The code Save As Dialog code implementation of this code Window code method disposes of the banner image when the dialog is closed public boolean close if dlg Title Image null dlg Title Image dispose return super close  SaveAsDialog dlgTitleImage dlgTitleImage
Method declared on Dialog protected void create Buttons For Button Bar Composite parent ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
Listener listener new Listener public void handle Event Event event set Dialog Complete validate Page  handleEvent setDialogComplete validatePage
protected Control create Dialog Area Composite parent top level composite Composite parent Composite Composite super create Dialog Area parent create a composite with standard margins and spacing Composite composite new Composite parent Composite SWT NONE Grid Layout layout new Grid Layout layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH composite set Font parent Composite get Font Listener listener new Listener public void handle Event Event event set Dialog Complete validate Page resource Group new Resource And Container Group composite listener IDE Workbench Messages get String Save As Dialog file Label IDE Workbench Messages get String Save As Dialog file NON NLS 2 NON NLS 1 resource Group set Allow Existing Resources true return parent Composite  createDialogArea parentComposite createDialogArea parentComposite GridLayout GridLayout marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING setLayout setLayoutData GridData GridData FILL_BOTH setFont parentComposite getFont handleEvent setDialogComplete validatePage resourceGroup ResourceAndContainerGroup IDEWorkbenchMessages getString SaveAsDialog fileLabel IDEWorkbenchMessages getString SaveAsDialog resourceGroup setAllowExistingResources parentComposite
Returns the full path entered by the user p Note that the file and container might not exist and would need to be created See the code I File create code method and the code Container Generator code class p return the path or code null code if Cancel was pressed public I Path get Result return result  IFile ContainerGenerator IPath getResult
Initializes the controls of this dialog private void initialize Controls if original File null resource Group set Container Full Path original File get Parent get Full Path resource Group set Resource original File get Name else if original Name null resource Group set Resource original Name set Dialog Complete validate Page  initializeControls originalFile resourceGroup setContainerFullPath originalFile getParent getFullPath resourceGroup setResource originalFile getName originalName resourceGroup setResource originalName setDialogComplete validatePage
protected void ok Pressed Get new path I Path path resource Group get Container Full Path append resource Group get Resource If the user does not supply a file extension and if the save as dialog was provided a default file name append the extension of the default filename to the new name if path get File Extension null if original File null original File get File Extension null path path add File Extension original File get File Extension else if original Name null int pos original Name last Index Of if pos 0 pos original Name length path path add File Extension original Name substring pos If the path already exists then confirm overwrite I File file Resources Plugin get Workspace get Root get File path if file exists String buttons new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL String question IDE Workbench Messages format Save As Dialog overwrite Question NON NLS 1 new Object path toOS String Message Dialog d new Message Dialog get Shell IDE Workbench Messages get String Question NON NLS 1 null question Message Dialog QUESTION buttons 0 int overwrite d open switch overwrite case 0 Yes break case 1 No return case 2 Cancel default cancel Pressed return Store path and close result path close  okPressed IPath resourceGroup getContainerFullPath resourceGroup getResource getFileExtension originalFile originalFile getFileExtension addFileExtension originalFile getFileExtension originalName originalName lastIndexOf originalName addFileExtension originalName IFile ResourcesPlugin getWorkspace getRoot getFile IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL IDEWorkbenchMessages SaveAsDialog overwriteQuestion toOSString MessageDialog MessageDialog getShell IDEWorkbenchMessages getString MessageDialog cancelPressed
Sets the completion state of this dialog and adjusts the enable state of the Ok button accordingly param value code true code if this dialog is compelete and code false code otherwise protected void set Dialog Complete boolean value ok Button set Enabled value  setDialogComplete okButton setEnabled
Sets the original file to use param original File the original file public void set Original File I File original File this original File original File  originalFile setOriginalFile IFile originalFile originalFile originalFile
Set the original file name to use Used instead of code set Original File code when the original resource is not an I File Must be called before code create code param original Name default file name public void set Original Name String original Name this original Name original Name  setOriginalFile IFile originalName setOriginalName originalName originalName originalName
Returns whether this page s visual components all contain valid values return code true code if valid and code false code otherwise private boolean validate Page set Error Message null if resource Group are All Values Valid if resource Group get Resource equals if blank name then fail silently NON NLS 1 set Error Message resource Group get Problem Message return false return true  validatePage setErrorMessage resourceGroup areAllValuesValid resourceGroup getResource setErrorMessage resourceGroup getProblemMessage

get String Selection Dialog deselect Label NON NLS 1 Creates a dialog instance Note that the dialog will have no visual representation no widgets until it is told to open param parent Shell the parent shell protected Selection Dialog Shell parent Shell super parent Shell  getString SelectionDialog deselectLabel parentShell SelectionDialog parentShell parentShell
protected void configure Shell Shell shell super configure Shell shell if title null shell set Text title  configureShell configureShell setText
protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
Creates the message area for this dialog p This method is provided to allow subclasses to decide where the message will appear on the screen p param composite the parent composite return the message label protected Label create Message Area Composite composite Label label new Label composite SWT NONE if message null label set Text message label set Font composite get Font return label  createMessageArea setText setFont getFont
Returns the initial selection in this selection dialog deprecated use get Initial Element Selections instead return the list of initial selected elements or null protected List get Initial Selections if initial Selections is Empty return null else return get Initial Element Selections  getInitialElementSelections getInitialSelections initialSelections isEmpty getInitialElementSelections
Returns the list of initial element selections return List protected List get Initial Element Selections return initial Selections  getInitialElementSelections initialSelections
Returns the message for this dialog return the message for this dialog protected String get Message return message  getMessage
Returns the ok button return the ok button or code null code if the button is not created yet public Button get Ok Button return get Button I Dialog Constants OK ID  getOkButton getButton IDialogConstants OK_ID
Returns the list of selections made by the user or code null code if the selection was canceled return the array of selected elements or code null code if Cancel was pressed public Object get Result return result  getResult
Sets the initial selection in this selection dialog to the given elements param selected Elements the array of elements to select public void set Initial Selections Object selected Elements initial Selections new Array List selected Elements length for int i 0 i selected Elements length i initial Selections add selected Elements i  selectedElements setInitialSelections selectedElements initialSelections ArrayList selectedElements selectedElements initialSelections selectedElements
Sets the initial selection in this selection dialog to the given elements param selected Elements the List of elements to select public void set Initial Element Selections List selected Elements initial Selections selected Elements  selectedElements setInitialElementSelections selectedElements initialSelections selectedElements
Sets the message for this dialog param message the message public void set Message String message this message message  setMessage
Set the selections made by the user or code null code if the selection was canceled param new Result list of selected elements or code null code if Cancel was pressed protected void set Result List new Result if new Result null result null else result new Object new Result size new Result to Array result  newResult setResult newResult newResult newResult newResult toArray
Set the selections made by the user or code null code if the selection was canceled p The selections may accessed using code get Result code p param new Result the new values since 2 0 protected void set Selection Result Object new Result result new Result  getResult newResult setSelectionResult newResult newResult
Sets the title for this dialog param title the title public void set Title String title this title title  setTitle

Creates an instance of a code Selection Status Dialog code param parent public Selection Status Dialog Shell parent super parent  SelectionStatusDialog SelectionStatusDialog
Controls whether status line appears to the left of the buttons default or above them param above Buttons if code true code status line is placed above buttons if code false code to the right public void set Status Line Above Buttons boolean above Buttons f Status Line Above Buttons above Buttons  aboveButtons setStatusLineAboveButtons aboveButtons fStatusLineAboveButtons aboveButtons
Sets the image for this dialog param image the image public void set Image Image image f Image image  setImage fImage
Returns the first element from the list of results Returns code null code if no element has been selected return the first result element if one exists Otherwise code null code is returned public Object get First Result Object result get Result if result null result length 0 return null return result 0  getFirstResult getResult
Sets a result element at the given position param position param element protected void set Result int position Object element Object result get Result result position element set Result Arrays as List result  setResult getResult setResult asList
Compute the result and return it protected abstract void compute Result  computeResult
protected void configure Shell Shell shell super configure Shell shell if f Image null shell set Image f Image  configureShell configureShell fImage setImage fImage
Update the dialog s status line to reflect the given status It is safe to call this method before the dialog has been opened param status protected void update Status I Status status f Last Status status if f Status Line null f Status Line is Disposed update Buttons Enable State status f Status Line set Error Status status  updateStatus IStatus fLastStatus fStatusLine fStatusLine isDisposed updateButtonsEnableState fStatusLine setErrorStatus
Update the status of the ok button to reflect the given status Subclasses may override this method to update additional buttons param status protected void update Buttons Enable State I Status status Button ok Button get Ok Button if ok Button null ok Button is Disposed ok Button set Enabled status matches I Status ERROR  updateButtonsEnableState IStatus okButton getOkButton okButton okButton isDisposed okButton setEnabled IStatus
see Dialog ok Pressed protected void ok Pressed compute Result super ok Pressed  okPressed okPressed computeResult okPressed
public void create super create if f Last Status null update Status f Last Status  fLastStatus updateStatus fLastStatus
protected Control create Button Bar Composite parent Font font parent get Font Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout if f Status Line Above Buttons layout margin Width 5 else layout num Columns 2 layout margin Height 0 layout margin Width 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL composite set Font font f Status Line new Message Line composite f Status Line set Alignment SWT LEFT f Status Line set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Status Line set Error Status null NON NLS 1 f Status Line set Font font Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Indent convert Width In Chars To Pixels 1 f Status Line set Layout Data gd super create Button Bar composite return composite  createButtonBar getFont GridLayout GridLayout fStatusLineAboveButtons marginWidth numColumns marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_HORIZONTAL setFont fStatusLine MessageLine fStatusLine setAlignment fStatusLine setLayoutData GridData GridData FILL_HORIZONTAL fStatusLine setErrorStatus fStatusLine setFont GridData GridData GridData FILL_HORIZONTAL horizontalIndent convertWidthInCharsToPixels fStatusLine setLayoutData createButtonBar

private boolean f Ignore Case String Comparator boolean ignore Case f Ignore Case ignore Case  fIgnoreCase StringComparator ignoreCase fIgnoreCase ignoreCase
public int compare Object left Object right return f Ignore Case String left compare To Ignore Case String right String left compare To String right  fIgnoreCase compareToIgnoreCase compareTo
Creates a sorter with default string comparator The keys are assumed to be strings param ignore Case specifies whether sorting is case sensitive or not public Two Array Quick Sorter boolean ignore Case f Comparator new String Comparator ignore Case  ignoreCase TwoArrayQuickSorter ignoreCase fComparator StringComparator ignoreCase
Creates a sorter with a comparator param comparator the comparator to order the elements The comparator must not be code null code public Two Array Quick Sorter Comparator comparator f Comparator comparator  TwoArrayQuickSorter fComparator
Sorts keys and values in parallel param keys the keys to use for sorting param values the values associated with the keys public void sort Object keys Object values if keys null values null Assert is True false Either keys or values in null NON NLS 1 return if keys length 1 return internal Sort keys values 0 keys length 1  isTrue internalSort
private void internal Sort Object keys Object values int left int right int original left left int original right right Object mid keys left right 2 do while f Comparator compare keys left mid 0 left while f Comparator compare mid keys right 0 right if left right swap keys left right swap values left right left right while left right if original left right internal Sort keys values original left right if left original right internal Sort keys values left original right  internalSort original_left original_right fComparator fComparator original_left internalSort original_left original_right internalSort original_right
private static final void swap Object x int a int b Object t x a x a x b x b t 

private Object f Qualifier Elements Creates the two pane element selector param parent the parent shell param element Renderer the element renderer param qualifier Renderer the qualifier renderer public Two Pane Element Selector Shell parent I Label Provider element Renderer I Label Provider qualifier Renderer super parent element Renderer set Size 50 15 set Allow Duplicates false f Qualifier Renderer qualifier Renderer  fQualifierElements elementRenderer qualifierRenderer TwoPaneElementSelector ILabelProvider elementRenderer ILabelProvider qualifierRenderer elementRenderer setSize setAllowDuplicates fQualifierRenderer qualifierRenderer
Sets the upper list label If the label is code null code default no label is created param label public void set Upper List Label String label f Upper List Label label  setUpperListLabel fUpperListLabel
Sets the lower list label param label String or code null code If the label is code null code default no label is created public void set Lower List Label String label f Lower List Label label  setLowerListLabel fLowerListLabel
Sets the elements to be displayed param elements the elements to be displayed public void set Elements Object elements f Elements elements  setElements fElements
public Control create Dialog Area Composite parent Composite contents Composite super create Dialog Area parent create Message Area contents create Filter Text contents create Label contents f Upper List Label create Filtered List contents create Label contents f Lower List Label create Lower List contents set List Elements f Elements List initial Selections get Initial Element Selections if initial Selections is Empty Object element initial Selections get 0 set Selection new Object element set Lower Selected Element element return contents  createDialogArea createDialogArea createMessageArea createFilterText createLabel fUpperListLabel createFilteredList createLabel fLowerListLabel createLowerList setListElements fElements initialSelections getInitialElementSelections initialSelections isEmpty initialSelections setSelection setLowerSelectedElement
Creates a label if name was not code null code param parent the parent composite param name the name of the label return returns a label if a name was given code null code otherwise protected Label create Label Composite parent String name if name null return null Label label new Label parent SWT NONE label set Text name label set Font parent get Font return label  createLabel setText setFont getFont
Table list new Table parent SWT BORDER SWT V SCROLL SWT H SCROLL list add Listener SWT Selection new Listener public void handle Event Event evt handle Lower Selection Changed  V_SCROLL H_SCROLL addListener handleEvent handleLowerSelectionChanged
list add Listener SWT Mouse Double Click new Listener public void handle Event Event evt handle Default Selected  addListener MouseDoubleClick handleEvent handleDefaultSelected
list add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e f Qualifier Renderer dispose  addDisposeListener DisposeListener widgetDisposed DisposeEvent fQualifierRenderer
Creates the list widget and sets layout data param parent the parent composite return returns the list table widget protected Table create Lower List Composite parent Table list new Table parent SWT BORDER SWT V SCROLL SWT H SCROLL list add Listener SWT Selection new Listener public void handle Event Event evt handle Lower Selection Changed list add Listener SWT Mouse Double Click new Listener public void handle Event Event evt handle Default Selected list add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e f Qualifier Renderer dispose Grid Data data new Grid Data data width Hint convert Width In Chars To Pixels 50 data height Hint convert Height In Chars To Pixels 5 data grab Excess Vertical Space true data grab Excess Horizontal Space true data horizontal Alignment Grid Data FILL data vertical Alignment Grid Data FILL list set Layout Data data list set Font parent get Font f Lower List list return list  createLowerList V_SCROLL H_SCROLL addListener handleEvent handleLowerSelectionChanged addListener MouseDoubleClick handleEvent handleDefaultSelected addDisposeListener DisposeListener widgetDisposed DisposeEvent fQualifierRenderer GridData GridData widthHint convertWidthInCharsToPixels heightHint convertHeightInCharsToPixels grabExcessVerticalSpace grabExcessHorizontalSpace horizontalAlignment GridData verticalAlignment GridData setLayoutData setFont getFont fLowerList
see Selection Status Dialog compute Result protected void compute Result Object results new Object get Lower Selected Element set Result Arrays as List results  SelectionStatusDialog computeResult computeResult getLowerSelectedElement setResult asList
see Abstract Element List Selection Dialog handle Default Selected protected void handle Default Selected if validate Current Selection get Lower Selected Element null button Pressed I Dialog Constants OK ID  AbstractElementListSelectionDialog handleDefaultSelected handleDefaultSelected validateCurrentSelection getLowerSelectedElement buttonPressed IDialogConstants OK_ID
see Abstract Element List Selection Dialog handle Selection Changed protected void handle Selection Changed handle Upper Selection Changed  AbstractElementListSelectionDialog handleSelectionChanged handleSelectionChanged handleUpperSelectionChanged
private void handle Upper Selection Changed int index get Selection Index f Lower List remove All if index 0 return f Qualifier Elements get Folded Elements index if f Qualifier Elements null update Lower List Widget new Object else update Lower List Widget f Qualifier Elements validate Current Selection  handleUpperSelectionChanged getSelectionIndex fLowerList removeAll fQualifierElements getFoldedElements fQualifierElements updateLowerListWidget updateLowerListWidget fQualifierElements validateCurrentSelection
validate Current Selection private void handle Lower Selection Changed validate Current Selection  validateCurrentSelection handleLowerSelectionChanged validateCurrentSelection
Selects an element in the lower pane param element protected void set Lower Selected Element Object element if f Qualifier Elements null return find matching index int i for i 0 i f Qualifier Elements length i if f Qualifier Elements i equals element break set selection if i f Qualifier Elements length f Lower List set Selection i  setLowerSelectedElement fQualifierElements fQualifierElements fQualifierElements fQualifierElements fLowerList setSelection
Returns the selected element from the lower pane return Object protected Object get Lower Selected Element int index f Lower List get Selection Index if index 0 return f Qualifier Elements index return null  getLowerSelectedElement fLowerList getSelectionIndex fQualifierElements
private void update Lower List Widget Object elements int length elements length String qualifiers new String length for int i 0 i length i qualifiers i f Qualifier Renderer get Text elements i Two Array Quick Sorter sorter new Two Array Quick Sorter is Case Ignored sorter sort qualifiers elements for int i 0 i length i Table Item item new Table Item f Lower List SWT NONE item set Text qualifiers i item set Image f Qualifier Renderer get Image elements i if f Lower List get Item Count 0 f Lower List set Selection 0  updateLowerListWidget fQualifierRenderer getText TwoArrayQuickSorter TwoArrayQuickSorter isCaseIgnored TableItem TableItem fLowerList setText setImage fQualifierRenderer getImage fLowerList getItemCount fLowerList setSelection
see Abstract Element List Selection Dialog handle Empty List protected void handle Empty List super handle Empty List f Lower List set Enabled false  AbstractElementListSelectionDialog handleEmptyList handleEmptyList handleEmptyList fLowerList setEnabled

Creates a type filtering dialog using the supplied entries Set the initial selections to those whose extensions match the preselections param parent Shell The shell to parent the dialog from param preselections of String a Collection of String to define the preselected types public Type Filtering Dialog Shell parent Shell Collection preselections super parent Shell set Title Workbench Messages get String Types Filtering title NON NLS 1 this initial Selections preselections set Message Workbench Messages get String Types Filtering message NON NLS 1  parentShell TypeFilteringDialog parentShell parentShell setTitle WorkbenchMessages getString TypesFiltering initialSelections setMessage WorkbenchMessages getString TypesFiltering
Creates a type filtering dialog using the supplied entries Set the initial selections to those whose extensions match the preselections param parent Shell The shell to parent the dialog from param preselections of String a Collection of String to define the preselected types param filter Text the title of the text entry field for other extensions public Type Filtering Dialog Shell parent Shell Collection preselections String filter Text this parent Shell preselections this filter Title filter Text  parentShell filterText TypeFilteringDialog parentShell filterText parentShell filterTitle filterText
get String Wizard Transfer Page select All false NON NLS 1 Selection Listener listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked true  getString WizardTransferPage selectAll SelectionListener SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked
get String Wizard Transfer Page deselect All false NON NLS 1 listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked false  getString WizardTransferPage deselectAll SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked
Add the selection and deselection buttons to the dialog param composite org eclipse swt widgets Composite private void add Selection Buttons Composite composite Composite button Composite new Composite composite SWT RIGHT Grid Layout layout new Grid Layout layout num Columns 2 button Composite set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data GRAB HORIZONTAL data grab Excess Horizontal Space true composite set Data data Button select Button create Button button Composite I Dialog Constants SELECT ALL ID Workbench Messages get String Wizard Transfer Page select All false NON NLS 1 Selection Listener listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked true select Button add Selection Listener listener Button deselect Button create Button button Composite I Dialog Constants DESELECT ALL ID Workbench Messages get String Wizard Transfer Page deselect All false NON NLS 1 listener new Selection Adapter public void widget Selected Selection Event e list Viewer set All Checked false deselect Button add Selection Listener listener  addSelectionButtons buttonComposite GridLayout GridLayout numColumns buttonComposite setLayout GridData GridData GridData HORIZONTAL_ALIGN_END GridData GRAB_HORIZONTAL grabExcessHorizontalSpace setData selectButton createButton buttonComposite IDialogConstants SELECT_ALL_ID WorkbenchMessages getString WizardTransferPage selectAll SelectionListener SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked selectButton addSelectionListener deselectButton createButton buttonComposite IDialogConstants DESELECT_ALL_ID WorkbenchMessages getString WizardTransferPage deselectAll SelectionAdapter widgetSelected SelectionEvent listViewer setAllChecked deselectButton addSelectionListener
Add the currently specified extensions to result param result private void add User Defined Entries List result String Tokenizer tokenizer new String Tokenizer user Defined Text get Text TYPE DELIMITER Allow the and prefix and strip out the extension while tokenizer has More Tokens String current Extension tokenizer next Token trim if current Extension equals NON NLS 1 if current Extension starts With NON NLS 1 result add current Extension substring 2 else if current Extension starts With NON NLS 1 result add current Extension substring 1 else result add current Extension  addUserDefinedEntries StringTokenizer StringTokenizer userDefinedText getText TYPE_DELIMITER hasMoreTokens currentExtension nextToken currentExtension currentExtension startsWith currentExtension currentExtension startsWith currentExtension currentExtension
Visually checks the previously specified elements in this dialog s list viewer private void check Initial Selections I File Editor Mapping editor Mappings PlatformUI get Workbench get Editor Registry get File Editor Mappings Array List selected Mappings new Array List for int i 0 i editor Mappings length i I File Editor Mapping mapping editor Mappings i Check for both extension and label matches if this initial Selections contains mapping get Extension list Viewer set Checked mapping true selected Mappings add mapping get Extension else if this initial Selections contains mapping get Label list Viewer set Checked mapping true selected Mappings add mapping get Label Now add in the ones not selected to the user defined list Iterator initial Iterator this initial Selections iterator String Buffer entries new String Buffer while initial Iterator has Next String next Extension String initial Iterator next if selected Mappings contains next Extension entries append next Extension Only add a comma if we are not at the end if initial Iterator has Next entries append this user Defined Text set Text entries to String  checkInitialSelections IFileEditorMapping editorMappings getWorkbench getEditorRegistry getFileEditorMappings ArrayList selectedMappings ArrayList editorMappings IFileEditorMapping editorMappings initialSelections getExtension listViewer setChecked selectedMappings getExtension initialSelections getLabel listViewer setChecked selectedMappings getLabel initialIterator initialSelections StringBuffer StringBuffer initialIterator hasNext nextExtension initialIterator selectedMappings nextExtension nextExtension initialIterator hasNext userDefinedText setText toString
see org eclipse jface window Window configure Shell org eclipse swt widgets Shell protected void configure Shell Shell shell super configure Shell shell Workbench Help set Help shell I Help Context Ids TYPE FILTERING DIALOG  configureShell configureShell configureShell WorkbenchHelp setHelp IHelpContextIds TYPE_FILTERING_DIALOG
protected Control create Dialog Area Composite parent page group Composite composite Composite super create Dialog Area parent create Message Area composite list Viewer Checkbox Table Viewer new Check List composite SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data height Hint SIZING SELECTION WIDGET HEIGHT data width Hint SIZING SELECTION WIDGET WIDTH list Viewer get Table set Layout Data data list Viewer get Table set Font parent get Font list Viewer set Label Provider File Editor Mapping Label Provider INSTANCE list Viewer set Content Provider File Editor Mapping Content Provider INSTANCE add Selection Buttons composite create User Entry Group composite initialize Viewer initialize page if this initial Selections null this initial Selections is Empty check Initial Selections return composite  createDialogArea createDialogArea createMessageArea listViewer CheckboxTableViewer newCheckList GridData GridData GridData FILL_BOTH heightHint SIZING_SELECTION_WIDGET_HEIGHT widthHint SIZING_SELECTION_WIDGET_WIDTH listViewer getTable setLayoutData listViewer getTable setFont getFont listViewer setLabelProvider FileEditorMappingLabelProvider listViewer setContentProvider FileEditorMappingContentProvider addSelectionButtons createUserEntryGroup initializeViewer initialSelections initialSelections isEmpty checkInitialSelections
Create the group that shows the user defined entries for the dialog param parent the parent this is being created in private void create User Entry Group Composite parent Font font parent get Font destination specification group Composite user Defined Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 user Defined Group set Layout layout user Defined Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN FILL Label f Title new Label user Defined Group SWT NONE f Title set Font font f Title set Text filter Title NON NLS 1 user defined entry field user Defined Text new Text user Defined Group SWT SINGLE SWT BORDER user Defined Text set Font font Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL user Defined Text set Layout Data data  createUserEntryGroup getFont userDefinedGroup GridLayout GridLayout numColumns userDefinedGroup setLayout userDefinedGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_FILL fTitle userDefinedGroup fTitle setFont fTitle setText filterTitle userDefinedText userDefinedGroup userDefinedText setFont GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL userDefinedText setLayoutData
Return the input to the dialog return I File Editor Mapping private I File Editor Mapping get Input Filter the mappings to be just those with a wildcard extension if current Input null List wildcard Editors new Array List I File Editor Mapping all Mappings PlatformUI get Workbench get Editor Registry get File Editor Mappings for int i 0 i all Mappings length i if all Mappings i get Name equals NON NLS 1 wildcard Editors add all Mappings i current Input new I File Editor Mapping wildcard Editors size wildcard Editors to Array current Input return current Input  IFileEditorMapping IFileEditorMapping getInput currentInput wildcardEditors ArrayList IFileEditorMapping allMappings getWorkbench getEditorRegistry getFileEditorMappings allMappings allMappings getName wildcardEditors allMappings currentInput IFileEditorMapping wildcardEditors wildcardEditors toArray currentInput currentInput
Initializes this dialog s viewer after it has been laid out private void initialize Viewer list Viewer set Input get Input  initializeViewer listViewer setInput getInput
The code Type Filtering Dialog code implementation of this code Dialog code method builds a list of the selected elements for later retrieval by the client and closes this dialog protected void ok Pressed Get the input children I File Editor Mapping children get Input List list new Array List Build a list of selected children for int i 0 i children length i I File Editor Mapping element children i if list Viewer get Checked element list add element get Extension add User Defined Entries list set Result list super ok Pressed  TypeFilteringDialog okPressed IFileEditorMapping getInput ArrayList IFileEditorMapping listViewer getChecked getExtension addUserDefinedEntries setResult okPressed

protected static final int COMBO HISTORY LENGTH 5 Creates a new wizard page param page Name the name of the page protected Wizard Data Transfer Page String page Name super page Name  COMBO_HISTORY_LENGTH pageName WizardDataTransferPage pageName pageName
Adds an entry to a history while taking care of duplicate history items and excessively long histories The assumption is made that all histories should be of length code Wizard Data Transfer Page COMBO HISTORY LENGTH code param history the current history param new Entry the entry to add to the history protected String add To History String history String new Entry java util Array List l new java util Array List Arrays as List history add To History l new Entry String r new String l size l to Array r return r  WizardDataTransferPage COMBO_HISTORY_LENGTH newEntry addToHistory newEntry ArrayList ArrayList asList addToHistory newEntry toArray
Adds an entry to a history while taking care of duplicate history items and excessively long histories The assumption is made that all histories should be of length code Wizard Data Transfer Page COMBO HISTORY LENGTH code param history the current history param new Entry the entry to add to the history protected void add To History List history String new Entry history remove new Entry history add 0 new Entry since only one new item was added we can be over the limit by at most one item if history size COMBO HISTORY LENGTH history remove COMBO HISTORY LENGTH  WizardDataTransferPage COMBO_HISTORY_LENGTH newEntry addToHistory newEntry newEntry newEntry COMBO_HISTORY_LENGTH COMBO_HISTORY_LENGTH
Return whether the user is allowed to enter a new container name or just choose from existing ones p Subclasses must implement this method p return code true code if new ones are okay and code false code if only existing ones are allowed 
protected abstract boolean allow New Container Name Creates a new label with a bold font param parent the parent control param text the label text return the new label control protected Label create Bold Label Composite parent String text Label label new Label parent SWT NONE label set Font J Face Resources get Banner Font label set Text text Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL label set Layout Data data return label  allowNewContainerName createBoldLabel setFont JFaceResources getBannerFont setText GridData GridData verticalAlignment GridData horizontalAlignment GridData setLayoutData
Creates the import export options group controls p The code Wizard Data Transfer Page code implementation of this method does nothing Subclasses wishing to define such components should reimplement this hook method p param options Group the parent control protected void create Options Group Buttons Group options Group  WizardDataTransferPage optionsGroup createOptionsGroupButtons optionsGroup
Creates a new label with a bold font param parent the parent control param text the label text return the new label control protected Label create Plain Label Composite parent String text Label label new Label parent SWT NONE label set Text text label set Font parent get Font Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL label set Layout Data data return label  createPlainLabel setText setFont getFont GridData GridData verticalAlignment GridData horizontalAlignment GridData setLayoutData
Creates a horizontal spacer line that fills the width of its container param parent the parent control protected void create Spacer Composite parent Label spacer new Label parent SWT NONE Grid Data data new Grid Data data horizontal Alignment Grid Data FILL data vertical Alignment Grid Data BEGINNING spacer set Layout Data data  createSpacer GridData GridData horizontalAlignment GridData verticalAlignment GridData setLayoutData
Returns whether this page is complete This determination is made based upon the current contents of this page s controls Subclasses wishing to include their controls in this determination should override the hook methods code validate Source Group code and or code validate Options Group code return code true code if this page is complete and code false code if incomplete see validate Source Group see validate Options Group protected boolean determine Page Completion boolean complete validate Source Group validate Destination Group validate Options Group Avoid draw flicker by not clearing the error message unless all is valid if complete set Error Message null return complete  validateSourceGroup validateOptionsGroup validateSourceGroup validateOptionsGroup determinePageCompletion validateSourceGroup validateDestinationGroup validateOptionsGroup setErrorMessage
Get a path from the supplied text widget return org eclipse core runtime I Path protected I Path get Path From Text Text text Field String text text Field get Text Do not make an empty path absolute so as not to confuse with the root if text length 0 return new Path text else return new Path text make Absolute  IPath IPath getPathFromText textField textField getText makeAbsolute
Queries the user to supply a container resource return the path to an existing or new container or code null code if the user cancelled the dialog protected I Path query For Container I Container initial Selection String msg return query For Container initial Selection msg null  IPath queryForContainer IContainer initialSelection queryForContainer initialSelection
Queries the user to supply a container resource return the path to an existing or new container or code null code if the user cancelled the dialog protected I Path query For Container I Container initial Selection String msg String title Container Selection Dialog dialog new Container Selection Dialog get Control get Shell initial Selection allow New Container Name msg if title null dialog set Title title dialog show Closed Projects false dialog open Object result dialog get Result if result null result length 1 return I Path result 0 return null  IPath queryForContainer IContainer initialSelection ContainerSelectionDialog ContainerSelectionDialog getControl getShell initialSelection allowNewContainerName setTitle showClosedProjects getResult IPath
which is probably not running in the UI thread get Control get Display sync Exec new Runnable public void run dialog open  getControl getDisplay syncExec
The code Wizard Data Transfer code implementation of this code I Overwrite Query code method asks the user whether the existing resource at the given path should be overwritten param path String return the user s reply one of code YES code code NO code code ALL code or code CANCEL code public String query Overwrite String path String Path path new Path path String String message String Break the message up if there is a file name and a directory and there are at least 2 segments if path get File Extension null path segment Count 2 message String IDE Workbench Messages format Wizard Data Transfer exists Question NON NLS 1 new String path String else message String IDE Workbench Messages format Wizard Data Transfer overwrite Name And Path Question NON NLS 1 new String path last Segment path remove Last Segments 1 toOS String final Message Dialog dialog new Message Dialog get Container get Shell IDE Workbench Messages get String Question NON NLS 1 null message String Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants YES TO ALL LABEL I Dialog Constants NO LABEL I Dialog Constants NO TO ALL LABEL I Dialog Constants CANCEL LABEL 0 String response new String YES ALL NO NO ALL CANCEL run in sync Exec because callback is from an operation which is probably not running in the UI thread get Control get Display sync Exec new Runnable public void run dialog open return dialog get Return Code 0 CANCEL response dialog get Return Code  WizardDataTransfer IOverwriteQuery pathString queryOverwrite pathString pathString messageString getFileExtension segmentCount messageString IDEWorkbenchMessages WizardDataTransfer existsQuestion pathString messageString IDEWorkbenchMessages WizardDataTransfer overwriteNameAndPathQuestion lastSegment removeLastSegments toOSString MessageDialog MessageDialog getContainer getShell IDEWorkbenchMessages getString messageString MessageDialog IDialogConstants YES_LABEL IDialogConstants YES_TO_ALL_LABEL IDialogConstants NO_LABEL IDialogConstants NO_TO_ALL_LABEL IDialogConstants CANCEL_LABEL NO_ALL syncExec getControl getDisplay syncExec getReturnCode getReturnCode
Displays a Yes No question to the user with the specified message and returns the user s response param message the question to ask return code true code for Yes and code false code for No protected boolean query Yes No Question String message Message Dialog dialog new Message Dialog get Container get Shell IDE Workbench Messages get String Question NON NLS 1 Image null message Message Dialog NONE new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL 0 ensure yes is the default return dialog open 0  queryYesNoQuestion MessageDialog MessageDialog getContainer getShell IDEWorkbenchMessages getString MessageDialog IDialogConstants YES_LABEL IDialogConstants NO_LABEL
Restores control settings that were saved in the previous instance of this page p The code Wizard Data Transfer Page code implementation of this method does nothing Subclasses may override this hook method p protected void restore Widget Values  WizardDataTransferPage restoreWidgetValues
Saves control settings that are to be restored in the next instance of this page p The code Wizard Data Transfer Page code implementation of this method does nothing Subclasses may override this hook method p protected void save Widget Values  WizardDataTransferPage saveWidgetValues
Determine if the page is complete and update the page appropriately protected void update Page Completion boolean page Complete determine Page Completion set Page Complete page Complete if page Complete set Message null  updatePageCompletion pageComplete determinePageCompletion setPageComplete pageComplete pageComplete setMessage
Updates the enable state of this page s controls p The code Wizard Data Transfer Page code implementation of this method does nothing Subclasses may extend this hook method p protected void update Widget Enablements  WizardDataTransferPage updateWidgetEnablements
Returns whether this page s destination specification controls currently all contain valid values p The code Wizard Data Transfer Page code implementation of this method returns code true code Subclasses may reimplement this hook method p return code true code indicating validity of all controls in the destination specification group protected boolean validate Destination Group return true  WizardDataTransferPage validateDestinationGroup
Returns whether this page s options group s controls currently all contain valid values p The code Wizard Data Transfer Page code implementation of this method returns code true code Subclasses may reimplement this hook method p return code true code indicating validity of all controls in the options group protected boolean validate Options Group return true  WizardDataTransferPage validateOptionsGroup
Returns whether this page s source specification controls currently all contain valid values p The code Wizard Data Transfer Page code implementation of this method returns code true code Subclasses may reimplement this hook method p return code true code indicating validity of all controls in the source specification group protected boolean validate Source Group return true  WizardDataTransferPage validateSourceGroup
Create the options specification widgets param parent org eclipse swt widgets Composite protected void create Options Group Composite parent options group Group options Group new Group parent SWT NONE Grid Layout layout new Grid Layout options Group set Layout layout options Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL options Group set Text IDE Workbench Messages get String Wizard Export Page options NON NLS 1 options Group set Font parent get Font create Options Group Buttons options Group  createOptionsGroup optionsGroup GridLayout GridLayout optionsGroup setLayout optionsGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL optionsGroup setText IDEWorkbenchMessages getString WizardExportPage optionsGroup setFont getFont createOptionsGroupButtons optionsGroup
Display an error dialog with the specified message param message the error message protected void display Error Dialog String message Message Dialog open Error get Container get Shell get Error Dialog Title message NON NLS 1  displayErrorDialog MessageDialog openError getContainer getShell getErrorDialogTitle
Display an error dislog with the information from the supplied exception param exception Throwable protected void display Error Dialog Throwable exception String message exception get Message Some system exceptions have no message if message null message IDE Workbench Messages format Wizard Data Transfer exception Message NON NLS 1 new String exception to String display Error Dialog message  displayErrorDialog getMessage IDEWorkbenchMessages WizardDataTransfer exceptionMessage toString displayErrorDialog
Get the title for an error dialog Subclasses should override protected String get Error Dialog Title return IDE Workbench Messages get String Wizard Export Page internal Error Title NON NLS 1  getErrorDialogTitle IDEWorkbenchMessages getString WizardExportPage internalErrorTitle

private static final StringSTORE EXPORT ALL RESOURCES ID Wizard File System Export Page1 STORE EXPORT ALL RESOURCES ID NON NLS 1 Creates an export wizard page If the current resource selection is not empty then it will be used as the initial collection of resources selected for export param page Name the name of the page param selection the current resource selection protected Wizard Export Page String page Name I Structured Selection selection super page Name this current Resource Selection selection  StringSTORE_EXPORT_ALL_RESOURCES_ID WizardFileSystemExportPage1 STORE_EXPORT_ALL_RESOURCES_ID pageName WizardExportPage pageName IStructuredSelection pageName currentResourceSelection
The code Wizard Export Page code implementation of this code Wizard Data Transfer Page code method returns code false code Subclasses may override this method protected boolean allow New Container Name return false  WizardExportPage WizardDataTransferPage allowNewContainerName
non Javadoc Method declared on I Dialog Page public void create Control Composite parent Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL create Bold Label composite IDE Workbench Messages get String Wizard Export Page what Label NON NLS 1 create Source Group composite create Spacer composite create Bold Label composite IDE Workbench Messages get String Wizard Export Page where Label NON NLS 1 create Destination Group composite create Spacer composite create Bold Label composite IDE Workbench Messages get String Wizard Export Page options NON NLS 1 create Options Group composite restore Resource Specification Widget Values ie local restore Widget Values ie subclass hook if current Resource Selection null setup Based On Initial Selections update Widget Enablements set Page Complete determine Page Completion set Control composite  IDialogPage createControl setLayout GridLayout setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL createBoldLabel IDEWorkbenchMessages getString WizardExportPage whatLabel createSourceGroup createSpacer createBoldLabel IDEWorkbenchMessages getString WizardExportPage whereLabel createDestinationGroup createSpacer createBoldLabel IDEWorkbenchMessages getString WizardExportPage createOptionsGroup restoreResourceSpecificationWidgetValues restoreWidgetValues currentResourceSelection setupBasedOnInitialSelections updateWidgetEnablements setPageComplete determinePageCompletion setControl
Creates the export destination specification visual components p Subclasses must implement this method p param parent the parent control 
protected abstract void create Destination Group Composite parent Creates the export source resource specification controls param parent the parent control protected final void create Source Group Composite parent top level group Composite source Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 source Group set Layout layout source Group set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL resource label new Label source Group SWT NONE set Text IDE Workbench Messages get String Wizard Export Page folder NON NLS 1 resource name entry field resource Name Field new Text source Group SWT SINGLE SWT BORDER resource Name Field add Listener SWT Key Down this Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH resource Name Field set Layout Data data resource browse button resource Browse Button new Button source Group SWT PUSH resource Browse Button set Text IDE Workbench Messages get String Wizard Export Page browse NON NLS 1 resource Browse Button add Listener SWT Selection this resource Browse Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL export all types radio export All Types Radio new Button source Group SWT RADIO export All Types Radio set Text IDE Workbench Messages get String Wizard Export Page all Types NON NLS 1 export All Types Radio add Listener SWT Selection this data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data horizontal Span 3 export All Types Radio set Layout Data data export specific types radio export Specified Types Radio new Button source Group SWT RADIO export Specified Types Radio set Text IDE Workbench Messages get String Wizard Export Page specific Types NON NLS 1 export Specified Types Radio add Listener SWT Selection this types combo types To Export Field new Combo source Group SWT NONE data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH types To Export Field set Layout Data data types To Export Field add Listener SWT Modify this types edit button types To Export Edit Button new Button source Group SWT PUSH types To Export Edit Button set Text IDE Workbench Messages get String Wizard Export Page edit NON NLS 1 types To Export Edit Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Grid Data VERTICAL ALIGN END types To Export Edit Button add Listener SWT Selection this details button resource Details Button new Button source Group SWT PUSH resource Details Button set Text IDE Workbench Messages get String Wizard Export Page details NON NLS 1 resource Details Button add Listener SWT Selection this details label resource Details Description new Label source Group SWT NONE data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data horizontal Span 2 resource Details Description set Layout Data data initial setup reset Selected Resources export All Types Radio set Selection initial Export All Types Value export Specified Types Radio set Selection initial Export All Types Value types To Export Field set Enabled initial Export All Types Value types To Export Edit Button set Enabled initial Export All Types Value if initial Export Field Value null resource Name Field set Text initial Export Field Value if initial Types Field Value null types To Export Field set Text initial Types Field Value  createDestinationGroup createSourceGroup sourceGroup GridLayout GridLayout numColumns sourceGroup setLayout sourceGroup setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL sourceGroup setText IDEWorkbenchMessages getString WizardExportPage resourceNameField sourceGroup resourceNameField addListener KeyDown GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH resourceNameField setLayoutData resourceBrowseButton sourceGroup resourceBrowseButton setText IDEWorkbenchMessages getString WizardExportPage resourceBrowseButton addListener resourceBrowseButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL exportAllTypesRadio sourceGroup exportAllTypesRadio setText IDEWorkbenchMessages getString WizardExportPage allTypes exportAllTypesRadio addListener GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL horizontalSpan exportAllTypesRadio setLayoutData exportSpecifiedTypesRadio sourceGroup exportSpecifiedTypesRadio setText IDEWorkbenchMessages getString WizardExportPage specificTypes exportSpecifiedTypesRadio addListener typesToExportField sourceGroup GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH typesToExportField setLayoutData typesToExportField addListener typesToExportEditButton sourceGroup typesToExportEditButton setText IDEWorkbenchMessages getString WizardExportPage typesToExportEditButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridData VERTICAL_ALIGN_END typesToExportEditButton addListener resourceDetailsButton sourceGroup resourceDetailsButton setText IDEWorkbenchMessages getString WizardExportPage resourceDetailsButton addListener resourceDetailsDescription sourceGroup GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL horizontalSpan resourceDetailsDescription setLayoutData resetSelectedResources exportAllTypesRadio setSelection initialExportAllTypesValue exportSpecifiedTypesRadio setSelection initialExportAllTypesValue typesToExportField setEnabled initialExportAllTypesValue typesToExportEditButton setEnabled initialExportAllTypesValue initialExportFieldValue resourceNameField setText initialExportFieldValue initialTypesFieldValue typesToExportField setText initialTypesFieldValue
Display an error dialog with the specified message param message the error message protected void display Error Dialog String message Message Dialog open Error get Container get Shell IDE Workbench Messages get String Wizard Export Page error Dialog Title message NON NLS 1  displayErrorDialog MessageDialog openError getContainer getShell IDEWorkbenchMessages getString WizardExportPage errorDialogTitle
Displays a description message that indicates a selection of resources of the specified size param selected Resource Count the resource selection size to display protected void display Resources Selected Count int selected Resource Count if selected Resource Count 1 resource Details Description set Text IDE Workbench Messages get String Wizard Export Page one Resource Selected NON NLS 1 else resource Details Description set Text IDE Workbench Messages format Wizard Export Page resource Count Message new Object new Integer selected Resource Count NON NLS 1  selectedResourceCount displayResourcesSelectedCount selectedResourceCount selectedResourceCount resourceDetailsDescription setText IDEWorkbenchMessages getString WizardExportPage oneResourceSelected resourceDetailsDescription setText IDEWorkbenchMessages WizardExportPage resourceCountMessage selectedResourceCount
Obsolete method This was implemented to handle the case where ensure Local needed to be called but it doesn t use it any longer param resources the list of resources to ensure locality for return code true code for successful completion deprecated Only retained for backwards compatibility protected boolean ensure Resources Local List resources return true  ensureLocal ensureResourcesLocal
Returns a new subcollection containing only those resources which are not local param original List the original list of resources element type code I Resource code return the new list of non local resources element type code I Resource code protected List extract Non Local Resources List original List Vector result new Vector original List size Iterator resources Enum original List iterator while resources Enum has Next I Resource current Resource I Resource resources Enum next if current Resource is Local I Resource DEPTH ZERO result add Element current Resource return result  originalList IResource IResource extractNonLocalResources originalList originalList resourcesEnum originalList resourcesEnum hasNext IResource currentResource IResource resourcesEnum currentResource isLocal IResource DEPTH_ZERO addElement currentResource
Returns the current selection value of the Export all types radio or its set initial value if it does not exist yet return the Export All Types radio s current value or anticipated initial value public boolean get Export All Types Value if export All Types Radio null return initial Export All Types Value return export All Types Radio get Selection  getExportAllTypesValue exportAllTypesRadio initialExportAllTypesValue exportAllTypesRadio getSelection
Returns the current contents of the resource name entry field or its set initial value if it does not exist yet which could be code null code return the resource name field s current value or anticipated initial value or code null code public String get Resource Field Value if resource Name Field null return initial Export Field Value return resource Name Field get Text  getResourceFieldValue resourceNameField initialExportFieldValue resourceNameField getText
Return the path for the resource field return org eclipse core runtime I Path protected I Path get Resource Path return get Path From Text this resource Name Field  IPath IPath getResourcePath getPathFromText resourceNameField
Returns this page s collection of currently specified resources to be exported This is the primary resource selection facility accessor for subclasses return the collection of resources currently selected for export element type code I Resource code protected List get Selected Resources if selected Resources null I Resource source Resource get Source Resource if source Resource null select Appropriate Resources source Resource return selected Resources  IResource getSelectedResources selectedResources IResource sourceResource getSourceResource sourceResource selectAppropriateResources sourceResource selectedResources
Returns the resource object specified in the resource name entry field or code null code if such a resource does not exist in the workbench return the resource specified in the resource name entry field or code null code protected I Resource get Source Resource I Workspace workspace IDE Workbench Plugin get Plugin Workspace make the path absolute to allow for optional leading slash I Path test Path get Resource Path I Status result workspace validate Path test Path to String I Resource ROOT I Resource PROJECT I Resource FOLDER I Resource FILE if result isOK workspace get Root exists test Path return workspace get Root find Member test Path return null  IResource getSourceResource IWorkspace IDEWorkbenchPlugin getPluginWorkspace IPath testPath getResourcePath IStatus validatePath testPath toString IResource IResource IResource IResource getRoot testPath getRoot findMember testPath
Returns the current contents of the types entry field or its set initial value if it does not exist yet which could be code null code return the types entry field s current value or anticipated initial value or code null code public String get Types Field Value if types To Export Field null return initial Types Field Value return types To Export Field get Text  getTypesFieldValue typesToExportField initialTypesFieldValue typesToExportField getText
Returns the resource extensions currently specified to be exported return the resource extensions currently specified to be exported element type code String code protected List get Types To Export List result new Array List String Tokenizer tokenizer new String Tokenizer types To Export Field get Text TYPE DELIMITER while tokenizer has More Tokens String current Extension tokenizer next Token trim if current Extension equals NON NLS 1 result add current Extension return result  getTypesToExport ArrayList StringTokenizer StringTokenizer typesToExportField getText TYPE_DELIMITER hasMoreTokens currentExtension nextToken currentExtension currentExtension
The code Wizard Export Page code implementation of this code Listener code method handles all events and enablements for controls on this page Subclasses may extend public void handle Event Event event Widget source event widget if source export All Types Radio source types To Export Field source resource Name Field reset Selected Resources else if source export Specified Types Radio reset Selected Resources types To Export Field set Focus else if source resource Details Button handle Resource Details Button Pressed else if source resource Browse Button handle Resource Browse Button Pressed else if source types To Export Edit Button handle Types Edit Button Pressed set Page Complete determine Page Completion update Widget Enablements  WizardExportPage handleEvent exportAllTypesRadio typesToExportField resourceNameField resetSelectedResources exportSpecifiedTypesRadio resetSelectedResources typesToExportField setFocus resourceDetailsButton handleResourceDetailsButtonPressed resourceBrowseButton handleResourceBrowseButtonPressed typesToExportEditButton handleTypesEditButtonPressed setPageComplete determinePageCompletion updateWidgetEnablements
Opens a container selection dialog and displays the user s subsequent container selection in this page s resource name field protected void handle Resource Browse Button Pressed I Resource current Folder get Source Resource if current Folder null current Folder get Type I Resource FILE current Folder current Folder get Parent I Path container Path query For Container I Container current Folder IDE Workbench Messages get String Wizard Export Page select Resources To Export NON NLS 1 if container Path null null means user cancelled String relative Path container Path make Relative to String if relative Path to String equals resource Name Field get Text reset Selected Resources resource Name Field set Text relative Path  handleResourceBrowseButtonPressed IResource currentFolder getSourceResource currentFolder currentFolder getType IResource currentFolder currentFolder getParent IPath containerPath queryForContainer IContainer currentFolder IDEWorkbenchMessages getString WizardExportPage selectResourcesToExport containerPath relativePath containerPath makeRelative toString relativePath toString resourceNameField getText resetSelectedResources resourceNameField setText relativePath
Opens a resource selection dialog and records the user s subsequent resource selections protected void handle Resource Details Button Pressed I Adaptable source get Source Resource if source null source Resources Plugin get Workspace get Root select Appropriate Resources source if source instanceof I File source I File source get Parent set Resource To Display I Resource source Object newly Selected Resources query Individual Resources To Export source if newly Selected Resources null selected Resources Arrays as List newly Selected Resources display Resources Selected Count selected Resources size  handleResourceDetailsButtonPressed IAdaptable getSourceResource ResourcesPlugin getWorkspace getRoot selectAppropriateResources IFile IFile getParent setResourceToDisplay IResource newlySelectedResources queryIndividualResourcesToExport newlySelectedResources selectedResources asList newlySelectedResources displayResourcesSelectedCount selectedResources
Queries the user for the types of resources to be exported and displays these types in this page s Types to export field protected void handle Types Edit Button Pressed Object new Selected Types query Resource Types To Export if new Selected Types null ie did not press Cancel List result new Array List new Selected Types length for int i 0 i new Selected Types length i result add I File Editor Mapping new Selected Types i get Extension set Types To Export result  handleTypesEditButtonPressed newSelectedTypes queryResourceTypesToExport newSelectedTypes ArrayList newSelectedTypes newSelectedTypes IFileEditorMapping newSelectedTypes getExtension setTypesToExport
Returns whether the extension of the given resource name is an extension that has been specified for export by the user param resource Name the resource name return code true code if the resource name is suitable for export based upon its extension protected boolean has Exportable Extension String resource Name if selected Types null ie all extensions are acceptable return true int separator Index resource Name last Index Of NON NLS 1 if separator Index 1 return false String extension resource Name substring separator Index 1 Iterator enum selected Types iterator while enum has Next if extension equals Ignore Case String enum next return true return false  resourceName hasExportableExtension resourceName selectedTypes separatorIndex resourceName lastIndexOf separatorIndex resourceName separatorIndex selectedTypes hasNext equalsIgnoreCase
Persists additional setting that are to be restored in the next instance of this page p The code Wizard Import Page code implementation of this method does nothing Subclasses may extend to persist additional settings p protected void internal Save Widget Values  WizardImportPage internalSaveWidgetValues
Queries the user for the individual resources that are to be exported and returns these resources as a collection param root Resource the resource to use as the root of the selection query return the resources selected for export element type code I Resource code or code null code if the user canceled the selection protected Object query Individual Resources To Export I Adaptable root Resource Resource Selection Dialog dialog new Resource Selection Dialog get Container get Shell root Resource IDE Workbench Messages get String Wizard Export Page select Resources Title NON NLS 1 dialog set Initial Selections selected Resources to Array new Object selected Resources size dialog open return dialog get Result  rootResource IResource queryIndividualResourcesToExport IAdaptable rootResource ResourceSelectionDialog ResourceSelectionDialog getContainer getShell rootResource IDEWorkbenchMessages getString WizardExportPage selectResourcesTitle setInitialSelections selectedResources toArray selectedResources getResult
Queries the user for the resource types that are to be exported and returns these types as a collection return the resource types selected for export element type code String code or code null code if the user canceled the selection protected Object query Resource Types To Export I File Editor Mapping editor Mappings PlatformUI get Workbench get Editor Registry get File Editor Mappings int mappings Size editor Mappings length List selected Types get Types To Export List initial Selections new Array List selected Types size for int i 0 i mappings Size i I File Editor Mapping current Mapping editor Mappings i if selected Types contains current Mapping get Extension initial Selections add current Mapping List Selection Dialog dialog new List Selection Dialog get Container get Shell editor Mappings File Editor Mapping Content Provider INSTANCE File Editor Mapping Label Provider INSTANCE IDE Workbench Messages get String Wizard Export Page selection Dialog Message NON NLS 1 dialog set Title IDE Workbench Messages get String Wizard Export Page resource Type Dialog NON NLS 1 dialog open return dialog get Result  queryResourceTypesToExport IFileEditorMapping editorMappings getWorkbench getEditorRegistry getFileEditorMappings mappingsSize editorMappings selectedTypes getTypesToExport initialSelections ArrayList selectedTypes mappingsSize IFileEditorMapping currentMapping editorMappings selectedTypes currentMapping getExtension initialSelections currentMapping ListSelectionDialog ListSelectionDialog getContainer getShell editorMappings FileEditorMappingContentProvider FileEditorMappingLabelProvider IDEWorkbenchMessages getString WizardExportPage selectionDialogMessage setTitle IDEWorkbenchMessages getString WizardExportPage resourceTypeDialog getResult
Resets this page s selected resources collection and updates its controls accordingly protected void reset Selected Resources resource Details Description set Text IDE Workbench Messages get String Wizard Export Page details Message NON NLS 1 selected Resources null if export Current Selection export Current Selection false if resource Name Field get Text length CURRENT SELECTION length resource Name Field set Text resource Name Field get Text substring CURRENT SELECTION length else resource Name Field set Text NON NLS 1  resetSelectedResources resourceDetailsDescription setText IDEWorkbenchMessages getString WizardExportPage detailsMessage selectedResources exportCurrentSelection exportCurrentSelection resourceNameField getText CURRENT_SELECTION resourceNameField setText resourceNameField getText CURRENT_SELECTION resourceNameField setText
Restores resource specification control settings that were persisted in the previous instance of this page Subclasses wishing to restore persisted values for their controls may extend protected void restore Resource Specification Widget Values I Dialog Settings settings get Dialog Settings if settings null String page Name get Name boolean export All Resources settings get Boolean STORE EXPORT ALL RESOURCES ID page Name restore all typed radio values iff not already explicitly set if export All Resources Pre Set export All Types Radio set Selection export All Resources export Specified Types Radio set Selection export All Resources restore selected types iff not explicitly already set if initial Types Field Value null String selected Types settings get Array STORE SELECTED TYPES ID page Name if selected Types null if selected Types length 0 types To Export Field set Text selected Types 0 for int i 0 i selected Types length i types To Export Field add selected Types i  restoreResourceSpecificationWidgetValues IDialogSettings getDialogSettings pageName getName exportAllResources getBoolean STORE_EXPORT_ALL_RESOURCES_ID pageName exportAllResourcesPreSet exportAllTypesRadio setSelection exportAllResources exportSpecifiedTypesRadio setSelection exportAllResources initialTypesFieldValue selectedTypes getArray STORE_SELECTED_TYPES_ID pageName selectedTypes selectedTypes typesToExportField setText selectedTypes selectedTypes typesToExportField selectedTypes
Persists resource specification control setting that are to be restored in the next instance of this page Subclasses wishing to persist additional setting for their controls should extend hook method code internal Save Widget Values code protected void save Widget Values I Dialog Settings settings get Dialog Settings if settings null String page Name get Name update specific types to export history String selected Types Names settings get Array STORE SELECTED TYPES ID page Name if selected Types Names null selected Types Names new String 0 if export Specified Types Radio get Selection selected Types Names add To History selected Types Names types To Export Field get Text settings put STORE SELECTED TYPES ID page Name selected Types Names radio buttons settings put STORE EXPORT ALL RESOURCES ID page Name export All Types Radio get Selection allow subclasses to save values internal Save Widget Values  internalSaveWidgetValues saveWidgetValues IDialogSettings getDialogSettings pageName getName selectedTypesNames getArray STORE_SELECTED_TYPES_ID pageName selectedTypesNames selectedTypesNames exportSpecifiedTypesRadio getSelection selectedTypesNames addToHistory selectedTypesNames typesToExportField getText STORE_SELECTED_TYPES_ID pageName selectedTypesNames STORE_EXPORT_ALL_RESOURCES_ID pageName exportAllTypesRadio getSelection internalSaveWidgetValues
Records a container s recursive file descendents which have an extension that has been specified for export by the user param resource the parent container protected void select Appropriate Folder Contents I Container resource try I Resource members resource members for int i 0 i members length i if members i get Type I Resource FILE I File current File I File members i if has Exportable Extension current File get Full Path to String selected Resources add current File if members i get Type I Resource FOLDER select Appropriate Folder Contents I Container members i catch Core Exception e don t show children if there are errors should at least log this  selectAppropriateFolderContents IContainer IResource getType IResource IFile currentFile IFile hasExportableExtension currentFile getFullPath toString selectedResources currentFile getType IResource selectAppropriateFolderContents IContainer CoreException
Records a resource s recursive descendents which are appropriate for export based upon this page s current controls contents param resource the parent resource protected void select Appropriate Resources Object resource if selected Resources null if export Specified Types Radio get Selection selected Types get Types To Export else selected Types null sentinel for select all extensions selected Resources new Array List if resource instanceof I Workspace Root I Project projects I Workspace Root resource get Projects for int i 0 i projects length i select Appropriate Folder Contents projects i else if resource instanceof I File I File file I File resource if has Exportable Extension file get Full Path to String selected Resources add file else select Appropriate Folder Contents I Container resource  selectAppropriateResources selectedResources exportSpecifiedTypesRadio getSelection selectedTypes getTypesToExport selectedTypes selectedResources ArrayList IWorkspaceRoot IProject IWorkspaceRoot getProjects selectAppropriateFolderContents IFile IFile IFile hasExportableExtension getFullPath toString selectedResources selectAppropriateFolderContents IContainer
Sets the selection value of this page s Export all types radio or stores it for future use if this visual component does not exist yet param value new selection value public void set Export All Types Value boolean value if export All Types Radio null initial Export All Types Value value export All Resources Pre Set true else export All Types Radio set Selection value export Specified Types Radio set Selection value  setExportAllTypesValue exportAllTypesRadio initialExportAllTypesValue exportAllResourcesPreSet exportAllTypesRadio setSelection exportSpecifiedTypesRadio setSelection
Sets the value of this page s source resource field or stores it for future use if this visual component does not exist yet param value new value public void set Resource Field Value String value if resource Name Field null initial Export Field Value value else resource Name Field set Text value  setResourceFieldValue resourceNameField initialExportFieldValue resourceNameField setText
Set the resource whos name we will display param resource protected void set Resource To Display I Resource resource set Resource Field Value resource get Full Path make Relative to String  setResourceToDisplay IResource setResourceFieldValue getFullPath makeRelative toString
Sets the value of this page s Types to export field or stores it for future use if this visual component does not exist yet param value new value public void set Types Field Value String value if types To Export Field null initial Types Field Value value else types To Export Field set Text value  setTypesFieldValue typesToExportField initialTypesFieldValue typesToExportField setText
Sets the value of this page s Types to export field based upon the collection of extensions param type Strings the collection of extensions to populate the Types to export field with element type code String code protected void set Types To Export List type Strings String Buffer result new String Buffer Iterator types Enum type Strings iterator while types Enum has Next result append types Enum next result append TYPE DELIMITER result append NON NLS 1 types To Export Field set Text result to String  typeStrings setTypesToExport typeStrings StringBuffer StringBuffer typesEnum typeStrings typesEnum hasNext typesEnum TYPE_DELIMITER typesToExportField setText toString
Populates the resource name field based upon the currently selected resources protected void setup Based On Initial Selections if initial Export Field Value null a source resource has been programatically specified which overrides the current workbench resource selection I Resource specified Source Resource get Source Resource if specified Source Resource null current Resource Selection new Structured Selection else current Resource Selection new Structured Selection specified Source Resource if current Resource Selection is Empty return no setup needed List selections new Array List Iterator enum current Resource Selection iterator while enum has Next I Resource current Resource I Resource enum next do not add inaccessible elements if current Resource is Accessible selections add current Resource if selections is Empty return setup not needed anymore int selected Resource Count selections size if selected Resource Count 1 I Resource resource I Resource selections get 0 set Resource To Display resource else selected Resources selections export All Types Radio set Selection true export Specified Types Radio set Selection false resource Name Field set Text CURRENT SELECTION export Current Selection true display Resources Selected Count selected Resource Count  setupBasedOnInitialSelections initialExportFieldValue IResource specifiedSourceResource getSourceResource specifiedSourceResource currentResourceSelection StructuredSelection currentResourceSelection StructuredSelection specifiedSourceResource currentResourceSelection isEmpty ArrayList currentResourceSelection hasNext IResource currentResource IResource currentResource isAccessible currentResource isEmpty selectedResourceCount selectedResourceCount IResource IResource setResourceToDisplay selectedResources exportAllTypesRadio setSelection exportSpecifiedTypesRadio setSelection resourceNameField setText CURRENT_SELECTION exportCurrentSelection displayResourcesSelectedCount selectedResourceCount
Updates the enablements of this page s controls Subclasses may extend protected void update Widget Enablements if export Current Selection resource Details Button set Enabled true else I Resource resource get Source Resource resource Details Button set Enabled resource null resource is Accessible export Specified Types Radio set Enabled export Current Selection types To Export Field set Enabled export Specified Types Radio get Selection types To Export Edit Button set Enabled export Specified Types Radio get Selection  updateWidgetEnablements exportCurrentSelection resourceDetailsButton setEnabled IResource getSourceResource resourceDetailsButton setEnabled isAccessible exportSpecifiedTypesRadio setEnabled exportCurrentSelection typesToExportField setEnabled exportSpecifiedTypesRadio getSelection typesToExportEditButton setEnabled exportSpecifiedTypesRadio getSelection
protected final boolean validate Source Group if export Current Selection ie no more checking needed return true String source String resource Name Field get Text if source String equals NON NLS 1 set Error Message null return false I Resource resource get Source Resource if resource null set Error Message IDE Workbench Messages get String Wizard Export Page must Exist Message NON NLS 1 return false if resource is Accessible set Error Message IDE Workbench Messages get String Wizard Export Page must Be Accessible Message NON NLS 1 return false return true  validateSourceGroup exportCurrentSelection sourceString resourceNameField getText sourceString setErrorMessage IResource getSourceResource setErrorMessage IDEWorkbenchMessages getString WizardExportPage mustExistMessage isAccessible setErrorMessage IDEWorkbenchMessages getString WizardExportPage mustBeAccessibleMessage

Creates an export wizard page If the current resource selection is not empty then it will be used as the initial collection of resources selected for export param page Name the name of the page param selection the current resource selection protected Wizard Export Resources Page String page Name I Structured Selection selection super page Name this initial Resource Selection selection  pageName WizardExportResourcesPage pageName IStructuredSelection pageName initialResourceSelection
The code add To Hierarchy To Checked Store code implementation of this code Wizard Data Transfer Page code method returns code false code Subclasses may override this method protected boolean allow New Container Name return false  addToHierarchyToCheckedStore WizardDataTransferPage allowNewContainerName
Creates a new button with the given id p The code Dialog code implementation of this framework method creates a standard push button registers for selection events including button presses and registers default buttons with its shell The button id is stored as the buttons client data Note that the parent s layout is assumed to be a Grid Layout and the number of columns in this layout is incremented Subclasses may override p param parent the parent composite param id the id of the button see code I Dialog Constants  ID code constants for standard dialog button ids param label the label from the button param default Button code true code if the button is to be the default button and code false code otherwise protected Button create Button Composite parent int id String label boolean default Button increment the number of columns in the button bar Grid Layout parent get Layout num Columns Button button new Button parent SWT PUSH Grid Data button Data new Grid Data Grid Data FILL HORIZONTAL button set Layout Data button Data button set Data new Integer id button set Text label button set Font parent get Font if default Button Shell shell parent get Shell if shell null shell set Default Button button button set Focus button set Font parent get Font set Button Layout Data button return button  GridLayout IDialogConstants _ID defaultButton createButton defaultButton GridLayout getLayout numColumns GridData buttonData GridData GridData FILL_HORIZONTAL setLayoutData buttonData setData setText setFont getFont defaultButton getShell setDefaultButton setFocus setFont getFont setButtonLayoutData
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e handle Types Edit Button Pressed  SelectionListener SelectionAdapter widgetSelected SelectionEvent handleTypesEditButtonPressed
listener new Selection Adapter public void widget Selected Selection Event e resource Group set All Selections true  SelectionAdapter widgetSelected SelectionEvent resourceGroup setAllSelections
listener new Selection Adapter public void widget Selected Selection Event e resource Group set All Selections false  SelectionAdapter widgetSelected SelectionEvent resourceGroup setAllSelections
Creates the buttons for selecting specific types or selecting all or none of the elements param parent the parent control protected final void create Buttons Group Composite parent Font font parent get Font top level group Composite button Composite new Composite parent SWT NONE button Composite set Font parent get Font Grid Layout layout new Grid Layout layout num Columns 3 layout make Columns Equal Width true button Composite set Layout layout button Composite set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL types edit button Button select Types Button create Button button Composite I Dialog Constants SELECT TYPES ID SELECT TYPES TITLE false Selection Listener listener new Selection Adapter public void widget Selected Selection Event e handle Types Edit Button Pressed select Types Button add Selection Listener listener select Types Button set Font font set Button Layout Data select Types Button Button select Button create Button button Composite I Dialog Constants SELECT ALL ID SELECT ALL TITLE false listener new Selection Adapter public void widget Selected Selection Event e resource Group set All Selections true select Button add Selection Listener listener select Button set Font font set Button Layout Data select Button Button deselect Button create Button button Composite I Dialog Constants DESELECT ALL ID DESELECT ALL TITLE false listener new Selection Adapter public void widget Selected Selection Event e resource Group set All Selections false deselect Button add Selection Listener listener deselect Button set Font font set Button Layout Data deselect Button  createButtonsGroup getFont buttonComposite buttonComposite setFont getFont GridLayout GridLayout numColumns makeColumnsEqualWidth buttonComposite setLayout buttonComposite setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL selectTypesButton createButton buttonComposite IDialogConstants SELECT_TYPES_ID SELECT_TYPES_TITLE SelectionListener SelectionAdapter widgetSelected SelectionEvent handleTypesEditButtonPressed selectTypesButton addSelectionListener selectTypesButton setFont setButtonLayoutData selectTypesButton selectButton createButton buttonComposite IDialogConstants SELECT_ALL_ID SELECT_ALL_TITLE SelectionAdapter widgetSelected SelectionEvent resourceGroup setAllSelections selectButton addSelectionListener selectButton setFont setButtonLayoutData selectButton deselectButton createButton buttonComposite IDialogConstants DESELECT_ALL_ID DESELECT_ALL_TITLE SelectionAdapter widgetSelected SelectionEvent resourceGroup setAllSelections deselectButton addSelectionListener deselectButton setFont setButtonLayoutData deselectButton
non Javadoc Method declared on I Dialog Page public void create Control Composite parent initialize Dialog Units parent Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL composite set Font parent get Font create Resources Group composite create Buttons Group composite create Destination Group composite create Options Group composite restore Resource Specification Widget Values ie local restore Widget Values ie subclass hook if initial Resource Selection null setup Based On Initial Selections update Widget Enablements set Page Complete determine Page Completion set Control composite  IDialogPage createControl initializeDialogUnits setLayout GridLayout setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL setFont getFont createResourcesGroup createButtonsGroup createDestinationGroup createOptionsGroup restoreResourceSpecificationWidgetValues restoreWidgetValues initialResourceSelection setupBasedOnInitialSelections updateWidgetEnablements setPageComplete determinePageCompletion setControl
Creates the export destination specification visual components p Subclasses must implement this method p param parent the parent control 
protected abstract void create Destination Group Composite parent Creates the checkbox tree and list for selecting resources param parent the parent control protected final void create Resources Group Composite parent create the input element which has the root resource as its only child List input new Array List I Project projects Resources Plugin get Workspace get Root get Projects for int i 0 i projects length i if projects i is Open input add projects i this resource Group new Resource Tree And List Group parent input get Resource Provider I Resource FOLDER I Resource PROJECT Workbench Label Provider get Decorating Workbench Label Provider get Resource Provider I Resource FILE Workbench Label Provider get Decorating Workbench Label Provider SWT NONE Dialog Util in Regular Font Mode parent  createDestinationGroup createResourcesGroup ArrayList IProject ResourcesPlugin getWorkspace getRoot getProjects isOpen resourceGroup ResourceTreeAndListGroup getResourceProvider IResource IResource WorkbenchLabelProvider getDecoratingWorkbenchLabelProvider getResourceProvider IResource WorkbenchLabelProvider getDecoratingWorkbenchLabelProvider DialogUtil inRegularFontMode
see Wizard Data Transfer Page get Error Dialog Title protected String get Error Dialog Title return IDE Workbench Messages get String Wizard Export Page error Dialog Title NON NLS 1  WizardDataTransferPage getErrorDialogTitle getErrorDialogTitle IDEWorkbenchMessages getString WizardExportPage errorDialogTitle
Obsolete method This was implemented to handle the case where ensure Local needed to be called but it doesn t use it any longer deprecated Only retained for backwards compatibility protected boolean ensure Resources Local List resources return true  ensureLocal ensureResourcesLocal
Returns a new subcollection containing only those resources which are not local param original List the original list of resources element type code I Resource code return the new list of non local resources element type code I Resource code protected List extract Non Local Resources List original List Vector result new Vector original List size Iterator resources Enum original List iterator while resources Enum has Next I Resource current Resource I Resource resources Enum next if current Resource is Local I Resource DEPTH ZERO result add Element current Resource return result  originalList IResource IResource extractNonLocalResources originalList originalList resourcesEnum originalList resourcesEnum hasNext IResource currentResource IResource resourcesEnum currentResource isLocal IResource DEPTH_ZERO addElement currentResource
return new Workbench Content Provider public Object get Children Object o if o instanceof I Container I Resource members null try members I Container o members catch Core Exception e just return an empty set of children return new Object 0 filter out the desired resource types Array List results new Array List for int i 0 i members length i And the test bits with the resource types to see if they are what we want if members i get Type resource Type 0 results add members i return results to Array else input element case if o instanceof Array List return Array List o to Array else return new Object 0  WorkbenchContentProvider getChildren IContainer IResource IContainer CoreException ArrayList ArrayList getType resourceType toArray ArrayList ArrayList toArray
Returns a content provider for code I Resource code s that returns only children of the given resource type private I Tree Content Provider get Resource Provider final int resource Type return new Workbench Content Provider public Object get Children Object o if o instanceof I Container I Resource members null try members I Container o members catch Core Exception e just return an empty set of children return new Object 0 filter out the desired resource types Array List results new Array List for int i 0 i members length i And the test bits with the resource types to see if they are what we want if members i get Type resource Type 0 results add members i return results to Array else input element case if o instanceof Array List return Array List o to Array else return new Object 0  IResource ITreeContentProvider getResourceProvider resourceType WorkbenchContentProvider getChildren IContainer IResource IContainer CoreException ArrayList ArrayList getType resourceType toArray ArrayList ArrayList toArray
Returns this page s collection of currently specified resources to be exported This is the primary resource selection facility accessor for subclasses return a collection of resources currently selected for export element type code I Resource code protected List get Selected Resources Iterator resources To Export Iterator this get Selected Resources Iterator List resources To Export new Array List while resources To Export Iterator has Next resources To Export add resources To Export Iterator next return resources To Export  IResource getSelectedResources resourcesToExportIterator getSelectedResourcesIterator resourcesToExport ArrayList resourcesToExportIterator hasNext resourcesToExport resourcesToExportIterator resourcesToExport
Returns this page s collection of currently specified resources to be exported This is the primary resource selection facility accessor for subclasses return an iterator over the collection of resources currently selected for export element type code I Resource code This will include white checked folders and individually checked files protected Iterator get Selected Resources Iterator return this resource Group get All Checked List Items iterator  IResource getSelectedResourcesIterator resourceGroup getAllCheckedListItems
Returns the resource extensions currently specified to be exported return the resource extensions currently specified to be exported element type code String code protected List get Types To Export return selected Types  getTypesToExport selectedTypes
Returns this page s collection of currently specified resources to be exported This returns both folders and files for just the files use get Selected Resources return a collection of resources currently selected for export element type code I Resource code protected List get White Checked Resources return this resource Group get All White Checked Items  getSelectedResources IResource getWhiteCheckedResources resourceGroup getAllWhiteCheckedItems
Queries the user for the types of resources to be exported and selects them in the checkbox group protected void handle Types Edit Button Pressed Object new Selected Types query Resource Types To Export if new Selected Types null ie did not press Cancel this selected Types new Array List new Selected Types length for int i 0 i new Selected Types length i this selected Types add new Selected Types i setup Selections Based On Selected Types  handleTypesEditButtonPressed newSelectedTypes queryResourceTypesToExport newSelectedTypes selectedTypes ArrayList newSelectedTypes newSelectedTypes selectedTypes newSelectedTypes setupSelectionsBasedOnSelectedTypes
Returns whether the extension of the given resource name is an extension that has been specified for export by the user param resource Name the resource name return code true code if the resource name is suitable for export based upon its extension protected boolean has Exportable Extension String resource Name if selected Types null ie all extensions are acceptable return true int separator Index resource Name last Index Of NON NLS 1 if separator Index 1 return false String extension resource Name substring separator Index 1 Iterator enum selected Types iterator while enum has Next if extension equals Ignore Case String enum next return true return false  resourceName hasExportableExtension resourceName selectedTypes separatorIndex resourceName lastIndexOf separatorIndex resourceName separatorIndex selectedTypes hasNext equalsIgnoreCase
Persists additional setting that are to be restored in the next instance of this page p The code Wizard Import Page code implementation of this method does nothing Subclasses may extend to persist additional settings p protected void internal Save Widget Values  WizardImportPage internalSaveWidgetValues
Queries the user for the resource types that are to be exported and returns these types as an array return the resource types selected for export element type code String code or code null code if the user canceled the selection protected Object query Resource Types To Export Type Filtering Dialog dialog new Type Filtering Dialog get Container get Shell get Types To Export dialog open return dialog get Result  queryResourceTypesToExport TypeFilteringDialog TypeFilteringDialog getContainer getShell getTypesToExport getResult
Restores resource specification control settings that were persisted in the previous instance of this page Subclasses wishing to restore persisted values for their controls may extend protected void restore Resource Specification Widget Values  restoreResourceSpecificationWidgetValues
Persists resource specification control setting that are to be restored in the next instance of this page Subclasses wishing to persist additional setting for their controls should extend hook method code internal Save Widget Values code protected void save Widget Values allow subclasses to save values internal Save Widget Values  internalSaveWidgetValues saveWidgetValues internalSaveWidgetValues
Set the initial selections in the resource group protected void setup Based On Initial Selections Iterator enum this initial Resource Selection iterator while enum has Next I Resource current Resource I Resource enum next if current Resource get Type I Resource FILE this resource Group initial Check List Item current Resource else this resource Group initial Check Tree Item current Resource  setupBasedOnInitialSelections initialResourceSelection hasNext IResource currentResource IResource currentResource getType IResource resourceGroup initialCheckListItem currentResource resourceGroup initialCheckTreeItem currentResource
Runnable runnable new Runnable public void run Map selection Map new Hashtable Only get the white selected ones Iterator resource Iterator resource Group get All White Checked Items iterator while resource Iterator has Next handle the files here white checked containers require recursion I Resource resource I Resource resource Iterator next if resource get Type I Resource FILE if has Exportable Extension resource get Name List resource List new Array List I Container parent resource get Parent if selection Map contains Key parent resource List List selection Map get parent resource List add resource selection Map put parent resource List else setup Selections Based On Selected Types selection Map I Container resource resource Group update Selections selection Map  selectionMap resourceIterator resourceGroup getAllWhiteCheckedItems resourceIterator hasNext IResource IResource resourceIterator getType IResource hasExportableExtension getName resourceList ArrayList IContainer getParent selectionMap containsKey resourceList selectionMap resourceList selectionMap resourceList setupSelectionsBasedOnSelectedTypes selectionMap IContainer resourceGroup updateSelections selectionMap
Update the tree to only select those elements that match the selected types private void setup Selections Based On Selected Types Runnable runnable new Runnable public void run Map selection Map new Hashtable Only get the white selected ones Iterator resource Iterator resource Group get All White Checked Items iterator while resource Iterator has Next handle the files here white checked containers require recursion I Resource resource I Resource resource Iterator next if resource get Type I Resource FILE if has Exportable Extension resource get Name List resource List new Array List I Container parent resource get Parent if selection Map contains Key parent resource List List selection Map get parent resource List add resource selection Map put parent resource List else setup Selections Based On Selected Types selection Map I Container resource resource Group update Selections selection Map Busy Indicator show While get Shell get Display runnable  setupSelectionsBasedOnSelectedTypes selectionMap resourceIterator resourceGroup getAllWhiteCheckedItems resourceIterator hasNext IResource IResource resourceIterator getType IResource hasExportableExtension getName resourceList ArrayList IContainer getParent selectionMap containsKey resourceList selectionMap resourceList selectionMap resourceList setupSelectionsBasedOnSelectedTypes selectionMap IContainer resourceGroup updateSelections selectionMap BusyIndicator showWhile getShell getDisplay
Set up the selection values for the resources and put them in the selection Map If a resource is a file see if it matches one of the selected extensions If not then check the children return a boolean if any children are selected private void setup Selections Based On Selected Types Map selection Map I Container parent List selections new Array List I Resource resources boolean has Files false try resources parent members catch Core Exception exception Just return if we can t get any info return for int i 0 i resources length i I Resource resource resources i if resource get Type I Resource FILE if has Exportable Extension resource get Name has Files true selections add resource else setup Selections Based On Selected Types selection Map I Container resource Only add it to the list if there are files in this folder if has Files selection Map put parent selections  selectionMap setupSelectionsBasedOnSelectedTypes selectionMap IContainer ArrayList IResource hasFiles CoreException IResource getType IResource hasExportableExtension getName hasFiles setupSelectionsBasedOnSelectedTypes selectionMap IContainer hasFiles selectionMap
Save any editors that the user wants to save before export return boolean if the save was successful protected boolean save Dirty Editors return IDE Workbench Plugin get Default get Workbench save All Editors true  saveDirtyEditors IDEWorkbenchPlugin getDefault getWorkbench saveAllEditors

private Button container Browse Button Creates an import wizard page If the initial resource selection contains exactly one container resource then it will be used as the default import destination param name the name of the page param selection the current resource selection protected Wizard Import Page String name I Structured Selection selection super name if selection size 1 current Resource Selection I Resource selection get First Element else current Resource Selection null if current Resource Selection null if current Resource Selection get Type I Resource FILE current Resource Selection current Resource Selection get Parent if current Resource Selection is Accessible current Resource Selection null  containerBrowseButton WizardImportPage IStructuredSelection currentResourceSelection IResource getFirstElement currentResourceSelection currentResourceSelection currentResourceSelection getType IResource currentResourceSelection currentResourceSelection getParent currentResourceSelection isAccessible currentResourceSelection
The code Wizard Import Page code implementation of this code Wizard Data Transfer Page code method returns code true code Subclasses may override this method protected boolean allow New Container Name return true  WizardImportPage WizardDataTransferPage allowNewContainerName
non Javadoc Method declared on I Dialog Page public void create Control Composite parent Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL composite set Size composite compute Size SWT DEFAULT SWT DEFAULT create Source Group composite create Spacer composite create Bold Label composite IDE Workbench Messages get String Wizard Import Page destination Label NON NLS 1 create Destination Group composite create Spacer composite create Bold Label composite IDE Workbench Messages get String Wizard Import Page options NON NLS 1 create Options Group composite restore Widget Values update Widget Enablements set Page Complete determine Page Completion set Control composite  IDialogPage createControl setLayout GridLayout setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL setSize computeSize createSourceGroup createSpacer createBoldLabel IDEWorkbenchMessages getString WizardImportPage destinationLabel createDestinationGroup createSpacer createBoldLabel IDEWorkbenchMessages getString WizardImportPage createOptionsGroup restoreWidgetValues updateWidgetEnablements setPageComplete determinePageCompletion setControl
Creates the import destination specification controls param parent the parent control protected final void create Destination Group Composite parent container specification group Composite container Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 container Group set Layout layout container Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL container label Label resources Label new Label container Group SWT NONE resources Label set Text IDE Workbench Messages get String Wizard Import Page folder NON NLS 1 container name entry field container Name Field new Text container Group SWT SINGLE SWT BORDER container Name Field add Listener SWT Modify this Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH container Name Field set Layout Data data container browse button container Browse Button new Button container Group SWT PUSH container Browse Button set Text IDE Workbench Messages get String Wizard Import Page browse Label NON NLS 1 container Browse Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL container Browse Button add Listener SWT Selection this initial Populate Container Field  createDestinationGroup containerGroup GridLayout GridLayout numColumns containerGroup setLayout containerGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL resourcesLabel containerGroup resourcesLabel setText IDEWorkbenchMessages getString WizardImportPage containerNameField containerGroup containerNameField addListener GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH containerNameField setLayoutData containerBrowseButton containerGroup containerBrowseButton setText IDEWorkbenchMessages getString WizardImportPage browseLabel containerBrowseButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL containerBrowseButton addListener initialPopulateContainerField
Creates the import source specification controls p Subclasses must implement this method p param parent the parent control 
protected abstract void create Source Group Composite parent Display an error dialog with the specified message param message the error message protected void display Error Dialog String message Message Dialog open Error get Container get Shell IDE Workbench Messages get String Wizard Import Page error Dialog Title message NON NLS 1  createSourceGroup displayErrorDialog MessageDialog openError getContainer getShell IDEWorkbenchMessages getString WizardImportPage errorDialogTitle
Returns the path of the container resource specified in the container name entry field or code null code if no name has been typed in p The container specified by the full path might not exist and would need to be created p return the full path of the container resource specified in the container name entry field or code null code protected I Path get Container Full Path I Workspace workspace IDE Workbench Plugin get Plugin Workspace make the path absolute to allow for optional leading slash I Path test Path get Resource Path I Status result workspace validate Path test Path to String I Resource PROJECT I Resource FOLDER if result isOK return test Path return null  IPath getContainerFullPath IWorkspace IDEWorkbenchPlugin getPluginWorkspace IPath testPath getResourcePath IStatus validatePath testPath toString IResource IResource testPath
Return the path for the resource field return org eclipse core runtime I Path protected I Path get Resource Path return get Path From Text this container Name Field  IPath IPath getResourcePath getPathFromText containerNameField
Returns the container resource specified in the container name entry field or code null code if such a container does not exist in the workbench return the container resource specified in the container name entry field or code null code protected I Container get Specified Container I Workspace workspace IDE Workbench Plugin get Plugin Workspace I Path path get Container Full Path if workspace get Root exists path return I Container workspace get Root find Member path return null  IContainer getSpecifiedContainer IWorkspace IDEWorkbenchPlugin getPluginWorkspace IPath getContainerFullPath getRoot IContainer getRoot findMember
Opens a container selection dialog and displays the user s subsequent container resource selection in this page s container name field protected void handle Container Browse Button Pressed see if the user wishes to modify this container selection I Path container Path query For Container get Specified Container IDE Workbench Messages get String Wizard Import Page select Folder Label NON NLS 1 if a container was selected then put its name in the container name field if container Path null null means user cancelled container Name Field set Text container Path make Relative to String  handleContainerBrowseButtonPressed IPath containerPath queryForContainer getSpecifiedContainer IDEWorkbenchMessages getString WizardImportPage selectFolderLabel containerPath containerNameField setText containerPath makeRelative toString
The code Wizard Import Page code implementation of this code Listener code method handles all events and enablements for controls on this page Subclasses may extend public void handle Event Event event Widget source event widget if source container Browse Button handle Container Browse Button Pressed set Page Complete determine Page Completion update Widget Enablements  WizardImportPage handleEvent containerBrowseButton handleContainerBrowseButtonPressed setPageComplete determinePageCompletion updateWidgetEnablements
Sets the initial contents of the container name field protected final void initial Populate Container Field if initial Container Field Value null container Name Field set Text initial Container Field Value else if current Resource Selection null container Name Field set Text current Resource Selection get Full Path to String  initialPopulateContainerField initialContainerFieldValue containerNameField setText initialContainerFieldValue currentResourceSelection containerNameField setText currentResourceSelection getFullPath toString
Sets the value of this page s container resource field or stores it for future use if this page s controls do not exist yet param value new value public void set Container Field Value String value if container Name Field null initial Container Field Value value else container Name Field set Text value  setContainerFieldValue containerNameField initialContainerFieldValue containerNameField setText
protected final boolean validate Destination Group if get Container Full Path null return false If the container exist validate it I Container container get Specified Container if container null if container is Accessible set Error Message IDE Workbench Messages get String Wizard Import Page folder Must Exist NON NLS 1 return false return true  validateDestinationGroup getContainerFullPath IContainer getSpecifiedContainer isAccessible setErrorMessage IDEWorkbenchMessages getString WizardImportPage folderMustExist

Creates a new file creation wizard page If the initial resource selection contains exactly one container resource then it will be used as the default container resource param page Name the name of the page param selection the current resource selection public Wizard New File Creation Page String page Name I Structured Selection selection super page Name set Page Complete false this current Selection selection  pageName WizardNewFileCreationPage pageName IStructuredSelection pageName setPageComplete currentSelection
advanced Button set Layout Data data advanced Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Advanced Button Select  advancedButton setLayoutData advancedButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAdvancedButtonSelect
I Resource FILE new Listener public void handle Event Event e set Page Complete validate Page first Link Check false  IResource handleEvent setPageComplete validatePage firstLinkCheck
Creates the widget for advanced options param parent the parent composite protected void create Advanced Controls Composite parent Preferences preferences Resources Plugin get Plugin get Plugin Preferences if preferences get Boolean Resources Plugin PREF DISABLE LINKING false linked Resource Parent new Composite parent SWT NONE linked Resource Parent set Font parent get Font linked Resource Parent set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 linked Resource Parent set Layout layout advanced Button new Button linked Resource Parent SWT PUSH advanced Button set Font linked Resource Parent get Font advanced Button set Text IDE Workbench Messages get String show Advanced NON NLS 1 Grid Data data set Button Layout Data advanced Button data horizontal Alignment Grid Data BEGINNING advanced Button set Layout Data data advanced Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Advanced Button Select linked Resource Group new Create Linked Resource Group I Resource FILE new Listener public void handle Event Event e set Page Complete validate Page first Link Check false  createAdvancedControls ResourcesPlugin getPlugin getPluginPreferences getBoolean ResourcesPlugin PREF_DISABLE_LINKING linkedResourceParent linkedResourceParent setFont getFont linkedResourceParent setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout marginHeight marginWidth linkedResourceParent setLayout advancedButton linkedResourceParent advancedButton setFont linkedResourceParent getFont advancedButton setText IDEWorkbenchMessages getString showAdvanced GridData setButtonLayoutData advancedButton horizontalAlignment GridData advancedButton setLayoutData advancedButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAdvancedButtonSelect linkedResourceGroup CreateLinkedResourceGroup IResource handleEvent setPageComplete validatePage firstLinkCheck
non Javadoc Method declared on I Dialog Page public void create Control Composite parent initialize Dialog Units parent top level group Composite top Level new Composite parent SWT NONE top Level set Layout new Grid Layout top Level set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL top Level set Font parent get Font Workbench Help set Help top Level I Help Context Ids NEW FILE WIZARD PAGE resource and container group resource Group new Resource And Container Group top Level this get New File Label IDE Workbench Messages get String Wizard New File Creation Page file false SIZING CONTAINER GROUP HEIGHT NON NLS 1 resource Group set Allow Existing Resources false initial Populate Container Name Field create Advanced Controls top Level if initial File Name null resource Group set Resource initial File Name validate Page Show description on opening set Error Message null set Message null set Control top Level  IDialogPage createControl initializeDialogUnits topLevel topLevel setLayout GridLayout topLevel setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL topLevel setFont getFont WorkbenchHelp setHelp topLevel IHelpContextIds NEW_FILE_WIZARD_PAGE resourceGroup ResourceAndContainerGroup topLevel getNewFileLabel IDEWorkbenchMessages getString WizardNewFileCreationPage SIZING_CONTAINER_GROUP_HEIGHT resourceGroup setAllowExistingResources initialPopulateContainerNameField createAdvancedControls topLevel initialFileName resourceGroup setResource initialFileName validatePage setErrorMessage setMessage setControl topLevel
Creates a file resource given the file handle and contents param file Handle the file handle to create a file resource with param contents the initial contents of the new file resource or code null code if none equivalent to an empty stream param monitor the progress monitor to show visual progress with exception Core Exception if the operation fails exception Operation Canceled Exception if the operation is canceled protected void create File I File file Handle Input Stream contents I Progress Monitor monitor throws Core Exception if contents null contents new Byte Array Input Stream new byte 0 try Create a new file resource in the workspace if link Target Path null file Handle create Link link Target Path I Resource ALLOW MISSING LOCAL monitor else file Handle create contents false monitor catch Core Exception e If the file already existed locally just refresh to get contents if e get Status get Code I Resource Status PATH OCCUPIED file Handle refresh Local I Resource DEPTH ZERO null else throw e if monitor is Canceled throw new Operation Canceled Exception  fileHandle CoreException OperationCanceledException createFile IFile fileHandle InputStream IProgressMonitor CoreException ByteArrayInputStream linkTargetPath fileHandle createLink linkTargetPath IResource ALLOW_MISSING_LOCAL fileHandle CoreException getStatus getCode IResourceStatus PATH_OCCUPIED fileHandle refreshLocal IResource DEPTH_ZERO isCanceled OperationCanceledException
Creates a file resource handle for the file with the given workspace path This method does not create the file resource this is the responsibility of code create File code param file Path the path of the file resource to create a handle for return the new file resource handle see create File protected I File create File Handle I Path file Path return IDE Workbench Plugin get Plugin Workspace get Root get File file Path  createFile filePath createFile IFile createFileHandle IPath filePath IDEWorkbenchPlugin getPluginWorkspace getRoot getFile filePath
Creates the link target path if a link target has been specified protected void create Link Target String link Target linked Resource Group get Link Target if link Target null link Target Path new Path link Target else link Target Path null  createLinkTarget linkTarget linkedResourceGroup getLinkTarget linkTarget linkTargetPath linkTarget linkTargetPath
Workspace Modify Operation op new Workspace Modify Operation null protected void execute I Progress Monitor monitor throws Core Exception Interrupted Exception try monitor begin Task IDE Workbench Messages get String Wizard New File Creation Page progress 2000 NON NLS 1 Container Generator generator new Container Generator container Path generator generate Container new Sub Progress Monitor monitor 1000 create File new File Handle initial Contents new Sub Progress Monitor monitor 1000 finally monitor done  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException InterruptedException beginTask IDEWorkbenchMessages getString WizardNewFileCreationPage ContainerGenerator ContainerGenerator containerPath generateContainer SubProgressMonitor createFile newFileHandle initialContents SubProgressMonitor
Creates a new file resource in the selected container and with the selected name Creates any missing resource containers along the path does nothing if the container resources already exist p In normal usage this method is invoked after the user has pressed Finish on the wizard the enablement of the Finish button implies that all controls on on this page currently contain valid values p p Note that this page caches the new file once it has been successfully created subsequent invocations of this method will answer the same file resource without attempting to create it again p p This method should be called within a workspace modify operation since it creates resources p return the created file resource or code null code if the file was not created public I File create New File if new File null return new File create the new file and cache it if successful final I Path container Path resource Group get Container Full Path I Path new File Path container Path append resource Group get Resource final I File new File Handle create File Handle new File Path final Input Stream initial Contents get Initial Contents create Link Target Workspace Modify Operation op new Workspace Modify Operation null protected void execute I Progress Monitor monitor throws Core Exception Interrupted Exception try monitor begin Task IDE Workbench Messages get String Wizard New File Creation Page progress 2000 NON NLS 1 Container Generator generator new Container Generator container Path generator generate Container new Sub Progress Monitor monitor 1000 create File new File Handle initial Contents new Sub Progress Monitor monitor 1000 finally monitor done try get Container run true true op catch Interrupted Exception e return null catch Invocation Target Exception e if e get Target Exception instanceof Core Exception Error Dialog open Error get Container get Shell Was Utilities get Focus Shell IDE Workbench Messages get String Wizard New File Creation Page error Title NON NLS 1 null no special message Core Exception e get Target Exception get Status else Core Exceptions are handled above but unexpected runtime exceptions and errors may still occur IDE Workbench Plugin log Message Format format Exception in 0 get New File 1 new Object get Class get Name e get Target Exception NON NLS 1 Message Dialog open Error get Container get Shell IDE Workbench Messages get String Wizard New File Creation Page internal Error Title IDE Workbench Messages format Wizard New File Creation Page internal Error Message new Object e get Target Exception get Message NON NLS 2 NON NLS 1 return null new File new File Handle return new File  IFile createNewFile newFile newFile IPath containerPath resourceGroup getContainerFullPath IPath newFilePath containerPath resourceGroup getResource IFile newFileHandle createFileHandle newFilePath InputStream initialContents getInitialContents createLinkTarget WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException InterruptedException beginTask IDEWorkbenchMessages getString WizardNewFileCreationPage ContainerGenerator ContainerGenerator containerPath generateContainer SubProgressMonitor createFile newFileHandle initialContents SubProgressMonitor getContainer InterruptedException InvocationTargetException getTargetException CoreException ErrorDialog openError getContainer getShell getFocusShell IDEWorkbenchMessages getString WizardNewFileCreationPage errorTitle CoreException getTargetException getStatus CoreExceptions IDEWorkbenchPlugin MessageFormat getNewFile getClass getName getTargetException MessageDialog openError getContainer getShell IDEWorkbenchMessages getString WizardNewFileCreationPage internalErrorTitle IDEWorkbenchMessages WizardNewFileCreationPage internalErrorMessage getTargetException getMessage newFile newFileHandle newFile
Returns the current full path of the containing resource as entered or selected by the user or its anticipated initial value return the container s full path anticipated initial value or code null code if no path is known public I Path get Container Full Path return resource Group get Container Full Path  IPath getContainerFullPath resourceGroup getContainerFullPath
Returns the current file name as entered by the user or its anticipated initial value return the file name its anticipated initial value or code null code if no file name is known public String get File Name if resource Group null return initial File Name return resource Group get Resource  getFileName resourceGroup initialFileName resourceGroup getResource
Returns a stream containing the initial contents to be given to new file resource instances b Subclasses b may wish to override This default implementation provides no initial contents return initial contents to be given to new file resource instances protected Input Stream get Initial Contents return null  InputStream getInitialContents
Returns the label to display in the file name specification visual component group p Subclasses may reimplement p return the label to display in the file name specification visual component group protected String get New File Label return IDE Workbench Messages get String Wizard New File Creation Page file Label NON NLS 1  getNewFileLabel IDEWorkbenchMessages getString WizardNewFileCreationPage fileLabel
Shows hides the advanced option widgets protected void handle Advanced Button Select Shell shell get Shell Point shell Size shell get Size Composite composite Composite get Control if linked Resource Composite null linked Resource Composite dispose linked Resource Composite null composite layout shell set Size shell Size x shell Size y linked Resource Group Height advanced Button set Text IDE Workbench Messages get String show Advanced NON NLS 1 else linked Resource Composite linked Resource Group create Contents linked Resource Parent if linked Resource Group Height 1 Point group Size linked Resource Composite compute Size SWT DEFAULT SWT DEFAULT true linked Resource Group Height group Size y shell set Size shell Size x shell Size y linked Resource Group Height composite layout advanced Button set Text IDE Workbench Messages get String hide Advanced NON NLS 1  handleAdvancedButtonSelect getShell shellSize getSize getControl linkedResourceComposite linkedResourceComposite linkedResourceComposite setSize shellSize shellSize linkedResourceGroupHeight advancedButton setText IDEWorkbenchMessages getString showAdvanced linkedResourceComposite linkedResourceGroup createContents linkedResourceParent linkedResourceGroupHeight groupSize linkedResourceComposite computeSize linkedResourceGroupHeight groupSize setSize shellSize shellSize linkedResourceGroupHeight advancedButton setText IDEWorkbenchMessages getString hideAdvanced
The code Wizard New File Creation Page code implementation of this code Listener code method handles all events and enablements for controls on this page Subclasses may extend public void handle Event Event event set Page Complete validate Page  WizardNewFileCreationPage handleEvent setPageComplete validatePage
Sets the initial contents of the container name entry field based upon either a previously specified initial value or the ability to determine such a value protected void initial Populate Container Name Field if initial Container Full Path null resource Group set Container Full Path initial Container Full Path else Iterator enum current Selection iterator if enum has Next Object object enum next I Resource selected Resource null if object instanceof I Resource selected Resource I Resource object else if object instanceof I Adaptable selected Resource I Resource I Adaptable object get Adapter I Resource class if selected Resource null if selected Resource get Type I Resource FILE selected Resource selected Resource get Parent if selected Resource is Accessible resource Group set Container Full Path selected Resource get Full Path  initialPopulateContainerNameField initialContainerFullPath resourceGroup setContainerFullPath initialContainerFullPath currentSelection hasNext IResource selectedResource IResource selectedResource IResource IAdaptable selectedResource IResource IAdaptable getAdapter IResource selectedResource selectedResource getType IResource selectedResource selectedResource getParent selectedResource isAccessible resourceGroup setContainerFullPath selectedResource getFullPath
Sets the value of this page s container name field or stores it for future use if this page s controls do not exist yet param path the full path to the container public void set Container Full Path I Path path if resource Group null initial Container Full Path path else resource Group set Container Full Path path  setContainerFullPath IPath resourceGroup initialContainerFullPath resourceGroup setContainerFullPath
Sets the value of this page s file name field or stores it for future use if this page s controls do not exist yet param value new file name public void set File Name String value if resource Group null initial File Name value else resource Group set Resource value  setFileName resourceGroup initialFileName resourceGroup setResource
Checks whether the linked resource target is valid Sets the error message accordingly and returns the status return I Status validation result from the Create Linked Resource Group protected I Status validate Linked Resource I Path container Path resource Group get Container Full Path I Path new File Path container Path append resource Group get Resource I File new File Handle create File Handle new File Path I Status status linked Resource Group validate Link Location new File Handle if status get Severity I Status ERROR if first Link Check set Message status get Message else set Error Message status get Message else if status get Severity I Status WARNING set Message status get Message WARNING set Error Message null return status  IStatus CreateLinkedResourceGroup IStatus validateLinkedResource IPath containerPath resourceGroup getContainerFullPath IPath newFilePath containerPath resourceGroup getResource IFile newFileHandle createFileHandle newFilePath IStatus linkedResourceGroup validateLinkLocation newFileHandle getSeverity IStatus firstLinkCheck setMessage getMessage setErrorMessage getMessage getSeverity IStatus setMessage getMessage setErrorMessage
Returns whether this page s controls currently all contain valid values return code true code if all controls are valid and code false code if at least one is invalid protected boolean validate Page boolean valid true if resource Group are All Values Valid if blank name then fail silently if resource Group get Problem Type Resource And Container Group PROBLEM RESOURCE EMPTY resource Group get Problem Type Resource And Container Group PROBLEM CONTAINER EMPTY set Message resource Group get Problem Message set Error Message null else set Error Message resource Group get Problem Message valid false I Status linked Resource Status null if valid linked Resource Status validate Linked Resource if linked Resource Status get Severity I Status ERROR valid false validate Linked Resource sets messages itself if valid linked Resource Status null linked Resource Status isOK set Message null set Error Message null return valid  validatePage resourceGroup areAllValuesValid resourceGroup getProblemType ResourceAndContainerGroup PROBLEM_RESOURCE_EMPTY resourceGroup getProblemType ResourceAndContainerGroup PROBLEM_CONTAINER_EMPTY setMessage resourceGroup getProblemMessage setErrorMessage setErrorMessage resourceGroup getProblemMessage IStatus linkedResourceStatus linkedResourceStatus validateLinkedResource linkedResourceStatus getSeverity IStatus validateLinkedResource linkedResourceStatus linkedResourceStatus setMessage setErrorMessage
public void set Visible boolean visible super set Visible visible if visible resource Group set Focus  setVisible setVisible resourceGroup setFocus

Creates a new folder creation wizard page If the initial resource selection contains exactly one container resource then it will be used as the default container resource param page Name the name of the page param selection the current resource selection public Wizard New Folder Main Page String page Name I Structured Selection selection super new Folder Page1 NON NLS 1 set Title page Name set Description IDE Workbench Messages get String Wizard New Folder Main Page description NON NLS 1 this current Selection selection  pageName WizardNewFolderMainPage pageName IStructuredSelection newFolderPage1 setTitle pageName setDescription IDEWorkbenchMessages getString WizardNewFolderMainPage currentSelection
advanced Button set Layout Data data advanced Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Advanced Button Select  advancedButton setLayoutData advancedButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAdvancedButtonSelect
I Resource FOLDER new Listener public void handle Event Event e set Page Complete validate Page first Link Check false  IResource handleEvent setPageComplete validatePage firstLinkCheck
Creates the widget for advanced options param parent the parent composite protected void create Advanced Controls Composite parent Preferences preferences Resources Plugin get Plugin get Plugin Preferences if preferences get Boolean Resources Plugin PREF DISABLE LINKING false linked Resource Parent new Composite parent SWT NONE linked Resource Parent set Font parent get Font linked Resource Parent set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 linked Resource Parent set Layout layout advanced Button new Button linked Resource Parent SWT PUSH advanced Button set Font linked Resource Parent get Font advanced Button set Text IDE Workbench Messages get String show Advanced NON NLS 1 Grid Data data set Button Layout Data advanced Button data horizontal Alignment Grid Data BEGINNING advanced Button set Layout Data data advanced Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Advanced Button Select linked Resource Group new Create Linked Resource Group I Resource FOLDER new Listener public void handle Event Event e set Page Complete validate Page first Link Check false  createAdvancedControls ResourcesPlugin getPlugin getPluginPreferences getBoolean ResourcesPlugin PREF_DISABLE_LINKING linkedResourceParent linkedResourceParent setFont getFont linkedResourceParent setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout marginHeight marginWidth linkedResourceParent setLayout advancedButton linkedResourceParent advancedButton setFont linkedResourceParent getFont advancedButton setText IDEWorkbenchMessages getString showAdvanced GridData setButtonLayoutData advancedButton horizontalAlignment GridData advancedButton setLayoutData advancedButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAdvancedButtonSelect linkedResourceGroup CreateLinkedResourceGroup IResource handleEvent setPageComplete validatePage firstLinkCheck
non Javadoc Method declared on I Dialog Page public void create Control Composite parent initialize Dialog Units parent top level group Composite composite new Composite parent SWT NONE composite set Font parent get Font composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL Workbench Help set Help composite I Help Context Ids NEW FOLDER WIZARD PAGE resource Group new Resource And Container Group composite this IDE Workbench Messages get String Wizard New Folder Main Page folder Name IDE Workbench Messages get String Wizard New Folder Main Page folder Label false SIZING CONTAINER GROUP HEIGHT NON NLS 2 NON NLS 1 resource Group set Allow Existing Resources false create Advanced Controls composite initialize Page validate Page Show description on opening set Error Message null set Message null set Control composite  IDialogPage createControl initializeDialogUnits setFont getFont setLayout GridLayout setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL WorkbenchHelp setHelp IHelpContextIds NEW_FOLDER_WIZARD_PAGE resourceGroup ResourceAndContainerGroup IDEWorkbenchMessages getString WizardNewFolderMainPage folderName IDEWorkbenchMessages getString WizardNewFolderMainPage folderLabel SIZING_CONTAINER_GROUP_HEIGHT resourceGroup setAllowExistingResources createAdvancedControls initializePage validatePage setErrorMessage setMessage setControl
Creates a folder resource given the folder handle param folder Handle the folder handle to create a folder resource for param monitor the progress monitor to show visual progress with exception Core Exception if the operation fails exception Operation Canceled Exception if the operation is canceled protected void create Folder I Folder folder Handle I Progress Monitor monitor throws Core Exception try Create the folder resource in the workspace Update Recursive to create any folders which do not exist already if folder Handle exists I Container parent folder Handle get Parent if parent instanceof I Folder I Folder parent exists create Folder I Folder parent monitor if link Target Path null folder Handle create Link link Target Path I Resource ALLOW MISSING LOCAL monitor else folder Handle create false true monitor catch Core Exception e If the folder already existed locally just refresh to get contents if e get Status get Code I Resource Status PATH OCCUPIED folder Handle refresh Local I Resource DEPTH INFINITE new Sub Progress Monitor monitor 500 else throw e if monitor is Canceled throw new Operation Canceled Exception  folderHandle CoreException OperationCanceledException createFolder IFolder folderHandle IProgressMonitor CoreException folderHandle IContainer folderHandle getParent IFolder IFolder createFolder IFolder linkTargetPath folderHandle createLink linkTargetPath IResource ALLOW_MISSING_LOCAL folderHandle CoreException getStatus getCode IResourceStatus PATH_OCCUPIED folderHandle refreshLocal IResource DEPTH_INFINITE SubProgressMonitor isCanceled OperationCanceledException
Creates a folder resource handle for the folder with the given workspace path This method does not create the folder resource this is the responsibility of code create Folder code param folder Path the path of the folder resource to create a handle for return the new folder resource handle see create Folder protected I Folder create Folder Handle I Path folder Path return IDE Workbench Plugin get Plugin Workspace get Root get Folder folder Path  createFolder folderPath createFolder IFolder createFolderHandle IPath folderPath IDEWorkbenchPlugin getPluginWorkspace getRoot getFolder folderPath
Creates the link target path if a link target has been specified protected void create Link Target String link Target linked Resource Group get Link Target if link Target null link Target Path new Path link Target else link Target Path null  createLinkTarget linkTarget linkedResourceGroup getLinkTarget linkTarget linkTargetPath linkTarget linkTargetPath
Workspace Modify Operation op new Workspace Modify Operation null public void execute I Progress Monitor monitor throws Core Exception try monitor begin Task IDE Workbench Messages get String Wizard New Folder Creation Page progress 2000 NON NLS 1 Container Generator generator new Container Generator container Path generator generate Container new Sub Progress Monitor monitor 1000 create Folder new Folder Handle new Sub Progress Monitor monitor 1000 finally monitor done  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException beginTask IDEWorkbenchMessages getString WizardNewFolderCreationPage ContainerGenerator ContainerGenerator containerPath generateContainer SubProgressMonitor createFolder newFolderHandle SubProgressMonitor
Creates a new folder resource in the selected container and with the selected name Creates any missing resource containers along the path does nothing if the container resources already exist p In normal usage this method is invoked after the user has pressed Finish on the wizard the enablement of the Finish button implies that all controls on this page currently contain valid values p p Note that this page caches the new folder once it has been successfully created subsequent invocations of this method will answer the same folder resource without attempting to create it again p p This method should be called within a workspace modify operation since it creates resources p return the created folder resource or code null code if the folder was not created public I Folder create New Folder if new Folder null return new Folder create the new folder and cache it if successful final I Path container Path resource Group get Container Full Path I Path new Folder Path container Path append resource Group get Resource final I Folder new Folder Handle create Folder Handle new Folder Path create Link Target Workspace Modify Operation op new Workspace Modify Operation null public void execute I Progress Monitor monitor throws Core Exception try monitor begin Task IDE Workbench Messages get String Wizard New Folder Creation Page progress 2000 NON NLS 1 Container Generator generator new Container Generator container Path generator generate Container new Sub Progress Monitor monitor 1000 create Folder new Folder Handle new Sub Progress Monitor monitor 1000 finally monitor done try get Container run true true op catch Interrupted Exception e return null catch Invocation Target Exception e if e get Target Exception instanceof Core Exception Error Dialog open Error get Container get Shell Was Utilities get Focus Shell IDE Workbench Messages get String Wizard New Folder Creation Page error Title NON NLS 1 null no special message Core Exception e get Target Exception get Status else Core Exceptions are handled above but unexpected runtime exceptions and errors may still occur IDE Workbench Plugin log Message Format format Exception in 0 get New Folder 1 new Object get Class get Name e get Target Exception NON NLS 1 Message Dialog open Error get Container get Shell IDE Workbench Messages get String Wizard New Folder Creation Page internal Error Title IDE Workbench Messages format Wizard New Folder internal Error new Object e get Target Exception get Message NON NLS 2 NON NLS 1 return null ie one of the steps resulted in a core exception new Folder new Folder Handle return new Folder  IFolder createNewFolder newFolder newFolder IPath containerPath resourceGroup getContainerFullPath IPath newFolderPath containerPath resourceGroup getResource IFolder newFolderHandle createFolderHandle newFolderPath createLinkTarget WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException beginTask IDEWorkbenchMessages getString WizardNewFolderCreationPage ContainerGenerator ContainerGenerator containerPath generateContainer SubProgressMonitor createFolder newFolderHandle SubProgressMonitor getContainer InterruptedException InvocationTargetException getTargetException CoreException ErrorDialog openError getContainer getShell getFocusShell IDEWorkbenchMessages getString WizardNewFolderCreationPage errorTitle CoreException getTargetException getStatus CoreExceptions IDEWorkbenchPlugin MessageFormat getNewFolder getClass getName getTargetException MessageDialog openError getContainer getShell IDEWorkbenchMessages getString WizardNewFolderCreationPage internalErrorTitle IDEWorkbenchMessages WizardNewFolder internalError getTargetException getMessage newFolder newFolderHandle newFolder
Shows hides the advanced option widgets protected void handle Advanced Button Select Shell shell get Shell Point shell Size shell get Size Composite composite Composite get Control if linked Resource Composite null linked Resource Composite dispose linked Resource Composite null composite layout shell set Size shell Size x shell Size y linked Resource Group Height advanced Button set Text IDE Workbench Messages get String show Advanced NON NLS 1 else linked Resource Composite linked Resource Group create Contents linked Resource Parent if linked Resource Group Height 1 Point group Size linked Resource Composite compute Size SWT DEFAULT SWT DEFAULT true linked Resource Group Height group Size y shell set Size shell Size x shell Size y linked Resource Group Height composite layout advanced Button set Text IDE Workbench Messages get String hide Advanced NON NLS 1  handleAdvancedButtonSelect getShell shellSize getSize getControl linkedResourceComposite linkedResourceComposite linkedResourceComposite setSize shellSize shellSize linkedResourceGroupHeight advancedButton setText IDEWorkbenchMessages getString showAdvanced linkedResourceComposite linkedResourceGroup createContents linkedResourceParent linkedResourceGroupHeight groupSize linkedResourceComposite computeSize linkedResourceGroupHeight groupSize setSize shellSize shellSize linkedResourceGroupHeight advancedButton setText IDEWorkbenchMessages getString hideAdvanced
The code Wizard New Folder Creation Page code implementation of this code Listener code method handles all events and enablements for controls on this page Subclasses may extend public void handle Event Event ev set Page Complete validate Page  WizardNewFolderCreationPage handleEvent setPageComplete validatePage
Initializes this page s controls protected void initialize Page Iterator enum current Selection iterator if enum has Next Object next enum next I Resource selected Resource null if next instanceof I Resource selected Resource I Resource next else if next instanceof I Adaptable selected Resource I Resource I Adaptable next get Adapter I Resource class if selected Resource null if selected Resource get Type I Resource FILE selected Resource selected Resource get Parent if selected Resource is Accessible resource Group set Container Full Path selected Resource get Full Path set Page Complete false  initializePage currentSelection hasNext IResource selectedResource IResource selectedResource IResource IAdaptable selectedResource IResource IAdaptable getAdapter IResource selectedResource selectedResource getType IResource selectedResource selectedResource getParent selectedResource isAccessible resourceGroup setContainerFullPath selectedResource getFullPath setPageComplete
public void set Visible boolean visible super set Visible visible if visible resource Group set Focus  setVisible setVisible resourceGroup setFocus
Checks whether the linked resource target is valid Sets the error message accordingly and returns the status return I Status validation result from the Create Linked Resource Group protected I Status validate Linked Resource I Path container Path resource Group get Container Full Path I Path new Folder Path container Path append resource Group get Resource I Folder new Folder Handle create Folder Handle new Folder Path I Status status linked Resource Group validate Link Location new Folder Handle if status get Severity I Status ERROR if first Link Check set Message status get Message else set Error Message status get Message else if status get Severity I Status WARNING set Message status get Message WARNING set Error Message null return status  IStatus CreateLinkedResourceGroup IStatus validateLinkedResource IPath containerPath resourceGroup getContainerFullPath IPath newFolderPath containerPath resourceGroup getResource IFolder newFolderHandle createFolderHandle newFolderPath IStatus linkedResourceGroup validateLinkLocation newFolderHandle getSeverity IStatus firstLinkCheck setMessage getMessage setErrorMessage getMessage getSeverity IStatus setMessage getMessage setErrorMessage
Returns whether this page s controls currently all contain valid values return code true code if all controls are valid and code false code if at least one is invalid protected boolean validate Page boolean valid true I Workspace workspace IDE Workbench Plugin get Plugin Workspace I Status name Status null String folder Name resource Group get Resource if folder Name index Of I Path SEPARATOR 1 String Tokenizer tok new String Tokenizer folder Name String value Of I Path SEPARATOR while tok has More Tokens String path Fragment tok next Token name Status workspace validate Name path Fragment I Resource FOLDER if name Status isOK break If the name status was not set validate using the name if name Status null folder Name length 0 name Status workspace validate Name folder Name I Resource FOLDER if name Status null name Status isOK set Error Message name Status get Message return false if resource Group are All Values Valid if blank name then fail silently if resource Group get Problem Type Resource And Container Group PROBLEM RESOURCE EMPTY resource Group get Problem Type Resource And Container Group PROBLEM CONTAINER EMPTY set Message resource Group get Problem Message set Error Message null else set Error Message resource Group get Problem Message valid false I Status linked Resource Status null if valid linked Resource Status validate Linked Resource if linked Resource Status get Severity I Status ERROR valid false validate Linked Resource sets messages itself if valid linked Resource Status null linked Resource Status isOK set Message null set Error Message null return valid  validatePage IWorkspace IDEWorkbenchPlugin getPluginWorkspace IStatus nameStatus folderName resourceGroup getResource folderName indexOf IPath StringTokenizer StringTokenizer folderName valueOf IPath hasMoreTokens pathFragment nextToken nameStatus validateName pathFragment IResource nameStatus nameStatus folderName nameStatus validateName folderName IResource nameStatus nameStatus setErrorMessage nameStatus getMessage resourceGroup areAllValuesValid resourceGroup getProblemType ResourceAndContainerGroup PROBLEM_RESOURCE_EMPTY resourceGroup getProblemType ResourceAndContainerGroup PROBLEM_CONTAINER_EMPTY setMessage resourceGroup getProblemMessage setErrorMessage setErrorMessage resourceGroup getProblemMessage IStatus linkedResourceStatus linkedResourceStatus validateLinkedResource linkedResourceStatus getSeverity IStatus validateLinkedResource linkedResourceStatus linkedResourceStatus setMessage setErrorMessage

Creates a new resource link wizard page param page Name the name of the page param type specifies the type of resource to link to code I Resource FILE code or code I Resource FOLDER code public Wizard New Link Page String page Name int type super page Name this type type set Page Complete true  pageName IResource IResource WizardNewLinkPage pageName pageName setPageComplete
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e create Link create Link Button get Selection browse Button set Enabled create Link variables Button set Enabled create Link link Target Field set Enabled create Link set Page Complete validate Page  SelectionListener SelectionAdapter widgetSelected SelectionEvent createLink createLinkButton getSelection browseButton setEnabled createLink variablesButton setEnabled createLink linkTargetField setEnabled createLink setPageComplete validatePage
public void create Control Composite parent Font font parent get Font initialize Dialog Units parent top level group Composite top Level new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 top Level set Layout layout top Level set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL top Level set Font font Workbench Help set Help top Level I Help Context Ids NEW LINK WIZARD PAGE final Button create Link Button new Button top Level SWT CHECK if type I Resource FILE create Link Button set Text IDE Workbench Messages get String Wizard New Link Page link File Button NON NLS 1 else create Link Button set Text IDE Workbench Messages get String Wizard New Link Page link Folder Button NON NLS 1 create Link Button set Selection create Link Grid Data data new Grid Data data horizontal Span 3 create Link Button set Layout Data data create Link Button set Font font Selection Listener listener new Selection Adapter public void widget Selected Selection Event e create Link create Link Button get Selection browse Button set Enabled create Link variables Button set Enabled create Link link Target Field set Enabled create Link set Page Complete validate Page create Link Button add Selection Listener listener create Link Location Group top Level create Link validate Page set Error Message null set Message null set Control top Level  createControl getFont initializeDialogUnits topLevel GridLayout GridLayout numColumns topLevel setLayout topLevel setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL topLevel setFont WorkbenchHelp setHelp topLevel IHelpContextIds NEW_LINK_WIZARD_PAGE createLinkButton topLevel IResource createLinkButton setText IDEWorkbenchMessages getString WizardNewLinkPage linkFileButton createLinkButton setText IDEWorkbenchMessages getString WizardNewLinkPage linkFolderButton createLinkButton setSelection createLink GridData GridData horizontalSpan createLinkButton setLayoutData createLinkButton setFont SelectionListener SelectionAdapter widgetSelected SelectionEvent createLink createLinkButton getSelection browseButton setEnabled createLink variablesButton setEnabled createLink linkTargetField setEnabled createLink setPageComplete validatePage createLinkButton addSelectionListener createLinkLocationGroup topLevel createLink validatePage setErrorMessage setMessage setControl topLevel
link Target Field set Enabled enabled link Target Field add Modify Listener new Modify Listener public void modify Text Modify Event e set Page Complete validate Page  linkTargetField setEnabled linkTargetField addModifyListener ModifyListener modifyText ModifyEvent setPageComplete validatePage
browse Button set Text IDE Workbench Messages get String Wizard New Link Page browse Button NON NLS 1 browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Link Target Browse Button Pressed  browseButton setText IDEWorkbenchMessages getString WizardNewLinkPage browseButton browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLinkTargetBrowseButtonPressed
variables Button set Text IDE Workbench Messages get String Wizard New Link Page variables Button NON NLS 1 variables Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Variables Button Pressed  variablesButton setText IDEWorkbenchMessages getString WizardNewLinkPage variablesButton variablesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleVariablesButtonPressed
Creates the link target location widgets param location Group the parent composite param enabled sets the initial enabled state of the widgets private void create Link Location Group Composite location Group boolean enabled Font font location Group get Font Label fill new Label location Group SWT NONE Grid Data data new Grid Data Button button new Button location Group SWT CHECK data width Hint button compute Size SWT DEFAULT SWT DEFAULT x button dispose fill set Layout Data data link target location entry field link Target Field new Text location Group SWT BORDER data new Grid Data Grid Data FILL HORIZONTAL link Target Field set Layout Data data link Target Field set Font font link Target Field set Enabled enabled link Target Field add Modify Listener new Modify Listener public void modify Text Modify Event e set Page Complete validate Page if initial Link Target null link Target Field set Text initial Link Target browse button browse Button new Button location Group SWT PUSH set Button Layout Data browse Button browse Button set Font font browse Button set Text IDE Workbench Messages get String Wizard New Link Page browse Button NON NLS 1 browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Link Target Browse Button Pressed browse Button set Enabled enabled fill new Label location Group SWT NONE data new Grid Data data horizontal Span 2 fill set Layout Data data variables button variables Button new Button location Group SWT PUSH set Button Layout Data variables Button variables Button set Font font variables Button set Text IDE Workbench Messages get String Wizard New Link Page variables Button NON NLS 1 variables Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Variables Button Pressed variables Button set Enabled enabled  locationGroup createLinkLocationGroup locationGroup locationGroup getFont locationGroup GridData GridData locationGroup widthHint computeSize setLayoutData linkTargetField locationGroup GridData GridData FILL_HORIZONTAL linkTargetField setLayoutData linkTargetField setFont linkTargetField setEnabled linkTargetField addModifyListener ModifyListener modifyText ModifyEvent setPageComplete validatePage initialLinkTarget linkTargetField setText initialLinkTarget browseButton locationGroup setButtonLayoutData browseButton browseButton setFont browseButton setText IDEWorkbenchMessages getString WizardNewLinkPage browseButton browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLinkTargetBrowseButtonPressed browseButton setEnabled locationGroup GridData horizontalSpan setLayoutData variablesButton locationGroup setButtonLayoutData variablesButton variablesButton setFont variablesButton setText IDEWorkbenchMessages getString WizardNewLinkPage variablesButton variablesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleVariablesButtonPressed variablesButton setEnabled
Returns the link target location entered by the user return the link target location entered by the user null if the user choose not to create a link public String get Link Target if create Link link Target Field null link Target Field is Disposed false return link Target Field get Text return null  getLinkTarget createLink linkTargetField linkTargetField isDisposed linkTargetField getText
Opens a file or directory browser depending on the link type private void handle Link Target Browse Button Pressed String link Target Name link Target Field get Text File file null String selection null if equals link Target Name false NON NLS 1 file new File link Target Name if file exists false file null if type I Resource FILE File Dialog dialog new File Dialog get Shell if file null if file is File dialog set File Name link Target Name else dialog set Filter Path link Target Name selection dialog open else Directory Dialog dialog new Directory Dialog get Shell if file null if file is File link Target Name file get Parent if link Target Name null dialog set Filter Path link Target Name dialog set Message IDE Workbench Messages get String Wizard New Link Page target Selection Label NON NLS 1 selection dialog open if selection null link Target Field set Text selection  handleLinkTargetBrowseButtonPressed linkTargetName linkTargetField getText linkTargetName linkTargetName IResource FileDialog FileDialog getShell isFile setFileName linkTargetName setFilterPath linkTargetName DirectoryDialog DirectoryDialog getShell isFile linkTargetName getParent linkTargetName setFilterPath linkTargetName setMessage IDEWorkbenchMessages getString WizardNewLinkPage targetSelectionLabel linkTargetField setText
Opens a path variable selection dialog private void handle Variables Button Pressed Path Variable Selection Dialog dialog new Path Variable Selection Dialog get Shell type if dialog open I Dialog Constants OK ID String variable Names String dialog get Result if variable Names null I Path Variable Manager path Variable Manager Resources Plugin get Workspace get Path Variable Manager I Path path path Variable Manager get Value variable Names 0 if path null link Target Field set Text path toOS String  handleVariablesButtonPressed PathVariableSelectionDialog PathVariableSelectionDialog getShell IDialogConstants OK_ID variableNames getResult variableNames IPathVariableManager pathVariableManager ResourcesPlugin getWorkspace getPathVariableManager IPath pathVariableManager getValue variableNames linkTargetField setText toOSString
Sets the container to use for link validation This should be the parent of the new resource that is being linked param container the container to use for link validation public void set Container I Container container this container container  setContainer IContainer
Sets the value of the link target field param target the value of the link target field public void set Link Target String target initial Link Target target if link Target Field null link Target Field is Disposed false link Target Field set Text target  setLinkTarget initialLinkTarget linkTargetField linkTargetField isDisposed linkTargetField setText
Validates the type of the given file against the link type specified during page creation param link Target File file to validate return boolean code true code if the link target type is valid and code false code otherwise private boolean validate File Type File link Target File boolean valid true if type I Resource FILE link Target File is File false set Error Message IDE Workbench Messages get String Wizard New Link Page link Target Not File NON NLS 1 valid false else if type I Resource FOLDER link Target File is Directory false set Error Message IDE Workbench Messages get String Wizard New Link Page link Target Not Folder NON NLS 1 valid false return valid  linkTargetFile validateFileType linkTargetFile IResource linkTargetFile isFile setErrorMessage IDEWorkbenchMessages getString WizardNewLinkPage linkTargetNotFile IResource linkTargetFile isDirectory setErrorMessage IDEWorkbenchMessages getString WizardNewLinkPage linkTargetNotFolder
Validates the name of the link target param link Target Name link target name to validate return boolean code true code if the link target name is valid and code false code otherwise private boolean validate Link Target Name String link Target Name boolean valid true if equals link Target Name NON NLS 1 set Error Message IDE Workbench Messages get String Wizard New Link Page link Target Empty NON NLS 1 valid false else I Path path new Path NON NLS 1 if path is Valid Path link Target Name false set Error Message IDE Workbench Messages get String Wizard New Link Page link Target Invalid NON NLS 1 valid false return valid  linkTargetName validateLinkTargetName linkTargetName linkTargetName setErrorMessage IDEWorkbenchMessages getString WizardNewLinkPage linkTargetEmpty IPath isValidPath linkTargetName setErrorMessage IDEWorkbenchMessages getString WizardNewLinkPage linkTargetInvalid
Returns whether this page s controls currently all contain valid values return code true code if all controls are valid and code false code if at least one is invalid private boolean validate Page boolean valid true I Workspace workspace IDE Workbench Plugin get Plugin Workspace if create Link String link Target Name link Target Field get Text valid validate Link Target Name link Target Name if valid File link Target File new Path link Target Name to File if link Target File exists false set Error Message IDE Workbench Messages get String Wizard New Link Page link Target Non Existent NON NLS 1 valid false else I Status location Status workspace validate Link Location container new Path link Target Name if location Status isOK false set Error Message IDE Workbench Messages get String Wizard New Link Page link Target Location Invalid NON NLS 1 valid false else valid validate File Type link Target File Avoid draw flicker by clearing error message if all is valid if valid set Message null set Error Message null return valid  validatePage IWorkspace IDEWorkbenchPlugin getPluginWorkspace createLink linkTargetName linkTargetField getText validateLinkTargetName linkTargetName linkTargetFile linkTargetName toFile linkTargetFile setErrorMessage IDEWorkbenchMessages getString WizardNewLinkPage linkTargetNonExistent IStatus locationStatus validateLinkLocation linkTargetName locationStatus setErrorMessage IDEWorkbenchMessages getString WizardNewLinkPage linkTargetLocationInvalid validateFileType linkTargetFile setMessage setErrorMessage

private Listener name Modify Listener new Listener public void handle Event Event e boolean valid validate Page set Page Complete valid if valid set Location For Selection  nameModifyListener handleEvent validatePage setPageComplete setLocationForSelection
private Listener location Modify Listener new Listener public void handle Event Event e set Page Complete validate Page  locationModifyListener handleEvent setPageComplete validatePage
private static final int SIZING TEXT FIELD WIDTH 250 Creates a new project creation wizard page param page Name the name of this page public Wizard New Project Creation Page String page Name super page Name set Page Complete false custom Location Field Value NON NLS 1  SIZING_TEXT_FIELD_WIDTH pageName WizardNewProjectCreationPage pageName pageName setPageComplete customLocationFieldValue
non Javadoc Method declared on I Dialog Page public void create Control Composite parent Composite composite new Composite parent SWT NULL composite set Font parent get Font initialize Dialog Units parent Workbench Help set Help composite I Help Context Ids NEW PROJECT WIZARD PAGE composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL BOTH create Project Name Group composite create Project Location Group composite set Page Complete validate Page Show description on opening set Error Message null set Message null set Control composite  IDialogPage createControl setFont getFont initializeDialogUnits WorkbenchHelp setHelp IHelpContextIds NEW_PROJECT_WIZARD_PAGE setLayout GridLayout setLayoutData GridData GridData FILL_BOTH createProjectNameGroup createProjectLocationGroup setPageComplete validatePage setErrorMessage setMessage setControl
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e use Defaults use Defaults Button get Selection browse Button set Enabled use Defaults location Path Field set Enabled use Defaults location Label set Enabled use Defaults if use Defaults custom Location Field Value location Path Field get Text set Location For Selection else location Path Field set Text custom Location Field Value  SelectionListener SelectionAdapter widgetSelected SelectionEvent useDefaults useDefaultsButton getSelection browseButton setEnabled useDefaults locationPathField setEnabled useDefaults locationLabel setEnabled useDefaults useDefaults customLocationFieldValue locationPathField getText setLocationForSelection locationPathField setText customLocationFieldValue
Creates the project location specification controls param parent the parent composite private final void create Project Location Group Composite parent Font font parent get Font project specification group Group project Group new Group parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 project Group set Layout layout project Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL project Group set Font font project Group set Text IDE Workbench Messages get String Wizard New Project Creation Page project Contents Group Label NON NLS 1 final Button use Defaults Button new Button project Group SWT CHECK SWT RIGHT use Defaults Button set Text IDE Workbench Messages get String Wizard New Project Creation Page use Default Label NON NLS 1 use Defaults Button set Selection use Defaults use Defaults Button set Font font Grid Data button Data new Grid Data button Data horizontal Span 3 use Defaults Button set Layout Data button Data create User Specified Project Location Group project Group use Defaults Selection Listener listener new Selection Adapter public void widget Selected Selection Event e use Defaults use Defaults Button get Selection browse Button set Enabled use Defaults location Path Field set Enabled use Defaults location Label set Enabled use Defaults if use Defaults custom Location Field Value location Path Field get Text set Location For Selection else location Path Field set Text custom Location Field Value use Defaults Button add Selection Listener listener  createProjectLocationGroup getFont projectGroup GridLayout GridLayout numColumns projectGroup setLayout projectGroup setLayoutData GridData GridData FILL_HORIZONTAL projectGroup setFont projectGroup setText IDEWorkbenchMessages getString WizardNewProjectCreationPage projectContentsGroupLabel useDefaultsButton projectGroup useDefaultsButton setText IDEWorkbenchMessages getString WizardNewProjectCreationPage useDefaultLabel useDefaultsButton setSelection useDefaults useDefaultsButton setFont GridData buttonData GridData buttonData horizontalSpan useDefaultsButton setLayoutData buttonData createUserSpecifiedProjectLocationGroup projectGroup useDefaults SelectionListener SelectionAdapter widgetSelected SelectionEvent useDefaults useDefaultsButton getSelection browseButton setEnabled useDefaults locationPathField setEnabled useDefaults locationLabel setEnabled useDefaults useDefaults customLocationFieldValue locationPathField getText setLocationForSelection locationPathField setText customLocationFieldValue useDefaultsButton addSelectionListener
Creates the project name specification controls param parent the parent composite private final void create Project Name Group Composite parent project specification group Composite project Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 project Group set Layout layout project Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL new project label Label project Label new Label project Group SWT NONE project Label set Text IDE Workbench Messages get String Wizard New Project Creation Page name Label NON NLS 1 project Label set Font parent get Font new project name entry field project Name Field new Text project Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH project Name Field set Layout Data data project Name Field set Font parent get Font Set the initial value first before listener to avoid handling an event during the creation if initial Project Field Value null project Name Field set Text initial Project Field Value project Name Field add Listener SWT Modify name Modify Listener  createProjectNameGroup projectGroup GridLayout GridLayout numColumns projectGroup setLayout projectGroup setLayoutData GridData GridData FILL_HORIZONTAL projectLabel projectGroup projectLabel setText IDEWorkbenchMessages getString WizardNewProjectCreationPage nameLabel projectLabel setFont getFont projectNameField projectGroup GridData GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH projectNameField setLayoutData projectNameField setFont getFont initialProjectFieldValue projectNameField setText initialProjectFieldValue projectNameField addListener nameModifyListener
browse Button set Text IDE Workbench Messages get String Wizard New Project Creation Page browse Label NON NLS 1 browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Location Browse Button Pressed  browseButton setText IDEWorkbenchMessages getString WizardNewProjectCreationPage browseLabel browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLocationBrowseButtonPressed
Creates the project location specification controls param project Group the parent composite param boolean the initial enabled state of the widgets created private void create User Specified Project Location Group Composite project Group boolean enabled Font font project Group get Font location label location Label new Label project Group SWT NONE location Label set Text IDE Workbench Messages get String Wizard New Project Creation Page location Label NON NLS 1 location Label set Enabled enabled location Label set Font font project location entry field location Path Field new Text project Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH location Path Field set Layout Data data location Path Field set Enabled enabled location Path Field set Font font browse button browse Button new Button project Group SWT PUSH browse Button set Text IDE Workbench Messages get String Wizard New Project Creation Page browse Label NON NLS 1 browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Location Browse Button Pressed browse Button set Enabled enabled browse Button set Font font set Button Layout Data browse Button Set the initial value first before listener to avoid handling an event during the creation if initial Location Field Value null location Path Field set Text Platform get Location toOS String else location Path Field set Text initial Location Field Value location Path Field add Listener SWT Modify location Modify Listener  projectGroup createUserSpecifiedProjectLocationGroup projectGroup projectGroup getFont locationLabel projectGroup locationLabel setText IDEWorkbenchMessages getString WizardNewProjectCreationPage locationLabel locationLabel setEnabled locationLabel setFont locationPathField projectGroup GridData GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH locationPathField setLayoutData locationPathField setEnabled locationPathField setFont browseButton projectGroup browseButton setText IDEWorkbenchMessages getString WizardNewProjectCreationPage browseLabel browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLocationBrowseButtonPressed browseButton setEnabled browseButton setFont setButtonLayoutData browseButton initialLocationFieldValue locationPathField setText getLocation toOSString locationPathField setText initialLocationFieldValue locationPathField addListener locationModifyListener
Returns the current project location path as entered by the user or its anticipated initial value Note that if the default has been returned the path in a project description used to create a project should not be set return the project location path or its anticipated initial value public I Path get Location Path if use Defaults return Platform get Location return new Path get Project Location Field Value  IPath getLocationPath useDefaults getLocation getProjectLocationFieldValue
Creates a project resource handle for the current project name field value p This method does not create the project resource this is the responsibility of code I Project create code invoked by the new project resource wizard p return the new project resource handle public I Project get Project Handle return Resources Plugin get Workspace get Root get Project get Project Name  IProject IProject getProjectHandle ResourcesPlugin getWorkspace getRoot getProject getProjectName
Returns the current project name as entered by the user or its anticipated initial value return the project name its anticipated initial value or code null code if no project name is known public String get Project Name if project Name Field null return initial Project Field Value return get Project Name Field Value  getProjectName projectNameField initialProjectFieldValue getProjectNameFieldValue
Returns the value of the project name field with leading and trailing spaces removed return the project name in the field private String get Project Name Field Value if project Name Field null return NON NLS 1 else return project Name Field get Text trim  getProjectNameFieldValue projectNameField projectNameField getText
Returns the value of the project location field with leading and trailing spaces removed return the project location directory in the field private String get Project Location Field Value if location Path Field null return NON NLS 1 else return location Path Field get Text trim  getProjectLocationFieldValue locationPathField locationPathField getText
Open an appropriate directory browser void handle Location Browse Button Pressed Directory Dialog dialog new Directory Dialog location Path Field get Shell dialog set Message IDE Workbench Messages get String Wizard New Project Creation Page directory Label NON NLS 1 String dir Name get Project Location Field Value if dir Name equals NON NLS 1 File path new File dir Name if path exists dialog set Filter Path new Path dir Name toOS String String selected Directory dialog open if selected Directory null custom Location Field Value selected Directory location Path Field set Text custom Location Field Value  handleLocationBrowseButtonPressed DirectoryDialog DirectoryDialog locationPathField getShell setMessage IDEWorkbenchMessages getString WizardNewProjectCreationPage directoryLabel dirName getProjectLocationFieldValue dirName dirName setFilterPath dirName toOSString selectedDirectory selectedDirectory customLocationFieldValue selectedDirectory locationPathField setText customLocationFieldValue
Sets the initial project name that this page will use when created The name is ignored if the create Control Composite method has already been called Leading and trailing spaces in the name are ignored param name initial project name for this page public void set Initial Project Name String name if name null initial Project Field Value null else initial Project Field Value name trim initial Location Field Value get Default Location For Name initial Project Field Value  createControl setInitialProjectName initialProjectFieldValue initialProjectFieldValue initialLocationFieldValue getDefaultLocationForName initialProjectFieldValue
Set the location to the default location if we are set to use Defaults void set Location For Selection if use Defaults location Path Field set Text get Default Location For Name get Project Name Field Value  useDefaults setLocationForSelection useDefaults locationPathField setText getDefaultLocationForName getProjectNameFieldValue
Get the defualt location for the provided name return String param String private String get Default Location For Name String name Value I Path default Path Platform get Location append name Value return default Path toOS String  getDefaultLocationForName nameValue IPath defaultPath getLocation nameValue defaultPath toOSString
Returns whether this page s controls currently all contain valid values return code true code if all controls are valid and code false code if at least one is invalid protected boolean validate Page I Workspace workspace IDE Workbench Plugin get Plugin Workspace String project Field Contents get Project Name Field Value if project Field Contents equals NON NLS 1 set Error Message null set Message IDE Workbench Messages get String Wizard New Project Creation Page project Name Empty NON NLS 1 return false I Status name Status workspace validate Name project Field Contents I Resource PROJECT if name Status isOK set Error Message name Status get Message return false String location Field Contents get Project Location Field Value if location Field Contents equals NON NLS 1 set Error Message null set Message IDE Workbench Messages get String Wizard New Project Creation Page project Location Empty NON NLS 1 return false I Path path new Path NON NLS 1 if path is Valid Path location Field Contents set Error Message IDE Workbench Messages get String Wizard New Project Creation Page location Error NON NLS 1 return false I Path project Path new Path location Field Contents if use Defaults Platform get Location is Prefix Of project Path set Error Message IDE Workbench Messages get String Wizard New Project Creation Page default Location Error NON NLS 1 return false I Project handle get Project Handle if handle exists set Error Message IDE Workbench Messages get String Wizard New Project Creation Page project Exists Message NON NLS 1 return false If not using the default value validate the location if use Defaults I Status location Status workspace validate Project Location handle project Path if location Status isOK set Error Message location Status get Message NON NLS 1 return false set Error Message null set Message null return true  validatePage IWorkspace IDEWorkbenchPlugin getPluginWorkspace projectFieldContents getProjectNameFieldValue projectFieldContents setErrorMessage setMessage IDEWorkbenchMessages getString WizardNewProjectCreationPage projectNameEmpty IStatus nameStatus validateName projectFieldContents IResource nameStatus setErrorMessage nameStatus getMessage locationFieldContents getProjectLocationFieldValue locationFieldContents setErrorMessage setMessage IDEWorkbenchMessages getString WizardNewProjectCreationPage projectLocationEmpty IPath isValidPath locationFieldContents setErrorMessage IDEWorkbenchMessages getString WizardNewProjectCreationPage locationError IPath projectPath locationFieldContents useDefaults getLocation isPrefixOf projectPath setErrorMessage IDEWorkbenchMessages getString WizardNewProjectCreationPage defaultLocationError IProject getProjectHandle setErrorMessage IDEWorkbenchMessages getString WizardNewProjectCreationPage projectExistsMessage useDefaults IStatus locationStatus validateProjectLocation projectPath locationStatus setErrorMessage locationStatus getMessage setErrorMessage setMessage
public void set Visible boolean visible super set Visible visible if visible project Name Field set Focus  setVisible setVisible projectNameField setFocus
Returns the use Defaults return boolean public boolean use Defaults return use Defaults  useDefaults useDefaults useDefaults

private static final int PROJECT LIST MULTIPLIER 15 Creates a new project reference wizard page param page Name the name of this page public Wizard New Project Reference Page String page Name super page Name  PROJECT_LIST_MULTIPLIER pageName WizardNewProjectReferencePage pageName pageName
non Javadoc Method declared on I Dialog Page public void create Control Composite parent Font font parent get Font Composite composite new Composite parent SWT NONE composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL composite set Font font Workbench Help set Help composite I Help Context Ids NEW PROJECT REFERENCE WIZARD PAGE Label reference Label new Label composite SWT NONE reference Label set Text REFERENCED PROJECTS TITLE reference Label set Font font reference Projects Viewer Checkbox Table Viewer new Check List composite SWT BORDER reference Projects Viewer get Table set Font composite get Font Grid Data data new Grid Data data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true data height Hint get Default Font Height reference Projects Viewer get Table PROJECT LIST MULTIPLIER reference Projects Viewer get Table set Layout Data data reference Projects Viewer set Label Provider Workbench Label Provider get Decorating Workbench Label Provider reference Projects Viewer set Content Provider get Content Provider reference Projects Viewer set Input Resources Plugin get Workspace set Control composite  IDialogPage createControl getFont setLayout GridLayout setLayoutData GridData GridData FILL_HORIZONTAL setFont WorkbenchHelp setHelp IHelpContextIds NEW_PROJECT_REFERENCE_WIZARD_PAGE referenceLabel referenceLabel setText REFERENCED_PROJECTS_TITLE referenceLabel setFont referenceProjectsViewer CheckboxTableViewer newCheckList referenceProjectsViewer getTable setFont getFont GridData GridData horizontalAlignment GridData grabExcessHorizontalSpace heightHint getDefaultFontHeight referenceProjectsViewer getTable PROJECT_LIST_MULTIPLIER referenceProjectsViewer getTable setLayoutData referenceProjectsViewer setLabelProvider WorkbenchLabelProvider getDecoratingWorkbenchLabelProvider referenceProjectsViewer setContentProvider getContentProvider referenceProjectsViewer setInput ResourcesPlugin getWorkspace setControl
return new Workbench Content Provider public Object get Children Object element if element instanceof I Workspace return new Object 0 I Project projects I Workspace element get Root get Projects return projects null new Object 0 projects  WorkbenchContentProvider getChildren IWorkspace IProject IWorkspace getRoot getProjects
Returns a content provider for the reference project viewer It will return all projects in the workspace return the content provider protected I Structured Content Provider get Content Provider return new Workbench Content Provider public Object get Children Object element if element instanceof I Workspace return new Object 0 I Project projects I Workspace element get Root get Projects return projects null new Object 0 projects  IStructuredContentProvider getContentProvider WorkbenchContentProvider getChildren IWorkspace IProject IWorkspace getRoot getProjects
Get the defualt widget height for the supplied control return int param control the control being queried about fonts param lines the number of lines to be shown on the table private static int get Default Font Height Control control int lines Font Data viewer Font Data control get Font get Font Data int font Height 10 If we have no font data use our guess if viewer Font Data length 0 font Height viewer Font Data 0 get Height return lines font Height  getDefaultFontHeight FontData viewerFontData getFont getFontData fontHeight viewerFontData fontHeight viewerFontData getHeight fontHeight
Returns the referenced projects selected by the user return the referenced projects public I Project get Referenced Projects Object elements reference Projects Viewer get Checked Elements I Project projects new I Project elements length System arraycopy elements 0 projects 0 elements length return projects  IProject getReferencedProjects referenceProjectsViewer getCheckedElements IProject IProject

Creates an import wizard page If the initial resource selection contains exactly one container resource then it will be used as the default import destination param name the name of the page param selection the current resource selection protected Wizard Resource Import Page String name I Structured Selection selection super name Initialize to null current Resource Selection null if selection size 1 Object first Element selection get First Element if first Element instanceof I Adaptable Object resource I Adaptable first Element get Adapter I Resource class if resource null current Resource Selection I Resource resource if current Resource Selection null if current Resource Selection get Type I Resource FILE current Resource Selection current Resource Selection get Parent if current Resource Selection is Accessible current Resource Selection null  WizardResourceImportPage IStructuredSelection currentResourceSelection firstElement getFirstElement firstElement IAdaptable IAdaptable firstElement getAdapter IResource currentResourceSelection IResource currentResourceSelection currentResourceSelection getType IResource currentResourceSelection currentResourceSelection getParent currentResourceSelection isAccessible currentResourceSelection
The code Wizard Resource Import Page code implementation of this code Wizard Data Transfer Page code method returns code true code Subclasses may override this method protected boolean allow New Container Name return true  WizardResourceImportPage WizardDataTransferPage allowNewContainerName
non Javadoc Method declared on I Dialog Page public void create Control Composite parent initialize Dialog Units parent Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL composite set Size composite compute Size SWT DEFAULT SWT DEFAULT composite set Font parent get Font create Source Group composite create Destination Group composite create Options Group composite restore Widget Values update Widget Enablements set Page Complete determine Page Completion set Control composite  IDialogPage createControl initializeDialogUnits setLayout GridLayout setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL setSize computeSize setFont getFont createSourceGroup createDestinationGroup createOptionsGroup restoreWidgetValues updateWidgetEnablements setPageComplete determinePageCompletion setControl
Creates the import destination specification controls param parent the parent control protected final void create Destination Group Composite parent container specification group Composite container Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 container Group set Layout layout container Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL container Group set Font parent get Font container label Label resources Label new Label container Group SWT NONE resources Label set Text IDE Workbench Messages get String Wizard Import Page folder NON NLS 1 resources Label set Font parent get Font container name entry field container Name Field new Text container Group SWT SINGLE SWT BORDER container Name Field add Listener SWT Modify this Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH container Name Field set Layout Data data container Name Field set Font parent get Font container browse button container Browse Button new Button container Group SWT PUSH container Browse Button set Text IDE Workbench Messages get String Wizard Import Page browse2 NON NLS 1 container Browse Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL container Browse Button add Listener SWT Selection this container Browse Button set Font parent get Font set Button Layout Data container Browse Button initial Populate Container Field  createDestinationGroup containerGroup GridLayout GridLayout numColumns containerGroup setLayout containerGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL containerGroup setFont getFont resourcesLabel containerGroup resourcesLabel setText IDEWorkbenchMessages getString WizardImportPage resourcesLabel setFont getFont containerNameField containerGroup containerNameField addListener GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH containerNameField setLayoutData containerNameField setFont getFont containerBrowseButton containerGroup containerBrowseButton setText IDEWorkbenchMessages getString WizardImportPage containerBrowseButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL containerBrowseButton addListener containerBrowseButton setFont getFont setButtonLayoutData containerBrowseButton initialPopulateContainerField
Create the import source selection widget protected void create File Selection Group Composite parent Just create with a dummy root this selection Group new Resource Tree And List Group parent new File System Element Dummy null true NON NLS 1 get Folder Provider new Workbench Label Provider get File Provider new Workbench Label Provider SWT NONE Dialog Util in Regular Font Mode parent I Check State Listener listener new I Check State Listener public void check State Changed Check State Changed Event event update Widget Enablements Workbench Viewer Sorter sorter new Workbench Viewer Sorter this selection Group set Tree Sorter sorter this selection Group set List Sorter sorter this selection Group add Check State Listener listener  createFileSelectionGroup selectionGroup ResourceTreeAndListGroup FileSystemElement getFolderProvider WorkbenchLabelProvider getFileProvider WorkbenchLabelProvider DialogUtil inRegularFontMode ICheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent updateWidgetEnablements WorkbenchViewerSorter WorkbenchViewerSorter selectionGroup setTreeSorter selectionGroup setListSorter selectionGroup addCheckStateListener
Creates the import source specification controls p Subclasses must implement this method p param parent the parent control 
see Wizard Data Transfer Page get Error Dialog Title protected String get Error Dialog Title return IDE Workbench Messages get String Wizard Import Page error Dialog Title NON NLS 1  WizardDataTransferPage getErrorDialogTitle getErrorDialogTitle IDEWorkbenchMessages getString WizardImportPage errorDialogTitle
Returns the path of the container resource specified in the container name entry field or code null code if no name has been typed in p The container specified by the full path might not exist and would need to be created p return the full path of the container resource specified in the container name entry field or code null code protected I Path get Container Full Path I Workspace workspace IDE Workbench Plugin get Plugin Workspace make the path absolute to allow for optional leading slash I Path test Path get Resource Path if test Path equals workspace get Root get Full Path return test Path I Status result workspace validate Path test Path to String I Resource PROJECT I Resource FOLDER I Resource ROOT if result isOK return test Path return null  IPath getContainerFullPath IWorkspace IDEWorkbenchPlugin getPluginWorkspace IPath testPath getResourcePath testPath getRoot getFullPath testPath IStatus validatePath testPath toString IResource IResource IResource testPath
Returns a content provider for code File System Element code s that returns only files as children  FileSystemElement
protected abstract I Tree Content Provider get File Provider Returns a content provider for code File System Element code s that returns only folders as children  ITreeContentProvider getFileProvider FileSystemElement
protected abstract I Tree Content Provider get Folder Provider Return the path for the resource field return I Path protected I Path get Resource Path return get Path From Text this container Name Field  ITreeContentProvider getFolderProvider IPath IPath getResourcePath getPathFromText containerNameField
Returns this page s list of currently specified resources to be imported This is the primary resource selection facility accessor for subclasses return a list of resources currently selected for export element type code I Resource code protected java util List get Selected Resources return this selection Group get All Checked List Items  IResource getSelectedResources selectionGroup getAllCheckedListItems
Returns this page s list of currently specified resources to be imported filtered by the I Element Filter protected void get Selected Resources I Element Filter filter I Progress Monitor monitor throws Interrupted Exception this selection Group get All Checked List Items filter monitor  IElementFilter getSelectedResources IElementFilter IProgressMonitor InterruptedException selectionGroup getAllCheckedListItems
Returns the container resource specified in the container name entry field or code null code if such a container does not exist in the workbench return the container resource specified in the container name entry field or code null code protected I Container get Specified Container I Workspace workspace IDE Workbench Plugin get Plugin Workspace I Path path get Container Full Path if workspace get Root exists path return I Container workspace get Root find Member path return null  IContainer getSpecifiedContainer IWorkspace IDEWorkbenchPlugin getPluginWorkspace IPath getContainerFullPath getRoot IContainer getRoot findMember
Returns a collection of the currently specified resource types for use by the type selection dialog protected java util List get Types To Import return selected Types  getTypesToImport selectedTypes
Opens a container selection dialog and displays the user s subsequent container resource selection in this page s container name field protected void handle Container Browse Button Pressed see if the user wishes to modify this container selection I Path container Path query For Container get Specified Container IDE Workbench Messages get String Wizard Import Page select Folder Label NON NLS 1 IDE Workbench Messages get String Wizard Import Page select Folder Title NON NLS 1 if a container was selected then put its name in the container name field if container Path null null means user cancelled set Error Message null container Name Field set Text container Path make Relative to String  handleContainerBrowseButtonPressed IPath containerPath queryForContainer getSpecifiedContainer IDEWorkbenchMessages getString WizardImportPage selectFolderLabel IDEWorkbenchMessages getString WizardImportPage selectFolderTitle containerPath setErrorMessage containerNameField setText containerPath makeRelative toString
The code Wizard Resource Import Page code implementation of this code Listener code method handles all events and enablements for controls on this page Subclasses may extend param event Event public void handle Event Event event Widget source event widget if source container Browse Button handle Container Browse Button Pressed update Widget Enablements  WizardResourceImportPage handleEvent containerBrowseButton handleContainerBrowseButtonPressed updateWidgetEnablements
Open a registered type selection dialog and note the selections in the receivers types to export field protected void handle Types Edit Button Pressed Type Filtering Dialog dialog new Type Filtering Dialog get Container get Shell get Types To Import dialog open Object new Selected Types dialog get Result if new Selected Types null ie did not press Cancel this selected Types new Array List new Selected Types length for int i 0 i new Selected Types length i this selected Types add new Selected Types i setup Selections Based On Selected Types  handleTypesEditButtonPressed TypeFilteringDialog TypeFilteringDialog getContainer getShell getTypesToImport newSelectedTypes getResult newSelectedTypes selectedTypes ArrayList newSelectedTypes newSelectedTypes selectedTypes newSelectedTypes setupSelectionsBasedOnSelectedTypes
Sets the initial contents of the container name field protected final void initial Populate Container Field if initial Container Field Value null container Name Field set Text initial Container Field Value else if current Resource Selection null container Name Field set Text current Resource Selection get Full Path make Relative to String  initialPopulateContainerField initialContainerFieldValue containerNameField setText initialContainerFieldValue currentResourceSelection containerNameField setText currentResourceSelection getFullPath makeRelative toString
Set all of the selections in the selection group to value param value boolean protected void set All Selections boolean value selection Group set All Selections value  setAllSelections selectionGroup setAllSelections
Sets the value of this page s container resource field or stores it for future use if this page s controls do not exist yet param value String public void set Container Field Value String value if container Name Field null initial Container Field Value value else container Name Field set Text value  setContainerFieldValue containerNameField initialContainerFieldValue containerNameField setText
Update the tree to only select those elements that match the selected types Do nothing by default protected void setup Selections Based On Selected Types  setupSelectionsBasedOnSelectedTypes
Runnable runnable new Runnable public void run selection Group update Selections map  selectionGroup updateSelections
Update the selections with those in map param map Map key tree elements values Lists of list elements protected void update Selections final Map map Runnable runnable new Runnable public void run selection Group update Selections map Busy Indicator show While get Shell get Display runnable  updateSelections selectionGroup updateSelections BusyIndicator showWhile getShell getDisplay
Check if widgets are enabled or disabled by a change in the dialog protected void update Widget Enablements boolean page Complete determine Page Completion set Page Complete page Complete if page Complete set Message null super update Widget Enablements  updateWidgetEnablements pageComplete determinePageCompletion setPageComplete pageComplete pageComplete setMessage updateWidgetEnablements
protected final boolean validate Destination Group I Path container Path get Container Full Path if container Path null set Message EMPTY FOLDER MESSAGE return false If the container exist validate it I Container container get Specified Container if container null if it is does not exist be sure the project does I Workspace workspace IDE Workbench Plugin get Plugin Workspace I Path project Path container Path remove Last Segments container Path segment Count 1 if workspace get Root exists project Path return true else set Error Message IDE Workbench Messages get String Wizard Import Page project Not Exist NON NLS 1 return false else if container is Accessible set Error Message INACCESSABLE FOLDER MESSAGE return false if container get Location null if container is Linked set Error Message IDE Workbench Messages get String Wizard Import Page undefined Path Variable NON NLS 1 else set Error Message IDE Workbench Messages get String Wizard Import Page container Not Exist NON NLS 1 return false if source Conflicts With Destination container Path set Error Message get Source Conflict Message return false return true  validateDestinationGroup IPath containerPath getContainerFullPath containerPath setMessage EMPTY_FOLDER_MESSAGE IContainer getSpecifiedContainer IWorkspace IDEWorkbenchPlugin getPluginWorkspace IPath projectPath containerPath removeLastSegments containerPath segmentCount getRoot projectPath setErrorMessage IDEWorkbenchMessages getString WizardImportPage projectNotExist isAccessible setErrorMessage INACCESSABLE_FOLDER_MESSAGE getLocation isLinked setErrorMessage IDEWorkbenchMessages getString WizardImportPage undefinedPathVariable setErrorMessage IDEWorkbenchMessages getString WizardImportPage containerNotExist sourceConflictsWithDestination containerPath setErrorMessage getSourceConflictMessage
Returns the error message for when the source conflicts with the destination protected final String get Source Conflict Message return IDE Workbench Messages get String Wizard Import Page import On Receiver NON NLS 1  getSourceConflictMessage IDEWorkbenchMessages getString WizardImportPage importOnReceiver
Returns whether or not the source location conflicts with the destination resource By default this is not checked so code false code is returned param source Path the path being checked return code true code if the source location conflicts with the destination resource code false code if not protected boolean source Conflicts With Destination I Path source Path return false  sourcePath sourceConflictsWithDestination IPath sourcePath
protected boolean determine Page Completion Check for valid projects before making the user do anything if no Open Projects set Error Message IDE Workbench Messages get String Wizard Import Page no Open Projects NON NLS 1 return false return super determine Page Completion  determinePageCompletion noOpenProjects setErrorMessage IDEWorkbenchMessages getString WizardImportPage noOpenProjects determinePageCompletion
Returns whether or not the passed workspace has any open projects return boolean private boolean no Open Projects I Project projects IDE Workbench Plugin get Plugin Workspace get Root get Projects for int i 0 i projects length i if projects i is Open return false return true  noOpenProjects IProject IDEWorkbenchPlugin getPluginWorkspace getRoot getProjects isOpen

public class Yes No Cancel List Selection Dialog extends List Selection Dialog Create a list selection dialog with a possible Yes No or Cancel result param parent Shell param input param content Provider param label Provider param message deprecated see class comment public Yes No Cancel List Selection Dialog org eclipse swt widgets Shell parent Shell Object input org eclipse jface viewers I Structured Content Provider content Provider org eclipse jface viewers I Label Provider label Provider String message super parent Shell input content Provider label Provider message  YesNoCancelListSelectionDialog ListSelectionDialog parentShell contentProvider labelProvider YesNoCancelListSelectionDialog parentShell IStructuredContentProvider contentProvider ILabelProvider labelProvider parentShell contentProvider labelProvider
protected void button Pressed int button Id switch button Id case I Dialog Constants YES ID yes Pressed return case I Dialog Constants NO ID no Pressed return case I Dialog Constants CANCEL ID cancel Pressed return  buttonPressed buttonId buttonId IDialogConstants YES_ID yesPressed IDialogConstants NO_ID noPressed IDialogConstants CANCEL_ID cancelPressed
protected void configure Shell Shell shell super configure Shell shell Workbench Help set Help shell I Help Context Ids YES NO CANCEL LIST SELECTION DIALOG  configureShell configureShell WorkbenchHelp setHelp IHelpContextIds YES_NO_CANCEL_LIST_SELECTION_DIALOG
protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants YES ID I Dialog Constants YES LABEL true create Button parent I Dialog Constants NO ID I Dialog Constants NO LABEL false create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButton IDialogConstants YES_ID IDialogConstants YES_LABEL createButton IDialogConstants NO_ID IDialogConstants NO_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
Notifies that the no button of this dialog has been pressed p The code Dialog code implementation of this framework method sets this dialog s return code to code I Dialog Constants NO ID code and closes the dialog Subclasses may override if desired p protected void no Pressed set Return Code I Dialog Constants NO ID close  IDialogConstants NO_ID noPressed setReturnCode IDialogConstants NO_ID
Notifies that the yes button of this dialog has been pressed Do the same as an OK but set the return code to YES ID instead protected void yes Pressed ok Pressed set Return Code I Dialog Constants YES ID  YES_ID yesPressed okPressed setReturnCode IDialogConstants YES_ID

Creates a new encoding support public Default Encoding Support super  DefaultEncodingSupport
f Property Change Listener new Preferences I Property Change Listener public void property Change Preferences Property Change Event e if Resources Plugin PREF ENCODING equals e get Property set Encoding null false null means use default  fPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent ResourcesPlugin PREF_ENCODING getProperty setEncoding
Associates this encoding support to the given text editor and initializes this encoding param text Editor the editor public void initialize Status Text Editor text Editor f Text Editor text Editor f Property Change Listener new Preferences I Property Change Listener public void property Change Preferences Property Change Event e if Resources Plugin PREF ENCODING equals e get Property set Encoding null false null means use default Preferences p Resources Plugin get Plugin get Plugin Preferences p add Property Change Listener f Property Change Listener f Encoding Action Group new Encoding Action Group f Text Editor f Encoding Action Group update  textEditor StatusTextEditor textEditor fTextEditor textEditor fPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent ResourcesPlugin PREF_ENCODING getProperty setEncoding ResourcesPlugin getPlugin getPluginPreferences addPropertyChangeListener fPropertyChangeListener fEncodingActionGroup EncodingActionGroup fTextEditor fEncodingActionGroup
Disposes this encoding support public void dispose Preferences p Resources Plugin get Plugin get Plugin Preferences p remove Property Change Listener f Property Change Listener f Encoding Action Group dispose f Encoding Action Group null f Text Editor null  ResourcesPlugin getPlugin getPluginPreferences removePropertyChangeListener fPropertyChangeListener fEncodingActionGroup fEncodingActionGroup fTextEditor
Resets this encoding support Should be called if e g the input element of the associated editor changed public void reset f Encoding Action Group update  fEncodingActionGroup
Runnable encoding Setter new Runnable public void run f Text Editor do Revert To Saved f Text Editor update Part Control input  encodingSetter fTextEditor doRevertToSaved fTextEditor updatePartControl
Sets the encoding of the editor s input to the given value If code overwrite code is code true code the value is set even if the encoding is already set param encoding the new encoding param overwrite code true code if current encoding should be overwritten protected void set Encoding String encoding boolean overwrite I Document Provider p f Text Editor get Document Provider if p instanceof I Storage Document Provider final I Editor Input input f Text Editor get Editor Input I Storage Document Provider provider I Storage Document Provider p String current provider get Encoding input if f Text Editor is Dirty String internal encoding null encoding NON NLS 1 boolean apply overwrite current null internal equals current if apply provider set Encoding input encoding Runnable encoding Setter new Runnable public void run f Text Editor do Revert To Saved f Text Editor update Part Control input Display display f Text Editor get Site get Shell get Display if display null display is Disposed Busy Indicator show While display encoding Setter else encoding Setter run f Encoding Action Group update  setEncoding IDocumentProvider fTextEditor getDocumentProvider IStorageDocumentProvider IEditorInput fTextEditor getEditorInput IStorageDocumentProvider IStorageDocumentProvider getEncoding fTextEditor isDirty setEncoding encodingSetter fTextEditor doRevertToSaved fTextEditor updatePartControl fTextEditor getSite getShell getDisplay isDisposed BusyIndicator showWhile encodingSetter encodingSetter fEncodingActionGroup
see I Encoding Support set Encoding String public void set Encoding String encoding set Encoding encoding true  IEncodingSupport setEncoding setEncoding setEncoding
public String get Encoding I Document Provider p f Text Editor get Document Provider if p instanceof I Storage Document Provider I Storage Document Provider provider I Storage Document Provider p return provider get Encoding f Text Editor get Editor Input return null  getEncoding IDocumentProvider fTextEditor getDocumentProvider IStorageDocumentProvider IStorageDocumentProvider IStorageDocumentProvider getEncoding fTextEditor getEditorInput
public String get Default Encoding I Document Provider p f Text Editor get Document Provider if p instanceof I Storage Document Provider I Storage Document Provider provider I Storage Document Provider p return provider get Default Encoding return null  getDefaultEncoding IDocumentProvider fTextEditor getDocumentProvider IStorageDocumentProvider IStorageDocumentProvider IStorageDocumentProvider getDefaultEncoding
Returns a status header for the given status param status the status return a status header for the given status public String get Status Header I Status status Throwable t status get Exception if t instanceof Char Conversion Exception return Text Editor Messages get String Editor error unreadable encoding header NON NLS 1 if t instanceof Unsupported Encoding Exception return Text Editor Messages get String Editor error unsupported encoding header NON NLS 1 return null  getStatusHeader IStatus getException CharConversionException TextEditorMessages getString unreadable_encoding UnsupportedEncodingException TextEditorMessages getString unsupported_encoding
Returns a banner for the given status param status the status return a banner for the given status public String get Status Banner I Status status Throwable t status get Exception if t instanceof Char Conversion Exception return Text Editor Messages get String Editor error unreadable encoding banner NON NLS 1 if t instanceof Unsupported Encoding Exception return Text Editor Messages get String Editor error unsupported encoding banner NON NLS 1 return null  getStatusBanner IStatus getException CharConversionException TextEditorMessages getString unreadable_encoding UnsupportedEncodingException TextEditorMessages getString unsupported_encoding
Returns a status message if any param status the status return a status message indicating encoding problems or code null code otherwise public String get Status Message I Status status Throwable t status get Exception if t instanceof Char Conversion Exception t instanceof Unsupported Encoding Exception String encoding get Encoding if encoding null encoding get Default Encoding if t instanceof Char Conversion Exception if encoding null return Message Format format Text Editor Messages get String Editor error unreadable encoding message arg new Object encoding NON NLS 1 return Text Editor Messages get String Editor error unreadable encoding message NON NLS 1 if t instanceof Unsupported Encoding Exception if encoding null return Text Editor Messages get Formatted String Editor error unsupported encoding message arg encoding NON NLS 1 return Text Editor Messages get String Editor error unsupported encoding message NON NLS 1 return null  getStatusMessage IStatus getException CharConversionException UnsupportedEncodingException getEncoding getDefaultEncoding CharConversionException MessageFormat TextEditorMessages getString unreadable_encoding message_arg TextEditorMessages getString unreadable_encoding UnsupportedEncodingException TextEditorMessages getFormattedString unsupported_encoding message_arg TextEditorMessages getString unsupported_encoding

Returns the annotation type lookup of this plug in return the annotation type lookup public static Annotation Type Lookup get Annotation Type Lookup return Editors Plugin get Default get Annotation Type Lookup  AnnotationTypeLookup getAnnotationTypeLookup EditorsPlugin getDefault getAnnotationTypeLookup
Returns the annotation preference lookup of this plug in return the annotation preference lookup public static Annotation Preference Lookup get Annotation Preference Lookup return Editors Plugin get Default get Annotation Preference Lookup  AnnotationPreferenceLookup getAnnotationPreferenceLookup EditorsPlugin getDefault getAnnotationPreferenceLookup
Returns the preference store of this plug in return this plug in s preference store public static I Preference Store get Preference Store return Editors Plugin get Default get Preference Store  IPreferenceStore getPreferenceStore EditorsPlugin getDefault getPreferenceStore
Removes all preference which are handled by this plug in s general preference pages from the given store and prevents setting the default values in the future p To access the general preference from another plug in use a link org eclipse ui texteditor Chained Preference Store pre List stores new Array List 3 stores add Your Plugin get Default get Preference Store stores add EditorsUI get Preference Store combined Store new Chained Preference Store I Preference Store stores to Array new I Preference Store stores size pre p p Note In order to work this method must be called before the store s default values are set p param store the preference store to mark public static void use Annotations Preference Page I Preference Store store Marker Annotation Preferences use Annotations Preference Page store  ChainedPreferenceStore ArrayList YourPlugin getDefault getPreferenceStore getPreferenceStore combinedStore ChainedPreferenceStore IPreferenceStore toArray IPreferenceStore useAnnotationsPreferencePage IPreferenceStore MarkerAnnotationPreferences useAnnotationsPreferencePage
Removes all preference which are handled by this plug in s Quick Diff preference page from the given store and prevents setting the default values in the future p To access the general preference from another plug in use a link org eclipse ui texteditor Chained Preference Store pre List stores new Array List 3 stores add Your Plugin get Default get Preference Store stores add EditorsUI get Preference Store combined Store new Chained Preference Store I Preference Store stores to Array new I Preference Store stores size pre p p Note In order to work this method must be called before the store s default values are set p param store the preference store to mark public static void use Quick Diff Preference Page I Preference Store store Marker Annotation Preferences use Quick Diff Preference Page store store set To Default Abstract Decorated Text Editor Preference Constants QUICK DIFF ALWAYS ON store set To Default Abstract Decorated Text Editor Preference Constants QUICK DIFF CHARACTER MODE store set To Default Abstract Decorated Text Editor Preference Constants QUICK DIFF DEFAULT PROVIDER  ChainedPreferenceStore ArrayList YourPlugin getDefault getPreferenceStore getPreferenceStore combinedStore ChainedPreferenceStore IPreferenceStore toArray IPreferenceStore useQuickDiffPreferencePage IPreferenceStore MarkerAnnotationPreferences useQuickDiffPreferencePage setToDefault AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_ALWAYS_ON setToDefault AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_CHARACTER_MODE setToDefault AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_DEFAULT_PROVIDER
private EditorsUI block instantiation 
Returns the preferences of this plug in return the plug in preferences see org eclipse core runtime Plugin get Plugin Preferences public static Preferences get Plugin Preferences return Editors Plugin get Default get Plugin Preferences  getPluginPreferences getPluginPreferences EditorsPlugin getDefault getPluginPreferences

Creates a new action for the given specification param bundle the resource bundle param prefix the prefix for lookups from the resource bundle param encoding the target encoding param editor the target editor public Predefined Encoding Action Resource Bundle bundle String prefix String encoding I Text Editor editor super bundle prefix editor f Encoding encoding if prefix null set Text encoding f Label get Text  PredefinedEncodingAction ResourceBundle ITextEditor fEncoding setText fLabel getText
Creates a new action for the given specification param bundle the resource bundle param encoding the target encoding param editor the target editor public Predefined Encoding Action Resource Bundle bundle String encoding I Text Editor editor super bundle null editor f Encoding encoding set Text encoding f Label get Text  PredefinedEncodingAction ResourceBundle ITextEditor fEncoding setText fLabel getText
Returns the encoding support of the action s editor return the encoding support of the action s editor or code null code if none private I Encoding Support get Encoding Support I Text Editor editor get Text Editor if editor null return I Encoding Support editor get Adapter I Encoding Support class return null  IEncodingSupport getEncodingSupport ITextEditor getTextEditor IEncodingSupport getAdapter IEncodingSupport
public void run I Encoding Support s get Encoding Support if s null s set Encoding f Is Default null f Encoding  IEncodingSupport getEncodingSupport setEncoding fIsDefault fEncoding
Returns the encoding currently used in the given editor param editor the editor return the encoding currently used in the given editor or code null code if no encoding support is installed private String get Encoding I Text Editor editor I Editor Input input editor get Editor Input if input instanceof I File Editor Input I File file I File Editor Input input get File try String explicit Encoding explicit Encoding file get Charset false if explicit Encoding null return null catch Core Exception e continue assume file is not using default encoding I Encoding Support s get Encoding Support if s null return s get Encoding return null  getEncoding ITextEditor IEditorInput getEditorInput IFileEditorInput IFile IFileEditorInput getFile explicitEncoding explicitEncoding getCharset explicitEncoding CoreException IEncodingSupport getEncodingSupport getEncoding
public void update if f Encoding null set Enabled false return I Text Editor editor get Text Editor if editor null set Enabled false return update label f Is Default I Encoding Actions Constants DEFAULT equals f Encoding if f Is Default set Text get Default Encoding Text editor f Label else set Text f Label update enable state if editor is Dirty set Enabled false else set Enabled true update checked state String current get Encoding editor if f Is Default set Checked current null else set Checked f Encoding equals current  fEncoding setEnabled ITextEditor getTextEditor setEnabled fIsDefault IEncodingActionsConstants fEncoding fIsDefault setText getDefaultEncodingText fLabel setText fLabel isDirty setEnabled setEnabled getEncoding fIsDefault setChecked setChecked fEncoding
private static String get Default Encoding Text I Text Editor editor String default Text I Editor Input input editor get Editor Input if input instanceof I File Editor Input return default Text I File file I File Editor Input input get File String format format FILE CONTENT ENCODING FORMAT String encoding try encoding get Encoding From Content file if encoding null format FILE CONTAINER ENCODING FORMAT encoding file get Parent get Default Charset catch Core Exception ex return default Text return Message Format format format new String encoding  getDefaultEncodingText ITextEditor defaultText IEditorInput getEditorInput IFileEditorInput defaultText IFile IFileEditorInput getFile FILE_CONTENT_ENCODING_FORMAT getEncodingFromContent FILE_CONTAINER_ENCODING_FORMAT getParent getDefaultCharset CoreException defaultText MessageFormat
private static String get Encoding From Content I File file throws Core Exception I Content Description description file get Content Description if description null byte bom byte description get Property I Content Description BYTE ORDER MARK if bom null return String description get Property I Content Description CHARSET if bom I Content Description BOM UTF 8 return Text Editor Messages get String Workbench Preference encoding BOM UTF 8 NON NLS 1 if bom I Content Description BOM UTF 16BE return Text Editor Messages get String Workbench Preference encoding BOM UTF 16BE NON NLS 1 if bom I Content Description BOM UTF 16LE return Text Editor Messages get String Workbench Preference encoding BOM UTF 16LE NON NLS 1 return null  getEncodingFromContent IFile CoreException IContentDescription getContentDescription getProperty IContentDescription BYTE_ORDER_MARK getProperty IContentDescription IContentDescription BOM_UTF_8 TextEditorMessages getString WorkbenchPreference BOM_UTF_8 IContentDescription BOM_UTF_16BE TextEditorMessages getString WorkbenchPreference BOM_UTF_16BE IContentDescription BOM_UTF_16LE TextEditorMessages getString WorkbenchPreference BOM_UTF_16LE
see org eclipse ui texteditor Text Editor Action Text Editor Action Resource Bundle String I Text Editor protected Custom Encoding Action Resource Bundle bundle String prefix I Text Editor editor super bundle prefix editor  TextEditorAction TextEditorAction ResourceBundle ITextEditor CustomEncodingAction ResourceBundle ITextEditor
see I Update update public void update I Text Editor editor get Text Editor set Enabled editor null editor is Dirty  IUpdate ITextEditor getTextEditor setEnabled isDirty
String message Text Editor Messages get String Editor Convert Encoding Custom dialog message NON NLS 1 I Input Validator input Validator new I Input Validator public String is Valid String new Text return new Text null new Text length 0 null NON NLS 1  TextEditorMessages getString ConvertEncoding IInputValidator inputValidator IInputValidator isValid newText newText newText
public void run I Text Editor editor get Text Editor if editor null return I Encoding Support encoding Support I Encoding Support editor get Adapter I Encoding Support class if encoding Support null return String title Text Editor Messages get String Editor Convert Encoding Custom dialog title NON NLS 1 String message Text Editor Messages get String Editor Convert Encoding Custom dialog message NON NLS 1 I Input Validator input Validator new I Input Validator public String is Valid String new Text return new Text null new Text length 0 null NON NLS 1 String initial Value encoding Support get Encoding if initial Value null initial Value encoding Support get Default Encoding if initial Value null initial Value NON NLS 1 Input Dialog d new Input Dialog editor get Site get Shell title message initial Value input Validator NON NLS 1 if d open Window OK encoding Support set Encoding d get Value  ITextEditor getTextEditor IEncodingSupport encodingSupport IEncodingSupport getAdapter IEncodingSupport encodingSupport TextEditorMessages getString ConvertEncoding TextEditorMessages getString ConvertEncoding IInputValidator inputValidator IInputValidator isValid newText newText newText initialValue encodingSupport getEncoding initialValue initialValue encodingSupport getDefaultEncoding initialValue initialValue InputDialog InputDialog getSite getShell initialValue inputValidator encodingSupport setEncoding getValue
Creates a new encoding action group for an action bar contributor public Encoding Action Group Resource Bundle b Text Editor Messages get Resource Bundle f Retarget Actions add new Retarget Text Editor Action b Editor Convert Encoding ENCODINGS 0 0 ENCODINGS 0 0 I Action AS RADIO BUTTON NON NLS 1 NON NLS 2 if SYSTEM ENCODING null f Retarget Actions add new Retarget Text Editor Action b Editor Convert Encoding System I Encoding Actions Constants SYSTEM I Action AS RADIO BUTTON NON NLS 1 for int i 1 i ENCODINGS length i f Retarget Actions add new Retarget Text Editor Action b Editor Convert Encoding ENCODINGS i 0 ENCODINGS i 0 I Action AS RADIO BUTTON NON NLS 1 NON NLS 2 f Retarget Actions add new Retarget Text Editor Action b Editor Convert Encoding Custom I Encoding Actions Constants CUSTOM I Action AS PUSH BUTTON NON NLS 1  EncodingActionGroup ResourceBundle TextEditorMessages getResourceBundle fRetargetActions RetargetTextEditorAction ConvertEncoding IAction AS_RADIO_BUTTON SYSTEM_ENCODING fRetargetActions RetargetTextEditorAction ConvertEncoding IEncodingActionsConstants IAction AS_RADIO_BUTTON fRetargetActions RetargetTextEditorAction ConvertEncoding IAction AS_RADIO_BUTTON fRetargetActions RetargetTextEditorAction ConvertEncoding IEncodingActionsConstants IAction AS_PUSH_BUTTON
Menu Manager sub Menu new Menu Manager Text Editor Messages get String Editor Convert Encoding submenu label NON NLS 1 sub Menu add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager update  MenuManager subMenu MenuManager TextEditorMessages getString ConvertEncoding subMenu addMenuListener IMenuListener menuAboutToShow IMenuManager
public void fill Action Bars I Action Bars action Bars I Menu Manager menu Manager action Bars get Menu Manager I Menu Manager edit Menu menu Manager find Menu Using Path I Workbench Action Constants M EDIT if edit Menu null f Retarget Actions size 0 Menu Manager sub Menu new Menu Manager Text Editor Messages get String Editor Convert Encoding submenu label NON NLS 1 sub Menu add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager update Iterator e f Retarget Actions iterator sub Menu add I Action e next sub Menu add new Separator while e has Next sub Menu add I Action e next edit Menu add sub Menu  fillActionBars IActionBars actionBars IMenuManager menuManager actionBars getMenuManager IMenuManager editMenu menuManager findMenuUsingPath IWorkbenchActionConstants M_EDIT editMenu fRetargetActions MenuManager subMenu MenuManager TextEditorMessages getString ConvertEncoding subMenu addMenuListener IMenuListener menuAboutToShow IMenuManager fRetargetActions subMenu IAction subMenu hasNext subMenu IAction editMenu subMenu
Retargets this action group to the given editor param editor the text editor to which the group should be retargeted public void retarget I Text Editor editor f Text Editor editor Iterator e f Retarget Actions iterator while e has Next Retarget Text Editor Action a Retarget Text Editor Action e next a set Action editor null null editor get Action a get Id  ITextEditor fTextEditor fRetargetActions hasNext RetargetTextEditorAction RetargetTextEditorAction setAction getAction getId
Creates a new encoding action group for the given editor param editor the text editor public Encoding Action Group I Text Editor editor f Text Editor editor Resource Bundle b Text Editor Messages get Resource Bundle Resource Action a if SYSTEM ENCODING null a new Predefined Encoding Action b SYSTEM ENCODING editor a set Help Context Id I Encoding Actions Help Context Ids SYSTEM a set Action Definition Id I Encoding Actions Definition Ids SYSTEM editor set Action I Encoding Actions Constants SYSTEM a for int i 0 i ENCODINGS length i a new Predefined Encoding Action b Editor Convert Encoding ENCODINGS i 0 ENCODINGS i 0 editor NON NLS 1 NON NLS 2 a set Help Context Id ENCODINGS i 1 a set Action Definition Id ENCODINGS i 2 editor set Action ENCODINGS i 0 a a new Custom Encoding Action b Editor Convert Encoding I Encoding Actions Constants CUSTOM editor NON NLS 1 NON NLS 2 a set Help Context Id I Encoding Actions Help Context Ids CUSTOM a set Action Definition Id I Encoding Actions Definition Ids CUSTOM editor set Action I Encoding Actions Constants CUSTOM a  EncodingActionGroup ITextEditor fTextEditor ResourceBundle TextEditorMessages getResourceBundle ResourceAction SYSTEM_ENCODING PredefinedEncodingAction SYSTEM_ENCODING setHelpContextId IEncodingActionsHelpContextIds setActionDefinitionId IEncodingActionsDefinitionIds setAction IEncodingActionsConstants PredefinedEncodingAction ConvertEncoding setHelpContextId setActionDefinitionId setAction CustomEncodingAction ConvertEncoding IEncodingActionsConstants setHelpContextId IEncodingActionsHelpContextIds setActionDefinitionId IEncodingActionsDefinitionIds setAction IEncodingActionsConstants
Updates all actions of this action group public void update if f Text Editor null return I Action a f Text Editor get Action I Encoding Actions Constants SYSTEM if a instanceof I Update I Update a update for int i 0 i ENCODINGS length i a f Text Editor get Action ENCODINGS i 0 if a instanceof I Update I Update a update a f Text Editor get Action I Encoding Actions Constants CUSTOM if a instanceof I Update I Update a update  fTextEditor IAction fTextEditor getAction IEncodingActionsConstants IUpdate IUpdate fTextEditor getAction IUpdate IUpdate fTextEditor getAction IEncodingActionsConstants IUpdate IUpdate
public void dispose if f Text Editor null f Text Editor set Action I Encoding Actions Constants SYSTEM null for int i 0 i ENCODINGS length i f Text Editor set Action ENCODINGS i 0 null f Text Editor set Action I Encoding Actions Constants CUSTOM null f Text Editor null  fTextEditor fTextEditor setAction IEncodingActionsConstants fTextEditor setAction fTextEditor setAction IEncodingActionsConstants fTextEditor

Creates a new safe runnable for the given input param input the input public Safe Change I File Editor Input input f Input input  SafeChange IFileEditorInput fInput
Execute the change Subclass responsibility param input the input throws Exception an exception in case of error protected void execute I File Editor Input input throws Exception  IFileEditorInput
public void run if get Element Info f Input null fire Element State Change Failed f Input return try execute f Input catch Exception e fire Element State Change Failed f Input  getElementInfo fInput fireElementStateChangeFailed fInput fInput fireElementStateChangeFailed fInput
Creates a new file synchronizer Is not yet installed on a resource param file Editor Input the editor input to be synchronized public File Synchronizer I File Editor Input file Editor Input f File Editor Input file Editor Input  fileEditorInput FileSynchronizer IFileEditorInput fileEditorInput fFileEditorInput fileEditorInput
Creates a new file synchronizer which is not yet installed on a resource param file Editor Input the editor input to be synchronized deprecated use code File Synchronizer I File Editor Input code public File Synchronizer File Editor Input file Editor Input f File Editor Input file Editor Input  fileEditorInput FileSynchronizer IFileEditorInput FileSynchronizer FileEditorInput fileEditorInput fFileEditorInput fileEditorInput
Returns the file wrapped by the file editor input return the file wrapped by the editor input associated with that synchronizer protected I File get File return f File Editor Input get File  IFile getFile fFileEditorInput getFile
Installs the synchronizer on the input s file public void install get File get Workspace add Resource Change Listener this f Is Installed true  getFile getWorkspace addResourceChangeListener fIsInstalled
Uninstalls the synchronizer from the input s file public void uninstall get File get Workspace remove Resource Change Listener this f Is Installed false  getFile getWorkspace removeResourceChangeListener fIsInstalled
public void resource Changed I Resource Change Event e I Resource Delta delta e get Delta try if delta null f Is Installed delta accept this catch Core Exception x handle Core Exception x File Document Provider resource Changed NON NLS 1  resourceChanged IResourceChangeEvent IResourceDelta getDelta fIsInstalled CoreException handleCoreException FileDocumentProvider resourceChanged
if info null info f Can Be Saved compute Modification Stamp get File info f Modification Stamp runnable new Safe Change f File Editor Input protected void execute I File Editor Input input throws Exception handle Element Content Changed input  fCanBeSaved computeModificationStamp getFile fModificationStamp SafeChange fFileEditorInput IFileEditorInput handleElementContentChanged
final I Path path delta get Moved To Path runnable new Safe Change f File Editor Input protected void execute I File Editor Input input throws Exception handle Element Moved input path  IPath getMovedToPath SafeChange fFileEditorInput IFileEditorInput handleElementMoved
if info null info f Can Be Saved runnable new Safe Change f File Editor Input protected void execute I File Editor Input input throws Exception handle Element Deleted input  fCanBeSaved SafeChange fFileEditorInput IFileEditorInput handleElementDeleted
public boolean visit I Resource Delta delta throws Core Exception if delta null get File equals delta get Resource Runnable runnable null switch delta get Kind case I Resource Delta CHANGED if I Resource Delta CONTENT delta get Flags 0 File Info info File Info get Element Info f File Editor Input if info null info f Can Be Saved compute Modification Stamp get File info f Modification Stamp runnable new Safe Change f File Editor Input protected void execute I File Editor Input input throws Exception handle Element Content Changed input break case I Resource Delta REMOVED if I Resource Delta MOVED TO delta get Flags 0 final I Path path delta get Moved To Path runnable new Safe Change f File Editor Input protected void execute I File Editor Input input throws Exception handle Element Moved input path else File Info info File Info get Element Info f File Editor Input if info null info f Can Be Saved runnable new Safe Change f File Editor Input protected void execute I File Editor Input input throws Exception handle Element Deleted input break if runnable null update runnable return true because we are sitting on files anyway  IResourceDelta CoreException getFile getResource getKind IResourceDelta IResourceDelta getFlags FileInfo FileInfo getElementInfo fFileEditorInput fCanBeSaved computeModificationStamp getFile fModificationStamp SafeChange fFileEditorInput IFileEditorInput handleElementContentChanged IResourceDelta IResourceDelta MOVED_TO getFlags IPath getMovedToPath SafeChange fFileEditorInput IFileEditorInput handleElementMoved FileInfo FileInfo getElementInfo fFileEditorInput fCanBeSaved SafeChange fFileEditorInput IFileEditorInput handleElementDeleted
Posts the update code behind the running operation param runnable the update code protected void update Runnable runnable if runnable instanceof Safe Change fire Element State Changing f File Editor Input I Workbench workbench PlatformUI get Workbench I Workbench Window windows workbench get Workbench Windows if windows null windows length 0 Display display windows 0 get Shell get Display display async Exec runnable else runnable run  SafeChange fireElementStateChanging fFileEditorInput IWorkbench getWorkbench IWorkbenchWindow getWorkbenchWindows getShell getDisplay asyncExec
Creates and returns a new file info param document the document param model the annotation model param file Synchronizer the file synchronizer public File Info I Document document I Annotation Model model File Synchronizer file Synchronizer super document model f File Synchronizer file Synchronizer  fileSynchronizer FileInfo IDocument IAnnotationModel FileSynchronizer fileSynchronizer fFileSynchronizer fileSynchronizer
Creates and returns a new document provider public File Document Provider super f Resource Rule Factory Resources Plugin get Workspace get Rule Factory  FileDocumentProvider fResourceRuleFactory ResourcesPlugin getWorkspace getRuleFactory
Overrides code Storage Document Provider set Document Content I Document I Editor Input code see Storage Document Provider set Document Content I Document I Editor Input deprecated use file encoding based version since 2 0 protected boolean set Document Content I Document document I Editor Input editor Input throws Core Exception if editor Input instanceof I File Editor Input I File file I File Editor Input editor Input get File set Document Content document file get Contents false return true return super set Document Content document editor Input  StorageDocumentProvider setDocumentContent IDocument IEditorInput StorageDocumentProvider setDocumentContent IDocument IEditorInput setDocumentContent IDocument IEditorInput editorInput CoreException editorInput IFileEditorInput IFile IFileEditorInput editorInput getFile setDocumentContent getContents setDocumentContent editorInput
protected boolean set Document Content I Document document I Editor Input editor Input String encoding throws Core Exception if editor Input instanceof I File Editor Input I File file I File Editor Input editor Input get File Input Stream content Stream file get Contents false File Info info File Info get Element Info editor Input XXX This is a workaround for a corresponding bug in Java readers and writer see http developer java sun com developer bug Parade bugs 4508058 html p if info null info f HasBOM CHARSET UTF 8 equals encoding try content Stream read new byte I Content Description BOM UTF 8 length catch IO Exception e ignore if we cannot remove BOM set Document Content document content Stream encoding return true return super set Document Content document editor Input encoding  setDocumentContent IDocument IEditorInput editorInput CoreException editorInput IFileEditorInput IFile IFileEditorInput editorInput getFile InputStream contentStream getContents FileInfo FileInfo getElementInfo editorInput bugParade fHasBOM CHARSET_UTF_8 contentStream IContentDescription BOM_UTF_8 IOException setDocumentContent contentStream setDocumentContent editorInput
protected I Annotation Model create Annotation Model Object element throws Core Exception if element instanceof I File Editor Input I File Editor Input input I File Editor Input element return new Resource Marker Annotation Model input get File return super create Annotation Model element  IAnnotationModel createAnnotationModel CoreException IFileEditorInput IFileEditorInput IFileEditorInput ResourceMarkerAnnotationModel getFile createAnnotationModel
Checks whether the given resource has been changed on the local file system by comparing the actual time stamp with the cached one If the resource has been changed a code Core Exception code is thrown param cached Modification Stamp the cached modification stamp param resource the resource to check throws org eclipse core runtime Core Exception if resource has been changed on the file system protected void check Synchronization State long cached Modification Stamp I Resource resource throws Core Exception if cached Modification Stamp compute Modification Stamp resource Status status new Status I Status ERROR PlatformUI PLUGIN ID I Resource Status OUT OF SYNC LOCAL Text Editor Messages get String File Document Provider error out of sync null NON NLS 1 throw new Core Exception status  CoreException cachedModificationStamp CoreException checkSynchronizationState cachedModificationStamp IResource CoreException cachedModificationStamp computeModificationStamp IStatus PLUGIN_ID IResourceStatus OUT_OF_SYNC_LOCAL TextEditorMessages getString FileDocumentProvider out_of_sync CoreException
Computes the initial modification stamp for the given resource param resource the resource return the modification stamp protected long compute Modification Stamp I Resource resource long modification Stamp resource get Modification Stamp I Path path resource get Location if path null return modification Stamp modification Stamp path to File last Modified return modification Stamp  computeModificationStamp IResource modificationStamp getModificationStamp IPath getLocation modificationStamp modificationStamp toFile lastModified modificationStamp
public long get Modification Stamp Object element if element instanceof I File Editor Input I File Editor Input input I File Editor Input element return compute Modification Stamp input get File return super get Modification Stamp element  getModificationStamp IFileEditorInput IFileEditorInput IFileEditorInput computeModificationStamp getFile getModificationStamp
public long get Synchronization Stamp Object element if element instanceof I File Editor Input File Info info File Info get Element Info element if info null return info f Modification Stamp return super get Synchronization Stamp element  getSynchronizationStamp IFileEditorInput FileInfo FileInfo getElementInfo fModificationStamp getSynchronizationStamp
protected void do Synchronize Object element I Progress Monitor monitor throws Core Exception if element instanceof I File Editor Input I File Editor Input input I File Editor Input element File Info info File Info get Element Info element if info null if info f File Synchronizer null info f File Synchronizer uninstall refresh File input get File monitor info f File Synchronizer install else refresh File input get File monitor handle Element Content Changed I File Editor Input element return super do Synchronize element monitor  doSynchronize IProgressMonitor CoreException IFileEditorInput IFileEditorInput IFileEditorInput FileInfo FileInfo getElementInfo fFileSynchronizer fFileSynchronizer refreshFile getFile fFileSynchronizer refreshFile getFile handleElementContentChanged IFileEditorInput doSynchronize
public boolean is Deleted Object element if element instanceof I File Editor Input I File Editor Input input I File Editor Input element I Path path input get File get Location if path null return true return path to File exists return super is Deleted element  isDeleted IFileEditorInput IFileEditorInput IFileEditorInput IPath getFile getLocation toFile isDeleted
protected void do Save Document I Progress Monitor monitor Object element I Document document boolean overwrite throws Core Exception if element instanceof I File Editor Input I File Editor Input input I File Editor Input element String encoding null try File Info info File Info get Element Info element I File file input get File encoding get Charset For New File file document info byte bytes document get get Bytes encoding XXX This is a workaround for a corresponding bug in Java readers and writer see http developer java sun com developer bug Parade bugs 4508058 html if info null info f HasBOM CHARSET UTF 8 equals encoding int bom Length I Content Description BOM UTF 8 length byte bytes WithBOM new byte bytes length bom Length System arraycopy I Content Description BOM UTF 8 0 bytes WithBOM 0 bom Length System arraycopy bytes 0 bytes WithBOM bom Length bytes length bytes bytes WithBOM Input Stream stream new Byte Array Input Stream bytes if file exists if info null overwrite check Synchronization State info f Modification Stamp file inform about the upcoming content change fire Element State Changing element try file set Contents stream overwrite true monitor catch Core Exception x inform about failure fire Element State Change Failed element throw x catch Runtime Exception x inform about failure fire Element State Change Failed element throw x If here the editor state will be flipped to not dirty Thus the state changing flag will be reset if info null Resource Marker Annotation Model model Resource Marker Annotation Model info f Model model update Markers info f Document info f Modification Stamp compute Modification Stamp file else try monitor begin Task Text Editor Messages get String File Document Provider task saving 2000 NON NLS 1 Container Generator generator new Container Generator file get Workspace file get Parent get Full Path generator generate Container new Sub Progress Monitor monitor 1000 file create stream false new Sub Progress Monitor monitor 1000 finally monitor done catch Unsupported Encoding Exception x String message Text Editor Messages get Formatted String Editor error unsupported encoding message arg encoding NON NLS 1 I Status s new Status I Status ERROR PlatformUI PLUGIN ID I Status OK message x throw new Core Exception s else super do Save Document monitor element document overwrite  doSaveDocument IProgressMonitor IDocument CoreException IFileEditorInput IFileEditorInput IFileEditorInput FileInfo FileInfo getElementInfo IFile getFile getCharsetForNewFile getBytes bugParade fHasBOM CHARSET_UTF_8 bomLength IContentDescription BOM_UTF_8 bytesWithBOM bomLength IContentDescription BOM_UTF_8 bytesWithBOM bomLength bytesWithBOM bomLength bytesWithBOM InputStream ByteArrayInputStream checkSynchronizationState fModificationStamp fireElementStateChanging setContents CoreException fireElementStateChangeFailed RuntimeException fireElementStateChangeFailed ResourceMarkerAnnotationModel ResourceMarkerAnnotationModel fModel updateMarkers fDocument fModificationStamp computeModificationStamp beginTask TextEditorMessages getString FileDocumentProvider ContainerGenerator ContainerGenerator getWorkspace getParent getFullPath generateContainer SubProgressMonitor SubProgressMonitor UnsupportedEncodingException TextEditorMessages getFormattedString unsupported_encoding message_arg IStatus IStatus PLUGIN_ID IStatus CoreException doSaveDocument
private String get Charset For New File I File target File I Document document File Info info User defined encoding has first priority String encoding try encoding target File get Charset false catch Core Exception ex encoding null if encoding null return encoding Probe content Reader reader new Buffered Reader new String Reader document get try Qualified Name options new Qualified Name I Content Description CHARSET I Content Description BYTE ORDER MARK I Content Description description Platform get Content Type Manager get Description For reader target File get Name options if description null encoding description get Charset if encoding null return encoding catch IO Exception ex continue with next strategy finally try reader close catch IO Exception ex Text Editor Plugin get Default get Log log new Status I Status ERROR Text Editor Plugin PLUGIN ID I Status OK Text File Document Provider get Charset For New File Could not close reader ex NON NLS 1 Use file s encoding if the file has a BOM if info null info f HasBOM return info f Encoding Use parent chain try return target File get Parent get Default Charset catch Core Exception ex Use global default return Resources Plugin get Encoding  getCharsetForNewFile IFile targetFile IDocument FileInfo targetFile getCharset CoreException BufferedReader StringReader QualifiedName QualifiedName IContentDescription IContentDescription BYTE_ORDER_MARK IContentDescription getContentTypeManager getDescriptionFor targetFile getName getCharset IOException IOException TextEditorPlugin getDefault getLog IStatus TextEditorPlugin PLUGIN_ID IStatus TextFileDocumentProvider getCharsetForNewFile fHasBOM fEncoding targetFile getParent getDefaultCharset CoreException ResourcesPlugin getEncoding
protected Element Info create Element Info Object element throws Core Exception if element instanceof I File Editor Input I File Editor Input input I File Editor Input element try refresh File input get File catch Core Exception x handle Core Exception x Text Editor Messages get String File Document Provider create Element Info NON NLS 1 I Document d null I Status s null try d create Document element catch Core Exception x s x get Status d create Empty Document I Annotation Model m create Annotation Model element File Synchronizer f new File Synchronizer input f install File Info info new File Info d m f info f Modification Stamp compute Modification Stamp input get File info f Status s info f Encoding get Persisted Encoding input info f HasBOM hasBOM input return info return super create Element Info element  ElementInfo createElementInfo CoreException IFileEditorInput IFileEditorInput IFileEditorInput refreshFile getFile CoreException handleCoreException TextEditorMessages getString FileDocumentProvider createElementInfo IDocument IStatus createDocument CoreException getStatus createEmptyDocument IAnnotationModel createAnnotationModel FileSynchronizer FileSynchronizer FileInfo FileInfo fModificationStamp computeModificationStamp getFile fStatus fEncoding getPersistedEncoding fHasBOM createElementInfo
protected void dispose Element Info Object element Element Info info if info instanceof File Info File Info file Info File Info info if file Info f File Synchronizer null file Info f File Synchronizer uninstall super dispose Element Info element info  disposeElementInfo ElementInfo FileInfo FileInfo fileInfo FileInfo fileInfo fFileSynchronizer fileInfo fFileSynchronizer disposeElementInfo
Updates the element info to a change of the file content and sends out appropriate notifications param file Editor Input the input of an text editor protected void handle Element Content Changed I File Editor Input file Editor Input File Info info File Info get Element Info file Editor Input if info null return I Document document create Empty Document I Status status null try try refresh File file Editor Input get File catch Core Exception x handle Core Exception x File Document Provider handle Element Content Changed NON NLS 1 set Document Content document file Editor Input info f Encoding catch Core Exception x status x get Status String new Content document get if new Content equals info f Document get set the new content and fire content related events fire Element Content About To Be Replaced file Editor Input remove Unchanged Element Listeners file Editor Input info info f Document remove Document Listener info info f Document set new Content info f Can Be Saved false info f Modification Stamp compute Modification Stamp file Editor Input get File info f Status status add Unchanged Element Listeners file Editor Input info fire Element Content Replaced file Editor Input else remove Unchanged Element Listeners file Editor Input info fires only the dirty state related event info f Can Be Saved false info f Modification Stamp compute Modification Stamp file Editor Input get File info f Status status add Unchanged Element Listeners file Editor Input info fire Element Dirty State Changed file Editor Input false  fileEditorInput handleElementContentChanged IFileEditorInput fileEditorInput FileInfo FileInfo getElementInfo fileEditorInput IDocument createEmptyDocument IStatus refreshFile fileEditorInput getFile CoreException handleCoreException FileDocumentProvider handleElementContentChanged setDocumentContent fileEditorInput fEncoding CoreException getStatus newContent newContent fDocument fireElementContentAboutToBeReplaced fileEditorInput removeUnchangedElementListeners fileEditorInput fDocument removeDocumentListener fDocument newContent fCanBeSaved fModificationStamp computeModificationStamp fileEditorInput getFile fStatus addUnchangedElementListeners fileEditorInput fireElementContentReplaced fileEditorInput removeUnchangedElementListeners fileEditorInput fCanBeSaved fModificationStamp computeModificationStamp fileEditorInput getFile fStatus addUnchangedElementListeners fileEditorInput fireElementDirtyStateChanged fileEditorInput
Sends out the notification that the file serving as document input has been moved param file Editor Input the input of an text editor param path the path of the new location of the file protected void handle Element Moved I File Editor Input file Editor Input I Path path I Workspace workspace Resources Plugin get Workspace I File new File workspace get Root get File path fire Element Moved file Editor Input new File null null new File Editor Input new File  fileEditorInput handleElementMoved IFileEditorInput fileEditorInput IPath IWorkspace ResourcesPlugin getWorkspace IFile newFile getRoot getFile fireElementMoved fileEditorInput newFile FileEditorInput newFile
Sends out the notification that the file serving as document input has been deleted param file Editor Input the input of an text editor protected void handle Element Deleted I File Editor Input file Editor Input fire Element Deleted file Editor Input  fileEditorInput handleElementDeleted IFileEditorInput fileEditorInput fireElementDeleted fileEditorInput
It s only here to circumvent visibility issues with certain compilers protected Element Info get Element Info Object element return super get Element Info element  ElementInfo getElementInfo getElementInfo
protected void do Validate State Object element Object computation Context throws Core Exception if element instanceof I File Editor Input I File Editor Input input I File Editor Input element File Info info File Info get Element Info input if info null I File file input get File if file is Read Only do not use cached state here I Workspace workspace file get Workspace workspace validate Edit new I File file computation Context super do Validate State element computation Context  doValidateState computationContext CoreException IFileEditorInput IFileEditorInput IFileEditorInput FileInfo FileInfo getElementInfo IFile getFile isReadOnly IWorkspace getWorkspace validateEdit IFile computationContext doValidateState computationContext
public boolean is Modifiable Object element if is State Validated element if element instanceof I File Editor Input return true return super is Modifiable element  isModifiable isStateValidated IFileEditorInput isModifiable
protected void do Reset Document Object element I Progress Monitor monitor throws Core Exception if element instanceof I File Editor Input I File Editor Input input I File Editor Input element try refresh File input get File monitor catch Core Exception x handle Core Exception x Text Editor Messages get String File Document Provider reset Document NON NLS 1 super do Reset Document element monitor I Annotation Model model get Annotation Model element if model instanceof Abstract Marker Annotation Model Abstract Marker Annotation Model marker Model Abstract Marker Annotation Model model marker Model reset Markers  doResetDocument IProgressMonitor CoreException IFileEditorInput IFileEditorInput IFileEditorInput refreshFile getFile CoreException handleCoreException TextEditorMessages getString FileDocumentProvider resetDocument doResetDocument IAnnotationModel getAnnotationModel AbstractMarkerAnnotationModel AbstractMarkerAnnotationModel markerModel AbstractMarkerAnnotationModel markerModel resetMarkers
Refreshes the given file resource param file throws Core Exception if the refresh fails since 2 1 protected void refresh File I File file throws Core Exception refresh File file get Progress Monitor  CoreException refreshFile IFile CoreException refreshFile getProgressMonitor
Refreshes the given file resource param file the file to be refreshed param monitor the progress monitor throws org eclipse core runtime Core Exception if the refresh fails since 3 0 protected void refresh File I File file I Progress Monitor monitor throws Core Exception try file refresh Local I Resource DEPTH INFINITE monitor catch Operation Canceled Exception x  CoreException refreshFile IFile IProgressMonitor CoreException refreshLocal IResource DEPTH_INFINITE OperationCanceledException
public boolean is Synchronized Object element if element instanceof I File Editor Input if get Element Info element null I File Editor Input input I File Editor Input element I Resource resource input get File return resource is Synchronized I Resource DEPTH ZERO return false return super is Synchronized element  isSynchronized IFileEditorInput getElementInfo IFileEditorInput IFileEditorInput IResource getFile isSynchronized IResource DEPTH_ZERO isSynchronized
Returns the persisted encoding for the given element param element the element for which to get the persisted encoding return the persisted encoding since 2 1 protected String get Persisted Encoding Object element if element instanceof I File Editor Input I File Editor Input editor Input I File Editor Input element I File file editor Input get File if file null String encoding null try encoding file get Persistent Property ENCODING KEY catch Core Exception x we ignore exceptions here because we support the ENCODING KEY property only for compatibility reasons if encoding null if we found an old encoding property we try to migrate it to the new core resources encoding support try file set Charset encoding if successful delete old property file set Persistent Property ENCODING KEY null catch Core Exception ex handle Core Exception ex Text Editor Messages get String File Document Provider get Persisted Encoding NON NLS 1 else try encoding file get Charset catch Core Exception e encoding null return encoding return super get Persisted Encoding element  getPersistedEncoding IFileEditorInput IFileEditorInput editorInput IFileEditorInput IFile editorInput getFile getPersistentProperty ENCODING_KEY CoreException ENCODING_KEY setCharset setPersistentProperty ENCODING_KEY CoreException handleCoreException TextEditorMessages getString FileDocumentProvider getPersistedEncoding getCharset CoreException getPersistedEncoding
Persists the given encoding for the given element param element the element for which to store the persisted encoding param encoding the encoding throws org eclipse core runtime Core Exception if persisting the encoding fails since 2 1 protected void persist Encoding Object element String encoding throws Core Exception if element instanceof I File Editor Input I File Editor Input editor Input I File Editor Input element I File file editor Input get File if file null file set Charset encoding Storage Info info Storage Info get Element Info element if info null if encoding null info f Encoding file get Charset if info instanceof File Info File Info info f HasBOM hasBOM element  CoreException persistEncoding CoreException IFileEditorInput IFileEditorInput editorInput IFileEditorInput IFile editorInput getFile setCharset StorageInfo StorageInfo getElementInfo fEncoding getCharset FileInfo FileInfo fHasBOM
protected I Runnable Context get Operation Runner I Progress Monitor monitor if f Operation Runner null f Operation Runner new Workspace Operation Runner f Operation Runner set Progress Monitor monitor return f Operation Runner  IRunnableContext getOperationRunner IProgressMonitor fOperationRunner fOperationRunner WorkspaceOperationRunner fOperationRunner setProgressMonitor fOperationRunner
protected I Scheduling Rule get Reset Rule Object element if element instanceof I File Editor Input I File Editor Input input I File Editor Input element return f Resource Rule Factory modify Rule input get File else return null  ISchedulingRule getResetRule IFileEditorInput IFileEditorInput IFileEditorInput fResourceRuleFactory modifyRule getFile
protected I Scheduling Rule get Save Rule Object element if element instanceof I File Editor Input I File Editor Input input I File Editor Input element return compute Scheduling Rule input get File else return null  ISchedulingRule getSaveRule IFileEditorInput IFileEditorInput IFileEditorInput computeSchedulingRule getFile
protected I Scheduling Rule get Synchronize Rule Object element if element instanceof I File Editor Input I File Editor Input input I File Editor Input element return f Resource Rule Factory refresh Rule input get File else return null  ISchedulingRule getSynchronizeRule IFileEditorInput IFileEditorInput IFileEditorInput fResourceRuleFactory refreshRule getFile
protected I Scheduling Rule get Validate State Rule Object element if element instanceof I File Editor Input I File Editor Input input I File Editor Input element return f Resource Rule Factory validate Edit Rule new I Resource input get File else return null  ISchedulingRule getValidateStateRule IFileEditorInput IFileEditorInput IFileEditorInput fResourceRuleFactory validateEditRule IResource getFile
Returns whether the underlying file has a BOM param element the element or code null code return code true code if the underlying file has BOM private boolean hasBOM Object element if element instanceof I File Editor Input I File file I File Editor Input element get File if file null try I Content Description description file get Content Description return description null description get Property I Content Description BYTE ORDER MARK null catch Core Exception ex return false return false  IFileEditorInput IFile IFileEditorInput getFile IContentDescription getContentDescription getProperty IContentDescription BYTE_ORDER_MARK CoreException
Reads the file s UTF 8 BOM if any and stores it p XXX This is a workaround for a corresponding bug in Java readers and writer see http developer java sun com developer bug Parade bugs 4508058 html p param file the file param encoding the encoding param element the element or code null code throws org eclipse core runtime Core Exception if reading the BOM fails since 3 0 deprecated as of 3 0 this method is no longer in use and does nothing protected void readUTF8BOM I File file String encoding Object element throws Core Exception  bugParade CoreException IFile CoreException
Computes the scheduling rule needed to create or modify a resource If the resource exists its modify rule is returned If it does not the resource hierarchy is iterated towards the workspace root to find the first parent of code to Create Or Modify code that exists Then the create rule for the last non existing resource is returned param to Create Or Modify the resource to create or modify return the minimal scheduling rule needed to modify or create a resource private I Scheduling Rule compute Scheduling Rule I Resource to Create Or Modify if to Create Or Modify exists return f Resource Rule Factory modify Rule to Create Or Modify else I Resource parent to Create Or Modify do to Create Or Modify parent parent to Create Or Modify get Parent while parent null parent exists return f Resource Rule Factory create Rule to Create Or Modify  toCreateOrModify toCreateOrModify ISchedulingRule computeSchedulingRule IResource toCreateOrModify toCreateOrModify fResourceRuleFactory modifyRule toCreateOrModify IResource toCreateOrModify toCreateOrModify toCreateOrModify getParent fResourceRuleFactory createRule toCreateOrModify

Creates a new forwarding document provider with a fixed parent document provider Calling link set Parent Provider I Document Provider does not have any effect on this object param partitioning the partitioning param document Setup Participant the document setup participant param parent Provider the parent document provider public Forwarding Document Provider String partitioning I Document Setup Participant document Setup Participant I Document Provider parent Provider f Partitioning partitioning f Document Setup Participant document Setup Participant f Parent Provider parent Provider f Allow Set Parent Provider false  setParentProvider IDocumentProvider documentSetupParticipant parentProvider ForwardingDocumentProvider IDocumentSetupParticipant documentSetupParticipant IDocumentProvider parentProvider fPartitioning fDocumentSetupParticipant documentSetupParticipant fParentProvider parentProvider fAllowSetParentProvider
Creates a new forwarding document provider with a dynamically changeable parent provider Forwarding document providers created with that method are not allowed to be shared by multiple editors param partitioning the partitioning param document Setup Participant the document setup participant public Forwarding Document Provider String partitioning I Document Setup Participant document Setup Participant f Partitioning partitioning f Document Setup Participant document Setup Participant f Allow Set Parent Provider true  documentSetupParticipant ForwardingDocumentProvider IDocumentSetupParticipant documentSetupParticipant fPartitioning fDocumentSetupParticipant documentSetupParticipant fAllowSetParentProvider
Sets the parent document provider This method has only an effect if the forwarding document provider has accordingly be created param parent Provider the new parent document provider public void set Parent Provider I Document Provider parent Provider if f Allow Set Parent Provider f Parent Provider parent Provider  parentProvider setParentProvider IDocumentProvider parentProvider fAllowSetParentProvider fParentProvider parentProvider
public void connect Object element throws Core Exception f Parent Provider connect element I Document document f Parent Provider get Document element if document instanceof I Document Extension3 I Document Extension3 extension I Document Extension3 document if extension get Document Partitioner f Partitioning null f Document Setup Participant setup document  CoreException fParentProvider IDocument fParentProvider getDocument IDocumentExtension3 IDocumentExtension3 IDocumentExtension3 getDocumentPartitioner fPartitioning fDocumentSetupParticipant
see org eclipse ui texteditor I Document Provider disconnect java lang Object public void disconnect Object element f Parent Provider disconnect element  IDocumentProvider fParentProvider
see org eclipse ui texteditor I Document Provider get Document java lang Object public I Document get Document Object element return f Parent Provider get Document element  IDocumentProvider getDocument IDocument getDocument fParentProvider getDocument
see org eclipse ui texteditor I Document Provider reset Document java lang Object public void reset Document Object element throws Core Exception f Parent Provider reset Document element  IDocumentProvider resetDocument resetDocument CoreException fParentProvider resetDocument
see org eclipse ui texteditor I Document Provider save Document org eclipse core runtime I Progress Monitor java lang Object org eclipse jface text I Document boolean public void save Document I Progress Monitor monitor Object element I Document document boolean overwrite throws Core Exception f Parent Provider save Document monitor element document overwrite  IDocumentProvider saveDocument IProgressMonitor IDocument saveDocument IProgressMonitor IDocument CoreException fParentProvider saveDocument
see org eclipse ui texteditor I Document Provider get Modification Stamp java lang Object public long get Modification Stamp Object element return f Parent Provider get Modification Stamp element  IDocumentProvider getModificationStamp getModificationStamp fParentProvider getModificationStamp
see org eclipse ui texteditor I Document Provider get Synchronization Stamp java lang Object public long get Synchronization Stamp Object element return f Parent Provider get Synchronization Stamp element  IDocumentProvider getSynchronizationStamp getSynchronizationStamp fParentProvider getSynchronizationStamp
see org eclipse ui texteditor I Document Provider is Deleted java lang Object public boolean is Deleted Object element return f Parent Provider is Deleted element  IDocumentProvider isDeleted isDeleted fParentProvider isDeleted
see org eclipse ui texteditor I Document Provider must Save Document java lang Object public boolean must Save Document Object element return f Parent Provider must Save Document element  IDocumentProvider mustSaveDocument mustSaveDocument fParentProvider mustSaveDocument
see org eclipse ui texteditor I Document Provider can Save Document java lang Object public boolean can Save Document Object element return f Parent Provider can Save Document element  IDocumentProvider canSaveDocument canSaveDocument fParentProvider canSaveDocument
see org eclipse ui texteditor I Document Provider get Annotation Model java lang Object public I Annotation Model get Annotation Model Object element return f Parent Provider get Annotation Model element  IDocumentProvider getAnnotationModel IAnnotationModel getAnnotationModel fParentProvider getAnnotationModel
see org eclipse ui texteditor I Document Provider about To Change java lang Object public void about To Change Object element f Parent Provider about To Change element  IDocumentProvider aboutToChange aboutToChange fParentProvider aboutToChange
see org eclipse ui texteditor I Document Provider changed java lang Object public void changed Object element f Parent Provider changed element  IDocumentProvider fParentProvider
see org eclipse ui texteditor I Document Provider add Element State Listener org eclipse ui texteditor I Element State Listener public void add Element State Listener I Element State Listener listener f Parent Provider add Element State Listener listener  IDocumentProvider addElementStateListener IElementStateListener addElementStateListener IElementStateListener fParentProvider addElementStateListener
see org eclipse ui texteditor I Document Provider remove Element State Listener org eclipse ui texteditor I Element State Listener public void remove Element State Listener I Element State Listener listener f Parent Provider remove Element State Listener listener  IDocumentProvider removeElementStateListener IElementStateListener removeElementStateListener IElementStateListener fParentProvider removeElementStateListener
public boolean is Read Only Object element if f Parent Provider instanceof I Document Provider Extension I Document Provider Extension extension I Document Provider Extension f Parent Provider return extension is Read Only element return false  isReadOnly fParentProvider IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension fParentProvider isReadOnly
public boolean is Modifiable Object element if f Parent Provider instanceof I Document Provider Extension I Document Provider Extension extension I Document Provider Extension f Parent Provider return extension is Modifiable element return true  isModifiable fParentProvider IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension fParentProvider isModifiable
public void validate State Object element Object computation Context throws Core Exception if f Parent Provider instanceof I Document Provider Extension I Document Provider Extension extension I Document Provider Extension f Parent Provider extension validate State element computation Context  validateState computationContext CoreException fParentProvider IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension fParentProvider validateState computationContext
public boolean is State Validated Object element if f Parent Provider instanceof I Document Provider Extension I Document Provider Extension extension I Document Provider Extension f Parent Provider return extension is State Validated element return true  isStateValidated fParentProvider IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension fParentProvider isStateValidated
public void update State Cache Object element throws Core Exception if f Parent Provider instanceof I Document Provider Extension I Document Provider Extension extension I Document Provider Extension f Parent Provider extension update State Cache element  updateStateCache CoreException fParentProvider IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension fParentProvider updateStateCache
public void set Can Save Document Object element if f Parent Provider instanceof I Document Provider Extension I Document Provider Extension extension I Document Provider Extension f Parent Provider extension set Can Save Document element  setCanSaveDocument fParentProvider IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension fParentProvider setCanSaveDocument
public I Status get Status Object element if f Parent Provider instanceof I Document Provider Extension I Document Provider Extension extension I Document Provider Extension f Parent Provider return extension get Status element return null  IStatus getStatus fParentProvider IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension fParentProvider getStatus
public void synchronize Object element throws Core Exception if f Parent Provider instanceof I Document Provider Extension I Document Provider Extension extension I Document Provider Extension f Parent Provider extension synchronize element  CoreException fParentProvider IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension fParentProvider
public void set Progress Monitor I Progress Monitor progress Monitor if f Parent Provider instanceof I Document Provider Extension2 I Document Provider Extension2 extension I Document Provider Extension2 f Parent Provider extension set Progress Monitor progress Monitor  setProgressMonitor IProgressMonitor progressMonitor fParentProvider IDocumentProviderExtension2 IDocumentProviderExtension2 IDocumentProviderExtension2 fParentProvider setProgressMonitor progressMonitor
public I Progress Monitor get Progress Monitor if f Parent Provider instanceof I Document Provider Extension2 I Document Provider Extension2 extension I Document Provider Extension2 f Parent Provider return extension get Progress Monitor return null  IProgressMonitor getProgressMonitor fParentProvider IDocumentProviderExtension2 IDocumentProviderExtension2 IDocumentProviderExtension2 fParentProvider getProgressMonitor
public boolean is Synchronized Object element if f Parent Provider instanceof I Document Provider Extension3 I Document Provider Extension3 extension I Document Provider Extension3 f Parent Provider return extension is Synchronized element return true  isSynchronized fParentProvider IDocumentProviderExtension3 IDocumentProviderExtension3 IDocumentProviderExtension3 fParentProvider isSynchronized
public String get Default Encoding if f Parent Provider instanceof I Storage Document Provider I Storage Document Provider provider I Storage Document Provider f Parent Provider return provider get Default Encoding return null  getDefaultEncoding fParentProvider IStorageDocumentProvider IStorageDocumentProvider IStorageDocumentProvider fParentProvider getDefaultEncoding
public String get Encoding Object element if f Parent Provider instanceof I Storage Document Provider I Storage Document Provider provider I Storage Document Provider f Parent Provider return provider get Encoding element return null  getEncoding fParentProvider IStorageDocumentProvider IStorageDocumentProvider IStorageDocumentProvider fParentProvider getEncoding
public void set Encoding Object element String encoding if f Parent Provider instanceof I Storage Document Provider I Storage Document Provider provider I Storage Document Provider f Parent Provider provider set Encoding element encoding  setEncoding fParentProvider IStorageDocumentProvider IStorageDocumentProvider IStorageDocumentProvider fParentProvider setEncoding

Sets the character encoding param encoding the character encoding 
Returns the character encoding return the character encoding 
Returns the default character encoding return the default character encoding 

Returns the location of the given object or code null code p The provided location is either a full path of a workspace resource or an absolute path in the local file system p param element the object for which to get the location return the location of the given object or code null code 

Returns the default character encoding used by this provider return the default character encoding used by this provider 
Returns the character encoding for the given element or code null code if the element is not managed by this provider param element the element return the encoding for the given element 
Sets the encoding for the given element If code encoding code is code null code the workbench s character encoding should be used param element the element param encoding the encoding to be used 

Creates a new storage info param document the document param model the annotation model public Storage Info I Document document I Annotation Model model super document model f Encoding null  StorageInfo IDocument IAnnotationModel fEncoding
Creates a new document provider since 2 0 public Storage Document Provider super  StorageDocumentProvider
Initializes the given document with the given stream param document the document to be initialized param content Stream the stream which delivers the document content throws Core Exception if the given stream can not be read deprecated use encoding based version instead protected void set Document Content I Document document Input Stream content Stream throws Core Exception set Document Content document content Stream null  contentStream CoreException setDocumentContent IDocument InputStream contentStream CoreException setDocumentContent contentStream
Initializes the given document with the given stream using the given encoding param document the document to be initialized param content Stream the stream which delivers the document content param encoding the character encoding for reading the given stream throws Core Exception if the given stream can not be read since 2 0 protected void set Document Content I Document document Input Stream content Stream String encoding throws Core Exception Reader in null try if encoding null encoding get Default Encoding in new Buffered Reader new Input Stream Reader content Stream encoding DEFAULT FILE SIZE String Buffer buffer new String Buffer DEFAULT FILE SIZE char read Buffer new char 2048 int n in read read Buffer while n 0 buffer append read Buffer 0 n n in read read Buffer document set buffer to String catch IO Exception x String message x get Message null x get Message NON NLS 1 I Status s new Status I Status ERROR PlatformUI PLUGIN ID I Status OK message x throw new Core Exception s finally if in null try in close catch IO Exception x  contentStream CoreException setDocumentContent IDocument InputStream contentStream CoreException getDefaultEncoding BufferedReader InputStreamReader contentStream DEFAULT_FILE_SIZE StringBuffer StringBuffer DEFAULT_FILE_SIZE readBuffer readBuffer readBuffer readBuffer toString IOException getMessage getMessage IStatus IStatus PLUGIN_ID IStatus CoreException IOException
Initializes the given document from the given editor input using the default character encoding param document the document to be initialized param editor Input the input from which to derive the content of the document return code true code if the document content could be set code false code otherwise throws Core Exception if the given editor input cannot be accessed deprecated use the encoding based version instead since 2 0 protected boolean set Document Content I Document document I Editor Input editor Input throws Core Exception return set Document Content document editor Input null  editorInput CoreException setDocumentContent IDocument IEditorInput editorInput CoreException setDocumentContent editorInput
Initializes the given document from the given editor input using the given character encoding param document the document to be initialized param editor Input the input from which to derive the content of the document param encoding the character encoding used to read the editor input return code true code if the document content could be set code false code otherwise throws Core Exception if the given editor input cannot be accessed since 2 0 protected boolean set Document Content I Document document I Editor Input editor Input String encoding throws Core Exception if editor Input instanceof I Storage Editor Input I Storage storage I Storage Editor Input editor Input get Storage set Document Content document storage get Contents encoding return true return false  editorInput CoreException setDocumentContent IDocument IEditorInput editorInput CoreException editorInput IStorageEditorInput IStorage IStorageEditorInput editorInput getStorage setDocumentContent getContents
see Abstract Document Provider create Annotation Model Object protected I Annotation Model create Annotation Model Object element throws Core Exception return null  AbstractDocumentProvider createAnnotationModel IAnnotationModel createAnnotationModel CoreException
Factory method for creating empty documents return the newly created document since 2 1 protected I Document create Empty Document return new Document  IDocument createEmptyDocument
protected I Document create Document Object element throws Core Exception if element instanceof I Editor Input I Document document create Empty Document if set Document Content document I Editor Input element get Encoding element setup Document element document return document return null  IDocument createDocument CoreException IEditorInput IDocument createEmptyDocument setDocumentContent IEditorInput getEncoding setupDocument
Sets up the given document as it would be provided for the given element The content of the document is not changed This default implementation is empty Subclasses may reimplement param element the blue print element param document the document to set up since 3 0 protected void setup Document Object element I Document document  setupDocument IDocument
protected Element Info create Element Info Object element throws Core Exception if element instanceof I Storage Editor Input I Document document null I Status status null try document create Document element catch Core Exception x status x get Status document create Empty Document Element Info info new Storage Info document create Annotation Model element info f Status status Storage Info info f Encoding get Persisted Encoding element return info return super create Element Info element  ElementInfo createElementInfo CoreException IStorageEditorInput IDocument IStatus createDocument CoreException getStatus createEmptyDocument ElementInfo StorageInfo createAnnotationModel fStatus StorageInfo fEncoding getPersistedEncoding createElementInfo
see Abstract Document Provider do Save Document I Progress Monitor Object I Document boolean protected void do Save Document I Progress Monitor monitor Object element I Document document boolean overwrite throws Core Exception  AbstractDocumentProvider doSaveDocument IProgressMonitor IDocument doSaveDocument IProgressMonitor IDocument CoreException
Defines the standard procedure to handle code Core Exceptions code Exceptions are written to the plug in log param exception the exception to be logged param message the message to be logged since 2 0 protected void handle Core Exception Core Exception exception String message Bundle bundle Platform get Bundle PlatformUI PLUGIN ID I Log log Platform get Log bundle if message null log log new Status I Status ERROR PlatformUI PLUGIN ID 0 message exception else log log exception get Status  CoreExceptions handleCoreException CoreException getBundle PLUGIN_ID ILog getLog IStatus PLUGIN_ID getStatus
Updates the internal cache for the given input param input the input whose cache will be updated throws Core Exception if the storage cannot be retrieved from the input since 2 0 protected void update Cache I Storage Editor Input input throws Core Exception Storage Info info Storage Info get Element Info input if info null try I Storage storage input get Storage if storage null boolean read Only storage is Read Only info f Is Read Only read Only info f Is Modifiable read Only catch Core Exception x handle Core Exception x Text Editor Messages get String Storage Document Provider update Cache NON NLS 1 info f Update Cache false  CoreException updateCache IStorageEditorInput CoreException StorageInfo StorageInfo getElementInfo IStorage getStorage readOnly isReadOnly fIsReadOnly readOnly fIsModifiable readOnly CoreException handleCoreException TextEditorMessages getString StorageDocumentProvider updateCache fUpdateCache
public boolean is Read Only Object element if element instanceof I Storage Editor Input Storage Info info Storage Info get Element Info element if info null if info f Update Cache try update Cache I Storage Editor Input element catch Core Exception x handle Core Exception x Text Editor Messages get String Storage Document Provider is Read Only NON NLS 1 return info f Is Read Only return super is Read Only element  isReadOnly IStorageEditorInput StorageInfo StorageInfo getElementInfo fUpdateCache updateCache IStorageEditorInput CoreException handleCoreException TextEditorMessages getString StorageDocumentProvider isReadOnly fIsReadOnly isReadOnly
public boolean is Modifiable Object element if element instanceof I Storage Editor Input Storage Info info Storage Info get Element Info element if info null if info f Update Cache try update Cache I Storage Editor Input element catch Core Exception x handle Core Exception x Text Editor Messages get String Storage Document Provider is Modifiable NON NLS 1 return info f Is Modifiable return super is Modifiable element  isModifiable IStorageEditorInput StorageInfo StorageInfo getElementInfo fUpdateCache updateCache IStorageEditorInput CoreException handleCoreException TextEditorMessages getString StorageDocumentProvider isModifiable fIsModifiable isModifiable
protected void do Update State Cache Object element throws Core Exception if element instanceof I Storage Editor Input Storage Info info Storage Info get Element Info element if info null info f Update Cache true super do Update State Cache element  doUpdateStateCache CoreException IStorageEditorInput StorageInfo StorageInfo getElementInfo fUpdateCache doUpdateStateCache
since 2 0 public String get Default Encoding return Resources Plugin get Encoding  getDefaultEncoding ResourcesPlugin getEncoding
public String get Encoding Object element if element instanceof I Storage Editor Input Storage Info info Storage Info get Element Info element if info null return info f Encoding else return get Persisted Encoding element return null  getEncoding IStorageEditorInput StorageInfo StorageInfo getElementInfo fEncoding getPersistedEncoding
public void set Encoding Object element String encoding if element instanceof I Storage Editor Input Storage Info info Storage Info get Element Info element if info null info f Encoding encoding try persist Encoding element encoding catch Core Exception ex XXX log  setEncoding IStorageEditorInput StorageInfo StorageInfo getElementInfo fEncoding persistEncoding CoreException
Returns the persisted encoding for the given element param element the element for which to get the persisted encoding return the persisted encoding since 2 1 protected String get Persisted Encoding Object element if element instanceof I Storage Editor Input I Storage storage try storage I Storage Editor Input element get Storage if storage instanceof I Encoded Storage return I Encoded Storage storage get Charset catch Core Exception e return null return null  getPersistedEncoding IStorageEditorInput IStorage IStorageEditorInput getStorage IEncodedStorage IEncodedStorage getCharset CoreException
Persists the given encoding for the given element param element the element for which to store the persisted encoding param encoding the encoding throws Core Exception if the operation fails since 2 1 protected void persist Encoding Object element String encoding throws Core Exception Default is to do nothing  CoreException persistEncoding CoreException
since 3 0 protected I Runnable Context get Operation Runner I Progress Monitor monitor return null  IRunnableContext getOperationRunner IProgressMonitor

Tries to create a context type given an id If there is already a context type registered under the given id nothing happens Otherwise contributions to the code org eclipse ui editors templates code extension point are searched for the given identifier and the specified context type instantiated if it is found param id the id for the context type as specified in XML public void add Context Type String id Assert is Not Null id if get Context Type id null return Template Context Type type create Context Type id if type null add Context Type type  addContextType isNotNull getContextType TemplateContextType createContextType addContextType
Tries to create a context type given an id Contributions to the code org eclipse ui editors templates code extension point are searched for the given identifier and the specified context type instantiated if it is found Any contributed link org eclipse jface text templates Template Variable Resolver s are also instantiated and added to the context type param id the id for the context type as specified in XML return the instantiated and configured context type or code null code if it is not found or cannot be instantiated public static Template Context Type create Context Type String id Assert is Not Null id I Configuration Element extensions get Template Extensions Template Context Type type try type create Context Type extensions id if type null Template Variable Resolver resolvers create Resolvers extensions id for int i 0 i resolvers length i type add Resolver resolvers i catch Core Exception e Editors Plugin log e type null return type  TemplateVariableResolver TemplateContextType createContextType isNotNull IConfigurationElement getTemplateExtensions TemplateContextType createContextType TemplateVariableResolver createResolvers addResolver CoreException EditorsPlugin
private static Template Context Type create Context Type I Configuration Element extensions String context Type Id throws Core Exception for int i 0 i extensions length i TODO create half order over contributions if extensions i get Name equals CONTEXT TYPE String id extensions i get Attribute As Is ID if context Type Id equals id return create Context Type extensions i return null  TemplateContextType createContextType IConfigurationElement contextTypeId CoreException getName CONTEXT_TYPE getAttributeAsIs contextTypeId createContextType
Instantiates the resolvers contributed to the context type with id code context Type Id code If instantiation of one resolver fails the exception are logged and operation continues param extensions the configuration elements to parse param context Type Id the id of the context type for which resolvers are instantiated return the instantiated resolvers private static Template Variable Resolver create Resolvers I Configuration Element extensions String context Type Id List resolvers new Array List for int i 0 i extensions length i if extensions i get Name equals RESOLVER String declared Id extensions i get Attribute As Is CONTEXT TYPE ID if context Type Id equals declared Id try Template Variable Resolver resolver create Resolver extensions i if resolver null resolvers add resolver catch Core Exception e Editors Plugin log e return Template Variable Resolver resolvers to Array new Template Variable Resolver resolvers size  contextTypeId contextTypeId TemplateVariableResolver createResolvers IConfigurationElement contextTypeId ArrayList getName declaredId getAttributeAsIs CONTEXT_TYPE_ID contextTypeId declaredId TemplateVariableResolver createResolver CoreException EditorsPlugin TemplateVariableResolver toArray TemplateVariableResolver
private static I Configuration Element get Template Extensions return Platform get Extension Registry get Configuration Elements For TEMPLATES EXTENSION POINT  IConfigurationElement getTemplateExtensions getExtensionRegistry getConfigurationElementsFor TEMPLATES_EXTENSION_POINT
private static Template Context Type create Context Type I Configuration Element element throws Core Exception String id element get Attribute As Is ID try Template Context Type context Type Template Context Type element create Executable Extension CLASS String name element get Attribute NAME if name null name id context Type set Id id context Type set Name name return context Type catch Class Cast Exception e throw new Core Exception new Status I Status ERROR EditorsUI PLUGIN ID I Status OK extension does not implement Template Context Type class get Name e NON NLS 1  TemplateContextType createContextType IConfigurationElement CoreException getAttributeAsIs TemplateContextType contextType TemplateContextType createExecutableExtension getAttribute contextType setId contextType setName contextType ClassCastException CoreException IStatus PLUGIN_ID IStatus TemplateContextType getName
private static Template Variable Resolver create Resolver I Configuration Element element throws Core Exception try String type element get Attribute As Is TYPE if type null Template Variable Resolver resolver Template Variable Resolver element create Executable Extension CLASS resolver set Type type String desc element get Attribute DESCRIPTION if desc null desc new String resolver set Description desc return resolver catch Class Cast Exception e throw new Core Exception new Status I Status ERROR EditorsUI PLUGIN ID I Status OK extension does not implement Template Variable Resolver class get Name e NON NLS 1 return null  TemplateVariableResolver createResolver IConfigurationElement CoreException getAttributeAsIs TemplateVariableResolver TemplateVariableResolver createExecutableExtension setType getAttribute setDescription ClassCastException CoreException IStatus PLUGIN_ID IStatus TemplateVariableResolver getName

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Contribution Template Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME ContributionTemplateMessages
Gets a string from the resource bundle param key the string used to get the bundle value must not be code null code return the string from the resource bundle public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Creates a new template store param store the preference store in which to store custom templates under code key code param key the key into code store code where to store custom templates public Contribution Template Store I Preference Store store String key super store key  ContributionTemplateStore IPreferenceStore
Creates a new template store with a context type registry Only templates that specify a context type contained in the registry will be loaded by this store if the registry is not code null code param registry a context type registry or code null code if all templates should be loaded param store the preference store in which to store custom templates under code key code param key the key into code store code where to store custom templates public Contribution Template Store Context Type Registry registry I Preference Store store String key super registry store key  ContributionTemplateStore ContextTypeRegistry IPreferenceStore
Loads the templates contributed via the templates extension point throws IO Exception inherit Doc protected void load Contributed Templates throws IO Exception I Configuration Element extensions get Template Extensions Collection contributed read Contributed Templates extensions for Iterator it contributed iterator it has Next Template Persistence Data data Template Persistence Data it next internal Add data  IOException inheritDoc loadContributedTemplates IOException IConfigurationElement getTemplateExtensions readContributedTemplates hasNext TemplatePersistenceData TemplatePersistenceData internalAdd
private Collection read Contributed Templates I Configuration Element extensions throws IO Exception Collection templates new Array List for int i 0 i extensions length i if extensions i get Name equals TEMPLATE create Template templates extensions i else if extensions i get Name equals INCLUDE read Included Templates templates extensions i return templates  readContributedTemplates IConfigurationElement IOException ArrayList getName createTemplate getName readIncludedTemplates
private void read Included Templates Collection templates I Configuration Element element throws IO Exception String file element get Attribute As Is FILE if file null Bundle plugin Platform get Bundle element get Declaring Extension get Namespace URL url Platform find plugin new Path file if url null Resource Bundle bundle null String translations element get Attribute As Is TRANSLATIONS if translations null URL bundleURL Platform find plugin new Path translations if url null bundle new Property Resource Bundle bundleURL open Stream Input Stream stream new Buffered Input Stream url open Stream Template Reader Writer reader new Template Reader Writer Template Persistence Data datas reader read stream bundle for int i 0 i datas length i Template Persistence Data data datas i if data is Custom if data get Id null Editors Plugin log Error Message Contribution Template Messages get String Contribution Template Store ignore prefix data get Template get Name Contribution Template Messages get String Contribution Template Store ignore postfix no id NON NLS 1 NON NLS 2 NON NLS 3 else Editors Plugin log Error Message Contribution Template Messages get String Contribution Template Store ignore prefix data get Template get Name Contribution Template Messages get String Contribution Template Store ignore postfix deleted NON NLS 1 NON NLS 2 NON NLS 3 else if validate Template data get Template if context Exists data get Template get Context Type Id Editors Plugin log Error Message Contribution Template Messages get String Contribution Template Store ignore prefix data get Template get Name Contribution Template Messages get String Contribution Template Store ignore postfix validation failed NON NLS 1 NON NLS 2 NON NLS 3 else templates add data  readIncludedTemplates IConfigurationElement IOException getAttributeAsIs getBundle getDeclaringExtension getNamespace ResourceBundle getAttributeAsIs PropertyResourceBundle openStream InputStream BufferedInputStream openStream TemplateReaderWriter TemplateReaderWriter TemplatePersistenceData TemplatePersistenceData isCustom getId EditorsPlugin logErrorMessage ContributionTemplateMessages getString ContributionTemplateStore ignore_prefix getTemplate getName ContributionTemplateMessages getString ContributionTemplateStore ignore_postfix_no_id EditorsPlugin logErrorMessage ContributionTemplateMessages getString ContributionTemplateStore ignore_prefix getTemplate getName ContributionTemplateMessages getString ContributionTemplateStore ignore_postfix_deleted validateTemplate getTemplate contextExists getTemplate getContextTypeId EditorsPlugin logErrorMessage ContributionTemplateMessages getString ContributionTemplateStore ignore_prefix getTemplate getName ContributionTemplateMessages getString ContributionTemplateStore ignore_postfix_validation_failed
Validates a template against the context type registered in the context type registry Returns always code true code if no registry is present param template the template to validate return code true code if validation is successful or no context type registry is specified code false code if validation fails private boolean validate Template Template template String context Type Id template get Context Type Id if context Exists context Type Id if get Registry null try get Registry get Context Type context Type Id validate template get Pattern catch Template Exception e return false return true else return false  validateTemplate contextTypeId getContextTypeId contextExists contextTypeId getRegistry getRegistry getContextType contextTypeId getPattern TemplateException
Returns code true code if a context type id specifies a valid context type or if no context type registry is present param context Type Id the context type id to look for return code true code if the context type specified by the id is present in the context type registry or if no registry is specified private boolean context Exists String context Type Id return context Type Id null get Registry null get Registry get Context Type context Type Id null  contextTypeId contextExists contextTypeId contextTypeId getRegistry getRegistry getContextType contextTypeId
private static I Configuration Element get Template Extensions return Platform get Extension Registry get Configuration Elements For TEMPLATES EXTENSION POINT  IConfigurationElement getTemplateExtensions getExtensionRegistry getConfigurationElementsFor TEMPLATES_EXTENSION_POINT
private void create Template Collection map I Configuration Element element String context Type Id element get Attribute As Is CONTEXT TYPE ID log failures since extension point id and name are mandatory if context Exists context Type Id String id element get Attribute As Is ID if is Valid Template Id id String name element get Attribute NAME if name null String desc element get Attribute DESCRIPTION if desc null desc new String String pattern element get Children PATTERN 0 get Value if pattern null Template template new Template name desc context Type Id pattern Template Persistence Data data new Template Persistence Data template true id if validate Template template map add data  createTemplate IConfigurationElement contextTypeId getAttributeAsIs CONTEXT_TYPE_ID contextExists contextTypeId getAttributeAsIs isValidTemplateId getAttribute getAttribute getChildren getValue contextTypeId TemplatePersistenceData TemplatePersistenceData validateTemplate
private static boolean is Valid Template Id String id return id null id trim length 0 TODO test validity  isValidTemplateId

Creates a new text editor public Text Editor super if get Source Viewer Configuration null configuration not yet set by subclass set Source Viewer Configuration new Text Source Viewer Configuration get Preference Store  TextEditor getSourceViewerConfiguration setSourceViewerConfiguration TextSourceViewerConfiguration getPreferenceStore
inherit Doc This method configures the editor but does not define a code Source Viewer Configuration code When only interested in providing a custom source viewer configuration subclasses may extend this method protected void initialize Editor set Editor Context Menu Id Text Editor Context NON NLS 1 set Ruler Context Menu Id Text Ruler Context NON NLS 1 set Help Context Id I Text Editor Help Context Ids TEXT EDITOR set Preference Store Editors Plugin get Default get Preference Store configure Insert Mode SMART INSERT false set Insert Mode INSERT  inheritDoc SourceViewerConfiguration initializeEditor setEditorContextMenuId TextEditorContext setRulerContextMenuId TextRulerContext setHelpContextId ITextEditorHelpContextIds TEXT_EDITOR setPreferenceStore EditorsPlugin getDefault getPreferenceStore configureInsertMode SMART_INSERT setInsertMode
public void dispose if f Encoding Support null f Encoding Support dispose f Encoding Support null super dispose  fEncodingSupport fEncodingSupport fEncodingSupport
Installs the encoding support on the given text editor p Subclasses may override to install their own encoding support or to disable the default encoding support p since 2 1 protected void install Encoding Support f Encoding Support new Default Encoding Support f Encoding Support initialize this  installEncodingSupport fEncodingSupport DefaultEncodingSupport fEncodingSupport
The code Text Editor code implementation of this code Abstract Text Editor code method asks the user for the workspace path of a file resource and saves the document there param progress Monitor the progress monitor to be used protected void perform Save As I Progress Monitor progress Monitor Shell shell get Site get Shell I Editor Input input get Editor Input Save As Dialog dialog new Save As Dialog shell I File original input instanceof I File Editor Input I File Editor Input input get File null if original null dialog set Original File original dialog create I Document Provider provider get Document Provider if provider null editor has programmatically been closed while the dialog was open return if provider is Deleted input original null String message Message Format format Text Editor Messages get String Editor warning save delete new Object original get Name NON NLS 1 dialog set Error Message null dialog set Message message I Message Provider WARNING if dialog open Window CANCEL if progress Monitor null progress Monitor set Canceled true return I Path file Path dialog get Result if file Path null if progress Monitor null progress Monitor set Canceled true return I Workspace workspace Resources Plugin get Workspace I File file workspace get Root get File file Path final I Editor Input new Input new File Editor Input file boolean success false try provider about To Change new Input provider save Document progress Monitor new Input provider get Document input true success true catch Core Exception x I Status status x get Status if status null status get Severity I Status CANCEL String title Text Editor Messages get String Editor error save title NON NLS 1 String msg Message Format format Text Editor Messages get String Editor error save message new Object x get Message NON NLS 1 if status null switch status get Severity case I Status INFO Message Dialog open Information shell title msg break case I Status WARNING Message Dialog open Warning shell title msg break default Message Dialog open Error shell title msg else Message Dialog open Error shell title msg finally provider changed new Input if success set Input new Input if progress Monitor null progress Monitor set Canceled success  TextEditor AbstractTextEditor progressMonitor performSaveAs IProgressMonitor progressMonitor getSite getShell IEditorInput getEditorInput SaveAsDialog SaveAsDialog IFile IFileEditorInput IFileEditorInput getFile setOriginalFile IDocumentProvider getDocumentProvider isDeleted MessageFormat TextEditorMessages getString getName setErrorMessage setMessage IMessageProvider progressMonitor progressMonitor setCanceled IPath filePath getResult filePath progressMonitor progressMonitor setCanceled IWorkspace ResourcesPlugin getWorkspace IFile getRoot getFile filePath IEditorInput newInput FileEditorInput aboutToChange newInput saveDocument progressMonitor newInput getDocument CoreException IStatus getStatus getSeverity IStatus TextEditorMessages getString MessageFormat TextEditorMessages getString getMessage getSeverity IStatus MessageDialog openInformation IStatus MessageDialog openWarning MessageDialog openError MessageDialog openError newInput setInput newInput progressMonitor progressMonitor setCanceled
see org eclipse ui part Editor Part is Save As Allowed public boolean is Save As Allowed return true  EditorPart isSaveAsAllowed isSaveAsAllowed
protected void create Actions super create Actions Resource Action action new Convert Line Delimiters Action Text Editor Messages get Resource Bundle Editor Convert To Windows this r n NON NLS 1 NON NLS 2 action set Help Context Id I Abstract Text Editor Help Context Ids CONVERT LINE DELIMITERS TO WINDOWS action set Action Definition Id I Text Editor Action Definition Ids CONVERT LINE DELIMITERS TO WINDOWS set Action I Text Editor Action Constants CONVERT LINE DELIMITERS TO WINDOWS action action new Convert Line Delimiters Action Text Editor Messages get Resource Bundle Editor Convert ToUNIX this n NON NLS 1 NON NLS 2 action set Help Context Id I Abstract Text Editor Help Context Ids CONVERT LINE DELIMITERS TO UNIX action set Action Definition Id I Text Editor Action Definition Ids CONVERT LINE DELIMITERS TO UNIX set Action I Text Editor Action Constants CONVERT LINE DELIMITERS TO UNIX action action new Convert Line Delimiters Action Text Editor Messages get Resource Bundle Editor Convert To Mac this r NON NLS 1 NON NLS 2 action set Help Context Id I Abstract Text Editor Help Context Ids CONVERT LINE DELIMITERS TO MAC action set Action Definition Id I Text Editor Action Definition Ids CONVERT LINE DELIMITERS TO MAC set Action I Text Editor Action Constants CONVERT LINE DELIMITERS TO MAC action http dev eclipse org bugs show bug cgi id 17709 mark As State Dependent Action I Text Editor Action Constants CONVERT LINE DELIMITERS TO WINDOWS true mark As State Dependent Action I Text Editor Action Constants CONVERT LINE DELIMITERS TO UNIX true mark As State Dependent Action I Text Editor Action Constants CONVERT LINE DELIMITERS TO MAC true install Encoding Support  createActions createActions ResourceAction ConvertLineDelimitersAction TextEditorMessages getResourceBundle ConvertToWindows setHelpContextId IAbstractTextEditorHelpContextIds CONVERT_LINE_DELIMITERS_TO_WINDOWS setActionDefinitionId ITextEditorActionDefinitionIds CONVERT_LINE_DELIMITERS_TO_WINDOWS setAction ITextEditorActionConstants CONVERT_LINE_DELIMITERS_TO_WINDOWS ConvertLineDelimitersAction TextEditorMessages getResourceBundle ConvertToUNIX setHelpContextId IAbstractTextEditorHelpContextIds CONVERT_LINE_DELIMITERS_TO_UNIX setActionDefinitionId ITextEditorActionDefinitionIds CONVERT_LINE_DELIMITERS_TO_UNIX setAction ITextEditorActionConstants CONVERT_LINE_DELIMITERS_TO_UNIX ConvertLineDelimitersAction TextEditorMessages getResourceBundle ConvertToMac setHelpContextId IAbstractTextEditorHelpContextIds CONVERT_LINE_DELIMITERS_TO_MAC setActionDefinitionId ITextEditorActionDefinitionIds CONVERT_LINE_DELIMITERS_TO_MAC setAction ITextEditorActionConstants CONVERT_LINE_DELIMITERS_TO_MAC show_bug markAsStateDependentAction ITextEditorActionConstants CONVERT_LINE_DELIMITERS_TO_WINDOWS markAsStateDependentAction ITextEditorActionConstants CONVERT_LINE_DELIMITERS_TO_UNIX markAsStateDependentAction ITextEditorActionConstants CONVERT_LINE_DELIMITERS_TO_MAC installEncodingSupport
protected String get Status Header I Status status if f Encoding Support null String message f Encoding Support get Status Header status if message null return message return super get Status Header status  getStatusHeader IStatus fEncodingSupport fEncodingSupport getStatusHeader getStatusHeader
protected String get Status Banner I Status status if f Encoding Support null String message f Encoding Support get Status Banner status if message null return message return super get Status Banner status  getStatusBanner IStatus fEncodingSupport fEncodingSupport getStatusBanner getStatusBanner
protected String get Status Message I Status status if f Encoding Support null String message f Encoding Support get Status Message status if message null return message return super get Status Message status  getStatusMessage IStatus fEncodingSupport fEncodingSupport getStatusMessage getStatusMessage
protected void do Set Input I Editor Input input throws Core Exception super do Set Input input if f Encoding Support null f Encoding Support reset  doSetInput IEditorInput CoreException doSetInput fEncodingSupport fEncodingSupport
public Object get Adapter Class adapter if I Encoding Support class equals adapter return f Encoding Support return super get Adapter adapter  getAdapter IEncodingSupport fEncodingSupport getAdapter
protected void update Property Dependent Actions super update Property Dependent Actions if f Encoding Support null f Encoding Support reset  updatePropertyDependentActions updatePropertyDependentActions fEncodingSupport fEncodingSupport
protected void editor Context Menu About To Show I Menu Manager menu super editor Context Menu About To Show menu add Action menu I Text Editor Action Constants GROUP EDIT I Text Editor Action Constants SHIFT RIGHT add Action menu I Text Editor Action Constants GROUP EDIT I Text Editor Action Constants SHIFT LEFT  editorContextMenuAboutToShow IMenuManager editorContextMenuAboutToShow addAction ITextEditorActionConstants GROUP_EDIT ITextEditorActionConstants SHIFT_RIGHT addAction ITextEditorActionConstants GROUP_EDIT ITextEditorActionConstants SHIFT_LEFT

Creates a new contributor public Text Editor Action Contributor super line delimiter conversion f Convert To Windows new Retarget Text Editor Action Text Editor Messages get Resource Bundle Editor Convert To Windows NON NLS 1 f Convert ToUNIX new Retarget Text Editor Action Text Editor Messages get Resource Bundle Editor Convert ToUNIX NON NLS 1 f Convert To Mac new Retarget Text Editor Action Text Editor Messages get Resource Bundle Editor Convert To Mac NON NLS 1 character encoding f Encoding Action Group new Encoding Action Group  TextEditorActionContributor fConvertToWindows RetargetTextEditorAction TextEditorMessages getResourceBundle ConvertToWindows fConvertToUNIX RetargetTextEditorAction TextEditorMessages getResourceBundle ConvertToUNIX fConvertToMac RetargetTextEditorAction TextEditorMessages getResourceBundle ConvertToMac fEncodingActionGroup EncodingActionGroup
Internally sets the active editor to the actions provided by this contributor Cannot be overridden by subclasses param part the editor private void do Set Active Editor I Editor Part part I Text Editor text Editor null if part instanceof I Text Editor text Editor I Text Editor part I Action Bars action Bars get Action Bars if action Bars null action Bars set Global Action Handler IDE Action Factory ADD TASK get Id get Action text Editor IDE Action Factory ADD TASK get Id action Bars set Global Action Handler IDE Action Factory BOOKMARK get Id get Action text Editor IDE Action Factory BOOKMARK get Id line delimiter conversion f Convert To Windows set Action get Action text Editor I Text Editor Action Constants CONVERT LINE DELIMITERS TO WINDOWS f Convert ToUNIX set Action get Action text Editor I Text Editor Action Constants CONVERT LINE DELIMITERS TO UNIX f Convert To Mac set Action get Action text Editor I Text Editor Action Constants CONVERT LINE DELIMITERS TO MAC character encoding f Encoding Action Group retarget text Editor  doSetActiveEditor IEditorPart ITextEditor textEditor ITextEditor textEditor ITextEditor IActionBars actionBars getActionBars actionBars actionBars setGlobalActionHandler IDEActionFactory ADD_TASK getId getAction textEditor IDEActionFactory ADD_TASK getId actionBars setGlobalActionHandler IDEActionFactory getId getAction textEditor IDEActionFactory getId fConvertToWindows setAction getAction textEditor ITextEditorActionConstants CONVERT_LINE_DELIMITERS_TO_WINDOWS fConvertToUNIX setAction getAction textEditor ITextEditorActionConstants CONVERT_LINE_DELIMITERS_TO_UNIX fConvertToMac setAction getAction textEditor ITextEditorActionConstants CONVERT_LINE_DELIMITERS_TO_MAC fEncodingActionGroup textEditor
see I Editor Action Bar Contributor set Active Editor org eclipse ui I Editor Part public void set Active Editor I Editor Part part super set Active Editor part do Set Active Editor part  IEditorActionBarContributor setActiveEditor IEditorPart setActiveEditor IEditorPart setActiveEditor doSetActiveEditor
public void init I Action Bars bars super init bars line delimiter conversion I Menu Manager menu Manager bars get Menu Manager I Menu Manager edit Menu menu Manager find Menu Using Path I Workbench Action Constants M EDIT if edit Menu null Menu Manager sub Menu new Menu Manager Text Editor Messages get String Editor Convert Line Delimiters label NON NLS 1 sub Menu add f Convert To Windows sub Menu add f Convert ToUNIX sub Menu add f Convert To Mac edit Menu add sub Menu character encoding f Encoding Action Group fill Action Bars bars  IActionBars IMenuManager menuManager getMenuManager IMenuManager editMenu menuManager findMenuUsingPath IWorkbenchActionConstants M_EDIT editMenu MenuManager subMenu MenuManager TextEditorMessages getString ConvertLineDelimiters subMenu fConvertToWindows subMenu fConvertToUNIX subMenu fConvertToMac editMenu subMenu fEncodingActionGroup fillActionBars
see I Editor Action Bar Contributor dispose public void dispose do Set Active Editor null super dispose  IEditorActionBarContributor doSetActiveEditor

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Text Editor Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE TextEditorMessages
Gets a string from the resource bundle param key the string used to get the bundle value must not be code null code return the string from the resource bundle public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException
Gets a string from the resource bundle and formats it with the given argument param key the string used to get the bundle value must not be null param arg the argument used to format the string return the formatted string since 3 0 public static String get Formatted String String key Object arg String format null try format fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1 if arg null arg NON NLS 1 return Message Format format format new Object arg  getFormattedString fgResourceBundle getString MissingResourceException MessageFormat
Returns a resource bundle return the resource bundle public static Resource Bundle get Resource Bundle return fg Resource Bundle  ResourceBundle getResourceBundle fgResourceBundle

Prevent initialization private Text Editor Preference Constants  TextEditorPreferenceConstants
Initializes the given preference store with the default values param store the preference store to be initialized public static void initialize Default Values I Preference Store store set defaults from Abstract Decorated Text Editor Abstract Decorated Text Editor Preference Constants initialize Default Values store store set Default Abstract Decorated Text Editor Preference Constants EDITOR USE CUSTOM CARETS true  initializeDefaultValues IPreferenceStore AbstractDecoratedTextEditor AbstractDecoratedTextEditorPreferenceConstants initializeDefaultValues setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_USE_CUSTOM_CARETS

Creates and returns the text editor preference page public Text Editor Preference Page super GRID set Description Text Editor Messages get String Preference Page description NON NLS 1 Plugin plugin Platform get Plugin org eclipse ui workbench NON NLS 1 if plugin instanceof AbstractUI Plugin AbstractUI Plugin ui Plugin AbstractUI Plugin plugin set Preference Store ui Plugin get Preference Store  TextEditorPreferencePage setDescription TextEditorMessages getString PreferencePage getPlugin AbstractUIPlugin AbstractUIPlugin uiPlugin AbstractUIPlugin setPreferenceStore uiPlugin getPreferenceStore
see I Dialog Page create Control org eclipse swt widgets Composite public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Text Editor Help Context Ids TEXT EDITOR PREFERENCE PAGE  IDialogPage createControl createControl createControl WorkbenchHelp setHelp getControl ITextEditorHelpContextIds TEXT_EDITOR_PREFERENCE_PAGE
see Field Editor Preference Page create Field Editors public void create Field Editors add Field new Font Field Editor J Face Resources TEXT FONT Text Editor Messages get String Preference Page font Editor get Field Editor Parent NON NLS 1  FieldEditorPreferencePage createFieldEditors createFieldEditors addField FontFieldEditor JFaceResources TEXT_FONT TextEditorMessages getString PreferencePage fontEditor getFieldEditorParent
see I Workbench Preference Page init org eclipse ui I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
Initializes the defaults for the given store param store the preference store since 2 0 public static void init Defaults I Preference Store store if fg Initialized return fg Initialized true Font font J Face Resources get Text Font if font null Font Data data font get Font Data if data null data length 0 Preference Converter set Default store J Face Resources TEXT FONT data 0 Display display Display get Default Color color display get System Color SWT COLOR LIST FOREGROUND Preference Converter set Default store Abstract Text Editor PREFERENCE COLOR FOREGROUND color getRGB store set Default Abstract Text Editor PREFERENCE COLOR FOREGROUND SYSTEM DEFAULT true color display get System Color SWT COLOR LIST BACKGROUND Preference Converter set Default store Abstract Text Editor PREFERENCE COLOR BACKGROUND color getRGB store set Default Abstract Text Editor PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT true  initDefaults IPreferenceStore fgInitialized fgInitialized JFaceResources getTextFont FontData getFontData PreferenceConverter setDefault JFaceResources TEXT_FONT getDefault getSystemColor COLOR_LIST_FOREGROUND PreferenceConverter setDefault AbstractTextEditor PREFERENCE_COLOR_FOREGROUND setDefault AbstractTextEditor PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT getSystemColor COLOR_LIST_BACKGROUND PreferenceConverter setDefault AbstractTextEditor PREFERENCE_COLOR_BACKGROUND setDefault AbstractTextEditor PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT

The actual functionality of this operation param monitor the progress monitor throws Core Exception  CoreException
public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try execute monitor catch Core Exception x throw new Invocation Target Exception x  IProgressMonitor InvocationTargetException InterruptedException CoreException InvocationTargetException
see org eclipse ui texteditor I Scheduling Rule Provider get Scheduling Rule public I Scheduling Rule get Scheduling Rule return Resources Plugin get Workspace get Root  ISchedulingRuleProvider getSchedulingRule ISchedulingRule getSchedulingRule ResourcesPlugin getWorkspace getRoot
static final private I Status STATUS ERROR new Status I Status ERROR EditorsUI PLUGIN ID I Status INFO Text Editor Messages get String Null Provider error null NON NLS 1 public void connect Object element throws Core Exception  IStatus STATUS_ERROR IStatus PLUGIN_ID IStatus TextEditorMessages getString NullProvider CoreException
public void connect Object element throws Core Exception public void disconnect Object element  CoreException
public void connect Object element throws Core Exception public void disconnect Object element public I Document get Document Object element return null  CoreException IDocument getDocument
public void disconnect Object element public I Document get Document Object element return null public void reset Document Object element throws Core Exception  IDocument getDocument resetDocument CoreException
public I Document get Document Object element return null public void reset Document Object element throws Core Exception public void save Document I Progress Monitor monitor Object element I Document document boolean overwrite throws Core Exception  IDocument getDocument resetDocument CoreException saveDocument IProgressMonitor IDocument CoreException
public void reset Document Object element throws Core Exception public void save Document I Progress Monitor monitor Object element I Document document boolean overwrite throws Core Exception public long get Modification Stamp Object element return 0  resetDocument CoreException saveDocument IProgressMonitor IDocument CoreException getModificationStamp
public void save Document I Progress Monitor monitor Object element I Document document boolean overwrite throws Core Exception public long get Modification Stamp Object element return 0 public long get Synchronization Stamp Object element return 0  saveDocument IProgressMonitor IDocument CoreException getModificationStamp getSynchronizationStamp
public long get Modification Stamp Object element return 0 public long get Synchronization Stamp Object element return 0 public boolean is Deleted Object element return true  getModificationStamp getSynchronizationStamp isDeleted
public long get Synchronization Stamp Object element return 0 public boolean is Deleted Object element return true public boolean must Save Document Object element return false  getSynchronizationStamp isDeleted mustSaveDocument
public boolean is Deleted Object element return true public boolean must Save Document Object element return false public boolean can Save Document Object element return false  isDeleted mustSaveDocument canSaveDocument
public boolean must Save Document Object element return false public boolean can Save Document Object element return false public I Annotation Model get Annotation Model Object element return null  mustSaveDocument canSaveDocument IAnnotationModel getAnnotationModel
public boolean can Save Document Object element return false public I Annotation Model get Annotation Model Object element return null public void about To Change Object element  canSaveDocument IAnnotationModel getAnnotationModel aboutToChange
public I Annotation Model get Annotation Model Object element return null public void about To Change Object element public void changed Object element  IAnnotationModel getAnnotationModel aboutToChange
public void about To Change Object element public void changed Object element public void add Element State Listener I Element State Listener listener  aboutToChange addElementStateListener IElementStateListener
public void changed Object element public void add Element State Listener I Element State Listener listener public void remove Element State Listener I Element State Listener listener  addElementStateListener IElementStateListener removeElementStateListener IElementStateListener
public void add Element State Listener I Element State Listener listener public void remove Element State Listener I Element State Listener listener public boolean is Read Only Object element return true  addElementStateListener IElementStateListener removeElementStateListener IElementStateListener isReadOnly
public void remove Element State Listener I Element State Listener listener public boolean is Read Only Object element return true public boolean is Modifiable Object element return false  removeElementStateListener IElementStateListener isReadOnly isModifiable
public boolean is Read Only Object element return true public boolean is Modifiable Object element return false public void validate State Object element Object computation Context throws Core Exception  isReadOnly isModifiable validateState computationContext CoreException
public boolean is Modifiable Object element return false public void validate State Object element Object computation Context throws Core Exception public boolean is State Validated Object element return true  isModifiable validateState computationContext CoreException isStateValidated
public void validate State Object element Object computation Context throws Core Exception public boolean is State Validated Object element return true public void update State Cache Object element throws Core Exception  validateState computationContext CoreException isStateValidated updateStateCache CoreException
public boolean is State Validated Object element return true public void update State Cache Object element throws Core Exception public void set Can Save Document Object element  isStateValidated updateStateCache CoreException setCanSaveDocument
public void update State Cache Object element throws Core Exception public void set Can Save Document Object element public I Status get Status Object element return STATUS ERROR  updateStateCache CoreException setCanSaveDocument IStatus getStatus STATUS_ERROR
public void set Can Save Document Object element public I Status get Status Object element return STATUS ERROR public void synchronize Object element throws Core Exception  setCanSaveDocument IStatus getStatus STATUS_ERROR CoreException
public I Status get Status Object element return STATUS ERROR public void synchronize Object element throws Core Exception public void set Progress Monitor I Progress Monitor progress Monitor  IStatus getStatus STATUS_ERROR CoreException setProgressMonitor IProgressMonitor progressMonitor
public void synchronize Object element throws Core Exception public void set Progress Monitor I Progress Monitor progress Monitor public I Progress Monitor get Progress Monitor return new Null Progress Monitor  CoreException setProgressMonitor IProgressMonitor progressMonitor IProgressMonitor getProgressMonitor NullProgressMonitor
public void set Progress Monitor I Progress Monitor progress Monitor public I Progress Monitor get Progress Monitor return new Null Progress Monitor public boolean is Synchronized Object element return true  setProgressMonitor IProgressMonitor progressMonitor IProgressMonitor getProgressMonitor NullProgressMonitor isSynchronized
public I Progress Monitor get Progress Monitor return new Null Progress Monitor public boolean is Synchronized Object element return true public String get Default Encoding return null  IProgressMonitor getProgressMonitor NullProgressMonitor isSynchronized getDefaultEncoding
public boolean is Synchronized Object element return true public String get Default Encoding return null public String get Encoding Object element return null  isSynchronized getDefaultEncoding getEncoding
public String get Default Encoding return null public String get Encoding Object element return null public void set Encoding Object element String encoding  getDefaultEncoding getEncoding setEncoding
private Object f Element public Single Element Iterator Object element f Element element  fElement SingleElementIterator fElement
see java util Iterator has Next public boolean has Next return f Element null  hasNext hasNext fElement
public Object next if f Element null Object result f Element f Element null return result throw new No Such Element Exception  fElement fElement fElement NoSuchElementException
see java util Iterator remove public void remove throw new Unsupported Operation Exception  UnsupportedOperationException
protected class File Buffer Listener implements I File Buffer Listener public File Buffer Listener  FileBufferListener IFileBufferListener FileBufferListener
public void buffer Content About To Be Replaced I File Buffer file List list new Array List f Element State Listeners Iterator e list iterator while e has Next I Element State Listener l I Element State Listener e next Iterator i get Elements file while i has Next l element Content About To Be Replaced i next  bufferContentAboutToBeReplaced IFileBuffer ArrayList fElementStateListeners hasNext IElementStateListener IElementStateListener getElements hasNext elementContentAboutToBeReplaced
public void buffer Content Replaced I File Buffer file List list new Array List f Element State Listeners Iterator e list iterator while e has Next I Element State Listener l I Element State Listener e next Iterator i get Elements file while i has Next l element Content Replaced i next  bufferContentReplaced IFileBuffer ArrayList fElementStateListeners hasNext IElementStateListener IElementStateListener getElements hasNext elementContentReplaced
public void state Changing I File Buffer file Iterator i get Elements file while i has Next fire Element State Changing i next  stateChanging IFileBuffer getElements hasNext fireElementStateChanging
public void dirty State Changed I File Buffer file boolean is Dirty List list new Array List f Element State Listeners Iterator e list iterator while e has Next I Element State Listener l I Element State Listener e next Iterator i get Elements file while i has Next l element Dirty State Changed i next is Dirty  dirtyStateChanged IFileBuffer isDirty ArrayList fElementStateListeners hasNext IElementStateListener IElementStateListener getElements hasNext elementDirtyStateChanged isDirty
public void state Validation Changed I File Buffer file boolean is State Validated List list new Array List f Element State Listeners Iterator e list iterator while e has Next Object l e next if l instanceof I Element State Listener Extension I Element State Listener Extension x I Element State Listener Extension l Iterator i get Elements file while i has Next x element State Validation Changed i next is State Validated  stateValidationChanged IFileBuffer isStateValidated ArrayList fElementStateListeners hasNext IElementStateListenerExtension IElementStateListenerExtension IElementStateListenerExtension getElements hasNext elementStateValidationChanged isStateValidated
public void underlying File Moved I File Buffer file I Path new Location I Workspace workspace Resources Plugin get Workspace I File new File workspace get Root get File new Location I Editor Input input new File null null new File Editor Input new File List list new Array List f Element State Listeners Iterator e list iterator while e has Next I Element State Listener l I Element State Listener e next Iterator i get Elements file while i has Next l element Moved i next input  underlyingFileMoved IFileBuffer IPath newLocation IWorkspace ResourcesPlugin getWorkspace IFile newFile getRoot getFile newLocation IEditorInput newFile FileEditorInput newFile ArrayList fElementStateListeners hasNext IElementStateListener IElementStateListener getElements hasNext elementMoved
public void underlying File Deleted I File Buffer file List list new Array List f Element State Listeners Iterator e list iterator while e has Next I Element State Listener l I Element State Listener e next Iterator i get Elements file while i has Next l element Deleted i next  underlyingFileDeleted IFileBuffer ArrayList fElementStateListeners hasNext IElementStateListener IElementStateListener getElements hasNext elementDeleted
public void state Change Failed I File Buffer file Iterator i get Elements file while i has Next fire Element State Change Failed i next  stateChangeFailed IFileBuffer getElements hasNext fireElementStateChangeFailed
see org eclipse core filebuffers I File Buffer Listener buffer Created org eclipse core filebuffers I File Buffer public void buffer Created I File Buffer buffer ignore  IFileBufferListener bufferCreated IFileBuffer bufferCreated IFileBuffer
see org eclipse core filebuffers I File Buffer Listener buffer Disposed org eclipse core filebuffers I File Buffer public void buffer Disposed I File Buffer buffer ignore  IFileBufferListener bufferDisposed IFileBuffer bufferDisposed IFileBuffer
Creates a new text file document provider with no parent public Text File Document Provider this null  TextFileDocumentProvider
Creates a new text file document provider which has the given parent provider param parent Provider the parent document provider public Text File Document Provider I Document Provider parent Provider I File Buffer Manager manager File Buffers get Text File Buffer Manager manager set Synchronization Context new UI Synchronization Context if parent Provider null set Parent Document Provider parent Provider f Resource Rule Factory Resources Plugin get Workspace get Rule Factory  parentProvider TextFileDocumentProvider IDocumentProvider parentProvider IFileBufferManager FileBuffers getTextFileBufferManager setSynchronizationContext UISynchronizationContext parentProvider setParentDocumentProvider parentProvider fResourceRuleFactory ResourcesPlugin getWorkspace getRuleFactory
Sets the given parent provider as this document provider s parent document provider param parent Provider the parent document provider final public void set Parent Document Provider I Document Provider parent Provider Assert is True parent Provider instanceof I Document Provider Extension Assert is True parent Provider instanceof I Document Provider Extension2 Assert is True parent Provider instanceof I Document Provider Extension3 Assert is True parent Provider instanceof I Storage Document Provider f Parent Provider parent Provider if f Parent Provider null f Parent Provider new Null Provider  parentProvider setParentDocumentProvider IDocumentProvider parentProvider isTrue parentProvider IDocumentProviderExtension isTrue parentProvider IDocumentProviderExtension2 isTrue parentProvider IDocumentProviderExtension3 isTrue parentProvider IStorageDocumentProvider fParentProvider parentProvider fParentProvider fParentProvider NullProvider
Returns the parent document provider return the parent document provider final protected I Document Provider get Parent Provider if f Parent Provider null f Parent Provider new Storage Document Provider return f Parent Provider  IDocumentProvider getParentProvider fParentProvider fParentProvider StorageDocumentProvider fParentProvider
Returns the runnable context for this document provider param monitor the progress monitor return the runnable context for this document provider protected I Runnable Context get Operation Runner I Progress Monitor monitor if f Operation Runner null f Operation Runner new Workspace Operation Runner f Operation Runner set Progress Monitor monitor return f Operation Runner  IRunnableContext getOperationRunner IProgressMonitor fOperationRunner fOperationRunner WorkspaceOperationRunner fOperationRunner setProgressMonitor fOperationRunner
Executes the given operation in the providers runnable context param operation the operation to be executes param monitor the progress monitor throws Core Exception the operation s core exception protected void execute Operation Document Provider Operation operation I Progress Monitor monitor throws Core Exception try I Runnable Context runner get Operation Runner monitor if runner null runner run false false operation else operation run monitor catch Invocation Target Exception x Throwable e x get Target Exception if e instanceof Core Exception throw Core Exception e String message e get Message null e get Message NON NLS 1 throw new Core Exception new Status I Status ERROR EditorsUI PLUGIN ID I Status ERROR message e catch Interrupted Exception x String message x get Message null x get Message NON NLS 1 throw new Core Exception new Status I Status CANCEL EditorsUI PLUGIN ID I Status OK message x  CoreException executeOperation DocumentProviderOperation IProgressMonitor CoreException IRunnableContext getOperationRunner InvocationTargetException getTargetException CoreException CoreException getMessage getMessage CoreException IStatus PLUGIN_ID IStatus InterruptedException getMessage getMessage CoreException IStatus PLUGIN_ID IStatus
public void connect Object element throws Core Exception File Info info File Info f File Info Map get element if info null info create File Info element if info null get Parent Provider connect element return info f Element element f File Info Map put element info store File Buffer Mapping element info info f Count  CoreException FileInfo FileInfo fFileInfoMap createFileInfo getParentProvider fElement fFileInfoMap storeFileBufferMapping fCount
Updates the file buffer map with a new relation between the file buffer of the given info and the given element param element the element param info the element s file info object private void store File Buffer Mapping Object element File Info info Object value f File Buffer Map get info f Text File Buffer if value instanceof List List list List value list add element return if value null value element else List list new Array List 2 list add value list add element value list f File Buffer Map put info f Text File Buffer value  storeFileBufferMapping FileInfo fFileBufferMap fTextFileBuffer ArrayList fFileBufferMap fTextFileBuffer
Creates and returns a new and empty file info object p Subclasses which extend link org eclipse ui editors text Text File Document Provider File Info should override this method p return a new and empty object of type code File Info code protected File Info create Empty File Info return new File Info  TextFileDocumentProvider FileInfo FileInfo FileInfo createEmptyFileInfo FileInfo
Creates and returns the file info object for the given element p Subclasses which extend link org eclipse ui editors text Text File Document Provider File Info will probably have to extend this method as well p param element the element return a file info object of type code File Info code or code null code if none can be created throws Core Exception if the file info object could not successfully be created protected File Info create File Info Object element throws Core Exception I Path location null if element instanceof I Adaptable I Adaptable adaptable I Adaptable element I Location Provider provider I Location Provider adaptable get Adapter I Location Provider class if provider null location provider get Path element if location null I Text File Buffer Manager manager File Buffers get Text File Buffer Manager manager connect location get Progress Monitor manager request Synchronization Context location I Text File Buffer file Buffer manager get Text File Buffer location File Info info create Empty File Info info f Text File Buffer file Buffer info f Cached Read Only State is System File Read Only info I File file File Buffers get Workspace File At Location location if file null file exists info f Model create Annotation Model file return info return null  TextFileDocumentProvider FileInfo FileInfo CoreException FileInfo createFileInfo CoreException IPath IAdaptable IAdaptable IAdaptable ILocationProvider ILocationProvider getAdapter ILocationProvider getPath ITextFileBufferManager FileBuffers getTextFileBufferManager getProgressMonitor requestSynchronizationContext ITextFileBuffer fileBuffer getTextFileBuffer FileInfo createEmptyFileInfo fTextFileBuffer fileBuffer fCachedReadOnlyState isSystemFileReadOnly IFile FileBuffers getWorkspaceFileAtLocation fModel createAnnotationModel
Creates and returns the annotation model for the given file param file the file return the file s annotation model or code null code if none protected I Annotation Model create Annotation Model I File file return null  IAnnotationModel createAnnotationModel IFile
public void disconnect Object element File Info info File Info f File Info Map get element if info null get Parent Provider disconnect element return if info f Count 1 f File Info Map remove element remove File Buffer Mapping element info dispose File Info element info else info f Count  FileInfo FileInfo fFileInfoMap getParentProvider fCount fFileInfoMap removeFileBufferMapping disposeFileInfo fCount
Removes the relation between the file buffer of the given info and the given element from the file buffer mapping param element the element param info the element s file info object private void remove File Buffer Mapping Object element File Info info Object value f File Buffer Map get info f Text File Buffer if value null return if value instanceof List List list List value list remove element if list size 1 f File Buffer Map put info f Text File Buffer list get 0 else if value element f File Buffer Map remove info f Text File Buffer  removeFileBufferMapping FileInfo fFileBufferMap fTextFileBuffer fFileBufferMap fTextFileBuffer fFileBufferMap fTextFileBuffer
Releases all resources described by given element s info object p Subclasses which extend link org eclipse ui editors text Text File Document Provider File Info will probably have to extend this method as well p param element the element param info the element s file info object protected void dispose File Info Object element File Info info I File Buffer Manager manager File Buffers get Text File Buffer Manager try I Path location info f Text File Buffer get Location manager release Synchronization Context location manager disconnect location get Progress Monitor catch Core Exception x handle Core Exception x File Document Provider dispose Element Info NON NLS 1  TextFileDocumentProvider FileInfo disposeFileInfo FileInfo IFileBufferManager FileBuffers getTextFileBufferManager IPath fTextFileBuffer getLocation releaseSynchronizationContext getProgressMonitor CoreException handleCoreException FileDocumentProvider disposeElementInfo
Returns an iterator for all the elements that are connected to this file buffer param file the file buffer return an iterator for all elements connected with the given file buffer protected Iterator get Elements I File Buffer file Object value f File Buffer Map get file if value instanceof List return new Array List List value iterator return new Single Element Iterator value  getElements IFileBuffer fFileBufferMap ArrayList SingleElementIterator
public I Document get Document Object element File Info info File Info f File Info Map get element if info null return info f Text File Buffer get Document return get Parent Provider get Document element  IDocument getDocument FileInfo FileInfo fFileInfoMap fTextFileBuffer getDocument getParentProvider getDocument
protected void execute I Progress Monitor monitor throws Core Exception info f Text File Buffer revert monitor if info f Model instanceof Abstract Marker Annotation Model Abstract Marker Annotation Model marker Model Abstract Marker Annotation Model info f Model marker Model reset Markers  IProgressMonitor CoreException fTextFileBuffer fModel AbstractMarkerAnnotationModel AbstractMarkerAnnotationModel markerModel AbstractMarkerAnnotationModel fModel markerModel resetMarkers
public I Scheduling Rule get Scheduling Rule if info f Element instanceof I File Editor Input I File Editor Input input I File Editor Input info f Element return f Resource Rule Factory modify Rule input get File else return null  ISchedulingRule getSchedulingRule fElement IFileEditorInput IFileEditorInput IFileEditorInput fElement fResourceRuleFactory modifyRule getFile
public void reset Document Object element throws Core Exception final File Info info File Info f File Info Map get element if info null Document Provider Operation operation new Document Provider Operation see org eclipse ui editors text Text File Document Provider Document Provider Operation execute org eclipse core runtime I Progress Monitor protected void execute I Progress Monitor monitor throws Core Exception info f Text File Buffer revert monitor if info f Model instanceof Abstract Marker Annotation Model Abstract Marker Annotation Model marker Model Abstract Marker Annotation Model info f Model marker Model reset Markers see org eclipse ui editors text Text File Document Provider Document Provider Operation get Scheduling Rule public I Scheduling Rule get Scheduling Rule if info f Element instanceof I File Editor Input I File Editor Input input I File Editor Input info f Element return f Resource Rule Factory modify Rule input get File else return null execute Operation operation get Progress Monitor else get Parent Provider reset Document element  resetDocument CoreException FileInfo FileInfo fFileInfoMap DocumentProviderOperation DocumentProviderOperation TextFileDocumentProvider DocumentProviderOperation IProgressMonitor IProgressMonitor CoreException fTextFileBuffer fModel AbstractMarkerAnnotationModel AbstractMarkerAnnotationModel markerModel AbstractMarkerAnnotationModel fModel markerModel resetMarkers TextFileDocumentProvider DocumentProviderOperation getSchedulingRule ISchedulingRule getSchedulingRule fElement IFileEditorInput IFileEditorInput IFileEditorInput fElement fResourceRuleFactory modifyRule getFile executeOperation getProgressMonitor getParentProvider resetDocument
public final void save Document I Progress Monitor monitor Object element I Document document boolean overwrite throws Core Exception if element null return Document Provider Operation operation create Save Operation element document overwrite if operation null execute Operation operation monitor else get Parent Provider save Document monitor element document overwrite  saveDocument IProgressMonitor IDocument CoreException DocumentProviderOperation createSaveOperation executeOperation getParentProvider saveDocument
see org eclipse ui editors text Text File Document Provider Document Provider Operation execute org eclipse core runtime I Progress Monitor public void execute I Progress Monitor monitor throws Core Exception commit File Buffer monitor info overwrite  TextFileDocumentProvider DocumentProviderOperation IProgressMonitor IProgressMonitor CoreException commitFileBuffer
public I Scheduling Rule get Scheduling Rule if info f Element instanceof I File Editor Input I File Editor Input input I File Editor Input info f Element return compute Scheduling Rule input get File else return null  ISchedulingRule getSchedulingRule fElement IFileEditorInput IFileEditorInput IFileEditorInput fElement computeSchedulingRule getFile
see org eclipse ui editors text Text File Document Provider Document Provider Operation execute org eclipse core runtime I Progress Monitor public void execute I Progress Monitor monitor throws Core Exception create File From Document monitor file document  TextFileDocumentProvider DocumentProviderOperation IProgressMonitor IProgressMonitor CoreException createFileFromDocument
see org eclipse ui editors text Text File Document Provider Document Provider Operation get Scheduling Rule public I Scheduling Rule get Scheduling Rule return compute Scheduling Rule file  TextFileDocumentProvider DocumentProviderOperation getSchedulingRule ISchedulingRule getSchedulingRule computeSchedulingRule
protected Document Provider Operation create Save Operation final Object element final I Document document final boolean overwrite throws Core Exception final File Info info File Info f File Info Map get element if info null if info f Text File Buffer get Document document Status status new Status I Status WARNING EditorsUI PLUGIN ID I Status ERROR not the same document null NON NLS 1 throw new Core Exception status return new Document Provider Operation see org eclipse ui editors text Text File Document Provider Document Provider Operation execute org eclipse core runtime I Progress Monitor public void execute I Progress Monitor monitor throws Core Exception commit File Buffer monitor info overwrite see org eclipse ui editors text Text File Document Provider Document Provider Operation get Scheduling Rule public I Scheduling Rule get Scheduling Rule if info f Element instanceof I File Editor Input I File Editor Input input I File Editor Input info f Element return compute Scheduling Rule input get File else return null else if element instanceof I File Editor Input final I File file I File Editor Input element get File return new Document Provider Operation see org eclipse ui editors text Text File Document Provider Document Provider Operation execute org eclipse core runtime I Progress Monitor public void execute I Progress Monitor monitor throws Core Exception create File From Document monitor file document see org eclipse ui editors text Text File Document Provider Document Provider Operation get Scheduling Rule public I Scheduling Rule get Scheduling Rule return compute Scheduling Rule file return null  DocumentProviderOperation createSaveOperation IDocument CoreException FileInfo FileInfo fFileInfoMap fTextFileBuffer getDocument IStatus PLUGIN_ID IStatus CoreException DocumentProviderOperation TextFileDocumentProvider DocumentProviderOperation IProgressMonitor IProgressMonitor CoreException commitFileBuffer TextFileDocumentProvider DocumentProviderOperation getSchedulingRule ISchedulingRule getSchedulingRule fElement IFileEditorInput IFileEditorInput IFileEditorInput fElement computeSchedulingRule getFile IFileEditorInput IFile IFileEditorInput getFile DocumentProviderOperation TextFileDocumentProvider DocumentProviderOperation IProgressMonitor IProgressMonitor CoreException createFileFromDocument TextFileDocumentProvider DocumentProviderOperation getSchedulingRule ISchedulingRule getSchedulingRule computeSchedulingRule
Commits the given file info s file buffer by changing the contents of the underlying file to the contents of this file buffer After that call code is Dirty code returns code false code and code is Synchronized code returns code true code param monitor the progress monitor param info the element s file info object param overwrite indicates whether the underlying file should be overwritten if it is not synchronized with the file system throws Core Exception if writing or accessing the underlying file fails protected void commit File Buffer I Progress Monitor monitor File Info info boolean overwrite throws Core Exception Assert is Not Null info info f Text File Buffer commit monitor overwrite if info f Model instanceof Abstract Marker Annotation Model Abstract Marker Annotation Model model Abstract Marker Annotation Model info f Model model update Markers info f Text File Buffer get Document  isDirty isSynchronized CoreException commitFileBuffer IProgressMonitor FileInfo CoreException isNotNull fTextFileBuffer fModel AbstractMarkerAnnotationModel AbstractMarkerAnnotationModel AbstractMarkerAnnotationModel fModel updateMarkers fTextFileBuffer getDocument
Creates the given file with the given document content param monitor the progress monitor param file the file to be created param document the document to be written to the file throws Core Exception if the creation of the file fails protected void create File From Document I Progress Monitor monitor I File file I Document document throws Core Exception String encoding get Charset For New File file document try monitor begin Task Text Editor Messages get String Text File Document Provider begin Task saving 2000 NON NLS 1 Input Stream stream new Byte Array Input Stream document get get Bytes encoding Container Generator generator new Container Generator file get Workspace file get Parent get Full Path generator generate Container new Sub Progress Monitor monitor 1000 file create stream false new Sub Progress Monitor monitor 1000 catch Unsupported Encoding Exception x String message Text Editor Messages get Formatted String Editor error unsupported encoding message arg encoding NON NLS 1 I Status s new Status I Status ERROR EditorsUI PLUGIN ID I Status OK message x throw new Core Exception s finally monitor done  CoreException createFileFromDocument IProgressMonitor IFile IDocument CoreException getCharsetForNewFile beginTask TextEditorMessages getString TextFileDocumentProvider beginTask InputStream ByteArrayInputStream getBytes ContainerGenerator ContainerGenerator getWorkspace getParent getFullPath generateContainer SubProgressMonitor SubProgressMonitor UnsupportedEncodingException TextEditorMessages getFormattedString unsupported_encoding message_arg IStatus IStatus PLUGIN_ID IStatus CoreException
private String get Charset For New File I File target File I Document document User defined encoding has first priority String encoding try encoding target File get Charset false catch Core Exception ex encoding null if encoding null return encoding Probe content Reader reader new Buffered Reader new String Reader document get try Qualified Name options new Qualified Name I Content Description CHARSET I Content Description BYTE ORDER MARK I Content Description description Platform get Content Type Manager get Description For reader target File get Name options if description null encoding description get Charset if encoding null return encoding catch IO Exception ex continue with next strategy finally try reader close catch IO Exception ex Text Editor Plugin get Default get Log log new Status I Status ERROR Text Editor Plugin PLUGIN ID I Status OK Text File Document Provider get Charset For New File Could not close reader ex NON NLS 1 Use parent chain try return target File get Parent get Default Charset catch Core Exception ex Use global default return Resources Plugin get Encoding  getCharsetForNewFile IFile targetFile IDocument targetFile getCharset CoreException BufferedReader StringReader QualifiedName QualifiedName IContentDescription IContentDescription BYTE_ORDER_MARK IContentDescription getContentTypeManager getDescriptionFor targetFile getName getCharset IOException IOException TextEditorPlugin getDefault getLog IStatus TextEditorPlugin PLUGIN_ID IStatus TextFileDocumentProvider getCharsetForNewFile targetFile getParent getDefaultCharset CoreException ResourcesPlugin getEncoding
public long get Modification Stamp Object element File Info info File Info f File Info Map get element if info null return info f Text File Buffer get Modification Stamp return get Parent Provider get Modification Stamp element  getModificationStamp FileInfo FileInfo fFileInfoMap fTextFileBuffer getModificationStamp getParentProvider getModificationStamp
public long get Synchronization Stamp Object element File Info info File Info f File Info Map get element if info null return 0 return get Parent Provider get Synchronization Stamp element  getSynchronizationStamp FileInfo FileInfo fFileInfoMap getParentProvider getSynchronizationStamp
public boolean is Deleted Object element File Info info File Info f File Info Map get element if info null File file get System File info return file null true file exists return get Parent Provider is Deleted element  isDeleted FileInfo FileInfo fFileInfoMap getSystemFile getParentProvider isDeleted
public boolean must Save Document Object element File Info info File Info f File Info Map get element if info null return info f Count 1 info f Text File Buffer is Dirty return get Parent Provider must Save Document element  mustSaveDocument FileInfo FileInfo fFileInfoMap fCount fTextFileBuffer isDirty getParentProvider mustSaveDocument
public boolean can Save Document Object element File Info info File Info f File Info Map get element if info null return info f Text File Buffer is Dirty return get Parent Provider can Save Document element  canSaveDocument FileInfo FileInfo fFileInfoMap fTextFileBuffer isDirty getParentProvider canSaveDocument
public I Annotation Model get Annotation Model Object element File Info info File Info f File Info Map get element if info null if info f Model null return info f Model return info f Text File Buffer get Annotation Model return get Parent Provider get Annotation Model element  IAnnotationModel getAnnotationModel FileInfo FileInfo fFileInfoMap fModel fModel fTextFileBuffer getAnnotationModel getParentProvider getAnnotationModel
public void about To Change Object element File Info info File Info f File Info Map get element if info null get Parent Provider about To Change element  aboutToChange FileInfo FileInfo fFileInfoMap getParentProvider aboutToChange
public void changed Object element File Info info File Info f File Info Map get element if info null get Parent Provider changed element  FileInfo FileInfo fFileInfoMap getParentProvider
public void add Element State Listener I Element State Listener listener Assert is Not Null listener if f Element State Listeners contains listener f Element State Listeners add listener if f Element State Listeners size 1 I File Buffer Manager manager File Buffers get Text File Buffer Manager manager add File Buffer Listener f File Buffer Listener get Parent Provider add Element State Listener listener  addElementStateListener IElementStateListener isNotNull fElementStateListeners fElementStateListeners fElementStateListeners IFileBufferManager FileBuffers getTextFileBufferManager addFileBufferListener fFileBufferListener getParentProvider addElementStateListener
public void remove Element State Listener I Element State Listener listener Assert is Not Null listener f Element State Listeners remove listener if f Element State Listeners size 0 I File Buffer Manager manager File Buffers get Text File Buffer Manager manager remove File Buffer Listener f File Buffer Listener get Parent Provider remove Element State Listener listener  removeElementStateListener IElementStateListener isNotNull fElementStateListeners fElementStateListeners IFileBufferManager FileBuffers getTextFileBufferManager removeFileBufferListener fFileBufferListener getParentProvider removeElementStateListener
public boolean is Read Only Object element File Info info File Info f File Info Map get element if info null return info f Cached Read Only State return I Document Provider Extension get Parent Provider is Read Only element  isReadOnly FileInfo FileInfo fFileInfoMap fCachedReadOnlyState IDocumentProviderExtension getParentProvider isReadOnly
public boolean is Modifiable Object element File Info info File Info f File Info Map get element if info null return info f Text File Buffer is State Validated is System File Read Only info true return I Document Provider Extension get Parent Provider is Modifiable element  isModifiable FileInfo FileInfo fFileInfoMap fTextFileBuffer isStateValidated isSystemFileReadOnly IDocumentProviderExtension getParentProvider isModifiable
see org eclipse ui editors text Text File Document Provider Document Provider Operation execute org eclipse core runtime I Progress Monitor protected void execute I Progress Monitor monitor throws Core Exception info f Text File Buffer validate State monitor computation Context  TextFileDocumentProvider DocumentProviderOperation IProgressMonitor IProgressMonitor CoreException fTextFileBuffer validateState computationContext
public I Scheduling Rule get Scheduling Rule if info f Element instanceof I File Editor Input I File Editor Input input I File Editor Input info f Element return f Resource Rule Factory validate Edit Rule new I Resource input get File else return null  ISchedulingRule getSchedulingRule fElement IFileEditorInput IFileEditorInput IFileEditorInput fElement fResourceRuleFactory validateEditRule IResource getFile
public void validate State Object element final Object computation Context throws Core Exception final File Info info File Info f File Info Map get element if info null Document Provider Operation operation new Document Provider Operation see org eclipse ui editors text Text File Document Provider Document Provider Operation execute org eclipse core runtime I Progress Monitor protected void execute I Progress Monitor monitor throws Core Exception info f Text File Buffer validate State monitor computation Context see org eclipse ui editors text Text File Document Provider Document Provider Operation get Scheduling Rule public I Scheduling Rule get Scheduling Rule if info f Element instanceof I File Editor Input I File Editor Input input I File Editor Input info f Element return f Resource Rule Factory validate Edit Rule new I Resource input get File else return null execute Operation operation get Progress Monitor else I Document Provider Extension get Parent Provider validate State element computation Context  validateState computationContext CoreException FileInfo FileInfo fFileInfoMap DocumentProviderOperation DocumentProviderOperation TextFileDocumentProvider DocumentProviderOperation IProgressMonitor IProgressMonitor CoreException fTextFileBuffer validateState computationContext TextFileDocumentProvider DocumentProviderOperation getSchedulingRule ISchedulingRule getSchedulingRule fElement IFileEditorInput IFileEditorInput IFileEditorInput fElement fResourceRuleFactory validateEditRule IResource getFile executeOperation getProgressMonitor IDocumentProviderExtension getParentProvider validateState computationContext
public boolean is State Validated Object element File Info info File Info f File Info Map get element if info null return info f Text File Buffer is State Validated return I Document Provider Extension get Parent Provider is State Validated element  isStateValidated FileInfo FileInfo fFileInfoMap fTextFileBuffer isStateValidated IDocumentProviderExtension getParentProvider isStateValidated
public void update State Cache Object element throws Core Exception File Info info File Info f File Info Map get element if info null boolean is Read Only is System File Read Only info See http bugs eclipse org bugs show bug cgi id 14469 for the dirty bit check See https bugs eclipse org bugs show bug cgi id 50699 for commenting that out if info f Cached Read Only State is Read Only info f Text File Buffer is Dirty info f Text File Buffer reset State Validation info f Cached Read Only State is Read Only else I Document Provider Extension get Parent Provider update State Cache element  updateStateCache CoreException FileInfo FileInfo fFileInfoMap isReadOnly isSystemFileReadOnly show_bug show_bug fCachedReadOnlyState isReadOnly fTextFileBuffer isDirty fTextFileBuffer resetStateValidation fCachedReadOnlyState isReadOnly IDocumentProviderExtension getParentProvider updateStateCache
public void set Can Save Document Object element File Info info File Info f File Info Map get element if info null I Document Provider Extension get Parent Provider set Can Save Document element  setCanSaveDocument FileInfo FileInfo fFileInfoMap IDocumentProviderExtension getParentProvider setCanSaveDocument
public I Status get Status Object element File Info info File Info f File Info Map get element if info null return info f Text File Buffer get Status return I Document Provider Extension get Parent Provider get Status element  IStatus getStatus FileInfo FileInfo fFileInfoMap fTextFileBuffer getStatus IDocumentProviderExtension getParentProvider getStatus
see org eclipse ui editors text Text File Document Provider Document Provider Operation execute org eclipse core runtime I Progress Monitor protected void execute I Progress Monitor monitor throws Core Exception info f Text File Buffer revert monitor  TextFileDocumentProvider DocumentProviderOperation IProgressMonitor IProgressMonitor CoreException fTextFileBuffer
public I Scheduling Rule get Scheduling Rule if info f Element instanceof I File Editor Input I File Editor Input input I File Editor Input info f Element return f Resource Rule Factory refresh Rule input get File else return null  ISchedulingRule getSchedulingRule fElement IFileEditorInput IFileEditorInput IFileEditorInput fElement fResourceRuleFactory refreshRule getFile
public void synchronize Object element throws Core Exception final File Info info File Info f File Info Map get element if info null Document Provider Operation operation new Document Provider Operation see org eclipse ui editors text Text File Document Provider Document Provider Operation execute org eclipse core runtime I Progress Monitor protected void execute I Progress Monitor monitor throws Core Exception info f Text File Buffer revert monitor see org eclipse ui editors text Text File Document Provider Document Provider Operation get Scheduling Rule public I Scheduling Rule get Scheduling Rule if info f Element instanceof I File Editor Input I File Editor Input input I File Editor Input info f Element return f Resource Rule Factory refresh Rule input get File else return null execute Operation operation get Progress Monitor else I Document Provider Extension get Parent Provider synchronize element  CoreException FileInfo FileInfo fFileInfoMap DocumentProviderOperation DocumentProviderOperation TextFileDocumentProvider DocumentProviderOperation IProgressMonitor IProgressMonitor CoreException fTextFileBuffer TextFileDocumentProvider DocumentProviderOperation getSchedulingRule ISchedulingRule getSchedulingRule fElement IFileEditorInput IFileEditorInput IFileEditorInput fElement fResourceRuleFactory refreshRule getFile executeOperation getProgressMonitor IDocumentProviderExtension getParentProvider
see org eclipse ui texteditor I Document Provider Extension2 set Progress Monitor org eclipse core runtime I Progress Monitor public void set Progress Monitor I Progress Monitor progress Monitor f Progress Monitor progress Monitor I Document Provider Extension2 get Parent Provider set Progress Monitor progress Monitor  IDocumentProviderExtension2 setProgressMonitor IProgressMonitor setProgressMonitor IProgressMonitor progressMonitor fProgressMonitor progressMonitor IDocumentProviderExtension2 getParentProvider setProgressMonitor progressMonitor
see org eclipse ui texteditor I Document Provider Extension2 get Progress Monitor public I Progress Monitor get Progress Monitor return f Progress Monitor  IDocumentProviderExtension2 getProgressMonitor IProgressMonitor getProgressMonitor fProgressMonitor
public boolean is Synchronized Object element File Info info File Info f File Info Map get element if info null return info f Text File Buffer is Synchronized return I Document Provider Extension3 get Parent Provider is Synchronized element  isSynchronized FileInfo FileInfo fFileInfoMap fTextFileBuffer isSynchronized IDocumentProviderExtension3 getParentProvider isSynchronized
see org eclipse ui editors text I Storage Document Provider get Default Encoding public String get Default Encoding return File Buffers get Text File Buffer Manager get Default Encoding  IStorageDocumentProvider getDefaultEncoding getDefaultEncoding FileBuffers getTextFileBufferManager getDefaultEncoding
public String get Encoding Object element File Info info File Info f File Info Map get element if info null return info f Text File Buffer get Encoding return I Storage Document Provider get Parent Provider get Encoding element  getEncoding FileInfo FileInfo fFileInfoMap fTextFileBuffer getEncoding IStorageDocumentProvider getParentProvider getEncoding
public void set Encoding Object element String encoding File Info info File Info f File Info Map get element if info null info f Text File Buffer set Encoding encoding else I Storage Document Provider get Parent Provider set Encoding element encoding  setEncoding FileInfo FileInfo fFileInfoMap fTextFileBuffer setEncoding IStorageDocumentProvider getParentProvider setEncoding
Defines the standard procedure to handle code Core Exceptions code Exceptions are written to the plug in log param exception the exception to be logged param message the message to be logged protected void handle Core Exception Core Exception exception String message Bundle bundle Platform get Bundle PlatformUI PLUGIN ID I Log log Platform get Log bundle I Status status message null new Status I Status ERROR PlatformUI PLUGIN ID 0 message exception exception get Status log log status  CoreExceptions handleCoreException CoreException getBundle PLUGIN_ID ILog getLog IStatus IStatus PLUGIN_ID getStatus
Returns the system file denoted by the given info param info the element s file info object return the system for the given file info protected File get System File File Info info I Path path info f Text File Buffer get Location return File Buffers get System File At Location path  getSystemFile FileInfo IPath fTextFileBuffer getLocation FileBuffers getSystemFileAtLocation
Returns whether the system file denoted by the given info is read only param info the element s file info object return code true code iff read only protected boolean is System File Read Only File Info info File file get System File info return file null true file can Write  isSystemFileReadOnly FileInfo getSystemFile canWrite
Returns the file info object for the given element param element the element return the file info object or code null code if none protected File Info get File Info Object element return File Info f File Info Map get element  FileInfo getFileInfo FileInfo fFileInfoMap
Returns an iterator over the elements connected via this document provider return an iterator over the list of elements element type link java lang Object protected Iterator get Connected Elements Iterator return new Hash Set f File Info Map key Set iterator  getConnectedElementsIterator HashSet fFileInfoMap keySet
Returns an iterator over this document provider s file info objects return the iterator over list of file info objects element type link Text File Document Provider File Info protected Iterator get File Infos Iterator return new Array List f File Info Map values iterator  TextFileDocumentProvider FileInfo getFileInfosIterator ArrayList fFileInfoMap
Informs all registered element state listeners about the current state change of the element param element the element see I Element State Listener Extension element State Changing Object protected void fire Element State Changing Object element List list new Array List f Element State Listeners Iterator e list iterator while e has Next Object l e next if l instanceof I Element State Listener Extension I Element State Listener Extension x I Element State Listener Extension l x element State Changing element  IElementStateListenerExtension elementStateChanging fireElementStateChanging ArrayList fElementStateListeners hasNext IElementStateListenerExtension IElementStateListenerExtension IElementStateListenerExtension elementStateChanging
Informs all registered element state listeners about the failed state change of the element param element the element see I Element State Listener Extension element State Change Failed Object protected void fire Element State Change Failed Object element List list new Array List f Element State Listeners Iterator e list iterator while e has Next Object l e next if l instanceof I Element State Listener Extension I Element State Listener Extension x I Element State Listener Extension l x element State Change Failed element  IElementStateListenerExtension elementStateChangeFailed fireElementStateChangeFailed ArrayList fElementStateListeners hasNext IElementStateListenerExtension IElementStateListenerExtension IElementStateListenerExtension elementStateChangeFailed
Computes the scheduling rule needed to create or modify a resource If the resource exists its modify rule is returned If it does not the resource hierarchy is iterated towards the workspace root to find the first parent of code to Create Or Modify code that exists Then the create rule for the last non existing resource is returned p XXX to be made protected after 3 0 p param to Create Or Modify the resource to create or modify return the minimal scheduling rule needed to modify or create a resource private I Scheduling Rule compute Scheduling Rule I Resource to Create Or Modify if to Create Or Modify exists return f Resource Rule Factory modify Rule to Create Or Modify else I Resource parent to Create Or Modify do to Create Or Modify parent parent to Create Or Modify get Parent while parent null parent exists return f Resource Rule Factory create Rule to Create Or Modify  toCreateOrModify toCreateOrModify ISchedulingRule computeSchedulingRule IResource toCreateOrModify toCreateOrModify fResourceRuleFactory modifyRule toCreateOrModify IResource toCreateOrModify toCreateOrModify toCreateOrModify getParent fResourceRuleFactory createRule toCreateOrModify

see org eclipse jface text source I Annotation Hover get Hover Info org eclipse jface text source I Source Viewer int public String get Hover Info I Source Viewer source Viewer int line Number return null  IAnnotationHover getHoverInfo ISourceViewer getHoverInfo ISourceViewer sourceViewer lineNumber
Creates a text source viewer configuration public Text Source Viewer Configuration  TextSourceViewerConfiguration
Creates a text source viewer configuration and initializes it with the given preference store param preference Storethe preference store used to initialize this configuration public Text Source Viewer Configuration I Preference Store preference Store f Preference Store preference Store  preferenceStorethe TextSourceViewerConfiguration IPreferenceStore preferenceStore fPreferenceStore preferenceStore
see org eclipse jface text source Source Viewer Configuration get Annotation Hover org eclipse jface text source I Source Viewer public I Annotation Hover get Annotation Hover I Source Viewer source Viewer return new Null Hover  SourceViewerConfiguration getAnnotationHover ISourceViewer IAnnotationHover getAnnotationHover ISourceViewer sourceViewer NullHover
public int get Tab Width I Source Viewer source Viewer if f Preference Store null return super get Tab Width source Viewer return f Preference Store get Int Abstract Decorated Text Editor Preference Constants EDITOR TAB WIDTH  getTabWidth ISourceViewer sourceViewer fPreferenceStore getTabWidth sourceViewer fPreferenceStore getInt AbstractDecoratedTextEditorPreferenceConstants EDITOR_TAB_WIDTH

public void widget Selected Selection Event e boolean enabled auto Build Button get Selection manual Build get Selection working Set Button set Enabled enabled specify Resources set Enabled enabled working Set Button get Selection update Launch Configuration Dialog  widgetSelected SelectionEvent autoBuildButton getSelection manualBuild getSelection workingSetButton setEnabled specifyResources setEnabled workingSetButton getSelection updateLaunchConfigurationDialog
public void create Control Composite parent Composite main Composite new Composite parent SWT NONE set Control main Composite Workbench Help set Help get Control I External Tools Help Context Ids EXTERNAL TOOLS LAUNCH CONFIGURATION DIALOG BUILDER TAB Grid Layout layout new Grid Layout Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL grid Data horizontal Span 2 layout num Columns 2 layout make Columns Equal Width false main Composite set Layout layout main Composite set Layout Data grid Data main Composite set Font parent get Font create Launch In Background Composite main Composite create Build Schedule Component main Composite  createControl mainComposite setControl mainComposite WorkbenchHelp setHelp getControl IExternalToolsHelpContextIds EXTERNAL_TOOLS_LAUNCH_CONFIGURATION_DIALOG_BUILDER_TAB GridLayout GridLayout GridData gridData GridData GridData FILL_HORIZONTAL gridData horizontalSpan numColumns makeColumnsEqualWidth mainComposite setLayout mainComposite setLayoutData gridData mainComposite setFont getFont createLaunchInBackgroundComposite mainComposite createBuildScheduleComponent mainComposite
f Launch In Background Button set Layout Data data f Launch In Background Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  fLaunchInBackgroundButton setLayoutData fLaunchInBackgroundButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
Creates the controls needed to edit the launch in background attribute of an external tool param parent the composite to create the controls in protected void create Launch In Background Composite Composite parent f Launch In Background Button create Check Button parent External Tools Launch Configuration Messages get String External Tools Builder Tab 14 NON NLS 1 Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL data horizontal Span 2 f Launch In Background Button set Layout Data data f Launch In Background Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Launch Configuration Dialog  createLaunchInBackgroundComposite fLaunchInBackgroundButton createCheckButton ExternalToolsLaunchConfigurationMessages getString ExternalToolsBuilderTab GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan fLaunchInBackgroundButton setLayoutData fLaunchInBackgroundButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateLaunchConfigurationDialog
specify Resources set Layout Data gd specify Resources add Selection Listener new Selection Adapter public void widget Selected Selection Event e select Resources  specifyResources setLayoutData specifyResources addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectResources
private void create Build Schedule Component Composite parent Label label new Label parent SWT NONE label set Text External Tools Launch Configuration Messages get String External Tools Builder Tab Run this builder for  1 NON NLS 1 label set Font parent get Font after Clean create Button parent selection Listener External Tools Launch Configuration Messages get String External Tools Builder Tab Full builds 2 External Tools Launch Configuration Messages get String External Tools Builder Tab Full 2 NON NLS 1 NON NLS 2 manual Build create Button parent selection Listener External Tools Launch Configuration Messages get String External Tools Builder Tab Incremental builds 4 External Tools Launch Configuration Messages get String External Tools Builder Tab Inc 2 NON NLS 1 NON NLS 2 auto Build Button create Button parent selection Listener External Tools Launch Configuration Messages get String External Tools Builder Tab Auto builds  Not recommended  6 External Tools Launch Configuration Messages get String External Tools Builder Tab Auto 2 NON NLS 1 NON NLS 2 create Vertical Spacer parent 2 working Set Button create Button parent selection Listener External Tools Launch Configuration Messages get String External Tools Builder Tab workingSet label External Tools Launch Configuration Messages get String External Tools Builder Tab workingSet tooltip 1 NON NLS 1 NON NLS 2 specify Resources create Push Button parent External Tools Launch Configuration Messages get String External Tools Builder Tab 13 null NON NLS 1 Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN END specify Resources set Layout Data gd specify Resources add Selection Listener new Selection Adapter public void widget Selected Selection Event e select Resources  createBuildScheduleComponent setText ExternalToolsLaunchConfigurationMessages getString ExternalToolsBuilderTab Run_this_builder_for__1 setFont getFont afterClean createButton selectionListener ExternalToolsLaunchConfigurationMessages getString ExternalToolsBuilderTab Full_builds_2 ExternalToolsLaunchConfigurationMessages getString ExternalToolsBuilderTab manualBuild createButton selectionListener ExternalToolsLaunchConfigurationMessages getString ExternalToolsBuilderTab Incremental_builds_4 ExternalToolsLaunchConfigurationMessages getString ExternalToolsBuilderTab autoBuildButton createButton selectionListener ExternalToolsLaunchConfigurationMessages getString ExternalToolsBuilderTab Auto_builds_ Not_recommended _6 ExternalToolsLaunchConfigurationMessages getString ExternalToolsBuilderTab createVerticalSpacer workingSetButton createButton selectionListener ExternalToolsLaunchConfigurationMessages getString ExternalToolsBuilderTab workingSet_label ExternalToolsLaunchConfigurationMessages getString ExternalToolsBuilderTab workingSet_tooltip specifyResources createPushButton ExternalToolsLaunchConfigurationMessages getString ExternalToolsBuilderTab GridData GridData GridData HORIZONTAL_ALIGN_END specifyResources setLayoutData specifyResources addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectResources
private Button create Button Composite parent Selection Listener listener String text String tooltip Text int columns Button button create Check Button parent text button set Tool Tip Text tooltip Text button add Selection Listener listener Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span columns button set Layout Data gd return button  createButton SelectionListener tooltipText createCheckButton setToolTipText tooltipText addSelectionListener GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData
public void set Defaults I Launch Configuration Working Copy configuration String Buffer buffer new String Buffer I External Tool Constants BUILD TYPE FULL buffer append buffer append I External Tool Constants BUILD TYPE INCREMENTAL buffer append configuration set Attribute I External Tool Constants ATTR RUN BUILD KINDS buffer to String configuration set Attribute I DebugUI Constants ATTR LAUNCH IN BACKGROUND false  setDefaults ILaunchConfigurationWorkingCopy StringBuffer StringBuffer IExternalToolConstants BUILD_TYPE_FULL IExternalToolConstants BUILD_TYPE_INCREMENTAL setAttribute IExternalToolConstants ATTR_RUN_BUILD_KINDS toString setAttribute IDebugUIConstants ATTR_LAUNCH_IN_BACKGROUND
public void initialize From I Launch Configuration configuration after Clean set Selection false manual Build set Selection false auto Build Button set Selection false String build Kind String null String build Scope null try build Kind String configuration get Attribute I External Tool Constants ATTR RUN BUILD KINDS NON NLS 1 build Scope configuration get Attribute I External Tool Constants ATTR BUILD SCOPE String null catch Core Exception e working Set Button set Selection build Scope null working Set Button set Enabled build Scope null if build Scope null working Set Refresh Tab get Working Set build Scope int build Types External Tool Builder build Types To Array build Kind String for int i 0 i build Types length i switch build Types i case Incremental Project Builder FULL BUILD after Clean set Selection true break case Incremental Project Builder INCREMENTAL BUILD manual Build set Selection true break case Incremental Project Builder AUTO BUILD auto Build Button set Selection true break boolean enabled auto Build Button get Selection manual Build get Selection working Set Button set Enabled enabled specify Resources set Enabled enabled working Set Button get Selection update Run In Background configuration  initializeFrom ILaunchConfiguration afterClean setSelection manualBuild setSelection autoBuildButton setSelection buildKindString buildScope buildKindString getAttribute IExternalToolConstants ATTR_RUN_BUILD_KINDS buildScope getAttribute IExternalToolConstants ATTR_BUILD_SCOPE CoreException workingSetButton setSelection buildScope workingSetButton setEnabled buildScope buildScope workingSet RefreshTab getWorkingSet buildScope buildTypes ExternalToolBuilder buildTypesToArray buildKindString buildTypes buildTypes IncrementalProjectBuilder FULL_BUILD afterClean setSelection IncrementalProjectBuilder INCREMENTAL_BUILD manualBuild setSelection IncrementalProjectBuilder AUTO_BUILD autoBuildButton setSelection autoBuildButton getSelection manualBuild getSelection workingSetButton setEnabled specifyResources setEnabled workingSetButton getSelection updateRunInBackground
protected void update Run In Background I Launch Configuration configuration f Launch In Background Button set Selection is Launch In Background configuration  updateRunInBackground ILaunchConfiguration fLaunchInBackgroundButton setSelection isLaunchInBackground
Returns whether the given configuration should be run in the background param configuration the configuration return whether the configuration is configured to run in the background public static boolean is Launch In Background I Launch Configuration configuration boolean launch In Background false try launch In Background configuration get Attribute I DebugUI Constants ATTR LAUNCH IN BACKGROUND false catch Core Exception ce External Tools Plugin get Default log ce return launch In Background  isLaunchInBackground ILaunchConfiguration launchInBackground launchInBackground getAttribute IDebugUIConstants ATTR_LAUNCH_IN_BACKGROUND CoreException ExternalToolsPlugin getDefault launchInBackground
public void perform Apply I Launch Configuration Working Copy configuration String Buffer buffer new String Buffer if after Clean get Selection buffer append I External Tool Constants BUILD TYPE FULL append if manual Build get Selection buffer append I External Tool Constants BUILD TYPE INCREMENTAL append if auto Build Button get Selection buffer append I External Tool Constants BUILD TYPE AUTO append configuration set Attribute I External Tool Constants ATTR RUN BUILD KINDS buffer to String if working Set Button get Selection String scope Refresh Tab get Refresh Attribute working Set configuration set Attribute I External Tool Constants ATTR BUILD SCOPE scope else configuration set Attribute I External Tool Constants ATTR BUILD SCOPE String null configuration set Attribute I DebugUI Constants ATTR LAUNCH IN BACKGROUND f Launch In Background Button get Selection  performApply ILaunchConfigurationWorkingCopy StringBuffer StringBuffer afterClean getSelection IExternalToolConstants BUILD_TYPE_FULL manualBuild getSelection IExternalToolConstants BUILD_TYPE_INCREMENTAL autoBuildButton getSelection IExternalToolConstants BUILD_TYPE_AUTO setAttribute IExternalToolConstants ATTR_RUN_BUILD_KINDS toString workingSetButton getSelection RefreshTab getRefreshAttribute workingSet setAttribute IExternalToolConstants ATTR_BUILD_SCOPE setAttribute IExternalToolConstants ATTR_BUILD_SCOPE setAttribute IDebugUIConstants ATTR_LAUNCH_IN_BACKGROUND fLaunchInBackgroundButton getSelection
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return External Tools Launch Configuration Messages get String External Tools Builder Tab Build Options 9 NON NLS 1  ILaunchConfigurationTab getName getName ExternalToolsLaunchConfigurationMessages getString ExternalToolsBuilderTab Build_Options_9
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return PlatformUI get Workbench get Shared Images get Image IDE Shared Images IMG OBJ PROJECT  ILaunchConfigurationTab getImage getImage getWorkbench getSharedImages getImage SharedImages IMG_OBJ_PROJECT
public boolean is Valid I Launch Configuration launch Config set Error Message null set Message null boolean build Kind Selected after Clean get Selection manual Build get Selection auto Build Button get Selection if build Kind Selected set Error Message External Tools Launch Configuration Messages get String External Tools Builder Tab build Kind Error NON NLS 1 return false if working Set Button get Selection working Set null working Set get Elements length 0 set Error Message External Tools Launch Configuration Messages get String External Tools Builder Tab 16 NON NLS 1 return true  isValid ILaunchConfiguration launchConfig setErrorMessage setMessage buildKindSelected afterClean getSelection manualBuild getSelection autoBuildButton getSelection buildKindSelected setErrorMessage ExternalToolsLaunchConfigurationMessages getString ExternalToolsBuilderTab buildKindError workingSetButton getSelection workingSet workingSet getElements setErrorMessage ExternalToolsLaunchConfigurationMessages getString ExternalToolsBuilderTab
see org eclipse debug ui I Launch Configuration Tab can Save public boolean can Save return is Valid null  ILaunchConfigurationTab canSave canSave isValid
Prompts the user to select the working set that triggers the build private void select Resources I Working Set Manager working Set Manager PlatformUI get Workbench get Working Set Manager if working Set null working Set working Set Manager create Working Set External Tools Launch Configuration Messages get String External Tools Builder Tab 15 new I Adaptable 0 NON NLS 1 I Working Set Edit Wizard wizard working Set Manager create Working Set Edit Wizard working Set Wizard Dialog dialog new Wizard Dialog External Tools Plugin get Standard Display get Active Shell wizard dialog create if dialog open Window CANCEL return working Set wizard get Selection update Launch Configuration Dialog  selectResources IWorkingSetManager workingSetManager getWorkbench getWorkingSetManager workingSet workingSet workingSetManager createWorkingSet ExternalToolsLaunchConfigurationMessages getString ExternalToolsBuilderTab IAdaptable IWorkingSetEditWizard workingSetManager createWorkingSetEditWizard workingSet WizardDialog WizardDialog ExternalToolsPlugin getStandardDisplay getActiveShell workingSet getSelection updateLaunchConfigurationDialog
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy do nothing on activation  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy do nothing on deactivation  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy

Resource Bundle get Bundle BUNDLE NAME private External Tools Launch Configuration Messages  ResourceBundle getBundle BUNDLE_NAME ExternalToolsLaunchConfigurationMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

protected class Widget Listener extends Selection Adapter implements Modify Listener public void modify Text Modify Event e if f Initializing set Dirty true user Edited true update Launch Configuration Dialog  WidgetListener SelectionAdapter ModifyListener modifyText ModifyEvent fInitializing setDirty userEdited updateLaunchConfigurationDialog
public void widget Selected Selection Event e set Dirty true Object source e get Source if source workspace Location Button handle Workspace Location Button Selected else if source file Location Button handle File Location Button Selected else if source workspace Working Directory Button handle Workspace Working Directory Button Selected else if source file Working Directory Button handle File Working Directory Button Selected else if source argument Variables Button handle Variables Button Selected argument Field else if source variables Location Button handle Variables Button Selected location Field else if source variables Working Directory Button handle Variables Button Selected work Directory Field  widgetSelected SelectionEvent setDirty getSource workspaceLocationButton handleWorkspaceLocationButtonSelected fileLocationButton handleFileLocationButtonSelected workspaceWorkingDirectoryButton handleWorkspaceWorkingDirectoryButtonSelected fileWorkingDirectoryButton handleFileWorkingDirectoryButtonSelected argumentVariablesButton handleVariablesButtonSelected argumentField variablesLocationButton handleVariablesButtonSelected locationField variablesWorkingDirectoryButton handleVariablesButtonSelected workDirectoryField
public void create Control Composite parent Composite main Composite new Composite parent SWT NONE set Control main Composite main Composite set Font parent get Font Grid Layout layout new Grid Layout layout num Columns 1 Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL main Composite set Layout layout main Composite set Layout Data grid Data create Location Component main Composite create Work Directory Component main Composite create Argument Component main Composite create Vertical Spacer main Composite 1 Dialog apply Dialog Font parent  createControl mainComposite setControl mainComposite mainComposite setFont getFont GridLayout GridLayout numColumns GridData gridData GridData GridData FILL_HORIZONTAL mainComposite setLayout mainComposite setLayoutData gridData createLocationComponent mainComposite createWorkDirectoryComponent mainComposite createArgumentComponent mainComposite createVerticalSpacer mainComposite applyDialogFont
Creates the controls needed to edit the location attribute of an external tool param group the composite to create the controls in protected void create Location Component Composite parent Group group new Group parent SWT NONE String location Label get Location Label group set Text location Label Grid Layout layout new Grid Layout layout num Columns 1 layout margin Height 0 layout margin Width 0 Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL group set Layout layout group set Layout Data grid Data location Field new Text group SWT BORDER grid Data new Grid Data Grid Data FILL HORIZONTAL grid Data width Hint I Dialog Constants ENTRY FIELD WIDTH location Field set Layout Data grid Data location Field add Modify Listener f Listener add Control Accessible Listener location Field group get Text Composite button Composite new Composite group SWT NONE layout new Grid Layout layout num Columns 3 grid Data new Grid Data Grid Data HORIZONTAL ALIGN END button Composite set Layout layout button Composite set Layout Data grid Data button Composite set Font parent get Font workspace Location Button create Push Button button Composite External Tools Launch Configuration Messages get String External Tools Main Tab Browse Workspace  3 null NON NLS 1 workspace Location Button add Selection Listener f Listener add Control Accessible Listener workspace Location Button group get Text workspace Location Button get Text NON NLS 1 file Location Button create Push Button button Composite External Tools Launch Configuration Messages get String External Tools Main Tab Brows e File System  4 null NON NLS 1 file Location Button add Selection Listener f Listener add Control Accessible Listener file Location Button group get Text file Location Button get Text NON NLS 1 variables Location Button create Push Button button Composite External Tools Launch Configuration Messages get String External Tools Main Tab 31 null NON NLS 1 variables Location Button add Selection Listener f Listener add Control Accessible Listener variables Location Button group get Text variables Location Button get Text NON NLS 1  createLocationComponent locationLabel getLocationLabel setText locationLabel GridLayout GridLayout numColumns marginHeight marginWidth GridData gridData GridData GridData FILL_HORIZONTAL setLayout setLayoutData gridData locationField gridData GridData GridData FILL_HORIZONTAL gridData widthHint IDialogConstants ENTRY_FIELD_WIDTH locationField setLayoutData gridData locationField addModifyListener fListener addControlAccessibleListener locationField getText buttonComposite GridLayout numColumns gridData GridData GridData HORIZONTAL_ALIGN_END buttonComposite setLayout buttonComposite setLayoutData gridData buttonComposite setFont getFont workspaceLocationButton createPushButton buttonComposite ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab Browse_Workspace _3 workspaceLocationButton addSelectionListener fListener addControlAccessibleListener workspaceLocationButton getText workspaceLocationButton getText fileLocationButton createPushButton buttonComposite ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab e_File_System _4 fileLocationButton addSelectionListener fListener addControlAccessibleListener fileLocationButton getText fileLocationButton getText variablesLocationButton createPushButton buttonComposite ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab variablesLocationButton addSelectionListener fListener addControlAccessibleListener variablesLocationButton getText variablesLocationButton getText
Returns the label used for the location widgets Subclasses may wish to override protected String get Location Label return External Tools Launch Configuration Messages get String External Tools Main Tab Location   2 NON NLS 1  getLocationLabel ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab Location___2
Creates the controls needed to edit the working directory attribute of an external tool param parent the composite to create the controls in protected void create Work Directory Component Composite parent Group group new Group parent SWT NONE String group Name get Working Directory Label group set Text group Name Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 layout num Columns 1 Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL group set Layout layout group set Layout Data grid Data work Directory Field new Text group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint I Dialog Constants ENTRY FIELD WIDTH work Directory Field set Layout Data data work Directory Field add Modify Listener f Listener add Control Accessible Listener work Directory Field group get Text Composite button Composite new Composite group SWT NONE layout new Grid Layout layout num Columns 3 grid Data new Grid Data Grid Data HORIZONTAL ALIGN END button Composite set Layout layout button Composite set Layout Data grid Data button Composite set Font parent get Font workspace Working Directory Button create Push Button button Composite External Tools Launch Configuration Messages get String External Tools Main Tab Browse Wor kspace  6 null NON NLS 1 workspace Working Directory Button add Selection Listener f Listener add Control Accessible Listener workspace Working Directory Button group get Text workspace Working Directory Button get Text NON NLS 1 file Working Directory Button create Push Button button Composite External Tools Launch Configuration Messages get String External Tools Main Tab Browse F ile System  7 null NON NLS 1 file Working Directory Button add Selection Listener f Listener add Control Accessible Listener file Working Directory Button group get Text file Location Button get Text NON NLS 1 variables Working Directory Button create Push Button button Composite External Tools Launch Configuration Messages get String External Tools Main Tab 32 null NON NLS 1 variables Working Directory Button add Selection Listener f Listener add Control Accessible Listener variables Working Directory Button group get Text variables Working Directory Button get Text NON NLS 1  createWorkDirectoryComponent groupName getWorkingDirectoryLabel setText groupName GridLayout GridLayout marginWidth marginHeight numColumns GridData gridData GridData GridData FILL_HORIZONTAL setLayout setLayoutData gridData workDirectoryField GridData GridData GridData FILL_HORIZONTAL widthHint IDialogConstants ENTRY_FIELD_WIDTH workDirectoryField setLayoutData workDirectoryField addModifyListener fListener addControlAccessibleListener workDirectoryField getText buttonComposite GridLayout numColumns gridData GridData GridData HORIZONTAL_ALIGN_END buttonComposite setLayout buttonComposite setLayoutData gridData buttonComposite setFont getFont workspaceWorkingDirectoryButton createPushButton buttonComposite ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab Browse_Wor _6 workspaceWorkingDirectoryButton addSelectionListener fListener addControlAccessibleListener workspaceWorkingDirectoryButton getText workspaceWorkingDirectoryButton getText fileWorkingDirectoryButton createPushButton buttonComposite ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab Browse_F ile_System _7 fileWorkingDirectoryButton addSelectionListener fListener addControlAccessibleListener fileWorkingDirectoryButton getText fileLocationButton getText variablesWorkingDirectoryButton createPushButton buttonComposite ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab variablesWorkingDirectoryButton addSelectionListener fListener addControlAccessibleListener variablesWorkingDirectoryButton getText variablesWorkingDirectoryButton getText
Return the String to use as the label for the working directory field Subclasses may wish to override protected String get Working Directory Label return External Tools Launch Configuration Messages get String External Tools Main Tab Working  Directory  5 NON NLS 1  getWorkingDirectoryLabel ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab Working_ Directory__5
Creates the controls needed to edit the argument and prompt for argument attributes of an external tool param parent the composite to create the controls in protected void create Argument Component Composite parent Group group new Group parent SWT NONE String group Name External Tools Launch Configuration Messages get String External Tools Main Tab Arguments   1 NON NLS 1 group set Text group Name Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 layout num Columns 1 Grid Data grid Data new Grid Data Grid Data FILL BOTH group set Layout layout group set Layout Data grid Data argument Field new Text group SWT MULTI SWT WRAP SWT BORDER SWT V SCROLL grid Data new Grid Data Grid Data FILL BOTH grid Data width Hint I Dialog Constants ENTRY FIELD WIDTH grid Data height Hint 30 argument Field set Layout Data grid Data argument Field add Modify Listener f Listener add Control Accessible Listener argument Field group get Text argument Variables Button create Push Button group External Tools Launch Configuration Messages get String External Tools Main Tab Varia bles  2 null NON NLS 1 grid Data new Grid Data Grid Data HORIZONTAL ALIGN END argument Variables Button set Layout Data grid Data argument Variables Button add Selection Listener f Listener add Control Accessible Listener argument Variables Button argument Variables Button get Text need to strip the mnemonic from buttons Label instruction new Label group SWT NONE instruction set Text External Tools Launch Configuration Messages get String External Tools Main Tab 3 NON NLS 1 grid Data new Grid Data Grid Data HORIZONTAL ALIGN FILL grid Data horizontal Span 2 instruction set Layout Data grid Data  createArgumentComponent groupName ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab Arguments___1 setText groupName GridLayout GridLayout marginWidth marginHeight numColumns GridData gridData GridData GridData FILL_BOTH setLayout setLayoutData gridData argumentField V_SCROLL gridData GridData GridData FILL_BOTH gridData widthHint IDialogConstants ENTRY_FIELD_WIDTH gridData heightHint argumentField setLayoutData gridData argumentField addModifyListener fListener addControlAccessibleListener argumentField getText argumentVariablesButton createPushButton ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab _2 gridData GridData GridData HORIZONTAL_ALIGN_END argumentVariablesButton setLayoutData gridData argumentVariablesButton addSelectionListener fListener addControlAccessibleListener argumentVariablesButton argumentVariablesButton getText setText ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab gridData GridData GridData HORIZONTAL_ALIGN_FILL gridData horizontalSpan setLayoutData gridData
see org eclipse debug ui I Launch Configuration Tab set Defaults org eclipse debug core I Launch Configuration Working Copy public void set Defaults I Launch Configuration Working Copy configuration configuration set Attribute FIRST EDIT true  ILaunchConfigurationTab setDefaults ILaunchConfigurationWorkingCopy setDefaults ILaunchConfigurationWorkingCopy setAttribute FIRST_EDIT
public void initialize From I Launch Configuration configuration f Initializing true update Location configuration update Working Directory configuration update Argument configuration f Initializing false set Dirty false  initializeFrom ILaunchConfiguration fInitializing updateLocation updateWorkingDirectory updateArgument fInitializing setDirty
Updates the working directory widgets to match the state of the given launch configuration protected void update Working Directory I Launch Configuration configuration String working Dir NON NLS 1 try working Dir configuration get Attribute I External Tool Constants ATTR WORKING DIRECTORY NON NLS 1 catch Core Exception ce External Tools Plugin get Default log External Tools Launch Configuration Messages get String External Tools Main Tab Error reading configuration 10 ce NON NLS 1 work Directory Field set Text working Dir  updateWorkingDirectory ILaunchConfiguration workingDir workingDir getAttribute IExternalToolConstants ATTR_WORKING_DIRECTORY CoreException ExternalToolsPlugin getDefault ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab Error_reading_configuration_10 workDirectoryField setText workingDir
Updates the location widgets to match the state of the given launch configuration protected void update Location I Launch Configuration configuration String location NON NLS 1 try location configuration get Attribute I External Tool Constants ATTR LOCATION NON NLS 1 catch Core Exception ce External Tools Plugin get Default log External Tools Launch Configuration Messages get String External Tools Main Tab Error reading configuration 10 ce NON NLS 1 location Field set Text location  updateLocation ILaunchConfiguration getAttribute IExternalToolConstants ATTR_LOCATION CoreException ExternalToolsPlugin getDefault ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab Error_reading_configuration_10 locationField setText
Updates the argument widgets to match the state of the given launch configuration protected void update Argument I Launch Configuration configuration String arguments NON NLS 1 try arguments configuration get Attribute I External Tool Constants ATTR TOOL ARGUMENTS NON NLS 1 catch Core Exception ce External Tools Plugin get Default log External Tools Launch Configuration Messages get String External Tools Main Tab Error reading configuration 7 ce NON NLS 1 argument Field set Text arguments  updateArgument ILaunchConfiguration getAttribute IExternalToolConstants ATTR_TOOL_ARGUMENTS CoreException ExternalToolsPlugin getDefault ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab Error_reading_configuration_7 argumentField setText
public void perform Apply I Launch Configuration Working Copy configuration String location location Field get Text trim if location length 0 configuration set Attribute I External Tool Constants ATTR LOCATION String null else configuration set Attribute I External Tool Constants ATTR LOCATION location String working Directory work Directory Field get Text trim if working Directory length 0 configuration set Attribute I External Tool Constants ATTR WORKING DIRECTORY String null else configuration set Attribute I External Tool Constants ATTR WORKING DIRECTORY working Directory String arguments argument Field get Text trim if arguments length 0 configuration set Attribute I External Tool Constants ATTR TOOL ARGUMENTS String null else configuration set Attribute I External Tool Constants ATTR TOOL ARGUMENTS arguments if user Edited configuration set Attribute FIRST EDIT String null  performApply ILaunchConfigurationWorkingCopy locationField getText setAttribute IExternalToolConstants ATTR_LOCATION setAttribute IExternalToolConstants ATTR_LOCATION workingDirectory workDirectoryField getText workingDirectory setAttribute IExternalToolConstants ATTR_WORKING_DIRECTORY setAttribute IExternalToolConstants ATTR_WORKING_DIRECTORY workingDirectory argumentField getText setAttribute IExternalToolConstants ATTR_TOOL_ARGUMENTS setAttribute IExternalToolConstants ATTR_TOOL_ARGUMENTS userEdited setAttribute FIRST_EDIT
see org eclipse debug ui I Launch Configuration Tab get Name public String get Name return External Tools Launch Configuration Messages get String External Tools Main Tab Main 17 NON NLS 1  ILaunchConfigurationTab getName getName ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab Main_17
public boolean is Valid I Launch Configuration launch Config set Error Message null set Message null boolean new Config false try new Config launch Config get Attribute FIRST EDIT false catch Core Exception e assume false is correct return validate Location new Config validate Work Directory  isValid ILaunchConfiguration launchConfig setErrorMessage setMessage newConfig newConfig launchConfig getAttribute FIRST_EDIT CoreException validateLocation newConfig validateWorkDirectory
Validates the content of the location field protected boolean validate Location boolean new Config String location location Field get Text trim if location length 1 if new Config set Error Message null set Message External Tools Launch Configuration Messages get String External Tools Main Tab 30 NON NLS 1 else set Error Message External Tools Launch Configuration Messages get String External Tools Main Tab External tool location cannot be empty 18 NON NLS 1 set Message null return false String expanded Location null try expanded Location resolve Value location if expanded Location null a variable that needs to be resolved at runtime return true catch Core Exception e set Error Message e get Status get Message return false File file new File expanded Location if file exists The file does not exist if new Config set Error Message External Tools Launch Configuration Messages get String External Tools Main Tab External tool location does not exist 19 NON NLS 1 return false if file is File if new Config set Error Message External Tools Launch Configuration Messages get String External Tools Main Tab External tool location specified is not a file 20 NON NLS 1 return false return true  validateLocation newConfig locationField getText newConfig setErrorMessage setMessage ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab setErrorMessage ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab External_tool_location_cannot_be_empty_18 setMessage expandedLocation expandedLocation resolveValue expandedLocation CoreException setErrorMessage getStatus getMessage expandedLocation newConfig setErrorMessage ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab External_tool_location_does_not_exist_19 isFile newConfig setErrorMessage ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab External_tool_location_specified_is_not_a_file_20
Validates the variables of the given string to determine if all variables are valid param expression expression with variables exception Core Exception if a variable is specified that does not exist private void validate Varibles String expression throws Core Exception I String Variable Manager manager Variables Plugin get Default get String Variable Manager manager validate String Variables expression  CoreException validateVaribles CoreException IStringVariableManager VariablesPlugin getDefault getStringVariableManager validateStringVariables
private String resolve Value String expression throws Core Exception String expanded null try expanded get Value expression catch Core Exception e possibly just a variable that needs to be resolved at runtime validate Varibles expression return null return expanded  resolveValue CoreException getValue CoreException validateVaribles
Validates the value of the given string to determine if any all variables are valid param expression expression with variables return whether the expression contained any variable values exception Core Exception if variable resolution fails private String get Value String expression throws Core Exception I String Variable Manager manager Variables Plugin get Default get String Variable Manager return manager perform String Substitution expression  CoreException getValue CoreException IStringVariableManager VariablesPlugin getDefault getStringVariableManager performStringSubstitution
Validates the content of the working directory field protected boolean validate Work Directory String dir work Directory Field get Text trim if dir length 0 return true String expanded Dir null try expanded Dir resolve Value dir if expanded Dir null a variable that needs to be resolved at runtime return true catch Core Exception e set Error Message e get Status get Message return false File file new File expanded Dir if file exists The directory does not exist set Error Message External Tools Launch Configuration Messages get String External Tools Main Tab External tool working directory does not exist or is invalid 21 NON NLS 1 return false if file is Directory set Error Message External Tools Launch Configuration Messages get String External Tools Main Tab Not a directory NON NLS 1 return false return true  validateWorkDirectory workDirectoryField getText expandedDir expandedDir resolveValue expandedDir CoreException setErrorMessage getStatus getMessage expandedDir setErrorMessage ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab External_tool_working_directory_does_not_exist_or_is_invalid_21 isDirectory setErrorMessage ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab Not_a_directory
Prompts the user to choose a location from the filesystem and sets the location as the full path of the selected file protected void handle File Location Button Selected File Dialog file Dialog new File Dialog get Shell SWT NONE file Dialog set File Name location Field get Text String text file Dialog open if text null location Field set Text text  handleFileLocationButtonSelected FileDialog fileDialog FileDialog getShell fileDialog setFileName locationField getText fileDialog locationField setText
Prompts the user for a workspace location within the workspace and sets the location as a String containing the workspace loc variable or code null code if no location was obtained from the user protected void handle Workspace Location Button Selected Resource Selection Dialog dialog dialog new Resource Selection Dialog get Shell Resources Plugin get Workspace get Root External Tools Launch Configuration Messages get String External Tools Main Tab Select a resource 22 NON NLS 1 dialog open Object results dialog get Result if results null results length 1 return I Resource resource I Resource results 0 location Field set Text new Variable Expression workspace loc resource get Full Path to String NON NLS 1  workspace_loc handleWorkspaceLocationButtonSelected ResourceSelectionDialog ResourceSelectionDialog getShell ResourcesPlugin getWorkspace getRoot ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab Select_a_resource_22 getResult IResource IResource locationField setText newVariableExpression workspace_loc getFullPath toString
Prompts the user for a working directory location within the workspace and sets the working directory as a String containing the workspace loc variable or code null code if no location was obtained from the user protected void handle Workspace Working Directory Button Selected Container Selection Dialog container Dialog container Dialog new Container Selection Dialog get Shell Resources Plugin get Workspace get Root false External Tools Launch Configuration Messages get String External Tools Main Tab 23 NON NLS 1 container Dialog open Object resource container Dialog get Result String text null if resource null resource length 0 text new Variable Expression workspace loc I Path resource 0 to String NON NLS 1 if text null work Directory Field set Text text  workspace_loc handleWorkspaceWorkingDirectoryButtonSelected ContainerSelectionDialog containerDialog containerDialog ContainerSelectionDialog getShell ResourcesPlugin getWorkspace getRoot ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab containerDialog containerDialog getResult newVariableExpression workspace_loc IPath toString workDirectoryField setText
Returns a new variable expression with the given variable and the given argument see I String Variable Manager generate Variable Expression String String protected String new Variable Expression String var Name String arg return Variables Plugin get Default get String Variable Manager generate Variable Expression var Name arg  IStringVariableManager generateVariableExpression newVariableExpression varName VariablesPlugin getDefault getStringVariableManager generateVariableExpression varName
Prompts the user to choose a working directory from the filesystem protected void handle File Working Directory Button Selected Directory Dialog dialog new Directory Dialog get Shell SWT SAVE dialog set Message External Tools Launch Configuration Messages get String External Tools Main Tab 23 NON NLS 1 dialog set Filter Path work Directory Field get Text String text dialog open if text null work Directory Field set Text text  handleFileWorkingDirectoryButtonSelected DirectoryDialog DirectoryDialog getShell setMessage ExternalToolsLaunchConfigurationMessages getString ExternalToolsMainTab setFilterPath workDirectoryField getText workDirectoryField setText
A variable entry button has been pressed for the given text field Prompt the user for a variable and enter the result in the given field private void handle Variables Button Selected Text text Field String variable get Variable if variable null text Field append variable  handleVariablesButtonSelected textField getVariable textField
Prompts the user to choose and configure a variable and returns the resulting string suitable to be used as an attribute private String get Variable String Variable Selection Dialog dialog new String Variable Selection Dialog get Shell dialog open return dialog get Variable Expression  getVariable StringVariableSelectionDialog StringVariableSelectionDialog getShell getVariableExpression
see org eclipse debug ui I Launch Configuration Tab get Image public Image get Image return External Tools Images get Image I External Tool Constants IMG TAB MAIN  ILaunchConfigurationTab getImage getImage ExternalToolsImages getImage IExternalToolConstants IMG_TAB_MAIN
see org eclipse debug ui I Launch Configuration Tab deactivated org eclipse debug core I Launch Configuration Working Copy public void deactivated I Launch Configuration Working Copy working Copy  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
see org eclipse debug ui I Launch Configuration Tab activated org eclipse debug core I Launch Configuration Working Copy public void activated I Launch Configuration Working Copy working Copy  ILaunchConfigurationTab ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy
public void add Control Accessible Listener Control control String control Name strip mnemonic String strs control Name split NON NLS 1 String Buffer stripped new String Buffer for int i 0 i strs length i stripped append strs i control get Accessible add Accessible Listener new Control Accessible Listener stripped to String  addControlAccessibleListener controlName controlName StringBuffer StringBuffer getAccessible addAccessibleListener ControlAccessibleListener toString
private class Control Accessible Listener extends Accessible Adapter private String control Name Control Accessible Listener String name control Name name  ControlAccessibleListener AccessibleAdapter controlName ControlAccessibleListener controlName
control Name name public void get Name Accessible Event e e result control Name  controlName getName AccessibleEvent controlName

Throws a core exception with an error status object built from the given message lower level exception and error code param message the status message param exception lower level exception associated with the error or code null code if none param code error code protected static void abort String message Throwable exception int code throws Core Exception throw new Core Exception new Status I Status ERROR I External Tool Constants PLUGIN ID code message exception  CoreException CoreException IStatus IExternalToolConstants PLUGIN_ID
Expands and returns the location attribute of the given launch configuration The location is verified to point to an existing file in the local file system param configuration launch configuration return an absolute path to a file in the local file system throws Core Exception if unable to retrieve the associated launch configuration attribute if unable to resolve any variables or if the resolved location does not point to an existing file in the local file system public static I Path get Location I Launch Configuration configuration throws Core Exception String location configuration get Attribute I External Tool Constants ATTR LOCATION String null if location null abort Message Format format External Tools Launch Configuration Messages get String External Tools Util Location not specified by  0  1 new String configuration get Name null 0 NON NLS 1 else String expanded Location get String Variable Manager perform String Substitution location if expanded Location null expanded Location length 0 String msg Message Format format External Tools Launch Configuration Messages get String External Tools Util invalidLocation  0 new Object configuration get Name NON NLS 1 abort msg null 0 else File file new File expanded Location if file is File return new Path expanded Location String msg Message Format format External Tools Launch Configuration Messages get String External Tools Util invalidLocation  0 new Object configuration get Name NON NLS 1 abort msg null 0 execution will not reach here return null  CoreException IPath getLocation ILaunchConfiguration CoreException getAttribute IExternalToolConstants ATTR_LOCATION MessageFormat ExternalToolsLaunchConfigurationMessages getString ExternalToolsUtil Location_not_specified_by_ _1 getName expandedLocation getStringVariableManager performStringSubstitution expandedLocation expandedLocation MessageFormat ExternalToolsLaunchConfigurationMessages getString ExternalToolsUtil invalidLocation_ getName expandedLocation isFile expandedLocation MessageFormat ExternalToolsLaunchConfigurationMessages getString ExternalToolsUtil invalidLocation_ getName
Returns a boolean specifying whether or not output should be captured for the given configuration param configuration the configuration from which the value will be extracted return boolean specifying whether or not output should be captured throws Core Exception if unable to access the associated attribute public static boolean get Capture Output I Launch Configuration configuration throws Core Exception return configuration get Attribute I External Tool Constants ATTR CAPTURE OUTPUT true  CoreException getCaptureOutput ILaunchConfiguration CoreException getAttribute IExternalToolConstants ATTR_CAPTURE_OUTPUT
Expands and returns the working directory attribute of the given launch configuration Returns code null code if a working directory is not specified If specified the working is verified to point to an existing directory in the local file system param configuration launch configuration return an absolute path to a directory in the local file system or code null code if unspecified throws Core Exception if unable to retrieve the associated launch configuration attribute if unable to resolve any variables or if the resolved location does not point to an existing directory in the local file system public static I Path get Working Directory I Launch Configuration configuration throws Core Exception String location configuration get Attribute I External Tool Constants ATTR WORKING DIRECTORY String null if location null String expanded Location get String Variable Manager perform String Substitution location if expanded Location length 0 File path new File expanded Location if path is Directory return new Path expanded Location String msg Message Format format External Tools Launch Configuration Messages get String External Tools Util invalidDirectory  0 new Object expanded Location configuration get Name NON NLS 1 abort msg null 0 return null  CoreException IPath getWorkingDirectory ILaunchConfiguration CoreException getAttribute IExternalToolConstants ATTR_WORKING_DIRECTORY expandedLocation getStringVariableManager performStringSubstitution expandedLocation expandedLocation isDirectory expandedLocation MessageFormat ExternalToolsLaunchConfigurationMessages getString ExternalToolsUtil invalidDirectory_ expandedLocation getName
Expands and returns the arguments attribute of the given launch configuration Returns code null code if arguments are not specified param configuration launch configuration return an array of resolved arguments or code null code if unspecified throws Core Exception if unable to retrieve the associated launch configuration attribute or if unable to resolve any variables public static String get Arguments I Launch Configuration configuration throws Core Exception String args configuration get Attribute I External Tool Constants ATTR TOOL ARGUMENTS String null if args null String expanded get String Variable Manager perform String Substitution args return parse String Into List expanded return null  CoreException getArguments ILaunchConfiguration CoreException getAttribute IExternalToolConstants ATTR_TOOL_ARGUMENTS getStringVariableManager performStringSubstitution parseStringIntoList
private static I String Variable Manager get String Variable Manager return Variables Plugin get Default get String Variable Manager  IStringVariableManager getStringVariableManager VariablesPlugin getDefault getStringVariableManager
Returns whether the given launch configuration is enabled This property is intended only to apply to external tool builder configurations and determines whether the project builder will launch the configuration when it builds param configuration the configuration for which the enabled state should be determined return whether the given configuration is enabled to be run when a build occurs throws Core Exception if unable to access the associated attribute public static boolean is Builder Enabled I Launch Configuration configuration throws Core Exception return configuration get Attribute I External Tool Constants ATTR BUILDER ENABLED true  CoreException isBuilderEnabled ILaunchConfiguration CoreException getAttribute IExternalToolConstants ATTR_BUILDER_ENABLED
Returns the collection of resources for the build scope as specified by the given launch configuration param configuration launch configuration throws Core Exception if an exception occurs while retrieving the resources public static I Resource get Resources For Build Scope I Launch Configuration configuration throws Core Exception String scope configuration get Attribute I External Tool Constants ATTR BUILD SCOPE String null if scope null return null return Refresh Tab get Refresh Resources scope  CoreException IResource getResourcesForBuildScope ILaunchConfiguration CoreException getAttribute IExternalToolConstants ATTR_BUILD_SCOPE RefreshTab getRefreshResources
Parses the argument text into an array of individual strings using the space character as the delimiter An individual argument containing spaces must have a double quote at the start and end Two double quotes together is taken to mean an embedded double quote in the argument text param arguments the arguments as one string return the array of arguments public static String parse String Into List String arguments if arguments null arguments length 0 return new String 0 Argument Parser parser new Argument Parser arguments String res parser parse Arguments return res  parseStringIntoList ArgumentParser ArgumentParser parseArguments
private int ch 1 public Argument Parser String args f Args args  ArgumentParser fArgs
public String parse Arguments List v new Array List ch get Next while ch 0 if Character is Whitespace char ch ch get Next else if ch v add parse String else v add parse Token String result new String v size v to Array result return result  parseArguments ArrayList getNext isWhitespace getNext parseString parseToken toArray
private int get Next if f Index f Args length return f Args char At f Index return 1  getNext fIndex fArgs fArgs charAt fIndex
private String parse String String Buffer buf new String Buffer ch get Next while ch 0 ch if ch ch get Next if ch Only escape double quotes buf append else if Platform getOS equals Constants OS WIN32 see Bug 26870 Windows requires an extra escape for embedded strings buf append if ch 0 buf append char ch ch get Next ch get Next return buf to String  parseString StringBuffer StringBuffer getNext getNext OS_WIN32 getNext getNext toString
private String parse Token String Buffer buf new String Buffer while ch 0 Character is Whitespace char ch if ch ch get Next if Character is Whitespace char ch end of token don t lose trailing backslash buf append return buf to String if ch 0 if ch Only escape double quotes buf append else if Platform getOS equals Constants OS WIN32 see Bug 26870 Windows requires an extra escape for embedded strings buf append buf append char ch ch get Next else if ch 1 Don t lose a trailing backslash buf append else if ch buf append parse String else buf append char ch ch get Next return buf to String  parseToken StringBuffer StringBuffer isWhitespace getNext isWhitespace toString OS_WIN32 getNext parseString getNext toString

public int compare Object o1 Object o2 String one String o1 String two String o2 int i1 0 int i2 0 int l1 one length int l2 two length char ch1 char ch2 while i1 l1 i2 l2 while i1 l1 Character is Whitespace ch1 one char At i1 i1 while i2 l2 Character is Whitespace ch2 two char At i2 i2 if i1 l1 i2 l2 return 0 if ch1 ch2 return 1 i1 i2 return 0  isWhitespace charAt isWhitespace charAt

public int compare Object o1 Object o2 String one String o1 String two String o2 if one null two null if one two return 0 return 1 if one starts With working set two starts With working set NON NLS 1 NON NLS 2 I Working Set working Set1 Refresh Tab get Working Set one I Working Set working Set2 Refresh Tab get Working Set two if working Set1 null working Set2 null if working Set1 working Set2 return 0 return 1 if working Set1 equals working Set2 return 0 return 1 return one compare To two  startsWith working_set startsWith working_set IWorkingSet workingSet1 RefreshTab getWorkingSet IWorkingSet workingSet2 RefreshTab getWorkingSet workingSet1 workingSet2 workingSet1 workingSet2 workingSet1 workingSet2 compareTo

Creates the action delegate public External Tool Menu Delegate super I External Tool Constants ID EXTERNAL TOOLS LAUNCH GROUP  ExternalToolMenuDelegate IExternalToolConstants ID_EXTERNAL_TOOLS_LAUNCH_GROUP

Returns a launch configuration from the given I Command arguments If the given arguments are from an old style external tool an unsaved working copy will be created from the arguments and returned param command Args the builder I Command arguments return a launch configuration a launch configuration working copy or code null code if not possible public static I Launch Configuration config From Build Command Args I Project project Map command Args String version String config Handle String command Args get LAUNCH CONFIG HANDLE if config Handle null Probably an old style Eclipse 1 0 or 2 0 external tool Try to migrate version 0 VERSION 1 0 return External Tool Migration config From Argument Map command Args I Launch Manager manager Debug Plugin get Default get Launch Manager I Launch Configuration configuration null try First treat the config Handle as a memento This is the format used in Eclipse 2 1 configuration manager get Launch Configuration config Handle catch Core Exception e if configuration null version 0 VERSION 2 1 else if config Handle starts With PROJECT TAG version 0 VERSION 3 0 final I Path path new Path config Handle I File file project get File path remove First Segments 1 if file exists configuration manager get Launch Configuration file else If the memento failed try treating the handle as a file name This is the format used in 3 0 RC1 version 0 VERSION 3 0 interim I Path path new Path BUILDER FOLDER NAME append config Handle I File file project get File path if file exists version 0 VERSION 3 0 interim configuration manager get Launch Configuration file return configuration  ICommand commandArgs ICommand ILaunchConfiguration configFromBuildCommandArgs IProject commandArgs configHandle commandArgs LAUNCH_CONFIG_HANDLE configHandle VERSION_1_0 ExternalToolMigration configFromArgumentMap commandArgs ILaunchManager DebugPlugin getDefault getLaunchManager ILaunchConfiguration configHandle getLaunchConfiguration configHandle CoreException VERSION_2_1 configHandle startsWith PROJECT_TAG VERSION_3_0_final IPath configHandle IFile getFile removeFirstSegments getLaunchConfiguration VERSION_3_0_interim IPath BUILDER_FOLDER_NAME configHandle IFile getFile VERSION_3_0_interim getLaunchConfiguration
Returns an code I Command code from the given launch configuration param project the project the I Command is relevant to param config the launch configuration to create the command from return the new command code null code can be returned if problems occur during the translation public static I Command command From Launch Config I Project project I Launch Configuration config I Command new Command null try new Command project get Description new Command new Command to Build Command project config new Command catch Core Exception exception Shell shell External Tools Plugin get Active Workbench Shell if shell null Message Dialog open Error shell External Tools Model Messages get String Builder Utils 5 External Tools Model Messages get String Builder Utils 6 NON NLS 1 NON NLS 2 return null return new Command  ICommand ICommand ICommand commandFromLaunchConfig IProject ILaunchConfiguration ICommand newCommand newCommand getDescription newCommand newCommand toBuildCommand newCommand CoreException ExternalToolsPlugin getActiveWorkbenchShell MessageDialog openError ExternalToolsModelMessages getString BuilderUtils ExternalToolsModelMessages getString BuilderUtils newCommand
Returns whether the given configuration is an unmigrated builder Unmigrated builders are external tools that are stored in an old format but have not been migrated by the user Old format builders are always translated into launch config working copies in memory but they re not considered migrated until the config has been saved and the project spec updated param config the config to examine return whether the given config represents an unmigrated builder public static boolean is Unmigrated Config I Launch Configuration config return config is Working Copy I Launch Configuration Working Copy config get Original null  isUnmigratedConfig ILaunchConfiguration isWorkingCopy ILaunchConfigurationWorkingCopy getOriginal
Converts the given config to a build command which is stored in the given command return the configured build command public static I Command to Build Command I Project project I Launch Configuration config I Command command throws Core Exception Map args null if is Unmigrated Config config This config represents an old external tool builder that hasn t been edited Try to find the old I Command and reuse the arguments The goal here is to not change the storage format of old unedited builders I Command commands project get Description get Build Spec for int i 0 i commands length i I Command project Command commands i String name External Tool Migration get Name From Command Args project Command get Arguments if name null name equals config get Name args project Command get Arguments break else if config instanceof I Launch Configuration Working Copy I Launch Configuration Working Copy working Copy I Launch Configuration Working Copy config if working Copy get Original null config working Copy get Original args new Hash Map Launch configuration builders are stored with a project relative path String Buffer buffer new String Buffer PROJECT TAG Append the project relative path workspace path minus first segment buffer append append config get File get Full Path remove First Segments 1 args put LAUNCH CONFIG HANDLE buffer to String command set Builder Name External Tool Builder ID command set Arguments args return command  ICommand toBuildCommand IProject ILaunchConfiguration ICommand CoreException isUnmigratedConfig ICommand ICommand getDescription getBuildSpec ICommand projectCommand ExternalToolMigration getNameFromCommandArgs projectCommand getArguments getName projectCommand getArguments ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy ILaunchConfigurationWorkingCopy workingCopy getOriginal workingCopy getOriginal HashMap StringBuffer StringBuffer PROJECT_TAG getFile getFullPath removeFirstSegments LAUNCH_CONFIG_HANDLE toString setBuilderName ExternalToolBuilder setArguments
Returns the type of launch configuration that should be created when duplicating the given configuration as a project builder Queries to see if an extension has been specified to explicitly declare the mapping public static I Launch Configuration Type get Configuration Duplication Type I Launch Configuration config throws Core Exception I Extension Point ep Platform get Extension Registry get Extension Point I External Tool Constants PLUGIN ID I External Tool Constants EXTENSION POINT CONFIGURATION DUPLICATION MAPS I Configuration Element elements ep get Configuration Elements String source Type config get Type get Identifier String builder Type null for int i 0 i elements length i I Configuration Element element elements i if element get Name equals TAG CONFIGURATION MAP source Type equals element get Attribute TAG SOURCE TYPE builder Type element get Attribute TAG BUILDER TYPE break if builder Type null I Launch Configuration Type type Debug Plugin get Default get Launch Manager get Launch Configuration Type builder Type if type null return type return config get Type  ILaunchConfigurationType getConfigurationDuplicationType ILaunchConfiguration CoreException IExtensionPoint getExtensionRegistry getExtensionPoint IExternalToolConstants PLUGIN_ID IExternalToolConstants EXTENSION_POINT_CONFIGURATION_DUPLICATION_MAPS IConfigurationElement getConfigurationElements sourceType getType getIdentifier builderType IConfigurationElement getName TAG_CONFIGURATION_MAP sourceType getAttribute TAG_SOURCE_TYPE builderType getAttribute TAG_BUILDER_TYPE builderType ILaunchConfigurationType DebugPlugin getDefault getLaunchManager getLaunchConfigurationType builderType getType
Returns the folder where project builders should be stored or code null code if the folder could not be created public static I Folder get Builder Folder I Project project boolean create I Folder folder project get Folder BUILDER FOLDER NAME if folder exists create try folder create true true new Null Progress Monitor catch Core Exception e return null return folder  IFolder getBuilderFolder IProject IFolder getFolder BUILDER_FOLDER_NAME NullProgressMonitor CoreException
Returns a duplicate of the given configuration The new configuration will be of the same type as the given configuration or of the duplication type registered for the given configuration via the extension point I External Tool Constants EXTENSION POINT CONFIGURATION DUPLICATION MAPS public static I Launch Configuration duplicate Configuration I Project project I Launch Configuration config throws Core Exception Map attributes null attributes config get Attributes String new Name new String Buffer config get Name append External Tools Model Messages get String Builder Utils 7 to String NON NLS 1 new Name Debug Plugin get Default get Launch Manager generate Unique Launch Configuration Name From new Name I Launch Configuration Type new Type get Configuration Duplication Type config I Launch Configuration Working Copy new Working Copy new Type new Instance get Builder Folder project true new Name new Working Copy set Attributes attributes return new Working Copy do Save  IExternalToolConstants EXTENSION_POINT_CONFIGURATION_DUPLICATION_MAPS ILaunchConfiguration duplicateConfiguration IProject ILaunchConfiguration CoreException getAttributes newName StringBuffer getName ExternalToolsModelMessages getString BuilderUtils toString newName DebugPlugin getDefault getLaunchManager generateUniqueLaunchConfigurationNameFrom newName ILaunchConfigurationType newType getConfigurationDuplicationType ILaunchConfigurationWorkingCopy newWorkingCopy newType newInstance getBuilderFolder newName newWorkingCopy setAttributes newWorkingCopy doSave
Migrates the launch configuration working copy which is based on an old style external tool builder to a new saved launch configuration The returned launch configuration will contain the same attributes as the given working copy with the exception of the configuration name which may be changed during the migration The name of the configuration will only be changed if the current name is not a valid name for a saved config param working Copy the launch configuration containing attributes from an old style project builder return I Launch Configuration a new saved launch configuration whose attributes match those of the given working copy as well as possible throws Core Exception if an exception occurs while attempting to save the new launch configuration public static I Launch Configuration migrate Builder Configuration I Project project I Launch Configuration Working Copy working Copy throws Core Exception working Copy set Container get Builder Folder project true Before saving make sure the name is valid String name working Copy get Name name replace if name char At 0 name name substring 1 I Status status Resources Plugin get Workspace validate Name name I Resource FILE if status isOK name External Tool NON NLS 1 name Debug Plugin get Default get Launch Manager generate Unique Launch Configuration Name From name working Copy rename name return working Copy do Save  workingCopy ILaunchConfiguration CoreException ILaunchConfiguration migrateBuilderConfiguration IProject ILaunchConfigurationWorkingCopy workingCopy CoreException workingCopy setContainer getBuilderFolder workingCopy getName charAt IStatus ResourcesPlugin getWorkspace validateName IResource ExternalTool DebugPlugin getDefault getLaunchManager generateUniqueLaunchConfigurationNameFrom workingCopy workingCopy doSave

private boolean build Kind Compatible int kind I Launch Configuration config throws Core Exception int build Kinds build Types To Array config get Attribute I External Tool Constants ATTR RUN BUILD KINDS NON NLS 1 for int j 0 j build Kinds length j if kind build Kinds j return true return false  buildKindCompatible ILaunchConfiguration CoreException buildKinds buildTypesToArray getAttribute IExternalToolConstants ATTR_RUN_BUILD_KINDS buildKinds buildKinds
protected I Project build int kind Map args I Progress Monitor monitor throws Core Exception if External Tools Plugin get Default get Bundle get State Bundle ACTIVE return null need to build all external tools from one builder see bug 39713 if not a full build I Command commands get Project get Description get Build Spec if kind FULL BUILD projects Within Scope new Array List for int i 0 i commands length i if ID equals commands i get Builder Name I Launch Configuration config Builder Utils config From Build Command Args get Project commands i get Arguments new String 1 if config null build Kind Compatible kind config config Enabled config if kind FULL BUILD launch Build kind config monitor else do Build Based On Scope kind config monitor return get Projects Within Scope  IProject IProgressMonitor CoreException ExternalToolsPlugin getDefault getBundle getState ICommand getProject getDescription getBuildSpec FULL_BUILD projectsWithinScope ArrayList getBuilderName ILaunchConfiguration BuilderUtils configFromBuildCommandArgs getProject getArguments buildKindCompatible configEnabled FULL_BUILD launchBuild doBuildBasedOnScope getProjectsWithinScope
Returns whether the given builder config is enabled or not param config the config to examine return whether the config is enabled private boolean config Enabled I Launch Configuration config try return External Tools Util is Builder Enabled config catch Core Exception e External Tools Plugin get Default log e return true  configEnabled ILaunchConfiguration ExternalToolsUtil isBuilderEnabled CoreException ExternalToolsPlugin getDefault
private I Project get Projects Within Scope if projects Within Scope null projects Within Scope is Empty projects Within Scope null return null return I Project projects Within Scope to Array new I Project projects Within Scope size  IProject getProjectsWithinScope projectsWithinScope projectsWithinScope isEmpty projectsWithinScope IProject projectsWithinScope toArray IProject projectsWithinScope
private void do Build Based On Scope int kind I Launch Configuration config I Progress Monitor monitor throws Core Exception boolean build For Change true I Resource resources External Tools Util get Resources For Build Scope config if resources null resources length 0 for int i 0 i resources length i I Resource resource resources i projects Within Scope add resource get Project build For Change build Scope Indicates Build resources if build For Change launch Build kind config monitor  doBuildBasedOnScope ILaunchConfiguration IProgressMonitor CoreException buildForChange IResource ExternalToolsUtil getResourcesForBuildScope IResource projectsWithinScope getProject buildForChange buildScopeIndicatesBuild buildForChange launchBuild
private void launch Build int kind I Launch Configuration config I Progress Monitor monitor throws Core Exception monitor sub Task Message Format format External Tools Model Messages get String External Tool Builder Running  0  1 new String config get Name NON NLS 1 build Started kind The default value for launch in background is true in debug core If the user doesn t go through the UI the new attribute won t be set This means that existing Ant builders will try to run in the background and likely conflict with each other without migration config External Tool Migration migrate Run In Background config config launch I Launch Manager RUN MODE monitor build Ended  launchBuild ILaunchConfiguration IProgressMonitor CoreException subTask MessageFormat ExternalToolsModelMessages getString ExternalToolBuilder Running_ _1 getName buildStarted ExternalToolMigration migrateRunInBackground ILaunchManager RUN_MODE buildEnded
Returns the build type being performed if the external tool is being run as a project builder return one of the code I External Tool Constants BUILD TYPE  code constants public static String get Build Type return build Type  IExternalToolConstants BUILD_TYPE_ getBuildType buildType
Returns the project that is being built and has triggered the current external tool builder code null code is returned if no build is currently occurring return project being built or code null code public static I Project get Build Project return build Project  IProject getBuildProject buildProject
Stores the currently active build kind and build project when a build begins param build Kind private void build Started int build Kind switch build Kind case Incremental Project Builder INCREMENTAL BUILD build Type I External Tool Constants BUILD TYPE INCREMENTAL break case Incremental Project Builder FULL BUILD build Type I External Tool Constants BUILD TYPE FULL break case Incremental Project Builder AUTO BUILD build Type I External Tool Constants BUILD TYPE AUTO break default build Type I External Tool Constants BUILD TYPE NONE break build Project get Project  buildKind buildStarted buildKind buildKind IncrementalProjectBuilder INCREMENTAL_BUILD buildType IExternalToolConstants BUILD_TYPE_INCREMENTAL IncrementalProjectBuilder FULL_BUILD buildType IExternalToolConstants BUILD_TYPE_FULL IncrementalProjectBuilder AUTO_BUILD buildType IExternalToolConstants BUILD_TYPE_AUTO buildType IExternalToolConstants BUILD_TYPE_NONE buildProject getProject
Clears the current build kind and build project when a build finishes private void build Ended build Type I External Tool Constants BUILD TYPE NONE build Project null  buildEnded buildType IExternalToolConstants BUILD_TYPE_NONE buildProject
private boolean build Scope Indicates Build I Resource resources for int i 0 i resources length i I Resource Delta delta get Delta resources i get Project if delta null project just added to the workspace no previous build tree return true I Path path resources i get Project Relative Path I Resource Delta change delta find Member path if change null return true return false  buildScopeIndicatesBuild IResource IResourceDelta getDelta getProject IPath getProjectRelativePath IResourceDelta findMember
Converts the build types string into an array of build kinds param build Types the string of built types to convert return the array of build kinds public static int build Types To Array String build Types if build Types null build Types length 0 return DEFAULT BUILD TYPES int count 0 boolean incremental false boolean full false boolean auto false String Tokenizer tokenizer new String Tokenizer build Types BUILD TYPE SEPARATOR while tokenizer has More Tokens String token tokenizer next Token if I External Tool Constants BUILD TYPE INCREMENTAL equals token if incremental incremental true count else if I External Tool Constants BUILD TYPE FULL equals token if full full true count else if I External Tool Constants BUILD TYPE AUTO equals token if auto auto true count int results new int count count 0 if incremental results count Incremental Project Builder INCREMENTAL BUILD count if full results count Incremental Project Builder FULL BUILD count if auto results count Incremental Project Builder AUTO BUILD count return results  buildTypes buildTypesToArray buildTypes buildTypes buildTypes DEFAULT_BUILD_TYPES StringTokenizer StringTokenizer buildTypes BUILD_TYPE_SEPARATOR hasMoreTokens nextToken IExternalToolConstants BUILD_TYPE_INCREMENTAL IExternalToolConstants BUILD_TYPE_FULL IExternalToolConstants BUILD_TYPE_AUTO IncrementalProjectBuilder INCREMENTAL_BUILD IncrementalProjectBuilder FULL_BUILD IncrementalProjectBuilder AUTO_BUILD

Declare all images private static void declare Images Objects declare Registry Image I External Tool Constants IMG TAB MAIN OBJECT main tab gif NON NLS 1  declareImages declareRegistryImage IExternalToolConstants IMG_TAB_MAIN main_tab
Declare an Image in the registry table param key The key to use when registering the image param path The path where the image can be found This path is relative to where this plugin class is found i e typically the packages directory private final static void declare Registry Image String key String path Image Descriptor desc Image Descriptor get Missing Image Descriptor try desc Image Descriptor create FromURL make Icon FileURL path catch MalformedURL Exception me image Registry put key desc image Descriptors put key desc  pathThe declareRegistryImage ImageDescriptor ImageDescriptor getMissingImageDescriptor ImageDescriptor createFromURL makeIconFileURL MalformedURLException imageRegistry imageDescriptors
Returns the Image Registry public static Image Registry get Image Registry if image Registry null initialize Image Registry return image Registry  ImageRegistry ImageRegistry getImageRegistry imageRegistry initializeImageRegistry imageRegistry
Initialize the image registry by declaring all of the required graphics This involves creating J Face image descriptors describing how to create find the image should it be needed The image is not actually allocated until requested Prefix conventions Wizard BannersWIZBAN  Preference BannersPREF BAN  Property Page BannersPROPBAN  Color toolbarCTOOL  Enable toolbarETOOL  Disable toolbarDTOOL  Local enabled toolbarELCL  Local Disable toolbarDLCL  Object largeOBJL  Object smallOBJS  View VIEW  Product imagesPROD  Misc imagesMISC  Where are the images The images typically gifs are found in the same location as this plugin class This may mean the same package directory as the package holding this class The images are declared using this get Class to ensure they are looked up via this plugin class see org eclipse jface resource Image Registry public static Image Registry initialize Image Registry image Registry new Image Registry External Tools Plugin get Standard Display image Descriptors new Hash Map 30 declare Images return image Registry  JFace BannersWIZBAN_ BannersPREF_BAN_ BannersPROPBAN_ toolbarCTOOL_ toolbarETOOL_ toolbarDTOOL_ toolbarELCL_ toolbarDLCL_ largeOBJL_ smallOBJS_ VIEW_ imagesPROD_ imagesMISC_ getClass ImageRegistry ImageRegistry initializeImageRegistry imageRegistry ImageRegistry ExternalToolsPlugin getStandardDisplay imageDescriptors HashMap declareImages imageRegistry
Returns the code Image code identified by the given key or code null code if it does not exist public static Image get Image String key return get Image Registry get key  getImage getImageRegistry
Returns the code Image Descriptor code identified by the given key or code null code if it does not exist public static Image Descriptor get Image Descriptor String key if image Descriptors null initialize Image Registry return Image Descriptor image Descriptors get key  ImageDescriptor ImageDescriptor getImageDescriptor imageDescriptors initializeImageRegistry ImageDescriptor imageDescriptors
private static URL make Icon FileURL String icon Path throws MalformedURL Exception if ICON BASE URL null throw new MalformedURL Exception return new URL ICON BASE URL icon Path  makeIconFileURL iconPath MalformedURLException ICON_BASE_URL MalformedURLException ICON_BASE_URL iconPath
Sets the three image descriptors for enabled disabled and hovered to an action The actions are retrieved from the lcl16 folders public static void set Local Image Descriptors I Action action String icon Name set Image Descriptors action lcl16 icon Name NON NLS 1  setLocalImageDescriptors IAction iconName setImageDescriptors iconName
private static void set Image Descriptors I Action action String type String rel Path try Image Descriptor id Image Descriptor create FromURL make Icon FileURL d type rel Path NON NLS 1 if id null action set Disabled Image Descriptor id catch MalformedURL Exception e External Tools Plugin get Default log e try Image Descriptor id Image Descriptor create FromURL make Icon FileURL c type rel Path NON NLS 1 if id null action set Hover Image Descriptor id catch MalformedURL Exception e External Tools Plugin get Default log e action set Image Descriptor create e type rel Path NON NLS 1  setImageDescriptors IAction relPath ImageDescriptor ImageDescriptor createFromURL makeIconFileURL relPath setDisabledImageDescriptor MalformedURLException ExternalToolsPlugin getDefault ImageDescriptor ImageDescriptor createFromURL makeIconFileURL relPath setHoverImageDescriptor MalformedURLException ExternalToolsPlugin getDefault setImageDescriptor relPath
private static URL make Icon FileURL String prefix String name throws MalformedURL Exception if ICON BASE URL null throw new MalformedURL Exception String Buffer buffer new String Buffer prefix buffer append buffer append name return new URL ICON BASE URL buffer to String  makeIconFileURL MalformedURLException ICON_BASE_URL MalformedURLException StringBuffer StringBuffer ICON_BASE_URL toString
private static Image Descriptor create String prefix String name try return Image Descriptor create FromURL make Icon FileURL prefix name catch MalformedURL Exception e External Tools Plugin get Default log e return Image Descriptor get Missing Image Descriptor  ImageDescriptor ImageDescriptor createFromURL makeIconFileURL MalformedURLException ExternalToolsPlugin getDefault ImageDescriptor getMissingImageDescriptor
Returns the image for the given composite descriptor public static Image get Image Composite Image Descriptor image Descriptor if image Descriptor Registry null image Descriptor Registry new Image Descriptor Registry return image Descriptor Registry get image Descriptor  getImage CompositeImageDescriptor imageDescriptor imageDescriptorRegistry imageDescriptorRegistry ImageDescriptorRegistry imageDescriptorRegistry imageDescriptor
public static void dispose Image Descriptor Registry if image Descriptor Registry null image Descriptor Registry dispose  disposeImageDescriptorRegistry imageDescriptorRegistry imageDescriptorRegistry

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private External Tools Model Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME ExternalToolsModelMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Create an instance of the External Tools plug in public External Tools Plugin super plugin this  ExternalToolsPlugin
Returns the default instance of the receiver This represents the runtime plugin public static External Tools Plugin get Default return plugin  ExternalToolsPlugin getDefault
Returns a new code I Status code for this plug in public static I Status new Error Status String message Throwable exception if message null message EMPTY STRING return new Status I Status ERROR I External Tool Constants PLUGIN ID 0 message exception  IStatus IStatus newErrorStatus EMPTY_STRING IStatus IExternalToolConstants PLUGIN_ID
Returns a new code Core Exception code for this plug in public static Core Exception new Error String message Throwable exception return new Core Exception new Status I Status ERROR I External Tool Constants PLUGIN ID 0 message exception  CoreException CoreException newError CoreException IStatus IExternalToolConstants PLUGIN_ID
Writes the message to the plug in s log param message the text to write to the log public void log String message Throwable exception I Status status new Error Status message exception get Log log status  IStatus newErrorStatus getLog
public void log Throwable exception this message is intentionally not internationalized as an exception may be due to the resource bundle itself get Log log new Error Status Internal error logged from External Tools UI exception NON NLS 1  getLog newErrorStatus
Returns the Image Descriptor for the icon with the given path return the Image Descriptor object public Image Descriptor get Image Descriptor String path try Bundle bundle get Default get Bundle URL installURL bundle get Entry NON NLS 1 URL url new URL installURL path return Image Descriptor create FromURL url catch MalformedURL Exception e return null  ImageDescriptor ImageDescriptor ImageDescriptor getImageDescriptor getDefault getBundle getEntry ImageDescriptor createFromURL MalformedURLException
Method declared in AbstractUI Plugin protected void initialize Default Preferences I Preference Store prefs prefs set Default I Preference Constants PROMPT FOR TOOL MIGRATION true prefs set Default I Preference Constants PROMPT FOR PROJECT MIGRATION true  AbstractUIPlugin initializeDefaultPreferences IPreferenceStore setDefault IPreferenceConstants PROMPT_FOR_TOOL_MIGRATION setDefault IPreferenceConstants PROMPT_FOR_PROJECT_MIGRATION
Returns the active workbench window or code null code if none public static I Workbench Window get Active Workbench Window return get Default get Workbench get Active Workbench Window  IWorkbenchWindow getActiveWorkbenchWindow getDefault getWorkbench getActiveWorkbenchWindow
Returns the active workbench page or code null code if none public static I Workbench Page get Active Page I Workbench Window window get Active Workbench Window if window null return window get Active Page return null  IWorkbenchPage getActivePage IWorkbenchWindow getActiveWorkbenchWindow getActivePage
Returns the active workbench shell or code null code if none public static Shell get Active Workbench Shell I Workbench Window window get Active Workbench Window if window null return window get Shell return null  getActiveWorkbenchShell IWorkbenchWindow getActiveWorkbenchWindow getShell
Returns the standard display to be used The method first checks if the thread calling this method has an associated display If so this display is returned Otherwise the method returns the default display public static Display get Standard Display Display display Display get Current if display null display Display get Default return display  getStandardDisplay getCurrent getDefault
see org eclipse ui plugin AbstractUI Plugin create Image Registry protected Image Registry create Image Registry return External Tools Images initialize Image Registry  AbstractUIPlugin createImageRegistry ImageRegistry createImageRegistry ExternalToolsImages initializeImageRegistry
public void stop Bundle Context context throws Exception try External Tools Images dispose Image Descriptor Registry finally super stop context  BundleContext ExternalToolsImages disposeImageDescriptorRegistry

Creates a new image descriptor registry for the current or default display respectively public Image Descriptor Registry this External Tools Plugin get Standard Display  ImageDescriptorRegistry ExternalToolsPlugin getStandardDisplay
Creates a new image descriptor registry for the given display All images managed by this registry will be disposed when the display gets disposed param display the display the images managed by this registry are allocated for public Image Descriptor Registry Display display f Display display Assert is Not Null f Display hook Display  ImageDescriptorRegistry fDisplay isNotNull fDisplay hookDisplay
Returns the image associated with the given image descriptor param descriptor the image descriptor for which the registry manages an image return the image associated with the image descriptor or code null code if the image descriptor can t create the requested image public Image get Image Descriptor descriptor if descriptor null descriptor Image Descriptor get Missing Image Descriptor Image result Image f Registry get descriptor if result null return result Assert is True f Display External Tools Plugin get Standard Display External Tools Model Messages get String Image Descriptor Registry Allocating image for wrong display 1 NON NLS 1 result descriptor create Image if result null f Registry put descriptor result return result  ImageDescriptor ImageDescriptor getMissingImageDescriptor fRegistry isTrue fDisplay ExternalToolsPlugin getStandardDisplay ExternalToolsModelMessages getString ImageDescriptorRegistry Allocating_image_for_wrong_display_1 createImage fRegistry
Disposes all images managed by this registry public void dispose for Iterator iter f Registry values iterator iter has Next Image image Image iter next image dispose f Registry clear  fRegistry hasNext fRegistry
private void hook Display f Display dispose Exec new Runnable public void run dispose  hookDisplay fDisplay disposeExec
private void hook Display f Display dispose Exec new Runnable public void run dispose  hookDisplay fDisplay disposeExec

int start inclusive int end exclusive public Position int start int end this start start this end end 
this end end public int get Start return start  getStart
return start public int get End return end  getEnd
String Matcher constructor takes in a String object that is a simple pattern which may contain for 0 and many characters and for exactly one character Literal and characters must be escaped in the pattern e g means literal etc Escaping any other character including the escape character itself just results in that character in the pattern e g a means a and means If invoking the String Matcher with string literals in Java don t forget escape characters are represented by param pattern the pattern to match text against param ignore Case if true case is ignored param ignore Wild Cards if true wild cards and their escape sequences are ignored everything is taken literally public String Matcher String pattern boolean ignore Case boolean ignore Wild Cards if pattern null throw new Illegal Argument Exception f Ignore Case ignore Case f Ignore Wild Cards ignore Wild Cards f Pattern pattern f Length pattern length if f Ignore Wild Cards parse No Wild Cards else parse Wild Cards  StringMatcher StringMatcher ignoreCase ignoreWildCards StringMatcher ignoreCase ignoreWildCards IllegalArgumentException fIgnoreCase ignoreCase fIgnoreWildCards ignoreWildCards fPattern fLength fIgnoreWildCards parseNoWildCards parseWildCards
Find the first occurrence of the pattern between code start code inclusive and code end code exclusive param text the String object to search in param start the starting index of the search range inclusive param end the ending index of the search range exclusive return an String Matcher Position code object that keeps the starting inclusive and ending positions exclusive of the first occurrence of the pattern in the specified range of the text return null if not found or subtext is empty start end A pair of zeros is returned if pattern is empty string Note that for pattern like abc with leading and trailing stars position of abc is returned For a pattern like in text abcdf 1 3 is returned public String Matcher Position find String text int start int end if text null throw new Illegal Argument Exception int tlen text length if start 0 start 0 if end tlen end tlen if end 0 start end return null if f Length 0 return new Position start start if f Ignore Wild Cards int x pos In text start end if x 0 return null return new Position x x f Length int seg Count f Segments length if seg Count 0 pattern contains only s return new Position start end int cur Pos start int match Start 1 int i for i 0 i seg Count cur Pos end i String current f Segments i int next Match reg Exp Pos In text cur Pos end current if next Match 0 return null if i 0 match Start next Match cur Pos next Match current length if i seg Count return null return new Position match Start cur Pos  StringMatcher StringMatcher IllegalArgumentException fLength fIgnoreWildCards posIn fLength segCount fSegments segCount curPos matchStart segCount curPos fSegments nextMatch regExpPosIn curPos nextMatch matchStart nextMatch curPos nextMatch segCount matchStart curPos
match the given code text code with the pattern return true if matched eitherwise false param text a String object public boolean match String text return match text 0 text length 
Given the starting inclusive and the ending exclusive positions in the code text code determine if the given substring matches with a Pattern return true if the specified portion of the text matches the pattern param text a String object that contains the substring to match param start marks the starting position inclusive of the substring param end marks the ending index exclusive of the substring public boolean match String text int start int end if null text throw new Illegal Argument Exception if start end return false if f Ignore Wild Cards return end start f Length f Pattern region Matches f Ignore Case 0 text start f Length int seg Count f Segments length if seg Count 0 f Has Leading Star f Has Trailing Star pattern contains only s return true if start end return f Length 0 if f Length 0 return start end int tlen text length if start 0 start 0 if end tlen end tlen int t Cur Pos start int bound end f Bound if bound 0 return false int i 0 String current f Segments i int seg Length current length process first segment if f Has Leading Star if reg Exp Region Matches text start current 0 seg Length return false i t Cur Pos t Cur Pos seg Length if f Segments length 1 f Has Leading Star f Has Trailing Star only one segment to match no wildcards specified return t Cur Pos end process middle segments while i seg Count current f Segments i int current Match int k current index Of f Single Wild Card if k 0 current Match text Pos In text t Cur Pos end current if current Match 0 return false else current Match reg Exp Pos In text t Cur Pos end current if current Match 0 return false t Cur Pos current Match current length i process final segment if f Has Trailing Star t Cur Pos end int clen current length return reg Exp Region Matches text end clen current 0 clen return i seg Count  aPattern IllegalArgumentException fIgnoreWildCards fLength fPattern regionMatches fIgnoreCase fLength segCount fSegments segCount fHasLeadingStar fHasTrailingStar fLength fLength tCurPos fBound fSegments segLength fHasLeadingStar regExpRegionMatches segLength tCurPos tCurPos segLength fSegments fHasLeadingStar fHasTrailingStar tCurPos segCount fSegments currentMatch indexOf fSingleWildCard currentMatch textPosIn tCurPos currentMatch currentMatch regExpPosIn tCurPos currentMatch tCurPos currentMatch fHasTrailingStar tCurPos regExpRegionMatches segCount
This method parses the given pattern into segments seperated by wildcard characters Since wildcards are not being used in this case the pattern consists of a single segment private void parse No Wild Cards f Segments new String 1 f Segments 0 f Pattern f Bound f Length  parseNoWildCards fSegments fSegments fPattern fBound fLength
Parses the given pattern into segments seperated by wildcard characters param p a String object that is a simple regular expression with and or private void parse Wild Cards if f Pattern starts With NON NLS 1 f Has Leading Star true if f Pattern ends With NON NLS 1 make sure it s not an escaped wildcard if f Length 1 f Pattern char At f Length 2 f Has Trailing Star true Vector temp new Vector int pos 0 String Buffer buf new String Buffer while pos f Length char c f Pattern char At pos switch c case if pos f Length buf append c else char next f Pattern char At pos if it s an escape sequence if next next next buf append next else not an escape sequence just insert literally buf append c buf append next break case if buf length 0 new segment temp add Element buf to String f Bound buf length buf set Length 0 break case append special character representing single match wildcard buf append f Single Wild Card break default buf append c add last buffer to segment list if buf length 0 temp add Element buf to String f Bound buf length f Segments new String temp size temp copy Into f Segments  parseWildCards fPattern startsWith fHasLeadingStar fPattern endsWith fLength fPattern charAt fLength fHasTrailingStar StringBuffer StringBuffer fLength fPattern charAt fLength fPattern charAt addElement toString fBound setLength fSingleWildCard addElement toString fBound fSegments copyInto fSegments
param text a string which contains no wildcard param start the starting index in the text for search inclusive param end the stopping point of search exclusive return the starting index in the text of the pattern or 1 if not found protected int pos In String text int start int end no wild card in pattern int max end f Length if f Ignore Case int i text index Of f Pattern start if i 1 i max return 1 return i for int i start i max i if text region Matches true i f Pattern 0 f Length return i return 1  posIn fLength fIgnoreCase indexOf fPattern regionMatches fPattern fLength
param text a simple regular expression that may only contain s param start the starting index in the text for search inclusive param end the stopping point of search exclusive param p a simple regular expression that may contains param case Ignored whether the pattern is not casesensitive return the starting index in the text of the pattern or 1 if not found protected int reg Exp Pos In String text int start int end String p int plen p length int max end plen for int i start i max i if reg Exp Region Matches text i p 0 plen return i return 1  caseIgnored regExpPosIn regExpRegionMatches
return boolean param text a String to match param start int that indicates the starting index of match inclusive param end int that indicates the ending index of match exclusive param p a simple regular expression that may contain param ignore Case boolean indicating wether code p code is case sensitive protected boolean reg Exp Region Matches String text int t Start String p int p Start int plen while plen 0 char tchar text char At t Start char pchar p char At p Start process wild cards if f Ignore Wild Cards skip single wild cards if pchar f Single Wild Card continue if pchar tchar continue if f Ignore Case if Character to Upper Case tchar Character to Upper Case pchar continue comparing after converting to upper case doesn t handle all cases also compare after converting to lower case if Character to Lower Case tchar Character to Lower Case pchar continue return false return true  ignoreCase regExpRegionMatches tStart pStart charAt tStart charAt pStart fIgnoreWildCards fSingleWildCard fIgnoreCase toUpperCase toUpperCase toLowerCase toLowerCase
param text the string to match param start the starting index in the text for search inclusive param end the stopping point of search exclusive param p a string that has no wildcard param ignore Case boolean indicating wether code p code is case sensitive return the starting index in the text of the pattern or 1 if not found protected int text Pos In String text int start int end String p int plen p length int max end plen if f Ignore Case int i text index Of p start if i 1 i max return 1 return i for int i start i max i if text region Matches true i p 0 plen return i return 1  ignoreCase textPosIn fIgnoreCase indexOf regionMatches

private I Process f Process public Background Resource Refresher I Launch Configuration configuration I Process process f Configuration configuration f Process process  IProcess fProcess BackgroundResourceRefresher ILaunchConfiguration IProcess fConfiguration fProcess
If the process has already terminated resource refreshing is done immediately in the current thread Otherwise refreshing is done when the process terminates public void start Background Refresh synchronized f Process if f Process is Terminated refresh else Debug Plugin get Default add Debug Event Listener this  startBackgroundRefresh fProcess fProcess isTerminated DebugPlugin getDefault addDebugEventListener
public void handle Debug Events Debug Event events for int i 0 i events length i Debug Event event events i if event get Source f Process event get Kind Debug Event TERMINATE Debug Plugin get Default remove Debug Event Listener this refresh break  handleDebugEvents DebugEvent DebugEvent getSource fProcess getKind DebugEvent DebugPlugin getDefault removeDebugEventListener
Job job new Job External Tools Program Messages get String Background Resource Refresher 0 NON NLS 1 public I Status run I Progress Monitor monitor try Refresh Tab refresh Resources f Configuration monitor catch Core Exception e External Tools Plugin get Default log e return e get Status return Status OK STATUS  ExternalToolsProgramMessages getString BackgroundResourceRefresher IStatus IProgressMonitor RefreshTab refreshResources fConfiguration CoreException ExternalToolsPlugin getDefault getStatus OK_STATUS
Submits a job to do the refresh protected void refresh Job job new Job External Tools Program Messages get String Background Resource Refresher 0 NON NLS 1 public I Status run I Progress Monitor monitor try Refresh Tab refresh Resources f Configuration monitor catch Core Exception e External Tools Plugin get Default log e return e get Status return Status OK STATUS job schedule  ExternalToolsProgramMessages getString BackgroundResourceRefresher IStatus IProgressMonitor RefreshTab refreshResources fConfiguration CoreException ExternalToolsPlugin getDefault getStatus OK_STATUS

Resource Bundle get Bundle BUNDLE NAME private External Tools Program Messages  ResourceBundle getBundle BUNDLE_NAME ExternalToolsProgramMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

see org eclipse debug ui I Launch Configuration Tab Group create Tabs org eclipse debug ui I Launch Configuration Dialog java lang String public void create Tabs I Launch Configuration Dialog dialog String mode I Launch Configuration Tab tabs new I Launch Configuration Tab new Program Main Tab new Refresh Tab new Environment Tab new External Tools Builder Tab set Tabs tabs  ILaunchConfigurationTabGroup createTabs ILaunchConfigurationDialog createTabs ILaunchConfigurationDialog ILaunchConfigurationTab ILaunchConfigurationTab ProgramMainTab RefreshTab EnvironmentTab ExternalToolsBuilderTab setTabs

private class Program Launch Window Listener implements I Window Listener public void window Activated I Workbench Window window  ProgramLaunchWindowListener IWindowListener windowActivated IWorkbenchWindow
public void window Activated I Workbench Window window public void window Deactivated I Workbench Window window  windowActivated IWorkbenchWindow windowDeactivated IWorkbenchWindow
public void window Closed I Workbench Window window I Workbench Window windows PlatformUI get Workbench get Workbench Windows if windows length 1 There are more windows still open return I Launch Manager manager Debug Plugin get Default get Launch Manager I Launch Configuration Type program Type manager get Launch Configuration Type I External Tool Constants ID PROGRAM LAUNCH CONFIGURATION TYPE if program Type null return I Launch launches manager get Launches I Launch Configuration Type config Type I Launch Configuration config for int i 0 i launches length i try config launches i get Launch Configuration if config null continue config Type config get Type catch Core Exception e continue if config Type equals program Type if launches i is Terminated Message Dialog open Warning window get Shell External Tools Program Messages get String Program Launch Delegate Workbench Closing 1 External Tools Program Messages get String Program Launch Delegate The workbench is exiting NON NLS 1 NON NLS 2 break  windowClosed IWorkbenchWindow IWorkbenchWindow getWorkbench getWorkbenchWindows ILaunchManager DebugPlugin getDefault getLaunchManager ILaunchConfigurationType programType getLaunchConfigurationType IExternalToolConstants ID_PROGRAM_LAUNCH_CONFIGURATION_TYPE programType ILaunch getLaunches ILaunchConfigurationType configType ILaunchConfiguration getLaunchConfiguration configType getType CoreException configType programType isTerminated MessageDialog openWarning getShell ExternalToolsProgramMessages getString ProgramLaunchDelegate Workbench_Closing_1 ExternalToolsProgramMessages getString ProgramLaunchDelegate The_workbench_is_exiting
public void window Opened I Workbench Window window  windowOpened IWorkbenchWindow
see org eclipse debug core model I Launch Configuration Delegate launch org eclipse debug core I Launch Configuration java lang String org eclipse debug core I Launch org eclipse core runtime I Progress Monitor public void launch I Launch Configuration configuration String mode I Launch launch I Progress Monitor monitor throws Core Exception if monitor is Canceled return resolve location I Path location External Tools Util get Location configuration if monitor is Canceled return resolve working directory I Path working Directory External Tools Util get Working Directory configuration if monitor is Canceled return resolve arguments String arguments External Tools Util get Arguments configuration if monitor is Canceled return int cmd Line Length 1 if arguments null cmd Line Length arguments length String cmd Line new String cmd Line Length cmd Line 0 location toOS String if arguments null System arraycopy arguments 0 cmd Line 1 arguments length File working Dir null if working Directory null working Dir working Directory to File if monitor is Canceled return String envp Debug Plugin get Default get Launch Manager get Environment configuration if monitor is Canceled return if window Listener null window Listener new Program Launch Window Listener PlatformUI get Workbench add Window Listener window Listener Process p Debug Plugin exec cmd Line working Dir envp I Process process null add process type to process attributes Map process Attributes new Hash Map String program Name location last Segment String extension location get File Extension if extension null program Name program Name substring 0 program Name length extension length 1 program Name program Name to Lower Case process Attributes put I Process ATTR PROCESS TYPE program Name if p null monitor begin Task Message Format format External Tools Program Messages get String Program Launch Delegate 3 new String configuration get Name I Progress Monitor UNKNOWN NON NLS 1 process Debug Plugin new Process launch p location toOS String process Attributes if process null p destroy throw new Core Exception new Status I Status ERROR I External Tool Constants PLUGIN ID I External Tool Constants ERR INTERNAL ERROR External Tools Program Messages get String Program Launch Delegate 4 null NON NLS 1 process set Attribute I Process ATTR CMDLINE generate Command Line cmd Line if Common Tab is Launch In Background configuration refresh resources after process finishes if Refresh Tab get Refresh Scope configuration null Background Resource Refresher refresher new Background Resource Refresher configuration process refresher start Background Refresh else wait for process to exit while process is Terminated try if monitor is Canceled process terminate break Thread sleep 50 catch Interrupted Exception e refresh resources Refresh Tab refresh Resources configuration monitor  ILaunchConfigurationDelegate ILaunchConfiguration ILaunch IProgressMonitor ILaunchConfiguration ILaunch IProgressMonitor CoreException isCanceled IPath ExternalToolsUtil getLocation isCanceled IPath workingDirectory ExternalToolsUtil getWorkingDirectory isCanceled ExternalToolsUtil getArguments isCanceled cmdLineLength cmdLineLength cmdLine cmdLineLength cmdLine toOSString cmdLine workingDir workingDirectory workingDir workingDirectory toFile isCanceled DebugPlugin getDefault getLaunchManager getEnvironment isCanceled windowListener windowListener ProgramLaunchWindowListener getWorkbench addWindowListener windowListener DebugPlugin cmdLine workingDir IProcess processAttributes HashMap programName lastSegment getFileExtension programName programName programName programName programName toLowerCase processAttributes IProcess ATTR_PROCESS_TYPE programName beginTask MessageFormat ExternalToolsProgramMessages getString ProgramLaunchDelegate getName IProgressMonitor DebugPlugin newProcess toOSString processAttributes CoreException IStatus IExternalToolConstants PLUGIN_ID IExternalToolConstants ERR_INTERNAL_ERROR ExternalToolsProgramMessages getString ProgramLaunchDelegate setAttribute IProcess ATTR_CMDLINE generateCommandLine cmdLine CommonTab isLaunchInBackground RefreshTab getRefreshScope BackgroundResourceRefresher BackgroundResourceRefresher startBackgroundRefresh isTerminated isCanceled InterruptedException RefreshTab refreshResources
private String generate Command Line String command Line if command Line length 1 return NON NLS 1 String Buffer buf new String Buffer for int i 0 i command Line length i buf append char characters command Line i to Char Array String Buffer command new String Buffer boolean contains Space false for int j 0 j characters length j char character characters j if character command append else if character contains Space true command append character if contains Space buf append buf append command buf append else buf append command return buf to String  generateCommandLine commandLine commandLine StringBuffer StringBuffer commandLine commandLine toCharArray StringBuffer StringBuffer containsSpace containsSpace containsSpace toString

Prompts the user for a program location within the workspace and sets the location as a String containing the workspace loc variable or code null code if no location was obtained from the user protected void handle Workspace Location Button Selected File Selection Dialog dialog dialog new File Selection Dialog get Shell Resources Plugin get Workspace get Root External Tools Program Messages get String Program Main Tab Select NON NLS 1 dialog open I Structured Selection result dialog get Result if result null return Object file result get First Element if file instanceof I File String Buffer expression new String Buffer expression append workspace loc NON NLS 1 expression append I File file get Full Path to String expression append NON NLS 1 location Field set Text expression to String  workspace_loc handleWorkspaceLocationButtonSelected FileSelectionDialog FileSelectionDialog getShell ResourcesPlugin getWorkspace getRoot ExternalToolsProgramMessages getString ProgramMainTab IStructuredSelection getResult getFirstElement IFile StringBuffer StringBuffer workspace_loc IFile getFullPath toString locationField setText toString
see org eclipse debug ui I Launch Configuration Tab create Control org eclipse swt widgets Composite public void create Control Composite parent super create Control parent Workbench Help set Help get Control I External Tools Help Context Ids EXTERNAL TOOLS LAUNCH CONFIGURATION DIALOG PROGRAM MAIN TAB  ILaunchConfigurationTab createControl createControl createControl WorkbenchHelp setHelp getControl IExternalToolsHelpContextIds EXTERNAL_TOOLS_LAUNCH_CONFIGURATION_DIALOG_PROGRAM_MAIN_TAB

see org eclipse debug ui I Launch Configuration Tab Group create Tabs org eclipse debug ui I Launch Configuration Dialog java lang String public void create Tabs I Launch Configuration Dialog dialog String mode I Launch Configuration Tab tabs new I Launch Configuration Tab new Program Main Tab new Refresh Tab new Environment Tab new Common Tab set Tabs tabs  ILaunchConfigurationTabGroup createTabs ILaunchConfigurationDialog createTabs ILaunchConfigurationDialog ILaunchConfigurationTab ILaunchConfigurationTab ProgramMainTab RefreshTab EnvironmentTab CommonTab setTabs

Create an initialized variable definition private Variable Definition super  VariableDefinition
Allows no instances private External Tool Migration super  ExternalToolMigration
Returns a launch configuration working copy from the argument map or code null code if the given map cannot be interpreted as a 2 0 or 2 1 branch external tool The returned working copy will be unsaved and its location will be set to the metadata area public static I Launch Configuration Working Copy config From Argument Map Map args String version String args get TAG VERSION if VERSION 21 equals version return config From21 Argument Map args return config From20 Argument Map args  ILaunchConfigurationWorkingCopy configFromArgumentMap TAG_VERSION VERSION_21 configFrom21ArgumentMap configFrom20ArgumentMap
public static I Launch Configuration Working Copy config From21 Argument Map Map command Args String name String command Args get TAG NAME String type String command Args get TAG TYPE I Launch Configuration Working Copy config new Config type name if config null return null config set Attribute I External Tool Constants ATTR LOCATION String command Args get TAG LOCATION config set Attribute I External Tool Constants ATTR WORKING DIRECTORY String command Args get TAG WORK DIR config set Attribute I External Tool Constants ATTR CAPTURE OUTPUT TRUE equals command Args get TAG CAPTURE OUTPUT config set Attribute I External Tool Constants ATTR SHOW CONSOLE TRUE equals command Args get TAG SHOW CONSOLE config set Attribute I DebugUI Constants ATTR LAUNCH IN BACKGROUND TRUE equals command Args get TAG RUN BKGRND config set Attribute I External Tool Constants ATTR PROMPT FOR ARGUMENTS TRUE equals command Args get TAG PROMPT ARGS config set Attribute Refresh Tab ATTR REFRESH SCOPE String command Args get TAG REFRESH SCOPE config set Attribute Refresh Tab ATTR REFRESH RECURSIVE TRUE equals command Args get TAG REFRESH RECURSIVE config set Attribute I External Tool Constants ATTR RUN BUILD KINDS String command Args get TAG RUN BUILD KINDS String args String command Args get TAG ARGS if args null config set Attribute I External Tool Constants ATTR TOOL ARGUMENTS args String extra Attributes String command Args get TAG EXTRA ATTR if extra Attributes null String Tokenizer tokenizer new String Tokenizer extra Attributes EXTRA ATTR SEPARATOR while tokenizer has More Tokens String key tokenizer next Token if tokenizer has More Tokens break String value tokenizer next Token if key equals RUN TARGETS ATTRIBUTE 2 1 implementation only defined 1 extra attribute config set Attribute ATTR ANT TARGETS value return config  ILaunchConfigurationWorkingCopy configFrom21ArgumentMap commandArgs commandArgs TAG_NAME commandArgs TAG_TYPE ILaunchConfigurationWorkingCopy newConfig setAttribute IExternalToolConstants ATTR_LOCATION commandArgs TAG_LOCATION setAttribute IExternalToolConstants ATTR_WORKING_DIRECTORY commandArgs TAG_WORK_DIR setAttribute IExternalToolConstants ATTR_CAPTURE_OUTPUT commandArgs TAG_CAPTURE_OUTPUT setAttribute IExternalToolConstants ATTR_SHOW_CONSOLE commandArgs TAG_SHOW_CONSOLE setAttribute IDebugUIConstants ATTR_LAUNCH_IN_BACKGROUND commandArgs TAG_RUN_BKGRND setAttribute IExternalToolConstants ATTR_PROMPT_FOR_ARGUMENTS commandArgs TAG_PROMPT_ARGS setAttribute RefreshTab ATTR_REFRESH_SCOPE commandArgs TAG_REFRESH_SCOPE setAttribute RefreshTab ATTR_REFRESH_RECURSIVE commandArgs TAG_REFRESH_RECURSIVE setAttribute IExternalToolConstants ATTR_RUN_BUILD_KINDS commandArgs TAG_RUN_BUILD_KINDS commandArgs TAG_ARGS setAttribute IExternalToolConstants ATTR_TOOL_ARGUMENTS extraAttributes commandArgs TAG_EXTRA_ATTR extraAttributes StringTokenizer StringTokenizer extraAttributes EXTRA_ATTR_SEPARATOR hasMoreTokens nextToken hasMoreTokens nextToken RUN_TARGETS_ATTRIBUTE setAttribute ATTR_ANT_TARGETS
Creates an external tool from the map public static I Launch Configuration Working Copy config From20 Argument Map Map args Update the type String type String args get TAG TOOL TYPE if TOOL TYPE ANT equals type type TOOL TYPE ANT BUILD else if TOOL TYPE PROGRAM equals type type I External Tool Constants TOOL TYPE PROGRAM else return null String name String args get TAG TOOL NAME I Launch Configuration Working Copy config new Config type name if config null return null Update the location String location String args get TAG TOOL LOCATION config set Attribute I External Tool Constants ATTR LOCATION location Update the refresh scope String refresh String args get TAG TOOL REFRESH if refresh null Variable Definition var Def extract Variable Definition refresh 0 if none equals var Def name NON NLS 1 refresh null config set Attribute Refresh Tab ATTR REFRESH SCOPE refresh Update the arguments String arguments String args get TAG TOOL ARGUMENTS if type equals TOOL TYPE ANT BUILD String target Names null if arguments null int start 0 Array List targets new Array List String Buffer buffer new String Buffer Variable Definition var Def extract Variable Definition arguments start while var Def end 1 if ant target equals var Def name var Def argument null NON NLS 1 targets add var Def argument buffer append arguments substring start var Def start else buffer append arguments substring start var Def end start var Def end var Def extract Variable Definition arguments start buffer append arguments substring start arguments length arguments buffer to String buffer set Length 0 for int i 0 i targets size i String target String targets get i if target null target length 0 buffer append target buffer append NON NLS 1 target Names buffer to String if target Names null target Names length 0 config set Attribute ATTR ANT TARGETS target Names config set Attribute I External Tool Constants ATTR TOOL ARGUMENTS arguments Collect the rest of the information config set Attribute I External Tool Constants ATTR SHOW CONSOLE TRUE equals args get TAG TOOL SHOW LOG config set Attribute I External Tool Constants ATTR CAPTURE OUTPUT TRUE equals args get TAG TOOL SHOW LOG config set Attribute I DebugUI Constants ATTR LAUNCH IN BACKGROUND FALSE equals args get TAG TOOL BLOCK String build Kinds String args get TAG TOOL BUILD TYPES if build Kinds null build Kinds build Kinds replace Replace the old separator with the new config set Attribute I External Tool Constants ATTR RUN BUILD KINDS build Kinds config set Attribute I External Tool Constants ATTR WORKING DIRECTORY String args get TAG TOOL DIRECTORY return config  ILaunchConfigurationWorkingCopy configFrom20ArgumentMap TAG_TOOL_TYPE TOOL_TYPE_ANT TOOL_TYPE_ANT_BUILD TOOL_TYPE_PROGRAM IExternalToolConstants TOOL_TYPE_PROGRAM TAG_TOOL_NAME ILaunchConfigurationWorkingCopy newConfig TAG_TOOL_LOCATION setAttribute IExternalToolConstants ATTR_LOCATION TAG_TOOL_REFRESH VariableDefinition varDef extractVariableDefinition varDef setAttribute RefreshTab ATTR_REFRESH_SCOPE TAG_TOOL_ARGUMENTS TOOL_TYPE_ANT_BUILD targetNames ArrayList ArrayList StringBuffer StringBuffer VariableDefinition varDef extractVariableDefinition varDef ant_target varDef varDef varDef varDef varDef varDef varDef extractVariableDefinition toString setLength targetNames toString targetNames targetNames setAttribute ATTR_ANT_TARGETS targetNames setAttribute IExternalToolConstants ATTR_TOOL_ARGUMENTS setAttribute IExternalToolConstants ATTR_SHOW_CONSOLE TAG_TOOL_SHOW_LOG setAttribute IExternalToolConstants ATTR_CAPTURE_OUTPUT TAG_TOOL_SHOW_LOG setAttribute IDebugUIConstants ATTR_LAUNCH_IN_BACKGROUND TAG_TOOL_BLOCK buildKinds TAG_TOOL_BUILD_TYPES buildKinds buildKinds buildKinds setAttribute IExternalToolConstants ATTR_RUN_BUILD_KINDS buildKinds setAttribute IExternalToolConstants ATTR_WORKING_DIRECTORY TAG_TOOL_DIRECTORY
Returns a new working copy with the given external tool name and external tool type or code null code if no config could be created private static I Launch Configuration Working Copy new Config String type String name if type null name null return null I Launch Manager manager Debug Plugin get Default get Launch Manager I Launch Configuration Type config Type if TOOL TYPE ANT BUILD equals type config Type manager get Launch Configuration Type ID ANT BUILDER LAUNCH CONFIGURATION TYPE else if I External Tool Constants TOOL TYPE PROGRAM equals type config Type manager get Launch Configuration Type I External Tool Constants ID PROGRAM BUILDER LAUNCH CONFIGURATION TYPE else return null try if config Type null return config Type new Instance null name catch Core Exception e External Tools Plugin get Default log e return null  ILaunchConfigurationWorkingCopy newConfig ILaunchManager DebugPlugin getDefault getLaunchManager ILaunchConfigurationType configType TOOL_TYPE_ANT_BUILD configType getLaunchConfigurationType ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE IExternalToolConstants TOOL_TYPE_PROGRAM configType getLaunchConfigurationType IExternalToolConstants ID_PROGRAM_BUILDER_LAUNCH_CONFIGURATION_TYPE configType configType newInstance CoreException ExternalToolsPlugin getDefault
Returns the tool name extracted from the given command argument map Extraction is attempted using 2 0 and 2 1 external tool formats public static String get Name From Command Args Map command Args String name String command Args get TAG NAME if name null name String command Args get TAG TOOL NAME return name  getNameFromCommandArgs commandArgs commandArgs TAG_NAME commandArgs TAG_TOOL_NAME
Migrate the old RUN IN BACKGROUND launch config attribute to the new LAUNCH IN BACKGROUND attribute provided by the debug ui plugin param config the config to migrate return the migrated config public static I Launch Configuration migrate Run In Background I Launch Configuration config String no Value Flag No Value NON NLS 1 String attr null try attr config get Attribute I DebugUI Constants ATTR LAUNCH IN BACKGROUND no Value Flag catch Core Exception e Exception will occur if the attribute is already set because the attribute is actually a boolean No migration necessary return config if no Value Flag equals attr the old constant String ATTR RUN IN BACKGROUND I External Tool Constants PLUGIN ID ATTR RUN IN BACKGROUND NON NLS 1 boolean run In Background false try run In Background config get Attribute ATTR RUN IN BACKGROUND run In Background catch Core Exception e External Tools Plugin get Default log External ToolsUI Messages get String External Tool Migration 37 e NON NLS 1 try I Launch Configuration Working Copy working Copy config get Working Copy working Copy set Attribute I DebugUI Constants ATTR LAUNCH IN BACKGROUND run In Background config working Copy do Save catch Core Exception e External Tools Plugin get Default log External ToolsUI Messages get String External Tool Migration 38 e NON NLS 1 return config  RUN_IN_BACKGROUND LAUNCH_IN_BACKGROUND ILaunchConfiguration migrateRunInBackground ILaunchConfiguration noValueFlag NoValue getAttribute IDebugUIConstants ATTR_LAUNCH_IN_BACKGROUND noValueFlag CoreException noValueFlag ATTR_RUN_IN_BACKGROUND IExternalToolConstants PLUGIN_ID ATTR_RUN_IN_BACKGROUND runInBackground runInBackground getAttribute ATTR_RUN_IN_BACKGROUND runInBackground CoreException ExternalToolsPlugin getDefault ExternalToolsUIMessages getString ExternalToolMigration ILaunchConfigurationWorkingCopy workingCopy getWorkingCopy workingCopy setAttribute IDebugUIConstants ATTR_LAUNCH_IN_BACKGROUND runInBackground workingCopy doSave CoreException ExternalToolsPlugin getDefault ExternalToolsUIMessages getString ExternalToolMigration
Extracts a variable name and argument from the given string param text the source text to parse for a variable tag param start the index in the string to start the search return the variable definition public static Variable Definition extract Variable Definition String text int start Variable Definition var Def new Variable Definition var Def start text index Of VAR TAG START start if var Def start 0 return var Def start var Def start VAR TAG START length int end text index Of VAR TAG END start if end 0 return var Def var Def end end VAR TAG END length if end start return var Def int mid text index Of VAR TAG SEP start if mid 0 mid end var Def name text substring start end else if mid start var Def name text substring start mid mid mid VAR TAG SEP length if mid end var Def argument text substring mid end return var Def  VariableDefinition extractVariableDefinition VariableDefinition varDef VariableDefinition varDef indexOf VAR_TAG_START varDef varDef varDef VAR_TAG_START indexOf VAR_TAG_END varDef varDef VAR_TAG_END varDef indexOf VAR_TAG_SEP varDef varDef VAR_TAG_SEP varDef varDef

public String get Text Object element if element instanceof I Command return get Command Text I Command element else if element instanceof I Launch Configuration element instanceof I Launch Configuration Type return get Debug Model Text element else if element instanceof Error Config return External ToolsUI Messages get String Builder Property Page invalid Build Tool NON NLS 1 return super get Text element  getText ICommand getCommandText ICommand ILaunchConfiguration ILaunchConfigurationType getDebugModelText ErrorConfig ExternalToolsUIMessages getString BuilderPropertyPage invalidBuildTool getText
public Image get Image Object element if element instanceof I Command return get Command Image else if element instanceof I Launch Configuration element instanceof I Launch Configuration Type return get Debug Model Image element else if element instanceof Error Config return invalid Build Tool Image return super get Image element  getImage ICommand getCommandImage ILaunchConfiguration ILaunchConfigurationType getDebugModelImage ErrorConfig invalidBuildToolImage getImage
public String get Command Text I Command command String builderID command get Builder Name return get Builder Name builderID  getCommandText ICommand getBuilderName getBuilderName
private String get Builder Name String builderID Get the human readable name of the builder I Extension extension Platform get Extension Registry get Extension Resources Plugin PI RESOURCES Resources Plugin PT BUILDERS builderID String builder Name if extension null builder Name extension get Label else builder Name Message Format format External ToolsUI Messages get String Builder Property Page missing Builder new Object builderID NON NLS 1 return builder Name  getBuilderName IExtension getExtensionRegistry getExtension ResourcesPlugin PI_RESOURCES ResourcesPlugin PT_BUILDERS builderName builderName getLabel builderName MessageFormat ExternalToolsUIMessages getString BuilderPropertyPage missingBuilder builderName
Returns the image for build commands return the build command image public Image get Command Image return builder Image  getCommandImage builderImage
Returns a text label for the given object from a debug model presentation param element the element return a text label from a debug model presentation public String get Debug Model Text Object element if element instanceof I Launch Configuration try String disabled Builder Name I Launch Configuration element get Attribute I External Tool Constants ATTR DISABLED BUILDER String null if disabled Builder Name null really a disabled builder wrapped as a launch configuration return get Builder Name disabled Builder Name catch Core Exception e return debug Model Presentation get Text element  getDebugModelText ILaunchConfiguration disabledBuilderName ILaunchConfiguration getAttribute IExternalToolConstants ATTR_DISABLED_BUILDER disabledBuilderName getBuilderName disabledBuilderName CoreException debugModelPresentation getText
Returns an image for the given object from a debug model presentation param element the element return an image from a debug model presentation public Image get Debug Model Image Object element if element instanceof I Launch Configuration try String disabled Builder Name I Launch Configuration element get Attribute I External Tool Constants ATTR DISABLED BUILDER String null if disabled Builder Name null really a disabled builder wrapped as a launch configuration return builder Image catch Core Exception e return debug Model Presentation get Image element  getDebugModelImage ILaunchConfiguration disabledBuilderName ILaunchConfiguration getAttribute IExternalToolConstants ATTR_DISABLED_BUILDER disabledBuilderName builderImage CoreException debugModelPresentation getImage
see org eclipse jface viewers I Base Label Provider dispose public void dispose builder Image dispose invalid Build Tool Image dispose  IBaseLabelProvider builderImage invalidBuildToolImage

public class Error Config private I Command command public Error Config I Command command this command command  ErrorConfig ICommand ErrorConfig ICommand
this command command public I Command get Command return command  ICommand getCommand
private Selection Listener button Listener new Selection Adapter public void widget Selected Selection Event e handle Button Pressed Button e widget  SelectionListener buttonListener SelectionAdapter widgetSelected SelectionEvent handleButtonPressed
Display get Default async Exec new Runnable public void run Table Item items viewer get Table get Items for int i 0 i items length i Table Item item items i Object data item get Data if data old Config Found the moved From config in the tree Replace it with the new config item set Data configuration viewer update configuration null break Also replace the moved From config in the list of newly created configs if new Config List remove old Config new Config List add configuration  getDefault asyncExec TableItem getTable getItems TableItem getData oldConfig movedFrom setData movedFrom newConfigList oldConfig newConfigList
private I Launch Configuration Listener configuration Listener new I Launch Configuration Listener A launch configuration has been added If this config has been moved From a configuration in the tree replace the old config with the new public void launch Configuration Added final I Launch Configuration configuration I Launch Manager manager Debug Plugin get Default get Launch Manager final I Launch Configuration old Config manager get Moved From configuration if old Config null return Display get Default async Exec new Runnable public void run Table Item items viewer get Table get Items for int i 0 i items length i Table Item item items i Object data item get Data if data old Config Found the moved From config in the tree Replace it with the new config item set Data configuration viewer update configuration null break Also replace the moved From config in the list of newly created configs if new Config List remove old Config new Config List add configuration  ILaunchConfigurationListener configurationListener ILaunchConfigurationListener movedFrom launchConfigurationAdded ILaunchConfiguration ILaunchManager DebugPlugin getDefault getLaunchManager ILaunchConfiguration oldConfig getMovedFrom oldConfig getDefault asyncExec TableItem getTable getItems TableItem getData oldConfig movedFrom setData movedFrom newConfigList oldConfig newConfigList
public void launch Configuration Changed I Launch Configuration configuration  launchConfigurationChanged ILaunchConfiguration
public void launch Configuration Changed I Launch Configuration configuration public void launch Configuration Removed I Launch Configuration configuration  launchConfigurationChanged ILaunchConfiguration launchConfigurationRemoved ILaunchConfiguration
Creates an initialized property page public Builder Property Page super no Default And Apply Button  BuilderPropertyPage noDefaultAndApplyButton
Add the project s build to the table viewer private void add Builders To Table I Project project get Input Project if project null return add build spec entries to the table I Command commands null try commands project get Description get Build Spec catch Core Exception e handle Exception e boolean project Needs Migration false for int i 0 i commands length i String version new String NON NLS 1 I Launch Configuration config Builder Utils config From Build Command Args project commands i get Arguments version if Builder Utils VERSION 2 1 equals version 0 NON NLS 1 Storing the project file of a project with 2 1 configs will edit the file in a way that isn t backwards compatible project Needs Migration true Object element null if config null if config is Working Copy config exists I Status status new Status I Status ERROR I External Tool Constants PLUGIN ID 0 Message Format format External ToolsUI Messages get String Builder Property Page Exists new String config get Location toOS String null NON NLS 1 Error Dialog open Error get Shell External ToolsUI Messages get String Builder Property Page error Title NON NLS 1 Message Format format External ToolsUI Messages get String Builder Property Page External Tool Builder  0  Not Added 2 new String config get Name NON NLS 1 status user Has Made Changes true else element config else String builderID commands i get Builder Name if builderID equals External Tool Builder ID commands i get Arguments get Builder Utils LAUNCH CONFIG HANDLE null An invalid external tool entry element new Error Config commands i else element commands i if element null viewer add element viewer set Checked element is Enabled element if project Needs Migration I Preference Store store External Tools Plugin get Default get Preference Store boolean prompt store get Boolean I Preference Constants PROMPT FOR PROJECT MIGRATION boolean proceed true if prompt Message Dialog With Toggle dialog Message Dialog With Toggle open Yes No Question get Shell External ToolsUI Messages get String Builder Property Page 0 External ToolsUI Messages get String Builder Property Page 1 External ToolsUI Messages get String Builder Property Page 2 false null null NON NLS 1 NON NLS 2 NON NLS 3 proceed dialog get Return Code I Dialog Constants YES ID store set Value I Preference Constants PROMPT FOR PROJECT MIGRATION dialog get Toggle State if proceed Open the page read only viewer get Table set Enabled false down Button set Enabled false edit Button set Enabled false import Button set Enabled false new Button set Enabled false remove Button set Enabled false  addBuildersToTable IProject getInputProject ICommand getDescription getBuildSpec CoreException handleException projectNeedsMigration ILaunchConfiguration BuilderUtils configFromBuildCommandArgs getArguments BuilderUtils VERSION_2_1 projectNeedsMigration isWorkingCopy IStatus IStatus IExternalToolConstants PLUGIN_ID MessageFormat ExternalToolsUIMessages getString BuilderPropertyPage getLocation toOSString ErrorDialog openError getShell ExternalToolsUIMessages getString BuilderPropertyPage errorTitle MessageFormat ExternalToolsUIMessages getString BuilderPropertyPage External_Tool_Builder_ _Not_Added_2 getName userHasMadeChanges getBuilderName ExternalToolBuilder getArguments BuilderUtils LAUNCH_CONFIG_HANDLE ErrorConfig setChecked isEnabled projectNeedsMigration IPreferenceStore ExternalToolsPlugin getDefault getPreferenceStore getBoolean IPreferenceConstants PROMPT_FOR_PROJECT_MIGRATION MessageDialogWithToggle MessageDialogWithToggle openYesNoQuestion getShell ExternalToolsUIMessages getString BuilderPropertyPage ExternalToolsUIMessages getString BuilderPropertyPage ExternalToolsUIMessages getString BuilderPropertyPage getReturnCode IDialogConstants YES_ID setValue IPreferenceConstants PROMPT_FOR_PROJECT_MIGRATION getToggleState getTable setEnabled downButton setEnabled editButton setEnabled importButton setEnabled newButton setEnabled removeButton setEnabled
Creates and returns a button with the given label id and enablement private Button create Button Composite parent String label Button button new Button parent SWT PUSH Grid Data data new Grid Data data width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT button set Layout Data data button set Font parent get Font button set Text label button set Enabled false button add Selection Listener button Listener return button  createButton GridData GridData widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT setLayoutData setFont getFont setText setEnabled addSelectionListener buttonListener
builder Table set Font font builder Table add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Table Selection Changed  builderTable setFont builderTable addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleTableSelectionChanged
builder Table add Listener SWT Mouse Double Click new Listener public void handle Event Event event handle Edit Button Pressed  builderTable addListener MouseDoubleClick handleEvent handleEditButtonPressed
protected Control create Contents Composite parent Workbench Help set Help parent I External Tools Help Context Ids EXTERNAL TOOLS BUILDER PROPERTY PAGE Font font parent get Font Composite top Level new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 top Level set Layout layout top Level set Layout Data new Grid Data Grid Data FILL BOTH Label description new Label top Level SWT WRAP description set Text External ToolsUI Messages get String Builder Property Page description NON NLS 1 description set Layout Data new Grid Data Grid Data FILL HORIZONTAL description set Font font Composite table And Buttons new Composite top Level SWT NONE table And Buttons set Layout Data new Grid Data Grid Data FILL BOTH layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 2 table And Buttons set Layout layout table of builders and tools viewer Checkbox Table Viewer new Check List table And Buttons SWT MULTI SWT H SCROLL SWT V SCROLL SWT FULL SELECTION SWT BORDER viewer set Label Provider label Provider viewer add Check State Listener this Table builder Table viewer get Table builder Table set Layout Data new Grid Data Grid Data FILL BOTH builder Table set Font font builder Table add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Table Selection Changed builder Table add Listener SWT Mouse Double Click new Listener public void handle Event Event event handle Edit Button Pressed button area Composite button Area new Composite table And Buttons SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 button Area set Layout layout button Area set Font font button Area set Layout Data new Grid Data Grid Data FILL VERTICAL new Button create Button button Area External ToolsUI Messages get String Builder Property Page new Button NON NLS 1 import Button create Button button Area External ToolsUI Messages get String Builder Property Page Import  3 NON NLS 1 edit Button create Button button Area External ToolsUI Messages get String Builder Property Page edit Button NON NLS 1 remove Button create Button button Area External ToolsUI Messages get String Builder Property Page remove Button NON NLS 1 new Label button Area SWT LEFT up Button create Button button Area External ToolsUI Messages get String Builder Property Page up Button NON NLS 1 down Button create Button button Area External ToolsUI Messages get String Builder Property Page down Button NON NLS 1 new Button set Enabled true import Button set Enabled true populate widget contents add Builders To Table return top Level  createContents WorkbenchHelp setHelp IExternalToolsHelpContextIds EXTERNAL_TOOLS_BUILDER_PROPERTY_PAGE getFont topLevel GridLayout GridLayout marginHeight marginWidth topLevel setLayout topLevel setLayoutData GridData GridData FILL_BOTH topLevel setText ExternalToolsUIMessages getString BuilderPropertyPage setLayoutData GridData GridData FILL_HORIZONTAL setFont tableAndButtons topLevel tableAndButtons setLayoutData GridData GridData FILL_BOTH GridLayout marginHeight marginWidth numColumns tableAndButtons setLayout CheckboxTableViewer newCheckList tableAndButtons H_SCROLL V_SCROLL FULL_SELECTION setLabelProvider labelProvider addCheckStateListener builderTable getTable builderTable setLayoutData GridData GridData FILL_BOTH builderTable setFont builderTable addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleTableSelectionChanged builderTable addListener MouseDoubleClick handleEvent handleEditButtonPressed buttonArea tableAndButtons GridLayout marginHeight marginWidth buttonArea setLayout buttonArea setFont buttonArea setLayoutData GridData GridData FILL_VERTICAL newButton createButton buttonArea ExternalToolsUIMessages getString BuilderPropertyPage newButton importButton createButton buttonArea ExternalToolsUIMessages getString BuilderPropertyPage _3 editButton createButton buttonArea ExternalToolsUIMessages getString BuilderPropertyPage editButton removeButton createButton buttonArea ExternalToolsUIMessages getString BuilderPropertyPage removeButton buttonArea upButton createButton buttonArea ExternalToolsUIMessages getString BuilderPropertyPage upButton downButton createButton buttonArea ExternalToolsUIMessages getString BuilderPropertyPage downButton newButton setEnabled importButton setEnabled addBuildersToTable topLevel
Turns autobuilding on or off in the workspace private void set Autobuild boolean new State throws Core Exception I Workspace workspace Resources Plugin get Workspace I Workspace Description ws Description workspace get Description boolean old State ws Description is Auto Building if old State new State ws Description set Auto Building new State workspace set Description ws Description  setAutobuild newState CoreException IWorkspace ResourcesPlugin getWorkspace IWorkspaceDescription wsDescription getDescription oldState wsDescription isAutoBuilding oldState newState wsDescription setAutoBuilding newState setDescription wsDescription
Returns the project that is the input for this property page or code null code private I Project get Input Project I Adaptable element get Element if element instanceof I Project return I Project element Object resource element get Adapter I Resource class if resource instanceof I Project return I Project resource return null  IProject getInputProject IAdaptable getElement IProject IProject getAdapter IResource IProject IProject
One of the buttons has been pressed act accordingly private void handle Button Pressed Button button if button new Button handle New Button Pressed else if button import Button handle Import Button Pressed else if button edit Button handle Edit Button Pressed else if button remove Button handle Remove Button Pressed else if button up Button move Selection Up else if button down Button move Selection Down handle Table Selection Changed viewer get Table set Focus  handleButtonPressed newButton handleNewButtonPressed importButton handleImportButtonPressed editButton handleEditButtonPressed removeButton handleRemoveButtonPressed upButton moveSelectionUp downButton moveSelectionDown handleTableSelectionChanged getTable setFocus
public void check State Changed Check State Changed Event event Object element event get Element if element instanceof I Launch Configuration enable Launch Configuration I Launch Configuration element event get Checked else if element instanceof I Command enable Command I Command element event get Checked  checkStateChanged CheckStateChangedEvent getElement ILaunchConfiguration enableLaunchConfiguration ILaunchConfiguration getChecked ICommand enableCommand ICommand getChecked
private void enable Launch Configuration I Launch Configuration configuration boolean enable I Launch Configuration Working Copy working Copy null try if configuration instanceof I Launch Configuration Working Copy working Copy I Launch Configuration Working Copy configuration else Replace the config with a working copy Table Item items viewer get Table get Items for int i 0 i items length i Table Item item items i if item get Data configuration working Copy configuration get Working Copy item set Data working Copy if working Copy null working Copy set Attribute I External Tool Constants ATTR BUILDER ENABLED enable catch Core Exception e return user Has Made Changes true  enableLaunchConfiguration ILaunchConfiguration ILaunchConfigurationWorkingCopy workingCopy ILaunchConfigurationWorkingCopy workingCopy ILaunchConfigurationWorkingCopy TableItem getTable getItems TableItem getData workingCopy getWorkingCopy setData workingCopy workingCopy workingCopy setAttribute IExternalToolConstants ATTR_BUILDER_ENABLED CoreException userHasMadeChanges
private void enable Command I Command command boolean enable Map args command get Arguments if args null args new Hash Map 1 args put COMMAND ENABLED Boolean value Of enable command set Arguments args user Has Made Changes true  enableCommand ICommand getArguments HashMap COMMAND_ENABLED valueOf setArguments userHasMadeChanges
The user has pressed the import button Prompt them to select a configuration to import from the workspace private void handle Import Button Pressed I Launch Manager manager Debug Plugin get Default get Launch Manager List tool Types get Configuration Types I External Tool Constants ID EXTERNAL TOOLS LAUNCH CATEGORY List configurations new Array List Iterator iter tool Types iterator while iter has Next try I Launch Configuration configs manager get Launch Configurations I Launch Configuration Type iter next for int i 0 i configs length i configurations add configs i catch Core Exception e Element List Selection Dialog dialog new Element List Selection Dialog get Shell new Builder Label Provider dialog set Title External ToolsUI Messages get String Builder Property Page 4 NON NLS 1 dialog set Message External ToolsUI Messages get String Builder Property Page 5 NON NLS 1 dialog set Elements configurations to Array if dialog open Window CANCEL return Object results dialog get Result if results length 0 OK pressed with nothing selected return I Launch Configuration config I Launch Configuration results 0 I Launch Configuration new Config null boolean was Autobuilding Resources Plugin get Workspace get Description is Auto Building try set Autobuild false new Config Builder Utils duplicate Configuration get Input Project config catch Core Exception e handle Exception e finally try set Autobuild was Autobuilding catch Core Exception e handle Exception e if new Config null user Has Made Changes true viewer add new Config viewer set Checked new Config is Enabled new Config new Config List add new Config  handleImportButtonPressed ILaunchManager DebugPlugin getDefault getLaunchManager toolTypes getConfigurationTypes IExternalToolConstants ID_EXTERNAL_TOOLS_LAUNCH_CATEGORY ArrayList toolTypes hasNext ILaunchConfiguration getLaunchConfigurations ILaunchConfigurationType CoreException ElementListSelectionDialog ElementListSelectionDialog getShell BuilderLabelProvider setTitle ExternalToolsUIMessages getString BuilderPropertyPage setMessage ExternalToolsUIMessages getString BuilderPropertyPage setElements toArray getResult ILaunchConfiguration ILaunchConfiguration ILaunchConfiguration newConfig wasAutobuilding ResourcesPlugin getWorkspace getDescription isAutoBuilding setAutobuild newConfig BuilderUtils duplicateConfiguration getInputProject CoreException handleException setAutobuild wasAutobuilding CoreException handleException newConfig userHasMadeChanges newConfig setChecked newConfig isEnabled newConfig newConfigList newConfig
The user has pressed the remove button Delete the selected builder private void handle Remove Button Pressed I Structured Selection selection I Structured Selection viewer get Selection if selection null int num Selected selection size if configs To Be Deleted null configs To Be Deleted new Array List num Selected user Has Made Changes true Iterator iterator selection iterator while iterator has Next Object item iterator next if item instanceof I Launch Configuration configs To Be Deleted add item viewer remove item else if item instanceof Error Config viewer remove item  handleRemoveButtonPressed IStructuredSelection IStructuredSelection getSelection numSelected configsToBeDeleted configsToBeDeleted ArrayList numSelected userHasMadeChanges hasNext ILaunchConfiguration configsToBeDeleted ErrorConfig
The user has pressed the new button Create a new configuration and open the launch configuration edit dialog on the new config private void handle New Button Pressed I Launch Configuration Type type prompt For Configuration Type if type null return boolean was Autobuilding Resources Plugin get Workspace get Description is Auto Building try I Launch Configuration Working Copy working Copy null String name Debug Plugin get Default get Launch Manager generate Unique Launch Configuration Name From External ToolsUI Messages get String Builder Property Page New Builder 7 NON NLS 1 working Copy type new Instance Builder Utils get Builder Folder get Input Project true name String Buffer buffer new String Buffer I External Tool Constants BUILD TYPE FULL buffer append buffer append I External Tool Constants BUILD TYPE INCREMENTAL buffer append working Copy set Attribute I External Tool Constants ATTR RUN BUILD KINDS buffer to String working Copy set Attribute External Tools Main Tab FIRST EDIT true I Launch Configuration config null set Autobuild false config working Copy do Save needs to be added here in case the user hits apply in the edit dialog then we can correctly update the list with the new config new Config List add config int code edit Configuration config if code Window CANCEL If the user cancelled delete the newly created config new Config List remove config config delete else user Has Made Changes true retrieve the last new config may have been changed by the user pressing apply in the edit dialog config I Launch Configuration new Config List get new Config List size 1 viewer add config viewer set Checked config is Enabled config catch Core Exception e handle Exception e finally try set Autobuild was Autobuilding catch Core Exception e handle Exception e  handleNewButtonPressed ILaunchConfigurationType promptForConfigurationType wasAutobuilding ResourcesPlugin getWorkspace getDescription isAutoBuilding ILaunchConfigurationWorkingCopy workingCopy DebugPlugin getDefault getLaunchManager generateUniqueLaunchConfigurationNameFrom ExternalToolsUIMessages getString BuilderPropertyPage New_Builder_7 workingCopy newInstance BuilderUtils getBuilderFolder getInputProject StringBuffer StringBuffer IExternalToolConstants BUILD_TYPE_FULL IExternalToolConstants BUILD_TYPE_INCREMENTAL workingCopy setAttribute IExternalToolConstants ATTR_RUN_BUILD_KINDS toString workingCopy setAttribute ExternalToolsMainTab FIRST_EDIT ILaunchConfiguration setAutobuild workingCopy doSave newConfigList editConfiguration newConfigList userHasMadeChanges ILaunchConfiguration newConfigList newConfigList setChecked isEnabled CoreException handleException setAutobuild wasAutobuilding CoreException handleException
Prompts the user to edit the given launch configuration Returns the return code from opening the launch configuration dialog private int edit Configuration I Launch Configuration config I Launch Manager manager Debug Plugin get Default get Launch Manager manager add Launch Configuration Listener configuration Listener int code DebugUI Tools open Launch Configuration Properties Dialog get Shell config I External Tool Constants ID EXTERNAL TOOLS BUILDER LAUNCH GROUP manager remove Launch Configuration Listener configuration Listener return code  editConfiguration ILaunchConfiguration ILaunchManager DebugPlugin getDefault getLaunchManager addLaunchConfigurationListener configurationListener DebugUITools openLaunchConfigurationPropertiesDialog getShell IExternalToolConstants ID_EXTERNAL_TOOLS_BUILDER_LAUNCH_GROUP removeLaunchConfigurationListener configurationListener
Prompts the user to choose a launch configuration type to create and returns the type the user selected or code null code if the user cancelled return the configuration type selected by the user or code null code if the user cancelled private I Launch Configuration Type prompt For Configuration Type List external Tool Types get Configuration Types I External Tool Constants ID EXTERNAL TOOLS BUILDER LAUNCH CATEGORY Element List Selection Dialog dialog new Element List Selection Dialog get Shell new Builder Label Provider dialog set Elements external Tool Types to Array dialog set Multiple Selection false dialog set Title External ToolsUI Messages get String Builder Property Page Choose configuration type 8 NON NLS 1 dialog set Message External ToolsUI Messages get String Builder Property Page Choose an external tool type to create 9 NON NLS 1 dialog open Object result dialog get Result if result null result length 0 return null return I Launch Configuration Type result 0  ILaunchConfigurationType promptForConfigurationType externalToolTypes getConfigurationTypes IExternalToolConstants ID_EXTERNAL_TOOLS_BUILDER_LAUNCH_CATEGORY ElementListSelectionDialog ElementListSelectionDialog getShell BuilderLabelProvider setElements externalToolTypes toArray setMultipleSelection setTitle ExternalToolsUIMessages getString BuilderPropertyPage Choose_configuration_type_8 setMessage ExternalToolsUIMessages getString BuilderPropertyPage Choose_an_external_tool_type_to_create_9 getResult ILaunchConfigurationType
Returns the launch configuration types of the given category private List get Configuration Types String category I Launch Configuration Type types Debug Plugin get Default get Launch Manager get Launch Configuration Types List external Tool Types new Array List for int i 0 i types length i I Launch Configuration Type configuration Type types i if category equals configuration Type get Category external Tool Types add configuration Type return external Tool Types  getConfigurationTypes ILaunchConfigurationType DebugPlugin getDefault getLaunchManager getLaunchConfigurationTypes externalToolTypes ArrayList ILaunchConfigurationType configurationType configurationType getCategory externalToolTypes configurationType externalToolTypes
The user has pressed the edit button Open the launch configuration edit dialog on the selection after migrating the tool if necessary private void handle Edit Button Pressed Table Item selection viewer get Table get Selection 0 if selection null Object data selection get Data if data instanceof I Launch Configuration I Launch Configuration config I Launch Configuration data if Builder Utils is Unmigrated Config config if should Proceed With Migration return try config Builder Utils migrate Builder Configuration get Input Project I Launch Configuration Working Copy config catch Core Exception e handle Exception e return Replace the working copy in the table with the migrated configuration selection set Data config user Has Made Changes true boolean was Autobuilding Resources Plugin get Workspace get Description is Auto Building try set Autobuild false edit Configuration config catch Core Exception e handle Exception e finally try set Autobuild was Autobuilding catch Core Exception e handle Exception e  handleEditButtonPressed TableItem getTable getSelection getData ILaunchConfiguration ILaunchConfiguration ILaunchConfiguration BuilderUtils isUnmigratedConfig shouldProceedWithMigration BuilderUtils migrateBuilderConfiguration getInputProject ILaunchConfigurationWorkingCopy CoreException handleException setData userHasMadeChanges wasAutobuilding ResourcesPlugin getWorkspace getDescription isAutoBuilding setAutobuild editConfiguration CoreException handleException setAutobuild wasAutobuilding CoreException handleException
Prompts the user to proceed with the migration of a project builder from the old format to the new launch configuration based format and returns whether or not the user wishes to proceed with the migration return boolean whether or not the user wishes to proceed with migration private boolean should Proceed With Migration if External Tools Plugin get Default get Preference Store get Boolean I Preference Constants PROMPT FOR TOOL MIGRATION User has asked not to be prompted return true Warn the user that editing an old config will cause storage migration Message Dialog With Toggle dialog Message Dialog With Toggle open Yes No Question get Shell External ToolsUI Messages get String Builder Property Page Migrate project builder 10 NON NLS 1 External ToolsUI Messages get String Builder Property Page Not Support NON NLS 1 External ToolsUI Messages get String Builder Property Page Prompt NON NLS 1 false External Tools Plugin get Default get Preference Store I Preference Constants PROMPT FOR TOOL MIGRATION return dialog get Return Code I Dialog Constants YES ID  shouldProceedWithMigration ExternalToolsPlugin getDefault getPreferenceStore getBoolean IPreferenceConstants PROMPT_FOR_TOOL_MIGRATION MessageDialogWithToggle MessageDialogWithToggle openYesNoQuestion getShell ExternalToolsUIMessages getString BuilderPropertyPage Migrate_project_builder_10 ExternalToolsUIMessages getString BuilderPropertyPage Not_Support ExternalToolsUIMessages getString BuilderPropertyPage ExternalToolsPlugin getDefault getPreferenceStore IPreferenceConstants PROMPT_FOR_TOOL_MIGRATION getReturnCode IDialogConstants YES_ID
Handles unexpected internal exceptions private void handle Exception Exception e I Status status if e instanceof Core Exception status Core Exception e get Status else status new Status I Status ERROR I External Tool Constants PLUGIN ID 0 External ToolsUI Messages get String Builder Property Page status Message e NON NLS 1 Error Dialog open Error get Shell External ToolsUI Messages get String Builder Property Page error Title NON NLS 1 External ToolsUI Messages get String Builder Property Page error Message NON NLS 1 status  handleException IStatus CoreException CoreException getStatus IStatus IExternalToolConstants PLUGIN_ID ExternalToolsUIMessages getString BuilderPropertyPage statusMessage ErrorDialog openError getShell ExternalToolsUIMessages getString BuilderPropertyPage errorTitle ExternalToolsUIMessages getString BuilderPropertyPage errorMessage
The user has selected a different builder in table Update button enablement private void handle Table Selection Changed new Button set Enabled true Table builder Table viewer get Table Table Item items builder Table get Selection boolean valid Selection items null items length 0 boolean enable Edit valid Selection boolean enable Remove valid Selection boolean enable Up valid Selection boolean enable Down valid Selection if valid Selection if items length 1 enable Edit false int indices builder Table get Selection Indices int max builder Table get Item Count enable Up indices 0 0 enable Down indices indices length 1 max 1 for int i 0 i items length i Table Item item items i Object data item get Data if data instanceof I Launch Configuration I Launch Configuration config I Launch Configuration data String builder Name null try builder Name config get Attribute I External Tool Constants ATTR DISABLED BUILDER String null catch Core Exception e if builder Name null do not allow wrapped builders to be removed or edited enable Edit false enable Remove false else enable Edit false if data instanceof Error Config continue enable Remove false break edit Button set Enabled enable Edit remove Button set Enabled enable Remove up Button set Enabled enable Up down Button set Enabled enable Down  handleTableSelectionChanged newButton setEnabled builderTable getTable TableItem builderTable getSelection validSelection enableEdit validSelection enableRemove validSelection enableUp validSelection enableDown validSelection validSelection enableEdit builderTable getSelectionIndices builderTable getItemCount enableUp enableDown TableItem getData ILaunchConfiguration ILaunchConfiguration ILaunchConfiguration builderName builderName getAttribute IExternalToolConstants ATTR_DISABLED_BUILDER CoreException builderName enableEdit enableRemove enableEdit ErrorConfig enableRemove editButton setEnabled enableEdit removeButton setEnabled enableRemove upButton setEnabled enableUp downButton setEnabled enableDown
Returns whether the given element command or launch config is enabled param element the element return whether the given element is enabled private boolean is Enabled Object element if element instanceof I Command Boolean enabled Boolean I Command element get Arguments get COMMAND ENABLED if enabled null return enabled boolean Value else if element instanceof I Launch Configuration try return External Tools Util is Builder Enabled I Launch Configuration element catch Core Exception e else if element instanceof Error Config return false return true  isEnabled ICommand ICommand getArguments COMMAND_ENABLED booleanValue ILaunchConfiguration ExternalToolsUtil isBuilderEnabled ILaunchConfiguration CoreException ErrorConfig
Moves an entry in the builder table to the given index private void move Table Item item int index user Has Made Changes true Object data item get Data item dispose viewer insert data index viewer set Checked data is Enabled data  TableItem userHasMadeChanges getData setChecked isEnabled
Move the current selection in the build list down private void move Selection Down Table builder Table viewer get Table int indices builder Table get Selection Indices if indices length 1 return int new Selection new int indices length int max builder Table get Item Count 1 for int i indices length 1 i 0 i int index indices i if index max move builder Table get Item index index 1 new Selection i index 1 builder Table set Selection new Selection  moveSelectionDown builderTable getTable builderTable getSelectionIndices newSelection builderTable getItemCount builderTable getItem newSelection builderTable setSelection newSelection
Move the current selection in the build list up private void move Selection Up Table builder Table viewer get Table int indices builder Table get Selection Indices int new Selection new int indices length for int i 0 i indices length i int index indices i if index 0 move builder Table get Item index index 1 new Selection i index 1 builder Table set Selection new Selection  moveSelectionUp builderTable getTable builderTable getSelectionIndices newSelection builderTable getItem newSelection builderTable setSelection newSelection
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception do Perform Ok monitor item Data if monitor is Canceled throw new Interrupted Exception  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException doPerformOk itemData isCanceled InterruptedException
public boolean perform Ok if user Has Made Changes return super perform Ok user Has Made Changes false Table builder Table viewer get Table int num Commands builder Table get Item Count final Object item Data new Object num Commands for int i 0 i num Commands i item Data i builder Table get Item i get Data I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception do Perform Ok monitor item Data if monitor is Canceled throw new Interrupted Exception I Progress Service service PlatformUI get Workbench get Progress Service try service busy Cursor While runnable catch Invocation Target Exception e return false catch Interrupted Exception e return false return super perform Ok  performOk userHasMadeChanges performOk userHasMadeChanges builderTable getTable numCommands builderTable getItemCount itemData numCommands numCommands itemData builderTable getItem getData IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException doPerformOk itemData isCanceled InterruptedException IProgressService getWorkbench getProgressService busyCursorWhile InvocationTargetException InterruptedException performOk
private void do Perform Ok I Progress Monitor monitor Object item Data if monitor is Canceled return I Project project get Input Project get all the build commands int num Commands item Data length monitor begin Task External ToolsUI Messages get String Builder Property Page 3 num Commands 1 NON NLS 1 I Command commands new I Command num Commands for int i 0 i num Commands i Object data item Data i if data instanceof I Command I Command command I Command data Map args command get Arguments Boolean enabled Boolean args get COMMAND ENABLED if enabled null enabled equals Boolean FALSE I Launch Configuration config disable Command command if config null data Builder Utils command From Launch Config project config else args remove COMMAND ENABLED command set Arguments args else if data instanceof I Launch Configuration I Launch Configuration config I Launch Configuration data String disabled Builder Name try disabled Builder Name config get Attribute I External Tool Constants ATTR DISABLED BUILDER String null if disabled Builder Name null External Tools Util is Builder Enabled config commands i translate Back To Command config project continue catch Core Exception e1 if Builder Utils is Unmigrated Config config config instanceof I Launch Configuration Working Copy I Launch Configuration Working Copy working Copy I Launch Configuration Working Copy config Save any changes to the config such as enable disable if working Copy is Dirty try working Copy do Save catch Core Exception e Message Dialog open Error get Shell External ToolsUI Messages get String Builder Property Page 39 Message Format format External ToolsUI Messages get String Builder Property Page 40 new String working Copy get Name NON NLS 1 NON NLS 2 data Builder Utils command From Launch Config project config else if data instanceof Error Config data Error Config data get Command if data null commands i I Command data monitor worked 1 if check Commands For Change commands set the build spec try I Project Description desc project get Description desc set Build Spec commands project set Description desc I Resource FORCE monitor catch Core Exception e handle Exception e if configs To Be Deleted null delete Configurations monitor done  doPerformOk IProgressMonitor itemData isCanceled IProject getInputProject numCommands itemData beginTask ExternalToolsUIMessages getString BuilderPropertyPage numCommands ICommand ICommand numCommands numCommands itemData ICommand ICommand ICommand getArguments COMMAND_ENABLED ILaunchConfiguration disableCommand BuilderUtils commandFromLaunchConfig COMMAND_ENABLED setArguments ILaunchConfiguration ILaunchConfiguration ILaunchConfiguration disabledBuilderName disabledBuilderName getAttribute IExternalToolConstants ATTR_DISABLED_BUILDER disabledBuilderName ExternalToolsUtil isBuilderEnabled translateBackToCommand CoreException BuilderUtils isUnmigratedConfig ILaunchConfigurationWorkingCopy ILaunchConfigurationWorkingCopy workingCopy ILaunchConfigurationWorkingCopy workingCopy isDirty workingCopy doSave CoreException MessageDialog openError getShell ExternalToolsUIMessages getString BuilderPropertyPage MessageFormat ExternalToolsUIMessages getString BuilderPropertyPage workingCopy getName BuilderUtils commandFromLaunchConfig ErrorConfig ErrorConfig getCommand ICommand checkCommandsForChange IProjectDescription getDescription setBuildSpec setDescription IResource CoreException handleException configsToBeDeleted deleteConfigurations
A non external tool builder builder was disabled It has been re enabled Translate the disabled external tool builder launch configuration wrapper back into the full fledged builder command private I Command translate Back To Command I Launch Configuration config I Project project try I Command new Command project get Description new Command String builder Name config get Attribute I External Tool Constants ATTR DISABLED BUILDER String null Map args config get Attribute I External Tool Constants ATTR TOOL ARGUMENTS new Hash Map 0 new Command set Builder Name builder Name new Command set Arguments args if configs To Be Deleted null configs To Be Deleted new Array List configs To Be Deleted add config return new Command catch Core Exception exception Message Dialog open Error get Shell External ToolsUI Messages get String Builder Property Page 13 External ToolsUI Messages get String Builder Property Page error NON NLS 1 NON NLS 2 return null  ICommand translateBackToCommand ILaunchConfiguration IProject ICommand newCommand getDescription newCommand builderName getAttribute IExternalToolConstants ATTR_DISABLED_BUILDER getAttribute IExternalToolConstants ATTR_TOOL_ARGUMENTS HashMap newCommand setBuilderName builderName newCommand setArguments configsToBeDeleted configsToBeDeleted ArrayList configsToBeDeleted newCommand CoreException MessageDialog openError getShell ExternalToolsUIMessages getString BuilderPropertyPage ExternalToolsUIMessages getString BuilderPropertyPage
Disables a builder by wrappering the builder command as a disabled external tool builder The details of the command is persisted in the launch configuration private I Launch Configuration disable Command I Command command Map arguments command get Arguments if arguments null arguments remove COMMAND ENABLED List external Tool Types get Configuration Types I External Tool Constants ID EXTERNAL TOOLS BUILDER LAUNCH CATEGORY if external Tool Types size 0 return null I Launch Configuration Type type I Launch Configuration Type external Tool Types get 0 if type null return null boolean was Autobuilding Resources Plugin get Workspace get Description is Auto Building try I Launch Configuration Working Copy working Copy null String builder Name command get Builder Name String name Debug Plugin get Default get Launch Manager generate Unique Launch Configuration Name From builder Name working Copy type new Instance Builder Utils get Builder Folder get Input Project true name working Copy set Attribute I External Tool Constants ATTR DISABLED BUILDER builder Name if arguments null working Copy set Attribute I External Tool Constants ATTR TOOL ARGUMENTS arguments working Copy set Attribute I External Tool Constants ATTR BUILDER ENABLED false I Launch Configuration config null set Autobuild false config working Copy do Save return config catch Core Exception e handle Exception e finally try set Autobuild was Autobuilding catch Core Exception e handle Exception e return null  ILaunchConfiguration disableCommand ICommand getArguments COMMAND_ENABLED externalToolTypes getConfigurationTypes IExternalToolConstants ID_EXTERNAL_TOOLS_BUILDER_LAUNCH_CATEGORY externalToolTypes ILaunchConfigurationType ILaunchConfigurationType externalToolTypes wasAutobuilding ResourcesPlugin getWorkspace getDescription isAutoBuilding ILaunchConfigurationWorkingCopy workingCopy builderName getBuilderName DebugPlugin getDefault getLaunchManager generateUniqueLaunchConfigurationNameFrom builderName workingCopy newInstance BuilderUtils getBuilderFolder getInputProject workingCopy setAttribute IExternalToolConstants ATTR_DISABLED_BUILDER builderName workingCopy setAttribute IExternalToolConstants ATTR_TOOL_ARGUMENTS workingCopy setAttribute IExternalToolConstants ATTR_BUILDER_ENABLED ILaunchConfiguration setAutobuild workingCopy doSave CoreException handleException setAutobuild wasAutobuilding CoreException handleException
private void delete Configurations boolean was Autobuilding Resources Plugin get Workspace get Description is Auto Building try set Autobuild false Iterator itr configs To Be Deleted iterator while itr has Next I Launch Configuration element I Launch Configuration itr next element delete catch Core Exception e handle Exception e finally try set Autobuild was Autobuilding catch Core Exception e handle Exception e  deleteConfigurations wasAutobuilding ResourcesPlugin getWorkspace getDescription isAutoBuilding setAutobuild configsToBeDeleted hasNext ILaunchConfiguration ILaunchConfiguration CoreException handleException setAutobuild wasAutobuilding CoreException handleException
Returns whether any of the commands have changed private boolean check Commands For Change I Command new Commands try I Command old Commands get Input Project get Description get Build Spec if old Commands length new Commands length return true Ignore White Space Comparator comparator new Ignore White Space Comparator for int i 0 i old Commands length i I Command old Command old Commands i I Command new Command new Commands i String old Name old Command get Builder Name String new Name new Command get Builder Name if old Name null new Name null return true if old Name null old Name equals new Name return true Map old Args old Command get Arguments Map new Args new Command get Arguments if old Args null new Args null return true if old Args null new Args null continue if old Args size new Args size return true Iterator key Set old Args key Set iterator while key Set has Next Object key key Set next Object old Arg old Args get key Object new Arg new Args get key if old Arg instanceof String new Arg instanceof String if comparator compare old Arg new Arg 0 return true else if old Arg equals new Arg return true catch Core Exception ce return true return false  checkCommandsForChange ICommand newCommands ICommand oldCommands getInputProject getDescription getBuildSpec oldCommands newCommands IgnoreWhiteSpaceComparator IgnoreWhiteSpaceComparator oldCommands ICommand oldCommand oldCommands ICommand newCommand newCommands oldName oldCommand getBuilderName newName newCommand getBuilderName oldName newName oldName oldName newName oldArgs oldCommand getArguments newArgs newCommand getArguments oldArgs newArgs oldArgs newArgs oldArgs newArgs keySet oldArgs keySet keySet hasNext keySet oldArg oldArgs newArg newArgs oldArg newArg oldArg newArg oldArg newArg CoreException
public boolean perform Cancel Iterator iter new Config List iterator while iter has Next try I Launch Configuration iter next delete catch Core Exception e handle Exception e try I Folder builder Folder Builder Utils get Builder Folder get Input Project false if builder Folder null builder Folder exists builder Folder members length 0 All files in the builder folder were newly created Clean up builder Folder delete true false null catch Core Exception e handle Exception e remove the local marking of the enabled state of the commands Table builder Table viewer get Table int num Commands builder Table get Item Count for int i 0 i num Commands i Object data builder Table get Item i get Data if data instanceof I Command I Command command I Command data Map args command get Arguments args remove COMMAND ENABLED command set Arguments args return super perform Cancel  performCancel newConfigList hasNext ILaunchConfiguration CoreException handleException IFolder builderFolder BuilderUtils getBuilderFolder getInputProject builderFolder builderFolder builderFolder builderFolder CoreException handleException builderTable getTable numCommands builderTable getItemCount numCommands builderTable getItem getData ICommand ICommand ICommand getArguments COMMAND_ENABLED setArguments performCancel

private Button prompt For Project Migration Button public External Tools Preference Page set Preference Store External Tools Plugin get Default get Preference Store set Description External ToolsUI Messages get String External Tools Preference Page External tool project builders migration 2 NON NLS 1  promptForProjectMigrationButton ExternalToolsPreferencePage setPreferenceStore ExternalToolsPlugin getDefault getPreferenceStore setDescription ExternalToolsUIMessages getString ExternalToolsPreferencePage External_tool_project_builders_migration_2
see org eclipse jface preference Preference Page create Contents org eclipse swt widgets Composite protected Control create Contents Composite parent Workbench Help set Help parent I External Tools Help Context Ids EXTERNAL TOOLS PREFERENCE PAGE The main composite Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 composite set Layout layout composite set Font parent get Font prompt For Tool Migration Button create Check Button composite External ToolsUI Messages get String External Tools Preference Page Prompt before migrating 3 I Preference Constants PROMPT FOR TOOL MIGRATION NON NLS 1 prompt For Project Migration Button create Check Button composite External ToolsUI Messages get String External Tools Preference Page 1 I Preference Constants PROMPT FOR PROJECT MIGRATION NON NLS 1 apply Dialog Font composite return composite  PreferencePage createContents createContents WorkbenchHelp setHelp IExternalToolsHelpContextIds EXTERNAL_TOOLS_PREFERENCE_PAGE GridLayout GridLayout marginHeight marginWidth setLayout setFont getFont promptForToolMigrationButton createCheckButton ExternalToolsUIMessages getString ExternalToolsPreferencePage Prompt_before_migrating_3 IPreferenceConstants PROMPT_FOR_TOOL_MIGRATION promptForProjectMigrationButton createCheckButton ExternalToolsUIMessages getString ExternalToolsPreferencePage IPreferenceConstants PROMPT_FOR_PROJECT_MIGRATION applyDialogFont
Returns a new check button with the given label for the given preference private Button create Check Button Composite parent String label String preference Key Button button new Button parent SWT CHECK SWT LEFT button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING button set Font parent get Font button set Text label button set Selection get Preference Store get Boolean preference Key return button  createCheckButton preferenceKey setLayoutData GridData GridData HORIZONTAL_ALIGN_BEGINNING setFont getFont setText setSelection getPreferenceStore getBoolean preferenceKey
see org eclipse ui I Workbench Preference Page init org eclipse ui I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
see org eclipse jface preference Preference Page perform Ok public boolean perform Ok get Preference Store set Value I Preference Constants PROMPT FOR TOOL MIGRATION prompt For Tool Migration Button get Selection get Preference Store set Value I Preference Constants PROMPT FOR PROJECT MIGRATION prompt For Project Migration Button get Selection return super perform Ok  PreferencePage performOk performOk getPreferenceStore setValue IPreferenceConstants PROMPT_FOR_TOOL_MIGRATION promptForToolMigrationButton getSelection getPreferenceStore setValue IPreferenceConstants PROMPT_FOR_PROJECT_MIGRATION promptForProjectMigrationButton getSelection performOk
see org eclipse jface preference Preference Page perform Defaults protected void perform Defaults prompt For Tool Migration Button set Selection get Preference Store get Default Boolean I Preference Constants PROMPT FOR TOOL MIGRATION prompt For Tool Migration Button set Selection get Preference Store get Default Boolean I Preference Constants PROMPT FOR PROJECT MIGRATION super perform Defaults  PreferencePage performDefaults performDefaults promptForToolMigrationButton setSelection getPreferenceStore getDefaultBoolean IPreferenceConstants PROMPT_FOR_TOOL_MIGRATION promptForToolMigrationButton setSelection getPreferenceStore getDefaultBoolean IPreferenceConstants PROMPT_FOR_PROJECT_MIGRATION performDefaults

Resource Bundle get Bundle BUNDLE NAME private External ToolsUI Messages prevent instantiation of class  ResourceBundle getBundle BUNDLE_NAME ExternalToolsUIMessages
Returns the message with the given key in the resource bundle If there isn t any value under the given key the key is returned param key the message name return the message public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

private boolean allow Multiselection false Creates a resource selection dialog rooted at the given element param parent Shell the parent shell param root Element the root element to populate this dialog with param message the message to be displayed at the top of this dialog or code null code to display a default message public File Selection Dialog Shell parent Shell I Adaptable root Element String message super parent Shell External ToolsUI Messages get String File Selection Dialog Choose Location 1 null message Message Dialog NONE new String External ToolsUI Messages get String File Selection Dialog Ok 2 External ToolsUI Messages get String File Selection Dialog Cancel 3 0 NON NLS 1 NON NLS 2 NON NLS 3 root root Element set Shell Style get Shell Style SWT RESIZE  allowMultiselection parentShell rootElement FileSelectionDialog parentShell IAdaptable rootElement parentShell ExternalToolsUIMessages getString FileSelectionDialog Choose_Location_1 MessageDialog ExternalToolsUIMessages getString FileSelectionDialog Ok_2 ExternalToolsUIMessages getString FileSelectionDialog Cancel_3 rootElement setShellStyle getShellStyle
Limits the files displayed in this dialog to files matching the given pattern The string can be a filename or a regular expression containing for any series of characters or for any single character param pattern a pattern used to filter the displayed files or code null code to display all files If a pattern is supplied only files whose names match the given pattern will be available for selection param ignore Case if true case is ignored If the pattern argument is code null code this argument is ignored public void set File Filter String pattern boolean ignore Case if pattern null string Matcher new String Matcher pattern ignore Case false else string Matcher null  ignoreCase setFileFilter ignoreCase stringMatcher StringMatcher ignoreCase stringMatcher
protected void configure Shell Shell shell super configure Shell shell Workbench Help set Help shell I External Tools Help Context Ids FILE SELECTION DIALOG  configureShell configureShell WorkbenchHelp setHelp IExternalToolsHelpContextIds FILE_SELECTION_DIALOG
protected void create Buttons For Button Bar Composite parent super create Buttons For Button Bar parent initialize Dialog  createButtonsForButtonBar createButtonsForButtonBar initializeDialog
protected Control create Dialog Area Composite parent page group Composite composite Composite super create Dialog Area parent create the input element which has the root resource as its only child selection Group new Tree And List Group composite root get Resource Provider I Resource FOLDER I Resource PROJECT I Resource ROOT new Workbench Label Provider get Resource Provider I Resource FILE new Workbench Label Provider SWT NONE since this page has no other significantly sized widgets we need to hardcode the combined widget s size otherwise it will open too small SIZING SELECTION WIDGET WIDTH SIZING SELECTION WIDGET HEIGHT allow Multiselection composite add Control Listener new Control Listener public void control Moved Control Event e public void control Resized Control Event e Also try and reset the size of the columns as appropriate Table Column columns selection Group get List Table get Columns for int i 0 i columns length i columns i pack return composite  createDialogArea createDialogArea selectionGroup TreeAndListGroup getResourceProvider IResource IResource IResource WorkbenchLabelProvider getResourceProvider IResource WorkbenchLabelProvider SIZING_SELECTION_WIDGET_WIDTH SIZING_SELECTION_WIDGET_HEIGHT allowMultiselection addControlListener ControlListener controlMoved ControlEvent controlResized ControlEvent TableColumn selectionGroup getListTable getColumns
return new Workbench Content Provider public Object get Children Object o if o instanceof I Container I Resource members null try members I Container o members List accessible Members new Array List members length for int i 0 i members length i I Resource resource members i if resource is Accessible accessible Members add resource members I Resource accessible Members to Array new I Resource accessible Members size catch Core Exception e just return an empty set of children return new Object 0 filter out the desired resource types Array List results new Array List for int i 0 i members length i And the test bits with the resource types to see if they are what we want if members i get Type resource Type 0 if members i get Type I Resource FILE string Matcher null string Matcher match members i get Name continue results add members i return results to Array return new Object 0  WorkbenchContentProvider getChildren IContainer IResource IContainer accessibleMembers ArrayList IResource isAccessible accessibleMembers IResource accessibleMembers toArray IResource accessibleMembers CoreException ArrayList ArrayList getType resourceType getType IResource stringMatcher stringMatcher getName toArray
Returns a content provider for code I Resource code s that returns only children of the given resource type private I Tree Content Provider get Resource Provider final int resource Type return new Workbench Content Provider public Object get Children Object o if o instanceof I Container I Resource members null try members I Container o members List accessible Members new Array List members length for int i 0 i members length i I Resource resource members i if resource is Accessible accessible Members add resource members I Resource accessible Members to Array new I Resource accessible Members size catch Core Exception e just return an empty set of children return new Object 0 filter out the desired resource types Array List results new Array List for int i 0 i members length i And the test bits with the resource types to see if they are what we want if members i get Type resource Type 0 if members i get Type I Resource FILE string Matcher null string Matcher match members i get Name continue results add members i return results to Array return new Object 0  IResource ITreeContentProvider getResourceProvider resourceType WorkbenchContentProvider getChildren IContainer IResource IContainer accessibleMembers ArrayList IResource isAccessible accessibleMembers IResource accessibleMembers toArray IResource accessibleMembers CoreException ArrayList ArrayList getType resourceType getType IResource stringMatcher stringMatcher getName toArray
selection Group add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event get Ok Button set Enabled selection Group get List Table Selection is Empty  selectionGroup addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getOkButton setEnabled selectionGroup getListTableSelection isEmpty
selection Group add Double Click Listener new I Double Click Listener public void double Click Double Click Event event button Pressed I Dialog Constants OK ID  selectionGroup addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent buttonPressed IDialogConstants OK_ID
Initializes this dialog s controls private void initialize Dialog selection Group add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event get Ok Button set Enabled selection Group get List Table Selection is Empty selection Group add Double Click Listener new I Double Click Listener public void double Click Double Click Event event button Pressed I Dialog Constants OK ID get Ok Button set Enabled false  initializeDialog selectionGroup addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getOkButton setEnabled selectionGroup getListTableSelection isEmpty selectionGroup addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent buttonPressed IDialogConstants OK_ID getOkButton setEnabled
Returns this dialog s OK button protected Button get Ok Button return get Button 0  getOkButton getButton
Returns the file the user chose or code null code if none public I Structured Selection get Result return result  IStructuredSelection getResult
protected void button Pressed int button Id if button Id I Dialog Constants OK ID result selection Group get List Table Selection super button Pressed button Id  buttonPressed buttonId buttonId IDialogConstants OK_ID selectionGroup getListTableSelection buttonPressed buttonId
Sets whether this dialog will allow multi selection Must be called before code open code param allow Multiselection whether to allow multi selection in the dialog public void set Allow Multiselection boolean allow Multiselection this allow Multiselection allow Multiselection  allowMultiselection setAllowMultiselection allowMultiselection allowMultiselection allowMultiselection

Create an instance of this class Use this constructor if you wish to specify the width and or height of the combined widget to only hardcode one of the sizing dimensions specify the other dimension s value as 1 param parent org eclipse swt widgets Composite param style int param root Object java lang Object param width int param height int param allow Multiselection Whether to allow multi selection in the list viewer public Tree And List Group Composite parent Object root Object I Tree Content Provider tree Content Provider I Label Provider tree Label Provider I Structured Content Provider list Content Provider I Label Provider list Label Provider int style int width int height boolean allow Multiselection root root Object this tree Content Provider tree Content Provider this list Content Provider list Content Provider this tree Label Provider tree Label Provider this list Label Provider list Label Provider this allow Multiselection allow Multiselection create Contents parent width height style  rootObject allowMultiselection TreeAndListGroup rootObject ITreeContentProvider treeContentProvider ILabelProvider treeLabelProvider IStructuredContentProvider listContentProvider ILabelProvider listLabelProvider allowMultiselection rootObject treeContentProvider treeContentProvider listContentProvider listContentProvider treeLabelProvider treeLabelProvider listLabelProvider listLabelProvider allowMultiselection allowMultiselection createContents
This method must be called just before this window becomes visible public void about To Open current Tree Selection null select the first element in the list Object elements tree Content Provider get Elements root Object primary elements length 0 elements 0 null if primary null tree Viewer set Selection new Structured Selection primary tree Viewer get Control set Focus  aboutToOpen currentTreeSelection treeContentProvider getElements treeViewer setSelection StructuredSelection treeViewer getControl setFocus
Add the passed listener to collection of clients that listen for changes to list viewer selection state param listener I Selection Changed Listener public void add Selection Changed Listener I Selection Changed Listener listener selection Changed Listeners add listener  ISelectionChangedListener addSelectionChangedListener ISelectionChangedListener selectionChangedListeners
Add the given listener to the collection of clients that listen to double click events in the list viewer param listener I Double Click Listener public void add Double Click Listener I Double Click Listener listener double Click Listeners add listener  IDoubleClickListener addDoubleClickListener IDoubleClickListener doubleClickListeners
Notify all selection listeners that a selection has occurred in the list viewer protected void notify Selection Listeners Selection Changed Event event Iterator iter selection Changed Listeners iterator while iter has Next I Selection Changed Listener iter next selection Changed event  notifySelectionListeners SelectionChangedEvent selectionChangedListeners hasNext ISelectionChangedListener selectionChanged
Notify all double click listeners that a double click event has occurred in the list viewer protected void notify Double Click Listeners Double Click Event event Iterator iter double Click Listeners iterator while iter has Next I Double Click Listener iter next double Click event  notifyDoubleClickListeners DoubleClickEvent doubleClickListeners hasNext IDoubleClickListener doubleClick
Lay out and initialize self s visual components param parent org eclipse swt widgets Composite param width int param height int protected void create Contents Composite parent int width int height int style group pane Composite composite new Composite parent style composite set Font parent get Font Grid Layout layout new Grid Layout layout num Columns 2 layout make Columns Equal Width true layout margin Height 0 layout margin Width 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH create Tree Viewer composite width 2 height create List Viewer composite width 2 height initialize  createContents setFont getFont GridLayout GridLayout numColumns makeColumnsEqualWidth marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_BOTH createTreeViewer createListViewer
list Viewer set Sorter new Resource Sorter Resource Sorter NAME list Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event notify Selection Listeners event  listViewer setSorter ResourceSorter ResourceSorter listViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent notifySelectionListeners
list Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if event get Selection is Empty notify Double Click Listeners event  listViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getSelection isEmpty notifyDoubleClickListeners
Create this group s list viewer protected void create List Viewer Composite parent int width int height int style if allow Multiselection style SWT MULTI else style SWT SINGLE list Viewer new Table Viewer parent SWT BORDER style Grid Data data new Grid Data Grid Data FILL BOTH data width Hint width data height Hint height list Viewer get Table set Layout Data data list Viewer get Table set Font parent get Font list Viewer set Content Provider list Content Provider list Viewer set Label Provider list Label Provider list Viewer set Sorter new Resource Sorter Resource Sorter NAME list Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event notify Selection Listeners event list Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event if event get Selection is Empty notify Double Click Listeners event  createListViewer allowMultiselection listViewer TableViewer GridData GridData GridData FILL_BOTH widthHint heightHint listViewer getTable setLayoutData listViewer getTable setFont getFont listViewer setContentProvider listContentProvider listViewer setLabelProvider listLabelProvider listViewer setSorter ResourceSorter ResourceSorter listViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent notifySelectionListeners listViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent getSelection isEmpty notifyDoubleClickListeners
Create this group s tree viewer protected void create Tree Viewer Composite parent int width int height Tree tree new Tree parent SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data width Hint width data height Hint height tree set Layout Data data tree set Font parent get Font tree Viewer new Tree Viewer tree tree Viewer set Content Provider tree Content Provider tree Viewer set Label Provider tree Label Provider tree Viewer set Sorter new Resource Sorter Resource Sorter NAME tree Viewer add Selection Changed Listener this  createTreeViewer GridData GridData GridData FILL_BOTH widthHint heightHint setLayoutData setFont getFont treeViewer TreeViewer treeViewer setContentProvider treeContentProvider treeViewer setLabelProvider treeLabelProvider treeViewer setSorter ResourceSorter ResourceSorter treeViewer addSelectionChangedListener
public Table get List Table return list Viewer get Table  getListTable listViewer getTable
public I Structured Selection get List Table Selection I Selection selection this list Viewer get Selection if selection instanceof I Structured Selection return I Structured Selection selection return Structured Selection EMPTY  IStructuredSelection getListTableSelection ISelection listViewer getSelection IStructuredSelection IStructuredSelection StructuredSelection
protected void initial List Item Object element Object parent tree Content Provider get Parent element select And Reveal Folder parent  initialListItem treeContentProvider getParent selectAndRevealFolder
public void select And Reveal Folder Object tree Element tree Viewer reveal tree Element I Structured Selection selection new Structured Selection tree Element tree Viewer set Selection selection  selectAndRevealFolder treeElement treeViewer treeElement IStructuredSelection StructuredSelection treeElement treeViewer setSelection
public void select And Reveal File Object tree Element list Viewer reveal tree Element I Structured Selection selection new Structured Selection tree Element list Viewer set Selection selection  selectAndRevealFile treeElement listViewer treeElement IStructuredSelection StructuredSelection treeElement listViewer setSelection
Initialize this group s viewers after they have been laid out protected void initialize tree Viewer set Input root  treeViewer setInput
public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection Object selected Element selection get First Element if selected Element null current Tree Selection null list Viewer set Input current Tree Selection return ie if not an item deselection if selected Element current Tree Selection list Viewer set Input selected Element current Tree Selection selected Element  selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection selectedElement getFirstElement selectedElement currentTreeSelection listViewer setInput currentTreeSelection selectedElement currentTreeSelection listViewer setInput selectedElement currentTreeSelection selectedElement
Set the list viewer s providers to those passed param content Provider I Tree Content Provider param label Provider I Label Provider public void set List Providers I Structured Content Provider content Provider I Label Provider label Provider list Viewer set Content Provider content Provider list Viewer set Label Provider label Provider  contentProvider ITreeContentProvider labelProvider ILabelProvider setListProviders IStructuredContentProvider contentProvider ILabelProvider labelProvider listViewer setContentProvider contentProvider listViewer setLabelProvider labelProvider
Set the sorter that is to be applied to self s list viewer public void set List Sorter Viewer Sorter sorter list Viewer set Sorter sorter  setListSorter ViewerSorter listViewer setSorter
Set the root of the widget to be new Root Regenerate all of the tables and lists from this value param new Root public void set Root Object new Root this root new Root initialize  newRoot setRoot newRoot newRoot
Set the tree viewer s providers to those passed param content Provider I Tree Content Provider param label Provider I Label Provider public void set Tree Providers I Tree Content Provider content Provider I Label Provider label Provider tree Viewer set Content Provider content Provider tree Viewer set Label Provider label Provider  contentProvider ITreeContentProvider labelProvider ILabelProvider setTreeProviders ITreeContentProvider contentProvider ILabelProvider labelProvider treeViewer setContentProvider contentProvider treeViewer setLabelProvider labelProvider
Set the sorter that is to be applied to self s tree viewer public void set Tree Sorter Viewer Sorter sorter tree Viewer set Sorter sorter  setTreeSorter ViewerSorter treeViewer setSorter
Set the focus on to the list widget public void set Focus this tree Viewer get Tree set Focus  setFocus treeViewer getTree setFocus

public String resolve Value I Dynamic Variable variable String argument throws Core Exception I Resource resource External Tool Builder get Build Project if argument null resource null resource I Project resource find Member new Path argument if resource null resource exists return resource get Location toOS String abort Message Format format Variable Messages get String Build Project Resolver 3 new String get Reference Expression variable argument null NON NLS 1 return null  resolveValue IDynamicVariable CoreException IResource ExternalToolBuilder getBuildProject IProject findMember getLocation toOSString MessageFormat VariableMessages getString BuildProjectResolver getReferenceExpression
Throws an exception with the given message and underlying exception param message exception message param exception underlying exception or code null code throws Core Exception protected void abort String message Throwable exception throws Core Exception throw new Core Exception new Status I Status ERROR I External Tool Constants PLUGIN ID I External Tool Constants ERR INTERNAL ERROR message exception  CoreException CoreException CoreException IStatus IExternalToolConstants PLUGIN_ID IExternalToolConstants ERR_INTERNAL_ERROR
Returns an expression used to reference the given variable and optional argument For example code var name arg code param variable referenced variable param argument referenced argument or code null code return vraiable reference expression protected String get Reference Expression I Dynamic Variable variable String argument String Buffer reference new String Buffer reference append NON NLS 1 reference append variable get Name if argument null reference append NON NLS 1 reference append argument reference append NON NLS 1 return reference to String  var_name getReferenceExpression IDynamicVariable StringBuffer StringBuffer getName toString

see org eclipse debug internal core stringsubstitution I Context Variable Resolver resolve Value org eclipse debug internal core stringsubstitution I Context Variable java lang String public String resolve Value I Dynamic Variable variable String argument return External Tool Builder get Build Type  IContextVariableResolver resolveValue IContextVariable resolveValue IDynamicVariable ExternalToolBuilder getBuildType

private static final Resource Bundle RESOURCE BUNDLE Resource Bundle get Bundle BUNDLE NAME private Variable Messages  ResourceBundle RESOURCE_BUNDLE ResourceBundle getBundle BUNDLE_NAME VariableMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

private boolean stale true see org eclipse ui forms I Form Part initialize org eclipse ui forms I Managed Form public void initialize I Managed Form form this managed Form form  IFormPart IManagedForm IManagedForm managedForm
Returns the form that manages this part return the managed form public I Managed Form get Managed Form return managed Form  IManagedForm getManagedForm managedForm
Disposes the part Subclasses should override to release any system resources public void dispose 
Commits the part Subclasses should call super when overriding param on Save code true code if the request to commit has arrived as a result of the save action public void commit boolean on Save dirty false  onSave onSave
Sets the overal form input Subclases may elect to override the method and adjust according to the form input param input the form input object return code false code public boolean set Form Input Object input return false  setFormInput
Instructs the part to grab keyboard focus public void set Focus  setFocus
Refreshes the section after becoming stale falling behind data in the model Subclasses must call super when overriding this method public void refresh stale false since we have refreshed any changes we had in the part are gone and we are not dirty dirty false 
Marks the part dirty Subclasses should call this method as a result of user interaction with the widgets in the section public void mark Dirty dirty true managed Form dirty State Changed  markDirty managedForm dirtyStateChanged
Tests whether the part is dirty i e its widgets have state that is newer than the data in the model return code true code if the part is dirty code false code otherwise public boolean is Dirty return dirty  isDirty
Tests whether the part is stale i e its widgets have state that is older than the data in the model return code true code if the part is stale code false code otherwise public boolean is Stale return stale  isStale
Marks the part stale Subclasses should call this method as a result of model notification that indicates that the content of the section is no longer in sync with the model public void mark Stale stale true managed Form stale State Changed  markStale managedForm staleStateChanged

public Page Bag I Details Page page boolean fixed this page page this fixed fixed this ticket counter  PageBag IDetailsPage
this ticket counter public int get Ticket return ticket  getTicket
return ticket public I Details Page get Page return page  IDetailsPage getPage
return page public void dispose page dispose page null 
page null public boolean is Disposed return page null  isDisposed
return page null public boolean is Fixed return fixed  isFixed
return fixed public static int get Current Ticket return counter  getCurrentTicket
Creates a details part by wrapping the provided page book param mform the parent form param page Book the page book to wrap public Details Part I Managed Form mform Scrolled Page Book page Book this page Book page Book pages new Hashtable initialize mform  pageBook DetailsPart IManagedForm ScrolledPageBook pageBook pageBook pageBook
Creates a new details part in the provided form by creating the page book param mform the parent form param parent the composite to create the page book in param style the style for the page book public Details Part I Managed Form mform Composite parent int style this mform mform get Toolkit create Page Book parent style SWT V SCROLL SWT H SCROLL  DetailsPart IManagedForm getToolkit createPageBook V_SCROLL H_SCROLL
Registers the details page to be used for all the objects of the provided object class param object Class param page public void register Page Object object Class I Details Page page register Page object Class page true  objectClass registerPage objectClass IDetailsPage registerPage objectClass
private void register Page Object object Class I Details Page page boolean fixed pages put object Class new Page Bag page fixed page initialize managed Form  registerPage objectClass IDetailsPage objectClass PageBag managedForm
Sets the dynamic page provider The dynamic provider can return different pages for objects of the same class based on their state param provider the provider to use public void set Page Provider I Details Page Provider provider this page Provider provider  setPageProvider IDetailsPageProvider pageProvider
Commits the part by committing the current page boolean on Save code true code if commit is requested as a result of the save action code false code otherwise public void commit boolean on Save I Details Page page get Current Page if page null page commit on Save  onSave onSave IDetailsPage getCurrentPage onSave
Returns the current page visible in the part return the current page public I Details Page get Current Page Control control page Book get Current Page if control null Object data control get Data if data instanceof I Details Page return I Details Page data return null  IDetailsPage getCurrentPage pageBook getCurrentPage getData IDetailsPage IDetailsPage
public void dispose for Enumeration enum pages elements enum has More Elements Page Bag page Bag Page Bag enum next Element page Bag dispose  hasMoreElements PageBag pageBag PageBag nextElement pageBag
see org eclipse ui forms I Form Part initialize org eclipse ui forms I Managed Form public void initialize I Managed Form form this managed Form form  IFormPart IManagedForm IManagedForm managedForm
Tests if the currently visible page is dirty public boolean is Dirty I Details Page page get Current Page if page null return page is Dirty return false  isDirty IDetailsPage getCurrentPage isDirty
Tests if the currently visible page is stale and needs refreshing public boolean is Stale I Details Page page get Current Page if page null return page is Stale return false  isStale IDetailsPage getCurrentPage isStale
Refreshes the current page public void refresh I Details Page page get Current Page if page null page refresh  IDetailsPage getCurrentPage
Sets the focus to the currently visible page public void set Focus I Details Page page get Current Page if page null page set Focus  setFocus IDetailsPage getCurrentPage setFocus
see org eclipse ui forms I Form Part set Form Input java lang Object public boolean set Form Input Object input return false  IFormPart setFormInput setFormInput
public void selection Changed I Form Part part I Selection selection this master Part part if current Selection null if selection instanceof I Structured Selection current Selection I Structured Selection selection else current Selection null update  selectionChanged IFormPart ISelection masterPart currentSelection IStructuredSelection currentSelection IStructuredSelection currentSelection
private void update Object key null if current Selection null for Iterator iter current Selection iterator iter has Next Object obj iter next if key null key get Key obj else if get Key obj equals key false key null break show Page key  currentSelection currentSelection hasNext getKey getKey showPage
private Object get Key Object object if page Provider null Object key page Provider get Page Key object if key null return key return object get Class  getKey pageProvider pageProvider getPageKey getClass
Busy Indicator show While page Book get Display new Runnable public void run if page Book has Page key Composite parent page Book create Page key fpage create Contents parent parent set Data fpage commit the current page if old Page null old Page is Dirty old Page commit false refresh the new page if fpage is Stale fpage refresh fpage selection Changed master Part current Selection page Book show Page key  BusyIndicator showWhile pageBook getDisplay pageBook hasPage pageBook createPage createContents setData oldPage oldPage isDirty oldPage isStale selectionChanged masterPart currentSelection pageBook showPage
private void show Page final Object key check Limit final I Details Page old Page get Current Page if key null Page Bag page Bag Page Bag pages get key I Details Page page page Bag null page Bag get Page null if page null try to get the page dynamically from the provider if page Provider null page page Provider get Page key if page null register Page key page false if page null final I Details Page fpage page Busy Indicator show While page Book get Display new Runnable public void run if page Book has Page key Composite parent page Book create Page key fpage create Contents parent parent set Data fpage commit the current page if old Page null old Page is Dirty old Page commit false refresh the new page if fpage is Stale fpage refresh fpage selection Changed master Part current Selection page Book show Page key return If we are switching from an old page to nothing don t loose data if old Page null old Page is Dirty old Page commit false page Book show Empty Page  showPage checkLimit IDetailsPage oldPage getCurrentPage PageBag pageBag PageBag IDetailsPage pageBag pageBag getPage pageProvider pageProvider getPage registerPage IDetailsPage BusyIndicator showWhile pageBook getDisplay pageBook hasPage pageBook createPage createContents setData oldPage oldPage isDirty oldPage isStale selectionChanged masterPart currentSelection pageBook showPage oldPage oldPage isDirty oldPage pageBook showEmptyPage
private void check Limit if pages size get Page Limit return overflow int current Ticket Page Bag get Current Ticket int cutoff Ticket current Ticket get Page Limit for Enumeration enum pages keys enum has More Elements Object key enum next Element Page Bag page Bag Page Bag pages get key if page Bag get Ticket cutoff Ticket candidate see if it is active and not fixed if page Bag is Fixed page Bag get Page equals get Current Page drop it page Bag dispose pages remove key page Book remove Page key false  checkLimit getPageLimit currentTicket PageBag getCurrentTicket cutoffTicket currentTicket getPageLimit hasMoreElements nextElement PageBag pageBag PageBag pageBag getTicket cutoffTicket pageBag isFixed pageBag getPage getCurrentPage pageBag pageBook removePage
Returns the maximum number of pages that should be maintained in this part When an attempt is made to add more pages old pages are removed and disposed based on the order of creation the oldest pages are removed The exception is made for the page that should otherwise be disposed but is currently active return maximum number of pages for this part public int get Page Limit return page Limit  getPageLimit pageLimit
Sets the page limit for this part see get Page Limit param page Limit the maximum number of pages that should be maintained in this part public void set Page Limit int page Limit this page Limit page Limit check Limit  getPageLimit pageLimit setPageLimit pageLimit pageLimit pageLimit checkLimit

private I Selection global Selection param multi Page Editor public Form Editor Selection Provider Form Editor form Editor super form Editor  ISelection globalSelection multiPageEditor FormEditorSelectionProvider FormEditor formEditor formEditor
public I Selection get Selection I Editor Part active Editor Form Editor get Multi Page Editor get Active Editor if active Editor null I Selection Provider selection Provider active Editor get Site get Selection Provider if selection Provider null return selection Provider get Selection return global Selection  ISelection getSelection IEditorPart activeEditor FormEditor getMultiPageEditor getActiveEditor activeEditor ISelectionProvider selectionProvider activeEditor getSite getSelectionProvider selectionProvider selectionProvider getSelection globalSelection
public void set Selection I Selection selection I Editor Part active Editor Form Editor get Multi Page Editor get Active Editor if active Editor null I Selection Provider selection Provider active Editor get Site get Selection Provider if selection Provider null selection Provider set Selection selection else this global Selection selection fire Selection Changed new Selection Changed Event this global Selection  setSelection ISelection IEditorPart activeEditor FormEditor getMultiPageEditor getActiveEditor activeEditor ISelectionProvider selectionProvider activeEditor getSite getSelectionProvider selectionProvider selectionProvider setSelection globalSelection fireSelectionChanged SelectionChangedEvent globalSelection
The constructor public Form Editor pages new Vector  FormEditor
Overrides super to plug in a different selection provider public void init I Editor Site site I Editor Input input throws Part Init Exception set Site site set Input input site set Selection Provider new Form Editor Selection Provider this  IEditorSite IEditorInput PartInitException setSite setInput setSelectionProvider FormEditorSelectionProvider
Creates the common toolkit for this editor and adds pages to the editor see add Pages protected void create Pages toolkit create Toolkit get Container get Display add Pages  addPages createPages createToolkit getContainer getDisplay addPages
Creates the form toolkit The method can be implemented to substitute a subclass of the toolkit that should be used for this editor A typical use of this method would be to create the form toolkit using one shared code Form Colors code object to share resources across the multiple editor instances param display the display to use when creating the toolkit return the newly created toolkit instance protected Form Toolkit create Toolkit Display display return new Form Toolkit display  FormColors FormToolkit createToolkit FormToolkit
Subclass should implement this method to add pages to the editor using add Page I Form Page method  addPage IFormPage
protected abstract void add Pages Adds the form page to this editor Form page will be loaded lazily Its part control will not be created until it is activated for the first time param page the form page to add public int add Page I Form Page page throws Part Init Exception int i super add Page page get Part Control configure Page i page return i  addPages addPage IFormPage PartInitException addPage getPartControl configurePage
Adds a simple SWT control as a page Overrides superclass implementation to keep track of pages param control the page control to add return the 0 based index of the newly added page public int add Page Control control int i super add Page control try register Page control catch Part Init Exception e cannot happen for controls return i  addPage addPage registerPage PartInitException
Adds the complete editor part to the multi page editor public int add Page I Editor Part editor I Editor Input input throws Part Init Exception int index super add Page editor input if editor instanceof I Form Page configure Page index I Form Page editor else register Page editor return index  addPage IEditorPart IEditorInput PartInitException addPage IFormPage configurePage IFormPage registerPage
Configures the form page param index the page index param page the page to configure throws Part Init Exception if there are problems in configuring the page protected void configure Page int index I Form Page page throws Part Init Exception set Page Text index page get Title set Page Image index page get Title Image page set Index index register Page page  PartInitException configurePage IFormPage PartInitException setPageText getTitle setPageImage getTitleImage setIndex registerPage
Overrides the superclass to remove the page from the page table param page Index the 0 based index of the page in the editor public void remove Page int page Index if page Index 0 page Index pages size Object page pages get page Index pages remove page if page instanceof I Form Page I Form Page fpage I Form Page page if fpage is Editor fpage dispose update Page Indices super remove Page page Index  pageIndex removePage pageIndex pageIndex pageIndex pageIndex IFormPage IFormPage IFormPage isEditor updatePageIndices removePage pageIndex
fix the page indices after the removal private void update Page Indices for int i 0 i pages size i Object page pages get i if page instanceof I Form Page I Form Page fpage I Form Page page fpage set Index i  updatePageIndices IFormPage IFormPage IFormPage setIndex
Called to indicate that the editor has been made dirty or the changes have been saved public void editor Dirty State Changed fire Property Change PROP DIRTY  editorDirtyStateChanged firePropertyChange PROP_DIRTY
Disposes the pages and the toolkit after disposing the editor itself Subclasses must call super when reimplementing the method public void dispose super dispose for int i 0 i pages size i Object page pages get i if page instanceof I Form Page I Form Page fpage I Form Page page don t dispose source pages because they will be disposed as nested editors by the superclass if fpage is Editor fpage dispose pages null toolkit may be null if editor has been instantiated but never created see defect 62190 if toolkit null toolkit dispose toolkit null  IFormPage IFormPage IFormPage isEditor
Returns the toolkit owned by this editor return the toolkit object public Form Toolkit get Toolkit return toolkit  FormToolkit getToolkit
Widens the visibility of the method in the superclass return the active nested editor public I Editor Part get Active Editor return super get Active Editor  IEditorPart getActiveEditor getActiveEditor
Returns the current page index The value is identical to the value of get Active Page except during the page switch when this method still has the old active page index p Another important difference is during the editor closing When the tab folder is disposed get Active Page will return 1 while this method will still return the last active page see get Active Page return the currently selected page or 1 if no page is currently selected protected int get Current Page return current Page  getActivePage getActivePage getActivePage getCurrentPage currentPage
see Multi Page Editor Part page Change int protected void page Change int new Page Index fix for windows handles int old Page get Current Page if old Page 1 pages size old Page pages get old Page instanceof I Form Page old Page new Page Index Check the old page I Form Page old Form Page I Form Page pages get old Page if old Form Page can Leave The Page false set Active Page old Page return Now is the absolute last moment to create the page control Object page pages get new Page Index if page instanceof I Form Page I Form Page fpage I Form Page page if fpage get Part Control null fpage create Part Control get Container set Control new Page Index fpage get Part Control fpage get Part Control set Menu get Container get Menu if old Page 1 pages size old Page pages get old Page instanceof I Form Page Commit old page before activating the new one I Form Page old Form Page I Form Page pages get old Page I Managed Form mform old Form Page get Managed Form if mform null mform commit false if pages size new Page Index pages get new Page Index instanceof I Form Page I Form Page pages get new Page Index set Active true if old Page 1 pages size old Page pages get old Page instanceof I Form Page I Form Page pages get old Page set Active false Call super this will cause pages to switch super page Change new Page Index this current Page new Page Index  MultiPageEditorPart pageChange pageChange newPageIndex oldPage getCurrentPage oldPage oldPage oldPage IFormPage oldPage newPageIndex IFormPage oldFormPage IFormPage oldPage oldFormPage canLeaveThePage setActivePage oldPage newPageIndex IFormPage IFormPage IFormPage getPartControl createPartControl getContainer setControl newPageIndex getPartControl getPartControl setMenu getContainer getMenu oldPage oldPage oldPage IFormPage IFormPage oldFormPage IFormPage oldPage IManagedForm oldFormPage getManagedForm newPageIndex newPageIndex IFormPage IFormPage newPageIndex setActive oldPage oldPage oldPage IFormPage IFormPage oldPage setActive pageChange newPageIndex currentPage newPageIndex
Sets the active page using the unique page identifier param page Id the id of the page to switch to return page that was set active or samp null samp if not found public I Form Page set Active Page String page Id for int i 0 i pages size i Object page pages get i if page instanceof I Form Page I Form Page fpage I Form Page page if fpage get Id equals page Id set Active Page i return fpage return null  pageId IFormPage setActivePage pageId IFormPage IFormPage IFormPage getId pageId setActivePage
Finds the page instance that has the provided id param page Id the id of the page to find return page with the matching id or code null code if not found public I Form Page find Page String page Id for int i 0 i pages size i Object page pages get i if page instanceof I Form Page I Form Page fpage I Form Page pages get i if fpage get Id equals page Id return fpage return null  pageId IFormPage findPage pageId IFormPage IFormPage IFormPage getId pageId
Sets the active page using the unique page identifier and sets its input to the provided object param page Id the id of the page to switch to param page Input the page input return page that was set active or samp null samp if not found public I Form Page set Active Page String page Id Object page Input I Form Page page set Active Page page Id if page null I Managed Form mform page get Managed Form if mform null mform set Input page Input return page  pageId pageInput IFormPage setActivePage pageId pageInput IFormPage setActivePage pageId IManagedForm getManagedForm setInput pageInput
Iterates through the pages calling similar method until a page is found that contains the desired page input param page Input the object to select and reveal return the page that accepted the request or code null code if no page has the desired object see set Active Page public I Form Page select Reveal Object page Input for int i 0 i pages size i Object page pages get i if page instanceof I Form Page I Form Page fpage I Form Page page if fpage select Reveal page Input return fpage return null  pageInput setActivePage IFormPage selectReveal pageInput IFormPage IFormPage IFormPage selectReveal pageInput
Returns active page instance if the currently selected page index is not 1 or code null code if it is return active page instance if selected or code null code if no page is currently active public I Form Page get Active Page Instance int index get Active Page if index 1 Object page pages get index if page instanceof I Form Page return I Form Page page return null  IFormPage getActivePageInstance getActivePage IFormPage IFormPage
see Multi Page Editor Part set Active Page int protected void set Active Page int page Index fix for window handles problem this should be called only when the editor is first opened if pages size page Index pages get page Index instanceof I Form Page page Change page Index I Form Page active Page I Form Page pages get page Index active Page set Active true super set Active Page page Index else super set Active Page page Index update Action Bar Contributor page Index  MultiPageEditorPart setActivePage setActivePage pageIndex pageIndex pageIndex IFormPage pageChange pageIndex IFormPage activePage IFormPage pageIndex activePage setActive setActivePage pageIndex setActivePage pageIndex updateActionBarContributor pageIndex
Notifies action bar contributor about page change param page Index the index of the new page protected void update Action Bar Contributor int page Index this is to enable the undo redo actions before a page change has occurred I Editor Action Bar Contributor contributor get Editor Site get Action Bar Contributor if contributor null contributor instanceof Multi Page Editor Action Bar Contributor Multi Page Editor Action Bar Contributor contributor set Active Page get Editor page Index  pageIndex updateActionBarContributor pageIndex IEditorActionBarContributor getEditorSite getActionBarContributor MultiPageEditorActionBarContributor MultiPageEditorActionBarContributor setActivePage getEditor pageIndex
display async Exec new Runnable public void run if toolkit null get Site get Page close Editor Form Editor this save  asyncExec getSite getPage closeEditor FormEditor
Closes the editor programmatically param save if code true code the content should be saved before closing public void close final boolean save Display display get Site get Shell get Display display async Exec new Runnable public void run if toolkit null get Site get Page close Editor Form Editor this save  getSite getShell getDisplay asyncExec getSite getPage closeEditor FormEditor
private void register Page Object page throws Part Init Exception if pages contains page pages add page if page instanceof I Form Page I Form Page fpage I Form Page page if fpage is Editor false fpage init get Editor Site get Editor Input  registerPage PartInitException IFormPage IFormPage IFormPage isEditor getEditorSite getEditorInput

private static class Page Form extends Managed Form public Page Form Form Page page Scrolled Form form super page get Editor get Toolkit form set Container page  PageForm ManagedForm PageForm FormPage ScrolledForm getEditor getToolkit setContainer
public Form Page get Page return Form Page get Container  FormPage getPage FormPage getContainer
return Form Page get Container public void dirty State Changed get Page get Editor editor Dirty State Changed  FormPage getContainer dirtyStateChanged getPage getEditor editorDirtyStateChanged
get Page get Editor editor Dirty State Changed public void stale State Changed if get Page is Active refresh  getPage getEditor editorDirtyStateChanged staleStateChanged getPage isActive
A constructor that creates the page and initializes it with the editor param editor the parent editor param id the unique identifier param title the page title public Form Page Form Editor editor String id String title this id title initialize editor  FormPage FormEditor
The constructor The parent editor need to be passed in the code initialize code method if this constructor is used param id a unique page identifier param title a user friendly page title public Form Page String id String title this id id this title title  FormPage
Initializes the form page see I Editor Part init public void init I Editor Site site I Editor Input input set Site site set Input input  IEditorPart IEditorSite IEditorInput setSite setInput
Primes the form page with the parent editor instance param editor the parent editor public void initialize Form Editor editor this editor editor  FormEditor
Returns the parent editor return parent editor instance public Form Editor get Editor return editor  FormEditor getEditor
Returns the managed form owned by this page return the managed form public I Managed Form get Managed Form return mform  IManagedForm getManagedForm
Implements the required method by refreshing the form when set active Subclasses must call super when overriding this method public void set Active boolean active if active We are switching to this page refresh it if needed mform refresh  setActive
Tests if the page is active by asking the parent editor if this page is the currently active page return code true code if the page is currently active code false code otherwise public boolean is Active return this equals editor get Active Page Instance  isActive getActivePageInstance
mform new Page Form this form Busy Indicator show While parent get Display new Runnable public void run create Form Content mform  PageForm BusyIndicator showWhile getDisplay createFormContent
Creates the part control by creating the managed form using the parent editor s toolkit Subclasses should override code create Form Content I Managed Form code to populate the form with content param parent the page parent composite public void create Part Control Composite parent Scrolled Form form editor get Toolkit create Scrolled Form parent mform new Page Form this form Busy Indicator show While parent get Display new Runnable public void run create Form Content mform  createFormContent IManagedForm createPartControl ScrolledForm getToolkit createScrolledForm PageForm BusyIndicator showWhile getDisplay createFormContent
Subclasses should override this method to create content in the form hosted in this page param managed Form the form hosted in this page protected void create Form Content I Managed Form managed Form  managedForm createFormContent IManagedForm managedForm
Returns the form page control return managed form s control public Control get Part Control return mform null mform get Form null  getPartControl getForm
Disposes the managed form public void dispose if mform null mform dispose 
Returns the unique identifier that can be used to reference this page return the unique page identifier public String get Id return id  getId
Returns the page title return page title public String get Title return title  getTitle
Returns code null code form page has no title image Subclasses may override param Image the title image or code null code if not used public Image get Title Image return null  getTitleImage
Sets the focus by delegating to the managed form public void set Focus if mform null mform set Focus  setFocus setFocus
see org eclipse ui I Saveable Part do Save org eclipse core runtime I Progress Monitor public void do Save I Progress Monitor monitor if mform null mform commit true  ISaveablePart doSave IProgressMonitor doSave IProgressMonitor
see org eclipse ui I Saveable Part do Save As public void do Save As  ISaveablePart doSaveAs doSaveAs
see org eclipse ui I Saveable Part is Save As Allowed public boolean is Save As Allowed return false  ISaveablePart isSaveAsAllowed isSaveAsAllowed
Implemented by testing if the managed form is dirty return code true code if the managed form is dirty code false code otherwise see org eclipse ui I Saveable Part is Dirty public boolean is Dirty return mform null mform is Dirty false  ISaveablePart isDirty isDirty isDirty
Preserves the page index param index the assigned page index public void set Index int index this index index  setIndex
Returns the saved page index return the page index public int get Index return index  getIndex
Form pages are not editors return code false code public boolean is Editor return false  isEditor
Attempts to select and reveal the given object by passing the request to the managed form param object the object to select and reveal in the page if possible return code true code if the page has been successfully selected and revealed by one of the managed form parts code false code otherwise public boolean select Reveal Object object if mform null return mform set Input object return false  selectReveal setInput
By default editor will be allowed to flip the page return code true code public boolean can Leave The Page return true  canLeaveThePage

public interface I Form Page extends I Editor Part param editor the form editor that this page belongs to  IFormPage IEditorPart
void initialize Form Editor editor Returns the editor this page belongs to return the form editor  FormEditor
Form Editor get Editor Returns the managed form of this page unless this is a source page return the managed form or samp null samp if this is a source page  FormEditor getEditor
I Managed Form get Managed Form Indicates whether the page has become the active in the editor Classes that implement this interface may use this method to commit the page on code false code or lazily create and or populate the content on code true code param active code true code if page should be visible code false code otherwise  IManagedForm getManagedForm
void set Active boolean active Returns samp true samp if page is currently active false if not return samp true samp for active page  setActive
boolean is Active Tests if the content of the page is in a state that allows the editor to flip to another page Typically pages that contain raw source with syntax errors should not allow editors to leave them until errors are corrected return code true code if the editor can flip to another page code false code otherwise  isActive
boolean can Leave The Page Returns the control associated with this page return the control of this page if created or samp null samp if the page has not been shown yet  canLeaveThePage
Control get Part Control Page must have a unique id that can be used to show it without knowing its relative position in the editor return the unique page identifier  getPartControl
String get Id Returns the position of the page in the editor return the zero based index of the page in the editor  getId
int get Index Sets the position of the page in the editor param index the zero based index of the page in the editor  getIndex
void set Index int index Tests whether this page wraps a complete editor that can be registered on its own or represents a page that cannot exist outside the multi page editor context return samp true samp if the page wraps an editor samp false samp if this is a form page  setIndex
boolean is Editor A hint to bring the provided object into focus If the object is in a tree or table control select it If it is shown on a scrollable page ensure that it is visible If the object is not presented in the page code false code should be returned to allow another page to try param object object to select and reveal return code true code if the request was successful code false code otherwise  isEditor

public class Expansion Adapter implements I Expansion Listener Sent when the link is entered The default behaviour is to do nothing param e the event public void expansion State Changing Expansion Event e  ExpansionAdapter IExpansionListener expansionStateChanging ExpansionEvent
Sent when the link is exited The default behaviour is to do nothing param e the event public void expansion State Changed Expansion Event e  expansionStateChanged ExpansionEvent

public final class Expansion Event extends Typed Event Creates a new expansion ecent param obj event source param state the new expansion state public Expansion Event Object obj boolean state super obj data state Boolean TRUE Boolean FALSE  ExpansionEvent TypedEvent ExpansionEvent
Returns the new expansion state of the widget return code true code if the widget is now expaned code false code otherwise public boolean get State return data equals Boolean TRUE true false  getState

public class Hyperlink Adapter implements I Hyperlink Listener Sent when the link is entered The default behaviour is to do nothing param e the event public void link Entered Hyperlink Event e  HyperlinkAdapter IHyperlinkListener linkEntered HyperlinkEvent
Sent when the link is exited The default behaviour is to do nothing param e the event public void link Exited Hyperlink Event e  linkExited HyperlinkEvent
Sent when the link is activated The default behaviour is to do nothing param e the event public void link Activated Hyperlink Event e  linkActivated HyperlinkEvent

private int state Mask Creates a new hyperlink param obj event source param href the hyperlink reference that will be followed upon when the hyperlink is activated param label the name of the hyperlink the text that is rendered as a link in the source widget public Hyperlink Event Widget widget Object href String label int modifier super widget this widget widget this data href this label label this state Mask modifier  stateMask HyperlinkEvent stateMask
The hyperlink reference that will be followed when the hyperlink is activated return the hyperlink reference object public Object get Href return this data  getHref
The text of the hyperlink rendered in the source widget return the hyperlink label public String get Label return label  getLabel
Returns the value of the keyboard state mask present when the event occured or SWT NULL for no modifiers return the keyboard state mask or code SWT NULL code public int get State Mask return state Mask  getStateMask stateMask

public interface I Expansion Listener Notifies the listener that the expandable control is about to change its expansion state The state provided by the event is the new state param e the expansion event  IExpansionListener
void expansion State Changing Expansion Event e Notifies the listener after the expandable control has changed its expansion state The state provided by the event is the new state param e the expansion event  expansionStateChanging ExpansionEvent

public interface I Hyperlink Listener Sent when hyperlink is entered either by mouse entering the link client area or keyboard focus switching to the hyperlink param e an event containing information about the hyperlink  IHyperlinkListener
void link Entered Hyperlink Event e Sent when hyperlink is exited either by mouse exiting the link client area or keyboard focus switching from the hyperlink param e an event containing information about the hyperlink  linkEntered HyperlinkEvent
void link Exited Hyperlink Event e Sent when hyperlink is activated either by mouse click inside the link client area or by pressing Enter key while hyperlink has keyboard focus param e an event containing information about the hyperlink  linkExited HyperlinkEvent

protected Color border Creates form colors using the provided display param display the display to use public Form Colors Display display this display display initialize  FormColors
Returns the display used to create colors return the display public Display get Display return display  getDisplay
Initializes the colors Subclasses can override this method to change the way colors are created Alternatively only the color table can be modified by overriding code initialize Color Table code see initialize Color Table protected void initialize background display get System Color SWT COLOR LIST BACKGROUND foreground display get System Color SWT COLOR LIST FOREGROUND initialize Color Table update Border Color  initializeColorTable initializeColorTable getSystemColor COLOR_LIST_BACKGROUND getSystemColor COLOR_LIST_FOREGROUND initializeColorTable updateBorderColor
Allocates colors for the following keys BORDER COMPOSITE SEPARATOR and DEFAULT HEADER Subclasses can override to allocate this colors differently protected void initialize Color Table create Color SEPARATOR 152 170 203 String osname System get Property os name to Lower Case if osname starts With mac os create Color TITLE get System Color SWT COLOR LIST FOREGROUND else create Color TITLE get System Color SWT COLOR LIST SELECTION RGB border get System Color SWT COLOR TITLE INACTIVE BACKGROUND GRADIENT RGB black new RGB 0 0 0 create Color BORDER blend border black 80  COMPOSITE_SEPARATOR DEFAULT_HEADER initializeColorTable createColor getProperty toLowerCase startsWith createColor getSystemColor COLOR_LIST_FOREGROUND createColor getSystemColor COLOR_LIST_SELECTION getSystemColor COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT createColor
Allocates colors for the section tool bar all the keys that start with TB Since these colors are only needed when TITLE BAR style is used with the Section widget they are not needed all the time and are allocated on demand Consequently this method will do nothing if the colors have been already initialized Call this method prior to using colors with the TB keys to ensure they are available public void initialize Section Tool Bar Colors if get Color Form Colors TB BG null return RGB tb Bg get System Color SWT COLOR TITLE BACKGROUND GRADIENT RGB form Background get Background getRGB blend 77 white with the title background gradient tb Bg blend form Background tb Bg 77 create Color Form Colors TB BG tb Bg blend 50 white with the previous blend for half way RGB tb Gbg blend form Background tb Bg 50 create Color Form Colors TB GBG tb Gbg Title bar foreground RGB tb Fg get System Color SWT COLOR LIST SELECTION create Color Form Colors TB FG tb Fg title bar outline border color RGB tb Border get System Color SWT COLOR TITLE INACTIVE BACKGROUND GRADIENT create Color Form Colors TB BORDER tb Border toggle color RGB toggle get System Color SWT COLOR WIDGET NORMAL SHADOW create Color Form Colors TB TOGGLE toggle  TITLE_BAR initializeSectionToolBarColors getColor FormColors TB_BG tbBg getSystemColor COLOR_TITLE_BACKGROUND_GRADIENT formBackground getBackground tbBg formBackground tbBg createColor FormColors TB_BG tbBg tbGbg formBackground tbBg createColor FormColors TB_GBG tbGbg tbFg getSystemColor COLOR_LIST_SELECTION createColor FormColors TB_FG tbFg tbBorder getSystemColor COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT createColor FormColors TB_BORDER tbBorder getSystemColor COLOR_WIDGET_NORMAL_SHADOW createColor FormColors TB_TOGGLE
public RGB get System Color int code return get Display get System Color code getRGB  getSystemColor getDisplay getSystemColor
Creates the color for the specified key using the provided RGB object The color object will be returned and also put into the registry When the class is disposed the color will be disposed with it param key the unique color key param rgb the RGB object return the allocated color object public Color create Color String key RGB rgb return create Color key rgb red rgb green rgb blue  createColor createColor
Creates the color for the specified key using the provided RGB values The color object will be returned and also put into the registry When the class is disposed the color will be disposed with it param key the unique color key param r red value param g green value param b blue value return the allocated color object public Color create Color String key int r int g int b Color c new Color display r g b color Registry put key c return c  createColor colorRegistry
Computes the border color relative to the background Allocated border color is designed to work well with white Otherwise stanard widget background color will be used protected void update Border Color if is White Background border get Color BORDER else border display get System Color SWT COLOR WIDGET BACKGROUND if border get Red background get Red border get Green background get Green border get Blue background get Blue border display get System Color SWT COLOR WIDGET DARK SHADOW  updateBorderColor isWhiteBackground getColor getSystemColor COLOR_WIDGET_BACKGROUND getRed getRed getGreen getGreen getBlue getBlue getSystemColor COLOR_WIDGET_DARK_SHADOW
Sets the background color All the toolkits that use this class will share the same background param bg background color public void set Background Color bg this background bg update Border Color  setBackground updateBorderColor
Sets the foreground color All the toolkits that use this class will share the same foreground param fg foreground color public void set Foreground Color fg this foreground fg  setForeground
Returns the current background color return the background color public Color get Background return background  getBackground
Returns the current foreground color return the foreground color public Color get Foreground return foreground  getForeground
Returns the computed border color Border color depends on the background and is recomputed whenever the background changes return the current border color public Color get Border Color return border  getBorderColor
Tests if the background is white White background has RGB value 255 255 255 return samp true samp if background is white samp false samp otherwise public boolean is White Background return background get Red 255 background get Green 255 background get Blue 255  isWhiteBackground getRed getGreen getBlue
Returns the color object for the provided key or samp null samp if not in the registry param key the color key return color object if found or samp null samp if not public Color get Color String key return Color color Registry get key  getColor colorRegistry
Disposes all the colors in the registry public void dispose Iterator e color Registry values iterator while e has Next Color e next dispose color Registry null  colorRegistry hasNext colorRegistry
Marks the colors shared This prevents toolkits that share this object from disposing it public void mark Shared this shared true  markShared
Tests if the colors are shared return code true code if shared code false code otherwise public boolean is Shared return shared  isShared
Blends c1 and c2 based on the provided ratio param c1 first color param c2 second color param ratio percentage of the first color in the blend private RGB blend RGB c1 RGB c2 int ratio int r blend c1 red c2 red ratio int g blend c1 green c2 green ratio int b blend c1 blue c2 blue ratio return new RGB r g b 
Blends two primary color components based on the provided ratio param v1 first component param v2 second component param ratio percentage of the first component in the blend return private int blend int v1 int v2 int ratio return ratio v1 100 ratio v2 100 

private class Group Listener implements Listener I Hyperlink Listener public void handle Event Event e switch e type case SWT Mouse Enter on Mouse Enter e break case SWT Mouse Exit on Mouse Exit e break case SWT Mouse Down on Mouse Down e break case SWT Dispose unhook Hyperlink e widget break  GroupListener IHyperlinkListener handleEvent MouseEnter onMouseEnter MouseExit onMouseExit MouseDown onMouseDown
private void on Mouse Enter Event e Hyperlink link Hyperlink e widget if get Active Background null link set Background get Active Background if get Active Foreground null link set Foreground get Active Foreground  onMouseEnter getActiveBackground setBackground getActiveBackground getActiveForeground setForeground getActiveForeground
private void on Mouse Exit Event e Hyperlink link Hyperlink e widget if get Background null link set Background get Background if get Foreground null link set Foreground get Foreground  onMouseExit getBackground setBackground getBackground getForeground setForeground getForeground
link set Foreground get Foreground public void link Activated Hyperlink Event e  setForeground getForeground linkActivated HyperlinkEvent
public void link Entered Hyperlink Event e if last Entered null link Exited last Entered Hyperlink link Hyperlink e widget link set Cursor get Hyperlink Cursor if get Hyperlink Underline Mode UNDERLINE HOVER link set Underlined true last Entered link  linkEntered HyperlinkEvent lastEntered linkExited lastEntered setCursor getHyperlinkCursor getHyperlinkUnderlineMode UNDERLINE_HOVER setUnderlined lastEntered
public void link Exited Hyperlink Event e link Exited Hyperlink e widget  linkExited HyperlinkEvent linkExited
private void link Exited Hyperlink link link set Cursor null if get Hyperlink Underline Mode UNDERLINE HOVER link set Underlined false if last Entered link last Entered null  linkExited setCursor getHyperlinkUnderlineMode UNDERLINE_HOVER setUnderlined lastEntered lastEntered
Creates a hyperlink group public Hyperlink Group Display display super display listener new Group Listener  HyperlinkGroup GroupListener
Returns the link that has been active the last or code null code if no link has been active yet or the last active link has been disposed return the last active link or code null code public Hyperlink get Last Activated return last Activated  getLastActivated lastActivated
Adds a hyperlink to the group to be jointly managed Hyperlink will be managed until it is disposed Settings like colors cursors and modes will affect all managed hyperlinks param link public void add Hyperlink link if get Background null link set Background get Background if get Foreground null link set Foreground get Foreground if get Hyperlink Underline Mode UNDERLINE ALWAYS link set Underlined true hook link  getBackground setBackground getBackground getForeground setForeground getForeground getHyperlinkUnderlineMode UNDERLINE_ALWAYS setUnderlined
Sets the group background and also sets the background of all the currently managed links param bg the new background public void set Background Color bg super set Background bg if links null for int i 0 i links size i Hyperlink label Hyperlink links get i label set Background bg  setBackground setBackground setBackground
Sets the group foreground and also sets the background of all the currently managed links param fg the new foreground public void set Foreground Color fg super set Foreground fg if links null for int i 0 i links size i Hyperlink label Hyperlink links get i label set Foreground fg  setForeground setForeground setForeground
Sets the hyperlink underline mode param mode the new hyperlink underline mode see Hyperlink Settings public void set Hyperlink Underline Mode int mode super set Hyperlink Underline Mode mode if links null for int i 0 i links size i Hyperlink label Hyperlink links get i label set Underlined mode UNDERLINE ALWAYS  HyperlinkSettings setHyperlinkUnderlineMode setHyperlinkUnderlineMode setUnderlined UNDERLINE_ALWAYS
private void hook Hyperlink link link add Listener SWT Mouse Down listener link add Hyperlink Listener listener link add Listener SWT Dispose listener link add Listener SWT Mouse Enter listener link add Listener SWT Mouse Exit listener links add link  addListener MouseDown addHyperlinkListener addListener addListener MouseEnter addListener MouseExit
private void unhook Hyperlink link link remove Listener SWT Mouse Down listener link remove Hyperlink Listener listener link remove Listener SWT Mouse Enter listener link remove Listener SWT Mouse Exit listener if last Activated link last Activated null if last Entered link last Entered null links remove link  removeListener MouseDown removeHyperlinkListener removeListener MouseEnter removeListener MouseExit lastActivated lastActivated lastEntered lastEntered
private void on Mouse Down Event e if e button 1 return last Activated Hyperlink e widget  onMouseDown lastActivated

private Color active Foreground The constructor param display the display to use when creating colors public Hyperlink Settings Display display initialize Default Foregrounds display  activeForeground HyperlinkSettings initializeDefaultForegrounds
Initializes the hyperlink foregrounds from the J Face defaults set for the entire workbench see J Face Colors param display the display to use when creating colors public void initialize Default Foregrounds Display display set Foreground J Face Colors get Hyperlink Text display set Active Foreground J Face Colors get Active Hyperlink Text display  JFace JFaceColors initializeDefaultForegrounds setForeground JFaceColors getHyperlinkText setActiveForeground JFaceColors getActiveHyperlinkText
Returns the background to use for the active hyperlink return active hyperlink background public Color get Active Background return active Background  getActiveBackground activeBackground
Returns the foreground to use for the active hyperlink return active hyperlink foreground public Color get Active Foreground return active Foreground  getActiveForeground activeForeground
Returns the background to use for the normal hyperlink return normal hyperlink background public Color get Background return background  getBackground
Returns the cursor to use when the hyperlink is active This cursor will be shown before hyperlink listeners have been notified of hyperlink activation and hidden when the notification method returns return the busy cursor public Cursor get Busy Cursor return Forms Resources get Busy Cursor  getBusyCursor FormsResources getBusyCursor
Returns the cursor to use when over text return the text cursor public Cursor get Text Cursor return Forms Resources get Text Cursor  getTextCursor FormsResources getTextCursor
Returns the foreground to use for the normal hyperlink return the normal hyperlink foreground public Color get Foreground return foreground  getForeground
Returns the cursor to use when hovering over the hyperlink return the hyperlink cursor public Cursor get Hyperlink Cursor return Forms Resources get Hand Cursor  getHyperlinkCursor FormsResources getHandCursor
Returns the underline mode to be used for all the hyperlinks in this group return one of UNDERLINE NEVER UNDERLINE ALWAYS UNDERLINE HOVER public int get Hyperlink Underline Mode return hyperlink Underline Mode  UNDERLINE_NEVER UNDERLINE_ALWAYS UNDERLINE_HOVER getHyperlinkUnderlineMode hyperlinkUnderlineMode
Sets the new active hyperlink background for all the links param new Active Background the new active background public void set Active Background Color new Active Background active Background new Active Background  newActiveBackground setActiveBackground newActiveBackground activeBackground newActiveBackground
Sets the new active hyperlink foreground for all the links param new Active Foreground the new active foreground public void set Active Foreground Color new Active Foreground active Foreground new Active Foreground  newActiveForeground setActiveForeground newActiveForeground activeForeground newActiveForeground
Sets the new hyperlink background for all the links param new Background the new hyperlink background public void set Background Color new Background background new Background  newBackground setBackground newBackground newBackground
Sets the new hyperlink foreground for all the links param new Foreground the new hyperlink foreground public void set Foreground Color new Foreground foreground new Foreground  newForeground setForeground newForeground newForeground
Sets the new hyperlink underline mode for all the links in this group param mode one of code UNDERLINE NEVER code code UNDERLINE HOVER code and code UNDERLINE ALWAYS code public void set Hyperlink Underline Mode int mode hyperlink Underline Mode mode  UNDERLINE_NEVER UNDERLINE_HOVER UNDERLINE_ALWAYS setHyperlinkUnderlineMode hyperlinkUnderlineMode

public interface I Details Page extends I Form Part I Part Selection Listener Creates the contents of the page in the provided parent param parent the parent to create the page in  IDetailsPage IFormPart IPartSelectionListener

public interface I Details Page Provider Returns the page key for the provided object The assumption is that the provider knows about various object types and is in position to cast the object into a type and call methods on it to determine the matching page key param object the input object return the page key for the provided object  IDetailsPageProvider
Object get Page Key Object object Returns the page for the provided key This method is the dynamic alternative to registering pages with the details part directly param key the page key return the matching page for the provided key  getPageKey

public interface I Form Part Initializes the part param form the managed form that manages the part  IFormPart
void initialize I Managed Form form Disposes the part allowing it to release allocated resources void dispose  IManagedForm
void dispose Returns true if the part has been modified with respect to the data loaded from the model return 
boolean is Dirty If part is displaying information loaded from a model this method instructs it to commit the new modified data back into the model param on Save indicates if commit is called during save operation or for some other reason for example if form is contained in a wizard or a multi page editor and the user is about to leave the page  isDirty onSave
Notifies the part that an object has been set as overall form s input The part can elect to react by revealing or selecting the object or do nothing if not applicable return code true code if the part has selected and revealed the input object code false code otherwise 
boolean set Form Input Object input Instructs form part to transfer focus to the widget that should has focus in that part The method can do nothing if it has no widgets capable of accepting focus  setFormInput
void set Focus Tests whether the form part is stale and needs refreshing Parts can receive notification from models that will make their content stale but may need to delay refreshing to improve performance for example there is no need to immediately refresh a part on a form that is current on a hidden page p It is important to differentiate stale and dirty states Part is dirty if user interacted with its editable widgets and changed the values In contrast part is stale when the data it presents in the widgets has been changed in the model without direct user interaction return code true code if the part needs refreshing code false code otherwise  setFocus
boolean is Stale Refreshes the part completely from the information freshly obtained from the model The method will not be called if the part is not stale Otherwise the part is responsible for clearing the stale flag after refreshing itself  isStale

public interface I Managed Form Returns the toolkit used by this form return the toolkit  IManagedForm
public Form Toolkit get Toolkit Returns the form widget managed by this form return the form widget  FormToolkit getToolkit
public Scrolled Form get Form Reflows the form as a result of the layout change param changed if code true code discard cached layout information  ScrolledForm getForm
public void reflow boolean changed A part can use this method to notify other parts that implement I Part Selection Listener about selection changes param part the part that broadcasts the selection param selection the selection in the part  IPartSelectionListener
public void fire Selection Changed I Form Part part I Selection selection Returns all the parts currently managed by this form return the managed parts  fireSelectionChanged IFormPart ISelection
I Form Part get Parts Adds the new part to the form param part the part to add  IFormPart getParts
void add Part I Form Part part Removes the part from the form param part the part to remove  addPart IFormPart
void remove Part I Form Part part Sets the input of this page to the provided object param input the new page input return code true code if the form contains this object code false code otherwise  removePart IFormPart
boolean set Input Object input Returns the current page input return page input object or code null code if not applicable  setInput
Object get Input Tests if form is dirty A managed form is dirty if at least one managed part is dirty return code true code if at least one managed part is dirty code false code otherwise  getInput
boolean is Dirty Notifies the form that the dirty state of one of its parts has changed The global dirty state of the form can be obtained by calling is Dirty see is Dirty  isDirty isDirty isDirty
void dirty State Changed Commits the dirty form All pending changes in the widgets are flushed into the model param on Save  dirtyStateChanged onSave
void commit boolean on Save Tests if form is stale A managed form is stale if at least one managed part is stale This can happen when the underlying model changes resulting in the presentation of the part being out of sync with the model and needing refreshing return code true code if the form is stale code false code otherwise  onSave
boolean is Stale Notifies the form that the stale state of one of its parts has changed The global stale state of the form can be obtained by calling is Stale  isStale isStale
void stale State Changed Refreshes the form by refreshing every part that is stale void refresh  staleStateChanged
void refresh Sets the container that owns this form Depending on the context the container may be wizard editor page editor etc param container the container of this form 
void set Container Object container Returns the container of this form return the form container  setContainer

public interface I Part Selection Listener Called when the provided part has changed selection state param part the selection source param selection the new selection  IPartSelectionListener

private Vector parts new Vector Creates a managed form in the provided parent Form toolkit and widget will be created and owned by this object param parent the parent widget public Managed Form Composite parent toolkit new Form Toolkit parent get Display owns Toolkit true form toolkit create Scrolled Form parent  ManagedForm FormToolkit getDisplay ownsToolkit createScrolledForm
Creates a managed form that will use the provided toolkit and param toolkit param form public Managed Form Form Toolkit toolkit Scrolled Form form this form form this toolkit toolkit  ManagedForm FormToolkit ScrolledForm
Add a part to be managed by this form param part part to add public void add Part I Form Part part parts add part  addPart IFormPart
Remove the part from this form param part part to remove public void remove Part I Form Part part parts remove part  removePart IFormPart
Returns all the parts current managed by this form public I Form Part get Parts return I Form Part parts to Array new I Form Part parts size  IFormPart getParts IFormPart toArray IFormPart
Returns the toolkit used by this form return the toolkit public Form Toolkit get Toolkit return toolkit  FormToolkit getToolkit
Returns the form widget managed by this form return the form widget public Scrolled Form get Form return form  ScrolledForm getForm
Reflows the form as a result of a layout change public void reflow boolean changed form reflow changed 
A part can use this method to notify other parts that implement I Part Selection Listener about selection changes param part the part that broadcasts the selection param selection the selection in the part see I Part Selection Listener public void fire Selection Changed I Form Part part I Selection selection for int i 0 i parts size i I Form Part cpart I Form Part parts get i if part equals cpart continue if cpart instanceof I Part Selection Listener I Part Selection Listener cpart selection Changed part selection  IPartSelectionListener IPartSelectionListener fireSelectionChanged IFormPart ISelection IFormPart IFormPart IPartSelectionListener IPartSelectionListener selectionChanged
Initializes all the parts in this form public void initialize for int i 0 i parts size i I Form Part part I Form Part parts get i part initialize this  IFormPart IFormPart
Disposes all the parts in this form public void dispose for int i 0 i parts size i I Form Part part I Form Part parts get i part dispose if owns Toolkit toolkit dispose  IFormPart IFormPart ownsToolkit
Refreshes the form by refreshes all the stale parts public void refresh int nrefreshed 0 for int i 0 i parts size i I Form Part part I Form Part parts get i if part is Stale part refresh nrefreshed if nrefreshed 0 form reflow true  IFormPart IFormPart isStale
Commits the form by commiting all the dirty parts to the model public void commit boolean on Save for int i 0 i parts size i I Form Part part I Form Part parts get i if part is Dirty part commit on Save  onSave IFormPart IFormPart isDirty onSave
Sets the form input Managed parts could opt to react to it by selecting and or revealing the object if they contain it param input the input object public boolean set Input Object input boolean page Result false this input input for int i 0 i parts size i I Form Part part I Form Part parts get i boolean result part set Form Input input if result page Result true return page Result  setInput pageResult IFormPart IFormPart setFormInput pageResult pageResult
return page Result public Object get Input return input  pageResult getInput
Transfers the focus to the first form part public void set Focus if parts size 0 I Form Part part I Form Part parts get 0 part set Focus  setFocus IFormPart IFormPart setFocus
public boolean is Dirty for int i 0 i parts size i I Form Part part I Form Part parts get i if part is Dirty return true return false  isDirty IFormPart IFormPart isDirty
public boolean is Stale for int i 0 i parts size i I Form Part part I Form Part parts get i if part is Stale return true return false  isStale IFormPart IFormPart isStale
see I Managed Form dirty State Changed public void dirty State Changed  IManagedForm dirtyStateChanged dirtyStateChanged
see I Managed Form stale State Changed public void stale State Changed  IManagedForm staleStateChanged staleStateChanged
return Returns the container public Object get Container return container  getContainer
param container The container to set public void set Container Object container this container container  setContainer

protected Sash Form sash Form Creates the content of the master details block inside the managed form This method should be called as late as possible inside the parent part param managed Form the managed form to create the block in public void create Content I Managed Form managed Form final Scrolled Form form managed Form get Form Form Toolkit toolkit managed Form get Toolkit Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 form get Body set Layout layout sash Form new Sash Form form get Body SWT NULL toolkit adapt sash Form false false sash Form set Menu form get Body get Menu sash Form set Layout Data new Grid Data Grid Data FILL BOTH create Master Part managed Form sash Form create Details Part managed Form sash Form create Tool Bar Actions managed Form form update Tool Bar  SashForm sashForm managedForm createContent IManagedForm managedForm ScrolledForm managedForm getForm FormToolkit managedForm getToolkit GridLayout GridLayout marginWidth marginHeight getBody setLayout sashForm SashForm getBody sashForm sashForm setMenu getBody getMenu sashForm setLayoutData GridData GridData FILL_BOTH createMasterPart managedForm sashForm createDetailsPart managedForm sashForm createToolBarActions managedForm updateToolBar
Implement this method to create a master part in the provided parent Typical master parts are section parts that contain tree or table viewer param managed Form the parent form param parent the parent composite protected abstract void create Master Part I Managed Form managed Form  managedForm createMasterPart IManagedForm managedForm
Composite parent Implement this method to statically register pages for the expected object types This mechanism can be used when there is 1 gt 1 mapping between object classes and details pages param details Part the details part  detailsPart
protected abstract void register Pages Details Part details Part Implement this method to create form tool bar actions and add them to the form tool bar if desired param managed Form the form that owns the tool bar  registerPages DetailsPart detailsPart managedForm
protected abstract void create Tool Bar Actions I Managed Form managed Form private void create Details Part final I Managed Form mform Composite parent details Part new Details Part mform parent SWT NULL mform add Part details Part register Pages details Part  createToolBarActions IManagedForm managedForm createDetailsPart IManagedForm detailsPart DetailsPart addPart detailsPart registerPages detailsPart

Creates a new section part based on the provided section param section the section to use public Section Part Section section this section section hook Listeners  SectionPart hookListeners
Creates a new section part inside the provided parent and using the provided toolkit The section part will create the section widget param parent the parent param toolkit the toolkit to use param style the section widget style public Section Part Composite parent Form Toolkit toolkit int style this toolkit create Section parent style  SectionPart FormToolkit createSection
section get Expansion Style Section TREE NODE 0 section add Expansion Listener new Expansion Adapter public void expansion State Changing Expansion Event e Section Part this expansion State Changing e get State  getExpansionStyle TREE_NODE addExpansionListener ExpansionAdapter expansionStateChanging ExpansionEvent SectionPart expansionStateChanging getState
Section Part this expansion State Changing e get State public void expansion State Changed Expansion Event e Section Part this expansion State Changed e get State  SectionPart expansionStateChanging getState expansionStateChanged ExpansionEvent SectionPart expansionStateChanged getState
protected void hook Listeners if section get Expansion Style Section TWISTIE 0 section get Expansion Style Section TREE NODE 0 section add Expansion Listener new Expansion Adapter public void expansion State Changing Expansion Event e Section Part this expansion State Changing e get State public void expansion State Changed Expansion Event e Section Part this expansion State Changed e get State  hookListeners getExpansionStyle getExpansionStyle TREE_NODE addExpansionListener ExpansionAdapter expansionStateChanging ExpansionEvent SectionPart expansionStateChanging getState expansionStateChanged ExpansionEvent SectionPart expansionStateChanged getState
Returns the section widget used in this part return the section widget public Section get Section return section  getSection
The section is about to expand or collapse param expanding code true code for expansion code false code for collapse protected void expansion State Changing boolean expanding  expansionStateChanging
The section has expanded or collapsed param expanded code true code for expansion code false code for collapse protected void expansion State Changed boolean expanded get Managed Form get Form reflow false  expansionStateChanged getManagedForm getForm
Instructs the section to grab keyboard focus The default implementation will transfer focus to the section client Subclasses may override and transfer focus to some widget in the client public void set Focus Control client section get Client if client null client set Focus  setFocus getClient setFocus

add Listener SWT Key Down new Listener public void handle Event Event e if e character r handle Activate e  addListener KeyDown handleEvent handleActivate
add Paint Listener new Paint Listener public void paint Control Paint Event e paint e  addPaintListener PaintListener paintControl PaintEvent
add Listener SWT Traverse new Listener public void handle Event Event e switch e detail case SWT TRAVERSE PAGE NEXT case SWT TRAVERSE PAGE PREVIOUS case SWT TRAVERSE ARROW NEXT case SWT TRAVERSE ARROW PREVIOUS case SWT TRAVERSE RETURN e doit false return e doit true  addListener handleEvent TRAVERSE_PAGE_NEXT TRAVERSE_PAGE_PREVIOUS TRAVERSE_ARROW_NEXT TRAVERSE_ARROW_PREVIOUS TRAVERSE_RETURN
Listener listener new Listener public void handle Event Event e switch e type case SWT Focus In has Focus true handle Enter e break case SWT Focus Out has Focus false handle Exit e break case SWT Default Selection handle Activate e break case SWT Mouse Enter handle Enter e break case SWT Mouse Exit handle Exit e break case SWT Mouse Up handle Mouse Up e break  handleEvent FocusIn hasFocus handleEnter FocusOut hasFocus handleExit DefaultSelection handleActivate MouseEnter handleEnter MouseExit handleExit MouseUp handleMouseUp
protected int margin Height 1 Creates a new hyperlink in the provided parent param parent the control parent param style the widget style public Abstract Hyperlink Composite parent int style super parent style add Listener SWT Key Down new Listener public void handle Event Event e if e character r handle Activate e add Paint Listener new Paint Listener public void paint Control Paint Event e paint e add Listener SWT Traverse new Listener public void handle Event Event e switch e detail case SWT TRAVERSE PAGE NEXT case SWT TRAVERSE PAGE PREVIOUS case SWT TRAVERSE ARROW NEXT case SWT TRAVERSE ARROW PREVIOUS case SWT TRAVERSE RETURN e doit false return e doit true Listener listener new Listener public void handle Event Event e switch e type case SWT Focus In has Focus true handle Enter e break case SWT Focus Out has Focus false handle Exit e break case SWT Default Selection handle Activate e break case SWT Mouse Enter handle Enter e break case SWT Mouse Exit handle Exit e break case SWT Mouse Up handle Mouse Up e break add Listener SWT Mouse Enter listener add Listener SWT Mouse Exit listener add Listener SWT Mouse Up listener add Listener SWT Focus In listener add Listener SWT Focus Out listener set Cursor Forms Resources get Hand Cursor  marginHeight AbstractHyperlink addListener KeyDown handleEvent handleActivate addPaintListener PaintListener paintControl PaintEvent addListener handleEvent TRAVERSE_PAGE_NEXT TRAVERSE_PAGE_PREVIOUS TRAVERSE_ARROW_NEXT TRAVERSE_ARROW_PREVIOUS TRAVERSE_RETURN handleEvent FocusIn hasFocus handleEnter FocusOut hasFocus handleExit DefaultSelection handleActivate MouseEnter handleEnter MouseExit handleExit MouseUp handleMouseUp addListener MouseEnter addListener MouseExit addListener MouseUp addListener FocusIn addListener FocusOut setCursor FormsResources getHandCursor
Adds the event listener to this hyperlink param listener the event listener to add public void add Hyperlink Listener I Hyperlink Listener listener if listeners null listeners new Vector if listeners contains listener listeners add listener  addHyperlinkListener IHyperlinkListener
Removes the event listener from this hyperlink param listener the event listener to remove public void remove Hyperlink Listener I Hyperlink Listener listener if listeners null return listeners remove listener  removeHyperlinkListener IHyperlinkListener
Returns the selection state of the control When focus is gained the state will be samp true samp it will switch to samp false samp when the control looses focus return code true code if the widget has focus code false code otherwise public boolean get Selection return has Focus  getSelection hasFocus
Called when hyperlink is entered Subclasses that override this method must call super protected void handle Enter Event e redraw if listeners null return int size listeners size Hyperlink Event he new Hyperlink Event this get Href get Text e state Mask for int i 0 i size i I Hyperlink Listener listener I Hyperlink Listener listeners get i listener link Entered he  handleEnter HyperlinkEvent HyperlinkEvent getHref getText stateMask IHyperlinkListener IHyperlinkListener linkEntered
Called when hyperlink is exited Subclasses that override this method must call super protected void handle Exit Event e redraw if listeners null return int size listeners size Hyperlink Event he new Hyperlink Event this get Href get Text e state Mask for int i 0 i size i I Hyperlink Listener listener I Hyperlink Listener listeners get i listener link Exited he  handleExit HyperlinkEvent HyperlinkEvent getHref getText stateMask IHyperlinkListener IHyperlinkListener linkExited
Called when hyperlink has been activated Subclasses that override this method must call super protected void handle Activate Event e if listeners null return int size listeners size set Cursor Forms Resources get Busy Cursor Hyperlink Event he new Hyperlink Event this get Href get Text e state Mask for int i 0 i size i I Hyperlink Listener listener I Hyperlink Listener listeners get i listener link Activated he if is Disposed set Cursor Forms Resources get Hand Cursor  handleActivate setCursor FormsResources getBusyCursor HyperlinkEvent HyperlinkEvent getHref getText stateMask IHyperlinkListener IHyperlinkListener linkActivated isDisposed setCursor FormsResources getHandCursor
Sets the object associated with this hyperlink Concrete implementation of this class can use if to store text UR Ls or model objects that need to be processed on hyperlink events param href the hyperlink object reference public void set Href Object href set Data href href  URLs setHref setData
Returns the object associated with this hyperlink see set Href return the hyperlink object reference public Object get Href return get Data href  setHref getHref getData
Returns the textual representation of this hyperlink suitable for showing in tool tips or on the status line return the hyperlink text public String get Text return get Tool Tip Text  getText getToolTipText
Paints the hyperlink as a reaction to the provided paint event param e the paint event 
protected abstract void paint Hyperlink GC gc Paints the control as a reaction to the provided paint event param e the paint event protected void paint Paint Event e GC gc e gc Rectangle client Area get Client Area if client Area width 0 client Area height 0 return Image buffer new Image get Display client Area width client Area height buffer set Background get Background GC bufferGC new GC buffer gc get Style bufferGC set Background get Background bufferGC fill Rectangle 0 0 client Area width client Area height paint Hyperlink bufferGC if has Focus Rectangle carea get Client Area bufferGC set Foreground get Foreground bufferGC draw Focus 0 0 carea width carea height gc draw Image buffer 0 0 bufferGC dispose buffer dispose  paintHyperlink PaintEvent clientArea getClientArea clientArea clientArea getDisplay clientArea clientArea setBackground getBackground getStyle setBackground getBackground fillRectangle clientArea clientArea paintHyperlink hasFocus getClientArea setForeground getForeground drawFocus drawImage
private void handle Mouse Up Event e if e button 1 return Point size get Size Filter out mouse up events outside the link This can happen when mouse is clicked dragged outside the link then released if e x 0 return if e y 0 return if e x size x return if e y size y return handle Activate e  handleMouseUp getSize handleActivate

public int right Margin 5 Creates a new instance of the column layout public Column Layout  rightMargin ColumnLayout
protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache if w Hint 0 return compute Size composite w Hint h Hint min Num Columns else if w Hint SWT DEFAULT return compute Size composite w Hint h Hint max Num Columns else return compute Size composite w Hint h Hint 1  computeSize wHint hHint flushCache wHint computeSize wHint hHint minNumColumns wHint computeSize wHint hHint maxNumColumns computeSize wHint hHint
private Point compute Size Composite parent int w Hint int h Hint int ncolumns Control children parent get Children int cwidth 0 int cheight 0 Point sizes new Point children length int cw Hint SWT DEFAULT if ncolumns 1 cw Hint w Hint left Margin right Margin ncolumns 1 horizontal Spacing if cw Hint 0 cw Hint 0 else cw Hint ncolumns for int i 0 i children length i sizes i compute Control Size children i cw Hint cwidth Math max cwidth sizes i x cheight sizes i y if ncolumns 1 must compute ncolumns w Hint left Margin right Margin horizontal Spacing cwidth horizontal Spacing ncolumns Math max ncolumns min Num Columns ncolumns Math min ncolumns max Num Columns int per Col Height cheight ncolumns if cheight ncolumns 0 per Col Height int col Height 0 int heights new int ncolumns int ncol 0 for int i 0 i sizes length i int child Height sizes i y if col Height child Height per Col Height ncol if ncol ncolumns overflow start filling in ncol find Shortest Column heights col Height heights ncol else col Height 0 col Height child Height if heights ncol 0 heights ncol vertical Spacing heights ncol child Height Point size new Point 0 0 for int i 0 i ncolumns i size y Math max size y heights i size x cwidth ncolumns ncolumns 1 horizontal Spacing size x left Margin right Margin System out println Column Layout whint w Hint size x size x size y top Margin bottom Margin return size  computeSize wHint hHint getChildren cwHint cwHint wHint leftMargin rightMargin horizontalSpacing cwHint cwHint cwHint computeControlSize cwHint wHint leftMargin rightMargin horizontalSpacing horizontalSpacing minNumColumns maxNumColumns perColHeight perColHeight colHeight childHeight colHeight childHeight perColHeight findShortestColumn colHeight colHeight colHeight childHeight verticalSpacing childHeight horizontalSpacing leftMargin rightMargin ColumnLayout wHint topMargin bottomMargin
private Point compute Control Size Control c int w Hint Column Layout Data cd Column Layout Data c get Layout Data int width Hint cd null cd width Hint w Hint int height Hint cd null cd height Hint SWT DEFAULT return c compute Size width Hint height Hint  computeControlSize wHint ColumnLayoutData ColumnLayoutData getLayoutData widthHint widthHint wHint heightHint heightHint computeSize widthHint heightHint
private int find Shortest Column int heights int result 0 int height Integer MAX VALUE for int i 0 i heights length i if height heights i height heights i result i return result  findShortestColumn MAX_VALUE
protected void layout Composite parent boolean flush Cache Control children parent get Children Rectangle carea parent get Client Area int cwidth 0 int cheight 0 Point sizes new Point children length for int i 0 i children length i sizes i compute Control Size children i SWT DEFAULT cwidth Math max cwidth sizes i x cheight sizes i y int ncolumns carea width left Margin right Margin horizontal Spacing cwidth horizontal Spacing ncolumns Math max ncolumns min Num Columns ncolumns Math min ncolumns max Num Columns int real Width carea width left Margin right Margin horizontal Spacing ncolumns horizontal Spacing int children Per Column children length ncolumns if children length ncolumns 0 children Per Column int col Width 0 int col Height 0 int ncol 0 int x left Margin y top Margin int ccol Count 0 for int i 0 i children length i Control child children i Point csize sizes i ccol Count Column Layout Data cd Column Layout Data child get Layout Data int align cd null cd horizontal Alignment Column Layout Data FILL int fill Width Math max cwidth real Width int child Width align Column Layout Data FILL fill Width csize x if y csize y bottom Margin carea height ccol Count children Per Column wrap x horizontal Spacing fill Width y top Margin ncol ccol Count 1 if ncol ncolumns 1 align Column Layout Data FILL child Width carea width x right Margin switch align case Column Layout Data LEFT case Column Layout Data FILL child set Bounds x y child Width csize y break case Column Layout Data RIGHT child set Bounds x fill Width child Width y child Width csize y break case Column Layout Data CENTER child set Bounds x fill Width 2 child Width 2 y child Width csize y break y csize y vertical Spacing  flushCache getChildren getClientArea computeControlSize leftMargin rightMargin horizontalSpacing horizontalSpacing minNumColumns maxNumColumns realWidth leftMargin rightMargin horizontalSpacing horizontalSpacing childrenPerColumn childrenPerColumn colWidth colHeight leftMargin topMargin ccolCount ccolCount ColumnLayoutData ColumnLayoutData getLayoutData horizontalAlignment ColumnLayoutData fillWidth realWidth childWidth ColumnLayoutData fillWidth bottomMargin ccolCount childrenPerColumn horizontalSpacing fillWidth topMargin ccolCount ColumnLayoutData childWidth rightMargin ColumnLayoutData ColumnLayoutData setBounds childWidth ColumnLayoutData setBounds fillWidth childWidth childWidth ColumnLayoutData setBounds fillWidth childWidth childWidth verticalSpacing
boolean public int compute Maximum Width Composite parent boolean changed return compute Size parent SWT DEFAULT SWT DEFAULT changed x  computeMaximumWidth computeSize
boolean public int compute Minimum Width Composite parent boolean changed return compute Size parent 0 SWT DEFAULT changed x  computeMinimumWidth computeSize

public int horizontal Alignment FILL Convinience constructor for the class param w Hint width hint for the control param h Hint height hint for the control public Column Layout Data int w Hint int h Hint this width Hint w Hint this height Hint h Hint  horizontalAlignment wHint hHint ColumnLayoutData wHint hHint widthHint wHint heightHint hHint
Convinience constructor for the class param w Hint width hint for the control public Column Layout Data int w Hint this width Hint w Hint  wHint ColumnLayoutData wHint widthHint wHint
The default constructor public Column Layout Data  ColumnLayoutData

private class Expandable Layout extends Layout implements I Layout Extension protected void layout Composite parent boolean changed Rectangle client Area parent get Client Area int thmargin 0 int tvmargin 0 if expansion Style TITLE BAR 0 thmargin GAP tvmargin GAP int x margin Width thmargin int y margin Height tvmargin Point tsize null Point tcsize null if toggle null tsize toggle compute Size SWT DEFAULT SWT DEFAULT changed int twidth client Area width margin Width margin Width thmargin thmargin if tsize null twidth tsize x GAP if text Client null tcsize text Client compute Size SWT DEFAULT SWT DEFAULT changed if tcsize null twidth tcsize x GAP Point size null if text Label null size text Label compute Size twidth SWT DEFAULT changed if text Label instanceof Label Point def Size text Label compute Size SWT DEFAULT SWT DEFAULT changed if def Size y size y One line pick the smaller of the two widths size x Math min def Size x size x if toggle null GC gc new GC Expandable Composite this gc set Font get Font Font Metrics fm gc get Font Metrics int font Height fm get Height gc dispose int ty font Height 2 tsize y 2 1 ty Math max ty 0 ty margin Height tvmargin toggle set Location x ty toggle set Size tsize x tsize x GAP if text Label null text Label set Bounds x y size x size y if text Client null int tcx client Area width tcsize x thmargin text Client set Bounds tcx y tcsize x tcsize y if size null y size y if expansion Style TITLE BAR 0 y tvmargin if get Separator Control null y VSPACE get Separator Control set Bounds margin Width y client Area width margin Width margin Width SEPARATOR HEIGHT y SEPARATOR HEIGHT if expanded y VSPACE if expanded int area Width client Area width margin Width margin Width thmargin thmargin int cx margin Width thmargin if expansion Style CLIENT INDENT 0 cx x area Width x if client null Point dsize null Control desc get Description Control if desc null dsize desc compute Size area Width SWT DEFAULT changed desc set Bounds cx y dsize x dsize y y dsize y client Vertical Spacing else y client Vertical Spacing VSPACE int cwidth client Area width margin Width margin Width cx int cwidth area Width int cheight client Area height margin Height margin Height y client set Bounds cx y cwidth cheight  ExpandableLayout ILayoutExtension clientArea getClientArea expansionStyle TITLE_BAR marginWidth marginHeight computeSize clientArea marginWidth marginWidth textClient textClient computeSize textLabel textLabel computeSize textLabel defSize textLabel computeSize defSize defSize ExpandableComposite setFont getFont FontMetrics getFontMetrics fontHeight getHeight fontHeight marginHeight setLocation setSize textLabel textLabel setBounds textClient clientArea textClient setBounds expansionStyle TITLE_BAR getSeparatorControl getSeparatorControl setBounds marginWidth clientArea marginWidth marginWidth SEPARATOR_HEIGHT SEPARATOR_HEIGHT areaWidth clientArea marginWidth marginWidth marginWidth expansionStyle CLIENT_INDENT areaWidth getDescriptionControl computeSize areaWidth setBounds clientVerticalSpacing clientVerticalSpacing clientArea marginWidth marginWidth areaWidth clientArea marginHeight marginHeight setBounds
protected Point compute Size Composite parent int w Hint int h Hint boolean changed int width 0 height 0 Point tsize null int twidth 0 if toggle null tsize toggle compute Size SWT DEFAULT SWT DEFAULT changed twidth tsize x GAP int thmargin 0 int tvmargin 0 if expansion Style TITLE BAR 0 thmargin GAP tvmargin GAP int innerw Hint w Hint if innerw Hint SWT DEFAULT innerw Hint twidth int innert Hint innerw Hint Point tcsize null if text Client null tcsize text Client compute Size SWT DEFAULT SWT DEFAULT changed if innert Hint SWT DEFAULT innert Hint GAP tcsize x Point size null if text Label null size text Label compute Size innert Hint SWT DEFAULT changed if text Label instanceof Label Point def Size text Label compute Size SWT DEFAULT SWT DEFAULT changed if def Size y size y One line pick the smaller of the two widths size x Math min def Size x size x if size null width size x int sizey size null size y 0 height tcsize null Math max tcsize y sizey sizey if get Separator Control null height VSPACE SEPARATOR HEIGHT if expanded client null height VSPACE if expansion Style TITLE BAR 0 height VSPACE if expanded expansion Style COMPACT 0 client null int cw Hint w Hint if cw Hint SWT DEFAULT cw Hint tvmargin tvmargin if expansion Style CLIENT INDENT 0 cw Hint innerw Hint Point dsize null Point csize client compute Size Form Util get Width Hint cw Hint client SWT DEFAULT changed if get Description Control null int dw Hint cw Hint if dw Hint SWT DEFAULT dw Hint csize x tvmargin tvmargin if expansion Style CLIENT INDENT 0 dw Hint twidth dsize get Description Control compute Size dw Hint SWT DEFAULT changed if dsize null if expansion Style CLIENT INDENT 0 dsize x twidth width Math max width dsize x if expanded height dsize y client Vertical Spacing else height client Vertical Spacing VSPACE if expansion Style CLIENT INDENT 0 csize x twidth width Math max width csize x if expanded height csize y if toggle null height height sizey Math max sizey tsize y width twidth return new Point width margin Width margin Width thmargin thmargin height margin Height margin Height tvmargin tvmargin  computeSize wHint hHint computeSize expansionStyle TITLE_BAR innerwHint wHint innerwHint innerwHint innertHint innerwHint textClient textClient computeSize innertHint innertHint textLabel textLabel computeSize innertHint textLabel defSize textLabel computeSize defSize defSize getSeparatorControl SEPARATOR_HEIGHT expansionStyle TITLE_BAR expansionStyle cwHint wHint cwHint cwHint expansionStyle CLIENT_INDENT cwHint innerwHint computeSize FormUtil getWidthHint cwHint getDescriptionControl dwHint cwHint dwHint dwHint expansionStyle CLIENT_INDENT dwHint getDescriptionControl computeSize dwHint expansionStyle CLIENT_INDENT clientVerticalSpacing clientVerticalSpacing expansionStyle CLIENT_INDENT marginWidth marginWidth marginHeight marginHeight
public int compute Minimum Width Composite parent boolean changed int width 0 Point size null if text Label null size text Label compute Size 5 SWT DEFAULT changed Point tcsize null if text Client null tcsize text Client compute Size SWT DEFAULT SWT DEFAULT changed int thmargin 0 int tvmargin 0 if expansion Style TITLE BAR 0 thmargin GAP tvmargin GAP if size null width size x if tcsize null width GAP tcsize x if expanded expansion Style COMPACT 0 client null Point dsize null if get Description Control null dsize get Description Control compute Size 5 SWT DEFAULT changed width Math max width dsize x int cwidth Form Util compute Minimum Width client changed width Math max width cwidth if toggle null Point tsize toggle compute Size SWT DEFAULT SWT DEFAULT changed width tsize x GAP return width margin Width margin Width thmargin thmargin  computeMinimumWidth textLabel textLabel computeSize textClient textClient computeSize expansionStyle TITLE_BAR expansionStyle getDescriptionControl getDescriptionControl computeSize FormUtil computeMinimumWidth computeSize marginWidth marginWidth
public int compute Maximum Width Composite parent boolean changed int width 0 Point size null if text Label null text Label compute Size SWT DEFAULT SWT DEFAULT changed Point tcsize null int thmargin 0 int tvmargin 0 if expansion Style TITLE BAR 0 thmargin GAP tvmargin GAP if text Client null tcsize text Client compute Size SWT DEFAULT SWT DEFAULT changed if size null width size x if tcsize null width GAP tcsize x if expanded expansion Style COMPACT 0 client null Point dsize null if get Description Control null dsize get Description Control compute Size SWT DEFAULT SWT DEFAULT changed width Math max width dsize x int cwidth Form Util compute Maximum Width client changed width Math max width cwidth if toggle null Point tsize toggle compute Size SWT DEFAULT SWT DEFAULT changed width tsize x GAP return width margin Width margin Width thmargin thmargin  computeMaximumWidth textLabel textLabel computeSize expansionStyle TITLE_BAR textClient textClient computeSize expansionStyle getDescriptionControl getDescriptionControl computeSize FormUtil computeMaximumWidth computeSize marginWidth marginWidth
Creates an expandable composite using a TWISTIE toggle param parent the parent composite param style SWT style bits public Expandable Composite Composite parent int style this parent style TWISTIE  ExpandableComposite
if expansion Style TITLE BAR 0 this add Paint Listener new Paint Listener public void paint Control Paint Event e on Paint e  expansionStyle TITLE_BAR addPaintListener PaintListener paintControl PaintEvent onPaint
toggle set Expanded expanded toggle add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e toggle State  setExpanded addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent toggleState
Hyperlink link new Hyperlink this SWT WRAP link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e toggle set Expanded toggle is Expanded toggle State  addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent setExpanded isExpanded toggleState
label set Cursor Forms Resources get Hand Cursor label add Listener SWT Mouse Down new Listener public void handle Event Event e if toggle null toggle set Focus  setCursor FormsResources getHandCursor addListener MouseDown handleEvent setFocus
label add Listener SWT Mouse Up new Listener public void handle Event Event e label set Cursor Forms Resources get Busy Cursor toggle set Expanded toggle is Expanded toggle State label set Cursor Forms Resources get Hand Cursor  addListener MouseUp handleEvent setCursor FormsResources getBusyCursor setExpanded isExpanded toggleState setCursor FormsResources getHandCursor
Creates the expandable composite in the provided parent param parent the parent param style the control style param expansion Style the style of the expansion widget TREE NODE TWISTIE CLIENT INDENT COMPACT FOCUS TITLE public Expandable Composite Composite parent int style int expansion Style super parent style this expansion Style expansion Style super set Layout new Expandable Layout listeners new Vector if expansion Style TITLE BAR 0 this add Paint Listener new Paint Listener public void paint Control Paint Event e on Paint e if expansion Style TWISTIE 0 toggle new Twistie this SWT NULL else if expansion Style TREE NODE 0 toggle new Tree Node this SWT NULL else expanded true if expansion Style EXPANDED 0 expanded true if toggle null toggle set Expanded expanded toggle add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e toggle State if expansion Style FOCUS TITLE 0 Hyperlink link new Hyperlink this SWT WRAP link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e toggle set Expanded toggle is Expanded toggle State text Label link else if expansion Style NO TITLE 0 final Label label new Label this SWT WRAP if is Fixed Style label set Cursor Forms Resources get Hand Cursor label add Listener SWT Mouse Down new Listener public void handle Event Event e if toggle null toggle set Focus label add Listener SWT Mouse Up new Listener public void handle Event Event e label set Cursor Forms Resources get Busy Cursor toggle set Expanded toggle is Expanded toggle State label set Cursor Forms Resources get Hand Cursor text Label label if text Label null text Label set Menu get Menu  expansionStyle TREE_NODE CLIENT_INDENT FOCUS_TITLE ExpandableComposite expansionStyle expansionStyle expansionStyle setLayout ExpandableLayout expansionStyle TITLE_BAR addPaintListener PaintListener paintControl PaintEvent onPaint expansionStyle expansionStyle TREE_NODE TreeNode expansionStyle setExpanded addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent toggleState expansionStyle FOCUS_TITLE addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent setExpanded isExpanded toggleState textLabel expansionStyle NO_TITLE isFixedStyle setCursor FormsResources getHandCursor addListener MouseDown handleEvent setFocus addListener MouseUp handleEvent setCursor FormsResources getBusyCursor setExpanded isExpanded toggleState setCursor FormsResources getHandCursor textLabel textLabel textLabel setMenu getMenu
Prevents assignment of the layout manager expandable composite uses its own layout public final void set Layout Layout layout  setLayout
Sets the background of all the custom controls in the expandable public void set Background Color bg super set Background bg if text Label null text Label set Background bg if toggle null toggle set Background bg  setBackground setBackground textLabel textLabel setBackground setBackground
Sets the foreground of all the custom controls in the expandable public void set Foreground Color fg super set Foreground fg if text Label null text Label set Foreground fg if toggle null toggle set Foreground fg  setForeground setForeground textLabel textLabel setForeground setForeground
Sets the color of the toggle control param c the color object public void set Toggle Color Color c if toggle null toggle set Decoration Color c  setToggleColor setDecorationColor
Sets the active color of the toggle control when the mouse enters the toggle area param c the active color object public void set Active Toggle Color Color c if toggle null toggle set Hover Decoration Color c  setActiveToggleColor setHoverDecorationColor
Sets the fonts of all the custom controls in the expandable public void set Font Font font super set Font font if text Label null text Label set Font font if toggle null toggle set Font font  setFont setFont textLabel textLabel setFont setFont
Sets the client of this expandable composite The client must not be samp null samp and must be a direct child of this container param client the client that will be expanded or collapsed public void set Client Control client Assert is True client null client get Parent equals this this client client  setClient isTrue getParent
Returns the current expandable client return the client control public Control get Client return client  getClient
Sets the title of the expandable composite The title will act as a hyperlink and activating it will toggle the client between expanded and collapsed state param title the new title string see get Title public void set Text String title if text Label instanceof Label Label text Label set Text title else if text Label instanceof Hyperlink Hyperlink text Label set Text title  getTitle setText textLabel textLabel setText textLabel textLabel setText
Returns the title string return the title string see set Title public String get Text if text Label instanceof Label return Label text Label get Text else if text Label instanceof Hyperlink return Hyperlink text Label get Text else return  setTitle getText textLabel textLabel getText textLabel textLabel getText
Tests the expanded state of the composite return samp true samp if expanded samp false samp if collapsed public boolean is Expanded return expanded  isExpanded
Returns the bitwise O Red style bits for the expansion control return public int get Expansion Style return expansion Style  ORed getExpansionStyle expansionStyle
Programmatically changes expanded state param expanded the new expanded state public void set Expanded boolean expanded internal Set Expanded expanded if toggle null toggle set Expanded expanded  setExpanded internalSetExpanded setExpanded
Performs the expansion state change for the expandable control param expanded the expansion state protected void internal Set Expanded boolean expanded if this expanded expanded this expanded expanded if get Description Control null get Description Control set Visible expanded if client null client set Visible expanded layout  internalSetExpanded getDescriptionControl getDescriptionControl setVisible setVisible
Adds the listener that will be notified when the expansion state changes param listener the listener to add public void add Expansion Listener I Expansion Listener listener if listeners contains listener listeners add listener  addExpansionListener IExpansionListener
Removes the expansion listener param listener the listner to remove public void remove Expansion Listener I Expansion Listener listener if listeners contains listener listeners remove listener  removeExpansionListener IExpansionListener
private void toggle State boolean new State is Expanded fire Expanding new State true internal Set Expanded is Expanded fire Expanding new State false  toggleState newState isExpanded fireExpanding newState internalSetExpanded isExpanded fireExpanding newState
If TITLE BAR style is used title bar decoration will be painted behind the text in this method The default implementation does nothing subclasses are responsible for rendering the title area param e the paint event protected void on Paint Paint Event e  TITLE_BAR onPaint PaintEvent
private void fire Expanding boolean state boolean before int size listeners size if size 0 return Expansion Event e new Expansion Event this state for int i 0 i size i I Expansion Listener listener I Expansion Listener listeners get i if before listener expansion State Changing e else listener expansion State Changed e  fireExpanding ExpansionEvent ExpansionEvent IExpansionListener IExpansionListener expansionStateChanging expansionStateChanged
Returns description control that will be placed under the title if present return the description control or samp null samp if not used protected Control get Description Control return null  getDescriptionControl
Returns the separator control that will be placed between the title and the description if present return the separator control or samp null samp if not used protected Control get Separator Control return null  getSeparatorControl
Computes the size of the expandable composite see org eclipse swt widgets Composite compute Size public Point compute Size int w Hint int h Hint boolean changed check Widget Point size Expandable Layout layout Expandable Layout get Layout if w Hint SWT DEFAULT h Hint SWT DEFAULT size layout compute Size this w Hint h Hint changed else size new Point w Hint h Hint Rectangle trim compute Trim 0 0 size x size y return new Point trim width trim height  computeSize computeSize wHint hHint checkWidget ExpandableLayout ExpandableLayout getLayout wHint hHint computeSize wHint hHint wHint hHint computeTrim
Returns samp true samp if the composite is fixed i e cannot be expanded or collapsed Fixed control will still contain the title separator and description if present as well as the client but will be in the permanent expanded state and the toggle affordance will not be shown return samp true samp if the control is fixed in the expanded state samp false samp if it can be collapsed protected boolean is Fixed Style return expansion Style TWISTIE 0 expansion Style TREE NODE 0  isFixedStyle expansionStyle expansionStyle TREE_NODE
Returns the text client control return Returns the text client control if specified or code null code if not public Control get Text Client return text Client  getTextClient textClient
Sets the text client control Text client is a control that is a child of the expandable composite and is placed to the right of the text It can be used to place small image hyperlinks If more than one control is needed use Composite to hold them Care should be taken that the height of the control is comparable to the height of the text param text Client the text Client to set or code null code if not needed any more public void set Text Client Control text Client if this text Client null this text Client dispose this text Client text Client  textClient textClient setTextClient textClient textClient textClient textClient textClient

private class Form Layout extends Layout implements I Layout Extension public int compute Minimum Width Composite composite boolean flush Cache return compute Size composite 5 SWT DEFAULT flush Cache x  FormLayout ILayoutExtension computeMinimumWidth flushCache computeSize flushCache
return compute Size composite 5 SWT DEFAULT flush Cache x public int compute Maximum Width Composite composite boolean flush Cache return compute Size composite SWT DEFAULT SWT DEFAULT flush Cache x  computeSize flushCache computeMaximumWidth flushCache computeSize flushCache
public Point compute Size Composite composite int w Hint int h Hint boolean flush Cache int width 0 int height 0 if text null GC gc new GC composite gc set Font get Font if w Hint SWT DEFAULT Point wsize Form Util compute Wrap Size gc text w Hint width wsize x height wsize y else Point extent gc text Extent text width extent x height extent y gc dispose if tool Bar Manager null Tool Bar tool Bar tool Bar Manager get Control if tool Bar null Point tbsize tool Bar compute Size SWT DEFAULT SWT DEFAULT if width 0 width TITLE GAP width tbsize x height Math max height tbsize y if height 0 height TITLE VMARGIN 2 if width 0 width TITLE HMARGIN 2 int ih Hint h Hint if ih Hint 0 ih Hint SWT DEFAULT ih Hint height Point bsize body compute Size Form Util get Width Hint w Hint body Form Util get Height Hint ih Hint body flush Cache width Math max bsize x width height bsize y return new Point width height  computeSize wHint hHint flushCache setFont getFont wHint FormUtil computeWrapSize wHint textExtent toolBarManager ToolBar toolBar toolBarManager getControl toolBar toolBar computeSize TITLE_GAP TITLE_VMARGIN TITLE_HMARGIN ihHint hHint ihHint ihHint ihHint computeSize FormUtil getWidthHint wHint FormUtil getHeightHint ihHint flushCache
protected void layout Composite composite boolean flush Cache Rectangle carea composite get Client Area int height 0 Point tbsize null int twidth carea width TITLE HMARGIN 2 if tool Bar Manager null Tool Bar tool Bar tool Bar Manager get Control if tool Bar null tbsize tool Bar compute Size SWT DEFAULT SWT DEFAULT tool Bar set Bounds carea width 1 TITLE HMARGIN tbsize x TITLE VMARGIN tbsize x tbsize y height tbsize y if tbsize null twidth tbsize x TITLE GAP if text null GC gc new GC composite gc set Font get Font height Form Util compute Wrap Size gc text twidth y gc dispose if tbsize null height Math max tbsize y height if height 0 height TITLE VMARGIN 2 body set Bounds 0 height carea width carea height height  flushCache getClientArea TITLE_HMARGIN toolBarManager ToolBar toolBar toolBarManager getControl toolBar toolBar computeSize toolBar setBounds TITLE_HMARGIN TITLE_VMARGIN TITLE_GAP setFont getFont FormUtil computeWrapSize TITLE_VMARGIN setBounds
super parent SWT NO BACKGROUND style add Listener SWT Paint new Listener public void handle Event Event e on Paint e gc  NO_BACKGROUND addListener handleEvent onPaint
Creates the form content control as a child of the provided parent param parent the parent widget public Form Composite parent int style super parent SWT NO BACKGROUND style add Listener SWT Paint new Listener public void handle Event Event e on Paint e gc super set Layout new Form Layout body new Layout Composite this SWT NULL body set Menu parent get Menu  NO_BACKGROUND addListener handleEvent onPaint setLayout FormLayout LayoutComposite setMenu getMenu
Passes the menu to the form body param menu public void set Menu Menu menu super set Menu menu body set Menu menu  setMenu setMenu setMenu
Fully delegates the size computation to the internal layout manager public final Point compute Size int w Hint int h Hint boolean changed return Form Layout get Layout compute Size this w Hint h Hint changed  computeSize wHint hHint FormLayout getLayout computeSize wHint hHint
Prevents from changing the custom control layout public final void set Layout Layout layout  setLayout
Returns the title text that will be rendered at the top of the form return the title text public String get Text return text  getText
Sets the foreground color of the form This color will also be used for the body public void set Foreground Color fg super set Foreground fg body set Foreground fg  setForeground setForeground setForeground
Sets the background color of the form This color will also be used for the body public void set Background Color bg super set Background bg body set Background bg if tool Bar Manager null tool Bar Manager get Control set Background bg  setBackground setBackground setBackground toolBarManager toolBarManager getControl setBackground
Sets the text to be rendered at the top of the form above the body as a title param text the title text public void set Text String text this text text layout redraw  setText
Returns the optional background image of this form The image is rendered starting at the position 0 0 and is painted behind the title return Returns the background image public Image get Background Image return background Image  getBackgroundImage backgroundImage
Sets the optional background image to be rendered behind the title starting at the position 0 0 param background Image The background Image to set public void set Background Image Image background Image this background Image background Image redraw  backgroundImage backgroundImage setBackgroundImage backgroundImage backgroundImage backgroundImage
add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if tool Bar Manager null tool Bar Manager dispose tool Bar Manager null  addDisposeListener DisposeListener widgetDisposed DisposeEvent toolBarManager toolBarManager toolBarManager
Returns the tool bar manager that is used to manage tool items in the form s title area return form tool bar manager public I Tool Bar Manager get Tool Bar Manager if tool Bar Manager null tool Bar Manager new Tool Bar Manager SWT FLAT Tool Bar toolbar tool Bar Manager create Control this toolbar set Background get Background toolbar set Foreground get Foreground toolbar set Cursor Forms Resources get Hand Cursor add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if tool Bar Manager null tool Bar Manager dispose tool Bar Manager null return tool Bar Manager  IToolBarManager getToolBarManager toolBarManager toolBarManager ToolBarManager ToolBar toolBarManager createControl setBackground getBackground setForeground getForeground setCursor FormsResources getHandCursor addDisposeListener DisposeListener widgetDisposed DisposeEvent toolBarManager toolBarManager toolBarManager toolBarManager
Updates the local tool bar manager if used Does nothing if local tool bar manager has not been created yet public void update Tool Bar if tool Bar Manager null tool Bar Manager update false  updateToolBar toolBarManager toolBarManager
Returns the container that occupies the body of the form the form area below the title Use this container as a parent for the controls that should be in the form No layout manager has been set on the form body return Returns the body of the form public Composite get Body return body  getBody
private void on Paint GC gc if text null return Rectangle carea get Client Area gc set Font get Font Point text Size Form Util compute Wrap Size gc text carea width TITLE HMARGIN TITLE HMARGIN int theight TITLE HMARGIN text Size y TITLE HMARGIN TITLE GAP Image buffer new Image get Display carea width theight GC bufferGC new GC buffer gc get Style bufferGC set Background get Background bufferGC set Foreground get Foreground bufferGC set Font get Font Rectangle tbounds new Rectangle TITLE HMARGIN TITLE VMARGIN carea width TITLE HMARGIN TITLE HMARGIN text Size y bufferGC fill Rectangle 0 0 carea width theight if background Image null draw Background Image bufferGC carea width TITLE VMARGIN text Size y TITLE VMARGIN Form Util paint Wrap Text bufferGC text tbounds gc draw Image buffer 0 0 bufferGC dispose buffer dispose  onPaint getClientArea setFont getFont textSize FormUtil computeWrapSize TITLE_HMARGIN TITLE_HMARGIN TITLE_HMARGIN textSize TITLE_HMARGIN TITLE_GAP getDisplay getStyle setBackground getBackground setForeground getForeground setFont getFont TITLE_HMARGIN TITLE_VMARGIN TITLE_HMARGIN TITLE_HMARGIN textSize fillRectangle backgroundImage drawBackgroundImage TITLE_VMARGIN textSize TITLE_VMARGIN FormUtil paintWrapText drawImage
private void draw Background Image GC gc int width int height if background Image Tiled Rectangle ibounds background Image get Bounds int x 0 int y 0 loop and tile image until the entire title area is covered for gc draw Image background Image x y x ibounds width if x width wrap x 0 y ibounds height if y height break else gc draw Image background Image 0 0  drawBackgroundImage backgroundImageTiled backgroundImage getBounds drawImage backgroundImage drawImage backgroundImage
return Returns the background Image Tiled public boolean is Background Image Tiled return background Image Tiled  backgroundImageTiled isBackgroundImageTiled backgroundImageTiled
param background Image Tiled The background Image Tiled to set public void set Background Image Tiled boolean background Image Tiled this background Image Tiled background Image Tiled if is Visible redraw  backgroundImageTiled backgroundImageTiled setBackgroundImageTiled backgroundImageTiled backgroundImageTiled backgroundImageTiled isVisible

private String loading Text Loading private class Form Text Layout extends Layout implements I Layout Extension public Form Text Layout  loadingText FormTextLayout ILayoutExtension FormTextLayout
public Form Text Layout public int compute Maximum Width Composite parent boolean changed return compute Size parent SWT DEFAULT SWT DEFAULT changed x  FormTextLayout computeMaximumWidth computeSize
return compute Size parent SWT DEFAULT SWT DEFAULT changed x public int compute Minimum Width Composite parent boolean changed return compute Size parent 5 SWT DEFAULT true x  computeSize computeMinimumWidth computeSize
public Point compute Size Composite composite int w Hint int h Hint boolean changed int inner Width w Hint if is Loading return compute Loading if inner Width SWT DEFAULT inner Width margin Width 2 Point text Size compute Text Size inner Width int text Width text Size x 2 margin Width int text Height text Size y 2 margin Height Point result new Point text Width text Height return result  computeSize wHint hHint innerWidth wHint isLoading computeLoading innerWidth innerWidth marginWidth textSize computeTextSize innerWidth textWidth textSize marginWidth textHeight textSize marginHeight textWidth textHeight
private Point compute Loading GC gc new GC Form Text this gc set Font get Font String loading Text get Loading Text Point size gc text Extent loading Text gc dispose size x 2 margin Width size y 2 margin Height return size  computeLoading FormText setFont getFont loadingText getLoadingText textExtent loadingText marginWidth marginHeight
private Point compute Text Size int w Hint Paragraph paragraphs model get Paragraphs GC gc new GC Form Text this gc set Font get Font Locator loc new Locator int width w Hint SWT DEFAULT w Hint 0 Font Metrics fm gc get Font Metrics int line Height fm get Height for int i 0 i paragraphs length i Paragraph p paragraphs i if i 0 get Paragraphs Separated p get Add Vertical Space loc y get Paragraph Spacing line Height loc row Height 0 loc indent p get Indent loc x p get Indent Paragraph Segment segments p get Segments if segments length 0 for int j 0 j segments length j Paragraph Segment segment segments j segment advance Locator gc w Hint loc resource Table false width Math max width loc width loc y loc row Height else empty new line loc y line Height gc dispose return new Point width loc y  computeTextSize wHint getParagraphs FormText setFont getFont wHint wHint FontMetrics getFontMetrics lineHeight getHeight getParagraphsSeparated getAddVerticalSpace getParagraphSpacing lineHeight rowHeight getIndent getIndent ParagraphSegment getSegments ParagraphSegment advanceLocator wHint resourceTable rowHeight lineHeight
return new Point width loc y protected void layout Composite composite boolean flush Cache  flushCache
add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e model dispose Font bold Font Font resource Table get Form Text Model BOLD FONT ID if bold Font null bold Font dispose  addDisposeListener DisposeListener widgetDisposed DisposeEvent boldFont resourceTable FormTextModel BOLD_FONT_ID boldFont boldFont
add Paint Listener new Paint Listener public void paint Control Paint Event e paint e  addPaintListener PaintListener paintControl PaintEvent
add Listener SWT Key Down new Listener public void handle Event Event e if e character r activate Selected Link return  addListener KeyDown handleEvent activateSelectedLink
add Listener SWT Traverse new Listener public void handle Event Event e switch e detail case SWT TRAVERSE PAGE NEXT case SWT TRAVERSE PAGE PREVIOUS case SWT TRAVERSE ARROW NEXT case SWT TRAVERSE ARROW PREVIOUS e doit false return if model has Focus Segments e doit true return if e detail SWT TRAVERSE TAB NEXT e doit advance true else if e detail SWT TRAVERSE TAB PREVIOUS e doit advance false else if e detail SWT TRAVERSE RETURN e doit true  addListener handleEvent TRAVERSE_PAGE_NEXT TRAVERSE_PAGE_PREVIOUS TRAVERSE_ARROW_NEXT TRAVERSE_ARROW_PREVIOUS hasFocusSegments TRAVERSE_TAB_NEXT TRAVERSE_TAB_PREVIOUS TRAVERSE_RETURN
add Focus Listener new Focus Listener public void focus Gained Focus Event e if has Focus has Focus true handle Focus Change  addFocusListener FocusListener focusGained FocusEvent hasFocus hasFocus handleFocusChange
public void focus Lost Focus Event e if has Focus has Focus false handle Focus Change  focusLost FocusEvent hasFocus hasFocus handleFocusChange
add Mouse Listener new Mouse Listener public void mouse Double Click Mouse Event e  addMouseListener MouseListener mouseDoubleClick MouseEvent
public void mouse Double Click Mouse Event e public void mouse Down Mouse Event e select a link handle Mouse Click e true  mouseDoubleClick MouseEvent mouseDown MouseEvent handleMouseClick
handle Mouse Click e true public void mouse Up Mouse Event e activate a link handle Mouse Click e false  handleMouseClick mouseUp MouseEvent handleMouseClick
add Mouse Track Listener new Mouse Track Listener public void mouse Enter Mouse Event e handle Mouse Move e  addMouseTrackListener MouseTrackListener mouseEnter MouseEvent handleMouseMove
public void mouse Exit Mouse Event e if entered null exit Link entered e state Mask paint Link Hover entered false entered null set Cursor null  mouseExit MouseEvent exitLink stateMask paintLinkHover setCursor
public void mouse Hover Mouse Event e handle Mouse Hover e  mouseHover MouseEvent handleMouseHover
add Mouse Move Listener new Mouse Move Listener public void mouse Move Mouse Event e handle Mouse Move e  addMouseMoveListener MouseMoveListener mouseMove MouseEvent handleMouseMove
Contructs a new form text widget in the provided parent and using the styles param parent form text parent control param style the widget style public Form Text Composite parent int style super parent SWT NO BACKGROUND SWT WRAP style set Layout new Form Text Layout model new Form Text Model add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e model dispose Font bold Font Font resource Table get Form Text Model BOLD FONT ID if bold Font null bold Font dispose add Paint Listener new Paint Listener public void paint Control Paint Event e paint e add Listener SWT Key Down new Listener public void handle Event Event e if e character r activate Selected Link return add Listener SWT Traverse new Listener public void handle Event Event e switch e detail case SWT TRAVERSE PAGE NEXT case SWT TRAVERSE PAGE PREVIOUS case SWT TRAVERSE ARROW NEXT case SWT TRAVERSE ARROW PREVIOUS e doit false return if model has Focus Segments e doit true return if e detail SWT TRAVERSE TAB NEXT e doit advance true else if e detail SWT TRAVERSE TAB PREVIOUS e doit advance false else if e detail SWT TRAVERSE RETURN e doit true add Focus Listener new Focus Listener public void focus Gained Focus Event e if has Focus has Focus true handle Focus Change public void focus Lost Focus Event e if has Focus has Focus false handle Focus Change add Mouse Listener new Mouse Listener public void mouse Double Click Mouse Event e public void mouse Down Mouse Event e select a link handle Mouse Click e true public void mouse Up Mouse Event e activate a link handle Mouse Click e false add Mouse Track Listener new Mouse Track Listener public void mouse Enter Mouse Event e handle Mouse Move e public void mouse Exit Mouse Event e if entered null exit Link entered e state Mask paint Link Hover entered false entered null set Cursor null public void mouse Hover Mouse Event e handle Mouse Hover e add Mouse Move Listener new Mouse Move Listener public void mouse Move Mouse Event e handle Mouse Move e init Accessible make Actions ensure Bold Font Present get Font  FormText NO_BACKGROUND setLayout FormTextLayout FormTextModel addDisposeListener DisposeListener widgetDisposed DisposeEvent boldFont resourceTable FormTextModel BOLD_FONT_ID boldFont boldFont addPaintListener PaintListener paintControl PaintEvent addListener KeyDown handleEvent activateSelectedLink addListener handleEvent TRAVERSE_PAGE_NEXT TRAVERSE_PAGE_PREVIOUS TRAVERSE_ARROW_NEXT TRAVERSE_ARROW_PREVIOUS hasFocusSegments TRAVERSE_TAB_NEXT TRAVERSE_TAB_PREVIOUS TRAVERSE_RETURN addFocusListener FocusListener focusGained FocusEvent hasFocus hasFocus handleFocusChange focusLost FocusEvent hasFocus hasFocus handleFocusChange addMouseListener MouseListener mouseDoubleClick MouseEvent mouseDown MouseEvent handleMouseClick mouseUp MouseEvent handleMouseClick addMouseTrackListener MouseTrackListener mouseEnter MouseEvent handleMouseMove mouseExit MouseEvent exitLink stateMask paintLinkHover setCursor mouseHover MouseEvent handleMouseHover addMouseMoveListener MouseMoveListener mouseMove MouseEvent handleMouseMove initAccessible makeActions ensureBoldFontPresent getFont
Test for focus return samp true samp if the widget has focus public boolean get Focus return has Focus  getFocus hasFocus
Test if the widget is currently processing the text it is about to render return samp true samp if the widget is still loading the text samp false samp otherwise public boolean is Loading return loading  isLoading
Returns the text that will be shown in the control while the real content is loading return loading text message public String get Loading Text return loading Text  getLoadingText loadingText
Sets the text that will be shown in the control while the real content is loading This is significant when content to render is loaded from the input stream that was created from a remote URL and the time to load the entire content is nontrivial param loading Text loading text message public void set Loading Text String loading Text this loading Text loading Text  loadingText setLoadingText loadingText loadingText loadingText
If paragraphs are separated spacing will be added between them Otherwise new paragraphs will simply start on a new line with no spacing param value samp true samp if paragraphs are separated samp false samp otherwise public void set Paragraphs Separated boolean value paragraphs Separated value  setParagraphsSeparated paragraphsSeparated
Tests if there is some inter paragraph spacing return samp true samp if paragraphs are separated samp false samp otherwise public boolean get Paragraphs Separated return paragraphs Separated  getParagraphsSeparated paragraphsSeparated
Registers the image referenced by the provided key p For samp img samp tags an object of a type samp Image samp must be registered using the key equivalent to the value of the samp href samp attribute used in the tag param key unique key that matches the value of the samp href samp attribute param image an object of a type samp Image samp public void set Image String key Image image resource Table put i key image  setImage resourceTable
Registers the color referenced by the provided key p For samp span samp tags an object of a type samp Color samp must be registered using the key equivalent to the value of the samp color samp attribute param key unique key that matches the value of the samp color samp attribute param color an object of a type samp Color samp public void set Color String key Color color resource Table put c key color  setColor resourceTable
Registers the font referenced by the provided key p For samp span samp tags an object of a type samp Font samp must be registered using the key equivalent to the value of the samp font samp attribute param key unique key that matches the value of the samp font samp attribute param font an object of a type samp Font samp public void set Font String key Font font resource Table put f key font  setFont resourceTable
Sets the font to use to render the default text text that does not have special font property assigned Bold font will be constructed from this font param font the default font to use public void set Font Font font super set Font font Font bold Font Font resource Table get Form Text Model BOLD FONT ID if bold Font null bold Font dispose resource Table remove Form Text Model BOLD FONT ID ensure Bold Font Present get Font  setFont setFont boldFont resourceTable FormTextModel BOLD_FONT_ID boldFont boldFont resourceTable FormTextModel BOLD_FONT_ID ensureBoldFontPresent getFont
Sets the provided text Text can be rendered as is or by parsing the formatting tags Optionally sections of text starting with http will be converted to hyperlinks param text the text to render param parse Tags if samp true samp formatting tags will be parsed Otherwise text will be rendered as is param expandUR Ls if samp true samp UR Ls found in the untagged text will be converted into hyperlinks public void set Text String text boolean parse Tags boolean expandUR Ls if parse Tags model parse Tagged Text text expandUR Ls else model parse Regular Text text expandUR Ls loading false layout  parseTags expandURLs URLs setText parseTags expandURLs parseTags parseTaggedText expandURLs parseRegularText expandURLs
Sets the contents of the stream Optionally UR Ls in untagged text can be converted into hyperlinks The caller is responsible for closing the stream param is stream to render param expandUR Ls if samp true samp UR Ls found in untagged text will be converted into hyperlinks public void set Contents Input Stream is boolean expandUR Ls model parse Input Stream is expandUR Ls loading false layout  URLs expandURLs URLs setContents InputStream expandURLs parseInputStream expandURLs
Controls whether whitespace inside paragraph and list items is normalized p If normalized ul li all white space characters will be condensed into at most one when between words li li new line characters will be ignored and replaced with one white space character li li white space characters after the opening tags and before the closing tags will be trimmed li param value code true code if whitespace is normalized code false code otherwise public void set Whitespace Normalized boolean value model set Whitespace Normalized value  setWhitespaceNormalized setWhitespaceNormalized
Tests whether whitespace inside paragraph and list item is normalized see set Whitespace Normalized boolean return code true code if whitespace is normalized code false code otherwise public boolean is Whitespace Normalized return model is Whitespace Normalized  setWhitespaceNormalized isWhitespaceNormalized isWhitespaceNormalized
Sets the focus to the first hyperlink or the widget itself if there are no hyperlinks return samp true samp if the control got focus samp false samp otherwise public boolean set Focus if model has Focus Segments return false return super set Focus  setFocus hasFocusSegments setFocus
Returns the hyperlink settings that are in effect for this control return current hyperlinks settings public Hyperlink Settings get Hyperlink Settings return model get Hyperlink Settings  HyperlinkSettings getHyperlinkSettings getHyperlinkSettings
Sets the hyperlink settings to be used for this control Settings will affect things like hyperlink color rendering style cursor etc param settings hyperlink settings for this control public void set Hyperlink Settings Hyperlink Settings settings model set Hyperlink Settings settings  setHyperlinkSettings HyperlinkSettings setHyperlinkSettings
Adds a listener that will handle hyperlink events param listener the listener to add public void add Hyperlink Listener I Hyperlink Listener listener if listeners null listeners new Vector if listeners contains listener listeners add listener  addHyperlinkListener IHyperlinkListener
Removes the hyperlink listener param listener the listener to remove public void remove Hyperlink Listener I Hyperlink Listener listener if listeners null return listeners remove listener  removeHyperlinkListener IHyperlinkListener
Context menu is about to show override to add actions to the menu manager Subclasses are required to call super when overriding param manager the pop up menu manager protected void context Menu About To Show I Menu Manager manager Hyperlink Segment link model get Selected Link if link null contribute Link Actions manager link  contextMenuAboutToShow IMenuManager HyperlinkSegment getSelectedLink contributeLinkActions
private void make Actions open Action new Action public void run activate Selected Link open Action set Text Forms Plugin get Resource String Form Egine link Popup open copy Shortcut Action new Action public void run copy Shortcut model get Selected Link copy Shortcut Action set Text Forms Plugin get Resource String Form Egine link Popup copy Shortcut  makeActions openAction activateSelectedLink openAction setText FormsPlugin getResourceString FormEgine linkPopup copyShortcutAction copyShortcut getSelectedLink copyShortcutAction setText FormsPlugin getResourceString FormEgine linkPopup copyShortcut
private String get Acessible Text return model get Accessible Text  getAcessibleText getAccessibleText
Accessible accessible get Accessible accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e e result get Acessible Text  getAccessible addAccessibleListener AccessibleAdapter getName AccessibleEvent getAcessibleText
e result get Acessible Text public void get Help Accessible Event e e result get Tool Tip Text  getAcessibleText getHelp AccessibleEvent getToolTipText
accessible add Accessible Control Listener new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point pt to Control new Point e x e y e childID get Bounds contains pt ACC CHILDID SELF ACC CHILDID NONE  addAccessibleControlListener AccessibleControlAdapter getChildAtPoint AccessibleControlEvent toControl getBounds CHILDID_SELF CHILDID_NONE
public void get Location Accessible Control Event e Rectangle location get Bounds Point pt to Display new Point location x location y e x pt x e y pt y e width location width e height location height  getLocation AccessibleControlEvent getBounds toDisplay
e height location height public void get Child Count Accessible Control Event e e detail 0  getChildCount AccessibleControlEvent
e detail 0 public void get Role Accessible Control Event e e detail ACC ROLE TEXT  getRole AccessibleControlEvent ROLE_TEXT
e detail ACC ROLE TEXT public void get State Accessible Control Event e e detail ACC STATE READONLY  ROLE_TEXT getState AccessibleControlEvent STATE_READONLY
private void init Accessible Accessible accessible get Accessible accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e e result get Acessible Text public void get Help Accessible Event e e result get Tool Tip Text accessible add Accessible Control Listener new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point pt to Control new Point e x e y e childID get Bounds contains pt ACC CHILDID SELF ACC CHILDID NONE public void get Location Accessible Control Event e Rectangle location get Bounds Point pt to Display new Point location x location y e x pt x e y pt y e width location width e height location height public void get Child Count Accessible Control Event e e detail 0 public void get Role Accessible Control Event e e detail ACC ROLE TEXT public void get State Accessible Control Event e e detail ACC STATE READONLY  initAccessible getAccessible addAccessibleListener AccessibleAdapter getName AccessibleEvent getAcessibleText getHelp AccessibleEvent getToolTipText addAccessibleControlListener AccessibleControlAdapter getChildAtPoint AccessibleControlEvent toControl getBounds CHILDID_SELF CHILDID_NONE getLocation AccessibleControlEvent getBounds toDisplay getChildCount AccessibleControlEvent getRole AccessibleControlEvent ROLE_TEXT getState AccessibleControlEvent STATE_READONLY
private void handle Mouse Click Mouse Event e boolean down if down select a hyperlink Hyperlink Segment segment Under model find Hyperlink At e x e y if segment Under null Hyperlink Segment old Link model get Selected Link model select Link segment Under enter Link segment Under e state Mask paint Focus Transfer old Link segment Under mouse Down true drag Origin new Point e x e y else if e button 1 Hyperlink Segment segment Under model find Hyperlink At e x e y if segment Under null activate Link segment Under e state Mask mouse Down false  handleMouseClick MouseEvent HyperlinkSegment segmentUnder findHyperlinkAt segmentUnder HyperlinkSegment oldLink getSelectedLink selectLink segmentUnder enterLink segmentUnder stateMask paintFocusTransfer oldLink segmentUnder mouseDown dragOrigin HyperlinkSegment segmentUnder findHyperlinkAt segmentUnder activateLink segmentUnder stateMask mouseDown
private void handle Mouse Hover Mouse Event e  handleMouseHover MouseEvent
private void handle Mouse Move Mouse Event e if mouse Down handle Drag e return Text Segment segment Under model find Segment At e x e y if segment Under null if entered null exit Link entered e state Mask paint Link Hover entered false entered null set Cursor null else if segment Under instanceof Hyperlink Segment Hyperlink Segment link Under Hyperlink Segment segment Under if entered null entered link Under enter Link link Under e state Mask paint Link Hover entered true set Cursor model get Hyperlink Settings get Hyperlink Cursor else if entered null exit Link entered e state Mask paint Link Hover entered false entered null set Cursor model get Hyperlink Settings get Text Cursor  handleMouseMove MouseEvent mouseDown handleDrag TextSegment segmentUnder findSegmentAt segmentUnder exitLink stateMask paintLinkHover setCursor segmentUnder HyperlinkSegment HyperlinkSegment linkUnder HyperlinkSegment segmentUnder linkUnder enterLink linkUnder stateMask paintLinkHover setCursor getHyperlinkSettings getHyperlinkCursor exitLink stateMask paintLinkHover setCursor getHyperlinkSettings getTextCursor
private boolean advance boolean next Hyperlink Segment current model get Selected Link if current null exit Link current SWT NULL boolean valid model traverse Links next Hyperlink Segment new Link model get Selected Link if valid enter Link new Link SWT NULL paint Focus Transfer current new Link if new Link null ensure Visible new Link return valid  HyperlinkSegment getSelectedLink exitLink traverseLinks HyperlinkSegment newLink getSelectedLink enterLink newLink paintFocusTransfer newLink newLink ensureVisible newLink
private void handle Focus Change if has Focus model traverse Links true enter Link model get Selected Link SWT NULL paint Focus Transfer null model get Selected Link ensure Visible model get Selected Link else paint Focus Transfer model get Selected Link null model select Link null  handleFocusChange hasFocus traverseLinks enterLink getSelectedLink paintFocusTransfer getSelectedLink ensureVisible getSelectedLink paintFocusTransfer getSelectedLink selectLink
private void enter Link Hyperlink Segment link int state Mask if link null listeners null return int size listeners size Hyperlink Event he new Hyperlink Event this link get Href link get Text state Mask for int i 0 i size i I Hyperlink Listener listener I Hyperlink Listener listeners get i listener link Entered he  enterLink HyperlinkSegment stateMask HyperlinkEvent HyperlinkEvent getHref getText stateMask IHyperlinkListener IHyperlinkListener linkEntered
private void exit Link Hyperlink Segment link int state Mask if link null listeners null return int size listeners size Hyperlink Event he new Hyperlink Event this link get Href link get Text state Mask for int i 0 i size i I Hyperlink Listener listener I Hyperlink Listener listeners get i listener link Exited he  exitLink HyperlinkSegment stateMask HyperlinkEvent HyperlinkEvent getHref getText stateMask IHyperlinkListener IHyperlinkListener linkExited
private void paint Link Hover Hyperlink Segment link boolean hover GC gc new GC this Hyperlink Settings settings get Hyperlink Settings gc set Foreground hover settings get Active Foreground settings get Foreground gc set Background get Background gc set Font get Font boolean selected link model get Selected Link link repaint gc hover if selected link paint Focus gc get Background get Foreground false link paint Focus gc get Background get Foreground true gc dispose  paintLinkHover HyperlinkSegment HyperlinkSettings getHyperlinkSettings setForeground getActiveForeground getForeground setBackground getBackground setFont getFont getSelectedLink paintFocus getBackground getForeground paintFocus getBackground getForeground
private void activate Selected Link Hyperlink Segment link model get Selected Link if link null activate Link link SWT NULL  activateSelectedLink HyperlinkSegment getSelectedLink activateLink
private void activate Link Hyperlink Segment link int state Mask set Cursor model get Hyperlink Settings get Busy Cursor if listeners null int size listeners size Hyperlink Event e new Hyperlink Event this link get Href link get Text state Mask for int i 0 i size i I Hyperlink Listener listener I Hyperlink Listener listeners get i listener link Activated e if is Disposed set Cursor model get Hyperlink Settings get Hyperlink Cursor  activateLink HyperlinkSegment stateMask setCursor getHyperlinkSettings getBusyCursor HyperlinkEvent HyperlinkEvent getHref getText stateMask IHyperlinkListener IHyperlinkListener linkActivated isDisposed setCursor getHyperlinkSettings getHyperlinkCursor
private void ensure Bold Font Present Font regular Font Font bold Font Font resource Table get Form Text Model BOLD FONT ID if bold Font null return Font Data font Datas regular Font get Font Data for int i 0 i font Datas length i font Datas i set Style font Datas i get Style SWT BOLD bold Font new Font get Display font Datas resource Table put Form Text Model BOLD FONT ID bold Font  ensureBoldFontPresent regularFont boldFont resourceTable FormTextModel BOLD_FONT_ID boldFont FontData fontDatas regularFont getFontData fontDatas fontDatas setStyle fontDatas getStyle boldFont getDisplay fontDatas resourceTable FormTextModel BOLD_FONT_ID boldFont
private void paint Paint Event e Rectangle carea get Client Area GC gc e gc gc set Font get Font ensure Bold Font Present get Font gc set Foreground get Foreground gc set Background get Background Locator loc new Locator loc margin Width margin Width loc margin Height margin Height loc x margin Width loc y margin Height Font Metrics fm gc get Font Metrics int line Height fm get Height Use double buffering to reduce flicker Image text Buffer new Image get Display carea width carea height text Buffer set Background get Background GC textGC new GC text Buffer gc get Style textGC set Foreground get Foreground textGC set Background get Background textGC set Font get Font textGC fill Rectangle 0 0 carea width carea height if loading int text Width gc text Extent loading Text x textGC draw Text loading Text carea width 2 text Width 2 get Client Area height 2 line Height 2 else Paragraph paragraphs model get Paragraphs Hyperlink Segment selected Link model get Selected Link for int i 0 i paragraphs length i Paragraph p paragraphs i if i 0 paragraphs Separated p get Add Vertical Space loc y get Paragraph Spacing line Height loc indent p get Indent loc reset Caret loc row Height 0 p paint textGC carea width loc line Height resource Table selected Link gc draw Image text Buffer 0 0 textGC dispose text Buffer dispose  PaintEvent getClientArea setFont getFont ensureBoldFontPresent getFont setForeground getForeground setBackground getBackground marginWidth marginWidth marginHeight marginHeight marginWidth marginHeight FontMetrics getFontMetrics lineHeight getHeight textBuffer getDisplay textBuffer setBackground getBackground textBuffer getStyle setForeground getForeground setBackground getBackground setFont getFont fillRectangle textWidth textExtent loadingText drawText loadingText textWidth getClientArea lineHeight getParagraphs HyperlinkSegment selectedLink getSelectedLink paragraphsSeparated getAddVerticalSpace getParagraphSpacing lineHeight getIndent resetCaret rowHeight lineHeight resourceTable selectedLink drawImage textBuffer textBuffer
text Buffer dispose private int get Paragraph Spacing int line Height return line Height 2  textBuffer getParagraphSpacing lineHeight lineHeight
private void paint Focus Transfer Hyperlink Segment old Link Hyperlink Segment new Link GC gc new GC this Color bg get Background Color fg get Foreground gc set Font get Font if old Link null gc set Background bg gc set Foreground fg old Link paint Focus gc bg fg false if new Link null ensure Visible new Link gc set Background bg gc set Foreground fg new Link paint Focus gc bg fg true gc dispose  paintFocusTransfer HyperlinkSegment oldLink HyperlinkSegment newLink getBackground getForeground setFont getFont oldLink setBackground setForeground oldLink paintFocus newLink ensureVisible newLink setBackground setForeground newLink paintFocus
private void contribute Link Actions I Menu Manager manager Hyperlink Segment link manager add open Action manager add copy Shortcut Action manager add new Separator  contributeLinkActions IMenuManager HyperlinkSegment openAction copyShortcutAction
private void copy Shortcut Hyperlink Segment link String text link get Text Clipboard clipboard new Clipboard get Display clipboard set Contents new Object text new Transfer Text Transfer get Instance  copyShortcut HyperlinkSegment getText getDisplay setContents TextTransfer getInstance
private void ensure Visible Hyperlink Segment segment if segment null return Rectangle bounds segment get Bounds Scrolled Composite scomp Form Util get Scrolled Composite this if scomp null return Point origin Form Util get Control Location scomp this origin x bounds x origin y bounds y Form Util ensure Visible scomp origin new Point bounds width bounds height  ensureVisible HyperlinkSegment getBounds ScrolledComposite FormUtil getScrolledComposite FormUtil getControlLocation FormUtil ensureVisible
private void handle Drag Mouse Event e  handleDrag MouseEvent
Overrides the method by fully trusting the layout manager computed width or height may be larger than the provider width or height hints public Point compute Size int w Hint int h Hint boolean changed check Widget Point size Form Text Layout layout Form Text Layout get Layout if w Hint SWT DEFAULT h Hint SWT DEFAULT size layout compute Size this w Hint h Hint changed else size new Point w Hint h Hint Rectangle trim compute Trim 0 0 size x size y return new Point trim width trim height  computeSize wHint hHint checkWidget FormTextLayout FormTextLayout getLayout wHint hHint computeSize wHint hHint wHint hHint computeTrim

private class Border Painter implements Paint Listener public void paint Control Paint Event event Composite composite Composite event widget Control children composite get Children for int i 0 i children length i Control c children i boolean inactive Border false boolean text Border false if c is Visible continue if c get Enabled false c instanceof C Combo continue if c instanceof Hyperlink continue Object flag c get Data KEY DRAW BORDER if flag null if flag equals Boolean FALSE continue if flag equals TREE BORDER inactive Border true else if flag equals TEXT BORDER text Border true if get Border Style SWT BORDER if inactive Border text Border continue if c instanceof Text c instanceof Table c instanceof Tree c instanceof Table Tree continue if inactive Border c instanceof Text c instanceof C Combo text Border Rectangle b c get Bounds GC gc event gc gc set Foreground c get Background gc draw Rectangle b x 1 b y 1 b width 1 b height 1 gc set Foreground get Border Style SWT BORDER colors get Border Color colors get Foreground if c instanceof C Combo gc draw Rectangle b x 1 b y 1 b width 1 b height 1 else gc draw Rectangle b x 1 b y 2 b width 1 b height 3 else if inactive Border c instanceof Table c instanceof Tree c instanceof Table Tree Rectangle b c get Bounds GC gc event gc gc set Foreground colors get Border Color gc draw Rectangle b x 1 b y 1 b width 1 b height 1  BorderPainter PaintListener paintControl PaintEvent getChildren inactiveBorder textBorder isVisible getEnabled CCombo getData KEY_DRAW_BORDER TREE_BORDER inactiveBorder TEXT_BORDER textBorder getBorderStyle inactiveBorder textBorder TableTree inactiveBorder CCombo textBorder getBounds setForeground getBackground drawRectangle setForeground getBorderStyle getBorderColor getForeground CCombo drawRectangle drawRectangle inactiveBorder TableTree getBounds setForeground getBorderColor drawRectangle
private static class Visibility Handler extends Focus Adapter public void focus Gained Focus Event e Widget w e widget if w instanceof Control Form Util ensure Visible Control w  VisibilityHandler FocusAdapter focusGained FocusEvent FormUtil ensureVisible
private static class Keyboard Handler extends Key Adapter public void key Pressed Key Event e Widget w e widget if w instanceof Control if e doit Form Util process Key e key Code Control w  KeyboardHandler KeyAdapter keyPressed KeyEvent FormUtil processKey keyCode
Creates a toolkit that is self sufficient will manage its own colors public Form Toolkit Display display this new Form Colors display  FormToolkit FormColors
Creates a toolkit that will use the provided shared colors The toolkit will b not b dispose the provided colors param colors the shared colors public Form Toolkit Form Colors colors this colors colors initialize  FormToolkit FormColors
Creates a button as a part of the form param parent the button parent param text an optional text for the button can be code null code param style the button style for example code SWT PUSH code return the button widget public Button create Button Composite parent String text int style Button button new Button parent style SWT FLAT if text null button set Text text adapt button true true return button  createButton setText
Creates the composite as a part of the form param parent the composite parent return the composite widget public Composite create Composite Composite parent return create Composite parent SWT NULL  createComposite createComposite
Creates the composite as part of the form using the provided style param parent the composite parent param style the composite style return the composite widget public Composite create Composite Composite parent int style Composite composite new Layout Composite parent style adapt composite return composite  createComposite LayoutComposite
composite add Listener SWT Paint new Listener public void handle Event Event e if composite is Disposed return Rectangle bounds composite get Bounds GC gc e gc gc set Foreground colors get Color Form Colors SEPARATOR gc set Background colors get Background gc fill Gradient Rectangle 0 0 bounds width bounds height false  addListener handleEvent isDisposed getBounds setForeground getColor FormColors setBackground getBackground fillGradientRectangle
Creats the composite that can server as a separator between various parts of a form Separator height should be controlled by setting the height hint on the layout data for the composite param parent the separator parent return the separator widget public Composite create Composite Separator Composite parent final Composite composite new Composite parent SWT NONE composite add Listener SWT Paint new Listener public void handle Event Event e if composite is Disposed return Rectangle bounds composite get Bounds GC gc e gc gc set Foreground colors get Color Form Colors SEPARATOR gc set Background colors get Background gc fill Gradient Rectangle 0 0 bounds width bounds height false if parent instanceof Section Section parent set Separator Control composite return composite  createCompositeSeparator addListener handleEvent isDisposed getBounds setForeground getColor FormColors setBackground getBackground fillGradientRectangle setSeparatorControl
Creates a label as a part of the form param parent the label parent param text the label text return the label widget public Label create Label Composite parent String text return create Label parent text SWT NONE  createLabel createLabel
Creates a label as a part of the form param parent the label parent param text the label text param style the label style return the label widget public Label create Label Composite parent String text int style Label label new Label parent style if text null label set Text text adapt label false false return label  createLabel setText
Creates a hyperlink as a part of the form The hyperlink will be added to the hyperlink group that belongs to this toolkit param parent the hyperlink parent param text the text of the hyperlink param style the hyperlink style return the hyperlink widget public Hyperlink create Hyperlink Composite parent String text int style Hyperlink hyperlink new Hyperlink parent style if text null hyperlink set Text text hyperlink add Focus Listener visibility Handler hyperlink add Key Listener keyboard Handler hyperlink Group add hyperlink return hyperlink  createHyperlink setText addFocusListener visibilityHandler addKeyListener keyboardHandler hyperlinkGroup
Creates an image hyperlink as a part of the form The hyperlink will be added to the hyperlink group that belongs to this toolkit param parent the hyperlink parent param style the hyperlink style return the image hyperlink widget public Image Hyperlink create Image Hyperlink Composite parent int style Image Hyperlink hyperlink new Image Hyperlink parent style hyperlink add Focus Listener visibility Handler hyperlink add Key Listener keyboard Handler hyperlink Group add hyperlink return hyperlink  ImageHyperlink createImageHyperlink ImageHyperlink ImageHyperlink addFocusListener visibilityHandler addKeyListener keyboardHandler hyperlinkGroup
Creates a rich text as a part of the form param parent the rich text parent param track Focus if code true code the toolkit will monitor focus transfers to ensure that the hyperlink in focus is visible in the form return the rich text widget public Form Text create Form Text Composite parent boolean track Focus Form Text engine new Form Text parent SWT WRAP engine margin Width 1 engine margin Height 0 engine set Hyperlink Settings get Hyperlink Group adapt engine track Focus true engine set Menu parent get Menu return engine  trackFocus FormText createFormText trackFocus FormText FormText marginWidth marginHeight setHyperlinkSettings getHyperlinkGroup trackFocus setMenu getMenu
Adapts a control to be used in a form that is associated with this toolkit This involves adjusting colors and optionally adding handlers to ensure focus tracking and keyboard management param control a control to adapt param track Focus if code true code form will be scrolled horizontally and or vertically if needed to ensure that the control is visible when it gains focus Set it to code false code if the control is not capable of gaining focus param track Keyboard if code true code the control that is capable of gaining focus will be tracked for certain keys that are important to the underlying form for example Page Up Page Down Scroll Up Scroll Down etc Set it to code false code if the control is not capable of gaining focus or these particular key event are already used by the control public void adapt Control control boolean track Focus boolean track Keyboard control set Background colors get Background control set Foreground colors get Foreground if track Focus control add Focus Listener visibility Handler if track Keyboard control add Key Listener keyboard Handler  trackFocus trackKeyboard PageUp PageDown ScrollUp ScrollDown trackFocus trackKeyboard setBackground getBackground setForeground getForeground trackFocus addFocusListener visibilityHandler trackKeyboard addKeyListener keyboardHandler
composite set Background colors get Background composite add Mouse Listener new Mouse Adapter public void mouse Pressed Mouse Event e Control e widget set Focus  setBackground getBackground addMouseListener MouseAdapter mousePressed MouseEvent setFocus
Adapts a composite to be used in a form associated with this toolkit param composite the composite to adapt public void adapt Composite composite composite set Background colors get Background composite add Mouse Listener new Mouse Adapter public void mouse Pressed Mouse Event e Control e widget set Focus composite set Menu composite get Parent get Menu  setBackground getBackground addMouseListener MouseAdapter mousePressed MouseEvent setFocus setMenu getParent getMenu
A helper method that ensures the provided control is visible when Scrolled Composite is somewhere in the parent chain If scroll bars are visible and the control is clipped the client of the scrolled composite will be scrolled to reveal the control param c the control to reveal public static void ensure Visible Control c Form Util ensure Visible c  ScrolledComposite ensureVisible FormUtil ensureVisible
Creates a section as a part of the form param parent the section parent param section Style the section style return the section widget public Section create Section Composite parent int section Style Section section new Section parent section Style section set Background colors get Background section set Foreground colors get Foreground section set Menu parent get Menu if section text Label null section text Label add Focus Listener visibility Handler section text Label add Key Listener keyboard Handler if section toggle null section toggle add Focus Listener visibility Handler section toggle add Key Listener keyboard Handler section toggle set Hover Decoration Color get Hyperlink Group get Active Foreground section toggle set Decoration Color colors get Color Form Colors SEPARATOR section set Font J Face Resources get Font Registry get J Face Resources BANNER FONT if section Style Section TITLE BAR 0 colors initialize Section Tool Bar Colors section set Foreground colors get Color COLOR TB FG section set Title Bar Background colors get Color Form Colors TB GBG section set Title Bar Border Color colors get Color Form Colors TB BORDER section set Title Bar Gradient Background colors get Color Form Colors TB GBG if section toggle null section toggle set Decoration Color colors get Color Form Colors TB TOGGLE return section  sectionStyle createSection sectionStyle sectionStyle setBackground getBackground setForeground getForeground setMenu getMenu textLabel textLabel addFocusListener visibilityHandler textLabel addKeyListener keyboardHandler addFocusListener visibilityHandler addKeyListener keyboardHandler setHoverDecorationColor getHyperlinkGroup getActiveForeground setDecorationColor getColor FormColors setFont JFaceResources getFontRegistry JFaceResources BANNER_FONT sectionStyle TITLE_BAR initializeSectionToolBarColors setForeground getColor COLOR_TB_FG setTitleBarBackground getColor FormColors TB_GBG setTitleBarBorderColor getColor FormColors TB_BORDER setTitleBarGradientBackground getColor FormColors TB_GBG setDecorationColor getColor FormColors TB_TOGGLE
Creates an expandable composite as a part of the form param parent the expandable composite parent param expansion Style the expandable composite style return the expandable composite widget public Expandable Composite create Expandable Composite Composite parent int expansion Style Expandable Composite ec new Expandable Composite parent SWT NULL expansion Style ec set Menu parent get Menu ec set Background colors get Background ec set Foreground colors get Foreground hyperlink Group add ec text Label if ec toggle null ec toggle add Focus Listener visibility Handler ec toggle add Key Listener keyboard Handler ec text Label add Focus Listener visibility Handler ec text Label add Key Listener keyboard Handler ec set Font J Face Resources get Font Registry get J Face Resources BANNER FONT return ec  expansionStyle ExpandableComposite createExpandableComposite expansionStyle ExpandableComposite ExpandableComposite expansionStyle setMenu getMenu setBackground getBackground setForeground getForeground hyperlinkGroup textLabel addFocusListener visibilityHandler addKeyListener keyboardHandler textLabel addFocusListener visibilityHandler textLabel addKeyListener keyboardHandler setFont JFaceResources getFontRegistry JFaceResources BANNER_FONT
Creates a separator label as a part of the form param parent the separator parent param style the separator style return the separator label public Label create Separator Composite parent int style Label label new Label parent SWT SEPARATOR style label set Background colors get Background label set Foreground colors get Border Color return label  createSeparator setBackground getBackground setForeground getBorderColor
Creates a table as a part of the form param parent the table parent param style the table style return the table widget public Table create Table Composite parent int style Table table new Table parent style border Style adapt table false false hook Delete Listener table return table  createTable borderStyle hookDeleteListener
Creates a text as a part of the form param parent the text parent param value the text initial value return the text widget public Text create Text Composite parent String value return create Text parent value SWT SINGLE  createText createText
Creates a text as a part of the form param parent the text parent param value the text initial value param the text style return the text widget public Text create Text Composite parent String value int style Text text new Text parent border Style style if value null text set Text value adapt text true false return text  createText borderStyle setText
Creates a tree widget as a part of the form param parent the tree parent param style the tree style return the tree widget public Tree create Tree Composite parent int style Tree tree new Tree parent border Style style adapt tree false false hook Delete Listener tree return tree  createTree borderStyle hookDeleteListener
Creates a scrolled form widget in the provided parent If you do not require scrolling because there is already a scrolled composite up the parent chain use create Form instead param parent the scrolled form parent return the form that can scroll itself see create Form public Scrolled Form create Scrolled Form Composite parent Scrolled Form form new Scrolled Form parent form set Expand Horizontal true form set Expand Vertical true form set Background colors get Background form set Foreground colors get Color Form Colors TITLE form set Font J Face Resources get Header Font return form  createForm createForm ScrolledForm createScrolledForm ScrolledForm ScrolledForm setExpandHorizontal setExpandVertical setBackground getBackground setForeground getColor FormColors setFont JFaceResources getHeaderFont
Creates a form widget in the provided parent Note that this widget does not scroll its content so make sure there is a scrolled composite up the parent chain If you require scrolling use create Scrolled Form instead param the form parent return the form that does not scroll see create Scrolled Form public Form create Form Composite parent Form form Content new Form parent SWT NULL form Content set Background colors get Background form Content set Foreground colors get Color Form Colors TITLE form Content set Font J Face Resources get Header Font return form Content  createScrolledForm createScrolledForm createForm formContent formContent setBackground getBackground formContent setForeground getColor FormColors formContent setFont JFaceResources getHeaderFont formContent
Creates a rich text as a part of the form param parent the rich text parent param track Focus if code true code the toolkit will monitor focus transfers to ensure that the hyperlink in focus is visible in the form return the rich text widget public Scrolled Page Book create Page Book Composite parent int style Scrolled Page Book book new Scrolled Page Book parent style adapt book true true book set Menu parent get Menu return book  trackFocus ScrolledPageBook createPageBook ScrolledPageBook ScrolledPageBook setMenu getMenu
Disposes the toolkit public void dispose if colors is Shared false colors dispose colors null  isShared
Returns the hyperlink group that manages hyperlinks for this toolkit return the hyperlink group public Hyperlink Group get Hyperlink Group return hyperlink Group  HyperlinkGroup getHyperlinkGroup hyperlinkGroup
Sets the background color for the entire toolkit The method delegates the call to the Form Colors object and also updates the hyperlink group so that hyperlinks and other objects are in sync param bg the new background color public void set Background Color bg hyperlink Group set Background bg colors set Background bg  FormColors setBackground hyperlinkGroup setBackground setBackground
Refreshes the hyperlink colors by loading from J Face settings public void refresh Hyperlink Colors hyperlink Group initialize Default Foregrounds colors get Display  JFace refreshHyperlinkColors hyperlinkGroup initializeDefaultForegrounds getDisplay
Paints flat borders for widgets created by this toolkit within the provided parent Borders will not be painted if the global border style is SWT BORDER i e if native borders are used Call this method during creation of a form composite to get the borders of its children painted Care should be taken when selection layout margins At least one pixel pargin width and height must be chosen to allow the toolkit to paint the border on the parent around the widgets p Borders are painted for some controls that are selected by the toolkit by default If a control needs a border but is not on its list it is possible to force border in the following way pre widget set Data Form Toolkit KEY DRAW BORDER Form Toolkit TREE BORDER or widget set Data Form Toolkit KEY DRAW BORDER Form Toolkit TEXT BORDER pre param parent the parent that owns the children for which the border needs to be painted public void paint Borders For Composite parent if border Style SWT BORDER return if border Painter null border Painter new Border Painter parent add Paint Listener border Painter  setData FormToolkit KEY_DRAW_BORDER FormToolkit TREE_BORDER setData FormToolkit KEY_DRAW_BORDER FormToolkit TEXT_BORDER paintBordersFor borderStyle borderPainter borderPainter BorderPainter addPaintListener borderPainter
Returns the colors used by this toolkit return the color object public Form Colors get Colors return colors  FormColors getColors
Returns the border style used for various widgets created by this toolkit The intent of the toolkit is to create controls with styles that yield a flat appearance On systems where the native borders are already flat we set the style to SWT BORDER and don t paint the borders ourselves Otherwise the style is set to SWT NULL and borders are painted by the toolkit return the global border style public int get Border Style return border Style  getBorderStyle borderStyle
Sets the border style to be used when creating widgets The toolkit chooses the correct style based on the platform but this value can be changed using this method param style code SWT BORDER code or code SWT NULL code see get Border Style public void set Border Style int style this border Style style  getBorderStyle setBorderStyle borderStyle
private void initialize initialize Border Style hyperlink Group new Hyperlink Group colors get Display hyperlink Group set Background colors get Background visibility Handler new Visibility Handler keyboard Handler new Keyboard Handler  initializeBorderStyle hyperlinkGroup HyperlinkGroup getDisplay hyperlinkGroup setBackground getBackground visibilityHandler VisibilityHandler keyboardHandler KeyboardHandler
private void initialize Border Style String osname System get Property os name if osname equals Windows XP String java Home System get Property java home File home Dir new File java Home File bin Dir new File home Dir bin File manifest new File bin Dir javaw exe manifest if manifest exists Skinned widgets used check for Windows Classic If not used set the style to BORDER RGB rgb colors get System Color SWT COLOR WIDGET BACKGROUND if rgb red 212 rgb green 208 rgb blue 200 border Style SWT BORDER  initializeBorderStyle getProperty javaHome getProperty homeDir javaHome binDir homeDir binDir getSystemColor COLOR_WIDGET_BACKGROUND borderStyle

private boolean underlined Creates a new hyperlink control in the provided parent param parent the control parent param style the widget style public Hyperlink Composite parent int style super parent SWT NO BACKGROUND style init Accessible  NO_BACKGROUND initAccessible
Accessible accessible get Accessible accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e e result get Text  getAccessible addAccessibleListener AccessibleAdapter getName AccessibleEvent getText
e result get Text public void get Help Accessible Event e e result get Tool Tip Text  getText getHelp AccessibleEvent getToolTipText
accessible add Accessible Control Listener new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point pt to Control new Point e x e y e childID get Bounds contains pt ACC CHILDID SELF ACC CHILDID NONE  addAccessibleControlListener AccessibleControlAdapter getChildAtPoint AccessibleControlEvent toControl getBounds CHILDID_SELF CHILDID_NONE
public void get Location Accessible Control Event e Rectangle location get Bounds Point pt to Display new Point location x location y e x pt x e y pt y e width location width e height location height  getLocation AccessibleControlEvent getBounds toDisplay
e height location height public void get Child Count Accessible Control Event e e detail 0  getChildCount AccessibleControlEvent
e detail 0 public void get Role Accessible Control Event e e detail ACC ROLE LABEL  getRole AccessibleControlEvent ROLE_LABEL
public void get State Accessible Control Event e int state ACC STATE NORMAL if Hyperlink this get Selection state ACC STATE SELECTED ACC STATE FOCUSED e detail state  getState AccessibleControlEvent STATE_NORMAL getSelection STATE_SELECTED STATE_FOCUSED
protected void init Accessible Accessible accessible get Accessible accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e e result get Text public void get Help Accessible Event e e result get Tool Tip Text accessible add Accessible Control Listener new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point pt to Control new Point e x e y e childID get Bounds contains pt ACC CHILDID SELF ACC CHILDID NONE public void get Location Accessible Control Event e Rectangle location get Bounds Point pt to Display new Point location x location y e x pt x e y pt y e width location width e height location height public void get Child Count Accessible Control Event e e detail 0 public void get Role Accessible Control Event e e detail ACC ROLE LABEL public void get State Accessible Control Event e int state ACC STATE NORMAL if Hyperlink this get Selection state ACC STATE SELECTED ACC STATE FOCUSED e detail state  initAccessible getAccessible addAccessibleListener AccessibleAdapter getName AccessibleEvent getText getHelp AccessibleEvent getToolTipText addAccessibleControlListener AccessibleControlAdapter getChildAtPoint AccessibleControlEvent toControl getBounds CHILDID_SELF CHILDID_NONE getLocation AccessibleControlEvent getBounds toDisplay getChildCount AccessibleControlEvent getRole AccessibleControlEvent ROLE_LABEL getState AccessibleControlEvent STATE_NORMAL getSelection STATE_SELECTED STATE_FOCUSED
Sets the underlined state It is not necessary to call this method when in a hyperlink group param underlined if samp true samp a line will be drawn below the text for each wrapped line public void set Underlined boolean underlined this underlined underlined redraw  setUnderlined
Returns the underline state of the hyperlink return samp true samp if text is underlined samp false samp otherwise public boolean is Underlined return underlined  isUnderlined
Overrides the parent by incorporating the margin public Point compute Size int w Hint int h Hint boolean changed check Widget int inner Width w Hint if inner Width SWT DEFAULT inner Width margin Width 2 Point text Size compute Text Size inner Width h Hint int text Width text Size x 2 margin Width int text Height text Size y 2 margin Height return new Point text Width text Height  computeSize wHint hHint checkWidget innerWidth wHint innerWidth innerWidth marginWidth textSize computeTextSize innerWidth hHint textWidth textSize marginWidth textHeight textSize marginHeight textWidth textHeight
Returns the current hyperlink text return hyperlink text public String get Text return text  getText
Sets the text of this hyperlink param text the hyperlink text public void set Text String text if text null this text text else text redraw  setText
Paints the hyperlink text param e the paint event protected void paint Hyperlink GC gc Rectangle carea get Client Area Rectangle bounds new Rectangle margin Width margin Height carea width margin Width margin Width carea height margin Height margin Height paint Text gc bounds  paintHyperlink getClientArea marginWidth marginHeight marginWidth marginWidth marginHeight marginHeight paintText
Paints the hyperlink text in provided bounding rectangle param gc graphic context param bounds the bounding rectangle in which to paint the text protected void paint Text GC gc Rectangle bounds gc set Font get Font gc set Foreground get Foreground if get Style SWT WRAP 0 Form Util paint Wrap Text gc text bounds underlined else gc draw Text get Text bounds x bounds y true if underlined Font Metrics fm gc get Font Metrics int descent fm get Descent int lineY bounds y bounds height descent 1 gc draw Line bounds x lineY bounds x bounds width lineY  paintText setFont getFont setForeground getForeground getStyle FormUtil paintWrapText drawText getText FontMetrics getFontMetrics getDescent drawLine
protected Point compute Text Size int w Hint int h Hint Point extent GC gc new GC this gc set Font get Font if get Style SWT WRAP 0 w Hint SWT DEFAULT extent Form Util compute Wrap Size gc get Text w Hint else extent gc text Extent get Text gc dispose return extent  computeTextSize wHint hHint setFont getFont getStyle wHint FormUtil computeWrapSize getText wHint textExtent getText

public interface I Layout Extension Computes the minimum width of the parent All widgets capable of word wrapping should return the width of the longest word that cannot be broken any further param parent the parent composite param changed code true code if the cached information should be flushed code false code otherwise return the minimum width of the parent composite  ILayoutExtension
public int compute Minimum Width Composite parent boolean changed Computes the maximum width of the parent All widgets capable of word wrapping should return the length of the entire text with wrapping turned off param parent the parent composite param changed code true code if the cached information should be flushed code false code otherwise return the maximum width of the parent composite  computeMinimumWidth

private int vertical Alignment SWT CENTER Creates the image hyperlink instance param parent the control parent param style the control style SWT WRAP BOTTOM TOP MIDDLE public Image Hyperlink Composite parent int style super parent remove Alignment style extract Alignment style  verticalAlignment ImageHyperlink removeAlignment extractAlignment
protected void paint Hyperlink GC gc Rectangle client Area get Client Area Image image null if state ACTIVE 0 image active Image else if state HOVER 0 image hover Image if image null image this image if image null return Rectangle ibounds image get Bounds Point maxsize compute Max Image Size int x margin Width maxsize x 2 ibounds width 2 int y margin Height maxsize y 2 ibounds height 2 gc draw Image image x y if get Text null int text Width client Area width maxsize x text Spacing margin Width margin Width int textX margin Width maxsize x text Spacing Point text Size compute Text Size text Width SWT DEFAULT text Width text Size x int slot Height client Area height margin Height margin Height int textY int text Height text Size y if vertical Alignment SWT BOTTOM textY margin Height slot Height text Height else if vertical Alignment SWT CENTER textY margin Height slot Height 2 text Height 2 else textY margin Height paint Text gc new Rectangle textX textY text Width text Height  paintHyperlink clientArea getClientArea activeImage hoverImage getBounds computeMaxImageSize marginWidth marginHeight drawImage getText textWidth clientArea textSpacing marginWidth marginWidth marginWidth textSpacing textSize computeTextSize textWidth textWidth textSize slotHeight clientArea marginHeight marginHeight textHeight textSize verticalAlignment marginHeight slotHeight textHeight verticalAlignment marginHeight slotHeight textHeight marginHeight paintText textWidth textHeight
Computes the control size by reserving space for images in addition to text param w Hint width hint param h Hint height hint param changed if code true code any cached layout data should be computed anew public Point compute Size int w Hint int h Hint boolean changed check Widget Point isize compute Max Image Size Point text Size null if get Text null int innerW Hint w Hint if w Hint SWT DEFAULT innerW Hint w Hint 2 margin Width text Size super compute Size innerW Hint h Hint changed int width isize x int height isize y if text Size null width text Spacing width text Size x height Math max height text Size y width 2 margin Width height 2 margin Height return new Point width height  wHint hHint computeSize wHint hHint checkWidget computeMaxImageSize textSize getText innerWHint wHint wHint innerWHint wHint marginWidth textSize computeSize innerWHint hHint textSize textSpacing textSize textSize marginWidth marginHeight
return new Point width height protected void handle Enter Event e state HOVER super handle Enter e  handleEnter handleEnter
super handle Enter e protected void handle Exit Event e state 0 super handle Exit e  handleEnter handleExit handleExit
protected void handle Activate Event e state ACTIVE redraw super handle Activate e state ACTIVE if is Disposed redraw  handleActivate handleActivate isDisposed
Returns active image return active image or code null code if not set public Image get Active Image return active Image  getActiveImage activeImage
Sets the image to show when link is activated param active Image public void set Active Image Image active Image this active Image active Image  activeImage setActiveImage activeImage activeImage activeImage
Returns the hover image return hover image or code null code if not set public Image get Hover Image return hover Image  getHoverImage hoverImage
Sets the image to show when link is hover state on mouse over param hover Image public void set Hover Image Image hover Image this hover Image hover Image  hoverImage setHoverImage hoverImage hoverImage hoverImage
Returns the image to show in the normal state return normal image or code null code if not set public Image get Image return image  getImage
Sets the image to show when link is in the normal state param image public void set Image Image image this image image  setImage
private Point compute Max Image Size int x 0 int y 0 if image null x Math max image get Bounds width x y Math max image get Bounds height y if hover Image null x Math max hover Image get Bounds width x y Math max hover Image get Bounds height y if active Image null x Math max active Image get Bounds width x y Math max active Image get Bounds height y return new Point x y  computeMaxImageSize getBounds getBounds hoverImage hoverImage getBounds hoverImage getBounds activeImage activeImage getBounds activeImage getBounds
private static int remove Alignment int style if style SWT CENTER 0 return style SWT CENTER if style SWT TOP 0 return style SWT TOP if style SWT BOTTOM 0 return style SWT BOTTOM return style  removeAlignment
private void extract Alignment int style if style SWT CENTER 0 vertical Alignment SWT CENTER else if style SWT TOP 0 vertical Alignment SWT TOP else if style SWT BOTTOM 0 vertical Alignment SWT BOTTOM  extractAlignment verticalAlignment verticalAlignment verticalAlignment

package class Layout Composite extends Composite public Layout Composite Composite parent int style super parent style set Menu parent get Menu  LayoutComposite LayoutComposite setMenu getMenu
public Point compute Size int w Hint int h Hint boolean changed Layout layout get Layout if layout instanceof Table Wrap Layout return Table Wrap Layout layout compute Size this w Hint h Hint changed if layout instanceof Column Layout return Column Layout layout compute Size this w Hint h Hint changed return super compute Size w Hint h Hint changed  computeSize wHint hHint getLayout TableWrapLayout TableWrapLayout computeSize wHint hHint ColumnLayout ColumnLayout computeSize wHint hHint computeSize wHint hHint

public class Scrolled Form extends Shared Scrolled Composite private Form content public Scrolled Form Composite parent this parent SWT V SCROLL SWT H SCROLL  ScrolledForm SharedScrolledComposite ScrolledForm V_SCROLL H_SCROLL
Creates the form control as a child of the provided parent param parent the parent widget public Scrolled Form Composite parent int style super parent style super set Menu parent get Menu content new Form this SWT NULL super set Content content content set Menu get Menu  ScrolledForm setMenu getMenu setContent setMenu getMenu
Passes the menu to the body param menu public void set Menu Menu menu super set Menu menu if content null content set Menu menu  setMenu setMenu setMenu
Returns the title text that will be rendered at the top of the form return the title text public String get Text return content get Text  getText getText
Sets the foreground color of the form This color will also be used for the body public void set Foreground Color fg super set Foreground fg content set Foreground fg  setForeground setForeground setForeground
Sets the background color of the form This color will also be used for the body public void set Background Color bg super set Background bg content set Background bg  setBackground setBackground setBackground
The form sets the content widget This method should not be called by classes that instantiate this widget public final void set Content Control c  setContent
Sets the text to be rendered at the top of the form above the body as a title param text the title text public void set Text String text content set Text text reflow true  setText setText
Returns the optional background image of this form The image is rendered starting at the position 0 0 and is painted behind the title return Returns the background image public Image get Background Image return content get Background Image  getBackgroundImage getBackgroundImage
Sets the optional background image to be rendered behind the title starting at the position 0 0 param background Image The background Image to set public void set Background Image Image background Image content set Background Image background Image  backgroundImage backgroundImage setBackgroundImage backgroundImage setBackgroundImage backgroundImage
Returns the tool bar manager that is used to manage tool items in the form s title area return form tool bar manager public I Tool Bar Manager get Tool Bar Manager return content get Tool Bar Manager  IToolBarManager getToolBarManager getToolBarManager
Updates the local tool bar manager if used Does nothing if local tool bar manager has not been created yet public void update Tool Bar content update Tool Bar  updateToolBar updateToolBar
Recomputes the body layout and form 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 samp true samp drop any cached layout information and compute new one public void reflow boolean flush Cache content get Body layout content layout super reflow flush Cache  flushCache flushCache getBody flushCache
Returns the container that occupies the body of the form the form area below the title Use this container as a parent for the controls that should be in the form No layout manager has been set on the form body return Returns the body of the form public Composite get Body return content get Body  getBody getBody
Returns the instance of the form owned by the scrolled form return the form instance public Form get Form return content  getForm

private String text Creates the new scrolled text instance in the provided parent param parent the parent composite param create Form Text if code true code enclosing form text instance will be created in this constructor public Scrolled Form Text Composite parent boolean create Form Text this parent SWT V SCROLL SWT H SCROLL create Form Text  createFormText ScrolledFormText createFormText V_SCROLL H_SCROLL createFormText
Creates the new scrolled text instance in the provided parent param parent the parent composite param style the style to pass to the scrolled composite param create Form Text if code true code enclosing form text instance will be created in this constructor public Scrolled Form Text Composite parent int style boolean create Form Text super parent style if create Form Text set Form Text new Form Text this SWT NULL  createFormText ScrolledFormText createFormText createFormText setFormText FormText
Sets the form text to be managed by this scrolled form text The instance must be a direct child of this class If this method is used code false code must be passed in either of the constructors to avoid creating form text instance param form Text the form text instance to use public void set Form Text Form Text form Text this content form Text super set Content content content set Menu get Menu if text null load Text text  formText setFormText FormText formText formText setContent setMenu getMenu loadText
Sets the foreground color of the scrolled form text param fg the foreground color public void set Foreground Color fg super set Foreground fg if content null content set Foreground fg  setForeground setForeground setForeground
Sets the background color of the scrolled form text param the background color public void set Background Color bg super set Background bg if content null content set Background bg  setBackground setBackground setBackground
The class sets the content widget This method should not be called by classes that instantiate this widget param c content control public final void set Content Control c  setContent
Sets the text to be rendered in the scrolled form text The text must contain formatting tags param text the text to be rendered public void set Text String text this text text load Text text reflow true  setText loadText
Sets the contents to rendered in the scrolled form text The stream must contain formatting tags The caller is responsible for closing the input stream The call may be long running For best results call this method from another thread and call reflow when done but make both calls using Display async Exec because these calls must be made in the event dispatching thread param is content input stream public void set Contents Input Stream is load Contents is  asyncExec setContents InputStream loadContents
Returns the instance of the form text return the form text instance public Form Text get Form Text return content  FormText getFormText
private void load Text String text if content null String markup text if markup starts With form markup form text form content set Text markup true false  loadText startsWith setText
private void load Contents Input Stream is if content null content set Contents is false  loadContents InputStream setContents

private Control current Page Creates a new instance in the provided parent param parent public Scrolled Page Book Composite parent this parent SWT H SCROLL SWT V SCROLL  currentPage ScrolledPageBook H_SCROLL V_SCROLL
Creates a new instance in the provided parent and with the provided style param parent the control parent param style the style to use public Scrolled Page Book Composite parent int style super parent style page Book new Wrapped Page Book this SWT NULL set Content page Book pages new Hashtable set Expand Horizontal true set Expand Vertical true this add Listener SWT Traverse new Listener public void handle Event Event e switch e detail case SWT TRAVERSE ESCAPE case SWT TRAVERSE RETURN case SWT TRAVERSE TAB NEXT case SWT TRAVERSE TAB PREVIOUS e doit true break  ScrolledPageBook pageBook WrappedPageBook setContent pageBook setExpandHorizontal setExpandVertical addListener handleEvent TRAVERSE_ESCAPE TRAVERSE_RETURN TRAVERSE_TAB_NEXT TRAVERSE_TAB_PREVIOUS
Removes the default size of the composite allowing the control to shrink to the trim param w Hint the width hint param h Hint the height hint param changed if code true code do not use cached values public Point compute Size int w Hint int h Hint boolean changed Rectangle trim compute Trim 0 0 10 10 return new Point trim width trim height  wHint hHint computeSize wHint hHint computeTrim
Tests if the page under the provided key is currently in the book param key the page key return code true code if page exists code false code otherwise public boolean has Page Object key return pages contains Key key  hasPage containsKey
Creates a new page for the provided key Use the returned composite to create children in it param key the page key return the newly created page composite public Composite create Page Object key Composite page create Page pages put key page return page  createPage createPage
Returns the page book container return the page book container public Composite get Container return page Book  getContainer pageBook
Registers a page under the privided key to be managed by the page book The page must be a direct child of the page book container param key the page key param page the page composite to register see create Page see get Container public void register Page Object key Control page pages put key page  createPage getContainer registerPage
Removes the page under the provided key from the page book Does nothing if page with that key does not exist param key the page key public void remove Page Object key remove Page key true  removePage removePage
Removes the page under the provided key from the page book Does nothing if page with that key does not exist param key the page key param show Empty Page if code true code shows the empty page after page removal public void remove Page Object key boolean show Empty Page Control page Control pages get key if page null pages remove key page dispose if show Empty Page show Empty Page  showEmptyPage removePage showEmptyPage showEmptyPage showEmptyPage
Shows the page with the provided key and hides the page previously showing Does nothing if the page with that key does not exist param key the page key public void show Page Object key Control page Control pages get key if page null page Book show Page page if current Page null current Page page switching pages force layout if page instanceof Composite Composite page layout false current Page page else show Empty Page reflow true  showPage pageBook showPage currentPage currentPage currentPage showEmptyPage
Shows a page with no children to be used if the desire is to not show any registered page public void show Empty Page if empty Page null empty Page create Page empty Page set Layout new Grid Layout page Book show Page empty Page current Page empty Page reflow true  showEmptyPage emptyPage emptyPage createPage emptyPage setLayout GridLayout pageBook showPage emptyPage currentPage emptyPage
Sets focus on the current page if shown public boolean set Focus if current Page null return current Page set Focus return super set Focus  setFocus currentPage currentPage setFocus setFocus
Returns the page currently showing return the current page public Control get Current Page return current Page  getCurrentPage currentPage
private Composite create Page Composite page new Layout Composite page Book SWT NULL page set Background get Background page set Foreground get Foreground page set Menu page Book get Menu return page  createPage LayoutComposite pageBook setBackground getBackground setForeground getForeground setMenu pageBook getMenu

private static final String COLOR BORDER border Creates a new section instance in the provided parent param parent the parent composite param style the style to use public Section Composite parent int style super parent SWT NULL style if style DESCRIPTION 0 description Label new Label this SWT WRAP  COLOR_BORDER descriptionLabel
protected void internal Set Expanded boolean expanded super internal Set Expanded expanded reflow  internalSetExpanded internalSetExpanded
protected void reflow Composite c this while c null c set Redraw false c c get Parent if c instanceof Scrolled Form break c this while c null c layout true c c get Parent if c instanceof Scrolled Form Scrolled Form c reflow true break c this while c null c set Redraw true c c get Parent if c instanceof Scrolled Form break  setRedraw getParent ScrolledForm getParent ScrolledForm ScrolledForm setRedraw getParent ScrolledForm
Sets the description text Has no effect of DESCRIPTION style was not used to create the control param description public void set Description String description if description Label null description Label set Text description  setDescription descriptionLabel descriptionLabel setText
Returns the current description text return description text or code null code if DESCRIPTION style was not used to create the control public String get Description if description Label null return description Label get Text return null  getDescription descriptionLabel descriptionLabel getText
Sets the separator control of this section The separator must not be samp null samp and must be a direct child of this container If defined separator will be placed below the title text and will remain visible regardless of the expansion state param separator the separator that will be placed below the title text public void set Separator Control Control separator Assert is True separator null separator get Parent equals this this separator separator  setSeparatorControl isTrue getParent
Returns the control that is used as a separator betweeen the title and the client or samp null samp if not set return separator control or samp null samp if not set public Control get Separator Control return separator  getSeparatorControl
Sets the background of the section param bg the new background public void set Background Color bg super set Background bg if description Label null description Label set Background bg  setBackground setBackground descriptionLabel descriptionLabel setBackground
Sets the foreground of the section param fg the new foreground public void set Foreground Color fg super set Foreground fg if description Label null description Label set Foreground fg  setForeground setForeground descriptionLabel descriptionLabel setForeground
Returns the control used to render the description return description control or code null code if DESCRIPTION style was not used to create the control protected Control get Description Control return description Label  getDescriptionControl descriptionLabel
Sets the color of the title bar border when TITLE BAR style is used param color the title bar border color public void set Title Bar Border Color Color color put Title Bar Color COLOR BORDER color  TITLE_BAR setTitleBarBorderColor putTitleBarColor COLOR_BORDER
Sets the color of the title bar foreground when TITLE BAR style is used param color the title bar foreground public void set Title Bar Foreground Color color put Title Bar Color COLOR FG color  TITLE_BAR setTitleBarForeground putTitleBarColor COLOR_FG
Sets the color of the title bar background when TITLE BAR style is used This color is used as a starting color for the vertical gradient param color the title bar border background public void set Title Bar Background Color color put Title Bar Color COLOR BG color text Label set Background color if toggle null toggle set Background color  TITLE_BAR setTitleBarBackground putTitleBarColor COLOR_BG textLabel setBackground setBackground
Sets the color of the title bar gradient background when TITLE BAR style is used This color is used at the height where title controls end toggle tool bar param color the title bar gradient background public void set Title Bar Gradient Background Color color put Title Bar Color COLOR GBG color text Label set Background color if toggle null toggle set Background color  TITLE_BAR setTitleBarGradientBackground putTitleBarColor COLOR_GBG textLabel setBackground setBackground
Returns the title bar border color when TITLE BAR style is used return the title bar border color public Color get Title Bar Border Color if title Colors null return null return Color title Colors get COLOR BORDER  TITLE_BAR getTitleBarBorderColor titleColors titleColors COLOR_BORDER
Returns the title bar gradient background color when TITLE BAR style is used return the title bar gradient background public Color get Title Bar Gradient Background if title Colors null return null return Color title Colors get COLOR GBG  TITLE_BAR getTitleBarGradientBackground titleColors titleColors COLOR_GBG
Returns the title bar foreground when TITLE BAR style is used return the title bar foreground public Color get Title Bar Foreground if title Colors null return null return Color title Colors get COLOR FG  TITLE_BAR getTitleBarForeground titleColors titleColors COLOR_FG
Returns the title bar background when TITLE BAR style is used return the title bar background public Color get Title Bar Background if title Colors null return null return Color title Colors get COLOR BG  TITLE_BAR getTitleBarBackground titleColors titleColors COLOR_BG
private void put Title Bar Color String key Color color if title Colors null title Colors new Hashtable title Colors put key color  putTitleBarColor titleColors titleColors titleColors
protected void on Paint Paint Event e Color bg null Color gbg null Color fg null Color border null if title Colors null bg Color title Colors get COLOR BG gbg Color title Colors get COLOR GBG fg Color title Colors get COLOR FG border Color title Colors get COLOR BORDER if bg null bg get Background if fg null fg get Foreground if border null border fg if gbg null gbg bg Rectangle bounds get Client Area Point tsize null Point tcsize null if toggle null tsize toggle get Size int twidth bounds width margin Width margin Width if tsize null twidth tsize x GAP if get Text Client null tcsize get Text Client get Size if tcsize null twidth tcsize x GAP Point size text Label get Size int tvmargin GAP int theight 0 if tsize null theight Math max theight tsize y if tcsize null theight Math max theight tcsize y theight Math max theight size y theight tvmargin tvmargin int midpoint theight 66 100 int rem theight midpoint GC gc e gc gc set Foreground bg gc set Background gbg gc fill Gradient Rectangle margin Width margin Height bounds width 1 margin Width margin Width midpoint 1 true gc set Foreground gbg gc set Background get Background gc fill Gradient Rectangle margin Width margin Height midpoint 1 bounds width 1 margin Width margin Width rem 1 true gc set Foreground border gc draw Line margin Width margin Height 2 margin Width margin Height theight 1 gc draw Line margin Width margin Height 2 margin Width 2 margin Height gc draw Line margin Width 2 margin Height bounds width margin Width 3 margin Height gc draw Line bounds width margin Width 3 margin Height bounds width margin Width 1 margin Height 2 gc draw Line bounds width margin Width 1 margin Height 2 bounds width margin Width 1 margin Height theight 1 if toggle null is Expanded gc draw Line margin Width margin Height theight 1 bounds width margin Width 1 margin Height theight 1  onPaint PaintEvent titleColors titleColors COLOR_BG titleColors COLOR_GBG titleColors COLOR_FG titleColors COLOR_BORDER getBackground getForeground getClientArea getSize marginWidth marginWidth getTextClient getTextClient getSize textLabel getSize setForeground setBackground fillGradientRectangle marginWidth marginHeight marginWidth marginWidth setForeground setBackground getBackground fillGradientRectangle marginWidth marginHeight marginWidth marginWidth setForeground drawLine marginWidth marginHeight marginWidth marginHeight drawLine marginWidth marginHeight marginWidth marginHeight drawLine marginWidth marginHeight marginWidth marginHeight drawLine marginWidth marginHeight marginWidth marginHeight drawLine marginWidth marginHeight marginWidth marginHeight isExpanded drawLine marginWidth marginHeight marginWidth marginHeight

super parent style add Listener SWT Resize new Listener public void handle Event Event e reflow true  addListener handleEvent
private static final int V SCROLL INCREMENT 64 Creates the new instance param parent the parent composite param style the style to use public Shared Scrolled Composite Composite parent int style super parent style add Listener SWT Resize new Listener public void handle Event Event e reflow true initialize Scroll Bars  V_SCROLL_INCREMENT SharedScrolledComposite addListener handleEvent initializeScrollBars
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 else 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 c layout flush Cache Point new Size c compute Size Form Util get Width Hint client Area width c Form Util get Height Hint client Area height c flush Cache c set Size new Size set Min Size new Size Form Util update Page Increment this  flushCache flushCache getContent clientArea getClientArea flushCache newSize computeSize FormUtil getWidthHint clientArea FormUtil getHeightHint clientArea flushCache setSize newSize setMinSize newSize FormUtil updatePageIncrement
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 Form Util update Page Increment this  initializeScrollBars ScrollBar getHorizontalBar setIncrement H_SCROLL_INCREMENT ScrollBar getVerticalBar setIncrement V_SCROLL_INCREMENT FormUtil updatePageIncrement

Point comp Size The default constructor public Table Wrap Data  compSize TableWrapData
The convinience constructor allows passing the horizontal alignment style param align horizontal alignment LEFT MIDDLE RIGHT FILL or FILL GRAB public Table Wrap Data int align this align TOP 1 1  FILL_GRAB TableWrapData
The convinience constructor allows passing the alignment styles param align horizontal alignment LEFT CENTER RIGHT FILL or FILL GRAB param valign vertical alignment TOP MIDDLE BOTTOM FILL or FILL GRAB public Table Wrap Data int align int valign this align valign 1 1  FILL_GRAB FILL_GRAB TableWrapData
The convinience constructor allows passing the alignment styles column and row spans param align horizontal alignment LEFT CENTER RIGHT FILL or FILL GRAB param valign vertical alignment TOP MIDDLE BOTTOM FILL or FILL GRAB param rowspan row span 1 or more param colspan column span 1 or more public Table Wrap Data int align int valign int rowspan int colspan if align FILL GRAB this align FILL grab Horizontal true else this align align if valign FILL GRAB this valign FILL grab Vertical true else this valign valign this rowspan rowspan this colspan colspan  FILL_GRAB FILL_GRAB TableWrapData FILL_GRAB grabHorizontal FILL_GRAB grabVertical

int total Height public Row Span Control child int column int row this child child this column column this row row  totalHeight RowSpan
public void update int current Row int row Height Table Wrap Data td Table Wrap Data child get Layout Data if current Row row td rowspan 1 total Height row Height if current Row row total Height vertical Spacing  currentRow rowHeight TableWrapData TableWrapData getLayoutData currentRow totalHeight rowHeight currentRow totalHeight verticalSpacing
public int get Required Height Increase if total Height height return height total Height else return 0  getRequiredHeightIncrease totalHeight totalHeight
Implements I Layout Extension Should not be called directly see I Layout Extension public int compute Minimum Width Composite parent boolean changed changed true initialize If Needed parent changed if initial Layout changed true initial Layout false if grid null changed changed true grid new Vector create Grid parent if min Column Widths null min Column Widths new int num Columns for int i 0 i num Columns i min Column Widths i 0 return internal Get Minimum Width parent changed  ILayoutExtension ILayoutExtension computeMinimumWidth initializeIfNeeded initialLayout initialLayout createGrid minColumnWidths minColumnWidths numColumns numColumns minColumnWidths internalGetMinimumWidth
Implements I Layout Extension Should not be called directly see I Layout Extension public int compute Maximum Width Composite parent boolean changed changed true initialize If Needed parent changed if initial Layout changed true initial Layout false if grid null changed changed true grid new Vector create Grid parent if max Column Widths null max Column Widths new int num Columns for int i 0 i num Columns i max Column Widths i 0 return internal Get Maximum Width parent changed  ILayoutExtension ILayoutExtension computeMaximumWidth initializeIfNeeded initialLayout initialLayout createGrid maxColumnWidths maxColumnWidths numColumns numColumns maxColumnWidths internalGetMaximumWidth
see Layout layout Composite boolean protected void layout Composite parent boolean changed Rectangle client Area parent get Client Area Control children parent get Children if children length 0 return int parent Width client Area width changed true initialize If Needed parent changed if initial Layout changed true initial Layout false if grid null changed changed true grid new Vector create Grid parent reset Column Widths int min Width internal Get Minimum Width parent changed int max Width internal Get Maximum Width parent changed int table Width parent Width int column Widths if parent Width min Width table Width min Width if make Columns Equal Width column Widths new int num Columns for int i 0 i num Columns i column Widths i widest Column Width else column Widths min Column Widths else if parent Width max Width if growing Columns length 0 table Width max Width column Widths max Column Widths else column Widths new int num Columns int col Space table Width left Margin right Margin col Space num Columns 1 horizontal Spacing int extra parent Width max Width int col Extra extra growing Columns length for int i 0 i num Columns i column Widths i max Column Widths i if is Growing Column i column Widths i col Extra else column Widths new int num Columns if make Columns Equal Width int col Space table Width left Margin right Margin col Space num Columns 1 horizontal Spacing int col col Space num Columns for int i 0 i num Columns i column Widths i col else column Widths assign Extra Space table Width max Width min Width int y top Margin int row Heights compute Row Heights children column Widths changed for int i 0 i grid size i int row Height row Heights i int x left Margin Table Wrap Data row Table Wrap Data grid element At i for int j 0 j num Columns j Table Wrap Data td row j if td is Item Data Control child children td child Index place Control child td x y row Heights i x column Widths j if j num Columns 1 x horizontal Spacing y row Height vertical Spacing  clientArea getClientArea getChildren parentWidth clientArea initializeIfNeeded initialLayout initialLayout createGrid resetColumnWidths minWidth internalGetMinimumWidth maxWidth internalGetMaximumWidth tableWidth parentWidth columnWidths parentWidth minWidth tableWidth minWidth makeColumnsEqualWidth columnWidths numColumns numColumns columnWidths widestColumnWidth columnWidths minColumnWidths parentWidth maxWidth growingColumns tableWidth maxWidth columnWidths maxColumnWidths columnWidths numColumns colSpace tableWidth leftMargin rightMargin colSpace numColumns horizontalSpacing parentWidth maxWidth colExtra growingColumns numColumns columnWidths maxColumnWidths isGrowingColumn columnWidths colExtra columnWidths numColumns makeColumnsEqualWidth colSpace tableWidth leftMargin rightMargin colSpace numColumns horizontalSpacing colSpace numColumns numColumns columnWidths columnWidths assignExtraSpace tableWidth maxWidth minWidth topMargin rowHeights computeRowHeights columnWidths rowHeight rowHeights leftMargin TableWrapData TableWrapData elementAt numColumns TableWrapData isItemData childIndex placeControl rowHeights columnWidths numColumns horizontalSpacing rowHeight verticalSpacing
int compute Row Heights Control children int column Widths boolean changed int row Heights new int grid size for int i 0 i grid size i Table Wrap Data row Table Wrap Data grid element At i row Heights i 0 for int j 0 j num Columns j Table Wrap Data td row j if td is Item Data false continue Control child children td child Index int span td colspan int cwidth 0 for int k j k j span k cwidth column Widths k if k j span 1 cwidth horizontal Spacing Point size compute Size child cwidth td indent changed td comp Width cwidth if td height Hint SWT DEFAULT size new Point size x td height Hint td comp Size size Row Span rowspan Row Span rowspans get child if rowspan null row Heights i Math max row Heights i size y else rowspan height size y update Row Spans i row Heights i for Enumeration enum rowspans elements enum has More Elements Row Span rowspan Row Span enum next Element int increase rowspan get Required Height Increase if increase 0 continue Table Wrap Data td Table Wrap Data rowspan child get Layout Data int ngrowing 0 int affected Rows new int grid size for int i 0 i growing Rows length i int growing Row growing Rows i if growing Row rowspan row growing Row rowspan row td rowspan affected Rows ngrowing growing Row if ngrowing 0 ngrowing 1 affected Rows 0 rowspan row td rowspan 1 increase increase ngrowing int per Row Increase increase ngrowing for int i 0 i ngrowing i int growing Row affected Rows i row Heights growing Row per Row Increase return row Heights  computeRowHeights columnWidths rowHeights TableWrapData TableWrapData elementAt rowHeights numColumns TableWrapData isItemData childIndex columnWidths horizontalSpacing computeSize compWidth heightHint heightHint compSize RowSpan RowSpan rowHeights rowHeights updateRowSpans rowHeights hasMoreElements RowSpan RowSpan nextElement getRequiredHeightIncrease TableWrapData TableWrapData getLayoutData affectedRows growingRows growingRow growingRows growingRow growingRow affectedRows growingRow affectedRows perRowIncrease growingRow affectedRows rowHeights growingRow perRowIncrease rowHeights
boolean is Growing Column int col if growing Columns null return false for int i 0 i growing Columns length i if col growing Columns i return true return false  isGrowingColumn growingColumns growingColumns growingColumns
int assign Extra Space int table Width int max Width int min Width int fixed Part left Margin right Margin num Columns 1 horizontal Spacing int D max Width min Width int W table Width fixed Part min Width int widths new int num Columns int rem 0 for int i 0 i num Columns i int cmin min Column Widths i int cmax max Column Widths i int d cmax cmin int extra D 0 d W D 0 if i num Columns 1 widths i cmin extra rem widths i else widths i table Width fixed Part rem return widths  assignExtraSpace tableWidth maxWidth minWidth fixedPart leftMargin rightMargin numColumns horizontalSpacing maxWidth minWidth tableWidth fixedPart minWidth numColumns numColumns minColumnWidths maxColumnWidths numColumns tableWidth fixedPart
Point compute Size Control child int width int indent boolean changed int width Arg width indent if is Wrap child width Arg SWT DEFAULT Point size child compute Size width Arg SWT DEFAULT changed size x indent return size  computeSize widthArg isWrap widthArg computeSize widthArg
void place Control Control control Table Wrap Data td int x int y int row Heights int row int xloc x td indent int yloc y int height td comp Size y int col Width td comp Width td indent int width Math min td comp Size x col Width int slot Height row Heights row Row Span rowspan Row Span rowspans get control if rowspan null slot Height 0 for int i row i row td rowspan i if i row slot Height vertical Spacing slot Height row Heights i align horizontally if td align Table Wrap Data CENTER xloc x col Width 2 width 2 else if td align Table Wrap Data RIGHT xloc x col Width width else if td align Table Wrap Data FILL width col Width align vertically if td valign Table Wrap Data MIDDLE yloc y slot Height 2 height 2 else if td valign Table Wrap Data BOTTOM yloc y slot Height height else if td valign Table Wrap Data FILL height slot Height control set Bounds xloc yloc width height  placeControl TableWrapData rowHeights compSize colWidth compWidth compSize colWidth slotHeight rowHeights RowSpan RowSpan slotHeight slotHeight verticalSpacing slotHeight rowHeights TableWrapData colWidth TableWrapData colWidth TableWrapData colWidth TableWrapData slotHeight TableWrapData slotHeight TableWrapData slotHeight setBounds
void create Grid Composite composite int row column row Fill column Fill Control children Table Wrap Data spacer Spec Vector growing Cols new Vector Vector growing Rows new Vector rowspans new Hashtable children composite get Children if children length 0 return grid add Element create Empty Row row 0 column 0 Loop through the children and place their associated layout specs in the grid Placement occurs left to right top to bottom i e by row for int i 0 i children length i Find the first available spot in the grid Control child children i Table Wrap Data spec Table Wrap Data child get Layout Data while Table Wrap Data grid element At row column null column column 1 if column num Columns row row 1 column 0 if row grid size grid add Element create Empty Row See if the place will support the widget s horizontal span If not go to the next row if column spec colspan 1 num Columns grid add Element create Empty Row row row 1 column 0 The vertical span for the item will be at least 1 If it is 1 add other rows to the grid if spec rowspan 1 rowspans put child new Row Span child column row for int j 2 j spec rowspan j if row j grid size grid add Element create Empty Row Store the layout spec Also cache the child Index NOTE That we assume the children of a composite are maintained in the order in which they are created and added to the composite Table Wrap Data grid element At row column spec spec child Index i if spec grab Horizontal update Growing Columns growing Cols spec column if spec grab Vertical update Growing Rows growing Rows spec row Put spacers in the grid to account for the item s vertical and horizontal span row Fill spec rowspan 1 column Fill spec colspan 1 for int r 1 r row Fill r for int c 0 c spec colspan c spacer Spec new Table Wrap Data spacer Spec is Item Data false Table Wrap Data grid element At row r column c spacer Spec for int c 1 c column Fill c for int r 0 r spec rowspan r spacer Spec new Table Wrap Data spacer Spec is Item Data false Table Wrap Data grid element At row r column c spacer Spec column column spec colspan 1 Fill out empty grid cells with spacers for int k column 1 k num Columns k spacer Spec new Table Wrap Data spacer Spec is Item Data false Table Wrap Data grid element At row k spacer Spec for int k row 1 k grid size k spacer Spec new Table Wrap Data spacer Spec is Item Data false Table Wrap Data grid element At k column spacer Spec growing Columns new int growing Cols size for int i 0 i growing Cols size i growing Columns i Integer growing Cols get i int Value this growing Rows new int growing Rows size for int i 0 i growing Rows size i this growing Rows i Integer growing Rows get i int Value  createGrid rowFill columnFill TableWrapData spacerSpec growingCols growingRows getChildren addElement createEmptyRow TableWrapData TableWrapData getLayoutData TableWrapData elementAt numColumns addElement createEmptyRow numColumns addElement createEmptyRow RowSpan addElement createEmptyRow childIndex TableWrapData elementAt childIndex grabHorizontal updateGrowingColumns growingCols grabVertical updateGrowingRows growingRows rowFill columnFill rowFill spacerSpec TableWrapData spacerSpec isItemData TableWrapData elementAt spacerSpec columnFill spacerSpec TableWrapData spacerSpec isItemData TableWrapData elementAt spacerSpec numColumns spacerSpec TableWrapData spacerSpec isItemData TableWrapData elementAt spacerSpec spacerSpec TableWrapData spacerSpec isItemData TableWrapData elementAt spacerSpec growingColumns growingCols growingCols growingColumns growingCols intValue growingRows growingRows growingRows growingRows growingRows intValue
private void update Growing Columns Vector growing Columns Table Wrap Data spec int column int affected Column column spec colspan 1 for int i 0 i growing Columns size i Integer col Integer growing Columns get i if col int Value affected Column return growing Columns add new Integer affected Column  updateGrowingColumns growingColumns TableWrapData affectedColumn growingColumns growingColumns intValue affectedColumn growingColumns affectedColumn
private void update Growing Rows Vector growing Rows Table Wrap Data spec int row int affected Row row spec rowspan 1 for int i 0 i growing Rows size i Integer irow Integer growing Rows get i if irow int Value affected Row return growing Rows add new Integer affected Row  updateGrowingRows growingRows TableWrapData affectedRow growingRows growingRows intValue affectedRow growingRows affectedRow
private Table Wrap Data create Empty Row Table Wrap Data row new Table Wrap Data num Columns for int i 0 i num Columns i row i null return row  TableWrapData createEmptyRow TableWrapData TableWrapData numColumns numColumns
see Layout compute Size Composite int int boolean protected Point compute Size Composite parent int w Hint int h Hint boolean changed Control children parent get Children if children length 0 return new Point 0 0 int parent Width w Hint changed true initialize If Needed parent changed if initial Layout changed true initial Layout false if grid null changed changed true grid new Vector create Grid parent reset Column Widths int min Width internal Get Minimum Width parent changed int max Width internal Get Maximum Width parent changed int table Width parent Width int column Widths if parent Width min Width table Width min Width if make Columns Equal Width column Widths new int num Columns for int i 0 i num Columns i column Widths i widest Column Width else column Widths min Column Widths else if parent Width max Width if make Columns Equal Width column Widths new int num Columns int col Space parent Width left Margin right Margin col Space num Columns 1 horizontal Spacing int col col Space num Columns for int i 0 i num Columns i column Widths i col else table Width max Width column Widths max Column Widths else column Widths new int num Columns if make Columns Equal Width int col Space table Width left Margin right Margin col Space num Columns 1 horizontal Spacing int col col Space num Columns for int i 0 i num Columns i column Widths i col else column Widths assign Extra Space table Width max Width min Width int total Height 0 int inner Height 0 compute widths for int i 0 i grid size i Table Wrap Data row Table Wrap Data grid element At i assign widths calculate heights int row Height 0 for int j 0 j num Columns j Table Wrap Data td row j if td is Item Data false continue Control child children td child Index int span td colspan int cwidth 0 for int k j k j span k if k j cwidth horizontal Spacing cwidth column Widths k int cy td height Hint if cy SWT DEFAULT Point size compute Size child cwidth td indent changed cy size y Row Span rowspan Row Span rowspans get child if rowspan null don t take the height of this child into acount because it spans multiple rows rowspan height cy else row Height Math max row Height cy update Row Spans i row Height if i 0 inner Height vertical Spacing inner Height row Height if rowspans is Empty inner Height compensate For Row Spans inner Height total Height top Margin inner Height bottom Margin return new Point table Width total Height  computeSize computeSize wHint hHint getChildren parentWidth wHint initializeIfNeeded initialLayout initialLayout createGrid resetColumnWidths minWidth internalGetMinimumWidth maxWidth internalGetMaximumWidth tableWidth parentWidth columnWidths parentWidth minWidth tableWidth minWidth makeColumnsEqualWidth columnWidths numColumns numColumns columnWidths widestColumnWidth columnWidths minColumnWidths parentWidth maxWidth makeColumnsEqualWidth columnWidths numColumns colSpace parentWidth leftMargin rightMargin colSpace numColumns horizontalSpacing colSpace numColumns numColumns columnWidths tableWidth maxWidth columnWidths maxColumnWidths columnWidths numColumns makeColumnsEqualWidth colSpace tableWidth leftMargin rightMargin colSpace numColumns horizontalSpacing colSpace numColumns numColumns columnWidths columnWidths assignExtraSpace tableWidth maxWidth minWidth totalHeight innerHeight TableWrapData TableWrapData elementAt rowHeight numColumns TableWrapData isItemData childIndex horizontalSpacing columnWidths heightHint computeSize RowSpan RowSpan rowHeight rowHeight updateRowSpans rowHeight innerHeight verticalSpacing innerHeight rowHeight isEmpty innerHeight compensateForRowSpans innerHeight totalHeight topMargin innerHeight bottomMargin tableWidth totalHeight
private void update Row Spans int row int row Height if rowspans null rowspans size 0 return for Enumeration enum rowspans elements enum has More Elements Row Span rowspan Row Span enum next Element rowspan update row row Height  updateRowSpans rowHeight hasMoreElements RowSpan RowSpan nextElement rowHeight
private int compensate For Row Spans int total Height for Enumeration enum rowspans elements enum has More Elements Row Span rowspan Row Span enum next Element total Height rowspan get Required Height Increase return total Height  compensateForRowSpans totalHeight hasMoreElements RowSpan RowSpan nextElement totalHeight getRequiredHeightIncrease totalHeight
int internal Get Minimum Width Composite parent boolean changed if changed calculate Minimum Column Widths parent true int minimum Width 0 widest Column Width 0 if make Columns Equal Width for int i 0 i num Columns i widest Column Width Math max widest Column Width min Column Widths i for int i 0 i num Columns i if i 0 minimum Width horizontal Spacing if make Columns Equal Width minimum Width widest Column Width else minimum Width min Column Widths i add margins minimum Width left Margin right Margin return minimum Width  internalGetMinimumWidth calculateMinimumColumnWidths minimumWidth widestColumnWidth makeColumnsEqualWidth numColumns widestColumnWidth widestColumnWidth minColumnWidths numColumns minimumWidth horizontalSpacing makeColumnsEqualWidth minimumWidth widestColumnWidth minimumWidth minColumnWidths minimumWidth leftMargin rightMargin minimumWidth
int internal Get Maximum Width Composite parent boolean changed if changed calculate Maximum Column Widths parent true int maximum Width 0 for int i 0 i num Columns i if i 0 maximum Width horizontal Spacing maximum Width max Column Widths i add margins maximum Width left Margin right Margin return maximum Width  internalGetMaximumWidth calculateMaximumColumnWidths maximumWidth numColumns maximumWidth horizontalSpacing maximumWidth maxColumnWidths maximumWidth leftMargin rightMargin maximumWidth
void reset Column Widths if min Column Widths null min Column Widths new int num Columns if max Column Widths null max Column Widths new int num Columns for int i 0 i num Columns i min Column Widths i 0 for int i 0 i num Columns i max Column Widths i 0  resetColumnWidths minColumnWidths minColumnWidths numColumns maxColumnWidths maxColumnWidths numColumns numColumns minColumnWidths numColumns maxColumnWidths
void calculate Minimum Column Widths Composite parent boolean changed Control children parent get Children for int i 0 i grid size i Table Wrap Data row Table Wrap Data grid element At i for int j 0 j num Columns j Table Wrap Data td row j if td is Item Data false continue Control child children td child Index int min Width 1 if child instanceof Composite Composite cc Composite child Layout l cc get Layout if l instanceof I Layout Extension min Width I Layout Extension l compute Minimum Width cc changed if min Width 1 int minW Hint is Wrap child 0 SWT DEFAULT Point size child compute Size minW Hint SWT DEFAULT changed min Width size x min Width td indent if td colspan 1 min Column Widths j Math max min Column Widths j min Width else check if the current minimum width is enough to support the control if not add the delta to the last column int current 0 for int k j k j td colspan k if k j current horizontal Spacing current min Column Widths k if min Width current we are ok nothing to do here else int ndiv 0 if growing Columns null for int k j k j td colspan k if is Growing Column k ndiv if ndiv 0 add the delta to the last column min Column Widths j td colspan 1 min Width current else distribute the delta to the growing columns int percolumn current td colspan ndiv if current td colspan ndiv 0 percolumn for int k j k j td colspan k if is Growing Column k min Column Widths k percolumn  calculateMinimumColumnWidths getChildren TableWrapData TableWrapData elementAt numColumns TableWrapData isItemData childIndex minWidth getLayout ILayoutExtension minWidth ILayoutExtension computeMinimumWidth minWidth minWHint isWrap computeSize minWHint minWidth minWidth minColumnWidths minColumnWidths minWidth horizontalSpacing minColumnWidths minWidth growingColumns isGrowingColumn minColumnWidths minWidth isGrowingColumn minColumnWidths
boolean is Wrap Control control if control instanceof Composite Composite control get Layout instanceof I Layout Extension return true return control get Style SWT WRAP 0  isWrap getLayout ILayoutExtension getStyle
void calculate Maximum Column Widths Composite parent boolean changed Control children parent get Children for int i 0 i num Columns i max Column Widths i 0 for int i 0 i grid size i Table Wrap Data row Table Wrap Data grid element At i for int j 0 j num Columns j Table Wrap Data td row j if td is Item Data false continue Control child children td child Index int max Width SWT DEFAULT if child instanceof Composite Composite cc Composite child Layout l cc get Layout if l instanceof I Layout Extension max Width I Layout Extension l compute Maximum Width cc changed else if td max Width SWT DEFAULT max Width td max Width if max Width SWT DEFAULT Point size child compute Size SWT DEFAULT SWT DEFAULT changed max Width size x max Width td indent if td colspan 1 max Column Widths j Math max max Column Widths j max Width else check if the current maximum width is enough to support the control if not add the delta to the last column int current 0 for int k j k j td colspan k if k j current horizontal Spacing current max Column Widths k if max Width current we are ok nothing to do here else int ndiv 0 if growing Columns null for int k j k j td colspan k if is Growing Column k ndiv if ndiv 0 add the delta to the last column max Column Widths j td colspan 1 max Width current else distribute the delta to the growing columns int percolumn current td colspan ndiv if current td colspan ndiv 0 percolumn divide the distribution per row if the control will span multiple rows percolumn td rowspan for int k j k j td colspan k if is Growing Column k max Column Widths k percolumn  calculateMaximumColumnWidths getChildren numColumns maxColumnWidths TableWrapData TableWrapData elementAt numColumns TableWrapData isItemData childIndex maxWidth getLayout ILayoutExtension maxWidth ILayoutExtension computeMaximumWidth maxWidth maxWidth maxWidth maxWidth computeSize maxWidth maxWidth maxColumnWidths maxColumnWidths maxWidth horizontalSpacing maxColumnWidths maxWidth growingColumns isGrowingColumn maxColumnWidths maxWidth isGrowingColumn maxColumnWidths
private void initialize If Needed Composite parent boolean changed if changed initial Layout true if initial Layout initialize Layout Data parent initial Layout false  initializeIfNeeded initialLayout initialLayout initializeLayoutData initialLayout
void initialize Layout Data Composite composite Control children composite get Children for int i 0 i children length i Control child children i if child get Layout Data null child set Layout Data new Table Wrap Data  initializeLayoutData getChildren getLayoutData setLayoutData TableWrapData

private Color hover Color Creates a control in a provided composite param parent the parent param style the style public Toggle Hyperlink Composite parent int style super parent style add Listener SWT Mouse Enter new Listener public void handle Event Event e hover true redraw add Listener SWT Mouse Exit new Listener public void handle Event Event e hover false redraw add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e set Expanded is Expanded init Accessible  hoverColor ToggleHyperlink addListener MouseEnter handleEvent addListener MouseExit handleEvent addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent setExpanded isExpanded initAccessible
Sets the color of the decoration param decoration Color public void set Decoration Color Color decoration Color this decoration Color decoration Color  decorationColor setDecorationColor decorationColor decorationColor decorationColor
Returns the color of the decoration return decoration color public Color get Decoration Color return decoration Color  getDecorationColor decorationColor
Sets the hover color of decoration Hover color will be used when mouse enters the decoration area param hover Color the hover color to use public void set Hover Decoration Color Color hover Color this hover Color hover Color  hoverColor setHoverDecorationColor hoverColor hoverColor hoverColor
Returns the hover color of the decoration return the hover color of the decoration public Color ge Hover Decoration Color return hover Color  geHoverDecorationColor hoverColor
Computes the size of the control param w Hint width hint param h Hint height hint param changed if true flush any saved layout state public Point compute Size int w Hint int h Hint boolean changed int width height if w Hint SWT DEFAULT width w Hint else width inner Width 2 margin Width if h Hint SWT DEFAULT height h Hint else height inner Height 2 margin Height return new Point width height  wHint hHint computeSize wHint hHint wHint wHint innerWidth marginWidth hHint hHint innerHeight marginHeight
Returns the expansion state of the toggle control When toggle is in the normal downward state the value is samp true samp Collapsed control will return samp false samp return samp false samp if collapsed samp true samp otherwise public boolean is Expanded return expanded  isExpanded
Sets the expansion state of the twistie control param selection public void set Expanded boolean expanded this expanded expanded redraw  setExpanded
private void init Accessible get Accessible add Accessible Listener new Accessible Adapter public void get Help Accessible Event e e result get Tool Tip Text  initAccessible getAccessible addAccessibleListener AccessibleAdapter getHelp AccessibleEvent getToolTipText
new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point test Point to Control new Point e x e y if get Bounds contains test Point e childID ACC CHILDID SELF  AccessibleControlAdapter getChildAtPoint AccessibleControlEvent testPoint toControl getBounds testPoint CHILDID_SELF
public void get Location Accessible Control Event e Rectangle location get Bounds Point pt to Display new Point location x location y e x pt x e y pt y e width location width e height location height  getLocation AccessibleControlEvent getBounds toDisplay
e height location height public void get Child Count Accessible Control Event e e detail 0  getChildCount AccessibleControlEvent
e detail 0 public void get Role Accessible Control Event e e detail ACC ROLE TREE  getRole AccessibleControlEvent ROLE_TREE
public void get State Accessible Control Event e e detail Toggle Hyperlink this is Expanded ACC STATE EXPANDED ACC STATE COLLAPSED  getState AccessibleControlEvent ToggleHyperlink isExpanded STATE_EXPANDED STATE_COLLAPSED
public void get Value Accessible Control Event e e result Toggle Hyperlink this is Expanded 1 0  getValue AccessibleControlEvent ToggleHyperlink isExpanded
private void init Accessible get Accessible add Accessible Listener new Accessible Adapter public void get Help Accessible Event e e result get Tool Tip Text get Accessible add Accessible Control Listener new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point test Point to Control new Point e x e y if get Bounds contains test Point e childID ACC CHILDID SELF public void get Location Accessible Control Event e Rectangle location get Bounds Point pt to Display new Point location x location y e x pt x e y pt y e width location width e height location height public void get Child Count Accessible Control Event e e detail 0 public void get Role Accessible Control Event e e detail ACC ROLE TREE public void get State Accessible Control Event e e detail Toggle Hyperlink this is Expanded ACC STATE EXPANDED ACC STATE COLLAPSED public void get Value Accessible Control Event e e result Toggle Hyperlink this is Expanded 1 0  initAccessible getAccessible addAccessibleListener AccessibleAdapter getHelp AccessibleEvent getToolTipText getAccessible addAccessibleControlListener AccessibleControlAdapter getChildAtPoint AccessibleControlEvent testPoint toControl getBounds testPoint CHILDID_SELF getLocation AccessibleControlEvent getBounds toDisplay getChildCount AccessibleControlEvent getRole AccessibleControlEvent ROLE_TREE getState AccessibleControlEvent ToggleHyperlink isExpanded STATE_EXPANDED STATE_COLLAPSED getValue AccessibleControlEvent ToggleHyperlink isExpanded

public final class Tree Node extends Toggle Hyperlink Creates a control in a provided composite param parent the parent param style the style public Tree Node Composite parent int style super parent style inner Width 10 inner Height 10  TreeNode ToggleHyperlink TreeNode innerWidth innerHeight
inner Height 10 protected void paint Paint Event e paint Hyperlink e gc  innerHeight PaintEvent paintHyperlink
protected void paint Hyperlink GC gc Rectangle box get Box Bounds gc gc set Foreground get Display get System Color SWT COLOR WIDGET NORMAL SHADOW gc draw Rectangle box gc set Foreground get Foreground gc draw Line box x 2 box y 4 box x 6 box y 4 if is Expanded gc draw Line box x 4 box y 2 box x 4 box y 6 if get Selection gc set Foreground get Foreground gc draw Focus box x 1 box y 1 box width 3 box height 3  paintHyperlink getBoxBounds setForeground getDisplay getSystemColor COLOR_WIDGET_NORMAL_SHADOW drawRectangle setForeground getForeground drawLine isExpanded drawLine getSelection setForeground getForeground drawFocus
private Rectangle get Box Bounds GC gc int x 1 int y 0 gc set Font get Font int height gc get Font Metrics get Height y height 2 4 y Math max y 0 y 2 return new Rectangle x y 8 8  getBoxBounds setFont getFont getFontMetrics getHeight

private static final int off Points 2 1 2 8 6 4 Creates a control in a provided composite param parent the parent param style the style public Twistie Composite parent int style super parent SWT NO BACKGROUND style inner Width 9 inner Height 9  offPoints NO_BACKGROUND innerWidth innerHeight
protected void paint Hyperlink GC gc if hover ge Hover Decoration Color null gc set Background ge Hover Decoration Color else if get Decoration Color null gc set Background get Decoration Color else gc set Background get Foreground int data Point size get Size int x size x 9 2 int y size y 9 2 if is Expanded data translate on Points x y else data translate off Points x y gc fill Polygon data gc set Background get Background  paintHyperlink geHoverDecorationColor setBackground geHoverDecorationColor getDecorationColor setBackground getDecorationColor setBackground getForeground getSize isExpanded onPoints offPoints fillPolygon setBackground getBackground
private int translate int data int x int y int target new int data length for int i 0 i data length i 2 target i data i x for int i 1 i data length i 2 target i data i y return target 

public abstract class Abstract HelpUI Displays the entire help bookshelf public abstract void display Help  AbstractHelpUI displayHelp
Displays context sensitive help for the given context p x y coordinates specify the location where the context sensitive help UI will be presented These coordinates are screen relative ie 0 0 is the top left most screen corner The platform is responsible for calling this method and supplying the appropriate location p param context the context to display param x horizontal position param y verifical position 
Displays help content for the help resource with the given URL p This method is called by the platform to launch the help system UI displaying the documentation identified by the code href code parameter p p The help system makes no guarantee that all the help resources can be displayed or how they are displayed p param href the URL of the help resource p Valid href are as described in link org eclipse help I Help Resource get Href I Help Resource get Href p  IHelpResource getHref IHelpResource getHref
Returns whether the context sensitive help window is currently being displayed return code true code if the context sensitive help window is currently being displayed code false code if not 

private Object context Creates a new context computer for the given dialog page and help context param page the dialog page param help Context a single help context id type code String code or help context object type code I Context code public Dialog Page Context Computer I Dialog Page page Object help Context Assert is True help Context instanceof String help Context instanceof I Context this page page context help Context  helpContext IContext DialogPageContextComputer IDialogPage helpContext isTrue helpContext helpContext IContext helpContext
Add the contexts to the context list param object the contexts code Object code or code I Context Computer code param event the help event private void add Contexts Object object Help Event event Assert is True object instanceof Object object instanceof I Context Computer object instanceof String if object instanceof String context List add object return Object contexts if object instanceof I Context Computer get local contexts contexts I Context Computer object get Local Contexts event else contexts Object object copy the contexts into our list for int i 0 i contexts length i context List add contexts i  IContextComputer addContexts HelpEvent isTrue IContextComputer contextList IContextComputer IContextComputer getLocalContexts contextList
Add the contexts for the given control to the context list param event the control from which to obtain the contexts param event the help event private void add Contexts For Control Control control Help Event event See if there is are help contexts on the control Object object Workbench Help get Help control if object null object this We need to check for this in order to avoid recursion return add Contexts object event  addContextsForControl HelpEvent WorkbenchHelp getHelp addContexts
public Object compute Contexts Help Event event context List new Array List Add the local context context List add context Add the contexts for the page add Contexts For Control page get Control event Add the contexts for the container shell add Contexts For Control page get Control get Shell event Return the contexts return context List to Array  computeContexts HelpEvent contextList ArrayList contextList addContextsForControl getControl addContextsForControl getControl getShell contextList toArray
Method declared on I Context Computer public Object get Local Contexts Help Event event return new Object context  IContextComputer getLocalContexts HelpEvent

public interface I Context Computer Computes contexts for the help system param event the help event which triggered this request for help return a mixed type array of context ids type code String code and or help contexts type code I Context code see org eclipse help I Context  IContextComputer IContext IContext
public Object compute Contexts Help Event event Returns the local contexts for this context computer p Typically this method is called by other instances of code I Context Computer code in their code compute Contexts code method p p The important concept here is that the value returned by code compute Contexts code represents the complete help contexts and is passed directly to the help support system p p However the value returned by this method represents the only the contexts for the particular control with which this code I Context Computer code is associated p param event the help event which triggered this request for help return a mixed type array of context ids type code String code and or help contexts type code I Context code see org eclipse help I Context  computeContexts HelpEvent IContextComputer computeContexts computeContexts IContextComputer IContext IContext

private Object context Creates a new context computer for the given view and help context param view Part the view param help Context a single help context id type code String code or help context object type code I Context code public View Context Computer I View Part view Part Object help Context Assert is True help Context instanceof String help Context instanceof I Context view view Part context help Context  viewPart helpContext IContext ViewContextComputer IViewPart viewPart helpContext isTrue helpContext helpContext IContext viewPart helpContext
Add the contexts to the context list param object the contexts code Object code or code I Context Computer code param event the help event private void add Contexts Object object Help Event event Assert is True object instanceof Object object instanceof I Context Computer object instanceof String if object instanceof String context List add object return Object contexts if object instanceof I Context Computer get local contexts contexts I Context Computer object get Local Contexts event else contexts Object object copy the contexts into our list for int i 0 i contexts length i context List add contexts i  IContextComputer addContexts HelpEvent isTrue IContextComputer contextList IContextComputer IContextComputer getLocalContexts contextList
Add the contexts for the given control to the context list param event the control from which to obtain the contexts param event the help event private void add Contexts For Control Control control Help Event event See if there is are help contexts on the control Object object Workbench Help get Help control if object null object this We need to check for this in order to avoid recursion return add Contexts object event  addContextsForControl HelpEvent WorkbenchHelp getHelp addContexts
public Object compute Contexts Help Event event context List new Array List Add the local context context List add context Add the contexts for the window shell add Contexts For Control view get Site get Shell event Return the contexts return context List to Array  computeContexts HelpEvent contextList ArrayList contextList addContextsForControl getSite getShell contextList toArray
Method declared on I Context Computer public Object get Local Contexts Help Event event return new Object context  IContextComputer getLocalContexts HelpEvent

deprecated public void display Help real method forward to help UI if available Abstract HelpUI helpUI get HelpUI if helpUI null helpUI display Help  displayHelp AbstractHelpUI getHelpUI displayHelp
deprecated public void display Context I Context context int x int y real method forward to help UI if available Abstract HelpUI helpUI get HelpUI if helpUI null helpUI display Context context x y  displayContext IContext AbstractHelpUI getHelpUI displayContext
deprecated public void display Context String context Id int x int y convenience method funnel through the real method I Context context Help System get Context context Id if context null display Context context x y  displayContext contextId IContext HelpSystem getContext contextId displayContext
deprecated public void display Help Resource String href real method forward to help UI if available Abstract HelpUI helpUI get HelpUI if helpUI null helpUI display Help Resource href  displayHelpResource AbstractHelpUI getHelpUI displayHelpResource
deprecated public void display Help Resource I Help Resource help Resource convenience method funnel through the real method display Help Resource help Resource get Href  displayHelpResource IHelpResource helpResource displayHelpResource helpResource getHref
deprecated public void display Help String toc deprecated method funnel through the real method display Help Resource toc  displayHelp displayHelpResource
deprecated public void display Help String toc String selected Topic deprecated method funnel through the real method display Help Resource selected Topic  displayHelp selectedTopic displayHelpResource selectedTopic
deprecated public void display Help String context Id int x int y deprecated method funnel through the real method display Context context Id x y  displayHelp contextId displayContext contextId
deprecated public void display Help I Context context int x int y deprecated method funnel through the real method display Context context x y  displayHelp IContext displayContext
deprecated public I Context get Context String context Id non UI method forward to Help System return Help System get Context context Id  IContext getContext contextId HelpSystem HelpSystem getContext contextId
deprecated public I Toc get Tocs non UI method forward to Help System return Help System get Tocs  IToc getTocs HelpSystem HelpSystem getTocs
deprecated public boolean is Context Help Displayed real method forward to pluggedhelp UI return Workbench Help is Context Help Displayed  isContextHelpDisplayed WorkbenchHelp isContextHelpDisplayed
This class is not intented to be instantiated private Workbench Help  WorkbenchHelp
Displays the entire help bookshelf p Ignored if no help UI is available p since 3 0 public static void display Help Abstract HelpUI helpUI get HelpUI if helpUI null helpUI display Help  displayHelp AbstractHelpUI getHelpUI displayHelp
Displays context sensitive help for the given context p x y coordinates specify the location where the context sensitive help UI will be presented These coordinates are screen relative ie 0 0 is the top left most screen corner The platform is responsible for calling this method and supplying the appropriate location p p Ignored if no help UI is available p param context the context to display param x horizontal position param y verifical position since 3 0 public static void display Context I Context context int x int y if context null throw new Illegal Argument Exception Abstract HelpUI helpUI get HelpUI if helpUI null helpUI display Context context x y  displayContext IContext IllegalArgumentException AbstractHelpUI getHelpUI displayContext
Displays help content for the help resource with the given URL p This method is called by the platform to launch the help system UI displaying the documentation identified by the code href code parameter p p The help system makes no guarantee that all the help resources can be displayed or how they are displayed p p Ignored if no help UI is available p param href the URL of the help resource p Valid href are as described in link org eclipse help I Help Resource get Href I Help Resource get Href p since 3 0 public static void display Help Resource String href if href null throw new Illegal Argument Exception Abstract HelpUI helpUI get HelpUI if helpUI null helpUI display Help Resource href  IHelpResource getHref IHelpResource getHref displayHelpResource IllegalArgumentException AbstractHelpUI getHelpUI displayHelpResource
Determines the location for the help popup shell given the widget which orginated the request for help param display the display where the help will appear private static Point compute Pop Up Location Display display Point point display get Cursor Location return new Point point x 15 point y  computePopUpLocation getCursorLocation
return new Help Listener public void help Requested Help Event event if get HelpUI null I Context context Help System get Context context Id if context null Point point compute Pop Up Location event widget get Display display Context context point x point y  HelpListener helpRequested HelpEvent getHelpUI IContext HelpSystem getContext contextId computePopUpLocation getDisplay displayContext
Creates a new help listener for the given command This retrieves the help context ID from the command and creates an appropriate listener based on this param command The command for which the listener should be created must not be code null code return A help listener never code null code public static Help Listener create Help Listener I Command command TODO Need a help ID from the context final String context Id command get Help Id final String context Id NON NLS 1 return new Help Listener public void help Requested Help Event event if get HelpUI null I Context context Help System get Context context Id if context null Point point compute Pop Up Location event widget get Display display Context context point x point y  HelpListener createHelpListener ICommand contextId getHelpId contextId HelpListener helpRequested HelpEvent getHelpUI IContext HelpSystem getContext contextId computePopUpLocation getDisplay displayContext
Calls the help support system to display the given help context id p May only be called from a UI thread p param context Id the id of the context to display since 2 0 public static void display Help String context Id I Context context Help System get Context context Id if context null Point point compute Pop Up Location Display get Current display Context context point x point y  contextId displayHelp contextId IContext HelpSystem getContext contextId computePopUpLocation getCurrent displayContext
Displays context sensitive help for the given context p May only be called from a UI thread p param context the context to display since 2 0 public static void display Help I Context context Point point compute Pop Up Location Display get Current Abstract HelpUI helpUI get HelpUI if helpUI null helpUI display Context context point x point y  displayHelp IContext computePopUpLocation getCurrent AbstractHelpUI getHelpUI displayContext
Returns the help contexts on the given control p Instances of code I Context Computer code may use this method to obtain the previously registered help contexts of a control p param control the control on which the contexts are registered return contexts the contexts to use when F1 help is invoked a mixed type array of context ids type code String code and or help contexts type code I Context code or an code I Context Computer code or code null code if no contexts have been set deprecated as context computers are no longer supported public static Object get Help Control control return control get Data HELP KEY  IContextComputer IContext IContextComputer getHelp getData HELP_KEY
Returns the help contexts on the given menu p Instances of code I Context Computer code may use this method to obtain the previously registered help contexts of a menu p param menu the menu on which the contexts are registered return contexts the contexts to use when F1 help is invoked a mixed type array of context ids type code String code and or help contexts type code I Context code or an code I Context Computer code or code null code if no contexts have been set deprecated as context computers are no longer supported public static Object get Help Menu menu return menu get Data HELP KEY  IContextComputer IContext IContextComputer getHelp getData HELP_KEY
Returns the help contexts on the given menu item p Instances of code I Context Computer code may use this method to obtain the previously registered help contexts of a menu p param menu Item the menu item on which the contexts are registered return contexts the contexts to use when F1 help is invoked a mixed type array of context ids type code String code and or help contexts type code I Context code or an code I Context Computer code or code null code if no contexts have been set deprecated as context computers are no longer supported public static Object get Help Menu Item menu Item return menu Item get Data HELP KEY  IContextComputer menuItem IContext IContextComputer getHelp MenuItem menuItem menuItem getData HELP_KEY
Returns the help listener which activates the help support system return the help listener private static Help Listener get Help Listener if help Listener null initialize Help Listener return help Listener  HelpListener getHelpListener helpListener initializeHelpListener helpListener
help Listener new Help Listener public void help Requested Help Event event if get HelpUI null return get the help context from the widget Object object event widget get Data HELP KEY Since 2 0 we can expect that object is a String however for backward compatability we handle context computers and arrays I Context context null if object instanceof String context id this is the norm context Help System get Context String object else if object instanceof I Context already resolved context pre 2 0 context I Context object else if object instanceof I Context Computer a computed context pre 2 0 compute it now Object help Contexts I Context Computer object compute Contexts event extract the first entry if help Contexts null help Contexts length 0 Object primary Entry help Contexts 0 if primary Entry instanceof String context Help System get Context String primary Entry else if primary Entry instanceof I Context context I Context primary Entry else if object instanceof Object mixed array of String or I Context pre 2 0 extract the first entry Object help Contexts Object object extract the first entry if help Contexts length 0 Object primary Entry help Contexts 0 if primary Entry instanceof String context Help System get Context String primary Entry else if primary Entry instanceof I Context context I Context primary Entry if context null determine a location in the upper right corner of the widget Point point compute Pop Up Location event widget get Display display the help display Context context point x point y  helpListener HelpListener helpRequested HelpEvent getHelpUI getData HELP_KEY IContext HelpSystem getContext IContext IContext IContextComputer helpContexts IContextComputer computeContexts helpContexts helpContexts primaryEntry helpContexts primaryEntry HelpSystem getContext primaryEntry primaryEntry IContext IContext primaryEntry IContext helpContexts helpContexts primaryEntry helpContexts primaryEntry HelpSystem getContext primaryEntry primaryEntry IContext IContext primaryEntry computePopUpLocation getDisplay displayContext
Initializes the help listener private static void initialize Help Listener help Listener new Help Listener public void help Requested Help Event event if get HelpUI null return get the help context from the widget Object object event widget get Data HELP KEY Since 2 0 we can expect that object is a String however for backward compatability we handle context computers and arrays I Context context null if object instanceof String context id this is the norm context Help System get Context String object else if object instanceof I Context already resolved context pre 2 0 context I Context object else if object instanceof I Context Computer a computed context pre 2 0 compute it now Object help Contexts I Context Computer object compute Contexts event extract the first entry if help Contexts null help Contexts length 0 Object primary Entry help Contexts 0 if primary Entry instanceof String context Help System get Context String primary Entry else if primary Entry instanceof I Context context I Context primary Entry else if object instanceof Object mixed array of String or I Context pre 2 0 extract the first entry Object help Contexts Object object extract the first entry if help Contexts length 0 Object primary Entry help Contexts 0 if primary Entry instanceof String context Help System get Context String primary Entry else if primary Entry instanceof I Context context I Context primary Entry if context null determine a location in the upper right corner of the widget Point point compute Pop Up Location event widget get Display display the help display Context context point x point y  initializeHelpListener helpListener HelpListener helpRequested HelpEvent getHelpUI getData HELP_KEY IContext HelpSystem getContext IContext IContext IContextComputer helpContexts IContextComputer computeContexts helpContexts helpContexts primaryEntry helpContexts primaryEntry HelpSystem getContext primaryEntry primaryEntry IContext IContext primaryEntry IContext helpContexts helpContexts primaryEntry helpContexts primaryEntry HelpSystem getContext primaryEntry primaryEntry IContext IContext primaryEntry computePopUpLocation getDisplay displayContext
Returns the help support system for the platform if available return the help support system or code null code if none deprecated Use the static methods on this class and on link org eclipse help Help System Help System instead of the I Help methods on the object returned by this method public static I Help get Help Support Abstract HelpUI helpUI get HelpUI if helpUI null help Compatibility Wrapper null create instance only once and only if needed help Compatibility Wrapper new CompatibilityI Help Implementation return help Compatibility Wrapper  HelpSystem HelpSystem IHelp IHelp getHelpSupport AbstractHelpUI getHelpUI helpCompatibilityWrapper helpCompatibilityWrapper CompatibilityIHelpImplementation helpCompatibilityWrapper
Returns the help UI for the platform if available This method will initialize the help UI if necessary return the help UI or code null code if none private static Abstract HelpUI get HelpUI if is Initialized initialize Pluggable HelpUI is Initialized true return pluggable HelpUI  AbstractHelpUI getHelpUI isInitialized initializePluggableHelpUI isInitialized pluggableHelpUI
Busy Indicator show While Display get Current new Runnable public void run get the help UI extension from the registry I Extension Point point Platform get Extension Registry get Extension Point HELP SYSTEM EXTENSION ID if point null our extension point is missing act like there was no help UI return I Extension extensions point get Extensions if extensions length 0 no help UI present return There should only be one extension config element so we just take the first I Configuration Element elements extensions 0 get Configuration Elements if elements length 0 help UI present but mangled act like there was no help UI return Instantiate the help UI try pluggable HelpUI Abstract HelpUI Workbench Plugin create Extension elements 0 HELP SYSTEM CLASS ATTRIBUTE catch Core Exception e Workbench Plugin log Unable to instantiate help UI e get Status NON NLS 1  BusyIndicator showWhile getCurrent IExtensionPoint getExtensionRegistry getExtensionPoint HELP_SYSTEM_EXTENSION_ID IExtension getExtensions IConfigurationElement getConfigurationElements pluggableHelpUI AbstractHelpUI WorkbenchPlugin createExtension HELP_SYSTEM_CLASS_ATTRIBUTE CoreException WorkbenchPlugin getStatus
Initializes the pluggable help UI by getting an instance via the extension point private static void initialize Pluggable HelpUI Busy Indicator show While Display get Current new Runnable public void run get the help UI extension from the registry I Extension Point point Platform get Extension Registry get Extension Point HELP SYSTEM EXTENSION ID if point null our extension point is missing act like there was no help UI return I Extension extensions point get Extensions if extensions length 0 no help UI present return There should only be one extension config element so we just take the first I Configuration Element elements extensions 0 get Configuration Elements if elements length 0 help UI present but mangled act like there was no help UI return Instantiate the help UI try pluggable HelpUI Abstract HelpUI Workbench Plugin create Extension elements 0 HELP SYSTEM CLASS ATTRIBUTE catch Core Exception e Workbench Plugin log Unable to instantiate help UI e get Status NON NLS 1  initializePluggableHelpUI BusyIndicator showWhile getCurrent IExtensionPoint getExtensionRegistry getExtensionPoint HELP_SYSTEM_EXTENSION_ID IExtension getExtensions IConfigurationElement getConfigurationElements pluggableHelpUI AbstractHelpUI WorkbenchPlugin createExtension HELP_SYSTEM_CLASS_ATTRIBUTE CoreException WorkbenchPlugin getStatus
Returns whether the context sensitive help window is currently being displayed Returns code false code if the help UI has not been activated yet return code true code if the context sensitive help window is currently being displayed code false code otherwise public static boolean is Context Help Displayed if is Initialized return false Abstract HelpUI helpUI get HelpUI return helpUI null helpUI is Context Help Displayed  isContextHelpDisplayed isInitialized AbstractHelpUI getHelpUI isContextHelpDisplayed
action set Help Listener new Help Listener public void help Requested Help Event event if contexts null contexts length 0 get HelpUI null determine the context I Context context null if contexts 0 instanceof String context Help System get Context String contexts 0 else if contexts 0 instanceof I Context context I Context contexts 0 if context null Point point compute Pop Up Location event widget get Display display Context context point x point y  setHelpListener HelpListener helpRequested HelpEvent getHelpUI IContext HelpSystem getContext IContext IContext computePopUpLocation getDisplay displayContext
Sets the given help contexts on the given action p Use this method when the list of help contexts is known in advance Help contexts can either supplied as a static list or calculated with a context computer but not both p param action the action on which to register the computer param contexts the contexts to use when F1 help is invoked a mixed type array of context ids type code String code and or help contexts type code I Context code deprecated use set Help with a single context id parameter public static void set Help I Action action final Object contexts for int i 0 i contexts length i Assert is True contexts i instanceof String contexts i instanceof I Context action set Help Listener new Help Listener public void help Requested Help Event event if contexts null contexts length 0 get HelpUI null determine the context I Context context null if contexts 0 instanceof String context Help System get Context String contexts 0 else if contexts 0 instanceof I Context context I Context contexts 0 if context null Point point compute Pop Up Location event widget get Display display Context context point x point y  IContext setHelp setHelp IAction isTrue IContext setHelpListener HelpListener helpRequested HelpEvent getHelpUI IContext HelpSystem getContext IContext IContext computePopUpLocation getDisplay displayContext
action set Help Listener new Help Listener public void help Requested Help Event event Object help Contexts computer compute Contexts event if help Contexts null help Contexts length 0 get HelpUI null determine the context I Context context null if help Contexts 0 instanceof String context Help System get Context String help Contexts 0 else if help Contexts 0 instanceof I Context context I Context help Contexts 0 if context null Point point compute Pop Up Location event widget get Display display Context context point x point y  setHelpListener HelpListener helpRequested HelpEvent helpContexts computeContexts helpContexts helpContexts getHelpUI IContext helpContexts HelpSystem getContext helpContexts helpContexts IContext IContext helpContexts computePopUpLocation getDisplay displayContext
Sets the given help context computer on the given action p Use this method when the help contexts cannot be computed in advance Help contexts can either supplied as a static list or calculated with a context computer but not both p param action the action on which to register the computer param computer the computer to determine the help contexts for the control when F1 help is invoked deprecated context computers are no longer supported clients should implement their own help listener public static void set Help I Action action final I Context Computer computer action set Help Listener new Help Listener public void help Requested Help Event event Object help Contexts computer compute Contexts event if help Contexts null help Contexts length 0 get HelpUI null determine the context I Context context null if help Contexts 0 instanceof String context Help System get Context String help Contexts 0 else if help Contexts 0 instanceof I Context context I Context help Contexts 0 if context null Point point compute Pop Up Location event widget get Display display Context context point x point y  setHelp IAction IContextComputer setHelpListener HelpListener helpRequested HelpEvent helpContexts computeContexts helpContexts helpContexts getHelpUI IContext helpContexts HelpSystem getContext helpContexts helpContexts IContext IContext helpContexts computePopUpLocation getDisplay displayContext
Sets the given help contexts on the given control p Use this method when the list of help contexts is known in advance Help contexts can either supplied as a static list or calculated with a context computer but not both p param control the control on which to register the contexts param contexts the contexts to use when F1 help is invoked a mixed type array of context ids type code String code and or help contexts type code I Context code deprecated use set Help with single context id parameter public static void set Help Control control Object contexts for int i 0 i contexts length i Assert is True contexts i instanceof String contexts i instanceof I Context control set Data HELP KEY contexts ensure that the listener is only registered once control remove Help Listener get Help Listener control add Help Listener get Help Listener  IContext setHelp setHelp isTrue IContext setData HELP_KEY removeHelpListener getHelpListener addHelpListener getHelpListener
Sets the given help context computer on the given control p Use this method when the help contexts cannot be computed in advance Help contexts can either supplied as a static list or calculated with a context computer but not both p param control the control on which to register the computer param computer the computer to determine the help contexts for the control when F1 help is invoked deprecated context computers are no longer supported clients should implement their own help listener public static void set Help Control control I Context Computer computer control set Data HELP KEY computer ensure that the listener is only registered once control remove Help Listener get Help Listener control add Help Listener get Help Listener  setHelp IContextComputer setData HELP_KEY removeHelpListener getHelpListener addHelpListener getHelpListener
Sets the given help contexts on the given menu p Use this method when the list of help contexts is known in advance Help contexts can either supplied as a static list or calculated with a context computer but not both p param menu the menu on which to register the context param contexts the contexts to use when F1 help is invoked a mixed type array of context ids type code String code and or help contexts type code I Context code deprecated use set Help with single context id parameter public static void set Help Menu menu Object contexts for int i 0 i contexts length i Assert is True contexts i instanceof String contexts i instanceof I Context menu set Data HELP KEY contexts ensure that the listener is only registered once menu remove Help Listener get Help Listener menu add Help Listener get Help Listener  IContext setHelp setHelp isTrue IContext setData HELP_KEY removeHelpListener getHelpListener addHelpListener getHelpListener
Sets the given help context computer on the given menu p Use this method when the help contexts cannot be computed in advance Help contexts can either supplied as a static list or calculated with a context computer but not both p param menu the menu on which to register the computer param computer the computer to determine the help contexts for the control when F1 help is invoked deprecated context computers are no longer supported clients should implement their own help listener public static void set Help Menu menu I Context Computer computer menu set Data HELP KEY computer ensure that the listener is only registered once menu remove Help Listener get Help Listener menu add Help Listener get Help Listener  setHelp IContextComputer setData HELP_KEY removeHelpListener getHelpListener addHelpListener getHelpListener
Sets the given help contexts on the given menu item p Use this method when the list of help contexts is known in advance Help contexts can either supplied as a static list or calculated with a context computer but not both p param item the menu item on which to register the context param contexts the contexts to use when F1 help is invoked a mixed type array of context ids type code String code and or help contexts type code I Context code deprecated use set Help with single context id parameter public static void set Help Menu Item item Object contexts for int i 0 i contexts length i Assert is True contexts i instanceof String contexts i instanceof I Context item set Data HELP KEY contexts ensure that the listener is only registered once item remove Help Listener get Help Listener item add Help Listener get Help Listener  IContext setHelp setHelp MenuItem isTrue IContext setData HELP_KEY removeHelpListener getHelpListener addHelpListener getHelpListener
Sets the given help context computer on the given menu item p Use this method when the help contexts cannot be computed in advance Help contexts can either supplied as a static list or calculated with a context computer but not both p param item the menu item on which to register the computer param computer the computer to determine the help contexts for the control when F1 help is invoked deprecated context computers are no longer supported clients should implement their own help listener public static void set Help Menu Item item I Context Computer computer item set Data HELP KEY computer ensure that the listener is only registered once item remove Help Listener get Help Listener item add Help Listener get Help Listener  setHelp MenuItem IContextComputer setData HELP_KEY removeHelpListener getHelpListener addHelpListener getHelpListener
action set Help Listener new Help Listener public void help Requested Help Event event if get HelpUI null I Context context Help System get Context context Id if context null Point point compute Pop Up Location event widget get Display display Context context point x point y  setHelpListener HelpListener helpRequested HelpEvent getHelpUI IContext HelpSystem getContext contextId computePopUpLocation getDisplay displayContext
Sets the given help context id on the given action param action the action on which to register the context id param context Id the context id to use when F1 help is invoked since 2 0 public static void set Help I Action action final String context Id action set Help Listener new Help Listener public void help Requested Help Event event if get HelpUI null I Context context Help System get Context context Id if context null Point point compute Pop Up Location event widget get Display display Context context point x point y  contextId setHelp IAction contextId setHelpListener HelpListener helpRequested HelpEvent getHelpUI IContext HelpSystem getContext contextId computePopUpLocation getDisplay displayContext
Sets the given help context id on the given control param control the control on which to register the context id param context Id the context id to use when F1 help is invoked since 2 0 public static void set Help Control control String context Id control set Data HELP KEY context Id ensure that the listener is only registered once control remove Help Listener get Help Listener control add Help Listener get Help Listener  contextId setHelp contextId setData HELP_KEY contextId removeHelpListener getHelpListener addHelpListener getHelpListener
Sets the given help context id on the given menu param menu the menu on which to register the context id param context Id the context id to use when F1 help is invoked since 2 0 public static void set Help Menu menu String context Id menu set Data HELP KEY context Id ensure that the listener is only registered once menu remove Help Listener get Help Listener menu add Help Listener get Help Listener  contextId setHelp contextId setData HELP_KEY contextId removeHelpListener getHelpListener addHelpListener getHelpListener
Sets the given help context id on the given menu item param item the menu item on which to register the context id param context Id the context id to use when F1 help is invoked since 2 0 public static void set Help Menu Item item String context Id item set Data HELP KEY context Id ensure that the listener is only registered once item remove Help Listener get Help Listener item add Help Listener get Help Listener  contextId setHelp MenuItem contextId setData HELP_KEY contextId removeHelpListener getHelpListener addHelpListener getHelpListener

public interface I Action Bars Clears the global action handler list p Note Clients who manipulate the global action list are responsible for calling code update Action Bars code so that the changes can be propagated throughout the workbench p  IActionBars updateActionBars
public void clear Global Action Handlers Returns the global action handler for the action with the given id param action Id an action id declared in the registry return an action handler which implements the action id or code null code if none is registered see I Workbench Action Constants see set Global Action Handler String I Action  clearGlobalActionHandlers actionId IWorkbenchActionConstants setGlobalActionHandler IAction
public I Action get Global Action Handler String action Id Returns the menu manager p Note Clients who add or remove items from the returned menu manager are responsible for calling code update Action Bars code so that the changes can be propagated throughout the workbench p return the menu manager  IAction getGlobalActionHandler actionId updateActionBars
public I Menu Manager get Menu Manager Returns the status line manager p Note Clients who add or remove items from the returned status line manager are responsible for calling code update Action Bars code so that the changes can be propagated throughout the workbench p return the status line manager  IMenuManager getMenuManager updateActionBars
public I Status Line Manager get Status Line Manager Returns the tool bar manager p Note Clients who add or remove items from the returned tool bar manager are responsible for calling code update Action Bars code so that the changes can be propagated throughout the workbench p return the tool bar manager  IStatusLineManager getStatusLineManager updateActionBars
public I Tool Bar Manager get Tool Bar Manager Sets the global action handler for the action with the given id p Note Clients who manipulate the global action list are responsible for calling code update Action Bars code so that the changes can be propagated throughout the workbench p param action Id an action id declared in the registry param handler an action which implements the action id or code null code to clear any existing handler see I Workbench Action Constants  IToolBarManager getToolBarManager updateActionBars actionId IWorkbenchActionConstants
public void set Global Action Handler String action Id I Action handler Updates the action bars p Clients who add or remove items from the menu tool bar or status line managers should call this method to propagated the changes throughout the workbench p  setGlobalActionHandler actionId IAction

Returns the cool bar manager p Note Clients who add or remove items from the returned cool bar manager are responsible for calling code update Action Bars code so that the changes can be propagated throughout the workbench p return the cool bar manager  updateActionBars

public interface I Action Delegate Performs this action p This method is called by the proxy action when the action has been triggered Implement this method to do the actual work p p b Note b If the action delegate also implements code I Action Delegate2 code then this method is not invoked but instead the code run With Event I Action Event code method is called p param action the action proxy that handles the presentation portion of the action  IActionDelegate IActionDelegate2 runWithEvent IAction
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 p When the selection changes the action enablement state is updated based on the criteria specified in the plugin xml file Then the delegate is notified of the selection change regardless of whether the enablement criteria in the plugin xml file is met p param action the action proxy that handles presentation portion of the action param selection the current selection or code null code if there is no selection 

public interface I Action Delegate2 extends I Action Delegate Allows the action delegate to initialize itself after being created by the proxy action This lifecycle method is called after the action delegate has been created and before any other method of the action delegate is called param action the proxy action that handles the presentation portion of the action  IActionDelegate2 IActionDelegate
Allows the action delegate to clean up This lifecycle method is called when the proxy action is done with this action delegate This is the last method called 
Performs this action passing the SWT event which triggered it This method is called by the proxy action when the action has been triggered Implement this method to do the actual work p b Note b This method is called instead of code run I Action code p param action the action proxy that handles the presentation portion of the action param event the SWT event which triggered this action being run since 2 0  IAction

Performs this action passing the SWT event which triggered it p This method is called when the delegating action has been triggered Implement this method to do the actual work If an action delegate implements this interface this method is called instead of code run I Action code p NOTE This is experimental API which may change in the future param action the action proxy that handles the presentation portion of the action param event the SWT event which triggered this action being run since 2 0 deprecated Use org eclipse ui I Action Delegate2 instead  IAction IActionDelegate2

public interface I Action Filter Returns whether the specific attribute matches the state of the target object param target the target object param name the attribute name param value the attribute value return code true code if the attribute matches code false code otherwise  IActionFilter

Initializes this capability wizard using the passed workbench object selection and project p This method is called after the no argument constructor and before other methods are called p param workbench the current workbench param selection the current object selection param project the project to configure with a capability 

Initializes this capability wizard using the passed workbench object selection project and nature I Ds p This method is called after the no argument constructor and before other methods are called p p The list of nature I Ds contains the nature ID for this capability Also includes nature I Ds for capabilities that the user wants removed capabilites that this capability handles the UI for p param workbench the current workbench param selection the current object selection param project the project to configure with a capability param nature Ids the nature ids to be removed from the project  IDs IDs IDs natureIds

Returns whether the given element is considered contained in the specified containment context or if it is the context itself param containment Context object that provides containment context for the element This is typically a container object e g I Folder and may be the element object itself param element object that should be tested for containment param flags one or more of code CHECK CONTEXT code code CHECK IF CHILD code code CHECK IF ANCESTOR code code CHECK IF DESCENDENT code logically O Red together  containmentContext IFolder CHECK_CONTEXT CHECK_IF_CHILD CHECK_IF_ANCESTOR CHECK_IF_DESCENDENT ORed

Return the resource that the supplied adaptable adapts to An I Contributor Resource Adapter assumes that any object passed to it adapts to one equivalent resource param adaptable the adaptable being queried return a resource or code null code if there is no adapted resource for this type  IContributorResourceAdapter

Returns the label decorator which applies the decorations from all enabled decorators Views which allow decoration of their elements should use this label decorator return the label decorator see org eclipse jface viewers Decorating Label Provider  DecoratingLabelProvider
Return the I Base Label Provider that corresponds to the decorator Id This can handle both lightweight and full decorators param decorator Id the decorator id return the label provider  IBaseLabelProvider decoratorId decoratorId
Returns the full label decorator instance for the specified decorator id if it is enabled Otherwise returns code null code Returns code null code for lightweight decorators It is recommended that get Base Label Provider is used instead so that lightweight decorators are also checked param decorator Id the decorator id return the label decorator  getBaseLabelProvider decoratorId
Returns the lightweight label decorator instance for the specified decorator id if it is enabled Otherwise returns code null code Returns code null code for heavyweight decorators Use code get Label Decorator code instead for heavyweight decorators param decorator Id the decorator id return the lightweight label decorator deprecated use get Base Label Provider String instead  getLabelDecorator decoratorId getBaseLabelProvider
Returns whether the specified decorator is enabled param decorator Id the decorator id return code true code if the decorator is enabled or code false code if not  decoratorId
Sets whether the specified decorator is enabled param decorator Id the decorator id param enabled code true code to enable the decorator or code false code to disable it throws Core Exception if the decorator cannot be instantiated  decoratorId CoreException
Fire a Label Provider Changed Event for the decorator that corresponds to decoratorID if it exists and is enabled using the I Base Label Provider as the argument to the event Otherwise do nothing p This method must be called from the user interface thread as widget updates may result p param decorator Id the decorator id  LabelProviderChangedEvent IBaseLabelProvider decoratorId

Block instantiation private IDE do nothing 
Returns the marker help registry for the workbench return the marker help registry public static I Marker Help Registry get Marker Help Registry if marker Help Registry null marker Help Registry new Marker Help Registry new Marker Help Registry Reader add Help marker Help Registry return marker Help Registry  IMarkerHelpRegistry getMarkerHelpRegistry markerHelpRegistry markerHelpRegistry MarkerHelpRegistry MarkerHelpRegistryReader addHelp markerHelpRegistry markerHelpRegistry
Sets the cursor and selection state for the given editor to reveal the position of the given marker This is done on a best effort basis If the editor does not provide an code I Goto Marker code interface either directly or via code I Adaptable get Adapter code this has no effect param editor the editor param marker the marker public static void goto Marker I Editor Part editor I Marker marker I Goto Marker goto Marker null if editor instanceof I Goto Marker goto Marker I Goto Marker editor else goto Marker I Goto Marker editor get Adapter I Goto Marker class if goto Marker null goto Marker goto Marker marker  IGotoMarker IAdaptable getAdapter gotoMarker IEditorPart IMarker IGotoMarker gotoMarker IGotoMarker gotoMarker IGotoMarker gotoMarker IGotoMarker getAdapter IGotoMarker gotoMarker gotoMarker gotoMarker
Opens an editor on the given object p If the page already has an editor open on the target object then that editor is brought to front otherwise a new editor is opened p param page the page in which the editor will be opened param input the editor input param editor Id the id of the editor extension to use return an open editor or code null code if an external editor was opened exception Part Init Exception if the editor could not be initialized see org eclipse ui I Workbench Page open Editor I Editor Input String public static I Editor Part open Editor I Workbench Page page I Editor Input input String editor Id throws Part Init Exception sanity checks if page null throw new Illegal Argument Exception open the editor on the file return page open Editor input editor Id  editorId PartInitException IWorkbenchPage openEditor IEditorInput IEditorPart openEditor IWorkbenchPage IEditorInput editorId PartInitException IllegalArgumentException openEditor editorId
Opens an editor on the given object p If the page already has an editor open on the target object then that editor is brought to front otherwise a new editor is opened If code activate true code the editor will be activated p param page the page in which the editor will be opened param input the editor input param editor Id the id of the editor extension to use param activate if code true code the editor will be activated return an open editor or code null code if an external editor was opened exception Part Init Exception if the editor could not be initialized see org eclipse ui I Workbench Page open Editor I Editor Input String boolean public static I Editor Part open Editor I Workbench Page page I Editor Input input String editor Id boolean activate throws Part Init Exception sanity checks if page null throw new Illegal Argument Exception open the editor on the file return page open Editor input editor Id activate  editorId PartInitException IWorkbenchPage openEditor IEditorInput IEditorPart openEditor IWorkbenchPage IEditorInput editorId PartInitException IllegalArgumentException openEditor editorId
Opens an editor on the given file resource p If the page already has an editor open on the target object then that editor is brought to front otherwise a new editor is opened If code activate true code the editor will be activated p param page the page in which the editor will be opened param input the editor input param activate if code true code the editor will be activated return an open editor or code null code if an external editor was opened exception Part Init Exception if the editor could not be initialized see org eclipse ui I Workbench Page open Editor org eclipse ui I Editor Input String boolean public static I Editor Part open Editor I Workbench Page page I File input boolean activate throws Part Init Exception sanity checks if page null throw new Illegal Argument Exception open the editor on the file I Editor Descriptor editor Desc get Editor Descriptor input return page open Editor new File Editor Input input editor Desc get Id activate  PartInitException IWorkbenchPage openEditor IEditorInput IEditorPart openEditor IWorkbenchPage IFile PartInitException IllegalArgumentException IEditorDescriptor editorDesc getEditorDescriptor openEditor FileEditorInput editorDesc getId
Opens an editor on the given file resource p If the page already has an editor open on the target object then that editor is brought to front otherwise a new editor is opened p param page the page in which the editor will be opened param input the editor input return an open editor or code null code if an external editor was opened exception Part Init Exception if the editor could not be initialized see org eclipse ui I Workbench Page open Editor I Editor Input String public static I Editor Part open Editor I Workbench Page page I File input throws Part Init Exception sanity checks if page null throw new Illegal Argument Exception open the editor on the file I Editor Descriptor editor Desc get Editor Descriptor input return page open Editor new File Editor Input input editor Desc get Id  PartInitException IWorkbenchPage openEditor IEditorInput IEditorPart openEditor IWorkbenchPage IFile PartInitException IllegalArgumentException IEditorDescriptor editorDesc getEditorDescriptor openEditor FileEditorInput editorDesc getId
Opens an editor on the given file resource p If the page already has an editor open on the target object then that editor is brought to front otherwise a new editor is opened p param page the page in which the editor will be opened param input the editor input param editor Id the id of the editor extension to use return an open editor or code null code if an external editor was opened exception Part Init Exception if the editor could not be initialized see org eclipse ui I Workbench Page open Editor I Editor Input String public static I Editor Part open Editor I Workbench Page page I File input String editor Id throws Part Init Exception sanity checks if page null throw new Illegal Argument Exception open the editor on the file return page open Editor new File Editor Input input editor Id  editorId PartInitException IWorkbenchPage openEditor IEditorInput IEditorPart openEditor IWorkbenchPage IFile editorId PartInitException IllegalArgumentException openEditor FileEditorInput editorId
Opens an editor on the given file resource p If the page already has an editor open on the target object then that editor is brought to front otherwise a new editor is opened If code activate true code the editor will be activated p param page the page in which the editor will be opened param input the editor input param editor Id the id of the editor extension to use param activate if code true code the editor will be activated return an open editor or code null code if an external editor was opened exception Part Init Exception if the editor could not be initialized see org eclipse ui I Workbench Page open Editor I Editor Input String boolean public static I Editor Part open Editor I Workbench Page page I File input String editor Id boolean activate throws Part Init Exception sanity checks if page null throw new Illegal Argument Exception open the editor on the file return page open Editor new File Editor Input input editor Id activate  editorId PartInitException IWorkbenchPage openEditor IEditorInput IEditorPart openEditor IWorkbenchPage IFile editorId PartInitException IllegalArgumentException openEditor FileEditorInput editorId
Returns an editor descriptor appropriate for opening the given file resource p The editor descriptor is determined using a multistep process p ol li The file is consulted for a persistent property named code IDE EDITOR KEY code containing the preferred editor id to be used li li The workbench editor registry is consulted to determine if an editor extension has been registered for the file type If so an instance of the editor extension is opened on the file See code I Editor Registry get Default Editor String code li li The operating system is consulted to determine if an in place component editor is available e g OLE editor on Win32 platforms li li The operating system is consulted to determine if an external editor is available li ol p param file the file return an editor descriptor appropriate for opening the file throws Part Init Exception if no editor can be found public static I Editor Descriptor get Editor Descriptor I File file throws Part Init Exception if file null throw new Illegal Argument Exception I Editor Registry editor Reg PlatformUI get Workbench get Editor Registry check for a default editor I Editor Descriptor editor Desc get Default Editor file next check the OS for in place editor OLE on Win32 if editor Desc null editor Reg is System In Place Editor Available file get Name editor Desc editor Reg find Editor I Editor Registry SYSTEM INPLACE EDITOR ID next check with the OS for an external editor if editor Desc null editor Reg is System External Editor Available file get Name editor Desc editor Reg find Editor I Editor Registry SYSTEM EXTERNAL EDITOR ID next lookup the default text editor if editor Desc null editor Desc editor Reg find Editor IDE Workbench Plugin DEFAULT TEXT EDITOR ID if no valid editor found bail out if editor Desc null throw new Part Init Exception IDE Workbench Messages get String IDE no File Editor Found NON NLS 1 return editor Desc  EDITOR_KEY IEditorRegistry getDefaultEditor PartInitException IEditorDescriptor getEditorDescriptor IFile PartInitException IllegalArgumentException IEditorRegistry editorReg getWorkbench getEditorRegistry IEditorDescriptor editorDesc getDefaultEditor editorDesc editorReg isSystemInPlaceEditorAvailable getName editorDesc editorReg findEditor IEditorRegistry SYSTEM_INPLACE_EDITOR_ID editorDesc editorReg isSystemExternalEditorAvailable getName editorDesc editorReg findEditor IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID editorDesc editorDesc editorReg findEditor IDEWorkbenchPlugin DEFAULT_TEXT_EDITOR_ID editorDesc PartInitException IDEWorkbenchMessages getString noFileEditorFound editorDesc
Opens an editor on the file resource of the given marker p If this page already has an editor open on the marker resource file that editor is brought to front otherwise a new editor is opened The cursor and selection state of the editor are then updated from information recorded in the marker p p If the marker contains an code EDITOR ID ATTR code attribute the attribute value will be used to determine the editor type to be opened If not the registered editor for the marker resource file will be used p param page the workbench page to open the editor in param marker the marker to open return an open editor or code null code not possible exception Part Init Exception if the editor could not be initialized see open Editor org eclipse ui I Workbench Page org eclipse core resources I Marker boolean public static I Editor Part open Editor I Workbench Page page I Marker marker throws Part Init Exception return open Editor page marker true  EDITOR_ID_ATTR PartInitException openEditor IWorkbenchPage IMarker IEditorPart openEditor IWorkbenchPage IMarker PartInitException openEditor
Opens an editor on the file resource of the given marker p If this page already has an editor open on the marker resource file that editor is brought to front otherwise a new editor is opened If code activate true code the editor will be activated The cursor and selection state of the editor are then updated from information recorded in the marker p p If the marker contains an code EDITOR ID ATTR code attribute the attribute value will be used to determine the editor type to be opened If not the registered editor for the marker resource file will be used p param page the workbench page to open the editor in param marker the marker to open param activate if code true code the editor will be activated return an open editor or code null code not possible exception Part Init Exception if the editor could not be initialized public static I Editor Part open Editor I Workbench Page page I Marker marker boolean activate throws Part Init Exception sanity checks if page null marker null throw new Illegal Argument Exception get the marker resource file if marker get Resource instanceof I File IDE Workbench Plugin log Open editor on marker failed marker resource not an I File NON NLS 1 return null I File file I File marker get Resource get the preferred editor id from the marker I Editor Registry editor Reg PlatformUI get Workbench get Editor Registry I Editor Descriptor editor Desc null try String editorID String marker get Attribute EDITOR ID ATTR if editorID null editor Desc editor Reg find Editor editorID catch Core Exception e ignore this open the editor on the marker resource file I Editor Part editor null if editor Desc null editor open Editor page file activate else editor page open Editor new File Editor Input file editor Desc get Id activate get the editor to update its position based on the marker if editor null goto Marker editor marker return editor  EDITOR_ID_ATTR PartInitException IEditorPart openEditor IWorkbenchPage IMarker PartInitException IllegalArgumentException getResource IFile IDEWorkbenchPlugin IFile IFile IFile getResource IEditorRegistry editorReg getWorkbench getEditorRegistry IEditorDescriptor editorDesc getAttribute EDITOR_ID_ATTR editorDesc editorReg findEditor CoreException IEditorPart editorDesc openEditor openEditor FileEditorInput editorDesc getId gotoMarker
Platform run new Safe Runnable Workbench Messages get String Error Closing NON NLS 1 public void run Collect dirty Editors Array List dirty Editors new Array List I Workbench Window windows PlatformUI get Workbench get Workbench Windows for int i 0 i windows length i I Workbench Window window windows i I Workbench Page pages window get Pages for int j 0 j pages length j I Workbench Page page pages j I Editor Part dirty page get Dirty Editors for int k 0 k dirty length k I Editor Part part dirty k I File file I File part get Editor Input get Adapter I File class if file null for int l 0 l final Resources length l I Resource resource final Resources l if resource get Full Path is Prefix Of file get Full Path dirty Editors add part break if dirty Editors size 0 I Workbench Window w Workbench get Instance get Active Workbench Window if w null w windows 0 result 0 Editor Manager save All dirty Editors final Confirm w  SafeRunnable WorkbenchMessages getString ErrorClosing dirtyEditors ArrayList dirtyEditors ArrayList IWorkbenchWindow getWorkbench getWorkbenchWindows IWorkbenchWindow IWorkbenchPage getPages IWorkbenchPage IEditorPart getDirtyEditors IEditorPart IFile IFile getEditorInput getAdapter IFile finalResources IResource finalResources getFullPath isPrefixOf getFullPath dirtyEditors dirtyEditors IWorkbenchWindow getInstance getActiveWorkbenchWindow EditorManager saveAll dirtyEditors finalConfirm
Save all dirty editors in the workbench whose editor input is a child resource of one of the code I Resource code s provided Opens a dialog to prompt the user if code confirm code is true Return true if successful Return false if the user has cancelled the command since 3 0 param resource Roots the resource roots under which editor input should be saved other will be left dirty param confirm prompt the user if true return boolean false if the operation was cancelled public static boolean save All Editors I Resource resource Roots boolean confirm final I Resource final Resources resource Roots final boolean final Confirm confirm final boolean result new boolean 1 result 0 true if resource Roots length 0 return result 0 Platform run new Safe Runnable Workbench Messages get String Error Closing NON NLS 1 public void run Collect dirty Editors Array List dirty Editors new Array List I Workbench Window windows PlatformUI get Workbench get Workbench Windows for int i 0 i windows length i I Workbench Window window windows i I Workbench Page pages window get Pages for int j 0 j pages length j I Workbench Page page pages j I Editor Part dirty page get Dirty Editors for int k 0 k dirty length k I Editor Part part dirty k I File file I File part get Editor Input get Adapter I File class if file null for int l 0 l final Resources length l I Resource resource final Resources l if resource get Full Path is Prefix Of file get Full Path dirty Editors add part break if dirty Editors size 0 I Workbench Window w Workbench get Instance get Active Workbench Window if w null w windows 0 result 0 Editor Manager save All dirty Editors final Confirm w return result 0  IResource resourceRoots saveAllEditors IResource resourceRoots IResource finalResources resourceRoots finalConfirm resourceRoots SafeRunnable WorkbenchMessages getString ErrorClosing dirtyEditors ArrayList dirtyEditors ArrayList IWorkbenchWindow getWorkbench getWorkbenchWindows IWorkbenchWindow IWorkbenchPage getPages IWorkbenchPage IEditorPart getDirtyEditors IEditorPart IFile IFile getEditorInput getAdapter IFile finalResources IResource finalResources getFullPath isPrefixOf getFullPath dirtyEditors dirtyEditors IWorkbenchWindow getInstance getActiveWorkbenchWindow EditorManager saveAll dirtyEditors finalConfirm
Sets the default editor id for a given file This value will be used to determine the default editor descriptor for the file in future calls to code get Default Editor I File code param file the file param editorID the editor id public static void set Default Editor I File file String editorID try file set Persistent Property EDITOR KEY editorID catch Core Exception e do nothing  getDefaultEditor IFile setDefaultEditor IFile setPersistentProperty EDITOR_KEY CoreException
Returns the default editor for a given file p A default editor id may be registered for a specific file using code set Default Editor code If the given file has a registered default editor id the default editor will derived from it If not the default editor is determined by taking the file name for the file and obtaining the default editor for that name p param file the file return the descriptor of the default editor or code null code if not found public static I Editor Descriptor get Default Editor I File file Try file specific editor I Editor Registry editor Reg PlatformUI get Workbench get Editor Registry try String editorID file get Persistent Property EDITOR KEY if editorID null I Editor Descriptor desc editor Reg find Editor editorID if desc null return desc catch Core Exception e do nothing Try lookup with filename return editor Reg get Default Editor file get Name  setDefaultEditor IEditorDescriptor getDefaultEditor IFile IEditorRegistry editorReg getWorkbench getEditorRegistry getPersistentProperty EDITOR_KEY IEditorDescriptor editorReg findEditor CoreException editorReg getDefaultEditor getName
Extracts and returns the code I Resource code s in the given selection or the resource objects they adapts to param original Selection the original selection possibly empty return list of resources element type code I Resource code possibly empty public static List compute Selected Resources I Structured Selection original Selection List resources null for Iterator e original Selection iterator e has Next Object next e next Object resource null if next instanceof I Resource resource next else if next instanceof I Adaptable resource I Adaptable next get Adapter I Resource class if resource null if resources null lazy init to avoid creating empty lists assume selection contains mostly resources most times resources new Array List original Selection size resources add resource if resources null return empty Unmodifiable List else return resources  IResource originalSelection IResource computeSelectedResources IStructuredSelection originalSelection originalSelection hasNext IResource IAdaptable IAdaptable getAdapter IResource ArrayList originalSelection emptyUnmodifiableList

Prevents instantiation private IDE Action Factory do nothing  IDEActionFactory
non javadoc method declared on Action Factory 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 IDE Workbench Messages get String Workbench add Task NON NLS 1 NON NLS 2 action set Tool Tip Text IDE Workbench Messages get String Workbench add Task Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui edit add Task NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId IDEWorkbenchMessages getString addTask setToolTipText IDEWorkbenchMessages getString addTaskToolTip getPartService addPartListener setActionDefinitionId addTask
non javadoc method declared on Action Factory 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 IDE Workbench Messages get String Workbench add Bookmark NON NLS 1 NON NLS 2 action set Tool Tip Text IDE Workbench Messages get String Workbench add Bookmark Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui edit add Bookmark NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId IDEWorkbenchMessages getString addBookmark setToolTipText IDEWorkbenchMessages getString addBookmarkToolTip getPartService addPartListener setActionDefinitionId addBookmark
non javadoc method declared on Action Factory public I Workbench Action create I Workbench Window window if window null throw new Illegal Argument Exception return new Global Build Action window Incremental Project Builder INCREMENTAL BUILD  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException GlobalBuildAction IncrementalProjectBuilder INCREMENTAL_BUILD
non javadoc method declared on Action Factory public I Workbench Action create I Workbench Window window if window null throw new Illegal Argument Exception return new Build Clean Action window  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException BuildCleanAction
non javadoc method declared on Action Factory public I Workbench Action create I Workbench Window window if window null throw new Illegal Argument Exception return new Toggle Auto Build Action window  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException ToggleAutoBuildAction
non javadoc method declared on Action Factory 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 IDE Workbench Messages get String Workbench build Project NON NLS 1 action set Tool Tip Text IDE Workbench Messages get String Workbench build Project Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui project build Project NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId IDEWorkbenchMessages getString buildProject setToolTipText IDEWorkbenchMessages getString buildProjectToolTip getPartService addPartListener setActionDefinitionId buildProject
non javadoc method declared on Action Factory 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 IDE Workbench Messages get String Workbench close Project NON NLS 1 NON NLS 2 action set Tool Tip Text IDE Workbench Messages get String Workbench close Project Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui project close Project NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId IDEWorkbenchMessages getString closeProject setToolTipText IDEWorkbenchMessages getString closeProjectToolTip getPartService addPartListener setActionDefinitionId closeProject
non javadoc method declared on Action Factory public I Workbench Action create I Workbench Window window if window null throw new Illegal Argument Exception issue we are creating a NEW action just to pass to New Wizard Drop Down Action I Workbench Action inner Action Action Factory NEW create window I Workbench Action action new New Wizard Drop Down Action window inner Action action set Id get Id return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException NewWizardDropDownAction IWorkbenchAction innerAction ActionFactory IWorkbenchAction NewWizardDropDownAction innerAction setId getId
non javadoc method declared on Action Factory 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 IDE Workbench Messages get String Workbench open Project NON NLS 1 NON NLS 2 action set Tool Tip Text IDE Workbench Messages get String Workbench open Project Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui project open Project NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId IDEWorkbenchMessages getString openProject setToolTipText IDEWorkbenchMessages getString openProjectToolTip getPartService addPartListener setActionDefinitionId openProject
non javadoc method declared on Action Factory public I Workbench Action create I Workbench Window window if window null throw new Illegal Argument Exception I Workbench Action action new Open Workspace Action window action set Id get Id return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction OpenWorkspaceAction setId getId
non javadoc method declared on Action Factory public I Workbench Action create I Workbench Window window if window null throw new Illegal Argument Exception I Workbench Action action new Project Property Dialog Action window action set Id get Id return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction ProjectPropertyDialogAction setId getId
non javadoc method declared on Action Factory public I Workbench Action create I Workbench Window window if window null throw new Illegal Argument Exception I Workbench Action action new Quick Start Action window action set Id get Id return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction QuickStartAction setId getId
non javadoc method declared on Action Factory public I Workbench Action create I Workbench Window window if window null throw new Illegal Argument Exception I Workbench Action action new Global Build Action window Incremental Project Builder FULL BUILD action set Id get Id return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction GlobalBuildAction IncrementalProjectBuilder FULL_BUILD setId getId
non javadoc method declared on Action Factory 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 IDE Workbench Messages get String Workbench rebuild Project NON NLS 1 NON NLS 2 action set Tool Tip Text IDE Workbench Messages get String Workbench rebuild Project Tool Tip NON NLS 1 window get Part Service add Part Listener action action set Action Definition Id org eclipse ui project rebuild Project NON NLS 1 return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException RetargetAction RetargetAction getId IDEWorkbenchMessages getString rebuildProject setToolTipText IDEWorkbenchMessages getString rebuildProjectToolTip getPartService addPartListener setActionDefinitionId rebuildProject
non javadoc method declared on Action Factory public I Workbench Action create I Workbench Window window if window null throw new Illegal Argument Exception I Workbench Action action new Tips And Tricks Action window action set Id get Id return action  ActionFactory IWorkbenchAction IWorkbenchWindow IllegalArgumentException IWorkbenchAction TipsAndTricksAction setId getId

public interface I Goto Marker Sets the cursor and selection state for an editor to reveal the position of the given marker param marker the marker  IGotoMarker

public interface I Editor Action Bar Contributor Initializes this contributor which is expected to add contributions as required to the given action bars and global action handlers p The page is passed to support the use of code Retarget Action code by the contributor In this case the init method implementors should p p ul li 1 set retarget actions as global action handlers li li 2 add the retarget actions as part listeners li li 3 get the active part and if not code null code call part Activated on the retarget actions li ul p p And in the dispose method the retarget actions should be removed as part listeners p param bars the action bars param page the workbench page for this contributor since 2 0  IEditorActionBarContributor RetargetAction partActivated
public void init I Action Bars bars I Workbench Page page Sets the active editor for the contributor Implementors should disconnect from the old editor connect to the new editor and update the actions to reflect the new editor param target Editor the new editor target  IActionBars IWorkbenchPage targetEditor
public void set Active Editor I Editor Part target Editor Disposes this contributor since 2 0  setActiveEditor IEditorPart targetEditor

public interface I Editor Action Delegate extends I Action Delegate Sets the active editor for the delegate Implementors should disconnect from the old editor connect to the new editor and update the action to reflect the new editor param action the action proxy that handles presentation portion of the action param target Editor the new editor target  IEditorActionDelegate IActionDelegate targetEditor

public interface I Editor Descriptor extends I Workbench Part Descriptor Returns the editor id p For internal editors this is the extension id as defined in the workbench registry for external editors it is path and file name of the external program p return the id of the editor  IEditorDescriptor IWorkbenchPartDescriptor
Returns the descriptor of the image for this editor return the descriptor of the image to display next to this editor 
Returns the label to show for this editor return the editor label 
Returns whether this editor descriptor will open a regular editor part inside the editor area return code true code if editor is inside editor area and code false code otherwise since 3 0 
Returns whether this editor descriptor will open an external editor in place inside the editor area return code true code if editor is in place and code false code otherwise since 3 0 
Returns whether this editor descriptor will open an external editor in a new window outside the workbench return code true code if editor is external and code false code otherwise since 3 0 

public interface I Editor Input extends I Adaptable Returns whether the editor input exists p This method is primarily used to determine if an editor input should appear in the File Most Recently Used menu An editor input will appear in the list until the return value of code exists code becomes code false code or it drops off the bottom of the list return code true code if the editor input exists code false code otherwise  IEditorInput IAdaptable
public boolean exists Returns the image descriptor for this input return the image descriptor for this input 
public Image Descriptor get Image Descriptor Returns the name of this editor input for display purposes p For instance when the input is from a file the return value would ordinarily be just the file name return the name string  ImageDescriptor getImageDescriptor
public String get Name Returns an object that can be used to save the state of this editor input return the persistable element or code null code if this editor input cannot be persisted  getName
public I Persistable Element get Persistable Returns the tool tip text for this editor input This text is used to differentiate between two input with the same name For instance My Class java in folder X and My Class java in folder Y The format of the text varies between input types p return the tool tip text  IPersistableElement getPersistable MyClass MyClass

Launches this external editor to edit the file at the given location in the local file system param file the local file system path of the file to edit 

Returns the input for this editor If this value changes the part must fire a property listener event with code PROP INPUT code return the editor input  PROP_INPUT
Returns the site for this editor The method is equivalent to code I Editor Site get Site code return the editor site  IEditorSite getSite
Initializes this editor with the given editor site and input p This method is automatically called shortly after the part is instantiated It marks the start of the part s lifecycle The link I Workbench Part dispose I Workbench Part dispose method will be called automically at the end of the lifecycle Clients must not call this method p p Implementors of this method must examine the editor input object type to determine if it is understood If not the implementor must throw a code Part Init Exception code p param site the editor site param input the editor input exception Part Init Exception if this editor was not initialized successfully  IWorkbenchPart IWorkbenchPart PartInitException PartInitException

public interface I Editor Reference extends I Workbench Part Reference Returns the factory id of the factory used to restore this editor Returns null if the editor is not pesistable  IEditorReference IWorkbenchPartReference
public String get Factory Id Returns the editor input name May return null is the name is not available or if the editor failed to be restored  getFactoryId
public String get Name Returns the I Editor Part referenced by this object Returns null if the editors was not instanciated or it failed to be restored Tries to restore the editor if code restore code is true  getName IEditorPart
public I Editor Part get Editor boolean restore Returns true if the editor is dirty otherwise returns false public boolean is Dirty  IEditorPart getEditor isDirty
public boolean is Dirty Returns true if the editor is pinned otherwise returns false public boolean is Pinned  isDirty isPinned

Adds a listener for changes to properties of this registry Has no effect if an identical listener is already registered p The properties ids are as follows ul li code PROP CONTENTS code Triggered when the file editor mappings in the editor registry change li ul p param listener a property listener  PROP_CONTENTS
Finds and returns the descriptor of the editor with the given editor id param editor Id the editor id return the editor descriptor with the given id or code null code if not found  editorId
Returns the default editor The default editor always exist return the descriptor of the default editor deprecated The system external editor is the default editor Use code find Editor I Editor Registry SYSTEM EXTERNAL EDITOR ID code instead  findEditor IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID
Returns the default editor for a given file name p The default editor is determined by taking the file extension for the file and obtaining the default editor for that extension p param file Name the file name in the system return the descriptor of the default editor or code null code if not found  fileName
Returns the list of file editors registered to work against the file with the given file name p Note Use code get Default Editor String code if you only the need the default editor rather than all candidate editors p param file Name the file name in the system return a list of editor descriptors  getDefaultEditor fileName
Returns a list of mappings from file type to editor The resulting list is sorted in ascending order by file extension p Each mapping defines an extension and the set of editors that are available for that type The set of editors includes those registered via plug ins and those explicitly associated with a type by the user in the workbench preference pages p return a list of mappings sorted alphabetically by extension 
Returns the image descriptor associated with a given file This image is usually displayed next to the given file p The image is determined by taking the file extension of the file and obtaining the image for the default editor associated with that extension A default image is returned if no default editor is available p param filename the file name in the system return the descriptor of the image to display next to the file 
Removes the given property listener from this registry Has no affect if an identical listener is not registered param listener a property listener 
Sets the default editor id for the files that match that specified file name or extension The specified editor must be defined as an editor for that file name or extension param file Name Or Extension the file name or extension pattern e g xml param editor Id the editor id or code null code for no default  fileNameOrExtension editorId
Returns whether there is an in place editor that could handle a file with the given name param filename the file name return code true code if an in place editor is available and code false code otherwise since 3 0 
Returns whether the system has an editor that could handle a file with the given name param filename the file name return code true code if an external editor available and code false code otherwise since 3 0 
Returns the image descriptor associated with the system editor that would be used to edit this file externally param filename the file name return the descriptor of the external editor image or code null code if none since 3 0 

Returns the action bar contributor for this editor p An action contributor is responsable for the creation of actions By design this contributor is used for one or more editors of the same type Thus the contributor returned by this method is not owned completely by the editor it is shared p return the editor action bar contributor or code null code if none exists 
Returns the action bars for this part site Editors of the same type share the same action bars Contributions to the action bars are done by the code I Editor Action Bar Contributor code return the action bars since 2 1  IEditorActionBarContributor

public interface I Element Factory Re creates and returns an object from the state captured within the given memento p Under normal circumstances the resulting object can be expected to be persistable that is pre result get Adapter org eclipse ui I Persistable Element class pre should not return code null code p param memento a memento containing the state for the object return an object or code null code if the element could not be created  IElementFactory getAdapter IPersistableElement

public interface I File Editor Input extends I Storage Editor Input Returns the file resource underlying this editor input p The code I File code returned can be a handle to a resource that does not exist in the workspace As such an editor should provide appropriate feedback to the user instead of simply failing during input validation For example a text editor could open in read only mode with a message in the text area to inform the user that the file does not exist p return the underlying file  IFileEditorInput IStorageEditorInput IFile

public interface I File Editor Mapping Returns the default editor registered for this type mapping return the descriptor of the default editor or code null code if there is no default editor registered  IFileEditorMapping
public I Editor Descriptor get Default Editor Returns the list of editors registered for this type mapping return a possibly empty list of editors  IEditorDescriptor getDefaultEditor
public I Editor Descriptor get Editors Returns the list of editors formerly registered for this type mapping which have since been deleted return a possibly empty list of editors  IEditorDescriptor getEditors
public I Editor Descriptor get Deleted Editors Returns the file s extension for this type mapping return the extension for this mapping  IEditorDescriptor getDeletedEditors
public String get Extension Returns the descriptor of the image to use for a file of this type p The image is obtained from the default editor A default file image is returned if no default editor is available p return the descriptor of the image to use for a resource of this type  getExtension
public Image Descriptor get Image Descriptor Returns the label to use for this mapping Labels have the form it name it it extension it return the label to use for this mapping  ImageDescriptor getImageDescriptor
public String get Label Returns the file s name for this type mapping return the name for this mapping  getLabel

public interface I Folder Layout extends I Placeholder Folder Layout Adds a view with the given id to this folder The id must name a view contributed to the workbench s view extension point named code org eclipse ui views code param view Id the view id  IFolderLayout IPlaceholderFolderLayout viewId

public interface I In Place Editor extends I Editor Part Informs the in place editor that the system file it is editing was deleted by the application  IInPlaceEditor IEditorPart
Informs the in place editor that the system file it is editing was moved or renamed by the application param input the new in place editor input to use 

public interface I In Place Editor Input extends I Path Editor Input Sets the in place editor this input is associated with param editor the in place editor associated with this input or code null code to disassociate  IInPlaceEditorInput IPathEditorInput

Returns the active accelerator scope ids return the active accelerator scope ids 
Registers an action with the key binding service param action the action to be registered with the key binding service 
Sets the active accelerator scope ids param scopes the active accelerator scope ids 
Unregisters an action with the key binding service param action the action to be unregistered with the key binding service 

public interface I Marker Help Registry Returns a help context id for the given marker or code null code if no help has been registered for the marker param marker the marker for which to obtain help since 2 0  IMarkerHelpRegistry
public String get Help I Marker marker Returns code false code if there are no resolutions for the given marker Returns code true code if their may be resolutions In most cases a code true code value means there are resolutions but due to plugin loading issues get Resolutions may sometimes return an empty array after this method returns code true code param marker the marker for which to determine if there are resolutions since 2 0  getHelp IMarker getResolutions
public boolean has Resolutions I Marker marker Returns an array of resolutions for the given marker The returned array will be empty if there are no resolutions for the marker param marker the marker for which to obtain resolutions since 2 0  hasResolutions IMarker

public interface I Marker Resolution Returns a short label indicating what the resolution will do return a short label for this resolution  IMarkerResolution
Runs this resolution param marker the marker to resolve 

Returns optional additional information about the resolution The additional information will be presented to assist the user in deciding if the selected proposal is the desired choice return the additional information or code null code 
Returns the image to be displayed in the list of resolutions The image would typically be shown to the left of the display string return the image to be shown or code null code if no image is desired 

public interface I Marker Resolution Generator Returns resolutions for the given marker may be empty return resolutions for the given marker  IMarkerResolutionGenerator

Returns whether there are any resolutions for the given marker return code true code if there are resolutions for the given marker code false code if not 

public static final String TAG ID I Memento internal id NON NLS 1 Creates a new child of this memento with the given type p The code get Child code and code get Children code methods are used to retrieve children of a given type p param type the type return a new child memento see get Child see get Children  TAG_ID IMemento getChild getChildren getChild getChildren
public I Memento create Child String type Creates a new child of this memento with the given type and id The id is stored in the child memento using a special reserved key code TAG ID code and can be retrieved using code get Id code p The code get Child code and code get Children code methods are used to retrieve children of a given type p param type the type param id the child id return a new child memento with the given type and id see getID  IMemento createChild TAG_ID getId getChild getChildren
public I Memento create Child String type String id Returns the first child with the given type id param type the type id return the first child with the given type  IMemento createChild
public I Memento get Child String type Returns all children with the given type id param type the type id return the list of children with the given type  IMemento getChild
public I Memento get Children String type Returns the floating point value of the given key param key the key return the value or code null code if the key was not found or was found but was not a floating point number  IMemento getChildren
public Float get Float String key Returns the id for this memento return the memento id or code null code if none see create Child java lang String java lang String  getFloat createChild
public String getID Returns the integer value of the given key param key the key return the value or code null code if the key was not found or was found but was not an integer 
public Integer get Integer String key Returns the string value of the given key param key the key return the value or code null code if the key was not found  getInteger
public String get String String key Returns the data of the Text node of the memento Each memento is allowed only one Text node return the data of the Text node of the memento or code null code if the memento has no Text node since 2 0  getString
public String get Text Data Sets the value of the given key to the given floating point number param key the key param value the value  getTextData
public void put Float String key float value Sets the value of the given key to the given integer param key the key param value the value  putFloat
public void put Integer String key int value Copy the attributes and children from code memento code to the receiver param memento the I Memento to be copied  putInteger IMemento
public void put Memento I Memento memento Sets the value of the given key to the given string param key the key param value the value  putMemento IMemento
public void put String String key String value Sets the memento s Text node to contain the given data Creates the Text node if none exists If a Text node does exist it s current contents are replaced Each memento is allowed only one text node param data the data to be placed on the Text node since 2 0  putString

public interface I Navigation History Mark the current location into the history This message should be sent by clients whenever significant changes in location are detected The location is obtened by calling code I Navigation Location Provider create Navigation Location code  INavigationHistory INavigationLocationProvider createNavigationLocation
public void mark Location I Editor Part part Return the current location return I Navigation Location the current location  markLocation IEditorPart INavigationLocation
public I Navigation Location get Current Location Return all entries in the history return I Navigation Location  INavigationLocation getCurrentLocation INavigationLocation

public interface I Navigation Location Disposes of this location and frees any allocated resource public void dispose  INavigationLocation
Release any state kept by this location Any relevant state should be saved by the previous call of save State I Memento This object will not be used until restore State is called again  saveState IMemento restoreState
Persists the state of this location into the code memento code param memento the storage were the state should be saved into 
Restore the state of this location from the code memento code param memento the storage were the state was saved into 
public void restore State I Memento memento Restore the context saved by this location public void restore Location  restoreState IMemento restoreLocation
Merge the receiver into code current Location code Return true if the two locations could be merged otherwise return false p This message is sent to all locations before being added to the history given the change to the new location to merge itself into the current location minimizing the number of entries in the navigation history p param current Location where the receiver should be merged into return boolean true if the merge was possible  currentLocation currentLocation
Returns the input used for this location Returns code null code if the receiver s state has been released return the input for this location 
Returns the display name for this location This name is used in the navigation history list return the display name 
Sets the location s input p Should not be called by clients p param input the editor input 
The message code update code is sent to the active location before another location becomes active 

public interface I Navigation Location Provider Creates an empty navigation location The message code restore State code will be sent to the location to restore its state return I Navigation Location  INavigationLocationProvider restoreState INavigationLocation
public I Navigation Location create Empty Navigation Location Creates a navigation location describing the current state return I Navigation Location  INavigationLocation createEmptyNavigationLocation INavigationLocation

Marks the service associated with code nested Site code as active if one exists If there is no service associated then nothing changes Calling this method with code null code forces deactivation of the current service param nested Site The site whose service should be activated code null code if the current service should be deactivated return code true code if a service is activated or deactivated in the case of a code null code parameter code false code if nothing changed  nestedSite nestedSite
An accessor for the nested key binding service associated with a particular site If the key binding service does not exist for this code nested Site code already then a new one should be constructed param nested Site The site for which the service should be found should not be code null code return The associated service if any or a new associated service if none existed previously  nestedSite nestedSite
Removes a nested key binding service from this key binding service The service to remove is determined by the code nested Site code with which it is associated param nested Site The site from which to remove the nested service This site must not be code null code return code true code if the service existed and could be removed code false code otherwise  nestedSite nestedSite

Creates a new code About Action code with the given label public About Action I Workbench Window window if window null throw new Illegal Argument Exception this workbench Window window use message with no fill in 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 set Text Workbench Messages format About Action text new Object product Name NON NLS 1 set Tool Tip Text Workbench Messages format About Action tool Tip new Object product Name NON NLS 1 set Id about NON NLS 1 set Action Definition Id org eclipse ui help about Action NON NLS 1 Workbench Help set Help this I Help Context Ids ABOUT ACTION  AboutAction AboutAction IWorkbenchWindow IllegalArgumentException workbenchWindow IProduct getProduct productName productName getName productName productName setText WorkbenchMessages AboutAction productName setToolTipText WorkbenchMessages AboutAction toolTip productName setId setActionDefinitionId aboutAction WorkbenchHelp setHelp IHelpContextIds ABOUT_ACTION
public void run make sure action is not disposed if workbench Window null new About Dialog workbench Window get Shell open  workbenchWindow AboutDialog workbenchWindow getShell
non Javadoc Method declared on Action Factory I Workbench Action public void dispose workbench Window null  ActionFactory IWorkbenchAction workbenchWindow

public About Bundle Data Bundle bundle super get Resource String bundle Constants BUNDLE VENDOR get Resource String bundle Constants BUNDLE NAME get Resource String bundle Constants BUNDLE VERSION bundle get Symbolic Name  AboutBundleData getResourceString BUNDLE_VENDOR getResourceString BUNDLE_NAME getResourceString BUNDLE_VERSION getSymbolicName
A function to translate the resource tags that may be embedded in a string associated with some bundle param header Name the used to retrieve the correct string return the string or null if the string cannot be found private static String get Resource String Bundle bundle String header Name String value String bundle get Headers get header Name return value null null Platform get Resource String bundle value  headerName getResourceString headerName getHeaders headerName getResourceString

public About Bundle Group Data I Bundle Group bundle Group super bundle Group get Provider Name bundle Group get Name bundle Group get Version bundle Group get Identifier this bundle Group bundle Group  AboutBundleGroupData IBundleGroup bundleGroup bundleGroup getProviderName bundleGroup getName bundleGroup getVersion bundleGroup getIdentifier bundleGroup bundleGroup
public I Bundle Group get Bundle Group return bundle Group  IBundleGroup getBundleGroup bundleGroup
public URL get License Url if license Url null license Url getURL bundle Group get Property I Bundle Group Constants LICENSE HREF return license Url  getLicenseUrl licenseUrl licenseUrl bundleGroup getProperty IBundleGroupConstants LICENSE_HREF licenseUrl
public URL get Feature Image Url if feature Image Url null feature Image Url getURL bundle Group get Property I Bundle Group Constants FEATURE IMAGE return feature Image Url  getFeatureImageUrl featureImageUrl featureImageUrl bundleGroup getProperty IBundleGroupConstants FEATURE_IMAGE featureImageUrl
public Image Descriptor get Feature Image if feature Image null feature Image get Image get Feature Image Url return feature Image  ImageDescriptor getFeatureImage featureImage featureImage getImage getFeatureImageUrl featureImage
public Long get Feature Image Crc if feature Image Crc null return feature Image Crc URL url get Feature Image Url if url null return null Get the image bytes Input Stream in null try CRC32 checksum new CRC32 in new Checked Input Stream url open Stream checksum the contents don t matter the read just needs a place to go byte sink new byte 1024 while true if in read sink 0 break feature Image Crc new Long checksum get Value return feature Image Crc catch IO Exception e return null finally if in null try in close catch IO Exception e do nothing  getFeatureImageCrc featureImageCrc featureImageCrc getFeatureImageUrl InputStream CheckedInputStream openStream featureImageCrc getValue featureImageCrc IOException IOException
public String get About Text return bundle Group get Property I Bundle Group Constants ABOUT TEXT  getAboutText bundleGroup getProperty IBundleGroupConstants ABOUT_TEXT

protected About Data String provider Name String name String version String id this provider Name provider Name null provider Name NON NLS 1 this name name null name NON NLS 1 this version version null version NON NLS 1 this id id null id NON NLS 1  AboutData providerName providerName providerName providerName
public String get Id return id  getId
public String get Name return name  getName
public String get Provider Name return provider Name  getProviderName providerName
public String get Version return version  getVersion
public String get Versioned Id if versioned Id null versioned Id get Id   get Version NON NLS 1 return versioned Id  getVersionedId versionedId versionedId getId _ getVersion versionedId
Modify the argument array to reverse the sort order param infos private static void reverse About Data infos List info List Arrays as List infos Collections reverse info List for int i 0 i infos length i infos i About Data info List get i  AboutData infoList asList infoList AboutData infoList
Collator collator Collator get Instance Locale get Default public int compare Object a Object b About Data info1 About Data a About Data info2 About Data b String provider1 info1 get Provider Name String provider2 info2 get Provider Name if provider1 equals provider2 return collator compare provider1 provider2 return collator compare info1 get Name info2 get Name  getInstance getDefault AboutData AboutData AboutData AboutData getProviderName getProviderName getName getName
Modify the argument array to be sorted by provider If the reverse boolean is true the array is assumed to already be sorted and the direction of sort ascending vs descending is reversed Entries with the same name are sorted by name param reverse if true then the order of the argument is reversed without examining the value of the fields param infos the data to be sorted public static void sort By Provider boolean reverse About Data infos if reverse reverse infos return Arrays sort infos new Comparator Collator collator Collator get Instance Locale get Default public int compare Object a Object b About Data info1 About Data a About Data info2 About Data b String provider1 info1 get Provider Name String provider2 info2 get Provider Name if provider1 equals provider2 return collator compare provider1 provider2 return collator compare info1 get Name info2 get Name  sortByProvider AboutData getInstance getDefault AboutData AboutData AboutData AboutData getProviderName getProviderName getName getName
Collator collator Collator get Instance Locale get Default public int compare Object a Object b About Data info1 About Data a About Data info2 About Data b return collator compare info1 get Name info2 get Name  getInstance getDefault AboutData AboutData AboutData AboutData getName getName
Modify the argument array to be sorted by name If the reverse boolean is true the array is assumed to already be sorted and the direction of sort ascending vs descending is reversed param reverse if true then the order of the argument is reversed without examining the value of the fields param infos the data to be sorted public static void sort By Name boolean reverse About Data infos if reverse reverse infos return Arrays sort infos new Comparator Collator collator Collator get Instance Locale get Default public int compare Object a Object b About Data info1 About Data a About Data info2 About Data b return collator compare info1 get Name info2 get Name  sortByName AboutData getInstance getDefault AboutData AboutData AboutData AboutData getName getName
Collator collator Collator get Instance Locale get Default public int compare Object a Object b About Data info1 About Data a About Data info2 About Data b String version1 info1 get Version String version2 info2 get Version if version1 equals version2 return collator compare version1 version2 return collator compare info1 get Name info2 get Name  getInstance getDefault AboutData AboutData AboutData AboutData getVersion getVersion getName getName
Modify the argument array to be sorted by version If the reverse boolean is true the array is assumed to already be sorted and the direction of sort ascending vs descending is reversed Entries with the same name are sorted by name param reverse if true then the order of the argument is reversed without examining the value of the fields param infos the data to be sorted public static void sort By Version boolean reverse About Data infos if reverse reverse infos return Arrays sort infos new Comparator Collator collator Collator get Instance Locale get Default public int compare Object a Object b About Data info1 About Data a About Data info2 About Data b String version1 info1 get Version String version2 info2 get Version if version1 equals version2 return collator compare version1 version2 return collator compare info1 get Name info2 get Name  sortByVersion AboutData getInstance getDefault AboutData AboutData AboutData AboutData getVersion getVersion getName getName
Collator collator Collator get Instance Locale get Default public int compare Object a Object b About Data info1 About Data a About Data info2 About Data b String id1 info1 get Id String id2 info2 get Id if id1 equals id2 return collator compare id1 id2 return collator compare info1 get Name info2 get Name  getInstance getDefault AboutData AboutData AboutData AboutData getId getId getName getName
Modify the argument array to be sorted by id If the reverse boolean is true the array is assumed to already be sorted and the direction of sort ascending vs descending is reversed Entries with the same name are sorted by name param reverse if true then the order of the argument is reversed without examining the value of the fields param infos the data to be sorted public static void sort By Id boolean reverse About Data infos if reverse reverse infos return Arrays sort infos new Comparator Collator collator Collator get Instance Locale get Default public int compare Object a Object b About Data info1 About Data a About Data info2 About Data b String id1 info1 get Id String id2 info2 get Id if id1 equals id2 return collator compare id1 id2 return collator compare info1 get Name info2 get Name  sortById AboutData getInstance getDefault AboutData AboutData AboutData AboutData getId getId getName getName
protected static URL getURL String value try if value null return new URL value catch IO Exception e do nothing return null  IOException
protected static Image Descriptor get Image URL url return url null null Image Descriptor create FromURL url  ImageDescriptor getImage ImageDescriptor createFromURL
protected static Image Descriptor get Image String value return get Image getURL value  ImageDescriptor getImage getImage

param crc must not be null public Key String provider Name Long crc this provider Name provider Name this crc crc  providerName providerName providerName
public boolean equals Object o if o instanceof Key return false Key other Key o if provider Name equals other provider Name return false return crc equals other crc  providerName providerName
public int hash Code return provider Name hash Code  hashCode providerName hashCode
return true if a button should be added i e the argument has an image and it does not already have a button public boolean add About Bundle Group Data info no button for features without an image Long crc info get Feature Image Crc if crc null return false String provider Name info get Provider Name Key key new Key provider Name crc List info List List provider Map get key if info List null info List add info return false info List new Array List info List add info provider Map put key info List return true  AboutBundleGroupData getFeatureImageCrc providerName getProviderName providerName infoList providerMap infoList infoList infoList ArrayList infoList providerMap infoList
Return an array of all bundle groups that share the argument s provider and image Returns an empty array if there isn t any related information public About Bundle Group Data get Related Infos About Bundle Group Data info if there s no image then there won t be a button Long crc info get Feature Image Crc if crc null return new About Bundle Group Data 0 String provider Name info get Provider Name Key key new Key provider Name crc List info List List provider Map get key if info List null return new About Bundle Group Data 0 return About Bundle Group Data info List to Array new About Bundle Group Data 0  AboutBundleGroupData getRelatedInfos AboutBundleGroupData getFeatureImageCrc AboutBundleGroupData providerName getProviderName providerName infoList providerMap infoList AboutBundleGroupData AboutBundleGroupData infoList toArray AboutBundleGroupData

private String hrefs Creates a new about item public About Item String text int link Ranges String hrefs this text text this link Ranges link Ranges this hrefs hrefs  AboutItem linkRanges linkRanges linkRanges
Returns the link ranges character locations public int get Link Ranges return link Ranges  getLinkRanges linkRanges
Returns the text to display public String get Text return text  getText
Returns true if a link is present at the given character location public boolean is Link At int offset Check if there is a link at the offset for int i 0 i link Ranges length i if offset link Ranges i 0 offset link Ranges i 0 link Ranges i 1 return true return false  isLinkAt linkRanges linkRanges linkRanges linkRanges
Returns the link at the given offset if there is one otherwise returns code null code public String get Link At int offset Check if there is a link at the offset for int i 0 i link Ranges length i if offset link Ranges i 0 offset link Ranges i 0 link Ranges i 1 return hrefs i return null  getLinkAt linkRanges linkRanges linkRanges linkRanges

public void write Print Writer writer append Properties writer append Features writer append Registry writer append User Preferences writer  PrintWriter appendProperties appendFeatures appendRegistry appendUserPreferences
Sorted Set set new Tree Set new Comparator public int compare Object o1 Object o2 String s1 String o1 String s2 String o2 return s1 compare To s2  SortedSet TreeSet compareTo
Appends the code System code properties private void append Properties Print Writer writer writer println writer println Workbench Messages get String System Summary system Properties NON NLS 1 Properties properties System get Properties Sorted Set set new Tree Set new Comparator public int compare Object o1 Object o2 String s1 String o1 String s2 String o2 return s1 compare To s2 set add All properties key Set Iterator i set iterator while i has Next Object key i next writer print key writer print writer println properties get key  appendProperties PrintWriter WorkbenchMessages getString SystemSummary systemProperties getProperties SortedSet TreeSet compareTo addAll keySet hasNext
Appends the installed and configured features private void append Features Print Writer writer writer println writer println Workbench Messages get String System Summary features NON NLS 1 I Bundle Group Provider providers Platform get Bundle Group Providers Linked List groups new Linked List if providers null for int i 0 i providers length i I Bundle Group bundle Groups providers i get Bundle Groups for int j 0 j bundle Groups length j groups add new About Bundle Group Data bundle Groups j About Bundle Group Data bundle Group Infos About Bundle Group Data groups to Array new About Bundle Group Data 0 About Data sort By Id false bundle Group Infos for int i 0 i bundle Group Infos length i About Bundle Group Data info bundle Group Infos i String args new String info get Id info get Version info get Name writer println Workbench Messages format System Summary feature Version args NON NLS 1  appendFeatures PrintWriter WorkbenchMessages getString SystemSummary IBundleGroupProvider getBundleGroupProviders LinkedList LinkedList IBundleGroup bundleGroups getBundleGroups bundleGroups AboutBundleGroupData bundleGroups AboutBundleGroupData bundleGroupInfos AboutBundleGroupData toArray AboutBundleGroupData AboutData sortById bundleGroupInfos bundleGroupInfos AboutBundleGroupData bundleGroupInfos getId getVersion getName WorkbenchMessages SystemSummary featureVersion
Appends the contents of the Plugin Registry private void append Registry Print Writer writer writer println writer println Workbench Messages get String System Summary plugin Registry NON NLS 1 Bundle bundles Workbench Plugin get Default get Bundles About Bundle Data bundle Infos new About Bundle Data bundles length for int i 0 i bundles length i bundle Infos i new About Bundle Data bundles i About Data sort By Id false bundle Infos for int i 0 i bundle Infos length i About Bundle Data info bundle Infos i String args new String info get Id info get Version info get Name writer println Workbench Messages format System Summary descriptor Id Version args NON NLS 1  appendRegistry PrintWriter WorkbenchMessages getString SystemSummary pluginRegistry WorkbenchPlugin getDefault getBundles AboutBundleData bundleInfos AboutBundleData bundleInfos AboutBundleData AboutData sortById bundleInfos bundleInfos AboutBundleData bundleInfos getId getVersion getName WorkbenchMessages SystemSummary descriptorIdVersion
Appends the preferences private void append User Preferences Print Writer writer write the prefs to a byte array I Preferences Service service Platform get Preferences Service I Eclipse Preferences node service get Root Node Byte Array Output Stream stm new Byte Array Output Stream try service export Preferences node stm null catch Core Exception e writer println Error reading preferences e to String NON NLS 1 copy the prefs from the byte array to the writer writer println writer println Workbench Messages get String System Summary user Preferences NON NLS 1 Buffered Reader reader null try Byte Array Input Stream in new Byte Array Input Stream stm to Byte Array reader new Buffered Reader new Input Stream Reader in 8859 1 NON NLS 1 char chars new char 8192 while true int read reader read chars if read 0 break writer write chars 0 read catch IO Exception e writer println Error reading preferences e to String NON NLS 1 Byte Array streams don t need to be closed  appendUserPreferences PrintWriter IPreferencesService getPreferencesService IEclipsePreferences getRootNode ByteArrayOutputStream ByteArrayOutputStream exportPreferences CoreException toString WorkbenchMessages getString SystemSummary userPreferences BufferedReader ByteArrayInputStream ByteArrayInputStream toByteArray BufferedReader InputStreamReader 8859_1 IOException toString ByteArray

Appends the contents of the log file see org eclipse ui about I System Summary Section write java io Print Writer public void write Print Writer writer File log new File Platform get Log File Location toOS String if log exists Reader reader null try reader new Input Stream Reader new File Input Stream log UTF 8 NON NLS 1 char chars new char 8192 while true int read reader read chars if read 0 break writer write chars 0 read catch IO Exception e writer println Error reading log file NON NLS 1 finally try reader close catch IO Exception e do nothing  ISystemSummarySection PrintWriter PrintWriter getLogFileLocation toOSString InputStreamReader FileInputStream IOException IOException

see org eclipse ui application I Action Bar Configurer public abstract I Status Line Manager get Status Line Manager  IActionBarConfigurer IStatusLineManager getStatusLineManager
see org eclipse ui application I Action Bar Configurer public abstract I Menu Manager get Menu Manager  IActionBarConfigurer IMenuManager getMenuManager
see org eclipse ui application I Action Bar Configurer get Cool Bar Manager public abstract I Cool Bar Manager get Cool Bar Manager  IActionBarConfigurer getCoolBarManager ICoolBarManager getCoolBarManager

Constructs a part selection tracker for the part with the given id param id part identifier public Abstract Part Selection Tracker String part Id set Part Id part Id  AbstractPartSelectionTracker partId setPartId partId
Adds a selection listener to this tracker param listener the listener to add public void add Selection Listener I Selection Listener listener f Listeners add listener  addSelectionListener ISelectionListener fListeners
Adds a post selection listener to this tracker param listener the listener to add public void add Post Selection Listener I Selection Listener listener post Listeners add listener  addPostSelectionListener ISelectionListener postListeners
Returns the selection from the part being tracked or code null code if the part is closed or has no selection 
Removes a selection listener from this tracker param listener the listener to remove public void remove Selection Listener I Selection Listener listener f Listeners remove listener  removeSelectionListener ISelectionListener fListeners
Removes a post selection listener from this tracker param listener the listener to remove public void remove Post Selection Listener I Selection Listener listener post Listeners remove listener  removePostSelectionListener ISelectionListener postListeners
Disposes this selection tracker This removes all listeners currently registered public void dispose synchronized f Listeners Object listeners f Listeners get Listeners for int i 0 i listeners length i f Listeners remove listeners i post Listeners remove listeners i  fListeners fListeners getListeners fListeners postListeners
if part null sel null l instanceof I Null Selection Listener Platform run new Safe Runnable public void run l selection Changed part sel  INullSelectionListener SafeRunnable selectionChanged
Fires a selection event to the listeners param part the part or code null code if no active part param sel the selection or code null code if no active selection param listeners the list of listeners to notify protected void fire Selection final I Workbench Part part final I Selection sel Object array f Listeners get Listeners for int i 0 i array length i final I Selection Listener l I Selection Listener array i if part null sel null l instanceof I Null Selection Listener Platform run new Safe Runnable public void run l selection Changed part sel  fireSelection IWorkbenchPart ISelection fListeners getListeners ISelectionListener ISelectionListener INullSelectionListener SafeRunnable selectionChanged
if part null sel null l instanceof I Null Selection Listener Platform run new Safe Runnable public void run l selection Changed part sel  INullSelectionListener SafeRunnable selectionChanged
Fires a post selection event to the listeners param part the part or code null code if no active part param sel the selection or code null code if no active selection param listeners the list of listeners to notify protected void fire Post Selection final I Workbench Part part final I Selection sel Object array post Listeners get Listeners for int i 0 i array length i final I Selection Listener l I Selection Listener array i if part null sel null l instanceof I Null Selection Listener Platform run new Safe Runnable public void run l selection Changed part sel  firePostSelection IWorkbenchPart ISelection postListeners getListeners ISelectionListener ISelectionListener INullSelectionListener SafeRunnable selectionChanged
Sets the id of the part that this tracks param id view identifier private void set Part Id String part Id f Part Id part Id  setPartId partId fPartId partId
Returns the id of the part that this tracks return part identifier protected String get Part Id return f Part Id  getPartId fPartId

private I Selection Changed Listener sel Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event fire Selection active Part event get Selection  ISelectionChangedListener selListener ISelectionChangedListener selectionChanged SelectionChangedEvent fireSelection activePart getSelection
private I Selection Changed Listener post Sel Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event fire Post Selection active Part event get Selection  ISelectionChangedListener postSelListener ISelectionChangedListener selectionChanged SelectionChangedEvent firePostSelection activePart getSelection
Creates a new Selection Service protected Abstract Selection Service  SelectionService AbstractSelectionService
Method declared on I Selection Service public void add Selection Listener I Selection Listener l listeners add l  ISelectionService addSelectionListener ISelectionListener
Method declared on I Selection Service public void add Selection Listener String part Id I Selection Listener listener get Per Part Tracker part Id add Selection Listener listener  ISelectionService addSelectionListener partId ISelectionListener getPerPartTracker partId addSelectionListener
Method declared on I Selection Service public void add Post Selection Listener I Selection Listener l post Listeners add l  ISelectionService addPostSelectionListener ISelectionListener postListeners
Method declared on I Selection Service public void add Post Selection Listener String part Id I Selection Listener listener get Per Part Tracker part Id add Post Selection Listener listener  ISelectionService addPostSelectionListener partId ISelectionListener getPerPartTracker partId addPostSelectionListener
Method declared on I Selection Service public void remove Selection Listener I Selection Listener l listeners remove l  ISelectionService removeSelectionListener ISelectionListener
Method declared on I Selection Listener public void remove Post Selection Listener String part Id I Selection Listener listener get Per Part Tracker part Id remove Post Selection Listener listener  ISelectionListener removePostSelectionListener partId ISelectionListener getPerPartTracker partId removePostSelectionListener
Method declared on I Selection Service public void remove Post Selection Listener I Selection Listener l post Listeners remove l  ISelectionService removePostSelectionListener ISelectionListener postListeners
Method declared on I Selection Listener public void remove Selection Listener String part Id I Selection Listener listener get Per Part Tracker part Id remove Selection Listener listener  ISelectionListener removeSelectionListener partId ISelectionListener getPerPartTracker partId removeSelectionListener
if part null sel null l instanceof I Null Selection Listener Platform run new Safe Runnable public void run l selection Changed part sel  INullSelectionListener SafeRunnable selectionChanged
Fires a selection event to the given listeners param part the part or code null code if no active part param sel the selection or code null code if no active selection protected void fire Selection final I Workbench Part part final I Selection sel Object array listeners get Listeners for int i 0 i array length i final I Selection Listener l I Selection Listener array i if part null sel null l instanceof I Null Selection Listener Platform run new Safe Runnable public void run l selection Changed part sel  fireSelection IWorkbenchPart ISelection getListeners ISelectionListener ISelectionListener INullSelectionListener SafeRunnable selectionChanged
if part null sel null l instanceof I Null Selection Listener Platform run new Safe Runnable public void run l selection Changed part sel  INullSelectionListener SafeRunnable selectionChanged
Fires a selection event to the given listeners param part the part or code null code if no active part param sel the selection or code null code if no active selection protected void fire Post Selection final I Workbench Part part final I Selection sel Object array post Listeners get Listeners for int i 0 i array length i final I Selection Listener l I Selection Listener array i if part null sel null l instanceof I Null Selection Listener Platform run new Safe Runnable public void run l selection Changed part sel  firePostSelection IWorkbenchPart ISelection postListeners getListeners ISelectionListener ISelectionListener INullSelectionListener SafeRunnable selectionChanged
Returns the per part selection tracker for the given part id param part Id part identifier return per part selection tracker protected Abstract Part Selection Tracker get Per Part Tracker String part Id if per Part Trackers null per Part Trackers new Hashtable 4 Abstract Part Selection Tracker tracker Abstract Part Selection Tracker per Part Trackers get part Id if tracker null tracker create Part Tracker part Id per Part Trackers put part Id tracker return tracker  partId AbstractPartSelectionTracker getPerPartTracker partId perPartTrackers perPartTrackers AbstractPartSelectionTracker AbstractPartSelectionTracker perPartTrackers partId createPartTracker partId perPartTrackers partId
Creates a new per part selection tracker for the given part id param part Id part identifier return per part selection tracker  partId
Returns the selection public I Selection get Selection if active Provider null return active Provider get Selection else return null  ISelection getSelection activeProvider activeProvider getSelection
see I Selection Service get Selection String public I Selection get Selection String part Id return get Per Part Tracker part Id get Selection  ISelectionService getSelection ISelection getSelection partId getPerPartTracker partId getSelection
Notifies the listener that a part has been activated public void part Activated I Workbench Part new Part Optimize if new Part active Part return Unhook selection from the old part reset Update active part active Part new Part Hook selection on the new part if active Part null active Provider active Part get Site get Selection Provider if active Provider null Fire an event if there s an active provider active Provider add Selection Changed Listener sel Listener I Selection sel active Provider get Selection fire Selection new Part sel if active Provider instanceof I Post Selection Provider I Post Selection Provider active Provider add Post Selection Changed Listener post Sel Listener else active Provider add Selection Changed Listener post Sel Listener fire Post Selection new Part sel else Reset active part active Provider may not be null next time this method is called active Part null No need to fire an event if no active provider since this was done in reset  partActivated IWorkbenchPart newPart newPart activePart activePart newPart activePart activeProvider activePart getSite getSelectionProvider activeProvider activeProvider addSelectionChangedListener selListener ISelection activeProvider getSelection fireSelection newPart activeProvider IPostSelectionProvider IPostSelectionProvider activeProvider addPostSelectionChangedListener postSelListener activeProvider addSelectionChangedListener postSelListener firePostSelection newPart activeProvider activePart
Notifies the listener that a part has been brought to the front public void part Brought To Top I Workbench Part new Part do nothing the active part has not changed so the selection is unaffected  partBroughtToTop IWorkbenchPart newPart
Notifies the listener that a part has been closed public void part Closed I Workbench Part part Unhook selection from the part if part active Part reset  partClosed IWorkbenchPart activePart
Notifies the listener that a part has been deactivated public void part Deactivated I Workbench Part part Unhook selection from the part if part active Part reset  partDeactivated IWorkbenchPart activePart
Notifies the listener that a part has been opened public void part Opened I Workbench Part part Wait for activation  partOpened IWorkbenchPart
Notifies the listener that a part has been opened public void part Input Changed I Workbench Part part 36501 only process if part is active if active Part part reset part Activated part  partInputChanged IWorkbenchPart activePart partActivated
Resets the service The active part and selection provider are dereferenced public void reset if active Part null fire Selection null null fire Post Selection null null if active Provider null active Provider remove Selection Changed Listener sel Listener if active Provider instanceof I Post Selection Provider I Post Selection Provider active Provider remove Post Selection Changed Listener post Sel Listener else active Provider remove Selection Changed Listener post Sel Listener active Provider null active Part null  activePart fireSelection firePostSelection activeProvider activeProvider removeSelectionChangedListener selListener activeProvider IPostSelectionProvider IPostSelectionProvider activeProvider removePostSelectionChangedListener postSelListener activeProvider removeSelectionChangedListener postSelListener activeProvider activePart

Creates a new descriptor with the specified target public Action Descriptor I Configuration Element action Element int target Type this action Element target Type null  ActionDescriptor IConfigurationElement actionElement targetType actionElement targetType
Creates a new descriptor with the target and destination workbench part it will go into public Action Descriptor I Configuration Element action Element int target Type Object target Load attributes id action Element get Attribute ATT ID plugin Id action Element get Declaring Extension get Namespace String label action Element get Attribute ATT LABEL String tooltip action Element get Attribute ATT TOOLTIP String help Context Id action Element get Attribute ATT HELP CONTEXT ID String mpath action Element get Attribute ATT MENUBAR PATH String tpath action Element get Attribute ATT TOOLBAR PATH String style action Element get Attribute ATT STYLE String icon action Element get Attribute ATT ICON String hover Icon action Element get Attribute ATT HOVERICON String disabled Icon action Element get Attribute ATT DISABLEDICON String description action Element get Attribute ATT DESCRIPTION String accelerator action Element get Attribute ATT ACCELERATOR Verify input if label null Workbench Plugin log Invalid action declaration label null id NON NLS 1 label Workbench Messages get String Action Descriptor invalid Label NON NLS 1 Calculate menu and toolbar paths String mgroup null String tgroup null if mpath null int loc mpath last Index Of if loc 1 mgroup mpath substring loc 1 mpath mpath substring 0 loc else mgroup mpath mpath null if target Type T POPUP mgroup null mgroup I Workbench Action Constants MB ADDITIONS if tpath null int loc tpath last Index Of if loc 1 tgroup tpath substring loc 1 tpath tpath substring 0 loc else tgroup tpath tpath null menu Path mpath menu Group mgroup if tpath null tpath equals Normal NON NLS 1 tpath NON NLS 1 toolbar Id tpath toolbar Group Id tgroup Create action action create Action target Type action Element target style if action get Text null may have been set by delegate action set Text label if action get Tool Tip Text null tooltip null may have been set by delegate action set Tool Tip Text tooltip if help Context Id null String fullID help Context Id if help Context Id index Of 1 NON NLS 1 For backward compatibility we auto qualify the id if it is not qualified fullID action Element get Declaring Extension get Namespace help Context Id NON NLS 1 Workbench Help set Help action fullID if description null action set Description description if style null Since 2 1 the state and pulldown attributes means something different when the new style attribute has been set See doc for more info String state action Element get Attribute ATT STATE if state null if style equals STYLE RADIO style equals STYLE TOGGLE action set Checked state equals true NON NLS 1 else Keep for backward compatibility for actions not using the new style attribute String state action Element get Attribute ATT STATE if state null action set Checked state equals true NON NLS 1 String extending Plugin Id action Element get Declaring Extension get Namespace if icon null action set Image Descriptor AbstractUI Plugin image Descriptor From Plugin extending Plugin Id icon if hover Icon null action set Hover Image Descriptor AbstractUI Plugin image Descriptor From Plugin extending Plugin Id hover Icon if disabled Icon null action set Disabled Image Descriptor AbstractUI Plugin image Descriptor From Plugin extending Plugin Id disabled Icon if accelerator null process Accelerator action accelerator  ActionDescriptor IConfigurationElement actionElement targetType actionElement getAttribute ATT_ID pluginId actionElement getDeclaringExtension getNamespace actionElement getAttribute ATT_LABEL actionElement getAttribute ATT_TOOLTIP helpContextId actionElement getAttribute ATT_HELP_CONTEXT_ID actionElement getAttribute ATT_MENUBAR_PATH actionElement getAttribute ATT_TOOLBAR_PATH actionElement getAttribute ATT_STYLE actionElement getAttribute ATT_ICON hoverIcon actionElement getAttribute ATT_HOVERICON disabledIcon actionElement getAttribute ATT_DISABLEDICON actionElement getAttribute ATT_DESCRIPTION actionElement getAttribute ATT_ACCELERATOR WorkbenchPlugin WorkbenchMessages getString ActionDescriptor invalidLabel lastIndexOf targetType T_POPUP IWorkbenchActionConstants MB_ADDITIONS lastIndexOf menuPath menuGroup toolbarId toolbarGroupId createAction targetType actionElement getText setText getToolTipText setToolTipText helpContextId helpContextId helpContextId indexOf actionElement getDeclaringExtension getNamespace helpContextId WorkbenchHelp setHelp setDescription actionElement getAttribute ATT_STATE STYLE_RADIO STYLE_TOGGLE setChecked actionElement getAttribute ATT_STATE setChecked extendingPluginId actionElement getDeclaringExtension getNamespace setImageDescriptor AbstractUIPlugin imageDescriptorFromPlugin extendingPluginId hoverIcon setHoverImageDescriptor AbstractUIPlugin imageDescriptorFromPlugin extendingPluginId hoverIcon disabledIcon setDisabledImageDescriptor AbstractUIPlugin imageDescriptorFromPlugin extendingPluginId disabledIcon processAccelerator
Creates an instance of Plugin Action Depending on the target part subclasses of this class may be created private Plugin Action create Action int target Type I Configuration Element action Element Object target String style int action Style I Action AS UNSPECIFIED if style null if style equals STYLE RADIO action Style I Action AS RADIO BUTTON else if style equals STYLE TOGGLE action Style I Action AS CHECK BOX else if style equals STYLE PULLDOWN action Style I Action AS DROP DOWN MENU else if style equals STYLE PUSH action Style I Action AS PUSH BUTTON switch target Type case T VIEW return new View Plugin Action action Element I View Part target id action Style case T EDITOR return new Editor Plugin Action action Element I Editor Part target id action Style case T WORKBENCH return new W Win Plugin Action action Element I Workbench Window target id action Style case T WORKBENCH PULLDOWN action Style I Action AS DROP DOWN MENU return new W Win Plugin Pulldown action Element I Workbench Window target id action Style case T POPUP return new Object Plugin Action action Element id action Style default Workbench Plugin log Unknown Action Type target Type NON NLS 1 return null  PluginAction PluginAction createAction targetType IConfigurationElement actionElement actionStyle IAction AS_UNSPECIFIED STYLE_RADIO actionStyle IAction AS_RADIO_BUTTON STYLE_TOGGLE actionStyle IAction AS_CHECK_BOX STYLE_PULLDOWN actionStyle IAction AS_DROP_DOWN_MENU STYLE_PUSH actionStyle IAction AS_PUSH_BUTTON targetType T_VIEW ViewPluginAction actionElement IViewPart actionStyle T_EDITOR EditorPluginAction actionElement IEditorPart actionStyle T_WORKBENCH WWinPluginAction actionElement IWorkbenchWindow actionStyle T_WORKBENCH_PULLDOWN actionStyle IAction AS_DROP_DOWN_MENU WWinPluginPulldown actionElement IWorkbenchWindow actionStyle T_POPUP ObjectPluginAction actionElement actionStyle WorkbenchPlugin targetType
Returns the action object held in this descriptor public Plugin Action get Action return action  PluginAction getAction
Returns action s id as defined in the registry public String get Id return id  getId
Returns named slot group in the menu where this action should be added public String get Menu Group return menu Group  getMenuGroup menuGroup
Returns menu path where this action should be added If null the action will not be added into the menu public String get Menu Path return menu Path  getMenuPath menuPath
Returns the named slot group in the tool bar where this action should be added public String get Toolbar Group Id return toolbar Group Id  getToolbarGroupId toolbarGroupId
Returns id of the tool bar where this action should be added If null action will not be added to the tool bar public String get Toolbar Id return toolbar Id  getToolbarId toolbarId
For debugging only public String to String return Action Descriptor id NON NLS 2 NON NLS 1  toString ActionDescriptor
Process the accelerator definition If it is a number then process the code directly if not then parse it and create the code private void process Accelerator I Action action String accelerator Text if accelerator Text length 0 return Is it a numeric definition if Character is Digit accelerator Text char At 0 try action set Accelerator Integer value Of accelerator Text int Value catch Number Format Exception exception Workbench Plugin log Invalid accelerator declaration id NON NLS 1 else action set Accelerator Action convert Accelerator accelerator Text  processAccelerator IAction acceleratorText acceleratorText isDigit acceleratorText charAt setAccelerator valueOf acceleratorText intValue NumberFormatException WorkbenchPlugin setAccelerator convertAccelerator acceleratorText
see org eclipse ui I Plugin Contribution get Local Id public String get Local Id return get Id  IPluginContribution getLocalId getLocalId getId
see org eclipse ui I Plugin Contribution get Plugin Id public String get Plugin Id return plugin Id  IPluginContribution getPluginId getPluginId pluginId

Creates an action expression for the given configuration element param element The element to build the expression from public Action Expression I Configuration Element element try root new Single Expression element catch Illegal State Exception e e print Stack Trace root null  ActionExpression IConfigurationElement SingleExpression IllegalStateException printStackTrace
Create an instance of the receiver with the given expression type and value Currently the only supported expression type is code EXP TYPE OBJECT CLASS code param expression Type The expression constant we are creating an instance of param expression Value The name of the class we are creating an expression for public Action Expression String expression Type String expression Value if expression Type equals EXP TYPE OBJECT CLASS root new Single Expression new Object Class Expression expression Value  EXP_TYPE_OBJECT_CLASS expressionType expressionValue ActionExpression expressionType expressionValue expressionType EXP_TYPE_OBJECT_CLASS SingleExpression ObjectClassExpression expressionValue
Returns whether the expression is valid for the given object param object the object to validate against can be code null code return boolean whether the expression is valid for the object public boolean is Enabled For Object object if root null return false return root is Enabled For object  isEnabledFor isEnabledFor
Returns whether or not the receiver is potentially valid for the object via just the extension type Currently the only supported expression type is code EXP TYPE OBJECT CLASS code param object the object to validate against can be code null code param expression Type the expression type to consider return boolean whether the expression is potentially valid for the object public boolean is Enabled For Expression Object object String expression Type if root null return false return root is Enabled For Expression object expression Type  EXP_TYPE_OBJECT_CLASS expressionType isEnabledForExpression expressionType isEnabledForExpression expressionType
Returns whether the expression is valid for all elements of the given selection param selection the structured selection to use return boolean whether the expression is valid for the selection public boolean is Enabled For I Structured Selection selection if root null return false if selection null selection is Empty return root is Enabled For null Iterator elements selection iterator while elements has Next if is Enabled For elements next return false return true  isEnabledFor IStructuredSelection isEmpty isEnabledFor hasNext isEnabledFor
Create an expression from the attributes and sub elements of the configuration element param element The I Configuration Element with a tag defined in the public constants return Abstract Expression based on the definition throws Illegal State Exception if the expression tag is not defined in the schema see org eclipse ui schema common Expression mxsd private static Abstract Expression create Expression I Configuration Element element throws Illegal State Exception String tag element get Name if tag equals EXP TYPE OR return new Or Expression element if tag equals EXP TYPE AND return new And Expression element if tag equals EXP TYPE NOT return new Not Expression element if tag equals EXP TYPE OBJECT STATE return new Object State Expression element if tag equals EXP TYPE OBJECT CLASS return new Object Class Expression element if tag equals EXP TYPE PLUG IN STATE return new Plugin State Expression element if tag equals EXP TYPE SYSTEM PROPERTY return new System Property Expression element throw new Illegal State Exception Action expression unrecognized element tag NON NLS 1  IConfigurationElement AbstractExpression IllegalStateException commonExpression AbstractExpression createExpression IConfigurationElement IllegalStateException getName EXP_TYPE_OR OrExpression EXP_TYPE_AND AndExpression EXP_TYPE_NOT NotExpression EXP_TYPE_OBJECT_STATE ObjectStateExpression EXP_TYPE_OBJECT_CLASS ObjectClassExpression EXP_TYPE_PLUG_IN_STATE PluginStateExpression EXP_TYPE_SYSTEM_PROPERTY SystemPropertyExpression IllegalStateException
private static abstract class Abstract Expression Returns whether the expression is valid for the given object param object the object to validate against can be code null code return boolean whether the expression is valid for the object  AbstractExpression
Returns whether or not the receiver is potentially valid for the object via just the extension type Currently the only supported expression type is code EXP TYPE OBJECT CLASS code param object the object to validate against can be code null code param expression Type the expression type to consider return boolean whether the expression is potentially valid for the object public boolean is Enabled For Expression Object object String expression Type return false  EXP_TYPE_OBJECT_CLASS expressionType isEnabledForExpression expressionType
Creates and populates the expression from the attributes and sub elements of the configuration element param element The composite element we will create the expression from throws Illegal State Exception if the expression tag is not defined in the schema see org eclipse ui schema common Expression mxsd public Composite Expression I Configuration Element element throws Illegal State Exception super I Configuration Element children element get Children if children length 0 throw new Illegal State Exception Composite expression cannot be empty NON NLS 1 list new Array List children length for int i 0 i children length i String tag children i get Name Abstract Expression expr create Expression children i if EXP TYPE OBJECT CLASS equals tag list add 0 expr else list add expr  IllegalStateException commonExpression CompositeExpression IConfigurationElement IllegalStateException IConfigurationElement getChildren IllegalStateException ArrayList getName AbstractExpression createExpression EXP_TYPE_OBJECT_CLASS
public boolean is Enabled For Expression Object object String expression Type Iterator iterator list iterator while iterator has Next Abstract Expression next Abstract Expression iterator next if next is Enabled For Expression object expression Type return true return false  isEnabledForExpression expressionType hasNext AbstractExpression AbstractExpression isEnabledForExpression expressionType
Creates and populates the expression from the attributes and sub elements of the configuration element param element The element to create the expression from throws Illegal State Exception if the expression tag is not defined in the schema see org eclipse ui schema common Expression mxsd public Single Expression I Configuration Element element throws Illegal State Exception super I Configuration Element children element get Children if children length 1 throw new Illegal State Exception Single expression does not contain only 1 expression NON NLS 1 child create Expression children 0  IllegalStateException commonExpression SingleExpression IConfigurationElement IllegalStateException IConfigurationElement getChildren IllegalStateException createExpression
Create a single expression from the abstract definition param expression The expression that will be the child of the new single expression throws Illegal State Exception if the expression tag is not defined in the schema see org eclipse ui schema common Expression mxsd public Single Expression Abstract Expression expression throws Illegal State Exception super if expression null child expression else throw new Illegal State Exception Single expression must contain 1 expression NON NLS 1  IllegalStateException commonExpression SingleExpression AbstractExpression IllegalStateException IllegalStateException
Method declared on Abstract Expression public boolean is Enabled For Object object return child is Enabled For object  AbstractExpression isEnabledFor isEnabledFor
Method declared on Abstract Expression public boolean is Enabled For Expression Object object String expression Type return child is Enabled For Expression object expression Type  AbstractExpression isEnabledForExpression expressionType isEnabledForExpression expressionType
Creates and populates the expression from the attributes and sub elements of the configuration element param element The element that will be used to create the definition for the receiver throws Illegal State Exception if the expression tag is not defined in the schema see org eclipse ui schema common Expression mxsd public Not Expression I Configuration Element element throws Illegal State Exception super element  IllegalStateException commonExpression NotExpression IConfigurationElement IllegalStateException
Method declared on Abstract Expression public boolean is Enabled For Object object return super is Enabled For object  AbstractExpression isEnabledFor isEnabledFor
Creates and populates the expression from the attributes and sub elements of the configuration element param element The element that will be used to determine the expressions for Or throws Illegal State Exception if the expression tag is not defined in the schema see org eclipse ui schema common Expression mxsd public Or Expression I Configuration Element element throws Illegal State Exception super element  IllegalStateException commonExpression OrExpression IConfigurationElement IllegalStateException
public boolean is Enabled For Object object Iterator iter list iterator while iter has Next Abstract Expression expr Abstract Expression iter next if expr is Enabled For object return true return false  isEnabledFor hasNext AbstractExpression AbstractExpression isEnabledFor
Creates and populates the expression from the attributes and sub elements of the configuration element param element The element that will be used to determine the expressions for And throws Illegal State Exception if the expression tag is not defined in the schema see org eclipse ui schema common Expression mxsd public And Expression I Configuration Element element throws Illegal State Exception super element  IllegalStateException commonExpression AndExpression IConfigurationElement IllegalStateException
public boolean is Enabled For Object object Iterator iter list iterator while iter has Next Abstract Expression expr Abstract Expression iter next if expr is Enabled For object return false return true  isEnabledFor hasNext AbstractExpression AbstractExpression isEnabledFor
Creates and populates the expression from the attributes and sub elements of the configuration element param element The element that will be used to determine the expressions for object State throws Illegal State Exception if the expression tag is not defined in the schema see org eclipse ui schema common Expression mxsd public Object State Expression I Configuration Element element throws Illegal State Exception super name element get Attribute ATT NAME value element get Attribute ATT VALUE if name null value null throw new Illegal State Exception Object state expression missing attribute NON NLS 1  objectState IllegalStateException commonExpression ObjectStateExpression IConfigurationElement IllegalStateException getAttribute ATT_NAME getAttribute ATT_VALUE IllegalStateException
public boolean is Enabled For Object object if object null return false Try out the object first if precisely Matches object return true Try out the underlying resource Class resource Class Legacy Resource Support get Resource Class if resource Class null return false if resource Class is Instance object return false Object res null if object instanceof I Adaptable res I Adaptable object get Adapter resource Class if res null return false return precisely Matches res  isEnabledFor preciselyMatches resourceClass LegacyResourceSupport getResourceClass resourceClass resourceClass isInstance IAdaptable IAdaptable getAdapter resourceClass preciselyMatches
private boolean precisely Matches Object object Get the action filter I Action Filter filter get Action Filter object if filter null return false Run the action filter return filter test Attribute object name value  preciselyMatches IActionFilter getActionFilter testAttribute
private I Action Filter get Action Filter Object object I Action Filter filter null if object instanceof I Action Filter filter I Action Filter object else if object instanceof I Adaptable filter I Action Filter I Adaptable object get Adapter I Action Filter class return filter  IActionFilter getActionFilter IActionFilter IActionFilter IActionFilter IAdaptable IActionFilter IAdaptable getAdapter IActionFilter
Creates and populates the expression from the attributes and sub elements of the configuration element param element The element that will be used to determine the expressions for object Class throws Illegal State Exception if the expression tag is not defined in the schema see org eclipse ui schema common Expression mxsd public Object Class Expression I Configuration Element element throws Illegal State Exception super class Name element get Attribute ATT NAME if class Name null throw new Illegal State Exception Object class expression missing name attribute NON NLS 1  objectClass IllegalStateException commonExpression ObjectClassExpression IConfigurationElement IllegalStateException className getAttribute ATT_NAME className IllegalStateException
Create an Object Class expression based on the class Name Added for backwards compatibility param class Name public Object Class Expression String class Name super if class Name null this class Name class Name else throw new Illegal State Exception Object class expression must have class name NON NLS 1  ObjectClass className className ObjectClassExpression className className className className IllegalStateException
public boolean is Enabled For Object object if object null return false Class clazz object get Class while clazz null test the class itself if clazz get Name equals class Name return true test all the interfaces the class implements Class interfaces clazz get Interfaces for int i 0 i interfaces length i if check Interface Hierarchy interfaces i return true get the superclass clazz clazz get Superclass return false  isEnabledFor getClass getName className getInterfaces checkInterfaceHierarchy getSuperclass
Check the interfaces the whole way up If one of them matches class Name return code true code param interface To Check The interface whose name we are testing against return code true code if one of the interfaces in the hierarchy matches class Name code false code otherwise private boolean check Interface Hierarchy Class interface To Check if interface To Check get Name equals class Name return true Class super Interfaces interface To Check get Interfaces for int i 0 i super Interfaces length i if check Interface Hierarchy super Interfaces i return true return false  className interfaceToCheck className checkInterfaceHierarchy interfaceToCheck interfaceToCheck getName className superInterfaces interfaceToCheck getInterfaces superInterfaces checkInterfaceHierarchy superInterfaces
public boolean is Enabled For Expression Object object String expression Type if expression Type equals EXP TYPE OBJECT CLASS return is Enabled For object return false  isEnabledForExpression expressionType expressionType EXP_TYPE_OBJECT_CLASS isEnabledFor
Creates and populates the expression from the attributes and sub elements of the configuration element param element The element that will be used to determine the expressions for plugin State throws Illegal State Exception if the expression tag is not defined in the schema see org eclipse ui schema common Expression mxsd public Plugin State Expression I Configuration Element element throws Illegal State Exception super id element get Attribute ATT ID value element get Attribute ATT VALUE if id null value null throw new Illegal State Exception Plugin state expression missing attribute NON NLS 1  pluginState IllegalStateException commonExpression PluginStateExpression IConfigurationElement IllegalStateException getAttribute ATT_ID getAttribute ATT_VALUE IllegalStateException
public boolean is Enabled For Object object Bundle bundle Platform get Bundle id if Bundle Utility is Ready bundle return false if value equals PLUGIN INSTALLED return true if value equals PLUGIN ACTIVATED return Bundle Utility is Activated bundle return false  isEnabledFor getBundle BundleUtility isReady PLUGIN_INSTALLED PLUGIN_ACTIVATED BundleUtility isActivated
Creates and populates the expression from the attributes and sub elements of the configuration element param element The element that will be used to determine the expressions for system Property throws Illegal State Exception if the expression tag is not defined in the schema see org eclipse ui schema common Expression mxsd public System Property Expression I Configuration Element element throws Illegal State Exception super name element get Attribute ATT NAME value element get Attribute ATT VALUE if name null value null throw new Illegal State Exception System property expression missing attribute NON NLS 1  systemProperty IllegalStateException commonExpression SystemPropertyExpression IConfigurationElement IllegalStateException getAttribute ATT_NAME getAttribute ATT_VALUE IllegalStateException
public boolean is Enabled For Object object String str System get Property name if str null return false return value equals str  isEnabledFor getProperty

private class Set Rec public Set Rec I Action Set Descriptor desc I Action Set set Sub Action Bars bars this desc desc this set set this bars bars  SetRec SetRec IActionSetDescriptor IActionSet SubActionBars
Action Presentation constructor comment public Action Presentation Workbench Window window super this window window  ActionPresentation ActionPresentation WorkbenchWindow
Remove all action sets public void clear Action Sets List old List copy Action Sets Iterator iter old List iterator while iter has Next I Action Set Descriptor desc I Action Set Descriptor iter next remove Action Set desc  clearActionSets oldList copyActionSets oldList hasNext IActionSetDescriptor IActionSetDescriptor removeActionSet
Returns a copy of the visible action set private List copy Action Sets Set keys map Desc To Rec key Set Array List list new Array List keys size Iterator iter keys iterator while iter has Next list add iter next return list  copyActionSets mapDescToRec keySet ArrayList ArrayList hasNext
Destroy an action set public void remove Action Set I Action Set Descriptor desc Set Rec rec Set Rec map Desc To Rec get desc if rec null map Desc To Rec remove desc Remove from the map that stores invisible bars invisible Bars remove desc I Action Set set rec set Sub Action Bars bars rec bars if bars null bars dispose if set null set dispose  removeActionSet IActionSetDescriptor SetRec SetRec mapDescToRec mapDescToRec invisibleBars IActionSet SubActionBars
Sets the list of visible action set public void set Action Sets I Action Set Descriptor new Array Convert array to list List new List Arrays as List new Array List old List copy Action Sets Remove obsolete actions Iterator iter old List iterator while iter has Next I Action Set Descriptor desc I Action Set Descriptor iter next if new List contains desc Set Rec rec Set Rec map Desc To Rec get desc if rec null map Desc To Rec remove desc I Action Set set rec set Sub Action Bars bars rec bars if bars null Set Rec invisible Rec new Set Rec desc set bars invisible Bars put desc invisible Rec bars deactivate Add new actions iter new List iterator Array List sets new Array List while iter has Next I Action Set Descriptor desc I Action Set Descriptor iter next if map Desc To Rec contains Key desc try Set Rec rec If the action bars and sets have already been created then reuse those action sets if invisible Bars contains Key desc rec Set Rec invisible Bars get desc if rec bars null rec bars activate invisible Bars remove desc else I Action Set set desc create Action Set Sub Action Bars bars new Action Set Action Bars window get Action Bars desc get Id rec new Set Rec desc set bars set init window bars sets add set map Desc To Rec put desc rec catch Core Exception e Workbench Plugin log Unable to create Action Set desc get Id NON NLS 1 We process action sets in two passes for coolbar purposes First we process base contributions i e actions that the action set contributes to its toolbar then we process adjunct contributions i e actions that the action set contributes to other toolbars This type of processing is necessary in order to maintain group order within a coolitem Plugin Action Set Builder process Action Sets sets window iter sets iterator while iter has Next Plugin Action Set set Plugin Action Set iter next set get Bars activate  setActionSets IActionSetDescriptor newArray newList asList newArray oldList copyActionSets oldList hasNext IActionSetDescriptor IActionSetDescriptor newList SetRec SetRec mapDescToRec mapDescToRec IActionSet SubActionBars SetRec invisibleRec SetRec invisibleBars invisibleRec newList ArrayList ArrayList hasNext IActionSetDescriptor IActionSetDescriptor mapDescToRec containsKey SetRec invisibleBars containsKey SetRec invisibleBars invisibleBars IActionSet createActionSet SubActionBars ActionSetActionBars getActionBars getId SetRec mapDescToRec CoreException WorkbenchPlugin ActionSet getId PluginActionSetBuilder processActionSets hasNext PluginActionSet PluginActionSet getBars
public I Action Set get Action Sets Collection set Rec Collection map Desc To Rec values I Action Set result new I Action Set set Rec Collection size int i 0 for Iterator iterator set Rec Collection iterator iterator has Next i result i Set Rec iterator next set return result  IActionSet getActionSets setRecCollection mapDescToRec IActionSet IActionSet setRecCollection setRecCollection hasNext SetRec

Creates a new instance of the receiver param action Group the action group this action is created in public Clear Working Set Action Working Set Filter Action Group action Group super Workbench Messages get String Clear Working Set Action text NON NLS 1 Assert is Not Null action Group set Tool Tip Text Workbench Messages get String Clear Working Set Action tool Tip NON NLS 1 set Enabled action Group get Working Set null Workbench Help set Help this I Help Context Ids CLEAR WORKING SET ACTION this action Group action Group  actionGroup ClearWorkingSetAction WorkingSetFilterActionGroup actionGroup WorkbenchMessages getString ClearWorkingSetAction isNotNull actionGroup setToolTipText WorkbenchMessages getString ClearWorkingSetAction toolTip setEnabled actionGroup getWorkingSet WorkbenchHelp setHelp IHelpContextIds CLEAR_WORKING_SET_ACTION actionGroup actionGroup
Overrides method from Action see org eclipse jface Action run public void run action Group set Working Set null  actionGroup setWorkingSet

Creates a new instance of the receiver param action Group the action group this action is created in public Edit Working Set Action Working Set Filter Action Group action Group Shell shell super Workbench Messages get String Edit Working Set Action text NON NLS 1 Assert is Not Null action Group set Tool Tip Text Workbench Messages get String Edit Working Set Action tool Tip NON NLS 1 this shell shell this action Group action Group Workbench Help set Help this I Help Context Ids EDIT WORKING SET ACTION  actionGroup EditWorkingSetAction WorkingSetFilterActionGroup actionGroup WorkbenchMessages getString EditWorkingSetAction isNotNull actionGroup setToolTipText WorkbenchMessages getString EditWorkingSetAction toolTip actionGroup actionGroup WorkbenchHelp setHelp IHelpContextIds EDIT_WORKING_SET_ACTION
Overrides method from Action see org eclipse jface Action run public void run I Working Set Manager manager PlatformUI get Workbench get Working Set Manager I Working Set working Set action Group get Working Set if working Set null set Enabled false return I Working Set Edit Wizard wizard manager create Working Set Edit Wizard working Set if wizard null String title Workbench Messages get String Edit Working Set Action error nowizard title NON NLS 1 String message Workbench Messages get String Edit Working Set Action error nowizard message NON NLS 1 Message Dialog open Error shell title message return Wizard Dialog dialog new Wizard Dialog shell wizard dialog create if dialog open Wizard Dialog OK action Group set Working Set wizard get Selection  IWorkingSetManager getWorkbench getWorkingSetManager IWorkingSet workingSet actionGroup getWorkingSet workingSet setEnabled IWorkingSetEditWizard createWorkingSetEditWizard workingSet WorkbenchMessages getString EditWorkingSetAction WorkbenchMessages getString EditWorkingSetAction MessageDialog openError WizardDialog WizardDialog WizardDialog actionGroup setWorkingSet getSelection

Constructs a new action bars object public Action Set Action Bars I Action Bars2 parent String action Set Id super parent this action Set Id action Set Id  ActionSetActionBars IActionBars2 actionSetId actionSetId actionSetId
Adds to the list all the actions that are part of this action set but belong to different cool bar items param item the item defined in this actionset but in a different tool Bar contribution item package void add Adjunct Contribution I Contribution Item item adjunct Contributions add item  addAdjunctContribution IContributionItem adjunctContributions
non Javadoc Inherited from Sub Action Bars protected Sub Menu Manager create Sub Menu Manager I Menu Manager parent return new Action Set Menu Manager parent action Set Id  SubActionBars SubMenuManager createSubMenuManager IMenuManager ActionSetMenuManager actionSetId
non Javadoc Inherited from Sub Action Bars protected Sub Tool Bar Manager create Sub Tool Bar Manager I Tool Bar Manager parent return null action sets are managed by Cool Item Tool Bar Managers return null  SubActionBars SubToolBarManager createSubToolBarManager IToolBarManager CoolItemToolBarManagers
Dispose the contributions public void dispose super dispose if cool Item Tool Bar Mgr null return I Contribution Item items cool Item Tool Bar Mgr get Items remove the action set s items from its action bar don t use remove All since other items from other actions sets may be in the action bar s cool item for int i 0 i items length i I Contribution Item item items i if item instanceof Plugin Action Cool Bar Contribution Item Plugin Action Cool Bar Contribution Item action Set Item Plugin Action Cool Bar Contribution Item item if action Set Item get Action Set Id equals action Set Id cool Item Tool Bar Mgr remove item item dispose else leave separators and group markers intact doing so allows ordering to be maintained when action sets are removed then added back remove items from this action set that are in other action bars for int i 0 i adjunct Contributions size i Contribution Item item Contribution Item adjunct Contributions get i Tool Bar Manager parent Tool Bar Manager item get Parent if parent null parent remove item item dispose tool Bar Contribution Item null cool Item Tool Bar Mgr null adjunct Contributions new Array List  coolItemToolBarMgr IContributionItem coolItemToolBarMgr getItems removeAll IContributionItem PluginActionCoolBarContributionItem PluginActionCoolBarContributionItem actionSetItem PluginActionCoolBarContributionItem actionSetItem getActionSetId actionSetId coolItemToolBarMgr adjunctContributions ContributionItem ContributionItem adjunctContributions ToolBarManager ToolBarManager getParent toolBarContributionItem coolItemToolBarMgr adjunctContributions ArrayList
Returns the contribution item that the given contribution item should be inserted after param start Id the location to start looking alphabetically param item Id the target item id param mgr the contribution manager return the contribution item that the given items should be returned after since 3 0 private I Contribution Item find Alphabetical Order String start Id String item Id I Contribution Manager mgr I Contribution Item items mgr get Items int insert Index 0 look for starting point while insert Index items length I Contribution Item item items insert Index if item get Id null item get Id equals start Id break insert Index Find the index that this item should be inserted in for int i insert Index 1 i items length i I Contribution Item item items i String test Id item get Id if item is Group Marker break if item Id null test Id null if item Id compare To test Id 1 break insert Index i Should be inserted at the end if insert Index items length return null return items insert Index  startId itemId IContributionItem findAlphabeticalOrder startId itemId IContributionManager IContributionItem getItems insertIndex insertIndex IContributionItem insertIndex getId getId startId insertIndex insertIndex IContributionItem testId getId isGroupMarker itemId testId itemId compareTo testId insertIndex insertIndex insertIndex
package String get Action Set Id return action Set Id  getActionSetId actionSetId
Returns a tool bar manager for this Item return the tool bar manager public I Tool Bar Manager get Tool Bar Manager I Cool Bar Manager cool Bar Manager get Casted Parent get Cool Bar Manager if cool Bar Manager null return null return new Tool Bar Manager cool Bar Manager get Style  IToolBarManager getToolBarManager ICoolBarManager coolBarManager getCastedParent getCoolBarManager coolBarManager ToolBarManager coolBarManager getStyle
Returns the correct tool bar for the given action id If this action is an adjunct type the it returns the toolbar manager from the cool bar manager param id the id of the action return the tool bar manager public I Tool Bar Manager get Tool Bar Manager String action Id Check if a tool bar manager for an adjunct type is being requested String tool Bar Id action Set Id boolean is Adjunct Type false if action Id equals action Set Id Adjunct type tool Bar Id action Id is Adjunct Type true Rereive the cool bar manager I Cool Bar Manager cool Bar Manager get Casted Parent get Cool Bar Manager if cool Bar Manager null return null Check to see that there isn t already a tool bar created and the tool bar being requested is not for an adjunct action if cool Item Tool Bar Mgr null is Adjunct Type return cool Item Tool Bar Mgr Search for tool Bar Id in the cool Bar manager I Contribution Item cb Item cool Bar Manager find tool Bar Id If there hasn t been a tool bar contribution item created for this tool bar id then create one Otherwise retrieve the tool bar contribution item if cb Item instanceof Tool Bar Contribution Item Tool Bar Contribution Item tbcb Item Tool Bar Contribution Item cb Item cool Item Tool Bar Mgr tbcb Item get Tool Bar Manager If this not an adjuct type then we can cashe the tool bar contribution type if is Adjunct Type tool Bar Contribution Item tbcb Item else cool Item Tool Bar Mgr new Tool Bar Manager cool Bar Manager get Style If this is not an adjunct type then create a tool bar contribution item we don t create one for an adjunct type because another action set action bars contains one tool Bar Contribution Item new Tool Bar Contribution Item cool Item Tool Bar Mgr tool Bar Id tool Bar Contribution Item set Parent cool Item Tool Bar Mgr tool Bar Contribution Item set Visible get Active cool Item Tool Bar Mgr mark Dirty Now add the tool bar contribution Item to the cool bar manager I Contribution Item ref Item find Alphabetical Order I Workbench Action Constants MB ADDITIONS tool Bar Id cool Bar Manager if ref Item null cool Bar Manager insert After ref Item get Id tool Bar Contribution Item else cool Bar Manager add tool Bar Contribution Item return cool Item Tool Bar Mgr  IToolBarManager getToolBarManager actionId toolBarId actionSetId isAdjunctType actionId actionSetId toolBarId actionId isAdjunctType ICoolBarManager coolBarManager getCastedParent getCoolBarManager coolBarManager coolItemToolBarMgr isAdjunctType coolItemToolBarMgr toolBarId IContributionItem cbItem coolBarManager toolBarId cbItem ToolBarContributionItem ToolBarContributionItem tbcbItem ToolBarContributionItem cbItem coolItemToolBarMgr tbcbItem getToolBarManager isAdjunctType toolBarContributionItem tbcbItem coolItemToolBarMgr ToolBarManager coolBarManager getStyle toolBarContributionItem ToolBarContributionItem coolItemToolBarMgr toolBarId toolBarContributionItem setParent coolItemToolBarMgr toolBarContributionItem setVisible getActive coolItemToolBarMgr markDirty IContributionItem refItem findAlphabeticalOrder IWorkbenchActionConstants MB_ADDITIONS toolBarId coolBarManager refItem coolBarManager insertAfter refItem getId toolBarContributionItem coolBarManager toolBarContributionItem coolItemToolBarMgr
for dynamic UI package void remove Adjunct Contribution Contribution Item item adjunct Contributions remove item  removeAdjunctContribution ContributionItem adjunctContributions
Activate Deactivate the contributions protected void set Active boolean set super set Active set I Cool Bar Manager cool Bar Manager get Casted Parent get Cool Bar Manager if cool Bar Manager null return 1 Need to set visibility for all non adjunct actions if cool Item Tool Bar Mgr null I Contribution Item items cool Item Tool Bar Mgr get Items for int i 0 i items length i I Contribution Item item items i if item instanceof Plugin Action Cool Bar Contribution Item Plugin Action Cool Bar Contribution Item action Set Item Plugin Action Cool Bar Contribution Item item Only if the action set id for this contribution item is the same as this object if action Set Item get Action Set Id equals action Set Id item set Visible set cool Item Tool Bar Mgr mark Dirty if cool Bar Manager is Dirty cool Bar Manager mark Dirty Update the manager cool Item Tool Bar Mgr update false if tool Bar Contribution Item null tool Bar Contribution Item update I Cool Bar Manager SIZE 2 Need to set visibility for all adjunct actions if adjunct Contributions size 0 for Iterator i adjunct Contributions iterator i has Next I Contribution Item item I Contribution Item i next if item instanceof Contribution Item item set Visible set I Contribution Manager manager Contribution Item item get Parent manager mark Dirty manager update false if cool Bar Manager is Dirty cool Bar Manager mark Dirty item update I Cool Bar Manager SIZE cool Bar Manager update false  setActive setActive ICoolBarManager coolBarManager getCastedParent getCoolBarManager coolBarManager coolItemToolBarMgr IContributionItem coolItemToolBarMgr getItems IContributionItem PluginActionCoolBarContributionItem PluginActionCoolBarContributionItem actionSetItem PluginActionCoolBarContributionItem actionSetItem getActionSetId actionSetId setVisible coolItemToolBarMgr markDirty coolBarManager isDirty coolBarManager markDirty coolItemToolBarMgr toolBarContributionItem toolBarContributionItem ICoolBarManager adjunctContributions adjunctContributions hasNext IContributionItem IContributionItem ContributionItem setVisible IContributionManager ContributionItem getParent markDirty coolBarManager isDirty coolBarManager markDirty ICoolBarManager coolBarManager

Constructs a new item public Action Set Contribution Item I Contribution Item item String action Set Id super item this action Set Id action Set Id  ActionSetContributionItem IContributionItem actionSetId actionSetId actionSetId
Returns the action set id public String get Action Set Id return action Set Id  getActionSetId actionSetId
Sets the action set id public void set Action Set Id String new Action Set Id action Set Id new Action Set Id  setActionSetId newActionSetId actionSetId newActionSetId

private String action Set Id Constructs a new editor manager public Action Set Menu Manager I Menu Manager mgr String action Set Id super mgr this action Set Id action Set Id  actionSetId ActionSetMenuManager IMenuManager actionSetId actionSetId actionSetId
Makes sure to dispose of the contribution items contained within this menu manager This is to prevent memory leaks via the identifier listeners on code Plugin Action Contribution Item code Please see Bug 64024 public void dispose final I Contribution Item items get Items for int i 0 i items length i items i dispose remove All  PluginActionContributionItem IContributionItem getItems removeAll
public I Contribution Item find String id I Contribution Item item get Parent Menu Manager find id if item instanceof Sub Contribution Item Return the item passed to us not the wrapper item unwrap item if item instanceof I Menu Manager if it is a menu manager wrap it before returning I Menu Manager menu I Menu Manager item if menu instanceof Sub Menu Manager it it is already wrapped then remover the wrapper and rewrap We have a table of wrappers so we reuse wrappers we create menu I Menu Manager Sub Menu Manager menu get Parent item get Wrapper menu return item  IContributionItem IContributionItem getParentMenuManager SubContributionItem IMenuManager IMenuManager IMenuManager SubMenuManager IMenuManager SubMenuManager getParent getWrapper
Method declared on I Contribution Manager public I Contribution Item get Items return get Parent Menu Manager get Items  IContributionManager IContributionItem getItems getParentMenuManager getItems
Method declared on Sub Contribution Manager protected Sub Contribution Item wrap I Contribution Item item return new Action Set Contribution Item item action Set Id  SubContributionManager SubContributionItem IContributionItem ActionSetContributionItem actionSetId
Method declared on Sub Menu Manager protected Sub Menu Manager wrap Menu I Menu Manager menu return new Action Set Menu Manager menu action Set Id  SubMenuManager SubMenuManager wrapMenu IMenuManager ActionSetMenuManager actionSetId

private String action Set Id Constructs a new group marker public Action Set Separator String group Name String new Action Set Id super group Name action Set Id new Action Set Id  actionSetId ActionSetSeparator groupName newActionSetId groupName actionSetId newActionSetId
public void fill Menu menu int index if index 0 new Menu Item menu SWT SEPARATOR index else new Menu Item menu SWT SEPARATOR  MenuItem MenuItem
public void fill Tool Bar toolbar int index if index 0 new Tool Item toolbar SWT SEPARATOR index else new Tool Item toolbar SWT SEPARATOR  ToolBar ToolItem ToolItem
Returns the action set id public String get Action Set Id return action Set Id  getActionSetId actionSetId
The code Separator code implementation of this code I Contribution Item code method returns code true code public boolean is Separator return true  IContributionItem isSeparator
Sets the action set id public void set Action Set Id String new Action Set Id action Set Id new Action Set Id  setActionSetId newActionSetId actionSetId newActionSetId

Zero arg constructor to allow cheat sheets to reuse this action public Help Contents Action this PlatformUI get Workbench get Active Workbench Window  HelpContentsAction getWorkbench getActiveWorkbenchWindow
Constructor for use by Action Factory public Help Contents Action I Workbench Window window if window null throw new Illegal Argument Exception this workbench Window window set Action Definition Id org eclipse ui help help Contents NON NLS 1 support for allowing a product to override the text for the action String override Text Pref Util getAPI Preference Store get String I Workbench Preference Constants HELP CONTENTS ACTION TEXT if equals override Text NON NLS 1 set Text Workbench Messages get String Help Contents Action text NON NLS 1 set Tool Tip Text Workbench Messages get String Help Contents Action tool Tip NON NLS 1 else set Text override Text set Tool Tip Text Action remove Mnemonics override Text set Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL HELP CONTENTS Workbench Help set Help this I Help Context Ids HELP CONTENTS ACTION  ActionFactory HelpContentsAction IWorkbenchWindow IllegalArgumentException workbenchWindow setActionDefinitionId helpContents overrideText PrefUtil getAPIPreferenceStore getString IWorkbenchPreferenceConstants HELP_CONTENTS_ACTION_TEXT overrideText setText WorkbenchMessages getString HelpContentsAction setToolTipText WorkbenchMessages getString HelpContentsAction toolTip setText overrideText setToolTipText removeMnemonics overrideText setImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_HELP_CONTENTS WorkbenchHelp setHelp IHelpContextIds HELP_CONTENTS_ACTION
This may take a while so use the busy indicator Busy Indicator show While null new Runnable public void run Workbench Help display Help  BusyIndicator showWhile WorkbenchHelp displayHelp
public void run if workbench Window null action has been disposed return This may take a while so use the busy indicator Busy Indicator show While null new Runnable public void run Workbench Help display Help  workbenchWindow BusyIndicator showWhile WorkbenchHelp displayHelp
Method declared on Action Factory I Workbench Action public void dispose workbench Window null  ActionFactory IWorkbenchAction workbenchWindow

this property change notification could be from a non ui thread window get Shell get Display sync Exec new Runnable public void run get Parent update false  getShell getDisplay syncExec getParent
private I Property Change Listener pref Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals I Preference Constants REUSE EDITORS BOOLEAN if get Parent null reuse Editors Workbench Plugin get Default get Preference Store get Boolean I Preference Constants REUSE EDITORS BOOLEAN set Visible reuse Editors get Parent mark Dirty if window get Shell null window get Shell is Disposed this property change notification could be from a non ui thread window get Shell get Display sync Exec new Runnable public void run get Parent update false  IPropertyChangeListener prefListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty IPreferenceConstants REUSE_EDITORS_BOOLEAN getParent reuseEditors WorkbenchPlugin getDefault getPreferenceStore getBoolean IPreferenceConstants REUSE_EDITORS_BOOLEAN setVisible reuseEditors getParent markDirty getShell getShell isDisposed getShell getDisplay syncExec getParent
param action public Pin Editor Contribution Item Pin Editor Action action I Workbench Window window super action if window null throw new Illegal Argument Exception this window window reuse Editors Workbench Plugin get Default get Preference Store get Boolean I Preference Constants REUSE EDITORS BOOLEAN set Visible reuse Editors Workbench Plugin get Default get Preference Store add Property Change Listener pref Listener  PinEditorContributionItem PinEditorAction IWorkbenchWindow IllegalArgumentException reuseEditors WorkbenchPlugin getDefault getPreferenceStore getBoolean IPreferenceConstants REUSE_EDITORS_BOOLEAN setVisible reuseEditors WorkbenchPlugin getDefault getPreferenceStore addPropertyChangeListener prefListener
see org eclipse jface action I Contribution Item is Visible public boolean is Visible issue the Action Contribution Item implementation of this method ignores the visible value set return super is Visible reuse Editors  IContributionItem isVisible isVisible ActionContributionItem isVisible reuseEditors
see org eclipse jface action I Contribution Item dispose public void dispose super dispose Workbench Plugin get Default get Preference Store remove Property Change Listener pref Listener  IContributionItem WorkbenchPlugin getDefault getPreferenceStore removePropertyChangeListener prefListener

Creates a new instance of the receiver param action Group the action group this action is created in param shell shell to use for opening working set selection dialog public Select Working Set Action Working Set Filter Action Group action Group Shell shell super Workbench Messages get String Select Working Set Action text NON NLS 1 Assert is Not Null action Group set Tool Tip Text Workbench Messages get String Select Working Set Action tool Tip NON NLS 1 this shell shell this action Group action Group Workbench Help set Help this I Help Context Ids SELECT WORKING SET ACTION  actionGroup SelectWorkingSetAction WorkingSetFilterActionGroup actionGroup WorkbenchMessages getString SelectWorkingSetAction isNotNull actionGroup setToolTipText WorkbenchMessages getString SelectWorkingSetAction toolTip actionGroup actionGroup WorkbenchHelp setHelp IHelpContextIds SELECT_WORKING_SET_ACTION
Overrides method from Action see org eclipse jface Action run public void run I Working Set Manager manager PlatformUI get Workbench get Working Set Manager I Working Set Selection Dialog dialog manager create Working Set Selection Dialog shell false I Working Set working Set action Group get Working Set if working Set null dialog set Selection new I Working Set working Set if dialog open Window OK I Working Set result dialog get Selection if result null result length 0 action Group set Working Set result 0 manager add Recent Working Set result 0 else action Group set Working Set null else action Group set Working Set working Set  IWorkingSetManager getWorkbench getWorkingSetManager IWorkingSetSelectionDialog createWorkingSetSelectionDialog IWorkingSet workingSet actionGroup getWorkingSet workingSet setSelection IWorkingSet workingSet IWorkingSet getSelection actionGroup setWorkingSet addRecentWorkingSet actionGroup setWorkingSet actionGroup setWorkingSet workingSet

Creates an Activate Editor Action public Activate Editor Action I Workbench Window window super Workbench Messages get String Activate Editor Action text window NON NLS 1 set Tool Tip Text Workbench Messages get String Activate Editor Action tool Tip NON NLS 1 issue missing action id update State Workbench Help set Help this I Help Context Ids ACTIVATE EDITOR ACTION set Action Definition Id org eclipse ui window activate Editor NON NLS 1  ActivateEditorAction ActivateEditorAction IWorkbenchWindow WorkbenchMessages getString ActivateEditorAction setToolTipText WorkbenchMessages getString ActivateEditorAction toolTip updateState WorkbenchHelp setHelp IHelpContextIds ACTIVATE_EDITOR_ACTION setActionDefinitionId activateEditor
public void page Activated I Workbench Page page super page Activated page update State  pageActivated IWorkbenchPage pageActivated updateState
public void page Closed I Workbench Page page super page Closed page update State  pageClosed IWorkbenchPage pageClosed updateState
public void run With Event Event e if get Workbench Window null action has been disposed return accelerator e detail I Workbench Page page get Active Page if page null I Editor Part part page get Active Editor may not actually be active if part null page activate part else I Workbench Part Reference ref page get Active Part Reference if ref instanceof I View Reference if Workbench Page page is Fast View I View Reference ref Workbench Page page toggle Fast View I View Reference ref  runWithEvent getWorkbenchWindow IWorkbenchPage getActivePage IEditorPart getActiveEditor IWorkbenchPartReference getActivePartReference IViewReference WorkbenchPage isFastView IViewReference WorkbenchPage toggleFastView IViewReference
Updates the enabled state public void update State I Workbench Page page get Active Page set Enabled page null  updateState IWorkbenchPage getActivePage setEnabled
public int get Accelerator int accelerator this accelerator accelerator accelerator SWT CTRL accelerator accelerator SWT SHIFT accelerator accelerator SWT ALT return accelerator  getAccelerator

Creates a new action with the given text param text the string used as the text for the action or code null code if there is no text param window the workbench window this action is registered with protected Active Editor Action String text I Workbench Window window super text window update State  ActiveEditorAction IWorkbenchWindow updateState
Notification that the active editor tracked by the action is being activated Subclasses may override protected void editor Activated I Editor Part part  editorActivated IEditorPart
Notification that the active editor tracked by the action is being deactivated Subclasses may override protected void editor Deactivated I Editor Part part  editorDeactivated IEditorPart
Return the active editor return the page s active editor and code null code if no active editor or no active page public final I Editor Part get Active Editor return active Editor  IEditorPart getActiveEditor activeEditor
public void page Activated I Workbench Page page super page Activated page update Active Editor update State  pageActivated IWorkbenchPage pageActivated updateActiveEditor updateState
public void page Closed I Workbench Page page super page Closed page update Active Editor update State  pageClosed IWorkbenchPage pageClosed updateActiveEditor updateState
public void part Activated I Workbench Part part super part Activated part if part instanceof I Editor Part update Active Editor update State  partActivated IWorkbenchPart partActivated IEditorPart updateActiveEditor updateState
public void part Brought To Top I Workbench Part part super part Brought To Top part if part instanceof I Editor Part update Active Editor update State  partBroughtToTop IWorkbenchPart partBroughtToTop IEditorPart updateActiveEditor updateState
public void part Closed I Workbench Part part super part Closed part if part instanceof I Editor Part update Active Editor update State  partClosed IWorkbenchPart partClosed IEditorPart updateActiveEditor updateState
public void part Deactivated I Workbench Part part super part Deactivated part if part instanceof I Editor Part update Active Editor update State  partDeactivated IWorkbenchPart partDeactivated IEditorPart updateActiveEditor updateState
Set the active editor private void set Active Editor I Editor Part part if active Editor part return if active Editor null editor Deactivated active Editor active Editor part if active Editor null editor Activated active Editor  setActiveEditor IEditorPart activeEditor activeEditor editorDeactivated activeEditor activeEditor activeEditor editorActivated activeEditor
Update the active editor based on the current active page private void update Active Editor if get Active Page null set Active Editor null else set Active Editor get Active Page get Active Editor  updateActiveEditor getActivePage setActiveEditor setActiveEditor getActivePage getActiveEditor
Update the state of the action By default the action is enabled if there is an active editor Subclasses may override or extend this method protected void update State set Enabled get Active Editor null  updateState setEnabled getActiveEditor

private List activity Manager Listeners protected Abstract Activity Manager  activityManagerListeners AbstractActivityManager
public void add Activity Manager Listener I Activity Manager Listener activity Manager Listener if activity Manager Listener null throw new Null Pointer Exception if activity Manager Listeners null activity Manager Listeners new Array List if activity Manager Listeners contains activity Manager Listener activity Manager Listeners add activity Manager Listener  addActivityManagerListener IActivityManagerListener activityManagerListener activityManagerListener NullPointerException activityManagerListeners activityManagerListeners ArrayList activityManagerListeners activityManagerListener activityManagerListeners activityManagerListener
protected void fire Activity Manager Changed Activity Manager Event activity Manager Event if activity Manager Event null throw new Null Pointer Exception if activity Manager Listeners null for int i 0 i activity Manager Listeners size i I Activity Manager Listener activity Manager Listeners get i activity Manager Changed activity Manager Event  fireActivityManagerChanged ActivityManagerEvent activityManagerEvent activityManagerEvent NullPointerException activityManagerListeners activityManagerListeners IActivityManagerListener activityManagerListeners activityManagerChanged activityManagerEvent
public void remove Activity Manager Listener I Activity Manager Listener activity Manager Listener if activity Manager Listener null throw new Null Pointer Exception if activity Manager Listeners null activity Manager Listeners remove activity Manager Listener  removeActivityManagerListener IActivityManagerListener activityManagerListener activityManagerListener NullPointerException activityManagerListeners activityManagerListeners activityManagerListener

protected List default Enabled Activities Collections EMPTY LIST protected Abstract Activity Registry  defaultEnabledActivities EMPTY_LIST AbstractActivityRegistry
public void add Activity Registry Listener I Activity Registry Listener activity Registry Listener if activity Registry Listener null throw new Null Pointer Exception if activity Registry Listeners null activity Registry Listeners new Array List if activity Registry Listeners contains activity Registry Listener activity Registry Listeners add activity Registry Listener  addActivityRegistryListener IActivityRegistryListener activityRegistryListener activityRegistryListener NullPointerException activityRegistryListeners activityRegistryListeners ArrayList activityRegistryListeners activityRegistryListener activityRegistryListeners activityRegistryListener
protected void fire Activity Registry Changed if activity Registry Listeners null for int i 0 i activity Registry Listeners size i if activity Registry Event null activity Registry Event new Activity Registry Event this I Activity Registry Listener activity Registry Listeners get i activity Registry Changed activity Registry Event  fireActivityRegistryChanged activityRegistryListeners activityRegistryListeners activityRegistryEvent activityRegistryEvent ActivityRegistryEvent IActivityRegistryListener activityRegistryListeners activityRegistryChanged activityRegistryEvent
public List get Activity Requirement Binding Definitions return activity Requirement Binding Definitions  getActivityRequirementBindingDefinitions activityRequirementBindingDefinitions
public List get Activity Definitions return activity Definitions  getActivityDefinitions activityDefinitions
public List get Activity Pattern Binding Definitions return activity Pattern Binding Definitions  getActivityPatternBindingDefinitions activityPatternBindingDefinitions
public List get Category Activity Binding Definitions return category Activity Binding Definitions  getCategoryActivityBindingDefinitions categoryActivityBindingDefinitions
public List get Category Definitions return category Definitions  getCategoryDefinitions categoryDefinitions
public void remove Activity Registry Listener I Activity Registry Listener activity Registry Listener if activity Registry Listener null throw new Null Pointer Exception if activity Registry Listeners null activity Registry Listeners remove activity Registry Listener  removeActivityRegistryListener IActivityRegistryListener activityRegistryListener activityRegistryListener NullPointerException activityRegistryListeners activityRegistryListeners activityRegistryListener
public List get Default Enabled Activities return default Enabled Activities  getDefaultEnabledActivities defaultEnabledActivities

Activity String id if id null throw new Null Pointer Exception this id id  NullPointerException
public void add Activity Listener I Activity Listener activity Listener if activity Listener null throw new Null Pointer Exception if activity Listeners null activity Listeners new Array List if activity Listeners contains activity Listener activity Listeners add activity Listener strong References add this  addActivityListener IActivityListener activityListener activityListener NullPointerException activityListeners activityListeners ArrayList activityListeners activityListener activityListeners activityListener strongReferences
public int compare To Object object Activity casted Object Activity object int compare To Util compare Comparable activity Requirement Bindings As Array Comparable casted Object activity Requirement Bindings As Array if compare To 0 compare To Util compare Comparable activity Pattern Bindings As Array Comparable casted Object activity Pattern Bindings As Array if compare To 0 compare To Util compare defined casted Object defined if compare To 0 compare To Util compare enabled casted Object enabled if compare To 0 compare To Util compare id casted Object id if compare To 0 compare To Util compare name casted Object name return compare To  compareTo castedObject compareTo activityRequirementBindingsAsArray castedObject activityRequirementBindingsAsArray compareTo compareTo activityPatternBindingsAsArray castedObject activityPatternBindingsAsArray compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo
public boolean equals Object object if object instanceof Activity return false Activity casted Object Activity object boolean equals true equals Util equals activity Requirement Bindings casted Object activity Requirement Bindings equals Util equals activity Pattern Bindings casted Object activity Pattern Bindings equals Util equals defined casted Object defined equals Util equals enabled casted Object enabled equals Util equals id casted Object id equals Util equals name casted Object name return equals  castedObject activityRequirementBindings castedObject activityRequirementBindings activityPatternBindings castedObject activityPatternBindings castedObject castedObject castedObject castedObject
void fire Activity Changed Activity Event activity Event if activity Event null throw new Null Pointer Exception if activity Listeners null for int i 0 i activity Listeners size i I Activity Listener activity Listeners get i activity Changed activity Event  fireActivityChanged ActivityEvent activityEvent activityEvent NullPointerException activityListeners activityListeners IActivityListener activityListeners activityChanged activityEvent
public Set get Activity Requirement Bindings return activity Requirement Bindings  getActivityRequirementBindings activityRequirementBindings
public Set get Activity Pattern Bindings return activity Pattern Bindings  getActivityPatternBindings activityPatternBindings
public String get Id return id  getId
public String get Name throws Not Defined Exception if defined throw new Not Defined Exception return name  getName NotDefinedException NotDefinedException
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code activity Requirement Bindings hash Code hash Code HASH FACTOR Util hash Code activity Pattern Bindings hash Code hash Code HASH FACTOR Util hash Code defined hash Code hash Code HASH FACTOR Util hash Code enabled hash Code hash Code HASH FACTOR Util hash Code id hash Code hash Code HASH FACTOR Util hash Code name hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode activityRequirementBindings hashCode hashCode HASH_FACTOR hashCode activityPatternBindings hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCodeComputed hashCode
public boolean is Defined return defined  isDefined
public boolean is Enabled return enabled  isEnabled
public boolean is Match String string if is Defined for Iterator iterator activity Pattern Bindings iterator iterator has Next I Activity Pattern Binding activity Pattern Binding I Activity Pattern Binding iterator next if activity Pattern Binding get Pattern matcher string matches return true return false  isMatch isDefined activityPatternBindings hasNext IActivityPatternBinding activityPatternBinding IActivityPatternBinding activityPatternBinding getPattern
public void remove Activity Listener I Activity Listener activity Listener if activity Listener null throw new Null Pointer Exception if activity Listeners null activity Listeners remove activity Listener if activity Listeners is Empty strong References remove this  removeActivityListener IActivityListener activityListener activityListener NullPointerException activityListeners activityListeners activityListener activityListeners isEmpty strongReferences
boolean set Activity Requirement Bindings Set activity Requirement Bindings activity Requirement Bindings Util safe Copy activity Requirement Bindings I Activity Requirement Binding class if Util equals activity Requirement Bindings this activity Requirement Bindings this activity Requirement Bindings activity Requirement Bindings this activity Requirement Bindings As Array I Activity Requirement Binding this activity Requirement Bindings to Array new I Activity Requirement Binding this activity Requirement Bindings size hash Code Computed false hash Code 0 string null return true return false  setActivityRequirementBindings activityRequirementBindings activityRequirementBindings safeCopy activityRequirementBindings IActivityRequirementBinding activityRequirementBindings activityRequirementBindings activityRequirementBindings activityRequirementBindings activityRequirementBindingsAsArray IActivityRequirementBinding activityRequirementBindings toArray IActivityRequirementBinding activityRequirementBindings hashCodeComputed hashCode
boolean set Activity Pattern Bindings Set activity Pattern Bindings activity Pattern Bindings Util safe Copy activity Pattern Bindings I Activity Pattern Binding class if Util equals activity Pattern Bindings this activity Pattern Bindings this activity Pattern Bindings activity Pattern Bindings this activity Pattern Bindings As Array I Activity Pattern Binding this activity Pattern Bindings to Array new I Activity Pattern Binding this activity Pattern Bindings size hash Code Computed false hash Code 0 string null return true return false  setActivityPatternBindings activityPatternBindings activityPatternBindings safeCopy activityPatternBindings IActivityPatternBinding activityPatternBindings activityPatternBindings activityPatternBindings activityPatternBindings activityPatternBindingsAsArray IActivityPatternBinding activityPatternBindings toArray IActivityPatternBinding activityPatternBindings hashCodeComputed hashCode
boolean set Defined boolean defined if defined this defined this defined defined hash Code Computed false hash Code 0 string null return true return false  setDefined hashCodeComputed hashCode
boolean set Enabled boolean enabled if enabled this enabled this enabled enabled hash Code Computed false hash Code 0 string null return true return false  setEnabled hashCodeComputed hashCode
boolean set Name String name if Util equals name this name this name name hash Code Computed false hash Code 0 string null return true return false  setName hashCodeComputed hashCode
boolean set Description String description if Util equals description this description this description description hash Code Computed false hash Code 0 string null return true return false  setDescription hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append activity Requirement Bindings string Buffer append string Buffer append activity Pattern Bindings string Buffer append string Buffer append defined string Buffer append string Buffer append enabled string Buffer append string Buffer append id string Buffer append string Buffer append name string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer activityRequirementBindings stringBuffer stringBuffer activityPatternBindings stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer toString
public String get Description throws Not Defined Exception if defined throw new Not Defined Exception return description  getDescription NotDefinedException NotDefinedException

static Map activity Definitions By Id Collection activity Definitions boolean allow Null Ids if activity Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator activity Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Activity Definition class Activity Definition activity Definition Activity Definition object String id activity Definition get Id if allow Null Ids id null map put id activity Definition return map  activityDefinitionsById activityDefinitions allowNullIds activityDefinitions NullPointerException HashMap activityDefinitions hasNext assertInstance ActivityDefinition ActivityDefinition activityDefinition ActivityDefinition activityDefinition getId allowNullIds activityDefinition
static Map activity Definitions By Name Collection activity Definitions boolean allow Null Names if activity Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator activity Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Activity Definition class Activity Definition activity Definition Activity Definition object String name activity Definition get Name if allow Null Names name null Collection activity Definitions2 Collection map get name if activity Definitions2 null activity Definitions2 new Hash Set map put name activity Definitions2 activity Definitions2 add activity Definition return map  activityDefinitionsByName activityDefinitions allowNullNames activityDefinitions NullPointerException HashMap activityDefinitions hasNext assertInstance ActivityDefinition ActivityDefinition activityDefinition ActivityDefinition activityDefinition getName allowNullNames activityDefinitions2 activityDefinitions2 activityDefinitions2 HashSet activityDefinitions2 activityDefinitions2 activityDefinition
public Activity Definition String id String name String source Id String description this id id this name name this source Id source Id this description description  ActivityDefinition sourceId sourceId sourceId
public int compare To Object object Activity Definition casted Object Activity Definition object int compare To Util compare id casted Object id if compare To 0 compare To Util compare name casted Object name if compare To 0 compare To Util compare source Id casted Object source Id return compare To  compareTo ActivityDefinition castedObject ActivityDefinition compareTo castedObject compareTo compareTo castedObject compareTo compareTo sourceId castedObject sourceId compareTo
public boolean equals Object object if object instanceof Activity Definition return false Activity Definition casted Object Activity Definition object boolean equals true equals Util equals id casted Object id equals Util equals name casted Object name equals Util equals source Id casted Object source Id return equals  ActivityDefinition ActivityDefinition castedObject ActivityDefinition castedObject castedObject sourceId castedObject sourceId
public String get Id return id  getId
public String get Name return name  getName
public String get Source Id return source Id  getSourceId sourceId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code id hash Code hash Code HASH FACTOR Util hash Code name hash Code hash Code HASH FACTOR Util hash Code source Id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode sourceId hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append id string Buffer append string Buffer append name string Buffer append string Buffer append source Id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer sourceId stringBuffer stringBuffer toString
public String get Description return description  getDescription

Creates a new instance of code I Mutable Activity Manager code return a new instance of code I Mutable Activity Manager code Clients should not make assumptions about the concrete implementation outside the contract of the interface Guaranteed not to be code null code public static I Mutable Activity Manager get Mutable Activity Manager return new Mutable Activity Manager  IMutableActivityManager IMutableActivityManager IMutableActivityManager getMutableActivityManager MutableActivityManager
private Activity Manager Factory  ActivityManagerFactory

public Activity Pattern Binding String activity Id Pattern pattern if pattern null throw new Null Pointer Exception this activity Id activity Id this pattern pattern  ActivityPatternBinding activityId NullPointerException activityId activityId
public int compare To Object object Activity Pattern Binding casted Object Activity Pattern Binding object int compare To Util compare activity Id casted Object activity Id if compare To 0 compare To Util compare pattern pattern casted Object pattern pattern return compare To  compareTo ActivityPatternBinding castedObject ActivityPatternBinding compareTo activityId castedObject activityId compareTo compareTo castedObject compareTo
public boolean equals Object object if object instanceof Activity Pattern Binding return false Activity Pattern Binding casted Object Activity Pattern Binding object boolean equals true equals Util equals activity Id casted Object activity Id equals Util equals pattern casted Object pattern return equals  ActivityPatternBinding ActivityPatternBinding castedObject ActivityPatternBinding activityId castedObject activityId castedObject
public String get Activity Id return activity Id  getActivityId activityId
public Pattern get Pattern return pattern  getPattern
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code activity Id hash Code hash Code HASH FACTOR Util hash Code pattern hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode activityId hashCode hashCode HASH_FACTOR hashCode hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append activity Id string Buffer append string Buffer append pattern string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer activityId stringBuffer stringBuffer stringBuffer stringBuffer toString

static Map activity Pattern Binding Definitions By Activity Id Collection activity Pattern Binding Definitions if activity Pattern Binding Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator activity Pattern Binding Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Activity Pattern Binding Definition class Activity Pattern Binding Definition activity Pattern Binding Definition Activity Pattern Binding Definition object String activity Id activity Pattern Binding Definition get Activity Id if activity Id null Collection activity Pattern Binding Definitions2 Collection map get activity Id if activity Pattern Binding Definitions2 null activity Pattern Binding Definitions2 new Array List map put activity Id activity Pattern Binding Definitions2 activity Pattern Binding Definitions2 add activity Pattern Binding Definition return map  activityPatternBindingDefinitionsByActivityId activityPatternBindingDefinitions activityPatternBindingDefinitions NullPointerException HashMap activityPatternBindingDefinitions hasNext assertInstance ActivityPatternBindingDefinition ActivityPatternBindingDefinition activityPatternBindingDefinition ActivityPatternBindingDefinition activityId activityPatternBindingDefinition getActivityId activityId activityPatternBindingDefinitions2 activityId activityPatternBindingDefinitions2 activityPatternBindingDefinitions2 ArrayList activityId activityPatternBindingDefinitions2 activityPatternBindingDefinitions2 activityPatternBindingDefinition
public Activity Pattern Binding Definition String activity Id String pattern String source Id this activity Id activity Id this pattern pattern this source Id source Id  ActivityPatternBindingDefinition activityId sourceId activityId activityId sourceId sourceId
public int compare To Object object Activity Pattern Binding Definition casted Object Activity Pattern Binding Definition object int compare To Util compare activity Id casted Object activity Id if compare To 0 compare To Util compare pattern casted Object pattern if compare To 0 compare To Util compare source Id casted Object source Id return compare To  compareTo ActivityPatternBindingDefinition castedObject ActivityPatternBindingDefinition compareTo activityId castedObject activityId compareTo compareTo castedObject compareTo compareTo sourceId castedObject sourceId compareTo
public boolean equals Object object if object instanceof Activity Pattern Binding Definition return false Activity Pattern Binding Definition casted Object Activity Pattern Binding Definition object boolean equals true equals Util equals activity Id casted Object activity Id equals Util equals pattern casted Object pattern equals Util equals source Id casted Object source Id return equals  ActivityPatternBindingDefinition ActivityPatternBindingDefinition castedObject ActivityPatternBindingDefinition activityId castedObject activityId castedObject sourceId castedObject sourceId
public String get Activity Id return activity Id  getActivityId activityId
public String get Pattern return pattern  getPattern
public String get Source Id return source Id  getSourceId sourceId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code activity Id hash Code hash Code HASH FACTOR Util hash Code pattern hash Code hash Code HASH FACTOR Util hash Code source Id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode activityId hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode sourceId hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append activity Id string Buffer append string Buffer append pattern string Buffer append string Buffer append source Id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer activityId stringBuffer stringBuffer stringBuffer stringBuffer sourceId stringBuffer stringBuffer toString

Activity Registry Event I Activity Registry activity Registry if activity Registry null throw new Null Pointer Exception this activity Registry activity Registry  ActivityRegistryEvent IActivityRegistry activityRegistry activityRegistry NullPointerException activityRegistry activityRegistry
I Activity Registry get Activity Registry return activity Registry  IActivityRegistry getActivityRegistry activityRegistry

public Activity Requirement Binding String required Activity Id String activity Id if required Activity Id null activity Id null throw new Null Pointer Exception this required Activity Id required Activity Id this activity Id activity Id  ActivityRequirementBinding requiredActivityId activityId requiredActivityId activityId NullPointerException requiredActivityId requiredActivityId activityId activityId
public int compare To Object object Activity Requirement Binding casted Object Activity Requirement Binding object int compare To Util compare required Activity Id casted Object required Activity Id if compare To 0 compare To Util compare activity Id casted Object activity Id return compare To  compareTo ActivityRequirementBinding castedObject ActivityRequirementBinding compareTo requiredActivityId castedObject requiredActivityId compareTo compareTo activityId castedObject activityId compareTo
public boolean equals Object object if object instanceof Activity Requirement Binding return false Activity Requirement Binding casted Object Activity Requirement Binding object boolean equals true equals Util equals required Activity Id casted Object required Activity Id equals Util equals activity Id casted Object activity Id return equals  ActivityRequirementBinding ActivityRequirementBinding castedObject ActivityRequirementBinding requiredActivityId castedObject requiredActivityId activityId castedObject activityId
public String get Required Activity Id return required Activity Id  getRequiredActivityId requiredActivityId
public String get Activity Id return activity Id  getActivityId activityId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code required Activity Id hash Code hash Code HASH FACTOR Util hash Code activity Id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode requiredActivityId hashCode hashCode HASH_FACTOR hashCode activityId hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append required Activity Id string Buffer append string Buffer append activity Id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer requiredActivityId stringBuffer stringBuffer activityId stringBuffer stringBuffer toString

static Map activity Requirement Binding Definitions By Activity Id Collection activity Requirement Binding Definitions if activity Requirement Binding Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator activity Requirement Binding Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Activity Requirement Binding Definition class Activity Requirement Binding Definition activity Requirement Binding Definition Activity Requirement Binding Definition object String parent Activity Id activity Requirement Binding Definition get Activity Id if parent Activity Id null Collection activity Requirement Binding Definitions2 Collection map get parent Activity Id if activity Requirement Binding Definitions2 null activity Requirement Binding Definitions2 new Hash Set map put parent Activity Id activity Requirement Binding Definitions2 activity Requirement Binding Definitions2 add activity Requirement Binding Definition return map  activityRequirementBindingDefinitionsByActivityId activityRequirementBindingDefinitions activityRequirementBindingDefinitions NullPointerException HashMap activityRequirementBindingDefinitions hasNext assertInstance ActivityRequirementBindingDefinition ActivityRequirementBindingDefinition activityRequirementBindingDefinition ActivityRequirementBindingDefinition parentActivityId activityRequirementBindingDefinition getActivityId parentActivityId activityRequirementBindingDefinitions2 parentActivityId activityRequirementBindingDefinitions2 activityRequirementBindingDefinitions2 HashSet parentActivityId activityRequirementBindingDefinitions2 activityRequirementBindingDefinitions2 activityRequirementBindingDefinition
public Activity Requirement Binding Definition String required Activity Id String activity Id String source Id this required Activity Id required Activity Id this activity Id activity Id this source Id source Id  ActivityRequirementBindingDefinition requiredActivityId activityId sourceId requiredActivityId requiredActivityId activityId activityId sourceId sourceId
public int compare To Object object Activity Requirement Binding Definition casted Object Activity Requirement Binding Definition object int compare To Util compare required Activity Id casted Object required Activity Id if compare To 0 compare To Util compare activity Id casted Object activity Id if compare To 0 compare To Util compare source Id casted Object source Id return compare To  compareTo ActivityRequirementBindingDefinition castedObject ActivityRequirementBindingDefinition compareTo requiredActivityId castedObject requiredActivityId compareTo compareTo activityId castedObject activityId compareTo compareTo sourceId castedObject sourceId compareTo
public boolean equals Object object if object instanceof Activity Requirement Binding Definition return false Activity Requirement Binding Definition casted Object Activity Requirement Binding Definition object boolean equals true equals Util equals required Activity Id casted Object required Activity Id equals Util equals activity Id casted Object activity Id equals Util equals source Id casted Object source Id return equals  ActivityRequirementBindingDefinition ActivityRequirementBindingDefinition castedObject ActivityRequirementBindingDefinition requiredActivityId castedObject requiredActivityId activityId castedObject activityId sourceId castedObject sourceId
public String get Required Activity Id return required Activity Id  getRequiredActivityId requiredActivityId
public String get Activity Id return activity Id  getActivityId activityId
public String get Source Id return source Id  getSourceId sourceId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code required Activity Id hash Code hash Code HASH FACTOR Util hash Code activity Id hash Code hash Code HASH FACTOR Util hash Code source Id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode requiredActivityId hashCode hashCode HASH_FACTOR hashCode activityId hashCode hashCode HASH_FACTOR hashCode sourceId hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append required Activity Id string Buffer append string Buffer append activity Id string Buffer append string Buffer append source Id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer requiredActivityId stringBuffer stringBuffer activityId stringBuffer stringBuffer sourceId stringBuffer stringBuffer toString

Category String id if id null throw new Null Pointer Exception this id id  NullPointerException
public void add Category Listener I Category Listener category Listener if category Listener null throw new Null Pointer Exception if category Listeners null category Listeners new Array List if category Listeners contains category Listener category Listeners add category Listener strong References add this  addCategoryListener ICategoryListener categoryListener categoryListener NullPointerException categoryListeners categoryListeners ArrayList categoryListeners categoryListener categoryListeners categoryListener strongReferences
public int compare To Object object Category casted Object Category object int compare To Util compare Comparable category Activity Bindings As Array Comparable casted Object category Activity Bindings As Array if compare To 0 compare To Util compare defined casted Object defined if compare To 0 compare To Util compare id casted Object id if compare To 0 compare To Util compare name casted Object name return compare To  compareTo castedObject compareTo categoryActivityBindingsAsArray castedObject categoryActivityBindingsAsArray compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo
public boolean equals Object object if object instanceof Category return false Category casted Object Category object boolean equals true equals Util equals category Activity Bindings casted Object category Activity Bindings equals Util equals defined casted Object defined equals Util equals id casted Object id equals Util equals name casted Object name return equals  castedObject categoryActivityBindings castedObject categoryActivityBindings castedObject castedObject castedObject
void fire Category Changed Category Event category Event if category Event null throw new Null Pointer Exception if category Listeners null for int i 0 i category Listeners size i I Category Listener category Listeners get i category Changed category Event  fireCategoryChanged CategoryEvent categoryEvent categoryEvent NullPointerException categoryListeners categoryListeners ICategoryListener categoryListeners categoryChanged categoryEvent
public Set get Category Activity Bindings return category Activity Bindings  getCategoryActivityBindings categoryActivityBindings
public String get Id return id  getId
public String get Name throws Not Defined Exception if defined throw new Not Defined Exception return name  getName NotDefinedException NotDefinedException
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code category Activity Bindings hash Code hash Code HASH FACTOR Util hash Code defined hash Code hash Code HASH FACTOR Util hash Code id hash Code hash Code HASH FACTOR Util hash Code name hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode categoryActivityBindings hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCodeComputed hashCode
public boolean is Defined return defined  isDefined
public void remove Category Listener I Category Listener category Listener if category Listener null throw new Null Pointer Exception if category Listeners null category Listeners remove category Listener if category Listeners is Empty strong References remove this  removeCategoryListener ICategoryListener categoryListener categoryListener NullPointerException categoryListeners categoryListeners categoryListener categoryListeners isEmpty strongReferences
boolean set Category Activity Bindings Set category Activity Bindings category Activity Bindings Util safe Copy category Activity Bindings I Category Activity Binding class if Util equals category Activity Bindings this category Activity Bindings this category Activity Bindings category Activity Bindings this category Activity Bindings As Array I Category Activity Binding this category Activity Bindings to Array new I Category Activity Binding this category Activity Bindings size hash Code Computed false hash Code 0 string null return true return false  setCategoryActivityBindings categoryActivityBindings categoryActivityBindings safeCopy categoryActivityBindings ICategoryActivityBinding categoryActivityBindings categoryActivityBindings categoryActivityBindings categoryActivityBindings categoryActivityBindingsAsArray ICategoryActivityBinding categoryActivityBindings toArray ICategoryActivityBinding categoryActivityBindings hashCodeComputed hashCode
boolean set Defined boolean defined if defined this defined this defined defined hash Code Computed false hash Code 0 string null return true return false  setDefined hashCodeComputed hashCode
boolean set Name String name if Util equals name this name this name name hash Code Computed false hash Code 0 string null return true return false  setName hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append category Activity Bindings string Buffer append string Buffer append defined string Buffer append string Buffer append id string Buffer append string Buffer append name string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer categoryActivityBindings stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer toString
public String get Description throws Not Defined Exception if defined throw new Not Defined Exception return description  getDescription NotDefinedException NotDefinedException
public boolean set Description String description if Util equals description this description this description description hash Code Computed false hash Code 0 string null return true return false  setDescription hashCodeComputed hashCode

public Category Activity Binding String activity Id String category Id if activity Id null category Id null throw new Null Pointer Exception this activity Id activity Id this category Id category Id  CategoryActivityBinding activityId categoryId activityId categoryId NullPointerException activityId activityId categoryId categoryId
public int compare To Object object Category Activity Binding casted Object Category Activity Binding object int compare To Util compare activity Id casted Object activity Id if compare To 0 compare To Util compare category Id casted Object category Id return compare To  compareTo CategoryActivityBinding castedObject CategoryActivityBinding compareTo activityId castedObject activityId compareTo compareTo categoryId castedObject categoryId compareTo
public boolean equals Object object if object instanceof Category Activity Binding return false Category Activity Binding casted Object Category Activity Binding object boolean equals true equals Util equals activity Id casted Object activity Id equals Util equals category Id casted Object category Id return equals  CategoryActivityBinding CategoryActivityBinding castedObject CategoryActivityBinding activityId castedObject activityId categoryId castedObject categoryId
public String get Activity Id return activity Id  getActivityId activityId
public String get Category Id return category Id  getCategoryId categoryId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code activity Id hash Code hash Code HASH FACTOR Util hash Code category Id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode activityId hashCode hashCode HASH_FACTOR hashCode categoryId hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append activity Id string Buffer append string Buffer append category Id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer activityId stringBuffer stringBuffer categoryId stringBuffer stringBuffer toString

static Map category Activity Binding Definitions By Category Id Collection category Activity Binding Definitions if category Activity Binding Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator category Activity Binding Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Category Activity Binding Definition class Category Activity Binding Definition category Activity Binding Definition Category Activity Binding Definition object String category Id category Activity Binding Definition get Category Id if category Id null Collection category Activity Binding Definitions2 Collection map get category Id if category Activity Binding Definitions2 null category Activity Binding Definitions2 new Hash Set map put category Id category Activity Binding Definitions2 category Activity Binding Definitions2 add category Activity Binding Definition return map  categoryActivityBindingDefinitionsByCategoryId categoryActivityBindingDefinitions categoryActivityBindingDefinitions NullPointerException HashMap categoryActivityBindingDefinitions hasNext assertInstance CategoryActivityBindingDefinition CategoryActivityBindingDefinition categoryActivityBindingDefinition CategoryActivityBindingDefinition categoryId categoryActivityBindingDefinition getCategoryId categoryId categoryActivityBindingDefinitions2 categoryId categoryActivityBindingDefinitions2 categoryActivityBindingDefinitions2 HashSet categoryId categoryActivityBindingDefinitions2 categoryActivityBindingDefinitions2 categoryActivityBindingDefinition
public Category Activity Binding Definition String activity Id String category Id String source Id this activity Id activity Id this category Id category Id this source Id source Id  CategoryActivityBindingDefinition activityId categoryId sourceId activityId activityId categoryId categoryId sourceId sourceId
public int compare To Object object Category Activity Binding Definition casted Object Category Activity Binding Definition object int compare To Util compare activity Id casted Object activity Id if compare To 0 compare To Util compare category Id casted Object category Id if compare To 0 compare To Util compare source Id casted Object source Id return compare To  compareTo CategoryActivityBindingDefinition castedObject CategoryActivityBindingDefinition compareTo activityId castedObject activityId compareTo compareTo categoryId castedObject categoryId compareTo compareTo sourceId castedObject sourceId compareTo
public boolean equals Object object if object instanceof Category Activity Binding Definition return false Category Activity Binding Definition casted Object Category Activity Binding Definition object boolean equals true equals Util equals activity Id casted Object activity Id equals Util equals category Id casted Object category Id equals Util equals source Id casted Object source Id return equals  CategoryActivityBindingDefinition CategoryActivityBindingDefinition castedObject CategoryActivityBindingDefinition activityId castedObject activityId categoryId castedObject categoryId sourceId castedObject sourceId
public String get Activity Id return activity Id  getActivityId activityId
public String get Category Id return category Id  getCategoryId categoryId
public String get Source Id return source Id  getSourceId sourceId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code activity Id hash Code hash Code HASH FACTOR Util hash Code category Id hash Code hash Code HASH FACTOR Util hash Code source Id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode activityId hashCode hashCode HASH_FACTOR hashCode categoryId hashCode hashCode HASH_FACTOR hashCode sourceId hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append activity Id string Buffer append string Buffer append category Id string Buffer append string Buffer append source Id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer activityId stringBuffer stringBuffer categoryId stringBuffer stringBuffer sourceId stringBuffer stringBuffer toString

static Map category Definitions By Id Collection category Definitions boolean allow Null Ids if category Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator category Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Category Definition class Category Definition category Definition Category Definition object String id category Definition get Id if allow Null Ids id null map put id category Definition return map  categoryDefinitionsById categoryDefinitions allowNullIds categoryDefinitions NullPointerException HashMap categoryDefinitions hasNext assertInstance CategoryDefinition CategoryDefinition categoryDefinition CategoryDefinition categoryDefinition getId allowNullIds categoryDefinition
static Map category Definitions By Name Collection category Definitions boolean allow Null Names if category Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator category Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Category Definition class Category Definition category Definition Category Definition object String name category Definition get Name if allow Null Names name null Collection category Definitions2 Collection map get name if category Definitions2 null category Definitions2 new Hash Set map put name category Definitions2 category Definitions2 add category Definition return map  categoryDefinitionsByName categoryDefinitions allowNullNames categoryDefinitions NullPointerException HashMap categoryDefinitions hasNext assertInstance CategoryDefinition CategoryDefinition categoryDefinition CategoryDefinition categoryDefinition getName allowNullNames categoryDefinitions2 categoryDefinitions2 categoryDefinitions2 HashSet categoryDefinitions2 categoryDefinitions2 categoryDefinition
public Category Definition String id String name String source Id String description this id id this name name this source Id source Id this description description  CategoryDefinition sourceId sourceId sourceId
public int compare To Object object Category Definition casted Object Category Definition object int compare To Util compare id casted Object id if compare To 0 compare To Util compare name casted Object name if compare To 0 compare To Util compare source Id casted Object source Id return compare To  compareTo CategoryDefinition castedObject CategoryDefinition compareTo castedObject compareTo compareTo castedObject compareTo compareTo sourceId castedObject sourceId compareTo
public boolean equals Object object if object instanceof Category Definition return false Category Definition casted Object Category Definition object boolean equals true equals Util equals id casted Object id equals Util equals name casted Object name equals Util equals source Id casted Object source Id return equals  CategoryDefinition CategoryDefinition castedObject CategoryDefinition castedObject castedObject sourceId castedObject sourceId
public String get Id return id  getId
public String get Name return name  getName
public String get Source Id return source Id  getSourceId sourceId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code id hash Code hash Code HASH FACTOR Util hash Code name hash Code hash Code HASH FACTOR Util hash Code source Id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode sourceId hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append id string Buffer append string Buffer append name string Buffer append string Buffer append source Id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer sourceId stringBuffer stringBuffer toString
public String get Description return description  getDescription

add Registry Change Listener new I Registry Change Listener public void registry Changed I Registry Change Event registry Change Event I Extension Delta extension Deltas registry Change Event get Extension Deltas Persistence PACKAGE PREFIX Persistence PACKAGE BASE if extension Deltas length 0 try load catch IO Exception eIO  addRegistryChangeListener IRegistryChangeListener registryChanged IRegistryChangeEvent registryChangeEvent IExtensionDelta extensionDeltas registryChangeEvent getExtensionDeltas PACKAGE_PREFIX PACKAGE_BASE extensionDeltas IOException
Extension Activity Registry I Extension Registry extension Registry if extension Registry null throw new Null Pointer Exception this extension Registry extension Registry this extension Registry add Registry Change Listener new I Registry Change Listener public void registry Changed I Registry Change Event registry Change Event I Extension Delta extension Deltas registry Change Event get Extension Deltas Persistence PACKAGE PREFIX Persistence PACKAGE BASE if extension Deltas length 0 try load catch IO Exception eIO try load catch IO Exception eIO  ExtensionActivityRegistry IExtensionRegistry extensionRegistry extensionRegistry NullPointerException extensionRegistry extensionRegistry extensionRegistry addRegistryChangeListener IRegistryChangeListener registryChanged IRegistryChangeEvent registryChangeEvent IExtensionDelta extensionDeltas registryChangeEvent getExtensionDeltas PACKAGE_PREFIX PACKAGE_BASE extensionDeltas IOException IOException
private String get Namespace I Configuration Element configuration Element String namespace null if configuration Element null I Extension extension configuration Element get Declaring Extension if extension null namespace extension get Namespace return namespace  getNamespace IConfigurationElement configurationElement configurationElement IExtension configurationElement getDeclaringExtension getNamespace
private void load throws IO Exception if activity Requirement Binding Definitions null activity Requirement Binding Definitions new Array List else activity Requirement Binding Definitions clear if activity Definitions null activity Definitions new Array List else activity Definitions clear if activity Pattern Binding Definitions null activity Pattern Binding Definitions new Array List else activity Pattern Binding Definitions clear if category Activity Binding Definitions null category Activity Binding Definitions new Array List else category Activity Binding Definitions clear if category Definitions null category Definitions new Array List else category Definitions clear if default Enabled Activities null default Enabled Activities new Array List else default Enabled Activities clear I Configuration Element configuration Elements extension Registry get Configuration Elements For Persistence PACKAGE FULL for int i 0 i configuration Elements length i I Configuration Element configuration Element configuration Elements i String name configuration Element get Name if Persistence TAG ACTIVITY REQUIREMENT BINDING equals name read Activity Requirement Binding Definition configuration Element else if Persistence TAG ACTIVITY equals name read Activity Definition configuration Element else if Persistence TAG ACTIVITY PATTERN BINDING equals name read Activity Pattern Binding Definition configuration Element else if Persistence TAG CATEGORY ACTIVITY BINDING equals name read Category Activity Binding Definition configuration Element else if Persistence TAG CATEGORY equals name read Category Definition configuration Element else if Persistence TAG DEFAULT ENABLEMENT equals name read Default Enablement configuration Element boolean activity Registry Changed false if activity Requirement Binding Definitions equals super activity Requirement Binding Definitions super activity Requirement Binding Definitions Collections unmodifiable List activity Requirement Binding Definitions activity Registry Changed true if activity Definitions equals super activity Definitions super activity Definitions Collections unmodifiable List activity Definitions activity Registry Changed true if activity Pattern Binding Definitions equals super activity Pattern Binding Definitions super activity Pattern Binding Definitions Collections unmodifiable List activity Pattern Binding Definitions activity Registry Changed true if category Activity Binding Definitions equals super category Activity Binding Definitions super category Activity Binding Definitions Collections unmodifiable List category Activity Binding Definitions activity Registry Changed true if category Definitions equals super category Definitions super category Definitions Collections unmodifiable List category Definitions activity Registry Changed true if default Enabled Activities equals super default Enabled Activities super default Enabled Activities Collections unmodifiable List default Enabled Activities activity Registry Changed true if activity Registry Changed fire Activity Registry Changed  IOException activityRequirementBindingDefinitions activityRequirementBindingDefinitions ArrayList activityRequirementBindingDefinitions activityDefinitions activityDefinitions ArrayList activityDefinitions activityPatternBindingDefinitions activityPatternBindingDefinitions ArrayList activityPatternBindingDefinitions categoryActivityBindingDefinitions categoryActivityBindingDefinitions ArrayList categoryActivityBindingDefinitions categoryDefinitions categoryDefinitions ArrayList categoryDefinitions defaultEnabledActivities defaultEnabledActivities ArrayList defaultEnabledActivities IConfigurationElement configurationElements extensionRegistry getConfigurationElementsFor PACKAGE_FULL configurationElements IConfigurationElement configurationElement configurationElements configurationElement getName TAG_ACTIVITY_REQUIREMENT_BINDING readActivityRequirementBindingDefinition configurationElement TAG_ACTIVITY readActivityDefinition configurationElement TAG_ACTIVITY_PATTERN_BINDING readActivityPatternBindingDefinition configurationElement TAG_CATEGORY_ACTIVITY_BINDING readCategoryActivityBindingDefinition configurationElement TAG_CATEGORY readCategoryDefinition configurationElement TAG_DEFAULT_ENABLEMENT readDefaultEnablement configurationElement activityRegistryChanged activityRequirementBindingDefinitions activityRequirementBindingDefinitions activityRequirementBindingDefinitions unmodifiableList activityRequirementBindingDefinitions activityRegistryChanged activityDefinitions activityDefinitions activityDefinitions unmodifiableList activityDefinitions activityRegistryChanged activityPatternBindingDefinitions activityPatternBindingDefinitions activityPatternBindingDefinitions unmodifiableList activityPatternBindingDefinitions activityRegistryChanged categoryActivityBindingDefinitions categoryActivityBindingDefinitions categoryActivityBindingDefinitions unmodifiableList categoryActivityBindingDefinitions activityRegistryChanged categoryDefinitions categoryDefinitions categoryDefinitions unmodifiableList categoryDefinitions activityRegistryChanged defaultEnabledActivities defaultEnabledActivities defaultEnabledActivities unmodifiableList defaultEnabledActivities activityRegistryChanged activityRegistryChanged fireActivityRegistryChanged
private void read Default Enablement I Configuration Element configuration Element String enabled Activity Persistence read Default Enablement new Configuration Element Memento configuration Element if enabled Activity null default Enabled Activities add enabled Activity  readDefaultEnablement IConfigurationElement configurationElement enabledActivity readDefaultEnablement ConfigurationElementMemento configurationElement enabledActivity defaultEnabledActivities enabledActivity
private void read Activity Requirement Binding Definition I Configuration Element configuration Element Activity Requirement Binding Definition activity Requirement Binding Definition Persistence read Activity Requirement Binding Definition new Configuration Element Memento configuration Element get Namespace configuration Element if activity Requirement Binding Definition null activity Requirement Binding Definitions add activity Requirement Binding Definition  readActivityRequirementBindingDefinition IConfigurationElement configurationElement ActivityRequirementBindingDefinition activityRequirementBindingDefinition readActivityRequirementBindingDefinition ConfigurationElementMemento configurationElement getNamespace configurationElement activityRequirementBindingDefinition activityRequirementBindingDefinitions activityRequirementBindingDefinition
private void read Activity Definition I Configuration Element configuration Element Activity Definition activity Definition Persistence read Activity Definition new Configuration Element Memento configuration Element get Namespace configuration Element if activity Definition null activity Definitions add activity Definition  readActivityDefinition IConfigurationElement configurationElement ActivityDefinition activityDefinition readActivityDefinition ConfigurationElementMemento configurationElement getNamespace configurationElement activityDefinition activityDefinitions activityDefinition
private void read Activity Pattern Binding Definition I Configuration Element configuration Element Activity Pattern Binding Definition activity Pattern Binding Definition Persistence read Activity Pattern Binding Definition new Configuration Element Memento configuration Element get Namespace configuration Element if activity Pattern Binding Definition null activity Pattern Binding Definitions add activity Pattern Binding Definition  readActivityPatternBindingDefinition IConfigurationElement configurationElement ActivityPatternBindingDefinition activityPatternBindingDefinition readActivityPatternBindingDefinition ConfigurationElementMemento configurationElement getNamespace configurationElement activityPatternBindingDefinition activityPatternBindingDefinitions activityPatternBindingDefinition
private void read Category Activity Binding Definition I Configuration Element configuration Element Category Activity Binding Definition category Activity Binding Definition Persistence read Category Activity Binding Definition new Configuration Element Memento configuration Element get Namespace configuration Element if category Activity Binding Definition null category Activity Binding Definitions add category Activity Binding Definition  readCategoryActivityBindingDefinition IConfigurationElement configurationElement CategoryActivityBindingDefinition categoryActivityBindingDefinition readCategoryActivityBindingDefinition ConfigurationElementMemento configurationElement getNamespace configurationElement categoryActivityBindingDefinition categoryActivityBindingDefinitions categoryActivityBindingDefinition
private void read Category Definition I Configuration Element configuration Element Category Definition category Definition Persistence read Category Definition new Configuration Element Memento configuration Element get Namespace configuration Element if category Definition null category Definitions add category Definition  readCategoryDefinition IConfigurationElement configurationElement CategoryDefinition categoryDefinition readCategoryDefinition ConfigurationElementMemento configurationElement getNamespace configurationElement categoryDefinition categoryDefinitions categoryDefinition

public interface I Activity Registry void add Activity Registry Listener I Activity Registry Listener activity Registry Listener  IActivityRegistry addActivityRegistryListener IActivityRegistryListener activityRegistryListener
void add Activity Registry Listener I Activity Registry Listener activity Registry Listener List get Activity Requirement Binding Definitions  addActivityRegistryListener IActivityRegistryListener activityRegistryListener getActivityRequirementBindingDefinitions
List get Activity Requirement Binding Definitions List get Activity Definitions  getActivityRequirementBindingDefinitions getActivityDefinitions
List get Activity Definitions List get Activity Pattern Binding Definitions  getActivityDefinitions getActivityPatternBindingDefinitions
List get Activity Pattern Binding Definitions List get Category Activity Binding Definitions  getActivityPatternBindingDefinitions getCategoryActivityBindingDefinitions
List get Category Activity Binding Definitions List get Category Definitions  getCategoryActivityBindingDefinitions getCategoryDefinitions
List get Category Definitions List get Default Enabled Activities  getCategoryDefinitions getDefaultEnabledActivities
List get Default Enabled Activities void remove Activity Registry Listener I Activity Registry Listener activity Registry Listener  getDefaultEnabledActivities removeActivityRegistryListener IActivityRegistryListener activityRegistryListener

public interface I Activity Registry Listener void activity Registry Changed Activity Registry Event activity Registry Event  IActivityRegistryListener activityRegistryChanged ActivityRegistryEvent activityRegistryEvent

Identifier String id if id null throw new Null Pointer Exception this id id  NullPointerException
public void add Identifier Listener I Identifier Listener identifier Listener if identifier Listener null throw new Null Pointer Exception if identifier Listeners null identifier Listeners new Array List if identifier Listeners contains identifier Listener identifier Listeners add identifier Listener strong References add this  addIdentifierListener IIdentifierListener identifierListener identifierListener NullPointerException identifierListeners identifierListeners ArrayList identifierListeners identifierListener identifierListeners identifierListener strongReferences
public int compare To Object object Identifier casted Object Identifier object int compare To Util compare Comparable activity Ids As Array Comparable casted Object activity Ids As Array if compare To 0 compare To Util compare enabled casted Object enabled if compare To 0 compare To Util compare id casted Object id return compare To  compareTo castedObject compareTo activityIdsAsArray castedObject activityIdsAsArray compareTo compareTo castedObject compareTo compareTo castedObject compareTo
public boolean equals Object object if object instanceof Identifier return false Identifier casted Object Identifier object boolean equals true equals Util equals activity Ids casted Object activity Ids equals Util equals enabled casted Object enabled equals Util equals id casted Object id return equals  castedObject activityIds castedObject activityIds castedObject castedObject
void fire Identifier Changed Identifier Event identifier Event if identifier Event null throw new Null Pointer Exception if identifier Listeners null for int i 0 i identifier Listeners size i I Identifier Listener identifier Listeners get i identifier Changed identifier Event  fireIdentifierChanged IdentifierEvent identifierEvent identifierEvent NullPointerException identifierListeners identifierListeners IIdentifierListener identifierListeners identifierChanged identifierEvent
public Set get Activity Ids return activity Ids  getActivityIds activityIds
public String get Id return id  getId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code activity Ids hash Code hash Code HASH FACTOR Util hash Code enabled hash Code hash Code HASH FACTOR Util hash Code id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode activityIds hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCodeComputed hashCode
public boolean is Enabled return enabled  isEnabled
public void remove Identifier Listener I Identifier Listener identifier Listener if identifier Listener null throw new Null Pointer Exception if identifier Listeners null identifier Listeners remove identifier Listener if identifier Listeners is Empty strong References remove this  removeIdentifierListener IIdentifierListener identifierListener identifierListener NullPointerException identifierListeners identifierListeners identifierListener identifierListeners isEmpty strongReferences
boolean set Activity Ids Set activity Ids activity Ids Util safe Copy activity Ids String class if Util equals activity Ids this activity Ids this activity Ids activity Ids this activity Ids As Array String this activity Ids to Array new String this activity Ids size hash Code Computed false hash Code 0 string null return true return false  setActivityIds activityIds activityIds safeCopy activityIds activityIds activityIds activityIds activityIds activityIdsAsArray activityIds toArray activityIds hashCodeComputed hashCode
boolean set Enabled boolean enabled if enabled this enabled this enabled enabled hash Code Computed false hash Code 0 string null return true return false  setEnabled hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append activity Ids string Buffer append string Buffer append enabled string Buffer append string Buffer append id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer activityIds stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer toString

private Map identifiers By Id new Weak Hash Map public Mutable Activity Manager this new Extension Activity Registry Platform get Extension Registry  identifiersById WeakHashMap MutableActivityManager ExtensionActivityRegistry getExtensionRegistry
activity Registry add Activity Registry Listener new I Activity Registry Listener public void activity Registry Changed Activity Registry Event activity Registry Event read Registry false  activityRegistry addActivityRegistryListener IActivityRegistryListener activityRegistryChanged ActivityRegistryEvent activityRegistryEvent readRegistry
public Mutable Activity Manager I Activity Registry activity Registry if activity Registry null throw new Null Pointer Exception this activity Registry activity Registry this activity Registry add Activity Registry Listener new I Activity Registry Listener public void activity Registry Changed Activity Registry Event activity Registry Event read Registry false read Registry true  MutableActivityManager IActivityRegistry activityRegistry activityRegistry NullPointerException activityRegistry activityRegistry activityRegistry addActivityRegistryListener IActivityRegistryListener activityRegistryChanged ActivityRegistryEvent activityRegistryEvent readRegistry readRegistry
public I Activity get Activity String activity Id if activity Id null throw new Null Pointer Exception Activity activity Activity activities By Id get activity Id if activity null activity new Activity activity Id update Activity activity activities By Id put activity Id activity return activity  IActivity getActivity activityId activityId NullPointerException activitiesById activityId activityId updateActivity activitiesById activityId
public I Category get Category String category Id if category Id null throw new Null Pointer Exception Category category Category categories By Id get category Id if category null category new Category category Id update Category category categories By Id put category Id category return category  ICategory getCategory categoryId categoryId NullPointerException categoriesById categoryId categoryId updateCategory categoriesById categoryId
public Set get Defined Activity Ids return Collections unmodifiable Set defined Activity Ids  getDefinedActivityIds unmodifiableSet definedActivityIds
public Set get Defined Category Ids return Collections unmodifiable Set defined Category Ids  getDefinedCategoryIds unmodifiableSet definedCategoryIds
public Set get Enabled Activity Ids return Collections unmodifiable Set enabled Activity Ids  getEnabledActivityIds unmodifiableSet enabledActivityIds
public I Identifier get Identifier String identifier Id if identifier Id null throw new Null Pointer Exception Identifier identifier Identifier identifiers By Id get identifier Id if identifier null identifier new Identifier identifier Id update Identifier identifier identifiers By Id put identifier Id identifier return identifier  IIdentifier getIdentifier identifierId identifierId NullPointerException identifiersById identifierId identifierId updateIdentifier identifiersById identifierId
private void get Required Activity Ids Set activity Ids Set required Activity Ids for Iterator iterator activity Ids iterator iterator has Next String activity Id String iterator next I Activity activity get Activity activity Id Set child Activity Ids new Hash Set Set activity Requirement Bindings activity get Activity Requirement Bindings for Iterator iterator2 activity Requirement Bindings iterator iterator2 has Next I Activity Requirement Binding activity Requirement Binding I Activity Requirement Binding iterator2 next child Activity Ids add activity Requirement Binding get Required Activity Id child Activity Ids remove All required Activity Ids required Activity Ids add All child Activity Ids get Required Activity Ids child Activity Ids required Activity Ids  getRequiredActivityIds activityIds requiredActivityIds activityIds hasNext activityId IActivity getActivity activityId childActivityIds HashSet activityRequirementBindings getActivityRequirementBindings activityRequirementBindings hasNext IActivityRequirementBinding activityRequirementBinding IActivityRequirementBinding childActivityIds activityRequirementBinding getRequiredActivityId childActivityIds removeAll requiredActivityIds requiredActivityIds addAll childActivityIds getRequiredActivityIds childActivityIds requiredActivityIds
private boolean is Match String string Set activity Ids activity Ids Util safe Copy activity Ids String class for Iterator iterator activity Ids iterator iterator has Next String activity Id String iterator next Activity activity Activity get Activity activity Id if activity is Match string return true return false  isMatch activityIds activityIds safeCopy activityIds activityIds hasNext activityId getActivity activityId isMatch
private void notify Activities Map activity Events By Activity Id for Iterator iterator activity Events By Activity Id entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String activity Id String entry get Key Activity Event activity Event Activity Event entry get Value Activity activity Activity activities By Id get activity Id if activity null activity fire Activity Changed activity Event  notifyActivities activityEventsByActivityId activityEventsByActivityId entrySet hasNext activityId getKey ActivityEvent activityEvent ActivityEvent getValue activitiesById activityId fireActivityChanged activityEvent
private void notify Categories Map category Events By Category Id for Iterator iterator category Events By Category Id entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String category Id String entry get Key Category Event category Event Category Event entry get Value Category category Category categories By Id get category Id if category null category fire Category Changed category Event  notifyCategories categoryEventsByCategoryId categoryEventsByCategoryId entrySet hasNext categoryId getKey CategoryEvent categoryEvent CategoryEvent getValue categoriesById categoryId fireCategoryChanged categoryEvent
private void notify Identifiers Map identifier Events By Identifier Id for Iterator iterator identifier Events By Identifier Id entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String identifier Id String entry get Key Identifier Event identifier Event Identifier Event entry get Value Identifier identifier Identifier identifiers By Id get identifier Id if identifier null identifier fire Identifier Changed identifier Event  notifyIdentifiers identifierEventsByIdentifierId identifierEventsByIdentifierId entrySet hasNext identifierId getKey IdentifierEvent identifierEvent IdentifierEvent getValue identifiersById identifierId fireIdentifierChanged identifierEvent
private void read Registry boolean set Defaults Collection activity Definitions new Array List activity Definitions add All activity Registry get Activity Definitions Map activity Definitions By Id new Hash Map Activity Definition activity Definitions By Id activity Definitions false for Iterator iterator activity Definitions By Id values iterator iterator has Next Activity Definition activity Definition Activity Definition iterator next String name activity Definition get Name if name null name length 0 iterator remove Collection category Definitions new Array List category Definitions add All activity Registry get Category Definitions Map category Definitions By Id new Hash Map Category Definition category Definitions By Id category Definitions false for Iterator iterator category Definitions By Id values iterator iterator has Next Category Definition category Definition Category Definition iterator next String name category Definition get Name if name null name length 0 iterator remove Map activity Requirement Binding Definitions By Activity Id Activity Requirement Binding Definition activity Requirement Binding Definitions By Activity Id activity Registry get Activity Requirement Binding Definitions Map activity Requirement Bindings By Activity Id new Hash Map for Iterator iterator activity Requirement Binding Definitions By Activity Id entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String parent Activity Id String entry get Key if activity Definitions By Id contains Key parent Activity Id Collection activity Requirement Binding Definitions Collection entry get Value if activity Requirement Binding Definitions null for Iterator iterator2 activity Requirement Binding Definitions iterator iterator2 has Next Activity Requirement Binding Definition activity Requirement Binding Definition Activity Requirement Binding Definition iterator2 next String child Activity Id activity Requirement Binding Definition get Required Activity Id if activity Definitions By Id contains Key child Activity Id I Activity Requirement Binding activity Requirement Binding new Activity Requirement Binding child Activity Id parent Activity Id Set activity Requirement Bindings Set activity Requirement Bindings By Activity Id get parent Activity Id if activity Requirement Bindings null activity Requirement Bindings new Hash Set activity Requirement Bindings By Activity Id put parent Activity Id activity Requirement Bindings activity Requirement Bindings add activity Requirement Binding Map activity Pattern Binding Definitions By Activity Id Activity Pattern Binding Definition activity Pattern Binding Definitions By Activity Id activity Registry get Activity Pattern Binding Definitions Map activity Pattern Bindings By Activity Id new Hash Map for Iterator iterator activity Pattern Binding Definitions By Activity Id entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String activity Id String entry get Key if activity Definitions By Id contains Key activity Id Collection activity Pattern Binding Definitions Collection entry get Value if activity Pattern Binding Definitions null for Iterator iterator2 activity Pattern Binding Definitions iterator iterator2 has Next Activity Pattern Binding Definition activity Pattern Binding Definition Activity Pattern Binding Definition iterator2 next String pattern activity Pattern Binding Definition get Pattern if pattern null pattern length 0 I Activity Pattern Binding activity Pattern Binding new Activity Pattern Binding activity Id Pattern compile pattern Set activity Pattern Bindings Set activity Pattern Bindings By Activity Id get activity Id if activity Pattern Bindings null activity Pattern Bindings new Hash Set activity Pattern Bindings By Activity Id put activity Id activity Pattern Bindings activity Pattern Bindings add activity Pattern Binding Map category Activity Binding Definitions By Category Id Category Activity Binding Definition category Activity Binding Definitions By Category Id activity Registry get Category Activity Binding Definitions Map category Activity Bindings By Category Id new Hash Map for Iterator iterator category Activity Binding Definitions By Category Id entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String category Id String entry get Key if category Definitions By Id contains Key category Id Collection category Activity Binding Definitions Collection entry get Value if category Activity Binding Definitions null for Iterator iterator2 category Activity Binding Definitions iterator iterator2 has Next Category Activity Binding Definition category Activity Binding Definition Category Activity Binding Definition iterator2 next String activity Id category Activity Binding Definition get Activity Id if activity Definitions By Id contains Key activity Id I Category Activity Binding category Activity Binding new Category Activity Binding activity Id category Id Set category Activity Bindings Set category Activity Bindings By Category Id get category Id if category Activity Bindings null category Activity Bindings new Hash Set category Activity Bindings By Category Id put category Id category Activity Bindings category Activity Bindings add category Activity Binding this activity Requirement Bindings By Activity Id activity Requirement Bindings By Activity Id this activity Definitions By Id activity Definitions By Id this activity Pattern Bindings By Activity Id activity Pattern Bindings By Activity Id this category Activity Bindings By Category Id category Activity Bindings By Category Id this category Definitions By Id category Definitions By Id boolean defined Activity Ids Changed false Set defined Activity Ids new Hash Set activity Definitions By Id key Set Set previously Defined Activity Ids null if defined Activity Ids equals this defined Activity Ids previously Defined Activity Ids this defined Activity Ids this defined Activity Ids defined Activity Ids defined Activity Ids Changed true boolean defined Category Ids Changed false Set defined Category Ids new Hash Set category Definitions By Id key Set Set previously Defined Category Ids null if defined Category Ids equals this defined Category Ids previously Defined Category Ids this defined Category Ids this defined Category Ids defined Category Ids defined Category Ids Changed true Set enabled Activity Ids new Hash Set this enabled Activity Ids get Required Activity Ids this enabled Activity Ids enabled Activity Ids boolean enabled Activity Ids Changed false Set previously Enabled Activity Ids null if this enabled Activity Ids equals enabled Activity Ids previously Enabled Activity Ids this enabled Activity Ids this enabled Activity Ids enabled Activity Ids enabled Activity Ids Changed true Map activity Events By Activity Id update Activities activities By Id key Set Map category Events By Category Id update Categories categories By Id key Set Map identifier Events By Identifier Id update Identifiers identifiers By Id key Set if defined Activity Ids Changed defined Category Ids Changed enabled Activity Ids Changed fire Activity Manager Changed new Activity Manager Event this defined Activity Ids Changed defined Category Ids Changed enabled Activity Ids Changed previously Defined Activity Ids previously Defined Category Ids previously Enabled Activity Ids if activity Events By Activity Id null notify Activities activity Events By Activity Id if category Events By Category Id null notify Categories category Events By Category Id if identifier Events By Identifier Id null notify Identifiers identifier Events By Identifier Id if set Defaults set Enabled Activity Ids new Hash Set activity Registry get Default Enabled Activities  readRegistry setDefaults activityDefinitions ArrayList activityDefinitions addAll activityRegistry getActivityDefinitions activityDefinitionsById HashMap ActivityDefinition activityDefinitionsById activityDefinitions activityDefinitionsById hasNext ActivityDefinition activityDefinition ActivityDefinition activityDefinition getName categoryDefinitions ArrayList categoryDefinitions addAll activityRegistry getCategoryDefinitions categoryDefinitionsById HashMap CategoryDefinition categoryDefinitionsById categoryDefinitions categoryDefinitionsById hasNext CategoryDefinition categoryDefinition CategoryDefinition categoryDefinition getName activityRequirementBindingDefinitionsByActivityId ActivityRequirementBindingDefinition activityRequirementBindingDefinitionsByActivityId activityRegistry getActivityRequirementBindingDefinitions activityRequirementBindingsByActivityId HashMap activityRequirementBindingDefinitionsByActivityId entrySet hasNext parentActivityId getKey activityDefinitionsById containsKey parentActivityId activityRequirementBindingDefinitions getValue activityRequirementBindingDefinitions activityRequirementBindingDefinitions hasNext ActivityRequirementBindingDefinition activityRequirementBindingDefinition ActivityRequirementBindingDefinition childActivityId activityRequirementBindingDefinition getRequiredActivityId activityDefinitionsById containsKey childActivityId IActivityRequirementBinding activityRequirementBinding ActivityRequirementBinding childActivityId parentActivityId activityRequirementBindings activityRequirementBindingsByActivityId parentActivityId activityRequirementBindings activityRequirementBindings HashSet activityRequirementBindingsByActivityId parentActivityId activityRequirementBindings activityRequirementBindings activityRequirementBinding activityPatternBindingDefinitionsByActivityId ActivityPatternBindingDefinition activityPatternBindingDefinitionsByActivityId activityRegistry getActivityPatternBindingDefinitions activityPatternBindingsByActivityId HashMap activityPatternBindingDefinitionsByActivityId entrySet hasNext activityId getKey activityDefinitionsById containsKey activityId activityPatternBindingDefinitions getValue activityPatternBindingDefinitions activityPatternBindingDefinitions hasNext ActivityPatternBindingDefinition activityPatternBindingDefinition ActivityPatternBindingDefinition activityPatternBindingDefinition getPattern IActivityPatternBinding activityPatternBinding ActivityPatternBinding activityId activityPatternBindings activityPatternBindingsByActivityId activityId activityPatternBindings activityPatternBindings HashSet activityPatternBindingsByActivityId activityId activityPatternBindings activityPatternBindings activityPatternBinding categoryActivityBindingDefinitionsByCategoryId CategoryActivityBindingDefinition categoryActivityBindingDefinitionsByCategoryId activityRegistry getCategoryActivityBindingDefinitions categoryActivityBindingsByCategoryId HashMap categoryActivityBindingDefinitionsByCategoryId entrySet hasNext categoryId getKey categoryDefinitionsById containsKey categoryId categoryActivityBindingDefinitions getValue categoryActivityBindingDefinitions categoryActivityBindingDefinitions hasNext CategoryActivityBindingDefinition categoryActivityBindingDefinition CategoryActivityBindingDefinition activityId categoryActivityBindingDefinition getActivityId activityDefinitionsById containsKey activityId ICategoryActivityBinding categoryActivityBinding CategoryActivityBinding activityId categoryId categoryActivityBindings categoryActivityBindingsByCategoryId categoryId categoryActivityBindings categoryActivityBindings HashSet categoryActivityBindingsByCategoryId categoryId categoryActivityBindings categoryActivityBindings categoryActivityBinding activityRequirementBindingsByActivityId activityRequirementBindingsByActivityId activityDefinitionsById activityDefinitionsById activityPatternBindingsByActivityId activityPatternBindingsByActivityId categoryActivityBindingsByCategoryId categoryActivityBindingsByCategoryId categoryDefinitionsById categoryDefinitionsById definedActivityIdsChanged definedActivityIds HashSet activityDefinitionsById keySet previouslyDefinedActivityIds definedActivityIds definedActivityIds previouslyDefinedActivityIds definedActivityIds definedActivityIds definedActivityIds definedActivityIdsChanged definedCategoryIdsChanged definedCategoryIds HashSet categoryDefinitionsById keySet previouslyDefinedCategoryIds definedCategoryIds definedCategoryIds previouslyDefinedCategoryIds definedCategoryIds definedCategoryIds definedCategoryIds definedCategoryIdsChanged enabledActivityIds HashSet enabledActivityIds getRequiredActivityIds enabledActivityIds enabledActivityIds enabledActivityIdsChanged previouslyEnabledActivityIds enabledActivityIds enabledActivityIds previouslyEnabledActivityIds enabledActivityIds enabledActivityIds enabledActivityIds enabledActivityIdsChanged activityEventsByActivityId updateActivities activitiesById keySet categoryEventsByCategoryId updateCategories categoriesById keySet identifierEventsByIdentifierId updateIdentifiers identifiersById keySet definedActivityIdsChanged definedCategoryIdsChanged enabledActivityIdsChanged fireActivityManagerChanged ActivityManagerEvent definedActivityIdsChanged definedCategoryIdsChanged enabledActivityIdsChanged previouslyDefinedActivityIds previouslyDefinedCategoryIds previouslyEnabledActivityIds activityEventsByActivityId notifyActivities activityEventsByActivityId categoryEventsByCategoryId notifyCategories categoryEventsByCategoryId identifierEventsByIdentifierId notifyIdentifiers identifierEventsByIdentifierId setDefaults setEnabledActivityIds HashSet activityRegistry getDefaultEnabledActivities
public void set Enabled Activity Ids Set enabled Activity Ids enabled Activity Ids Util safe Copy enabled Activity Ids String class Set required Activity Ids new Hash Set enabled Activity Ids get Required Activity Ids enabled Activity Ids required Activity Ids enabled Activity Ids required Activity Ids boolean activity Manager Changed false Map activity Events By Activity Id null Set previously Enabled Activity Ids null if this enabled Activity Ids equals enabled Activity Ids previously Enabled Activity Ids this enabled Activity Ids this enabled Activity Ids enabled Activity Ids activity Manager Changed true activity Events By Activity Id update Activities activities By Id key Set don t update identifiers if the enabled activity set has not changed if activity Manager Changed Map identifier Events By Identifier Id update Identifiers identifiers By Id key Set if identifier Events By Identifier Id null notify Identifiers identifier Events By Identifier Id if activity Events By Activity Id null notify Activities activity Events By Activity Id if activity Manager Changed fire Activity Manager Changed new Activity Manager Event this false false true null null previously Enabled Activity Ids  setEnabledActivityIds enabledActivityIds enabledActivityIds safeCopy enabledActivityIds requiredActivityIds HashSet enabledActivityIds getRequiredActivityIds enabledActivityIds requiredActivityIds enabledActivityIds requiredActivityIds activityManagerChanged activityEventsByActivityId previouslyEnabledActivityIds enabledActivityIds enabledActivityIds previouslyEnabledActivityIds enabledActivityIds enabledActivityIds enabledActivityIds activityManagerChanged activityEventsByActivityId updateActivities activitiesById keySet activityManagerChanged identifierEventsByIdentifierId updateIdentifiers identifiersById keySet identifierEventsByIdentifierId notifyIdentifiers identifierEventsByIdentifierId activityEventsByActivityId notifyActivities activityEventsByActivityId activityManagerChanged fireActivityManagerChanged ActivityManagerEvent previouslyEnabledActivityIds
private Map update Activities Collection activity Ids Map activity Events By Activity Id new Tree Map for Iterator iterator activity Ids iterator iterator has Next String activity Id String iterator next Activity activity Activity activities By Id get activity Id if activity null Activity Event activity Event update Activity activity if activity Event null activity Events By Activity Id put activity Id activity Event return activity Events By Activity Id  updateActivities activityIds activityEventsByActivityId TreeMap activityIds hasNext activityId activitiesById activityId ActivityEvent activityEvent updateActivity activityEvent activityEventsByActivityId activityId activityEvent activityEventsByActivityId
private Activity Event update Activity Activity activity Set activity Requirement Bindings Set activity Requirement Bindings By Activity Id get activity get Id boolean activity Requirement Bindings Changed activity set Activity Requirement Bindings activity Requirement Bindings null activity Requirement Bindings Collections EMPTY SET Set activity Pattern Bindings Set activity Pattern Bindings By Activity Id get activity get Id boolean activity Pattern Bindings Changed activity set Activity Pattern Bindings activity Pattern Bindings null activity Pattern Bindings Collections EMPTY SET Activity Definition activity Definition Activity Definition activity Definitions By Id get activity get Id boolean defined Changed activity set Defined activity Definition null boolean enabled Changed activity set Enabled enabled Activity Ids contains activity get Id boolean name Changed activity set Name activity Definition null activity Definition get Name null boolean description Changed activity set Description activity Definition null activity Definition get Description null if activity Requirement Bindings Changed activity Pattern Bindings Changed defined Changed enabled Changed name Changed description Changed return new Activity Event activity activity Requirement Bindings Changed activity Pattern Bindings Changed defined Changed description Changed enabled Changed name Changed else return null  ActivityEvent updateActivity activityRequirementBindings activityRequirementBindingsByActivityId getId activityRequirementBindingsChanged setActivityRequirementBindings activityRequirementBindings activityRequirementBindings EMPTY_SET activityPatternBindings activityPatternBindingsByActivityId getId activityPatternBindingsChanged setActivityPatternBindings activityPatternBindings activityPatternBindings EMPTY_SET ActivityDefinition activityDefinition ActivityDefinition activityDefinitionsById getId definedChanged setDefined activityDefinition enabledChanged setEnabled enabledActivityIds getId nameChanged setName activityDefinition activityDefinition getName descriptionChanged setDescription activityDefinition activityDefinition getDescription activityRequirementBindingsChanged activityPatternBindingsChanged definedChanged enabledChanged nameChanged descriptionChanged ActivityEvent activityRequirementBindingsChanged activityPatternBindingsChanged definedChanged descriptionChanged enabledChanged nameChanged
private Map update Categories Collection category Ids Map category Events By Category Id new Tree Map for Iterator iterator category Ids iterator iterator has Next String category Id String iterator next Category category Category categories By Id get category Id if category null Category Event category Event update Category category if category Event null category Events By Category Id put category Id category Event return category Events By Category Id  updateCategories categoryIds categoryEventsByCategoryId TreeMap categoryIds hasNext categoryId categoriesById categoryId CategoryEvent categoryEvent updateCategory categoryEvent categoryEventsByCategoryId categoryId categoryEvent categoryEventsByCategoryId
private Category Event update Category Category category Set category Activity Bindings Set category Activity Bindings By Category Id get category get Id boolean category Activity Bindings Changed category set Category Activity Bindings category Activity Bindings null category Activity Bindings Collections EMPTY SET Category Definition category Definition Category Definition category Definitions By Id get category get Id boolean defined Changed category set Defined category Definition null boolean name Changed category set Name category Definition null category Definition get Name null boolean description Changed category set Description category Definition null category Definition get Description null if category Activity Bindings Changed defined Changed name Changed description Changed return new Category Event category category Activity Bindings Changed defined Changed description Changed name Changed else return null  CategoryEvent updateCategory categoryActivityBindings categoryActivityBindingsByCategoryId getId categoryActivityBindingsChanged setCategoryActivityBindings categoryActivityBindings categoryActivityBindings EMPTY_SET CategoryDefinition categoryDefinition CategoryDefinition categoryDefinitionsById getId definedChanged setDefined categoryDefinition nameChanged setName categoryDefinition categoryDefinition getName descriptionChanged setDescription categoryDefinition categoryDefinition getDescription categoryActivityBindingsChanged definedChanged nameChanged descriptionChanged CategoryEvent categoryActivityBindingsChanged definedChanged descriptionChanged nameChanged
private Identifier Event update Identifier Identifier identifier TODO review performance characteristics String id identifier get Id Set activity Ids new Hash Set for Iterator iterator defined Activity Ids iterator iterator has Next String activity Id String iterator next Activity activity Activity get Activity activity Id if activity is Match id activity Ids add activity Id boolean enabled is Match id enabled Activity Ids is Match id defined Activity Ids boolean activity Ids Changed identifier set Activity Ids activity Ids boolean enabled Changed identifier set Enabled enabled if activity Ids Changed enabled Changed return new Identifier Event identifier activity Ids Changed enabled Changed else return null  IdentifierEvent updateIdentifier getId activityIds HashSet definedActivityIds hasNext activityId getActivity activityId isMatch activityIds activityId isMatch enabledActivityIds isMatch definedActivityIds activityIdsChanged setActivityIds activityIds enabledChanged setEnabled activityIdsChanged enabledChanged IdentifierEvent activityIdsChanged enabledChanged
private Map update Identifiers Collection identifier Ids Map identifier Events By Identifier Id new Tree Map for Iterator iterator identifier Ids iterator iterator has Next String identifier Id String iterator next Identifier identifier Identifier identifiers By Id get identifier Id if identifier null Identifier Event identifier Event update Identifier identifier if identifier Event null identifier Events By Identifier Id put identifier Id identifier Event return identifier Events By Identifier Id  updateIdentifiers identifierIds identifierEventsByIdentifierId TreeMap identifierIds hasNext identifierId identifiersById identifierId IdentifierEvent identifierEvent updateIdentifier identifierEvent identifierEventsByIdentifierId identifierId identifierEvent identifierEventsByIdentifierId

static Activity Requirement Binding Definition read Activity Requirement Binding Definition I Memento memento String source Id Override if memento null throw new Null Pointer Exception String child Activity Id memento get String TAG REQUIRED ACTIVITY ID String parent Activity Id memento get String TAG ACTIVITY ID String source Id source Id Override null source Id Override memento get String TAG SOURCE ID return new Activity Requirement Binding Definition child Activity Id parent Activity Id source Id  ActivityRequirementBindingDefinition readActivityRequirementBindingDefinition IMemento sourceIdOverride NullPointerException childActivityId getString TAG_REQUIRED_ACTIVITY_ID parentActivityId getString TAG_ACTIVITY_ID sourceId sourceIdOverride sourceIdOverride getString TAG_SOURCE_ID ActivityRequirementBindingDefinition childActivityId parentActivityId sourceId
static List read Activity Requirement Binding Definitions I Memento memento String name String source Id Override if memento null name null throw new Null Pointer Exception I Memento mementos memento get Children name if mementos null throw new Null Pointer Exception List list new Array List mementos length for int i 0 i mementos length i list add read Activity Requirement Binding Definition mementos i source Id Override return list  readActivityRequirementBindingDefinitions IMemento sourceIdOverride NullPointerException IMemento getChildren NullPointerException ArrayList readActivityRequirementBindingDefinition sourceIdOverride
static String read Default Enablement I Memento memento if memento null throw new Null Pointer Exception return memento get String TAG ID  readDefaultEnablement IMemento NullPointerException getString TAG_ID
static Activity Definition read Activity Definition I Memento memento String source Id Override if memento null throw new Null Pointer Exception String id memento get String TAG ID String name memento get String TAG NAME String description memento get String TAG DESCRIPTION String source Id source Id Override null source Id Override memento get String TAG SOURCE ID return new Activity Definition id name source Id description  ActivityDefinition readActivityDefinition IMemento sourceIdOverride NullPointerException getString TAG_ID getString TAG_NAME getString TAG_DESCRIPTION sourceId sourceIdOverride sourceIdOverride getString TAG_SOURCE_ID ActivityDefinition sourceId
static List read Activity Definitions I Memento memento String name String source Id Override if memento null name null throw new Null Pointer Exception I Memento mementos memento get Children name if mementos null throw new Null Pointer Exception List list new Array List mementos length for int i 0 i mementos length i list add read Activity Definition mementos i source Id Override return list  readActivityDefinitions IMemento sourceIdOverride NullPointerException IMemento getChildren NullPointerException ArrayList readActivityDefinition sourceIdOverride
static Activity Pattern Binding Definition read Activity Pattern Binding Definition I Memento memento String source Id Override if memento null throw new Null Pointer Exception String activity Id memento get String TAG ACTIVITY ID String pattern memento get String TAG PATTERN String source Id source Id Override null source Id Override memento get String TAG SOURCE ID return new Activity Pattern Binding Definition activity Id pattern source Id  ActivityPatternBindingDefinition readActivityPatternBindingDefinition IMemento sourceIdOverride NullPointerException activityId getString TAG_ACTIVITY_ID getString TAG_PATTERN sourceId sourceIdOverride sourceIdOverride getString TAG_SOURCE_ID ActivityPatternBindingDefinition activityId sourceId
static List read Activity Pattern Binding Definitions I Memento memento String name String source Id Override if memento null name null throw new Null Pointer Exception I Memento mementos memento get Children name if mementos null throw new Null Pointer Exception List list new Array List mementos length for int i 0 i mementos length i list add read Activity Pattern Binding Definition mementos i source Id Override return list  readActivityPatternBindingDefinitions IMemento sourceIdOverride NullPointerException IMemento getChildren NullPointerException ArrayList readActivityPatternBindingDefinition sourceIdOverride
static Category Activity Binding Definition read Category Activity Binding Definition I Memento memento String source Id Override if memento null throw new Null Pointer Exception String activity Id memento get String TAG ACTIVITY ID String category Id memento get String TAG CATEGORY ID String source Id source Id Override null source Id Override memento get String TAG SOURCE ID return new Category Activity Binding Definition activity Id category Id source Id  CategoryActivityBindingDefinition readCategoryActivityBindingDefinition IMemento sourceIdOverride NullPointerException activityId getString TAG_ACTIVITY_ID categoryId getString TAG_CATEGORY_ID sourceId sourceIdOverride sourceIdOverride getString TAG_SOURCE_ID CategoryActivityBindingDefinition activityId categoryId sourceId
static List read Category Activity Binding Definitions I Memento memento String name String source Id Override if memento null name null throw new Null Pointer Exception I Memento mementos memento get Children name if mementos null throw new Null Pointer Exception List list new Array List mementos length for int i 0 i mementos length i list add read Category Activity Binding Definition mementos i source Id Override return list  readCategoryActivityBindingDefinitions IMemento sourceIdOverride NullPointerException IMemento getChildren NullPointerException ArrayList readCategoryActivityBindingDefinition sourceIdOverride
static Category Definition read Category Definition I Memento memento String source Id Override if memento null throw new Null Pointer Exception String id memento get String TAG ID String name memento get String TAG NAME String description memento get String TAG DESCRIPTION String source Id source Id Override null source Id Override memento get String TAG SOURCE ID return new Category Definition id name source Id description  CategoryDefinition readCategoryDefinition IMemento sourceIdOverride NullPointerException getString TAG_ID getString TAG_NAME getString TAG_DESCRIPTION sourceId sourceIdOverride sourceIdOverride getString TAG_SOURCE_ID CategoryDefinition sourceId
static List read Category Definitions I Memento memento String name String source Id Override if memento null name null throw new Null Pointer Exception I Memento mementos memento get Children name if mementos null throw new Null Pointer Exception List list new Array List mementos length for int i 0 i mementos length i list add read Category Definition mementos i source Id Override return list  readCategoryDefinitions IMemento sourceIdOverride NullPointerException IMemento getChildren NullPointerException ArrayList readCategoryDefinition sourceIdOverride
static void write Activity Requirement Binding Definition I Memento memento Activity Requirement Binding Definition activity Requirement Binding Definition if memento null activity Requirement Binding Definition null throw new Null Pointer Exception memento put String TAG REQUIRED ACTIVITY ID activity Requirement Binding Definition get Required Activity Id memento put String TAG ACTIVITY ID activity Requirement Binding Definition get Activity Id memento put String TAG SOURCE ID activity Requirement Binding Definition get Source Id  writeActivityRequirementBindingDefinition IMemento ActivityRequirementBindingDefinition activityRequirementBindingDefinition activityRequirementBindingDefinition NullPointerException putString TAG_REQUIRED_ACTIVITY_ID activityRequirementBindingDefinition getRequiredActivityId putString TAG_ACTIVITY_ID activityRequirementBindingDefinition getActivityId putString TAG_SOURCE_ID activityRequirementBindingDefinition getSourceId
static void write Activity Requirement Binding Definitions I Memento memento String name List activity Requirement Binding Definitions if memento null name null activity Requirement Binding Definitions null throw new Null Pointer Exception activity Requirement Binding Definitions new Array List activity Requirement Binding Definitions Iterator iterator activity Requirement Binding Definitions iterator while iterator has Next Util assert Instance iterator next Activity Requirement Binding Definition class iterator activity Requirement Binding Definitions iterator while iterator has Next write Activity Requirement Binding Definition memento create Child name Activity Requirement Binding Definition iterator next  writeActivityRequirementBindingDefinitions IMemento activityRequirementBindingDefinitions activityRequirementBindingDefinitions NullPointerException activityRequirementBindingDefinitions ArrayList activityRequirementBindingDefinitions activityRequirementBindingDefinitions hasNext assertInstance ActivityRequirementBindingDefinition activityRequirementBindingDefinitions hasNext writeActivityRequirementBindingDefinition createChild ActivityRequirementBindingDefinition
static void write Activity Definition I Memento memento Activity Definition activity Definition if memento null activity Definition null throw new Null Pointer Exception memento put String TAG ID activity Definition get Id memento put String TAG NAME activity Definition get Name memento put String TAG SOURCE ID activity Definition get Source Id  writeActivityDefinition IMemento ActivityDefinition activityDefinition activityDefinition NullPointerException putString TAG_ID activityDefinition getId putString TAG_NAME activityDefinition getName putString TAG_SOURCE_ID activityDefinition getSourceId
static void write Activity Definitions I Memento memento String name List activity Definitions if memento null name null activity Definitions null throw new Null Pointer Exception activity Definitions new Array List activity Definitions Iterator iterator activity Definitions iterator while iterator has Next Util assert Instance iterator next Activity Definition class iterator activity Definitions iterator while iterator has Next write Activity Definition memento create Child name Activity Definition iterator next  writeActivityDefinitions IMemento activityDefinitions activityDefinitions NullPointerException activityDefinitions ArrayList activityDefinitions activityDefinitions hasNext assertInstance ActivityDefinition activityDefinitions hasNext writeActivityDefinition createChild ActivityDefinition
static void write Activity Pattern Binding Definition I Memento memento Activity Pattern Binding Definition activity Pattern Binding Definition if memento null activity Pattern Binding Definition null throw new Null Pointer Exception memento put String TAG ACTIVITY ID activity Pattern Binding Definition get Activity Id memento put String TAG PATTERN activity Pattern Binding Definition get Pattern memento put String TAG SOURCE ID activity Pattern Binding Definition get Source Id  writeActivityPatternBindingDefinition IMemento ActivityPatternBindingDefinition activityPatternBindingDefinition activityPatternBindingDefinition NullPointerException putString TAG_ACTIVITY_ID activityPatternBindingDefinition getActivityId putString TAG_PATTERN activityPatternBindingDefinition getPattern putString TAG_SOURCE_ID activityPatternBindingDefinition getSourceId
static void write Activity Pattern Binding Definitions I Memento memento String name List activity Pattern Binding Definitions if memento null name null activity Pattern Binding Definitions null throw new Null Pointer Exception activity Pattern Binding Definitions new Array List activity Pattern Binding Definitions Iterator iterator activity Pattern Binding Definitions iterator while iterator has Next Util assert Instance iterator next Activity Pattern Binding Definition class iterator activity Pattern Binding Definitions iterator while iterator has Next write Activity Pattern Binding Definition memento create Child name Activity Pattern Binding Definition iterator next  writeActivityPatternBindingDefinitions IMemento activityPatternBindingDefinitions activityPatternBindingDefinitions NullPointerException activityPatternBindingDefinitions ArrayList activityPatternBindingDefinitions activityPatternBindingDefinitions hasNext assertInstance ActivityPatternBindingDefinition activityPatternBindingDefinitions hasNext writeActivityPatternBindingDefinition createChild ActivityPatternBindingDefinition
static void write Category Activity Binding Definition I Memento memento Category Activity Binding Definition category Activity Binding Definition if memento null category Activity Binding Definition null throw new Null Pointer Exception memento put String TAG ACTIVITY ID category Activity Binding Definition get Activity Id memento put String TAG CATEGORY ID category Activity Binding Definition get Category Id memento put String TAG SOURCE ID category Activity Binding Definition get Source Id  writeCategoryActivityBindingDefinition IMemento CategoryActivityBindingDefinition categoryActivityBindingDefinition categoryActivityBindingDefinition NullPointerException putString TAG_ACTIVITY_ID categoryActivityBindingDefinition getActivityId putString TAG_CATEGORY_ID categoryActivityBindingDefinition getCategoryId putString TAG_SOURCE_ID categoryActivityBindingDefinition getSourceId
static void write Category Activity Binding Definitions I Memento memento String name List category Activity Binding Definitions if memento null name null category Activity Binding Definitions null throw new Null Pointer Exception category Activity Binding Definitions new Array List category Activity Binding Definitions Iterator iterator category Activity Binding Definitions iterator while iterator has Next Util assert Instance iterator next Category Activity Binding Definition class iterator category Activity Binding Definitions iterator while iterator has Next write Category Activity Binding Definition memento create Child name Category Activity Binding Definition iterator next  writeCategoryActivityBindingDefinitions IMemento categoryActivityBindingDefinitions categoryActivityBindingDefinitions NullPointerException categoryActivityBindingDefinitions ArrayList categoryActivityBindingDefinitions categoryActivityBindingDefinitions hasNext assertInstance CategoryActivityBindingDefinition categoryActivityBindingDefinitions hasNext writeCategoryActivityBindingDefinition createChild CategoryActivityBindingDefinition
static void write Category Definition I Memento memento Category Definition category Definition if memento null category Definition null throw new Null Pointer Exception memento put String TAG ID category Definition get Id memento put String TAG NAME category Definition get Name memento put String TAG SOURCE ID category Definition get Source Id  writeCategoryDefinition IMemento CategoryDefinition categoryDefinition categoryDefinition NullPointerException putString TAG_ID categoryDefinition getId putString TAG_NAME categoryDefinition getName putString TAG_SOURCE_ID categoryDefinition getSourceId
static void write Category Definitions I Memento memento String name List category Definitions if memento null name null category Definitions null throw new Null Pointer Exception category Definitions new Array List category Definitions Iterator iterator category Definitions iterator while iterator has Next Util assert Instance iterator next Category Definition class iterator category Definitions iterator while iterator has Next write Category Definition memento create Child name Category Definition iterator next  writeCategoryDefinitions IMemento categoryDefinitions categoryDefinitions NullPointerException categoryDefinitions ArrayList categoryDefinitions categoryDefinitions hasNext assertInstance CategoryDefinition categoryDefinitions hasNext writeCategoryDefinition createChild CategoryDefinition
private Persistence no op 

add Activity Manager Listener new I Activity Manager Listener public void activity Manager Changed Activity Manager Event activity Manager Event Activity Manager Event proxy Activity Manager Event new Activity Manager Event Proxy Activity Manager this activity Manager Event have Defined Activity Ids Changed activity Manager Event have Defined Category Ids Changed activity Manager Event have Enabled Activity Ids Changed activity Manager Event get Previously Defined Activity Ids activity Manager Event get Previously Defined Category Ids activity Manager Event get Previously Enabled Activity Ids fire Activity Manager Changed proxy Activity Manager Event  addActivityManagerListener IActivityManagerListener activityManagerChanged ActivityManagerEvent activityManagerEvent ActivityManagerEvent proxyActivityManagerEvent ActivityManagerEvent ProxyActivityManager activityManagerEvent haveDefinedActivityIdsChanged activityManagerEvent haveDefinedCategoryIdsChanged activityManagerEvent haveEnabledActivityIdsChanged activityManagerEvent getPreviouslyDefinedActivityIds activityManagerEvent getPreviouslyDefinedCategoryIds activityManagerEvent getPreviouslyEnabledActivityIds fireActivityManagerChanged proxyActivityManagerEvent
public Proxy Activity Manager I Activity Manager activity Manager if activity Manager null throw new Null Pointer Exception this activity Manager activity Manager this activity Manager add Activity Manager Listener new I Activity Manager Listener public void activity Manager Changed Activity Manager Event activity Manager Event Activity Manager Event proxy Activity Manager Event new Activity Manager Event Proxy Activity Manager this activity Manager Event have Defined Activity Ids Changed activity Manager Event have Defined Category Ids Changed activity Manager Event have Enabled Activity Ids Changed activity Manager Event get Previously Defined Activity Ids activity Manager Event get Previously Defined Category Ids activity Manager Event get Previously Enabled Activity Ids fire Activity Manager Changed proxy Activity Manager Event  ProxyActivityManager IActivityManager activityManager activityManager NullPointerException activityManager activityManager activityManager addActivityManagerListener IActivityManagerListener activityManagerChanged ActivityManagerEvent activityManagerEvent ActivityManagerEvent proxyActivityManagerEvent ActivityManagerEvent ProxyActivityManager activityManagerEvent haveDefinedActivityIdsChanged activityManagerEvent haveDefinedCategoryIdsChanged activityManagerEvent haveEnabledActivityIdsChanged activityManagerEvent getPreviouslyDefinedActivityIds activityManagerEvent getPreviouslyDefinedCategoryIds activityManagerEvent getPreviouslyEnabledActivityIds fireActivityManagerChanged proxyActivityManagerEvent
public I Activity get Activity String activity Id return activity Manager get Activity activity Id  IActivity getActivity activityId activityManager getActivity activityId
public I Category get Category String category Id return activity Manager get Category category Id  ICategory getCategory categoryId activityManager getCategory categoryId
public Set get Defined Activity Ids return activity Manager get Defined Activity Ids  getDefinedActivityIds activityManager getDefinedActivityIds
public Set get Defined Category Ids return activity Manager get Defined Category Ids  getDefinedCategoryIds activityManager getDefinedCategoryIds
public Set get Enabled Activity Ids return activity Manager get Enabled Activity Ids  getEnabledActivityIds activityManager getEnabledActivityIds
public I Identifier get Identifier String identifier Id return activity Manager get Identifier identifier Id  IIdentifier getIdentifier identifierId activityManager getIdentifier identifierId

see org eclipse jface viewers I Content Provider dispose public void dispose manager null  IContentProvider
param category the category to fetch return all activities in the category private I Activity get Category Activities I Category category Set activity Bindings category get Category Activity Bindings List category Activities new Array List activity Bindings size for Iterator j activity Bindings iterator j has Next I Category Activity Binding binding I Category Activity Binding j next String activity Id binding get Activity Id I Activity activity manager get Activity activity Id if activity is Defined category Activities add new Categorized Activity category activity return I Activity category Activities to Array new I Activity category Activities size  IActivity getCategoryActivities ICategory activityBindings getCategoryActivityBindings categoryActivities ArrayList activityBindings activityBindings hasNext ICategoryActivityBinding ICategoryActivityBinding activityId getActivityId IActivity getActivity activityId isDefined categoryActivities CategorizedActivity IActivity categoryActivities toArray IActivity categoryActivities
public Object get Children Object parent Element if parent Element instanceof I Activity Manager Set category Ids manager get Defined Category Ids Array List categories new Array List category Ids size for Iterator i category Ids iterator i has Next String category Id String i next categories add manager get Category category Id return categories to Array else if parent Element instanceof I Category return get Category Activities I Category parent Element return new Object 0  getChildren parentElement parentElement IActivityManager categoryIds getDefinedCategoryIds ArrayList ArrayList categoryIds categoryIds hasNext categoryId getCategory categoryId toArray parentElement ICategory getCategoryActivities ICategory parentElement
see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return get Children input Element  IStructuredContentProvider getElements getElements inputElement getChildren inputElement
public Object get Parent Object element if element instanceof Categorized Activity return Categorized Activity element get Category return null  getParent CategorizedActivity CategorizedActivity getCategory
public boolean has Children Object element if element instanceof I Activity Manager element instanceof I Category return true return false  hasChildren IActivityManager ICategory
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input manager I Activity Manager new Input  IContentProvider inputChanged inputChanged oldInput newInput IActivityManager newInput

public Image get Image Object element if element instanceof I Category return Workbench Images get Image I Workbench Graphic Constants IMG OBJ ACTIVITY CATEGORY else return Workbench Images get Image I Workbench Graphic Constants IMG OBJ ACTIVITY  getImage ICategory WorkbenchImages getImage IWorkbenchGraphicConstants IMG_OBJ_ACTIVITY_CATEGORY WorkbenchImages getImage IWorkbenchGraphicConstants IMG_OBJ_ACTIVITY
public String get Text Object element if element instanceof I Activity I Activity activity I Activity element try return activity get Name catch Not Defined Exception e return activity get Id else if element instanceof I Category I Category category I Category element try return category get Name catch Not Defined Exception e return category get Id return super get Text element  getText IActivity IActivity IActivity getName NotDefinedException getId ICategory ICategory ICategory getName NotDefinedException getId getText

since 3 0 public Activity Content Provider  ActivityContentProvider
see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider
public Object get Elements Object input Element Object activities new Object 0 if input Element instanceof I Activity Manager activities I Activity Manager input Element get Defined Activity Ids to Array else if input Element instanceof Collection activities Collection input Element to Array return activities  getElements inputElement inputElement IActivityManager IActivityManager inputElement getDefinedActivityIds toArray inputElement inputElement toArray
java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput

public void selection Changed Selection Changed Event event Object element I Structured Selection event get Selection get First Element try if element instanceof I Category description Text set Text I Category element get Description else if element instanceof I Activity description Text set Text I Activity element get Description catch Not Defined Exception e description Text set Text NON NLS 1  selectionChanged SelectionChangedEvent IStructuredSelection getSelection getFirstElement ICategory descriptionText setText ICategory getDescription IActivity descriptionText setText IActivity getDescription NotDefinedException descriptionText setText
public void check State Changed Check State Changed Event event Set checked new Hash Set Arrays as List dual Viewer get Checked Elements Object element event get Element if element instanceof I Category clicking on a category should enable disable all activities within it dual Viewer set Subtree Checked element event get Checked the state of the category is alwas absolute after clicking on it Never gray dual Viewer set Grayed element false else clicking on an activity can potential change the check gray state of its category Categorized Activity proxy Categorized Activity element Object children provider get Children proxy get Category int state NONE int count 0 for int i 0 i children length i if checked contains children i count if count children length state ALL else if count 0 state SOME if state NONE checked remove proxy get Category else checked add proxy get Category dual Viewer set Grayed proxy get Category state SOME dual Viewer set Checked Elements checked to Array  checkStateChanged CheckStateChangedEvent HashSet asList dualViewer getCheckedElements getElement ICategory dualViewer setSubtreeChecked getChecked dualViewer setGrayed CategorizedActivity CategorizedActivity getChildren getCategory getCategory getCategory dualViewer setGrayed getCategory dualViewer setCheckedElements toArray
Create a new instance param activity Support the code I Workbench Activity Support code from which to draw the code I Activity Manager code public Activity Enabler I Workbench Activity Support activity Support this activity Support activity Support  activitySupport IWorkbenchActivitySupport IActivityManager ActivityEnabler IWorkbenchActivitySupport activitySupport activitySupport activitySupport
Create the controls param parent the parent in which to create the controls return the composite in which the controls exist public Control create Control Composite parent Composite main Composite new Composite parent SWT NONE Grid Layout grid Layout new Grid Layout 1 false grid Layout margin Height 0 grid Layout margin Width 0 main Composite set Layout grid Layout Composite c new Composite main Composite SWT NONE c set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout grid Layout new Grid Layout 1 true grid Layout margin Height 0 grid Layout margin Width 0 c set Layout grid Layout Label label new Label c SWT NONE label set Text Activity Messages get String Activity Enabler activities NON NLS 1 label set Layout Data new Grid Data Grid Data FILL HORIZONTAL label set Font parent get Font dual Viewer new Checkbox Tree Viewer c dual Viewer set Sorter new Viewer Sorter dual Viewer set Auto Expand Level Abstract Tree Viewer ALL LEVELS dual Viewer set Label Provider new Activity Category Label Provider dual Viewer set Content Provider provider dual Viewer set Input activity Support get Activity Manager Grid Data data new Grid Data Grid Data FILL HORIZONTAL GC gc new GC dual Viewer get Control gc set Font parent get Font ensure that the viewer is big enough but no so big in the case where the dialog font is large data height Hint Math min Dialog convert Height In Chars To Pixels gc get Font Metrics 18 200 gc dispose dual Viewer get Control set Layout Data data dual Viewer get Control set Font parent get Font c new Composite main Composite SWT NONE c set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout grid Layout new Grid Layout 1 true grid Layout margin Height 0 grid Layout margin Width 0 c set Layout grid Layout label new Label c SWT NONE label set Text Activity Messages get String Activity Enabler description NON NLS 1 label set Layout Data new Grid Data Grid Data FILL HORIZONTAL label set Font parent get Font description Text new Text c SWT READ ONLY SWT WRAP SWT BORDER SWT V SCROLL description Text set Font parent get Font description Text set Layout Data new Grid Data Grid Data FILL BOTH Grid Data VERTICAL ALIGN BEGINNING set Initial States dual Viewer add Check State Listener check Listener dual Viewer add Selection Changed Listener selection Listener dual Viewer set Selection new Structured Selection return main Composite  createControl mainComposite GridLayout gridLayout GridLayout gridLayout marginHeight gridLayout marginWidth mainComposite setLayout gridLayout mainComposite setLayoutData GridData GridData FILL_HORIZONTAL GridLayout gridLayout GridLayout gridLayout marginHeight gridLayout marginWidth setLayout gridLayout setText ActivityMessages getString ActivityEnabler setLayoutData GridData GridData FILL_HORIZONTAL setFont getFont dualViewer CheckboxTreeViewer dualViewer setSorter ViewerSorter dualViewer setAutoExpandLevel AbstractTreeViewer ALL_LEVELS dualViewer setLabelProvider ActivityCategoryLabelProvider dualViewer setContentProvider dualViewer setInput activitySupport getActivityManager GridData GridData GridData FILL_HORIZONTAL dualViewer getControl setFont getFont heightHint convertHeightInCharsToPixels getFontMetrics dualViewer getControl setLayoutData dualViewer getControl setFont getFont mainComposite setLayoutData GridData GridData FILL_BOTH GridLayout gridLayout GridLayout gridLayout marginHeight gridLayout marginWidth setLayout gridLayout setText ActivityMessages getString ActivityEnabler setLayoutData GridData GridData FILL_HORIZONTAL setFont getFont descriptionText READ_ONLY V_SCROLL descriptionText setFont getFont descriptionText setLayoutData GridData GridData FILL_BOTH GridData VERTICAL_ALIGN_BEGINNING setInitialStates dualViewer addCheckStateListener checkListener dualViewer addSelectionChangedListener selectionListener dualViewer setSelection StructuredSelection mainComposite
param category Id the id to fetch return return all ids for activities that are in the given in the category private Collection get Category Activity Ids String category Id I Category category activity Support get Activity Manager get Category category Id Set activity Bindings category get Category Activity Bindings List category Activities new Array List activity Bindings size for Iterator i activity Bindings iterator i has Next I Category Activity Binding binding I Category Activity Binding i next String activity Id binding get Activity Id category Activities add activity Id return category Activities  categoryId getCategoryActivityIds categoryId ICategory activitySupport getActivityManager getCategory categoryId activityBindings getCategoryActivityBindings categoryActivities ArrayList activityBindings activityBindings hasNext ICategoryActivityBinding ICategoryActivityBinding activityId getActivityId categoryActivities activityId categoryActivities
Set the enabled category activity check grey states based on initial activity enablement private void set Initial States Set enabled Activities activity Support get Activity Manager get Enabled Activity Ids set Enabled States enabled Activities  setInitialStates enabledActivities activitySupport getActivityManager getEnabledActivityIds setEnabledStates enabledActivities
private void set Enabled States Set enabled Activities Set categories activity Support get Activity Manager get Defined Category Ids List checked new Array List 10 grayed new Array List 10 for Iterator i categories iterator i has Next String category Id String i next I Category category activity Support get Activity Manager get Category category Id int state NONE Collection activities get Category Activity Ids category Id int found Count 0 for Iterator j activities iterator j has Next String activity Id String j next managed Activities add activity Id if enabled Activities contains activity Id I Activity activity activity Support get Activity Manager get Activity activity Id checked add new Categorized Activity category activity add activity proxy found Count if found Count activities size state ALL else if found Count 0 state SOME if state NONE continue checked add category if state SOME grayed add category dual Viewer set Checked Elements checked to Array dual Viewer set Grayed Elements grayed to Array  setEnabledStates enabledActivities activitySupport getActivityManager getDefinedCategoryIds ArrayList ArrayList hasNext categoryId ICategory activitySupport getActivityManager getCategory categoryId getCategoryActivityIds categoryId foundCount hasNext activityId managedActivities activityId enabledActivities activityId IActivity activitySupport getActivityManager getActivity activityId CategorizedActivity foundCount foundCount foundCount dualViewer setCheckedElements toArray dualViewer setGrayedElements toArray
Update activity enablement based on the check states of activities in the tree public void update Activity States Set enabled Activities new Hash Set activity Support get Activity Manager get Enabled Activity Ids remove all but the unmanaged activities if any enabled Activities remove All managed Activities Object checked dual Viewer get Checked Elements for int i 0 i checked length i Object element checked i if element instanceof I Category dual Viewer get Grayed element continue enabled Activities add I Activity element get Id activity Support set Enabled Activity Ids enabled Activities  updateActivityStates enabledActivities HashSet activitySupport getActivityManager getEnabledActivityIds enabledActivities removeAll managedActivities dualViewer getCheckedElements ICategory dualViewer getGrayed enabledActivities IActivity getId activitySupport setEnabledActivityIds enabledActivities
Restore the default activity states public void restore Defaults we have to read the platform registry because we do not have access to the activity registry This illustrates a shortcoming in the API that should be addressed post 3 0 See bug 61905 Set default Enabled new Hash Set I Configuration Element configuration Elements Platform get Extension Registry get Configuration Elements For org eclipse ui activities NON NLS 1 for int i 0 i configuration Elements length i if configuration Elements i get Name equals default Enablement NON NLS 1 String id configuration Elements i get Attribute id NON NLS 1 if id null default Enabled add id set Enabled States default Enabled  restoreDefaults defaultEnabled HashSet IConfigurationElement configurationElements getExtensionRegistry getConfigurationElementsFor configurationElements configurationElements getName defaultEnablement configurationElements getAttribute defaultEnabled setEnabledStates defaultEnabled

Create a new instance of the receiver param activity Manager since 3 0 public Activity Label Provider I Activity Manager activity Manager this activity Manager activity Manager  activityManager ActivityLabelProvider IActivityManager activityManager activityManager activityManager
param activity return private String get Activity Text I Activity activity try return activity get Name catch Not Defined Exception e return activity get Id  getActivityText IActivity getName NotDefinedException getId
see org eclipse jface viewers I Label Provider get Image java lang Object public Image get Image Object element return null  ILabelProvider getImage getImage
public String get Text Object element if element instanceof String return get Activity Text activity Manager get Activity String element else if element instanceof I Activity return get Activity Text I Activity element else throw new Illegal Argument Exception  getText getActivityText activityManager getActivity IActivity getActivityText IActivity IllegalArgumentException

Resource Bundle get Bundle BUNDLE NAME Get the value of String param key return String public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  ResourceBundle getBundle BUNDLE_NAME getString RESOURCE_BUNDLE getString MissingResourceException
Create the activity messages private Activity Messages  ActivityMessages

public boolean select Viewer viewer Object parent Element Object element if Workbench Activity Helper filter Item element set Has Encountered Filtered Item true return false return true  parentElement WorkbenchActivityHelper filterItem setHasEncounteredFilteredItem
return returns whether the filter has filtered an item public boolean get Has Encountered Filtered Item return has Encountered Filtered Item  getHasEncounteredFilteredItem hasEncounteredFilteredItem
param sets whether the filter has filtered an item public void set Has Encountered Filtered Item boolean has Encountered Filtered Item this has Encountered Filtered Item has Encountered Filtered Item  setHasEncounteredFilteredItem hasEncounteredFilteredItem hasEncounteredFilteredItem hasEncounteredFilteredItem

Create a new instance param category the code I Category code under which this proxy will be rendered param activity the real code I Activity code public Categorized Activity I Category category I Activity activity this activity activity this category category  ICategory IActivity CategorizedActivity ICategory IActivity
see org eclipse ui activities I Activity add Activity Listener org eclipse ui activities I Activity Listener public void add Activity Listener I Activity Listener activity Listener activity add Activity Listener activity Listener  IActivity addActivityListener IActivityListener addActivityListener IActivityListener activityListener addActivityListener activityListener
see java lang Comparable compare To java lang Object public int compare To Object o return activity compare To o  compareTo compareTo compareTo
public boolean equals Object o if o instanceof Categorized Activity if Categorized Activity o get Category equals get Category return Categorized Activity o get Activity equals get Activity return false  CategorizedActivity CategorizedActivity getCategory getCategory CategorizedActivity getActivity getActivity
return returns the code I Activity code public I Activity get Activity return activity  IActivity IActivity getActivity
see org eclipse ui activities I Activity get Activity Requirement Bindings public Set get Activity Requirement Bindings return activity get Activity Requirement Bindings  IActivity getActivityRequirementBindings getActivityRequirementBindings getActivityRequirementBindings
see org eclipse ui activities I Activity get Activity Pattern Bindings public Set get Activity Pattern Bindings return activity get Activity Pattern Bindings  IActivity getActivityPatternBindings getActivityPatternBindings getActivityPatternBindings
return returns the code I Category code public I Category get Category return category  ICategory ICategory getCategory
see org eclipse ui activities I Activity get Id public String get Id return activity get Id  IActivity getId getId getId
see org eclipse ui activities I Activity get Name public String get Name throws Not Defined Exception return activity get Name  IActivity getName getName NotDefinedException getName
see java lang Object hash Code public int hash Code return activity hash Code  hashCode hashCode hashCode
see org eclipse ui activities I Activity is Defined public boolean is Defined return activity is Defined  IActivity isDefined isDefined isDefined
see org eclipse ui activities I Activity is Enabled public boolean is Enabled return activity is Enabled  IActivity isEnabled isEnabled isEnabled
see org eclipse ui activities I Activity remove Activity Listener org eclipse ui activities I Activity Listener public void remove Activity Listener I Activity Listener activity Listener activity remove Activity Listener activity Listener  IActivity removeActivityListener IActivityListener removeActivityListener IActivityListener activityListener removeActivityListener activityListener
see java lang Object to String public String to String return category get Id activity get Id NON NLS 1  toString toString getId getId
see org eclipse ui activities I Activity get Description public String get Description throws Not Defined Exception return activity get Description  IActivity getDescription getDescription NotDefinedException getDescription

Create a new instance of the reciever param parent Shell the parent shell param activity Ids the candidate activities public Enablement Dialog Shell parent Shell Collection activity Ids super parent Shell this activity Ids activity Ids  parentShell activityIds EnablementDialog parentShell activityIds parentShell activityIds activityIds
public void check State Changed Check State Changed Event event if event get Checked activities To Enable add event get Element else activities To Enable remove event get Element get Button Window OK set Enabled activities To Enable is Empty  checkStateChanged CheckStateChangedEvent getChecked activitiesToEnable getElement activitiesToEnable getElement getButton setEnabled activitiesToEnable isEmpty
see org eclipse jface viewers I Selection Changed Listener selection Changed org eclipse jface viewers Selection Changed Event public void selection Changed Selection Changed Event event selected Activity String I Structured Selection event get Selection get First Element set Details  ISelectionChangedListener selectionChanged SelectionChangedEvent selectionChanged SelectionChangedEvent selectedActivity IStructuredSelection getSelection getFirstElement setDetails
protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent Font dialog Font parent get Font composite set Font dialog Font Label text new Label composite SWT NONE text set Layout Data new Grid Data Grid Data FILL HORIZONTAL text set Font dialog Font I Activity Manager manager PlatformUI get Workbench get Activity Support get Activity Manager if activity Ids size 1 String activity Id String activity Ids iterator next activities To Enable add activity Id selected Activity activity Id I Activity activity manager get Activity activity Id String activity Text try activity Text activity get Name catch Not Defined Exception e activity Text activity get Id text set Text Message Format format RESOURCE BUNDLE get String requires Single NON NLS 1 new Object activity Text text new Label composite SWT NONE text set Text RESOURCE BUNDLE get String proceed Single NON NLS 1 text set Layout Data new Grid Data Grid Data FILL HORIZONTAL text set Font dialog Font else text set Text RESOURCE BUNDLE get String requires Multi NON NLS 1 Set activity Ids Copy new Hash Set activity Ids Checkbox Table Viewer viewer new Checkbox Table Viewer composite SWT CHECK SWT BORDER SWT SINGLE viewer set Content Provider new Activity Content Provider viewer set Label Provider new Activity Label Provider manager viewer set Input activity Ids Copy viewer set Checked Elements activity Ids Copy to Array viewer add Check State Listener new I Check State Listener non Javadoc see org eclipse jface viewers I Check State Listener check State Changed org eclipse jface viewers Check State Changed Event public void check State Changed Check State Changed Event event if event get Checked activities To Enable add event get Element else activities To Enable remove event get Element get Button Window OK set Enabled activities To Enable is Empty viewer add Selection Changed Listener new I Selection Changed Listener non Javadoc see org eclipse jface viewers I Selection Changed Listener selection Changed org eclipse jface viewers Selection Changed Event public void selection Changed Selection Changed Event event selected Activity String I Structured Selection event get Selection get First Element set Details activities To Enable add All activity Ids Copy viewer get Control set Layout Data new Grid Data Grid Data FILL HORIZONTAL viewer get Control set Font dialog Font text new Label composite SWT NONE text set Text RESOURCE BUNDLE get String proceed Multi NON NLS 1 text set Layout Data new Grid Data Grid Data FILL HORIZONTAL text set Font dialog Font Label seperator new Label composite SWT SEPARATOR SWT HORIZONTAL seperator set Layout Data new Grid Data Grid Data FILL HORIZONTAL dont Ask Button new Button composite SWT CHECK dont Ask Button set Selection false dont Ask Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL dont Ask Button set Text RESOURCE BUNDLE get String dont Ask NON NLS 1 dont Ask Button set Font dialog Font details Composite new Composite composite SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 details Composite set Layout layout details Label new Label details Composite SWT NONE details Label set Layout Data new Grid Data Grid Data FILL HORIZONTAL details Label set Font dialog Font details Text new Text details Composite SWT WRAP SWT V SCROLL SWT BORDER SWT READ ONLY details Text set Layout Data new Grid Data Grid Data FILL BOTH details Text set Font dialog Font set Details Grid Data data new Grid Data Grid Data FILL BOTH details Composite set Layout Data data set Detail Hints return composite  createDialogArea createDialogArea dialogFont getFont setFont dialogFont setLayoutData GridData GridData FILL_HORIZONTAL setFont dialogFont IActivityManager getWorkbench getActivitySupport getActivityManager activityIds activityId activityIds activitiesToEnable activityId selectedActivity activityId IActivity getActivity activityId activityText activityText getName NotDefinedException activityText getId setText MessageFormat RESOURCE_BUNDLE getString requiresSingle activityText setText RESOURCE_BUNDLE getString proceedSingle setLayoutData GridData GridData FILL_HORIZONTAL setFont dialogFont setText RESOURCE_BUNDLE getString requiresMulti activityIdsCopy HashSet activityIds CheckboxTableViewer CheckboxTableViewer setContentProvider ActivityContentProvider setLabelProvider ActivityLabelProvider setInput activityIdsCopy setCheckedElements activityIdsCopy toArray addCheckStateListener ICheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent checkStateChanged CheckStateChangedEvent getChecked activitiesToEnable getElement activitiesToEnable getElement getButton setEnabled activitiesToEnable isEmpty addSelectionChangedListener ISelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent selectionChanged SelectionChangedEvent selectedActivity IStructuredSelection getSelection getFirstElement setDetails activitiesToEnable addAll activityIdsCopy getControl setLayoutData GridData GridData FILL_HORIZONTAL getControl setFont dialogFont setText RESOURCE_BUNDLE getString proceedMulti setLayoutData GridData GridData FILL_HORIZONTAL setFont dialogFont setLayoutData GridData GridData FILL_HORIZONTAL dontAskButton dontAskButton setSelection dontAskButton setLayoutData GridData GridData FILL_HORIZONTAL dontAskButton setText RESOURCE_BUNDLE getString dontAsk dontAskButton setFont dialogFont detailsComposite GridLayout GridLayout marginHeight marginWidth detailsComposite setLayout detailsLabel detailsComposite detailsLabel setLayoutData GridData GridData FILL_HORIZONTAL detailsLabel setFont dialogFont detailsText detailsComposite V_SCROLL READ_ONLY detailsText setLayoutData GridData GridData FILL_BOTH detailsText setFont dialogFont setDetails GridData GridData GridData FILL_BOTH detailsComposite setLayoutData setDetailHints
Set the text of the detail label and text area protected void set Details if selected Activity null details Label set Text RESOURCE BUNDLE get String no Details NON NLS 1 details Text set Text NON NLS 1 else I Activity activity PlatformUI get Workbench get Activity Support get Activity Manager get Activity selected Activity String name try name activity get Name catch Not Defined Exception e1 name selected Activity String desc try desc activity get Description catch Not Defined Exception e desc RESOURCE BUNDLE get String no Desc Available NON NLS 1 details Label set Text Message Format format RESOURCE BUNDLE get String details Label new Object name NON NLS 1 details Text set Text desc  setDetails selectedActivity detailsLabel setText RESOURCE_BUNDLE getString noDetails detailsText setText IActivity getWorkbench getActivitySupport getActivityManager getActivity selectedActivity getName NotDefinedException selectedActivity getDescription NotDefinedException RESOURCE_BUNDLE getString noDescAvailable detailsLabel setText MessageFormat RESOURCE_BUNDLE getString detailsLabel detailsText setText
protected void set Detail Hints Grid Data data Grid Data details Composite get Layout Data if show Details data width Hint SWT DEFAULT data height Hint convert Height In Chars To Pixels 5 else data width Hint 0 data height Hint 0  setDetailHints GridData GridData detailsComposite getLayoutData showDetails widthHint heightHint convertHeightInCharsToPixels widthHint heightHint
Set the label of the detail button based on whether we re currently showing the description text private void set Detail Button Label if show Details details Button set Text RESOURCE BUNDLE get String show Details NON NLS 1 else details Button set Text RESOURCE BUNDLE get String hide Details NON NLS 1  setDetailButtonLabel showDetails detailsButton setText RESOURCE_BUNDLE getString showDetails detailsButton setText RESOURCE_BUNDLE getString hideDetails
see org eclipse jface window Window configure Shell org eclipse swt widgets Shell protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text RESOURCE BUNDLE get String title NON NLS 1  configureShell configureShell newShell configureShell newShell newShell setText RESOURCE_BUNDLE getString
return Returns whether the user has declared that there is to be no further prompting for the supplied activities public boolean get Dont Ask return dont Ask  getDontAsk dontAsk
return Returns the activities to enable public Collection get Activities To Enable return activities To Enable  getActivitiesToEnable activitiesToEnable
see org eclipse jface dialogs Dialog ok Pressed protected void ok Pressed dont Ask dont Ask Button get Selection super ok Pressed  okPressed okPressed dontAsk dontAskButton getSelection okPressed
protected void create Buttons For Button Bar Composite parent super create Buttons For Button Bar parent details Button create Button parent I Dialog Constants DETAILS ID false NON NLS 1 set Detail Button Label  createButtonsForButtonBar createButtonsForButtonBar detailsButton createButton IDialogConstants DETAILS_ID setDetailButtonLabel
protected void button Pressed int button Id if button Id I Dialog Constants DETAILS ID details Pressed return super button Pressed button Id  buttonPressed buttonId buttonId IDialogConstants DETAILS_ID detailsPressed buttonPressed buttonId
Handles selection of the Details button private void details Pressed show Details show Details set Detail Button Label set Detail Hints set Details Composite get Dialog Area layout true get Shell set Size get Shell compute Size SWT DEFAULT SWT DEFAULT  detailsPressed showDetails showDetails setDetailButtonLabel setDetailHints setDetails getDialogArea getShell setSize getShell computeSize

public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception open Time System current Time Millis workbench get Progress Service get Long Operation Time two work units updating the window bars and updating view bars monitor begin Task Activity Messages get String Manager Task 2 NON NLS 1 monitor sub Task Activity Messages get String Manager Window Sub Task NON NLS 1 update window managers update Window Bars window monitor worked 1 monitor sub Task Activity Messages get String Manager Views Sub Task NON NLS 1 update all of the realized views in all of the pages I Workbench Page pages window get Pages for int j 0 j pages length j I Workbench Page page pages j I View Reference refs page get View References for int k 0 k refs length k I View Part part refs k get View false if part null update View Bars part monitor worked 1 monitor done  IProgressMonitor InvocationTargetException InterruptedException openTime currentTimeMillis getProgressService getLongOperationTime beginTask ActivityMessages getString ManagerTask subTask ActivityMessages getString ManagerWindowSubTask updateWindowBars subTask ActivityMessages getString ManagerViewsSubTask IWorkbenchPage getPages IWorkbenchPage IViewReference getViewReferences IViewPart getView updateViewBars
Update the managers on the given given view param part the view to update private void update View Bars I View Part part I View Site view Site part get View Site check for badly behaving or badly initialized views if view Site null return I Action Bars bars view Site get Action Bars I Contribution Manager manager bars get Menu Manager if manager null update Manager manager manager bars get Tool Bar Manager if manager null update Manager manager manager bars get Status Line Manager if manager null update Manager manager  updateViewBars IViewPart IViewSite viewSite getViewSite viewSite IActionBars viewSite getActionBars IContributionManager getMenuManager updateManager getToolBarManager updateManager getStatusLineManager updateManager
Update the managers on the given window param window the window to update private void update Window Bars final Workbench Window window I Contribution Manager manager window get Menu Bar Manager if manager null update Manager manager manager window get Cool Bar Manager if manager null update Manager manager manager window get Tool Bar Manager if manager null update Manager manager manager window get Status Line Manager if manager null update Manager manager  updateWindowBars WorkbenchWindow IContributionManager getMenuBarManager updateManager getCoolBarManager updateManager getToolBarManager updateManager getStatusLineManager updateManager
Update the given manager in the UI thread This may also open the progress dialog if the operation is taking too long param manager the manager to update private void update Manager final I Contribution Manager manager if dialog Opened System current Time Millis open Time dialog open dialog Opened true manager update true  updateManager IContributionManager dialogOpened currentTimeMillis openTime dialogOpened
public void run try dialog run false false runnable catch Invocation Target Exception e log e catch Interrupted Exception e log e  InvocationTargetException InterruptedException
public void run Busy Indicator show While workbench get Display new Runnable non Javadoc see java lang Runnable run public void run try dialog run false false runnable catch Invocation Target Exception e log e catch Interrupted Exception e log e  BusyIndicator showWhile getDisplay InvocationTargetException InterruptedException
public void activity Manager Changed Activity Manager Event activity Manager Event Set activity Ids mutable Activity Manager get Enabled Activity Ids only update the windows if we ve not processed this new enablement state already if activity Ids equals last Enabled last Enabled new Hash Set activity Ids abort if the workbench isn t running if PlatformUI is Workbench Running return refresh the managers on all windows final I Workbench workbench PlatformUI get Workbench I Workbench Window windows workbench get Workbench Windows for int i 0 i windows length i if windows i instanceof Workbench Window final Workbench Window window Workbench Window windows i final Progress Monitor Dialog dialog new Progress Monitor Dialog window get Shell final I Runnable With Progress runnable new I Runnable With Progress When this operation should open a dialog private long open Time Whether the dialog has been opened yet private boolean dialog Opened false non Javadoc see org eclipse jface operation I Runnable With Progress run org eclipse core runtime I Progress Monitor public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception open Time System current Time Millis workbench get Progress Service get Long Operation Time two work units updating the window bars and updating view bars monitor begin Task Activity Messages get String Manager Task 2 NON NLS 1 monitor sub Task Activity Messages get String Manager Window Sub Task NON NLS 1 update window managers update Window Bars window monitor worked 1 monitor sub Task Activity Messages get String Manager Views Sub Task NON NLS 1 update all of the realized views in all of the pages I Workbench Page pages window get Pages for int j 0 j pages length j I Workbench Page page pages j I View Reference refs page get View References for int k 0 k refs length k I View Part part refs k get View false if part null update View Bars part monitor worked 1 monitor done Update the managers on the given given view param part the view to update private void update View Bars I View Part part I View Site view Site part get View Site check for badly behaving or badly initialized views if view Site null return I Action Bars bars view Site get Action Bars I Contribution Manager manager bars get Menu Manager if manager null update Manager manager manager bars get Tool Bar Manager if manager null update Manager manager manager bars get Status Line Manager if manager null update Manager manager Update the managers on the given window param window the window to update private void update Window Bars final Workbench Window window I Contribution Manager manager window get Menu Bar Manager if manager null update Manager manager manager window get Cool Bar Manager if manager null update Manager manager manager window get Tool Bar Manager if manager null update Manager manager manager window get Status Line Manager if manager null update Manager manager Update the given manager in the UI thread This may also open the progress dialog if the operation is taking too long param manager the manager to update private void update Manager final I Contribution Manager manager if dialog Opened System current Time Millis open Time dialog open dialog Opened true manager update true don t open the dialog by default that ll be handled by the runnable if we take too long dialog set Open On Run false run this in the UI thread workbench get Display async Exec new Runnable non Javadoc see java lang Runnable run public void run Busy Indicator show While workbench get Display new Runnable non Javadoc see java lang Runnable run public void run try dialog run false false runnable catch Invocation Target Exception e log e catch Interrupted Exception e log e  activityManagerChanged ActivityManagerEvent activityManagerEvent activityIds mutableActivityManager getEnabledActivityIds activityIds lastEnabled lastEnabled HashSet activityIds isWorkbenchRunning IWorkbench getWorkbench IWorkbenchWindow getWorkbenchWindows WorkbenchWindow WorkbenchWindow WorkbenchWindow ProgressMonitorDialog ProgressMonitorDialog getShell IRunnableWithProgress IRunnableWithProgress openTime dialogOpened IRunnableWithProgress IProgressMonitor IProgressMonitor InvocationTargetException InterruptedException openTime currentTimeMillis getProgressService getLongOperationTime beginTask ActivityMessages getString ManagerTask subTask ActivityMessages getString ManagerWindowSubTask updateWindowBars subTask ActivityMessages getString ManagerViewsSubTask IWorkbenchPage getPages IWorkbenchPage IViewReference getViewReferences IViewPart getView updateViewBars updateViewBars IViewPart IViewSite viewSite getViewSite viewSite IActionBars viewSite getActionBars IContributionManager getMenuManager updateManager getToolBarManager updateManager getStatusLineManager updateManager updateWindowBars WorkbenchWindow IContributionManager getMenuBarManager updateManager getCoolBarManager updateManager getToolBarManager updateManager getStatusLineManager updateManager updateManager IContributionManager dialogOpened currentTimeMillis openTime dialogOpened setOpenOnRun getDisplay asyncExec BusyIndicator showWhile getDisplay InvocationTargetException InterruptedException
Logs an error message to the workbench log param e the exception to log private void log Exception e Status Util new Status I Status ERROR Could not update contribution managers e NON NLS 1  StatusUtil newStatus IStatus
public Workbench Activity Support mutable Activity Manager Activity Manager Factory get Mutable Activity Manager proxy Activity Manager new Proxy Activity Manager mutable Activity Manager mutable Activity Manager add Activity Manager Listener new I Activity Manager Listener private Set last Enabled new Hash Set mutable Activity Manager get Enabled Activity Ids non Javadoc see org eclipse ui activities I Activity Manager Listener activity Manager Changed org eclipse ui activities Activity Manager Event public void activity Manager Changed Activity Manager Event activity Manager Event Set activity Ids mutable Activity Manager get Enabled Activity Ids only update the windows if we ve not processed this new enablement state already if activity Ids equals last Enabled last Enabled new Hash Set activity Ids abort if the workbench isn t running if PlatformUI is Workbench Running return refresh the managers on all windows final I Workbench workbench PlatformUI get Workbench I Workbench Window windows workbench get Workbench Windows for int i 0 i windows length i if windows i instanceof Workbench Window final Workbench Window window Workbench Window windows i final Progress Monitor Dialog dialog new Progress Monitor Dialog window get Shell final I Runnable With Progress runnable new I Runnable With Progress When this operation should open a dialog private long open Time Whether the dialog has been opened yet private boolean dialog Opened false non Javadoc see org eclipse jface operation I Runnable With Progress run org eclipse core runtime I Progress Monitor public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception open Time System current Time Millis workbench get Progress Service get Long Operation Time two work units updating the window bars and updating view bars monitor begin Task Activity Messages get String Manager Task 2 NON NLS 1 monitor sub Task Activity Messages get String Manager Window Sub Task NON NLS 1 update window managers update Window Bars window monitor worked 1 monitor sub Task Activity Messages get String Manager Views Sub Task NON NLS 1 update all of the realized views in all of the pages I Workbench Page pages window get Pages for int j 0 j pages length j I Workbench Page page pages j I View Reference refs page get View References for int k 0 k refs length k I View Part part refs k get View false if part null update View Bars part monitor worked 1 monitor done Update the managers on the given given view param part the view to update private void update View Bars I View Part part I View Site view Site part get View Site check for badly behaving or badly initialized views if view Site null return I Action Bars bars view Site get Action Bars I Contribution Manager manager bars get Menu Manager if manager null update Manager manager manager bars get Tool Bar Manager if manager null update Manager manager manager bars get Status Line Manager if manager null update Manager manager Update the managers on the given window param window the window to update private void update Window Bars final Workbench Window window I Contribution Manager manager window get Menu Bar Manager if manager null update Manager manager manager window get Cool Bar Manager if manager null update Manager manager manager window get Tool Bar Manager if manager null update Manager manager manager window get Status Line Manager if manager null update Manager manager Update the given manager in the UI thread This may also open the progress dialog if the operation is taking too long param manager the manager to update private void update Manager final I Contribution Manager manager if dialog Opened System current Time Millis open Time dialog open dialog Opened true manager update true don t open the dialog by default that ll be handled by the runnable if we take too long dialog set Open On Run false run this in the UI thread workbench get Display async Exec new Runnable non Javadoc see java lang Runnable run public void run Busy Indicator show While workbench get Display new Runnable non Javadoc see java lang Runnable run public void run try dialog run false false runnable catch Invocation Target Exception e log e catch Interrupted Exception e log e Logs an error message to the workbench log param e the exception to log private void log Exception e Status Util new Status I Status ERROR Could not update contribution managers e NON NLS 1  WorkbenchActivitySupport mutableActivityManager ActivityManagerFactory getMutableActivityManager proxyActivityManager ProxyActivityManager mutableActivityManager mutableActivityManager addActivityManagerListener IActivityManagerListener lastEnabled HashSet mutableActivityManager getEnabledActivityIds IActivityManagerListener activityManagerChanged ActivityManagerEvent activityManagerChanged ActivityManagerEvent activityManagerEvent activityIds mutableActivityManager getEnabledActivityIds activityIds lastEnabled lastEnabled HashSet activityIds isWorkbenchRunning IWorkbench getWorkbench IWorkbenchWindow getWorkbenchWindows WorkbenchWindow WorkbenchWindow WorkbenchWindow ProgressMonitorDialog ProgressMonitorDialog getShell IRunnableWithProgress IRunnableWithProgress openTime dialogOpened IRunnableWithProgress IProgressMonitor IProgressMonitor InvocationTargetException InterruptedException openTime currentTimeMillis getProgressService getLongOperationTime beginTask ActivityMessages getString ManagerTask subTask ActivityMessages getString ManagerWindowSubTask updateWindowBars subTask ActivityMessages getString ManagerViewsSubTask IWorkbenchPage getPages IWorkbenchPage IViewReference getViewReferences IViewPart getView updateViewBars updateViewBars IViewPart IViewSite viewSite getViewSite viewSite IActionBars viewSite getActionBars IContributionManager getMenuManager updateManager getToolBarManager updateManager getStatusLineManager updateManager updateWindowBars WorkbenchWindow IContributionManager getMenuBarManager updateManager getCoolBarManager updateManager getToolBarManager updateManager getStatusLineManager updateManager updateManager IContributionManager dialogOpened currentTimeMillis openTime dialogOpened setOpenOnRun getDisplay asyncExec BusyIndicator showWhile getDisplay InvocationTargetException InterruptedException StatusUtil newStatus IStatus
public I Activity Manager get Activity Manager return proxy Activity Manager  IActivityManager getActivityManager proxyActivityManager
public void set Enabled Activity Ids Set enabled Activity Ids mutable Activity Manager set Enabled Activity Ids enabled Activity Ids  setEnabledActivityIds enabledActivityIds mutableActivityManager setEnabledActivityIds enabledActivityIds

Get the singleton instance of this class return the singleton instance of this class public static Activity Persistance Helper get Instance if singleton null singleton new Activity Persistance Helper return singleton  ActivityPersistanceHelper getInstance ActivityPersistanceHelper
Create a new code Activity Persistance Helper code which will restore previously enabled activity states private Activity Persistance Helper load Enabled States  ActivityPersistanceHelper ActivityPersistanceHelper loadEnabledStates
Create the preference key for the activity param activity Id the activity id return String a preference key representing the activity private String create Preference Key String activity Id return PREFIX activity Id  activityId createPreferenceKey activityId activityId
Loads the enabled states from the preference store void load Enabled States I Preference Store store Workbench Plugin get Default get Preference Store I Workbench Activity Support support PlatformUI get Workbench get Activity Support I Activity Manager activity Manager support get Activity Manager for Iterator i activity Manager get Enabled Activity Ids iterator i has Next default enabled I Ds store set Default create Preference Key String i next true Set enabled Activities new Hash Set for Iterator i activity Manager get Defined Activity Ids iterator i has Next String activity Id String i next if store get Boolean create Preference Key activity Id enabled Activities add activity Id support set Enabled Activity Ids enabled Activities  loadEnabledStates IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore IWorkbenchActivitySupport getWorkbench getActivitySupport IActivityManager activityManager getActivityManager activityManager getEnabledActivityIds hasNext IDs setDefault createPreferenceKey enabledActivities HashSet activityManager getDefinedActivityIds hasNext activityId getBoolean createPreferenceKey activityId enabledActivities activityId setEnabledActivityIds enabledActivities
Save the enabled states in the preference store private void save Enabled States I Preference Store store Workbench Plugin get Default get Preference Store I Workbench Activity Support support PlatformUI get Workbench get Activity Support I Activity Manager activity Manager support get Activity Manager Iterator values activity Manager get Defined Activity Ids iterator while values has Next I Activity activity activity Manager get Activity String values next store set Value create Preference Key activity get Id activity is Enabled Workbench Plugin get Default save Plugin Preferences  saveEnabledStates IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore IWorkbenchActivitySupport getWorkbench getActivitySupport IActivityManager activityManager getActivityManager activityManager getDefinedActivityIds hasNext IActivity activityManager getActivity setValue createPreferenceKey getId isEnabled WorkbenchPlugin getDefault savePluginPreferences
Save the enabled state of all activities public void shutdown save Enabled States  saveEnabledStates

private final I Property Listener prop Listener new I Property Listener public void property Changed Object source int prop Id if source get Active Editor if prop Id I Editor Part PROP DIRTY update State  IPropertyListener propListener IPropertyListener propertyChanged propId getActiveEditor propId IEditorPart PROP_DIRTY updateState
Creates a new action with the given text param text the string used as the text for the action or code null code if there is no text param window the workbench window this action is registered with protected Base Save Action String text I Workbench Window window super text window  BaseSaveAction IWorkbenchWindow
protected void editor Activated I Editor Part part if part null part add Property Listener prop Listener parts With Listeners add part  editorActivated IEditorPart addPropertyListener propListener partsWithListeners
protected void editor Deactivated I Editor Part part if part null part remove Property Listener prop Listener parts With Listeners remove part  editorDeactivated IEditorPart removePropertyListener propListener partsWithListeners
private final I Property Listener prop Listener2 new I Property Listener public void property Changed Object source int prop Id if source active View if prop Id I Editor Part PROP DIRTY update State  IPropertyListener propListener2 IPropertyListener propertyChanged propId activeView propId IEditorPart PROP_DIRTY updateState
public void page Activated I Workbench Page page super page Activated page update Active View update State  pageActivated IWorkbenchPage pageActivated updateActiveView updateState
public void page Closed I Workbench Page page super page Closed page update Active View update State  pageClosed IWorkbenchPage pageClosed updateActiveView updateState
public void part Activated I Workbench Part part super part Activated part if part instanceof I View Part update Active View update State  partActivated IWorkbenchPart partActivated IViewPart updateActiveView updateState
public void part Closed I Workbench Part part super part Closed part if part instanceof I View Part update Active View update State  partClosed IWorkbenchPart partClosed IViewPart updateActiveView updateState
public void part Deactivated I Workbench Part part super part Deactivated part if part instanceof I View Part update Active View update State  partDeactivated IWorkbenchPart partDeactivated IViewPart updateActiveView updateState
Update the active view based on the current active page private void update Active View if get Active Page null set Active View null else set Active View get Active Page get Active Part  updateActiveView getActivePage setActiveView setActiveView getActivePage getActivePart
Set the active editor private void set Active View I Workbench Part part if active View part return if active View null active View remove Property Listener prop Listener2 parts With Listeners remove active View if part instanceof I View Part active View I View Part part else active View null if active View null active View add Property Listener prop Listener2 parts With Listeners add active View  setActiveView IWorkbenchPart activeView activeView activeView removePropertyListener propListener2 partsWithListeners activeView IViewPart activeView IViewPart activeView activeView activeView addPropertyListener propListener2 partsWithListeners activeView
protected final I Saveable Part get Saveable View if active View null return null if active View instanceof I Saveable Part return I Saveable Part active View return I Saveable Part active View get Adapter I Saveable Part class  ISaveablePart getSaveableView activeView activeView ISaveablePart ISaveablePart activeView ISaveablePart activeView getAdapter ISaveablePart
public void dispose super dispose for Iterator it parts With Listeners iterator it has Next I Workbench Part part I Workbench Part it next part remove Property Listener prop Listener part remove Property Listener prop Listener2 parts With Listeners clear  partsWithListeners hasNext IWorkbenchPart IWorkbenchPart removePropertyListener propListener removePropertyListener propListener2 partsWithListeners

Creates a new Boolean Model with the given initial state param initial State initial value of the model public Boolean Model boolean initial State super new Boolean initial State  BooleanModel initialState BooleanModel initialState initialState
Sets the value and notifies all change listeners param new Value new public void set boolean new Value set new Value null  newValue newValue newValue
Sets the value and notifies all change listeners except the listener that caused the change param new Value new boolean value param origin change listener that caused the change or null if the change was not caused by a change listener public void set boolean new Value I Change Listener origin super set State new Boolean new Value origin  newValue newValue IChangeListener setState newValue
Returns the current value as a boolean return the current value public boolean get return Boolean get State boolean Value  getState booleanValue

Create an url from the argument absolute or relative path The bundle parameter is used as the base for relative paths and is allowed to be null param value the absolute or relative path param defining Bundle bundle to be used for relative paths may be null return public static URL get Url String value Bundle defining Bundle try if value null return new URL value catch MalformedURL Exception e if defining Bundle null return Platform find defining Bundle new Path value return null  definingBundle getUrl definingBundle MalformedURLException definingBundle definingBundle
Create a descriptor from the argument absolute or relative path to an image file bundle parameter is used as the base for relative paths and is allowed to be null param value the absolute or relative path param defining Bundle bundle to be used for relative paths may be null return public static Image Descriptor get Image String value Bundle defining Bundle URL url get Url value defining Bundle return url null null Image Descriptor create FromURL url  definingBundle ImageDescriptor getImage definingBundle getUrl definingBundle ImageDescriptor createFromURL
Returns a array of URL for the given property or code null code The property value should be a comma separated list of urls either absolute or relative to the argument bundle Tokens that do not represent a valid url will be represented with a null entry in the returned array param value value of a property that contains a comma separated list of product relative urls param defining Bundle bundle to be used as base for relative paths may be null return a URL for the given property or code null code public static URL getUR Ls String value Bundle defining Bundle if value null return null String Tokenizer tokens new String Tokenizer value NON NLS 1 Array List array new Array List 10 while tokens has More Tokens array add get Url tokens next Token trim defining Bundle return URL array to Array new URL array size  definingBundle getURLs definingBundle StringTokenizer StringTokenizer ArrayList ArrayList hasMoreTokens getUrl nextToken definingBundle toArray
Returns an array of image descriptors for the given property or code null code The property value should be a comma separated list of image paths Each path should either be absolute or relative to the optional bundle parameter param value value of a property that contains a comma separated list of product relative urls describing images param defining Bundle bundle to be used for relative paths may be null return an array of image descriptors for the given property or code null code public static Image Descriptor get Images String value Bundle defining Bundle URL urls getUR Ls value defining Bundle if urls null urls length 0 return null Image Descriptor images new Image Descriptor urls length for int i 0 i images length i images i Image Descriptor create FromURL urls i return images  definingBundle ImageDescriptor getImages definingBundle getURLs definingBundle ImageDescriptor ImageDescriptor ImageDescriptor createFromURL

This instance will return properties from the given bundle group The properties are retrieved in a lazy fashion and cached for later retrieval param bundle Group must not be null public Bundle Group Properties I Bundle Group bundle Group if bundle Group null throw new Illegal Argument Exception this bundle Group bundle Group  bundleGroup BundleGroupProperties IBundleGroup bundleGroup bundleGroup IllegalArgumentException bundleGroup bundleGroup
An image which can be shown in an about features dialog 32x32 public Image Descriptor get Feature Image if feature Image Descriptor null feature Image Descriptor get Feature Image bundle Group return feature Image Descriptor  ImageDescriptor getFeatureImage featureImageDescriptor featureImageDescriptor getFeatureImage bundleGroup featureImageDescriptor
The URL to an image which can be shown in an about features dialog 32x32 public URL get Feature Image Url if feature Image Url null feature Image Url get Feature Image Url bundle Group return feature Image Url  getFeatureImageUrl featureImageUrl featureImageUrl getFeatureImageUrl bundleGroup featureImageUrl
A help reference for the feature s tips and tricks page optional public String get Tips And Tricks Href if tips And Tricks Href null tips And Tricks Href get Tips And Tricks Href bundle Group return tips And Tricks Href  getTipsAndTricksHref tipsAndTricksHref tipsAndTricksHref getTipsAndTricksHref bundleGroup tipsAndTricksHref
A URL for the feature s welcome page special XML based format nl prefix to permit locale specific translations of entire file Products designed to run headless typically would not have such a page public URL get Welcome Page Url if welcome Page Url null welcome Page Url get Welcome Page Url bundle Group return welcome Page Url  getWelcomePageUrl welcomePageUrl welcomePageUrl getWelcomePageUrl bundleGroup welcomePageUrl
The id of a perspective in which to show the welcome page optional public String get Welcome Perspective if welcome Perspective null welcome Perspective get Welcome Perspective bundle Group return welcome Perspective  getWelcomePerspective welcomePerspective welcomePerspective getWelcomePerspective bundleGroup welcomePerspective
A URL for the feature s license page public URL get License Url if license Url null license Url get License Url bundle Group return license Url  getLicenseUrl licenseUrl licenseUrl getLicenseUrl bundleGroup licenseUrl
Returns a label for the feature plugn or code null code public String get Feature Label if feature Label null feature Label get Feature Label bundle Group return feature Label  getFeatureLabel featureLabel featureLabel getFeatureLabel bundleGroup featureLabel
Returns the id for this bundle Group public String get Feature Id if feature Id null feature Id get Feature Id bundle Group return feature Id  bundleGroup getFeatureId featureId featureId getFeatureId bundleGroup featureId
Returns the provider name public String get Provider Name if provider Name null provider Name get Provider Name bundle Group return provider Name  getProviderName providerName providerName getProviderName bundleGroup providerName
Returns the feature version id public String get Feature Version if version Id null version Id get Feature Version bundle Group return version Id  getFeatureVersion versionId versionId getFeatureVersion bundleGroup versionId
An image which can be shown in an about features dialog 32x32 public static Image Descriptor get Feature Image I Bundle Group bundle Group return get Image bundle Group get Property FEATURE IMAGE null  ImageDescriptor getFeatureImage IBundleGroup bundleGroup getImage bundleGroup getProperty FEATURE_IMAGE
The URL to an image which can be shown in an about features dialog 32x32 public static URL get Feature Image Url I Bundle Group bundle Group return get Url bundle Group get Property FEATURE IMAGE null  getFeatureImageUrl IBundleGroup bundleGroup getUrl bundleGroup getProperty FEATURE_IMAGE
A help reference for the feature s tips and tricks page optional public static String get Tips And Tricks Href I Bundle Group bundle Group return bundle Group get Property TIPS AND TRICKS HREF  getTipsAndTricksHref IBundleGroup bundleGroup bundleGroup getProperty TIPS_AND_TRICKS_HREF
A URL for the feature s welcome page special XML based format nl prefix to permit locale specific translations of entire file Products designed to run headless typically would not have such a page public static URL get Welcome Page Url I Bundle Group bundle Group return get Url bundle Group get Property WELCOME PAGE null  getWelcomePageUrl IBundleGroup bundleGroup getUrl bundleGroup getProperty WELCOME_PAGE
The id of a perspective in which to show the welcome page optional public static String get Welcome Perspective I Bundle Group bundle Group String property bundle Group get Property WELCOME PERSPECTIVE return property null null property  getWelcomePerspective IBundleGroup bundleGroup bundleGroup getProperty WELCOME_PERSPECTIVE
A URL for the feature s license page public static URL get License Url I Bundle Group bundle Group return get Url bundle Group get Property LICENSE HREF null  getLicenseUrl IBundleGroup bundleGroup getUrl bundleGroup getProperty LICENSE_HREF
Returns a label for the feature plugn or code null code public static String get Feature Label I Bundle Group bundle Group return bundle Group get Name  getFeatureLabel IBundleGroup bundleGroup bundleGroup getName
Returns the id for this bundle Group public static String get Feature Id I Bundle Group bundle Group return bundle Group get Identifier  bundleGroup getFeatureId IBundleGroup bundleGroup bundleGroup getIdentifier
Returns the provider name public static String get Provider Name I Bundle Group bundle Group return bundle Group get Provider Name  getProviderName IBundleGroup bundleGroup bundleGroup getProviderName
Returns the feature version id public static String get Feature Version I Bundle Group bundle Group return bundle Group get Version  getFeatureVersion IBundleGroup bundleGroup bundleGroup getVersion

Constructor for Change To Perspective Menu param window the workbench window this action applies to public Change To Perspective Menu I Workbench Window window String id super window id show Active true  ChangeToPerspectiveMenu ChangeToPerspectiveMenu IWorkbenchWindow showActive
Returns the available list of perspectives to display in the menu Extends the super implementation by ensuring that the current perspective is included in the list return an code Array List code of perspective items code I Perspective Descriptor code protected Array List get Perspective Items Array List list super get Perspective Items I Workbench Window window get Window I Workbench Page page window get Active Page if page null I Perspective Descriptor desc page get Perspective if desc null if list contains desc list add desc return list non Javadoc see Perspective Menu run I Perspective Descriptor protected void run I Perspective Descriptor desc I Preference Store store PlatformUI get Workbench get Preference Store int mode store get Int I Preference Constants OPEN PERSP MODE I Workbench Page page get Window get Active Page I Perspective Descriptor persp null if page null persp page get Perspective Only open a new window if user preference is set and the window has an active perspective if I Preference Constants OPM NEW WINDOW mode persp null try I Workbench workbench get Window get Workbench I Adaptable input Workbench workbench get Default Page Input workbench open Workbench Window desc get Id input catch Workbench Exception e handle Workbench Exception e else if page null page set Perspective desc else try I Workbench workbench get Window get Workbench I Adaptable input Workbench workbench get Default Page Input get Window open Page desc get Id input catch Workbench Exception e handle Workbench Exception e  ArrayList IPerspectiveDescriptor ArrayList getPerspectiveItems ArrayList getPerspectiveItems IWorkbenchWindow getWindow IWorkbenchPage getActivePage IPerspectiveDescriptor getPerspective PerspectiveMenu IPerspectiveDescriptor IPerspectiveDescriptor IPreferenceStore getWorkbench getPreferenceStore getInt IPreferenceConstants OPEN_PERSP_MODE IWorkbenchPage getWindow getActivePage IPerspectiveDescriptor getPerspective IPreferenceConstants OPM_NEW_WINDOW IWorkbench getWindow getWorkbench IAdaptable getDefaultPageInput openWorkbenchWindow getId WorkbenchException handleWorkbenchException setPerspective IWorkbench getWindow getWorkbench IAdaptable getDefaultPageInput getWindow openPage getId WorkbenchException handleWorkbenchException
Handles workbench exception private void handle Workbench Exception Workbench Exception e Error Dialog open Error get Window get Shell Workbench Messages get String Change To Perspective Menu error Title NON NLS 1 e get Message e get Status  handleWorkbenchException WorkbenchException ErrorDialog openError getWindow getShell WorkbenchMessages getString ChangeToPerspectiveMenu errorTitle getMessage getStatus

Create a new code Cheat Sheet Selection Action code action public Cheat Sheet Category Based Selection Action  CheatSheetSelectionAction CheatSheetCategoryBasedSelectionAction
Constructor for Cheat Sheet Selection Action param text public Cheat Sheet Category Based Selection Action String text super text  CheatSheetSelectionAction CheatSheetCategoryBasedSelectionAction
Constructor for Cheat Sheet Selection Action param text param image public Cheat Sheet Category Based Selection Action String text Image Descriptor image super text image  CheatSheetSelectionAction CheatSheetCategoryBasedSelectionAction ImageDescriptor
see Action run public void run Cheat Sheet Collection Element cheat Sheets Cheat Sheet Collection Element Cheat Sheet Registry Reader get Instance get Cheat Sheets Cheat Sheet Category Based Selection Dialog dialog new Cheat Sheet Category Based Selection Dialog PlatformUI get Workbench get Active Workbench Window get Shell cheat Sheets if dialog open Window OK dialog get Result length 1 notify Result false return notify Result true Cheat Sheet Element result Cheat Sheet Element dialog get Result 0 new Open Cheat Sheet Action result getID run  CheatSheetCollectionElement cheatSheets CheatSheetCollectionElement CheatSheetRegistryReader getInstance getCheatSheets CheatSheetCategoryBasedSelectionDialog CheatSheetCategoryBasedSelectionDialog getWorkbench getActiveWorkbenchWindow getShell cheatSheets getResult notifyResult notifyResult CheatSheetElement CheatSheetElement getResult OpenCheatSheetAction

see org eclipse ui I Workbench Window Action Delegate dispose public void dispose  IWorkbenchWindowActionDelegate
see org eclipse ui I Workbench Window Action Delegate init org eclipse ui I Workbench Window public void init I Workbench Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action new Cheat Sheet Category Based Selection Action run  IActionDelegate IAction IAction CheatSheetCategoryBasedSelectionAction
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection

public int compare Object ob1 Object ob2 if ob1 null ob2 null return 1 Cheat Sheet Element d1 Cheat Sheet Element ob1 Cheat Sheet Element d2 Cheat Sheet Element ob2 return collator compare d1 get Label null d2 get Label null  CheatSheetElement CheatSheetElement CheatSheetElement CheatSheetElement getLabel getLabel
Constructs a new instance of code Cheat Sheet Menu code public Cheat Sheet Menu super Launch Cheat Sheet Menu NON NLS 1 if reg null reg Cheat Sheet Registry Reader get Instance show Active true  CheatSheetMenu CheatSheetMenu LaunchCheatSheetMenu CheatSheetRegistryReader getInstance showActive
private void create Menu Item Menu menu int index final Cheat Sheet Element element boolean b Check Menu Item mi new Menu Item menu b Check SWT RADIO SWT PUSH index mi set Text element get Label null mi set Selection b Check mi add Selection Listener new Selection Adapter public void widget Selected Selection Event e run element e  createMenuItem CheatSheetElement bCheck MenuItem MenuItem bCheck setText getLabel setSelection bCheck addSelectionListener SelectionAdapter widgetSelected SelectionEvent
private void create Other Item Menu menu int index Menu Item mi new Menu Item menu SWT PUSH index mi set Text Cheat Sheet Plugin get Resource String I Cheat Sheet Resource CHEAT SHEET OTHER MENU mi add Selection Listener new Selection Adapter public void widget Selected Selection Event e run Other e  createOtherItem MenuItem MenuItem setText CheatSheetPlugin getResourceString ICheatSheetResource CHEAT_SHEET_OTHER_MENU addSelectionListener SelectionAdapter widgetSelected SelectionEvent runOther
public void fill Menu menu int index Get the checked cheatsheet String checkID null if show Active checkID get Active Cheat SheetID Collect and sort cheatsheet items Array List cheatsheets get Cheat Sheet Items Collections sort cheatsheets comparator Add cheatsheet shortcuts for int i 0 i cheatsheets size i Cheat Sheet Element element Cheat Sheet Element cheatsheets get i if element null create Menu Item menu index element element getID equals checkID Add others item if cheatsheets size 0 new Menu Item menu SWT SEPARATOR index create Other Item menu index  showActive getActiveCheatSheetID ArrayList getCheatSheetItems CheatSheetElement CheatSheetElement createMenuItem MenuItem createOtherItem
Method get Active Cheat SheetID returns the id of the active cheatsheet or null return String private String get Active Cheat SheetID get the active cheatsheet view if opened I Workbench Page page get Active Workbench Page if page null Cheat Sheet View view Cheat Sheet View page find View I Cheat Sheet Resource CHEAT SHEET VIEW ID if view null Cheat Sheet Element content view get Content if content null return content getID return null  getActiveCheatSheetID getActiveCheatSheetID IWorkbenchPage getActiveWorkbenchPage CheatSheetView CheatSheetView findView ICheatSheetResource CHEAT_SHEET_VIEW_ID CheatSheetElement getContent
Method get Active Workbench Page returns the active workbench page or null return I Workbench Page private I Workbench Page get Active Workbench Page I Workbench workbench Cheat Sheet Plugin get Plugin get Workbench I Workbench Window window workbench get Active Workbench Window get the active cheatsheet view if opened return window get Active Page  getActiveWorkbenchPage IWorkbenchPage IWorkbenchPage getActiveWorkbenchPage IWorkbench CheatSheetPlugin getPlugin getWorkbench IWorkbenchWindow getActiveWorkbenchWindow getActivePage
Returns the available list of cheatsheets to display in the menu p By default the list contains the most recently used cheatsheets and then random cheatsheets until there are 5 present in the list p p Care should be taken to keep this list to a minimum 7 2 items is a good guideline to follow p return an code Array List code of cheatsheet items code Cheat Sheet Element code protected Array List get Cheat Sheet Items Array List list new Array List MAX CHEATSHEET ITEMS int empty Slots MAX CHEATSHEET ITEMS Add cheatsheets from MRU list if empty Slots 0 Array List mru new Array List MAX CHEATSHEET ITEMS int count get Cheat Sheet Mru mru 0 MAX CHEATSHEET ITEMS for int i 0 i count empty Slots 0 i if list contains mru get i list add mru get i empty Slots Add random cheatsheets until the list is filled Cheat Sheet Collection Element cheat Sheets Collection Cheat Sheet Collection Element reg get Cheat Sheets empty Slots add Cheat Sheets list cheat Sheets Collection empty Slots return list  ArrayList CheatSheetElement ArrayList getCheatSheetItems ArrayList ArrayList MAX_CHEATSHEET_ITEMS emptySlots MAX_CHEATSHEET_ITEMS emptySlots ArrayList ArrayList MAX_CHEATSHEET_ITEMS getCheatSheetMru MAX_CHEATSHEET_ITEMS emptySlots emptySlots CheatSheetCollectionElement cheatSheetsCollection CheatSheetCollectionElement getCheatSheets emptySlots addCheatSheets cheatSheetsCollection emptySlots
Method add Cheat Sheets fills a list with cheatsheet elements until there are no more empty slots param list the list to file param cheat Sheets Collection the collection to get the elements from param empty Slots number of empty slots remaining return int number of empty slots remaining private int add Cheat Sheets Array List list Cheat Sheet Collection Element cheat Sheets Collection int empty Slots Object cheat Sheets cheat Sheets Collection get Cheat Sheets for int i 0 i cheat Sheets length empty Slots 0 i if list contains cheat Sheets i list add cheat Sheets i empty Slots Object cheat Sheets From Collection cheat Sheets Collection get Children for int nX 0 nX cheat Sheets From Collection length empty Slots 0 nX Cheat Sheet Collection Element collection Cheat Sheet Collection Element cheat Sheets From Collection nX empty Slots add Cheat Sheets list collection empty Slots return empty Slots  addCheatSheets cheatSheetsCollection emptySlots addCheatSheets ArrayList CheatSheetCollectionElement cheatSheetsCollection emptySlots cheatSheets cheatSheetsCollection getCheatSheets cheatSheets emptySlots cheatSheets cheatSheets emptySlots cheatSheetsFromCollection cheatSheetsCollection getChildren cheatSheetsFromCollection emptySlots CheatSheetCollectionElement CheatSheetCollectionElement cheatSheetsFromCollection emptySlots addCheatSheets emptySlots emptySlots
return the number of items actually copied private int get Cheat Sheet Mru List dest int dest Start int count Cheat Sheet History history Cheat Sheet Plugin get Plugin get Cheat Sheet History return history copy Items dest dest Start count  getCheatSheetMru destStart CheatSheetHistory CheatSheetPlugin getPlugin getCheatSheetHistory copyItems destStart
Returns whether the menu item representing the active cheatsheet will have a check mark return code true code if a check mark is shown code false code otherwise protected boolean get Show Active return show Active  getShowActive showActive
Returns whether this menu is dynamic public boolean is Dynamic return true  isDynamic
see org eclipse jface action I Contribution Item is Visible public boolean is Visible return get Active Workbench Page null  IContributionItem isVisible isVisible getActiveWorkbenchPage
Runs an action to launch the cheatsheet param element the selected cheatsheet param event Selection Event the event send along with the selection callback protected void run Cheat Sheet Element element Selection Event event new Open Cheat Sheet Action element getID run  SelectionEvent CheatSheetElement SelectionEvent OpenCheatSheetAction
event should the meny need it private void run Other Selection Event event new Cheat Sheet Category Based Selection Action run  runOther SelectionEvent CheatSheetCategoryBasedSelectionAction
Sets the show Active flag If code show Active true code then the active cheatsheet is hilighted with a check mark param the new show Active flag protected void show Active boolean b show Active b  showActive showActive showActive showActive showActive

The constructor public Cheat Sheet Menu Action Cheat Sheet Plugin get Plugin get Cheat Sheet History add Listener this  CheatSheetMenuAction CheatSheetPlugin getPlugin getCheatSheetHistory addListener
see I Workbench Window Action Delegate dispose public void dispose set Menu null Cheat Sheet Plugin get Plugin get Cheat Sheet History remove Listener this  IWorkbenchWindowActionDelegate setMenu CheatSheetPlugin getPlugin getCheatSheetHistory removeListener
Fills the drop down menu with cheat sheets history param menu the menu to fill protected void fill Menu Menu menu Cheat Sheet Menu cheatsheet Menu Menu Item new Cheat Sheet Menu cheatsheet Menu Menu Item fill menu 0  fillMenu CheatSheetMenu cheatsheetMenuMenuItem CheatSheetMenu cheatsheetMenuMenuItem
see org eclipse ui I Workbench Window Pulldown Delegate get Menu org eclipse swt widgets Control public Menu get Menu Control parent return null  IWorkbenchWindowPulldownDelegate getMenu getMenu
public Menu get Menu Menu parent set Menu new Menu parent fill Menu f Menu init Menu return f Menu  getMenu setMenu fillMenu fMenu initMenu fMenu
see I Workbench Window Action Delegate init public void init I Workbench Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow
f Menu add Menu Listener new Menu Adapter public void menu Shown Menu Event e if f Recreate Menu Menu m Menu e widget Menu Item items m get Items for int i 0 i items length i items i dispose fill Menu m f Recreate Menu false  fMenu addMenuListener MenuAdapter menuShown MenuEvent fRecreateMenu MenuItem getItems fillMenu fRecreateMenu
Creates the menu for the action private void init Menu Add listener to repopulate the menu each time it is shown because of dynamic history list f Menu add Menu Listener new Menu Adapter public void menu Shown Menu Event e if f Recreate Menu Menu m Menu e widget Menu Item items m get Items for int i 0 i items length i items i dispose fill Menu m f Recreate Menu false  initMenu fMenu addMenuListener MenuAdapter menuShown MenuEvent fRecreateMenu MenuItem getItems fillMenu fRecreateMenu
see org eclipse ui I Property Listener property Changed java lang Object int public void property Changed Object source int prop Id f Recreate Menu true  IPropertyListener propertyChanged propertyChanged propId fRecreateMenu
see I Workbench Window Action Delegate run public void run I Action action  IWorkbenchWindowActionDelegate IAction
see I Workbench Window Action Delegate selection Changed public void selection Changed I Action action I Selection selection  IWorkbenchWindowActionDelegate selectionChanged selectionChanged IAction ISelection
Sets this action s drop down menu disposing the previous menu param menu the new menu private void set Menu Menu menu if f Menu null f Menu dispose f Menu menu  setMenu fMenu fMenu fMenu

Create a new code Cheat Sheet Selection Action code action public Cheat Sheet Selection Action  CheatSheetSelectionAction CheatSheetSelectionAction
Constructor for Cheat Sheet Selection Action param text public Cheat Sheet Selection Action String text super text  CheatSheetSelectionAction CheatSheetSelectionAction
Constructor for Cheat Sheet Selection Action param text param image public Cheat Sheet Selection Action String text Image Descriptor image super text image  CheatSheetSelectionAction CheatSheetSelectionAction ImageDescriptor
see Action run public void run Cheat Sheet Selection Dialog dialog new Cheat Sheet Selection Dialog PlatformUI get Workbench get Active Workbench Window get Shell if dialog open Window OK dialog get Result length 1 notify Result false return notify Result true new Open Cheat Sheet Action Cheat Sheet Element dialog get Result 0 getID run  CheatSheetSelectionDialog CheatSheetSelectionDialog getWorkbench getActiveWorkbenchWindow getShell getResult notifyResult notifyResult OpenCheatSheetAction CheatSheetElement getResult

Create a new code Open Perspective code action public Open Perspective  OpenPerspective OpenPerspective
see Action run public void run String params I Cheat Sheet Manager manager try if params null params 0 null return I Workbench workbench PlatformUI get Workbench I Workbench Window window workbench get Active Workbench Window I Workbench Page page window get Active Page I Perspective Descriptor perspective workbench get Perspective Registry find Perspective With Id params 0 page set Perspective perspective catch Exception e I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR OPENING PERSPECTIVE null Cheat Sheet Plugin get Plugin get Log log status  ICheatSheetManager IWorkbench getWorkbench IWorkbenchWindow getActiveWorkbenchWindow IWorkbenchPage getActivePage IPerspectiveDescriptor getPerspectiveRegistry findPerspectiveWithId setPerspective IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getResourceString ICheatSheetResource ERROR_OPENING_PERSPECTIVE CheatSheetPlugin getPlugin getLog

private Listener List listeners new Listener List public Cheat Sheet History Cheat Sheet Registry Reader reg this history new Array List DEFAULT DEPTH this reg reg  ListenerList ListenerList CheatSheetHistory CheatSheetRegistryReader ArrayList DEFAULT_DEPTH
public void add Listener I Property Listener l listeners add l  addListener IPropertyListener
public void remove Listener I Property Listener l listeners remove l  removeListener IPropertyListener
private void fire Change Object array listeners get Listeners for int i 0 i array length i I Property Listener element I Property Listener array i element property Changed this 0  fireChange getListeners IPropertyListener IPropertyListener propertyChanged
public I Status restore State I Memento memento I Memento children memento get Children element NON NLS 1 for int i 0 i children length i DEFAULT DEPTH i Cheat Sheet Element element reg find Cheat Sheet children i getID if element null history add element return new Status I Status OK I Cheat Sheet Resource CHEAT SHEET PLUGIN ID 0 I Cheat Sheet Resource EMPTY STRING null  IStatus restoreState IMemento IMemento getChildren DEFAULT_DEPTH CheatSheetElement findCheatSheet IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID ICheatSheetResource EMPTY_STRING
public I Status save State I Memento memento Iterator iter history iterator while iter has Next Cheat Sheet Element element Cheat Sheet Element iter next if element null memento create Child element element getID NON NLS 1 return new Status I Status OK I Cheat Sheet Resource CHEAT SHEET PLUGIN ID 0 I Cheat Sheet Resource EMPTY STRING null  IStatus saveState IMemento hasNext CheatSheetElement CheatSheetElement createChild IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID ICheatSheetResource EMPTY_STRING
public void add String id Cheat Sheet Element element reg find Cheat Sheet id if element null add element  CheatSheetElement findCheatSheet
public void add Cheat Sheet Element element Avoid duplicates if history contains element return If the shortcut list will be too long remove oldest ones int size history size int preferred Size DEFAULT DEPTH while size preferred Size size history remove size Insert at top as most recent history add 0 element fire Change  CheatSheetElement preferredSize DEFAULT_DEPTH preferredSize fireChange
public void refresh From Registry boolean change false Iterator iter history iterator while iter has Next Cheat Sheet Element element Cheat Sheet Element iter next if reg find Cheat Sheet element getID null iter remove change true if change fire Change  refreshFromRegistry hasNext CheatSheetElement CheatSheetElement findCheatSheet fireChange
Copy the requested number of items from the history into the destination list at the given index param dest destination list to contain the items param dest Start index in destination list to start copying items at param count number of items to copy from history return the number of items actually copied public int copy Items List dest int dest Start int count int item Count count if item Count history size item Count history size for int i 0 i item Count i dest add dest Start i history get i return item Count  destStart copyItems destStart itemCount itemCount itemCount itemCount destStart itemCount

The constructor public Cheat Sheet Plugin super  CheatSheetPlugin
Returns the string from the plugin s resource bundle or key if not found public static String get Resource String String key try if plugin null return Platform get Resource String plugin get Bundle key catch Missing Resource Exception e return key  getResourceString getResourceString getBundle MissingResourceException
Returns the shared instance public static Cheat Sheet Plugin get Plugin return plugin  CheatSheetPlugin getPlugin
Returns the formatted message for the given key in the resource bundle param key the resource name param args the message arguments return the string public static String format Resource String String key Object args return Message Format format get Resource String key args  formatResourceString MessageFormat getResourceString
Returns the image in Cheat Sheet s image registry with the given key or code null code if none Convenience method equivalent to pre Cheat Sheet Plugin get Image Registry get key pre param key the key return the image or code null code if none public Image get Image String key Image image get Image Registry get key return image  CheatSheetPlugin getImageRegistry getImage getImageRegistry
Returns the plugin s resource bundle public Resource Bundle get Resource Bundle we have this in the code but resource Bundle is never used we are leaving it in for the future in case it is needed if resource Bundle Initialized only try to initialize once resource Bundle Initialized true try resource Bundle Resource Bundle get Bundle I Cheat Sheet Resource CHEAT SHEET RESOURCE ID catch Missing Resource Exception x resource Bundle null return resource Bundle  ResourceBundle getResourceBundle resourceBundle resourceBundleInitialized resourceBundleInitialized resourceBundle ResourceBundle getBundle ICheatSheetResource CHEAT_SHEET_RESOURCE_ID MissingResourceException resourceBundle resourceBundle
Returns the Cheat Sheet History public Cheat Sheet History get Cheat Sheet History if history null history new Cheat Sheet History Cheat Sheet Registry Reader get Instance restore Cheat Sheet History return history  CheatSheetHistory CheatSheetHistory getCheatSheetHistory CheatSheetHistory CheatSheetRegistryReader getInstance restoreCheatSheetHistory
Answer the workbench state file private File get Cheat Sheet State File I Path path Cheat Sheet Plugin get Plugin get State Location path path append DEFAULT CHEATSHEET STATE FILENAME return path to File  getCheatSheetStateFile IPath CheatSheetPlugin getPlugin getStateLocation DEFAULT_CHEATSHEET_STATE_FILENAME toFile
Returns the Document Builder to be used by the cheat sheets public Document Builder get Document Builder if document Builder null try document Builder Document Builder Factory new Instance new Document Builder catch Exception e I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR CREATING DOCUMENT BUILDER e Cheat Sheet Plugin get Plugin get Log log status return document Builder  DocumentBuilder DocumentBuilder getDocumentBuilder documentBuilder documentBuilder DocumentBuilderFactory newInstance newDocumentBuilder IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getResourceString ICheatSheetResource ERROR_CREATING_DOCUMENT_BUILDER CheatSheetPlugin getPlugin getLog documentBuilder
protected void initialize Image Registry Image Registry reg String image File Name icons full obj16 skip status gif NON NLS 1 URL imageURL Cheat Sheet Plugin get Plugin find new Path image File Name Image Descriptor image Descriptor Image Descriptor create FromURL imageURL reg put I Cheat Sheet Resource CHEATSHEET ITEM SKIP image Descriptor image File Name icons full obj16 complete status gif NON NLS 1 imageURL Cheat Sheet Plugin get Plugin find new Path image File Name image Descriptor Image Descriptor create FromURL imageURL reg put I Cheat Sheet Resource CHEATSHEET ITEM COMPLETE image Descriptor image File Name icons full clcl16 linkto help gif NON NLS 1 imageURL Cheat Sheet Plugin get Plugin find new Path image File Name image Descriptor Image Descriptor create FromURL imageURL reg put I Cheat Sheet Resource CHEATSHEET ITEM HELP image Descriptor image File Name icons full clcl16 start cheatsheet gif NON NLS 1 imageURL Cheat Sheet Plugin get Plugin find new Path image File Name image Descriptor Image Descriptor create FromURL imageURL reg put I Cheat Sheet Resource CHEATSHEET START image Descriptor image File Name icons full clcl16 restart cheatsheet gif NON NLS 1 imageURL Cheat Sheet Plugin get Plugin find new Path image File Name image Descriptor Image Descriptor create FromURL imageURL reg put I Cheat Sheet Resource CHEATSHEET RESTART image Descriptor image File Name icons full clcl16 start task gif NON NLS 1 imageURL Cheat Sheet Plugin get Plugin find new Path image File Name image Descriptor Image Descriptor create FromURL imageURL reg put I Cheat Sheet Resource CHEATSHEET ITEM BUTTON START image Descriptor image File Name icons full clcl16 skip task gif NON NLS 1 imageURL Cheat Sheet Plugin get Plugin find new Path image File Name image Descriptor Image Descriptor create FromURL imageURL reg put I Cheat Sheet Resource CHEATSHEET ITEM BUTTON SKIP image Descriptor image File Name icons full clcl16 complete task gif NON NLS 1 imageURL Cheat Sheet Plugin get Plugin find new Path image File Name image Descriptor Image Descriptor create FromURL imageURL reg put I Cheat Sheet Resource CHEATSHEET ITEM BUTTON COMPLETE image Descriptor image File Name icons full clcl16 restart task gif NON NLS 1 imageURL Cheat Sheet Plugin get Plugin find new Path image File Name image Descriptor Image Descriptor create FromURL imageURL reg put I Cheat Sheet Resource CHEATSHEET ITEM BUTTON RESTART image Descriptor  initializeImageRegistry ImageRegistry imageFileName skip_status CheatSheetPlugin getPlugin imageFileName ImageDescriptor imageDescriptor ImageDescriptor createFromURL ICheatSheetResource CHEATSHEET_ITEM_SKIP imageDescriptor imageFileName complete_status CheatSheetPlugin getPlugin imageFileName imageDescriptor ImageDescriptor createFromURL ICheatSheetResource CHEATSHEET_ITEM_COMPLETE imageDescriptor imageFileName linkto_help CheatSheetPlugin getPlugin imageFileName imageDescriptor ImageDescriptor createFromURL ICheatSheetResource CHEATSHEET_ITEM_HELP imageDescriptor imageFileName start_cheatsheet CheatSheetPlugin getPlugin imageFileName imageDescriptor ImageDescriptor createFromURL ICheatSheetResource CHEATSHEET_START imageDescriptor imageFileName restart_cheatsheet CheatSheetPlugin getPlugin imageFileName imageDescriptor ImageDescriptor createFromURL ICheatSheetResource CHEATSHEET_RESTART imageDescriptor imageFileName start_task CheatSheetPlugin getPlugin imageFileName imageDescriptor ImageDescriptor createFromURL ICheatSheetResource CHEATSHEET_ITEM_BUTTON_START imageDescriptor imageFileName skip_task CheatSheetPlugin getPlugin imageFileName imageDescriptor ImageDescriptor createFromURL ICheatSheetResource CHEATSHEET_ITEM_BUTTON_SKIP imageDescriptor imageFileName complete_task CheatSheetPlugin getPlugin imageFileName imageDescriptor ImageDescriptor createFromURL ICheatSheetResource CHEATSHEET_ITEM_BUTTON_COMPLETE imageDescriptor imageFileName restart_task CheatSheetPlugin getPlugin imageFileName imageDescriptor ImageDescriptor createFromURL ICheatSheetResource CHEATSHEET_ITEM_BUTTON_RESTART imageDescriptor
Platform run new Safe Runnable public void run Input Stream Reader reader null try Read the cheatsheet state file final File state File get Cheat Sheet State File File Input Stream input new File Input Stream state File reader new Input Stream Reader input utf 8 NON NLS 1 I Memento memento XML Memento create Read Root reader I Memento child Mem memento get Child MEMENTO TAG CHEATSHEET HISTORY if child Mem null history restore State child Mem catch File Not Found Exception e Do nothing the file will not exist the first time the workbench in used catch Exception e String message get Resource String I Cheat Sheet Resource ERROR READING STATE FILE I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status finally try if reader null reader close catch IO Exception e Not much to do just catch the exception and keep going String message get Resource String I Cheat Sheet Resource ERROR READING STATE FILE I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status  SafeRunnable InputStreamReader stateFile getCheatSheetStateFile FileInputStream FileInputStream stateFile InputStreamReader IMemento XMLMemento createReadRoot IMemento childMem getChild MEMENTO_TAG_CHEATSHEET_HISTORY childMem restoreState childMem FileNotFoundException getResourceString ICheatSheetResource ERROR_READING_STATE_FILE IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog IOException getResourceString ICheatSheetResource ERROR_READING_STATE_FILE IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog
public void handle Exception Throwable e String message get Resource String I Cheat Sheet Resource ERROR READING STATE FILE I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status  handleException getResourceString ICheatSheetResource ERROR_READING_STATE_FILE IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog
Restores the state of the previously saved cheatsheet history private void restore Cheat Sheet History Platform run new Safe Runnable public void run Input Stream Reader reader null try Read the cheatsheet state file final File state File get Cheat Sheet State File File Input Stream input new File Input Stream state File reader new Input Stream Reader input utf 8 NON NLS 1 I Memento memento XML Memento create Read Root reader I Memento child Mem memento get Child MEMENTO TAG CHEATSHEET HISTORY if child Mem null history restore State child Mem catch File Not Found Exception e Do nothing the file will not exist the first time the workbench in used catch Exception e String message get Resource String I Cheat Sheet Resource ERROR READING STATE FILE I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status finally try if reader null reader close catch IO Exception e Not much to do just catch the exception and keep going String message get Resource String I Cheat Sheet Resource ERROR READING STATE FILE I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status public void handle Exception Throwable e String message get Resource String I Cheat Sheet Resource ERROR READING STATE FILE I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status  restoreCheatSheetHistory SafeRunnable InputStreamReader stateFile getCheatSheetStateFile FileInputStream FileInputStream stateFile InputStreamReader IMemento XMLMemento createReadRoot IMemento childMem getChild MEMENTO_TAG_CHEATSHEET_HISTORY childMem restoreState childMem FileNotFoundException getResourceString ICheatSheetResource ERROR_READING_STATE_FILE IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog IOException getResourceString ICheatSheetResource ERROR_READING_STATE_FILE IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog handleException getResourceString ICheatSheetResource ERROR_READING_STATE_FILE IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog
Platform run new Safe Runnable public void run XML Memento memento XML Memento create Write Root MEMENTO TAG CHEATSHEET Save the version number memento put String MEMENTO TAG VERSION VERSION STRING 1 Save perspective history get Cheat Sheet History save State memento create Child MEMENTO TAG CHEATSHEET HISTORY Save the I Memento to a file File state File get Cheat Sheet State File Output Stream Writer writer null try File Output Stream stream new File Output Stream state File writer new Output Stream Writer stream utf 8 NON NLS 1 memento save writer catch IO Exception e state File delete String message get Resource String I Cheat Sheet Resource ERROR WRITING STATE FILE I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status finally try if writer null writer close catch IO Exception e String message get Resource String I Cheat Sheet Resource ERROR WRITING STATE FILE I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status  SafeRunnable XMLMemento XMLMemento createWriteRoot MEMENTO_TAG_CHEATSHEET putString MEMENTO_TAG_VERSION VERSION_STRING getCheatSheetHistory saveState createChild MEMENTO_TAG_CHEATSHEET_HISTORY IMemento stateFile getCheatSheetStateFile OutputStreamWriter FileOutputStream FileOutputStream stateFile OutputStreamWriter IOException stateFile getResourceString ICheatSheetResource ERROR_WRITING_STATE_FILE IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog IOException getResourceString ICheatSheetResource ERROR_WRITING_STATE_FILE IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog
public void handle Exception Throwable e String message get Resource String I Cheat Sheet Resource ERROR WRITING STATE FILE I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status  handleException getResourceString ICheatSheetResource ERROR_WRITING_STATE_FILE IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog
Saves the current cheatsheet history so it can be restored later on private void save Cheat Sheet History Platform run new Safe Runnable public void run XML Memento memento XML Memento create Write Root MEMENTO TAG CHEATSHEET Save the version number memento put String MEMENTO TAG VERSION VERSION STRING 1 Save perspective history get Cheat Sheet History save State memento create Child MEMENTO TAG CHEATSHEET HISTORY Save the I Memento to a file File state File get Cheat Sheet State File Output Stream Writer writer null try File Output Stream stream new File Output Stream state File writer new Output Stream Writer stream utf 8 NON NLS 1 memento save writer catch IO Exception e state File delete String message get Resource String I Cheat Sheet Resource ERROR WRITING STATE FILE I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status finally try if writer null writer close catch IO Exception e String message get Resource String I Cheat Sheet Resource ERROR WRITING STATE FILE I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status public void handle Exception Throwable e String message get Resource String I Cheat Sheet Resource ERROR WRITING STATE FILE I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status  saveCheatSheetHistory SafeRunnable XMLMemento XMLMemento createWriteRoot MEMENTO_TAG_CHEATSHEET putString MEMENTO_TAG_VERSION VERSION_STRING getCheatSheetHistory saveState createChild MEMENTO_TAG_CHEATSHEET_HISTORY IMemento stateFile getCheatSheetStateFile OutputStreamWriter FileOutputStream FileOutputStream stateFile OutputStreamWriter IOException stateFile getResourceString ICheatSheetResource ERROR_WRITING_STATE_FILE IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog IOException getResourceString ICheatSheetResource ERROR_WRITING_STATE_FILE IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog handleException getResourceString ICheatSheetResource ERROR_WRITING_STATE_FILE IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog
public void start Bundle Context context throws Exception super start context plugin this allow the MRU history to be lazily initialized by get Cheat Sheet History  BundleContext getCheatSheetHistory
public void stop Bundle Context context throws Exception super stop context save the MRU history if necessary if we never restored history let existing memento stand if history null save Cheat Sheet History Cheat Sheet Registry Reader get Instance stop  BundleContext saveCheatSheetHistory CheatSheetRegistryReader getInstance

private Map table private Cheat Sheet Stop Watch  CheatSheetStopWatch
public static Cheat Sheet Stop Watch get Instance if stop Watch null stop Watch new Cheat Sheet Stop Watch return stop Watch  CheatSheetStopWatch getInstance stopWatch stopWatch CheatSheetStopWatch stopWatch
public void start String key Assert is Not Null key Entry entry get Entry key if entry null entry new Entry put Entry key entry else reset Entry entry entry start System current Time Millis  isNotNull getEntry putEntry resetEntry currentTimeMillis
public void stop String key Assert is Not Null key Entry entry get Entry key Assert is True entry null entry start 1 start must be called before using stop NON NLS 1 entry stop System current Time Millis  isNotNull getEntry isTrue currentTimeMillis
public long total Elapsed Time String key Assert is Not Null key Entry entry get Entry key Assert is True entry null entry start 1 start must be called before using total Elapsed Time NON NLS 1 Assert is True entry stop 1 stop must be called before using total Elapsed Time NON NLS 1 return entry stop entry start  totalElapsedTime isNotNull getEntry isTrue totalElapsedTime isTrue totalElapsedTime
public void lap Time String key Assert is Not Null key Entry entry get Entry key Assert is True entry null entry start 1 start must be called before using lap Time NON NLS 1 if entry current Lap 1 entry previous Lap entry start else entry previous Lap entry current Lap entry current Lap System current Time Millis  lapTime isNotNull getEntry isTrue lapTime currentLap previousLap previousLap currentLap currentLap currentTimeMillis
public long elapsed Time String key Assert is Not Null key Entry entry get Entry key Assert is True entry current Lap 1 lap Time must be called before using elapsed Time NON NLS 1 return entry current Lap entry previous Lap  elapsedTime isNotNull getEntry isTrue currentLap lapTime elapsedTime currentLap previousLap
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 void reset Entry Entry entry entry start 1 entry stop 1 entry current Lap 1 entry previous Lap 1  resetEntry currentLap previousLap
private Map get Table if table null table new Hash Map 10 return table  getTable HashMap
public static boolean is Tracing if Cheat Sheet Plugin get Plugin is Debugging String trace Times Platform get Debug Option org eclipse ui cheatsheets trace creation times NON NLS 1 if trace Times null trace Times equals Ignore Case true NON NLS 1 return true return false  isTracing CheatSheetPlugin getPlugin isDebugging traceTimes getDebugOption traceTimes traceTimes equalsIgnoreCase
public static void start Stop Watch String key if is Tracing get Instance start key  startStopWatch isTracing getInstance
public static void print Total Time String key String message if is Tracing get Instance stop key System out print message System out println get Instance total Elapsed Time key  printTotalTime isTracing getInstance getInstance totalElapsedTime
public static void print Lap Time String key String message if is Tracing get Instance lap Time key System out print message System out println get Instance elapsed Time key  printLapTime isTracing getInstance lapTime getInstance elapsedTime

public abstract class Abstract Sub Item public Abstract Sub Item super  AbstractSubItem AbstractSubItem

private String when public Action super 
This method returns the class specified to be run when the click to perform button is pressed for this item return the class name to be run for the item public String get Action Class return action Class  getActionClass actionClass
This method returns an array of parameters specified to be passed to the action class when it is run in the cheat sheet return an array of string parameters that are passed to the action class when it is run public String get Params return params  getParams
This method returns the string id of the plugin that contains the action class to be run return the id of the plugin that has the action class public String get PluginID return pluginID  getPluginID
This method returns the expression to be used when determining if this action should used return the when expression to be used for this action public String get When return when  getWhen
Returns whether this action needs to be manually confirmed by the user return code true code when the action needs to be confirmed and code false code otherwise public boolean is Confirm return confirm  isConfirm
This method allows you to specify the class to be run when the perform button is pressed for this item in the cheat sheet param classname the class to be run by the item in the cheat sheet public void set Class String aclass this action Class aclass  setClass actionClass
This method allows you to set the string parameters to be passed to the action class on running it in the cheat sheet param params an array of strings that is passed to the action class on running the action public void set Params String params this params params  setParams
This method allows to set the plugin id of the action to be run by this item in the cheat sheet param plugin Id the id of the plugin containing the action class specified for this item public void set PluginID String plugin Id this pluginID plugin Id  pluginId setPluginID pluginId pluginId
Set whether this action needs to be manually confirmed by the user param value The new value of the confirm state public void set Confirm boolean value this confirm value  setConfirm
Indicates this action is to be used if and only if the value of the condition attribute of the containing perform when element matches this string value This attribute is ignored if the action element is not a child of a perform when element param when The expression to use when determine if this action should be used public void set When String when this when when  setWhen

Creates a new cheat sheet public Cheat Sheet  CheatSheet
This method sets the title of cheat sheet param title the title of cheat sheet public void set Title String title this title title  setTitle
This method returns the title of the cheat sheet return the title of the cheat sheet public String get Title return title  getTitle
Returns the intro item public Item get Intro Item return intro Item  getIntroItem introItem
Returns the items public Array List get Items return items  ArrayList getItems
Returns the intro item public void set Intro Item Item intro intro Item intro  setIntroItem introItem
Adds an item to the cheat sheet param item the item to add public void add Item Item item if items null items new Array List items add item  addItem ArrayList
Adds all the items from the collection to the cheat sheet param c the collection of items to add public void add Items Collection c if items null items new Array List items add All c  addItems ArrayList addAll

class Cheat Sheet Parser Exception extends Exception public Cheat Sheet Parser Exception String message super message  CheatSheetParserException CheatSheetParserException
Java constructor comment public Cheat Sheet Parser super document Builder Cheat Sheet Plugin get Plugin get Document Builder  CheatSheetParser documentBuilder CheatSheetPlugin getPlugin getDocumentBuilder
Converts any characters required to escaped by an XML parser to their escaped counterpart CharactersXML escaped counterpart lt gt amp apos quot Tags that will be ignored b b and br param text the string buffer to have its characters escaped return string buffer with any of the characters requiring XML escaping escaped private String Buffer escapeXML Characters String Buffer text Set the maximum length of the tags to ignore final int MAXIMUM TAG LENGTH 5 Keep a local variable for the orignal string s length int length text length Create the buffer to store the resulting string String Buffer result new String Buffer length Loop for the characters of the original string for int i 0 i length i Grab the next character and determine how to handle it char c text char At i switch c case We have a less than grab the maximum tag length of characters or the remaining characters which follow and determine if it is the start of a tag to ignore String tmp I Cheat Sheet Resource EMPTY STRING if i MAXIMUM TAG LENGTH length tmp text substring i i MAXIMUM TAG LENGTH to Lower Case else tmp text substring i length to Lower Case if tmp starts With I Parser Tags BOLD START TAG tmp starts With I Parser Tags BOLD END TAG tmp starts With I Parser Tags BREAK TAG We have a tag to ignore so just emit the character result append c else We have detemined that it is just a less than so emit the XML escaped counterpart result append I Parser Tags LESS THAN break case We have a greater than grab the maximum tag length of characters or the starting characters which come before and determine if it is the end of a tag to ignore String tmp I Cheat Sheet Resource EMPTY STRING if i MAXIMUM TAG LENGTH tmp text substring i MAXIMUM TAG LENGTH i 1 to Lower Case else tmp text substring 0 i 1 to Lower Case if tmp ends With I Parser Tags BOLD START TAG tmp ends With I Parser Tags BOLD END TAG tmp ends With I Parser Tags BREAK TAG We have a tag to ignore so just emit the character result append c else We have detemined that it is just a greater than so emit the XML escaped counterpart result append I Parser Tags GREATER THAN break case We have an ampersand so emit the XML escaped counterpart result append I Parser Tags AMPERSAND break case We have an apostrophe so emit the XML escaped counterpart result append I Parser Tags APOSTROPHE break case We have a quote so emit the XML escaped counterpart result append I Parser Tags QUOTE break default We have a character that does not require escaping result append c break return result  StringBuffer escapeXMLCharacters StringBuffer MAXIMUM_TAG_LENGTH StringBuffer StringBuffer charAt ICheatSheetResource EMPTY_STRING MAXIMUM_TAG_LENGTH MAXIMUM_TAG_LENGTH toLowerCase toLowerCase startsWith IParserTags BOLD_START_TAG startsWith IParserTags BOLD_END_TAG startsWith IParserTags BREAK_TAG IParserTags LESS_THAN ICheatSheetResource EMPTY_STRING MAXIMUM_TAG_LENGTH MAXIMUM_TAG_LENGTH toLowerCase toLowerCase endsWith IParserTags BOLD_START_TAG endsWith IParserTags BOLD_END_TAG endsWith IParserTags BREAK_TAG IParserTags GREATER_THAN IParserTags IParserTags IParserTags
private Node find Node Node start Node String node Name if start Node null return null if start Node get Node Name equals node Name return start Node Node List nodes start Node get Child Nodes for int i 0 i nodes get Length i Node node nodes item i if node get Node Name equals node Name return node return null  findNode startNode nodeName startNode startNode getNodeName nodeName startNode NodeList startNode getChildNodes getLength getNodeName nodeName
private void handle Action I Action Item item Node action Node throws Cheat Sheet Parser Exception Assert is Not Null item Assert is Not Null action Node Assert is True action Node get Node Name equals I Parser Tags ACTION Action action new Action String params null boolean class Attr false boolean plugin Id false Named Node Map attributes action Node get Attributes if attributes null for int x 0 x attributes get Length x Node attribute attributes item x String attribute Name attribute get Node Name if attribute null attribute Name null continue if attribute Name equals I Parser Tags PLUGINID plugin Id true action set PluginID attribute get Node Value else if attribute Name equals I Parser Tags CLASS class Attr true action set Class attribute get Node Value else if attribute Name equals I Parser Tags CONFIRM action set Confirm attribute get Node Value equals TRUE STRING else if attribute Name starts With I Parser Tags PARAM try if params null params new String 9 String param Num attribute Name substring I Parser Tags PARAM length int num Integer parse Int param Num 1 if num 1 num 9 params num attribute get Node Value else String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR PARSING PARAM INVALIDRANGE new Object attribute Name param Num throw new Number Format Exception message catch Number Format Exception e String message Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR PARSING PARAM INVALIDNUMBER log Message I Status ERROR false message null e throw new Cheat Sheet Parser Exception message else if attribute Name equals I Parser Tags WHEN action set When attribute get Node Value else String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource WARNING PARSING UNKNOWN ATTRIBUTE new Object attribute Name action Node get Node Name log Message I Status WARNING false message null null if class Attr String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR PARSING NO CLASS new Object action Node get Node Name throw new Cheat Sheet Parser Exception message if plugin Id String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR PARSING NO PLUGINID new Object action Node get Node Name throw new Cheat Sheet Parser Exception message if params null action set Params params item set Action action  handleAction IActionItem actionNode CheatSheetParserException isNotNull isNotNull actionNode isTrue actionNode getNodeName IParserTags classAttr pluginId NamedNodeMap actionNode getAttributes getLength attributeName getNodeName attributeName attributeName IParserTags pluginId setPluginID getNodeValue attributeName IParserTags classAttr setClass getNodeValue attributeName IParserTags setConfirm getNodeValue TRUE_STRING attributeName startsWith IParserTags paramNum attributeName IParserTags parseInt paramNum getNodeValue CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_PARSING_PARAM_INVALIDRANGE attributeName paramNum NumberFormatException NumberFormatException CheatSheetPlugin getResourceString ICheatSheetResource ERROR_PARSING_PARAM_INVALIDNUMBER logMessage IStatus CheatSheetParserException attributeName IParserTags setWhen getNodeValue CheatSheetPlugin formatResourceString ICheatSheetResource WARNING_PARSING_UNKNOWN_ATTRIBUTE attributeName actionNode getNodeName logMessage IStatus classAttr CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_PARSING_NO_CLASS actionNode getNodeName CheatSheetParserException pluginId CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_PARSING_NO_PLUGINID actionNode getNodeName CheatSheetParserException setParams setAction
private void handle Cheat Sheet Cheat Sheet cheat Sheet Node cheat Sheet Node throws Cheat Sheet Parser Exception Assert is Not Null cheat Sheet Assert is Not Null cheat Sheet Node Assert is True cheat Sheet Node get Node Name equals I Parser Tags CHEATSHEET boolean title false Named Node Map attributes cheat Sheet Node get Attributes if attributes null for int x 0 x attributes get Length x Node attribute attributes item x String attribute Name attribute get Node Name if attribute null attribute Name null continue if attribute Name equals I Parser Tags TITLE title true cheat Sheet set Title attribute get Node Value else String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource WARNING PARSING UNKNOWN ATTRIBUTE new Object attribute Name cheat Sheet Node get Node Name log Message I Status WARNING false message null null if title String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR PARSING NO TITLE new Object cheat Sheet Node get Node Name throw new Cheat Sheet Parser Exception message  handleCheatSheet CheatSheet cheatSheet cheatSheetNode CheatSheetParserException isNotNull cheatSheet isNotNull cheatSheetNode isTrue cheatSheetNode getNodeName IParserTags NamedNodeMap cheatSheetNode getAttributes getLength attributeName getNodeName attributeName attributeName IParserTags cheatSheet setTitle getNodeValue CheatSheetPlugin formatResourceString ICheatSheetResource WARNING_PARSING_UNKNOWN_ATTRIBUTE attributeName cheatSheetNode getNodeName logMessage IStatus CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_PARSING_NO_TITLE cheatSheetNode getNodeName CheatSheetParserException
private void handle Conditional Sub Item Item item Node conditional Sub Item Node throws Cheat Sheet Parser Exception Assert is Not Null item Assert is Not Null conditional Sub Item Node Assert is True conditional Sub Item Node get Node Name equals I Parser Tags CONDITIONALSUBITEM Conditional Sub Item conditional Sub Item new Conditional Sub Item boolean condition false Handle attributes Named Node Map attributes conditional Sub Item Node get Attributes if attributes null for int x 0 x attributes get Length x Node attribute attributes item x String attribute Name attribute get Node Name if attribute null attribute Name null continue if attribute Name equals I Parser Tags CONDITION condition true conditional Sub Item set Condition attribute get Node Value else String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource WARNING PARSING UNKNOWN ATTRIBUTE new Object attribute Name conditional Sub Item Node get Node Name log Message I Status WARNING false message null null if condition String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR PARSING NO CONDITION new Object conditional Sub Item Node get Node Name throw new Cheat Sheet Parser Exception message boolean subitem false Handle nodes Node List nodes conditional Sub Item Node get Child Nodes for int i 0 i nodes get Length i Node node nodes item i if node get Node Name equals I Parser Tags SUBITEM subitem true handle Sub Item conditional Sub Item node else if node get Node Type Node TEXT NODE node get Node Type Node COMMENT NODE String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource WARNING PARSING UNKNOWN ELEMENT new Object node get Node Name conditional Sub Item Node get Node Name log Message I Status WARNING false message null null if subitem String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR PARSING NO SUBITEM new Object conditional Sub Item Node get Node Name throw new Cheat Sheet Parser Exception message item add Sub Item conditional Sub Item  handleConditionalSubItem conditionalSubItemNode CheatSheetParserException isNotNull isNotNull conditionalSubItemNode isTrue conditionalSubItemNode getNodeName IParserTags ConditionalSubItem conditionalSubItem ConditionalSubItem NamedNodeMap conditionalSubItemNode getAttributes getLength attributeName getNodeName attributeName attributeName IParserTags conditionalSubItem setCondition getNodeValue CheatSheetPlugin formatResourceString ICheatSheetResource WARNING_PARSING_UNKNOWN_ATTRIBUTE attributeName conditionalSubItemNode getNodeName logMessage IStatus CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_PARSING_NO_CONDITION conditionalSubItemNode getNodeName CheatSheetParserException NodeList conditionalSubItemNode getChildNodes getLength getNodeName IParserTags handleSubItem conditionalSubItem getNodeType TEXT_NODE getNodeType COMMENT_NODE CheatSheetPlugin formatResourceString ICheatSheetResource WARNING_PARSING_UNKNOWN_ELEMENT getNodeName conditionalSubItemNode getNodeName logMessage IStatus CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_PARSING_NO_SUBITEM conditionalSubItemNode getNodeName CheatSheetParserException addSubItem conditionalSubItem
private void handle Description Item item Node start Node throws Cheat Sheet Parser Exception Assert is Not Null item Assert is Not Null start Node Node description Node find Node start Node I Parser Tags DESCRIPTION if description Node null Node List nodes description Node get Child Nodes String Buffer text new String Buffer boolean contains Markup false for int i 0 i nodes get Length i Node node nodes item i if node get Node Type Node TEXT NODE text append node get Node Value else if node get Node Type Node ELEMENT NODE handle b b and br if node get Node Name equals I Parser Tags BOLD contains Markup true text append I Parser Tags BOLD START TAG text append node get First Child get Node Value text append I Parser Tags BOLD END TAG else if node get Node Name equals I Parser Tags BREAK contains Markup true text append I Parser Tags BREAK TAG else Node parent Node start Node if start Node get Node Name equals I Parser Tags DESCRIPTION parent Node start Node get Parent Node String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource WARNING PARSING DESCRIPTION UNKNOWN ELEMENT new Object parent Node get Node Name node get Node Name log Message I Status WARNING false message null null if contains Markup text escapeXML Characters text text insert 0 I Parser Tags FORM START TAG text append I Parser Tags FORM END TAG Remove the new line form feed and tab chars item set Description text to String trim else Node parent Node start Node if start Node get Node Name equals I Parser Tags DESCRIPTION parent Node start Node get Parent Node String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR PARSING NO DESCRIPTION new Object parent Node get Node Name throw new Cheat Sheet Parser Exception message  handleDescription startNode CheatSheetParserException isNotNull isNotNull startNode descriptionNode findNode startNode IParserTags descriptionNode NodeList descriptionNode getChildNodes StringBuffer StringBuffer containsMarkup getLength getNodeType TEXT_NODE getNodeValue getNodeType ELEMENT_NODE getNodeName IParserTags containsMarkup IParserTags BOLD_START_TAG getFirstChild getNodeValue IParserTags BOLD_END_TAG getNodeName IParserTags containsMarkup IParserTags BREAK_TAG parentNode startNode startNode getNodeName IParserTags parentNode startNode getParentNode CheatSheetPlugin formatResourceString ICheatSheetResource WARNING_PARSING_DESCRIPTION_UNKNOWN_ELEMENT parentNode getNodeName getNodeName logMessage IStatus containsMarkup escapeXMLCharacters IParserTags FORM_START_TAG IParserTags FORM_END_TAG setDescription toString parentNode startNode startNode getNodeName IParserTags parentNode startNode getParentNode CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_PARSING_NO_DESCRIPTION parentNode getNodeName CheatSheetParserException
private void handle Intro Cheat Sheet cheat Sheet Document document throws Cheat Sheet Parser Exception Assert is Not Null cheat Sheet Assert is Not Null document Get the Intro item Node List intro List document get Elements By Tag Name I Parser Tags INTRO Node intro Node intro List item 0 if intro Node null Error there is no intro throw new Cheat Sheet Parser Exception Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR PARSING NO INTRO if intro List get Length 1 Error there are more than 1 intro throw new Cheat Sheet Parser Exception Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR PARSING MORE THAN ONE INTRO Item intro Item new Item intro Item set Title Cheat Sheet Plugin get Resource String I Cheat Sheet Resource CHEAT SHEET INTRO TITLE handle Intro Attributes intro Item intro Node handle Description intro Item intro Node cheat Sheet set Intro Item intro Item  handleIntro CheatSheet cheatSheet CheatSheetParserException isNotNull cheatSheet isNotNull NodeList introList getElementsByTagName IParserTags introNode introList introNode CheatSheetParserException CheatSheetPlugin getResourceString ICheatSheetResource ERROR_PARSING_NO_INTRO introList getLength CheatSheetParserException CheatSheetPlugin getResourceString ICheatSheetResource ERROR_PARSING_MORE_THAN_ONE_INTRO introItem introItem setTitle CheatSheetPlugin getResourceString ICheatSheetResource CHEAT_SHEET_INTRO_TITLE handleIntroAttributes introItem introNode handleDescription introItem introNode cheatSheet setIntroItem introItem
private void handle Intro Attributes Item item Node intro Node Assert is Not Null item Assert is Not Null intro Node Named Node Map attributes intro Node get Attributes if attributes null for int x 0 x attributes get Length x Node attribute attributes item x String attribute Name attribute get Node Name if attribute null attribute Name null continue if attribute Name equals I Parser Tags CONTEXTID item set Context Id attribute get Node Value else if attribute Name equals I Parser Tags HREF item set Href attribute get Node Value else String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource WARNING PARSING UNKNOWN ATTRIBUTE new Object attribute Name intro Node get Node Name log Message I Status WARNING false message null null  handleIntroAttributes introNode isNotNull isNotNull introNode NamedNodeMap introNode getAttributes getLength attributeName getNodeName attributeName attributeName IParserTags setContextId getNodeValue attributeName IParserTags setHref getNodeValue CheatSheetPlugin formatResourceString ICheatSheetResource WARNING_PARSING_UNKNOWN_ATTRIBUTE attributeName introNode getNodeName logMessage IStatus
private Item handle Item Node item Node throws Cheat Sheet Parser Exception Assert is Not Null item Node Assert is True item Node get Node Name equals I Parser Tags ITEM Item item new Item handle Item Attributes item item Node boolean description false Node List nodes item Node get Child Nodes for int i 0 i nodes get Length i Node node nodes item i if node get Node Name equals I Parser Tags ACTION handle Action item node else if node get Node Name equals I Parser Tags DESCRIPTION description true handle Description item node else if node get Node Name equals I Parser Tags SUBITEM handle Sub Item item node else if node get Node Name equals I Parser Tags CONDITIONALSUBITEM handle Conditional Sub Item item node else if node get Node Name equals I Parser Tags REPEATEDSUBITM handle Repeated Sub Item item node else if node get Node Name equals I Parser Tags PERFORMWHEN handle Perform When item node else if node get Node Type Node TEXT NODE node get Node Type Node COMMENT NODE String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource WARNING PARSING UNKNOWN ELEMENT new Object node get Node Name item Node get Node Name log Message I Status WARNING false message null null if description String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR PARSING NO DESCRIPTION new Object item Node get Node Name throw new Cheat Sheet Parser Exception message return item  handleItem itemNode CheatSheetParserException isNotNull itemNode isTrue itemNode getNodeName IParserTags handleItemAttributes itemNode NodeList itemNode getChildNodes getLength getNodeName IParserTags handleAction getNodeName IParserTags handleDescription getNodeName IParserTags handleSubItem getNodeName IParserTags handleConditionalSubItem getNodeName IParserTags handleRepeatedSubItem getNodeName IParserTags handlePerformWhen getNodeType TEXT_NODE getNodeType COMMENT_NODE CheatSheetPlugin formatResourceString ICheatSheetResource WARNING_PARSING_UNKNOWN_ELEMENT getNodeName itemNode getNodeName logMessage IStatus CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_PARSING_NO_DESCRIPTION itemNode getNodeName CheatSheetParserException
private void handle Item Attributes Item item Node item Node throws Cheat Sheet Parser Exception Assert is Not Null item Assert is Not Null item Node Array List item Extension Elements new Array List boolean title false Named Node Map attributes item Node get Attributes if attributes null for int x 0 x attributes get Length x Node attribute attributes item x String attribute Name attribute get Node Name if attribute null attribute Name null continue if attribute Name equals I Parser Tags TITLE title true item set Title attribute get Node Value else if attribute Name equals I Parser Tags CONTEXTID item set Context Id attribute get Node Value else if attribute Name equals I Parser Tags HREF item set Href attribute get Node Value else if attribute Name equals I Parser Tags SKIP item set Skip attribute get Node Value equals TRUE STRING else Abstract Item Extension Element ie handle Unknown Item Attribute attribute item Node if ie null item Extension Elements add ie if title String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR PARSING NO TITLE new Object item Node get Node Name throw new Cheat Sheet Parser Exception message if item Extension Elements null item set Item Extensions item Extension Elements  handleItemAttributes itemNode CheatSheetParserException isNotNull isNotNull itemNode ArrayList itemExtensionElements ArrayList NamedNodeMap itemNode getAttributes getLength attributeName getNodeName attributeName attributeName IParserTags setTitle getNodeValue attributeName IParserTags setContextId getNodeValue attributeName IParserTags setHref getNodeValue attributeName IParserTags setSkip getNodeValue TRUE_STRING AbstractItemExtensionElement handleUnknownItemAttribute itemNode itemExtensionElements CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_PARSING_NO_TITLE itemNode getNodeName CheatSheetParserException itemExtensionElements setItemExtensions itemExtensionElements
private void handle Items Cheat Sheet cheat Sheet Document document throws Cheat Sheet Parser Exception Get the items Node List item List document get Elements By Tag Name I Parser Tags ITEM if item List null item List get Length 0 throw new Cheat Sheet Parser Exception Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR PARSING NO ITEM parse the items assemble Cheat Sheet Item objects Array List items handle Items item List if items null items size 0 This should never occur but just to be safe let s check throw new Cheat Sheet Parser Exception Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR PARSING NO ITEM cheat Sheet add Items items  handleItems CheatSheet cheatSheet CheatSheetParserException NodeList itemList getElementsByTagName IParserTags itemList itemList getLength CheatSheetParserException CheatSheetPlugin getResourceString ICheatSheetResource ERROR_PARSING_NO_ITEM CheatSheetItem ArrayList handleItems itemList CheatSheetParserException CheatSheetPlugin getResourceString ICheatSheetResource ERROR_PARSING_NO_ITEM cheatSheet addItems
private Array List handle Items Node List item List throws Cheat Sheet Parser Exception Cheat Sheet Registry Reader reader Cheat Sheet Registry Reader get Instance item Extension Container List reader read Item Extensions Array List local List new Array List for int i 0 i item List get Length i get the item node Node item Node item List item i Item item handle Item item Node local List add item return local List  ArrayList handleItems NodeList itemList CheatSheetParserException CheatSheetRegistryReader CheatSheetRegistryReader getInstance itemExtensionContainerList readItemExtensions ArrayList localList ArrayList itemList getLength itemNode itemList handleItem itemNode localList localList
private void handle Perform When I Perform When Item item Node perform When Node throws Cheat Sheet Parser Exception Assert is Not Null item Assert is Not Null perform When Node Assert is True perform When Node get Node Name equals I Parser Tags PERFORMWHEN Perform When perform When new Perform When boolean condition false Handle attributes Named Node Map attributes perform When Node get Attributes if attributes null for int x 0 x attributes get Length x Node attribute attributes item x String attribute Name attribute get Node Name if attribute null attribute Name null continue if attribute Name equals I Parser Tags CONDITION condition true perform When set Condition attribute get Node Value else String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource WARNING PARSING UNKNOWN ATTRIBUTE new Object attribute Name perform When Node get Node Name log Message I Status WARNING false message null null if condition String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR PARSING NO CONDITION new Object perform When Node get Node Name throw new Cheat Sheet Parser Exception message boolean action false Handle nodes Node List nodes perform When Node get Child Nodes for int i 0 i nodes get Length i Node node nodes item i if node get Node Name equals I Parser Tags ACTION action true handle Action perform When node else if node get Node Type Node TEXT NODE node get Node Type Node COMMENT NODE String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource WARNING PARSING UNKNOWN ELEMENT new Object node get Node Name perform When Node get Node Name log Message I Status WARNING false message null null if action String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR PARSING NO ACTION new Object perform When Node get Node Name throw new Cheat Sheet Parser Exception message item set Perform When perform When  handlePerformWhen IPerformWhenItem performWhenNode CheatSheetParserException isNotNull isNotNull performWhenNode isTrue performWhenNode getNodeName IParserTags PerformWhen performWhen PerformWhen NamedNodeMap performWhenNode getAttributes getLength attributeName getNodeName attributeName attributeName IParserTags performWhen setCondition getNodeValue CheatSheetPlugin formatResourceString ICheatSheetResource WARNING_PARSING_UNKNOWN_ATTRIBUTE attributeName performWhenNode getNodeName logMessage IStatus CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_PARSING_NO_CONDITION performWhenNode getNodeName CheatSheetParserException NodeList performWhenNode getChildNodes getLength getNodeName IParserTags handleAction performWhen getNodeType TEXT_NODE getNodeType COMMENT_NODE CheatSheetPlugin formatResourceString ICheatSheetResource WARNING_PARSING_UNKNOWN_ELEMENT getNodeName performWhenNode getNodeName logMessage IStatus CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_PARSING_NO_ACTION performWhenNode getNodeName CheatSheetParserException setPerformWhen performWhen
private void handle Repeated Sub Item Item item Node repeated Sub Item Node throws Cheat Sheet Parser Exception Assert is Not Null item Assert is Not Null repeated Sub Item Node Assert is True repeated Sub Item Node get Node Name equals I Parser Tags REPEATEDSUBITM Repeated Sub Item repeated Sub Item new Repeated Sub Item boolean values false Handle attributes Named Node Map attributes repeated Sub Item Node get Attributes if attributes null for int x 0 x attributes get Length x Node attribute attributes item x String attribute Name attribute get Node Name if attribute null attribute Name null continue if attribute Name equals I Parser Tags VALUES values true repeated Sub Item set Values attribute get Node Value else String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource WARNING PARSING UNKNOWN ATTRIBUTE new Object attribute Name repeated Sub Item Node get Node Name log Message I Status WARNING false message null null if values String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR PARSING NO VALUES new Object repeated Sub Item Node get Node Name throw new Cheat Sheet Parser Exception message boolean subitem false Handle nodes Node List nodes repeated Sub Item Node get Child Nodes for int i 0 i nodes get Length i Node node nodes item i if node get Node Name equals I Parser Tags SUBITEM subitem true handle Sub Item repeated Sub Item node else if node get Node Type Node TEXT NODE node get Node Type Node COMMENT NODE String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource WARNING PARSING UNKNOWN ELEMENT new Object node get Node Name repeated Sub Item Node get Node Name log Message I Status WARNING false message null null if subitem String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR PARSING NO SUBITEM new Object repeated Sub Item Node get Node Name throw new Cheat Sheet Parser Exception message item add Sub Item repeated Sub Item  handleRepeatedSubItem repeatedSubItemNode CheatSheetParserException isNotNull isNotNull repeatedSubItemNode isTrue repeatedSubItemNode getNodeName IParserTags RepeatedSubItem repeatedSubItem RepeatedSubItem NamedNodeMap repeatedSubItemNode getAttributes getLength attributeName getNodeName attributeName attributeName IParserTags repeatedSubItem setValues getNodeValue CheatSheetPlugin formatResourceString ICheatSheetResource WARNING_PARSING_UNKNOWN_ATTRIBUTE attributeName repeatedSubItemNode getNodeName logMessage IStatus CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_PARSING_NO_VALUES repeatedSubItemNode getNodeName CheatSheetParserException NodeList repeatedSubItemNode getChildNodes getLength getNodeName IParserTags handleSubItem repeatedSubItem getNodeType TEXT_NODE getNodeType COMMENT_NODE CheatSheetPlugin formatResourceString ICheatSheetResource WARNING_PARSING_UNKNOWN_ELEMENT getNodeName repeatedSubItemNode getNodeName logMessage IStatus CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_PARSING_NO_SUBITEM repeatedSubItemNode getNodeName CheatSheetParserException addSubItem repeatedSubItem
private void handle Sub Item I Sub Item Item item Node sub Item Node throws Cheat Sheet Parser Exception Assert is Not Null item Assert is Not Null sub Item Node Assert is True sub Item Node get Node Name equals I Parser Tags SUBITEM Sub Item sub Item new Sub Item handle Sub Item Attributes sub Item sub Item Node Node List nodes sub Item Node get Child Nodes for int i 0 i nodes get Length i Node node nodes item i if node get Node Name equals I Parser Tags ACTION handle Action sub Item node else if node get Node Name equals I Parser Tags PERFORMWHEN handle Perform When sub Item node else if node get Node Type Node TEXT NODE node get Node Type Node COMMENT NODE String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource WARNING PARSING UNKNOWN ELEMENT new Object node get Node Name sub Item Node get Node Name log Message I Status WARNING false message null null item add Sub Item sub Item  handleSubItem ISubItemItem subItemNode CheatSheetParserException isNotNull isNotNull subItemNode isTrue subItemNode getNodeName IParserTags SubItem subItem SubItem handleSubItemAttributes subItem subItemNode NodeList subItemNode getChildNodes getLength getNodeName IParserTags handleAction subItem getNodeName IParserTags handlePerformWhen subItem getNodeType TEXT_NODE getNodeType COMMENT_NODE CheatSheetPlugin formatResourceString ICheatSheetResource WARNING_PARSING_UNKNOWN_ELEMENT getNodeName subItemNode getNodeName logMessage IStatus addSubItem subItem
private void handle Sub Item Attributes Sub Item sub Item Node sub Item Node throws Cheat Sheet Parser Exception Assert is Not Null sub Item Assert is Not Null sub Item Node boolean label false Named Node Map attributes sub Item Node get Attributes if attributes null for int x 0 x attributes get Length x Node attribute attributes item x String attribute Name attribute get Node Name if attribute null attribute Name null continue if attribute Name equals I Parser Tags LABEL label true sub Item set Label attribute get Node Value else if attribute Name equals I Parser Tags SKIP sub Item set Skip attribute get Node Value equals TRUE STRING else if attribute Name equals I Parser Tags WHEN sub Item set When attribute get Node Value else String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource WARNING PARSING UNKNOWN ATTRIBUTE new Object attribute Name sub Item Node get Node Name log Message I Status WARNING false message null null if label String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR PARSING NO LABEL new Object sub Item Node get Node Name throw new Cheat Sheet Parser Exception message  handleSubItemAttributes SubItem subItem subItemNode CheatSheetParserException isNotNull subItem isNotNull subItemNode NamedNodeMap subItemNode getAttributes getLength attributeName getNodeName attributeName attributeName IParserTags subItem setLabel getNodeValue attributeName IParserTags subItem setSkip getNodeValue TRUE_STRING attributeName IParserTags subItem setWhen getNodeValue CheatSheetPlugin formatResourceString ICheatSheetResource WARNING_PARSING_UNKNOWN_ATTRIBUTE attributeName subItemNode getNodeName logMessage IStatus CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_PARSING_NO_LABEL subItemNode getNodeName CheatSheetParserException
private Abstract Item Extension Element handle Unknown Item Attribute Node item Node node Array List al new Array List if item Extension Container List null return null for int i 0 i item Extension Container List size i Cheat Sheet Item Extension Element item Extension Element Cheat Sheet Item Extension Element item Extension Container List get i if item Extension Element get Item Attribute equals item get Node Name Abstract Item Extension Element item Element item Extension Element create Instance if item Element null item Element handle Attribute item get Node Value al add item Element if al size 0 String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource WARNING PARSING UNKNOWN ATTRIBUTE new Object item get Node Name node get Node Name log Message I Status WARNING false message null null return Abstract Item Extension Element al to Array new Abstract Item Extension Element al size  AbstractItemExtensionElement handleUnknownItemAttribute ArrayList ArrayList itemExtensionContainerList itemExtensionContainerList CheatSheetItemExtensionElement itemExtensionElement CheatSheetItemExtensionElement itemExtensionContainerList itemExtensionElement getItemAttribute getNodeName AbstractItemExtensionElement itemElement itemExtensionElement createInstance itemElement itemElement handleAttribute getNodeValue itemElement CheatSheetPlugin formatResourceString ICheatSheetResource WARNING_PARSING_UNKNOWN_ATTRIBUTE getNodeName getNodeName logMessage IStatus AbstractItemExtensionElement toArray AbstractItemExtensionElement
param severity param inform User param message param title param exception private void log Message int severity boolean inform User String message String title Throwable exception I Status status new Status severity I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message exception Cheat Sheet Plugin get Plugin get Log log status if inform User org eclipse jface dialogs Error Dialog open Error PlatformUI get Workbench get Active Workbench Window get Shell title null status  informUser logMessage informUser IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog informUser ErrorDialog openError getWorkbench getActiveWorkbenchWindow getShell
public Cheat Sheet parse URL url if url null return null Input Stream is null Input Source input Source null try is url open Stream if is null input Source new Input Source is catch Exception e String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR OPENING FILE new Object url get File log Message I Status ERROR true message Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR TITLE e return null Document document try if document Builder null log Message I Status ERROR false Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR DOCUMENT BUILDER NOT INIT null null return null document document Builder parse input Source catch IO Exception e String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR OPENING FILE IN PARSER new Object url get File log Message I Status ERROR false message null e return null catch SAX Parse Exception spe String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR SAX PARSING WITH LOCATION new Object url get File new Integer spe get Line Number new Integer spe get Column Number log Message I Status ERROR false message null spe return null catch SAX Exception se String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR SAX PARSING new Object url get File log Message I Status ERROR false message null se return null finally try is close catch Exception e try return parse Cheat Sheet document catch Cheat Sheet Parser Exception e log Message I Status ERROR true e get Message Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR TITLE e return null  CheatSheet InputStream InputSource inputSource openStream inputSource InputSource CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_OPENING_FILE getFile logMessage IStatus CheatSheetPlugin getResourceString ICheatSheetResource ERROR_TITLE documentBuilder logMessage IStatus CheatSheetPlugin getResourceString ICheatSheetResource ERROR_DOCUMENT_BUILDER_NOT_INIT documentBuilder inputSource IOException CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_OPENING_FILE_IN_PARSER getFile logMessage IStatus SAXParseException CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_SAX_PARSING_WITH_LOCATION getFile getLineNumber getColumnNumber logMessage IStatus SAXException CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_SAX_PARSING getFile logMessage IStatus parseCheatSheet CheatSheetParserException logMessage IStatus getMessage CheatSheetPlugin getResourceString ICheatSheetResource ERROR_TITLE
private Cheat Sheet parse Cheat Sheet Document document throws Cheat Sheet Parser Exception If the document passed is null return a null tree and update the status if document null Node rootnode document get Document Element Is the root node really cheatsheet if rootnode get Node Name equals I Parser Tags CHEATSHEET throw new Cheat Sheet Parser Exception Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR PARSING CHEATSHEET ELEMENT Create the cheat sheet model object Cheat Sheet cheat Sheet new Cheat Sheet handle Cheat Sheet cheat Sheet rootnode handle Intro cheat Sheet document handle Items cheat Sheet document return cheat Sheet else throw new Cheat Sheet Parser Exception Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR PARSING CHEATSHEET CONTENTS  CheatSheet parseCheatSheet CheatSheetParserException getDocumentElement getNodeName IParserTags CheatSheetParserException CheatSheetPlugin getResourceString ICheatSheetResource ERROR_PARSING_CHEATSHEET_ELEMENT CheatSheet cheatSheet CheatSheet handleCheatSheet cheatSheet handleIntro cheatSheet handleItems cheatSheet cheatSheet CheatSheetParserException CheatSheetPlugin getResourceString ICheatSheetResource ERROR_PARSING_CHEATSHEET_CONTENTS
private String get Normalized Text String text int space Counter new int 1 String Buffer buf new String Buffer if text null return null for int j 0 j text length j char c text char At j if c c t space if space Counter 0 1 buf append c else if c n c r c f new line if space Counter 0 1 buf append else other characters space Counter 0 0 buf append c return buf to String  getNormalizedText spaceCounter StringBuffer StringBuffer charAt spaceCounter spaceCounter spaceCounter toString

Constructor for Cheat Sheet Save Helper public Cheat Sheet Save Helper super save Path Platform get Plugin State Location Cheat Sheet Plugin get Plugin  CheatSheetSaveHelper CheatSheetSaveHelper savePath getPluginStateLocation CheatSheetPlugin getPlugin
private Properties create Properties int current Item Num Array List items boolean button Is Down Array List expand Restore States String csID Properties props new Properties Hashtable subcompleted Table new Hashtable 10 Hashtable subskipped Table new Hashtable 10 int button State 0 if button Is Down button State 1 props put I Parser Tags ID csID props put I Parser Tags CURRENT Integer to String current Item Num Array List completed List new Array List Array List expanded List new Array List if expand Restore States null expand Restore States new Array List Assemble lists of expanded items and completed items for int i 0 i items size i View Item item View Item items get i if item is Completed completed List add Integer to String i if item is Expanded expanded List add Integer to String i if item instanceof Core Item Core Item withsubs Core Item item Array List comp List withsubs get List Of Sub Item Composite Holders if comp List null String Buffer skippedsub Items new String Buffer String Buffer completedsub Items new String Buffer for int j 0 j comp List size j Sub Item Composite Holder sch Sub Item Composite Holder comp List get j if sch is Completed completedsub Items append Integer to String j NON NLS 1 if sch is Skipped skippedsub Items append Integer to String j NON NLS 1 if completedsub Items to String length 0 String csi completedsub Items to String if csi ends With NON NLS 1 csi csi substring 0 csi length 1 subcompleted Table put Integer to String i csi if skippedsub Items to String length 0 String csi skippedsub Items to String if csi ends With NON NLS 1 csi csi substring 0 csi length 1 subskipped Table put Integer to String i csi put expanded item list completed list button state props put I Parser Tags COMPLETED completed List props put I Parser Tags EXPANDED expanded List props put I Parser Tags EXPANDRESTORE expand Restore States props put I Parser Tags BUTTON Integer to String button State if subcompleted Table null props put I Parser Tags SUBITEMCOMPLETED subcompleted Table if subskipped Table null props put I Parser Tags SUBITEMSKIPPED subskipped Table return props  createProperties currentItemNum ArrayList buttonIsDown ArrayList expandRestoreStates subcompletedTable subskippedTable buttonState buttonIsDown buttonState IParserTags IParserTags toString currentItemNum ArrayList completedList ArrayList ArrayList expandedList ArrayList expandRestoreStates expandRestoreStates ArrayList ViewItem ViewItem isCompleted completedList toString isExpanded expandedList toString CoreItem CoreItem CoreItem ArrayList compList getListOfSubItemCompositeHolders compList StringBuffer skippedsubItems StringBuffer StringBuffer completedsubItems StringBuffer compList SubItemCompositeHolder SubItemCompositeHolder compList isCompleted completedsubItems toString isSkipped skippedsubItems toString completedsubItems toString completedsubItems toString endsWith subcompletedTable toString skippedsubItems toString skippedsubItems toString endsWith subskippedTable toString IParserTags completedList IParserTags expandedList IParserTags expandRestoreStates IParserTags toString buttonState subcompletedTable IParserTags subcompletedTable subskippedTable IParserTags subskippedTable
Method parses attribute from named node map Returns value as string private String get Attribute With Name Named Node Map map String name try return map get Named Item name get Node Value catch Exception e return null  getAttributeWithName NamedNodeMap getNamedItem getNodeValue
Method parses all elements in nodelist attempts to pull out same attribute from each attributes are put into an array list in order they occur in node list elements private Array List get Multiple Attributes With Same Name Node List nl String name Array List return List new Array List for int i 0 i nl get Length i String value nl item i get Attributes get Named Item name get Node Value if value null return List add value return return List  ArrayList getMultipleAttributesWithSameName NodeList ArrayList returnList ArrayList getLength getAttributes getNamedItem getNodeValue returnList returnList
public Path get State File String csID return new Path save Path append csID xml toOS String NON NLS 1  getStateFile savePath toOSString
public Properties load State String csID Properties return Props null Hashtable subskipped null Hashtable subcompleted null Path file Path get State File csID Document doc null URL readURL null try readURL file Path to File toURL doc readXML File readURL catch MalformedURL Exception mue String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR CREATING STATEFILE URL new Object readURL I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message mue Cheat Sheet Plugin get Plugin get Log log status return null if doc null Parse stuff from document here Hashtable ht null Node rootnode doc get Document Element Named Node Map rootatts rootnode get Attributes String currentID get Attribute With Name rootatts I Parser Tags ID String number get Attribute With Name doc get Elements By Tag Name I Parser Tags CURRENT item 0 get Attributes I Parser Tags ITEM Array List complete List get Multiple Attributes With Same Name doc get Elements By Tag Name I Parser Tags COMPLETED I Parser Tags ITEM Array List expanded List get Multiple Attributes With Same Name doc get Elements By Tag Name I Parser Tags EXPANDED I Parser Tags ITEM Array List expand Restore List get Multiple Attributes With Same Name doc get Elements By Tag Name I Parser Tags EXPANDRESTORE I Parser Tags ITEM String button State get Attribute With Name doc get Elements By Tag Name I Parser Tags BUTTON item 0 get Attributes I Parser Tags BUTTONSTATE Node List nl doc get Elements By Tag Name I Parser Tags SUBITEMCOMPLETED if nl null subcompleted new Hashtable 10 for int i 0 i nl get Length i String item get Attribute With Name nl item i get Attributes I Parser Tags ITEM String sub Items get Attribute With Name nl item i get Attributes I Parser Tags SUBITEM subcompleted put item sub Items end for nl Node List snl doc get Elements By Tag Name I Parser Tags SUBITEMSKIPPED if snl null subskipped new Hashtable 10 for int i 0 i snl get Length i String item get Attribute With Name snl item i get Attributes I Parser Tags ITEM String sub Items get Attribute With Name snl item i get Attributes I Parser Tags SUBITEM subskipped put item sub Items end for nl Node List csm Datanl doc get Elements By Tag Name I Parser Tags MANAGERDATA if csm Datanl null ht new Hashtable 30 for int i 0 i csm Datanl get Length i String key null try key get Attribute With Name csm Datanl item i get Attributes I Parser Tags MANAGERDATAKEY String data csm Datanl item i get First Child get Node Value ht put key data catch Exception e String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR READING MANAGERDATA FROM STATEFILE new Object key currentID I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status return Props new Properties return Props put I Parser Tags ID currentID return Props put I Parser Tags CURRENT number return Props put I Parser Tags COMPLETED complete List return Props put I Parser Tags EXPANDED expanded List return Props put I Parser Tags EXPANDRESTORE expand Restore List return Props put I Parser Tags BUTTON button State return Props put I Parser Tags SUBITEMCOMPLETED subcompleted return Props put I Parser Tags SUBITEMSKIPPED subskipped return Props put I Parser Tags MANAGERDATA ht return return Props  loadState returnProps filePath getStateFile filePath toFile readXMLFile MalformedURLException CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_CREATING_STATEFILE_URL IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog getDocumentElement NamedNodeMap getAttributes getAttributeWithName IParserTags getAttributeWithName getElementsByTagName IParserTags getAttributes IParserTags ArrayList completeList getMultipleAttributesWithSameName getElementsByTagName IParserTags IParserTags ArrayList expandedList getMultipleAttributesWithSameName getElementsByTagName IParserTags IParserTags ArrayList expandRestoreList getMultipleAttributesWithSameName getElementsByTagName IParserTags IParserTags buttonState getAttributeWithName getElementsByTagName IParserTags getAttributes IParserTags NodeList getElementsByTagName IParserTags getLength getAttributeWithName getAttributes IParserTags subItems getAttributeWithName getAttributes IParserTags subItems NodeList getElementsByTagName IParserTags getLength getAttributeWithName getAttributes IParserTags subItems getAttributeWithName getAttributes IParserTags subItems NodeList csmDatanl getElementsByTagName IParserTags csmDatanl csmDatanl getLength getAttributeWithName csmDatanl getAttributes IParserTags csmDatanl getFirstChild getNodeValue CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_READING_MANAGERDATA_FROM_STATEFILE IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog returnProps returnProps IParserTags returnProps IParserTags returnProps IParserTags completeList returnProps IParserTags expandedList returnProps IParserTags expandRestoreList returnProps IParserTags buttonState returnProps IParserTags returnProps IParserTags returnProps IParserTags returnProps
returns null if the parse or read fails private Document readXML File URL url Input Stream is null Input Source source null try is url open Stream if is null source new Input Source is catch Exception e return null if source null return null try Document Builder document Builder Cheat Sheet Plugin get Plugin get Document Builder return document Builder parse source catch Exception e finally try if is null is close catch IO Exception ioe return null  readXMLFile InputStream InputSource openStream InputSource DocumentBuilder documentBuilder CheatSheetPlugin getPlugin getDocumentBuilder documentBuilder IOException
private void save State Properties save Properties Cheat Sheet Manager csm String csID null try Document Builder document Builder Document Builder Factory new Instance new Document Builder Document doc document Builder new Document Properties properties save Properties csID String properties get I Parser Tags ID String number String properties get I Parser Tags CURRENT Path file Path get State File csID Array List completed List Array List properties get I Parser Tags COMPLETED Array List expanded List Array List properties get I Parser Tags EXPANDED Array List expand Restore List Array List properties get I Parser Tags EXPANDRESTORE Hashtable subcompleted Table Hashtable properties get I Parser Tags SUBITEMCOMPLETED Hashtable subskipped Table Hashtable properties get I Parser Tags SUBITEMSKIPPED Create the root element for the document now Element root doc create Element I Parser Tags CHEATSHEET root set Attribute I Parser Tags ID csID doc append Child root create current element Element c El doc create Element I Parser Tags CURRENT c El set Attribute I Parser Tags ITEM number root append Child c El for int j 0 j completed List size j Element comp El doc create Element I Parser Tags COMPLETED comp El set Attribute I Parser Tags ITEM String completed List get j root append Child comp El for int j 0 j expanded List size j Element expand El doc create Element I Parser Tags EXPANDED expand El set Attribute I Parser Tags ITEM String expanded List get j root append Child expand El for int j 0 j expand Restore List size j Element e Rel doc create Element I Parser Tags EXPANDRESTORE e Rel set Attribute I Parser Tags ITEM String expand Restore List get j root append Child e Rel if subcompleted Table null Enumeration enum subcompleted Table keys while enum has More Elements String item Num String enum next Element String sub Item Num String subcompleted Table get item Num if item Num null sub Item Num null continue Element e Rel doc create Element I Parser Tags SUBITEMCOMPLETED e Rel set Attribute I Parser Tags ITEM item Num e Rel set Attribute I Parser Tags SUBITEM sub Item Num root append Child e Rel if subskipped Table null Enumeration enum subskipped Table keys while enum has More Elements String item Num String enum next Element String sub Item Num String subskipped Table get item Num if item Num null sub Item Num null continue Element e Rel doc create Element I Parser Tags SUBITEMSKIPPED e Rel set Attribute I Parser Tags ITEM item Num e Rel set Attribute I Parser Tags SUBITEM sub Item Num root append Child e Rel Element bel doc create Element I Parser Tags BUTTON bel set Attribute I Parser Tags BUTTONSTATE String properties get I Parser Tags BUTTON root append Child bel Store cheatsheet data here Hashtable manager Data Hashtable csm get Data if manager Data null Enumeration e manager Data keys while e has More Elements String key String e next Element String data String manager Data get key Element csm Data Tag doc create Element I Parser Tags MANAGERDATA csm Data Tag set Attribute I Parser Tags MANAGERDATAKEY key Text t doc create Text Node data csm Data Tag append Child t root append Child csm Data Tag Stream Result stream Result new Stream Result file Path to File DOM Source dom Source new DOM Source doc Transformer transformer Transformer Factory new Instance new Transformer transformer set Output Property Output Keys METHOD xml NON NLS 1 transformer transform dom Source stream Result catch Exception e String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR SAVING STATEFILE URL new Object csID I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status  saveState saveProperties CheatSheetManager DocumentBuilder documentBuilder DocumentBuilderFactory newInstance newDocumentBuilder documentBuilder newDocument saveProperties IParserTags IParserTags filePath getStateFile ArrayList completedList ArrayList IParserTags ArrayList expandedList ArrayList IParserTags ArrayList expandRestoreList ArrayList IParserTags subcompletedTable IParserTags subskippedTable IParserTags createElement IParserTags setAttribute IParserTags appendChild cEl createElement IParserTags cEl setAttribute IParserTags appendChild cEl completedList compEl createElement IParserTags compEl setAttribute IParserTags completedList appendChild compEl expandedList expandEl createElement IParserTags expandEl setAttribute IParserTags expandedList appendChild expandEl expandRestoreList eRel createElement IParserTags eRel setAttribute IParserTags expandRestoreList appendChild eRel subcompletedTable subcompletedTable hasMoreElements itemNum nextElement subItemNum subcompletedTable itemNum itemNum subItemNum eRel createElement IParserTags eRel setAttribute IParserTags itemNum eRel setAttribute IParserTags subItemNum appendChild eRel subskippedTable subskippedTable hasMoreElements itemNum nextElement subItemNum subskippedTable itemNum itemNum subItemNum eRel createElement IParserTags eRel setAttribute IParserTags itemNum eRel setAttribute IParserTags subItemNum appendChild eRel createElement IParserTags setAttribute IParserTags IParserTags appendChild managerData getData managerData managerData hasMoreElements nextElement managerData csmDataTag createElement IParserTags csmDataTag setAttribute IParserTags createTextNode csmDataTag appendChild appendChild csmDataTag StreamResult streamResult StreamResult filePath toFile DOMSource domSource DOMSource TransformerFactory newInstance newTransformer setOutputProperty OutputKeys domSource streamResult CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_SAVING_STATEFILE_URL IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog
public void save State int current Item Num Array List items boolean button Is Down Array List expand Restore States String csID Cheat Sheet Manager csm Properties properties create Properties current Item Num items button Is Down expand Restore States csID save State properties csm  saveState currentItemNum ArrayList buttonIsDown ArrayList expandRestoreStates CheatSheetManager createProperties currentItemNum buttonIsDown expandRestoreStates saveState

Constructor for Conditional Sub Item public Conditional Sub Item super  ConditionalSubItem ConditionalSubItem
public Conditional Sub Item String condition super this condition condition  ConditionalSubItem
Returns the condition return String public String get Condition return condition  getCondition
Sets the condition param new Condition The new condition to set public void set Condition String new Condition this condition new Condition  newCondition setCondition newCondition newCondition
param sub Item the Sub Item to add public void add Sub Item Abstract Sub Item sub Item if sub Items null sub Items new Array List sub Items add sub Item  subItem SubItem addSubItem AbstractSubItem subItem subItems subItems ArrayList subItems subItem
return Returns the sub Items public Array List get Sub Items return sub Items  subItems ArrayList getSubItems subItems
public Sub Item get Selected Sub Item return selected Sub Item  SubItem getSelectedSubItem selectedSubItem
public void set Selected Sub Item Cheat Sheet Manager csm String condition Value csm get Variable Data condition for Iterator iter sub Items iterator iter has Next Sub Item sub Item Sub Item iter next if sub Item get When null sub Item get When equals condition Value selected Sub Item sub Item break  setSelectedSubItem CheatSheetManager conditionValue getVariableData subItems hasNext SubItem subItem SubItem subItem getWhen subItem getWhen conditionValue selectedSubItem subItem

public interface I Action Item return Returns the action public Action get Action  IActionItem getAction
public Action get Action param action The action to set public void set Action Action action  getAction setAction

Constructor for Intro public Intro super 
public Intro String description String href String context Id super this description description this href href this context Id context Id  contextId contextId contextId
Returns the contenxt Id return String public String get Context Id return context Id  contenxtId getContextId contextId
Returns the help Link return String public String get Href return href  helpLink getHref
Returns the description return String public String get Description return description  getDescription
Sets the context Id param context Id The context Id to set public void set Context Id String context Id this context Id context Id  contextId contextId contextId setContextId contextId contextId contextId
Sets the help Link param help Link The help Link to set public void set Href String help Link this href help Link  helpLink helpLink helpLink setHref helpLink helpLink
Sets the description param description The description to set public void set Description String description this description description  setDescription

public interface I Perform When Item return Returns the perform When public Perform When get Perform When  IPerformWhenItem performWhen PerformWhen getPerformWhen
public Perform When get Perform When param perform When The perform When to set public void set Perform When Perform When perform When  PerformWhen getPerformWhen performWhen performWhen setPerformWhen PerformWhen performWhen

public interface I Sub Item Item param sub Item the Sub Item to add public void add Sub Item Abstract Sub Item sub Item  ISubItemItem subItem SubItem addSubItem AbstractSubItem subItem
public void add Sub Item Abstract Sub Item sub Item return Returns the sub Items public Array List get Sub Items  addSubItem AbstractSubItem subItem subItems ArrayList getSubItems

Constructor for Item public Item super 
public Item String title String description String href String context Id boolean skip super description href context Id this title title this skip skip  contextId contextId
Returns the title return String public String get Title return this title  getTitle
Returns whether this item is dynamic An item is dynamic if it has perform When condition conditional Sub Items or repeated Sub Items return code true code if this item is dynamic and code false code for normal items public boolean is Dynamic if perform When null has Dynamic Sub Items return true return false  performWhen conditionalSubItems repeatedSubItems isDynamic performWhen hasDynamicSubItems
Returns the skip return boolean public boolean is Skip return this skip  isSkip
param skip The skip to set public void set Skip boolean skip this skip skip  setSkip
Sets the title param title The title to set public void set Title String title this title title  setTitle
Sets the item extensions for this item param exts the extensions to set public void set Item Extensions Array List exts this item Extensions exts  setItemExtensions ArrayList itemExtensions
Returns the item extensions if any for this item return list of the extensions or code null code public Array List get Item Extensions return item Extensions  ArrayList getItemExtensions itemExtensions
return Returns the action public Action get Action return action  getAction
param action The action to set public void set Action Action action this action action  setAction
return Returns the perform When public Perform When get Perform When return perform When  performWhen PerformWhen getPerformWhen performWhen
param perform When The perform When to set public void set Perform When Perform When perform When this perform When perform When  performWhen performWhen setPerformWhen PerformWhen performWhen performWhen performWhen
param sub Item the Sub Item to add public void add Sub Item Abstract Sub Item sub Item if sub Items null sub Items new Array List sub Items add sub Item  subItem SubItem addSubItem AbstractSubItem subItem subItems subItems ArrayList subItems subItem
return Returns the sub Items public Array List get Sub Items return sub Items  subItems ArrayList getSubItems subItems
private boolean has Dynamic Sub Items if sub Items null for Iterator iter sub Items iterator iter has Next Abstract Sub Item sub Item Abstract Sub Item iter next if sub Item instanceof Repeated Sub Item sub Item instanceof Conditional Sub Item sub Item instanceof Sub Item Sub Item sub Item get Perform When null return true return false  hasDynamicSubItems subItems subItems hasNext AbstractSubItem subItem AbstractSubItem subItem RepeatedSubItem subItem ConditionalSubItem subItem SubItem SubItem subItem getPerformWhen

Constructor for Perform When public Perform When super  PerformWhen PerformWhen
public Perform When String condition super this condition condition  PerformWhen
Returns the condition return String public String get Condition return condition  getCondition
Sets the condition param new Condition The new condition to set public void set Condition String new Condition this condition new Condition  newCondition setCondition newCondition newCondition
return Returns the actions public Array List get Actions return actions  ArrayList getActions
param action the Action to add public void add Action Action action if actions null actions new Array List actions add action  addAction ArrayList
This method always returns code null code it is only here aid in parsing return Returns the actions public Action get Action return null  getAction
Delegate to the add Action metod param action the Action to add public void set Action Action action add Action action  addAction setAction addAction
public Action get Selected Action return selected Action  getSelectedAction selectedAction
public void set Selected Action Cheat Sheet Manager csm String condition Value csm get Variable Data condition for Iterator iter actions iterator iter has Next Action action Action iter next if action get When null action get When equals condition Value selected Action action break  setSelectedAction CheatSheetManager conditionValue getVariableData hasNext getWhen getWhen conditionValue selectedAction

Constructor for Repeated Sub Item public Repeated Sub Item super  RepeatedSubItem RepeatedSubItem
public Repeated Sub Item String values super this values values  RepeatedSubItem
Returns the values return String public String get Values return values  getValues
Sets the values param new Values The new values to set public void set Values String new Values this values new Values  newValues setValues newValues newValues
param sub Item the Sub Item to add public void add Sub Item Abstract Sub Item sub Item if sub Items null sub Items new Array List sub Items add sub Item  subItem SubItem addSubItem AbstractSubItem subItem subItems subItems ArrayList subItems subItem
Returns a list which will always only contain at most 1 entry return Returns the sub Items public Array List get Sub Items return sub Items  subItems ArrayList getSubItems subItems

private Perform When perform When public Sub Item super  PerformWhen performWhen SubItem
This method returns the label to be shown for the sub item return the label public String get Label return label  getLabel
This method sets the label that will be shown for the sub item param label the label to be shown public void set Label String string label string  setLabel
This method returns the skip state for the sub item return the label public boolean is Skip return skip  isSkip
This method sets whether the sub item can be skipped param value the new value for skip public void set Skip boolean value skip value  setSkip
This method returns the when expression for the sub item return the label public String get When return when  getWhen
This method sets the when expression for the sub item param string the when expression to set public void set When String string when string  setWhen
return Returns the action public Action get Action return action  getAction
param action The action to set public void set Action Action action this action action  setAction
return Returns the perform When public Perform When get Perform When return perform When  performWhen PerformWhen getPerformWhen performWhen
param perform When The perform When to set public void set Perform When Perform When perform When this perform When perform When  performWhen performWhen setPerformWhen PerformWhen performWhen performWhen performWhen

Creates an instance of this dialog to display the a list of cheat sheets param shell the parent shell public Cheat Sheet Category Based Selection Dialog Shell shell Cheat Sheet Collection Element cheatsheet Categories super shell this cheatsheet Categories cheatsheet Categories set Title Cheat Sheet Plugin get Resource String I Cheat Sheet Resource CHEAT SHEET SELECTION DIALOG TITLE set Message Cheat Sheet Plugin get Resource String I Cheat Sheet Resource CHEAT SHEET SELECTION DIALOG MSG set Shell Style get Shell Style SWT RESIZE  CheatSheetCategoryBasedSelectionDialog CheatSheetCollectionElement cheatsheetCategories cheatsheetCategories cheatsheetCategories setTitle CheatSheetPlugin getResourceString ICheatSheetResource CHEAT_SHEET_SELECTION_DIALOG_TITLE setMessage CheatSheetPlugin getResourceString ICheatSheetResource CHEAT_SHEET_SELECTION_DIALOG_MSG setShellStyle getShellStyle
Method declared on Window protected void configure Shell Shell new Shell super configure Shell new Shell Workbench Help set Help new Shell I Help Context Ids WELCOME PAGE SELECTION DIALOG  configureShell newShell configureShell newShell WorkbenchHelp setHelp newShell IHelpContextIds WELCOME_PAGE_SELECTION_DIALOG
protected void create Buttons For Button Bar Composite parent super create Buttons For Button Bar parent enableOK Button ok Button State  createButtonsForButtonBar createButtonsForButtonBar enableOKButton okButtonState
Add double click listener cheatsheet Selection Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event ok Pressed  cheatsheetSelectionViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent okPressed
protected Control create Dialog Area Composite parent I Dialog Settings workbench Settings Cheat Sheet Plugin get Plugin get Dialog Settings I Dialog Settings dialog Settings workbench Settings get Section Cheat Sheet Category Based Selection Dialog NON NLS 1 if dialog Settings null dialog Settings workbench Settings add New Section Cheat Sheet Category Based Selection Dialog NON NLS 1 set Dialog Settings dialog Settings top level group Composite outer Container Composite super create Dialog Area parent Layout layout outer Container get Layout if layout null layout instanceof Grid Layout Grid Layout layout num Columns 2 else Grid Layout grid Layout new Grid Layout outer Container set Layout grid Layout outer Container set Layout Data new Grid Data Grid Data FILL BOTH Create label create Message Area outer Container category tree pane create SWT tree directly to get single selection mode instead of multi selection Tree tree new Tree outer Container SWT SINGLE SWT H SCROLL SWT V SCROLL SWT BORDER category Tree Viewer new Tree Viewer tree Grid Data data new Grid Data Grid Data FILL BOTH data width Hint SIZING CATEGORY LIST WIDTH data height Hint SIZING CATEGORY LIST HEIGHT category Tree Viewer get Tree set Layout Data data category Tree Viewer set Content Provider new Base Workbench Content Provider category Tree Viewer set Label Provider new Workbench Label Provider category Tree Viewer set Sorter Cheat Sheet Collection Sorter INSTANCE category Tree Viewer add Selection Changed Listener this category Tree Viewer set Input cheatsheet Categories cheatsheet actions pane create SWT table directly to get single selection mode instead of multi selection Table table new Table outer Container SWT SINGLE SWT H SCROLL SWT V SCROLL SWT BORDER cheatsheet Selection Viewer new Table Viewer table data new Grid Data Grid Data FILL BOTH data width Hint SIZING CHEATSHEET LIST WIDTH data height Hint SIZING CHEATSHEET LIST HEIGHT cheatsheet Selection Viewer get Table set Layout Data data cheatsheet Selection Viewer set Content Provider get Cheat Sheet Provider cheatsheet Selection Viewer set Label Provider new Workbench Label Provider cheatsheet Selection Viewer add Selection Changed Listener this Add double click listener cheatsheet Selection Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event ok Pressed restore Widget Values if category Tree Viewer get Selection is Empty we only set focus if a selection was restored category Tree Viewer get Tree set Focus Dialog apply Dialog Font outer Container return outer Container  createDialogArea IDialogSettings workbenchSettings CheatSheetPlugin getPlugin getDialogSettings IDialogSettings dialogSettings workbenchSettings getSection CheatSheetCategoryBasedSelectionDialog dialogSettings dialogSettings workbenchSettings addNewSection CheatSheetCategoryBasedSelectionDialog setDialogSettings dialogSettings outerContainer createDialogArea outerContainer getLayout GridLayout GridLayout numColumns GridLayout gridLayout GridLayout outerContainer setLayout gridLayout outerContainer setLayoutData GridData GridData FILL_BOTH createMessageArea outerContainer outerContainer H_SCROLL V_SCROLL categoryTreeViewer TreeViewer GridData GridData GridData FILL_BOTH widthHint SIZING_CATEGORY_LIST_WIDTH heightHint SIZING_CATEGORY_LIST_HEIGHT categoryTreeViewer getTree setLayoutData categoryTreeViewer setContentProvider BaseWorkbenchContentProvider categoryTreeViewer setLabelProvider WorkbenchLabelProvider categoryTreeViewer setSorter CheatSheetCollectionSorter categoryTreeViewer addSelectionChangedListener categoryTreeViewer setInput cheatsheetCategories outerContainer H_SCROLL V_SCROLL cheatsheetSelectionViewer TableViewer GridData GridData FILL_BOTH widthHint SIZING_CHEATSHEET_LIST_WIDTH heightHint SIZING_CHEATSHEET_LIST_HEIGHT cheatsheetSelectionViewer getTable setLayoutData cheatsheetSelectionViewer setContentProvider getCheatSheetProvider cheatsheetSelectionViewer setLabelProvider WorkbenchLabelProvider cheatsheetSelectionViewer addSelectionChangedListener cheatsheetSelectionViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent okPressed restoreWidgetValues categoryTreeViewer getSelection isEmpty categoryTreeViewer getTree setFocus applyDialogFont outerContainer outerContainer
see org eclipse ui dialogs Selection Dialog create Message Area Composite protected Label create Message Area Composite composite Label label new Label composite SWT NONE label set Text get Message Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN FILL grid Data horizontal Span 2 label set Layout Data grid Data return label  SelectionDialog createMessageArea createMessageArea setText getMessage GridData gridData GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_FILL gridData horizontalSpan setLayoutData gridData
Method enableOK Button enables diables the OK button for the dialog and saves the state allowing the enabling disabling to occur even if the button has not been created yet param value private void enableOK Button boolean value Button button get Button I Dialog Constants OK ID ok Button State value if button null button set Enabled value  enableOKButton enableOKButton getButton IDialogConstants OK_ID okButtonState setEnabled
Expands the cheatsheet categories in this page s category viewer that were expanded last time this page was used If a category that was previously expanded no longer exists then it is ignored protected void expand Previously Expanded Categories String expanded Category Paths settings get Array STORE EXPANDED CATEGORIES ID List categories To Expand new Array List expanded Category Paths length for int i 0 i expanded Category Paths length i Cheat Sheet Collection Element category cheatsheet Categories find Child Collection new Path expanded Category Paths i if category null ie it still exists categories To Expand add category if categories To Expand is Empty category Tree Viewer set Expanded Elements categories To Expand to Array  expandPreviouslyExpandedCategories expandedCategoryPaths getArray STORE_EXPANDED_CATEGORIES_ID categoriesToExpand ArrayList expandedCategoryPaths expandedCategoryPaths CheatSheetCollectionElement cheatsheetCategories findChildCollection expandedCategoryPaths categoriesToExpand categoriesToExpand isEmpty categoryTreeViewer setExpandedElements categoriesToExpand toArray
return new Base Workbench Content Provider public Object get Children Object o if o instanceof Cheat Sheet Collection Element return Cheat Sheet Collection Element o get Cheat Sheets return new Object 0  BaseWorkbenchContentProvider getChildren CheatSheetCollectionElement CheatSheetCollectionElement getCheatSheets
Returns the content provider for this page protected I Content Provider get Cheat Sheet Provider want to get the cheatsheets of the collection element return new Base Workbench Content Provider public Object get Children Object o if o instanceof Cheat Sheet Collection Element return Cheat Sheet Collection Element o get Cheat Sheets return new Object 0  IContentProvider getCheatSheetProvider BaseWorkbenchContentProvider getChildren CheatSheetCollectionElement CheatSheetCollectionElement getCheatSheets
Returns the single selected object contained in the passed selection Event or code null code if the selection Event contains either 0 or 2 selected objects protected Object get Single Selection I Structured Selection selection return selection size 1 selection get First Element null  selectionEvent selectionEvent getSingleSelection IStructuredSelection getFirstElement
Handle the de selection of cheatsheet element s param selection Event Selection Changed Event private void handle Category Selection Selection Changed Event selection Event Object selection cheatsheet Selection Viewer get Input Object selected Category get Single Selection I Structured Selection selection Event get Selection if selection selected Category cheatsheet Selection Viewer set Input selected Category enableOK Button false  selectionEvent SelectionChangedEvent handleCategorySelection SelectionChangedEvent selectionEvent cheatsheetSelectionViewer getInput selectedCategory getSingleSelection IStructuredSelection selectionEvent getSelection selectedCategory cheatsheetSelectionViewer setInput selectedCategory enableOKButton
Handle the de selection of cheatsheet element s param selection Event Selection Changed Event private void handle Cheat Sheet Selection Selection Changed Event selection Event current Selection Cheat Sheet Element get Single Selection I Structured Selection selection Event get Selection if current Selection null enableOK Button true  selectionEvent SelectionChangedEvent handleCheatSheetSelection SelectionChangedEvent selectionEvent currentSelection CheatSheetElement getSingleSelection IStructuredSelection selectionEvent getSelection currentSelection enableOKButton
protected void ok Pressed if current Selection null Array List result new Array List 1 result add current Selection set Result result else return save our selection state save Widget Values super ok Pressed  okPressed currentSelection ArrayList ArrayList currentSelection setResult saveWidgetValues okPressed
Set self s widgets to the values that they held last time this page was open protected void restore Widget Values String expanded Category Paths settings get Array STORE EXPANDED CATEGORIES ID if expanded Category Paths null return no stored values expand Previously Expanded Categories select Previously Selected Category And Cheat Sheet  restoreWidgetValues expandedCategoryPaths getArray STORE_EXPANDED_CATEGORIES_ID expandedCategoryPaths expandPreviouslyExpandedCategories selectPreviouslySelectedCategoryAndCheatSheet
Store the current values of self s widgets so that they can be restored in the next instance of self public void save Widget Values store Expanded Categories store Selected Category And Cheat Sheet  saveWidgetValues storeExpandedCategories storeSelectedCategoryAndCheatSheet
The user selected either new cheatsheet category s or cheatsheet element s Proceed accordingly param new Selection I Selection public void selection Changed Selection Changed Event selection Event if selection Event get Selection Provider equals category Tree Viewer handle Category Selection selection Event else handle Cheat Sheet Selection selection Event  newSelection ISelection selectionChanged SelectionChangedEvent selectionEvent selectionEvent getSelectionProvider categoryTreeViewer handleCategorySelection selectionEvent handleCheatSheetSelection selectionEvent
Selects the cheatsheet category and cheatsheet in this page that were selected last time this page was used If a category or cheatsheet that was previously selected no longer exists then it is ignored protected void select Previously Selected Category And Cheat Sheet String category Id settings get STORE SELECTED CATEGORY ID if category Id null return Cheat Sheet Collection Element category cheatsheet Categories find Child Collection new Path category Id if category null return category no longer exists or has moved Structured Selection selection new Structured Selection category category Tree Viewer set Selection selection selection Changed new Selection Changed Event category Tree Viewer selection String cheatsheet Id settings get STORE SELECTED CHEATSHEET ID if cheatsheet Id null return Cheat Sheet Element cheatsheet category find Cheat Sheet cheatsheet Id false if cheatsheet null return cheatsheet no longer exists or has moved selection new Structured Selection cheatsheet cheatsheet Selection Viewer set Selection selection selection Changed new Selection Changed Event cheatsheet Selection Viewer selection  selectPreviouslySelectedCategoryAndCheatSheet categoryId STORE_SELECTED_CATEGORY_ID categoryId CheatSheetCollectionElement cheatsheetCategories findChildCollection categoryId StructuredSelection StructuredSelection categoryTreeViewer setSelection selectionChanged SelectionChangedEvent categoryTreeViewer cheatsheetId STORE_SELECTED_CHEATSHEET_ID cheatsheetId CheatSheetElement findCheatSheet cheatsheetId StructuredSelection cheatsheetSelectionViewer setSelection selectionChanged SelectionChangedEvent cheatsheetSelectionViewer
Set the dialog store to use for widget value storage and retrieval param settings I Dialog Settings public void set Dialog Settings I Dialog Settings settings this settings settings  IDialogSettings setDialogSettings IDialogSettings
Stores the collection of currently expanded categories in this page s dialog store in order to recreate this page s state in the next instance of this page protected void store Expanded Categories Object expanded Elements category Tree Viewer get Expanded Elements String expanded Element Paths new String expanded Elements length for int i 0 i expanded Elements length i expanded Element Paths i Cheat Sheet Collection Element expanded Elements i get Path to String settings put STORE EXPANDED CATEGORIES ID expanded Element Paths  storeExpandedCategories expandedElements categoryTreeViewer getExpandedElements expandedElementPaths expandedElements expandedElements expandedElementPaths CheatSheetCollectionElement expandedElements getPath toString STORE_EXPANDED_CATEGORIES_ID expandedElementPaths
Stores the currently selected category and cheatsheet in this page s dialog store in order to recreate this page s state in the next instance of this page protected void store Selected Category And Cheat Sheet Cheat Sheet Collection Element selected Category Cheat Sheet Collection Element get Single Selection I Structured Selection category Tree Viewer get Selection if selected Category null settings put STORE SELECTED CATEGORY ID selected Category get Path to String Cheat Sheet Element selected Cheat Sheet Cheat Sheet Element get Single Selection I Structured Selection cheatsheet Selection Viewer get Selection if selected Cheat Sheet null settings put STORE SELECTED CHEATSHEET ID selected Cheat Sheet getID  storeSelectedCategoryAndCheatSheet CheatSheetCollectionElement selectedCategory CheatSheetCollectionElement getSingleSelection IStructuredSelection categoryTreeViewer getSelection selectedCategory STORE_SELECTED_CATEGORY_ID selectedCategory getPath toString CheatSheetElement selectedCheatSheet CheatSheetElement getSingleSelection IStructuredSelection cheatsheetSelectionViewer getSelection selectedCheatSheet STORE_SELECTED_CHEATSHEET_ID selectedCheatSheet

Simple List Content Provider constructor comment public Simple List Content Provider super  SimpleListContentProvider SimpleListContentProvider
super Do nothing when disposing public void dispose 
public void dispose Returns the elements to display in the viewer The input Element is ignored for this provider public Object get Elements Object input Element return this elements  inputElement getElements inputElement
Required method from I Structured Content Provider The input is assumed to not change for the Simple List Content Viewer so do nothing here  IStructuredContentProvider SimpleListContentViewer
public void input Changed Viewer viewer Object old Input Object new Input Set the elements to display param items Object public void set Elements Object items this elements items  inputChanged oldInput newInput setElements
Creates an instance of this dialog to display the a list of cheat sheets param shell the parent shell public Cheat Sheet Selection Dialog Shell shell super shell set Title Cheat Sheet Plugin get Resource String I Cheat Sheet Resource CHEAT SHEET SELECTION DIALOG TITLE set Message Cheat Sheet Plugin get Resource String I Cheat Sheet Resource CHEAT SHEET SELECTION DIALOG MSG set Shell Style get Shell Style SWT RESIZE  CheatSheetSelectionDialog setTitle CheatSheetPlugin getResourceString ICheatSheetResource CHEAT_SHEET_SELECTION_DIALOG_TITLE setMessage CheatSheetPlugin getResourceString ICheatSheetResource CHEAT_SHEET_SELECTION_DIALOG_MSG setShellStyle getShellStyle
private void add Cheat Sheets Array List list Cheat Sheet Collection Element cheat Sheets Collection Object cheat Sheets cheat Sheets Collection get Cheat Sheets for int i 0 i cheat Sheets length i if list contains cheat Sheets i list add cheat Sheets i Object cheat Sheets From Collection cheat Sheets Collection get Children for int nX 0 nX cheat Sheets From Collection length nX Cheat Sheet Collection Element collection Cheat Sheet Collection Element cheat Sheets From Collection nX add Cheat Sheets list collection  addCheatSheets ArrayList CheatSheetCollectionElement cheatSheetsCollection cheatSheets cheatSheetsCollection getCheatSheets cheatSheets cheatSheets cheatSheets cheatSheetsFromCollection cheatSheetsCollection getChildren cheatSheetsFromCollection CheatSheetCollectionElement CheatSheetCollectionElement cheatSheetsFromCollection addCheatSheets
Method declared on Window protected void configure Shell Shell new Shell super configure Shell new Shell Workbench Help set Help new Shell I Help Context Ids WELCOME PAGE SELECTION DIALOG  configureShell newShell configureShell newShell WorkbenchHelp setHelp newShell IHelpContextIds WELCOME_PAGE_SELECTION_DIALOG
Set the label provider list Viewer set Label Provider new Label Provider public String get Text Object element Return the features s label return element null I Cheat Sheet Resource EMPTY STRING Cheat Sheet Element element get Label null  listViewer setLabelProvider LabelProvider getText ICheatSheetResource EMPTY_STRING CheatSheetElement getLabel
Add a selection change listener list Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Update OK button enablement get Ok Button set Enabled event get Selection is Empty  listViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getOkButton setEnabled getSelection isEmpty
Add double click listener list Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event ok Pressed  listViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent okPressed
protected Control create Dialog Area Composite parent Array List list new Array List 10 Cheat Sheet Collection Element cheat Sheets Collection Cheat Sheet Collection Element Cheat Sheet Registry Reader get Instance get Cheat Sheets add Cheat Sheets list cheat Sheets Collection Composite composite Composite super create Dialog Area parent Create label create Message Area composite Create list viewer list Viewer new List Viewer composite SWT SINGLE SWT H SCROLL SWT V SCROLL SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data height Hint convert Height In Chars To Pixels LIST HEIGHT data width Hint convert Width In Chars To Pixels LIST WIDTH list Viewer get List set Layout Data data Set the label provider list Viewer set Label Provider new Label Provider public String get Text Object element Return the features s label return element null I Cheat Sheet Resource EMPTY STRING Cheat Sheet Element element get Label null Set the content provider Simple List Content Provider cp new Simple List Content Provider cp set Elements list to Array list Viewer set Content Provider cp list Viewer set Input new Object it is ignored but must be non null Set the initial selection if get Initial Element Selections null list Viewer set Selection new Structured Selection get Initial Element Selections true Add a selection change listener list Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Update OK button enablement get Ok Button set Enabled event get Selection is Empty Add double click listener list Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event ok Pressed Dialog apply Dialog Font composite return composite  createDialogArea ArrayList ArrayList CheatSheetCollectionElement cheatSheetsCollection CheatSheetCollectionElement CheatSheetRegistryReader getInstance getCheatSheets addCheatSheets cheatSheetsCollection createDialogArea createMessageArea listViewer ListViewer H_SCROLL V_SCROLL GridData GridData GridData FILL_BOTH heightHint convertHeightInCharsToPixels LIST_HEIGHT widthHint convertWidthInCharsToPixels LIST_WIDTH listViewer getList setLayoutData listViewer setLabelProvider LabelProvider getText ICheatSheetResource EMPTY_STRING CheatSheetElement getLabel SimpleListContentProvider SimpleListContentProvider setElements toArray listViewer setContentProvider listViewer setInput getInitialElementSelections listViewer setSelection StructuredSelection getInitialElementSelections listViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getOkButton setEnabled getSelection isEmpty listViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent okPressed applyDialogFont
protected void ok Pressed I Structured Selection selection I Structured Selection list Viewer get Selection set Result selection to List super ok Pressed  okPressed IStructuredSelection IStructuredSelection listViewer getSelection setResult toList okPressed

Creates a new code Cheat Sheet Collection Element code Parent can be null param name java lang String public Cheat Sheet Collection Element String id String name Cheat Sheet Collection Element parent this name name this id id this parent parent  CheatSheetCollectionElement CheatSheetCollectionElement CheatSheetCollectionElement
Adds a cheatsheet collection to this collection public Adaptable List add I Adaptable a if a instanceof Cheat Sheet Element cheatsheets add a else super add a return this  AdaptableList IAdaptable CheatSheetElement
Returns the cheatsheet collection child object corresponding to the passed path relative to this object or code null code if such an object could not be found param search Path org eclipse core runtime I Path return Cheat Sheet Collection Element public Cheat Sheet Collection Element find Child Collection I Path search Path Object children get Children null String search String search Path segment 0 for int i 0 i children length i Cheat Sheet Collection Element current Category Cheat Sheet Collection Element children i if current Category get Label null equals search String if search Path segment Count 1 return current Category return current Category find Child Collection search Path remove First Segments 1 return null  searchPath IPath CheatSheetCollectionElement CheatSheetCollectionElement findChildCollection IPath searchPath getChildren searchString searchPath CheatSheetCollectionElement currentCategory CheatSheetCollectionElement currentCategory getLabel searchString searchPath segmentCount currentCategory currentCategory findChildCollection searchPath removeFirstSegments
Returns this collection s associated cheatsheet object corresponding to the passed id or code null code if such an object could not be found public Cheat Sheet Element find Cheat Sheet String search Id boolean recursive Object cheatsheets get Cheat Sheets for int i 0 i cheatsheets length i Cheat Sheet Element current Cheat Sheet Cheat Sheet Element cheatsheets i if current Cheat Sheet getID equals search Id return current Cheat Sheet if recursive return null for Iterator iterator children iterator iterator has Next Cheat Sheet Collection Element child Cheat Sheet Collection Element iterator next Cheat Sheet Element result child find Cheat Sheet search Id true if result null return result return null  CheatSheetElement findCheatSheet searchId getCheatSheets CheatSheetElement currentCheatSheet CheatSheetElement currentCheatSheet searchId currentCheatSheet hasNext CheatSheetCollectionElement CheatSheetCollectionElement CheatSheetElement findCheatSheet searchId
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return Platform get Adapter Manager get Adapter this adapter  getAdapter IWorkbenchAdapter getAdapterManager getAdapter
Returns the unique ID of this element public String get Id return id  getId
Returns the label for this collection public String get Label Object o return name  getLabel
Returns the logical parent of the given object in its tree public Object get Parent Object o return parent  getParent
Returns a path representing this collection s ancestor chain public I Path get Path if parent null return new Path I Cheat Sheet Resource EMPTY STRING return parent get Path append name  IPath getPath ICheatSheetResource EMPTY_STRING getPath
Returns this collection element s associated collection of cheatsheets public Object get Cheat Sheets return cheatsheets get Children  getCheatSheets getChildren
Returns true if this element has no children and no cheatsheets public boolean is Empty return size 0 cheatsheets size 0  isEmpty
Sets this collection s unique id public void set Id java lang String new Id id new Id  setId newId newId
Sets the collection of cheatsheets associated with this collection element public void set Cheat Sheets Adaptable List value cheatsheets value  setCheatSheets AdaptableList
For debugging purposes public String to String String Buffer buf new String Buffer Cheat Sheet Collection NON NLS 1 buf append children size buf append children NON NLS 1 buf append cheatsheets size buf append cheatsheets NON NLS 1 return buf to String  toString StringBuffer StringBuffer CheatSheetCollection toString

Creates an instance of code New Wizard Collection Sorter code Since this is a stateless sorter it is only accessible as a singleton the private visibility of this constructor ensures this private Cheat Sheet Collection Sorter super  NewWizardCollectionSorter CheatSheetCollectionSorter
The compare method of the sort operation return the value code 0 code if the argument o1 is equal to o2 a value less than code 0 code if o1 is less than o2 and a value greater than code 0 code if o1 is greater than o2 public int compare Viewer viewer Object o1 Object o2 String name1 Cheat Sheet Collection Element o1 get Label o1 String name2 Cheat Sheet Collection Element o2 get Label o2 if name1 equals name2 return 0 return collator compare name1 name2  CheatSheetCollectionElement getLabel CheatSheetCollectionElement getLabel
Return true if this sorter is affected by a property change of property Name on the specified element public boolean is Sorter Property Object object String property Id return property Id equals I Basic Property Constants P TEXT  propertyName isSorterProperty propertyId propertyId IBasicPropertyConstants P_TEXT

Create a new instance of this class param name java lang String public Cheat Sheet Element String name this name name  CheatSheetElement
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return Platform get Adapter Manager get Adapter this adapter  getAdapter IWorkbenchAdapter getAdapterManager getAdapter
return I Configuration Element public I Configuration Element get Configuration Element return configuration Element  IConfigurationElement IConfigurationElement getConfigurationElement configurationElement
Answer the content File parameter of this element return java lang String public String get Content File return content File  contentFile getContentFile contentFile
Answer the description parameter of this element return java lang String public String get Description return description  getDescription
Answer the id as specified in the extension return java lang String public String getID return id 
Returns the name of this cheatsheet element public String get Label Object element return name  getLabel
Returns the listener class name of this cheatsheet element public String get Listener Class return listener Class  getListenerClass listenerClass
param new Configuration Element I Configuration Element public void set Configuration Element I Configuration Element new Configuration Element configuration Element new Configuration Element  newConfigurationElement IConfigurationElement setConfigurationElement IConfigurationElement newConfigurationElement configurationElement newConfigurationElement
Set the content File parameter of this element param value java lang String public void set Content File String value content File value  contentFile setContentFile contentFile
Set the description parameter of this element param value java lang String public void set Description String value description value  setDescription
Set the id parameter of this element param value java lang String public void setID String value id value 
Set the listener class name of this element public void set Listener Class String value listener Class value  setListenerClass listenerClass
public Cheat Sheet Listener create Listener Instance if listener Class null configuration Element null return null Class ext Class null Cheat Sheet Listener listener null String plugin Id configuration Element get Declaring Extension get Namespace try Bundle bundle Platform get Bundle plugin Id ext Class bundle load Class listener Class catch Exception e String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR LOADING CLASS new Object listener Class I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status try if ext Class null listener Cheat Sheet Listener ext Class new Instance catch Exception e String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR CREATING CLASS new Object listener Class I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status if listener null return listener return null  CheatSheetListener createListenerInstance listenerClass configurationElement extClass CheatSheetListener pluginId configurationElement getDeclaringExtension getNamespace getBundle pluginId extClass loadClass listenerClass CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_LOADING_CLASS listenerClass IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog extClass CheatSheetListener extClass newInstance CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_CREATING_CLASS listenerClass IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog

Create a new instance of this class public Cheat Sheet Item Extension Element  CheatSheetItemExtensionElement
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return Platform get Adapter Manager get Adapter this adapter  getAdapter IWorkbenchAdapter getAdapterManager getAdapter
return I Configuration Element public I Configuration Element get Configuration Element return configuration Element  IConfigurationElement IConfigurationElement getConfigurationElement configurationElement
Answer the classname parameter of this element return java lang String public String get Class Name return class Name  getClassName className
Answer the item Attribute parameter of this element return java lang String public String get Item Attribute return item Attribute  itemAttribute getItemAttribute itemAttribute
param new Configuration Element I Configuration Element public void set Configuration Element I Configuration Element new Configuration Element configuration Element new Configuration Element  newConfigurationElement IConfigurationElement setConfigurationElement IConfigurationElement newConfigurationElement configurationElement newConfigurationElement
Set the class Name parameter of this element param value java lang String public void set Class Name String value class Name value  className setClassName className
Set the item Attribute parameter of this element param value java lang String public void set Item Attribute String value item Attribute value  itemAttribute setItemAttribute itemAttribute
public Abstract Item Extension Element create Instance Class ext Class null Abstract Item Extension Element ext Element null String plugin Id configuration Element get Declaring Extension get Namespace try Bundle bundle Platform get Bundle plugin Id ext Class bundle load Class class Name catch Exception e String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR LOADING CLASS new Object class Name I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status try if ext Class null Constructor c ext Class get Constructor string Array Object parameters item Attribute ext Element Abstract Item Extension Element c new Instance parameters catch Exception e String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR CREATING CLASS new Object class Name I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status if ext Element null return ext Element return null  AbstractItemExtensionElement createInstance extClass AbstractItemExtensionElement extElement pluginId configurationElement getDeclaringExtension getNamespace getBundle pluginId extClass loadClass className CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_LOADING_CLASS className IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog extClass extClass getConstructor stringArray itemAttribute extElement AbstractItemExtensionElement newInstance CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_CREATING_CLASS className IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog extElement extElement

private String path public Category Node Category cat category cat path I Cheat Sheet Resource EMPTY STRING String category Path category get Parent Path if category Path null for int nX 0 nX category Path length nX path category Path nX path cat get Id  CategoryNode ICheatSheetResource EMPTY_STRING categoryPath getParentPath categoryPath categoryPath categoryPath getId
path cat get Id public Category get Category return category  getId getCategory
return category public String get Path return path  getPath
Returns a list of cheatsheets project and not The return value for this method is cached since computing its value requires non trivial work public static Cheat Sheet Registry Reader get Instance if instance null instance new Cheat Sheet Registry Reader I Extension Registry xregistry Platform get Extension Registry xregistry add Registry Change Listener instance I Cheat Sheet Resource CHEAT SHEET PLUGIN ID return instance  CheatSheetRegistryReader getInstance CheatSheetRegistryReader IExtensionRegistry getExtensionRegistry addRegistryChangeListener ICheatSheetResource CHEAT_SHEET_PLUGIN_ID
Create an instance of this class private Cheat Sheet Registry Reader  CheatSheetRegistryReader
Adds new cheatsheet to the provided collection Override to provide more logic p This implementation uses a defering strategy For more info see code read Cheat Sheets code p protected void add New Element To Result Cheat Sheet Element element I Configuration Element config Adaptable List result defer Cheat Sheet element  readCheatSheets addNewElementToResult CheatSheetElement IConfigurationElement AdaptableList deferCheatSheet
Returns a new Cheat Sheet Element configured according to the parameters contained in the passed Registry May answer null if there was not enough information in the Extension to create an adequate cheatsheet protected Cheat Sheet Element create Cheat Sheet Element I Configuration Element element Cheat Sheet Elements must have a name attribute String name String element get Attribute ATT NAME if name String null log Missing Attribute element ATT NAME return null Cheat Sheet Element result new Cheat Sheet Element name String if initialize Cheat Sheet result element return result ie initialization was successful return null  CheatSheetElement CheatSheetElement createCheatSheetElement IConfigurationElement CheatSheetElements nameString getAttribute ATT_NAME nameString logMissingAttribute ATT_NAME CheatSheetElement CheatSheetElement nameString initializeCheatSheet
Create and answer a new Cheat Sheet Collection Element configured as a child of code parent code return org eclipse ui internal model Cheat Sheet Collection Element param parent org eclipse ui internal model Cheat Sheet Collection Element param child Name java lang String protected Cheat Sheet Collection Element create Collection Element Cheat Sheet Collection Element parent String id String label Cheat Sheet Collection Element new Element new Cheat Sheet Collection Element id label parent parent add new Element return new Element  CheatSheetCollectionElement CheatSheetCollectionElement CheatSheetCollectionElement childName CheatSheetCollectionElement createCollectionElement CheatSheetCollectionElement CheatSheetCollectionElement newElement CheatSheetCollectionElement newElement newElement
Creates empty element collection Overrider to fill initial elements if needed protected Adaptable List create Empty Cheat Sheet Collection return new Cheat Sheet Collection Element root root null NON NLS 1 NON NLS 2  AdaptableList createEmptyCheatSheetCollection CheatSheetCollectionElement
Stores a category element for deferred addition private void defer Category I Configuration Element config Create category Category category null try category new Category config catch Core Exception e Cheat Sheet Plugin get Plugin get Log log e get Status return Defer for later processing if defer Categories null defer Categories new Array List 20 defer Categories add category  deferCategory IConfigurationElement CoreException CheatSheetPlugin getPlugin getLog getStatus deferCategories deferCategories ArrayList deferCategories
Stores a cheatsheet element for deferred addition private void defer Cheat Sheet Cheat Sheet Element element if defer Cheat Sheets null defer Cheat Sheets new Array List 50 defer Cheat Sheets add element  deferCheatSheet CheatSheetElement deferCheatSheets deferCheatSheets ArrayList deferCheatSheets
Returns the first cheatsheet with a given id public Cheat Sheet Element find Cheat Sheet String id Object cheatsheets List get Cheat Sheets get Children for int nX 0 nX cheatsheets List length nX Cheat Sheet Collection Element collection Cheat Sheet Collection Element cheatsheets List nX Cheat Sheet Element element collection find Cheat Sheet id true if element null return element return null  CheatSheetElement findCheatSheet cheatsheetsList getCheatSheets getChildren cheatsheetsList CheatSheetCollectionElement CheatSheetCollectionElement cheatsheetsList CheatSheetElement findCheatSheet
public boolean compare Object o1 Object o2 String s1 Category Node o1 get Path String s2 Category Node o2 get Path return collator compare s2 s1 0  CategoryNode getPath CategoryNode getPath
Finishes the addition of categories The categories are sorted and added in a root to depth traversal private void finish Categories If no categories just return if defer Categories null return Sort categories by flattened name Category Node flat Array new Category Node defer Categories size for int i 0 i defer Categories size i flat Array i new Category Node Category defer Categories get i Sorter sorter new Sorter private Collator collator Collator get Instance public boolean compare Object o1 Object o2 String s1 Category Node o1 get Path String s2 Category Node o2 get Path return collator compare s2 s1 0 Object sorted Categories sorter sort flat Array Add each category for int nX 0 nX sorted Categories length nX Category cat Category Node sorted Categories nX get Category finish Category cat Cleanup defer Categories null  finishCategories deferCategories CategoryNode flatArray CategoryNode deferCategories deferCategories flatArray CategoryNode deferCategories getInstance CategoryNode getPath CategoryNode getPath sortedCategories flatArray sortedCategories CategoryNode sortedCategories getCategory finishCategory deferCategories
Save new category definition private void finish Category Category category Cheat Sheet Collection Element current Result Cheat Sheet Collection Element cheatsheets String category Path category get Parent Path Cheat Sheet Collection Element parent current Result ie root Traverse down into parent category if category Path null for int i 0 i category Path length i Cheat Sheet Collection Element temp Element get Child WithID parent category Path i if temp Element null The parent category is invalid By returning here the category will be dropped and any cheatsheet within the category will be added to the Other category return else parent temp Element If another category already exists with the same id ignore this one Object test get Child WithID parent category get Id if test null return if parent null create Collection Element parent category get Id category get Label  finishCategory CheatSheetCollectionElement currentResult CheatSheetCollectionElement categoryPath getParentPath CheatSheetCollectionElement currentResult categoryPath categoryPath CheatSheetCollectionElement tempElement getChildWithID categoryPath tempElement tempElement getChildWithID getId createCollectionElement getId getLabel
Insert the passed cheatsheet element into the cheatsheet collection appropriately based upon its defining extension s CATEGORY tag value param element Cheat Sheet Element param extension param current Result Cheat Sheet Collection Element private void finish Cheat Sheet Cheat Sheet Element element I Configuration Element config Adaptable List result Cheat Sheet Collection Element current Result Cheat Sheet Collection Element result String Tokenizer family Tokenizer new String Tokenizer get Category String For config CATEGORY SEPARATOR use the period separated sections of the current Cheat Sheet s category to traverse through the Named Solution tree that was previously created Cheat Sheet Collection Element current Collection Element current Result ie root boolean move To Other false while family Tokenizer has More Elements Cheat Sheet Collection Element temp Collection Element get Child WithID current Collection Element family Tokenizer next Token if temp Collection Element null can t find the path bump it to uncategorized move To Other true break else current Collection Element temp Collection Element if move To Other move Element To Uncategorized Category current Result element else current Collection Element add element  CheatSheetElement currentResult CheatSheetCollectionElement finishCheatSheet CheatSheetElement IConfigurationElement AdaptableList CheatSheetCollectionElement currentResult CheatSheetCollectionElement StringTokenizer familyTokenizer StringTokenizer getCategoryStringFor CATEGORY_SEPARATOR CheatSheet NamedSolution CheatSheetCollectionElement currentCollectionElement currentResult moveToOther familyTokenizer hasMoreElements CheatSheetCollectionElement tempCollectionElement getChildWithID currentCollectionElement familyTokenizer nextToken tempCollectionElement moveToOther currentCollectionElement tempCollectionElement moveToOther moveElementToUncategorizedCategory currentResult currentCollectionElement
Finishes the addition of cheatsheets The cheatsheets are processed and categorized private void finish Cheat Sheets if defer Cheat Sheets null Iterator iter defer Cheat Sheets iterator while iter has Next Cheat Sheet Element cheatsheet Cheat Sheet Element iter next I Configuration Element config cheatsheet get Configuration Element finish Cheat Sheet cheatsheet config cheatsheets defer Cheat Sheets null  finishCheatSheets deferCheatSheets deferCheatSheets hasNext CheatSheetElement CheatSheetElement IConfigurationElement getConfigurationElement finishCheatSheet deferCheatSheets
Return the appropriate category tree location for this Cheat Sheet If a category is not specified then return a default one protected String get Category String For I Configuration Element config String result config get Attribute ATT CATEGORY if result null result UNCATEGORIZED CHEATSHEET CATEGORY return result  CheatSheet getCategoryStringFor IConfigurationElement getAttribute ATT_CATEGORY UNCATEGORIZED_CHEATSHEET_CATEGORY
Returns a list of cheatsheets project and not The return value for this method is cached since computing its value requires non trivial work public Adaptable List get Cheat Sheets if cheatsheets null read Cheat Sheets return cheatsheets  AdaptableList getCheatSheets readCheatSheets
Go through the children of the passed parent and answer the child with the passed name If no such child is found then return null return org eclipse ui internal model Cheat Sheet Collection Element param parent org eclipse ui internal model Cheat Sheet Collection Element param child Name java lang String protected Cheat Sheet Collection Element get Child WithID Cheat Sheet Collection Element parent String id Object children parent get Children for int i 0 i children length i Cheat Sheet Collection Element current Child Cheat Sheet Collection Element children i if current Child get Id equals id return current Child return null  CheatSheetCollectionElement CheatSheetCollectionElement childName CheatSheetCollectionElement getChildWithID CheatSheetCollectionElement getChildren CheatSheetCollectionElement currentChild CheatSheetCollectionElement currentChild getId currentChild
Initialize the passed element s properties based on the contents of the passed registry Answer a boolean indicating whether the element was able to be adequately initialized return boolean param element Cheat Sheet Element param extension Extension protected boolean initialize Cheat Sheet Cheat Sheet Element element I Configuration Element config element setID config get Attribute ATT ID element set Description get Description config element set Configuration Element config String content File config get Attribute ATT CONTENTFILE if content File null element set Content File content File ensure that a contentfile was specified if element get Configuration Element null element get Content File null log Missing Attribute config ATT CONTENTFILE return false String listener Class config get Attribute ATT LISTENERCLASS if listener Class null element set Listener Class listener Class return true  CheatSheetElement initializeCheatSheet CheatSheetElement IConfigurationElement getAttribute ATT_ID setDescription getDescription setConfigurationElement contentFile getAttribute ATT_CONTENTFILE contentFile setContentFile contentFile getConfigurationElement getContentFile logMissingAttribute ATT_CONTENTFILE listenerClass getAttribute ATT_LISTENERCLASS listenerClass setListenerClass listenerClass
Moves given element to Other category previously creating one if missing protected void move Element To Uncategorized Category Cheat Sheet Collection Element root Cheat Sheet Element element Cheat Sheet Collection Element other Category get Child WithID root UNCATEGORIZED CHEATSHEET CATEGORY if other Category null other Category create Collection Element root UNCATEGORIZED CHEATSHEET CATEGORY UNCATEGORIZED CHEATSHEET CATEGORY LABEL other Category add element  moveElementToUncategorizedCategory CheatSheetCollectionElement CheatSheetElement CheatSheetCollectionElement otherCategory getChildWithID UNCATEGORIZED_CHEATSHEET_CATEGORY otherCategory otherCategory createCollectionElement UNCATEGORIZED_CHEATSHEET_CATEGORY UNCATEGORIZED_CHEATSHEET_CATEGORY_LABEL otherCategory
Removes the empty categories from a cheatsheet collection private void prune Empty Categories Cheat Sheet Collection Element parent Object children parent get Children for int nX 0 nX children length nX Cheat Sheet Collection Element child Cheat Sheet Collection Element children nX prune Empty Categories child  pruneEmptyCategories CheatSheetCollectionElement getChildren CheatSheetCollectionElement CheatSheetCollectionElement pruneEmptyCategories
Reads the cheatsheets in a registry p This implementation uses a defering strategy All of the elements categories cheatsheets are read The categories are created as the read occurs The cheatsheets are just stored for later addition after the read completes This ensures that cheatsheet categorization is performed after all categories have been read p protected void read Cheat Sheets I Extension Registry xregistry Platform get Extension Registry if cheatsheets null cheatsheets create Empty Cheat Sheet Collection read Registry xregistry I Cheat Sheet Resource CHEAT SHEET PLUGIN ID plugin Point finish Categories finish Cheat Sheets if cheatsheets null Cheat Sheet Collection Element parent Cheat Sheet Collection Element cheatsheets prune Empty Categories parent  readCheatSheets IExtensionRegistry getExtensionRegistry createEmptyCheatSheetCollection readRegistry ICheatSheetResource CHEAT_SHEET_PLUGIN_ID pluginPoint finishCategories finishCheatSheets CheatSheetCollectionElement CheatSheetCollectionElement pruneEmptyCategories
public Array List read Item Extensions if cheatsheet Item Extensions null cheatsheet Item Extensions new Array List I Extension Registry xregistry Platform get Extension Registry Now read the cheat sheet extensions read Registry xregistry I Cheat Sheet Resource CHEAT SHEET PLUGIN ID cs Item Extension return cheatsheet Item Extensions  ArrayList readItemExtensions cheatsheetItemExtensions cheatsheetItemExtensions ArrayList IExtensionRegistry getExtensionRegistry readRegistry ICheatSheetResource CHEAT_SHEET_PLUGIN_ID csItemExtension cheatsheetItemExtensions
private void create Item Extension Element I Configuration Element element String class Name element get Attribute ATT CLASS String item Attribute element get Attribute ATT ITEM ATTRIBUTE ensure that a class was specified if class Name null log Missing Attribute element ATT CLASS return ensure that a item Attribute was specified if item Attribute null log Missing Attribute element ATT ITEM ATTRIBUTE return Cheat Sheet Item Extension Element item Extension Element new Cheat Sheet Item Extension Element item Extension Element set Class Name class Name item Extension Element set Item Attribute item Attribute item Extension Element set Configuration Element element cheatsheet Item Extensions add item Extension Element  createItemExtensionElement IConfigurationElement className getAttribute ATT_CLASS itemAttribute getAttribute ATT_ITEM_ATTRIBUTE className logMissingAttribute ATT_CLASS itemAttribute itemAttribute logMissingAttribute ATT_ITEM_ATTRIBUTE CheatSheetItemExtensionElement itemExtensionElement CheatSheetItemExtensionElement itemExtensionElement setClassName className itemExtensionElement setItemAttribute itemAttribute itemExtensionElement setConfigurationElement cheatsheetItemExtensions itemExtensionElement
Implement this method to read element attributes protected boolean read Element I Configuration Element element if element get Name equals TAG CATEGORY defer Category element return true else if element get Name equals TAG ITEM EXTENSION create Item Extension Element element return true else if element get Name equals TAG CHEATSHEET return false Cheat Sheet Element cheatsheet create Cheat Sheet Element element if cheatsheet null add New Element To Result cheatsheet element cheatsheets return true  readElement IConfigurationElement getName TAG_CATEGORY deferCategory getName TAG_ITEM_EXTENSION createItemExtensionElement getName TAG_CHEATSHEET CheatSheetElement createCheatSheetElement addNewElementToResult
public void registry Changed I Registry Change Event event I Extension Delta cheat Sheet Deltas event get Extension Deltas I Cheat Sheet Resource CHEAT SHEET PLUGIN ID plugin Point if cheat Sheet Deltas length 0 reset the list of cheat sheets it will be build on demand cheatsheets null I Extension Delta item Extension Deltas event get Extension Deltas I Cheat Sheet Resource CHEAT SHEET PLUGIN ID cs Item Extension if item Extension Deltas length 0 reset the list of cheat sheets item extensions it will be build on demand cheatsheet Item Extensions null  registryChanged IRegistryChangeEvent IExtensionDelta cheatSheetDeltas getExtensionDeltas ICheatSheetResource CHEAT_SHEET_PLUGIN_ID pluginPoint cheatSheetDeltas IExtensionDelta itemExtensionDeltas getExtensionDeltas ICheatSheetResource CHEAT_SHEET_PLUGIN_ID csItemExtension itemExtensionDeltas cheatsheetItemExtensions
public void stop I Extension Registry xregistry Platform get Extension Registry xregistry remove Registry Change Listener instance instance null  IExtensionRegistry getExtensionRegistry removeRegistryChangeListener

The constructor package Registry Reader  RegistryReader
This method extracts description as a subelement of the given element return description string if defined or empty string if not package String get Description I Configuration Element config I Configuration Element children config get Children TAG DESCRIPTION if children length 1 return children 0 get Value return I Cheat Sheet Resource EMPTY STRING  getDescription IConfigurationElement IConfigurationElement getChildren TAG_DESCRIPTION getValue ICheatSheetResource EMPTY_STRING
Logs the error in the workbench log using the provided text and the information in the configuration element private void log Error I Configuration Element element String text I Extension extension element get Declaring Extension String Buffer buf new String Buffer buf append Plugin extension get Namespace extension extension get Extension Point Unique Identifier NON NLS 2 NON NLS 1 buf append n text NON NLS 1 I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK buf to String null Cheat Sheet Plugin get Plugin get Log log status  logError IConfigurationElement IExtension getDeclaringExtension StringBuffer StringBuffer getNamespace getExtensionPointUniqueIdentifier IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus toString CheatSheetPlugin getPlugin getLog
Logs a very common registry error when a required attribute is missing package void log Missing Attribute I Configuration Element element String attribute Name log Error element Required attribute attribute Name not defined NON NLS 2 NON NLS 1  logMissingAttribute IConfigurationElement attributeName logError attributeName
Logs a registry error when the configuration element is unknown private void log Unknown Element I Configuration Element element log Error element Unknown extension tag found element get Name NON NLS 1  logUnknownElement IConfigurationElement logError getName
Sorter sorter new Sorter public boolean compare Object extension1 Object extension2 String s1 I Extension extension1 get Namespace to Upper Case String s2 I Extension extension2 get Namespace to Upper Case Return true if element Two is greater than element One return s2 compare To s1 0  IExtension getNamespace toUpperCase IExtension getNamespace toUpperCase elementTwo elementOne compareTo
Apply a reproducable order to the list of extensions provided such that the order will not change as extensions are added or removed private I Extension order Extensions I Extension extensions By default the order is based on plugin id sorted in ascending order The order for a plugin providing more than one extension for an extension point is dependent in the order listed in the XML file Sorter sorter new Sorter public boolean compare Object extension1 Object extension2 String s1 I Extension extension1 get Namespace to Upper Case String s2 I Extension extension2 get Namespace to Upper Case Return true if element Two is greater than element One return s2 compare To s1 0 Object sorted sorter sort extensions I Extension sorted Extension new I Extension sorted length System arraycopy sorted 0 sorted Extension 0 sorted length return sorted Extension  IExtension orderExtensions IExtension IExtension getNamespace toUpperCase IExtension getNamespace toUpperCase elementTwo elementOne compareTo IExtension sortedExtension IExtension sortedExtension sortedExtension
Implement this method to read element s attributes If children should also be read then implementor is responsible for calling code read Element Children code Implementor is also responsible for logging missing attributes return true if element was recognized false if not  readElementChildren
Read the element s children This is called by the subclass read Element method when it wants to read the children of the element package void read Element Children I Configuration Element element read Elements element get Children  readElement readElementChildren IConfigurationElement readElements getChildren
Read each element one at a time by calling the subclass implementation of code read Element code Logs an error if the element was not recognized private void read Elements I Configuration Element elements for int i 0 i elements length i if read Element elements i log Unknown Element elements i  readElement readElements IConfigurationElement readElement logUnknownElement
Read one extension by looping through its configuration elements private void read Extension I Extension extension read Elements extension get Configuration Elements  readExtension IExtension readElements getConfigurationElements
Start the registry reading process using the supplied plugin ID and extension point package void read Registry I Extension Registry registry String plugin Id String extension Point I Extension Point point registry get Extension Point plugin Id extension Point if point null I Extension extensions point get Extensions extensions order Extensions extensions for int i 0 i extensions length i read Extension extensions i  readRegistry IExtensionRegistry pluginId extensionPoint IExtensionPoint getExtensionPoint pluginId extensionPoint IExtension getExtensions orderExtensions readExtension

public abstract class Sorter Returns true if element Two is greater than element One This is the ordering method of the sort operation Each subclass overides this method with the particular implementation of the greater than concept for the objects being sorted  elementTwo elementOne
Sort the objects in sorted collection and return that collection private Object quick Sort Object sorted Collection int left int right int original Left left int original Right right Object mid sorted Collection left right 2 do while compare sorted Collection left mid left while compare mid sorted Collection right right if left right Object tmp sorted Collection left sorted Collection left sorted Collection right sorted Collection right tmp left right while left right if original Left right sorted Collection quick Sort sorted Collection original Left right if left original Right sorted Collection quick Sort sorted Collection left original Right return sorted Collection  quickSort sortedCollection originalLeft originalRight sortedCollection sortedCollection sortedCollection sortedCollection sortedCollection sortedCollection sortedCollection originalLeft sortedCollection quickSort sortedCollection originalLeft originalRight sortedCollection quickSort sortedCollection originalRight sortedCollection
Return a new sorted collection from this unsorted collection Sort using quick sort package Object sort Object un Sorted Collection int size un Sorted Collection length Object sorted Collection new Object size copy the array so can return a new sorted collection System arraycopy un Sorted Collection 0 sorted Collection 0 size if size 1 quick Sort sorted Collection 0 size 1 return sorted Collection  unSortedCollection unSortedCollection sortedCollection unSortedCollection sortedCollection quickSort sortedCollection sortedCollection

public Cheat Sheet Event int event Type String id I Cheat Sheet Manager csm super this csm csm this type event Type this cheatsheetID id  CheatSheetEvent eventType ICheatSheetManager eventType
return public int get Event Type return type  getEventType
return public String get Cheat SheetID return cheatsheetID  getCheatSheetID
see org eclipse ui cheatsheets events I Cheat Sheet Event get Cheat Sheet Manager public I Cheat Sheet Manager get Cheat Sheet Manager return csm  ICheatSheetEvent getCheatSheetManager ICheatSheetManager getCheatSheetManager

public Cheat Sheet Expand Restore Action String title boolean init Value Cheat Sheet Viewer viewer super title this viewer viewer set Checked init Value  CheatSheetExpandRestoreAction initValue CheatSheetViewer setChecked initValue
see Action action Performed public void run viewer toggle Expand Restore  actionPerformed toggleExpandRestore
public boolean is Collapsed return collapsed  isCollapsed
public void set Collapsed boolean value super set Checked value collapsed value if value set Tool Tip Text Cheat Sheet Plugin get Resource String I Cheat Sheet Resource RESTORE ALL TOOLTIP else set Tool Tip Text Cheat Sheet Plugin get Resource String I Cheat Sheet Resource COLLAPSE ALL BUT CURRENT TOOLTIP  setCollapsed setChecked setToolTipText CheatSheetPlugin getResourceString ICheatSheetResource RESTORE_ALL_TOOLTIP setToolTipText CheatSheetPlugin getResourceString ICheatSheetResource COLLAPSE_ALL_BUT_CURRENT_TOOLTIP

Package protected We don t want anyone else creating instances of this class Cheat Sheet Manager Cheat Sheet Element element cheatsheetID element getID listener element create Listener Instance  CheatSheetManager CheatSheetElement createListenerInstance
see org eclipse ui cheatsheets I Cheat Sheet Manager get Cheat SheetID public String get Cheat SheetID return cheatsheetID  ICheatSheetManager getCheatSheetID getCheatSheetID
this method will be called by the c s view when events occur void fire Event int event Type First check to see if we have a listener for this cheatsheet if listener null return I Cheat Sheet Event event new Cheat Sheet Event event Type cheatsheetID this listener cheat Sheet Event event  fireEvent eventType ICheatSheetEvent CheatSheetEvent eventType cheatSheetEvent
returns the hashtable with all manager data stored public Map get Data return data Table  getData dataTable
public String get Data String key if data Table null return null return String data Table get key  getData dataTable dataTable
public String get Variable Data String variable String result variable if variable null variable starts With variable ends With NON NLS 1 NON NLS 2 result variable substring 2 variable length 1 result get Data result return result  getVariableData startsWith endsWith getData
package void set Data Hashtable data data Table data  setData dataTable
public void set Data String key String data if key null throw new Illegal Argument Exception if data null data Table null data Table remove key return if data Table null data Table new Hashtable 30 data Table put key data  setData IllegalArgumentException dataTable dataTable dataTable dataTable dataTable

public Cheat Sheet Page Cheat Sheet cheat Sheet Array List view Item List Cheat Sheet Viewer cheat Sheet Viewer super this cheat Sheet cheat Sheet this view Item List view Item List this viewer cheat Sheet Viewer  CheatSheetPage CheatSheet cheatSheet ArrayList viewItemList CheatSheetViewer cheatSheetViewer cheatSheet cheatSheet viewItemList viewItemList cheatSheetViewer
public void create Part Composite parent super create Part parent  createPart createPart
Creates the main composite area of the view param parent the SWT parent for the title area composite return the created info area composite protected void create Info Area Composite parent Cheat Sheet Stop Watch start Stop Watch Cheat Sheet Page create Info Area NON NLS 1 super create Info Area parent Cheat Sheet Stop Watch print Lap Time Cheat Sheet Page create Info Area Time in Cheat Sheet Page create Info Area after super create Info Area NON NLS 1 NON NLS 2 Intro Item intro new Intro Item toolkit form cheat Sheet get Intro Item active Color viewer Cheat Sheet Stop Watch print Lap Time Cheat Sheet Page create Info Area Time in Cheat Sheet Page create Info Area after new Intro Item NON NLS 1 NON NLS 2 intro set Item Color intro alternate Color intro set Bold true view Item List add intro Cheat Sheet Stop Watch print Lap Time Cheat Sheet Page create Info Area Time in Cheat Sheet Page create Info Area before add loop NON NLS 1 NON NLS 2 Get the content info from the parser This makes up all items except the intro item Array List items cheat Sheet get Items for int i 0 i items size i Color color i 2 0 background Color alternate Color Core Item core Item new Core Item toolkit form org eclipse ui internal cheatsheets data Item items get i color viewer view Item List add core Item Cheat Sheet Stop Watch print Lap Time Cheat Sheet Page create Info Area Time in Cheat Sheet Page create Info Area NON NLS 1 NON NLS 2  createInfoArea CheatSheetStopWatch startStopWatch CheatSheetPage createInfoArea createInfoArea CheatSheetStopWatch printLapTime CheatSheetPage createInfoArea CheatSheetPage createInfoArea createInfoArea IntroItem IntroItem cheatSheet getIntroItem activeColor CheatSheetStopWatch printLapTime CheatSheetPage createInfoArea CheatSheetPage createInfoArea IntroItem setItemColor alternateColor setBold viewItemList CheatSheetStopWatch printLapTime CheatSheetPage createInfoArea CheatSheetPage createInfoArea ArrayList cheatSheet getItems backgroundColor alternateColor CoreItem coreItem CoreItem viewItemList coreItem CheatSheetStopWatch printLapTime CheatSheetPage createInfoArea CheatSheetPage createInfoArea
Creates the cheatsheet s title areawhich will consists of a title and image param parent the SWT parent for the title area composite protected String get Title if cheat Sheet null cheat Sheet get Title null return cheat Sheet get Title else return I Cheat Sheet Resource EMPTY STRING  getTitle cheatSheet cheatSheet getTitle cheatSheet getTitle ICheatSheetResource EMPTY_STRING
public void dispose super dispose if alternate Color null alternate Color dispose if active Color null active Color dispose  alternateColor alternateColor activeColor activeColor
protected void init Display display super init display active Color new Color display activeRGB alternate Color new Color display alternateRGB  activeColor alternateColor
public void initialized for Iterator iter view Item List iterator iter has Next View Item item View Item iter next item initialized  viewItemList hasNext ViewItem ViewItem

private void contribute To Action Bars I Action Bars bars get View Site get Action Bars I Menu Manager menu Manager bars get Menu Manager I Tool Bar Manager tbmanager bars get Tool Bar Manager fields String collapse Expand File icons full elcl16 collapse expand all gif NON NLS 1 URL collapse ExpandURL Cheat Sheet Plugin get Plugin find new Path collapse Expand File Image Descriptor collapse Expand Image Image Descriptor create FromURL collapse ExpandURL expand Restore Action new Cheat Sheet Expand Restore Action Cheat Sheet Plugin get Resource String I Cheat Sheet Resource COLLAPSE ALL BUT CURRENT TOOLTIP false viewer expand Restore Action set Tool Tip Text Cheat Sheet Plugin get Resource String I Cheat Sheet Resource COLLAPSE ALL BUT CURRENT TOOLTIP expand Restore Action set Image Descriptor collapse Expand Image tbmanager add expand Restore Action viewer set Expand Restore Action expand Restore Action Cheat Sheet Menu cheatsheet Menu Menu Item new Cheat Sheet Menu menu Manager add cheatsheet Menu Menu Item  contributeToActionBars IActionBars getViewSite getActionBars IMenuManager menuManager getMenuManager IToolBarManager getToolBarManager collapseExpandFile collapse_expand_all collapseExpandURL CheatSheetPlugin getPlugin collapseExpandFile ImageDescriptor collapseExpandImage ImageDescriptor createFromURL collapseExpandURL expandRestoreAction CheatSheetExpandRestoreAction CheatSheetPlugin getResourceString ICheatSheetResource COLLAPSE_ALL_BUT_CURRENT_TOOLTIP expandRestoreAction setToolTipText CheatSheetPlugin getResourceString ICheatSheetResource COLLAPSE_ALL_BUT_CURRENT_TOOLTIP expandRestoreAction setImageDescriptor collapseExpandImage expandRestoreAction setExpandRestoreAction expandRestoreAction CheatSheetMenu cheatsheetMenuMenuItem CheatSheetMenu menuManager cheatsheetMenuMenuItem
Creates the SWT controls for this workbench part p Clients should not call this method the workbench calls this method at appropriate times p p For implementors this is a multi step process ol li Create one or more controls within the parent li li Set the parent layout as needed li li Register any global actions with the code I Action Service code li li Register any popup menus with the code I Action Service code li li Register a selection provider with the code I Selection Service code optional li ol p param parent the parent control public void create Part Control Composite parent Cheat Sheet Stop Watch start Stop Watch Cheat Sheet View create Part Control NON NLS 1 viewer new Cheat Sheet Viewer viewer create Part Control parent if action Bar Contributed contribute To Action Bars action Bar Contributed true Cheat Sheet Stop Watch print Lap Time Cheat Sheet View create Part Control Time in Cheat Sheet View create Part Control before restore State NON NLS 1 NON NLS 2 if memento null restore State memento Cheat Sheet Stop Watch print Total Time Cheat Sheet View create Part Control Time in Cheat Sheet View create Part Control NON NLS 1 NON NLS 2  IActionService IActionService ISelectionService createPartControl CheatSheetStopWatch startStopWatch CheatSheetView createPartControl CheatSheetViewer createPartControl actionBarContributed contributeToActionBars actionBarContributed CheatSheetStopWatch printLapTime CheatSheetView createPartControl CheatSheetView createPartControl restoreState restoreState CheatSheetStopWatch printTotalTime CheatSheetView createPartControl CheatSheetView createPartControl
see org eclipse ui I Workbench Part dispose public void dispose super dispose  IWorkbenchPart
public Cheat Sheet Element get Content if viewer null return viewer get Content return null  CheatSheetElement getContent getContent
public String get Cheat SheetID if viewer null return viewer get Cheat SheetID return null  getCheatSheetID getCheatSheetID
state restoration as needed public void init I View Site site I Memento memento throws Part Init Exception init site this memento memento  IViewSite IMemento PartInitException
Restore the view state private void restore State I Memento memento I Memento content Memento memento get Child I Cheat Sheet Resource MEMENTO if content Memento null String id content Memento get String I Cheat Sheet Resource MEMENTO ID String name content Memento get String I Cheat Sheet Resource MEMENTO NAME Using an if else if here because at a point in time there was a different attribute used As a result an if else could cause set Input null to be invoked but this would throw an Illegal Argument Exception if name null try URL fileURL new URL content Memento get String I Cheat Sheet Resource MEMENTO URL set Input id name fileURL catch MalformedURL Exception mue else if id null set Input id  restoreState IMemento IMemento contentMemento getChild ICheatSheetResource contentMemento contentMemento getString ICheatSheetResource MEMENTO_ID contentMemento getString ICheatSheetResource MEMENTO_NAME setInput IllegalArgumentException contentMemento getString ICheatSheetResource MEMENTO_URL setInput MalformedURLException setInput
public void save State I Memento memento if viewer null Cheat Sheet Element element viewer get Content if element null Currently no cheat sheet is being displayed so just return return I Memento content Memento memento create Child I Cheat Sheet Resource MEMENTO Cheat Sheet Element temp Element Cheat Sheet Registry Reader get Instance find Cheat Sheet element getID if temp Element null content Memento put String I Cheat Sheet Resource MEMENTO ID element getID else content Memento put String I Cheat Sheet Resource MEMENTO ID element getID content Memento put String I Cheat Sheet Resource MEMENTO NAME element get Label null content Memento put String I Cheat Sheet Resource MEMENTO URL element get Content File Make sure the current cheat sheet is saved viewer save Current Sheet  saveState IMemento CheatSheetElement getContent IMemento contentMemento createChild ICheatSheetResource CheatSheetElement tempElement CheatSheetRegistryReader getInstance findCheatSheet tempElement contentMemento putString ICheatSheetResource MEMENTO_ID contentMemento putString ICheatSheetResource MEMENTO_ID contentMemento putString ICheatSheetResource MEMENTO_NAME getLabel contentMemento putString ICheatSheetResource MEMENTO_URL getContentFile saveCurrentSheet
Passing the focus request to the viewer s control public void set Focus if viewer null viewer set Focus  setFocus setFocus
public void set Input String id Cheat Sheet Stop Watch start Stop Watch Cheat Sheet View set Input NON NLS 1 if viewer null viewer set Input id Cheat Sheet Stop Watch print Total Time Cheat Sheet View set Input Time in Cheat Sheet View set Input String id NON NLS 1 NON NLS 2  setInput CheatSheetStopWatch startStopWatch CheatSheetView setInput setInput CheatSheetStopWatch printTotalTime CheatSheetView setInput CheatSheetView setInput
public void set Input String id String name URL url if viewer null viewer set Input id name url  setInput setInput

The constructor public Cheat Sheet Viewer current Item Num 1 save Helper new Cheat Sheet Save Helper  CheatSheetViewer currentItemNum saveHelper CheatSheetSaveHelper
package void advance Intro Item Intro Item intro Item Intro Item get View Item At Index 0 boolean is Started intro Item is Completed expand Restore List new Array List if expand Restore Action null expand Restore Action set Collapsed false clear Backgrounds clear Icons collapse All Buttons if is Started get New Manager current Item Num 1 for Iterator iter view Item List iterator iter has Next View Item item View Item iter next if item instanceof Core Item Core Item c Core Item item Array List l c get List Of Sub Item Composite Holders if l null for int j 0 j l size j Sub Item Composite Holder l get j set Skipped false Sub Item Composite Holder l get j set Completed false if is Started get Manager fire Event I Cheat Sheet Event CHEATSHEET RESTARTED else get Manager fire Event I Cheat Sheet Event CHEATSHEET STARTED is Started true intro Item set As Normal Collapsed intro Item set Complete intro Item set Restart Image LP item event fire Manager Item Event I Cheat Sheet Item Event ITEM DEACTIVATED intro Item View Item next Item get View Item At Index 1 if next Item item is Dynamic next Item handle Buttons next Item set As Current Active Item LP item event fire Manager Item Event I Cheat Sheet Item Event ITEM ACTIVATED next Item collapse All But Current false save Current Sheet  advanceIntroItem IntroItem introItem IntroItem getViewItemAtIndex isStarted introItem isCompleted expandRestoreList ArrayList expandRestoreAction expandRestoreAction setCollapsed clearBackgrounds clearIcons collapseAllButtons isStarted getNewManager currentItemNum viewItemList hasNext ViewItem ViewItem CoreItem CoreItem CoreItem ArrayList getListOfSubItemCompositeHolders SubItemCompositeHolder setSkipped SubItemCompositeHolder setCompleted isStarted getManager fireEvent ICheatSheetEvent CHEATSHEET_RESTARTED getManager fireEvent ICheatSheetEvent CHEATSHEET_STARTED isStarted introItem setAsNormalCollapsed introItem setComplete introItem setRestartImage fireManagerItemEvent ICheatSheetItemEvent ITEM_DEACTIVATED introItem ViewItem nextItem getViewItemAtIndex nextItem isDynamic nextItem handleButtons nextItem setAsCurrentActiveItem fireManagerItemEvent ICheatSheetItemEvent ITEM_ACTIVATED nextItem collapseAllButCurrent saveCurrentSheet
package void advance Item Image Hyperlink link boolean mark As Completed current Item View Item link get Data int index Next Item get Index Of Item current Item 1 if index Next Item current Item Num View Item vi get View Item At Index current Item Num vi set As Normal Non Collapsed if current Item null set that item to it s original color current Item set As Normal Collapsed set that item as complete if mark As Completed current Item set Complete LP item event fire Manager Item Event I Cheat Sheet Item Event ITEM COMPLETED current Item fire Manager Item Event I Cheat Sheet Item Event ITEM DEACTIVATED current Item else current Item set Skipped LP item event fire Manager Item Event I Cheat Sheet Item Event ITEM SKIPPED current Item fire Manager Item Event I Cheat Sheet Item Event ITEM DEACTIVATED current Item if index Next Item view Item List size View Item next Item get View Item At Index index Next Item current Item Num index Next Item if next Item null Handle lazy button instantiation here if next Item item is Dynamic Core Item next Item handle Buttons next Item set As Current Active Item LP item event fire Manager Item Event I Cheat Sheet Item Event ITEM ACTIVATED next Item current Item next Item Form Toolkit ensure Visible current Item get Main Item Composite else if index Next Item view Item List size save Current Sheet View Item item get View Item At Index 0 item set Expanded item get Main Item Composite set Focus get Manager fire Event I Cheat Sheet Event CHEATSHEET COMPLETED save Current Sheet  advanceItem ImageHyperlink markAsCompleted currentItem ViewItem getData indexNextItem getIndexOfItem currentItem indexNextItem currentItemNum ViewItem getViewItemAtIndex currentItemNum setAsNormalNonCollapsed currentItem currentItem setAsNormalCollapsed markAsCompleted currentItem setComplete fireManagerItemEvent ICheatSheetItemEvent ITEM_COMPLETED currentItem fireManagerItemEvent ICheatSheetItemEvent ITEM_DEACTIVATED currentItem currentItem setSkipped fireManagerItemEvent ICheatSheetItemEvent ITEM_SKIPPED currentItem fireManagerItemEvent ICheatSheetItemEvent ITEM_DEACTIVATED currentItem indexNextItem viewItemList ViewItem nextItem getViewItemAtIndex indexNextItem currentItemNum indexNextItem nextItem nextItem isDynamic CoreItem nextItem handleButtons nextItem setAsCurrentActiveItem fireManagerItemEvent ICheatSheetItemEvent ITEM_ACTIVATED nextItem currentItem nextItem FormToolkit ensureVisible currentItem getMainItemComposite indexNextItem viewItemList saveCurrentSheet ViewItem getViewItemAtIndex setExpanded getMainItemComposite setFocus getManager fireEvent ICheatSheetEvent CHEATSHEET_COMPLETED saveCurrentSheet
package void advance Sub Item Image Hyperlink link boolean mark As Completed int sub Item Index Label l null Array List list null Sub Item Composite Holder sich null Core Item ciws null current Item View Item link get Data if current Item instanceof Core Item ciws Core Item current Item if ciws null list ciws get List Of Sub Item Composite Holders sich Sub Item Composite Holder list get sub Item Index l sich get Icon Label if l null if mark As Completed l set Image View Item ciws get Complete Image sich set Completed true sich set Skipped false LP subitem event fire Manager Sub Item Event I Cheat Sheet Item Event ITEM COMPLETED ciws sub ItemID else l set Image View Item ciws get Skip Image sich set Skipped true sich set Completed false LP subitem event fire Manager Sub Item Event I Cheat Sheet Item Event ITEM SKIPPED ciws sub ItemID boolean all Attempted check All Attempted list boolean any Skipped check Contains Skipped list if all Attempted any Skipped advance Item link true return else if all Attempted any Skipped advance Item link false return Form Toolkit ensure Visible current Item get Main Item Composite save Current Sheet  advanceSubItem ImageHyperlink markAsCompleted subItemIndex ArrayList SubItemCompositeHolder CoreItem currentItem ViewItem getData currentItem CoreItem CoreItem currentItem getListOfSubItemCompositeHolders SubItemCompositeHolder subItemIndex getIconLabel markAsCompleted setImage ViewItem getCompleteImage setCompleted setSkipped fireManagerSubItemEvent ICheatSheetItemEvent ITEM_COMPLETED subItemID setImage ViewItem getSkipImage setSkipped setCompleted fireManagerSubItemEvent ICheatSheetItemEvent ITEM_SKIPPED subItemID allAttempted checkAllAttempted anySkipped checkContainsSkipped allAttempted anySkipped advanceItem allAttempted anySkipped advanceItem FormToolkit ensureVisible currentItem getMainItemComposite saveCurrentSheet
private boolean check All Attempted Array List list for int i 0 i list size i Sub Item Composite Holder s Sub Item Composite Holder list get i if s is Completed s is Skipped continue else return false return true  checkAllAttempted ArrayList SubItemCompositeHolder SubItemCompositeHolder isCompleted isSkipped
private boolean check Contains Skipped Array List list for int i 0 i list size i Sub Item Composite Holder s Sub Item Composite Holder list get i if s is Skipped return true return false  checkContainsSkipped ArrayList SubItemCompositeHolder SubItemCompositeHolder isSkipped
private boolean check Saved State try Properties props save Helper load State currentID There is a bug which causes the background of the buttons to remain white even though the color is set So instead of calling clear Backgrounds only the following line should be needed D oh View Item view Item List get 0 set Original Color clear Backgrounds if props null get View Item At Index 0 set As Current Active Item LP item event fire Manager Item Event I Cheat Sheet Item Event ITEM ACTIVATED items 0 return true boolean button Is Down Integer parse Int String props get I Parser Tags BUTTON 0 false true int item Num Integer parse Int String props get I Parser Tags CURRENT Array List completed States List Array List props get I Parser Tags COMPLETED Array List expanded States List Array List props get I Parser Tags EXPANDED expand Restore List Array List props get I Parser Tags EXPANDRESTORE String cid String props get I Parser Tags ID Hashtable completed Sub Items Hashtable props get I Parser Tags SUBITEMCOMPLETED Hashtable skipped Sub Items Hashtable props get I Parser Tags SUBITEMSKIPPED Hashtable csm Data Hashtable props get I Parser Tags MANAGERDATA Array List completed Sub Items Item List new Array List Array List skipped Sub Items Item List new Array List Enumeration e completed Sub Items keys while e has More Elements completed Sub Items Item List add e next Element Enumeration e2 skipped Sub Items keys while e2 has More Elements skipped Sub Items Item List add e2 next Element if cid null currentID cid get Manager set Data csm Data if item Num 0 current Item Num item Num current Item get View Item At Index item Num Cheat Sheet Stop Watch start Stop Watch Cheat Sheet Viewer check Saved State NON NLS 1 for int i 0 i view Item List size i View Item item get View Item At Index i if i 0 item item is Dynamic i current Item Num item handle Buttons item set Original Color if completed States List contains Integer to String i item set Complete item set Restart Image else if i current Item Num item set Skipped if expanded States List contains Integer to String i if i current Item Num item set Buttons Expanded else item set Buttons Collapsed item set Expanded else item set Collapsed if i current Item Num item set Buttons Collapsed else item set Buttons Expanded if expand Restore List contains Integer to String i item set Collapsed if completed Sub Items Item List contains Integer to String i String sub Item Numbers String completed Sub Items get Integer to String i String Tokenizer st new String Tokenizer sub Item Numbers NON NLS 1 if item instanceof Core Item Core Item coreitemws Core Item item while st has More Tokens String token st next Token Sub Item Composite Holder coreitemws get List Of Sub Item Composite Holders get Integer parse Int token set Completed true Sub Item Composite Holder coreitemws get List Of Sub Item Composite Holders get Integer parse Int token get Icon Label set Image item get Complete Image Array List l coreitemws get List Of Sub Item Composite Holders Sub Item Composite Holder s Sub Item Composite Holder l get Integer parse Int token if s null s get Start Button null s get Start Button set Image Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET ITEM BUTTON RESTART s get Start Button set Tool Tip Text Cheat Sheet Plugin get Resource String I Cheat Sheet Resource RESTART TASK TOOLTIP if skipped Sub Items Item List contains Integer to String i String sub Item Numbers String skipped Sub Items get Integer to String i String Tokenizer st new String Tokenizer sub Item Numbers NON NLS 1 if item instanceof Core Item Core Item coreitemws Core Item item while st has More Tokens String token st next Token Sub Item Composite Holder coreitemws get List Of Sub Item Composite Holders get Integer parse Int token set Skipped true Sub Item Composite Holder coreitemws get List Of Sub Item Composite Holders get Integer parse Int token get Icon Label set Image item get Skip Image Cheat Sheet Stop Watch print Lap Time Cheat Sheet Viewer check Saved State Time in Cheat Sheet Viewer check Saved State after loop i NON NLS 1 NON NLS 2 NON NLS 3 Cheat Sheet Stop Watch print Lap Time Cheat Sheet Viewer check Saved State Time in Cheat Sheet Viewer check Saved State after loop NON NLS 1 NON NLS 2 if button Is Down if expand Restore Action null expand Restore Action set Collapsed true save Current Sheet If the last item is the current one and it is complete then we should collapse the last item and set the focus on intro For all other cases set the current item as the active item if view Item List size 1 item Num current Item is Completed current Item set Collapsed get View Item At Index 0 get Main Item Composite set Focus The cheat sheet has been restored but is also completed so fire both events get Manager fire Event I Cheat Sheet Event CHEATSHEET RESTORED get Manager fire Event I Cheat Sheet Event CHEATSHEET COMPLETED else current Item set As Current Active Item If the intro item is completed than the cheat sheet has been restored if get View Item At Index 0 is Completed get Manager fire Event I Cheat Sheet Event CHEATSHEET RESTORED LP item event fire Manager Item Event I Cheat Sheet Item Event ITEM ACTIVATED current Item else get View Item At Index 0 set As Current Active Item LP item event fire Manager Item Event I Cheat Sheet Item Event ITEM ACTIVATED items 0 Form Toolkit ensure Visible current Item get Main Item Composite return true catch Exception e An exception while restoring the saved state data usually only occurs if the cheat sheet has been modified since this previous execution This most often occurs during development of cheat sheets and as such an end user is not as likely to encounter this Log the exception String state File save Helper get State File currentID toOS String String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR APPLYING STATE DATA LOG new Object state File currentID I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status Set the currentID to null so it is not saved during internal Dispose currentID null internal Dispose Reinitialize a few variables because there is no current Item or cheat Sheet Page now contentURL null current Item null current Item Num 1 cheat Sheet Page null expand Restore List new Array List view Item List new Array List Create the errorpage to show the user create Error Page Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR APPLYING STATE DATA return false  checkSavedState saveHelper loadState clearBackgrounds ViewItem viewItemList setOriginalColor clearBackgrounds getViewItemAtIndex setAsCurrentActiveItem fireManagerItemEvent ICheatSheetItemEvent ITEM_ACTIVATED buttonIsDown parseInt IParserTags itemNum parseInt IParserTags ArrayList completedStatesList ArrayList IParserTags ArrayList expandedStatesList ArrayList IParserTags expandRestoreList ArrayList IParserTags IParserTags completedSubItems IParserTags skippedSubItems IParserTags csmData IParserTags ArrayList completedSubItemsItemList ArrayList ArrayList skippedSubItemsItemList ArrayList completedSubItems hasMoreElements completedSubItemsItemList nextElement skippedSubItems hasMoreElements skippedSubItemsItemList nextElement getManager setData csmData itemNum currentItemNum itemNum currentItem getViewItemAtIndex itemNum CheatSheetStopWatch startStopWatch CheatSheetViewer checkSavedState viewItemList ViewItem getViewItemAtIndex isDynamic currentItemNum handleButtons setOriginalColor completedStatesList toString setComplete setRestartImage currentItemNum setSkipped expandedStatesList toString currentItemNum setButtonsExpanded setButtonsCollapsed setExpanded setCollapsed currentItemNum setButtonsCollapsed setButtonsExpanded expandRestoreList toString setCollapsed completedSubItemsItemList toString subItemNumbers completedSubItems toString StringTokenizer StringTokenizer subItemNumbers CoreItem CoreItem CoreItem hasMoreTokens nextToken SubItemCompositeHolder getListOfSubItemCompositeHolders parseInt setCompleted SubItemCompositeHolder getListOfSubItemCompositeHolders parseInt getIconLabel setImage getCompleteImage ArrayList getListOfSubItemCompositeHolders SubItemCompositeHolder SubItemCompositeHolder parseInt getStartButton getStartButton setImage CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_ITEM_BUTTON_RESTART getStartButton setToolTipText CheatSheetPlugin getResourceString ICheatSheetResource RESTART_TASK_TOOLTIP skippedSubItemsItemList toString subItemNumbers skippedSubItems toString StringTokenizer StringTokenizer subItemNumbers CoreItem CoreItem CoreItem hasMoreTokens nextToken SubItemCompositeHolder getListOfSubItemCompositeHolders parseInt setSkipped SubItemCompositeHolder getListOfSubItemCompositeHolders parseInt getIconLabel setImage getSkipImage CheatSheetStopWatch printLapTime CheatSheetViewer checkSavedState CheatSheetViewer checkSavedState CheatSheetStopWatch printLapTime CheatSheetViewer checkSavedState CheatSheetViewer checkSavedState buttonIsDown expandRestoreAction expandRestoreAction setCollapsed saveCurrentSheet viewItemList itemNum currentItem isCompleted currentItem setCollapsed getViewItemAtIndex getMainItemComposite setFocus getManager fireEvent ICheatSheetEvent CHEATSHEET_RESTORED getManager fireEvent ICheatSheetEvent CHEATSHEET_COMPLETED currentItem setAsCurrentActiveItem getViewItemAtIndex isCompleted getManager fireEvent ICheatSheetEvent CHEATSHEET_RESTORED fireManagerItemEvent ICheatSheetItemEvent ITEM_ACTIVATED currentItem getViewItemAtIndex setAsCurrentActiveItem fireManagerItemEvent ICheatSheetItemEvent ITEM_ACTIVATED FormToolkit ensureVisible currentItem getMainItemComposite stateFile saveHelper getStateFile toOSString CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_APPLYING_STATE_DATA_LOG stateFile IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog internalDispose internalDispose currentItem cheatSheetPage currentItem currentItemNum cheatSheetPage expandRestoreList ArrayList viewItemList ArrayList createErrorPage CheatSheetPlugin getResourceString ICheatSheetResource ERROR_APPLYING_STATE_DATA
private void clear Backgrounds for Iterator iter view Item List iterator iter has Next View Item item View Item iter next item set Original Color  clearBackgrounds viewItemList hasNext ViewItem ViewItem setOriginalColor
private void clear Icons for Iterator iter view Item List iterator iter has Next View Item item View Item iter next item set Original Color if item is Completed item is Expanded item is Skipped item set Incomplete  clearIcons viewItemList hasNext ViewItem ViewItem setOriginalColor isCompleted isExpanded isSkipped setIncomplete
private void collapse All But Current boolean from Action expand Restore List new Array List try View Item current get View Item At Index current Item Num for List Iterator iter view Item List list Iterator view Item List size iter has Previous View Item item View Item iter previous if item current item is Expanded item set Collapsed if from Action expand Restore List add Integer to String get Index Of Item item catch Exception e  collapseAllButCurrent fromAction expandRestoreList ArrayList ViewItem getViewItemAtIndex currentItemNum ListIterator viewItemList listIterator viewItemList hasPrevious ViewItem ViewItem isExpanded setCollapsed fromAction expandRestoreList toString getIndexOfItem
private void collapse All Buttons for Iterator iter view Item List list Iterator 1 iter has Next View Item item View Item iter next item set Buttons Collapsed  collapseAllButtons viewItemList listIterator hasNext ViewItem ViewItem setButtonsCollapsed
private void create Error Page String message if message null error Page new Error Page message else error Page new Error Page error Page create Part control hascontent true control layout true  createErrorPage errorPage ErrorPage errorPage ErrorPage errorPage createPart
control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dispose  addDisposeListener DisposeListener widgetDisposed DisposeEvent
Creates the SWT controls for this workbench part p Clients should not call this method the workbench calls this method at appropriate times p p For implementors this is a multi step process ol li Create one or more controls within the parent li li Set the parent layout as needed li li Register any global actions with the code I Action Service code li li Register any popup menus with the code I Action Service code li li Register a selection provider with the code I Selection Service code optional li ol p param parent the parent control public void create Part Control Composite parent control new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout vertical Spacing 0 layout horizontal Spacing 0 layout num Columns 1 control set Layout layout control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e dispose how To Begin new Label control SWT WRAP how To Begin set Text Cheat Sheet Plugin get Resource String I Cheat Sheet Resource INITIAL VIEW DIRECTIONS how To Begin set Layout Data new Grid Data Grid Data FILL BOTH Display display parent get Display busy Cursor new Cursor display SWT CURSOR WAIT if content Element null init Cheat Sheet View  IActionService IActionService ISelectionService createPartControl GridLayout GridLayout marginHeight marginWidth verticalSpacing horizontalSpacing numColumns setLayout addDisposeListener DisposeListener widgetDisposed DisposeEvent howToBegin howToBegin setText CheatSheetPlugin getResourceString ICheatSheetResource INITIAL_VIEW_DIRECTIONS howToBegin setLayoutData GridData GridData FILL_BOTH getDisplay busyCursor CURSOR_WAIT contentElement initCheatSheetView
Disposes of this cheat sheet viewer private void dispose internal Dispose if busy Cursor null busy Cursor dispose  internalDispose busyCursor busyCursor
public String get Cheat SheetID if get Content null return get Content getID return null  getCheatSheetID getContent getContent
Returns the current content return Cheat Sheet Element package Cheat Sheet Element get Content return content Element  CheatSheetElement CheatSheetElement getContent contentElement
see org eclipse ui cheatsheets I Cheat Sheet Viewer get Control public Control get Control return control  ICheatSheetViewer getControl getControl
Returns the hascontent true if the cheatsheet has content loaded and displayed return boolean private boolean get Has Content return hascontent  getHasContent
private int get Index Of Item View Item item int index view Item List index Of item if index 1 return index return 0  getIndexOfItem ViewItem viewItemList indexOf
package Cheat Sheet Manager get Manager if manager null get New Manager return manager  CheatSheetManager getManager getNewManager
private Cheat Sheet Manager get New Manager manager new Cheat Sheet Manager content Element return manager  CheatSheetManager getNewManager CheatSheetManager contentElement
private View Item get View Item At Index int index return View Item view Item List get index  ViewItem getViewItemAtIndex ViewItem viewItemList
private void init Cheat Sheet View Cheat Sheet Stop Watch start Stop Watch Cheat Sheet Viewer init Cheat Sheet View NON NLS 1 Re initialize list to store items collapsed by expand restore action on c s toolbar expand Restore List new Array List re set that action to turned off if expand Restore Action null expand Restore Action set Collapsed false reset current item to be null next item too current Item null current Item Num 0 view Item List new Array List Reset the page variables error Page null cheat Sheet Page null if how To Begin null how To Begin dispose how To Begin null read our contents if there are problems reading the file an error page should be created Cheat Sheet Stop Watch print Lap Time Cheat Sheet Viewer init Cheat Sheet View Time in Cheat Sheet Viewer init Cheat Sheet View before read File call NON NLS 1 NON NLS 2 boolean parsedOK read File Cheat Sheet Stop Watch print Lap Time Cheat Sheet Viewer init Cheat Sheet View Time in Cheat Sheet Viewer init Cheat Sheet View after read File call NON NLS 1 NON NLS 2 if parsedOK If a null cheat sheet id was specified return leaving the cheat sheet empty if null Cheat Sheet Id return Exception thrown during parsing Something is wrong with the Cheat sheet content file at the xml level if invalid Cheat Sheet Id create Error Page Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR CHEATSHEET DOESNOT EXIST else create Error Page null return control set Redraw false cheat Sheet Page new Cheat Sheet Page cheat Sheet view Item List this Cheat Sheet Stop Watch print Lap Time Cheat Sheet Viewer init Cheat Sheet View Time in Cheat Sheet Viewer init Cheat Sheet View after Cheat Sheet Page call NON NLS 1 NON NLS 2 cheat Sheet Page create Part control Cheat Sheet Stop Watch print Lap Time Cheat Sheet Viewer init Cheat Sheet View Time in Cheat Sheet Viewer init Cheat Sheet View after Cheat Sheet Page create Part call NON NLS 1 NON NLS 2 hascontent true get New Manager fire Event I Cheat Sheet Event CHEATSHEET OPENED Cheat Sheet Stop Watch print Lap Time Cheat Sheet Viewer init Cheat Sheet View Time in Cheat Sheet Viewer init Cheat Sheet View after fire Event call NON NLS 1 NON NLS 2 if check Saved State An error occurred when apply the saved state data control set Redraw true control layout return Cheat Sheet Stop Watch print Lap Time Cheat Sheet Viewer init Cheat Sheet View Time in Cheat Sheet Viewer init Cheat Sheet View after check Saved State call NON NLS 1 NON NLS 2 cheat Sheet Page initialized control set Redraw true control layout Cheat Sheet Stop Watch print Lap Time Cheat Sheet Viewer init Cheat Sheet View Time in Cheat Sheet Viewer init Cheat Sheet View after layout call NON NLS 1 NON NLS 2 if current Item null current Item is Completed current Item get Main Item Composite set Focus Cheat Sheet Stop Watch print Lap Time Cheat Sheet Viewer init Cheat Sheet View Time in Cheat Sheet Viewer init Cheat Sheet View at end of method NON NLS 1 NON NLS 2  initCheatSheetView CheatSheetStopWatch startStopWatch CheatSheetViewer initCheatSheetView expandRestoreList ArrayList expandRestoreAction expandRestoreAction setCollapsed currentItem currentItemNum viewItemList ArrayList errorPage cheatSheetPage howToBegin howToBegin howToBegin CheatSheetStopWatch printLapTime CheatSheetViewer initCheatSheetView CheatSheetViewer initCheatSheetView readFile readFile CheatSheetStopWatch printLapTime CheatSheetViewer initCheatSheetView CheatSheetViewer initCheatSheetView readFile nullCheatSheetId invalidCheatSheetId createErrorPage CheatSheetPlugin getResourceString ICheatSheetResource ERROR_CHEATSHEET_DOESNOT_EXIST createErrorPage setRedraw cheatSheetPage CheatSheetPage cheatSheet viewItemList CheatSheetStopWatch printLapTime CheatSheetViewer initCheatSheetView CheatSheetViewer initCheatSheetView CheatSheetPage cheatSheetPage createPart CheatSheetStopWatch printLapTime CheatSheetViewer initCheatSheetView CheatSheetViewer initCheatSheetView CheatSheetPage createPart getNewManager fireEvent ICheatSheetEvent CHEATSHEET_OPENED CheatSheetStopWatch printLapTime CheatSheetViewer initCheatSheetView CheatSheetViewer initCheatSheetView fireEvent checkSavedState setRedraw CheatSheetStopWatch printLapTime CheatSheetViewer initCheatSheetView CheatSheetViewer initCheatSheetView checkSavedState cheatSheetPage setRedraw CheatSheetStopWatch printLapTime CheatSheetViewer initCheatSheetView CheatSheetViewer initCheatSheetView currentItem currentItem isCompleted currentItem getMainItemComposite setFocus CheatSheetStopWatch printLapTime CheatSheetViewer initCheatSheetView CheatSheetViewer initCheatSheetView
private void internal Dispose if manager null manager fire Event I Cheat Sheet Event CHEATSHEET CLOSED save Current Sheet for Iterator iter view Item List iterator iter has Next View Item item View Item iter next item dispose if error Page null error Page dispose if cheat Sheet Page null cheat Sheet Page dispose  internalDispose fireEvent ICheatSheetEvent CHEATSHEET_CLOSED saveCurrentSheet viewItemList hasNext ViewItem ViewItem errorPage errorPage cheatSheetPage cheatSheetPage
Read the contents of the welcome page private boolean read File if parser null parser new Cheat Sheet Parser cheat Sheet parser parse contentURL return cheat Sheet null false true  readFile CheatSheetParser cheatSheet cheatSheet
private void restore Expand States try for int i 0 i expand Restore List size i int index Integer parse Int String expand Restore List get i View Item item get View Item At Index index if item is Expanded item set Expanded expand Restore List null catch Exception e  restoreExpandStates expandRestoreList parseInt expandRestoreList ViewItem getViewItemAtIndex isExpanded setExpanded expandRestoreList
package void run Perform Action Image Hyperlink link Core Item core Item null link set Cursor busy Cursor current Item View Item link get Data core Item Core Item current Item try if core Item null if core Item run Action get Manager View Item VIEWITEM ADVANCE core Item has Confirm LP item event fire Manager Item Event I Cheat Sheet Item Event ITEM PERFORMED current Item core Item set Restart Image set that item as complete advance Item link true save Current Sheet catch Runtime Exception e I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR RUNNING ACTION e Cheat Sheet Plugin get Plugin get Log log status org eclipse jface dialogs Error Dialog open Error PlatformUI get Workbench get Active Workbench Window get Shell null null status finally link set Cursor null  runPerformAction ImageHyperlink CoreItem coreItem setCursor busyCursor currentItem ViewItem getData coreItem CoreItem currentItem coreItem coreItem runAction getManager ViewItem VIEWITEM_ADVANCE coreItem hasConfirm fireManagerItemEvent ICheatSheetItemEvent ITEM_PERFORMED currentItem coreItem setRestartImage advanceItem saveCurrentSheet RuntimeException IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getResourceString ICheatSheetResource ERROR_RUNNING_ACTION CheatSheetPlugin getPlugin getLog ErrorDialog openError getWorkbench getActiveWorkbenchWindow getShell setCursor
package void run Sub Item Perform Action Image Hyperlink link int sub Item Index Core Item core Item null link set Cursor busy Cursor current Item View Item link get Data core Item Core Item current Item try if core Item null if core Item run Sub Item Action get Manager sub Item Index View Item VIEWITEM ADVANCE core Item has Confirm sub Item Index Array List l core Item get List Of Sub Item Composite Holders Sub Item Composite Holder s Sub Item Composite Holder l get sub Item Index s get Start Button set Image Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET ITEM BUTTON RESTART s get Start Button set Tool Tip Text Cheat Sheet Plugin get Resource String I Cheat Sheet Resource RESTART TASK TOOLTIP advance Sub Item link true sub Item Index save Current Sheet catch Runtime Exception e I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR RUNNING ACTION e Cheat Sheet Plugin get Plugin get Log log status org eclipse jface dialogs Error Dialog open Error PlatformUI get Workbench get Active Workbench Window get Shell null null status finally link set Cursor null  runSubItemPerformAction ImageHyperlink subItemIndex CoreItem coreItem setCursor busyCursor currentItem ViewItem getData coreItem CoreItem currentItem coreItem coreItem runSubItemAction getManager subItemIndex ViewItem VIEWITEM_ADVANCE coreItem hasConfirm subItemIndex ArrayList coreItem getListOfSubItemCompositeHolders SubItemCompositeHolder SubItemCompositeHolder subItemIndex getStartButton setImage CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_ITEM_BUTTON_RESTART getStartButton setToolTipText CheatSheetPlugin getResourceString ICheatSheetResource RESTART_TASK_TOOLTIP advanceSubItem subItemIndex saveCurrentSheet RuntimeException IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getResourceString ICheatSheetResource ERROR_RUNNING_ACTION CheatSheetPlugin getPlugin getLog ErrorDialog openError getWorkbench getActiveWorkbenchWindow getShell setCursor
package void save Current Sheet if currentID null boolean expand Restore Action State false if expand Restore Action null expand Restore Action State expand Restore Action is Collapsed save Helper save State current Item Num view Item List expand Restore Action State expand Restore List currentID get Manager  saveCurrentSheet expandRestoreActionState expandRestoreAction expandRestoreActionState expandRestoreAction isCollapsed saveHelper saveState currentItemNum viewItemList expandRestoreActionState expandRestoreList getManager
private void set Content Cheat Sheet Element element Cheat Sheet Stop Watch start Stop Watch Cheat Sheet Viewer set Content Cheat Sheet Element element NON NLS 1 if element null element equals content Element return if get Has Content Cleanup previous contents internal Dispose Set the current content to new content content Element element currentID null contentURL null if element null currentID element getID Bundle bundle null if element null element get Configuration Element null try String plugin Id element get Configuration Element get Declaring Extension get Namespace bundle Platform get Bundle plugin Id catch Exception e do nothing if bundle null contentURL Platform find bundle new Path element get Content File if contentURL null URL checker try checker new URL element get Content File if checker get Protocol equals Ignore Case http NON NLS 1 contentURL checker catch MalformedURL Exception mue Cheat Sheet Stop Watch print Lap Time Cheat Sheet Viewer set Content Cheat Sheet Element element Time in Cheat Sheet Viewer set Content before init Cheat Sheet View call NON NLS 1 NON NLS 2 Initialize the view with the new contents if control null init Cheat Sheet View Cheat Sheet Stop Watch print Lap Time Cheat Sheet Viewer set Content Cheat Sheet Element element Time in Cheat Sheet Viewer set Content after init Cheat Sheet View call NON NLS 1 NON NLS 2  setContent CheatSheetElement CheatSheetStopWatch startStopWatch CheatSheetViewer setContent CheatSheetElement contentElement getHasContent internalDispose contentElement getConfigurationElement pluginId getConfigurationElement getDeclaringExtension getNamespace getBundle pluginId getContentFile getContentFile getProtocol equalsIgnoreCase MalformedURLException CheatSheetStopWatch printLapTime CheatSheetViewer setContent CheatSheetElement CheatSheetViewer setContent initCheatSheetView initCheatSheetView CheatSheetStopWatch printLapTime CheatSheetViewer setContent CheatSheetElement CheatSheetViewer setContent initCheatSheetView
package void set Expand Restore Action Cheat Sheet Expand Restore Action action expand Restore Action action  setExpandRestoreAction CheatSheetExpandRestoreAction expandRestoreAction
Passing the focus request to the viewer s control public void set Focus need this to have current item selected Assumes that when you reactivate the view you will work with current item if current Item null current Item get Main Item Composite set Focus  setFocus currentItem currentItem getMainItemComposite setFocus
public void set Input String id Cheat Sheet Stop Watch start Stop Watch Cheat Sheet Viewer set Input String id NON NLS 1 Cheat Sheet Element element null if id null null Cheat Sheet Id true else null Cheat Sheet Id false element Cheat Sheet Registry Reader get Instance find Cheat Sheet id if element null String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR INVALID CHEATSHEET ID new Object id I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message null Cheat Sheet Plugin get Plugin get Log log status invalid Cheat Sheet Id true else invalid Cheat Sheet Id false Cheat Sheet Stop Watch print Lap Time Cheat Sheet Viewer set Input String id Time in Cheat Sheet Viewer set Input String id before set Content call NON NLS 1 NON NLS 2 set Content element Cheat Sheet Stop Watch print Lap Time Cheat Sheet Viewer set Input String id Time in Cheat Sheet Viewer set Input String id after set Content call NON NLS 1 NON NLS 2 Update most recently used cheat sheets list Cheat Sheet Plugin get Plugin get Cheat Sheet History add element Cheat Sheet Stop Watch print Lap Time Cheat Sheet Viewer set Input String id Time in Cheat Sheet Viewer set Input String id after get Cheat Sheet History call NON NLS 1 NON NLS 2  setInput CheatSheetStopWatch startStopWatch CheatSheetViewer setInput CheatSheetElement nullCheatSheetId nullCheatSheetId CheatSheetRegistryReader getInstance findCheatSheet CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_INVALID_CHEATSHEET_ID IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog invalidCheatSheetId invalidCheatSheetId CheatSheetStopWatch printLapTime CheatSheetViewer setInput CheatSheetViewer setInput setContent setContent CheatSheetStopWatch printLapTime CheatSheetViewer setInput CheatSheetViewer setInput setContent CheatSheetPlugin getPlugin getCheatSheetHistory CheatSheetStopWatch printLapTime CheatSheetViewer setInput CheatSheetViewer setInput getCheatSheetHistory
public void set Input String id String name URL url if id null name null url null throw new Illegal Argument Exception Cheat Sheet Element element new Cheat Sheet Element name element setID id element set Content File url to String null Cheat Sheet Id false invalid Cheat Sheet Id false set Content element  setInput IllegalArgumentException CheatSheetElement CheatSheetElement setContentFile toString nullCheatSheetId invalidCheatSheetId setContent
package void toggle Expand Restore if expand Restore Action null return if expand Restore Action is Collapsed restore Expand States expand Restore Action set Collapsed false save Current Sheet else collapse All But Current true expand Restore Action set Collapsed true save Current Sheet  toggleExpandRestore expandRestoreAction expandRestoreAction isCollapsed restoreExpandStates expandRestoreAction setCollapsed saveCurrentSheet collapseAllButCurrent expandRestoreAction setCollapsed saveCurrentSheet

Constructor for Core Item param parent param content Item public Core Item Form Toolkit toolkit Scrolled Form form Item item Color item Color Cheat Sheet Viewer viewer super toolkit form item item Color viewer  CoreItem contentItem CoreItem FormToolkit ScrolledForm itemColor CheatSheetViewer itemColor
private void create Button Composite button Composite toolkit create Composite body Wrapper Composite Grid Layout buttonlayout new Grid Layout 4 false buttonlayout margin Height 2 buttonlayout margin Width 2 buttonlayout vertical Spacing 2 Table Wrap Data button Data new Table Wrap Data Table Wrap Data FILL button Composite set Layout buttonlayout button Composite set Layout Data button Data button Composite set Background item Color Label spacer toolkit create Label button Composite null spacer set Background item Color Grid Data spacer Data new Grid Data spacer Data width Hint 16 spacer set Layout Data spacer Data  createButtonComposite buttonComposite createComposite bodyWrapperComposite GridLayout GridLayout marginHeight marginWidth verticalSpacing TableWrapData buttonData TableWrapData TableWrapData buttonComposite setLayout buttonComposite setLayoutData buttonData buttonComposite setBackground itemColor createLabel buttonComposite setBackground itemColor GridData spacerData GridData spacerData widthHint setLayoutData spacerData
toolkit adapt start Button true true start Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e viewer run Perform Action start Button  startButton startButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent runPerformAction startButton
toolkit adapt skip Button true true skip Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e viewer advance Item skip Button false  skipButton skipButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent advanceItem skipButton
toolkit adapt complete Button true true complete Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e viewer advance Item complete Button true  completeButton completeButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent advanceItem completeButton
private void create Buttons Action action if action null final Image Hyperlink start Button create Button button Composite Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET ITEM BUTTON START this item Color Cheat Sheet Plugin get Resource String I Cheat Sheet Resource PERFORM TASK TOOLTIP toolkit adapt start Button true true start Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e viewer run Perform Action start Button if item is Skip final Image Hyperlink skip Button create Button button Composite Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET ITEM BUTTON SKIP this item Color Cheat Sheet Plugin get Resource String I Cheat Sheet Resource SKIP TASK TOOLTIP toolkit adapt skip Button true true skip Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e viewer advance Item skip Button false if action null action is Confirm final Image Hyperlink complete Button create Button button Composite Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET ITEM BUTTON COMPLETE this item Color Cheat Sheet Plugin get Resource String I Cheat Sheet Resource COMPLETE TASK TOOLTIP toolkit adapt complete Button true true complete Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e viewer advance Item complete Button true  createButtons ImageHyperlink startButton createButton buttonComposite CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_ITEM_BUTTON_START itemColor CheatSheetPlugin getResourceString ICheatSheetResource PERFORM_TASK_TOOLTIP startButton startButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent runPerformAction startButton isSkip ImageHyperlink skipButton createButton buttonComposite CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_ITEM_BUTTON_SKIP itemColor CheatSheetPlugin getResourceString ICheatSheetResource SKIP_TASK_TOOLTIP skipButton skipButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent advanceItem skipButton isConfirm ImageHyperlink completeButton createButton buttonComposite CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_ITEM_BUTTON_COMPLETE itemColor CheatSheetPlugin getResourceString ICheatSheetResource COMPLETE_TASK_TOOLTIP completeButton completeButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent advanceItem completeButton
private void create Sub Item Button Composite button Composite toolkit create Composite body Wrapper Composite Grid Layout xbuttonlayout new Grid Layout 6 false xbuttonlayout margin Height 2 xbuttonlayout margin Width 2 xbuttonlayout vertical Spacing 2 Table Wrap Data xbutton Data new Table Wrap Data Table Wrap Data FILL button Composite set Layout xbuttonlayout button Composite set Layout Data xbutton Data button Composite set Background item Color  createSubItemButtonComposite buttonComposite createComposite bodyWrapperComposite GridLayout GridLayout marginHeight marginWidth verticalSpacing TableWrapData xbuttonData TableWrapData TableWrapData buttonComposite setLayout buttonComposite setLayoutData xbuttonData buttonComposite setBackground itemColor
toolkit adapt start Button true true start Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e viewer run Sub Item Perform Action final Start Button fi  startButton startButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent runSubItemPerformAction finalStartButton
toolkit adapt skip Button true true skip Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e viewer advance Sub Item skip Button false fi  skipButton skipButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent advanceSubItem skipButton
toolkit adapt complete Button true true complete Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e viewer advance Sub Item complete Button true fi  completeButton completeButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent advanceSubItem completeButton
private void create Sub Item Buttons Sub Item sub String this Value int index int added 0 Spacer label added Label check Done Label toolkit create Label button Composite null check Done Label set Background item Color Grid Data check Done Data new Grid Data check Done Data width Hint 16 check Done Label set Layout Data check Done Data added Now add the label String label Text null if this Value null label Text perform Line Substitution sub get Label this this Value NON NLS 1 else label Text sub get Label Label label toolkit create Label button Composite label Text label set Background item Color added Action sub Action null if sub get Perform When null sub get Perform When set Selected Action viewer get Manager sub Action sub get Perform When get Selected Action else sub Action sub get Action final int fi index Image Hyperlink start Button null if sub Action null added start Button create Button button Composite Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET ITEM BUTTON START this item Color Cheat Sheet Plugin get Resource String I Cheat Sheet Resource PERFORM TASK TOOLTIP final Image Hyperlink final Start Button start Button toolkit adapt start Button true true start Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e viewer run Sub Item Perform Action final Start Button fi if sub is Skip added final Image Hyperlink skip Button create Button button Composite Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET ITEM BUTTON SKIP this item Color Cheat Sheet Plugin get Resource String I Cheat Sheet Resource SKIP TASK TOOLTIP toolkit adapt skip Button true true skip Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e viewer advance Sub Item skip Button false fi if sub Action null sub Action is Confirm added final Image Hyperlink complete Button create Button button Composite Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET ITEM BUTTON COMPLETE this item Color Cheat Sheet Plugin get Resource String I Cheat Sheet Resource COMPLETE TASK TOOLTIP toolkit adapt complete Button true true complete Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e viewer advance Sub Item complete Button true fi while added 6 Add filler labels as needed to complete the row Label filler toolkit create Label button Composite null filler set Background item Color added list Of Sub Item Composite Holders add new Sub Item Composite Holder check Done Label start Button this Value sub  createSubItemButtons SubItem thisValue checkDoneLabel createLabel buttonComposite checkDoneLabel setBackground itemColor GridData checkDoneData GridData checkDoneData widthHint checkDoneLabel setLayoutData checkDoneData labelText thisValue labelText performLineSubstitution getLabel thisValue labelText getLabel createLabel buttonComposite labelText setBackground itemColor subAction getPerformWhen getPerformWhen setSelectedAction getManager subAction getPerformWhen getSelectedAction subAction getAction ImageHyperlink startButton subAction startButton createButton buttonComposite CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_ITEM_BUTTON_START itemColor CheatSheetPlugin getResourceString ICheatSheetResource PERFORM_TASK_TOOLTIP ImageHyperlink finalStartButton startButton startButton startButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent runSubItemPerformAction finalStartButton isSkip ImageHyperlink skipButton createButton buttonComposite CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_ITEM_BUTTON_SKIP itemColor CheatSheetPlugin getResourceString ICheatSheetResource SKIP_TASK_TOOLTIP skipButton skipButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent advanceSubItem skipButton subAction subAction isConfirm ImageHyperlink completeButton createButton buttonComposite CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_ITEM_BUTTON_COMPLETE itemColor CheatSheetPlugin getResourceString ICheatSheetResource COMPLETE_TASK_TOOLTIP completeButton completeButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent advanceSubItem completeButton createLabel buttonComposite setBackground itemColor listOfSubItemCompositeHolders SubItemCompositeHolder checkDoneLabel startButton thisValue
private Action get Action Action action item get Action if action null if item get Perform When null action item get Perform When get Selected Action return action  getAction getAction getPerformWhen getPerformWhen getSelectedAction
private Action get Action int index if item get Sub Items null item get Sub Items size 0 list Of Sub Item Composite Holders null Sub Item Composite Holder s Sub Item Composite Holder list Of Sub Item Composite Holders get index if s null Sub Item sub Item s get Sub Item Action action sub Item get Action if action null if sub Item get Perform When null action sub Item get Perform When get Selected Action return action return null  getAction getSubItems getSubItems listOfSubItemCompositeHolders SubItemCompositeHolder SubItemCompositeHolder listOfSubItemCompositeHolders SubItem subItem getSubItem subItem getAction subItem getPerformWhen subItem getPerformWhen getSelectedAction
public Array List get List Of Sub Item Composite Holders return list Of Sub Item Composite Holders  ArrayList getListOfSubItemCompositeHolders listOfSubItemCompositeHolders
private Image Hyperlink get Start Button if button Composite null Control controls button Composite get Children for int i 0 i controls length i Control control controls i if control instanceof Image Hyperlink String tool Tip Text control get Tool Tip Text if tool Tip Text null tool Tip Text equals Cheat Sheet Plugin get Resource String I Cheat Sheet Resource PERFORM TASK TOOLTIP tool Tip Text equals Cheat Sheet Plugin get Resource String I Cheat Sheet Resource RESTART TASK TOOLTIP return Image Hyperlink control return null  ImageHyperlink getStartButton buttonComposite buttonComposite getChildren ImageHyperlink toolTipText getToolTipText toolTipText toolTipText CheatSheetPlugin getResourceString ICheatSheetResource PERFORM_TASK_TOOLTIP toolTipText CheatSheetPlugin getResourceString ICheatSheetResource RESTART_TASK_TOOLTIP ImageHyperlink
see org eclipse ui internal cheatsheets View Item handle Buttons package void handle Buttons if item is Dynamic handle Dynamic Buttons return else if item get Sub Items null item get Sub Items size 0 try handle Sub Buttons catch Exception e Need to log exception here I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK Cheat Sheet Plugin get Resource String I Cheat Sheet Resource LESS THAN 2 SUBITEMS e Cheat Sheet Plugin get Plugin get Log log status org eclipse jface dialogs Error Dialog open Error PlatformUI get Workbench get Active Workbench Window get Shell Cheat Sheet Plugin get Resource String I Cheat Sheet Resource LESS THAN 2 SUBITEMS null status if buttons Handled return create Button Composite create Buttons item get Action buttons Handled true  ViewItem handleButtons handleButtons isDynamic handleDynamicButtons getSubItems getSubItems handleSubButtons IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getResourceString ICheatSheetResource LESS_THAN_2_SUBITEMS CheatSheetPlugin getPlugin getLog ErrorDialog openError getWorkbench getActiveWorkbenchWindow getShell CheatSheetPlugin getResourceString ICheatSheetResource LESS_THAN_2_SUBITEMS buttonsHandled createButtonComposite createButtons getAction buttonsHandled
private void handle Dynamic Buttons if item get Sub Items null item get Sub Items size 0 handle Dynamic Sub Item Buttons else if item get Perform When null handle Perform When Buttons  handleDynamicButtons getSubItems getSubItems handleDynamicSubItemButtons getPerformWhen handlePerformWhenButtons
private void handle Dynamic Sub Item Buttons boolean refresh Required false if button Composite null Control children button Composite get Children for int i 0 i children length i Control control children i control dispose refresh Required true else create Sub Item Button Composite Instantiate the list to store the sub item composites list Of Sub Item Composite Holders new Array List 20 loop throught the number of sub items make a new composite for each sub item Add the spacer the label then the buttons that are applicable for each sub item int i 0 for Iterator iter item get Sub Items iterator iter has Next i Abstract Sub Item sub Item Abstract Sub Item iter next if sub Item instanceof Repeated Sub Item Get the sub item to add Repeated Sub Item repeated Sub Item Repeated Sub Item sub Item String values repeated Sub Item get Values values viewer get Manager get Variable Data values if values null values length 0 values starts With values ends With NON NLS 1 NON NLS 2 String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR DATA MISSING LOG new Object repeated Sub Item get Values I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message null Cheat Sheet Plugin get Plugin get Log log status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR DATA MISSING null Cheat Sheet Plugin get Plugin get Log log status org eclipse jface dialogs Error Dialog open Error PlatformUI get Workbench get Active Workbench Window get Shell null null status break Sub Item sub Sub Item repeated Sub Item get Sub Items get 0 String Tokenizer tokenizer new String Tokenizer values NON NLS 1 while tokenizer has More Tokens String value tokenizer next Token create Sub Item Buttons sub value i Decrement the counter by because the outer loop increments it prior to the next iteration i else if sub Item instanceof Conditional Sub Item Get the sub item to add Conditional Sub Item sub Conditional Sub Item sub Item sub set Selected Sub Item viewer get Manager Sub Item selected Sub Item sub get Selected Sub Item if selected Sub Item null String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR CONDITIONAL DATA MISSING LOG new Object sub get Condition get Item get Title I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message null Cheat Sheet Plugin get Plugin get Log log status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR DATA MISSING null Cheat Sheet Plugin get Plugin get Log log status org eclipse jface dialogs Error Dialog open Error PlatformUI get Workbench get Active Workbench Window get Shell null null status break create Sub Item Buttons selected Sub Item null i else if sub Item instanceof Sub Item create Sub Item Buttons Sub Item sub Item null i if refresh Required button Composite layout get Main Item Composite layout form reflow true  handleDynamicSubItemButtons refreshRequired buttonComposite buttonComposite getChildren refreshRequired createSubItemButtonComposite listOfSubItemCompositeHolders ArrayList getSubItems hasNext AbstractSubItem subItem AbstractSubItem subItem RepeatedSubItem RepeatedSubItem repeatedSubItem RepeatedSubItem subItem repeatedSubItem getValues getManager getVariableData startsWith endsWith CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_DATA_MISSING_LOG repeatedSubItem getValues IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getResourceString ICheatSheetResource ERROR_DATA_MISSING CheatSheetPlugin getPlugin getLog ErrorDialog openError getWorkbench getActiveWorkbenchWindow getShell SubItem SubItem repeatedSubItem getSubItems StringTokenizer StringTokenizer hasMoreTokens nextToken createSubItemButtons subItem ConditionalSubItem ConditionalSubItem ConditionalSubItem subItem setSelectedSubItem getManager SubItem selectedSubItem getSelectedSubItem selectedSubItem CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_CONDITIONAL_DATA_MISSING_LOG getCondition getItem getTitle IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getResourceString ICheatSheetResource ERROR_DATA_MISSING CheatSheetPlugin getPlugin getLog ErrorDialog openError getWorkbench getActiveWorkbenchWindow getShell createSubItemButtons selectedSubItem subItem SubItem createSubItemButtons SubItem subItem refreshRequired buttonComposite getMainItemComposite
private void handle Perform When Buttons boolean refresh Required false if button Composite null Control controls button Composite get Children for int i 0 i controls length i Control control controls i if control instanceof Image Hyperlink control dispose refresh Required true else create Button Composite item get Perform When set Selected Action viewer get Manager Action perform Action item get Perform When get Selected Action create Buttons perform Action if refresh Required button Composite layout get Main Item Composite layout form reflow true  handlePerformWhenButtons refreshRequired buttonComposite buttonComposite getChildren ImageHyperlink refreshRequired createButtonComposite getPerformWhen setSelectedAction getManager performAction getPerformWhen getSelectedAction createButtons performAction refreshRequired buttonComposite getMainItemComposite
private void handle Sub Buttons throws Exception if buttons Handled return Instantiate the list to store the sub item composites list Of Sub Item Composite Holders new Array List 20 Array List sublist item get Sub Items if sublist null sublist size 1 throw new Exception I Cheat Sheet Resource LESS THAN 2 SUBITEMS create Sub Item Button Composite loop throught the number of sub items make a new composite for each sub item Add the spacer the label then the buttons that are applicable for each sub item for int i 0 i sublist size i create Sub Item Buttons Sub Item sublist get i null i buttons Handled true  handleSubButtons buttonsHandled listOfSubItemCompositeHolders ArrayList ArrayList getSubItems ICheatSheetResource LESS_THAN_2_SUBITEMS createSubItemButtonComposite createSubItemButtons SubItem buttonsHandled
package boolean has Confirm Action action get Action if action null action is Confirm return true return false  hasConfirm getAction isConfirm
package boolean has Confirm int index Action action get Action index if action null action is Confirm return true return false  hasConfirm getAction isConfirm
public String perform Line Substitution String line String variable String value String Buffer buffer new String Buffer line length String Delimited Tokenizer tokenizer new String Delimited Tokenizer line variable boolean add Value false while tokenizer has More Tokens if add Value buffer append value buffer append tokenizer next Token add Value true if tokenizer ends With Delimiter buffer append value return buffer to String  performLineSubstitution StringBuffer StringBuffer StringDelimitedTokenizer StringDelimitedTokenizer addValue hasMoreTokens addValue nextToken addValue endsWithDelimiter toString
package byte run Action Cheat Sheet Manager csm Action action get Action if action null return run Action action get PluginID action get Action Class action get Params csm return VIEWITEM ADVANCE  runAction CheatSheetManager getAction runAction getPluginID getActionClass getParams VIEWITEM_ADVANCE
I Property Change Listener property Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals I Action RESULT event get New Value instanceof Boolean listener Fired 0 true listener Result 0 Boolean event get New Value boolean Value  IPropertyChangeListener propertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty IAction getNewValue listenerFired listenerResult getNewValue booleanValue
Run an action package byte run Action String plugin Id String class Name String params Cheat Sheet Manager csm Bundle bundle Platform get Bundle plugin Id if bundle null String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR FINDING PLUGIN FOR ACTION new Object plugin Id I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message null Cheat Sheet Plugin get Plugin get Log log status org eclipse jface dialogs Error Dialog open Error PlatformUI get Workbench get Active Workbench Window get Shell null Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR RUNNING ACTION status return VIEWITEM DONOT ADVANCE Class action Class I Action action try action Class bundle load Class class Name catch Exception e String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR LOADING CLASS FOR ACTION new Object class Name I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status org eclipse jface dialogs Error Dialog open Error PlatformUI get Workbench get Active Workbench Window get Shell null Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR RUNNING ACTION status return VIEWITEM DONOT ADVANCE try action I Action action Class new Instance catch Exception e String message Cheat Sheet Plugin format Resource String I Cheat Sheet Resource ERROR CREATING CLASS FOR ACTION new Object class Name I Status status new Status I Status ERROR I Cheat Sheet Resource CHEAT SHEET PLUGIN ID I Status OK message e Cheat Sheet Plugin get Plugin get Log log status org eclipse jface dialogs Error Dialog open Error PlatformUI get Workbench get Active Workbench Window get Shell null Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR RUNNING ACTION status return VIEWITEM DONOT ADVANCE final boolean listener Fired false final boolean listener Result false I Property Change Listener property Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals I Action RESULT event get New Value instanceof Boolean listener Fired 0 true listener Result 0 Boolean event get New Value boolean Value Add Property Change Listener to the action so we can detemine if a action was succesfull action add Property Change Listener property Change Listener Run the action for this View Item if action instanceof I Cheat Sheet Action Prepare parameters String cloned Params null if params null params length 0 cloned Params new String params length System arraycopy params 0 cloned Params 0 params length for int i 0 i cloned Params length i String param cloned Params i if param null param starts With param ends With NON NLS 1 NON NLS 2 param param substring 2 param length 1 String value csm get Data param cloned Params i value null I Cheat Sheet Resource EMPTY STRING value I Cheat Sheet Action action run cloned Params csm else action run Remove the Property Change Listener action remove Property Change Listener property Change Listener if listener Fired 0 if listener Result 0 return VIEWITEM ADVANCE else return VIEWITEM DONOT ADVANCE return VIEWITEM ADVANCE  runAction pluginId className CheatSheetManager getBundle pluginId CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_FINDING_PLUGIN_FOR_ACTION pluginId IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog ErrorDialog openError getWorkbench getActiveWorkbenchWindow getShell CheatSheetPlugin getResourceString ICheatSheetResource ERROR_RUNNING_ACTION VIEWITEM_DONOT_ADVANCE actionClass IAction actionClass loadClass className CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_LOADING_CLASS_FOR_ACTION className IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog ErrorDialog openError getWorkbench getActiveWorkbenchWindow getShell CheatSheetPlugin getResourceString ICheatSheetResource ERROR_RUNNING_ACTION VIEWITEM_DONOT_ADVANCE IAction actionClass newInstance CheatSheetPlugin formatResourceString ICheatSheetResource ERROR_CREATING_CLASS_FOR_ACTION className IStatus IStatus ICheatSheetResource CHEAT_SHEET_PLUGIN_ID IStatus CheatSheetPlugin getPlugin getLog ErrorDialog openError getWorkbench getActiveWorkbenchWindow getShell CheatSheetPlugin getResourceString ICheatSheetResource ERROR_RUNNING_ACTION VIEWITEM_DONOT_ADVANCE listenerFired listenerResult IPropertyChangeListener propertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty IAction getNewValue listenerFired listenerResult getNewValue booleanValue PropertyChangeListener addPropertyChangeListener propertyChangeListener ViewItem ICheatSheetAction clonedParams clonedParams clonedParams clonedParams clonedParams startsWith endsWith getData clonedParams ICheatSheetResource EMPTY_STRING ICheatSheetAction clonedParams PropertyChangeListener removePropertyChangeListener propertyChangeListener listenerFired listenerResult VIEWITEM_ADVANCE VIEWITEM_DONOT_ADVANCE VIEWITEM_ADVANCE
package byte run Sub Item Action Cheat Sheet Manager csm int index if item get Sub Items null item get Sub Items size 0 list Of Sub Item Composite Holders null Sub Item Composite Holder s Sub Item Composite Holder list Of Sub Item Composite Holders get index if s null Action action get Action index if action null try if s get This Value null csm set Data this s get This Value NON NLS 1 String params action get Params return run Action action get PluginID action get Action Class params csm finally if s get This Value null csm set Data this null NON NLS 1 return VIEWITEM ADVANCE  runSubItemAction CheatSheetManager getSubItems getSubItems listOfSubItemCompositeHolders SubItemCompositeHolder SubItemCompositeHolder listOfSubItemCompositeHolders getAction getThisValue setData getThisValue getParams runAction getPluginID getActionClass getThisValue setData VIEWITEM_ADVANCE
package void set Buttons Handled boolean handled buttons Handled handled  setButtonsHandled buttonsHandled
package void set Incomplete super set Incomplete check for sub items and reset their icons Array List l get List Of Sub Item Composite Holders if l null for int j 0 j l size j Sub Item Composite Holder s Sub Item Composite Holder l get j if s is Completed s is Skipped s get Icon Label set Image null if s start Button null s get Start Button set Image Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET ITEM BUTTON START s get Start Button set Tool Tip Text Cheat Sheet Plugin get Resource String I Cheat Sheet Resource PERFORM TASK TOOLTIP  setIncomplete setIncomplete ArrayList getListOfSubItemCompositeHolders SubItemCompositeHolder SubItemCompositeHolder isCompleted isSkipped getIconLabel setImage startButton getStartButton setImage CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_ITEM_BUTTON_START getStartButton setToolTipText CheatSheetPlugin getResourceString ICheatSheetResource PERFORM_TASK_TOOLTIP
package void set Restart Image Image Hyperlink start Button get Start Button if start Button null start Button set Image Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET ITEM BUTTON RESTART start Button set Tool Tip Text Cheat Sheet Plugin get Resource String I Cheat Sheet Resource RESTART TASK TOOLTIP  setRestartImage ImageHyperlink startButton getStartButton startButton startButton setImage CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_ITEM_BUTTON_RESTART startButton setToolTipText CheatSheetPlugin getResourceString ICheatSheetResource RESTART_TASK_TOOLTIP
package void set Start Image Image Hyperlink start Button get Start Button if start Button null start Button set Image Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET ITEM BUTTON START start Button set Tool Tip Text Cheat Sheet Plugin get Resource String I Cheat Sheet Resource PERFORM TASK TOOLTIP  setStartImage ImageHyperlink startButton getStartButton startButton startButton setImage CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_ITEM_BUTTON_START startButton setToolTipText CheatSheetPlugin getResourceString ICheatSheetResource PERFORM_TASK_TOOLTIP

private String message public Error Page  ErrorPage
public Error Page String error Message this message error Message  ErrorPage errorMessage errorMessage
protected void create Info Area Composite parent super create Info Area parent String error String null if message null error String Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR PAGE MESSAGE else error String message Label error Label toolkit create Label form get Body error String SWT WRAP error Label set Layout Data new Table Wrap Data Table Wrap Data FILL GRAB  createInfoArea createInfoArea errorString errorString CheatSheetPlugin getResourceString ICheatSheetResource ERROR_PAGE_MESSAGE errorString errorLabel createLabel getBody errorString errorLabel setLayoutData TableWrapData TableWrapData FILL_GRAB
Creates the cheatsheet s title areawhich will consists of a title and image param parent the SWT parent for the title area composite protected String get Title return Cheat Sheet Plugin get Resource String I Cheat Sheet Resource ERROR LOADING CHEATSHEET CONTENT  getTitle CheatSheetPlugin getResourceString ICheatSheetResource ERROR_LOADING_CHEATSHEET_CONTENT

Constructor for Intro Item param parent param content Item public Intro Item Form Toolkit toolkit Scrolled Form form Item content Item Color item Color Cheat Sheet Viewer viewer super toolkit form content Item item Color viewer  IntroItem contentItem IntroItem FormToolkit ScrolledForm contentItem itemColor CheatSheetViewer contentItem itemColor
package void set Start Image start Button set Image Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET START start Button set Tool Tip Text Cheat Sheet Plugin get Resource String I Cheat Sheet Resource START CHEATSHEET TOOLTIP start Button setF Accessible Name start Button get Tool Tip Text  setStartImage startButton setImage CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_START startButton setToolTipText CheatSheetPlugin getResourceString ICheatSheetResource START_CHEATSHEET_TOOLTIP startButton setFAccessibleName startButton getToolTipText
package void set Restart Image start Button set Image Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET RESTART start Button set Tool Tip Text Cheat Sheet Plugin get Resource String I Cheat Sheet Resource RESTART CHEATSHEET TOOLTIP start Button setF Accessible Name start Button get Tool Tip Text  setRestartImage startButton setImage CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_RESTART startButton setToolTipText CheatSheetPlugin getResourceString ICheatSheetResource RESTART_CHEATSHEET_TOOLTIP startButton setFAccessibleName startButton getToolTipText
toolkit adapt start Button true true start Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e viewer advance Intro Item  startButton startButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent advanceIntroItem
see org eclipse ui internal cheatsheets data View Item handle Buttons Composite package void handle Buttons button Composite toolkit create Composite body Wrapper Composite Grid Layout buttonlayout new Grid Layout 4 false buttonlayout margin Height 2 buttonlayout margin Width 2 buttonlayout vertical Spacing 2 Table Wrap Data button Data new Table Wrap Data Table Wrap Data FILL button Composite set Layout buttonlayout button Composite set Layout Data button Data button Composite set Background item Color Label filllabel toolkit create Label button Composite null filllabel set Background item Color Grid Data filldata new Grid Data filldata width Hint 16 filllabel set Layout Data filldata start Button create Button button Composite Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET START this item Color Cheat Sheet Plugin get Resource String I Cheat Sheet Resource START CHEATSHEET TOOLTIP toolkit adapt start Button true true start Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e viewer advance Intro Item  ViewItem handleButtons handleButtons buttonComposite createComposite bodyWrapperComposite GridLayout GridLayout marginHeight marginWidth verticalSpacing TableWrapData buttonData TableWrapData TableWrapData buttonComposite setLayout buttonComposite setLayoutData buttonData buttonComposite setBackground itemColor createLabel buttonComposite setBackground itemColor GridData GridData widthHint setLayoutData startButton createButton buttonComposite CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_START itemColor CheatSheetPlugin getResourceString ICheatSheetResource START_CHEATSHEET_TOOLTIP startButton startButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent advanceIntroItem

Constructor for Noop Action protected Noop Action super  NoopAction NoopAction
Constructor for Noop Action param text protected Noop Action String text super text  NoopAction NoopAction
Constructor for Noop Action param text param image protected Noop Action String text Image Descriptor image super text image  NoopAction NoopAction ImageDescriptor

protected Scrolled Form form public Page  ScrolledForm
public Control get Control return cheat Sheet Composite  getControl cheatSheetComposite
public void create Part Composite parent init parent get Display cheat Sheet Composite new Composite parent SWT NONE cheat Sheet Composite set Redraw false Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout vertical Spacing 0 layout horizontal Spacing 0 layout num Columns 1 cheat Sheet Composite set Layout layout cheat Sheet Composite set Background background Color cheat Sheet Composite set Layout Data new Grid Data Grid Data FILL BOTH create Title Area cheat Sheet Composite create Info Area cheat Sheet Composite cheat Sheet Composite set Redraw true  createPart getDisplay cheatSheetComposite cheatSheetComposite setRedraw GridLayout GridLayout marginHeight marginWidth verticalSpacing horizontalSpacing numColumns cheatSheetComposite setLayout cheatSheetComposite setBackground backgroundColor cheatSheetComposite setLayoutData GridData GridData FILL_BOTH createTitleArea cheatSheetComposite createInfoArea cheatSheetComposite cheatSheetComposite setRedraw
Creates the main composite area of the view param parent the SWT parent for the title area composite return the created info area composite protected void create Info Area Composite parent Cheat Sheet Stop Watch start Stop Watch Page create Info Area NON NLS 1 toolkit new Form Toolkit parent get Display Cheat Sheet Stop Watch print Lap Time Page create Info Area Time in Page create Info Area after new Form Toolkit NON NLS 1 NON NLS 2 form toolkit create Scrolled Form parent Cheat Sheet Stop Watch print Lap Time Page create Info Area Time in Page create Info Area after create Scrolled Form NON NLS 1 NON NLS 2 form set Layout Data new Grid Data Grid Data FILL BOTH Cheat Sheet Stop Watch print Lap Time Page create Info Area Time in Page create Info Area after set Layout Data NON NLS 1 NON NLS 2 Table Wrap Layout layout new Table Wrap Layout Cheat Sheet Stop Watch print Lap Time Page create Info Area Time in Page create Info Area after new Form Table Wrap Layout NON NLS 1 NON NLS 2 layout num Columns 2 layout vertical Spacing 3 form get Body set Layout layout Cheat Sheet Stop Watch print Lap Time Page create Info Area Time in Page create Info Area end of method NON NLS 1 NON NLS 2  createInfoArea CheatSheetStopWatch startStopWatch createInfoArea FormToolkit getDisplay CheatSheetStopWatch printLapTime createInfoArea createInfoArea FormToolkit createScrolledForm CheatSheetStopWatch printLapTime createInfoArea createInfoArea createScrolledForm setLayoutData GridData GridData FILL_BOTH CheatSheetStopWatch printLapTime createInfoArea createInfoArea setLayoutData TableWrapLayout TableWrapLayout CheatSheetStopWatch printLapTime createInfoArea createInfoArea FormTableWrapLayout numColumns verticalSpacing getBody setLayout CheatSheetStopWatch printLapTime createInfoArea createInfoArea
Creates the cheatsheet s title areawhich will consists of a title and image param parent the SWT parent for the title area composite private void create Title Area Composite parent Message label final C Label message Label new C Label parent SWT NONE message Label set Background color Array new int 85 100 true message Label set Text get Title message Label set Font J Face Resources get Header Font Grid Data ldata new Grid Data Grid Data FILL HORIZONTAL ldata grab Excess Horizontal Space true message Label set Layout Data ldata final I Property Change Listener font Listener new I Property Change Listener public void property Change Property Change Event event if J Face Resources HEADER FONT equals event get Property message Label set Font J Face Resources get Header Font message Label add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event J Face Resources get Font Registry remove Listener font Listener J Face Resources get Font Registry add Listener font Listener Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL message Label set Layout Data grid Data  createTitleArea CLabel messageLabel CLabel messageLabel setBackground colorArray messageLabel setText getTitle messageLabel setFont JFaceResources getHeaderFont GridData GridData GridData FILL_HORIZONTAL grabExcessHorizontalSpace messageLabel setLayoutData IPropertyChangeListener fontListener IPropertyChangeListener propertyChange PropertyChangeEvent JFaceResources HEADER_FONT getProperty messageLabel setFont JFaceResources getHeaderFont messageLabel addDisposeListener DisposeListener widgetDisposed DisposeEvent JFaceResources getFontRegistry removeListener fontListener JFaceResources getFontRegistry addListener fontListener GridData gridData GridData GridData FILL_HORIZONTAL messageLabel setLayoutData gridData
public void dispose for int i 0 i color Array length i if color Array i null color Array i dispose if cheat Sheet Composite null cheat Sheet Composite dispose if toolkit null toolkit dispose  colorArray colorArray colorArray cheatSheetComposite cheatSheetComposite
protected void init Display display Get the background color for the cheatsheet controls background Color J Face Colors get Banner Background display color Array new Color new Color display topRGB new Color display midRGB new Color display bottomRGB  backgroundColor JFaceColors getBannerBackground colorArray
protected abstract String get Title  getTitle

public String Delimited Tokenizer String str String delim current Position 0 this str str this delimiter delim max Position this str length delimiter Length this delimiter length  StringDelimitedTokenizer currentPosition maxPosition delimiterLength
public int count Tokens int count 0 int start Position 0 while start Position max Position start Position 1 start Position str index Of delimiter start Position if start Position 1 start Position delimiter Length count return count  countTokens startPosition startPosition maxPosition startPosition startPosition indexOf startPosition startPosition startPosition delimiterLength
public boolean ends With Delimiter return str ends With delimiter  endsWithDelimiter endsWith
public boolean has More Tokens return current Position max Position  hasMoreTokens currentPosition maxPosition
public String next Token int position str index Of delimiter current Position String token null if position 1 token str substring current Position current Position max Position else token str substring current Position position current Position position delimiter Length return token  nextToken indexOf currentPosition currentPosition currentPosition maxPosition currentPosition currentPosition delimiterLength

package Sub Item Composite Holder Label l Image Hyperlink startb String this Value Sub Item sub Item super icon Label l start Button startb this this Value this Value this sub Item sub Item  SubItemCompositeHolder ImageHyperlink thisValue SubItem subItem iconLabel startButton thisValue thisValue subItem subItem
return Label package Label get Icon Label return icon Label  getIconLabel iconLabel
return public boolean is Completed return completed  isCompleted
return public boolean is Skipped return skipped  isSkipped
param b package void set Completed boolean b completed b  setCompleted
param b package void set Skipped boolean b skipped b  setSkipped
return package Image Hyperlink get Start Button return start Button  ImageHyperlink getStartButton startButton
return Returns the this Value public String get This Value return this Value  thisValue getThisValue thisValue
param this Value The this Value to set public void set This Value String this Value this this Value this Value  thisValue thisValue setThisValue thisValue thisValue thisValue
return Returns the sub Item public Sub Item get Sub Item return sub Item  subItem SubItem getSubItem subItem
param sub Item The sub Item to set public void set Sub Item Sub Item sub Item this sub Item sub Item  subItem subItem setSubItem SubItem subItem subItem subItem

Constructor for View Item public View Item Form Toolkit toolkit Scrolled Form form Item item Color item Color Cheat Sheet Viewer viewer super this toolkit toolkit this form form this parent form get Body this item item this item Color item Color this viewer viewer active Color new Color parent get Display activeRGB alternate Color new Color parent get Display alternateRGB add Item  ViewItem ViewItem FormToolkit ScrolledForm itemColor CheatSheetViewer getBody itemColor itemColor activeColor getDisplay alternateColor getDisplay addItem
main Item Composite add Expansion Listener new Expansion Adapter public void expansion State Changed Expansion Event e form reflow true  mainItemComposite addExpansionListener ExpansionAdapter expansionStateChanged ExpansionEvent
help Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e If we have a context id handle this first and ignore an hrefs if item get Context Id null open Infopop e widget else We only have an href so let s open it in the help system open Help Topic  helpButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent getContextId openInfopop openHelpTopic
Adds the item to the main composite private void add Item Cheat Sheet Stop Watch start Stop Watch View Item add Item NON NLS 1 Display display parent get Display Color bg J Face Colors get Banner Background display white bg Cheat Sheet Stop Watch print Lap Time View Item add Item Time in add Item after get Banner Background NON NLS 1 NON NLS 2 Set up the main composite for the item check Done Label toolkit create Label parent NON NLS 1 check Done Label set Background white Cheat Sheet Stop Watch print Lap Time View Item add Item Time in add Item after create check Done Label NON NLS 1 NON NLS 2 main Item Composite toolkit create Expandable Composite parent Expandable Composite TREE NODE main Item Composite set Background item Color main Item Composite set Layout Data new Table Wrap Data Table Wrap Data FILL GRAB String title item get Title if title null main Item Composite set Text title Cheat Sheet Stop Watch print Lap Time View Item add Item Time in add Item after create main Item Composite NON NLS 1 NON NLS 2 main Item Composite add Expansion Listener new Expansion Adapter public void expansion State Changed Expansion Event e form reflow true Cheat Sheet Stop Watch print Lap Time View Item add Item Time in add Item after add Expansion Listener NON NLS 1 NON NLS 2 handle item extensions here check number of extensions for this item and adjust layout accordingly int number 0 Array List item Exts item get Item Extensions if item Exts null item Exts size 0 item get Context Id null item get Href null Set up the title composite for the item title Composite toolkit create Composite main Item Composite title Composite set Background item Color if item Exts null for int g 0 g item Exts size g Abstract Item Extension Element eea Abstract Item Extension Element item Exts get g number eea length for int x 0 x eea length x eea x create Control title Composite Cheat Sheet Stop Watch print Lap Time View Item add Item Time in add Item after create item extensions NON NLS 1 NON NLS 2 don t add the help icon unless there is a context id or help link if item get Context Id null item get Href null adjust the layout count number Image Hyperlink help Button create Button title Composite Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET ITEM HELP this item Color Cheat Sheet Plugin get Resource String I Cheat Sheet Resource HELP BUTTON TOOLTIP toolkit adapt help Button true true help Button add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e If we have a context id handle this first and ignore an hrefs if item get Context Id null open Infopop e widget else We only have an href so let s open it in the help system open Help Topic Cheat Sheet Stop Watch print Lap Time View Item add Item Time in add Item after create help button NON NLS 1 NON NLS 2 if number 0 main Item Composite set Text Client title Composite Grid Layout layout new Grid Layout number false Grid Data data new Grid Data Grid Data FILL BOTH title Composite set Layout layout title Composite set Layout Data data layout margin Width 0 layout margin Height 0 layout vertical Spacing 0 Cheat Sheet Stop Watch print Lap Time View Item add Item Time in add Item after set Text Client NON NLS 1 NON NLS 2 Body wrapper here this composite will be hidden and shown as appropriate body Wrapper Composite toolkit create Composite main Item Composite main Item Composite set Client body Wrapper Composite Table Wrap Layout wrapper Layout new Table Wrap Layout body Wrapper Composite set Layout wrapper Layout body Wrapper Composite set Background item Color Cheat Sheet Stop Watch print Lap Time View Item add Item Time in add Item after create body Wrapper Composite NON NLS 1 NON NLS 2 body Text toolkit create Form Text body Wrapper Composite false body Text toolkit create Label body Wrapper Composite item get Description SWT WRAP body Text set Text item get Description item get Description starts With I Parser Tags FORM START TAG false Set up the body text portion here body Text set Background item Color body Text set Layout Data new Table Wrap Data Table Wrap Data FILL GRAB Cheat Sheet Stop Watch print Lap Time View Item add Item Time in add Item after create Form Text NON NLS 1 NON NLS 2 Handle the sub steps and regular buttons here First Check to see if there is sub steps If there is don t create the button comp As it will be handled by the Core Item With Subs If there is no sub steps create a button composite and Pass it to Core Item using the handle Buttons if item is Dynamic handle Buttons Cheat Sheet Stop Watch print Lap Time View Item add Item Time in add Item after handle Buttons NON NLS 1 NON NLS 2 set Buttons Collapsed set Collapsed Cheat Sheet Stop Watch print Lap Time View Item add Item Time in add Item after setting buttons and item collapsed NON NLS 1 NON NLS 2 bold Font main Item Composite get Font Font Data font Datas bold Font get Font Data for int i 0 i font Datas length i font Datas i set Style font Datas i get Style SWT BOLD regular Font new Font main Item Composite get Display font Datas Cheat Sheet Stop Watch print Lap Time View Item add Item Time in add Item after font initlization NON NLS 1 NON NLS 2 set Bold false Cheat Sheet Stop Watch print Lap Time View Item add Item Time in add Item after set Bold NON NLS 1 NON NLS 2  addItem CheatSheetStopWatch startStopWatch ViewItem addItem getDisplay JFaceColors getBannerBackground CheatSheetStopWatch printLapTime ViewItem addItem addItem getBannerBackground checkDoneLabel createLabel checkDoneLabel setBackground CheatSheetStopWatch printLapTime ViewItem addItem addItem checkDoneLabel mainItemComposite createExpandableComposite ExpandableComposite TREE_NODE mainItemComposite setBackground itemColor mainItemComposite setLayoutData TableWrapData TableWrapData FILL_GRAB getTitle mainItemComposite setText CheatSheetStopWatch printLapTime ViewItem addItem addItem mainItemComposite mainItemComposite addExpansionListener ExpansionAdapter expansionStateChanged ExpansionEvent CheatSheetStopWatch printLapTime ViewItem addItem addItem addExpansionListener ArrayList itemExts getItemExtensions itemExts itemExts getContextId getHref titleComposite createComposite mainItemComposite titleComposite setBackground itemColor itemExts itemExts AbstractItemExtensionElement AbstractItemExtensionElement itemExts createControl titleComposite CheatSheetStopWatch printLapTime ViewItem addItem addItem getContextId getHref ImageHyperlink helpButton createButton titleComposite CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_ITEM_HELP itemColor CheatSheetPlugin getResourceString ICheatSheetResource HELP_BUTTON_TOOLTIP helpButton helpButton addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent getContextId openInfopop openHelpTopic CheatSheetStopWatch printLapTime ViewItem addItem addItem mainItemComposite setTextClient titleComposite GridLayout GridLayout GridData GridData GridData FILL_BOTH titleComposite setLayout titleComposite setLayoutData marginWidth marginHeight verticalSpacing CheatSheetStopWatch printLapTime ViewItem addItem addItem setTextClient bodyWrapperComposite createComposite mainItemComposite mainItemComposite setClient bodyWrapperComposite TableWrapLayout wrapperLayout TableWrapLayout bodyWrapperComposite setLayout wrapperLayout bodyWrapperComposite setBackground itemColor CheatSheetStopWatch printLapTime ViewItem addItem addItem bodyWrapperComposite bodyText createFormText bodyWrapperComposite bodyText createLabel bodyWrapperComposite getDescription bodyText setText getDescription getDescription startsWith IParserTags FORM_START_TAG bodyText setBackground itemColor bodyText setLayoutData TableWrapData TableWrapData FILL_GRAB CheatSheetStopWatch printLapTime ViewItem addItem addItem FormText CoreItemWithSubs CoreItem handleButtons isDynamic handleButtons CheatSheetStopWatch printLapTime ViewItem addItem addItem handleButtons setButtonsCollapsed setCollapsed CheatSheetStopWatch printLapTime ViewItem addItem addItem boldFont mainItemComposite getFont FontData fontDatas boldFont getFontData fontDatas fontDatas setStyle fontDatas getStyle regularFont mainItemComposite getDisplay fontDatas CheatSheetStopWatch printLapTime ViewItem addItem addItem setBold CheatSheetStopWatch printLapTime ViewItem addItem addItem setBold
protected Image Hyperlink create Button Composite parent Image image View Item item Color color String tool Tip Text Image Hyperlink button new Image Hyperlink parent SWT NULL toolkit adapt button true true button set Image image button set Data item button set Background color button set Tool Tip Text tool Tip Text button setF Accessible Description body Text get Text button setF Accessible Name button get Tool Tip Text return button  ImageHyperlink createButton ViewItem toolTipText ImageHyperlink ImageHyperlink setImage setData setBackground setToolTipText toolTipText setFAccessibleDescription bodyText getText setFAccessibleName getToolTipText
public void dispose if alternate Color null alternate Color dispose if active Color null active Color dispose if check Done Label null check Done Label dispose if body Text null body Text dispose if button Composite null button Composite dispose if body Comp null body Comp dispose if body Wrapper Composite null body Wrapper Composite dispose if main Item Composite null main Item Composite dispose if white null white dispose if title Composite null title Composite dispose if regular Font null regular Font dispose Array List item Exts item get Item Extensions if item Exts null for int g 0 g item Exts size g Abstract Item Extension Element eea Abstract Item Extension Element item Exts get g for int x 0 x eea length x eea x dispose  alternateColor alternateColor activeColor activeColor checkDoneLabel checkDoneLabel bodyText bodyText buttonComposite buttonComposite bodyComp bodyComp bodyWrapperComposite bodyWrapperComposite mainItemComposite mainItemComposite titleComposite titleComposite regularFont regularFont ArrayList itemExts getItemExtensions itemExts itemExts AbstractItemExtensionElement AbstractItemExtensionElement itemExts
return package Image get Complete Image return Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET ITEM COMPLETE  getCompleteImage CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_ITEM_COMPLETE
return public Item get Item return item  getItem
Returns the main Item Composite return Composite package Composite get Main Item Composite return main Item Composite  mainItemComposite getMainItemComposite mainItemComposite
return package Image get Skip Image return Cheat Sheet Plugin get Plugin get Image I Cheat Sheet Resource CHEATSHEET ITEM SKIP  getSkipImage CheatSheetPlugin getPlugin getImage ICheatSheetResource CHEATSHEET_ITEM_SKIP
Adds the buttons to the button Composite package abstract void handle Buttons  buttonComposite handleButtons
package boolean is Bold return bold  isBold
Returns the completed return boolean public boolean is Completed return completed  isCompleted
public boolean is Expanded return main Item Composite is Expanded  isExpanded mainItemComposite isExpanded
package boolean is Skipped return is Skipped  isSkipped isSkipped
Open a help topic private void open Help Topic if item null item get Href null return Workbench Help display Help Resource item get Href  openHelpTopic getHref WorkbenchHelp displayHelpResource getHref
Open an infopop private void open Infopop Widget widget if item null item get Context Id null return I Context context Help System get Context item get Context Id if context null determine a location in the upper right corner of the widget Point point widget get Display get Cursor Location point new Point point x 15 point y display the help Workbench Help display Context context point x point y  openInfopop getContextId IContext HelpSystem getContext getContextId getDisplay getCursorLocation WorkbenchHelp displayContext
package void set As Current Active Item set Color As Current true if button Expanded set Buttons Expanded set Expanded set Bold true main Item Composite set Focus  setAsCurrentActiveItem setColorAsCurrent buttonExpanded setButtonsExpanded setExpanded setBold mainItemComposite setFocus
package void set As Normal Collapsed set Bold false set Color As Current false if main Item Composite is Expanded set Collapsed  setAsNormalCollapsed setBold setColorAsCurrent mainItemComposite isExpanded setCollapsed
package void set As Normal Non Collapsed set Color As Current false set Bold false  setAsNormalNonCollapsed setColorAsCurrent setBold
private void set Body Color Color color main Item Composite set Background color body Wrapper Composite set Background color if button Composite null button Composite set Background color Control body Children body Wrapper Composite get Children for int i 0 i body Children length i body Children i set Background color if button Composite null button Composite set Background color body Children button Composite get Children for int i 0 i body Children length i body Children i set Background color  setBodyColor mainItemComposite setBackground bodyWrapperComposite setBackground buttonComposite buttonComposite setBackground bodyChildren bodyWrapperComposite getChildren bodyChildren bodyChildren setBackground buttonComposite buttonComposite setBackground bodyChildren buttonComposite getChildren bodyChildren bodyChildren setBackground
package void set Bold boolean value if value main Item Composite set Font bold Font if initialized main Item Composite layout else main Item Composite set Font regular Font if initialized main Item Composite layout bold value  setBold mainItemComposite setFont boldFont mainItemComposite mainItemComposite setFont regularFont mainItemComposite
package void set Buttons Collapsed if button Composite null if button Expanded button Composite set Visible false button Expanded false  setButtonsCollapsed buttonComposite buttonExpanded buttonComposite setVisible buttonExpanded
package void set Buttons Expanded if button Expanded button Composite set Visible true button Expanded true if initialized Form Toolkit ensure Visible get Main Item Composite  setButtonsExpanded buttonExpanded buttonComposite setVisible buttonExpanded FormToolkit ensureVisible getMainItemComposite
package void set Collapsed if main Item Composite is Expanded main Item Composite set Expanded false if initialized form reflow true Form Toolkit ensure Visible get Main Item Composite  setCollapsed mainItemComposite isExpanded mainItemComposite setExpanded FormToolkit ensureVisible getMainItemComposite
private void set Color As Current boolean active if active set Title Color active Color set Body Color active Color else set Title Color item Color set Body Color item Color  setColorAsCurrent setTitleColor activeColor setBodyColor activeColor setTitleColor itemColor setBodyColor itemColor
package void set Complete completed true check Done Label set Image get Complete Image if initialized check Done Label get Parent layout  setComplete checkDoneLabel setImage getCompleteImage checkDoneLabel getParent
package void set Expanded if main Item Composite is Expanded main Item Composite set Expanded true if initialized form reflow true Form Toolkit ensure Visible get Main Item Composite  setExpanded mainItemComposite isExpanded mainItemComposite setExpanded FormToolkit ensureVisible getMainItemComposite
package void set Incomplete check Done Label set Image null completed false set Start Image  setIncomplete checkDoneLabel setImage setStartImage
Sets the item Color param item Color The item Color to set package void set Item Color Color item Color this item Color item Color  itemColor itemColor itemColor setItemColor itemColor itemColor itemColor
package void set Original Color set Title Color item Color set Body Color item Color set Bold false  setOriginalColor setTitleColor itemColor setBodyColor itemColor setBold
package abstract void set Restart Image  setRestartImage
package void set Skipped is Skipped true check Done Label set Image get Skip Image if initialized check Done Label get Parent layout  setSkipped isSkipped checkDoneLabel setImage getSkipImage checkDoneLabel getParent
package abstract void set Start Image  setStartImage
private void set Title Color Color color if title Composite null title Composite set Background color Control titlechildren title Composite get Children for int i 0 i titlechildren length i titlechildren i set Background color  setTitleColor titleComposite titleComposite setBackground titleComposite getChildren setBackground
public void initialized initialized true 

Create an instance of this class public Close All Action I Workbench Window window super Workbench Messages get String Close All Action text window NON NLS 1 set Tool Tip Text Workbench Messages get String Close All Action tool Tip NON NLS 1 set Enabled false set Id close All NON NLS 1 update State Workbench Help set Help this I Help Context Ids CLOSE ALL ACTION set Action Definition Id org eclipse ui file close All NON NLS 1  CloseAllAction IWorkbenchWindow WorkbenchMessages getString CloseAllAction setToolTipText WorkbenchMessages getString CloseAllAction toolTip setEnabled setId closeAll updateState WorkbenchHelp setHelp IHelpContextIds CLOSE_ALL_ACTION setActionDefinitionId closeAll
Method declared on Page Event Action public void page Activated I Workbench Page page super page Activated page update State  PageEventAction pageActivated IWorkbenchPage pageActivated updateState
Method declared on Page Event Action public void page Closed I Workbench Page page super page Closed page update State  PageEventAction pageClosed IWorkbenchPage pageClosed updateState
Method declared on Part Event Action public void part Closed I Workbench Part part super part Closed part update State  PartEventAction partClosed IWorkbenchPart partClosed updateState
Method declared on Part Event Action public void part Opened I Workbench Part part super part Opened part update State  PartEventAction partOpened IWorkbenchPart partOpened updateState
public void run if get Workbench Window null action has been disposed return I Workbench Page page get Active Page if page null page close All Editors true  getWorkbenchWindow IWorkbenchPage getActivePage closeAllEditors
Enable the action if there at least one editor open private void update State I Workbench Page page get Active Page if page null set Enabled page get Editor References length 1 else set Enabled false  updateState IWorkbenchPage getActivePage setEnabled getEditorReferences setEnabled

Create a new instance of code Close All Perspectives Action code param window the workbench window this action applies to public Close All Perspectives Action I Workbench Window window super Workbench Messages get String Close All Perspectives Action text NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window set Action Definition Id org eclipse ui window close All Perspectives NON NLS 1 issue missing action id set Tool Tip Text Workbench Messages get String Close All Perspectives Action tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids CLOSE ALL PAGES ACTION set Enabled false  CloseAllPerspectivesAction CloseAllPerspectivesAction IWorkbenchWindow WorkbenchMessages getString CloseAllPerspectivesAction IllegalArgumentException workbenchWindow setActionDefinitionId closeAllPerspectives setToolTipText WorkbenchMessages getString CloseAllPerspectivesAction toolTip WorkbenchHelp setHelp IHelpContextIds CLOSE_ALL_PAGES_ACTION setEnabled
public void run if workbench Window null action has been disposed return I Workbench Page page workbench Window get Active Page if page null Workbench Page page close All Perspectives  workbenchWindow IWorkbenchPage workbenchWindow getActivePage WorkbenchPage closeAllPerspectives
public void dispose if workbench Window null already disposed return workbench Window null  workbenchWindow workbenchWindow

Create an instance of this class public Close All Saved Action I Workbench Window window super Workbench Messages get String Close All Saved Action text window NON NLS 1 set Tool Tip Text Workbench Messages get String Close All Saved Action tool Tip NON NLS 1 issue Should create a ID in I Workbench Action Constants when it becames API set Id close All Saved NON NLS 1 update State Workbench Help set Help this I Help Context Ids CLOSE ALL SAVED ACTION set Action Definition Id org eclipse ui file close All Saved NON NLS 1  CloseAllSavedAction IWorkbenchWindow WorkbenchMessages getString CloseAllSavedAction setToolTipText WorkbenchMessages getString CloseAllSavedAction toolTip IWorkbenchActionConstants setId closeAllSaved updateState WorkbenchHelp setHelp IHelpContextIds CLOSE_ALL_SAVED_ACTION setActionDefinitionId closeAllSaved
Method declared on Page Event Action public void page Activated I Workbench Page page super page Activated page update State  PageEventAction pageActivated IWorkbenchPage pageActivated updateState
Method declared on Page Event Action public void page Closed I Workbench Page page super page Closed page update State  PageEventAction pageClosed IWorkbenchPage pageClosed updateState
public void part Closed I Workbench Part part super part Closed part if part instanceof I Editor Part part remove Property Listener this parts With Listeners remove part update State  partClosed IWorkbenchPart partClosed IEditorPart removePropertyListener partsWithListeners updateState
public void part Opened I Workbench Part part super part Opened part if part instanceof I Editor Part part add Property Listener this parts With Listeners add part update State  partOpened IWorkbenchPart partOpened IEditorPart addPropertyListener partsWithListeners updateState
public void property Changed Object source int propID if source instanceof I Editor Part if propID I Editor Part PROP DIRTY update State  propertyChanged IEditorPart IEditorPart PROP_DIRTY updateState
public void run if get Workbench Window null action has been dispose return I Workbench Page page get Active Page if page null Workbench Page page close All Saved Editors  getWorkbenchWindow IWorkbenchPage getActivePage WorkbenchPage closeAllSavedEditors
Enable the action if there at least one editor open private void update State I Workbench Page page get Active Page if page null set Enabled false return I Editor Reference editors page get Editor References for int i 0 i editors length i if editors i is Dirty set Enabled true return set Enabled false  updateState IWorkbenchPage getActivePage setEnabled IEditorReference getEditorReferences isDirty setEnabled setEnabled
public void dispose super dispose for Iterator it parts With Listeners iterator it has Next I Workbench Part part I Workbench Part it next part remove Property Listener this parts With Listeners clear  partsWithListeners hasNext IWorkbenchPart IWorkbenchPart removePropertyListener partsWithListeners

public class Close Editor Action extends Active Editor Action Create an instance of this class public Close Editor Action I Workbench Window window super Workbench Messages get String Close Editor Action text window NON NLS 1 set Tool Tip Text Workbench Messages get String Close Editor Action tool Tip NON NLS 1 set Id close NON NLS 1 Workbench Help set Help this I Help Context Ids CLOSE PART ACTION set Action Definition Id org eclipse ui file close NON NLS 1  CloseEditorAction ActiveEditorAction CloseEditorAction IWorkbenchWindow WorkbenchMessages getString CloseEditorAction setToolTipText WorkbenchMessages getString CloseEditorAction toolTip setId WorkbenchHelp setHelp IHelpContextIds CLOSE_PART_ACTION setActionDefinitionId
public void run I Editor Part part get Active Editor if part null get Active Page close Editor part true  IEditorPart getActiveEditor getActivePage closeEditor

Create a new instance of code Close Perspective Action code param window the workbench window this action applies to public Close Perspective Action I Workbench Window window super Workbench Messages get String Close Perspective Action text NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window set Action Definition Id org eclipse ui window close Perspective NON NLS 1 issue missing action id set Tool Tip Text Workbench Messages get String Close Perspective Action tool Tip NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids CLOSE PAGE ACTION  ClosePerspectiveAction ClosePerspectiveAction IWorkbenchWindow WorkbenchMessages getString ClosePerspectiveAction IllegalArgumentException workbenchWindow setActionDefinitionId closePerspective setToolTipText WorkbenchMessages getString ClosePerspectiveAction toolTip setEnabled WorkbenchHelp setHelp IHelpContextIds CLOSE_PAGE_ACTION
public void run if workbench Window null action has been disposed return I Workbench Page page workbench Window get Active Page if page null Perspective persp Workbench Page page get Active Perspective if persp null Workbench Page page close Perspective persp true true  workbenchWindow IWorkbenchPage workbenchWindow getActivePage WorkbenchPage getActivePerspective WorkbenchPage closePerspective
public void dispose if workbench Window null already disposed return workbench Window null  workbenchWindow workbenchWindow

protected List key Sequence Binding Definitions Collections EMPTY LIST protected Abstract Command Registry Do nothing  keySequenceBindingDefinitions EMPTY_LIST AbstractCommandRegistry
public void add Command Registry Listener I Command Registry Listener command Registry Listener if command Registry Listener null throw new Null Pointer Exception if command Registry Listeners null command Registry Listeners new Array List if command Registry Listeners contains command Registry Listener command Registry Listeners add command Registry Listener  addCommandRegistryListener ICommandRegistryListener commandRegistryListener commandRegistryListener NullPointerException commandRegistryListeners commandRegistryListeners ArrayList commandRegistryListeners commandRegistryListener commandRegistryListeners commandRegistryListener
protected void fire Command Registry Changed if command Registry Listeners null for int i 0 i command Registry Listeners size i if command Registry Event null command Registry Event new Command Registry Event this I Command Registry Listener command Registry Listeners get i command Registry Changed command Registry Event  fireCommandRegistryChanged commandRegistryListeners commandRegistryListeners commandRegistryEvent commandRegistryEvent CommandRegistryEvent ICommandRegistryListener commandRegistryListeners commandRegistryChanged commandRegistryEvent
public List get Active Key Configuration Definitions return active Key Configuration Definitions  getActiveKeyConfigurationDefinitions activeKeyConfigurationDefinitions
public List get Category Definitions return category Definitions  getCategoryDefinitions categoryDefinitions
public List get Command Definitions return command Definitions  getCommandDefinitions commandDefinitions
An accessor for the handlers read into this registry return The list of handlers this value may be empty but it is never code null code public List get Handlers return handlers  getHandlers
public List get Image Binding Definitions return image Binding Definitions  getImageBindingDefinitions imageBindingDefinitions
public List get Key Configuration Definitions return key Configuration Definitions  getKeyConfigurationDefinitions keyConfigurationDefinitions
public List get Key Sequence Binding Definitions return key Sequence Binding Definitions  getKeySequenceBindingDefinitions keySequenceBindingDefinitions
public void remove Command Registry Listener I Command Registry Listener command Registry Listener if command Registry Listener null throw new Null Pointer Exception if command Registry Listeners null command Registry Listeners remove command Registry Listener  removeCommandRegistryListener ICommandRegistryListener commandRegistryListener commandRegistryListener NullPointerException commandRegistryListeners commandRegistryListeners commandRegistryListener

implements I Mutable Command Registry protected Abstract Mutable Command Registry Nothing to initialize  IMutableCommandRegistry AbstractMutableCommandRegistry
public void set Active Key Configuration Definitions List active Key Configuration Definitions active Key Configuration Definitions Util safe Copy active Key Configuration Definitions Active Key Configuration Definition class if active Key Configuration Definitions equals this active Key Configuration Definitions this active Key Configuration Definitions active Key Configuration Definitions fire Command Registry Changed  setActiveKeyConfigurationDefinitions activeKeyConfigurationDefinitions activeKeyConfigurationDefinitions safeCopy activeKeyConfigurationDefinitions ActiveKeyConfigurationDefinition activeKeyConfigurationDefinitions activeKeyConfigurationDefinitions activeKeyConfigurationDefinitions activeKeyConfigurationDefinitions fireCommandRegistryChanged
public void set Category Definitions List category Definitions category Definitions Util safe Copy category Definitions Category Definition class if category Definitions equals this category Definitions this category Definitions category Definitions fire Command Registry Changed  setCategoryDefinitions categoryDefinitions categoryDefinitions safeCopy categoryDefinitions CategoryDefinition categoryDefinitions categoryDefinitions categoryDefinitions categoryDefinitions fireCommandRegistryChanged
public void set Command Definitions List command Definitions command Definitions Util safe Copy command Definitions Command Definition class if command Definitions equals this command Definitions this command Definitions command Definitions fire Command Registry Changed  setCommandDefinitions commandDefinitions commandDefinitions safeCopy commandDefinitions CommandDefinition commandDefinitions commandDefinitions commandDefinitions commandDefinitions fireCommandRegistryChanged
public void set Key Configuration Definitions List key Configuration Definitions command Definitions Util safe Copy key Configuration Definitions Key Configuration Definition class if key Configuration Definitions equals this key Configuration Definitions this key Configuration Definitions key Configuration Definitions fire Command Registry Changed  setKeyConfigurationDefinitions keyConfigurationDefinitions commandDefinitions safeCopy keyConfigurationDefinitions KeyConfigurationDefinition keyConfigurationDefinitions keyConfigurationDefinitions keyConfigurationDefinitions keyConfigurationDefinitions fireCommandRegistryChanged
public void set Key Sequence Binding Definitions List key Sequence Binding Definitions key Sequence Binding Definitions Util safe Copy key Sequence Binding Definitions Key Sequence Binding Definition class if key Sequence Binding Definitions equals this key Sequence Binding Definitions this key Sequence Binding Definitions key Sequence Binding Definitions fire Command Registry Changed  setKeySequenceBindingDefinitions keySequenceBindingDefinitions keySequenceBindingDefinitions safeCopy keySequenceBindingDefinitions KeySequenceBindingDefinition keySequenceBindingDefinitions keySequenceBindingDefinitions keySequenceBindingDefinitions keySequenceBindingDefinitions fireCommandRegistryChanged

public Active Key Configuration Definition String key Configuration Id String source Id this key Configuration Id key Configuration Id this source Id source Id  ActiveKeyConfigurationDefinition keyConfigurationId sourceId keyConfigurationId keyConfigurationId sourceId sourceId
public int compare To Object object Active Key Configuration Definition casted Object Active Key Configuration Definition object int compare To Util compare key Configuration Id casted Object key Configuration Id if compare To 0 compare To Util compare source Id casted Object source Id return compare To  compareTo ActiveKeyConfigurationDefinition castedObject ActiveKeyConfigurationDefinition compareTo keyConfigurationId castedObject keyConfigurationId compareTo compareTo sourceId castedObject sourceId compareTo
public boolean equals Object object if object instanceof Active Key Configuration Definition return false Active Key Configuration Definition casted Object Active Key Configuration Definition object boolean equals true equals Util equals key Configuration Id casted Object key Configuration Id equals Util equals source Id casted Object source Id return equals  ActiveKeyConfigurationDefinition ActiveKeyConfigurationDefinition castedObject ActiveKeyConfigurationDefinition keyConfigurationId castedObject keyConfigurationId sourceId castedObject sourceId
public String get Key Configuration Id return key Configuration Id  getKeyConfigurationId keyConfigurationId
public String get Source Id return source Id  getSourceId sourceId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code key Configuration Id hash Code hash Code HASH FACTOR Util hash Code source Id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode keyConfigurationId hashCode hashCode HASH_FACTOR hashCode sourceId hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append key Configuration Id string Buffer append string Buffer append source Id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer keyConfigurationId stringBuffer stringBuffer sourceId stringBuffer stringBuffer toString

Category Set categories With Listeners String id if categories With Listeners null id null throw new Null Pointer Exception this categories With Listeners categories With Listeners this id id  categoriesWithListeners categoriesWithListeners NullPointerException categoriesWithListeners categoriesWithListeners
public void add Category Listener I Category Listener category Listener if category Listener null throw new Null Pointer Exception if category Listeners null category Listeners new Array List if category Listeners contains category Listener category Listeners add category Listener categories With Listeners add this  addCategoryListener ICategoryListener categoryListener categoryListener NullPointerException categoryListeners categoryListeners ArrayList categoryListeners categoryListener categoryListeners categoryListener categoriesWithListeners
public int compare To Object object Category casted Object Category object int compare To Util compare defined casted Object defined if compare To 0 compare To Util compare description casted Object description if compare To 0 compare To Util compare id casted Object id if compare To 0 compare To Util compare name casted Object name return compare To  compareTo castedObject compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo
public boolean equals Object object if object instanceof Category return false Category casted Object Category object boolean equals true equals Util equals defined casted Object defined equals Util equals description casted Object description equals Util equals id casted Object id equals Util equals name casted Object name return equals  castedObject castedObject castedObject castedObject castedObject
void fire Category Changed Category Event category Event if category Event null throw new Null Pointer Exception if category Listeners null for int i 0 i category Listeners size i I Category Listener category Listeners get i category Changed category Event  fireCategoryChanged CategoryEvent categoryEvent categoryEvent NullPointerException categoryListeners categoryListeners ICategoryListener categoryListeners categoryChanged categoryEvent
public String get Description throws Not Defined Exception if defined throw new Not Defined Exception Cannot get the description from an undefined category NON NLS 1 return description  getDescription NotDefinedException NotDefinedException
public String get Id return id  getId
public String get Name throws Not Defined Exception if defined throw new Not Defined Exception Cannot get the name from an undefined category NON NLS 1 return name  getName NotDefinedException NotDefinedException
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code defined hash Code hash Code HASH FACTOR Util hash Code description hash Code hash Code HASH FACTOR Util hash Code id hash Code hash Code HASH FACTOR Util hash Code name hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCodeComputed hashCode
public boolean is Defined return defined  isDefined
public void remove Category Listener I Category Listener category Listener if category Listener null throw new Null Pointer Exception if category Listeners null category Listeners remove category Listener if category Listeners is Empty categories With Listeners remove this  removeCategoryListener ICategoryListener categoryListener categoryListener NullPointerException categoryListeners categoryListeners categoryListener categoryListeners isEmpty categoriesWithListeners
boolean set Defined boolean defined if defined this defined this defined defined hash Code Computed false hash Code 0 string null return true return false  setDefined hashCodeComputed hashCode
boolean set Description String description if Util equals description this description this description description hash Code Computed false hash Code 0 string null return true return false  setDescription hashCodeComputed hashCode
boolean set Name String name if Util equals name this name this name name hash Code Computed false hash Code 0 string null return true return false  setName hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append defined string Buffer append string Buffer append description string Buffer append string Buffer append id string Buffer append string Buffer append name string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer toString

public static Map category Definitions By Id Collection category Definitions boolean allow Null Ids if category Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator category Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Category Definition class Category Definition category Definition Category Definition object String id category Definition get Id if allow Null Ids id null map put id category Definition return map  categoryDefinitionsById categoryDefinitions allowNullIds categoryDefinitions NullPointerException HashMap categoryDefinitions hasNext assertInstance CategoryDefinition CategoryDefinition categoryDefinition CategoryDefinition categoryDefinition getId allowNullIds categoryDefinition
public static Map category Definitions By Name Collection category Definitions boolean allow Null Names if category Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator category Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Category Definition class Category Definition category Definition Category Definition object String name category Definition get Name if allow Null Names name null Set category Definitions2 Set map get name if category Definitions2 null category Definitions2 new Hash Set map put name category Definitions2 category Definitions2 add category Definition return map  categoryDefinitionsByName categoryDefinitions allowNullNames categoryDefinitions NullPointerException HashMap categoryDefinitions hasNext assertInstance CategoryDefinition CategoryDefinition categoryDefinition CategoryDefinition categoryDefinition getName allowNullNames categoryDefinitions2 categoryDefinitions2 categoryDefinitions2 HashSet categoryDefinitions2 categoryDefinitions2 categoryDefinition
public Category Definition String description String id String name String source Id this description description this id id this name name this source Id source Id  CategoryDefinition sourceId sourceId sourceId
public int compare To Object object Category Definition casted Object Category Definition object int compare To Util compare description casted Object description if compare To 0 compare To Util compare id casted Object id if compare To 0 compare To Util compare name casted Object name if compare To 0 compare To Util compare source Id casted Object source Id return compare To  compareTo CategoryDefinition castedObject CategoryDefinition compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo sourceId castedObject sourceId compareTo
public boolean equals Object object if object instanceof Category Definition return false Category Definition casted Object Category Definition object boolean equals true equals Util equals description casted Object description equals Util equals id casted Object id equals Util equals name casted Object name equals Util equals source Id casted Object source Id return equals  CategoryDefinition CategoryDefinition castedObject CategoryDefinition castedObject castedObject castedObject sourceId castedObject sourceId
public String get Description return description  getDescription
public String get Id return id  getId
public String get Name return name  getName
public String get Source Id return source Id  getSourceId sourceId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code description hash Code hash Code HASH FACTOR Util hash Code id hash Code hash Code HASH FACTOR Util hash Code name hash Code hash Code HASH FACTOR Util hash Code source Id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode sourceId hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append description string Buffer append string Buffer append id string Buffer append string Buffer append name string Buffer append string Buffer append source Id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer sourceId stringBuffer stringBuffer toString

Command Set commands With Listeners String id if commands With Listeners null id null throw new Null Pointer Exception this commands With Listeners commands With Listeners this id id  commandsWithListeners commandsWithListeners NullPointerException commandsWithListeners commandsWithListeners
public void add Command Listener I Command Listener command Listener if command Listener null throw new Null Pointer Exception if command Listeners null command Listeners new Array List if command Listeners contains command Listener command Listeners add command Listener commands With Listeners add this  addCommandListener ICommandListener commandListener commandListener NullPointerException commandListeners commandListeners ArrayList commandListeners commandListener commandListeners commandListener commandsWithListeners
public int compare To Object object Command casted Object Command object int compare To Util compare category Id casted Object category Id if compare To 0 compare To Util compare defined casted Object defined if compare To 0 compare To Util compare description casted Object description if compare To 0 compare To Util compare handler casted Object handler if compare To 0 compare To Util compare id casted Object id if compare To 0 compare To Util compare name casted Object name return compare To  compareTo castedObject compareTo categoryId castedObject categoryId compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo
public boolean equals Object object if object instanceof Command return false Command casted Object Command object boolean equals true equals Util equals category Id casted Object category Id equals Util equals defined casted Object defined equals Util equals description casted Object description equals Util equals handler casted Object handler equals Util equals id casted Object id equals Util equals key Sequence Bindings casted Object key Sequence Bindings equals Util equals name casted Object name return equals  castedObject categoryId castedObject categoryId castedObject castedObject castedObject castedObject keySequenceBindings castedObject keySequenceBindings castedObject
public Object execute Map parameter Values By Name throws Execution Exception Not Handled Exception I Handler handler this handler Debugging output if Mutable Command Manager DEBUG COMMAND EXECUTION System out print KEYS executing NON NLS 1 if handler null System out print no handler NON NLS 1 else System out print NON NLS 1 System out print handler get Class get Name System out print NON NLS 1 System out print handler hash Code System out print NON NLS 1 System out println Perform the execution if there is a handler if handler null return handler execute parameter Values By Name else throw new Not Handled Exception There is no handler to execute NON NLS 1  parameterValuesByName ExecutionException NotHandledException IHandler MutableCommandManager DEBUG_COMMAND_EXECUTION getClass getName hashCode parameterValuesByName NotHandledException
void fire Command Changed Command Event command Event if command Event null throw new Null Pointer Exception if command Listeners null for int i 0 i command Listeners size i I Command Listener command Listeners get i command Changed command Event  fireCommandChanged CommandEvent commandEvent commandEvent NullPointerException commandListeners commandListeners ICommandListener commandListeners commandChanged commandEvent
public Map get Attribute Values By Name throws Not Handled Exception I Handler handler this handler if handler null return handler get Attribute Values By Name else throw new Not Handled Exception There is no handler from which to retrieve attributes NON NLS 1  getAttributeValuesByName NotHandledException IHandler getAttributeValuesByName NotHandledException
public String get Category Id throws Not Defined Exception if defined throw new Not Defined Exception Cannot get category identifier from an undefined command NON NLS 1 return category Id  getCategoryId NotDefinedException NotDefinedException categoryId
public String get Description throws Not Defined Exception if defined throw new Not Defined Exception Cannot get a description from an undefined command NON NLS 1 return description  getDescription NotDefinedException NotDefinedException
public String get Id return id  getId
public List get Key Sequence Bindings return key Sequence Bindings  getKeySequenceBindings keySequenceBindings
public String get Name throws Not Defined Exception if defined throw new Not Defined Exception Cannot get the name from an undefined command NON NLS 1 return name  getName NotDefinedException NotDefinedException
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code category Id hash Code hash Code HASH FACTOR Util hash Code defined hash Code hash Code HASH FACTOR Util hash Code description hash Code hash Code HASH FACTOR Util hash Code handler hash Code hash Code HASH FACTOR Util hash Code id hash Code hash Code HASH FACTOR Util hash Code key Sequence Bindings hash Code hash Code HASH FACTOR Util hash Code name hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode categoryId hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode keySequenceBindings hashCode hashCode HASH_FACTOR hashCode hashCodeComputed hashCode
public boolean is Defined return defined  isDefined
public boolean is Handled if handler null return false Map attribute Values By Name handler get Attribute Values By Name if attribute Values By Name contains Key handled NON NLS 1 Boolean TRUE equals attribute Values By Name get handled NON NLS 1 return false else return true  isHandled attributeValuesByName getAttributeValuesByName attributeValuesByName containsKey attributeValuesByName
public void remove Command Listener I Command Listener command Listener if command Listener null throw new Null Pointer Exception if command Listeners null command Listeners remove command Listener if command Listeners is Empty commands With Listeners remove this  removeCommandListener ICommandListener commandListener commandListener NullPointerException commandListeners commandListeners commandListener commandListeners isEmpty commandsWithListeners
boolean set Category Id String category Id if Util equals category Id this category Id this category Id category Id hash Code Computed false hash Code 0 string null return true return false  setCategoryId categoryId categoryId categoryId categoryId categoryId hashCodeComputed hashCode
boolean set Defined boolean defined if defined this defined this defined defined hash Code Computed false hash Code 0 string null return true return false  setDefined hashCodeComputed hashCode
boolean set Description String description if Util equals description this description this description description hash Code Computed false hash Code 0 string null return true return false  setDescription hashCodeComputed hashCode
boolean set Handler I Handler handler if handler this handler this handler handler hash Code Computed false hash Code 0 string null Debugging output if Mutable Command Manager DEBUG HANDLERS Mutable Command Manager DEBUG HANDLERS COMMAND ID null Mutable Command Manager DEBUG HANDLERS COMMAND ID equals id System out print HANDLERS Command id NON NLS 1 has changed to NON NLS 1 if handler null System out println no handler NON NLS 1 else System out print NON NLS 1 System out print handler System out println as its handler NON NLS 1 return true return false  setHandler IHandler hashCodeComputed hashCode MutableCommandManager DEBUG_HANDLERS MutableCommandManager DEBUG_HANDLERS_COMMAND_ID MutableCommandManager DEBUG_HANDLERS_COMMAND_ID
boolean set Key Sequence Bindings List key Sequence Bindings key Sequence Bindings Util safe Copy key Sequence Bindings I Key Sequence Binding class if Util equals key Sequence Bindings this key Sequence Bindings this key Sequence Bindings key Sequence Bindings this key Sequence Bindings As Array I Key Sequence Binding this key Sequence Bindings to Array new I Key Sequence Binding this key Sequence Bindings size hash Code Computed false hash Code 0 string null return true return false  setKeySequenceBindings keySequenceBindings keySequenceBindings safeCopy keySequenceBindings IKeySequenceBinding keySequenceBindings keySequenceBindings keySequenceBindings keySequenceBindings keySequenceBindingsAsArray IKeySequenceBinding keySequenceBindings toArray IKeySequenceBinding keySequenceBindings hashCodeComputed hashCode
boolean set Name String name if Util equals name this name this name name hash Code Computed false hash Code 0 string null return true return false  setName hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append category Id string Buffer append string Buffer append defined string Buffer append string Buffer append description string Buffer append string Buffer append handler string Buffer append string Buffer append id string Buffer append string Buffer append key Sequence Bindings string Buffer append string Buffer append name string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer categoryId stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer keySequenceBindings stringBuffer stringBuffer stringBuffer stringBuffer toString

public static Map command Definitions By Id Collection command Definitions boolean allow Null Ids if command Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator command Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Command Definition class Command Definition command Definition Command Definition object String id command Definition get Id if allow Null Ids id null map put id command Definition return map  commandDefinitionsById commandDefinitions allowNullIds commandDefinitions NullPointerException HashMap commandDefinitions hasNext assertInstance CommandDefinition CommandDefinition commandDefinition CommandDefinition commandDefinition getId allowNullIds commandDefinition
public static Map command Definitions By Name Collection command Definitions boolean allow Null Names if command Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator command Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Command Definition class Command Definition command Definition Command Definition object String name command Definition get Name if allow Null Names name null Collection command Definitions2 Collection map get name if command Definitions2 null command Definitions2 new Hash Set map put name command Definitions2 command Definitions2 add command Definition return map  commandDefinitionsByName commandDefinitions allowNullNames commandDefinitions NullPointerException HashMap commandDefinitions hasNext assertInstance CommandDefinition CommandDefinition commandDefinition CommandDefinition commandDefinition getName allowNullNames commandDefinitions2 commandDefinitions2 commandDefinitions2 HashSet commandDefinitions2 commandDefinitions2 commandDefinition
public Command Definition String category Id String description String id String name String source Id this category Id category Id this description description this id id this name name this source Id source Id  CommandDefinition categoryId sourceId categoryId categoryId sourceId sourceId
public int compare To Object object Command Definition casted Object Command Definition object int compare To Util compare category Id casted Object category Id if compare To 0 compare To Util compare description casted Object description if compare To 0 compare To Util compare id casted Object id if compare To 0 compare To Util compare name casted Object name if compare To 0 compare To Util compare source Id casted Object source Id return compare To  compareTo CommandDefinition castedObject CommandDefinition compareTo categoryId castedObject categoryId compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo sourceId castedObject sourceId compareTo
public boolean equals Object object if object instanceof Command Definition return false Command Definition casted Object Command Definition object boolean equals true equals Util equals category Id casted Object category Id equals Util equals description casted Object description equals Util equals id casted Object id equals Util equals name casted Object name equals Util equals source Id casted Object source Id return equals  CommandDefinition CommandDefinition castedObject CommandDefinition categoryId castedObject categoryId castedObject castedObject castedObject sourceId castedObject sourceId
public String get Category Id return category Id  getCategoryId categoryId
public String get Description return description  getDescription
public String get Id return id  getId
public String get Name return name  getName
public String get Source Id return source Id  getSourceId sourceId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code category Id hash Code hash Code HASH FACTOR Util hash Code description hash Code hash Code HASH FACTOR Util hash Code id hash Code hash Code HASH FACTOR Util hash Code name hash Code hash Code HASH FACTOR Util hash Code source Id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode categoryId hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode sourceId hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append category Id string Buffer append string Buffer append description string Buffer append string Buffer append id string Buffer append string Buffer append name string Buffer append string Buffer append source Id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer categoryId stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer sourceId stringBuffer stringBuffer toString

Creates a new instance of code I Mutable Command Manager code return a new instance of code I Mutable Command Manager code Clients should not make assumptions about the concrete implementation outside the contract of the interface Guaranteed not to be code null code public static I Mutable Command Manager get Mutable Command Manager return new Mutable Command Manager  IMutableCommandManager IMutableCommandManager IMutableCommandManager getMutableCommandManager MutableCommandManager
private Command Manager Factory  CommandManagerFactory

Command Registry Event I Command Registry command Registry if command Registry null throw new Null Pointer Exception this command Registry command Registry  CommandRegistryEvent ICommandRegistry commandRegistry commandRegistry NullPointerException commandRegistry commandRegistry
public I Command Registry get Command Registry return command Registry  ICommandRegistry getCommandRegistry commandRegistry

add Registry Change Listener new I Registry Change Listener public void registry Changed I Registry Change Event registry Change Event I Extension Delta extension Deltas registry Change Event get Extension Deltas Persistence PACKAGE PREFIX Persistence PACKAGE BASE if extension Deltas length 0 try load catch IO Exception eIO Do nothing  addRegistryChangeListener IRegistryChangeListener registryChanged IRegistryChangeEvent registryChangeEvent IExtensionDelta extensionDeltas registryChangeEvent getExtensionDeltas PACKAGE_PREFIX PACKAGE_BASE extensionDeltas IOException
public Extension Command Registry I Extension Registry extension Registry if extension Registry null throw new Null Pointer Exception this extension Registry extension Registry this extension Registry add Registry Change Listener new I Registry Change Listener public void registry Changed I Registry Change Event registry Change Event I Extension Delta extension Deltas registry Change Event get Extension Deltas Persistence PACKAGE PREFIX Persistence PACKAGE BASE if extension Deltas length 0 try load catch IO Exception eIO Do nothing try load catch IO Exception eIO Do nothing  ExtensionCommandRegistry IExtensionRegistry extensionRegistry extensionRegistry NullPointerException extensionRegistry extensionRegistry extensionRegistry addRegistryChangeListener IRegistryChangeListener registryChanged IRegistryChangeEvent registryChangeEvent IExtensionDelta extensionDeltas registryChangeEvent getExtensionDeltas PACKAGE_PREFIX PACKAGE_BASE extensionDeltas IOException IOException
private String get Namespace I Configuration Element configuration Element String namespace null if configuration Element null I Extension extension configuration Element get Declaring Extension if extension null namespace extension get Namespace return namespace  getNamespace IConfigurationElement configurationElement configurationElement IExtension configurationElement getDeclaringExtension getNamespace
private void load throws IO Exception if active Key Configuration Definitions null active Key Configuration Definitions new Array List else active Key Configuration Definitions clear if category Definitions null category Definitions new Array List else category Definitions clear if command Definitions null command Definitions new Array List else command Definitions clear if handlers null handlers new Array List else handlers clear if image Binding Definitions null image Binding Definitions new Array List else image Binding Definitions clear if key Configuration Definitions null key Configuration Definitions new Array List else key Configuration Definitions clear if key Sequence Binding Definitions null key Sequence Binding Definitions new Array List else key Sequence Binding Definitions clear TODO deprecated start I Configuration Element deprecated Configuration Elements extension Registry get Configuration Elements For org eclipse ui accelerator Configurations NON NLS 1 for int i 0 i deprecated Configuration Elements length i I Configuration Element deprecated Configuration Element deprecated Configuration Elements i String name deprecated Configuration Element get Name if accelerator Configuration equals name NON NLS 1 read Key Configuration Definition deprecated Configuration Element deprecated Configuration Elements extension Registry get Configuration Elements For org eclipse ui accelerator Sets NON NLS 1 for int i 0 i deprecated Configuration Elements length i I Configuration Element deprecated Configuration Element deprecated Configuration Elements i String name deprecated Configuration Element get Name if accelerator Set equals name NON NLS 1 I Memento memento new Configuration Element Memento deprecated Configuration Element String key Configuration Id memento get String configuration Id NON NLS 1 String scope Id memento get String scope Id NON NLS 1 I Configuration Element deprecated Configuration Elements2 deprecated Configuration Element get Children accelerator NON NLS 1 for int j 0 j deprecated Configuration Elements2 length j I Configuration Element deprecated Configuration Element2 deprecated Configuration Elements2 j Key Sequence Binding Definition key Sequence Binding Definition Persistence read Key Sequence Binding Definition new Configuration Element Memento deprecated Configuration Element2 get Namespace deprecated Configuration Element2 if key Sequence Binding Definition null key Sequence Binding Definition new Key Sequence Binding Definition scope Id key Sequence Binding Definition get Command Id key Configuration Id key Sequence Binding Definition get Key Sequence key Sequence Binding Definition get Locale key Sequence Binding Definition get Platform key Sequence Binding Definition get Source Id key Sequence Binding Definitions add key Sequence Binding Definition deprecated Configuration Elements extension Registry get Configuration Elements For org eclipse ui action Definitions NON NLS 1 for int i 0 i deprecated Configuration Elements length i I Configuration Element deprecated Configuration Element deprecated Configuration Elements i String name deprecated Configuration Element get Name if action Definition equals name NON NLS 1 read Command Definition deprecated Configuration Element TODO deprecated end I Configuration Element configuration Elements extension Registry get Configuration Elements For Persistence PACKAGE FULL for int i 0 i configuration Elements length i I Configuration Element configuration Element configuration Elements i String name configuration Element get Name if Persistence TAG ACTIVE KEY CONFIGURATION equals name read Active Key Configuration Definition configuration Element else if Persistence TAG CATEGORY equals name read Category Definition configuration Element else if Persistence TAG COMMAND equals name read Command Definition configuration Element else if Persistence TAG HANDLER equals name read Handler Submission Definition configuration Element else if Persistence TAG KEY CONFIGURATION equals name read Key Configuration Definition configuration Element else if Persistence TAG KEY SEQUENCE BINDING equals name read Key Sequence Binding Definition configuration Element boolean command Registry Changed false if active Key Configuration Definitions equals super active Key Configuration Definitions super active Key Configuration Definitions Collections unmodifiable List active Key Configuration Definitions command Registry Changed true if category Definitions equals super category Definitions super category Definitions Collections unmodifiable List category Definitions command Registry Changed true if command Definitions equals super command Definitions super command Definitions Collections unmodifiable List command Definitions command Registry Changed true if handlers equals super handlers super handlers Collections unmodifiable List handlers command Registry Changed true if image Binding Definitions equals super image Binding Definitions super image Binding Definitions Collections unmodifiable List image Binding Definitions command Registry Changed true if key Configuration Definitions equals super key Configuration Definitions super key Configuration Definitions Collections unmodifiable List key Configuration Definitions command Registry Changed true if key Sequence Binding Definitions equals super key Sequence Binding Definitions super key Sequence Binding Definitions Collections unmodifiable List key Sequence Binding Definitions command Registry Changed true if command Registry Changed fire Command Registry Changed  IOException activeKeyConfigurationDefinitions activeKeyConfigurationDefinitions ArrayList activeKeyConfigurationDefinitions categoryDefinitions categoryDefinitions ArrayList categoryDefinitions commandDefinitions commandDefinitions ArrayList commandDefinitions ArrayList imageBindingDefinitions imageBindingDefinitions ArrayList imageBindingDefinitions keyConfigurationDefinitions keyConfigurationDefinitions ArrayList keyConfigurationDefinitions keySequenceBindingDefinitions keySequenceBindingDefinitions ArrayList keySequenceBindingDefinitions IConfigurationElement deprecatedConfigurationElements extensionRegistry getConfigurationElementsFor acceleratorConfigurations deprecatedConfigurationElements IConfigurationElement deprecatedConfigurationElement deprecatedConfigurationElements deprecatedConfigurationElement getName acceleratorConfiguration readKeyConfigurationDefinition deprecatedConfigurationElement deprecatedConfigurationElements extensionRegistry getConfigurationElementsFor acceleratorSets deprecatedConfigurationElements IConfigurationElement deprecatedConfigurationElement deprecatedConfigurationElements deprecatedConfigurationElement getName acceleratorSet IMemento ConfigurationElementMemento deprecatedConfigurationElement keyConfigurationId getString configurationId scopeId getString scopeId IConfigurationElement deprecatedConfigurationElements2 deprecatedConfigurationElement getChildren deprecatedConfigurationElements2 IConfigurationElement deprecatedConfigurationElement2 deprecatedConfigurationElements2 KeySequenceBindingDefinition keySequenceBindingDefinition readKeySequenceBindingDefinition ConfigurationElementMemento deprecatedConfigurationElement2 getNamespace deprecatedConfigurationElement2 keySequenceBindingDefinition keySequenceBindingDefinition KeySequenceBindingDefinition scopeId keySequenceBindingDefinition getCommandId keyConfigurationId keySequenceBindingDefinition getKeySequence keySequenceBindingDefinition getLocale keySequenceBindingDefinition getPlatform keySequenceBindingDefinition getSourceId keySequenceBindingDefinitions keySequenceBindingDefinition deprecatedConfigurationElements extensionRegistry getConfigurationElementsFor actionDefinitions deprecatedConfigurationElements IConfigurationElement deprecatedConfigurationElement deprecatedConfigurationElements deprecatedConfigurationElement getName actionDefinition readCommandDefinition deprecatedConfigurationElement IConfigurationElement configurationElements extensionRegistry getConfigurationElementsFor PACKAGE_FULL configurationElements IConfigurationElement configurationElement configurationElements configurationElement getName TAG_ACTIVE_KEY_CONFIGURATION readActiveKeyConfigurationDefinition configurationElement TAG_CATEGORY readCategoryDefinition configurationElement TAG_COMMAND readCommandDefinition configurationElement TAG_HANDLER readHandlerSubmissionDefinition configurationElement TAG_KEY_CONFIGURATION readKeyConfigurationDefinition configurationElement TAG_KEY_SEQUENCE_BINDING readKeySequenceBindingDefinition configurationElement commandRegistryChanged activeKeyConfigurationDefinitions activeKeyConfigurationDefinitions activeKeyConfigurationDefinitions unmodifiableList activeKeyConfigurationDefinitions commandRegistryChanged categoryDefinitions categoryDefinitions categoryDefinitions unmodifiableList categoryDefinitions commandRegistryChanged commandDefinitions commandDefinitions commandDefinitions unmodifiableList commandDefinitions commandRegistryChanged unmodifiableList commandRegistryChanged imageBindingDefinitions imageBindingDefinitions imageBindingDefinitions unmodifiableList imageBindingDefinitions commandRegistryChanged keyConfigurationDefinitions keyConfigurationDefinitions keyConfigurationDefinitions unmodifiableList keyConfigurationDefinitions commandRegistryChanged keySequenceBindingDefinitions keySequenceBindingDefinitions keySequenceBindingDefinitions unmodifiableList keySequenceBindingDefinitions commandRegistryChanged commandRegistryChanged fireCommandRegistryChanged
private void read Active Key Configuration Definition I Configuration Element configuration Element Active Key Configuration Definition active Key Configuration Definition Persistence read Active Key Configuration Definition new Configuration Element Memento configuration Element get Namespace configuration Element if active Key Configuration Definition null active Key Configuration Definitions add active Key Configuration Definition  readActiveKeyConfigurationDefinition IConfigurationElement configurationElement ActiveKeyConfigurationDefinition activeKeyConfigurationDefinition readActiveKeyConfigurationDefinition ConfigurationElementMemento configurationElement getNamespace configurationElement activeKeyConfigurationDefinition activeKeyConfigurationDefinitions activeKeyConfigurationDefinition
private void read Category Definition I Configuration Element configuration Element Category Definition category Definition Persistence read Category Definition new Configuration Element Memento configuration Element get Namespace configuration Element if category Definition null category Definitions add category Definition  readCategoryDefinition IConfigurationElement configurationElement CategoryDefinition categoryDefinition readCategoryDefinition ConfigurationElementMemento configurationElement getNamespace configurationElement categoryDefinition categoryDefinitions categoryDefinition
private void read Command Definition I Configuration Element configuration Element Command Definition command Definition Persistence read Command Definition new Configuration Element Memento configuration Element get Namespace configuration Element if command Definition null command Definitions add command Definition  readCommandDefinition IConfigurationElement configurationElement CommandDefinition commandDefinition readCommandDefinition ConfigurationElementMemento configurationElement getNamespace configurationElement commandDefinition commandDefinitions commandDefinition
Reads the handler definition from XML creating a proxy to submit to the workbench command support If the handler definition is valid then it will be added to code handlers code to be picked up later param configuration Element The configuration element from which to read must not be code null code private final void read Handler Submission Definition final I Configuration Element configuration Element final I Handler handler Persistence read Handler Submission Definition configuration Element if handler null handlers add handler  configurationElement readHandlerSubmissionDefinition IConfigurationElement configurationElement IHandler readHandlerSubmissionDefinition configurationElement
private void read Key Configuration Definition I Configuration Element configuration Element Key Configuration Definition key Configuration Definition Persistence read Key Configuration Definition new Configuration Element Memento configuration Element get Namespace configuration Element if key Configuration Definition null key Configuration Definitions add key Configuration Definition  readKeyConfigurationDefinition IConfigurationElement configurationElement KeyConfigurationDefinition keyConfigurationDefinition readKeyConfigurationDefinition ConfigurationElementMemento configurationElement getNamespace configurationElement keyConfigurationDefinition keyConfigurationDefinitions keyConfigurationDefinition
private void read Key Sequence Binding Definition I Configuration Element configuration Element Key Sequence Binding Definition key Sequence Binding Definition Persistence read Key Sequence Binding Definition new Configuration Element Memento configuration Element get Namespace configuration Element if key Sequence Binding Definition null key Sequence Binding Definitions add key Sequence Binding Definition  readKeySequenceBindingDefinition IConfigurationElement configurationElement KeySequenceBindingDefinition keySequenceBindingDefinition readKeySequenceBindingDefinition ConfigurationElementMemento configurationElement getNamespace configurationElement keySequenceBindingDefinition keySequenceBindingDefinitions keySequenceBindingDefinition

public interface I Command Registry void add Command Registry Listener I Command Registry Listener command Registry Listener  ICommandRegistry addCommandRegistryListener ICommandRegistryListener commandRegistryListener
void add Command Registry Listener I Command Registry Listener command Registry Listener List get Active Key Configuration Definitions  addCommandRegistryListener ICommandRegistryListener commandRegistryListener getActiveKeyConfigurationDefinitions
List get Active Key Configuration Definitions List get Category Definitions  getActiveKeyConfigurationDefinitions getCategoryDefinitions
List get Category Definitions List get Command Definitions  getCategoryDefinitions getCommandDefinitions
List get Command Definitions List get Handlers  getCommandDefinitions getHandlers
List get Handlers List get Image Binding Definitions  getHandlers getImageBindingDefinitions
List get Image Binding Definitions List get Key Configuration Definitions  getImageBindingDefinitions getKeyConfigurationDefinitions
List get Key Configuration Definitions List get Key Sequence Binding Definitions  getKeyConfigurationDefinitions getKeySequenceBindingDefinitions
List get Key Sequence Binding Definitions void remove Command Registry Listener I Command Registry Listener command Registry Listener  getKeySequenceBindingDefinitions removeCommandRegistryListener ICommandRegistryListener commandRegistryListener

public interface I Command Registry Listener void command Registry Changed Command Registry Event command Registry Event  ICommandRegistryListener commandRegistryChanged CommandRegistryEvent commandRegistryEvent

static Image get Image String key Image image Image image Registry get key if image null Image Descriptor image Descriptor get Image Descriptor key if image Descriptor null image image Descriptor create Image false if image null System err println Image Factory class error creating image for key NON NLS 1 image Registry put key image return image  getImage imageRegistry ImageDescriptor imageDescriptor getImageDescriptor imageDescriptor imageDescriptor createImage ImageFactory imageRegistry
static Image Descriptor get Image Descriptor String key Image Descriptor image Descriptor Image Descriptor map get key if image Descriptor null System err println Image Factory class no image descriptor for key NON NLS 1 return image Descriptor  ImageDescriptor getImageDescriptor ImageDescriptor imageDescriptor ImageDescriptor imageDescriptor ImageFactory imageDescriptor
private static void put String key String value map put key Image Support get Image Descriptor value  ImageSupport getImageDescriptor

Sets the map of identifiers to active contexts The mapping represents the hierarchical structure of the contexts param active Context Ids a map of child context identifiers to parent context identifiers representing the hierarchy of active contexts This tree may be empty but it must not be code null code If this tree is not empty it must only contain instances of code String code  activeContextIds
Sets the active key configuration param active Key Configuration Id the active key configuration must not be code null code  activeKeyConfigurationId
Sets the active locale The locale can be any arbitrary string but is typically the locale returned from link java util Locale get Default param active Locale the active locale must not be code null code  getDefault activeLocale
Sets the active platform The locale can be any arbitrary string but is typically the locale returned from link org eclipse swt SWT get Platform param active Platform the active platform must not be code null code  getPlatform activePlatform
Sets the map of handlers by command identifiers param handlers By Command Id the map of handlers by command identifiers This map may be empty but it must not be code null code If this map is not empty its keys must be instances of code String code and its values must be instances of code I Handler code  handlersByCommandId IHandler

public interface I Mutable Command Registry extends I Command Registry void set Active Key Configuration Definitions List active Key Configuration Definitions  IMutableCommandRegistry ICommandRegistry setActiveKeyConfigurationDefinitions activeKeyConfigurationDefinitions
void set Active Key Configuration Definitions List active Key Configuration Definitions void set Category Definitions List category Definitions  setActiveKeyConfigurationDefinitions activeKeyConfigurationDefinitions setCategoryDefinitions categoryDefinitions
void set Category Definitions List category Definitions void set Command Definitions List command Definitions  setCategoryDefinitions categoryDefinitions setCommandDefinitions commandDefinitions
void set Command Definitions List command Definitions void set Key Configuration Definitions List key Configuration Definitions  setCommandDefinitions commandDefinitions setKeyConfigurationDefinitions keyConfigurationDefinitions
void set Key Configuration Definitions List key Configuration Definitions void set Key Sequence Binding Definitions List key Sequence Binding Definitions  setKeyConfigurationDefinitions keyConfigurationDefinitions setKeySequenceBindingDefinitions keySequenceBindingDefinitions

Key Configuration Set key Configurations With Listeners String id if key Configurations With Listeners null id null throw new Null Pointer Exception this key Configurations With Listeners key Configurations With Listeners this id id  KeyConfiguration keyConfigurationsWithListeners keyConfigurationsWithListeners NullPointerException keyConfigurationsWithListeners keyConfigurationsWithListeners
public void add Key Configuration Listener I Key Configuration Listener key Configuration Listener if key Configuration Listener null throw new Null Pointer Exception if key Configuration Listeners null key Configuration Listeners new Array List if key Configuration Listeners contains key Configuration Listener key Configuration Listeners add key Configuration Listener key Configurations With Listeners add this  addKeyConfigurationListener IKeyConfigurationListener keyConfigurationListener keyConfigurationListener NullPointerException keyConfigurationListeners keyConfigurationListeners ArrayList keyConfigurationListeners keyConfigurationListener keyConfigurationListeners keyConfigurationListener keyConfigurationsWithListeners
public int compare To Object object Key Configuration casted Object Key Configuration object int compare To Util compare active casted Object active if compare To 0 compare To Util compare defined casted Object defined if compare To 0 compare To Util compare description casted Object description if compare To 0 compare To Util compare id casted Object id if compare To 0 compare To Util compare name casted Object name if compare To 0 compare To Util compare parent Id casted Object parent Id return compare To  compareTo KeyConfiguration castedObject KeyConfiguration compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo parentId castedObject parentId compareTo
public boolean equals Object object if object instanceof Key Configuration return false Key Configuration casted Object Key Configuration object boolean equals true equals Util equals active casted Object active equals Util equals defined casted Object defined equals Util equals description casted Object description equals Util equals id casted Object id equals Util equals name casted Object name equals Util equals parent Id casted Object parent Id return equals  KeyConfiguration KeyConfiguration castedObject KeyConfiguration castedObject castedObject castedObject castedObject castedObject parentId castedObject parentId
void fire Key Configuration Changed Key Configuration Event key Configuration Event if key Configuration Event null throw new Null Pointer Exception if key Configuration Listeners null for int i 0 i key Configuration Listeners size i I Key Configuration Listener key Configuration Listeners get i key Configuration Changed key Configuration Event  fireKeyConfigurationChanged KeyConfigurationEvent keyConfigurationEvent keyConfigurationEvent NullPointerException keyConfigurationListeners keyConfigurationListeners IKeyConfigurationListener keyConfigurationListeners keyConfigurationChanged keyConfigurationEvent
public String get Description throws Not Defined Exception if defined throw new Not Defined Exception Cannot get the description from an undefined key configuration NON NLS 1 return description  getDescription NotDefinedException NotDefinedException
public String get Id return id  getId
public String get Name throws Not Defined Exception if defined throw new Not Defined Exception Cannot get name from an undefined key configuration NON NLS 1 return name  getName NotDefinedException NotDefinedException
public String get Parent Id throws Not Defined Exception if defined throw new Not Defined Exception Cannot get the parent id from an undefined key configuration NON NLS 1 return parent Id  getParentId NotDefinedException NotDefinedException parentId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code active hash Code hash Code HASH FACTOR Util hash Code defined hash Code hash Code HASH FACTOR Util hash Code description hash Code hash Code HASH FACTOR Util hash Code id hash Code hash Code HASH FACTOR Util hash Code name hash Code hash Code HASH FACTOR Util hash Code parent Id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode parentId hashCodeComputed hashCode
public boolean is Active return active  isActive
public boolean is Defined return defined  isDefined
public void remove Key Configuration Listener I Key Configuration Listener key Configuration Listener if key Configuration Listener null throw new Null Pointer Exception if key Configuration Listeners null key Configuration Listeners remove key Configuration Listener if key Configuration Listeners is Empty key Configurations With Listeners remove this  removeKeyConfigurationListener IKeyConfigurationListener keyConfigurationListener keyConfigurationListener NullPointerException keyConfigurationListeners keyConfigurationListeners keyConfigurationListener keyConfigurationListeners isEmpty keyConfigurationsWithListeners
boolean set Active boolean active if active this active this active active hash Code Computed false hash Code 0 string null return true return false  setActive hashCodeComputed hashCode
boolean set Defined boolean defined if defined this defined this defined defined hash Code Computed false hash Code 0 string null return true return false  setDefined hashCodeComputed hashCode
boolean set Description String description if Util equals description this description this description description hash Code Computed false hash Code 0 string null return true return false  setDescription hashCodeComputed hashCode
boolean set Name String name if Util equals name this name this name name hash Code Computed false hash Code 0 string null return true return false  setName hashCodeComputed hashCode
boolean set Parent Id String parent Id if Util equals parent Id this parent Id this parent Id parent Id hash Code Computed false hash Code 0 string null return true return false  setParentId parentId parentId parentId parentId parentId hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append active string Buffer append string Buffer append defined string Buffer append string Buffer append description string Buffer append string Buffer append id string Buffer append string Buffer append name string Buffer append string Buffer append parent Id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer parentId stringBuffer stringBuffer toString

public static Map key Configuration Definitions By Id Collection key Configuration Definitions boolean allow Null Ids if key Configuration Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator key Configuration Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Key Configuration Definition class Key Configuration Definition key Configuration Definition Key Configuration Definition object String id key Configuration Definition get Id if allow Null Ids id null map put id key Configuration Definition return map  keyConfigurationDefinitionsById keyConfigurationDefinitions allowNullIds keyConfigurationDefinitions NullPointerException HashMap keyConfigurationDefinitions hasNext assertInstance KeyConfigurationDefinition KeyConfigurationDefinition keyConfigurationDefinition KeyConfigurationDefinition keyConfigurationDefinition getId allowNullIds keyConfigurationDefinition
public static Map key Configuration Definitions By Name Collection key Configuration Definitions boolean allow Null Names if key Configuration Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator key Configuration Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Key Configuration Definition class Key Configuration Definition key Configuration Definition Key Configuration Definition object String name key Configuration Definition get Name if allow Null Names name null Set key Configuration Definitions2 Set map get name if key Configuration Definitions2 null key Configuration Definitions2 new Hash Set map put name key Configuration Definitions2 key Configuration Definitions2 add key Configuration Definition return map  keyConfigurationDefinitionsByName keyConfigurationDefinitions allowNullNames keyConfigurationDefinitions NullPointerException HashMap keyConfigurationDefinitions hasNext assertInstance KeyConfigurationDefinition KeyConfigurationDefinition keyConfigurationDefinition KeyConfigurationDefinition keyConfigurationDefinition getName allowNullNames keyConfigurationDefinitions2 keyConfigurationDefinitions2 keyConfigurationDefinitions2 HashSet keyConfigurationDefinitions2 keyConfigurationDefinitions2 keyConfigurationDefinition
public Key Configuration Definition String description String id String name String parent Id String source Id this description description this id id this name name this parent Id parent Id this source Id source Id  KeyConfigurationDefinition parentId sourceId parentId parentId sourceId sourceId
public int compare To Object object Key Configuration Definition casted Object Key Configuration Definition object int compare To Util compare description casted Object description if compare To 0 compare To Util compare id casted Object id if compare To 0 compare To Util compare name casted Object name if compare To 0 compare To Util compare parent Id casted Object parent Id if compare To 0 compare To Util compare source Id casted Object source Id return compare To  compareTo KeyConfigurationDefinition castedObject KeyConfigurationDefinition compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo parentId castedObject parentId compareTo compareTo sourceId castedObject sourceId compareTo
public boolean equals Object object if object instanceof Key Configuration Definition return false Key Configuration Definition casted Object Key Configuration Definition object boolean equals true equals Util equals description casted Object description equals Util equals id casted Object id equals Util equals name casted Object name equals Util equals parent Id casted Object parent Id equals Util equals source Id casted Object source Id return equals  KeyConfigurationDefinition KeyConfigurationDefinition castedObject KeyConfigurationDefinition castedObject castedObject castedObject parentId castedObject parentId sourceId castedObject sourceId
public String get Description return description  getDescription
public String get Id return id  getId
public String get Name return name  getName
public String get Parent Id return parent Id  getParentId parentId
public String get Source Id return source Id  getSourceId sourceId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code description hash Code hash Code HASH FACTOR Util hash Code id hash Code hash Code HASH FACTOR Util hash Code name hash Code hash Code HASH FACTOR Util hash Code parent Id hash Code hash Code HASH FACTOR Util hash Code source Id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode parentId hashCode hashCode HASH_FACTOR hashCode sourceId hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append description string Buffer append string Buffer append id string Buffer append string Buffer append name string Buffer append string Buffer append parent Id string Buffer append string Buffer append source Id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer parentId stringBuffer stringBuffer sourceId stringBuffer stringBuffer toString

Key Sequence Binding Key Sequence key Sequence int match if key Sequence null throw new Null Pointer Exception if match 0 throw new Illegal Argument Exception this key Sequence key Sequence this match match  KeySequenceBinding KeySequence keySequence keySequence NullPointerException IllegalArgumentException keySequence keySequence
public int compare To Object object Key Sequence Binding casted Object Key Sequence Binding object int compare To Util compare match casted Object match if compare To 0 compare To Util compare key Sequence casted Object key Sequence return compare To  compareTo KeySequenceBinding castedObject KeySequenceBinding compareTo castedObject compareTo compareTo keySequence castedObject keySequence compareTo
public boolean equals Object object if object instanceof Key Sequence Binding return false Key Sequence Binding casted Object Key Sequence Binding object boolean equals true equals Util equals key Sequence casted Object key Sequence equals Util equals match casted Object match return equals  KeySequenceBinding KeySequenceBinding castedObject KeySequenceBinding keySequence castedObject keySequence castedObject
public Key Sequence get Key Sequence return key Sequence  KeySequence getKeySequence keySequence
public int get Match return match  getMatch
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code key Sequence hash Code hash Code HASH FACTOR Util hash Code match hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode keySequence hashCode hashCode HASH_FACTOR hashCode hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append key Sequence string Buffer append string Buffer append match string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer keySequence stringBuffer stringBuffer stringBuffer stringBuffer toString

static Map key Sequence Binding Definitions By Command Id Collection key Sequence Binding Definitions if key Sequence Binding Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator key Sequence Binding Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Key Sequence Binding Definition class Key Sequence Binding Definition key Sequence Binding Definition Key Sequence Binding Definition object String command Id key Sequence Binding Definition get Command Id if command Id null Collection key Sequence Binding Definitions2 Collection map get command Id if key Sequence Binding Definitions2 null key Sequence Binding Definitions2 new Array List map put command Id key Sequence Binding Definitions2 key Sequence Binding Definitions2 add key Sequence Binding Definition return map  keySequenceBindingDefinitionsByCommandId keySequenceBindingDefinitions keySequenceBindingDefinitions NullPointerException HashMap keySequenceBindingDefinitions hasNext assertInstance KeySequenceBindingDefinition KeySequenceBindingDefinition keySequenceBindingDefinition KeySequenceBindingDefinition commandId keySequenceBindingDefinition getCommandId commandId keySequenceBindingDefinitions2 commandId keySequenceBindingDefinitions2 keySequenceBindingDefinitions2 ArrayList commandId keySequenceBindingDefinitions2 keySequenceBindingDefinitions2 keySequenceBindingDefinition
public Key Sequence Binding Definition String context Id String command Id String key Configuration Id Key Sequence key Sequence String locale String platform String source Id this context Id context Id this command Id command Id this key Configuration Id key Configuration Id this key Sequence key Sequence this locale locale this platform platform this source Id source Id  KeySequenceBindingDefinition contextId commandId keyConfigurationId KeySequence keySequence sourceId contextId contextId commandId commandId keyConfigurationId keyConfigurationId keySequence keySequence sourceId sourceId
public int compare To Object object Key Sequence Binding Definition casted Object Key Sequence Binding Definition object int compare To Util compare context Id casted Object context Id if compare To 0 compare To Util compare command Id casted Object command Id if compare To 0 compare To Util compare key Configuration Id casted Object key Configuration Id if compare To 0 compare To Util compare key Sequence casted Object key Sequence if compare To 0 compare To Util compare locale casted Object locale if compare To 0 compare To Util compare platform casted Object platform if compare To 0 compare To Util compare source Id casted Object source Id return compare To  compareTo KeySequenceBindingDefinition castedObject KeySequenceBindingDefinition compareTo contextId castedObject contextId compareTo compareTo commandId castedObject commandId compareTo compareTo keyConfigurationId castedObject keyConfigurationId compareTo compareTo keySequence castedObject keySequence compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo sourceId castedObject sourceId compareTo
public boolean equals Object object if object instanceof Key Sequence Binding Definition return false Key Sequence Binding Definition casted Object Key Sequence Binding Definition object boolean equals true equals Util equals context Id casted Object context Id equals Util equals command Id casted Object command Id equals Util equals key Configuration Id casted Object key Configuration Id equals Util equals key Sequence casted Object key Sequence equals Util equals locale casted Object locale equals Util equals platform casted Object platform equals Util equals source Id casted Object source Id return equals  KeySequenceBindingDefinition KeySequenceBindingDefinition castedObject KeySequenceBindingDefinition contextId castedObject contextId commandId castedObject commandId keyConfigurationId castedObject keyConfigurationId keySequence castedObject keySequence castedObject castedObject sourceId castedObject sourceId
public String get Context Id return context Id  getContextId contextId
public String get Command Id return command Id  getCommandId commandId
public String get Key Configuration Id return key Configuration Id  getKeyConfigurationId keyConfigurationId
public Key Sequence get Key Sequence return key Sequence  KeySequence getKeySequence keySequence
public String get Locale return locale  getLocale
public String get Platform return platform  getPlatform
public String get Source Id return source Id  getSourceId sourceId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code context Id hash Code hash Code HASH FACTOR Util hash Code command Id hash Code hash Code HASH FACTOR Util hash Code key Configuration Id hash Code hash Code HASH FACTOR Util hash Code key Sequence hash Code hash Code HASH FACTOR Util hash Code locale hash Code hash Code HASH FACTOR Util hash Code platform hash Code hash Code HASH FACTOR Util hash Code source Id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode contextId hashCode hashCode HASH_FACTOR hashCode commandId hashCode hashCode HASH_FACTOR hashCode keyConfigurationId hashCode hashCode HASH_FACTOR hashCode keySequence hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode sourceId hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append context Id string Buffer append string Buffer append command Id string Buffer append string Buffer append key Configuration Id string Buffer append string Buffer append key Sequence string Buffer append string Buffer append locale string Buffer append string Buffer append platform string Buffer append string Buffer append source Id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer contextId stringBuffer stringBuffer commandId stringBuffer stringBuffer keyConfigurationId stringBuffer stringBuffer keySequence stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer sourceId stringBuffer stringBuffer toString

Key Sequence Binding Machine active Context Id Map new Hash Map active Key Configuration Ids new String 0 active Locales new String 0 active Platforms new String 0 key Sequence Bindings new List new Array List new Array List  KeySequenceBindingMachine activeContextIdMap HashMap activeKeyConfigurationIds activeLocales activePlatforms keySequenceBindings ArrayList ArrayList
Map get Active Context Ids return active Context Id Map  getActiveContextIds activeContextIdMap
String get Active Key Configuration Ids return String active Key Configuration Ids clone  getActiveKeyConfigurationIds activeKeyConfigurationIds
String get Active Locales return String active Locales clone  getActiveLocales activeLocales
String get Active Platforms return String active Platforms clone  getActivePlatforms activePlatforms
List get Key Sequence Bindings0 return key Sequence Bindings 0  getKeySequenceBindings0 keySequenceBindings
List get Key Sequence Bindings1 return key Sequence Bindings 1  getKeySequenceBindings1 keySequenceBindings
Map get Key Sequence Bindings By Command Id if key Sequence Bindings By Command Id null validate Solution key Sequence Bindings By Command Id Collections unmodifiable Map Key Sequence Binding Node get Key Sequence Bindings By Command Id get Matches By Key Sequence return key Sequence Bindings By Command Id  getKeySequenceBindingsByCommandId keySequenceBindingsByCommandId validateSolution keySequenceBindingsByCommandId unmodifiableMap KeySequenceBindingNode getKeySequenceBindingsByCommandId getMatchesByKeySequence keySequenceBindingsByCommandId
Gets all of the active key bindings as a map of code Key Sequence code to command identifiers code String code The map returned is not a copy and is not safe to modify em Do not modify the return value em return The active key bindings never code null code em Do not modify the return value em Map get Matches By Key Sequence if matches By Key Sequence null validate Solution matches By Key Sequence Key Sequence Binding Node get Matches By Key Sequence tree Key Sequence get Instance return matches By Key Sequence  KeySequence getMatchesByKeySequence matchesByKeySequence validateSolution matchesByKeySequence KeySequenceBindingNode getMatchesByKeySequence KeySequence getInstance matchesByKeySequence
private void invalidate Solution solved false key Sequence Bindings By Command Id null matches By Key Sequence null  invalidateSolution keySequenceBindingsByCommandId matchesByKeySequence
private void invalidate Tree tree null invalidate Solution  invalidateTree invalidateSolution
A mutator for the tree of active contexts If the tree is different then the current tree then the previous key binding map is invalidated param active Context Tree The map of child to parent context identifiers that are currently active This value must not be code null code but may be empty All the keys and values in the map should be strings and only the values can be code null code return code true code if the context tree has changed code false code otherwise boolean set Active Context Ids Map active Context Tree if active Context Tree null throw new Null Pointer Exception if active Context Tree equals this active Context Id Map this active Context Id Map active Context Tree invalidate Solution return true return false  activeContextTree setActiveContextIds activeContextTree activeContextTree NullPointerException activeContextTree activeContextIdMap activeContextIdMap activeContextTree invalidateSolution
boolean set Active Key Configuration Ids String active Key Configuration Ids if active Key Configuration Ids null throw new Null Pointer Exception active Key Configuration Ids String active Key Configuration Ids clone if Arrays equals this active Key Configuration Ids active Key Configuration Ids this active Key Configuration Ids active Key Configuration Ids invalidate Solution return true return false  setActiveKeyConfigurationIds activeKeyConfigurationIds activeKeyConfigurationIds NullPointerException activeKeyConfigurationIds activeKeyConfigurationIds activeKeyConfigurationIds activeKeyConfigurationIds activeKeyConfigurationIds activeKeyConfigurationIds invalidateSolution
boolean set Active Locales String active Locales if active Locales null throw new Null Pointer Exception active Locales String active Locales clone if Arrays equals this active Locales active Locales this active Locales active Locales invalidate Solution return true return false  setActiveLocales activeLocales activeLocales NullPointerException activeLocales activeLocales activeLocales activeLocales activeLocales activeLocales invalidateSolution
boolean set Active Platforms String active Platforms if active Platforms null throw new Null Pointer Exception active Platforms String active Platforms clone if Arrays equals this active Platforms active Platforms this active Platforms active Platforms invalidate Solution return true return false  setActivePlatforms activePlatforms activePlatforms NullPointerException activePlatforms activePlatforms activePlatforms activePlatforms activePlatforms activePlatforms invalidateSolution
boolean set Key Sequence Bindings0 List key Sequence Bindings0 key Sequence Bindings0 Util safe Copy key Sequence Bindings0 Key Sequence Binding Definition class if this key Sequence Bindings 0 equals key Sequence Bindings0 this key Sequence Bindings 0 key Sequence Bindings0 invalidate Tree return true return false  setKeySequenceBindings0 keySequenceBindings0 keySequenceBindings0 safeCopy keySequenceBindings0 KeySequenceBindingDefinition keySequenceBindings keySequenceBindings0 keySequenceBindings keySequenceBindings0 invalidateTree
boolean set Key Sequence Bindings1 List key Sequence Bindings1 key Sequence Bindings1 Util safe Copy key Sequence Bindings1 Key Sequence Binding Definition class if this key Sequence Bindings 1 equals key Sequence Bindings1 this key Sequence Bindings 1 key Sequence Bindings1 invalidate Tree return true return false  setKeySequenceBindings1 keySequenceBindings1 keySequenceBindings1 safeCopy keySequenceBindings1 KeySequenceBindingDefinition keySequenceBindings keySequenceBindings1 keySequenceBindings keySequenceBindings1 invalidateTree
private void validate Solution if solved validate Tree Key Sequence Binding Node solve tree active Context Id Map active Key Configuration Ids active Platforms active Locales solved true  validateSolution validateTree KeySequenceBindingNode activeContextIdMap activeKeyConfigurationIds activePlatforms activeLocales
private void validate Tree if tree null tree new Tree Map for int i 0 i key Sequence Bindings length i Iterator iterator key Sequence Bindings i iterator while iterator has Next Key Sequence Binding Definition key Sequence Binding Definition Key Sequence Binding Definition iterator next Key Sequence Binding Node add tree key Sequence Binding Definition get Key Sequence key Sequence Binding Definition get Context Id key Sequence Binding Definition get Key Configuration Id i key Sequence Binding Definition get Platform key Sequence Binding Definition get Locale key Sequence Binding Definition get Command Id  validateTree TreeMap keySequenceBindings keySequenceBindings hasNext KeySequenceBindingDefinition keySequenceBindingDefinition KeySequenceBindingDefinition KeySequenceBindingNode keySequenceBindingDefinition getKeySequence keySequenceBindingDefinition getContextId keySequenceBindingDefinition getKeyConfigurationId keySequenceBindingDefinition getPlatform keySequenceBindingDefinition getLocale keySequenceBindingDefinition getCommandId

public int compare To Object object Assignment casted Object Assignment object int compare To has Preference Command Id In First Key Configuration false casted Object has Preference Command Id In First Key Configuration true 1 0 1 if compare To 0 compare To has Preference Command Id In Inherited Key Configuration false casted Object has Preference Command Id In Inherited Key Configuration true 1 0 1 if compare To 0 compare To has Plugin Command Id In First Key Configuration false casted Object has Plugin Command Id In First Key Configuration true 1 0 1 if compare To 0 compare To has Plugin Command Id In Inherited Key Configuration false casted Object has Plugin Command Id In Inherited Key Configuration true 1 0 1 if compare To 0 compare To Util compare preference Command Id In First Key Configuration casted Object preference Command Id In First Key Configuration if compare To 0 compare To Util compare preference Command Id In Inherited Key Configuration casted Object preference Command Id In Inherited Key Configuration if compare To 0 compare To Util compare plugin Command Id In First Key Configuration casted Object plugin Command Id In First Key Configuration if compare To 0 compare To Util compare plugin Command Id In Inherited Key Configuration casted Object plugin Command Id In Inherited Key Configuration return compare To  compareTo castedObject compareTo hasPreferenceCommandIdInFirstKeyConfiguration castedObject hasPreferenceCommandIdInFirstKeyConfiguration compareTo compareTo hasPreferenceCommandIdInInheritedKeyConfiguration castedObject hasPreferenceCommandIdInInheritedKeyConfiguration compareTo compareTo hasPluginCommandIdInFirstKeyConfiguration castedObject hasPluginCommandIdInFirstKeyConfiguration compareTo compareTo hasPluginCommandIdInInheritedKeyConfiguration castedObject hasPluginCommandIdInInheritedKeyConfiguration compareTo compareTo preferenceCommandIdInFirstKeyConfiguration castedObject preferenceCommandIdInFirstKeyConfiguration compareTo compareTo preferenceCommandIdInInheritedKeyConfiguration castedObject preferenceCommandIdInInheritedKeyConfiguration compareTo compareTo pluginCommandIdInFirstKeyConfiguration castedObject pluginCommandIdInFirstKeyConfiguration compareTo compareTo pluginCommandIdInInheritedKeyConfiguration castedObject pluginCommandIdInInheritedKeyConfiguration compareTo
boolean contains String command Id return Util equals command Id preference Command Id In First Key Configuration Util equals command Id preference Command Id In Inherited Key Configuration Util equals command Id plugin Command Id In First Key Configuration Util equals command Id plugin Command Id In Inherited Key Configuration  commandId commandId preferenceCommandIdInFirstKeyConfiguration commandId preferenceCommandIdInInheritedKeyConfiguration commandId pluginCommandIdInFirstKeyConfiguration commandId pluginCommandIdInInheritedKeyConfiguration
public boolean equals Object object if object instanceof Assignment return false Assignment casted Object Assignment object boolean equals true equals has Preference Command Id In First Key Configuration casted Object has Preference Command Id In First Key Configuration equals has Preference Command Id In Inherited Key Configuration casted Object has Preference Command Id In Inherited Key Configuration equals has Plugin Command Id In First Key Configuration casted Object has Plugin Command Id In First Key Configuration equals has Plugin Command Id In Inherited Key Configuration casted Object has Plugin Command Id In Inherited Key Configuration equals preference Command Id In First Key Configuration casted Object preference Command Id In First Key Configuration equals preference Command Id In Inherited Key Configuration casted Object preference Command Id In Inherited Key Configuration equals plugin Command Id In First Key Configuration casted Object plugin Command Id In First Key Configuration equals plugin Command Id In Inherited Key Configuration casted Object plugin Command Id In Inherited Key Configuration return equals  castedObject hasPreferenceCommandIdInFirstKeyConfiguration castedObject hasPreferenceCommandIdInFirstKeyConfiguration hasPreferenceCommandIdInInheritedKeyConfiguration castedObject hasPreferenceCommandIdInInheritedKeyConfiguration hasPluginCommandIdInFirstKeyConfiguration castedObject hasPluginCommandIdInFirstKeyConfiguration hasPluginCommandIdInInheritedKeyConfiguration castedObject hasPluginCommandIdInInheritedKeyConfiguration preferenceCommandIdInFirstKeyConfiguration castedObject preferenceCommandIdInFirstKeyConfiguration preferenceCommandIdInInheritedKeyConfiguration castedObject preferenceCommandIdInInheritedKeyConfiguration pluginCommandIdInFirstKeyConfiguration castedObject pluginCommandIdInFirstKeyConfiguration pluginCommandIdInInheritedKeyConfiguration castedObject pluginCommandIdInInheritedKeyConfiguration
static void add Map key Stroke Node By Key Stroke Map Key Sequence key Sequence String context Id String key Configuration Id int rank String platform String locale String command Id List key Strokes key Sequence get Key Strokes Map root key Stroke Node By Key Stroke Map Key Sequence Binding Node key Sequence Binding Node null for int i 0 i key Strokes size i Key Stroke key Stroke Key Stroke key Strokes get i key Sequence Binding Node Key Sequence Binding Node root get key Stroke if key Sequence Binding Node null key Sequence Binding Node new Key Sequence Binding Node root put key Stroke key Sequence Binding Node root key Sequence Binding Node child Key Stroke Node By Key Stroke Map if key Sequence Binding Node null key Sequence Binding Node add context Id key Configuration Id rank platform locale command Id  keyStrokeNodeByKeyStrokeMap KeySequence keySequence contextId keyConfigurationId commandId keyStrokes keySequence getKeyStrokes keyStrokeNodeByKeyStrokeMap KeySequenceBindingNode keySequenceBindingNode keyStrokes KeyStroke keyStroke KeyStroke keyStrokes keySequenceBindingNode KeySequenceBindingNode keyStroke keySequenceBindingNode keySequenceBindingNode KeySequenceBindingNode keyStroke keySequenceBindingNode keySequenceBindingNode childKeyStrokeNodeByKeyStrokeMap keySequenceBindingNode keySequenceBindingNode contextId keyConfigurationId commandId
static Map find Map key Stroke Node By Key Stroke Map Key Sequence key Sequence Iterator iterator key Sequence get Key Strokes iterator Key Sequence Binding Node key Sequence Binding Node null while iterator has Next key Sequence Binding Node Key Sequence Binding Node key Stroke Node By Key Stroke Map get iterator next if key Sequence Binding Node null return null key Stroke Node By Key Stroke Map key Sequence Binding Node child Key Stroke Node By Key Stroke Map return key Stroke Node By Key Stroke Map  keyStrokeNodeByKeyStrokeMap KeySequence keySequence keySequence getKeyStrokes KeySequenceBindingNode keySequenceBindingNode hasNext keySequenceBindingNode KeySequenceBindingNode keyStrokeNodeByKeyStrokeMap keySequenceBindingNode keyStrokeNodeByKeyStrokeMap keySequenceBindingNode childKeyStrokeNodeByKeyStrokeMap keyStrokeNodeByKeyStrokeMap
static Map get Assignments By Context Id Key Sequence Map key Stroke Node By Key Stroke Map Key Sequence prefix Map assignments By Context Id By Key Sequence new Hash Map Iterator iterator key Stroke Node By Key Stroke Map entry Set iterator while iterator has Next Map Entry entry Map Entry iterator next Key Stroke key Stroke Key Stroke entry get Key Key Sequence Binding Node key Sequence Binding Node Key Sequence Binding Node entry get Value List key Strokes new Array List prefix get Key Strokes key Strokes add key Stroke Key Sequence key Sequence Key Sequence get Instance key Strokes Map child Assignments By Context Id By Key Sequence get Assignments By Context Id Key Sequence key Sequence Binding Node child Key Stroke Node By Key Stroke Map key Sequence if child Assignments By Context Id By Key Sequence size 1 assignments By Context Id By Key Sequence put All child Assignments By Context Id By Key Sequence assignments By Context Id By Key Sequence put key Sequence key Sequence Binding Node assignments By Context Id return assignments By Context Id By Key Sequence  getAssignmentsByContextIdKeySequence keyStrokeNodeByKeyStrokeMap KeySequence assignmentsByContextIdByKeySequence HashMap keyStrokeNodeByKeyStrokeMap entrySet hasNext KeyStroke keyStroke KeyStroke getKey KeySequenceBindingNode keySequenceBindingNode KeySequenceBindingNode getValue keyStrokes ArrayList getKeyStrokes keyStrokes keyStroke KeySequence keySequence KeySequence getInstance keyStrokes childAssignmentsByContextIdByKeySequence getAssignmentsByContextIdKeySequence keySequenceBindingNode childKeyStrokeNodeByKeyStrokeMap keySequence childAssignmentsByContextIdByKeySequence assignmentsByContextIdByKeySequence putAll childAssignmentsByContextIdByKeySequence assignmentsByContextIdByKeySequence keySequence keySequenceBindingNode assignmentsByContextId assignmentsByContextIdByKeySequence
static void get Key Sequence Binding Definitions Map key Stroke Node By Key Stroke Map Key Sequence prefix int rank List key Sequence Binding Definitions Iterator iterator key Stroke Node By Key Stroke Map entry Set iterator while iterator has Next Map Entry entry Map Entry iterator next Key Stroke key Stroke Key Stroke entry get Key Key Sequence Binding Node key Sequence Binding Node Key Sequence Binding Node entry get Value List key Strokes new Array List prefix get Key Strokes key Strokes add key Stroke Key Sequence key Sequence Key Sequence get Instance key Strokes Map context Map key Sequence Binding Node context Map Iterator iterator2 context Map entry Set iterator while iterator2 has Next Map Entry entry2 Map Entry iterator2 next String context Id String entry2 get Key Map key Configuration Map Map entry2 get Value Iterator iterator3 key Configuration Map entry Set iterator while iterator3 has Next Map Entry entry3 Map Entry iterator3 next String key Configuration Id String entry3 get Key Map rank Map Map entry3 get Value Map platform Map Map rank Map get new Integer rank if platform Map null Iterator iterator4 platform Map entry Set iterator while iterator4 has Next Map Entry entry4 Map Entry iterator4 next String platform String entry4 get Key Map locale Map Map entry4 get Value Iterator iterator5 locale Map entry Set iterator while iterator5 has Next Map Entry entry5 Map Entry iterator5 next String locale String entry5 get Key Set command Ids Set entry5 get Value Iterator iterator6 command Ids iterator while iterator6 has Next String command Id String iterator6 next key Sequence Binding Definitions add new Key Sequence Binding Definition context Id command Id key Configuration Id key Sequence locale platform null get Key Sequence Binding Definitions key Sequence Binding Node child Key Stroke Node By Key Stroke Map key Sequence rank key Sequence Binding Definitions  getKeySequenceBindingDefinitions keyStrokeNodeByKeyStrokeMap KeySequence keySequenceBindingDefinitions keyStrokeNodeByKeyStrokeMap entrySet hasNext KeyStroke keyStroke KeyStroke getKey KeySequenceBindingNode keySequenceBindingNode KeySequenceBindingNode getValue keyStrokes ArrayList getKeyStrokes keyStrokes keyStroke KeySequence keySequence KeySequence getInstance keyStrokes contextMap keySequenceBindingNode contextMap contextMap entrySet hasNext contextId getKey keyConfigurationMap getValue keyConfigurationMap entrySet hasNext keyConfigurationId getKey rankMap getValue platformMap rankMap platformMap platformMap entrySet hasNext getKey localeMap getValue localeMap entrySet hasNext getKey commandIds getValue commandIds hasNext commandId keySequenceBindingDefinitions KeySequenceBindingDefinition contextId commandId keyConfigurationId keySequence getKeySequenceBindingDefinitions keySequenceBindingNode childKeyStrokeNodeByKeyStrokeMap keySequence keySequenceBindingDefinitions
static Map get Key Sequence Bindings By Command Id Map key Sequence Map Map command Map new Hash Map Iterator iterator key Sequence Map entry Set iterator while iterator has Next Map Entry entry Map Entry iterator next Key Sequence key Sequence Key Sequence entry get Key Match match Match entry get Value String command Id match get Command Id int value match get Value Sorted Set key Sequence Bindings Sorted Set command Map get command Id if key Sequence Bindings null key Sequence Bindings new Tree Set command Map put command Id key Sequence Bindings key Sequence Bindings add new Key Sequence Binding key Sequence value return command Map  getKeySequenceBindingsByCommandId keySequenceMap commandMap HashMap keySequenceMap entrySet hasNext KeySequence keySequence KeySequence getKey getValue commandId getCommandId getValue SortedSet keySequenceBindings SortedSet commandMap commandId keySequenceBindings keySequenceBindings TreeSet commandMap commandId keySequenceBindings keySequenceBindings KeySequenceBinding keySequence commandMap
static Map get Matches By Key Sequence Map key Stroke Node By Key Stroke Map Key Sequence prefix Map key Sequence Map new Hash Map Iterator iterator key Stroke Node By Key Stroke Map entry Set iterator while iterator has Next Map Entry entry Map Entry iterator next Key Stroke key Stroke Key Stroke entry get Key Key Sequence Binding Node key Sequence Binding Node Key Sequence Binding Node entry get Value List key Strokes new Array List prefix get Key Strokes key Strokes add key Stroke Key Sequence key Sequence Key Sequence get Instance key Strokes Map child Matches By Key Sequence get Matches By Key Sequence key Sequence Binding Node child Key Stroke Node By Key Stroke Map key Sequence if child Matches By Key Sequence size 1 key Sequence Map put All child Matches By Key Sequence else if key Sequence Binding Node match null key Sequence Binding Node match get Command Id null key Sequence Map put key Sequence key Sequence Binding Node match return key Sequence Map  getMatchesByKeySequence keyStrokeNodeByKeyStrokeMap KeySequence keySequenceMap HashMap keyStrokeNodeByKeyStrokeMap entrySet hasNext KeyStroke keyStroke KeyStroke getKey KeySequenceBindingNode keySequenceBindingNode KeySequenceBindingNode getValue keyStrokes ArrayList getKeyStrokes keyStrokes keyStroke KeySequence keySequence KeySequence getInstance keyStrokes childMatchesByKeySequence getMatchesByKeySequence keySequenceBindingNode childKeyStrokeNodeByKeyStrokeMap keySequence childMatchesByKeySequence keySequenceMap putAll childMatchesByKeySequence keySequenceBindingNode keySequenceBindingNode getCommandId keySequenceMap keySequence keySequenceBindingNode keySequenceMap
static void remove Map key Stroke Node By Key Stroke Map Key Sequence key Sequence String context Id String key Configuration Id int rank String platform String locale Iterator iterator key Sequence get Key Strokes iterator Key Sequence Binding Node key Sequence Binding Node null while iterator has Next key Sequence Binding Node Key Sequence Binding Node key Stroke Node By Key Stroke Map get iterator next if key Sequence Binding Node null return key Stroke Node By Key Stroke Map key Sequence Binding Node child Key Stroke Node By Key Stroke Map key Sequence Binding Node remove context Id key Configuration Id rank platform locale  keyStrokeNodeByKeyStrokeMap KeySequence keySequence contextId keyConfigurationId keySequence getKeyStrokes KeySequenceBindingNode keySequenceBindingNode hasNext keySequenceBindingNode KeySequenceBindingNode keyStrokeNodeByKeyStrokeMap keySequenceBindingNode keyStrokeNodeByKeyStrokeMap keySequenceBindingNode childKeyStrokeNodeByKeyStrokeMap keySequenceBindingNode contextId keyConfigurationId
static void remove Map key Stroke Node By Key Stroke Map Key Sequence key Sequence String context Id String key Configuration Id int rank String platform String locale String command Id Iterator iterator key Sequence get Key Strokes iterator Key Sequence Binding Node key Sequence Binding Node null while iterator has Next key Sequence Binding Node Key Sequence Binding Node key Stroke Node By Key Stroke Map get iterator next if key Sequence Binding Node null return key Stroke Node By Key Stroke Map key Sequence Binding Node child Key Stroke Node By Key Stroke Map key Sequence Binding Node remove context Id key Configuration Id rank platform locale command Id  keyStrokeNodeByKeyStrokeMap KeySequence keySequence contextId keyConfigurationId commandId keySequence getKeyStrokes KeySequenceBindingNode keySequenceBindingNode hasNext keySequenceBindingNode KeySequenceBindingNode keyStrokeNodeByKeyStrokeMap keySequenceBindingNode keyStrokeNodeByKeyStrokeMap keySequenceBindingNode childKeyStrokeNodeByKeyStrokeMap keySequenceBindingNode contextId keyConfigurationId commandId
static void solve Map key Stroke Node By Key Stroke Map String key Configuration Ids String platforms String locales for Iterator iterator key Stroke Node By Key Stroke Map values iterator iterator has Next Key Sequence Binding Node key Sequence Binding Node Key Sequence Binding Node iterator next key Sequence Binding Node solve Assignments By Context Id key Configuration Ids platforms locales solve key Sequence Binding Node child Key Stroke Node By Key Stroke Map key Configuration Ids platforms locales  keyStrokeNodeByKeyStrokeMap keyConfigurationIds keyStrokeNodeByKeyStrokeMap hasNext KeySequenceBindingNode keySequenceBindingNode KeySequenceBindingNode keySequenceBindingNode solveAssignmentsByContextId keyConfigurationIds keySequenceBindingNode childKeyStrokeNodeByKeyStrokeMap keyConfigurationIds
static void solve Map key Stroke Node By Key Stroke Map Map context Ids String key Configuration Ids String platforms String locales for Iterator iterator key Stroke Node By Key Stroke Map values iterator iterator has Next Key Sequence Binding Node key Sequence Binding Node Key Sequence Binding Node iterator next key Sequence Binding Node solve Match context Ids key Configuration Ids platforms locales solve key Sequence Binding Node child Key Stroke Node By Key Stroke Map context Ids key Configuration Ids platforms locales  keyStrokeNodeByKeyStrokeMap contextIds keyConfigurationIds keyStrokeNodeByKeyStrokeMap hasNext KeySequenceBindingNode keySequenceBindingNode KeySequenceBindingNode keySequenceBindingNode solveMatch contextIds keyConfigurationIds keySequenceBindingNode childKeyStrokeNodeByKeyStrokeMap contextIds keyConfigurationIds
private Match match null private Key Sequence Binding Node  KeySequenceBindingNode
private void add String context Id String key Configuration Id int rank String platform String locale String command Id Map key Configuration Map Map context Map get context Id if key Configuration Map null key Configuration Map new Hash Map context Map put context Id key Configuration Map Map rank Map Map key Configuration Map get key Configuration Id if rank Map null rank Map new Hash Map key Configuration Map put key Configuration Id rank Map Map platform Map Map rank Map get new Integer rank if platform Map null platform Map new Hash Map rank Map put new Integer rank platform Map Map locale Map Map platform Map get platform if locale Map null locale Map new Hash Map platform Map put platform locale Map Set command Ids Set locale Map get locale if command Ids null command Ids new Hash Set locale Map put locale command Ids command Ids add command Id  contextId keyConfigurationId commandId keyConfigurationMap contextMap contextId keyConfigurationMap keyConfigurationMap HashMap contextMap contextId keyConfigurationMap rankMap keyConfigurationMap keyConfigurationId rankMap rankMap HashMap keyConfigurationMap keyConfigurationId rankMap platformMap rankMap platformMap platformMap HashMap rankMap platformMap localeMap platformMap localeMap localeMap HashMap platformMap localeMap commandIds localeMap commandIds commandIds HashSet localeMap commandIds commandIds commandId
private void remove String context Id String key Configuration Id int rank String platform String locale Map key Configuration Map Map context Map get context Id if key Configuration Map null Map rank Map Map key Configuration Map get key Configuration Id if rank Map null Map platform Map Map rank Map get new Integer rank if platform Map null Map locale Map Map platform Map get platform if locale Map null locale Map remove locale if locale Map is Empty platform Map remove platform if platform Map is Empty rank Map remove new Integer rank if rank Map is Empty key Configuration Map remove key Configuration Id if key Configuration Map is Empty context Map remove context Id  contextId keyConfigurationId keyConfigurationMap contextMap contextId keyConfigurationMap rankMap keyConfigurationMap keyConfigurationId rankMap platformMap rankMap platformMap localeMap platformMap localeMap localeMap localeMap isEmpty platformMap platformMap isEmpty rankMap rankMap isEmpty keyConfigurationMap keyConfigurationId keyConfigurationMap isEmpty contextMap contextId
private void remove String context Id String key Configuration Id int rank String platform String locale String command Id Map key Configuration Map Map context Map get context Id if key Configuration Map null Map rank Map Map key Configuration Map get key Configuration Id if rank Map null Map platform Map Map rank Map get new Integer rank if platform Map null Map locale Map Map platform Map get platform if locale Map null Set command Ids Set locale Map get locale if command Ids null command Ids remove command Id if command Ids is Empty locale Map remove locale if locale Map is Empty platform Map remove platform if platform Map is Empty rank Map remove new Integer rank if rank Map is Empty key Configuration Map remove key Configuration Id if key Configuration Map is Empty context Map remove context Id  contextId keyConfigurationId commandId keyConfigurationMap contextMap contextId keyConfigurationMap rankMap keyConfigurationMap keyConfigurationId rankMap platformMap rankMap platformMap localeMap platformMap localeMap commandIds localeMap commandIds commandIds commandId commandIds isEmpty localeMap localeMap isEmpty platformMap platformMap isEmpty rankMap rankMap isEmpty keyConfigurationMap keyConfigurationId keyConfigurationMap isEmpty contextMap contextId
private void solve Assignments By Context Id String key Configuration Ids String platforms String locales assignments By Context Id clear for Iterator iterator context Map entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String context Id String entry get Key Map key Configuration Map Map entry get Value Key Sequence Binding Node Assignment assignment null if key Configuration Map null for int key Configuration 0 key Configuration key Configuration Ids length key Configuration 0xFF key Configuration Map rank Map Map key Configuration Map get key Configuration Ids key Configuration if rank Map null for int rank 0 rank 1 rank Map platform Map Map rank Map get new Integer rank if platform Map null for int platform 0 platform platforms length platform 0xFF platform Map locale Map Map platform Map get platforms platform if locale Map null for int locale 0 locale locales length locale 0xFF locale Set command Ids Set locale Map get locales locale if command Ids null String command Id command Ids size 1 String command Ids iterator next null if assignment null assignment new Assignment switch rank case 0 if key Configuration 0 assignment has Preference Command Id In First Key Configuration assignment has Preference Command Id In First Key Configuration true assignment preference Command Id In First Key Configuration command Id else if assignment has Preference Command Id In Inherited Key Configuration assignment has Preference Command Id In Inherited Key Configuration true assignment preference Command Id In Inherited Key Configuration command Id break case 1 if key Configuration 0 assignment has Plugin Command Id In First Key Configuration assignment has Plugin Command Id In First Key Configuration true assignment plugin Command Id In First Key Configuration command Id else if assignment has Plugin Command Id In Inherited Key Configuration assignment has Plugin Command Id In Inherited Key Configuration true assignment plugin Command Id In Inherited Key Configuration command Id break if assignment null assignments By Context Id put context Id assignment  solveAssignmentsByContextId keyConfigurationIds assignmentsByContextId contextMap entrySet hasNext contextId getKey keyConfigurationMap getValue KeySequenceBindingNode keyConfigurationMap keyConfiguration keyConfiguration keyConfigurationIds keyConfiguration keyConfiguration rankMap keyConfigurationMap keyConfigurationIds keyConfiguration rankMap platformMap rankMap platformMap localeMap platformMap localeMap commandIds localeMap commandIds commandId commandIds commandIds keyConfiguration hasPreferenceCommandIdInFirstKeyConfiguration hasPreferenceCommandIdInFirstKeyConfiguration preferenceCommandIdInFirstKeyConfiguration commandId hasPreferenceCommandIdInInheritedKeyConfiguration hasPreferenceCommandIdInInheritedKeyConfiguration preferenceCommandIdInInheritedKeyConfiguration commandId keyConfiguration hasPluginCommandIdInFirstKeyConfiguration hasPluginCommandIdInFirstKeyConfiguration pluginCommandIdInFirstKeyConfiguration commandId hasPluginCommandIdInInheritedKeyConfiguration hasPluginCommandIdInInheritedKeyConfiguration pluginCommandIdInInheritedKeyConfiguration commandId assignmentsByContextId contextId
p Finds a single match for this key binding node given the state passed in as parameters The match will contain a single command identifier and a match value a rough approximation of how accurate the match may be lower is better p p The matching algorithm checks for a match in each context given in the order provided Similar it checks the key configuration the rank see below the platform and the locale in the order provided If a single command identifier note this could be code null code indicating a removed key binding matches the given characteristics then it is added to the list For each context identifier there can be at most one match If there is no match em or the match has a code null code command identifier em then we will move on to consider the next context p p The rank is a special value It is either code 0 code or code 1 code It is used for marking removed key bindings The removed command identifier is moved to the first rank and a code null code command identifier is placed in the zeroth rank The ranking mechanism is controlled externally but only the zeroth and first ranks are considered internally p p When this method completes code match code will contain the best possible match if any If no match can be found then code match code will be code null code p p TODO Doug s Note May 29 2004 This mechanism is insanely complex for what it is doing and doesn t seem to cover all of the use cases This would be a good candidate for refactoring in the future Most of this code was written by Chris Mc Laren but I ve had to hack in some behavioural changes to accomodate bugs for 3 0 If you re looking for insight as to how it currently works you might try talking to one of us Most notably the fall through mechanism for code null code command identifiers My main concerns are interactions between key configurations and unbinding a key in a child context so as to bind it in a parent context p param context Tree The tree of contexts to consider The tree is represented as a map of child context identifiers to parent context identifiers This value must never be code null code though it may contain code null code parents It should never contain code null code children It should only contain strings param key Configuration Ids The key configuration identifiers in the order they should be considered This value must never be code null code though it may contain code null code values code null code values typically indicate any param platforms The platform identifiers in the order they should be considered This value must never be code null code though it may contain code null code values code null code values typically indicate any param locales The locale identifiers in the order they should be considered This value must never be code null code though it may contain code null code values code null code values typically indicate any private void solve Match Map context Tree String key Configuration Ids String platforms String locales Clear out the current match match null Get an array of context identifiers final String context Ids String context Tree key Set to Array new String context Tree size Get the maximum indices to consider final int max Context context Ids length 0xFF 0xFF context Ids length int max Key Configuration key Configuration Ids length 0xFF 0xFF key Configuration Ids length final int max Platform platforms length 0xFF 0xFF platforms length final int max Locale locales length 0xFF 0xFF locales length Peel apart the nested map looking for matches final Collection context Ids Not To Consider new Hash Set for int context 0 context max Context context boolean match Found For This Context false Check to see if the context identifier has been nixed by a child context That is has a non null match been found in a child context final String context Id context Ids context if context Ids Not To Consider contains context Id continue final Map key Configuration Map Map context Map get context Id if key Configuration Map null for int key Configuration 0 key Configuration max Key Configuration match Found For This Context key Configuration final Map rank Map Map key Configuration Map get key Configuration Ids key Configuration if rank Map null for int rank 0 rank 1 rank final Map platform Map Map rank Map get new Integer rank if platform Map null for int platform 0 platform max Platform match Found For This Context platform final Map locale Map Map platform Map get platforms platform if locale Map null for int locale 0 locale max Locale match Found For This Context locale final Set command Ids Set locale Map get locales locale if command Ids null Jump to the next context match Found For This Context true Get the command identifier final String command Id command Ids size 1 String command Ids iterator next null Make sure we don t consider any higher key configurations again max Key Configuration key Configuration 1 Make sure we don t consider any parents of this context if the command identifier is not null if command Id null String parent Context String context Tree get context Id while parent Context null context Ids Not To Consider add parent Context parent Context String context Tree get parent Context  McLaren contextTree keyConfigurationIds solveMatch contextTree keyConfigurationIds contextIds contextTree keySet toArray contextTree maxContext contextIds contextIds maxKeyConfiguration keyConfigurationIds keyConfigurationIds maxPlatform maxLocale contextIdsNotToConsider HashSet maxContext matchFoundForThisContext contextId contextIds contextIdsNotToConsider contextId keyConfigurationMap contextMap contextId keyConfigurationMap keyConfiguration keyConfiguration maxKeyConfiguration matchFoundForThisContext keyConfiguration rankMap keyConfigurationMap keyConfigurationIds keyConfiguration rankMap platformMap rankMap platformMap maxPlatform matchFoundForThisContext localeMap platformMap localeMap maxLocale matchFoundForThisContext commandIds localeMap commandIds matchFoundForThisContext commandId commandIds commandIds maxKeyConfiguration keyConfiguration commandId parentContext contextTree contextId parentContext contextIdsNotToConsider parentContext parentContext contextTree parentContext

public int compare To Object object Command Assignment casted Object Command Assignment object int compare To Util compare context Id casted Object context Id if compare To 0 compare To Util compare key Sequence casted Object key Sequence if compare To 0 compare To Util compare assignment casted Object assignment return compare To  compareTo CommandAssignment castedObject CommandAssignment compareTo contextId castedObject contextId compareTo compareTo keySequence castedObject keySequence compareTo compareTo castedObject compareTo
public boolean equals Object object if object instanceof Command Assignment return false Command Assignment casted Object Command Assignment object boolean equals true equals Util equals assignment casted Object assignment equals Util equals context Id casted Object context Id equals Util equals key Sequence casted Object key Sequence return equals  CommandAssignment CommandAssignment castedObject CommandAssignment castedObject contextId castedObject contextId keySequence castedObject keySequence
public int compare To Object object Key Sequence Assignment casted Object Key Sequence Assignment object int compare To Util compare context Id casted Object context Id if compare To 0 compare To Util compare assignment casted Object assignment return compare To  compareTo KeySequenceAssignment castedObject KeySequenceAssignment compareTo contextId castedObject contextId compareTo compareTo castedObject compareTo
public boolean equals Object object if object instanceof Command Assignment return false Key Sequence Assignment casted Object Key Sequence Assignment object boolean equals true equals Util equals assignment casted Object assignment equals Util equals context Id casted Object context Id return equals  CommandAssignment KeySequenceAssignment castedObject KeySequenceAssignment castedObject contextId castedObject contextId
private void build Command Assignments Table table Assignments For Command remove All boolean match Found In First Key Configuration false for Iterator iterator command Assignments iterator iterator has Next boolean create Table Item true Command Assignment command Assignment Command Assignment iterator next Key Sequence Binding Node Assignment assignment command Assignment assignment Key Sequence key Sequence command Assignment key Sequence String command String null int difference DIFFERENCE NONE if assignment has Preference Command Id In First Key Configuration assignment has Preference Command Id In Inherited Key Configuration String preference Command Id if assignment has Preference Command Id In First Key Configuration preference Command Id assignment preference Command Id In First Key Configuration else preference Command Id assignment preference Command Id In Inherited Key Configuration if assignment has Plugin Command Id In First Key Configuration assignment has Plugin Command Id In Inherited Key Configuration String plugin Command Id if assignment has Plugin Command Id In First Key Configuration plugin Command Id assignment plugin Command Id In First Key Configuration else plugin Command Id assignment plugin Command Id In Inherited Key Configuration if preference Command Id null difference DIFFERENCE CHANGE command String command Unique Names By Id get preference Command Id key Sequence format NON NLS 1 else difference DIFFERENCE MINUS command String Unassigned key Sequence format if plugin Command Id null command String was NON NLS 1 command Unique Names By Id get plugin Command Id NON NLS 1 else command String was Unassigned NON NLS 1 NON NLS 2 NON NLS 3 else if preference Command Id null difference DIFFERENCE ADD command String command Unique Names By Id get preference Command Id key Sequence format NON NLS 1 else difference DIFFERENCE MINUS command String Unassigned key Sequence format else String plugin Command Id null if assignment has Plugin Command Id In First Key Configuration plugin Command Id assignment plugin Command Id In First Key Configuration if plugin Command Id null match Found In First Key Configuration true else if match Found In First Key Configuration plugin Command Id assignment plugin Command Id In Inherited Key Configuration else create Table Item false iterator remove if plugin Command Id null difference DIFFERENCE NONE command String command Unique Names By Id get preference Command Id key Sequence format NON NLS 1 else difference DIFFERENCE MINUS command String Unassigned key Sequence format if create Table Item Table Item table Item new Table Item table Assignments For Command SWT NULL switch difference case DIFFERENCE ADD table Item set Image 0 IMAGE PLUS break case DIFFERENCE CHANGE table Item set Image 0 IMAGE CHANGE break case DIFFERENCE MINUS table Item set Image 0 IMAGE MINUS break case DIFFERENCE NONE table Item set Image 0 IMAGE BLANK break String context Id command Assignment context Id if context Id null This should never happen table Item set Text 1 Util ZERO LENGTH STRING else table Item set Text 1 String context Unique Names By Id get context Id NON NLS 1 table Item set Text 2 command String if difference DIFFERENCE MINUS table Item set Foreground minus Colour  buildCommandAssignmentsTable tableAssignmentsForCommand removeAll matchFoundInFirstKeyConfiguration commandAssignments hasNext createTableItem CommandAssignment commandAssignment CommandAssignment KeySequenceBindingNode commandAssignment KeySequence keySequence commandAssignment keySequence commandString DIFFERENCE_NONE hasPreferenceCommandIdInFirstKeyConfiguration hasPreferenceCommandIdInInheritedKeyConfiguration preferenceCommandId hasPreferenceCommandIdInFirstKeyConfiguration preferenceCommandId preferenceCommandIdInFirstKeyConfiguration preferenceCommandId preferenceCommandIdInInheritedKeyConfiguration hasPluginCommandIdInFirstKeyConfiguration hasPluginCommandIdInInheritedKeyConfiguration pluginCommandId hasPluginCommandIdInFirstKeyConfiguration pluginCommandId pluginCommandIdInFirstKeyConfiguration pluginCommandId pluginCommandIdInInheritedKeyConfiguration preferenceCommandId DIFFERENCE_CHANGE commandString commandUniqueNamesById preferenceCommandId keySequence DIFFERENCE_MINUS commandString keySequence pluginCommandId commandString commandUniqueNamesById pluginCommandId commandString preferenceCommandId DIFFERENCE_ADD commandString commandUniqueNamesById preferenceCommandId keySequence DIFFERENCE_MINUS commandString keySequence pluginCommandId hasPluginCommandIdInFirstKeyConfiguration pluginCommandId pluginCommandIdInFirstKeyConfiguration pluginCommandId matchFoundInFirstKeyConfiguration matchFoundInFirstKeyConfiguration pluginCommandId pluginCommandIdInInheritedKeyConfiguration createTableItem pluginCommandId DIFFERENCE_NONE commandString commandUniqueNamesById preferenceCommandId keySequence DIFFERENCE_MINUS commandString keySequence createTableItem TableItem tableItem TableItem tableAssignmentsForCommand DIFFERENCE_ADD tableItem setImage IMAGE_PLUS DIFFERENCE_CHANGE tableItem setImage IMAGE_CHANGE DIFFERENCE_MINUS tableItem setImage IMAGE_MINUS DIFFERENCE_NONE tableItem setImage IMAGE_BLANK contextId commandAssignment contextId contextId tableItem setText ZERO_LENGTH_STRING tableItem setText contextUniqueNamesById contextId tableItem setText commandString DIFFERENCE_MINUS tableItem setForeground minusColour
private void build Key Sequence Assignments Table table Assignments For Key Sequence remove All boolean match Found In First Key Configuration false for Iterator iterator key Sequence Assignments iterator iterator has Next boolean create Table Item true Key Sequence Assignment key Sequence Assignment Key Sequence Assignment iterator next Key Sequence Binding Node Assignment assignment key Sequence Assignment assignment String command String null int difference DIFFERENCE NONE if assignment has Preference Command Id In First Key Configuration assignment has Preference Command Id In Inherited Key Configuration String preference Command Id if assignment has Preference Command Id In First Key Configuration preference Command Id assignment preference Command Id In First Key Configuration else preference Command Id assignment preference Command Id In Inherited Key Configuration if assignment has Plugin Command Id In First Key Configuration assignment has Plugin Command Id In Inherited Key Configuration String plugin Command Id if assignment has Plugin Command Id In First Key Configuration plugin Command Id assignment plugin Command Id In First Key Configuration else plugin Command Id assignment plugin Command Id In Inherited Key Configuration if preference Command Id null difference DIFFERENCE CHANGE command String command Unique Names By Id get preference Command Id NON NLS 1 else difference DIFFERENCE MINUS command String Unassigned NON NLS 1 if plugin Command Id null command String was NON NLS 1 command Unique Names By Id get plugin Command Id NON NLS 1 else command String was Unassigned NON NLS 1 NON NLS 2 NON NLS 3 else if preference Command Id null difference DIFFERENCE ADD command String command Unique Names By Id get preference Command Id NON NLS 1 else difference DIFFERENCE MINUS command String Unassigned NON NLS 1 else String plugin Command Id null if assignment has Plugin Command Id In First Key Configuration plugin Command Id assignment plugin Command Id In First Key Configuration if plugin Command Id null match Found In First Key Configuration true else if match Found In First Key Configuration plugin Command Id assignment plugin Command Id In Inherited Key Configuration else create Table Item false iterator remove if plugin Command Id null difference DIFFERENCE NONE command String command Unique Names By Id get plugin Command Id NON NLS 1 else difference DIFFERENCE MINUS command String Unassigned NON NLS 1 if create Table Item Table Item table Item new Table Item table Assignments For Key Sequence SWT NULL switch difference case DIFFERENCE ADD table Item set Image 0 IMAGE PLUS break case DIFFERENCE CHANGE table Item set Image 0 IMAGE CHANGE break case DIFFERENCE MINUS table Item set Image 0 IMAGE MINUS break case DIFFERENCE NONE table Item set Image 0 IMAGE BLANK break String context Id key Sequence Assignment context Id if context Id null This should never happen table Item set Text 1 Util ZERO LENGTH STRING else table Item set Text 1 String context Unique Names By Id get context Id NON NLS 1 table Item set Text 2 command String if difference DIFFERENCE MINUS table Item set Foreground minus Colour  buildKeySequenceAssignmentsTable tableAssignmentsForKeySequence removeAll matchFoundInFirstKeyConfiguration keySequenceAssignments hasNext createTableItem KeySequenceAssignment keySequenceAssignment KeySequenceAssignment KeySequenceBindingNode keySequenceAssignment commandString DIFFERENCE_NONE hasPreferenceCommandIdInFirstKeyConfiguration hasPreferenceCommandIdInInheritedKeyConfiguration preferenceCommandId hasPreferenceCommandIdInFirstKeyConfiguration preferenceCommandId preferenceCommandIdInFirstKeyConfiguration preferenceCommandId preferenceCommandIdInInheritedKeyConfiguration hasPluginCommandIdInFirstKeyConfiguration hasPluginCommandIdInInheritedKeyConfiguration pluginCommandId hasPluginCommandIdInFirstKeyConfiguration pluginCommandId pluginCommandIdInFirstKeyConfiguration pluginCommandId pluginCommandIdInInheritedKeyConfiguration preferenceCommandId DIFFERENCE_CHANGE commandString commandUniqueNamesById preferenceCommandId DIFFERENCE_MINUS commandString pluginCommandId commandString commandUniqueNamesById pluginCommandId commandString preferenceCommandId DIFFERENCE_ADD commandString commandUniqueNamesById preferenceCommandId DIFFERENCE_MINUS commandString pluginCommandId hasPluginCommandIdInFirstKeyConfiguration pluginCommandId pluginCommandIdInFirstKeyConfiguration pluginCommandId matchFoundInFirstKeyConfiguration matchFoundInFirstKeyConfiguration pluginCommandId pluginCommandIdInInheritedKeyConfiguration createTableItem pluginCommandId DIFFERENCE_NONE commandString commandUniqueNamesById pluginCommandId DIFFERENCE_MINUS commandString createTableItem TableItem tableItem TableItem tableAssignmentsForKeySequence DIFFERENCE_ADD tableItem setImage IMAGE_PLUS DIFFERENCE_CHANGE tableItem setImage IMAGE_CHANGE DIFFERENCE_MINUS tableItem setImage IMAGE_MINUS DIFFERENCE_NONE tableItem setImage IMAGE_BLANK contextId keySequenceAssignment contextId contextId tableItem setText ZERO_LENGTH_STRING tableItem setText contextUniqueNamesById contextId tableItem setText commandString DIFFERENCE_MINUS tableItem setForeground minusColour
set Property Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals Field Editor IS VALID set Valid text Multi Key Assist Time is Valid  setPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty FieldEditor IS_VALID setValid textMultiKeyAssistTime isValid
private Composite create Advanced Tab Tab Folder parent Grid Data grid Data null The composite for this tab final Composite composite new Composite parent SWT NULL composite set Layout Data new Grid Data Grid Data FILL BOTH The multi key assist button check Box Multi Key Assist new Button composite SWT CHECK check Box Multi Key Assist set Text Util translate String RESOURCE BUNDLE check Box Multi Key Assist Text NON NLS 1 check Box Multi Key Assist set Tool Tip Text Util translate String RESOURCE BUNDLE check Box Multi Key Assist Tool Tip Text NON NLS 1 check Box Multi Key Assist set Selection get Preference Store get Boolean I Preference Constants MULTI KEY ASSIST grid Data new Grid Data Grid Data FILL HORIZONTAL grid Data horizontal Span 2 check Box Multi Key Assist set Layout Data grid Data The multi key assist time final I Preference Store store Workbench Plugin get Default get Preference Store text Multi Key Assist Time new Integer Field Editor I Preference Constants MULTI KEY ASSIST TIME Util translate String RESOURCE BUNDLE text Multi Key Assist Time Text composite NON NLS 1 text Multi Key Assist Time set Preference Store store text Multi Key Assist Time set Preference Page this text Multi Key Assist Time set Text Limit 9 text Multi Key Assist Time set Error Message Util translate String RESOURCE BUNDLE text Multi Key Assist Time Error Message NON NLS 1 text Multi Key Assist Time set Validate Strategy String Field Editor VALIDATE ON KEY STROKE text Multi Key Assist Time set Valid Range 1 Integer MAX VALUE text Multi Key Assist Time set String Value Integer to String store get Int I Preference Constants MULTI KEY ASSIST TIME text Multi Key Assist Time set Property Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals Field Editor IS VALID set Valid text Multi Key Assist Time is Valid Conigure the layout of the composite final Grid Layout grid Layout new Grid Layout grid Layout margin Height 5 grid Layout margin Width 5 grid Layout num Columns 2 composite set Layout grid Layout return composite  createAdvancedTab TabFolder GridData gridData setLayoutData GridData GridData FILL_BOTH checkBoxMultiKeyAssist checkBoxMultiKeyAssist setText translateString RESOURCE_BUNDLE checkBoxMultiKeyAssist checkBoxMultiKeyAssist setToolTipText translateString RESOURCE_BUNDLE checkBoxMultiKeyAssist ToolTipText checkBoxMultiKeyAssist setSelection getPreferenceStore getBoolean IPreferenceConstants MULTI_KEY_ASSIST gridData GridData GridData FILL_HORIZONTAL gridData horizontalSpan checkBoxMultiKeyAssist setLayoutData gridData IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore textMultiKeyAssistTime IntegerFieldEditor IPreferenceConstants MULTI_KEY_ASSIST_TIME translateString RESOURCE_BUNDLE textMultiKeyAssistTime textMultiKeyAssistTime setPreferenceStore textMultiKeyAssistTime setPreferencePage textMultiKeyAssistTime setTextLimit textMultiKeyAssistTime setErrorMessage translateString RESOURCE_BUNDLE textMultiKeyAssistTime ErrorMessage textMultiKeyAssistTime setValidateStrategy StringFieldEditor VALIDATE_ON_KEY_STROKE textMultiKeyAssistTime setValidRange MAX_VALUE textMultiKeyAssistTime setStringValue toString getInt IPreferenceConstants MULTI_KEY_ASSIST_TIME textMultiKeyAssistTime setPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty FieldEditor IS_VALID setValid textMultiKeyAssistTime isValid GridLayout gridLayout GridLayout gridLayout marginHeight gridLayout marginWidth gridLayout numColumns setLayout gridLayout
combo Key Configuration add Selection Listener new Selection Adapter public void widget Selected Selection Event selection Event selected Combo Key Configuration  comboKeyConfiguration addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectionEvent selectedComboKeyConfiguration
combo Category add Selection Listener new Selection Adapter public void widget Selected Selection Event selection Event selected Combo Category  comboCategory addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectionEvent selectedComboCategory
combo Command add Selection Listener new Selection Adapter public void widget Selected Selection Event selection Event selected Combo Command  comboCommand addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectionEvent selectedComboCommand
table Assignments For Command add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event mouse Event double Clicked Assignments For Command  tableAssignmentsForCommand addMouseListener MouseAdapter mouseDoubleClick MouseEvent mouseEvent doubleClickedAssignmentsForCommand
table Assignments For Command add Selection Listener new Selection Adapter public void widget Selected Selection Event selection Event selected Table Assignments For Command  tableAssignmentsForCommand addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectionEvent selectedTableAssignmentsForCommand
text Key Sequence add Modify Listener new Modify Listener public void modify Text Modify Event e modified Text Key Sequence  textKeySequence addModifyListener ModifyListener modifyText ModifyEvent modifiedTextKeySequence
see org eclipse swt events Focus Listener focus Gained org eclipse swt events Focus Event public void focus Gained Focus Event e PlatformUI get Workbench get Context Support set Key Filter Enabled false  FocusListener focusGained FocusEvent focusGained FocusEvent getWorkbench getContextSupport setKeyFilterEnabled
see org eclipse swt events Focus Listener focus Lost org eclipse swt events Focus Event public void focus Lost Focus Event e PlatformUI get Workbench get Context Support set Key Filter Enabled true  FocusListener focusLost FocusEvent focusLost FocusEvent getWorkbench getContextSupport setKeyFilterEnabled
public void widget Selected Selection Event selection Event Point button Location button Add Key get Location button Location group Key Sequence to Display button Location x button Location y Point button Size button Add Key get Size menu Button Add Key set Location button Location x button Location y button Size y menu Button Add Key set Visible true  widgetSelected SelectionEvent selectionEvent buttonLocation buttonAddKey getLocation buttonLocation groupKeySequence toDisplay buttonLocation buttonLocation buttonSize buttonAddKey getSize menuButtonAddKey setLocation buttonLocation buttonLocation buttonSize menuButtonAddKey setVisible
public void widget Selected Selection Event e text Key Sequence Manager insert trapped Key text Key Sequence set Focus text Key Sequence set Selection text Key Sequence get Text Limit  widgetSelected SelectionEvent textKeySequenceManager trappedKey textKeySequence setFocus textKeySequence setSelection textKeySequence getTextLimit
table Assignments For Key Sequence add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event mouse Event double Clicked Table Assignments For Key Sequence  tableAssignmentsForKeySequence addMouseListener MouseAdapter mouseDoubleClick MouseEvent mouseEvent doubleClickedTableAssignmentsForKeySequence
add Selection Listener new Selection Adapter public void widget Selected Selection Event selection Event selected Table Assignments For Key Sequence  addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectionEvent selectedTableAssignmentsForKeySequence
combo Context add Selection Listener new Selection Adapter public void widget Selected Selection Event selection Event selected Combo Context  comboContext addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectionEvent selectedComboContext
button Add add Selection Listener new Selection Adapter public void widget Selected Selection Event selection Event selected Button Add  buttonAdd addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectionEvent selectedButtonAdd
button Remove add Selection Listener new Selection Adapter public void widget Selected Selection Event selection Event selected Button Remove  buttonRemove addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectionEvent selectedButtonRemove
button Restore add Selection Listener new Selection Adapter public void widget Selected Selection Event selection Event selected Button Restore  buttonRestore addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectionEvent selectedButtonRestore
private Composite create Basic Tab Tab Folder parent Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout Grid Data grid Data new Grid Data Grid Data FILL BOTH composite set Layout Data grid Data Composite composite Key Configuration new Composite composite SWT NULL Grid Layout grid Layout new Grid Layout grid Layout num Columns 3 composite Key Configuration set Layout grid Layout grid Data new Grid Data Grid Data FILL HORIZONTAL composite Key Configuration set Layout Data grid Data label Key Configuration new Label composite Key Configuration SWT LEFT label Key Configuration set Text Util translate String RESOURCE BUNDLE label Key Configuration NON NLS 1 combo Key Configuration new Combo composite Key Configuration SWT READ ONLY grid Data new Grid Data grid Data width Hint 200 combo Key Configuration set Layout Data grid Data combo Key Configuration add Selection Listener new Selection Adapter public void widget Selected Selection Event selection Event selected Combo Key Configuration label Key Configuration Extends new Label composite Key Configuration SWT LEFT grid Data new Grid Data Grid Data FILL HORIZONTAL label Key Configuration Extends set Layout Data grid Data Control spacer new Composite composite SWT NULL grid Data new Grid Data grid Data height Hint 10 grid Data width Hint 10 spacer set Layout Data grid Data group Command new Group composite SWT SHADOW NONE grid Layout new Grid Layout grid Layout num Columns 3 group Command set Layout grid Layout grid Data new Grid Data Grid Data FILL BOTH group Command set Layout Data grid Data group Command set Text Util translate String RESOURCE BUNDLE group Command NON NLS 1 label Category new Label group Command SWT LEFT grid Data new Grid Data label Category set Layout Data grid Data label Category set Text Util translate String RESOURCE BUNDLE label Category NON NLS 1 combo Category new Combo group Command SWT READ ONLY grid Data new Grid Data grid Data horizontal Span 2 grid Data width Hint 200 combo Category set Layout Data grid Data combo Category add Selection Listener new Selection Adapter public void widget Selected Selection Event selection Event selected Combo Category label Command new Label group Command SWT LEFT grid Data new Grid Data label Command set Layout Data grid Data label Command set Text Util translate String RESOURCE BUNDLE label Command NON NLS 1 combo Command new Combo group Command SWT READ ONLY grid Data new Grid Data grid Data horizontal Span 2 grid Data width Hint 300 combo Command set Layout Data grid Data combo Command add Selection Listener new Selection Adapter public void widget Selected Selection Event selection Event selected Combo Command label Assignments For Command new Label group Command SWT LEFT grid Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING grid Data vertical Alignment Grid Data FILL VERTICAL label Assignments For Command set Layout Data grid Data label Assignments For Command set Text Util translate String RESOURCE BUNDLE label Assignments For Command NON NLS 1 table Assignments For Command new Table group Command SWT BORDER SWT FULL SELECTION SWT H SCROLL SWT V SCROLL table Assignments For Command set Header Visible true grid Data new Grid Data Grid Data FILL BOTH grid Data height Hint 60 grid Data horizontal Span 2 grid Data width Hint carbon equals SWT get Platform 620 520 NON NLS 1 table Assignments For Command set Layout Data grid Data Table Column table Column Delta new Table Column table Assignments For Command SWT NULL 0 table Column Delta set Resizable false table Column Delta set Text Util ZERO LENGTH STRING table Column Delta set Width 20 Table Column table Column Context new Table Column table Assignments For Command SWT NULL 1 table Column Context set Resizable true table Column Context set Text Util translate String RESOURCE BUNDLE table Column Context NON NLS 1 table Column Context pack table Column Context set Width 200 Table Column table Column Key Sequence new Table Column table Assignments For Command SWT NULL 2 table Column Key Sequence set Resizable true table Column Key Sequence set Text Util translate String RESOURCE BUNDLE table Column Key Sequence NON NLS 1 table Column Key Sequence pack table Column Key Sequence set Width 300 table Assignments For Command add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event mouse Event double Clicked Assignments For Command table Assignments For Command add Selection Listener new Selection Adapter public void widget Selected Selection Event selection Event selected Table Assignments For Command group Key Sequence new Group composite SWT SHADOW NONE grid Layout new Grid Layout grid Layout num Columns 4 group Key Sequence set Layout grid Layout grid Data new Grid Data Grid Data FILL BOTH group Key Sequence set Layout Data grid Data group Key Sequence set Text Util translate String RESOURCE BUNDLE group Key Sequence NON NLS 1 label Key Sequence new Label group Key Sequence SWT LEFT grid Data new Grid Data label Key Sequence set Layout Data grid Data label Key Sequence set Text Util translate String RESOURCE BUNDLE label Key Sequence NON NLS 1 The text widget into which the key strokes will be entered text Key Sequence new Text group Key Sequence SWT BORDER On MacOS X this font will be changed by Key Sequence Text text Key Sequence set Font group Key Sequence get Font grid Data new Grid Data grid Data horizontal Span 2 grid Data width Hint 300 text Key Sequence set Layout Data grid Data text Key Sequence add Modify Listener new Modify Listener public void modify Text Modify Event e modified Text Key Sequence text Key Sequence add Focus Listener new Focus Listener non Javadoc see org eclipse swt events Focus Listener focus Gained org eclipse swt events Focus Event public void focus Gained Focus Event e PlatformUI get Workbench get Context Support set Key Filter Enabled false non Javadoc see org eclipse swt events Focus Listener focus Lost org eclipse swt events Focus Event public void focus Lost Focus Event e PlatformUI get Workbench get Context Support set Key Filter Enabled true The manager for the key sequence text widget text Key Sequence Manager new Key Sequence Text text Key Sequence text Key Sequence Manager set Key Stroke Limit 4 Button for adding trapped key strokes button Add Key new Button group Key Sequence SWT LEFT SWT ARROW button Add Key set Tool Tip Text Util translate String RESOURCE BUNDLE button Add Key Tool Tip Text NON NLS 1 grid Data new Grid Data grid Data height Hint combo Category get Text Height button Add Key set Layout Data grid Data button Add Key add Selection Listener new Selection Adapter public void widget Selected Selection Event selection Event Point button Location button Add Key get Location button Location group Key Sequence to Display button Location x button Location y Point button Size button Add Key get Size menu Button Add Key set Location button Location x button Location y button Size y menu Button Add Key set Visible true Arrow buttons aren t normally added to the tab list Let s fix that Control tab Stops group Key Sequence get Tab List Array List new Tab Stops new Array List for int i 0 i tab Stops length i Control tab Stop tab Stops i new Tab Stops add tab Stop if text Key Sequence equals tab Stop new Tab Stops add button Add Key Control new Tab Stop Array Control new Tab Stops to Array new Control new Tab Stops size group Key Sequence set Tab List new Tab Stop Array Construct the menu to attach to the above button menu Button Add Key new Menu button Add Key Iterator trapped Key Itr Key Sequence Text TRAPPED KEYS iterator while trapped Key Itr has Next final Key Stroke trapped Key Key Stroke trapped Key Itr next  createBasicTab TabFolder setLayout GridLayout GridData gridData GridData GridData FILL_BOTH setLayoutData gridData compositeKeyConfiguration GridLayout gridLayout GridLayout gridLayout numColumns compositeKeyConfiguration setLayout gridLayout gridData GridData GridData FILL_HORIZONTAL compositeKeyConfiguration setLayoutData gridData labelKeyConfiguration compositeKeyConfiguration labelKeyConfiguration setText translateString RESOURCE_BUNDLE labelKeyConfiguration comboKeyConfiguration compositeKeyConfiguration READ_ONLY gridData GridData gridData widthHint comboKeyConfiguration setLayoutData gridData comboKeyConfiguration addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectionEvent selectedComboKeyConfiguration labelKeyConfigurationExtends compositeKeyConfiguration gridData GridData GridData FILL_HORIZONTAL labelKeyConfigurationExtends setLayoutData gridData gridData GridData gridData heightHint gridData widthHint setLayoutData gridData groupCommand SHADOW_NONE gridLayout GridLayout gridLayout numColumns groupCommand setLayout gridLayout gridData GridData GridData FILL_BOTH groupCommand setLayoutData gridData groupCommand setText translateString RESOURCE_BUNDLE groupCommand labelCategory groupCommand gridData GridData labelCategory setLayoutData gridData labelCategory setText translateString RESOURCE_BUNDLE labelCategory comboCategory groupCommand READ_ONLY gridData GridData gridData horizontalSpan gridData widthHint comboCategory setLayoutData gridData comboCategory addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectionEvent selectedComboCategory labelCommand groupCommand gridData GridData labelCommand setLayoutData gridData labelCommand setText translateString RESOURCE_BUNDLE labelCommand comboCommand groupCommand READ_ONLY gridData GridData gridData horizontalSpan gridData widthHint comboCommand setLayoutData gridData comboCommand addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectionEvent selectedComboCommand labelAssignmentsForCommand groupCommand gridData GridData GridData VERTICAL_ALIGN_BEGINNING gridData verticalAlignment GridData FILL_VERTICAL labelAssignmentsForCommand setLayoutData gridData labelAssignmentsForCommand setText translateString RESOURCE_BUNDLE labelAssignmentsForCommand tableAssignmentsForCommand groupCommand FULL_SELECTION H_SCROLL V_SCROLL tableAssignmentsForCommand setHeaderVisible gridData GridData GridData FILL_BOTH gridData heightHint gridData horizontalSpan gridData widthHint getPlatform tableAssignmentsForCommand setLayoutData gridData TableColumn tableColumnDelta TableColumn tableAssignmentsForCommand tableColumnDelta setResizable tableColumnDelta setText ZERO_LENGTH_STRING tableColumnDelta setWidth TableColumn tableColumnContext TableColumn tableAssignmentsForCommand tableColumnContext setResizable tableColumnContext setText translateString RESOURCE_BUNDLE tableColumnContext tableColumnContext tableColumnContext setWidth TableColumn tableColumnKeySequence TableColumn tableAssignmentsForCommand tableColumnKeySequence setResizable tableColumnKeySequence setText translateString RESOURCE_BUNDLE tableColumnKeySequence tableColumnKeySequence tableColumnKeySequence setWidth tableAssignmentsForCommand addMouseListener MouseAdapter mouseDoubleClick MouseEvent mouseEvent doubleClickedAssignmentsForCommand tableAssignmentsForCommand addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectionEvent selectedTableAssignmentsForCommand groupKeySequence SHADOW_NONE gridLayout GridLayout gridLayout numColumns groupKeySequence setLayout gridLayout gridData GridData GridData FILL_BOTH groupKeySequence setLayoutData gridData groupKeySequence setText translateString RESOURCE_BUNDLE groupKeySequence labelKeySequence groupKeySequence gridData GridData labelKeySequence setLayoutData gridData labelKeySequence setText translateString RESOURCE_BUNDLE labelKeySequence textKeySequence groupKeySequence KeySequenceText textKeySequence setFont groupKeySequence getFont gridData GridData gridData horizontalSpan gridData widthHint textKeySequence setLayoutData gridData textKeySequence addModifyListener ModifyListener modifyText ModifyEvent modifiedTextKeySequence textKeySequence addFocusListener FocusListener FocusListener focusGained FocusEvent focusGained FocusEvent getWorkbench getContextSupport setKeyFilterEnabled FocusListener focusLost FocusEvent focusLost FocusEvent getWorkbench getContextSupport setKeyFilterEnabled textKeySequenceManager KeySequenceText textKeySequence textKeySequenceManager setKeyStrokeLimit buttonAddKey groupKeySequence buttonAddKey setToolTipText translateString RESOURCE_BUNDLE buttonAddKey ToolTipText gridData GridData gridData heightHint comboCategory getTextHeight buttonAddKey setLayoutData gridData buttonAddKey addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectionEvent buttonLocation buttonAddKey getLocation buttonLocation groupKeySequence toDisplay buttonLocation buttonLocation buttonSize buttonAddKey getSize menuButtonAddKey setLocation buttonLocation buttonLocation buttonSize menuButtonAddKey setVisible tabStops groupKeySequence getTabList ArrayList newTabStops ArrayList tabStops tabStop tabStops newTabStops tabStop textKeySequence tabStop newTabStops buttonAddKey newTabStopArray newTabStops toArray newTabStops groupKeySequence setTabList newTabStopArray menuButtonAddKey buttonAddKey trappedKeyItr KeySequenceText TRAPPED_KEYS trappedKeyItr hasNext KeyStroke trappedKey KeyStroke trappedKeyItr
protected Control create Contents Composite parent Initialize the minus colour minus Colour get Shell get Display get System Color SWT COLOR WIDGET NORMAL SHADOW final Tab Folder tab Folder new Tab Folder parent SWT NULL Basic tab final Tab Item basic Tab new Tab Item tab Folder SWT NULL basic Tab set Text Util translate String RESOURCE BUNDLE basic Tab Text NON NLS 1 basic Tab set Control create Basic Tab tab Folder Advanced tab final Tab Item advanced Tab new Tab Item tab Folder SWT NULL advanced Tab set Text Util translate String RESOURCE BUNDLE advanced Tab Text NON NLS 1 advanced Tab set Control create Advanced Tab tab Folder apply Dialog Font tab Folder return tab Folder  createContents minusColour getShell getDisplay getSystemColor COLOR_WIDGET_NORMAL_SHADOW TabFolder tabFolder TabFolder TabItem basicTab TabItem tabFolder basicTab setText translateString RESOURCE_BUNDLE basicTab basicTab setControl createBasicTab tabFolder TabItem advancedTab TabItem tabFolder advancedTab setText translateString RESOURCE_BUNDLE advancedTab advancedTab setControl createAdvancedTab tabFolder applyDialogFont tabFolder tabFolder
protected I Preference Store do Get Preference Store return PlatformUI get Workbench get Preference Store  IPreferenceStore doGetPreferenceStore getWorkbench getPreferenceStore
private void double Clicked Assignments For Command update  doubleClickedAssignmentsForCommand
private void double Clicked Table Assignments For Key Sequence update  doubleClickedTableAssignmentsForKeySequence
private String get Category Id return command Ids By Category Id contains Key null combo Category get Selection Index 0 String category Ids By Unique Name get combo Category get Text null  getCategoryId commandIdsByCategoryId containsKey comboCategory getSelectionIndex categoryIdsByUniqueName comboCategory getText
private String get Command Id return String command Ids By Unique Name get combo Command get Text  getCommandId commandIdsByUniqueName comboCommand getText
private String get Context Id return combo Context get Selection Index 0 String context Ids By Unique Name get combo Context get Text null  getContextId comboContext getSelectionIndex contextIdsByUniqueName comboContext getText
private String get Key Configuration Id return combo Key Configuration get Selection Index 0 String key Configuration Ids By Unique Name get combo Key Configuration get Text null  getKeyConfigurationId comboKeyConfiguration getSelectionIndex keyConfigurationIdsByUniqueName comboKeyConfiguration getText
private Key Sequence get Key Sequence return text Key Sequence Manager get Key Sequence  KeySequence getKeySequence textKeySequenceManager getKeySequence
public void init I Workbench workbench I Workbench Context Support workbench Context Support workbench get Context Support context Manager workbench Context Support get Context Manager TODO remove blind cast command Manager Mutable Command Manager workbench get Command Support get Command Manager command Assignments new Tree Set key Sequence Assignments new Tree Set  IWorkbench IWorkbenchContextSupport workbenchContextSupport getContextSupport contextManager workbenchContextSupport getContextManager commandManager MutableCommandManager getCommandSupport getCommandManager commandAssignments TreeSet keySequenceAssignments TreeSet
private void modified Text Key Sequence update  modifiedTextKeySequence
protected void perform Defaults String active Key Configuration Id get Key Configuration Id List preference Key Sequence Binding Definitions new Array List Key Sequence Binding Node get Key Sequence Binding Definitions tree Key Sequence get Instance 0 preference Key Sequence Binding Definitions if active Key Configuration Id null preference Key Sequence Binding Definitions is Empty final String title Util translate String RESOURCE BUNDLE restore Defaults Message Box Text NON NLS 1 final String message Util translate String RESOURCE BUNDLE restore Defaults Message Box Message NON NLS 1 final boolean confirmed Message Dialog open Confirm get Shell title message if confirmed set Key Configuration Id I Workbench Constants DEFAULT ACCELERATOR CONFIGURATION ID Iterator iterator preference Key Sequence Binding Definitions iterator while iterator has Next Key Sequence Binding Definition key Sequence Binding Definition Key Sequence Binding Definition iterator next Key Sequence Binding Node remove tree key Sequence Binding Definition get Key Sequence key Sequence Binding Definition get Context Id key Sequence Binding Definition get Key Configuration Id 0 key Sequence Binding Definition get Platform key Sequence Binding Definition get Locale key Sequence Binding Definition get Command Id Set the defaults on the advanced tab I Preference Store store get Preference Store check Box Multi Key Assist set Selection store get Default Boolean I Preference Constants MULTI KEY ASSIST text Multi Key Assist Time set String Value Integer to String store get Default Int I Preference Constants MULTI KEY ASSIST TIME update  performDefaults activeKeyConfigurationId getKeyConfigurationId preferenceKeySequenceBindingDefinitions ArrayList KeySequenceBindingNode getKeySequenceBindingDefinitions KeySequence getInstance preferenceKeySequenceBindingDefinitions activeKeyConfigurationId preferenceKeySequenceBindingDefinitions isEmpty translateString RESOURCE_BUNDLE restoreDefaultsMessageBoxText translateString RESOURCE_BUNDLE restoreDefaultsMessageBoxMessage MessageDialog openConfirm getShell setKeyConfigurationId IWorkbenchConstants DEFAULT_ACCELERATOR_CONFIGURATION_ID preferenceKeySequenceBindingDefinitions hasNext KeySequenceBindingDefinition keySequenceBindingDefinition KeySequenceBindingDefinition KeySequenceBindingNode keySequenceBindingDefinition getKeySequence keySequenceBindingDefinition getContextId keySequenceBindingDefinition getKeyConfigurationId keySequenceBindingDefinition getPlatform keySequenceBindingDefinition getLocale keySequenceBindingDefinition getCommandId IPreferenceStore getPreferenceStore checkBoxMultiKeyAssist setSelection getDefaultBoolean IPreferenceConstants MULTI_KEY_ASSIST textMultiKeyAssistTime setStringValue toString getDefaultInt IPreferenceConstants MULTI_KEY_ASSIST_TIME
public boolean perform Ok List preference Active Key Configuration Definitions new Array List preference Active Key Configuration Definitions add new Active Key Configuration Definition get Key Configuration Id null Preference Command Registry preference Command Registry Preference Command Registry command Manager get Mutable Command Registry preference Command Registry set Active Key Configuration Definitions preference Active Key Configuration Definitions List preference Key Sequence Binding Definitions new Array List Key Sequence Binding Node get Key Sequence Binding Definitions tree Key Sequence get Instance 0 preference Key Sequence Binding Definitions preference Command Registry set Key Sequence Binding Definitions preference Key Sequence Binding Definitions try preference Command Registry save catch IO Exception eIO Do nothing Save the advanced settings I Preference Store store get Preference Store store set Value I Preference Constants MULTI KEY ASSIST check Box Multi Key Assist get Selection store set Value I Preference Constants MULTI KEY ASSIST TIME text Multi Key Assist Time get Int Value return super perform Ok  performOk preferenceActiveKeyConfigurationDefinitions ArrayList preferenceActiveKeyConfigurationDefinitions ActiveKeyConfigurationDefinition getKeyConfigurationId PreferenceCommandRegistry preferenceCommandRegistry PreferenceCommandRegistry commandManager getMutableCommandRegistry preferenceCommandRegistry setActiveKeyConfigurationDefinitions preferenceActiveKeyConfigurationDefinitions preferenceKeySequenceBindingDefinitions ArrayList KeySequenceBindingNode getKeySequenceBindingDefinitions KeySequence getInstance preferenceKeySequenceBindingDefinitions preferenceCommandRegistry setKeySequenceBindingDefinitions preferenceKeySequenceBindingDefinitions preferenceCommandRegistry IOException IPreferenceStore getPreferenceStore setValue IPreferenceConstants MULTI_KEY_ASSIST checkBoxMultiKeyAssist getSelection setValue IPreferenceConstants MULTI_KEY_ASSIST_TIME textMultiKeyAssistTime getIntValue performOk
private void select Assignment For Command String context Id if table Assignments For Command get Selection Count 1 table Assignments For Command deselect All int i 0 int selection 1 Key Sequence key Sequence get Key Sequence for Iterator iterator command Assignments iterator iterator has Next i Command Assignment command Assignment Command Assignment iterator next if Util equals context Id command Assignment context Id Util equals key Sequence command Assignment key Sequence selection i break if selection table Assignments For Command get Selection Index if selection 1 selection table Assignments For Command get Item Count table Assignments For Command deselect All else table Assignments For Command select selection  selectAssignmentForCommand contextId tableAssignmentsForCommand getSelectionCount tableAssignmentsForCommand deselectAll KeySequence keySequence getKeySequence commandAssignments hasNext CommandAssignment commandAssignment CommandAssignment contextId commandAssignment contextId keySequence commandAssignment keySequence tableAssignmentsForCommand getSelectionIndex tableAssignmentsForCommand getItemCount tableAssignmentsForCommand deselectAll tableAssignmentsForCommand
private void select Assignment For Key Sequence String context Id if table Assignments For Key Sequence get Selection Count 1 table Assignments For Key Sequence deselect All int i 0 int selection 1 for Iterator iterator key Sequence Assignments iterator iterator has Next i Key Sequence Assignment key Sequence Assignment Key Sequence Assignment iterator next if Util equals context Id key Sequence Assignment context Id selection i break if selection table Assignments For Key Sequence get Selection Index if selection 1 selection table Assignments For Key Sequence get Item Count table Assignments For Key Sequence deselect All else table Assignments For Key Sequence select selection  selectAssignmentForKeySequence contextId tableAssignmentsForKeySequence getSelectionCount tableAssignmentsForKeySequence deselectAll keySequenceAssignments hasNext KeySequenceAssignment keySequenceAssignment KeySequenceAssignment contextId keySequenceAssignment contextId tableAssignmentsForKeySequence getSelectionIndex tableAssignmentsForKeySequence getItemCount tableAssignmentsForKeySequence deselectAll tableAssignmentsForKeySequence
private void selected Button Add String command Id get Command Id String context Id get Context Id String key Configuration Id get Key Configuration Id Key Sequence key Sequence get Key Sequence Key Sequence Binding Node remove tree key Sequence context Id key Configuration Id 0 null null Key Sequence Binding Node add tree key Sequence context Id key Configuration Id 0 null null command Id List preference Key Sequence Binding Definitions new Array List Key Sequence Binding Node get Key Sequence Binding Definitions tree Key Sequence get Instance 0 preference Key Sequence Binding Definitions update  selectedButtonAdd commandId getCommandId contextId getContextId keyConfigurationId getKeyConfigurationId KeySequence keySequence getKeySequence KeySequenceBindingNode keySequence contextId keyConfigurationId KeySequenceBindingNode keySequence contextId keyConfigurationId commandId preferenceKeySequenceBindingDefinitions ArrayList KeySequenceBindingNode getKeySequenceBindingDefinitions KeySequence getInstance preferenceKeySequenceBindingDefinitions
private void selected Button Remove String context Id get Context Id String key Configuration Id get Key Configuration Id Key Sequence key Sequence get Key Sequence Key Sequence Binding Node remove tree key Sequence context Id key Configuration Id 0 null null Key Sequence Binding Node add tree key Sequence context Id key Configuration Id 0 null null null List preference Key Sequence Binding Definitions new Array List Key Sequence Binding Node get Key Sequence Binding Definitions tree Key Sequence get Instance 0 preference Key Sequence Binding Definitions update  selectedButtonRemove contextId getContextId keyConfigurationId getKeyConfigurationId KeySequence keySequence getKeySequence KeySequenceBindingNode keySequence contextId keyConfigurationId KeySequenceBindingNode keySequence contextId keyConfigurationId preferenceKeySequenceBindingDefinitions ArrayList KeySequenceBindingNode getKeySequenceBindingDefinitions KeySequence getInstance preferenceKeySequenceBindingDefinitions
private void selected Button Restore String context Id get Context Id String key Configuration Id get Key Configuration Id Key Sequence key Sequence get Key Sequence Key Sequence Binding Node remove tree key Sequence context Id key Configuration Id 0 null null List preference Key Sequence Binding Definitions new Array List Key Sequence Binding Node get Key Sequence Binding Definitions tree Key Sequence get Instance 0 preference Key Sequence Binding Definitions update  selectedButtonRestore contextId getContextId keyConfigurationId getKeyConfigurationId KeySequence keySequence getKeySequence KeySequenceBindingNode keySequence contextId keyConfigurationId preferenceKeySequenceBindingDefinitions ArrayList KeySequenceBindingNode getKeySequenceBindingDefinitions KeySequence getInstance preferenceKeySequenceBindingDefinitions
private void selected Combo Category update  selectedComboCategory
private void selected Combo Command update  selectedComboCommand
private void selected Combo Context update  selectedComboContext
private void selected Combo Key Configuration update  selectedComboKeyConfiguration
private void selected Table Assignments For Command int selection table Assignments For Command get Selection Index List command Assignments As List new Array List command Assignments if selection 0 selection command Assignments As List size table Assignments For Command get Selection Count 1 Command Assignment command Assignment Command Assignment command Assignments As List get selection String context Id command Assignment context Id Key Sequence key Sequence command Assignment key Sequence set Context Id context Id set Key Sequence key Sequence update  selectedTableAssignmentsForCommand tableAssignmentsForCommand getSelectionIndex commandAssignmentsAsList ArrayList commandAssignments commandAssignmentsAsList tableAssignmentsForCommand getSelectionCount CommandAssignment commandAssignment CommandAssignment commandAssignmentsAsList contextId commandAssignment contextId KeySequence keySequence commandAssignment keySequence setContextId contextId setKeySequence keySequence
private void selected Table Assignments For Key Sequence int selection table Assignments For Key Sequence get Selection Index List key Sequence Assignments As List new Array List key Sequence Assignments if selection 0 selection key Sequence Assignments As List size table Assignments For Key Sequence get Selection Count 1 Key Sequence Assignment key Sequence Assignment Key Sequence Assignment key Sequence Assignments As List get selection String context Id key Sequence Assignment context Id set Context Id context Id update  selectedTableAssignmentsForKeySequence tableAssignmentsForKeySequence getSelectionIndex keySequenceAssignmentsAsList ArrayList keySequenceAssignments keySequenceAssignmentsAsList tableAssignmentsForKeySequence getSelectionCount KeySequenceAssignment keySequenceAssignment KeySequenceAssignment keySequenceAssignmentsAsList contextId keySequenceAssignment contextId setContextId contextId
private void set Assignments For Command command Assignments clear String command Id get Command Id for Iterator iterator assignments By Context Id By Key Sequence entry Set iterator iterator has Next Map Entry entry Map Entry iterator next Key Sequence key Sequence Key Sequence entry get Key Map assignments By Context Id Map entry get Value if assignments By Context Id null for Iterator iterator2 assignments By Context Id entry Set iterator iterator2 has Next Map Entry entry2 Map Entry iterator2 next Command Assignment command Assignment new Command Assignment command Assignment assignment Key Sequence Binding Node Assignment entry2 get Value command Assignment context Id String entry2 get Key command Assignment key Sequence key Sequence if command Assignment assignment contains command Id command Assignments add command Assignment build Command Assignments Table  setAssignmentsForCommand commandAssignments commandId getCommandId assignmentsByContextIdByKeySequence entrySet hasNext KeySequence keySequence KeySequence getKey assignmentsByContextId getValue assignmentsByContextId assignmentsByContextId entrySet hasNext CommandAssignment commandAssignment CommandAssignment commandAssignment KeySequenceBindingNode getValue commandAssignment contextId getKey commandAssignment keySequence keySequence commandAssignment commandId commandAssignments commandAssignment buildCommandAssignmentsTable
private void set Assignments For Key Sequence key Sequence Assignments clear Key Sequence key Sequence get Key Sequence Map assignments By Context Id Map assignments By Context Id By Key Sequence get key Sequence if assignments By Context Id null for Iterator iterator assignments By Context Id entry Set iterator iterator has Next Map Entry entry Map Entry iterator next Key Sequence Assignment key Sequence Assignment new Key Sequence Assignment key Sequence Assignment assignment Key Sequence Binding Node Assignment entry get Value key Sequence Assignment context Id String entry get Key key Sequence Assignments add key Sequence Assignment build Key Sequence Assignments Table  setAssignmentsForKeySequence keySequenceAssignments KeySequence keySequence getKeySequence assignmentsByContextId assignmentsByContextIdByKeySequence keySequence assignmentsByContextId assignmentsByContextId entrySet hasNext KeySequenceAssignment keySequenceAssignment KeySequenceAssignment keySequenceAssignment KeySequenceBindingNode getValue keySequenceAssignment contextId getKey keySequenceAssignments keySequenceAssignment buildKeySequenceAssignmentsTable
private void set Command Id String command Id combo Command clear Selection combo Command deselect All String command Unique Name String command Unique Names By Id get command Id if command Unique Name null String items combo Command get Items for int i 0 i items length i if command Unique Name equals items i combo Command select i break  setCommandId commandId comboCommand clearSelection comboCommand deselectAll commandUniqueName commandUniqueNamesById commandId commandUniqueName comboCommand getItems commandUniqueName comboCommand
private void set Commands For Category String category Id get Category Id String command Id get Command Id Set command Ids Set command Ids By Category Id get category Id Map command Ids By Name new Hash Map command Ids By Unique Name if command Ids null command Ids By Name new Hash Map else command Ids By Name values retain All command Ids List command Names new Array List command Ids By Name key Set Collections sort command Names Collator get Instance combo Command set Items String command Names to Array new String command Names size set Command Id command Id if combo Command get Selection Index 1 command Names is Empty combo Command select 0  setCommandsForCategory categoryId getCategoryId commandId getCommandId commandIds commandIdsByCategoryId categoryId commandIdsByName HashMap commandIdsByUniqueName commandIds commandIdsByName HashMap commandIdsByName retainAll commandIds commandNames ArrayList commandIdsByName keySet commandNames getInstance comboCommand setItems commandNames toArray commandNames setCommandId commandId comboCommand getSelectionIndex commandNames isEmpty comboCommand
Changes the selected context name in the context combo box The context selected is either the one matching the identifier provided if possible or the default context identifier If no matching name can be found in the combo then the first item is selected param context Id The context identifier for the context to be selected in the combo box may be code null code private void set Context Id String context Id Clear the current selection combo Context clear Selection combo Context deselect All Figure out which name to look for String context Name String context Unique Names By Id get context Id if context Name null context Name String context Unique Names By Id get Key Sequence Binding DEFAULT CONTEXT ID if context Name null context Name Util ZERO LENGTH STRING Scan the list for the selection we re looking for final String items combo Context get Items boolean found false for int i 0 i items length i if context Name equals items i combo Context select i found true break If we didn t find an item then set the first item as selected if found items length 0 combo Context select 0  contextId setContextId contextId comboContext clearSelection comboContext deselectAll contextName contextUniqueNamesById contextId contextName contextName contextUniqueNamesById KeySequenceBinding DEFAULT_CONTEXT_ID contextName contextName ZERO_LENGTH_STRING comboContext getItems contextName comboContext comboContext
private void set Contexts For Command String command Id get Command Id String context Id get Context Id Map context Ids By Name new Hash Map context Ids By Unique Name List context Names new Array List context Ids By Name key Set Collections sort context Names Collator get Instance combo Context set Items String context Names to Array new String context Names size set Context Id context Id if combo Context get Selection Index 1 context Names is Empty combo Context select 0  setContextsForCommand commandId getCommandId contextId getContextId contextIdsByName HashMap contextIdsByUniqueName contextNames ArrayList contextIdsByName keySet contextNames getInstance comboContext setItems contextNames toArray contextNames setContextId contextId comboContext getSelectionIndex contextNames isEmpty comboContext
private void set Key Configuration Id String key Configuration Id combo Key Configuration clear Selection combo Key Configuration deselect All String key Configuration Unique Name String key Configuration Unique Names By Id get key Configuration Id if key Configuration Unique Name null String items combo Key Configuration get Items for int i 0 i items length i if key Configuration Unique Name equals items i combo Key Configuration select i break  setKeyConfigurationId keyConfigurationId comboKeyConfiguration clearSelection comboKeyConfiguration deselectAll keyConfigurationUniqueName keyConfigurationUniqueNamesById keyConfigurationId keyConfigurationUniqueName comboKeyConfiguration getItems keyConfigurationUniqueName comboKeyConfiguration
private void set Key Sequence Key Sequence key Sequence text Key Sequence Manager set Key Sequence key Sequence  setKeySequence KeySequence keySequence textKeySequenceManager setKeySequence keySequence
public void set Visible boolean visible if visible true Map contexts By Name new Hash Map for Iterator iterator context Manager get Defined Context Ids iterator iterator has Next I Context context context Manager get Context String iterator next try String name context get Name Collection contexts Collection contexts By Name get name if contexts null contexts new Hash Set contexts By Name put name contexts contexts add context catch org eclipse ui contexts Not Defined Exception e Not Defined Do nothing Map categories By Name new Hash Map for Iterator iterator command Manager get Defined Category Ids iterator iterator has Next I Category category command Manager get Category String iterator next try String name category get Name Collection categories Collection categories By Name get name if categories null categories new Hash Set categories By Name put name categories categories add category catch org eclipse ui commands Not Defined Exception e Not Defined Do nothing Map commands By Name new Hash Map for Iterator iterator command Manager get Defined Command Ids iterator iterator has Next I Command command command Manager get Command String iterator next try String name command get Name Collection commands Collection commands By Name get name if commands null commands new Hash Set commands By Name put name commands commands add command catch org eclipse ui commands Not Defined Exception e Not Defined Do nothing Map key Configurations By Name new Hash Map for Iterator iterator command Manager get Defined Key Configuration Ids iterator iterator has Next I Key Configuration key Configuration command Manager get Key Configuration String iterator next try String name key Configuration get Name Collection key Configurations Collection key Configurations By Name get name if key Configurations null key Configurations new Hash Set key Configurations By Name put name key Configurations key Configurations add key Configuration catch org eclipse ui commands Not Defined Exception e Not Defined Do nothing context Ids By Unique Name new Hash Map context Unique Names By Id new Hash Map for Iterator iterator contexts By Name entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String name String entry get Key Set contexts Set entry get Value Iterator iterator2 contexts iterator if contexts size 1 I Context context I Context iterator2 next context Ids By Unique Name put name context get Id context Unique Names By Id put context get Id name else while iterator2 has Next I Context context I Context iterator2 next String unique Name Message Format format Util translate String RESOURCE BUNDLE unique Name new Object name NON NLS 1 context get Id context Ids By Unique Name put unique Name context get Id context Unique Names By Id put context get Id unique Name category Ids By Unique Name new Hash Map category Unique Names By Id new Hash Map for Iterator iterator categories By Name entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String name String entry get Key Set categories Set entry get Value Iterator iterator2 categories iterator if categories size 1 I Category category I Category iterator2 next category Ids By Unique Name put name category get Id category Unique Names By Id put category get Id name else while iterator2 has Next I Category category I Category iterator2 next String unique Name Message Format format Util translate String RESOURCE BUNDLE unique Name new Object name NON NLS 1 category get Id category Ids By Unique Name put unique Name category get Id category Unique Names By Id put category get Id unique Name command Ids By Unique Name new Hash Map command Unique Names By Id new Hash Map for Iterator iterator commands By Name entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String name String entry get Key Set commands Set entry get Value Iterator iterator2 commands iterator if commands size 1 I Command command I Command iterator2 next command Ids By Unique Name put name command get Id command Unique Names By Id put command get Id name else while iterator2 has Next I Command command I Command iterator2 next String unique Name Message Format format Util translate String RESOURCE BUNDLE unique Name new Object name NON NLS 1 command get Id command Ids By Unique Name put unique Name command get Id command Unique Names By Id put command get Id unique Name key Configuration Ids By Unique Name new Hash Map key Configuration Unique Names By Id new Hash Map for Iterator iterator key Configurations By Name entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String name String entry get Key Set key Configurations Set entry get Value Iterator iterator2 key Configurations iterator if key Configurations size 1 I Key Configuration key Configuration I Key Configuration iterator2 next key Configuration Ids By Unique Name put name key Configuration get Id key Configuration Unique Names By Id put key Configuration get Id name else while iterator2 has Next I Key Configuration key Configuration I Key Configuration iterator2 next String unique Name Message Format format Util translate String RESOURCE BUNDLE unique Name new Object name NON NLS 1 key Configuration get Id key Configuration Ids By Unique Name put unique Name key Configuration get Id key Configuration Unique Names By Id put key Configuration get Id unique Name String active Key Configuration Id command Manager get Active Key Configuration Id command Ids By Category Id new Hash Map for Iterator iterator command Manager get Defined Command Ids iterator iterator has Next I Command command command Manager get Command String iterator next try String category Id command get Category Id Collection command Ids Collection command Ids By Category Id  setVisible contextsByName HashMap contextManager getDefinedContextIds hasNext IContext contextManager getContext getName contextsByName HashSet contextsByName NotDefinedException eNotDefined categoriesByName HashMap commandManager getDefinedCategoryIds hasNext ICategory commandManager getCategory getName categoriesByName HashSet categoriesByName NotDefinedException eNotDefined commandsByName HashMap commandManager getDefinedCommandIds hasNext ICommand commandManager getCommand getName commandsByName HashSet commandsByName NotDefinedException eNotDefined keyConfigurationsByName HashMap commandManager getDefinedKeyConfigurationIds hasNext IKeyConfiguration keyConfiguration commandManager getKeyConfiguration keyConfiguration getName keyConfigurations keyConfigurationsByName keyConfigurations keyConfigurations HashSet keyConfigurationsByName keyConfigurations keyConfigurations keyConfiguration NotDefinedException eNotDefined contextIdsByUniqueName HashMap contextUniqueNamesById HashMap contextsByName entrySet hasNext getKey getValue IContext IContext contextIdsByUniqueName getId contextUniqueNamesById getId hasNext IContext IContext uniqueName MessageFormat translateString RESOURCE_BUNDLE uniqueName getId contextIdsByUniqueName uniqueName getId contextUniqueNamesById getId uniqueName categoryIdsByUniqueName HashMap categoryUniqueNamesById HashMap categoriesByName entrySet hasNext getKey getValue ICategory ICategory categoryIdsByUniqueName getId categoryUniqueNamesById getId hasNext ICategory ICategory uniqueName MessageFormat translateString RESOURCE_BUNDLE uniqueName getId categoryIdsByUniqueName uniqueName getId categoryUniqueNamesById getId uniqueName commandIdsByUniqueName HashMap commandUniqueNamesById HashMap commandsByName entrySet hasNext getKey getValue ICommand ICommand commandIdsByUniqueName getId commandUniqueNamesById getId hasNext ICommand ICommand uniqueName MessageFormat translateString RESOURCE_BUNDLE uniqueName getId commandIdsByUniqueName uniqueName getId commandUniqueNamesById getId uniqueName keyConfigurationIdsByUniqueName HashMap keyConfigurationUniqueNamesById HashMap keyConfigurationsByName entrySet hasNext getKey keyConfigurations getValue keyConfigurations keyConfigurations IKeyConfiguration keyConfiguration IKeyConfiguration keyConfigurationIdsByUniqueName keyConfiguration getId keyConfigurationUniqueNamesById keyConfiguration getId hasNext IKeyConfiguration keyConfiguration IKeyConfiguration uniqueName MessageFormat translateString RESOURCE_BUNDLE uniqueName keyConfiguration getId keyConfigurationIdsByUniqueName uniqueName keyConfiguration getId keyConfigurationUniqueNamesById keyConfiguration getId uniqueName activeKeyConfigurationId commandManager getActiveKeyConfigurationId commandIdsByCategoryId HashMap commandManager getDefinedCommandIds hasNext ICommand commandManager getCommand categoryId getCategoryId commandIds commandIdsByCategoryId
private void update set Commands For Category set Contexts For Command String key Configuration Id get Key Configuration Id Key Sequence key Sequence get Key Sequence String active Key Configuration Ids Mutable Command Manager extend command Manager get Key Configuration Ids key Configuration Id String active Locales Mutable Command Manager extend Mutable Command Manager get Path command Manager get Active Locale Mutable Command Manager SEPARATOR String active Platforms Mutable Command Manager extend Mutable Command Manager get Path command Manager get Active Platform Mutable Command Manager SEPARATOR Key Sequence Binding Node solve tree active Key Configuration Ids active Platforms active Locales assignments By Context Id By Key Sequence Key Sequence Binding Node get Assignments By Context Id Key Sequence tree Key Sequence get Instance set Assignments For Key Sequence set Assignments For Command String command Id get Command Id String context Id get Context Id select Assignment For Key Sequence context Id select Assignment For Command context Id update Label Key Configuration Extends update Label Context Extends label Assignments For Key Sequence set Enabled key Sequence null key Sequence get Key Strokes is Empty table Assignments For Key Sequence set Enabled key Sequence null key Sequence get Key Strokes is Empty label Assignments For Command set Enabled command Id null table Assignments For Command set Enabled command Id null boolean buttons Enabled command Id null key Sequence null key Sequence get Key Strokes is Empty boolean button Add Enabled buttons Enabled boolean button Remove Enabled buttons Enabled boolean button Restore Enabled buttons Enabled TODO better button enablement button Add set Enabled button Add Enabled button Remove set Enabled button Remove Enabled button Restore set Enabled button Restore Enabled  setCommandsForCategory setContextsForCommand keyConfigurationId getKeyConfigurationId KeySequence keySequence getKeySequence activeKeyConfigurationIds MutableCommandManager commandManager getKeyConfigurationIds keyConfigurationId activeLocales MutableCommandManager MutableCommandManager getPath commandManager getActiveLocale MutableCommandManager activePlatforms MutableCommandManager MutableCommandManager getPath commandManager getActivePlatform MutableCommandManager KeySequenceBindingNode activeKeyConfigurationIds activePlatforms activeLocales assignmentsByContextIdByKeySequence KeySequenceBindingNode getAssignmentsByContextIdKeySequence KeySequence getInstance setAssignmentsForKeySequence setAssignmentsForCommand commandId getCommandId contextId getContextId selectAssignmentForKeySequence contextId selectAssignmentForCommand contextId updateLabelKeyConfigurationExtends updateLabelContextExtends labelAssignmentsForKeySequence setEnabled keySequence keySequence getKeyStrokes isEmpty tableAssignmentsForKeySequence setEnabled keySequence keySequence getKeyStrokes isEmpty labelAssignmentsForCommand setEnabled commandId tableAssignmentsForCommand setEnabled commandId buttonsEnabled commandId keySequence keySequence getKeyStrokes isEmpty buttonAddEnabled buttonsEnabled buttonRemoveEnabled buttonsEnabled buttonRestoreEnabled buttonsEnabled buttonAdd setEnabled buttonAddEnabled buttonRemove setEnabled buttonRemoveEnabled buttonRestore setEnabled buttonRestoreEnabled
private void update Label Context Extends String context Id get Context Id if context Id null I Context context context Manager get Context get Context Id if context is Defined try String parent Id context get Parent Id if parent Id null String name String context Unique Names By Id get parent Id if name null label Context Extends set Text Message Format format Util translate String RESOURCE BUNDLE extends NON NLS 1 new Object name return catch org eclipse ui contexts Not Defined Exception e Not Defined Do nothing label Context Extends set Text Util ZERO LENGTH STRING  updateLabelContextExtends contextId getContextId contextId IContext contextManager getContext getContextId isDefined parentId getParentId parentId contextUniqueNamesById parentId labelContextExtends setText MessageFormat translateString RESOURCE_BUNDLE NotDefinedException eNotDefined labelContextExtends setText ZERO_LENGTH_STRING
private void update Label Key Configuration Extends String key Configuration Id get Key Configuration Id if key Configuration Id null I Key Configuration key Configuration command Manager get Key Configuration key Configuration Id try String name String key Configuration Unique Names By Id get key Configuration get Parent Id if name null label Key Configuration Extends set Text Message Format format Util translate String RESOURCE BUNDLE extends NON NLS 1 new Object name return catch org eclipse ui commands Not Defined Exception e Not Defined Do nothing label Key Configuration Extends set Text Util ZERO LENGTH STRING  updateLabelKeyConfigurationExtends keyConfigurationId getKeyConfigurationId keyConfigurationId IKeyConfiguration keyConfiguration commandManager getKeyConfiguration keyConfigurationId keyConfigurationUniqueNamesById keyConfiguration getParentId labelKeyConfigurationExtends setText MessageFormat translateString RESOURCE_BUNDLE NotDefinedException eNotDefined labelKeyConfigurationExtends setText ZERO_LENGTH_STRING

Match String command Id int value if value 0 throw new Illegal Argument Exception this command Id command Id this value value  commandId IllegalArgumentException commandId commandId
public int compare To Object object Match casted Object Match object int compare To Util compare value casted Object value if compare To 0 compare To Util compare command Id casted Object command Id return compare To  compareTo castedObject compareTo castedObject compareTo compareTo commandId castedObject commandId compareTo
public boolean equals Object object if object instanceof Match return false Match casted Object Match object boolean equals true equals Util equals command Id casted Object command Id equals Util equals value casted Object value return equals  castedObject commandId castedObject commandId castedObject
public String get Command Id return command Id  getCommandId commandId
public int get Value return value  getValue
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code command Id hash Code hash Code HASH FACTOR Util hash Code value hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode commandId hashCode hashCode HASH_FACTOR hashCode hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append command Id string Buffer append string Buffer append value string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer commandId stringBuffer stringBuffer stringBuffer stringBuffer toString

static String extend String strings String strings2 new String strings length 1 System arraycopy strings 0 strings2 0 strings length return strings2 
static String get Path String string String separator if string null separator null return new String 0 List strings new Array List String Buffer string Buffer new String Buffer string string trim if string length 0 String Tokenizer string Tokenizer new String Tokenizer string separator while string Tokenizer has More Elements if string Buffer length 0 string Buffer append separator string Buffer append String string Tokenizer next Element trim strings add string Buffer to String Collections reverse strings strings add Util ZERO LENGTH STRING return String strings to Array new String strings size  getPath ArrayList StringBuffer stringBuffer StringBuffer StringTokenizer stringTokenizer StringTokenizer stringTokenizer hasMoreElements stringBuffer stringBuffer stringBuffer stringTokenizer nextElement stringBuffer toString ZERO_LENGTH_STRING toArray
static boolean is Key Configuration Definition Child Of String ancestor String id Map key Configuration Definitions By Id Collection visited new Hash Set while id null visited contains id Key Configuration Definition key Configuration Definition Key Configuration Definition key Configuration Definitions By Id get id visited add id if key Configuration Definition null Util equals id key Configuration Definition get Parent Id ancestor return true return false  isKeyConfigurationDefinitionChildOf keyConfigurationDefinitionsById HashSet KeyConfigurationDefinition keyConfigurationDefinition KeyConfigurationDefinition keyConfigurationDefinitionsById keyConfigurationDefinition keyConfigurationDefinition getParentId
static boolean validate Key Sequence Key Sequence key Sequence if key Sequence null return false List key Strokes key Sequence get Key Strokes int size key Strokes size if size 0 size 4 key Sequence is Complete return false return true  validateKeySequence KeySequence keySequence keySequence keyStrokes keySequence getKeyStrokes keyStrokes keySequence isComplete
static void validate Key Sequence Binding Definitions Collection key Sequence Binding Definitions Iterator iterator key Sequence Binding Definitions iterator while iterator has Next Key Sequence Binding Definition key Sequence Binding Definition Key Sequence Binding Definition iterator next String key Configuration Id key Sequence Binding Definition get Key Configuration Id Key Sequence key Sequence key Sequence Binding Definition get Key Sequence if key Configuration Id null key Sequence null validate Key Sequence key Sequence iterator remove  validateKeySequenceBindingDefinitions keySequenceBindingDefinitions keySequenceBindingDefinitions hasNext KeySequenceBindingDefinition keySequenceBindingDefinition KeySequenceBindingDefinition keyConfigurationId keySequenceBindingDefinition getKeyConfigurationId KeySequence keySequence keySequenceBindingDefinition getKeySequence keyConfigurationId keySequence validateKeySequence keySequence
TODO review end public Mutable Command Manager this new Extension Command Registry Platform get Extension Registry new Preference Command Registry Workbench Plugin get Default get Preference Store  MutableCommandManager ExtensionCommandRegistry getExtensionRegistry PreferenceCommandRegistry WorkbenchPlugin getDefault getPreferenceStore
this command Registry add Command Registry Listener new I Command Registry Listener public void command Registry Changed Command Registry Event command Registry Event read Registry  commandRegistry addCommandRegistryListener ICommandRegistryListener commandRegistryChanged CommandRegistryEvent commandRegistryEvent readRegistry
this mutable Command Registry add Command Registry Listener new I Command Registry Listener public void command Registry Changed Command Registry Event command Registry Event read Registry  mutableCommandRegistry addCommandRegistryListener ICommandRegistryListener commandRegistryChanged CommandRegistryEvent commandRegistryEvent readRegistry
public Mutable Command Manager I Command Registry command Registry I Mutable Command Registry mutable Command Registry if command Registry null mutable Command Registry null throw new Null Pointer Exception this command Registry command Registry this mutable Command Registry mutable Command Registry String system Locale Locale get Default to String active Locale system Locale null system Locale Util ZERO LENGTH STRING String system Platform SWT get Platform active Platform system Platform null system Platform Util ZERO LENGTH STRING this command Registry add Command Registry Listener new I Command Registry Listener public void command Registry Changed Command Registry Event command Registry Event read Registry this mutable Command Registry add Command Registry Listener new I Command Registry Listener public void command Registry Changed Command Registry Event command Registry Event read Registry read Registry  MutableCommandManager ICommandRegistry commandRegistry IMutableCommandRegistry mutableCommandRegistry commandRegistry mutableCommandRegistry NullPointerException commandRegistry commandRegistry mutableCommandRegistry mutableCommandRegistry systemLocale getDefault toString activeLocale systemLocale systemLocale ZERO_LENGTH_STRING systemPlatform getPlatform activePlatform systemPlatform systemPlatform ZERO_LENGTH_STRING commandRegistry addCommandRegistryListener ICommandRegistryListener commandRegistryChanged CommandRegistryEvent commandRegistryEvent readRegistry mutableCommandRegistry addCommandRegistryListener ICommandRegistryListener commandRegistryChanged CommandRegistryEvent commandRegistryEvent readRegistry readRegistry
public void add Command Manager Listener I Command Manager Listener command Manager Listener if command Manager Listener null throw new Null Pointer Exception if command Manager Listeners null command Manager Listeners new Array List if command Manager Listeners contains command Manager Listener command Manager Listeners add command Manager Listener  addCommandManagerListener ICommandManagerListener commandManagerListener commandManagerListener NullPointerException commandManagerListeners commandManagerListeners ArrayList commandManagerListeners commandManagerListener commandManagerListeners commandManagerListener
p Calculates the active key sequence bindings for this command manager The active key sequence bindings are a function of the active contexts the active key configurations the active locales and the active platforms within the system To ensure that the contexts are considered from the most specific to the least specific sorting is applied to the context identifier array This sorting takes into account the depth of the context within the context tree p p When this method completes the code key Sequence Bindings By Command Id code will represent an accurate an update to date mapping of key sequence bindings The key sequence binding machine i e a utility for computing key sequence bindings will also be up to date p private void calculate Key Sequence Bindings Get the current state of the system final String active Key Configuration Ids extend get Key Configuration Ids active Key Configuration Id final String active Locales extend get Path active Locale SEPARATOR final String active Platforms extend get Path active Platform SEPARATOR Transfer this information to the key sequence binding machine key Sequence Binding Machine set Active Context Ids active Context Ids key Sequence Binding Machine set Active Key Configuration Ids active Key Configuration Ids key Sequence Binding Machine set Active Locales active Locales key Sequence Binding Machine set Active Platforms active Platforms Allow the machine to compute our key sequences for us key Sequence Bindings By Command Id key Sequence Binding Machine get Key Sequence Bindings By Command Id  keySequenceBindingsByCommandId calculateKeySequenceBindings activeKeyConfigurationIds getKeyConfigurationIds activeKeyConfigurationId activeLocales getPath activeLocale activePlatforms getPath activePlatform keySequenceBindingMachine setActiveContextIds activeContextIds keySequenceBindingMachine setActiveKeyConfigurationIds activeKeyConfigurationIds keySequenceBindingMachine setActiveLocales activeLocales keySequenceBindingMachine setActivePlatforms activePlatforms keySequenceBindingsByCommandId keySequenceBindingMachine getKeySequenceBindingsByCommandId
private void fire Command Manager Changed Command Manager Event command Manager Event if command Manager Event null throw new Null Pointer Exception if command Manager Listeners null for int i 0 i command Manager Listeners size i I Command Manager Listener command Manager Listeners get i command Manager Changed command Manager Event  fireCommandManagerChanged CommandManagerEvent commandManagerEvent commandManagerEvent NullPointerException commandManagerListeners commandManagerListeners ICommandManagerListener commandManagerListeners commandManagerChanged commandManagerEvent
command Manager Changed command Manager Event public Set get Active Context Ids return active Context Ids key Set  commandManagerChanged commandManagerEvent getActiveContextIds activeContextIds keySet
return active Context Ids key Set public String get Active Key Configuration Id return active Key Configuration Id  activeContextIds keySet getActiveKeyConfigurationId activeKeyConfigurationId
return active Key Configuration Id public String get Active Locale return active Locale  activeKeyConfigurationId getActiveLocale activeLocale
return active Locale public String get Active Platform return active Platform  activeLocale getActivePlatform activePlatform
public I Category get Category String category Id if category Id null throw new Null Pointer Exception Category category Category categories By Id get category Id if category null category new Category categories With Listeners category Id update Category category categories By Id put category Id category return category  ICategory getCategory categoryId categoryId NullPointerException categoriesById categoryId categoriesWithListeners categoryId updateCategory categoriesById categoryId
public I Command get Command String command Id if command Id null throw new Null Pointer Exception Command command Command commands By Id get command Id if command null command new Command commands With Listeners command Id update Command command commands By Id put command Id command return command  ICommand getCommand commandId commandId NullPointerException commandsById commandId commandsWithListeners commandId updateCommand commandsById commandId
TODO public only for test cases remove public I Command Registry get Command Registry return command Registry  ICommandRegistry getCommandRegistry commandRegistry
return command Registry public Set get Defined Category Ids return Collections unmodifiable Set defined Category Ids  commandRegistry getDefinedCategoryIds unmodifiableSet definedCategoryIds
return Collections unmodifiable Set defined Category Ids public Set get Defined Command Ids return Collections unmodifiable Set defined Command Ids  unmodifiableSet definedCategoryIds getDefinedCommandIds unmodifiableSet definedCommandIds
An accessor for those handlers that have been defined in XML return The handlers defined in XML never code null code but may be empty public Set get Defined Handlers return Collections unmodifiable Set defined Handlers  getDefinedHandlers unmodifiableSet definedHandlers
return Collections unmodifiable Set defined Handlers public Set get Defined Key Configuration Ids return Collections unmodifiable Set defined Key Configuration Ids  unmodifiableSet definedHandlers getDefinedKeyConfigurationIds unmodifiableSet definedKeyConfigurationIds
return Collections unmodifiable Set defined Key Configuration Ids public Map get Handlers By Command Id return Collections unmodifiable Map handlers By Command Id  unmodifiableSet definedKeyConfigurationIds getHandlersByCommandId unmodifiableMap handlersByCommandId
public I Key Configuration get Key Configuration String key Configuration Id if key Configuration Id null throw new Null Pointer Exception Key Configuration key Configuration Key Configuration key Configurations By Id get key Configuration Id if key Configuration null key Configuration new Key Configuration key Configurations With Listeners key Configuration Id update Key Configuration key Configuration key Configurations By Id put key Configuration Id key Configuration return key Configuration  IKeyConfiguration getKeyConfiguration keyConfigurationId keyConfigurationId NullPointerException KeyConfiguration keyConfiguration KeyConfiguration keyConfigurationsById keyConfigurationId keyConfiguration keyConfiguration KeyConfiguration keyConfigurationsWithListeners keyConfigurationId updateKeyConfiguration keyConfiguration keyConfigurationsById keyConfigurationId keyConfiguration keyConfiguration
String get Key Configuration Ids String key Configuration Id List strings new Array List while key Configuration Id null strings add key Configuration Id try key Configuration Id get Key Configuration key Configuration Id get Parent Id catch Not Defined Exception e Not Defined return new String 0 return String strings to Array new String strings size  getKeyConfigurationIds keyConfigurationId ArrayList keyConfigurationId keyConfigurationId keyConfigurationId getKeyConfiguration keyConfigurationId getParentId NotDefinedException eNotDefined toArray
return String strings to Array new String strings size I Mutable Command Registry get Mutable Command Registry return mutable Command Registry  toArray IMutableCommandRegistry getMutableCommandRegistry mutableCommandRegistry
public Map get Partial Matches Key Sequence key Sequence Map map new Hash Map for Iterator iterator key Sequence Binding Machine get Matches By Key Sequence entry Set iterator iterator has Next Map Entry entry Map Entry iterator next Key Sequence key Sequence2 Key Sequence entry get Key Match match Match entry get Value if key Sequence2 starts With key Sequence false map put key Sequence2 match get Command Id return Collections unmodifiable Map map  getPartialMatches KeySequence keySequence HashMap keySequenceBindingMachine getMatchesByKeySequence entrySet hasNext KeySequence keySequence2 KeySequence getKey getValue keySequence2 startsWith keySequence keySequence2 getCommandId unmodifiableMap
public String get Perfect Match Key Sequence key Sequence Match match Match key Sequence Binding Machine get Matches By Key Sequence get key Sequence return match null match get Command Id null  getPerfectMatch KeySequence keySequence keySequenceBindingMachine getMatchesByKeySequence keySequence getCommandId
public boolean is Partial Match Key Sequence key Sequence for Iterator iterator key Sequence Binding Machine get Matches By Key Sequence entry Set iterator iterator has Next Map Entry entry Map Entry iterator next Key Sequence key Sequence2 Key Sequence entry get Key if key Sequence2 starts With key Sequence false return true return false  isPartialMatch KeySequence keySequence keySequenceBindingMachine getMatchesByKeySequence entrySet hasNext KeySequence keySequence2 KeySequence getKey keySequence2 startsWith keySequence
return false public boolean is Perfect Match Key Sequence key Sequence return get Perfect Match key Sequence null  isPerfectMatch KeySequence keySequence getPerfectMatch keySequence
private void notify Categories Map category Events By Category Id for Iterator iterator category Events By Category Id entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String category Id String entry get Key Category Event category Event Category Event entry get Value Category category Category categories By Id get category Id if category null category fire Category Changed category Event  notifyCategories categoryEventsByCategoryId categoryEventsByCategoryId entrySet hasNext categoryId getKey CategoryEvent categoryEvent CategoryEvent getValue categoriesById categoryId fireCategoryChanged categoryEvent
private void notify Commands Map command Events By Command Id for Iterator iterator command Events By Command Id entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String command Id String entry get Key Command Event command Event Command Event entry get Value Command command Command commands By Id get command Id if command null command fire Command Changed command Event  notifyCommands commandEventsByCommandId commandEventsByCommandId entrySet hasNext commandId getKey CommandEvent commandEvent CommandEvent getValue commandsById commandId fireCommandChanged commandEvent
private void notify Key Configurations Map key Configuration Events By Key Configuration Id for Iterator iterator key Configuration Events By Key Configuration Id entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String key Configuration Id String entry get Key Key Configuration Event key Configuration Event Key Configuration Event entry get Value Key Configuration key Configuration Key Configuration key Configurations By Id get key Configuration Id if key Configuration null key Configuration fire Key Configuration Changed key Configuration Event  notifyKeyConfigurations keyConfigurationEventsByKeyConfigurationId keyConfigurationEventsByKeyConfigurationId entrySet hasNext keyConfigurationId getKey KeyConfigurationEvent keyConfigurationEvent KeyConfigurationEvent getValue KeyConfiguration keyConfiguration KeyConfiguration keyConfigurationsById keyConfigurationId keyConfiguration keyConfiguration fireKeyConfigurationChanged keyConfigurationEvent
private void read Registry Collection category Definitions new Array List category Definitions add All command Registry get Category Definitions category Definitions add All mutable Command Registry get Category Definitions Map category Definitions By Id new Hash Map Category Definition category Definitions By Id category Definitions false defined Handlers add All command Registry get Handlers for Iterator iterator category Definitions By Id values iterator iterator has Next Category Definition category Definition Category Definition iterator next String name category Definition get Name if name null name length 0 iterator remove Collection command Definitions new Array List command Definitions add All command Registry get Command Definitions command Definitions add All mutable Command Registry get Command Definitions Map command Definitions By Id new Hash Map Command Definition command Definitions By Id command Definitions false for Iterator iterator command Definitions By Id values iterator iterator has Next Command Definition command Definition Command Definition iterator next String name command Definition get Name if name null name length 0 iterator remove Collection key Configuration Definitions new Array List key Configuration Definitions add All command Registry get Key Configuration Definitions key Configuration Definitions add All mutable Command Registry get Key Configuration Definitions Map key Configuration Definitions By Id new Hash Map Key Configuration Definition key Configuration Definitions By Id key Configuration Definitions false for Iterator iterator key Configuration Definitions By Id values iterator iterator has Next Key Configuration Definition key Configuration Definition Key Configuration Definition iterator next String name key Configuration Definition get Name if name null name length 0 iterator remove TODO should we really filter these out for Iterator iterator command Definitions By Id values iterator iterator has Next Command Definition command Definition Command Definition iterator next String category Id command Definition get Category Id if category Id null category Definitions By Id contains Key category Id iterator remove for Iterator iterator key Configuration Definitions By Id key Set iterator iterator has Next if is Key Configuration Definition Child Of null String iterator next key Configuration Definitions By Id iterator remove TODO should the active key configuration change if a call to set Context Key Configuration Id was explicitly made already List active Key Configuration Definitions new Array List active Key Configuration Definitions add All command Registry get Active Key Configuration Definitions active Key Configuration Definitions add All mutable Command Registry get Active Key Configuration Definitions String active Key Configuration Id null if active Key Configuration Definitions is Empty Active Key Configuration Definition active Key Configuration Definition Active Key Configuration Definition active Key Configuration Definitions get active Key Configuration Definitions size 1 active Key Configuration Id active Key Configuration Definition get Key Configuration Id if active Key Configuration Id null key Configuration Definitions By Id contains Key active Key Configuration Id active Key Configuration Id null TODO if null pick the first key configuration in sorted order by id if active Key Configuration Id null key Configuration Definitions By Id is Empty Sorted Set sorted Set new Tree Set key Configuration Definitions By Id key Set active Key Configuration Id String sorted Set first this category Definitions By Id category Definitions By Id this command Definitions By Id command Definitions By Id this key Configuration Definitions By Id key Configuration Definitions By Id boolean active Key Configuration Id Changed false if Util equals this active Key Configuration Id active Key Configuration Id this active Key Configuration Id active Key Configuration Id active Key Configuration Id Changed true boolean defined Category Ids Changed false Set defined Category Ids new Hash Set category Definitions By Id key Set Set previously Defined Category Ids null if defined Category Ids equals this defined Category Ids previously Defined Category Ids this defined Category Ids this defined Category Ids defined Category Ids defined Category Ids Changed true boolean defined Command Ids Changed false Set defined Command Ids new Hash Set command Definitions By Id key Set Set previously Defined Command Ids null if defined Command Ids equals this defined Command Ids previously Defined Command Ids this defined Command Ids this defined Command Ids defined Command Ids defined Command Ids Changed true boolean defined Key Configuration Ids Changed false Set defined Key Configuration Ids new Hash Set key Configuration Definitions By Id key Set Set previously Defined Key Configuration Ids null if defined Key Configuration Ids equals this defined Key Configuration Ids previously Defined Key Configuration Ids this defined Key Configuration Ids this defined Key Configuration Ids defined Key Configuration Ids defined Key Configuration Ids Changed true List command Registry Key Sequence Binding Definitions new Array List command Registry get Key Sequence Binding Definitions validate Key Sequence Binding Definitions command Registry Key Sequence Binding Definitions List mutable Command Registry Key Sequence Binding Definitions new Array List mutable Command Registry get Key Sequence Binding Definitions validate Key Sequence Binding Definitions mutable Command Registry Key Sequence Binding Definitions key Sequence Binding Machine set Key Sequence Bindings0 mutable Command Registry Key Sequence Binding Definitions key Sequence Binding Machine set Key Sequence Bindings1 command Registry Key Sequence Binding Definitions calculate Key Sequence Bindings Map category Events By Category Id update Categories categories By Id key Set Map command Events By Command Id update Commands commands By Id key Set Map key Configuration Events By Key Configuration Id update Key Configurations key Configurations By Id key Set if active Key Configuration Id Changed defined Category Ids Changed defined Command Ids Changed defined Key Configuration Ids Changed fire Command Manager Changed new Command Manager Event this false active Key Configuration Id Changed false false defined Category Ids Changed defined Command Ids Changed defined Key Configuration Ids Changed previously Defined Category Ids previously Defined Command Ids previously Defined Key Configuration Ids if category Events By Category Id null notify Categories category Events By Category Id if command Events By Command Id null notify Commands command Events By Command Id if key Configuration Events By Key Configuration Id null notify Key Configurations key Configuration Events By Key Configuration Id  readRegistry categoryDefinitions ArrayList categoryDefinitions addAll commandRegistry getCategoryDefinitions categoryDefinitions addAll mutableCommandRegistry getCategoryDefinitions categoryDefinitionsById HashMap CategoryDefinition categoryDefinitionsById categoryDefinitions definedHandlers addAll commandRegistry getHandlers categoryDefinitionsById hasNext CategoryDefinition categoryDefinition CategoryDefinition categoryDefinition getName commandDefinitions ArrayList commandDefinitions addAll commandRegistry getCommandDefinitions commandDefinitions addAll mutableCommandRegistry getCommandDefinitions commandDefinitionsById HashMap CommandDefinition commandDefinitionsById commandDefinitions commandDefinitionsById hasNext CommandDefinition commandDefinition CommandDefinition commandDefinition getName keyConfigurationDefinitions ArrayList keyConfigurationDefinitions addAll commandRegistry getKeyConfigurationDefinitions keyConfigurationDefinitions addAll mutableCommandRegistry getKeyConfigurationDefinitions keyConfigurationDefinitionsById HashMap KeyConfigurationDefinition keyConfigurationDefinitionsById keyConfigurationDefinitions keyConfigurationDefinitionsById hasNext KeyConfigurationDefinition keyConfigurationDefinition KeyConfigurationDefinition keyConfigurationDefinition getName commandDefinitionsById hasNext CommandDefinition commandDefinition CommandDefinition categoryId commandDefinition getCategoryId categoryId categoryDefinitionsById containsKey categoryId keyConfigurationDefinitionsById keySet hasNext isKeyConfigurationDefinitionChildOf keyConfigurationDefinitionsById setContextKeyConfigurationId activeKeyConfigurationDefinitions ArrayList activeKeyConfigurationDefinitions addAll commandRegistry getActiveKeyConfigurationDefinitions activeKeyConfigurationDefinitions addAll mutableCommandRegistry getActiveKeyConfigurationDefinitions activeKeyConfigurationId activeKeyConfigurationDefinitions isEmpty ActiveKeyConfigurationDefinition activeKeyConfigurationDefinition ActiveKeyConfigurationDefinition activeKeyConfigurationDefinitions activeKeyConfigurationDefinitions activeKeyConfigurationId activeKeyConfigurationDefinition getKeyConfigurationId activeKeyConfigurationId keyConfigurationDefinitionsById containsKey activeKeyConfigurationId activeKeyConfigurationId activeKeyConfigurationId keyConfigurationDefinitionsById isEmpty SortedSet sortedSet TreeSet keyConfigurationDefinitionsById keySet activeKeyConfigurationId sortedSet categoryDefinitionsById categoryDefinitionsById commandDefinitionsById commandDefinitionsById keyConfigurationDefinitionsById keyConfigurationDefinitionsById activeKeyConfigurationIdChanged activeKeyConfigurationId activeKeyConfigurationId activeKeyConfigurationId activeKeyConfigurationId activeKeyConfigurationIdChanged definedCategoryIdsChanged definedCategoryIds HashSet categoryDefinitionsById keySet previouslyDefinedCategoryIds definedCategoryIds definedCategoryIds previouslyDefinedCategoryIds definedCategoryIds definedCategoryIds definedCategoryIds definedCategoryIdsChanged definedCommandIdsChanged definedCommandIds HashSet commandDefinitionsById keySet previouslyDefinedCommandIds definedCommandIds definedCommandIds previouslyDefinedCommandIds definedCommandIds definedCommandIds definedCommandIds definedCommandIdsChanged definedKeyConfigurationIdsChanged definedKeyConfigurationIds HashSet keyConfigurationDefinitionsById keySet previouslyDefinedKeyConfigurationIds definedKeyConfigurationIds definedKeyConfigurationIds previouslyDefinedKeyConfigurationIds definedKeyConfigurationIds definedKeyConfigurationIds definedKeyConfigurationIds definedKeyConfigurationIdsChanged commandRegistryKeySequenceBindingDefinitions ArrayList commandRegistry getKeySequenceBindingDefinitions validateKeySequenceBindingDefinitions commandRegistryKeySequenceBindingDefinitions mutableCommandRegistryKeySequenceBindingDefinitions ArrayList mutableCommandRegistry getKeySequenceBindingDefinitions validateKeySequenceBindingDefinitions mutableCommandRegistryKeySequenceBindingDefinitions keySequenceBindingMachine setKeySequenceBindings0 mutableCommandRegistryKeySequenceBindingDefinitions keySequenceBindingMachine setKeySequenceBindings1 commandRegistryKeySequenceBindingDefinitions calculateKeySequenceBindings categoryEventsByCategoryId updateCategories categoriesById keySet commandEventsByCommandId updateCommands commandsById keySet keyConfigurationEventsByKeyConfigurationId updateKeyConfigurations keyConfigurationsById keySet activeKeyConfigurationIdChanged definedCategoryIdsChanged definedCommandIdsChanged definedKeyConfigurationIdsChanged fireCommandManagerChanged CommandManagerEvent activeKeyConfigurationIdChanged definedCategoryIdsChanged definedCommandIdsChanged definedKeyConfigurationIdsChanged previouslyDefinedCategoryIds previouslyDefinedCommandIds previouslyDefinedKeyConfigurationIds categoryEventsByCategoryId notifyCategories categoryEventsByCategoryId commandEventsByCommandId notifyCommands commandEventsByCommandId keyConfigurationEventsByKeyConfigurationId notifyKeyConfigurations keyConfigurationEventsByKeyConfigurationId
public void remove Command Manager Listener I Command Manager Listener command Manager Listener if command Manager Listener null throw new Null Pointer Exception if command Manager Listeners null command Manager Listeners remove command Manager Listener  removeCommandManagerListener ICommandManagerListener commandManagerListener commandManagerListener NullPointerException commandManagerListeners commandManagerListeners commandManagerListener
public void set Active Context Ids Map active Context Ids boolean command Manager Changed false Map command Events By Command Id null if this active Context Ids equals active Context Ids this active Context Ids active Context Ids command Manager Changed true calculate Key Sequence Bindings command Events By Command Id update Commands commands By Id key Set if command Manager Changed fire Command Manager Changed new Command Manager Event this true false false false false false false null null null if command Events By Command Id null notify Commands command Events By Command Id  setActiveContextIds activeContextIds commandManagerChanged commandEventsByCommandId activeContextIds activeContextIds activeContextIds activeContextIds commandManagerChanged calculateKeySequenceBindings commandEventsByCommandId updateCommands commandsById keySet commandManagerChanged fireCommandManagerChanged CommandManagerEvent commandEventsByCommandId notifyCommands commandEventsByCommandId
public void set Active Key Configuration Id String active Key Configuration Id boolean command Manager Changed false Map command Events By Command Id null Map key Configuration Events By Key Configuration Id null if Util equals this active Key Configuration Id active Key Configuration Id this active Key Configuration Id active Key Configuration Id command Manager Changed true calculate Key Sequence Bindings command Events By Command Id update Commands commands By Id key Set key Configuration Events By Key Configuration Id update Key Configurations key Configurations By Id key Set if command Manager Changed fire Command Manager Changed new Command Manager Event this false true false false false false false null null null if command Events By Command Id null notify Commands command Events By Command Id if key Configuration Events By Key Configuration Id null notify Key Configurations key Configuration Events By Key Configuration Id  setActiveKeyConfigurationId activeKeyConfigurationId commandManagerChanged commandEventsByCommandId keyConfigurationEventsByKeyConfigurationId activeKeyConfigurationId activeKeyConfigurationId activeKeyConfigurationId activeKeyConfigurationId commandManagerChanged calculateKeySequenceBindings commandEventsByCommandId updateCommands commandsById keySet keyConfigurationEventsByKeyConfigurationId updateKeyConfigurations keyConfigurationsById keySet commandManagerChanged fireCommandManagerChanged CommandManagerEvent commandEventsByCommandId notifyCommands commandEventsByCommandId keyConfigurationEventsByKeyConfigurationId notifyKeyConfigurations keyConfigurationEventsByKeyConfigurationId
public void set Active Locale String active Locale boolean command Manager Changed false Map command Events By Command Id null if Util equals this active Locale active Locale this active Locale active Locale command Manager Changed true calculate Key Sequence Bindings command Events By Command Id update Commands commands By Id key Set if command Manager Changed fire Command Manager Changed new Command Manager Event this false false true false false false false null null null if command Events By Command Id null notify Commands command Events By Command Id  setActiveLocale activeLocale commandManagerChanged commandEventsByCommandId activeLocale activeLocale activeLocale activeLocale commandManagerChanged calculateKeySequenceBindings commandEventsByCommandId updateCommands commandsById keySet commandManagerChanged fireCommandManagerChanged CommandManagerEvent commandEventsByCommandId notifyCommands commandEventsByCommandId
public void set Active Platform String active Platform boolean command Manager Changed false Map command Events By Command Id null if Util equals this active Platform active Platform this active Platform active Platform command Manager Changed true calculate Key Sequence Bindings command Events By Command Id update Commands commands By Id key Set if command Manager Changed fire Command Manager Changed new Command Manager Event this false false false true false false false null null null if command Events By Command Id null notify Commands command Events By Command Id  setActivePlatform activePlatform commandManagerChanged commandEventsByCommandId activePlatform activePlatform activePlatform activePlatform commandManagerChanged calculateKeySequenceBindings commandEventsByCommandId updateCommands commandsById keySet commandManagerChanged fireCommandManagerChanged CommandManagerEvent commandEventsByCommandId notifyCommands commandEventsByCommandId
public void set Handlers By Command Id Map handlers By Command Id handlers By Command Id Util safe Copy handlers By Command Id String class I Handler class false true boolean command Manager Changed false Map command Events By Command Id null if Util equals handlers By Command Id this handlers By Command Id this handlers By Command Id handlers By Command Id command Manager Changed true command Events By Command Id update Commands commands By Id key Set if command Events By Command Id null notify Commands command Events By Command Id  setHandlersByCommandId handlersByCommandId handlersByCommandId safeCopy handlersByCommandId IHandler commandManagerChanged commandEventsByCommandId handlersByCommandId handlersByCommandId handlersByCommandId handlersByCommandId commandManagerChanged commandEventsByCommandId updateCommands commandsById keySet commandEventsByCommandId notifyCommands commandEventsByCommandId
private Map update Categories Collection category Ids Map category Events By Category Id new Tree Map for Iterator iterator category Ids iterator iterator has Next String category Id String iterator next Category category Category categories By Id get category Id if category null Category Event category Event update Category category if category Event null category Events By Category Id put category Id category Event return category Events By Category Id  updateCategories categoryIds categoryEventsByCategoryId TreeMap categoryIds hasNext categoryId categoriesById categoryId CategoryEvent categoryEvent updateCategory categoryEvent categoryEventsByCategoryId categoryId categoryEvent categoryEventsByCategoryId
private Category Event update Category Category category Category Definition category Definition Category Definition category Definitions By Id get category get Id boolean defined Changed category set Defined category Definition null boolean description Changed category set Description category Definition null category Definition get Description null boolean name Changed category set Name category Definition null category Definition get Name null if defined Changed description Changed name Changed return new Category Event category defined Changed name Changed else return null  CategoryEvent updateCategory CategoryDefinition categoryDefinition CategoryDefinition categoryDefinitionsById getId definedChanged setDefined categoryDefinition descriptionChanged setDescription categoryDefinition categoryDefinition getDescription nameChanged setName categoryDefinition categoryDefinition getName definedChanged descriptionChanged nameChanged CategoryEvent definedChanged nameChanged
private Command Event update Command Command command TODO list to sortedset in api Command Definition command Definition Command Definition command Definitions By Id get command get Id boolean category Id Changed command set Category Id command Definition null command Definition get Category Id null boolean defined Changed command set Defined command Definition null boolean description Changed command set Description command Definition null command Definition get Description null I Handler handler I Handler handlers By Command Id get command get Id boolean handler Changed command set Handler handler TODO list to sortedset in api Sorted Set key Sequence Bindings Sorted Set key Sequence Bindings By Command Id get command get Id TODO list to sortedset in api boolean key Sequence Bindings Changed command set Key Sequence Bindings key Sequence Bindings null new Array List key Sequence Bindings Collections EMPTY LIST boolean name Changed command set Name command Definition null command Definition get Name null if category Id Changed defined Changed description Changed key Sequence Bindings Changed name Changed return new Command Event command false TODO category Id Changed defined Changed description Changed handler Changed key Sequence Bindings Changed name Changed null TODO else return null  CommandEvent updateCommand CommandDefinition commandDefinition CommandDefinition commandDefinitionsById getId categoryIdChanged setCategoryId commandDefinition commandDefinition getCategoryId definedChanged setDefined commandDefinition descriptionChanged setDescription commandDefinition commandDefinition getDescription IHandler IHandler handlersByCommandId getId handlerChanged setHandler SortedSet keySequenceBindings SortedSet keySequenceBindingsByCommandId getId keySequenceBindingsChanged setKeySequenceBindings keySequenceBindings ArrayList keySequenceBindings EMPTY_LIST nameChanged setName commandDefinition commandDefinition getName categoryIdChanged definedChanged descriptionChanged keySequenceBindingsChanged nameChanged CommandEvent categoryIdChanged definedChanged descriptionChanged handlerChanged keySequenceBindingsChanged nameChanged
private Map update Commands Collection command Ids Map command Events By Command Id new Tree Map for Iterator iterator command Ids iterator iterator has Next String command Id String iterator next Command command Command commands By Id get command Id if command null Command Event command Event update Command command if command Event null command Events By Command Id put command Id command Event return command Events By Command Id  updateCommands commandIds commandEventsByCommandId TreeMap commandIds hasNext commandId commandsById commandId CommandEvent commandEvent updateCommand commandEvent commandEventsByCommandId commandId commandEvent commandEventsByCommandId
private Key Configuration Event update Key Configuration Key Configuration key Configuration boolean active Changed key Configuration set Active Util equals active Key Configuration Id key Configuration get Id Key Configuration Definition key Configuration Definition Key Configuration Definition key Configuration Definitions By Id get key Configuration get Id boolean defined Changed key Configuration set Defined key Configuration Definition null boolean description Changed key Configuration set Description key Configuration Definition null key Configuration Definition get Description null boolean name Changed key Configuration set Name key Configuration Definition null key Configuration Definition get Name null boolean parent Id Changed key Configuration set Parent Id key Configuration Definition null key Configuration Definition get Parent Id null if active Changed defined Changed description Changed name Changed parent Id Changed return new Key Configuration Event key Configuration active Changed defined Changed name Changed parent Id Changed else return null  KeyConfigurationEvent updateKeyConfiguration KeyConfiguration keyConfiguration activeChanged keyConfiguration setActive activeKeyConfigurationId keyConfiguration getId KeyConfigurationDefinition keyConfigurationDefinition KeyConfigurationDefinition keyConfigurationDefinitionsById keyConfiguration getId definedChanged keyConfiguration setDefined keyConfigurationDefinition descriptionChanged keyConfiguration setDescription keyConfigurationDefinition keyConfigurationDefinition getDescription nameChanged keyConfiguration setName keyConfigurationDefinition keyConfigurationDefinition getName parentIdChanged keyConfiguration setParentId keyConfigurationDefinition keyConfigurationDefinition getParentId activeChanged definedChanged descriptionChanged nameChanged parentIdChanged KeyConfigurationEvent keyConfiguration activeChanged definedChanged nameChanged parentIdChanged
private Map update Key Configurations Collection key Configuration Ids Map key Configuration Events By Key Configuration Id new Tree Map for Iterator iterator key Configuration Ids iterator iterator has Next String key Configuration Id String iterator next Key Configuration key Configuration Key Configuration key Configurations By Id get key Configuration Id if key Configuration null Key Configuration Event key Configuration Event update Key Configuration key Configuration if key Configuration Event null key Configuration Events By Key Configuration Id put key Configuration Id key Configuration Event return key Configuration Events By Key Configuration Id  updateKeyConfigurations keyConfigurationIds keyConfigurationEventsByKeyConfigurationId TreeMap keyConfigurationIds hasNext keyConfigurationId KeyConfiguration keyConfiguration KeyConfiguration keyConfigurationsById keyConfigurationId keyConfiguration KeyConfigurationEvent keyConfigurationEvent updateKeyConfiguration keyConfiguration keyConfigurationEvent keyConfigurationEventsByKeyConfigurationId keyConfigurationId keyConfigurationEvent keyConfigurationEventsByKeyConfigurationId

private static Key Sequence deprecated Sequence To Key Sequence int sequence List key Strokes new Array List for int i 0 i sequence length i key Strokes add deprecated Stroke To Key Stroke sequence i return Key Sequence get Instance key Strokes  KeySequence deprecatedSequenceToKeySequence keyStrokes ArrayList keyStrokes deprecatedStrokeToKeyStroke KeySequence getInstance keyStrokes
private static Key Stroke deprecated Stroke To Key Stroke int stroke return SWT Key Support convert Accelerator To Key Stroke stroke  KeyStroke deprecatedStrokeToKeyStroke SWTKeySupport convertAcceleratorToKeyStroke
private static int parse Deprecated Sequence String string if string null throw new Null Pointer Exception String Tokenizer string Tokenizer new String Tokenizer string int length string Tokenizer count Tokens int strokes new int length for int i 0 i length i strokes i parse Deprecated Stroke string Tokenizer next Token return strokes  parseDeprecatedSequence NullPointerException StringTokenizer stringTokenizer StringTokenizer stringTokenizer countTokens parseDeprecatedStroke stringTokenizer nextToken
private static int parse Deprecated Stroke String string if string null throw new Null Pointer Exception List list new Array List String Tokenizer string Tokenizer new String Tokenizer string MODIFIER SEPARATOR true while string Tokenizer has More Tokens list add string Tokenizer next Token int size list size int value 0 if size 2 1 String token String list get size 1 Integer integer Integer string To Value Map get token to Upper Case if integer null value integer int Value else if token length 1 value token to Upper Case char At 0 if value 0 for int i 0 i size 1 i token String list get i if i 2 0 if token equals Ignore Case CTRL if value SWT CTRL 0 return 0 value SWT CTRL else if token equals Ignore Case ALT if value SWT ALT 0 return 0 value SWT ALT else if token equals Ignore Case SHIFT if value SWT SHIFT 0 return 0 value SWT SHIFT else if token equals Ignore Case COMMAND if value SWT COMMAND 0 return 0 value SWT COMMAND else return 0 else if MODIFIER SEPARATOR equals token return 0 return value  parseDeprecatedStroke NullPointerException ArrayList StringTokenizer stringTokenizer StringTokenizer MODIFIER_SEPARATOR stringTokenizer hasMoreTokens stringTokenizer nextToken stringToValueMap toUpperCase intValue toUpperCase charAt equalsIgnoreCase equalsIgnoreCase equalsIgnoreCase equalsIgnoreCase MODIFIER_SEPARATOR
static Active Key Configuration Definition read Active Key Configuration Definition I Memento memento String source Id Override if memento null throw new Null Pointer Exception String key Configuration Id memento get String TAG KEY CONFIGURATION ID TODO deprecated start if key Configuration Id null key Configuration Id memento get String value NON NLS 1 TODO deprecated end String source Id source Id Override null source Id Override memento get String TAG SOURCE ID TODO deprecated start if source Id Override null source Id null source Id memento get String plugin NON NLS 1 TODO deprecated end return new Active Key Configuration Definition key Configuration Id source Id  ActiveKeyConfigurationDefinition readActiveKeyConfigurationDefinition IMemento sourceIdOverride NullPointerException keyConfigurationId getString TAG_KEY_CONFIGURATION_ID keyConfigurationId keyConfigurationId getString sourceId sourceIdOverride sourceIdOverride getString TAG_SOURCE_ID sourceIdOverride sourceId sourceId getString ActiveKeyConfigurationDefinition keyConfigurationId sourceId
static List read Active Key Configuration Definitions I Memento memento String name String source Id Override if memento null name null throw new Null Pointer Exception I Memento mementos memento get Children name if mementos null throw new Null Pointer Exception List list new Array List mementos length for int i 0 i mementos length i list add read Active Key Configuration Definition mementos i source Id Override return list  readActiveKeyConfigurationDefinitions IMemento sourceIdOverride NullPointerException IMemento getChildren NullPointerException ArrayList readActiveKeyConfigurationDefinition sourceIdOverride
static Category Definition read Category Definition I Memento memento String source Id Override if memento null throw new Null Pointer Exception String description memento get String TAG DESCRIPTION String id memento get String TAG ID String name memento get String TAG NAME String source Id source Id Override null source Id Override memento get String TAG SOURCE ID TODO deprecated start if source Id Override null source Id null source Id memento get String plugin NON NLS 1 TODO deprecated end return new Category Definition description id name source Id  CategoryDefinition readCategoryDefinition IMemento sourceIdOverride NullPointerException getString TAG_DESCRIPTION getString TAG_ID getString TAG_NAME sourceId sourceIdOverride sourceIdOverride getString TAG_SOURCE_ID sourceIdOverride sourceId sourceId getString CategoryDefinition sourceId
static List read Category Definitions I Memento memento String name String source Id Override if memento null name null throw new Null Pointer Exception I Memento mementos memento get Children name if mementos null throw new Null Pointer Exception List list new Array List mementos length for int i 0 i mementos length i list add read Category Definition mementos i source Id Override return list  readCategoryDefinitions IMemento sourceIdOverride NullPointerException IMemento getChildren NullPointerException ArrayList readCategoryDefinition sourceIdOverride
static Command Definition read Command Definition I Memento memento String source Id Override if memento null throw new Null Pointer Exception String category Id memento get String TAG CATEGORY ID TODO deprecated start if category Id null category Id memento get String category NON NLS 1 TODO deprecated end String description memento get String TAG DESCRIPTION String id memento get String TAG ID String name memento get String TAG NAME String source Id source Id Override null source Id Override memento get String TAG SOURCE ID TODO deprecated start if source Id Override null source Id null source Id memento get String plugin NON NLS 1 TODO deprecated end return new Command Definition category Id description id name source Id  CommandDefinition readCommandDefinition IMemento sourceIdOverride NullPointerException categoryId getString TAG_CATEGORY_ID categoryId categoryId getString getString TAG_DESCRIPTION getString TAG_ID getString TAG_NAME sourceId sourceIdOverride sourceIdOverride getString TAG_SOURCE_ID sourceIdOverride sourceId sourceId getString CommandDefinition categoryId sourceId
static List read Command Definitions I Memento memento String name String source Id Override if memento null name null throw new Null Pointer Exception I Memento mementos memento get Children name if mementos null throw new Null Pointer Exception List list new Array List mementos length for int i 0 i mementos length i list add read Command Definition mementos i source Id Override return list  readCommandDefinitions IMemento sourceIdOverride NullPointerException IMemento getChildren NullPointerException ArrayList readCommandDefinition sourceIdOverride
private static int read Deprecated Sequence I Memento memento if memento null throw new Null Pointer Exception I Memento mementos memento get Children stroke NON NLS 1 if mementos null throw new Null Pointer Exception int strokes new int mementos length for int i 0 i mementos length i strokes i read Deprecated Stroke mementos i return strokes  readDeprecatedSequence IMemento NullPointerException IMemento getChildren NullPointerException readDeprecatedStroke
private static int read Deprecated Stroke I Memento memento if memento null throw new Null Pointer Exception Integer value memento get Integer value NON NLS 1 return value null value int Value 0  readDeprecatedStroke IMemento NullPointerException getInteger intValue
Reads the handler from XML and creates a proxy to contain it The proxy will only instantiate the handler when the handler is first asked for information param configuration Element The configuration element to read must not be code null code return The handler proxy for the given definition never code null code static I Handler read Handler Submission Definition I Configuration Element configuration Element final String command Id configuration Element get Attribute TAG COMMAND ID return new Handler Proxy command Id configuration Element  configurationElement IHandler readHandlerSubmissionDefinition IConfigurationElement configurationElement commandId configurationElement getAttribute TAG_COMMAND_ID HandlerProxy commandId configurationElement
static Key Configuration Definition read Key Configuration Definition I Memento memento String source Id Override if memento null throw new Null Pointer Exception String description memento get String TAG DESCRIPTION String id memento get String TAG ID String name memento get String TAG NAME String parent Id memento get String TAG PARENT ID TODO deprecated start if parent Id null parent Id memento get String parent NON NLS 1 TODO deprecated end String source Id source Id Override null source Id Override memento get String TAG SOURCE ID TODO deprecated start if source Id Override null source Id null source Id memento get String plugin NON NLS 1 TODO deprecated end return new Key Configuration Definition description id name parent Id source Id  KeyConfigurationDefinition readKeyConfigurationDefinition IMemento sourceIdOverride NullPointerException getString TAG_DESCRIPTION getString TAG_ID getString TAG_NAME parentId getString TAG_PARENT_ID parentId parentId getString sourceId sourceIdOverride sourceIdOverride getString TAG_SOURCE_ID sourceIdOverride sourceId sourceId getString KeyConfigurationDefinition parentId sourceId
static List read Key Configuration Definitions I Memento memento String name String source Id Override if memento null name null throw new Null Pointer Exception I Memento mementos memento get Children name if mementos null throw new Null Pointer Exception List list new Array List mementos length for int i 0 i mementos length i list add read Key Configuration Definition mementos i source Id Override return list  readKeyConfigurationDefinitions IMemento sourceIdOverride NullPointerException IMemento getChildren NullPointerException ArrayList readKeyConfigurationDefinition sourceIdOverride
static Key Sequence Binding Definition read Key Sequence Binding Definition I Memento memento String source Id Override if memento null throw new Null Pointer Exception String context Id memento get String TAG CONTEXT ID TODO deprecated start if context Id null context Id memento get String scope NON NLS 1 if org eclipse ui global Scope equals context Id NON NLS 1 context Id null TODO deprecated end String command Id memento get String TAG COMMAND ID TODO deprecated start if command Id null command Id memento get String command NON NLS 1 if command Id null command Id memento get String id NON NLS 1 TODO deprecated end String key Configuration Id memento get String TAG KEY CONFIGURATION ID TODO deprecated start if key Configuration Id null key Configuration Id memento get String configuration NON NLS 1 TODO deprecated end Key Sequence key Sequence null String key Sequence As String memento get String TAG KEY SEQUENCE if key Sequence As String null try key Sequence Key Sequence get Instance key Sequence As String catch Parse Exception e Parse TODO deprecated start else I Memento memento Sequence memento get Child sequence NON NLS 1 if memento Sequence null key Sequence deprecated Sequence To Key Sequence read Deprecated Sequence memento Sequence else String string memento get String string NON NLS 1 if string null key Sequence deprecated Sequence To Key Sequence parse Deprecated Sequence string TODO deprecated end String locale memento get String TAG LOCALE String platform memento get String TAG PLATFORM String source Id source Id Override null source Id Override memento get String TAG SOURCE ID TODO deprecated start if source Id Override null source Id null source Id memento get String plugin NON NLS 1 TODO deprecated end We treat null context identifiers as the window context if context Id null context Id Key Sequence Binding DEFAULT CONTEXT ID return new Key Sequence Binding Definition context Id command Id key Configuration Id key Sequence locale platform source Id  KeySequenceBindingDefinition readKeySequenceBindingDefinition IMemento sourceIdOverride NullPointerException contextId getString TAG_CONTEXT_ID contextId contextId getString globalScope contextId contextId commandId getString TAG_COMMAND_ID commandId commandId getString commandId commandId getString keyConfigurationId getString TAG_KEY_CONFIGURATION_ID keyConfigurationId keyConfigurationId getString KeySequence keySequence keySequenceAsString getString TAG_KEY_SEQUENCE keySequenceAsString keySequence KeySequence getInstance keySequenceAsString ParseException eParse IMemento mementoSequence getChild mementoSequence keySequence deprecatedSequenceToKeySequence readDeprecatedSequence mementoSequence getString keySequence deprecatedSequenceToKeySequence parseDeprecatedSequence getString TAG_LOCALE getString TAG_PLATFORM sourceId sourceIdOverride sourceIdOverride getString TAG_SOURCE_ID sourceIdOverride sourceId sourceId getString contextId contextId KeySequenceBinding DEFAULT_CONTEXT_ID KeySequenceBindingDefinition contextId commandId keyConfigurationId keySequence sourceId
static List read Key Sequence Binding Definitions I Memento memento String name String source Id Override if memento null name null throw new Null Pointer Exception I Memento mementos memento get Children name if mementos null throw new Null Pointer Exception List list new Array List mementos length for int i 0 i mementos length i list add read Key Sequence Binding Definition mementos i source Id Override return list  readKeySequenceBindingDefinitions IMemento sourceIdOverride NullPointerException IMemento getChildren NullPointerException ArrayList readKeySequenceBindingDefinition sourceIdOverride
static void write Active Key Configuration Definition I Memento memento Active Key Configuration Definition active Key Configuration Definition if memento null active Key Configuration Definition null throw new Null Pointer Exception memento put String TAG KEY CONFIGURATION ID active Key Configuration Definition get Key Configuration Id memento put String TAG SOURCE ID active Key Configuration Definition get Source Id  writeActiveKeyConfigurationDefinition IMemento ActiveKeyConfigurationDefinition activeKeyConfigurationDefinition activeKeyConfigurationDefinition NullPointerException putString TAG_KEY_CONFIGURATION_ID activeKeyConfigurationDefinition getKeyConfigurationId putString TAG_SOURCE_ID activeKeyConfigurationDefinition getSourceId
static void write Active Key Configuration Definitions I Memento memento String name List active Key Configuration Definitions if memento null name null active Key Configuration Definitions null throw new Null Pointer Exception active Key Configuration Definitions new Array List active Key Configuration Definitions Iterator iterator active Key Configuration Definitions iterator while iterator has Next Util assert Instance iterator next Active Key Configuration Definition class iterator active Key Configuration Definitions iterator while iterator has Next write Active Key Configuration Definition memento create Child name Active Key Configuration Definition iterator next  writeActiveKeyConfigurationDefinitions IMemento activeKeyConfigurationDefinitions activeKeyConfigurationDefinitions NullPointerException activeKeyConfigurationDefinitions ArrayList activeKeyConfigurationDefinitions activeKeyConfigurationDefinitions hasNext assertInstance ActiveKeyConfigurationDefinition activeKeyConfigurationDefinitions hasNext writeActiveKeyConfigurationDefinition createChild ActiveKeyConfigurationDefinition
static void write Category Definition I Memento memento Category Definition category Definition if memento null category Definition null throw new Null Pointer Exception memento put String TAG DESCRIPTION category Definition get Description memento put String TAG ID category Definition get Id memento put String TAG NAME category Definition get Name memento put String TAG SOURCE ID category Definition get Source Id  writeCategoryDefinition IMemento CategoryDefinition categoryDefinition categoryDefinition NullPointerException putString TAG_DESCRIPTION categoryDefinition getDescription putString TAG_ID categoryDefinition getId putString TAG_NAME categoryDefinition getName putString TAG_SOURCE_ID categoryDefinition getSourceId
static void write Category Definitions I Memento memento String name List category Definitions if memento null name null category Definitions null throw new Null Pointer Exception category Definitions new Array List category Definitions Iterator iterator category Definitions iterator while iterator has Next Util assert Instance iterator next Category Definition class iterator category Definitions iterator while iterator has Next write Category Definition memento create Child name Category Definition iterator next  writeCategoryDefinitions IMemento categoryDefinitions categoryDefinitions NullPointerException categoryDefinitions ArrayList categoryDefinitions categoryDefinitions hasNext assertInstance CategoryDefinition categoryDefinitions hasNext writeCategoryDefinition createChild CategoryDefinition
static void write Command Definition I Memento memento Command Definition command Definition if memento null command Definition null throw new Null Pointer Exception memento put String TAG CATEGORY ID command Definition get Category Id memento put String TAG DESCRIPTION command Definition get Description memento put String TAG ID command Definition get Id memento put String TAG NAME command Definition get Name memento put String TAG SOURCE ID command Definition get Source Id  writeCommandDefinition IMemento CommandDefinition commandDefinition commandDefinition NullPointerException putString TAG_CATEGORY_ID commandDefinition getCategoryId putString TAG_DESCRIPTION commandDefinition getDescription putString TAG_ID commandDefinition getId putString TAG_NAME commandDefinition getName putString TAG_SOURCE_ID commandDefinition getSourceId
static void write Command Definitions I Memento memento String name List command Definitions if memento null name null command Definitions null throw new Null Pointer Exception command Definitions new Array List command Definitions Iterator iterator command Definitions iterator while iterator has Next Util assert Instance iterator next Command Definition class iterator command Definitions iterator while iterator has Next write Command Definition memento create Child name Command Definition iterator next  writeCommandDefinitions IMemento commandDefinitions commandDefinitions NullPointerException commandDefinitions ArrayList commandDefinitions commandDefinitions hasNext assertInstance CommandDefinition commandDefinitions hasNext writeCommandDefinition createChild CommandDefinition
static void write Key Configuration Definition I Memento memento Key Configuration Definition key Configuration Definition if memento null key Configuration Definition null throw new Null Pointer Exception memento put String TAG DESCRIPTION key Configuration Definition get Description memento put String TAG ID key Configuration Definition get Id memento put String TAG NAME key Configuration Definition get Name memento put String TAG PARENT ID key Configuration Definition get Parent Id memento put String TAG SOURCE ID key Configuration Definition get Source Id  writeKeyConfigurationDefinition IMemento KeyConfigurationDefinition keyConfigurationDefinition keyConfigurationDefinition NullPointerException putString TAG_DESCRIPTION keyConfigurationDefinition getDescription putString TAG_ID keyConfigurationDefinition getId putString TAG_NAME keyConfigurationDefinition getName putString TAG_PARENT_ID keyConfigurationDefinition getParentId putString TAG_SOURCE_ID keyConfigurationDefinition getSourceId
static void write Key Configuration Definitions I Memento memento String name List key Configuration Definitions if memento null name null key Configuration Definitions null throw new Null Pointer Exception key Configuration Definitions new Array List key Configuration Definitions Iterator iterator key Configuration Definitions iterator while iterator has Next Util assert Instance iterator next Key Configuration Definition class iterator key Configuration Definitions iterator while iterator has Next write Key Configuration Definition memento create Child name Key Configuration Definition iterator next  writeKeyConfigurationDefinitions IMemento keyConfigurationDefinitions keyConfigurationDefinitions NullPointerException keyConfigurationDefinitions ArrayList keyConfigurationDefinitions keyConfigurationDefinitions hasNext assertInstance KeyConfigurationDefinition keyConfigurationDefinitions hasNext writeKeyConfigurationDefinition createChild KeyConfigurationDefinition
static void write Key Sequence Binding Definition I Memento memento Key Sequence Binding Definition key Sequence Binding Definition if memento null key Sequence Binding Definition null throw new Null Pointer Exception memento put String TAG CONTEXT ID key Sequence Binding Definition get Context Id memento put String TAG COMMAND ID key Sequence Binding Definition get Command Id memento put String TAG KEY CONFIGURATION ID key Sequence Binding Definition get Key Configuration Id memento put String TAG KEY SEQUENCE key Sequence Binding Definition get Key Sequence null key Sequence Binding Definition get Key Sequence to String null memento put String TAG LOCALE key Sequence Binding Definition get Locale memento put String TAG PLATFORM key Sequence Binding Definition get Platform memento put String TAG SOURCE ID key Sequence Binding Definition get Source Id  writeKeySequenceBindingDefinition IMemento KeySequenceBindingDefinition keySequenceBindingDefinition keySequenceBindingDefinition NullPointerException putString TAG_CONTEXT_ID keySequenceBindingDefinition getContextId putString TAG_COMMAND_ID keySequenceBindingDefinition getCommandId putString TAG_KEY_CONFIGURATION_ID keySequenceBindingDefinition getKeyConfigurationId putString TAG_KEY_SEQUENCE keySequenceBindingDefinition getKeySequence keySequenceBindingDefinition getKeySequence toString putString TAG_LOCALE keySequenceBindingDefinition getLocale putString TAG_PLATFORM keySequenceBindingDefinition getPlatform putString TAG_SOURCE_ID keySequenceBindingDefinition getSourceId
static void write Key Sequence Binding Definitions I Memento memento String name List key Sequence Binding Definitions if memento null name null key Sequence Binding Definitions null throw new Null Pointer Exception key Sequence Binding Definitions new Array List key Sequence Binding Definitions Iterator iterator key Sequence Binding Definitions iterator while iterator has Next Util assert Instance iterator next Key Sequence Binding Definition class iterator key Sequence Binding Definitions iterator while iterator has Next write Key Sequence Binding Definition memento create Child name Key Sequence Binding Definition iterator next  writeKeySequenceBindingDefinitions IMemento keySequenceBindingDefinitions keySequenceBindingDefinitions NullPointerException keySequenceBindingDefinitions ArrayList keySequenceBindingDefinitions keySequenceBindingDefinitions hasNext assertInstance KeySequenceBindingDefinition keySequenceBindingDefinitions hasNext writeKeySequenceBindingDefinition createChild KeySequenceBindingDefinition
private Persistence 

public void property Change Property Change Event property Change Event if KEY equals property Change Event get Property try load catch final IO Exception e e print Stack Trace  propertyChange PropertyChangeEvent propertyChangeEvent propertyChangeEvent getProperty IOException printStackTrace
Constructs a new instance of code Preference Command Registry code with the preference store it is supposed to use param preference Store The preference store to use must not be code null code public Preference Command Registry I Preference Store preference Store if preference Store null throw new Null Pointer Exception this preference Store preference Store this preference Store add Property Change Listener new I Property Change Listener public void property Change Property Change Event property Change Event if KEY equals property Change Event get Property try load catch final IO Exception e e print Stack Trace try load catch IO Exception eIO At least we tried  PreferenceCommandRegistry preferenceStore PreferenceCommandRegistry IPreferenceStore preferenceStore preferenceStore NullPointerException preferenceStore preferenceStore preferenceStore addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent propertyChangeEvent propertyChangeEvent getProperty IOException printStackTrace IOException
Loads all of the preferences from the store and sets member variables containing all of the values throws IO Exception If something happens while trying to read the store public void load throws IO Exception String preference String preference Store get String KEY if preference String null preference String length 0 Reader reader new String Reader preference String try I Memento memento XML Memento create Read Root reader List active Key Configuration Definitions Collections unmodifiable List Persistence read Active Key Configuration Definitions memento Persistence TAG ACTIVE KEY CONFIGURATION null List category Definitions Collections unmodifiable List Persistence read Category Definitions memento Persistence TAG CATEGORY null List command Definitions Collections unmodifiable List Persistence read Command Definitions memento Persistence TAG COMMAND null List key Configuration Definitions Collections unmodifiable List Persistence read Key Configuration Definitions memento Persistence TAG KEY CONFIGURATION null List key Sequence Binding Definitions Collections unmodifiable List Persistence read Key Sequence Binding Definitions memento Persistence TAG KEY SEQUENCE BINDING null boolean command Registry Changed false if active Key Configuration Definitions equals this active Key Configuration Definitions this active Key Configuration Definitions active Key Configuration Definitions command Registry Changed true if category Definitions equals this category Definitions this category Definitions category Definitions command Registry Changed true if command Definitions equals this command Definitions this command Definitions command Definitions command Registry Changed true if key Configuration Definitions equals this key Configuration Definitions this key Configuration Definitions key Configuration Definitions command Registry Changed true if key Sequence Binding Definitions equals this key Sequence Binding Definitions this key Sequence Binding Definitions key Sequence Binding Definitions command Registry Changed true if command Registry Changed fire Command Registry Changed catch Workbench Exception e Workbench throw new IO Exception finally reader close  IOException IOException preferenceString preferenceStore getString preferenceString preferenceString StringReader preferenceString IMemento XMLMemento createReadRoot activeKeyConfigurationDefinitions unmodifiableList readActiveKeyConfigurationDefinitions TAG_ACTIVE_KEY_CONFIGURATION categoryDefinitions unmodifiableList readCategoryDefinitions TAG_CATEGORY commandDefinitions unmodifiableList readCommandDefinitions TAG_COMMAND keyConfigurationDefinitions unmodifiableList readKeyConfigurationDefinitions TAG_KEY_CONFIGURATION keySequenceBindingDefinitions unmodifiableList readKeySequenceBindingDefinitions TAG_KEY_SEQUENCE_BINDING commandRegistryChanged activeKeyConfigurationDefinitions activeKeyConfigurationDefinitions activeKeyConfigurationDefinitions activeKeyConfigurationDefinitions commandRegistryChanged categoryDefinitions categoryDefinitions categoryDefinitions categoryDefinitions commandRegistryChanged commandDefinitions commandDefinitions commandDefinitions commandDefinitions commandRegistryChanged keyConfigurationDefinitions keyConfigurationDefinitions keyConfigurationDefinitions keyConfigurationDefinitions commandRegistryChanged keySequenceBindingDefinitions keySequenceBindingDefinitions keySequenceBindingDefinitions keySequenceBindingDefinitions commandRegistryChanged commandRegistryChanged fireCommandRegistryChanged WorkbenchException eWorkbench IOException
Saves all of the preferences to the preference store throws IO Exception If something happens while trying to write to the preference store public void save throws IO Exception XML Memento xml Memento XML Memento create Write Root KEY Persistence write Active Key Configuration Definitions xml Memento Persistence TAG ACTIVE KEY CONFIGURATION active Key Configuration Definitions Persistence write Category Definitions xml Memento Persistence TAG CATEGORY category Definitions Persistence write Command Definitions xml Memento Persistence TAG COMMAND command Definitions Persistence write Key Configuration Definitions xml Memento Persistence TAG KEY CONFIGURATION key Configuration Definitions Persistence write Key Sequence Binding Definitions xml Memento Persistence TAG KEY SEQUENCE BINDING key Sequence Binding Definitions Writer writer new String Writer try xml Memento save writer preference Store set Value KEY writer to String finally writer close  IOException IOException XMLMemento xmlMemento XMLMemento createWriteRoot writeActiveKeyConfigurationDefinitions xmlMemento TAG_ACTIVE_KEY_CONFIGURATION activeKeyConfigurationDefinitions writeCategoryDefinitions xmlMemento TAG_CATEGORY categoryDefinitions writeCommandDefinitions xmlMemento TAG_COMMAND commandDefinitions writeKeyConfigurationDefinitions xmlMemento TAG_KEY_CONFIGURATION keyConfigurationDefinitions writeKeySequenceBindingDefinitions xmlMemento TAG_KEY_SEQUENCE_BINDING keySequenceBindingDefinitions StringWriter xmlMemento preferenceStore setValue toString

Constructs a new instance of code Command Callback code with the workbench it should be using param workbench To Use The workbench that should be used for resolving command information must not be code null code public Command Callback final I Workbench workbench To Use workbench workbench To Use  CommandCallback workbenchToUse CommandCallback IWorkbench workbenchToUse workbenchToUse
public void command Changed Command Event command Event Check if the text has changed if command Event has Name Changed command Event have Key Sequence Bindings Changed Property Change Event event try event new Property Change Event command I Action TEXT null TODO Don t have enough information command get Name catch final Not Defined Exception e event new Property Change Event command I Action TEXT null TODO Don t have enough information null Couldn t get the name listener property Change event TODO Add enabled property change  commandChanged CommandEvent commandEvent commandEvent hasNameChanged commandEvent haveKeySequenceBindingsChanged PropertyChangeEvent PropertyChangeEvent IAction getName NotDefinedException PropertyChangeEvent IAction propertyChange
see org eclipse jface action External Action Manager I Callback add Property Change Listener String I Property Change Listener public void add Property Change Listener final String command Id final I Property Change Listener listener final I Command command workbench get Command Support get Command Manager get Command command Id final I Command Listener command Listener new I Command Listener non Javadoc see org eclipse ui commands I Command Listener command Changed org eclipse ui commands Command Event public void command Changed Command Event command Event Check if the text has changed if command Event has Name Changed command Event have Key Sequence Bindings Changed Property Change Event event try event new Property Change Event command I Action TEXT null TODO Don t have enough information command get Name catch final Not Defined Exception e event new Property Change Event command I Action TEXT null TODO Don t have enough information null Couldn t get the name listener property Change event TODO Add enabled property change command add Command Listener command Listener registered Listeners put listener command Listener  ExternalActionManager ICallback addPropertyChangeListener IPropertyChangeListener addPropertyChangeListener commandId IPropertyChangeListener ICommand getCommandSupport getCommandManager getCommand commandId ICommandListener commandListener ICommandListener ICommandListener commandChanged CommandEvent commandChanged CommandEvent commandEvent commandEvent hasNameChanged commandEvent haveKeySequenceBindingsChanged PropertyChangeEvent PropertyChangeEvent IAction getName NotDefinedException PropertyChangeEvent IAction propertyChange addCommandListener commandListener registeredListeners commandListener
see org eclipse jface action External Action Manager I Callback get Accelerator String public final Integer get Accelerator final String command Id final I Command command workbench get Command Support get Command Manager get Command command Id Integer accelerator null if command is Defined List key Sequence Bindings command get Key Sequence Bindings final int size key Sequence Bindings size for int i 0 i size i I Key Sequence Binding key Sequence Binding I Key Sequence Binding key Sequence Bindings get i List key Strokes key Sequence Binding get Key Sequence get Key Strokes if key Strokes size 1 Key Stroke key Stroke Key Stroke key Strokes get 0 accelerator new Integer SWT Key Support convert Key Stroke To Accelerator key Stroke break return accelerator  ExternalActionManager ICallback getAccelerator getAccelerator commandId ICommand getCommandSupport getCommandManager getCommand commandId isDefined keySequenceBindings getKeySequenceBindings keySequenceBindings IKeySequenceBinding keySequenceBinding IKeySequenceBinding keySequenceBindings keyStrokes keySequenceBinding getKeySequence getKeyStrokes keyStrokes KeyStroke keyStroke KeyStroke keyStrokes SWTKeySupport convertKeyStrokeToAccelerator keyStroke
see org eclipse jface action External Action Manager I Callback get Accelerator Text String public final String get Accelerator Text final String command Id final I Command command workbench get Command Support get Command Manager get Command command Id String accelerator Text null if command is Defined List key Sequence Bindings command get Key Sequence Bindings if key Sequence Bindings is Empty I Key Sequence Binding key Sequence Binding I Key Sequence Binding key Sequence Bindings get 0 accelerator Text key Sequence Binding get Key Sequence format return accelerator Text  ExternalActionManager ICallback getAcceleratorText getAcceleratorText commandId ICommand getCommandSupport getCommandManager getCommand commandId acceleratorText isDefined keySequenceBindings getKeySequenceBindings keySequenceBindings isEmpty IKeySequenceBinding keySequenceBinding IKeySequenceBinding keySequenceBindings acceleratorText keySequenceBinding getKeySequence acceleratorText
see org eclipse jface action External Action Manager I Callback is Accelerator In Use int public boolean is Accelerator In Use int accelerator final Key Sequence key Sequence Key Sequence get Instance SWT Key Support convert Accelerator To Key Stroke accelerator final I Command Manager command Manager workbench get Command Support get Command Manager return command Manager is Perfect Match key Sequence command Manager is Partial Match key Sequence  ExternalActionManager ICallback isAcceleratorInUse isAcceleratorInUse KeySequence keySequence KeySequence getInstance SWTKeySupport convertAcceleratorToKeyStroke ICommandManager commandManager getCommandSupport getCommandManager commandManager isPerfectMatch keySequence commandManager isPartialMatch keySequence
see org eclipse jface action External Action Manager I Callback is Active String public final boolean is Active final String command Id if command Id null final I Command command workbench get Command Support get Command Manager get Command command Id if command null return command is Defined workbench get Activity Support get Activity Manager get Identifier command get Id is Enabled return true  ExternalActionManager ICallback isActive isActive commandId commandId ICommand getCommandSupport getCommandManager getCommand commandId isDefined getActivitySupport getActivityManager getIdentifier getId isEnabled
see org eclipse jface action External Action Manager I Callback remove Property Change Listener String I Property Change Listener public final void remove Property Change Listener final String command Id final I Property Change Listener listener final I Command command workbench get Command Support get Command Manager get Command command Id final Object associated Listener registered Listeners remove listener if associated Listener instanceof I Command Listener final I Command Listener command Listener I Command Listener associated Listener command remove Command Listener command Listener  ExternalActionManager ICallback removePropertyChangeListener IPropertyChangeListener removePropertyChangeListener commandId IPropertyChangeListener ICommand getCommandSupport getCommandManager getCommand commandId associatedListener registeredListeners associatedListener ICommandListener ICommandListener commandListener ICommandListener associatedListener removeCommandListener commandListener

Disposes this entry by releasing its native resources if any void dispose if image null image dispose image null if gray Image null gray Image dispose gray Image null  grayImage grayImage grayImage
Disposes the cache by calling dispose an all of its entries void dispose for Iterator i entries values iterator i has Next Entry i next dispose entries clear  hasNext
If the entry is already in the cache then it simply returns a reference Otherwise it creates a new entry in the cache and returns a reference to that param descriptor The descriptor to look up in the cache should not be code null code return The entry for that descriptor never code null code Entry get Entry Image Descriptor descriptor Entry entry Entry entries get descriptor if entry null entry new Entry entries put descriptor entry return entry  getEntry ImageDescriptor
Retrieves a greyed representation of the image of the corresponding URI from the cache If the image is not in the cache then it tries to load the image If the image URI is invalid then it returns the missing image param imageURI The URI at which the image is located may be code null code return The image at the URI or the missing image if it is invalid If the URI is code null code then this returns code null code as well Image get Gray Image String imageURI if imageURI null return null try Image Descriptor descriptor Image Descriptor create FromURL new URL imageURI Entry entry get Entry descriptor if entry gray Image null Image image get Image imageURI if image null entry gray Image new Image null image SWT IMAGE GRAY return entry gray Image catch MalformedURL Exception e return new Image null get Missing Image SWT IMAGE GRAY  getGrayImage ImageDescriptor ImageDescriptor createFromURL getEntry grayImage getImage grayImage IMAGE_GRAY grayImage MalformedURLException getMissingImage IMAGE_GRAY
Retrieves the image of the corresponding URI from the cache If the image is not in the cache then it tries to load the image If the image URI is invalid then it returns the missing image param imageURI The URI at which the image is located may be code null code return The image at the URI or the missing image if it is invalid If the URI is code null code then this returns code null code as well Image get Image String imageURI if imageURI null return null try Image Descriptor descriptor Image Descriptor create FromURL new URL imageURI Entry entry get Entry descriptor if entry image null entry image descriptor create Image return entry image catch MalformedURL Exception e return get Missing Image  getImage ImageDescriptor ImageDescriptor createFromURL getEntry createImage MalformedURLException getMissingImage
Retrieves the missing image from the cache If the image isn t available then it loads it into the cache return The missing image never code null code Image get Missing Image if missing Image null Image Descriptor descriptor Image Descriptor get Missing Image Descriptor Entry entry get Entry descriptor if entry image null entry image descriptor create Image missing Image entry image return missing Image  getMissingImage missingImage ImageDescriptor ImageDescriptor getMissingImageDescriptor getEntry createImage missingImage missingImage
Returns whether color icons should be used in toolbars return code true code if color icons should be used in toolbars code false code otherwise public static boolean get Use Colour Icons In Toolbars return use Colour Icons  getUseColourIconsInToolbars useColourIcons
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 to be stripped must not be code null code return The text sans accelerator never code null code 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
Sets whether color icons should be used in toolbars param new Value code true code if color icons should be used in toolbars code false code otherwise public static void set Use Colour Icons In Toolbars boolean new Value use Colour Icons new Value  newValue setUseColourIconsInToolbars newValue useColourIcons newValue
Creates a new contribution item from the given command The id of the command is used as the id of the item param command The command from which this contribution item should be constructed must not be code null code public Command Contribution Item I Command command To Use super command To Use get Id command command To Use help Listener Workbench Help create Help Listener command To Use  CommandContributionItem ICommand commandToUse commandToUse getId commandToUse helpListener WorkbenchHelp createHelpListener commandToUse
else display async Exec new Runnable public void run update e  asyncExec
Handles a change event on the command This performs an update of the underlying widget to reflect the change param e The triggering event must not be code null code public void command Changed final Command Event e This code should be removed Avoid using free async Exec if is Visible widget null Display display widget get Display if display get Thread Thread current Thread update e else display async Exec new Runnable public void run update e  commandChanged CommandEvent asyncExec isVisible getDisplay getThread currentThread asyncExec
Compares this command contribution item with another object Two command contribution items are equal if they refer to the equivalent command param o The object with which to compare may be code null code public boolean equals Object o if o instanceof Command Contribution Item return false return command equals Command Contribution Item o command  CommandContributionItem CommandContributionItem
The code Command Contribution Item code implementation of this code I Contribution Item code method creates an SWT code Button code for the command using the command s style If the command s checked property has been set the button is created and primed to the value of the checked property param parent The composite parent which this contribution should place itself on must not be code null code public void fill Composite parent if widget null parent null int flags SWT PUSH if command null TODO STYLE if action get Style I Action AS CHECK BOX flags SWT TOGGLE if action get Style I Action AS RADIO BUTTON flags SWT RADIO Button b new Button parent flags b set Data this b add Listener SWT Dispose get Button Listener Don t hook a dispose listener on the parent b add Listener SWT Selection get Button Listener b add Help Listener help Listener widget b update command add Command Listener this  CommandContributionItem IContributionItem getStyle IAction AS_CHECK_BOX getStyle IAction AS_RADIO_BUTTON setData addListener getButtonListener addListener getButtonListener addHelpListener helpListener addCommandListener
The code Command Contribution Item code implementation of this code I Contribution Item code method creates an SWT code Menu Item code for the action using the command s style If the command s checked property has been set a button is created and primed to the value of the checked property If the command s menu creator property has been set a cascading submenu is created param parent The menu on which this contribution item should place itself must not be code null code param index The index at which this contribution item should place itself If it is a negative number then this simply appends the item public void fill Menu parent int index if widget null parent null Menu sub Menu null int flags SWT PUSH if command null TODO STYLE int style action get Style if style I Action AS CHECK BOX flags SWT CHECK else if style I Action AS RADIO BUTTON flags SWT RADIO else if style I Action AS DROP DOWN MENU I Menu Creator mc action get Menu Creator if mc null sub Menu mc get Menu parent flags SWT CASCADE Menu Item mi null if index 0 mi new Menu Item parent flags index else mi new Menu Item parent flags widget mi mi set Data this mi add Listener SWT Dispose get Menu Item Listener mi add Listener SWT Selection get Menu Item Listener mi add Help Listener help Listener if sub Menu null mi set Menu sub Menu update command add Command Listener this  CommandContributionItem IContributionItem MenuItem subMenu getStyle IAction AS_CHECK_BOX IAction AS_RADIO_BUTTON IAction AS_DROP_DOWN_MENU IMenuCreator getMenuCreator subMenu getMenu MenuItem MenuItem MenuItem setData addListener getMenuItemListener addListener getMenuItemListener addHelpListener helpListener subMenu setMenu subMenu addCommandListener
The code Command Contribution Item code implementation of this code I Contribution Item code method creates an SWT code Tool Item code for the command using the command s style If the command s checked property has been set a button is created and primed to the value of the checked property If the command s menu creator property has been set a drop down tool item is created param parent The tool bar on which this contribution item should place itself must not be code null code param index The index at which this contribution item should place itself If it is a negative number then this simply appends the item public void fill Tool Bar parent int index if widget null parent null int flags SWT PUSH if command null TODO STYLE int style action get Style if style I Action AS CHECK BOX flags SWT CHECK else if style I Action AS RADIO BUTTON flags SWT RADIO else if style I Action AS DROP DOWN MENU flags SWT DROP DOWN Tool Item ti null if index 0 ti new Tool Item parent flags index else ti new Tool Item parent flags ti set Data this ti add Listener SWT Selection get Tool Item Listener ti add Listener SWT Dispose get Tool Item Listener widget ti update command add Command Listener this  CommandContributionItem IContributionItem ToolItem ToolBar getStyle IAction AS_CHECK_BOX IAction AS_RADIO_BUTTON IAction AS_DROP_DOWN_MENU DROP_DOWN ToolItem ToolItem ToolItem setData addListener getToolItemListener addListener getToolItemListener addCommandListener
button Listener new Listener public void handle Event Event event switch event type case SWT Dispose handle Widget Dispose event break case SWT Selection Widget ew event widget if ew null handle Widget Selection event Button ew get Selection break  buttonListener handleEvent handleWidgetDispose handleWidgetSelection getSelection
Returns the listener for SWT button widget events This lazy initializes the listener return A listener for button events never code null code private Listener get Button Listener if button Listener null button Listener new Listener public void handle Event Event event switch event type case SWT Dispose handle Widget Dispose event break case SWT Selection Widget ew event widget if ew null handle Widget Selection event Button ew get Selection break return button Listener  getButtonListener buttonListener buttonListener handleEvent handleWidgetDispose handleWidgetSelection getSelection buttonListener
Returns the command associated with this contribution item return The associated command never code null code public I Command get Command return command  ICommand getCommand
display dispose Exec new Runnable public void run if global Image Cache null global Image Cache dispose global Image Cache null  disposeExec globalImageCache globalImageCache globalImageCache
Returns the image cache The cache is global and is shared by all command contribution items This has the disadvantage that once an image is allocated it is never freed until the display is disposed However it has the advantage that the same image in different contribution managers is only ever created once param The global image cache for command contribution items never code null code private Image Cache get Image Cache Image Cache cache global Image Cache if cache null global Image Cache cache new Image Cache Display display Display get Default if display null display dispose Exec new Runnable public void run if global Image Cache null global Image Cache dispose global Image Cache null return cache  ImageCache getImageCache ImageCache globalImageCache globalImageCache ImageCache getDefault disposeExec globalImageCache globalImageCache globalImageCache
menu Item Listener new Listener public void handle Event Event event switch event type case SWT Dispose handle Widget Dispose event break case SWT Selection Widget ew event widget if ew null handle Widget Selection event Menu Item ew get Selection break  menuItemListener handleEvent handleWidgetDispose handleWidgetSelection MenuItem getSelection
Returns the listener for SWT menu item widget events The listener is lazy initialized when this method is first called return A listener for menu item events never code null code private Listener get Menu Item Listener if menu Item Listener null menu Item Listener new Listener public void handle Event Event event switch event type case SWT Dispose handle Widget Dispose event break case SWT Selection Widget ew event widget if ew null handle Widget Selection event Menu Item ew get Selection break return menu Item Listener  getMenuItemListener menuItemListener menuItemListener handleEvent handleWidgetDispose handleWidgetSelection MenuItem getSelection menuItemListener
tool Item Listener new Listener public void handle Event Event event switch event type case SWT Dispose handle Widget Dispose event break case SWT Selection Widget ew event widget if ew null handle Widget Selection event Tool Item ew get Selection break  toolItemListener handleEvent handleWidgetDispose handleWidgetSelection ToolItem getSelection
Returns the listener for SWT tool item widget events The listener is lazy initialized when this method is first called return A listener for tool item events never code null code private Listener get Tool Item Listener if tool Item Listener null tool Item Listener new Listener public void handle Event Event event switch event type case SWT Dispose handle Widget Dispose event break case SWT Selection Widget ew event widget if ew null handle Widget Selection event Tool Item ew get Selection break return tool Item Listener  getToolItemListener toolItemListener toolItemListener handleEvent handleWidgetDispose handleWidgetSelection ToolItem getSelection toolItemListener
Handles a widget dispose event for the widget corresponding to this item This detaches the command listener and disposes the menu creator if there is one param e The triggering dispose event must not be code null code private void handle Widget Dispose Event e if e widget widget the item is being disposed TODO STYLE if action get Style I Action AS DROP DOWN MENU I Menu Creator mc action get Menu Creator if mc null mc dispose command remove Command Listener this widget null  handleWidgetDispose getStyle IAction AS_DROP_DOWN_MENU IMenuCreator getMenuCreator removeCommandListener
Handles a widget selection event param e The triggering selection event must not be code null code param selection Whether the item is becoming selected as opposed to de selected private void handle Widget Selection Event e boolean selection Widget item e widget if item null TODO STYLE int style item get Style if style SWT TOGGLE SWT CHECK 0 if action get Style I Action AS CHECK BOX action set Checked selection else if style SWT RADIO 0 if action get Style I Action AS RADIO BUTTON action set Checked selection else if style SWT DROP DOWN 0 if e detail 4 on drop down button if action get Style I Action AS DROP DOWN MENU I Menu Creator mc action get Menu Creator Tool Item ti Tool Item item we create the menu as a sub menu of dummy so that we can use it in a cascading menu too If created on a SWT control we would get an SWT error Menu dummy new Menu ti get Parent Menu m mc get Menu dummy dummy dispose if mc null Menu m mc get Menu ti get Parent if m null position the menu below the drop down item Rectangle b ti get Bounds Point p ti get Parent to Display new Point b x b y b height m set Location p x p y waiting for SWT 0 42 m set Visible true return we don t fire the action Ensure command is enabled first See 1GAN3M6 ITPUI WINNT Any I Action in the workbench can be executed while disabled if is Enabled command boolean trace true equals Ignore Case Platform get Debug Option org eclipse jface trace actions NON NLS 1 NON NLS 2 long ms System current Time Millis try if trace System out println Running command command get Name NON NLS 1 TODO Dispatching commands command run With Event e if trace System out println System current Time Millis ms ms to run command command get Name NON NLS 1 catch Not Defined Exception nde TODO Warn the user that the command is now gone update update the GUI  handleWidgetSelection getStyle getStyle IAction AS_CHECK_BOX setChecked getStyle IAction AS_RADIO_BUTTON setChecked DROP_DOWN getStyle IAction AS_DROP_DOWN_MENU IMenuCreator getMenuCreator ToolItem ToolItem getParent getMenu getMenu getParent getBounds getParent toDisplay setLocation setVisible IAction isEnabled equalsIgnoreCase getDebugOption currentTimeMillis getName runWithEvent currentTimeMillis getName NotDefinedException
non Javadoc Method declared on Object public int hash Code return command hash Code  hashCode hashCode
The command item implementation of this code I Contribution Item code method returns code true code for menu items and code false code for everything else public boolean is Dynamic if widget instanceof Menu Item Optimization Only recreate the item is the check or radio style has changed TODO STYLE boolean item Is Check widget get Style SWT CHECK 0 boolean action Is Check get Action null get Action get Style I Action AS CHECK BOX boolean item Is Radio widget get Style SWT RADIO 0 boolean action Is Radio get Action null get Action get Style I Action AS RADIO BUTTON return item Is Check action Is Check item Is Radio action Is Radio return false return false  IContributionItem isDynamic MenuItem itemIsCheck getStyle actionIsCheck getAction getAction getStyle IAction AS_CHECK_BOX itemIsRadio getStyle actionIsRadio getAction getAction getStyle IAction AS_RADIO_BUTTON itemIsCheck actionIsCheck itemIsRadio actionIsRadio
non Javadoc Method declared on I Contribution Item public boolean is Enabled return is Enabled command  IContributionItem isEnabled isEnabled
private static boolean is Enabled I Command command try Map attribute Values By Name command get Attribute Values By Name if attribute Values By Name contains Key enabled NON NLS 1 Boolean TRUE equals attribute Values By Name get enabled NON NLS 1 return false else return true catch Not Handled Exception e Not Handled return false  isEnabled ICommand attributeValuesByName getAttributeValuesByName attributeValuesByName containsKey attributeValuesByName NotHandledException eNotHandled
Returns code true code if this item is allowed to enable code false code otherwise return If this item is allowed to be enabled since 2 0 protected boolean is Enabled Allowed if get Parent null return true Boolean value get Parent get Overrides get Enabled this return value null true value boolean Value  isEnabledAllowed getParent getParent getOverrides getEnabled booleanValue
Whether this contribution item should be visible return code true code if the command is active code false code otherwise public boolean is Visible return true TODO visiblity should consider the activity and context managers  isVisible
The command item implementation of this code I Contribution Item code method calls code update null code public void update update Command Event null  IContributionItem CommandEvent
Synchronizes the UI with the given property param event The event triggering the update which specifies how much of the command changed If code null code then everything is updated public void update Command Event event if widget null I Command current Command get Command Determine what to do boolean description Changed true boolean name Changed true boolean enabled Changed true boolean checked Changed true if event null description Changed event has Description Changed name Changed event has Name Changed TODO Enable change notification enabled Changed event has Enabled Changed TODO Checked state notification checked Changed event has Selection Changed if event has Defined Changed current Command is Defined TODO event has Active Changed current Command is Active TODO Dispose of the item try Update the widget as a Tool Item if widget instanceof Tool Item Tool Item ti Tool Item widget if description Changed ti set Tool Tip Text current Command get Description if enabled Changed boolean should Be Enabled is Enabled current Command is Enabled Allowed if ti get Enabled should Be Enabled ti set Enabled should Be Enabled if checked Changed TODO Selection state boolean bv command is Checked if ti get Selection bv ti set Selection bv return Update the widget as a Menu Item if widget instanceof Menu Item Menu Item mi Menu Item widget if name Changed Integer accelerator null String accelerator Text null String name null External Action Manager I Callback callback External Action Manager get Instance get Callback if callback null String command Id current Command get Id if command Id null accelerator callback get Accelerator command Id accelerator Text callback get Accelerator Text command Id I Contribution Manager Overrides overrides null if get Parent null overrides get Parent get Overrides if overrides null name get Parent get Overrides get Text this if accelerator null TODO Not necessary accelerator new Integer command get Accelerator mi set Accelerator accelerator int Value if name null name current Command get Name if name null name NON NLS 1 else name remove Accelerator Text name if accelerator Text null mi set Text name else mi set Text name t accelerator Text if enabled Changed boolean should Be Enabled is Enabled current Command is Enabled Allowed if mi get Enabled should Be Enabled mi set Enabled should Be Enabled if checked Changed TODO Selection state needed boolean bv command is Checked if mi get Selection bv mi set Selection bv return Update the widget as a button if widget instanceof Button Button button Button widget if name Changed String name current Command get Name if name null button set Text name if description Changed button set Tool Tip Text current Command get Description if enabled Changed boolean should Be Enabled is Enabled current Command is Enabled Allowed if button get Enabled should Be Enabled button set Enabled should Be Enabled if checked Changed TODO Selection state needed boolean bv action is Checked if button get Selection bv button set Selection bv return catch Not Defined Exception e This shouldn t happen very often It can only happen in a multi threaded environment where a command becomes undefined on one thread while another thread is attempting an update TODO Dispose of the item  CommandEvent ICommand currentCommand getCommand descriptionChanged nameChanged enabledChanged checkedChanged descriptionChanged hasDescriptionChanged nameChanged hasNameChanged enabledChanged hasEnabledChanged checkedChanged hasSelectionChanged hasDefinedChanged currentCommand isDefined hasActiveChanged currentCommand isActive ToolItem ToolItem ToolItem ToolItem descriptionChanged setToolTipText currentCommand getDescription enabledChanged shouldBeEnabled isEnabled currentCommand isEnabledAllowed getEnabled shouldBeEnabled setEnabled shouldBeEnabled checkedChanged isChecked getSelection setSelection MenuItem MenuItem MenuItem MenuItem nameChanged acceleratorText ExternalActionManager ICallback ExternalActionManager getInstance getCallback commandId currentCommand getId commandId getAccelerator commandId acceleratorText getAcceleratorText commandId IContributionManagerOverrides getParent getParent getOverrides getParent getOverrides getText getAccelerator setAccelerator intValue currentCommand getName removeAcceleratorText acceleratorText setText setText acceleratorText enabledChanged shouldBeEnabled isEnabled currentCommand isEnabledAllowed getEnabled shouldBeEnabled setEnabled shouldBeEnabled checkedChanged isChecked getSelection setSelection nameChanged currentCommand getName setText descriptionChanged setToolTipText currentCommand getDescription enabledChanged shouldBeEnabled isEnabled currentCommand isEnabledAllowed getEnabled shouldBeEnabled setEnabled shouldBeEnabled checkedChanged isChecked getSelection setSelection NotDefinedException

public void dispose for Iterator iterator commands iterator iterator has Next I Command command I Command iterator next command remove Command Listener command Listener commands clear  hasNext ICommand ICommand removeCommandListener commandListener
public Object get Elements Object input Element Set defined Command Ids new Hash Set command Manager get Defined Command Ids for Iterator iterator commands iterator iterator has Next I Command command I Command iterator next if defined Command Ids remove command get Id command remove Command Listener command Listener commands remove command for Iterator iterator defined Command Ids iterator iterator has Next String command Id String iterator next I Command command command Manager get Command command Id command add Command Listener command Listener commands add command return commands to Array  getElements inputElement definedCommandIds HashSet commandManager getDefinedCommandIds hasNext ICommand ICommand definedCommandIds getId removeCommandListener commandListener definedCommandIds hasNext commandId ICommand commandManager getCommand commandId addCommandListener commandListener toArray
public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
implements I Table Label Provider public Image get Column Image Object element int column Index return null  ITableLabelProvider getColumnImage columnIndex
public String get Column Text Object element int column Index I Command command I Command element if column Index 0 return command get Id else if column Index 1 try return command get Name catch Not Defined Exception e Not Defined return not defined NON NLS 1 else if column Index 2 String Buffer string Buffer new String Buffer List key Sequence Bindings command get Key Sequence Bindings for int i 0 i key Sequence Bindings size i I Key Sequence Binding key Sequence Binding I Key Sequence Binding key Sequence Bindings get i Key Sequence key Sequence key Sequence Binding get Key Sequence if i 1 string Buffer append NON NLS 1 string Buffer append key Sequence format return string Buffer to String return null  getColumnText columnIndex ICommand ICommand columnIndex getId columnIndex getName NotDefinedException eNotDefined columnIndex StringBuffer stringBuffer StringBuffer keySequenceBindings getKeySequenceBindings keySequenceBindings IKeySequenceBinding keySequenceBinding IKeySequenceBinding keySequenceBindings KeySequence keySequence keySequenceBinding getKeySequence stringBuffer stringBuffer keySequence stringBuffer toString
private I Command Listener command Listener new I Command Listener public void command Changed Command Event command Event table Viewer refresh  ICommandListener commandListener ICommandListener commandChanged CommandEvent commandEvent tableViewer
private I Command Manager command Manager private I Command Manager Listener command Manager Listener new I Command Manager Listener public void command Manager Changed Command Manager Event command Manager Event table Viewer refresh  ICommandManager commandManager ICommandManagerListener commandManagerListener ICommandManagerListener commandManagerChanged CommandManagerEvent commandManagerEvent tableViewer
private Table Viewer table Viewer public void dispose command Manager remove Command Manager Listener command Manager Listener table dispose  TableViewer tableViewer commandManager removeCommandManagerListener commandManagerListener
public void create Part Control Composite parent Grid Layout grid Layout new Grid Layout grid Layout margin Height 0 grid Layout margin Width 0 parent set Layout grid Layout table new Table parent SWT BORDER SWT FULL SELECTION SWT H SCROLL SWT V SCROLL table set Header Visible true Grid Data grid Data new Grid Data Grid Data FILL BOTH grid Data height Hint 200 table set Layout Data grid Data Table Column table Column Id new Table Column table SWT NULL 0 table Column Id set Resizable true table Column Id set Text ID NON NLS 1 table Column Id set Width 200 Table Column table Column Name new Table Column table SWT NULL 1 table Column Name set Resizable true table Column Name set Text Name NON NLS 1 table Column Name set Width 200 Table Column table Column Key Sequences new Table Column table SWT NULL 2 table Column Key Sequences set Resizable true table Column Key Sequences set Text Key Sequences NON NLS 1 table Column Key Sequences set Width 200 command Manager PlatformUI get Workbench get Command Support get Command Manager table Viewer new Table Viewer table table Viewer set Content Provider new Command Content Provider table Viewer set Label Provider new Command Label Provider table Viewer set Input new Object command Manager add Command Manager Listener command Manager Listener table Viewer refresh  createPartControl GridLayout gridLayout GridLayout gridLayout marginHeight gridLayout marginWidth setLayout gridLayout FULL_SELECTION H_SCROLL V_SCROLL setHeaderVisible GridData gridData GridData GridData FILL_BOTH gridData heightHint setLayoutData gridData TableColumn tableColumnId TableColumn tableColumnId setResizable tableColumnId setText tableColumnId setWidth TableColumn tableColumnName TableColumn tableColumnName setResizable tableColumnName setText tableColumnName setWidth TableColumn tableColumnKeySequences TableColumn tableColumnKeySequences setResizable tableColumnKeySequences setText tableColumnKeySequences setWidth commandManager getWorkbench getCommandSupport getCommandManager tableViewer TableViewer tableViewer setContentProvider CommandContentProvider tableViewer setLabelProvider CommandLabelProvider tableViewer setInput commandManager addCommandManagerListener commandManagerListener tableViewer
public void set Focus if table null table is Disposed table set Focus  setFocus isDisposed setFocus

public void dispose for Iterator iterator commands iterator iterator has Next I Command command I Command iterator next command remove Command Listener command Listener commands clear  hasNext ICommand ICommand removeCommandListener commandListener
public Object get Elements Object input Element Set defined Command Ids new Hash Set command Manager get Defined Command Ids for Iterator iterator commands iterator iterator has Next I Command command I Command iterator next if defined Command Ids remove command get Id command remove Command Listener command Listener commands remove command for Iterator iterator defined Command Ids iterator iterator has Next String command Id String iterator next I Command command command Manager get Command command Id command add Command Listener command Listener commands add command return commands to Array  getElements inputElement definedCommandIds HashSet commandManager getDefinedCommandIds hasNext ICommand ICommand definedCommandIds getId removeCommandListener commandListener definedCommandIds hasNext commandId ICommand commandManager getCommand commandId addCommandListener commandListener toArray
public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
implements I Table Label Provider public Image get Column Image Object element int column Index return null  ITableLabelProvider getColumnImage columnIndex
public String get Column Text Object element int column Index I Command command I Command element if column Index 0 return command get Id else if column Index 1 try return command get Name catch Not Defined Exception e Not Defined return not defined NON NLS 1 else if column Index 2 String Buffer string Buffer new String Buffer List key Sequence Bindings command get Key Sequence Bindings for int i 0 i key Sequence Bindings size i I Key Sequence Binding key Sequence Binding I Key Sequence Binding key Sequence Bindings get i Key Sequence key Sequence key Sequence Binding get Key Sequence if i 1 string Buffer append NON NLS 1 string Buffer append key Sequence format return string Buffer to String return null  getColumnText columnIndex ICommand ICommand columnIndex getId columnIndex getName NotDefinedException eNotDefined columnIndex StringBuffer stringBuffer StringBuffer keySequenceBindings getKeySequenceBindings keySequenceBindings IKeySequenceBinding keySequenceBinding IKeySequenceBinding keySequenceBindings KeySequence keySequence keySequenceBinding getKeySequence stringBuffer stringBuffer keySequence stringBuffer toString
private I Command Listener command Listener new I Command Listener public void command Changed Command Event command Event table Viewer refresh  ICommandListener commandListener ICommandListener commandChanged CommandEvent commandEvent tableViewer
private I Command Manager command Manager private I Command Manager Listener command Manager Listener new I Command Manager Listener public void command Manager Changed Command Manager Event command Manager Event table Viewer refresh  ICommandManager commandManager ICommandManagerListener commandManagerListener ICommandManagerListener commandManagerChanged CommandManagerEvent commandManagerEvent tableViewer
private Table Viewer table Viewer public void dispose command Manager remove Command Manager Listener command Manager Listener table dispose  TableViewer tableViewer commandManager removeCommandManagerListener commandManagerListener
public void create Part Control Composite parent Grid Layout grid Layout new Grid Layout grid Layout margin Height 0 grid Layout margin Width 0 parent set Layout grid Layout table new Table parent SWT BORDER SWT FULL SELECTION SWT H SCROLL SWT V SCROLL table set Header Visible true Grid Data grid Data new Grid Data Grid Data FILL BOTH grid Data height Hint 200 table set Layout Data grid Data Table Column table Column Id new Table Column table SWT NULL 0 table Column Id set Resizable true table Column Id set Text ID NON NLS 1 table Column Id set Width 200 Table Column table Column Name new Table Column table SWT NULL 1 table Column Name set Resizable true table Column Name set Text Name NON NLS 1 table Column Name set Width 200 Table Column table Column Key Sequences new Table Column table SWT NULL 2 table Column Key Sequences set Resizable true table Column Key Sequences set Text Key Sequences NON NLS 1 table Column Key Sequences set Width 200 command Manager PlatformUI get Workbench get Command Support get Command Manager table Viewer new Table Viewer table table Viewer set Content Provider new Command Content Provider table Viewer set Label Provider new Command Label Provider table Viewer set Input new Object command Manager add Command Manager Listener command Manager Listener table Viewer refresh  createPartControl GridLayout gridLayout GridLayout gridLayout marginHeight gridLayout marginWidth setLayout gridLayout FULL_SELECTION H_SCROLL V_SCROLL setHeaderVisible GridData gridData GridData GridData FILL_BOTH gridData heightHint setLayoutData gridData TableColumn tableColumnId TableColumn tableColumnId setResizable tableColumnId setText tableColumnId setWidth TableColumn tableColumnName TableColumn tableColumnName setResizable tableColumnName setText tableColumnName setWidth TableColumn tableColumnKeySequences TableColumn tableColumnKeySequences setResizable tableColumnKeySequences setText tableColumnKeySequences setWidth commandManager getWorkbench getCommandSupport getCommandManager tableViewer TableViewer tableViewer setContentProvider CommandContentProvider tableViewer setLabelProvider CommandLabelProvider tableViewer setInput commandManager addCommandManagerListener commandManagerListener tableViewer
public void set Focus if table null table is Disposed table set Focus  setFocus isDisposed setFocus

Constructs a new instance of code Handler Proxy code with all the information it needs to try to avoid loading until it is needed param new Command Id The identifier for the command to which this proxy should be associated must not be code null code param new Configuration Element The configuration element from which the real class can be loaded at run time public Handler Proxy final String new Command Id final I Configuration Element new Configuration Element command Id new Command Id configuration Element new Configuration Element handler null  HandlerProxy newCommandId newConfigurationElement HandlerProxy newCommandId IConfigurationElement newConfigurationElement commandId newCommandId configurationElement newConfigurationElement
Passes the dipose on to the proxied handler if it has been loaded public void dispose if handler null handler dispose 
see I Handler execute Map public Object execute Map parameter Values By Name throws Execution Exception if load Handler return handler execute parameter Values By Name return null  IHandler parameterValuesByName ExecutionException loadHandler parameterValuesByName
An accessor for the identifier of the command to which the proxied handler should be associated return The command identifier should never be code null code final String get Command Id return command Id  getCommandId commandId
see I Handler get Attribute Values By Name public Map get Attribute Values By Name if load Handler return handler get Attribute Values By Name else return Collections EMPTY MAP  IHandler getAttributeValuesByName getAttributeValuesByName loadHandler getAttributeValuesByName EMPTY_MAP
Loads the handler if possible If the handler is loaded then the member variables are updated accordingly return code true code if the handler is now non null code false code otherwise private final boolean load Handler if handler null Load the handler try handler I Handler configuration Element create Executable Extension HANDLER ATTRIBUTE NAME configuration Element null return true catch final Core Exception e TODO If it can t be instantiated should future attempts to instantiate be blocked final String message The proxied handler for command Id NON NLS 1 could not be loaded NON NLS 1 I Status status new Status I Status ERROR Workbench Plugin PI WORKBENCH 0 message e Workbench Plugin log message status return false return true  loadHandler IHandler configurationElement createExecutableExtension HANDLER_ATTRIBUTE_NAME configurationElement CoreException commandId IStatus IStatus WorkbenchPlugin PI_WORKBENCH WorkbenchPlugin

public interface I Command Service void add Handler Submission String command Id I Handler handler  ICommandService addHandlerSubmission commandId IHandler
void add Handler Submission String command Id I Handler handler void add Handler Submissions Map handlers By Command Id  addHandlerSubmission commandId IHandler addHandlerSubmissions handlersByCommandId
void add Handler Submissions Map handlers By Command Id void remove Handler Submission String command Id I Handler handler  addHandlerSubmissions handlersByCommandId removeHandlerSubmission commandId IHandler
void remove Handler Submission String command Id I Handler handler void remove Handler Submissions Map handlers By Command Id  removeHandlerSubmission commandId IHandler removeHandlerSubmissions handlersByCommandId

see org eclipse ui commands I Handler execute Map public Object execute Map parameter Values By Name throws Execution Exception final Method method To Execute get Method To Execute if method To Execute null try final Control focus Control Display get Current get Focus Control final int num Params method To Execute get Parameter Types length if num Params 0 This is a no argument select All method method To Execute invoke focus Control null else if num Params 1 This is a single point selection method final Method text Limit Accessor focus Control get Class get Method get Text Limit NO PARAMETERS NON NLS 1 final Integer text Limit Integer text Limit Accessor invoke focus Control null final Object parameters new Point 0 text Limit int Value method To Execute invoke focus Control parameters else This means that get Method To Execute has been changed while this method hasn t throw new Execution Exception Too many parameters on select all new Exception NON NLS 1 catch Illegal Access Exception e The method is protected so do nothing catch Invocation Target Exception e throw new Execution Exception An exception occurred while executing NON NLS 1 get Method To Execute e get Target Exception catch No Such Method Exception e I can t get the text limit Do nothing return null  IHandler parameterValuesByName ExecutionException methodToExecute getMethodToExecute methodToExecute focusControl getCurrent getFocusControl numParams methodToExecute getParameterTypes numParams selectAll methodToExecute focusControl numParams textLimitAccessor focusControl getClass getMethod getTextLimit NO_PARAMETERS textLimit textLimitAccessor focusControl textLimit intValue methodToExecute focusControl getMethodToExecute ExecutionException IllegalAccessException InvocationTargetException ExecutionException getMethodToExecute getTargetException NoSuchMethodException
Looks up the select all method on the given focus control return The method on the focus control code null code if none protected Method get Method To Execute Method method super get Method To Execute Let s see if we have a control that supports point based selection if method null final Control focus Control Display get Current get Focus Control try method focus Control get Class get Method set Selection NON NLS 1 METHOD PARAMETERS catch No Such Method Exception e Do nothing return method  getMethodToExecute getMethodToExecute focusControl getCurrent getFocusControl focusControl getClass getMethod setSelection METHOD_PARAMETERS NoSuchMethodException
see org eclipse core runtime I Executable Extension set Initialization Data org eclipse core runtime I Configuration Element java lang String java lang Object public void set Initialization Data I Configuration Element config String property Name Object data The name is always select All method Name select All NON NLS 1  IExecutableExtension setInitializationData IConfigurationElement setInitializationData IConfigurationElement propertyName selectAll methodName selectAll

public Object execute Map parameter Values By Name throws Execution Exception final Method method To Execute get Method To Execute if method To Execute null try final Control focus Control Display get Current get Focus Control method To Execute invoke focus Control null catch Illegal Access Exception e The method is protected so do nothing catch Invocation Target Exception e throw new Execution Exception An exception occurred while executing NON NLS 1 get Method To Execute e get Target Exception return null  parameterValuesByName ExecutionException methodToExecute getMethodToExecute methodToExecute focusControl getCurrent getFocusControl methodToExecute focusControl IllegalAccessException InvocationTargetException ExecutionException getMethodToExecute getTargetException
public Map get Attribute Values By Name Map attribute Values By Name new Hash Map attribute Values By Name put ATTRIBUTE ENABLED get Method To Execute null Boolean FALSE Boolean TRUE attribute Values By Name put ATTRIBUTE ID null return Collections unmodifiable Map attribute Values By Name  getAttributeValuesByName attributeValuesByName HashMap attributeValuesByName ATTRIBUTE_ENABLED getMethodToExecute attributeValuesByName ATTRIBUTE_ID unmodifiableMap attributeValuesByName
Looks up the method on the focus control return The method on the focus control code null code if none protected Method get Method To Execute final Control focus Control Display get Current get Focus Control try if focus Control null return focus Control get Class get Method method Name NO PARAMETERS catch No Such Method Exception e Fall through return null  getMethodToExecute focusControl getCurrent getFocusControl focusControl focusControl getClass getMethod methodName NO_PARAMETERS NoSuchMethodException
public void set Initialization Data I Configuration Element config String property Name Object data The data is really just a string i e the method name method Name data to String  setInitializationData IConfigurationElement propertyName methodName toString

Generates an integer value representing the quality of the match between code shell To Match code and the active shell and workbench window s shell It is assumed that code shell To Match code is either code null code code active Shell code or the active workbench window s shell param shell To Match The shell to match may be code null code param active Shell The active shell shell may be code null code return One of code MATCH ANY code code MATCH PARTIAL code or code MATCH EXACT code private static final int compare Windows final Shell shell To Match final Shell active Shell if shell To Match null return MATCH ANY else if shell To Match active Shell return MATCH EXACT return MATCH PARTIAL  shellToMatch shellToMatch activeShell shellToMatch activeShell MATCH_ANY MATCH_PARTIAL MATCH_EXACT compareWindows shellToMatch activeShell shellToMatch MATCH_ANY shellToMatch activeShell MATCH_EXACT MATCH_PARTIAL
see org eclipse swt widgets Listener handle Event org eclipse swt widgets Event public void handle Event Event event process Handler Submissions false event display get Active Shell  handleEvent handleEvent processHandlerSubmissions getActiveShell
private final I Page Listener page Listener new I Page Listener public void page Activated I Workbench Page workbench Page process Handler Submissions false  IPageListener pageListener IPageListener pageActivated IWorkbenchPage workbenchPage processHandlerSubmissions
public void page Closed I Workbench Page workbench Page process Handler Submissions false  pageClosed IWorkbenchPage workbenchPage processHandlerSubmissions
public void page Opened I Workbench Page workbench Page process Handler Submissions false  pageOpened IWorkbenchPage workbenchPage processHandlerSubmissions
private final I Part Listener part Listener new I Part Listener public void part Activated I Workbench Part workbench Part process Handler Submissions false  IPartListener partListener IPartListener partActivated IWorkbenchPart workbenchPart processHandlerSubmissions
public void part Brought To Top I Workbench Part workbench Part process Handler Submissions false  partBroughtToTop IWorkbenchPart workbenchPart processHandlerSubmissions
public void part Closed I Workbench Part workbench Part process Handler Submissions false  partClosed IWorkbenchPart workbenchPart processHandlerSubmissions
public void part Deactivated I Workbench Part workbench Part process Handler Submissions false  partDeactivated IWorkbenchPart workbenchPart processHandlerSubmissions
public void part Opened I Workbench Part workbench Part process Handler Submissions false  partOpened IWorkbenchPart workbenchPart processHandlerSubmissions
private final I Perspective Listener perspective Listener new I Perspective Listener public void perspective Activated I Workbench Page workbench Page I Perspective Descriptor perspective Descriptor process Handler Submissions false  IPerspectiveListener perspectiveListener IPerspectiveListener perspectiveActivated IWorkbenchPage workbenchPage IPerspectiveDescriptor perspectiveDescriptor processHandlerSubmissions
public void perspective Changed I Workbench Page workbench Page I Perspective Descriptor perspective Descriptor String change Id process Handler Submissions false  perspectiveChanged IWorkbenchPage workbenchPage IPerspectiveDescriptor perspectiveDescriptor changeId processHandlerSubmissions
Constructs a new instance of code Workbench Command Support code param workbench To Support The workbench for which the support should be created must not be code null code public Workbench Command Support final Workbench workbench To Support workbench workbench To Support mutable Command Manager Command Manager Factory get Mutable Command Manager Key Formatter Factory set Default SWT Key Support get Key Formatter For Platform Attach a hook to latch on to the first workbench window to open workbench To Support get Display add Filter SWT Activate activation Listener final List submissions new Array List final Mutable Command Manager command Manager Mutable Command Manager mutable Command Manager final Set handlers command Manager get Defined Handlers final Iterator handler Itr handlers iterator while handler Itr has Next final Handler Proxy proxy Handler Proxy handler Itr next final String command Id proxy get Command Id final Handler Submission submission new Handler Submission null null null command Id proxy Priority LOW submissions add submission if submissions is Empty add Handler Submissions submissions TODO Should these be removed at shutdown Is life cycle important  WorkbenchCommandSupport workbenchToSupport WorkbenchCommandSupport workbenchToSupport workbenchToSupport mutableCommandManager CommandManagerFactory getMutableCommandManager KeyFormatterFactory setDefault SWTKeySupport getKeyFormatterForPlatform workbenchToSupport getDisplay addFilter activationListener ArrayList MutableCommandManager commandManager MutableCommandManager mutableCommandManager commandManager getDefinedHandlers handlerItr handlerItr hasNext HandlerProxy HandlerProxy handlerItr commandId getCommandId HandlerSubmission HandlerSubmission commandId isEmpty addHandlerSubmissions
public void add Handler Submission Handler Submission handler Submission add Handler Submission Real handler Submission process Handler Submissions true  addHandlerSubmission HandlerSubmission handlerSubmission addHandlerSubmissionReal handlerSubmission processHandlerSubmissions
Adds a single handler submission This method is used by the two API methods to actually add a single handler submission param handler Submission The submission to be added must not be code null code private final void add Handler Submission Real final Handler Submission handler Submission final String command Id handler Submission get Command Id List handler Submissions2 List handler Submissions By Command Id get command Id if handler Submissions2 null handler Submissions2 new Array List handler Submissions By Command Id put command Id handler Submissions2 handler Submissions2 add handler Submission  handlerSubmission addHandlerSubmissionReal HandlerSubmission handlerSubmission commandId handlerSubmission getCommandId handlerSubmissions2 handlerSubmissionsByCommandId commandId handlerSubmissions2 handlerSubmissions2 ArrayList handlerSubmissionsByCommandId commandId handlerSubmissions2 handlerSubmissions2 handlerSubmission
public void add Handler Submissions Collection handler Submissions final Iterator submission Itr handler Submissions iterator while submission Itr has Next add Handler Submission Real Handler Submission submission Itr next process Handler Submissions true  addHandlerSubmissions handlerSubmissions submissionItr handlerSubmissions submissionItr hasNext addHandlerSubmissionReal HandlerSubmission submissionItr processHandlerSubmissions
An accessor for the underlying command manager return The command manager used by this support class public I Command Manager get Command Manager TODO need to proxy this to prevent casts to I Mutable Command Manager return mutable Command Manager  ICommandManager getCommandManager IMutableCommandManager mutableCommandManager
Processes incoming handler submissions and decides which handlers should be active If code force code is code false code then it will only reconsider handlers if the state of the workbench has changed param force Whether to force reprocessing of the handlers regardless of whether the workbench has changed private void process Handler Submissions boolean force process Handler Submissions force workbench get Display get Active Shell  processHandlerSubmissions processHandlerSubmissions getDisplay getActiveShell
TODO See Workbench Keyboard Switch to private when Bug 56231 is resolved param force Whether to force reprocessing of the handlers regardless of whether the workbench has changed param new Active Shell The shell that is now active This could be the same as the current active shell or it could indicate that a new shell has become active This value can be code null code if there is no active shell currently this can happen during shell transitions public void process Handler Submissions boolean force final Shell new Active Shell We do not need to update the listeners until everything is done if processing return I Workbench Site new Workbench Site null I Workbench Window new Workbench Window workbench get Active Workbench Window boolean update false Update the active shell and swap the listener if active Shell new Active Shell active Shell new Active Shell update true if active Workbench Window new Workbench Window if active Workbench Window null active Workbench Window remove Page Listener page Listener active Workbench Window remove Perspective Listener perspective Listener active Workbench Window get Part Service remove Part Listener part Listener if new Workbench Window null new Workbench Window add Page Listener page Listener new Workbench Window add Perspective Listener perspective Listener new Workbench Window get Part Service add Part Listener part Listener active Workbench Window new Workbench Window update true if new Workbench Window null I Workbench Page active Workbench Page new Workbench Window get Active Page if active Workbench Page null I Workbench Part active Workbench Part active Workbench Page get Active Part if active Workbench Part null new Workbench Site active Workbench Part get Site else new Workbench Site null if force update active Workbench Site new Workbench Site active Workbench Site new Workbench Site Map handlers By Command Id new Hash Map final Workbench Context Support context Support Workbench Context Support workbench get Context Support final Map context Tree context Support create Filtered Context Tree For context Support get Context Manager get Enabled Context Ids final boolean dialog Open context Tree contains Key I Workbench Context Support CONTEXT ID DIALOG for Iterator iterator handler Submissions By Command Id entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String command Id String entry get Key List handler Submissions List entry get Value Iterator submission Itr handler Submissions iterator Handler Submission best Handler Submission null boolean conflict false while submission Itr has Next Handler Submission handler Submission Handler Submission submission Itr next I Workbench Site active Workbench Site2 handler Submission get Active Workbench Part Site if active Workbench Site2 null active Workbench Site2 new Workbench Site continue final Shell active Shell2 handler Submission get Active Shell final Shell wb Win Shell if active Workbench Window null wb Win Shell null else wb Win Shell active Workbench Window get Shell if active Shell2 null active Shell2 active Shell active Shell2 wb Win Shell dialog Open continue if best Handler Submission null best Handler Submission handler Submission else int compare To Util compare Identity active Workbench Site2 best Handler Submission get Active Workbench Part Site final int current Match compare Windows active Shell2 active Shell final Shell best Matching Shell best Handler Submission get Active Shell final int best Match compare Windows best Matching Shell active Shell if best Handler Submission get Handler instanceof Handler Proxy current Match MATCH PARTIAL dialog Open TODO This is a workaround for the fact that there is no API to specify the shell for handlers contributed via XML This would mean that these handlers would always lose to the workbench window fallback mechanism This workaround assumes that the handler submitted via XML is intended to match more closely than the fallback mechanism In the future this XML contributed handlers should be allowed to specify the level at which they are given priority ANY PARTIAL or EXACT compare To 1 if DEBUG VERBOSE DEBUG VERBOSE COMMAND ID null DEBUG VERBOSE COMMAND ID equals command Id System out println HANDLERS A handler contributed via XML will win over a less than exact match NON NLS 1 best Handler Submission get Handler else if handler Submission get Handler instanceof Handler Proxy best Match MATCH PARTIAL dialog Open TODO This is a workaround for the fact that there is no API to specify the shell for handlers contributed via XML This would mean that these handlers would always lose to the workbench window fallback mechanism This workaround assumes that the handler submitted via XML is intended to match more closely than the fallback mechanism In the future this XML contributed handlers should be allowed to specify the level at which they are given priority ANY PARTIAL or EXACT compare To 1 if DEBUG VERBOSE DEBUG VERBOSE COMMAND ID null DEBUG VERBOSE COMMAND ID equals command Id System out println HANDLERS A handler contributed via XML will win over a less than exact match NON NLS 1 handler Submission get Handler else if current Match best Match compare To 0 Compare the two to see if one is a better match compare To current Match best Match if compare To 0 compare To Util compare handler Submission get Priority best Handler Submission get Priority if compare To 0 if DEBUG VERBOSE DEBUG VERBOSE COMMAND ID null DEBUG VERBOSE COMMAND ID  WorkbenchKeyboard newActiveShell processHandlerSubmissions newActiveShell IWorkbenchSite newWorkbenchSite IWorkbenchWindow newWorkbenchWindow getActiveWorkbenchWindow activeShell newActiveShell activeShell newActiveShell activeWorkbenchWindow newWorkbenchWindow activeWorkbenchWindow activeWorkbenchWindow removePageListener pageListener activeWorkbenchWindow removePerspectiveListener perspectiveListener activeWorkbenchWindow getPartService removePartListener partListener newWorkbenchWindow newWorkbenchWindow addPageListener pageListener newWorkbenchWindow addPerspectiveListener perspectiveListener newWorkbenchWindow getPartService addPartListener partListener activeWorkbenchWindow newWorkbenchWindow newWorkbenchWindow IWorkbenchPage activeWorkbenchPage newWorkbenchWindow getActivePage activeWorkbenchPage IWorkbenchPart activeWorkbenchPart activeWorkbenchPage getActivePart activeWorkbenchPart newWorkbenchSite activeWorkbenchPart getSite newWorkbenchSite activeWorkbenchSite newWorkbenchSite activeWorkbenchSite newWorkbenchSite handlersByCommandId HashMap WorkbenchContextSupport contextSupport WorkbenchContextSupport getContextSupport contextTree contextSupport createFilteredContextTreeFor contextSupport getContextManager getEnabledContextIds dialogOpen contextTree containsKey IWorkbenchContextSupport CONTEXT_ID_DIALOG handlerSubmissionsByCommandId entrySet hasNext commandId getKey handlerSubmissions getValue submissionItr handlerSubmissions HandlerSubmission bestHandlerSubmission submissionItr hasNext HandlerSubmission handlerSubmission HandlerSubmission submissionItr IWorkbenchSite activeWorkbenchSite2 handlerSubmission getActiveWorkbenchPartSite activeWorkbenchSite2 activeWorkbenchSite2 newWorkbenchSite activeShell2 handlerSubmission getActiveShell wbWinShell activeWorkbenchWindow wbWinShell wbWinShell activeWorkbenchWindow getShell activeShell2 activeShell2 activeShell activeShell2 wbWinShell dialogOpen bestHandlerSubmission bestHandlerSubmission handlerSubmission compareTo compareIdentity activeWorkbenchSite2 bestHandlerSubmission getActiveWorkbenchPartSite currentMatch compareWindows activeShell2 activeShell bestMatchingShell bestHandlerSubmission getActiveShell bestMatch compareWindows bestMatchingShell activeShell bestHandlerSubmission getHandler HandlerProxy currentMatch MATCH_PARTIAL dialogOpen compareTo DEBUG_VERBOSE DEBUG_VERBOSE_COMMAND_ID DEBUG_VERBOSE_COMMAND_ID commandId bestHandlerSubmission getHandler handlerSubmission getHandler HandlerProxy bestMatch MATCH_PARTIAL dialogOpen compareTo DEBUG_VERBOSE DEBUG_VERBOSE_COMMAND_ID DEBUG_VERBOSE_COMMAND_ID commandId handlerSubmission getHandler currentMatch bestMatch compareTo compareTo currentMatch bestMatch compareTo compareTo handlerSubmission getPriority bestHandlerSubmission getPriority compareTo DEBUG_VERBOSE DEBUG_VERBOSE_COMMAND_ID DEBUG_VERBOSE_COMMAND_ID
public void remove Handler Submission Handler Submission handler Submission remove Handler Submission Real handler Submission process Handler Submissions true  removeHandlerSubmission HandlerSubmission handlerSubmission removeHandlerSubmissionReal handlerSubmission processHandlerSubmissions
Removes a single handler submission This method is used by the two API methods to actually remove a single handler submission param handler Submission The submission to be removed must not be code null code private final void remove Handler Submission Real final Handler Submission handler Submission final String command Id handler Submission get Command Id final List handler Submissions2 List handler Submissions By Command Id get command Id if handler Submissions2 null handler Submissions2 remove handler Submission if handler Submissions2 is Empty handler Submissions By Command Id remove command Id  handlerSubmission removeHandlerSubmissionReal HandlerSubmission handlerSubmission commandId handlerSubmission getCommandId handlerSubmissions2 handlerSubmissionsByCommandId commandId handlerSubmissions2 handlerSubmissions2 handlerSubmission handlerSubmissions2 isEmpty handlerSubmissionsByCommandId commandId
public void remove Handler Submissions Collection handler Submissions final Iterator submission Itr handler Submissions iterator while submission Itr has Next remove Handler Submission Real Handler Submission submission Itr next process Handler Submissions true  removeHandlerSubmissions handlerSubmissions submissionItr handlerSubmissions submissionItr hasNext removeHandlerSubmissionReal HandlerSubmission submissionItr processHandlerSubmissions
Sets the active context identifiers on the mutable command manager this class interacts with param active Context Ids The new map of active context identifiers representing the hierarchy of active contexts This should be a map of string values It may be empty but it should never be code null code public void set Active Context Ids Map active Context Ids mutable Command Manager set Active Context Ids active Context Ids  activeContextIds setActiveContextIds activeContextIds mutableCommandManager setActiveContextIds activeContextIds
Sets whether the workbench s command support should process handler submissions The workbench should not allow the event loop to spin unless this value is set to code true code If the value changes from code false code to code true code this automatically triggers a re processing of the handler submissions param processing Whether to process handler submissions public final void set Processing final boolean processing final boolean reprocess this processing processing this processing processing if reprocess process Handler Submissions true  setProcessing processHandlerSubmissions

public class Compatible Workbench Page implements I Compatible Workbench Page open Editor I File is declared on I Workbench Page in 2 1 This method was removed in 3 0 because it references resource API public I Editor Part open Editor I File input throws Part Init Exception invoke org eclipse ui ide IDE open Editor I Workbench Page I File boolean return open Editor new Class I Workbench Page class I File class boolean class new Object this input new Boolean true  CompatibleWorkbenchPage ICompatibleWorkbenchPage openEditor IFile IWorkbenchPage IEditorPart openEditor IFile PartInitException openEditor IWorkbenchPage IFile openEditor IWorkbenchPage IFile
open Editor I File String is declared on I Workbench Page in 2 1 This method was removed in 3 0 because it references resource API public I Editor Part open Editor I File input String editorID throws Part Init Exception return open Editor input editorID true  openEditor IFile IWorkbenchPage IEditorPart openEditor IFile PartInitException openEditor
open Editor I File String boolean is declared on I Workbench Page in 2 1 This method was removed in 3 0 because it references resource API public I Editor Part open Editor I File input String editorID boolean activate throws Part Init Exception return I Workbench Page this open Editor get File Editor Input input editorID  openEditor IFile IWorkbenchPage IEditorPart openEditor IFile PartInitException IWorkbenchPage openEditor getFileEditorInput
open Editor I Marker is declared on I Workbench Page in 2 1 This method was removed in 3 0 because it references resource API public I Editor Part open Editor I Marker marker throws Part Init Exception return open Editor marker true  openEditor IMarker IWorkbenchPage IEditorPart openEditor IMarker PartInitException openEditor
open Editor I Marker boolean is declared on I Workbench Page in 2 1 This method was removed in 3 0 because it references resource API public I Editor Part open Editor I Marker marker boolean activate throws Part Init Exception invoke org eclipse ui ide IDE open Editor I Workbench Page I Marker boolean return open Editor new Class I Workbench Page class I Marker class boolean class new Object this marker new Boolean activate  openEditor IMarker IWorkbenchPage IEditorPart openEditor IMarker PartInitException openEditor IWorkbenchPage IMarker openEditor IWorkbenchPage IMarker
open System Editor I File is declared on I Workbench Page in 2 1 This method was removed in 3 0 because it references resource API public void open System Editor I File file throws Part Init Exception I Workbench Page this open Editor get File Editor Input file I Editor Registry SYSTEM EXTERNAL EDITOR ID  openSystemEditor IFile IWorkbenchPage openSystemEditor IFile PartInitException IWorkbenchPage openEditor getFileEditorInput IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID
private I Editor Input get File Editor Input I File file throws Part Init Exception I Plugin Descriptor desc Platform get Plugin Registry get Plugin Descriptor org eclipse ui ide NON NLS 1 Exception problem try Class clazz desc get Plugin Class Loader load Class org eclipse ui part File Editor Input NON NLS 1 Constructor constructor clazz get Constructor new Class I File class return I Editor Input constructor new Instance new Object file catch Null Pointer Exception e problem e catch Class Not Found Exception e problem e catch No Such Method Exception e problem e catch Illegal Argument Exception e problem e catch Illegal Access Exception e problem e catch Invocation Target Exception e problem e catch Instantiation Exception e problem e I Status status new Status I Status ERROR Workbench Plugin PI WORKBENCH 0 open Editor compatibility support failed new File Editor Input file problem NON NLS 1 Workbench Plugin log status get Message status throw new Part Init Exception status  IEditorInput getFileEditorInput IFile PartInitException IPluginDescriptor getPluginRegistry getPluginDescriptor getPluginClassLoader loadClass FileEditorInput getConstructor IFile IEditorInput newInstance NullPointerException ClassNotFoundException NoSuchMethodException IllegalArgumentException IllegalAccessException InvocationTargetException InstantiationException IStatus IStatus WorkbenchPlugin PI_WORKBENCH openEditor FileEditorInput WorkbenchPlugin getMessage PartInitException
private I Editor Part open Editor Class arg Types Object args throws Part Init Exception I Plugin Descriptor desc Platform get Plugin Registry get Plugin Descriptor org eclipse ui ide NON NLS 1 Throwable problem try Class clazz desc get Plugin Class Loader load Class org eclipse ui ide IDE NON NLS 1 Method method clazz get Method open Editor arg Types NON NLS 1 return I Editor Part method invoke null args catch Null Pointer Exception e problem e catch Class Not Found Exception e problem e catch No Such Method Exception e problem e catch Illegal Argument Exception e problem e catch Illegal Access Exception e problem e catch Invocation Target Exception e problem e I Status status new Status I Status ERROR Workbench Plugin PI WORKBENCH 0 open Editor compatibility support failed IDE open Editor problem NON NLS 1 Workbench Plugin log status get Message status throw new Part Init Exception status  IEditorPart openEditor argTypes PartInitException IPluginDescriptor getPluginRegistry getPluginDescriptor getPluginClassLoader loadClass getMethod openEditor argTypes IEditorPart NullPointerException ClassNotFoundException NoSuchMethodException IllegalArgumentException IllegalAccessException InvocationTargetException IStatus IStatus WorkbenchPlugin PI_WORKBENCH openEditor openEditor WorkbenchPlugin getMessage PartInitException

see org eclipse ui texteditor I Update update public void update I Console consoles Console Plugin get Default get Console Manager get Consoles set Enabled consoles length 1  IUpdate IConsole ConsolePlugin getDefault getConsoleManager getConsoles setEnabled
public Console Drop Down Action I Console View view f View view set Text Console Messages get String Console Drop Down Action 0 NON NLS 1 set Tool Tip Text Console Messages get String Console Drop Down Action 1 NON NLS 1 set Image Descriptor Console Plugin Images get Image Descriptor I Console Constants IMG VIEW CONSOLE set Menu Creator this Console Plugin get Default get Console Manager add Console Listener this update  ConsoleDropDownAction IConsoleView fView setText ConsoleMessages getString ConsoleDropDownAction setToolTipText ConsoleMessages getString ConsoleDropDownAction setImageDescriptor ConsolePluginImages getImageDescriptor IConsoleConstants IMG_VIEW_CONSOLE setMenuCreator ConsolePlugin getDefault getConsoleManager addConsoleListener
public void dispose if f Menu null f Menu dispose f View null Console Plugin get Default get Console Manager remove Console Listener this  fMenu fMenu fView ConsolePlugin getDefault getConsoleManager removeConsoleListener
see org eclipse jface action I Menu Creator get Menu org eclipse swt widgets Menu public Menu get Menu Menu parent return null  IMenuCreator getMenu getMenu
public Menu get Menu Control parent if f Menu null f Menu dispose f Menu new Menu parent I Console consoles Console Plugin get Default get Console Manager get Consoles I Console current f View get Console for int i 0 i consoles length i I Console console consoles i Action action new Show Console Action f View console action set Checked console equals current add Action To Menu f Menu action return f Menu  getMenu fMenu fMenu fMenu IConsole ConsolePlugin getDefault getConsoleManager getConsoles IConsole fView getConsole IConsole ShowConsoleAction fView setChecked addActionToMenu fMenu fMenu
protected void add Action To Menu Menu parent Action action Action Contribution Item item new Action Contribution Item action item fill parent 1  addActionToMenu ActionContributionItem ActionContributionItem
protected void add Menu Separator new Menu Item f Menu SWT SEPARATOR  addMenuSeparator MenuItem fMenu
public void run List stack Console View f View get Console Stack if stack size 1 I Console console I Console stack get 1 f View display console  ConsoleView fView getConsoleStack IConsole IConsole fView
Display display Console Plugin get Standard Display display async Exec new Runnable public void run update  ConsolePlugin getStandardDisplay asyncExec
public void consoles Added I Console consoles Display display Console Plugin get Standard Display display async Exec new Runnable public void run update  consolesAdded IConsole ConsolePlugin getStandardDisplay asyncExec
display async Exec new Runnable public void run if f Menu null f Menu dispose update  asyncExec fMenu fMenu
public void consoles Removed I Console consoles Display display Console Plugin get Standard Display display async Exec new Runnable public void run if f Menu null f Menu dispose update  consolesRemoved IConsole ConsolePlugin getStandardDisplay asyncExec fMenu fMenu

see org eclipse core runtime I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception I Status status new Status I Status ERROR Console Plugin get Unique Identifier I Console Constants INTERNAL ERROR Console Messages get String Console Manager 0 exception NON NLS 1 Console Plugin log status  ISafeRunnable handleException handleException IStatus IStatus ConsolePlugin getUniqueIdentifier IConsoleConstants INTERNAL_ERROR ConsoleMessages getString ConsoleManager ConsolePlugin
public void run throws Exception switch f Type case ADDED f Listener consoles Added f Changed break case REMOVED f Listener consoles Removed f Changed break  fType fListener consolesAdded fChanged fListener consolesRemoved fChanged
Notifies the given listener of the adds removes param consoles the consoles that changed param update the type of change public void notify I Console consoles int update if f Listeners null return f Changed consoles f Type update Object copied Listeners f Listeners get Listeners for int i 0 i copied Listeners length i f Listener I Console Listener copied Listeners i Platform run this f Changed null f Listener null  IConsole fListeners fChanged fType copiedListeners fListeners getListeners copiedListeners fListener IConsoleListener copiedListeners fChanged fListener
public void add Console Listener I Console Listener listener if f Listeners null f Listeners new Listener List 5 f Listeners add listener  addConsoleListener IConsoleListener fListeners fListeners ListenerList fListeners
public void remove Console Listener I Console Listener listener if f Listeners null f Listeners remove listener  removeConsoleListener IConsoleListener fListeners fListeners
public synchronized void add Consoles I Console consoles List added new Array List consoles length for int i 0 i consoles length i I Console console consoles i if f Consoles contains console f Consoles add console added add console if added is Empty fire Update I Console added to Array new I Console added size ADDED  addConsoles IConsole ArrayList IConsole fConsoles fConsoles isEmpty fireUpdate IConsole toArray IConsole
public synchronized void remove Consoles I Console consoles List removed new Array List consoles length for int i 0 i consoles length i I Console console consoles i if f Consoles remove console removed add console if removed is Empty fire Update I Console removed to Array new I Console removed size REMOVED  removeConsoles IConsole ArrayList IConsole fConsoles isEmpty fireUpdate IConsole toArray IConsole
see org eclipse ui console I Console Manager get Consoles public synchronized I Console get Consoles return I Console f Consoles to Array new I Console f Consoles size  IConsoleManager getConsoles IConsole getConsoles IConsole fConsoles toArray IConsole fConsoles
Fires notification param consoles consoles added removed param type ADD or REMOVE private void fire Update I Console consoles int type new Console Notifier notify consoles type  fireUpdate IConsole ConsoleNotifier
Console Plugin get Standard Display async Exec new Runnable public void run I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null I Workbench Page page window get Active Page if page null I View Part console View page find View I Console Constants ID CONSOLE VIEW if console View null try console View page show View I Console Constants ID CONSOLE VIEW null I Workbench Page VIEW CREATE catch Part Init Exception pie Console Plugin log pie else boolean bring To Top should Bring To Top console console View if bring To Top page bring To Top console View if console View instanceof I Console View I Console View console View display console  ConsolePlugin getStandardDisplay asyncExec IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IWorkbenchPage getActivePage IViewPart consoleView findView IConsoleConstants ID_CONSOLE_VIEW consoleView consoleView showView IConsoleConstants ID_CONSOLE_VIEW IWorkbenchPage VIEW_CREATE PartInitException ConsolePlugin bringToTop shouldBringToTop consoleView bringToTop bringToTop consoleView consoleView IConsoleView IConsoleView consoleView
see I Console Manager show Console View I Console public void show Console View final I Console console Console Plugin get Standard Display async Exec new Runnable public void run I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null I Workbench Page page window get Active Page if page null I View Part console View page find View I Console Constants ID CONSOLE VIEW if console View null try console View page show View I Console Constants ID CONSOLE VIEW null I Workbench Page VIEW CREATE catch Part Init Exception pie Console Plugin log pie else boolean bring To Top should Bring To Top console console View if bring To Top page bring To Top console View if console View instanceof I Console View I Console View console View display console  IConsoleManager showConsoleView IConsole showConsoleView IConsole ConsolePlugin getStandardDisplay asyncExec IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IWorkbenchPage getActivePage IViewPart consoleView findView IConsoleConstants ID_CONSOLE_VIEW consoleView consoleView showView IConsoleConstants ID_CONSOLE_VIEW IWorkbenchPage VIEW_CREATE PartInitException ConsolePlugin bringToTop shouldBringToTop consoleView bringToTop bringToTop consoleView consoleView IConsoleView IConsoleView consoleView
Returns whether the given console view should be brought to the top The view should not be brought to the top if the view is pinned on a console other than the given console private boolean should Bring To Top I Console console I View Part console View boolean bring To Top true if console View instanceof I Console View I Console View c View I Console View console View if c View is Pinned I Console pinned Console c View get Console bring To Top console equals pinned Console return bring To Top  shouldBringToTop IConsole IViewPart consoleView bringToTop consoleView IConsoleView IConsoleView cView IConsoleView consoleView cView isPinned IConsole pinnedConsole cView getConsole bringToTop pinnedConsole bringToTop
public void warn Of Content Change I Console console I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null I Workbench Page page window get Active Page if page null I Console View console View I Console View page find View I Console Constants ID CONSOLE VIEW if console View null console View warn Of Content Change console  warnOfContentChange IConsole IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IWorkbenchPage getActivePage IConsoleView consoleView IConsoleView findView IConsoleConstants ID_CONSOLE_VIEW consoleView consoleView warnOfContentChange

Resource Bundle get Bundle BUNDLE NAME private Console Messages  ResourceBundle getBundle BUNDLE_NAME ConsoleMessages
public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Declare all images private static void declare Images Actions local toolbars declare Registry Image I Console Constants IMG LCL CLEAR LOCALTOOL clear co gif NON NLS 1 declare Registry Image I Internal Console Constants IMG LCL PIN LOCALTOOL pin gif NON NLS 1 disabled local toolbars declare Registry Image I Internal Console Constants IMG DLCL CLEAR DLCL clear co gif NON NLS 1 declare Registry Image I Internal Console Constants IMG DLCL PIN DLCL pin gif NON NLS 1 enabled local toolbars declare Registry Image I Internal Console Constants IMG ELCL CLEAR ELCL clear co gif NON NLS 1 declare Registry Image I Internal Console Constants IMG ELCL PIN ELCL pin gif NON NLS 1 Views declare Registry Image I Console Constants IMG VIEW CONSOLE VIEW console view gif NON NLS 1  declareImages declareRegistryImage IConsoleConstants IMG_LCL_CLEAR clear_co declareRegistryImage IInternalConsoleConstants IMG_LCL_PIN declareRegistryImage IInternalConsoleConstants IMG_DLCL_CLEAR clear_co declareRegistryImage IInternalConsoleConstants IMG_DLCL_PIN declareRegistryImage IInternalConsoleConstants IMG_ELCL_CLEAR clear_co declareRegistryImage IInternalConsoleConstants IMG_ELCL_PIN declareRegistryImage IConsoleConstants IMG_VIEW_CONSOLE console_view
Declare an Image in the registry table param key The key to use when registering the image param path The path where the image can be found This path is relative to where this plugin class is found i e typically the packages directory private final static void declare Registry Image String key String path Image Descriptor desc Image Descriptor get Missing Image Descriptor try desc Image Descriptor create FromURL make Icon FileURL path catch MalformedURL Exception me Console Plugin log me image Registry put key desc image Descriptors put key desc  pathThe declareRegistryImage ImageDescriptor ImageDescriptor getMissingImageDescriptor ImageDescriptor createFromURL makeIconFileURL MalformedURLException ConsolePlugin imageRegistry imageDescriptors
Returns the Image Registry public static Image Registry get Image Registry if image Registry null initialize Image Registry return image Registry  ImageRegistry ImageRegistry getImageRegistry imageRegistry initializeImageRegistry imageRegistry
Initialize the image registry by declaring all of the required graphics This involves creating J Face image descriptors describing how to create find the image should it be needed The image is not actually allocated until requested Prefix conventions Wizard BannersWIZBAN  Preference BannersPREF BAN  Property Page BannersPROPBAN  Color toolbarCTOOL  Enable toolbarETOOL  Disable toolbarDTOOL  Local enabled toolbarELCL  Local Disable toolbarDLCL  Object largeOBJL  Object smallOBJS  View VIEW  Product imagesPROD  Misc imagesMISC  Where are the images The images typically gifs are found in the same location as this plugin class This may mean the same package directory as the package holding this class The images are declared using this get Class to ensure they are looked up via this plugin class see org eclipse jface resource Image Registry public static Image Registry initialize Image Registry image Registry new Image Registry Console Plugin get Standard Display image Descriptors new Hash Map 30 declare Images return image Registry  JFace BannersWIZBAN_ BannersPREF_BAN_ BannersPROPBAN_ toolbarCTOOL_ toolbarETOOL_ toolbarDTOOL_ toolbarELCL_ toolbarDLCL_ largeOBJL_ smallOBJS_ VIEW_ imagesPROD_ imagesMISC_ getClass ImageRegistry ImageRegistry initializeImageRegistry imageRegistry ImageRegistry ConsolePlugin getStandardDisplay imageDescriptors HashMap declareImages imageRegistry
Returns the code Image code identified by the given key or code null code if it does not exist public static Image get Image String key return get Image Registry get key  getImage getImageRegistry
Returns the code Image Descriptor code identified by the given key or code null code if it does not exist public static Image Descriptor get Image Descriptor String key if image Descriptors null initialize Image Registry return Image Descriptor image Descriptors get key  ImageDescriptor ImageDescriptor getImageDescriptor imageDescriptors initializeImageRegistry ImageDescriptor imageDescriptors
private static URL make Icon FileURL String icon Path throws MalformedURL Exception if ICON BASE URL null throw new MalformedURL Exception return new URL ICON BASE URL icon Path  makeIconFileURL iconPath MalformedURLException ICON_BASE_URL MalformedURLException ICON_BASE_URL iconPath

private Console Drop Down Action f Display Console Action null private boolean is Available return get Page Book null get Page Book is Disposed  ConsoleDropDownAction fDisplayConsoleAction isAvailable getPageBook getPageBook isDisposed
public void property Change Property Change Event event Object source event get Source if source instanceof I Console event get Property equals I Basic Property Constants P TEXT if source equals get Console update Title  propertyChange PropertyChangeEvent getSource IConsole getProperty IBasicPropertyConstants P_TEXT getConsole updateTitle
public void part Closed I Workbench Part part if is Pinned if closing the pinned console un pin I Console console I Console f Part To Console get part if console null console equals get Console pin null super part Closed part f Pin Action update  partClosed IWorkbenchPart isPinned IConsole IConsole fPartToConsole getConsole partClosed fPinAction
see org eclipse debug internal ui console I Console View get Console public I Console get Console return f Active Console  IConsoleView getConsole IConsole getConsole fActiveConsole
protected void show Page Rec Page Rec page Rec if is Pinned super show Page Rec page Rec f Active Console I Console f Part To Console get page Rec part f Stack remove f Active Console f Stack add 0 f Active Console update Title update console actions if f Pin Action null f Pin Action update  showPageRec PageRec pageRec isPinned showPageRec pageRec fActiveConsole IConsole fPartToConsole pageRec fStack fActiveConsole fStack fActiveConsole updateTitle fPinAction fPinAction
Returns a stack of consoles in the view in MRU order return a stack of consoles in the view in MRU order protected List get Console Stack return f Stack  getConsoleStack fStack
Updates the view title based on the active console protected void update Title I Console console get Console if console null set Content Description Console Messages get String Console View 0 NON NLS 1 else set Content Description console get Name NON NLS 1  updateTitle IConsole getConsole setContentDescription ConsoleMessages getString ConsoleView setContentDescription getName
protected void do Destroy Page I Workbench Part part Page Rec page Record I Page page page Record page page dispose page Record dispose I Console console I Console f Part To Console get part console remove Property Change Listener this empty cross reference cache f Part To Console remove part f Console To Part remove console update console actions f Pin Action update  doDestroyPage IWorkbenchPart PageRec pageRecord IPage pageRecord pageRecord IConsole IConsole fPartToConsole removePropertyChangeListener fPartToConsole fConsoleToPart fPinAction
protected Page Rec do Create Page I Workbench Part dummy Part Console Workbench Part part Console Workbench Part dummy Part I Console console part get Console I Page Book View Page page console create Page this init Page page page create Control get Page Book console add Property Change Listener this Page Rec rec new Page Rec dummy Part page return rec  PageRec doCreatePage IWorkbenchPart dummyPart ConsoleWorkbenchPart ConsoleWorkbenchPart dummyPart IConsole getConsole IPageBookViewPage createPage initPage createControl getPageBook addPropertyChangeListener PageRec PageRec dummyPart
see org eclipse ui part Page Book View is Important org eclipse ui I Workbench Part protected boolean is Important I Workbench Part part return part instanceof Console Workbench Part  PageBookView isImportant IWorkbenchPart isImportant IWorkbenchPart ConsoleWorkbenchPart
see org eclipse ui I Workbench Part dispose public void dispose super dispose Console Plugin get Default get Console Manager remove Console Listener this  IWorkbenchPart ConsolePlugin getDefault getConsoleManager removeConsoleListener
protected I Page create Default Page Page Book book Message Page page new Message Page page create Control get Page Book init Page page return page  IPage createDefaultPage PageBook MessagePage MessagePage createControl getPageBook initPage
Runnable r new Runnable public void run for int i 0 i consoles length i if is Available I Console console consoles i Console Workbench Part part new Console Workbench Part console get Site f Console To Part put console part f Part To Console put part console part Activated part  isAvailable IConsole ConsoleWorkbenchPart ConsoleWorkbenchPart getSite fConsoleToPart fPartToConsole partActivated
public void consoles Added final I Console consoles if is Available Runnable r new Runnable public void run for int i 0 i consoles length i if is Available I Console console consoles i Console Workbench Part part new Console Workbench Part console get Site f Console To Part put console part f Part To Console put part console part Activated part async Exec r  consolesAdded IConsole isAvailable isAvailable IConsole ConsoleWorkbenchPart ConsoleWorkbenchPart getSite fConsoleToPart fPartToConsole partActivated asyncExec
Runnable r new Runnable public void run for int i 0 i consoles length i if is Available I Console console consoles i f Stack remove console Console Workbench Part part Console Workbench Part f Console To Part get console if part null part Closed part if get Console null I Console available Console Plugin get Default get Console Manager get Consoles if available length 0 display available available length 1  isAvailable IConsole fStack ConsoleWorkbenchPart ConsoleWorkbenchPart fConsoleToPart partClosed getConsole IConsole ConsolePlugin getDefault getConsoleManager getConsoles
public void consoles Removed final I Console consoles if is Available Runnable r new Runnable public void run for int i 0 i consoles length i if is Available I Console console consoles i f Stack remove console Console Workbench Part part Console Workbench Part f Console To Part get console if part null part Closed part if get Console null I Console available Console Plugin get Default get Console Manager get Consoles if available length 0 display available available length 1 async Exec r  consolesRemoved IConsole isAvailable isAvailable IConsole fStack ConsoleWorkbenchPart ConsoleWorkbenchPart fConsoleToPart partClosed getConsole IConsole ConsolePlugin getDefault getConsoleManager getConsoles asyncExec
Constructs a console view public Console View super f Console To Part new Hash Map f Part To Console new Hash Map  ConsoleView fConsoleToPart HashMap fPartToConsole HashMap
Creates a pop up menu on the given control The menu is registered with this view s site such that other plug ins may contribute to the menu param menu Control the control with which the pop up menu will be associated with protected void create Context Menu Control menu Control Menu Manager menu Mgr new Menu Manager Pop Up NON NLS 1 menu Mgr set Remove All When Shown true Menu menu menu Mgr create Context Menu menu Control menu Control set Menu menu register the context menu such that other plugins may contribute to it if get Site null get Site register Context Menu menu Mgr null  menuControl createContextMenu menuControl MenuManager menuMgr MenuManager PopUp menuMgr setRemoveAllWhenShown menuMgr createContextMenu menuControl menuControl setMenu getSite getSite registerContextMenu menuMgr
protected void create Actions f Pin Action new Pin Console Action this f Display Console Action new Console Drop Down Action this  createActions fPinAction PinConsoleAction fDisplayConsoleAction ConsoleDropDownAction
protected void configure Tool Bar I Tool Bar Manager mgr mgr add new Separator I Console Constants LAUNCH GROUP mgr add new Separator I Console Constants OUTPUT GROUP mgr add new Separator fixed Group NON NLS 1 mgr add f Pin Action mgr add f Display Console Action  configureToolBar IToolBarManager IConsoleConstants LAUNCH_GROUP IConsoleConstants OUTPUT_GROUP fixedGroup fPinAction fDisplayConsoleAction
public void display I Console console if is Pinned Console Workbench Part part Console Workbench Part f Console To Part get console if part null part Activated part  IConsole isPinned ConsoleWorkbenchPart ConsoleWorkbenchPart fConsoleToPart partActivated
public void pin I Console console if console null f Pinned false else f Pinned false need this off to change displayed console display console f Pinned true if f Pin Action null f Pin Action update  IConsole fPinned fPinned fPinned fPinAction fPinAction
see org eclipse ui console I Console View is Pinned public boolean is Pinned return f Pinned  IConsoleView isPinned isPinned fPinned
see org eclipse ui part Page Book View get Bootstrap Part protected I Workbench Part get Bootstrap Part return null  PageBookView getBootstrapPart IWorkbenchPart getBootstrapPart
Registers the given runnable with the display associated with this view s control if any see org eclipse swt widgets Display async Exec java lang Runnable public void async Exec Runnable r if is Available get Page Book get Display async Exec r  asyncExec asyncExec isAvailable getPageBook getDisplay asyncExec
Creates this view s underlying viewer and actions Hooks a pop up menu to the underlying viewer s control as well as a key listener When the delete key is pressed the code REMOVE ACTION code is invoked Hooks help to this view Subclasses must implement the following methods which are called in the following order when a view is created ul li code create Viewer Composite code the context menu is hooked to the viewer s control li li code create Actions code li li code configure Tool Bar I Tool Bar Manager code li li code get Help Context Id code li ul see I Workbench Part create Part Control Composite public void create Part Control Composite parent register Part Listener super create Part Control parent create Actions I Tool Bar Manager tbm get View Site get Action Bars get Tool Bar Manager configure Tool Bar tbm update For Existing Consoles get View Site get Action Bars update Action Bars Viewer viewer get Viewer if viewer null create Context Menu viewer get Control Workbench Help set Help parent I Console Help Context Ids CONSOLE VIEW if viewer null get Viewer get Control add Key Listener new Key Adapter public void key Pressed Key Event e handle Key Pressed e if get Viewer instanceof Structured Viewer Structured Viewer get Viewer add Double Click Listener this create the message page set Message Page new Message Page get Message Page create Control get Page Book init Page get Message Page if f Early Message null bug 28127 show Message f Early Message f Early Message null  REMOVE_ACTION createViewer createActions configureToolBar IToolBarManager getHelpContextId IWorkbenchPart createPartControl createPartControl registerPartListener createPartControl createActions IToolBarManager getViewSite getActionBars getToolBarManager configureToolBar updateForExistingConsoles getViewSite getActionBars updateActionBars getViewer createContextMenu getControl WorkbenchHelp setHelp IConsoleHelpContextIds CONSOLE_VIEW getViewer getControl addKeyListener KeyAdapter keyPressed KeyEvent handleKeyPressed getViewer StructuredViewer StructuredViewer getViewer addDoubleClickListener setMessagePage MessagePage getMessagePage createControl getPageBook initPage getMessagePage fEarlyMessage showMessage fEarlyMessage fEarlyMessage
Initialize for existing consoles private void update For Existing Consoles I Console Manager manager Console Plugin get Default get Console Manager create pages for consoles I Console consoles manager get Consoles consoles Added consoles add as a listener manager add Console Listener this  updateForExistingConsoles IConsoleManager ConsolePlugin getDefault getConsoleManager IConsole getConsoles consolesAdded addConsoleListener
public void warn Of Content Change I Console console I Workbench Part part I Workbench Part f Console To Part get console if part null I Workbench Site Progress Service service I Workbench Site Progress Service part get Site get Adapter I Workbench Site Progress Service class if service null service warn Of Content Change  warnOfContentChange IConsole IWorkbenchPart IWorkbenchPart fConsoleToPart IWorkbenchSiteProgressService IWorkbenchSiteProgressService getSite getAdapter IWorkbenchSiteProgressService warnOfContentChange

see java lang Object equals java lang Object public boolean equals Object obj return obj instanceof Console Workbench Part f Console equals Console Workbench Part obj f Console  ConsoleWorkbenchPart fConsole ConsoleWorkbenchPart fConsole
see java lang Object hash Code public int hash Code return f Console hash Code  hashCode hashCode fConsole hashCode
Constructs a part for the given console that binds to the given site public Console Workbench Part I Console console I Workbench Part Site site f Console console f Site site  ConsoleWorkbenchPart IConsole IWorkbenchPartSite fConsole fSite
see org eclipse ui I Workbench Part add Property Listener org eclipse ui I Property Listener public void add Property Listener I Property Listener listener  IWorkbenchPart addPropertyListener IPropertyListener addPropertyListener IPropertyListener
see org eclipse ui I Workbench Part create Part Control org eclipse swt widgets Composite public void create Part Control Composite parent  IWorkbenchPart createPartControl createPartControl
see org eclipse ui I Workbench Part dispose public void dispose  IWorkbenchPart
see org eclipse ui I Workbench Part get Site public I Workbench Part Site get Site return f Site  IWorkbenchPart getSite IWorkbenchPartSite getSite fSite
see org eclipse ui I Workbench Part get Title public String get Title return NON NLS 1  IWorkbenchPart getTitle getTitle
see org eclipse ui I Workbench Part get Title Image public Image get Title Image return null  IWorkbenchPart getTitleImage getTitleImage
see org eclipse ui I Workbench Part get Title Tool Tip public String get Title Tool Tip return NON NLS 1  IWorkbenchPart getTitleToolTip getTitleToolTip
see org eclipse ui I Workbench Part remove Property Listener org eclipse ui I Property Listener public void remove Property Listener I Property Listener listener  IWorkbenchPart removePropertyListener IPropertyListener removePropertyListener IPropertyListener
see org eclipse ui I Workbench Part set Focus public void set Focus  IWorkbenchPart setFocus setFocus
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return null  IAdaptable getAdapter getAdapter
Returns the console associated with this part return console associated with this part protected I Console get Console return f Console  IConsole getConsole fConsole

text selection listener private I Selection Changed Listener f Text Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Selection Dependent Actions  ISelectionChangedListener fTextListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateSelectionDependentActions
Constructs a new process page public Message Console Page I Console View view Message Console console f View view f Console console  MessageConsolePage IConsoleView MessageConsole fView fConsole
see org eclipse ui part I Page Book View Page get Site public I Page Site get Site return f Site  IPageBookViewPage getSite IPageSite getSite fSite
see org eclipse ui part I Page Book View Page init org eclipse ui part I Page Site public void init I Page Site site f Site site  IPageBookViewPage IPageSite IPageSite fSite
manager set Remove All When Shown true manager add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager m context Menu About To Show m  setRemoveAllWhenShown addMenuListener IMenuListener menuAboutToShow IMenuManager contextMenuAboutToShow
public void create Control Composite parent f Viewer new Message Console Viewer parent f Viewer set Document get Console get Document f Viewer get Text Widget set Tabs get Console get Tab Width Menu Manager manager new Menu Manager Message Console Message Console NON NLS 1 NON NLS 2 manager set Remove All When Shown true manager add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager m context Menu About To Show m f Menu manager create Context Menu get Control get Control set Menu f Menu I Page Site site get Site site register Context Menu Console Plugin get Unique Identifier message Console manager get Viewer NON NLS 1 site set Selection Provider get Viewer create Actions configure Tool Bar get Site get Action Bars get Tool Bar Manager f Viewer get Selection Provider add Selection Changed Listener f Text Listener set Font get Console get Font get Console add Property Change Listener this  createControl fViewer MessageConsoleViewer fViewer setDocument getConsole getDocument fViewer getTextWidget setTabs getConsole getTabWidth MenuManager MenuManager MessageConsole MessageConsole setRemoveAllWhenShown addMenuListener IMenuListener menuAboutToShow IMenuManager contextMenuAboutToShow fMenu createContextMenu getControl getControl setMenu fMenu IPageSite getSite registerContextMenu ConsolePlugin getUniqueIdentifier messageConsole getViewer setSelectionProvider getViewer createActions configureToolBar getSite getActionBars getToolBarManager fViewer getSelectionProvider addSelectionChangedListener fTextListener setFont getConsole getFont getConsole addPropertyChangeListener
public void property Change Property Change Event event Object source event get Source String property event get Property if source equals get Console Message Console P FONT equals property set Font get Console get Font else if Message Console P STREAM COLOR equals property source instanceof Message Console Stream Message Console Stream stream Message Console Stream source if stream get Console equals get Console get Viewer get Text Widget redraw else if source equals get Console property equals Message Console P TAB SIZE if f Viewer null f Viewer get Text Widget set Tabs get Console get Tab Width f Viewer get Text Widget redraw  propertyChange PropertyChangeEvent getSource getProperty getConsole MessageConsole P_FONT setFont getConsole getFont MessageConsole P_STREAM_COLOR MessageConsoleStream MessageConsoleStream MessageConsoleStream getConsole getConsole getViewer getTextWidget getConsole MessageConsole P_TAB_SIZE fViewer fViewer getTextWidget setTabs getConsole getTabWidth fViewer getTextWidget
public void dispose get Console remove Property Change Listener this f Viewer get Selection Provider remove Selection Changed Listener f Text Listener if f Menu null f Menu is Disposed f Menu dispose f Menu null if f Viewer null f Viewer dispose f Viewer null f Site null f Selection Actions clear  getConsole removePropertyChangeListener fViewer getSelectionProvider removeSelectionChangedListener fTextListener fMenu fMenu isDisposed fMenu fMenu fViewer fViewer fViewer fSite fSelectionActions
Fill the context menu param menu menu protected void context Menu About To Show I Menu Manager menu menu add I Action f Global Actions get Action Factory COPY get Id menu add I Action f Global Actions get Action Factory SELECT ALL get Id menu add new Separator FIND NON NLS 1 menu add I Action f Global Actions get Action Factory FIND get Id menu add I Action f Global Actions get I Text Editor Action Constants GOTO LINE menu add f Clear Output Action menu add new Separator I Workbench Action Constants MB ADDITIONS  contextMenuAboutToShow IMenuManager IAction fGlobalActions ActionFactory getId IAction fGlobalActions ActionFactory SELECT_ALL getId IAction fGlobalActions ActionFactory getId IAction fGlobalActions ITextEditorActionConstants GOTO_LINE fClearOutputAction IWorkbenchActionConstants MB_ADDITIONS
public Control get Control if f Viewer null return f Viewer get Control return null  getControl fViewer fViewer getControl
see org eclipse ui part I Page set Action Bars org eclipse ui I Action Bars public void set Action Bars I Action Bars action Bars  IPage setActionBars IActionBars setActionBars IActionBars actionBars
public void set Focus Control control get Control if control null control set Focus update Selection Dependent Actions  setFocus getControl setFocus updateSelectionDependentActions
protected void create Actions f Clear Output Action new Clear Output Action get Viewer In order for the clipboard actions to accessible via their shortcuts e g Ctrl C Ctrl V we must set a global action handler for each action I Action Bars action Bars get Site get Action Bars Text Viewer Action action new Text Viewer Action get Viewer I Text Operation Target COPY action configure Action Console Messages get String Message Console Page Copy Ctrl C 6 Console Messages get String Message Console Page Copy 7 Console Messages get String Message Console Page Copy 7 NON NLS 3 NON NLS 2 NON NLS 1 action set Image Descriptor PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG TOOL COPY set Global Action action Bars Action Factory COPY get Id action action new Text Viewer Action get Viewer I Text Operation Target SELECT ALL action configure Action Console Messages get String Message Console Page Select  All Ctrl A 12 Console Messages get String Message Console Page Select All Console Messages get String Message Console Page Select All NON NLS 3 NON NLS 2 NON NLS 1 set Global Action action Bars Action Factory SELECT ALL get Id action XXX Still using old resource access Resource Bundle bundle Resource Bundle get Bundle org eclipse ui internal console Console Messages NON NLS 1 set Global Action action Bars Action Factory FIND get Id new Find Replace Action bundle find replace action get Console View NON NLS 1 action new Text Viewer Goto Line Action get Viewer set Global Action action Bars I Text Editor Action Constants GOTO LINE action action Bars update Action Bars f Selection Actions add Action Factory COPY get Id f Selection Actions add Action Factory FIND get Id  createActions fClearOutputAction ClearOutputAction getViewer IActionBars actionBars getSite getActionBars TextViewerAction TextViewerAction getViewer ITextOperationTarget configureAction ConsoleMessages getString MessageConsolePage C_6 ConsoleMessages getString MessageConsolePage Copy_7 ConsoleMessages getString MessageConsolePage Copy_7 setImageDescriptor getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_TOOL_COPY setGlobalAction actionBars ActionFactory getId TextViewerAction getViewer ITextOperationTarget SELECT_ALL configureAction ConsoleMessages getString MessageConsolePage Select_ A_12 ConsoleMessages getString MessageConsolePage Select_All ConsoleMessages getString MessageConsolePage Select_All setGlobalAction actionBars ActionFactory SELECT_ALL getId ResourceBundle ResourceBundle getBundle ConsoleMessages setGlobalAction actionBars ActionFactory getId FindReplaceAction find_replace_action getConsoleView TextViewerGotoLineAction getViewer setGlobalAction actionBars ITextEditorActionConstants GOTO_LINE actionBars updateActionBars fSelectionActions ActionFactory getId fSelectionActions ActionFactory getId
protected void update Selection Dependent Actions Iterator iterator f Selection Actions iterator while iterator has Next update Action String iterator next  updateSelectionDependentActions fSelectionActions hasNext updateAction
protected void update Action String action Id I Action action I Action f Global Actions get action Id if action instanceof I Update I Update action update  updateAction actionId IAction IAction fGlobalActions actionId IUpdate IUpdate
protected void set Global Action I Action Bars action Bars String actionID I Action action f Global Actions put actionID action action Bars set Global Action Handler actionID action  setGlobalAction IActionBars actionBars IAction fGlobalActions actionBars setGlobalActionHandler
Returns the viewer in this page return the viewer in this page protected Message Console Viewer get Viewer return f Viewer  MessageConsoleViewer getViewer fViewer
protected void configure Tool Bar I Tool Bar Manager mgr mgr append To Group I Console Constants OUTPUT GROUP f Clear Output Action  configureToolBar IToolBarManager appendToGroup IConsoleConstants OUTPUT_GROUP fClearOutputAction
Returns the view this page is contained in return the view this page is contained in protected I Console View get Console View return f View  IConsoleView getConsoleView fView
Returns the console this page is displaying return the console this page is displaying protected Message Console get Console return f Console  MessageConsole getConsole fConsole
public Object get Adapter Class required if I Find Replace Target class equals required return get Viewer get Find Replace Target if Widget class equals required return get Viewer get Text Widget return null  getAdapter IFindReplaceTarget getViewer getFindReplaceTarget getViewer getTextWidget
Sets the font for this page param font font protected void set Font Font font get Viewer get Text Widget set Font font  setFont getViewer getTextWidget setFont
Refreshes this page protected void refresh get Viewer refresh  getViewer

public static final String MESSAGE PARTITION TYPE Console Plugin get Unique Identifier MESSAGE PARTITION TYPE NON NLS 1 public Message Console Partition Message Console Stream stream int offset int length super offset length MESSAGE PARTITION TYPE f Stream stream  MESSAGE_PARTITION_TYPE ConsolePlugin getUniqueIdentifier MESSAGE_PARTITION_TYPE MessageConsolePartition MessageConsoleStream MESSAGE_PARTITION_TYPE fStream
see java lang Object equals java lang Object public boolean equals Object partition if super equals partition f Stream equals Message Console Partition partition get Stream return false  fStream MessageConsolePartition getStream
see java lang Object hash Code public int hash Code return super hash Code f Stream hash Code  hashCode hashCode hashCode fStream hashCode
Returns this partition s stream return this partition s stream public Message Console Stream get Stream return f Stream  MessageConsoleStream getStream fStream
Returns whether this partition is allowed to be combined with the given partition param partition return boolean public boolean can Be Combined With Message Console Partition partition int start get Offset int end start get Length int other Start partition get Offset int other End other Start partition get Length boolean overlap other Start start other Start end start other Start start other End return overlap get Type equals partition get Type get Stream equals partition get Stream  canBeCombinedWith MessageConsolePartition getOffset getLength otherStart getOffset otherEnd otherStart getLength otherStart otherStart otherStart otherEnd getType getType getStream getStream
Returns a new partition representing this and the given parition combined param partition return partition public Message Console Partition combine With Message Console Partition partition int start get Offset int end start get Length int other Start partition get Offset int other End other Start partition get Length int the Start Math min start other Start int the End Math max end other End return create New Partition the Start the End the Start  MessageConsolePartition combineWith MessageConsolePartition getOffset getLength otherStart getOffset otherEnd otherStart getLength theStart otherStart theEnd otherEnd createNewPartition theStart theEnd theStart
Creates a new patition of this type with the given color offset and length param offset param length return a new partition with the given range public Message Console Partition create New Partition int offset int length return new Message Console Partition get Stream offset length  MessageConsolePartition createNewPartition MessageConsolePartition getStream

private I Console Manager f Console Manager Creates a new paritioner and document and connects this partitioner to the document public Message Console Partitioner I Document doc new Document connect doc  IConsoleManager fConsoleManager MessageConsolePartitioner IDocument
Sets the low and high water marks for this console s text buffer param low low water mark param high high water mark public void set Water Marks int low int high if low high throw new Illegal Argument Exception Console Messages get String Message Console Partitioner 2 NON NLS 1 if low 1000 throw new Illegal Argument Exception Console Messages get String Message Console Partitioner 3 NON NLS 1 low Water Mark low high Water Mark high max Append Size Math min 80000 low  setWaterMarks IllegalArgumentException ConsoleMessages getString MessageConsolePartitioner IllegalArgumentException ConsoleMessages getString MessageConsolePartitioner lowWaterMark highWaterMark maxAppendSize
return Returns the high Water Mark public int get High Water Mark return high Water Mark  highWaterMark getHighWaterMark highWaterMark
return Returns the low Water Mark public int get Low Water Mark return low Water Mark  lowWaterMark getLowWaterMark lowWaterMark
return Returns the max Append Size public int get Max Append Size return max Append Size  maxAppendSize getMaxAppendSize maxAppendSize
param max Append Size The max Append Size to set public void set Max Append Size int max Append Size this max Append Size max Append Size  maxAppendSize maxAppendSize setMaxAppendSize maxAppendSize maxAppendSize maxAppendSize
see org eclipse jface text I Document Partitioner connect org eclipse jface text I Document public void connect I Document document f Document document document set Document Partitioner this f Console Manager Console Plugin get Default get Console Manager  IDocumentPartitioner IDocument IDocument fDocument setDocumentPartitioner fConsoleManager ConsolePlugin getDefault getConsoleManager
see org eclipse jface text I Document Partitioner disconnect public void disconnect f Document set Document Partitioner null killed true f Console Manager null  IDocumentPartitioner fDocument setDocumentPartitioner fConsoleManager
see org eclipse jface text I Document Partitioner document About To Be Changed org eclipse jface text Document Event public void document About To Be Changed Document Event event  IDocumentPartitioner documentAboutToBeChanged DocumentEvent documentAboutToBeChanged DocumentEvent
see org eclipse jface text I Document Partitioner document Changed org eclipse jface text Document Event public boolean document Changed Document Event event return document Changed2 event null  IDocumentPartitioner documentChanged DocumentEvent documentChanged DocumentEvent documentChanged2
see org eclipse jface text I Document Partitioner get Legal Content Types public String get Legal Content Types return new String Message Console Partition MESSAGE PARTITION TYPE  IDocumentPartitioner getLegalContentTypes getLegalContentTypes MessageConsolePartition MESSAGE_PARTITION_TYPE
see org eclipse jface text I Document Partitioner get Content Type int public String get Content Type int offset I Typed Region partition get Partition offset if partition null return partition get Type return null  IDocumentPartitioner getContentType getContentType ITypedRegion getPartition getType
see org eclipse jface text I Document Partitioner compute Partitioning int int public I Typed Region compute Partitioning int offset int length if offset 0 length f Document get Length return I Typed Region f Partitions to Array new I Typed Region f Partitions size int end offset length List list new Array List for int i 0 i f Partitions size i I Typed Region partition I Typed Region f Partitions get i int partition Start partition get Offset int partition End partition Start partition get Length if offset partition Start offset partition End offset partition Start end partition Start list add partition return I Typed Region list to Array new I Typed Region list size  IDocumentPartitioner computePartitioning ITypedRegion computePartitioning fDocument getLength ITypedRegion fPartitions toArray ITypedRegion fPartitions ArrayList fPartitions ITypedRegion ITypedRegion fPartitions partitionStart getOffset partitionEnd partitionStart getLength partitionStart partitionEnd partitionStart partitionStart ITypedRegion toArray ITypedRegion
see org eclipse jface text I Document Partitioner get Partition int public I Typed Region get Partition int offset for int i 0 i f Partitions size i I Typed Region partition I Typed Region f Partitions get i int start partition get Offset int end start partition get Length if offset start offset end return partition return null  IDocumentPartitioner getPartition ITypedRegion getPartition fPartitions ITypedRegion ITypedRegion fPartitions getOffset getLength
see org eclipse jface text I Document Partitioner Extension document Changed2 org eclipse jface text Document Event public I Region document Changed2 Document Event event String text event get Text if get Document get Length 0 cleared f Partitions clear return new Region 0 0 add Partition new Message Console Partition f Last Stream event get Offset text length I Typed Region affected Regions compute Partitioning event get Offset text length if affected Regions length 0 return null if affected Regions length 1 return affected Regions 0 int affected Length affected Regions 0 get Length for int i 1 i affected Regions length i I Typed Region region affected Regions i affected Length region get Length return new Region affected Regions 0 get Offset affected Length  IDocumentPartitionerExtension documentChanged2 DocumentEvent IRegion documentChanged2 DocumentEvent getText getDocument getLength fPartitions addPartition MessageConsolePartition fLastStream getOffset ITypedRegion affectedRegions computePartitioning getOffset affectedRegions affectedRegions affectedRegions affectedLength affectedRegions getLength affectedRegions ITypedRegion affectedRegions affectedLength getLength affectedRegions getOffset affectedLength
Checks to see if the console buffer has overflowed and empties the overflow if needed updating partitions and hyperlink positions protected void check Overflow if high Water Mark 0 if f Document get Length high Water Mark int overflow f Document get Length low Water Mark try int line f Document get Line Of Offset overflow int next Line Offset f Document get Line Offset line 1 overflow next Line Offset catch Bad Location Exception e1 update partitions List new Paritions new Array List f Partitions size Iterator partitions f Partitions iterator while partitions has Next I Typed Region region I Typed Region partitions next if region instanceof Message Console Partition Message Console Partition message Console Partition Message Console Partition region I Typed Region new Partition null int offset region get Offset if offset overflow int end Offset offset region get Length if end Offset overflow remove partition else split partition int length end Offset overflow new Partition message Console Partition create New Partition 0 length else modify parition offset new Partition message Console Partition create New Partition message Console Partition get Offset overflow message Console Partition get Length if new Partition null new Paritions add new Partition f Partitions new Paritions called from GUI Thread see start Updater Thread no async Exec needed try f Document replace 0 overflow NON NLS 1 catch Bad Location Exception e  checkOverflow highWaterMark fDocument getLength highWaterMark fDocument getLength lowWaterMark fDocument getLineOfOffset nextLineOffset fDocument getLineOffset nextLineOffset BadLocationException newParitions ArrayList fPartitions fPartitions hasNext ITypedRegion ITypedRegion MessageConsolePartition MessageConsolePartition messageConsolePartition MessageConsolePartition ITypedRegion newPartition getOffset endOffset getLength endOffset endOffset newPartition messageConsolePartition createNewPartition newPartition messageConsolePartition createNewPartition messageConsolePartition getOffset messageConsolePartition getLength newPartition newParitions newPartition fPartitions newParitions startUpdaterThread asyncExec fDocument BadLocationException
Adds a new colored input partition combining with the previous partition if possible private Message Console Partition add Partition Message Console Partition partition if f Partitions is Empty f Partitions add partition else int index f Partitions size 1 Message Console Partition last Message Console Partition f Partitions get index if last can Be Combined With partition replace with a single partition partition last combine With partition f Partitions set index partition else different kinds add a new parition f Partitions add partition return partition  MessageConsolePartition addPartition MessageConsolePartition fPartitions isEmpty fPartitions fPartitions MessageConsolePartition MessageConsolePartition fPartitions canBeCombinedWith combineWith fPartitions fPartitions
Returns the document this partitioner is connected to or code null code if none return the document this partitioner is connected to or code null code if none public I Document get Document return f Document  IDocument getDocument fDocument
Runnable inner Runnable new Runnable public void run f Last Stream stream Entry stream try f Document replace f Document get Length 0 stream Entry text to String check Overflow f Console Manager warn Of Content Change stream Entry stream get Console catch Bad Location Exception e  innerRunnable fLastStream streamEntry fDocument fDocument getLength streamEntry toString checkOverflow fConsoleManager warnOfContentChange streamEntry getConsole BadLocationException
Runnable r new Runnable public void run while killed stream Entries size 0 synchronized stream Entries final Stream Entry stream Entry Stream Entry stream Entries get 0 stream Entries remove 0 Runnable inner Runnable new Runnable public void run f Last Stream stream Entry stream try f Document replace f Document get Length 0 stream Entry text to String check Overflow f Console Manager warn Of Content Change stream Entry stream get Console catch Bad Location Exception e Display display Console Plugin get Standard Display if display null display async Exec inner Runnable try Don t just die Give up the lock and allow more Stream Entry objects to be added to list Thread sleep 100 catch Interrupted Exception e updater Thread Started false  streamEntries streamEntries StreamEntry streamEntry StreamEntry streamEntries streamEntries innerRunnable fLastStream streamEntry fDocument fDocument getLength streamEntry toString checkOverflow fConsoleManager warnOfContentChange streamEntry getConsole BadLocationException ConsolePlugin getStandardDisplay asyncExec innerRunnable StreamEntry InterruptedException updaterThreadStarted
private void start Updater Thread if updater Thread Started return updater Thread Started true Runnable r new Runnable public void run while killed stream Entries size 0 synchronized stream Entries final Stream Entry stream Entry Stream Entry stream Entries get 0 stream Entries remove 0 Runnable inner Runnable new Runnable public void run f Last Stream stream Entry stream try f Document replace f Document get Length 0 stream Entry text to String check Overflow f Console Manager warn Of Content Change stream Entry stream get Console catch Bad Location Exception e Display display Console Plugin get Standard Display if display null display async Exec inner Runnable try Don t just die Give up the lock and allow more Stream Entry objects to be added to list Thread sleep 100 catch Interrupted Exception e updater Thread Started false new Thread r Message Console Updater Thread start NON NLS 1  startUpdaterThread updaterThreadStarted updaterThreadStarted streamEntries streamEntries StreamEntry streamEntry StreamEntry streamEntries streamEntries innerRunnable fLastStream streamEntry fDocument fDocument getLength streamEntry toString checkOverflow fConsoleManager warnOfContentChange streamEntry getConsole BadLocationException ConsolePlugin getStandardDisplay asyncExec innerRunnable StreamEntry InterruptedException updaterThreadStarted MessageConsoleUpdaterThread
Adds the new text to the document param text the text to append param stream the stream to append to public void append To Document final String text final Message Console Stream stream int offset 0 int length text length synchronized stream Entries try to fit in last Stream Entry if they are the same stream if stream Entries size 0 Stream Entry stream Entry Stream Entry stream Entries get stream Entries size 1 if stream Entry stream stream int empty Space max Append Size stream Entry text length if length empty Space stream Entry text append text offset length length 0 else stream Entry text append text substring offset empty Space offset empty Space length empty Space put remaining text into new Stream Entry objects while length 0 int to Copy Math min max Append Size length String substring text substring offset offset to Copy Stream Entry stream Entry new Stream Entry substring stream stream Entries add stream Entry offset to Copy length to Copy give up the lock start Updater Thread  appendToDocument MessageConsoleStream streamEntries StreamEntry streamEntries StreamEntry streamEntry StreamEntry streamEntries streamEntries streamEntry emptySpace maxAppendSize streamEntry emptySpace streamEntry streamEntry emptySpace emptySpace emptySpace StreamEntry toCopy maxAppendSize toCopy StreamEntry streamEntry StreamEntry streamEntries streamEntry toCopy toCopy startUpdaterThread
String Buffer text Stream Entry String text Message Console Stream stream this stream stream this text new String Buffer text  StringBuffer StreamEntry MessageConsoleStream StringBuffer

see org eclipse jface text I Document Listener document About To Be Changed org eclipse jface text Document Event public void document About To Be Changed Document Event e  IDocumentListener documentAboutToBeChanged DocumentEvent documentAboutToBeChanged DocumentEvent
see org eclipse jface text I Document Listener document Changed org eclipse jface text Document Event public void document Changed Document Event e reveal End Of Document  IDocumentListener documentChanged DocumentEvent documentChanged DocumentEvent revealEndOfDocument
Creates a new console viewer and adds verification checking to only allow text modification if the text is being modified in the editable portion of the underlying document see org eclipse swt events Verify Listener public Message Console Viewer Composite parent super parent getSWT Styles get Text Widget set Double Click Enabled true get Text Widget set Font parent get Font get Text Widget add Line Style Listener this get Text Widget set Editable false  VerifyListener MessageConsoleViewer getSWTStyles getTextWidget setDoubleClickEnabled getTextWidget setFont getFont getTextWidget addLineStyleListener getTextWidget setEditable
Returns the SWT style flags used when instantiating this viewer private static int getSWT Styles int styles SWT H SCROLL SWT V SCROLL return styles  getSWTStyles H_SCROLL V_SCROLL
Reveals makes visible the end of the current document protected void reveal End Of Document I Document doc get Document int lines doc get Number Of Lines try lines are 0 based int line Start Offset doc get Line Offset lines 1 Styled Text widget get Text Widget if line Start Offset 0 widget set Caret Offset line Start Offset widget show Selection int line End Offset line Start Offset doc get Line Length lines 1 if line End Offset 0 widget set Caret Offset line End Offset catch Bad Location Exception e  revealEndOfDocument IDocument getDocument getNumberOfLines lineStartOffset getLineOffset StyledText getTextWidget lineStartOffset setCaretOffset lineStartOffset showSelection lineEndOffset lineStartOffset getLineLength lineEndOffset setCaretOffset lineEndOffset BadLocationException
public void set Document I Document doc I Document old Doc get Document I Document document doc if old Doc null document null return if old Doc null old Doc remove Document Listener f Internal Document Listener if old Doc equals document document add Document Listener f Internal Document Listener return super set Document document if document null reveal End Of Document document add Document Listener f Internal Document Listener  setDocument IDocument IDocument oldDoc getDocument IDocument oldDoc oldDoc oldDoc removeDocumentListener fInternalDocumentListener oldDoc addDocumentListener fInternalDocumentListener setDocument revealEndOfDocument addDocumentListener fInternalDocumentListener
see org eclipse jface text Text Viewer can Perform Find protected boolean can Perform Find return get Text Widget null get Visible Document null get Visible Document get Length 0  TextViewer canPerformFind canPerformFind getTextWidget getVisibleDocument getVisibleDocument getLength
Dispose this viewer and resources public void dispose 
public void line Get Style Line Style Event event I Document document get Document if document null Message Console Partitioner partitioner Message Console Partitioner document get Document Partitioner if partitioner null I Typed Region regions partitioner compute Partitioning event line Offset event line Offset event line Text length Style Range styles new Style Range regions length for int i 0 i regions length i Message Console Partition partition Message Console Partition regions i Color color partition get Stream get Color styles i new Style Range partition get Offset partition get Length color null event styles styles  lineGetStyle LineStyleEvent IDocument getDocument MessageConsolePartitioner MessageConsolePartitioner getDocumentPartitioner ITypedRegion computePartitioning lineOffset lineOffset lineText StyleRange StyleRange MessageConsolePartition MessageConsolePartition getStream getColor StyleRange getOffset getLength

Constructs a pin console action public Pin Console Action I Console View view super Console Messages get String Pin Console Action 0 I Action AS CHECK BOX NON NLS 1 set Tool Tip Text Console Messages get String Pin Console Action 1 NON NLS 1 set Image Descriptor Console Plugin Images get Image Descriptor I Internal Console Constants IMG ELCL PIN set Disabled Image Descriptor Console Plugin Images get Image Descriptor I Internal Console Constants IMG DLCL PIN set Hover Image Descriptor Console Plugin Images get Image Descriptor I Internal Console Constants IMG LCL PIN f View view update  PinConsoleAction IConsoleView ConsoleMessages getString PinConsoleAction IAction AS_CHECK_BOX setToolTipText ConsoleMessages getString PinConsoleAction setImageDescriptor ConsolePluginImages getImageDescriptor IInternalConsoleConstants IMG_ELCL_PIN setDisabledImageDescriptor ConsolePluginImages getImageDescriptor IInternalConsoleConstants IMG_DLCL_PIN setHoverImageDescriptor ConsolePluginImages getImageDescriptor IInternalConsoleConstants IMG_LCL_PIN fView
public void run if is Checked f View pin f View get Console else f View pin null  isChecked fView fView getConsole fView
see org eclipse ui texteditor I Update update public void update set Enabled f View get Console null set Checked f View is Pinned  IUpdate setEnabled fView getConsole setChecked fView isPinned

public void run if f Console equals f View get Console only change if required and pin the console if pinned if f View is Pinned f View pin f Console else f View display f Console  fConsole fView getConsole fView isPinned fView fConsole fView fConsole
Constructs an action to display the given console param view the console view in which the given console is contained param console the console public Show Console Action I Console View view I Console console super f Console console f View view set Text console get Name set Image Descriptor console get Image Descriptor  ShowConsoleAction IConsoleView IConsole fConsole fView setText getName setImageDescriptor getImageDescriptor

private I Layout Container real Container Container Placeholder constructor comment param id java lang String param label java lang String public Container Placeholder String id super id null Container Placeholder next Id id NON NLS 1  ILayoutContainer realContainer ContainerPlaceholder ContainerPlaceholder nextId
add method comment public void add Layout Part child if child instanceof Part Placeholder return real Container add child  LayoutPart PartPlaceholder realContainer
See I Layout Container allow Border public boolean allows Border return true  ILayoutContainer allowBorder allowsBorder
get Children method comment public Layout Part get Children return real Container get Children  getChildren LayoutPart getChildren realContainer getChildren
get Focus method comment public Layout Part get Focus return null  getFocus LayoutPart getFocus
get Focus method comment public Layout Part get Real Container return Layout Part real Container  getFocus LayoutPart getRealContainer LayoutPart realContainer
is Child Visible method comment public boolean is Child Visible Layout Part child return false  isChildVisible isChildVisible LayoutPart
remove method comment public void remove Layout Part child if child instanceof Part Placeholder return real Container remove child  LayoutPart PartPlaceholder realContainer
replace method comment public void replace Layout Part old Child Layout Part new Child if old Child instanceof Part Placeholder new Child instanceof Part Placeholder return real Container replace old Child new Child  LayoutPart oldChild LayoutPart newChild oldChild PartPlaceholder newChild PartPlaceholder realContainer oldChild newChild
set Child Visible method comment public void set Child Visible Layout Part child boolean visible  setChildVisible setChildVisible LayoutPart
set Focus method comment public void set Focus Layout Part child  setFocus setFocus LayoutPart
public void set Real Container I Layout Container container if container null set the parent container of the children back to the real container if real Container null Layout Part children real Container get Children if children null for int i 0 length children length i length i children i set Container real Container else replace the real container with this place holder Layout Part children container get Children if children null for int i 0 length children length i length i children i set Container this this real Container container  setRealContainer ILayoutContainer realContainer LayoutPart realContainer getChildren setContainer realContainer LayoutPart getChildren setContainer realContainer
public void find Sashes Layout Part part Part Pane Sashes sashes I Layout Container container get Container if container null container find Sashes this sashes  findSashes LayoutPart PartPane ILayoutContainer getContainer findSashes
see org eclipse ui internal I Layout Container allows Auto Focus public boolean allows Auto Focus return false  ILayoutContainer allowsAutoFocus allowsAutoFocus

private List context Manager Listeners protected Abstract Context Manager  contextManagerListeners AbstractContextManager
public void add Context Manager Listener I Context Manager Listener context Manager Listener if context Manager Listener null throw new Null Pointer Exception if context Manager Listeners null context Manager Listeners new Array List if context Manager Listeners contains context Manager Listener context Manager Listeners add context Manager Listener  addContextManagerListener IContextManagerListener contextManagerListener contextManagerListener NullPointerException contextManagerListeners contextManagerListeners ArrayList contextManagerListeners contextManagerListener contextManagerListeners contextManagerListener
protected void fire Context Manager Changed Context Manager Event context Manager Event if context Manager Event null throw new Null Pointer Exception if context Manager Listeners null for int i 0 i context Manager Listeners size i I Context Manager Listener context Manager Listeners get i context Manager Changed context Manager Event  fireContextManagerChanged ContextManagerEvent contextManagerEvent contextManagerEvent NullPointerException contextManagerListeners contextManagerListeners IContextManagerListener contextManagerListeners contextManagerChanged contextManagerEvent
public void remove Context Manager Listener I Context Manager Listener context Manager Listener if context Manager Listener null throw new Null Pointer Exception if context Manager Listeners null context Manager Listeners remove context Manager Listener  removeContextManagerListener IContextManagerListener contextManagerListener contextManagerListener NullPointerException contextManagerListeners contextManagerListeners contextManagerListener

private List context Registry Listeners protected Abstract Context Registry  contextRegistryListeners AbstractContextRegistry
public void add Context Registry Listener I Context Registry Listener context Registry Listener if context Registry Listener null throw new Null Pointer Exception if context Registry Listeners null context Registry Listeners new Array List if context Registry Listeners contains context Registry Listener context Registry Listeners add context Registry Listener  addContextRegistryListener IContextRegistryListener contextRegistryListener contextRegistryListener NullPointerException contextRegistryListeners contextRegistryListeners ArrayList contextRegistryListeners contextRegistryListener contextRegistryListeners contextRegistryListener
protected void fire Context Registry Changed if context Registry Listeners null for int i 0 i context Registry Listeners size i if context Registry Event null context Registry Event new Context Registry Event this I Context Registry Listener context Registry Listeners get i context Registry Changed context Registry Event  fireContextRegistryChanged contextRegistryListeners contextRegistryListeners contextRegistryEvent contextRegistryEvent ContextRegistryEvent IContextRegistryListener contextRegistryListeners contextRegistryChanged contextRegistryEvent
public List get Context Context Binding Definitions return context Context Binding Definitions  getContextContextBindingDefinitions contextContextBindingDefinitions
public List get Context Definitions return context Definitions  getContextDefinitions contextDefinitions
public void remove Context Registry Listener I Context Registry Listener context Registry Listener if context Registry Listener null throw new Null Pointer Exception if context Registry Listeners null context Registry Listeners remove context Registry Listener  removeContextRegistryListener IContextRegistryListener contextRegistryListener contextRegistryListener NullPointerException contextRegistryListeners contextRegistryListeners contextRegistryListener

Context String id if id null throw new Null Pointer Exception this id id  NullPointerException
public void add Context Listener I Context Listener context Listener if context Listener null throw new Null Pointer Exception if context Listeners null context Listeners new Array List if context Listeners contains context Listener context Listeners add context Listener strong References add this  addContextListener IContextListener contextListener contextListener NullPointerException contextListeners contextListeners ArrayList contextListeners contextListener contextListeners contextListener strongReferences
public int compare To Object object Context casted Object Context object int compare To Util compare defined casted Object defined if compare To 0 compare To Util compare enabled casted Object enabled if compare To 0 compare To Util compare id casted Object id if compare To 0 compare To Util compare name casted Object name if compare To 0 compare To Util compare parent Id casted Object parent Id return compare To  compareTo castedObject compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo compareTo parentId castedObject parentId compareTo
public boolean equals Object object if object instanceof Context return false Context casted Object Context object boolean equals true equals Util equals defined casted Object defined equals Util equals enabled casted Object enabled equals Util equals id casted Object id equals Util equals name casted Object name equals Util equals parent Id casted Object parent Id return equals  castedObject castedObject castedObject castedObject castedObject parentId castedObject parentId
void fire Context Changed Context Event context Event if context Event null throw new Null Pointer Exception if context Listeners null for int i 0 i context Listeners size i I Context Listener context Listeners get i context Changed context Event  fireContextChanged ContextEvent contextEvent contextEvent NullPointerException contextListeners contextListeners IContextListener contextListeners contextChanged contextEvent
public String get Id return id  getId
public String get Name throws Not Defined Exception if defined throw new Not Defined Exception Cannot get the name from an undefined context NON NLS 1 return name  getName NotDefinedException NotDefinedException
public String get Parent Id throws Not Defined Exception if defined throw new Not Defined Exception Cannot get the parent identifier from an undefined context NON NLS 1 return parent Id  getParentId NotDefinedException NotDefinedException parentId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code defined hash Code hash Code HASH FACTOR Util hash Code enabled hash Code hash Code HASH FACTOR Util hash Code id hash Code hash Code HASH FACTOR Util hash Code name hash Code hash Code HASH FACTOR Util hash Code parent Id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode parentId hashCodeComputed hashCode
public boolean is Defined return defined  isDefined
public boolean is Enabled return enabled  isEnabled
public void remove Context Listener I Context Listener context Listener if context Listener null throw new Null Pointer Exception if context Listeners null context Listeners remove context Listener if context Listeners is Empty strong References remove this  removeContextListener IContextListener contextListener contextListener NullPointerException contextListeners contextListeners contextListener contextListeners isEmpty strongReferences
boolean set Defined boolean defined if defined this defined this defined defined hash Code Computed false hash Code 0 string null return true return false  setDefined hashCodeComputed hashCode
boolean set Enabled boolean enabled if enabled this enabled this enabled enabled hash Code Computed false hash Code 0 string null return true return false  setEnabled hashCodeComputed hashCode
boolean set Name String name if Util equals name this name this name name hash Code Computed false hash Code 0 string null return true return false  setName hashCodeComputed hashCode
boolean set Parent Id String parent Id if Util equals parent Id this parent Id this parent Id parent Id hash Code Computed false hash Code 0 string null return true return false  setParentId parentId parentId parentId parentId parentId hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append defined string Buffer append string Buffer append enabled string Buffer append string Buffer append id string Buffer append string Buffer append name string Buffer append string Buffer append parent Id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer parentId stringBuffer stringBuffer toString

static Map context Definitions By Id Collection context Definitions boolean allow Null Ids if context Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator context Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Context Definition class Context Definition context Definition Context Definition object String id context Definition get Id if allow Null Ids id null map put id context Definition return map  contextDefinitionsById contextDefinitions allowNullIds contextDefinitions NullPointerException HashMap contextDefinitions hasNext assertInstance ContextDefinition ContextDefinition contextDefinition ContextDefinition contextDefinition getId allowNullIds contextDefinition
static Map context Definitions By Name Collection context Definitions boolean allow Null Names if context Definitions null throw new Null Pointer Exception Map map new Hash Map Iterator iterator context Definitions iterator while iterator has Next Object object iterator next Util assert Instance object Context Definition class Context Definition context Definition Context Definition object String name context Definition get Name if allow Null Names name null Collection context Definitions2 Collection map get name if context Definitions2 null context Definitions2 new Hash Set map put name context Definitions2 context Definitions2 add context Definition return map  contextDefinitionsByName contextDefinitions allowNullNames contextDefinitions NullPointerException HashMap contextDefinitions hasNext assertInstance ContextDefinition ContextDefinition contextDefinition ContextDefinition contextDefinition getName allowNullNames contextDefinitions2 contextDefinitions2 contextDefinitions2 HashSet contextDefinitions2 contextDefinitions2 contextDefinition
Context Definition String id String name String parent Id String source Id this id id this name name this parent Id parent Id this source Id source Id  ContextDefinition parentId sourceId parentId parentId sourceId sourceId
public int compare To Object object Context Definition casted Object Context Definition object int compare To Util compare id casted Object id if compare To 0 compare To Util compare name casted Object name if compare To 0 compare To Util compare parent Id casted Object parent Id if compare To 0 compare To Util compare source Id casted Object source Id return compare To  compareTo ContextDefinition castedObject ContextDefinition compareTo castedObject compareTo compareTo castedObject compareTo compareTo parentId castedObject parentId compareTo compareTo sourceId castedObject sourceId compareTo
public boolean equals Object object if object instanceof Context Definition return false Context Definition casted Object Context Definition object boolean equals true equals Util equals id casted Object id equals Util equals name casted Object name equals Util equals parent Id casted Object parent Id equals Util equals source Id casted Object source Id return equals  ContextDefinition ContextDefinition castedObject ContextDefinition castedObject castedObject parentId castedObject parentId sourceId castedObject sourceId
public String get Id return id  getId
public String get Name return name  getName
public String get Parent Id return parent Id  getParentId parentId
public String get Source Id return source Id  getSourceId sourceId
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR Util hash Code id hash Code hash Code HASH FACTOR Util hash Code name hash Code hash Code HASH FACTOR Util hash Code parent Id hash Code hash Code HASH FACTOR Util hash Code source Id hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode hashCode hashCode HASH_FACTOR hashCode parentId hashCode hashCode HASH_FACTOR hashCode sourceId hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append id string Buffer append string Buffer append name string Buffer append string Buffer append parent Id string Buffer append string Buffer append source Id string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer parentId stringBuffer stringBuffer sourceId stringBuffer stringBuffer toString

Creates a new instance of code I Mutable Context Manager code return a new instance of code I Mutable Context Manager code Clients should not make assumptions about the concrete implementation outside the contract of the interface Guaranteed not to be code null code public static I Mutable Context Manager get Mutable Context Manager return new Mutable Context Manager  IMutableContextManager IMutableContextManager IMutableContextManager getMutableContextManager MutableContextManager
private Context Manager Factory  ContextManagerFactory

Context Registry Event I Context Registry context Registry if context Registry null throw new Null Pointer Exception this context Registry context Registry  ContextRegistryEvent IContextRegistry contextRegistry contextRegistry NullPointerException contextRegistry contextRegistry
I Context Registry get Context Registry return context Registry  IContextRegistry getContextRegistry contextRegistry

add Registry Change Listener new I Registry Change Listener public void registry Changed I Registry Change Event registry Change Event I Extension Delta extension Deltas registry Change Event get Extension Deltas Persistence PACKAGE PREFIX Persistence PACKAGE BASE if extension Deltas length 0 try load catch IO Exception eIO  addRegistryChangeListener IRegistryChangeListener registryChanged IRegistryChangeEvent registryChangeEvent IExtensionDelta extensionDeltas registryChangeEvent getExtensionDeltas PACKAGE_PREFIX PACKAGE_BASE extensionDeltas IOException
Extension Context Registry I Extension Registry extension Registry if extension Registry null throw new Null Pointer Exception this extension Registry extension Registry this extension Registry add Registry Change Listener new I Registry Change Listener public void registry Changed I Registry Change Event registry Change Event I Extension Delta extension Deltas registry Change Event get Extension Deltas Persistence PACKAGE PREFIX Persistence PACKAGE BASE if extension Deltas length 0 try load catch IO Exception eIO try load catch IO Exception eIO  ExtensionContextRegistry IExtensionRegistry extensionRegistry extensionRegistry NullPointerException extensionRegistry extensionRegistry extensionRegistry addRegistryChangeListener IRegistryChangeListener registryChanged IRegistryChangeEvent registryChangeEvent IExtensionDelta extensionDeltas registryChangeEvent getExtensionDeltas PACKAGE_PREFIX PACKAGE_BASE extensionDeltas IOException IOException
private String get Namespace I Configuration Element configuration Element String namespace null if configuration Element null I Extension extension configuration Element get Declaring Extension if extension null namespace extension get Namespace return namespace  getNamespace IConfigurationElement configurationElement configurationElement IExtension configurationElement getDeclaringExtension getNamespace
private void load throws IO Exception if context Context Binding Definitions null context Context Binding Definitions new Array List else context Context Binding Definitions clear if context Definitions null context Definitions new Array List else context Definitions clear TODO deprecated start I Configuration Element deprecated Configuration Elements extension Registry get Configuration Elements For org eclipse ui accelerator Scopes NON NLS 1 for int i 0 i deprecated Configuration Elements length i I Configuration Element deprecated Configuration Element deprecated Configuration Elements i String name deprecated Configuration Element get Name if accelerator Scope equals name NON NLS 1 read Context Definition deprecated Configuration Element deprecated Configuration Elements extension Registry get Configuration Elements For org eclipse ui commands NON NLS 1 for int i 0 i deprecated Configuration Elements length i I Configuration Element deprecated Configuration Element deprecated Configuration Elements i String name deprecated Configuration Element get Name if scope equals name NON NLS 1 read Context Definition deprecated Configuration Element TODO deprecated end I Configuration Element configuration Elements extension Registry get Configuration Elements For Persistence PACKAGE FULL for int i 0 i configuration Elements length i I Configuration Element configuration Element configuration Elements i String name configuration Element get Name if Persistence TAG CONTEXT equals name read Context Definition configuration Element boolean context Registry Changed false if context Context Binding Definitions equals super context Context Binding Definitions super context Context Binding Definitions Collections unmodifiable List context Context Binding Definitions context Registry Changed true if context Definitions equals super context Definitions super context Definitions Collections unmodifiable List context Definitions context Registry Changed true if context Registry Changed fire Context Registry Changed  IOException contextContextBindingDefinitions contextContextBindingDefinitions ArrayList contextContextBindingDefinitions contextDefinitions contextDefinitions ArrayList contextDefinitions IConfigurationElement deprecatedConfigurationElements extensionRegistry getConfigurationElementsFor acceleratorScopes deprecatedConfigurationElements IConfigurationElement deprecatedConfigurationElement deprecatedConfigurationElements deprecatedConfigurationElement getName acceleratorScope readContextDefinition deprecatedConfigurationElement deprecatedConfigurationElements extensionRegistry getConfigurationElementsFor deprecatedConfigurationElements IConfigurationElement deprecatedConfigurationElement deprecatedConfigurationElements deprecatedConfigurationElement getName readContextDefinition deprecatedConfigurationElement IConfigurationElement configurationElements extensionRegistry getConfigurationElementsFor PACKAGE_FULL configurationElements IConfigurationElement configurationElement configurationElements configurationElement getName TAG_CONTEXT readContextDefinition configurationElement contextRegistryChanged contextContextBindingDefinitions contextContextBindingDefinitions contextContextBindingDefinitions unmodifiableList contextContextBindingDefinitions contextRegistryChanged contextDefinitions contextDefinitions contextDefinitions unmodifiableList contextDefinitions contextRegistryChanged contextRegistryChanged fireContextRegistryChanged
private void read Context Definition I Configuration Element configuration Element Context Definition context Definition Persistence read Context Definition new Configuration Element Memento configuration Element get Namespace configuration Element if context Definition null context Definitions add context Definition  readContextDefinition IConfigurationElement configurationElement ContextDefinition contextDefinition readContextDefinition ConfigurationElementMemento configurationElement getNamespace configurationElement contextDefinition contextDefinitions contextDefinition

public interface I Context Registry void add Context Registry Listener I Context Registry Listener context Registry Listener  IContextRegistry addContextRegistryListener IContextRegistryListener contextRegistryListener
void add Context Registry Listener I Context Registry Listener context Registry Listener List get Context Context Binding Definitions  addContextRegistryListener IContextRegistryListener contextRegistryListener getContextContextBindingDefinitions
List get Context Context Binding Definitions List get Context Definitions  getContextContextBindingDefinitions getContextDefinitions
List get Context Definitions void remove Context Registry Listener I Context Registry Listener context Registry Listener  getContextDefinitions removeContextRegistryListener IContextRegistryListener contextRegistryListener

public interface I Context Registry Listener void context Registry Changed Context Registry Event context Registry Event  IContextRegistryListener contextRegistryChanged ContextRegistryEvent contextRegistryEvent

Sets the set of identifiers to enabled contexts If there are any ancestors of these contexts that are not enabled they should be enabled as well param enabled Context Ids the set of identifiers to enabled contexts This set may be empty but it must not be code null code If this set is not empty it must only contain instances of code String code  enabledContextIds

see java util Comparator compare java lang Object java lang Object public final int compare final Object object1 final Object object2 final String context Id1 String object1 final String context Id2 String object2 I Context context String parent Id Get the depth of the first context int depth1 0 context get Context context Id1 try parent Id context get Parent Id while parent Id null depth1 context get Context parent Id parent Id context get Parent Id catch final Not Defined Exception e Do nothing Stop ascending the ancestry Get the depth of the second context int depth2 0 context get Context context Id2 try parent Id context get Parent Id while parent Id null depth2 context get Context parent Id parent Id context get Parent Id catch final Not Defined Exception e Do nothing Stop ascending the ancestry If the contexts are equal depth then use their identifier int compare depth2 depth1 if compare 0 compare context Id1 compare To context Id2 return compare  contextId1 contextId2 IContext parentId getContext contextId1 parentId getParentId parentId getContext parentId parentId getParentId NotDefinedException getContext contextId2 parentId getParentId parentId getContext parentId parentId getParentId NotDefinedException contextId1 compareTo contextId2
Constructs a new instance of code Depth Sorted Context Id Set code with the set to be sorted param context Ids A set of context identifiers strings this may contain code null code values The set may not be code null code but may be empty private Depth Sorted Context Id Set final Set context Ids super new Context Id Depth Comparator add All context Ids  DepthSortedContextIdSet contextIds DepthSortedContextIdSet contextIds ContextIdDepthComparator addAll contextIds
static boolean is Context Definition Child Of String ancestor String id Map context Definitions By Id Collection visited new Hash Set while id null visited contains id Context Definition context Definition Context Definition context Definitions By Id get id visited add id if context Definition null Util equals id context Definition get Parent Id ancestor return true return false  isContextDefinitionChildOf contextDefinitionsById HashSet ContextDefinition contextDefinition ContextDefinition contextDefinitionsById contextDefinition contextDefinition getParentId
private Set enabled Context Ids new Hash Set public Mutable Context Manager this new Extension Context Registry Platform get Extension Registry  enabledContextIds HashSet MutableContextManager ExtensionContextRegistry getExtensionRegistry
add Context Registry Listener new I Context Registry Listener public void context Registry Changed Context Registry Event context Registry Event read Registry  addContextRegistryListener IContextRegistryListener contextRegistryChanged ContextRegistryEvent contextRegistryEvent readRegistry
public Mutable Context Manager I Context Registry context Registry if context Registry null throw new Null Pointer Exception this context Registry context Registry this context Registry add Context Registry Listener new I Context Registry Listener public void context Registry Changed Context Registry Event context Registry Event read Registry read Registry  MutableContextManager IContextRegistry contextRegistry contextRegistry NullPointerException contextRegistry contextRegistry contextRegistry addContextRegistryListener IContextRegistryListener contextRegistryChanged ContextRegistryEvent contextRegistryEvent readRegistry readRegistry
public I Context get Context String context Id if context Id null throw new Null Pointer Exception Context context Context contexts By Id get context Id if context null context new Context context Id update Context context contexts By Id put context Id context return context  IContext getContext contextId contextId NullPointerException contextsById contextId contextId updateContext contextsById contextId
public Sorted Set get Defined Context Ids return new Depth Sorted Context Id Set defined Context Ids  SortedSet getDefinedContextIds DepthSortedContextIdSet definedContextIds
public Sorted Set get Enabled Context Ids return new Depth Sorted Context Id Set enabled Context Ids  SortedSet getEnabledContextIds DepthSortedContextIdSet enabledContextIds
private void notify Contexts Map context Events By Context Id for Iterator iterator context Events By Context Id entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String context Id String entry get Key Context Event context Event Context Event entry get Value Context context Context contexts By Id get context Id if context null context fire Context Changed context Event  notifyContexts contextEventsByContextId contextEventsByContextId entrySet hasNext contextId getKey ContextEvent contextEvent ContextEvent getValue contextsById contextId fireContextChanged contextEvent
private void read Registry Collection context Definitions new Array List context Definitions add All context Registry get Context Definitions Map context Definitions By Id new Hash Map Context Definition context Definitions By Id context Definitions false for Iterator iterator context Definitions By Id values iterator iterator has Next Context Definition context Definition Context Definition iterator next String name context Definition get Name if name null name length 0 iterator remove for Iterator iterator context Definitions By Id key Set iterator iterator has Next if is Context Definition Child Of null String iterator next context Definitions By Id iterator remove this context Definitions By Id context Definitions By Id boolean defined Context Ids Changed false Set defined Context Ids new Hash Set context Definitions By Id key Set Set previously Defined Context Ids null if defined Context Ids equals this defined Context Ids previously Defined Context Ids this defined Context Ids this defined Context Ids defined Context Ids defined Context Ids Changed true Map context Events By Context Id update Contexts contexts By Id key Set if defined Context Ids Changed fire Context Manager Changed new Context Manager Event this defined Context Ids Changed false previously Defined Context Ids null if context Events By Context Id null notify Contexts context Events By Context Id  readRegistry contextDefinitions ArrayList contextDefinitions addAll contextRegistry getContextDefinitions contextDefinitionsById HashMap ContextDefinition contextDefinitionsById contextDefinitions contextDefinitionsById hasNext ContextDefinition contextDefinition ContextDefinition contextDefinition getName contextDefinitionsById keySet hasNext isContextDefinitionChildOf contextDefinitionsById contextDefinitionsById contextDefinitionsById definedContextIdsChanged definedContextIds HashSet contextDefinitionsById keySet previouslyDefinedContextIds definedContextIds definedContextIds previouslyDefinedContextIds definedContextIds definedContextIds definedContextIds definedContextIdsChanged contextEventsByContextId updateContexts contextsById keySet definedContextIdsChanged fireContextManagerChanged ContextManagerEvent definedContextIdsChanged previouslyDefinedContextIds contextEventsByContextId notifyContexts contextEventsByContextId
public void set Enabled Context Ids Set enabled Context Ids enabled Context Ids Util safe Copy enabled Context Ids String class boolean context Manager Changed false Map context Events By Context Id null Set previously Enabled Context Ids null if this enabled Context Ids equals enabled Context Ids previously Enabled Context Ids this enabled Context Ids this enabled Context Ids enabled Context Ids context Manager Changed true context Events By Context Id update Contexts contexts By Id key Set if context Events By Context Id null notify Contexts context Events By Context Id if context Manager Changed fire Context Manager Changed new Context Manager Event this false true null previously Enabled Context Ids  setEnabledContextIds enabledContextIds enabledContextIds safeCopy enabledContextIds contextManagerChanged contextEventsByContextId previouslyEnabledContextIds enabledContextIds enabledContextIds previouslyEnabledContextIds enabledContextIds enabledContextIds enabledContextIds contextManagerChanged contextEventsByContextId updateContexts contextsById keySet contextEventsByContextId notifyContexts contextEventsByContextId contextManagerChanged fireContextManagerChanged ContextManagerEvent previouslyEnabledContextIds
private Context Event update Context Context context Set context Context Bindings Set context Context Bindings By Parent Context Id get context get Id Context Definition context Definition Context Definition context Definitions By Id get context get Id boolean defined Changed context set Defined context Definition null boolean enabled Changed context set Enabled enabled Context Ids contains context get Id boolean name Changed context set Name context Definition null context Definition get Name null boolean parent Id Changed context set Parent Id context Definition null context Definition get Parent Id null if defined Changed enabled Changed name Changed parent Id Changed return new Context Event context defined Changed enabled Changed name Changed parent Id Changed else return null  ContextEvent updateContext contextContextBindings contextContextBindingsByParentContextId getId ContextDefinition contextDefinition ContextDefinition contextDefinitionsById getId definedChanged setDefined contextDefinition enabledChanged setEnabled enabledContextIds getId nameChanged setName contextDefinition contextDefinition getName parentIdChanged setParentId contextDefinition contextDefinition getParentId definedChanged enabledChanged nameChanged parentIdChanged ContextEvent definedChanged enabledChanged nameChanged parentIdChanged
private Map update Contexts Collection context Ids Map context Events By Context Id new Tree Map for Iterator iterator context Ids iterator iterator has Next String context Id String iterator next Context context Context contexts By Id get context Id if context null Context Event context Event update Context context if context Event null context Events By Context Id put context Id context Event return context Events By Context Id  updateContexts contextIds contextEventsByContextId TreeMap contextIds hasNext contextId contextsById contextId ContextEvent contextEvent updateContext contextEvent contextEventsByContextId contextId contextEvent contextEventsByContextId

static Context Definition read Context Definition I Memento memento String source Id Override if memento null throw new Null Pointer Exception String id memento get String TAG ID String name memento get String TAG NAME String parent Id memento get String TAG PARENT ID String source Id source Id Override null source Id Override memento get String TAG SOURCE ID TODO DEPRECATED Support for the old commands extension point way of specifying parents and for the old accelerator Scopes extension point way of specifying parents if parent Id null accelerator Scopes support parent Id memento get String TAG PARENT SCOPE if parent Id null commands support parent Id memento get String TAG PARENT TODO DEPRECATED END return new Context Definition id name parent Id source Id  ContextDefinition readContextDefinition IMemento sourceIdOverride NullPointerException getString TAG_ID getString TAG_NAME parentId getString TAG_PARENT_ID sourceId sourceIdOverride sourceIdOverride getString TAG_SOURCE_ID acceleratorScopes parentId acceleratorScopes parentId getString TAG_PARENT_SCOPE parentId parentId getString TAG_PARENT ContextDefinition parentId sourceId
static List read Context Definitions I Memento memento String name String source Id Override if memento null name null throw new Null Pointer Exception I Memento mementos memento get Children name if mementos null throw new Null Pointer Exception List list new Array List mementos length for int i 0 i mementos length i list add read Context Definition mementos i source Id Override return list  readContextDefinitions IMemento sourceIdOverride NullPointerException IMemento getChildren NullPointerException ArrayList readContextDefinition sourceIdOverride
static void write Context Definition I Memento memento Context Definition context Definition if memento null context Definition null throw new Null Pointer Exception memento put String TAG ID context Definition get Id memento put String TAG NAME context Definition get Name memento put String TAG PARENT ID context Definition get Parent Id memento put String TAG SOURCE ID context Definition get Source Id  writeContextDefinition IMemento ContextDefinition contextDefinition contextDefinition NullPointerException putString TAG_ID contextDefinition getId putString TAG_NAME contextDefinition getName putString TAG_PARENT_ID contextDefinition getParentId putString TAG_SOURCE_ID contextDefinition getSourceId
static void write Context Definitions I Memento memento String name List context Definitions if memento null name null context Definitions null throw new Null Pointer Exception context Definitions new Array List context Definitions Iterator iterator context Definitions iterator while iterator has Next Util assert Instance iterator next Context Definition class iterator context Definitions iterator while iterator has Next write Context Definition memento create Child name Context Definition iterator next  writeContextDefinitions IMemento contextDefinitions contextDefinitions NullPointerException contextDefinitions ArrayList contextDefinitions contextDefinitions hasNext assertInstance ContextDefinition contextDefinitions hasNext writeContextDefinition createChild ContextDefinition
Constructs a new instance of code Persistence code This class should never be instantiated private Persistence This class should not be instantiated 

add Context Manager Listener new I Context Manager Listener public void context Manager Changed Context Manager Event context Manager Event Context Manager Event proxy Context Manager Event new Context Manager Event Proxy Context Manager this context Manager Event have Defined Context Ids Changed context Manager Event have Enabled Context Ids Changed context Manager Event get Previously Defined Context Ids context Manager Event get Previously Enabled Context Ids fire Context Manager Changed proxy Context Manager Event  addContextManagerListener IContextManagerListener contextManagerChanged ContextManagerEvent contextManagerEvent ContextManagerEvent proxyContextManagerEvent ContextManagerEvent ProxyContextManager contextManagerEvent haveDefinedContextIdsChanged contextManagerEvent haveEnabledContextIdsChanged contextManagerEvent getPreviouslyDefinedContextIds contextManagerEvent getPreviouslyEnabledContextIds fireContextManagerChanged proxyContextManagerEvent
public Proxy Context Manager I Context Manager context Manager if context Manager null throw new Null Pointer Exception this context Manager context Manager this context Manager add Context Manager Listener new I Context Manager Listener public void context Manager Changed Context Manager Event context Manager Event Context Manager Event proxy Context Manager Event new Context Manager Event Proxy Context Manager this context Manager Event have Defined Context Ids Changed context Manager Event have Enabled Context Ids Changed context Manager Event get Previously Defined Context Ids context Manager Event get Previously Enabled Context Ids fire Context Manager Changed proxy Context Manager Event  ProxyContextManager IContextManager contextManager contextManager NullPointerException contextManager contextManager contextManager addContextManagerListener IContextManagerListener contextManagerChanged ContextManagerEvent contextManagerEvent ContextManagerEvent proxyContextManagerEvent ContextManagerEvent ProxyContextManager contextManagerEvent haveDefinedContextIdsChanged contextManagerEvent haveEnabledContextIdsChanged contextManagerEvent getPreviouslyDefinedContextIds contextManagerEvent getPreviouslyEnabledContextIds fireContextManagerChanged proxyContextManagerEvent
public I Context get Context String context Id return context Manager get Context context Id  IContext getContext contextId contextManager getContext contextId
public Sorted Set get Defined Context Ids return context Manager get Defined Context Ids  SortedSet getDefinedContextIds contextManager getDefinedContextIds
public Sorted Set get Enabled Context Ids return context Manager get Enabled Context Ids  SortedSet getEnabledContextIds contextManager getEnabledContextIds

public interface I Context Service void add Enabled Submission String context Id  IContextService addEnabledSubmission contextId
void add Enabled Submission String context Id void add Enabled Submissions Collection context Ids  addEnabledSubmission contextId addEnabledSubmissions contextIds
void add Enabled Submissions Collection context Ids void remove Enabled Submission String context Id  addEnabledSubmissions contextIds removeEnabledSubmission contextId
void remove Enabled Submission String context Id void remove Enabled Submissions Collection context Ids  removeEnabledSubmission contextId removeEnabledSubmissions contextIds

Creates a tree of context identifiers representing the hierarchical structure of the given contexts The tree is structured as a mapping from child to parent param context Ids The set of context identifiers to be converted into a tree must not be code null code return The tree of contexts to use may be empty but never code null code The keys and values are both strings private final Map create Context Tree For final Set context Ids final Map context Tree new Hash Map final I Context Manager context Manager get Context Manager final Iterator context Id Itr context Ids iterator while context Id Itr has Next String child Context Id String context Id Itr next while child Context Id null final I Context child Context context Manager get Context child Context Id try final String parent Context Id child Context get Parent Id context Tree put child Context Id parent Context Id child Context Id parent Context Id catch final Not Defined Exception e break stop ascending return context Tree  contextIds createContextTreeFor contextIds contextTree HashMap IContextManager contextManager getContextManager contextIdItr contextIds contextIdItr hasNext childContextId contextIdItr childContextId IContext childContext contextManager getContext childContextId parentContextId childContext getParentId contextTree childContextId parentContextId childContextId parentContextId NotDefinedException contextTree
p Creates a tree of context identifiers representing the hierarchical structure of the given contexts The tree is structured as a mapping from child to parent In this tree the key binding specific filtering of contexts will have taken place p p This method is intended for internal use only p param context Ids The set of context identifiers to be converted into a tree must not be code null code return The tree of contexts to use may be empty but never code null code The keys and values are both strings public final Map create Filtered Context Tree For final Set context Ids Check to see whether a dialog or window is active boolean dialog false boolean window false Iterator context Id Itr context Ids iterator while context Id Itr has Next final String context Id String context Id Itr next if CONTEXT ID DIALOG equals context Id dialog true continue if CONTEXT ID WINDOW equals context Id window true continue Remove all context identifiers for contexts whose parents are dialog or window and the corresponding dialog or window context is not active try context Id Itr context Ids iterator while context Id Itr has Next String context Id String context Id Itr next I Context context mutable Context Manager get Context context Id String parent Id context get Parent Id while parent Id null if CONTEXT ID DIALOG equals parent Id if dialog context Id Itr remove break if CONTEXT ID WINDOW equals parent Id if window context Id Itr remove break if CONTEXT ID DIALOG AND WINDOW equals parent Id if window dialog context Id Itr remove break context mutable Context Manager get Context parent Id parent Id context get Parent Id catch Not Defined Exception e if DEBUG System out println CONTEXTS Not Defined Exception NON NLS 1 e get Message while filtering dialog window contexts NON NLS 1 return create Context Tree For context Ids  contextIds createFilteredContextTreeFor contextIds contextIdItr contextIds contextIdItr hasNext contextId contextIdItr CONTEXT_ID_DIALOG contextId CONTEXT_ID_WINDOW contextId contextIdItr contextIds contextIdItr hasNext contextId contextIdItr IContext mutableContextManager getContext contextId parentId getParentId parentId CONTEXT_ID_DIALOG parentId contextIdItr CONTEXT_ID_WINDOW parentId contextIdItr CONTEXT_ID_DIALOG_AND_WINDOW parentId contextIdItr mutableContextManager getContext parentId parentId getParentId NotDefinedException NotDefinedException getMessage createContextTreeFor contextIds
see org eclipse swt widgets Listener handle Event org eclipse swt widgets Event public void handle Event Event event check Window Type event display get Active Shell  handleEvent handleEvent checkWindowType getActiveShell
private I Page Listener page Listener new I Page Listener public void page Activated I Workbench Page workbench Page process Enabled Submissions false  IPageListener pageListener IPageListener pageActivated IWorkbenchPage workbenchPage processEnabledSubmissions
public void page Closed I Workbench Page workbench Page process Enabled Submissions false  pageClosed IWorkbenchPage workbenchPage processEnabledSubmissions
public void page Opened I Workbench Page workbench Page process Enabled Submissions false  pageOpened IWorkbenchPage workbenchPage processEnabledSubmissions
private I Part Listener part Listener new I Part Listener public void part Activated I Workbench Part workbench Part process Enabled Submissions false  IPartListener partListener IPartListener partActivated IWorkbenchPart workbenchPart processEnabledSubmissions
public void part Brought To Top I Workbench Part workbench Part process Enabled Submissions false  partBroughtToTop IWorkbenchPart workbenchPart processEnabledSubmissions
public void part Closed I Workbench Part workbench Part process Enabled Submissions false  partClosed IWorkbenchPart workbenchPart processEnabledSubmissions
public void part Deactivated I Workbench Part workbench Part process Enabled Submissions false  partDeactivated IWorkbenchPart workbenchPart processEnabledSubmissions
public void part Opened I Workbench Part workbench Part process Enabled Submissions false  partOpened IWorkbenchPart workbenchPart processEnabledSubmissions
private I Perspective Listener perspective Listener new I Perspective Listener public void perspective Activated I Workbench Page workbench Page I Perspective Descriptor perspective Descriptor process Enabled Submissions false  IPerspectiveListener perspectiveListener IPerspectiveListener perspectiveActivated IWorkbenchPage workbenchPage IPerspectiveDescriptor perspectiveDescriptor processEnabledSubmissions
public void perspective Changed I Workbench Page workbench Page I Perspective Descriptor perspective Descriptor String change Id process Enabled Submissions false  perspectiveChanged IWorkbenchPage workbenchPage IPerspectiveDescriptor perspectiveDescriptor changeId processEnabledSubmissions
Constructs a new instance of code Workbench Command Support code This attaches the key binding support and adds a global shell activation filter param workbench To Support The workbench that needs to be supported by this instance must not be code null code public Workbench Context Support final Workbench workbench To Support workbench workbench To Support mutable Context Manager Context Manager Factory get Mutable Context Manager proxy Context Manager new Proxy Context Manager mutable Context Manager And hook up a shell activation filter workbench To Support get Display add Filter SWT Activate activation Listener  WorkbenchCommandSupport workbenchToSupport WorkbenchContextSupport workbenchToSupport workbenchToSupport mutableContextManager ContextManagerFactory getMutableContextManager proxyContextManager ProxyContextManager mutableContextManager workbenchToSupport getDisplay addFilter activationListener
public void add Enabled Submission Enabled Submission enabled Submission add Enabled Submission Real enabled Submission process Enabled Submissions true  addEnabledSubmission EnabledSubmission enabledSubmission addEnabledSubmissionReal enabledSubmission processEnabledSubmissions
Adds a single enabled submission without causing the submissions to be reprocessed This is an internal method used by the two API methods param enabled Submission The enabled submission to add must not be code null code private final void add Enabled Submission Real Enabled Submission enabled Submission final String context Id enabled Submission get Context Id List enabled Submissions2 List enabled Submissions By Context Id get context Id if enabled Submissions2 null enabled Submissions2 new Array List enabled Submissions By Context Id put context Id enabled Submissions2 enabled Submissions2 add enabled Submission  enabledSubmission addEnabledSubmissionReal EnabledSubmission enabledSubmission contextId enabledSubmission getContextId enabledSubmissions2 enabledSubmissionsByContextId contextId enabledSubmissions2 enabledSubmissions2 ArrayList enabledSubmissionsByContextId contextId enabledSubmissions2 enabledSubmissions2 enabledSubmission
public void add Enabled Submissions Collection enabled Submissions final Iterator submission Itr enabled Submissions iterator while submission Itr has Next add Enabled Submission Real Enabled Submission submission Itr next process Enabled Submissions true  addEnabledSubmissions enabledSubmissions submissionItr enabledSubmissions submissionItr hasNext addEnabledSubmissionReal EnabledSubmission submissionItr processEnabledSubmissions
public void widget Disposed Dispose Event e registered Windows remove null remove Enabled Submissions new Submissions new Shell remove Dispose Listener this  widgetDisposed DisposeEvent registeredWindows removeEnabledSubmissions newSubmissions newShell removeDisposeListener
Checks whether the new active shell is registered If it is already registered then it does no work If it is not registered then it checks what type of contexts the shell should have by default This is determined by parenting A shell with no parent receives no contexts A shell with a parent receives the dialog contexts param new Shell The newly active shell may be code null code or disposed private final void check Window Type final Shell new Shell boolean submissions Processed false final Shell old Shell active Shell if new Shell old Shell If the previous active shell was recognized as a dialog by default then remove its submissions List old Submissions List registered Windows get old Shell if old Submissions null The old shell wasn t registered So we need to check if it was considered a dialog by default old Submissions List registered Windows get null if old Submissions null remove Enabled Submissions old Submissions submissions Processed true If the new active shell is recognized as a dialog by default then create some submissions remember them and submit them for processing if new Shell null new Shell is Disposed final List new Submissions if new Shell get Parent null registered Windows get new Shell null This is a dialog by default new Submissions new Array List new Submissions add new Enabled Submission null new Shell null CONTEXT ID DIALOG AND WINDOW new Submissions add new Enabled Submission null new Shell null CONTEXT ID DIALOG registered Windows put null new Submissions Make sure the submissions will be removed in event of disposal This is really just a paranoid check The old Submissions code above should take care of this new Shell add Dispose Listener new Dispose Listener non Javadoc see org eclipse swt events Dispose Listener widget Disposed org eclipse swt events Dispose Event public void widget Disposed Dispose Event e registered Windows remove null remove Enabled Submissions new Submissions new Shell remove Dispose Listener this else Shells that are not dialogs by default must register new Submissions List registered Windows get new Shell if new Submissions null add Enabled Submissions new Submissions submissions Processed true If we still haven t reprocessed the submissions then do it now if submissions Processed process Enabled Submissions false new Shell  newShell checkWindowType newShell submissionsProcessed oldShell activeShell newShell oldShell oldSubmissions registeredWindows oldShell oldSubmissions oldSubmissions registeredWindows oldSubmissions removeEnabledSubmissions oldSubmissions submissionsProcessed newShell newShell isDisposed newSubmissions newShell getParent registeredWindows newShell newSubmissions ArrayList newSubmissions EnabledSubmission newShell CONTEXT_ID_DIALOG_AND_WINDOW newSubmissions EnabledSubmission newShell CONTEXT_ID_DIALOG registeredWindows newSubmissions oldSubmissions newShell addDisposeListener DisposeListener DisposeListener widgetDisposed DisposeEvent widgetDisposed DisposeEvent registeredWindows removeEnabledSubmissions newSubmissions newShell removeDisposeListener newSubmissions registeredWindows newShell newSubmissions addEnabledSubmissions newSubmissions submissionsProcessed submissionsProcessed processEnabledSubmissions newShell
public I Context Manager get Context Manager return proxy Context Manager  IContextManager getContextManager proxyContextManager
An accessor for the underlying key binding support This method is internal and is not intended to be used by clients It is currently only used for testing purposes return A reference to the key binding support never code null code public final Workbench Keyboard get Keyboard return keyboard  WorkbenchKeyboard getKeyboard
Initializes the key binding support public final void initialize Hook up the key binding support keyboard new Workbench Keyboard workbench workbench get Activity Support get Activity Manager workbench get Command Support get Command Manager set Key Filter Enabled true  WorkbenchKeyboard getActivitySupport getActivityManager getCommandSupport getCommandManager setKeyFilterEnabled
public boolean is Key Filter Enabled synchronized keyboard return key Filter Enabled  isKeyFilterEnabled keyFilterEnabled
private void process Enabled Submissions boolean force process Enabled Submissions force workbench get Display get Active Shell  processEnabledSubmissions processEnabledSubmissions getDisplay getActiveShell
TODO See Workbench Keyboard Switch to private when Bug 56231 is resolved public void process Enabled Submissions boolean force final Shell new Active Shell If we are not currently processing then wait if processing return I Workbench Site new Active Workbench Site null final I Workbench Window new Active Workbench Window workbench get Active Workbench Window boolean update false Update the active shell and swap the listener if active Shell new Active Shell active Shell new Active Shell update true Update the active workbench window and swap the listeners if active Workbench Window new Active Workbench Window if active Workbench Window null active Workbench Window remove Page Listener page Listener active Workbench Window remove Perspective Listener perspective Listener active Workbench Window get Part Service remove Part Listener part Listener if new Active Workbench Window null new Active Workbench Window add Page Listener page Listener new Active Workbench Window add Perspective Listener perspective Listener new Active Workbench Window get Part Service add Part Listener part Listener active Workbench Window new Active Workbench Window update true Get a reference to the active workbench site on the new active workbench window if new Active Workbench Window null I Workbench Page active Workbench Page new Active Workbench Window get Active Page if active Workbench Page null I Workbench Part active Workbench Part active Workbench Page get Active Part if active Workbench Part null new Active Workbench Site active Workbench Part get Site if force update active Workbench Site new Active Workbench Site active Workbench Site new Active Workbench Site final Set enabled Context Ids new Hash Set for Iterator iterator enabled Submissions By Context Id entry Set iterator iterator has Next final Map Entry entry Map Entry iterator next final String context Id String entry get Key final List enabled Submissions List entry get Value for int i 0 i enabled Submissions size i Enabled Submission enabled Submission Enabled Submission enabled Submissions get i Shell active Shell2 enabled Submission get Active Shell if active Shell2 null active Shell2 new Active Shell continue I Workbench Site active Workbench Site2 enabled Submission get Active Workbench Part Site if active Workbench Site2 null active Workbench Site2 new Active Workbench Site continue enabled Context Ids add context Id break if DEBUG mutable Context Manager get Enabled Context Ids equals enabled Context Ids System out println CONTEXTS enabled Context Ids NON NLS 1 if DEBUG VERBOSE final Exception exception new Exception exception fill In Stack Trace final Stack Trace Element stack Trace exception get Stack Trace final int elements To Show stack Trace length DEBUG STACK LENGTH TO SHOW stack Trace length DEBUG STACK LENGTH TO SHOW for int i 0 i elements To Show i final Stack Trace Element element stack Trace i System out println CONTEXTS NON NLS 1 element to String Set the list of enabled identifiers to be the stripped list mutable Context Manager set Enabled Context Ids enabled Context Ids  WorkbenchKeyboard processEnabledSubmissions newActiveShell IWorkbenchSite newActiveWorkbenchSite IWorkbenchWindow newActiveWorkbenchWindow getActiveWorkbenchWindow activeShell newActiveShell activeShell newActiveShell activeWorkbenchWindow newActiveWorkbenchWindow activeWorkbenchWindow activeWorkbenchWindow removePageListener pageListener activeWorkbenchWindow removePerspectiveListener perspectiveListener activeWorkbenchWindow getPartService removePartListener partListener newActiveWorkbenchWindow newActiveWorkbenchWindow addPageListener pageListener newActiveWorkbenchWindow addPerspectiveListener perspectiveListener newActiveWorkbenchWindow getPartService addPartListener partListener activeWorkbenchWindow newActiveWorkbenchWindow newActiveWorkbenchWindow IWorkbenchPage activeWorkbenchPage newActiveWorkbenchWindow getActivePage activeWorkbenchPage IWorkbenchPart activeWorkbenchPart activeWorkbenchPage getActivePart activeWorkbenchPart newActiveWorkbenchSite activeWorkbenchPart getSite activeWorkbenchSite newActiveWorkbenchSite activeWorkbenchSite newActiveWorkbenchSite enabledContextIds HashSet enabledSubmissionsByContextId entrySet hasNext contextId getKey enabledSubmissions getValue enabledSubmissions EnabledSubmission enabledSubmission EnabledSubmission enabledSubmissions activeShell2 enabledSubmission getActiveShell activeShell2 activeShell2 newActiveShell IWorkbenchSite activeWorkbenchSite2 enabledSubmission getActiveWorkbenchPartSite activeWorkbenchSite2 activeWorkbenchSite2 newActiveWorkbenchSite enabledContextIds contextId mutableContextManager getEnabledContextIds enabledContextIds enabledContextIds DEBUG_VERBOSE fillInStackTrace StackTraceElement stackTrace getStackTrace elementsToShow stackTrace DEBUG_STACK_LENGTH_TO_SHOW stackTrace DEBUG_STACK_LENGTH_TO_SHOW elementsToShow StackTraceElement stackTrace toString mutableContextManager setEnabledContextIds enabledContextIds
see org eclipse swt events Dispose Listener widget Disposed org eclipse swt events Dispose Event public void widget Disposed Dispose Event e registered Windows remove shell remove Enabled Submissions submissions  DisposeListener widgetDisposed DisposeEvent widgetDisposed DisposeEvent registeredWindows removeEnabledSubmissions
public boolean register Shell final Shell shell final int type We do not allow null shell registration It is reserved if shell null throw new Null Pointer Exception The shell was null NON NLS 1 Build the list of submissions final List submissions new Array List switch type case TYPE DIALOG submissions add new Enabled Submission null shell null CONTEXT ID DIALOG AND WINDOW submissions add new Enabled Submission null shell null CONTEXT ID DIALOG break case TYPE NONE break case TYPE WINDOW submissions add new Enabled Submission null shell null CONTEXT ID DIALOG AND WINDOW submissions add new Enabled Submission null shell null CONTEXT ID WINDOW break default throw new Illegal Argument Exception The type is not recognized NON NLS 1 type Check to see if the submissions are already present boolean return Value false List previous Submissions List registered Windows get shell if previous Submissions null return Value true remove Enabled Submissions previous Submissions Add the new submissions and force some reprocessing to occur registered Windows put shell submissions add Enabled Submissions submissions Make sure the submissions will be removed in event of disposal shell add Dispose Listener new Dispose Listener non Javadoc see org eclipse swt events Dispose Listener widget Disposed org eclipse swt events Dispose Event public void widget Disposed Dispose Event e registered Windows remove shell remove Enabled Submissions submissions return return Value  registerShell NullPointerException ArrayList TYPE_DIALOG EnabledSubmission CONTEXT_ID_DIALOG_AND_WINDOW EnabledSubmission CONTEXT_ID_DIALOG TYPE_NONE TYPE_WINDOW EnabledSubmission CONTEXT_ID_DIALOG_AND_WINDOW EnabledSubmission CONTEXT_ID_WINDOW IllegalArgumentException returnValue previousSubmissions registeredWindows previousSubmissions returnValue removeEnabledSubmissions previousSubmissions registeredWindows addEnabledSubmissions addDisposeListener DisposeListener DisposeListener widgetDisposed DisposeEvent widgetDisposed DisposeEvent registeredWindows removeEnabledSubmissions returnValue
public void remove Enabled Submission Enabled Submission enabled Submission remove Enabled Submission Real enabled Submission process Enabled Submissions true  removeEnabledSubmission EnabledSubmission enabledSubmission removeEnabledSubmissionReal enabledSubmission processEnabledSubmissions
Removes a single enabled submission without causing all of the submissions to be reprocessed This is used by the two API methods to carry out work param enabled Submission The submission to remove must not be code null code private final void remove Enabled Submission Real Enabled Submission enabled Submission final String context Id enabled Submission get Context Id final List enabled Submissions2 List enabled Submissions By Context Id get context Id if enabled Submissions2 null enabled Submissions2 remove enabled Submission if enabled Submissions2 is Empty enabled Submissions By Context Id remove context Id  enabledSubmission removeEnabledSubmissionReal EnabledSubmission enabledSubmission contextId enabledSubmission getContextId enabledSubmissions2 enabledSubmissionsByContextId contextId enabledSubmissions2 enabledSubmissions2 enabledSubmission enabledSubmissions2 isEmpty enabledSubmissionsByContextId contextId
public void remove Enabled Submissions Collection enabled Submissions final Iterator submission Itr enabled Submissions iterator while submission Itr has Next remove Enabled Submission Real Enabled Submission submission Itr next process Enabled Submissions true  removeEnabledSubmissions enabledSubmissions submissionItr enabledSubmissions submissionItr hasNext removeEnabledSubmissionReal EnabledSubmission submissionItr processEnabledSubmissions
public void set Key Filter Enabled boolean enabled synchronized keyboard Display current Display Display get Current Listener key Filter keyboard get Key Down Filter if enabled current Display add Filter SWT Key Down key Filter current Display add Filter SWT Traverse key Filter else current Display remove Filter SWT Key Down key Filter current Display remove Filter SWT Traverse key Filter key Filter Enabled enabled  setKeyFilterEnabled currentDisplay getCurrent keyFilter getKeyDownFilter currentDisplay addFilter KeyDown keyFilter currentDisplay addFilter keyFilter currentDisplay removeFilter KeyDown keyFilter currentDisplay removeFilter keyFilter keyFilterEnabled
public boolean unregister Shell Shell shell Don t allow this method to play with the special null slot if shell null return false List previous Submissions List registered Windows get shell if previous Submissions null registered Windows remove shell remove Enabled Submissions previous Submissions return true return false  unregisterShell previousSubmissions registeredWindows previousSubmissions registeredWindows removeEnabledSubmissions previousSubmissions
Sets whether the workbench s context support should process enabled submissions The workbench should not allow the event loop to spin unless this value is set to code true code If the value changes from code false code to code true code this automatically triggers a re processing of the enabled submissions param processing Whether to process enabled submissions public final void set Processing final boolean processing final boolean reprocess this processing processing this processing processing if reprocess process Enabled Submissions true  setProcessing processEnabledSubmissions

Creates a Cycle Editor Action public Cycle Editor Action I Workbench Window window boolean forward super window forward NON NLS 1 update State  CycleEditorAction CycleEditorAction IWorkbenchWindow updateState
protected void set Text TBD Remove text and tooltip when this becomes an invisible action if forward set Text Workbench Messages get String Cycle Editor Action next text NON NLS 1 set Tool Tip Text Workbench Messages get String Cycle Editor Action next tool Tip NON NLS 1 issue missing action ids Workbench Help set Help this I Help Context Ids CYCLE EDITOR FORWARD ACTION set Action Definition Id org eclipse ui window next Editor NON NLS 1 else set Text Workbench Messages get String Cycle Editor Action prev text NON NLS 1 set Tool Tip Text Workbench Messages get String Cycle Editor Action prev tool Tip NON NLS 1 issue missing action ids Workbench Help set Help this I Help Context Ids CYCLE EDITOR BACKWARD ACTION set Action Definition Id org eclipse ui window previous Editor NON NLS 1  setText setText WorkbenchMessages getString CycleEditorAction setToolTipText WorkbenchMessages getString CycleEditorAction toolTip WorkbenchHelp setHelp IHelpContextIds CYCLE_EDITOR_FORWARD_ACTION setActionDefinitionId nextEditor setText WorkbenchMessages getString CycleEditorAction setToolTipText WorkbenchMessages getString CycleEditorAction toolTip WorkbenchHelp setHelp IHelpContextIds CYCLE_EDITOR_BACKWARD_ACTION setActionDefinitionId previousEditor
Updates the enabled state public void update State Workbench Page page Workbench Page get Active Page if page null set Enabled false return enable iff there is at least one other editor to switch to set Enabled page get Sorted Editors length 1  updateState WorkbenchPage WorkbenchPage getActivePage setEnabled setEnabled getSortedEditors
Add all views to the dialog in the activation order protected void add Items Table table Workbench Page page I Editor Reference refs page get Sorted Editors for int i refs length 1 i 0 i Table Item item null item new Table Item table SWT NONE if refs i is Dirty item set Text refs i get Title NON NLS 1 else item set Text refs i get Title item set Image refs i get Title Image item set Data refs i  addItems WorkbenchPage IEditorReference getSortedEditors TableItem TableItem isDirty setText getTitle setText getTitle setImage getTitleImage setData
Returns the string which will be shown in the table header protected String get Table Header return Workbench Messages get String Cycle Editor Action header NON NLS 1  getTableHeader WorkbenchMessages getString CycleEditorAction

Creates a Cycle Part Action param window The workbench window on which the dialog should be created param next Whether the action is to move to the next part as opposed to the previous public Cycle Part Action I Workbench Window window boolean next super window NON NLS 1 forward next set Text update State  CyclePartAction CyclePartAction IWorkbenchWindow setText updateState
Activate the selected item public void activate I Workbench Page page Object selected Item if selected Item null if selected Item instanceof I Editor Reference page set Editor Area Visible true I Workbench Part part I Workbench Part Reference selected Item get Part true if part null page activate part  IWorkbenchPage selectedItem selectedItem selectedItem IEditorReference setEditorAreaVisible IWorkbenchPart IWorkbenchPartReference selectedItem getPart
Add all views to the dialog in the activation order protected void add Items Table table Workbench Page page I Workbench Part Reference refs page get Sorted Parts boolean include Editor true for int i refs length 1 i 0 i if refs i instanceof I Editor Reference if include Editor I Editor Reference active Editor I Editor Reference refs i Table Item item new Table Item table SWT NONE item set Text Workbench Messages get String Cycle Part Action editor NON NLS 1 item set Image active Editor get Title Image item set Data active Editor include Editor false else Table Item item new Table Item table SWT NONE item set Text refs i get Title item set Image refs i get Title Image item set Data refs i  addItems WorkbenchPage IWorkbenchPartReference getSortedParts includeEditor IEditorReference includeEditor IEditorReference activeEditor IEditorReference TableItem TableItem setText WorkbenchMessages getString CyclePartAction setImage activeEditor getTitleImage setData activeEditor includeEditor TableItem TableItem setText getTitle setImage getTitleImage setData
private void add Key Listener final Table table final Shell dialog table add Key Listener new Key Listener private boolean first Key true private boolean quick Release Mode false public void key Pressed Key Event e int key Code e key Code char character e character int accelerator SWT Key Support convert Event To Unmodified Accelerator e Key Stroke key Stroke SWT Key Support convert Accelerator To Key Stroke accelerator System out println nPRESSED print Key Event e System out println accelerat t accelerator t Key Support format Stroke Stroke create accelerator true boolean accelerator Forward false boolean accelerator Backward false if command Forward null if forward Key Sequence Bindings null Iterator iterator forward Key Sequence Bindings iterator while iterator has Next I Key Sequence Binding key Sequence Binding I Key Sequence Binding iterator next Compare the last key stroke of the binding List key Strokes key Sequence Binding get Key Sequence get Key Strokes if key Strokes is Empty key Strokes get key Strokes size 1 equals key Stroke accelerator Forward true break if command Backward null if backward Key Sequence Bindings null Iterator iterator backward Key Sequence Bindings iterator while iterator has Next I Key Sequence Binding key Sequence Binding I Key Sequence Binding iterator next Compare the last key stroke of the binding List key Strokes key Sequence Binding get Key Sequence get Key Strokes if key Strokes is Empty key Strokes get key Strokes size 1 equals key Stroke accelerator Backward true break if character SWT CR character SWT LF ok dialog table else if accelerator Forward if first Key e state Mask 0 quick Release Mode true int index table get Selection Index table set Selection index 1 table get Item Count else if accelerator Backward if first Key e state Mask 0 quick Release Mode true int index table get Selection Index table set Selection index 1 index 1 table get Item Count 1 else if key Code SWT ALT key Code SWT COMMAND key Code SWT CTRL key Code SWT SHIFT key Code SWT ARROW DOWN key Code SWT ARROW UP key Code SWT ARROW LEFT key Code SWT ARROW RIGHT cancel dialog first Key false public void key Released Key Event e int key Code e key Code int state Mask e state Mask char character e character int accelerator state Mask key Code 0 key Code convert Character character System out println nRELEASED print Key Event e System out println accelerat t accelerator t Key Support format Stroke Stroke create accelerator true final I Preference Store store Workbench Plugin get Default get Preference Store final boolean sticky Cycle store get Boolean I Preference Constants STICKY CYCLE if sticky Cycle first Key quick Release Mode key Code state Mask ok dialog table  addKeyListener addKeyListener KeyListener firstKey quickReleaseMode keyPressed KeyEvent keyCode keyCode SWTKeySupport convertEventToUnmodifiedAccelerator KeyStroke keyStroke SWTKeySupport convertAcceleratorToKeyStroke printKeyEvent KeySupport formatStroke acceleratorForward acceleratorBackward commandForward forwardKeySequenceBindings forwardKeySequenceBindings hasNext IKeySequenceBinding keySequenceBinding IKeySequenceBinding keyStrokes keySequenceBinding getKeySequence getKeyStrokes keyStrokes isEmpty keyStrokes keyStrokes keyStroke acceleratorForward commandBackward backwardKeySequenceBindings backwardKeySequenceBindings hasNext IKeySequenceBinding keySequenceBinding IKeySequenceBinding keyStrokes keySequenceBinding getKeySequence getKeyStrokes keyStrokes isEmpty keyStrokes keyStrokes keyStroke acceleratorBackward acceleratorForward firstKey stateMask quickReleaseMode getSelectionIndex setSelection getItemCount acceleratorBackward firstKey stateMask quickReleaseMode getSelectionIndex setSelection getItemCount keyCode keyCode keyCode keyCode keyCode ARROW_DOWN keyCode ARROW_UP keyCode ARROW_LEFT keyCode ARROW_RIGHT firstKey keyReleased KeyEvent keyCode keyCode stateMask stateMask stateMask keyCode keyCode convertCharacter printKeyEvent KeySupport formatStroke IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore stickyCycle getBoolean IPreferenceConstants STICKY_CYCLE stickyCycle firstKey quickReleaseMode keyCode stateMask
private void add Mouse Listener final Table table final Shell dialog table add Mouse Listener new Mouse Listener public void mouse Double Click Mouse Event e ok dialog table public void mouse Down Mouse Event e ok dialog table public void mouse Up Mouse Event e ok dialog table  addMouseListener addMouseListener MouseListener mouseDoubleClick MouseEvent mouseDown MouseEvent mouseUp MouseEvent
Adds a listener to the given table that blocks all traversal operations param table The table to which the traversal suppression should be added must not be code null code private final void add Traverse Listener final Table table table add Traverse Listener new Traverse Listener Blocks all key traversal events param event The trigger event must not be code null code public final void key Traversed final Traverse Event event event doit false  addTraverseListener addTraverseListener TraverseListener keyTraversed TraverseEvent
Close the dialog and set selection to null private void cancel Shell dialog selection null dialog close 
see org eclipse ui internal I Cycle Action public String get Backward Action Definition Id return command Backward  ICycleAction getBackwardActionDefinitionId commandBackward
see org eclipse ui internal I Cycle Action public String get Forward Action Definition Id return command Forward  ICycleAction getForwardActionDefinitionId commandForward
Returns the string which will be shown in the table header protected String get Table Header return Workbench Messages get String Cycle Part Action header NON NLS 1  getTableHeader WorkbenchMessages getString CyclePartAction
private void ok Shell dialog final Table table Table Item items table get Selection if items null items length 1 selection items 0 get Data dialog close  TableItem getSelection getData
table set Focus table add Focus Listener new Focus Listener public void focus Gained Focus Event e Do nothing  setFocus addFocusListener FocusListener focusGained FocusEvent
public void focus Lost Focus Event e cancel dialog  focusLost FocusEvent
table remove Help Listener get Help Listener table add Help Listener new Help Listener public void help Requested Help Event event Do nothing  removeHelpListener getHelpListener addHelpListener HelpListener helpRequested HelpEvent
private void open Dialog Workbench Page page final int MAX ITEMS 22 selection null final Shell dialog new Shell get Workbench Window get Shell SWT MODELESS Display display dialog get Display dialog set Layout new Fill Layout final Table table new Table dialog SWT SINGLE SWT FULL SELECTION table set Header Visible true table set Lines Visible true Table Column tc new Table Column table SWT NONE tc set Resizable false tc set Text get Table Header add Items table page int table Item Count table get Item Count switch table Item Count case 0 do nothing break case 1 table set Selection 0 break default table set Selection forward 1 table get Item Count 1 tc pack table pack dialog pack Rectangle table Bounds table get Bounds table Bounds height Math min table Bounds height table get Item Height MAX ITEMS table set Bounds table Bounds dialog set Bounds dialog compute Trim table Bounds x table Bounds y table Bounds width table Bounds height tc set Width table get Client Area width table set Focus table add Focus Listener new Focus Listener public void focus Gained Focus Event e Do nothing public void focus Lost Focus Event e cancel dialog Rectangle dialog Bounds dialog get Bounds Rectangle display Bounds display get Client Area Rectangle parent Bounds dialog get Parent get Bounds Place it in the center of its parent dialog Bounds x parent Bounds x parent Bounds width dialog Bounds width 2 dialog Bounds y parent Bounds y parent Bounds height dialog Bounds height 2 if display Bounds contains dialog Bounds x dialog Bounds y display Bounds contains dialog Bounds x dialog Bounds width dialog Bounds y dialog Bounds height Place it in the center of the display if it is not visible when placed in the center of its parent dialog Bounds x display Bounds width dialog Bounds width 2 dialog Bounds y display Bounds height dialog Bounds height 2 dialog set Location dialog Bounds x dialog Bounds y table remove Help Listener get Help Listener table add Help Listener new Help Listener public void help Requested Help Event event Do nothing Fetch the key bindings for the forward and backward commands They will not change while the dialog is open but the context will Bug 55581 final I Command Manager command Manager PlatformUI get Workbench get Command Support get Command Manager final I Command forward Command command Manager get Command command Forward if forward Command is Defined forward Key Sequence Bindings forward Command get Key Sequence Bindings final I Command backward Command command Manager get Command command Backward if backward Command is Defined backward Key Sequence Bindings backward Command get Key Sequence Bindings final I Workbench Context Support context Support page get Workbench Window get Workbench get Context Support try dialog open add Mouse Listener table dialog context Support register Shell dialog I Workbench Context Support TYPE NONE add Key Listener table dialog add Traverse Listener table while dialog is Disposed if display read And Dispatch display sleep finally if dialog is Disposed cancel dialog context Support unregister Shell dialog forward Key Sequence Bindings null backward Key Sequence Bindings null  openDialog WorkbenchPage MAX_ITEMS getWorkbenchWindow getShell getDisplay setLayout FillLayout FULL_SELECTION setHeaderVisible setLinesVisible TableColumn TableColumn setResizable setText getTableHeader addItems tableItemCount getItemCount tableItemCount setSelection setSelection getItemCount tableBounds getBounds tableBounds tableBounds getItemHeight MAX_ITEMS setBounds tableBounds setBounds computeTrim tableBounds tableBounds tableBounds tableBounds setWidth getClientArea setFocus addFocusListener FocusListener focusGained FocusEvent focusLost FocusEvent dialogBounds getBounds displayBounds getClientArea parentBounds getParent getBounds dialogBounds parentBounds parentBounds dialogBounds dialogBounds parentBounds parentBounds dialogBounds displayBounds dialogBounds dialogBounds displayBounds dialogBounds dialogBounds dialogBounds dialogBounds dialogBounds displayBounds dialogBounds dialogBounds displayBounds dialogBounds setLocation dialogBounds dialogBounds removeHelpListener getHelpListener addHelpListener HelpListener helpRequested HelpEvent ICommandManager commandManager getWorkbench getCommandSupport getCommandManager ICommand forwardCommand commandManager getCommand commandForward forwardCommand isDefined forwardKeySequenceBindings forwardCommand getKeySequenceBindings ICommand backwardCommand commandManager getCommand commandBackward backwardCommand isDefined backwardKeySequenceBindings backwardCommand getKeySequenceBindings IWorkbenchContextSupport contextSupport getWorkbenchWindow getWorkbench getContextSupport addMouseListener contextSupport registerShell IWorkbenchContextSupport TYPE_NONE addKeyListener addTraverseListener isDisposed readAndDispatch isDisposed contextSupport unregisterShell forwardKeySequenceBindings backwardKeySequenceBindings
See I Page Listener public void page Activated I Workbench Page page super page Activated page update State  IPageListener pageActivated IWorkbenchPage pageActivated updateState
See I Page Listener public void page Closed I Workbench Page page super page Closed page update State  IPageListener pageClosed IWorkbenchPage pageClosed updateState
See I Part Listener public void part Closed I Workbench Part part super part Closed part update State  IPartListener partClosed IWorkbenchPart partClosed updateState
See I Part Listener public void part Opened I Workbench Part part super part Opened part update State  IPartListener partOpened IWorkbenchPart partOpened updateState
see Action run public void run With Event Event e if get Workbench Window null action has been disposed return I Workbench Page page get Active Page open Dialog Workbench Page page activate page selection  runWithEvent getWorkbenchWindow IWorkbenchPage getActivePage openDialog WorkbenchPage
see org eclipse ui internal I Cycle Action public void set Backward Action Definition Id String action Definition Id command Backward action Definition Id  ICycleAction setBackwardActionDefinitionId actionDefinitionId commandBackward actionDefinitionId
see org eclipse ui internal I Cycle Action public void set Forward Action Definition Id String action Definition Id command Forward action Definition Id  ICycleAction setForwardActionDefinitionId actionDefinitionId commandForward actionDefinitionId
Set text and tooltips in the action protected void set Text TBD Remove text and tooltip when this becomes an invisible action if forward set Text Workbench Messages get String Cycle Part Action next text NON NLS 1 set Tool Tip Text Workbench Messages get String Cycle Part Action next tool Tip NON NLS 1 issue missing action ids Workbench Help set Help this I Help Context Ids CYCLE PART FORWARD ACTION set Action Definition Id org eclipse ui window next View NON NLS 1 else set Text Workbench Messages get String Cycle Part Action prev text NON NLS 1 set Tool Tip Text Workbench Messages get String Cycle Part Action prev tool Tip NON NLS 1 issue missing action ids Workbench Help set Help this I Help Context Ids CYCLE PART BACKWARD ACTION set Action Definition Id org eclipse ui window previous View NON NLS 1  setText setText WorkbenchMessages getString CyclePartAction setToolTipText WorkbenchMessages getString CyclePartAction toolTip WorkbenchHelp setHelp IHelpContextIds CYCLE_PART_FORWARD_ACTION setActionDefinitionId nextView setText WorkbenchMessages getString CyclePartAction setToolTipText WorkbenchMessages getString CyclePartAction toolTip WorkbenchHelp setHelp IHelpContextIds CYCLE_PART_BACKWARD_ACTION setActionDefinitionId previousView
Updates the enabled state protected void update State I Workbench Page page get Active Page if page null set Enabled false return enable iff there is at least one other part to switch to the editor area counts as one entry int count page get View References length if page get Editor References length 0 count set Enabled count 1  updateState IWorkbenchPage getActivePage setEnabled getViewReferences getEditorReferences setEnabled

Creates a Cycle Perspective Action public Cycle Perspective Action I Workbench Window window boolean forward super window forward NON NLS 1 window add Perspective Listener this update State  CyclePerspectiveAction CyclePerspectiveAction IWorkbenchWindow addPerspectiveListener updateState
protected void set Text TBD Remove text and tooltip when this becomes an invisible action if forward set Text Workbench Messages get String Cycle Perspective Action next text NON NLS 1 set Tool Tip Text Workbench Messages get String Cycle Perspective Action next tool Tip NON NLS 1 issue missing action ids Workbench Help set Help this I Help Context Ids CYCLE PERSPECTIVE FORWARD ACTION set Action Definition Id org eclipse ui window next Perspective NON NLS 1 else set Text Workbench Messages get String Cycle Perspective Action prev text NON NLS 1 set Tool Tip Text Workbench Messages get String Cycle Perspective Action prev tool Tip NON NLS 1 issue missing action ids Workbench Help set Help this I Help Context Ids CYCLE PERSPECTIVE BACKWARD ACTION set Action Definition Id org eclipse ui window previous Perspective NON NLS 1  setText setText WorkbenchMessages getString CyclePerspectiveAction setToolTipText WorkbenchMessages getString CyclePerspectiveAction toolTip WorkbenchHelp setHelp IHelpContextIds CYCLE_PERSPECTIVE_FORWARD_ACTION setActionDefinitionId nextPerspective setText WorkbenchMessages getString CyclePerspectiveAction setToolTipText WorkbenchMessages getString CyclePerspectiveAction toolTip WorkbenchHelp setHelp IHelpContextIds CYCLE_PERSPECTIVE_BACKWARD_ACTION setActionDefinitionId previousPerspective
public void dispose if get Workbench Window null already disposed return get Workbench Window remove Perspective Listener this label Provider dispose super dispose  getWorkbenchWindow getWorkbenchWindow removePerspectiveListener labelProvider
Activate the selected item public void activate I Workbench Page page Object selection if selection null I Perspective Descriptor persp I Perspective Descriptor selection page set Perspective persp  IWorkbenchPage IPerspectiveDescriptor IPerspectiveDescriptor setPerspective
Updates the enabled state public void update State Workbench Page page Workbench Page get Active Page if page null set Enabled false return enable iff there is at least one other editor to switch to set Enabled page get Sorted Perspectives length 1  updateState WorkbenchPage WorkbenchPage getActivePage setEnabled setEnabled getSortedPerspectives
Add all views to the dialog in the activation order protected void add Items Table table Workbench Page page I Perspective Descriptor perspectives page get Sorted Perspectives for int i perspectives length 1 i 0 i Table Item item new Table Item table SWT NONE I Perspective Descriptor desc perspectives i item set Text label Provider get Text desc item set Image label Provider get Image desc item set Data desc  addItems WorkbenchPage IPerspectiveDescriptor getSortedPerspectives TableItem TableItem IPerspectiveDescriptor setText labelProvider getText setImage labelProvider getImage setData
Returns the string which will be shown in the table header protected String get Table Header return Workbench Messages get String Cycle Perspective Action header NON NLS 1  getTableHeader WorkbenchMessages getString CyclePerspectiveAction
Method declared on I Perspective Listener public void perspective Activated I Workbench Page page I Perspective Descriptor perspective update State  IPerspectiveListener perspectiveActivated IWorkbenchPage IPerspectiveDescriptor updateState
Method declared on I Perspective Listener public void perspective Changed I Workbench Page page I Perspective Descriptor perspective String change Id do nothing  IPerspectiveListener perspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId

private I Configuration Element config Element private Image Descriptor descriptor Declarative Decorator I Configuration Element defining Element String icon Path this icon Location icon Path this config Element defining Element  IConfigurationElement configElement ImageDescriptor DeclarativeDecorator IConfigurationElement definingElement iconPath iconLocation iconPath configElement definingElement
see org eclipse jface viewers I Base Label Provider add Listener org eclipse jface viewers I Label Provider Listener public void add Listener I Label Provider Listener listener  IBaseLabelProvider addListener ILabelProviderListener addListener ILabelProviderListener
see org eclipse jface viewers I Base Label Provider dispose public void dispose  IBaseLabelProvider
see org eclipse jface viewers I Base Label Provider is Label Property java lang Object java lang String public boolean is Label Property Object element String property return false  IBaseLabelProvider isLabelProperty isLabelProperty
see org eclipse jface viewers I Base Label Provider remove Listener org eclipse jface viewers I Label Provider Listener public void remove Listener I Label Provider Listener listener  IBaseLabelProvider removeListener ILabelProviderListener removeListener ILabelProviderListener
see org eclipse jface viewers I Lightweight Label Decorator decorate java lang Object org eclipse jface viewers I Decoration public void decorate Object element I Decoration decoration if descriptor null URL url Bundle Utility find config Element get Declaring Extension get Namespace icon Location if url null return descriptor Image Descriptor create FromURL url decoration add Overlay descriptor  ILightweightLabelDecorator IDecoration IDecoration BundleUtility configElement getDeclaringExtension getNamespace iconLocation ImageDescriptor createFromURL addOverlay

private boolean value Set false Decoration Builder  valueSet DecorationBuilder
Set the value of the definition we are currently working on param definition void set Current Definition Lightweight Decorator Definition definition this current Definition definition  setCurrentDefinition LightweightDecoratorDefinition currentDefinition
see org eclipse jface viewers I Decoration add Overlay org eclipse jface resource Image Descriptor public void add Overlay Image Descriptor overlay int quadrant current Definition get Quadrant if descriptors quadrant null descriptors quadrant overlay value Set true  IDecoration addOverlay ImageDescriptor addOverlay ImageDescriptor currentDefinition getQuadrant valueSet
see org eclipse jface viewers I Decoration add Overlay org eclipse jface resource Image Descriptor public void add Overlay Image Descriptor overlay int quadrant if quadrant 0 quadrant DECORATOR ARRAY SIZE if descriptors quadrant null descriptors quadrant overlay value Set true else Workbench Plugin log Unable to apply decoration for current Definition get Id invalid quadrant quadrant NON NLS 1 NON NLS 2  IDecoration addOverlay ImageDescriptor addOverlay ImageDescriptor DECORATOR_ARRAY_SIZE valueSet WorkbenchPlugin currentDefinition getId
see org eclipse jface viewers I Decoration add Prefix java lang String public void add Prefix String prefix String prefixes add prefix String value Set true  IDecoration addPrefix addPrefix prefixString prefixString valueSet
see org eclipse jface viewers I Decoration add Suffix java lang String public void add Suffix String suffix String suffixes add suffix String value Set true  IDecoration addSuffix addSuffix suffixString suffixString valueSet
Clear the current values and return a Decoration Result Decoration Result create Result Decoration Result new Result new Decoration Result new Array List prefixes new Array List suffixes descriptors return new Result  DecorationResult DecorationResult createResult DecorationResult newResult DecorationResult ArrayList ArrayList newResult
Clear the contents of the result so it can be reused void clear Contents this prefixes clear this suffixes clear this descriptors new Image Descriptor DECORATOR ARRAY SIZE value Set false  clearContents ImageDescriptor DECORATOR_ARRAY_SIZE valueSet
Return whether or not a value has been set return boolean boolean has Value return value Set  hasValue valueSet
Apply the previously calculates result to the receiver param result void apply Result Decoration Result result prefixes add All result get Prefixes suffixes add All result get Suffixes Image Descriptor result Descriptors result get Descriptors if result Descriptors null for int i 0 i descriptors length i if result Descriptors i null descriptors i result Descriptors i value Set true  applyResult DecorationResult addAll getPrefixes addAll getSuffixes ImageDescriptor resultDescriptors getDescriptors resultDescriptors resultDescriptors resultDescriptors valueSet

String undecorated Text boolean force Update false Decoration Reference Object object Assert is Not Null object element object  undecoratedText forceUpdate DecorationReference isNotNull
element object Decoration Reference Object object Object adapted Object this object this adapted Element adapted Object  DecorationReference adaptedObject adaptedElement adaptedObject
Returns the adapted Element return Object Object get Adapted Element return adapted Element  adaptedElement getAdaptedElement adaptedElement
Returns the element return Object Object get Element return element  getElement
Return true if an update should occur whether or not there is a result return boolean boolean should Force Update return force Update  shouldForceUpdate forceUpdate
Sets the force Update flag If true an update occurs whether or not a decoration has resulted param force Update The force Update to set void set Force Update boolean force Update this force Update force Update  forceUpdate forceUpdate forceUpdate setForceUpdate forceUpdate forceUpdate forceUpdate
Set the text that will be used to label the decoration calculation param text void set Undecorated Text String text undecorated Text text  setUndecoratedText undecoratedText
Return the string for the subtask for this element return String get Sub Task if undecorated Text null return Workbench Messages get String Decoration Reference Empty Reference NON NLS 1 else return Workbench Messages format Decoration Scheduler Decorating Subtask NON NLS 1 new Object undecorated Text  getSubTask undecoratedText WorkbenchMessages getString DecorationReference EmptyReference WorkbenchMessages DecorationScheduler DecoratingSubtask undecoratedText

Decoration Result List prefix List List suffix List Image Descriptor image Descriptors prefixes prefix List suffixes suffix List Don t set the field if there are no entries if has Overlays image Descriptors descriptors image Descriptors  DecorationResult prefixList suffixList ImageDescriptor imageDescriptors prefixList suffixList hasOverlays imageDescriptors imageDescriptors
Return whether or not any of the image Descriptors are non null param image Descriptors return code true code if there are some non null overlays private boolean has Overlays Image Descriptor image Descriptors for int i 0 i image Descriptors length i if image Descriptors i null return true return false  imageDescriptors imageDescriptors hasOverlays ImageDescriptor imageDescriptors imageDescriptors imageDescriptors
Decorate the Image supplied with the overlays Image decorate With Overlays Image image Overlay Cache overlay Cache Do not try to do anything if there is no source or overlays if image null descriptors null return image return overlay Cache apply Descriptors image descriptors  decorateWithOverlays OverlayCache overlayCache overlayCache applyDescriptors
Decorate the String supplied with the prefixes and suffixes String decorate With Text String text if prefixes is Empty suffixes is Empty return text String Buffer result new String Buffer List Iterator prefix Iterator prefixes list Iterator while prefix Iterator has Next result append prefix Iterator next result append text List Iterator suffix Iterator suffixes list Iterator while suffix Iterator has Next result append suffix Iterator next return result to String  decorateWithText isEmpty isEmpty StringBuffer StringBuffer ListIterator prefixIterator listIterator prefixIterator hasNext prefixIterator ListIterator suffixIterator listIterator suffixIterator hasNext suffixIterator toString
Get the descriptor array for the receiver return Image Descriptor or code null code Image Descriptor get Descriptors return descriptors  ImageDescriptor ImageDescriptor getDescriptors
Get the prefixes for the receiver return List List get Prefixes return prefixes  getPrefixes
Get the suffixes for the receiver return List List get Suffixes return suffixes  getSuffixes

Return a new instance of the receiver configured for the supplied Decorator Manager param manager Decoration Scheduler Decorator Manager manager decorator Manager manager create Decoration Job  DecoratorManager DecorationScheduler DecoratorManager decoratorManager createDecorationJob
Decorate the text for the receiver If it has already been done then return the result otherwise queue it for decoration return String param text param element param adapted Element The adapted value of element May be null public String decorate With Text String text Object element Object adapted Element We do not support decoration of null if element null return text Decoration Result decoration Decoration Result result Cache get element if decoration null queue For Decoration element adapted Element false text return text else return decoration decorate With Text text  adaptedElement decorateWithText adaptedElement DecorationResult DecorationResult resultCache queueForDecoration adaptedElement decorateWithText
Queue the element and its adapted value if it has not been already param element param adapted Element The adapted value of element May be null param force Update If true then a label Provider Changed is fired whether decoration occured or not param String undecorated Text the String that we are starting decoration with synchronized void queue For Decoration Object element Object adapted Element boolean force Update String undecorated Text if awaiting Decoration Values contains Key element if force Update Make sure we don t loose a force Decoration Reference reference Decoration Reference awaiting Decoration Values get element reference set Force Update force Update else Decoration Reference reference new Decoration Reference element adapted Element reference set Force Update force Update reference set Undecorated Text undecorated Text awaiting Decoration Values put element reference awaiting Decoration add element if shutdown return if decoration Job get State Job SLEEPING decoration Job wake Up decoration Job schedule  adaptedElement forceUpdate labelProviderChanged undecoratedText queueForDecoration adaptedElement forceUpdate undecoratedText awaitingDecorationValues containsKey forceUpdate DecorationReference DecorationReference awaitingDecorationValues setForceUpdate forceUpdate DecorationReference DecorationReference adaptedElement setForceUpdate forceUpdate setUndecoratedText undecoratedText awaitingDecorationValues awaitingDecoration decorationJob getState decorationJob wakeUp decorationJob
Decorate the supplied image element and its adapted value return Image param image param element param adapted Element The adapted value of element May be null public Image decorate With Overlays Image image Object element Object adapted Element We do not support decoration of null if element null return image Decoration Result decoration Decoration Result result Cache get element if decoration null queue For Decoration element adapted Element false null return image else return decoration decorate With Overlays image decorator Manager get Lightweight Manager get Overlay Cache  adaptedElement decorateWithOverlays adaptedElement DecorationResult DecorationResult resultCache queueForDecoration adaptedElement decorateWithOverlays decoratorManager getLightweightManager getOverlayCache
Execute a label update using the pending decorations param resources param decoration Results synchronized void decorated Don t bother if we are shutdown now if shutdown return Lazy initialize the job if update Job null update Job get Update Job update Job set Priority Job DECORATE Give it a big of a lag for other updates to occur update Job schedule 100  decorationResults updateJob updateJob getUpdateJob updateJob setPriority updateJob
Shutdown the decoration void shutdown shutdown true 
Get the next resource to be decorated return I Resource synchronized Decoration Reference next Element if shutdown awaiting Decoration is Empty return null Object element awaiting Decoration remove 0 return Decoration Reference awaiting Decoration Values remove element  IResource DecorationReference nextElement awaitingDecoration isEmpty awaitingDecoration DecorationReference awaitingDecorationValues
public I Status run I Progress Monitor monitor monitor begin Task Workbench Messages get String Decoration Scheduler Calculating Task 100 NON NLS 1 will block if there are no resources to be decorated Decoration Reference reference monitor worked 5 int work Count 5 while reference next Element null Count up to 90 to give the appearance of updating if work Count 90 monitor worked 1 work Count Decoration Builder cache Result new Decoration Builder monitor sub Task reference get Sub Task NON NLS 1 Don t decorate if there is already a pending result Object element reference get Element Object adapted reference get Adapted Element boolean element Is Cached true Decoration Result adapted Result null Synchronize on the result lock as we want to be sure that we do not try and decorate during label update servicing synchronized result Lock element Is Cached result Cache contains Key element if element Is Cached pending Update add element if adapted null adapted Result Decoration Result result Cache get adapted if element Is Cached Just build for the resource first if adapted null if adapted Result null decorator Manager get Lightweight Manager get Decorations adapted cache Result true if cache Result has Value adapted Result cache Result create Result else If we already calculated the decoration for the adapted element reuse the result cache Result apply Result adapted Result Set adapted Result to null to indicate that we do not need to cache the result again adapted Result null Now add in the results for the main object decorator Manager get Lightweight Manager get Decorations element cache Result false If we should update regardless then put a result anyways if cache Result has Value reference should Force Update Synchronize on the result lock as we want to be sure that we do not try and decorate during label update servicing Note result Cache and pending Update modifications must be done atomically synchronized result Lock if adapted Result null result Cache put adapted adapted Result Add the decoration even if it s empty in order to indicate that the decoration is ready result Cache put element cache Result create Result Add an update for only the original element to prevent multiple updates and clear the cache pending Update add element Only notify listeners when we have exhausted the queue of decoration requests if awaiting Decoration is Empty decorated monitor worked 100 work Count monitor done return Status OK STATUS  IStatus IProgressMonitor beginTask WorkbenchMessages getString DecorationScheduler CalculatingTask DecorationReference workCount nextElement workCount workCount DecorationBuilder cacheResult DecorationBuilder subTask getSubTask getElement getAdaptedElement elementIsCached DecorationResult adaptedResult resultLock elementIsCached resultCache containsKey elementIsCached pendingUpdate adaptedResult DecorationResult resultCache elementIsCached adaptedResult decoratorManager getLightweightManager getDecorations cacheResult cacheResult hasValue adaptedResult cacheResult createResult cacheResult applyResult adaptedResult adaptedResult adaptedResult decoratorManager getLightweightManager getDecorations cacheResult cacheResult hasValue shouldForceUpdate resultCache pendingUpdate resultLock adaptedResult resultCache adaptedResult resultCache cacheResult createResult pendingUpdate awaitingDecoration isEmpty workCount OK_STATUS
see org eclipse core runtime jobs Job belongs To java lang Object public boolean belongs To Object family return Decorator Manager FAMILY DECORATE family  belongsTo belongsTo DecoratorManager FAMILY_DECORATE
Create the Thread used for running decoration private void create Decoration Job decoration Job new Job Workbench Messages get String Decoration Scheduler Calculation Job Name NON NLS 1 non Javadoc see org eclipse core runtime jobs Job run org eclipse core runtime I Progress Monitor public I Status run I Progress Monitor monitor monitor begin Task Workbench Messages get String Decoration Scheduler Calculating Task 100 NON NLS 1 will block if there are no resources to be decorated Decoration Reference reference monitor worked 5 int work Count 5 while reference next Element null Count up to 90 to give the appearance of updating if work Count 90 monitor worked 1 work Count Decoration Builder cache Result new Decoration Builder monitor sub Task reference get Sub Task NON NLS 1 Don t decorate if there is already a pending result Object element reference get Element Object adapted reference get Adapted Element boolean element Is Cached true Decoration Result adapted Result null Synchronize on the result lock as we want to be sure that we do not try and decorate during label update servicing synchronized result Lock element Is Cached result Cache contains Key element if element Is Cached pending Update add element if adapted null adapted Result Decoration Result result Cache get adapted if element Is Cached Just build for the resource first if adapted null if adapted Result null decorator Manager get Lightweight Manager get Decorations adapted cache Result true if cache Result has Value adapted Result cache Result create Result else If we already calculated the decoration for the adapted element reuse the result cache Result apply Result adapted Result Set adapted Result to null to indicate that we do not need to cache the result again adapted Result null Now add in the results for the main object decorator Manager get Lightweight Manager get Decorations element cache Result false If we should update regardless then put a result anyways if cache Result has Value reference should Force Update Synchronize on the result lock as we want to be sure that we do not try and decorate during label update servicing Note result Cache and pending Update modifications must be done atomically synchronized result Lock if adapted Result null result Cache put adapted adapted Result Add the decoration even if it s empty in order to indicate that the decoration is ready result Cache put element cache Result create Result Add an update for only the original element to prevent multiple updates and clear the cache pending Update add element Only notify listeners when we have exhausted the queue of decoration requests if awaiting Decoration is Empty decorated monitor worked 100 work Count monitor done return Status OK STATUS non Javadoc see org eclipse core runtime jobs Job belongs To java lang Object public boolean belongs To Object family return Decorator Manager FAMILY DECORATE family decoration Job set System true decoration Job set Priority Job DECORATE decoration Job schedule  createDecorationJob decorationJob WorkbenchMessages getString DecorationScheduler CalculationJobName IProgressMonitor IStatus IProgressMonitor beginTask WorkbenchMessages getString DecorationScheduler CalculatingTask DecorationReference workCount nextElement workCount workCount DecorationBuilder cacheResult DecorationBuilder subTask getSubTask getElement getAdaptedElement elementIsCached DecorationResult adaptedResult resultLock elementIsCached resultCache containsKey elementIsCached pendingUpdate adaptedResult DecorationResult resultCache elementIsCached adaptedResult decoratorManager getLightweightManager getDecorations cacheResult cacheResult hasValue adaptedResult cacheResult createResult cacheResult applyResult adaptedResult adaptedResult adaptedResult decoratorManager getLightweightManager getDecorations cacheResult cacheResult hasValue shouldForceUpdate resultCache pendingUpdate resultLock adaptedResult resultCache adaptedResult resultCache cacheResult createResult pendingUpdate awaitingDecoration isEmpty workCount OK_STATUS belongsTo belongsTo DecoratorManager FAMILY_DECORATE decorationJob setSystem decorationJob setPriority decorationJob
An external update request has been made Clear the results as they are likely obsolete now void clear Results synchronized result Lock result Cache clear  clearResults resultLock resultCache
Workbench Job job new Workbench Job Workbench Messages get String Decoration Scheduler Update Job Name NON NLS 1 public I Status run InUI Thread I Progress Monitor monitor Check again in case someone has already cleared it out synchronized result Lock if pending Update is Empty return Status OK STATUS Get the elements awaiting update and then clear the list Object elements pending Update to Array new Object pending Update size monitor begin Task Workbench Messages get String Decoration Scheduler Updating Task elements length 20 NON NLS 1 pending Update clear monitor worked 15 decorator Manager fire Listeners new Label Provider Changed Event decorator Manager elements monitor worked elements length Other decoration requests may have occured due to updates Only clear the results if there are none pending if awaiting Decoration is Empty result Cache clear monitor worked 5 monitor done return Status OK STATUS  WorkbenchJob WorkbenchJob WorkbenchMessages getString DecorationScheduler UpdateJobName IStatus runInUIThread IProgressMonitor resultLock pendingUpdate isEmpty OK_STATUS pendingUpdate toArray pendingUpdate beginTask WorkbenchMessages getString DecorationScheduler UpdatingTask pendingUpdate decoratorManager fireListeners LabelProviderChangedEvent decoratorManager awaitingDecoration isEmpty resultCache OK_STATUS
see org eclipse ui progress Workbench Job perform Done org eclipse core runtime jobs I Job Change Event public void perform Done I Job Change Event event if pending Update is Empty decorated  WorkbenchJob performDone IJobChangeEvent performDone IJobChangeEvent pendingUpdate isEmpty
Get the update Workbench Job return Workbench Job private Workbench Job get Update Job Workbench Job job new Workbench Job Workbench Messages get String Decoration Scheduler Update Job Name NON NLS 1 public I Status run InUI Thread I Progress Monitor monitor Check again in case someone has already cleared it out synchronized result Lock if pending Update is Empty return Status OK STATUS Get the elements awaiting update and then clear the list Object elements pending Update to Array new Object pending Update size monitor begin Task Workbench Messages get String Decoration Scheduler Updating Task elements length 20 NON NLS 1 pending Update clear monitor worked 15 decorator Manager fire Listeners new Label Provider Changed Event decorator Manager elements monitor worked elements length Other decoration requests may have occured due to updates Only clear the results if there are none pending if awaiting Decoration is Empty result Cache clear monitor worked 5 monitor done return Status OK STATUS non Javadoc see org eclipse ui progress Workbench Job perform Done org eclipse core runtime jobs I Job Change Event public void perform Done I Job Change Event event if pending Update is Empty decorated job set System true return job  WorkbenchJob WorkbenchJob WorkbenchJob getUpdateJob WorkbenchJob WorkbenchJob WorkbenchMessages getString DecorationScheduler UpdateJobName IStatus runInUIThread IProgressMonitor resultLock pendingUpdate isEmpty OK_STATUS pendingUpdate toArray pendingUpdate beginTask WorkbenchMessages getString DecorationScheduler UpdatingTask pendingUpdate decoratorManager fireListeners LabelProviderChangedEvent decoratorManager awaitingDecoration isEmpty resultCache OK_STATUS WorkbenchJob performDone IJobChangeEvent performDone IJobChangeEvent pendingUpdate isEmpty setSystem
Return whether or not there is a decoration fro this element ready param element return boolean true if the element is ready public boolean is Decoration Ready Object element return result Cache get element null  isDecorationReady resultCache

Create a new instance of the receiver with the supplied values Decorator Definition String identifier String label String decorator Description Action Expression expression boolean is Adaptable boolean init Enabled I Configuration Element element this id identifier this name label this enablement expression this adaptable is Adaptable this description decorator Description this enabled init Enabled this default Enabled init Enabled this defining Element element  DecoratorDefinition decoratorDescription ActionExpression isAdaptable initEnabled IConfigurationElement isAdaptable decoratorDescription initEnabled defaultEnabled initEnabled definingElement
Gets the name return Returns a String public String get Name return name  getName
Returns the description return String public String get Description return this description  getDescription
Gets the enabled return Returns a boolean public boolean is Enabled return enabled  isEnabled
Sets the enabled flag and adds or removes the decorator manager as a listener as appropriate param enabled The enabled to set public void set Enabled boolean new State Only refresh if there has been a change if this enabled new State this enabled new State try refresh Decorator catch Core Exception exception handle Core Exception exception  setEnabled newState newState newState refreshDecorator CoreException handleCoreException
Refresh the current decorator based on our enable state 
Dispose the decorator instance and remove listeners as appropirate param decorator protected void dispose Cached Decorator I Base Label Provider disposed Decorator disposed Decorator remove Listener Workbench Plugin get Default get Decorator Manager disposed Decorator dispose  disposeCachedDecorator IBaseLabelProvider disposedDecorator disposedDecorator removeListener WorkbenchPlugin getDefault getDecoratorManager disposedDecorator
Return whether or not this decorator should be applied to adapted types public boolean is Adaptable return adaptable  isAdaptable
Gets the id return Returns a String public String get Id return id  getId
Return the default value for this type this value is the value read from the element description public boolean get Default Value return default Enabled  getDefaultValue defaultEnabled
Returns the enablement return Action Expression public Action Expression get Enablement return enablement  ActionExpression ActionExpression getEnablement
Add a listener for the decorator If there is an exception then inform the user and disable the receiver This method should not be called unless a check for is Enabled has been done first void add Listener I Label Provider Listener listener try Internal decorator might be null so be prepared I Base Label Provider current Decorator internal Get Label Provider if current Decorator null current Decorator add Listener listener catch Core Exception exception handle Core Exception exception  isEnabled addListener ILabelProviderListener IBaseLabelProvider currentDecorator internalGetLabelProvider currentDecorator currentDecorator addListener CoreException handleCoreException
Return whether or not the decorator registered for element has a label property called property name If there is an exception disable the receiver and return false This method should not be called unless a check for is Enabled has been done first boolean is Label Property Object element String property try Internal decorator might be null so be prepared I Base Label Provider current Decorator internal Get Label Provider if current Decorator null return current Decorator is Label Property element property catch Core Exception exception handle Core Exception exception return false return false  isEnabled isLabelProperty IBaseLabelProvider currentDecorator internalGetLabelProvider currentDecorator currentDecorator isLabelProperty CoreException handleCoreException
Gets the label provider and creates it if it does not exist yet Throws a Core Exception if there is a problem creating the label Provider This method should not be called unless a check for enabled to be true is done first return Returns a I Label Decorator protected abstract I Base Label Provider internal Get Label Provider  CoreException labelProvider ILabelDecorator IBaseLabelProvider internalGetLabelProvider
A Core Exception has occured Inform the user and disable the receiver protected void handle Core Exception Core Exception exception If there is an error then reset the enabling to false Workbench Plugin get Default get Log log exception get Status crash Disable  CoreException handleCoreException CoreException WorkbenchPlugin getDefault getLog getStatus crashDisable
A crash has occured Disable the receiver without notification public void crash Disable this enabled false  crashDisable
Return whether or not this is a full or lightweight definition public abstract boolean is Full  isFull

Create a new instance of the receiver and load the settings from the installed plug ins public Decorator Manager Decorator Registry Reader reader new Decorator Registry Reader Collection values reader read Registry Platform get Extension Registry Array List full new Array List Array List lightweight new Array List Iterator all Definitions values iterator while all Definitions has Next Decorator Definition next Definition Decorator Definition all Definitions next if next Definition is Full full add next Definition else lightweight add next Definition full Definitions new Full Decorator Definition full size full to Array full Definitions Lightweight Decorator Definition lightweight Definitions new Lightweight Decorator Definition lightweight size lightweight to Array lightweight Definitions lightweight Manager new Lightweight Decorator Manager lightweight Definitions scheduler new Decoration Scheduler this  DecoratorManager DecoratorRegistryReader DecoratorRegistryReader readRegistry getExtensionRegistry ArrayList ArrayList ArrayList ArrayList allDefinitions allDefinitions hasNext DecoratorDefinition nextDefinition DecoratorDefinition allDefinitions nextDefinition isFull nextDefinition nextDefinition fullDefinitions FullDecoratorDefinition toArray fullDefinitions LightweightDecoratorDefinition lightweightDefinitions LightweightDecoratorDefinition toArray lightweightDefinitions lightweightManager LightweightDecoratorManager lightweightDefinitions DecorationScheduler
For dynamic UI param definition the definition to add since 3 0 public void add Decorator Decorator Definition definition if definition is Full if get Full Decorator Definition definition get Id null Full Decorator Definition old Defs full Definitions full Definitions new Full Decorator Definition full Definitions length 1 System arraycopy old Defs 0 full Definitions 0 old Defs length full Definitions old Defs length Full Decorator Definition definition clear Caches update For Enablement Change else if get Lightweight Manager add Decorator Lightweight Decorator Definition definition clear Caches update For Enablement Change  addDecorator DecoratorDefinition isFull getFullDecoratorDefinition getId FullDecoratorDefinition oldDefs fullDefinitions fullDefinitions FullDecoratorDefinition fullDefinitions oldDefs fullDefinitions oldDefs fullDefinitions oldDefs FullDecoratorDefinition clearCaches updateForEnablementChange getLightweightManager addDecorator LightweightDecoratorDefinition clearCaches updateForEnablementChange
See if the supplied decorator cache has a value for the element If not calculate it from the enabled Definitions and update the cache return Collection of Decorator Definition param element The element being tested param cached Decorators The cache for decorator lookup param enabled Definitions The definitions currently defined for this decorator static Collection get Decorators For Object element Decorator Definition enabled Definitions Array List decorators new Array List for int i 0 i enabled Definitions length i if enabled Definitions i get Enablement is Enabled For Expression element Action Expression EXP TYPE OBJECT CLASS decorators add enabled Definitions i return decorators  enabledDefinitions DecoratorDefinition cachedDecorators enabledDefinitions getDecoratorsFor DecoratorDefinition enabledDefinitions ArrayList ArrayList enabledDefinitions enabledDefinitions getEnablement isEnabledForExpression ActionExpression EXP_TYPE_OBJECT_CLASS enabledDefinitions
Restore the stored values from the preference store and register the receiver as a listener for all of the enabled decorators public void restore Listeners apply Decorators Preference  restoreListeners applyDecoratorsPreference
Add the listener to the list of listeners public void add Listener I Label Provider Listener listener listeners add listener  addListener ILabelProviderListener
Remove the listener from the list public void remove Listener I Label Provider Listener listener listeners remove listener  removeListener ILabelProviderListener
final I Label Provider Listener l I Label Provider Listener array i Platform run new Safe Runnable public void run l label Provider Changed event  ILabelProviderListener ILabelProviderListener SafeRunnable labelProviderChanged
Inform all of the listeners that require an update param event the event with the update details void fire Listeners final Label Provider Changed Event event Object array listeners get Listeners for int i 0 i array length i final I Label Provider Listener l I Label Provider Listener array i Platform run new Safe Runnable public void run l label Provider Changed event  fireListeners LabelProviderChangedEvent getListeners ILabelProviderListener ILabelProviderListener SafeRunnable labelProviderChanged
see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor monitor fire Listeners event return Status OK STATUS  UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor fireListeners OK_STATUS
Fire any listeners from the UI Thread Used for cases where this may be invoked outside of the UI by the public API param event the event with the update details void fire Listeners InUI Thread final Label Provider Changed Event event No updates if there is no UI if PlatformUI is Workbench Running return Only bother with the job if in the UI Thread if Thread current Thread PlatformUI get Workbench get Display get Thread fire Listeners event return Workbench Job update Job new Workbench Job Workbench Messages get String Decoration Scheduler Update Job Name NON NLS 1 non Javadoc see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor monitor fire Listeners event return Status OK STATUS update Job set System true update Job schedule  UIThread fireListenersInUIThread LabelProviderChangedEvent isWorkbenchRunning currentThread getWorkbench getDisplay getThread fireListeners WorkbenchJob updateJob WorkbenchJob WorkbenchMessages getString DecorationScheduler UpdateJobName UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor fireListeners OK_STATUS updateJob setSystem updateJob
Decorate the image provided for the element type Then look for an I Resource that adapts to it an apply all of the adaptable decorators return String or null if there are none defined for this type param Image param Object public String decorate Text String text Object element Get any adaptions to I Resource Object adapted get Resource Adapter element String result scheduler decorate With Text text element adapted Full Decorator Definition decorators get Decorators For element for int i 0 i decorators length i if decorators i get Enablement is Enabled For element String new Result safe Decorate Text element result decorators i if new Result null result new Result if adapted null decorators get Decorators For adapted for int i 0 i decorators length i if decorators i is Adaptable decorators i get Enablement is Enabled For adapted String new Result safe Decorate Text adapted result decorators i if new Result null result new Result return result  IResource decorateText IResource getResourceAdapter decorateWithText FullDecoratorDefinition getDecoratorsFor getEnablement isEnabledFor newResult safeDecorateText newResult newResult getDecoratorsFor isAdaptable getEnablement isEnabledFor newResult safeDecorateText newResult newResult
Decorate the text in a Safe Runnable param element The element we are decorating param start The currently decorated String param decorator The decorator to run return private String safe Decorate Text Object element String start Full Decorator Definition decorator full Text Runnable set Values start element decorator Platform run full Text Runnable String new Result full Text Runnable get Result return new Result  SafeRunnable safeDecorateText FullDecoratorDefinition fullTextRunnable setValues fullTextRunnable newResult fullTextRunnable getResult newResult
Decorate the image provided for the element type Then look for an I Resource that adapts to it an apply all of the adaptable decorators return Image or null if there are none defined for this type param Image param Object public Image decorate Image Image image Object element Object adapted get Resource Adapter element Image result scheduler decorate With Overlays image element adapted Full Decorator Definition decorators get Decorators For element for int i 0 i decorators length i if decorators i get Enablement is Enabled For element Image new Result safe Decorate Image element result decorators i if new Result null result new Result Get any adaptions to I Resource if adapted null decorators get Decorators For adapted for int i 0 i decorators length i if decorators i is Adaptable decorators i get Enablement is Enabled For adapted Image new Result safe Decorate Image adapted result decorators i if new Result null result new Result return result  IResource decorateImage getResourceAdapter decorateWithOverlays FullDecoratorDefinition getDecoratorsFor getEnablement isEnabledFor newResult safeDecorateImage newResult newResult IResource getDecoratorsFor isAdaptable getEnablement isEnabledFor newResult safeDecorateImage newResult newResult
Decorate the image in a Safe Runnable param element The element we are decorating param start The currently decorated Image param decorator The decorator to run return Image private Image safe Decorate Image Object element Image start Full Decorator Definition decorator full Image Runnable set Values start element decorator Platform run full Image Runnable Image new Result full Image Runnable get Result return new Result  SafeRunnable safeDecorateImage FullDecoratorDefinition fullImageRunnable setValues fullImageRunnable newResult fullImageRunnable getResult newResult
Get the resource adapted object for the supplied element Return null if there isn t one private Object get Resource Adapter Object element Get any adaptions to I Resource when resources are available if element instanceof I Adaptable I Adaptable adaptable I Adaptable element Class contributor Resource Adapter Class Legacy Resource Support getI Contributor Resource Adapter Class if contributor Resource Adapter Class null return null Object resource Adapter adaptable get Adapter contributor Resource Adapter Class if resource Adapter null reflective equivalent of resource Adapter Default Contributor Resource Adapter get Default try Class c Legacy Resource Support get Default Contributor Resource Adapter Class Method m c get Declared Method get Default new Class 0 NON NLS 1 resource Adapter m invoke null new Object 0 catch Exception e shouldn t happen but play it safe return null Object adapted reflective equivalent of adapted I Contributor Resource Adapter resource Adapter get Adapted Resource adaptable try Method m contributor Resource Adapter Class get Declared Method get Adapted Resource new Class I Adaptable class NON NLS 1 adapted m invoke resource Adapter new Object adaptable catch Exception e shouldn t happen but play it safe return null if adapted element return adapted Avoid applying decorator twice return null  getResourceAdapter IResource IAdaptable IAdaptable IAdaptable contributorResourceAdapterClass LegacyResourceSupport getIContributorResourceAdapterClass contributorResourceAdapterClass resourceAdapter getAdapter contributorResourceAdapterClass resourceAdapter resourceAdapter DefaultContributorResourceAdapter getDefault LegacyResourceSupport getDefaultContributorResourceAdapterClass getDeclaredMethod getDefault resourceAdapter IContributorResourceAdapter resourceAdapter getAdaptedResource contributorResourceAdapterClass getDeclaredMethod getAdaptedResource IAdaptable resourceAdapter
Return whether or not the decorator registered for element has a label property called property name public boolean is Label Property Object element String property return is Label Property element property true  isLabelProperty isLabelProperty
Return whether or not the decorator registered for element has a label property called property name Check for an adapted resource if check Adapted is true public boolean is Label Property Object element String property boolean check Adapted boolean full Check is Label Property element property get Decorators For element if full Check return full Check boolean lightweight Check is Label Property element property lightweight Manager get Decorators For element if lightweight Check return true if check Adapted Get any adaptions to I Resource Object adapted get Resource Adapter element if adapted null adapted element return false full Check is Label Property adapted property get Decorators For adapted if full Check return full Check return is Label Property adapted property lightweight Manager get Decorators For adapted return false  checkAdapted isLabelProperty checkAdapted fullCheck isLabelProperty getDecoratorsFor fullCheck fullCheck lightweightCheck isLabelProperty lightweightManager getDecoratorsFor lightweightCheck checkAdapted IResource getResourceAdapter fullCheck isLabelProperty getDecoratorsFor fullCheck fullCheck isLabelProperty lightweightManager getDecoratorsFor
private boolean is Label Property Object element String property Decorator Definition decorators for int i 0 i decorators length i if decorators i get Enablement is Enabled For element decorators i is Label Property element property return true return false  isLabelProperty DecoratorDefinition getEnablement isEnabledFor isLabelProperty
Return the enabled full decorator definitions return Full Decorator Definition private Full Decorator Definition enabled Full Definitions Array List result new Array List for int i 0 i full Definitions length i if full Definitions i is Enabled result add full Definitions i Full Decorator Definition return Array new Full Decorator Definition result size result to Array return Array return return Array  FullDecoratorDefinition FullDecoratorDefinition enabledFullDefinitions ArrayList ArrayList fullDefinitions fullDefinitions isEnabled fullDefinitions FullDecoratorDefinition returnArray FullDecoratorDefinition toArray returnArray returnArray
see I Base Label Provider dispose public void dispose Do nothing as this is not viewer dependant  IBaseLabelProvider
Clear the caches in the manager This is required to avoid updates that may occur due to changes in enablement public void clear Caches cached Full Decorators clear lightweight Manager reset  clearCaches cachedFullDecorators lightweightManager
Enablement had changed Fire the listeners and write the preference public void update For Enablement Change Clear any results that may be around as all labels have changed scheduler clear Results fire Listeners InUI Thread new Label Provider Changed Event this write Decorators Preference  updateForEnablementChange clearResults fireListenersInUIThread LabelProviderChangedEvent writeDecoratorsPreference
Get the Decorator Definitions defined on the receiver public Decorator Definition get All Decorator Definitions Lightweight Decorator Definition lightweight Definitions lightweight Manager get Definitions Decorator Definition return Value new Decorator Definition full Definitions length lightweight Definitions length System arraycopy full Definitions 0 return Value 0 full Definitions length System arraycopy lightweight Definitions 0 return Value full Definitions length lightweight Definitions length return return Value  DecoratorDefinitions DecoratorDefinition getAllDecoratorDefinitions LightweightDecoratorDefinition lightweightDefinitions lightweightManager getDefinitions DecoratorDefinition returnValue DecoratorDefinition fullDefinitions lightweightDefinitions fullDefinitions returnValue fullDefinitions lightweightDefinitions returnValue fullDefinitions lightweightDefinitions returnValue
public void label Provider Changed Label Provider Changed Event event Object elements event get Elements scheduler clear Results If the elements are not specified send out a general update if elements null fire Listeners event else Assume that someone is going to care about the decoration result and just start it right away for int i 0 i elements length i Object adapted get Resource Adapter elements i Force an update in case full decorators are the only ones enabled scheduler queue For Decoration elements i adapted true null  labelProviderChanged LabelProviderChangedEvent getElements clearResults fireListeners getResourceAdapter queueForDecoration
Store the currently enabled decorators in preference store private void write Decorators Preference String Buffer enabled Ids new String Buffer write Decorators Preference enabled Ids full Definitions write Decorators Preference enabled Ids lightweight Manager get Definitions Workbench Plugin get Default get Preference Store set Value I Preference Constants ENABLED DECORATORS enabled Ids to String  writeDecoratorsPreference StringBuffer enabledIds StringBuffer writeDecoratorsPreference enabledIds fullDefinitions writeDecoratorsPreference enabledIds lightweightManager getDefinitions WorkbenchPlugin getDefault getPreferenceStore setValue IPreferenceConstants ENABLED_DECORATORS enabledIds toString
private void write Decorators Preference String Buffer enabled Ids Decorator Definition definitions for int i 0 i definitions length i enabled Ids append definitions i get Id enabled Ids append VALUE SEPARATOR if definitions i is Enabled enabled Ids append P TRUE else enabled Ids append P FALSE enabled Ids append PREFERENCE SEPARATOR  writeDecoratorsPreference StringBuffer enabledIds DecoratorDefinition enabledIds getId enabledIds VALUE_SEPARATOR isEnabled enabledIds P_TRUE enabledIds P_FALSE enabledIds PREFERENCE_SEPARATOR
Get the currently enabled decorators in preference store and set the state of the current definitions accordingly private void apply Decorators Preference String preference Value Workbench Plugin get Default get Preference Store get String I Preference Constants ENABLED DECORATORS String Tokenizer tokenizer new String Tokenizer preference Value PREFERENCE SEPARATOR Set enabled Ids new Hash Set Set disabled Ids new Hash Set while tokenizer has More Tokens String next Value Pair tokenizer next Token Strip out the true or false to get the id String id next Value Pair substring 0 next Value Pair index Of VALUE SEPARATOR if next Value Pair ends With P TRUE enabled Ids add id else disabled Ids add id for int i 0 i full Definitions length i String id full Definitions i get Id if enabled Ids contains id full Definitions i set Enabled true else if disabled Ids contains id full Definitions i set Enabled false Lightweight Decorator Definition lightweight Definitions lightweight Manager get Definitions for int i 0 i lightweight Definitions length i String id lightweight Definitions i get Id if enabled Ids contains id lightweight Definitions i set Enabled true else if disabled Ids contains id lightweight Definitions i set Enabled false  applyDecoratorsPreference preferenceValue WorkbenchPlugin getDefault getPreferenceStore getString IPreferenceConstants ENABLED_DECORATORS StringTokenizer StringTokenizer preferenceValue PREFERENCE_SEPARATOR enabledIds HashSet disabledIds HashSet hasMoreTokens nextValuePair nextToken nextValuePair nextValuePair indexOf VALUE_SEPARATOR nextValuePair endsWith P_TRUE enabledIds disabledIds fullDefinitions fullDefinitions getId enabledIds fullDefinitions setEnabled disabledIds fullDefinitions setEnabled LightweightDecoratorDefinition lightweightDefinitions lightweightManager getDefinitions lightweightDefinitions lightweightDefinitions getId enabledIds lightweightDefinitions setEnabled disabledIds lightweightDefinitions setEnabled
Shutdown the decorator manager by disabling all of the decorators so that dispose will be called on them public void shutdown Disable all of the enabled decorators so as to force a dispose of thier decorators for int i 0 i full Definitions length i if full Definitions i is Enabled full Definitions i set Enabled false lightweight Manager shutdown scheduler shutdown  fullDefinitions fullDefinitions isEnabled fullDefinitions setEnabled lightweightManager
see I Decorator Manager get Enabled String public boolean get Enabled String decorator Id Decorator Definition definition get Decorator Definition decorator Id if definition null return false else return definition is Enabled  IDecoratorManager getEnabled getEnabled decoratorId DecoratorDefinition getDecoratorDefinition decoratorId isEnabled
see I Decorator Manager get Label Decorator public I Label Decorator get Label Decorator return this  IDecoratorManager getLabelDecorator ILabelDecorator getLabelDecorator
see I Decorator Manager set Enabled String boolean public void set Enabled String decorator Id boolean enabled throws Core Exception Decorator Definition definition get Decorator Definition decorator Id if definition null definition set Enabled enabled clear Caches update For Enablement Change  IDecoratorManager setEnabled setEnabled decoratorId CoreException DecoratorDefinition getDecoratorDefinition decoratorId setEnabled clearCaches updateForEnablementChange
public I Base Label Provider get Base Label Provider String decorator Id I Base Label Provider full Provider get Label Decorator decorator Id if full Provider null return get Lightweight Label Decorator decorator Id else return full Provider  IBaseLabelProvider getBaseLabelProvider decoratorId IBaseLabelProvider fullProvider getLabelDecorator decoratorId fullProvider getLightweightLabelDecorator decoratorId fullProvider
public I Label Decorator get Label Decorator String decorator Id Full Decorator Definition definition get Full Decorator Definition decorator Id Do not return for a disabled decorator if definition null definition is Enabled return definition get Decorator return null  ILabelDecorator getLabelDecorator decoratorId FullDecoratorDefinition getFullDecoratorDefinition decoratorId isEnabled getDecorator
public I Lightweight Label Decorator get Lightweight Label Decorator String decorator Id Lightweight Decorator Definition definition lightweight Manager get Decorator Definition decorator Id Do not return for a disabled decorator if definition null definition is Enabled return definition get Decorator return null  ILightweightLabelDecorator getLightweightLabelDecorator decoratorId LightweightDecoratorDefinition lightweightManager getDecoratorDefinition decoratorId isEnabled getDecorator
Get the Decorator Definition with the supplied id return Decorator Definition or code null code if it is not found param decorator Id String private Decorator Definition get Decorator Definition String decorator Id Decorator Definition return Value get Full Decorator Definition decorator Id if return Value null return lightweight Manager get Decorator Definition decorator Id else return return Value  DecoratorDefinition DecoratorDefinition decoratorId DecoratorDefinition getDecoratorDefinition decoratorId DecoratorDefinition returnValue getFullDecoratorDefinition decoratorId returnValue lightweightManager getDecoratorDefinition decoratorId returnValue
Get the Full Decorator Definition with the supplied id return Full Decorator Definition or code null code if it is not found param decorator Id String private Full Decorator Definition get Full Decorator Definition String decorator Id for int i 0 i full Definitions length i if full Definitions i get Id equals decorator Id return full Definitions i return null  FullDecoratorDefinition FullDecoratorDefinition decoratorId FullDecoratorDefinition getFullDecoratorDefinition decoratorId fullDefinitions fullDefinitions getId decoratorId fullDefinitions
Get the full decorator definitions registered for elements of this type private Full Decorator Definition get Decorators For Object element if element null return EMPTY FULL DEF String class Name element get Class get Name Full Decorator Definition decorator Array Full Decorator Definition cached Full Decorators get class Name if decorator Array null return decorator Array Collection decorators get Decorators For element enabled Full Definitions if decorators size 0 decorator Array EMPTY FULL DEF else decorator Array new Full Decorator Definition decorators size decorators to Array decorator Array cached Full Decorators put class Name decorator Array return decorator Array  FullDecoratorDefinition getDecoratorsFor EMPTY_FULL_DEF className getClass getName FullDecoratorDefinition decoratorArray FullDecoratorDefinition cachedFullDecorators className decoratorArray decoratorArray getDecoratorsFor enabledFullDefinitions decoratorArray EMPTY_FULL_DEF decoratorArray FullDecoratorDefinition toArray decoratorArray cachedFullDecorators className decoratorArray decoratorArray
Returns the lightweight Manager return Lightweight Decorator Manager Lightweight Decorator Manager get Lightweight Manager return lightweight Manager  lightweightManager LightweightDecoratorManager LightweightDecoratorManager getLightweightManager lightweightManager
see org eclipse ui I Decorator Manager update java lang String public void update String decorator Id I Base Label Provider provider get Base Label Provider decorator Id if provider null scheduler clear Results fire Listeners new Label Provider Changed Event provider  IDecoratorManager decoratorId IBaseLabelProvider getBaseLabelProvider decoratorId clearResults fireListeners LabelProviderChangedEvent
public boolean prepare Decoration Object element String original Text Check if there is a decoration ready or if there is no lightweight decorators to be applied if scheduler is Decoration Ready element get Lightweight Manager has Enabled Definitions return true Queue the decoration Always force an update since old decoration may still be present scheduler queue For Decoration element get Resource Adapter element true original Text force update If all that is there is deferred ones then defer decoration For the sake of effeciency we do not test for enablement at this point and just abandon deferment if there are any to run right away return full Definitions length 0  prepareDecoration originalText isDecorationReady getLightweightManager hasEnabledDefinitions queueForDecoration getResourceAdapter originalText fullDefinitions

Overlay Icon constructor param base the base image param overlays the overlay images param locations the location of each image param size the size public Decorator Overlay Icon Image base Image Image Descriptor overlays Array Point size Value this base base Image this overlays overlays Array this size size Value  OverlayIcon DecoratorOverlayIcon baseImage ImageDescriptor overlaysArray sizeValue baseImage overlaysArray sizeValue
Draw the overlays for the reciever protected void draw Overlays Image Descriptor overlays Array for int i 0 i overlays length i Image Descriptor overlay overlays Array i if overlay null continue Image Data overlay Data overlay get Image Data Use the missing descriptor if it is not there if overlay Data null overlay Data Image Descriptor get Missing Image Descriptor get Image Data switch i case TOP LEFT draw Image overlay Data 0 0 break case TOP RIGHT draw Image overlay Data size x overlay Data width 0 break case BOTTOM LEFT draw Image overlay Data 0 size y overlay Data height break case BOTTOM RIGHT draw Image overlay Data size x overlay Data width size y overlay Data height break  drawOverlays ImageDescriptor overlaysArray ImageDescriptor overlaysArray ImageData overlayData getImageData overlayData overlayData ImageDescriptor getMissingImageDescriptor getImageData TOP_LEFT drawImage overlayData TOP_RIGHT drawImage overlayData overlayData BOTTOM_LEFT drawImage overlayData overlayData BOTTOM_RIGHT drawImage overlayData overlayData overlayData
public boolean equals Object o if o instanceof Decorator Overlay Icon return false Decorator Overlay Icon other Decorator Overlay Icon o return base equals other base Arrays equals overlays other overlays  DecoratorOverlayIcon DecoratorOverlayIcon DecoratorOverlayIcon
public int hash Code int code base hash Code for int i 0 i overlays length i if overlays i null code overlays i hash Code return code  hashCode hashCode hashCode
protected void draw Composite Image int width int height Image Descriptor underlay overlays Decorator Registry Reader UNDERLAY if underlay null draw Image underlay get Image Data 0 0 draw Image base get Image Data 0 0 draw Overlays overlays  drawCompositeImage ImageDescriptor DecoratorRegistryReader drawImage getImageData drawImage getImageData drawOverlays
protected Point get Size return size  getSize

Constructor for Decorator Registry Reader public Decorator Registry Reader super  DecoratorRegistryReader DecoratorRegistryReader
public boolean read Element I Configuration Element element String name element get Attribute ATT LABEL String id element get Attribute ATT ID if ids contains id log Duplicate Id element return false ids add id String description NON NLS 1 I Configuration Element descriptions element get Children ATT DESCRIPTION if descriptions length 0 description descriptions 0 get Value boolean adaptable P TRUE equals element get Attribute ATT ADAPTABLE boolean enabled P TRUE equals element get Attribute ATT ENABLED Action Expression enablement Expression I Configuration Element enablement element get Children CHILD ENABLEMENT if enablement length 0 String class Name element get Attribute ATT OBJECT CLASS if class Name null log Missing Element element CHILD ENABLEMENT return false else enablement Expression new Action Expression ATT OBJECT CLASS class Name else enablement Expression new Action Expression enablement 0 boolean no Class element get Attribute ATT CLASS null Lightweight or Full It is lightweight if it is declared lightweight or if there is no class if P TRUE equals element get Attribute ATT LIGHTWEIGHT no Class int quadrant get Location Constant element get Attribute ATT LOCATION element String icon Path element get Attribute ATT ICON if no Class icon Path null log Missing Element element ATT ICON return false values add new Lightweight Decorator Definition id name description enablement Expression adaptable enabled quadrant icon Path element else values add new Full Decorator Definition id name description enablement Expression adaptable enabled element return true  readElement IConfigurationElement getAttribute ATT_LABEL getAttribute ATT_ID logDuplicateId IConfigurationElement getChildren ATT_DESCRIPTION getValue P_TRUE getAttribute ATT_ADAPTABLE P_TRUE getAttribute ATT_ENABLED ActionExpression enablementExpression IConfigurationElement getChildren CHILD_ENABLEMENT className getAttribute ATT_OBJECT_CLASS className logMissingElement CHILD_ENABLEMENT enablementExpression ActionExpression ATT_OBJECT_CLASS className enablementExpression ActionExpression noClass getAttribute ATT_CLASS P_TRUE getAttribute ATT_LIGHTWEIGHT noClass getLocationConstant getAttribute ATT_LOCATION iconPath getAttribute ATT_ICON noClass iconPath logMissingElement ATT_ICON LightweightDecoratorDefinition enablementExpression iconPath FullDecoratorDefinition enablementExpression
Read the decorator extensions within a registry and set up the registry values Collection read Registry I Extension Registry in values clear ids clear read Registry in PlatformUI PLUGIN ID I Workbench Constants PL DECORATORS return values  readRegistry IExtensionRegistry readRegistry PLUGIN_ID IWorkbenchConstants PL_DECORATORS
public Collection get Values return values  getValues
Get the constant value based on the location supplied Default to bottom right private int get Location Constant String location Definition I Configuration Element element Backwards compatibility if location Definition null location Definition element get Attribute ATT QUADRANT if TOP RIGHT STRING equals location Definition return TOP RIGHT if TOP LEFT STRING equals location Definition return TOP LEFT if BOTTOM LEFT STRING equals location Definition return BOTTOM LEFT if UNDERLAY STRING equals location Definition return UNDERLAY return BOTTOM RIGHT  getLocationConstant locationDefinition IConfigurationElement locationDefinition locationDefinition getAttribute ATT_QUADRANT TOP_RIGHT_STRING locationDefinition TOP_RIGHT TOP_LEFT_STRING locationDefinition TOP_LEFT BOTTOM_LEFT_STRING locationDefinition BOTTOM_LEFT UNDERLAY_STRING locationDefinition BOTTOM_RIGHT
Logs a registry error when the configuration element is unknown protected void log Duplicate Id I Configuration Element element log Error element Duplicate id found element get Attribute ATT ID NON NLS 1  logDuplicateId IConfigurationElement logError getAttribute ATT_ID

Create a new instance of the receiver with the supplied values Full Decorator Definition String identifier String label String decorator Description Action Expression expression boolean is Adaptable boolean init Enabled I Configuration Element element super identifier label decorator Description expression is Adaptable init Enabled element  FullDecoratorDefinition decoratorDescription ActionExpression isAdaptable initEnabled IConfigurationElement decoratorDescription isAdaptable initEnabled
Platform run new Safe Runnable Workbench Messages format Decorator Manager Error Activating Decorator new String get Name NON NLS 1 public void run try decorator I Label Decorator Workbench Plugin create Extension defining Element Decorator Registry Reader ATT CLASS decorator add Listener Workbench Plugin get Default get Decorator Manager catch Core Exception exception exceptions 0 exception  SafeRunnable WorkbenchMessages DecoratorManager ErrorActivatingDecorator getName ILabelDecorator WorkbenchPlugin createExtension definingElement DecoratorRegistryReader ATT_CLASS addListener WorkbenchPlugin getDefault getDecoratorManager CoreException
Gets the decorator and creates it if it does not exist yet Throws a Core Exception if there is a problem creating the decorator This method should not be called unless a check for enabled to be true is done first return Returns a I Label Decorator protected I Label Decorator internal Get Decorator throws Core Exception if label Provider Creation Failed return null final Core Exception exceptions new Core Exception 1 if decorator null Platform run new Safe Runnable Workbench Messages format Decorator Manager Error Activating Decorator new String get Name NON NLS 1 public void run try decorator I Label Decorator Workbench Plugin create Extension defining Element Decorator Registry Reader ATT CLASS decorator add Listener Workbench Plugin get Default get Decorator Manager catch Core Exception exception exceptions 0 exception else return decorator if decorator null this label Provider Creation Failed true set Enabled false if exceptions 0 null throw exceptions 0 return decorator  CoreException ILabelDecorator ILabelDecorator internalGetDecorator CoreException labelProviderCreationFailed CoreException CoreException SafeRunnable WorkbenchMessages DecoratorManager ErrorActivatingDecorator getName ILabelDecorator WorkbenchPlugin createExtension definingElement DecoratorRegistryReader ATT_CLASS addListener WorkbenchPlugin getDefault getDecoratorManager CoreException labelProviderCreationFailed setEnabled
protected void refresh Decorator throws Core Exception Only do something if disabled so as to prevent gratutitous activation if this enabled decorator null I Base Label Provider cached decorator decorator null dispose Cached Decorator cached  refreshDecorator CoreException IBaseLabelProvider disposeCachedDecorator
Decorate the image provided for the element type This method should not be called unless a check for is Enabled has been done first Return null if there is no image or if an error occurs Image decorate Image Image image Object element try Internal decorator might be null so be prepared I Label Decorator current Decorator internal Get Decorator if current Decorator null return current Decorator decorate Image image element catch Core Exception exception handle Core Exception exception return null  isEnabled decorateImage ILabelDecorator currentDecorator internalGetDecorator currentDecorator currentDecorator decorateImage CoreException handleCoreException
Decorate the text provided for the element type This method should not be called unless a check for is Enabled has been done first Return null if there is no text or if there is an exception String decorate Text String text Object element try Internal decorator might be null so be prepared I Label Decorator current Decorator internal Get Decorator if current Decorator null return current Decorator decorate Text text element catch Core Exception exception handle Core Exception exception return null  isEnabled decorateText ILabelDecorator currentDecorator internalGetDecorator currentDecorator currentDecorator decorateText CoreException handleCoreException
Returns the decorator or code null code if not enabled return the decorator or code null code if not enabled public I Label Decorator get Decorator return decorator  ILabelDecorator getDecorator
see org eclipse ui internal Decorator Definition internal Get Label Provider protected I Base Label Provider internal Get Label Provider throws Core Exception return internal Get Decorator  DecoratorDefinition internalGetLabelProvider IBaseLabelProvider internalGetLabelProvider CoreException internalGetDecorator
see org eclipse ui internal Decorator Definition is Full public boolean is Full return true  DecoratorDefinition isFull isFull

Set the values for the element and the decorator param object param definition protected void set Values Object object Full Decorator Definition definition element object decorator definition  setValues FullDecoratorDefinition
public void handle Exception Throwable exception I Status status Status Util new Status I Status ERROR exception get Message exception Workbench Plugin log Exception in Decorator status NON NLS 1 decorator crash Disable  handleException IStatus StatusUtil newStatus IStatus getMessage WorkbenchPlugin crashDisable

see org eclipse core runtime I Safe Runnable run public void run throws Exception result decorator decorate Image start element  ISafeRunnable decorateImage
Get the result of the decoration or code null code if there was a failure return Image Image get Result return result  getResult
Set the values of the initial String and the decorator and object that are going to be used to determine the result param initial Image param object param definition void set Values Image initial Image Object object Full Decorator Definition definition set Values object definition start initial Image result null  initialString initialImage setValues initialImage FullDecoratorDefinition setValues initialImage

see org eclipse core runtime I Safe Runnable run public void run throws Exception result decorator decorate Text start element  ISafeRunnable decorateText
Get the result of the decoration or code null code if there was a failure return String get Result return result  getResult
Set the values of the initial String and the decorator and object that are going to be used to determine the result param initial String param object param definition void set Values String initial String Object object Full Decorator Definition definition set Values object definition start initial String result null  initialString initialString setValues initialString FullDecoratorDefinition setValues initialString

private Image Descriptor image public Lightweight Action Descriptor I Configuration Element action Element super this id action Element get Attribute Action Descriptor ATT ID this label action Element get Attribute Action Descriptor ATT LABEL this description action Element get Attribute Action Descriptor ATT DESCRIPTION String icon Name action Element get Attribute Action Descriptor ATT ICON if icon Name null I Extension extension action Element get Declaring Extension this image AbstractUI Plugin image Descriptor From Plugin extension get Namespace icon Name  ImageDescriptor LightweightActionDescriptor IConfigurationElement actionElement actionElement getAttribute ActionDescriptor ATT_ID actionElement getAttribute ActionDescriptor ATT_LABEL actionElement getAttribute ActionDescriptor ATT_DESCRIPTION iconName actionElement getAttribute ActionDescriptor ATT_ICON iconName IExtension actionElement getDeclaringExtension AbstractUIPlugin imageDescriptorFromPlugin getNamespace iconName
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter
Returns the action s description public String get Description return description  getDescription
Returns the action s id public String get Id return id  getId
Returns the action s image descriptor public Image Descriptor get Image Descriptor return image  ImageDescriptor getImageDescriptor
see I Workbench Adapter get Image Descriptor public Image Descriptor get Image Descriptor Object o if o this return get Image Descriptor return null  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor getImageDescriptor
Returns the action s label public String get Label return label  getLabel
see I Workbench Adapter get Label public String get Label Object o if o this String text get Label int end text last Index Of if end 0 text text substring 0 end return Dialog Util remove Accel text return o null o to String NON NLS 1  IWorkbenchAdapter getLabel getLabel getLabel lastIndexOf DialogUtil removeAccel toString
see org eclipse ui model I Workbench Adapter get Children java lang Object public Object get Children Object o return NO CHILDREN  IWorkbenchAdapter getChildren getChildren NO_CHILDREN
see org eclipse ui model I Workbench Adapter get Parent java lang Object public Object get Parent Object o return null  IWorkbenchAdapter getParent getParent

Lightweight Decorator Definition String identifier String label String decorator Description Action Expression expression boolean is Adaptable boolean init Enabled int quadrant Value String icon Path I Configuration Element element super identifier label decorator Description expression is Adaptable init Enabled element this icon Location icon Path this quadrant quadrant Value  LightweightDecoratorDefinition decoratorDescription ActionExpression isAdaptable initEnabled quadrantValue iconPath IConfigurationElement decoratorDescription isAdaptable initEnabled iconLocation iconPath quadrantValue
Platform run new I Safe Runnable public void run try decorator I Lightweight Label Decorator Workbench Plugin create Extension defining Element Decorator Registry Reader ATT CLASS decorator add Listener Workbench Plugin get Default get Decorator Manager catch Core Exception exception exceptions 0 exception  ISafeRunnable ILightweightLabelDecorator WorkbenchPlugin createExtension definingElement DecoratorRegistryReader ATT_CLASS addListener WorkbenchPlugin getDefault getDecoratorManager CoreException
Method declared on I Safe Runnable public void handle Exception Throwable e Do nothing as Core will handle the logging  ISafeRunnable handleException
Gets the decorator and creates it if it does not exist yet Throws a Core Exception if there is a problem creating the decorator This method should not be called unless a check for enabled to be true is done first return Returns a I Label Decorator protected I Lightweight Label Decorator internal Get Decorator throws Core Exception if label Provider Creation Failed return null final Core Exception exceptions new Core Exception 1 if decorator null if defining Element get Attribute Decorator Registry Reader ATT CLASS null decorator new Declarative Decorator defining Element icon Location else Platform run new I Safe Runnable public void run try decorator I Lightweight Label Decorator Workbench Plugin create Extension defining Element Decorator Registry Reader ATT CLASS decorator add Listener Workbench Plugin get Default get Decorator Manager catch Core Exception exception exceptions 0 exception non Javadoc Method declared on I Safe Runnable public void handle Exception Throwable e Do nothing as Core will handle the logging else return decorator if decorator null this label Provider Creation Failed true set Enabled false if exceptions 0 null throw exceptions 0 return decorator  CoreException ILabelDecorator ILightweightLabelDecorator internalGetDecorator CoreException labelProviderCreationFailed CoreException CoreException definingElement getAttribute DecoratorRegistryReader ATT_CLASS DeclarativeDecorator definingElement iconLocation ISafeRunnable ILightweightLabelDecorator WorkbenchPlugin createExtension definingElement DecoratorRegistryReader ATT_CLASS addListener WorkbenchPlugin getDefault getDecoratorManager CoreException ISafeRunnable handleException labelProviderCreationFailed setEnabled
see org eclipse ui internal Decorator Definition internal Get Label Provider protected I Base Label Provider internal Get Label Provider throws Core Exception return internal Get Decorator  DecoratorDefinition internalGetLabelProvider IBaseLabelProvider internalGetLabelProvider CoreException internalGetDecorator
see org eclipse ui internal Decorator Definition is Full public boolean is Full return false  DecoratorDefinition isFull isFull
Returns the quadrant One of the following constants in Decorator Registry Reader TOP LEFT TOP RIGHT BOTTOM LEFT BOTTOM RIGHT UNDERLAY return int public int get Quadrant return quadrant  DecoratorRegistryReader TOP_LEFT TOP_RIGHT BOTTOM_LEFT BOTTOM_RIGHT getQuadrant
see org eclipse jface viewers I Lightweight Label Decorator get Overlay java lang Object public void decorate Object element I Decoration decoration try Internal decorator might be null so be prepared I Lightweight Label Decorator current Decorator internal Get Decorator if current Decorator null current Decorator decorate element decoration catch Core Exception exception handle Core Exception exception  ILightweightLabelDecorator getOverlay IDecoration ILightweightLabelDecorator currentDecorator internalGetDecorator currentDecorator currentDecorator CoreException handleCoreException
Returns the lightweight decorator or code null code if not enabled return the lightweight decorator or code null code if not enabled public I Lightweight Label Decorator get Decorator return decorator  ILightweightLabelDecorator getDecorator
protected void refresh Decorator throws Core Exception Only do something if disabled so as to prevent gratutitous activation if this enabled decorator null I Base Label Provider cached decorator decorator null dispose Cached Decorator cached  refreshDecorator CoreException IBaseLabelProvider disposeCachedDecorator

void set Values Object object Decoration Builder builder Lightweight Decorator Definition definition element object decoration builder decorator definition  setValues DecorationBuilder LightweightDecoratorDefinition
public void handle Exception Throwable exception I Status status Status Util new Status I Status ERROR exception get Message exception Workbench Plugin log Exception in Decorator status NON NLS 1 decorator crash Disable  handleException IStatus StatusUtil newStatus IStatus getMessage WorkbenchPlugin crashDisable
see I Safe Runnable run public void run throws Exception decorator decorate element decoration  ISafeRunnable
private Overlay Cache overlay Cache new Overlay Cache Lightweight Decorator Manager Lightweight Decorator Definition definitions super lightweight Definitions definitions  OverlayCache overlayCache OverlayCache LightweightDecoratorManager LightweightDecoratorDefinition lightweightDefinitions
Get the lightweight definitions for the receiver return Lightweight Decorator Definition Lightweight Decorator Definition get Definitions return lightweight Definitions  LightweightDecoratorDefinition LightweightDecoratorDefinition getDefinitions lightweightDefinitions
For dynamic UI param definition the definition to add return whether the definition was added since 3 0 public boolean add Decorator Lightweight Decorator Definition decorator if get Lightweight Decorator Definition decorator get Id null Lightweight Decorator Definition old Defs lightweight Definitions lightweight Definitions new Lightweight Decorator Definition lightweight Definitions length 1 System arraycopy old Defs 0 lightweight Definitions 0 old Defs length lightweight Definitions old Defs length decorator no reset handled in the Decorator Manager return true return false  addDecorator LightweightDecoratorDefinition getLightweightDecoratorDefinition getId LightweightDecoratorDefinition oldDefs lightweightDefinitions lightweightDefinitions LightweightDecoratorDefinition lightweightDefinitions oldDefs lightweightDefinitions oldDefs lightweightDefinitions oldDefs DecoratorManager
Get the Lightweight Decorator Definition with the supplied id return Lightweight Decorator Definition or code null code if it is not found param decorator Id String since 3 0 private Lightweight Decorator Definition get Lightweight Decorator Definition String decorator Id for int i 0 i lightweight Definitions length i if lightweight Definitions i get Id equals decorator Id return lightweight Definitions i return null  LightweightDecoratorDefinition LightweightDecoratorDefinition decoratorId LightweightDecoratorDefinition getLightweightDecoratorDefinition decoratorId lightweightDefinitions lightweightDefinitions getId decoratorId lightweightDefinitions
Return the enabled lightweight decorator definitions return Lightweight Decorator Definition Lightweight Decorator Definition enabled Definitions Array List result new Array List for int i 0 i lightweight Definitions length i if lightweight Definitions i is Enabled result add lightweight Definitions i Lightweight Decorator Definition return Array new Lightweight Decorator Definition result size result to Array return Array return return Array  LightweightDecoratorDefinition LightweightDecoratorDefinition enabledDefinitions ArrayList ArrayList lightweightDefinitions lightweightDefinitions isEnabled lightweightDefinitions LightweightDecoratorDefinition returnArray LightweightDecoratorDefinition toArray returnArray returnArray
Return whether there are enabled lightwieght decorators return boolean boolean has Enabled Definitions for int i 0 i lightweight Definitions length i if lightweight Definitions i is Enabled return true return false  hasEnabledDefinitions lightweightDefinitions lightweightDefinitions isEnabled
Reset any cached values void reset cached Lightweight Decorators clear  cachedLightweightDecorators
Shutdown the decorator manager by disabling all of the decorators so that dispose will be called on them void shutdown Disable all fo the enabled decorators so as to force a dispose of thier decorators for int i 0 i lightweight Definitions length i if lightweight Definitions i is Enabled lightweight Definitions i set Enabled false overlay Cache dispose All  lightweightDefinitions lightweightDefinitions isEnabled lightweightDefinitions setEnabled overlayCache disposeAll
Get the Lightweight Decorator Definition with the supplied id return Lightweight Decorator Definition or code null code if it is not found param decorator Id String Lightweight Decorator Definition get Decorator Definition String decorator Id for int i 0 i lightweight Definitions length i if lightweight Definitions i get Id equals decorator Id return lightweight Definitions i return null  LightweightDecoratorDefinition LightweightDecoratorDefinition decoratorId LightweightDecoratorDefinition getDecoratorDefinition decoratorId lightweightDefinitions lightweightDefinitions getId decoratorId lightweightDefinitions
Get the lightweight registered for elements of this type Lightweight Decorator Definition get Decorators For Object element if element null return EMPTY LIGHTWEIGHT DEF String class Name element get Class get Name Lightweight Decorator Definition decorator Array Lightweight Decorator Definition cached Lightweight Decorators get class Name if decorator Array null return decorator Array Collection decorators Decorator Manager get Decorators For element enabled Definitions if decorators size 0 decorator Array EMPTY LIGHTWEIGHT DEF else decorator Array new Lightweight Decorator Definition decorators size decorators to Array decorator Array cached Lightweight Decorators put class Name decorator Array return decorator Array  LightweightDecoratorDefinition getDecoratorsFor EMPTY_LIGHTWEIGHT_DEF className getClass getName LightweightDecoratorDefinition decoratorArray LightweightDecoratorDefinition cachedLightweightDecorators className decoratorArray decoratorArray DecoratorManager getDecoratorsFor enabledDefinitions decoratorArray EMPTY_LIGHTWEIGHT_DEF decoratorArray LightweightDecoratorDefinition toArray decoratorArray cachedLightweightDecorators className decoratorArray decoratorArray
Fill the decoration with all of the results of the decorators param element The source element param decoration The Decoration Result we are working on param adaptable Decoration If it is true only apply the decorators where adaptable is true void get Decorations Object element Decoration Builder decoration boolean adaptable Decoration Lightweight Decorator Definition decorators get Decorators For element for int i 0 i decorators length i If we are doing the adaptable one make sure we are only applying the adaptable decorations if adaptable Decoration decorators i is Adaptable continue if decorators i get Enablement is Enabled For element decoration set Current Definition decorators i decorate element decoration decorators i  DecorationResult adaptableDecoration getDecorations DecorationBuilder adaptableDecoration LightweightDecoratorDefinition getDecoratorsFor adaptableDecoration isAdaptable getEnablement isEnabledFor setCurrentDefinition
Decorate the element receiver in a Safe Runnable param element The Object to be decorated param decoration The object building decorations param decorator The decorator being applied private void decorate Object element Decoration Builder decoration Lightweight Decorator Definition decorator runnable set Values element decoration decorator Platform run runnable  SafeRunnable DecorationBuilder LightweightDecoratorDefinition setValues
Returns the overlay Cache return Overlay Cache Overlay Cache get Overlay Cache return overlay Cache  overlayCache OverlayCache OverlayCache getOverlayCache overlayCache

Returns and caches an image corresponding to the specified icon param icon the icon return the image Image get Image For Decorator Overlay Icon icon Image image Image cache get icon if image null image icon create Image cache put icon image return image  getImageFor DecoratorOverlayIcon createImage
Disposes of all images in the cache void dispose All for Iterator it cache values iterator it has Next Image image Image it next image dispose cache clear  disposeAll hasNext
Apply the descriptors for the receiver to the supplied image param source param descriptors return Image Image apply Descriptors Image source Image Descriptor descriptors Rectangle bounds source get Bounds Point size new Point bounds width bounds height Decorator Overlay Icon icon new Decorator Overlay Icon source descriptors size return get Image For icon  applyDescriptors ImageDescriptor getBounds DecoratorOverlayIcon DecoratorOverlayIcon getImageFor

private int active State Stack Presentation AS INACTIVE public Default Stack Presentation Site  activeState StackPresentation AS_INACTIVE DefaultStackPresentationSite
public void set Presentation Stack Presentation new Presentation presentation new Presentation if presentation null presentation set State state presentation set Active active State  setPresentation StackPresentation newPresentation newPresentation setState setActive activeState
public Stack Presentation get Presentation return presentation  StackPresentation getPresentation
public int get State return state  getState
public void set Active int active State if active State this active State this active State active State if presentation null presentation set Active active State  setActive activeState activeState activeState activeState activeState setActive activeState
public int get Active return active State  getActive activeState
public void select Part I Presentable Part to Select if presentation null presentation select Part to Select  selectPart IPresentablePart toSelect selectPart toSelect
public void dispose if presentation null presentation dispose set Presentation null  setPresentation
see org eclipse ui internal skins I Presentation Site set State int public void set State int new State set Presentation State new State  IPresentationSite setState setState newState setPresentationState newState
public void set Presentation State int new State state new State if presentation null presentation set State new State  setPresentationState newState newState setState newState
see org eclipse ui internal skins I Presentable Part is Closable public boolean is Closeable I Presentable Part part return true  IPresentablePart isClosable isCloseable IPresentablePart
see org eclipse ui internal skins I Presentation Site drag Start org eclipse ui internal skins I Presentable Part boolean public void drag Start I Presentable Part being Dragged Point initial Position boolean keyboard  IPresentationSite dragStart IPresentablePart dragStart IPresentablePart beingDragged initialPosition
see org eclipse ui internal skins I Presentation Site close org eclipse ui internal skins I Presentable Part public void close I Presentable Part to Close  IPresentationSite IPresentablePart IPresentablePart toClose
see org eclipse ui internal skins I Presentation Site drag Start boolean public void drag Start Point initial Position boolean keyboard  IPresentationSite dragStart dragStart initialPosition
see org eclipse ui presentations I Stack Presentation Site supports State int public boolean supports State int state return true  IStackPresentationSite supportsState supportsState
see org eclipse ui presentations I Stack Presentation Site get Selected Part public abstract I Presentable Part get Selected Part  IStackPresentationSite getSelectedPart IPresentablePart getSelectedPart
public abstract I Presentable Part get Selected Part public void add System Actions I Menu Manager menu Manager  IPresentablePart getSelectedPart addSystemActions IMenuManager menuManager
public abstract boolean is Part Moveable I Presentable Part to Move  isPartMoveable IPresentablePart toMove
public abstract boolean is Part Moveable I Presentable Part to Move public abstract boolean is Stack Moveable  isPartMoveable IPresentablePart toMove isStackMoveable

Rectangle bounds Detached Place Holder constructor comment param id java lang String public Detached Place Holder String id Rectangle bounds super id this bounds bounds  DetachedPlaceHolder DetachedPlaceHolder
Add a child to the container public void add Layout Part new Part if new Part instanceof Part Placeholder return children add new Part  LayoutPart newPart newPart PartPlaceholder newPart
Return true if the container allows its parts to show a border if they choose to else false if the container does not want its parts to show a border public boolean allows Border return false  allowsBorder
return false public Rectangle get Bounds return bounds  getBounds
Returns a list of layout children public Layout Part get Children Layout Part result new Layout Part children size children to Array result return result  LayoutPart getChildren LayoutPart LayoutPart toArray
Remove a child from the container public void remove Layout Part part children remove part  LayoutPart
Replace one child with another public void replace Layout Part old Part Layout Part new Part remove old Part add new Part  LayoutPart oldPart LayoutPart newPart oldPart newPart
see I Persistable Part public void restore State I Memento memento Read the bounds Integer big Int big Int memento get Integer I Workbench Constants TAG X int x big Int int Value big Int memento get Integer I Workbench Constants TAG Y int y big Int int Value big Int memento get Integer I Workbench Constants TAG WIDTH int width big Int int Value big Int memento get Integer I Workbench Constants TAG HEIGHT int height big Int int Value bounds new Rectangle x y width height Restore the placeholders I Memento children Mem memento get Children I Workbench Constants TAG VIEW for int i 0 i children Mem length i Part Placeholder holder new Part Placeholder children Mem i get String I Workbench Constants TAG ID holder set Container this children add holder  IPersistablePart restoreState IMemento bigInt bigInt getInteger IWorkbenchConstants TAG_X bigInt intValue bigInt getInteger IWorkbenchConstants TAG_Y bigInt intValue bigInt getInteger IWorkbenchConstants TAG_WIDTH bigInt intValue bigInt getInteger IWorkbenchConstants TAG_HEIGHT bigInt intValue IMemento childrenMem getChildren IWorkbenchConstants TAG_VIEW childrenMem PartPlaceholder PartPlaceholder childrenMem getString IWorkbenchConstants TAG_ID setContainer
see I Persistable Part public void save State I Memento memento Save the bounds memento put Integer I Workbench Constants TAG X bounds x memento put Integer I Workbench Constants TAG Y bounds y memento put Integer I Workbench Constants TAG WIDTH bounds width memento put Integer I Workbench Constants TAG HEIGHT bounds height Save the views for int i 0 i children size i I Memento child Mem memento create Child I Workbench Constants TAG VIEW Layout Part child Layout Part children get i child Mem put String I Workbench Constants TAG ID child getID  IPersistablePart saveState IMemento putInteger IWorkbenchConstants TAG_X putInteger IWorkbenchConstants TAG_Y putInteger IWorkbenchConstants TAG_WIDTH putInteger IWorkbenchConstants TAG_HEIGHT IMemento childMem createChild IWorkbenchConstants TAG_VIEW LayoutPart LayoutPart childMem putString IWorkbenchConstants TAG_ID
public void find Sashes Layout Part part Part Pane Sashes sashes I Layout Container container get Container if container null container find Sashes this sashes  findSashes LayoutPart PartPane ILayoutContainer getContainer findSashes
see org eclipse ui internal I Layout Container allows Auto Focus public boolean allows Auto Focus return false  ILayoutContainer allowsAutoFocus allowsAutoFocus

private Rectangle bounds Create a new Floating Window public Detached Window Workbench Page workbench Page super workbench Page get Workbench Window get Shell set Shell Style SWT CLOSE SWT MIN SWT MAX SWT RESIZE this page workbench Page folder new View Stack page false  FloatingWindow DetachedWindow WorkbenchPage workbenchPage workbenchPage getWorkbenchWindow getShell setShellStyle workbenchPage ViewStack
Adds a visual part to this window Supports reparenting public void add View Pane part Shell shell get Shell if shell null part reparent shell folder add part  ViewPane getShell
folder add part public boolean belongs To Workbench Page I Workbench Page workbench Page return this page workbench Page  belongsToWorkbenchPage IWorkbenchPage workbenchPage workbenchPage
Closes this window and disposes its shell public boolean close Shell s get Shell if s null title s get Text bounds s get Bounds if folder null folder dispose Unregister this detached view as a window for key bindings final I Workbench Context Support context Support get Workbench Page get Workbench Window get Workbench get Context Support context Support unregister Shell s return super close  getShell getText getBounds IWorkbenchContextSupport contextSupport getWorkbenchPage getWorkbenchWindow getWorkbench getContextSupport contextSupport unregisterShell
Answer a list of the view panes private void collect View Panes List result Layout Part parts for int i 0 length parts length i length i Layout Part part parts i if part instanceof View Pane result add part  collectViewPanes LayoutPart LayoutPart ViewPane
shell set Text title shell add Listener SWT Resize new Listener public void handle Event Event event Shell shell Shell event widget folder set Bounds shell get Client Area  setText addListener handleEvent setBounds getClientArea
This method will be called to initialize the given Shell s layout protected void configure Shell Shell shell if title null shell set Text title shell add Listener SWT Resize new Listener public void handle Event Event event Shell shell Shell event widget folder set Bounds shell get Client Area Register this detached view as a window for key bindings final I Workbench Context Support context Support get Workbench Page get Workbench Window get Workbench get Context Support context Support register Shell shell I Workbench Context Support TYPE WINDOW Workbench Help set Help shell I Help Context Ids DETACHED WINDOW  configureShell setText addListener handleEvent setBounds getClientArea IWorkbenchContextSupport contextSupport getWorkbenchPage getWorkbenchWindow getWorkbench getContextSupport contextSupport registerShell IWorkbenchContextSupport TYPE_WINDOW WorkbenchHelp setHelp IHelpContextIds DETACHED_WINDOW
Override this method to create the widget tree that is used as the window s contents protected Control create Contents Composite parent Create the tab folder folder create Control parent Reparent each view in the tab folder Vector detached Children new Vector collect View Panes detached Children get Children Enumeration enum detached Children elements while enum has More Elements Layout Part part Layout Part enum next Element part reparent parent Return tab folder control return folder get Control  createContents createControl detachedChildren collectViewPanes detachedChildren getChildren detachedChildren hasMoreElements LayoutPart LayoutPart nextElement getControl
return folder get Control public Layout Part get Children return folder get Children  getControl LayoutPart getChildren getChildren
return folder get Children public Workbench Page get Workbench Page return this page  getChildren WorkbenchPage getWorkbenchPage
Close has been pressed Close all views protected void handle Shell Close Event List views new Array List collect View Panes views get Children Iterator enum views iterator while enum has Next View Pane child View Pane enum next page hide View child get View Reference close  handleShellCloseEvent ArrayList collectViewPanes getChildren hasNext ViewPane ViewPane hideView getViewReference
protected void initialize Bounds if bounds null get Shell set Bounds bounds else super initialize Bounds  initializeBounds getShell setBounds initializeBounds
see I Persistable Part public void restore State I Memento memento Read the title title memento get String I Workbench Constants TAG TITLE Read the bounds Integer big Int big Int memento get Integer I Workbench Constants TAG X int x big Int int Value big Int memento get Integer I Workbench Constants TAG Y int y big Int int Value big Int memento get Integer I Workbench Constants TAG WIDTH int width big Int int Value big Int memento get Integer I Workbench Constants TAG HEIGHT int height big Int int Value Set the bounds bounds new Rectangle x y width height if get Shell null get Shell set Text title get Shell set Bounds bounds Create the folder I Memento child Mem memento get Child I Workbench Constants TAG FOLDER if child Mem null folder restore State child Mem  IPersistablePart restoreState IMemento getString IWorkbenchConstants TAG_TITLE bigInt bigInt getInteger IWorkbenchConstants TAG_X bigInt intValue bigInt getInteger IWorkbenchConstants TAG_Y bigInt intValue bigInt getInteger IWorkbenchConstants TAG_WIDTH bigInt intValue bigInt getInteger IWorkbenchConstants TAG_HEIGHT bigInt intValue getShell getShell setText getShell setBounds IMemento childMem getChild IWorkbenchConstants TAG_FOLDER childMem restoreState childMem
see I Persistable Part public void save State I Memento memento if get Shell null title get Shell get Text bounds get Shell get Bounds Save the title memento put String I Workbench Constants TAG TITLE title Save the bounds memento put Integer I Workbench Constants TAG X bounds x memento put Integer I Workbench Constants TAG Y bounds y memento put Integer I Workbench Constants TAG WIDTH bounds width memento put Integer I Workbench Constants TAG HEIGHT bounds height Save the views I Memento child Mem memento create Child I Workbench Constants TAG FOLDER folder save State child Mem  IPersistablePart saveState IMemento getShell getShell getText getShell getBounds putString IWorkbenchConstants TAG_TITLE putInteger IWorkbenchConstants TAG_X putInteger IWorkbenchConstants TAG_Y putInteger IWorkbenchConstants TAG_WIDTH putInteger IWorkbenchConstants TAG_HEIGHT IMemento childMem createChild IWorkbenchConstants TAG_FOLDER saveState childMem
see org eclipse ui internal I Workbench Drag Drop Part get Control public Control get Control return folder get Control  IWorkbenchDragDropPart getControl getControl getControl
Returns true iff the given rectangle is located in the client area of any monitor param some Rectangle a rectangle in display coordinates not null return true iff the given point can be seen on any monitor private static boolean intersects Any Monitor Display display Rectangle some Rectangle Monitor monitors display get Monitors for int idx 0 idx monitors length idx Monitor mon monitors idx if mon get Client Area intersects some Rectangle return true return false  someRectangle intersectsAnyMonitor someRectangle getMonitors getClientArea someRectangle
protected Rectangle get Constrained Shell Bounds Rectangle preferred Size As long as the initial position is somewhere on the display don t mess with it if intersects Any Monitor get Shell get Display preferred Size return preferred Size return super get Constrained Shell Bounds preferred Size  getConstrainedShellBounds preferredSize intersectsAnyMonitor getShell getDisplay preferredSize preferredSize getConstrainedShellBounds preferredSize

Create an instance of the About Dialog for the given window public About Dialog Shell parent Shell super parent Shell product Platform get Product if product null product Name product get Name if product Name null product Name Workbench Messages get String About Dialog default Product Name NON NLS 1 create a descriptive object for each Bundle Group I Bundle Group Provider providers Platform get Bundle Group Providers Linked List groups new Linked List if providers null for int i 0 i providers length i I Bundle Group bundle Groups providers i get Bundle Groups for int j 0 j bundle Groups length j groups add new About Bundle Group Data bundle Groups j bundle Group Infos About Bundle Group Data groups to Array new About Bundle Group Data 0  AboutDialog AboutDialog parentShell parentShell getProduct productName getName productName productName WorkbenchMessages getString AboutDialog defaultProductName BundleGroup IBundleGroupProvider getBundleGroupProviders LinkedList LinkedList IBundleGroup bundleGroups getBundleGroups bundleGroups AboutBundleGroupData bundleGroups bundleGroupInfos AboutBundleGroupData toArray AboutBundleGroupData
protected void button Pressed int button Id switch button Id case FEATURES ID new About Features Dialog get Shell product Name bundle Group Infos open break case PLUGINS ID new About Plugins Dialog get Shell product Name open break case INFO ID new About System Dialog get Shell open break default super button Pressed button Id break  buttonPressed buttonId buttonId FEATURES_ID AboutFeaturesDialog getShell productName bundleGroupInfos PLUGINS_ID AboutPluginsDialog getShell productName INFO_ID AboutSystemDialog getShell buttonPressed buttonId
public boolean close dispose all images for int i 0 i images size i Image image Image images get i image dispose return super close 
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text Workbench Messages format About Dialog shell Title NON NLS 1 new Object product Name Workbench Help set Help new Shell I Help Context Ids ABOUT DIALOG  configureShell newShell configureShell newShell newShell setText WorkbenchMessages AboutDialog shellTitle productName WorkbenchHelp setHelp newShell IHelpContextIds ABOUT_DIALOG
Add buttons to the dialog s button bar Subclasses should override param parent the button bar composite protected void create Buttons For Button Bar Composite parent parent set Layout Data new Grid Data Grid Data FILL HORIZONTAL create Button parent FEATURES ID Workbench Messages get String About Dialog feature Info false NON NLS 1 create Button parent PLUGINS ID Workbench Messages get String About Dialog plugin Info false NON NLS 1 create Button parent INFO ID Workbench Messages get String About Dialog system Info false NON NLS 1 Label l new Label parent SWT NONE l set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout layout Grid Layout parent get Layout layout num Columns layout make Columns Equal Width false Button b create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true b set Focus  createButtonsForButtonBar setLayoutData GridData GridData FILL_HORIZONTAL createButton FEATURES_ID WorkbenchMessages getString AboutDialog featureInfo createButton PLUGINS_ID WorkbenchMessages getString AboutDialog pluginInfo createButton INFO_ID WorkbenchMessages getString AboutDialog systemInfo setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout getLayout numColumns makeColumnsEqualWidth createButton IDialogConstants OK_ID IDialogConstants OK_LABEL setFocus
get Shell add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e set Hand Cursor null hand dispose set Busy Cursor null busy dispose  getShell addDisposeListener DisposeListener widgetDisposed DisposeEvent setHandCursor setBusyCursor
Creates and returns the contents of the upper part of the dialog above the button bar Subclasses should overide param parent the parent composite to contain the dialog area return the dialog area control protected Control create Dialog Area Composite parent final Cursor hand new Cursor parent get Display SWT CURSOR HAND final Cursor busy new Cursor parent get Display SWT CURSOR WAIT set Hand Cursor hand set Busy Cursor busy get Shell add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e set Hand Cursor null hand dispose set Busy Cursor null busy dispose brand the about box if there is product info Image about Image null if product null Image Descriptor image Descriptor Product Properties get About Image product if image Descriptor null about Image image Descriptor create Image if the about image is small enough then show the text if about Image null about Image get Bounds width MAX IMAGE WIDTH FOR TEXT String about Text Product Properties get About Text product if about Text null set Item scan about Text if about Image null images add about Image create a composite which is the parent of the top area and the bottom button bar this allows there to be a second child of this composite with a banner background on top but not have on the bottom Composite work Area new Composite parent SWT NONE Grid Layout work Layout new Grid Layout work Layout margin Height 0 work Layout margin Width 0 work Layout vertical Spacing 0 work Layout horizontal Spacing 0 work Area set Layout work Layout work Area set Layout Data new Grid Data Grid Data FILL BOTH page group Color background J Face Colors get Banner Background parent get Display Color foreground J Face Colors get Banner Foreground parent get Display Composite top Composite super create Dialog Area work Area override any layout inherited from create Dialog Area Grid Layout layout new Grid Layout top set Layout layout top set Layout Data new Grid Data Grid Data FILL BOTH top set Background background top set Foreground foreground the image text Composite top Container new Composite top SWT NONE top Container set Background background top Container set Foreground foreground layout new Grid Layout layout num Columns about Image null get Item null 1 2 layout margin Width 0 layout margin Height 0 top Container set Layout layout Grid Data data new Grid Data data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true top Container set Layout Data data image on left side of dialog if about Image null Label image Label new Label top Container SWT NONE image Label set Background background image Label set Foreground foreground data new Grid Data data horizontal Alignment Grid Data FILL data vertical Alignment Grid Data BEGINNING data grab Excess Horizontal Space false image Label set Layout Data data image Label set Image about Image if get Item null text on the right text new Styled Text top Container SWT MULTI SWT READ ONLY text set Caret null text set Font parent get Font data new Grid Data data horizontal Alignment Grid Data FILL data vertical Alignment Grid Data BEGINNING data grab Excess Horizontal Space true text set Text get Item get Text text set Layout Data data text set Cursor null text set Background background text set Foreground foreground set Link Ranges text get Item get Link Ranges add Listeners text horizontal bar Label bar new Label work Area SWT HORIZONTAL SWT SEPARATOR data new Grid Data data horizontal Alignment Grid Data FILL bar set Layout Data data add image buttons for bundle groups that have them Composite bottom Composite super create Dialog Area work Area override any layout inherited from create Dialog Area layout new Grid Layout bottom set Layout layout bottom set Layout Data new Grid Data Grid Data FILL BOTH create Feature Image Button Row bottom spacer bar new Label bottom SWT NONE data new Grid Data data horizontal Alignment Grid Data FILL bar set Layout Data data return work Area  createDialogArea getDisplay CURSOR_HAND getDisplay CURSOR_WAIT setHandCursor setBusyCursor getShell addDisposeListener DisposeListener widgetDisposed DisposeEvent setHandCursor setBusyCursor aboutImage ImageDescriptor imageDescriptor ProductProperties getAboutImage imageDescriptor aboutImage imageDescriptor createImage aboutImage aboutImage getBounds MAX_IMAGE_WIDTH_FOR_TEXT aboutText ProductProperties getAboutText aboutText setItem aboutText aboutImage aboutImage workArea GridLayout workLayout GridLayout workLayout marginHeight workLayout marginWidth workLayout verticalSpacing workLayout horizontalSpacing workArea setLayout workLayout workArea setLayoutData GridData GridData FILL_BOTH JFaceColors getBannerBackground getDisplay JFaceColors getBannerForeground getDisplay createDialogArea workArea createDialogArea GridLayout GridLayout setLayout setLayoutData GridData GridData FILL_BOTH setBackground setForeground topContainer topContainer setBackground topContainer setForeground GridLayout numColumns aboutImage getItem marginWidth marginHeight topContainer setLayout GridData GridData horizontalAlignment GridData grabExcessHorizontalSpace topContainer setLayoutData aboutImage imageLabel topContainer imageLabel setBackground imageLabel setForeground GridData horizontalAlignment GridData verticalAlignment GridData grabExcessHorizontalSpace imageLabel setLayoutData imageLabel setImage aboutImage getItem StyledText topContainer READ_ONLY setCaret setFont getFont GridData horizontalAlignment GridData verticalAlignment GridData grabExcessHorizontalSpace setText getItem getText setLayoutData setCursor setBackground setForeground setLinkRanges getItem getLinkRanges addListeners workArea GridData horizontalAlignment GridData setLayoutData createDialogArea workArea createDialogArea GridLayout setLayout setLayoutData GridData GridData FILL_BOTH createFeatureImageButtonRow GridData horizontalAlignment GridData setLayoutData workArea
private void create Feature Image Button Row Composite parent Composite feature Container new Composite parent SWT NONE Row Layout row Layout new Row Layout row Layout wrap true feature Container set Layout row Layout Grid Data data new Grid Data data horizontal Alignment Grid Data FILL feature Container set Layout Data data for int i 0 i bundle Group Infos length i create Feature Button feature Container bundle Group Infos i  createFeatureImageButtonRow featureContainer RowLayout rowLayout RowLayout rowLayout featureContainer setLayout rowLayout GridData GridData horizontalAlignment GridData featureContainer setLayoutData bundleGroupInfos createFeatureButton featureContainer bundleGroupInfos
button add Selection Listener new Selection Adapter public void widget Selected Selection Event event About Bundle Group Data group Infos button Manager get Related Infos info About Bundle Group Data selection About Bundle Group Data event widget get Data About Features Dialog d new About Features Dialog get Shell product Name group Infos d set Initial Selection selection d open  addSelectionListener SelectionAdapter widgetSelected SelectionEvent AboutBundleGroupData groupInfos buttonManager getRelatedInfos AboutBundleGroupData AboutBundleGroupData getData AboutFeaturesDialog AboutFeaturesDialog getShell productName groupInfos setInitialSelection
private Button create Feature Button Composite parent final About Bundle Group Data info if button Manager add info return null Image Descriptor desc info get Feature Image Image feature Image null Button button new Button parent SWT FLAT SWT PUSH button set Data info feature Image desc create Image images add feature Image button set Image feature Image button set Tool Tip Text info get Provider Name button add Selection Listener new Selection Adapter public void widget Selected Selection Event event About Bundle Group Data group Infos button Manager get Related Infos info About Bundle Group Data selection About Bundle Group Data event widget get Data About Features Dialog d new About Features Dialog get Shell product Name group Infos d set Initial Selection selection d open return button  createFeatureButton AboutBundleGroupData buttonManager ImageDescriptor getFeatureImage featureImage setData featureImage createImage featureImage setImage featureImage setToolTipText getProviderName addSelectionListener SelectionAdapter widgetSelected SelectionEvent AboutBundleGroupData groupInfos buttonManager getRelatedInfos AboutBundleGroupData AboutBundleGroupData getData AboutFeaturesDialog AboutFeaturesDialog getShell productName groupInfos setInitialSelection

Constructor for About Features Dialog public About Features Dialog Shell parent Shell String product Name About Bundle Group Data bundle Group Infos super parent Shell set Shell Style SWT DIALOG TRIM SWT RESIZE SWT MAX SWT APPLICATION MODAL this product Name product Name the order of the array may be changed due to sorting so create a copy this bundle Group Infos new About Bundle Group Data bundle Group Infos length System arraycopy bundle Group Infos 0 this bundle Group Infos 0 bundle Group Infos length About Data sort By Provider reverse Sort this bundle Group Infos  AboutFeaturesDialog AboutFeaturesDialog parentShell productName AboutBundleGroupData bundleGroupInfos parentShell setShellStyle DIALOG_TRIM APPLICATION_MODAL productName productName bundleGroupInfos AboutBundleGroupData bundleGroupInfos bundleGroupInfos bundleGroupInfos bundleGroupInfos AboutData sortByProvider reverseSort bundleGroupInfos
The More Info button was pressed Open a browser with the license for the selected item or an information dialog if there is no license or the browser cannot be opened private void handle More Info Pressed Table Item items table get Selection if items length 0 return About Bundle Group Data info About Bundle Group Data items 0 get Data if info null open Browser info get License Url Message Dialog open Information get Shell Workbench Messages get String About Features Dialog no Info Title NON NLS 1 Workbench Messages get String About Features Dialog no Information NON NLS 1  handleMoreInfoPressed TableItem getSelection AboutBundleGroupData AboutBundleGroupData getData openBrowser getLicenseUrl MessageDialog openInformation getShell WorkbenchMessages getString AboutFeaturesDialog noInfoTitle WorkbenchMessages getString AboutFeaturesDialog noInformation
The Plugins button was pressed Open an about dialog on the plugins for the selected feature private void handle Plugin Info Pressed Table Item items table get Selection if items length 0 return About Bundle Group Data info About Bundle Group Data items 0 get Data I Bundle Group bundle Group info get Bundle Group Bundle bundles bundle Group null new Bundle 0 bundle Group get Bundles About Plugins Dialog d new About Plugins Dialog get Shell product Name bundles Workbench Messages get String About Features Dialog plugin Info Title NON NLS 1 Workbench Messages format About Features Dialog plugin Info Message NON NLS 1 new Object bundle Group get Identifier I Help Context Ids ABOUT FEATURES PLUGINS DIALOG d open  handlePluginInfoPressed TableItem getSelection AboutBundleGroupData AboutBundleGroupData getData IBundleGroup bundleGroup getBundleGroup bundleGroup bundleGroup getBundles AboutPluginsDialog AboutPluginsDialog getShell productName WorkbenchMessages getString AboutFeaturesDialog pluginInfoTitle WorkbenchMessages AboutFeaturesDialog pluginInfoMessage bundleGroup getIdentifier IHelpContextIds ABOUT_FEATURES_PLUGINS_DIALOG
protected void button Pressed int button Id switch button Id case MORE ID handle More Info Pressed break case PLUGINS ID handle Plugin Info Pressed break default super button Pressed button Id break  buttonPressed buttonId buttonId MORE_ID handleMoreInfoPressed PLUGINS_ID handlePluginInfoPressed buttonPressed buttonId
protected void configure Shell Shell new Shell super configure Shell new Shell if product Name null new Shell set Text Workbench Messages format About Features Dialog shell Title NON NLS 1 new Object product Name Workbench Help set Help new Shell I Help Context Ids ABOUT FEATURES DIALOG  configureShell newShell configureShell newShell productName newShell setText WorkbenchMessages AboutFeaturesDialog shellTitle productName WorkbenchHelp setHelp newShell IHelpContextIds ABOUT_FEATURES_DIALOG
Add buttons to the dialog s button bar Subclasses should override param parent the button bar composite protected void create Buttons For Button Bar Composite parent parent set Layout Data new Grid Data Grid Data FILL HORIZONTAL more Button create Button parent MORE ID Workbench Messages get String About Features Dialog more Info false NON NLS 1 plugins Button create Button parent PLUGINS ID Workbench Messages get String About Features Dialog plugins Info false NON NLS 1 Label l new Label parent SWT NONE l set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout layout Grid Layout parent get Layout layout num Columns layout make Columns Equal Width false Button b create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true b set Focus Table Item items table get Selection if items length 0 update Buttons About Bundle Group Data items 0 get Data  createButtonsForButtonBar setLayoutData GridData GridData FILL_HORIZONTAL moreButton createButton MORE_ID WorkbenchMessages getString AboutFeaturesDialog moreInfo pluginsButton createButton PLUGINS_ID WorkbenchMessages getString AboutFeaturesDialog pluginsInfo setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout getLayout numColumns makeColumnsEqualWidth createButton IDialogConstants OK_ID IDialogConstants OK_LABEL setFocus TableItem getSelection updateButtons AboutBundleGroupData getData
get Shell add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if get Hand Cursor null get Hand Cursor dispose if get Busy Cursor null get Busy Cursor dispose  getShell addDisposeListener DisposeListener widgetDisposed DisposeEvent getHandCursor getHandCursor getBusyCursor getBusyCursor
Create the contents of the dialog above the button bar Subclasses should overide param parent the parent composite to contain the dialog area return the dialog area control protected Control create Dialog Area Composite parent set Hand Cursor new Cursor parent get Display SWT CURSOR HAND set Busy Cursor new Cursor parent get Display SWT CURSOR WAIT get Shell add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if get Hand Cursor null get Hand Cursor dispose if get Busy Cursor null get Busy Cursor dispose Composite outer Composite super create Dialog Area parent create Table outer create Info Area outer Grid Data grid Data new Grid Data Grid Data FILL Grid Data FILL true true grid Data height Hint convert VerticalDL Us To Pixels TABLE HEIGHT table set Layout Data grid Data return outer  createDialogArea setHandCursor getDisplay CURSOR_HAND setBusyCursor getDisplay CURSOR_WAIT getShell addDisposeListener DisposeListener widgetDisposed DisposeEvent getHandCursor getHandCursor getBusyCursor getBusyCursor createDialogArea createTable createInfoArea GridData gridData GridData GridData GridData gridData heightHint convertVerticalDLUsToPixels TABLE_HEIGHT setLayoutData gridData
Create the info area containing the image and text protected void create Info Area Composite parent Font font parent get Font info Area new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 info Area set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH int info Area Height convert VerticalDL Us To Pixels INFO HEIGHT data height Hint info Area Height info Area set Layout Data data image Label new Label info Area SWT NONE data new Grid Data data horizontal Alignment Grid Data FILL data vertical Alignment Grid Data BEGINNING data height Hint 32 data width Hint 32 image Label set Layout Data data image Label set Font font text on the right text new Styled Text info Area SWT MULTI SWT READ ONLY text set Caret null text set Font parent get Font data new Grid Data data horizontal Alignment Grid Data FILL data vertical Alignment Grid Data BEGINNING data grab Excess Horizontal Space true data height Hint info Area Height text set Layout Data data text set Font font text set Cursor null text set Background info Area get Background add Listeners text Table Item items table get Selection if items length 0 update Info Area About Bundle Group Data items 0 get Data  createInfoArea getFont infoArea GridLayout GridLayout numColumns infoArea setLayout GridData GridData GridData FILL_BOTH infoAreaHeight convertVerticalDLUsToPixels INFO_HEIGHT heightHint infoAreaHeight infoArea setLayoutData imageLabel infoArea GridData horizontalAlignment GridData verticalAlignment GridData heightHint widthHint imageLabel setLayoutData imageLabel setFont StyledText infoArea READ_ONLY setCaret setFont getFont GridData horizontalAlignment GridData verticalAlignment GridData grabExcessHorizontalSpace heightHint infoAreaHeight setLayoutData setFont setCursor setBackground infoArea getBackground addListeners TableItem getSelection updateInfoArea AboutBundleGroupData getData
table add Selection Listener new Selection Adapter public void widget Selected Selection Event e About Bundle Group Data info About Bundle Group Data e item get Data update Info Area info update Buttons info  addSelectionListener SelectionAdapter widgetSelected SelectionEvent AboutBundleGroupData AboutBundleGroupData getData updateInfoArea updateButtons
final int column Index i table Column add Selection Listener new Selection Adapter public void widget Selected Selection Event e sort column Index  columnIndex tableColumn addSelectionListener SelectionAdapter widgetSelected SelectionEvent columnIndex
Create the table part of the dialog param parent the parent composite to contain the dialog area protected void create Table Composite parent table new Table parent SWT H SCROLL SWT V SCROLL SWT SINGLE SWT FULL SELECTION SWT BORDER table set Header Visible true table set Lines Visible true table set Font parent get Font table add Selection Listener new Selection Adapter public void widget Selected Selection Event e About Bundle Group Data info About Bundle Group Data e item get Data update Info Area info update Buttons info int column Widths convert HorizontalDL Us To Pixels 120 convert HorizontalDL Us To Pixels 120 convert HorizontalDL Us To Pixels 70 convert HorizontalDL Us To Pixels 130 for int i 0 i column Titles length i Table Column table Column new Table Column table SWT NULL table Column set Width column Widths i table Column set Text column Titles i final int column Index i table Column add Selection Listener new Selection Adapter public void widget Selected Selection Event e sort column Index create a table row for each bundle group String sel Id last Selection null null last Selection get Id int sel 0 for int i 0 i bundle Group Infos length i if bundle Group Infos i get Id equals sel Id sel i Table Item item new Table Item table SWT NULL item set Text create Row bundle Group Infos i item set Data bundle Group Infos i if an item was specified during construction it should be selected when the table is created if bundle Group Infos length 0 table set Selection sel table show Selection  createTable H_SCROLL V_SCROLL FULL_SELECTION setHeaderVisible setLinesVisible setFont getFont addSelectionListener SelectionAdapter widgetSelected SelectionEvent AboutBundleGroupData AboutBundleGroupData getData updateInfoArea updateButtons columnWidths convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels columnTitles TableColumn tableColumn TableColumn tableColumn setWidth columnWidths tableColumn setText columnTitles columnIndex tableColumn addSelectionListener SelectionAdapter widgetSelected SelectionEvent columnIndex selId lastSelection lastSelection getId bundleGroupInfos bundleGroupInfos getId selId TableItem TableItem setText createRow bundleGroupInfos setData bundleGroupInfos bundleGroupInfos setSelection showSelection
see Window close public boolean close boolean ret super close Iterator iter cached Images values iterator while iter has Next Image image Image iter next image dispose return ret  cachedImages hasNext
Update the button enablement private void update Buttons About Bundle Group Data info if info null more Button set Enabled false plugins Button set Enabled false return Creating the feature map is too much just to determine enablement so if it doesn t already exist just enable the buttons If this was the wrong choice then when the button is actually pressed an dialog will be opened if features Map null more Button set Enabled true plugins Button set Enabled true return more Button set Enabled info get License Url null plugins Button set Enabled true  updateButtons AboutBundleGroupData moreButton setEnabled pluginsButton setEnabled featuresMap moreButton setEnabled pluginsButton setEnabled moreButton setEnabled getLicenseUrl pluginsButton setEnabled
Update the info area private void update Info Area About Bundle Group Data info if info null image Label set Image null text set Text NON NLS 1 return Image Descriptor desc info get Feature Image Image image Image cached Images get desc if image null desc null image desc create Image cached Images put desc image image Label set Image image String about Text info get About Text set Item null if about Text null set Item scan about Text if get Item null text set Text Workbench Messages get String About Features Dialog no Information NON NLS 1 else text set Text get Item get Text text set Cursor null set Link Ranges text get Item get Link Ranges  updateInfoArea AboutBundleGroupData imageLabel setImage setText ImageDescriptor getFeatureImage cachedImages createImage cachedImages imageLabel setImage aboutText getAboutText setItem aboutText setItem aboutText getItem setText WorkbenchMessages getString AboutFeaturesDialog noInformation setText getItem getText setCursor setLinkRanges getItem getLinkRanges
Select the initial selection public void set Initial Selection About Bundle Group Data info last Selection info  setInitialSelection AboutBundleGroupData lastSelection
Sort the rows of the table based on the selected column param column index of table column selected as sort criteria private void sort int column if last Column Chosen column reverse Sort reverse Sort else reverse Sort false last Column Chosen column if table get Item Count 1 return Remember the last selection int sel table get Selection Index if sel 1 last Selection bundle Group Infos sel switch column case 0 About Data sort By Provider reverse Sort bundle Group Infos break case 1 About Data sort By Name reverse Sort bundle Group Infos break case 2 About Data sort By Version reverse Sort bundle Group Infos break case 3 About Data sort By Id reverse Sort bundle Group Infos break refresh Table column  lastColumnChosen reverseSort reverseSort reverseSort lastColumnChosen getItemCount getSelectionIndex lastSelection bundleGroupInfos AboutData sortByProvider reverseSort bundleGroupInfos AboutData sortByName reverseSort bundleGroupInfos AboutData sortByVersion reverseSort bundleGroupInfos AboutData sortById reverseSort bundleGroupInfos refreshTable
Refresh the rows of the table based on the selected column Maintain selection from before sort action request private void refresh Table int col Table Item items table get Items create new order of table items for int i 0 i items length i items i set Text create Row bundle Group Infos i items i set Data bundle Group Infos i Maintain the original selection int sel 1 if last Selection null String old Id last Selection get Id for int k 0 k bundle Group Infos length k if old Id equals Ignore Case bundle Group Infos k get Id sel k table set Selection sel table show Selection update Info Area last Selection  refreshTable TableItem getItems setText createRow bundleGroupInfos setData bundleGroupInfos lastSelection oldId lastSelection getId bundleGroupInfos oldId equalsIgnoreCase bundleGroupInfos getId setSelection showSelection updateInfoArea lastSelection
Return an array of strings containing the argument s information in the proper order for this table s columns param info the source information for the new row must not be null private static String create Row About Bundle Group Data info return new String info get Provider Name info get Name info get Version info get Id  createRow AboutBundleGroupData getProviderName getName getVersion getId

Constructor for About Plugins Dialog public About Plugins Dialog Shell parent Shell String product Name this parent Shell product Name Workbench Plugin get Default get Bundles null null I Help Context Ids ABOUT PLUGINS DIALOG  AboutPluginsDialog AboutPluginsDialog parentShell productName parentShell productName WorkbenchPlugin getDefault getBundles IHelpContextIds ABOUT_PLUGINS_DIALOG
Constructor for About Plugins Dialog param product Name must not be null param bundles must not be null public About Plugins Dialog Shell parent Shell String product Name Bundle bundles String title String message String help Context Id super parent Shell set Shell Style SWT DIALOG TRIM SWT RESIZE SWT MAX SWT APPLICATION MODAL this title title this message message this help Context Id help Context Id this product Name product Name create a data object for each bundle remove duplicates Map map new Hash Map for int i 0 i bundles length i About Bundle Data data new About Bundle Data bundles i if map contains Key data get Versioned Id map put data get Versioned Id data bundle Infos About Bundle Data map values to Array new About Bundle Data 0 About Data sort By Provider reverse Sort bundle Infos  AboutPluginsDialog productName AboutPluginsDialog parentShell productName helpContextId parentShell setShellStyle DIALOG_TRIM APPLICATION_MODAL helpContextId helpContextId productName productName HashMap AboutBundleData AboutBundleData containsKey getVersionedId getVersionedId bundleInfos AboutBundleData toArray AboutBundleData AboutData sortByProvider reverseSort bundleInfos
protected void button Pressed int button Id switch button Id case MORE ID handle More Info Pressed break default super button Pressed button Id break  buttonPressed buttonId buttonId MORE_ID handleMoreInfoPressed buttonPressed buttonId
protected void configure Shell Shell new Shell super configure Shell new Shell if title null product Name null title Workbench Messages format About Plugins Dialog shell Title NON NLS 1 new Object product Name if title null new Shell set Text title Workbench Help set Help new Shell help Context Id  configureShell newShell configureShell newShell productName WorkbenchMessages AboutPluginsDialog shellTitle productName newShell setText WorkbenchHelp setHelp newShell helpContextId
Add buttons to the dialog s button bar Subclasses should override param parent the button bar composite protected void create Buttons For Button Bar Composite parent parent set Layout Data new Grid Data Grid Data FILL HORIZONTAL more Info create Button parent MORE ID Workbench Messages get String About Plugins Dialog more Info false NON NLS 1 more Info set Enabled table Has Selection selection Has Info Label l new Label parent SWT NONE l set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout layout Grid Layout parent get Layout layout num Columns layout make Columns Equal Width false create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true  createButtonsForButtonBar setLayoutData GridData GridData FILL_HORIZONTAL moreInfo createButton MORE_ID WorkbenchMessages getString AboutPluginsDialog moreInfo moreInfo setEnabled tableHasSelection selectionHasInfo setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout getLayout numColumns makeColumnsEqualWidth createButton IDialogConstants OK_ID IDialogConstants OK_LABEL
Create the contents of the dialog above the button bar Subclasses should overide param parent the parent composite to contain the dialog area return the dialog area control protected Control create Dialog Area Composite parent Composite outer Composite super create Dialog Area parent if message null Label label new Label outer SWT NONE label set Layout Data new Grid Data Grid Data FILL HORIZONTAL label set Font parent get Font label set Text message create Table outer return outer  createDialogArea createDialogArea setLayoutData GridData GridData FILL_HORIZONTAL setFont getFont setText createTable
vendor Info add Selection Listener new Selection Adapter public void widget Selected Selection Event e enable if there is an item selected and that item has additional info more Info set Enabled e item null selection Has Info  vendorInfo addSelectionListener SelectionAdapter widgetSelected SelectionEvent moreInfo setEnabled selectionHasInfo
final int column Index i column add Selection Listener new Selection Adapter public void widget Selected Selection Event e sort column Index  columnIndex addSelectionListener SelectionAdapter widgetSelected SelectionEvent columnIndex
Create the table part of the dialog param parent the parent composite to contain the dialog area protected void create Table Composite parent vendor Info new Table parent SWT H SCROLL SWT V SCROLL SWT SINGLE SWT FULL SELECTION SWT BORDER vendor Info set Header Visible true vendor Info set Lines Visible true vendor Info set Font parent get Font vendor Info add Selection Listener new Selection Adapter public void widget Selected Selection Event e enable if there is an item selected and that item has additional info more Info set Enabled e item null selection Has Info int column Widths convert HorizontalDL Us To Pixels 120 convert HorizontalDL Us To Pixels 120 convert HorizontalDL Us To Pixels 70 convert HorizontalDL Us To Pixels 130 create table headers for int i 0 i column Titles length i Table Column column new Table Column vendor Info SWT NULL column set Width column Widths i column set Text column Titles i final int column Index i column add Selection Listener new Selection Adapter public void widget Selected Selection Event e sort column Index create a row for each member of the bundle Info array for int i 0 i bundle Infos length i Table Item item new Table Item vendor Info SWT NULL item set Text create Row bundle Infos i item set Data bundle Infos i Grid Data grid Data new Grid Data Grid Data FILL Grid Data FILL true true grid Data height Hint convert VerticalDL Us To Pixels TABLE HEIGHT vendor Info set Layout Data grid Data  createTable vendorInfo H_SCROLL V_SCROLL FULL_SELECTION vendorInfo setHeaderVisible vendorInfo setLinesVisible vendorInfo setFont getFont vendorInfo addSelectionListener SelectionAdapter widgetSelected SelectionEvent moreInfo setEnabled selectionHasInfo columnWidths convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels columnTitles TableColumn TableColumn vendorInfo setWidth columnWidths setText columnTitles columnIndex addSelectionListener SelectionAdapter widgetSelected SelectionEvent columnIndex bundleInfo bundleInfos TableItem TableItem vendorInfo setText createRow bundleInfos setData bundleInfos GridData gridData GridData GridData GridData gridData heightHint convertVerticalDLUsToPixels TABLE_HEIGHT vendorInfo setLayoutData gridData
Check if the currently selected plugin has additional information to show return true if the selected plugin has additional info available to display private boolean selection Has Info Table Item items vendor Info get Selection if items length 0 return false About Bundle Data bundle Info bundle Infos vendor Info get Selection Index URL infoURL Bundle Utility find bundle Info get Id PLUGININFO only report ini problems if the debug command line argument is used if infoURL null Workbench Plugin DEBUG Workbench Plugin log Problem reading plugin info for NON NLS 1 bundle Info get Name return infoURL null  selectionHasInfo TableItem vendorInfo getSelection AboutBundleData bundleInfo bundleInfos vendorInfo getSelectionIndex BundleUtility bundleInfo getId WorkbenchPlugin WorkbenchPlugin bundleInfo getName
Create the button to provide more info on the selected plugin return true if there is an item selected in the table false otherwise private boolean table Has Selection return vendor Info null false vendor Info get Selection Count 0  tableHasSelection vendorInfo vendorInfo getSelectionCount
The More Info button was pressed Open a browser showing the license information for the selected bundle or an error dialog if the browser cannot be opened protected void handle More Info Pressed if vendor Info null return Table Item items vendor Info get Selection if items length 0 return About Bundle Data bundle Info About Bundle Data items 0 get Data if bundle Info null return if open Browser Bundle Utility find bundle Info get Id PLUGININFO Message Dialog open Error get Shell Workbench Messages get String About Plugins Dialog error Title NON NLS 1 Workbench Messages format About Plugins Dialog unable To Open File NON NLS 1 new Object PLUGININFO bundle Info get Id  handleMoreInfoPressed vendorInfo TableItem vendorInfo getSelection AboutBundleData bundleInfo AboutBundleData getData bundleInfo openBrowser BundleUtility bundleInfo getId MessageDialog openError getShell WorkbenchMessages getString AboutPluginsDialog errorTitle WorkbenchMessages AboutPluginsDialog unableToOpenFile bundleInfo getId
Sort the rows of the table based on the selected column param column index of table column selected as sort criteria private void sort int column if last Column Chosen column reverse Sort reverse Sort else reverse Sort false last Column Chosen column if vendor Info get Item Count 1 return int sel vendor Info get Selection Index if sel 1 last Selection bundle Infos sel switch column case 0 About Data sort By Provider reverse Sort bundle Infos break case 1 About Data sort By Name reverse Sort bundle Infos break case 2 About Data sort By Version reverse Sort bundle Infos break case 3 About Data sort By Id reverse Sort bundle Infos break refresh Table column  lastColumnChosen reverseSort reverseSort reverseSort lastColumnChosen vendorInfo getItemCount vendorInfo getSelectionIndex lastSelection bundleInfos AboutData sortByProvider reverseSort bundleInfos AboutData sortByName reverseSort bundleInfos AboutData sortByVersion reverseSort bundleInfos AboutData sortById reverseSort bundleInfos refreshTable
Refresh the rows of the table based on the selected column Maintain selection from before sort action request private void refresh Table int col Table Item items vendor Info get Items create new order of table items for int i 0 i items length i items i set Text create Row bundle Infos i items i set Data bundle Infos i maintain the original selection int sel 1 if last Selection null String old Id last Selection get Id for int k 0 k bundle Infos length k if old Id equals Ignore Case bundle Infos k get Id sel k vendor Info set Selection sel vendor Info show Selection more Info set Enabled table Has Selection selection Has Info  refreshTable TableItem vendorInfo getItems setText createRow bundleInfos setData bundleInfos lastSelection oldId lastSelection getId bundleInfos oldId equalsIgnoreCase bundleInfos getId vendorInfo setSelection vendorInfo showSelection moreInfo setEnabled tableHasSelection selectionHasInfo
Return an array of strings containing the argument s information in the proper order for this table s columns param info the source information for the new row must not be null private static String create Row About Bundle Data info return new String info get Provider Name info get Name info get Version info get Id  createRow AboutBundleData getProviderName getName getVersion getId

private final static int BROWSE ERROR LOG BUTTON I Dialog Constants CLIENT ID public About System Dialog Shell parent Shell super parent Shell set Shell Style SWT DIALOG TRIM SWT RESIZE SWT MAX SWT APPLICATION MODAL  BROWSE_ERROR_LOG_BUTTON IDialogConstants CLIENT_ID AboutSystemDialog parentShell parentShell setShellStyle DIALOG_TRIM APPLICATION_MODAL
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text Workbench Messages get String System Summary title NON NLS 1 Workbench Help set Help new Shell I Help Context Ids SYSTEM SUMMARY DIALOG  configureShell newShell configureShell newShell newShell setText WorkbenchMessages getString SystemSummary WorkbenchHelp setHelp newShell IHelpContextIds SYSTEM_SUMMARY_DIALOG
protected void create Buttons For Button Bar Composite parent parent set Layout Data new Grid Data Grid Data FILL HORIZONTAL create Button parent BROWSE ERROR LOG BUTTON Workbench Messages get String About System Dialog browse Error Log Name false NON NLS 1 new Label parent SWT NONE set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout layout Grid Layout parent get Layout layout num Columns layout make Columns Equal Width false create Button parent I Dialog Constants CLOSE ID I Dialog Constants CLOSE LABEL true  createButtonsForButtonBar setLayoutData GridData GridData FILL_HORIZONTAL createButton BROWSE_ERROR_LOG_BUTTON WorkbenchMessages getString AboutSystemDialog browseErrorLogName setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout getLayout numColumns makeColumnsEqualWidth createButton IDialogConstants CLOSE_ID IDialogConstants CLOSE_LABEL
protected Control create Dialog Area Composite parent Composite outer Composite super create Dialog Area parent Text text new Text outer SWT MULTI SWT BORDER SWT READ ONLY SWT V SCROLL SWT NO FOCUS SWT H SCROLL text set Background parent get Display get System Color SWT COLOR LIST BACKGROUND Grid Data grid Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN FILL grid Data grab Excess Vertical Space true grid Data grab Excess Horizontal Space true grid Data height Hint convert VerticalDL Us To Pixels 300 grid Data width Hint convert HorizontalDL Us To Pixels 400 text set Layout Data grid Data text set Text get System Summary return outer  createDialogArea createDialogArea READ_ONLY V_SCROLL NO_FOCUS H_SCROLL setBackground getDisplay getSystemColor COLOR_LIST_BACKGROUND GridData gridData GridData GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_FILL gridData grabExcessVerticalSpace gridData grabExcessHorizontalSpace gridData heightHint convertVerticalDLUsToPixels gridData widthHint convertHorizontalDLUsToPixels setLayoutData gridData setText getSystemSummary
private String get System Summary String Writer out new String Writer Print Writer writer new Print Writer out writer println Workbench Messages format System Summary time Stamp new Object new Date NON NLS 1 append Extensions writer writer close return out to String  getSystemSummary StringWriter StringWriter PrintWriter PrintWriter WorkbenchMessages SystemSummary timeStamp appendExtensions toString
private void append Extensions Print Writer writer I Configuration Element config Elements get Sorted Extensions for int i 0 i config Elements length i I Configuration Element element config Elements i Object obj null try obj Workbench Plugin create Extension element I Workbench Constants TAG CLASS catch Core Exception e Workbench Plugin log could not create class attribute for extension NON NLS 1 e get Status writer println writer println Workbench Messages format System Summary section Title NON NLS 1 new Object element get Attribute section Title NON NLS 1 if obj instanceof I System Summary Section I System Summary Section log Section I System Summary Section obj log Section write writer else writer println Workbench Messages get String System Summary section Error NON NLS 1  appendExtensions PrintWriter IConfigurationElement configElements getSortedExtensions configElements IConfigurationElement configElements WorkbenchPlugin createExtension IWorkbenchConstants TAG_CLASS CoreException WorkbenchPlugin getStatus WorkbenchMessages SystemSummary sectionTitle getAttribute sectionTitle ISystemSummarySection ISystemSummarySection logSection ISystemSummarySection logSection WorkbenchMessages getString SystemSummary sectionError
Collator collator Collator get Instance Locale get Default public int compare Object a Object b I Configuration Element element1 I Configuration Element a I Configuration Element element2 I Configuration Element b String id1 element1 get Attribute id NON NLS 1 String id2 element2 get Attribute id NON NLS 1 if id1 null id2 null id1 equals id2 return collator compare id1 id2 String title1 element1 get Attribute section Title NON NLS 1 String title2 element2 get Attribute section Title NON NLS 1 if title1 null title1 NON NLS 1 if title2 null title2 NON NLS 1 return collator compare title1 title2  getInstance getDefault IConfigurationElement IConfigurationElement IConfigurationElement IConfigurationElement getAttribute getAttribute getAttribute sectionTitle getAttribute sectionTitle
private I Configuration Element get Sorted Extensions I Configuration Element config Elements Platform get Extension Registry get Configuration Elements For PlatformUI PLUGIN ID I Workbench Constants PL SYSTEM SUMMARY SECTIONS Arrays sort config Elements new Comparator Collator collator Collator get Instance Locale get Default public int compare Object a Object b I Configuration Element element1 I Configuration Element a I Configuration Element element2 I Configuration Element b String id1 element1 get Attribute id NON NLS 1 String id2 element2 get Attribute id NON NLS 1 if id1 null id2 null id1 equals id2 return collator compare id1 id2 String title1 element1 get Attribute section Title NON NLS 1 String title2 element2 get Attribute section Title NON NLS 1 if title1 null title1 NON NLS 1 if title2 null title2 NON NLS 1 return collator compare title1 title2 return config Elements  IConfigurationElement getSortedExtensions IConfigurationElement configElements getExtensionRegistry getConfigurationElementsFor PLUGIN_ID IWorkbenchConstants PL_SYSTEM_SUMMARY_SECTIONS configElements getInstance getDefault IConfigurationElement IConfigurationElement IConfigurationElement IConfigurationElement getAttribute getAttribute getAttribute sectionTitle getAttribute sectionTitle configElements
protected void button Pressed int button Id switch button Id case I Dialog Constants CLOSE ID close break case BROWSE ERROR LOG BUTTON open Error Log Browser break super button Pressed button Id  buttonPressed buttonId buttonId IDialogConstants CLOSE_ID BROWSE_ERROR_LOG_BUTTON openErrorLogBrowser buttonPressed buttonId
private void open Error Log Browser String filename Platform get Log File Location toOS String File log new File filename if log exists open Link filename return Message Dialog open Information get Shell Workbench Messages get String About System Dialog no Log Title NON NLS 1 Workbench Messages format About System Dialog no Log Message NON NLS 1 new String filename  openErrorLogBrowser getLogFileLocation toOSString openLink MessageDialog openInformation getShell WorkbenchMessages getString AboutSystemDialog noLogTitle WorkbenchMessages AboutSystemDialog noLogMessage

Retrieves the image descriptor from the given relative path The path is relative from the icons full directory param relative Path The relative path should not be code null code return The image descriptor if it can be found otherwise the missing image descriptor protected static Image Descriptor get Image Descriptor String relative Path String path icons full relative Path NON NLS 1 URL url Bundle Utility find PlatformUI PLUGIN ID path return url null Image Descriptor create FromURL url Image Descriptor get Missing Image Descriptor  relativePath ImageDescriptor getImageDescriptor relativePath relativePath BundleUtility PLUGIN_ID ImageDescriptor createFromURL ImageDescriptor getMissingImageDescriptor
Constructs a new instance of a preference import export page with the given name param name The name of the page to be constructed must not be code null code param export Wizard Whether this page should be opened in export mode protected Abstract Preference Import Export Page final String name final boolean export Wizard super name export export Wizard  exportWizard AbstractPreferenceImportExportPage exportWizard exportWizard
Computes the width hint for the given button The width hint is the maximum of the default width and the minimum width to display the button text param push Button The push button for which to compute the width hint return The width hint which should be a positive integer capable of displaying all the text in the button protected int compute Push Button Width Hint Button push Button final int default Width convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH final int minimum Width push Button compute Size SWT DEFAULT SWT DEFAULT true x return Math max default Width minimum Width 5  pushButton computePushButtonWidthHint pushButton defaultWidth convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH minimumWidth pushButton computeSize defaultWidth minimumWidth

Creates a new sorter public Action Set Sorter  ActionSetSorter
Returns a negative zero or positive number depending on whether the first element is less than equal to or greater than the second element public int compare Viewer viewer Object e1 Object e2 if e1 instanceof I Action Set Descriptor String str1 Dialog Util remove Accel I Action Set Descriptor e1 get Label String str2 Dialog Util remove Accel I Action Set Descriptor e2 get Label return collator compare str1 str2 else if e1 instanceof Action Set Category Action Set Category cat1 Action Set Category e1 Action Set Category cat2 Action Set Category e2 if cat1 get Id equals Action Set Registry OTHER CATEGORY return 1 if cat2 get Id equals Action Set Registry OTHER CATEGORY return 1 String str1 cat1 get Label String str2 cat2 get Label return collator compare str1 str2 return 0  IActionSetDescriptor DialogUtil removeAccel IActionSetDescriptor getLabel DialogUtil removeAccel IActionSetDescriptor getLabel ActionSetCategory ActionSetCategory ActionSetCategory ActionSetCategory ActionSetCategory getId ActionSetRegistry OTHER_CATEGORY getId ActionSetRegistry OTHER_CATEGORY getLabel getLabel

Create the prompt for activity enablement param composite the parent protected void create Activity Prompt Pref Composite composite activity Prompt Button new Button composite SWT CHECK activity Prompt Button set Text Activity Messages get String activity Prompt Button NON NLS 1 activity Prompt Button set Tool Tip Text Activity Messages get String activity Prompt Tool Tip NON NLS 1 activity Prompt Button set Font composite get Font set Activity Button State  createActivityPromptPref activityPromptButton activityPromptButton setText ActivityMessages getString activityPromptButton activityPromptButton setToolTipText ActivityMessages getString activityPromptToolTip activityPromptButton setFont getFont setActivityButtonState
Sets the state of the activity prompt button from preferences private void set Activity Button State activity Prompt Button set Selection get Preference Store get Boolean I Preference Constants SHOULD PROMPT FOR ENABLEMENT  setActivityButtonState activityPromptButton setSelection getPreferenceStore getBoolean IPreferenceConstants SHOULD_PROMPT_FOR_ENABLEMENT
protected Control create Contents Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 composite set Layout layout composite set Font parent get Font create Activity Prompt Pref composite Grid Data data new Grid Data Grid Data FILL HORIZONTAL activity Prompt Button set Layout Data data data new Grid Data Grid Data FILL BOTH enabler new Activity Enabler workbench get Activity Support enabler create Control composite set Layout Data data return composite  createContents GridLayout GridLayout marginHeight marginWidth setLayout setFont getFont createActivityPromptPref GridData GridData GridData FILL_HORIZONTAL activityPromptButton setLayoutData GridData GridData FILL_BOTH ActivityEnabler getActivitySupport createControl setLayoutData
see org eclipse ui I Workbench Preference Page init org eclipse ui I Workbench public void init I Workbench a Workbench this workbench a Workbench set Preference Store Workbench Plugin get Default get Preference Store  IWorkbenchPreferencePage IWorkbench IWorkbench aWorkbench aWorkbench setPreferenceStore WorkbenchPlugin getDefault getPreferenceStore
public boolean perform Ok enabler update Activity States get Preference Store set Value I Preference Constants SHOULD PROMPT FOR ENABLEMENT activity Prompt Button get Selection return true  performOk updateActivityStates getPreferenceStore setValue IPreferenceConstants SHOULD_PROMPT_FOR_ENABLEMENT activityPromptButton getSelection
protected void perform Defaults enabler restore Defaults activity Prompt Button set Selection get Preference Store get Default Boolean I Preference Constants SHOULD PROMPT FOR ENABLEMENT super perform Defaults  performDefaults restoreDefaults activityPromptButton setSelection getPreferenceStore getDefaultBoolean IPreferenceConstants SHOULD_PROMPT_FOR_ENABLEMENT performDefaults

Constructor for Container Checked Tree Viewer see Checkbox Tree Viewer Checkbox Tree Viewer Composite public Container Checked Tree Viewer Composite parent super parent init Viewer  ContainerCheckedTreeViewer CheckboxTreeViewer CheckboxTreeViewer ContainerCheckedTreeViewer initViewer
Constructor for Container Checked Tree Viewer see Checkbox Tree Viewer Checkbox Tree Viewer Composite int public Container Checked Tree Viewer Composite parent int style super parent style init Viewer  ContainerCheckedTreeViewer CheckboxTreeViewer CheckboxTreeViewer ContainerCheckedTreeViewer initViewer
Constructor for Container Checked Tree Viewer see Checkbox Tree Viewer Checkbox Tree Viewer Tree public Container Checked Tree Viewer Tree tree super tree init Viewer  ContainerCheckedTreeViewer CheckboxTreeViewer CheckboxTreeViewer ContainerCheckedTreeViewer initViewer
set Use Hashlookup true add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event do Check State Changed event get Element  setUseHashlookup addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent doCheckStateChanged getElement
add Tree Listener new I Tree Viewer Listener public void tree Collapsed Tree Expansion Event event  addTreeListener ITreeViewerListener treeCollapsed TreeExpansionEvent
public void tree Expanded Tree Expansion Event event Widget item find Item event get Element if item instanceof Tree Item initialize Item Tree Item item  treeExpanded TreeExpansionEvent findItem getElement TreeItem initializeItem TreeItem
private void init Viewer set Use Hashlookup true add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event do Check State Changed event get Element add Tree Listener new I Tree Viewer Listener public void tree Collapsed Tree Expansion Event event public void tree Expanded Tree Expansion Event event Widget item find Item event get Element if item instanceof Tree Item initialize Item Tree Item item  initViewer setUseHashlookup addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent doCheckStateChanged getElement addTreeListener ITreeViewerListener treeCollapsed TreeExpansionEvent treeExpanded TreeExpansionEvent findItem getElement TreeItem initializeItem TreeItem
protected void do Check State Changed Object element Widget item find Item element if item instanceof Tree Item Tree Item tree Item Tree Item item tree Item set Grayed false update Children Items tree Item update Parent Items tree Item get Parent Item  doCheckStateChanged findItem TreeItem TreeItem treeItem TreeItem treeItem setGrayed updateChildrenItems treeItem updateParentItems treeItem getParentItem
The item has expanded Updates the checked state of its children private void initialize Item Tree Item item if item get Checked item get Grayed update Children Items Tree Item item  initializeItem TreeItem getChecked getGrayed updateChildrenItems TreeItem
Updates the check state of all created children private void update Children Items Tree Item parent Item children get Children parent boolean state parent get Checked for int i 0 i children length i Tree Item curr Tree Item children i if curr get Data null curr get Checked state curr get Grayed curr set Checked state curr set Grayed false update Children Items curr  updateChildrenItems TreeItem getChildren getChecked TreeItem TreeItem getData getChecked getGrayed setChecked setGrayed updateChildrenItems
Updates the check gray state of all parent items private void update Parent Items Tree Item item if item null Item children get Children item boolean contains Checked false boolean contains Unchecked false for int i 0 i children length i Tree Item curr Tree Item children i contains Checked curr get Checked contains Unchecked curr get Checked curr get Grayed item set Checked contains Checked item set Grayed contains Checked contains Unchecked update Parent Items item get Parent Item  updateParentItems TreeItem getChildren containsChecked containsUnchecked TreeItem TreeItem containsChecked getChecked containsUnchecked getChecked getGrayed setChecked containsChecked setGrayed containsChecked containsUnchecked updateParentItems getParentItem
public boolean set Checked Object element boolean state if super set Checked element state do Check State Changed element return true return false  setChecked setChecked doCheckStateChanged
public void set Checked Elements Object elements super set Checked Elements elements for int i 0 i elements length i do Check State Changed elements i  setCheckedElements setCheckedElements doCheckStateChanged
protected void set Expanded Item item boolean expand super set Expanded item expand if expand item instanceof Tree Item initialize Item Tree Item item  setExpanded setExpanded TreeItem initializeItem TreeItem
public Object get Checked Elements Object checked super get Checked Elements add all items that are children of a checked node but not created yet Array List result new Array List for int i 0 i checked length i Object curr checked i result add curr Widget item find Item curr if item null Item children get Children item check if contains the dummy node if children length 1 children 0 get Data null not yet created collect Children curr result return result to Array  getCheckedElements getCheckedElements ArrayList ArrayList findItem getChildren getData collectChildren toArray
private void collect Children Object element Array List result Object filtered Children get Filtered Children element for int i 0 i filtered Children length i Object curr filtered Children i result add curr collect Children curr result  collectChildren ArrayList filteredChildren getFilteredChildren filteredChildren filteredChildren collectChildren

private final static int TOOLITEM 1 private Action Set Display Item  ActionSetDisplayItem
private Action Set Display Item Action Set Display Item String id this null id MENUITEM NON NLS 1  ActionSetDisplayItem ActionSetDisplayItem
private Action Set Display Item Action Set Display Item parent String id String text int type if parent null parent children add this this parent parent this id id this type type this text remove Shortcut text this text Dialog Util remove Accel this text  ActionSetDisplayItem ActionSetDisplayItem removeShortcut DialogUtil removeAccel
private Action Set Display Item find String item Id for int i 0 i children size i Action Set Display Item child Action Set Display Item children get i if item Id equals child id return child return null  ActionSetDisplayItem itemId ActionSetDisplayItem ActionSetDisplayItem itemId
public void fill Menus For String action Set Id I Contribution Item item if item instanceof Contribution Manager Contribution Manager mgr Contribution Manager item I Contribution Item items mgr get Items for int i 0 i items length i I Contribution Item mgr Item items i if mgr Item instanceof Action Set Contribution Item Action Set Contribution Item action Set Item Action Set Contribution Item mgr Item if action Set Item get Action Set Id equals action Set Id I Contribution Item inner Item action Set Item get Inner Item if inner Item instanceof Menu Manager Menu Manager inner Menu Manager action Set Item get Inner Item Action Set Display Item node new Action Set Display Item this inner get Id inner get Menu Text MENUITEM node fill Menus For action Set Id inner else if inner Item instanceof Action Set Menu Manager Action Set Menu Manager inner Action Set Menu Manager action Set Item get Inner Item Menu Manager parent Mgr Menu Manager inner get Parent Action Set Display Item node new Action Set Display Item this inner get Id parent Mgr get Menu Text MENUITEM node fill Menus For action Set Id parent Mgr else if inner Item instanceof Plugin Action Contribution Item Plugin Action Contribution Item inner Plugin Action Contribution Item action Set Item get Inner Item Action Set Display Item node new Action Set Display Item this inner get Id inner get Action get Text MENUITEM I Action action inner get Action if action null node image Descriptor action get Image Descriptor node description action get Description else if mgr Item instanceof Menu Manager Menu Manager menu Mgr Menu Manager mgr Item boolean found contains Action Set menu Mgr action Set Id if found Action Set Display Item node new Action Set Display Item this menu Mgr get Id menu Mgr get Menu Text MENUITEM node fill Menus For action Set Id menu Mgr  fillMenusFor actionSetId IContributionItem ContributionManager ContributionManager ContributionManager IContributionItem getItems IContributionItem mgrItem mgrItem ActionSetContributionItem ActionSetContributionItem actionSetItem ActionSetContributionItem mgrItem actionSetItem getActionSetId actionSetId IContributionItem innerItem actionSetItem getInnerItem innerItem MenuManager MenuManager MenuManager actionSetItem getInnerItem ActionSetDisplayItem ActionSetDisplayItem getId getMenuText fillMenusFor actionSetId innerItem ActionSetMenuManager ActionSetMenuManager ActionSetMenuManager actionSetItem getInnerItem MenuManager parentMgr MenuManager getParent ActionSetDisplayItem ActionSetDisplayItem getId parentMgr getMenuText fillMenusFor actionSetId parentMgr innerItem PluginActionContributionItem PluginActionContributionItem PluginActionContributionItem actionSetItem getInnerItem ActionSetDisplayItem ActionSetDisplayItem getId getAction getText IAction getAction imageDescriptor getImageDescriptor getDescription mgrItem MenuManager MenuManager menuMgr MenuManager mgrItem containsActionSet menuMgr actionSetId ActionSetDisplayItem ActionSetDisplayItem menuMgr getId menuMgr getMenuText fillMenusFor actionSetId menuMgr
public void fill Tools For String action Set Id Cool Bar Manager mgr I Contribution Item items mgr get Items for int i 0 i items length i if items i instanceof Tool Bar Contribution Item Tool Bar Contribution Item cb Item Tool Bar Contribution Item items i I Contribution Item sub Items cb Item get Tool Bar Manager get Items for int j 0 j sub Items length j I Contribution Item sub Item sub Items j if sub Item instanceof Plugin Action Cool Bar Contribution Item Plugin Action Cool Bar Contribution Item action Item Plugin Action Cool Bar Contribution Item sub Item if action Item get Action Set Id equals action Set Id String toolbar Id cb Item get Id Action Set Display Item toolbar find toolbar Id if toolbar null String toolbar Text window get Toolbar Label toolbar Id toolbar new Action Set Display Item this toolbar Id toolbar Text TOOLITEM I Action action action Item get Action String tool Item Text action get Tool Tip Text if tool Item Text null tool Item Text action get Text Action Set Display Item tool Item new Action Set Display Item toolbar action get Id tool Item Text TOOLITEM tool Item image Descriptor action get Image Descriptor tool Item description action get Description  fillToolsFor actionSetId CoolBarManager IContributionItem getItems ToolBarContributionItem ToolBarContributionItem cbItem ToolBarContributionItem IContributionItem subItems cbItem getToolBarManager getItems subItems IContributionItem subItem subItems subItem PluginActionCoolBarContributionItem PluginActionCoolBarContributionItem actionItem PluginActionCoolBarContributionItem subItem actionItem getActionSetId actionSetId toolbarId cbItem getId ActionSetDisplayItem toolbarId toolbarText getToolbarLabel toolbarId ActionSetDisplayItem toolbarId toolbarText IAction actionItem getAction toolItemText getToolTipText toolItemText toolItemText getText ActionSetDisplayItem toolItem ActionSetDisplayItem getId toolItemText toolItem imageDescriptor getImageDescriptor toolItem getDescription
int get Depth if parent null return 0 else return parent get Depth 1  getDepth getDepth
String get Display Text if type MENUITEM if children size 0 if parent id equals Root NON NLS 1 return Workbench Messages format Action Set Selection menubar Location new Object text NON NLS 1 return text else if children size 0 return Workbench Messages format Action Set Selection toolbar Location new Object text NON NLS 1 else return text  getDisplayText WorkbenchMessages ActionSetSelection menubarLocation WorkbenchMessages ActionSetSelection toolbarLocation
Array List get Elements Array List elements new Array List for int i 0 i children size i Action Set Display Item child Action Set Display Item children get i elements add child elements add All child get Elements return elements  ArrayList getElements ArrayList ArrayList ActionSetDisplayItem ActionSetDisplayItem addAll getElements
return elements protected boolean is Top Level Menu if parent null return false return parent parent null  isTopLevelMenu
Cool Bar Manager cool Bar Manager public Customize Action Bars  CoolBarManager coolBarManager CustomizeActionBars
public Customize Action Bars Menu Manager menu Manager Cool Bar Manager cool Bar Manager this menu Manager menu Manager this cool Bar Manager cool Bar Manager  CustomizeActionBars MenuManager menuManager CoolBarManager coolBarManager menuManager menuManager coolBarManager coolBarManager
see org eclipse ui application I Action Bar Configurer get Menu Manager public I Menu Manager get Menu Manager return menu Manager  IActionBarConfigurer getMenuManager IMenuManager getMenuManager menuManager
see org eclipse ui application I Action Bar Configurer get Status Line Manager public I Status Line Manager get Status Line Manager return null  IActionBarConfigurer getStatusLineManager IStatusLineManager getStatusLineManager
see org eclipse ui internal Abstract Action Bar Configurer get Cool Bar Manager public I Cool Bar Manager get Cool Bar Manager return cool Bar Manager  AbstractActionBarConfigurer getCoolBarManager ICoolBarManager getCoolBarManager coolBarManager
see org eclipse ui I Action Bars get Tool Bar Manager public I Tool Bar Manager get Tool Bar Manager return null  IActionBars getToolBarManager IToolBarManager getToolBarManager
public void set Global Action Handler String actionID I Action handler  setGlobalActionHandler IAction
public void set Global Action Handler String actionID I Action handler public void update Action Bars  setGlobalActionHandler IAction updateActionBars
see org eclipse ui I Action Bars clear Global Action Handlers public void clear Global Action Handlers  IActionBars clearGlobalActionHandlers clearGlobalActionHandlers
see org eclipse ui I Action Bars get Global Action Handler java lang String public I Action get Global Action Handler String action Id return null  IActionBars getGlobalActionHandler IAction getGlobalActionHandler actionId
see org eclipse ui application I Action Bar Configurer register Global Action org eclipse jface action I Action public void register Global Action I Action action  IActionBarConfigurer registerGlobalAction IAction registerGlobalAction IAction
class Shortcut Menu Item Content Provider implements I Structured Content Provider Shortcut Menu Item Content Provider  ShortcutMenuItemContentProvider IStructuredContentProvider ShortcutMenuItemContentProvider
public Object get Elements Object input if input instanceof Shortcut Menu return Shortcut Menu input get Items to Array return new Object 0  getElements ShortcutMenu ShortcutMenu getItems toArray
return new Object 0 public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
public void input Changed Viewer viewer Object old Input Object new Input public void dispose  inputChanged oldInput newInput
private final static int COLUMN DESCRIPTION 1 Shortcut Menu Item Label Provider  COLUMN_DESCRIPTION ShortcutMenuItemLabelProvider
public final void dispose for Iterator i image Table values iterator i has Next Image i next dispose image Table null  imageTable hasNext imageTable
public Image get Column Image Object element int index if index COLUMN ID return null Image Descriptor descriptor null if element instanceof I Perspective Descriptor descriptor I Perspective Descriptor element get Image Descriptor else if element instanceof I View Descriptor descriptor I View Descriptor element get Image Descriptor else if element instanceof Workbench Wizard Element descriptor Workbench Wizard Element element get Image Descriptor if descriptor null return null obtain the cached image corresponding to the descriptor if image Table null image Table new Hashtable 40 Image image Image image Table get descriptor if image null image descriptor create Image image Table put descriptor image return image  getColumnImage COLUMN_ID ImageDescriptor IPerspectiveDescriptor IPerspectiveDescriptor getImageDescriptor IViewDescriptor IViewDescriptor getImageDescriptor WorkbenchWizardElement WorkbenchWizardElement getImageDescriptor imageTable imageTable imageTable createImage imageTable
public String get Column Text Object element int column Index String text null switch column Index case COLUMN ID text get Text element break case COLUMN DESCRIPTION if element instanceof I Perspective Descriptor text I Perspective Descriptor element get Description else if element instanceof I View Descriptor text I View Descriptor element get Description else if element instanceof Workbench Wizard Element text Workbench Wizard Element element get Description break if text null text NON NLS 1 return text  getColumnText columnIndex columnIndex COLUMN_ID getText COLUMN_DESCRIPTION IPerspectiveDescriptor IPerspectiveDescriptor getDescription IViewDescriptor IViewDescriptor getDescription WorkbenchWizardElement WorkbenchWizardElement getDescription
public String get Text Object element String text null if element instanceof I Perspective Descriptor text I Perspective Descriptor element get Label else if element instanceof I View Descriptor text I View Descriptor element get Label else if element instanceof Workbench Wizard Element text Workbench Wizard Element element get Label element if text null text NON NLS 1 return text  getText IPerspectiveDescriptor IPerspectiveDescriptor getLabel IViewDescriptor IViewDescriptor getLabel WorkbenchWizardElement WorkbenchWizardElement getLabel
Shortcut Menu Shortcut Menu parent String id String label super this id id this parent parent this label remove Shortcut label this label Dialog Util remove Accel this label if parent null parent children add this  ShortcutMenu ShortcutMenu removeShortcut DialogUtil removeAccel
if parent null parent children add this void add Item Object item items add item  addItem
items add item void add Checked Item Object item checked Items add item  addCheckedItem checkedItems
checked Items add item public String to String return label  checkedItems toString
return label Array List get Checked Items return checked Items  ArrayList getCheckedItems checkedItems
Array List get Checked Item Ids Array List ids new Array List if get Menu Id ID PERSP for int i 0 i checked Items size i I Perspective Descriptor item I Perspective Descriptor checked Items get i ids add item get Id else if get Menu Id ID VIEW for int i 0 i checked Items size i I View Descriptor item I View Descriptor checked Items get i ids add item get Id else if get Menu Id ID WIZARD for int i 0 i checked Items size i Workbench Wizard Element item Workbench Wizard Element checked Items get i ids add item getID for int i 0 i children size i Shortcut Menu menu Shortcut Menu children get i ids add All menu get Checked Item Ids return ids  ArrayList getCheckedItemIds ArrayList ArrayList getMenuId ID_PERSP checkedItems IPerspectiveDescriptor IPerspectiveDescriptor checkedItems getId getMenuId ID_VIEW checkedItems IViewDescriptor IViewDescriptor checkedItems getId getMenuId ID_WIZARD checkedItems WorkbenchWizardElement WorkbenchWizardElement checkedItems ShortcutMenu ShortcutMenu addAll getCheckedItemIds
return ids Array List get Children return children  ArrayList getChildren
return children Array List get Items return items  ArrayList getItems
return items private String get Menu Id if parent root Menu return id else return parent get Menu Id  getMenuId rootMenu getMenuId
Array List get Subtree Items Array List subtree Items new Array List subtree Items add this for int i 0 i children size i Shortcut Menu child Shortcut Menu children get i subtree Items add All child get Subtree Items return subtree Items  ArrayList getSubtreeItems ArrayList subtreeItems ArrayList subtreeItems ShortcutMenu ShortcutMenu subtreeItems addAll getSubtreeItems subtreeItems
Object get Item String menu Item Id for int i 0 i items size i Object item items get i String item Id null if id ID PERSP item Id I Perspective Descriptor item get Id else if id ID VIEW item Id I View Descriptor item get Id else if id ID WIZARD item Id Workbench Wizard Element item getID if menu Item Id equals item Id return item return null  getItem menuItemId itemId ID_PERSP itemId IPerspectiveDescriptor getId ID_VIEW itemId IViewDescriptor getId ID_WIZARD itemId WorkbenchWizardElement menuItemId itemId
boolean is Fully Checked if get Items size get Checked Items size return false for int i 0 i children size i Shortcut Menu child Shortcut Menu children get i if child is Fully Checked return false return true  isFullyChecked getItems getCheckedItems ShortcutMenu ShortcutMenu isFullyChecked
boolean is Fully Unchecked if get Checked Items size 0 return false for int i 0 i children size i Shortcut Menu child Shortcut Menu children get i if child is Fully Unchecked return false return true  isFullyUnchecked getCheckedItems ShortcutMenu ShortcutMenu isFullyUnchecked
return true void remove Checked Item Object item checked Items remove item  removeCheckedItem checkedItems
void checked boolean checked checked Items new Array List if checked checked Items add All items for int i 0 i children size i Shortcut Menu child Shortcut Menu children get i child checked checked  checkedItems ArrayList checkedItems addAll ShortcutMenu ShortcutMenu
class Tree Content Provider implements I Tree Content Provider public void dispose  TreeContentProvider ITreeContentProvider
public Object get Children Object element if element instanceof Action Set Display Item Action Set Display Item node Action Set Display Item element return node children to Array else if element instanceof Shortcut Menu Shortcut Menu node Shortcut Menu element return node children to Array return null  getChildren ActionSetDisplayItem ActionSetDisplayItem ActionSetDisplayItem toArray ShortcutMenu ShortcutMenu ShortcutMenu toArray
return null public Object get Elements Object element return get Children element  getElements getChildren
public Object get Parent Object element if element instanceof Action Set Display Item Action Set Display Item node Action Set Display Item element return node parent else if element instanceof Shortcut Menu Shortcut Menu node Shortcut Menu element return node parent return null  getParent ActionSetDisplayItem ActionSetDisplayItem ActionSetDisplayItem ShortcutMenu ShortcutMenu ShortcutMenu
public boolean has Children Object element if element instanceof Action Set Display Item Action Set Display Item node Action Set Display Item element return node children size 0 else if element instanceof Shortcut Menu Shortcut Menu node Shortcut Menu element return node children size 0 return false  hasChildren ActionSetDisplayItem ActionSetDisplayItem ActionSetDisplayItem ShortcutMenu ShortcutMenu ShortcutMenu
return false public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
private Map image Table new Hashtable public void dispose for Iterator i image Table values iterator i has Next Image i next dispose image Table null  imageTable imageTable hasNext imageTable
public Image get Column Image Object element int column Action Set Display Item item Action Set Display Item element Image Descriptor descriptor item image Descriptor if descriptor null if item type Action Set Display Item MENUITEM if item children size 0 if item is Top Level Menu descriptor menu Image Descriptor else descriptor submenu Image Descriptor else return null else if item type Action Set Display Item TOOLITEM if item children size 0 descriptor toolbar Image Descriptor else return null else return null obtain the cached image corresponding to the descriptor if image Table null image Table new Hashtable 40 Image image Image image Table get descriptor if image null image descriptor create Image image Table put descriptor image return image  getColumnImage ActionSetDisplayItem ActionSetDisplayItem ImageDescriptor imageDescriptor ActionSetDisplayItem isTopLevelMenu menuImageDescriptor submenuImageDescriptor ActionSetDisplayItem toolbarImageDescriptor imageTable imageTable imageTable createImage imageTable
public String get Column Text Object element int column if element instanceof Action Set Display Item Action Set Display Item item Action Set Display Item element String text item get Display Text if item type Action Set Display Item MENUITEM item children size 0 text text NON NLS 1 return text return NON NLS 1  getColumnText ActionSetDisplayItem ActionSetDisplayItem ActionSetDisplayItem getDisplayText ActionSetDisplayItem
public int get Indent Object element if element instanceof Action Set Display Item int depth Action Set Display Item element get Depth depth depth 1 return depth return 0  getIndent ActionSetDisplayItem ActionSetDisplayItem getDepth
public Customize Perspective Dialog Shell parent Shell Perspective persp super parent Shell perspective persp issue should pass in the parent window not use get Active Workbench Window window Workbench Window PlatformUI get Workbench get Active Workbench Window build a structure for the menuitems and toolitems that the workbench contributes customize Workbench Action Bars new Customize Action Bars new Menu Manager new Cool Bar Manager Fill current action Bars in the fake workbench actionbars window fill Action Bars customize Workbench Action Bars Workbench Advisor FILL PROXY Workbench Advisor FILL MENU BAR Workbench Advisor FILL COOL BAR initialize Action Set Input initialize Shortcut Menu Input  CustomizePerspectiveDialog parentShell parentShell getActiveWorkbenchWindow WorkbenchWindow getWorkbench getActiveWorkbenchWindow customizeWorkbenchActionBars CustomizeActionBars MenuManager CoolBarManager actionBars fillActionBars customizeWorkbenchActionBars WorkbenchAdvisor FILL_PROXY WorkbenchAdvisor FILL_MENU_BAR WorkbenchAdvisor FILL_COOL_BAR initializeActionSetInput initializeShortcutMenuInput
private void add Action Sets Listeners tab Folder add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Tab Selected event  addActionSetsListeners tabFolder addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleTabSelected
action Sets Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Action Set Selected event  actionSetsViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleActionSetSelected
action Sets Viewer get Control add Key Listener new Key Listener public void key Pressed Key Event e handle Action Set Viewer Key Pressed e  actionSetsViewer getControl addKeyListener KeyListener keyPressed KeyEvent handleActionSetViewerKeyPressed
handle Action Set Viewer Key Pressed e public void key Released Key Event e  handleActionSetViewerKeyPressed keyReleased KeyEvent
action Set Menu Viewer get Control add Key Listener new Key Listener public void key Pressed Key Event e handle Action Set Menu Viewer Key Pressed e  actionSetMenuViewer getControl addKeyListener KeyListener keyPressed KeyEvent handleActionSetMenuViewerKeyPressed
handle Action Set Menu Viewer Key Pressed e public void key Released Key Event e  handleActionSetMenuViewerKeyPressed keyReleased KeyEvent
action Set Toolbar Viewer get Control add Key Listener new Key Listener public void key Pressed Key Event e handle Action Set Toolbar Viewer Key Pressed e  actionSetToolbarViewer getControl addKeyListener KeyListener keyPressed KeyEvent handleActionSetToolbarViewerKeyPressed
handle Action Set Toolbar Viewer Key Pressed e public void key Released Key Event e  handleActionSetToolbarViewerKeyPressed keyReleased KeyEvent
Adds listeners for the Commands tab since 3 0 private void add Action Sets Listeners tab Folder add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Tab Selected event action Sets Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Action Set Selected event action Sets Viewer get Control add Key Listener new Key Listener public void key Pressed Key Event e handle Action Set Viewer Key Pressed e public void key Released Key Event e action Set Menu Viewer get Control add Key Listener new Key Listener public void key Pressed Key Event e handle Action Set Menu Viewer Key Pressed e public void key Released Key Event e action Set Toolbar Viewer get Control add Key Listener new Key Listener public void key Pressed Key Event e handle Action Set Toolbar Viewer Key Pressed e public void key Released Key Event e  addActionSetsListeners tabFolder addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleTabSelected actionSetsViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleActionSetSelected actionSetsViewer getControl addKeyListener KeyListener keyPressed KeyEvent handleActionSetViewerKeyPressed keyReleased KeyEvent actionSetMenuViewer getControl addKeyListener KeyListener keyPressed KeyEvent handleActionSetMenuViewerKeyPressed keyReleased KeyEvent actionSetToolbarViewer getControl addKeyListener KeyListener keyPressed KeyEvent handleActionSetToolbarViewerKeyPressed keyReleased KeyEvent
private void add Shortcut Listeners menus Combo add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  addShortcutListeners menusCombo addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
do nothing public void widget Selected Selection Event e handle Menu Selected e  widgetSelected SelectionEvent handleMenuSelected
menus Combo add Modify Listener new Modify Listener public void modify Text Modify Event e handle Menu Modified e  menusCombo addModifyListener ModifyListener modifyText ModifyEvent handleMenuModified
menu Categories Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Menu Category Selected event  menuCategoriesViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleMenuCategorySelected
menu Categories Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event handle Menu Category Checked event  menuCategoriesViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent handleMenuCategoryChecked
menu Items Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event handle Menu Item Checked event  menuItemsViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent handleMenuItemChecked
Adds listeners for the Shortcuts tab since 3 0 private void add Shortcut Listeners menus Combo add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e handle Menu Selected e menus Combo add Modify Listener new Modify Listener public void modify Text Modify Event e handle Menu Modified e menu Categories Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Menu Category Selected event menu Categories Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event handle Menu Category Checked event menu Items Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event handle Menu Item Checked event  addShortcutListeners menusCombo addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent handleMenuSelected menusCombo addModifyListener ModifyListener modifyText ModifyEvent handleMenuModified menuCategoriesViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleMenuCategorySelected menuCategoriesViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent handleMenuCategoryChecked menuItemsViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent handleMenuItemChecked
private void build Menus And Toolbars For Action Set Descriptor action Set Desc String id action Set Desc get Id Action Set Action Bars bars new Action Set Action Bars customize Workbench Action Bars id Plugin Action Set Builder builder new Plugin Action Set Builder Plugin Action Set action Set null try action Set Plugin Action Set action Set Desc create Action Set action Set init null bars catch Core Exception ex Workbench Plugin log Unable to create action set action Set Desc get Id NON NLS 1 return builder build Menu And Tool Bar Structure action Set window  buildMenusAndToolbarsFor ActionSetDescriptor actionSetDesc actionSetDesc getId ActionSetActionBars ActionSetActionBars customizeWorkbenchActionBars PluginActionSetBuilder PluginActionSetBuilder PluginActionSet actionSet actionSet PluginActionSet actionSetDesc createActionSet actionSet CoreException WorkbenchPlugin actionSetDesc getId buildMenuAndToolBarStructure actionSet
private void check Initial Action Set Selections Check off the action sets that are active for the perspective I Action Set Descriptor action Set Descriptors perspective get Action Sets if action Sets null for int i 0 i action Set Descriptors length i action Sets Viewer set Checked action Set Descriptors i true  checkInitialActionSetSelections IActionSetDescriptor actionSetDescriptors getActionSets actionSets actionSetDescriptors actionSetsViewer setChecked actionSetDescriptors
private void check Initial Menu Category Selections Shortcut Menu menu Check off the shortcut categories that are active for the perspective if menu children size 0 update Menu Category Checked State menu else for int i 0 i menu children size i Shortcut Menu child Shortcut Menu menu children get i check Initial Menu Category Selections child  checkInitialMenuCategorySelections ShortcutMenu updateMenuCategoryCheckedState ShortcutMenu ShortcutMenu checkInitialMenuCategorySelections
public boolean close if show Shortcut Tab last Selected Menu Index menus Combo get Selection Index last Selected Tab tab Folder get Selection Index Structured Selection selection Structured Selection action Sets Viewer get Selection if selection is Empty last Selected Action Set Id null else last Selected Action Set Id Action Set Descriptor selection get First Element get Id customize Workbench Action Bars cool Bar Manager dispose customize Workbench Action Bars menu Manager dispose return super close  showShortcutTab lastSelectedMenuIndex menusCombo getSelectionIndex lastSelectedTab tabFolder getSelectionIndex StructuredSelection StructuredSelection actionSetsViewer getSelection isEmpty lastSelectedActionSetId lastSelectedActionSetId ActionSetDescriptor getFirstElement getId customizeWorkbenchActionBars coolBarManager customizeWorkbenchActionBars menuManager
protected void configure Shell Shell shell super configure Shell shell shell set Text Workbench Messages get String Action Set Selection customize NON NLS 1 Workbench Help set Help shell I Help Context Ids ACTION SET SELECTION DIALOG  configureShell configureShell setText WorkbenchMessages getString ActionSetSelection WorkbenchHelp setHelp IHelpContextIds ACTION_SET_SELECTION_DIALOG
boolean contains Action Set Menu Manager mgr String action Set Id Return whether or not the given menu Manager contains items for the given action Set Id I Contribution Item menu Items mgr get Items for int j 0 j menu Items length j I Contribution Item menu Item menu Items j if menu Item instanceof Action Set Contribution Item Action Set Contribution Item action Set Item Action Set Contribution Item menu Item if action Set Item get Action Set Id equals action Set Id return true else if menu Item instanceof Menu Manager Menu Manager child Mgr Menu Manager menu Item boolean found contains Action Set child Mgr action Set Id if found return true return false  containsActionSet MenuManager actionSetId menuManager actionSetId IContributionItem menuItems getItems menuItems IContributionItem menuItem menuItems menuItem ActionSetContributionItem ActionSetContributionItem actionSetItem ActionSetContributionItem menuItem actionSetItem getActionSetId actionSetId menuItem MenuManager MenuManager childMgr MenuManager menuItem containsActionSet childMgr actionSetId
private Composite create Action Sets Page Composite parent Grid Data data Font font parent get Font Composite action Sets Composite new Composite parent SWT NONE Grid Layout layout new Grid Layout action Sets Composite set Layout layout data new Grid Data Grid Data FILL BOTH action Sets Composite set Layout Data data Select label Label label new Label action Sets Composite SWT WRAP label set Text Workbench Messages format Action Set Selection select Action Sets Label new Object perspective get Desc get Label NON NLS 1 data new Grid Data Grid Data FILL BOTH data width Hint TABLES WIDTH label set Layout Data data Label sep new Label action Sets Composite SWT HORIZONTAL SWT SEPARATOR data new Grid Data Grid Data FILL HORIZONTAL sep set Layout Data data Sash Form sash Composite new Sash Form action Sets Composite SWT HORIZONTAL data new Grid Data Grid Data FILL BOTH data height Hint TABLE HEIGHT data width Hint TABLES WIDTH sash Composite set Layout Data data Action Set List Composite Composite action Set Group new Composite sash Composite SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 action Set Group set Layout layout data new Grid Data Grid Data FILL BOTH action Set Group set Layout Data data label new Label action Set Group SWT NONE label set Text Workbench Messages get String Action Set Selection available Action Sets NON NLS 1 action Sets Viewer Checkbox Table Viewer new Check List action Set Group SWT BORDER SWT H SCROLL SWT V SCROLL data new Grid Data Grid Data FILL BOTH action Sets Viewer get Table set Layout Data data action Sets Viewer get Table set Font font action Sets Viewer set Label Provider new Workbench Label Provider action Sets Viewer set Content Provider new List Content Provider action Sets Viewer set Sorter new Action Set Sorter Action list Group Composite action Item Group new Composite sash Composite SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 layout horizontal Spacing 5 action Item Group set Layout layout data new Grid Data Grid Data FILL BOTH action Item Group set Layout Data data Composite action Group new Composite action Item Group SWT NULL layout new Grid Layout layout num Columns 2 layout make Columns Equal Width true layout margin Height 0 layout margin Width 0 layout horizontal Spacing 0 action Group set Layout layout data new Grid Data Grid Data FILL BOTH action Group set Layout Data data label new Label action Group SWT NONE label set Text Workbench Messages get String Action Set Selection menubar Actions NON NLS 1 label set Font font label new Label action Group SWT NONE label set Text Workbench Messages get String Action Set Selection toolbar Actions NON NLS 1 label set Font font action Set Menu Viewer new Indented Table Viewer action Group data new Grid Data Grid Data FILL BOTH action Set Menu Viewer get Control set Layout Data data action Set Menu Viewer set Label Provider new Indented Table Label Provider action Set Menu Viewer set Content Provider new List Content Provider action Set Toolbar Viewer new Indented Table Viewer action Group data new Grid Data Grid Data FILL BOTH action Set Toolbar Viewer get Control set Layout Data data action Set Toolbar Viewer set Label Provider new Indented Table Label Provider action Set Toolbar Viewer set Content Provider new List Content Provider sash Composite set Weights new int 30 70 Use F2 label label new Label action Sets Composite SWT WRAP label set Text Workbench Messages get String Action Set Selection select Action Sets Help NON NLS 1 label set Font font data new Grid Data data width Hint TABLES WIDTH label set Layout Data data return action Sets Composite  createActionSetsPage GridData getFont actionSetsComposite GridLayout GridLayout actionSetsComposite setLayout GridData GridData FILL_BOTH actionSetsComposite setLayoutData actionSetsComposite setText WorkbenchMessages ActionSetSelection selectActionSetsLabel getDesc getLabel GridData GridData FILL_BOTH widthHint TABLES_WIDTH setLayoutData actionSetsComposite GridData GridData FILL_HORIZONTAL setLayoutData SashForm sashComposite SashForm actionSetsComposite GridData GridData FILL_BOTH heightHint TABLE_HEIGHT widthHint TABLES_WIDTH sashComposite setLayoutData actionSetGroup sashComposite GridLayout marginHeight marginWidth actionSetGroup setLayout GridData GridData FILL_BOTH actionSetGroup setLayoutData actionSetGroup setText WorkbenchMessages getString ActionSetSelection availableActionSets actionSetsViewer CheckboxTableViewer newCheckList actionSetGroup H_SCROLL V_SCROLL GridData GridData FILL_BOTH actionSetsViewer getTable setLayoutData actionSetsViewer getTable setFont actionSetsViewer setLabelProvider WorkbenchLabelProvider actionSetsViewer setContentProvider ListContentProvider actionSetsViewer setSorter ActionSetSorter actionItemGroup sashComposite GridLayout marginHeight marginWidth horizontalSpacing actionItemGroup setLayout GridData GridData FILL_BOTH actionItemGroup setLayoutData actionGroup actionItemGroup GridLayout numColumns makeColumnsEqualWidth marginHeight marginWidth horizontalSpacing actionGroup setLayout GridData GridData FILL_BOTH actionGroup setLayoutData actionGroup setText WorkbenchMessages getString ActionSetSelection menubarActions setFont actionGroup setText WorkbenchMessages getString ActionSetSelection toolbarActions setFont actionSetMenuViewer IndentedTableViewer actionGroup GridData GridData FILL_BOTH actionSetMenuViewer getControl setLayoutData actionSetMenuViewer setLabelProvider IndentedTableLabelProvider actionSetMenuViewer setContentProvider ListContentProvider actionSetToolbarViewer IndentedTableViewer actionGroup GridData GridData FILL_BOTH actionSetToolbarViewer getControl setLayoutData actionSetToolbarViewer setLabelProvider IndentedTableLabelProvider actionSetToolbarViewer setContentProvider ListContentProvider sashComposite setWeights actionSetsComposite setText WorkbenchMessages getString ActionSetSelection selectActionSetsHelp setFont GridData widthHint TABLES_WIDTH setLayoutData actionSetsComposite
Returns whether the shortcut tab should be shown return code true code if the shortcut tab should be shown and code false code otherwise since 3 0 private boolean show Shortcut Tab return window contains Submenu Workbench Window NEW WIZARD SUBMENU window contains Submenu Workbench Window OPEN PERSPECTIVE SUBMENU window contains Submenu Workbench Window SHOW VIEW SUBMENU  showShortcutTab containsSubmenu WorkbenchWindow NEW_WIZARD_SUBMENU containsSubmenu WorkbenchWindow OPEN_PERSPECTIVE_SUBMENU containsSubmenu WorkbenchWindow SHOW_VIEW_SUBMENU
protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent tab folder tab Folder new Tab Folder composite SWT NONE Grid Data gd new Grid Data Grid Data FILL BOTH tab Folder set Layout Data gd Shortcuts tab if show Shortcut Tab Tab Item item1 new Tab Item tab Folder SWT NONE item1 set Text Workbench Messages get String Action Set Selection menu Tab NON NLS 1 item1 set Control create Menus Page tab Folder add Shortcut Listeners Array List children root Menu get Children String item Names new String children size for int i 0 i children size i item Names i Shortcut Menu children get i label menus Combo set Items item Names Commands tab Tab Item item new Tab Item tab Folder SWT NONE item set Text Workbench Messages get String Action Set Selection action Sets Tab NON NLS 1 item set Control create Action Sets Page tab Folder add Action Sets Listeners action Sets Viewer set Input action Sets check Initial Action Set Selections now that both tabs are set up initialize selections set Initial Selections return composite  createDialogArea createDialogArea tabFolder TabFolder GridData GridData GridData FILL_BOTH tabFolder setLayoutData showShortcutTab TabItem TabItem tabFolder setText WorkbenchMessages getString ActionSetSelection menuTab setControl createMenusPage tabFolder addShortcutListeners ArrayList rootMenu getChildren itemNames itemNames ShortcutMenu menusCombo setItems itemNames TabItem TabItem tabFolder setText WorkbenchMessages getString ActionSetSelection actionSetsTab setControl createActionSetsPage tabFolder addActionSetsListeners actionSetsViewer setInput actionSets checkInitialActionSetSelections setInitialSelections
private Composite create Menus Page Composite parent Grid Data data Font font parent get Font Composite menus Composite new Composite parent SWT NONE Grid Layout layout new Grid Layout menus Composite set Layout layout data new Grid Data Grid Data FILL BOTH menus Composite set Layout Data data Select label Label label new Label menus Composite SWT WRAP label set Text Workbench Messages format Action Set Selection select Menus Label new Object perspective get Desc get Label NON NLS 1 label set Font font data new Grid Data data width Hint TABLES WIDTH label set Layout Data data Label sep new Label menus Composite SWT HORIZONTAL SWT SEPARATOR data new Grid Data Grid Data FILL HORIZONTAL sep set Layout Data data Sash Form sash Composite new Sash Form menus Composite SWT HORIZONTAL data new Grid Data Grid Data FILL BOTH data height Hint TABLE HEIGHT data width Hint TABLES WIDTH sash Composite set Layout Data data Menus List Composite menus Group new Composite sash Composite SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 menus Group set Layout layout data new Grid Data Grid Data FILL BOTH menus Group set Layout Data data menus Group set Font font label new Label menus Group SWT NONE label set Text Workbench Messages get String Action Set Selection available Menus NON NLS 1 label set Font font menus Combo new Combo menus Group SWT READ ONLY menus Combo set Font font Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL menus Combo set Layout Data grid Data Categories Tree label new Label menus Group SWT NONE label set Text Workbench Messages get String Action Set Selection available Categories NON NLS 1 label set Font font menu Categories Viewer new Checkbox Tree Viewer menus Group data new Grid Data Grid Data FILL BOTH menu Categories Viewer get Control set Layout Data data menu Categories Viewer set Label Provider new Label Provider menu Categories Viewer set Content Provider new Tree Content Provider menu Categories Viewer set Sorter new Workbench Viewer Sorter Menu items list Composite menu Items Group new Composite sash Composite SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 menu Items Group set Layout layout data new Grid Data Grid Data FILL BOTH menu Items Group set Layout Data data menu Items Group set Font font label new Label menu Items Group SWT NONE label set Text Workbench Messages get String Action Set Selection menu Items NON NLS 1 label set Font font menu Items Viewer Checkbox Table Viewer new Check List menu Items Group SWT BORDER SWT H SCROLL SWT V SCROLL data new Grid Data Grid Data FILL BOTH Table menu Table menu Items Viewer get Table menu Table set Layout Data data menu Table set Font font menu Items Viewer set Label Provider new Shortcut Menu Item Label Provider menu Items Viewer set Content Provider new Shortcut Menu Item Content Provider menu Items Viewer set Sorter new Workbench Viewer Sorter menu Table set Header Visible true int column Widths new int shortcut Menu Column Widths length for int i 0 i shortcut Menu Column Widths length i column Widths i convert HorizontalDL Us To Pixels shortcut Menu Column Widths i for int i 0 i shortcut Menu Column Headers length i Table Column tc new Table Column menu Table SWT NONE i tc set Resizable true tc set Text shortcut Menu Column Headers i tc set Width column Widths i sash Composite set Weights new int 30 70 return menus Composite  createMenusPage GridData getFont menusComposite GridLayout GridLayout menusComposite setLayout GridData GridData FILL_BOTH menusComposite setLayoutData menusComposite setText WorkbenchMessages ActionSetSelection selectMenusLabel getDesc getLabel setFont GridData widthHint TABLES_WIDTH setLayoutData menusComposite GridData GridData FILL_HORIZONTAL setLayoutData SashForm sashComposite SashForm menusComposite GridData GridData FILL_BOTH heightHint TABLE_HEIGHT widthHint TABLES_WIDTH sashComposite setLayoutData menusGroup sashComposite GridLayout marginHeight marginWidth menusGroup setLayout GridData GridData FILL_BOTH menusGroup setLayoutData menusGroup setFont menusGroup setText WorkbenchMessages getString ActionSetSelection availableMenus setFont menusCombo menusGroup READ_ONLY menusCombo setFont GridData gridData GridData GridData FILL_HORIZONTAL menusCombo setLayoutData gridData menusGroup setText WorkbenchMessages getString ActionSetSelection availableCategories setFont menuCategoriesViewer CheckboxTreeViewer menusGroup GridData GridData FILL_BOTH menuCategoriesViewer getControl setLayoutData menuCategoriesViewer setLabelProvider LabelProvider menuCategoriesViewer setContentProvider TreeContentProvider menuCategoriesViewer setSorter WorkbenchViewerSorter menuItemsGroup sashComposite GridLayout marginHeight marginWidth menuItemsGroup setLayout GridData GridData FILL_BOTH menuItemsGroup setLayoutData menuItemsGroup setFont menuItemsGroup setText WorkbenchMessages getString ActionSetSelection menuItems setFont menuItemsViewer CheckboxTableViewer newCheckList menuItemsGroup H_SCROLL V_SCROLL GridData GridData FILL_BOTH menuTable menuItemsViewer getTable menuTable setLayoutData menuTable setFont menuItemsViewer setLabelProvider ShortcutMenuItemLabelProvider menuItemsViewer setContentProvider ShortcutMenuItemContentProvider menuItemsViewer setSorter WorkbenchViewerSorter menuTable setHeaderVisible columnWidths shortcutMenuColumnWidths shortcutMenuColumnWidths columnWidths convertHorizontalDLUsToPixels shortcutMenuColumnWidths shortcutMenuColumnHeaders TableColumn TableColumn menuTable setResizable setText shortcutMenuColumnHeaders setWidth columnWidths sashComposite setWeights menusComposite
void handle Action Set Menu Viewer Key Pressed Key Event event popup the description for the selected action set menu item if event key Code SWT F2 event state Mask 0 I Structured Selection sel I Structured Selection action Set Menu Viewer get Selection Action Set Display Item element Action Set Display Item sel get First Element if element null String desc element description if desc null desc equals NON NLS 1 desc Workbench Messages get String Action Set Selection no Desc NON NLS 1 pop Up desc  handleActionSetMenuViewerKeyPressed KeyEvent keyCode stateMask IStructuredSelection IStructuredSelection actionSetMenuViewer getSelection ActionSetDisplayItem ActionSetDisplayItem getFirstElement WorkbenchMessages getString ActionSetSelection noDesc popUp
void handle Action Set Selected Selection Changed Event event I Structured Selection sel I Structured Selection event get Selection Action Set Descriptor element Action Set Descriptor sel get First Element if element selected Action Set return String action Set Id element get Id Hash table is used to cache previous selections Array List structures Array List action Set Structures get action Set Id Action Set Display Item menubar Structure null Action Set Display Item toolbar Structure null If the actionset has never been selected then we need to populate the structures if structures null structures new Array List 2 menubar Structure new Action Set Display Item Menubar NON NLS 1 toolbar Structure new Action Set Display Item Toolbar NON NLS 1 Menu Manager window Menu Mgr window get Menu Manager Cool Bar Manager window Cool Bar Manager window get Cool Bar Manager Update internal structure window Cool Bar Manager refresh if contains Action Set window Menu Mgr action Set Id if the action set is active we can use the workbench menu and coolbar managers to figure out the action set structure menubar Structure fill Menus For action Set Id window Menu Mgr toolbar Structure fill Tools For action Set Id window Cool Bar Manager else The action set is not active so build the menus and toolbars for it using our fake action bars build Menus And Toolbars For element menubar Structure fill Menus For action Set Id customize Workbench Action Bars menu Manager toolbar Structure fill Tools For action Set Id customize Workbench Action Bars cool Bar Manager Add menubar Structure and toolbar Structure to array List structures add menubar Structure structures add toolbar Structure Add the structure to the hash table with key action Set Id action Set Structures put action Set Id structures retrieve the actionsets from the arraylist if menubar Structure null menubar Structure Action Set Display Item structures get 0 if toolbar Structure null toolbar Structure Action Set Display Item structures get 1 fill the menu structure table if element action Set Menu Viewer get Input try action Set Menu Viewer get Control set Redraw false action Set Menu Viewer set Input menubar Structure get Elements if menubar Structure children size 0 action Set Menu Viewer reveal menubar Structure children get 0 finally action Set Menu Viewer get Control set Redraw true fill the toolbar structure table if element action Set Toolbar Viewer get Input try action Set Toolbar Viewer get Control set Redraw false action Set Toolbar Viewer set Input toolbar Structure get Elements if toolbar Structure children size 0 action Set Toolbar Viewer reveal toolbar Structure children get 0 finally action Set Toolbar Viewer get Control set Redraw true selected Action Set element  handleActionSetSelected SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection ActionSetDescriptor ActionSetDescriptor getFirstElement selectedActionSet actionSetId getId ArrayList ArrayList actionSetStructures actionSetId ActionSetDisplayItem menubarStructure ActionSetDisplayItem toolbarStructure ArrayList menubarStructure ActionSetDisplayItem toolbarStructure ActionSetDisplayItem MenuManager windowMenuMgr getMenuManager CoolBarManager windowCoolBarManager getCoolBarManager windowCoolBarManager containsActionSet windowMenuMgr actionSetId menubarStructure fillMenusFor actionSetId windowMenuMgr toolbarStructure fillToolsFor actionSetId windowCoolBarManager buildMenusAndToolbarsFor menubarStructure fillMenusFor actionSetId customizeWorkbenchActionBars menuManager toolbarStructure fillToolsFor actionSetId customizeWorkbenchActionBars coolBarManager menubarStructure toolbarStructure arrayList menubarStructure toolbarStructure actionSetId actionSetStructures actionSetId menubarStructure menubarStructure ActionSetDisplayItem toolbarStructure toolbarStructure ActionSetDisplayItem actionSetMenuViewer getInput actionSetMenuViewer getControl setRedraw actionSetMenuViewer setInput menubarStructure getElements menubarStructure actionSetMenuViewer menubarStructure actionSetMenuViewer getControl setRedraw actionSetToolbarViewer getInput actionSetToolbarViewer getControl setRedraw actionSetToolbarViewer setInput toolbarStructure getElements toolbarStructure actionSetToolbarViewer toolbarStructure actionSetToolbarViewer getControl setRedraw selectedActionSet
void handle Action Set Toolbar Viewer Key Pressed Key Event event popup the description for the selected action set toolbar item if event key Code SWT F2 event state Mask 0 I Structured Selection sel I Structured Selection action Set Toolbar Viewer get Selection Action Set Display Item element Action Set Display Item sel get First Element if element null String desc element description if desc null desc equals NON NLS 1 desc Workbench Messages get String Action Set Selection no Desc NON NLS 1 pop Up desc  handleActionSetToolbarViewerKeyPressed KeyEvent keyCode stateMask IStructuredSelection IStructuredSelection actionSetToolbarViewer getSelection ActionSetDisplayItem ActionSetDisplayItem getFirstElement WorkbenchMessages getString ActionSetSelection noDesc popUp
void handle Action Set Viewer Key Pressed Key Event event popup the description for the selected action set if event key Code SWT F2 event state Mask 0 I Structured Selection sel I Structured Selection action Sets Viewer get Selection Action Set Descriptor element Action Set Descriptor sel get First Element if element null String desc element get Description if desc null desc equals NON NLS 1 desc Workbench Messages get String Action Set Selection no Desc NON NLS 1 pop Up desc  handleActionSetViewerKeyPressed KeyEvent keyCode stateMask IStructuredSelection IStructuredSelection actionSetsViewer getSelection ActionSetDescriptor ActionSetDescriptor getFirstElement getDescription WorkbenchMessages getString ActionSetSelection noDesc popUp
void handle Menu Category Checked Check State Changed Event event Shortcut Menu checked Category Shortcut Menu event get Element boolean checked event get Checked checked Category checked checked check uncheck the element s category subtree menu Categories Viewer set Subtree Checked checked Category checked set gray state of the element s category subtree all items should not be grayed Array List subtree checked Category get Subtree Items Shortcut Menu menu Item Input Shortcut Menu menu Items Viewer get Input for int i 0 i subtree size i Object child subtree get i menu Categories Viewer set Grayed child false if child menu Item Input menu Items Viewer set All Checked checked menu Categories Viewer set Grayed checked Category false update Menu Category Checked State checked Category parent  handleMenuCategoryChecked CheckStateChangedEvent ShortcutMenu checkedCategory ShortcutMenu getElement getChecked checkedCategory menuCategoriesViewer setSubtreeChecked checkedCategory ArrayList checkedCategory getSubtreeItems ShortcutMenu menuItemInput ShortcutMenu menuItemsViewer getInput menuCategoriesViewer setGrayed menuItemInput menuItemsViewer setAllChecked menuCategoriesViewer setGrayed checkedCategory updateMenuCategoryCheckedState checkedCategory
void handle Menu Category Selected Selection Changed Event event I Structured Selection sel I Structured Selection event get Selection Shortcut Menu element Shortcut Menu sel get First Element if element selected Menu Category return if element menu Items Viewer get Input menu Items Viewer set Input element if element null menu Items Viewer set Checked Elements element get Checked Items to Array  handleMenuCategorySelected SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection ShortcutMenu ShortcutMenu getFirstElement selectedMenuCategory menuItemsViewer getInput menuItemsViewer setInput menuItemsViewer setCheckedElements getCheckedItems toArray
void handle Menu Item Checked Check State Changed Event event Shortcut Menu selected Menu Shortcut Menu menu Items Viewer get Input boolean item Checked event get Checked Object item event get Element if item Checked selected Menu add Checked Item item else selected Menu remove Checked Item item update Menu Category Checked State selected Menu  handleMenuItemChecked CheckStateChangedEvent ShortcutMenu selectedMenu ShortcutMenu menuItemsViewer getInput itemChecked getChecked getElement itemChecked selectedMenu addCheckedItem selectedMenu removeCheckedItem updateMenuCategoryCheckedState selectedMenu
void handle Menu Modified Modify Event event String text menus Combo get Text String items menus Combo get Items int item Index 1 for int i 0 i items length i if items i equals text item Index i break if item Index 1 return Shortcut Menu element Shortcut Menu root Menu children get item Index handle Menu Selected element  handleMenuModified ModifyEvent menusCombo getText menusCombo getItems itemIndex itemIndex itemIndex ShortcutMenu ShortcutMenu rootMenu itemIndex handleMenuSelected
void handle Menu Selected Selection Event event int i menus Combo get Selection Index Shortcut Menu element Shortcut Menu root Menu children get i handle Menu Selected element  handleMenuSelected SelectionEvent menusCombo getSelectionIndex ShortcutMenu ShortcutMenu rootMenu handleMenuSelected
void handle Menu Selected Shortcut Menu element if element menu Categories Viewer get Input menu Categories Viewer set Input element menu Categories Viewer expand All if element null if element get Children size 0 Structured Selection sel new Structured Selection element get Children get 0 menu Categories Viewer set Selection sel true else menu Items Viewer set Input element menu Items Viewer set Checked Elements element get Checked Items to Array else menu Categories Viewer set Input element menu Items Viewer set Input element check Initial Menu Category Selections root Menu  handleMenuSelected ShortcutMenu menuCategoriesViewer getInput menuCategoriesViewer setInput menuCategoriesViewer expandAll getChildren StructuredSelection StructuredSelection getChildren menuCategoriesViewer setSelection menuItemsViewer setInput menuItemsViewer setCheckedElements getCheckedItems toArray menuCategoriesViewer setInput menuItemsViewer setInput checkInitialMenuCategorySelections rootMenu
void handle Tab Selected Selection Event event Tab Item item Tab Item event item Control control item get Control if control null control set Focus  handleTabSelected SelectionEvent TabItem TabItem getControl setFocus
private void initialize Action Set Input Just get the action sets at this point Do not load the action set until it is actually selected in the dialog Action Set Registry reg Workbench Plugin get Default get Action Set Registry I Action Set Descriptor sets reg get Action Sets for int i 0 i sets length i Action Set Descriptor action Set Desc Action Set Descriptor sets i if Workbench Activity Helper filter Item action Set Desc continue action Sets add action Set Desc String icon Path icons full obj16 menu gif NON NLS 1 URL url Bundle Utility find PlatformUI PLUGIN ID icon Path menu Image Descriptor Image Descriptor create FromURL url icon Path icons full obj16 submenu gif NON NLS 1 url Bundle Utility find PlatformUI PLUGIN ID icon Path submenu Image Descriptor Image Descriptor create FromURL url icon Path icons full obj16 toolbar gif NON NLS 1 url Bundle Utility find PlatformUI PLUGIN ID icon Path toolbar Image Descriptor Image Descriptor create FromURL url  initializeActionSetInput ActionSetRegistry WorkbenchPlugin getDefault getActionSetRegistry IActionSetDescriptor getActionSets ActionSetDescriptor actionSetDesc ActionSetDescriptor WorkbenchActivityHelper filterItem actionSetDesc actionSets actionSetDesc iconPath BundleUtility PLUGIN_ID iconPath menuImageDescriptor ImageDescriptor createFromURL iconPath BundleUtility PLUGIN_ID iconPath submenuImageDescriptor ImageDescriptor createFromURL iconPath BundleUtility PLUGIN_ID iconPath toolbarImageDescriptor ImageDescriptor createFromURL
private void initialize Short Cut Menu Shortcut Menu menu Wizard Collection Element element Array List active Ids Shortcut Menu category new Shortcut Menu menu element get Id element get Label element Object wizards element get Wizards for int i 0 i wizards length i Workbench Wizard Element wizard Workbench Wizard Element wizards i category add Item wizard if active Ids contains wizard getID category add Checked Item wizard issue should not pass in null Object children element get Children null for int i 0 i children length i initialize Short Cut Menu category Wizard Collection Element children i active Ids  initializeShortCutMenu ShortcutMenu WizardCollectionElement ArrayList activeIds ShortcutMenu ShortcutMenu getId getLabel getWizards WorkbenchWizardElement WorkbenchWizardElement addItem activeIds addCheckedItem getChildren initializeShortCutMenu WizardCollectionElement activeIds
private void initialize Shortcut Menu Input root Menu new Shortcut Menu null Root NON NLS 1 NON NLS 2 Array List active Ids if window contains Submenu Workbench Window NEW WIZARD SUBMENU Shortcut Menu wizard Menu new Shortcut Menu root Menu Shortcut Menu ID WIZARD Workbench Messages get String Action Set Dialog Input wizard Category NON NLS 1 New Wizards Registry Reader rdr new New Wizards Registry Reader Wizard Collection Element wizard Collection rdr get Wizard Elements issue should not pass in null Object wizard Categories wizard Collection get Children null active Ids perspective get New Wizard Action Ids for int i 0 i wizard Categories length i Wizard Collection Element element Wizard Collection Element wizard Categories i if Workbench Activity Helper filter Item element continue initialize Short Cut Menu wizard Menu element active Ids if window contains Submenu Workbench Window OPEN PERSPECTIVE SUBMENU Shortcut Menu persp Menu new Shortcut Menu root Menu Shortcut Menu ID PERSP Workbench Messages get String Action Set Dialog Input perspective Category NON NLS 1 I Perspective Registry persp Reg Workbench Plugin get Default get Perspective Registry I Perspective Descriptor persps persp Reg get Perspectives for int i 0 i persps length i if Workbench Activity Helper filter Item persps i continue persp Menu add Item persps i active Ids perspective get Perspective Action Ids for int i 0 i active Ids size i String id String active Ids get i Object item persp Menu get Item id if item null persp Menu add Checked Item item if window contains Submenu Workbench Window SHOW VIEW SUBMENU Shortcut Menu view Menu new Shortcut Menu root Menu Shortcut Menu ID VIEW Workbench Messages get String Action Set Dialog Input view Category NON NLS 1 I View Registry view Reg Workbench Plugin get Default get View Registry Category categories view Reg get Categories active Ids perspective get Show View Action Ids for int i 0 i categories length i Category category categories i if Workbench Activity Helper filter Item category continue Shortcut Menu view Category new Shortcut Menu view Menu category get Id category get Label Array List views category get Elements if views null for int j 0 j views size j I View Descriptor view I View Descriptor views get j if view getID equals I Intro Constants INTRO VIEW ID continue if Workbench Activity Helper filter Item view continue view Category add Item view if active Ids contains view get Id view Category add Checked Item view  initializeShortcutMenuInput rootMenu ShortcutMenu ArrayList activeIds containsSubmenu WorkbenchWindow NEW_WIZARD_SUBMENU ShortcutMenu wizardMenu ShortcutMenu rootMenu ShortcutMenu ID_WIZARD WorkbenchMessages getString ActionSetDialogInput wizardCategory NewWizardsRegistryReader NewWizardsRegistryReader WizardCollectionElement wizardCollection getWizardElements wizardCategories wizardCollection getChildren activeIds getNewWizardActionIds wizardCategories WizardCollectionElement WizardCollectionElement wizardCategories WorkbenchActivityHelper filterItem initializeShortCutMenu wizardMenu activeIds containsSubmenu WorkbenchWindow OPEN_PERSPECTIVE_SUBMENU ShortcutMenu perspMenu ShortcutMenu rootMenu ShortcutMenu ID_PERSP WorkbenchMessages getString ActionSetDialogInput perspectiveCategory IPerspectiveRegistry perspReg WorkbenchPlugin getDefault getPerspectiveRegistry IPerspectiveDescriptor perspReg getPerspectives WorkbenchActivityHelper filterItem perspMenu addItem activeIds getPerspectiveActionIds activeIds activeIds perspMenu getItem perspMenu addCheckedItem containsSubmenu WorkbenchWindow SHOW_VIEW_SUBMENU ShortcutMenu viewMenu ShortcutMenu rootMenu ShortcutMenu ID_VIEW WorkbenchMessages getString ActionSetDialogInput viewCategory IViewRegistry viewReg WorkbenchPlugin getDefault getViewRegistry viewReg getCategories activeIds getShowViewActionIds WorkbenchActivityHelper filterItem ShortcutMenu viewCategory ShortcutMenu viewMenu getId getLabel ArrayList getElements IViewDescriptor IViewDescriptor IIntroConstants INTRO_VIEW_ID WorkbenchActivityHelper filterItem viewCategory addItem activeIds getId viewCategory addCheckedItem
protected void ok Pressed if show Shortcut Tab Array List menus root Menu children for int i 0 i menus size i Shortcut Menu menu Shortcut Menu menus get i if Shortcut Menu ID VIEW equals menu id perspective set Show View Action Ids menu get Checked Item Ids else if Shortcut Menu ID PERSP equals menu id perspective set Perspective Action Ids menu get Checked Item Ids else if Shortcut Menu ID WIZARD equals menu id perspective set New Wizard Action Ids menu get Checked Item Ids Array List action Set List new Array List Object selected action Sets Viewer get Checked Elements for int i 0 i selected length i Object obj selected i action Set List add obj I Action Set Descriptor action Set Array new I Action Set Descriptor action Set List size action Set Array I Action Set Descriptor action Set List to Array action Set Array perspective set Action Sets action Set Array super ok Pressed  okPressed showShortcutTab ArrayList rootMenu ShortcutMenu ShortcutMenu ShortcutMenu ID_VIEW setShowViewActionIds getCheckedItemIds ShortcutMenu ID_PERSP setPerspectiveActionIds getCheckedItemIds ShortcutMenu ID_WIZARD setNewWizardActionIds getCheckedItemIds ArrayList actionSetList ArrayList actionSetsViewer getCheckedElements actionSetList IActionSetDescriptor actionSetArray IActionSetDescriptor actionSetList actionSetArray IActionSetDescriptor actionSetList toArray actionSetArray setActionSets actionSetArray okPressed
inset Composite set Layout Data data inset Composite add Focus Listener new Focus Listener public void focus Lost Focus Event e desc Shell dispose  insetComposite setLayoutData insetComposite addFocusListener FocusListener focusLost FocusEvent descShell
desc Shell dispose public void focus Gained Focus Event e  descShell focusGained FocusEvent
inset Composite add Key Listener new Key Listener public void key Pressed Key Event e desc Shell dispose  insetComposite addKeyListener KeyListener keyPressed KeyEvent descShell
desc Shell dispose public void key Released Key Event e  descShell keyReleased KeyEvent
see org eclipse swt events Shell Listener shell Activated org eclipse swt events Shell Event public void shell Activated Shell Event e Do nothing  ShellListener shellActivated ShellEvent shellActivated ShellEvent
see org eclipse swt events Shell Listener shell Closed org eclipse swt events Shell Event public void shell Closed Shell Event e Do nothing  ShellListener shellClosed ShellEvent shellClosed ShellEvent
see org eclipse swt events Shell Listener shell Deactivated org eclipse swt events Shell Event public void shell Deactivated Shell Event e desc Shell dispose  ShellListener shellDeactivated ShellEvent shellDeactivated ShellEvent descShell
see org eclipse swt events Shell Listener shell Deiconified org eclipse swt events Shell Event public void shell Deiconified Shell Event e Do nothing  ShellListener shellDeiconified ShellEvent shellDeiconified ShellEvent
see org eclipse swt events Shell Listener shell Iconified org eclipse swt events Shell Event public void shell Iconified Shell Event e desc Shell dispose  ShellListener shellIconified ShellEvent shellIconified ShellEvent descShell
private void pop Up String description Display display get Shell get Display final Shell desc Shell new Shell get Shell SWT ON TOP SWT NO TRIM Grid Layout layout new Grid Layout layout margin Height 1 layout margin Width 1 desc Shell set Layout layout desc Shell set Background display get System Color SWT COLOR BLACK Composite inset Composite new Composite desc Shell SWT NULL inset Composite set Background display get System Color SWT COLOR INFO BACKGROUND layout new Grid Layout layout margin Height 2 layout margin Width 2 inset Composite set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH inset Composite set Layout Data data inset Composite add Focus Listener new Focus Listener public void focus Lost Focus Event e desc Shell dispose public void focus Gained Focus Event e inset Composite add Key Listener new Key Listener public void key Pressed Key Event e desc Shell dispose public void key Released Key Event e Styled Text desc Text new Styled Text inset Composite SWT MULTI SWT READ ONLY SWT WRAP desc Text set Foreground display get System Color SWT COLOR INFO FOREGROUND desc Text set Background display get System Color SWT COLOR INFO BACKGROUND data new Grid Data Grid Data FILL BOTH data width Hint 200 desc Text set Layout Data data desc Text set Text description desc Text set Enabled false desc Shell pack Rectangle display Bounds display get Client Area Rectangle bounds desc Shell get Bounds Point point display get Cursor Location Point location new Point point x cursor Size point y cursor Size if location x bounds width display Bounds x display Bounds width location x display Bounds x display Bounds width bounds width if location y bounds height display Bounds x display Bounds height location y display Bounds y display Bounds height bounds height desc Shell set Location location desc Shell open desc Shell add Shell Listener new Shell Listener non Javadoc see org eclipse swt events Shell Listener shell Activated org eclipse swt events Shell Event public void shell Activated Shell Event e Do nothing non Javadoc see org eclipse swt events Shell Listener shell Closed org eclipse swt events Shell Event public void shell Closed Shell Event e Do nothing non Javadoc see org eclipse swt events Shell Listener shell Deactivated org eclipse swt events Shell Event public void shell Deactivated Shell Event e desc Shell dispose non Javadoc see org eclipse swt events Shell Listener shell Deiconified org eclipse swt events Shell Event public void shell Deiconified Shell Event e Do nothing non Javadoc see org eclipse swt events Shell Listener shell Iconified org eclipse swt events Shell Event public void shell Iconified Shell Event e desc Shell dispose  popUp getShell getDisplay descShell getShell ON_TOP NO_TRIM GridLayout GridLayout marginHeight marginWidth descShell setLayout descShell setBackground getSystemColor COLOR_BLACK insetComposite descShell insetComposite setBackground getSystemColor COLOR_INFO_BACKGROUND GridLayout marginHeight marginWidth insetComposite setLayout GridData GridData GridData FILL_BOTH insetComposite setLayoutData insetComposite addFocusListener FocusListener focusLost FocusEvent descShell focusGained FocusEvent insetComposite addKeyListener KeyListener keyPressed KeyEvent descShell keyReleased KeyEvent StyledText descText StyledText insetComposite READ_ONLY descText setForeground getSystemColor COLOR_INFO_FOREGROUND descText setBackground getSystemColor COLOR_INFO_BACKGROUND GridData GridData FILL_BOTH widthHint descText setLayoutData descText setText descText setEnabled descShell displayBounds getClientArea descShell getBounds getCursorLocation cursorSize cursorSize displayBounds displayBounds displayBounds displayBounds displayBounds displayBounds displayBounds displayBounds descShell setLocation descShell descShell addShellListener ShellListener ShellListener shellActivated ShellEvent shellActivated ShellEvent ShellListener shellClosed ShellEvent shellClosed ShellEvent ShellListener shellDeactivated ShellEvent shellDeactivated ShellEvent descShell ShellListener shellDeiconified ShellEvent shellDeiconified ShellEvent ShellListener shellIconified ShellEvent shellIconified ShellEvent descShell
String remove Shortcut String label if label null return label int end label last Index Of if end 0 label label substring 0 end return label  removeShortcut lastIndexOf
private void set Initial Selections Object item action Sets Viewer get Element At 0 if last Selected Action Set Id null for int i 0 i action Sets size i Action Set Descriptor action Set Action Set Descriptor action Sets get i if action Set get Id equals last Selected Action Set Id item action Set break Structured Selection sel new Structured Selection item action Sets Viewer set Selection sel true if show Shortcut Tab menus Combo select last Selected Menu Index if last Selected Tab 1 tab Folder set Selection last Selected Tab if tab Folder get Selection Index 0 show Shortcut Tab menus Combo set Focus else action Sets Viewer get Control set Focus  setInitialSelections actionSetsViewer getElementAt lastSelectedActionSetId actionSets ActionSetDescriptor actionSet ActionSetDescriptor actionSets actionSet getId lastSelectedActionSetId actionSet StructuredSelection StructuredSelection actionSetsViewer setSelection showShortcutTab menusCombo lastSelectedMenuIndex lastSelectedTab tabFolder setSelection lastSelectedTab tabFolder getSelectionIndex showShortcutTab menusCombo setFocus actionSetsViewer getControl setFocus
private void update Menu Category Checked State Shortcut Menu menu if menu root Menu return if menu is Fully Checked menu Categories Viewer set Parents Grayed menu false menu Categories Viewer set Checked menu true else if menu is Fully Unchecked menu Categories Viewer set Parents Grayed menu false menu Categories Viewer set Checked menu false else menu Categories Viewer set Parents Grayed menu true menu Categories Viewer set Checked menu true update Menu Category Checked State menu parent  updateMenuCategoryCheckedState ShortcutMenu rootMenu isFullyChecked menuCategoriesViewer setParentsGrayed menuCategoriesViewer setChecked isFullyUnchecked menuCategoriesViewer setParentsGrayed menuCategoriesViewer setChecked menuCategoriesViewer setParentsGrayed menuCategoriesViewer setChecked updateMenuCategoryCheckedState
see org eclipse jface dialogs Dialog apply Dialog Font protected boolean apply Dialog Font return false  applyDialogFont applyDialogFont

see Preference Page create Contents Composite protected Control create Contents Composite parent Font font parent get Font Workbench Help set Help parent I Help Context Ids DECORATORS PREFERENCE PAGE Composite main Composite new Composite parent SWT NONE main Composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL main Composite set Font font Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 layout vertical Spacing 10 main Composite set Layout layout Label top Label new Label main Composite SWT NONE top Label set Text Workbench Messages get String Decorators Preference Page explanation NON NLS 1 top Label set Font font create Decorators Area main Composite create Description Area main Composite populate Decorators return main Composite  PreferencePage createContents createContents getFont WorkbenchHelp setHelp IHelpContextIds DECORATORS_PREFERENCE_PAGE mainComposite mainComposite setLayoutData GridData GridData FILL_HORIZONTAL mainComposite setFont GridLayout GridLayout marginWidth marginHeight verticalSpacing mainComposite setLayout topLabel mainComposite topLabel setText WorkbenchMessages getString DecoratorsPreferencePage topLabel setFont createDecoratorsArea mainComposite createDescriptionArea mainComposite populateDecorators mainComposite
checkbox Viewer get Table set Font decorators Composite get Font checkbox Viewer set Label Provider new Label Provider public String get Text Object element return Decorator Definition element get Name  checkboxViewer getTable setFont decoratorsComposite getFont checkboxViewer setLabelProvider LabelProvider getText DecoratorDefinition getName
public int compare Object arg0 Object arg1 String s1 Decorator Definition arg0 get Name String s2 Decorator Definition arg1 get Name return collator compare s1 s2  DecoratorDefinition getName DecoratorDefinition getName
public void dispose Nothing to do on dispose 
Nothing to do on dispose public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
public Object get Elements Object input Element Make an entry for each decorator definition Object elements Object input Element Object results new Object elements length System arraycopy elements 0 results 0 elements length Collections sort Arrays as List results comparer return results  getElements inputElement inputElement asList
checkbox Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event if event get Selection instanceof I Structured Selection I Structured Selection sel I Structured Selection event get Selection Decorator Definition definition Decorator Definition sel get First Element if definition null clear Description else show Description definition  checkboxViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getSelection IStructuredSelection IStructuredSelection IStructuredSelection getSelection DecoratorDefinition DecoratorDefinition getFirstElement clearDescription showDescription
checkbox Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event checkbox Viewer set Selection new Structured Selection event get Element  checkboxViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent checkboxViewer setSelection StructuredSelection getElement
Creates the widgets for the list of decorators private void create Decorators Area Composite main Composite Font main Font main Composite get Font Composite decorators Composite new Composite main Composite SWT NONE decorators Composite set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout decorators Layout new Grid Layout decorators Layout margin Width 0 decorators Layout margin Height 0 decorators Composite set Layout decorators Layout decorators Composite set Font main Font Label decorators Label new Label decorators Composite SWT NONE decorators Label set Text Workbench Messages get String Decorators Preference Page decorators Label NON NLS 1 decorators Label set Font main Font Checkbox table viewer of decorators checkbox Viewer Checkbox Table Viewer new Check List decorators Composite SWT SINGLE SWT TOP SWT BORDER checkbox Viewer get Table set Layout Data new Grid Data Grid Data FILL BOTH checkbox Viewer get Table set Font decorators Composite get Font checkbox Viewer set Label Provider new Label Provider public String get Text Object element return Decorator Definition element get Name checkbox Viewer get Table set Font main Font checkbox Viewer set Content Provider new I Structured Content Provider private final Comparator comparer new Comparator private Collator collator Collator get Instance public int compare Object arg0 Object arg1 String s1 Decorator Definition arg0 get Name String s2 Decorator Definition arg1 get Name return collator compare s1 s2 public void dispose Nothing to do on dispose public void input Changed Viewer viewer Object old Input Object new Input public Object get Elements Object input Element Make an entry for each decorator definition Object elements Object input Element Object results new Object elements length System arraycopy elements 0 results 0 elements length Collections sort Arrays as List results comparer return results checkbox Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event if event get Selection instanceof I Structured Selection I Structured Selection sel I Structured Selection event get Selection Decorator Definition definition Decorator Definition sel get First Element if definition null clear Description else show Description definition checkbox Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event checkbox Viewer set Selection new Structured Selection event get Element  createDecoratorsArea mainComposite mainFont mainComposite getFont decoratorsComposite mainComposite decoratorsComposite setLayoutData GridData GridData FILL_BOTH GridLayout decoratorsLayout GridLayout decoratorsLayout marginWidth decoratorsLayout marginHeight decoratorsComposite setLayout decoratorsLayout decoratorsComposite setFont mainFont decoratorsLabel decoratorsComposite decoratorsLabel setText WorkbenchMessages getString DecoratorsPreferencePage decoratorsLabel decoratorsLabel setFont mainFont checkboxViewer CheckboxTableViewer newCheckList decoratorsComposite checkboxViewer getTable setLayoutData GridData GridData FILL_BOTH checkboxViewer getTable setFont decoratorsComposite getFont checkboxViewer setLabelProvider LabelProvider getText DecoratorDefinition getName checkboxViewer getTable setFont mainFont checkboxViewer setContentProvider IStructuredContentProvider getInstance DecoratorDefinition getName DecoratorDefinition getName inputChanged oldInput newInput getElements inputElement inputElement asList checkboxViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getSelection IStructuredSelection IStructuredSelection IStructuredSelection getSelection DecoratorDefinition DecoratorDefinition getFirstElement clearDescription showDescription checkboxViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent checkboxViewer setSelection StructuredSelection getElement
Creates the widgets for the description private void create Description Area Composite main Composite Font main Font main Composite get Font Composite text Composite new Composite main Composite SWT NONE text Composite set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout text Layout new Grid Layout text Layout margin Width 0 text Layout margin Height 0 text Composite set Layout text Layout text Composite set Font main Font Label description Label new Label text Composite SWT NONE description Label set Text Workbench Messages get String Decorators Preference Page description NON NLS 1 description Label set Font main Font description Text new Text text Composite SWT MULTI SWT WRAP SWT READ ONLY SWT BORDER SWT H SCROLL description Text set Layout Data new Grid Data Grid Data FILL BOTH description Text set Font main Font  createDescriptionArea mainComposite mainFont mainComposite getFont textComposite mainComposite textComposite setLayoutData GridData GridData FILL_BOTH GridLayout textLayout GridLayout textLayout marginWidth textLayout marginHeight textComposite setLayout textLayout textComposite setFont mainFont descriptionLabel textComposite descriptionLabel setText WorkbenchMessages getString DecoratorsPreferencePage descriptionLabel setFont mainFont descriptionText textComposite READ_ONLY H_SCROLL descriptionText setLayoutData GridData GridData FILL_BOTH descriptionText setFont mainFont
Populates the list of decorators private void populate Decorators Decorator Definition definitions get All Definitions checkbox Viewer set Input definitions for int i 0 i definitions length i checkbox Viewer set Checked definitions i definitions i is Enabled  populateDecorators DecoratorDefinition getAllDefinitions checkboxViewer setInput checkboxViewer setChecked isEnabled
Show the selected description in the text private void show Description Decorator Definition definition if description Text null description Text is Disposed return String text definition get Description if text null text length 0 description Text set Text Workbench Messages get String Preference Page no Description NON NLS 1 else description Text set Text text  showDescription DecoratorDefinition descriptionText descriptionText isDisposed getDescription descriptionText setText WorkbenchMessages getString PreferencePage noDescription descriptionText setText
Clear the selected description in the text private void clear Description if description Text null description Text is Disposed return description Text set Text NON NLS 1  clearDescription descriptionText descriptionText isDisposed descriptionText setText
see Preference Page perform Defaults protected void perform Defaults super perform Defaults Decorator Manager manager Decorator Manager Workbench Plugin get Default get Decorator Manager Decorator Definition definitions manager get All Decorator Definitions for int i 0 i definitions length i checkbox Viewer set Checked definitions i definitions i get Default Value  PreferencePage performDefaults performDefaults performDefaults DecoratorManager DecoratorManager WorkbenchPlugin getDefault getDecoratorManager DecoratorDefinition getAllDecoratorDefinitions checkboxViewer setChecked getDefaultValue
see I Preference Page perform Ok public boolean perform Ok if super perform Ok Decorator Manager manager get Decorator Manager Clear the caches first to avoid unneccessary updates manager clear Caches Decorator Definition definitions manager get All Decorator Definitions for int i 0 i definitions length i boolean checked checkbox Viewer get Checked definitions i definitions i set Enabled checked Have the manager clear again as there may have been extra updates fired by the enablement changes manager clear Caches manager update For Enablement Change return true return false  IPreferencePage performOk performOk performOk DecoratorManager getDecoratorManager clearCaches DecoratorDefinition getAllDecoratorDefinitions checkboxViewer getChecked setEnabled clearCaches updateForEnablementChange
see I Workbench Preference Page init I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
Get the decorator definitions for the workbench private Decorator Definition get All Definitions return get Decorator Manager get All Decorator Definitions  DecoratorDefinition getAllDefinitions getDecoratorManager getAllDecoratorDefinitions
Get the Decorator Manager being used for this private Decorator Manager get Decorator Manager return Decorator Manager Workbench Plugin get Default get Decorator Manager  DecoratorManager DecoratorManager getDecoratorManager DecoratorManager WorkbenchPlugin getDefault getDecoratorManager

Prevent instantiation private Dialog Util  DialogUtil
Open an error style dialog for Part Init Exception by including any extra information from the nested Core Exception if present public static void open Error Shell parent String title String message Part Init Exception exception Check for a nested Core Exception Core Exception nested Exception null I Status status exception get Status if status null status get Exception instanceof Core Exception nested Exception Core Exception status get Exception if nested Exception null Open an error dialog and include the extra status information from the nested Core Exception Error Dialog open Error parent title message nested Exception get Status else Open a regular error dialog since there is no extra information to display Message Dialog open Error parent title message  PartInitException CoreException openError PartInitException CoreException CoreException nestedException IStatus getStatus getException CoreException nestedException CoreException getException nestedException CoreException ErrorDialog openError nestedException getStatus MessageDialog openError
Removes the accelerator indicator from a label if any Also removes the accelerators which are used in Asian languages public static String remove Accel String label int start Bracket label index Of NON NLS 1 Non latin accelerator if start Bracket 0 int end Bracket label index Of If there is more than one character it is not an accelerator if end Bracket start Bracket 3 return label substring 0 start Bracket label substring end Bracket 1 int i label index Of if i 0 label label substring 0 i label substring i 1 return label  removeAccel startBracket indexOf startBracket endBracket indexOf endBracket startBracket startBracket endBracket indexOf
Return the number of rows available in the current display using the current font param parent The Composite whose Font will be queried return int The result of the display size divided by the font size public static int available Rows Composite parent int font Height parent get Font get Font Data 0 get Height int display Height parent get Display get Client Area height return display Height font Height  availableRows fontHeight getFont getFontData getHeight displayHeight getDisplay getClientArea displayHeight fontHeight
Return whether or not the font in the parent is the size of a result font i e smaller than the High Contrast Font This method is used to make layout decisions based on screen space param parent The Composite whose Font will be queried return boolean True if there are more than 50 lines of possible text in the display public static boolean in Regular Font Mode Composite parent return available Rows parent 50  inRegularFontMode availableRows

public Editor Selection Dialog Shell parent Shell super parent Shell  EditorSelectionDialog parentShell parentShell
This method is called if a button has been pressed protected void button Pressed int button Id if button Id I Dialog Constants OK ID save Widget Values super button Pressed button Id  buttonPressed buttonId buttonId IDialogConstants OK_ID saveWidgetValues buttonPressed buttonId
Close the window public boolean close if internal Editor Images null for int i 0 i internal Editor Images length i internal Editor Images i dispose internal Editor Images null if external Editor Images null for int i 0 i external Editor Images length i external Editor Images i dispose external Editor Images null return super close  internalEditorImages internalEditorImages internalEditorImages internalEditorImages externalEditorImages externalEditorImages externalEditorImages externalEditorImages
protected void configure Shell Shell shell super configure Shell shell shell set Text Workbench Messages get String Editor Selection title NON NLS 1 Workbench Help set Help shell I Help Context Ids EDITOR SELECTION DIALOG  configureShell configureShell setText WorkbenchMessages getString EditorSelection WorkbenchHelp setHelp IHelpContextIds EDITOR_SELECTION_DIALOG
Creates and returns the contents of the upper part of the dialog above the button bar Subclasses should overide param the parent composite to contain the dialog area return the dialog area control protected Control create Dialog Area Composite parent Font font parent get Font create main group Composite contents Composite super create Dialog Area parent Grid Layout contents get Layout num Columns 2 begin the layout Label text Label new Label contents SWT NONE text Label set Text message Grid Data data new Grid Data data horizontal Span 2 text Label set Layout Data data text Label set Font font internal Button new Button contents SWT RADIO SWT LEFT internal Button set Text Workbench Messages get String Editor Selection internal NON NLS 1 internal Button add Listener SWT Selection this data new Grid Data data horizontal Span 1 internal Button set Layout Data data internal Button set Font font external Button new Button contents SWT RADIO SWT LEFT external Button set Text Workbench Messages get String Editor Selection external NON NLS 1 external Button add Listener SWT Selection this data new Grid Data data horizontal Span 1 external Button set Layout Data data external Button set Font font editor Table new Table contents SWT SINGLE SWT BORDER editor Table add Listener SWT Selection this editor Table add Listener SWT Default Selection this editor Table add Listener SWT Mouse Double Click this data new Grid Data data width Hint convert HorizontalDL Us To Pixels TABLE WIDTH data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true data vertical Alignment Grid Data FILL data grab Excess Vertical Space true data horizontal Span 2 editor Table set Layout Data data editor Table set Font font data height Hint editor Table get Item Height 12 browse External Editors Button new Button contents SWT PUSH browse External Editors Button set Text Workbench Messages get String Editor Selection browse NON NLS 1 browse External Editors Button add Listener SWT Selection this data new Grid Data data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint browse External Editors Button compute Size SWT DEFAULT SWT DEFAULT true x browse External Editors Button set Layout Data data browse External Editors Button set Font font restore Widget Values Place buttons to the appropriate state fill Editor Table update Enable State return contents  createDialogArea getFont createDialogArea GridLayout getLayout numColumns textLabel textLabel setText GridData GridData horizontalSpan textLabel setLayoutData textLabel setFont internalButton internalButton setText WorkbenchMessages getString EditorSelection internalButton addListener GridData horizontalSpan internalButton setLayoutData internalButton setFont externalButton externalButton setText WorkbenchMessages getString EditorSelection externalButton addListener GridData horizontalSpan externalButton setLayoutData externalButton setFont editorTable editorTable addListener editorTable addListener DefaultSelection editorTable addListener MouseDoubleClick GridData widthHint convertHorizontalDLUsToPixels TABLE_WIDTH horizontalAlignment GridData grabExcessHorizontalSpace verticalAlignment GridData grabExcessVerticalSpace horizontalSpan editorTable setLayoutData editorTable setFont heightHint editorTable getItemHeight browseExternalEditorsButton browseExternalEditorsButton setText WorkbenchMessages getString EditorSelection browseExternalEditorsButton addListener GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint browseExternalEditorsButton computeSize browseExternalEditorsButton setLayoutData browseExternalEditorsButton setFont restoreWidgetValues fillEditorTable updateEnableState
protected void fill Editor Table editor Table remove All editor Table update I Editor Descriptor editors Image images if internal Button get Selection editors get Internal Editors images internal Editor Images else editors get External Editors images external Editor Images 1FWHIEX ITPUI WINNT Need to call set Redraw editor Table set Redraw false for int i 0 i editors length i Table Item item new Table Item editor Table SWT NULL item set Data editors i item set Text editors i get Label item set Image images i editor Table set Redraw true  fillEditorTable editorTable removeAll editorTable IEditorDescriptor internalButton getSelection getInternalEditors internalEditorImages getExternalEditors externalEditorImages setRedraw editorTable setRedraw TableItem TableItem editorTable setData setText getLabel setImage editorTable setRedraw
Return the dialog store to cache values into protected I Dialog Settings get Dialog Settings I Dialog Settings workbench Settings Workbench Plugin get Default get Dialog Settings I Dialog Settings section workbench Settings get Section Editor Selection Dialog NON NLS 1 if section null section workbench Settings add New Section Editor Selection Dialog NON NLS 1 return section  IDialogSettings getDialogSettings IDialogSettings workbenchSettings WorkbenchPlugin getDefault getDialogSettings IDialogSettings workbenchSettings getSection EditorSelectionDialog workbenchSettings addNewSection EditorSelectionDialog
Get a list of registered programs from the OS protected I Editor Descriptor get External Editors if external Editors null Since this can take a while show the busy cursor If the dialog is not yet visible then use the parent shell Control shell get Shell if shell is Visible Control top Shell shell get Parent if top Shell null shell top Shell Cursor busy new Cursor shell get Display SWT CURSOR WAIT shell set Cursor busy Get the external editors available Editor Registry reg Editor Registry Workbench Plugin get Default get Editor Registry external Editors reg get Sorted Editors FromOS external Editors filter Editors external Editors external Editor Images get Images external Editors Clean up shell set Cursor null busy dispose return external Editors  IEditorDescriptor getExternalEditors externalEditors getShell isVisible topShell getParent topShell topShell getDisplay CURSOR_WAIT setCursor EditorRegistry EditorRegistry WorkbenchPlugin getDefault getEditorRegistry externalEditors getSortedEditorsFromOS externalEditors filterEditors externalEditors externalEditorImages getImages externalEditors setCursor externalEditors
Returns an array of editors which have been filtered according to the array of editors in the editors To Filter instance variable param editors To Filter an array of editors to filter return a filtered array of editors protected I Editor Descriptor filter Editors I Editor Descriptor editors if editors null editors length 1 return editors if editors To Filter null editors To Filter length 1 return editors Array List filtered List new Array List for int i 0 i editors length i boolean add true for int j 0 j editors To Filter length j if editors i get Id equals editors To Filter j get Id add false if add filtered List add editors i return I Editor Descriptor filtered List to Array new I Editor Descriptor filtered List size  editorsToFilter editorsToFilter IEditorDescriptor filterEditors IEditorDescriptor editorsToFilter editorsToFilter ArrayList filteredList ArrayList editorsToFilter getId editorsToFilter getId filteredList IEditorDescriptor filteredList toArray IEditorDescriptor filteredList
Returns an array of images for the given array of editors protected Image get Images I Editor Descriptor editors Image images new Image editors length for int i 0 i editors length i images i editors i get Image Descriptor create Image return images  getImages IEditorDescriptor getImageDescriptor createImage
Returns the internal editors protected I Editor Descriptor get Internal Editors if internal Editors null Editor Registry reg Editor Registry Workbench Plugin get Default get Editor Registry internal Editors reg get Sorted Editors From Plugins internal Editors filter Editors internal Editors internal Editor Images get Images internal Editors return internal Editors  IEditorDescriptor getInternalEditors internalEditors EditorRegistry EditorRegistry WorkbenchPlugin getDefault getEditorRegistry internalEditors getSortedEditorsFromPlugins internalEditors filterEditors internalEditors internalEditorImages getImages internalEditors internalEditors
Return the editor the user selected public I Editor Descriptor get Selected Editor return selected Editor  IEditorDescriptor getSelectedEditor selectedEditor
public void handle Event Event event if event type SWT Mouse Double Click handle Double Click Event return if event widget external Button fill Editor Table else if event widget browse External Editors Button prompt For External Editor else if event widget editor Table if editor Table get Selection Index 1 selected Editor Editor Descriptor editor Table get Selection 0 get Data else selected Editor null ok Button set Enabled false update Enable State  handleEvent MouseDoubleClick handleDoubleClickEvent externalButton fillEditorTable browseExternalEditorsButton promptForExternalEditor editorTable editorTable getSelectionIndex selectedEditor EditorDescriptor editorTable getSelection getData selectedEditor okButton setEnabled updateEnableState
protected void prompt For External Editor File Dialog dialog new File Dialog get Shell SWT OPEN SWT PRIMARY MODAL dialog set Filter Extensions Executable Filters String result dialog open if result null Editor Descriptor editor Editor Descriptor create For Program result pretend we had obtained it from the list of os registered editors Table Item ti new Table Item editor Table SWT NULL ti set Data editor ti set Text editor get Label Image image editor get Image Descriptor create Image ti set Image image need to pass an array to set Selection 1FSKYVO SWT ALL inconsistent set Selection api on Table editor Table set Selection new Table Item ti editor Table show Selection editor Table set Focus selected Editor editor add to our collection of cached external editors in case the user flips back and forth between internal external I Editor Descriptor new Editors new I Editor Descriptor external Editors length 1 System arraycopy external Editors 0 new Editors 0 external Editors length new Editors new Editors length 1 editor external Editors new Editors Image new Images new Image external Editor Images length 1 System arraycopy external Editor Images 0 new Images 0 external Editor Images length new Images new Images length 1 image external Editor Images new Images  promptForExternalEditor FileDialog FileDialog getShell PRIMARY_MODAL setFilterExtensions Executable_Filters EditorDescriptor EditorDescriptor createForProgram TableItem TableItem editorTable setData setText getLabel getImageDescriptor createImage setImage setSelection setSelection editorTable setSelection TableItem editorTable showSelection editorTable setFocus selectedEditor IEditorDescriptor newEditors IEditorDescriptor externalEditors externalEditors newEditors externalEditors newEditors newEditors externalEditors newEditors newImages externalEditorImages externalEditorImages newImages externalEditorImages newImages newImages externalEditorImages newImages
Handle a double click event on the list protected void handle Double Click Event button Pressed I Dialog Constants OK ID  handleDoubleClickEvent buttonPressed IDialogConstants OK_ID
Use the dialog store to restore widget values to the values that they held last time this wizard was used to completion protected void restore Widget Values I Dialog Settings settings get Dialog Settings boolean was External settings get Boolean STORE ID INTERNAL EXTERNAL internal Button set Selection was External external Button set Selection was External  restoreWidgetValues IDialogSettings getDialogSettings wasExternal getBoolean STORE_ID_INTERNAL_EXTERNAL internalButton setSelection wasExternal externalButton setSelection wasExternal
Since Finish was pressed write widget values to the dialog store so that they will persist into the next invocation of this wizard page protected void save Widget Values I Dialog Settings settings get Dialog Settings record whether use was viewing internal or external editors settings put STORE ID INTERNAL EXTERNAL internal Button get Selection  saveWidgetValues IDialogSettings getDialogSettings STORE_ID_INTERNAL_EXTERNAL internalButton getSelection
Set the message displayed by this message dialog public void set Message String a Message message a Message  setMessage aMessage aMessage
Set the editors which will not appear in the dialog param editors an array of editors public void set Editors To Filter I Editor Descriptor editors editors To Filter editors  setEditorsToFilter IEditorDescriptor editorsToFilter
public void update Enable State boolean enable External external Button get Selection browse External Editors Button set Enabled enable External update Ok Button  updateEnableState enableExternal externalButton getSelection browseExternalEditorsButton setEnabled enableExternal updateOkButton
protected void create Buttons For Button Bar Composite parent ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false initially there is no selection so OK button should not be enabled ok Button set Enabled false  createButtonsForButtonBar okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL okButton setEnabled
Update the button enablement state protected void update Ok Button Buttons are null during dialog creation if ok Button null return If there is no selection do not enable OK button if editor Table get Selection Count 0 ok Button set Enabled false return At this point there is a selection ok Button set Enabled selected Editor null  updateOkButton okButton editorTable getSelectionCount okButton setEnabled okButton setEnabled selectedEditor

private I Property Change Listener validity Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals Field Editor IS VALID update Valid State  IPropertyChangeListener validityChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty FieldEditor IS_VALID updateValidState
protected Control create Contents Composite parent Composite composite create Composite parent create Editor History Group composite create Space composite create Show Multiple Editor Tabs Pref composite create Close Editors On Exit Pref composite create Editor Reuse Group composite update Valid State issue the IDE subclasses this but should provide its own help Workbench Help set Help parent I Help Context Ids WORKBENCH EDITOR PREFERENCE PAGE return composite  createContents createComposite createEditorHistoryGroup createSpace createShowMultipleEditorTabsPref createCloseEditorsOnExitPref createEditorReuseGroup updateValidState WorkbenchHelp setHelp IHelpContextIds WORKBENCH_EDITOR_PREFERENCE_PAGE
protected void create Space Composite parent Workbench Preference Page create Space parent  createSpace WorkbenchPreferencePage createSpace
protected void create Show Multiple Editor Tabs Pref Composite composite show Multiple Editor Tabs new Button composite SWT CHECK show Multiple Editor Tabs set Text Workbench Messages get String Workbench Preference show Multiple Editor Tabs Button NON NLS 1 show Multiple Editor Tabs set Font composite get Font show Multiple Editor Tabs set Selection get Preference Store get Boolean I Preference Constants SHOW MULTIPLE EDITOR TABS set Button Layout Data show Multiple Editor Tabs  createShowMultipleEditorTabsPref showMultipleEditorTabs showMultipleEditorTabs setText WorkbenchMessages getString WorkbenchPreference showMultipleEditorTabsButton showMultipleEditorTabs setFont getFont showMultipleEditorTabs setSelection getPreferenceStore getBoolean IPreferenceConstants SHOW_MULTIPLE_EDITOR_TABS setButtonLayoutData showMultipleEditorTabs
protected void create Close Editors On Exit Pref Composite composite close Editors On Exit new Button composite SWT CHECK close Editors On Exit set Text Workbench Messages get String Workbench Preference close Editors Button NON NLS 1 close Editors On Exit set Font composite get Font close Editors On Exit set Selection get Preference Store get Boolean I Preference Constants CLOSE EDITORS ON EXIT set Button Layout Data close Editors On Exit  createCloseEditorsOnExitPref closeEditorsOnExit closeEditorsOnExit setText WorkbenchMessages getString WorkbenchPreference closeEditorsButton closeEditorsOnExit setFont getFont closeEditorsOnExit setSelection getPreferenceStore getBoolean IPreferenceConstants CLOSE_EDITORS_ON_EXIT setButtonLayoutData closeEditorsOnExit
protected Composite create Composite Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL composite set Font parent get Font return composite  createComposite GridLayout GridLayout marginWidth marginHeight setLayout setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL setFont getFont
public void init I Workbench workbench do nothing  IWorkbench
protected void perform Defaults I Preference Store store get Preference Store show Multiple Editor Tabs set Selection store get Default Boolean I Preference Constants SHOW MULTIPLE EDITOR TABS close Editors On Exit set Selection store get Default Boolean I Preference Constants CLOSE EDITORS ON EXIT reuse Editors set Selection store get Default Boolean I Preference Constants REUSE EDITORS BOOLEAN dirty Editor Reuse Group set Enabled reuse Editors get Selection open New Editor set Selection store get Default Boolean I Preference Constants REUSE DIRTY EDITORS open New Editor set Enabled reuse Editors get Selection prompt To Reuse Editor set Selection store get Default Boolean I Preference Constants REUSE DIRTY EDITORS prompt To Reuse Editor set Enabled reuse Editors get Selection reuse Editors Threshold load Default reuse Editors Threshold get Label Control editor Reuse Threshold Group set Enabled reuse Editors get Selection reuse Editors Threshold get Text Control editor Reuse Threshold Group set Enabled reuse Editors get Selection recent Files Editor load Default  performDefaults IPreferenceStore getPreferenceStore showMultipleEditorTabs setSelection getDefaultBoolean IPreferenceConstants SHOW_MULTIPLE_EDITOR_TABS closeEditorsOnExit setSelection getDefaultBoolean IPreferenceConstants CLOSE_EDITORS_ON_EXIT reuseEditors setSelection getDefaultBoolean IPreferenceConstants REUSE_EDITORS_BOOLEAN dirtyEditorReuseGroup setEnabled reuseEditors getSelection openNewEditor setSelection getDefaultBoolean IPreferenceConstants REUSE_DIRTY_EDITORS openNewEditor setEnabled reuseEditors getSelection promptToReuseEditor setSelection getDefaultBoolean IPreferenceConstants REUSE_DIRTY_EDITORS promptToReuseEditor setEnabled reuseEditors getSelection reuseEditorsThreshold loadDefault reuseEditorsThreshold getLabelControl editorReuseThresholdGroup setEnabled reuseEditors getSelection reuseEditorsThreshold getTextControl editorReuseThresholdGroup setEnabled reuseEditors getSelection recentFilesEditor loadDefault
public boolean perform Ok I Preference Store store get Preference Store store set Value I Preference Constants SHOW MULTIPLE EDITOR TABS show Multiple Editor Tabs get Selection store set Value I Preference Constants CLOSE EDITORS ON EXIT close Editors On Exit get Selection store the reuse editors setting store set Value I Preference Constants REUSE EDITORS BOOLEAN reuse Editors get Selection store set Value I Preference Constants REUSE DIRTY EDITORS prompt To Reuse Editor get Selection reuse Editors Threshold store store the recent files setting recent Files Editor store return super perform Ok  performOk IPreferenceStore getPreferenceStore setValue IPreferenceConstants SHOW_MULTIPLE_EDITOR_TABS showMultipleEditorTabs getSelection setValue IPreferenceConstants CLOSE_EDITORS_ON_EXIT closeEditorsOnExit getSelection setValue IPreferenceConstants REUSE_EDITORS_BOOLEAN reuseEditors getSelection setValue IPreferenceConstants REUSE_DIRTY_EDITORS promptToReuseEditor getSelection reuseEditorsThreshold recentFilesEditor performOk
Returns preference store that belongs to the our plugin return the preference store for this plugin protected I Preference Store do Get Preference Store return Workbench Plugin get Default get Preference Store  IPreferenceStore doGetPreferenceStore WorkbenchPlugin getDefault getPreferenceStore
protected void update Valid State if recent Files Editor is Valid set Error Message recent Files Editor get Error Message set Valid false else if reuse Editors Threshold is Valid set Error Message reuse Editors Threshold get Error Message set Valid false else set Error Message null set Valid true  updateValidState recentFilesEditor isValid setErrorMessage recentFilesEditor getErrorMessage setValid reuseEditorsThreshold isValid setErrorMessage reuseEditorsThreshold getErrorMessage setValid setErrorMessage setValid
reuse Editors add Selection Listener new Selection Adapter public void widget Selected Selection Event e reuse Editors Threshold get Label Control editor Reuse Threshold Group set Enabled reuse Editors get Selection reuse Editors Threshold get Text Control editor Reuse Threshold Group set Enabled reuse Editors get Selection dirty Editor Reuse Group set Enabled reuse Editors get Selection open New Editor set Enabled reuse Editors get Selection prompt To Reuse Editor set Enabled reuse Editors get Selection  reuseEditors addSelectionListener SelectionAdapter widgetSelected SelectionEvent reuseEditorsThreshold getLabelControl editorReuseThresholdGroup setEnabled reuseEditors getSelection reuseEditorsThreshold getTextControl editorReuseThresholdGroup setEnabled reuseEditors getSelection dirtyEditorReuseGroup setEnabled reuseEditors getSelection openNewEditor setEnabled reuseEditors getSelection promptToReuseEditor setEnabled reuseEditors getSelection
Create a composite that contains entry fields specifying editor reuse preferences protected void create Editor Reuse Group Composite composite Font font composite get Font editor Reuse Group new Composite composite SWT LEFT Grid Layout layout new Grid Layout Line up with other entries in preference page layout margin Width 0 layout margin Height 0 editor Reuse Group set Layout layout editor Reuse Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL editor Reuse Group set Font font reuse Editors new Button editor Reuse Group SWT CHECK reuse Editors set Text Workbench Messages get String Workbench Preference reuse Editors NON NLS 1 reuse Editors set Layout Data new Grid Data reuse Editors set Font font I Preference Store store Workbench Plugin get Default get Preference Store reuse Editors set Selection store get Boolean I Preference Constants REUSE EDITORS BOOLEAN reuse Editors add Selection Listener new Selection Adapter public void widget Selected Selection Event e reuse Editors Threshold get Label Control editor Reuse Threshold Group set Enabled reuse Editors get Selection reuse Editors Threshold get Text Control editor Reuse Threshold Group set Enabled reuse Editors get Selection dirty Editor Reuse Group set Enabled reuse Editors get Selection open New Editor set Enabled reuse Editors get Selection prompt To Reuse Editor set Enabled reuse Editors get Selection editor Reuse Indent Group new Composite editor Reuse Group SWT LEFT Grid Layout indent Layout new Grid Layout indent Layout margin Width REUSE INDENT editor Reuse Indent Group set Layout indent Layout editor Reuse Indent Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL editor Reuse Threshold Group new Composite editor Reuse Indent Group SWT LEFT editor Reuse Threshold Group set Layout new Grid Layout editor Reuse Threshold Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL editor Reuse Threshold Group set Font font reuse Editors Threshold new Integer Field Editor I Preference Constants REUSE EDITORS Workbench Messages get String Workbench Preference reuse Editors Threshold editor Reuse Threshold Group NON NLS 1 reuse Editors Threshold set Preference Store Workbench Plugin get Default get Preference Store reuse Editors Threshold set Preference Page this reuse Editors Threshold set Text Limit 2 reuse Editors Threshold set Error Message Workbench Messages get String Workbench Preference reuse Editors Threshold Error NON NLS 1 reuse Editors Threshold set Validate Strategy String Field Editor VALIDATE ON KEY STROKE reuse Editors Threshold set Valid Range 1 99 reuse Editors Threshold load reuse Editors Threshold get Label Control editor Reuse Threshold Group set Enabled reuse Editors get Selection reuse Editors Threshold get Text Control editor Reuse Threshold Group set Enabled reuse Editors get Selection reuse Editors Threshold set Property Change Listener validity Change Listener dirty Editor Reuse Group new Group editor Reuse Indent Group SWT NONE dirty Editor Reuse Group set Layout new Grid Layout dirty Editor Reuse Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL dirty Editor Reuse Group set Text Workbench Messages get String Workbench Preference reuse Dirty Editor Group Title NON NLS 1 dirty Editor Reuse Group set Font font dirty Editor Reuse Group set Enabled reuse Editors get Selection prompt To Reuse Editor new Button dirty Editor Reuse Group SWT RADIO prompt To Reuse Editor set Text Workbench Messages get String Workbench Preference prompt To Reuse Editor NON NLS 1 prompt To Reuse Editor set Font font prompt To Reuse Editor set Selection store get Boolean I Preference Constants REUSE DIRTY EDITORS prompt To Reuse Editor set Enabled reuse Editors get Selection open New Editor new Button dirty Editor Reuse Group SWT RADIO open New Editor set Text Workbench Messages get String Workbench Preference open New Editor NON NLS 1 open New Editor set Font font open New Editor set Selection store get Boolean I Preference Constants REUSE DIRTY EDITORS open New Editor set Enabled reuse Editors get Selection  createEditorReuseGroup getFont editorReuseGroup GridLayout GridLayout marginWidth marginHeight editorReuseGroup setLayout editorReuseGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL editorReuseGroup setFont reuseEditors editorReuseGroup reuseEditors setText WorkbenchMessages getString WorkbenchPreference reuseEditors reuseEditors setLayoutData GridData reuseEditors setFont IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore reuseEditors setSelection getBoolean IPreferenceConstants REUSE_EDITORS_BOOLEAN reuseEditors addSelectionListener SelectionAdapter widgetSelected SelectionEvent reuseEditorsThreshold getLabelControl editorReuseThresholdGroup setEnabled reuseEditors getSelection reuseEditorsThreshold getTextControl editorReuseThresholdGroup setEnabled reuseEditors getSelection dirtyEditorReuseGroup setEnabled reuseEditors getSelection openNewEditor setEnabled reuseEditors getSelection promptToReuseEditor setEnabled reuseEditors getSelection editorReuseIndentGroup editorReuseGroup GridLayout indentLayout GridLayout indentLayout marginWidth REUSE_INDENT editorReuseIndentGroup setLayout indentLayout editorReuseIndentGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL editorReuseThresholdGroup editorReuseIndentGroup editorReuseThresholdGroup setLayout GridLayout editorReuseThresholdGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL editorReuseThresholdGroup setFont reuseEditorsThreshold IntegerFieldEditor IPreferenceConstants REUSE_EDITORS WorkbenchMessages getString WorkbenchPreference reuseEditorsThreshold editorReuseThresholdGroup reuseEditorsThreshold setPreferenceStore WorkbenchPlugin getDefault getPreferenceStore reuseEditorsThreshold setPreferencePage reuseEditorsThreshold setTextLimit reuseEditorsThreshold setErrorMessage WorkbenchMessages getString WorkbenchPreference reuseEditorsThresholdError reuseEditorsThreshold setValidateStrategy StringFieldEditor VALIDATE_ON_KEY_STROKE reuseEditorsThreshold setValidRange reuseEditorsThreshold reuseEditorsThreshold getLabelControl editorReuseThresholdGroup setEnabled reuseEditors getSelection reuseEditorsThreshold getTextControl editorReuseThresholdGroup setEnabled reuseEditors getSelection reuseEditorsThreshold setPropertyChangeListener validityChangeListener dirtyEditorReuseGroup editorReuseIndentGroup dirtyEditorReuseGroup setLayout GridLayout dirtyEditorReuseGroup setLayoutData GridData GridData FILL_HORIZONTAL dirtyEditorReuseGroup setText WorkbenchMessages getString WorkbenchPreference reuseDirtyEditorGroupTitle dirtyEditorReuseGroup setFont dirtyEditorReuseGroup setEnabled reuseEditors getSelection promptToReuseEditor dirtyEditorReuseGroup promptToReuseEditor setText WorkbenchMessages getString WorkbenchPreference promptToReuseEditor promptToReuseEditor setFont promptToReuseEditor setSelection getBoolean IPreferenceConstants REUSE_DIRTY_EDITORS promptToReuseEditor setEnabled reuseEditors getSelection openNewEditor dirtyEditorReuseGroup openNewEditor setText WorkbenchMessages getString WorkbenchPreference openNewEditor openNewEditor setFont openNewEditor setSelection getBoolean IPreferenceConstants REUSE_DIRTY_EDITORS openNewEditor setEnabled reuseEditors getSelection
Create a composite that contains entry fields specifying editor history preferences protected void create Editor History Group Composite composite Composite group Composite new Composite composite SWT LEFT Grid Layout layout new Grid Layout layout num Columns 2 group Composite set Layout layout Grid Data gd new Grid Data gd horizontal Alignment Grid Data FILL gd grab Excess Horizontal Space true group Composite set Layout Data gd group Composite set Font composite get Font recent Files Editor new Integer Field Editor I Preference Constants RECENT FILES Workbench Messages get String Workbench Preference recent Files group Composite NON NLS 1 recent Files Editor set Preference Store Workbench Plugin get Default get Preference Store recent Files Editor set Preference Page this recent Files Editor set Text Limit Integer to String Editor History MAX SIZE length recent Files Editor set Error Message Workbench Messages format Workbench Preference recent Files Error new Object new Integer Editor History MAX SIZE NON NLS 1 recent Files Editor set Validate Strategy String Field Editor VALIDATE ON KEY STROKE recent Files Editor set Valid Range 0 Editor History MAX SIZE recent Files Editor load recent Files Editor set Property Change Listener validity Change Listener  createEditorHistoryGroup groupComposite GridLayout GridLayout numColumns groupComposite setLayout GridData GridData horizontalAlignment GridData grabExcessHorizontalSpace groupComposite setLayoutData groupComposite setFont getFont recentFilesEditor IntegerFieldEditor IPreferenceConstants RECENT_FILES WorkbenchMessages getString WorkbenchPreference recentFiles groupComposite recentFilesEditor setPreferenceStore WorkbenchPlugin getDefault getPreferenceStore recentFilesEditor setPreferencePage recentFilesEditor setTextLimit toString EditorHistory MAX_SIZE recentFilesEditor setErrorMessage WorkbenchMessages WorkbenchPreference recentFilesError EditorHistory MAX_SIZE recentFilesEditor setValidateStrategy StringFieldEditor VALIDATE_ON_KEY_STROKE recentFilesEditor setValidRange EditorHistory MAX_SIZE recentFilesEditor recentFilesEditor setPropertyChangeListener validityChangeListener

public class Empty Preference Page extends Preference Page implements I Workbench Preference Page protected Control create Contents Composite parent return new Composite parent SWT NULL  EmptyPreferencePage PreferencePage IWorkbenchPreferencePage createContents
Hook method to get a page specific preference store Reimplement this method if a page don t want to use its parent s preference store protected I Preference Store do Get Preference Store return Workbench Plugin get Default get Preference Store  IPreferenceStore doGetPreferenceStore WorkbenchPlugin getDefault getPreferenceStore
see I Workbench Preference Page public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench

public class Empty Property Page extends Property Page Creates empty composite for this page content protected Control create Contents Composite parent return new Composite parent SWT NULL  EmptyPropertyPage PropertyPage createContents

protected Control create Contents Composite parent Text text new Text parent SWT MULTI SWT READ ONLY SWT WRAP text set Foreground J Face Colors get Error Text text get Display text set Background text get Display get System Color SWT COLOR WIDGET BACKGROUND text set Text Workbench Messages get String Error Preference Page error Message NON NLS 1 return text  createContents READ_ONLY setForeground JFaceColors getErrorText getDisplay setBackground getDisplay getSystemColor COLOR_WIDGET_BACKGROUND setText WorkbenchMessages getString ErrorPreferencePage errorMessage

Constructs a new instance of the receiver and forwards to monitor param monitor public Event Loop Progress Monitor I Progress Monitor monitor super monitor  EventLoopProgressMonitor IProgressMonitor
see I Progress Monitor begin Task public void begin Task String name int total Work super begin Task name total Work task Name name run Event Loop  IProgressMonitor beginTask beginTask totalWork beginTask totalWork taskName runEventLoop
see org eclipse core runtime I Progress Monitor With Blocking clear Blocked public void clear Blocked Dialog get Blocked Handler clear Blocked  IProgressMonitorWithBlocking clearBlocked clearBlocked getBlockedHandler clearBlocked
see I Progress Monitor done public void done super done task Name null run Event Loop  IProgressMonitor taskName runEventLoop
see I Progress Monitor internal Worked public void internal Worked double work super internal Worked work run Event Loop  IProgressMonitor internalWorked internalWorked internalWorked runEventLoop
see I Progress Monitor is Canceled public boolean is Canceled run Event Loop return super is Canceled  IProgressMonitor isCanceled isCanceled runEventLoop isCanceled
Runs an event loop private void run Event Loop Only run the event loop so often as it is expensive on some platforms namely Motif long t System current Time Millis if t last Time T THRESH return last Time t Run the event loop Display disp Display get Default if disp null return Initialize an exception handler from the window class Exception Handler handler Exception Handler get Instance for try if disp read And Dispatch break catch Throwable e Handle the exception the same way as the workbench handler handle Exception e break Only run the event loop for so long Otherwise this would never return if some other thread was constantly generating events if System current Time Millis t T MAX break  runEventLoop currentTimeMillis lastTime T_THRESH lastTime getDefault ExceptionHandler ExceptionHandler getInstance readAndDispatch handleException currentTimeMillis T_MAX
see org eclipse core runtime I Progress Monitor With Blocking set Blocked org eclipse core runtime I Status public void set Blocked I Status reason Dialog get Blocked Handler show Blocked this reason task Name  IProgressMonitorWithBlocking setBlocked IStatus setBlocked IStatus getBlockedHandler showBlocked taskName
see I Progress Monitor set Canceled public void set Canceled boolean b super set Canceled b task Name null run Event Loop  IProgressMonitor setCanceled setCanceled setCanceled taskName runEventLoop
see I Progress Monitor set Task Name public void set Task Name String name super set Task Name name task Name name run Event Loop  IProgressMonitor setTaskName setTaskName setTaskName taskName runEventLoop
see I Progress Monitor sub Task public void sub Task String name Be prepared in case the first task was null if task Name null task Name name super sub Task name run Event Loop  IProgressMonitor subTask subTask taskName taskName subTask runEventLoop
see I Progress Monitor worked public void worked int work super worked work run Event Loop  IProgressMonitor runEventLoop
Return the name of the current task return Returns the task Name protected String get Task Name return task Name  taskName getTaskName taskName

the list selection page class Selection Page extends Workbench Wizard List Selection Page Selection Page I Workbench w I Structured Selection ss Adaptable List e String s super w ss e s  SelectionPage WorkbenchWizardListSelectionPage SelectionPage IWorkbench IStructuredSelection AdaptableList
super w ss e s public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Help Context Ids EXPORT WIZARD SELECTION WIZARD PAGE  createControl createControl WorkbenchHelp setHelp getControl IHelpContextIds EXPORT_WIZARD_SELECTION_WIZARD_PAGE
protected I Wizard Node create Wizard Node Workbench Wizard Element element return new Workbench Wizard Node this element public I Workbench Wizard create Wizard throws Core Exception return I Workbench Wizard wizard Element create Executable Extension  IWizardNode createWizardNode WorkbenchWizardElement WorkbenchWizardNode IWorkbenchWizard createWizard CoreException IWorkbenchWizard wizardElement createExecutableExtension
protected I Wizard Node create Wizard Node Workbench Wizard Element element return new Workbench Wizard Node this element public I Workbench Wizard create Wizard throws Core Exception return I Workbench Wizard wizard Element create Executable Extension  IWizardNode createWizardNode WorkbenchWizardElement WorkbenchWizardNode IWorkbenchWizard createWizard CoreException IWorkbenchWizard wizardElement createExecutableExtension
Creates the wizard s pages lazily public void add Pages add Page new Selection Page this workbench this selection get Available Export Wizards Workbench Messages get String Export Wizard select Destination NON NLS 1  addPages addPage SelectionPage getAvailableExportWizards WorkbenchMessages getString ExportWizard selectDestination
Returns the export wizards that are available for invocation protected Adaptable List get Available Export Wizards return new Wizards Registry Reader I Workbench Constants PL EXPORT get Wizards  AdaptableList getAvailableExportWizards WizardsRegistryReader IWorkbenchConstants PL_EXPORT getWizards
Initializes the wizard public void init I Workbench a Workbench I Structured Selection current Selection this workbench a Workbench this selection current Selection set Window Title Workbench Messages get String Export Wizard title NON NLS 1 set Default Page Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG WIZBAN EXPORT WIZ set Needs Progress Monitor true  IWorkbench aWorkbench IStructuredSelection currentSelection aWorkbench currentSelection setWindowTitle WorkbenchMessages getString ExportWizard setDefaultPageImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_WIZBAN_EXPORT_WIZ setNeedsProgressMonitor
Subclasses must implement this code I Wizard code method to perform any special finish processing for their wizard public boolean perform Finish Selection Page get Pages 0 save Widget Values return true  IWizard performFinish SelectionPage getPages saveWidgetValues

protected Map editors To Images Add a new resource type to the collection shown in the top of the page This is typically called after the extension dialog is shown to the user public void add Resource Type String new Name String new Extension Either a file name or extension must be provided Assert is True new Name null new Name length 0 new Extension null new Extension length 0 Wild card only valid by itself i e rep is not valid And must have an extension int index new Name index Of if index 1 Assert is True index 0 new Name length 1 Assert is True new Extension null new Extension length 0 Find the index at which to insert the new entry String new Filename new Name new Extension null new Extension length 0 new Extension to Upper Case NON NLS 1 NON NLS 2 I File Editor Mapping resource Type Table Item items resource Type Table get Items boolean found false int i 0 while i items length found resource Type I File Editor Mapping items i get Data int result new Filename compare To Ignore Case resource Type get Label if result 0 Same resource type not allowed Message Dialog open Information get Control get Shell Workbench Messages get String File Editor Preference exists Title NON NLS 1 Workbench Messages get String File Editor Preference exists Message NON NLS 1 return if result 0 found true else i Create the new type and insert it resource Type new File Editor Mapping new Name new Extension Table Item item new Resource Table Item resource Type i true resource Type Table set Focus resource Type Table show Item item fill Editor Table  editorsToImages addResourceType newName newExtension isTrue newName newName newExtension newExtension newName indexOf isTrue newName isTrue newExtension newExtension newFilename newName newExtension newExtension newExtension toUpperCase IFileEditorMapping resourceType TableItem resourceTypeTable getItems resourceType IFileEditorMapping getData newFilename compareToIgnoreCase resourceType getLabel MessageDialog openInformation getControl getShell WorkbenchMessages getString FileEditorPreference existsTitle WorkbenchMessages getString FileEditorPreference existsMessage resourceType FileEditorMapping newName newExtension TableItem newResourceTableItem resourceType resourceTypeTable setFocus resourceTypeTable showItem fillEditorTable
Creates the page s UI content protected Control create Contents Composite parent images To Dispose new Array List editors To Images new Hash Map 50 Font font parent get Font define container its gridding Composite page Component new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width 0 layout margin Height 0 page Component set Layout layout Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL page Component set Layout Data data page Component set Font font layout the contents layout the top table its buttons Label label new Label page Component SWT LEFT label set Text Workbench Messages get String File Editor Preference file Types NON NLS 1 data new Grid Data data horizontal Alignment Grid Data FILL data horizontal Span 2 label set Layout Data data label set Font font resource Type Table new Table page Component SWT SINGLE SWT BORDER SWT FULL SELECTION resource Type Table add Listener SWT Selection this resource Type Table add Listener SWT Default Selection this data new Grid Data Grid Data FILL HORIZONTAL int available Rows Dialog Util available Rows page Component data height Hint resource Type Table get Item Height available Rows 8 resource Type Table set Layout Data data resource Type Table set Font font Composite group Component new Composite page Component SWT NULL Grid Layout group Layout new Grid Layout group Layout margin Width 0 group Layout margin Height 0 group Component set Layout group Layout data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL group Component set Layout Data data group Component set Font font add Resource Type Button new Button group Component SWT PUSH add Resource Type Button set Text Workbench Messages get String File Editor Preference add NON NLS 1 add Resource Type Button add Listener SWT Selection this add Resource Type Button set Layout Data data add Resource Type Button set Font font set Button Layout Data add Resource Type Button remove Resource Type Button new Button group Component SWT PUSH remove Resource Type Button set Text Workbench Messages get String File Editor Preference remove NON NLS 1 remove Resource Type Button add Listener SWT Selection this remove Resource Type Button set Font font set Button Layout Data remove Resource Type Button Spacer label new Label page Component SWT LEFT data new Grid Data data horizontal Alignment Grid Data FILL data horizontal Span 2 label set Layout Data data layout the bottom table its buttons editor Label new Label page Component SWT LEFT editor Label set Text Workbench Messages get String File Editor Preference associated Editors NON NLS 1 data new Grid Data data horizontal Alignment Grid Data FILL data horizontal Span 2 editor Label set Layout Data data editor Label set Font font editor Table new Table page Component SWT SINGLE SWT BORDER editor Table add Listener SWT Selection this editor Table add Listener SWT Default Selection this data new Grid Data Grid Data FILL BOTH data height Hint editor Table get Item Height 7 editor Table set Layout Data data editor Table set Font font group Component new Composite page Component SWT NULL group Layout new Grid Layout group Layout margin Width 0 group Layout margin Height 0 group Component set Layout group Layout data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL group Component set Layout Data data group Component set Font font add Editor Button new Button group Component SWT PUSH add Editor Button set Text Workbench Messages get String File Editor Preference add Editor NON NLS 1 add Editor Button add Listener SWT Selection this add Editor Button set Layout Data data add Editor Button set Font font set Button Layout Data add Editor Button remove Editor Button new Button group Component SWT PUSH remove Editor Button set Text Workbench Messages get String File Editor Preference remove Editor NON NLS 1 remove Editor Button add Listener SWT Selection this remove Editor Button set Font font set Button Layout Data remove Editor Button default Editor Button new Button group Component SWT PUSH default Editor Button set Text Workbench Messages get String File Editor Preference default NON NLS 1 default Editor Button add Listener SWT Selection this default Editor Button set Font font set Button Layout Data default Editor Button fill Resource Type Table if resource Type Table get Item Count 0 resource Type Table set Selection 0 fill Editor Table update Enabled State Workbench Help set Help parent I Help Context Ids FILE EDITORS PREFERENCE PAGE return page Component  createContents imagesToDispose ArrayList editorsToImages HashMap getFont pageComponent GridLayout GridLayout numColumns marginWidth marginHeight pageComponent setLayout GridData GridData verticalAlignment GridData horizontalAlignment GridData pageComponent setLayoutData pageComponent setFont pageComponent setText WorkbenchMessages getString FileEditorPreference fileTypes GridData horizontalAlignment GridData horizontalSpan setLayoutData setFont resourceTypeTable pageComponent FULL_SELECTION resourceTypeTable addListener resourceTypeTable addListener DefaultSelection GridData GridData FILL_HORIZONTAL availableRows DialogUtil availableRows pageComponent heightHint resourceTypeTable getItemHeight availableRows resourceTypeTable setLayoutData resourceTypeTable setFont groupComponent pageComponent GridLayout groupLayout GridLayout groupLayout marginWidth groupLayout marginHeight groupComponent setLayout groupLayout GridData verticalAlignment GridData horizontalAlignment GridData groupComponent setLayoutData groupComponent setFont addResourceTypeButton groupComponent addResourceTypeButton setText WorkbenchMessages getString FileEditorPreference addResourceTypeButton addListener addResourceTypeButton setLayoutData addResourceTypeButton setFont setButtonLayoutData addResourceTypeButton removeResourceTypeButton groupComponent removeResourceTypeButton setText WorkbenchMessages getString FileEditorPreference removeResourceTypeButton addListener removeResourceTypeButton setFont setButtonLayoutData removeResourceTypeButton pageComponent GridData horizontalAlignment GridData horizontalSpan setLayoutData editorLabel pageComponent editorLabel setText WorkbenchMessages getString FileEditorPreference associatedEditors GridData horizontalAlignment GridData horizontalSpan editorLabel setLayoutData editorLabel setFont editorTable pageComponent editorTable addListener editorTable addListener DefaultSelection GridData GridData FILL_BOTH heightHint editorTable getItemHeight editorTable setLayoutData editorTable setFont groupComponent pageComponent groupLayout GridLayout groupLayout marginWidth groupLayout marginHeight groupComponent setLayout groupLayout GridData verticalAlignment GridData horizontalAlignment GridData groupComponent setLayoutData groupComponent setFont addEditorButton groupComponent addEditorButton setText WorkbenchMessages getString FileEditorPreference addEditor addEditorButton addListener addEditorButton setLayoutData addEditorButton setFont setButtonLayoutData addEditorButton removeEditorButton groupComponent removeEditorButton setText WorkbenchMessages getString FileEditorPreference removeEditor removeEditorButton addListener removeEditorButton setFont setButtonLayoutData removeEditorButton defaultEditorButton groupComponent defaultEditorButton setText WorkbenchMessages getString FileEditorPreference defaultEditorButton addListener defaultEditorButton setFont setButtonLayoutData defaultEditorButton fillResourceTypeTable resourceTypeTable getItemCount resourceTypeTable setSelection fillEditorTable updateEnabledState WorkbenchHelp setHelp IHelpContextIds FILE_EDITORS_PREFERENCE_PAGE pageComponent
The preference page is going to be disposed So deallocate all allocated SWT resources that aren t disposed automatically by disposing the page i e fonts cursors etc Subclasses should reimplement this method to release their own allocated SWT resources public void dispose super dispose if images To Dispose null for Iterator e images To Dispose iterator e has Next Image e next dispose images To Dispose null if editors To Images null for Iterator e editors To Images values iterator e has Next Image e next dispose editors To Images null  imagesToDispose imagesToDispose hasNext imagesToDispose editorsToImages editorsToImages hasNext editorsToImages
Hook method to get a page specific preference store Reimplement this method if a page don t want to use its parent s preference store protected I Preference Store do Get Preference Store return Workbench Plugin get Default get Preference Store  IPreferenceStore doGetPreferenceStore WorkbenchPlugin getDefault getPreferenceStore
protected void fill Editor Table editor Table remove All File Editor Mapping resource Type get Selected Resource Type if resource Type null I Editor Descriptor array resource Type get Editors for int i 0 i array length i I Editor Descriptor editor array i Table Item item new Table Item editor Table SWT NULL item set Data editor Check if it is the default editor String default String null File Editor Mapping ext get Selected Resource Type if ext null I Editor Descriptor preferred Editor ext get Default Editor if preferred Editor editor default String Workbench Messages get String File Editor Preference default Label NON NLS 1 if default String null item set Text editor get Label default String NON NLS 1 else item set Text editor get Label item set Image get Image editor  fillEditorTable editorTable removeAll FileEditorMapping resourceType getSelectedResourceType resourceType IEditorDescriptor resourceType getEditors IEditorDescriptor TableItem TableItem editorTable setData defaultString FileEditorMapping getSelectedResourceType IEditorDescriptor preferredEditor getDefaultEditor preferredEditor defaultString WorkbenchMessages getString FileEditorPreference defaultLabel defaultString setText getLabel defaultString setText getLabel setImage getImage
Place the existing resource types in the table protected void fill Resource Type Table Populate the table with the items I File Editor Mapping array Workbench Plugin get Default get Editor Registry get File Editor Mappings for int i 0 i array length i File Editor Mapping mapping File Editor Mapping array i mapping File Editor Mapping mapping clone want a copy new Resource Table Item mapping i false  fillResourceTypeTable IFileEditorMapping WorkbenchPlugin getDefault getEditorRegistry getFileEditorMappings FileEditorMapping FileEditorMapping FileEditorMapping newResourceTableItem
Returns the image associated with the given editor protected Image get Image I Editor Descriptor editor Image image Image editors To Images get editor if image null image editor get Image Descriptor create Image editors To Images put editor image return image  getImage IEditorDescriptor editorsToImages getImageDescriptor createImage editorsToImages
protected File Editor Mapping get Selected Resource Type Table Item items resource Type Table get Selection if items length 0 return File Editor Mapping items 0 get Data Table is single select else return null  FileEditorMapping getSelectedResourceType TableItem resourceTypeTable getSelection FileEditorMapping getData
protected I Editor Descriptor get Associated Editors if get Selected Resource Type null return null if editor Table get Item Count 0 Array List editor List new Array List for int i 0 i editor Table get Item Count i editor List add editor Table get Item i get Data return I Editor Descriptor editor List to Array new I Editor Descriptor editor List size else return null  IEditorDescriptor getAssociatedEditors getSelectedResourceType editorTable getItemCount ArrayList editorList ArrayList editorTable getItemCount editorList editorTable getItem getData IEditorDescriptor editorList toArray IEditorDescriptor editorList
public void handle Event Event event if event widget add Resource Type Button prompt For Resource Type else if event widget remove Resource Type Button remove Selected Resource Type else if event widget add Editor Button prompt For Editor else if event widget remove Editor Button remove Selected Editor else if event widget default Editor Button set Selected Editor As Default else if event widget resource Type Table fill Editor Table update Enabled State  handleEvent addResourceTypeButton promptForResourceType removeResourceTypeButton removeSelectedResourceType addEditorButton promptForEditor removeEditorButton removeSelectedEditor defaultEditorButton setSelectedEditorAsDefault resourceTypeTable fillEditorTable updateEnabledState
see I Workbench Preference Page public void init I Workbench a Workbench this workbench a Workbench no Default And Apply Button  IWorkbenchPreferencePage IWorkbench aWorkbench aWorkbench noDefaultAndApplyButton
protected Table Item new Resource Table Item I File Editor Mapping mapping int index boolean selected Image image mapping get Image Descriptor create Image false if image null images To Dispose add image Table Item item new Table Item resource Type Table SWT NULL index if image null item set Image image item set Text mapping get Label item set Data mapping if selected resource Type Table set Selection index return item  TableItem newResourceTableItem IFileEditorMapping getImageDescriptor createImage imagesToDispose TableItem TableItem resourceTypeTable setImage setText getLabel setData resourceTypeTable setSelection
This is a hook for sublcasses to do special things when the ok button is pressed For example reimplement this method if you want to save the page s data into the preference bundle public boolean perform Ok Table Item items resource Type Table get Items File Editor Mapping resource Types new File Editor Mapping items length for int i 0 i items length i resource Types i File Editor Mapping items i get Data Editor Registry registry Editor Registry Workbench Plugin get Default get Editor Registry cast to allow save to be called registry set File Editor Mappings resource Types registry save Associations return true  performOk TableItem resourceTypeTable getItems FileEditorMapping resourceTypes FileEditorMapping resourceTypes FileEditorMapping getData EditorRegistry EditorRegistry WorkbenchPlugin getDefault getEditorRegistry setFileEditorMappings resourceTypes saveAssociations
public void prompt For Editor Editor Selection Dialog dialog new Editor Selection Dialog get Control get Shell dialog set Editors To Filter get Associated Editors dialog set Message Workbench Messages format Choose the editor for file new Object get Selected Resource Type get Label NON NLS 1 if dialog open Dialog OK Editor Descriptor editor Editor Descriptor dialog get Selected Editor if editor null int i editor Table get Item Count boolean is Empty i 1 Table Item item new Table Item editor Table SWT NULL i item set Data editor if is Empty item set Text editor get Label Workbench Messages get String File Editor Preference default Label NON NLS 2 NON NLS 1 else item set Text editor get Label item set Image get Image editor editor Table set Selection i editor Table set Focus get Selected Resource Type add Editor editor update Selected Resource Type in case of new default  promptForEditor EditorSelectionDialog EditorSelectionDialog getControl getShell setEditorsToFilter getAssociatedEditors setMessage WorkbenchMessages Choose_the_editor_for_file getSelectedResourceType getLabel EditorDescriptor EditorDescriptor getSelectedEditor editorTable getItemCount isEmpty TableItem TableItem editorTable setData isEmpty setText getLabel WorkbenchMessages getString FileEditorPreference defaultLabel setText getLabel setImage getImage editorTable setSelection editorTable setFocus getSelectedResourceType addEditor updateSelectedResourceType
public void prompt For Resource Type File Extension Dialog dialog new File Extension Dialog get Control get Shell if dialog open Dialog OK String name dialog get Name String extension dialog get Extension add Resource Type name extension  promptForResourceType FileExtensionDialog FileExtensionDialog getControl getShell getName getExtension addResourceType
Remove the editor from the table public void remove Selected Editor Table Item items editor Table get Selection boolean default Editor editor Table get Selection Index 0 if items length 0 get Selected Resource Type remove Editor Editor Descriptor items 0 get Data items 0 dispose Table is single selection if default Editor editor Table get Item Count 0 Table Item item editor Table get Item 0 if item null item set Text Editor Descriptor item get Data get Label Workbench Messages get String File Editor Preference default Label NON NLS 2 NON NLS 1  removeSelectedEditor TableItem editorTable getSelection defaultEditor editorTable getSelectionIndex getSelectedResourceType removeEditor EditorDescriptor getData defaultEditor editorTable getItemCount TableItem editorTable getItem setText EditorDescriptor getData getLabel WorkbenchMessages getString FileEditorPreference defaultLabel
Remove the type from the table public void remove Selected Resource Type Table Item items resource Type Table get Selection if items length 0 items 0 dispose Table is single selection Clear out the editors too editor Table remove All  removeSelectedResourceType TableItem resourceTypeTable getSelection editorTable removeAll
public void set Selected Editor As Default Table Item items editor Table get Selection if items length 0 First change the label of the old default Table Item old Default Item editor Table get Item 0 old Default Item set Text Editor Descriptor old Default Item get Data get Label Now set the new default Editor Descriptor editor Editor Descriptor items 0 get Data get Selected Resource Type set Default Editor editor items 0 dispose Table is single selection Table Item item new Table Item editor Table SWT NULL 0 item set Data editor item set Text editor get Label Workbench Messages get String File Editor Preference default Label NON NLS 2 NON NLS 1 item set Image get Image editor editor Table set Selection new Table Item item  setSelectedEditorAsDefault TableItem editorTable getSelection TableItem oldDefaultItem editorTable getItem oldDefaultItem setText EditorDescriptor oldDefaultItem getData getLabel EditorDescriptor EditorDescriptor getData getSelectedResourceType setDefaultEditor TableItem TableItem editorTable setData setText getLabel WorkbenchMessages getString FileEditorPreference defaultLabel setImage getImage editorTable setSelection TableItem
public void update Enabled State Update enabled state boolean resource Type Selected resource Type Table get Selection Index 1 boolean editor Selected editor Table get Selection Index 1 remove Resource Type Button set Enabled resource Type Selected editor Label set Enabled resource Type Selected add Editor Button set Enabled resource Type Selected remove Editor Button set Enabled editor Selected default Editor Button set Enabled editor Selected  updateEnabledState resourceTypeSelected resourceTypeTable getSelectionIndex editorSelected editorTable getSelectionIndex removeResourceTypeButton setEnabled resourceTypeSelected editorLabel setEnabled resourceTypeSelected addEditorButton setEnabled resourceTypeSelected removeEditorButton setEnabled editorSelected defaultEditorButton setEnabled editorSelected
public void update Selected Resource Type Table Item item resource Type Table get Selection 0 Single select Image image I File Editor Mapping item get Data get Image Descriptor get Image images To Dispose add Element image item set Image image  updateSelectedResourceType TableItem resourceTypeTable getSelection IFileEditorMapping getData getImageDescriptor getImage imagesToDispose addElement setImage

private Button ok Button Constructs a new file extension dialog public File Extension Dialog Shell parent Shell super parent Shell  okButton FileExtensionDialog parentShell parentShell
protected void configure Shell Shell shell super configure Shell shell shell set Text Workbench Messages get String File Extension shell Title NON NLS 1 NON NLS 1 Workbench Help set Help shell I Help Context Ids FILE EXTENSION DIALOG  configureShell configureShell setText WorkbenchMessages getString FileExtension shellTitle WorkbenchHelp setHelp IHelpContextIds FILE_EXTENSION_DIALOG
Creates and returns the contents of the upper part of the dialog above the button bar Subclasses should overide param the parent composite to contain the dialog area return the dialog area control protected Control create Dialog Area Composite parent top level composite Composite parent Composite Composite super create Dialog Area parent create a composite with standard margins and spacing Composite contents new Composite parent Composite SWT NONE Grid Layout layout new Grid Layout layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING layout num Columns 2 contents set Layout layout contents set Layout Data new Grid Data Grid Data FILL BOTH contents set Font parent Composite get Font set Title Workbench Messages get String File Extension dialog Title NON NLS 1 set Message Workbench Messages get String File Extension file Type Message NON NLS 1 begin the layout Label label new Label contents SWT LEFT label set Text Workbench Messages get String File Extension file Type Label NON NLS 1 NON NLS 1 Grid Data data new Grid Data data horizontal Alignment Grid Data FILL label set Layout Data data label set Font parent get Font filename Field new Text contents SWT SINGLE SWT BORDER filename Field add Modify Listener new Modify Listener public void modify Text Modify Event event if event widget filename Field filename filename Field get Text trim ok Button set Enabled validate File Type data new Grid Data data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true filename Field set Layout Data data filename Field set Focus return contents  createDialogArea parentComposite createDialogArea parentComposite GridLayout GridLayout marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING numColumns setLayout setLayoutData GridData GridData FILL_BOTH setFont parentComposite getFont setTitle WorkbenchMessages getString FileExtension dialogTitle setMessage WorkbenchMessages getString FileExtension fileTypeMessage setText WorkbenchMessages getString FileExtension fileTypeLabel GridData GridData horizontalAlignment GridData setLayoutData setFont getFont filenameField filenameField addModifyListener ModifyListener modifyText ModifyEvent filenameField filenameField getText okButton setEnabled validateFileType GridData horizontalAlignment GridData grabExcessHorizontalSpace filenameField setLayoutData filenameField setFocus
protected void create Buttons For Button Bar Composite parent ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true ok Button set Enabled false create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL okButton setEnabled createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
Validate the user input for a file type private boolean validate File Type We need kernel api to validate the extension or a filename check for empty name and extension if filename length 0 set Error Message null return false check for empty extension if there is no name int index filename index Of if index filename length 1 if index 0 index 1 filename char At 0 set Error Message Workbench Messages get String File Extension extension Empty Message NON NLS 1 return false check for characters before or no other characters or next chatacter not index filename index Of if index 1 if filename length 1 set Error Message Workbench Messages get String File Extension extension Empty Message NON NLS 1 return false if index 0 filename char At 1 set Error Message Workbench Messages get String File Extension file Name Invalid Message NON NLS 1 return false set Error Message null return true  validateFileType setErrorMessage indexOf charAt setErrorMessage WorkbenchMessages getString FileExtension extensionEmptyMessage indexOf setErrorMessage WorkbenchMessages getString FileExtension extensionEmptyMessage charAt setErrorMessage WorkbenchMessages getString FileExtension fileNameInvalidMessage setErrorMessage
public String get Extension We need kernel api to validate the extension or a filename int index filename index Of if index 1 return NON NLS 1 if index filename length return NON NLS 1 return filename substring index 1 filename length  getExtension indexOf
public String get Name We need kernel api to validate the extension or a filename int index filename index Of if index 1 return filename if index 0 return NON NLS 1 return filename substring 0 index  getName indexOf

Create a new instance of the code Filtering Preference Content Provider code public Filtered Preference Content Provider no op  FilteringPreferenceContentProvider FilteredPreferenceContentProvider
public Object get Children Object parent Element Object children super get Children parent Element Array List filtered Children new Array List children length for int i 0 i children length i if Workbench Activity Helper filter Item children i continue filtered Children add children i return filtered Children to Array  getChildren parentElement getChildren parentElement ArrayList filteredChildren ArrayList WorkbenchActivityHelper filterItem filteredChildren filteredChildren toArray
public Object get Parent Object element Object parent super get Parent element if Workbench Activity Helper filter Item parent return null return parent  getParent getParent WorkbenchActivityHelper filterItem

Creates a new preference dialog under the control of the given preference manager param shell the parent shell param manager the preference manager public Filtered Preference Dialog Shell parent Shell Preference Manager manager super parent Shell manager  FilteredPreferenceDialog parentShell PreferenceManager parentShell
protected Tree Viewer create Tree Viewer Composite parent Tree Viewer tree super create Tree Viewer parent tree set Label Provider new Preference Label Provider tree set Content Provider new Filtered Preference Content Provider return tree  TreeViewer createTreeViewer TreeViewer createTreeViewer setLabelProvider PreferenceLabelProvider setContentProvider FilteredPreferenceContentProvider
Differs from super implementation in that if the node is found but should be filtered based on a call to code Workbench Activity Helper filter Item code then code null code is returned see org eclipse jface preference Preference Dialog find Node Matching java lang String protected I Preference Node find Node Matching String node Id I Preference Node node super find Node Matching node Id if Workbench Activity Helper filter Item node return null return node  WorkbenchActivityHelper filterItem PreferenceDialog findNodeMatching IPreferenceNode findNodeMatching nodeId IPreferenceNode findNodeMatching nodeId WorkbenchActivityHelper filterItem

Create a new instance of the receiver It will be created with a default pattern filter param parent the parent composite param tree Style the SWT style bits to be passed to the tree viewer public Filtered Tree Composite parent int tree Style this parent tree Style new Pattern Filter  treeStyle FilteredTree treeStyle treeStyle PatternFilter
see org eclipse swt events Key Adapter key Released org eclipse swt events Key Event public void key Released Key Event e pattern Filter set Pattern filter Field get Text tree Viewer refresh false  KeyAdapter keyReleased KeyEvent keyReleased KeyEvent patternFilter setPattern filterField getText treeViewer
public Filtered Tree Composite parent int tree Style Pattern Filter filter super parent SWT NONE pattern Filter filter Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 set Layout layout filter Field new Text this SWT SINGLE SWT BORDER filter Field add Key Listener new Key Adapter non Javadoc see org eclipse swt events Key Adapter key Released org eclipse swt events Key Event public void key Released Key Event e pattern Filter set Pattern filter Field get Text tree Viewer refresh false Grid Data data new Grid Data Grid Data FILL HORIZONTAL filter Field set Layout Data data tree Viewer new Tree Viewer this tree Style data new Grid Data Grid Data FILL BOTH tree Viewer get Control set Layout Data data tree Viewer add Filter pattern Filter  FilteredTree treeStyle PatternFilter patternFilter GridLayout GridLayout marginHeight marginWidth setLayout filterField filterField addKeyListener KeyAdapter KeyAdapter keyReleased KeyEvent keyReleased KeyEvent patternFilter setPattern filterField getText treeViewer GridData GridData GridData FILL_HORIZONTAL filterField setLayoutData treeViewer TreeViewer treeStyle GridData GridData FILL_BOTH treeViewer getControl setLayoutData treeViewer addFilter patternFilter
Get the tree viewer associated with this control return the tree viewer public Tree Viewer get Viewer return tree Viewer  TreeViewer getViewer treeViewer
Get the filter text field associated with this contro return the text field public Text get Filter Field return filter Field  getFilterField filterField

the list selection page class Selection Page extends Workbench Wizard List Selection Page Selection Page I Workbench w I Structured Selection ss Adaptable List e String s super w ss e s  SelectionPage WorkbenchWizardListSelectionPage SelectionPage IWorkbench IStructuredSelection AdaptableList
public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Help Context Ids IMPORT WIZARD SELECTION WIZARD PAGE  createControl createControl WorkbenchHelp setHelp getControl IHelpContextIds IMPORT_WIZARD_SELECTION_WIZARD_PAGE
public I Wizard Node create Wizard Node Workbench Wizard Element element return new Workbench Wizard Node this element public I Workbench Wizard create Wizard throws Core Exception return I Workbench Wizard wizard Element create Executable Extension  IWizardNode createWizardNode WorkbenchWizardElement WorkbenchWizardNode IWorkbenchWizard createWizard CoreException IWorkbenchWizard wizardElement createExecutableExtension
public I Wizard Node create Wizard Node Workbench Wizard Element element return new Workbench Wizard Node this element public I Workbench Wizard create Wizard throws Core Exception return I Workbench Wizard wizard Element create Executable Extension  IWizardNode createWizardNode WorkbenchWizardElement WorkbenchWizardNode IWorkbenchWizard createWizard CoreException IWorkbenchWizard wizardElement createExecutableExtension
Creates the wizard s pages lazily public void add Pages add Page new Selection Page this workbench this selection get Available Import Wizards Workbench Messages get String Import Wizard select Source NON NLS 1  addPages addPage SelectionPage getAvailableImportWizards WorkbenchMessages getString ImportWizard selectSource
Returns the import wizards that are available for invocation protected Adaptable List get Available Import Wizards return new Wizards Registry Reader I Workbench Constants PL IMPORT get Wizards  AdaptableList getAvailableImportWizards WizardsRegistryReader IWorkbenchConstants PL_IMPORT getWizards
Initializes the wizard public void init I Workbench a Workbench I Structured Selection current Selection this workbench a Workbench this selection current Selection set Window Title Workbench Messages get String Import Wizard title NON NLS 1 set Default Page Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG WIZBAN IMPORT WIZ set Needs Progress Monitor true  IWorkbench aWorkbench IStructuredSelection currentSelection aWorkbench currentSelection setWindowTitle WorkbenchMessages getString ImportWizard setDefaultPageImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_WIZBAN_IMPORT_WIZ setNeedsProgressMonitor
see org eclipse jface wizard I Wizard perform Finish public boolean perform Finish Selection Page get Pages 0 save Widget Values return true  IWizard performFinish performFinish SelectionPage getPages saveWidgetValues

public interface I Indented Table Label Provider extends I Table Label Provider Returns the indent level for the element This number will be used as the parameter to the code Table Item set Image Indent int code method param element the object representing the entire row or code null code indicating that no input object is set in the viewer  IIndentedTableLabelProvider ITableLabelProvider TableItem setImageIndent
public int get Indent Object element public Indented Table Viewer Composite parent super parent  getIndent IndentedTableViewer
super parent public Indented Table Viewer Composite parent int style super parent style  IndentedTableViewer
super parent style public Indented Table Viewer Table table super table  IndentedTableViewer
public void do Update Item Widget widget Object element boolean full Map if widget instanceof Table Item Table Item item Table Item widget if get Label Provider instanceof I Indented Table Label Provider I Indented Table Label Provider provider I Indented Table Label Provider get Label Provider item set Image Indent provider get Indent element super do Update Item widget element full Map  doUpdateItem fullMap TableItem TableItem TableItem getLabelProvider IIndentedTableLabelProvider IIndentedTableLabelProvider IIndentedTableLabelProvider getLabelProvider setImageIndent getIndent doUpdateItem fullMap

public interface I Property Page Contributor extends I Object Contributor Implement this method to add instances of Property Page class to the property page manager return true if pages were added false if not  IPropertyPageContributor IObjectContributor PropertyPage

List contents public List Content Provider  ListContentProvider
Implements I Structured Content Provider see org eclipse jface viewers I Structured Content Provider get Elements Object public Object get Elements Object input if contents null contents input return contents to Array return new Object 0  IStructuredContentProvider IStructuredContentProvider getElements getElements toArray
Implements I Content Provider see org eclipse jface viewers I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input if new Input instanceof List contents List new Input else contents null  IContentProvider IContentProvider inputChanged inputChanged oldInput newInput newInput newInput
Implements I Content Provider see org eclipse jface viewers I Content Provider dispose public void dispose  IContentProvider IContentProvider

Create the wizard pages public void add Pages New Wizards Registry Reader rdr new New Wizards Registry Reader projects Only Wizard Collection Element wizards rdr get Wizard Elements Workbench Wizard Element primary rdr get Primary Wizards if category Id null Wizard Collection Element categories wizards String Tokenizer family Tokenizer new String Tokenizer category Id CATEGORY SEPARATOR while family Tokenizer has More Elements categories get Child WithID categories family Tokenizer next Token if categories null break if categories null wizards categories main Page new New Wizard Selection Page this workbench this selection wizards primary add Page main Page  addPages NewWizardsRegistryReader NewWizardsRegistryReader projectsOnly WizardCollectionElement getWizardElements WorkbenchWizardElement getPrimaryWizards categoryId WizardCollectionElement StringTokenizer familyTokenizer StringTokenizer categoryId CATEGORY_SEPARATOR familyTokenizer hasMoreElements getChildWithID familyTokenizer nextToken mainPage NewWizardSelectionPage addPage mainPage
Returns the id of the category of wizards to show or code null code to show all categories If no entries can be found with this id then all categories are shown return String or code null code public String get Category Id return category Id  getCategoryId categoryId
Returns the child collection element for the given id private Wizard Collection Element get Child WithID Wizard Collection Element parent String id Object children parent get Children null for int i 0 i children length i Wizard Collection Element current Child Wizard Collection Element children i if current Child get Id equals id return current Child return null  WizardCollectionElement getChildWithID WizardCollectionElement getChildren WizardCollectionElement currentChild WizardCollectionElement currentChild getId currentChild
Lazily create the wizards pages public void init I Workbench a Workbench I Structured Selection current Selection this workbench a Workbench this selection current Selection if projects Only set Window Title Workbench Messages get String New Project title NON NLS 1 else set Window Title Workbench Messages get String New Wizard title NON NLS 1 set Default Page Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG WIZBAN NEW WIZ set Needs Progress Monitor true  IWorkbench aWorkbench IStructuredSelection currentSelection aWorkbench currentSelection projectsOnly setWindowTitle WorkbenchMessages getString NewProject setWindowTitle WorkbenchMessages getString NewWizard setDefaultPageImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_WIZBAN_NEW_WIZ setNeedsProgressMonitor
The user has pressed Finish Instruct self s pages to finish and answer a boolean indicating success return boolean public boolean perform Finish save our selection state main Page save Widget Values return true  performFinish mainPage saveWidgetValues
Sets the id of the category of wizards to show or code null code to show all categories If no entries can be found with this id then all categories are shown param id String or code null code public void set Category Id String id category Id id  setCategoryId categoryId
Sets the projects only flag If code true code only projects will be shown in this wizard public void set Projects Only boolean b projects Only b  setProjectsOnly projectsOnly

public boolean select Viewer viewer Object parent Element Object element Object children I Tree Content Provider Abstract Tree Viewer viewer get Content Provider get Children element if children length 0 return filter viewer element children length 0 if parent Element get Class equals Adaptable List class return true top level primary wizards should always be returned if Workbench Activity Helper filter Item element return false return true  parentElement ITreeContentProvider AbstractTreeViewer getContentProvider getChildren parentElement getClass AdaptableList WorkbenchActivityHelper filterItem

private Collator collator Collator get Instance Creates an instance of code New Wizard Collection Sorter code Since this is a stateless sorter it is only accessible as a singleton the private visibility of this constructor ensures this private New Wizard Collection Sorter super  getInstance NewWizardCollectionSorter NewWizardCollectionSorter
The compare method of the sort operation return the value code 0 code if the argument o1 is equal to o2 a value less than code 0 code if o1 is less than o2 and a value greater than code 0 code if o1 is greater than o2 public int compare Viewer viewer Object o1 Object o2 wizards before categories if o1 instanceof Workbench Wizard Element o2 instanceof Wizard Collection Element return 1 if o2 instanceof Workbench Wizard Element o1 instanceof Wizard Collection Element return 1 String name1 Workbench Adapter o1 get Label o1 String name2 Workbench Adapter o2 get Label o2 if name1 equals name2 return 0 Be sure that the examples category is at the end of the wizard categories if name2 equals Ignore Case New Wizards Registry Reader EXAMPLES WIZARD CATEGORY return 1 if name1 equals Ignore Case New Wizards Registry Reader EXAMPLES WIZARD CATEGORY return 1 note that this must be checked for name2 before name1 because if they re BOTH equal to BASE CATEGORY then we want to answer false by convention if name2 equals Ignore Case New Wizards Registry Reader BASE CATEGORY return 1 if name1 equals Ignore Case New Wizards Registry Reader BASE CATEGORY return 1 return collator compare name1 name2  WorkbenchWizardElement WizardCollectionElement WorkbenchWizardElement WizardCollectionElement WorkbenchAdapter getLabel WorkbenchAdapter getLabel equalsIgnoreCase NewWizardsRegistryReader EXAMPLES_WIZARD_CATEGORY equalsIgnoreCase NewWizardsRegistryReader EXAMPLES_WIZARD_CATEGORY BASE_CATEGORY equalsIgnoreCase NewWizardsRegistryReader BASE_CATEGORY equalsIgnoreCase NewWizardsRegistryReader BASE_CATEGORY
Return true if this sorter is affected by a property change of property Name on the specified element public boolean is Sorter Property Object object String property Id return property Id equals I Basic Property Constants P TEXT  propertyName isSorterProperty propertyId propertyId IBasicPropertyConstants P_TEXT

Create an instance of this class public New Wizard New Page New Wizard Selection Page main Page I Workbench a Workbench Wizard Collection Element wizard Categories Workbench Wizard Element primary Wizards this page main Page this wizard Categories wizard Categories this primary Wizards primary Wizards trim Primary Wizards if this primary Wizards length 0 if all Primary wizard Categories this wizard Categories null dont bother considering the categories as all wizards are primary need Show All false else need Show All all Activity Enabled wizard Categories else need Show All all Activity Enabled wizard Categories  NewWizardNewPage NewWizardSelectionPage mainPage IWorkbench aWorkbench WizardCollectionElement wizardCategories WorkbenchWizardElement primaryWizards mainPage wizardCategories wizardCategories primaryWizards primaryWizards trimPrimaryWizards primaryWizards allPrimary wizardCategories wizardCategories needShowAll needShowAll allActivityEnabled wizardCategories needShowAll allActivityEnabled wizardCategories
param category the wizard category return whether all of the wizards in the category are enabled via activity filtering private boolean all Activity Enabled Wizard Collection Element category Object wizards category get Wizards for int i 0 i wizards length i Workbench Wizard Element wizard Workbench Wizard Element wizards i if Workbench Activity Helper filter Item wizard return false Object children category get Children for int i 0 i children length i if all Activity Enabled Wizard Collection Element children i return false return true  allActivityEnabled WizardCollectionElement getWizards WorkbenchWizardElement WorkbenchWizardElement WorkbenchActivityHelper filterItem getChildren allActivityEnabled WizardCollectionElement
Remove all primary wizards that are not in the wizard collection private void trim Primary Wizards Array List new Primary Wizards new Array List primary Wizards length if wizard Categories null return No categories so nothing to trim for int i 0 i primary Wizards length i if wizard Categories find Wizard primary Wizards i getID true null new Primary Wizards add primary Wizards i primary Wizards Workbench Wizard Element new Primary Wizards to Array new Workbench Wizard Element new Primary Wizards size  trimPrimaryWizards ArrayList newPrimaryWizards ArrayList primaryWizards wizardCategories primaryWizards wizardCategories findWizard primaryWizards newPrimaryWizards primaryWizards primaryWizards WorkbenchWizardElement newPrimaryWizards toArray WorkbenchWizardElement newPrimaryWizards
param category the wizard category return whether all wizards in the category are considered primary private boolean all Primary Wizard Collection Element category Object wizards category get Wizards for int i 0 i wizards length i Workbench Wizard Element wizard Workbench Wizard Element wizards i if is Primary wizard return false Object children category get Children for int i 0 i children length i if all Primary Wizard Collection Element children i return false return true  allPrimary WizardCollectionElement getWizards WorkbenchWizardElement WorkbenchWizardElement isPrimary getChildren allPrimary WizardCollectionElement
param wizard return whether the given wizard is primary private boolean is Primary Workbench Wizard Element wizard for int j 0 j primary Wizards length j if primary Wizards j equals wizard return true return false  isPrimary WorkbenchWizardElement primaryWizards primaryWizards
since 3 0 public void activate page set Description Workbench Messages get String New Wizard New Page description NON NLS 1  setDescription WorkbenchMessages getString NewWizardNewPage
Create this tab s visual components param parent Composite return Control protected Control create Control Composite parent Font wizard Font parent get Font top level group Composite outer Container new Composite parent SWT NONE Grid Layout layout new Grid Layout outer Container set Layout layout Label wizard Label new Label outer Container SWT NONE Grid Data data new Grid Data Grid Data FILL VERTICAL wizard Label set Font wizard Font wizard Label set Text Workbench Messages get String New Wizard New Page wizards Label NON NLS 1 Composite inner Container new Composite outer Container SWT NONE layout new Grid Layout 2 false layout margin Height 0 layout margin Width 0 inner Container set Layout layout inner Container set Font wizard Font data new Grid Data Grid Data FILL BOTH inner Container set Layout Data data create Viewer inner Container create Image inner Container update Description null wizard actions pane create SWT table directly to get single selection mode instead of multi selection restore Widget Values return outer Container  createControl wizardFont getFont outerContainer GridLayout GridLayout outerContainer setLayout wizardLabel outerContainer GridData GridData GridData FILL_VERTICAL wizardLabel setFont wizardFont wizardLabel setText WorkbenchMessages getString NewWizardNewPage wizardsLabel innerContainer outerContainer GridLayout marginHeight marginWidth innerContainer setLayout innerContainer setFont wizardFont GridData GridData FILL_BOTH innerContainer setLayoutData createViewer innerContainer createImage innerContainer updateDescription restoreWidgetValues outerContainer
public void widget Disposed Dispose Event e for Iterator i image Table values iterator i has Next Image i next dispose image Table clear  widgetDisposed DisposeEvent imageTable hasNext imageTable
Create the image controls param parent the parent code Composite code since 3 0 private void create Image Composite parent desc Image Canvas new C Label parent SWT NONE Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING Grid Data VERTICAL ALIGN BEGINNING desc Image Canvas set Layout Data data hook a listener to get rid of cached images desc Image Canvas add Dispose Listener new Dispose Listener non Javadoc see org eclipse swt events Dispose Listener widget Disposed org eclipse swt events Dispose Event public void widget Disposed Dispose Event e for Iterator i image Table values iterator i has Next Image i next dispose image Table clear  createImage descImageCanvas CLabel GridData GridData GridData HORIZONTAL_ALIGN_BEGINNING GridData VERTICAL_ALIGN_BEGINNING descImageCanvas setLayoutData descImageCanvas addDisposeListener DisposeListener DisposeListener widgetDisposed DisposeEvent widgetDisposed DisposeEvent imageTable hasNext imageTable
public void double Click Double Click Event event I Structured Selection s I Structured Selection event get Selection Object element s get First Element if viewer is Expandable element viewer set Expanded State element viewer get Expanded State element else if element instanceof Workbench Wizard Element page advance To Next Page  doubleClick DoubleClickEvent IStructuredSelection IStructuredSelection getSelection getFirstElement isExpandable setExpandedState getExpandedState WorkbenchWizardElement advanceToNextPage
public void widget Selected Selection Event e boolean show All show All Check get Selection if show All expanded Elements viewer get Expanded Elements if show All viewer get Control set Redraw false try if show All viewer reset Filters viewer set Expanded Elements expanded Elements else viewer add Filter filter viewer refresh false finally if show All viewer get Control set Redraw true  widgetSelected SelectionEvent showAll showAllCheck getSelection showAll expandedElements getExpandedElements showAll getControl setRedraw showAll resetFilters setExpandedElements expandedElements addFilter showAll getControl setRedraw
see org eclipse swt events Selection Listener widget Selected org eclipse swt events Selection Event public void widget Selected Selection Event e Workbench Help display Help Resource wizard Help Href  SelectionListener widgetSelected SelectionEvent widgetSelected SelectionEvent WorkbenchHelp displayHelpResource wizardHelpHref
Create a new viewer in the parent param parent the parent code Composite code since 3 0 private void create Viewer Composite parent Composite composite new Composite parent SWT NONE Grid Data data new Grid Data Grid Data FILL BOTH data width Hint SIZING VIEWER WIDTH boolean needs Hint Dialog Util in Regular Font Mode parent Only give a height hint if the dialog is going to be too small if needs Hint data height Hint SIZING LISTS HEIGHT composite set Layout Data data Grid Layout layout new Grid Layout 2 false layout margin Height 0 layout margin Width 0 composite set Layout layout Tree tree new Tree composite SWT SINGLE SWT H SCROLL SWT V SCROLL SWT BORDER viewer new Tree Viewer tree viewer set Content Provider new Wizard Content Provider viewer set Label Provider new Workbench Label Provider viewer set Sorter New Wizard Collection Sorter INSTANCE viewer add Selection Changed Listener this viewer add Double Click Listener this Array List input Array new Array List for int i 0 i primary Wizards length i input Array add primary Wizards i boolean expand Top false if wizard Categories null if wizard Categories get Parent wizard Categories null Object children wizard Categories get Children for int i 0 i children length i input Array add children i else expand Top true input Array add wizard Categories ensure the category is expanded If there is a remembered expansion it will be set later if expand Top viewer set Auto Expand Level 2 Adaptable List input new Adaptable List input Array viewer set Input input tree set Font parent get Font viewer add Double Click Listener new I Double Click Listener non Javadoc see org eclipse jface viewers I Double Click Listener double Click org eclipse jface viewers Double Click Event public void double Click Double Click Event event I Structured Selection s I Structured Selection event get Selection Object element s get First Element if viewer is Expandable element viewer set Expanded State element viewer get Expanded State element else if element instanceof Workbench Wizard Element page advance To Next Page data new Grid Data Grid Data FILL BOTH data horizontal Span 2 tree set Layout Data data if need Show All show All Check new Button composite SWT CHECK data new Grid Data show All Check set Layout Data data show All Check set Font parent get Font show All Check set Text Workbench Messages get String New Wizard New Page show All NON NLS 1 show All Check set Selection false flipping tabs updates the selected node show All Check add Selection Listener new Selection Adapter private Object expanded Elements new Object 0 public void widget Selected Selection Event e boolean show All show All Check get Selection if show All expanded Elements viewer get Expanded Elements if show All viewer get Control set Redraw false try if show All viewer reset Filters viewer set Expanded Elements expanded Elements else viewer add Filter filter viewer refresh false finally if show All viewer get Control set Redraw true Image button Image Workbench Images get Image I Workbench Graphic Constants IMG LCL LINKTO HELP Tool Bar tool Bar new Tool Bar composite SWT FLAT help Button new Tool Item tool Bar SWT NONE help Button set Image button Image help Button set Enabled false help Button set Tool Tip Text Workbench Messages get String New Wizard New Page more Help NON NLS 1 data new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data VERTICAL ALIGN END if need Show All data horizontal Span 2 tool Bar set Layout Data data help Button add Selection Listener new Selection Adapter non Javadoc see org eclipse swt events Selection Listener widget Selected org eclipse swt events Selection Event public void widget Selected Selection Event e Workbench Help display Help Resource wizard Help Href  createViewer GridData GridData GridData FILL_BOTH widthHint SIZING_VIEWER_WIDTH needsHint DialogUtil inRegularFontMode needsHint heightHint SIZING_LISTS_HEIGHT setLayoutData GridLayout GridLayout marginHeight marginWidth setLayout H_SCROLL V_SCROLL TreeViewer setContentProvider WizardContentProvider setLabelProvider WorkbenchLabelProvider setSorter NewWizardCollectionSorter addSelectionChangedListener addDoubleClickListener ArrayList inputArray ArrayList primaryWizards inputArray primaryWizards expandTop wizardCategories wizardCategories getParent wizardCategories wizardCategories getChildren inputArray expandTop inputArray wizardCategories expandTop setAutoExpandLevel AdaptableList AdaptableList inputArray setInput setFont getFont addDoubleClickListener IDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent doubleClick DoubleClickEvent IStructuredSelection IStructuredSelection getSelection getFirstElement isExpandable setExpandedState getExpandedState WorkbenchWizardElement advanceToNextPage GridData GridData FILL_BOTH horizontalSpan setLayoutData needShowAll showAllCheck GridData showAllCheck setLayoutData showAllCheck setFont getFont showAllCheck setText WorkbenchMessages getString NewWizardNewPage showAll showAllCheck setSelection showAllCheck addSelectionListener SelectionAdapter expandedElements widgetSelected SelectionEvent showAll showAllCheck getSelection showAll expandedElements getExpandedElements showAll getControl setRedraw showAll resetFilters setExpandedElements expandedElements addFilter showAll getControl setRedraw buttonImage WorkbenchImages getImage IWorkbenchGraphicConstants IMG_LCL_LINKTO_HELP ToolBar toolBar ToolBar helpButton ToolItem toolBar helpButton setImage buttonImage helpButton setEnabled helpButton setToolTipText WorkbenchMessages getString NewWizardNewPage moreHelp GridData GridData HORIZONTAL_ALIGN_END GridData VERTICAL_ALIGN_END needShowAll horizontalSpan toolBar setLayoutData helpButton addSelectionListener SelectionAdapter SelectionListener widgetSelected SelectionEvent widgetSelected SelectionEvent WorkbenchHelp displayHelpResource wizardHelpHref
A wizard in the wizard viewer has been double clicked Treat it as a selection public void double Click Double Click Event event selection Changed new Selection Changed Event event get Viewer event get Viewer get Selection page advance To Next Page  doubleClick DoubleClickEvent selectionChanged SelectionChangedEvent getViewer getViewer getSelection advanceToNextPage
Expands the wizard categories in this page s category viewer that were expanded last time this page was used If a category that was previously expanded no longer exists then it is ignored protected void expand Previously Expanded Categories boolean show All settings get Boolean SHOW ALL ENABLED if show All Check null show All Check set Selection show All if show All viewer reset Filters else viewer add Filter filter viewer refresh false String expanded Category Paths settings get Array STORE EXPANDED CATEGORIES ID if expanded Category Paths null expanded Category Paths length 0 return List categories To Expand new Array List expanded Category Paths length if wizard Categories null for int i 0 i expanded Category Paths length i Wizard Collection Element category wizard Categories find Child Collection new Path expanded Category Paths i if category null ie it still exists categories To Expand add category if categories To Expand is Empty viewer set Expanded Elements categories To Expand to Array  expandPreviouslyExpandedCategories showAll getBoolean SHOW_ALL_ENABLED showAllCheck showAllCheck setSelection showAll showAll resetFilters addFilter expandedCategoryPaths getArray STORE_EXPANDED_CATEGORIES_ID expandedCategoryPaths expandedCategoryPaths categoriesToExpand ArrayList expandedCategoryPaths wizardCategories expandedCategoryPaths WizardCollectionElement wizardCategories findChildCollection expandedCategoryPaths categoriesToExpand categoriesToExpand isEmpty setExpandedElements categoriesToExpand toArray
Returns the single selected object contained in the passed selection Event or code null code if the selection Event contains either 0 or 2 selected objects protected Object get Single Selection I Structured Selection selection return selection size 1 selection get First Element null  selectionEvent selectionEvent getSingleSelection IStructuredSelection getFirstElement
Set self s widgets to the values that they held last time this page was open protected void restore Widget Values expand Previously Expanded Categories select Previously Selected  restoreWidgetValues expandPreviouslyExpandedCategories selectPreviouslySelected
Store the current values of self s widgets so that they can be restored in the next instance of self public void save Widget Values store Expanded Categories store Selected Category And Wizard  saveWidgetValues storeExpandedCategories storeSelectedCategoryAndWizard
The user selected either new wizard category s or wizard element s Proceed accordingly param new Selection I Selection public void selection Changed Selection Changed Event selection Event page set Error Message null page set Message null Object selected Object get Single Selection I Structured Selection selection Event get Selection if selected Object instanceof Workbench Wizard Element if selected Object selected Element return update Wizard Selection Workbench Wizard Element selected Object else selected Element null page select Wizard Node null update Description null  newSelection ISelection selectionChanged SelectionChangedEvent selectionEvent setErrorMessage setMessage selectedObject getSingleSelection IStructuredSelection selectionEvent getSelection selectedObject WorkbenchWizardElement selectedObject selectedElement updateWizardSelection WorkbenchWizardElement selectedObject selectedElement selectWizardNode updateDescription
final Structured Selection selection new Structured Selection selected viewer get Control get Display async Exec new Runnable public void run viewer set Selection selection true  StructuredSelection StructuredSelection getControl getDisplay asyncExec setSelection
Selects the wizard category and wizard in this page that were selected last time this page was used If a category or wizard that was previously selected no longer exists then it is ignored protected void select Previously Selected String selected Id settings get STORE SELECTED ID if selected Id null return if wizard Categories null return Object selected wizard Categories find Child Collection new Path selected Id if selected null selected wizard Categories find Wizard selected Id true if selected null if we cant find either a category or a wizard abort return work around for 62039 final Structured Selection selection new Structured Selection selected viewer get Control get Display async Exec new Runnable public void run viewer set Selection selection true  selectPreviouslySelected selectedId STORE_SELECTED_ID selectedId wizardCategories wizardCategories findChildCollection selectedId wizardCategories findWizard selectedId StructuredSelection StructuredSelection getControl getDisplay asyncExec setSelection
Set the dialog store to use for widget value storage and retrieval param settings I Dialog Settings public void set Dialog Settings I Dialog Settings settings this settings settings  IDialogSettings setDialogSettings IDialogSettings
Stores the collection of currently expanded categories in this page s dialog store in order to recreate this page s state in the next instance of this page protected void store Expanded Categories Object expanded Elements viewer get Expanded Elements List expanded Element Paths new Array List expanded Elements length for int i 0 i expanded Elements length i if expanded Elements i instanceof Wizard Collection Element expanded Element Paths add Wizard Collection Element expanded Elements i get Path to String settings put STORE EXPANDED CATEGORIES ID String expanded Element Paths to Array new String expanded Element Paths size  storeExpandedCategories expandedElements getExpandedElements expandedElementPaths ArrayList expandedElements expandedElements expandedElements WizardCollectionElement expandedElementPaths WizardCollectionElement expandedElements getPath toString STORE_EXPANDED_CATEGORIES_ID expandedElementPaths toArray expandedElementPaths
Stores the currently selected element in this page s dialog store in order to recreate this page s state in the next instance of this page protected void store Selected Category And Wizard if show All Check null show All Check get Selection settings put SHOW ALL ENABLED true else settings put SHOW ALL ENABLED false Object selected get Single Selection I Structured Selection viewer get Selection if selected null if selected instanceof Wizard Collection Element settings put STORE SELECTED ID Wizard Collection Element selected get Path to String else else its a wizard settings put STORE SELECTED ID Workbench Wizard Element selected getID  storeSelectedCategoryAndWizard showAllCheck showAllCheck getSelection SHOW_ALL_ENABLED SHOW_ALL_ENABLED getSingleSelection IStructuredSelection getSelection WizardCollectionElement STORE_SELECTED_ID WizardCollectionElement getPath toString STORE_SELECTED_ID WorkbenchWizardElement
Update the current description controls param selected Object the new wizard since 3 0 private void update Description Workbench Wizard Element selected Object String string NON NLS 1 if selected Object null string selected Object get Description page set Description string if selected Object null wizard Help Href selected Object get Help Href else wizard Help Href null if wizard Help Href null help Button set Enabled true else help Button set Enabled false if has Image selected Object Image Descriptor descriptor null if selected Object null descriptor selected Object get Description Image if descriptor null Image image Image image Table get descriptor if image null image descriptor create Image false image Table put descriptor image desc Image Canvas set Image image else desc Image Canvas set Image null desc Image Canvas get Parent layout true I Wizard Container container page get Wizard get Container if container instanceof I Wizard Container2 I Wizard Container2 container update Size  selectedObject updateDescription WorkbenchWizardElement selectedObject selectedObject selectedObject getDescription setDescription selectedObject wizardHelpHref selectedObject getHelpHref wizardHelpHref wizardHelpHref helpButton setEnabled helpButton setEnabled hasImage selectedObject ImageDescriptor selectedObject selectedObject getDescriptionImage imageTable createImage imageTable descImageCanvas setImage descImageCanvas setImage descImageCanvas getParent IWizardContainer getWizard getContainer IWizardContainer2 IWizardContainer2 updateSize
Tests whether the given wizard has an associated image param selected Object the wizard to test return whether the given wizard has an associated image private boolean has Image Workbench Wizard Element selected Object if selected Object null return false if selected Object get Description Image null return true return false  selectedObject hasImage WorkbenchWizardElement selectedObject selectedObject selectedObject getDescriptionImage
page selected Object public I Workbench Wizard create Wizard throws Core Exception return I New Wizard wizard Element create Executable Extension  selectedObject IWorkbenchWizard createWizard CoreException INewWizard wizardElement createExecutableExtension
param selected Object private void update Wizard Selection Workbench Wizard Element selected Object selected Element selected Object Workbench Wizard Node selected Node if selected Wizards contains Key selected Object selected Node Workbench Wizard Node selected Wizards get selected Object else selected Node new Workbench Wizard Node page selected Object public I Workbench Wizard create Wizard throws Core Exception return I New Wizard wizard Element create Executable Extension selected Wizards put selected Object selected Node page select Wizard Node selected Node update Description selected Object  selectedObject updateWizardSelection WorkbenchWizardElement selectedObject selectedElement selectedObject WorkbenchWizardNode selectedNode selectedWizards containsKey selectedObject selectedNode WorkbenchWizardNode selectedWizards selectedObject selectedNode WorkbenchWizardNode selectedObject IWorkbenchWizard createWizard CoreException INewWizard wizardElement createExecutableExtension selectedWizards selectedObject selectedNode selectWizardNode selectedNode updateDescription selectedObject

private Workbench Wizard Element primary Wizards Create an instance of this class public New Wizard Selection Page I Workbench a Workbench I Structured Selection current Selection Wizard Collection Element elements Workbench Wizard Element primary override what superclass does with elements super new Wizard Selection Page a Workbench current Selection null NON NLS 1 set Title Workbench Messages get String New Wizard Selection Page description NON NLS 1 wizard Categories elements primary Wizards primary  WorkbenchWizardElement primaryWizards NewWizardSelectionPage IWorkbench aWorkbench IStructuredSelection currentSelection WizardCollectionElement WorkbenchWizardElement newWizardSelectionPage aWorkbench currentSelection setTitle WorkbenchMessages getString NewWizardSelectionPage wizardCategories primaryWizards
Makes the next page visible public void advance To Next Page get Container show Page get Next Page  advanceToNextPage getContainer showPage getNextPage
non Javadoc Method declared on I Dialog Page public void create Control Composite parent I Dialog Settings settings get Dialog Settings new Resource Page new New Wizard New Page this this workbench wizard Categories primary Wizards new Resource Page set Dialog Settings settings Control control new Resource Page create Control parent Workbench Help set Help control I Help Context Ids NEW WIZARD SELECTION WIZARD PAGE set Control control  IDialogPage createControl IDialogSettings getDialogSettings newResourcePage NewWizardNewPage wizardCategories primaryWizards newResourcePage setDialogSettings newResourcePage createControl WorkbenchHelp setHelp IHelpContextIds NEW_WIZARD_SELECTION_WIZARD_PAGE setControl
Since Finish was pressed write widget values to the dialog store so that they will persist into the next invocation of this wizard page protected void save Widget Values new Resource Page save Widget Values  saveWidgetValues newResourcePage saveWidgetValues

public Object filter Viewer viewer Object parent Object elements if matcher null return elements Object filtered Object cache get parent if filtered null filtered super filter viewer parent elements cache put parent filtered return filtered 
public boolean select Viewer viewer Object parent Element Object element Object children I Tree Content Provider Abstract Tree Viewer viewer get Content Provider get Children element if children length 0 return filter viewer element children length 0 String label Text I Label Provider Structured Viewer viewer get Label Provider get Text element return match label Text  parentElement ITreeContentProvider AbstractTreeViewer getContentProvider getChildren labelText ILabelProvider StructuredViewer getLabelProvider getText labelText
param pattern public void set Pattern String pattern String cache clear if pattern String null pattern String equals NON NLS 1 matcher null else matcher new String Matcher pattern String true false NON NLS 1  setPattern patternString patternString patternString StringMatcher patternString
Answers whether the given String matches the pattern param string the String to test return whether the string matches the pattern protected boolean match String string return matcher match string 

Create a new code Persp Content Provider code public Persp Content Provider no op  PerspContentProvider PerspContentProvider
see org eclipse jface viewers I Content Provider dispose public void dispose no op  IContentProvider
public Object get Elements Object element if element instanceof I Perspective Registry return I Perspective Registry element get Perspectives return null  getElements IPerspectiveRegistry IPerspectiveRegistry getPerspectives
java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input no op  inputChanged oldInput newInput

Creates the page s UI content protected Control create Contents Composite parent issue if the product subclasses this page then it should provide the help content Workbench Help set Help parent I Help Context Ids PERSPECTIVES PREFERENCE PAGE Composite composite create Composite parent create Open Persp Button Group composite create Open View Button Group composite create Customize Perspective composite return composite  createContents WorkbenchHelp setHelp IHelpContextIds PERSPECTIVES_PREFERENCE_PAGE createComposite createOpenPerspButtonGroup createOpenViewButtonGroup createCustomizePerspective
Creates the composite which will contain all the preference controls for this page param parent the parent composite return the composite for this page protected Composite create Composite Composite parent Composite composite new Composite parent SWT NONE Grid Data data new Grid Data Grid Data FILL BOTH composite set Layout Data data composite set Font parent get Font Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 layout vertical Spacing 10 composite set Layout layout return composite  createComposite GridData GridData GridData FILL_BOTH setLayoutData setFont getFont GridLayout GridLayout marginWidth marginHeight verticalSpacing setLayout
open Same Window Button set Font font open Same Window Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e open Persp Mode I Preference Constants OPM ACTIVE PAGE  openSameWindowButton setFont openSameWindowButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent openPerspMode IPreferenceConstants OPM_ACTIVE_PAGE
open New Window Button set Font font open New Window Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e open Persp Mode I Preference Constants OPM NEW WINDOW  openNewWindowButton setFont openNewWindowButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent openPerspMode IPreferenceConstants OPM_NEW_WINDOW
Create a composite that contains buttons for selecting the open perspective mode param composite the parent composite protected void create Open Persp Button Group Composite composite Font font composite get Font Group button Composite new Group composite SWT LEFT button Composite set Text OPM TITLE button Composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL button Composite set Font composite get Font Grid Layout layout new Grid Layout layout num Columns 2 button Composite set Layout layout open Same Window Button new Button button Composite SWT RADIO open Same Window Button set Text OPM SAME WINDOW open Same Window Button set Selection I Preference Constants OPM ACTIVE PAGE open Persp Mode open Same Window Button set Font font open Same Window Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e open Persp Mode I Preference Constants OPM ACTIVE PAGE open New Window Button new Button button Composite SWT RADIO open New Window Button set Text OPM NEW WINDOW open New Window Button set Selection I Preference Constants OPM NEW WINDOW open Persp Mode open New Window Button set Font font open New Window Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e open Persp Mode I Preference Constants OPM NEW WINDOW  createOpenPerspButtonGroup getFont buttonComposite buttonComposite setText OPM_TITLE buttonComposite setLayoutData GridData GridData FILL_HORIZONTAL buttonComposite setFont getFont GridLayout GridLayout numColumns buttonComposite setLayout openSameWindowButton buttonComposite openSameWindowButton setText OPM_SAME_WINDOW openSameWindowButton setSelection IPreferenceConstants OPM_ACTIVE_PAGE openPerspMode openSameWindowButton setFont openSameWindowButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent openPerspMode IPreferenceConstants OPM_ACTIVE_PAGE openNewWindowButton buttonComposite openNewWindowButton setText OPM_NEW_WINDOW openNewWindowButton setSelection IPreferenceConstants OPM_NEW_WINDOW openPerspMode openNewWindowButton setFont openNewWindowButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent openPerspMode IPreferenceConstants OPM_NEW_WINDOW
open View Mode I Preference Constants OVM EMBED open Embed Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e open View Mode I Preference Constants OVM EMBED  openViewMode IPreferenceConstants OVM_EMBED openEmbedButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent openViewMode IPreferenceConstants OVM_EMBED
open View Mode I Preference Constants OVM FAST open Fast Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e open View Mode I Preference Constants OVM FAST  openViewMode IPreferenceConstants OVM_FAST openFastButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent openViewMode IPreferenceConstants OVM_FAST
Creates a composite that contains buttons for selecting open view mode param composite the parent composite protected void create Open View Button Group Composite composite Font font composite get Font Group button Composite new Group composite SWT LEFT button Composite set Text OVM TITLE button Composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL button Composite set Font composite get Font Grid Layout layout new Grid Layout layout num Columns 2 button Composite set Layout layout open Embed Button new Button button Composite SWT RADIO open Embed Button set Text OVM EMBED open Embed Button set Selection open View Mode I Preference Constants OVM EMBED open Embed Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e open View Mode I Preference Constants OVM EMBED open Embed Button set Font font Open view as float no longer supported if open View Mode I Preference Constants OVM FLOAT open View Mode I Preference Constants OVM FAST open Fast Button new Button button Composite SWT RADIO open Fast Button set Text OVM FAST open Fast Button set Selection open View Mode I Preference Constants OVM FAST open Fast Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e open View Mode I Preference Constants OVM FAST open Fast Button set Font font  createOpenViewButtonGroup getFont buttonComposite buttonComposite setText OVM_TITLE buttonComposite setLayoutData GridData GridData FILL_HORIZONTAL buttonComposite setFont getFont GridLayout GridLayout numColumns buttonComposite setLayout openEmbedButton buttonComposite openEmbedButton setText OVM_EMBED openEmbedButton setSelection openViewMode IPreferenceConstants OVM_EMBED openEmbedButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent openViewMode IPreferenceConstants OVM_EMBED openEmbedButton setFont openViewMode IPreferenceConstants OVM_FLOAT openViewMode IPreferenceConstants OVM_FAST openFastButton buttonComposite openFastButton setText OVM_FAST openFastButton setSelection openViewMode IPreferenceConstants OVM_FAST openFastButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent openViewMode IPreferenceConstants OVM_FAST openFastButton setFont
list new List perspectives Component SWT H SCROLL SWT V SCROLL SWT BORDER list add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Buttons  perspectivesComponent H_SCROLL V_SCROLL addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateButtons
Create a table of 3 buttons to enable the user to manage customized perspectives param parent the parent for the button parent return Composite that the buttons are created in protected Composite create Customize Perspective Composite parent Font font parent get Font define container its gridding Composite perspectives Component new Composite parent SWT NONE perspectives Component set Layout Data new Grid Data Grid Data FILL BOTH perspectives Component set Font parent get Font Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width 0 layout margin Height 0 perspectives Component set Layout layout Add the label Label label new Label perspectives Component SWT LEFT label set Text Workbench Messages get String Perspectives Preference available NON NLS 1 Grid Data data new Grid Data data horizontal Span 2 label set Layout Data data label set Font font Add perspective list list new List perspectives Component SWT H SCROLL SWT V SCROLL SWT BORDER list add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Buttons list set Font font data new Grid Data Grid Data FILL BOTH data grab Excess Horizontal Space true data grab Excess Vertical Space true list set Layout Data data Populate the perspective list I Perspective Descriptor persps perspective Registry get Perspectives perspectives new Array List persps length for int i 0 i persps length i perspectives add i persps i default Perspective Id perspective Registry get Default Perspective update List Create vertical button bar Composite button Bar Composite create Vertical Button Bar perspectives Component data new Grid Data Grid Data FILL VERTICAL button Bar set Layout Data data return perspectives Component  createCustomizePerspective getFont perspectivesComponent perspectivesComponent setLayoutData GridData GridData FILL_BOTH perspectivesComponent setFont getFont GridLayout GridLayout numColumns marginWidth marginHeight perspectivesComponent setLayout perspectivesComponent setText WorkbenchMessages getString PerspectivesPreference GridData GridData horizontalSpan setLayoutData setFont perspectivesComponent H_SCROLL V_SCROLL addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateButtons setFont GridData GridData FILL_BOTH grabExcessHorizontalSpace grabExcessVerticalSpace setLayoutData IPerspectiveDescriptor perspectiveRegistry getPerspectives ArrayList defaultPerspectiveId perspectiveRegistry getDefaultPerspective updateList buttonBar createVerticalButtonBar perspectivesComponent GridData GridData FILL_VERTICAL buttonBar setLayoutData perspectivesComponent
button add Selection Listener new Selection Adapter public void widget Selected Selection Event event vertical Button Pressed event widget  addSelectionListener SelectionAdapter widgetSelected SelectionEvent verticalButtonPressed
Creates a new vertical button with the given id p The default implementation of this framework method creates a standard push button registers for selection events including button presses and help requests and registers default buttons with its shell The button id is stored as the buttons client data p param parent the parent composite param label the label from the button param default Button code true code if the button is to be the default button and code false code otherwise return Button The created button protected Button create Vertical Button Composite parent String label boolean default Button Button button new Button parent SWT PUSH button set Text label Grid Data data set Button Layout Data button data horizontal Alignment Grid Data FILL button add Selection Listener new Selection Adapter public void widget Selected Selection Event event vertical Button Pressed event widget button set Tool Tip Text label if default Button Shell shell parent get Shell if shell null shell set Default Button button button set Font parent get Font return button  defaultButton createVerticalButton defaultButton setText GridData setButtonLayoutData horizontalAlignment GridData addSelectionListener SelectionAdapter widgetSelected SelectionEvent verticalButtonPressed setToolTipText defaultButton getShell setDefaultButton setFont getFont
Creates and returns the vertical button bar param parent the parent composite to contain the button bar return the button bar control protected Control create Vertical Button Bar Composite parent Create composite Composite composite new Composite parent SWT NULL create a layout with spacing and margins appropriate for the font size Grid Layout layout new Grid Layout layout num Columns 1 layout margin Width 5 layout margin Height 0 layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING composite set Layout layout composite set Font parent get Font Add the buttons to the button bar set Default Button create Vertical Button composite Workbench Messages get String Perspectives Preference Make Default false NON NLS 1 set Default Button set Tool Tip Text Workbench Messages get String Perspectives Preference Make Default Tip NON NLS 1 revert Button create Vertical Button composite Workbench Messages get String Perspectives Preference Reset false NON NLS 1 revert Button set Tool Tip Text Workbench Messages get String Perspectives Preference Reset Tip NON NLS 1 delete Button create Vertical Button composite Workbench Messages get String Perspectives Preference Delete false NON NLS 1 delete Button set Tool Tip Text Workbench Messages get String Perspectives Preference Delete Tip NON NLS 1 update Buttons return composite  createVerticalButtonBar GridLayout GridLayout numColumns marginWidth marginHeight horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING setLayout setFont getFont setDefaultButton createVerticalButton WorkbenchMessages getString PerspectivesPreference MakeDefault setDefaultButton setToolTipText WorkbenchMessages getString PerspectivesPreference MakeDefaultTip revertButton createVerticalButton WorkbenchMessages getString PerspectivesPreference revertButton setToolTipText WorkbenchMessages getString PerspectivesPreference ResetTip deleteButton createVerticalButton WorkbenchMessages getString PerspectivesPreference deleteButton setToolTipText WorkbenchMessages getString PerspectivesPreference DeleteTip updateButtons
see I Workbench Preference Page public void init I Workbench a Workbench this workbench a Workbench this perspective Registry Perspective Registry workbench get Perspective Registry I Preference Store store Workbench Plugin get Default get Preference Store set Preference Store store open View Mode store get Int I Preference Constants OPEN VIEW MODE open Persp Mode store get Int I Preference Constants OPEN PERSP MODE  IWorkbenchPreferencePage IWorkbench aWorkbench aWorkbench perspectiveRegistry PerspectiveRegistry getPerspectiveRegistry IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore setPreferenceStore openViewMode getInt IPreferenceConstants OPEN_VIEW_MODE openPerspMode getInt IPreferenceConstants OPEN_PERSP_MODE
The default button has been pressed protected void perform Defaults Project perspective preferences I Preference Store store Workbench Plugin get Default get Preference Store open View Mode store get Default Int I Preference Constants OPEN VIEW MODE Open view as float no longer supported if open View Mode I Preference Constants OVM FLOAT open View Mode I Preference Constants OVM FAST open Embed Button set Selection open View Mode I Preference Constants OVM EMBED open Fast Button set Selection open View Mode I Preference Constants OVM FAST open Persp Mode store get Default Int I Preference Constants OPEN PERSP MODE open Same Window Button set Selection I Preference Constants OPM ACTIVE PAGE open Persp Mode open New Window Button set Selection I Preference Constants OPM NEW WINDOW open Persp Mode  performDefaults IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore openViewMode getDefaultInt IPreferenceConstants OPEN_VIEW_MODE openViewMode IPreferenceConstants OVM_FLOAT openViewMode IPreferenceConstants OVM_FAST openEmbedButton setSelection openViewMode IPreferenceConstants OVM_EMBED openFastButton setSelection openViewMode IPreferenceConstants OVM_FAST openPerspMode getDefaultInt IPreferenceConstants OPEN_PERSP_MODE openSameWindowButton setSelection IPreferenceConstants OPM_ACTIVE_PAGE openPerspMode openNewWindowButton setSelection IPreferenceConstants OPM_NEW_WINDOW openPerspMode
Deletes the perspectives selected by the user if there is no opened instance of that perspective return boolean code true code if all of the perspectives could be deleted private boolean delete Perspectives I Workbench Window windows workbench get Workbench Windows for int i 0 i windows length i I Workbench Page pages windows i get Pages for int j 0 j pages length j Workbench Page page Workbench Page pages j for int k 0 k persp To Delete size k I Perspective Descriptor desc I Perspective Descriptor persp To Delete get k if page find Perspective desc null Message Dialog open Information get Shell Workbench Messages get String Perspectives Preference cannotdelete title NON NLS 1 Workbench Messages format Perspectives Preference cannotdelete message new String desc get Label NON NLS 1 return false Delete the perspectives from the registry perspective Registry delete Perspectives persp To Delete return true  deletePerspectives IWorkbenchWindow getWorkbenchWindows IWorkbenchPage getPages WorkbenchPage WorkbenchPage perspToDelete IPerspectiveDescriptor IPerspectiveDescriptor perspToDelete findPerspective MessageDialog openInformation getShell WorkbenchMessages getString PerspectivesPreference WorkbenchMessages PerspectivesPreference getLabel perspectiveRegistry deletePerspectives perspToDelete
Apply the user s changes if any public boolean perform Ok Set the default perspective if default Perspective Id equals perspective Registry get Default Perspective perspective Registry set Default Perspective default Perspective Id if delete Perspectives return false Revert the perspectives perspective Registry revert Perspectives persp To Revert I Preference Store store get Preference Store store the open view mode setting store set Value I Preference Constants OPEN VIEW MODE open View Mode store the open perspective mode setting store set Value I Preference Constants OPEN PERSP MODE open Persp Mode save both the API prefs and the internal prefs the API prefs are modified by Perspective Registry set Default Perspective Pref Util save Prefs return true  performOk defaultPerspectiveId perspectiveRegistry getDefaultPerspective perspectiveRegistry setDefaultPerspective defaultPerspectiveId deletePerspectives perspectiveRegistry revertPerspectives perspToRevert IPreferenceStore getPreferenceStore setValue IPreferenceConstants OPEN_VIEW_MODE openViewMode setValue IPreferenceConstants OPEN_PERSP_MODE openPerspMode PerspectiveRegistry setDefaultPerspective PrefUtil savePrefs
Update the button enablement state protected void update Buttons Get selection int index list get Selection Index Map it to the perspective descriptor Perspective Descriptor desc null if index 1 desc Perspective Descriptor perspectives get index Do enable if desc null revert Button set Enabled desc is Predefined desc has Custom Definition persp To Revert contains desc delete Button set Enabled desc is Predefined set Default Button set Enabled true else revert Button set Enabled false delete Button set Enabled false set Default Button set Enabled false  updateButtons getSelectionIndex PerspectiveDescriptor PerspectiveDescriptor revertButton setEnabled isPredefined hasCustomDefinition perspToRevert deleteButton setEnabled isPredefined setDefaultButton setEnabled revertButton setEnabled deleteButton setEnabled setDefaultButton setEnabled
Update the list items protected void update List list remove All for int i 0 i perspectives size i I Perspective Descriptor desc I Perspective Descriptor perspectives get i String label desc get Label if desc get Id equals default Perspective Id label Workbench Messages format Perspectives Preference default Label new Object label NON NLS 1 list add label i  updateList removeAll IPerspectiveDescriptor IPerspectiveDescriptor getLabel getId defaultPerspectiveId WorkbenchMessages PerspectivesPreference defaultLabel
Notifies that this page s button with the given id has been pressed param button the button that was pressed protected void vertical Button Pressed Widget button Get selection int index list get Selection Index Map it to the perspective descriptor Perspective Descriptor desc null if index 1 desc Perspective Descriptor perspectives get index else return Take action if button revert Button if desc is Predefined persp To Revert contains desc persp To Revert add desc else if button delete Button if desc is Predefined persp To Delete contains desc persp To Delete add desc persp To Revert remove desc perspectives remove desc update List else if button set Default Button default Perspective Id desc get Id update List list set Selection index update Buttons  verticalButtonPressed getSelectionIndex PerspectiveDescriptor PerspectiveDescriptor revertButton isPredefined perspToRevert perspToRevert deleteButton isPredefined perspToDelete perspToDelete perspToRevert updateList setDefaultButton defaultPerspectiveId getId updateList setSelection updateButtons

public class Preference Error Dialog extends Error Dialog Create a new instance of the dialog public Preference Error Dialog Shell parent Shell String dialog Title String message I Status status int display Mask super parent Shell dialog Title message status display Mask  PreferenceErrorDialog ErrorDialog PreferenceErrorDialog parentShell dialogTitle IStatus displayMask parentShell dialogTitle displayMask
Opens an error dialog to display the given error public static int open Error Shell parent Shell String title String message I Status status int display Mask I Status OK I Status INFO I Status WARNING I Status ERROR Error Dialog dialog new Preference Error Dialog parent Shell title message status display Mask return dialog open  openError parentShell IStatus displayMask IStatus IStatus IStatus IStatus ErrorDialog PreferenceErrorDialog parentShell displayMask
protected void button Pressed int button Id if I Dialog Constants YES ID button Id ok Pressed else if I Dialog Constants NO ID button Id cancel Pressed else super button Pressed button Id  buttonPressed buttonId IDialogConstants YES_ID buttonId okPressed IDialogConstants NO_ID buttonId cancelPressed buttonPressed buttonId
protected void create Buttons For Button Bar Composite parent create Yes No and Details buttons create Button parent I Dialog Constants YES ID I Dialog Constants YES LABEL true create Button parent I Dialog Constants NO ID I Dialog Constants NO LABEL false super create Buttons For Button Bar parent get rid of the unwanted ok button Button ok Button get Button I Dialog Constants OK ID if ok Button null ok Button is Disposed ok Button dispose Grid Layout parent get Layout num Columns  createButtonsForButtonBar createButton IDialogConstants YES_ID IDialogConstants YES_LABEL createButton IDialogConstants NO_ID IDialogConstants NO_LABEL createButtonsForButtonBar okButton getButton IDialogConstants OK_ID okButton okButton isDisposed okButton GridLayout getLayout numColumns
Method declared on Error Dialog protected Image get Image return get Warning Image  ErrorDialog getImage getWarningImage

private class Page Change Listener implements Listener If the current page is not code null code then this updates the buttons on the wizard dialog param event Ignored public void handle Event Event event I Wizard Container container get Container if container get Current Page null container update Buttons  PageChangeListener handleEvent IWizardContainer getContainer getCurrentPage updateButtons
Constructs a new instance of the file selection page param export Wizard Whether this page should be opened in export mode Preference Import Export File Selection Page boolean export Wizard super NAME export Wizard  exportWizard PreferenceImportExportFileSelectionPage exportWizard exportWizard
Whether this page can finish This page can finish if all the data is valid and the user doesn t want to select the individual preferences return code true code If the finish button should be enabled code false code otherwise boolean can Finish return validate  canFinish
Chooses the file to use for exporting or importing This opens a native file dialog and sets code file Text code to the user selection private void choose File Find the closest file directory to what is currently entered String current File Name file Text get Text Open a dialog allowing the user to choose File Dialog file Dialog null if export file Dialog new File Dialog get Shell SWT SAVE else file Dialog new File Dialog get Shell SWT OPEN file Dialog set File Name current File Name file Dialog set Filter Extensions DIALOG PREFERENCE EXTENSIONS current File Name file Dialog open if current File Name null return Append the default filename if none was specifedand such a file does not exist String file Name new File current File Name get Name if file Name last Index Of 1 NON NLS 1 current File Name PREFERENCE EXT file Text set Text current File Name can Flip To Next Page  fileText chooseFile currentFileName fileText getText FileDialog fileDialog fileDialog FileDialog getShell fileDialog FileDialog getShell fileDialog setFileName currentFileName fileDialog setFilterExtensions DIALOG_PREFERENCE_EXTENSIONS currentFileName fileDialog currentFileName fileName currentFileName getName fileName lastIndexOf currentFileName PREFERENCE_EXT fileText setText currentFileName canFlipToNextPage
browse Button set Layout Data layout Data browse Button add Selection Listener new Selection Adapter public final void widget Selected Selection Event event choose File  browseButton setLayoutData layoutData browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent chooseFile
public void create Control Composite parent Font parent Font parent get Font final Composite page new Composite parent SWT NONE Grid Layout layout new Grid Layout 3 false page set Layout layout initialize Dialog Units page Set up the title subtitle and icon if export set Title EXPORT TITLE set Message EXPORT MESSAGE set Image Descriptor get Image Descriptor wizban export wiz gif NON NLS 1 else set Title IMPORT TITLE set Message IMPORT MESSAGE set Image Descriptor get Image Descriptor wizban import wiz gif NON NLS 1 Grid Data layout Data Set up the file selection label final Label file Label new Label page SWT NONE file Label set Text Workbench Messages get String Import Export Pages file Label NON NLS 1 file Label set Font parent Font layout Data new Grid Data file Label set Layout Data layout Data Set up the text widget containing the file selection file Text new Text page SWT SINGLE SWT BORDER file Text set Font parent Font layout Data new Grid Data layout Data grab Excess Horizontal Space true layout Data horizontal Alignment Grid Data FILL file Text set Layout Data layout Data file Text add Listener SWT Modify change Listener Set up the button for choosing a file final Button browse Button new Button page SWT PUSH browse Button set Font parent Font layout Data new Grid Data browse Button set Text Workbench Messages get String Import Export Pages browse Button NON NLS 1 layout Data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT layout Data width Hint compute Push Button Width Hint browse Button browse Button set Layout Data layout Data browse Button add Selection Listener new Selection Adapter public final void widget Selected Selection Event event choose File Insert a chunk of space below the file selection stuff final Composite vertical Spacer new Composite page SWT NONE layout Data new Grid Data layout Data height Hint 15 layout Data horizontal Span 3 vertical Spacer set Layout Data layout Data Remember the composite as the top level control set Control page Restore all the controls to their previous values init  createControl parentFont getFont GridLayout GridLayout setLayout initializeDialogUnits setTitle EXPORT_TITLE setMessage EXPORT_MESSAGE setImageDescriptor getImageDescriptor export_wiz setTitle IMPORT_TITLE setMessage IMPORT_MESSAGE setImageDescriptor getImageDescriptor import_wiz GridData layoutData fileLabel fileLabel setText WorkbenchMessages getString ImportExportPages fileLabel fileLabel setFont parentFont layoutData GridData fileLabel setLayoutData layoutData fileText fileText setFont parentFont layoutData GridData layoutData grabExcessHorizontalSpace layoutData horizontalAlignment GridData fileText setLayoutData layoutData fileText addListener changeListener browseButton browseButton setFont parentFont layoutData GridData browseButton setText WorkbenchMessages getString ImportExportPages browseButton layoutData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT layoutData widthHint computePushButtonWidthHint browseButton browseButton setLayoutData layoutData browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent chooseFile verticalSpacer layoutData GridData layoutData heightHint layoutData horizontalSpan verticalSpacer setLayoutData layoutData setControl
An accessor for the path the user has currently selected return The path may be empty or invalid but never code null code String get Path return file Text get Text  getPath fileText getText
Initializes all the controls on this page by restoring their previous values private void init String last File Name Workbench Plugin get Default get Dialog Settings get Workbench Preference Dialog FILE PATH SETTING if last File Name null if export file Text set Text System get Property user dir System get Property file separator Workbench Messages get String Import Export Pages preference File Name PREFERENCE EXT NON NLS 1 NON NLS 2 NON NLS 3 else if export new File last File Name exists file Text set Text last File Name  lastFileName WorkbenchPlugin getDefault getDialogSettings WorkbenchPreferenceDialog FILE_PATH_SETTING lastFileName fileText setText getProperty getProperty WorkbenchMessages getString ImportExportPages preferenceFileName PREFERENCE_EXT lastFileName fileText setText lastFileName
Validates all of the data on the page to make sure that it is all valid If some of the data is invalid then it displays an error message on the page return code true code If the data is all valid code false code otherwise boolean validate final String file Name file Text get Text if file Name equals Util ZERO LENGTH STRING set Error Message null return false final File current File new File file Name if export final File parent File current File get Parent File if parent File null parent File exists set Error Message Workbench Messages get String Import Export Pages error Directory Does Not Exist NON NLS 1 return false else if current File exists set Error Message Workbench Messages get String Import Export Pages error Import File Does Not Exist NON NLS 1 return false set Error Message null return true  fileName fileText getText fileName ZERO_LENGTH_STRING setErrorMessage currentFile fileName parentFile currentFile getParentFile parentFile parentFile setErrorMessage WorkbenchMessages getString ImportExportPages errorDirectoryDoesNotExist currentFile setErrorMessage WorkbenchMessages getString ImportExportPages errorImportFileDoesNotExist setErrorMessage

Constructs a new instance of a settings selection page with the given mode param export Wizard Whether the preference selection if for an export operation Preference Import Export Settings Selection Page boolean export Wizard super NAME export Wizard  exportWizard PreferenceImportExportSettingsSelectionPage exportWizard exportWizard
This page can always finish If no items are selected it simply means that nothing will be exported return code true code boolean can Finish return true  canFinish
This page is always the last page and so you cannot flip to the next page return code false code public boolean can Flip To Next Page return false  canFlipToNextPage
select All Button set Layout Data layout Data select All Button add Selection Listener new Selection Adapter public final void widget Selected Selection Event event set Check All true  selectAllButton setLayoutData layoutData selectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setCheckAll
deselect All Button set Layout Data layout Data deselect All Button add Selection Listener new Selection Adapter public final void widget Selected Selection Event event set Check All false  deselectAllButton setLayoutData layoutData deselectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setCheckAll
invert Selection Button set Layout Data layout Data invert Selection Button add Selection Listener new Selection Adapter public final void widget Selected Selection Event event invert Selection  invertSelectionButton setLayoutData layoutData invertSelectionButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent invertSelection
public void create Control Composite parent Font parent Font parent get Font final Composite page new Composite parent SWT NONE Grid Layout layout new Grid Layout 2 false page set Layout layout initialize Dialog Units page Set up the title subtitle and icon if export set Title EXPORT TITLE set Message EXPORT MESSAGE set Image Descriptor get Image Descriptor wizban export wiz gif NON NLS 1 else set Title IMPORT TITLE set Message IMPORT MESSAGE set Image Descriptor get Image Descriptor wizban import wiz gif NON NLS 1 Grid Data layout Data Set up the table and its columns settings Table new Table page SWT CHECK SWT BORDER settings Table set Font parent Font layout Data new Grid Data Grid Data FILL BOTH layout Data vertical Span 3 settings Table set Layout Data layout Data settings Table set Lines Visible true settings Table set Header Visible true final Table Column column Checked new Table Column settings Table SWT LEFT 0 final Table Column column Name new Table Column settings Table SWT LEFT 1 final Table Column column Value new Table Column settings Table SWT LEFT 2 for int i 0 i 50 i Table Item item new Table Item settings Table SWT NULL item set Text new String org eclipse sample preference Sample value ignore NON NLS 1 NON NLS 2 NON NLS 3 item set Checked true column Name set Text Workbench Messages get String Import Export Pages name NON NLS 1 column Value set Text Workbench Messages get String Import Export Pages value NON NLS 1 column Checked pack column Name pack column Value pack Set up the select all button final Button select All Button new Button page SWT PUSH select All Button set Font parent Font layout Data new Grid Data select All Button set Text Workbench Messages get String Import Export Pages select All NON NLS 1 layout Data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT layout Data width Hint compute Push Button Width Hint select All Button layout Data vertical Alignment Grid Data BEGINNING select All Button set Layout Data layout Data select All Button add Selection Listener new Selection Adapter public final void widget Selected Selection Event event set Check All true Set up the deselect all button final Button deselect All Button new Button page SWT PUSH deselect All Button set Font parent Font layout Data new Grid Data deselect All Button set Text Workbench Messages get String Import Export Pages deselect All NON NLS 1 layout Data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT layout Data width Hint compute Push Button Width Hint deselect All Button layout Data vertical Alignment Grid Data BEGINNING deselect All Button set Layout Data layout Data deselect All Button add Selection Listener new Selection Adapter public final void widget Selected Selection Event event set Check All false Set up the invert selection button final Button invert Selection Button new Button page SWT PUSH invert Selection Button set Font parent Font layout Data new Grid Data invert Selection Button set Text Workbench Messages get String Import Export Pages invert Selection NON NLS 1 layout Data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT layout Data width Hint compute Push Button Width Hint invert Selection Button layout Data vertical Alignment Grid Data BEGINNING invert Selection Button set Layout Data layout Data invert Selection Button add Selection Listener new Selection Adapter public final void widget Selected Selection Event event invert Selection Remember the composite as the top level control set Control page Restore all the controls to their previous values init  createControl parentFont getFont GridLayout GridLayout setLayout initializeDialogUnits setTitle EXPORT_TITLE setMessage EXPORT_MESSAGE setImageDescriptor getImageDescriptor export_wiz setTitle IMPORT_TITLE setMessage IMPORT_MESSAGE setImageDescriptor getImageDescriptor import_wiz GridData layoutData settingsTable settingsTable setFont parentFont layoutData GridData GridData FILL_BOTH layoutData verticalSpan settingsTable setLayoutData layoutData settingsTable setLinesVisible settingsTable setHeaderVisible TableColumn columnChecked TableColumn settingsTable TableColumn columnName TableColumn settingsTable TableColumn columnValue TableColumn settingsTable TableItem TableItem settingsTable setText setChecked columnName setText WorkbenchMessages getString ImportExportPages columnValue setText WorkbenchMessages getString ImportExportPages columnChecked columnName columnValue selectAllButton selectAllButton setFont parentFont layoutData GridData selectAllButton setText WorkbenchMessages getString ImportExportPages selectAll layoutData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT layoutData widthHint computePushButtonWidthHint selectAllButton layoutData verticalAlignment GridData selectAllButton setLayoutData layoutData selectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setCheckAll deselectAllButton deselectAllButton setFont parentFont layoutData GridData deselectAllButton setText WorkbenchMessages getString ImportExportPages deselectAll layoutData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT layoutData widthHint computePushButtonWidthHint deselectAllButton layoutData verticalAlignment GridData deselectAllButton setLayoutData layoutData deselectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent setCheckAll invertSelectionButton invertSelectionButton setFont parentFont layoutData GridData invertSelectionButton setText WorkbenchMessages getString ImportExportPages invertSelection layoutData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT layoutData widthHint computePushButtonWidthHint invertSelectionButton layoutData verticalAlignment GridData invertSelectionButton setLayoutData layoutData invertSelectionButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent invertSelection setControl
Initializes all of the controls to their previous values This page doesn t really remember anything right now so this just checks all of the table items private void init set Check All true  setCheckAll
Inverts the current selection checked state of all the settings private void invert Selection final Table Item items settings Table get Items for int i 0 i items length i Table Item item items i item set Checked item get Checked  invertSelection TableItem settingsTable getItems TableItem setChecked getChecked
This sets the checked state on all the settings to the given value This can be used as either a select all or a deselect all param checked The state to set private void set Check All final boolean checked Table Item items settings Table get Items for int i 0 i items length i items i set Checked checked  setCheckAll TableItem settingsTable getItems setChecked
boolean validate return true 

Constructs a new instance of code Preference Import Export Wizard code with the mode and parent dialog param export Wizard Whether the wizard should act as an export tool param parent Dialog The dialog which created this wizard em not em the wizard dialog itself This parameter should not be code null code public Preference Import Export Wizard final boolean export Wizard Preference Dialog parent Dialog super export export Wizard parent parent Dialog if export Wizard set Window Title Workbench Messages get String Import Export Pages export Window Title NON NLS 1 else set Window Title Workbench Messages get String Import Export Pages import Window Title NON NLS 1  PreferenceImportExportWizard exportWizard parentDialog PreferenceImportExportWizard exportWizard PreferenceDialog parentDialog exportWizard parentDialog exportWizard setWindowTitle WorkbenchMessages getString ImportExportPages exportWindowTitle setWindowTitle WorkbenchMessages getString ImportExportPages importWindowTitle
public void add Pages super add Pages file Selection Page new Preference Import Export File Selection Page export add Page file Selection Page  addPages addPages fileSelectionPage PreferenceImportExportFileSelectionPage addPage fileSelectionPage
see org eclipse jface wizard I Wizard can Finish public boolean can Finish return file Selection Page can Finish  IWizard canFinish canFinish fileSelectionPage canFinish
Busy Indicator show While get Shell get Display new Runnable public void run Save all the pages and give them a chance to abort success save All Pages if success return Save or load depending on the phase of moon I Path path new Path selected File Path if export success export File path if success return else success import File path if success return  BusyIndicator showWhile getShell getDisplay saveAllPages IPath selectedFilePath exportFile importFile
public boolean perform Finish success true Busy Indicator show While get Shell get Display new Runnable public void run Save all the pages and give them a chance to abort success save All Pages if success return Save or load depending on the phase of moon I Path path new Path selected File Path if export success export File path if success return else success import File path if success return If an operation failed return false if success return success See if we actually created a file there where preferences to export show Message Dialog We have been successful Workbench Plugin get Default get Dialog Settings put Workbench Preference Dialog FILE PATH SETTING file Selection Page get Path return true  performFinish BusyIndicator showWhile getShell getDisplay saveAllPages IPath selectedFilePath exportFile importFile showMessageDialog WorkbenchPlugin getDefault getDialogSettings WorkbenchPreferenceDialog FILE_PATH_SETTING fileSelectionPage getPath
Save all the preference pages return true if successful private boolean save All Pages Iterator nodes parent get Preference Manager get Elements Preference Manager PRE ORDER iterator while nodes has Next I Preference Node node I Preference Node nodes next I Preference Page page node get Page if page null if page perform Ok return false selected File Path file Selection Page get Path selected File new File selected File Path last Modified selected File last Modified return true  saveAllPages getPreferenceManager getElements PreferenceManager PRE_ORDER hasNext IPreferenceNode IPreferenceNode IPreferencePage getPage performOk selectedFilePath fileSelectionPage getPath selectedFile selectedFilePath lastModified selectedFile lastModified
Export the preferences to a file param path The file path return true if successful private boolean export File I Path path if selected File exists if Message Dialog open Confirm get Shell Workbench Messages get String Workbench Preference Dialog save Title NON NLS 1 Workbench Messages format Workbench Preference Dialog exists Error Message NON NLS 1 new Object selected File Path return false try Preferences export Preferences path catch Core Exception e Error Dialog open Error get Shell Workbench Messages get String Workbench Preference Dialog save Error Title NON NLS 1 Workbench Messages format Workbench Preference Dialog save Error Message NON NLS 1 new Object selected File Path e get Status return false return true  exportFile IPath selectedFile MessageDialog openConfirm getShell WorkbenchMessages getString WorkbenchPreferenceDialog saveTitle WorkbenchMessages WorkbenchPreferenceDialog existsErrorMessage selectedFilePath exportPreferences CoreException ErrorDialog openError getShell WorkbenchMessages getString WorkbenchPreferenceDialog saveErrorTitle WorkbenchMessages WorkbenchPreferenceDialog saveErrorMessage selectedFilePath getStatus
Import a preference file param path The file path return true if successful private boolean import File I Path path I Status status Preferences validate Preference Versions path if status get Severity I Status ERROR Show the error and about Error Dialog open Error get Shell Workbench Messages get String Workbench Preference Dialog load Error Title NON NLS 1 Workbench Messages format Workbench Preference Dialog verify Error Message NON NLS 1 new Object selected File Path status return false else if status get Severity I Status WARNING Show the warning and give the option to continue int result Preference Error Dialog open Error get Shell Workbench Messages get String Workbench Preference Dialog load Error Title NON NLS 1 Workbench Messages format Workbench Preference Dialog verify Warning Message NON NLS 1 new Object selected File Path status if result Window OK return false try Preferences import Preferences path catch Core Exception e Error Dialog open Error get Shell Workbench Messages get String Workbench Preference Dialog load Error Title NON NLS 1 Workbench Messages format Workbench Preference Dialog load Error Message NON NLS 1 new Object selected File Path e get Status return false return true  importFile IPath IStatus validatePreferenceVersions getSeverity IStatus ErrorDialog openError getShell WorkbenchMessages getString WorkbenchPreferenceDialog loadErrorTitle WorkbenchMessages WorkbenchPreferenceDialog verifyErrorMessage selectedFilePath getSeverity IStatus PreferenceErrorDialog openError getShell WorkbenchMessages getString WorkbenchPreferenceDialog loadErrorTitle WorkbenchMessages WorkbenchPreferenceDialog verifyWarningMessage selectedFilePath importPreferences CoreException ErrorDialog openError getShell WorkbenchMessages getString WorkbenchPreferenceDialog loadErrorTitle WorkbenchMessages WorkbenchPreferenceDialog loadErrorMessage selectedFilePath getStatus
Show the appropriate message dialog private void show Message Dialog if export Message Dialog open Information get Shell Workbench Messages get String Workbench Preference Dialog load Title NON NLS 1 Workbench Messages format Workbench Preference Dialog load Message NON NLS 1 new Object selected File Path else if selected File exists selected File last Modified last Modified Message Dialog open Information get Shell Workbench Messages get String Workbench Preference Dialog save Title NON NLS 1 Workbench Messages format Workbench Preference Dialog save Message NON NLS 1 new Object selected File Path else Message Dialog open Error get Shell Workbench Messages get String Workbench Preference Dialog save Error Title NON NLS 1 Workbench Messages get String Workbench Preference Dialog no Preferences Message NON NLS 1  showMessageDialog MessageDialog openInformation getShell WorkbenchMessages getString WorkbenchPreferenceDialog loadTitle WorkbenchMessages WorkbenchPreferenceDialog loadMessage selectedFilePath selectedFile selectedFile lastModified lastModified MessageDialog openInformation getShell WorkbenchMessages getString WorkbenchPreferenceDialog saveTitle WorkbenchMessages WorkbenchPreferenceDialog saveMessage selectedFilePath MessageDialog openError getShell WorkbenchMessages getString WorkbenchPreferenceDialog saveErrorTitle WorkbenchMessages getString WorkbenchPreferenceDialog noPreferencesMessage

Create an instance of this Dialog public Product Info Dialog Shell parent Shell super parent Shell  ProductInfoDialog parentShell parentShell
Adds listeners to the given styled text protected void add Listeners Styled Text styled Text styled Text add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e if e button 1 return mouse Down true public void mouse Up Mouse Event e mouse Down false Styled Text text Styled Text e widget int offset text get Caret Offset if drag Event don t activate a link during a drag mouse up operation drag Event false if item null item is Link At offset text set Cursor hand Cursor else if item null item is Link At offset text set Cursor busy Cursor open Link item get Link At offset Style Range selection Range get Current Range text text set Selection Range selection Range start selection Range length text set Cursor null styled Text add Mouse Move Listener new Mouse Move Listener public void mouse Move Mouse Event e Do not change cursor on drag events if mouse Down if drag Event Styled Text text Styled Text e widget text set Cursor null drag Event true return Styled Text text Styled Text e widget int offset 1 try offset text get Offset At Location new Point e x e y catch Illegal Argument Exception ex leave value as 1 if offset 1 text set Cursor null else if item null item is Link At offset text set Cursor hand Cursor else text set Cursor null styled Text add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e Styled Text text Styled Text e widget switch e detail case SWT TRAVERSE ESCAPE e doit true break case SWT TRAVERSE TAB NEXT Previously traverse out in the backward direction Point next Selection text get Selection int char Count text get Char Count if next Selection x char Count next Selection y char Count text set Selection 0 Style Range next Range find Next Range text if next Range null Next time in start at beginning also used by TRAVERSE TAB PREVIOUS to indicate we traversed out in the forward direction text set Selection 0 e doit true else text set Selection Range next Range start next Range length e doit true e detail SWT TRAVERSE NONE break case SWT TRAVERSE TAB PREVIOUS Previously traverse out in the forward direction Point previous Selection text get Selection if previous Selection x 0 previous Selection y 0 text set Selection text get Char Count Style Range previous Range find Previous Range text if previous Range null Next time in start at the end also used by TRAVERSE TAB NEXT to indicate we traversed out in the backward direction text set Selection text get Char Count e doit true else text set Selection Range previous Range start previous Range length e doit true e detail SWT TRAVERSE NONE break default break Listen for Tab and Space to allow keyboard navigation styled Text add Key Listener new Key Adapter public void key Pressed Key Event event Styled Text text Styled Text event widget if event character event character SWT CR if item null Be sure we are in the selection int offset text get Selection x 1 if item is Link At offset text set Cursor busy Cursor open Link item get Link At offset Style Range selection Range get Current Range text text set Selection Range selection Range start selection Range length text set Cursor null return  addListeners StyledText styledText styledText addMouseListener MouseAdapter mouseDown MouseEvent mouseDown mouseUp MouseEvent mouseDown StyledText StyledText getCaretOffset dragEvent dragEvent isLinkAt setCursor handCursor isLinkAt setCursor busyCursor openLink getLinkAt StyleRange selectionRange getCurrentRange setSelectionRange selectionRange selectionRange setCursor styledText addMouseMoveListener MouseMoveListener mouseMove MouseEvent mouseDown dragEvent StyledText StyledText setCursor dragEvent StyledText StyledText getOffsetAtLocation IllegalArgumentException setCursor isLinkAt setCursor handCursor setCursor styledText addTraverseListener TraverseListener keyTraversed TraverseEvent StyledText StyledText TRAVERSE_ESCAPE TRAVERSE_TAB_NEXT nextSelection getSelection charCount getCharCount nextSelection charCount nextSelection charCount setSelection StyleRange nextRange findNextRange nextRange TRAVERSE_TAB_PREVIOUS setSelection setSelectionRange nextRange nextRange TRAVERSE_NONE TRAVERSE_TAB_PREVIOUS previousSelection getSelection previousSelection previousSelection setSelection getCharCount StyleRange previousRange findPreviousRange previousRange TRAVERSE_TAB_NEXT setSelection getCharCount setSelectionRange previousRange previousRange TRAVERSE_NONE styledText addKeyListener KeyAdapter keyPressed KeyEvent StyledText StyledText getSelection isLinkAt setCursor busyCursor openLink getLinkAt StyleRange selectionRange getCurrentRange setSelectionRange selectionRange selectionRange setCursor
Gets the busy cursor return the busy cursor protected Cursor get Busy Cursor return busy Cursor  getBusyCursor busyCursor
Sets the busy cursor param busy Cursor the busy cursor protected void set Busy Cursor Cursor busy Cursor this busy Cursor busy Cursor  busyCursor setBusyCursor busyCursor busyCursor busyCursor
Gets the hand cursor return Returns a hand cursor protected Cursor get Hand Cursor return hand Cursor  getHandCursor handCursor
Sets the hand cursor param hand Cursor The hand cursor to set protected void set Hand Cursor Cursor hand Cursor this hand Cursor hand Cursor  handCursor setHandCursor handCursor handCursor handCursor
Gets the about item return the about item protected About Item get Item return item  AboutItem getItem
Sets the about item param item about item protected void set Item About Item item this item item  setItem AboutItem
Find the range of the current selection protected Style Range get Current Range Styled Text text Style Range ranges text get Style Ranges int current Selection End text get Selection y int current Selection Start text get Selection x for int i 0 i ranges length i if current Selection Start ranges i start current Selection End ranges i start ranges i length return ranges i return null  StyleRange getCurrentRange StyledText StyleRange getStyleRanges currentSelectionEnd getSelection currentSelectionStart getSelection currentSelectionStart currentSelectionEnd
Find the next range after the current selection protected Style Range find Next Range Styled Text text Style Range ranges text get Style Ranges int current Selection End text get Selection y for int i 0 i ranges length i if ranges i start current Selection End return ranges i return null  StyleRange findNextRange StyledText StyleRange getStyleRanges currentSelectionEnd getSelection currentSelectionEnd
Find the previous range before the current selection protected Style Range find Previous Range Styled Text text Style Range ranges text get Style Ranges int current Selection Start text get Selection x for int i ranges length 1 i 1 i if ranges i start ranges i length 1 current Selection Start return ranges i return null  StyleRange findPreviousRange StyledText StyleRange getStyleRanges currentSelectionStart getSelection currentSelectionStart
TODO Move browser support from Help system remove this method private Process open Web Browser String href throws IO Exception Process p null if web Browser null try web Browser netscape NON NLS 1 p Runtime get Runtime exec web Browser href NON NLS 1 catch IO Exception e p null web Browser mozilla NON NLS 1 if p null try p Runtime get Runtime exec web Browser href NON NLS 1 catch IO Exception e p null throw e return p  openWebBrowser IOException webBrowser webBrowser getRuntime webBrowser IOException webBrowser getRuntime webBrowser IOException
display an error message private void open Web Browser Error Display display display async Exec new Runnable public void run Message Dialog open Error get Shell Workbench Messages get String Product Info Dialog error Title NON NLS 1 Workbench Messages get String Product Info Dialog unable To Open Web Browser NON NLS 1  openWebBrowserError asyncExec MessageDialog openError getShell WorkbenchMessages getString ProductInfoDialog errorTitle WorkbenchMessages getString ProductInfoDialog unableToOpenWebBrowser
Thread launcher new Thread About Link Launcher NON NLS 1 public void run try if web Browser Opened Runtime get Runtime exec web Browser remote openURL local Href NON NLS 1 NON NLS 2 else Process p open Web Browser local Href web Browser Opened true try if p null p wait For catch Interrupted Exception e open Web Browser Error d finally web Browser Opened false catch IO Exception e open Web Browser Error d  webBrowserOpened getRuntime webBrowser localHref openWebBrowser localHref webBrowserOpened waitFor InterruptedException openWebBrowserError webBrowserOpened IOException openWebBrowserError
Open a link protected void open Link String href format the href for an html file file filename html required for Mac only if href starts With file NON NLS 1 href href substring 5 while href starts With NON NLS 1 href href substring 1 href file href NON NLS 1 final String local Href href final Display d Display get Current String platform SWT get Platform if win32 equals platform NON NLS 1 Program launch local Href else if carbon equals platform NON NLS 1 try Runtime get Runtime exec usr bin open local Href NON NLS 1 catch IO Exception e open Web Browser Error d else Thread launcher new Thread About Link Launcher NON NLS 1 public void run try if web Browser Opened Runtime get Runtime exec web Browser remote openURL local Href NON NLS 1 NON NLS 2 else Process p open Web Browser local Href web Browser Opened true try if p null p wait For catch Interrupted Exception e open Web Browser Error d finally web Browser Opened false catch IO Exception e open Web Browser Error d launcher start  openLink startsWith startsWith localHref getCurrent getPlatform localHref getRuntime localHref IOException openWebBrowserError webBrowserOpened getRuntime webBrowser localHref openWebBrowser localHref webBrowserOpened waitFor InterruptedException openWebBrowserError webBrowserOpened IOException openWebBrowserError
Open a browser with the argument title on the argument url If the url refers to a resource within a bundle then a temp copy of the file will be extracted and opened see code Platform as Local Url code param url The target url to be displayed null will be safely ignored return true if the url was successfully displayed and false otherwise protected boolean open Browser URL url if url null try url Platform as LocalURL url catch IO Exception e return false if url null return false open Link url to String return true  asLocalUrl openBrowser asLocalURL IOException openLink toString
Sets the styled text s bold ranges protected void set Bold Ranges Styled Text styled Text int bold Ranges for int i 0 i bold Ranges length i Style Range r new Style Range bold Ranges i 0 bold Ranges i 1 null null SWT BOLD styled Text set Style Range r  setBoldRanges StyledText styledText boldRanges boldRanges StyleRange StyleRange boldRanges boldRanges styledText setStyleRange
Sets the styled text s link blue ranges protected void set Link Ranges Styled Text styled Text int link Ranges Color fg J Face Colors get Hyperlink Text styled Text get Shell get Display for int i 0 i link Ranges length i Style Range r new Style Range link Ranges i 0 link Ranges i 1 fg null styled Text set Style Range r  setLinkRanges StyledText styledText linkRanges JFaceColors getHyperlinkText styledText getShell getDisplay linkRanges StyleRange StyleRange linkRanges linkRanges styledText setStyleRange
Scan the contents of the about text protected About Item scan String s int max s length int i s index Of ATT HTTP Array List link Ranges new Array List Array List links new Array List while i 1 int start i look for the first whitespace character boolean found false i ATT HTTP length while found i max found Character is Whitespace s char At i if i max i link Ranges add new int start i start links add s substring start i i s index Of ATT HTTP i return new About Item s int link Ranges to Array new int link Ranges size 2 String links to Array new String links size  AboutItem indexOf ATT_HTTP ArrayList linkRanges ArrayList ArrayList ArrayList ATT_HTTP isWhitespace charAt linkRanges indexOf ATT_HTTP AboutItem linkRanges toArray linkRanges toArray

The constructor public Property Dialog Shell parent Shell Preference Manager mng I Selection selection super parent Shell mng set Selection selection  PropertyDialog parentShell PreferenceManager ISelection parentShell setSelection
Returns selection in the Properties action context public I Selection get Selection return selection  ISelection getSelection
Sets the selection that will be used to determine target object public void set Selection I Selection new Selection selection new Selection  setSelection ISelection newSelection newSelection
Get the name of the selected item preference protected String get Selected Node Preference return last Property Id  getSelectedNodePreference lastPropertyId
Get the name of the selected item preference protected void set Selected Node Preference String page Id last Property Id page Id  setSelectedNodePreference pageId lastPropertyId pageId

public int compare Object arg0 Object arg1 Make sure the workbench info page is always at the top Registry Page Contributor c1 Registry Page Contributor arg0 Registry Page Contributor c2 Registry Page Contributor arg1 if I Workbench Constants WORKBENCH PROPERTIES PAGE INFO equals c1 get Page Id c1 is the info page if I Workbench Constants WORKBENCH PROPERTIES PAGE INFO equals c2 get Page Id both are the info page so c2 is not greater return 0 c2 is any other page so it must be greater return 1 if I Workbench Constants WORKBENCH PROPERTIES PAGE INFO equals c2 get Page Id c1 is any other page so it is greater return 1 The other pages are sorted in alphabetical order String s1 c1 get Page Name String s2 c2 get Page Name return collator compare s1 s2  RegistryPageContributor RegistryPageContributor RegistryPageContributor RegistryPageContributor IWorkbenchConstants WORKBENCH_PROPERTIES_PAGE_INFO getPageId IWorkbenchConstants WORKBENCH_PROPERTIES_PAGE_INFO getPageId IWorkbenchConstants WORKBENCH_PROPERTIES_PAGE_INFO getPageId getPageName getPageName
The constructor public Property Page Contributor Manager super load contributions on startup so that get Contributors returns the proper content load Contributors  PropertyPageContributorManager getContributors loadContributors
Given the object class this method will find all the registered matching contributors and sequentially invoke them to contribute to the property page manager Matching algorithm will also check subclasses and implemented interfaces return true if contribution took place false otherwise public boolean contribute Property Page Manager manager I Adaptable object List result get Contributors object if result null result size 0 return false Sort the results Object sorted Result result to Array Collections sort Arrays as List sorted Result comparer Allow each contributor to add its page to the manager boolean actual Contributions false for int i 0 i sorted Result length i I Property Page Contributor ppcont I Property Page Contributor sorted Result i if ppcont is Applicable To object continue if ppcont contribute Property Pages manager object actual Contributions true return actual Contributions  PropertyPageManager IAdaptable getContributors sortedResult toArray asList sortedResult actualContributions sortedResult IPropertyPageContributor IPropertyPageContributor sortedResult isApplicableTo contributePropertyPages actualContributions actualContributions
Ideally shared instance should not be used and manager should be located in the workbench class public static Property Page Contributor Manager get Manager if shared Instance null shared Instance new Property Page Contributor Manager return shared Instance  PropertyPageContributorManager getManager sharedInstance sharedInstance PropertyPageContributorManager sharedInstance
Returns true if contributors exist in the manager for this object public boolean has Contributors For Object object return super has Contributors For object  hasContributorsFor hasContributorsFor
Loads property page contributors from the registry private void load Contributors Property Pages Registry Reader reader new Property Pages Registry Reader this reader register Property Pages Platform get Extension Registry  loadContributors PropertyPagesRegistryReader PropertyPagesRegistryReader registerPropertyPages getExtensionRegistry

public class Property Page Manager extends Preference Manager The constructor public Property Page Manager super  PropertyPageManager PreferenceManager PropertyPageManager

Property Page Node constructor public Property Page Node Registry Page Contributor contributor I Adaptable element super contributor get Page Id this contributor contributor this element element  PropertyPageNode PropertyPageNode RegistryPageContributor IAdaptable getPageId
Creates the preference page this node stands for If the page is null it will be created by loading the class If loading fails empty filler page will be created instead public void create Page try page contributor create Page element catch Core Exception e Just inform the user about the error The details are written to the log by now Error Dialog open Error Shell null Workbench Messages get String Property Page Node error Title NON NLS 1 Workbench Messages get String Property Page Node error Message NON NLS 1 e get Status page new Empty Property Page set Page page  createPage createPage CoreException ErrorDialog openError WorkbenchMessages getString PropertyPageNode errorTitle WorkbenchMessages getString PropertyPageNode errorMessage getStatus EmptyPropertyPage setPage
non Javadoc Method declared on I Preference Node public void dispose Resources if page null page dispose page null if icon null icon dispose icon null  IPreferenceNode disposeResources
Returns page icon if defined public Image get Label Image if icon null Image Descriptor desc contributor get Page Icon if desc null icon desc create Image return icon  getLabelImage ImageDescriptor getPageIcon createImage
Returns page label as defined in the registry public String get Label Text return contributor get Page Name  getLabelText getPageName
see org eclipse ui activities support I Plugin Contribution from Plugin public boolean from Plugin return true  IPluginContribution fromPlugin fromPlugin
see org eclipse ui activities support I Plugin Contribution get Local Id public String get Local Id return get Id  IPluginContribution getLocalId getLocalId getId
see org eclipse ui activities support I Plugin Contribution get Plugin Id public String get Plugin Id return contributor get Plugin Id  IPluginContribution getPluginId getPluginId getPluginId

Property Page Contributor constructor public Registry Page Contributor String plugin Id String page Id String page Name String icon Name Hash Map filter Properties String object Class Name boolean adaptable I Configuration Element page Element this plugin Id plugin Id this page Id page Id this page Name page Name this icon Name icon Name this filter Properties filter Properties this page Element page Element Only adapt if explicitly allowed to do so if adaptable check Is Resource Page object Class Name  PropertyPageContributor RegistryPageContributor pluginId pageId pageName iconName HashMap filterProperties objectClassName IConfigurationElement pageElement pluginId pluginId pageId pageId pageName pageName iconName iconName filterProperties filterProperties pageElement pageElement checkIsResourcePage objectClassName
Implements the interface by creating property page specified with the configuration element public boolean contribute Property Pages Property Page Manager mng I Adaptable element Property Page Node node new Property Page Node this element mng add To Root node return true  contributePropertyPages PropertyPageManager IAdaptable PropertyPageNode PropertyPageNode addToRoot
Creates the page based on the information in the configuration element public I Workbench Property Page create Page I Adaptable element throws Core Exception I Workbench Property Page ppage null ppage I Workbench Property Page Workbench Plugin create Extension page Element Property Pages Registry Reader ATT CLASS ppage set Title page Name if is Resource Contributor Class resource Class Legacy Resource Support get Resource Class I Adaptable resource resource Class null I Adaptable element get Adapter resource Class null if resource null resource Class Legacy Resource Support getI Contributor Resource Adapter Class if resource Class null Object resource Adapter element get Adapter resource Class if resource Adapter null try Method m resource Class get Method get Adapted Resource new Class I Adaptable class NON NLS 1 resource I Adaptable m invoke resource Adapter new Object element catch Exception e shouldn t happen if resource null ppage set Element resource if ppage get Element null ppage set Element element return ppage  IWorkbenchPropertyPage createPage IAdaptable CoreException IWorkbenchPropertyPage IWorkbenchPropertyPage WorkbenchPlugin createExtension pageElement PropertyPagesRegistryReader ATT_CLASS setTitle pageName isResourceContributor resourceClass LegacyResourceSupport getResourceClass IAdaptable resourceClass IAdaptable getAdapter resourceClass resourceClass LegacyResourceSupport getIContributorResourceAdapterClass resourceClass resourceAdapter getAdapter resourceClass resourceAdapter resourceClass getMethod getAdaptedResource IAdaptable IAdaptable resourceAdapter setElement getElement setElement
Returns page icon as defined in the registry public Image Descriptor get Page Icon if icon Name null return null I Extension extension page Element get Declaring Extension return AbstractUI Plugin image Descriptor From Plugin extension get Namespace icon Name  ImageDescriptor getPageIcon iconName IExtension pageElement getDeclaringExtension AbstractUIPlugin imageDescriptorFromPlugin getNamespace iconName
Returns page ID as defined in the registry public String get Page Id return page Id  getPageId pageId
Returns plugin ID as defined in the registry public String get Plugin Id return plugin Id  getPluginId pluginId
Returns page name as defined in the registry public String get Page Name return page Name  getPageName pageName
Return true if name filter is not defined in the registry for this page or if name of the selected object matches the name filter public boolean is Applicable To Object object Test name filter String name Filter page Element get Attribute Property Pages Registry Reader ATT NAME FILTER if name Filter null String object Name object to String if object instanceof I Adaptable I Workbench Adapter adapter I Workbench Adapter I Adaptable object get Adapter I Workbench Adapter class if adapter null String element Name adapter get Label object if element Name null object Name element Name if Selection Enabler verify Name Match object Name name Filter return false Test custom filter if filter Properties null return true I Action Filter filter null If this is a resource contributor and the object is not a resource but is an adaptable then get the object s resource via the adaptable mechanism Object test Object object Class resource Class Legacy Resource Support get Resource Class if is Resource Contributor resource Class null resource Class is Instance object object instanceof I Adaptable Object result I Adaptable object get Adapter resource Class if result null test Object result if test Object instanceof I Action Filter filter I Action Filter test Object else if test Object instanceof I Adaptable filter I Action Filter I Adaptable test Object get Adapter I Action Filter class if filter null return test Custom test Object filter else return true  isApplicableTo nameFilter pageElement getAttribute PropertyPagesRegistryReader ATT_NAME_FILTER nameFilter objectName toString IAdaptable IWorkbenchAdapter IWorkbenchAdapter IAdaptable getAdapter IWorkbenchAdapter elementName getLabel elementName objectName elementName SelectionEnabler verifyNameMatch objectName nameFilter filterProperties IActionFilter testObject resourceClass LegacyResourceSupport getResourceClass isResourceContributor resourceClass resourceClass isInstance IAdaptable IAdaptable getAdapter resourceClass testObject testObject IActionFilter IActionFilter testObject testObject IAdaptable IActionFilter IAdaptable testObject getAdapter IActionFilter testCustom testObject
Returns whether the object passes a custom key value filter implemented by a matcher private boolean test Custom Object object I Action Filter filter if filter Properties null return false Iterator iter filter Properties key Set iterator while iter has Next String key String iter next String value String filter Properties get key if filter test Attribute object key value return false return true  testCustom IActionFilter filterProperties filterProperties keySet hasNext filterProperties testAttribute
Check if the object class name is for a class that inherits from I Resource If so mark the receiver as a resource contributor private void check Is Resource Page String object Class Name for int i 0 i resource Class Names length i if resource Class Names i equals object Class Name is Resource Contributor true return  IResource checkIsResourcePage objectClassName resourceClassNames resourceClassNames objectClassName isResourceContributor
see I Object Contributor can Adapt public boolean can Adapt return is Resource Contributor  IObjectContributor canAdapt canAdapt isResourceContributor

final private static int LIST HEIGHT 14 Perspective Dialog constructor comment public Save Perspective Dialog Shell parent Shell Perspective Registry persp Reg super parent Shell this persp Reg persp Reg  LIST_HEIGHT PerspectiveDialog SavePerspectiveDialog parentShell PerspectiveRegistry perspReg parentShell perspReg perspReg
protected void configure Shell Shell shell super configure Shell shell shell set Text Workbench Messages get String Save Perspective shell Title NON NLS 1 Workbench Help set Help shell I Help Context Ids SAVE PERSPECTIVE DIALOG  configureShell configureShell setText WorkbenchMessages getString SavePerspective shellTitle WorkbenchHelp setHelp IHelpContextIds SAVE_PERSPECTIVE_DIALOG
Add buttons to the dialog s button bar param parent the button bar composite protected void create Buttons For Button Bar Composite parent ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false update Buttons text set Focus  createButtonsForButtonBar okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL updateButtons setFocus
Creates and returns the contents of the upper part of this dialog above the button bar param the parent composite to contain the dialog area return the dialog area control protected Control create Dialog Area Composite parent Font font parent get Font Run super Composite composite Composite super create Dialog Area parent description Label desc Label new Label composite SWT WRAP desc Label set Text Workbench Messages get String Save Perspective Dialog description NON NLS 1 desc Label set Font parent get Font Spacer Label label new Label composite SWT NONE Grid Data data new Grid Data data height Hint 8 label set Layout Data data Create name group Composite name Group new Composite composite SWT NONE name Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width layout margin Height 0 name Group set Layout layout Create name label label new Label name Group SWT NONE label set Text Workbench Messages get String Save Perspective name NON NLS 1 label set Font font Add text field text new Text name Group SWT BORDER text set Focus data new Grid Data Grid Data FILL HORIZONTAL data width Hint convert Width In Chars To Pixels TEXT WIDTH text set Layout Data data text set Font font text add Modify Listener this Spacer label new Label composite SWT NONE data new Grid Data data height Hint 5 label set Layout Data data Another label label new Label composite SWT NONE label set Text Workbench Messages get String Save Perspective existing NON NLS 1 label set Font font Add perspective list list new Table Viewer composite SWT H SCROLL SWT V SCROLL SWT BORDER list set Label Provider new Perspective Label Provider list set Content Provider new Persp Content Provider list add Filter new Activity Viewer Filter list set Sorter new Viewer Sorter list set Input persp Reg list add Selection Changed Listener this list get Table set Font font Set perspective list size Control ctrl list get Control Grid Data spec new Grid Data Grid Data FILL BOTH spec width Hint convert Width In Chars To Pixels LIST WIDTH spec height Hint convert Height In Chars To Pixels LIST HEIGHT ctrl set Layout Data spec Set the initial selection if initial Selection null Structured Selection sel new Structured Selection initial Selection list set Selection sel true text select All Return results return composite  createDialogArea getFont createDialogArea descLabel descLabel setText WorkbenchMessages getString SavePerspectiveDialog descLabel setFont getFont GridData GridData heightHint setLayoutData nameGroup nameGroup setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout numColumns marginWidth marginHeight nameGroup setLayout nameGroup setText WorkbenchMessages getString SavePerspective setFont nameGroup setFocus GridData GridData FILL_HORIZONTAL widthHint convertWidthInCharsToPixels TEXT_WIDTH setLayoutData setFont addModifyListener GridData heightHint setLayoutData setText WorkbenchMessages getString SavePerspective setFont TableViewer H_SCROLL V_SCROLL setLabelProvider PerspectiveLabelProvider setContentProvider PerspContentProvider addFilter ActivityViewerFilter setSorter ViewerSorter setInput perspReg addSelectionChangedListener getTable setFont getControl GridData GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels LIST_WIDTH heightHint convertHeightInCharsToPixels LIST_HEIGHT setLayoutData initialSelection StructuredSelection StructuredSelection initialSelection setSelection selectAll
Returns the target name public I Perspective Descriptor get Persp return persp  IPerspectiveDescriptor getPersp
Returns the target name public String get Persp Name return persp Name  getPerspName perspName
The user has typed some text public void modify Text org eclipse swt events Modify Event e Get text persp Name text get Text Transfer text to persp list ignore Selection true persp persp Reg find Perspective With Label persp Name if persp null Structured Selection sel new Structured Selection list set Selection sel else Structured Selection sel new Structured Selection persp list set Selection sel ignore Selection false update Buttons  modifyText ModifyEvent perspName getText ignoreSelection perspReg findPerspectiveWithLabel perspName StructuredSelection StructuredSelection setSelection StructuredSelection StructuredSelection setSelection ignoreSelection updateButtons
Notifies that the ok button of this dialog has been pressed p The default implementation of this framework method sets this dialog s return code to code Window OK code and closes the dialog Subclasses may override p protected void ok Pressed persp Name text get Text persp persp Reg find Perspective With Label persp Name if persp null Confirm ok to overwrite String message Workbench Messages format Save Perspective overwrite Question new Object persp Name NON NLS 1 String buttons new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL Message Dialog d new Message Dialog this get Shell Workbench Messages get String Save Perspective overwrite Title NON NLS 1 null message Message Dialog QUESTION buttons 0 switch d open case 0 yes break case 1 no return case 2 cancel cancel Pressed return default return super ok Pressed  okPressed perspName getText perspReg findPerspectiveWithLabel perspName WorkbenchMessages SavePerspective overwriteQuestion perspName IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL MessageDialog MessageDialog getShell WorkbenchMessages getString SavePerspective overwriteTitle MessageDialog cancelPressed okPressed
Notifies that the selection has changed param event event object describing the change public void selection Changed Selection Changed Event event If a selection is caused by modify Text ignore it if ignore Selection return Get selection I Structured Selection sel I Structured Selection list get Selection persp null if sel is Empty persp I Perspective Descriptor sel get First Element Transfer selection to text field if persp null persp Name persp get Label text set Text persp Name update Buttons  selectionChanged SelectionChangedEvent modifyText ignoreSelection IStructuredSelection IStructuredSelection getSelection isEmpty IPerspectiveDescriptor getFirstElement perspName getLabel setText perspName updateButtons
Sets the initial selection in this dialog param selected Element the perspective descriptor to select public void set Initial Selection I Perspective Descriptor selected Element initial Selection selected Element  selectedElement setInitialSelection IPerspectiveDescriptor selectedElement initialSelection selectedElement
Update the OK button private void update Buttons if ok Button null String label text get Text ok Button set Enabled persp Reg validate Label label  updateButtons okButton getText okButton setEnabled perspReg validateLabel

Perspective Dialog constructor comment public Select Perspective Dialog Shell parent Shell I Perspective Registry persp Reg super parent Shell this persp Reg persp Reg  PerspectiveDialog SelectPerspectiveDialog parentShell IPerspectiveRegistry perspReg parentShell perspReg perspReg
see org eclipse jface dialogs Dialog cancel Pressed protected void cancel Pressed persp Desc null super cancel Pressed  cancelPressed cancelPressed perspDesc cancelPressed
protected void configure Shell Shell shell super configure Shell shell shell set Text Workbench Messages get String Select Perspective shell Title NON NLS 1 Workbench Help set Help shell I Help Context Ids SELECT PERSPECTIVE DIALOG  configureShell configureShell setText WorkbenchMessages getString SelectPerspective shellTitle WorkbenchHelp setHelp IHelpContextIds SELECT_PERSPECTIVE_DIALOG
Adds buttons to this dialog s button bar p The default implementation of this framework method adds standard ok and cancel buttons using the code create Button code framework method Subclasses may override p param parent the button bar composite protected void create Buttons For Button Bar Composite parent ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButton createButtonsForButtonBar okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
Creates and returns the contents of the upper part of this dialog above the button bar param the parent composite to contain the dialog area return the dialog area control protected Control create Dialog Area Composite parent Run super Composite composite Composite super create Dialog Area parent composite set Font parent get Font create Viewer composite layout Top Control list get Control if needs Show All Button create Show All Button composite Return results return composite  createDialogArea createDialogArea setFont getFont createViewer layoutTopControl getControl needsShowAllButton createShowAllButton
return whether a show all button is needed A show all button is needed only if the list contains filtered items private boolean needs Show All Button return activity Viewer Filter get Has Encountered Filtered Item  needsShowAllButton activityViewerFilter getHasEncounteredFilteredItem
public void widget Selected Selection Event e if show All Button get Selection list reset Filters else list add Filter activity Viewer Filter  widgetSelected SelectionEvent showAllButton getSelection resetFilters addFilter activityViewerFilter
Create a show all button in the parent param parent the parent code Composite code private void create Show All Button Composite parent show All Button new Button parent SWT CHECK show All Button set Text Activity Messages get String Perspective show All NON NLS 1 show All Button add Selection Listener new Selection Adapter non Javadoc see org eclipse swt events Selection Adapter widget Selected org eclipse swt events Selection Event public void widget Selected Selection Event e if show All Button get Selection list reset Filters else list add Filter activity Viewer Filter  createShowAllButton showAllButton showAllButton setText ActivityMessages getString showAll showAllButton addSelectionListener SelectionAdapter SelectionAdapter widgetSelected SelectionEvent widgetSelected SelectionEvent showAllButton getSelection resetFilters addFilter activityViewerFilter
list add Selection Changed Listener this list add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Double Click Event  addSelectionChangedListener addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleDoubleClickEvent
Create a new viewer in the parent param parent the parent code Composite code private void create Viewer Composite parent Add perspective list list new Table Viewer parent SWT SINGLE SWT H SCROLL SWT V SCROLL SWT BORDER list get Table set Font parent get Font list set Label Provider new Perspective Label Provider list set Content Provider new Persp Content Provider list add Filter activity Viewer Filter list set Sorter new Viewer Sorter list set Input persp Reg list add Selection Changed Listener this list add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Double Click Event  createViewer TableViewer H_SCROLL V_SCROLL getTable setFont getFont setLabelProvider PerspectiveLabelProvider setContentProvider PerspContentProvider addFilter activityViewerFilter setSorter ViewerSorter setInput perspReg addSelectionChangedListener addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleDoubleClickEvent
Returns the current selection public I Perspective Descriptor get Selection return persp Desc  IPerspectiveDescriptor getSelection perspDesc
Handle a double click event on the list protected void handle Double Click Event ok Pressed  handleDoubleClickEvent okPressed
Layout the top control param control the control private void layout Top Control Control control Grid Data spec new Grid Data Grid Data FILL BOTH spec width Hint LIST WIDTH spec height Hint LIST HEIGHT control set Layout Data spec  layoutTopControl GridData GridData GridData FILL_BOTH widthHint LIST_WIDTH heightHint LIST_HEIGHT setLayoutData
Notifies that the selection has changed param event event object describing the change public void selection Changed Selection Changed Event event update Selection event update Buttons  selectionChanged SelectionChangedEvent updateSelection updateButtons
Update the button enablement state protected void update Buttons ok Button set Enabled get Selection null  updateButtons okButton setEnabled getSelection
Update the selection object protected void update Selection Selection Changed Event event persp Desc null I Structured Selection sel I Structured Selection event get Selection if sel is Empty Object obj sel get First Element if obj instanceof I Perspective Descriptor persp Desc I Perspective Descriptor obj  updateSelection SelectionChangedEvent perspDesc IStructuredSelection IStructuredSelection getSelection isEmpty getFirstElement IPerspectiveDescriptor perspDesc IPerspectiveDescriptor
see org eclipse jface dialogs Dialog ok Pressed protected void ok Pressed if Workbench Activity Helper allow Use Of get Selection super ok Pressed  okPressed okPressed WorkbenchActivityHelper allowUseOf getSelection okPressed

Constructs a new Show View Dialog public Show View Dialog Shell parent Shell I View Registry view Reg super parent Shell this view Reg view Reg  ShowViewDialog ShowViewDialog parentShell IViewRegistry viewReg parentShell viewReg viewReg
This method is called if a button has been pressed protected void button Pressed int button Id if button Id I Dialog Constants OK ID save Widget Values super button Pressed button Id  buttonPressed buttonId buttonId IDialogConstants OK_ID saveWidgetValues buttonPressed buttonId
Notifies that the cancel button of this dialog has been pressed protected void cancel Pressed view Descs new I View Descriptor 0 super cancel Pressed  cancelPressed viewDescs IViewDescriptor cancelPressed
protected void configure Shell Shell shell super configure Shell shell shell set Text Workbench Messages get String Show View shell Title NON NLS 1 Workbench Help set Help shell I Help Context Ids SHOW VIEW DIALOG  configureShell configureShell setText WorkbenchMessages getString ShowView shellTitle WorkbenchHelp setHelp IHelpContextIds SHOW_VIEW_DIALOG
Adds buttons to this dialog s button bar p The default implementation of this framework method adds standard ok and cancel buttons using the code create Button code framework method Subclasses may override p param parent the button bar composite protected void create Buttons For Button Bar Composite parent ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButton createButtonsForButtonBar okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
Creates and returns the contents of the upper part of this dialog above the button bar param the parent composite to contain the dialog area return the dialog area control protected Control create Dialog Area Composite parent Run super Composite composite Composite super create Dialog Area parent composite set Font parent get Font create Viewer composite layout Top Control tree get Control Restore the last state restore Widget Values Return results return composite  createDialogArea createDialogArea setFont getFont createViewer layoutTopControl getControl restoreWidgetValues
Create a new viewer in the parent param parent the parent code Composite code private void create Viewer Composite parent tree new Tree Viewer parent SWT MULTI SWT H SCROLL SWT V SCROLL SWT BORDER tree set Label Provider new View Label Provider tree set Content Provider new View Content Provider tree set Sorter new View Sorter View Registry view Reg tree set Input view Reg tree add Selection Changed Listener this tree add Double Click Listener this tree get Tree set Font parent get Font  createViewer TreeViewer H_SCROLL V_SCROLL setLabelProvider ViewLabelProvider setContentProvider ViewContentProvider setSorter ViewSorter ViewRegistry viewReg setInput viewReg addSelectionChangedListener addDoubleClickListener getTree setFont getFont
public void double Click Double Click Event event I Structured Selection s I Structured Selection event get Selection Object element s get First Element if tree is Expandable element tree set Expanded State element tree get Expanded State element else if view Descs length 0 save Widget Values set Return Code OK close  doubleClick DoubleClickEvent IStructuredSelection IStructuredSelection getSelection getFirstElement isExpandable setExpandedState getExpandedState viewDescs saveWidgetValues setReturnCode
Return the dialog store to cache values into protected I Dialog Settings get Dialog Settings I Dialog Settings workbench Settings Workbench Plugin get Default get Dialog Settings I Dialog Settings section workbench Settings get Section DIALOG SETTING SECTION NAME if section null section workbench Settings add New Section DIALOG SETTING SECTION NAME return section  IDialogSettings getDialogSettings IDialogSettings workbenchSettings WorkbenchPlugin getDefault getDialogSettings IDialogSettings workbenchSettings getSection DIALOG_SETTING_SECTION_NAME workbenchSettings addNewSection DIALOG_SETTING_SECTION_NAME
Returns the descriptors for the selected views public I View Descriptor get Selection return view Descs  IViewDescriptor getSelection viewDescs
Layout the top control param control the control private void layout Top Control Control control Grid Data spec new Grid Data Grid Data FILL BOTH spec width Hint LIST WIDTH spec height Hint LIST HEIGHT control set Layout Data spec  layoutTopControl GridData GridData GridData FILL_BOTH widthHint LIST_WIDTH heightHint LIST_HEIGHT setLayoutData
Use the dialog store to restore widget values to the values that they held last time this dialog was used to completion protected void restore Widget Values I Dialog Settings settings get Dialog Settings String expanded Category Ids settings get Array STORE EXPANDED CATEGORIES ID if expanded Category Ids null return View Registry reg View Registry view Reg Array List categories To Expand new Array List expanded Category Ids length for int i 0 i expanded Category Ids length i Category category reg find Category expanded Category Ids i if category null ie it still exists categories To Expand add category if categories To Expand is Empty tree set Expanded Elements categories To Expand to Array  restoreWidgetValues IDialogSettings getDialogSettings expandedCategoryIds getArray STORE_EXPANDED_CATEGORIES_ID expandedCategoryIds ViewRegistry ViewRegistry viewReg ArrayList categoriesToExpand ArrayList expandedCategoryIds expandedCategoryIds findCategory expandedCategoryIds categoriesToExpand categoriesToExpand isEmpty setExpandedElements categoriesToExpand toArray
Since OK was pressed write widget values to the dialog store so that they will persist into the next invocation of this dialog protected void save Widget Values I Dialog Settings settings get Dialog Settings Collect the ids of the all expanded categories Object expanded Elements tree get Expanded Elements String expanded Category Ids new String expanded Elements length for int i 0 i expanded Elements length i expanded Category Ids i Category expanded Elements i get Id Save them for next time settings put STORE EXPANDED CATEGORIES ID expanded Category Ids  saveWidgetValues IDialogSettings getDialogSettings expandedElements getExpandedElements expandedCategoryIds expandedElements expandedElements expandedCategoryIds expandedElements getId STORE_EXPANDED_CATEGORIES_ID expandedCategoryIds
Notifies that the selection has changed param event event object describing the change public void selection Changed Selection Changed Event event update Selection event update Buttons  selectionChanged SelectionChangedEvent updateSelection updateButtons
Update the button enablement state protected void update Buttons ok Button set Enabled get Selection null  updateButtons okButton setEnabled getSelection
Update the selection object protected void update Selection Selection Changed Event event Array List descs new Array List I Structured Selection sel I Structured Selection event get Selection for Iterator i sel iterator i has Next Object o i next if o instanceof I View Descriptor descs add o view Descs new I View Descriptor descs size descs to Array view Descs  updateSelection SelectionChangedEvent ArrayList ArrayList IStructuredSelection IStructuredSelection getSelection hasNext IViewDescriptor viewDescs IViewDescriptor toArray viewDescs

see Preference Page create Contents Composite protected Control create Contents Composite parent Workbench Help set Help parent I Help Context Ids STARTUP PREFERENCE PAGE Composite composite create Composite parent create Early Startup Selection composite return composite  PreferencePage createContents createContents WorkbenchHelp setHelp IHelpContextIds STARTUP_PREFERENCE_PAGE createComposite createEarlyStartupSelection
protected Composite create Composite Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 composite set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL composite set Layout Data data composite set Font parent get Font return composite  createComposite GridLayout GridLayout marginWidth marginHeight setLayout GridData GridData GridData FILL_BOTH GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL setLayoutData setFont getFont
protected void create Early Startup Selection Composite parent Label label new Label parent SWT NONE label set Text Workbench Messages get String Startup Preference Page label NON NLS 1 label set Font parent get Font Grid Data data new Grid Data Grid Data FILL HORIZONTAL label set Layout Data data plugins List new Table parent SWT BORDER SWT CHECK SWT H SCROLL SWT V SCROLL data new Grid Data Grid Data FILL BOTH plugins List set Font parent get Font plugins List set Layout Data data populate Plugins List  createEarlyStartupSelection setText WorkbenchMessages getString StartupPreferencePage setFont getFont GridData GridData GridData FILL_HORIZONTAL setLayoutData pluginsList H_SCROLL V_SCROLL GridData GridData FILL_BOTH pluginsList setFont getFont pluginsList setLayoutData populatePluginsList
private void populate Plugins List String descriptors workbench get Early Activated Plugins I Preference Store store workbench get Preference Store String pref store get String I Preference Constants PLUGINS NOT ACTIVATED ON STARTUP if pref null pref new String for int i 0 i descriptors length i String desc descriptors i Table Item item new Table Item plugins List SWT NONE item set Text String Platform get Bundle desc get Headers get Constants BUNDLE NAME item set Data desc String id desc I Preference Constants SEPARATOR item set Checked pref index Of id 0  populatePluginsList getEarlyActivatedPlugins IPreferenceStore getPreferenceStore getString IPreferenceConstants PLUGINS_NOT_ACTIVATED_ON_STARTUP TableItem TableItem pluginsList setText getBundle getHeaders BUNDLE_NAME setData IPreferenceConstants setChecked indexOf
see I Workbench Preference Page public void init I Workbench workbench this workbench Workbench workbench  IWorkbenchPreferencePage IWorkbench
see Preference Page protected void perform Defaults Table Item items plugins List get Items for int i 0 i items length i items i set Checked true  PreferencePage performDefaults TableItem pluginsList getItems setChecked
see Preference Page public boolean perform Ok String Buffer preference new String Buffer Table Item items plugins List get Items for int i 0 i items length i if items i get Checked preference append String items i get Data preference append I Preference Constants SEPARATOR String pref preference to String I Preference Store store workbench get Preference Store store put Value I Preference Constants PLUGINS NOT ACTIVATED ON STARTUP pref Pref Util save Prefs return true  PreferencePage performOk StringBuffer StringBuffer TableItem pluginsList getItems getChecked getData IPreferenceConstants toString IPreferenceStore getPreferenceStore putValue IPreferenceConstants PLUGINS_NOT_ACTIVATED_ON_STARTUP PrefUtil savePrefs

Create a new instance of the View Content Provider public View Content Provider no op  ViewContentProvider ViewContentProvider
see org eclipse jface viewers I Content Provider dispose public void dispose child Map clear  IContentProvider childMap
public Object get Children Object element Object children Object child Map get element if children null children create Children element child Map put element children return children  getChildren childMap createChildren childMap
Does the actual work of get Children see org eclipse jface viewers I Tree Content Provider get Children java lang Object private Object create Children Object element if element instanceof I View Registry I View Registry reg I View Registry element Category categories reg get Categories Array List filtered new Array List for int i 0 i categories length i if has Children categories i continue filtered add categories i categories Category filtered to Array new Category filtered size if there is only one category return it s children directly if categories length 1 return get Children categories 0 return categories else if element instanceof Category Array List list Category element get Elements if list null Array List filtered new Array List for Iterator i list iterator i has Next Object o i next if Workbench Activity Helper filter Item o continue filtered add o return remove Intro View filtered to Array return new Object 0  getChildren ITreeContentProvider getChildren createChildren IViewRegistry IViewRegistry IViewRegistry getCategories ArrayList ArrayList hasChildren toArray getChildren ArrayList getElements ArrayList ArrayList hasNext WorkbenchActivityHelper filterItem removeIntroView toArray
Removes the temporary intro view from the list so that it cannot be activated except through the introduction command param list the list of view descriptors return the modified list since 3 0 private Array List remove Intro View Array List list for Iterator i list iterator i has Next I View Descriptor view I View Descriptor i next if view get Id equals I Intro Constants INTRO VIEW ID i remove return list  ArrayList removeIntroView ArrayList hasNext IViewDescriptor IViewDescriptor getId IIntroConstants INTRO_VIEW_ID
see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object element return get Children element  IStructuredContentProvider getElements getElements getChildren
see org eclipse jface viewers I Tree Content Provider get Parent java lang Object public Object get Parent Object element return null  ITreeContentProvider getParent getParent
public boolean has Children java lang Object element if element instanceof I View Registry return true else if element instanceof Category if get Children element length 0 return true return false  hasChildren IViewRegistry getChildren
java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input child Map clear  inputChanged oldInput newInput childMap

private Hash Map images Image cache Image Image Descriptor desc if images null images new Hash Map 21 Image image Image images get desc if image null image desc create Image images put desc image return image  HashMap cacheImage ImageDescriptor HashMap createImage
public void dispose if images null for Iterator i images values iterator i has Next Image i next dispose images null super dispose  hasNext
public Image get Image Object element if element instanceof I View Descriptor Image Descriptor desc I View Descriptor element get Image Descriptor if desc null return cache Image desc else if element instanceof Category Image Descriptor desc Workbench Images get Image Descriptor I Shared Images IMG OBJ FOLDER return cache Image desc return null  getImage IViewDescriptor ImageDescriptor IViewDescriptor getImageDescriptor cacheImage ImageDescriptor WorkbenchImages getImageDescriptor ISharedImages IMG_OBJ_FOLDER cacheImage
public String get Text Object element String label Workbench Messages get String View Label unknown NON NLS 1 if element instanceof Category label Category element get Label else if element instanceof I View Descriptor label View Descriptor element get Label return Dialog Util remove Accel label  getText WorkbenchMessages getString ViewLabel getLabel IViewDescriptor ViewDescriptor getLabel DialogUtil removeAccel

private View Registry view Reg View Sorter constructor comment public View Sorter View Registry reg super view Reg reg  ViewRegistry viewReg ViewSorter ViewSorter ViewRegistry viewReg
Returns a negative zero or positive number depending on whether the first element is less than equal to or greater than the second element public int compare Viewer viewer Object e1 Object e2 if e1 instanceof I View Descriptor String str1 Dialog Util remove Accel I View Descriptor e1 get Label String str2 Dialog Util remove Accel I View Descriptor e2 get Label return collator compare str1 str2 else if e1 instanceof Category if e1 view Reg get Misc Category return 1 if e2 view Reg get Misc Category return 1 String str1 Dialog Util remove Accel Category e1 get Label String str2 Dialog Util remove Accel Category e2 get Label return collator compare str1 str2 return 0  IViewDescriptor DialogUtil removeAccel IViewDescriptor getLabel DialogUtil removeAccel IViewDescriptor getLabel viewReg getMiscCategory viewReg getMiscCategory DialogUtil removeAccel getLabel DialogUtil removeAccel getLabel

Create a composite that for creating the tab toggle buttons param composite Composite param title String private Group create Button Group Composite composite String title Group button Composite new Group composite SWT NONE button Composite set Text title button Composite set Font composite get Font Form Layout layout new Form Layout layout margin Width 2 layout margin Height 2 button Composite set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL button Composite set Layout Data data return button Composite  createButtonGroup buttonComposite buttonComposite setText buttonComposite setFont getFont FormLayout FormLayout marginWidth marginHeight buttonComposite setLayout GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL buttonComposite setLayoutData buttonComposite
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 p param parent the parent composite return the new control protected Control create Contents Composite parent Font font parent get Font Workbench Help set Help parent I Help Context Ids VIEWS PREFERENCE PAGE I Preference Store internal Store Pref Util get Internal Preference Store I Preference Store api Store Pref Util getAPI Preference Store editor Alignment internal Store get Int I Preference Constants EDITOR TAB POSITION view Alignment internal Store get Int I Preference Constants VIEW TAB POSITION persp Bar Location api Store get String I Workbench Preference Constants DOCK PERSPECTIVE BAR Composite composite new Composite parent SWT NONE composite set Layout Data new Grid Data Grid Data FILL BOTH composite set Font font Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 layout vertical Spacing 10 composite set Layout layout create Editor Tab Button Group composite create View Tab Button Group composite create Persp Bar Tab Button Group composite create Presentation Combo composite Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data FILL HORIZONTAL data horizontal Span 2 Label label new Label composite SWT NONE label set Text Workbench Messages get String Views Preference current Theme NON NLS 1 label set Font parent get Font label set Layout Data data data new Grid Data Grid Data HORIZONTAL ALIGN FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT data horizontal Span 2 theme Combo new Combo composite SWT READ ONLY theme Combo set Layout Data data theme Combo set Font parent get Font refresh Theme Combo create Show Text On Perspective Bar Pref composite create Show Traditional Style Tabs Pref composite return composite  createContents getFont WorkbenchHelp setHelp IHelpContextIds VIEWS_PREFERENCE_PAGE IPreferenceStore internalStore PrefUtil getInternalPreferenceStore IPreferenceStore apiStore PrefUtil getAPIPreferenceStore editorAlignment internalStore getInt IPreferenceConstants EDITOR_TAB_POSITION viewAlignment internalStore getInt IPreferenceConstants VIEW_TAB_POSITION perspBarLocation apiStore getString IWorkbenchPreferenceConstants DOCK_PERSPECTIVE_BAR setLayoutData GridData GridData FILL_BOTH setFont GridLayout GridLayout marginWidth marginHeight verticalSpacing setLayout createEditorTabButtonGroup createViewTabButtonGroup createPerspBarTabButtonGroup createPresentationCombo GridData GridData GridData GRAB_HORIZONTAL GridData FILL_HORIZONTAL horizontalSpan setText WorkbenchMessages getString ViewsPreference currentTheme setFont getFont setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT horizontalSpan themeCombo READ_ONLY themeCombo setLayoutData themeCombo setFont getFont refreshThemeCombo createShowTextOnPerspectiveBarPref createShowTraditionalStyleTabsPref
private void create Presentation Combo Composite parent Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data FILL HORIZONTAL data horizontal Span 2 Label label new Label parent SWT NONE label set Text Workbench Messages get String Views Preference current Presentation NON NLS 1 label set Font parent get Font label set Layout Data data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data FILL HORIZONTAL data horizontal Span 2 presentation Combo new Combo parent SWT READ ONLY presentation Combo set Font parent get Font presentation Combo set Layout Data data refresh Presentation Combo  createPresentationCombo GridData GridData GridData GRAB_HORIZONTAL GridData FILL_HORIZONTAL horizontalSpan setText WorkbenchMessages getString ViewsPreference currentPresentation setFont getFont setLayoutData GridData GridData GRAB_HORIZONTAL GridData FILL_HORIZONTAL horizontalSpan presentationCombo READ_ONLY presentationCombo setFont getFont presentationCombo setLayoutData refreshPresentationCombo
Set the two supplied controls to be beside each other private void attach Controls Control left Control Control right Control Form Data left Data new Form Data left Data left new Form Attachment 0 0 Form Data right Data new Form Data right Data left new Form Attachment left Control 5 left Control set Layout Data left Data right Control set Layout Data right Data  attachControls leftControl rightControl FormData leftData FormData leftData FormAttachment FormData rightData FormData rightData FormAttachment leftControl leftControl setLayoutData leftData rightControl setLayoutData rightData
this editor Top Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e editor Alignment SWT TOP  editorTopButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent editorAlignment
get Accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e e result EDITORS TITLE  getAccessible addAccessibleListener AccessibleAdapter getName AccessibleEvent EDITORS_TITLE
this editor Bottom Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e editor Alignment SWT BOTTOM  editorBottomButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent editorAlignment
Create a composite that contains buttons for selecting tab position for the edit selection param composite Composite private void create Editor Tab Button Group Composite composite Font font composite get Font Group button Composite create Button Group composite EDITORS TITLE this editor Top Button new Button button Composite SWT RADIO this editor Top Button set Text EDITORS TOP TITLE this editor Top Button set Selection this editor Alignment SWT TOP this editor Top Button set Font font this editor Top Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e editor Alignment SWT TOP this editor Top Button get Accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e e result EDITORS TITLE this editor Bottom Button new Button button Composite SWT RADIO this editor Bottom Button set Text EDITORS BOTTOM TITLE this editor Bottom Button set Selection this editor Alignment SWT BOTTOM this editor Bottom Button set Font font this editor Bottom Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e editor Alignment SWT BOTTOM attach Controls this editor Top Button this editor Bottom Button  createEditorTabButtonGroup getFont buttonComposite createButtonGroup EDITORS_TITLE editorTopButton buttonComposite editorTopButton setText EDITORS_TOP_TITLE editorTopButton setSelection editorAlignment editorTopButton setFont editorTopButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent editorAlignment editorTopButton getAccessible addAccessibleListener AccessibleAdapter getName AccessibleEvent EDITORS_TITLE editorBottomButton buttonComposite editorBottomButton setText EDITORS_BOTTOM_TITLE editorBottomButton setSelection editorAlignment editorBottomButton setFont editorBottomButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent editorAlignment attachControls editorTopButton editorBottomButton
this view Top Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e view Alignment SWT TOP  viewTopButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent viewAlignment
this view Bottom Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e view Alignment SWT BOTTOM  viewBottomButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent viewAlignment
Create a composite that contains buttons for selecting tab position for the view selection param composite Composite private void create View Tab Button Group Composite composite Font font composite get Font Group button Composite create Button Group composite VIEWS TITLE button Composite set Font font this view Top Button new Button button Composite SWT RADIO this view Top Button set Text VIEWS TOP TITLE this view Top Button set Selection this view Alignment SWT TOP this view Top Button set Font font this view Top Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e view Alignment SWT TOP this view Bottom Button new Button button Composite SWT RADIO this view Bottom Button set Text VIEWS BOTTOM TITLE this view Bottom Button set Selection this view Alignment SWT BOTTOM this view Bottom Button set Font font this view Bottom Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e view Alignment SWT BOTTOM attach Controls this view Top Button this view Bottom Button  createViewTabButtonGroup getFont buttonComposite createButtonGroup VIEWS_TITLE buttonComposite setFont viewTopButton buttonComposite viewTopButton setText VIEWS_TOP_TITLE viewTopButton setSelection viewAlignment viewTopButton setFont viewTopButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent viewAlignment viewBottomButton buttonComposite viewBottomButton setText VIEWS_BOTTOM_TITLE viewBottomButton setSelection viewAlignment viewBottomButton setFont viewBottomButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent viewAlignment attachControls viewTopButton viewBottomButton
persp Left Button set Font font persp Left Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e persp Bar Location I Workbench Preference Constants LEFT  perspLeftButton setFont perspLeftButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent perspBarLocation IWorkbenchPreferenceConstants
persp Top Left Button set Font font persp Top Left Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e persp Bar Location I Workbench Preference Constants TOP LEFT  perspTopLeftButton setFont perspTopLeftButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent perspBarLocation IWorkbenchPreferenceConstants TOP_LEFT
persp Top Right Button set Font font persp Top Right Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e persp Bar Location I Workbench Preference Constants TOP RIGHT  perspTopRightButton setFont perspTopRightButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent perspBarLocation IWorkbenchPreferenceConstants TOP_RIGHT
Create a composite that contains buttons for selecting perspective switcher position param composite Composite private void create Persp Bar Tab Button Group Composite composite Font font composite get Font Group button Composite create Button Group composite PERSP TITLE button Composite set Font font persp Left Button new Button button Composite SWT RADIO persp Left Button set Text PERSP LEFT TITLE persp Left Button set Selection I Workbench Preference Constants LEFT equals persp Bar Location persp Left Button set Font font persp Left Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e persp Bar Location I Workbench Preference Constants LEFT persp Top Left Button new Button button Composite SWT RADIO persp Top Left Button set Text PERSP TOP LEFT TITLE persp Top Left Button set Selection I Workbench Preference Constants TOP LEFT equals persp Bar Location persp Top Left Button set Font font persp Top Left Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e persp Bar Location I Workbench Preference Constants TOP LEFT persp Top Right Button new Button button Composite SWT RADIO persp Top Right Button set Text PERSP TOP RIGHT TITLE persp Top Right Button set Selection I Workbench Preference Constants TOP RIGHT equals persp Bar Location persp Top Right Button set Font font persp Top Right Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e persp Bar Location I Workbench Preference Constants TOP RIGHT Form Data left Data new Form Data left Data left new Form Attachment 0 5 Form Data top Left Data new Form Data top Left Data left new Form Attachment persp Left Button 5 Form Data top Right Data new Form Data top Right Data left new Form Attachment persp Top Left Button 0 persp Left Button set Layout Data left Data persp Top Left Button set Layout Data top Left Data persp Top Right Button set Layout Data top Right Data  createPerspBarTabButtonGroup getFont buttonComposite createButtonGroup PERSP_TITLE buttonComposite setFont perspLeftButton buttonComposite perspLeftButton setText PERSP_LEFT_TITLE perspLeftButton setSelection IWorkbenchPreferenceConstants perspBarLocation perspLeftButton setFont perspLeftButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent perspBarLocation IWorkbenchPreferenceConstants perspTopLeftButton buttonComposite perspTopLeftButton setText PERSP_TOP_LEFT_TITLE perspTopLeftButton setSelection IWorkbenchPreferenceConstants TOP_LEFT perspBarLocation perspTopLeftButton setFont perspTopLeftButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent perspBarLocation IWorkbenchPreferenceConstants TOP_LEFT perspTopRightButton buttonComposite perspTopRightButton setText PERSP_TOP_RIGHT_TITLE perspTopRightButton setSelection IWorkbenchPreferenceConstants TOP_RIGHT perspBarLocation perspTopRightButton setFont perspTopRightButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent perspBarLocation IWorkbenchPreferenceConstants TOP_RIGHT FormData leftData FormData leftData FormAttachment FormData topLeftData FormData topLeftData FormAttachment perspLeftButton FormData topRightData FormData topRightData FormAttachment perspTopLeftButton perspLeftButton setLayoutData leftData perspTopLeftButton setLayoutData topLeftData perspTopRightButton setLayoutData topRightData
private void refresh Presentation Combo get the active presentation presentation Combo remove All refresh Presentation Factories int selection 1 for int i 0 i presentation Factories length i I Configuration Element el presentation Factories i String name el get Attribute I Workbench Constants TAG NAME if current Presentation Factory Id equals el get Attribute I Workbench Constants TAG ID presentation Combo add name else selection i presentation Combo add Workbench Messages format Views Preference current Presentation Format NON NLS 1 new String name if selection 1 presentation Combo select selection  refreshPresentationCombo presentationCombo removeAll refreshPresentationFactories presentationFactories IConfigurationElement presentationFactories getAttribute IWorkbenchConstants TAG_NAME currentPresentationFactoryId getAttribute IWorkbenchConstants TAG_ID presentationCombo presentationCombo WorkbenchMessages ViewsPreference currentPresentationFormat presentationCombo
Collator collator Collator get Instance Locale get Default public int compare Object a Object b I Configuration Element el1 I Configuration Element a I Configuration Element el2 I Configuration Element b return collator compare el1 get Attribute I Workbench Constants TAG NAME el2 get Attribute I Workbench Constants TAG NAME  getInstance getDefault IConfigurationElement IConfigurationElement IConfigurationElement IConfigurationElement getAttribute IWorkbenchConstants TAG_NAME getAttribute IWorkbenchConstants TAG_NAME
Update this page s list of presentation factories This should only be used when the presentation combo is refreshed as this array will be used to set the selection from the combo return private void refresh Presentation Factories update the current selection used to look for changes on apply current Presentation Factory Id Workbench get Instance get Presentation Id update the sorted list of factories presentation Factories Platform get Extension Registry get Configuration Elements For PlatformUI PLUGIN ID I Workbench Constants PL PRESENTATION FACTORIES sort the array by name Arrays sort presentation Factories new Comparator Collator collator Collator get Instance Locale get Default public int compare Object a Object b I Configuration Element el1 I Configuration Element a I Configuration Element el2 I Configuration Element b return collator compare el1 get Attribute I Workbench Constants TAG NAME el2 get Attribute I Workbench Constants TAG NAME  refreshPresentationFactories currentPresentationFactoryId getInstance getPresentationId presentationFactories getExtensionRegistry getConfigurationElementsFor PLUGIN_ID IWorkbenchConstants PL_PRESENTATION_FACTORIES presentationFactories getInstance getDefault IConfigurationElement IConfigurationElement IConfigurationElement IConfigurationElement getAttribute IWorkbenchConstants TAG_NAME getAttribute IWorkbenchConstants TAG_NAME
Update the preferences associated with the argument presentation factory param pres Factory Id the id given in the presentation factory s xml private void update Presentation Preferences There are some preference values associated with the R2 1 presentation that cannot be captured in the presentation factory Perhaps the extension point should contain these a list of attributes but for now it is done manually if presentation Combo null TODO log return int selection presentation Combo get Selection Index if selection 0 selection presentation Factories length TODO log return I Configuration Element element presentation Factories selection String id element get Attribute I Workbench Constants TAG ID if it hasn t changed then there s nothing to do if id equals current Presentation Factory Id return make sure they really want to do this int really new Message Dialog get Shell Workbench Messages get String Views Preference presentation Confirm title NON NLS 1 null Workbench Messages get String Views Preference presentation Confirm message NON NLS 1 Message Dialog QUESTION new String Workbench Messages get String Views Preference presentation Confirm yes NON NLS 1 Workbench Messages get String Views Preference presentation Confirm no NON NLS 1 1 open if really 0 return current Presentation Factory Id id apply 2 1 prefs if needed if R21PRESENTATION ID equals id setR21 Preferences else if R30PRESENTATION ID equals id setR30 Preferences set the new presentation factory id Pref Util getAPI Preference Store set Value I Workbench Preference Constants PRESENTATION FACTORY ID id  presFactoryId updatePresentationPreferences presentationCombo presentationCombo getSelectionIndex presentationFactories IConfigurationElement presentationFactories getAttribute IWorkbenchConstants TAG_ID currentPresentationFactoryId MessageDialog getShell WorkbenchMessages getString ViewsPreference presentationConfirm WorkbenchMessages getString ViewsPreference presentationConfirm MessageDialog WorkbenchMessages getString ViewsPreference presentationConfirm WorkbenchMessages getString ViewsPreference presentationConfirm currentPresentationFactoryId R21PRESENTATION_ID setR21Preferences R30PRESENTATION_ID setR30Preferences PrefUtil getAPIPreferenceStore setValue IWorkbenchPreferenceConstants PRESENTATION_FACTORY_ID
private void setR30 Preferences I Preference Store internal Store Pref Util get Internal Preference Store I Preference Store api Store Pref Util getAPI Preference Store reset the preferences changed by the 2 1 presentation internal Store set To Default I Preference Constants VIEW TAB POSITION view Alignment internal Store get Int I Preference Constants VIEW TAB POSITION view Top Button set Selection view Alignment SWT TOP view Bottom Button set Selection view Alignment SWT BOTTOM api Store set To Default I Workbench Preference Constants DOCK PERSPECTIVE BAR persp Bar Location api Store get String I Workbench Preference Constants DOCK PERSPECTIVE BAR persp Left Button set Selection I Workbench Preference Constants LEFT equals persp Bar Location persp Top Left Button set Selection I Workbench Preference Constants TOP LEFT equals persp Bar Location persp Top Right Button set Selection I Workbench Preference Constants TOP RIGHT equals persp Bar Location api Store set To Default I Workbench Preference Constants SHOW TEXT ON PERSPECTIVE BAR show Text On Perspective Bar set Selection api Store get Boolean I Workbench Preference Constants SHOW TEXT ON PERSPECTIVE BAR api Store set To Default I Workbench Preference Constants INITIAL FAST VIEW BAR LOCATION  setR30Preferences IPreferenceStore internalStore PrefUtil getInternalPreferenceStore IPreferenceStore apiStore PrefUtil getAPIPreferenceStore internalStore setToDefault IPreferenceConstants VIEW_TAB_POSITION viewAlignment internalStore getInt IPreferenceConstants VIEW_TAB_POSITION viewTopButton setSelection viewAlignment viewBottomButton setSelection viewAlignment apiStore setToDefault IWorkbenchPreferenceConstants DOCK_PERSPECTIVE_BAR perspBarLocation apiStore getString IWorkbenchPreferenceConstants DOCK_PERSPECTIVE_BAR perspLeftButton setSelection IWorkbenchPreferenceConstants perspBarLocation perspTopLeftButton setSelection IWorkbenchPreferenceConstants TOP_LEFT perspBarLocation perspTopRightButton setSelection IWorkbenchPreferenceConstants TOP_RIGHT perspBarLocation apiStore setToDefault IWorkbenchPreferenceConstants SHOW_TEXT_ON_PERSPECTIVE_BAR showTextOnPerspectiveBar setSelection apiStore getBoolean IWorkbenchPreferenceConstants SHOW_TEXT_ON_PERSPECTIVE_BAR apiStore setToDefault IWorkbenchPreferenceConstants INITIAL_FAST_VIEW_BAR_LOCATION
private void setR21 Preferences view tabs on the bottom view Alignment SWT BOTTOM view Top Button set Selection false view Bottom Button set Selection true perspective switcher on the left persp Bar Location I Workbench Preference Constants LEFT persp Left Button set Selection true persp Top Left Button set Selection false persp Top Right Button set Selection false turn off text on persp bar show Text On Perspective Bar set Selection false fast view bar on the left hidden pref set it directly Pref Util getAPI Preference Store set Value I Workbench Preference Constants INITIAL FAST VIEW BAR LOCATION I Workbench Preference Constants LEFT  setR21Preferences viewAlignment viewTopButton setSelection viewBottomButton setSelection perspBarLocation IWorkbenchPreferenceConstants perspLeftButton setSelection perspTopLeftButton setSelection perspTopRightButton setSelection showTextOnPerspectiveBar setSelection PrefUtil getAPIPreferenceStore setValue IWorkbenchPreferenceConstants INITIAL_FAST_VIEW_BAR_LOCATION IWorkbenchPreferenceConstants
private void refresh Theme Combo theme Combo remove All I Theme current Theme PlatformUI get Workbench get Theme Manager get Current Theme I Theme Descriptor descs Workbench Plugin get Default get Theme Registry get Themes int selection 0 String theme String PlatformUI get Workbench get Theme Manager get Theme I Theme Manager DEFAULT THEME get Label if current Theme get Id equals I Theme Manager DEFAULT THEME theme String Message Format format Workbench Messages get String Views Preference current Theme Format new Object theme String NON NLS 1 theme Combo add theme String for int i 0 i descs length i theme String descs i get Label if descs i get Id equals current Theme get Id theme String Message Format format Workbench Messages get String Views Preference current Theme Format new Object theme String NON NLS 1 selection i 1 theme Combo add theme String theme Combo select selection  refreshThemeCombo themeCombo removeAll ITheme currentTheme getWorkbench getThemeManager getCurrentTheme IThemeDescriptor WorkbenchPlugin getDefault getThemeRegistry getThemes themeString getWorkbench getThemeManager getTheme IThemeManager DEFAULT_THEME getLabel currentTheme getId IThemeManager DEFAULT_THEME themeString MessageFormat WorkbenchMessages getString ViewsPreference currentThemeFormat themeString themeCombo themeString themeString getLabel getId currentTheme getId themeString MessageFormat WorkbenchMessages getString ViewsPreference currentThemeFormat themeString themeCombo themeString themeCombo
Create the button and text that support setting the preference for showing text labels on the perspective switching bar protected void create Show Text On Perspective Bar Pref Composite composite I Preference Store api Store Pref Util getAPI Preference Store show Text On Perspective Bar new Button composite SWT CHECK show Text On Perspective Bar set Text Workbench Messages get String Workbench Preference show Text On Perspective Bar NON NLS 1 show Text On Perspective Bar set Font composite get Font show Text On Perspective Bar set Selection api Store get Boolean I Workbench Preference Constants SHOW TEXT ON PERSPECTIVE BAR set Button Layout Data show Text On Perspective Bar  createShowTextOnPerspectiveBarPref IPreferenceStore apiStore PrefUtil getAPIPreferenceStore showTextOnPerspectiveBar showTextOnPerspectiveBar setText WorkbenchMessages getString WorkbenchPreference showTextOnPerspectiveBar showTextOnPerspectiveBar setFont getFont showTextOnPerspectiveBar setSelection apiStore getBoolean IWorkbenchPreferenceConstants SHOW_TEXT_ON_PERSPECTIVE_BAR setButtonLayoutData showTextOnPerspectiveBar
Create the button and text that support setting the preference for showing text labels on the perspective switching bar protected void create Show Traditional Style Tabs Pref Composite composite I Preference Store api Store Pref Util getAPI Preference Store show Traditional Style Tabs new Button composite SWT CHECK show Traditional Style Tabs set Text Workbench Messages get String Views Preference traditional Tabs NON NLS 1 show Traditional Style Tabs set Font composite get Font show Traditional Style Tabs set Selection api Store get Boolean I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS set Button Layout Data show Traditional Style Tabs  createShowTraditionalStyleTabsPref IPreferenceStore apiStore PrefUtil getAPIPreferenceStore showTraditionalStyleTabs showTraditionalStyleTabs setText WorkbenchMessages getString ViewsPreference traditionalTabs showTraditionalStyleTabs setFont getFont showTraditionalStyleTabs setSelection apiStore getBoolean IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS setButtonLayoutData showTraditionalStyleTabs
Returns preference store that belongs to the our plugin return the preference store for this plugin protected I Preference Store do Get Preference Store return Workbench Plugin get Default get Preference Store  IPreferenceStore doGetPreferenceStore WorkbenchPlugin getDefault getPreferenceStore
Initializes this preference page for the given workbench p This method is called automatically as the preference page is being created and initialized Clients must not call this method p param workbench the workbench public void init org eclipse ui I Workbench workbench no op  IWorkbench
The default button has been pressed protected void perform Defaults I Preference Store store get Preference Store I Preference Store api Store Pref Util getAPI Preference Store show Text On Perspective Bar set Selection api Store get Default Boolean I Workbench Preference Constants SHOW TEXT ON PERSPECTIVE BAR show Traditional Style Tabs set Selection api Store get Default Boolean I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS int editor Top Value store get Default Int I Preference Constants EDITOR TAB POSITION editor Top Button set Selection editor Top Value SWT TOP editor Bottom Button set Selection editor Top Value SWT BOTTOM editor Alignment editor Top Value int view Top Value store get Default Int I Preference Constants VIEW TAB POSITION view Top Button set Selection view Top Value SWT TOP view Bottom Button set Selection view Top Value SWT BOTTOM view Alignment view Top Value persp Bar Location store get Default String I Workbench Preference Constants DOCK PERSPECTIVE BAR persp Left Button set Selection I Workbench Preference Constants LEFT equals persp Bar Location persp Top Left Button set Selection I Workbench Preference Constants TOP LEFT equals persp Bar Location persp Top Right Button set Selection I Workbench Preference Constants TOP RIGHT equals persp Bar Location No longer supported remove when confirmed if open Float Button null open Float Button set Selection value I Preference Constants OVM FLOAT Workbench Plugin get Default save Plugin Preferences super perform Defaults  performDefaults IPreferenceStore getPreferenceStore IPreferenceStore apiStore PrefUtil getAPIPreferenceStore showTextOnPerspectiveBar setSelection apiStore getDefaultBoolean IWorkbenchPreferenceConstants SHOW_TEXT_ON_PERSPECTIVE_BAR showTraditionalStyleTabs setSelection apiStore getDefaultBoolean IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS editorTopValue getDefaultInt IPreferenceConstants EDITOR_TAB_POSITION editorTopButton setSelection editorTopValue editorBottomButton setSelection editorTopValue editorAlignment editorTopValue viewTopValue getDefaultInt IPreferenceConstants VIEW_TAB_POSITION viewTopButton setSelection viewTopValue viewBottomButton setSelection viewTopValue viewAlignment viewTopValue perspBarLocation getDefaultString IWorkbenchPreferenceConstants DOCK_PERSPECTIVE_BAR perspLeftButton setSelection IWorkbenchPreferenceConstants perspBarLocation perspTopLeftButton setSelection IWorkbenchPreferenceConstants TOP_LEFT perspBarLocation perspTopRightButton setSelection IWorkbenchPreferenceConstants TOP_RIGHT perspBarLocation openFloatButton openFloatButton setSelection IPreferenceConstants OVM_FLOAT WorkbenchPlugin getDefault savePluginPreferences performDefaults
The user has pressed Ok Store apply this page s values appropriately public boolean perform Ok I Preference Store store get Preference Store I Preference Store api Store Pref Util getAPI Preference Store apply the presentation selection first since it might change some of the other values update Presentation Preferences api Store set Value I Workbench Preference Constants SHOW TEXT ON PERSPECTIVE BAR show Text On Perspective Bar get Selection api Store set Value I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS show Traditional Style Tabs get Selection store the editor tab value to setting store set Value I Preference Constants EDITOR TAB POSITION editor Alignment store the view tab value to setting store set Value I Preference Constants VIEW TAB POSITION view Alignment store the persp bar value api Store set Value I Workbench Preference Constants DOCK PERSPECTIVE BAR persp Bar Location int idx theme Combo get Selection Index if idx 0 Workbench get Instance get Theme Manager set Current Theme I Theme Manager DEFAULT THEME else Workbench get Instance get Theme Manager set Current Theme Workbench Plugin get Default get Theme Registry get Themes idx 1 get Id refresh Theme Combo return true  performOk IPreferenceStore getPreferenceStore IPreferenceStore apiStore PrefUtil getAPIPreferenceStore updatePresentationPreferences apiStore setValue IWorkbenchPreferenceConstants SHOW_TEXT_ON_PERSPECTIVE_BAR showTextOnPerspectiveBar getSelection apiStore setValue IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS showTraditionalStyleTabs getSelection setValue IPreferenceConstants EDITOR_TAB_POSITION editorAlignment setValue IPreferenceConstants VIEW_TAB_POSITION viewAlignment apiStore setValue IWorkbenchPreferenceConstants DOCK_PERSPECTIVE_BAR perspBarLocation themeCombo getSelectionIndex getInstance getThemeManager setCurrentTheme IThemeManager DEFAULT_THEME getInstance getThemeManager setCurrentTheme WorkbenchPlugin getDefault getThemeRegistry getThemes getId refreshThemeCombo

Creates a new code Wizard Collection Element code Parent can be null param name java lang String public Wizard Collection Element String id String plugin Id String name Wizard Collection Element parent this name name this id id this plugin Id plugin Id this parent parent  WizardCollectionElement WizardCollectionElement pluginId WizardCollectionElement pluginId pluginId
Adds a wizard collection to this collection public Adaptable List add I Adaptable a if a instanceof Workbench Wizard Element wizards add a else super add a return this  AdaptableList IAdaptable WorkbenchWizardElement
Returns the wizard collection child object corresponding to the passed path relative to this object or code null code if such an object could not be found param search Path org eclipse core runtime I Path return Wizard Collection Element public Wizard Collection Element find Child Collection I Path search Path Object children get Children null String search String search Path segment 0 for int i 0 i children length i Wizard Collection Element current Category Wizard Collection Element children i if current Category get Label null equals search String if search Path segment Count 1 return current Category return current Category find Child Collection search Path remove First Segments 1 return null  searchPath IPath WizardCollectionElement WizardCollectionElement findChildCollection IPath searchPath getChildren searchString searchPath WizardCollectionElement currentCategory WizardCollectionElement currentCategory getLabel searchString searchPath segmentCount currentCategory currentCategory findChildCollection searchPath removeFirstSegments
Returns this collection s associated wizard object corresponding to the passed id or code null code if such an object could not be found public Workbench Wizard Element find Wizard String search Id boolean recursive Object wizards get Wizards for int i 0 i wizards length i Workbench Wizard Element current Wizard Workbench Wizard Element wizards i if current Wizard getID equals search Id return current Wizard if recursive return null for Iterator iterator children iterator iterator has Next Wizard Collection Element child Wizard Collection Element iterator next Workbench Wizard Element result child find Wizard search Id true if result null return result return null  WorkbenchWizardElement findWizard searchId getWizards WorkbenchWizardElement currentWizard WorkbenchWizardElement currentWizard searchId currentWizard hasNext WizardCollectionElement WizardCollectionElement WorkbenchWizardElement findWizard searchId
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return Platform get Adapter Manager get Adapter this adapter  getAdapter IWorkbenchAdapter getAdapterManager getAdapter
Returns the unique ID of this element public String get Id return id  getId
Returns the label for this collection public String get Label Object o return name  getLabel
Returns the logical parent of the given object in its tree public Object get Parent Object o return parent  getParent
Returns a path representing this collection s ancestor chain public I Path get Path if parent null return new Path NON NLS 1 return parent get Path append name  IPath getPath getPath
Returns this collection element s associated collection of wizards public Object get Wizards return wizards get Children  getWizards getChildren
Returns true if this element has no children and no wizards public boolean is Empty return size 0 wizards size 0  isEmpty
Sets this collection s unique id public void set Id java lang String new Id id new Id  setId newId newId
Sets the collection of wizards associated with this collection element public void set Wizards Adaptable List value wizards value  setWizards AdaptableList
For debugging purposes public String to String String Buffer buf new String Buffer Wizard Collection NON NLS 1 buf append children size buf append children NON NLS 1 buf append wizards size buf append wizards NON NLS 1 return buf to String  toString StringBuffer StringBuffer WizardCollection toString
see org eclipse ui model I Workbench Adapter get Image Descriptor java lang Object public Image Descriptor get Image Descriptor Object object return Workbench Images get Image Descriptor I Shared Images IMG OBJ FOLDER  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor WorkbenchImages getImageDescriptor ISharedImages IMG_OBJ_FOLDER
see org eclipse ui activities support I Plugin Contribution from Plugin public boolean from Plugin return plugin Id null  IPluginContribution fromPlugin fromPlugin pluginId
see org eclipse ui activities support I Plugin Contribution get Local Id public String get Local Id return get Id  IPluginContribution getLocalId getLocalId getId
see org eclipse ui activities support I Plugin Contribution get Plugin Id public String get Plugin Id return plugin Id  IPluginContribution getPluginId getPluginId pluginId

see org eclipse jface viewers I Content Provider dispose public void dispose input null  IContentProvider
public Object get Children Object parent Element if parent Element instanceof Wizard Collection Element Array List list new Array List Wizard Collection Element element Wizard Collection Element parent Element Object child Collections element get Children for int i 0 i child Collections length i handle Child child Collections i list Object child Wizards element get Wizards for int i 0 i child Wizards length i handle Child child Wizards i list flatten lists with only one category if list size 1 list get 0 instanceof Wizard Collection Element return get Children list get 0 return list to Array else if parent Element instanceof Adaptable List Adaptable List a List Adaptable List parent Element Object children a List get Children Array List list new Array List children length for int i 0 i children length i handle Child children i list return list to Array else return new Object 0  getChildren parentElement parentElement WizardCollectionElement ArrayList ArrayList WizardCollectionElement WizardCollectionElement parentElement childCollections getChildren childCollections handleChild childCollections childWizards getWizards childWizards handleChild childWizards WizardCollectionElement getChildren toArray parentElement AdaptableList AdaptableList aList AdaptableList parentElement aList getChildren ArrayList ArrayList handleChild toArray
see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return get Children input Element  IStructuredContentProvider getElements getElements inputElement getChildren inputElement
public Object get Parent Object element if element instanceof Wizard Collection Element Object children input get Children for int i 0 i children length i if children i equals element return input return Wizard Collection Element element get Parent element else return null  getParent WizardCollectionElement getChildren WizardCollectionElement getParent
Adds the item to the list unless it s a collection element without any children param element the element to test and add param list the code Collection code to add to since 3 0 private void handle Child Object element Array List list if element instanceof Wizard Collection Element if has Children element list add element else list add element  handleChild ArrayList WizardCollectionElement hasChildren
public boolean has Children Object element if element instanceof Wizard Collection Element if get Children element length 0 return true return false  hasChildren WizardCollectionElement getChildren
java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input input Adaptable List new Input  inputChanged oldInput newInput AdaptableList newInput

int nesting Depth 0 Create a new instance of the receiver public Workbench Dialog Blocked Handler No default behavior  nestingDepth WorkbenchDialogBlockedHandler
public void clear Blocked if nesting Depth 0 return nesting Depth if nesting Depth 0 Blocked Jobs Dialog clear outer Monitor outer Monitor null nesting Depth 0  clearBlocked nestingDepth nestingDepth nestingDepth BlockedJobsDialog outerMonitor outerMonitor nestingDepth
public void show Blocked Shell parent Shell I Progress Monitor blocking Monitor I Status blocking Status String blocked Name nesting Depth if outer Monitor null outer Monitor blocking Monitor Try to get a name as best as possible if blocked Name null parent Shell null blocked Name parent Shell get Text Blocked Jobs Dialog create Blocked Dialog parent Shell blocking Monitor blocking Status blocked Name  showBlocked parentShell IProgressMonitor blockingMonitor IStatus blockingStatus blockedName nestingDepth outerMonitor outerMonitor blockingMonitor blockedName parentShell blockedName parentShell getText BlockedJobsDialog createBlockedDialog parentShell blockingMonitor blockingStatus blockedName
org eclipse core runtime I Status java lang String public void show Blocked I Progress Monitor blocking I Status blocking Status String blocked Name show Blocked null blocking blocking Status blocked Name  IStatus showBlocked IProgressMonitor IStatus blockingStatus blockedName showBlocked blockingStatus blockedName

private Selection Listener header Listener new Selection Adapter public void widget Selected Selection Event e int index editors Table index Of Table Column e widget if index sort Column reverse reverse else sort Column index update Items  SelectionListener headerListener SelectionAdapter widgetSelected SelectionEvent editorsTable indexOf TableColumn sortColumn sortColumn updateItems
Constructor for Workbench Editors Dialog public Workbench Editors Dialog I Workbench Window window super window get Shell this window window set Title Workbench Messages get String Workbench Editors Dialog title NON NLS 1 set Shell Style get Shell Style SWT RESIZE I Dialog Settings s get Dialog Settings if s get ALLPERSP null sort Column 0 else show All Persp s get Boolean ALLPERSP sort Column s get Int SORT String array s get Array BOUNDS if array null bounds new Rectangle 0 0 0 0 bounds x new Integer array 0 int Value bounds y new Integer array 1 int Value bounds width new Integer array 2 int Value bounds height new Integer array 3 int Value array s get Array COLUMNS if array null columns Width new int array length for int i 0 i columns Width length i columns Width i new Integer array i int Value  WorkbenchEditorsDialog WorkbenchEditorsDialog IWorkbenchWindow getShell setTitle WorkbenchMessages getString WorkbenchEditorsDialog setShellStyle getShellStyle IDialogSettings getDialogSettings sortColumn showAllPersp getBoolean sortColumn getInt getArray intValue intValue intValue intValue getArray columnsWidth columnsWidth columnsWidth intValue
Method declared on Window protected void configure Shell Shell new Shell super configure Shell new Shell Workbench Help set Help new Shell I Help Context Ids WORKBENCH EDITORS DIALOG  configureShell newShell configureShell newShell WorkbenchHelp setHelp newShell IHelpContextIds WORKBENCH_EDITORS_DIALOG
protected void create Buttons For Button Bar Composite parent Typically we would use the parent s create Buttons For Button Bar However we only want a Cancel button and not an OK button The OK button will be used later in create Dialog Area to activate the selected editor create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false Button button get Button I Dialog Constants CANCEL ID if button null button set Text Workbench Messages get String Workbench Editors Dialog close NON NLS 1  createButtonsForButtonBar createButtonsForButtonBar createDialogArea createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL getButton IDialogConstants CANCEL_ID setText WorkbenchMessages getString WorkbenchEditorsDialog
Initialize the dialog bounds with the bounds saved from the settings protected void initialize Bounds if bounds null get Shell set Bounds bounds else super initialize Bounds  initializeBounds getShell setBounds initializeBounds
editors Table set Layout Data table Data editors Table set Layout new Layout protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache return new Point width height  editorsTable setLayoutData tableData editorsTable setLayout computeSize wHint hHint flushCache
protected void layout Composite composite boolean flush Cache Table Column c editors Table get Columns if columns Width null int w editors Table get Client Area width c 0 set Width w 1 3 c 1 set Width w c 0 get Width else c 0 set Width columns Width 0 c 1 set Width columns Width 1 editors Table set Layout null  flushCache TableColumn editorsTable getColumns columnsWidth editorsTable getClientArea setWidth setWidth getWidth setWidth columnsWidth setWidth columnsWidth editorsTable setLayout
select Clean set Text Workbench Messages get String Workbench Editors Dialog select Clean NON NLS 1 select Clean add Selection Listener new Selection Adapter public void widget Selected Selection Event e editors Table set Selection select Clean editors Table get Items update Buttons  selectClean setText WorkbenchMessages getString WorkbenchEditorsDialog selectClean selectClean addSelectionListener SelectionAdapter widgetSelected SelectionEvent editorsTable setSelection selectClean editorsTable getItems updateButtons
invert Selection set Text Workbench Messages get String Workbench Editors Dialog invert Selection NON NLS 1 invert Selection add Selection Listener new Selection Adapter public void widget Selected Selection Event e editors Table set Selection inverted Selection editors Table get Items editors Table get Selection update Buttons  invertSelection setText WorkbenchMessages getString WorkbenchEditorsDialog invertSelection invertSelection addSelectionListener SelectionAdapter widgetSelected SelectionEvent editorsTable setSelection invertedSelection editorsTable getItems editorsTable getSelection updateButtons
all Selection set Text Workbench Messages get String Workbench Editors Dialog all Selection NON NLS 1 all Selection add Selection Listener new Selection Adapter public void widget Selected Selection Event e editors Table set Selection editors Table get Items update Buttons  allSelection setText WorkbenchMessages getString WorkbenchEditorsDialog allSelection allSelection addSelectionListener SelectionAdapter widgetSelected SelectionEvent editorsTable setSelection editorsTable getItems updateButtons
close Selected set Text Workbench Messages get String Workbench Editors Dialog close Selected NON NLS 1 close Selected add Selection Listener new Selection Adapter public void widget Selected Selection Event e close Items editors Table get Selection  closeSelected setText WorkbenchMessages getString WorkbenchEditorsDialog closeSelected closeSelected addSelectionListener SelectionAdapter widgetSelected SelectionEvent closeItems editorsTable getSelection
save Selected set Text Workbench Messages get String Workbench Editors Dialog save Selected NON NLS 1 save Selected add Selection Listener new Selection Adapter public void widget Selected Selection Event e save Items editors Table get Selection null  saveSelected setText WorkbenchMessages getString WorkbenchEditorsDialog saveSelected saveSelected addSelectionListener SelectionAdapter widgetSelected SelectionEvent saveItems editorsTable getSelection
set Button Layout Data show All Persp Button show All Persp Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e show All Persp show All Persp Button get Selection update Items  setButtonLayoutData showAllPerspButton showAllPerspButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent showAllPersp showAllPerspButton getSelection updateItems
editors Table add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Buttons  editorsTable addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateButtons
update Buttons public void widget Default Selected Selection Event e ok Pressed  updateButtons widgetDefaultSelected SelectionEvent okPressed
editors Table add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e for Iterator images image Cache values iterator images has Next Image i Image images next i dispose for Iterator images disabled Image Cache values iterator images has Next Image i Image images next i dispose  editorsTable addDisposeListener DisposeListener widgetDisposed DisposeEvent imageCache hasNext disabledImageCache hasNext
Creates the contents of this dialog initializes the listener and the update thread protected Control create Dialog Area Composite parent initialize Dialog Units parent Font font parent get Font Composite dialog Area new Composite parent SWT NONE Cell Layout dialog Area Layout new Cell Layout 1 set Margins convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN set Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING set Row 1 Row growing dialog Area set Layout dialog Area Layout dialog Area set Layout Data new Grid Data Grid Data FILL BOTH Label over the table Label l new Label dialog Area SWT NONE l set Text Workbench Messages get String Workbench Editors Dialog label NON NLS 1 l set Font font l set Layout Data new Cell Data align SWT FILL SWT CENTER Table showing the editors name full path and perspective editors Table new Table dialog Area SWT MULTI SWT BORDER SWT H SCROLL SWT V SCROLL SWT FULL SELECTION editors Table set Lines Visible true editors Table set Header Visible true editors Table set Font font final int height 16 editors Table get Item Height final int width int 2 5 height Cell Data table Data new Cell Data align SWT FILL SWT FILL set Hint Cell Data OVERRIDE width height editors Table set Layout Data table Data editors Table set Layout new Layout protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache return new Point width height protected void layout Composite composite boolean flush Cache Table Column c editors Table get Columns if columns Width null int w editors Table get Client Area width c 0 set Width w 1 3 c 1 set Width w c 0 get Width else c 0 set Width columns Width 0 c 1 set Width columns Width 1 editors Table set Layout null Name column Table Column tc new Table Column editors Table SWT NONE tc set Resizable true tc set Text Workbench Messages get String Workbench Editors Dialog name NON NLS 1 tc add Selection Listener header Listener Full path column tc new Table Column editors Table SWT NONE tc set Resizable true tc set Text Workbench Messages get String Workbench Editors Dialog path NON NLS 1 tc add Selection Listener header Listener A composite for selection option buttons Composite selection Buttons new Composite dialog Area SWT NULL Label comp Label new Label selection Buttons SWT NULL comp Label set Font font Grid Layout layout new Grid Layout layout num Columns 4 selection Buttons set Layout layout Select clean editors button select Clean new Button selection Buttons SWT PUSH select Clean set Text Workbench Messages get String Workbench Editors Dialog select Clean NON NLS 1 select Clean add Selection Listener new Selection Adapter public void widget Selected Selection Event e editors Table set Selection select Clean editors Table get Items update Buttons select Clean set Font font set Button Layout Data select Clean Invert selection button invert Selection new Button selection Buttons SWT PUSH invert Selection set Text Workbench Messages get String Workbench Editors Dialog invert Selection NON NLS 1 invert Selection add Selection Listener new Selection Adapter public void widget Selected Selection Event e editors Table set Selection inverted Selection editors Table get Items editors Table get Selection update Buttons invert Selection set Font font set Button Layout Data invert Selection Select all button all Selection new Button selection Buttons SWT PUSH all Selection set Text Workbench Messages get String Workbench Editors Dialog all Selection NON NLS 1 all Selection add Selection Listener new Selection Adapter public void widget Selected Selection Event e editors Table set Selection editors Table get Items update Buttons all Selection set Font font set Button Layout Data all Selection A composite for selected editor action buttons Composite action Buttons new Composite dialog Area SWT NULL Label act Label new Label action Buttons SWT NULL act Label set Font font Grid Layout act Layout new Grid Layout act Layout num Columns 4 action Buttons set Layout act Layout Activate selected editor button create Button action Buttons I Dialog Constants OK ID Workbench Messages get String Workbench Editors Dialog activate NON NLS 1 true Close selected editors button close Selected new Button action Buttons SWT PUSH close Selected set Text Workbench Messages get String Workbench Editors Dialog close Selected NON NLS 1 close Selected add Selection Listener new Selection Adapter public void widget Selected Selection Event e close Items editors Table get Selection close Selected set Font font set Button Layout Data close Selected Save selected editors button save Selected new Button action Buttons SWT PUSH save Selected set Text Workbench Messages get String Workbench Editors Dialog save Selected NON NLS 1 save Selected add Selection Listener new Selection Adapter public void widget Selected Selection Event e save Items editors Table get Selection null save Selected set Font font set Button Layout Data save Selected Show only active perspective button final Button show All Persp Button new Button dialog Area SWT CHECK show All Persp Button set Text Workbench Messages get String Workbench Editors Dialog show All Persp NON NLS 1 show All Persp Button set Selection show All Persp show All Persp Button set Font font set Button Layout Data show All Persp Button show All Persp Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e show All Persp show All Persp Button get Selection update Items Create the items and update buttons state update Items update Buttons editors Table add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Buttons public void widget Default Selected Selection Event e ok Pressed editors Table add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e for Iterator images image Cache values iterator images has Next Image i Image images next i dispose for Iterator images disabled Image Cache values iterator images has Next Image i Image images next i dispose editors Table set Focus apply Dialog Font dialog Area return dialog Area  createDialogArea initializeDialogUnits getFont dialogArea CellLayout dialogAreaLayout CellLayout setMargins convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN setSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING setRow dialogArea setLayout dialogAreaLayout dialogArea setLayoutData GridData GridData FILL_BOTH dialogArea setText WorkbenchMessages getString WorkbenchEditorsDialog setFont setLayoutData CellData editorsTable dialogArea H_SCROLL V_SCROLL FULL_SELECTION editorsTable setLinesVisible editorsTable setHeaderVisible editorsTable setFont editorsTable getItemHeight CellData tableData CellData setHint CellData editorsTable setLayoutData tableData editorsTable setLayout computeSize wHint hHint flushCache flushCache TableColumn editorsTable getColumns columnsWidth editorsTable getClientArea setWidth setWidth getWidth setWidth columnsWidth setWidth columnsWidth editorsTable setLayout TableColumn TableColumn editorsTable setResizable setText WorkbenchMessages getString WorkbenchEditorsDialog addSelectionListener headerListener TableColumn editorsTable setResizable setText WorkbenchMessages getString WorkbenchEditorsDialog addSelectionListener headerListener selectionButtons dialogArea compLabel selectionButtons compLabel setFont GridLayout GridLayout numColumns selectionButtons setLayout selectClean selectionButtons selectClean setText WorkbenchMessages getString WorkbenchEditorsDialog selectClean selectClean addSelectionListener SelectionAdapter widgetSelected SelectionEvent editorsTable setSelection selectClean editorsTable getItems updateButtons selectClean setFont setButtonLayoutData selectClean invertSelection selectionButtons invertSelection setText WorkbenchMessages getString WorkbenchEditorsDialog invertSelection invertSelection addSelectionListener SelectionAdapter widgetSelected SelectionEvent editorsTable setSelection invertedSelection editorsTable getItems editorsTable getSelection updateButtons invertSelection setFont setButtonLayoutData invertSelection allSelection selectionButtons allSelection setText WorkbenchMessages getString WorkbenchEditorsDialog allSelection allSelection addSelectionListener SelectionAdapter widgetSelected SelectionEvent editorsTable setSelection editorsTable getItems updateButtons allSelection setFont setButtonLayoutData allSelection actionButtons dialogArea actLabel actionButtons actLabel setFont GridLayout actLayout GridLayout actLayout numColumns actionButtons setLayout actLayout createButton actionButtons IDialogConstants OK_ID WorkbenchMessages getString WorkbenchEditorsDialog closeSelected actionButtons closeSelected setText WorkbenchMessages getString WorkbenchEditorsDialog closeSelected closeSelected addSelectionListener SelectionAdapter widgetSelected SelectionEvent closeItems editorsTable getSelection closeSelected setFont setButtonLayoutData closeSelected saveSelected actionButtons saveSelected setText WorkbenchMessages getString WorkbenchEditorsDialog saveSelected saveSelected addSelectionListener SelectionAdapter widgetSelected SelectionEvent saveItems editorsTable getSelection saveSelected setFont setButtonLayoutData saveSelected showAllPerspButton dialogArea showAllPerspButton setText WorkbenchMessages getString WorkbenchEditorsDialog showAllPersp showAllPerspButton setSelection showAllPersp showAllPerspButton setFont setButtonLayoutData showAllPerspButton showAllPerspButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent showAllPersp showAllPerspButton getSelection updateItems updateItems updateButtons editorsTable addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateButtons widgetDefaultSelected SelectionEvent okPressed editorsTable addDisposeListener DisposeListener widgetDisposed DisposeEvent imageCache hasNext disabledImageCache hasNext editorsTable setFocus applyDialogFont dialogArea dialogArea
Updates the button state enabled disabled private void update Buttons Table Item selected Items editors Table get Selection boolean has Dirty false for int i 0 i selected Items length i Adapter editor Adapter selected Items i get Data if editor is Dirty has Dirty true break save Selected set Enabled has Dirty Table Item all Items editors Table get Items boolean has Clean false for int i 0 i all Items length i Adapter editor Adapter all Items i get Data if editor is Dirty has Clean true break select Clean set Enabled has Clean invert Selection set Enabled all Items length 0 close Selected set Enabled selected Items length 0 Button ok get Ok Button if ok null ok set Enabled selected Items length 1  updateButtons TableItem selectedItems editorsTable getSelection hasDirty selectedItems selectedItems getData isDirty hasDirty saveSelected setEnabled hasDirty TableItem allItems editorsTable getItems hasClean allItems allItems getData isDirty hasClean selectClean setEnabled hasClean invertSelection setEnabled allItems closeSelected setEnabled selectedItems getOkButton setEnabled selectedItems
Closes the specified editors private void close Items Table Item items if items length 0 return for int i 0 i items length i Adapter e Adapter items i get Data e close update Items  closeItems TableItem getData updateItems
Saves the specified editors private void save Items Table Item items I Progress Monitor monitor if items length 0 return Progress Monitor Dialog pmd new Progress Monitor Jobs Dialog get Shell pmd open for int i 0 i items length i Adapter editor Adapter items i get Data editor save pmd get Progress Monitor update Item items i editor pmd close update Items  saveItems TableItem IProgressMonitor ProgressMonitorDialog ProgressMonitorJobsDialog getShell getData getProgressMonitor updateItem updateItems
Returns all clean editors from items private Table Item select Clean Table Item items if items length 0 return new Table Item 0 Array List clean Items new Array List items length for int i 0 i items length i Adapter editor Adapter items i get Data if editor is Dirty clean Items add items i Table Item result new Table Item clean Items size clean Items to Array result return result  TableItem selectClean TableItem TableItem ArrayList cleanItems ArrayList getData isDirty cleanItems TableItem TableItem cleanItems cleanItems toArray
Returns all clean editors from items private Table Item inverted Selection Table Item all Items Table Item selected Items if all Items length 0 return all Items Array List inverted Selection new Array List all Items length selected Items length outer Loop for int i 0 i all Items length i for int j 0 j selected Items length j if all Items i selected Items j continue outer Loop inverted Selection add all Items i Table Item result new Table Item inverted Selection size inverted Selection to Array result return result  TableItem invertedSelection TableItem allItems TableItem selectedItems allItems allItems ArrayList invertedSelection ArrayList allItems selectedItems outerLoop allItems selectedItems allItems selectedItems outerLoop invertedSelection allItems TableItem TableItem invertedSelection invertedSelection toArray
Updates the specified item private void update Item Table Item item Adapter editor item set Data editor item set Text editor get Text Image images editor get Image for int i 0 i images length i if images i null item set Image i images i  updateItem TableItem setData setText getText getImage setImage
Adds all editors to elements private void update Editors I Workbench Page pages for int j 0 j pages length j I Editor Reference editors pages j get Editor References for int k 0 k editors length k elements add new Adapter editors k  updateEditors IWorkbenchPage IEditorReference getEditorReferences
Updates all items in the table private void update Items editors Table remove All elements new Array List if show All Persp I Workbench Window windows window get Workbench get Workbench Windows for int i 0 i windows length i update Editors windows i get Pages else I Workbench Page page window get Active Page if page null update Editors new I Workbench Page page sort Object selection null if window get Active Page null selection window get Active Page get Active Editor for Iterator iterator elements iterator iterator has Next Adapter e Adapter iterator next Table Item item new Table Item editors Table SWT NULL update Item item e if selection null selection e editor Ref editors Table set Selection new Table Item item update the buttons because the selection may have changed update Buttons  updateItems editorsTable removeAll ArrayList showAllPersp IWorkbenchWindow getWorkbench getWorkbenchWindows updateEditors getPages IWorkbenchPage getActivePage updateEditors IWorkbenchPage getActivePage getActivePage getActiveEditor hasNext TableItem TableItem editorsTable updateItem editorRef editorsTable setSelection TableItem updateButtons
Sorts all the editors according to the table header private void sort Backward compatible Table used to have 3 columns if sort Column editors Table get Column Count 1 sort Column 0 Adapter a new Adapter elements size elements to Array a Arrays sort a elements Arrays as List a  sortColumn editorsTable getColumnCount sortColumn toArray asList
The user has selected a resource and the dialog is closing protected void ok Pressed Table Item items editors Table get Selection if items length 1 super ok Pressed return save Dialog Settings Adapter selection Adapter items 0 get Data It would be better to activate before closing the dialog but it does not work when the editor is in other window Must investigate super ok Pressed selection activate  okPressed TableItem editorsTable getSelection okPressed saveDialogSettings getData okPressed
Saves the dialog settings private void save Dialog Settings I Dialog Settings s get Dialog Settings s put ALLPERSP show All Persp s put SORT sort Column bounds get Shell get Bounds String array new String 4 array 0 String value Of bounds x array 1 String value Of bounds y array 2 String value Of bounds width array 3 String value Of bounds height s put BOUNDS array array new String editors Table get Column Count for int i 0 i array length i array i String value Of editors Table get Column i get Width s put COLUMNS array  saveDialogSettings IDialogSettings getDialogSettings showAllPersp sortColumn getShell getBounds valueOf valueOf valueOf valueOf editorsTable getColumnCount valueOf editorsTable getColumn getWidth
Return a dialog setting section for this dialog private I Dialog Settings get Dialog Settings I Dialog Settings settings Workbench Plugin get Default get Dialog Settings I Dialog Settings this Settings settings get Section get Class get Name if this Settings null this Settings settings add New Section get Class get Name return this Settings  IDialogSettings getDialogSettings IDialogSettings WorkbenchPlugin getDefault getDialogSettings IDialogSettings thisSettings getSection getClass getName thisSettings thisSettings addNewSection getClass getName thisSettings
String text Image images Adapter I Editor Reference ref editor Ref ref  IEditorReference editorRef
editor Ref ref Adapter I Editor Input input I Editor Descriptor desc this input input this desc desc  editorRef IEditorInput IEditorDescriptor
boolean is Dirty if editor Ref null return false return editor Ref is Dirty  isDirty editorRef editorRef isDirty
return editor Ref is Dirty boolean is Opened return editor Ref null  editorRef isDirty isOpened editorRef
void close if editor Ref null return Workbench Page p Workbench Part Reference editor Ref get Pane get Page p close Editor editor Ref true  editorRef WorkbenchPage WorkbenchPartReference editorRef getPane getPage closeEditor editorRef
void save I Progress Monitor monitor if editor Ref null return I Editor Part editor I Editor Part editor Ref get Part true if editor null editor do Save monitor  IProgressMonitor editorRef IEditorPart IEditorPart editorRef getPart doSave
String get Text if text null return text text new String 2 if editor Ref null if editor Ref is Dirty text 0 editor Ref get Title NON NLS 1 else text 0 editor Ref get Title text 1 editor Ref get Title Tool Tip else text 0 input get Name text 1 input get Tool Tip Text return text  getText editorRef editorRef isDirty editorRef getTitle editorRef getTitle editorRef getTitleToolTip getName getToolTipText
Image get Image if images null return images images new Image 2 if editor Ref null images 0 editor Ref get Title Image Workbench Page p Workbench Part Reference editor Ref get Pane get Page I Perspective Descriptor persp p get Perspective Image Descriptor image persp get Image Descriptor if image null image Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL DEF PERSPECTIVE else Image Descriptor image null if desc null image desc get Image Descriptor if image null I Editor Registry registry Workbench Plugin get Default get Editor Registry image registry get Image Descriptor input get Name if image null issue what should be the default image image registry get Default Editor get Image Descriptor if image null images 0 Image disabled Image Cache get image if images 0 null Image enabled image create Image Image disabled new Image editors Table get Display enabled SWT IMAGE DISABLE enabled dispose disabled Image Cache put image disabled images 0 disabled return images  getImage editorRef editorRef getTitleImage WorkbenchPage WorkbenchPartReference editorRef getPane getPage IPerspectiveDescriptor getPerspective ImageDescriptor getImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_DEF_PERSPECTIVE ImageDescriptor getImageDescriptor IEditorRegistry WorkbenchPlugin getDefault getEditorRegistry getImageDescriptor getName getDefaultEditor getImageDescriptor disabledImageCache createImage editorsTable getDisplay IMAGE_DISABLE disabledImageCache
private void activate if editor Ref null I Editor Part editor editor Ref get Editor true Workbench Page p Workbench Page editor get Editor Site get Page Shell s p get Workbench Window get Shell if s get Minimized s set Minimized false s move Above null p get Workbench Window set Active Page p p activate editor else I Workbench Page p window get Active Page if p null try p open Editor input desc get Id true catch Part Init Exception e  editorRef IEditorPart editorRef getEditor WorkbenchPage WorkbenchPage getEditorSite getPage getWorkbenchWindow getShell getMinimized setMinimized moveAbove getWorkbenchWindow setActivePage IWorkbenchPage getActivePage openEditor getId PartInitException
public int compare To Object another Adapter adapter Adapter another int result collator compare get Text sort Column adapter get Text sort Column if result 0 int column sort Column 0 1 0 result collator compare get Text column adapter get Text column if reverse return result 1 return result  compareTo getText sortColumn getText sortColumn sortColumn getText getText

Creates a new preference dialog under the control of the given preference manager param shell the parent shell param manager the preference manager public Workbench Preference Dialog Shell parent Shell Preference Manager manager super parent Shell manager  WorkbenchPreferenceDialog parentShell PreferenceManager parentShell
protected void button Pressed int button Id switch button Id case LOAD ID load Pressed return case SAVE ID save Pressed return super button Pressed button Id  buttonPressed buttonId buttonId LOAD_ID loadPressed SAVE_ID savePressed buttonPressed buttonId
protected void create Buttons For Button Bar Composite parent parent set Layout Data new Grid Data Grid Data FILL HORIZONTAL create Button parent LOAD ID Workbench Messages get String Workbench Preference Dialog load false NON NLS 1 create Button parent SAVE ID Workbench Messages get String Workbench Preference Dialog save false NON NLS 1 Label l new Label parent SWT NONE l set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout layout Grid Layout parent get Layout layout num Columns layout make Columns Equal Width false super create Buttons For Button Bar parent  createButtonsForButtonBar setLayoutData GridData GridData FILL_HORIZONTAL createButton LOAD_ID WorkbenchMessages getString WorkbenchPreferenceDialog createButton SAVE_ID WorkbenchMessages getString WorkbenchPreferenceDialog setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout getLayout numColumns makeColumnsEqualWidth createButtonsForButtonBar
Handle a request to load preferences protected void load Pressed Preference Import Export Wizard wizard new Preference Import Export Wizard false this I Dialog Settings workbench Settings Workbench Plugin get Default get Dialog Settings I Dialog Settings wizard Settings workbench Settings get Section FILE PATH SETTING NON NLS 1 if wizard Settings null wizard Settings workbench Settings add New Section FILE PATH SETTING NON NLS 1 wizard set Dialog Settings wizard Settings Shell parent get Shell Wizard Dialog dialog new Wizard Dialog parent wizard dialog create Shell shell dialog get Shell shell set Size Math max 500 shell get Size x 500 Point child Size shell get Size Point parent Size parent get Size Point child Location new Point parent Size x child Size x 2 parent Size y child Size y 2 shell set Location parent to Display child Location TODO Provide a help context ID and content Workbench Help set Help shell I Help Context Ids IMPORT WIZARD int return Code dialog open All my values are messed up Reboot oh windows you have taught us well if return Code Window OK close  loadPressed PreferenceImportExportWizard PreferenceImportExportWizard IDialogSettings workbenchSettings WorkbenchPlugin getDefault getDialogSettings IDialogSettings wizardSettings workbenchSettings getSection FILE_PATH_SETTING wizardSettings wizardSettings workbenchSettings addNewSection FILE_PATH_SETTING setDialogSettings wizardSettings getShell WizardDialog WizardDialog getShell setSize getSize childSize getSize parentSize getSize childLocation parentSize childSize parentSize childSize setLocation toDisplay childLocation WorkbenchHelp setHelp IHelpContextIds IMPORT_WIZARD returnCode returnCode
Handle a request to save preferences protected void save Pressed Preference Import Export Wizard wizard new Preference Import Export Wizard true this I Dialog Settings workbench Settings Workbench Plugin get Default get Dialog Settings I Dialog Settings wizard Settings workbench Settings get Section FILE PATH SETTING NON NLS 1 if wizard Settings null wizard Settings workbench Settings add New Section Export Preferences Wizard NON NLS 1 wizard set Dialog Settings wizard Settings wizard set Force Previous And Next Buttons true Shell parent get Shell Wizard Dialog dialog new Wizard Dialog parent wizard dialog create Shell shell dialog get Shell shell set Size Math max 500 shell get Size x 500 Point child Size shell get Size Point parent Size parent get Size Point child Location new Point parent Size x child Size x 2 parent Size y child Size y 2 shell set Location parent to Display child Location TODO Provide a help context ID and content Workbench Help set Help shell I Help Context Ids EXPORT WIZARD dialog open  savePressed PreferenceImportExportWizard PreferenceImportExportWizard IDialogSettings workbenchSettings WorkbenchPlugin getDefault getDialogSettings IDialogSettings wizardSettings workbenchSettings getSection FILE_PATH_SETTING wizardSettings wizardSettings workbenchSettings addNewSection ExportPreferencesWizard setDialogSettings wizardSettings setForcePreviousAndNextButtons getShell WizardDialog WizardDialog getShell setSize getSize childSize getSize parentSize getSize childLocation parentSize childSize parentSize childSize setLocation toDisplay childLocation WorkbenchHelp setHelp IHelpContextIds EXPORT_WIZARD

public Workbench Preference Node String node Id String node Label String category Image Descriptor node Image I Configuration Element element I Workbench new Workbench super node Id node Label node Image null this category category this configuration Element element this workbench new Workbench  WorkbenchPreferenceNode nodeId nodeLabel ImageDescriptor nodeImage IConfigurationElement IWorkbench newWorkbench nodeId nodeLabel nodeImage configurationElement newWorkbench
Creates the preference page this node stands for public void create Page I Workbench Preference Page page try page I Workbench Preference Page Workbench Plugin create Extension configuration Element ATT CONTRIBUTOR CLASS catch Core Exception e Just inform the user about the error The details are written to the log by now Error Dialog open Error Shell null Workbench Messages get String Preference Node error Title NON NLS 1 Workbench Messages get String Preference Node error Message NON NLS 1 e get Status page new Error Preference Page page init workbench if get Label Image null page set Image Descriptor get Image Descriptor page set Title get Label Text set Page page  createPage IWorkbenchPreferencePage IWorkbenchPreferencePage WorkbenchPlugin createExtension configurationElement ATT_CONTRIBUTOR_CLASS CoreException ErrorDialog openError WorkbenchMessages getString PreferenceNode errorTitle WorkbenchMessages getString PreferenceNode errorMessage getStatus ErrorPreferencePage getLabelImage setImageDescriptor getImageDescriptor setTitle getLabelText setPage
see org eclipse ui activities support I Plugin Contribution from Plugin public boolean from Plugin return true  IPluginContribution fromPlugin fromPlugin
return java lang String public String get Category return category  getCategory
see org eclipse ui activities support I Plugin Contribution get Local Id public String get Local Id return get Id  IPluginContribution getLocalId getLocalId getId
see org eclipse ui activities support I Plugin Contribution get Plugin Id public String get Plugin Id return configuration Element get Declaring Extension get Namespace  IPluginContribution getPluginId getPluginId configurationElement getDeclaringExtension getNamespace

protected Control create Contents Composite parent issue if the product subclasses this page then it should provide the help content Workbench Help set Help parent I Help Context Ids WORKBENCH PREFERENCE PAGE Composite composite create Composite parent create Show User Dialog Pref composite create Sticky Cycle Pref composite create Space composite create Open Mode Group composite apply Dialog Font composite return composite  createContents WorkbenchHelp setHelp IHelpContextIds WORKBENCH_PREFERENCE_PAGE createComposite createShowUserDialogPref createStickyCyclePref createSpace createOpenModeGroup applyDialogFont
Create the widget for the user dialog preference param composite protected void create Show User Dialog Pref Composite composite show User Dialog Button new Button composite SWT CHECK show User Dialog Button set Text Workbench Messages get String Workbench Preference Run In Background Button NON NLS 1 show User Dialog Button set Tool Tip Text Workbench Messages get String Workbench Preference Run In Background Tool Tip NON NLS 1 show User Dialog Button set Selection Workbench Plugin get Default get Preference Store get Boolean I Preference Constants RUN IN BACKGROUND  createShowUserDialogPref showUserDialogButton showUserDialogButton setText WorkbenchMessages getString WorkbenchPreference RunInBackgroundButton showUserDialogButton setToolTipText WorkbenchMessages getString WorkbenchPreference RunInBackgroundToolTip showUserDialogButton setSelection WorkbenchPlugin getDefault getPreferenceStore getBoolean IPreferenceConstants RUN_IN_BACKGROUND
Creates the composite which will contain all the preference controls for this page param parent the parent composite return the composite for this page protected Composite create Composite Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL return composite  createComposite GridLayout GridLayout marginWidth marginHeight setLayout setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL
protected void create Sticky Cycle Pref Composite composite sticky Cycle Button new Button composite SWT CHECK sticky Cycle Button set Text Workbench Messages get String Workbench Preference sticky Cycle Button NON NLS 1 sticky Cycle Button set Selection get Preference Store get Boolean I Preference Constants STICKY CYCLE  createStickyCyclePref stickyCycleButton stickyCycleButton setText WorkbenchMessages getString WorkbenchPreference stickyCycleButton stickyCycleButton setSelection getPreferenceStore getBoolean IPreferenceConstants STICKY_CYCLE
double Click Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select Click Mode single Click Button get Selection  doubleClickButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectClickMode singleClickButton getSelection
single Click Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select Click Mode single Click Button get Selection  singleClickButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectClickMode singleClickButton getSelection
select On Hover Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select On Hover select On Hover Button get Selection  selectOnHoverButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectOnHover selectOnHoverButton getSelection
open After Delay Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e open After Delay open After Delay Button get Selection  openAfterDelayButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent openAfterDelay openAfterDelayButton getSelection
protected void create Open Mode Group Composite composite Font font composite get Font Group button Composite new Group composite SWT LEFT Grid Layout layout new Grid Layout button Composite set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL button Composite set Layout Data data button Composite set Text Workbench Messages get String Workbench Preference open Mode NON NLS 1 String label Workbench Messages get String Workbench Preference double Click NON NLS 1 double Click Button create Radio Button button Composite label double Click Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select Click Mode single Click Button get Selection double Click Button set Selection open On Single Click label Workbench Messages get String Workbench Preference single Click NON NLS 1 single Click Button create Radio Button button Composite label single Click Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select Click Mode single Click Button get Selection single Click Button set Selection open On Single Click label Workbench Messages get String Workbench Preference singleClick SelectOnHover NON NLS 1 select On Hover Button new Button button Composite SWT CHECK SWT LEFT select On Hover Button set Text label select On Hover Button set Enabled open On Single Click select On Hover Button set Selection select On Hover select On Hover Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select On Hover select On Hover Button get Selection data new Grid Data data horizontal Indent 20 select On Hover Button set Layout Data data label Workbench Messages get String Workbench Preference singleClick OpenAfterDelay NON NLS 1 open After Delay Button new Button button Composite SWT CHECK SWT LEFT open After Delay Button set Text label open After Delay Button set Enabled open On Single Click open After Delay Button set Selection open After Delay open After Delay Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e open After Delay open After Delay Button get Selection data new Grid Data data horizontal Indent 20 open After Delay Button set Layout Data data create Note Composite font button Composite Workbench Messages get String Preference note NON NLS 1 Workbench Messages get String Workbench Preference no Effect On All Views NON NLS 1  createOpenModeGroup getFont buttonComposite GridLayout GridLayout buttonComposite setLayout GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL buttonComposite setLayoutData buttonComposite setText WorkbenchMessages getString WorkbenchPreference openMode WorkbenchMessages getString WorkbenchPreference doubleClick doubleClickButton createRadioButton buttonComposite doubleClickButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectClickMode singleClickButton getSelection doubleClickButton setSelection openOnSingleClick WorkbenchMessages getString WorkbenchPreference singleClick singleClickButton createRadioButton buttonComposite singleClickButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectClickMode singleClickButton getSelection singleClickButton setSelection openOnSingleClick WorkbenchMessages getString WorkbenchPreference singleClick_SelectOnHover selectOnHoverButton buttonComposite selectOnHoverButton setText selectOnHoverButton setEnabled openOnSingleClick selectOnHoverButton setSelection selectOnHover selectOnHoverButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectOnHover selectOnHoverButton getSelection GridData horizontalIndent selectOnHoverButton setLayoutData WorkbenchMessages getString WorkbenchPreference singleClick_OpenAfterDelay openAfterDelayButton buttonComposite openAfterDelayButton setText openAfterDelayButton setEnabled openOnSingleClick openAfterDelayButton setSelection openAfterDelay openAfterDelayButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent openAfterDelay openAfterDelayButton getSelection GridData horizontalIndent openAfterDelayButton setLayoutData createNoteComposite buttonComposite WorkbenchMessages getString WorkbenchMessages getString WorkbenchPreference noEffectOnAllViews
private void select Click Mode boolean single Click open On Single Click single Click select On Hover Button set Enabled open On Single Click open After Delay Button set Enabled open On Single Click  selectClickMode singleClick openOnSingleClick singleClick selectOnHoverButton setEnabled openOnSingleClick openAfterDelayButton setEnabled openOnSingleClick
Utility method that creates a radio button instance and sets the default layout data param parent the parent for the new button param label the label for the new button return the newly created button protected static Button create Radio Button Composite parent String label Button button new Button parent SWT RADIO SWT LEFT button set Text label return button  createRadioButton setText
Utility method that creates a combo box param parent the parent for the new label return the new widget protected static Combo create Combo Composite parent Combo combo new Combo parent SWT READ ONLY Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint I Dialog Constants ENTRY FIELD WIDTH combo set Layout Data data return combo  createCombo READ_ONLY GridData GridData GridData FILL_HORIZONTAL widthHint IDialogConstants ENTRY_FIELD_WIDTH setLayoutData
Utility method that creates a label instance and sets the default layout data param parent the parent for the new label param text the text for the new label return the new label protected static Label create Label Composite parent String text Label label new Label parent SWT LEFT label set Text text Grid Data data new Grid Data data horizontal Span 1 data horizontal Alignment Grid Data FILL label set Layout Data data return label  createLabel setText GridData GridData horizontalSpan horizontalAlignment GridData setLayoutData
Creates a tab of one horizontal spans param parent the parent in which the tab should be created protected static void create Space Composite parent Label vfiller new Label parent SWT LEFT Grid Data grid Data new Grid Data grid Data new Grid Data grid Data horizontal Alignment Grid Data BEGINNING grid Data grab Excess Horizontal Space false grid Data vertical Alignment Grid Data CENTER grid Data grab Excess Vertical Space false vfiller set Layout Data grid Data  createSpace GridData gridData GridData gridData GridData gridData horizontalAlignment GridData gridData grabExcessHorizontalSpace gridData verticalAlignment GridData gridData grabExcessVerticalSpace setLayoutData gridData
Returns preference store that belongs to the our plugin return the preference store for this plugin protected I Preference Store do Get Preference Store return Workbench Plugin get Default get Preference Store  IPreferenceStore doGetPreferenceStore WorkbenchPlugin getDefault getPreferenceStore
see I Workbench Preference Page public void init I Workbench a Workbench I Preference Store store get Preference Store open On Single Click store get Boolean I Preference Constants OPEN ON SINGLE CLICK select On Hover store get Boolean I Preference Constants SELECT ON HOVER open After Delay store get Boolean I Preference Constants OPEN AFTER DELAY  IWorkbenchPreferencePage IWorkbench aWorkbench IPreferenceStore getPreferenceStore openOnSingleClick getBoolean IPreferenceConstants OPEN_ON_SINGLE_CLICK selectOnHover getBoolean IPreferenceConstants SELECT_ON_HOVER openAfterDelay getBoolean IPreferenceConstants OPEN_AFTER_DELAY
The default button has been pressed protected void perform Defaults I Preference Store store get Preference Store sticky Cycle Button set Selection store get Boolean I Preference Constants STICKY CYCLE open On Single Click store get Default Boolean I Preference Constants OPEN ON SINGLE CLICK select On Hover store get Default Boolean I Preference Constants SELECT ON HOVER open After Delay store get Default Boolean I Preference Constants OPEN AFTER DELAY single Click Button set Selection open On Single Click double Click Button set Selection open On Single Click select On Hover Button set Selection select On Hover open After Delay Button set Selection open After Delay select On Hover Button set Enabled open On Single Click open After Delay Button set Enabled open On Single Click sticky Cycle Button set Selection store get Default Boolean I Preference Constants STICKY CYCLE super perform Defaults  performDefaults IPreferenceStore getPreferenceStore stickyCycleButton setSelection getBoolean IPreferenceConstants STICKY_CYCLE openOnSingleClick getDefaultBoolean IPreferenceConstants OPEN_ON_SINGLE_CLICK selectOnHover getDefaultBoolean IPreferenceConstants SELECT_ON_HOVER openAfterDelay getDefaultBoolean IPreferenceConstants OPEN_AFTER_DELAY singleClickButton setSelection openOnSingleClick doubleClickButton setSelection openOnSingleClick selectOnHoverButton setSelection selectOnHover openAfterDelayButton setSelection openAfterDelay selectOnHoverButton setEnabled openOnSingleClick openAfterDelayButton setEnabled openOnSingleClick stickyCycleButton setSelection getDefaultBoolean IPreferenceConstants STICKY_CYCLE performDefaults
The user has pressed Ok Store apply this page s values appropriately public boolean perform Ok I Preference Store store get Preference Store store the keep cycle part dialogs sticky preference store set Value I Preference Constants STICKY CYCLE sticky Cycle Button get Selection store set Value I Preference Constants OPEN ON SINGLE CLICK open On Single Click store set Value I Preference Constants SELECT ON HOVER select On Hover store set Value I Preference Constants OPEN AFTER DELAY open After Delay store set Value I Preference Constants RUN IN BACKGROUND show User Dialog Button get Selection int single Click Method open On Single Click Open Strategy SINGLE CLICK Open Strategy DOUBLE CLICK if open On Single Click if select On Hover single Click Method Open Strategy SELECT ON HOVER if open After Delay single Click Method Open Strategy ARROW KEYS OPEN Open Strategy set Open Method single Click Method Workbench Plugin get Default save Plugin Preferences return true  performOk IPreferenceStore getPreferenceStore setValue IPreferenceConstants STICKY_CYCLE stickyCycleButton getSelection setValue IPreferenceConstants OPEN_ON_SINGLE_CLICK openOnSingleClick setValue IPreferenceConstants SELECT_ON_HOVER selectOnHover setValue IPreferenceConstants OPEN_AFTER_DELAY openAfterDelay setValue IPreferenceConstants RUN_IN_BACKGROUND showUserDialogButton getSelection singleClickMethod openOnSingleClick OpenStrategy SINGLE_CLICK OpenStrategy DOUBLE_CLICK openOnSingleClick selectOnHover singleClickMethod OpenStrategy SELECT_ON_HOVER openAfterDelay singleClickMethod OpenStrategy ARROW_KEYS_OPEN OpenStrategy setOpenMethod singleClickMethod WorkbenchPlugin getDefault savePluginPreferences

private String help Href Create a new instance of this class param name java lang String public Workbench Wizard Element String name this name name  helpHref WorkbenchWizardElement
Answer a boolean indicating whether the receiver is able to handle the passed selection return boolean param selection I Structured Selection public boolean can Handle Selection I Structured Selection selection return get Selection Enabler is Enabled For Selection selection  IStructuredSelection canHandleSelection IStructuredSelection getSelectionEnabler isEnabledForSelection
Answer the selection for the reciever based on whether the it can handle the selection If it can return the selection If it can handle the adapted to I Resource value of the selection If it satisfies neither of these conditions return an empty I Structured Selection return I Structured Selection param selection I Structured Selection public I Structured Selection adapted Selection I Structured Selection selection if can Handle Selection selection return selection I Structured Selection adapted Selection convert To Resources selection if can Handle Selection adapted Selection return adapted Selection Couldn t find one that works so just return return Structured Selection EMPTY  IResource IStructuredSelection IStructuredSelection IStructuredSelection IStructuredSelection adaptedSelection IStructuredSelection canHandleSelection IStructuredSelection adaptedSelection convertToResources canHandleSelection adaptedSelection adaptedSelection StructuredSelection
Create an the instance of the object described by the configuration element That is create the instance of the class the isv supplied in the extension point public Object create Executable Extension throws Core Exception return Workbench Plugin create Extension configuration Element Wizards Registry Reader ATT CLASS  createExecutableExtension CoreException WorkbenchPlugin createExtension configurationElement WizardsRegistryReader ATT_CLASS
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found public Object get Adapter Class adapter if adapter I Workbench Adapter class adapter I Workbench Adapter2 class return this return Platform get Adapter Manager get Adapter this adapter  getAdapter IWorkbenchAdapter IWorkbenchAdapter2 getAdapterManager getAdapter
return I Configuration Element public I Configuration Element get Configuration Element return configuration Element  IConfigurationElement IConfigurationElement getConfigurationElement configurationElement
Answer the description parameter of this element return java lang String public String get Description return description  getDescription
Answer the id as specified in the extension return java lang String public String getID return id 
Answer the icon of this element public Image Descriptor get Image Descriptor return image Descriptor  ImageDescriptor getImageDescriptor imageDescriptor
Returns the name of this wizard element public Image Descriptor get Image Descriptor Object element return image Descriptor  ImageDescriptor getImageDescriptor imageDescriptor
Returns the name of this wizard element public String get Label Object element return name  getLabel
Answer self s action enabler creating it first iff necessary protected Selection Enabler get Selection Enabler if selection Enabler null selection Enabler new Selection Enabler configuration Element return selection Enabler  SelectionEnabler getSelectionEnabler selectionEnabler selectionEnabler SelectionEnabler configurationElement selectionEnabler
param new Configuration Element I Configuration Element public void set Configuration Element I Configuration Element new Configuration Element configuration Element new Configuration Element  newConfigurationElement IConfigurationElement setConfigurationElement IConfigurationElement newConfigurationElement configurationElement newConfigurationElement
Set the description parameter of this element param value java lang String public void set Description String value description value  setDescription
Set the id parameter of this element param value java lang String public void setID String value id value 
Set the icon of this element public void set Image Descriptor Image Descriptor value image Descriptor value  setImageDescriptor ImageDescriptor imageDescriptor
Attempt to convert the elements in the passed selection into resources by asking each for its I Resource property iff it isn t already a resource If all elements in the initial selection can be converted to resources then answer a new selection containing these resources otherwise answer an empty selection param original Selection the original selection return the converted selection or an empty selection private I Structured Selection convert To Resources I Structured Selection original Selection issue resource specific code should be pushed into IDE Class resource Class Legacy Resource Support get Resource Class if resource Class null return original Selection List result new Array List Iterator elements original Selection iterator while elements has Next Object current Element elements next if resource Class is Instance current Element already a resource result add current Element else if current Element instanceof I Adaptable cannot be converted to resource return Structured Selection EMPTY so fail else Object adapter I Adaptable current Element get Adapter resource Class if resource Class is Instance adapter chose not to be converted to resource return Structured Selection EMPTY so fail result add adapter add the converted resource all converted fine answer new selection return new Structured Selection result to Array  IResource originalSelection IStructuredSelection convertToResources IStructuredSelection originalSelection resourceClass LegacyResourceSupport getResourceClass resourceClass originalSelection ArrayList originalSelection hasNext currentElement resourceClass isInstance currentElement currentElement currentElement IAdaptable StructuredSelection IAdaptable currentElement getAdapter resourceClass resourceClass isInstance StructuredSelection StructuredSelection toArray
see org eclipse ui I Plugin Contribution get Local Id public String get Local Id return getID  IPluginContribution getLocalId getLocalId
public String get Plugin Id return configuration Element null configuration Element get Declaring Extension get Namespace null  getPluginId configurationElement configurationElement getDeclaringExtension getNamespace
Return the description image for this wizard return the description image for this wizard since 3 0 public Image Descriptor get Description Image return description Image  ImageDescriptor getDescriptionImage descriptionImage
Set the descriptive image for this wizard param descriptor the descriptive image since 3 0 public void set Description Image Image Descriptor descriptor description Image descriptor  setDescriptionImage ImageDescriptor descriptionImage
Return the help system href for this wizard return the help system href for this wizard since 3 0 public String get Help Href return help Href  getHelpHref helpHref
Set the help system href for this wizard param href the help system href for this wizard since 3 0 public void set Help Href String href help Href href  setHelpHref helpHref

Creates a code Workbench Wizard List Selection Page code param a Workbench the current workbench param current Selection the workbench s current resource selection param wizard Elements the collection of code Workbench Wizard Elements code to display for selection param message the message to display above the selection list protected Workbench Wizard List Selection Page I Workbench a Workbench I Structured Selection current Selection Adaptable List wizard Elements String message super single Wizard Selection Page a Workbench current Selection wizard Elements NON NLS 1 set Description Workbench Messages get String Wizard List description NON NLS 1 this message message  WorkbenchWizardListSelectionPage aWorkbench currentSelection wizardElements WorkbenchWizardElements WorkbenchWizardListSelectionPage IWorkbench aWorkbench IStructuredSelection currentSelection AdaptableList wizardElements singleWizardSelectionPage aWorkbench currentSelection wizardElements setDescription WorkbenchMessages getString WizardList
public void create Control Composite parent Font font parent get Font create composite for page Composite outer Container new Composite parent SWT NONE outer Container set Layout new Grid Layout outer Container set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL outer Container set Font font Label message Label new Label outer Container SWT NONE message Label set Text message message Label set Font font create Viewer outer Container layout Top Control viewer get Control restore Widget Values set Control outer Container  createControl getFont outerContainer outerContainer setLayout GridLayout outerContainer setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL outerContainer setFont messageLabel outerContainer messageLabel setText messageLabel setFont createViewer outerContainer layoutTopControl getControl restoreWidgetValues setControl outerContainer
Create a new viewer in the parent param parent the parent code Composite code private void create Viewer Composite parent Create a table for the list Table table new Table parent SWT BORDER table set Font parent get Font the list viewer viewer new Table Viewer table viewer set Content Provider new Wizard Content Provider viewer set Label Provider new Workbench Label Provider viewer set Sorter new Workbench Viewer Sorter viewer add Selection Changed Listener this viewer add Double Click Listener this viewer set Input wizard Elements  createViewer setFont getFont TableViewer setContentProvider WizardContentProvider setLabelProvider WorkbenchLabelProvider setSorter WorkbenchViewerSorter addSelectionChangedListener addDoubleClickListener setInput wizardElements
Returns an code I Wizard Node code representing the specified workbench wizard which has been selected by the user b Subclasses b must override this abstract implementation param element the wizard element that an code I Wizard Node code is needed for return org eclipse jface wizards I Wizard Node  IWizardNode IWizardNode IWizardNode
An item in a viewer has been double clicked public void double Click Double Click Event event selection Changed new Selection Changed Event event get Viewer event get Viewer get Selection get Container show Page get Next Page  doubleClick DoubleClickEvent selectionChanged SelectionChangedEvent getViewer getViewer getSelection getContainer showPage getNextPage
Layout the top control param control the control since 3 0 private void layout Top Control Control control Grid Data data new Grid Data Grid Data FILL BOTH int available Rows Dialog Util available Rows control get Parent Only give a height hint if the dialog is going to be too small if available Rows 50 data height Hint SIZING LISTS HEIGHT else data height Hint available Rows 3 control set Layout Data data  layoutTopControl GridData GridData GridData FILL_BOTH availableRows DialogUtil availableRows getParent availableRows heightHint SIZING_LISTS_HEIGHT heightHint availableRows setLayoutData
Uses the dialog store to restore widget values to the values that they held last time this wizard was used to completion private void restore Widget Values I Dialog Settings settings get Dialog Settings if settings null return String wizard Id settings get STORE SELECTED WIZARD ID Workbench Wizard Element wizard find Wizard wizard Id if wizard null return Structured Selection selection new Structured Selection wizard viewer set Selection selection  restoreWidgetValues IDialogSettings getDialogSettings wizardId STORE_SELECTED_WIZARD_ID WorkbenchWizardElement findWizard wizardId StructuredSelection StructuredSelection setSelection
Since Finish was pressed write widget values to the dialog store so that they will persist into the next invocation of this wizard page public void save Widget Values I Structured Selection sel I Structured Selection viewer get Selection if sel size 0 Workbench Wizard Element selected Wizard Workbench Wizard Element sel get First Element get Dialog Settings put STORE SELECTED WIZARD ID selected Wizard getID  saveWidgetValues IStructuredSelection IStructuredSelection getSelection WorkbenchWizardElement selectedWizard WorkbenchWizardElement getFirstElement getDialogSettings STORE_SELECTED_WIZARD_ID selectedWizard
Notes the newly selected wizard element and updates the page accordingly param event the selection changed event public void selection Changed Selection Changed Event event set Error Message null I Structured Selection selection I Structured Selection event get Selection Workbench Wizard Element current Wizard Selection Workbench Wizard Element selection get First Element if current Wizard Selection null set Message null set Selected Node null return set Selected Node create Wizard Node current Wizard Selection set Message current Wizard Selection get Description  selectionChanged SelectionChangedEvent setErrorMessage IStructuredSelection IStructuredSelection getSelection WorkbenchWizardElement currentWizardSelection WorkbenchWizardElement getFirstElement currentWizardSelection setMessage setSelectedNode setSelectedNode createWizardNode currentWizardSelection setMessage currentWizardSelection getDescription

Creates a code Workbench Wizard Node code that holds onto a wizard element The wizard element provides information on how to create the wizard supplied by the ISV s extension public Workbench Wizard Node Workbench Wizard Selection Page a Wizard Page Workbench Wizard Element element super this parent Wizard Page a Wizard Page this wizard Element element  WorkbenchWizardNode WorkbenchWizardNode WorkbenchWizardSelectionPage aWizardPage WorkbenchWizardElement parentWizardPage aWizardPage wizardElement
Returns the wizard represented by this wizard node b Subclasses b must override this method 
see org eclipse jface wizard I Wizard Node dispose public void dispose Do nothing since the wizard wasn t created via reflection  IWizardNode
Returns the current resource selection that is being given to the wizard protected I Structured Selection get Current Resource Selection return parent Wizard Page get Current Resource Selection  IStructuredSelection getCurrentResourceSelection parentWizardPage getCurrentResourceSelection
see org eclipse jface wizard I Wizard Node get Extent public Point get Extent return new Point 1 1  IWizardNode getExtent getExtent
see org eclipse ui I Plugin Contribution get Local Id public String get Local Id return wizard Element get Local Id  IPluginContribution getLocalId getLocalId wizardElement getLocalId
see org eclipse ui I Plugin Contribution get Plugin Id public String get Plugin Id return wizard Element get Plugin Id  IPluginContribution getPluginId getPluginId wizardElement getPluginId
Add the exception details to status is one happens public void handle Exception Throwable e statuses 0 new Status I Status ERROR wizard Element get Configuration Element get Declaring Extension get Unique Identifier I Status OK e get Message null e get Message NON NLS 1 e  handleException IStatus wizardElement getConfigurationElement getDeclaringExtension getUniqueIdentifier IStatus getMessage getMessage
public void run try workbench Wizard 0 create Wizard create instance of target wizard catch Core Exception e statuses 0 e get Status  workbenchWizard createWizard CoreException getStatus
Busy Indicator show While parent Wizard Page get Shell get Display new Runnable public void run Platform run new Safe Runnable Add the exception details to status is one happens public void handle Exception Throwable e statuses 0 new Status I Status ERROR wizard Element get Configuration Element get Declaring Extension get Unique Identifier I Status OK e get Message null e get Message NON NLS 1 e public void run try workbench Wizard 0 create Wizard create instance of target wizard catch Core Exception e statuses 0 e get Status  BusyIndicator showWhile parentWizardPage getShell getDisplay SafeRunnable handleException IStatus wizardElement getConfigurationElement getDeclaringExtension getUniqueIdentifier IStatus getMessage getMessage workbenchWizard createWizard CoreException getStatus
public I Wizard get Wizard if wizard null return wizard we ve already created it final I Workbench Wizard workbench Wizard new I Workbench Wizard 1 final I Status statuses new I Status 1 Start busy indicator Busy Indicator show While parent Wizard Page get Shell get Display new Runnable public void run Platform run new Safe Runnable Add the exception details to status is one happens public void handle Exception Throwable e statuses 0 new Status I Status ERROR wizard Element get Configuration Element get Declaring Extension get Unique Identifier I Status OK e get Message null e get Message NON NLS 1 e public void run try workbench Wizard 0 create Wizard create instance of target wizard catch Core Exception e statuses 0 e get Status if statuses 0 null parent Wizard Page set Error Message Workbench Messages get String Workbench Wizard error Message NON NLS 1 Error Dialog open Error parent Wizard Page get Shell Workbench Messages get String Workbench Wizard error Title NON NLS 1 Workbench Messages get String Workbench Wizard error Message NON NLS 1 statuses 0 return null I Structured Selection current Selection get Current Resource Selection Get the adapted version of the selection that works for the wizard node current Selection wizard Element adapted Selection current Selection workbench Wizard 0 init get Workbench current Selection wizard workbench Wizard 0 return wizard  IWizard getWizard IWorkbenchWizard workbenchWizard IWorkbenchWizard IStatus IStatus BusyIndicator showWhile parentWizardPage getShell getDisplay SafeRunnable handleException IStatus wizardElement getConfigurationElement getDeclaringExtension getUniqueIdentifier IStatus getMessage getMessage workbenchWizard createWizard CoreException getStatus parentWizardPage setErrorMessage WorkbenchMessages getString WorkbenchWizard errorMessage ErrorDialog openError parentWizardPage getShell WorkbenchMessages getString WorkbenchWizard errorTitle WorkbenchMessages getString WorkbenchWizard errorMessage IStructuredSelection currentSelection getCurrentResourceSelection currentSelection wizardElement adaptedSelection currentSelection workbenchWizard getWorkbench currentSelection workbenchWizard
Returns the wizard element public Workbench Wizard Element get Wizard Element return wizard Element  WorkbenchWizardElement getWizardElement wizardElement
Returns the current workbench protected I Workbench get Workbench return parent Wizard Page get Workbench  IWorkbench getWorkbench parentWizardPage getWorkbench
see org eclipse jface wizard I Wizard Node is Content Created public boolean is Content Created return wizard null  IWizardNode isContentCreated isContentCreated

protected I Structured Selection current Resource Selection Create an instance of this class public Workbench Wizard Selection Page String name I Workbench a Workbench I Structured Selection current Selection Adaptable List elements super name this wizard Elements elements this current Resource Selection current Selection this workbench a Workbench set Title Workbench Messages get String Select NON NLS 1  IStructuredSelection currentResourceSelection WorkbenchWizardSelectionPage IWorkbench aWorkbench IStructuredSelection currentSelection AdaptableList wizardElements currentResourceSelection currentSelection aWorkbench setTitle WorkbenchMessages getString
Answer the wizard object corresponding to the passed id or null if such an object could not be found return Wizard Element param search Path java lang String protected Workbench Wizard Element find Wizard String search Id Object children wizard Elements get Children for int i 0 i children length i Workbench Wizard Element current Wizard Workbench Wizard Element children i if current Wizard getID equals search Id return current Wizard return null  WizardElement searchPath WorkbenchWizardElement findWizard searchId wizardElements getChildren WorkbenchWizardElement currentWizard WorkbenchWizardElement currentWizard searchId currentWizard
return null public I Structured Selection get Current Resource Selection return current Resource Selection  IStructuredSelection getCurrentResourceSelection currentResourceSelection
return current Resource Selection public I Workbench get Workbench return this workbench  currentResourceSelection IWorkbench getWorkbench
Specify the passed wizard node as being selected meaning that if it s non null then the wizard to be displayed when the user next presses the Next button should be determined by asking the passed node param node org eclipse jface wizards I Wizard Node public void select Wizard Node I Wizard Node node set Selected Node node  IWizardNode selectWizardNode IWizardNode setSelectedNode
public I Wizard Page get Next Page if Workbench Activity Helper allow Use Of get Selected Node return super get Next Page return null  IWizardPage getNextPage WorkbenchActivityHelper allowUseOf getSelectedNode getNextPage

Creates a new instance of the receiver param edit Page the working set page that is going to be used for editing a working set public Working Set Edit Wizard I Working Set Page edit Page super working Set Edit Page edit Page working Set Edit Page set Wizard this set Window Title Workbench Messages get String Working Set Edit Wizard title NON NLS 1  editPage WorkingSetEditWizard IWorkingSetPage editPage workingSetEditPage editPage workingSetEditPage setWizard setWindowTitle WorkbenchMessages getString WorkingSetEditWizard
Overrides Wizard see org eclipse jface wizard Wizard add Pages public void add Pages super add Pages add Page working Set Edit Page  addPages addPages addPages addPage workingSetEditPage
Overrides Wizard see org eclipse jface wizard Wizard can Finish public boolean can Finish return working Set Edit Page is Page Complete  canFinish canFinish workingSetEditPage isPageComplete
Returns the working set that is being edited return the working set that is being edited public I Working Set get Selection return working Set  IWorkingSet getSelection workingSet
Overrides Wizard Notifies the I Working Set Page that the wizard is being closed see org eclipse jface wizard Wizard perform Finish public boolean perform Finish working Set Edit Page finish return true  IWorkingSetPage performFinish performFinish workingSetEditPage
Sets the working set that should be edited param working Set the working set that should be edited public void set Selection I Working Set working Set this working Set working Set working Set Edit Page set Selection working Set  workingSet setSelection IWorkingSet workingSet workingSet workingSet workingSetEditPage setSelection workingSet

Creates a new instance of the receiver public Working Set New Wizard super set Window Title Workbench Messages get String Working Set New Wizard title NON NLS 1  WorkingSetNewWizard setWindowTitle WorkbenchMessages getString WorkingSetNewWizard
Overrides method in Wizard Adds a page listing the available kinds of working sets The second wizard page will depend on the selected working set type see org eclipse jface wizard Wizard add Pages public void add Pages super add Pages I Wizard Page page Working Set Registry registry Workbench Plugin get Default get Working Set Registry Working Set Descriptor descriptors registry get Working Set Descriptors if descriptors length 1 page working Set Type Page new Working Set Type Page else edit Page Id descriptors 0 get Id page working Set Edit Page registry get Working Set Page edit Page Id page set Wizard this add Page page set Force Previous And Next Buttons descriptors length 1  addPages addPages addPages IWizardPage WorkingSetRegistry WorkbenchPlugin getDefault getWorkingSetRegistry WorkingSetDescriptor getWorkingSetDescriptors workingSetTypePage WorkingSetTypePage editPageId getId workingSetEditPage getWorkingSetPage editPageId setWizard addPage setForcePreviousAndNextButtons
Overrides method in Wizard see org eclipse jface wizard Wizard can Finish public boolean can Finish return working Set Edit Page null working Set Edit Page is Page Complete  canFinish canFinish workingSetEditPage workingSetEditPage isPageComplete
Overrides method in Wizard Returns a working set page for creating the new working set This second page is loaded from the plugin that defined the selected working set type see org eclipse jface wizard Wizard get Next Page I Wizard Page public I Wizard Page get Next Page I Wizard Page page if working Set Type Page null page working Set Type Page String page Id working Set Type Page get Selection if page Id null if working Set Edit Page null page Id edit Page Id Working Set Registry registry Workbench Plugin get Default get Working Set Registry working Set Edit Page registry get Working Set Page page Id add Page working Set Edit Page edit Page Id page Id return working Set Edit Page return null  getNextPage IWizardPage IWizardPage getNextPage IWizardPage workingSetTypePage workingSetTypePage pageId workingSetTypePage getSelection pageId workingSetEditPage pageId editPageId WorkingSetRegistry WorkbenchPlugin getDefault getWorkingSetRegistry workingSetEditPage getWorkingSetPage pageId addPage workingSetEditPage editPageId pageId workingSetEditPage
Returns the new working set Returns null if the wizard has been cancelled return the new working set or null if the wizard has been cancelled public I Working Set get Selection return working Set  IWorkingSet getSelection workingSet
Overrides method in Wizard Stores the newly created working set and the id of the page used to create it see org eclipse jface wizard Wizard perform Finish public boolean perform Finish working Set Edit Page finish working Set working Set Edit Page get Selection working Set set Id edit Page Id return true  performFinish performFinish workingSetEditPage workingSet workingSetEditPage getSelection workingSet setId editPageId

private Map icons public Working Set Label Provider icons new Hashtable  WorkingSetLabelProvider
public void dispose Iterator iterator icons values iterator while iterator has Next Image icon Image iterator next icon dispose super dispose  hasNext
public Image get Image Object object Assert is True object instanceof I Working Set I Working Set working Set I Working Set object Image Descriptor image Descriptor working Set get Image if image Descriptor null return null Image icon Image icons get image Descriptor if icon null icon image Descriptor create Image icons put image Descriptor icon return icon  getImage isTrue IWorkingSet IWorkingSet workingSet IWorkingSet ImageDescriptor imageDescriptor workingSet getImage imageDescriptor imageDescriptor imageDescriptor createImage imageDescriptor
public String get Text Object object Assert is True object instanceof I Working Set I Working Set working Set I Working Set object return working Set get Name  getText isTrue IWorkingSet IWorkingSet workingSet IWorkingSet workingSet getName
Creates a working set selection dialog param parent Shell the parent shell param multi true more than one working set can be chosen in the dialog false only one working set can be chosen Multiple working sets can still be selected and removed from the list but the dialog can only be closed when a single working set is selected public Working Set Selection Dialog Shell parent Shell boolean multi super parent Shell content Provider new List Content Provider label Provider new Working Set Label Provider multi Select multi if multi Select set Title Workbench Messages get String Working Set Selection Dialog title multi Select NON NLS 1 set Message Workbench Messages get String Working Set Selection Dialog message multi Select NON NLS 1 else set Title Workbench Messages get String Working Set Selection Dialog title NON NLS 1 set Message Workbench Messages get String Working Set Selection Dialog message NON NLS 1  parentShell WorkingSetSelectionDialog parentShell parentShell contentProvider ListContentProvider labelProvider WorkingSetLabelProvider multiSelect multiSelect setTitle WorkbenchMessages getString WorkingSetSelectionDialog multiSelect setMessage WorkbenchMessages getString WorkingSetSelectionDialog multiSelect setTitle WorkbenchMessages getString WorkingSetSelectionDialog setMessage WorkbenchMessages getString WorkingSetSelectionDialog
Adds the modify buttons to the dialog param composite Composite to add the buttons to private void add Modify Buttons Composite composite Composite button Composite new Composite composite SWT RIGHT Grid Layout layout new Grid Layout layout num Columns 2 button Composite set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data GRAB HORIZONTAL data grab Excess Horizontal Space true composite set Data data int id I Dialog Constants CLIENT ID 1 new Button create Button button Composite id Workbench Messages get String Working Set Selection Dialog new Button label false NON NLS 1 new Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e create Working Set details Button create Button button Composite id Workbench Messages get String Working Set Selection Dialog details Button label false NON NLS 1 details Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e edit Selected Working Set remove Button create Button button Composite id Workbench Messages get String Working Set Selection Dialog remove Button label false NON NLS 1 remove Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e remove Selected Working Sets  addModifyButtons buttonComposite GridLayout GridLayout numColumns buttonComposite setLayout GridData GridData GridData HORIZONTAL_ALIGN_END GridData GRAB_HORIZONTAL grabExcessHorizontalSpace setData IDialogConstants CLIENT_ID newButton createButton buttonComposite WorkbenchMessages getString WorkingSetSelectionDialog newButton newButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent createWorkingSet detailsButton createButton buttonComposite WorkbenchMessages getString WorkingSetSelectionDialog detailsButton detailsButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent editSelectedWorkingSet removeButton createButton buttonComposite WorkbenchMessages getString WorkingSetSelectionDialog removeButton removeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent removeSelectedWorkingSets
Overrides method from Dialog see Dialog cancel Pressed protected void cancel Pressed restore Added Working Sets restore Changed Working Sets restore Removed Working Sets super cancel Pressed  cancelPressed cancelPressed restoreAddedWorkingSets restoreChangedWorkingSets restoreRemovedWorkingSets cancelPressed
Overrides method from Window see org eclipse jface window Window configure Shell Shell protected void configure Shell Shell shell super configure Shell shell Workbench Help set Help shell I Help Context Ids WORKING SET SELECTION DIALOG  configureShell configureShell configureShell WorkbenchHelp setHelp IHelpContextIds WORKING_SET_SELECTION_DIALOG
Overrides method from Dialog Create the dialog widgets see org eclipse jface dialogs Dialog create Dialog Area Composite protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent create Message Area composite list Viewer new Table Viewer composite SWT BORDER SWT MULTI Grid Data data new Grid Data Grid Data FILL BOTH data height Hint SIZING SELECTION WIDGET HEIGHT data width Hint SIZING SELECTION WIDGET WIDTH list Viewer get Table set Layout Data data list Viewer get Table set Font parent get Font list Viewer set Label Provider label Provider list Viewer set Content Provider content Provider list Viewer set Sorter new Workbench Viewer Sorter list Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Selection Changed list Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event ok Pressed add Modify Buttons composite list Viewer set Input Arrays as List Workbench Plugin get Default get Working Set Manager get Working Sets return composite  createDialogArea createDialogArea createDialogArea createMessageArea listViewer TableViewer GridData GridData GridData FILL_BOTH heightHint SIZING_SELECTION_WIDGET_HEIGHT widthHint SIZING_SELECTION_WIDGET_WIDTH listViewer getTable setLayoutData listViewer getTable setFont getFont listViewer setLabelProvider labelProvider listViewer setContentProvider contentProvider listViewer setSorter WorkbenchViewerSorter listViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged listViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent okPressed addModifyButtons listViewer setInput asList WorkbenchPlugin getDefault getWorkingSetManager getWorkingSets
Overrides method from Dialog Sets the initial selection if any see org eclipse jface dialogs Dialog create Contents Composite protected Control create Contents Composite parent Control control super create Contents parent List selections get Initial Element Selections if selections is Empty list Viewer set Selection new Structured Selection selections true update Button Availability don t allow ok dismissal until a change has been made Fixes bug 22735 get Ok Button set Enabled false return control  createContents createContents createContents getInitialElementSelections isEmpty listViewer setSelection StructuredSelection updateButtonAvailability getOkButton setEnabled
Opens a working set wizard for creating a new working set void create Working Set Working Set New Wizard wizard new Working Set New Wizard Wizard Dialog dialog new Wizard Dialog get Shell wizard dialog create Workbench Help set Help dialog get Shell I Help Context Ids WORKING SET NEW WIZARD if dialog open Window OK I Working Set Manager manager Workbench Plugin get Default get Working Set Manager I Working Set working Set wizard get Selection list Viewer add working Set list Viewer set Selection new Structured Selection working Set true manager add Working Set working Set added Working Sets add working Set  createWorkingSet WorkingSetNewWizard WorkingSetNewWizard WizardDialog WizardDialog getShell WorkbenchHelp setHelp getShell IHelpContextIds WORKING_SET_NEW_WIZARD IWorkingSetManager WorkbenchPlugin getDefault getWorkingSetManager IWorkingSet workingSet getSelection listViewer workingSet listViewer setSelection StructuredSelection workingSet addWorkingSet workingSet addedWorkingSets workingSet
Opens a working set wizard for editing the currently selected working set see org eclipse ui I Working Set Page void edit Selected Working Set I Working Set Manager manager Workbench Plugin get Default get Working Set Manager I Working Set edit Working Set I Working Set get Selected Working Sets get 0 I Working Set Edit Wizard wizard manager create Working Set Edit Wizard edit Working Set Wizard Dialog dialog new Wizard Dialog get Shell wizard I Working Set original Working Set I Working Set edited Working Sets get edit Working Set boolean first Edit original Working Set null save the original working set values for restoration when selection dialog is cancelled if first Edit original Working Set new Working Set edit Working Set get Name edit Working Set get Elements else edited Working Sets remove edit Working Set dialog create Workbench Help set Help dialog get Shell I Help Context Ids WORKING SET EDIT WIZARD if dialog open Window OK edit Working Set wizard get Selection list Viewer update edit Working Set null make sure ok button is enabled when the selected working set is edited Fixes bug 33386 update Button Availability edited Working Sets put edit Working Set original Working Set  IWorkingSetPage editSelectedWorkingSet IWorkingSetManager WorkbenchPlugin getDefault getWorkingSetManager IWorkingSet editWorkingSet IWorkingSet getSelectedWorkingSets IWorkingSetEditWizard createWorkingSetEditWizard editWorkingSet WizardDialog WizardDialog getShell IWorkingSet originalWorkingSet IWorkingSet editedWorkingSets editWorkingSet firstEdit originalWorkingSet firstEdit originalWorkingSet WorkingSet editWorkingSet getName editWorkingSet getElements editedWorkingSets editWorkingSet WorkbenchHelp setHelp getShell IHelpContextIds WORKING_SET_EDIT_WIZARD editWorkingSet getSelection listViewer editWorkingSet updateButtonAvailability editedWorkingSets editWorkingSet originalWorkingSet
Implements I Working Set Selection Dialog see org eclipse ui dialogs I Working Set Selection Dialog get Selection public I Working Set get Selection return result  IWorkingSetSelectionDialog IWorkingSetSelectionDialog getSelection IWorkingSet getSelection
Returns the selected working sets return the selected working sets private List get Selected Working Sets I Selection selection list Viewer get Selection if selection instanceof I Structured Selection return I Structured Selection selection to List return null  getSelectedWorkingSets ISelection listViewer getSelection IStructuredSelection IStructuredSelection toList
Called when the selection has changed void handle Selection Changed update Button Availability  handleSelectionChanged updateButtonAvailability
Sets the selected working sets as the dialog result Overrides method from Dialog see org eclipse jface dialogs Dialog ok Pressed protected void ok Pressed List new Result get Selected Working Sets result I Working Set new Result to Array new I Working Set new Result size set Result new Result super ok Pressed  okPressed okPressed newResult getSelectedWorkingSets IWorkingSet newResult toArray IWorkingSet newResult setResult newResult okPressed
Overrides method in Dialog see org eclipse jface dialogs Dialog open public int open added Working Sets new Array List removed Working Sets new Array List edited Working Sets new Hash Map removedMRU Working Sets new Array List return super open  addedWorkingSets ArrayList removedWorkingSets ArrayList editedWorkingSets HashMap removedMRUWorkingSets ArrayList
Removes the selected working sets from the workbench void remove Selected Working Sets I Selection selection list Viewer get Selection if selection instanceof I Structured Selection I Working Set Manager manager Workbench Plugin get Default get Working Set Manager Iterator iter I Structured Selection selection iterator while iter has Next I Working Set working Set I Working Set iter next if added Working Sets contains working Set added Working Sets remove working Set else I Working Set recent Working Sets manager get Recent Working Sets for int i 0 i recent Working Sets length i if working Set equals recent Working Sets i removedMRU Working Sets add working Set break removed Working Sets add working Set manager remove Working Set working Set list Viewer remove I Structured Selection selection to Array  removeSelectedWorkingSets ISelection listViewer getSelection IStructuredSelection IWorkingSetManager WorkbenchPlugin getDefault getWorkingSetManager IStructuredSelection hasNext IWorkingSet workingSet IWorkingSet addedWorkingSets workingSet addedWorkingSets workingSet IWorkingSet recentWorkingSets getRecentWorkingSets recentWorkingSets workingSet recentWorkingSets removedMRUWorkingSets workingSet removedWorkingSets workingSet removeWorkingSet workingSet listViewer IStructuredSelection toArray
Removes newly created working sets from the working set manager private void restore Added Working Sets I Working Set Manager manager Workbench Plugin get Default get Working Set Manager Iterator iterator added Working Sets iterator while iterator has Next manager remove Working Set I Working Set iterator next  restoreAddedWorkingSets IWorkingSetManager WorkbenchPlugin getDefault getWorkingSetManager addedWorkingSets hasNext removeWorkingSet IWorkingSet
Rolls back changes to working sets private void restore Changed Working Sets Iterator iterator edited Working Sets key Set iterator while iterator has Next I Working Set edited Working Set I Working Set iterator next I Working Set original Working Set I Working Set edited Working Sets get edited Working Set if edited Working Set get Name equals original Working Set get Name false edited Working Set set Name original Working Set get Name if edited Working Set get Elements equals original Working Set get Elements false edited Working Set set Elements original Working Set get Elements  restoreChangedWorkingSets editedWorkingSets keySet hasNext IWorkingSet editedWorkingSet IWorkingSet IWorkingSet originalWorkingSet IWorkingSet editedWorkingSets editedWorkingSet editedWorkingSet getName originalWorkingSet getName editedWorkingSet setName originalWorkingSet getName editedWorkingSet getElements originalWorkingSet getElements editedWorkingSet setElements originalWorkingSet getElements
Adds back removed working sets to the working set manager private void restore Removed Working Sets I Working Set Manager manager Workbench Plugin get Default get Working Set Manager Iterator iterator removed Working Sets iterator while iterator has Next manager add Working Set I Working Set iterator next iterator removedMRU Working Sets iterator while iterator has Next manager add Recent Working Set I Working Set iterator next  restoreRemovedWorkingSets IWorkingSetManager WorkbenchPlugin getDefault getWorkingSetManager removedWorkingSets hasNext addWorkingSet IWorkingSet removedMRUWorkingSets hasNext addRecentWorkingSet IWorkingSet
Implements I Working Set Selection Dialog see org eclipse ui dialogs I Working Set Selection Dialog set Selection I Working Set public void set Selection I Working Set working Sets result working Sets set Initial Selections working Sets  IWorkingSetSelectionDialog IWorkingSetSelectionDialog setSelection IWorkingSet setSelection IWorkingSet workingSets workingSets setInitialSelections workingSets
Updates the modify buttons enabled state based on the current seleciton private void update Button Availability I Selection selection list Viewer get Selection boolean has Selection selection null selection is Empty boolean has Single Selection has Selection remove Button set Enabled has Selection if has Selection selection instanceof I Structured Selection has Single Selection I Structured Selection selection size 1 details Button set Enabled has Single Selection if multi Select false get Ok Button set Enabled has Selection false has Single Selection else get Ok Button set Enabled true  updateButtonAvailability ISelection listViewer getSelection hasSelection isEmpty hasSingleSelection hasSelection removeButton setEnabled hasSelection hasSelection IStructuredSelection hasSingleSelection IStructuredSelection detailsButton setEnabled hasSingleSelection multiSelect getOkButton setEnabled hasSelection hasSingleSelection getOkButton setEnabled

Creates a new instance of the receiver public Working Set Type Page super working Set Type Selection Page Workbench Messages get String Select Workbench Images get Image Descriptor I Workbench Graphic Constants IMG WIZBAN WORKINGSET WIZ NON NLS 1 NON NLS 2 set Description Workbench Messages get String Working Set Type Page description NON NLS 1 icons new Hashtable  WorkingSetTypePage workingSetTypeSelectionPage WorkbenchMessages getString WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_WIZBAN_WORKINGSET_WIZ setDescription WorkbenchMessages getString WorkingSetTypePage
Overrides method in Wizard Page see org eclipse jface wizard I Wizard Page can Flip To Next Page public boolean can Flip To Next Page return is Page Complete  WizardPage IWizardPage canFlipToNextPage canFlipToNextPage isPageComplete
Populates the working set types list private void create Content Working Set Registry registry Workbench Plugin get Default get Working Set Registry Working Set Descriptor descriptors registry get Working Set Descriptors Table table Table types List Viewer get Control for int i 0 i descriptors length i Table Item table Item new Table Item table SWT NULL Image Descriptor image Descriptor descriptors i get Icon if image Descriptor null Image icon Image icons get image Descriptor if icon null icon image Descriptor create Image icons put image Descriptor icon table Item set Image icon table Item set Text descriptors i get Name table Item set Data descriptors i  createContent WorkingSetRegistry WorkbenchPlugin getDefault getWorkingSetRegistry WorkingSetDescriptor getWorkingSetDescriptors typesListViewer getControl TableItem tableItem TableItem ImageDescriptor imageDescriptor getIcon imageDescriptor imageDescriptor imageDescriptor createImage imageDescriptor tableItem setImage tableItem setText getName tableItem setData
types List Viewer get Table set Font font types List Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Selection Changed  typesListViewer getTable setFont typesListViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged
types List Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Double Click  typesListViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleDoubleClick
Implements I Dialog Page see org eclipse jface dialogs I Dialog Page create Control Composite public void create Control Composite parent Font font parent get Font Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL set Control composite Workbench Help set Help composite I Help Context Ids WORKING SET TYPE PAGE Label types Label new Label composite SWT NONE types Label set Text Workbench Messages get String Working Set Type Page types Label NON NLS 1 Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER types Label set Layout Data data types Label set Font font types List Viewer new Table Viewer composite SWT BORDER SWT MULTI data new Grid Data Grid Data FILL BOTH data height Hint SIZING SELECTION WIDGET HEIGHT data width Hint SIZING SELECTION WIDGET WIDTH types List Viewer get Table set Layout Data data types List Viewer get Table set Font font types List Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Selection Changed types List Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Double Click create Content set Page Complete false  IDialogPage IDialogPage createControl createControl getFont setLayout GridLayout setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL setControl WorkbenchHelp setHelp IHelpContextIds WORKING_SET_TYPE_PAGE typesLabel typesLabel setText WorkbenchMessages getString WorkingSetTypePage typesLabel GridData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER typesLabel setLayoutData typesLabel setFont typesListViewer TableViewer GridData GridData FILL_BOTH heightHint SIZING_SELECTION_WIDGET_HEIGHT widthHint SIZING_SELECTION_WIDGET_WIDTH typesListViewer getTable setLayoutData typesListViewer getTable setFont typesListViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged typesListViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleDoubleClick createContent setPageComplete
Overrides method in Dialog Page see org eclipse jface dialogs I Dialog Page dispose public void dispose Iterator iterator icons values iterator while iterator has Next Image icon Image iterator next icon dispose super dispose  DialogPage IDialogPage hasNext
Returns the page id of the selected working set type return the page id of the selected working set type public String get Selection I Selection selection types List Viewer get Selection boolean has Selection selection null selection is Empty false if has Selection selection instanceof I Structured Selection Working Set Descriptor working Set Descriptor Working Set Descriptor I Structured Selection selection get First Element return working Set Descriptor get Id return null  getSelection ISelection typesListViewer getSelection hasSelection isEmpty hasSelection IStructuredSelection WorkingSetDescriptor workingSetDescriptor WorkingSetDescriptor IStructuredSelection getFirstElement workingSetDescriptor getId
Called when a working set type is double clicked private void handle Double Click handle Selection Changed get Container show Page get Next Page  handleDoubleClick handleSelectionChanged getContainer showPage getNextPage
Called when the selection has changed private void handle Selection Changed I Selection selection types List Viewer get Selection boolean has Selection selection null selection is Empty false set Page Complete has Selection  handleSelectionChanged ISelection typesListViewer getSelection hasSelection isEmpty setPageComplete hasSelection

see org eclipse ui internal dnd I Drop Target drop public abstract void drop  IDropTarget
see org eclipse ui internal dnd I Drop Target get Cursor public abstract Cursor get Cursor  IDropTarget getCursor getCursor
see org eclipse ui internal dnd I Drop Target get Snap Rectangle public Rectangle get Snap Rectangle return null  IDropTarget getSnapRectangle getSnapRectangle

Returns the relative position of the given point in display coordinates with respect to the given control Returns one of SWT LEFT SWT RIGHT SWT CENTER SWT TOP or SWT BOTTOM if the point is on the control or SWT DEFAULT if the point is not on the control param control control to perform hit detection on param to Test point to test in display coordinates return public static int get Relative Position Control c Point to Test Point p c to Control to Test Point e c get Size if p x e x p y e y p x 0 p y 0 return SWT DEFAULT first determine whether mouse position is in center of part int hmargin Math min e x 3 MARGIN int vmargin Math min e y 3 MARGIN Rectangle inner new Rectangle hmargin vmargin e x hmargin 2 e y vmargin 2 if inner contains p return SWT CENTER else return Geometry get Closest Side inner p  toTest getRelativePosition toTest toControl toTest getSize getClosestSide

Sets the drop target for the given control It is possible to add one or more targets for a null control This becomes a default target that is used if no other targets are found for example when dragging objects off the application window param control the control that should be treated as a drag target or null to indicate the default target param target the drag target to handle the given control public static void add Drag Target Control control I Drag Over Listener target if control null default Targets add target else List target List get Target List control if target List null target List new Array List 1 target List add target control set Data DROP TARGET ID target List  addDragTarget IDragOverListener defaultTargets targetList getTargetList targetList targetList ArrayList targetList setData DROP_TARGET_ID targetList
private static List get Target List Control control List result List control get Data DROP TARGET ID return result  getTargetList getData DROP_TARGET_ID
Removes a drop target from the given control param control param target public static void remove Drag Target Control control I Drag Over Listener target if control null default Targets remove target else List target List get Target List control if target List null target List remove target if target List is Empty control set Data DROP TARGET ID null  removeDragTarget IDragOverListener defaultTargets targetList getTargetList targetList targetList targetList isEmpty setData DROP_TARGET_ID
Shorthand method Returns the bounding rectangle for the given control in display coordinates param dragged Item param bounds Control return public static Rectangle get Display Bounds Control bounds Control Control parent bounds Control get Parent if parent null return bounds Control get Bounds return Geometry to Display parent bounds Control get Bounds  draggedItem boundsControl getDisplayBounds boundsControl boundsControl getParent boundsControl getBounds toDisplay boundsControl getBounds
public static boolean perform Drag final Object dragged Item Rectangle source Bounds return perform Drag dragged Item source Bounds Display get Default get Cursor Location false  performDrag draggedItem sourceBounds performDrag draggedItem sourceBounds getDefault getCursorLocation
public static boolean perform Drag final Object dragged Item Rectangle source Bounds Point initial Location boolean allow Snapping I Drop Target target drag To Target dragged Item source Bounds initial Location allow Snapping if target null return false target drop return true  performDrag draggedItem sourceBounds initialLocation allowSnapping IDropTarget dragToTarget draggedItem sourceBounds initialLocation allowSnapping
Drags the given item to the given location in display coordinates This method is intended for use by test suites param dragged Item object being dragged param final Location location being dragged to return true iff the drop was accepted public static boolean drag To Display display Object dragged Item Point final Location Rectangle drag Rectangle Control current Control Swt Util find Control display final Location I Drop Target target get Drop Target current Control dragged Item final Location drag Rectangle if target null return false target drop return true  draggedItem finalLocation dragTo draggedItem finalLocation dragRectangle currentControl SwtUtil findControl finalLocation IDropTarget getDropTarget currentControl draggedItem finalLocation dragRectangle
Forces all drags to end at the given position display coordinates Intended for use by test suites If this method is called then all subsequent calls to perform Drag will terminate immediately and behave as though the object were dragged to the given location Calling this method with null cancels this behavior and causes perform Drag to behave normally param forced Location location where objects will be dropped or null to cause drag drop to behave normally public static void force Drop Location Test Drop Location forced Location forced Drop Target forced Location  performDrag performDrag forcedLocation forceDropLocation TestDropLocation forcedLocation forcedDropTarget forcedLocation
Drags the given item given an initial bounding rectangle in display coordinates Due to a quirk in the Tracker class changing the tracking rectangle when using the keyboard will also cause the mouse cursor to move Since snapping causes the tracking rectangle to change based on the position of the mouse cursor it is impossible to do drag and drop with the keyboard when snapping is enabled param dragged Item object being dragged param source Bounds initial bounding rectangle for the dragged item param initial Location initial position of the mouse cursor param allow Snapping true iff the rectangle should snap to the drop location This must be false if the user might be doing drag and drop using the keyboard return static I Drop Target drag To Target final Object dragged Item final Rectangle source Bounds final Point initial Location final boolean allow Snapping final Display display Display get Default if forced Drop Target null Point location forced Drop Target get Location Control current Control Swt Util find Control display location return get Drop Target current Control dragged Item location source Bounds Create a tracker This is just an XOR rect on the screen As it moves we notify the drag listeners final Tracker tracker new Tracker display SWT NULL tracker set Stippled true tracker add Listener SWT Move new Listener public void handle Event final Event event display sync Exec new Runnable public void run Point location new Point event x event y Control target Control display get Cursor Control I Drop Target target get Drop Target target Control dragged Item location tracker get Rectangles 0 Rectangle snap Target null if target null snap Target target get Snap Rectangle tracker set Cursor target get Cursor else tracker set Cursor Drag Cursors get Cursor Drag Cursors INVALID if allow Snapping if snap Target null snap Target new Rectangle source Bounds x location x initial Location x source Bounds y location y initial Location y source Bounds width source Bounds height Try to prevent flicker don t change the rectangles if they re already in the right location Rectangle current Rectangles tracker get Rectangles if current Rectangles length 1 current Rectangles 0 equals snap Target tracker set Rectangles new Rectangle snap Target if source Bounds null tracker set Rectangles new Rectangle new Rectangle source Bounds x source Bounds y source Bounds width source Bounds height HACK Some control needs to capture the mouse during the drag or other controls will interfere with the cursor Control start Control display get Cursor Control if start Control null start Control set Capture true Run tracker until mouse up occurs or escape key pressed boolean tracking Ok tracker open HACK Release the mouse now if start Control null start Control set Capture false Point final Location display get Cursor Location I Drop Target drop Target null if tracking Ok Control target Control display get Cursor Control drop Target get Drop Target target Control dragged Item final Location tracker get Rectangles 0 Cleanup tracker dispose return drop Target  draggedItem sourceBounds initialLocation allowSnapping IDropTarget dragToTarget draggedItem sourceBounds initialLocation allowSnapping getDefault forcedDropTarget forcedDropTarget getLocation currentControl SwtUtil findControl getDropTarget currentControl draggedItem sourceBounds setStippled addListener handleEvent syncExec targetControl getCursorControl IDropTarget getDropTarget targetControl draggedItem getRectangles snapTarget snapTarget getSnapRectangle setCursor getCursor setCursor DragCursors getCursor DragCursors allowSnapping snapTarget snapTarget sourceBounds initialLocation sourceBounds initialLocation sourceBounds sourceBounds currentRectangles getRectangles currentRectangles currentRectangles snapTarget setRectangles snapTarget sourceBounds setRectangles sourceBounds sourceBounds sourceBounds sourceBounds startControl getCursorControl startControl startControl setCapture trackingOk startControl startControl setCapture finalLocation getCursorLocation IDropTarget dropTarget trackingOk targetControl getCursorControl dropTarget getDropTarget targetControl draggedItem finalLocation getRectangles dropTarget
Given a list of I Drag Over Listeners and a description of what is being dragged it returns a I Drop Target for the current drop param to Search param most Specific Control param dragged Object param position param drag Rectangle return private static I Drop Target get Drop Target List to Search Control most Specific Control Object dragged Object Point position Rectangle drag Rectangle if to Search null return null Iterator iter to Search iterator while iter has Next I Drag Over Listener next I Drag Over Listener iter next I Drop Target drop Target next drag most Specific Control dragged Object position drag Rectangle if drop Target null return drop Target return null  IDragOverListeners IDropTarget toSearch mostSpecificControl draggedObject dragRectangle IDropTarget getDropTarget toSearch mostSpecificControl draggedObject dragRectangle toSearch toSearch hasNext IDragOverListener IDragOverListener IDropTarget dropTarget mostSpecificControl draggedObject dragRectangle dropTarget dropTarget
Returns the drag target for the given control or null if none param to Search param e return public static I Drop Target get Drop Target Control to Search Object dragged Object Point position Rectangle drag Rectangle for Control current to Search current null current current get Parent I Drop Target drop Target get Drop Target get Target List current to Search dragged Object position drag Rectangle if drop Target null return drop Target Don t look to parent shells for drop targets if current instanceof Shell break No controls could handle this event check for default targets return get Drop Target default Targets to Search dragged Object position drag Rectangle  toSearch IDropTarget getDropTarget toSearch draggedObject dragRectangle toSearch getParent IDropTarget dropTarget getDropTarget getTargetList toSearch draggedObject dragRectangle dropTarget dropTarget getDropTarget defaultTargets toSearch draggedObject dragRectangle
Returns the location of the given event in display coordinates return public static Point get Event Loc Event event Control ctrl Control event widget return ctrl to Display new Point event x event y  getEventLoc toDisplay

Notifies the receiver that the given object has been dragged over the given position Returns a drop target if the object may be dropped in this position Returns null otherwise param dragged Object object being dragged over this location param position location of the cursor param drag Rectangle current drag rectangle may be an empty rectangle if none return a valid drop target or null if none  draggedObject dragRectangle

public interface I Drop Target Drops the object in this position void drop  IDropTarget
Returns a cursor describing this drop operation return a cursor describing this drop operation 
Returns a rectangle screen coordinates describing the target location for this drop operation return a snap rectangle or null if this drop target does not have a specific snap location 

public class Swt Util private Swt Util  SwtUtil SwtUtil
Returns true if the given control is null or has been disposed param to Test the control to test return false if it is safe to invoke methods on the given control public static boolean is Disposed Control to Test return to Test null to Test is Disposed  toTest isDisposed toTest toTest toTest isDisposed
Determines if one control is a child of another Returns true iff the second argument is a child of the first or the same object param potential Parent param child To Test return public static boolean is Child Control potential Parent Control child To Test if child To Test null return false if child To Test potential Parent return true return is Child potential Parent child To Test get Parent  potentialParent childToTest isChild potentialParent childToTest childToTest childToTest potentialParent isChild potentialParent childToTest getParent
Finds and returns the most specific SWT control at the given location Note this does a DFS on the SWT widget hierarchy which is slow param display To Search param location To Find return public static Control find Control Display display To Search Point location To Find Shell shells display To Search get Shells return find Control shells location To Find  displayToSearch locationToFind findControl displayToSearch locationToFind displayToSearch getShells findControl locationToFind
Searches the given list of controls for a control containing the given point If the array contains any composites those composites will be recursively searched to find the most specific child that contains the point param to Search an array of composites param location To Find a point in display coordinates return public static Control find Control Control to Search Point location To Find for int idx to Search length 1 idx 0 idx Control next to Search idx if next is Disposed next is Visible Rectangle bounds Drag Util get Display Bounds next if bounds contains location To Find if next instanceof Composite Composite next Composite Composite next Control result find Control Composite next location To Find if result null return result return next return null  toSearch locationToFind findControl toSearch locationToFind toSearch toSearch isDisposed isVisible DragUtil getDisplayBounds locationToFind nextComposite findControl locationToFind
Finds the control in the given location param to Search param location To Find location in display coordinates return public static Control find Control Composite to Search Point location To Find Control children to Search get Children return find Control children location To Find  toSearch locationToFind findControl toSearch locationToFind toSearch getChildren findControl locationToFind

Location where the object should be dropped in display coordinates return a location in display coordinates 

public static int position To Drag Cursor int swt Position Constant switch swt Position Constant case SWT LEFT return LEFT case SWT RIGHT return RIGHT case SWT TOP return TOP case SWT BOTTOM return BOTTOM case SWT CENTER return CENTER return INVALID  positionToDragCursor swtPositionConstant swtPositionConstant
Converts a drag cursor LEFT RIGHT TOP BOTTOM CENTER into an SWT constant SWT LEFT SWT RIGHT SWT TOP SWT BOTTOM SWT CENTER param drag Cursor Id return an SWT constant public static int drag Cursor To Swt Constant int drag Cursor Id switch drag Cursor Id case LEFT return SWT LEFT case RIGHT return SWT RIGHT case TOP return SWT TOP case BOTTOM return SWT BOTTOM case CENTER return SWT CENTER return SWT DEFAULT  dragCursorId dragCursorToSwtConstant dragCursorId dragCursorId
Return the cursor for a drop scenario as identified by code Code must be one of INVALID LEFT RIGHT TOP etc If the code is not found default to INVALID public static Cursor get Cursor int code Display display Display get Current if cursors code null Image Descriptor source null Image Descriptor mask null switch code case LEFT source Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND LEFT SOURCE mask Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND LEFT MASK cursors LEFT new Cursor display source get Image Data mask get Image Data 16 16 break case RIGHT source Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND RIGHT SOURCE mask Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND RIGHT MASK cursors RIGHT new Cursor display source get Image Data mask get Image Data 16 16 break case TOP source Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND TOP SOURCE mask Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND TOP MASK cursors TOP new Cursor display source get Image Data mask get Image Data 16 16 break case BOTTOM source Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND BOTTOM SOURCE mask Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND BOTTOM MASK cursors BOTTOM new Cursor display source get Image Data mask get Image Data 16 16 break case CENTER source Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND STACK SOURCE mask Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND STACK MASK cursors CENTER new Cursor display source get Image Data mask get Image Data 16 16 break case OFFSCREEN source Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND OFFSCREEN SOURCE mask Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND OFFSCREEN MASK cursors OFFSCREEN new Cursor display source get Image Data mask get Image Data 16 16 break case FASTVIEW source Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND TOFASTVIEW SOURCE mask Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND TOFASTVIEW MASK cursors FASTVIEW new Cursor Display get Current source get Image Data mask get Image Data 16 16 default case INVALID source Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND INVALID SOURCE mask Workbench Images get Image Descriptor I Workbench Graphic Constants IMG OBJS DND INVALID MASK cursors INVALID new Cursor display source get Image Data mask get Image Data 16 16 break return cursors code  getCursor getCurrent ImageDescriptor ImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_LEFT_SOURCE WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_LEFT_MASK getImageData getImageData WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_RIGHT_SOURCE WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_RIGHT_MASK getImageData getImageData WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_TOP_SOURCE WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_TOP_MASK getImageData getImageData WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_BOTTOM_SOURCE WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_BOTTOM_MASK getImageData getImageData WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_STACK_SOURCE WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_STACK_MASK getImageData getImageData WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_OFFSCREEN_SOURCE WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_OFFSCREEN_MASK getImageData getImageData WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_TOFASTVIEW_SOURCE WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_TOFASTVIEW_MASK getCurrent getImageData getImageData WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_INVALID_SOURCE WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_OBJS_DND_INVALID_MASK getImageData getImageData
Disposes all drag and drop cursors public static void dispose for int idx 0 idx cursors length idx cursors idx dispose cursors idx null 

param extension must not be null public Early Startup Runnable I Extension extension this extension extension  EarlyStartupRunnable IExtension
public void run throws Exception I Configuration Element config Elements extension get Configuration Elements look for the startup tag in each element and run the extension boolean found At Least One false for int i 0 i config Elements length i I Configuration Element element config Elements i if element null element get Name equals I Workbench Constants TAG STARTUP run Early Startup get Executable Extension element found At Least One true if no startup tags were found then try the plugin object if found At Least One run Early Startup get Plugin For Compatibility  IConfigurationElement configElements getConfigurationElements foundAtLeastOne configElements IConfigurationElement configElements getName IWorkbenchConstants TAG_STARTUP runEarlyStartup getExecutableExtension foundAtLeastOne foundAtLeastOne runEarlyStartup getPluginForCompatibility
public void handle Exception Throwable exception I Status status new Status I Status ERROR extension get Namespace 0 Unable to execute early startup code for an extension NON NLS 1 exception Workbench Plugin log Unhandled Exception status NON NLS 1  handleException IStatus IStatus getNamespace WorkbenchPlugin
private void run Early Startup Object executable Extension if executable Extension null executable Extension instanceof I Startup I Startup executable Extension early Startup else I Status status new Status I Status ERROR extension get Namespace 0 startup class must implement org eclipse ui I Startup NON NLS 1 null Workbench Plugin log Bad extension specification status NON NLS 1  runEarlyStartup executableExtension executableExtension executableExtension IStartup IStartup executableExtension earlyStartup IStatus IStatus getNamespace IStartup WorkbenchPlugin
In 3 0 the class attribute is a mandatory element of the startup element However 2 1 plugins should still be able to run if the compatibility bundle is loaded return an executable extension for this startup element or null if an extension or plugin could not be found private Object get Executable Extension I Configuration Element element throws Core Exception String classname element get Attribute I Workbench Constants TAG CLASS if class attribute is absent then try to use the compatibility bundle to return the plugin object if classname null classname length 0 return get Plugin For Compatibility otherwise the 3 0 runtime should be able to do it return Workbench Plugin create Extension element I Workbench Constants TAG CLASS  getExecutableExtension IConfigurationElement CoreException getAttribute IWorkbenchConstants TAG_CLASS getPluginForCompatibility WorkbenchPlugin createExtension IWorkbenchConstants TAG_CLASS
If the compatiblity bundle is loaded then return the plugin object for the extension on this runnable Return null if the compatibility bundle is not loaded or the plugin object cannot be created private Object get Plugin For Compatibility make sure the compatibility bundle is available Bundle compat Bundle Platform get Bundle PI RUNTIME COMPATIBILITY if compat Bundle null return null use reflection to try to access the plugin object try I Plugin Descriptor plugin Desc extension get Declaring Plugin Descriptor Class extension Class compat Bundle load Class EXTENSION CLASS Method get Desc Method extension Class get Declared Method GET DESC METHOD new Class 0 Object plugin Desc get Desc Method invoke extension new Object 0 if plugin Desc null return null Plugin plugin plugin Desc get Plugin Class plugin Desc Class compat Bundle load Class PLUGIN DESC CLASS Method get Plugin Method plugin Desc Class get Declared Method GET PLUGIN METHOD new Class 0 return get Plugin Method invoke plugin Desc new Object 0 catch Class Not Found Exception e handle Exception e catch Illegal Access Exception e handle Exception e catch Invocation Target Exception e handle Exception e catch No Such Method Exception e handle Exception e return null  getPluginForCompatibility compatBundle getBundle PI_RUNTIME_COMPATIBILITY compatBundle IPluginDescriptor pluginDesc getDeclaringPluginDescriptor extensionClass compatBundle loadClass EXTENSION_CLASS getDescMethod extensionClass getDeclaredMethod GET_DESC_METHOD pluginDesc getDescMethod pluginDesc pluginDesc getPlugin pluginDescClass compatBundle loadClass PLUGIN_DESC_CLASS getPluginMethod pluginDescClass getDeclaredMethod GET_PLUGIN_METHOD getPluginMethod pluginDesc ClassNotFoundException handleException IllegalAccessException handleException InvocationTargetException handleException NoSuchMethodException handleException

This default constructor allows the the action to be called from the welcome page public Edit Action Sets Action this PlatformUI get Workbench get Active Workbench Window  EditActionSetsAction getWorkbench getActiveWorkbenchWindow
public Edit Action Sets Action I Workbench Window window super Workbench Messages get String Edit Action Sets Action text NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window set Action Definition Id org eclipse ui window customize Perspective NON NLS 1 issue missing action id set Tool Tip Text Workbench Messages get String Edit Action Sets Action tool Tip NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids EDIT ACTION SETS ACTION  EditActionSetsAction IWorkbenchWindow WorkbenchMessages getString EditActionSetsAction IllegalArgumentException workbenchWindow setActionDefinitionId customizePerspective setToolTipText WorkbenchMessages getString EditActionSetsAction toolTip setEnabled WorkbenchHelp setHelp IHelpContextIds EDIT_ACTION_SETS_ACTION
public void run if workbench Window null action has been disposed return I Workbench Page page workbench Window get Active Page if page null return Workbench Page page edit Action Sets  workbenchWindow IWorkbenchPage workbenchWindow getActivePage WorkbenchPage editActionSets
Method declared on Action Factory I Workbench Action public void dispose workbench Window null  ActionFactory IWorkbenchAction workbenchWindow

private class Overrides implements I Contribution Manager Overrides public Integer get Accelerator I Contribution Item item return null  IContributionManagerOverrides getAccelerator IContributionItem
public String get Accelerator Text I Contribution Item item return null  getAcceleratorText IContributionItem
public Boolean get Enabled I Contribution Item item if item instanceof Action Contribution Item Action Contribution Item item get Action instanceof Retarget Action enabled Allowed return null else return Boolean FALSE  getEnabled IContributionItem ActionContributionItem ActionContributionItem getAction RetargetAction enabledAllowed
public String get Text I Contribution Item item return null  getText IContributionItem
Constructs the Editor Action Bars for an editor public Editor Action Bars I Action Bars2 parent String type super parent this type type  EditorActionBars EditorActionBars IActionBars2
Activate the contributions public void activate boolean force Visibility set Active true force Visibility  forceVisibility setActive forceVisibility
Add one ref to the bars public void add Ref ref Count  addRef refCount
non Javadoc Method declared on Sub Action Bars protected Sub Menu Manager create Sub Menu Manager I Menu Manager parent return new Editor Menu Manager parent  SubActionBars SubMenuManager createSubMenuManager IMenuManager EditorMenuManager
non Javadoc Method declared on Sub Action Bars protected Sub Tool Bar Manager create Sub Tool Bar Manager I Tool Bar Manager parent return null editor actions are managed by Cool Item Tool Bar Managers return null  SubActionBars SubToolBarManager createSubToolBarManager IToolBarManager CoolItemToolBarManagers
Deactivate the contributions public void deactivate boolean force Visibility set Active false force Visibility  forceVisibility setActive forceVisibility
Dispose the contributions public void dispose super dispose if editor Contributor null editor Contributor dispose if extension Contributor null extension Contributor dispose Dispose of the contribution item but also make sure that no one else is holding on to it In this case go through the Sub Cool Bar Manager to its parent the real Cool Bar Manager and replace the reference with a placeholder if tool Bar Contribution Item null Create a placeholder and place it in the cool bar manager I Cool Bar Manager cool Bar Manager get Cool Bar Manager if cool Bar Manager instanceof Sub Contribution Manager Sub Contribution Manager sub Manager Sub Contribution Manager cool Bar Manager I Contribution Manager manager sub Manager get Parent if manager instanceof Contribution Manager final I Contribution Item replacement Item new Placeholder Contribution Item tool Bar Contribution Item boolean succeeded Contribution Manager manager replace Item replacement Item get Id replacement Item if succeeded DEBUG TOOLBAR DISPOSAL System out println FAILURE WHILE DISPOSING Editor Action Bars NON NLS 1 System out println Could not replace replacement Item get Id in the contribution manager NON NLS 1 NON NLS 2 else if DEBUG TOOLBAR DISPOSAL System out println FAILURE WHILE DISPOSING Editor Action Bars NON NLS 1 System out println The manager was not a Contribution Manager NON NLS 1 System out println It was a manager get Class get Name NON NLS 1 else if DEBUG TOOLBAR DISPOSAL System out println FAILURE WHILE DISPOSING Editor Action Bars NON NLS 1 System out println The cool Bar Manager was not a Sub Contribution Manager NON NLS 1 System out println It was a cool Bar Manager get Class get Name NON NLS 1 Dispose of the replaced item tool Bar Contribution Item dispose tool Bar Contribution Item null Remove actions if cool Item Tool Bar Mgr null cool Item Tool Bar Mgr remove All cool Item Tool Bar Mgr null  editorContributor editorContributor extensionContributor extensionContributor SubCoolBarManager CoolBarManager toolBarContributionItem ICoolBarManager coolBarManager getCoolBarManager coolBarManager SubContributionManager SubContributionManager subManager SubContributionManager coolBarManager IContributionManager subManager getParent ContributionManager IContributionItem replacementItem PlaceholderContributionItem toolBarContributionItem ContributionManager replaceItem replacementItem getId replacementItem DEBUG_TOOLBAR_DISPOSAL EditorActionBars replacementItem getId DEBUG_TOOLBAR_DISPOSAL EditorActionBars ContributionManager getClass getName DEBUG_TOOLBAR_DISPOSAL EditorActionBars coolBarManager SubContributionManager coolBarManager getClass getName toolBarContributionItem toolBarContributionItem coolItemToolBarMgr coolItemToolBarMgr removeAll coolItemToolBarMgr
Gets the editor contributor public I Editor Action Bar Contributor get Editor Contributor return editor Contributor  IEditorActionBarContributor getEditorContributor editorContributor
Returns the editor type public String get Editor Type return type  getEditorType
Gets the extension contributor public I Editor Action Bar Contributor get Extension Contributor return extension Contributor  IEditorActionBarContributor getExtensionContributor extensionContributor
Returns the reference count public int get Ref return ref Count  getRef refCount
Returns the tool bar manager If items are added or removed from the manager be sure to call code update Action Bars code Overridden to support Cool Bars return the tool bar manager public I Tool Bar Manager get Tool Bar Manager by pass the sub cool Bar and use the real cool bar I Cool Bar Manager cool Bar Manager get Casted Parent get Cool Bar Manager if cool Bar Manager null return null add the editor group if the app did not add it already otherwise the references to it below will fail if cool Bar Manager find I Workbench Action Constants GROUP EDITOR null cool Bar Manager add new Group Marker I Workbench Action Constants GROUP EDITOR if tool Bar Contribution Item null I Contribution Item found Item cool Bar Manager find type if found Item instanceof Tool Bar Contribution Item tool Bar Contribution Item Tool Bar Contribution Item found Item cool Item Tool Bar Mgr tool Bar Contribution Item get Tool Bar Manager if cool Item Tool Bar Mgr null cool Item Tool Bar Mgr new Tool Bar Manager cool Bar Manager get Style tool Bar Contribution Item new Tool Bar Contribution Item cool Item Tool Bar Mgr type Add editor item to group cool Bar Manager prepend To Group I Workbench Action Constants GROUP EDITOR tool Bar Contribution Item else cool Item Tool Bar Mgr new Tool Bar Manager cool Bar Manager get Style if cool Bar Manager instanceof Contribution Manager found Item instanceof Placeholder Contribution Item Placeholder Contribution Item placeholder Placeholder Contribution Item found Item tool Bar Contribution Item placeholder create Tool Bar Contribution Item Tool Bar Manager cool Item Tool Bar Mgr Restore from a placeholder Contribution Manager cool Bar Manager replace Item type tool Bar Contribution Item else tool Bar Contribution Item new Tool Bar Contribution Item cool Item Tool Bar Mgr type Add editor item to group cool Bar Manager prepend To Group I Workbench Action Constants GROUP EDITOR tool Bar Contribution Item Tool Bar Manager cool Item Tool Bar Mgr set Overrides new Overrides tool Bar Contribution Item set Visible get Active cool Item Tool Bar Mgr mark Dirty return cool Item Tool Bar Mgr  updateActionBars CoolBars IToolBarManager getToolBarManager coolBar ICoolBarManager coolBarManager getCastedParent getCoolBarManager coolBarManager coolBarManager IWorkbenchActionConstants GROUP_EDITOR coolBarManager GroupMarker IWorkbenchActionConstants GROUP_EDITOR toolBarContributionItem IContributionItem foundItem coolBarManager foundItem ToolBarContributionItem toolBarContributionItem ToolBarContributionItem foundItem coolItemToolBarMgr toolBarContributionItem getToolBarManager coolItemToolBarMgr coolItemToolBarMgr ToolBarManager coolBarManager getStyle toolBarContributionItem ToolBarContributionItem coolItemToolBarMgr coolBarManager prependToGroup IWorkbenchActionConstants GROUP_EDITOR toolBarContributionItem coolItemToolBarMgr ToolBarManager coolBarManager getStyle coolBarManager ContributionManager foundItem PlaceholderContributionItem PlaceholderContributionItem PlaceholderContributionItem foundItem toolBarContributionItem createToolBarContributionItem ToolBarManager coolItemToolBarMgr ContributionManager coolBarManager replaceItem toolBarContributionItem toolBarContributionItem ToolBarContributionItem coolItemToolBarMgr coolBarManager prependToGroup IWorkbenchActionConstants GROUP_EDITOR toolBarContributionItem ToolBarManager coolItemToolBarMgr setOverrides toolBarContributionItem setVisible getActive coolItemToolBarMgr markDirty coolItemToolBarMgr
Returns whether the contribution list is visible If the visibility is code true code then each item within the manager appears within the parent manager Otherwise the items are not visible return code true code if the manager is visible private boolean is Visible if tool Bar Contribution Item null return tool Bar Contribution Item is Visible return false  isVisible toolBarContributionItem toolBarContributionItem isVisible
Sets the target part for the action bars For views this is ignored because each view has its own action vector For editors this is important because the action vector is shared by editors of the same type public void part Changed I Workbench Part part super part Changed part if part instanceof I Editor Part I Editor Part editor I Editor Part part if editor Contributor null editor Contributor set Active Editor editor if extension Contributor null extension Contributor set Active Editor editor  partChanged IWorkbenchPart partChanged IEditorPart IEditorPart IEditorPart editorContributor editorContributor setActiveEditor extensionContributor extensionContributor setActiveEditor
Remove one ref to the bars public void remove Ref ref Count  removeRef refCount
Activate Deactivate the contributions Workaround for flashing when editor contributes many menu tool contributions In this case the force visibility flag determines if the contributions should be actually made visible hidden or just change the enablement state private void set Active boolean set boolean force Visibility basic Set Active set if is Sub Menu Manager Created Editor Menu Manager get Menu Manager set Visible set force Visibility if is Sub Status Line Manager Created Sub Status Line Manager get Status Line Manager set Visible set set Visible set force Visibility  setActive forceVisibility basicSetActive isSubMenuManagerCreated EditorMenuManager getMenuManager setVisible forceVisibility isSubStatusLineManagerCreated SubStatusLineManager getStatusLineManager setVisible setVisible forceVisibility
Sets the editor contributor public void set Editor Contributor I Editor Action Bar Contributor c editor Contributor c  setEditorContributor IEditorActionBarContributor editorContributor
Sets the enablement ability of all the items contributed by the editor param enabled Allowed code true code if the items may enable since 2 0 private void set Enabled Allowed boolean enabled Allowed if this enabled Allowed enabled Allowed return this enabled Allowed enabled Allowed if cool Item Tool Bar Mgr null I Contribution Item items cool Item Tool Bar Mgr get Items for int i 0 i items length i I Contribution Item item items i item update I Contribution Manager Overrides P ENABLED  enabledAllowed setEnabledAllowed enabledAllowed enabledAllowed enabledAllowed enabledAllowed enabledAllowed coolItemToolBarMgr IContributionItem coolItemToolBarMgr getItems IContributionItem IContributionManagerOverrides P_ENABLED
Sets the extension contributor public void set Extension Contributor I Editor Action Bar Contributor c extension Contributor c  setExtensionContributor IEditorActionBarContributor extensionContributor
Sets the visibility of the manager If the visibility is code true code then each item within the manager appears within the parent manager Otherwise the items are not visible param visible the new visibility private void set Visible boolean visible if tool Bar Contribution Item null tool Bar Contribution Item set Visible visible if tool Bar Contribution Item get Parent null tool Bar Contribution Item get Parent mark Dirty  setVisible toolBarContributionItem toolBarContributionItem setVisible toolBarContributionItem getParent toolBarContributionItem getParent markDirty
Sets the visibility of the manager If the visibility is code true code then each item within the manager appears within the parent manager Otherwise the items are not visible if force visibility is code true code or grayed out if force visibility is code false code p This is a workaround for the layout flashing when editors contribute large amounts of items p param visible the new visibility param force Visibility code true code to change the visibility or code false code to change just the enablement state This parameter is ignored if visible is code true code private void set Visible boolean visible boolean force Visibility if visible set Enabled Allowed true if is Visible set Visible true else if force Visibility Remove the editor tool bar items set Visible false else Disabled the tool bar items set Enabled Allowed false I Cool Bar Manager cool Bar Manager get Casted Parent get Cool Bar Manager if cool Item Tool Bar Mgr null cool Bar Manager null I Contribution Item items cool Item Tool Bar Mgr get Items for int i 0 i items length i I Contribution Item item items i item set Visible visible force Visibility cool Item Tool Bar Mgr mark Dirty if cool Bar Manager is Dirty cool Bar Manager mark Dirty Update the manager cool Item Tool Bar Mgr update false if tool Bar Contribution Item null tool Bar Contribution Item set Visible visible force Visibility cool Bar Manager update false  forceVisibility setVisible forceVisibility setEnabledAllowed isVisible setVisible forceVisibility setVisible setEnabledAllowed ICoolBarManager coolBarManager getCastedParent getCoolBarManager coolItemToolBarMgr coolBarManager IContributionItem coolItemToolBarMgr getItems IContributionItem setVisible forceVisibility coolItemToolBarMgr markDirty coolBarManager isDirty coolBarManager markDirty coolItemToolBarMgr toolBarContributionItem toolBarContributionItem setVisible forceVisibility coolBarManager

The constructor public Editor Action Builder  EditorActionBuilder
Method declared on Plugin Action Builder protected Action Descriptor create Action Descriptor I Configuration Element element return new Action Descriptor element Action Descriptor T EDITOR  PluginActionBuilder ActionDescriptor createActionDescriptor IConfigurationElement ActionDescriptor ActionDescriptor T_EDITOR
Method declared on Plugin Action Builder protected Basic Contribution create Contribution return new Editor Contribution  PluginActionBuilder BasicContribution createContribution EditorContribution
Reads and apply all external contributions for this editor s ID registered in editor Actions extension point public I Editor Action Bar Contributor read Action Extensions I Editor Descriptor desc I Action Bars bars External Contributor ext null read Contributions desc get Id TAG CONTRIBUTION TYPE I Workbench Constants PL EDITOR ACTIONS if cache null ext new External Contributor cache cache null return ext  editorActions IEditorActionBarContributor readActionExtensions IEditorDescriptor IActionBars ExternalContributor readContributions getId TAG_CONTRIBUTION_TYPE IWorkbenchConstants PL_EDITOR_ACTIONS ExternalContributor
private static class Editor Contribution extends Basic Contribution public void dispose if actions null for int i 0 i actions size i Plugin Action proxy Action Descriptor actions get i get Action if proxy get Delegate instanceof I Action Delegate2 I Action Delegate2 proxy get Delegate dispose  EditorContribution BasicContribution PluginAction ActionDescriptor getAction getDelegate IActionDelegate2 IActionDelegate2 getDelegate
public void editor Changed I Editor Part editor if actions null for int i 0 i actions size i Action Descriptor ad Action Descriptor actions get i Editor Plugin Action action Editor Plugin Action ad get Action action editor Changed editor  editorChanged IEditorPart ActionDescriptor ActionDescriptor EditorPluginAction EditorPluginAction getAction editorChanged
private Array List cache public External Contributor Array List cache this cache cache  ArrayList ExternalContributor ArrayList
public void dispose for int i 0 i cache size i Editor Contribution cache get i dispose  EditorContribution
public Action Descriptor get Extended Actions Array List results new Array List for int i 0 i cache size i Editor Contribution ec Editor Contribution cache get i if ec actions null results add All ec actions return Action Descriptor results to Array new Action Descriptor results size  ActionDescriptor getExtendedActions ArrayList ArrayList EditorContribution EditorContribution addAll ActionDescriptor toArray ActionDescriptor
public void init I Action Bars bars I Workbench Page page for int i 0 i cache size i Editor Contribution cache get i contribute bars get Menu Manager false bars get Tool Bar Manager true  IActionBars IWorkbenchPage EditorContribution getMenuManager getToolBarManager
public void set Active Editor I Editor Part editor for int i 0 i cache size i Editor Contribution cache get i editor Changed editor  setActiveEditor IEditorPart EditorContribution editorChanged

I Handler open Editor Drop Down Handler new Abstract Handler public Object execute Map parameter Values By Name throws Execution Exception display Editor List return null  IHandler openEditorDropDownHandler AbstractHandler parameterValuesByName ExecutionException displayEditorList
private Handler Submission open Editor Drop Down Handler Submission Creates a new Editor Area Helper public Editor Area Helper Workbench Page page this page page this editor Area new Editor Sash Container I Page Layout ID EDITOR AREA page this editor Area create Control page get Client Composite final Shell shell page get Workbench Window get Shell I Handler open Editor Drop Down Handler new Abstract Handler public Object execute Map parameter Values By Name throws Execution Exception display Editor List return null open Editor Drop Down Handler Submission new Handler Submission null shell null org eclipse ui window open Editor Drop Down NON NLS 1 open Editor Drop Down Handler Priority MEDIUM PlatformUI get Workbench get Command Support add Handler Submission open Editor Drop Down Handler Submission  HandlerSubmission openEditorDropDownHandlerSubmission EditorAreaHelper EditorAreaHelper WorkbenchPage editorArea EditorSashContainer IPageLayout ID_EDITOR_AREA editorArea createControl getClientComposite getWorkbenchWindow getShell IHandler openEditorDropDownHandler AbstractHandler parameterValuesByName ExecutionException displayEditorList openEditorDropDownHandlerSubmission HandlerSubmission openEditorDropDown openEditorDropDownHandler getWorkbench getCommandSupport addHandlerSubmission openEditorDropDownHandlerSubmission
Displays a list of open editors public void display Editor List Editor Stack active Workbook editor Area get Active Workbook if active Workbook null active Workbook show Part List  displayEditorList EditorStack activeWorkbook editorArea getActiveWorkbook activeWorkbook activeWorkbook showPartList
Closes all of the editors public void close All Editors editor Area remove All Editors Array List editors To Dispose Array List editor Table clone editor Table clear for int i 0 i editors To Dispose size i Editor Pane editors To Dispose get i dispose  closeAllEditors editorArea removeAllEditors ArrayList editorsToDispose ArrayList editorTable editorTable editorsToDispose EditorPane editorsToDispose
Closes an editor param part the editor to close public void close Editor I Editor Reference ref Editor Pane pane Editor Pane Workbench Part Reference ref get Pane close Editor pane  closeEditor IEditorReference EditorPane EditorPane WorkbenchPartReference getPane closeEditor
Closes an editor param part the editor to close public void close Editor I Editor Part part Editor Pane pane Editor Pane Part Site part get Editor Site get Pane close Editor pane  closeEditor IEditorPart EditorPane EditorPane PartSite getEditorSite getPane closeEditor
Closes an editor param part the editor to close private void close Editor Editor Pane pane if pane null if pane instanceof Multi Editor Inner Pane editor Area remove Editor pane editor Table remove pane pane dispose  closeEditor EditorPane MultiEditorInnerPane editorArea removeEditor editorTable
Deref a given part Deconstruct its container as required Do not remove drag listeners public static void deref Part Layout Part part Get vital part stats before reparenting I Layout Container old Container part get Container Reparent the part back to the main window part reparent editor Area get Parent Update container if old Container null return old Container remove part Layout Part children old Container get Children if children null children length 0 There are no more children in this container so get rid of it if old Container instanceof Layout Part Layout Part parent Layout Part old Container I Layout Container parent Container parent get Container if parent Container null parent Container remove parent parent dispose  derefPart LayoutPart ILayoutContainer oldContainer getContainer editorArea getParent oldContainer oldContainer LayoutPart oldContainer getChildren oldContainer LayoutPart LayoutPart LayoutPart oldContainer ILayoutContainer parentContainer getContainer parentContainer parentContainer
Dispose of the editor presentation public void dispose PlatformUI get Workbench get Command Support remove Handler Submission open Editor Drop Down Handler Submission if editor Area null editor Area dispose  getWorkbench getCommandSupport removeHandlerSubmission openEditorDropDownHandlerSubmission editorArea editorArea
see I Editor Presentation public String get Active Editor WorkbookID return editor Area get Active WorkbookID  IEditorPresentation getActiveEditorWorkbookID editorArea getActiveWorkbookID
Returns an array of the open editors return an array of open editors public I Editor Reference get Editors int n Size editor Table size I Editor Reference ret Array new I Editor Reference n Size for int i 0 i ret Array length i ret Array i Editor Pane editor Table get i get Editor Reference return ret Array  IEditorReference getEditors nSize editorTable IEditorReference retArray IEditorReference nSize retArray retArray EditorPane editorTable getEditorReference retArray
Returns the editor area public Layout Part get Layout Part return editor Area  LayoutPart getLayoutPart editorArea
Returns the active editor in this perspective If the editors appear in a workbook this will be the visible editor If the editors are scattered around the workbench this will be the most recent editor to hold focus return the active editor or code null code if no editor is active public I Editor Reference get Visible Editor Editor Stack active Workbook editor Area get Active Workbook Editor Pane pane active Workbook get Visible Editor if pane null I Editor Reference result pane get Editor Reference I Editor Part editor Part I Editor Part result get Part false if editor Part null editor Part instanceof Multi Editor editor Part Multi Editor editor Part get Active Editor Editor Site site Editor Site editor Part get Site result I Editor Reference site get Pane get Part Reference return result return null  IEditorReference getVisibleEditor EditorStack activeWorkbook editorArea getActiveWorkbook EditorPane activeWorkbook getVisibleEditor IEditorReference getEditorReference IEditorPart editorPart IEditorPart getPart editorPart editorPart MultiEditor editorPart MultiEditor editorPart getActiveEditor EditorSite EditorSite editorPart getSite IEditorReference getPane getPartReference
The active editor has failed to be restored Find another editor restore it and make it visible public void fix Visible Editor Editor Stack active Workbook editor Area get Active Workbook Editor Pane pane active Workbook get Visible Editor if pane null Layout Part editors active Workbook get Children if editors length 0 pane Editor Pane editors 0 if pane null I Editor Reference result pane get Editor Reference I Editor Part editor Part I Editor Part result get Part true if editor Part null active Workbook set Visible Editor pane  fixVisibleEditor EditorStack activeWorkbook editorArea getActiveWorkbook EditorPane activeWorkbook getVisibleEditor LayoutPart activeWorkbook getChildren EditorPane IEditorReference getEditorReference IEditorPart editorPart IEditorPart getPart editorPart activeWorkbook setVisibleEditor
public void move Editor I Editor Part part int position Editor Pane pane Editor Pane Editor Site part get Site get Pane TODO commented this out during presentations works pane get Workbook reorder Tab pane position  moveEditor IEditorPart EditorPane EditorPane EditorSite getSite getPane getWorkbook reorderTab
Opens an editor within the presentation but does not give it focus p param part the editor public void open Editor I Editor Reference ref I Editor Reference inner Editors boolean set Visible Editor Pane pane new Multi Editor Outer Pane ref page editor Area get Active Workbook init Pane pane ref for int i 0 i inner Editors length i Editor Pane inner Pane new Multi Editor Inner Pane pane inner Editors i page editor Area get Active Workbook init Pane inner Pane inner Editors i Show the editor editor Area add Editor pane if set Visible set Visible Editor ref false  openEditor IEditorReference IEditorReference innerEditors setVisible EditorPane MultiEditorOuterPane editorArea getActiveWorkbook initPane innerEditors EditorPane innerPane MultiEditorInnerPane innerEditors editorArea getActiveWorkbook initPane innerPane innerEditors editorArea addEditor setVisible setVisibleEditor
Opens an editor within the presentation but does not give it focus p param part the editor public void open Editor I Editor Reference ref boolean set Visible Editor Pane pane new Editor Pane ref page editor Area get Active Workbook init Pane pane ref Show the editor editor Area add Editor pane if set Visible set Visible Editor ref false  openEditor IEditorReference setVisible EditorPane EditorPane editorArea getActiveWorkbook initPane editorArea addEditor setVisible setVisibleEditor
private Editor Pane init Pane Editor Pane pane I Editor Reference ref Workbench Part Reference ref set Pane pane Record the new editor editor Table add pane return pane  EditorPane initPane EditorPane IEditorReference WorkbenchPartReference setPane editorTable
see I Persistable Part public I Status restore State I Memento memento Restore the editor area workbooks layout relationship return editor Area restore State memento  IPersistablePart IStatus restoreState IMemento editorArea restoreState
Restore the presentation param area Mem return public I Status restore Presentation State I Memento area Mem return editor Area restore Presentation State area Mem  areaMem IStatus restorePresentationState IMemento areaMem editorArea restorePresentationState areaMem
see I Persistable Part public I Status save State I Memento memento Save the editor area workbooks layout relationship return editor Area save State memento  IPersistablePart IStatus saveState IMemento editorArea saveState
see I Editor Presentation public void set Active Editor Workbook FromID String id editor Area set Active Workbook FromID id  IEditorPresentation setActiveEditorWorkbookFromID editorArea setActiveWorkbookFromID
Makes sure the visible editor s tab is visible public void show Visible Editor Editor Stack active Workbook editor Area get Active Workbook if active Workbook null active Workbook show Visible Editor  showVisibleEditor EditorStack activeWorkbook editorArea getActiveWorkbook activeWorkbook activeWorkbook showVisibleEditor
Brings an editor to the front and optionally gives it focus param part the editor to make visible param set Focus whether to give the editor focus return true if the visible editor was changed false if not public boolean set Visible Editor I Editor Reference ref boolean set Focus I Editor Reference visible Editor get Visible Editor if ref visible Editor I Editor Part part I Editor Part ref get Part true Editor Pane pane null if part null pane Editor Pane Part Site part get Editor Site get Pane if pane null if pane instanceof Multi Editor Inner Pane Editor Pane parent Pane Multi Editor Inner Pane pane get Parent Pane Editor Stack active Workbook parent Pane get Workbook Editor Pane active Pane active Workbook get Visible Editor if active Pane parent Pane parent Pane get Workbook set Visible Editor parent Pane else return false else pane get Workbook set Visible Editor pane if set Focus part set Focus return true return false  setFocus setVisibleEditor IEditorReference setFocus IEditorReference visibleEditor getVisibleEditor visibleEditor IEditorPart IEditorPart getPart EditorPane EditorPane PartSite getEditorSite getPane MultiEditorInnerPane EditorPane parentPane MultiEditorInnerPane getParentPane EditorStack activeWorkbook parentPane getWorkbook EditorPane activePane activeWorkbook getVisibleEditor activePane parentPane parentPane getWorkbook setVisibleEditor parentPane getWorkbook setVisibleEditor setFocus setFocus
Method get Workbooks return Array List public Array List get Workbooks return editor Area get Editor Workbooks  getWorkbooks ArrayList ArrayList getWorkbooks editorArea getEditorWorkbooks

Constructs a new history public Editor History super  EditorHistory
Adds an item to the history Added in fifo fashion public void add I Editor Input input I Editor Descriptor desc add new Editor History Item input desc 0  IEditorInput IEditorDescriptor EditorHistoryItem
Adds an item to the history private void add Editor History Item new Item int index Remove the item if it already exists so that it will be put at the top of the list if new Item is Restored remove new Item get Input Remove the oldest one if fifo List size MAX SIZE fifo List remove MAX SIZE 1 Add the new item fifo List add index MAX SIZE index MAX SIZE 1 new Item  EditorHistoryItem newItem newItem isRestored newItem getInput fifoList MAX_SIZE fifoList MAX_SIZE fifoList MAX_SIZE MAX_SIZE newItem
Returns an array of editor history items The items are returned in order of most recent first public Editor History Item get Items refresh Editor History Item array new Editor History Item fifo List size fifo List to Array array return array  EditorHistoryItem getItems EditorHistoryItem EditorHistoryItem fifoList fifoList toArray
Refresh the editor list Any stale items are removed Only restored items are considered public void refresh Iterator iter fifo List iterator while iter has Next Editor History Item item Editor History Item iter next if item is Restored I Editor Input input item get Input if input null input exists iter remove  fifoList hasNext EditorHistoryItem EditorHistoryItem isRestored IEditorInput getInput
Removes the given history item public void remove Editor History Item item fifo List remove item  EditorHistoryItem fifoList
Removes all traces of an editor input from the history public void remove I Editor Input input if input null return Iterator iter fifo List iterator while iter has Next Editor History Item item Editor History Item iter next if item matches input iter remove  IEditorInput fifoList hasNext EditorHistoryItem EditorHistoryItem
Restore the most recently used history from the given memento param memento the memento to restore the mru history from public I Status restore State I Memento memento I Memento mementos memento get Children I Workbench Constants TAG FILE for int i 0 i mementos length i Editor History Item item new Editor History Item mementos i if equals item get Name equals item get Tool Tip Text NON NLS 1 NON NLS 2 add item fifo List size return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1  IStatus restoreState IMemento IMemento getChildren IWorkbenchConstants TAG_FILE EditorHistoryItem EditorHistoryItem getName getToolTipText fifoList IStatus PLUGIN_ID
Save the most recently used history in the given memento param memento the memento to save the mru history in public I Status save State I Memento memento Iterator iterator fifo List iterator while iterator has Next Editor History Item item Editor History Item iterator next if item can Save I Memento item Memento memento create Child I Workbench Constants TAG FILE item save State item Memento return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1  IStatus saveState IMemento fifoList hasNext EditorHistoryItem EditorHistoryItem canSave IMemento itemMemento createChild IWorkbenchConstants TAG_FILE saveState itemMemento IStatus PLUGIN_ID

Constructs a new item public Editor History Item I Editor Input input I Editor Descriptor descriptor this input input this descriptor descriptor  EditorHistoryItem IEditorInput IEditorDescriptor
Constructs a new item from a memento public Editor History Item I Memento memento this memento memento  EditorHistoryItem IMemento
Returns the editor descriptor return the editor descriptor public I Editor Descriptor get Descriptor return descriptor  IEditorDescriptor getDescriptor
Returns the editor input return the editor input public I Editor Input get Input return input  IEditorInput getInput
Returns whether this item has been restored from the memento public boolean is Restored return memento null  isRestored
Returns the name of this item either from the input if restored otherwise from the memento public String get Name if is Restored get Input null return get Input get Name else if memento null String name memento get String I Workbench Constants TAG NAME if name null return name return NON NLS 1  getName isRestored getInput getInput getName getString IWorkbenchConstants TAG_NAME
Returns the tooltip text of this item either from the input if restored otherwise from the memento public String get Tool Tip Text if is Restored get Input null return get Input get Tool Tip Text else if memento null String name memento get String I Workbench Constants TAG TOOLTIP if name null return name return NON NLS 1  getToolTipText isRestored getInput getInput getToolTipText getString IWorkbenchConstants TAG_TOOLTIP
Returns whether this item matches the given editor input public boolean matches I Editor Input input if is Restored return input equals get Input if not restored compare name tool tip text and factory id avoiding as much work as possible if get Name equals input get Name return false if get Tool Tip Text equals input get Tool Tip Text return false I Persistable Element persistable input get Persistable String input Id persistable null null persistable get Factory Id String my Id get Factory Id return my Id null input Id null my Id equals input Id  IEditorInput isRestored getInput getName getName getToolTipText getToolTipText IPersistableElement getPersistable inputId getFactoryId myId getFactoryId myId inputId myId inputId
Returns the factory id of this item either from the input if restored otherwise from the memento Returns code null code if there is no factory id public String get Factory Id if is Restored if input null I Persistable Element persistable input get Persistable if persistable null return persistable get Factory Id else if memento null return memento get String I Workbench Constants TAG FACTORY ID return null  getFactoryId isRestored IPersistableElement getPersistable getFactoryId getString IWorkbenchConstants TAG_FACTORY_ID
Restores the object state from the memento public I Status restore State Assert is True is Restored Status result new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1 I Memento memento this memento this memento null String factory Id memento get String I Workbench Constants TAG FACTORY ID if factory Id null Workbench Plugin log Unable to restore mru list no input factory ID NON NLS 1 return result I Element Factory factory PlatformUI get Workbench get Element Factory factory Id if factory null return result I Memento persistable Memento memento get Child I Workbench Constants TAG PERSISTABLE if persistable Memento null Workbench Plugin log Unable to restore mru list no input element state factory Id NON NLS 1 return result I Adaptable adaptable factory create Element persistable Memento if adaptable null adaptable instanceof I Editor Input false return result input I Editor Input adaptable Get the editor descriptor String editor Id memento get String I Workbench Constants TAG ID if editor Id null I Editor Registry registry Workbench Plugin get Default get Editor Registry descriptor registry find Editor editor Id return result  IStatus restoreState isTrue isRestored IStatus PLUGIN_ID IMemento factoryId getString IWorkbenchConstants TAG_FACTORY_ID factoryId WorkbenchPlugin IElementFactory getWorkbench getElementFactory factoryId IMemento persistableMemento getChild IWorkbenchConstants TAG_PERSISTABLE persistableMemento WorkbenchPlugin factoryId IAdaptable createElement persistableMemento IEditorInput IEditorInput editorId getString IWorkbenchConstants TAG_ID editorId IEditorRegistry WorkbenchPlugin getDefault getEditorRegistry findEditor editorId
Returns whether this history item can be saved public boolean can Save return is Restored get Input null get Input get Persistable null  canSave isRestored getInput getInput getPersistable
Saves the object state in the given memento param memento the memento to save the object state in public I Status save State I Memento memento if is Restored memento put Memento this memento else if input null I Persistable Element persistable input get Persistable if persistable null Store I Persistable of the I Editor Input in a separate section since it could potentially use a tag already used in the parent memento and thus overwrite data I Memento persistable Memento memento create Child I Workbench Constants TAG PERSISTABLE persistable save State persistable Memento memento put String I Workbench Constants TAG FACTORY ID persistable get Factory Id if descriptor null descriptor get Id null memento put String I Workbench Constants TAG ID descriptor get Id save the name and tooltip separately so they can be restored without having to instantiate the input which can activate plugins memento put String I Workbench Constants TAG NAME input get Name memento put String I Workbench Constants TAG TOOLTIP input get Tool Tip Text return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1  IStatus saveState IMemento isRestored putMemento IPersistableElement getPersistable IPersistable IEditorInput IMemento persistableMemento createChild IWorkbenchConstants TAG_PERSISTABLE saveState persistableMemento putString IWorkbenchConstants TAG_FACTORY_ID getFactoryId getId putString IWorkbenchConstants TAG_ID getId putString IWorkbenchConstants TAG_NAME getName putString IWorkbenchConstants TAG_TOOLTIP getToolTipText IStatus PLUGIN_ID

private I Property Listener property Listener new I Property Listener public void property Changed Object source int property if property I Editor Part PROP DIRTY property I Workbench Part PROP TITLE if source instanceof I Editor Part Editor Site site Editor Site I Editor Part source get Editor Site I Editor Reference ref I Editor Reference site get Pane get Part Reference Table Item items editors Table get Items for int i 0 i items length i Adapter editor Adapter items i get Data editor List Data if editor editor Ref ref update Item items i editor  IPropertyListener propertyListener IPropertyListener propertyChanged IEditorPart PROP_DIRTY IWorkbenchPart PROP_TITLE IEditorPart EditorSite EditorSite IEditorPart getEditorSite IEditorReference IEditorReference getPane getPartReference TableItem editorsTable getItems getData editorListData editorRef updateItem
display timer Exec TIMER INTERVAL new Runnable public void run counter When closing the workbench the delay may allow the editor Table to dispose prior to running if counter 0 editors Table null update Items notify Editor List Views  timerExec TIMER_INTERVAL editorTable editorsTable updateItems notifyEditorListViews
int counter 0 private void update Editor List I Workbench Part Reference ref if ref instanceof I Editor Reference final Display display window get Shell get Display final int TIMER INTERVAL 100 counter display timer Exec TIMER INTERVAL new Runnable public void run counter When closing the workbench the delay may allow the editor Table to dispose prior to running if counter 0 editors Table null update Items notify Editor List Views  updateEditorList IWorkbenchPartReference IEditorReference getShell getDisplay TIMER_INTERVAL timerExec TIMER_INTERVAL editorTable editorsTable updateItems notifyEditorListViews
select in navigator public void part Brought To Top I Workbench Part Reference ref update Editor List ref  partBroughtToTop IWorkbenchPartReference updateEditorList
select tabs open editor public void part Activated I Workbench Part Reference ref update Editor List ref  partActivated IWorkbenchPartReference updateEditorList
close All public void part Closed I Workbench Part Reference ref update Editor List ref  closeAll partClosed IWorkbenchPartReference updateEditorList
delete public void part Deactivated I Workbench Part Reference ref update Editor List ref  partDeactivated IWorkbenchPartReference updateEditorList
update Editor List ref public void part Opened I Workbench Part Reference ref  updateEditorList partOpened IWorkbenchPartReference
public void part Opened I Workbench Part Reference ref public void part Hidden I Workbench Part Reference ref  partOpened IWorkbenchPartReference partHidden IWorkbenchPartReference
public void part Hidden I Workbench Part Reference ref public void part Visible I Workbench Part Reference ref  partHidden IWorkbenchPartReference partVisible IWorkbenchPartReference
public void part Visible I Workbench Part Reference ref public void part Input Changed I Workbench Part Reference ref  partVisible IWorkbenchPartReference partInputChanged IWorkbenchPartReference
public Editor List I Workbench Window window Editor Stack workbook this window Workbench Window window this workbook workbook list Scope Workbench Plugin get Default get Preference Store get Int I Preference Constants EDITORLIST SELECTION SCOPE sort Order Workbench Plugin get Default get Preference Store get Int I Preference Constants EDITORLIST SORT CRITERIA display Full Path Workbench Plugin get Default get Preference Store get Boolean I Preference Constants EDITORLIST DISPLAY FULL NAME Special handling for scope selection The concept of tab groups does not make sense in this situation so over ride to page scope uses drop Down for this in addition drop down used to indicate if the editor List must also close the viewform etc drop Down workbook null if drop Down Views need to listen for part activation deactivation window get Part Service add Part Listener part Listener When selection Scope list Scope is changed or display Full Path is changed there is no notification to the editor List views that this happened i e if it happens from a different window or from the pull Down Keep track of the views and update them appropriately editor List Views add this save Action new Save Action close Action new Close Action select Clean Action new Selection Action SELECT CLEAN Invert Selection Action new Selection Action INVERT SELECTION select All Action new Selection Action SELECT ALL full Name Action new Full Name Action name Sort Action new Sort Action NAME SORT MRU Sort Action new Sort Action MRU SORT window Scope Action new Set Scope Action SET WINDOW SCOPE page Scope Action new Set Scope Action SET PAGE SCOPE tab Group Scope Action new Set Scope Action SET TAB GROUP SCOPE  EditorList IWorkbenchWindow EditorStack WorkbenchWindow listScope WorkbenchPlugin getDefault getPreferenceStore getInt IPreferenceConstants EDITORLIST_SELECTION_SCOPE sortOrder WorkbenchPlugin getDefault getPreferenceStore getInt IPreferenceConstants EDITORLIST_SORT_CRITERIA displayFullPath WorkbenchPlugin getDefault getPreferenceStore getBoolean IPreferenceConstants EDITORLIST_DISPLAY_FULL_NAME dropDown editorList dropDown dropDown getPartService addPartListener partListener selectionScope listScope displayFullPath editorList pullDown editorListViews saveAction SaveAction closeAction CloseAction selectCleanAction SelectionAction SELECT_CLEAN InvertSelectionAction SelectionAction INVERT_SELECTION selectAllAction SelectionAction SELECT_ALL fullNameAction FullNameAction nameSortAction SortAction NAME_SORT MRUSortAction SortAction MRU_SORT windowScopeAction SetScopeAction SET_WINDOW_SCOPE pageScopeAction SetScopeAction SET_PAGE_SCOPE tabGroupScopeAction SetScopeAction SET_TAB_GROUP_SCOPE
menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager set Checked Menu Items Editor List this fill Context Menu manager  menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager setCheckedMenuItems EditorList fillContextMenu
editors Table add Key Listener new Key Listener public void key Pressed Key Event e if e character SWT ESC destroy Control if e character e character SWT CR handle Selection Event true  editorsTable addKeyListener KeyListener keyPressed KeyEvent destroyControl handleSelectionEvent
handle Selection Event true public void key Released Key Event e  handleSelectionEvent keyReleased KeyEvent
editors Table add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e if e state Mask SWT CTRL 0 e state Mask SWT SHIFT 0 return if e button 3 handle Selection Event true  editorsTable addMouseListener MouseAdapter mouseDown MouseEvent stateMask stateMask handleSelectionEvent
Create the Editor List table and menu items public Control create Control Composite parent editors Table new Table parent SWT MULTI SWT V SCROLL SWT H SCROLL update Items editors Table pack editors Table set Focus Create the context menu Menu Manager menu Mgr new Menu Manager Pop Up NON NLS 1 menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager set Checked Menu Items Editor List this fill Context Menu manager editors Table set Menu menu Mgr create Context Menu editors Table editors Table add Key Listener new Key Listener public void key Pressed Key Event e if e character SWT ESC destroy Control if e character e character SWT CR handle Selection Event true public void key Released Key Event e editors Table add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e if e state Mask SWT CTRL 0 e state Mask SWT SHIFT 0 return if e button 3 handle Selection Event true return editors Table  EditorList createControl editorsTable V_SCROLL H_SCROLL updateItems editorsTable editorsTable setFocus MenuManager menuMgr MenuManager PopUp menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager setCheckedMenuItems EditorList fillContextMenu editorsTable setMenu menuMgr createContextMenu editorsTable editorsTable addKeyListener KeyListener keyPressed KeyEvent destroyControl handleSelectionEvent keyReleased KeyEvent editorsTable addMouseListener MouseAdapter mouseDown MouseEvent stateMask stateMask handleSelectionEvent editorsTable
public void dispose editors Table null editor List Views remove this remove the listeners elements new Array List get All Editors elements for Iterator iterator elements iterator iterator has Next Adapter e Adapter iterator next e editor Ref remove Property Listener property Listener window get Part Service remove Part Listener part Listener  editorsTable editorListViews ArrayList getAllEditors hasNext editorRef removePropertyListener propertyListener getPartService removePartListener partListener
public void destroy Control if drop Down editors Table null Composite parent editors Table get Parent parent dispose dispose  destroyControl dropDown editorsTable editorsTable getParent
public Control get Control return editors Table  getControl editorsTable
public int get Item Count return editors Table get Item Count  getItemCount editorsTable getItemCount
private void notify Editor List Views for Iterator iterator editor List Views iterator iterator has Next Editor List editor List Editor List iterator next if editor List this editor List update Items  notifyEditorListViews editorListViews hasNext EditorList editorList EditorList editorList editorList updateItems
private void handle Selection Event boolean mouse Event Table Item selection editors Table get Selection if selection length 0 boolean enable Save Action false for int i 0 i selection length i Adapter editor Adapter selection i get Data editor List Data if editor is Dirty enable Save Action true break save Action set Enabled enable Save Action close Action set Enabled true else save Action set Enabled false close Action set Enabled false if selection length 1 mouse Event Adapter a Adapter selection 0 get Data editor List Data destroy Control a activate drop Down notify Editor List Views  handleSelectionEvent mouseEvent TableItem editorsTable getSelection enableSaveAction getData editorListData isDirty enableSaveAction saveAction setEnabled enableSaveAction closeAction setEnabled saveAction setEnabled closeAction setEnabled mouseEvent getData editorListData destroyControl dropDown notifyEditorListViews
private void set Checked Menu Items full Name Action set Checked display Full Path name Sort Action set Checked Editor List sort Order NAME SORT MRU Sort Action set Checked Editor List sort Order MRU SORT window Scope Action set Checked Editor List list Scope SET WINDOW SCOPE page Scope Action set Checked Editor List list Scope SET PAGE SCOPE if drop Down tab Group Scope Action set Checked Editor List list Scope SET TAB GROUP SCOPE else tab Group Scope Action set Enabled false if list Scope SET TAB GROUP SCOPE page Scope Action set Checked true  setCheckedMenuItems fullNameAction setChecked displayFullPath nameSortAction setChecked EditorList sortOrder NAME_SORT MRUSortAction setChecked EditorList sortOrder MRU_SORT windowScopeAction setChecked EditorList listScope SET_WINDOW_SCOPE pageScopeAction setChecked EditorList listScope SET_PAGE_SCOPE dropDown tabGroupScopeAction setChecked EditorList listScope SET_TAB_GROUP_SCOPE tabGroupScopeAction setEnabled listScope SET_TAB_GROUP_SCOPE pageScopeAction setChecked
Updates the specified item private void update Item Table Item item Adapter editor int index full Name Action is Checked 1 0 item set Data editor List Data editor item set Text editor get Display Text index Image image editor get Image if image null item set Image image if drop Down editor editor Ref add Property Listener property Listener  updateItem TableItem fullNameAction isChecked setData editorListData setText getDisplayText getImage setImage dropDown editorRef addPropertyListener propertyListener
Sorts the editors private void sort switch sort Order case NAME SORT Adapter a new Adapter elements size elements to Array a Arrays sort a elements Arrays as List a break case MRU SORT The elements are already in MRU order TODO Not in MRU if multiple windows open Within each window group they are in order but not overall break default break  sortOrder NAME_SORT toArray asList MRU_SORT
Adds all editors to elements private void update Editors I Workbench Page pages for int j 0 j pages length j I Editor Reference editors Workbench Page pages j get Sorted Editors for int k editors length 1 k 0 k elements add new Adapter editors k  updateEditors IWorkbenchPage IEditorReference WorkbenchPage getSortedEditors
private void get All Editors List elements if window Scope Action is Checked I Workbench Window windows window get Workbench get Workbench Windows for int i 0 i windows length i update Editors windows i get Pages TODO when multiple windows open loose files from one of the windows When the view is being restored the active window is not included in the collection Handle this case get editors from active page if drop Down elements size 0 I Workbench Page page window get Active Page if page null update Editors new I Workbench Page page else I Workbench Page page window get Active Page if page null if page Scope Action is Checked update Editors new I Workbench Page page else Editor Pane editors workbook get Editors for int j 0 j editors length j elements add new Adapter editors j get Editor Reference  getAllEditors windowScopeAction isChecked IWorkbenchWindow getWorkbench getWorkbenchWindows updateEditors getPages dropDown IWorkbenchPage getActivePage updateEditors IWorkbenchPage IWorkbenchPage getActivePage pageScopeAction isChecked updateEditors IWorkbenchPage EditorPane getEditors getEditorReference
Updates all items in the table private void update Items set Checked Menu Items editors Table remove All elements new Array List get All Editors elements sort Object selection null if window get Active Page null selection window get Active Page get Active Editor for Iterator iterator elements iterator iterator has Next Adapter e Adapter iterator next Table Item item new Table Item editors Table SWT NULL update Item item e if selection null selection e editor Ref get Part false editors Table set Selection new Table Item item save Action set Enabled e is Dirty  updateItems setCheckedMenuItems editorsTable removeAll ArrayList getAllEditors getActivePage getActivePage getActiveEditor hasNext TableItem TableItem editorsTable updateItem editorRef getPart editorsTable setSelection TableItem saveAction setEnabled isDirty
private void fill Context Menu I Menu Manager menu Mgr Sort By Sub Menu Menu Manager sort Menu Mgr new Menu Manager Workbench Messages get String Editor List Sort By text NON NLS 1 sort Menu Mgr add name Sort Action sort Menu Mgr add MRU Sort Action Apply To Sub Menu Menu Manager apply To Menu Mgr new Menu Manager Workbench Messages get String Editor List Apply To text NON NLS 1 apply To Menu Mgr add window Scope Action apply To Menu Mgr add page Scope Action if drop Down apply To Menu Mgr add tab Group Scope Action Main menu menu Mgr add save Action menu Mgr add close Action menu Mgr add new Separator menu Mgr add select Clean Action menu Mgr add Invert Selection Action menu Mgr add select All Action menu Mgr add new Separator menu Mgr add full Name Action menu Mgr add sort Menu Mgr menu Mgr add apply To Menu Mgr  fillContextMenu IMenuManager menuMgr SortBy SubMenu MenuManager sortMenuMgr MenuManager WorkbenchMessages getString EditorList SortBy sortMenuMgr nameSortAction sortMenuMgr MRUSortAction ApplyTo SubMenu MenuManager applyToMenuMgr MenuManager WorkbenchMessages getString EditorList ApplyTo applyToMenuMgr windowScopeAction applyToMenuMgr pageScopeAction dropDown applyToMenuMgr tabGroupScopeAction menuMgr saveAction menuMgr closeAction menuMgr menuMgr selectCleanAction menuMgr InvertSelectionAction menuMgr selectAllAction menuMgr menuMgr fullNameAction menuMgr sortMenuMgr menuMgr applyToMenuMgr
private class Save Action extends Action Create an instance of this class private Save Action set Text Workbench Messages get String Editor List save Selected text NON NLS 1 set Tool Tip Text Workbench Messages get String Editor List save Selected tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids SAVE ACTION  SaveAction SaveAction setText WorkbenchMessages getString EditorList saveSelected setToolTipText WorkbenchMessages getString EditorList saveSelected toolTip WorkbenchHelp setHelp IHelpContextIds SAVE_ACTION
Performs the save public void run Table Item items editors Table get Selection List dirty Editor List new Array List for int i 0 i items length i Adapter editor Adapter items i get Data editor List Data Object element editor editor Ref get Part false if editor is Dirty dirty Editor List add element if dirty Editor List size 0 Editor Manager save All dirty Editor List false window destroy Control  TableItem editorsTable getSelection dirtyEditorList ArrayList getData editorListData editorRef getPart isDirty dirtyEditorList dirtyEditorList EditorManager saveAll dirtyEditorList destroyControl
private class Close Action extends Action Create an instance of this class private Close Action set Text Workbench Messages get String Editor List close Selected text NON NLS 1 set Tool Tip Text Workbench Messages get String Editor List close Selected tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids CLOSE PART ACTION  CloseAction CloseAction setText WorkbenchMessages getString EditorList closeSelected setToolTipText WorkbenchMessages getString EditorList closeSelected toolTip WorkbenchHelp setHelp IHelpContextIds CLOSE_PART_ACTION
Close the selected editor public void run Table Item items editors Table get Selection Adapter editor Ref new Adapter items length List dirty Editor List new Array List store the editor references as editors Table will be disposed when focus is lost for int i 0 i items length i editor Ref i Adapter items i get Data editor List Data Object element editor Ref i editor Ref get Part false if editor Ref i is Dirty dirty Editor List add element boolean result true if dirty Editor List size 0 result Editor Manager save All dirty Editor List true window now close the editors if result for int i 0 i editor Ref length i editor Ref i close notify Editor List Views destroy Control  TableItem editorsTable getSelection editorRef dirtyEditorList ArrayList editorsTable editorRef getData editorListData editorRef editorRef getPart editorRef isDirty dirtyEditorList dirtyEditorList EditorManager saveAll dirtyEditorList editorRef editorRef notifyEditorListViews destroyControl
private int selection Type Create an instance of this class private Selection Action int selection Type this selection Type selection Type switch selection Type case SELECT ALL set Text Workbench Messages get String Editor List select All text NON NLS 1 set Tool Tip Text Workbench Messages get String Editor List select All tool Tip NON NLS 1 break case INVERT SELECTION set Text Workbench Messages get String Editor List invert Selection text NON NLS 1 set Tool Tip Text Workbench Messages get String Editor List invert Selection tool Tip NON NLS 1 break case SELECT CLEAN set Text Workbench Messages get String Editor List select Clean text NON NLS 1 set Tool Tip Text Workbench Messages get String Editor List select Clean tool Tip NON NLS 1 break default break Workbench Help set Help this I Help Context Ids SELECTION ACTION  selectionType SelectionAction selectionType selectionType selectionType selectionType SELECT_ALL setText WorkbenchMessages getString EditorList selectAll setToolTipText WorkbenchMessages getString EditorList selectAll toolTip INVERT_SELECTION setText WorkbenchMessages getString EditorList invertSelection setToolTipText WorkbenchMessages getString EditorList invertSelection toolTip SELECT_CLEAN setText WorkbenchMessages getString EditorList selectClean setToolTipText WorkbenchMessages getString EditorList selectClean toolTip WorkbenchHelp setHelp IHelpContextIds SELECTION_ACTION
private Table Item invert Selection Table Item all Items Table Item selected Items if all Items length 0 return all Items Array List inverted Selection new Array List all Items length selected Items length outer Loop for int i 0 i all Items length i for int j 0 j selected Items length j if all Items i selected Items j continue outer Loop inverted Selection add all Items i Table Item result new Table Item inverted Selection size inverted Selection to Array result return result  TableItem invertSelection TableItem allItems TableItem selectedItems allItems allItems ArrayList invertedSelection ArrayList allItems selectedItems outerLoop allItems selectedItems allItems selectedItems outerLoop invertedSelection allItems TableItem TableItem invertedSelection invertedSelection toArray
private Table Item select Clean Table Item all Items if all Items length 0 return new Table Item 0 Array List clean Items new Array List all Items length for int i 0 i all Items length i Adapter editor Adapter all Items i get Data editor List Data if editor is Dirty clean Items add all Items i Table Item result new Table Item clean Items size clean Items to Array result return result  TableItem selectClean TableItem allItems allItems TableItem ArrayList cleanItems ArrayList allItems allItems allItems getData editorListData isDirty cleanItems allItems TableItem TableItem cleanItems cleanItems toArray
Select editors public void run switch selection Type case SELECT ALL editors Table set Selection editors Table get Items break case INVERT SELECTION editors Table set Selection invert Selection editors Table get Items editors Table get Selection break case SELECT CLEAN editors Table set Selection select Clean editors Table get Items break handle Selection Event false  selectionType SELECT_ALL editorsTable setSelection editorsTable getItems INVERT_SELECTION editorsTable setSelection invertSelection editorsTable getItems editorsTable getSelection SELECT_CLEAN editorsTable setSelection selectClean editorsTable getItems handleSelectionEvent
private class Full Name Action extends Action Create an instance of this class private Full Name Action set Text Workbench Messages get String Editor List Full Name text NON NLS 1 set Tool Tip Text Workbench Messages get String Editor List Full Name tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids FULL NAME ALL ACTION  FullNameAction FullNameAction setText WorkbenchMessages getString EditorList FullName setToolTipText WorkbenchMessages getString EditorList FullName toolTip WorkbenchHelp setHelp IHelpContextIds FULL_NAME_ALL_ACTION
Display full file name public void run display Full Path display Full Path Workbench Plugin get Default get Preference Store set Value I Preference Constants EDITORLIST DISPLAY FULL NAME display Full Path set Checked display Full Path int indices editors Table get Selection Indices update Items if drop Down TODO commented out for presentation work workbook resize Editor List editors Table set Selection indices notify Editor List Views  displayFullPath displayFullPath WorkbenchPlugin getDefault getPreferenceStore setValue IPreferenceConstants EDITORLIST_DISPLAY_FULL_NAME displayFullPath setChecked displayFullPath editorsTable getSelectionIndices updateItems dropDown resizeEditorList editorsTable setSelection notifyEditorListViews
private int sort Order Create an instance of this class private Sort Action int sort Order this sort Order sort Order switch sort Order case NAME SORT set Text Workbench Messages get String Editor List Sort By Name text NON NLS 1 set Tool Tip Text Workbench Messages get String Editor List Sort By Name tool Tip NON NLS 1 break case MRU SORT set Text Workbench Messages get String Editor List Sort By Most Recently Used text NON NLS 1 set Tool Tip Text Workbench Messages get String Editor List Sort By Most Recently Used tool Tip NON NLS 1 break default break Workbench Help set Help this I Help Context Ids SORT ACTION  sortOrder SortAction sortOrder sortOrder sortOrder sortOrder NAME_SORT setText WorkbenchMessages getString EditorList SortByName setToolTipText WorkbenchMessages getString EditorList SortByName toolTip MRU_SORT setText WorkbenchMessages getString EditorList SortByMostRecentlyUsed setToolTipText WorkbenchMessages getString EditorList SortByMostRecentlyUsed toolTip WorkbenchHelp setHelp IHelpContextIds SORT_ACTION
Performs the sort public void run Editor List sort Order this sort Order Workbench Plugin get Default get Preference Store set Value I Preference Constants EDITORLIST SORT CRITERIA this sort Order Table Item items editors Table get Items if items length 0 return update Items notify Editor List Views  EditorList sortOrder sortOrder WorkbenchPlugin getDefault getPreferenceStore setValue IPreferenceConstants EDITORLIST_SORT_CRITERIA sortOrder TableItem editorsTable getItems updateItems notifyEditorListViews
private int which Scope Create an instance of this class private Set Scope Action int which Scope this which Scope which Scope switch which Scope case SET WINDOW SCOPE set Text Workbench Messages get String Editor List Display All Windows text NON NLS 1 set Tool Tip Text Workbench Messages get String Editor List Display All Windows tool Tip NON NLS 1 break case SET PAGE SCOPE set Text Workbench Messages get String Editor List Display All Page text NON NLS 1 set Tool Tip Text Workbench Messages get String Editor List Display All Page tool Tip NON NLS 1 break case SET TAB GROUP SCOPE set Text Workbench Messages get String Editor List Display Tab Group text NON NLS 1 set Tool Tip Text Workbench Messages get String Editor List Display Tab Group tool Tip NON NLS 1 break default break Workbench Help set Help this I Help Context Ids SORT EDITOR SCOPE ACTION  whichScope SetScopeAction whichScope whichScope whichScope whichScope SET_WINDOW_SCOPE setText WorkbenchMessages getString EditorList DisplayAllWindows setToolTipText WorkbenchMessages getString EditorList DisplayAllWindows toolTip SET_PAGE_SCOPE setText WorkbenchMessages getString EditorList DisplayAllPage setToolTipText WorkbenchMessages getString EditorList DisplayAllPage toolTip SET_TAB_GROUP_SCOPE setText WorkbenchMessages getString EditorList DisplayTabGroup setToolTipText WorkbenchMessages getString EditorList DisplayTabGroup toolTip WorkbenchHelp setHelp IHelpContextIds SORT_EDITOR_SCOPE_ACTION
Display the appropriate scope public void run Editor List list Scope this which Scope Workbench Plugin get Default get Preference Store set Value I Preference Constants EDITORLIST SELECTION SCOPE this which Scope update Items if drop Down TODO commented out for presentation work workbook resize Editor List notify Editor List Views  EditorList listScope whichScope WorkbenchPlugin getDefault getPreferenceStore setValue IPreferenceConstants EDITORLIST_SELECTION_SCOPE whichScope updateItems dropDown resizeEditorList notifyEditorListViews
String text display Text Image images Adapter I Editor Reference ref editor Ref ref  displayText IEditorReference editorRef
boolean is Dirty return editor Ref is Dirty  isDirty editorRef isDirty
void close Workbench Page p Workbench Part Reference editor Ref get Pane get Page p close Editor editor Ref false  WorkbenchPage WorkbenchPartReference editorRef getPane getPage closeEditor editorRef
file name without any dirty indication used for sorting String get Text text new String 2 text 0 editor Ref get Title text 1 editor Ref get Title Tool Tip return text  getText editorRef getTitle editorRef getTitleToolTip
file name with dirty indication used for displaying String get Display Text display Text new String 2 if editor Ref is Dirty display Text 0 editor Ref get Title NON NLS 1 display Text 1 editor Ref get Title Tool Tip NON NLS 1 else display Text 0 editor Ref get Title display Text 1 editor Ref get Title Tool Tip return display Text  getDisplayText displayText editorRef isDirty displayText editorRef getTitle displayText editorRef getTitleToolTip displayText editorRef getTitle displayText editorRef getTitleToolTip displayText
Image get Image return editor Ref get Title Image  getImage editorRef getTitleImage
private void activate boolean activate I Editor Part editor editor Ref get Editor true if editor null Workbench Page p Workbench Page editor get Editor Site get Page Shell s p get Workbench Window get Shell if s get Minimized s set Minimized false s move Above null p get Workbench Window set Active Page p if activate if editor p get Active Part editor set Focus else p activate editor else p bring To Top editor  IEditorPart editorRef getEditor WorkbenchPage WorkbenchPage getEditorSite getPage getWorkbenchWindow getShell getMinimized setMinimized moveAbove getWorkbenchWindow setActivePage getActivePart setFocus bringToTop
public int compare To Object another int index full Name Action is Checked 1 0 Adapter adapter Adapter another int result collator compare get Text index adapter get Text index return result  compareTo fullNameAction isChecked getText getText

private static final String SAVE RESOURCES TITLE Workbench Messages get String Editor Manager save Resources Title NON NLS 1 Editor Manager constructor comment public Editor Manager Workbench Window window Workbench Page workbench Page Editor Area Helper pres this window window this page workbench Page this editor Presentation pres  SAVE_RESOURCES_TITLE WorkbenchMessages getString EditorManager saveResourcesTitle EditorManager EditorManager WorkbenchWindow WorkbenchPage workbenchPage EditorAreaHelper workbenchPage editorPresentation
Closes all of the editors in the workbench The contents are not saved This method will close the presentation for each editor The I Editor Part dispose method must be called at a higher level public void close All Close the pane action bars pane etc I Editor Reference editors editor Presentation get Editors editor Presentation close All Editors for int i 0 i editors length i I Editor Part part I Editor Part editors i get Part false if part null Part Site site Part Site part get Site dispose Editor Action Bars Editor Action Bars site get Action Bars site dispose  IEditorPart closeAll IEditorReference editorPresentation getEditors editorPresentation closeAllEditors IEditorPart IEditorPart getPart PartSite PartSite getSite disposeEditorActionBars EditorActionBars getActionBars
Closes an editor The contents are not saved This method will close the presentation for the editor The I Editor Part dispose method must be called at a higher level public void close Editor I Editor Reference ref Close the pane action bars pane etc boolean created Status false if closing Editor Status null created Status true closing Editor Status new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Editor Manager unable To Open Editors NON NLS 1 null I Editor Part part ref get Editor false if part null if part instanceof Multi Editor I Editor Part inner Editors Multi Editor part get Inner Editors for int i 0 i inner Editors length i Editor Site site Editor Site inner Editors i get Editor Site editor Presentation close Editor inner Editors i dispose Editor Action Bars Editor Action Bars site get Action Bars site dispose else Editor Site site Editor Site part get Editor Site if site get Pane instanceof Multi Editor Inner Pane Multi Editor Inner Pane pane Multi Editor Inner Pane site get Pane page close Editor I Editor Reference pane get Parent Pane get Part Reference true return Editor Site site Editor Site part get Editor Site editor Presentation close Editor part dispose Editor Action Bars Editor Action Bars site get Action Bars site dispose else editor Presentation close Editor ref Editor ref dispose if created Status if closing Editor Status get Severity I Status ERROR Error Dialog open Error window get Shell Workbench Messages get String Editor Manager unable To Restore Editor Title NON NLS 1 null closing Editor Status I Status WARNING I Status ERROR closing Editor Status null  IEditorPart closeEditor IEditorReference createdStatus closingEditorStatus createdStatus closingEditorStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString EditorManager unableToOpenEditors IEditorPart getEditor MultiEditor IEditorPart innerEditors MultiEditor getInnerEditors innerEditors EditorSite EditorSite innerEditors getEditorSite editorPresentation closeEditor innerEditors disposeEditorActionBars EditorActionBars getActionBars EditorSite EditorSite getEditorSite getPane MultiEditorInnerPane MultiEditorInnerPane MultiEditorInnerPane getPane closeEditor IEditorReference getParentPane getPartReference EditorSite EditorSite getEditorSite editorPresentation closeEditor disposeEditorActionBars EditorActionBars getActionBars editorPresentation closeEditor createdStatus closingEditorStatus getSeverity IStatus ErrorDialog openError getShell WorkbenchMessages getString EditorManager unableToRestoreEditorTitle closingEditorStatus IStatus IStatus closingEditorStatus
Check to determine if the editor resources are no longer needed removes property change listener for editors removes pin editor keyboard shortcut handler disposes cached images and clears the cached images hash table private void check Delete Editor Resources get the current number of editors I Editor Reference editors editor Presentation get Editors If there are no editors if editors length 0 if editor Prop Change Listnener null remove property change listener for editors I Preference Store pref Store Workbench Plugin get Default get Preference Store pref Store remove Property Change Listener editor Prop Change Listnener editor Prop Change Listnener null if pin Editor Handler Submission null remove pin editor keyboard shortcut handler PlatformUI get Workbench get Command Support remove Handler Submission pin Editor Handler Submission pin Editor Handler Submission null Dispose the cached images for editors Enumeration images img Hashtable elements while images has More Elements Image image Image images next Element image dispose Clear cached images hash table img Hashtable clear  checkDeleteEditorResources IEditorReference editorPresentation getEditors editorPropChangeListnener IPreferenceStore prefStore WorkbenchPlugin getDefault getPreferenceStore prefStore removePropertyChangeListener editorPropChangeListnener editorPropChangeListnener pinEditorHandlerSubmission getWorkbench getCommandSupport removeHandlerSubmission pinEditorHandlerSubmission pinEditorHandlerSubmission imgHashtable hasMoreElements nextElement imgHashtable
editor Prop Change Listnener new I Property Change Listener public void property Change Property Change Event event if event get Property equals I Preference Constants REUSE EDITORS BOOLEAN I Editor Reference editors get Editors for int i 0 i editors length i Editor editors i pin Status Updated  editorPropChangeListnener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty IPreferenceConstants REUSE_EDITORS_BOOLEAN IEditorReference getEditors pinStatusUpdated
Check to determine if the property change listener for editors should be created private void check Create Editor Prop Listener if editor Prop Change Listnener null Add a property change listener for closing editors automatically preference Add or remove the pin icon accordingly editor Prop Change Listnener new I Property Change Listener public void property Change Property Change Event event if event get Property equals I Preference Constants REUSE EDITORS BOOLEAN I Editor Reference editors get Editors for int i 0 i editors length i Editor editors i pin Status Updated Workbench Plugin get Default get Preference Store add Property Change Listener editor Prop Change Listnener  checkCreateEditorPropListener editorPropChangeListnener editorPropChangeListnener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty IPreferenceConstants REUSE_EDITORS_BOOLEAN IEditorReference getEditors pinStatusUpdated WorkbenchPlugin getDefault getPreferenceStore addPropertyChangeListener editorPropChangeListnener
I Handler pin Editor Handler new Abstract Handler public Object execute Map parameter Values By Name throws Execution Exception check if the Close editors automatically preference is set if Workbench Plugin get Default get Preference Store get Boolean I Preference Constants REUSE EDITORS BOOLEAN add or remove the editor s pin I Workbench Part Site i Editor Site editor Presentation get Visible Editor get Part false get Site if i Editor Site instanceof Editor Site Editor Site editor Site Editor Site i Editor Site editor Site set Reuse Editor editor Site get Reuse Editor return null  IHandler pinEditorHandler AbstractHandler parameterValuesByName ExecutionException WorkbenchPlugin getDefault getPreferenceStore getBoolean IPreferenceConstants REUSE_EDITORS_BOOLEAN IWorkbenchPartSite iEditorSite editorPresentation getVisibleEditor getPart getSite iEditorSite EditorSite EditorSite editorSite EditorSite iEditorSite editorSite setReuseEditor editorSite getReuseEditor
Check to determine if the handler for the pin editor keyboard shortcut should be created private void check Create Pin Editor Shortcut Key Handler if pin Editor Handler Submission null final Shell shell page get Workbench Window get Shell I Handler pin Editor Handler new Abstract Handler public Object execute Map parameter Values By Name throws Execution Exception check if the Close editors automatically preference is set if Workbench Plugin get Default get Preference Store get Boolean I Preference Constants REUSE EDITORS BOOLEAN add or remove the editor s pin I Workbench Part Site i Editor Site editor Presentation get Visible Editor get Part false get Site if i Editor Site instanceof Editor Site Editor Site editor Site Editor Site i Editor Site editor Site set Reuse Editor editor Site get Reuse Editor return null pin Editor Handler Submission new Handler Submission null shell null org eclipse ui window pin Editor NON NLS 1 pin Editor Handler Priority MEDIUM Assign the handler for the pin editor keyboard shortcut PlatformUI get Workbench get Command Support add Handler Submission pin Editor Handler Submission  checkCreatePinEditorShortcutKeyHandler pinEditorHandlerSubmission getWorkbenchWindow getShell IHandler pinEditorHandler AbstractHandler parameterValuesByName ExecutionException WorkbenchPlugin getDefault getPreferenceStore getBoolean IPreferenceConstants REUSE_EDITORS_BOOLEAN IWorkbenchPartSite iEditorSite editorPresentation getVisibleEditor getPart getSite iEditorSite EditorSite EditorSite editorSite EditorSite iEditorSite editorSite setReuseEditor editorSite getReuseEditor pinEditorHandlerSubmission HandlerSubmission pinEditor pinEditorHandler getWorkbench getCommandSupport addHandlerSubmission pinEditorHandlerSubmission
Method to create the editor s pin Image Descriptor return the single image descriptor for the editor s pin icon private Image Descriptor get Editor Pin Image Desc Image Registry registry J Face Resources get Image Registry Image Descriptor pin Desc registry get Descriptor PIN EDITOR KEY Avoid registering twice if pin Desc null try URL icons Root Bundle Utility find PlatformUI PLUGIN ID PIN EDITOR FOLDER pin Desc Image Descriptor create FromURL new URL icons Root PIN EDITOR registry put PIN EDITOR KEY pin Desc catch MalformedURL Exception e String error Message e get Message Workbench Plugin log error Message Status Util new Status I Status ERROR error Message e return null return pin Desc  ImageDescriptor ImageDescriptor getEditorPinImageDesc ImageRegistry JFaceResources getImageRegistry ImageDescriptor pinDesc getDescriptor PIN_EDITOR_KEY pinDesc iconsRoot BundleUtility PLUGIN_ID PIN_EDITOR_FOLDER pinDesc ImageDescriptor createFromURL iconsRoot PIN_EDITOR PIN_EDITOR_KEY pinDesc MalformedURLException errorMessage getMessage WorkbenchPlugin errorMessage StatusUtil newStatus IStatus errorMessage pinDesc
Answer a list of dirty editors private List collect Dirty Editors List result new Array List 3 I Editor Reference editors editor Presentation get Editors for int i 0 i editors length i I Editor Part part I Editor Part editors i get Part false if part null part is Dirty result add part return result  collectDirtyEditors ArrayList IEditorReference editorPresentation getEditors IEditorPart IEditorPart getPart isDirty
Returns whether the manager contains an editor public boolean contains Editor I Editor Reference ref I Editor Reference editors editor Presentation get Editors for int i 0 i editors length i if ref editors i return true return false  containsEditor IEditorReference IEditorReference editorPresentation getEditors
private Editor Action Bars create Editor Action Bars Editor Descriptor desc Get the editor type String type desc get Id If an action bar already exists for this editor type return it Editor Action Bars action Bars Editor Action Bars action Cache get type if action Bars null action Bars add Ref return action Bars Create a new action bar set action Bars new Editor Action Bars W Win Action Bars page get Action Bars type action Bars add Ref action Cache put type action Bars Read base contributor I Editor Action Bar Contributor contr desc create Action Bar Contributor if contr null action Bars set Editor Contributor contr contr init action Bars page Read action extensions Editor Action Builder builder new Editor Action Builder contr builder read Action Extensions desc action Bars if contr null action Bars set Extension Contributor contr contr init action Bars page Return action bars return action Bars  EditorActionBars createEditorActionBars EditorDescriptor getId EditorActionBars actionBars EditorActionBars actionCache actionBars actionBars addRef actionBars actionBars EditorActionBars WWinActionBars getActionBars actionBars addRef actionCache actionBars IEditorActionBarContributor createActionBarContributor actionBars setEditorContributor actionBars EditorActionBuilder EditorActionBuilder readActionExtensions actionBars actionBars setExtensionContributor actionBars actionBars
private Editor Action Bars create Empty Editor Action Bars Get the editor type String type String value Of System current Time Millis Create a new action bar set Note It is an empty set Editor Action Bars action Bars new Editor Action Bars W Win Action Bars page get Action Bars type action Bars add Ref action Cache put type action Bars Return action bars return action Bars  EditorActionBars createEmptyEditorActionBars valueOf currentTimeMillis EditorActionBars actionBars EditorActionBars WWinActionBars getActionBars actionBars addRef actionCache actionBars actionBars
private void dispose Editor Action Bars Editor Action Bars action Bars action Bars remove Ref if action Bars get Ref 0 String type action Bars get Editor Type action Cache remove type refresh the cool bar manager before disposing of a cool item if window get Cool Bar Manager null window get Cool Bar Manager refresh action Bars dispose  disposeEditorActionBars EditorActionBars actionBars actionBars removeRef actionBars getRef actionBars getEditorType actionCache getCoolBarManager getCoolBarManager actionBars
public I Editor Part find Editor I Editor Input input I Editor Reference editors editor Presentation get Editors for int i 0 i editors length i I Editor Part part I Editor Part editors i get Part false if part null input equals part get Editor Input return part String name input get Name I Persistable Element persistable input get Persistable if name null persistable null return null String id persistable get Factory Id if id null return null for int i 0 i editors length i Editor e Editor editors i if e get Part false null if name equals e get Name id equals e get Factory Id I Editor Input restored Input e get Restored Input if input equals restored Input return e get Editor true return null  IEditorPart findEditor IEditorInput IEditorReference editorPresentation getEditors IEditorPart IEditorPart getPart getEditorInput getName IPersistableElement getPersistable getFactoryId getPart getName getFactoryId IEditorInput restoredInput getRestoredInput restoredInput getEditor
Returns the SWT Display private Display get Display return window get Shell get Display  getDisplay getShell getDisplay
Answer the number of editors public int get Editor Count return editor Presentation get Editors length  getEditorCount editorPresentation getEditors
Answer the editor registry private I Editor Registry get Editor Registry return Workbench Plugin get Default get Editor Registry  IEditorRegistry getEditorRegistry WorkbenchPlugin getDefault getEditorRegistry
See I Workbench Page public I Editor Part get Dirty Editors List dirty Editors collect Dirty Editors return I Editor Part dirty Editors to Array new I Editor Part dirty Editors size  IWorkbenchPage IEditorPart getDirtyEditors dirtyEditors collectDirtyEditors IEditorPart dirtyEditors toArray IEditorPart dirtyEditors
See I Workbench Page public I Editor Reference get Editors return editor Presentation get Editors  IWorkbenchPage IEditorReference getEditors editorPresentation getEditors
public I Editor Part get Visible Editor I Editor Reference ref editor Presentation get Visible Editor if ref null return null return I Editor Part ref get Part true  IEditorPart getVisibleEditor IEditorReference editorPresentation getVisibleEditor IEditorPart getPart
Answer true if save is needed in any one of the editors public boolean is Save All Needed I Editor Reference editors editor Presentation get Editors for int i 0 i editors length i I Editor Reference ed editors i if ed is Dirty return true return false  isSaveAllNeeded IEditorReference editorPresentation getEditors IEditorReference isDirty
private I Editor Reference find Reusable Editor Editor Descriptor desc I Editor Reference editors page get Sorted Editors I Preference Store store Workbench Plugin get Default get Preference Store boolean reuse store get Boolean I Preference Constants REUSE EDITORS BOOLEAN if reuse return null if editors length page get Editor Reuse Threshold return null I Editor Reference dirty Editor null Find a editor to be reused for int i 0 i editors length i I Editor Reference editor editors i if editor active Part continue if editor is Pinned continue if editor is Dirty if dirty Editor null ensure least recently used dirty Editor editor continue return editor if dirty Editor null return null fix for 11122 boolean reuse Dirty store get Boolean I Preference Constants REUSE DIRTY EDITORS if reuse Dirty return null Message Dialog dialog new Message Dialog window get Shell Workbench Messages get String Editor Manager reuse Editor Dialog Title null accept the default window icon NON NLS 1 Workbench Messages format Editor Manager save Changes Question new String dirty Editor get Name NON NLS 1 Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL Workbench Messages get String Editor Manager open New Editor Label NON NLS 1 0 int result dialog open if result 0 YES Progress Monitor Dialog pmd new Progress Monitor Jobs Dialog dialog get Shell pmd open dirty Editor get Editor true do Save pmd get Progress Monitor pmd close else if result 2 result 1 return null return dirty Editor  IEditorReference findReusableEditor EditorDescriptor IEditorReference getSortedEditors IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore getBoolean IPreferenceConstants REUSE_EDITORS_BOOLEAN getEditorReuseThreshold IEditorReference dirtyEditor IEditorReference activePart isPinned isDirty dirtyEditor dirtyEditor dirtyEditor reuseDirty getBoolean IPreferenceConstants REUSE_DIRTY_EDITORS reuseDirty MessageDialog MessageDialog getShell WorkbenchMessages getString EditorManager reuseEditorDialogTitle WorkbenchMessages EditorManager saveChangesQuestion dirtyEditor getName MessageDialog IDialogConstants YES_LABEL IDialogConstants NO_LABEL WorkbenchMessages getString EditorManager openNewEditorLabel ProgressMonitorDialog ProgressMonitorJobsDialog getShell dirtyEditor getEditor doSave getProgressMonitor dirtyEditor
public I Editor Reference open Editor String editor Id I Editor Input input boolean set Visible throws Part Init Exception if editor Id null input null throw new Illegal Argument Exception I Editor Registry reg get Editor Registry Editor Descriptor desc Editor Descriptor reg find Editor editor Id if desc null throw new Part Init Exception Workbench Messages format Editor Manager unknown EditorID Message new Object editor Id NON NLS 1 I Editor Reference result open Editor From Descriptor new Editor desc input return result  IEditorReference openEditor editorId IEditorInput setVisible PartInitException editorId IllegalArgumentException IEditorRegistry getEditorRegistry EditorDescriptor EditorDescriptor findEditor editorId PartInitException WorkbenchMessages EditorManager unknownEditorIDMessage editorId IEditorReference openEditorFromDescriptor
private I Editor Reference open Editor From Descriptor I Editor Reference ref Editor Descriptor desc I Editor Input input throws Part Init Exception I Editor Reference result ref if desc is Internal result reuse Internal Editor desc input if result null result ref open Internal Editor ref desc input true else if desc get Id equals I Editor Registry SYSTEM INPLACE EDITOR ID result open System In Place Editor ref desc input else if desc get Id equals I Editor Registry SYSTEM EXTERNAL EDITOR ID I Path Editor Input path Input get Path Editor Input input if path Input null result open System External Editor path Input get Path else throw new Part Init Exception Workbench Messages get String Editor Manager system Editor Error NON NLS 1 else if desc is Open External result open External Editor desc input else this should never happen throw new Part Init Exception Workbench Messages format Editor Manager invalid Descriptor new String desc get Id NON NLS 1 Workbench wb Workbench window get Workbench wb get Editor History add input desc return result  IEditorReference openEditorFromDescriptor IEditorReference EditorDescriptor IEditorInput PartInitException IEditorReference isInternal reuseInternalEditor openInternalEditor getId IEditorRegistry SYSTEM_INPLACE_EDITOR_ID openSystemInPlaceEditor getId IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID IPathEditorInput pathInput getPathEditorInput pathInput openSystemExternalEditor pathInput getPath PartInitException WorkbenchMessages getString EditorManager systemEditorError isOpenExternal openExternalEditor PartInitException WorkbenchMessages EditorManager invalidDescriptor getId getWorkbench getEditorHistory
Busy Indicator show While get Display new Runnable public void run try if desc get Launcher null open using launcher Object launcher Workbench Plugin create Extension desc get Configuration Element launcher NON NLS 1 I Editor Launcher launcher open path Input get Path else open using command External Editor o Editor new External Editor path Input get Path desc o Editor open catch Core Exception e ex 0 e  BusyIndicator showWhile getDisplay getLauncher WorkbenchPlugin createExtension getConfigurationElement IEditorLauncher pathInput getPath ExternalEditor oEditor ExternalEditor pathInput getPath oEditor CoreException
Open a specific external editor on an file based on the descriptor private I Editor Reference open External Editor final Editor Descriptor desc I Editor Input input throws Part Init Exception final Core Exception ex new Core Exception 1 final I Path Editor Input path Input get Path Editor Input input if path Input null Busy Indicator show While get Display new Runnable public void run try if desc get Launcher null open using launcher Object launcher Workbench Plugin create Extension desc get Configuration Element launcher NON NLS 1 I Editor Launcher launcher open path Input get Path else open using command External Editor o Editor new External Editor path Input get Path desc o Editor open catch Core Exception e ex 0 e else throw new Part Init Exception Workbench Messages format Editor Manager error Opening External Editor new Object desc get File Name desc get Id NON NLS 1 if ex 0 null throw new Part Init Exception Workbench Messages format Editor Manager error Opening External Editor new Object desc get File Name desc get Id ex 0 NON NLS 1 we do not have an editor part for external editors return null  IEditorReference openExternalEditor EditorDescriptor IEditorInput PartInitException CoreException CoreException IPathEditorInput pathInput getPathEditorInput pathInput BusyIndicator showWhile getDisplay getLauncher WorkbenchPlugin createExtension getConfigurationElement IEditorLauncher pathInput getPath ExternalEditor oEditor ExternalEditor pathInput getPath oEditor CoreException PartInitException WorkbenchMessages EditorManager errorOpeningExternalEditor getFileName getId PartInitException WorkbenchMessages EditorManager errorOpeningExternalEditor getFileName getId
private I Editor Reference open Multi Editor final I Editor Reference ref final Multi Editor part final Editor Descriptor desc final Multi Editor Input input final boolean set Visible throws Part Init Exception String editor Array input get Editors I Editor Input input Array input get Input find all descriptors Editor Descriptor desc Array new Editor Descriptor editor Array length I Editor Reference ref Array new I Editor Reference editor Array length I Editor Part part Array new I Editor Part editor Array length I Editor Registry reg get Editor Registry for int i 0 i editor Array length i Editor Descriptor inner Desc Editor Descriptor reg find Editor editor Array i if inner Desc null throw new Part Init Exception Workbench Messages format Editor Manager unknown EditorID Message new Object editor Array i NON NLS 1 desc Array i inner Desc part Array i create Part desc Array i ref Array i new Editor create Site ref part Array i desc Array i input Array i Editor ref Array i set Part part Array i part set Children part Array return ref Array  IEditorReference openMultiEditor IEditorReference MultiEditor EditorDescriptor MultiEditorInput setVisible PartInitException editorArray getEditors IEditorInput inputArray getInput EditorDescriptor descArray EditorDescriptor editorArray IEditorReference refArray IEditorReference editorArray IEditorPart partArray IEditorPart editorArray IEditorRegistry getEditorRegistry editorArray EditorDescriptor innerDesc EditorDescriptor findEditor editorArray innerDesc PartInitException WorkbenchMessages EditorManager unknownEditorIDMessage editorArray descArray innerDesc partArray createPart descArray refArray createSite partArray descArray inputArray refArray setPart partArray setChildren partArray refArray
Busy Indicator show While get Display new Runnable public void run try if input null I Editor Part part ref get Editor false if part null part instanceof Multi Editor I Editor Reference ref Array open Multi Editor ref Multi Editor part desc Multi Editor Input input set Visible editor Presentation open Editor ref ref Array set Visible return editor Presentation open Editor ref set Visible catch Part Init Exception e ex 0 e  BusyIndicator showWhile getDisplay IEditorPart getEditor MultiEditor IEditorReference refArray openMultiEditor MultiEditor MultiEditorInput setVisible editorPresentation openEditor refArray setVisible editorPresentation openEditor setVisible PartInitException
private void create Editor Tab final I Editor Reference ref final Editor Descriptor desc final I Editor Input input final boolean set Visible throws Part Init Exception Check it there is already a tab for this ref I Editor Reference refs editor Presentation get Editors for int i 0 i refs length i if ref refs i return final Part Init Exception ex new Part Init Exception 1 Busy Indicator show While get Display new Runnable public void run try if input null I Editor Part part ref get Editor false if part null part instanceof Multi Editor I Editor Reference ref Array open Multi Editor ref Multi Editor part desc Multi Editor Input input set Visible editor Presentation open Editor ref ref Array set Visible return editor Presentation open Editor ref set Visible catch Part Init Exception e ex 0 e If the opening failed for any reason throw an exception if ex 0 null throw ex 0  createEditorTab IEditorReference EditorDescriptor IEditorInput setVisible PartInitException IEditorReference editorPresentation getEditors PartInitException PartInitException BusyIndicator showWhile getDisplay IEditorPart getEditor MultiEditor IEditorReference refArray openMultiEditor MultiEditor MultiEditorInput setVisible editorPresentation openEditor refArray setVisible editorPresentation openEditor setVisible PartInitException
private void create Site final I Editor Reference ref final I Editor Part part final Editor Descriptor desc final I Editor Input input throws Part Init Exception Editor Site site new Editor Site ref part page desc if desc null site set Action Bars create Editor Action Bars desc else site set Action Bars create Empty Editor Action Bars final String label part get Title try UI Stats start UI Stats INIT PART label part init site input finally UI Stats end UI Stats INIT PART label if part get Site site throw new Part Init Exception Workbench Messages format Editor Manager site Incorrect new Object desc get Id NON NLS 1  createSite IEditorReference IEditorPart EditorDescriptor IEditorInput PartInitException EditorSite EditorSite setActionBars createEditorActionBars setActionBars createEmptyEditorActionBars getTitle UIStats UIStats INIT_PART UIStats UIStats INIT_PART getSite PartInitException WorkbenchMessages EditorManager siteIncorrect getId
private I Editor Reference reuse Internal Editor Editor Descriptor desc I Editor Input input throws Part Init Exception I Editor Reference reusable Editor Ref find Reusable Editor desc if reusable Editor Ref null I Editor Part reusable Editor reusable Editor Ref get Editor false if reusable Editor null I Editor Reference result new Editor open Internal Editor result desc input true page close Editor reusable Editor Ref false return result Editor Site site Editor Site reusable Editor get Editor Site Editor Descriptor old Desc site get Editor Descriptor if desc get Id equals old Desc get Id reusable Editor instanceof I Reusable Editor Workbench wb Workbench window get Workbench editor Presentation move Editor reusable Editor 1 wb get Editor History add reusable Editor get Editor Input site get Editor Descriptor page reuse Editor I Reusable Editor reusable Editor input return reusable Editor Ref else find Reusable Editor checks pinned and saves editor if necessary I Editor Reference ref new Editor open Internal Editor ref desc input true reusable Editor get Editor Site get Page close Editor reusable Editor false return ref return null  IEditorReference reuseInternalEditor EditorDescriptor IEditorInput PartInitException IEditorReference reusableEditorRef findReusableEditor reusableEditorRef IEditorPart reusableEditor reusableEditorRef getEditor reusableEditor IEditorReference openInternalEditor closeEditor reusableEditorRef EditorSite EditorSite reusableEditor getEditorSite EditorDescriptor oldDesc getEditorDescriptor getId oldDesc getId reusableEditor IReusableEditor getWorkbench editorPresentation moveEditor reusableEditor getEditorHistory reusableEditor getEditorInput getEditorDescriptor reuseEditor IReusableEditor reusableEditor reusableEditorRef findReusableEditor IEditorReference openInternalEditor reusableEditor getEditorSite getPage closeEditor reusableEditor
Open an internal editor on an file Throw up an error dialog if an exception occurs private void open Internal Editor I Editor Reference ref Editor Descriptor desc I Editor Input input boolean set Visible throws Part Init Exception Create an editor instance String label ref get Name if label null label desc get Label I Editor Part editor try UI Stats start UI Stats CREATE PART label editor create Part desc finally UI Stats end UI Stats CREATE PART label Open the instance create Site ref editor desc input Editor ref set Part editor create Editor Tab ref desc input set Visible  openInternalEditor IEditorReference EditorDescriptor IEditorInput setVisible PartInitException getName getLabel IEditorPart UIStats UIStats CREATE_PART createPart UIStats UIStats CREATE_PART createSite setPart createEditorTab setVisible
final Throwable ex new Throwable 1 Platform run new Safe Runnable public void run throws Core Exception editor 0 I Editor Part Workbench Plugin create Extension desc get Configuration Element class NON NLS 1  SafeRunnable CoreException IEditorPart WorkbenchPlugin createExtension getConfigurationElement
editor 0 I Editor Part Workbench Plugin create Extension desc get Configuration Element class NON NLS 1 public void handle Exception Throwable e ex 0 e  IEditorPart WorkbenchPlugin createExtension getConfigurationElement handleException
private I Editor Part create Part final Editor Descriptor desc throws Part Init Exception final I Editor Part editor new I Editor Part 1 final Throwable ex new Throwable 1 Platform run new Safe Runnable public void run throws Core Exception editor 0 I Editor Part Workbench Plugin create Extension desc get Configuration Element class NON NLS 1 public void handle Exception Throwable e ex 0 e if ex 0 null throw new Part Init Exception Workbench Messages format Editor Manager unable To Instantiate new Object desc get Id ex 0 NON NLS 1 return editor 0  IEditorPart createPart EditorDescriptor PartInitException IEditorPart IEditorPart SafeRunnable CoreException IEditorPart WorkbenchPlugin createExtension getConfigurationElement handleException PartInitException WorkbenchMessages EditorManager unableToInstantiate getId
Busy Indicator show While get Display new Runnable public void run if location null result 0 Program launch location toOS String  BusyIndicator showWhile getDisplay toOSString
Open a system external editor on the input path private I Editor Reference open System External Editor final I Path location throws Part Init Exception if location null throw new Illegal Argument Exception final boolean result false Busy Indicator show While get Display new Runnable public void run if location null result 0 Program launch location toOS String if result 0 throw new Part Init Exception Workbench Messages format Editor Manager unable To Open External Editor new Object location NON NLS 1 We do not have an editor part for external editors return null  IEditorReference openSystemExternalEditor IPath PartInitException IllegalArgumentException BusyIndicator showWhile getDisplay toOSString PartInitException WorkbenchMessages EditorManager unableToOpenExternalEditor
Opens a system in place editor on the input private I Editor Reference open System In Place Editor I Editor Reference ref Editor Descriptor desc I Editor Input input throws Part Init Exception I Editor Part c Editor Component Support get System In Place Editor if c Editor null return null else create Site ref c Editor desc input Editor ref set Part c Editor create Editor Tab ref desc input true return ref  IEditorReference openSystemInPlaceEditor IEditorReference EditorDescriptor IEditorInput PartInitException IEditorPart cEditor ComponentSupport getSystemInPlaceEditor cEditor createSite cEditor setPart cEditor createEditorTab
private Image Descriptor find Image Editor Descriptor desc I Path path if desc null issue what should be the default image return Image Descriptor get Missing Image Descriptor else if desc is Open External path null return PlatformUI get Workbench get Editor Registry get Image Descriptor path toOS String else return desc get Image Descriptor  ImageDescriptor findImage EditorDescriptor IPath ImageDescriptor getMissingImageDescriptor isOpenExternal getWorkbench getEditorRegistry getImageDescriptor toOSString getImageDescriptor
Platform run new Safe Runnable public void run Update each workbook with its visible editor for int i 0 i visible Editors size i set Visible Editor I Editor Reference visible Editors get i false for Iterator iter error Workbooks iterator iter has Next iter next editor Presentation set Active Editor Workbook FromID active WorkbookID 0 editor Presentation fix Visible Editor Update the active workbook if active WorkbookID 0 null editor Presentation set Active Editor Workbook FromID active WorkbookID 0 if active Editor 0 null page activate active Editor 0  SafeRunnable visibleEditors setVisibleEditor IEditorReference visibleEditors errorWorkbooks hasNext editorPresentation setActiveEditorWorkbookFromID activeWorkbookID editorPresentation fixVisibleEditor activeWorkbookID editorPresentation setActiveEditorWorkbookFromID activeWorkbookID activeEditor activeEditor
public void handle Exception Throwable e The exception is already logged result add new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages get String Editor Manager exception Restoring Editor e NON NLS 1  handleException IStatus PLUGIN_ID WorkbenchMessages getString EditorManager exceptionRestoringEditor
see I Persistable Part public I Status restore State I Memento memento Restore the editor area workbooks layout relationship final Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Editor Manager problems Restoring Editors null NON NLS 1 final String active WorkbookID new String 1 final Array List visible Editors new Array List 5 final I Editor Part active Editor new I Editor Part 1 final Array List error Workbooks new Array List 1 I Memento area Mem memento get Child I Workbench Constants TAG AREA if area Mem null result add editor Presentation restore State area Mem active WorkbookID 0 area Mem get String I Workbench Constants TAG ACTIVE WORKBOOK Loop through the editors I Memento editor Mems memento get Children I Workbench Constants TAG EDITOR for int x 0 x editor Mems length x for dynamic UI call restore Editor State to replace code which is commented out restore Editor State editor Mems x visible Editors active Editor error Workbooks result restore the presentation if area Mem null result add editor Presentation restore Presentation State area Mem Platform run new Safe Runnable public void run Update each workbook with its visible editor for int i 0 i visible Editors size i set Visible Editor I Editor Reference visible Editors get i false for Iterator iter error Workbooks iterator iter has Next iter next editor Presentation set Active Editor Workbook FromID active WorkbookID 0 editor Presentation fix Visible Editor Update the active workbook if active WorkbookID 0 null editor Presentation set Active Editor Workbook FromID active WorkbookID 0 if active Editor 0 null page activate active Editor 0 public void handle Exception Throwable e The exception is already logged result add new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages get String Editor Manager exception Restoring Editor e NON NLS 1 return result  IPersistablePart IStatus restoreState IMemento MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString EditorManager problemsRestoringEditors activeWorkbookID ArrayList visibleEditors ArrayList IEditorPart activeEditor IEditorPart ArrayList errorWorkbooks ArrayList IMemento areaMem getChild IWorkbenchConstants TAG_AREA areaMem editorPresentation restoreState areaMem activeWorkbookID areaMem getString IWorkbenchConstants TAG_ACTIVE_WORKBOOK IMemento editorMems getChildren IWorkbenchConstants TAG_EDITOR editorMems restoreEditorState restoreEditorState editorMems visibleEditors activeEditor errorWorkbooks areaMem editorPresentation restorePresentationState areaMem SafeRunnable visibleEditors setVisibleEditor IEditorReference visibleEditors errorWorkbooks hasNext editorPresentation setActiveEditorWorkbookFromID activeWorkbookID editorPresentation fixVisibleEditor activeWorkbookID editorPresentation setActiveEditorWorkbookFromID activeWorkbookID activeEditor activeEditor handleException IStatus PLUGIN_ID WorkbenchMessages getString EditorManager exceptionRestoringEditor
Display get Current new Runnable public void run result 0 busy Restore Editor ref  getCurrent busyRestoreEditor
public I Status restore Editor final Editor ref final I Status result new I Status 1 Busy Indicator show While Display get Current new Runnable public void run result 0 busy Restore Editor ref return result 0  IStatus restoreEditor IStatus IStatus BusyIndicator showWhile getCurrent busyRestoreEditor
Platform run new Safe Runnable public void run I Editor Input editor Input ref get Restored Input if editor Input null result 0 unable To Create Editor ref null return Get the editor descriptor String editorID ref get Id Editor Descriptor desc null if editorID null I Editor Registry reg Workbench Plugin get Default get Editor Registry desc Editor Descriptor reg find Editor editorID if desc null Workbench Plugin log Unable to restore editor no editor descriptor for id editorID NON NLS 1 result 0 unable To Create Editor ref null return Open the editor try String workbookID ref get Memento get String I Workbench Constants TAG WORKBOOK editor Presentation set Active Editor Workbook FromID workbookID if desc is Internal open Internal Editor ref desc editor Input false TODO workaround it should be possible for the following code to be as follows ref get Pane create Control Composite page get Editor Presentation get Layout Part get Control OR something simpler like ref get Pane create Control Control ctrl ref get Pane get Control if ctrl null ref get Pane create Control Composite page get Editor Presentation get Layout Part get Control else ref get Pane create Child Control else if desc get Id equals I Editor Registry SYSTEM INPLACE EDITOR ID if open System In Place Editor ref desc editor Input null ref get Pane create Child Control else Workbench Plugin log Unable to restore in place editor In place support is missing NON NLS 1 result 0 unable To Create Editor ref null else Workbench Plugin log Unable to restore editor invalid editor descriptor for id editorID NON NLS 1 result 0 unable To Create Editor ref null TODO commented during presentation refactor Editor Pane ref get Pane get Workbook update Editor Tab ref catch Part Init Exception e Workbench Plugin log Exception creating editor e get Message NON NLS 1 result 0 unable To Create Editor ref e  SafeRunnable IEditorInput editorInput getRestoredInput editorInput unableToCreateEditor getId EditorDescriptor IEditorRegistry WorkbenchPlugin getDefault getEditorRegistry EditorDescriptor findEditor WorkbenchPlugin unableToCreateEditor getMemento getString IWorkbenchConstants TAG_WORKBOOK editorPresentation setActiveEditorWorkbookFromID isInternal openInternalEditor editorInput getPane createControl getEditorPresentation getLayoutPart getControl getPane createControl getPane getControl getPane createControl getEditorPresentation getLayoutPart getControl getPane createChildControl getId IEditorRegistry SYSTEM_INPLACE_EDITOR_ID openSystemInPlaceEditor editorInput getPane createChildControl WorkbenchPlugin unableToCreateEditor WorkbenchPlugin unableToCreateEditor EditorPane getPane getWorkbook updateEditorTab PartInitException WorkbenchPlugin getMessage unableToCreateEditor
public void handle Exception Throwable e result 0 unable To Create Editor ref e  handleException unableToCreateEditor
public I Status busy Restore Editor final Editor ref final I Status result new I Status 1 Platform run new Safe Runnable public void run I Editor Input editor Input ref get Restored Input if editor Input null result 0 unable To Create Editor ref null return Get the editor descriptor String editorID ref get Id Editor Descriptor desc null if editorID null I Editor Registry reg Workbench Plugin get Default get Editor Registry desc Editor Descriptor reg find Editor editorID if desc null Workbench Plugin log Unable to restore editor no editor descriptor for id editorID NON NLS 1 result 0 unable To Create Editor ref null return Open the editor try String workbookID ref get Memento get String I Workbench Constants TAG WORKBOOK editor Presentation set Active Editor Workbook FromID workbookID if desc is Internal open Internal Editor ref desc editor Input false TODO workaround it should be possible for the following code to be as follows ref get Pane create Control Composite page get Editor Presentation get Layout Part get Control OR something simpler like ref get Pane create Control Control ctrl ref get Pane get Control if ctrl null ref get Pane create Control Composite page get Editor Presentation get Layout Part get Control else ref get Pane create Child Control else if desc get Id equals I Editor Registry SYSTEM INPLACE EDITOR ID if open System In Place Editor ref desc editor Input null ref get Pane create Child Control else Workbench Plugin log Unable to restore in place editor In place support is missing NON NLS 1 result 0 unable To Create Editor ref null else Workbench Plugin log Unable to restore editor invalid editor descriptor for id editorID NON NLS 1 result 0 unable To Create Editor ref null TODO commented during presentation refactor Editor Pane ref get Pane get Workbook update Editor Tab ref catch Part Init Exception e Workbench Plugin log Exception creating editor e get Message NON NLS 1 result 0 unable To Create Editor ref e public void handle Exception Throwable e result 0 unable To Create Editor ref e if result 0 null return result 0 else return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1  IStatus busyRestoreEditor IStatus IStatus SafeRunnable IEditorInput editorInput getRestoredInput editorInput unableToCreateEditor getId EditorDescriptor IEditorRegistry WorkbenchPlugin getDefault getEditorRegistry EditorDescriptor findEditor WorkbenchPlugin unableToCreateEditor getMemento getString IWorkbenchConstants TAG_WORKBOOK editorPresentation setActiveEditorWorkbookFromID isInternal openInternalEditor editorInput getPane createControl getEditorPresentation getLayoutPart getControl getPane createControl getPane getControl getPane createControl getEditorPresentation getLayoutPart getControl getPane createChildControl getId IEditorRegistry SYSTEM_INPLACE_EDITOR_ID openSystemInPlaceEditor editorInput getPane createChildControl WorkbenchPlugin unableToCreateEditor WorkbenchPlugin unableToCreateEditor EditorPane getPane getWorkbook updateEditorTab PartInitException WorkbenchPlugin getMessage unableToCreateEditor handleException unableToCreateEditor IStatus PLUGIN_ID
Returns an error status to be displayed when unable to create an editor private I Status unable To Create Editor Editor ref Throwable t return new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format Editor Manager unable To Create Editor new String ref get Name t NON NLS 1  IStatus unableToCreateEditor IStatus PLUGIN_ID WorkbenchMessages EditorManager unableToCreateEditor getName
final boolean was Canceled new boolean 1 I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception progress Op run monitor was Canceled 0 monitor is Canceled  wasCanceled IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException progressOp wasCanceled isCanceled
Runs a progress monitor operation Returns true if success false if cancelled private static boolean run Progress Monitor Operation String op Name final I Runnable With Progress progress Op I Workbench Window window I Runnable Context ctx if window instanceof Application Window ctx window else ctx new Progress Monitor Jobs Dialog window get Shell final boolean was Canceled new boolean 1 I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception progress Op run monitor was Canceled 0 monitor is Canceled try ctx run false true runnable catch Invocation Target Exception e String title Workbench Messages format Editor Manager operation Failed new Object op Name NON NLS 1 Throwable target Exc e get Target Exception Workbench Plugin log title new Status I Status WARNING PlatformUI PLUGIN ID 0 title target Exc Message Dialog open Error window get Shell Workbench Messages get String Error NON NLS 1 title target Exc get Message catch Interrupted Exception e Ignore The user pressed cancel was Canceled 0 true return was Canceled 0  runProgressMonitorOperation opName IRunnableWithProgress progressOp IWorkbenchWindow IRunnableContext ApplicationWindow ProgressMonitorJobsDialog getShell wasCanceled IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException progressOp wasCanceled isCanceled InvocationTargetException WorkbenchMessages EditorManager operationFailed opName targetExc getTargetException WorkbenchPlugin IStatus PLUGIN_ID targetExc MessageDialog openError getShell WorkbenchMessages getString targetExc getMessage InterruptedException wasCanceled wasCanceled
Save all of the editors in the workbench Return true if successful Return false if the user has cancelled the command public boolean save All boolean confirm boolean closing Get the list of dirty editors If it is empty just return List dirty Editors collect Dirty Editors if dirty Editors size 0 return true If confirmation is required return save All dirty Editors confirm window NON NLS 1  saveAll dirtyEditors collectDirtyEditors dirtyEditors saveAll dirtyEditors
public static boolean save All List dirty Editors boolean confirm final I Workbench Window window if confirm Convert the list into an element collection Adaptable List input new Adaptable List dirty Editors List Selection Dialog dlg new List Selection Dialog window get Shell input new Base Workbench Content Provider new Workbench Part Label Provider RESOURCES TO SAVE MESSAGE dlg set Initial Selections dirty Editors to Array new Object dirty Editors size dlg set Title SAVE RESOURCES TITLE int result dlg open Just return false to prevent the operation continuing if result I Dialog Constants CANCEL ID return false dirty Editors Arrays as List dlg get Result if dirty Editors null return false If the editor list is empty return if dirty Editors size 0 return true Create save block issue reference to workspace runnable final List final Editors dirty Editors final I Workspace Runnable workspace Op new I Workspace Runnable public void run I Progress Monitor monitor monitor begin Task final Editors size NON NLS 1 Iterator enum final Editors iterator while enum has Next I Editor Part part I Editor Part enum next part do Save new Sub Progress Monitor monitor 1 if monitor is Canceled break I Runnable With Progress progress Op new I Runnable With Progress public void run I Progress Monitor monitor try issue reference to workspace to run runnable I Progress Monitor monitor Wrap new Event Loop Progress Monitor monitor Resources Plugin get Workspace run workspace Op monitor Wrap This code was in the I Workspace Runnable above monitor Wrap begin Task final Editors size NON NLS 1 Iterator enum final Editors iterator while enum has Next I Editor Part part I Editor Part enum next part do Save new Sub Progress Monitor monitor Wrap 1 if monitor Wrap is Canceled break monitor Wrap done catch Core Exception e I Status status new Status Status WARNING PlatformUI PLUGIN ID 0 Workbench Messages get String Editor Manager save Failed e NON NLS 1 Workbench Plugin log Workbench Messages get String Editor Manager save Failed status NON NLS 1 Error Dialog open Error window get Shell Workbench Messages get String Error NON NLS 1 Workbench Messages format Editor Manager save Failed Message new Object e get Message NON NLS 1 e get Status Do the save return run Progress Monitor Operation Workbench Messages get String Save All progress Op window NON NLS 1  saveAll dirtyEditors IWorkbenchWindow AdaptableList AdaptableList dirtyEditors ListSelectionDialog ListSelectionDialog getShell BaseWorkbenchContentProvider WorkbenchPartLabelProvider RESOURCES_TO_SAVE_MESSAGE setInitialSelections dirtyEditors toArray dirtyEditors setTitle SAVE_RESOURCES_TITLE IDialogConstants CANCEL_ID dirtyEditors asList getResult dirtyEditors dirtyEditors finalEditors dirtyEditors IWorkspaceRunnable workspaceOp IWorkspaceRunnable IProgressMonitor beginTask finalEditors finalEditors hasNext IEditorPart IEditorPart doSave SubProgressMonitor isCanceled IRunnableWithProgress progressOp IRunnableWithProgress IProgressMonitor IProgressMonitor monitorWrap EventLoopProgressMonitor ResourcesPlugin getWorkspace workspaceOp monitorWrap IWorkspaceRunnable monitorWrap beginTask finalEditors finalEditors hasNext IEditorPart IEditorPart doSave SubProgressMonitor monitorWrap monitorWrap isCanceled monitorWrap CoreException IStatus PLUGIN_ID WorkbenchMessages getString EditorManager saveFailed WorkbenchPlugin WorkbenchMessages getString EditorManager saveFailed ErrorDialog openError getShell WorkbenchMessages getString WorkbenchMessages EditorManager saveFailedMessage getMessage getStatus runProgressMonitorOperation WorkbenchMessages getString Save_All progressOp
Create save block I Runnable With Progress progress Op new I Runnable With Progress public void run I Progress Monitor monitor I Progress Monitor monitor Wrap new Event Loop Progress Monitor monitor saveable do Save monitor Wrap  IRunnableWithProgress progressOp IRunnableWithProgress IProgressMonitor IProgressMonitor monitorWrap EventLoopProgressMonitor doSave monitorWrap
public boolean save Part final I Saveable Part saveable I Workbench Part part boolean confirm Short circuit if saveable is Dirty return true If confirmation is required if confirm String message Workbench Messages format Editor Manager save Changes Question new Object part get Title NON NLS 1 Show a dialog String buttons new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL Message Dialog d new Message Dialog window get Shell Workbench Messages get String Save Resource NON NLS 1 null message Message Dialog QUESTION buttons 0 int choice d open Branch on the user choice The choice id is based on the order of button labels above switch choice case 0 yes break case 1 no return true default case 2 cancel return false Create save block I Runnable With Progress progress Op new I Runnable With Progress public void run I Progress Monitor monitor I Progress Monitor monitor Wrap new Event Loop Progress Monitor monitor saveable do Save monitor Wrap Do the save return run Progress Monitor Operation Workbench Messages get String Save progress Op window NON NLS 1  savePart ISaveablePart IWorkbenchPart isDirty WorkbenchMessages EditorManager saveChangesQuestion getTitle IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL MessageDialog MessageDialog getShell WorkbenchMessages getString Save_Resource MessageDialog IRunnableWithProgress progressOp IRunnableWithProgress IProgressMonitor IProgressMonitor monitorWrap EventLoopProgressMonitor doSave monitorWrap runProgressMonitorOperation WorkbenchMessages getString progressOp
Save and close an editor Return true if successful Return false if the user has cancelled the command public boolean save Editor I Editor Part part boolean confirm return save Part part part confirm  saveEditor IEditorPart savePart
see I Persistable Part public I Status save State final I Memento memento final Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Editor Manager problems Saving Editors null NON NLS 1 Save the editor area workbooks layout relationship I Memento editor Area Mem memento create Child I Workbench Constants TAG AREA result add editor Presentation save State editor Area Mem Save the active workbook id editor Area Mem put String I Workbench Constants TAG ACTIVE WORKBOOK editor Presentation get Active Editor WorkbookID Get each workbook Array List workbooks editor Presentation get Workbooks for Iterator iter workbooks iterator iter has Next Editor Stack workbook Editor Stack iter next Use the list of editors found in Editor Stack fix for 24091 Editor Pane editor Panes workbook get Editors for int i 0 i editor Panes length i Save each open editor I Editor Reference editor Reference editor Panes i get Editor Reference Editor e Editor editor Reference final I Editor Part editor editor Reference get Editor false if editor null if e get Memento null I Memento editor Mem memento create Child I Workbench Constants TAG EDITOR editor Mem put Memento e get Memento continue for dynamic UI add the next line to replace the subsequent code which is commented out save Editor State memento e result return result  IPersistablePart IStatus saveState IMemento MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString EditorManager problemsSavingEditors IMemento editorAreaMem createChild IWorkbenchConstants TAG_AREA editorPresentation saveState editorAreaMem editorAreaMem putString IWorkbenchConstants TAG_ACTIVE_WORKBOOK editorPresentation getActiveEditorWorkbookID ArrayList editorPresentation getWorkbooks hasNext EditorStack EditorStack EditorStack EditorPane editorPanes getEditors editorPanes IEditorReference editorReference editorPanes getEditorReference editorReference IEditorPart editorReference getEditor getMemento IMemento editorMem createChild IWorkbenchConstants TAG_EDITOR editorMem putMemento getMemento saveEditorState
Shows an editor If code set Focus true code then give it focus too return true if the active editor was changed false if not public boolean set Visible Editor I Editor Reference new Ed boolean set Focus return editor Presentation set Visible Editor new Ed set Focus  setFocus setVisibleEditor IEditorReference newEd setFocus editorPresentation setVisibleEditor newEd setFocus
private I Path Editor Input get Path Editor Input I Editor Input input if input instanceof I Path Editor Input return I Path Editor Input input return I Path Editor Input input get Adapter I Path Editor Input class  IPathEditorInput getPathEditorInput IEditorInput IPathEditorInput IPathEditorInput IPathEditorInput getAdapter IPathEditorInput
Constructs a new editor reference for use by editors being newly opened Editor initialize the necessary editor listeners and handlers init Listeners And Handlers  initListenersAndHandlers
Initializes the necessary editor listeners and handlers private void init Listeners And Handlers Create a property change listener to track the close editors automatically preference and show remove the pin icon on editors Only 1 listener will be created in the Editor Manager when necessary check Create Editor Prop Listener Create a keyboard shortcut handler for pinning editors Only 1 handler will be created in the Editor Manager when necessary check Create Pin Editor Shortcut Key Handler  initListenersAndHandlers EditorManager checkCreateEditorPropListener EditorManager checkCreatePinEditorShortcutKeyHandler
This method is called when there should be a change in the editor pin status added or removed so that it will ask its presentable part to fire a PROP TITLE event in order for the presentation to request the new icon for this editor public void pin Status Updated Part Pane part Pane get Pane Editor Pane editor Pane null if part Pane instanceof Editor Pane editor Pane Editor Pane part Pane I Presentable Part i Pres Part editor Pane get Presentable Part if i Pres Part instanceof Presentable Part Presentable Part i Pres Part fire Property Change I Workbench Part PROP TITLE  PROP_TITLE pinStatusUpdated PartPane partPane getPane EditorPane editorPane partPane EditorPane editorPane EditorPane partPane IPresentablePart iPresPart editorPane getPresentablePart iPresPart PresentablePart PresentablePart iPresPart firePropertyChange IWorkbenchPart PROP_TITLE
Constructs a new editor reference for use by editors being restored from a memento Editor I Memento memento this this editor Memento memento String id memento get String I Workbench Constants TAG ID String title memento get String I Workbench Constants TAG TITLE String tooltip Util safe String memento get String I Workbench Constants TAG TOOLTIP String part Name memento get String I Workbench Constants TAG PART NAME For compatibility set the part name to the title if not found if part Name null part Name title Get the editor descriptor Editor Descriptor desc null if id null I Editor Registry reg Workbench Plugin get Default get Editor Registry desc Editor Descriptor reg find Editor id desc may be null if id is null or desc is not found but find Image below handles this String location memento get String I Workbench Constants TAG PATH I Path path location null null new Path location Image Descriptor i Desc find Image desc path this name memento get String I Workbench Constants TAG NAME if this name null this name title this pinned true equals memento get String I Workbench Constants TAG PINNED NON NLS 1 I Memento input Mem memento get Child I Workbench Constants TAG INPUT if input Mem null this factory Id input Mem get String I Workbench Constants TAG FACTORY ID init id title tooltip i Desc part Name null  IMemento editorMemento getString IWorkbenchConstants TAG_ID getString IWorkbenchConstants TAG_TITLE safeString getString IWorkbenchConstants TAG_TOOLTIP partName getString IWorkbenchConstants TAG_PART_NAME partName partName EditorDescriptor IEditorRegistry WorkbenchPlugin getDefault getEditorRegistry EditorDescriptor findEditor findImage getString IWorkbenchConstants TAG_PATH IPath ImageDescriptor iDesc findImage getString IWorkbenchConstants TAG_NAME getString IWorkbenchConstants TAG_PINNED IMemento inputMem getChild IWorkbenchConstants TAG_INPUT inputMem factoryId inputMem getString IWorkbenchConstants TAG_FACTORY_ID iDesc partName
public String get Factory Id I Editor Part editor get Editor false if editor null I Persistable Element persistable editor get Editor Input get Persistable if persistable null return persistable get Factory Id return null return factory Id  getFactoryId IEditorPart getEditor IPersistableElement getEditorInput getPersistable getFactoryId factoryId
protected String compute Part Name if part instanceof I Workbench Part2 return super compute Part Name else return get Raw Title  computePartName IWorkbenchPart2 computePartName getRawTitle
public String get Name if part null return get Editor false get Editor Input get Name return name  getName getEditor getEditorInput getName
public I Workbench Part get Part boolean restore return get Editor restore  IWorkbenchPart getPart getEditor
public I Editor Part get Editor boolean restore if part null return I Editor Part part if restore editor Memento null return null I Status status restore Editor this Workbench workbench Workbench window get Workbench if status get Severity I Status ERROR editor Memento null page close Editor this false if closing Editor Status null closing Editor Status add status else if workbench is Starting Error Dialog open Error window get Shell Workbench Messages get String Editor Manager unable To Restore Editor Title NON NLS 1 Workbench Messages format Editor Manager unable To Restore Editor Message new String get Name NON NLS 1 status I Status WARNING I Status ERROR set Pane get Pane release References return I Editor Part part  IEditorPart getEditor IEditorPart editorMemento IStatus restoreEditor getWorkbench getSeverity IStatus editorMemento closeEditor closingEditorStatus closingEditorStatus isStarting ErrorDialog openError getShell WorkbenchMessages getString EditorManager unableToRestoreEditorTitle WorkbenchMessages EditorManager unableToRestoreEditorMessage getName IStatus IStatus setPane getPane releaseReferences IEditorPart
public void release References super release References editor Memento null name null factory Id null restored Input null  releaseReferences releaseReferences editorMemento factoryId restoredInput
restored Input null void set Name String name this name name  restoredInput setName
public void set Part I Workbench Part part super set Part part if part null return Editor Site site Editor Site part get Site if site null site set Reuse Editor pinned  setPart IWorkbenchPart setPart EditorSite EditorSite getSite setReuseEditor
public I Memento get Memento return editor Memento  IMemento getMemento editorMemento
public boolean is Dirty if part null return false return I Editor Part part is Dirty  isDirty IEditorPart isDirty
public boolean is Pinned if part null return Editor Site I Editor Part part get Editor Site get Reuse Editor return pinned  isPinned EditorSite IEditorPart getEditorSite getReuseEditor
return pinned public void set Pinned boolean pinned this pinned pinned  setPinned
this pinned pinned public I Workbench Page get Page return page  IWorkbenchPage getPage
public void dispose check Delete Editor Resources super dispose editor Memento null  checkDeleteEditorResources editorMemento
public I Editor Input get Restored Input if restored Input null return restored Input Get the input factory I Memento editor Mem get Memento if editor Mem null return null I Memento input Mem editor Mem get Child I Workbench Constants TAG INPUT String factoryID null if input Mem null factoryID input Mem get String I Workbench Constants TAG FACTORY ID if factoryID null Workbench Plugin log Unable to restore editor no input factory ID NON NLS 1 return null I Adaptable input String label get Name null get Name factoryID try UI Stats start UI Stats CREATE PART INPUT label I Element Factory factory PlatformUI get Workbench get Element Factory factoryID if factory null Workbench Plugin log Unable to restore editor cannot instantiate input element factory factoryID NON NLS 1 return null Get the input element input factory create Element input Mem if input null Workbench Plugin log Unable to restore editor create Element returned null for input element factory factoryID NON NLS 1 return null finally UI Stats end UI Stats CREATE PART INPUT label if input instanceof I Editor Input Workbench Plugin log Unable to restore editor create Element result is not an I Editor Input for input element factory factoryID NON NLS 1 return null restored Input I Editor Input input return restored Input  IEditorInput getRestoredInput restoredInput restoredInput IMemento editorMem getMemento editorMem IMemento inputMem editorMem getChild IWorkbenchConstants TAG_INPUT inputMem inputMem getString IWorkbenchConstants TAG_FACTORY_ID WorkbenchPlugin IAdaptable getName getName UIStats UIStats CREATE_PART_INPUT IElementFactory getWorkbench getElementFactory WorkbenchPlugin createElement inputMem WorkbenchPlugin createElement UIStats UIStats CREATE_PART_INPUT IEditorInput WorkbenchPlugin createElement IEditorInput restoredInput IEditorInput restoredInput
public Image get Title Image Image img super get Title Image if is Pinned return img Check if the pinned preference is set I Preference Store pref Store Workbench Plugin get Default get Preference Store boolean b Use Pin pref Store get Boolean I Preference Constants REUSE EDITORS BOOLEAN if b Use Pin return img Image Descriptor pin Desc get Editor Pin Image Desc if pin Desc null return img Image Wrapper img Desc new Image Wrapper img Overlay Icon overlay Icon new Overlay Icon img Desc pin Desc new Point 16 16 try to get the image from the cache otherwise create it and cache it int img Hash Code overlay Icon hash Code Integer img Hash Key new Integer img Hash Code Image image Image img Hashtable get img Hash Key if image null image overlay Icon create Image img Hashtable put img Hash Key image return image  getTitleImage getTitleImage isPinned IPreferenceStore prefStore WorkbenchPlugin getDefault getPreferenceStore bUsePin prefStore getBoolean IPreferenceConstants REUSE_EDITORS_BOOLEAN bUsePin ImageDescriptor pinDesc getEditorPinImageDesc pinDesc ImageWrapper imgDesc ImageWrapper OverlayIcon overlayIcon OverlayIcon imgDesc pinDesc imgHashCode overlayIcon hashCode imgHashKey imgHashCode imgHashtable imgHashKey overlayIcon createImage imgHashtable imgHashKey
Constructor param img the Image to hold on to public Image Wrapper Image img Assert is Not Null img image img  ImageWrapper isNotNull
see org eclipse jface resource Image Descriptor get Image Data public Image Data get Image Data return image null null image get Image Data  ImageDescriptor getImageData ImageData getImageData getImageData
see Object hash Code public int hash Code return Util hash Code image  hashCode hashCode hashCode
public boolean equals Object obj if obj instanceof Image Wrapper return false Image Wrapper img Wrap Image Wrapper obj return Util equals this image img Wrap image  ImageWrapper ImageWrapper imgWrap ImageWrapper imgWrap
protected void restore Editor State I Memento editor Mem Array List visible Editors I Editor Part active Editor Array List error Workbooks Multi Status result String str Focus editor Mem get String I Workbench Constants TAG FOCUS boolean visible Editor true equals str Focus NON NLS 1 Editor e new Editor editor Mem if visible Editor visible Editors add e page add Part e result add restore Editor e I Editor Part editor I Editor Part e get Part true if editor null String str Active Part editor Mem get String I Workbench Constants TAG ACTIVE PART if true equals str Active Part NON NLS 1 active Editor 0 editor else page close Editor e false visible Editors remove e error Workbooks add editor Mem get String I Workbench Constants TAG WORKBOOK else if e get Factory Id null Workbench Plugin log Unable to restore editor no input factory ID NON NLS 1 if editor Mem get String I Workbench Constants TAG TITLE null backward compatible format of workbench xml result add restore Editor e I Editor Part editor I Editor Part e get Part true if editor null page close Editor e false visible Editors remove e error Workbooks add editor Mem get String I Workbench Constants TAG WORKBOOK page add Part e else if the editor is not visible ensure it is put in the correct workbook PR 24091 String workbookID editor Mem get String I Workbench Constants TAG WORKBOOK editor Presentation set Active Editor Workbook FromID workbookID page add Part e try create Editor Tab e null null false catch Part Init Exception ex result add ex get Status  restoreEditorState IMemento editorMem ArrayList visibleEditors IEditorPart activeEditor ArrayList errorWorkbooks MultiStatus strFocus editorMem getString IWorkbenchConstants TAG_FOCUS visibleEditor strFocus editorMem visibleEditor visibleEditors addPart restoreEditor IEditorPart IEditorPart getPart strActivePart editorMem getString IWorkbenchConstants TAG_ACTIVE_PART strActivePart activeEditor closeEditor visibleEditors errorWorkbooks editorMem getString IWorkbenchConstants TAG_WORKBOOK getFactoryId WorkbenchPlugin editorMem getString IWorkbenchConstants TAG_TITLE restoreEditor IEditorPart IEditorPart getPart closeEditor visibleEditors errorWorkbooks editorMem getString IWorkbenchConstants TAG_WORKBOOK addPart editorMem getString IWorkbenchConstants TAG_WORKBOOK editorPresentation setActiveEditorWorkbookFromID addPart createEditorTab PartInitException getStatus
Platform run new Safe Runnable public void run Get the input I Editor Input input editor get Editor Input I Persistable Element persistable input get Persistable if persistable null return Save editor I Memento editor Mem memento create Child I Workbench Constants TAG EDITOR editor Mem put String I Workbench Constants TAG TITLE editor Ref get Title editor Mem put String I Workbench Constants TAG NAME editor Ref get Name editor Mem put String I Workbench Constants TAG ID editor Ref get Id editor Mem put String I Workbench Constants TAG TOOLTIP editor Ref get Title Tool Tip NON NLS 1 editor Mem put String I Workbench Constants TAG PART NAME editor Ref get Part Name if site get Reuse Editor editor Mem put String I Workbench Constants TAG PINNED true NON NLS 1 Editor Pane editor Pane Editor Pane Editor Site editor get Editor Site get Pane editor Mem put String I Workbench Constants TAG WORKBOOK editor Pane get Workbook getID if editor page get Active Part editor Mem put String I Workbench Constants TAG ACTIVE PART true NON NLS 1 if editor Pane editor Pane get Workbook get Visible Editor editor Mem put String I Workbench Constants TAG FOCUS true NON NLS 1 TODO DDW dynamic UI a check for a null input was deliberately removed here if input instanceof I Path Editor Input editor Mem put String I Workbench Constants TAG PATH I Path Editor Input input get Path to String Save input I Memento input Mem editor Mem create Child I Workbench Constants TAG INPUT input Mem put String I Workbench Constants TAG FACTORY ID persistable get Factory Id persistable save State input Mem  SafeRunnable IEditorInput getEditorInput IPersistableElement getPersistable IMemento editorMem createChild IWorkbenchConstants TAG_EDITOR editorMem putString IWorkbenchConstants TAG_TITLE editorRef getTitle editorMem putString IWorkbenchConstants TAG_NAME editorRef getName editorMem putString IWorkbenchConstants TAG_ID editorRef getId editorMem putString IWorkbenchConstants TAG_TOOLTIP editorRef getTitleToolTip editorMem putString IWorkbenchConstants TAG_PART_NAME editorRef getPartName getReuseEditor editorMem putString IWorkbenchConstants TAG_PINNED EditorPane editorPane EditorPane EditorSite getEditorSite getPane editorMem putString IWorkbenchConstants TAG_WORKBOOK editorPane getWorkbook getActivePart editorMem putString IWorkbenchConstants TAG_ACTIVE_PART editorPane editorPane getWorkbook getVisibleEditor editorMem putString IWorkbenchConstants TAG_FOCUS IPathEditorInput editorMem putString IWorkbenchConstants TAG_PATH IPathEditorInput getPath toString IMemento inputMem editorMem createChild IWorkbenchConstants TAG_INPUT inputMem putString IWorkbenchConstants TAG_FACTORY_ID getFactoryId saveState inputMem
public void handle Exception Throwable e result add new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format Editor Manager unable To Save Editor new String editor Ref get Title NON NLS 1 e  handleException IStatus PLUGIN_ID WorkbenchMessages EditorManager unableToSaveEditor editorRef getTitle
for dynamic UI protected void save Editor State I Memento mem I Editor Reference ed Multi Status res final Editor editor Ref Editor ed final I Editor Part editor ed get Editor false final I Memento memento mem final Multi Status result res final Editor Site site Editor Site editor get Editor Site if site get Pane instanceof Multi Editor Inner Pane return Platform run new Safe Runnable public void run Get the input I Editor Input input editor get Editor Input I Persistable Element persistable input get Persistable if persistable null return Save editor I Memento editor Mem memento create Child I Workbench Constants TAG EDITOR editor Mem put String I Workbench Constants TAG TITLE editor Ref get Title editor Mem put String I Workbench Constants TAG NAME editor Ref get Name editor Mem put String I Workbench Constants TAG ID editor Ref get Id editor Mem put String I Workbench Constants TAG TOOLTIP editor Ref get Title Tool Tip NON NLS 1 editor Mem put String I Workbench Constants TAG PART NAME editor Ref get Part Name if site get Reuse Editor editor Mem put String I Workbench Constants TAG PINNED true NON NLS 1 Editor Pane editor Pane Editor Pane Editor Site editor get Editor Site get Pane editor Mem put String I Workbench Constants TAG WORKBOOK editor Pane get Workbook getID if editor page get Active Part editor Mem put String I Workbench Constants TAG ACTIVE PART true NON NLS 1 if editor Pane editor Pane get Workbook get Visible Editor editor Mem put String I Workbench Constants TAG FOCUS true NON NLS 1 TODO DDW dynamic UI a check for a null input was deliberately removed here if input instanceof I Path Editor Input editor Mem put String I Workbench Constants TAG PATH I Path Editor Input input get Path to String Save input I Memento input Mem editor Mem create Child I Workbench Constants TAG INPUT input Mem put String I Workbench Constants TAG FACTORY ID persistable get Factory Id persistable save State input Mem public void handle Exception Throwable e result add new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format Editor Manager unable To Save Editor new String editor Ref get Title NON NLS 1 e  saveEditorState IMemento IEditorReference MultiStatus editorRef IEditorPart getEditor IMemento MultiStatus EditorSite EditorSite getEditorSite getPane MultiEditorInnerPane SafeRunnable IEditorInput getEditorInput IPersistableElement getPersistable IMemento editorMem createChild IWorkbenchConstants TAG_EDITOR editorMem putString IWorkbenchConstants TAG_TITLE editorRef getTitle editorMem putString IWorkbenchConstants TAG_NAME editorRef getName editorMem putString IWorkbenchConstants TAG_ID editorRef getId editorMem putString IWorkbenchConstants TAG_TOOLTIP editorRef getTitleToolTip editorMem putString IWorkbenchConstants TAG_PART_NAME editorRef getPartName getReuseEditor editorMem putString IWorkbenchConstants TAG_PINNED EditorPane editorPane EditorPane EditorSite getEditorSite getPane editorMem putString IWorkbenchConstants TAG_WORKBOOK editorPane getWorkbook getActivePart editorMem putString IWorkbenchConstants TAG_ACTIVE_PART editorPane editorPane getWorkbook getVisibleEditor editorMem putString IWorkbenchConstants TAG_FOCUS IPathEditorInput editorMem putString IWorkbenchConstants TAG_PATH IPathEditorInput getPath toString IMemento inputMem editorMem createChild IWorkbenchConstants TAG_INPUT inputMem putString IWorkbenchConstants TAG_FACTORY_ID getFactoryId saveState inputMem handleException IStatus PLUGIN_ID WorkbenchMessages EditorManager unableToSaveEditor editorRef getTitle
for dynamic UI public I Memento get Memento I Editor Reference e if e instanceof Editor return Editor e get Memento return null  IMemento getMemento IEditorReference getMemento

private class Overrides implements I Contribution Manager Overrides Indicates that the items of this manager are allowed to enable code true code by default public void update Enabled Allowed update the items in the map I Contribution Item items Editor Menu Manager super get Items for int i 0 i items length i I Contribution Item item items i item update I Contribution Manager Overrides P ENABLED update the wrapped menus if wrappers null for int i 0 i wrappers size i Editor Menu Manager manager Editor Menu Manager wrappers get i manager set Enabled Allowed enabled Allowed  IContributionManagerOverrides updateEnabledAllowed IContributionItem EditorMenuManager getItems IContributionItem IContributionManagerOverrides P_ENABLED EditorMenuManager EditorMenuManager setEnabledAllowed enabledAllowed
public Boolean get Enabled I Contribution Item item if item instanceof Action Contribution Item Action Contribution Item item get Action instanceof Retarget Action enabled Allowed return null else return Boolean FALSE  getEnabled IContributionItem ActionContributionItem ActionContributionItem getAction RetargetAction enabledAllowed
public Integer get Accelerator I Contribution Item item if get Enabled item null return get Parent Menu Manager get Overrides get Accelerator item else no acclerator if the item is disabled return new Integer 0  getAccelerator IContributionItem getEnabled getParentMenuManager getOverrides getAccelerator
return new Integer 0 public String get Accelerator Text I Contribution Item item return get Parent Menu Manager get Overrides get Accelerator Text item  getAcceleratorText IContributionItem getParentMenuManager getOverrides getAcceleratorText
return get Parent Menu Manager get Overrides get Accelerator Text item public String get Text I Contribution Item item return get Parent Menu Manager get Overrides get Text item  getParentMenuManager getOverrides getAcceleratorText getText IContributionItem getParentMenuManager getOverrides getText
private Overrides overrides new Overrides Constructs a new editor manager public Editor Menu Manager I Menu Manager mgr super mgr  EditorMenuManager IMenuManager
Method declared on I Contribution Manager public I Contribution Item get Items return get Parent Menu Manager get Items  IContributionManager IContributionItem getItems getParentMenuManager getItems
Method declared on I Contribution Manager public I Contribution Manager Overrides get Overrides return overrides  IContributionManager IContributionManagerOverrides getOverrides
public void insert After String id I Contribution Item item I Contribution Item ref Item Plugin Action Set Builder find Insertion Point id null get Parent Menu Manager false if ref Item null super insert After ref Item get Id item else Workbench Plugin log Reference item id not found for action item get Id NON NLS 1 NON NLS 2  insertAfter IContributionItem IContributionItem refItem PluginActionSetBuilder findInsertionPoint getParentMenuManager refItem insertAfter refItem getId WorkbenchPlugin getId
exist within the toolbar to ensure a consistent order for actions public void prepend To Group String group Name I Contribution Item item insert After group Name item  prependToGroup groupName IContributionItem insertAfter groupName
Sets the visibility of the manager If the visibility is code true code then each item within the manager appears within the parent manager Otherwise the items are not visible p If force visibility is code true code or grayed out if force visibility is code false code p This is a workaround for the layout flashing when editors contribute large amounts of items p param visible the new visibility param force Visibility whether to change the visibility or just the enablement state public void set Visible boolean visible boolean force Visibility if visible if force Visibility Make the items visible if enabled Allowed set Enabled Allowed true else if enabled Allowed set Enabled Allowed false if is Visible set Visible true else if force Visibility Remove the editor menu items set Visible false else Disable the editor menu items set Enabled Allowed false  forceVisibility setVisible forceVisibility forceVisibility enabledAllowed setEnabledAllowed enabledAllowed setEnabledAllowed isVisible setVisible forceVisibility setVisible setEnabledAllowed
Sets the enablement ability of all the items contributed by the editor param enabled Allowed code true code if the items may enable since 2 0 public void set Enabled Allowed boolean enabled Allowed if this enabled Allowed enabled Allowed return this enabled Allowed enabled Allowed overrides update Enabled Allowed  enabledAllowed setEnabledAllowed enabledAllowed enabledAllowed enabledAllowed enabledAllowed enabledAllowed updateEnabledAllowed
protected Sub Menu Manager wrap Menu I Menu Manager menu if wrappers null wrappers new Array List Editor Menu Manager manager new Editor Menu Manager menu wrappers add manager return manager  SubMenuManager wrapMenu IMenuManager ArrayList EditorMenuManager EditorMenuManager
protected I Action get All Contributed Actions Hash Set set new Hash Set get All Contributed Actions set return I Action set to Array new I Action set size  IAction getAllContributedActions HashSet HashSet getAllContributedActions IAction toArray IAction
protected void get All Contributed Actions Hash Set set I Contribution Item items super get Items for int i 0 i items length i get All Contributed Actions set items i if wrappers null return for Iterator iter wrappers iterator iter has Next Editor Menu Manager element Editor Menu Manager iter next element get All Contributed Actions set  getAllContributedActions HashSet IContributionItem getItems getAllContributedActions hasNext EditorMenuManager EditorMenuManager getAllContributedActions
protected void get All Contributed Actions Hash Set set I Contribution Item item if item instanceof Menu Manager I Contribution Item sub Items Menu Manager item get Items for int j 0 j sub Items length j get All Contributed Actions set sub Items j else if item instanceof Action Contribution Item set add Action Contribution Item item get Action  getAllContributedActions HashSet IContributionItem MenuManager IContributionItem subItems MenuManager getItems subItems getAllContributedActions subItems ActionContributionItem ActionContributionItem getAction

Constructs an editor pane for an editor part public Editor Pane I Editor Reference ref Workbench Page page Editor Stack workbook super ref page this workbook workbook  EditorPane IEditorReference WorkbenchPage EditorStack
class Error Editor Part extends Editor Part private Text text public void do Save I Progress Monitor monitor  ErrorEditorPart EditorPart doSave IProgressMonitor
private Text text public void do Save I Progress Monitor monitor public void do Save As  doSave IProgressMonitor doSaveAs
public void do Save I Progress Monitor monitor public void do Save As public void init I Editor Site site I Editor Input input set Site site set Input input  doSave IProgressMonitor doSaveAs IEditorSite IEditorInput setSite setInput
set Input input public boolean is Dirty return false  setInput isDirty
public boolean is Dirty return false public boolean is Save As Allowed return false  isDirty isSaveAsAllowed
public boolean is Save As Allowed return false public void create Part Control Composite parent text new Text parent SWT MULTI SWT READ ONLY SWT WRAP text set Foreground J Face Colors get Error Text text get Display text set Background text get Display get System Color SWT COLOR WIDGET BACKGROUND text set Text Workbench Messages get String Editor Pane error Message NON NLS 1  isSaveAsAllowed createPartControl READ_ONLY setForeground JFaceColors getErrorText getDisplay setBackground getDisplay getSystemColor COLOR_WIDGET_BACKGROUND setText WorkbenchMessages getString EditorPane errorMessage
text set Text Workbench Messages get String Editor Pane error Message NON NLS 1 public void set Focus if text null text set Focus  setText WorkbenchMessages getString EditorPane errorMessage setFocus setFocus
if text null text set Focus protected void set Part Name String title super set Part Name title  setFocus setPartName setPartName
super set Part Name title protected void set Title Tool Tip String text super set Title Tool Tip text  setPartName setTitleToolTip setTitleToolTip
protected I Workbench Part create Error Part I Workbench Part old Part class Error Editor Part extends Editor Part private Text text public void do Save I Progress Monitor monitor public void do Save As public void init I Editor Site site I Editor Input input set Site site set Input input public boolean is Dirty return false public boolean is Save As Allowed return false public void create Part Control Composite parent text new Text parent SWT MULTI SWT READ ONLY SWT WRAP text set Foreground J Face Colors get Error Text text get Display text set Background text get Display get System Color SWT COLOR WIDGET BACKGROUND text set Text Workbench Messages get String Editor Pane error Message NON NLS 1 public void set Focus if text null text set Focus protected void set Part Name String title super set Part Name title protected void set Title Tool Tip String text super set Title Tool Tip text I Editor Part old Editor Part I Editor Part old Part Editor Site old Editor Site Editor Site old Editor Part get Editor Site Error Editor Part new Part new Error Editor Part new Part set Part Name old Part get Title new Part set Title Tool Tip old Part get Title Tool Tip old Editor Site set Part new Part new Part init old Editor Site old Editor Part get Editor Input return new Part  IWorkbenchPart createErrorPart IWorkbenchPart oldPart ErrorEditorPart EditorPart doSave IProgressMonitor doSaveAs IEditorSite IEditorInput setSite setInput isDirty isSaveAsAllowed createPartControl READ_ONLY setForeground JFaceColors getErrorText getDisplay setBackground getDisplay getSystemColor COLOR_WIDGET_BACKGROUND setText WorkbenchMessages getString EditorPane errorMessage setFocus setFocus setPartName setPartName setTitleToolTip setTitleToolTip IEditorPart oldEditorPart IEditorPart oldPart EditorSite oldEditorSite EditorSite oldEditorPart getEditorSite ErrorEditorPart newPart ErrorEditorPart newPart setPartName oldPart getTitle newPart setTitleToolTip oldPart getTitleToolTip oldEditorSite setPart newPart newPart oldEditorSite oldEditorPart getEditorInput newPart
Editor panes do not need a title bar The editor title and close icon are part of the tab containing the editor Tools and menus are added directly into the workbench toolbar and menu bar protected void create Title Bar do nothing  createTitleBar
see Part Pane do Hide public void do Hide get Page close Editor get Editor Reference true  PartPane doHide doHide getPage closeEditor getEditorReference
Answer the editor part child public I Editor Reference get Editor Reference return I Editor Reference get Part Reference  IEditorReference getEditorReference IEditorReference getPartReference
Answer the SWT widget style int get Style return SWT NONE  getStyle
Answer the editor workbook container public Editor Stack get Workbook return workbook  EditorStack getWorkbook
Notify the workbook page that the part pane has been activated by the user protected void request Activation By clearing the active workbook if its not the one associated with the editor we reduce draw flicker if workbook is Active Workbook workbook get Editor Area set Active Workbook null false super request Activation  requestActivation isActiveWorkbook getEditorArea setActiveWorkbook requestActivation
Set the editor workbook container public void set Workbook Editor Stack editor Workbook workbook editor Workbook  setWorkbook EditorStack editorWorkbook editorWorkbook
Method declared on Part Pane package void shell Activated this workbook draw Gradient  PartPane shellActivated drawGradient
Method declared on Part Pane package void shell Deactivated this workbook draw Gradient  PartPane shellDeactivated drawGradient
public void set Focus super set Focus workbook become Active Workbook true  setFocus setFocus becomeActiveWorkbook
Indicate focus in part public void show Focus boolean in Focus if in Focus this workbook become Active Workbook true else this workbook set Active this workbook is Active Workbook Stack Presentation AS ACTIVE NOFOCUS Stack Presentation AS INACTIVE  showFocus inFocus inFocus becomeActiveWorkbook setActive isActiveWorkbook StackPresentation AS_ACTIVE_NOFOCUS StackPresentation AS_INACTIVE
item add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Workbench Part part get Part Reference get Part true if part null this should never happen item set Selection false item set Enabled false else Editor Site part get Site set Reuse Editor item get Selection  addSelectionListener SelectionAdapter widgetSelected SelectionEvent IWorkbenchPart getPartReference getPart setSelection setEnabled EditorSite getSite setReuseEditor getSelection
Add the pin menu item on the editor system menu protected void add Pin Editor Item Menu parent boolean reuse Editor Workbench Plugin get Default get Preference Store get Boolean I Preference Constants REUSE EDITORS BOOLEAN if reuse Editor return I Workbench Part part get Part Reference get Part false if part null return final Menu Item item new Menu Item parent SWT CHECK item set Text Workbench Messages get String Editor Pane pin Editor NON NLS 1 item add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Workbench Part part get Part Reference get Part true if part null this should never happen item set Selection false item set Enabled false else Editor Site part get Site set Reuse Editor item get Selection item set Enabled true item set Selection Editor Site part get Site get Reuse Editor  addPinEditorItem reuseEditor WorkbenchPlugin getDefault getPreferenceStore getBoolean IPreferenceConstants REUSE_EDITORS_BOOLEAN reuseEditor IWorkbenchPart getPartReference getPart MenuItem MenuItem setText WorkbenchMessages getString EditorPane pinEditor addSelectionListener SelectionAdapter widgetSelected SelectionEvent IWorkbenchPart getPartReference getPart setSelection setEnabled EditorSite getSite setReuseEditor getSelection setEnabled setSelection EditorSite getSite getReuseEditor
Update the title attributes for the pane public void update Titles TODO commented during presentation refactor workbook update Editor Tab get Editor Reference  updateTitles updateEditorTab getEditorReference
public void test Invariants super test Invariants if get Container null Assert is True get Container workbook  testInvariants testInvariants getContainer isTrue getContainer
see org eclipse ui internal Part Pane get Name public String get Name return null  PartPane getName getName
see org eclipse ui internal Part Pane get Tool Bar public Control get Tool Bar return null  PartPane getToolBar getToolBar

This class adds the requirement that action delegates loaded on demand implement I View Action Delegate public Editor Plugin Action I Configuration Element action Element I Editor Part part String id int style super action Element id style if part null editor Changed part  IViewActionDelegate EditorPluginAction IConfigurationElement actionElement IEditorPart actionElement editorChanged
This class adds the requirement that action delegates loaded on demand implement I View Action Delegate deprecated Please use the other constructor instead see Editor Plugin Action Editor Plugin Action I Configuration Element I Editor Part String int public Editor Plugin Action I Configuration Element action Element String run Attribute I Editor Part part String id int style this action Element part id style  IViewActionDelegate EditorPluginAction EditorPluginAction IConfigurationElement IEditorPart EditorPluginAction IConfigurationElement actionElement runAttribute IEditorPart actionElement
protected I Action Delegate validate Delegate Object obj throws Workbench Exception if obj instanceof I Editor Action Delegate return I Editor Action Delegate obj else throw new Workbench Exception Action must implement I Editor Action Delegate NON NLS 1  IActionDelegate validateDelegate WorkbenchException IEditorActionDelegate IEditorActionDelegate WorkbenchException IEditorActionDelegate
Method declared on Plugin Action protected void init Delegate super init Delegate I Editor Action Delegate get Delegate set Active Editor this current Editor  PluginAction initDelegate initDelegate IEditorActionDelegate getDelegate setActiveEditor currentEditor
Handles editor change by re registering for selection changes and updating I Editor Action Delegate public void editor Changed I Editor Part part if current Editor null unregister Selection Listener current Editor current Editor part if get Delegate null is Ok To Create Delegate create Delegate if get Delegate null I Editor Action Delegate get Delegate set Active Editor this part if part null register Selection Listener part  IEditorActionDelegate editorChanged IEditorPart currentEditor unregisterSelectionListener currentEditor currentEditor getDelegate isOkToCreateDelegate createDelegate getDelegate IEditorActionDelegate getDelegate setActiveEditor registerSelectionListener

public Editor Sash Container String editor Id Workbench Page page super editor Id page this part Drop Listener listener this page page create Default Workbook  EditorSashContainer editorId WorkbenchPage editorId partDropListener createDefaultWorkbook
Add an editor to the active workbook public void add Editor Editor Pane pane Editor Stack workbook get Active Workbook workbook add pane  addEditor EditorPane EditorStack getActiveWorkbook
Notification that a child layout part has been added to the container Subclasses may override this method to perform any container specific work protected void child Added Layout Part child if child instanceof Editor Stack editor Workbooks add child  childAdded LayoutPart EditorStack editorWorkbooks
Notification that a child layout part has been removed from the container Subclasses may override this method to perform any container specific work protected void child Removed Layout Part child if child instanceof Editor Stack editor Workbooks remove child if active Editor Workbook child set Active Workbook null false  childRemoved LayoutPart EditorStack editorWorkbooks activeEditorWorkbook setActiveWorkbook
protected Editor Stack create Default Workbook Editor Stack new Workbook Editor Stack new Editor Workbook this page new Workbook setID DEFAULT WORKBOOK ID add new Workbook return new Workbook  EditorStack createDefaultWorkbook EditorStack newWorkbook EditorStack newEditorWorkbook newWorkbook DEFAULT_WORKBOOK_ID newWorkbook newWorkbook
Subclasses override this method to specify the composite to use to parent all children layout parts it contains protected Composite create Parent Composite parent Widget return new Composite parent Widget SWT NONE  createParent parentWidget parentWidget
Dispose of the editor area public void dispose Free editor workbooks Iterator iter editor Workbooks iterator while iter has Next Editor Stack wb Editor Stack iter next wb dispose editor Workbooks clear Free rest super dispose  editorWorkbooks hasNext EditorStack EditorStack editorWorkbooks
Subclasses override this method to dispose of any swt resources created during create Parent protected void dispose Parent this parent dispose  createParent disposeParent
Return the editor workbook which is active public Editor Stack get Active Workbook if active Editor Workbook null if editor Workbooks size 1 set Active Workbook create Default Workbook false else set Active Workbook Editor Stack editor Workbooks get 0 false return active Editor Workbook  EditorStack getActiveWorkbook activeEditorWorkbook editorWorkbooks setActiveWorkbook createDefaultWorkbook setActiveWorkbook EditorStack editorWorkbooks activeEditorWorkbook
Return the editor workbook id which is active public String get Active WorkbookID return get Active Workbook getID  getActiveWorkbookID getActiveWorkbook
Return the all the editor workbooks public Array List get Editor Workbooks return Array List editor Workbooks clone  ArrayList getEditorWorkbooks ArrayList editorWorkbooks
Return the all the editor workbooks public int get Editor Workbook Count return editor Workbooks size  getEditorWorkbookCount editorWorkbooks
Return true is the workbook specified is the active one protected boolean is Active Workbook Editor Stack workbook return active Editor Workbook workbook  isActiveWorkbook EditorStack activeEditorWorkbook
Find the sashs around the specified part public void find Sashes Layout Part pane Part Pane Sashes sashes Find the sashes around the current editor and then the sashes around the editor area super find Sashes pane sashes I Layout Container container get Container if container null container find Sashes this sashes  findSashes LayoutPart PartPane findSashes ILayoutContainer getContainer findSashes
Remove all the editors public void remove All Editors Editor Stack current Workbook get Active Workbook Iterate over a copy so the original can be modified Iterator workbooks Array List editor Workbooks clone iterator while workbooks has Next Editor Stack workbook Editor Stack workbooks next workbook remove All if workbook current Workbook remove workbook workbook dispose  removeAllEditors EditorStack currentWorkbook getActiveWorkbook ArrayList editorWorkbooks hasNext EditorStack EditorStack removeAll currentWorkbook
Remove an editor from its workbook public void remove Editor Editor Pane pane Editor Stack workbook pane get Workbook if workbook null return workbook remove pane remove the editor workbook if empty if workbook get Item Count 1 editor Workbooks size 1 remove workbook workbook dispose  removeEditor EditorPane EditorStack getWorkbook getItemCount editorWorkbooks
see I Persistable Part public I Status restore State I Memento memento Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Root Layout Container problems Restoring Perspective null NON NLS 1 Remove the default editor workbook that is initialy created with the editor area if children null Editor Stack default Workbook null for int i 0 i children size i Layout Part child Layout Part children get i if child getID DEFAULT WORKBOOK ID default Workbook Editor Stack child if default Workbook get Item Count 0 default Workbook null if default Workbook null remove default Workbook Restore the relationship layout I Memento infos memento get Children I Workbench Constants TAG INFO Map mapI Dto Part new Hash Map infos length for int i 0 i infos length i Get the info details I Memento child Mem infos i String partID child Mem get String I Workbench Constants TAG PART String relativeID child Mem get String I Workbench Constants TAG RELATIVE int relationship 0 int left 0 right 0 float ratio 0 5f if relativeID null relationship child Mem get Integer I Workbench Constants TAG RELATIONSHIP int Value Float ratio Float child Mem get Float I Workbench Constants TAG RATIO Integer left Int child Mem get Integer I Workbench Constants TAG RATIO LEFT Integer right Int child Mem get Integer I Workbench Constants TAG RATIO RIGHT if left Int null right Int null left left Int int Value right right Int int Value else if ratio Float null ratio ratio Float float Value Create the part Editor Stack workbook Editor Stack new Editor Workbook this page workbook setID partID 1FUN70C ITPUI WIN Shouldn t set Container when not active workbook set Container this I Memento workbook Memento child Mem get Child I Workbench Constants TAG FOLDER if workbook Memento null result add workbook restore State workbook Memento Add the part to the layout if relativeID null add workbook else Layout Part ref Part Layout Part mapI Dto Part get relativeID if ref Part null TODO pass in left and right if left 0 right 0 add workbook relationship ratio ref Part else add workbook relationship left right ref Part else Workbench Plugin log Unable to find part for ID relativeID NON NLS 1 mapI Dto Part put partID workbook return result  IPersistablePart IStatus restoreState IMemento MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString RootLayoutContainer problemsRestoringPerspective EditorStack defaultWorkbook LayoutPart LayoutPart DEFAULT_WORKBOOK_ID defaultWorkbook EditorStack defaultWorkbook getItemCount defaultWorkbook defaultWorkbook defaultWorkbook IMemento getChildren IWorkbenchConstants TAG_INFO mapIDtoPart HashMap IMemento childMem childMem getString IWorkbenchConstants TAG_PART childMem getString IWorkbenchConstants TAG_RELATIVE childMem getInteger IWorkbenchConstants TAG_RELATIONSHIP intValue ratioFloat childMem getFloat IWorkbenchConstants TAG_RATIO leftInt childMem getInteger IWorkbenchConstants TAG_RATIO_LEFT rightInt childMem getInteger IWorkbenchConstants TAG_RATIO_RIGHT leftInt rightInt leftInt intValue rightInt intValue ratioFloat ratioFloat floatValue EditorStack EditorStack newEditorWorkbook setContainer IMemento workbookMemento childMem getChild IWorkbenchConstants TAG_FOLDER workbookMemento restoreState workbookMemento LayoutPart refPart LayoutPart mapIDtoPart refPart refPart refPart WorkbenchPlugin mapIDtoPart
see I Persistable Part public I Status save State I Memento memento Relationship Info relationships compute Relation Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Root Layout Container problems Saving Perspective null NON NLS 1 for int i 0 i relationships length i Save the relationship info private Layout Part part private int relationship private float ratio private Layout Part relative Relationship Info info relationships i I Memento child Mem memento create Child I Workbench Constants TAG INFO child Mem put String I Workbench Constants TAG PART info part getID Editor Stack stack Editor Stack info part if stack null I Memento folder Mem child Mem create Child I Workbench Constants TAG FOLDER result add stack save State folder Mem if info relative null child Mem put String I Workbench Constants TAG RELATIVE info relative getID child Mem put Integer I Workbench Constants TAG RELATIONSHIP info relationship child Mem put Integer I Workbench Constants TAG RATIO LEFT info left child Mem put Integer I Workbench Constants TAG RATIO RIGHT info right Note ratio is not used in newer versions of Eclipse which use left and right above instead child Mem put Float I Workbench Constants TAG RATIO info get Ratio return result  IPersistablePart IStatus saveState IMemento RelationshipInfo computeRelation MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString RootLayoutContainer problemsSavingPerspective LayoutPart LayoutPart RelationshipInfo IMemento childMem createChild IWorkbenchConstants TAG_INFO childMem putString IWorkbenchConstants TAG_PART EditorStack EditorStack IMemento folderMem childMem createChild IWorkbenchConstants TAG_FOLDER saveState folderMem childMem putString IWorkbenchConstants TAG_RELATIVE childMem putInteger IWorkbenchConstants TAG_RELATIONSHIP childMem putInteger IWorkbenchConstants TAG_RATIO_LEFT childMem putInteger IWorkbenchConstants TAG_RATIO_RIGHT childMem putFloat IWorkbenchConstants TAG_RATIO getRatio
Set the editor workbook which is active public void set Active Workbook Editor Stack new Workbook boolean has Focus if new Workbook null if new Workbook is Disposed return if editor Workbooks contains new Workbook return Editor Stack old Workbook active Editor Workbook active Editor Workbook new Workbook if old Workbook null old Workbook new Workbook old Workbook set Active Stack Presentation AS INACTIVE if new Workbook null if has Focus new Workbook set Active Stack Presentation AS ACTIVE FOCUS else new Workbook set Active Stack Presentation AS ACTIVE NOFOCUS update Tab List  setActiveWorkbook EditorStack newWorkbook hasFocus newWorkbook newWorkbook isDisposed editorWorkbooks newWorkbook EditorStack oldWorkbook activeEditorWorkbook activeEditorWorkbook newWorkbook oldWorkbook oldWorkbook newWorkbook oldWorkbook setActive StackPresentation AS_INACTIVE newWorkbook hasFocus newWorkbook setActive StackPresentation AS_ACTIVE_FOCUS newWorkbook setActive StackPresentation AS_ACTIVE_NOFOCUS updateTabList
Set the editor workbook which is active public void set Active Workbook FromID String id for int i 0 i editor Workbooks size i Editor Stack workbook Editor Stack editor Workbooks get i if workbook getID equals id set Active Workbook workbook false  setActiveWorkbookFromID editorWorkbooks EditorStack EditorStack editorWorkbooks setActiveWorkbook
Updates the editor area s tab list to include the active editor and its tab public void update Tab List Composite parent get Parent if parent null parent may be null on startup Editor Stack wb get Active Workbook if wb null parent set Tab List new Control 0 else parent set Tab List wb get Tab List  updateTabList getParent EditorStack getActiveWorkbook setTabList setTabList getTabList
see org eclipse ui internal Layout Part create Control org eclipse swt widgets Composite public void create Control Composite parent super create Control parent let the user drop files editor input on the editor area add Drop Support  LayoutPart createControl createControl createControl addDropSupport
private void add Drop Support if drop Target null Workbench Window Configurer win Configurer Workbench Window page get Workbench Window get Window Configurer drop Target new Drop Target get Control DND DROP DEFAULT DND DROP COPY drop Target set Transfer win Configurer get Transfers if win Configurer get Drop Target Listener null drop Target add Drop Listener win Configurer get Drop Target Listener  addDropSupport dropTarget WorkbenchWindowConfigurer winConfigurer WorkbenchWindow getWorkbenchWindow getWindowConfigurer dropTarget DropTarget getControl DROP_DEFAULT DROP_COPY dropTarget setTransfer winConfigurer getTransfers winConfigurer getDropTargetListener dropTarget addDropListener winConfigurer getDropTargetListener
package Drop Target get Drop Target return drop Target  DropTarget getDropTarget dropTarget
see org eclipse ui internal Layout Part get Importance public boolean is Compressible Added for bug 19524 return true  LayoutPart getImportance isCompressible
see org eclipse ui internal I Layout Container allows Auto Focus public boolean allows Auto Focus return true  ILayoutContainer allowsAutoFocus allowsAutoFocus
see org eclipse ui internal Part Sash Container is Stack Type org eclipse ui internal Layout Part public boolean is Stack Type Layout Part to Test return to Test instanceof Editor Stack  PartSashContainer isStackType LayoutPart isStackType LayoutPart toTest toTest EditorStack
see org eclipse ui internal Part Sash Container is Pane Type org eclipse ui internal Layout Part public boolean is Pane Type Layout Part to Test return to Test instanceof Editor Pane  PartSashContainer isPaneType LayoutPart isPaneType LayoutPart toTest toTest EditorPane
protected Part Stack create Stack Editor Stack new Workbook Editor Stack new Editor Workbook this page return new Workbook  PartStack createStack EditorStack newWorkbook EditorStack newEditorWorkbook newWorkbook
protected void set Visible Part I Layout Container container Layout Part visible Part Editor Stack ref Part Editor Stack container ref Part become Active Workbook true ref Part set Visible Editor Editor Pane visible Part  setVisiblePart ILayoutContainer LayoutPart visiblePart EditorStack refPart EditorStack refPart becomeActiveWorkbook refPart setVisibleEditor EditorPane visiblePart
protected Layout Part get Visible Part I Layout Container container Editor Stack ref Part Editor Stack container return ref Part get Visible Editor  LayoutPart getVisiblePart ILayoutContainer EditorStack refPart EditorStack refPart getVisibleEditor
Restore the presentation state Loop over the workbooks create the appropriate serializer and pass to the presentation param area Mem the memento containing presentation return the restoration status public I Status restore Presentation State I Memento area Mem for Iterator i get Editor Workbooks iterator i has Next Editor Stack workbook Editor Stack i next I Memento memento workbook get Saved Presentation State if memento null continue Presentation Serializer serializer new Presentation Serializer workbook get Presentable Parts workbook get Presentation restore State serializer memento return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1  areaMem IStatus restorePresentationState IMemento areaMem getEditorWorkbooks hasNext EditorStack EditorStack IMemento getSavedPresentationState PresentationSerializer PresentationSerializer getPresentableParts getPresentation restoreState IStatus PLUGIN_ID

Constructs an Editor Site for an editor The resource editor descriptor may be omitted for an OLE editor public Editor Site I Editor Reference ref I Editor Part editor Workbench Page page Editor Descriptor desc super ref editor page if desc null this desc desc if desc get Configuration Element null set Configuration Element desc get Configuration Element else system external and in place editors do not have a corresponding configuration element set Id desc get Id set Registered Name desc get Label  EditorSite EditorSite IEditorReference IEditorPart WorkbenchPage EditorDescriptor getConfigurationElement setConfigurationElement getConfigurationElement setId getId setRegisteredName getLabel
Returns the editor action bar contributor for this editor p An action contributor is responsable for the creation of actions By design this contributor is used for one or more editors of the same type Thus the contributor returned by this method is not owned completely by the editor It is shared p return the editor action bar contributor public I Editor Action Bar Contributor get Action Bar Contributor Editor Action Bars bars Editor Action Bars get Action Bars if bars null return bars get Editor Contributor else return null  IEditorActionBarContributor getActionBarContributor EditorActionBars EditorActionBars getActionBars getEditorContributor
Returns the extension editor action bar contributor for this editor public I Editor Action Bar Contributor get Extension Action Bar Contributor Editor Action Bars bars Editor Action Bars get Action Bars if bars null return bars get Extension Contributor else return null  IEditorActionBarContributor getExtensionActionBarContributor EditorActionBars EditorActionBars getActionBars getExtensionContributor
Returns the editor public I Editor Part get Editor Part return I Editor Part get Part  IEditorPart getEditorPart IEditorPart getPart
public Editor Descriptor get Editor Descriptor return desc  EditorDescriptor getEditorDescriptor
public boolean get Reuse Editor return reuse Editor  getReuseEditor reuseEditor
public void set Reuse Editor boolean reuse reuse Editor reuse fire Property Change PROP REUSE EDITOR the editor s pin status changed added or removed we should ask the presentable part to fire a PROP TITLE event in order for the presentation to request the new icon for this editor Part Pane part Pane get Pane Editor Pane editor Pane null if part Pane instanceof Editor Pane editor Pane Editor Pane part Pane I Presentable Part i Pres Part editor Pane get Presentable Part if i Pres Part instanceof Presentable Part Presentable Part i Pres Part fire Property Change I Workbench Part PROP TITLE  setReuseEditor reuseEditor firePropertyChange PROP_REUSE_EDITOR PROP_TITLE PartPane partPane getPane EditorPane editorPane partPane EditorPane editorPane EditorPane partPane IPresentablePart iPresPart editorPane getPresentablePart iPresPart PresentablePart PresentablePart iPresPart firePropertyChange IWorkbenchPart PROP_TITLE
protected String get Initial Scope Id return org eclipse ui text Editor Scope NON NLS 1  getInitialScopeId textEditorScope
return org eclipse ui text Editor Scope NON NLS 1 public void add Property Listener I Property Listener l prop Change Listeners add l  textEditorScope addPropertyListener IPropertyListener propChangeListeners
prop Change Listeners add l public void remove Property Listener I Property Listener l prop Change Listeners remove l  propChangeListeners removePropertyListener IPropertyListener propChangeListeners
final I Property Listener l I Property Listener array nX Platform run new Safe Runnable public void run l property Changed Editor Site this property Id  IPropertyListener IPropertyListener SafeRunnable propertyChanged EditorSite propertyId
private void fire Property Change final int property Id Object array prop Change Listeners get Listeners for int nX 0 nX array length nX final I Property Listener l I Property Listener array nX Platform run new Safe Runnable public void run l property Changed Editor Site this property Id  firePropertyChange propertyId propChangeListeners getListeners IPropertyListener IPropertyListener SafeRunnable propertyChanged EditorSite propertyId

Creates a new instance public Read Job super Quick Diff Messages get String Last Save Reference Provider Last Save Reference Provider read Job label NON NLS 1 set System true set Priority SHORT  ReadJob QuickDiffMessages getString LastSaveReferenceProvider LastSaveReferenceProvider readJob setSystem setPriority
Calls link Last Save Reference Provider read Document I Progress Monitor boolean and returns link Status OK STATUS inheritdoc param monitor inherit Doc return link Status OK STATUS protected I Status run I Progress Monitor monitor read Document monitor false return Status OK STATUS  LastSaveReferenceProvider readDocument IProgressMonitor OK_STATUS inheritDoc OK_STATUS IStatus IProgressMonitor readDocument OK_STATUS
public I Document get Reference I Progress Monitor monitor if f Document Read read Document monitor true force reading it return f Reference  IDocument getReference IProgressMonitor fDocumentRead readDocument fReference
public void dispose I Progress Monitor monitor f Progress Monitor if monitor null monitor set Canceled true I Document Provider provider f Document Provider synchronized f Lock if provider null provider remove Element State Listener this f Editor Input null f Document Provider null f Reference null f Document Read false f Progress Monitor null f Editor null  IProgressMonitor fProgressMonitor setCanceled IDocumentProvider fDocumentProvider fLock removeElementStateListener fEditorInput fDocumentProvider fReference fDocumentRead fProgressMonitor fEditor
see org eclipse ui texteditor quickdiff I Quick Diff Reference Provider get Id public String get Id return f Id  IQuickDiffReferenceProvider getId getId fId
public void set Active Editor I Text Editor target Editor I Document Provider provider null I Editor Input input null if target Editor null provider target Editor get Document Provider input target Editor get Editor Input dispose if the editor input or document provider have changed note that they may serve multiple editors if provider f Document Provider input f Editor Input dispose synchronized f Lock f Editor target Editor f Document Provider provider f Editor Input input  setActiveEditor ITextEditor targetEditor IDocumentProvider IEditorInput targetEditor targetEditor getDocumentProvider targetEditor getEditorInput fDocumentProvider fEditorInput fLock fEditor targetEditor fDocumentProvider fEditorInput
see org eclipse ui texteditor quickdiff I Quick Diff Provider Implementation is Enabled public boolean is Enabled return f Editor Input null f Document Provider null  IQuickDiffProviderImplementation isEnabled isEnabled fEditorInput fDocumentProvider
see org eclipse ui texteditor quickdiff I Quick Diff Provider Implementation set Id java lang String public void set Id String id f Id id  IQuickDiffProviderImplementation setId setId fId
Reads in the saved document into code f Reference code param monitor a progress monitor or code null code param force code true code if the reference document should also be read if the current document is code null code code false code if it should only be updated if it already existed private void read Document I Progress Monitor monitor boolean force protect against concurrent disposal I Document Provider prov f Document Provider I Editor Input inp f Editor Input I Document doc f Reference I Text Editor editor f Editor if prov instanceof I Storage Document Provider inp instanceof I File Editor Input I File Editor Input input I File Editor Input inp I Storage Document Provider provider I Storage Document Provider prov if doc null if force f Document Read doc new Document else return I Job Manager job Mgr Platform get Job Manager I File file input get File try f Progress Monitor monitor this protects others from not being able to delete the file and protects ourselves from concurrent access to f Reference in the case there already is a valid f Reference one might argue that this rule should already be in the Job description we re running in however 1 we don t mind waiting for someone else here 2 we do not take long or require other locks etc short delay for any other job requiring the lock on file job Mgr begin Rule file monitor Input Stream stream get File Contents file if stream null return String encoding file get Charset if encoding null return boolean skipUTF8BOM isUTF8BOM encoding file set Document Content doc stream encoding monitor skipUTF8BOM catch IO Exception e return catch Core Exception e return finally job Mgr end Rule file f Progress Monitor null if monitor null monitor is Canceled return update state synchronized f Lock if f Document Provider provider f Editor Input input only update state if our provider input pair has not been updated in between dispose or set Active Editor f Reference doc f Document Read true add Element State Listener editor prov  fReference readDocument IProgressMonitor IDocumentProvider fDocumentProvider IEditorInput fEditorInput IDocument fReference ITextEditor fEditor IStorageDocumentProvider IFileEditorInput IFileEditorInput IFileEditorInput IStorageDocumentProvider IStorageDocumentProvider fDocumentRead IJobManager jobMgr getJobManager IFile getFile fProgressMonitor fReference fReference jobMgr beginRule InputStream getFileContents getCharset setDocumentContent IOException CoreException jobMgr endRule fProgressMonitor isCanceled fLock fDocumentProvider fEditorInput setActiveEditor fReference fDocumentRead addElementStateListener
Adds this as element state listener in the UI thread as it can otherwise conflict with other listener additions since Document Provider is not thread safe param editor the editor to get the display from param provider the document provider to register as element state listener private void add Element State Listener I Text Editor editor final I Document Provider provider add Element State Listener adds at most once no problem to call provider add Element State Listener this see https bugs eclipse org bugs show bug cgi id 66686 and see https bugs eclipse org bugs show bug cgi id 56871 repeatedly Runnable runnable new Runnable public void run synchronized f Lock if f Document Provider provider provider add Element State Listener Last Save Reference Provider this Display display null if editor null I Workbench Part Site site editor get Site if site null site get Workbench Window get Shell get Display if display null display is Disposed display async Exec runnable else runnable run  DocumentProvider addElementStateListener ITextEditor IDocumentProvider addElementStateListener addElementStateListener show_bug show_bug fLock fDocumentProvider addElementStateListener LastSaveReferenceProvider IWorkbenchPartSite getSite getWorkbenchWindow getShell getDisplay isDisposed asyncExec
Gets the contents of code file code as an input stream param file the code I File code which we want the content for return an input stream for the file s content private static Input Stream get File Contents I File file Input Stream stream null try if file null stream file get Contents catch Core Exception e ignore return stream  IFile InputStream getFileContents IFile InputStream getContents CoreException
Initializes the given document with the given stream using the given encoding param document the document to be initialized param content Stream the stream which delivers the document content param encoding the character encoding for reading the given stream param monitor a progress monitor for cancellation or code null code param skipUTF8BOM whether to skip three bytes before reading the stream exception IO Exception if the given stream can not be read private static void set Document Content I Document document Input Stream content Stream String encoding I Progress Monitor monitor boolean skipUTF8BOM throws IO Exception Reader in null try if skipUTF8BOM for int i 0 i 3 i if content Stream read 1 throw new IO Exception Quick Diff Messages get String Last Save Reference Provider Last Save Reference Provider error not Enough Bytes ForBOM NON NLS 1 final int DEFAULT FILE SIZE 15 1024 in new Buffered Reader new Input Stream Reader content Stream encoding DEFAULT FILE SIZE String Buffer buffer new String Buffer DEFAULT FILE SIZE char read Buffer new char 2048 int n in read read Buffer while n 0 if monitor null monitor is Canceled return buffer append read Buffer 0 n n in read read Buffer document set buffer to String finally if in null try in close catch IO Exception x ignore  contentStream IOException setDocumentContent IDocument InputStream contentStream IProgressMonitor IOException contentStream IOException QuickDiffMessages getString LastSaveReferenceProvider LastSaveReferenceProvider notEnoughBytesForBOM DEFAULT_FILE_SIZE BufferedReader InputStreamReader contentStream DEFAULT_FILE_SIZE StringBuffer StringBuffer DEFAULT_FILE_SIZE readBuffer readBuffer isCanceled readBuffer readBuffer toString IOException
Returns code true code if the code encoding code is UTF 8 and the file contains a BOM Taken from Resource Text File Buffer java p XXX This is a workaround for a corresponding bug in Java readers and writer see http developer java sun com developer bug Parade bugs 4508058 html p throws Core Exception if reading of file s content description fails byte order mark is not valid for UTF 8 private static boolean isUTF8BOM String encoding I File file throws Core Exception if UTF 8 equals encoding NON NLS 1 I Content Description description file get Content Description if description null byte bom byte description get Property I Content Description BYTE ORDER MARK if bom null if bom I Content Description BOM UTF 8 throw new Core Exception new Status I Status ERROR EditorsUI PLUGIN ID I Status OK Quick Diff Messages get String Last Save Reference Provider Last Save Reference Provider error wrong Byte Order Mark null NON NLS 1 return true return false  ResourceTextFileBuffer bugParade CoreException IFile CoreException IContentDescription getContentDescription getProperty IContentDescription BYTE_ORDER_MARK IContentDescription BOM_UTF_8 CoreException IStatus PLUGIN_ID IStatus QuickDiffMessages getString LastSaveReferenceProvider LastSaveReferenceProvider wrongByteOrderMark
public void element Dirty State Changed Object element boolean is Dirty if is Dirty element f Editor Input document has been saved or reverted recreate reference new Read Job schedule  elementDirtyStateChanged isDirty isDirty fEditorInput ReadJob
see org eclipse ui texteditor I Element State Listener element Content About To Be Replaced java lang Object public void element Content About To Be Replaced Object element  IElementStateListener elementContentAboutToBeReplaced elementContentAboutToBeReplaced
public void element Content Replaced Object element if element f Editor Input document has been reverted or replaced new Read Job schedule  elementContentReplaced fEditorInput ReadJob
see org eclipse ui texteditor I Element State Listener element Deleted java lang Object public void element Deleted Object element  IElementStateListener elementDeleted elementDeleted
see org eclipse ui texteditor I Element State Listener element Moved java lang Object java lang Object public void element Moved Object original Element Object moved Element  IElementStateListener elementMoved elementMoved originalElement movedElement

private Quick Diff Messages TODO Auto generated constructor stub  QuickDiffMessages
param key return public static String get String String key TODO Auto generated method stub try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

public Editor Stack Editor Sash Container editor Area Workbench Page page super Presentation Factory Util ROLE EDITOR NON NLS 1 this editor Area editor Area setID this to String Each folder has a unique ID so relative positioning is unambiguous save off a ref to the page issue is it okay to do this I think so since a View Stack is not used on more than one page this page page  EditorStack EditorSashContainer editorArea WorkbenchPage PresentationFactoryUtil ROLE_EDITOR editorArea editorArea toString ViewStack
see org eclipse ui internal Part Stack get Page protected Workbench Page get Page return page  PartStack getPage WorkbenchPage getPage
public void add System Actions I Menu Manager menu Manager pin Editor Item new System Menu Pin Editor Editor Pane get Visible Part append To Group If Possible menu Manager misc new Updating Action Contribution Item pin Editor Item NON NLS 1 size Item new System Menu Size Part Pane get Visible Part append To Group If Possible menu Manager size size Item NON NLS 1  addSystemActions IMenuManager menuManager pinEditorItem SystemMenuPinEditor EditorPane getVisiblePart appendToGroupIfPossible menuManager UpdatingActionContributionItem pinEditorItem sizeItem SystemMenuSize PartPane getVisiblePart appendToGroupIfPossible menuManager sizeItem
public boolean is Moveable I Presentable Part part return true  isMoveable IPresentablePart
public boolean is Closeable I Presentable Part part return true  isCloseable IPresentablePart
public boolean supports State int state if page is Fixed Layout return false return state I Stack Presentation Site STATE MAXIMIZED state I Stack Presentation Site STATE RESTORED  supportsState isFixedLayout IStackPresentationSite STATE_MAXIMIZED IStackPresentationSite STATE_RESTORED
Factory method for editor workbooks public static Editor Stack new Editor Workbook Editor Sash Container editor Area Workbench Page page return new Editor Stack editor Area page  EditorStack newEditorWorkbook EditorSashContainer editorArea WorkbenchPage EditorStack editorArea
protected void add Layout Part new Child Object cookie super add new Child cookie Editor Pane new Child set Workbook this  LayoutPart newChild newChild EditorPane newChild setWorkbook
See I Visual Container add public void add Layout Part child super add child if child instanceof Editor Pane Editor Pane child set Workbook this  IVisualContainer LayoutPart EditorPane EditorPane setWorkbook
protected void update Actions Editor Pane pane Editor Pane get Visible Part size Item set Pane pane pin Editor Item set Pane pane  updateActions EditorPane EditorPane getVisiblePart sizeItem setPane pinEditorItem setPane
public Control get Tab List return get Tab List get Visible Part  getTabList getTabList getVisiblePart
public void remove All Layout Part children get Children for int i 0 i children length i remove Editor Pane children i  removeAll LayoutPart getChildren EditorPane
public boolean is Active Workbook Editor Sash Container area get Editor Area if area null return area is Active Workbook this else return false  isActiveWorkbook EditorSashContainer getEditorArea isActiveWorkbook
public void become Active Workbook boolean has Focus Editor Sash Container area get Editor Area if area null area set Active Workbook this has Focus  becomeActiveWorkbook hasFocus EditorSashContainer getEditorArea setActiveWorkbook hasFocus
public Editor Pane get Editors Layout Part children get Children Editor Pane panes new Editor Pane children length for int idx 0 idx children length idx panes idx Editor Pane children idx return panes  EditorPane getEditors LayoutPart getChildren EditorPane EditorPane EditorPane
public Editor Sash Container get Editor Area return editor Area  EditorSashContainer getEditorArea editorArea
public Editor Pane get Visible Editor return Editor Pane get Visible Part  EditorPane getVisibleEditor EditorPane getVisiblePart
public void set Visible Editor Editor Pane editor Pane set Selection editor Pane  setVisibleEditor EditorPane editorPane setSelection editorPane
public void show Visible Editor  showVisibleEditor
see org eclipse ui internal Part Stack can Move Folder protected boolean can Move Folder return true  PartStack canMoveFolder canMoveFolder
see org eclipse ui internal Part Stack deref Part org eclipse ui internal Layout Part protected void deref Part Layout Part to Deref Editor Area Helper deref Part to Deref  PartStack derefPart LayoutPart derefPart LayoutPart toDeref EditorAreaHelper derefPart toDeref
see org eclipse ui internal Part Stack allows Drop org eclipse ui internal Part Pane protected boolean allows Drop Part Pane part return part instanceof Editor Pane  PartStack allowsDrop PartPane allowsDrop PartPane EditorPane
public void set Focus super set Focus become Active Workbook true  setFocus setFocus becomeActiveWorkbook
protected void close I Presentable Part parts if parts length 1 close parts 0 return I Editor Reference to Close new I Editor Reference parts length for int idx 0 idx parts length idx Editor Pane part Editor Pane get Pane For parts idx to Close idx part get Editor Reference Workbench Page page get Page if page null page close Editors to Close true  IPresentablePart IEditorReference toClose IEditorReference EditorPane EditorPane getPaneFor toClose getEditorReference WorkbenchPage getPage closeEditors toClose
public void test Invariants super test Invariants int active get Active if active Stack Presentation AS ACTIVE FOCUS Assert is True is Active Workbook else if active Stack Presentation AS ACTIVE NOFOCUS Assert is True is Active Workbook else if active Stack Presentation AS INACTIVE Assert is True is Active Workbook  testInvariants testInvariants getActive StackPresentation AS_ACTIVE_FOCUS isTrue isActiveWorkbook StackPresentation AS_ACTIVE_NOFOCUS isTrue isActiveWorkbook StackPresentation AS_INACTIVE isTrue isActiveWorkbook
public I Status restore State I Memento memento Integer expanded memento get Integer I Workbench Constants TAG EXPANDED set State expanded null expanded int Value I Stack Presentation Site STATE MINIMIZED I Stack Presentation Site STATE RESTORED I Stack Presentation Site STATE MINIMIZED Integer appearance memento get Integer I Workbench Constants TAG APPEARANCE if appearance null this appearance appearance int Value Determine if the presentation has saved any info here saved Presentation State null I Memento presentation Mementos memento get Children I Workbench Constants TAG PRESENTATION for int idx 0 idx presentation Mementos length idx I Memento child presentation Mementos idx String id child get String I Workbench Constants TAG ID if Util equals id get Factory get Id saved Presentation State child break return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1  IStatus restoreState IMemento getInteger IWorkbenchConstants TAG_EXPANDED setState intValue IStackPresentationSite STATE_MINIMIZED IStackPresentationSite STATE_RESTORED IStackPresentationSite STATE_MINIMIZED getInteger IWorkbenchConstants TAG_APPEARANCE intValue savedPresentationState IMemento presentationMementos getChildren IWorkbenchConstants TAG_PRESENTATION presentationMementos IMemento presentationMementos getString IWorkbenchConstants TAG_ID getFactory getId savedPresentationState IStatus PLUGIN_ID
public I Status save State I Memento memento memento put Integer I Workbench Constants TAG EXPANDED get Presentation Site get State I Stack Presentation Site STATE MINIMIZED I Stack Presentation Site STATE MINIMIZED I Stack Presentation Site STATE RESTORED memento put Integer I Workbench Constants TAG APPEARANCE appearance save Presentation State if saved Presentation State null I Memento presentation State memento create Child I Workbench Constants TAG PRESENTATION presentation State put Memento saved Presentation State return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1  IStatus saveState IMemento putInteger IWorkbenchConstants TAG_EXPANDED getPresentationSite getState IStackPresentationSite STATE_MINIMIZED IStackPresentationSite STATE_MINIMIZED IStackPresentationSite STATE_RESTORED putInteger IWorkbenchConstants TAG_APPEARANCE savePresentationState savedPresentationState IMemento presentationState createChild IWorkbenchConstants TAG_PRESENTATION presentationState putMemento savedPresentationState IStatus PLUGIN_ID

Creates a new preference page public Abstract Configuration Block Preference Page set Description set Preference Store f Overlay Store new Overlay Preference Store get Preference Store new Overlay Preference Store Overlay Key f Configuration Block create Configuration Block f Overlay Store  AbstractConfigurationBlockPreferencePage setDescription setPreferenceStore fOverlayStore OverlayPreferenceStore getPreferenceStore OverlayPreferenceStore OverlayKey fConfigurationBlock createConfigurationBlock fOverlayStore
protected abstract I Preference Configuration Block create Configuration Block Overlay Preference Store overlay Preference Store  IPreferenceConfigurationBlock createConfigurationBlock OverlayPreferenceStore overlayPreferenceStore
protected abstract I Preference Configuration Block create Configuration Block Overlay Preference Store overlay Preference Store protected abstract String get Help Id  IPreferenceConfigurationBlock createConfigurationBlock OverlayPreferenceStore overlayPreferenceStore getHelpId
protected abstract I Preference Configuration Block create Configuration Block Overlay Preference Store overlay Preference Store protected abstract String get Help Id protected abstract void set Description  IPreferenceConfigurationBlock createConfigurationBlock OverlayPreferenceStore overlayPreferenceStore getHelpId setDescription
protected abstract String get Help Id protected abstract void set Description protected abstract void set Preference Store  getHelpId setDescription setPreferenceStore
see I Workbench Preference Page init public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench
see Preference Page create Control Composite public void create Control Composite parent super create Control parent Workbench Help set Help get Control get Help Id  PreferencePage createControl createControl createControl WorkbenchHelp setHelp getControl getHelpId
protected Control create Contents Composite parent f Overlay Store load f Overlay Store start f Configuration Block create Control parent initialize Dialog apply Dialog Font parent return parent  createContents fOverlayStore fOverlayStore fConfigurationBlock createControl applyDialogFont
private void initialize f Configuration Block initialize  fConfigurationBlock
public boolean perform Ok f Configuration Block perform Ok f Overlay Store propagate Editors Plugin get Default save Plugin Preferences return true  performOk fConfigurationBlock performOk fOverlayStore EditorsPlugin getDefault savePluginPreferences
public void perform Defaults f Overlay Store load Defaults f Configuration Block perform Defaults super perform Defaults  performDefaults fOverlayStore loadDefaults fConfigurationBlock performDefaults performDefaults
public void dispose f Configuration Block dispose if f Overlay Store null f Overlay Store stop f Overlay Store null super dispose  fConfigurationBlock fOverlayStore fOverlayStore fOverlayStore

public Annotations Configuration Block Overlay Preference Store store Assert is Not Null store Marker Annotation Preferences marker Annotation Preferences new Marker Annotation Preferences f Store store f Store add Keys create Overlay Store Keys marker Annotation Preferences f Annotation Color List Model create Annotation Type List Model marker Annotation Preferences  AnnotationsConfigurationBlock OverlayPreferenceStore isNotNull MarkerAnnotationPreferences markerAnnotationPreferences MarkerAnnotationPreferences fStore fStore addKeys createOverlayStoreKeys markerAnnotationPreferences fAnnotationColorListModel createAnnotationTypeListModel markerAnnotationPreferences
private Overlay Preference Store Overlay Key create Overlay Store Keys Marker Annotation Preferences preferences Array List overlay Keys new Array List Iterator e preferences get Annotation Preferences iterator while e has Next Annotation Preference info Annotation Preference e next overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING info get Color Preference Key overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN info get Text Preference Key if info get Highlight Preference Key null overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN info get Highlight Preference Key overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN info get Overview Ruler Preference Key if info get Vertical Ruler Preference Key null overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN info get Vertical Ruler Preference Key if info get Text Style Preference Key null overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING info get Text Style Preference Key Overlay Preference Store Overlay Key keys new Overlay Preference Store Overlay Key overlay Keys size overlay Keys to Array keys return keys  OverlayPreferenceStore OverlayKey createOverlayStoreKeys MarkerAnnotationPreferences ArrayList overlayKeys ArrayList getAnnotationPreferences hasNext AnnotationPreference AnnotationPreference overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore getColorPreferenceKey overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore getTextPreferenceKey getHighlightPreferenceKey overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore getHighlightPreferenceKey overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore getOverviewRulerPreferenceKey getVerticalRulerPreferenceKey overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore getVerticalRulerPreferenceKey getTextStylePreferenceKey overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore getTextStylePreferenceKey OverlayPreferenceStore OverlayKey OverlayPreferenceStore OverlayKey overlayKeys overlayKeys toArray
f Annotation List add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  fAnnotationList addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Selected Selection Event e handle Annotation List Selection  widgetSelected SelectionEvent handleAnnotationListSelection
f Show In Text Check Box add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  fShowInTextCheckBox addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Selected Selection Event e int i f Annotation List get Selection Index String key f Annotation Color List Model i 2 f Store set Value key f Show In Text Check Box get Selection String decoration Key f Annotation Color List Model i 6 f Decoration Style Combo set Enabled decoration Key null f Show In Text Check Box get Selection  widgetSelected SelectionEvent fAnnotationList getSelectionIndex fAnnotationColorListModel fStore setValue fShowInTextCheckBox getSelection decorationKey fAnnotationColorListModel fDecorationStyleCombo setEnabled decorationKey fShowInTextCheckBox getSelection
f Highlight In Text Check Box add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  fHighlightInTextCheckBox addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Selected Selection Event e int i f Annotation List get Selection Index String key f Annotation Color List Model i 4 f Store set Value key f Highlight In Text Check Box get Selection  widgetSelected SelectionEvent fAnnotationList getSelectionIndex fAnnotationColorListModel fStore setValue fHighlightInTextCheckBox getSelection
f Show In Overview Ruler Check Box add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  fShowInOverviewRulerCheckBox addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Selected Selection Event e int i f Annotation List get Selection Index String key f Annotation Color List Model i 3 f Store set Value key f Show In Overview Ruler Check Box get Selection  widgetSelected SelectionEvent fAnnotationList getSelectionIndex fAnnotationColorListModel fStore setValue fShowInOverviewRulerCheckBox getSelection
f Show In Vertical Ruler Check Box add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  fShowInVerticalRulerCheckBox addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Selected Selection Event e int i f Annotation List get Selection Index String key f Annotation Color List Model i 5 f Store set Value key f Show In Vertical Ruler Check Box get Selection  widgetSelected SelectionEvent fAnnotationList getSelectionIndex fAnnotationColorListModel fStore setValue fShowInVerticalRulerCheckBox getSelection
foreground Color Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  foregroundColorButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Selected Selection Event e int i f Annotation List get Selection Index String key f Annotation Color List Model i 1 Preference Converter set Value f Store key f Annotation Foreground Color Editor get Color Value  widgetSelected SelectionEvent fAnnotationList getSelectionIndex fAnnotationColorListModel PreferenceConverter setValue fStore fAnnotationForegroundColorEditor getColorValue
see org eclipse swt events Selection Listener widget Default Selected org eclipse swt events Selection Event public void widget Default Selected Selection Event e do nothing  SelectionListener widgetDefaultSelected SelectionEvent widgetDefaultSelected SelectionEvent
public void widget Selected Selection Event e int i f Annotation List get Selection Index String key f Annotation Color List Model i 6 if key null for int j 0 j f Annotation Decoration List Model length j if f Annotation Decoration List Model j 0 equals f Decoration Style Combo get Text f Store set Value key f Annotation Decoration List Model j 1 break  widgetSelected SelectionEvent fAnnotationList getSelectionIndex fAnnotationColorListModel fAnnotationDecorationListModel fAnnotationDecorationListModel fDecorationStyleCombo getText fStore setValue fAnnotationDecorationListModel
public Control create Control Composite parent Pixel Converter pixel Converter new Pixel Converter parent Composite composite new Composite parent SWT NULL composite set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout Label label new Label composite SWT LEFT label set Text Text Editor Messages get String Annotation Configuration Block annotation Presentation Options NON NLS 1 Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 label set Layout Data gd Composite editor Composite new Composite composite SWT NONE layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 editor Composite set Layout layout gd new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data FILL VERTICAL gd horizontal Span 2 editor Composite set Layout Data gd f Annotation List new List editor Composite SWT SINGLE SWT V SCROLL SWT BORDER gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data FILL HORIZONTAL gd height Hint pixel Converter convert Height In Chars To Pixels 20 f Annotation List set Layout Data gd Composite options Composite new Composite editor Composite SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 2 options Composite set Layout layout options Composite set Layout Data new Grid Data Grid Data FILL BOTH f Show In Text Check Box new Button options Composite SWT CHECK f Show In Text Check Box set Text Text Editor Messages get String Annotation Configuration Block show In Text NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING gd horizontal Span 2 f Show In Text Check Box set Layout Data gd f Decoration Style Combo new Combo options Composite SWT READ ONLY for int i 0 i f Annotation Decoration List Model length i f Decoration Style Combo add f Annotation Decoration List Model i 0 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING gd horizontal Span 2 gd horizontal Indent 20 f Decoration Style Combo set Layout Data gd f Highlight In Text Check Box new Button options Composite SWT CHECK f Highlight In Text Check Box set Text Text Editor Messages get String Annotation Configuration Block highlight In Text NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING gd horizontal Span 2 f Highlight In Text Check Box set Layout Data gd f Show In Overview Ruler Check Box new Button options Composite SWT CHECK f Show In Overview Ruler Check Box set Text Text Editor Messages get String Annotation Configuration Block show In Overview Ruler NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING gd horizontal Span 2 f Show In Overview Ruler Check Box set Layout Data gd f Show In Vertical Ruler Check Box new Button options Composite SWT CHECK f Show In Vertical Ruler Check Box set Text Text Editor Messages get String Annotation Configuration Block show In Vertical Ruler NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING gd horizontal Span 2 f Show In Vertical Ruler Check Box set Layout Data gd label new Label options Composite SWT LEFT label set Text Text Editor Messages get String Annotation Configuration Block color NON NLS 1 gd new Grid Data gd horizontal Alignment Grid Data BEGINNING label set Layout Data gd f Annotation Foreground Color Editor new Color Editor options Composite Button foreground Color Button f Annotation Foreground Color Editor get Button gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING foreground Color Button set Layout Data gd f Annotation List add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e handle Annotation List Selection f Show In Text Check Box add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e int i f Annotation List get Selection Index String key f Annotation Color List Model i 2 f Store set Value key f Show In Text Check Box get Selection String decoration Key f Annotation Color List Model i 6 f Decoration Style Combo set Enabled decoration Key null f Show In Text Check Box get Selection f Highlight In Text Check Box add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e int i f Annotation List get Selection Index String key f Annotation Color List Model i 4 f Store set Value key f Highlight In Text Check Box get Selection f Show In Overview Ruler Check Box add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e int i f Annotation List get Selection Index String key f Annotation Color List Model i 3 f Store set Value key f Show In Overview Ruler Check Box get Selection f Show In Vertical Ruler Check Box add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e int i f Annotation List get Selection Index String key f Annotation Color List Model i 5 f Store set Value key f Show In Vertical Ruler Check Box get Selection foreground Color Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e int i f Annotation List get Selection Index String key f Annotation Color List Model i 1 Preference Converter set Value f Store key f Annotation Foreground Color Editor get Color Value f Decoration Style Combo add Selection Listener new Selection Listener see org eclipse swt events Selection Listener widget Default Selected org eclipse swt events Selection Event public void widget Default Selected Selection Event e do nothing see org eclipse swt events Selection Listener widget Selected org eclipse swt events Selection Event public void widget Selected Selection Event e int i f Annotation List get Selection Index String key f Annotation Color List Model i 6 if key null for int j 0 j f Annotation Decoration List Model length j if f Annotation Decoration List Model j 0 equals f Decoration Style Combo get Text f Store set Value key f Annotation Decoration List Model j 1 break return composite  createControl PixelConverter pixelConverter PixelConverter setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout numColumns setLayout setText TextEditorMessages getString AnnotationConfigurationBlock annotationPresentationOptions GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan setLayoutData editorComposite GridLayout numColumns marginHeight marginWidth editorComposite setLayout GridData GridData HORIZONTAL_ALIGN_FILL GridData FILL_VERTICAL horizontalSpan editorComposite setLayoutData fAnnotationList editorComposite V_SCROLL GridData GridData VERTICAL_ALIGN_BEGINNING GridData FILL_HORIZONTAL heightHint pixelConverter convertHeightInCharsToPixels fAnnotationList setLayoutData optionsComposite editorComposite GridLayout marginHeight marginWidth numColumns optionsComposite setLayout optionsComposite setLayoutData GridData GridData FILL_BOTH fShowInTextCheckBox optionsComposite fShowInTextCheckBox setText TextEditorMessages getString AnnotationConfigurationBlock showInText GridData GridData FILL_HORIZONTAL horizontalAlignment GridData horizontalSpan fShowInTextCheckBox setLayoutData fDecorationStyleCombo optionsComposite READ_ONLY fAnnotationDecorationListModel fDecorationStyleCombo fAnnotationDecorationListModel GridData GridData FILL_HORIZONTAL horizontalAlignment GridData horizontalSpan horizontalIndent fDecorationStyleCombo setLayoutData fHighlightInTextCheckBox optionsComposite fHighlightInTextCheckBox setText TextEditorMessages getString AnnotationConfigurationBlock highlightInText GridData GridData FILL_HORIZONTAL horizontalAlignment GridData horizontalSpan fHighlightInTextCheckBox setLayoutData fShowInOverviewRulerCheckBox optionsComposite fShowInOverviewRulerCheckBox setText TextEditorMessages getString AnnotationConfigurationBlock showInOverviewRuler GridData GridData FILL_HORIZONTAL horizontalAlignment GridData horizontalSpan fShowInOverviewRulerCheckBox setLayoutData fShowInVerticalRulerCheckBox optionsComposite fShowInVerticalRulerCheckBox setText TextEditorMessages getString AnnotationConfigurationBlock showInVerticalRuler GridData GridData FILL_HORIZONTAL horizontalAlignment GridData horizontalSpan fShowInVerticalRulerCheckBox setLayoutData optionsComposite setText TextEditorMessages getString AnnotationConfigurationBlock GridData horizontalAlignment GridData setLayoutData fAnnotationForegroundColorEditor ColorEditor optionsComposite foregroundColorButton fAnnotationForegroundColorEditor getButton GridData GridData FILL_HORIZONTAL horizontalAlignment GridData foregroundColorButton setLayoutData fAnnotationList addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent handleAnnotationListSelection fShowInTextCheckBox addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent fAnnotationList getSelectionIndex fAnnotationColorListModel fStore setValue fShowInTextCheckBox getSelection decorationKey fAnnotationColorListModel fDecorationStyleCombo setEnabled decorationKey fShowInTextCheckBox getSelection fHighlightInTextCheckBox addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent fAnnotationList getSelectionIndex fAnnotationColorListModel fStore setValue fHighlightInTextCheckBox getSelection fShowInOverviewRulerCheckBox addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent fAnnotationList getSelectionIndex fAnnotationColorListModel fStore setValue fShowInOverviewRulerCheckBox getSelection fShowInVerticalRulerCheckBox addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent fAnnotationList getSelectionIndex fAnnotationColorListModel fStore setValue fShowInVerticalRulerCheckBox getSelection foregroundColorButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent fAnnotationList getSelectionIndex fAnnotationColorListModel PreferenceConverter setValue fStore fAnnotationForegroundColorEditor getColorValue fDecorationStyleCombo addSelectionListener SelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetDefaultSelected SelectionEvent SelectionListener widgetSelected SelectionEvent widgetSelected SelectionEvent fAnnotationList getSelectionIndex fAnnotationColorListModel fAnnotationDecorationListModel fAnnotationDecorationListModel fDecorationStyleCombo getText fStore setValue fAnnotationDecorationListModel
see Preference Page perform Ok public void perform Ok restore From Preferences initialize Fields  PreferencePage performOk performOk restoreFromPreferences initializeFields
public void perform Defaults f Store load Defaults handle Annotation List Selection  performDefaults fStore loadDefaults handleAnnotationListSelection
private void handle Annotation List Selection int i f Annotation List get Selection Index String key f Annotation Color List Model i 1 RGB rgb Preference Converter get Color f Store key f Annotation Foreground Color Editor set Color Value rgb key f Annotation Color List Model i 2 boolean show In Text f Store get Boolean key f Show In Text Check Box set Selection show In Text key f Annotation Color List Model i 6 if key null f Decoration Style Combo set Enabled show In Text for int j 0 j f Annotation Decoration List Model length j String value f Store get String key if f Annotation Decoration List Model j 1 equals value f Decoration Style Combo set Text f Annotation Decoration List Model j 0 break else f Decoration Style Combo set Enabled false f Decoration Style Combo set Text f Annotation Decoration List Model 1 0 set selection to squiggles if the key is not there legacy support key f Annotation Color List Model i 3 f Show In Overview Ruler Check Box set Selection f Store get Boolean key key f Annotation Color List Model i 4 if key null f Highlight In Text Check Box set Selection f Store get Boolean key f Highlight In Text Check Box set Enabled true else f Highlight In Text Check Box set Selection false f Highlight In Text Check Box set Enabled false key f Annotation Color List Model i 5 if key null f Show In Vertical Ruler Check Box set Selection f Store get Boolean key f Show In Vertical Ruler Check Box set Enabled true else f Show In Vertical Ruler Check Box set Selection true f Show In Vertical Ruler Check Box set Enabled false  handleAnnotationListSelection fAnnotationList getSelectionIndex fAnnotationColorListModel PreferenceConverter getColor fStore fAnnotationForegroundColorEditor setColorValue fAnnotationColorListModel showInText fStore getBoolean fShowInTextCheckBox setSelection showInText fAnnotationColorListModel fDecorationStyleCombo setEnabled showInText fAnnotationDecorationListModel fStore getString fAnnotationDecorationListModel fDecorationStyleCombo setText fAnnotationDecorationListModel fDecorationStyleCombo setEnabled fDecorationStyleCombo setText fAnnotationDecorationListModel fAnnotationColorListModel fShowInOverviewRulerCheckBox setSelection fStore getBoolean fAnnotationColorListModel fHighlightInTextCheckBox setSelection fStore getBoolean fHighlightInTextCheckBox setEnabled fHighlightInTextCheckBox setSelection fHighlightInTextCheckBox setEnabled fAnnotationColorListModel fShowInVerticalRulerCheckBox setSelection fStore getBoolean fShowInVerticalRulerCheckBox setEnabled fShowInVerticalRulerCheckBox setSelection fShowInVerticalRulerCheckBox setEnabled
f Annotation List get Display async Exec new Runnable public void run if f Annotation List null f Annotation List is Disposed f Annotation List select 0 handle Annotation List Selection  fAnnotationList getDisplay asyncExec fAnnotationList fAnnotationList isDisposed fAnnotationList handleAnnotationListSelection
public void initialize for int i 0 i f Annotation Color List Model length i f Annotation List add f Annotation Color List Model i 0 f Annotation List get Display async Exec new Runnable public void run if f Annotation List null f Annotation List is Disposed f Annotation List select 0 handle Annotation List Selection  fAnnotationColorListModel fAnnotationList fAnnotationColorListModel fAnnotationList getDisplay asyncExec fAnnotationList fAnnotationList isDisposed fAnnotationList handleAnnotationListSelection
public int compare Object o1 Object o2 if o2 instanceof Annotation Preference return 1 if o1 instanceof Annotation Preference return 1 Annotation Preference a1 Annotation Preference o1 Annotation Preference a2 Annotation Preference o2 return Collator get Instance compare a1 get Preference Label a2 get Preference Label  AnnotationPreference AnnotationPreference AnnotationPreference AnnotationPreference AnnotationPreference AnnotationPreference getInstance getPreferenceLabel getPreferenceLabel
private String create Annotation Type List Model Marker Annotation Preferences preferences Array List list Model Items new Array List Sorted Set sorted Preferences new Tree Set new Comparator see java util Comparator compare java lang Object java lang Object public int compare Object o1 Object o2 if o2 instanceof Annotation Preference return 1 if o1 instanceof Annotation Preference return 1 Annotation Preference a1 Annotation Preference o1 Annotation Preference a2 Annotation Preference o2 return Collator get Instance compare a1 get Preference Label a2 get Preference Label sorted Preferences add All preferences get Annotation Preferences Iterator e sorted Preferences iterator while e has Next Annotation Preference info Annotation Preference e next if info is Include On Preference Page list Model Items add new String info get Preference Label info get Color Preference Key info get Text Preference Key info get Overview Ruler Preference Key info get Highlight Preference Key info get Vertical Ruler Preference Key info get Text Style Preference Key String items new String list Model Items size list Model Items to Array items return items  createAnnotationTypeListModel MarkerAnnotationPreferences ArrayList listModelItems ArrayList SortedSet sortedPreferences TreeSet AnnotationPreference AnnotationPreference AnnotationPreference AnnotationPreference AnnotationPreference AnnotationPreference getInstance getPreferenceLabel getPreferenceLabel sortedPreferences addAll getAnnotationPreferences sortedPreferences hasNext AnnotationPreference AnnotationPreference isIncludeOnPreferencePage listModelItems getPreferenceLabel getColorPreferenceKey getTextPreferenceKey getOverviewRulerPreferenceKey getHighlightPreferenceKey getVerticalRulerPreferenceKey getTextStylePreferenceKey listModelItems listModelItems toArray
private static void indent Control control Grid Data grid Data new Grid Data grid Data horizontal Indent 20 control set Layout Data grid Data  GridData gridData GridData gridData horizontalIndent setLayoutData gridData
slave set Enabled master State Selection Listener listener new Selection Listener public void widget Selected Selection Event e slave set Enabled master get Selection  setEnabled masterState SelectionListener SelectionListener widgetSelected SelectionEvent setEnabled getSelection
public void widget Default Selected Selection Event e  widgetDefaultSelected SelectionEvent
private void create Dependency final Button master String master Key final Control slave indent slave boolean master State f Store get Boolean master Key slave set Enabled master State Selection Listener listener new Selection Listener public void widget Selected Selection Event e slave set Enabled master get Selection public void widget Default Selected Selection Event e master add Selection Listener listener f Master Slave Listeners add listener  createDependency masterKey masterState fStore getBoolean masterKey setEnabled masterState SelectionListener SelectionListener widgetSelected SelectionEvent setEnabled getSelection widgetDefaultSelected SelectionEvent addSelectionListener fMasterSlaveListeners
see I Preference Configuration Block dispose public void dispose  IPreferenceConfigurationBlock

see org eclipse ui internal editors text Abstract Configureation Block Preference Page get Help Id protected String get Help Id return null FIXME Needs help context ID  AbstractConfigureationBlockPreferencePage getHelpId getHelpId
see org eclipse ui internal editors text Abstract Configuration Block Preference Page set Description protected void set Description String description Text Editor Messages get String Annotation Configuration Block description NON NLS 1 set Description description  AbstractConfigurationBlockPreferencePage setDescription setDescription TextEditorMessages getString AnnotationConfigurationBlock setDescription
see org eclipse ui internal editors text Abstract Configuration Block Preference Page set Preference Store protected void set Preference Store set Preference Store Editors Plugin get Default get Preference Store  AbstractConfigurationBlockPreferencePage setPreferenceStore setPreferenceStore setPreferenceStore EditorsPlugin getDefault getPreferenceStore
see org eclipse ui internal editors text Abstract Configureation Block Preference Page create Configuration Block org eclipse ui internal editors text Overlay Preference Store protected I Preference Configuration Block create Configuration Block Overlay Preference Store overlay Preference Store return new Annotations Configuration Block overlay Preference Store  AbstractConfigureationBlockPreferencePage createConfigurationBlock OverlayPreferenceStore IPreferenceConfigurationBlock createConfigurationBlock OverlayPreferenceStore overlayPreferenceStore AnnotationsConfigurationBlock overlayPreferenceStore

Creates and returns a new color editor param parent the parent composite of this color editor public Color Editor Composite parent f Button new Button parent SWT PUSH f Extent compute Image Size parent f Image new Image parent get Display f Extent x f Extent y GC gc new GC f Image gc set Background f Button get Background gc fill Rectangle 0 0 f Extent x f Extent y gc dispose f Button set Image f Image f Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event Color Dialog color Dialog new Color Dialog f Button get Shell color Dialog setRGB f Color Value RGB new Color color Dialog open if new Color null f Color Value new Color update Color Image f Button add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event if f Image null f Image dispose f Image null if f Color null f Color dispose f Color null  ColorEditor fButton fExtent computeImageSize fImage getDisplay fExtent fExtent fImage setBackground fButton getBackground fillRectangle fExtent fExtent fButton setImage fImage fButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent ColorDialog colorDialog ColorDialog fButton getShell colorDialog fColorValue newColor colorDialog newColor fColorValue newColor updateColorImage fButton addDisposeListener DisposeListener widgetDisposed DisposeEvent fImage fImage fImage fColor fColor fColor
Returns the current RGB color value return an rgb with the current color value public RGB get Color Value return f Color Value  getColorValue fColorValue
Sets the current RGB color value param rgb the new value for the rgb color value public void set Color Value RGB rgb f Color Value rgb update Color Image  setColorValue fColorValue updateColorImage
Returns the image push button return the button which shows the current color as image public Button get Button return f Button  getButton fButton
Updates the color of the button image protected void update Color Image Display display f Button get Display GC gc new GC f Image gc set Foreground display get System Color SWT COLOR BLACK gc draw Rectangle 0 2 f Extent x 1 f Extent y 4 if f Color null f Color dispose f Color new Color display f Color Value gc set Background f Color gc fill Rectangle 1 3 f Extent x 2 f Extent y 5 gc dispose f Button set Image f Image  updateColorImage fButton getDisplay fImage setForeground getSystemColor COLOR_BLACK drawRectangle fExtent fExtent fColor fColor fColor fColorValue setBackground fColor fillRectangle fExtent fExtent fButton setImage fImage
Computes the size for the image param window the window on which to render the image return the point with the image size protected Point compute Image Size Control window GC gc new GC window Font f J Face Resources get Font Registry get J Face Resources DEFAULT FONT gc set Font f int height gc get Font Metrics get Height gc dispose Point p new Point height 3 6 height return p  computeImageSize JFaceResources getFontRegistry JFaceResources DEFAULT_FONT setFont getFontMetrics getHeight

private static Editors Plugin fg Instance public static Editors Plugin get Default return fg Instance  EditorsPlugin fgInstance EditorsPlugin getDefault fgInstance
public static void log I Status status get Default get Log log status  IStatus getDefault getLog
public static void log Error Message String message if message null message NON NLS 1 log new Status I Status ERROR EditorsUI PLUGIN ID I Editors Status Constants INTERNAL ERROR message null  logErrorMessage IStatus PLUGIN_ID IEditorsStatusConstants INTERNAL_ERROR
public static void log Error Status String message I Status status if status null log Error Message message return Multi Status multi new Multi Status EditorsUI PLUGIN ID I Editors Status Constants INTERNAL ERROR message null multi add status log multi  logErrorStatus IStatus logErrorMessage MultiStatus MultiStatus PLUGIN_ID IEditorsStatusConstants INTERNAL_ERROR
public static void log Throwable e log new Status I Status ERROR EditorsUI PLUGIN ID I Editors Status Constants INTERNAL ERROR Text Editor Messages get String Editors Plugin internal error e NON NLS 1  IStatus PLUGIN_ID IEditorsStatusConstants INTERNAL_ERROR TextEditorMessages getString EditorsPlugin internal_error
private Annotation Type Hierarchy f Annotation Type Hierarchy public Editors Plugin Assert is True fg Instance null fg Instance this  AnnotationTypeHierarchy fAnnotationTypeHierarchy EditorsPlugin isTrue fgInstance fgInstance
see org eclipse ui plugin AbstractUI Plugin initialize Default Preferences org eclipse jface preference I Preference Store protected void initialize Default Preferences I Preference Store store Text Editor Preference Constants initialize Default Values store  AbstractUIPlugin initializeDefaultPreferences IPreferenceStore initializeDefaultPreferences IPreferenceStore TextEditorPreferenceConstants initializeDefaultValues
Returns the shared text colors of this plug in return the shared text colors since 3 0 public I Shared Text Colors get Shared Text Colors if f Shared Text Colors null f Shared Text Colors new Shared Text Colors return f Shared Text Colors  ISharedTextColors getSharedTextColors fSharedTextColors fSharedTextColors SharedTextColors fSharedTextColors
Returns the annotation type lookup of this plug in return the annotation type lookup since 3 0 public Annotation Type Lookup get Annotation Type Lookup if f Annotation Type Lookup null f Annotation Type Lookup new Annotation Type Lookup return f Annotation Type Lookup  AnnotationTypeLookup getAnnotationTypeLookup fAnnotationTypeLookup fAnnotationTypeLookup AnnotationTypeLookup fAnnotationTypeLookup
Returns the annotation preference lookup of this plug in return the annotation preference lookup since 3 0 public Annotation Preference Lookup get Annotation Preference Lookup if f Annotation Preference Lookup null f Annotation Preference Lookup new Annotation Preference Lookup return f Annotation Preference Lookup  AnnotationPreferenceLookup getAnnotationPreferenceLookup fAnnotationPreferenceLookup fAnnotationPreferenceLookup AnnotationPreferenceLookup fAnnotationPreferenceLookup
Returns the annotation type hierarchy for this plug in return the annotation type hierarchy since 3 0 public Annotation Type Hierarchy get Annotation Type Hierarchy if f Annotation Type Hierarchy null f Annotation Type Hierarchy new Annotation Type Hierarchy return f Annotation Type Hierarchy  AnnotationTypeHierarchy getAnnotationTypeHierarchy fAnnotationTypeHierarchy fAnnotationTypeHierarchy AnnotationTypeHierarchy fAnnotationTypeHierarchy
public void start Bundle Context context throws Exception super start context f File Editor Input Adapter Factory new File Editor Input Adapter Factory I Adapter Manager manager Platform get Adapter Manager manager register Adapters f File Editor Input Adapter Factory I File class  BundleContext fFileEditorInputAdapterFactory FileEditorInputAdapterFactory IAdapterManager getAdapterManager registerAdapters fFileEditorInputAdapterFactory IFile
public void stop Bundle Context context throws Exception I Adapter Manager manager Platform get Adapter Manager manager unregister Adapters f File Editor Input Adapter Factory if f Shared Text Colors null f Shared Text Colors dispose f Shared Text Colors null f Annotation Type Lookup null f Annotation Preference Lookup null f Annotation Type Hierarchy null super stop context  BundleContext IAdapterManager getAdapterManager unregisterAdapters fFileEditorInputAdapterFactory fSharedTextColors fSharedTextColors fSharedTextColors fAnnotationTypeLookup fAnnotationPreferenceLookup fAnnotationTypeHierarchy

public I Path get Path Object element if element instanceof I File Editor Input I File Editor Input input I File Editor Input element return input get File get Full Path return null  IPath getPath IFileEditorInput IFileEditorInput IFileEditorInput getFile getFullPath
public Object get Adapter Object adaptable Object Class adapter Type if I Location Provider class equals adapter Type if adaptable Object instanceof I File return f Location Provider return null  getAdapter adaptableObject adapterType ILocationProvider adapterType adaptableObject IFile fLocationProvider
see org eclipse core runtime I Adapter Factory get Adapter List public Class get Adapter List return ADAPTER LIST  IAdapterFactory getAdapterList getAdapterList ADAPTER_LIST

Creates the preference control param parent the parent composite to which to add the preferences control return the control that was added to code parent code 
Called after creating the control Implementations should load the preferences values and update the controls accordingly 
Called when the code OK code button is pressed on the preference page Implementations should commit the configured preference settings into their form of preference storage 
Called when the code Defaults code button is pressed on the preference page Implementation should reset any preference settings to their default values and adjust the controls accordingly 
Called when the preference page is being disposed Implementations should free any resources they are holding on to 

private File f File public Java File Editor Input File file super f File file  fFile JavaFileEditorInput fFile
see org eclipse ui I Editor Input exists public boolean exists return f File exists  IEditorInput fFile
see org eclipse ui I Editor Input get Image Descriptor public Image Descriptor get Image Descriptor return null  IEditorInput getImageDescriptor ImageDescriptor getImageDescriptor
see org eclipse ui I Editor Input get Name public String get Name return f File get Name  IEditorInput getName getName fFile getName
see org eclipse ui I Editor Input get Persistable public I Persistable Element get Persistable return null  IEditorInput getPersistable IPersistableElement getPersistable
see org eclipse ui I Editor Input get Tool Tip Text public String get Tool Tip Text return f File get Absolute Path  IEditorInput getToolTipText getToolTipText fFile getAbsolutePath
public Object get Adapter Class adapter if I Location Provider class equals adapter return this return Platform get Adapter Manager get Adapter this adapter  getAdapter ILocationProvider getAdapterManager getAdapter
public I Path get Path Object element if element instanceof Java File Editor Input Java File Editor Input input Java File Editor Input element return new Path input f File get Absolute Path return null  IPath getPath JavaFileEditorInput JavaFileEditorInput JavaFileEditorInput fFile getAbsolutePath
public boolean equals Object o if o this return true if o instanceof Java File Editor Input Java File Editor Input input Java File Editor Input o return f File equals input f File return false  JavaFileEditorInput JavaFileEditorInput JavaFileEditorInput fFile fFile
see java lang Object hash Code public int hash Code return f File hash Code  hashCode hashCode fFile hashCode

Creates a named navigation enablement action param name the name of this action param store the preference store param key the preference key public Navigation Enablement Action String name I Preference Store store String key super name I Action AS CHECK BOX f Store store f Key key set Checked f Store get Boolean f Key  NavigationEnablementAction IPreferenceStore IAction AS_CHECK_BOX fStore fKey setChecked fStore getBoolean fKey
see I Action run public void run f Store set Value f Key is Checked  IAction fStore setValue fKey isChecked
Returns the preference key to be used in the code Navigation Enablement Action code param annotation Preference the annotation preference return the preference key or code null code if the key is not defined in XML  NavigationEnablementAction annotationPreference
public Menu get Menu Control parent if f Menu null f Menu dispose f Menu new Menu parent fill Menu f Menu return f Menu  getMenu fMenu fMenu fMenu fillMenu fMenu fMenu
Creates a next previous action delegate public Next Previous Pulldown Action Delegate f Store Editors Plugin get Default get Preference Store  NextPreviousPulldownActionDelegate fStore EditorsPlugin getDefault getPreferenceStore
public Menu get Menu Menu parent if f Menu null f Menu new Menu parent fill Menu f Menu return f Menu  getMenu fMenu fMenu fillMenu fMenu fMenu
public void dispose if f Menu null f Menu dispose f Menu null  fMenu fMenu fMenu
Fills the given menu using marker annotation preferences param menu the menu to fill private void fill Menu Menu menu I Action actions get Actions From Descriptors for int i 0 i actions length i Action Contribution Item item new Action Contribution Item actions i item fill menu 1  fillMenu IAction getActionsFromDescriptors ActionContributionItem ActionContributionItem
Creates actions using marker annotation preferences return the navigation enablement actions private I Action get Actions From Descriptors Marker Annotation Preferences f Marker Annotation Preferences new Marker Annotation Preferences Array List containers new Array List Iterator iter f Marker Annotation Preferences get Annotation Preferences iterator while iter has Next Annotation Preference preference Annotation Preference iter next String key preference get Show In Next Prev Dropdown Toolbar Action Key if key null f Store get Boolean key String preference Key get Preference Key preference Fixes bug 41689 This code can be simplified if we decide that we don t allow to use different settings for go to previous and go to next annotation preference Key preference get Is Go To Next Navigation Target Key if preference Key null containers add new Navigation Enablement Action preference get Preference Label f Store preference Key return I Action containers to Array new Action containers size  IAction getActionsFromDescriptors MarkerAnnotationPreferences fMarkerAnnotationPreferences MarkerAnnotationPreferences ArrayList ArrayList fMarkerAnnotationPreferences getAnnotationPreferences hasNext AnnotationPreference AnnotationPreference getShowInNextPrevDropdownToolbarActionKey fStore getBoolean preferenceKey getPreferenceKey preferenceKey getIsGoToNextNavigationTargetKey preferenceKey NavigationEnablementAction getPreferenceLabel fStore preferenceKey IAction toArray
see org eclipse ui I Workbench Window Action Delegate init org eclipse ui I Workbench Window public void init I Workbench Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action  IActionDelegate IAction IAction
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection

see org eclipse ui internal texteditor Next Previous Pulldown Action Delegate get Preference Key Annotation Preference public String get Preference Key Annotation Preference annotation Preference return annotation Preference get Is Go To Next Navigation Target Key  NextPreviousPulldownActionDelegate getPreferenceKey AnnotationPreference getPreferenceKey AnnotationPreference annotationPreference annotationPreference getIsGoToNextNavigationTargetKey

public String get Text Object element if element instanceof I File I Path path I File element get Full Path return path null path to String NON NLS 1 return super get Text element  getText IFile IPath IFile getFullPath toString getText
private I Workbench Window f Window public Open External File Action set Enabled true  IWorkbenchWindow fWindow OpenExternalFileAction setEnabled
see org eclipse ui I Workbench Window Action Delegate dispose public void dispose f Window null  IWorkbenchWindowActionDelegate fWindow
see org eclipse ui I Workbench Window Action Delegate init org eclipse ui I Workbench Window public void init I Workbench Window window f Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow fWindow
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action run  IActionDelegate IAction IAction
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection
private File query File File Dialog dialog new File Dialog f Window get Shell SWT OPEN dialog set Text Text Editor Messages get String Open External File Action dialog text NON NLS 1 String path dialog open if path null path length 0 return new File path return null  queryFile FileDialog FileDialog fWindow getShell setText TextEditorMessages getString OpenExternalFileAction
public void run File file query File if file null file exists I Editor Input input create Editor Input file String editor Id get Editor Id file I Workbench Page page f Window get Active Page try page open Editor input editor Id catch Part Init Exception e e print Stack Trace else if file null String msg Fmt Text Editor Messages get String Open External File Action File Not Found NON NLS 1 String msg Message Format format msg Fmt new String file get Name Message Dialog open Warning f Window get Shell Text Editor Messages get String Open External File Action dialog text msg NON NLS 1  queryFile IEditorInput createEditorInput editorId getEditorId IWorkbenchPage fWindow getActivePage openEditor editorId PartInitException printStackTrace msgFmt TextEditorMessages getString OpenExternalFileAction FileNotFound MessageFormat msgFmt getName MessageDialog openWarning fWindow getShell TextEditorMessages getString OpenExternalFileAction
private String get Editor Id File file I Workbench workbench f Window get Workbench I Editor Registry editor Registry workbench get Editor Registry I Editor Descriptor descriptor editor Registry get Default Editor file get Name if descriptor null return descriptor get Id return EditorsUI DEFAULT TEXT EDITOR ID  getEditorId IWorkbench fWindow getWorkbench IEditorRegistry editorRegistry getEditorRegistry IEditorDescriptor editorRegistry getDefaultEditor getName getId DEFAULT_TEXT_EDITOR_ID
private I Editor Input create Editor Input File file I File workspace File get Workspace File file if workspace File null return new File Editor Input workspace File return new Java File Editor Input file  IEditorInput createEditorInput IFile workspaceFile getWorkspaceFile workspaceFile FileEditorInput workspaceFile JavaFileEditorInput
private I File get Workspace File File file I Workspace workspace Resources Plugin get Workspace I Path location new Path file get Absolute Path I File files workspace get Root find Files For Location location if files null files length 0 return null if files length 1 return files 0 return select Workspace File files  IFile getWorkspaceFile IWorkspace ResourcesPlugin getWorkspace IPath getAbsolutePath IFile getRoot findFilesForLocation selectWorkspaceFile
private I File select Workspace File I File files Element List Selection Dialog dialog new Element List Selection Dialog f Window get Shell new File Label Provider dialog set Elements files dialog set Title Text Editor Messages get String Open External File Action Select Workspace File NON NLS 1 dialog set Message Text Editor Messages get String Open External File Action File Linkedto Multiple NON NLS 1 if dialog open Window OK return I File dialog get First Result return null  IFile selectWorkspaceFile IFile ElementListSelectionDialog ElementListSelectionDialog fWindow getShell FileLabelProvider setElements setTitle TextEditorMessages getString OpenExternalFileAction SelectWorkspaceFile setMessage TextEditorMessages getString OpenExternalFileAction FileLinkedtoMultiple IFile getFirstResult

public static final class Type Descriptor private Type Descriptor  TypeDescriptor TypeDescriptor
String f Key public Overlay Key Type Descriptor descriptor String key f Descriptor descriptor f Key key  fKey OverlayKey TypeDescriptor fDescriptor fKey
public void property Change Property Change Event event Overlay Key key find Overlay Key event get Property if key null propagate Property f Parent key f Store  propertyChange PropertyChangeEvent OverlayKey findOverlayKey getProperty propagateProperty fParent fStore
Creates and returns a new overlay preference store param parent the parent preference store param overlay Keys the overlay keys public Overlay Preference Store I Preference Store parent Overlay Key overlay Keys f Parent parent f Overlay Keys overlay Keys f Store new Preference Store  overlayKeys OverlayPreferenceStore IPreferenceStore OverlayKey overlayKeys fParent fOverlayKeys overlayKeys fStore PreferenceStore
Tries to find and return the overlay key for the given preference key string param key the preference key string return the overlay key or code null code if none can be found private Overlay Key find Overlay Key String key for int i 0 i f Overlay Keys length i if f Overlay Keys i f Key equals key return f Overlay Keys i return null  OverlayKey findOverlayKey fOverlayKeys fOverlayKeys fKey fOverlayKeys
Tells whether the given preference key string is covered by this overlay store param key the preference key string return code true code if this overlay store covers the given key private boolean covers String key return find Overlay Key key null  findOverlayKey
Propagates the given overlay key from the orgin to the target preference store param orgin the source preference store param key the overlay key param target the preference store to which the key is propagated private void propagate Property I Preference Store orgin Overlay Key key I Preference Store target if orgin is Default key f Key if target is Default key f Key target set To Default key f Key return Type Descriptor d key f Descriptor if BOOLEAN d boolean origin Value orgin get Boolean key f Key boolean target Value target get Boolean key f Key if target Value origin Value target set Value key f Key origin Value else if DOUBLE d double origin Value orgin get Double key f Key double target Value target get Double key f Key if target Value origin Value target set Value key f Key origin Value else if FLOAT d float origin Value orgin get Float key f Key float target Value target get Float key f Key if target Value origin Value target set Value key f Key origin Value else if INT d int origin Value orgin get Int key f Key int target Value target get Int key f Key if target Value origin Value target set Value key f Key origin Value else if LONG d long origin Value orgin get Long key f Key long target Value target get Long key f Key if target Value origin Value target set Value key f Key origin Value else if STRING d String origin Value orgin get String key f Key String target Value target get String key f Key if target Value null origin Value null target Value equals origin Value target set Value key f Key origin Value  propagateProperty IPreferenceStore OverlayKey IPreferenceStore isDefault fKey isDefault fKey setToDefault fKey TypeDescriptor fDescriptor originValue getBoolean fKey targetValue getBoolean fKey targetValue originValue setValue fKey originValue originValue getDouble fKey targetValue getDouble fKey targetValue originValue setValue fKey originValue originValue getFloat fKey targetValue getFloat fKey targetValue originValue setValue fKey originValue originValue getInt fKey targetValue getInt fKey targetValue originValue setValue fKey originValue originValue getLong fKey targetValue getLong fKey targetValue originValue setValue fKey originValue originValue getString fKey targetValue getString fKey targetValue originValue targetValue originValue setValue fKey originValue
Propagates all overlay keys from this store to the parent store public void propagate for int i 0 i f Overlay Keys length i propagate Property f Store f Overlay Keys i f Parent  fOverlayKeys propagateProperty fStore fOverlayKeys fParent
Loads the given key from the orgin into the target param orgin the source preference store param key the overlay key param target the preference store to which the key is propagated param force Initialization if code true code the value in the target gets initialized before loading private void load Property I Preference Store orgin Overlay Key key I Preference Store target boolean force Initialization Type Descriptor d key f Descriptor if BOOLEAN d if force Initialization target set Value key f Key true target set Value key f Key orgin get Boolean key f Key target set Default key f Key orgin get Default Boolean key f Key else if DOUBLE d if force Initialization target set Value key f Key 1 0D target set Value key f Key orgin get Double key f Key target set Default key f Key orgin get Default Double key f Key else if FLOAT d if force Initialization target set Value key f Key 1 0F target set Value key f Key orgin get Float key f Key target set Default key f Key orgin get Default Float key f Key else if INT d if force Initialization target set Value key f Key 1 target set Value key f Key orgin get Int key f Key target set Default key f Key orgin get Default Int key f Key else if LONG d if force Initialization target set Value key f Key 1L target set Value key f Key orgin get Long key f Key target set Default key f Key orgin get Default Long key f Key else if STRING d if force Initialization target set Value key f Key 1 NON NLS 1 target set Value key f Key orgin get String key f Key target set Default key f Key orgin get Default String key f Key  forceInitialization loadProperty IPreferenceStore OverlayKey IPreferenceStore forceInitialization TypeDescriptor fDescriptor forceInitialization setValue fKey setValue fKey getBoolean fKey setDefault fKey getDefaultBoolean fKey forceInitialization setValue fKey setValue fKey getDouble fKey setDefault fKey getDefaultDouble fKey forceInitialization setValue fKey setValue fKey getFloat fKey setDefault fKey getDefaultFloat fKey forceInitialization setValue fKey setValue fKey getInt fKey setDefault fKey getDefaultInt fKey forceInitialization setValue fKey setValue fKey getLong fKey setDefault fKey getDefaultLong fKey forceInitialization setValue fKey setValue fKey getString fKey setDefault fKey getDefaultString fKey
Loads the values from the parent into this store public void load for int i 0 i f Overlay Keys length i load Property f Parent f Overlay Keys i f Store true f Loaded true  fOverlayKeys loadProperty fParent fOverlayKeys fStore fLoaded
Loads the default values public void load Defaults for int i 0 i f Overlay Keys length i set To Default f Overlay Keys i f Key  loadDefaults fOverlayKeys setToDefault fOverlayKeys fKey
Starts to listen for changes public void start if f Property Listener null f Property Listener new Property Listener f Parent add Property Change Listener f Property Listener  fPropertyListener fPropertyListener PropertyListener fParent addPropertyChangeListener fPropertyListener
Stops to listen for changes public void stop if f Property Listener null f Parent remove Property Change Listener f Property Listener f Property Listener null  fPropertyListener fParent removePropertyChangeListener fPropertyListener fPropertyListener
see I Preference Store add Property Change Listener org eclipse jface util I Property Change Listener public void add Property Change Listener I Property Change Listener listener f Store add Property Change Listener listener  IPreferenceStore addPropertyChangeListener IPropertyChangeListener addPropertyChangeListener IPropertyChangeListener fStore addPropertyChangeListener
see I Preference Store remove Property Change Listener org eclipse jface util I Property Change Listener public void remove Property Change Listener I Property Change Listener listener f Store remove Property Change Listener listener  IPreferenceStore removePropertyChangeListener IPropertyChangeListener removePropertyChangeListener IPropertyChangeListener fStore removePropertyChangeListener
see I Preference Store fire Property Change Event java lang String java lang Object java lang Object public void fire Property Change Event String name Object old Value Object new Value f Store fire Property Change Event name old Value new Value  IPreferenceStore firePropertyChangeEvent firePropertyChangeEvent oldValue newValue fStore firePropertyChangeEvent oldValue newValue
see I Preference Store contains java lang String public boolean contains String name return f Store contains name  IPreferenceStore fStore
see I Preference Store get Boolean java lang String public boolean get Boolean String name return f Store get Boolean name  IPreferenceStore getBoolean getBoolean fStore getBoolean
see I Preference Store get Default Boolean java lang String public boolean get Default Boolean String name return f Store get Default Boolean name  IPreferenceStore getDefaultBoolean getDefaultBoolean fStore getDefaultBoolean
see I Preference Store get Default Double java lang String public double get Default Double String name return f Store get Default Double name  IPreferenceStore getDefaultDouble getDefaultDouble fStore getDefaultDouble
see I Preference Store get Default Float String public float get Default Float String name return f Store get Default Float name  IPreferenceStore getDefaultFloat getDefaultFloat fStore getDefaultFloat
see I Preference Store get Default Int String public int get Default Int String name return f Store get Default Int name  IPreferenceStore getDefaultInt getDefaultInt fStore getDefaultInt
see I Preference Store get Default Long String public long get Default Long String name return f Store get Default Long name  IPreferenceStore getDefaultLong getDefaultLong fStore getDefaultLong
see I Preference Store get Default String String public String get Default String String name return f Store get Default String name  IPreferenceStore getDefaultString getDefaultString fStore getDefaultString
see I Preference Store get Double String public double get Double String name return f Store get Double name  IPreferenceStore getDouble getDouble fStore getDouble
see I Preference Store get Float String public float get Float String name return f Store get Float name  IPreferenceStore getFloat getFloat fStore getFloat
see I Preference Store get Int String public int get Int String name return f Store get Int name  IPreferenceStore getInt getInt fStore getInt
see I Preference Store get Long String public long get Long String name return f Store get Long name  IPreferenceStore getLong getLong fStore getLong
see I Preference Store get String String public String get String String name return f Store get String name  IPreferenceStore getString getString fStore getString
see I Preference Store is Default String public boolean is Default String name return f Store is Default name  IPreferenceStore isDefault isDefault fStore isDefault
see I Preference Store needs Saving public boolean needs Saving return f Store needs Saving  IPreferenceStore needsSaving needsSaving fStore needsSaving
see I Preference Store put Value String String public void put Value String name String value if covers name f Store put Value name value  IPreferenceStore putValue putValue fStore putValue
see I Preference Store set Default String double public void set Default String name double value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set Default String float public void set Default String name float value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set Default String int public void set Default String name int value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set Default String long public void set Default String name long value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set Default String String public void set Default String name String value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set Default String boolean public void set Default String name boolean value if covers name f Store set Default name value  IPreferenceStore setDefault setDefault fStore setDefault
see I Preference Store set To Default String public void set To Default String name f Store set To Default name  IPreferenceStore setToDefault setToDefault fStore setToDefault
see I Preference Store set Value String double public void set Value String name double value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
see I Preference Store set Value String float public void set Value String name float value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
see I Preference Store set Value String int public void set Value String name int value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
see I Preference Store set Value String long public void set Value String name long value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
see I Preference Store set Value String String public void set Value String name String value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
see I Preference Store set Value String boolean public void set Value String name boolean value if covers name f Store set Value name value  IPreferenceStore setValue setValue fStore setValue
The keys to add to the list of overlay keys p Note This method must be called before link load is called p param keys since 3 0 public void add Keys Overlay Key keys Assert is True f Loaded Assert is Not Null keys int overlay Keys Length f Overlay Keys length Overlay Key result new Overlay Key keys length overlay Keys Length for int i 0 length overlay Keys Length i length i result i f Overlay Keys i for int i 0 length keys length i length i result overlay Keys Length i keys i f Overlay Keys result if f Loaded load  addKeys OverlayKey isTrue fLoaded isNotNull overlayKeysLength fOverlayKeys OverlayKey OverlayKey overlayKeysLength overlayKeysLength fOverlayKeys overlayKeysLength fOverlayKeys fLoaded

public Pixel Converter Control control GC gc new GC control gc set Font control get Font f Font Metrics gc get Font Metrics gc dispose  PixelConverter setFont getFont fFontMetrics getFontMetrics
see org eclipse jface dialogs Dialog Page convert Height In Chars To Pixels int public int convert Height In Chars To Pixels int chars return Dialog convert Height In Chars To Pixels f Font Metrics chars  DialogPage convertHeightInCharsToPixels convertHeightInCharsToPixels convertHeightInCharsToPixels fFontMetrics
see org eclipse jface dialogs Dialog Page convert HorizontalDL Us To Pixels int public int convert HorizontalDL Us To Pixels int dlus return Dialog convert HorizontalDL Us To Pixels f Font Metrics dlus  DialogPage convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels fFontMetrics
see org eclipse jface dialogs Dialog Page convert VerticalDL Us To Pixels int public int convert VerticalDL Us To Pixels int dlus return Dialog convert VerticalDL Us To Pixels f Font Metrics dlus  DialogPage convertVerticalDLUsToPixels convertVerticalDLUsToPixels convertVerticalDLUsToPixels fFontMetrics
see org eclipse jface dialogs Dialog Page convert Width In Chars To Pixels int public int convert Width In Chars To Pixels int chars return Dialog convert Width In Chars To Pixels f Font Metrics chars  DialogPage convertWidthInCharsToPixels convertWidthInCharsToPixels convertWidthInCharsToPixels fFontMetrics

see org eclipse ui internal texteditor Next Previous Pulldown Action Delegate get Preference Key Annotation Preference public String get Preference Key Annotation Preference annotation Preference return annotation Preference get Is Go To Previous Navigation Target Key  NextPreviousPulldownActionDelegate getPreferenceKey AnnotationPreference getPreferenceKey AnnotationPreference annotationPreference annotationPreference getIsGoToPreviousNavigationTargetKey

private Map f Check Boxes new Hash Map private Selection Listener f Check Box Listener new Selection Listener public void widget Default Selected Selection Event e  fCheckBoxes HashMap SelectionListener fCheckBoxListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Default Selected Selection Event e public void widget Selected Selection Event e Button button Button e widget f Store set Value String f Check Boxes get button button get Selection  widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent fStore setValue fCheckBoxes getSelection
public Quick Diff Configuration Block Overlay Preference Store store Assert is Not Null store f Store store Marker Annotation Preferences marker Annotation Preferences new Marker Annotation Preferences f Store add Keys create Overlay Store Keys marker Annotation Preferences f Quick Diff Model create Quick Diff Model marker Annotation Preferences f Quick Diff Provider List Model create Quick Diff Reference List Model  QuickDiffConfigurationBlock OverlayPreferenceStore isNotNull fStore MarkerAnnotationPreferences markerAnnotationPreferences MarkerAnnotationPreferences fStore addKeys createOverlayStoreKeys markerAnnotationPreferences fQuickDiffModel createQuickDiffModel markerAnnotationPreferences fQuickDiffProviderListModel createQuickDiffReferenceListModel
private Overlay Preference Store Overlay Key create Overlay Store Keys Marker Annotation Preferences preferences Array List overlay Keys new Array List overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants QUICK DIFF ALWAYS ON overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Abstract Decorated Text Editor Preference Constants QUICK DIFF DEFAULT PROVIDER overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants QUICK DIFF CHARACTER MODE Iterator e preferences get Annotation Preferences iterator while e has Next Annotation Preference info Annotation Preference e next if info get Annotation Type equals org eclipse ui workbench texteditor quickdiff Change NON NLS 1 info get Annotation Type equals org eclipse ui workbench texteditor quickdiff Addition NON NLS 1 info get Annotation Type equals org eclipse ui workbench texteditor quickdiff Deletion NON NLS 1 overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING info get Color Preference Key overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN info get Overview Ruler Preference Key Overlay Preference Store Overlay Key keys new Overlay Preference Store Overlay Key overlay Keys size overlay Keys to Array keys return keys  OverlayPreferenceStore OverlayKey createOverlayStoreKeys MarkerAnnotationPreferences ArrayList overlayKeys ArrayList overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_ALWAYS_ON overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_DEFAULT_PROVIDER overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_CHARACTER_MODE getAnnotationPreferences hasNext AnnotationPreference AnnotationPreference getAnnotationType quickdiffChange getAnnotationType quickdiffAddition getAnnotationType quickdiffDeletion overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore getColorPreferenceKey overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore getOverviewRulerPreferenceKey OverlayPreferenceStore OverlayKey OverlayPreferenceStore OverlayKey overlayKeys overlayKeys toArray
private String create Quick Diff Model Marker Annotation Preferences preferences String items new String 3 Iterator e preferences get Annotation Preferences iterator while e has Next Annotation Preference info Annotation Preference e next if info get Annotation Type equals org eclipse ui workbench texteditor quickdiff Change NON NLS 1 items 0 new String info get Color Preference Key info get Overview Ruler Preference Key Text Editor Messages get String Quick Diff Configuration Block change Color NON NLS 1 else if info get Annotation Type equals org eclipse ui workbench texteditor quickdiff Addition NON NLS 1 items 1 new String info get Color Preference Key info get Overview Ruler Preference Key Text Editor Messages get String Quick Diff Configuration Block addition Color NON NLS 1 else if info get Annotation Type equals org eclipse ui workbench texteditor quickdiff Deletion NON NLS 1 items 2 new String info get Color Preference Key info get Overview Ruler Preference Key Text Editor Messages get String Quick Diff Configuration Block deletion Color NON NLS 1 return items  createQuickDiffModel MarkerAnnotationPreferences getAnnotationPreferences hasNext AnnotationPreference AnnotationPreference getAnnotationType quickdiffChange getColorPreferenceKey getOverviewRulerPreferenceKey TextEditorMessages getString QuickDiffConfigurationBlock changeColor getAnnotationType quickdiffAddition getColorPreferenceKey getOverviewRulerPreferenceKey TextEditorMessages getString QuickDiffConfigurationBlock additionColor getAnnotationType quickdiffDeletion getColorPreferenceKey getOverviewRulerPreferenceKey TextEditorMessages getString QuickDiffConfigurationBlock deletionColor
private String create Quick Diff Reference List Model java util List descriptors new Quick Diff get Reference Provider Descriptors Array List list Model Items new Array List for Iterator it descriptors iterator it has Next Reference Provider Descriptor descriptor Reference Provider Descriptor it next String label descriptor get Label int i label index Of while i 0 if i label length label label substring 0 i label substring i 1 else label substring 0 i i label index Of list Model Items add new String descriptor get Id label String items new String list Model Items size list Model Items to Array items return items  createQuickDiffReferenceListModel QuickDiff getReferenceProviderDescriptors ArrayList listModelItems ArrayList hasNext ReferenceProviderDescriptor ReferenceProviderDescriptor getLabel indexOf indexOf listModelItems getId listModelItems listModelItems toArray
private Button add Check Box Composite parent String label String key int indentation Button check Box new Button parent SWT CHECK check Box set Text label Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Indent indentation gd horizontal Span 2 check Box set Layout Data gd check Box add Selection Listener f Check Box Listener f Check Boxes put check Box key return check Box  addCheckBox checkBox checkBox setText GridData GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalIndent horizontalSpan checkBox setLayoutData checkBox addSelectionListener fCheckBoxListener fCheckBoxes checkBox checkBox
f Quick Diff Overview Ruler Check Box add Selection Listener new Selection Listener public void widget Selected Selection Event e for int i 0 i f Quick Diff Model length i f Store set Value f Quick Diff Model i 1 f Quick Diff Overview Ruler Check Box get Selection  fQuickDiffOverviewRulerCheckBox addSelectionListener SelectionListener widgetSelected SelectionEvent fQuickDiffModel fStore setValue fQuickDiffModel fQuickDiffOverviewRulerCheckBox getSelection
public void widget Default Selected Selection Event e  widgetDefaultSelected SelectionEvent
final int index i change Color Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  changeColorButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Selected Selection Event e String key f Quick Diff Model index 0 Preference Converter set Value f Store key editor get Color Value  widgetSelected SelectionEvent fQuickDiffModel PreferenceConverter setValue fStore getColorValue
f Quick Diff Provider List add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  fQuickDiffProviderList addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Selected Selection Event e handle Provider List Selection  widgetSelected SelectionEvent handleProviderListSelection
f Set Default Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  fSetDefaultButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Selected Selection Event e int i f Quick Diff Provider List get Selection Index f Store set Value Abstract Decorated Text Editor Preference Constants QUICK DIFF DEFAULT PROVIDER f Quick Diff Provider List Model i 0 update Provider List  widgetSelected SelectionEvent fQuickDiffProviderList getSelectionIndex fStore setValue AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_DEFAULT_PROVIDER fQuickDiffProviderListModel updateProviderList
Creates page for hover preferences param parent the parent composite return the created child composite public Control create Control Composite parent Composite composite new Composite parent SWT NONE composite set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout String label Text Editor Messages get String Quick Diff Configuration Block show For New Editors NON NLS 1 add Check Box composite label Abstract Decorated Text Editor Preference Constants QUICK DIFF ALWAYS ON 0 label Text Editor Messages get String Quick Diff Configuration Block character Mode NON NLS 1 add Check Box composite label Abstract Decorated Text Editor Preference Constants QUICK DIFF CHARACTER MODE 0 label Text Editor Messages get String Quick Diff Configuration Block show In Overview Ruler NON NLS 1 f Quick Diff Overview Ruler Check Box new Button composite SWT CHECK f Quick Diff Overview Ruler Check Box set Text label Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Indent 0 gd horizontal Span 2 f Quick Diff Overview Ruler Check Box set Layout Data gd f Quick Diff Overview Ruler Check Box add Selection Listener new Selection Listener public void widget Selected Selection Event e for int i 0 i f Quick Diff Model length i f Store set Value f Quick Diff Model i 1 f Quick Diff Overview Ruler Check Box get Selection public void widget Default Selected Selection Event e spacer Label l new Label composite SWT LEFT gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 gd height Hint 5 l set Layout Data gd Group group new Group composite SWT NONE group set Text Text Editor Messages get String Quick Diff Configuration Block color Title NON NLS 1 layout new Grid Layout layout num Columns 2 group set Layout layout gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Span 2 group set Layout Data gd f Quick Diff Color Editors new Color Editor 3 for int i 0 i f Quick Diff Model length i label f Quick Diff Model i 2 l new Label group SWT LEFT l set Text label final Color Editor editor new Color Editor group f Quick Diff Color Editors i editor Button change Color Button editor get Button gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING change Color Button set Layout Data gd final int index i change Color Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e String key f Quick Diff Model index 0 Preference Converter set Value f Store key editor get Color Value spacer l new Label composite SWT LEFT gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 gd height Hint 5 l set Layout Data gd l new Label composite SWT LEFT l set Text Text Editor Messages get String Quick Diff Configuration Block reference Provider Title NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 l set Layout Data gd Composite editor Composite new Composite composite SWT NONE layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 editor Composite set Layout layout gd new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data FILL VERTICAL gd horizontal Span 2 editor Composite set Layout Data gd f Quick Diff Provider List new List editor Composite SWT SINGLE SWT V SCROLL SWT BORDER gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data FILL HORIZONTAL gd height Hint 60 f Quick Diff Provider List set Layout Data gd Composite styles Composite new Composite editor Composite SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 2 styles Composite set Layout layout styles Composite set Layout Data new Grid Data Grid Data FILL BOTH f Set Default Button new Button styles Composite SWT PUSH f Set Default Button set Text Text Editor Messages get String Quick Diff Configuration Block set Default NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING gd horizontal Span 2 f Set Default Button set Layout Data gd f Quick Diff Provider List add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e handle Provider List Selection f Set Default Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e int i f Quick Diff Provider List get Selection Index f Store set Value Abstract Decorated Text Editor Preference Constants QUICK DIFF DEFAULT PROVIDER f Quick Diff Provider List Model i 0 update Provider List return composite  createControl setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout numColumns setLayout TextEditorMessages getString QuickDiffConfigurationBlock showForNewEditors addCheckBox AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_ALWAYS_ON TextEditorMessages getString QuickDiffConfigurationBlock characterMode addCheckBox AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_CHARACTER_MODE TextEditorMessages getString QuickDiffConfigurationBlock showInOverviewRuler fQuickDiffOverviewRulerCheckBox fQuickDiffOverviewRulerCheckBox setText GridData GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalIndent horizontalSpan fQuickDiffOverviewRulerCheckBox setLayoutData fQuickDiffOverviewRulerCheckBox addSelectionListener SelectionListener widgetSelected SelectionEvent fQuickDiffModel fStore setValue fQuickDiffModel fQuickDiffOverviewRulerCheckBox getSelection widgetDefaultSelected SelectionEvent GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan heightHint setLayoutData setText TextEditorMessages getString QuickDiffConfigurationBlock colorTitle GridLayout numColumns setLayout GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalSpan setLayoutData fQuickDiffColorEditors ColorEditor fQuickDiffModel fQuickDiffModel setText ColorEditor ColorEditor fQuickDiffColorEditors changeColorButton getButton GridData GridData FILL_HORIZONTAL horizontalAlignment GridData changeColorButton setLayoutData changeColorButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent fQuickDiffModel PreferenceConverter setValue fStore getColorValue GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan heightHint setLayoutData setText TextEditorMessages getString QuickDiffConfigurationBlock referenceProviderTitle GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan setLayoutData editorComposite GridLayout numColumns marginHeight marginWidth editorComposite setLayout GridData GridData HORIZONTAL_ALIGN_FILL GridData FILL_VERTICAL horizontalSpan editorComposite setLayoutData fQuickDiffProviderList editorComposite V_SCROLL GridData GridData VERTICAL_ALIGN_BEGINNING GridData FILL_HORIZONTAL heightHint fQuickDiffProviderList setLayoutData stylesComposite editorComposite GridLayout marginHeight marginWidth numColumns stylesComposite setLayout stylesComposite setLayoutData GridData GridData FILL_BOTH fSetDefaultButton stylesComposite fSetDefaultButton setText TextEditorMessages getString QuickDiffConfigurationBlock setDefault GridData GridData FILL_HORIZONTAL horizontalAlignment GridData horizontalSpan fSetDefaultButton setLayoutData fQuickDiffProviderList addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent handleProviderListSelection fSetDefaultButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent fQuickDiffProviderList getSelectionIndex fStore setValue AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_DEFAULT_PROVIDER fQuickDiffProviderListModel updateProviderList
private void update Provider List int i f Quick Diff Provider List get Selection Index int default Index 1 String default Provider f Store get String Abstract Decorated Text Editor Preference Constants QUICK DIFF DEFAULT PROVIDER for int j 0 j f Quick Diff Provider List Model length j f Quick Diff Provider List remove j if default Provider equals f Quick Diff Provider List Model j 0 f Quick Diff Provider List add f Quick Diff Provider List Model j 1 Text Editor Messages get String Quick Diff Configuration Block defaultlabel j NON NLS 1 NON NLS 2 default Index j else f Quick Diff Provider List add f Quick Diff Provider List Model j 1 j f Set Default Button set Enabled default Index i f Quick Diff Provider List set Selection i f Quick Diff Provider List redraw  updateProviderList fQuickDiffProviderList getSelectionIndex defaultIndex defaultProvider fStore getString AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_DEFAULT_PROVIDER fQuickDiffProviderListModel fQuickDiffProviderList defaultProvider fQuickDiffProviderListModel fQuickDiffProviderList fQuickDiffProviderListModel TextEditorMessages getString QuickDiffConfigurationBlock defaultIndex fQuickDiffProviderList fQuickDiffProviderListModel fSetDefaultButton setEnabled defaultIndex fQuickDiffProviderList setSelection fQuickDiffProviderList
f Quick Diff Provider List get Display async Exec new Runnable public void run if f Quick Diff Provider List null f Quick Diff Provider List is Disposed f Quick Diff Provider List select 0 handle Provider List Selection  fQuickDiffProviderList getDisplay asyncExec fQuickDiffProviderList fQuickDiffProviderList isDisposed fQuickDiffProviderList handleProviderListSelection
public void initialize for int i 0 i f Quick Diff Provider List Model length i String label f Quick Diff Provider List Model i 1 if f Store get String Abstract Decorated Text Editor Preference Constants QUICK DIFF DEFAULT PROVIDER equals f Quick Diff Provider List Model i 0 label Text Editor Messages get String Quick Diff Configuration Block defaultlabel NON NLS 1 NON NLS 2 f Quick Diff Provider List add label f Quick Diff Provider List get Display async Exec new Runnable public void run if f Quick Diff Provider List null f Quick Diff Provider List is Disposed f Quick Diff Provider List select 0 handle Provider List Selection initialize Fields  fQuickDiffProviderListModel fQuickDiffProviderListModel fStore getString AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_DEFAULT_PROVIDER fQuickDiffProviderListModel TextEditorMessages getString QuickDiffConfigurationBlock fQuickDiffProviderList fQuickDiffProviderList getDisplay asyncExec fQuickDiffProviderList fQuickDiffProviderList isDisposed fQuickDiffProviderList handleProviderListSelection initializeFields
private void initialize Fields Iterator e f Check Boxes key Set iterator while e has Next Button b Button e next String key String f Check Boxes get b b set Selection f Store get Boolean key update Quick Diff Controls  initializeFields fCheckBoxes keySet hasNext fCheckBoxes setSelection fStore getBoolean updateQuickDiffControls
public void perform Ok  performOk
public void perform Defaults initialize Fields update Provider List  performDefaults initializeFields updateProviderList
private void handle Provider List Selection int i f Quick Diff Provider List get Selection Index if i 1 boolean b f Store get String Abstract Decorated Text Editor Preference Constants QUICK DIFF DEFAULT PROVIDER equals f Quick Diff Provider List Model i 0 f Set Default Button set Enabled b  handleProviderListSelection fQuickDiffProviderList getSelectionIndex fStore getString AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_DEFAULT_PROVIDER fQuickDiffProviderListModel fSetDefaultButton setEnabled
private void update Quick Diff Controls boolean quickdiff Overview Ruler false for int i 0 i f Quick Diff Model length i f Quick Diff Color Editors i set Color Value Preference Converter get Color f Store f Quick Diff Model i 0 quickdiff Overview Ruler f Store get Boolean f Quick Diff Model i 1 f Quick Diff Overview Ruler Check Box set Selection quickdiff Overview Ruler  updateQuickDiffControls quickdiffOverviewRuler fQuickDiffModel fQuickDiffColorEditors setColorValue PreferenceConverter getColor fStore fQuickDiffModel quickdiffOverviewRuler fStore getBoolean fQuickDiffModel fQuickDiffOverviewRulerCheckBox setSelection quickdiffOverviewRuler
since 3 0 public void dispose 

see org eclipse ui internal editors text Abstract Configureation Block Preference Page get Help Id protected String get Help Id return null FIXME Needs help context ID  AbstractConfigureationBlockPreferencePage getHelpId getHelpId
see org eclipse ui internal editors text Abstract Configuration Block Preference Page set Description protected void set Description String description Text Editor Messages get String Quick Diff Configuration Block description NON NLS 1 set Description description  AbstractConfigurationBlockPreferencePage setDescription setDescription TextEditorMessages getString QuickDiffConfigurationBlock setDescription
see org org eclipse ui internal editors text Abstract Configuration Block Preference Page set Preference Store protected void set Preference Store set Preference Store Editors Plugin get Default get Preference Store  AbstractConfigurationBlockPreferencePage setPreferenceStore setPreferenceStore setPreferenceStore EditorsPlugin getDefault getPreferenceStore
see org eclipse ui internal editors text Abstract Configureation Block Preference Page create Configuration Block org eclipse ui internal editors text Overlay Preference Store protected I Preference Configuration Block create Configuration Block Overlay Preference Store overlay Preference Store return new Quick Diff Configuration Block overlay Preference Store  AbstractConfigureationBlockPreferencePage createConfigurationBlock OverlayPreferenceStore IPreferenceConfigurationBlock createConfigurationBlock OverlayPreferenceStore overlayPreferenceStore QuickDiffConfigurationBlock overlayPreferenceStore

private Map f Display Table Creates an returns a shared color manager public Shared Text Colors super  fDisplayTable SharedTextColors
public Color get Color RGB rgb if rgb null return null if f Display Table null f Display Table new Hash Map 2 Display display Display get Current Map color Table Map f Display Table get display if color Table null color Table new Hash Map 10 f Display Table put display color Table Color color Color color Table get rgb if color null color new Color display rgb color Table put rgb color return color  getColor fDisplayTable fDisplayTable HashMap getCurrent colorTable fDisplayTable colorTable colorTable HashMap fDisplayTable colorTable colorTable colorTable
public void dispose if f Display Table null Iterator j f Display Table values iterator while j has Next Iterator i Map j next values iterator while i has Next Color i next dispose  fDisplayTable fDisplayTable hasNext hasNext

Creates a status set to OK no message public Status Info this OK null  StatusInfo
Creates a status with the given severity and message param severity the severity of this status ERROR WARNING INFO and OK param message the message of this status Applies only for ERROR WARNING and INFO public Status Info int severity String message f Status Message message f Severity severity  StatusInfo fStatusMessage fSeverity
see org eclipse core runtime I Status isOK public boolean isOK return f Severity I Status OK  IStatus fSeverity IStatus
Returns whether this status indicates a warning return code true code if this status has severity link I Status WARNING and code false code otherwise public boolean is Warning return f Severity I Status WARNING  IStatus isWarning fSeverity IStatus
Returns whether this status indicates an info return code true code if this status has severity link I Status INFO and code false code otherwise public boolean is Info return f Severity I Status INFO  IStatus isInfo fSeverity IStatus
Returns whether this status indicates an error return code true code if this status has severity link I Status ERROR and code false code otherwise public boolean is Error return f Severity I Status ERROR  IStatus isError fSeverity IStatus
see I Status get Message public String get Message return f Status Message  IStatus getMessage getMessage fStatusMessage
Sets the status to ERROR param error Message the error message which can be an empty string but not code null code public void set Error String error Message Assert is Not Null error Message f Status Message error Message f Severity I Status ERROR  errorMessage setError errorMessage isNotNull errorMessage fStatusMessage errorMessage fSeverity IStatus
Sets the status to WARNING param warning Message the warning message which can be an empty string but not code null code public void set Warning String warning Message Assert is Not Null warning Message f Status Message warning Message f Severity I Status WARNING  warningMessage setWarning warningMessage isNotNull warningMessage fStatusMessage warningMessage fSeverity IStatus
Sets the status to INFO param info Message the info message which can be an empty string but not code null code public void set Info String info Message Assert is Not Null info Message f Status Message info Message f Severity I Status INFO  infoMessage setInfo infoMessage isNotNull infoMessage fStatusMessage infoMessage fSeverity IStatus
Sets the status to OK public void setOK f Status Message null f Severity I Status OK  fStatusMessage fSeverity IStatus
see I Status matches int public boolean matches int severity Mask return f Severity severity Mask 0  IStatus severityMask fSeverity severityMask
Returns always code false code see I Status is Multi Status public boolean is Multi Status return false  IStatus isMultiStatus isMultiStatus
see I Status get Severity public int get Severity return f Severity  IStatus getSeverity getSeverity fSeverity
see I Status get Plugin public String get Plugin return EditorsUI PLUGIN ID  IStatus getPlugin getPlugin PLUGIN_ID
Returns always code null code see I Status get Exception public Throwable get Exception return null  IStatus getException getException
Returns always the error severity see I Status get Code public int get Code return f Severity  IStatus getCode getCode fSeverity
Returns always code null code see I Status get Children public I Status get Children return new I Status 0  IStatus getChildren IStatus getChildren IStatus

protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache if w Hint SWT DEFAULT h Hint SWT DEFAULT return new Point w Hint h Hint Control children composite get Children int count children length int max Width 0 max Height 0 for int i 0 i count i Control child children i Point pt child compute Size SWT DEFAULT SWT DEFAULT flush Cache max Width Math max max Width pt x max Height Math max max Height pt y if w Hint SWT DEFAULT max Width w Hint if h Hint SWT DEFAULT max Height h Hint return new Point max Width max Height  computeSize wHint hHint flushCache wHint hHint wHint hHint getChildren maxWidth maxHeight computeSize flushCache maxWidth maxWidth maxHeight maxHeight wHint maxWidth wHint hHint maxHeight hHint maxWidth maxHeight
protected void layout Composite composite boolean flush Cache Rectangle rect composite get Client Area Control children composite get Children for int i 0 i children length i children i set Bounds rect  flushCache getClientArea getChildren setBounds

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Text Editor Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE TextEditorMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException
public static Resource Bundle get Resource Bundle return fg Resource Bundle  ResourceBundle getResourceBundle fgResourceBundle
public static String get Formatted String String key String arg return get Formatted String key new String arg  getFormattedString getFormattedString
public static String get Formatted String String key String args return Message Format format get String key args  getFormattedString MessageFormat getString

private Map f Check Boxes new Hash Map private Selection Listener f Check Box Listener new Selection Listener public void widget Default Selected Selection Event e  fCheckBoxes HashMap SelectionListener fCheckBoxListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Default Selected Selection Event e public void widget Selected Selection Event e Button button Button e widget f Overlay Store set Value String f Check Boxes get button button get Selection  widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent fOverlayStore setValue fCheckBoxes getSelection
private Map f Text Fields new Hash Map private Modify Listener f Text Field Listener new Modify Listener public void modify Text Modify Event e Text text Text e widget f Overlay Store set Value String f Text Fields get text text get Text  fTextFields HashMap ModifyListener fTextFieldListener ModifyListener modifyText ModifyEvent fOverlayStore setValue fTextFields getText
private Array List f Number Fields new Array List private Modify Listener f Number Field Listener new Modify Listener public void modify Text Modify Event e number Field Changed Text e widget  ArrayList fNumberFields ArrayList ModifyListener fNumberFieldListener ModifyListener modifyText ModifyEvent numberFieldChanged
public Text Editor Preference Page2 set Description Text Editor Messages get String Text Editor Preference Page description NON NLS 1 set Preference Store Editors Plugin get Default get Preference Store f Overlay Store create Overlay Store  TextEditorPreferencePage2 setDescription TextEditorMessages getString TextEditorPreferencePage setPreferenceStore EditorsPlugin getDefault getPreferenceStore fOverlayStore createOverlayStore
private Overlay Preference Store create Overlay Store Array List overlay Keys new Array List overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Abstract Decorated Text Editor Preference Constants EDITOR CURRENT LINE COLOR overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR CURRENT LINE overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store INT Abstract Decorated Text Editor Preference Constants EDITOR TAB WIDTH overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Abstract Decorated Text Editor Preference Constants EDITOR PRINT MARGIN COLOR overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store INT Abstract Decorated Text Editor Preference Constants EDITOR PRINT MARGIN COLUMN overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR PRINT MARGIN overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR OVERVIEW RULER overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Abstract Decorated Text Editor Preference Constants EDITOR LINE NUMBER RULER COLOR overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR LINE NUMBER RULER overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR USE CUSTOM CARETS overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR WIDE CARET overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Abstract Decorated Text Editor Preference Constants EDITOR SELECTION FOREGROUND COLOR overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR SELECTION FOREGROUND DEFAULT COLOR overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store STRING Abstract Decorated Text Editor Preference Constants EDITOR SELECTION BACKGROUND COLOR overlay Keys add new Overlay Preference Store Overlay Key Overlay Preference Store BOOLEAN Abstract Decorated Text Editor Preference Constants EDITOR SELECTION BACKGROUND DEFAULT COLOR Overlay Preference Store Overlay Key keys new Overlay Preference Store Overlay Key overlay Keys size overlay Keys to Array keys return new Overlay Preference Store get Preference Store keys  OverlayPreferenceStore createOverlayStore ArrayList overlayKeys ArrayList overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_CURRENT_LINE_COLOR overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_CURRENT_LINE overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_TAB_WIDTH overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_PRINT_MARGIN_COLOR overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_PRINT_MARGIN_COLUMN overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_PRINT_MARGIN overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_OVERVIEW_RULER overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_LINE_NUMBER_RULER_COLOR overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_LINE_NUMBER_RULER overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_USE_CUSTOM_CARETS overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_WIDE_CARET overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_FOREGROUND_COLOR overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_FOREGROUND_DEFAULT_COLOR overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_BACKGROUND_COLOR overlayKeys OverlayPreferenceStore OverlayKey OverlayPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_BACKGROUND_DEFAULT_COLOR OverlayPreferenceStore OverlayKey OverlayPreferenceStore OverlayKey overlayKeys overlayKeys toArray OverlayPreferenceStore getPreferenceStore
see I Workbench Preference Page init public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench
see Preference Page create Control Composite public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Text Editor Help Context Ids TEXT EDITOR PREFERENCE PAGE  PreferencePage createControl createControl createControl WorkbenchHelp setHelp getControl ITextEditorHelpContextIds TEXT_EDITOR_PREFERENCE_PAGE
private void handle Appearance Color List Selection int i f Appearance Color List get Selection Index String key f Appearance Color List Model i 1 RGB rgb Preference Converter get Color f Overlay Store key f Appearance Color Editor set Color Value rgb update Appearance Color Widgets f Appearance Color List Model i 2  handleAppearanceColorListSelection fAppearanceColorList getSelectionIndex fAppearanceColorListModel PreferenceConverter getColor fOverlayStore fAppearanceColorEditor setColorValue updateAppearanceColorWidgets fAppearanceColorListModel
private void update Appearance Color Widgets String system Default Key if system Default Key null f Appearance Color Default set Selection false f Appearance Color Default set Visible false f Appearance Color Editor get Button set Enabled true else boolean system Default f Overlay Store get Boolean system Default Key f Appearance Color Default set Selection system Default f Appearance Color Default set Visible true f Appearance Color Editor get Button set Enabled system Default  updateAppearanceColorWidgets systemDefaultKey systemDefaultKey fAppearanceColorDefault setSelection fAppearanceColorDefault setVisible fAppearanceColorEditor getButton setEnabled systemDefault fOverlayStore getBoolean systemDefaultKey fAppearanceColorDefault setSelection systemDefault fAppearanceColorDefault setVisible fAppearanceColorEditor getButton setEnabled systemDefault
Selection Listener color Default Selection Listener new Selection Listener public void widget Selected Selection Event e boolean system Default f Appearance Color Default get Selection f Appearance Color Editor get Button set Enabled system Default int i f Appearance Color List get Selection Index String key f Appearance Color List Model i 2 if key null f Overlay Store set Value key system Default  SelectionListener colorDefaultSelectionListener SelectionListener widgetSelected SelectionEvent systemDefault fAppearanceColorDefault getSelection fAppearanceColorEditor getButton setEnabled systemDefault fAppearanceColorList getSelectionIndex fAppearanceColorListModel fOverlayStore setValue systemDefault
f Overlay Store set Value key system Default public void widget Default Selected Selection Event e  fOverlayStore setValue systemDefault widgetDefaultSelected SelectionEvent
f Appearance Color List add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  fAppearanceColorList addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
do nothing public void widget Selected Selection Event e handle Appearance Color List Selection  widgetSelected SelectionEvent handleAppearanceColorListSelection
foreground Color Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing  foregroundColorButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent
public void widget Selected Selection Event e int i f Appearance Color List get Selection Index String key f Appearance Color List Model i 1 Preference Converter set Value f Overlay Store key f Appearance Color Editor get Color Value  widgetSelected SelectionEvent fAppearanceColorList getSelectionIndex fAppearanceColorListModel PreferenceConverter setValue fOverlayStore fAppearanceColorEditor getColorValue
private Control create Appearance Page Composite parent Composite appearance Composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 appearance Composite set Layout layout String label Text Editor Messages get String Text Editor Preference Page displayed Tab Width NON NLS 1 add Text Field appearance Composite label Abstract Decorated Text Editor Preference Constants EDITOR TAB WIDTH 3 0 true label Text Editor Messages get String Text Editor Preference Page print Margin Column NON NLS 1 add Text Field appearance Composite label Abstract Decorated Text Editor Preference Constants EDITOR PRINT MARGIN COLUMN 3 0 true label Text Editor Messages get String Text Editor Preference Page show Overview Ruler NON NLS 1 add Check Box appearance Composite label Abstract Decorated Text Editor Preference Constants EDITOR OVERVIEW RULER 0 label Text Editor Messages get String Text Editor Preference Page show Line Numbers NON NLS 1 add Check Box appearance Composite label Abstract Decorated Text Editor Preference Constants EDITOR LINE NUMBER RULER 0 label Text Editor Messages get String Text Editor Preference Page highlight Current Line NON NLS 1 add Check Box appearance Composite label Abstract Decorated Text Editor Preference Constants EDITOR CURRENT LINE 0 label Text Editor Messages get String Text Editor Preference Page show Print Margin NON NLS 1 add Check Box appearance Composite label Abstract Decorated Text Editor Preference Constants EDITOR PRINT MARGIN 0 label Text Editor Messages get String Text Editor Preference Page accessibility disable Custom Carets NON NLS 1 Button master add Check Box appearance Composite label Abstract Decorated Text Editor Preference Constants EDITOR USE CUSTOM CARETS 0 label Text Editor Messages get String Text Editor Preference Page accessibility wide Caret NON NLS 1 Button slave add Check Box appearance Composite label Abstract Decorated Text Editor Preference Constants EDITOR WIDE CARET 0 create Dependency master Abstract Decorated Text Editor Preference Constants EDITOR USE CUSTOM CARETS slave Label l new Label appearance Composite SWT LEFT Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 gd height Hint convert Height In Chars To Pixels 1 2 l set Layout Data gd l new Label appearance Composite SWT LEFT l set Text Text Editor Messages get String Text Editor Preference Page appearance Options NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 l set Layout Data gd Composite editor Composite new Composite appearance Composite SWT NONE layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 editor Composite set Layout layout gd new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data FILL VERTICAL gd horizontal Span 2 editor Composite set Layout Data gd f Appearance Color List new List editor Composite SWT SINGLE SWT V SCROLL SWT BORDER gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data FILL HORIZONTAL gd height Hint convert Height In Chars To Pixels 5 f Appearance Color List set Layout Data gd Composite styles Composite new Composite editor Composite SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 2 styles Composite set Layout layout styles Composite set Layout Data new Grid Data Grid Data FILL BOTH l new Label styles Composite SWT LEFT l set Text Text Editor Messages get String Text Editor Preference Page color NON NLS 1 gd new Grid Data gd horizontal Alignment Grid Data BEGINNING l set Layout Data gd f Appearance Color Editor new Color Editor styles Composite Button foreground Color Button f Appearance Color Editor get Button gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING foreground Color Button set Layout Data gd Selection Listener color Default Selection Listener new Selection Listener public void widget Selected Selection Event e boolean system Default f Appearance Color Default get Selection f Appearance Color Editor get Button set Enabled system Default int i f Appearance Color List get Selection Index String key f Appearance Color List Model i 2 if key null f Overlay Store set Value key system Default public void widget Default Selected Selection Event e f Appearance Color Default new Button styles Composite SWT CHECK f Appearance Color Default set Text Text Editor Messages get String Text Editor Preference Page system Default NON NLS 1 gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Alignment Grid Data BEGINNING gd horizontal Span 2 f Appearance Color Default set Layout Data gd f Appearance Color Default set Visible false f Appearance Color Default add Selection Listener color Default Selection Listener f Appearance Color List add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e handle Appearance Color List Selection foreground Color Button add Selection Listener new Selection Listener public void widget Default Selected Selection Event e do nothing public void widget Selected Selection Event e int i f Appearance Color List get Selection Index String key f Appearance Color List Model i 1 Preference Converter set Value f Overlay Store key f Appearance Color Editor get Color Value return appearance Composite  createAppearancePage appearanceComposite GridLayout GridLayout numColumns appearanceComposite setLayout TextEditorMessages getString TextEditorPreferencePage displayedTabWidth addTextField appearanceComposite AbstractDecoratedTextEditorPreferenceConstants EDITOR_TAB_WIDTH TextEditorMessages getString TextEditorPreferencePage printMarginColumn addTextField appearanceComposite AbstractDecoratedTextEditorPreferenceConstants EDITOR_PRINT_MARGIN_COLUMN TextEditorMessages getString TextEditorPreferencePage showOverviewRuler addCheckBox appearanceComposite AbstractDecoratedTextEditorPreferenceConstants EDITOR_OVERVIEW_RULER TextEditorMessages getString TextEditorPreferencePage showLineNumbers addCheckBox appearanceComposite AbstractDecoratedTextEditorPreferenceConstants EDITOR_LINE_NUMBER_RULER TextEditorMessages getString TextEditorPreferencePage highlightCurrentLine addCheckBox appearanceComposite AbstractDecoratedTextEditorPreferenceConstants EDITOR_CURRENT_LINE TextEditorMessages getString TextEditorPreferencePage showPrintMargin addCheckBox appearanceComposite AbstractDecoratedTextEditorPreferenceConstants EDITOR_PRINT_MARGIN TextEditorMessages getString TextEditorPreferencePage disableCustomCarets addCheckBox appearanceComposite AbstractDecoratedTextEditorPreferenceConstants EDITOR_USE_CUSTOM_CARETS TextEditorMessages getString TextEditorPreferencePage wideCaret addCheckBox appearanceComposite AbstractDecoratedTextEditorPreferenceConstants EDITOR_WIDE_CARET createDependency AbstractDecoratedTextEditorPreferenceConstants EDITOR_USE_CUSTOM_CARETS appearanceComposite GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan heightHint convertHeightInCharsToPixels setLayoutData appearanceComposite setText TextEditorMessages getString TextEditorPreferencePage appearanceOptions GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan setLayoutData editorComposite appearanceComposite GridLayout numColumns marginHeight marginWidth editorComposite setLayout GridData GridData HORIZONTAL_ALIGN_FILL GridData FILL_VERTICAL horizontalSpan editorComposite setLayoutData fAppearanceColorList editorComposite V_SCROLL GridData GridData VERTICAL_ALIGN_BEGINNING GridData FILL_HORIZONTAL heightHint convertHeightInCharsToPixels fAppearanceColorList setLayoutData stylesComposite editorComposite GridLayout marginHeight marginWidth numColumns stylesComposite setLayout stylesComposite setLayoutData GridData GridData FILL_BOTH stylesComposite setText TextEditorMessages getString TextEditorPreferencePage GridData horizontalAlignment GridData setLayoutData fAppearanceColorEditor ColorEditor stylesComposite foregroundColorButton fAppearanceColorEditor getButton GridData GridData FILL_HORIZONTAL horizontalAlignment GridData foregroundColorButton setLayoutData SelectionListener colorDefaultSelectionListener SelectionListener widgetSelected SelectionEvent systemDefault fAppearanceColorDefault getSelection fAppearanceColorEditor getButton setEnabled systemDefault fAppearanceColorList getSelectionIndex fAppearanceColorListModel fOverlayStore setValue systemDefault widgetDefaultSelected SelectionEvent fAppearanceColorDefault stylesComposite fAppearanceColorDefault setText TextEditorMessages getString TextEditorPreferencePage systemDefault GridData GridData FILL_HORIZONTAL horizontalAlignment GridData horizontalSpan fAppearanceColorDefault setLayoutData fAppearanceColorDefault setVisible fAppearanceColorDefault addSelectionListener colorDefaultSelectionListener fAppearanceColorList addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent handleAppearanceColorListSelection foregroundColorButton addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent widgetSelected SelectionEvent fAppearanceColorList getSelectionIndex fAppearanceColorListModel PreferenceConverter setValue fOverlayStore fAppearanceColorEditor getColorValue appearanceComposite
protected Control create Contents Composite parent initialize Default Colors f Overlay Store load f Overlay Store start Control control create Appearance Page parent initialize Dialog apply Dialog Font control return control  createContents initializeDefaultColors fOverlayStore fOverlayStore createAppearancePage applyDialogFont
f Appearance Color List get Display async Exec new Runnable public void run if f Appearance Color List null f Appearance Color List is Disposed f Appearance Color List select 0 handle Appearance Color List Selection  fAppearanceColorList getDisplay asyncExec fAppearanceColorList fAppearanceColorList isDisposed fAppearanceColorList handleAppearanceColorListSelection
private void initialize initialize Fields for int i 0 i f Appearance Color List Model length i f Appearance Color List add f Appearance Color List Model i 0 f Appearance Color List get Display async Exec new Runnable public void run if f Appearance Color List null f Appearance Color List is Disposed f Appearance Color List select 0 handle Appearance Color List Selection  initializeFields fAppearanceColorListModel fAppearanceColorList fAppearanceColorListModel fAppearanceColorList getDisplay asyncExec fAppearanceColorList fAppearanceColorList isDisposed fAppearanceColorList handleAppearanceColorListSelection
private void initialize Fields Iterator e f Check Boxes key Set iterator while e has Next Button b Button e next String key String f Check Boxes get b b set Selection f Overlay Store get Boolean key e f Text Fields key Set iterator while e has Next Text t Text e next String key String f Text Fields get t t set Text f Overlay Store get String key f Fields Initialized true update Status validate Positive Number 0 NON NLS 1 Update slaves Iterator iter f Master Slave Listeners iterator while iter has Next Selection Listener listener Selection Listener iter next listener widget Selected null  initializeFields fCheckBoxes keySet hasNext fCheckBoxes setSelection fOverlayStore getBoolean fTextFields keySet hasNext fTextFields setText fOverlayStore getString fFieldsInitialized updateStatus validatePositiveNumber fMasterSlaveListeners hasNext SelectionListener SelectionListener widgetSelected
private void initialize Default Colors if get Preference Store contains Abstract Decorated Text Editor Preference Constants EDITOR SELECTION BACKGROUND COLOR RGB rgb get Control get Display get System Color SWT COLOR LIST SELECTION getRGB Preference Converter set Default f Overlay Store Abstract Decorated Text Editor Preference Constants EDITOR SELECTION BACKGROUND COLOR rgb Preference Converter set Default get Preference Store Abstract Decorated Text Editor Preference Constants EDITOR SELECTION BACKGROUND COLOR rgb if get Preference Store contains Abstract Decorated Text Editor Preference Constants EDITOR SELECTION FOREGROUND COLOR RGB rgb get Control get Display get System Color SWT COLOR LIST SELECTION TEXT getRGB Preference Converter set Default f Overlay Store Abstract Decorated Text Editor Preference Constants EDITOR SELECTION FOREGROUND COLOR rgb Preference Converter set Default get Preference Store Abstract Decorated Text Editor Preference Constants EDITOR SELECTION FOREGROUND COLOR rgb  initializeDefaultColors getPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_BACKGROUND_COLOR getControl getDisplay getSystemColor COLOR_LIST_SELECTION PreferenceConverter setDefault fOverlayStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_BACKGROUND_COLOR PreferenceConverter setDefault getPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_BACKGROUND_COLOR getPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_FOREGROUND_COLOR getControl getDisplay getSystemColor COLOR_LIST_SELECTION_TEXT PreferenceConverter setDefault fOverlayStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_FOREGROUND_COLOR PreferenceConverter setDefault getPreferenceStore AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_FOREGROUND_COLOR
public boolean perform Ok f Overlay Store propagate Editors Plugin get Default save Plugin Preferences return true  performOk fOverlayStore EditorsPlugin getDefault savePluginPreferences
protected void perform Defaults f Overlay Store load Defaults initialize Fields handle Appearance Color List Selection super perform Defaults  performDefaults fOverlayStore loadDefaults initializeFields handleAppearanceColorListSelection performDefaults
public void dispose if f Overlay Store null f Overlay Store stop f Overlay Store null super dispose  fOverlayStore fOverlayStore fOverlayStore
private Button add Check Box Composite parent String label String key int indentation Button check Box new Button parent SWT CHECK check Box set Text label Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Indent indentation gd horizontal Span 2 check Box set Layout Data gd check Box add Selection Listener f Check Box Listener f Check Boxes put check Box key return check Box  addCheckBox checkBox checkBox setText GridData GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalIndent horizontalSpan checkBox setLayoutData checkBox addSelectionListener fCheckBoxListener fCheckBoxes checkBox checkBox
private Control add Text Field Composite composite String label String key int text Limit int indentation boolean is Number Label label Control new Label composite SWT NONE label Control set Text label Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd horizontal Indent indentation label Control set Layout Data gd Text text Control new Text composite SWT BORDER SWT SINGLE gd new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING gd width Hint convert Width In Chars To Pixels text Limit 1 text Control set Layout Data gd text Control set Text Limit text Limit f Text Fields put text Control key if is Number f Number Fields add text Control text Control add Modify Listener f Number Field Listener else text Control add Modify Listener f Text Field Listener return text Control  addTextField textLimit isNumber labelControl labelControl setText GridData GridData GridData HORIZONTAL_ALIGN_BEGINNING horizontalIndent labelControl setLayoutData textControl GridData GridData HORIZONTAL_ALIGN_BEGINNING widthHint convertWidthInCharsToPixels textLimit textControl setLayoutData textControl setTextLimit textLimit fTextFields textControl isNumber fNumberFields textControl textControl addModifyListener fNumberFieldListener textControl addModifyListener fTextFieldListener textControl
Selection Listener listener new Selection Listener public void widget Selected Selection Event e slave set Enabled master get Selection  SelectionListener SelectionListener widgetSelected SelectionEvent setEnabled getSelection
public void widget Default Selected Selection Event e  widgetDefaultSelected SelectionEvent
private void create Dependency final Button master String master Key final Control slave indent slave boolean master State f Overlay Store get Boolean master Key slave set Enabled master State Selection Listener listener new Selection Listener public void widget Selected Selection Event e slave set Enabled master get Selection public void widget Default Selected Selection Event e master add Selection Listener listener f Master Slave Listeners add listener  createDependency masterKey masterState fOverlayStore getBoolean masterKey setEnabled masterState SelectionListener SelectionListener widgetSelected SelectionEvent setEnabled getSelection widgetDefaultSelected SelectionEvent addSelectionListener fMasterSlaveListeners
private static void indent Control control Grid Data grid Data new Grid Data grid Data horizontal Indent 20 control set Layout Data grid Data  GridData gridData GridData gridData horizontalIndent setLayoutData gridData
private void number Field Changed Text text Control String number text Control get Text I Status status validate Positive Number number if status matches I Status ERROR f Overlay Store set Value String f Text Fields get text Control number update Status status  numberFieldChanged textControl textControl getText IStatus validatePositiveNumber IStatus fOverlayStore setValue fTextFields textControl updateStatus
private I Status validate Positive Number String number Status Info status new Status Info if number length 0 status set Error Text Editor Messages get String Text Editor Preference Page empty input NON NLS 1 else try int value Integer parse Int number if value 0 status set Error Text Editor Messages get Formatted String Text Editor Preference Page invalid input number NON NLS 1 catch Number Format Exception e status set Error Text Editor Messages get Formatted String Text Editor Preference Page invalid input number NON NLS 1 return status  IStatus validatePositiveNumber StatusInfo StatusInfo setError TextEditorMessages getString TextEditorPreferencePage empty_input parseInt setError TextEditorMessages getFormattedString TextEditorPreferencePage invalid_input NumberFormatException setError TextEditorMessages getFormattedString TextEditorPreferencePage invalid_input
void update Status I Status status if f Fields Initialized return if status matches I Status ERROR for int i 0 i f Number Fields size i Text text Text f Number Fields get i I Status s validate Positive Number text get Text status s get Severity status get Severity s status set Valid status matches I Status ERROR apply To Status Line this status  updateStatus IStatus fFieldsInitialized IStatus fNumberFields fNumberFields IStatus validatePositiveNumber getText getSeverity getSeverity setValid IStatus applyToStatusLine
Applies the status to the status line of a dialog page param page the dialog page param status the status public void apply To Status Line Dialog Page page I Status status String message status get Message switch status get Severity case I Status OK page set Message message I Message Provider NONE page set Error Message null break case I Status WARNING page set Message message I Message Provider WARNING page set Error Message null break case I Status INFO page set Message message I Message Provider INFORMATION page set Error Message null break default if message length 0 message null page set Message null page set Error Message message break  applyToStatusLine DialogPage IStatus getMessage getSeverity IStatus setMessage IMessageProvider setErrorMessage IStatus setMessage IMessageProvider setErrorMessage IStatus setMessage IMessageProvider setErrorMessage setMessage setErrorMessage

public void run Runnable runnable I Workbench workbench PlatformUI get Workbench I Workbench Window windows workbench get Workbench Windows if windows null windows length 0 Display display windows 0 get Shell get Display display async Exec runnable else runnable run  IWorkbench getWorkbench IWorkbenchWindow getWorkbenchWindows getShell getDisplay asyncExec

private I Progress Monitor f Progress Monitor public Workspace Operation Runner  IProgressMonitor fProgressMonitor WorkspaceOperationRunner
Sets the progress monitor param progress Monitor the progress monitor to set public void set Progress Monitor I Progress Monitor progress Monitor f Progress Monitor progress Monitor  progressMonitor setProgressMonitor IProgressMonitor progressMonitor fProgressMonitor progressMonitor
Returns the progress monitor It there is no progress monitor the monitor is set to the code Null Progress Monitor code return the progress monitor public I Progress Monitor get Progress Monitor if f Progress Monitor null f Progress Monitor new Null Progress Monitor return f Progress Monitor  NullProgressMonitor IProgressMonitor getProgressMonitor fProgressMonitor fProgressMonitor NullProgressMonitor fProgressMonitor
public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception if runnable instanceof I Scheduling Rule Provider run fork cancelable runnable I Scheduling Rule Provider runnable get Scheduling Rule else run fork cancelable runnable Resources Plugin get Workspace get Root  IRunnableWithProgress InvocationTargetException InterruptedException ISchedulingRuleProvider ISchedulingRuleProvider getSchedulingRule ResourcesPlugin getWorkspace getRoot
see org eclipse jface operation I Runnable Context run boolean boolean org eclipse jface operation I Runnable With Progress public void run boolean fork boolean cancelable I Runnable With Progress runnable I Scheduling Rule scheduling Rule throws Invocation Target Exception Interrupted Exception Workspace Modify Delegating Operation operation new Workspace Modify Delegating Operation runnable scheduling Rule operation run get Progress Monitor  IRunnableContext IRunnableWithProgress IRunnableWithProgress ISchedulingRule schedulingRule InvocationTargetException InterruptedException WorkspaceModifyDelegatingOperation WorkspaceModifyDelegatingOperation schedulingRule getProgressMonitor

Returns whether the current platform has support for system in place editor public static boolean in Place Editor Supported only Win32 is supported return SWT get Platform equals win32 NON NLS 1  inPlaceEditorSupported getPlatform
Return the default system in place editor part or code null code if not support by platform public static I Editor Part get System In Place Editor if in Place Editor Supported return get Ole Editor return null  IEditorPart getSystemInPlaceEditor inPlaceEditorSupported getOleEditor
Returns whether an in place editor is available to edit the file param filename the file name in the system public static boolean in Place Editor Available String filename if in Place Editor Supported return test For Ole Editor filename else return false  inPlaceEditorAvailable inPlaceEditorSupported testForOleEditor
Get a new OLE Editor return I Editor Part private static I Editor Part get Ole Editor issue currently assumes OLE editor is provided by IDE plug in IDE plug in is not on prereq chain of generic wb plug in hence I Contributor Resource Adapter class won t compile and Class for Name org eclipse ui internal editorsupport win32 Ole Editor won t find it need to be trickier Bundle bundle Platform get Bundle org eclipse ui ide NON NLS 1 it s not our job to activate the plug in if Bundle Utility is Activated bundle return null try Class c bundle load Class org eclipse ui internal editorsupport win32 Ole Editor NON NLS 1 return I Editor Part c new Instance catch Class Not Found Exception exception return null catch Illegal Access Exception exception return null catch Instantiation Exception exception return null  OLEEditor IEditorPart IEditorPart getOleEditor IContributorResourceAdapter forName OleEditor getBundle BundleUtility isActivated loadClass OleEditor IEditorPart newInstance ClassNotFoundException IllegalAccessException InstantiationException
public static boolean test For Ole Editor String filename int n Dot filename last Index Of if n Dot 0 try String str Name filename substring n Dot Class ole Class Class for Name org eclipse swt ole win32 OLE NON NLS 1 Method find Method ole Class get Declared Method find ProgramID new Class String class NON NLS 1 str Name String find Method invoke null new Object str Name if str Name length 0 return true catch Class Not Found Exception exception Couldn t ask so return false return false catch No Such Method Exception exception Couldn t find the method so return false return false catch Illegal Access Exception exception return false catch Invocation Target Exception exception return false return false  testForOleEditor nDot lastIndexOf nDot strName nDot oleClass forName findMethod oleClass getDeclaredMethod findProgramID strName findMethod strName strName ClassNotFoundException NoSuchMethodException IllegalAccessException InvocationTargetException

public void resource Changed I Resource Change Event event I Resource Delta main Delta event get Delta if main Delta null return I Resource Delta affected Element main Delta find Member resource get Full Path if affected Element null try process Delta affected Element catch Core Exception exception Failed so close the receiver get Site get Page close Editor Ole Editor this true  resourceChanged IResourceChangeEvent IResourceDelta mainDelta getDelta mainDelta IResourceDelta affectedElement mainDelta findMember getFullPath affectedElement processDelta affectedElement CoreException getSite getPage closeEditor OleEditor
change Runnable new Runnable public void run I Path path delta get Moved To Path I File new File delta get Resource get Workspace get Root get File path if new File null source Changed new File  changeRunnable IPath getMovedToPath IFile newFile getResource getWorkspace getRoot getFile newFile sourceChanged newFile
else change Runnable new Runnable public void run source Deleted true get Site get Page close Editor Ole Editor this true  changeRunnable sourceDeleted getSite getPage closeEditor OleEditor
private boolean process Delta final I Resource Delta delta throws Core Exception Runnable change Runnable null switch delta get Kind case I Resource Delta REMOVED if I Resource Delta MOVED TO delta get Flags 0 change Runnable new Runnable public void run I Path path delta get Moved To Path I File new File delta get Resource get Workspace get Root get File path if new File null source Changed new File else change Runnable new Runnable public void run source Deleted true get Site get Page close Editor Ole Editor this true break if change Runnable null update change Runnable return true because we are sitting on files anyway  processDelta IResourceDelta CoreException changeRunnable getKind IResourceDelta IResourceDelta MOVED_TO getFlags changeRunnable IPath getMovedToPath IFile newFile getResource getWorkspace getRoot getFile newFile sourceChanged newFile changeRunnable sourceDeleted getSite getPage closeEditor OleEditor changeRunnable changeRunnable
private I Part Listener part Listener new I Part Listener public void part Activated I Workbench Part part activate Client part  IPartListener partListener IPartListener partActivated IWorkbenchPart activateClient
activate Client part public void part Brought To Top I Workbench Part part  activateClient partBroughtToTop IWorkbenchPart
public void part Brought To Top I Workbench Part part public void part Closed I Workbench Part part  partBroughtToTop IWorkbenchPart partClosed IWorkbenchPart
public void part Closed I Workbench Part part public void part Opened I Workbench Part part  partClosed IWorkbenchPart partOpened IWorkbenchPart
public void part Opened I Workbench Part part public void part Deactivated I Workbench Part part deactivate Client part  partOpened IWorkbenchPart partDeactivated IWorkbenchPart deactivateClient
Return a new ole editor public Ole Editor  OleEditor
private void activate Client I Workbench Part part if part this ole Activate this client Active true  activateClient IWorkbenchPart oleActivate clientActive
create Part Control method comment public void create Part Control Composite parent Create a frame client Frame new Ole Frame parent SWT CLIP CHILDREN client Frame set Background J Face Colors get Banner Background client Frame get Display initialize Workbench Menus Set the input file I Editor Input input get Editor Input if input instanceof I File Editor Input set Resource I File Editor Input input get File resource get Workspace add Resource Change Listener resource Listener create Client Site  createPartControl createPartControl clientFrame OleFrame CLIP_CHILDREN clientFrame setBackground JFaceColors getBannerBackground clientFrame getDisplay initializeWorkbenchMenus IEditorInput getEditorInput IFileEditorInput setResource IFileEditorInput getFile getWorkspace addResourceChangeListener resourceListener createClientSite
Create the client site for the reciever private void create Client Site If there was an OLE Error or nothing has been created yet if client Frame null client Frame is Disposed return Create a OLE client site client Site new Ole Client Site client Frame SWT NONE source client Site set Background J Face Colors get Banner Background client Frame get Display  createClientSite clientFrame clientFrame isDisposed clientSite OleClientSite clientFrame clientSite setBackground JFaceColors getBannerBackground clientFrame getDisplay
private void deactivate Client I Workbench Part part Check the client active flag Set it to false when we have deactivated to prevent multiple deactivations if part this client Active if client Site null client Site deactivate In Place Client this client Active false this ole Activated false  deactivateClient IWorkbenchPart clientActive clientSite clientSite deactivateInPlaceClient clientActive oleActivated
Display an error dialog with the supplied title and message private void display Error Dialog String title String message Shell parent null if get Client Site null parent get Client Site get Shell Message Dialog open Error parent title message  displayErrorDialog getClientSite getClientSite getShell MessageDialog openError
see I Workbench Part dispose public void dispose if resource null resource get Workspace remove Resource Change Listener resource Listener can dispose the title image because it was created in init if ole Title Image null ole Title Image dispose ole Title Image null if get Site null get Site get Page null get Site get Page remove Part Listener part Listener  IWorkbenchPart getWorkspace removeResourceChangeListener resourceListener oleTitleImage oleTitleImage oleTitleImage getSite getSite getPage getSite getPage removePartListener partListener
return Busy Indicator show While client Site get Display new Runnable public void run client Site exec OLE OLECMDID PRINT OLE OLECMDEXECOPT PROMPTUSER null null note to check for success above SWTOLE S OK  BusyIndicator showWhile clientSite getDisplay clientSite OLECMDID_PRINT OLECMDEXECOPT_PROMPTUSER S_OK
Print this object s contents public void do Print if client Site null return Busy Indicator show While client Site get Display new Runnable public void run client Site exec OLE OLECMDID PRINT OLE OLECMDEXECOPT PROMPTUSER null null note to check for success above SWTOLE S OK  doPrint clientSite BusyIndicator showWhile clientSite getDisplay clientSite OLECMDID_PRINT OLECMDEXECOPT_PROMPTUSER S_OK
Busy Indicator show While client Site get Display new Runnable public void run Do not try and use the component provided save if the source has changed in Eclipse if source Changed int result client Site query Status OLE OLECMDID SAVE if result OLE OLECMDF ENABLED 0 result client Site exec OLE OLECMDID SAVE OLE OLECMDEXECOPT PROMPTUSER null null if result OLE S OK try resource refresh Local I Resource DEPTH ZERO monitor catch Core Exception ex return else display Error Dialog OLE EXCEPTION TITLE OLE EXCEPTION MESSAGE String value Of result return if save File source try resource refresh Local I Resource DEPTH ZERO monitor catch Core Exception ex else display Error Dialog SAVE ERROR TITLE SAVE ERROR MESSAGE source get Name  BusyIndicator showWhile clientSite getDisplay sourceChanged clientSite queryStatus OLECMDID_SAVE OLECMDF_ENABLED clientSite OLECMDID_SAVE OLECMDEXECOPT_PROMPTUSER S_OK refreshLocal IResource DEPTH_ZERO CoreException displayErrorDialog OLE_EXCEPTION_TITLE OLE_EXCEPTION_MESSAGE valueOf saveFile refreshLocal IResource DEPTH_ZERO CoreException displayErrorDialog SAVE_ERROR_TITLE SAVE_ERROR_MESSAGE getName
Save the viewer s contents to the source file system file public void do Save final I Progress Monitor monitor if client Site null return Busy Indicator show While client Site get Display new Runnable public void run Do not try and use the component provided save if the source has changed in Eclipse if source Changed int result client Site query Status OLE OLECMDID SAVE if result OLE OLECMDF ENABLED 0 result client Site exec OLE OLECMDID SAVE OLE OLECMDEXECOPT PROMPTUSER null null if result OLE S OK try resource refresh Local I Resource DEPTH ZERO monitor catch Core Exception ex return else display Error Dialog OLE EXCEPTION TITLE OLE EXCEPTION MESSAGE String value Of result return if save File source try resource refresh Local I Resource DEPTH ZERO monitor catch Core Exception ex else display Error Dialog SAVE ERROR TITLE SAVE ERROR MESSAGE source get Name  doSave IProgressMonitor clientSite BusyIndicator showWhile clientSite getDisplay sourceChanged clientSite queryStatus OLECMDID_SAVE OLECMDF_ENABLED clientSite OLECMDID_SAVE OLECMDEXECOPT_PROMPTUSER S_OK refreshLocal IResource DEPTH_ZERO CoreException displayErrorDialog OLE_EXCEPTION_TITLE OLE_EXCEPTION_MESSAGE valueOf saveFile refreshLocal IResource DEPTH_ZERO CoreException displayErrorDialog SAVE_ERROR_TITLE SAVE_ERROR_MESSAGE getName
Save the viewer s contents into the provided resource public void do Save As if client Site null return Workspace Modify Operation op save New File Operation Shell shell client Site get Shell try new Progress Monitor Dialog shell run false true op catch Interrupted Exception interrupt Nothing to reset so do nothing catch Invocation Target Exception invocation Exception Message Dialog open Error shell RENAME ERROR TITLE invocation Exception get Target Exception get Message  doSaveAs clientSite WorkspaceModifyOperation saveNewFileOperation clientSite getShell ProgressMonitorDialog InterruptedException InvocationTargetException invocationException MessageDialog openError RENAME_ERROR_TITLE invocationException getTargetException getMessage
Answer self s client site return org eclipse swt ole win32 Ole Client Site public Ole Client Site get Client Site return client Site  OleClientSite OleClientSite getClientSite clientSite
Answer the file system representation of self s input element return java io File public File get Source File return source  getSourceFile
see I Editor Part public void goto Marker I Marker marker  IEditorPart gotoMarker IMarker
private void handle Word Ole Automation disp Interface new Ole Automation client Site Get Application int app Id disp Interface getI Ds Of Names new String Application NON NLS 1 if app Id null Variant p Var Result disp Interface get Property app Id 0 if p Var Result null Ole Automation application p Var Result get Automation int dispid application getI Ds Of Names new String Display Scroll Bars NON NLS 1 if dispid null Variant rgvarg new Variant true application set Property dispid 0 rgvarg application dispose disp Interface dispose  handleWord OleAutomation dispInterface OleAutomation clientSite appId dispInterface getIDsOfNames appId pVarResult dispInterface getProperty appId pVarResult OleAutomation pVarResult getAutomation getIDsOfNames DisplayScrollBars setProperty dispInterface
public void init I Editor Site site I Editor Input input throws Part Init Exception Check input if input instanceof I File Editor Input throw new Part Init Exception Workbench Messages format Ole Editor invalid Input new Object input NON NLS 1 NON NLS 1 I File file I File Editor Input input get File Cannot create this with a file and no physical location if file get Location null new File file get Location toOS String exists throw new Part Init Exception Workbench Messages format Ole Editor no File Input new Object file get Location NON NLS 1 Save input set Site site set Input input Update titles set Title input get Name set Title Tool Tip input get Tool Tip Text Image Descriptor desc input get Image Descriptor if desc null ole Title Image desc create Image set Title Image ole Title Image Listen for part activation site get Page add Part Listener part Listener  IEditorSite IEditorInput PartInitException IFileEditorInput PartInitException WorkbenchMessages OleEditor invalidInput IFile IFileEditorInput getFile getLocation getLocation toOSString PartInitException WorkbenchMessages OleEditor noFileInput getLocation setSite setInput setTitle getName setTitleToolTip getToolTipText ImageDescriptor getImageDescriptor oleTitleImage createImage setTitleImage oleTitleImage getPage addPartListener partListener
Initialize the workbench menus for proper merging protected void initialize Workbench Menus If there was an OLE Error or nothing has been created yet if client Frame null client Frame is Disposed return Get the browser menubar If one does not exist then create it Shell shell client Frame get Shell Menu menu Bar shell get Menu Bar if menu Bar null menu Bar new Menu shell SWT BAR shell set Menu Bar menu Bar Swap the file and window menus Menu Item window Menu new Menu Item 1 Menu Item file Menu new Menu Item 1 Vector container Items new Vector I Workbench Window window get Site get Workbench Window for int i 0 i menu Bar get Item Count i Menu Item item menu Bar get Item i String id NON NLS 1 if item get Data instanceof I Menu Manager id I Menu Manager item get Data get Id if id equals I Workbench Action Constants M FILE file Menu 0 item else if id equals I Workbench Action Constants M WINDOW window Menu 0 item else if window is Application Menu id container Items add Element item Menu Item container Menu new Menu Item container Items size container Items copy Into container Menu client Frame set File Menus file Menu client Frame set Container Menus container Menu client Frame set Window Menus window Menu  initializeWorkbenchMenus clientFrame clientFrame isDisposed clientFrame getShell menuBar getMenuBar menuBar menuBar setMenuBar menuBar MenuItem windowMenu MenuItem MenuItem fileMenu MenuItem containerItems IWorkbenchWindow getSite getWorkbenchWindow menuBar getItemCount MenuItem menuBar getItem getData IMenuManager IMenuManager getData getId IWorkbenchActionConstants M_FILE fileMenu IWorkbenchActionConstants M_WINDOW windowMenu isApplicationMenu containerItems addElement MenuItem containerMenu MenuItem containerItems containerItems copyInto containerMenu clientFrame setFileMenus fileMenu clientFrame setContainerMenus containerMenu clientFrame setWindowMenus windowMenu
public boolean is Dirty Return only if we have a client Site which is dirty as this can be asked before anything is opened return this client Site null  isDirty clientSite clientSite
see I Editor Part public boolean is Save As Allowed return true  IEditorPart isSaveAsAllowed
Since we don t know when a change has been made always answer true public boolean is Save Needed Answer false if it was not opened and true only if it is dirty return get Client Site null is Dirty  isSaveNeeded getClientSite isDirty
Save the supplied file using the SWT API param file java io File private boolean save File File file File temp File new File file get Absolute Path tmp NON NLS 1 file rename To temp File boolean saved false if OLE is Ole File file uses Storage Files client Site get ProgramID saved client Site save file true else saved client Site save file false if saved save was successful so discard the backup temp File delete return true else save failed so restore the backup temp File rename To file return false  saveFile tempFile getAbsolutePath renameTo tempFile isOleFile usesStorageFiles clientSite getProgramID clientSite clientSite tempFile tempFile renameTo
return new Workspace Modify Operation public void execute final I Progress Monitor monitor throws Core Exception Save As Dialog dialog new Save As Dialog client Frame get Shell I File Editor Input input I File Editor Input get Editor Input I File s File input get File dialog set Original File s File dialog open I Path new Path dialog get Result if new Path null return if dialog get Return Code Dialog OK String project Name new Path segment 0 new Path new Path remove First Segments 1 I Project project resource get Workspace get Root get Project project Name new Path project get Location append new Path File new File new Path to File if save File new File I File new Resource resource get Workspace get Root get File For Location new Path if new Resource null source Changed new Resource new Resource refresh Local I Resource DEPTH ZERO monitor else display Error Dialog SAVE ERROR TITLE SAVE ERROR MESSAGE new File get Name return  WorkspaceModifyOperation IProgressMonitor CoreException SaveAsDialog SaveAsDialog clientFrame getShell IFileEditorInput IFileEditorInput getEditorInput IFile sFile getFile setOriginalFile sFile IPath newPath getResult newPath getReturnCode projectName newPath newPath newPath removeFirstSegments IProject getWorkspace getRoot getProject projectName newPath getLocation newPath newFile newPath toFile saveFile newFile IFile newResource getWorkspace getRoot getFileForLocation newPath newResource sourceChanged newResource newResource refreshLocal IResource DEPTH_ZERO displayErrorDialog SAVE_ERROR_TITLE SAVE_ERROR_MESSAGE newFile getName
Save the new File using the client site private Workspace Modify Operation save New File Operation return new Workspace Modify Operation public void execute final I Progress Monitor monitor throws Core Exception Save As Dialog dialog new Save As Dialog client Frame get Shell I File Editor Input input I File Editor Input get Editor Input I File s File input get File dialog set Original File s File dialog open I Path new Path dialog get Result if new Path null return if dialog get Return Code Dialog OK String project Name new Path segment 0 new Path new Path remove First Segments 1 I Project project resource get Workspace get Root get Project project Name new Path project get Location append new Path File new File new Path to File if save File new File I File new Resource resource get Workspace get Root get File For Location new Path if new Resource null source Changed new Resource new Resource refresh Local I Resource DEPTH ZERO monitor else display Error Dialog SAVE ERROR TITLE SAVE ERROR MESSAGE new File get Name return  WorkspaceModifyOperation saveNewFileOperation WorkspaceModifyOperation IProgressMonitor CoreException SaveAsDialog SaveAsDialog clientFrame getShell IFileEditorInput IFileEditorInput getEditorInput IFile sFile getFile setOriginalFile sFile IPath newPath getResult newPath getReturnCode projectName newPath newPath newPath removeFirstSegments IProject getWorkspace getRoot getProject projectName newPath getLocation newPath newFile newPath toFile saveFile newFile IFile newResource getWorkspace getRoot getFileForLocation newPath newResource sourceChanged newResource newResource refreshLocal IResource DEPTH_ZERO displayErrorDialog SAVE_ERROR_TITLE SAVE_ERROR_MESSAGE newFile getName
Asks the part to take focus within the workbench public void set Focus  setFocus
Make ole active so that the controls are rendered private void ole Activate If there was an OLE Error or nothing has been created yet if client Site null client Frame null client Frame is Disposed return if ole Activated client Site do Verb OLE OLEIVERB SHOW ole Activated true String prog Id client Site get ProgramID if prog Id null prog Id starts With Word Document NON NLS 1 handle Word  oleActivate clientSite clientFrame clientFrame isDisposed oleActivated clientSite doVerb OLEIVERB_SHOW oleActivated progId clientSite getProgramID progId progId startsWith handleWord
Set the file resource that this object is displaying protected void set Resource I File file resource file source new File file get Location toOS String  setResource IFile getLocation toOSString
See if it is one of the known types that use OLE Storage private static boolean uses Storage Files String progID return progID null progID starts With Word 0 NON NLS 1 progID starts With MS Graph 0 NON NLS 1 progID starts With Power Point 0 NON NLS 1 progID starts With Excel 0 NON NLS 1  usesStorageFiles startsWith startsWith MSGraph startsWith PowerPoint startsWith
The source has changed to the new File Update editors and set any required flags private void source Changed I File new File File Editor Input new Input new File Editor Input new File set Input new Input set Resource new File source Changed true set Title new Input get Name  newFile sourceChanged IFile newFile FileEditorInput newInput FileEditorInput newFile setInput newInput setResource newFile sourceChanged setTitle newInput getName
See I Editor Part is Save On Close Needed public boolean is Save On Close Needed return source Deleted super is Save On Close Needed  IEditorPart isSaveOnCloseNeeded isSaveOnCloseNeeded sourceDeleted isSaveOnCloseNeeded
Posts the update code behind the running operation param runnable the update code private void update Runnable runnable I Workbench workbench PlatformUI get Workbench I Workbench Window windows workbench get Workbench Windows if windows null windows length 0 Display display windows 0 get Shell get Display display async Exec runnable else runnable run  IWorkbench getWorkbench IWorkbenchWindow getWorkbenchWindows getShell getDisplay asyncExec

Constructs a new editor List view public Editor View  editorList EditorView
public void create Part Control Composite parent I Workbench Window window get Site get Page get Workbench Window editor List new Editor List window null editor List create Control parent  createPartControl IWorkbenchWindow getSite getPage getWorkbenchWindow editorList EditorList editorList createControl
public void dispose editor List dispose editor List null super dispose  editorList editorList
see I Workbench Part set Focus public void set Focus editor List get Control set Focus  IWorkbenchPart setFocus setFocus editorList getControl setFocus

Returns the singleton exception handler return the singleton exception handler public static Exception Handler get Instance return instance  ExceptionHandler getInstance
private int exception Count 0 To avoid recursive errors private Exception Handler prevents instantiation  exceptionCount ExceptionHandler
public void handle Exception Throwable t try Ignore Thread Death error as its normal to get this when thread dies if t instanceof Thread Death throw Thread Death t Check to avoid recursive errors exception Count if exception Count 2 if t instanceof Runtime Exception throw Runtime Exception t else throw Error t Let the advisor handle this now Workbench wb Workbench get Instance if wb null wb get Advisor event Loop Exception t finally exception Count  handleException ThreadDeath ThreadDeath ThreadDeath exceptionCount exceptionCount RuntimeException RuntimeException getInstance getAdvisor eventLoopException exceptionCount

private List change List new Array List 10 public Extension Event Handler Workbench workbench this workbench workbench  changeList ArrayList ExtensionEventHandler
public void registry Changed I Registry Change Event event try I Extension Delta delta event get Extension Deltas Workbench Plugin PI WORKBENCH I Extension ext I Extension Point ext Pt I Workbench Window win PlatformUI get Workbench get Workbench Windows if win length 0 return Display display win 0 get Shell get Display if display null return Array List appear List new Array List 5 Array List revoke List new Array List 5 String id null int num Perspectives 0 int num Action Set Part Assoc 0 push action sets and perspectives to the top because incoming action Set Part Associations and perspective Extensions may depend upon them for their bindings for int i 0 i delta length i id delta i get Extension Point get Simple Identifier if delta i get Kind I Extension Delta ADDED if id equals I Workbench Constants PL ACTION SETS appear List add 0 delta i else if id equals I Workbench Constants PL PERSPECTIVES id equals I Workbench Constants PL VIEWS else if id equals I Workbench Constants PL PERSPECTIVES appear List add delta i num Perspectives else appear List add appear List size num Perspectives delta i else if delta i get Kind I Extension Delta REMOVED if id equals I Workbench Constants PL ACTION SET PART ASSOCIATIONS revoke List add 0 delta i num Action Set Part Assoc else if id equals I Workbench Constants PL PERSPECTIVES revoke List add num Action Set Part Assoc delta i else revoke List add delta i Iterator iter appear List iterator I Extension Delta ext Delta null while iter has Next ext Delta I Extension Delta iter next ext Pt ext Delta get Extension Point ext ext Delta get Extension async Appear display ext Pt ext Suspend support for removing a plug in until this is more stable iter revoke List iterator while iter has Next ext Delta I Extension Delta iter next ext Pt ext Delta get Extension Point ext ext Delta get Extension async Revoke display ext Pt ext reset Current Perspective display finally ensure the list is cleared for the next pass through change List clear  registryChanged IRegistryChangeEvent IExtensionDelta getExtensionDeltas WorkbenchPlugin PI_WORKBENCH IExtension IExtensionPoint extPt IWorkbenchWindow getWorkbench getWorkbenchWindows getShell getDisplay ArrayList appearList ArrayList ArrayList revokeList ArrayList numPerspectives numActionSetPartAssoc actionSetPartAssociations perspectiveExtensions getExtensionPoint getSimpleIdentifier getKind IExtensionDelta IWorkbenchConstants PL_ACTION_SETS appearList IWorkbenchConstants PL_PERSPECTIVES IWorkbenchConstants PL_VIEWS IWorkbenchConstants PL_PERSPECTIVES appearList numPerspectives appearList appearList numPerspectives getKind IExtensionDelta IWorkbenchConstants PL_ACTION_SET_PART_ASSOCIATIONS revokeList numActionSetPartAssoc IWorkbenchConstants PL_PERSPECTIVES revokeList numActionSetPartAssoc revokeList appearList IExtensionDelta extDelta hasNext extDelta IExtensionDelta extPt extDelta getExtensionPoint extDelta getExtension asyncAppear extPt revokeList hasNext extDelta IExtensionDelta extPt extDelta getExtensionPoint extDelta getExtension asyncRevoke extPt resetCurrentPerspective changeList
private void async Appear Display display final I Extension Point extpt final I Extension ext Runnable run new Runnable public void run appear extpt ext  asyncAppear IExtensionPoint IExtension
private void async Appear Display display final I Extension Point extpt final I Extension ext Runnable run new Runnable public void run appear extpt ext display sync Exec run  asyncAppear IExtensionPoint IExtension syncExec
private void async Revoke Display display final I Extension Point extpt final I Extension ext Runnable run new Runnable public void run revoke extpt ext  asyncRevoke IExtensionPoint IExtension
private void async Revoke Display display final I Extension Point extpt final I Extension ext Runnable run new Runnable public void run revoke extpt ext display sync Exec run  asyncRevoke IExtensionPoint IExtension syncExec
private void appear I Extension Point ext Pt I Extension ext String name ext Pt get Simple Identifier if name equals Ignore Case I Workbench Constants PL NEW load New Wizards ext return if name equals Ignore Case I Workbench Constants PL VIEWS load View ext return if name equals Ignore Case I Workbench Constants PL EDITOR load Editor ext return if name equals Ignore Case I Workbench Constants PL PERSPECTIVES load Perspective ext return if name equals Ignore Case I Workbench Constants PL PERSPECTIVE EXTENSIONS load Perspective Extensions ext return if name equals Ignore Case I Workbench Constants PL ACTION SETS load Action Sets ext return if name equals Ignore Case I Workbench Constants PL ACTION SET PART ASSOCIATIONS load Action Set Part Association ext return if name equals Ignore Case I Workbench Constants PL WORKINGSETS load Working Sets ext return if name equals Ignore Case I Workbench Constants PL POPUP MENU load Popup Menu ext return if name equals Ignore Case I Workbench Constants PL PREFERENCES load Preference Pages ext return if name equals Ignore Case I Workbench Constants PL PROPERTY PAGES load Property Pages ext return if name equals Ignore Case I Workbench Constants PL FONT DEFINITIONS load Font Definitions ext return if name equals Ignore Case I Workbench Constants PL DECORATORS load Decorators ext return if name equals Ignore Case I Workbench Constants PL THEMES load Themes ext return  IExtensionPoint extPt IExtension extPt getSimpleIdentifier equalsIgnoreCase IWorkbenchConstants PL_NEW loadNewWizards equalsIgnoreCase IWorkbenchConstants PL_VIEWS loadView equalsIgnoreCase IWorkbenchConstants PL_EDITOR loadEditor equalsIgnoreCase IWorkbenchConstants PL_PERSPECTIVES loadPerspective equalsIgnoreCase IWorkbenchConstants PL_PERSPECTIVE_EXTENSIONS loadPerspectiveExtensions equalsIgnoreCase IWorkbenchConstants PL_ACTION_SETS loadActionSets equalsIgnoreCase IWorkbenchConstants PL_ACTION_SET_PART_ASSOCIATIONS loadActionSetPartAssociation equalsIgnoreCase IWorkbenchConstants PL_WORKINGSETS loadWorkingSets equalsIgnoreCase IWorkbenchConstants PL_POPUP_MENU loadPopupMenu equalsIgnoreCase IWorkbenchConstants PL_PREFERENCES loadPreferencePages equalsIgnoreCase IWorkbenchConstants PL_PROPERTY_PAGES loadPropertyPages equalsIgnoreCase IWorkbenchConstants PL_FONT_DEFINITIONS loadFontDefinitions equalsIgnoreCase IWorkbenchConstants PL_DECORATORS loadDecorators equalsIgnoreCase IWorkbenchConstants PL_THEMES loadThemes
param ext private void load Font Definitions I Extension ext Theme Registry Reader reader new Theme Registry Reader reader set Registry Theme Registry Workbench Plugin get Default get Theme Registry I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i reader read Element elements i Collection fonts reader get Font Definitions Font Definition font Defs Font Definition fonts to Array new Font Definition fonts size Theme Element Helper populate Registry workbench get Theme Manager get Theme I Theme Manager DEFAULT THEME font Defs workbench get Preference Store  loadFontDefinitions IExtension ThemeRegistryReader ThemeRegistryReader setRegistry ThemeRegistry WorkbenchPlugin getDefault getThemeRegistry IConfigurationElement getConfigurationElements readElement getFontDefinitions FontDefinition fontDefs FontDefinition toArray FontDefinition ThemeElementHelper populateRegistry getThemeManager getTheme IThemeManager DEFAULT_THEME fontDefs getPreferenceStore
TODO confirm private void load Themes I Extension ext Theme Registry Reader reader new Theme Registry Reader Theme Registry registry Theme Registry Workbench Plugin get Default get Theme Registry reader set Registry registry I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i reader read Element elements i Collection colors reader get Color Definitions Color Definition color Defs Color Definition colors to Array new Color Definition colors size I Theme theme workbench get Theme Manager get Theme I Theme Manager DEFAULT THEME Theme Element Helper populate Registry theme color Defs workbench get Preference Store Collection fonts reader get Font Definitions Font Definition font Defs Font Definition fonts to Array new Font Definition fonts size Theme Element Helper populate Registry theme font Defs workbench get Preference Store Map data reader get Data registry add Data data  loadThemes IExtension ThemeRegistryReader ThemeRegistryReader ThemeRegistry ThemeRegistry WorkbenchPlugin getDefault getThemeRegistry setRegistry IConfigurationElement getConfigurationElements readElement getColorDefinitions ColorDefinition colorDefs ColorDefinition toArray ColorDefinition ITheme getThemeManager getTheme IThemeManager DEFAULT_THEME ThemeElementHelper populateRegistry colorDefs getPreferenceStore getFontDefinitions FontDefinition fontDefs FontDefinition toArray FontDefinition ThemeElementHelper populateRegistry fontDefs getPreferenceStore getData addData
private void load Decorators I Extension ext Decorator Registry Reader reader new Decorator Registry Reader I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i reader read Element elements i Collection decorators reader get Values Decorator Manager manager Decorator Manager workbench get Decorator Manager for Iterator i decorators iterator i has Next manager add Decorator Decorator Definition i next  loadDecorators IExtension DecoratorRegistryReader DecoratorRegistryReader IConfigurationElement getConfigurationElements readElement getValues DecoratorManager DecoratorManager getDecoratorManager hasNext addDecorator DecoratorDefinition
private void load New Wizards I Extension ext I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i New Wizards Registry Reader reader new New Wizards Registry Reader reader read Element elements i We may need to reset this perspective as new wizards are added to the menu change List add Message Format format Extension Event Handler Messages get String Extension Event Handler change format NON NLS 1 new Object ext get Namespace Extension Event Handler Messages get String Extension Event Handler new Wizards NON NLS 1  loadNewWizards IExtension IConfigurationElement getConfigurationElements NewWizardsRegistryReader NewWizardsRegistryReader readElement changeList MessageFormat ExtensionEventHandlerMessages getString ExtensionEventHandler change_format getNamespace ExtensionEventHandlerMessages getString ExtensionEventHandler newWizards
private void load Property Pages I Extension ext Property Page Contributor Manager manager Property Page Contributor Manager get Manager Property Pages Registry Reader reader new Property Pages Registry Reader manager I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i reader read Element elements i  loadPropertyPages IExtension PropertyPageContributorManager PropertyPageContributorManager getManager PropertyPagesRegistryReader PropertyPagesRegistryReader IConfigurationElement getConfigurationElements readElement
private void load Preference Pages I Extension ext Preference Manager manager workbench get Preference Manager List nodes manager get Elements Preference Manager POST ORDER I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i Workbench Preference Node node Preference Page Registry Reader create Node workbench elements i if node null continue String category node get Category if category null manager add To Root node else Workbench Preference Node parent null for Iterator j nodes iterator j has Next Workbench Preference Node element Workbench Preference Node j next if category equals element get Id parent element break if parent null Could not find the parent log Workbench Plugin log Invalid preference page path category NON NLS 1 manager add To Root node else parent add node  loadPreferencePages IExtension PreferenceManager getPreferenceManager getElements PreferenceManager POST_ORDER IConfigurationElement getConfigurationElements WorkbenchPreferenceNode PreferencePageRegistryReader createNode getCategory addToRoot WorkbenchPreferenceNode hasNext WorkbenchPreferenceNode WorkbenchPreferenceNode getId WorkbenchPlugin addToRoot
TODO object contributions are easy to update but viewer contributions are not because they re statically cached in anonymous Popup Menu Extenders Currently you will be prompted to restart in the case of a viewer contribtion We can implement this refresh by keeping a weak set of references to Popup Menu Extenders and iterating over them on a delta We add a method to Popup Menu Extender that will supply an extension to the underlying static Action Builder for processing private void load Popup Menu I Extension ext Object Action Contributor Manager o Man Object Action Contributor Manager get Manager Object Action Contributor Reader o Reader new Object Action Contributor Reader o Reader set Manager o Man I Configuration Element elements ext get Configuration Elements boolean clear Popups false takes care of object contributions for int i 0 i elements length i o Reader read Element elements i if elements i get Name equals Viewer Action Builder TAG CONTRIBUTION TYPE clear Popups true if clear Popups Popup Menu Extender get Manager clear Caches  PopupMenuExtenders PopupMenuExtenders PopupMenuExtender staticActionBuilder loadPopupMenu IExtension ObjectActionContributorManager oMan ObjectActionContributorManager getManager ObjectActionContributorReader oReader ObjectActionContributorReader oReader setManager oMan IConfigurationElement getConfigurationElements clearPopups oReader readElement getName ViewerActionBuilder TAG_CONTRIBUTION_TYPE clearPopups clearPopups PopupMenuExtender getManager clearCaches
private void revoke I Extension Point ext Pt I Extension ext String name ext Pt get Simple Identifier if name equals Ignore Case I Workbench Constants PL NEW New Wizards Registry Reader remove Extension ext return if name equals Ignore Case I Workbench Constants PL VIEWS unload View ext return if name equals Ignore Case I Workbench Constants PL EDITOR unload Editor ext return if name equals Ignore Case I Workbench Constants PL PERSPECTIVES unload Perspective ext return if name equals Ignore Case I Workbench Constants PL ACTION SETS unload Action Sets ext return if name equals Ignore Case I Workbench Constants PL ACTION SET PART ASSOCIATIONS unload Action Set Part Association ext return if name equals Ignore Case I Workbench Constants PL WORKINGSETS unload Working Sets ext return  IExtensionPoint extPt IExtension extPt getSimpleIdentifier equalsIgnoreCase IWorkbenchConstants PL_NEW NewWizardsRegistryReader removeExtension equalsIgnoreCase IWorkbenchConstants PL_VIEWS unloadView equalsIgnoreCase IWorkbenchConstants PL_EDITOR unloadEditor equalsIgnoreCase IWorkbenchConstants PL_PERSPECTIVES unloadPerspective equalsIgnoreCase IWorkbenchConstants PL_ACTION_SETS unloadActionSets equalsIgnoreCase IWorkbenchConstants PL_ACTION_SET_PART_ASSOCIATIONS unloadActionSetPartAssociation equalsIgnoreCase IWorkbenchConstants PL_WORKINGSETS unloadWorkingSets
private void load View I Extension ext Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Workbench problems Restoring null NON NLS 1 I View Registry v Reg Workbench Plugin get Default get View Registry View Registry Reader v Reader new View Registry Reader I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i String id elements i get Attribute I Workbench Constants TAG ID if elements i get Name equals I Workbench Constants TAG VIEW v Reg find id null continue if elements i get Name equals TAG CATEGORY View Registry v Reg find Category id null continue v Reader read Element View Registry v Reg elements i restore View State result id if result get Severity I Status ERROR break if result get Severity I Status ERROR Error Dialog open Error null Workbench Messages get String Workspace problems Title NON NLS 1 Workbench Messages get String Workbench problems Restoring Msg NON NLS 1 result  loadView IExtension MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString problemsRestoring IViewRegistry vReg WorkbenchPlugin getDefault getViewRegistry ViewRegistryReader vReader ViewRegistryReader IConfigurationElement getConfigurationElements getAttribute IWorkbenchConstants TAG_ID getName IWorkbenchConstants TAG_VIEW vReg getName TAG_CATEGORY ViewRegistry vReg findCategory vReader readElement ViewRegistry vReg restoreViewState getSeverity IStatus getSeverity IStatus ErrorDialog openError WorkbenchMessages getString problemsTitle WorkbenchMessages getString problemsRestoringMsg
private void restore View State Multi Status result String id I Workbench Window windows workbench get Workbench Windows I Memento memento for int i 0 i windows length i Workbench Window window Workbench Window windows i I Workbench Page pages window get Pages for int j 0 j pages length j memento I Memento Workbench Page pages j get State Map remove id if memento null continue I Memento view Mems memento get Children I Workbench Constants TAG VIEW View Factory view Factory Workbench Page pages j get View Factory for int k 0 k view Mems length k view Factory restore View State view Mems k create Open Perspective View pages j view Factory view Mems k  restoreViewState MultiStatus IWorkbenchWindow getWorkbenchWindows IMemento WorkbenchWindow WorkbenchWindow IWorkbenchPage getPages IMemento WorkbenchPage getStateMap IMemento viewMems getChildren IWorkbenchConstants TAG_VIEW ViewFactory viewFactory WorkbenchPage getViewFactory viewMems viewFactory restoreViewState viewMems createOpenPerspectiveView viewFactory viewMems
private void create Open Perspective View I Workbench Page page View Factory view Factory I Memento memento String id memento get String I Workbench Constants TAG ID String persp Id memento get String I Workbench Constants TAG PERSPECTIVE Perspective persp Workbench Page page get Active Perspective if persp get Desc get Id equals persp Id try view Factory create View id page show View id catch Part Init Exception e  createOpenPerspectiveView IWorkbenchPage ViewFactory viewFactory IMemento getString IWorkbenchConstants TAG_ID perspId getString IWorkbenchConstants TAG_PERSPECTIVE WorkbenchPage getActivePerspective getDesc getId perspId viewFactory createView showView PartInitException
private void unload View I Extension ext final Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String View Factory problems Saving Views null NON NLS 1 I View Registry v Reg Workbench Plugin get Default get View Registry I Workbench Window windows workbench get Workbench Windows XML Memento memento null for int i 0 i windows length i Workbench Window window Workbench Window windows i I Workbench Page pages window get Pages for int j 0 j pages length j Array List views Removed new Array List I Configuration Element elements ext get Configuration Elements for int k 0 k elements length k if elements k get Name equals I Workbench Constants TAG VIEW continue String id elements k get Attribute I Workbench Constants TAG ID if id null View Factory view Factory Workbench Page pages j get View Factory I View Reference view Ref view Factory get View id if view Ref null don t save view state if is View Open view Ref view Factory memento XML Memento create Write Root I Workbench Constants TAG VIEWS save View State pages j id view Factory save View State memento view Ref result Workbench Page pages j get State Map put id memento Workbench Page pages j hide View view Ref Workbench Page pages j get View Factory release View view Ref views Removed add id View Registry v Reg remove id Object show View Ids Removed find Show View Ids Removed Workbench Page pages j get Show View Action Ids views Removed if show View Ids Removed length 0 remove View Ids From Show View Menu window show View Ids Removed if result get Severity I Status OK Error Dialog open Error Shell null Workbench Messages get String Workbench problems Saving NON NLS 1 Workbench Messages get String Workbench problems Saving Msg NON NLS 1 result  unloadView IExtension MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString ViewFactory problemsSavingViews IViewRegistry vReg WorkbenchPlugin getDefault getViewRegistry IWorkbenchWindow getWorkbenchWindows XMLMemento WorkbenchWindow WorkbenchWindow IWorkbenchPage getPages ArrayList viewsRemoved ArrayList IConfigurationElement getConfigurationElements getName IWorkbenchConstants TAG_VIEW getAttribute IWorkbenchConstants TAG_ID ViewFactory viewFactory WorkbenchPage getViewFactory IViewReference viewRef viewFactory getView viewRef isViewOpen viewRef viewFactory XMLMemento createWriteRoot IWorkbenchConstants TAG_VIEWS saveViewState viewFactory saveViewState viewRef WorkbenchPage getStateMap WorkbenchPage hideView viewRef WorkbenchPage getViewFactory releaseView viewRef viewsRemoved ViewRegistry vReg showViewIdsRemoved findShowViewIdsRemoved WorkbenchPage getShowViewActionIds viewsRemoved showViewIdsRemoved removeViewIdsFromShowViewMenu showViewIdsRemoved getSeverity IStatus ErrorDialog openError WorkbenchMessages getString problemsSaving WorkbenchMessages getString problemsSavingMsg
private void save View State I Workbench Page page String id I Memento memento Perspective persp Workbench Page page get Active Perspective if persp find View id null memento put String I Workbench Constants TAG PERSPECTIVE persp get Desc get Id  saveViewState IWorkbenchPage IMemento WorkbenchPage getActivePerspective findView putString IWorkbenchConstants TAG_PERSPECTIVE getDesc getId
private Object find Show View Ids Removed Array List show View Ids Array List views Removed Array List list new Array List Object show View Id List show View Ids to Array Object views Removed List views Removed to Array for int i 0 i show View Id List length i for int j 0 j views Removed List length j if String views Removed List j equals String show View Id List i list add views Removed List j return list to Array  findShowViewIdsRemoved ArrayList showViewIds ArrayList viewsRemoved ArrayList ArrayList showViewIdList showViewIds toArray viewsRemovedList viewsRemoved toArray showViewIdList viewsRemovedList viewsRemovedList showViewIdList viewsRemovedList toArray
private void remove View Ids From Show View Menu I Workbench Window window Object views Removed Menu Manager menu Manager Workbench Window window get Menu Manager I Contribution Item items menu Manager get Items menu Manager null for int i 0 i items length i if items i instanceof Menu Manager Menu Manager items i get Menu Text equals Window NON NLS 1 menu Manager Menu Manager items i break if menu Manager null return items menu Manager get Items menu Manager null for int i 0 i items length i if items i instanceof Menu Manager Menu Manager items i get Menu Text equals Show View NON NLS 1 menu Manager Menu Manager items i break if menu Manager null return items menu Manager get Items if items length 1 items 0 instanceof Show View Menu return for int i 0 i views Removed length i Show View Menu items 0 remove Action String views Removed i  removeViewIdsFromShowViewMenu IWorkbenchWindow viewsRemoved MenuManager menuManager WorkbenchWindow getMenuManager IContributionItem menuManager getItems menuManager MenuManager MenuManager getMenuText menuManager MenuManager menuManager menuManager getItems menuManager MenuManager MenuManager getMenuText menuManager MenuManager menuManager menuManager getItems ShowViewMenu viewsRemoved ShowViewMenu removeAction viewsRemoved
private void load Editor I Extension ext Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Workbench problems Restoring null NON NLS 1 I Editor Registry e Reg Workbench Plugin get Default get Editor Registry Editor Registry Reader e Reader new Editor Registry Reader I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i String id elements i get Attribute I Workbench Constants TAG ID if id null e Reg find Editor id null continue e Reader read Element Editor Registry e Reg elements i restore Editor State elements i result if result get Severity I Status ERROR Error Dialog open Error null Workbench Messages get String Workspace problems Title NON NLS 1 Workbench Messages get String Workbench problems Restoring Msg NON NLS 1 result  loadEditor IExtension MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString problemsRestoring IEditorRegistry eReg WorkbenchPlugin getDefault getEditorRegistry EditorRegistryReader eReader EditorRegistryReader IConfigurationElement getConfigurationElements getAttribute IWorkbenchConstants TAG_ID eReg findEditor eReader readElement EditorRegistry eReg restoreEditorState getSeverity IStatus ErrorDialog openError WorkbenchMessages getString problemsTitle WorkbenchMessages getString problemsRestoringMsg
private void restore Editor State I Configuration Element element Multi Status result String id element get Attribute I Workbench Constants TAG ID I Workbench Window windows workbench get Workbench Windows I Memento memento for int i 0 i windows length i Workbench Window window Workbench Window windows i I Workbench Page pages window get Pages for int j 0 j pages length j I Editor Reference existing Visible Workbench Page pages j get Editor Presentation get Visible Editor Editor Manager editor Manager Workbench Page pages j get Editor Manager Array List visible Editors new Array List 5 I Editor Part active Editor new I Editor Part 1 Array List error Workbooks new Array List 1 memento I Memento Workbench Page pages j get State Map remove id if memento null continue I Memento editor Mems memento get Children I Workbench Constants TAG EDITOR for int k 0 k editor Mems length k if check Openable editor Mems k pages j continue editor Manager restore Editor State editor Mems k visible Editors active Editor error Workbooks result if existing Visible null for int k 0 k visible Editors size k editor Manager set Visible Editor I Editor Reference visible Editors get k false else editor Manager set Visible Editor existing Visible true if visible Editors size 1 for Iterator iter error Workbooks iterator iter has Next iter next Workbench Page pages j get Editor Presentation fix Visible Editor  restoreEditorState IConfigurationElement MultiStatus getAttribute IWorkbenchConstants TAG_ID IWorkbenchWindow getWorkbenchWindows IMemento WorkbenchWindow WorkbenchWindow IWorkbenchPage getPages IEditorReference existingVisible WorkbenchPage getEditorPresentation getVisibleEditor EditorManager editorManager WorkbenchPage getEditorManager ArrayList visibleEditors ArrayList IEditorPart activeEditor IEditorPart ArrayList errorWorkbooks ArrayList IMemento WorkbenchPage getStateMap IMemento editorMems getChildren IWorkbenchConstants TAG_EDITOR editorMems checkOpenable editorMems editorManager restoreEditorState editorMems visibleEditors activeEditor errorWorkbooks existingVisible visibleEditors editorManager setVisibleEditor IEditorReference visibleEditors editorManager setVisibleEditor existingVisible visibleEditors errorWorkbooks hasNext WorkbenchPage getEditorPresentation fixVisibleEditor
private boolean check Openable I Memento memento I Workbench Page page I Memento input Mem memento get Child I Workbench Constants TAG INPUT String factoryID null if input Mem null factoryID input Mem get String I Workbench Constants TAG FACTORY ID if factoryID null return false I Element Factory factory Workbench Plugin get Default get Element Factory factoryID if factory null return false I Adaptable input factory create Element input Mem if input null input instanceof I Editor Input return false I Editor Input editor Input I Editor Input input I Editor Reference ed Refs page get Editor References for int i 0 i ed Refs length i I Editor Part editor ed Refs i get Editor false if editor null continue I Editor Input ed Input editor get Editor Input if ed Input equals editor Input return false return true  checkOpenable IMemento IWorkbenchPage IMemento inputMem getChild IWorkbenchConstants TAG_INPUT inputMem inputMem getString IWorkbenchConstants TAG_FACTORY_ID IElementFactory WorkbenchPlugin getDefault getElementFactory IAdaptable createElement inputMem IEditorInput IEditorInput editorInput IEditorInput IEditorReference edRefs getEditorReferences edRefs IEditorPart edRefs getEditor IEditorInput edInput getEditorInput edInput editorInput
private void unload Editor I Extension ext Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Editor Manager problems Saving Editors null NON NLS 1 Editor Registry e Reg Editor Registry Workbench Plugin get Default get Editor Registry I Configuration Element elements ext get Configuration Elements I Workbench Window windows workbench get Workbench Windows for int i 0 i elements length i String id elements i get Attribute I Workbench Constants TAG ID for int j 0 j windows length j Workbench Window window Workbench Window windows j I Workbench Page pages window get Pages for int k 0 k pages length k close Editors pages k id result e Reg remove id if result get Severity I Status OK Error Dialog open Error Shell null Workbench Messages get String Workbench problems Saving NON NLS 1 Workbench Messages get String Workbench problems Saving Msg NON NLS 1 result  unloadEditor IExtension MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString EditorManager problemsSavingEditors EditorRegistry eReg EditorRegistry WorkbenchPlugin getDefault getEditorRegistry IConfigurationElement getConfigurationElements IWorkbenchWindow getWorkbenchWindows getAttribute IWorkbenchConstants TAG_ID WorkbenchWindow WorkbenchWindow IWorkbenchPage getPages closeEditors eReg getSeverity IStatus ErrorDialog openError WorkbenchMessages getString problemsSaving WorkbenchMessages getString problemsSavingMsg
private void close Editors I Workbench Page page String id Multi Status result XML Memento memento XML Memento create Write Root I Workbench Constants TAG EDITORS I Editor Reference editor Refs page get Editor References boolean changed false for int i 0 i editor Refs length i if editor Refs i get Id equals id I Editor Reference e editor Refs i I Editor Part editor e get Editor true Editor Manager editor Manager Workbench Page page get Editor Manager if editor null I Memento mem editor Manager get Memento editor Refs i if mem null I Memento editor Mem memento create Child I Workbench Constants TAG EDITOR editor Mem put Memento mem else editor Manager save Editor State memento e result Workbench Page page get State Map put id memento page close Editor editor true changed true  closeEditors IWorkbenchPage MultiStatus XMLMemento XMLMemento createWriteRoot IWorkbenchConstants TAG_EDITORS IEditorReference editorRefs getEditorReferences editorRefs editorRefs getId IEditorReference editorRefs IEditorPart getEditor EditorManager editorManager WorkbenchPage getEditorManager IMemento editorManager getMemento editorRefs IMemento editorMem createChild IWorkbenchConstants TAG_EDITOR editorMem putMemento editorManager saveEditorState WorkbenchPage getStateMap closeEditor
private void unload Perspective I Extension ext final Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String View Factory problems Saving Views null NON NLS 1 I Perspective Registry p Reg Workbench Plugin get Default get Perspective Registry I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i if elements i get Name equals I Workbench Constants TAG PERSPECTIVE continue String id elements i get Attribute I Workbench Constants TAG ID if id null continue I Perspective Descriptor desc p Reg find Perspective With Id id if desc null continue Perspective Registry p Reg delete Perspective desc I Workbench Window windows workbench get Workbench Windows for int j 0 j windows length j Workbench Window window Workbench Window windows j I Workbench Page pages window get Pages for int k 0 k pages length k Perspective persp Workbench Page pages k find Perspective desc if persp null return XML Memento memento XML Memento create Write Root I Workbench Constants TAG PERSPECTIVE result merge persp save State memento Workbench Page pages k close Perspective desc true Workbench Page pages k get State Map put id memento Workbench workbench get Perspective History remove Item desc if result get Severity I Status OK Error Dialog open Error Shell null Workbench Messages get String Workbench problems Saving NON NLS 1 Workbench Messages get String Workbench problems Saving Msg NON NLS 1 result  unloadPerspective IExtension MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString ViewFactory problemsSavingViews IPerspectiveRegistry pReg WorkbenchPlugin getDefault getPerspectiveRegistry IConfigurationElement getConfigurationElements getName IWorkbenchConstants TAG_PERSPECTIVE getAttribute IWorkbenchConstants TAG_ID IPerspectiveDescriptor pReg findPerspectiveWithId PerspectiveRegistry pReg deletePerspective IWorkbenchWindow getWorkbenchWindows WorkbenchWindow WorkbenchWindow IWorkbenchPage getPages WorkbenchPage findPerspective XMLMemento XMLMemento createWriteRoot IWorkbenchConstants TAG_PERSPECTIVE saveState WorkbenchPage closePerspective WorkbenchPage getStateMap getPerspectiveHistory removeItem getSeverity IStatus ErrorDialog openError WorkbenchMessages getString problemsSaving WorkbenchMessages getString problemsSavingMsg
private void load Perspective I Extension ext Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Workbench problems Restoring null NON NLS 1 I Perspective Registry p Reg Workbench Plugin get Default get Perspective Registry Perspective Registry Reader p Reader new Perspective Registry Reader Perspective Registry p Reg I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i String id elements i get Attribute I Workbench Constants TAG ID if id null continue I Perspective Descriptor desc p Reg find Perspective With Id id if desc null p Reader read Element elements i restore Perspective State result id if result get Severity I Status ERROR break if result get Severity I Status ERROR Error Dialog open Error null Workbench Messages get String Workspace problems Title NON NLS 1 Workbench Messages get String Workbench problems Restoring Msg NON NLS 1 result  loadPerspective IExtension MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString problemsRestoring IPerspectiveRegistry pReg WorkbenchPlugin getDefault getPerspectiveRegistry PerspectiveRegistryReader pReader PerspectiveRegistryReader PerspectiveRegistry pReg IConfigurationElement getConfigurationElements getAttribute IWorkbenchConstants TAG_ID IPerspectiveDescriptor pReg findPerspectiveWithId pReader readElement restorePerspectiveState getSeverity IStatus getSeverity IStatus ErrorDialog openError WorkbenchMessages getString problemsTitle WorkbenchMessages getString problemsRestoringMsg
private void load Perspective Extensions I Extension ext I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null return I Workbench Page page window get Active Page if page null return Get the current perspective I Perspective Descriptor persp page get Perspective if persp null return String current Id persp get Id I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i If any of these refer to the current perspective output a message saying this perspective will need to be reset in order to see the changes For any other case the perspective extension registry will be rebuilt anyway so just ignore it String id elements i get Attribute ATT TARGET ID if id null continue if id equals current Id Display message change List add Message Format format Extension Event Handler Messages get String Extension Event Handler change format NON NLS 1 new Object ext get Namespace Extension Event Handler Messages get String Extension Event Handler new Perspective Extension NON NLS 1 break  loadPerspectiveExtensions IExtension IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IWorkbenchPage getActivePage IPerspectiveDescriptor getPerspective currentId getId IConfigurationElement getConfigurationElements getAttribute ATT_TARGET_ID currentId changeList MessageFormat ExtensionEventHandlerMessages getString ExtensionEventHandler change_format getNamespace ExtensionEventHandlerMessages getString ExtensionEventHandler newPerspectiveExtension
private void restore Perspective State Multi Status result String id I Workbench Window windows workbench get Workbench Windows I Memento memento for int i 0 i windows length i Workbench Window window Workbench Window windows i I Workbench Page pages window get Pages count in reverse order since we insert perspectives at the beginning for int j pages length 1 j 0 j memento I Memento Workbench Page pages j get State Map remove id if memento null continue try Perspective persp new Perspective null Workbench Page pages j result merge persp restore State memento Workbench Page pages j add Perspective persp Workbench Window windows i add Perspective Shortcut persp get Desc Workbench Page pages j catch Workbench Exception e  restorePerspectiveState MultiStatus IWorkbenchWindow getWorkbenchWindows IMemento WorkbenchWindow WorkbenchWindow IWorkbenchPage getPages IMemento WorkbenchPage getStateMap WorkbenchPage restoreState WorkbenchPage addPerspective WorkbenchWindow addPerspectiveShortcut getDesc WorkbenchPage WorkbenchException
private void load Action Sets I Extension ext Action Set Registry a Reg Workbench Plugin get Default get Action Set Registry Action Set Registry Reader reader new Action Set Registry Reader a Reg I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i reader read Element elements i change List add Message Format format Extension Event Handler Messages get String Extension Event Handler change format NON NLS 1 new Object ext get Namespace Extension Event Handler Messages get String Extension Event Handler new action set NON NLS 1 I Workbench Window windows workbench get Workbench Windows for int i 0 i windows length i Workbench Window window Workbench Window windows i I Workbench Page page window get Active Page Perspective persp Workbench Page page get Active Perspective if persp null continue for int j 0 j elements length j if elements j get Name equals I Workbench Constants TAG ACTION SET continue String id elements j get Attribute I Workbench Constants TAG ID if id null I Action Set Descriptor desc a Reg find Action Set id if desc null persp add Action Set desc page show Action Set id window update Action Sets  loadActionSets IExtension ActionSetRegistry aReg WorkbenchPlugin getDefault getActionSetRegistry ActionSetRegistryReader ActionSetRegistryReader aReg IConfigurationElement getConfigurationElements readElement changeList MessageFormat ExtensionEventHandlerMessages getString ExtensionEventHandler change_format getNamespace ExtensionEventHandlerMessages getString ExtensionEventHandler new_action_set IWorkbenchWindow getWorkbenchWindows WorkbenchWindow WorkbenchWindow IWorkbenchPage getActivePage WorkbenchPage getActivePerspective getName IWorkbenchConstants TAG_ACTION_SET getAttribute IWorkbenchConstants TAG_ID IActionSetDescriptor aReg findActionSet addActionSet showActionSet updateActionSets
display async Exec new Runnable public void run Shell parent Shell null I Workbench Window window workbench get Active Workbench Window if window null if workbench get Workbench Window Count 0 return window workbench get Workbench Windows 0 parent Shell window get Shell if Message Dialog open Question parent Shell Extension Event Handler Messages get String Extension Event Handler reset perspective message to String NON NLS 1 I Workbench Page page window get Active Page if page null return page reset Perspective  asyncExec parentShell IWorkbenchWindow getActiveWorkbenchWindow getWorkbenchWindowCount getWorkbenchWindows parentShell getShell MessageDialog openQuestion parentShell ExtensionEventHandlerMessages getString ExtensionEventHandler reset_perspective toString IWorkbenchPage getActivePage resetPerspective
private void reset Current Perspective Display display if change List is Empty return final String Buffer message new String Buffer Extension Event Handler Messages get String Extension Event Handler following changes NON NLS 1 for Iterator i change List iterator i has Next message append i next message append Extension Event Handler Messages get String Extension Event Handler need to reset NON NLS 1 display async Exec new Runnable public void run Shell parent Shell null I Workbench Window window workbench get Active Workbench Window if window null if workbench get Workbench Window Count 0 return window workbench get Workbench Windows 0 parent Shell window get Shell if Message Dialog open Question parent Shell Extension Event Handler Messages get String Extension Event Handler reset perspective message to String NON NLS 1 I Workbench Page page window get Active Page if page null return page reset Perspective  resetCurrentPerspective changeList isEmpty StringBuffer StringBuffer ExtensionEventHandlerMessages getString ExtensionEventHandler following_changes changeList hasNext ExtensionEventHandlerMessages getString ExtensionEventHandler need_to_reset asyncExec parentShell IWorkbenchWindow getActiveWorkbenchWindow getWorkbenchWindowCount getWorkbenchWindows parentShell getShell MessageDialog openQuestion parentShell ExtensionEventHandlerMessages getString ExtensionEventHandler reset_perspective toString IWorkbenchPage getActivePage resetPerspective
private void unload Action Sets I Extension ext Action Set Registry a Reg Workbench Plugin get Default get Action Set Registry I Configuration Element elements ext get Configuration Elements I Workbench Window windows workbench get Workbench Windows for int i 0 i windows length i Workbench Window window Workbench Window windows i I Workbench Page pages window get Pages for int j 0 j pages length j for int k 0 k elements length k if elements k get Name equals I Workbench Constants TAG ACTION SET continue String id elements k get Attribute I Workbench Constants TAG ID if id null a Reg remove id remove Action Set Workbench Page pages j id  unloadActionSets IExtension ActionSetRegistry aReg WorkbenchPlugin getDefault getActionSetRegistry IConfigurationElement getConfigurationElements IWorkbenchWindow getWorkbenchWindows WorkbenchWindow WorkbenchWindow IWorkbenchPage getPages getName IWorkbenchConstants TAG_ACTION_SET getAttribute IWorkbenchConstants TAG_ID aReg removeActionSet WorkbenchPage
private void remove Action Set Workbench Page page String id Perspective persp page get Active Perspective Action Presentation action Presentation Workbench Window page get Workbench Window get Action Presentation I Action Set action Sets action Presentation get Action Sets for int i 0 i action Sets length i I Action Set Descriptor desc Plugin Action Set action Sets i get Desc if id equals desc get Id Plugin Action Set Builder builder new Plugin Action Set Builder builder remove Action Extensions Plugin Action Set action Sets i page get Workbench Window action Presentation remove Action Set desc if persp null persp remove Action Set id  removeActionSet WorkbenchPage getActivePerspective ActionPresentation actionPresentation WorkbenchWindow getWorkbenchWindow getActionPresentation IActionSet actionSets actionPresentation getActionSets actionSets IActionSetDescriptor PluginActionSet actionSets getDesc getId PluginActionSetBuilder PluginActionSetBuilder removeActionExtensions PluginActionSet actionSets getWorkbenchWindow actionPresentation removeActionSet removeActionSet
private void load Action Set Part Association I Extension ext Action Set Registry a Reg Workbench Plugin get Default get Action Set Registry Action Set Part Associations Reader reader new Action Set Part Associations Reader a Reg I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i reader read Element elements i  loadActionSetPartAssociation IExtension ActionSetRegistry aReg WorkbenchPlugin getDefault getActionSetRegistry ActionSetPartAssociationsReader ActionSetPartAssociationsReader aReg IConfigurationElement getConfigurationElements readElement
private void unload Action Set Part Association I Extension ext Action Set Registry a Reg Workbench Plugin get Default get Action Set Registry I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i String type elements i get Name if type equals TAG ACTION SET PART ASSOCIATION continue String action Set Id elements i get Attribute ATT TARGET ID I Configuration Element children elements i get Children for int j 0 j children length j I Configuration Element child children j type child get Name if type equals TAG PART String part Id child get Attribute ATT ID if part Id null a Reg remove Association action Set Id part Id  unloadActionSetPartAssociation IExtension ActionSetRegistry aReg WorkbenchPlugin getDefault getActionSetRegistry IConfigurationElement getConfigurationElements getName TAG_ACTION_SET_PART_ASSOCIATION actionSetId getAttribute ATT_TARGET_ID IConfigurationElement getChildren IConfigurationElement getName TAG_PART partId getAttribute ATT_ID partId aReg removeAssociation actionSetId partId
private void load Working Sets I Extension ext Working Set Registry w Reg Working Set Registry Workbench Plugin get Default get Working Set Registry Working Set Registry Reader reader new Working Set Registry Reader w Reg I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i reader read Element elements i  loadWorkingSets IExtension WorkingSetRegistry wReg WorkingSetRegistry WorkbenchPlugin getDefault getWorkingSetRegistry WorkingSetRegistryReader WorkingSetRegistryReader wReg IConfigurationElement getConfigurationElements readElement
private void unload Working Sets I Extension ext Working Set Registry w Reg Working Set Registry Workbench Plugin get Default get Working Set Registry I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i w Reg remove Working Set Descriptor elements i get Attribute I Workbench Constants TAG ID  unloadWorkingSets IExtension WorkingSetRegistry wReg WorkingSetRegistry WorkbenchPlugin getDefault getWorkingSetRegistry IConfigurationElement getConfigurationElements wReg removeWorkingSetDescriptor getAttribute IWorkbenchConstants TAG_ID
private void stop View I Extension ext I Workbench Window windows workbench get Workbench Windows for int i 0 i windows length i Workbench Window window Workbench Window windows i I Workbench Page pages window get Pages for int j 0 j pages length j I Configuration Element elements ext get Configuration Elements for int k 0 k elements length k if elements k get Name equals I Workbench Constants TAG VIEW continue String id elements k get Attribute I Workbench Constants TAG ID if id null View Factory view Factory Workbench Page pages j get View Factory I View Reference view Ref view Factory get View id if view Ref null Workbench Page pages j hide View view Ref Workbench Page pages j get View Factory release View view Ref  stopView IExtension IWorkbenchWindow getWorkbenchWindows WorkbenchWindow WorkbenchWindow IWorkbenchPage getPages IConfigurationElement getConfigurationElements getName IWorkbenchConstants TAG_VIEW getAttribute IWorkbenchConstants TAG_ID ViewFactory viewFactory WorkbenchPage getViewFactory IViewReference viewRef viewFactory getView viewRef WorkbenchPage hideView viewRef WorkbenchPage getViewFactory releaseView viewRef
private void stop Editor I Extension ext I Configuration Element elements ext get Configuration Elements I Workbench Window windows workbench get Workbench Windows for int i 0 i elements length i String id elements i get Attribute I Workbench Constants TAG ID for int j 0 j windows length j Workbench Window window Workbench Window windows j I Workbench Page pages window get Pages for int k 0 k pages length k I Editor Reference editor Refs pages k get Editor References for int l 0 l editor Refs length l if editor Refs l get Id equals id I Editor Part editor editor Refs l get Editor true if editor null pages k close Editor editor true  stopEditor IExtension IConfigurationElement getConfigurationElements IWorkbenchWindow getWorkbenchWindows getAttribute IWorkbenchConstants TAG_ID WorkbenchWindow WorkbenchWindow IWorkbenchPage getPages IEditorReference editorRefs getEditorReferences editorRefs editorRefs getId IEditorPart editorRefs getEditor closeEditor
private void stop Perspective I Extension ext I Perspective Registry p Reg Workbench Plugin get Default get Perspective Registry I Configuration Element elements ext get Configuration Elements for int i 0 i elements length i if elements i get Name equals I Workbench Constants TAG PERSPECTIVE continue String id elements i get Attribute I Workbench Constants TAG ID if id null continue I Perspective Descriptor desc p Reg find Perspective With Id id if desc null continue Perspective Registry p Reg delete Perspective desc I Workbench Window windows workbench get Workbench Windows for int j 0 j windows length j Workbench Window window Workbench Window windows j I Workbench Page pages window get Pages for int k 0 k pages length k Perspective persp Workbench Page pages k find Perspective desc if persp null return Workbench Page pages k close Perspective desc true  stopPerspective IExtension IPerspectiveRegistry pReg WorkbenchPlugin getDefault getPerspectiveRegistry IConfigurationElement getConfigurationElements getName IWorkbenchConstants TAG_PERSPECTIVE getAttribute IWorkbenchConstants TAG_ID IPerspectiveDescriptor pReg findPerspectiveWithId PerspectiveRegistry pReg deletePerspective IWorkbenchWindow getWorkbenchWindows WorkbenchWindow WorkbenchWindow IWorkbenchPage getPages WorkbenchPage findPerspective WorkbenchPage closePerspective
private void stop Action Sets I Extension ext Action Set Registry a Reg Action Set Registry Workbench Plugin get Default get Action Set Registry I Configuration Element elements ext get Configuration Elements I Workbench Window windows workbench get Workbench Windows for int i 0 i windows length i Workbench Window window Workbench Window windows i I Workbench Page pages window get Pages for int j 0 j pages length j for int k 0 k elements length k if elements k get Name equals I Workbench Constants TAG ACTION SET continue String id elements k get Attribute I Workbench Constants TAG ID if id null Workbench Page pages j hide Action Set id  stopActionSets IExtension ActionSetRegistry aReg ActionSetRegistry WorkbenchPlugin getDefault getActionSetRegistry IConfigurationElement getConfigurationElements IWorkbenchWindow getWorkbenchWindows WorkbenchWindow WorkbenchWindow IWorkbenchPage getPages getName IWorkbenchConstants TAG_ACTION_SET getAttribute IWorkbenchConstants TAG_ID WorkbenchPage hideActionSet

since 3 0 private Extension Event Handler Messages TODO Auto generated constructor stub  ExtensionEventHandlerMessages
param key return since 3 0 public static String get String String key TODO Auto generated method stub try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

private I Change Listener orientation Change Listener new I Change Listener public void update boolean changed if changed selected View null set Orientation selected View current Orientation get  IChangeListener orientationChangeListener IChangeListener selectedView setOrientation selectedView currentOrientation
window the Window window add Perspective Listener new I Perspective Listener public void perspective Activated I Workbench Page page I Perspective Descriptor perspective update true  theWindow addPerspectiveListener IPerspectiveListener perspectiveActivated IWorkbenchPage IPerspectiveDescriptor
update true public void perspective Changed I Workbench Page page I Perspective Descriptor perspective String change Id update true  perspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId
Constructs a new fast view bar for the given workbench window param the Window public Fast View Bar Workbench Window the Window window the Window window add Perspective Listener new I Perspective Listener public void perspective Activated I Workbench Page page I Perspective Descriptor perspective update true public void perspective Changed I Workbench Page page I Perspective Descriptor perspective String change Id update true  theWindow FastViewBar WorkbenchWindow theWindow theWindow addPerspectiveListener IPerspectiveListener perspectiveActivated IWorkbenchPage IPerspectiveDescriptor perspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId
Returns the platform s idea of where the fast view bar should be docked in a fresh workspace This value is meaningless after a workspace has been setup since the fast view bar state is then persisted in the workbench This preference is just used for applications that want the initial docking location to be somewhere other than bottom private static int get Initial Side String loc Pref Util getAPI Preference Store get String I Workbench Preference Constants INITIAL FAST VIEW BAR LOCATION if I Workbench Preference Constants BOTTOM equals loc return SWT BOTTOM if I Workbench Preference Constants LEFT equals loc return SWT LEFT if I Workbench Preference Constants RIGHT equals loc return SWT RIGHT Bundle bundle Platform get Bundle PlatformUI PLUGIN ID if bundle null I Status status new Status I Status WARNING PlatformUI PLUGIN ID I Status WARNING Invalid value for NON NLS 1 PlatformUI PLUGIN ID NON NLS 1 I Workbench Preference Constants INITIAL FAST VIEW BAR LOCATION preference Value loc NON NLS 1 should be one of NON NLS 1 I Workbench Preference Constants LEFT NON NLS 1 I Workbench Preference Constants BOTTOM or NON NLS 1 I Workbench Preference Constants RIGHT null NON NLS 1 Platform get Log bundle log status use bottom as the default default return SWT BOTTOM  getInitialSide PrefUtil getAPIPreferenceStore getString IWorkbenchPreferenceConstants INITIAL_FAST_VIEW_BAR_LOCATION IWorkbenchPreferenceConstants IWorkbenchPreferenceConstants IWorkbenchPreferenceConstants getBundle PLUGIN_ID IStatus IStatus PLUGIN_ID IStatus PLUGIN_ID IWorkbenchPreferenceConstants INITIAL_FAST_VIEW_BAR_LOCATION IWorkbenchPreferenceConstants IWorkbenchPreferenceConstants IWorkbenchPreferenceConstants getLog
param selected View2 param object public void set Orientation I View Reference ref To Set int new State if new State get Orientation ref To Set return view Orientation put ref To Set get Id new Integer new State Perspective persp get Perspective if persp null I View Reference ref persp get Active Fast View if ref null persp set Active Fast View null persp set Active Fast View ref To Set  selectedView2 setOrientation IViewReference refToSet newState newState getOrientation refToSet viewOrientation refToSet getId newState getPerspective IViewReference getActiveFastView setActiveFastView setActiveFastView refToSet
Returns the active workbench page or null if none private Workbench Page get Page if window null return null return window get Active Workbench Page  WorkbenchPage getPage getActiveWorkbenchPage
Returns the current perspective or null if none private Perspective get Perspective Workbench Page page get Page if page null return null return page get Active Perspective  getPerspective WorkbenchPage getPage getActivePerspective
Creates the underlying SWT control for the fast view bar Will add exactly one new control to the given composite Makes no assumptions about the layout being used in the parent composite param parent enclosing SWT composite public void create Control Composite parent control new Composite parent SWT NONE side add Change Listener new I Change Listener public void update boolean changed if changed Geometry is Horizontal get Side Geometry is Horizontal last Side dispose Child Controls create Child Controls last Side get Side current Orientation add Change Listener orientation Change Listener create Child Controls  createControl addChangeListener IChangeListener isHorizontal getSide isHorizontal lastSide disposeChildControls createChildControls lastSide getSide currentOrientation addChangeListener orientationChangeListener createChildControls
menu Listener new Listener public void handle Event Event event Point loc new Point event x event y if event type SWT Menu Detect show Fast View Bar Popup loc  menuListener handleEvent MenuDetect showFastViewBarPopup
Listener drag Listener new Listener public void handle Event Event event Point position Drag Util get Event Loc event I View Reference ref get View At position if ref null start Dragging Fast View Bar position false else start Dragging Fast View ref position false  dragListener handleEvent DragUtil getEventLoc IViewReference getViewAt startDraggingFastViewBar startDraggingFastView
param panes To Drop the list of View Panes to drop at the given position public View Drop Target List panes To Drop Tool Item position panes panes To Drop this position position  panesToDrop ViewPanes ViewDropTarget panesToDrop ToolItem panesToDrop
public void drop I View Reference view get View For position Iterator iter panes iterator while iter has Next View Pane pane View Pane iter next get Page add Fast View pane get View Reference get Page get Active Perspective move Fast View pane get View Reference view update true  IViewReference getViewFor hasNext ViewPane ViewPane getPage addFastView getViewReference getPage getActivePerspective moveFastView getViewReference
see org eclipse ui internal dnd I Drop Target get Cursor public Cursor get Cursor return Drag Cursors get Cursor Drag Cursors FASTVIEW  IDropTarget getCursor getCursor DragCursors getCursor DragCursors
public Rectangle get Snap Rectangle if position null As long as the toolbar is not empty highlight the place where this view will appear we may have compressed it to save space when empty so the actual icon location may not be over the toolbar when it is empty if get Tool Bar get Item Count 0 return get Location Of Next Icon If the toolbar is empty highlight the entire toolbar return Drag Util get Display Bounds get Control else return Geometry to Display get Tool Bar position get Bounds  getSnapRectangle getToolBar getItemCount getLocationOfNextIcon DragUtil getDisplayBounds getControl toDisplay getToolBar getBounds
public I Drop Target drag Control current Control Object dragged Object Point position Rectangle drag Rectangle Tool Item target Item get Tool Item position if dragged Object instanceof View Pane View Pane pane View Pane dragged Object Can t drag views between windows if pane get Workbench Window window return null List new List new Array List 1 new List add dragged Object return new View Drop Target new List target Item if dragged Object instanceof View Stack View Stack folder View Stack dragged Object if folder get Workbench Window window return null List view List new Array List folder get Item Count Layout Part children folder get Children for int idx 0 idx children length idx if children idx instanceof Part Placeholder view List add children idx return new View Drop Target view List target Item return null  IDropTarget currentControl draggedObject dragRectangle ToolItem targetItem getToolItem draggedObject ViewPane ViewPane ViewPane draggedObject getWorkbenchWindow newList ArrayList newList draggedObject ViewDropTarget newList targetItem draggedObject ViewStack ViewStack ViewStack draggedObject getWorkbenchWindow viewList ArrayList getItemCount LayoutPart getChildren PartPlaceholder viewList ViewDropTarget viewList targetItem
Create the contents of the fast view bar The top level control created by create Control is a composite that is created once over the lifetime of the fast view bar This method creates the rest of the widgetry inside that composite The controls created by this method will be destroyed and recreated if the fast view bar is docked to a different side of the window protected void create Child Controls int new Side get Side int flags Geometry is Horizontal new Side SWT HORIZONTAL SWT VERTICAL fast View Bar new Tool Bar Manager SWT FLAT SWT WRAP flags fast View Bar add new Show Fast View Contribution window menu Listener new Listener public void handle Event Event event Point loc new Point event x event y if event type SWT Menu Detect show Fast View Bar Popup loc Cell Layout control Layout new Cell Layout 0 set Margins 0 new Side SWT BOTTOM 0 3 set Default Row Row growing set Default Column Row fixed set Column new Side SWT BOTTOM 1 0 Row growing control set Layout control Layout String tip Workbench Messages get String Fast View Bar 0 NON NLS 1 control set Tool Tip Text tip When we re on the bottom add a drag handle Otherwise it s impossible to drag the fast view bar if there s nothing in it if new Side SWT BOTTOM fast View Label create Fast View Separator control fast View Label set Tool Tip Text tip fast View Bar create Control control if new Side SWT BOTTOM fast View Label2 create Fast View Separator control fast View Label2 set Tool Tip Text tip get Tool Bar add Listener SWT Menu Detect menu Listener Listener drag Listener new Listener public void handle Event Event event Point position Drag Util get Event Loc event I View Reference ref get View At position if ref null start Dragging Fast View Bar position false else start Dragging Fast View ref position false I Drag Over Listener fast View Drag Target new I Drag Over Listener class View Drop Target extends Abstract Drop Target List panes Tool Item position param panes To Drop the list of View Panes to drop at the given position public View Drop Target List panes To Drop Tool Item position panes panes To Drop this position position non Javadoc see org eclipse ui internal dnd I Drop Target drop public void drop I View Reference view get View For position Iterator iter panes iterator while iter has Next View Pane pane View Pane iter next get Page add Fast View pane get View Reference get Page get Active Perspective move Fast View pane get View Reference view update true non Javadoc see org eclipse ui internal dnd I Drop Target get Cursor public Cursor get Cursor return Drag Cursors get Cursor Drag Cursors FASTVIEW public Rectangle get Snap Rectangle if position null As long as the toolbar is not empty highlight the place where this view will appear we may have compressed it to save space when empty so the actual icon location may not be over the toolbar when it is empty if get Tool Bar get Item Count 0 return get Location Of Next Icon If the toolbar is empty highlight the entire toolbar return Drag Util get Display Bounds get Control else return Geometry to Display get Tool Bar position get Bounds public I Drop Target drag Control current Control Object dragged Object Point position Rectangle drag Rectangle Tool Item target Item get Tool Item position if dragged Object instanceof View Pane View Pane pane View Pane dragged Object Can t drag views between windows if pane get Workbench Window window return null List new List new Array List 1 new List add dragged Object return new View Drop Target new List target Item if dragged Object instanceof View Stack View Stack folder View Stack dragged Object if folder get Workbench Window window return null List view List new Array List folder get Item Count Layout Part children folder get Children for int idx 0 idx children length idx if children idx instanceof Part Placeholder view List add children idx return new View Drop Target view List target Item return null tool Bar Data new Grid Data Grid Data FILL BOTH tool Bar Data width Hint HIDDEN WIDTH visible false get Tool Bar set Layout Data tool Bar Data Presentation Util add Drag Listener get Tool Bar drag Listener Drag Util add Drag Target get Control fast View Drag Target if fast View Label null Presentation Util add Drag Listener fast View Label drag Listener if fast View Label2 null Presentation Util add Drag Listener fast View Label2 drag Listener update true  createControl createChildControls newSide getSide isHorizontal newSide fastViewBar ToolBarManager fastViewBar ShowFastViewContribution menuListener handleEvent MenuDetect showFastViewBarPopup CellLayout controlLayout CellLayout setMargins newSide setDefaultRow setDefaultColumn setColumn newSide setLayout controlLayout WorkbenchMessages getString FastViewBar setToolTipText newSide fastViewLabel createFastViewSeparator fastViewLabel setToolTipText fastViewBar createControl newSide fastViewLabel2 createFastViewSeparator fastViewLabel2 setToolTipText getToolBar addListener MenuDetect menuListener dragListener handleEvent DragUtil getEventLoc IViewReference getViewAt startDraggingFastViewBar startDraggingFastView IDragOverListener fastViewDragTarget IDragOverListener ViewDropTarget AbstractDropTarget ToolItem panesToDrop ViewPanes ViewDropTarget panesToDrop ToolItem panesToDrop IDropTarget IViewReference getViewFor hasNext ViewPane ViewPane getPage addFastView getViewReference getPage getActivePerspective moveFastView getViewReference IDropTarget getCursor getCursor DragCursors getCursor DragCursors getSnapRectangle getToolBar getItemCount getLocationOfNextIcon DragUtil getDisplayBounds getControl toDisplay getToolBar getBounds IDropTarget currentControl draggedObject dragRectangle ToolItem targetItem getToolItem draggedObject ViewPane ViewPane ViewPane draggedObject getWorkbenchWindow newList ArrayList newList draggedObject ViewDropTarget newList targetItem draggedObject ViewStack ViewStack ViewStack draggedObject getWorkbenchWindow viewList ArrayList getItemCount LayoutPart getChildren PartPlaceholder viewList ViewDropTarget viewList targetItem toolBarData GridData GridData FILL_BOTH toolBarData widthHint HIDDEN_WIDTH getToolBar setLayoutData toolBarData PresentationUtil addDragListener getToolBar dragListener DragUtil addDragTarget getControl fastViewDragTarget fastViewLabel PresentationUtil addDragListener fastViewLabel dragListener fastViewLabel2 PresentationUtil addDragListener fastViewLabel2 dragListener
Begins dragging a particular fast view param ref param position param b protected void start Dragging Fast View I View Reference ref Point position boolean using Keyboard View Pane pane View Pane Workbench Part Reference ref get Pane Tool Item item item For pane get View Reference Rectangle drag Rect Geometry to Display get Tool Bar item get Bounds Perspective persp get Perspective Workbench Page page get Page start Drag View Pane Workbench Part Reference ref get Pane drag Rect position using Keyboard  startDraggingFastView IViewReference usingKeyboard ViewPane ViewPane WorkbenchPartReference getPane ToolItem itemFor getViewReference dragRect toDisplay getToolBar getBounds getPerspective WorkbenchPage getPage startDrag ViewPane WorkbenchPartReference getPane dragRect usingKeyboard
private void start Drag Object to Drag Rectangle drag Rect Point position boolean using Keyboard Perspective persp get Perspective Workbench Page page get Page I View Reference old Fast View null if persp null old Fast View persp get Active Fast View if page null page hide Fast View if page is Zoomed page zoom Out boolean success Drag Util perform Drag to Drag drag Rect position using Keyboard If the drag was cancelled reopen the old fast view if success old Fast View null page null page toggle Fast View old Fast View  startDrag toDrag dragRect usingKeyboard getPerspective WorkbenchPage getPage IViewReference oldFastView oldFastView getActiveFastView hideFastView isZoomed zoomOut DragUtil performDrag toDrag dragRect usingKeyboard oldFastView toggleFastView oldFastView
Begins dragging the fast view bar param position initial mouse position param using Keyboard true iff the bar is being dragged using the keyboard protected void start Dragging Fast View Bar Point position boolean using Keyboard Rectangle drag Rect Drag Util get Display Bounds control start Drag this drag Rect position using Keyboard  usingKeyboard startDraggingFastViewBar usingKeyboard dragRect DragUtil getDisplayBounds startDrag dragRect usingKeyboard
param control2 return private Label create Fast View Separator Composite control2 Label result new Label control2 SWT SEPARATOR SWT VERTICAL fast View Label set Image Workbench Images get Image I Workbench Graphic Constants IMG LCL VIEW MENU result add Listener SWT Menu Detect menu Listener if move Cursor null move Cursor new Cursor control get Display SWT CURSOR SIZEALL result set Cursor move Cursor Grid Data data new Grid Data Grid Data FILL VERTICAL data height Hint 10 data width Hint 10 data vertical Alignment Grid Data CENTER data horizontal Alignment Grid Data CENTER result set Layout Data data return result  createFastViewSeparator fastViewLabel setImage WorkbenchImages getImage IWorkbenchGraphicConstants IMG_LCL_VIEW_MENU addListener MenuDetect menuListener moveCursor moveCursor getDisplay CURSOR_SIZEALL setCursor moveCursor GridData GridData GridData FILL_VERTICAL heightHint widthHint verticalAlignment GridData horizontalAlignment GridData setLayoutData
Returns the toolbar for the fastview bar return private Tool Bar get Tool Bar return fast View Bar get Control  ToolBar getToolBar fastViewBar getControl
private I View Reference get View For Tool Item item if item null return null return I View Reference item get Data Show Fast View Contribution FAST VIEW  IViewReference getViewFor ToolItem IViewReference getData ShowFastViewContribution FAST_VIEW
Returns the view at the given position or null if none param position to test in display coordinates return the view at the given position or null if none private I View Reference get View At Point position return get View For get Tool Item position  IViewReference getViewAt getViewFor getToolItem
Returns the toolbar item at the given position in display coordinates param position return private Tool Item get Tool Item Point position Tool Bar toolbar get Tool Bar Point local toolbar to Control position return toolbar get Item local  ToolItem getToolItem ToolBar getToolBar toControl getItem
Shows the popup menu for an item in the fast view bar private void show Fast View Bar Popup Point pt Get the tool item under the mouse Tool Bar tool Bar get Tool Bar The fast view bar menu is created lazily here if fast View Bar Menu null Menu menu new Menu tool Bar orientation Item new Menu Item menu SWT CASCADE orientation Item set Text Workbench Messages get String Fast View Bar view orientation NON NLS 1 Menu orientation Swt Menu new Menu orientation Item Radio Menu orientation Menu new Radio Menu orientation Swt Menu current Orientation orientation Menu add Menu Item Workbench Messages get String Fast View Bar horizontal new Integer SWT HORIZONTAL NON NLS 1 orientation Menu add Menu Item Workbench Messages get String Fast View Bar vertical new Integer SWT VERTICAL NON NLS 1 orientation Item set Menu orientation Swt Menu restore Item new Menu Item menu SWT CHECK restore Item set Selection true restore Item set Text Workbench Messages get String View Pane fast View NON NLS 1 restore Item add Selection Listener new Selection Adapter public void widget Selected Selection Event e if selected View null Workbench Page page window get Active Workbench Page if page null int idx get Index selected View Tool Item item get Item idx Rectangle bounds item get Bounds Rectangle start Bounds Geometry to Display item get Parent bounds page remove Fast View selected View Layout Part pane Workbench Part Reference selected View get Pane Rectangle Animation animation new Rectangle Animation window get Shell start Bounds Drag Util get Display Bounds pane get Control animation schedule close Item new Menu Item menu SWT NONE close Item set Text Workbench Messages get String Workbench Window close NON NLS 1 close Item add Selection Listener new Selection Adapter public void widget Selected Selection Event e if selected View null Workbench Page page window get Active Workbench Page if page null page hide View selected View new Menu Item menu SWT SEPARATOR show On new Menu Item menu SWT CASCADE show On set Text Workbench Messages get String Fast View Bar dock on NON NLS 1 sides Menu new Menu show On radio Buttons new Radio Menu sides Menu side radio Buttons add Menu Item Workbench Messages get String Fast View Bar Left new Integer SWT LEFT NON NLS 1 radio Buttons add Menu Item Workbench Messages get String Fast View Bar Right new Integer SWT RIGHT NON NLS 1 radio Buttons add Menu Item Workbench Messages get String Fast View Bar Bottom new Integer SWT BOTTOM NON NLS 1 show On set Menu sides Menu fast View Bar Menu menu selected View get View At pt boolean selecting View selected View null restore Item set Enabled selecting View restore Item set Selection true close Item set Enabled selecting View orientation Item set Enabled selecting View if selecting View Set the new orientation but avoid re sending the event to our own listener current Orientation set get Orientation selected View orientation Change Listener fast View Bar Menu set Location pt x pt y fast View Bar Menu set Visible true  showFastViewBarPopup ToolBar toolBar getToolBar fastViewBarMenu toolBar orientationItem MenuItem orientationItem setText WorkbenchMessages getString FastViewBar view_orientation orientationSwtMenu orientationItem RadioMenu orientationMenu RadioMenu orientationSwtMenu currentOrientation orientationMenu addMenuItem WorkbenchMessages getString FastViewBar orientationMenu addMenuItem WorkbenchMessages getString FastViewBar orientationItem setMenu orientationSwtMenu restoreItem MenuItem restoreItem setSelection restoreItem setText WorkbenchMessages getString ViewPane fastView restoreItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectedView WorkbenchPage getActiveWorkbenchPage getIndex selectedView ToolItem getItem getBounds startBounds toDisplay getParent removeFastView selectedView LayoutPart WorkbenchPartReference selectedView getPane RectangleAnimation RectangleAnimation getShell startBounds DragUtil getDisplayBounds getControl closeItem MenuItem closeItem setText WorkbenchMessages getString WorkbenchWindow closeItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectedView WorkbenchPage getActiveWorkbenchPage hideView selectedView MenuItem showOn MenuItem showOn setText WorkbenchMessages getString FastViewBar dock_on sidesMenu showOn radioButtons RadioMenu sidesMenu radioButtons addMenuItem WorkbenchMessages getString FastViewBar radioButtons addMenuItem WorkbenchMessages getString FastViewBar radioButtons addMenuItem WorkbenchMessages getString FastViewBar showOn setMenu sidesMenu fastViewBarMenu selectedView getViewAt selectingView selectedView restoreItem setEnabled selectingView restoreItem setSelection closeItem setEnabled selectingView orientationItem setEnabled selectingView selectingView currentOrientation getOrientation selectedView orientationChangeListener fastViewBarMenu setLocation fastViewBarMenu setVisible
public int get Orientation I View Reference ref return is Horizontal ref SWT HORIZONTAL SWT VERTICAL  getOrientation IViewReference isHorizontal
Returns the underlying SWT control for the fast view bar or null if create Control has not yet been invoked The caller must not make any assumptions about the type of Control that is returned return the underlying SWT control for the fast view bar public Control get Control return control  createControl getControl
public void dispose if radio Buttons null radio Buttons dispose dispose Child Controls  radioButtons radioButtons disposeChildControls
protected void dispose Child Controls fast View Bar dispose fast View Bar null if fast View Label null fast View Label dispose fast View Label null if fast View Label2 null fast View Label2 dispose fast View Label2 null if move Cursor null move Cursor dispose move Cursor null old Length 0  disposeChildControls fastViewBar fastViewBar fastViewLabel fastViewLabel fastViewLabel fastViewLabel2 fastViewLabel2 fastViewLabel2 moveCursor moveCursor moveCursor oldLength
Refreshes the contents to match the fast views in the window s current perspective param force public void update boolean force fast View Bar update force Tool Item items fast View Bar get Control get Items boolean should Expand items length 0 if should Expand visible get Tool Bar set Visible true if should Expand tool Bar Data width Hint HIDDEN WIDTH else tool Bar Data width Hint SWT DEFAULT visible should Expand if items length old Length Layout Util resize control old Length items length for int idx 0 idx items length idx I View Reference view get View For items idx view Orientation put view get Id new Integer is Horizontal view SWT HORIZONTAL SWT VERTICAL  fastViewBar ToolItem fastViewBar getControl getItems shouldExpand shouldExpand getToolBar setVisible shouldExpand toolBarData widthHint HIDDEN_WIDTH toolBarData widthHint shouldExpand oldLength LayoutUtil oldLength IViewReference getViewFor viewOrientation getId isHorizontal
Returns the currently selected fastview return the currently selected fastview or null if none public I View Reference get Selection return selection  IViewReference getSelection
Sets the currently selected fastview param selected the currently selected fastview or null if none public void set Selection I View Reference selected Tool Item items fast View Bar get Control get Items for int i 0 i items length i Tool Item item items i item set Selection get View item selected selection selected  setSelection IViewReference ToolItem fastViewBar getControl getItems ToolItem setSelection getView
Returns the view associated with the given toolbar item param item return private I View Reference get View Tool Item item return I View Reference item get Data Show Fast View Contribution FAST VIEW  IViewReference getView ToolItem IViewReference getData ShowFastViewContribution FAST_VIEW
private int get Index I View Reference to Find Tool Item items fast View Bar get Control get Items for int i 0 i items length i if items i get Data Show Fast View Contribution FAST VIEW to Find return i return items length  getIndex IViewReference toFind ToolItem fastViewBar getControl getItems getData ShowFastViewContribution FAST_VIEW toFind
private Tool Item get Item int idx Tool Item items fast View Bar get Control get Items if idx items length return null return items idx  ToolItem getItem ToolItem fastViewBar getControl getItems
Returns the toolbar item associated with the given view param to Find return private Tool Item item For I View Reference to Find return get Item get Index to Find  toFind ToolItem itemFor IViewReference toFind getItem getIndex toFind
see org eclipse ui internal I Window Trim get Valid Sides public int get Valid Sides return SWT LEFT SWT RIGHT SWT BOTTOM  IWindowTrim getValidSides getValidSides
see org eclipse ui internal I Window Trim docked int public void dock int side this side set side  IWindowTrim
public int get Side return this side get  getSide
Adds a listener that will be notified whenever param listener public void add Docking Listener I Change Listener listener this side add Change Listener listener  addDockingListener IChangeListener addChangeListener
private boolean is Horizontal I View Reference ref Integer orientation Integer view Orientation get ref get Id boolean horizontal Bar Geometry is Horizontal get Side boolean horizontal horizontal Bar if orientation null horizontal orientation int Value SWT HORIZONTAL else horizontal false return horizontal  isHorizontal IViewReference viewOrientation getId horizontalBar isHorizontal getSide horizontalBar intValue
param ref return public int get View Side I View Reference ref boolean horizontal is Horizontal ref if horizontal return get Side SWT BOTTOM SWT BOTTOM SWT TOP else return get Side SWT RIGHT SWT RIGHT SWT LEFT  getViewSide IViewReference isHorizontal getSide getSide
public void save State I Memento memento memento put Integer I Workbench Constants TAG FAST VIEW SIDE get Side Iterator iter view Orientation key Set iterator while iter has Next String next String iter next I Memento orientation memento create Child I Workbench Constants TAG FAST VIEW ORIENTATION orientation put String I Workbench Constants TAG VIEW next orientation put Integer I Workbench Constants TAG POSITION Integer view Orientation get next int Value  saveState IMemento putInteger IWorkbenchConstants TAG_FAST_VIEW_SIDE getSide viewOrientation keySet hasNext IMemento createChild IWorkbenchConstants TAG_FAST_VIEW_ORIENTATION putString IWorkbenchConstants TAG_VIEW putInteger IWorkbenchConstants TAG_POSITION viewOrientation intValue
Returns the approximate location where the next fastview icon will be drawn display coordinates param fast View Mem public Rectangle get Location Of Next Icon Tool Bar control get Tool Bar Rectangle result control get Bounds Point size control compute Size SWT DEFAULT SWT DEFAULT false result height size y result width size x boolean horizontal Geometry is Horizontal get Side int hover Side horizontal SWT RIGHT SWT BOTTOM result Geometry get Extruded Edge result Geometry get Dimension result horizontal hover Side return Geometry to Display control get Parent result  fastViewMem getLocationOfNextIcon ToolBar getToolBar getBounds computeSize isHorizontal getSide hoverSide getExtrudedEdge getDimension hoverSide toDisplay getParent
param fast View Mem public void restore State I Memento memento Integer big Int big Int memento get Integer I Workbench Constants TAG FAST VIEW SIDE if big Int null dock big Int int Value I Memento orientations memento get Children I Workbench Constants TAG FAST VIEW ORIENTATION for int i 0 i orientations length i I Memento next orientations i view Orientation put next get String I Workbench Constants TAG VIEW next get Integer I Workbench Constants TAG POSITION  fastViewMem restoreState IMemento bigInt bigInt getInteger IWorkbenchConstants TAG_FAST_VIEW_SIDE bigInt bigInt intValue IMemento getChildren IWorkbenchConstants TAG_FAST_VIEW_ORIENTATION IMemento viewOrientation getString IWorkbenchConstants TAG_VIEW getInteger IWorkbenchConstants TAG_POSITION

private Listener escape Listener new Listener public void handle Event Event event if event character SWT ESC if current Pane null current Pane get Page hide Fast View  escapeListener handleEvent currentPane currentPane getPage hideFastView
public void set State int new State super set State new State View Pane pane current Pane switch new State case I Stack Presentation Site STATE MINIMIZED current Pane get Page hide Fast View break case I Stack Presentation Site STATE MAXIMIZED pane set Zoomed true sash set Visible false get Presentation set Bounds get Bounds break case I Stack Presentation Site STATE RESTORED pane set Zoomed false sash set Visible true get Presentation set Bounds get Bounds break default  setState newState setState newState ViewPane currentPane newState IStackPresentationSite STATE_MINIMIZED currentPane getPage hideFastView IStackPresentationSite STATE_MAXIMIZED setZoomed setVisible getPresentation setBounds getBounds IStackPresentationSite STATE_RESTORED setZoomed setVisible getPresentation setBounds getBounds
public void close I Presentable Part part if is Closeable part return current Pane get Page hide View current Pane get View Reference  IPresentablePart isCloseable currentPane getPage hideView currentPane getViewReference
public void close I Presentable Part parts for int idx 0 idx parts length idx close parts idx  IPresentablePart
see org eclipse ui internal skins I Presentation Site drag Start org eclipse ui internal skins I Presentable Part boolean public void drag Start I Presentable Part being Dragged Point initial Position boolean keyboard drag Start initial Position keyboard  IPresentationSite dragStart IPresentablePart dragStart IPresentablePart beingDragged initialPosition dragStart initialPosition
public void drag Start Point initial Position boolean keyboard if is Part Moveable return View Pane pane current Pane Control control get Presentation get Control Rectangle bounds Geometry to Display client Composite control get Bounds Workbench Page page current Pane get Page Perspective persp page get Active Perspective page hide Fast View if page is Zoomed page zoom Out Drag Util perform Drag pane bounds initial Position keyboard  dragStart initialPosition isPartMoveable ViewPane currentPane getPresentation getControl toDisplay clientComposite getBounds WorkbenchPage currentPane getPage getActivePerspective hideFastView isZoomed zoomOut DragUtil performDrag initialPosition
public I Presentable Part get Selected Part if current Pane null return null return current Pane get Presentable Part  IPresentablePart getSelectedPart currentPane currentPane getPresentablePart
public void add System Actions I Menu Manager menu Manager append To Group If Possible menu Manager misc new System Menu Fast View Orientation current Pane NON NLS 1 append To Group If Possible menu Manager misc new Updating Action Contribution Item fast View Action NON NLS 1 append To Group If Possible menu Manager size new System Menu Size Fast View Fast View Pane this NON NLS 1  addSystemActions IMenuManager menuManager appendToGroupIfPossible menuManager SystemMenuFastViewOrientation currentPane appendToGroupIfPossible menuManager UpdatingActionContributionItem fastViewAction appendToGroupIfPossible menuManager SystemMenuSizeFastView FastViewPane
public boolean is Closeable I Presentable Part to Close if current Pane null return true Perspective perspective current Pane get Page get Active Perspective if perspective null Shouldn t happen can t have a Fast View Pane without a perspective return true return perspective is Closeable current Pane get View Reference  isCloseable IPresentablePart toClose currentPane currentPane getPage getActivePerspective FastViewPane isCloseable currentPane getViewReference
public boolean is Part Moveable I Presentable Part to Move return is Part Moveable  isPartMoveable IPresentablePart toMove isPartMoveable
public boolean is Stack Moveable a fast view stack is moveable iff its part is moveable return is Part Moveable  isStackMoveable isPartMoveable
private boolean is Part Moveable if current Pane null return false Perspective perspective current Pane get Page get Active Perspective if perspective null Shouldn t happen can t have a Fast View Pane without a perspective return false return perspective is Moveable current Pane get View Reference  isPartMoveable currentPane currentPane getPage getActivePerspective FastViewPane isMoveable currentPane getViewReference
public boolean supports State int new State if current Pane null return false if current Pane get Page is Fixed Layout return false return true  supportsState newState currentPane currentPane getPage isFixedLayout
private static void append To Group If Possible I Menu Manager m String group Id Contribution Item item try m append To Group group Id item catch Illegal Argument Exception e m add item  appendToGroupIfPossible IMenuManager groupId ContributionItem appendToGroup groupId IllegalArgumentException
private Listener mouse Down Listener new Listener public void handle Event Event event if event widget instanceof Control Control control Control event widget if control get Shell client Composite get Shell return if event widget instanceof Tool Bar Ignore mouse down on actual tool bar buttons Point pt new Point event x event y Tool Bar tool Bar Tool Bar event widget if tool Bar get Item pt null return Point loc Drag Util get Event Loc event Rectangle bounds Drag Util get Display Bounds client Composite if site get State I Stack Presentation Site STATE MAXIMIZED bounds Geometry get Extruded Edge bounds size SASH SIZE side if bounds contains loc site set State I Stack Presentation Site STATE MINIMIZED  mouseDownListener handleEvent getShell clientComposite getShell ToolBar ToolBar toolBar ToolBar toolBar getItem DragUtil getEventLoc DragUtil getDisplayBounds clientComposite getState IStackPresentationSite STATE_MAXIMIZED getExtrudedEdge SASH_SIZE setState IStackPresentationSite STATE_MINIMIZED
final Key Listener listener new Key Adapter public void key Pressed Key Event e if e character SWT ESC e character r current Pane set Focus  KeyListener KeyAdapter keyPressed KeyEvent currentPane setFocus
sash add Focus Listener new Focus Adapter public void focus Gained Focus Event e sash set Background sash get Display get System Color SWT COLOR LIST SELECTION sash add Key Listener listener  addFocusListener FocusAdapter focusGained FocusEvent setBackground getDisplay getSystemColor COLOR_LIST_SELECTION addKeyListener
sash add Key Listener listener public void focus Lost Focus Event e sash set Background null sash remove Key Listener listener  addKeyListener focusLost FocusEvent setBackground removeKeyListener
public void move Sash final Key Listener listener new Key Adapter public void key Pressed Key Event e if e character SWT ESC e character r current Pane set Focus sash add Focus Listener new Focus Adapter public void focus Gained Focus Event e sash set Background sash get Display get System Color SWT COLOR LIST SELECTION sash add Key Listener listener public void focus Lost Focus Event e sash set Background null sash remove Key Listener listener sash set Focus  moveSash KeyListener KeyAdapter keyPressed KeyEvent currentPane setFocus addFocusListener FocusAdapter focusGained FocusEvent setBackground getDisplay getSystemColor COLOR_LIST_SELECTION addKeyListener focusLost FocusEvent setBackground removeKeyListener setFocus
private Listener resize Listener new Listener public void handle Event Event event if event type SWT Resize current Pane null set Size size  resizeListener handleEvent currentPane setSize
private Selection Adapter selection Listener new Selection Adapter public void widget Selected Selection Event e if current Pane null Rectangle bounds client Composite get Client Area Point location new Point e x e y int distance From Edge Geometry get Distance From Edge bounds location side if side SWT TOP side SWT LEFT distance From Edge SASH SIZE set Size distance From Edge if e detail SWT DRAG update Fast View Sash Bounds get Presentation get Control move Above null current Pane move Above null sash move Above null current Pane get Control redraw sash redraw  SelectionAdapter selectionListener SelectionAdapter widgetSelected SelectionEvent currentPane clientComposite getClientArea distanceFromEdge getDistanceFromEdge distanceFromEdge SASH_SIZE setSize distanceFromEdge updateFastViewSashBounds getPresentation getControl moveAbove currentPane moveAbove moveAbove currentPane getControl
private void set Size int size if size min Size size min Size this size size Stack Presentation presentation get Presentation if presentation null presentation get Control is Disposed return get Presentation set Bounds get Bounds update Fast View Sash Bounds  setSize minSize minSize StackPresentation getPresentation getControl isDisposed getPresentation setBounds getBounds updateFastViewSashBounds
Returns the current fastview size ratio Returns 0 0 if there is no fastview visible return public float get Current Ratio if current Pane null return 0 0f boolean is Vertical Geometry is Horizontal side Rectangle client Area client Composite get Client Area int client Size Geometry get Dimension client Area is Vertical return float size float client Size  getCurrentRatio currentPane isVertical isHorizontal clientArea clientComposite getClientArea clientSize getDimension clientArea isVertical clientSize
private Rectangle get Client Area return client Composite get Client Area  getClientArea clientComposite getClientArea
private Rectangle get Bounds Rectangle bounds get Client Area if site get State I Stack Presentation Site STATE MAXIMIZED return bounds boolean horizontal Geometry is Horizontal side int available Geometry get Dimension bounds horizontal return Geometry get Extruded Edge bounds Math min Fast View Pane this size available side  getBounds getClientArea getState IStackPresentationSite STATE_MAXIMIZED isHorizontal getDimension getExtrudedEdge FastViewPane
Displays the given view as a fastview The view will be docked to the edge of the given composite until it is subsequently hidden by a call to hide Fast View param new Client Composite param pane param new Side public void show View Composite new Client Composite View Pane pane int new Side float size Ratio side new Side if current Pane null hide View current Pane pane fast View Action set Pane current Pane client Composite new Client Composite client Composite add Listener SWT Resize resize Listener Create the control first Control ctrl pane get Control if ctrl null pane create Control client Composite ctrl pane get Control ctrl add Listener SWT Traverse escape Listener Temporarily use the same appearance as docked views eventually fastviews will be independently pluggable Abstract Presentation Factory factory Workbench Window pane get Workbench Window get Window Configurer get Presentation Factory Stack Presentation presentation factory create View Presentation new Client Composite site site set Presentation presentation site set Presentation State I Stack Presentation Site STATE RESTORED presentation add Part pane get Presentable Part null presentation select Part pane get Presentable Part presentation set Active Stack Presentation AS ACTIVE FOCUS presentation set Visible true Point minimum Presentation Size presentation compute Minimum Size min Size Geometry is Horizontal side minimum Presentation Size y minimum Presentation Size x Show pane fast ctrl set Enabled true Add focus support Composite parent ctrl get Parent pane set Visible true pane set Focus boolean horizontal Geometry is Horizontal side sash new Sash parent Geometry get Swt Horizontal Or Vertical Constant horizontal sash add Selection Listener selection Listener Rectangle client Area new Client Composite get Client Area get Presentation get Control move Above null current Pane move Above null sash move Above null set Size int Geometry get Dimension client Area horizontal size Ratio Display display sash get Display display add Filter SWT Mouse Down mouse Down Listener  hideFastView newClientComposite newSide showView newClientComposite ViewPane newSide sizeRatio newSide currentPane hideView currentPane fastViewAction setPane currentPane clientComposite newClientComposite clientComposite addListener resizeListener getControl createControl clientComposite getControl addListener escapeListener AbstractPresentationFactory WorkbenchWindow getWorkbenchWindow getWindowConfigurer getPresentationFactory StackPresentation createViewPresentation newClientComposite setPresentation setPresentationState IStackPresentationSite STATE_RESTORED addPart getPresentablePart selectPart getPresentablePart setActive StackPresentation AS_ACTIVE_FOCUS setVisible minimumPresentationSize computeMinimumSize minSize isHorizontal minimumPresentationSize minimumPresentationSize setEnabled getParent setVisible setFocus isHorizontal getSwtHorizontalOrVerticalConstant addSelectionListener selectionListener clientArea newClientComposite getClientArea getPresentation getControl moveAbove currentPane moveAbove moveAbove setSize getDimension clientArea sizeRatio getDisplay addFilter MouseDown mouseDownListener
Updates the position of the resize sash param bounds private void update Fast View Sash Bounds Rectangle bounds get Bounds int opposite Side Geometry get Opposite Side side Rectangle new Bounds Geometry get Extruded Edge bounds SASH SIZE opposite Side Rectangle old Bounds sash get Bounds if new Bounds equals old Bounds sash set Bounds new Bounds  updateFastViewSashBounds getBounds oppositeSide getOppositeSide newBounds getExtrudedEdge SASH_SIZE oppositeSide oldBounds getBounds newBounds oldBounds setBounds newBounds
Disposes of any active widgetry being used for the fast view pane Does not dispose of the view itself public void dispose hide View  hideView
Returns the bounding rectangle for the currently visible fastview given the rectangle in which the fastview can dock param client Area param ratio param orientation return private Rectangle get Fast View Bounds Rectangle client Area client Composite get Client Area boolean is Vertical Geometry is Horizontal side int client Size Geometry get Dimension client Area is Vertical int view Size Math min Geometry get Dimension get Bounds is Vertical client Size min Size return Geometry get Extruded Edge client Area view Size side  clientArea getFastViewBounds clientArea clientComposite getClientArea isVertical isHorizontal clientSize getDimension clientArea isVertical viewSize getDimension getBounds isVertical clientSize minSize getExtrudedEdge clientArea viewSize
return private Stack Presentation get Presentation return site get Presentation  StackPresentation getPresentation getPresentation
Hides the sash for the fastview if it is currently visible This method may not be required anymore and might be removed from the public interface public void hide Fast View Sash if sash null sash set Visible false  hideFastViewSash setVisible
Hides the currently visible fastview public void hide View if client Composite null Display display client Composite get Display display remove Filter SWT Mouse Down mouse Down Listener if current Pane null return unzoom before hiding current Pane set Zoomed false if sash null sash dispose sash null client Composite remove Listener SWT Resize resize Listener Get pane Hide the right side sash first hide Fast View Sash Control ctrl current Pane get Control ctrl remove Listener SWT Traverse escape Listener Hide it completely get Presentation set Visible false site dispose current Pane set Fast View Sash null ctrl set Enabled false Remove focus support current Pane null  hideView clientComposite clientComposite getDisplay removeFilter MouseDown mouseDownListener currentPane currentPane setZoomed clientComposite removeListener resizeListener hideFastViewSash currentPane getControl removeListener escapeListener getPresentation setVisible currentPane setFastViewSash setEnabled currentPane
return Returns the currently visible fastview or null if none public View Pane get Current Pane return current Pane  ViewPane getCurrentPane currentPane
Zooms or unzooms the fast view pane public void toggle Zoom if site get State I Stack Presentation Site STATE MAXIMIZED site set State I Stack Presentation Site STATE RESTORED else site set State I Stack Presentation Site STATE MAXIMIZED  toggleZoom getState IStackPresentationSite STATE_MAXIMIZED setState IStackPresentationSite STATE_RESTORED setState IStackPresentationSite STATE_MAXIMIZED

Create an instance of a code Folder Layout code belonging to a code Page Layout code public Folder Layout Page Layout page Layout View Stack folder View Factory view Factory super this folder folder this view Factory view Factory this page Layout page Layout  FolderLayout PageLayout FolderLayout PageLayout pageLayout ViewStack ViewFactory viewFactory viewFactory viewFactory pageLayout pageLayout
public void add Placeholder String view Id if page Layout check Part In Layout view Id return Get the view s label issue why do we need to ask the registry for the view if view Id index Of Part Placeholder WILD CARD 1 NON NLS 1 I View Registry reg Workbench Plugin get Default get View Registry I View Descriptor desc reg find view Id if desc null cannot safely open the dialog so log the problem Workbench Plugin log Unable to find view label view Id NON NLS 1 return Create the placeholder Part Placeholder new Part new Part Placeholder view Id link Part To Page Layout view Id new Part Add it to the folder layout folder add new Part  addPlaceholder viewId pageLayout checkPartInLayout viewId viewId indexOf PartPlaceholder WILD_CARD IViewRegistry WorkbenchPlugin getDefault getViewRegistry IViewDescriptor viewId WorkbenchPlugin viewId PartPlaceholder newPart PartPlaceholder viewId linkPartToPageLayout viewId newPart newPart
public void add View String view Id if page Layout check Part In Layout view Id return try I View Descriptor descriptor view Factory get View Registry find view Id if Workbench Activity Helper filter Item descriptor create a placeholder instead add Placeholder view Id Layout Helper add View Activator page Layout view Id else View Pane new Part Layout Helper create View page Layout get View Factory view Id link Part To Page Layout view Id new Part folder add new Part catch Part Init Exception e cannot safely open the dialog so log the problem Workbench Plugin log e get Message  addView viewId pageLayout checkPartInLayout viewId IViewDescriptor viewFactory getViewRegistry viewId WorkbenchActivityHelper filterItem addPlaceholder viewId LayoutHelper addViewActivator pageLayout viewId ViewPane newPart LayoutHelper createView pageLayout getViewFactory viewId linkPartToPageLayout viewId newPart newPart PartInitException WorkbenchPlugin getMessage
Inform the page layout of the new part created and the folder the part belongs to private void link Part To Page Layout String view Id Layout Part new Part page Layout set Ref Part view Id new Part page Layout set Folder Part view Id folder force creation of the view layout rec page Layout get View Layout Rec view Id true  linkPartToPageLayout viewId LayoutPart newPart pageLayout setRefPart viewId newPart pageLayout setFolderPart viewId pageLayout getViewLayoutRec viewId

Creates the wizard that will own its own colors public Form Wizard  FormWizard
Creates a wizard that will use shared colors param colors shared colors public Form Wizard Form Colors colors toolkit new Form Toolkit colors  FormWizard FormColors FormToolkit
Creates form toolkit if missing before creating page controls param page Container the page container widget public void create Page Controls Composite page Container if toolkit null toolkit new Form Toolkit page Container get Display super create Page Controls page Container  pageContainer createPageControls pageContainer FormToolkit pageContainer getDisplay createPageControls pageContainer
Disposes the toolkit and the wizard itself public void dispose super dispose toolkit dispose 

Creats the wizard dialog Colors are required to modify the dialog appearance to fit the forms param shell the parent shell param wizard the wizard to host param colors the colors to use public Form Wizard Dialog Shell shell Form Wizard wizard Form Colors colors super shell wizard set Shell Style get Shell Style SWT RESIZE this colors colors  FormWizardDialog FormWizard FormColors setShellStyle getShellStyle
Extends the parent method by adjusting the colors and margins to fit the forms param the dialog area parent return the dialog area protected Control create Dialog Area Composite parent Composite c Composite super create Dialog Area parent set Child Colors c c set Background colors get Background c set Foreground colors get Foreground return c  createDialogArea createDialogArea setChildColors setBackground getBackground setForeground getForeground
Extends the parent method by adjusting the colors of the button bar param parent the button bar parent return the button bar protected Control create Button Bar Composite parent Control bar super create Button Bar parent bar set Background colors get Background bar set Foreground colors get Foreground parent set Background colors get Background parent set Foreground colors get Foreground return bar  createButtonBar createButtonBar setBackground getBackground setForeground getForeground setBackground getBackground setForeground getForeground
private void set Child Colors Composite parent Control children parent get Children for int i 0 i children length i Control child children i child set Background colors get Background if child instanceof Progress Monitor Part set Child Colors Progress Monitor Part child if child instanceof Composite Layout l Composite child get Layout if l instanceof Page Container Fill Layout Page Container Fill Layout pl Page Container Fill Layout l pl margin Width 0 pl margin Height 0  setChildColors getChildren setBackground getBackground ProgressMonitorPart setChildColors ProgressMonitorPart getLayout PageContainerFillLayout PageContainerFillLayout PageContainerFillLayout marginWidth marginHeight

protected Wizard Form managed Form public Form Wizard Page String id Form Toolkit toolkit super id this toolkit toolkit  WizardForm managedForm FormWizardPage FormToolkit
Creates the form wizard page control This method is final Clients are expected to implement code create Form Contents Composite code instead public final void create Control Composite parent Scrolled Form form toolkit create Scrolled Form parent form set Expand Horizontal true form set Expand Vertical true managed Form new Wizard Form this toolkit form create Form Contents form get Body set Control form  createFormContents createControl ScrolledForm createScrolledForm setExpandHorizontal setExpandVertical managedForm WizardForm createFormContents getBody setControl
public void dispose managed Form dispose super dispose  managedForm
protected abstract void create Form Contents Composite form  createFormContents

public boolean advance Locator GC gc int w Hint Locator locator Hashtable object Table boolean compute Height Only if compute Height Only locator x locator indent locator y locator row Height locator row Height 0 locator row Counter return true  advanceLocator wHint objectTable computeHeightOnly computeHeightOnly rowHeight rowHeight rowCounter
public void paint GC gc int width Locator locator Hashtable resource Table boolean selected locator reset Caret locator y locator row Height locator row Height 0 locator row Counter  resourceTable resetCaret rowHeight rowHeight rowCounter

private int bindent 1 Constructor for Bullet Paragraph param add Vertical Space public Bullet Paragraph boolean add Vertical Space super add Vertical Space  BulletParagraph addVerticalSpace BulletParagraph addVerticalSpace addVerticalSpace
public int get Indent int ivalue indent if ivalue 1 return ivalue switch style case CIRCLE ivalue CIRCLE DIAM SPACING break default ivalue 20 break return get Bullet Indent ivalue  getIndent CIRCLE_DIAM getBulletIndent
public int get Bullet Indent if bindent 1 return bindent return 0  getBulletIndent
see I Bullet Paragraph get Bullet Style public int get Bullet Style return style  IBulletParagraph getBulletStyle getBulletStyle
public void set Bullet Style int style this style style  setBulletStyle
public void set Bullet Text String text this text text  setBulletText
public void set Indent int indent this indent indent  setIndent
public void set Bullet Indent int bindent this bindent bindent  setBulletIndent
see I Bullet Paragraph get Bullet Text public String get Bullet Text return text  IBulletParagraph getBulletText getBulletText
public void paint GC gc int width Locator loc int line Height Hashtable resource Table Hyperlink Segment selected Link compute Row Heights gc width loc line Height resource Table paint Bullet gc loc line Height resource Table super paint gc width loc line Height resource Table selected Link  lineHeight resourceTable HyperlinkSegment selectedLink computeRowHeights lineHeight resourceTable paintBullet lineHeight resourceTable lineHeight resourceTable selectedLink
public void paint Bullet GC gc Locator loc int line Height Hashtable resource Table int x loc x get Indent get Bullet Indent int row Height int loc heights get 0 0 if style CIRCLE int y loc y row Height 2 CIRCLE DIAM 2 Color bg gc get Background Color fg gc get Foreground gc set Background fg gc fill Rectangle x y 1 5 3 gc fill Rectangle x 1 y 3 5 gc set Background bg else if style TEXT text null gc draw Text text x loc y else if style IMAGE text null Image image Image resource Table get text if image null int y loc y row Height 2 image get Bounds height 2 gc draw Image image x y  paintBullet lineHeight resourceTable getIndent getBulletIndent rowHeight rowHeight CIRCLE_DIAM getBackground getForeground setBackground fillRectangle fillRectangle setBackground drawText resourceTable rowHeight getBounds drawImage

public static Cursor get Busy Cursor if busy Cursor null busy Cursor new Cursor Display get Current SWT CURSOR WAIT return busy Cursor  getBusyCursor busyCursor busyCursor getCurrent CURSOR_WAIT busyCursor
public static Cursor get Hand Cursor if hand Cursor null hand Cursor new Cursor Display get Current SWT CURSOR HAND return hand Cursor  getHandCursor handCursor handCursor getCurrent CURSOR_HAND handCursor
public static Cursor get Text Cursor if text Cursor null text Cursor new Cursor Display get Current SWT CURSOR IBEAM return text Cursor  getTextCursor textCursor textCursor getCurrent CURSOR_IBEAM textCursor
public static void shutdown if busy Cursor null busy Cursor dispose if hand Cursor null hand Cursor dispose if text Cursor null text Cursor dispose busy Cursor null hand Cursor null text Cursor null  busyCursor busyCursor handCursor handCursor textCursor textCursor busyCursor handCursor textCursor

public static final String BOLD FONT ID f     bold public Form Text Model reset  BOLD_FONT_ID ____bold FormTextModel
public Paragraph get Paragraphs if paragraphs null return new Paragraph 0 return Paragraph paragraphs to Array new Paragraph paragraphs size  getParagraphs toArray
public String get Accessible Text if paragraphs null return String Buffer sbuf new String Buffer for int i 0 i paragraphs size i Paragraph paragraph Paragraph paragraphs get i String text paragraph get Accessible Text sbuf append text return sbuf to String  getAccessibleText StringBuffer StringBuffer getAccessibleText toString
public void parse Tagged Text String tagged Text boolean expandUR Ls if tagged Text null reset return try Input Stream stream new Byte Array Input Stream tagged Text get Bytes UTF8 parse Input Stream stream expandUR Ls catch Unsupported Encoding Exception e SWT error SWT ERROR UNSUPPORTED FORMAT e  parseTaggedText taggedText expandURLs taggedText InputStream ByteArrayInputStream taggedText getBytes parseInputStream expandURLs UnsupportedEncodingException ERROR_UNSUPPORTED_FORMAT
public void parse Input Stream Input Stream is boolean expandUR Ls document Builder Factory set Namespace Aware true document Builder Factory set Ignoring Comments true reset try Document Builder parser document Builder Factory new Document Builder Input Source source new Input Source is Document doc parser parse source process Document doc expandUR Ls catch Parser Configuration Exception e SWT error SWT ERROR CANNOT SET TEXT e catch SAX Exception e SWT error SWT ERROR CANNOT SET TEXT e catch IO Exception e SWT error SWT ERROR IO e  parseInputStream InputStream expandURLs documentBuilderFactory setNamespaceAware documentBuilderFactory setIgnoringComments DocumentBuilder documentBuilderFactory newDocumentBuilder InputSource InputSource processDocument expandURLs ParserConfigurationException ERROR_CANNOT_SET_TEXT SAXException ERROR_CANNOT_SET_TEXT IOException ERROR_IO
private void process Document Document doc boolean expandUR Ls Node root doc get Document Element Node List children root get Child Nodes for int i 0 i children get Length i Node child children item i if child get Node Type Node TEXT NODE Make an implicit paragraph String text get Single Node Text child if text null is Ignorable White Space text true Paragraph p new Paragraph true p parse Regular Text text expandUR Ls get Hyperlink Settings null paragraphs add p else if child get Node Type Node ELEMENT NODE String tag child get Node Name to Lower Case if tag equals p Paragraph p process Paragraph child expandUR Ls if p null paragraphs add p else if tag equals li Paragraph p process List Item child expandUR Ls if p null paragraphs add p  processDocument expandURLs getDocumentElement NodeList getChildNodes getLength getNodeType TEXT_NODE getSingleNodeText isIgnorableWhiteSpace parseRegularText expandURLs getHyperlinkSettings getNodeType ELEMENT_NODE getNodeName toLowerCase processParagraph expandURLs processListItem expandURLs
private Paragraph process Paragraph Node paragraph boolean expandUR Ls Node List children paragraph get Child Nodes Named Node Map atts paragraph get Attributes Node add Space Att atts get Named Item add Vertical Space boolean add Space true if add Space Att null add Space Att atts get Named Item vspace if add Space Att null String value add Space Att get Node Value add Space value equals Ignore Case true Paragraph p new Paragraph add Space process Segments p children expandUR Ls return p  processParagraph expandURLs NodeList getChildNodes NamedNodeMap getAttributes addSpaceAtt getNamedItem addVerticalSpace addSpace addSpaceAtt addSpaceAtt getNamedItem addSpaceAtt addSpaceAtt getNodeValue addSpace equalsIgnoreCase addSpace processSegments expandURLs
private Paragraph process List Item Node list Item boolean expandUR Ls Node List children list Item get Child Nodes Named Node Map atts list Item get Attributes Node add Space Att atts get Named Item add Vertical Space Node style Att atts get Named Item style Node value Att atts get Named Item value Node indent Att atts get Named Item indent Node bindent Att atts get Named Item bindent int style Bullet Paragraph CIRCLE int indent 1 int bindent 1 String text null boolean add Space true if add Space Att null String value add Space Att get Node Value add Space value equals Ignore Case true if style Att null String value style Att get Node Value if value equals Ignore Case text style Bullet Paragraph TEXT else if value equals Ignore Case image style Bullet Paragraph IMAGE else if value equals Ignore Case bullet style Bullet Paragraph CIRCLE if value Att null text value Att get Node Value if style Bullet Paragraph IMAGE text i text if indent Att null String value indent Att get Node Value try indent Integer parse Int value catch Number Format Exception e if bindent Att null String value bindent Att get Node Value try bindent Integer parse Int value catch Number Format Exception e Bullet Paragraph p new Bullet Paragraph add Space p set Indent indent p set Bullet Indent bindent p set Bullet Style style p set Bullet Text text process Segments p children expandUR Ls return p  processListItem listItem expandURLs NodeList listItem getChildNodes NamedNodeMap listItem getAttributes addSpaceAtt getNamedItem addVerticalSpace styleAtt getNamedItem valueAtt getNamedItem indentAtt getNamedItem bindentAtt getNamedItem BulletParagraph addSpace addSpaceAtt addSpaceAtt getNodeValue addSpace equalsIgnoreCase styleAtt styleAtt getNodeValue equalsIgnoreCase BulletParagraph equalsIgnoreCase BulletParagraph equalsIgnoreCase BulletParagraph valueAtt valueAtt getNodeValue BulletParagraph indentAtt indentAtt getNodeValue parseInt NumberFormatException bindentAtt bindentAtt getNodeValue parseInt NumberFormatException BulletParagraph BulletParagraph addSpace setIndent setBulletIndent setBulletStyle setBulletText processSegments expandURLs
private void process Segments Paragraph p Node List children boolean expandUR Ls for int i 0 i children get Length i Node child children item i Paragraph Segment segment null if child get Node Type Node TEXT NODE String value get Single Node Text child if value null is Ignorable White Space value false p parse Regular Text value expandUR Ls get Hyperlink Settings null else if child get Node Type Node ELEMENT NODE String name child get Node Name if name equals Ignore Case img segment process Image Segment child else if name equals Ignore Case a segment process Hyperlink Segment child get Hyperlink Settings else if name equals Ignore Case span process Text Segment p expandUR Ls child else if name equals Ignore Case b String text get Node Text child String font Id BOLD FONT ID p parse Regular Text text expandUR Ls get Hyperlink Settings font Id else if name equals Ignore Case br segment new Break Segment if segment null p add Segment segment  processSegments NodeList expandURLs getLength ParagraphSegment getNodeType TEXT_NODE getSingleNodeText isIgnorableWhiteSpace parseRegularText expandURLs getHyperlinkSettings getNodeType ELEMENT_NODE getNodeName equalsIgnoreCase processImageSegment equalsIgnoreCase processHyperlinkSegment getHyperlinkSettings equalsIgnoreCase processTextSegment expandURLs equalsIgnoreCase getNodeText fontId BOLD_FONT_ID parseRegularText expandURLs getHyperlinkSettings fontId equalsIgnoreCase BreakSegment addSegment
private boolean is Ignorable White Space String text boolean ignore Spaces for int i 0 i text length i char c text char At i if ignore Spaces c continue if c n c r c f continue return false return true  isIgnorableWhiteSpace ignoreSpaces charAt ignoreSpaces
private Paragraph Segment process Image Segment Node image Image Segment segment new Image Segment Named Node Map atts image get Attributes Node id atts get Named Item href Node align atts get Named Item align if id null String value id get Node Value segment set Object Id i value if align null String value align get Node Value to Lower Case if value equals top segment set Vertical Alignment Image Segment TOP else if value equals middle segment set Vertical Alignment Image Segment MIDDLE else if value equals bottom segment set Vertical Alignment Image Segment BOTTOM return segment  ParagraphSegment processImageSegment ImageSegment ImageSegment NamedNodeMap getAttributes getNamedItem getNamedItem getNodeValue setObjectId getNodeValue toLowerCase setVerticalAlignment ImageSegment setVerticalAlignment ImageSegment setVerticalAlignment ImageSegment
private void append Text String value String Buffer buf int space Counter if whitespace Normalized buf append value else for int j 0 j value length j char c value char At j if c c t space if space Counter 0 1 buf append c else if c n c r c f new line if space Counter 0 1 buf append else other characters space Counter 0 0 buf append c  appendText StringBuffer spaceCounter whitespaceNormalized charAt spaceCounter spaceCounter spaceCounter
private String get Normalized Text String text int space Counter new int 1 String Buffer buf new String Buffer if text null return null append Text text buf space Counter return buf to String  getNormalizedText spaceCounter StringBuffer StringBuffer appendText spaceCounter toString
private String get Single Node Text Node node return get Normalized Text node get Node Value  getSingleNodeText getNormalizedText getNodeValue
private String get Node Text Node node Node List children node get Child Nodes String Buffer buf new String Buffer int space Counter new int 1 for int i 0 i children get Length i Node child children item i if child get Node Type Node TEXT NODE String value child get Node Value append Text value buf space Counter return buf to String trim  getNodeText NodeList getChildNodes StringBuffer StringBuffer spaceCounter getLength getNodeType TEXT_NODE getNodeValue appendText spaceCounter toString
private Paragraph Segment process Hyperlink Segment Node link Hyperlink Settings settings String text get Node Text link Hyperlink Segment segment new Hyperlink Segment text settings null Named Node Map atts link get Attributes Node href atts get Named Item href if href null String value href get Node Value segment set Href value Node nowrap atts get Named Item nowrap if nowrap null String value nowrap get Node Value if value null value equals Ignore Case true segment set Word Wrap Allowed false return segment  ParagraphSegment processHyperlinkSegment HyperlinkSettings getNodeText HyperlinkSegment HyperlinkSegment NamedNodeMap getAttributes getNamedItem getNodeValue setHref getNamedItem getNodeValue equalsIgnoreCase setWordWrapAllowed
private void process Text Segment Paragraph p boolean expandUR Ls Node text Node String text get Node Text text Node Named Node Map atts text Node get Attributes Node font atts get Named Item font Node color atts get Named Item color String font Id null String color Id null if font null font Id f font get Node Value if color null color Id c color get Node Value p parse Regular Text text expandUR Ls get Hyperlink Settings font Id color Id  processTextSegment expandURLs textNode getNodeText textNode NamedNodeMap textNode getAttributes getNamedItem getNamedItem fontId colorId fontId getNodeValue colorId getNodeValue parseRegularText expandURLs getHyperlinkSettings fontId colorId
public void parse Regular Text String regular Text boolean convertUR Ls reset if regular Text null return regular Text get Normalized Text regular Text Paragraph p new Paragraph true paragraphs add p int pstart 0 for int i 0 i regular Text length i char c regular Text char At i if p null p new Paragraph true paragraphs add p if c n String text regular Text substring pstart i pstart i 1 p parse Regular Text text convertUR Ls get Hyperlink Settings null p null if p null no new line String text regular Text substring pstart p parse Regular Text text convertUR Ls get Hyperlink Settings null  parseRegularText regularText convertURLs regularText regularText getNormalizedText regularText regularText regularText charAt regularText parseRegularText convertURLs getHyperlinkSettings regularText parseRegularText convertURLs getHyperlinkSettings
public Hyperlink Settings get Hyperlink Settings return hyperlink Settings  HyperlinkSettings getHyperlinkSettings hyperlinkSettings
public void set Hyperlink Settings Hyperlink Settings settings this hyperlink Settings settings  setHyperlinkSettings HyperlinkSettings hyperlinkSettings
private void reset if paragraphs null paragraphs new Vector paragraphs clear selected Link Index 1 hyperlinks null  selectedLinkIndex
Hyperlink Segment get Hyperlinks if hyperlinks null paragraphs null return hyperlinks Vector result new Vector for int i 0 i paragraphs size i Paragraph p Paragraph paragraphs get i Paragraph Segment segments p get Segments for int j 0 j segments length j if segments j instanceof Hyperlink Segment result add segments j hyperlinks Hyperlink Segment result to Array new Hyperlink Segment result size return hyperlinks  HyperlinkSegment getHyperlinks ParagraphSegment getSegments HyperlinkSegment HyperlinkSegment toArray HyperlinkSegment
public Hyperlink Segment find Hyperlink At int x int y Hyperlink Segment links get Hyperlinks for int i 0 i links length i if links i contains x y return links i return null  HyperlinkSegment findHyperlinkAt HyperlinkSegment getHyperlinks
public Text Segment find Segment At int x int y for int i 0 i paragraphs size i Paragraph p Paragraph paragraphs get i Text Segment segment p find Segment At x y if segment null return segment return null  TextSegment findSegmentAt TextSegment findSegmentAt
public Hyperlink Segment get Selected Link if selected Link Index 1 return null return hyperlinks selected Link Index  HyperlinkSegment getSelectedLink selectedLinkIndex selectedLinkIndex
public boolean traverse Links boolean next Hyperlink Segment links get Hyperlinks if links null return false int size links length if next selected Link Index else selected Link Index if selected Link Index 0 selected Link Index size 1 selected Link Index 1 return selected Link Index 1  traverseLinks HyperlinkSegment getHyperlinks selectedLinkIndex selectedLinkIndex selectedLinkIndex selectedLinkIndex selectedLinkIndex selectedLinkIndex
public void select Link Hyperlink Segment link if link null selected Link Index 1 else Hyperlink Segment links get Hyperlinks selected Link Index 1 if links null return for int i 0 i links length i if links i equals link selected Link Index i break  selectLink HyperlinkSegment selectedLinkIndex HyperlinkSegment getHyperlinks selectedLinkIndex selectedLinkIndex
public boolean has Focus Segments Hyperlink Segment links get Hyperlinks if links length 0 return true return false  hasFocusSegments HyperlinkSegment getHyperlinks
public void dispose paragraphs null selected Link Index 1 hyperlinks null  selectedLinkIndex
return Returns the whitespace Normalized public boolean is Whitespace Normalized return whitespace Normalized  whitespaceNormalized isWhitespaceNormalized whitespaceNormalized
param whitespace Normalized The whitespace Normalized to set public void set Whitespace Normalized boolean whitespace Normalized this whitespace Normalized whitespace Normalized  whitespaceNormalized whitespaceNormalized setWhitespaceNormalized whitespaceNormalized whitespaceNormalized whitespaceNormalized

public static Text create Text Composite parent String label Form Toolkit factory return create Text parent label factory 1  createText FormToolkit createText
public static Text create Text Composite parent String label Form Toolkit factory int span factory create Label parent label Text text factory create Text parent int hfill span 1 Grid Data FILL HORIZONTAL Grid Data HORIZONTAL ALIGN FILL Grid Data gd new Grid Data hfill Grid Data VERTICAL ALIGN CENTER gd horizontal Span span text set Layout Data gd return text  createText FormToolkit createLabel createText GridData FILL_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL GridData GridData GridData VERTICAL_ALIGN_CENTER horizontalSpan setLayoutData
public static Text create Text Composite parent String label Form Toolkit factory int span int style Label l factory create Label parent label if style SWT MULTI 0 Grid Data gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING l set Layout Data gd Text text factory create Text parent style int hfill span 1 Grid Data FILL HORIZONTAL Grid Data HORIZONTAL ALIGN FILL Grid Data gd new Grid Data hfill Grid Data VERTICAL ALIGN CENTER gd horizontal Span span text set Layout Data gd return text  createText FormToolkit createLabel GridData GridData GridData VERTICAL_ALIGN_BEGINNING setLayoutData createText GridData FILL_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL GridData GridData GridData VERTICAL_ALIGN_CENTER horizontalSpan setLayoutData
public static Text create Text Composite parent Form Toolkit factory int span Text text factory create Text parent int hfill span 1 Grid Data FILL HORIZONTAL Grid Data HORIZONTAL ALIGN FILL Grid Data gd new Grid Data hfill Grid Data VERTICAL ALIGN CENTER gd horizontal Span span text set Layout Data gd return text  createText FormToolkit createText GridData FILL_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL GridData GridData GridData VERTICAL_ALIGN_CENTER horizontalSpan setLayoutData
public static int compute Minimum Width GC gc String text Break Iterator wb Break Iterator get Word Instance wb set Text text int last 0 int width 0 for int loc wb first loc Break Iterator DONE loc wb next String word text substring last loc Point extent gc text Extent word width Math max width extent x last loc return width  computeMinimumWidth BreakIterator BreakIterator getWordInstance setText BreakIterator textExtent
public static Point compute Wrap Size GC gc String text int w Hint Break Iterator wb Break Iterator get Word Instance wb set Text text Font Metrics fm gc get Font Metrics int line Height fm get Height int saved 0 int last 0 int height line Height int max Width 0 for int loc wb first loc Break Iterator DONE loc wb next String word text substring saved loc Point extent gc text Extent word max Width Math max max Width extent x if extent x w Hint overflow saved last height extent y last loc return new Point max Width height  computeWrapSize wHint BreakIterator BreakIterator getWordInstance setText FontMetrics getFontMetrics lineHeight getHeight lineHeight maxWidth BreakIterator textExtent maxWidth maxWidth wHint maxWidth
public static void paint Wrap Text GC gc String text Rectangle bounds paint Wrap Text gc text bounds false  paintWrapText paintWrapText
public static void paint Wrap Text GC gc String text Rectangle bounds boolean underline Break Iterator wb Break Iterator get Word Instance wb set Text text Font Metrics fm gc get Font Metrics int line Height fm get Height int descent fm get Descent int saved 0 int last 0 int y bounds y int width bounds width for int loc wb first loc Break Iterator DONE loc wb next String line text substring saved loc Point extent gc text Extent line if extent x width overflow String prev Line text substring saved last gc draw Text prev Line bounds x y true if underline Point prev Extent gc text Extent prev Line int lineY y line Height descent 1 gc draw Line bounds x lineY bounds x prev Extent x lineY saved last y line Height last loc paint the last line String last Line text substring saved last gc draw Text last Line bounds x y true if underline int lineY y line Height descent 1 Point last Extent gc text Extent last Line gc draw Line bounds x lineY bounds x last Extent x lineY  paintWrapText BreakIterator BreakIterator getWordInstance setText FontMetrics getFontMetrics lineHeight getHeight getDescent BreakIterator textExtent prevLine drawText prevLine prevExtent textExtent prevLine lineHeight drawLine prevExtent lineHeight lastLine drawText lastLine lineHeight lastExtent textExtent lastLine drawLine lastExtent
public static Scrolled Composite get Scrolled Composite Control c Composite parent c get Parent while parent null if parent instanceof Scrolled Composite return Scrolled Composite parent parent parent get Parent return null  ScrolledComposite getScrolledComposite getParent ScrolledComposite ScrolledComposite getParent
public static void ensure Visible Control c Scrolled Composite scomp get Scrolled Composite c if scomp null Form Util ensure Visible scomp c  ensureVisible ScrolledComposite getScrolledComposite FormUtil ensureVisible
public static void ensure Visible Scrolled Composite scomp Control control Point control Size control get Size Point control Origin get Control Location scomp control ensure Visible scomp control Origin control Size  ensureVisible ScrolledComposite controlSize getSize controlOrigin getControlLocation ensureVisible controlOrigin controlSize
public static void ensure Visible Scrolled Composite scomp Point control Origin Point control Size Rectangle area scomp get Client Area Point scomp Origin scomp get Origin int x scomp Origin x int y scomp Origin y System out println Ensure area area origin scomp Origin cloc control Origin csize control Size x x y y horizontal right if control Origin x control Size x scomp Origin x area width x control Origin x control Size x area width horizontal left else if control Origin x x x control Origin x vertical bottom if control Origin y control Size y scomp Origin y area height y control Origin y control Size y area height vertical top else if control Origin y y y control Origin y if scomp Origin x x scomp Origin y y scroll to reveal scomp set Origin x y  ensureVisible ScrolledComposite controlOrigin controlSize getClientArea scompOrigin getOrigin scompOrigin scompOrigin scompOrigin controlOrigin controlSize controlOrigin controlSize scompOrigin controlOrigin controlSize controlOrigin controlOrigin controlOrigin controlSize scompOrigin controlOrigin controlSize controlOrigin controlOrigin scompOrigin scompOrigin setOrigin
public static Point get Control Location Scrolled Composite scomp Control control int x 0 int y 0 Control content scomp get Content Control current Control control for if current Control content break Point location current Control get Location if location x 0 x location x if location y 0 y location y x location x y location y current Control current Control get Parent return new Point x y  getControlLocation ScrolledComposite getContent currentControl currentControl currentControl getLocation currentControl currentControl getParent
static void scroll Vertical Scrolled Composite scomp boolean up scroll scomp 0 up V SCROLL INCREMENT V SCROLL INCREMENT  scrollVertical ScrolledComposite V_SCROLL_INCREMENT V_SCROLL_INCREMENT
scroll scomp 0 up V SCROLL INCREMENT V SCROLL INCREMENT static void scroll Horizontal Scrolled Composite scomp boolean left scroll scomp left H SCROLL INCREMENT H SCROLL INCREMENT 0  V_SCROLL_INCREMENT V_SCROLL_INCREMENT scrollHorizontal ScrolledComposite H_SCROLL_INCREMENT H_SCROLL_INCREMENT
static void scroll Page Scrolled Composite scomp boolean up Rectangle client Area scomp get Client Area int increment up client Area height client Area height scroll scomp 0 increment  scrollPage ScrolledComposite clientArea getClientArea clientArea clientArea
static void scroll Scrolled Composite scomp int xoffset int yoffset Point origin scomp get Origin Point content Size scomp get Content get Size int xorigin origin x xoffset int yorigin origin y yoffset xorigin Math max xorigin 0 xorigin Math min xorigin content Size x 1 yorigin Math max yorigin 0 yorigin Math min yorigin content Size y 1 scomp set Origin xorigin yorigin  ScrolledComposite getOrigin contentSize getContent getSize contentSize contentSize setOrigin
public static void update Page Increment Scrolled Composite scomp Scroll Bar vbar scomp get Vertical Bar if vbar null Rectangle client Area scomp get Client Area int increment client Area height 5 vbar set Page Increment increment  updatePageIncrement ScrolledComposite ScrollBar getVerticalBar clientArea getClientArea clientArea setPageIncrement
public static void process Key int key Code Control c Scrolled Composite scomp Form Util get Scrolled Composite c if scomp null if c instanceof Combo return switch key Code case SWT ARROW DOWN Form Util scroll Vertical scomp false break case SWT ARROW UP Form Util scroll Vertical scomp true break case SWT ARROW LEFT Form Util scroll Horizontal scomp true break case SWT ARROW RIGHT Form Util scroll Horizontal scomp false break case SWT PAGE UP Form Util scroll Page scomp true break case SWT PAGE DOWN Form Util scroll Page scomp false break  processKey keyCode ScrolledComposite FormUtil getScrolledComposite keyCode ARROW_DOWN FormUtil scrollVertical ARROW_UP FormUtil scrollVertical ARROW_LEFT FormUtil scrollHorizontal ARROW_RIGHT FormUtil scrollHorizontal PAGE_UP FormUtil scrollPage PAGE_DOWN FormUtil scrollPage
static boolean is Wrap Control Control c if c instanceof Composite return Composite c get Layout instanceof I Layout Extension else return c get Style SWT WRAP 0  isWrapControl getLayout ILayoutExtension getStyle
public static int get Width Hint int w Hint Control c boolean wrap is Wrap Control c return wrap w Hint SWT DEFAULT  getWidthHint wHint isWrapControl wHint
public static int get Height Hint int h Hint Control c if c instanceof Composite Layout layout Composite c get Layout if layout instanceof Column Layout return h Hint return SWT DEFAULT  getHeightHint hHint getLayout ColumnLayout hHint
public static int compute Minimum Width Control c boolean changed if c instanceof Composite Layout layout Composite c get Layout if layout instanceof I Layout Extension return I Layout Extension layout compute Minimum Width Composite c changed return c compute Size Form Util get Width Hint 5 c SWT DEFAULT changed x  computeMinimumWidth getLayout ILayoutExtension ILayoutExtension computeMinimumWidth computeSize FormUtil getWidthHint
public static int compute Maximum Width Control c boolean changed if c instanceof Composite Layout layout Composite c get Layout if layout instanceof I Layout Extension return I Layout Extension layout compute Maximum Width Composite c changed return c compute Size SWT DEFAULT SWT DEFAULT changed x  computeMaximumWidth getLayout ILayoutExtension ILayoutExtension computeMaximumWidth computeSize

public Hyperlink Segment String text Hyperlink Settings settings String font Id super text font Id this settings settings underline settings get Hyperlink Underline Mode Hyperlink Settings UNDERLINE ALWAYS  HyperlinkSegment HyperlinkSettings fontId fontId getHyperlinkUnderlineMode HyperlinkSettings UNDERLINE_ALWAYS
see I Object Reference get Object Id public String get Href return href  IObjectReference getObjectId getHref
void set Href String href this href href  setHref
public void paint GC gc int width Locator locator Hashtable resource Table boolean selected resource Table put LINK FG settings get Foreground set Color Id LINK FG super paint gc width locator resource Table selected  resourceTable resourceTable LINK_FG getForeground setColorId LINK_FG resourceTable
public void repaint GC gc boolean hover Font Metrics fm gc get Font Metrics int line Height fm get Height int descent fm get Descent boolean rollover Mode settings get Hyperlink Underline Mode Hyperlink Settings UNDERLINE HOVER for int i 0 i area Rectangles size i Area Rectangle area Rectangle Area Rectangle area Rectangles get i Rectangle rect area Rectangle rect String text area Rectangle get Text Point extent gc text Extent text int textX rect x 1 gc draw String text textX rect y false if underline hover rollover Mode int lineY rect y line Height descent 1 Color saved null if rollover Mode hover saved gc get Foreground gc set Foreground gc get Background gc draw Line textX lineY textX extent x lineY if saved null gc set Foreground saved  FontMetrics getFontMetrics lineHeight getHeight getDescent rolloverMode getHyperlinkUnderlineMode HyperlinkSettings UNDERLINE_HOVER areaRectangles AreaRectangle areaRectangle AreaRectangle areaRectangles areaRectangle areaRectangle getText textExtent drawString rolloverMode lineHeight rolloverMode getForeground setForeground getBackground drawLine setForeground

private String image Id public int get Vertical Alignment return alignment  imageId getVerticalAlignment
void set Vertical Alignment int alignment this alignment alignment  setVerticalAlignment
public Image get Image Hashtable object Table if image Id null return null Object obj object Table get image Id if obj null return null if obj instanceof Image return Image obj return null  getImage objectTable imageId objectTable imageId
public String get Object Id return image Id  getObjectId imageId
void set Object Id String image Id this image Id image Id  setObjectId imageId imageId imageId
public boolean advance Locator GC gc int w Hint Locator loc Hashtable object Table boolean compute Height Only Image image get Image object Table int iwidth 0 int iheight 0 boolean new Line false if image null Rectangle rect image get Bounds iwidth rect width iheight rect height if w Hint SWT DEFAULT loc x iwidth w Hint new line loc x loc indent iwidth loc width loc x loc y loc row Height if compute Height Only loc collect Heights true loc row Height iheight loc leading 0 new Line true else loc x iwidth loc row Height Math max loc row Height iheight return new Line  advanceLocator wHint objectTable computeHeightOnly getImage objectTable newLine getBounds wHint wHint rowHeight computeHeightOnly collectHeights rowHeight newLine rowHeight rowHeight newLine
public void paint GC gc int width Locator loc Hashtable resource Table boolean selected Image image get Image resource Table int iwidth 0 int iheight 0 if image null Rectangle rect image get Bounds iwidth rect width iheight rect height else return loc width iwidth loc height iheight if loc x iwidth width new row loc x loc indent loc margin Width loc y loc row Height loc row Height 0 loc row Counter int ix loc x int iy loc get Baseline iheight false gc draw Image image ix iy loc x iwidth loc row Height Math max loc row Height iheight  resourceTable getImage resourceTable getBounds marginWidth rowHeight rowHeight rowCounter getBaseline drawImage rowHeight rowHeight

public void new Line reset Caret y row Height row Height 0  newLine resetCaret rowHeight rowHeight
public Locator create try return Locator clone catch Clone Not Supported Exception e return null  CloneNotSupportedException
public void collect Heights boolean advance heights add new int row Height leading row Counter  collectHeights rowHeight rowCounter
row Counter public int get Baseline int segment Height return get Baseline segment Height true  rowCounter getBaseline segmentHeight getBaseline segmentHeight
public int get Baseline int segment Height boolean text if heights null heights size row Counter int rdata int heights get row Counter int rheight rdata 0 int rleading rdata 1 if text return y rheight segment Height rleading else return y rheight segment Height return y  getBaseline segmentHeight rowCounter rowCounter segmentHeight segmentHeight
public void reset Caret x margin Width indent  resetCaret marginWidth

private boolean add Vertical Space true public Paragraph boolean add Vertical Space this add Vertical Space add Vertical Space  addVerticalSpace addVerticalSpace addVerticalSpace addVerticalSpace
public int get Indent return 0  getIndent
public boolean get Add Vertical Space return add Vertical Space  getAddVerticalSpace addVerticalSpace
public Paragraph Segment get Segments if segments null return new Paragraph Segment 0 return Paragraph Segment segments to Array new Paragraph Segment segments size  ParagraphSegment getSegments ParagraphSegment ParagraphSegment toArray ParagraphSegment
public void add Segment Paragraph Segment segment if segments null segments new Vector segments add segment  addSegment ParagraphSegment
public void parse Regular Text String text boolean expandUR Ls Hyperlink Settings settings String font Id parse Regular Text text expandUR Ls settings font Id null  parseRegularText expandURLs HyperlinkSettings fontId parseRegularText expandURLs fontId
public void parse Regular Text String text boolean expandUR Ls Hyperlink Settings settings String font Id String color Id if text length 0 return if expandUR Ls int loc text index Of HTTP if loc 1 add Segment new Text Segment text font Id color Id else int text Loc 0 while loc 1 add Segment new Text Segment text substring text Loc loc font Id color Id boolean added false for text Loc loc text Loc text length text Loc char c text char At text Loc if Character is Space Char c add Hyperlink Segment text substring loc text Loc settings font Id added true break if added there was no space just end of text add Hyperlink Segment text substring loc settings font Id break loc text index Of HTTP text Loc if text Loc text length add Segment new Text Segment text substring text Loc font Id color Id else add Segment new Text Segment text font Id color Id  parseRegularText expandURLs HyperlinkSettings fontId colorId expandURLs indexOf addSegment TextSegment fontId colorId textLoc addSegment TextSegment textLoc fontId colorId textLoc textLoc textLoc charAt textLoc isSpaceChar addHyperlinkSegment textLoc fontId addHyperlinkSegment fontId indexOf textLoc textLoc addSegment TextSegment textLoc fontId colorId addSegment TextSegment fontId colorId
private void add Hyperlink Segment String text Hyperlink Settings settings String font Id Hyperlink Segment hs new Hyperlink Segment text settings font Id hs set Word Wrap Allowed false hs set Href text add Segment hs  addHyperlinkSegment HyperlinkSettings fontId HyperlinkSegment HyperlinkSegment fontId setWordWrapAllowed setHref addSegment
protected void compute Row Heights GC gc int width Locator loc int line Height Hashtable resource Table Paragraph Segment segments get Segments compute heights Locator hloc loc create Array List heights new Array List hloc heights heights hloc row Counter 0 for int j 0 j segments length j Paragraph Segment segment segments j segment advance Locator gc width hloc resource Table true hloc collect Heights false loc heights heights loc row Counter 0  computeRowHeights lineHeight resourceTable ParagraphSegment getSegments ArrayList ArrayList rowCounter ParagraphSegment advanceLocator resourceTable collectHeights rowCounter
public void paint GC gc int width Locator loc int line Height Hashtable resource Table Hyperlink Segment selected Link Paragraph Segment segments get Segments if segments length 0 if segments 0 instanceof Text Segment Text Segment segments 0 is Selectable loc x 1 compute heights if loc heights null compute Row Heights gc width loc line Height resource Table for int j 0 j segments length j Paragraph Segment segment segments j boolean do Select false if selected Link null segment equals selected Link do Select true segment paint gc width loc resource Table do Select loc heights null loc y loc row Height else loc y line Height  lineHeight resourceTable HyperlinkSegment selectedLink ParagraphSegment getSegments TextSegment TextSegment isSelectable computeRowHeights lineHeight resourceTable ParagraphSegment doSelect selectedLink selectedLink doSelect resourceTable doSelect rowHeight lineHeight
public String get Accessible Text Paragraph Segment segments get Segments String Writer swriter new String Writer Print Writer writer new Print Writer swriter for int i 0 i segments length i Paragraph Segment segment segments i if segment instanceof Text Segment String text Text Segment segment get Text writer print text writer println swriter flush return swriter to String  getAccessibleText ParagraphSegment getSegments StringWriter StringWriter PrintWriter PrintWriter ParagraphSegment TextSegment TextSegment getText toString
public Text Segment find Segment At int x int y if segments null for int i 0 i segments size i Paragraph Segment segment Paragraph Segment segments get i if segment instanceof Text Segment Text Segment text Segment Text Segment segment if text Segment contains x y return text Segment return null  TextSegment findSegmentAt ParagraphSegment ParagraphSegment TextSegment TextSegment textSegment TextSegment textSegment textSegment

public abstract class Paragraph Segment public abstract boolean advance Locator GC gc int w Hint Locator loc Hashtable object Table boolean compute Height Only  ParagraphSegment advanceLocator wHint objectTable computeHeightOnly
public abstract class Paragraph Segment public abstract boolean advance Locator GC gc int w Hint Locator loc Hashtable object Table boolean compute Height Only public abstract void paint GC gc int width Locator loc Hashtable resource Table boolean selected  ParagraphSegment advanceLocator wHint objectTable computeHeightOnly resourceTable

int from to public Area Rectangle Rectangle rect int from int to this rect rect this from from this to to  AreaRectangle
this to to public boolean contains int x int y return rect contains x y 
public String get Text if from 0 to 1 return Text Segment this get Text if from 0 to 1 return Text Segment this get Text substring from return Text Segment this get Text substring from to  getText TextSegment getText TextSegment getText TextSegment getText
public Text Segment String text String font Id this text font Id null  TextSegment fontId fontId
public Text Segment String text String font Id String color Id this text cleanup text this font Id font Id this color Id color Id  TextSegment fontId colorId fontId fontId colorId colorId
private String cleanup String text String Buffer buf new String Buffer for int i 0 i text length i char c text char At i if c n c r c f if i 0 buf append else buf append c return buf to String  StringBuffer StringBuffer charAt toString
public void set Word Wrap Allowed boolean value wrap Allowed value  setWordWrapAllowed wrapAllowed
public boolean is Word Wrap Allowed return wrap Allowed  isWordWrapAllowed wrapAllowed
public boolean is Selectable return false  isSelectable
public String get Color Id return color Id  getColorId colorId
public String get Text return text  getText
void set Text String text this text cleanup text  setText
void set Color Id String color Id this color Id color Id  setColorId colorId colorId colorId
void set Font Id String font Id this font Id font Id  setFontId fontId fontId fontId
public boolean contains int x int y for int i 0 i area Rectangles size i Area Rectangle ar Area Rectangle area Rectangles get i if ar contains x y return true return false  areaRectangles AreaRectangle AreaRectangle areaRectangles
public Rectangle get Bounds int x 0 y 0 int width 0 height 0 for int i 0 i area Rectangles size i Area Rectangle ar Area Rectangle area Rectangles get i if i 0 x ar rect x y ar rect y else x Math min ar rect x x width Math max ar rect width width height ar rect height return new Rectangle x y width height  getBounds areaRectangles AreaRectangle AreaRectangle areaRectangles
public boolean advance Locator GC gc int w Hint Locator locator Hashtable object Table boolean compute Height Only Font old Font null if font Id null old Font gc get Font Font new Font Font object Table get font Id if new Font null gc set Font new Font Font Metrics fm gc get Font Metrics int line Height fm get Height boolean new Line false if w Hint SWT DEFAULT wrap Allowed Point extent gc text Extent text if w Hint SWT DEFAULT locator x extent x w Hint new line locator x is Selectable locator indent 1 locator indent locator y locator row Height if compute Height Only locator collect Heights true locator row Height 0 locator leading 0 new Line true int width extent x if is Selectable width 2 locator x width locator width width locator height extent y locator row Height Math max locator row Height extent y locator leading Math max locator leading fm get Leading return new Line Break Iterator wb Break Iterator get Line Instance wb set Text text int saved 0 int last 0 int width 0 Point last Extent null for int loc wb first loc Break Iterator DONE loc wb next String word text substring saved loc Point extent gc text Extent word if locator x extent x w Hint overflow String saved Word text substring saved last if last Extent null last Extent gc text Extent saved Word int line Width locator x last Extent x if is Selectable line Width 2 saved last locator row Height Math max locator row Height last Extent y locator leading Math max locator leading fm get Leading if compute Height Only locator collect Heights true locator x is Selectable locator indent 1 locator indent locator y locator row Height locator row Height 0 locator leading 0 width Math max width line Width new Line true last loc last Extent extent String last String text substring saved last Point extent gc text Extent last String int line Width extent x if is Selectable line Width 2 locator x line Width locator width width locator height line Height locator row Height Math max locator row Height extent y locator leading Math max locator leading fm get Leading if old Font null gc set Font old Font return new Line  advanceLocator wHint objectTable computeHeightOnly oldFont fontId oldFont getFont newFont objectTable fontId newFont setFont newFont FontMetrics getFontMetrics lineHeight getHeight newLine wHint wrapAllowed textExtent wHint wHint isSelectable rowHeight computeHeightOnly collectHeights rowHeight newLine isSelectable rowHeight rowHeight getLeading newLine BreakIterator BreakIterator getLineInstance setText lastExtent BreakIterator textExtent wHint savedWord lastExtent lastExtent textExtent savedWord lineWidth lastExtent isSelectable lineWidth rowHeight rowHeight lastExtent getLeading computeHeightOnly collectHeights isSelectable rowHeight rowHeight lineWidth newLine lastExtent lastString textExtent lastString lineWidth isSelectable lineWidth lineWidth lineHeight rowHeight rowHeight getLeading oldFont setFont oldFont newLine
public void paint GC gc int width Locator locator Hashtable resource Table boolean selected Font old Font null Color old Color null area Rectangles clear if font Id null old Font gc get Font Font new Font Font resource Table get font Id if new Font null gc set Font new Font if color Id null old Color gc get Foreground Color new Color Color resource Table get color Id if new Color null gc set Foreground new Color Font Metrics fm gc get Font Metrics int line Height fm get Height int descent fm get Descent if wrap Allowed Point extent gc text Extent text int ewidth extent x if is Selectable ewidth 2 if locator x ewidth width new line locator reset Caret if is Selectable locator x 1 locator y locator row Height locator row Height 0 locator row Counter int ly locator get Baseline fm get Height fm get Leading gc draw String text locator x ly if underline int lineY ly line Height descent 1 gc draw Line locator x lineY locator x extent x lineY Rectangle br new Rectangle locator x 1 ly extent x 2 line Height descent 3 area Rectangles add new Area Rectangle br 0 1 if selected if color Id null gc set Foreground old Color gc draw Focus br x br y br width br height locator x ewidth locator width ewidth locator height line Height locator row Height Math max locator row Height extent y if old Font null gc set Font old Font if old Color null gc set Foreground old Color return Break Iterator wb Break Iterator get Line Instance wb set Text text int saved 0 int last 0 for int loc wb first loc Break Iterator DONE loc wb next if loc 0 continue String word text substring saved loc Point extent gc text Extent word int ewidth extent x if is Selectable ewidth 2 if locator x ewidth width overflow String prev Line text substring saved last int ly locator get Baseline line Height fm get Leading gc draw String prev Line locator x ly true Point prev Extent gc text Extent prev Line int prev Width prev Extent x if is Selectable prev Width 2 if underline int lineY ly line Height descent 1 gc draw Line locator x lineY locator x prev Width lineY Rectangle br new Rectangle locator x 1 ly prev Extent x 2 line Height descent 3 if selected if color Id null gc set Foreground old Color gc draw Focus br x br y br width br height Color new Color Color resource Table get color Id if new Color null gc set Foreground new Color area Rectangles add new Area Rectangle br saved last locator row Height Math max locator row Height prev Extent y locator reset Caret if is Selectable locator x 1 locator y locator row Height locator row Counter locator row Height 0 saved last last loc paint the last line String last Line text substring saved last int ly locator get Baseline line Height fm get Leading gc draw String last Line locator x ly true Point last Extent gc text Extent last Line int last Width last Extent x if is Selectable last Width 2 Rectangle br new Rectangle locator x 1 ly last Extent x 2 line Height descent 3 area Rectangles add new Area Rectangle br saved last if underline int lineY ly line Height descent 1 gc draw Line locator x lineY locator x last Extent x lineY if selected if color Id null gc set Foreground old Color gc draw Focus br x br y br width br height locator x last Width locator row Height Math max locator row Height last Extent y if old Font null gc set Font old Font if old Color null gc set Foreground old Color  resourceTable oldFont oldColor areaRectangles fontId oldFont getFont newFont resourceTable fontId newFont setFont newFont colorId oldColor getForeground newColor resourceTable colorId newColor setForeground newColor FontMetrics getFontMetrics lineHeight getHeight getDescent wrapAllowed textExtent isSelectable resetCaret isSelectable rowHeight rowHeight rowCounter getBaseline getHeight getLeading drawString lineHeight drawLine lineHeight areaRectangles AreaRectangle colorId setForeground oldColor drawFocus lineHeight rowHeight rowHeight oldFont setFont oldFont oldColor setForeground oldColor BreakIterator BreakIterator getLineInstance setText BreakIterator textExtent isSelectable prevLine getBaseline lineHeight getLeading drawString prevLine prevExtent textExtent prevLine prevWidth prevExtent isSelectable prevWidth lineHeight drawLine prevWidth prevExtent lineHeight colorId setForeground oldColor drawFocus newColor resourceTable colorId newColor setForeground newColor areaRectangles AreaRectangle rowHeight rowHeight prevExtent resetCaret isSelectable rowHeight rowCounter rowHeight lastLine getBaseline lineHeight getLeading drawString lastLine lastExtent textExtent lastLine lastWidth lastExtent isSelectable lastWidth lastExtent lineHeight areaRectangles AreaRectangle lineHeight drawLine lastExtent colorId setForeground oldColor drawFocus lastWidth rowHeight rowHeight lastExtent oldFont setFont oldFont oldColor setForeground oldColor
public void paint Focus GC gc Color bg Color fg boolean selected if area Rectangles null return for int i 0 i area Rectangles size i Area Rectangle area Rectangle Area Rectangle area Rectangles get i Rectangle br area Rectangle rect if selected gc set Background bg gc set Foreground fg gc draw Focus br x br y br width br height else gc set Foreground bg gc draw Rectangle br x br y br width 1 br height 1  paintFocus areaRectangles areaRectangles AreaRectangle areaRectangle AreaRectangle areaRectangles areaRectangle setBackground setForeground drawFocus setForeground drawRectangle

class Page Book Layout extends Layout implements I Layout Extension protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache if w Hint SWT DEFAULT h Hint SWT DEFAULT return new Point w Hint h Hint Point result null if current Page null result current Page compute Size w Hint h Hint flush Cache else result new Point 0 0 return result  PageBookLayout ILayoutExtension computeSize wHint hHint flushCache wHint hHint wHint hHint currentPage currentPage computeSize wHint hHint flushCache
protected void layout Composite composite boolean flush Cache if current Page null current Page set Bounds composite get Client Area  flushCache currentPage currentPage setBounds getClientArea
boolean public int compute Maximum Width Composite parent boolean changed return compute Size parent SWT DEFAULT SWT DEFAULT changed x  computeMaximumWidth computeSize
boolean public int compute Minimum Width Composite parent boolean changed return compute Size parent 0 SWT DEFAULT changed x  computeMinimumWidth computeSize
private Control current Page null Creates a new empty pagebook param parent the parent composite param style the SWT style bits public Wrapped Page Book Composite parent int style super parent style set Layout new Page Book Layout  currentPage WrappedPageBook setLayout PageBookLayout
Shows the given page This method has no effect if the given page is not contained in this pagebook param page the page to show public void show Page Control page if page current Page return if page get Parent this return Control old Page current Page current Page page show new page if page null if page is Disposed page set Visible true layout true page set Visible true hide old after new page has been made visible in order to avoid flashing if old Page null old Page is Disposed old Page set Visible false  showPage currentPage getParent oldPage currentPage currentPage isDisposed setVisible setVisible oldPage oldPage isDisposed oldPage setVisible
old Page set Visible false public Point compute Size int w Hint int h Hint boolean changed return Page Book Layout get Layout compute Size this w Hint h Hint changed  oldPage setVisible computeSize wHint hHint PageBookLayout getLayout computeSize wHint hHint

public class Wizard Form extends Managed Form param parent public Wizard Form Wizard Page page Composite parent super parent set Container page  WizardForm ManagedForm WizardForm WizardPage setContainer
param toolkit param form public Wizard Form Wizard Page page Form Toolkit toolkit Scrolled Form form super toolkit form set Container page  WizardForm WizardPage FormToolkit ScrolledForm setContainer
set Container page public Wizard Page get Page return Wizard Page get Container  setContainer WizardPage getPage WizardPage getContainer

private Mouse Listener mouse Listener new Mouse Listener public void mouse Double Click Mouse Event mouse Event  MouseListener mouseListener MouseListener mouseDoubleClick MouseEvent mouseEvent
public void mouse Down Mouse Event mouse Event if capturing capturing true data mouse Event state Mask pen mouse Event button points clear points add new Point mouse Event x mouse Event y control add Mouse Move Listener mouse Move Listener  mouseDown MouseEvent mouseEvent mouseEvent stateMask mouseEvent mouseEvent mouseEvent addMouseMoveListener mouseMoveListener
public void mouse Up Mouse Event mouse Event if capturing mouse Event button pen control remove Mouse Move Listener mouse Move Listener points add new Point mouse Event x mouse Event y Capture Event capture Event Capture Event create data pen Point points to Array new Point points size capturing false data 0 pen 0 points clear Iterator iterator capture Listeners iterator while iterator has Next I Capture Listener iterator next capture capture Event  mouseUp MouseEvent mouseEvent mouseEvent removeMouseMoveListener mouseMoveListener mouseEvent mouseEvent CaptureEvent captureEvent CaptureEvent toArray captureListeners hasNext ICaptureListener captureEvent
private Mouse Move Listener mouse Move Listener new Mouse Move Listener public void mouse Move Mouse Event mouse Event if capturing points add new Point mouse Event x mouse Event y  MouseMoveListener mouseMoveListener MouseMoveListener mouseMove MouseEvent mouseEvent mouseEvent mouseEvent
private List points new Array List public Capture  ArrayList
public void add Capture Listener I Capture Listener capture Listener if capture Listener null throw new Null Pointer Exception if capture Listeners null capture Listeners new Array List if capture Listeners contains capture Listener capture Listeners add capture Listener  addCaptureListener ICaptureListener captureListener captureListener NullPointerException captureListeners captureListeners ArrayList captureListeners captureListener captureListeners captureListener
public Control get Control return control  getControl
public void remove Capture Listener I Capture Listener capture Listener if capture Listener null throw new Null Pointer Exception if capture Listeners null capture Listeners remove capture Listener  removeCaptureListener ICaptureListener captureListener captureListener NullPointerException captureListeners captureListeners captureListener
public void set Control Control control if this control control if this control null control remove Mouse Move Listener mouse Move Listener control remove Mouse Listener mouse Listener this control control capturing false data 0 pen 0 points clear if this control null control add Mouse Listener mouse Listener  setControl removeMouseMoveListener mouseMoveListener removeMouseListener mouseListener addMouseListener mouseListener

Capture Event class get Name hash Code public static Capture Event create int data int pen Point points return new Capture Event data pen points  CaptureEvent getName hashCode CaptureEvent CaptureEvent
private Capture Event int data int pen Point points super this data data this pen pen if points null throw new Null Pointer Exception points Point points clone for int i 0 i points length i if points i null throw new Illegal Argument Exception this points points  CaptureEvent NullPointerException IllegalArgumentException
public int compare To Object object Capture Event casted Object Capture Event object int compare To data casted Object data if compare To 0 compare To pen casted Object pen if compare To 0 compare To Util compare points casted Object points return compare To  compareTo CaptureEvent castedObject CaptureEvent compareTo castedObject compareTo compareTo castedObject compareTo compareTo castedObject compareTo
public boolean equals Object object if object instanceof Capture Event return false Capture Event casted Object Capture Event object return data casted Object data pen casted Object pen Arrays equals points casted Object points  CaptureEvent CaptureEvent castedObject CaptureEvent castedObject castedObject castedObject
public int get Data return data  getData
public int get Pen return pen  getPen
public Point get Points return Point points clone  getPoints
public int hash Code int result HASH INITIAL result result HASH FACTOR data result result HASH FACTOR pen for int i 0 i points length i result result HASH FACTOR points i hash Code return result  hashCode HASH_INITIAL HASH_FACTOR HASH_FACTOR HASH_FACTOR hashCode

capture add Capture Listener new I Capture Listener public void capture Capture Event capture Event System out println Pen capture Event get Pen NON NLS 1 Key Stroke SWT Key Support convert Accelerator To Key Stroke capture Event get Data NON NLS 1 Points capture Event get Points length NON NLS 1 Gesture recognize capture Event get Points 20 NON NLS 1  addCaptureListener ICaptureListener CaptureEvent captureEvent captureEvent getPen SWTKeySupport convertAcceleratorToKeyStroke captureEvent getData captureEvent getPoints captureEvent getPoints
public static void main String args final int HEIGHT 300 final int WIDTH 400 Display display new Display Rectangle bounds display get Bounds Shell shell new Shell display if bounds height HEIGHT bounds width WIDTH shell set Bounds bounds x bounds width WIDTH 2 bounds y bounds height HEIGHT 2 WIDTH HEIGHT shell set Text Gesture Support class get Name shell open Capture capture new Capture capture add Capture Listener new I Capture Listener public void capture Capture Event capture Event System out println Pen capture Event get Pen NON NLS 1 Key Stroke SWT Key Support convert Accelerator To Key Stroke capture Event get Data NON NLS 1 Points capture Event get Points length NON NLS 1 Gesture recognize capture Event get Points 20 NON NLS 1 capture set Control shell while shell is Disposed if display read And Dispatch display sleep display dispose  getBounds setBounds setText GestureSupport getName addCaptureListener ICaptureListener CaptureEvent captureEvent captureEvent getPen SWTKeySupport convertAcceleratorToKeyStroke captureEvent getData captureEvent getPoints captureEvent getPoints setControl isDisposed readAndDispatch
public static String recognize Point points int sensitivity char stroke 0 String Buffer sequence new String Buffer int x0 0 int y0 0 for int i 0 i points length i Point point points i if i 0 x0 point getX y0 point getY continue int x1 point getX int y1 point getY int dx x1 x0 sensitivity int dy y1 y0 sensitivity if dx 0 dy 0 if dx 0 stroke E sequence append stroke E else if dx 0 stroke W sequence append stroke W else if dy 0 stroke S sequence append stroke S else if dy 0 stroke N sequence append stroke N x0 x1 y0 y1 return sequence to String  StringBuffer StringBuffer toString
private Gesture Support  GestureSupport

public interface I Capture Listener void capture Capture Event capture Event  ICaptureListener CaptureEvent captureEvent

private int y public Point int x int y this x x this y y 
public int compare To Object object Point casted Object Point object int compare To x casted Object x if compare To 0 compare To y casted Object y return compare To  compareTo castedObject compareTo castedObject compareTo compareTo castedObject compareTo
public boolean equals Object object if object instanceof Point return false Point casted Object Point object boolean equals true equals x casted Object x equals y casted Object y return equals  castedObject castedObject castedObject
public int getX return x 
public int getY return y 
public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR x hash Code hash Code HASH FACTOR y hash Code Computed true return hash Code  hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode hashCode HASH_FACTOR hashCodeComputed hashCode
public String to String if string null final String Buffer string Buffer new String Buffer string Buffer append string Buffer append x string Buffer append string Buffer append y string Buffer append string string Buffer to String return string  toString StringBuffer stringBuffer StringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer stringBuffer toString

public interface I Action Set Contribution Item Returns the action set id public String get Action Set Id  IActionSetContributionItem getActionSetId
public String get Action Set Id Sets the action set id public void set Action Set Id String new Action Set Id  getActionSetId setActionSetId newActionSetId

public interface I Change Listener Called with false when the listener is first attached to the model and called with true every time the model s state changes  IChangeListener

public interface I Compatible Workbench Page Opens an editor on the given file resource p If this page already has an editor open on the target object that editor is activated otherwise a new editor is opened p p An appropriate editor for the input is determined using a multistep process p ol li The workbench editor registry is consulted to determine if an editor extension has been registered for the file type If so an instance of the editor extension is opened on the file See code I Editor Registry get Default Editor I File code li Next the native operating system will be consulted to determine if a native editor exists for the file type If so a new process is started and the native editor is opened on the file li If all else fails the file will be opened in a default text editor li ol p param input the file to edit return an open and active editor or code null code if a system editor was opened exception Part Init Exception if the editor could not be initialized deprecated In 3 0 this resource specific method moved from this interface to code org eclipse ui ide IDE open Editor I Workbench Page I File code This method should not be referenced at development time See the class comment for more details  ICompatibleWorkbenchPage IEditorRegistry getDefaultEditor IFile PartInitException openEditor IWorkbenchPage IFile
Opens an editor on the given file resource p If this page already has an editor open on the target object that editor is brought to front otherwise a new editor is opened If code activate true code the editor will be activated p p The editor type is determined by mapping code editor Id code to an editor extension registered with the workbench An editor id is passed rather than an editor object to prevent the accidental creation of more than one editor for the same input It also guarantees a consistent lifecycle for editors regardless of whether they are created by the user or restored from saved data p param input the file to edit param editor Id the id of the editor extension to use or null param activate if code true code the editor will be activated return an open and active editor exception Part Init Exception if the editor could not be initialized deprecated In 3 0 this resource specific method moved from this interface to code org eclipse ui ide IDE open Editor I Workbench Page I File String boolean code This method should not be referenced at development time See the class comment for more details public I Editor Part open Editor I File input String editor Id boolean activate  editorId editorId PartInitException openEditor IWorkbenchPage IFile IEditorPart openEditor IFile editorId
Opens an editor on the given file resource p If this page already has an editor open on the target object that editor is activated otherwise a new editor is opened p p The editor type is determined by mapping code editor Id code to an editor extension registered with the workbench An editor id is passed rather than an editor object to prevent the accidental creation of more than one editor for the same input It also guarantees a consistent lifecycle for editors regardless of whether they are created by the user or restored from saved data p param editor Id the id of the editor extension to use param input the file to edit return an open and active editor exception Part Init Exception if the editor could not be initialized deprecated In 3 0 this resource specific method moved from this interface to code org eclipse ui ide IDE open Editor I Workbench Page I File String code This method should not be referenced at development time See the class comment for more details public I Editor Part open Editor I File input String editor Id  editorId editorId PartInitException openEditor IWorkbenchPage IFile IEditorPart openEditor IFile editorId
Opens an editor on the file resource of the given marker p If this page already has an editor open on the target object that editor is activated otherwise a new editor is opened The cursor and selection state of the editor is then updated from information recorded in the marker p p If the marker contains an code EDITOR ID ATTR code attribute the attribute value will be used to determine the editor type to be opened If not the registered editor for the marker resource will be used p param marker the marker to open return an open and active editor or null if a system editor was opened exception Part Init Exception if the editor could not be initialized see I Editor Part goto Marker deprecated In 3 0 this resource specific method moved from this interface to code org eclipse ui ide IDE open Editor I Workbench Page I Marker code This method should not be referenced at development time See the class comment for more details  EDITOR_ID_ATTR PartInitException IEditorPart gotoMarker openEditor IWorkbenchPage IMarker
Opens an editor on the file resource of the given marker p If this page already has an editor open on the target object that editor is brought to front otherwise a new editor is opened If code activate true code the editor will be activated The cursor and selection state of the editor are then updated from information recorded in the marker p p If the marker contains an code EDITOR ID ATTR code attribute the attribute value will be used to determine the editor type to be opened If not the registered editor for the marker resource will be used p param marker the marker to open param activate if code true code the editor will be activated return an open editor or null if a system editor was opened exception Part Init Exception if the editor could not be initialized see I Editor Part goto Marker deprecated In 3 0 this resource specific method moved from this interface to code org eclipse ui ide IDE open Editor I Workbench Page I Marker boolean code This method should not be referenced at development time See the class comment for more details public I Editor Part open Editor I Marker marker boolean activate  EDITOR_ID_ATTR PartInitException IEditorPart gotoMarker openEditor IWorkbenchPage IMarker IEditorPart openEditor IMarker
Opens an operating system editor on a given file Once open the workbench has no knowledge of the editor or the state of the file being edited Users are expected to perform a Local Refresh from the workbench user interface param input the file to edit exception Part Init Exception if the editor could not be opened deprecated In 3 0 this resource specific method was removed Use code open Editor new File Editor Input file I Editor Registry SYSTEM EXTERNAL EDITOR ID code instead This method should not be referenced at development time See the class comment for more details  PartInitException openEditor FileEditorInput IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID

public interface I Cool Item Group public String get Contributing Id id of the action set that contributed the group  ICoolItemGroup getContributingId
public interface I Cool Item Group public String get Contributing Id id of the action set that contributed the group public String get Id id of the contribution  ICoolItemGroup getContributingId getId

The information contained in this info will apply to only the argument product public About Info I Product product this product Properties new Product Properties product  AboutInfo IProduct productProperties ProductProperties
This info object will apply to the argument bundle group public About Info I Bundle Group bundle Group this bundle Group Properties new Bundle Group Properties bundle Group  AboutInfo IBundleGroup bundleGroup bundleGroupProperties BundleGroupProperties bundleGroup
Returns the configuration information for the feature with the given id param feature Id the feature id param version Id the version id of the feature return the configuration information for the feature public static About Info read Feature Info String feature Id String version Id Assert is Not Null feature Id Assert is Not Null version Id first see if the id matches the product I Product product Platform get Product if product null feature Id equals Product Properties get Product Id product return new About Info product then check the bundle groups I Bundle Group bundle Group get Bundle Group feature Id version Id if bundle Group null return new About Info bundle Group return null  featureId versionId AboutInfo readFeatureInfo featureId versionId isNotNull featureId isNotNull versionId IProduct getProduct featureId ProductProperties getProductId AboutInfo IBundleGroup bundleGroup getBundleGroup featureId versionId bundleGroup AboutInfo bundleGroup
private static I Bundle Group get Bundle Group String id String version Id if id null version Id null return null I Bundle Group Provider providers Platform get Bundle Group Providers for int p 0 p providers length p I Bundle Group groups providers p get Bundle Groups for int g 0 g groups length g if id equals groups g get Identifier version Id equals groups g get Version return groups g return null  IBundleGroup getBundleGroup versionId versionId IBundleGroupProvider getBundleGroupProviders IBundleGroup getBundleGroups getIdentifier versionId getVersion
Returns the descriptor for an image which can be shown in an about dialog for this product Products designed to run headless typically would not have such an image return the descriptor for an about image or code null code if none public Image Descriptor get About Image return product Properties null null product Properties get About Image  ImageDescriptor getAboutImage productProperties productProperties getAboutImage
Returns the descriptor for an image which can be shown in an about features dialog Products designed to run headless typically would not have such an image return the descriptor for a feature image or code null code if none public Image Descriptor get Feature Image return bundle Group Properties null null bundle Group Properties get Feature Image  ImageDescriptor getFeatureImage bundleGroupProperties bundleGroupProperties getFeatureImage
Returns the simple name of the feature image file return the simple name of the feature image file or code null code if none public String get Feature Image Name if bundle Group Properties null return null URL url bundle Group Properties get Feature Image Url return url null null new Path url get Path last Segment  getFeatureImageName bundleGroupProperties bundleGroupProperties getFeatureImageUrl getPath lastSegment
Returns the CRC of the feature image as supplied in the properties file return the CRC of the feature image or code null code if none public Long get Feature ImageCRC if bundle Group Properties null return null if calculated ImageCRC feature ImageCRC calculate ImageCRC bundle Group Properties get Feature Image Url calculated ImageCRC feature ImageCRC null return feature ImageCRC  getFeatureImageCRC bundleGroupProperties calculatedImageCRC featureImageCRC calculateImageCRC bundleGroupProperties getFeatureImageUrl calculatedImageCRC featureImageCRC featureImageCRC
Calculate a CRC for the feature image private static Long calculate ImageCRC URL url if url null return null Input Stream in null try CRC32 checksum new CRC32 in new Checked Input Stream url open Stream checksum the contents don t matter the read just needs a place to go byte sink new byte 2048 while true if in read sink 0 break return new Long checksum get Value catch IO Exception e return null finally if in null try in close catch IO Exception e do nothing  calculateImageCRC InputStream CheckedInputStream openStream getValue IOException IOException
Returns a label for the feature plugn or code null code public String get Feature Label if product Properties null return product Properties get Product Name if bundle Group Properties null return bundle Group Properties get Feature Label return null  getFeatureLabel productProperties productProperties getProductName bundleGroupProperties bundleGroupProperties getFeatureLabel
Returns the id for this feature return the feature id public String get Feature Id String id null if product Properties null id product Properties get Product Id else if bundle Group Properties null id bundle Group Properties get Feature Id return id null id NON NLS 1  getFeatureId productProperties productProperties getProductId bundleGroupProperties bundleGroupProperties getFeatureId
Returns the text to show in an about dialog for this product Products designed to run headless typically would not have such text return the about text or code null code if none public String get About Text return product Properties null null product Properties get About Text  getAboutText productProperties productProperties getAboutText
Returns the application name or code null code Note this is never shown to the user It is used to initialize the SWT Display p On Motif for example this can be used to set the name used for resource lookup p return the application name or code null code see org eclipse swt widgets Display set App Name public String get App Name return product Properties null null product Properties get App Name  setAppName getAppName productProperties productProperties getAppName
Returns the product name or code null code This is shown in the window title and the About action return the product name or code null code public String get Product Name return product Properties null null product Properties get Product Name  getProductName productProperties productProperties getProductName
Returns the provider name or code null code return the provider name or code null code public String get Provider Name return bundle Group Properties null null bundle Group Properties get Provider Name  getProviderName bundleGroupProperties bundleGroupProperties getProviderName
Returns the feature version id return the version id of the feature public String get Version Id return bundle Group Properties null bundle Group Properties get Feature Version NON NLS 1  getVersionId bundleGroupProperties bundleGroupProperties getFeatureVersion
Returns a code URL code for the welcome page Products designed to run headless typically would not have such an page return the welcome page or code null code if none public URL get Welcome PageURL if product Properties null return product Properties get Welcome Page Url if bundle Group Properties null return bundle Group Properties get Welcome Page Url return null  getWelcomePageURL productProperties productProperties getWelcomePageUrl bundleGroupProperties bundleGroupProperties getWelcomePageUrl
Returns the ID of a perspective in which to show the welcome page May be code null code return the welcome page perspective id or code null code if none public String get Welcome Perspective Id return bundle Group Properties null null bundle Group Properties get Welcome Perspective  getWelcomePerspectiveId bundleGroupProperties bundleGroupProperties getWelcomePerspective
Returns a code String code for the tips and trick href return the tips and tricks href or code null code if none public String get Tips And Tricks Href return bundle Group Properties null null bundle Group Properties get Tips And Tricks Href  getTipsAndTricksHref bundleGroupProperties bundleGroupProperties getTipsAndTricksHref
Return an array of image descriptors for the window images to use for this product The expectations is that the elements will be the same image rendered at different sizes Products designed to run headless typically would not have such images return an array of the image descriptors for the window images or code null code if none since 3 0 public Image Descriptor get Window Images return product Properties null null product Properties get Window Images  ImageDescriptor getWindowImages productProperties productProperties getWindowImages

private I Workbench Window window public Build Clean Action I Workbench Window window super IDE Workbench Messages get String Workbench build Clean NON NLS 1 set Action Definition Id org eclipse ui project clean Action NON NLS 1 this window window  IWorkbenchWindow BuildCleanAction IWorkbenchWindow IDEWorkbenchMessages getString buildClean setActionDefinitionId cleanAction
see org eclipse ui actions Action Factory I Workbench Action dispose public void dispose nothing to dispose  ActionFactory IWorkbenchAction
public void run I Selection selection window get Selection Service get Selection I Project selected null if selection null selection is Empty selection instanceof I Structured Selection selected Build Set Action extract Projects I Structured Selection selection to Array else see if we can extract a selected project from the active editor I Workbench Part part window get Part Service get Active Part if part instanceof I Editor Part I Editor Input input I Editor Part part get Editor Input if input instanceof I File Editor Input selected new I Project I File Editor Input input get File get Project if selected null selected new I Project 0 new Clean Dialog window selected open  ISelection getSelectionService getSelection IProject isEmpty IStructuredSelection BuildSetAction extractProjects IStructuredSelection toArray IWorkbenchPart getPartService getActivePart IEditorPart IEditorInput IEditorPart getEditorInput IFileEditorInput IProject IFileEditorInput getFile getProject IProject CleanDialog

private I Action Bar Configurer action Bars Convenience method for extracting the selected projects from a selection protected static I Project extract Projects Object selection Hash Set projects new Hash Set for int i 0 i selection length i if selection i instanceof I Resource projects add I Resource selection i get Project else if selection i instanceof I Adaptable I Adaptable adaptable I Adaptable selection i I Resource resource I Resource adaptable get Adapter I Resource class if resource null projects add resource get Project return I Project projects to Array new I Project projects size  IActionBarConfigurer actionBars IProject extractProjects HashSet HashSet IResource IResource getProject IAdaptable IAdaptable IAdaptable IResource IResource getAdapter IResource getProject IProject toArray IProject
Creates a new action that builds the provided working set when run public Build Set Action I Working Set set I Workbench Window window I Action Bar Configurer action Bars super set null set get Name AS RADIO BUTTON NON NLS 1 this window window this action Bars action Bars this working Set set  BuildSetAction IWorkingSet IWorkbenchWindow IActionBarConfigurer actionBars getName AS_RADIO_BUTTON actionBars actionBars workingSet
Returns the working set that this instance is building public I Working Set get Working Set return working Set  IWorkingSet getWorkingSet workingSet
public void run last Built this register this action instance as the global handler for the build last action set Action Definition Id org eclipse ui project build Last NON NLS 1 action Bars register Global Action this window get Workbench get Working Set Manager add Recent Working Set working Set I Project projects extract Projects working Set get Elements if projects length 0 return Build Action build new Build Action window get Shell Incremental Project Builder INCREMENTAL BUILD build selection Changed new Structured Selection projects build run  lastBuilt setActionDefinitionId buildLast actionBars registerGlobalAction getWorkbench getWorkingSetManager addRecentWorkingSet workingSet IProject extractProjects workingSet getElements BuildAction BuildAction getShell IncrementalProjectBuilder INCREMENTAL_BUILD selectionChanged StructuredSelection
public void run With Event Event event radio buttons receive an event when they become unselected so we must not run the action in this case if event widget instanceof Menu Item if Menu Item event widget get Selection return run  runWithEvent MenuItem MenuItem getSelection
For debugging purposes only public String to String return Build Set Action working Set get Name NON NLS 1 NON NLS 2  toString BuildSetAction workingSet getName

boolean dirty true private I Menu Listener menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager manager mark Dirty dirty true  IMenuListener menuListener IMenuListener menuAboutToShow IMenuManager markDirty
private I Workbench Window window public Build Set Menu I Workbench Window window I Action Bar Configurer action Bars this window window this action Bars action Bars select Build Working Set Action new Select Build Working Set Action window action Bars  IWorkbenchWindow BuildSetMenu IWorkbenchWindow IActionBarConfigurer actionBars actionBars actionBars selectBuildWorkingSetAction SelectBuildWorkingSetAction actionBars
Adds a mnemonic accelerator to actions in the MRU list of recently built working sets private void add Mnemonic Build Set Action action int index String Buffer label new String Buffer add the numerical accelerator if index 9 label append label append index label append label append action get Working Set get Name action set Text label to String  addMnemonic BuildSetAction StringBuffer StringBuffer getWorkingSet getName setText toString
public void fill Menu menu int index if get Parent instanceof Menu Manager Menu Manager get Parent add Menu Listener menu Listener if dirty return fill Menu menu dirty false  getParent MenuManager MenuManager getParent addMenuListener menuListener fillMenu
Fills the menu with Show View actions private void fill Menu Menu menu boolean is Auto Building Resources Plugin get Workspace is Auto Building build MRU list of recently built working sets I Working Set sets window get Workbench get Working Set Manager get Recent Working Sets Build Set Action last Build Set Action last Built I Working Set last Set null add build action for the last working set that was built int accel 1 if last null last set Checked true last set Enabled is Auto Building last set Action Definition Id org eclipse ui project build Last NON NLS 1 add Mnemonic last accel new Action Contribution Item last fill menu 1 last Set last get Working Set add build actions for the most recently used working sets for int i 0 i sets length i if last Set null last Set equals sets i continue Build Set Action action new Build Set Action sets i window action Bars add Mnemonic action accel action set Enabled is Auto Building new Action Contribution Item action fill menu 1 add the action to select a different working set new Separator fill menu 1 select Build Working Set Action set Enabled is Auto Building new Action Contribution Item select Build Working Set Action fill menu 1  fillMenu isAutoBuilding ResourcesPlugin getWorkspace isAutoBuilding IWorkingSet getWorkbench getWorkingSetManager getRecentWorkingSets BuildSetAction BuildSetAction lastBuilt IWorkingSet lastSet setChecked setEnabled isAutoBuilding setActionDefinitionId buildLast addMnemonic ActionContributionItem lastSet getWorkingSet lastSet lastSet BuildSetAction BuildSetAction actionBars addMnemonic setEnabled isAutoBuilding ActionContributionItem selectBuildWorkingSetAction setEnabled isAutoBuilding ActionContributionItem selectBuildWorkingSetAction
new Action Contribution Item select Build Working Set Action fill menu 1 public boolean is Dirty return dirty  ActionContributionItem selectBuildWorkingSetAction isDirty
Overridden to always return true and force dynamic menu building public boolean is Dynamic return true  isDynamic

Set definition for this action and text so that it will be used for File gt Open Workspace in the argument window param window the window in which this action should appear public Open Workspace Action I Workbench Window window super IDE Workbench Messages get String Open Workspace Action text NON NLS 1 if window null throw new Illegal Argument Exception TODO help this window window set Tool Tip Text IDE Workbench Messages get String Open Workspace Action tool Tip NON NLS 1 set Action Definition Id org eclipse ui file open Workspace NON NLS 1  OpenWorkspaceAction IWorkbenchWindow IDEWorkbenchMessages getString OpenWorkspaceAction IllegalArgumentException setToolTipText IDEWorkbenchMessages getString OpenWorkspaceAction toolTip setActionDefinitionId openWorkspace
public void run String path prompt For Workspace if path null return String command line build Command Line path if command line null return System set Property PROP EXIT CODE Integer to String 24 System set Property PROP EXIT DATA command line window get Workbench restart  promptForWorkspace command_line buildCommandLine command_line setProperty PROP_EXIT_CODE toString setProperty PROP_EXIT_DATA command_line getWorkbench
Use the Choose Workspace Dialog to get the new workspace from the user return a string naming the new workspace and null if cancel was selected private String prompt For Workspace get the current workspace as the default Choose Workspace Data data new Choose Workspace Data Platform get Instance Location getURL Choose Workspace Dialog dialog new Choose Workspace Dialog window get Shell data true dialog prompt true return null if the user changed their mind String selection data get Selection if selection null return null otherwise store the new selection and return the selection data write Persisted Data return selection  ChooseWorkspaceDialog promptForWorkspace ChooseWorkspaceData ChooseWorkspaceData getInstanceLocation ChooseWorkspaceDialog ChooseWorkspaceDialog getShell getSelection writePersistedData
Create and return a string with command line options for eclipse exe that will launch a new workbench that is the same as the currently running one but using the argument directory as its workspace param workspace the directory to use as the new workspace return a string of command line options or null on error private String build Command Line String workspace String property System get Property PROP VM if property null Message Dialog open Error window get Shell IDE Workbench Messages get String Open Workspace Action error Title NON NLS 1 IDE Workbench Messages format Open Workspace Action error Message new Object PROP VM NON NLS 1 return null String Buffer result new String Buffer 512 result append property result append NEW LINE append the vmargs and commands Assume that these already end in n String vmargs System get Property PROP VMARGS if vmargs null result append vmargs append the rest of the args replacing or adding data as required property System get Property PROP COMMANDS if property null result append CMD DATA result append NEW LINE result append workspace result append NEW LINE else find the index of the arg to replace its value int cmd data pos property index Of CMD DATA if cmd data pos 1 cmd data pos CMD DATA length 1 result append property substring 0 cmd data pos result append workspace result append property substring property index Of n cmd data pos else result append CMD DATA result append NEW LINE result append workspace result append NEW LINE result append property put the vmargs back at the very end the eclipse commands property already contains the vm arg if vmargs null result append CMD VMARGS result append NEW LINE result append vmargs return result to String  buildCommandLine getProperty PROP_VM MessageDialog openError getShell IDEWorkbenchMessages getString OpenWorkspaceAction errorTitle IDEWorkbenchMessages OpenWorkspaceAction errorMessage PROP_VM StringBuffer StringBuffer NEW_LINE getProperty PROP_VMARGS getProperty PROP_COMMANDS CMD_DATA NEW_LINE NEW_LINE cmd_data_pos indexOf CMD_DATA cmd_data_pos cmd_data_pos CMD_DATA cmd_data_pos indexOf cmd_data_pos CMD_DATA NEW_LINE NEW_LINE CMD_VMARGS NEW_LINE toString
see org eclipse jface action Action dispose public void dispose window null 

Creates a new instance of the class public Open Workspace File Action super Workbench Help set Help this I Help Context Ids OPEN WORKSPACE FILE ACTION  OpenWorkspaceFileAction WorkbenchHelp setHelp IHelpContextIds OPEN_WORKSPACE_FILE_ACTION
see org eclipse ui I Workbench Window Action Delegate dispose public void dispose do nothing  IWorkbenchWindowActionDelegate
see org eclipse ui I Workbench Window Action Delegate init org eclipse ui I Workbench Window public void init I Workbench Window window workbench Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow workbenchWindow
Query the user for the resource that should be opened return the resource that should be opened or null if the resource selection dialog was cancelled I File query File Resource Shell parent workbench Window get Shell I Container input Resources Plugin get Workspace get Root Open Resource Dialog dialog new Open Resource Dialog parent input I Resource FILE int result Code dialog open if result Code I Dialog Constants OK ID return null Object result dialog get Result if result null result length 0 result 0 instanceof I File false return null return I File result 0  IFile queryFileResource workbenchWindow getShell IContainer ResourcesPlugin getWorkspace getRoot OpenResourceDialog OpenResourceDialog IResource resultCode resultCode IDialogConstants OK_ID getResult IFile IFile
Collect all resources in the workbench open a dialog asking the user to select a file and open the file in an editor public void run I Action action I File file query File Resource if file null return try I Workbench Page page workbench Window get Active Page if page null IDE open Editor page file true catch Core Exception x String title IDE Workbench Messages get String Open Workspace File Action error Title NON NLS 1 String message IDE Workbench Messages get String Open Workspace File Action error Message NON NLS 1 IDE Workbench Plugin log title x get Status Error Dialog open Error workbench Window get Shell title message x get Status  IAction IFile queryFileResource IWorkbenchPage workbenchWindow getActivePage openEditor CoreException IDEWorkbenchMessages getString OpenWorkspaceFileAction errorTitle IDEWorkbenchMessages getString OpenWorkspaceFileAction errorMessage IDEWorkbenchPlugin getStatus ErrorDialog openError workbenchWindow getShell getStatus
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection do nothing  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection

public Project Property Dialog Action I Workbench Window window super new String if window null throw new Illegal Argument Exception this workbench Window window set Text IDE Workbench Messages get String Workbench project Properties NON NLS 1 set Tool Tip Text IDE Workbench Messages get String Workbench project Properties Tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids PROJECT PROPERTY DIALOG ACTION workbench Window get Selection Service add Selection Listener this workbench Window get Part Service add Part Listener this set Action Definition Id org eclipse ui project properties NON NLS 1  ProjectPropertyDialogAction IWorkbenchWindow IllegalArgumentException workbenchWindow setText IDEWorkbenchMessages getString projectProperties setToolTipText IDEWorkbenchMessages getString projectPropertiesToolTip WorkbenchHelp setHelp IHelpContextIds PROJECT_PROPERTY_DIALOG_ACTION workbenchWindow getSelectionService addSelectionListener workbenchWindow getPartService addPartListener setActionDefinitionId
Opens the project properties dialog public void run I Project project get Project if project null return Sel Provider sel Provider new Sel Provider sel Provider project Selection new Structured Selection project Property Dialog Action prop Action new Property Dialog Action workbench Window get Shell sel Provider prop Action run  IProject getProject SelProvider selProvider SelProvider selProvider projectSelection StructuredSelection PropertyDialogAction propAction PropertyDialogAction workbenchWindow getShell selProvider propAction
Update the enablement state when a the selection changes public void selection Changed I Workbench Part part I Selection sel set Enabled get Project null  selectionChanged IWorkbenchPart ISelection setEnabled getProject
Update the enablement state when a new part is activated public void part Activated I Workbench Part part super part Activated part set Enabled get Project null  partActivated IWorkbenchPart partActivated setEnabled getProject
Returns a project from the selection of the active part private I Project get Project I Workbench Part part get Active Part Object selection null if part instanceof I Editor Part selection I Editor Part part get Editor Input else I Selection sel workbench Window get Selection Service get Selection if sel null sel instanceof I Structured Selection selection I Structured Selection sel get First Element if selection null return null if selection instanceof I Adaptable return null I Resource resource I Resource I Adaptable selection get Adapter I Resource class if resource null return null return resource get Project  IProject getProject IWorkbenchPart getActivePart IEditorPart IEditorPart getEditorInput ISelection workbenchWindow getSelectionService getSelection IStructuredSelection IStructuredSelection getFirstElement IAdaptable IResource IResource IAdaptable getAdapter IResource getProject
public void dispose if workbench Window null action has already been disposed return workbench Window get Selection Service remove Selection Listener this workbench Window get Part Service remove Part Listener this workbench Window null  workbenchWindow workbenchWindow getSelectionService removeSelectionListener workbenchWindow getPartService removePartListener workbenchWindow
protected I Structured Selection project Selection Structured Selection EMPTY public void add Selection Changed Listener I Selection Changed Listener listener do nothing  IStructuredSelection projectSelection StructuredSelection addSelectionChangedListener ISelectionChangedListener
public I Selection get Selection return project Selection  ISelection getSelection projectSelection
public void remove Selection Changed Listener I Selection Changed Listener listener do nothing  removeSelectionChangedListener ISelectionChangedListener
public void set Selection I Selection selection do nothing  setSelection ISelection

Creates a new quick menu action with the given command id param command Id the command id of the short cut used to open the sub menu public Quick Menu Action String command Id set Action Definition Id command Id  commandId QuickMenuAction commandId setActionDefinitionId commandId
inherit Doc public void run Display display Display get Current if display null return Control focus display get Focus Control if focus null focus is Disposed return Menu Manager menu new Menu Manager fill Menu menu if quick Menu null quick Menu dispose quick Menu null quick Menu menu create Context Menu focus get Shell Point location compute Menu Location focus quick Menu if location null return quick Menu set Location location quick Menu set Visible true  inheritDoc getCurrent getFocusControl isDisposed MenuManager MenuManager fillMenu quickMenu quickMenu quickMenu quickMenu createContextMenu getShell computeMenuLocation quickMenu quickMenu setLocation quickMenu setVisible
public void dispose if quick Menu null quick Menu dispose quick Menu null  quickMenu quickMenu quickMenu
Hook to fill a menu manager with the items of the sub menu param menu the sub menu to fill 
Returns the short cut assigned to the sub menu or code null code if no short cut is assigned return the short cut as a human readable string or code null code public String get Short Cut String final I Command Manager command Manager PlatformUI get Workbench get Command Support get Command Manager final I Command command command Manager get Command get Action Definition Id if command is Defined List l command get Key Sequence Bindings if l is Empty I Key Sequence Binding binding I Key Sequence Binding l get 0 return binding get Key Sequence format return null NON NLS 1  getShortCutString ICommandManager commandManager getWorkbench getCommandSupport getCommandManager ICommand commandManager getCommand getActionDefinitionId isDefined getKeySequenceBindings isEmpty IKeySequenceBinding IKeySequenceBinding getKeySequence
private Point compute Menu Location Control focus Menu menu Point cursor Location focus get Display get Cursor Location Rectangle client Area null Point result null if focus instanceof Styled Text Styled Text styled Text Styled Text focus client Area styled Text get Client Area result compute Menu Location styled Text else if focus instanceof Tree Tree tree Tree focus client Area tree get Client Area result compute Menu Location tree else if focus instanceof Table Table table Table focus client Area table get Client Area result compute Menu Location table if result null result focus to Control cursor Location if client Area null client Area contains result result new Point client Area x client Area width 2 client Area y client Area height 2 Rectangle shell Area focus get Shell get Client Area if shell Area contains focus get Shell to Control focus to Display result result new Point shell Area x shell Area width 2 shell Area y shell Area height 2 return focus to Display result  computeMenuLocation cursorLocation getDisplay getCursorLocation clientArea StyledText StyledText styledText StyledText clientArea styledText getClientArea computeMenuLocation styledText clientArea getClientArea computeMenuLocation clientArea getClientArea computeMenuLocation toControl cursorLocation clientArea clientArea clientArea clientArea clientArea clientArea shellArea getShell getClientArea shellArea getShell toControl toDisplay shellArea shellArea shellArea shellArea toDisplay
Hook to compute the menu location if the focus widget is a styled text widget param text the styled text widget that has the focus return a widget relative position of the menu to pop up or code null code if now position inside the widget can be computed protected Point compute Menu Location Styled Text text Point result text get Location At Offset text get Caret Offset result y text get Line Height if text get Client Area contains result return null return result  computeMenuLocation StyledText getLocationAtOffset getCaretOffset getLineHeight getClientArea
Hook to compute the menu location if the focus widget is a tree widget param tree the tree widget that has the focus return a widget relative position of the menu to pop up or code null code if now position inside the widget can be computed protected Point compute Menu Location Tree tree Tree Item items tree get Selection Rectangle client Area tree get Client Area switch items length case 0 return null case 1 Rectangle bounds items 0 get Bounds Rectangle intersect client Area intersection bounds if intersect null intersect height bounds height return new Point Math max 0 bounds x get Avarage Char With tree CHAR INDENT bounds y bounds height else return null default Rectangle rectangles new Rectangle items length for int i 0 i rectangles length i rectangles i items i get Bounds Point cursor Location tree get Display get Cursor Location Point result find Best Location get Included Positions rectangles client Area tree to Control cursor Location if result null result x result x get Avarage Char With tree CHAR INDENT return result  computeMenuLocation TreeItem getSelection clientArea getClientArea getBounds clientArea getAvarageCharWith CHAR_INDENT getBounds cursorLocation getDisplay getCursorLocation findBestLocation getIncludedPositions clientArea toControl cursorLocation getAvarageCharWith CHAR_INDENT
Hook to compute the menu location if the focus widget is a table widget param table the table widget that has the focus return a widget relative position of the menu to pop up or code null code if now position inside the widget can be computed protected Point compute Menu Location Table table Table Item items table get Selection Rectangle client Area table get Client Area switch items length case 0 return null case 1 Rectangle bounds items 0 get Bounds 0 Rectangle i Bounds items 0 get Image Bounds 0 Rectangle intersect client Area intersection bounds if intersect null intersect height bounds height return new Point Math max 0 bounds x i Bounds width get Avarage Char With table CHAR INDENT bounds y bounds height else return null default Rectangle rectangles new Rectangle items length for int i 0 i rectangles length i rectangles i items i get Bounds 0 Rectangle i Bounds items 0 get Image Bounds 0 Point cursor Location table get Display get Cursor Location Point result find Best Location get Included Positions rectangles client Area table to Control cursor Location if result null result x result x i Bounds width get Avarage Char With table CHAR INDENT return result  computeMenuLocation TableItem getSelection clientArea getClientArea getBounds iBounds getImageBounds clientArea iBounds getAvarageCharWith CHAR_INDENT getBounds iBounds getImageBounds cursorLocation getDisplay getCursorLocation findBestLocation getIncludedPositions clientArea toControl cursorLocation iBounds getAvarageCharWith CHAR_INDENT
private Point get Included Positions Rectangle rectangles Rectangle widget Bounds List result new Array List for int i 0 i rectangles length i Rectangle rectangle rectangles i Rectangle intersect widget Bounds intersection rectangle if intersect null intersect height rectangle height result add new Point intersect x intersect y intersect height return Point result to Array new Point result size  getIncludedPositions widgetBounds ArrayList widgetBounds toArray
private Point find Best Location Point points Point relative Cursor Point result null double best Dist Double MAX VALUE for int i 0 i points length i Point point points i int a 0 int b 0 if point x relative Cursor x a point x relative Cursor x else a relative Cursor x point x if point y relative Cursor y b point y relative Cursor y else b relative Cursor y point y double dist Math sqrt a a b b if dist best Dist result point best Dist dist return result  findBestLocation relativeCursor bestDist MAX_VALUE relativeCursor relativeCursor relativeCursor relativeCursor relativeCursor relativeCursor bestDist bestDist
private int get Avarage Char With Control control GC gc null try gc new GC control return gc get Font Metrics get Average Char Width finally if gc null gc dispose  getAvarageCharWith getFontMetrics getAverageCharWidth

private I Action Bar Configurer action Bars public Select Build Working Set Action I Workbench Window window I Action Bar Configurer action Bars super IDE Workbench Messages get String Select Working Set Action text NON NLS 1 this window window this action Bars action Bars  IActionBarConfigurer actionBars SelectBuildWorkingSetAction IWorkbenchWindow IActionBarConfigurer actionBars IDEWorkbenchMessages getString SelectWorkingSetAction actionBars actionBars
private I Working Set query For Working Set I Working Set Manager manager window get Workbench get Working Set Manager I Working Set Selection Dialog dialog manager create Working Set Selection Dialog window get Shell false dialog open I Working Set sets dialog get Selection check for cancel if sets null sets length 0 return null return sets 0  IWorkingSet queryForWorkingSet IWorkingSetManager getWorkbench getWorkingSetManager IWorkingSetSelectionDialog createWorkingSetSelectionDialog getShell IWorkingSet getSelection
public void run I Working Set set query For Working Set if set null new Build Set Action set window action Bars run  IWorkingSet queryForWorkingSet BuildSetAction actionBars
public void dispose 
public void dispose public void set Action Bars I Action Bar Configurer action Bars this action Bars action Bars  setActionBars IActionBarConfigurer actionBars actionBars actionBars

private I Workbench Window window Creates a new Toggle Auto Build Action param window The window for parenting dialogs associated with this action public Toggle Auto Build Action I Workbench Window window super IDE Workbench Messages get String Workbench build Automatically NON NLS 1 this window window set Checked Resources Plugin get Workspace is Auto Building  IWorkbenchWindow ToggleAutoBuildAction ToggleAutoBuildAction IWorkbenchWindow IDEWorkbenchMessages getString buildAutomatically setChecked ResourcesPlugin getWorkspace isAutoBuilding
see org eclipse ui actions Action Factory I Workbench Action dispose public void dispose nothing to dispose  ActionFactory IWorkbenchAction
public void run I Workspace workspace Resources Plugin get Workspace I Workspace Description description workspace get Description description set Auto Building description is Auto Building try workspace set Description description catch Core Exception e Error Dialog open Error window get Shell null null e get Status  IWorkspace ResourcesPlugin getWorkspace IWorkspaceDescription getDescription setAutoBuilding isAutoBuilding setDescription CoreException ErrorDialog openError getShell getStatus

Creates an instance of code Category code as a miscellaneous category public Category this id MISC ID this name MISC NAME  MISC_ID MISC_NAME
Creates an instance of code Category code with an ID and label param id the unique identifier for the category param label the presentation label for this category public Category String id String label this id id this name label 
Creates an instance of code Category code using the information from the specified configuration element param config Element the code I Configuration Element code containing the ID label and optional parent category path throws a code Workbench Exception code if the ID or label is code null code public Category I Configuration Element config Element throws Workbench Exception id config Element get Attribute ATT ID name config Element get Attribute ATT NAME unparsed Path config Element get Attribute ATT PARENT if id null name null throw new Workbench Exception Invalid category id NON NLS 1  configElement IConfigurationElement WorkbenchException IConfigurationElement configElement WorkbenchException configElement getAttribute ATT_ID configElement getAttribute ATT_NAME unparsedPath configElement getAttribute ATT_PARENT WorkbenchException
public void add Element Object element if elements null elements new Array List 5 elements add element  addElement ArrayList
public Object get Adapter Class adapter if adapter I Workbench Adapter class return this else return null  getAdapter IWorkbenchAdapter
Method declared on I Workbench Adapter public Object get Children Object o return get Elements to Array  IWorkbenchAdapter getChildren getElements toArray
Method declared on I Workbench Adapter public Image Descriptor get Image Descriptor Object object return PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG OBJ FOLDER  IWorkbenchAdapter ImageDescriptor getImageDescriptor getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_OBJ_FOLDER
Method declared on I Workbench Adapter public String get Label Object o return get Label  IWorkbenchAdapter getLabel getLabel
Method declared on I Category public String get Id return id  ICategory getId
Method declared on I Category public String get Label return name  ICategory getLabel
public String get Parent Path if unparsed Path null String Tokenizer stok new String Tokenizer unparsed Path NON NLS 1 parent Path new String stok count Tokens for int i 0 stok has More Tokens i parent Path i stok next Token unparsed Path null return parent Path  getParentPath unparsedPath StringTokenizer StringTokenizer unparsedPath parentPath countTokens hasMoreTokens parentPath nextToken unparsedPath parentPath
public String get Root Path String path get Parent Path if path null path length 0 return path 0 else return id  getRootPath getParentPath
Method declared on I Category public Array List get Elements return elements  ICategory ArrayList getElements
public boolean has Elements if elements null return elements is Empty else return false  hasElements isEmpty

Creates a new instance loading persistent data if its found public Choose Workspace Data String initial Default read Persisted Data set Initial Default initial Default  ChooseWorkspaceData initialDefault readPersistedData setInitialDefault initialDefault
Creates a new instance loading persistent data if its found public Choose Workspace Data URL instance Url read Persisted Data if instance Url null set Initial Default new File instance Url get File to String  ChooseWorkspaceData instanceUrl readPersistedData instanceUrl setInitialDefault instanceUrl getFile toString
Return the folder to be used as a default if no other information exists Does not return null public String get Initial Default if initial Default null set Initial Default System get Property user dir NON NLS 1 File separator workspace NON NLS 1 return initial Default  getInitialDefault initialDefault setInitialDefault getProperty initialDefault
Set this data s initial Default parameter to a properly formatted version of the argument directory string The proper format is to the platform appropriate separator character without meaningless leading or trailing separator characters private void set Initial Default String dir if dir null dir length 0 initial Default null return dir new Path dir toOS String while dir char At dir length 1 File separator Char dir dir substring 0 dir length 1 initial Default dir  initialDefault setInitialDefault initialDefault toOSString charAt separatorChar initialDefault
Return the currently selected workspace or null if nothing is selected public String get Selection return selection  getSelection
Return the currently selected workspace or null if nothing is selected public boolean get Show Dialog return show Dialog  getShowDialog showDialog
Return an array of recent workspaces sorted with the most recently used at the start public String get Recent Workspaces return recent Workspaces  getRecentWorkspaces recentWorkspaces
The argument workspace has been selected update the receiver Does not persist the new values public void workspace Selected String dir this just stores the selection it is not inserted and persisted until the workspace is actually selected selection dir  workspaceSelected
Toggle value of the show Dialog persistent setting public void toggle Show Dialog show Dialog show Dialog  showDialog toggleShowDialog showDialog showDialog
Update the persistent store Call this function after the currently selected value has been found to be ok public void write Persisted Data Location config Loc Platform get Configuration Location if config Loc null config Loc is Read Only return URL pers Url get Persistence Url config Loc getURL true if pers Url null return move the new selection to the front of the list if selection null String old Entry recent Workspaces 0 recent Workspaces 0 selection for int i 1 i recent Workspaces length old Entry null i if selection equals old Entry break String tmp recent Workspaces i recent Workspaces i old Entry old Entry tmp Writer writer null try writer new File Writer pers Url get File E g launch Workspace Data protocol version 1 always Ask show Dialog 1 recent Workspaces max Length 5 workspace path C eclipse workspace0 workspace path C eclipse workspace1 recent Workspaces launch Workspace Data XML Memento memento XML Memento create Write Root launch Workspace Data NON NLS 1 memento create Child XML PROTOCOL put Integer XML VERSION PERS ENCODING VERSION memento create Child XML ALWAYS ASK put Integer XML SHOW DIALOG show Dialog 1 0 I Memento recent Memento memento create Child XML RECENT WORKSPACES recent Memento put Integer XML MAX LENGTH recent Workspaces length for int i 0 i recent Workspaces length i if recent Workspaces i null break recent Memento create Child XML WORKSPACE put String XML PATH recent Workspaces i memento save writer catch IO Exception e IDE Workbench Plugin log Unable to write recent workspace data NON NLS 1 Status Util new Status I Status ERROR e get Message null e get Message NON NLS 1 e finally if writer null try writer close catch IO Exception e1 do nothing  writePersistedData configLoc getConfigurationLocation configLoc configLoc isReadOnly persUrl getPersistenceUrl configLoc persUrl oldEntry recentWorkspaces recentWorkspaces recentWorkspaces oldEntry oldEntry recentWorkspaces recentWorkspaces oldEntry oldEntry FileWriter persUrl getFile launchWorkspaceData alwaysAsk showDialog recentWorkspaces maxLength recentWorkspaces launchWorkspaceData XMLMemento XMLMemento createWriteRoot launchWorkspaceData createChild putInteger PERS_ENCODING_VERSION createChild ALWAYS_ASK putInteger SHOW_DIALOG showDialog IMemento recentMemento createChild RECENT_WORKSPACES recentMemento putInteger MAX_LENGTH recentWorkspaces recentWorkspaces recentWorkspaces recentMemento createChild putString recentWorkspaces IOException IDEWorkbenchPlugin StatusUtil newStatus IStatus getMessage getMessage IOException
Look for and read data that might have been persisted from some previous run Leave the receiver in a default state if no persistent data is found return true if a file was successfully read and false otherwise private boolean read Persisted Data URL pers Url null Location config Loc Platform get Configuration Location if config Loc null pers Url get Persistence Url config Loc getURL false try inside try to get the safe default creation in the finally clause if pers Url null return false E g launch Workspace Data protocol version 1 always Ask show Dialog 1 recent Workspaces max Length 5 workspace path C eclipse workspace0 workspace path C eclipse workspace1 recent Workspaces launch Workspace Data Reader reader new File Reader pers Url get File XML Memento memento XML Memento create Read Root reader if memento null compatible Protocol memento return false I Memento always Ask Tag memento get Child XML ALWAYS ASK show Dialog always Ask Tag null true always Ask Tag get Integer XML SHOW DIALOG int Value 1 I Memento recent memento get Child XML RECENT WORKSPACES if recent null return false Integer max Length recent get Integer XML MAX LENGTH int max RECENT MAX LENGTH if max Length null max max Length int Value I Memento indices recent get Children XML WORKSPACE if indices null indices length 0 return false if a user has edited max Length to be shorter than the listed indices accept the list its tougher for them to retype a long list of paths than to update a max number max Math max max indices length recent Workspaces new String max for int i 0 i indices length i String path indices i get String XML PATH if path null break recent Workspaces i path catch IO Exception e cannot log because instance area has not been set return false catch Workbench Exception e cannot log because instance area has not been set return false finally create safe default if needed if recent Workspaces null recent Workspaces new String RECENT MAX LENGTH return true  readPersistedData persUrl configLoc getConfigurationLocation configLoc persUrl getPersistenceUrl configLoc persUrl launchWorkspaceData alwaysAsk showDialog recentWorkspaces maxLength recentWorkspaces launchWorkspaceData FileReader persUrl getFile XMLMemento XMLMemento createReadRoot compatibleProtocol IMemento alwaysAskTag getChild ALWAYS_ASK showDialog alwaysAskTag alwaysAskTag getInteger SHOW_DIALOG intValue IMemento getChild RECENT_WORKSPACES maxLength getInteger MAX_LENGTH RECENT_MAX_LENGTH maxLength maxLength intValue IMemento getChildren maxLength recentWorkspaces getString recentWorkspaces IOException WorkbenchException recentWorkspaces recentWorkspaces RECENT_MAX_LENGTH
Return the current persisted value of the show Dialog on startup preference Return the global default if the file cannot be accessed public static boolean get Show Dialog Value Choose Workspace Data data new Choose Workspace Data NON NLS 1 return either the value in the file or true which is the global default return data read Persisted Data data show Dialog true  showDialog getShowDialogValue ChooseWorkspaceData ChooseWorkspaceData readPersistedData showDialog
Return the current persisted value of the show Dialog on startup preference Return the global default if the file cannot be accessed public static void set Show Dialog Value boolean show Dialog Choose Workspace Data data new Choose Workspace Data NON NLS 1 if the file didn t exist then don t create a new one if data read Persisted Data return update the value and write the new settings data show Dialog show Dialog data write Persisted Data  showDialog setShowDialogValue showDialog ChooseWorkspaceData ChooseWorkspaceData readPersistedData showDialog showDialog writePersistedData
Return true if the protocol used to encode the argument memento is compatible with the receiver s implementation and false otherwise private static boolean compatible Protocol I Memento memento I Memento protocol Memento memento get Child XML PROTOCOL if protocol Memento null return false Integer version protocol Memento get Integer XML VERSION return version null version int Value PERS ENCODING VERSION  compatibleProtocol IMemento IMemento protocolMemento getChild protocolMemento protocolMemento getInteger intValue PERS_ENCODING_VERSION
The workspace data is stored in the well known file pointed to by the result of this method param create If the directory and file does not exist this parameter controls whether it will be created return An url to the file and null if it does not exist or could not be created private static URL get Persistence Url URL base Url boolean create if base Url null return null try make sure the directory exists URL url new URL base Url PERS FOLDER File dir new File url get File if dir exists create dir mkdir return null make sure the file exists url new URL dir toURL PERS FILENAME File pers File new File url get File if pers File exists create pers File create New File return null return pers File toURL catch IO Exception e cannot log because instance area has not been set return null  getPersistenceUrl baseUrl baseUrl baseUrl PERS_FOLDER getFile PERS_FILENAME persFile getFile persFile persFile createNewFile persFile IOException

Create a modal dialog on the arugment shell using and updating the argument data object param suppress Ask Again true means the dialog will not have a don t ask again button public Choose Workspace Dialog Shell parent Shell Choose Workspace Data launch Data boolean suppress Ask Again super parent Shell this launch Data launch Data this suppress Ask Again suppress Ask Again  suppressAskAgain ChooseWorkspaceDialog parentShell ChooseWorkspaceData launchData suppressAskAgain parentShell launchData launchData suppressAskAgain suppressAskAgain
Show the dialog to the user if needed When this method finishes get Selection will return the workspace that should be used whether it was just selected by the user or some previous default has been used The parameter can be used to override the users preference For example this is important in cases where the default selection is already in use and the user is forced to choose a different one param force true if the dialog should be opened regardless of the value of the show dialog checkbox public void prompt boolean force if force launch Data get Show Dialog open return String recent launch Data get Recent Workspaces launch Data workspace Selected recent null recent length 0 recent 0 launch Data get Initial Default  getSelection launchData getShowDialog launchData getRecentWorkspaces launchData workspaceSelected launchData getInitialDefault
Creates and returns the contents of the upper part of this dialog above the button bar p The code Dialog code implementation of this framework method creates and returns a new code Composite code with no margins and spacing p param parent the parent composite to contain the dialog area return the dialog area control protected Control create Dialog Area Composite parent String product Name null I Product product Platform get Product if product null product Name product get Name if product Name null product Name IDE Workbench Messages get String Choose Workspace Dialog default Product Name NON NLS 1 Composite composite Composite super create Dialog Area parent set Title IDE Workbench Messages get String Choose Workspace Dialog dialog Title NON NLS 1 set Message IDE Workbench Messages format Choose Workspace Dialog dialog Message NON NLS 1 new Object product Name bug 59934 load title image for sizing but set it non visible so the white background is displayed if get Title Image Label null get Title Image Label set Visible false create Workspace Browse Row composite if suppress Ask Again create Show Dialog Button composite return composite  createDialogArea productName IProduct getProduct productName getName productName productName IDEWorkbenchMessages getString ChooseWorkspaceDialog defaultProductName createDialogArea setTitle IDEWorkbenchMessages getString ChooseWorkspaceDialog dialogTitle setMessage IDEWorkbenchMessages ChooseWorkspaceDialog dialogMessage productName getTitleImageLabel getTitleImageLabel setVisible createWorkspaceBrowseRow suppressAskAgain createShowDialogButton
Configures the given shell in preparation for opening this window in it p The default implementation of this framework method sets the shell s image and gives it a grid layout Subclasses may extend or reimplement p param shell the shell protected void configure Shell Shell shell super configure Shell shell shell set Text IDE Workbench Messages get String Choose Workspace Dialog dialog Name NON NLS 1  configureShell configureShell setText IDEWorkbenchMessages getString ChooseWorkspaceDialog dialogName
Notifies that the ok button of this dialog has been pressed p The code Dialog code implementation of this framework method sets this dialog s return code to code Window OK code and closes the dialog Subclasses may override p protected void ok Pressed launch Data workspace Selected text get Text super ok Pressed  okPressed launchData workspaceSelected getText okPressed
Notifies that the cancel button of this dialog has been pressed p The code Dialog code implementation of this framework method sets this dialog s return code to code Window CANCEL code and closes the dialog Subclasses may override if desired p protected void cancel Pressed launch Data workspace Selected null super cancel Pressed  cancelPressed launchData workspaceSelected cancelPressed
browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e Directory Dialog dialog new Directory Dialog get Shell dialog set Text IDE Workbench Messages get String Choose Workspace Dialog directory Browser Title NON NLS 1 dialog set Message IDE Workbench Messages get String Choose Workspace Dialog directory Browser Message NON NLS 1 dialog set Filter Path text get Text String dir dialog open if dir null text set Text dir  browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent DirectoryDialog DirectoryDialog getShell setText IDEWorkbenchMessages getString ChooseWorkspaceDialog directoryBrowserTitle setMessage IDEWorkbenchMessages getString ChooseWorkspaceDialog directoryBrowserMessage setFilterPath getText setText
The main area of the dialog is just a row with the current selection information and a drop down of the most recently used workspaces private void create Workspace Browse Row Composite parent Composite panel new Composite parent SWT NONE Grid Layout layout new Grid Layout 3 false layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING panel set Layout layout panel set Layout Data new Grid Data Grid Data FILL BOTH panel set Font parent get Font Label label new Label panel SWT NONE label set Text IDE Workbench Messages get String Choose Workspace Dialog workspace Entry Label NON NLS 1 text new Combo panel SWT BORDER SWT LEAD SWT DROP DOWN text set Layout Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data FILL HORIZONTAL set Initial Text Values text Button browse Button new Button panel SWT PUSH browse Button set Text IDE Workbench Messages get String Choose Workspace Dialog browse Label NON NLS 1 set Button Layout Data browse Button Grid Data data Grid Data browse Button get Layout Data data horizontal Alignment Grid Data HORIZONTAL ALIGN END browse Button set Layout Data data browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e Directory Dialog dialog new Directory Dialog get Shell dialog set Text IDE Workbench Messages get String Choose Workspace Dialog directory Browser Title NON NLS 1 dialog set Message IDE Workbench Messages get String Choose Workspace Dialog directory Browser Message NON NLS 1 dialog set Filter Path text get Text String dir dialog open if dir null text set Text dir  createWorkspaceBrowseRow GridLayout GridLayout marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING setLayout setLayoutData GridData GridData FILL_BOTH setFont getFont setText IDEWorkbenchMessages getString ChooseWorkspaceDialog workspaceEntryLabel DROP_DOWN setLayoutData GridData GridData GRAB_HORIZONTAL GridData FILL_HORIZONTAL setInitialTextValues browseButton browseButton setText IDEWorkbenchMessages getString ChooseWorkspaceDialog browseLabel setButtonLayoutData browseButton GridData GridData browseButton getLayoutData horizontalAlignment GridData HORIZONTAL_ALIGN_END browseButton setLayoutData browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent DirectoryDialog DirectoryDialog getShell setText IDEWorkbenchMessages getString ChooseWorkspaceDialog directoryBrowserTitle setMessage IDEWorkbenchMessages getString ChooseWorkspaceDialog directoryBrowserMessage setFilterPath getText setText
button set Selection launch Data get Show Dialog button add Selection Listener new Selection Adapter public void widget Selected Selection Event e launch Data toggle Show Dialog  setSelection launchData getShowDialog addSelectionListener SelectionAdapter widgetSelected SelectionEvent launchData toggleShowDialog
The show dialog button allows the user to choose to neven be nagged again private void create Show Dialog Button Composite parent Composite panel new Composite parent SWT NONE panel set Font parent get Font Grid Layout layout new Grid Layout 1 false layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN panel set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH data vertical Alignment Grid Data END panel set Layout Data data Button button new Button panel SWT CHECK button set Text IDE Workbench Messages get String Choose Workspace Dialog use Default Message NON NLS 1 button set Selection launch Data get Show Dialog button add Selection Listener new Selection Adapter public void widget Selected Selection Event e launch Data toggle Show Dialog  createShowDialogButton setFont getFont GridLayout GridLayout marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN setLayout GridData GridData GridData FILL_BOTH verticalAlignment GridData setLayoutData setText IDEWorkbenchMessages getString ChooseWorkspaceDialog useDefaultMessage setSelection launchData getShowDialog addSelectionListener SelectionAdapter widgetSelected SelectionEvent launchData toggleShowDialog
private void set Initial Text Values Combo text String recent Workspaces launch Data get Recent Workspaces for int i 0 i recent Workspaces length i if recent Workspaces i null text add recent Workspaces i text set Text text get Item Count 0 text get Item 0 launch Data get Initial Default  setInitialTextValues recentWorkspaces launchData getRecentWorkspaces recentWorkspaces recentWorkspaces recentWorkspaces setText getItemCount getItem launchData getInitialDefault

Constructor for Default Contributor Resource Adapter public Default Contributor Resource Adapter super  DefaultContributorResourceAdapter DefaultContributorResourceAdapter
Return the default instance used for Task List adapting public static I Contributor Resource Adapter get Default if singleton null singleton new Default Contributor Resource Adapter return singleton  TaskList IContributorResourceAdapter getDefault DefaultContributorResourceAdapter
see I Contributor Resource Adapter get Adapted Resource I Adaptable public I Resource get Adapted Resource I Adaptable adaptable return I Resource adaptable get Adapter I Resource class  IContributorResourceAdapter getAdaptedResource IAdaptable IResource getAdaptedResource IAdaptable IResource getAdapter IResource

private I Property Change Listener validity Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals Field Editor IS VALID update Valid State  IPropertyChangeListener validityChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty FieldEditor IS_VALID updateValidState
I Label Provider label Provider new Label Provider public String get Text Object element return String element  ILabelProvider labelProvider LabelProvider getText
Add another project to the list at the end private void add Project String current Items this build List get Items I Project all Projects get Workspace get Root get Projects I Label Provider label Provider new Label Provider public String get Text Object element return String element Simple List Content Provider contents Provider new Simple List Content Provider contents Provider set Elements sorted Difference all Projects current Items List Selection Dialog dialog new List Selection Dialog this get Shell this contents Provider label Provider PROJECT SELECTION MESSAGE if dialog open Dialog OK return Object result dialog get Result int current Items Length current Items length int result Length result length String new Items new String current Items Length result Length System arraycopy current Items 0 new Items 0 current Items Length System arraycopy result 0 new Items current Items Length result length this build List set Items new Items  addProject currentItems buildList getItems IProject allProjects getWorkspace getRoot getProjects ILabelProvider labelProvider LabelProvider getText SimpleListContentProvider contentsProvider SimpleListContentProvider contentsProvider setElements sortedDifference allProjects currentItems ListSelectionDialog ListSelectionDialog getShell contentsProvider labelProvider PROJECT_SELECTION_MESSAGE getResult currentItemsLength currentItems resultLength newItems currentItemsLength resultLength currentItems newItems currentItemsLength newItems currentItemsLength buildList setItems newItems
Updates the valid state of the page private void update Valid State set Valid max Iters Field is Valid  updateValidState setValid maxItersField isValid
Create the list of build paths If the current build order is empty make the list empty and disable it param composite the parent to create the list in param enabled the boolean that indcates if the list will be sensitive initially or not private void create Build Order List Composite composite boolean enabled Font font composite get Font this build Label new Label composite SWT NONE this build Label set Text LIST LABEL this build Label set Enabled enabled Grid Data grid Data new Grid Data grid Data horizontal Alignment Grid Data FILL grid Data horizontal Span 2 this build Label set Layout Data grid Data this build Label set Font font this build List new List composite SWT BORDER SWT MULTI SWT H SCROLL SWT V SCROLL this build List set Enabled enabled Grid Data data new Grid Data Set height Hint with a small value so the list size will be defined by the space available in the dialog instead of resizing the dialog to fit all the items in the list data height Hint build List get Item Height data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true data grab Excess Vertical Space true this build List set Layout Data data this build List set Font font  createBuildOrderList getFont buildLabel buildLabel setText LIST_LABEL buildLabel setEnabled GridData gridData GridData gridData horizontalAlignment GridData gridData horizontalSpan buildLabel setLayoutData gridData buildLabel setFont buildList H_SCROLL V_SCROLL buildList setEnabled GridData GridData heightHint heightHint buildList getItemHeight verticalAlignment GridData horizontalAlignment GridData grabExcessHorizontalSpace grabExcessVerticalSpace buildList setLayoutData buildList setFont
Create the widgets that are used to determine the build order param parent the parent composite return the new control protected Control create Contents Composite parent Workbench Help set Help parent I Help Context Ids BUILD ORDER PREFERENCE PAGE Font font parent get Font The main composite Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width 0 layout margin Height 0 composite set Layout layout Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL composite set Layout Data data composite set Font font String build Order get Current Build Order boolean use Default build Order null create Default Path Button composite use Default List always enabled so user can scroll list Only the buttons need to be disabled create Build Order List composite true create List Buttons composite use Default Composite note Composite create Note Composite font composite NOTE LABEL REMOVE MESSAGE Grid Data note Data new Grid Data note Data horizontal Span 2 note Composite set Layout Data note Data create Spacer composite create Max Iterations Field composite create Spacer composite if use Default this build List set Items get Default Project Order else this build List set Items build Order return composite  createContents WorkbenchHelp setHelp IHelpContextIds BUILD_ORDER_PREFERENCE_PAGE getFont GridLayout GridLayout numColumns marginWidth marginHeight setLayout GridData GridData verticalAlignment GridData horizontalAlignment GridData setLayoutData setFont buildOrder getCurrentBuildOrder useDefault buildOrder createDefaultPathButton useDefault createBuildOrderList createListButtons useDefault noteComposite createNoteComposite NOTE_LABEL REMOVE_MESSAGE GridData noteData GridData noteData horizontalSpan noteComposite setLayoutData noteData createSpacer createMaxIterationsField createSpacer useDefault buildList setItems getDefaultProjectOrder buildList setItems buildOrder
Adds in a spacer param composite the parent composite private void create Spacer Composite composite Label spacer new Label composite SWT NONE Grid Data spacer Data new Grid Data spacer Data horizontal Span 2 spacer set Layout Data spacer Data  createSpacer GridData spacerData GridData spacerData horizontalSpan setLayoutData spacerData
this default Order Button set Text DEFAULTS LABEL Selection Listener listener new Selection Adapter public void widget Selected Selection Event e defaults Button Selected default Order Button get Selection  defaultOrderButton setText DEFAULTS_LABEL SelectionListener SelectionAdapter widgetSelected SelectionEvent defaultsButtonSelected defaultOrderButton getSelection
Create the default path button Set it to selected based on the current workspace build path param composite org eclipse swt widgets Composite param selected the boolean that indicates the buttons initial state private void create Default Path Button Composite composite boolean selected default Order Initially Selected selected this default Order Button new Button composite SWT LEFT SWT CHECK this default Order Button set Selection selected this default Order Button set Text DEFAULTS LABEL Selection Listener listener new Selection Adapter public void widget Selected Selection Event e defaults Button Selected default Order Button get Selection this default Order Button add Selection Listener listener Grid Data grid Data new Grid Data grid Data horizontal Alignment Grid Data FILL grid Data horizontal Span 2 this default Order Button set Layout Data grid Data this default Order Button set Font composite get Font  createDefaultPathButton defaultOrderInitiallySelected defaultOrderButton defaultOrderButton setSelection defaultOrderButton setText DEFAULTS_LABEL SelectionListener SelectionAdapter widgetSelected SelectionEvent defaultsButtonSelected defaultOrderButton getSelection defaultOrderButton addSelectionListener GridData gridData GridData gridData horizontalAlignment GridData gridData horizontalSpan defaultOrderButton setLayoutData gridData defaultOrderButton setFont getFont
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e move Selection Up  SelectionListener SelectionAdapter widgetSelected SelectionEvent moveSelectionUp
down Button set Enabled enable Composite listener new Selection Adapter public void widget Selected Selection Event e move Selection Down  downButton setEnabled enableComposite SelectionAdapter widgetSelected SelectionEvent moveSelectionDown
add Button set Text ADD LABEL listener new Selection Adapter public void widget Selected Selection Event e add Project  addButton setText ADD_LABEL SelectionAdapter widgetSelected SelectionEvent addProject
remove Button set Text REMOVE LABEL listener new Selection Adapter public void widget Selected Selection Event e remove Selection  removeButton setText REMOVE_LABEL SelectionAdapter widgetSelected SelectionEvent removeSelection
Create the buttons used to manipulate the list These Add Remove and Move Up or Down the list items param composite the parent of the buttons param enable Composite boolean that indicates if a composite should be enabled private void create List Buttons Composite composite boolean enable Composite Font font composite get Font Create an intermeditate composite to keep the buttons in the same column this button Composite new Composite composite SWT RIGHT Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 this button Composite set Layout layout Grid Data grid Data new Grid Data grid Data vertical Alignment Grid Data FILL grid Data horizontal Alignment Grid Data FILL this button Composite set Layout Data grid Data this button Composite set Font font Button up Button new Button this button Composite SWT CENTER SWT PUSH up Button set Text UP LABEL up Button set Enabled enable Composite up Button set Font font set Button Layout Data up Button Selection Listener listener new Selection Adapter public void widget Selected Selection Event e move Selection Up up Button add Selection Listener listener Button down Button new Button this button Composite SWT CENTER SWT PUSH down Button set Text DOWN LABEL down Button set Enabled enable Composite listener new Selection Adapter public void widget Selected Selection Event e move Selection Down down Button add Selection Listener listener down Button set Font font set Button Layout Data down Button Button add Button new Button this button Composite SWT CENTER SWT PUSH add Button set Text ADD LABEL listener new Selection Adapter public void widget Selected Selection Event e add Project add Button add Selection Listener listener add Button set Enabled enable Composite add Button set Font font set Button Layout Data add Button Button remove Button new Button this button Composite SWT CENTER SWT PUSH remove Button set Text REMOVE LABEL listener new Selection Adapter public void widget Selected Selection Event e remove Selection remove Button add Selection Listener listener remove Button set Enabled enable Composite remove Button set Font font set Button Layout Data remove Button  enableComposite createListButtons enableComposite getFont buttonComposite GridLayout GridLayout marginWidth marginHeight buttonComposite setLayout GridData gridData GridData gridData verticalAlignment GridData gridData horizontalAlignment GridData buttonComposite setLayoutData gridData buttonComposite setFont upButton buttonComposite upButton setText UP_LABEL upButton setEnabled enableComposite upButton setFont setButtonLayoutData upButton SelectionListener SelectionAdapter widgetSelected SelectionEvent moveSelectionUp upButton addSelectionListener downButton buttonComposite downButton setText DOWN_LABEL downButton setEnabled enableComposite SelectionAdapter widgetSelected SelectionEvent moveSelectionDown downButton addSelectionListener downButton setFont setButtonLayoutData downButton addButton buttonComposite addButton setText ADD_LABEL SelectionAdapter widgetSelected SelectionEvent addProject addButton addSelectionListener addButton setEnabled enableComposite addButton setFont setButtonLayoutData addButton removeButton buttonComposite removeButton setText REMOVE_LABEL SelectionAdapter widgetSelected SelectionEvent removeSelection removeButton addSelectionListener removeButton setEnabled enableComposite removeButton setFont setButtonLayoutData removeButton
max Iters Field new Integer Field Editor IDE Workbench Messages get String Build Order Preference max Iterations Label max Iters Composite NON NLS 1 NON NLS 2 protected void do Load Text text get Text Control if text null int value get Workspace get Description get Max Build Iterations text set Text Integer to String value  maxItersField IntegerFieldEditor IDEWorkbenchMessages getString BuildOrderPreference maxIterationsLabel maxItersComposite doLoad getTextControl getWorkspace getDescription getMaxBuildIterations setText toString
protected void do Load Default Text text get Text Control if text null int value Resources Plugin get Plugin get Plugin Preferences get Default Int Resources Plugin PREF MAX BUILD ITERATIONS text set Text Integer to String value value Changed  doLoadDefault getTextControl ResourcesPlugin getPlugin getPluginPreferences getDefaultInt ResourcesPlugin PREF_MAX_BUILD_ITERATIONS setText toString valueChanged
value Changed protected void do Store handled specially in performOK throw new Unsupported Operation Exception  valueChanged doStore UnsupportedOperationException
Create the field for the maximum number of iterations in the presence of cycles private void create Max Iterations Field Composite composite Composite max Iters Composite new Composite composite SWT NONE Grid Data gd new Grid Data Grid Data FILL HORIZONTAL max Iters Composite set Layout Data gd max Iters Composite set Font composite get Font max Iters Field new Integer Field Editor IDE Workbench Messages get String Build Order Preference max Iterations Label max Iters Composite NON NLS 1 NON NLS 2 protected void do Load Text text get Text Control if text null int value get Workspace get Description get Max Build Iterations text set Text Integer to String value protected void do Load Default Text text get Text Control if text null int value Resources Plugin get Plugin get Plugin Preferences get Default Int Resources Plugin PREF MAX BUILD ITERATIONS text set Text Integer to String value value Changed protected void do Store handled specially in performOK throw new Unsupported Operation Exception max Iters Field set Valid Range 1 Integer MAX VALUE max Iters Field set Preference Page this max Iters Field set Preference Store get Preference Store max Iters Field set Property Change Listener validity Change Listener max Iters Field load  createMaxIterationsField maxItersComposite GridData GridData GridData FILL_HORIZONTAL maxItersComposite setLayoutData maxItersComposite setFont getFont maxItersField IntegerFieldEditor IDEWorkbenchMessages getString BuildOrderPreference maxIterationsLabel maxItersComposite doLoad getTextControl getWorkspace getDescription getMaxBuildIterations setText toString doLoadDefault getTextControl ResourcesPlugin getPlugin getPluginPreferences getDefaultInt ResourcesPlugin PREF_MAX_BUILD_ITERATIONS setText toString valueChanged doStore UnsupportedOperationException maxItersField setValidRange MAX_VALUE maxItersField setPreferencePage maxItersField setPreferenceStore getPreferenceStore maxItersField setPropertyChangeListener validityChangeListener maxItersField
The defaults button has been selected update the other widgets as required param selected whether or not the defaults button got selected private void defaults Button Selected boolean selected if selected set Build Order Widgets Enablement false Cache the current value as the custom order custom Build Order build List get Items build List set Items get Default Project Order else set Build Order Widgets Enablement true String build Order get Current Build Order if build Order null build List set Items get Default Project Order else build List set Items build Order  defaultsButtonSelected setBuildOrderWidgetsEnablement customBuildOrder buildList getItems buildList setItems getDefaultProjectOrder setBuildOrderWidgetsEnablement buildOrder getCurrentBuildOrder buildOrder buildList setItems getDefaultProjectOrder buildList setItems buildOrder
Get the project names for the current custom build order stored in the workspace description return java lang String or null if there is no setting private String get Current Build Order if not Checked Build Order custom Build Order get Workspace get Description get Build Order not Checked Build Order false return custom Build Order  getCurrentBuildOrder notCheckedBuildOrder customBuildOrder getWorkspace getDescription getBuildOrder notCheckedBuildOrder customBuildOrder
Get the project names in the default build order based on the current Workspace settings return java lang String private String get Default Project Order if default Build Order null I Workspace workspace get Workspace I Workspace Project Order project Order get Workspace compute Project Order workspace get Root get Projects I Project found Projects project Order projects default Build Order new String found Projects length int found Size found Projects length for int i 0 i found Size i default Build Order i found Projects i get Name return default Build Order  getDefaultProjectOrder defaultBuildOrder IWorkspace getWorkspace IWorkspace ProjectOrder projectOrder getWorkspace computeProjectOrder getRoot getProjects IProject foundProjects projectOrder defaultBuildOrder foundProjects foundSize foundProjects foundSize defaultBuildOrder foundProjects getName defaultBuildOrder
Return the Workspace the build order is from return org eclipse core resources I Workspace private I Workspace get Workspace return Resources Plugin get Workspace  IWorkspace IWorkspace getWorkspace ResourcesPlugin getWorkspace
Return whether or not search Element is in test Array private boolean includes String test Array String search Element for int i 0 i test Array length i if search Element equals test Array i return true return false  searchElement testArray testArray searchElement testArray searchElement testArray
See I Workbench Preference Page This class does nothing with he Workbench public void init I Workbench workbench this workbench workbench set Preference Store workbench get Preference Store  IWorkbenchPreferencePage IWorkbench setPreferenceStore getPreferenceStore
Move the current selection in the build list down private void move Selection Down Only do this operation on a single selection if this build List get Selection Count 1 int current Index this build List get Selection Index if current Index this build List get Item Count 1 String element To Move this build List get Item current Index this build List remove current Index this build List add element To Move current Index 1 this build List select current Index 1  moveSelectionDown buildList getSelectionCount currentIndex buildList getSelectionIndex currentIndex buildList getItemCount elementToMove buildList getItem currentIndex buildList currentIndex buildList elementToMove currentIndex buildList currentIndex
Move the current selection in the build list up private void move Selection Up int current Index this build List get Selection Index Only do this operation on a single selection if current Index 0 this build List get Selection Count 1 String element To Move this build List get Item current Index this build List remove current Index this build List add element To Move current Index 1 this build List select current Index 1  moveSelectionUp currentIndex buildList getSelectionIndex currentIndex buildList getSelectionCount elementToMove buildList getItem currentIndex buildList currentIndex buildList elementToMove currentIndex buildList currentIndex
Performs special processing when this page s Defaults button has been pressed In this case change the default Order Button to have it s selection set to true protected void perform Defaults this default Order Button set Selection true defaults Button Selected true max Iters Field load Default super perform Defaults  defaultOrderButton performDefaults defaultOrderButton setSelection defaultsButtonSelected maxItersField loadDefault performDefaults
OK has been pressed If the defualt button is pressed then reset the build order to false otherwise set it to the contents of the list public boolean perform Ok String build Order null boolean use Default default Order Button get Selection if use defaults is turned off if use Default build Order build List get Items Get a copy of the description from the workspace set the build order and then apply it to the workspace I Workspace Description description get Workspace get Description description set Build Order build Order description set Max Build Iterations max Iters Field get Int Value try get Workspace set Description description catch Core Exception exception failed return false return false Perform auto build if use default is off because order could have changed or if use default setting was changed if use Default use Default default Order Initially Selected default Order Initially Selected use Default If auto build is turned on then do a global incremental build on all the projects if Resources Plugin get Workspace is Auto Building Global Build Action action new Global Build Action workbench get Active Workbench Window Incremental Project Builder INCREMENTAL BUILD action do Build Clear the custom build order cache custom Build Order null return true  performOk buildOrder useDefault defaultOrderButton getSelection useDefault buildOrder buildList getItems IWorkspaceDescription getWorkspace getDescription setBuildOrder buildOrder setMaxBuildIterations maxItersField getIntValue getWorkspace setDescription CoreException useDefault useDefault defaultOrderInitiallySelected defaultOrderInitiallySelected useDefault ResourcesPlugin getWorkspace isAutoBuilding GlobalBuildAction GlobalBuildAction getActiveWorkbenchWindow IncrementalProjectBuilder INCREMENTAL_BUILD doBuild customBuildOrder
Remove the current selection in the build list private void remove Selection this build List remove this build List get Selection Indices  removeSelection buildList buildList getSelectionIndices
Set the widgets that select build order to be enabled or diabled param value boolean private void set Build Order Widgets Enablement boolean value Only change enablement of buttons Leave list alone because you can t scroll it when disabled Control children this button Composite get Children for int i 0 i children length i children i set Enabled value  setBuildOrderWidgetsEnablement buttonComposite getChildren setEnabled
Return a sorted array of the names of the projects that are already in the currently displayed names return String param all Projects all of the projects in the workspace param currently Displayed the names of the projects already being displayed private String sorted Difference I Project all Projects String currently Displayed Tree Set difference new Tree Set for int i 0 i all Projects length i if includes currently Displayed all Projects i get Name difference add all Projects i get Name String return Value new String difference size difference to Array return Value return return Value  allProjects currentlyDisplayed sortedDifference IProject allProjects currentlyDisplayed TreeSet TreeSet allProjects currentlyDisplayed allProjects getName allProjects getName returnValue toArray returnValue returnValue

private I Workbench Window window Gets the text of the clean dialog depending on whether the workspace is currently in autobuild mode return String the question the user will be asked private static String get Question boolean auto Building Resources Plugin get Workspace is Auto Building if auto Building return IDE Workbench Messages get String Clean Dialog build Clean Auto NON NLS 1 return IDE Workbench Messages get String Clean Dialog build Clean Manual NON NLS 1  IWorkbenchWindow getQuestion autoBuilding ResourcesPlugin getWorkspace isAutoBuilding autoBuilding IDEWorkbenchMessages getString CleanDialog buildCleanAuto IDEWorkbenchMessages getString CleanDialog buildCleanManual
Creates a new clean dialog param window the window to create it in param selection the currently selected projects may be empty public Clean Dialog I Workbench Window window I Project selection super window get Shell IDE Workbench Messages get String Clean Dialog title null get Question QUESTION new String NON NLS 1 I Dialog Constants OK LABEL I Dialog Constants CANCEL LABEL 0 this window window this selection selection if this selection null this selection new Object 0  CleanDialog IWorkbenchWindow IProject getShell IDEWorkbenchMessages getString CleanDialog getQuestion IDialogConstants OK_LABEL IDialogConstants CANCEL_LABEL
protected void browse Pressed I Label Provider label Provider new Workbench Label Provider Element List Selection Dialog dialog new Element List Selection Dialog get Shell label Provider dialog set Multiple Selection true dialog set Title Project Selection NON NLS 1 dialog set Message Chose projects to clean NON NLS 1 dialog set Elements Resources Plugin get Workspace get Root get Projects dialog set Initial Selections new Object selection if dialog open Window OK selection dialog get Result if selection null selection new Object 0 set Project Name update Enablement  browsePressed ILabelProvider labelProvider WorkbenchLabelProvider ElementListSelectionDialog ElementListSelectionDialog getShell labelProvider setMultipleSelection setTitle setMessage setElements ResourcesPlugin getWorkspace getRoot getProjects setInitialSelections getResult setProjectName updateEnablement
PlatformUI get Workbench get Progress Service busy Cursor While new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception do Clean clean All monitor  getWorkbench getProgressService busyCursorWhile WorkspaceModifyOperation IProgressMonitor CoreException doClean cleanAll
protected void button Pressed int button Id final boolean clean All all Button get Selection final boolean build All build Now Button null build Now Button get Selection super button Pressed button Id if button Id I Dialog Constants OK ID try batching changes ensures that autobuild runs after cleaning PlatformUI get Workbench get Progress Service busy Cursor While new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception do Clean clean All monitor see if a build was requested if build All start an immediate workspace build Global Build Action build new Global Build Action window Incremental Project Builder INCREMENTAL BUILD build run catch Invocation Target Exception e we only throw Core Exception above Throwable target e get Target Exception if target instanceof Core Exception Error Dialog open Error get Shell null null Core Exception target get Status catch Interrupted Exception e cancelation  buttonPressed buttonId cleanAll allButton getSelection buildAll buildNowButton buildNowButton getSelection buttonPressed buttonId buttonId IDialogConstants OK_ID getWorkbench getProgressService busyCursorWhile WorkspaceModifyOperation IProgressMonitor CoreException doClean cleanAll buildAll GlobalBuildAction GlobalBuildAction IncrementalProjectBuilder INCREMENTAL_BUILD InvocationTargetException CoreException getTargetException CoreException ErrorDialog openError getShell CoreException getStatus InterruptedException
protected void create Buttons For Button Bar Composite parent only need to prompt for immediate build if autobuild is off if Resources Plugin get Workspace is Auto Building increment the number of columns in the button bar Grid Layout layout Grid Layout parent get Layout layout num Columns 2 layout make Columns Equal Width false build Now Button new Button parent SWT CHECK build Now Button set Text IDE Workbench Messages get String Clean Dialog build Now Button NON NLS 1 build Now Button set Selection true build Now Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN BEGINNING create some horizontal space before the ok and cancel buttons Label spacer new Label parent SWT NONE Grid Data data new Grid Data data horizontal Alignment Grid Data FILL data width Hint 200 spacer set Layout Data data super create Buttons For Button Bar parent  createButtonsForButtonBar ResourcesPlugin getWorkspace isAutoBuilding GridLayout GridLayout getLayout numColumns makeColumnsEqualWidth buildNowButton buildNowButton setText IDEWorkbenchMessages getString CleanDialog buildNowButton buildNowButton setSelection buildNowButton setLayoutData GridData GridData HORIZONTAL_ALIGN_BEGINNING GridData GridData horizontalAlignment GridData widthHint setLayoutData createButtonsForButtonBar
radio Group set Layout Data new Grid Data Grid Data FILL BOTH Selection Listener update Enablement new Selection Adapter public void widget Selected Selection Event e update Enablement  radioGroup setLayoutData GridData GridData FILL_BOTH SelectionListener updateEnablement SelectionAdapter widgetSelected SelectionEvent updateEnablement
set Button Layout Data browse browse add Selection Listener new Selection Adapter public void widget Selected Selection Event e browse Pressed  setButtonLayoutData addSelectionListener SelectionAdapter widgetSelected SelectionEvent browsePressed
protected Control create Custom Area Composite parent Composite radio Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width layout margin Height 0 layout num Columns 3 radio Group set Layout layout radio Group set Layout Data new Grid Data Grid Data FILL BOTH Selection Listener update Enablement new Selection Adapter public void widget Selected Selection Event e update Enablement first row all Button new Button radio Group SWT RADIO all Button set Text IDE Workbench Messages get String Clean Dialog clean All Button NON NLS 1 all Button set Selection true all Button add Selection Listener update Enablement empty label to fill rest of grid row new Label radio Group SWT NONE new Label radio Group SWT NONE second row selected Button new Button radio Group SWT RADIO selected Button set Text IDE Workbench Messages get String Clean Dialog clean Selected Button NON NLS 1 selected Button add Selection Listener update Enablement project Name new Text radio Group SWT READ ONLY SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint I Dialog Constants ENTRY FIELD WIDTH project Name set Layout Data data set Project Name Button browse new Button radio Group SWT PUSH browse set Text IDE Workbench Messages get String Clean Dialog browse NON NLS 1 set Button Layout Data browse browse add Selection Listener new Selection Adapter public void widget Selected Selection Event e browse Pressed return radio Group  createCustomArea radioGroup GridLayout GridLayout marginWidth marginHeight numColumns radioGroup setLayout radioGroup setLayoutData GridData GridData FILL_BOTH SelectionListener updateEnablement SelectionAdapter widgetSelected SelectionEvent updateEnablement allButton radioGroup allButton setText IDEWorkbenchMessages getString CleanDialog cleanAllButton allButton setSelection allButton addSelectionListener updateEnablement radioGroup radioGroup selectedButton radioGroup selectedButton setText IDEWorkbenchMessages getString CleanDialog cleanSelectedButton selectedButton addSelectionListener updateEnablement projectName radioGroup READ_ONLY GridData GridData GridData FILL_HORIZONTAL widthHint IDialogConstants ENTRY_FIELD_WIDTH projectName setLayoutData setProjectName radioGroup setText IDEWorkbenchMessages getString CleanDialog setButtonLayoutData addSelectionListener SelectionAdapter widgetSelected SelectionEvent browsePressed radioGroup
Performs the actual clean operation param clean All if code true true clean all projects param monitor The monitor that the build will report to throws Core Exception thrown if there is a problem from the core builder protected void do Clean boolean clean All I Progress Monitor monitor throws Core Exception if clean All Resources Plugin get Workspace build Incremental Project Builder CLEAN BUILD monitor else try monitor begin Task IDE Workbench Messages get String Clean Dialog task Name NON NLS 1 selection length for int i 0 i selection length i I Project selection i build Incremental Project Builder CLEAN BUILD new Sub Progress Monitor monitor 1 finally monitor done  cleanAll CoreException doClean cleanAll IProgressMonitor CoreException cleanAll ResourcesPlugin getWorkspace IncrementalProjectBuilder CLEAN_BUILD beginTask IDEWorkbenchMessages getString CleanDialog taskName IProject IncrementalProjectBuilder CLEAN_BUILD SubProgressMonitor
Fills in the name of the project in the text area private void set Project Name if selection length 0 project Name set Text IDE Workbench Messages get String Clean Dialog no Selection NON NLS 1 else String Buffer names new String Buffer I Project selection 0 get Name for int i 1 i selection length i names append names append I Project selection i get Name project Name set Text names to String  setProjectName projectName setText IDEWorkbenchMessages getString CleanDialog noSelection StringBuffer StringBuffer IProject getName IProject getName projectName setText toString
Updates the enablement of the dialog s ok button based on the current choices in the dialog protected void update Enablement boolean enabled all Button get Selection selection length 0 get Button OK set Enabled enabled  updateEnablement allButton getSelection getButton setEnabled

public class Configuration Log Update Section implements I System Summary Section public void write Print Writer writer I Local Site site try site Site Manager get Local Site catch Core Exception e e print Stack Trace writer return I Install Configuration configurations site get Configuration History for int i 0 i configurations length i writer println if i 0 writer println NON NLS 1 writer println IDE Workbench Messages format System Summary configuration new Object configurations i get Label NON NLS 1 writer println IDE Workbench Messages format System Summary is Current Configuration new Object new Boolean configurations i is Current NON NLS 1 I Activity activities configurations i get Activities for int j 0 j activities length j writer println writer println IDE Workbench Messages format System Summary date new Object activities j get Date NON NLS 1 writer println IDE Workbench Messages format System Summary target new Object activities j get Label NON NLS 1 writer println IDE Workbench Messages format System Summary action new Object get Action Label activities j NON NLS 1 writer println IDE Workbench Messages format System Summary status new Object get Status Label activities j NON NLS 1  ConfigurationLogUpdateSection ISystemSummarySection PrintWriter ILocalSite SiteManager getLocalSite CoreException printStackTrace IInstallConfiguration getConfigurationHistory IDEWorkbenchMessages SystemSummary getLabel IDEWorkbenchMessages SystemSummary isCurrentConfiguration isCurrent IActivity getActivities IDEWorkbenchMessages SystemSummary getDate IDEWorkbenchMessages SystemSummary getLabel IDEWorkbenchMessages SystemSummary getActionLabel IDEWorkbenchMessages SystemSummary getStatusLabel
private String get Action Label I Activity activity int action activity get Action switch action case I Activity ACTION CONFIGURE return IDE Workbench Messages get String System Summary activity enabled NON NLS 1 case I Activity ACTION FEATURE INSTALL return IDE Workbench Messages get String System Summary activity feature Installed NON NLS 1 case I Activity ACTION FEATURE REMOVE return IDE Workbench Messages get String System Summary activity feature Removed NON NLS 1 case I Activity ACTION SITE INSTALL return IDE Workbench Messages get String System Summary activity site Installed NON NLS 1 case I Activity ACTION SITE REMOVE return IDE Workbench Messages get String System Summary activity site Removed NON NLS 1 case I Activity ACTION UNCONFIGURE return IDE Workbench Messages get String System Summary activity disabled NON NLS 1 case I Activity ACTION REVERT return IDE Workbench Messages get String System Summary activity revert NON NLS 1 case I Activity ACTION RECONCILIATION return IDE Workbench Messages get String System Summary activity reconcile NON NLS 1 case I Activity ACTION ADD PRESERVED return IDE Workbench Messages get String System Summary activity preserved NON NLS 1 default return IDE Workbench Messages get String System Summary activity unknown NON NLS 1  getActionLabel IActivity getAction IActivity ACTION_CONFIGURE IDEWorkbenchMessages getString SystemSummary IActivity ACTION_FEATURE_INSTALL IDEWorkbenchMessages getString SystemSummary featureInstalled IActivity ACTION_FEATURE_REMOVE IDEWorkbenchMessages getString SystemSummary featureRemoved IActivity ACTION_SITE_INSTALL IDEWorkbenchMessages getString SystemSummary siteInstalled IActivity ACTION_SITE_REMOVE IDEWorkbenchMessages getString SystemSummary siteRemoved IActivity ACTION_UNCONFIGURE IDEWorkbenchMessages getString SystemSummary IActivity ACTION_REVERT IDEWorkbenchMessages getString SystemSummary IActivity ACTION_RECONCILIATION IDEWorkbenchMessages getString SystemSummary IActivity ACTION_ADD_PRESERVED IDEWorkbenchMessages getString SystemSummary IDEWorkbenchMessages getString SystemSummary
private String get Status Label I Activity activity switch activity get Status case I Activity STATUS OK return IDE Workbench Messages get String System Summary activity status success NON NLS 1 case I Activity STATUS NOK return IDE Workbench Messages get String System Summary activity status failure NON NLS 1 return IDE Workbench Messages get String System Summary activity status unknown NON NLS 1  getStatusLabel IActivity getStatus IActivity STATUS_OK IDEWorkbenchMessages getString SystemSummary IActivity STATUS_NOK IDEWorkbenchMessages getString SystemSummary IDEWorkbenchMessages getString SystemSummary

Creates a link target group param type specifies the type of resource to link to code I Resource FILE code or code I Resource FOLDER code param listener listener to notify when one of the widgets value is changed public Create Linked Resource Group int type Listener listener this type type this listener listener  IResource IResource CreateLinkedResourceGroup
Creates the widgets param parent parent composite of the widget group return the widget group public Composite create Contents Composite parent Font font parent get Font initialize Dialog Units parent top level group group Composite new Composite parent SWT NONE Grid Layout layout new Grid Layout group Composite set Layout layout group Composite set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data FILL HORIZONTAL group Composite set Font font final Button create Link Button new Button group Composite SWT CHECK if type I Resource FILE create Link Button set Text IDE Workbench Messages get String Create Linked Resource Group link File Button NON NLS 1 else create Link Button set Text IDE Workbench Messages get String Create Linked Resource Group link Folder Button NON NLS 1 create Link Button set Selection create Link create Link Button set Font font Selection Listener selection Listener new Selection Adapter public void widget Selected Selection Event e create Link create Link Button get Selection browse Button set Enabled create Link variables Button set Enabled create Link link Target Field set Enabled create Link if listener null listener handle Event new Event create Link Button add Selection Listener selection Listener create Link Location Group group Composite create Link return group Composite  createContents getFont initializeDialogUnits groupComposite GridLayout GridLayout groupComposite setLayout groupComposite setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData FILL_HORIZONTAL groupComposite setFont createLinkButton groupComposite IResource createLinkButton setText IDEWorkbenchMessages getString CreateLinkedResourceGroup linkFileButton createLinkButton setText IDEWorkbenchMessages getString CreateLinkedResourceGroup linkFolderButton createLinkButton setSelection createLink createLinkButton setFont SelectionListener selectionListener SelectionAdapter widgetSelected SelectionEvent createLink createLinkButton getSelection browseButton setEnabled createLink variablesButton setEnabled createLink linkTargetField setEnabled createLink handleEvent createLinkButton addSelectionListener selectionListener createLinkLocationGroup groupComposite createLink groupComposite
Creates the link target location widgets param location Group the parent composite param enabled sets the initial enabled state of the widgets private void create Link Location Group Composite location Group boolean enabled Font font location Group get Font Button button new Button location Group SWT CHECK int indent button compute Size SWT DEFAULT SWT DEFAULT x button dispose link Target Group is necessary to decouple layout from resolved Path Group layout Composite link Target Group new Composite location Group SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 layout margin Height 0 layout margin Width 0 link Target Group set Layout layout Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Indent indent link Target Group set Layout Data data link Target Group set Font font link target location entry field link Target Field new Text link Target Group SWT BORDER data new Grid Data Grid Data FILL HORIZONTAL data width Hint I Dialog Constants ENTRY FIELD WIDTH link Target Field set Layout Data data link Target Field set Font font link Target Field set Enabled enabled link Target Field add Modify Listener new Modify Listener public void modify Text Modify Event e link Target link Target Field get Text resolve Variable if listener null listener handle Event new Event browse button browse Button new Button link Target Group SWT PUSH set Button Layout Data browse Button browse Button set Font font browse Button set Text IDE Workbench Messages get String Create Linked Resource Group browse Button NON NLS 1 browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Link Target Browse Button Pressed browse Button set Enabled enabled variables button variables Button new Button link Target Group SWT PUSH set Button Layout Data variables Button variables Button set Font font variables Button set Text IDE Workbench Messages get String Create Linked Resource Group variables Button NON NLS 1 variables Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Variables Button Pressed variables Button set Enabled enabled Composite resolved Path Group new Composite location Group SWT NONE layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 resolved Path Group set Layout layout data new Grid Data Grid Data FILL HORIZONTAL data horizontal Indent indent resolved Path Group set Layout Data data resolved Path Group set Font font resolved Path Label Text new Label resolved Path Group SWT SINGLE resolved Path Label Text set Text IDE Workbench Messages get String Create Linked Resource Group resolved Path Label NON NLS 1 resolved Path Label Text set Visible false resolved Path Label Data new Label resolved Path Group SWT SINGLE data new Grid Data Grid Data FILL HORIZONTAL resolved Path Label Data set Layout Data data resolved Path Label Data set Visible false if link Target null link Target Field set Text link Target  locationGroup createLinkLocationGroup locationGroup locationGroup getFont locationGroup computeSize linkTargetGroup resolvedPathGroup linkTargetGroup locationGroup GridLayout GridLayout numColumns marginHeight marginWidth linkTargetGroup setLayout GridData GridData GridData FILL_HORIZONTAL horizontalIndent linkTargetGroup setLayoutData linkTargetGroup setFont linkTargetField linkTargetGroup GridData GridData FILL_HORIZONTAL widthHint IDialogConstants ENTRY_FIELD_WIDTH linkTargetField setLayoutData linkTargetField setFont linkTargetField setEnabled linkTargetField addModifyListener ModifyListener modifyText ModifyEvent linkTarget linkTargetField getText resolveVariable handleEvent browseButton linkTargetGroup setButtonLayoutData browseButton browseButton setFont browseButton setText IDEWorkbenchMessages getString CreateLinkedResourceGroup browseButton browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLinkTargetBrowseButtonPressed browseButton setEnabled variablesButton linkTargetGroup setButtonLayoutData variablesButton variablesButton setFont variablesButton setText IDEWorkbenchMessages getString CreateLinkedResourceGroup variablesButton variablesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleVariablesButtonPressed variablesButton setEnabled resolvedPathGroup locationGroup GridLayout numColumns marginHeight marginWidth resolvedPathGroup setLayout GridData GridData FILL_HORIZONTAL horizontalIndent resolvedPathGroup setLayoutData resolvedPathGroup setFont resolvedPathLabelText resolvedPathGroup resolvedPathLabelText setText IDEWorkbenchMessages getString CreateLinkedResourceGroup resolvedPathLabel resolvedPathLabelText setVisible resolvedPathLabelData resolvedPathGroup GridData GridData FILL_HORIZONTAL resolvedPathLabelData setLayoutData resolvedPathLabelData setVisible linkTarget linkTargetField setText linkTarget
Returns a new status object with the given severity and message return a new status object with the given severity and message private I Status create Status int severity String message return new Status severity IDE Workbench Plugin get Default get Descriptor get Unique Identifier severity message null  IStatus createStatus IDEWorkbenchPlugin getDefault getDescriptor getUniqueIdentifier
Disposes the group s widgets public void dispose if group Composite null group Composite is Disposed false group Composite dispose  groupComposite groupComposite isDisposed groupComposite
Returns the link target location entered by the user return the link target location entered by the user null if the user chose not to create a link public String get Link Target if create Link return link Target return null  getLinkTarget createLink linkTarget
Opens a file or directory browser depending on the link type private void handle Link Target Browse Button Pressed File file null String selection null if equals link Target false NON NLS 1 file new File link Target if file exists false file null if type I Resource FILE File Dialog dialog new File Dialog link Target Field get Shell if file null if file is File dialog set File Name link Target else dialog set Filter Path link Target selection dialog open else Directory Dialog dialog new Directory Dialog link Target Field get Shell if file null String path link Target if file is File path file get Parent if path null dialog set Filter Path path dialog set Message IDE Workbench Messages get String Create Linked Resource Group target Selection Label NON NLS 1 selection dialog open if selection null link Target Field set Text selection  handleLinkTargetBrowseButtonPressed linkTarget linkTarget IResource FileDialog FileDialog linkTargetField getShell isFile setFileName linkTarget setFilterPath linkTarget DirectoryDialog DirectoryDialog linkTargetField getShell linkTarget isFile getParent setFilterPath setMessage IDEWorkbenchMessages getString CreateLinkedResourceGroup targetSelectionLabel linkTargetField setText
Opens a path variable selection dialog private void handle Variables Button Pressed int variable Types I Resource FOLDER allow selecting file and folder variables when creating a linked file if type I Resource FILE variable Types I Resource FILE Path Variable Selection Dialog dialog new Path Variable Selection Dialog link Target Field get Shell variable Types if dialog open I Dialog Constants OK ID String variable Names String dialog get Result if variable Names null variable Names length 1 link Target Field set Text variable Names 0  handleVariablesButtonPressed variableTypes IResource IResource variableTypes IResource PathVariableSelectionDialog PathVariableSelectionDialog linkTargetField getShell variableTypes IDialogConstants OK_ID variableNames getResult variableNames variableNames linkTargetField setText variableNames
Initializes the computation of horizontal and vertical dialog units based on the size of current font p This method must be called before code set Button Layout Data code is called p param control a control from which to obtain the current font protected void initialize Dialog Units Control control Compute and store a font metric GC gc new GC control gc set Font control get Font font Metrics gc get Font Metrics gc dispose  setButtonLayoutData initializeDialogUnits setFont getFont fontMetrics getFontMetrics
Tries to resolve the value entered in the link target field as a variable if the value is a relative path Displays the resolved value if the entered value is a variable private void resolve Variable I Path Variable Manager path Variable Manager Resources Plugin get Workspace get Path Variable Manager I Path path new Path link Target I Path resolved Path path Variable Manager resolve Path path if path equals resolved Path resolved Path Label Text set Visible false resolved Path Label Data set Visible false else resolved Path Label Text set Visible true resolved Path Label Data set Visible true resolved Path Label Data set Text resolved Path toOS String  resolveVariable IPathVariableManager pathVariableManager ResourcesPlugin getWorkspace getPathVariableManager IPath linkTarget IPath resolvedPath pathVariableManager resolvePath resolvedPath resolvedPathLabelText setVisible resolvedPathLabelData setVisible resolvedPathLabelText setVisible resolvedPathLabelData setVisible resolvedPathLabelData setText resolvedPath toOSString
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 private Grid Data set Button Layout Data Button button Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL data height Hint Dialog convert VerticalDL Us To Pixels font Metrics I Dialog Constants BUTTON HEIGHT int width Hint Dialog convert HorizontalDL Us To Pixels font Metrics I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x button set Layout Data data return data  GridData initializeDialogUnits GridData GridData GridData setButtonLayoutData GridData GridData GridData HORIZONTAL_ALIGN_FILL heightHint convertVerticalDLUsToPixels fontMetrics IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels fontMetrics IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize setLayoutData
Sets the value of the link target field param target the value of the link target field public void set Link Target String target link Target target if link Target Field null link Target Field is Disposed false link Target Field set Text target  setLinkTarget linkTarget linkTargetField linkTargetField isDisposed linkTargetField setText
Validates the type of the given file against the link type specified in the constructor param link Target File file to validate return I Status indicating the validation result I Status OK if the given file is valid private I Status validate File Type File link Target File if type I Resource FILE link Target File is File false return create Status I Status ERROR IDE Workbench Messages get String Create Linked Resource Group link Target Not File NON NLS 1 else if type I Resource FOLDER link Target File is Directory false return create Status I Status ERROR IDE Workbench Messages get String Create Linked Resource Group link Target Not Folder NON NLS 1 return create Status I Status OK NON NLS 1  linkTargetFile IStatus IStatus IStatus validateFileType linkTargetFile IResource linkTargetFile isFile createStatus IStatus IDEWorkbenchMessages getString CreateLinkedResourceGroup linkTargetNotFile IResource linkTargetFile isDirectory createStatus IStatus IDEWorkbenchMessages getString CreateLinkedResourceGroup linkTargetNotFolder createStatus IStatus
Validates this page s controls return I Status indicating the validation result I Status OK if the specified link target is valid given the link Handle public I Status validate Link Location I Resource link Handle if link Target Field null link Target Field is Disposed return create Status I Status OK NON NLS 1 I Workspace workspace IDE Workbench Plugin get Plugin Workspace I Path path new Path link Target if create Link false return create Status I Status OK NON NLS 1 I Status location Status workspace validate Link Location link Handle path if location Status get Severity I Status ERROR return location Status use the resolved link target name String resolved Link Target resolved Path Label Data get Text path new Path resolved Link Target File link Target File new Path resolved Link Target to File if link Target File exists I Status file Type Status validate File Type link Target File if file Type Status isOK false return file Type Status else if location Status get Severity I Status OK location Status takes precedence over missing location warning return create Status I Status WARNING IDE Workbench Messages get String Create Linked Resource Group link Target Non Existent NON NLS 1 return location Status  IStatus IStatus linkHandle IStatus validateLinkLocation IResource linkHandle linkTargetField linkTargetField isDisposed createStatus IStatus IWorkspace IDEWorkbenchPlugin getPluginWorkspace IPath linkTarget createLink createStatus IStatus IStatus locationStatus validateLinkLocation linkHandle locationStatus getSeverity IStatus locationStatus resolvedLinkTarget resolvedPathLabelData getText resolvedLinkTarget linkTargetFile resolvedLinkTarget toFile linkTargetFile IStatus fileTypeStatus validateFileType linkTargetFile fileTypeStatus fileTypeStatus locationStatus getSeverity IStatus locationStatus createStatus IStatus IDEWorkbenchMessages getString CreateLinkedResourceGroup linkTargetNonExistent locationStatus

Creates the project creation step param number the step order number param page the wizard page containing the new project name and location param wizard the multi step wizard for collecting new project information public Create Project Step int number Wizard New Project Name And Location Page page New Project Wizard wizard super number step Wizard new Create Project Wizard page wizard  CreateProjectStep WizardNewProjectNameAndLocationPage NewProjectWizard stepWizard CreateProjectWizard
Method declared on Wizard Step public String get Label return IDE Workbench Messages get String Create Project Step label NON NLS 1  WizardStep getLabel IDEWorkbenchMessages getString CreateProjectStep
Method declared on Wizard Step public String get Details return IDE Workbench Messages format Create Project Step details new Object step Wizard get Project Name NON NLS 1  WizardStep getDetails IDEWorkbenchMessages CreateProjectStep stepWizard getProjectName
Method declared on Wizard Step public I Wizard get Wizard return step Wizard  WizardStep IWizard getWizard stepWizard

Creates an empty wizard for creating a new project in the workspace package Create Project Wizard Wizard New Project Name And Location Page page New Project Wizard wizard super this page page this wizard wizard  CreateProjectWizard WizardNewProjectNameAndLocationPage NewProjectWizard
define the operation to create a new project Workspace Modify Operation op new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception create Project description new Project Handle monitor  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException createProject newProjectHandle
Creates a new project resource with the entered name return the created project resource or code null code if the project was not created private I Project create New Project get a project handle final I Project new Project Handle page get Project Handle get a project descriptor I Path default Path Platform get Location I Path new Path page get Location Path if default Path equals new Path new Path null I Workspace workspace Resources Plugin get Workspace final I Project Description description workspace new Project Description new Project Handle get Name description set Location new Path define the operation to create a new project Workspace Modify Operation op new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception create Project description new Project Handle monitor run the operation to create a new project try get Container run true true op catch Interrupted Exception e return null catch Invocation Target Exception e Throwable t e get Target Exception if t instanceof Core Exception if Core Exception t get Status get Code I Resource Status CASE VARIANT EXISTS Message Dialog open Error get Shell IDE Workbench Messages get String Create Project Wizard error Title NON NLS 1 IDE Workbench Messages get String Create Project Wizard case Variant Exists Error NON NLS 1 else Error Dialog open Error get Shell IDE Workbench Messages get String Create Project Wizard error Title NON NLS 1 null no special message Core Exception t get Status else Unexpected runtime exceptions and errors may still occur Platform get Plugin PlatformUI PLUGIN ID get Log log new Status Status ERROR PlatformUI PLUGIN ID 0 t to String t Message Dialog open Error get Shell IDE Workbench Messages get String Create Project Wizard error Title NON NLS 1 IDE Workbench Messages format Create Project Wizard internal Error new Object t get Message NON NLS 1 return null return new Project Handle  IProject createNewProject IProject newProjectHandle getProjectHandle IPath defaultPath getLocation IPath newPath getLocationPath defaultPath newPath newPath IWorkspace ResourcesPlugin getWorkspace IProjectDescription newProjectDescription newProjectHandle getName setLocation newPath WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException createProject newProjectHandle getContainer InterruptedException InvocationTargetException getTargetException CoreException CoreException getStatus getCode IResourceStatus CASE_VARIANT_EXISTS MessageDialog openError getShell IDEWorkbenchMessages getString CreateProjectWizard errorTitle IDEWorkbenchMessages getString CreateProjectWizard caseVariantExistsError ErrorDialog openError getShell IDEWorkbenchMessages getString CreateProjectWizard errorTitle CoreException getStatus getPlugin PLUGIN_ID getLog PLUGIN_ID toString MessageDialog openError getShell IDEWorkbenchMessages getString CreateProjectWizard errorTitle IDEWorkbenchMessages CreateProjectWizard internalError getMessage newProjectHandle
Creates a project resource given the project handle and description param description the project description to create a project resource for param project Handle the project handle to create a project resource for param monitor the progress monitor to show visual progress with exception Core Exception if the operation fails exception Operation Canceled Exception if the operation is canceled private void create Project I Project Description description I Project project Handle I Progress Monitor monitor throws Core Exception Operation Canceled Exception try monitor begin Task 2000 NON NLS 1 project Handle create description new Sub Progress Monitor monitor 1000 if monitor is Canceled throw new Operation Canceled Exception project Handle open new Sub Progress Monitor monitor 1000 finally monitor done  projectHandle CoreException OperationCanceledException createProject IProjectDescription IProject projectHandle IProgressMonitor CoreException OperationCanceledException beginTask projectHandle SubProgressMonitor isCanceled OperationCanceledException projectHandle SubProgressMonitor
Returns the current project name return the project name or code null code if no project name is known package String get Project Name return page get Project Name  getProjectName getProjectName
public boolean perform Finish if wizard get New Project null return true I Project project create New Project if project null wizard set New Project project return true else return false  performFinish getNewProject IProject createNewProject setNewProject

public Image get Image Object element if element instanceof File File curr File element if curr is Directory return IMG FOLDER else return IMG FILE return null  getImage isDirectory IMG_FOLDER IMG_FILE
public String get Text Object element if element instanceof File return File element get Name return super get Text element  getText getName getText
file Filter new File Filter public boolean accept File file if file is File show Files false return false return true  fileFilter FileFilter isFile showFiles
Creates a new instance of the receiver param show Files code true code files and folders are returned by the receiver code false code only folders are returned public File Content Provider final boolean show Files file Filter new File Filter public boolean accept File file if file is File show Files false return false return true  showFiles FileContentProvider showFiles fileFilter FileFilter isFile showFiles
public Object get Children Object parent Element if parent Element instanceof File File children File parent Element list Files file Filter if children null return children return EMPTY  getChildren parentElement parentElement parentElement listFiles fileFilter
public Object get Parent Object element if element instanceof File return File element get Parent File return null  getParent getParentFile
return null public boolean has Children Object element return get Children element length 0  hasChildren getChildren
return get Children element length 0 public Object get Elements Object element return get Children element  getChildren getElements getChildren
return get Children element public void dispose  getChildren
public void dispose public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
private static class File Viewer Sorter extends Viewer Sorter public int category Object element if element instanceof File if File element is File return 1 return 0  FileViewerSorter ViewerSorter isFile
Creates a new instance of the receiver param multi Select code true code if multi selection is allowed code false code if only single selection is allowed param accept Folders code true code if folders can be selected in the dialog code false code only files and be selected public File Selection Validator boolean multi Select boolean accept Folders this multi Select multi Select this accept Folders accept Folders  multiSelect acceptFolders FileSelectionValidator multiSelect acceptFolders multiSelect multiSelect acceptFolders acceptFolders
public I Status validate Object selection int n Selected selection length String plugin Id IDE Workbench Plugin get Default get Descriptor get Unique Identifier if n Selected 0 n Selected 1 multi Select false return new Status I Status ERROR plugin Id I Status ERROR null NON NLS 1 for int i 0 i selection length i Object curr selection i if curr instanceof File File file File curr if accept Folders false file is File false return new Status I Status ERROR plugin Id I Status ERROR null NON NLS 1 return new Status I Status OK plugin Id I Status OK null NON NLS 1  IStatus nSelected pluginId IDEWorkbenchPlugin getDefault getDescriptor getUniqueIdentifier nSelected nSelected multiSelect IStatus pluginId IStatus acceptFolders isFile IStatus pluginId IStatus IStatus pluginId IStatus
Creates a new instance of the receiver param multi Select code true code if multi selection is allowed code false code if only single selection is allowed param type one or both of code I Resource FILE code and code I Resource FOLDER code O Red together If code I Resource FILE code is specified files and folders are displayed in the dialog Otherwise only folders are displayed If code I Resource FOLDER code is specified folders can be selected in addition to files public File Folder Selection Dialog Shell parent boolean multi Select int type super parent new File Label Provider new File Content Provider type I Resource FILE 0 set Sorter new File Viewer Sorter set Validator new File Selection Validator multi Select type I Resource FOLDER 0  multiSelect IResource IResource ORed IResource IResource FileFolderSelectionDialog multiSelect FileLabelProvider FileContentProvider IResource setSorter FileViewerSorter setValidator FileSelectionValidator multiSelect IResource

This method takes the string for the title of a text field and the value for the text of the field return org eclipse swt widgets Text param label String java lang String param text Value java lang String param parent Composite private Text add Label And Text String label String String text Value Composite parent Label label new Label parent SWT LEFT label set Text label String Text text new Text parent SWT LEFT SWT BORDER Grid Data data new Grid Data text add Listener SWT Modify this data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true data vertical Alignment Grid Data CENTER data grab Excess Vertical Space false text set Layout Data data text set Text text Value return text  labelString textValue addLabelAndText labelString textValue setText labelString GridData GridData addListener horizontalAlignment GridData grabExcessHorizontalSpace verticalAlignment GridData grabExcessVerticalSpace setLayoutData setText textValue
Recomputes the page s error state by validating all the fields private void check State Assume invalid if the controls not created yet if longevity Text null max States Text null max State Size Text null set Valid false return if validate Long Text Entry longevity Text FAILED VALUE set Valid false return if validate Max File States FAILED VALUE set Valid false return if validate Max File State Size FAILED VALUE set Valid false return set Valid true set Error Message null  checkState longevityText maxStatesText maxStateSizeText setValid validateLongTextEntry longevityText FAILED_VALUE setValid validateMaxFileStates FAILED_VALUE setValid validateMaxFileStateSize FAILED_VALUE setValid setValid setErrorMessage
protected Control create Contents Composite parent Workbench Help set Help parent I Help Context Ids FILE STATES PREFERENCE PAGE button group Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout I Workspace Description description get Workspace Description Get the current value and make sure we get at least one day out of it long days description get File State Longevity DAY LENGTH if days 1 days 1 long megabytes description get Max File State Size MEGABYTES if megabytes 1 megabytes 1 this longevity Text add Label And Text LONGEVITY TITLE String value Of days composite this max States Text add Label And Text MAX FILE STATES TITLE String value Of description get Max File States composite this max State Size Text add Label And Text MAX FILE STATE SIZE TITLE String value Of megabytes composite check State Create a spacing label to breakup the note from the fields Label spacer new Label composite SWT NONE Grid Data spacer Data new Grid Data spacer Data horizontal Span 2 spacer set Layout Data spacer Data Composite note Composite create Note Composite parent get Font composite NOTE LABEL NOTE MESSAGE Grid Data note Data new Grid Data note Data horizontal Span 2 note Composite set Layout Data note Data apply Dialog Font composite return composite  createContents WorkbenchHelp setHelp IHelpContextIds FILE_STATES_PREFERENCE_PAGE GridLayout GridLayout numColumns setLayout IWorkspaceDescription getWorkspaceDescription getFileStateLongevity DAY_LENGTH getMaxFileStateSize longevityText addLabelAndText LONGEVITY_TITLE valueOf maxStatesText addLabelAndText MAX_FILE_STATES_TITLE valueOf getMaxFileStates maxStateSizeText addLabelAndText MAX_FILE_STATE_SIZE_TITLE valueOf checkState GridData spacerData GridData spacerData horizontalSpan setLayoutData spacerData noteComposite createNoteComposite getFont NOTE_LABEL NOTE_MESSAGE GridData noteData GridData noteData horizontalSpan noteComposite setLayoutData noteData applyDialogFont
Get the Workspace Description this page is operating on return org eclipse core resources I Workspace Description private I Workspace Description get Workspace Description return Resources Plugin get Workspace get Description  IWorkspaceDescription IWorkspaceDescription getWorkspaceDescription ResourcesPlugin getWorkspace getDescription
Sent when an event that the receiver has registered for occurs param event the event which occurred public void handle Event Event event check State  handleEvent checkState
Initializes this preference page for the given workbench p This method is called automatically as the preference page is being created and initialized Clients must not call this method p param workbench the workbench public void init org eclipse ui I Workbench workbench  IWorkbench
Performs special processing when this page s Defaults button has been pressed Reset the entries to thier default values protected void perform Defaults super perform Defaults Preferences prefs Resources Plugin get Plugin get Plugin Preferences long days prefs get Default Long Resources Plugin PREF FILE STATE LONGEVITY DAY LENGTH long megabytes prefs get Default Long Resources Plugin PREF MAX FILE STATE SIZE MEGABYTES this longevity Text set Text String value Of days this max States Text set Text prefs get Default String Resources Plugin PREF MAX FILE STATES this max State Size Text set Text String value Of megabytes check State  performDefaults performDefaults ResourcesPlugin getPlugin getPluginPreferences getDefaultLong ResourcesPlugin PREF_FILE_STATE_LONGEVITY DAY_LENGTH getDefaultLong ResourcesPlugin PREF_MAX_FILE_STATE_SIZE longevityText setText valueOf maxStatesText setText getDefaultString ResourcesPlugin PREF_MAX_FILE_STATES maxStateSizeText setText valueOf checkState
Perform the result of the OK from the receiver public boolean perform Ok long longevity Value validate Long Text Entry longevity Text int max File States validate Max File States long max State Size validate Max File State Size if longevity Value FAILED VALUE max File States FAILED VALUE max State Size FAILED VALUE return false I Workspace Description description get Workspace Description description set File State Longevity longevity Value DAY LENGTH description set Max File States max File States description set Max File State Size max State Size MEGABYTES try As it is only a copy save it back in Resources Plugin get Workspace set Description description catch Core Exception exception Error Dialog open Error get Shell SAVE ERROR MESSAGE exception get Message exception get Status return false return true  performOk longevityValue validateLongTextEntry longevityText maxFileStates validateMaxFileStates maxStateSize validateMaxFileStateSize longevityValue FAILED_VALUE maxFileStates FAILED_VALUE maxStateSize FAILED_VALUE IWorkspaceDescription getWorkspaceDescription setFileStateLongevity longevityValue DAY_LENGTH setMaxFileStates maxFileStates setMaxFileStateSize maxStateSize ResourcesPlugin getWorkspace setDescription CoreException ErrorDialog openError getShell SAVE_ERROR_MESSAGE getMessage getStatus
Validate a text entry for an integer field Return the result if there are no errors otherwise return 1 and set the entry field error return int private int validate Integer Text Entry Text text int value try value Integer parse Int text get Text catch Number Format Exception exception set Error Message Message Format format INVALID VALUE MESSAGE new Object exception get Localized Message return FAILED VALUE Be sure all values are non zero and positive if value 0 set Error Message POSITIVE MESSAGE return FAILED VALUE return value  validateIntegerTextEntry parseInt getText NumberFormatException setErrorMessage MessageFormat INVALID_VALUE_MESSAGE getLocalizedMessage FAILED_VALUE setErrorMessage POSITIVE_MESSAGE FAILED_VALUE
Validate a text entry for a long field Return the result if there are no errors otherwise return 1 and set the entry field error return long private long validate Long Text Entry Text text long value try value Long parse Long text get Text catch Number Format Exception exception set Error Message Message Format format INVALID VALUE MESSAGE new Object exception get Localized Message return FAILED VALUE Be sure all values are non zero and positive if value 0 set Error Message POSITIVE MESSAGE return FAILED VALUE return value  validateLongTextEntry parseLong getText NumberFormatException setErrorMessage MessageFormat INVALID_VALUE_MESSAGE getLocalizedMessage FAILED_VALUE setErrorMessage POSITIVE_MESSAGE FAILED_VALUE
Validate the maximum file states Return the value if successful otherwise return FAILED VALUE Set the error message if it fails return int private int validate Max File States int max File States validate Integer Text Entry this max States Text if max File States FAILED VALUE return max File States if max File States FILE STATES MAXIMUM set Error Message IDE Workbench Messages format File History above Max Entries NON NLS 1 new String String value Of FILE STATES MAXIMUM return FAILED VALUE return max File States  FAILED_VALUE validateMaxFileStates maxFileStates validateIntegerTextEntry maxStatesText maxFileStates FAILED_VALUE maxFileStates maxFileStates FILE_STATES_MAXIMUM setErrorMessage IDEWorkbenchMessages FileHistory aboveMaxEntries valueOf FILE_STATES_MAXIMUM FAILED_VALUE maxFileStates
Validate the maximum file state size Return the value if successful otherwise return FAILED VALUE Set the error message if it fails return long private long validate Max File State Size long max File State Size validate Long Text Entry this max State Size Text if max File State Size FAILED VALUE return max File State Size if max File State Size STATE SIZE MAXIMUM set Error Message IDE Workbench Messages format File History above Max File Size NON NLS 1 new String String value Of STATE SIZE MAXIMUM return FAILED VALUE return max File State Size  FAILED_VALUE validateMaxFileStateSize maxFileStateSize validateLongTextEntry maxStateSizeText maxFileStateSize FAILED_VALUE maxFileStateSize maxFileStateSize STATE_SIZE_MAXIMUM setErrorMessage IDEWorkbenchMessages FileHistory aboveMaxFileSize valueOf STATE_SIZE_MAXIMUM FAILED_VALUE maxFileStateSize

package class File System Resource Exporter Creates the specified file system directory at code destination Path code This creates a new file system directory public void create Folder I Path destination Path new File destination Path toOS String mkdir  FileSystemResourceExporter destinationPath createFolder IPath destinationPath destinationPath toOSString
Writes the passed resource to the specified location recursively public void write I Resource resource I Path destination Path throws Core Exception IO Exception if resource get Type I Resource FILE write File I File resource destination Path else write Children I Container resource destination Path  IResource IPath destinationPath CoreException IOException getType IResource writeFile IFile destinationPath writeChildren IContainer destinationPath
Exports the passed container s children protected void write Children I Container folder I Path destination Path throws Core Exception IO Exception if folder is Accessible I Resource children folder members for int i 0 i children length i I Resource child children i write Resource child destination Path append child get Name  writeChildren IContainer IPath destinationPath CoreException IOException isAccessible IResource IResource writeResource destinationPath getName
Writes the passed file resource to the specified destination on the local file system protected void write File I File file I Path destination Path throws IO Exception Core Exception File Output Stream output null Input Stream content Stream null try output new File Output Stream destination Path toOS String content Stream file get Contents false int chunk Size content Stream available byte read Buffer new byte chunk Size int n content Stream read read Buffer while n 0 output write read Buffer n content Stream read read Buffer finally if output null output close if content Stream null content Stream close  writeFile IFile IPath destinationPath IOException CoreException FileOutputStream InputStream contentStream FileOutputStream destinationPath toOSString contentStream getContents chunkSize contentStream readBuffer chunkSize contentStream readBuffer readBuffer contentStream readBuffer contentStream contentStream
Writes the passed resource to the specified location recursively protected void write Resource I Resource resource I Path destination Path throws Core Exception IO Exception if resource get Type I Resource FILE write File I File resource destination Path else create Folder destination Path write Children I Container resource destination Path  writeResource IResource IPath destinationPath CoreException IOException getType IResource writeFile IFile destinationPath createFolder destinationPath writeChildren IContainer destinationPath

protected Control create Contents Composite parent Composite composite create Composite parent create Editor History Group composite create Space composite create Show Multiple Editor Tabs Pref composite create Close Editors On Exit Pref composite create Editor Reuse Group composite create Space composite create Encoding Group composite update Valid State issue need IDE level help for this page Workbench Help set Help parent I Help Context Ids WORKBENCH EDITOR PREFERENCE PAGE return composite  createContents createComposite createEditorHistoryGroup createSpace createShowMultipleEditorTabsPref createCloseEditorsOnExitPref createEditorReuseGroup createSpace createEncodingGroup updateValidState WorkbenchHelp setHelp IHelpContextIds WORKBENCH_EDITOR_PREFERENCE_PAGE
Selection Adapter button Listener new Selection Adapter public void widget Selected Selection Event e update Encoding State default Encoding Button get Selection update Valid State  SelectionAdapter buttonListener SelectionAdapter widgetSelected SelectionEvent updateEncodingState defaultEncodingButton getSelection updateValidState
encoding Combo set Layout Data data encoding Combo add Modify Listener new Modify Listener public void modify Text Modify Event e update Valid State  encodingCombo setLayoutData encodingCombo addModifyListener ModifyListener modifyText ModifyEvent updateValidState
private void create Encoding Group Composite parent Font font parent get Font Group group new Group parent SWT NONE Grid Data data new Grid Data Grid Data FILL HORIZONTAL group set Layout Data data Grid Layout layout new Grid Layout layout num Columns 2 group set Layout layout group set Text IDE Workbench Messages get String Workbench Preference encoding NON NLS 1 group set Font font Selection Adapter button Listener new Selection Adapter public void widget Selected Selection Event e update Encoding State default Encoding Button get Selection update Valid State default Encoding Button new Button group SWT RADIO default Enc System get Property file encoding UTF 8 NON NLS 1 NON NLS 2 default Encoding Button set Text IDE Workbench Messages format Workbench Preference default Encoding new String default Enc NON NLS 1 data new Grid Data data horizontal Span 2 default Encoding Button set Layout Data data default Encoding Button add Selection Listener button Listener default Encoding Button set Font font other Encoding Button new Button group SWT RADIO other Encoding Button set Text IDE Workbench Messages get String Workbench Preference other Encoding NON NLS 1 other Encoding Button add Selection Listener button Listener other Encoding Button set Font font encoding Combo new Combo group SWT NONE data new Grid Data data width Hint convert Width In Chars To Pixels 15 encoding Combo set Font font encoding Combo set Layout Data data encoding Combo add Modify Listener new Modify Listener public void modify Text Modify Event e update Valid State Array List encodings new Array List int n 0 try n Integer parse Int IDE Workbench Messages get String Workbench Preference num Default Encodings NON NLS 1 catch Number Format Exception e Ignore for int i 0 i n i String enc IDE Workbench Messages get String Workbench Preference default Encoding i 1 null NON NLS 1 if enc null encodings add enc if encodings contains default Enc encodings add default Enc String enc Resources Plugin get Plugin get Plugin Preferences get String Resources Plugin PREF ENCODING boolean is Default enc null enc length 0 if is Default encodings contains enc encodings add enc Collections sort encodings for int i 0 i encodings size i encoding Combo add String encodings get i encoding Combo set Text is Default default Enc enc update Encoding State is Default  createEncodingGroup getFont GridData GridData GridData FILL_HORIZONTAL setLayoutData GridLayout GridLayout numColumns setLayout setText IDEWorkbenchMessages getString WorkbenchPreference setFont SelectionAdapter buttonListener SelectionAdapter widgetSelected SelectionEvent updateEncodingState defaultEncodingButton getSelection updateValidState defaultEncodingButton defaultEnc getProperty defaultEncodingButton setText IDEWorkbenchMessages WorkbenchPreference defaultEncoding defaultEnc GridData horizontalSpan defaultEncodingButton setLayoutData defaultEncodingButton addSelectionListener buttonListener defaultEncodingButton setFont otherEncodingButton otherEncodingButton setText IDEWorkbenchMessages getString WorkbenchPreference otherEncoding otherEncodingButton addSelectionListener buttonListener otherEncodingButton setFont encodingCombo GridData widthHint convertWidthInCharsToPixels encodingCombo setFont encodingCombo setLayoutData encodingCombo addModifyListener ModifyListener modifyText ModifyEvent updateValidState ArrayList ArrayList parseInt IDEWorkbenchMessages getString WorkbenchPreference numDefaultEncodings NumberFormatException IDEWorkbenchMessages getString WorkbenchPreference defaultEncoding defaultEnc defaultEnc ResourcesPlugin getPlugin getPluginPreferences getString ResourcesPlugin PREF_ENCODING isDefault isDefault encodingCombo encodingCombo setText isDefault defaultEnc updateEncodingState isDefault
protected void update Valid State super update Valid State if is Valid return if is Encoding Valid set Error Message IDE Workbench Messages get String Workbench Preference unsupported Encoding NON NLS 1 set Valid false  updateValidState updateValidState isValid isEncodingValid setErrorMessage IDEWorkbenchMessages getString WorkbenchPreference unsupportedEncoding setValid
private boolean is Encoding Valid return default Encoding Button get Selection is Valid Encoding encoding Combo get Text  isEncodingValid defaultEncodingButton getSelection isValidEncoding encodingCombo getText
private boolean is Valid Encoding String enc try new String new byte 0 enc return true catch Unsupported Encoding Exception e return false  isValidEncoding UnsupportedEncodingException
private void update Encoding State boolean use Default default Encoding Button set Selection use Default other Encoding Button set Selection use Default encoding Combo set Enabled use Default update Valid State  updateEncodingState useDefault defaultEncodingButton setSelection useDefault otherEncodingButton setSelection useDefault encodingCombo setEnabled useDefault updateValidState
The default button has been pressed protected void perform Defaults update Encoding State true super perform Defaults  performDefaults updateEncodingState performDefaults
public boolean perform Ok set the workspace text file encoding Preferences resource Prefs Resources Plugin get Plugin get Plugin Preferences if default Encoding Button get Selection resource Prefs set To Default Resources Plugin PREF ENCODING else String enc encoding Combo get Text resource Prefs set Value Resources Plugin PREF ENCODING enc Resources Plugin get Plugin save Plugin Preferences return super perform Ok  performOk resourcePrefs ResourcesPlugin getPlugin getPluginPreferences defaultEncodingButton getSelection resourcePrefs setToDefault ResourcesPlugin PREF_ENCODING encodingCombo getText resourcePrefs setValue ResourcesPlugin PREF_ENCODING ResourcesPlugin getPlugin savePluginPreferences performOk

Creates the page s UI content protected Control create Contents Composite parent issue if the product subclasses this page then it should provide the help content Workbench Help set Help parent I Help Context Ids PERSPECTIVES PREFERENCE PAGE Composite composite create Composite parent create Open Persp Button Group composite create Open View Button Group composite create Project Perspective Group composite create Customize Perspective composite return composite  createContents WorkbenchHelp setHelp IHelpContextIds PERSPECTIVES_PREFERENCE_PAGE createComposite createOpenPerspButtonGroup createOpenViewButtonGroup createProjectPerspectiveGroup createCustomizePerspective
Creates a composite that contains buttons for selecting the preference opening new project selections private void create Project Perspective Group Composite composite Composite project Composite new Composite composite SWT NONE project Composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL project Composite set Font composite get Font String names And Values PSPM ALWAYS TEXT IDE Internal Preferences PSPM ALWAYS PSPM NEVER TEXT IDE Internal Preferences PSPM NEVER PSPM PROMPT TEXT IDE Internal Preferences PSPM PROMPT project Switch Field new Radio Group Field Editor IDE Internal Preferences PROJECT SWITCH PERSP MODE PROJECT SWITCH PERSP MODE TITLE names And Values length names And Values project Composite true project Switch Field set Preference Store getIDE Preference Store project Switch Field set Preference Page this project Switch Field load  createProjectPerspectiveGroup projectComposite projectComposite setLayoutData GridData GridData FILL_HORIZONTAL projectComposite setFont getFont namesAndValues PSPM_ALWAYS_TEXT IDEInternalPreferences PSPM_ALWAYS PSPM_NEVER_TEXT IDEInternalPreferences PSPM_NEVER PSPM_PROMPT_TEXT IDEInternalPreferences PSPM_PROMPT projectSwitchField RadioGroupFieldEditor IDEInternalPreferences PROJECT_SWITCH_PERSP_MODE PROJECT_SWITCH_PERSP_MODE_TITLE namesAndValues namesAndValues projectComposite projectSwitchField setPreferenceStore getIDEPreferenceStore projectSwitchField setPreferencePage projectSwitchField
Returns the IDE preference store protected I Preference Store getIDE Preference Store return IDE Workbench Plugin get Default get Preference Store  IPreferenceStore getIDEPreferenceStore IDEWorkbenchPlugin getDefault getPreferenceStore
see org eclipse ui internal dialogs Perspectives Preference Page perform Defaults protected void perform Defaults project Switch Field load Default super perform Defaults  PerspectivesPreferencePage performDefaults performDefaults projectSwitchField loadDefault performDefaults
public boolean perform Ok project Switch Field store IDE Workbench Plugin get Default save Plugin Preferences return super perform Ok  performOk projectSwitchField IDEWorkbenchPlugin getDefault savePluginPreferences performOk

protected Control create Contents Composite parent Workbench Help set Help parent I Help Context Ids STARTUP PREFERENCE PAGE Composite composite create Composite parent create Launch Prompt Pref composite create Refresh Workspace On Startup Pref composite create Exit Prompt Pref composite Label separator new Label composite SWT HORIZONTAL SWT SEPARATOR separator set Layout Data new Grid Data Grid Data FILL HORIZONTAL create Early Startup Selection composite return composite  createContents WorkbenchHelp setHelp IHelpContextIds STARTUP_PREFERENCE_PAGE createComposite createLaunchPromptPref createRefreshWorkspaceOnStartupPref createExitPromptPref setLayoutData GridData GridData FILL_HORIZONTAL createEarlyStartupSelection
The default button has been pressed protected void perform Defaults I Preference Store store getIDE Preference Store launch Prompt Button set Selection true refresh Button set Selection store get Default Boolean IDE Internal Preferences REFRESH WORKSPACE ON STARTUP exit Prompt Button set Selection store get Default Boolean IDE Internal Preferences EXIT PROMPT ON CLOSE LAST WINDOW super perform Defaults  performDefaults IPreferenceStore getIDEPreferenceStore launchPromptButton setSelection refreshButton setSelection getDefaultBoolean IDEInternalPreferences REFRESH_WORKSPACE_ON_STARTUP exitPromptButton setSelection getDefaultBoolean IDEInternalPreferences EXIT_PROMPT_ON_CLOSE_LAST_WINDOW performDefaults
The user has pressed Ok Store apply this page s values appropriately public boolean perform Ok I Preference Store store getIDE Preference Store store the refresh workspace on startup setting store set Value IDE Internal Preferences REFRESH WORKSPACE ON STARTUP refresh Button get Selection TODO This should get the value from the configuration preference area but dj said we shouldn t use it yet some final details are being worked out Hopefully it will be available soon at which time the entire recent Workspaces xml file can be removed But until then this preference reads writes the file each time Choose Workspace Data set Show Dialog Value launch Prompt Button get Selection store the exit prompt on last window close setting store set Value IDE Internal Preferences EXIT PROMPT ON CLOSE LAST WINDOW exit Prompt Button get Selection IDE Workbench Plugin get Default save Plugin Preferences return super perform Ok  performOk IPreferenceStore getIDEPreferenceStore setValue IDEInternalPreferences REFRESH_WORKSPACE_ON_STARTUP refreshButton getSelection recentWorkspaces ChooseWorkspaceData setShowDialogValue launchPromptButton getSelection setValue IDEInternalPreferences EXIT_PROMPT_ON_CLOSE_LAST_WINDOW exitPromptButton getSelection IDEWorkbenchPlugin getDefault savePluginPreferences performOk
protected void create Refresh Workspace On Startup Pref Composite composite refresh Button new Button composite SWT CHECK refresh Button set Text IDE Workbench Messages get String Startup Preference Page refresh Button NON NLS 1 refresh Button set Font composite get Font refresh Button set Selection getIDE Preference Store get Boolean IDE Internal Preferences REFRESH WORKSPACE ON STARTUP  createRefreshWorkspaceOnStartupPref refreshButton refreshButton setText IDEWorkbenchMessages getString StartupPreferencePage refreshButton refreshButton setFont getFont refreshButton setSelection getIDEPreferenceStore getBoolean IDEInternalPreferences REFRESH_WORKSPACE_ON_STARTUP
protected void create Launch Prompt Pref Composite composite launch Prompt Button new Button composite SWT CHECK launch Prompt Button set Text IDE Workbench Messages get String Startup Preference Page launch Prompt Button NON NLS 1 launch Prompt Button set Font composite get Font TODO This should get the value from the configuration preference area but dj said we shouldn t use it yet some final details are being worked out Hopefully it will be available soon at which time the entire recent Workspaces xml file can be removed But until then this preference reads writes the file each time launch Prompt Button set Selection Choose Workspace Data get Show Dialog Value  createLaunchPromptPref launchPromptButton launchPromptButton setText IDEWorkbenchMessages getString StartupPreferencePage launchPromptButton launchPromptButton setFont getFont recentWorkspaces launchPromptButton setSelection ChooseWorkspaceData getShowDialogValue
protected void create Exit Prompt Pref Composite composite exit Prompt Button new Button composite SWT CHECK exit Prompt Button set Text IDE Workbench Messages get String Startup Preference Page exit Prompt Button NON NLS 1 exit Prompt Button set Font composite get Font exit Prompt Button set Selection getIDE Preference Store get Boolean IDE Internal Preferences EXIT PROMPT ON CLOSE LAST WINDOW  createExitPromptPref exitPromptButton exitPromptButton setText IDEWorkbenchMessages getString StartupPreferencePage exitPromptButton exitPromptButton setFont getFont exitPromptButton setSelection getIDEPreferenceStore getBoolean IDEInternalPreferences EXIT_PROMPT_ON_CLOSE_LAST_WINDOW
Returns the IDE preference store protected I Preference Store getIDE Preference Store return IDE Workbench Plugin get Default get Preference Store  IPreferenceStore getIDEPreferenceStore IDEWorkbenchPlugin getDefault getPreferenceStore

protected Control create Contents Composite parent Workbench Help set Help parent I Help Context Ids WORKBENCH PREFERENCE PAGE Composite composite create Composite parent create Show User Dialog Pref composite create Auto Build Pref composite create Auto Refresh Controls composite create Save All Before Build Pref composite create Sticky Cycle Pref composite create Space composite create Save Interval Group composite create Space composite create Open Mode Group composite apply Dialog Font composite return composite  createContents WorkbenchHelp setHelp IHelpContextIds WORKBENCH_PREFERENCE_PAGE createComposite createShowUserDialogPref createAutoBuildPref createAutoRefreshControls createSaveAllBeforeBuildPref createStickyCyclePref createSpace createSaveIntervalGroup createSpace createOpenModeGroup applyDialogFont
protected void create Save All Before Build Pref Composite composite auto Save All Button new Button composite SWT CHECK auto Save All Button set Text IDE Workbench Messages get String Workbench Preference save Prior To Building NON NLS 1 auto Save All Button set Tool Tip Text IDE Workbench Messages get String Workbench Preference save Prior To Building Tool Tip NON NLS 1 auto Save All Button set Selection getIDE Preference Store get Boolean IDE Internal Preferences SAVE ALL BEFORE BUILD  createSaveAllBeforeBuildPref autoSaveAllButton autoSaveAllButton setText IDEWorkbenchMessages getString WorkbenchPreference savePriorToBuilding autoSaveAllButton setToolTipText IDEWorkbenchMessages getString WorkbenchPreference savePriorToBuildingToolTip autoSaveAllButton setSelection getIDEPreferenceStore getBoolean IDEInternalPreferences SAVE_ALL_BEFORE_BUILD
private void create Auto Build Pref Composite composite auto Build Button new Button composite SWT CHECK auto Build Button set Text IDE Workbench Messages get String Workbench Preference autobuild NON NLS 1 auto Build Button set Tool Tip Text IDE Workbench Messages get String Workbench Preference autobuild Tool Tip NON NLS 1 auto Build Button set Selection Resources Plugin get Workspace is Auto Building  createAutoBuildPref autoBuildButton autoBuildButton setText IDEWorkbenchMessages getString WorkbenchPreference autoBuildButton setToolTipText IDEWorkbenchMessages getString WorkbenchPreference autobuildToolTip autoBuildButton setSelection ResourcesPlugin getWorkspace isAutoBuilding
save Interval set Property Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals Field Editor IS VALID set Valid save Interval is Valid  saveInterval setPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty FieldEditor IS_VALID setValid saveInterval isValid
Create a composite that contains entry fields specifying save interval preference param composite The Composite the group is created in private void create Save Interval Group Composite composite Composite group Composite new Composite composite SWT LEFT Grid Layout layout new Grid Layout layout num Columns 2 group Composite set Layout layout Grid Data gd new Grid Data gd horizontal Alignment Grid Data FILL gd grab Excess Horizontal Space true group Composite set Layout Data gd save Interval new Integer Field Editor IDE Internal Preferences SAVE INTERVAL IDE Workbench Messages get String Workbench Preference save Interval NON NLS 1 group Composite issue we should drop our preference constant and let clients use core s pref ours is not up to date anyway if someone changes this interval directly thru core api save Interval set Preference Store getIDE Preference Store save Interval set Preference Page this save Interval set Text Limit Integer to String IDE Internal Preferences MAX SAVE INTERVAL length save Interval set Error Message IDE Workbench Messages format Workbench Preference save Interval Error NON NLS 1 new Object new Integer IDE Internal Preferences MAX SAVE INTERVAL save Interval set Validate Strategy String Field Editor VALIDATE ON KEY STROKE save Interval set Valid Range 1 IDE Internal Preferences MAX SAVE INTERVAL I Workspace Description description Resources Plugin get Workspace get Description long interval description get Snapshot Interval 60000 save Interval set String Value Long to String interval save Interval set Property Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals Field Editor IS VALID set Valid save Interval is Valid  createSaveIntervalGroup groupComposite GridLayout GridLayout numColumns groupComposite setLayout GridData GridData horizontalAlignment GridData grabExcessHorizontalSpace groupComposite setLayoutData saveInterval IntegerFieldEditor IDEInternalPreferences SAVE_INTERVAL IDEWorkbenchMessages getString WorkbenchPreference saveInterval groupComposite saveInterval setPreferenceStore getIDEPreferenceStore saveInterval setPreferencePage saveInterval setTextLimit toString IDEInternalPreferences MAX_SAVE_INTERVAL saveInterval setErrorMessage IDEWorkbenchMessages WorkbenchPreference saveIntervalError IDEInternalPreferences MAX_SAVE_INTERVAL saveInterval setValidateStrategy StringFieldEditor VALIDATE_ON_KEY_STROKE saveInterval setValidRange IDEInternalPreferences MAX_SAVE_INTERVAL IWorkspaceDescription ResourcesPlugin getWorkspace getDescription getSnapshotInterval saveInterval setStringValue toString saveInterval setPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty FieldEditor IS_VALID setValid saveInterval isValid
Returns the IDE preference store return the preference store protected I Preference Store getIDE Preference Store return IDE Workbench Plugin get Default get Preference Store  IPreferenceStore getIDEPreferenceStore IDEWorkbenchPlugin getDefault getPreferenceStore
The default button has been pressed protected void perform Defaults core holds onto this preference boolean auto Build Resources Plugin get Plugin get Plugin Preferences get Default Boolean Resources Plugin PREF AUTO BUILDING auto Build Button set Selection auto Build I Preference Store store getIDE Preference Store auto Save All Button set Selection store get Default Boolean IDE Internal Preferences SAVE ALL BEFORE BUILD save Interval load Default boolean auto Refresh Resources Plugin get Plugin get Plugin Preferences get Default Boolean Resources Plugin PREF AUTO REFRESH auto Refresh Button set Selection auto Refresh super perform Defaults  performDefaults autoBuild ResourcesPlugin getPlugin getPluginPreferences getDefaultBoolean ResourcesPlugin PREF_AUTO_BUILDING autoBuildButton setSelection autoBuild IPreferenceStore getIDEPreferenceStore autoSaveAllButton setSelection getDefaultBoolean IDEInternalPreferences SAVE_ALL_BEFORE_BUILD saveInterval loadDefault autoRefresh ResourcesPlugin getPlugin getPluginPreferences getDefaultBoolean ResourcesPlugin PREF_AUTO_REFRESH autoRefreshButton setSelection autoRefresh performDefaults
The user has pressed Ok Store apply this page s values appropriately public boolean perform Ok set the workspace auto build flag I Workspace Description description Resources Plugin get Workspace get Description if auto Build Button get Selection Resources Plugin get Workspace is Auto Building try description set Auto Building auto Build Button get Selection Resources Plugin get Workspace set Description description catch Core Exception e IDE Workbench Plugin log Error changing auto build workspace setting e NON NLS 1 get Status I Preference Store store getIDE Preference Store store the save all prior to build setting store set Value IDE Internal Preferences SAVE ALL BEFORE BUILD auto Save All Button get Selection store the workspace save interval issue we should drop our preference constant and let clients use core s pref ours is not up to date anyway if someone changes this interval directly thru core api long old Save Interval description get Snapshot Interval 60000 long new Save Interval new Long save Interval get String Value long Value if old Save Interval new Save Interval try description set Snapshot Interval new Save Interval 60000 Resources Plugin get Workspace set Description description store fire Property Change Event IDE Internal Preferences SAVE INTERVAL new Integer int old Save Interval new Integer int new Save Interval catch Core Exception e IDE Workbench Plugin log Error changing save interval preference e NON NLS 1 get Status Preferences preferences Resources Plugin get Plugin get Plugin Preferences boolean auto Refresh auto Refresh Button get Selection preferences set Value Resources Plugin PREF AUTO REFRESH auto Refresh return super perform Ok  performOk IWorkspaceDescription ResourcesPlugin getWorkspace getDescription autoBuildButton getSelection ResourcesPlugin getWorkspace isAutoBuilding setAutoBuilding autoBuildButton getSelection ResourcesPlugin getWorkspace setDescription CoreException IDEWorkbenchPlugin getStatus IPreferenceStore getIDEPreferenceStore setValue IDEInternalPreferences SAVE_ALL_BEFORE_BUILD autoSaveAllButton getSelection oldSaveInterval getSnapshotInterval newSaveInterval saveInterval getStringValue longValue oldSaveInterval newSaveInterval setSnapshotInterval newSaveInterval ResourcesPlugin getWorkspace setDescription firePropertyChangeEvent IDEInternalPreferences SAVE_INTERVAL oldSaveInterval newSaveInterval CoreException IDEWorkbenchPlugin getStatus ResourcesPlugin getPlugin getPluginPreferences autoRefresh autoRefreshButton getSelection setValue ResourcesPlugin PREF_AUTO_REFRESH autoRefresh performOk
Create the Refresh controls param parent private void create Auto Refresh Controls Composite parent this auto Refresh Button new Button parent SWT CHECK this auto Refresh Button set Text IDE Workbench Messages get String Workbench Preference Refresh Button Text NON NLS 1 this auto Refresh Button set Tool Tip Text IDE Workbench Messages get String Workbench Preference Refresh Button Tool Tip NON NLS 1 boolean auto Refresh Resources Plugin get Plugin get Plugin Preferences get Boolean Resources Plugin PREF AUTO REFRESH this auto Refresh Button set Selection auto Refresh  createAutoRefreshControls autoRefreshButton autoRefreshButton setText IDEWorkbenchMessages getString WorkbenchPreference RefreshButtonText autoRefreshButton setToolTipText IDEWorkbenchMessages getString WorkbenchPreference RefreshButtonToolTip autoRefresh ResourcesPlugin getPlugin getPluginPreferences getBoolean ResourcesPlugin PREF_AUTO_REFRESH autoRefreshButton setSelection autoRefresh
Check the state of the text param text The widget to check return code true code if the text has a valid number entered protected boolean check State Text text if text null return false try Integer value Of text get Text int Value set Error Message null return true catch Number Format Exception e1 set Error Message Work In Progress Messages get String Work In Progress Preference Page Invalid Message NON NLS 1 return false  checkState valueOf getText intValue setErrorMessage NumberFormatException setErrorMessage WorkInProgressMessages getString WorkInProgressPreferencePage InvalidMessage

public interface I Element Filter public void filter Elements Collection elements I Progress Monitor monitor throws Interrupted Exception  IElementFilter filterElements IProgressMonitor InterruptedException
throws Interrupted Exception public void filter Elements Object elements I Progress Monitor monitor throws Interrupted Exception  InterruptedException filterElements IProgressMonitor InterruptedException

Creates the capability install step param number step order number param capability the capability to install public Install Capability Step int number Capability capability I Workbench workbench I Project Provider project Provider super number this capability capability this workbench workbench this project Provider project Provider  InstallCapabilityStep IWorkbench IProjectProvider projectProvider projectProvider projectProvider
Method declared on Wizard Step public String get Label return IDE Workbench Messages format Install Capability Step label new Object capability get Name NON NLS 1  WizardStep getLabel IDEWorkbenchMessages InstallCapabilityStep getName
Method declared on Wizard Step public String get Details return capability get Install Details  WizardStep getDetails getInstallDetails
public I Wizard get Wizard if wizard null wizard capability get Install Wizard if wizard null wizard init workbench Structured Selection EMPTY project Provider get Project wizard add Pages return wizard  IWizard getWizard getInstallWizard StructuredSelection projectProvider getProject addPages
interface I Project Provider Returns the project to which the capability is to be configured against  IProjectProvider

private static final String filler NON NLS 1 Answer a string representing the Base 64 encoded form of the passed byte array return java lang String param contents byte public static String encode byte contents String Buffer result new String Buffer for int i 0 i contents length i i 3 if result length 76 result append n r NON NLS 1 output character 1 result append mappings char At contents i 0xFC 2 output character 2 int c2 contents i 0x03 4 if i 1 contents length result append mappings char At c2 result append filler result append filler return result to String c2 contents i 1 0xF0 4 result append mappings char At c2 output character 3 int c3 contents i 1 0x0F 2 if i 2 contents length result append mappings char At c3 result append filler return result to String c3 contents i 2 0xC0 6 result append mappings char At c3 output character 4 result append mappings char At contents i 2 0x3F return result to String  StringBuffer StringBuffer charAt charAt toString charAt charAt toString charAt charAt toString

public Internal Error Dialog Shell parent Shell String dialog Title Image dialog Title Image String dialog Message Throwable detail int dialog Image Type String dialog Button Labels int default Index super parent Shell dialog Title dialog Title Image dialog Message dialog Image Type dialog Button Labels default Index default Button Index default Index this detail detail set Shell Style get Shell Style SWT APPLICATION MODAL  InternalErrorDialog parentShell dialogTitle dialogTitleImage dialogMessage dialogImageType dialogButtonLabels defaultIndex parentShell dialogTitle dialogTitleImage dialogMessage dialogImageType dialogButtonLabels defaultIndex defaultButtonIndex defaultIndex setShellStyle getShellStyle APPLICATION_MODAL
there is not control with focus Bug 14668 public int open create Button b get Button default Button Index b set Focus b get Shell set Default Button b return super open  getButton defaultButtonIndex setFocus getShell setDefaultButton
Set the detail button public void set Detail Button int index detail ButtonID index  setDetailButton detailButtonID
protected void button Pressed int button Id if button Id detail ButtonID toggle Details Area else set Return Code button Id close  buttonPressed buttonId buttonId detailButtonID toggleDetailsArea setReturnCode buttonId
Toggles the unfolding of the details area This is triggered by the user pressing the details button private void toggle Details Area Point window Size get Shell get Size Point old Size get Contents compute Size SWT DEFAULT SWT DEFAULT if text null text dispose text null get Button detail ButtonID set Text I Dialog Constants SHOW DETAILS LABEL else create Drop Down Text Composite get Contents get Button detail ButtonID set Text I Dialog Constants HIDE DETAILS LABEL Point new Size get Contents compute Size SWT DEFAULT SWT DEFAULT get Shell set Size new Point window Size x window Size y new Size y old Size y  toggleDetailsArea windowSize getShell getSize oldSize getContents computeSize getButton detailButtonID setText IDialogConstants SHOW_DETAILS_LABEL createDropDownText getContents getButton detailButtonID setText IDialogConstants HIDE_DETAILS_LABEL newSize getContents computeSize getShell setSize windowSize windowSize newSize oldSize
Create this dialog s drop down list component param parent the parent composite return the drop down list component protected void create Drop Down Text Composite parent create the list text new Text parent SWT BORDER SWT H SCROLL SWT V SCROLL text set Font parent get Font print the stacktrace in the text field try Byte Array Output Stream baos new Byte Array Output Stream Print Stream ps new Print Stream baos detail print Stack Trace ps if detail instanceof SWT Error SWT Error detail throwable null ps println n Stack trace of contained exception NON NLS 1 SWT Error detail throwable print Stack Trace ps else if detail instanceof SWT Exception SWT Exception detail throwable null ps println n Stack trace of contained exception NON NLS 1 SWT Exception detail throwable print Stack Trace ps ps flush baos flush text set Text baos to String catch IO Exception e Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Grid Data VERTICAL ALIGN FILL Grid Data GRAB VERTICAL data height Hint text get Line Height TEXT LINE COUNT text set Layout Data data  createDropDownText H_SCROLL V_SCROLL setFont getFont ByteArrayOutputStream ByteArrayOutputStream PrintStream PrintStream printStackTrace SWTError SWTError SWTError printStackTrace SWTException SWTException SWTException printStackTrace setText toString IOException GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridData VERTICAL_ALIGN_FILL GridData GRAB_VERTICAL heightHint getLineHeight TEXT_LINE_COUNT setLayoutData
Convenience method to open a simple Yes No question dialog param parent the parent shell of the dialog or code null code if none param title the dialog s title or code null code if none param message the message return code true code if the user presses the OK button code false code otherwise public static boolean open Question Shell parent String title String message Throwable detail int default Index String labels if detail null labels new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL else labels new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL I Dialog Constants SHOW DETAILS LABEL Internal Error Dialog dialog new Internal Error Dialog parent title null accept the default window icon message detail QUESTION labels default Index if detail null dialog set Detail Button 2 return dialog open 0  openQuestion defaultIndex IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants SHOW_DETAILS_LABEL InternalErrorDialog InternalErrorDialog defaultIndex setDetailButton

Constructs a preference page of path variables Omits Restore Defaults Apply Changes buttons public Linked Resources Preference Page path Variables Group new Path Variables Group true I Resource FILE I Resource FOLDER this no Default And Apply Button  LinkedResourcesPreferencePage pathVariablesGroup PathVariablesGroup IResource IResource noDefaultAndApplyButton
enable Linked Resources Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean enabled enable Linked Resources Button get Selection Preferences preferences Resources Plugin get Plugin get Plugin Preferences preferences set Value Resources Plugin PREF DISABLE LINKING enabled update Widget State enabled if enabled Message Dialog open Warning get Shell IDE Workbench Messages get String Linked Resources Preference linked Resources Warning Title NON NLS 1 IDE Workbench Messages get String Linked Resources Preference linked Resources Warning Message NON NLS 1  enableLinkedResourcesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent enableLinkedResourcesButton getSelection ResourcesPlugin getPlugin getPluginPreferences setValue ResourcesPlugin PREF_DISABLE_LINKING updateWidgetState MessageDialog openWarning getShell IDEWorkbenchMessages getString LinkedResourcesPreference linkedResourcesWarningTitle IDEWorkbenchMessages getString LinkedResourcesPreference linkedResourcesWarningMessage
Resets this page s internal state and creates its UI contents see Preference Page create Contents org eclipse swt widgets Composite protected Control create Contents Composite parent Font font parent get Font Workbench Help set Help parent I Help Context Ids LINKED RESOURCE PREFERENCE PAGE define container its gridding Composite page Component new Composite parent SWT NULL Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 page Component set Layout layout Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL page Component set Layout Data data page Component set Font font final Button enable Linked Resources Button new Button page Component SWT CHECK enable Linked Resources Button set Text IDE Workbench Messages get String Linked Resources Preference enable Linked Resources NON NLS 1 enable Linked Resources Button set Font font enable Linked Resources Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean enabled enable Linked Resources Button get Selection Preferences preferences Resources Plugin get Plugin get Plugin Preferences preferences set Value Resources Plugin PREF DISABLE LINKING enabled update Widget State enabled if enabled Message Dialog open Warning get Shell IDE Workbench Messages get String Linked Resources Preference linked Resources Warning Title NON NLS 1 IDE Workbench Messages get String Linked Resources Preference linked Resources Warning Message NON NLS 1 create Space page Component top Label new Label page Component SWT NONE top Label set Text IDE Workbench Messages get String Linked Resources Preference explanation NON NLS 1 data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL top Label set Layout Data data top Label set Font font path Variables Group create Contents page Component Preferences preferences Resources Plugin get Plugin get Plugin Preferences boolean enable Linking preferences get Boolean Resources Plugin PREF DISABLE LINKING enable Linked Resources Button set Selection enable Linking update Widget State enable Linking return page Component  PreferencePage createContents createContents getFont WorkbenchHelp setHelp IHelpContextIds LINKED_RESOURCE_PREFERENCE_PAGE pageComponent GridLayout GridLayout marginWidth marginHeight pageComponent setLayout GridData GridData verticalAlignment GridData horizontalAlignment GridData pageComponent setLayoutData pageComponent setFont enableLinkedResourcesButton pageComponent enableLinkedResourcesButton setText IDEWorkbenchMessages getString LinkedResourcesPreference enableLinkedResources enableLinkedResourcesButton setFont enableLinkedResourcesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent enableLinkedResourcesButton getSelection ResourcesPlugin getPlugin getPluginPreferences setValue ResourcesPlugin PREF_DISABLE_LINKING updateWidgetState MessageDialog openWarning getShell IDEWorkbenchMessages getString LinkedResourcesPreference linkedResourcesWarningTitle IDEWorkbenchMessages getString LinkedResourcesPreference linkedResourcesWarningMessage createSpace pageComponent topLabel pageComponent topLabel setText IDEWorkbenchMessages getString LinkedResourcesPreference GridData verticalAlignment GridData horizontalAlignment GridData topLabel setLayoutData topLabel setFont pathVariablesGroup createContents pageComponent ResourcesPlugin getPlugin getPluginPreferences enableLinking getBoolean ResourcesPlugin PREF_DISABLE_LINKING enableLinkedResourcesButton setSelection enableLinking updateWidgetState enableLinking pageComponent
Creates a tab of one horizontal spans param parent the parent in which the tab should be created protected static void create Space Composite parent Label vfiller new Label parent SWT LEFT Grid Data grid Data new Grid Data grid Data new Grid Data grid Data horizontal Alignment Grid Data BEGINNING grid Data grab Excess Horizontal Space false grid Data vertical Alignment Grid Data CENTER grid Data grab Excess Vertical Space false vfiller set Layout Data grid Data  createSpace GridData gridData GridData gridData GridData gridData horizontalAlignment GridData gridData grabExcessHorizontalSpace gridData verticalAlignment GridData gridData grabExcessVerticalSpace setLayoutData gridData
Disposes the path variables group see org eclipse jface dialogs I Dialog Page dispose public void dispose path Variables Group dispose super dispose  IDialogPage pathVariablesGroup
Empty implementation This page does not use the workbench see I Workbench Preference Page init org eclipse ui I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
Commits the temporary state to the path variable manager in response to user confirmation see Preference Page perform Ok see Path Variables Group perform Ok public boolean perform Ok return path Variables Group perform Ok  PreferencePage performOk PathVariablesGroup performOk performOk pathVariablesGroup performOk
Set the widget enabled state param enable Linking the new widget enabled state protected void update Widget State boolean enable Linking top Label set Enabled enable Linking path Variables Group set Enabled enable Linking  enableLinking updateWidgetState enableLinking topLabel setEnabled enableLinking pathVariablesGroup setEnabled enableLinking

public abstract class Multi Step Capability Wizard extends Multi Step Wizard implements I Project Provider Creates an empty wizard protected Multi Step Capability Wizard super  MultiStepCapabilityWizard MultiStepWizard IProjectProvider MultiStepCapabilityWizard
Returns the I Ds of the perspectives to present as choices to the user  IDs
public boolean perform Finish if super perform Finish return false Allow the user to choose which perspective to switch to if is Configure Step Mode I Workbench Window window PlatformUI get Workbench get Active Workbench Window String persp Ids get Perspective Choices if persp Ids length 0 Project Perspective Choice Dialog dialog dialog new Project Perspective Choice Dialog window persp Ids dialog open if dialog get Return Code Dialog OK window dialog show Chosen Perspective I Project project get Project if project null Basic New Resource Wizard select And Reveal project window return true  performFinish performFinish isConfigureStepMode IWorkbenchWindow getWorkbench getActiveWorkbenchWindow perspIds getPerspectiveChoices perspIds ProjectPerspectiveChoiceDialog ProjectPerspectiveChoiceDialog perspIds getReturnCode showChosenPerspective IProject getProject BasicNewResourceWizard selectAndReveal

Creates a new multi step wizard page param page Name the name of this page public Multi Step Configure Wizard Page String page Name super page Name  pageName MultiStepConfigureWizardPage pageName pageName
Method declared on I Wizard Page public boolean can Flip To Next Page return step Container can Flip To Next Page  IWizardPage canFlipToNextPage stepContainer canFlipToNextPage
public void create Control Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH composite set Font parent get Font Workbench Help set Help composite I Help Context Ids NEW PROJECT CONFIGURE WIZARD PAGE create Step Group composite create Embedded Page Site composite set Control composite  createControl GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_BOTH setFont getFont WorkbenchHelp setHelp IHelpContextIds NEW_PROJECT_CONFIGURE_WIZARD_PAGE createStepGroup createEmbeddedPageSite setControl
Creates the control where the step s wizard will display its pages private void create Embedded Page Site Composite parent page Site new Composite parent SWT NONE page Site set Layout new Grid Layout page Site set Layout Data new Grid Data Grid Data FILL BOTH  createEmbeddedPageSite pageSite pageSite setLayout GridLayout pageSite setLayoutData GridData GridData FILL_BOTH
Creates the control for the step list private void create Step Group Composite parent step Group new Wizard Step Group step Group create Contents parent  createStepGroup stepGroup WizardStepGroup stepGroup createContents
Returns the container handler for the pages of the step s wizard package Wizard Step Container get Step Container return step Container  WizardStepContainer getStepContainer stepContainer
public String get Message String msg step Container get Message if msg null msg length 0 msg super get Message return msg  getMessage stepContainer getMessage getMessage
Method declared on I Wizard Page public I Wizard Page get Previous Page return step Container get Previous Page  IWizardPage IWizardPage getPreviousPage stepContainer getPreviousPage
Method declared on I Wizard Page public void set Previous Page I Wizard Page page Do not allow to go back super set Previous Page null  IWizardPage setPreviousPage IWizardPage setPreviousPage
Sets the steps to be displayed Ignored if the create Control has not been called yet param steps the collection of steps package void set Steps Wizard Step steps if step Group null step Group set Steps steps  createControl setSteps WizardStep stepGroup stepGroup setSteps
Sets the multi step wizard dialog processing this page package void set Wizard Dialog Multi Step Wizard Dialog dialog wizard Dialog dialog  setWizardDialog MultiStepWizardDialog wizardDialog
get Control get Display async Exec new Runnable public void run step Container process Current Step  getControl getDisplay asyncExec stepContainer processCurrentStep
public void set Visible boolean visible super set Visible visible Wizard Step steps step Group get Steps Multi Step Wizard step Wizard wizard Dialog get Multi Step Wizard wizard Dialog set Finish Label step Wizard get Finish Step Label steps get Control get Display async Exec new Runnable public void run step Container process Current Step  setVisible setVisible WizardStep stepGroup getSteps MultiStepWizard stepWizard wizardDialog getMultiStepWizard wizardDialog setFinishLabel stepWizard getFinishStepLabel getControl getDisplay asyncExec stepContainer processCurrentStep
Method declared on I Runnable Context public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception get Container run fork cancelable runnable  IRunnableContext IRunnableWithProgress InvocationTargetException InterruptedException getContainer
Method declared on I Wizard Container public I Wizard Page get Current Page return current Page  IWizardContainer IWizardPage getCurrentPage currentPage
Method declared on I Wizard Container public Shell get Shell return get Container get Shell  IWizardContainer getShell getContainer getShell
Method declared on I Wizard Container public void show Page I Wizard Page page show Page page true  IWizardContainer showPage IWizardPage showPage
Method declared on I Wizard Container public void update Buttons get Container update Buttons  IWizardContainer updateButtons getContainer updateButtons
Method declared on I Wizard Container public void update Message get Container update Message  IWizardContainer updateMessage getContainer updateMessage
Method declared on I Wizard Container public void update Title Bar get Container update Title Bar  IWizardContainer updateTitleBar getContainer updateTitleBar
Method declared on I Wizard Container public void update Window Title get Container update Window Title  IWizardContainer updateWindowTitle getContainer updateWindowTitle
Handles the back button pressed public void back Pressed show Page current Page get Previous Page false  backPressed showPage currentPage getPreviousPage
Handles the next button pressed public void next Pressed show Page current Page get Next Page true  nextPressed showPage currentPage getNextPage
Handles the help button pressed public void help Pressed if current Page null current Page perform Help  helpPressed currentPage currentPage performHelp
Handles close request public final boolean perform Cancel if wizard null return wizard perform Cancel else return true  performCancel performCancel
Handles finish request public final boolean perform Finish if wizard null if wizard perform Finish wizard dispose wizard set Container null step Group mark Step As Done step Index return true else return false else return true  performFinish performFinish setContainer stepGroup markStepAsDone stepIndex
Calculates the difference in size between the given page and the page site A larger page results in a positive delta param page the page return the size difference encoded as a code new Point delta Width delta Height code private Point calculate Page Size Delta I Wizard Page page Control page Control page get Control if page Control null control not created yet return new Point 0 0 Point content Size page Control compute Size SWT DEFAULT SWT DEFAULT true Rectangle rect page Site get Client Area Point container Size new Point rect width rect height return new Point Math max 0 content Size x container Size x Math max 0 content Size y container Size y  deltaWidth deltaHeight calculatePageSizeDelta IWizardPage pageControl getControl pageControl contentSize pageControl computeSize pageSite getClientArea containerSize contentSize containerSize contentSize containerSize
Computes the correct page site size for the given page and resizes the dialog if nessessary param page the wizard page private void update Size For Page I Wizard Page page ensure the page container is large enough Point delta calculate Page Size Delta page if delta x 0 delta y 0 Point site Size page Site get Size Grid Data data Grid Data page Site get Layout Data data height Hint site Size y delta y data width Hint site Size x delta x  updateSizeForPage IWizardPage calculatePageSizeDelta siteSize pageSite getSize GridData GridData pageSite getLayoutData heightHint siteSize widthHint siteSize
Computes the correct page site size for the given wizard and resizes the dialog if nessessary param wizard the wizard private void update Size For Wizard I Wizard wizard Point delta new Point 0 0 I Wizard Page pages wizard get Pages for int i 0 i pages length i ensure the page site is large enough Point page Delta calculate Page Size Delta pages i delta x Math max delta x page Delta x delta y Math max delta y page Delta y if delta x 0 delta y 0 Point site Size page Site get Size Grid Data data Grid Data page Site get Layout Data data height Hint site Size y delta y data width Hint site Size x delta x  updateSizeForWizard IWizard IWizardPage getPages pageDelta calculatePageSizeDelta pageDelta pageDelta siteSize pageSite getSize GridData GridData pageSite getLayoutData heightHint siteSize widthHint siteSize
Busy Indicator show While get Shell get Display new Runnable public void run step Wizard 0 step get Wizard int tries 0 while step Wizard 0 null tries 3 boolean try Again wizard Dialog get Multi Step Wizard handle Missing Step Wizard step if try Again break else step Wizard 0 step get Wizard  BusyIndicator showWhile getShell getDisplay stepWizard getWizard stepWizard tryAgain wizardDialog getMultiStepWizard handleMissingStepWizard tryAgain stepWizard getWizard
Process the current step s wizard public void process Current Step Wizard Step steps step Group get Steps while step Index steps length adjust the finish button label if step Index steps length 1 wizard Dialog set Finish Label null final Wizard Step step steps step Index step Group set Current Step step final I Wizard step Wizard new I Wizard 1 Busy Indicator show While get Shell get Display new Runnable public void run step Wizard 0 step get Wizard int tries 0 while step Wizard 0 null tries 3 boolean try Again wizard Dialog get Multi Step Wizard handle Missing Step Wizard step if try Again break else step Wizard 0 step get Wizard if step Wizard 0 null break set Wizard step Wizard 0 if step Wizard 0 get Page Count 0 return else perform Finish wizard Dialog force Close  processCurrentStep WizardStep stepGroup getSteps stepIndex stepIndex wizardDialog setFinishLabel WizardStep stepIndex stepGroup setCurrentStep IWizard stepWizard IWizard BusyIndicator showWhile getShell getDisplay stepWizard getWizard stepWizard tryAgain wizardDialog getMultiStepWizard handleMissingStepWizard tryAgain stepWizard getWizard stepWizard setWizard stepWizard stepWizard getPageCount performFinish wizardDialog forceClose
Sets the current wizard public void set Wizard I Wizard new Wizard wizard new Wizard Allow the wizard pages to precreate their page controls This allows the wizard to open to the correct size wizard create Page Controls page Site Ensure that all of the created pages are initially not visible I Wizard Page pages wizard get Pages for int i 0 i pages length i I Wizard Page page I Wizard Page pages i if page get Control null page get Control set Visible false Ensure the dialog is large enough for the wizard update Size For Wizard wizard wizard Dialog update Layout wizard set Container this show Page wizard get Starting Page false  setWizard IWizard newWizard newWizard createPageControls pageSite IWizardPage getPages IWizardPage IWizardPage getControl getControl setVisible updateSizeForWizard wizardDialog updateLayout setContainer showPage getStartingPage
Show the requested page public void show Page I Wizard Page page boolean remember Previous if page null page current Page return if remember Previous current Page null page set Previous Page current Page if wizard page get Wizard throw new Illegal State Exception ensure that page control has been created this allows lazy page control creation if page get Control null page create Control page Site the page is responsible for ensuring the created control is accessable via get Control if page get Control null throw new Illegal Argument Exception ensure the dialog is large enough for this page update Size For Page page wizard Dialog update Layout make the new page visible I Wizard Page old Page current Page current Page page current Page set Visible true if old Page null old Page set Visible false page get Control set Bounds page Site get Client Area update the dialog controls wizard Dialog update All  showPage IWizardPage rememberPrevious currentPage rememberPrevious currentPage setPreviousPage currentPage getWizard IllegalStateException getControl createControl pageSite getControl getControl IllegalArgumentException updateSizeForPage wizardDialog updateLayout IWizardPage oldPage currentPage currentPage currentPage setVisible oldPage oldPage setVisible getControl setBounds pageSite getClientArea wizardDialog updateAll
Returns whether the current wizard can finish public boolean can Wizard Finish if wizard null return wizard can Finish else return false  canWizardFinish canFinish
Returns whether the current page can flip to the next page public boolean can Flip To Next Page if current Page null return current Page can Flip To Next Page else return false  canFlipToNextPage currentPage currentPage canFlipToNextPage
Returns the current page s message public String get Message if current Page null return current Page get Message else return null  getMessage currentPage currentPage getMessage
Returns the current page s previous page public I Wizard Page get Previous Page if current Page null return current Page get Previous Page else return null  IWizardPage getPreviousPage currentPage currentPage getPreviousPage

Creates a new step review wizard page param page Name the name of this page public Multi Step Review Wizard Page String page Name Multi Step Wizard step Wizard super page Name this step Wizard step Wizard  pageName MultiStepReviewWizardPage pageName MultiStepWizard stepWizard pageName stepWizard stepWizard
Method declared on I Wizard Page public boolean can Flip To Next Page Already know there is a next page return is Page Complete step Wizard can Finish On Review Page  IWizardPage canFlipToNextPage isPageComplete stepWizard canFinishOnReviewPage
public void create Control Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH Workbench Help set Help composite I Help Context Ids NEW PROJECT REVIEW WIZARD PAGE create Step Group composite create Details Group composite create Instructions Group composite set Control composite  createControl GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_BOTH WorkbenchHelp setHelp IHelpContextIds NEW_PROJECT_REVIEW_WIZARD_PAGE createStepGroup createDetailsGroup createInstructionsGroup setControl
Creates the control for the details private void create Details Group Composite parent Font font parent get Font Create a composite to hold everything together Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL BOTH Add a label to identify the details text field Label label new Label composite SWT LEFT label set Text IDE Workbench Messages get String Multi Step Review Wizard Page details Label NON NLS 1 Grid Data data new Grid Data data vertical Alignment SWT TOP label set Layout Data data label set Font font Text field to display the step s details details Field new Text composite SWT WRAP SWT MULTI SWT V SCROLL SWT BORDER details Field set Text n n n n n n n n n n n n n n n prefill to show 15 lines NON NLS 1 details Field set Editable false details Field set Layout Data new Grid Data Grid Data FILL BOTH details Field set Font font  createDetailsGroup getFont setLayout GridLayout setLayoutData GridData GridData FILL_BOTH setText IDEWorkbenchMessages getString MultiStepReviewWizardPage detailsLabel GridData GridData verticalAlignment setLayoutData setFont detailsField V_SCROLL detailsField setText detailsField setEditable detailsField setLayoutData GridData GridData FILL_BOTH detailsField setFont
Creates the control for the instructions private void create Instructions Group Composite parent instruction Label new Label parent SWT LEFT instruction Label set Text IDE Workbench Messages get String Multi Step Review Wizard Page instruction Finish Label NON NLS 1 Grid Data data new Grid Data data vertical Alignment SWT TOP data horizontal Span 2 instruction Label set Layout Data data instruction Label set Font parent get Font  createInstructionsGroup instructionLabel instructionLabel setText IDEWorkbenchMessages getString MultiStepReviewWizardPage instructionFinishLabel GridData GridData verticalAlignment horizontalSpan instructionLabel setLayoutData instructionLabel setFont getFont
step Group set Selection Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event if event get Selection instanceof I Structured Selection I Structured Selection sel I Structured Selection event get Selection Wizard Step step Wizard Step sel get First Element if step null details Field set Text step get Details  stepGroup setSelectionListener ISelectionChangedListener selectionChanged SelectionChangedEvent getSelection IStructuredSelection IStructuredSelection IStructuredSelection getSelection WizardStep WizardStep getFirstElement detailsField setText getDetails
Creates the control for the step list private void create Step Group Composite parent step Group new Wizard Step Group step Group create Contents parent step Group set Selection Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event if event get Selection instanceof I Structured Selection I Structured Selection sel I Structured Selection event get Selection Wizard Step step Wizard Step sel get First Element if step null details Field set Text step get Details  createStepGroup stepGroup WizardStepGroup stepGroup createContents stepGroup setSelectionListener ISelectionChangedListener selectionChanged SelectionChangedEvent getSelection IStructuredSelection IStructuredSelection IStructuredSelection getSelection WizardStep WizardStep getFirstElement detailsField setText getDetails
Returns the steps to be displayed package Wizard Step get Steps if step Group null return step Group get Steps else return new Wizard Step 0  WizardStep getSteps stepGroup stepGroup getSteps WizardStep
Sets the steps to be displayed Has no effect if the page is not yet created param steps the collection of steps package void set Steps Wizard Step steps if step Group null step Group set Steps steps  setSteps WizardStep stepGroup stepGroup setSteps
public void set Visible boolean visible super set Visible visible if visible if step Wizard can Finish On Review Page instruction Label set Text IDE Workbench Messages get String Multi Step Review Wizard Page instruction Finish Label NON NLS 1 else instruction Label set Text IDE Workbench Messages get String Multi Step Review Wizard Page instruction Next Label NON NLS 1 Composite get Control layout true  setVisible setVisible stepWizard canFinishOnReviewPage instructionLabel setText IDEWorkbenchMessages getString MultiStepReviewWizardPage instructionFinishLabel instructionLabel setText IDEWorkbenchMessages getString MultiStepReviewWizardPage instructionNextLabel getControl

Creates an empty wizard protected Multi Step Wizard super set Needs Progress Monitor true  MultiStepWizard setNeedsProgressMonitor
Adds any custom pages to the wizard before the multi step review and configure pages are added 
public final void add Pages super add Pages add Custom Pages review Page new Multi Step Review Wizard Page multi Step Review Wizard Page this NON NLS 1 review Page set Title get Review Page Title NON NLS 1 review Page set Description get Review Page Description NON NLS 1 this add Page review Page config Page new Multi Step Configure Wizard Page multi Step Configure Wizard Page NON NLS 1 config Page set Title get Configure Page Title NON NLS 1 config Page set Description get Configure Page Description NON NLS 1 config Page set Wizard Dialog wizard Dialog this add Page config Page  addPages addPages addCustomPages reviewPage MultiStepReviewWizardPage multiStepReviewWizardPage reviewPage setTitle getReviewPageTitle reviewPage setDescription getReviewPageDescription addPage reviewPage configPage MultiStepConfigureWizardPage multiStepConfigureWizardPage configPage setTitle getConfigurePageTitle configPage setDescription getConfigurePageDescription configPage setWizardDialog wizardDialog addPage configPage
public boolean can Finish if get Container get Current Page review Page return can Finish On Review Page else if is Configure Step Mode return get Step Container can Wizard Finish else return false  canFinish getContainer getCurrentPage reviewPage canFinishOnReviewPage isConfigureStepMode getStepContainer canWizardFinish
Returns whether the wizard wants the Finish button enabled on the review page Should only happen if there is only one step and that step does not require further interaction with the user The Next button will be disabled and the instructions updated 
Method declared on I Wizard public void dispose super dispose wizard Dialog null  IWizard wizardDialog
Returns the title for the multi step configure page 
Returns the description for the multi step configure page 
Returns the title for the multi step review page 
Returns the label used on the finish button to to indicate finishing a step Can be code null code if no special label is required p The default implementation is to return the translated label Finish Step p p On the last step the finish button label is changed to be Finish and will no be changed p protected String get Finish Step Label Wizard Step steps return IDE Workbench Messages get String Multi Step Wizard finish Label NON NLS 1  getFinishStepLabel WizardStep IDEWorkbenchMessages getString MultiStepWizard finishLabel
public final I Wizard Page get Previous Page I Wizard Page page if page config Page return null else return super get Previous Page page  IWizardPage getPreviousPage IWizardPage configPage getPreviousPage
Returns the description for the multi step review page 
Returns the container handler for the pages of the step s wizard package Wizard Step Container get Step Container return config Page get Step Container  WizardStepContainer getStepContainer configPage getStepContainer
Handles the problem of a missing step wizard return code true code to retry code false code to terminate multi step wizard dialog 
Returns whether the wizard is configuring steps package boolean is Configure Step Mode return get Container get Current Page config Page  isConfigureStepMode getContainer getCurrentPage configPage
public final boolean perform Cancel if is Configure Step Mode return get Step Container perform Cancel else return true  performCancel isConfigureStepMode getStepContainer performCancel
public boolean perform Finish Finish on review page is a shortcut to performing the steps if get Container get Current Page review Page get Container show Page config Page return false Does nothing as each step is responsible to complete its work when its wizard is done return true  performFinish getContainer getCurrentPage reviewPage getContainer showPage configPage
Returns the collection of steps for the wizard public final Wizard Step get Steps if review Page null return review Page get Steps else return new Wizard Step 0  WizardStep getSteps reviewPage reviewPage getSteps WizardStep
Sets the collection of steps for the wizard Ignored if the multi step review and configure pages are not yet created public final void set Steps Wizard Step steps if review Page null review Page set Steps steps if config Page null config Page set Steps steps  setSteps WizardStep reviewPage reviewPage setSteps configPage configPage setSteps
Sets the multi step wizard dialog processing this wizard package void set Wizard Dialog Multi Step Wizard Dialog dialog wizard Dialog dialog if config Page null config Page set Wizard Dialog wizard Dialog  setWizardDialog MultiStepWizardDialog wizardDialog configPage configPage setWizardDialog wizardDialog

Creates a new wizard dialog for the given wizard param parent Shell the parent shell param new Wizard the multi step wizard this dialog is working on public Multi Step Wizard Dialog Shell parent Shell Multi Step Wizard new Wizard super parent Shell new Wizard multi Step Wizard new Wizard multi Step Wizard set Wizard Dialog this  parentShell newWizard MultiStepWizardDialog parentShell MultiStepWizard newWizard parentShell newWizard multiStepWizard newWizard multiStepWizard setWizardDialog
Forces the wizard dialog to close package void force Close super finish Pressed  forceClose finishPressed
protected void back Pressed if multi Step Wizard is Configure Step Mode multi Step Wizard get Step Container back Pressed else super back Pressed  backPressed multiStepWizard isConfigureStepMode multiStepWizard getStepContainer backPressed backPressed
protected void finish Pressed if multi Step Wizard is Configure Step Mode boolean success multi Step Wizard get Step Container perform Finish if success multi Step Wizard get Step Container process Current Step else super finish Pressed  finishPressed multiStepWizard isConfigureStepMode multiStepWizard getStepContainer performFinish multiStepWizard getStepContainer processCurrentStep finishPressed
Returns the multi step wizard for this dialog package Multi Step Wizard get Multi Step Wizard return multi Step Wizard  MultiStepWizard getMultiStepWizard multiStepWizard
protected void help Pressed if multi Step Wizard is Configure Step Mode multi Step Wizard get Step Container help Pressed else super help Pressed  helpPressed multiStepWizard isConfigureStepMode multiStepWizard getStepContainer helpPressed helpPressed
protected void next Pressed if multi Step Wizard is Configure Step Mode multi Step Wizard get Step Container next Pressed else super next Pressed  nextPressed multiStepWizard isConfigureStepMode multiStepWizard getStepContainer nextPressed nextPressed
Sets the label for the finish button package void set Finish Label String label Button button get Button I Dialog Constants FINISH ID if button null return if label null if button get Text equals I Dialog Constants FINISH LABEL button set Text I Dialog Constants FINISH LABEL Composite button get Parent layout true else button set Text label Composite button get Parent layout true  setFinishLabel getButton IDialogConstants FINISH_ID getText IDialogConstants FINISH_LABEL setText IDialogConstants FINISH_LABEL getParent setText getParent
Updates everything in the dialog package void update All super update  updateAll
Updates the layout of the dialog package void update Layout super update Size get Current Page  updateLayout updateSize getCurrentPage

Creates an empty wizard for creating a new project in the workspace public New Project Wizard super IDE Workbench Plugin plugin IDE Workbench Plugin get Default I Dialog Settings workbench Settings plugin get Dialog Settings I Dialog Settings section workbench Settings get Section New Project Wizard NON NLS 1 if section null section workbench Settings add New Section New Project Wizard NON NLS 1 set Dialog Settings section  NewProjectWizard IDEWorkbenchPlugin IDEWorkbenchPlugin getDefault IDialogSettings workbenchSettings getDialogSettings IDialogSettings workbenchSettings getSection NewProjectWizard workbenchSettings addNewSection NewProjectWizard setDialogSettings
protected void add Custom Pages creation Page new Wizard New Project Name And Location Page new Project Creation Page NON NLS 1 creation Page set Title IDE Workbench Messages get String New Project Wizard title NON NLS 1 creation Page set Description IDE Workbench Messages get String Wizard New Project Creation Page description NON NLS 1 creation Page set Initial Project Name initial Project Name this add Page creation Page capability Page new Wizard New Project Capability Page new Project Capability Page NON NLS 1 capability Page set Title IDE Workbench Messages get String New Project Wizard title NON NLS 1 capability Page set Description IDE Workbench Messages get String Wizard New Project Capability Page description NON NLS 1 capability Page set Initial Project Capabilities initial Project Capabilities capability Page set Initial Selected Categories initial Selected Categories this add Page capability Page  addCustomPages creationPage WizardNewProjectNameAndLocationPage newProjectCreationPage creationPage setTitle IDEWorkbenchMessages getString NewProjectWizard creationPage setDescription IDEWorkbenchMessages getString WizardNewProjectCreationPage creationPage setInitialProjectName initialProjectName addPage creationPage capabilityPage WizardNewProjectCapabilityPage newProjectCapabilityPage capabilityPage setTitle IDEWorkbenchMessages getString NewProjectWizard capabilityPage setDescription IDEWorkbenchMessages getString WizardNewProjectCapabilityPage capabilityPage setInitialProjectCapabilities initialProjectCapabilities capabilityPage setInitialSelectedCategories initialSelectedCategories addPage capabilityPage
Builds the collection of steps to create and install the chosen capabilities return code true code if successful code false code if a problem was detected private boolean build Steps Capability caps capability Page get Selected Capabilities Capability Registry reg IDE Workbench Plugin get Default get Capability Registry I Status status reg validate Capabilities caps if status isOK Capability results reg prune Capabilities caps Wizard Step steps new Wizard Step results length 1 steps 0 new Create Project Step 1 creation Page this for int i 0 i results length i steps i 1 new Install Capability Step i 2 results i workbench this set Steps steps return true else Error Dialog open Error get Shell IDE Workbench Messages get String New Project Wizard error Title NON NLS 1 IDE Workbench Messages get String New Project Wizard invalid Capabilities NON NLS 1 status return false  buildSteps capabilityPage getSelectedCapabilities CapabilityRegistry IDEWorkbenchPlugin getDefault getCapabilityRegistry IStatus validateCapabilities pruneCapabilities WizardStep WizardStep CreateProjectStep creationPage InstallCapabilityStep setSteps ErrorDialog openError getShell IDEWorkbenchMessages getString NewProjectWizard errorTitle IDEWorkbenchMessages getString NewProjectWizard invalidCapabilities
Method declared on Multi Step Wizard protected boolean can Finish On Review Page yes if the only step is to create the project return get Steps length 1  MultiStepWizard canFinishOnReviewPage getSteps
Method declared on Multi Step Wizard protected String get Configure Page Title return IDE Workbench Messages get String New Project Wizard title NON NLS 1  MultiStepWizard getConfigurePageTitle IDEWorkbenchMessages getString NewProjectWizard
Method declared on Multi Step Wizard protected String get Configure Page Description return IDE Workbench Messages get String Wizard Project Configure Page description NON NLS 1  MultiStepWizard getConfigurePageDescription IDEWorkbenchMessages getString WizardProjectConfigurePage
Method declared on Multi Step Wizard protected String get Review Page Title return IDE Workbench Messages get String New Project Wizard title NON NLS 1  MultiStepWizard getReviewPageTitle IDEWorkbenchMessages getString NewProjectWizard
Method declared on Multi Step Wizard protected String get Review Page Description return IDE Workbench Messages get String Wizard Project Review Page description NON NLS 1  MultiStepWizard getReviewPageDescription IDEWorkbenchMessages getString WizardProjectReviewPage
protected String get Finish Step Label Wizard Step steps The first step is the project creation which has no wizard pages so ignore it If there is only one step after that then it needs the Finish label So the Finish Step label is only needed if more than 2 steps in the list if steps length 2 return super get Finish Step Label steps else return null  getFinishStepLabel WizardStep getFinishStepLabel
Returns the newly created project return the created project or code null code if project is not created yet public I Project get New Project return new Project  IProject getNewProject newProject
protected String get Perspective Choices Array List results new Array List Capability caps capability Page get Selected Capabilities for int i 0 i caps length i Array List ids caps i get Perspective Choices if ids null Iterator enum ids iterator while enum has Next String id String enum next if results contains id results add id String ids new String results size results to Array ids return ids  getPerspectiveChoices ArrayList ArrayList capabilityPage getSelectedCapabilities ArrayList getPerspectiveChoices hasNext toArray
Method declared on I Project Provider public I Project get Project return new Project  IProjectProvider IProject getProject newProject
public I Wizard Page get Next Page I Wizard Page page if page capability Page if build Steps return capability Page return super get Next Page page  IWizardPage getNextPage IWizardPage capabilityPage buildSteps capabilityPage getNextPage
package boolean handle Missing Step Wizard Wizard Step step Message Dialog open Error get Shell IDE Workbench Messages get String New Project Wizard error Title NON NLS 1 IDE Workbench Messages format New Project Wizard no Wizard new Object step get Label NON NLS 1 return false  handleMissingStepWizard WizardStep MessageDialog openError getShell IDEWorkbenchMessages getString NewProjectWizard errorTitle IDEWorkbenchMessages NewProjectWizard noWizard getLabel
public void init I Workbench workbench I Structured Selection current Selection this workbench workbench initialize Default Page Image Descriptor set Window Title IDE Workbench Messages get String New Project Wizard window Title NON NLS 1  IWorkbench IStructuredSelection currentSelection initializeDefaultPageImageDescriptor setWindowTitle IDEWorkbenchMessages getString NewProjectWizard windowTitle
Sets the image banner for the wizard protected void initialize Default Page Image Descriptor String icon Path icons full NON NLS 1 try issue when icons move to IDE need to update the following URL installURL Platform get Plugin PlatformUI PLUGIN ID get Descriptor get InstallURL URL url new URL installURL icon Path wizban newprj wiz gif NON NLS 1 Image Descriptor desc Image Descriptor create FromURL url set Default Page Image Descriptor desc catch MalformedURL Exception e Should not happen Ignore  initializeDefaultPageImageDescriptor iconPath getPlugin PLUGIN_ID getDescriptor getInstallURL iconPath newprj_wiz ImageDescriptor ImageDescriptor createFromURL setDefaultPageImageDescriptor MalformedURLException
Sets the initial categories to be selected param categories initial categories to select public void set Initial Selected Categories Category categories initial Selected Categories categories  setInitialSelectedCategories initialSelectedCategories
Sets the initial project capabilities to be selected param capabilities initial project capabilities to select public void set Initial Project Capabilities Capability capabilities initial Project Capabilities capabilities  setInitialProjectCapabilities initialProjectCapabilities
Sets the initial project name Leading and trailing spaces in the name are ignored param name initial project name public void set Initial Project Name String name if name null initial Project Name null else initial Project Name name trim  setInitialProjectName initialProjectName initialProjectName
Sets the newly created project resource package void set New Project I Project project new Project project  setNewProject IProject newProject

Creates a new instance of the class public Open Resource Dialog Shell parent Shell I Container container int types Mask super parent Shell container types Mask set Title IDE Workbench Messages get String Open Resource Dialog title NON NLS 1 Workbench Help set Help parent Shell I Help Context Ids OPEN RESOURCE DIALOG  OpenResourceDialog parentShell IContainer typesMask parentShell typesMask setTitle IDEWorkbenchMessages getString OpenResourceDialog WorkbenchHelp setHelp parentShell IHelpContextIds OPEN_RESOURCE_DIALOG
Extends the super s filter to exclude derived resources since 3 0 protected boolean select I Resource resource return super select resource resource is Derived  IResource isDerived

Constructs a dialog for editing a new existing path variable param parent Shell the parent shell param type the dialog type code NEW VARIABLE code or code EXISTING VARIABLE code param variable Type the type of variable that can be edited in this dialog code I Resource FILE code or code I Resource FOLDER code param path Variable Manager a reference to the path variable manager param names In Use a set of variable names currently in use public Path Variable Dialog Shell parent Shell int type int variable Type I Path Variable Manager path Variable Manager Set names In Use super parent Shell this type type this new Variable type NEW VARIABLE this variable Name NON NLS 1 this variable Value NON NLS 1 this variable Type variable Type this path Variable Manager path Variable Manager this names In Use names In Use if new Variable this standard Message IDE Workbench Messages get String Path Variable Dialog message new Variable NON NLS 1 else this standard Message IDE Workbench Messages get String Path Variable Dialog message existing Variable NON NLS 1  parentShell NEW_VARIABLE EXISTING_VARIABLE variableType IResource IResource pathVariableManager namesInUse PathVariableDialog parentShell variableType IPathVariableManager pathVariableManager namesInUse parentShell newVariable NEW_VARIABLE variableName variableValue variableType variableType pathVariableManager pathVariableManager namesInUse namesInUse newVariable standardMessage IDEWorkbenchMessages getString PathVariableDialog newVariable standardMessage IDEWorkbenchMessages getString PathVariableDialog existingVariable
Configures this dialog s shell setting the shell s text see org eclipse jface window Window configure Shell Shell protected void configure Shell Shell shell super configure Shell shell if new Variable shell set Text IDE Workbench Messages get String Path Variable Dialog shell Title new Variable NON NLS 1 else shell set Text IDE Workbench Messages get String Path Variable Dialog shell Title existing Variable NON NLS 1  configureShell configureShell configureShell newVariable setText IDEWorkbenchMessages getString PathVariableDialog shellTitle newVariable setText IDEWorkbenchMessages getString PathVariableDialog shellTitle existingVariable
Creates and returns the contents of this dialog except for the button bar see org eclipse jface dialogs Title Area Dialog create Dialog Area protected Control create Dialog Area Composite parent top level composite Composite parent Composite Composite super create Dialog Area parent creates dialog area composite Composite contents create Composite parent Composite creates and lay outs dialog area widgets create Widgets contents parent get Font validate possibly already incorrect variable definitions if type EXISTING VARIABLE name Entered location Entered true validate Variable Value return contents  TitleAreaDialog createDialogArea createDialogArea parentComposite createDialogArea createComposite parentComposite createWidgets getFont EXISTING_VARIABLE nameEntered locationEntered validateVariableValue
Creates and configures this dialog s main composite param parent Composite parent s composite return this dialog s main composite private Composite create Composite Composite parent Composite creates a composite with standard margins and spacing Composite contents new Composite parent Composite SWT NONE Form Layout layout new Form Layout layout margin Height convert VerticalDL Us To Pixels I Dialog Constants VERTICAL MARGIN layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN contents set Layout layout contents set Font parent Composite get Font if new Variable set Title IDE Workbench Messages get String Path Variable Dialog dialog Title new Variable NON NLS 1 else set Title IDE Workbench Messages get String Path Variable Dialog dialog Title existing Variable NON NLS 1 set Message standard Message return contents  parentComposite createComposite parentComposite parentComposite FormLayout FormLayout marginHeight convertVerticalDLUsToPixels IDialogConstants VERTICAL_MARGIN marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN setLayout setFont parentComposite getFont newVariable setTitle IDEWorkbenchMessages getString PathVariableDialog dialogTitle newVariable setTitle IDEWorkbenchMessages getString PathVariableDialog dialogTitle existingVariable setMessage standardMessage
variable Name Field add Modify Listener new Modify Listener public void modify Text Modify Event event variable Name Modified  variableNameField addModifyListener ModifyListener modifyText ModifyEvent variableNameModified
variable Value Field add Modify Listener new Modify Listener public void modify Text Modify Event event variable Value Modified  variableValueField addModifyListener ModifyListener modifyText ModifyEvent variableValueModified
file Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select File  fileButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectFile
folder Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select Folder  folderButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectFolder
Creates widgets for this dialog param parent the parent composite where to create widgets param contents private void create Widgets Composite contents Font font Form Data data String name Label Text IDE Workbench Messages get String Path Variable Dialog variable Name NON NLS 1 String value Label Text IDE Workbench Messages get String Path Variable Dialog variable Value NON NLS 1 variable name label variable Name Label new Label contents SWT LEFT variable Name Label set Text name Label Text data new Form Data variable Name Label set Layout Data data variable Name Label set Font font variable value label variable Value Label new Label contents SWT LEFT variable Value Label set Text value Label Text data new Form Data data top new Form Attachment variable Name Label convert VerticalDL Us To Pixels 10 variable Value Label set Layout Data data variable Value Label set Font font the larger label will be used in the left attachments for the fields Label larger Label name Label Text length value Label Text length variable Name Label variable Value Label variable name field variable Name Field new Text contents SWT SINGLE SWT BORDER variable Name Field set Text variable Name data new Form Data data width convert Width In Chars To Pixels 50 data left new Form Attachment larger Label convert HorizontalDL Us To Pixels 5 variable Name Field set Layout Data data variable Name Field set Font font variable Name Field set Focus variable Name Field add Modify Listener new Modify Listener public void modify Text Modify Event event variable Name Modified variable value field variable Value Field new Text contents SWT SINGLE SWT BORDER variable Value Field set Text variable Value data new Form Data data width convert Width In Chars To Pixels 50 data left new Form Attachment larger Label convert HorizontalDL Us To Pixels 5 data top new Form Attachment variable Name Label convert VerticalDL Us To Pixels 10 variable Value Field set Layout Data data variable Value Field set Font font variable Value Field add Modify Listener new Modify Listener public void modify Text Modify Event event variable Value Modified select file path button file Button new Button contents SWT PUSH file Button set Text IDE Workbench Messages get String Path Variable Dialog file NON NLS 1 if variable Type I Resource FILE 0 file Button set Enabled false data set Button Form Layout Data file Button data top new Form Attachment variable Name Label convert VerticalDL Us To Pixels 10 data left new Form Attachment variable Value Field convert HorizontalDL Us To Pixels 10 data right new Form Attachment 100 5 file Button set Layout Data data file Button set Font font file Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select File select folder path button folder Button new Button contents SWT PUSH folder Button set Text IDE Workbench Messages get String Path Variable Dialog folder NON NLS 1 if variable Type I Resource FOLDER 0 folder Button set Enabled false data set Button Form Layout Data folder Button data top new Form Attachment variable Value Label convert VerticalDL Us To Pixels 10 data left new Form Attachment variable Value Field convert HorizontalDL Us To Pixels 10 data right new Form Attachment 100 5 folder Button set Layout Data data folder Button set Font font folder Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select Folder  createWidgets FormData nameLabelText IDEWorkbenchMessages getString PathVariableDialog variableName valueLabelText IDEWorkbenchMessages getString PathVariableDialog variableValue variableNameLabel variableNameLabel setText nameLabelText FormData variableNameLabel setLayoutData variableNameLabel setFont variableValueLabel variableValueLabel setText valueLabelText FormData FormAttachment variableNameLabel convertVerticalDLUsToPixels variableValueLabel setLayoutData variableValueLabel setFont largerLabel nameLabelText valueLabelText variableNameLabel variableValueLabel variableNameField variableNameField setText variableName FormData convertWidthInCharsToPixels FormAttachment largerLabel convertHorizontalDLUsToPixels variableNameField setLayoutData variableNameField setFont variableNameField setFocus variableNameField addModifyListener ModifyListener modifyText ModifyEvent variableNameModified variableValueField variableValueField setText variableValue FormData convertWidthInCharsToPixels FormAttachment largerLabel convertHorizontalDLUsToPixels FormAttachment variableNameLabel convertVerticalDLUsToPixels variableValueField setLayoutData variableValueField setFont variableValueField addModifyListener ModifyListener modifyText ModifyEvent variableValueModified fileButton fileButton setText IDEWorkbenchMessages getString PathVariableDialog variableType IResource fileButton setEnabled setButtonFormLayoutData fileButton FormAttachment variableNameLabel convertVerticalDLUsToPixels FormAttachment variableValueField convertHorizontalDLUsToPixels FormAttachment fileButton setLayoutData fileButton setFont fileButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectFile folderButton folderButton setText IDEWorkbenchMessages getString PathVariableDialog variableType IResource folderButton setEnabled setButtonFormLayoutData folderButton FormAttachment variableValueLabel convertVerticalDLUsToPixels FormAttachment variableValueField convertHorizontalDLUsToPixels FormAttachment folderButton setLayoutData folderButton setFont folderButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectFolder
Sets the code Form 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 Form Data code return the code Form Data code set on the specified button private Form Data set Button Form Layout Data Button button Form Data data new Form Data data height convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x button set Layout Data data return data  FormData initializeDialogUnits FormData FormData FormData setButtonFormLayoutData FormData FormData convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint computeSize setLayoutData
Fires validations variable name first and updates enabled state for the Ok button accordingly private void variable Name Modified updates and validates the variable name variable Name variable Name Field get Text trim validation Status I Message Provider NONE ok Button set Enabled validate Variable Name validate Variable Value name Entered true  variableNameModified variableName variableNameField getText validationStatus IMessageProvider okButton setEnabled validateVariableName validateVariableValue nameEntered
Fires validations variable value first and updates enabled state for the Ok button accordingly private void variable Value Modified updates and validates the variable value variable Value variable Value Field get Text trim validation Status I Message Provider NONE ok Button set Enabled validate Variable Value validate Variable Name location Entered true  variableValueModified variableValue variableValueField getText validationStatus IMessageProvider okButton setEnabled validateVariableValue validateVariableName locationEntered
Opens a dialog where the user can select a folder path private void select Folder Directory Dialog dialog new Directory Dialog get Shell dialog set Text IDE Workbench Messages get String Path Variable Dialog select Folder Title NON NLS 1 dialog set Message IDE Workbench Messages get String Path Variable Dialog select Folder Message NON NLS 1 dialog set Filter Path variable Value String res dialog open if res null variable Value new Path res make Absolute toOS String variable Value Field set Text variable Value  selectFolder DirectoryDialog DirectoryDialog getShell setText IDEWorkbenchMessages getString PathVariableDialog selectFolderTitle setMessage IDEWorkbenchMessages getString PathVariableDialog selectFolderMessage setFilterPath variableValue variableValue makeAbsolute toOSString variableValueField setText variableValue
Opens a dialog where the user can select a file path private void select File File Dialog dialog new File Dialog get Shell dialog set Text IDE Workbench Messages get String Path Variable Dialog select File Title NON NLS 1 dialog set Filter Path variable Value String res dialog open if res null variable Value new Path res make Absolute toOS String variable Value Field set Text variable Value  selectFile FileDialog FileDialog getShell setText IDEWorkbenchMessages getString PathVariableDialog selectFileTitle setFilterPath variableValue variableValue makeAbsolute toOSString variableValueField setText variableValue
Adds buttons to this dialog s button bar see org eclipse jface dialogs Dialog create Buttons For Button Bar protected void create Buttons For Button Bar Composite parent ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true ok Button set Enabled type EXISTING VARIABLE create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButtonsForButtonBar okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL okButton setEnabled EXISTING_VARIABLE createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
Validates the current variable name and updates this dialog s message return true if the name is valid false otherwise private boolean validate Variable Name boolean allow Finish false if the current validation Status is ERROR no additional validation applies if validation Status I Message Provider ERROR return false assumes everything will be ok String message standard Message int new Validation Status I Message Provider NONE if variable Name length 0 the variable name is empty if name Entered a name was entered before and is now empty new Validation Status I Message Provider ERROR message IDE Workbench Messages get String Path Variable Dialog variable Name Empty Message NON NLS 1 else I Status status path Variable Manager validate Name variable Name if status isOK the variable name is not valid new Validation Status I Message Provider ERROR message status get Message else if names In Use contains variable Name variable Name equals original Name the variable name is already in use message IDE Workbench Messages get String Path Variable Dialog variable Already Exists Message NON NLS 1 new Validation Status I Message Provider ERROR else allow Finish true overwrite the current validation status message only if everything is ok clearing them or if we have a more serious problem than the current one if validation Status I Message Provider NONE new Validation Status I Message Provider ERROR validation Status new Validation Status validation Message message only set the message here if it is not going to be set in validate Variable Value to avoid flashing if allow Finish false set Message validation Message validation Status return allow Finish  validateVariableName allowFinish validationStatus validationStatus IMessageProvider standardMessage newValidationStatus IMessageProvider variableName nameEntered newValidationStatus IMessageProvider IDEWorkbenchMessages getString PathVariableDialog variableNameEmptyMessage IStatus pathVariableManager validateName variableName newValidationStatus IMessageProvider getMessage namesInUse variableName variableName originalName IDEWorkbenchMessages getString PathVariableDialog variableAlreadyExistsMessage newValidationStatus IMessageProvider allowFinish validationStatus IMessageProvider newValidationStatus IMessageProvider validationStatus newValidationStatus validationMessage validateVariableValue allowFinish setMessage validationMessage validationStatus allowFinish
Validates the current variable value and updates this dialog s message return true if the value is valid false otherwise private boolean validate Variable Value boolean allow Finish false if the current validation Status is ERROR no additional validation applies if validation Status I Message Provider ERROR return false assumes everything will be ok String message standard Message int new Validation Status I Message Provider NONE if variable Value length 0 the variable value is empty if location Entered a location value was entered before and is now empty new Validation Status I Message Provider ERROR message IDE Workbench Messages get String Path Variable Dialog variable Value Empty Message NON NLS 1 else if Path EMPTY is Valid Path variable Value the variable value is an invalid path message IDE Workbench Messages get String Path Variable Dialog variable Value Invalid Message NON NLS 1 new Validation Status I Message Provider ERROR else if new Path variable Value is Absolute the variable value is a relative path message IDE Workbench Messages get String Path Variable Dialog path Is Relative Message NON NLS 1 new Validation Status I Message Provider ERROR else if new File variable Value exists the path does not exist warning message IDE Workbench Messages get String Path Variable Dialog path Does Not Exist Message NON NLS 1 new Validation Status I Message Provider WARNING allow Finish true else allow Finish true overwrite the current validation status message only if everything is ok clearing them or if we have a more serious problem than the current one if validation Status I Message Provider NONE new Validation Status validation Status validation Status new Validation Status validation Message message set Message validation Message validation Status return allow Finish  validateVariableValue allowFinish validationStatus validationStatus IMessageProvider standardMessage newValidationStatus IMessageProvider variableValue locationEntered newValidationStatus IMessageProvider IDEWorkbenchMessages getString PathVariableDialog variableValueEmptyMessage isValidPath variableValue IDEWorkbenchMessages getString PathVariableDialog variableValueInvalidMessage newValidationStatus IMessageProvider variableValue isAbsolute IDEWorkbenchMessages getString PathVariableDialog pathIsRelativeMessage newValidationStatus IMessageProvider variableValue IDEWorkbenchMessages getString PathVariableDialog pathDoesNotExistMessage newValidationStatus IMessageProvider allowFinish allowFinish validationStatus IMessageProvider newValidationStatus validationStatus validationStatus newValidationStatus validationMessage setMessage validationMessage validationStatus allowFinish
Returns the variable name return the variable name public String get Variable Name return variable Name  getVariableName variableName
Returns the variable value return the variable value public String get Variable Value return variable Value  getVariableValue variableValue
Sets the variable name param variable Name the new variable name public void set Variable Name String variable Name this variable Name variable Name trim this original Name this variable Name  variableName setVariableName variableName variableName variableName originalName variableName
Sets the variable value param variable Value the new variable value public void set Variable Value String variable Value this variable Value variable Value  variableValue setVariableValue variableValue variableValue variableValue

Creates a path variable selection dialog param parent Shell the parent shell param variable Type the type of variables that are displayed in this dialog code I Resource FILE code and or code I Resource FOLDER code logically O Red together public Path Variable Selection Dialog Shell parent Shell int variable Type super parent Shell set Title IDE Workbench Messages get String Path Variable Selection Dialog title NON NLS 1 this variable Type variable Type path Variables Group new Path Variables Group false variable Type new Listener public void handle Event Event event update Extend Button State set Shell Style get Shell Style SWT RESIZE  parentShell variableType IResource IResource ORed PathVariableSelectionDialog parentShell variableType parentShell setTitle IDEWorkbenchMessages getString PathVariableSelectionDialog variableType variableType pathVariablesGroup PathVariablesGroup variableType handleEvent updateExtendButtonState setShellStyle getShellStyle
Handles an Extend button press see org eclipse jface dialogs Dialog button Pressed int protected void button Pressed int button Id if button Id EXTEND ID File Folder Selection Dialog dialog new File Folder Selection Dialog get Shell false variable Type Path Variables Group Path Variable Element selection path Variables Group get Selection 0 dialog set Title IDE Workbench Messages get String Path Variable Selection Dialog Extension Dialog title NON NLS 1 dialog set Message IDE Workbench Messages format Path Variable Selection Dialog Extension Dialog description new Object selection name NON NLS 1 dialog set Input selection path to File if dialog open File Folder Selection Dialog OK path Variables Group perform Ok set Extension Result selection File dialog get Result 0 super ok Pressed else super button Pressed button Id  buttonPressed buttonPressed buttonId buttonId EXTEND_ID FileFolderSelectionDialog FileFolderSelectionDialog getShell variableType PathVariablesGroup PathVariableElement pathVariablesGroup getSelection setTitle IDEWorkbenchMessages getString PathVariableSelectionDialog ExtensionDialog setMessage IDEWorkbenchMessages PathVariableSelectionDialog ExtensionDialog setInput toFile FileFolderSelectionDialog pathVariablesGroup performOk setExtensionResult getResult okPressed buttonPressed buttonId
Method declared in Window protected void configure Shell Shell shell super configure Shell shell Workbench Help set Help shell I Help Context Ids PATH VARIABLE SELECTION DIALOG  configureShell configureShell WorkbenchHelp setHelp IHelpContextIds PATH_VARIABLE_SELECTION_DIALOG
Adds an Extend button in addition to OK Cancel see org eclipse jface dialogs Dialog create Buttons For Button Bar Composite protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent EXTEND ID IDE Workbench Messages get String Path Variable Selection Dialog extend Button false NON NLS 1 create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false update Extend Button State  createButtonsForButtonBar createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton EXTEND_ID IDEWorkbenchMessages getString PathVariableSelectionDialog extendButton createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL updateExtendButtonState
protected Control create Dialog Area Composite parent create composite Composite dialog Area Composite super create Dialog Area parent path Variables Group create Contents dialog Area return dialog Area  createDialogArea dialogArea createDialogArea pathVariablesGroup createContents dialogArea dialogArea
Disposes the path variables group see org eclipse jface window Window close public boolean close path Variables Group dispose return super close  pathVariablesGroup
Sets the dialog result to the selected path variable name s protected void ok Pressed if path Variables Group perform Ok Path Variables Group Path Variable Element selection path Variables Group get Selection String variable Names new String selection length for int i 0 i selection length i variable Names i selection i name set Selection Result variable Names else set Selection Result null super ok Pressed  okPressed pathVariablesGroup performOk PathVariablesGroup PathVariableElement pathVariablesGroup getSelection variableNames variableNames setSelectionResult variableNames setSelectionResult okPressed
Sets the dialog result to the concatenated variable name and extension param variable variable selected in the variables list and extended by code extension File code param extension File file selected to extend the variable private void set Extension Result Path Variables Group Path Variable Element variable File extension File I Path extension Path new Path extension File get Path int match Count extension Path matching First Segments variable path I Path result Path new Path variable name extension Path extension Path remove First Segments match Count result Path result Path append extension Path set Selection Result new String result Path toOS String  extensionFile extensionFile setExtensionResult PathVariablesGroup PathVariableElement extensionFile IPath extensionPath extensionFile getPath matchCount extensionPath matchingFirstSegments IPath resultPath extensionPath extensionPath removeFirstSegments matchCount resultPath resultPath extensionPath setSelectionResult resultPath toOSString
Updates the enabled state of the Extend button based on the current variable selection protected void update Extend Button State Path Variables Group Path Variable Element selection path Variables Group get Selection Button extend Button get Button EXTEND ID if extend Button null return if selection length 1 File file selection 0 path to File if file exists false file is File extend Button set Enabled false else extend Button set Enabled true else extend Button set Enabled false  updateExtendButtonState PathVariablesGroup PathVariableElement pathVariablesGroup getSelection extendButton getButton EXTEND_ID extendButton toFile isFile extendButton setEnabled extendButton setEnabled extendButton setEnabled

Creates a new Path Variables Group param multi Select create a multi select tree param variable Type the type of variables that are displayed in the widget group code I Resource FILE code and or code I Resource FOLDER code logically O Red together public Path Variables Group boolean multi Select int variable Type this multi Select multi Select this variable Type variable Type path Variable Manager Resources Plugin get Workspace get Path Variable Manager removed Variable Names new Hash Set temp Path Variables new Tree Map initialize internal model init Temporary State  PathVariablesGroup multiSelect variableType IResource IResource ORed PathVariablesGroup multiSelect variableType multiSelect multiSelect variableType variableType pathVariableManager ResourcesPlugin getWorkspace getPathVariableManager removedVariableNames HashSet tempPathVariables TreeMap initTemporaryState
Creates a new Path Variables Group param multi Select create a multi select tree param variable Type the type of variables that are displayed in the widget group code I Resource FILE code and or code I Resource FOLDER code logically O Red together param selection Listener listener notified when the selection changes in the variables list public Path Variables Group boolean multi Select int variable Type Listener selection Listener this multi Select variable Type this selection Listener selection Listener  PathVariablesGroup multiSelect variableType IResource IResource ORed selectionListener PathVariablesGroup multiSelect variableType selectionListener multiSelect variableType selectionListener selectionListener
Opens a dialog for creating a new variable private void add New Variable constructs a dialog for editing the new variable s current name and value Path Variable Dialog dialog new Path Variable Dialog shell Path Variable Dialog NEW VARIABLE variable Type path Variable Manager temp Path Variables key Set opens the dialog just returns if the user cancels it if dialog open Window CANCEL return otherwise adds the new variable or updates an existing one in the temporary collection of currently defined variables String new Variable Name dialog get Variable Name I Path new Variable Value new Path dialog get Variable Value temp Path Variables put new Variable Name new Variable Value the UI must be updated update Widget State new Variable Name  addNewVariable PathVariableDialog PathVariableDialog PathVariableDialog NEW_VARIABLE variableType pathVariableManager tempPathVariables keySet newVariableName getVariableName IPath newVariableValue getVariableValue tempPathVariables newVariableName newVariableValue updateWidgetState newVariableName
variable Table add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Enabled State if selection Listener null selection Listener handle Event new Event  variableTable addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateEnabledState selectionListener selectionListener handleEvent
Creates the widget group Callers must call code dispose code when the group is no longer needed param parent the widget parent return container of the widgets public Control create Contents Composite parent Font font parent get Font if image Unkown null Image Descriptor descriptor AbstractUI Plugin image Descriptor From Plugin IDE Workbench Plugin IDE WORKBENCH icons full obj16 warning gif NON NLS 1 image Unkown descriptor create Image initialize Dialog Units parent shell parent get Shell define container its layout Composite page Component new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width 0 layout margin Height 0 page Component set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH data width Hint SIZING SELECTION PANE WIDTH page Component set Layout Data data page Component set Font font layout the table its buttons variable Label new Label page Component SWT LEFT variable Label set Text IDE Workbench Messages get String Path Variables Block variables Label NON NLS 1 data new Grid Data data horizontal Alignment Grid Data FILL data horizontal Span 2 variable Label set Layout Data data variable Label set Font font int table Style SWT BORDER SWT FULL SELECTION if multi Select table Style SWT MULTI variable Table new Table page Component table Style variable Table add Selection Listener new Selection Adapter public void widget Selected Selection Event e update Enabled State if selection Listener null selection Listener handle Event new Event data new Grid Data Grid Data FILL BOTH data height Hint variable Table get Item Height 7 variable Table set Layout Data data variable Table set Font font create Button Group page Component populate table with current internal state and set buttons initial state update Widget State null return page Component  createContents getFont imageUnkown ImageDescriptor AbstractUIPlugin imageDescriptorFromPlugin IDEWorkbenchPlugin IDE_WORKBENCH imageUnkown createImage initializeDialogUnits getShell pageComponent GridLayout GridLayout numColumns marginWidth marginHeight pageComponent setLayout GridData GridData GridData FILL_BOTH widthHint SIZING_SELECTION_PANE_WIDTH pageComponent setLayoutData pageComponent setFont variableLabel pageComponent variableLabel setText IDEWorkbenchMessages getString PathVariablesBlock variablesLabel GridData horizontalAlignment GridData horizontalSpan variableLabel setLayoutData variableLabel setFont tableStyle FULL_SELECTION multiSelect tableStyle variableTable pageComponent tableStyle variableTable addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateEnabledState selectionListener selectionListener handleEvent GridData GridData FILL_BOTH heightHint variableTable getItemHeight variableTable setLayoutData variableTable setFont createButtonGroup pageComponent updateWidgetState pageComponent
Disposes the group s resources public void dispose if image Unkown null image Unkown dispose image Unkown null  imageUnkown imageUnkown imageUnkown
Opens a dialog for editing an existing variable see Path Variable Dialog private void edit Selected Variable retrieves the name and value for the currently selected variable Table Item item variable Table get Item variable Table get Selection Index String variable Name String item get Data I Path variable Value I Path temp Path Variables get variable Name constructs a dialog for editing the variable s current name and value Path Variable Dialog dialog new Path Variable Dialog shell Path Variable Dialog EXISTING VARIABLE variable Type path Variable Manager temp Path Variables key Set dialog set Variable Name variable Name dialog set Variable Value variable Value toOS String opens the dialog just returns if the user cancels it if dialog open Window CANCEL return the name can be changed so we remove the current variable definition removed Variable Names add variable Name temp Path Variables remove variable Name String new Variable Name dialog get Variable Name I Path new Variable Value new Path dialog get Variable Value and add it again maybe with a different name temp Path Variables put new Variable Name new Variable Value now we must refresh the UI state update Widget State new Variable Name  PathVariableDialog editSelectedVariable TableItem variableTable getItem variableTable getSelectionIndex variableName getData IPath variableValue IPath tempPathVariables variableName PathVariableDialog PathVariableDialog PathVariableDialog EXISTING_VARIABLE variableType pathVariableManager tempPathVariables keySet setVariableName variableName setVariableValue variableValue toOSString removedVariableNames variableName tempPathVariables variableName newVariableName getVariableName IPath newVariableValue getVariableValue tempPathVariables newVariableName newVariableValue updateWidgetState newVariableName
Returns the enabled state of the group s widgets Returns code true code if called prior to calling code create Contents code return boolean the enabled state of the group s widgets code true code if called prior to calling code create Contents code public boolean get Enabled if variable Table null variable Table is Disposed return variable Table get Enabled return true  createContents createContents getEnabled variableTable variableTable isDisposed variableTable getEnabled
Returns the selected variables return the selected variables Returns an empty array if the widget group has not been created yet by calling code create Contents code public Path Variable Element get Selection if variable Table null return new Path Variable Element 0 Table Item items variable Table get Selection Path Variable Element selection new Path Variable Element items length for int i 0 i items length i String name String items i get Data selection i new Path Variable Element selection i name name selection i path I Path temp Path Variables get name return selection  createContents PathVariableElement getSelection variableTable PathVariableElement TableItem variableTable getSelection PathVariableElement PathVariableElement getData PathVariableElement IPath tempPathVariables
add Button set Text IDE Workbench Messages get String Path Variables Block add Variable Button NON NLS 1 add Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e add New Variable  addButton setText IDEWorkbenchMessages getString PathVariablesBlock addVariableButton addButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent addNewVariable
edit Button set Text IDE Workbench Messages get String Path Variables Block edit Variable Button NON NLS 1 edit Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e edit Selected Variable  editButton setText IDEWorkbenchMessages getString PathVariablesBlock editVariableButton editButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent editSelectedVariable
remove Button set Text IDE Workbench Messages get String Path Variables Block remove Variable Button NON NLS 1 remove Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e remove Selected Variables  removeButton setText IDEWorkbenchMessages getString PathVariablesBlock removeVariableButton removeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent removeSelectedVariables
Creates the add edit remove buttons param parent the widget parent private void create Button Group Composite parent Font font parent get Font Composite group Component new Composite parent SWT NULL Grid Layout group Layout new Grid Layout group Layout margin Width 0 group Layout margin Height 0 group Component set Layout group Layout Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL group Component set Layout Data data group Component set Font font add Button new Button group Component SWT PUSH add Button set Text IDE Workbench Messages get String Path Variables Block add Variable Button NON NLS 1 add Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e add New Variable add Button set Font font set Button Layout Data add Button edit Button new Button group Component SWT PUSH edit Button set Text IDE Workbench Messages get String Path Variables Block edit Variable Button NON NLS 1 edit Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e edit Selected Variable edit Button set Font font set Button Layout Data edit Button remove Button new Button group Component SWT PUSH remove Button set Text IDE Workbench Messages get String Path Variables Block remove Variable Button NON NLS 1 remove Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e remove Selected Variables remove Button set Font font set Button Layout Data remove Button  createButtonGroup getFont groupComponent GridLayout groupLayout GridLayout groupLayout marginWidth groupLayout marginHeight groupComponent setLayout groupLayout GridData GridData verticalAlignment GridData horizontalAlignment GridData groupComponent setLayoutData groupComponent setFont addButton groupComponent addButton setText IDEWorkbenchMessages getString PathVariablesBlock addVariableButton addButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent addNewVariable addButton setFont setButtonLayoutData addButton editButton groupComponent editButton setText IDEWorkbenchMessages getString PathVariablesBlock editVariableButton editButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent editSelectedVariable editButton setFont setButtonLayoutData editButton removeButton groupComponent removeButton setText IDEWorkbenchMessages getString PathVariablesBlock removeVariableButton removeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent removeSelectedVariables removeButton setFont setButtonLayoutData removeButton
Initializes the computation of horizontal and vertical dialog units based on the size of current font p This method must be called before code set Button Layout Data code is called p param control a control from which to obtain the current font protected void initialize Dialog Units Control control Compute and store a font metric GC gc new GC control gc set Font control get Font font Metrics gc get Font Metrics gc dispose  setButtonLayoutData initializeDialogUnits setFont getFont fontMetrics getFontMetrics
Re Initialize collections used to mantain temporary variable state private void init Temporary State String var Names path Variable Manager get Path Variable Names temp Path Variables clear for int i 0 i var Names length i I Path value path Variable Manager get Value var Names i the value may not exist any more if value null boolean is File value to File is File if is File variable Type I Resource FILE 0 is File false variable Type I Resource FOLDER 0 temp Path Variables put var Names i value removed Variable Names clear  initTemporaryState varNames pathVariableManager getPathVariableNames tempPathVariables varNames IPath pathVariableManager getValue varNames isFile toFile isFile isFile variableType IResource isFile variableType IResource tempPathVariables varNames removedVariableNames
Updates button enabled state depending on the number of currently selected variables in the table private void update Enabled State int items Selected Count variable Table get Selection Count edit Button set Enabled items Selected Count 1 remove Button set Enabled items Selected Count 0  updateEnabledState itemsSelectedCount variableTable getSelectionCount editButton setEnabled itemsSelectedCount removeButton setEnabled itemsSelectedCount
Rebuilds table widget state with the current list of variables reflecting any changes additions and removals and selects the item corresponding to the given variable name If the variable name is code null code the first item if any will be selected param selected Var Name the name for the variable to be selected may be code null code see I Path Variable Manager get Path Variable Names see I Path Variable Manager get Value String private void update Variable Table String selected Var Name variable Table remove All int selected Var Index 0 for Iterator var Names temp Path Variables key Set iterator var Names has Next Table Item item new Table Item variable Table SWT NONE String var Name String var Names next I Path value I Path temp Path Variables get var Name File file value to File item set Text var Name value toOS String NON NLS 1 the corresponding variable name is stored in each table widget item item set Data var Name item set Image file exists file is File FILE IMG FOLDER IMG image Unkown if var Name equals selected Var Name selected Var Index variable Table get Item Count 1 if variable Table get Item Count selected Var Index variable Table set Selection selected Var Index if selection Listener null selection Listener handle Event new Event else if variable Table get Item Count 0 selection Listener null selection Listener handle Event new Event  selectedVarName IPathVariableManager getPathVariableNames IPathVariableManager getValue updateVariableTable selectedVarName variableTable removeAll selectedVarIndex varNames tempPathVariables keySet varNames hasNext TableItem TableItem variableTable varName varNames IPath IPath tempPathVariables varName toFile setText varName toOSString setData varName setImage isFile FILE_IMG FOLDER_IMG imageUnkown varName selectedVarName selectedVarIndex variableTable getItemCount variableTable getItemCount selectedVarIndex variableTable setSelection selectedVarIndex selectionListener selectionListener handleEvent variableTable getItemCount selectionListener selectionListener handleEvent
Commits the temporary state to the path variable manager in response to user confirmation see I Path Variable Manager set Value String I Path public boolean perform Ok try first process removed variables for Iterator removed removed Variable Names iterator removed has Next String removed Variable Name String removed next only removes variables that have not been added again if temp Path Variables contains Key removed Variable Name path Variable Manager set Value removed Variable Name null then process the current collection of variables adding updating them for Iterator current temp Path Variables entry Set iterator current has Next Map Entry entry Map Entry current next String variable Name String entry get Key I Path variable Value I Path entry get Value path Variable Manager set Value variable Name variable Value re initialize temporary state init Temporary State perform Ok accepted return true catch Core Exception ce Error Dialog open Error shell null null ce get Status return false  IPathVariableManager setValue IPath performOk removedVariableNames hasNext removedVariableName tempPathVariables containsKey removedVariableName pathVariableManager setValue removedVariableName tempPathVariables entrySet hasNext variableName getKey IPath variableValue IPath getValue pathVariableManager setValue variableName variableValue initTemporaryState performOk CoreException ErrorDialog openError getStatus
Removes the currently selected variables private void remove Selected Variables remove each selected element int selected Indices variable Table get Selection Indices for int i 0 i selected Indices length i Table Item selected Item variable Table get Item selected Indices i String var Name String selected Item get Data removed Variable Names add var Name temp Path Variables remove var Name update Widget State null  removeSelectedVariables selectedIndices variableTable getSelectionIndices selectedIndices TableItem selectedItem variableTable getItem selectedIndices varName selectedItem getData removedVariableNames varName tempPathVariables varName updateWidgetState
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 private Grid Data set Button Layout Data Button button Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL data height Hint Dialog convert VerticalDL Us To Pixels font Metrics I Dialog Constants BUTTON HEIGHT int width Hint Dialog convert HorizontalDL Us To Pixels font Metrics I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x button set Layout Data data return data  GridData initializeDialogUnits GridData GridData GridData setButtonLayoutData GridData GridData GridData HORIZONTAL_ALIGN_FILL heightHint convertVerticalDLUsToPixels fontMetrics IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels fontMetrics IDialogConstants BUTTON_WIDTH widthHint widthHint computeSize setLayoutData
Sets the enabled state of the group s widgets Does nothing if called prior to calling code create Contents code param enabled the new enabled state of the group s widgets public void set Enabled boolean enabled if variable Table null variable Table is Disposed variable Label set Enabled enabled variable Table set Enabled enabled add Button set Enabled enabled if enabled update Enabled State else edit Button set Enabled enabled remove Button set Enabled enabled  createContents setEnabled variableTable variableTable isDisposed variableLabel setEnabled variableTable setEnabled addButton setEnabled updateEnabledState editButton setEnabled removeButton setEnabled
Updates the widget s current state refreshes the table with the current defined variables selects the item corresponding to the given variable selects the first item if code null code is provided and updates the enabled state for the Add Remove Edit buttons param selected Var Name the name of the variable to be selected may be null private void update Widget State String selected Var Name update Variable Table selected Var Name update Enabled State  selectedVarName updateWidgetState selectedVarName updateVariableTable selectedVarName updateEnabledState

Creates a new Project Capability Editing Property Page public Project Capability Editing Property Page super  ProjectCapabilityEditingPropertyPage ProjectCapabilityEditingPropertyPage
add Button set Enabled true add Button add Selection Listener new Selection Listener public void widget Selected Selection Event e add Capability  addButton setEnabled addButton addSelectionListener SelectionListener widgetSelected SelectionEvent addCapability
add Capability public void widget Default Selected Selection Event e  addCapability widgetDefaultSelected SelectionEvent
remove Button set Enabled false remove Button add Selection Listener new Selection Listener public void widget Selected Selection Event e remove Capability selected Cap  removeButton setEnabled removeButton addSelectionListener SelectionListener widgetSelected SelectionEvent removeCapability selectedCap
remove Capability selected Cap public void widget Default Selected Selection Event e  removeCapability selectedCap widgetDefaultSelected SelectionEvent
table add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event selected Cap null I Structured Selection sel I Structured Selection event get Selection if sel null selected Cap Capability sel get First Element remove Button set Enabled selected Cap null  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent selectedCap IStructuredSelection IStructuredSelection getSelection selectedCap getFirstElement removeButton setEnabled selectedCap
protected Control create Contents Composite parent Font font parent get Font Workbench Help set Help get Control I Help Context Ids PROJECT CAPABILITY PROPERTY PAGE no Default And Apply Button reg IDE Workbench Plugin get Default get Capability Registry Composite top Composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 top Composite set Layout layout top Composite set Layout Data new Grid Data Grid Data FILL BOTH String instructions if reg has Capabilities instructions IDE Workbench Messages get String Project Capability Property Page choose Capabilities NON NLS 1 else instructions IDE Workbench Messages get String Project Capability Property Page no Capabilities NON NLS 1 Label label new Label top Composite SWT LEFT label set Font font label set Text instructions Capability caps reg get Project Disabled Capabilities get Project disabled Caps add All Arrays as List caps Composite main Composite new Composite top Composite SWT NONE layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 main Composite set Layout layout main Composite set Layout Data new Grid Data Grid Data FILL BOTH Composite cap Composite new Composite main Composite SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 cap Composite set Layout layout cap Composite set Layout Data new Grid Data Grid Data FILL BOTH label new Label cap Composite SWT LEFT label set Font font label set Text IDE Workbench Messages get String Project Capability Selection Group capabilities NON NLS 1 table new Table Viewer cap Composite SWT SINGLE SWT H SCROLL SWT V SCROLL SWT BORDER table get Table set Layout Data new Grid Data Grid Data FILL BOTH table get Table set Font font table set Label Provider new Capability Label Provider table set Content Provider get Content Provider table set Input get Project Composite button Composite new Composite main Composite SWT NONE layout new Grid Layout layout margin Height 0 layout margin Width 0 button Composite set Layout layout button Composite set Layout Data new Grid Data Grid Data FILL VERTICAL label new Label button Composite SWT LEFT label set Font font label set Text NON NLS 1 add Button new Button button Composite SWT PUSH add Button set Text IDE Workbench Messages get String Project Capability Editing Property Page add NON NLS 1 add Button set Enabled true add Button add Selection Listener new Selection Listener public void widget Selected Selection Event e add Capability public void widget Default Selected Selection Event e Grid Data data new Grid Data data horizontal Alignment Grid Data FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint add Button compute Size SWT DEFAULT SWT DEFAULT true x add Button set Layout Data data add Button set Font font remove Button new Button button Composite SWT PUSH remove Button set Text IDE Workbench Messages get String Project Capability Editing Property Page remove NON NLS 1 remove Button set Enabled false remove Button add Selection Listener new Selection Listener public void widget Selected Selection Event e remove Capability selected Cap public void widget Default Selected Selection Event e data new Grid Data data horizontal Alignment Grid Data FILL data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH data width Hint Math max width Hint remove Button compute Size SWT DEFAULT SWT DEFAULT true x remove Button set Layout Data data remove Button set Font font table add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event selected Cap null I Structured Selection sel I Structured Selection event get Selection if sel null selected Cap Capability sel get First Element remove Button set Enabled selected Cap null return top Composite  createContents getFont WorkbenchHelp setHelp getControl IHelpContextIds PROJECT_CAPABILITY_PROPERTY_PAGE noDefaultAndApplyButton IDEWorkbenchPlugin getDefault getCapabilityRegistry topComposite GridLayout GridLayout marginHeight marginWidth topComposite setLayout topComposite setLayoutData GridData GridData FILL_BOTH hasCapabilities IDEWorkbenchMessages getString ProjectCapabilityPropertyPage chooseCapabilities IDEWorkbenchMessages getString ProjectCapabilityPropertyPage noCapabilities topComposite setFont setText getProjectDisabledCapabilities getProject disabledCaps addAll asList mainComposite topComposite GridLayout numColumns marginHeight marginWidth mainComposite setLayout mainComposite setLayoutData GridData GridData FILL_BOTH capComposite mainComposite GridLayout marginHeight marginWidth capComposite setLayout capComposite setLayoutData GridData GridData FILL_BOTH capComposite setFont setText IDEWorkbenchMessages getString ProjectCapabilitySelectionGroup TableViewer capComposite H_SCROLL V_SCROLL getTable setLayoutData GridData GridData FILL_BOTH getTable setFont setLabelProvider CapabilityLabelProvider setContentProvider getContentProvider setInput getProject buttonComposite mainComposite GridLayout marginHeight marginWidth buttonComposite setLayout buttonComposite setLayoutData GridData GridData FILL_VERTICAL buttonComposite setFont setText addButton buttonComposite addButton setText IDEWorkbenchMessages getString ProjectCapabilityEditingPropertyPage addButton setEnabled addButton addSelectionListener SelectionListener widgetSelected SelectionEvent addCapability widgetDefaultSelected SelectionEvent GridData GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint addButton computeSize addButton setLayoutData addButton setFont removeButton buttonComposite removeButton setText IDEWorkbenchMessages getString ProjectCapabilityEditingPropertyPage removeButton setEnabled removeButton addSelectionListener SelectionListener widgetSelected SelectionEvent removeCapability selectedCap widgetDefaultSelected SelectionEvent GridData horizontalAlignment GridData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint widthHint removeButton computeSize removeButton setLayoutData removeButton setFont addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent selectedCap IStructuredSelection IStructuredSelection getSelection selectedCap getFirstElement removeButton setEnabled selectedCap topComposite
return new Workbench Content Provider public Object get Children Object parent Element if parent Element instanceof I Project return reg get Project Capabilities I Project parent Element else return null  WorkbenchContentProvider getChildren parentElement parentElement IProject getProjectCapabilities IProject parentElement
Returns the content provider for the viewers private I Content Provider get Content Provider return new Workbench Content Provider public Object get Children Object parent Element if parent Element instanceof I Project return reg get Project Capabilities I Project parent Element else return null  IContentProvider getContentProvider WorkbenchContentProvider getChildren parentElement parentElement IProject getProjectCapabilities IProject parentElement
Returns whether the category is considered disabled private boolean is Disabled Capability Capability cap return disabled Caps contains cap  isDisabledCapability disabledCaps
private void add Capability Project Capability Simple Add Wizard wizard wizard new Project Capability Simple Add Wizard PlatformUI get Workbench Structured Selection EMPTY get Project Wizard Dialog dialog new Wizard Dialog get Shell wizard dialog create dialog get Shell set Size Math max SIZING WIZARD WIDTH dialog get Shell get Size x SIZING WIZARD HEIGHT Workbench Help set Help dialog get Shell I Help Context Ids UPDATE CAPABILITY WIZARD dialog open table refresh  addCapability ProjectCapabilitySimpleAddWizard ProjectCapabilitySimpleAddWizard getWorkbench StructuredSelection getProject WizardDialog WizardDialog getShell getShell setSize SIZING_WIZARD_WIDTH getShell getSize SIZING_WIZARD_HEIGHT WorkbenchHelp setHelp getShell IHelpContextIds UPDATE_CAPABILITY_WIZARD
private void remove Capability Capability cap Array List results new Array List results add All Arrays as List reg get Project Capabilities get Project results remove cap Capability caps new Capability results size results to Array caps for int i 0 i caps length i List prereqs Arrays as List reg get Prerequisite Ids caps i if prereqs contains cap get Id Message Dialog open Warning get Shell IDE Workbench Messages get String Project Capability Property Page error Title NON NLS 1 IDE Workbench Messages format Project Capability Property Page capability Required new Object caps i get Name NON NLS 1 return I Status status reg validate Capabilities caps if status isOK Error Dialog open Error get Shell IDE Workbench Messages get String Project Capability Property Page error Title NON NLS 1 IDE Workbench Messages get String Project Capability Property Page invalid Selection NON NLS 1 status return String nature Ids new String 1 nature Ids 0 cap get Nature Id I Capability Uninstall Wizard wizard cap get Uninstall Wizard if wizard null wizard new Remove Capability Wizard if wizard null wizard init PlatformUI get Workbench Structured Selection EMPTY get Project nature Ids wizard add Pages if wizard get Starting Page null wizard set Container new Stub Container wizard perform Finish wizard set Container null else wizard cap get Uninstall Wizard if wizard null wizard new Remove Capability Wizard if wizard null wizard init PlatformUI get Workbench Structured Selection EMPTY get Project nature Ids Wizard Dialog dialog new Wizard Dialog get Shell wizard dialog create dialog get Shell set Size Math max SIZING WIZARD WIDTH dialog get Shell get Size x SIZING WIZARD HEIGHT Workbench Help set Help dialog get Shell I Help Context Ids UPDATE CAPABILITY WIZARD dialog open table refresh  removeCapability ArrayList ArrayList addAll asList getProjectCapabilities getProject toArray asList getPrerequisiteIds getId MessageDialog openWarning getShell IDEWorkbenchMessages getString ProjectCapabilityPropertyPage errorTitle IDEWorkbenchMessages ProjectCapabilityPropertyPage capabilityRequired getName IStatus validateCapabilities ErrorDialog openError getShell IDEWorkbenchMessages getString ProjectCapabilityPropertyPage errorTitle IDEWorkbenchMessages getString ProjectCapabilityPropertyPage invalidSelection natureIds natureIds getNatureId ICapabilityUninstallWizard getUninstallWizard RemoveCapabilityWizard getWorkbench StructuredSelection getProject natureIds addPages getStartingPage setContainer StubContainer performFinish setContainer getUninstallWizard RemoveCapabilityWizard getWorkbench StructuredSelection getProject natureIds WizardDialog WizardDialog getShell getShell setSize SIZING_WIZARD_WIDTH getShell getSize SIZING_WIZARD_HEIGHT WorkbenchHelp setHelp getShell IHelpContextIds UPDATE_CAPABILITY_WIZARD
Method declared on Preference Page public boolean perform Ok return true  PreferencePage performOk
public void dispose if image Table null Iterator enum image Table values iterator while enum has Next Image enum next dispose image Table null  imageTable imageTable hasNext imageTable
public Image get Image Object element Image Descriptor descriptor Capability element get Icon Descriptor if descriptor null return null obtain the cached image corresponding to the descriptor if image Table null image Table new Hashtable 40 Image image Image image Table get descriptor if image null image descriptor create Image image Table put descriptor image return image  getImage ImageDescriptor getIconDescriptor imageTable imageTable imageTable createImage imageTable
public String get Text Object element Capability cap Capability element String text cap get Name if is Disabled Capability cap text IDE Workbench Messages format Project Capability Selection Group disabled Label new Object text NON NLS 1 return text  getText getName isDisabledCapability IDEWorkbenchMessages ProjectCapabilitySelectionGroup disabledLabel
class Stub Container implements I Wizard Container public I Wizard Page get Current Page return null  StubContainer IWizardContainer IWizardPage getCurrentPage
return null public Shell get Shell return Project Capability Editing Property Page this get Shell  getShell ProjectCapabilityEditingPropertyPage getShell
return Project Capability Editing Property Page this get Shell public void show Page I Wizard Page page  ProjectCapabilityEditingPropertyPage getShell showPage IWizardPage
public void show Page I Wizard Page page public void update Buttons  showPage IWizardPage updateButtons
public void update Buttons public void update Message  updateButtons updateMessage
public void update Message public void update Title Bar  updateMessage updateTitleBar
public void update Title Bar public void update Window Title  updateTitleBar updateWindowTitle
public void update Window Title public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception new Progress Monitor Jobs Dialog get Shell run fork cancelable runnable  updateWindowTitle IRunnableWithProgress InvocationTargetException InterruptedException ProgressMonitorJobsDialog getShell

Creates a new Project Capability Property Page public Project Capability Property Page super  ProjectCapabilityPropertyPage ProjectCapabilityPropertyPage
protected Control create Contents Composite parent Workbench Help set Help get Control I Help Context Ids PROJECT CAPABILITY PROPERTY PAGE no Default And Apply Button Capability Registry reg IDE Workbench Plugin get Default get Capability Registry String instructions if reg has Capabilities instructions IDE Workbench Messages get String Project Capability Property Page choose Capabilities NON NLS 1 else instructions IDE Workbench Messages get String Project Capability Property Page no Capabilities NON NLS 1 Label label new Label parent SWT LEFT label set Font parent get Font label set Text instructions Capability caps reg get Project Capabilities get Project Capability disabled Caps reg get Project Disabled Capabilities get Project Category cats new Category 0 capability Group new Project Capability Selection Group cats caps disabled Caps reg return capability Group create Contents parent  createContents WorkbenchHelp setHelp getControl IHelpContextIds PROJECT_CAPABILITY_PROPERTY_PAGE noDefaultAndApplyButton CapabilityRegistry IDEWorkbenchPlugin getDefault getCapabilityRegistry hasCapabilities IDEWorkbenchMessages getString ProjectCapabilityPropertyPage chooseCapabilities IDEWorkbenchMessages getString ProjectCapabilityPropertyPage noCapabilities setFont getFont setText getProjectCapabilities getProject disabledCaps getProjectDisabledCapabilities getProject capabilityGroup ProjectCapabilitySelectionGroup disabledCaps capabilityGroup createContents
Returns the project which this property page applies to return I Project the project for this property page package I Project get Project if project null project I Project get Element get Adapter I Resource class return project  IProject IProject getProject IProject getElement getAdapter IResource
public boolean perform Ok Avoid doing any work if no changes were made if capability Group get Capabilities Modified return true Validate the requested changes are ok Capability Registry reg IDE Workbench Plugin get Default get Capability Registry Capability caps capability Group get Selected Capabilities I Status status reg validate Capabilities caps if status isOK Error Dialog open Error get Shell IDE Workbench Messages get String Project Capability Property Page error Title NON NLS 1 IDE Workbench Messages get String Project Capability Property Page invalid Selection NON NLS 1 status return true Get the current set of nature ids on the project String nature Ids try nature Ids get Project get Description get Nature Ids nature Ids get Project get Workspace sort Nature Set nature Ids catch Core Exception e Error Dialog open Error get Shell IDE Workbench Messages get String Project Capability Property Page error Title NON NLS 1 IDE Workbench Messages get String Project Capability Property Page internal Error NON NLS 1 e get Status return true Keep only the nature ids whose capability is selected Array List keep Ids new Array List Array List remove Caps new Array List for int i 0 i nature Ids length i boolean is Removed true String id nature Ids i for int j 0 j caps length j if id equals caps j get Nature Id keep Ids add id is Removed false break if is Removed remove Caps add reg get Capability For Nature id Collect the capabilities to add Array List new Caps new Array List for int i 0 i caps length i boolean is New true Capability cap caps i for int j 0 j nature Ids length j if nature Ids j equals cap get Nature Id is New false break if is New new Caps add cap Launch the step wizard if needed if new Caps size 0 remove Caps size 0 Capability new Capabilities new Capability new Caps size new Caps to Array new Capabilities Capability remove Capabilities new Capability remove Caps size remove Caps to Array remove Capabilities Update Project Capability Wizard wizard new Update Project Capability Wizard get Project new Capabilities remove Capabilities Multi Step Wizard Dialog dialog new Multi Step Wizard Dialog get Shell wizard dialog create dialog get Shell set Size Math max SIZING WIZARD WIDTH dialog get Shell get Size x SIZING WIZARD HEIGHT Workbench Help set Help dialog get Shell I Help Context Ids UPDATE CAPABILITY WIZARD dialog open return true  performOk capabilityGroup getCapabilitiesModified CapabilityRegistry IDEWorkbenchPlugin getDefault getCapabilityRegistry capabilityGroup getSelectedCapabilities IStatus validateCapabilities ErrorDialog openError getShell IDEWorkbenchMessages getString ProjectCapabilityPropertyPage errorTitle IDEWorkbenchMessages getString ProjectCapabilityPropertyPage invalidSelection natureIds natureIds getProject getDescription getNatureIds natureIds getProject getWorkspace sortNatureSet natureIds CoreException ErrorDialog openError getShell IDEWorkbenchMessages getString ProjectCapabilityPropertyPage errorTitle IDEWorkbenchMessages getString ProjectCapabilityPropertyPage internalError getStatus ArrayList keepIds ArrayList ArrayList removeCaps ArrayList natureIds isRemoved natureIds getNatureId keepIds isRemoved isRemoved removeCaps getCapabilityForNature ArrayList newCaps ArrayList isNew natureIds natureIds getNatureId isNew isNew newCaps newCaps removeCaps newCapabilities newCaps newCaps toArray newCapabilities removeCapabilities removeCaps removeCaps toArray removeCapabilities UpdateProjectCapabilityWizard UpdateProjectCapabilityWizard getProject newCapabilities removeCapabilities MultiStepWizardDialog MultiStepWizardDialog getShell getShell setSize SIZING_WIZARD_WIDTH getShell getSize SIZING_WIZARD_HEIGHT WorkbenchHelp setHelp getShell IHelpContextIds UPDATE_CAPABILITY_WIZARD

public Project Capability Simple Add Wizard I Workbench workbench I Structured Selection selection I Project project super this workbench workbench this selection selection this project project set Force Previous And Next Buttons true set Needs Progress Monitor true initialize Default Page Image Descriptor set Window Title IDE Workbench Messages get String Project Capability Simple Selection Page window Title NON NLS 1  ProjectCapabilitySimpleAddWizard IWorkbench IStructuredSelection IProject setForcePreviousAndNextButtons setNeedsProgressMonitor initializeDefaultPageImageDescriptor setWindowTitle IDEWorkbenchMessages getString ProjectCapabilitySimpleSelectionPage windowTitle
public void add Pages main Page new Project Capability Simple Selection Page project Capability Simple Selection Page NON NLS 1 workbench selection project main Page set Title IDE Workbench Messages get String Project Capability Simple Selection Page title NON NLS 1 main Page set Description IDE Workbench Messages get String Project Capability Simple Selection Page description NON NLS 1 add Page main Page  addPages mainPage ProjectCapabilitySimpleSelectionPage projectCapabilitySimpleSelectionPage mainPage setTitle IDEWorkbenchMessages getString ProjectCapabilitySimpleSelectionPage mainPage setDescription IDEWorkbenchMessages getString ProjectCapabilitySimpleSelectionPage addPage mainPage
Method declared on I Wizard public boolean can Finish return false  IWizard canFinish
Sets the image banner for the wizard protected void initialize Default Page Image Descriptor String icon Path icons full NON NLS 1 try issue when icons move to IDE need to update the following URL installURL Platform get Plugin PlatformUI PLUGIN ID get Descriptor get InstallURL URL url new URL installURL icon Path wizban newprj wiz gif NON NLS 1 Image Descriptor desc Image Descriptor create FromURL url set Default Page Image Descriptor desc catch MalformedURL Exception e Should not happen Ignore  initializeDefaultPageImageDescriptor iconPath getPlugin PLUGIN_ID getDescriptor getInstallURL iconPath newprj_wiz ImageDescriptor ImageDescriptor createFromURL setDefaultPageImageDescriptor MalformedURLException
Method declared on I Wizard public boolean perform Finish return true  IWizard performFinish

Creates an instance of this page public Project Capability Simple Selection Page String page Name I Workbench workbench I Structured Selection selection I Project project super page Name this workbench workbench this selection selection this project project this reg IDE Workbench Plugin get Default get Capability Registry  ProjectCapabilitySimpleSelectionPage pageName IWorkbench IStructuredSelection IProject pageName IDEWorkbenchPlugin getDefault getCapabilityRegistry
Method declared on I Wizard Page public boolean can Flip To Next Page return is Page Complete  IWizardPage canFlipToNextPage isPageComplete
viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event chosen Capability null if event get Selection instanceof I Structured Selection I Structured Selection sel I Structured Selection event get Selection if sel null sel is Empty Object result sel get First Element if result instanceof Capability chosen Capability Capability result set Page Complete validate Chosen Capability  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent chosenCapability getSelection IStructuredSelection IStructuredSelection IStructuredSelection getSelection isEmpty getFirstElement chosenCapability setPageComplete validateChosenCapability
public void create Control Composite parent Font font parent get Font Composite top Container new Composite parent SWT NONE top Container set Layout new Grid Layout top Container set Layout Data new Grid Data Grid Data FILL BOTH Label label new Label top Container SWT LEFT label set Text IDE Workbench Messages get String Project Capability Selection Group capabilities NON NLS 1 Grid Data data new Grid Data data vertical Alignment SWT TOP label set Layout Data data label set Font font viewer new Tree Viewer top Container SWT SINGLE SWT H SCROLL SWT V SCROLL SWT BORDER viewer get Tree set Layout Data new Grid Data Grid Data FILL BOTH viewer get Tree set Font font viewer set Label Provider new Workbench Label Provider viewer set Content Provider get Content Provider viewer set Input reg viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event chosen Capability null if event get Selection instanceof I Structured Selection I Structured Selection sel I Structured Selection event get Selection if sel null sel is Empty Object result sel get First Element if result instanceof Capability chosen Capability Capability result set Page Complete validate Chosen Capability set Control top Container  createControl getFont topContainer topContainer setLayout GridLayout topContainer setLayoutData GridData GridData FILL_BOTH topContainer setText IDEWorkbenchMessages getString ProjectCapabilitySelectionGroup GridData GridData verticalAlignment setLayoutData setFont TreeViewer topContainer H_SCROLL V_SCROLL getTree setLayoutData GridData GridData FILL_BOTH getTree setFont setLabelProvider WorkbenchLabelProvider setContentProvider getContentProvider setInput addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent chosenCapability getSelection IStructuredSelection IStructuredSelection IStructuredSelection getSelection isEmpty getFirstElement chosenCapability setPageComplete validateChosenCapability setControl topContainer
return new Workbench Content Provider public Object get Children Object parent Element if parent Element instanceof Capability Registry Array List cats reg get Used Categories if reg get Misc Category null cats add reg get Misc Category return cats to Array if parent Element instanceof Category return Category parent Element get Children parent Element return null  WorkbenchContentProvider getChildren parentElement parentElement CapabilityRegistry ArrayList getUsedCategories getMiscCategory getMiscCategory toArray parentElement parentElement getChildren parentElement
public boolean has Children Object element if element instanceof Capability Registry return true if element instanceof Category return Category element has Elements return false  hasChildren CapabilityRegistry hasElements
Returns the content provider for the viewer private I Content Provider get Content Provider return new Workbench Content Provider public Object get Children Object parent Element if parent Element instanceof Capability Registry Array List cats reg get Used Categories if reg get Misc Category null cats add reg get Misc Category return cats to Array if parent Element instanceof Category return Category parent Element get Children parent Element return null public boolean has Children Object element if element instanceof Capability Registry return true if element instanceof Category return Category element has Elements return false  IContentProvider getContentProvider WorkbenchContentProvider getChildren parentElement parentElement CapabilityRegistry ArrayList getUsedCategories getMiscCategory getMiscCategory toArray parentElement parentElement getChildren parentElement hasChildren CapabilityRegistry hasElements
Busy Indicator show While get Shell get Display new Runnable public void run I Capability Install Wizard wiz wiz chosen Capability get Install Wizard if wiz null wiz init workbench selection project wiz add Pages map Cap To Wizard put chosen Capability wiz wizard 0 wiz  BusyIndicator showWhile getShell getDisplay ICapabilityInstallWizard chosenCapability getInstallWizard addPages mapCapToWizard chosenCapability
public I Wizard Page get Next Page if chosen Capability null return null final I Wizard wizard new I Wizard 1 wizard 0 I Wizard map Cap To Wizard get chosen Capability if wizard 0 null Busy Indicator show While get Shell get Display new Runnable public void run I Capability Install Wizard wiz wiz chosen Capability get Install Wizard if wiz null wiz init workbench selection project wiz add Pages map Cap To Wizard put chosen Capability wiz wizard 0 wiz if wizard 0 null return null I Wizard Page page wizard 0 get Starting Page wizard 0 null return page  IWizardPage getNextPage chosenCapability IWizard IWizard IWizard mapCapToWizard chosenCapability BusyIndicator showWhile getShell getDisplay ICapabilityInstallWizard chosenCapability getInstallWizard addPages mapCapToWizard chosenCapability IWizardPage getStartingPage
private boolean validate Chosen Capability if chosen Capability null set Error Message null return false Capability caps reg get Project Capabilities project List existing Caps Arrays as List caps if existing Caps contains chosen Capability set Error Message IDE Workbench Messages get String Project Capability Simple Selection Page capability Exist NON NLS 1 return false String ids reg get Prerequisite Ids chosen Capability Capability prereqs reg find Capabilities ids for int i 0 i prereqs length i if prereqs i null set Error Message IDE Workbench Messages format Project Capability Simple Selection Page capability Missing new Object ids i NON NLS 1 return false if existing Caps contains prereqs i set Error Message IDE Workbench Messages format Project Capability Simple Selection Page capability Required new Object prereqs i get Name NON NLS 1 return false ids reg get Membership Set Ids chosen Capability List ids List Arrays as List ids for int i 0 i caps length i String set Ids reg get Membership Set Ids caps i for int j 0 j set Ids length j if ids List contains set Ids j set Error Message IDE Workbench Messages format Project Capability Simple Selection Page capability Set new Object caps i get Name NON NLS 1 return false Capability new Caps new Capability caps length 1 System arraycopy caps 0 new Caps 0 caps length new Caps caps length chosen Capability I Status status reg validate Capabilities new Caps if status isOK set Error Message status get Message return false set Error Message null return true  validateChosenCapability chosenCapability setErrorMessage getProjectCapabilities existingCaps asList existingCaps chosenCapability setErrorMessage IDEWorkbenchMessages getString ProjectCapabilitySimpleSelectionPage capabilityExist getPrerequisiteIds chosenCapability findCapabilities setErrorMessage IDEWorkbenchMessages ProjectCapabilitySimpleSelectionPage capabilityMissing existingCaps setErrorMessage IDEWorkbenchMessages ProjectCapabilitySimpleSelectionPage capabilityRequired getName getMembershipSetIds chosenCapability idsList asList setIds getMembershipSetIds setIds idsList setIds setErrorMessage IDEWorkbenchMessages ProjectCapabilitySimpleSelectionPage capabilitySet getName newCaps newCaps newCaps chosenCapability IStatus validateCapabilities newCaps setErrorMessage getMessage setErrorMessage

public int compare Object ob1 Object ob2 I Perspective Descriptor d1 I Perspective Descriptor ob1 I Perspective Descriptor d2 I Perspective Descriptor ob2 return collator compare d1 get Label d2 get Label  IPerspectiveDescriptor IPerspectiveDescriptor IPerspectiveDescriptor IPerspectiveDescriptor getLabel getLabel
Create a Project Perspective Choice Dialog param window the workbench window launching this dialog param persp Ids the list of ids the user can choose from public Project Perspective Choice Dialog I Workbench Window window String persp Ids super window get Shell this window window I Workbench Page page window get Active Page if page null chosen Persp page get Perspective I Perspective Registry reg window get Workbench get Perspective Registry persps new Array List persp Ids length for int i 0 i persp Ids length i I Perspective Descriptor desc desc reg find Perspective With Id persp Ids i if desc null desc chosen Persp persps add desc Collections sort persps comparator if chosen Persp null persps add 0 chosen Persp  ProjectPerspectiveChoiceDialog perspIds ProjectPerspectiveChoiceDialog IWorkbenchWindow perspIds getShell IWorkbenchPage getActivePage chosenPersp getPerspective IPerspectiveRegistry getWorkbench getPerspectiveRegistry ArrayList perspIds perspIds IPerspectiveDescriptor findPerspectiveWithId perspIds chosenPersp chosenPersp chosenPersp
protected void configure Shell Shell shell super configure Shell shell shell set Text IDE Workbench Messages get String Project Perspective Choice Dialog title NON NLS 1 Workbench Help set Help shell I Help Context Ids SHOW PROJECT PERSPECTIVE DIALOG  configureShell configureShell setText IDEWorkbenchMessages getString ProjectPerspectiveChoiceDialog WorkbenchHelp setHelp IHelpContextIds SHOW_PROJECT_PERSPECTIVE_DIALOG
Method declared on Dialog protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL
protected Control create Dialog Area Composite parent page group Composite composite Composite super create Dialog Area parent composite set Layout new Grid Layout Grid Data data new Grid Data Grid Data FILL BOTH data width Hint MIN DIALOG WIDTH data height Hint MIN DIALOG HEIGHT composite set Layout Data data create Perspective Group composite create Option Group composite if chosen Persp null list set Selection new Structured Selection chosen Persp return composite  createDialogArea createDialogArea setLayout GridLayout GridData GridData GridData FILL_BOTH widthHint MIN_DIALOG_WIDTH heightHint MIN_DIALOG_HEIGHT setLayoutData createPerspectiveGroup createOptionGroup chosenPersp setSelection StructuredSelection chosenPersp
Creates the perspective choice controls param parent the parent composite private void create Perspective Group Composite parent Font font parent get Font Label for choosing perspective Label label new Label parent SWT NONE label set Font font label set Text IDE Workbench Messages get String Project Perspective Choice Dialog choose Perspective NON NLS 1 Add perspective list list new Table Viewer parent SWT H SCROLL SWT V SCROLL SWT BORDER list set Label Provider new Perspective Label Provider false list set Content Provider new Perspective Content Provider list set Input persps list add Selection Changed Listener new Selection Listener list get Table set Layout Data new Grid Data Grid Data FILL BOTH list get Table set Font font  createPerspectiveGroup getFont setFont setText IDEWorkbenchMessages getString ProjectPerspectiveChoiceDialog choosePerspective TableViewer H_SCROLL V_SCROLL setLabelProvider PerspectiveLabelProvider setContentProvider PerspectiveContentProvider setInput addSelectionChangedListener SelectionListener getTable setLayoutData GridData GridData FILL_BOTH getTable setFont
button set Selection same Window button add Selection Listener new Selection Adapter public void widget Selected Selection Event e same Window true  setSelection sameWindow addSelectionListener SelectionAdapter widgetSelected SelectionEvent sameWindow
button set Selection same Window button add Selection Listener new Selection Adapter public void widget Selected Selection Event e same Window false  setSelection sameWindow addSelectionListener SelectionAdapter widgetSelected SelectionEvent sameWindow
Creates the option controls param parent the parent composite private void create Option Group Composite parent Font font parent get Font Create the option group Group option Group new Group parent SWT LEFT Grid Layout layout new Grid Layout option Group set Layout layout Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL option Group set Layout Data data option Group set Font font option Group set Text IDE Workbench Messages get String Project Perspective Choice Dialog options NON NLS 1 Same window option Button button new Button option Group SWT RADIO SWT LEFT button set Text IDE Workbench Messages get String Project Perspective Choice Dialog same Window NON NLS 1 data new Grid Data button set Layout Data data button set Font font button set Selection same Window button add Selection Listener new Selection Adapter public void widget Selected Selection Event e same Window true New window option button new Button option Group SWT RADIO SWT LEFT button set Text IDE Workbench Messages get String Project Perspective Choice Dialog new Window NON NLS 1 data new Grid Data button set Layout Data data button set Font font button set Selection same Window button add Selection Listener new Selection Adapter public void widget Selected Selection Event e same Window false  createOptionGroup getFont optionGroup GridLayout GridLayout optionGroup setLayout GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL optionGroup setLayoutData optionGroup setFont optionGroup setText IDEWorkbenchMessages getString ProjectPerspectiveChoiceDialog optionGroup setText IDEWorkbenchMessages getString ProjectPerspectiveChoiceDialog sameWindow GridData setLayoutData setFont setSelection sameWindow addSelectionListener SelectionAdapter widgetSelected SelectionEvent sameWindow optionGroup setText IDEWorkbenchMessages getString ProjectPerspectiveChoiceDialog newWindow GridData setLayoutData setFont setSelection sameWindow addSelectionListener SelectionAdapter widgetSelected SelectionEvent sameWindow
Busy Indicator show While window get Shell get Display new Runnable public void run if same Window results 0 window I Workbench Page page window get Active Page if page null page set Perspective chosen Persp else try results 0 window get Workbench open Workbench Window chosen Persp get Id Resources Plugin get Workspace get Root catch Workbench Exception e errors 0 e  BusyIndicator showWhile getShell getDisplay sameWindow IWorkbenchPage getActivePage setPerspective chosenPersp getWorkbench openWorkbenchWindow chosenPersp getId ResourcesPlugin getWorkspace getRoot WorkbenchException
Shows the choosen perspective in the same or new window depending on the option checked Returns the workbench window the perspective was shown in public I Workbench Window show Chosen Perspective if chosen Persp null return window final I Workbench Window results new I Workbench Window 1 final Workbench Exception errors new Workbench Exception 1 Busy Indicator show While window get Shell get Display new Runnable public void run if same Window results 0 window I Workbench Page page window get Active Page if page null page set Perspective chosen Persp else try results 0 window get Workbench open Workbench Window chosen Persp get Id Resources Plugin get Workspace get Root catch Workbench Exception e errors 0 e I Workbench Window result results 0 results 0 null if errors 0 null Error Dialog open Error window get Shell IDE Workbench Messages get String Project Perspective Choice Dialog error Title NON NLS 1 IDE Workbench Messages get String Project Perspective Choice Dialog error Message NON NLS 1 errors 0 get Status errors 0 null return window return result  IWorkbenchWindow showChosenPerspective chosenPersp IWorkbenchWindow IWorkbenchWindow WorkbenchException WorkbenchException BusyIndicator showWhile getShell getDisplay sameWindow IWorkbenchPage getActivePage setPerspective chosenPersp getWorkbench openWorkbenchWindow chosenPersp getId ResourcesPlugin getWorkspace getRoot WorkbenchException IWorkbenchWindow ErrorDialog openError getShell IDEWorkbenchMessages getString ProjectPerspectiveChoiceDialog errorTitle IDEWorkbenchMessages getString ProjectPerspectiveChoiceDialog errorMessage getStatus
class Perspective Content Provider implements I Structured Content Provider public Perspective Content Provider super  PerspectiveContentProvider IStructuredContentProvider PerspectiveContentProvider
public void dispose 
public Object get Elements Object element if element instanceof Array List return Array List element to Array return null  getElements ArrayList ArrayList toArray
public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
public boolean is Deleted Object element return false  isDeleted
class Selection Listener implements I Selection Changed Listener public Selection Listener super  SelectionListener ISelectionChangedListener SelectionListener
public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection if selection null chosen Persp I Perspective Descriptor selection get First Element  selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection chosenPersp IPerspectiveDescriptor getFirstElement

private static final int PROJECT LIST MULTIPLIER 30 Creates a new Project Reference Page public Project Reference Page Do nothing on creation  PROJECT_LIST_MULTIPLIER ProjectReferencePage ProjectReferencePage
check for initial modification to avoid work if no changes are made list Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event modified true  listViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent
see Preference Page create Contents protected Control create Contents Composite parent Workbench Help set Help get Control I Help Context Ids PROJECT REFERENCE PROPERTY PAGE Font font parent get Font Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL composite set Font font initialize create Description Label composite list Viewer Checkbox Table Viewer new Check List composite SWT TOP SWT BORDER list Viewer get Table set Font font Grid Data data new Grid Data Grid Data FILL BOTH data grab Excess Horizontal Space true Only set a height hint if it will not result in a cut off dialog if Dialog Util in Regular Font Mode parent data height Hint get Default Font Height list Viewer get Table PROJECT LIST MULTIPLIER list Viewer get Table set Layout Data data list Viewer get Table set Font font list Viewer set Label Provider Workbench Label Provider get Decorating Workbench Label Provider list Viewer set Content Provider get Content Provider project list Viewer set Sorter new Viewer Sorter list Viewer set Input project get Workspace try list Viewer set Checked Elements project get Description get Referenced Projects catch Core Exception e don t initial check anything check for initial modification to avoid work if no changes are made list Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event modified true return composite  PreferencePage createContents createContents WorkbenchHelp setHelp getControl IHelpContextIds PROJECT_REFERENCE_PROPERTY_PAGE getFont GridLayout GridLayout setLayout setLayoutData GridData GridData FILL_HORIZONTAL setFont createDescriptionLabel listViewer CheckboxTableViewer newCheckList listViewer getTable setFont GridData GridData GridData FILL_BOTH grabExcessHorizontalSpace DialogUtil inRegularFontMode heightHint getDefaultFontHeight listViewer getTable PROJECT_LIST_MULTIPLIER listViewer getTable setLayoutData listViewer getTable setFont listViewer setLabelProvider WorkbenchLabelProvider getDecoratingWorkbenchLabelProvider listViewer setContentProvider getContentProvider listViewer setSorter ViewerSorter listViewer setInput getWorkspace listViewer setCheckedElements getDescription getReferencedProjects CoreException listViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent
return new Workbench Content Provider public Object get Children Object o if o instanceof I Workspace return new Object 0 Collect all the projects in the workspace except the given project I Project projects I Workspace o get Root get Projects Array List referenced new Array List projects length boolean found false for int i 0 i projects length i if found projects i equals project found true continue referenced add projects i Add any referenced that do not exist in the workspace currently try projects project get Description get Referenced Projects for int i 0 i projects length i if referenced contains projects i referenced add projects i catch Core Exception e Ignore core exceptions return referenced to Array  WorkbenchContentProvider getChildren IWorkspace IProject IWorkspace getRoot getProjects ArrayList ArrayList getDescription getReferencedProjects CoreException toArray
Returns a content provider for the list dialog It will return all projects in the workspace except the given project plus any projects referenced by the given project which do no exist in the workspace param project the project to provide content for return the content provider that shows the project content protected I Structured Content Provider get Content Provider final I Project project return new Workbench Content Provider public Object get Children Object o if o instanceof I Workspace return new Object 0 Collect all the projects in the workspace except the given project I Project projects I Workspace o get Root get Projects Array List referenced new Array List projects length boolean found false for int i 0 i projects length i if found projects i equals project found true continue referenced add projects i Add any referenced that do not exist in the workspace currently try projects project get Description get Referenced Projects for int i 0 i projects length i if referenced contains projects i referenced add projects i catch Core Exception e Ignore core exceptions return referenced to Array  IStructuredContentProvider getContentProvider IProject WorkbenchContentProvider getChildren IWorkspace IProject IWorkspace getRoot getProjects ArrayList ArrayList getDescription getReferencedProjects CoreException toArray
Get the defualt widget height for the supplied control return int param control the control being queried about fonts param lines the number of lines to be shown on the table private static int get Default Font Height Control control int lines Font Data viewer Font Data control get Font get Font Data int font Height 10 If we have no font data use our guess if viewer Font Data length 0 font Height viewer Font Data 0 get Height return lines font Height  getDefaultFontHeight FontData viewerFontData getFont getFontData fontHeight viewerFontData fontHeight viewerFontData getHeight fontHeight
Handle the exception thrown when saving param e the exception protected void handle Invocation Target Exception e I Status error Throwable target e get Target Exception if target instanceof Core Exception error Core Exception target get Status else String msg target get Message if msg null msg IDE Workbench Messages get String Internal error NON NLS 1 error new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH 1 msg target Error Dialog open Error get Control get Shell null null error  InvocationTargetException IStatus getTargetException CoreException CoreException getStatus getMessage IDEWorkbenchMessages getString Internal_error IStatus IDEWorkbenchPlugin IDE_WORKBENCH ErrorDialog openError getControl getShell
Initializes a Project Reference Page private void initialize project I Project get Element get Adapter I Resource class no Default And Apply Button set Description IDE Workbench Messages format Project References Page label new Object project get Name NON NLS 1  ProjectReferencePage IProject getElement getAdapter IResource noDefaultAndApplyButton setDescription IDEWorkbenchMessages ProjectReferencesPage getName
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try I Project Description description project get Description description set Referenced Projects refs project set Description description monitor catch Core Exception e throw new Invocation Target Exception e  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException IProjectDescription getDescription setReferencedProjects setDescription CoreException InvocationTargetException
see Preference Page perform Ok public boolean perform Ok if modified return true Object checked list Viewer get Checked Elements final I Project refs new I Project checked length System arraycopy checked 0 refs 0 checked length I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try I Project Description description project get Description description set Referenced Projects refs project set Description description monitor catch Core Exception e throw new Invocation Target Exception e try new Progress Monitor Jobs Dialog get Control get Shell run true true runnable catch Interrupted Exception e Ignore interrupted exceptions catch Invocation Target Exception e handle e return false return true  PreferencePage performOk performOk listViewer getCheckedElements IProject IProject IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException IProjectDescription getDescription setReferencedProjects setDescription CoreException InvocationTargetException ProgressMonitorJobsDialog getControl getShell InterruptedException InvocationTargetException

Creates the remove capability step param number step order number param capability the capability to be removed param nature Ids the list of nature ids to remove on the project param project the project to remove the capability from public Remove Capability Step int number Capability capability String nature Ids I Project project super number this capability capability this nature Ids nature Ids this project project  natureIds RemoveCapabilityStep natureIds IProject natureIds natureIds
Method declared on Wizard Step public String get Label return IDE Workbench Messages format Remove Capability Step label new Object capability get Name NON NLS 1  WizardStep getLabel IDEWorkbenchMessages RemoveCapabilityStep getName
public String get Details String details capability get Uninstall Details if details null if nature Ids length 1 details IDE Workbench Messages format Remove Capability Step default Description0 new Object capability get Name NON NLS 1 else if nature Ids length 2 Capability Registry reg IDE Workbench Plugin get Default get Capability Registry Capability other Capability reg get Capability For Nature nature Ids 1 if other Capability capability other Capability reg get Capability For Nature nature Ids 0 details IDE Workbench Messages format Remove Capability Step default Description1 new Object capability get Name other Capability get Name NON NLS 1 else String Buffer msg new String Buffer Capability Registry reg IDE Workbench Plugin get Default get Capability Registry for int i 0 i nature Ids length i Capability cap reg get Capability For Nature nature Ids i if cap capability msg append n NON NLS 1 msg append cap get Name details IDE Workbench Messages format Remove Capability Step default Description2 new Object capability get Name msg to String NON NLS 1 return details  getDetails getUninstallDetails natureIds IDEWorkbenchMessages RemoveCapabilityStep defaultDescription0 getName natureIds CapabilityRegistry IDEWorkbenchPlugin getDefault getCapabilityRegistry otherCapability getCapabilityForNature natureIds otherCapability otherCapability getCapabilityForNature natureIds IDEWorkbenchMessages RemoveCapabilityStep defaultDescription1 getName otherCapability getName StringBuffer StringBuffer CapabilityRegistry IDEWorkbenchPlugin getDefault getCapabilityRegistry natureIds getCapabilityForNature natureIds getName IDEWorkbenchMessages RemoveCapabilityStep defaultDescription2 getName toString
public I Wizard get Wizard if wizard null wizard capability get Uninstall Wizard if wizard null wizard new Remove Capability Wizard if wizard null wizard init PlatformUI get Workbench Structured Selection EMPTY project nature Ids wizard add Pages return wizard  IWizard getWizard getUninstallWizard RemoveCapabilityWizard getWorkbench StructuredSelection natureIds addPages

Creates an empty wizard for removing a capability from a project package Remove Capability Wizard super  RemoveCapabilityWizard
Method declared on I Capability Uninstall Wizard public void init I Workbench workbench I Structured Selection selection I Project project String nature Ids this project project this nature Ids nature Ids  ICapabilityUninstallWizard IWorkbench IStructuredSelection IProject natureIds natureIds natureIds
Method declared on I Wizard public boolean perform Finish return update Natures  IWizard performFinish updateNatures
Workspace Modify Operation op new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception try I Project Description description project get Description String old Ids description get Nature Ids Array List new Ids new Array List old Ids length for int i 0 i old Ids length i boolean keep Nature true for int j 0 j nature Ids length j if nature Ids j equals old Ids i keep Nature false break if keep Nature new Ids add old Ids i String results new String new Ids size new Ids to Array results description set Nature Ids results project set Description description monitor finally monitor done  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException IProjectDescription getDescription oldIds getNatureIds ArrayList newIds ArrayList oldIds oldIds keepNature natureIds natureIds oldIds keepNature keepNature newIds oldIds newIds newIds toArray setNatureIds setDescription
Update the project natures private boolean update Natures define the operation to update natures Workspace Modify Operation op new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception try I Project Description description project get Description String old Ids description get Nature Ids Array List new Ids new Array List old Ids length for int i 0 i old Ids length i boolean keep Nature true for int j 0 j nature Ids length j if nature Ids j equals old Ids i keep Nature false break if keep Nature new Ids add old Ids i String results new String new Ids size new Ids to Array results description set Nature Ids results project set Description description monitor finally monitor done run the update nature operation try get Container run true true op catch Interrupted Exception e return false catch Invocation Target Exception e Throwable t e get Target Exception if t instanceof Core Exception Error Dialog open Error get Shell IDE Workbench Messages get String Remove Capability Wizard error Message NON NLS 1 null no special message Core Exception t get Status else Unexpected runtime exceptions and errors may still occur Platform get Plugin PlatformUI PLUGIN ID get Log log new Status Status ERROR PlatformUI PLUGIN ID 0 t to String t Message Dialog open Error get Shell IDE Workbench Messages get String Remove Capability Wizard error Message NON NLS 1 IDE Workbench Messages format Remove Capability Wizard internal Error new Object t get Message NON NLS 1 return false return true  updateNatures WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException IProjectDescription getDescription oldIds getNatureIds ArrayList newIds ArrayList oldIds oldIds keepNature natureIds natureIds oldIds keepNature keepNature newIds oldIds newIds newIds toArray setNatureIds setDescription getContainer InterruptedException InvocationTargetException getTargetException CoreException ErrorDialog openError getShell IDEWorkbenchMessages getString RemoveCapabilityWizard errorMessage CoreException getStatus getPlugin PLUGIN_ID getLog PLUGIN_ID toString MessageDialog openError getShell IDEWorkbenchMessages getString RemoveCapabilityWizard errorMessage IDEWorkbenchMessages RemoveCapabilityWizard internalError getMessage

Create the group that shows the name location size and type param parent the composite the group will be created in param resource the resource the information is being taken from return the composite for the group private Composite create Basic Info Group Composite parent I Resource resource Font font parent get Font Composite basic Info Composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width 0 layout margin Height 0 basic Info Composite set Layout layout Grid Data data new Grid Data data vertical Alignment Grid Data FILL data horizontal Alignment Grid Data FILL basic Info Composite set Layout Data data basic Info Composite set Font font The group for path Label path Label new Label basic Info Composite SWT NONE path Label set Text PATH TITLE Grid Data gd new Grid Data gd vertical Alignment SWT TOP path Label set Layout Data gd path Label set Font font path value label Text path Value Text new Text basic Info Composite SWT WRAP SWT READ ONLY path Value Text set Text resource get Full Path to String gd new Grid Data gd width Hint convert Width In Chars To Pixels MAX VALUE WIDTH gd grab Excess Horizontal Space true gd horizontal Alignment Grid Data FILL path Value Text set Layout Data gd path Value Text set Font font The group for types Label type Title new Label basic Info Composite SWT LEFT type Title set Text TYPE TITLE type Title set Font font Text type Value new Text basic Info Composite SWT LEFT SWT READ ONLY type Value set Text get Type String resource type Value set Font font The group for location Label location Title new Label basic Info Composite SWT LEFT location Title set Text LOCATION TITLE gd new Grid Data gd vertical Alignment SWT TOP location Title set Layout Data gd location Title set Font font Text location Value new Text basic Info Composite SWT WRAP SWT READ ONLY location Value set Text get Location Text resource gd new Grid Data gd width Hint convert Width In Chars To Pixels MAX VALUE WIDTH gd grab Excess Horizontal Space true gd horizontal Alignment Grid Data FILL location Value set Layout Data gd location Value set Font font if is Path Variable resource Label resolved Location Title new Label basic Info Composite SWT LEFT resolved Location Title set Text RESOLVED LOCATION TITLE gd new Grid Data gd vertical Alignment SWT TOP resolved Location Title set Layout Data gd resolved Location Title set Font font Text resolved Location Value new Text basic Info Composite SWT WRAP SWT READ ONLY resolved Location Value set Text get Resolved Location Text resource gd new Grid Data gd width Hint convert Width In Chars To Pixels MAX VALUE WIDTH gd grab Excess Horizontal Space true gd horizontal Alignment Grid Data FILL resolved Location Value set Layout Data gd resolved Location Value set Font font if resource get Type I Resource FILE The group for size Label size Title new Label basic Info Composite SWT LEFT size Title set Text SIZE TITLE size Title set Font font Text size Value new Text basic Info Composite SWT LEFT SWT READ ONLY size Value set Text get Size String I File resource gd new Grid Data gd width Hint convert Width In Chars To Pixels MAX VALUE WIDTH gd grab Excess Horizontal Space true gd horizontal Alignment Grid Data FILL size Value set Layout Data gd size Value set Font font return basic Info Composite  createBasicInfoGroup IResource getFont basicInfoComposite GridLayout GridLayout numColumns marginWidth marginHeight basicInfoComposite setLayout GridData GridData verticalAlignment GridData horizontalAlignment GridData basicInfoComposite setLayoutData basicInfoComposite setFont pathLabel basicInfoComposite pathLabel setText PATH_TITLE GridData GridData verticalAlignment pathLabel setLayoutData pathLabel setFont pathValueText basicInfoComposite READ_ONLY pathValueText setText getFullPath toString GridData widthHint convertWidthInCharsToPixels MAX_VALUE_WIDTH grabExcessHorizontalSpace horizontalAlignment GridData pathValueText setLayoutData pathValueText setFont typeTitle basicInfoComposite typeTitle setText TYPE_TITLE typeTitle setFont typeValue basicInfoComposite READ_ONLY typeValue setText getTypeString typeValue setFont locationTitle basicInfoComposite locationTitle setText LOCATION_TITLE GridData verticalAlignment locationTitle setLayoutData locationTitle setFont locationValue basicInfoComposite READ_ONLY locationValue setText getLocationText GridData widthHint convertWidthInCharsToPixels MAX_VALUE_WIDTH grabExcessHorizontalSpace horizontalAlignment GridData locationValue setLayoutData locationValue setFont isPathVariable resolvedLocationTitle basicInfoComposite resolvedLocationTitle setText RESOLVED_LOCATION_TITLE GridData verticalAlignment resolvedLocationTitle setLayoutData resolvedLocationTitle setFont resolvedLocationValue basicInfoComposite READ_ONLY resolvedLocationValue setText getResolvedLocationText GridData widthHint convertWidthInCharsToPixels MAX_VALUE_WIDTH grabExcessHorizontalSpace horizontalAlignment GridData resolvedLocationValue setLayoutData resolvedLocationValue setFont getType IResource sizeTitle basicInfoComposite sizeTitle setText SIZE_TITLE sizeTitle setFont sizeValue basicInfoComposite READ_ONLY sizeValue setText getSizeString IFile GridData widthHint convertWidthInCharsToPixels MAX_VALUE_WIDTH grabExcessHorizontalSpace horizontalAlignment GridData sizeValue setLayoutData sizeValue setFont basicInfoComposite
protected Control create Contents Composite parent Workbench Help set Help get Control I Help Context Ids RESOURCE INFO PROPERTY PAGE layout the page I Resource resource I Resource get Element if resource get Type I Resource PROJECT this previous Read Only Value resource is Read Only this previous Derived Value resource is Derived top level group Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 composite set Layout layout Grid Data data new Grid Data Grid Data FILL data grab Excess Horizontal Space true composite set Layout Data data composite set Font parent get Font create Basic Info Group composite resource create Separator composite create State Group composite resource new Label composite SWT NONE a vertical spacer create Encoding Group composite resource return composite  createContents WorkbenchHelp setHelp getControl IHelpContextIds RESOURCE_INFO_PROPERTY_PAGE IResource IResource getElement getType IResource previousReadOnlyValue isReadOnly previousDerivedValue isDerived GridLayout GridLayout marginWidth marginHeight setLayout GridData GridData GridData grabExcessHorizontalSpace setLayoutData setFont getFont createBasicInfoGroup createSeparator createStateGroup createEncodingGroup
Create the is Editable button and it s associated label as a child of parent using the editable Value of the receiver The Composite will be the parent of the button private void create Editable Button Composite composite this editable Box new Button composite SWT CHECK SWT RIGHT this editable Box set Alignment SWT LEFT this editable Box set Text READ ONLY this editable Box set Selection this previous Read Only Value this editable Box set Font composite get Font Grid Data data new Grid Data data horizontal Span 2 this editable Box set Layout Data data  isEditable editableValue createEditableButton editableBox editableBox setAlignment editableBox setText READ_ONLY editableBox setSelection previousReadOnlyValue editableBox setFont getFont GridData GridData horizontalSpan editableBox setLayoutData
Create the derived button and it s associated label as a child of parent using the derived of the receiver The Composite will be the parent of the button private void create Derived Button Composite composite this derived Box new Button composite SWT CHECK SWT RIGHT this derived Box set Alignment SWT LEFT this derived Box set Text DERIVED this derived Box set Selection this previous Derived Value this derived Box set Font composite get Font Grid Data data new Grid Data data horizontal Span 2 this derived Box set Layout Data data  createDerivedButton derivedBox derivedBox setAlignment derivedBox setText derivedBox setSelection previousDerivedValue derivedBox setFont getFont GridData GridData horizontalSpan derivedBox setLayoutData
Create a separator that goes across the entire page private void create Separator Composite composite Label separator new Label composite SWT SEPARATOR SWT HORIZONTAL Grid Data grid Data new Grid Data grid Data horizontal Alignment Grid Data FILL grid Data grab Excess Horizontal Space true separator set Layout Data grid Data  createSeparator GridData gridData GridData gridData horizontalAlignment GridData gridData grabExcessHorizontalSpace setLayoutData gridData
Create the group that shows the read only state and the timestamp return the composite for the group param parent the composite the group will be created in param resource the resource the information is being taken from private void create State Group Composite parent I Resource resource Font font parent get Font Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width 0 layout margin Height 0 composite set Layout layout Grid Data data new Grid Data data horizontal Alignment Grid Data FILL composite set Layout Data data composite set Font font Label time Stamp Label new Label composite SWT NONE time Stamp Label set Text TIMESTAMP TITLE time Stamp Label set Font font time Stamp value label Text time Stamp Value new Text composite SWT READ ONLY time Stamp Value set Text get Date String Value resource time Stamp Value set Font font time Stamp Value set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL Not relevant to projects if resource get Type I Resource PROJECT create Editable Button composite create Derived Button composite  createStateGroup IResource getFont GridLayout GridLayout numColumns marginWidth marginHeight setLayout GridData GridData horizontalAlignment GridData setLayoutData setFont timeStampLabel timeStampLabel setText TIMESTAMP_TITLE timeStampLabel setFont timeStamp timeStampValue READ_ONLY timeStampValue setText getDateStringValue timeStampValue setFont timeStampValue setLayoutData GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL getType IResource createEditableButton createDerivedButton
Selection Adapter button Listener new Selection Adapter public void widget Selected Selection Event e update Encoding State default Encoding Button get Selection update Valid State  SelectionAdapter buttonListener SelectionAdapter widgetSelected SelectionEvent updateEncodingState defaultEncodingButton getSelection updateValidState
encoding Combo set Layout Data data encoding Combo add Modify Listener new Modify Listener public void modify Text Modify Event e update Valid State  encodingCombo setLayoutData encodingCombo addModifyListener ModifyListener modifyText ModifyEvent updateValidState
private void create Encoding Group Composite parent I Resource resource Font font parent get Font Group group new Group parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 group set Layout layout if resource instanceof I Container group set Text CONTAINER ENCODING TITLE else group set Text FILE ENCODING TITLE group set Font font Selection Adapter button Listener new Selection Adapter public void widget Selected Selection Event e update Encoding State default Encoding Button get Selection update Valid State default Encoding Button new Button group SWT RADIO String encoding get Encoding resource String format CONTAINER ENCODING FORMAT String default Enc null if resource instanceof I File default Enc get Encoding From Content I File resource format default Enc null FILE CONTENT ENCODING FORMAT FILE CONTAINER ENCODING FORMAT if default Enc null default Enc get Encoding resource get Parent default Encoding Button set Text Message Format format format new String default Enc Grid Data data new Grid Data data horizontal Span 2 default Encoding Button set Layout Data data default Encoding Button add Selection Listener button Listener default Encoding Button set Font font other Encoding Button new Button group SWT RADIO other Encoding Button set Text IDE Workbench Messages get String Workbench Preference other Encoding NON NLS 1 other Encoding Button add Selection Listener button Listener other Encoding Button set Font font encoding Combo new Combo group SWT NONE data new Grid Data data width Hint convert Width In Chars To Pixels 15 encoding Combo set Font font encoding Combo set Layout Data data encoding Combo add Modify Listener new Modify Listener public void modify Text Modify Event e update Valid State Array List encodings new Array List int n 0 try n Integer parse Int IDE Workbench Messages get String Workbench Preference num Default Encodings NON NLS 1 catch Number Format Exception e1 Ignore for int i 0 i n i String enc IDE Workbench Messages get String Workbench Preference default Encoding i 1 null NON NLS 1 if enc null encodings add enc String default Enc1 System get Property file encoding UTF 8 NON NLS 1 NON NLS 2 if encodings contains default Enc1 encodings add default Enc1 String enc Resources Plugin get Plugin get Plugin Preferences get String Resources Plugin PREF ENCODING if encodings contains enc encodings add enc Collections sort encodings for int i 0 i encodings size i encoding Combo add String encodings get i encoding Combo set Text encoding update Encoding State uses Default Encoding resource  createEncodingGroup IResource getFont GridLayout GridLayout numColumns setLayout IContainer setText CONTAINER_ENCODING_TITLE setText FILE_ENCODING_TITLE setFont SelectionAdapter buttonListener SelectionAdapter widgetSelected SelectionEvent updateEncodingState defaultEncodingButton getSelection updateValidState defaultEncodingButton getEncoding CONTAINER_ENCODING_FORMAT defaultEnc IFile defaultEnc getEncodingFromContent IFile defaultEnc FILE_CONTENT_ENCODING_FORMAT FILE_CONTAINER_ENCODING_FORMAT defaultEnc defaultEnc getEncoding getParent defaultEncodingButton setText MessageFormat defaultEnc GridData GridData horizontalSpan defaultEncodingButton setLayoutData defaultEncodingButton addSelectionListener buttonListener defaultEncodingButton setFont otherEncodingButton otherEncodingButton setText IDEWorkbenchMessages getString WorkbenchPreference otherEncoding otherEncodingButton addSelectionListener buttonListener otherEncodingButton setFont encodingCombo GridData widthHint convertWidthInCharsToPixels encodingCombo setFont encodingCombo setLayoutData encodingCombo addModifyListener ModifyListener modifyText ModifyEvent updateValidState ArrayList ArrayList parseInt IDEWorkbenchMessages getString WorkbenchPreference numDefaultEncodings NumberFormatException IDEWorkbenchMessages getString WorkbenchPreference defaultEncoding defaultEnc1 getProperty defaultEnc1 defaultEnc1 ResourcesPlugin getPlugin getPluginPreferences getString ResourcesPlugin PREF_ENCODING encodingCombo encodingCombo setText updateEncodingState usesDefaultEncoding
private String get Encoding I Resource resource try if resource instanceof I Container return I Container resource get Default Charset else if resource instanceof I File return I File resource get Charset catch Core Exception e I Container parent resource get Parent return get Encoding parent  getEncoding IResource IContainer IContainer getDefaultCharset IFile IFile getCharset CoreException IContainer getParent getEncoding
private String get Encoding From Content I File file I Content Description description get Content Description file if description null byte bom byte description get Property I Content Description BYTE ORDER MARK if bom null return String description get Property I Content Description CHARSET if bom I Content Description BOM UTF 8 return IDE Workbench Messages get String Workbench Preference encoding BOM UTF 8 NON NLS 1 if bom I Content Description BOM UTF 16BE return IDE Workbench Messages get String Workbench Preference encoding BOM UTF 16BE NON NLS 1 if bom I Content Description BOM UTF 16LE return IDE Workbench Messages get String Workbench Preference encoding BOM UTF 16LE NON NLS 1 return null  getEncodingFromContent IFile IContentDescription getContentDescription getProperty IContentDescription BYTE_ORDER_MARK getProperty IContentDescription IContentDescription BOM_UTF_8 IDEWorkbenchMessages getString WorkbenchPreference BOM_UTF_8 IContentDescription BOM_UTF_16BE IDEWorkbenchMessages getString WorkbenchPreference BOM_UTF_16BE IContentDescription BOM_UTF_16LE IDEWorkbenchMessages getString WorkbenchPreference BOM_UTF_16LE
private String get Content Type String I File file I Content Description description get Content Description file if description null I Content Type content Type description get Content Type if content Type null return content Type get Name return null  getContentTypeString IFile IContentDescription getContentDescription IContentType contentType getContentType contentType contentType getName
private I Content Description get Content Description I File file if cached Content Description null try cached Content Description file get Content Description catch Core Exception e silently ignore return cached Content Description  IContentDescription getContentDescription IFile cachedContentDescription cachedContentDescription getContentDescription CoreException cachedContentDescription
private boolean uses Default Encoding I Resource resource try if resource instanceof I Container return I Container resource get Default Charset false null if resource instanceof I File return I File resource get Charset false null catch Core Exception e return true  usesDefaultEncoding IResource IContainer IContainer getDefaultCharset IFile IFile getCharset CoreException
private void update Encoding State boolean use Default default Encoding Button set Selection use Default other Encoding Button set Selection use Default encoding Combo set Enabled use Default update Valid State  updateEncodingState useDefault defaultEncodingButton setSelection useDefault otherEncodingButton setSelection useDefault encodingCombo setEnabled useDefault updateValidState
protected void update Valid State if is Encoding Valid set Error Message null set Valid true else set Error Message IDE Workbench Messages get String Workbench Preference unsupported Encoding NON NLS 1 set Valid false  updateValidState isEncodingValid setErrorMessage setValid setErrorMessage IDEWorkbenchMessages getString WorkbenchPreference unsupportedEncoding setValid
private boolean is Encoding Valid return default Encoding Button get Selection is Valid Encoding encoding Combo get Text  isEncodingValid defaultEncodingButton getSelection isValidEncoding encodingCombo getText
private boolean is Valid Encoding String enc try new String new byte 0 enc return true catch Unsupported Encoding Exception e return false  isValidEncoding UnsupportedEncodingException
Return the value for the date String for the timestamp of the supplied resource return String param I Resource the resource to query private String get Date String Value I Resource resource if resource is Local I Resource DEPTH ZERO return NOT LOCAL TEXT I Path location resource get Location if location null if resource is Linked return MISSING PATH VARIABLE TEXT return NOT EXIST TEXT else File local File location to File if local File exists Date Format format Date Format get Date Time Instance Date Format LONG Date Format MEDIUM return format format new Date local File last Modified return NOT EXIST TEXT  IResource getDateStringValue IResource isLocal IResource DEPTH_ZERO NOT_LOCAL_TEXT IPath getLocation isLinked MISSING_PATH_VARIABLE_TEXT NOT_EXIST_TEXT localFile toFile localFile DateFormat DateFormat getDateTimeInstance DateFormat DateFormat localFile lastModified NOT_EXIST_TEXT
Get the location of a resource private String get Location Text I Resource resource if resource is Local I Resource DEPTH ZERO return NOT LOCAL TEXT I Path resolved Location resource get Location I Path location resolved Location if resource is Linked location resource get Raw Location if location null return NOT EXIST TEXT else String location String location toOS String if resolved Location null is Path Variable resource No path variable used Display the file not exist message in the location Fixes bug 33318 File file resolved Location to File if file exists location String FILE NOT EXIST TEXT NON NLS 1 return location String  getLocationText IResource isLocal IResource DEPTH_ZERO NOT_LOCAL_TEXT IPath resolvedLocation getLocation IPath resolvedLocation isLinked getRawLocation NOT_EXIST_TEXT locationString toOSString resolvedLocation isPathVariable resolvedLocation toFile locationString FILE_NOT_EXIST_TEXT locationString
Get the resolved location of a resource This resolves path variables if present in the resource path private String get Resolved Location Text I Resource resource if resource is Local I Resource DEPTH ZERO return NOT LOCAL TEXT I Path location resource get Location if location null if resource is Linked return MISSING PATH VARIABLE TEXT return NOT EXIST TEXT else String location String location toOS String File file location to File if file exists location String FILE NOT EXIST TEXT NON NLS 1 return location String  getResolvedLocationText IResource isLocal IResource DEPTH_ZERO NOT_LOCAL_TEXT IPath getLocation isLinked MISSING_PATH_VARIABLE_TEXT NOT_EXIST_TEXT locationString toOSString toFile locationString FILE_NOT_EXIST_TEXT locationString
Return a String that indicates the size of the supplied file private String get Size String I File file if file is Local I Resource DEPTH ZERO return NOT LOCAL TEXT I Path location file get Location if location null if file is Linked return MISSING PATH VARIABLE TEXT return NOT EXIST TEXT else File local File location to File if local File exists String bytes String Long to String local File length return Message Format format BYTES LABEL new Object bytes String return NOT EXIST TEXT  getSizeString IFile isLocal IResource DEPTH_ZERO NOT_LOCAL_TEXT IPath getLocation isLinked MISSING_PATH_VARIABLE_TEXT NOT_EXIST_TEXT localFile toFile localFile bytesString toString localFile MessageFormat BYTES_LABEL bytesString NOT_EXIST_TEXT
Get the string that identifies the type of this resource private String get Type String I Resource resource if resource get Type I Resource FILE if resource is Linked return LINKED FILE LABEL if resource instanceof I File String content Type get Content Type String I File resource if content Type null return Message Format format FILE TYPE FORMAT new String content Type return FILE LABEL if resource get Type I Resource FOLDER if resource is Linked return LINKED FOLDER LABEL return FOLDER LABEL if resource get Type I Resource PROJECT return PROJECT LABEL Should not be possible return UNKNOWN LABEL  getTypeString IResource getType IResource isLinked LINKED_FILE_LABEL IFile contentType getContentTypeString IFile contentType MessageFormat FILE_TYPE_FORMAT contentType FILE_LABEL getType IResource isLinked LINKED_FOLDER_LABEL FOLDER_LABEL getType IResource PROJECT_LABEL UNKNOWN_LABEL
Returns whether the given resource is a linked resource bound to a path variable param resource resource to test return boolean code true code the given resource is a linked resource bound to a path variable code false code the given resource is either not a linked resource or it is not using a path variable private boolean is Path Variable I Resource resource if resource is Linked return false I Path resolved Location resource get Location if resolved Location null missing path variable return true I Path raw Location resource get Raw Location if resolved Location equals raw Location return false return true  isPathVariable IResource isLinked IPath resolvedLocation getLocation resolvedLocation IPath rawLocation getRawLocation resolvedLocation rawLocation
Reset the editable Box to the false protected void perform Defaults Nothing to update if we never made the box if this editable Box null this editable Box set Selection false Nothing to update if we never made the box if this derived Box null this derived Box set Selection false if default Encoding Button null update Encoding State true  editableBox performDefaults editableBox editableBox setSelection derivedBox derivedBox setSelection defaultEncodingButton updateEncodingState
Apply the read only state and the encoding to the resource public boolean perform Ok I Resource resource I Resource get Element set encoding if is Encoding Valid String previous Encoding null if uses Default Encoding resource previous Encoding get Encoding resource String new Encoding null if default Encoding Button get Selection new Encoding encoding Combo get Text if previous Encoding null new Encoding null previous Encoding null new Encoding null previous Encoding null new Encoding null previous Encoding equals new Encoding try if resource instanceof I File I File resource set Charset new Encoding else if resource instanceof I Container I Container resource set Default Charset new Encoding catch Core Exception e Error Dialog open Error get Shell IDE Workbench Messages get String Internal Error NON NLS 1 e get Localized Message e get Status return false Nothing to update if we never made the box if this editable Box null boolean local Read Only Value editable Box get Selection if previous Read Only Value local Read Only Value resource set Read Only local Read Only Value Nothing to update if we never made the box if this derived Box null try boolean local Derived Value derived Box get Selection if previous Derived Value local Derived Value resource set Derived local Derived Value catch Core Exception exception Error Dialog open Error get Shell IDE Workbench Messages get String Internal Error NON NLS 1 exception get Localized Message exception get Status return false return true  performOk IResource IResource getElement isEncodingValid previousEncoding usesDefaultEncoding previousEncoding getEncoding newEncoding defaultEncodingButton getSelection newEncoding encodingCombo getText previousEncoding newEncoding previousEncoding newEncoding previousEncoding newEncoding previousEncoding newEncoding IFile IFile setCharset newEncoding IContainer IContainer setDefaultCharset newEncoding CoreException ErrorDialog openError getShell IDEWorkbenchMessages getString InternalError getLocalizedMessage getStatus editableBox localReadOnlyValue editableBox getSelection previousReadOnlyValue localReadOnlyValue setReadOnly localReadOnlyValue derivedBox localDerivedValue derivedBox getSelection previousDerivedValue localDerivedValue setDerived localDerivedValue CoreException ErrorDialog openError getShell IDEWorkbenchMessages getString InternalError getLocalizedMessage getStatus

Creates a resource sorter that will use the given sort criteria param criteria the sort criterion to use one of code NAME code or code TYPE code public Resource Sorter int criteria super this criteria criteria  ResourceSorter
Returns an integer value representing the relative sort priority of the given element based on its class p ul li resources code I Resource code 2 li li project references code Project Reference code 1 li li everything else 0 li ul p param element the element return the sort priority larger numbers means more important protected int class Comparison Object element if element instanceof I Resource return 2 return 0  IResource ProjectReference classComparison IResource
public int compare Viewer viewer Object o1 Object o2 have to deal with non resources in navigator if one or both objects are not resources returned a comparison based on class if o1 instanceof I Resource o2 instanceof I Resource return compare Class o1 o2 I Resource r1 I Resource o1 I Resource r2 I Resource o2 if r1 instanceof I Container r2 instanceof I Container return compare Names r1 r2 else if r1 instanceof I Container return 1 else if r2 instanceof I Container return 1 else if criteria NAME return compare Names r1 r2 else if criteria TYPE return compare Types r1 r2 else return 0  IResource IResource compareClass IResource IResource IResource IResource IContainer IContainer compareNames IContainer IContainer compareNames compareTypes
Returns a number reflecting the collation order of the given elements based on their class param element1 the first element to be ordered param element2 the second element to be ordered return a negative number if the first element is less than the second element the value code 0 code if the first element is equal to the second element and a positive number if the first element is greater than the second element protected int compare Class Object element1 Object element2 return class Comparison element1 class Comparison element2  compareClass classComparison classComparison
Returns a number reflecting the collation order of the given resources based on their resource names param resource1 the first resource element to be ordered param resource2 the second resource element to be ordered return a negative number if the first element is less than the second element the value code 0 code if the first element is equal to the second element and a positive number if the first element is greater than the second element protected int compare Names I Resource resource1 I Resource resource2 return collator compare resource1 get Name resource2 get Name  compareNames IResource IResource getName getName
Returns a number reflecting the collation order of the given resources based on their respective file extensions Resources with the same file extension will be collated based on their names param resource1 the first resource element to be ordered param resource2 the second resource element to be ordered return a negative number if the first element is less than the second element the value code 0 code if the first element is equal to the second element and a positive number if the first element is greater than the second element protected int compare Types I Resource resource1 I Resource resource2 String ext1 get Extension For resource1 String ext2 get Extension For resource2 Compare extensions If they re different then return a value that indicates correct extension ordering If they re the same then return a value that indicates the correct NAME ordering int result collator compare ext1 ext2 if result 0 ie different extensions return result return compare Names resource1 resource2  compareTypes IResource IResource getExtensionFor getExtensionFor compareNames
Returns the sort criteria of this this sorter return the sort criterion one of code NAME code or code TYPE code public int get Criteria return criteria  getCriteria
Returns the extension portion of the given resource param resource the resource return the file extension possibily the empty string private String get Extension For I Resource resource String ext resource get File Extension return ext null ext NON NLS 1  getExtensionFor IResource getFileExtension

Create an instance of this class Use this constructor if you wish to specify the width and or height of the combined widget to only hardcode one of the sizing dimensions specify the other dimension s value as 1 param parent param root Object param tree Content Provider param tree Label Provider param list Content Provider param list Label Provider param style param use Height Hint If true then use the height hint to make this group big enough public Resource Tree And List Group Composite parent Object root Object I Tree Content Provider tree Content Provider I Label Provider tree Label Provider I Structured Content Provider list Content Provider I Label Provider list Label Provider int style boolean use Height Hint root root Object this tree Content Provider tree Content Provider this list Content Provider list Content Provider this tree Label Provider tree Label Provider this list Label Provider list Label Provider create Contents parent style use Height Hint  rootObject treeContentProvider treeLabelProvider listContentProvider listLabelProvider useHeightHint ResourceTreeAndListGroup rootObject ITreeContentProvider treeContentProvider ILabelProvider treeLabelProvider IStructuredContentProvider listContentProvider ILabelProvider listLabelProvider useHeightHint rootObject treeContentProvider treeContentProvider listContentProvider listContentProvider treeLabelProvider treeLabelProvider listLabelProvider listLabelProvider createContents useHeightHint
This method must be called just before this window becomes visible public void about To Open determine White Checked Descendents root check New Tree Elements tree Content Provider get Elements root current Tree Selection null select the first element in the list Object elements tree Content Provider get Elements root Object primary elements length 0 elements 0 null if primary null tree Viewer set Selection new Structured Selection primary tree Viewer get Control set Focus  aboutToOpen determineWhiteCheckedDescendents checkNewTreeElements treeContentProvider getElements currentTreeSelection treeContentProvider getElements treeViewer setSelection StructuredSelection treeViewer getControl setFocus
Add the passed listener to self s collection of clients that listen for changes to element checked states param listener I Check State Listener public void add Check State Listener I Check State Listener listener listeners add listener  ICheckStateListener addCheckStateListener ICheckStateListener
Return a boolean indicating whether all children of the passed tree element are currently white checked return boolean param tree Element java lang Object protected boolean are All Children White Checked Object tree Element Object children tree Content Provider get Children tree Element for int i 0 i children length i if white Checked Tree Items contains children i return false return true  treeElement areAllChildrenWhiteChecked treeElement treeContentProvider getChildren treeElement whiteCheckedTreeItems
Return a boolean indicating whether all list elements associated with the passed tree element are currently checked return boolean param tree Element java lang Object protected boolean are All Elements Checked Object tree Element List checked Elements List checked State Store get tree Element if checked Elements null ie tree item not even gray checked return false return get List Items Size tree Element checked Elements size  treeElement areAllElementsChecked treeElement checkedElements checkedStateStore treeElement checkedElements getListItemsSize treeElement checkedElements
Iterate through the passed elements which are being realized for the first time and check each one in the tree viewer as appropriate protected void check New Tree Elements Object elements for int i 0 i elements length i Object current Element elements i boolean checked checked State Store contains Key current Element tree Viewer set Checked current Element checked tree Viewer set Grayed current Element checked white Checked Tree Items contains current Element  checkNewTreeElements currentElement checkedStateStore containsKey currentElement treeViewer setChecked currentElement treeViewer setGrayed currentElement whiteCheckedTreeItems currentElement
Busy Indicator show While tree Viewer get Control get Display new Runnable public void run if event get Checkable equals tree Viewer tree Item Checked event get Element event get Checked else list Item Checked event get Element event get Checked true notify Check State Change Listeners event  BusyIndicator showWhile treeViewer getControl getDisplay getCheckable treeViewer treeItemChecked getElement getChecked listItemChecked getElement getChecked notifyCheckStateChangeListeners
An item was checked in one of self s two views Determine which view this occurred in and delegate appropriately param event Check State Changed Event public void check State Changed final Check State Changed Event event Potentially long operation show a busy cursor Busy Indicator show While tree Viewer get Control get Display new Runnable public void run if event get Checkable equals tree Viewer tree Item Checked event get Element event get Checked else list Item Checked event get Element event get Checked true notify Check State Change Listeners event  CheckStateChangedEvent checkStateChanged CheckStateChangedEvent BusyIndicator showWhile treeViewer getControl getDisplay getCheckable treeViewer treeItemChecked getElement getChecked listItemChecked getElement getChecked notifyCheckStateChangeListeners
Lay out and initialize self s visual components param parent org eclipse swt widgets Composite param style the style flags for the new Composite param use Height Hint If true yse the preferred Height protected void create Contents Composite parent int style boolean use Height Hint group pane Composite composite new Composite parent style composite set Font parent get Font Grid Layout layout new Grid Layout layout num Columns 2 layout make Columns Equal Width true layout margin Height 0 layout margin Width 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH create Tree Viewer composite use Height Hint create List Viewer composite use Height Hint initialize  useHeightHint preferredHeight createContents useHeightHint setFont getFont GridLayout GridLayout numColumns makeColumnsEqualWidth marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_BOTH createTreeViewer useHeightHint createListViewer useHeightHint
Create this group s list viewer protected void create List Viewer Composite parent boolean use Height Hint list Viewer Checkbox Table Viewer new Check List parent SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH if use Height Hint data height Hint PREFERRED HEIGHT list Viewer get Table set Layout Data data list Viewer get Table set Font parent get Font list Viewer set Content Provider list Content Provider list Viewer set Label Provider list Label Provider list Viewer add Check State Listener this  createListViewer useHeightHint listViewer CheckboxTableViewer newCheckList GridData GridData GridData FILL_BOTH useHeightHint heightHint PREFERRED_HEIGHT listViewer getTable setLayoutData listViewer getTable setFont getFont listViewer setContentProvider listContentProvider listViewer setLabelProvider listLabelProvider listViewer addCheckStateListener
Create this group s tree viewer protected void create Tree Viewer Composite parent boolean use Height Hint Tree tree new Tree parent SWT CHECK SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH if use Height Hint data height Hint PREFERRED HEIGHT tree set Layout Data data tree set Font parent get Font tree Viewer new Checkbox Tree Viewer tree tree Viewer set Content Provider tree Content Provider tree Viewer set Label Provider tree Label Provider tree Viewer add Tree Listener this tree Viewer add Check State Listener this tree Viewer add Selection Changed Listener this  createTreeViewer useHeightHint GridData GridData GridData FILL_BOTH useHeightHint heightHint PREFERRED_HEIGHT setLayoutData setFont getFont treeViewer CheckboxTreeViewer treeViewer setContentProvider treeContentProvider treeViewer setLabelProvider treeLabelProvider treeViewer addTreeListener treeViewer addCheckStateListener treeViewer addSelectionChangedListener
Returns a boolean indicating whether the passed tree element should be at LEAST gray checked Note that this method does not consider whether it should be white checked so a specified tree item which should be white checked will result in a code true code answer from this method To determine whether a tree item should be white checked use method determine Should Be White Checked Object param tree Element java lang Object return boolean see determine Should Be White Checked Object protected boolean determine Should Be At Least Gray Checked Object tree Element if any list items associated with tree Element are checked then it retains its gray checked status regardless of its children List checked List checked State Store get tree Element if checked null checked is Empty return true if any children of tree Element are still gray checked then tree Element must remain gray checked as well Only ask expanded nodes if expanded Tree Nodes contains tree Element Object children tree Content Provider get Children tree Element for int i 0 i children length i if checked State Store contains Key children i return true return false  determineShouldBeWhiteChecked treeElement determineShouldBeWhiteChecked determineShouldBeAtLeastGrayChecked treeElement treeElement checkedStateStore treeElement isEmpty treeElement treeElement expandedTreeNodes treeElement treeContentProvider getChildren treeElement checkedStateStore containsKey
Returns a boolean indicating whether the passed tree item should be white checked return boolean param tree Element java lang Object protected boolean determine Should Be White Checked Object tree Element return are All Children White Checked tree Element are All Elements Checked tree Element  treeElement determineShouldBeWhiteChecked treeElement areAllChildrenWhiteChecked treeElement areAllElementsChecked treeElement
Recursively add appropriate tree elements to the collection of known white checked tree elements param tree Element java lang Object protected void determine White Checked Descendents Object tree Element always go through all children first since their white checked statuses will be needed to determine the white checked status for this tree element Object children tree Content Provider get Elements tree Element for int i 0 i children length i determine White Checked Descendents children i now determine the white checked status for this tree element if determine Should Be White Checked tree Element set White Checked tree Element true  treeElement determineWhiteCheckedDescendents treeElement treeContentProvider getElements treeElement determineWhiteCheckedDescendents determineShouldBeWhiteChecked treeElement setWhiteChecked treeElement
Cause the tree viewer to expand all its items public void expand All tree Viewer expand All  expandAll treeViewer expandAll
Busy Indicator show While tree Viewer get Control get Display new Runnable public void run First see if the children need to be given their checked state at all If they ve already been realized then this won t be necessary if expanded Tree Nodes contains item check New Tree Elements tree Content Provider get Children item else expanded Tree Nodes add item if white Checked Tree Items contains item If this is the first expansion and this is a white checked node then check the children Object children tree Content Provider get Children item for int i 0 i children length i if white Checked Tree Items contains children i Object child children i set White Checked child true tree Viewer set Checked child true checked State Store put child new Array List Now be sure to select the list of items too set List For White Selection item  BusyIndicator showWhile treeViewer getControl getDisplay expandedTreeNodes checkNewTreeElements treeContentProvider getChildren expandedTreeNodes whiteCheckedTreeItems treeContentProvider getChildren whiteCheckedTreeItems setWhiteChecked treeViewer setChecked checkedStateStore ArrayList setListForWhiteSelection
Expand an element in a tree viewer private void expand Tree Element final Object item Busy Indicator show While tree Viewer get Control get Display new Runnable public void run First see if the children need to be given their checked state at all If they ve already been realized then this won t be necessary if expanded Tree Nodes contains item check New Tree Elements tree Content Provider get Children item else expanded Tree Nodes add item if white Checked Tree Items contains item If this is the first expansion and this is a white checked node then check the children Object children tree Content Provider get Children item for int i 0 i children length i if white Checked Tree Items contains children i Object child children i set White Checked child true tree Viewer set Checked child true checked State Store put child new Array List Now be sure to select the list of items too set List For White Selection item  expandTreeElement BusyIndicator showWhile treeViewer getControl getDisplay expandedTreeNodes checkNewTreeElements treeContentProvider getChildren expandedTreeNodes whiteCheckedTreeItems treeContentProvider getChildren whiteCheckedTreeItems setWhiteChecked treeViewer setChecked checkedStateStore ArrayList setListForWhiteSelection
Add all of the selected children of next Entry to result recursively This does not set any values in the checked state param The tree Element being queried param add All a boolean to indicate if the checked state store needs to be queried param filter I Element Filter the filter being used on the data param monitor I Progress Monitor or null that the cancel is polled for private void find All Selected List Elements Object tree Element String parent Label boolean add All I Element Filter filter I Progress Monitor monitor throws Interrupted Exception String full Label null if monitor null monitor is Canceled return if monitor null full Label get Full Label tree Element parent Label monitor sub Task full Label if add All filter filter Elements list Content Provider get Elements tree Element monitor else Add what we have stored if checked State Store contains Key tree Element filter filter Elements Collection checked State Store get tree Element monitor Object tree Children tree Content Provider get Children tree Element for int i 0 i tree Children length i Object child tree Children i if add All find All Selected List Elements child full Label true filter monitor else Only continue for those with checked state if checked State Store contains Key child find All Selected List Elements child full Label white Checked Tree Items contains child filter monitor  nextEntry treeElement addAll IElementFilter IProgressMonitor findAllSelectedListElements treeElement parentLabel addAll IElementFilter IProgressMonitor InterruptedException fullLabel isCanceled fullLabel getFullLabel treeElement parentLabel subTask fullLabel addAll filterElements listContentProvider getElements treeElement checkedStateStore containsKey treeElement filterElements checkedStateStore treeElement treeChildren treeContentProvider getChildren treeElement treeChildren treeChildren addAll findAllSelectedListElements fullLabel checkedStateStore containsKey findAllSelectedListElements fullLabel whiteCheckedTreeItems
Find all of the white checked children of the tree Element and add them to the collection If the element itself is white select add it If not then add any selected list elements and recurse down to the children param tree Element java lang Object param result java util Collection private void find All White Checked Items Object tree Element Collection result if white Checked Tree Items contains tree Element result add tree Element else Collection list Children Collection checked State Store get tree Element if it is not in the store then it and it s children are not interesting if list Children null return result add All list Children Object children tree Content Provider get Children tree Element for int i 0 i children length i find All White Checked Items children i result  treeElement treeElement findAllWhiteCheckedItems treeElement whiteCheckedTreeItems treeElement treeElement listChildren checkedStateStore treeElement listChildren addAll listChildren treeContentProvider getChildren treeElement findAllWhiteCheckedItems
Returns a flat list of all of the leaf elements which are checked Filter then based on the supplied Element Filter If monitor is cancelled then return null param filter the filter for the data param monitor I Progress Monitor or null return all of the leaf elements which are checked public void get All Checked List Items I Element Filter filter I Progress Monitor monitor throws Interrupted Exception Iterate through the children of the root as the root is not in the store Object children tree Content Provider get Children root for int i 0 i children length i find All Selected List Elements children i null white Checked Tree Items contains children i filter monitor  ElementFilter IProgressMonitor getAllCheckedListItems IElementFilter IProgressMonitor InterruptedException treeContentProvider getChildren findAllSelectedListElements whiteCheckedTreeItems
I Element Filter pass Through Filter new I Element Filter public void filter Elements Collection elements I Progress Monitor monitor throws Interrupted Exception return Value add All elements  IElementFilter passThroughFilter IElementFilter filterElements IProgressMonitor InterruptedException returnValue addAll
public void filter Elements Object elements I Progress Monitor monitor throws Interrupted Exception for int i 0 i elements length i return Value add elements i  filterElements IProgressMonitor InterruptedException returnValue
Returns a flat list of all of the leaf elements which are checked return all of the leaf elements which are checked This API does not return null in order to keep backwards compatibility public List get All Checked List Items final Array List return Value new Array List I Element Filter pass Through Filter new I Element Filter public void filter Elements Collection elements I Progress Monitor monitor throws Interrupted Exception return Value add All elements public void filter Elements Object elements I Progress Monitor monitor throws Interrupted Exception for int i 0 i elements length i return Value add elements i try get All Checked List Items pass Through Filter null catch Interrupted Exception exception return new Array List return return Value  getAllCheckedListItems ArrayList returnValue ArrayList IElementFilter passThroughFilter IElementFilter filterElements IProgressMonitor InterruptedException returnValue addAll filterElements IProgressMonitor InterruptedException returnValue getAllCheckedListItems passThroughFilter InterruptedException ArrayList returnValue
Returns a list of all of the items that are white checked Any folders that are white checked are added and then any files from white checked folders are added return the list of all of the items that are white checked public List get All White Checked Items List result new Array List Iterate through the children of the root as the root is not in the store Object children tree Content Provider get Children root for int i 0 i children length i find All White Checked Items children i result return result  getAllWhiteCheckedItems ArrayList treeContentProvider getChildren findAllWhiteCheckedItems
Answer the number of elements that have been checked by the user return int public int get Checked Element Count return checked State Store size  getCheckedElementCount checkedStateStore
Get the full label of the tree Element its name and its parent s name param tree Element the element being exported param parent Label the label of the parent can be null return String protected String get Full Label Object tree Element String parent Label String parent Name parent Label if parent Label null parent Name NON NLS 1 if parent Name length 0 parent Name ends With File separator parent Name File separator Char return parent Name tree Label Provider get Text tree Element  treeElement treeElement parentLabel getFullLabel treeElement parentLabel parentName parentLabel parentLabel parentName parentName parentName endsWith parentName separatorChar parentName treeLabelProvider getText treeElement
Return a count of the number of list items associated with a given tree item return int param tree Element java lang Object protected int get List Items Size Object tree Element Object elements list Content Provider get Elements tree Element return elements length  treeElement getListItemsSize treeElement listContentProvider getElements treeElement
Get the table the list viewer uses return org eclipse swt widgets Table public Table get List Table return this list Viewer get Table  getListTable listViewer getTable
Logically gray check all ancestors of tree Item by ensuring that they appear in the checked table protected void gray Check Hierarchy Object tree Element expand the element first to make sure we have populated for it expand Tree Element tree Element if this tree element is already gray then its ancestors all are as well if checked State Store contains Key tree Element return no need to proceed upwards from here checked State Store put tree Element new Array List Object parent tree Content Provider get Parent tree Element if parent null gray Check Hierarchy parent  treeItem grayCheckHierarchy treeElement expandTreeElement treeElement checkedStateStore containsKey treeElement checkedStateStore treeElement ArrayList treeContentProvider getParent treeElement grayCheckHierarchy
Set the checked state of self and all ancestors appropriately Do not white check anyone this is only done down a hierarchy private void gray Update Hierarchy Object tree Element boolean should Be At Least Gray determine Should Be At Least Gray Checked tree Element tree Viewer set Gray Checked tree Element should Be At Least Gray if white Checked Tree Items contains tree Element white Checked Tree Items remove tree Element proceed up the tree element hierarchy Object parent tree Content Provider get Parent tree Element if parent null gray Update Hierarchy parent  grayUpdateHierarchy treeElement shouldBeAtLeastGray determineShouldBeAtLeastGrayChecked treeElement treeViewer setGrayChecked treeElement shouldBeAtLeastGray whiteCheckedTreeItems treeElement whiteCheckedTreeItems treeElement treeContentProvider getParent treeElement grayUpdateHierarchy
Set the initial checked state of the passed list element to true public void initial Check List Item Object element Object parent tree Content Provider get Parent element select And Reveal parent Check the element in the viewer as if it had been manually checked list Viewer set Checked element true As this is not done from the UI then set the box for updating from the selection to false list Item Checked element true false gray Update Hierarchy parent  initialCheckListItem treeContentProvider getParent selectAndReveal listViewer setChecked listItemChecked grayUpdateHierarchy
Set the initial checked state of the passed element to true as well as to all of its children and associated list elements public void initial Check Tree Item Object element tree Item Checked element true select And Reveal element  initialCheckTreeItem treeItemChecked selectAndReveal
private void select And Reveal Object tree Element tree Viewer reveal tree Element I Structured Selection selection new Structured Selection tree Element tree Viewer set Selection selection  selectAndReveal treeElement treeViewer treeElement IStructuredSelection StructuredSelection treeElement treeViewer setSelection
Initialize this group s viewers after they have been laid out protected void initialize tree Viewer set Input root this expanded Tree Nodes new Array List this expanded Tree Nodes add root  treeViewer setInput expandedTreeNodes ArrayList expandedTreeNodes
Callback that s invoked when the checked status of an item in the list is changed by the user Do not try and update the hierarchy if we are building the initial list protected void list Item Checked Object list Element boolean state boolean updating From Selection List checked List Items List checked State Store get current Tree Selection If it has not been expanded do so as the selection of list items will affect gray state if expanded Tree Nodes contains current Tree Selection expand Tree Element current Tree Selection if state if checked List Items null since the associated tree item has gone from 0 1 checked list items tree checking may need to be updated gray Check Hierarchy current Tree Selection checked List Items List checked State Store get current Tree Selection checked List Items add list Element else checked List Items remove list Element if checked List Items is Empty since the associated tree item has gone from 1 0 checked list items tree checking may need to be updated ungray Check Hierarchy current Tree Selection Update the list with the selections if there are any if checked List Items size 0 checked State Store put current Tree Selection checked List Items if updating From Selection gray Update Hierarchy current Tree Selection  listItemChecked listElement updatingFromSelection checkedListItems checkedStateStore currentTreeSelection expandedTreeNodes currentTreeSelection expandTreeElement currentTreeSelection checkedListItems grayCheckHierarchy currentTreeSelection checkedListItems checkedStateStore currentTreeSelection checkedListItems listElement checkedListItems listElement checkedListItems isEmpty ungrayCheckHierarchy currentTreeSelection checkedListItems checkedStateStore currentTreeSelection checkedListItems updatingFromSelection grayUpdateHierarchy currentTreeSelection
final I Check State Listener l I Check State Listener array i Platform run new Safe Runnable public void run l check State Changed event  ICheckStateListener ICheckStateListener SafeRunnable checkStateChanged
Notify all checked state listeners that the passed element has had its checked state changed to the passed state protected void notify Check State Change Listeners final Check State Changed Event event Object array listeners get Listeners for int i 0 i array length i final I Check State Listener l I Check State Listener array i Platform run new Safe Runnable public void run l check State Changed event  notifyCheckStateChangeListeners CheckStateChangedEvent getListeners ICheckStateListener ICheckStateListener SafeRunnable checkStateChanged
Potentially long operation show a busy cursor Busy Indicator show While tree Viewer get Control get Display new Runnable public void run set List For White Selection tree Element list Viewer set All Checked true  BusyIndicator showWhile treeViewer getControl getDisplay setListForWhiteSelection treeElement listViewer setAllChecked
Set the contents of the list viewer based upon the specified selected tree element This also includes checking the appropriate list items param tree Element java lang Object protected void populate List Viewer final Object tree Element list Viewer set Input tree Element If the element is white checked but not expanded we have not set up all of the children yet if expanded Tree Nodes contains tree Element white Checked Tree Items contains tree Element Potentially long operation show a busy cursor Busy Indicator show While tree Viewer get Control get Display new Runnable public void run set List For White Selection tree Element list Viewer set All Checked true else List list Items To Check List checked State Store get tree Element if list Items To Check null Iterator list Items Enum list Items To Check iterator while list Items Enum has Next list Viewer set Checked list Items Enum next true  treeElement populateListViewer treeElement listViewer setInput treeElement expandedTreeNodes treeElement whiteCheckedTreeItems treeElement BusyIndicator showWhile treeViewer getControl getDisplay setListForWhiteSelection treeElement listViewer setAllChecked listItemsToCheck checkedStateStore treeElement listItemsToCheck listItemsEnum listItemsToCheck listItemsEnum hasNext listViewer setChecked listItemsEnum
Logically gray check all ancestors of tree Item by ensuring that they appear in the checked table Add any elements to the selected Nodes so we can track that has been done private void prime Hierarchy For Selection Object item Set selected Nodes Only prime it if we haven t visited yet if selected Nodes contains item return checked State Store put item new Array List mark as expanded as we are going to populate it after this expanded Tree Nodes add item selected Nodes add item Object parent tree Content Provider get Parent item if parent null prime Hierarchy For Selection parent selected Nodes  treeItem selectedNodes primeHierarchyForSelection selectedNodes selectedNodes checkedStateStore ArrayList expandedTreeNodes selectedNodes treeContentProvider getParent primeHierarchyForSelection selectedNodes
Remove the passed listener from self s collection of clients that listen for changes to element checked states param listener I Check State Listener public void remove Check State Listener I Check State Listener listener listeners remove listener  ICheckStateListener removeCheckStateListener ICheckStateListener
Handle the selection of an item in the tree viewer param event Selection Changed Event public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection Object selected Element selection get First Element if selected Element null current Tree Selection null list Viewer set Input current Tree Selection return ie if not an item deselection if selected Element current Tree Selection populate List Viewer selected Element current Tree Selection selected Element  SelectionChangedEvent selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection selectedElement getFirstElement selectedElement currentTreeSelection listViewer setInput currentTreeSelection selectedElement currentTreeSelection populateListViewer selectedElement currentTreeSelection selectedElement
Potentially long operation show a busy cursor Busy Indicator show While tree Viewer get Control get Display new Runnable public void run set Tree Checked root selection list Viewer set All Checked selection  BusyIndicator showWhile treeViewer getControl getDisplay setTreeChecked listViewer setAllChecked
Select or deselect all of the elements in the tree depending on the value of the selection boolean Be sure to update the displayed files as well public void set All Selections final boolean selection If there is no root there is nothing to select if root null return Potentially long operation show a busy cursor Busy Indicator show While tree Viewer get Control get Display new Runnable public void run set Tree Checked root selection list Viewer set All Checked selection  setAllSelections BusyIndicator showWhile treeViewer getControl getDisplay setTreeChecked listViewer setAllChecked
The tree Element has been white selected Get the list for the element and set it in the checked state store param tree Element the element being updated private void set List For White Selection Object tree Element Object list Items list Content Provider get Elements tree Element List list Items Checked new Array List for int i 0 i list Items length i list Items Checked add list Items i checked State Store put tree Element list Items Checked  treeElement treeElement setListForWhiteSelection treeElement listItems listContentProvider getElements treeElement listItemsChecked ArrayList listItems listItemsChecked listItems checkedStateStore treeElement listItemsChecked
Set the list viewer s providers to those passed param content Provider I Tree Content Provider param label Provider I Label Provider public void set List Providers I Structured Content Provider content Provider I Label Provider label Provider list Viewer set Content Provider content Provider list Viewer set Label Provider label Provider  contentProvider ITreeContentProvider labelProvider ILabelProvider setListProviders IStructuredContentProvider contentProvider ILabelProvider labelProvider listViewer setContentProvider contentProvider listViewer setLabelProvider labelProvider
Set the sorter that is to be applied to self s list viewer public void set List Sorter Viewer Sorter sorter list Viewer set Sorter sorter  setListSorter ViewerSorter listViewer setSorter
Set the root of the widget to be new Root Regenerate all of the tables and lists from this value param new Root public void set Root Object new Root this root new Root initialize  newRoot setRoot newRoot newRoot
Set the checked state of the passed tree element appropriately and do so recursively to all of its child tree elements as well protected void set Tree Checked Object tree Element boolean state if tree Element equals current Tree Selection list Viewer set All Checked state if state set List For White Selection tree Element else checked State Store remove tree Element set White Checked tree Element state tree Viewer set Checked tree Element state tree Viewer set Grayed tree Element false now logically check uncheck all children as well if it has been expanded if expanded Tree Nodes contains tree Element Object children tree Content Provider get Children tree Element for int i 0 i children length i set Tree Checked children i state  setTreeChecked treeElement treeElement currentTreeSelection listViewer setAllChecked setListForWhiteSelection treeElement checkedStateStore treeElement setWhiteChecked treeElement treeViewer setChecked treeElement treeViewer setGrayed treeElement expandedTreeNodes treeElement treeContentProvider getChildren treeElement setTreeChecked
Set the tree viewer s providers to those passed param content Provider I Tree Content Provider param label Provider I Label Provider public void set Tree Providers I Tree Content Provider content Provider I Label Provider label Provider tree Viewer set Content Provider content Provider tree Viewer set Label Provider label Provider  contentProvider ITreeContentProvider labelProvider ILabelProvider setTreeProviders ITreeContentProvider contentProvider ILabelProvider labelProvider treeViewer setContentProvider contentProvider treeViewer setLabelProvider labelProvider
Set the sorter that is to be applied to self s tree viewer public void set Tree Sorter Viewer Sorter sorter tree Viewer set Sorter sorter  setTreeSorter ViewerSorter treeViewer setSorter
Adjust the collection of references to white checked tree elements appropriately param tree Element java lang Object param is White Checked boolean protected void set White Checked Object tree Element boolean is White Checked if is White Checked if white Checked Tree Items contains tree Element white Checked Tree Items add tree Element else white Checked Tree Items remove tree Element  treeElement isWhiteChecked setWhiteChecked treeElement isWhiteChecked isWhiteChecked whiteCheckedTreeItems treeElement whiteCheckedTreeItems treeElement whiteCheckedTreeItems treeElement
Handle the collapsing of an element in a tree viewer public void tree Collapsed Tree Expansion Event event We don t need to do anything with this  treeCollapsed TreeExpansionEvent
Handle the expansionsion of an element in a tree viewer public void tree Expanded Tree Expansion Event event expand Tree Element event get Element  treeExpanded TreeExpansionEvent expandTreeElement getElement
Callback that s invoked when the checked status of an item in the tree is changed by the user protected void tree Item Checked Object tree Element boolean state recursively adjust all child tree elements appropriately set Tree Checked tree Element state Object parent tree Content Provider get Parent tree Element if parent null return now update upwards in the tree hierarchy if state gray Check Hierarchy parent else ungray Check Hierarchy parent Update the hierarchy but do not white select the parent gray Update Hierarchy parent  treeItemChecked treeElement setTreeChecked treeElement treeContentProvider getParent treeElement grayCheckHierarchy ungrayCheckHierarchy grayUpdateHierarchy
Logically un gray check all ancestors of tree Item iff appropriate protected void ungray Check Hierarchy Object tree Element if determine Should Be At Least Gray Checked tree Element checked State Store remove tree Element Object parent tree Content Provider get Parent tree Element if parent null ungray Check Hierarchy parent  treeItem ungrayCheckHierarchy treeElement determineShouldBeAtLeastGrayChecked treeElement checkedStateStore treeElement treeContentProvider getParent treeElement ungrayCheckHierarchy
Set the checked state of self and all ancestors appropriately protected void update Hierarchy Object tree Element boolean white Checked determine Should Be White Checked tree Element boolean should Be At Least Gray determine Should Be At Least Gray Checked tree Element tree Viewer set Checked tree Element should Be At Least Gray set White Checked tree Element white Checked if white Checked tree Viewer set Grayed tree Element false else tree Viewer set Grayed tree Element should Be At Least Gray proceed up the tree element hierarchy but gray select all of them Object parent tree Content Provider get Parent tree Element if parent null gray Update Hierarchy parent  updateHierarchy treeElement whiteChecked determineShouldBeWhiteChecked treeElement shouldBeAtLeastGray determineShouldBeAtLeastGrayChecked treeElement treeViewer setChecked treeElement shouldBeAtLeastGray setWhiteChecked treeElement whiteChecked whiteChecked treeViewer setGrayed treeElement treeViewer setGrayed treeElement shouldBeAtLeastGray treeContentProvider getParent treeElement grayUpdateHierarchy
Update the selections of the tree elements in items to reflect the new selections provided param items Map with keys of Object the tree element and values of List the selected list elements NOTE This method does not special case keys with no values i e a tree element with an empty list If a tree element does not have any selected items do not include the element in the Map public void update Selections Map items We are replacing all selected items with the given selected items so reinitialize everything this list Viewer set All Checked false this tree Viewer set Checked Elements new Object 0 this white Checked Tree Items new Hash Set Set selected Nodes new Hash Set checked State Store new Hash Map Update the store before the hierarchy to prevent updating parents before all of the children are done Iterator key Iterator items key Set iterator while key Iterator has Next Object key key Iterator next List selections List items get key Replace the items in the checked state store with those from the supplied items checked State Store put key selections selected Nodes add key proceed up the tree element hierarchy Object parent tree Content Provider get Parent key if parent null proceed up the tree element hierarchy and make sure everything is in the table prime Hierarchy For Selection parent selected Nodes Update the checked tree items Since each tree item has a selected item all the tree items will be gray checked tree Viewer set Checked Elements checked State Store key Set to Array tree Viewer set Grayed Elements checked State Store key Set to Array Update the list View of the currently selected tree item if current Tree Selection null Object display Items items get current Tree Selection if display Items null list Viewer set Checked Elements List display Items to Array  updateSelections listViewer setAllChecked treeViewer setCheckedElements whiteCheckedTreeItems HashSet selectedNodes HashSet checkedStateStore HashMap keyIterator keySet keyIterator hasNext keyIterator checkedStateStore selectedNodes treeContentProvider getParent primeHierarchyForSelection selectedNodes treeViewer setCheckedElements checkedStateStore keySet toArray treeViewer setGrayedElements checkedStateStore keySet toArray listView currentTreeSelection displayItems currentTreeSelection displayItems listViewer setCheckedElements displayItems toArray
Set the focus on to the list widget public void set Focus this tree Viewer get Tree set Focus  setFocus treeViewer getTree setFocus

Creates a new instance of the receiver public Resource Working Set Page super resource Working Set Page NON NLS 1 IDE Workbench Messages get String Resource Working Set Page title NON NLS 1 IDE Internal Workbench Images get Image Descriptor IDE Internal Workbench Images IMG WIZBAN RESOURCEWORKINGSET WIZ set Description IDE Workbench Messages get String Resource Working Set Page description NON NLS 1  ResourceWorkingSetPage resourceWorkingSetPage IDEWorkbenchMessages getString ResourceWorkingSetPage IDEInternalWorkbenchImages getImageDescriptor IDEInternalWorkbenchImages IMG_WIZBAN_RESOURCEWORKINGSET_WIZ setDescription IDEWorkbenchMessages getString ResourceWorkingSetPage
Adds working set elements contained in the given container to the list of checked resources param collected Resources list of collected resources param container container to collect working set elements for private void add Working Set Elements List collected Resources I Container container I Adaptable elements working Set get Elements I Path container Path container get Full Path for int i 0 i elements length i I Resource resource null if elements i instanceof I Resource resource I Resource elements i else resource I Resource elements i get Adapter I Resource class if resource null I Path resource Path resource get Full Path if container Path is Prefix Of resource Path collected Resources add elements i  collectedResources addWorkingSetElements collectedResources IContainer IAdaptable workingSet getElements IPath containerPath getFullPath IResource IResource IResource IResource getAdapter IResource IPath resourcePath getFullPath containerPath isPrefixOf resourcePath collectedResources
text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Input  addModifyListener ModifyListener modifyText ModifyEvent validateInput
tree add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event handle Check State Change event  addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent handleCheckStateChange
tree add Tree Listener new I Tree Viewer Listener public void tree Collapsed Tree Expansion Event event  addTreeListener ITreeViewerListener treeCollapsed TreeExpansionEvent
if tree get Grayed element false Busy Indicator show While get Shell get Display new Runnable public void run set Subtree Checked I Container element tree get Checked element false  getGrayed BusyIndicator showWhile getShell getDisplay setSubtreeChecked IContainer getChecked
public void tree Expanded Tree Expansion Event event final Object element event get Element if tree get Grayed element false Busy Indicator show While get Shell get Display new Runnable public void run set Subtree Checked I Container element tree get Checked element false  treeExpanded TreeExpansionEvent getElement getGrayed BusyIndicator showWhile getShell getDisplay setSubtreeChecked IContainer getChecked
Overrides method in Wizard Page see org eclipse jface wizard Wizard Page create Control Composite public void create Control Composite parent Font font parent get Font Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL set Control composite Workbench Help set Help composite I Help Context Ids WORKING SET RESOURCE PAGE Label label new Label composite SWT WRAP label set Text IDE Workbench Messages get String Resource Working Set Page message NON NLS 1 Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER label set Layout Data data label set Font font text new Text composite SWT SINGLE SWT BORDER text set Layout Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL text set Font font text add Modify Listener new Modify Listener public void modify Text Modify Event e validate Input text set Focus label new Label composite SWT WRAP label set Text IDE Workbench Messages get String Resource Working Set Page label tree NON NLS 1 data new Grid Data Grid Data GRAB HORIZONTAL Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN CENTER label set Layout Data data label set Font font tree new Checkbox Tree Viewer composite tree set Use Hashlookup true tree set Content Provider new Workbench Content Provider tree set Label Provider new Decorating Label Provider new Workbench Label Provider IDE Workbench Plugin get Default get Workbench get Decorator Manager get Label Decorator tree set Input IDE Workbench Plugin get Plugin Workspace get Root tree set Sorter new Resource Sorter Resource Sorter NAME data new Grid Data Grid Data FILL BOTH Grid Data GRAB VERTICAL data height Hint SIZING SELECTION WIDGET HEIGHT data width Hint SIZING SELECTION WIDGET WIDTH tree get Control set Layout Data data tree get Control set Font font tree add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event handle Check State Change event tree add Tree Listener new I Tree Viewer Listener public void tree Collapsed Tree Expansion Event event public void tree Expanded Tree Expansion Event event final Object element event get Element if tree get Grayed element false Busy Indicator show While get Shell get Display new Runnable public void run set Subtree Checked I Container element tree get Checked element false initialize Checked State if working Set null text set Text working Set get Name set Page Complete false  WizardPage WizardPage createControl createControl getFont setLayout GridLayout setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL setControl WorkbenchHelp setHelp IHelpContextIds WORKING_SET_RESOURCE_PAGE setText IDEWorkbenchMessages getString ResourceWorkingSetPage GridData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER setLayoutData setFont setLayoutData GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL setFont addModifyListener ModifyListener modifyText ModifyEvent validateInput setFocus setText IDEWorkbenchMessages getString ResourceWorkingSetPage GridData GridData GRAB_HORIZONTAL GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_CENTER setLayoutData setFont CheckboxTreeViewer setUseHashlookup setContentProvider WorkbenchContentProvider setLabelProvider DecoratingLabelProvider WorkbenchLabelProvider IDEWorkbenchPlugin getDefault getWorkbench getDecoratorManager getLabelDecorator setInput IDEWorkbenchPlugin getPluginWorkspace getRoot setSorter ResourceSorter ResourceSorter GridData GridData FILL_BOTH GridData GRAB_VERTICAL heightHint SIZING_SELECTION_WIDGET_HEIGHT widthHint SIZING_SELECTION_WIDGET_WIDTH getControl setLayoutData getControl setFont addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent handleCheckStateChange addTreeListener ITreeViewerListener treeCollapsed TreeExpansionEvent treeExpanded TreeExpansionEvent getElement getGrayed BusyIndicator showWhile getShell getDisplay setSubtreeChecked IContainer getChecked initializeCheckedState workingSet setText workingSet getName setPageComplete
Collects all checked resources in the specified container param checked Resources the output list of checked resources param container the container to collect checked resources in private void find Checked Resources List checked Resources I Container container I Resource resources null try resources container members catch Core Exception ex handle Core Exception ex get Shell IDE Workbench Messages get String Resource Working Set Page error NON NLS 1 IDE Workbench Messages get String Resource Working Set Page error update Checked State NON NLS 1 for int i 0 i resources length i if tree get Grayed resources i if resources i is Accessible find Checked Resources checked Resources I Container resources i else add Working Set Elements checked Resources I Container resources i else if tree get Checked resources i checked Resources add resources i  checkedResources findCheckedResources checkedResources IContainer IResource CoreException handleCoreException getShell IDEWorkbenchMessages getString ResourceWorkingSetPage IDEWorkbenchMessages getString ResourceWorkingSetPage updateCheckedState getGrayed isAccessible findCheckedResources checkedResources IContainer addWorkingSetElements checkedResources IContainer getChecked checkedResources
Implements I Working Set Page see org eclipse ui dialogs I Working Set Page finish public void finish Array List resources new Array List 10 find Checked Resources resources I Container tree get Input if working Set null I Working Set Manager working Set Manager PlatformUI get Workbench get Working Set Manager working Set working Set Manager create Working Set get Working Set Name I Adaptable resources to Array new I Adaptable resources size else working Set set Name get Working Set Name working Set set Elements I Adaptable resources to Array new I Adaptable resources size  IWorkingSetPage IWorkingSetPage ArrayList ArrayList findCheckedResources IContainer getInput workingSet IWorkingSetManager workingSetManager getWorkbench getWorkingSetManager workingSet workingSetManager createWorkingSet getWorkingSetName IAdaptable toArray IAdaptable workingSet setName getWorkingSetName workingSet setElements IAdaptable toArray IAdaptable
Implements I Working Set Page see org eclipse ui dialogs I Working Set Page get Selection public I Working Set get Selection return working Set  IWorkingSetPage IWorkingSetPage getSelection IWorkingSet getSelection workingSet
Returns the name entered in the working set name field return the name entered in the working set name field private String get Working Set Name return text get Text  getWorkingSetName getText
Busy Indicator show While get Shell get Display new Runnable public void run I Resource resource I Resource event get Element boolean state event get Checked tree set Grayed resource false if resource instanceof I Container set Subtree Checked I Container resource state true update Parent State resource validate Input  BusyIndicator showWhile getShell getDisplay IResource IResource getElement getChecked setGrayed IContainer setSubtreeChecked IContainer updateParentState validateInput
Called when the checked state of a tree item changes param event the checked state change event private void handle Check State Change final Check State Changed Event event Busy Indicator show While get Shell get Display new Runnable public void run I Resource resource I Resource event get Element boolean state event get Checked tree set Grayed resource false if resource instanceof I Container set Subtree Checked I Container resource state true update Parent State resource validate Input  handleCheckStateChange CheckStateChangedEvent BusyIndicator showWhile getShell getDisplay IResource IResource getElement getChecked setGrayed IContainer setSubtreeChecked IContainer updateParentState validateInput
Displays an error message when a Core Exception occured param exception the Core Exception param shell parent shell for the message box param title the mesage box title param message additional error message private void handle Core Exception Core Exception exception Shell shell String title String message I Status status exception get Status if status null Error Dialog open Error shell title message status else Message Dialog open Error shell IDE Workbench Messages get String Internal Error exception get Localized Message NON NLS 1  CoreException CoreException handleCoreException CoreException IStatus getStatus ErrorDialog openError MessageDialog openError IDEWorkbenchMessages getString InternalError getLocalizedMessage
Busy Indicator show While get Shell get Display new Runnable public void run I Adaptable items working Set get Elements tree set Checked Elements items for int i 0 i items length i I Adaptable item items i I Container container null I Resource resource null if item instanceof I Container container I Container item else container I Container item get Adapter I Container class if container null set Subtree Checked container true true if item instanceof I Resource resource I Resource item else resource I Resource item get Adapter I Resource class if resource null resource is Accessible false I Project project resource get Project if tree get Checked project false tree set Gray Checked project true else update Parent State resource  BusyIndicator showWhile getShell getDisplay IAdaptable workingSet getElements setCheckedElements IAdaptable IContainer IResource IContainer IContainer IContainer getAdapter IContainer setSubtreeChecked IResource IResource IResource getAdapter IResource isAccessible IProject getProject getChecked setGrayChecked updateParentState
Sets the checked state of tree items based on the initial working set if any private void initialize Checked State if working Set null return Busy Indicator show While get Shell get Display new Runnable public void run I Adaptable items working Set get Elements tree set Checked Elements items for int i 0 i items length i I Adaptable item items i I Container container null I Resource resource null if item instanceof I Container container I Container item else container I Container item get Adapter I Container class if container null set Subtree Checked container true true if item instanceof I Resource resource I Resource item else resource I Resource item get Adapter I Resource class if resource null resource is Accessible false I Project project resource get Project if tree get Checked project false tree set Gray Checked project true else update Parent State resource  initializeCheckedState workingSet BusyIndicator showWhile getShell getDisplay IAdaptable workingSet getElements setCheckedElements IAdaptable IContainer IResource IContainer IContainer IContainer getAdapter IContainer setSubtreeChecked IResource IResource IResource getAdapter IResource isAccessible IProject getProject getChecked setGrayChecked updateParentState
Implements I Working Set Page see org eclipse ui dialogs I Working Set Page set Selection I Working Set public void set Selection I Working Set working Set if working Set null throw new Illegal Argument Exception Working set must not be null NON NLS 1 this working Set working Set if get Shell null text null first Check true initialize Checked State text set Text working Set get Name  IWorkingSetPage IWorkingSetPage setSelection IWorkingSet setSelection IWorkingSet workingSet workingSet IllegalArgumentException workingSet workingSet getShell firstCheck initializeCheckedState setText workingSet getName
Sets the checked state of the container s members param container the container whose children should be checked unchecked param state true check all members in the container false uncheck all members in the container param check Expanded State true recurse into sub containers and set the checked state false only set checked state of members of this container private void set Subtree Checked I Container container boolean state boolean check Expanded State checked state is set lazily on expand don t set it if container is collapsed if container is Accessible false tree get Expanded State container false state check Expanded State return I Resource members null try members container members catch Core Exception ex handle Core Exception ex get Shell IDE Workbench Messages get String Resource Working Set Page error NON NLS 1 IDE Workbench Messages get String Resource Working Set Page error update Checked State NON NLS 1 for int i members length 1 i 0 i I Resource element members i boolean element Gray Checked tree get Grayed element tree get Checked element if state tree set Checked element true tree set Grayed element false else tree set Gray Checked element false unchecked state only needs to be set when the container is checked or grayed if element instanceof I Container state element Gray Checked set Subtree Checked I Container element state true  checkExpandedState setSubtreeChecked IContainer checkExpandedState isAccessible getExpandedState checkExpandedState IResource CoreException handleCoreException getShell IDEWorkbenchMessages getString ResourceWorkingSetPage IDEWorkbenchMessages getString ResourceWorkingSetPage updateCheckedState IResource elementGrayChecked getGrayed getChecked setChecked setGrayed setGrayChecked IContainer elementGrayChecked setSubtreeChecked IContainer
Check and gray the resource parent if all resources of the parent are checked param child the resource whose parent checked state should be set private void update Parent State I Resource child if child null child get Parent null return I Container parent child get Parent boolean child Checked false I Resource members null try members parent members catch Core Exception ex handle Core Exception ex get Shell IDE Workbench Messages get String Resource Working Set Page error NON NLS 1 IDE Workbench Messages get String Resource Working Set Page error update Checked State NON NLS 1 for int i members length 1 i 0 i if tree get Checked members i tree get Grayed members i child Checked true break tree set Gray Checked parent child Checked update Parent State parent  updateParentState IResource getParent IContainer getParent childChecked IResource CoreException handleCoreException getShell IDEWorkbenchMessages getString ResourceWorkingSetPage IDEWorkbenchMessages getString ResourceWorkingSetPage updateCheckedState getChecked getGrayed childChecked setGrayChecked childChecked updateParentState
Validates the working set name and the checked state of the resource tree private void validate Input String error Message null NON NLS 1 String new Text text get Text if new Text equals new Text trim false error Message IDE Workbench Messages get String Resource Working Set Page warning name Whitespace NON NLS 1 else if first Check first Check false return if new Text equals NON NLS 1 error Message IDE Workbench Messages get String Resource Working Set Page warning name Must Not Be Empty NON NLS 1 if error Message null working Set null new Text equals working Set get Name false I Working Set working Sets PlatformUI get Workbench get Working Set Manager get Working Sets for int i 0 i working Sets length i if new Text equals working Sets i get Name error Message IDE Workbench Messages get String Resource Working Set Page warning working Set Exists NON NLS 1 if error Message null tree get Checked Elements length 0 error Message IDE Workbench Messages get String Resource Working Set Page warning resource Must Be Checked NON NLS 1 set Error Message error Message set Page Complete error Message null  validateInput errorMessage newText getText newText newText errorMessage IDEWorkbenchMessages getString ResourceWorkingSetPage nameWhitespace firstCheck firstCheck newText errorMessage IDEWorkbenchMessages getString ResourceWorkingSetPage nameMustNotBeEmpty errorMessage workingSet newText workingSet getName IWorkingSet workingSets getWorkbench getWorkingSetManager getWorkingSets workingSets newText workingSets getName errorMessage IDEWorkbenchMessages getString ResourceWorkingSetPage workingSetExists errorMessage getCheckedElements errorMessage IDEWorkbenchMessages getString ResourceWorkingSetPage resourceMustBeChecked setErrorMessage errorMessage setPageComplete errorMessage

Simple List Content Provider constructor comment public Simple List Content Provider super  SimpleListContentProvider SimpleListContentProvider
super Do nothing when disposing public void dispose 
public void dispose Returns the elements to display in the viewer The input Element is ignored for this provider public Object get Elements Object input Element return this elements  inputElement getElements inputElement
Required method from I Structured Content Provider The input is assumed to not change for the Simple List Content Viewer so do nothing here  IStructuredContentProvider SimpleListContentViewer
public void input Changed Viewer viewer Object old Input Object new Input Set the elements to display param items Object public void set Elements Object items this elements items  inputChanged oldInput newInput setElements

Creates a wizard param project the project to configure new capabilities param add Capabilities the new capabilities to configure on the project param remove Capabilities the old capabilities to remove from the project in reverse order first item last to be removed public Update Project Capability Wizard I Project project Capability add Capabilities Capability remove Capabilities super this project project this add Capabilities add Capabilities this remove Capabilities remove Capabilities initialize Default Page Image Descriptor set Window Title IDE Workbench Messages get String Update Project Capability Wizard window Title NON NLS 1  addCapabilities removeCapabilities UpdateProjectCapabilityWizard IProject addCapabilities removeCapabilities addCapabilities addCapabilities removeCapabilities removeCapabilities initializeDefaultPageImageDescriptor setWindowTitle IDEWorkbenchMessages getString UpdateProjectCapabilityWizard windowTitle
Builds the collection of steps private void build Steps int step Number 1 Array List steps new Array List remove Capabilities length add Capabilities length collect the minimum remove capability steps if remove Capabilities length 0 Reserve the order so prereq aren t removed before dependents for int i remove Capabilities length 1 i 0 i if remove Capabilities i null Collect all the nature ids this capability should remove Includes itself and any ones that it handles the ui for Array List nature Ids new Array List nature Ids add remove Capabilities i get Nature Id Array List ui Ids remove Capabilities i get HandleU Is if ui Ids null Iterator enum ui Ids iterator while enum has Next String id String enum next for int j 0 j remove Capabilities length j if remove Capabilities j null if remove Capabilities j get Id equals id nature Ids add remove Capabilities j get Nature Id remove Capabilities j null Create a step to remove this capability and prereq natures String ids new String nature Ids size nature Ids to Array ids steps add new Remove Capability Step step Number remove Capabilities i ids project step Number Collect the minimum add capability steps if add Capabilities length 0 I Workbench workbench PlatformUI get Workbench Capability Registry reg IDE Workbench Plugin get Default get Capability Registry Capability results reg prune Capabilities add Capabilities for int i 0 i results length i step Number steps add new Install Capability Step step Number results i workbench this Set the list of steps to do Wizard Step results new Wizard Step steps size steps to Array results set Steps results  buildSteps stepNumber ArrayList ArrayList removeCapabilities addCapabilities removeCapabilities removeCapabilities removeCapabilities ArrayList natureIds ArrayList natureIds removeCapabilities getNatureId ArrayList uiIds removeCapabilities getHandleUIs uiIds uiIds hasNext removeCapabilities removeCapabilities removeCapabilities getId natureIds removeCapabilities getNatureId removeCapabilities natureIds natureIds toArray RemoveCapabilityStep stepNumber removeCapabilities stepNumber addCapabilities IWorkbench getWorkbench CapabilityRegistry IDEWorkbenchPlugin getDefault getCapabilityRegistry pruneCapabilities addCapabilities stepNumber InstallCapabilityStep stepNumber WizardStep WizardStep toArray setSteps
Method declared on Multi Step Wizard protected void add Custom Pages  MultiStepWizard addCustomPages
protected boolean can Finish On Review Page Wizard Step steps get Steps yes if the only step is to remove capabilities return steps length 1 steps 0 instanceof Remove Capability Step  canFinishOnReviewPage WizardStep getSteps RemoveCapabilityStep
Method declared on Multi Step Wizard protected String get Configure Page Title return IDE Workbench Messages get String Update Project Capability Wizard title NON NLS 1  MultiStepWizard getConfigurePageTitle IDEWorkbenchMessages getString UpdateProjectCapabilityWizard
Method declared on Multi Step Wizard protected String get Configure Page Description return IDE Workbench Messages get String Wizard Project Configure Page description NON NLS 1  MultiStepWizard getConfigurePageDescription IDEWorkbenchMessages getString WizardProjectConfigurePage
protected String get Finish Step Label Wizard Step steps int count 0 for int i 0 i steps length i if steps i instanceof Remove Capability Step count if count 1 return super get Finish Step Label steps return null  getFinishStepLabel WizardStep RemoveCapabilityStep getFinishStepLabel
protected String get Perspective Choices Array List results new Array List for int i 0 i add Capabilities length i Array List ids add Capabilities i get Perspective Choices if ids null Iterator enum ids iterator while enum has Next String id String enum next if results contains id results add id String ids new String results size results to Array ids return ids  getPerspectiveChoices ArrayList ArrayList addCapabilities ArrayList addCapabilities getPerspectiveChoices hasNext toArray
Method declared on I Project Provider public I Project get Project return project  IProjectProvider IProject getProject
Method declared on Multi Step Wizard protected String get Review Page Title return IDE Workbench Messages get String Update Project Capability Wizard title NON NLS 1  MultiStepWizard getReviewPageTitle IDEWorkbenchMessages getString UpdateProjectCapabilityWizard
Method declared on Multi Step Wizard protected String get Review Page Description return IDE Workbench Messages get String Wizard Project Review Page description NON NLS 1  MultiStepWizard getReviewPageDescription IDEWorkbenchMessages getString WizardProjectReviewPage
public I Wizard Page get Starting Page I Wizard Page page super get Starting Page build Steps return page  IWizardPage getStartingPage IWizardPage getStartingPage buildSteps
package boolean handle Missing Step Wizard Wizard Step step Message Dialog open Error get Shell IDE Workbench Messages get String Update Project Capability Wizard error Title NON NLS 1 IDE Workbench Messages format Update Project Capability Wizard no Wizard new Object step get Label NON NLS 1 return false  handleMissingStepWizard WizardStep MessageDialog openError getShell IDEWorkbenchMessages getString UpdateProjectCapabilityWizard errorTitle IDEWorkbenchMessages UpdateProjectCapabilityWizard noWizard getLabel
Sets the image banner for the wizard protected void initialize Default Page Image Descriptor String icon Path icons full NON NLS 1 try issue when icons move to IDE need to update the following URL installURL Platform get Plugin PlatformUI PLUGIN ID get Descriptor get InstallURL URL url new URL installURL icon Path wizban newprj wiz gif NON NLS 1 Image Descriptor desc Image Descriptor create FromURL url set Default Page Image Descriptor desc catch MalformedURL Exception e Should not happen Ignore  initializeDefaultPageImageDescriptor iconPath getPlugin PLUGIN_ID getDescriptor getInstallURL iconPath newprj_wiz ImageDescriptor ImageDescriptor createFromURL setDefaultPageImageDescriptor MalformedURLException

Create a new instance of the welcome editor public Welcome Editor super set Part Name IDE Workbench Messages get String Welcome Editor title NON NLS 1 copy Action new Welcome Editor Copy Action this copy Action set Enabled false  WelcomeEditor setPartName IDEWorkbenchMessages getString WelcomeEditor copyAction WelcomeEditorCopyAction copyAction setEnabled
Update the welcome page to start at the beginning of the text private void focus On Styled Text new Text int caret Offset if new Text null return new Text set Focus new Text set Caret Offset caret Offset scrolled Composite set Origin 0 new Text get Location y  focusOn StyledText newText caretOffset newText newText setFocus newText setCaretOffset caretOffset scrolledComposite setOrigin newText getLocation
Finds the next text private Styled Text next Text Styled Text text int index 0 if text null return Styled Text texts get 0 else index texts index Of text If we are not at the end if index texts size 1 return Styled Text texts get index 1 else return Styled Text texts get 0  StyledText nextText StyledText StyledText indexOf StyledText StyledText
Finds the previous text private Styled Text previous Text Styled Text text int index 0 if text null return Styled Text texts get 0 else index texts index Of text If we are at the beginning if index 0 return Styled Text texts get texts size 1 else return Styled Text texts get index 1  StyledText previousText StyledText StyledText indexOf StyledText StyledText
Returns the current text protected Styled Text get Current Text return current Text  StyledText getCurrentText currentText
Returns the copy action protected Welcome Editor Copy Action get Copy Action return copy Action  WelcomeEditorCopyAction getCopyAction copyAction
Finds the next link after the current selection private Style Range find Next Link Styled Text text if text null return null Welcome Item item Welcome Item text get Data Style Range ranges text get Style Ranges int current Selection End text get Selection y for int i 0 i ranges length i if ranges i start current Selection End if item is Link At ranges i start return ranges i return null  StyleRange findNextLink StyledText WelcomeItem WelcomeItem getData StyleRange getStyleRanges currentSelectionEnd getSelection currentSelectionEnd isLinkAt
Finds the previous link before the current selection private Style Range find Previous Link Styled Text text if text null return null Welcome Item item Welcome Item text get Data Style Range ranges text get Style Ranges int current Selection Start text get Selection x for int i ranges length 1 i 1 i if ranges i start ranges i length current Selection Start if item is Link At ranges i start ranges i length 1 return ranges i return null  StyleRange findPreviousLink StyledText WelcomeItem WelcomeItem getData StyleRange getStyleRanges currentSelectionStart getSelection currentSelectionStart isLinkAt
Finds the current link of the current selection protected Style Range get Current Link Styled Text text Style Range ranges text get Style Ranges int current Selection End text get Selection y int current Selection Start text get Selection x for int i 0 i ranges length i if current Selection Start ranges i start current Selection End ranges i start ranges i length return ranges i return null  StyleRange getCurrentLink StyledText StyleRange getStyleRanges currentSelectionEnd getSelection currentSelectionStart getSelection currentSelectionStart currentSelectionEnd
styled Text add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e if e button 1 return mouse Down true  styledText addMouseListener MouseAdapter mouseDown MouseEvent mouseDown
public void mouse Up Mouse Event e mouse Down false Styled Text text Styled Text e widget Welcome Item item Welcome Item e widget get Data int offset text get Caret Offset if drag Event drag Event false if item is Link At offset text set Cursor hand Cursor else if item is Link At offset text set Cursor busy Cursor if e button 1 item trigger Link At offset Style Range selection Range get Current Link text text set Selection Range selection Range start selection Range length text set Cursor null  mouseUp MouseEvent mouseDown StyledText StyledText WelcomeItem WelcomeItem getData getCaretOffset dragEvent dragEvent isLinkAt setCursor handCursor isLinkAt setCursor busyCursor triggerLinkAt StyleRange selectionRange getCurrentLink setSelectionRange selectionRange selectionRange setCursor
styled Text add Mouse Move Listener new Mouse Move Listener public void mouse Move Mouse Event e Do not change cursor on drag events if mouse Down if drag Event Styled Text text Styled Text e widget text set Cursor null drag Event true return Styled Text text Styled Text e widget Welcome Item item Welcome Item e widget get Data int offset 1 try offset text get Offset At Location new Point e x e y catch Illegal Argument Exception ex location is not over a character if offset 1 text set Cursor null else if item is Link At offset text set Cursor hand Cursor else text set Cursor null  styledText addMouseMoveListener MouseMoveListener mouseMove MouseEvent mouseDown dragEvent StyledText StyledText setCursor dragEvent StyledText StyledText WelcomeItem WelcomeItem getData getOffsetAtLocation IllegalArgumentException setCursor isLinkAt setCursor handCursor setCursor
styled Text add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e Styled Text text Styled Text e widget switch e detail case SWT TRAVERSE ESCAPE e doit true break case SWT TRAVERSE TAB NEXT Handle Ctrl Tab if e state Mask SWT CTRL 0 if e widget last Text return else e doit false next Tab Abort Traversal true last Text traverse SWT TRAVERSE TAB NEXT return if next Tab Abort Traversal next Tab Abort Traversal false return Find the next link in current widget if applicable Stop at top of widget Style Range next Link find Next Link text if next Link null go to the next widget focus at beginning Styled Text next Text next Text text next Text set Selection 0 focus On next Text 0 else focus On allow none tab traversals to align focus On text text get Selection x text set Selection Range next Link start next Link length e detail SWT TRAVERSE NONE e doit true break case SWT TRAVERSE TAB PREVIOUS Handle Ctrl Shift Tab if e state Mask SWT CTRL 0 if e widget first Text return else e doit false previous Tab Abort Traversal true first Text traverse SWT TRAVERSE TAB PREVIOUS return if previous Tab Abort Traversal previous Tab Abort Traversal false return Find the previous link in current widget if applicable Stop at top of widget also Style Range previous Link find Previous Link text if previous Link null if text get Selection x 0 go to the previous widget focus at end Styled Text previous Text previous Text text previous Text set Selection previous Text get Char Count previous Link find Previous Link previous Text if previous Link null focus On previous Text 0 else focus On previous Text previous Text get Selection x previous Text set Selection Range previous Link start previous Link length else stay at top of this widget focus On text 0 else focus On allow none tab traversals to align focus On text text get Selection x text set Selection Range previous Link start previous Link length e detail SWT TRAVERSE NONE e doit true break default break  styledText addTraverseListener TraverseListener keyTraversed TraverseEvent StyledText StyledText TRAVERSE_ESCAPE TRAVERSE_TAB_NEXT stateMask lastText nextTabAbortTraversal lastText TRAVERSE_TAB_NEXT nextTabAbortTraversal nextTabAbortTraversal StyleRange nextLink findNextLink nextLink StyledText nextText nextText nextText setSelection focusOn nextText focusOn focusOn getSelection setSelectionRange nextLink nextLink TRAVERSE_NONE TRAVERSE_TAB_PREVIOUS stateMask firstText previousTabAbortTraversal firstText TRAVERSE_TAB_PREVIOUS previousTabAbortTraversal previousTabAbortTraversal StyleRange previousLink findPreviousLink previousLink getSelection StyledText previousText previousText previousText setSelection previousText getCharCount previousLink findPreviousLink previousText previousLink focusOn previousText focusOn previousText previousText getSelection previousText setSelectionRange previousLink previousLink focusOn focusOn focusOn getSelection setSelectionRange previousLink previousLink TRAVERSE_NONE
styled Text add Key Listener new Key Listener public void key Released Key Event e Ignore a key release  styledText addKeyListener KeyListener keyReleased KeyEvent
public void key Pressed Key Event event Styled Text text Styled Text event widget if event character event character SWT CR if text null Welcome Item item Welcome Item text get Data Be sure we are in the selection int offset text get Selection x 1 if item is Link At offset text set Cursor busy Cursor item trigger Link At offset Style Range selection Range get Current Link text text set Selection Range selection Range start selection Range length text set Cursor null return When page down is pressed move the cursor to the next item in the welcome page Note that this operation wraps pages to the top item when the last item is reached if event key Code SWT PAGE DOWN focus On next Text text 0 return When page up is pressed move the cursor to the previous item in the welcome page Note that this operation wraps pages to the bottom item when the first item is reached if event key Code SWT PAGE UP focus On previous Text text 0 return  keyPressed KeyEvent StyledText StyledText WelcomeItem WelcomeItem getData getSelection isLinkAt setCursor busyCursor triggerLinkAt StyleRange selectionRange getCurrentLink setSelectionRange selectionRange selectionRange setCursor keyCode PAGE_DOWN focusOn nextText keyCode PAGE_UP focusOn previousText
styled Text add Focus Listener new Focus Adapter public void focus Lost Focus Event e Remember current text widget last Navigated Text Styled Text e widget  styledText addFocusListener FocusAdapter focusLost FocusEvent lastNavigatedText StyledText
public void focus Gained Focus Event e current Text Styled Text e widget Remove highlighted selection if text widget has changed if current Text last Navigated Text last Navigated Text null last Navigated Text set Selection last Navigated Text get Selection x enable disable copy action copy Action set Enabled current Text get Selection Count 0  focusGained FocusEvent currentText StyledText currentText lastNavigatedText lastNavigatedText lastNavigatedText setSelection lastNavigatedText getSelection copyAction setEnabled currentText getSelectionCount
styled Text add Selection Listener new Selection Adapter public void widget Selected Selection Event e enable disable copy action Styled Text text Styled Text e widget copy Action set Enabled text get Selection Count 0  styledText addSelectionListener SelectionAdapter widgetSelected SelectionEvent StyledText StyledText copyAction setEnabled getSelectionCount
Adds listeners to the given styled text private void add Listeners Styled Text styled Text styled Text add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e if e button 1 return mouse Down true public void mouse Up Mouse Event e mouse Down false Styled Text text Styled Text e widget Welcome Item item Welcome Item e widget get Data int offset text get Caret Offset if drag Event drag Event false if item is Link At offset text set Cursor hand Cursor else if item is Link At offset text set Cursor busy Cursor if e button 1 item trigger Link At offset Style Range selection Range get Current Link text text set Selection Range selection Range start selection Range length text set Cursor null styled Text add Mouse Move Listener new Mouse Move Listener public void mouse Move Mouse Event e Do not change cursor on drag events if mouse Down if drag Event Styled Text text Styled Text e widget text set Cursor null drag Event true return Styled Text text Styled Text e widget Welcome Item item Welcome Item e widget get Data int offset 1 try offset text get Offset At Location new Point e x e y catch Illegal Argument Exception ex location is not over a character if offset 1 text set Cursor null else if item is Link At offset text set Cursor hand Cursor else text set Cursor null styled Text add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e Styled Text text Styled Text e widget switch e detail case SWT TRAVERSE ESCAPE e doit true break case SWT TRAVERSE TAB NEXT Handle Ctrl Tab if e state Mask SWT CTRL 0 if e widget last Text return else e doit false next Tab Abort Traversal true last Text traverse SWT TRAVERSE TAB NEXT return if next Tab Abort Traversal next Tab Abort Traversal false return Find the next link in current widget if applicable Stop at top of widget Style Range next Link find Next Link text if next Link null go to the next widget focus at beginning Styled Text next Text next Text text next Text set Selection 0 focus On next Text 0 else focus On allow none tab traversals to align focus On text text get Selection x text set Selection Range next Link start next Link length e detail SWT TRAVERSE NONE e doit true break case SWT TRAVERSE TAB PREVIOUS Handle Ctrl Shift Tab if e state Mask SWT CTRL 0 if e widget first Text return else e doit false previous Tab Abort Traversal true first Text traverse SWT TRAVERSE TAB PREVIOUS return if previous Tab Abort Traversal previous Tab Abort Traversal false return Find the previous link in current widget if applicable Stop at top of widget also Style Range previous Link find Previous Link text if previous Link null if text get Selection x 0 go to the previous widget focus at end Styled Text previous Text previous Text text previous Text set Selection previous Text get Char Count previous Link find Previous Link previous Text if previous Link null focus On previous Text 0 else focus On previous Text previous Text get Selection x previous Text set Selection Range previous Link start previous Link length else stay at top of this widget focus On text 0 else focus On allow none tab traversals to align focus On text text get Selection x text set Selection Range previous Link start previous Link length e detail SWT TRAVERSE NONE e doit true break default break styled Text add Key Listener new Key Listener public void key Released Key Event e Ignore a key release public void key Pressed Key Event event Styled Text text Styled Text event widget if event character event character SWT CR if text null Welcome Item item Welcome Item text get Data Be sure we are in the selection int offset text get Selection x 1 if item is Link At offset text set Cursor busy Cursor item trigger Link At offset Style Range selection Range get Current Link text text set Selection Range selection Range start selection Range length text set Cursor null return When page down is pressed move the cursor to the next item in the welcome page Note that this operation wraps pages to the top item when the last item is reached if event key Code SWT PAGE DOWN focus On next Text text 0 return When page up is pressed move the cursor to the previous item in the welcome page Note that this operation wraps pages to the bottom item when the first item is reached if event key Code SWT PAGE UP focus On previous Text text 0 return styled Text add Focus Listener new Focus Adapter public void focus Lost Focus Event e Remember current text widget last Navigated Text Styled Text e widget public void focus Gained Focus Event e current Text Styled Text e widget Remove highlighted selection if text widget has changed if current Text last Navigated Text last Navigated Text null last Navigated Text set Selection last Navigated Text get Selection x enable disable copy action copy Action set Enabled current Text get Selection Count 0 styled Text add Selection Listener new Selection Adapter public void widget Selected Selection Event e enable disable copy action Styled Text text Styled Text e widget copy Action set Enabled text get Selection Count 0  addListeners StyledText styledText styledText addMouseListener MouseAdapter mouseDown MouseEvent mouseDown mouseUp MouseEvent mouseDown StyledText StyledText WelcomeItem WelcomeItem getData getCaretOffset dragEvent dragEvent isLinkAt setCursor handCursor isLinkAt setCursor busyCursor triggerLinkAt StyleRange selectionRange getCurrentLink setSelectionRange selectionRange selectionRange setCursor styledText addMouseMoveListener MouseMoveListener mouseMove MouseEvent mouseDown dragEvent StyledText StyledText setCursor dragEvent StyledText StyledText WelcomeItem WelcomeItem getData getOffsetAtLocation IllegalArgumentException setCursor isLinkAt setCursor handCursor setCursor styledText addTraverseListener TraverseListener keyTraversed TraverseEvent StyledText StyledText TRAVERSE_ESCAPE TRAVERSE_TAB_NEXT stateMask lastText nextTabAbortTraversal lastText TRAVERSE_TAB_NEXT nextTabAbortTraversal nextTabAbortTraversal StyleRange nextLink findNextLink nextLink StyledText nextText nextText nextText setSelection focusOn nextText focusOn focusOn getSelection setSelectionRange nextLink nextLink TRAVERSE_NONE TRAVERSE_TAB_PREVIOUS stateMask firstText previousTabAbortTraversal firstText TRAVERSE_TAB_PREVIOUS previousTabAbortTraversal previousTabAbortTraversal StyleRange previousLink findPreviousLink previousLink getSelection StyledText previousText previousText previousText setSelection previousText getCharCount previousLink findPreviousLink previousText previousLink focusOn previousText focusOn previousText previousText getSelection previousText setSelectionRange previousLink previousLink focusOn focusOn focusOn getSelection setSelectionRange previousLink previousLink TRAVERSE_NONE styledText addKeyListener KeyListener keyReleased KeyEvent keyPressed KeyEvent StyledText StyledText WelcomeItem WelcomeItem getData getSelection isLinkAt setCursor busyCursor triggerLinkAt StyleRange selectionRange getCurrentLink setSelectionRange selectionRange selectionRange setCursor keyCode PAGE_DOWN focusOn nextText keyCode PAGE_UP focusOn previousText styledText addFocusListener FocusAdapter focusLost FocusEvent lastNavigatedText StyledText focusGained FocusEvent currentText StyledText currentText lastNavigatedText lastNavigatedText lastNavigatedText setSelection lastNavigatedText getSelection copyAction setEnabled currentText getSelectionCount styledText addSelectionListener SelectionAdapter widgetSelected SelectionEvent StyledText StyledText copyAction setEnabled getSelectionCount
info Area add Listener SWT Resize new Listener public void handle Event Event event int w scrolled Composite get Client Area width if the horizontal scroll bar exists we want to wrap to the minimum wrap width if w WRAP MIN WIDTH w WRAP MIN WIDTH for int i 0 i texts size i int extent if i 0 extent w adjust First else extent w adjust Styled Text text Styled Text texts get i Point p text compute Size extent SWT DEFAULT false Grid Data text get Layout Data width Hint p x reset the scrolled composite height since the height of the styled text widgets have changed Point p info Area compute Size SWT DEFAULT SWT DEFAULT true scrolled Composite set Min Height p y  infoArea addListener handleEvent scrolledComposite getClientArea WRAP_MIN_WIDTH WRAP_MIN_WIDTH adjustFirst StyledText StyledText computeSize GridData getLayoutData widthHint infoArea computeSize scrolledComposite setMinHeight
Creates the wizard s title area param parent the SWT parent for the title area composite return the created info area composite private Composite create Info Area Composite parent Create the title area which will contain a title message and image this scrolled Composite new Scrolled Composite parent SWT V SCROLL SWT H SCROLL this scrolled Composite set Layout Data new Grid Data Grid Data FILL BOTH final Composite info Area new Composite this scrolled Composite SWT NONE Grid Layout layout new Grid Layout layout margin Height 10 layout vertical Spacing 5 layout num Columns 2 info Area set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH info Area set Layout Data data boolean wrapped parser is Format Wrapped int HINDENT 20 Get the background color for the title area Display display parent get Display Color background J Face Colors get Banner Background display Color foreground J Face Colors get Banner Foreground display info Area set Background background int text Style SWT MULTI SWT READ ONLY if wrapped text Style text Style SWT WRAP Styled Text sample Styled Text null Create the intro item Welcome Item item get Intro Item if item null Styled Text styled Text new Styled Text info Area text Style this texts add styled Text sample Styled Text styled Text styled Text set Cursor null J Face Colors set Colors styled Text foreground background styled Text set Text get Intro Item get Text set Bold Ranges styled Text item get Bold Ranges set Link Ranges styled Text item get Action Ranges set Link Ranges styled Text item get Help Ranges Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 gd horizontal Indent HINDENT gd vertical Alignment Grid Data VERTICAL ALIGN BEGINNING styled Text set Layout Data gd styled Text set Data item add Listeners styled Text Label spacer new Label info Area SWT NONE spacer set Background background gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING gd horizontal Span 2 spacer set Layout Data gd first Text sample Styled Text Create the welcome items Label image Label null Welcome Item items get Items for int i 0 i items length i Label label new Label info Area SWT NONE label set Background background label set Image PlatformUI get Workbench get Shared Images get Image IDE Internal Workbench Images IMG OBJS WELCOME ITEM Grid Data gd new Grid Data gd horizontal Indent HINDENT gd vertical Alignment Grid Data VERTICAL ALIGN BEGINNING label set Layout Data gd if image Label null image Label label Styled Text styled Text new Styled Text info Area text Style this texts add styled Text sample Styled Text styled Text styled Text set Cursor null J Face Colors set Colors styled Text foreground background styled Text set Text items i get Text set Bold Ranges styled Text items i get Bold Ranges set Link Ranges styled Text items i get Action Ranges set Link Ranges styled Text items i get Help Ranges gd new Grid Data Grid Data FILL HORIZONTAL gd vertical Alignment Grid Data VERTICAL ALIGN BEGINNING gd vertical Span 2 styled Text set Layout Data gd styled Text set Data items i add Listeners styled Text Label spacer new Label info Area SWT NONE spacer set Background background gd new Grid Data Grid Data VERTICAL ALIGN BEGINNING gd horizontal Span 2 spacer set Layout Data gd create context menu Menu Manager menu Mgr new Menu Manager Pop Up NON NLS 1 menu Mgr add copy Action styled Text set Menu menu Mgr create Context Menu styled Text last Text sample Styled Text this scrolled Composite set Content info Area Point p info Area compute Size SWT DEFAULT SWT DEFAULT true this scrolled Composite set Min Height p y if wrapped introduce a horizontal scroll bar after a minimum width is reached this scrolled Composite set Min Width WRAP MIN WIDTH else this scrolled Composite set Min Width p x this scrolled Composite set Expand Horizontal true this scrolled Composite set Expand Vertical true When the welcome editor is resized we need to set the width hint for wrapped Styled Text widgets so that the wrapped height will be recalculated if wrapped image Label null figure out how wide the Styled Text widgets should be do this by first calculating the width of the area not used by styled text widgets Rectangle bounds image Label get Bounds final int adjust HINDENT bounds width layout vertical Spacing layout margin Width 2 final int adjust First HINDENT layout margin Width 2 info Area add Listener SWT Resize new Listener public void handle Event Event event int w scrolled Composite get Client Area width if the horizontal scroll bar exists we want to wrap to the minimum wrap width if w WRAP MIN WIDTH w WRAP MIN WIDTH for int i 0 i texts size i int extent if i 0 extent w adjust First else extent w adjust Styled Text text Styled Text texts get i Point p text compute Size extent SWT DEFAULT false Grid Data text get Layout Data width Hint p x reset the scrolled composite height since the height of the styled text widgets have changed Point p info Area compute Size SWT DEFAULT SWT DEFAULT true scrolled Composite set Min Height p y Adjust the scrollbar increments if sample Styled Text null this scrolled Composite get Horizontal Bar set Increment HORZ SCROLL INCREMENT this scrolled Composite get Vertical Bar set Increment VERT SCROLL INCREMENT else GC gc new GC sample Styled Text int width gc get Font Metrics get Average Char Width gc dispose this scrolled Composite get Horizontal Bar set Increment width this scrolled Composite get Vertical Bar set Increment sample Styled Text get Line Height return info Area  createInfoArea scrolledComposite ScrolledComposite V_SCROLL H_SCROLL scrolledComposite setLayoutData GridData GridData FILL_BOTH infoArea scrolledComposite GridLayout GridLayout marginHeight verticalSpacing numColumns infoArea setLayout GridData GridData GridData FILL_BOTH infoArea setLayoutData isFormatWrapped getDisplay JFaceColors getBannerBackground JFaceColors getBannerForeground infoArea setBackground textStyle READ_ONLY textStyle textStyle StyledText sampleStyledText WelcomeItem getIntroItem StyledText styledText StyledText infoArea textStyle styledText sampleStyledText styledText styledText setCursor JFaceColors setColors styledText styledText setText getIntroItem getText setBoldRanges styledText getBoldRanges setLinkRanges styledText getActionRanges setLinkRanges styledText getHelpRanges GridData GridData GridData FILL_HORIZONTAL horizontalSpan horizontalIndent verticalAlignment GridData VERTICAL_ALIGN_BEGINNING styledText setLayoutData styledText setData addListeners styledText infoArea setBackground GridData GridData VERTICAL_ALIGN_BEGINNING horizontalSpan setLayoutData firstText sampleStyledText imageLabel WelcomeItem getItems infoArea setBackground setImage getWorkbench getSharedImages getImage IDEInternalWorkbenchImages IMG_OBJS_WELCOME_ITEM GridData GridData horizontalIndent verticalAlignment GridData VERTICAL_ALIGN_BEGINNING setLayoutData imageLabel imageLabel StyledText styledText StyledText infoArea textStyle styledText sampleStyledText styledText styledText setCursor JFaceColors setColors styledText styledText setText getText setBoldRanges styledText getBoldRanges setLinkRanges styledText getActionRanges setLinkRanges styledText getHelpRanges GridData GridData FILL_HORIZONTAL verticalAlignment GridData VERTICAL_ALIGN_BEGINNING verticalSpan styledText setLayoutData styledText setData addListeners styledText infoArea setBackground GridData GridData VERTICAL_ALIGN_BEGINNING horizontalSpan setLayoutData MenuManager menuMgr MenuManager PopUp menuMgr copyAction styledText setMenu menuMgr createContextMenu styledText lastText sampleStyledText scrolledComposite setContent infoArea infoArea computeSize scrolledComposite setMinHeight scrolledComposite setMinWidth WRAP_MIN_WIDTH scrolledComposite setMinWidth scrolledComposite setExpandHorizontal scrolledComposite setExpandVertical StyledText imageLabel StyledText imageLabel getBounds verticalSpacing marginWidth adjustFirst marginWidth infoArea addListener handleEvent scrolledComposite getClientArea WRAP_MIN_WIDTH WRAP_MIN_WIDTH adjustFirst StyledText StyledText computeSize GridData getLayoutData widthHint infoArea computeSize scrolledComposite setMinHeight sampleStyledText scrolledComposite getHorizontalBar setIncrement HORZ_SCROLL_INCREMENT scrolledComposite getVerticalBar setIncrement VERT_SCROLL_INCREMENT sampleStyledText getFontMetrics getAverageCharWidth scrolledComposite getHorizontalBar setIncrement scrolledComposite getVerticalBar setIncrement sampleStyledText getLineHeight infoArea
new I Property Change Listener public void property Change Property Change Event event if event get Property equals J Face Preferences HYPERLINK COLOR Color fg J Face Colors get Hyperlink Text editor Composite get Display Iterator links hyperlink Ranges iterator while links has Next Style Range range Style Range links next range foreground fg  IPropertyChangeListener propertyChange PropertyChangeEvent getProperty JFacePreferences HYPERLINK_COLOR JFaceColors getHyperlinkText editorComposite getDisplay hyperlinkRanges hasNext StyleRange StyleRange
Creates the SWT controls for this workbench part p Clients should not call this method the workbench calls this method at appropriate times p p For implementors this is a multi step process ol li Create one or more controls within the parent li li Set the parent layout as needed li li Register any global actions with the code I Action Service code li li Register any popup menus with the code I Action Service code li li Register a selection provider with the code I Selection Service code optional li ol p param parent the parent control public void create Part Control Composite parent read our contents read File if parser null return hand Cursor new Cursor parent get Display SWT CURSOR HAND busy Cursor new Cursor parent get Display SWT CURSOR WAIT editor Composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout vertical Spacing 0 layout horizontal Spacing 0 editor Composite set Layout layout create Title Area editor Composite Label title Bar Separator new Label editor Composite SWT HORIZONTAL SWT SEPARATOR Grid Data gd new Grid Data Grid Data FILL HORIZONTAL title Bar Separator set Layout Data gd create Info Area editor Composite Workbench Help set Help editor Composite I Help Context Ids WELCOME EDITOR this color Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals J Face Preferences HYPERLINK COLOR Color fg J Face Colors get Hyperlink Text editor Composite get Display Iterator links hyperlink Ranges iterator while links has Next Style Range range Style Range links next range foreground fg J Face Preferences get Preference Store add Property Change Listener this color Listener  IActionService IActionService ISelectionService createPartControl readFile handCursor getDisplay CURSOR_HAND busyCursor getDisplay CURSOR_WAIT editorComposite GridLayout GridLayout marginHeight marginWidth verticalSpacing horizontalSpacing editorComposite setLayout createTitleArea editorComposite titleBarSeparator editorComposite GridData GridData GridData FILL_HORIZONTAL titleBarSeparator setLayoutData createInfoArea editorComposite WorkbenchHelp setHelp editorComposite IHelpContextIds WELCOME_EDITOR colorListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty JFacePreferences HYPERLINK_COLOR JFaceColors getHyperlinkText editorComposite getDisplay hyperlinkRanges hasNext StyleRange StyleRange JFacePreferences getPreferenceStore addPropertyChangeListener colorListener
final C Label message Label new C Label title Area SWT LEFT protected String shorten Text GC gc String text int width if gc text Extent text SWT DRAW MNEMONIC x width return text final String ellipsis NON NLS 1 int ellipse Width gc text Extent ellipsis SWT DRAW MNEMONIC x int length text length int end length 1 while end 0 text text substring 0 end int l1 gc text Extent text SWT DRAW MNEMONIC x if l1 ellipse Width width return text ellipsis end return text ellipsis  CLabel messageLabel CLabel titleArea shortenText textExtent DRAW_MNEMONIC ellipseWidth textExtent DRAW_MNEMONIC textExtent DRAW_MNEMONIC ellipseWidth
final I Property Change Listener font Listener new I Property Change Listener public void property Change Property Change Event event if J Face Resources HEADER FONT equals event get Property message Label set Font J Face Resources get Header Font  IPropertyChangeListener fontListener IPropertyChangeListener propertyChange PropertyChangeEvent JFaceResources HEADER_FONT getProperty messageLabel setFont JFaceResources getHeaderFont
message Label add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event J Face Resources get Font Registry remove Listener font Listener  messageLabel addDisposeListener DisposeListener widgetDisposed DisposeEvent JFaceResources getFontRegistry removeListener fontListener
Creates the wizard s title area param parent the SWT parent for the title area composite return the created title area composite private Composite create Title Area Composite parent Get the background color for the title area Display display parent get Display Color background J Face Colors get Banner Background display Color foreground J Face Colors get Banner Foreground display Create the title area which will contain a title message and image Composite title Area new Composite parent SWT NONE SWT NO FOCUS Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout vertical Spacing 0 layout horizontal Spacing 0 layout num Columns 2 title Area set Layout layout title Area set Layout Data new Grid Data Grid Data FILL HORIZONTAL title Area set Background background Message label final C Label message Label new C Label title Area SWT LEFT protected String shorten Text GC gc String text int width if gc text Extent text SWT DRAW MNEMONIC x width return text final String ellipsis NON NLS 1 int ellipse Width gc text Extent ellipsis SWT DRAW MNEMONIC x int length text length int end length 1 while end 0 text text substring 0 end int l1 gc text Extent text SWT DRAW MNEMONIC x if l1 ellipse Width width return text ellipsis end return text ellipsis J Face Colors set Colors message Label foreground background message Label set Text get Banner Title message Label set Font J Face Resources get Header Font final I Property Change Listener font Listener new I Property Change Listener public void property Change Property Change Event event if J Face Resources HEADER FONT equals event get Property message Label set Font J Face Resources get Header Font message Label add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event J Face Resources get Font Registry remove Listener font Listener J Face Resources get Font Registry add Listener font Listener Grid Data gd new Grid Data Grid Data FILL BOTH message Label set Layout Data gd Title image Label title Image new Label title Area SWT LEFT title Image set Background background title Image set Image PlatformUI get Workbench get Shared Images get Image IDE Internal Workbench Images IMG OBJS WELCOME BANNER gd new Grid Data gd horizontal Alignment Grid Data END title Image set Layout Data gd return title Area  createTitleArea getDisplay JFaceColors getBannerBackground JFaceColors getBannerForeground titleArea NO_FOCUS GridLayout GridLayout marginHeight marginWidth verticalSpacing horizontalSpacing numColumns titleArea setLayout titleArea setLayoutData GridData GridData FILL_HORIZONTAL titleArea setBackground CLabel messageLabel CLabel titleArea shortenText textExtent DRAW_MNEMONIC ellipseWidth textExtent DRAW_MNEMONIC textExtent DRAW_MNEMONIC ellipseWidth JFaceColors setColors messageLabel messageLabel setText getBannerTitle messageLabel setFont JFaceResources getHeaderFont IPropertyChangeListener fontListener IPropertyChangeListener propertyChange PropertyChangeEvent JFaceResources HEADER_FONT getProperty messageLabel setFont JFaceResources getHeaderFont messageLabel addDisposeListener DisposeListener widgetDisposed DisposeEvent JFaceResources getFontRegistry removeListener fontListener JFaceResources getFontRegistry addListener fontListener GridData GridData GridData FILL_BOTH messageLabel setLayoutData titleImage titleArea titleImage setBackground titleImage setImage getWorkbench getSharedImages getImage IDEInternalWorkbenchImages IMG_OBJS_WELCOME_BANNER GridData horizontalAlignment GridData titleImage setLayoutData titleArea
The code Workbench Part code implementation of this code I Workbench Part code method disposes the title image loaded by code set Initialization Data code Subclasses may extend public void dispose super dispose if busy Cursor null busy Cursor dispose if hand Cursor null hand Cursor dispose if this color Listener null J Face Preferences get Preference Store remove Property Change Listener this color Listener  WorkbenchPart IWorkbenchPart setInitializationData busyCursor busyCursor handCursor handCursor colorListener JFacePreferences getPreferenceStore removePropertyChangeListener colorListener
see I Editor Part public void do Save I Progress Monitor monitor do nothing  IEditorPart doSave IProgressMonitor
see I Editor Part public void do Save As do nothing  IEditorPart doSaveAs
Returns the title obtained from the parser private String get Banner Title if parser get Title null return NON NLS 1 return parser get Title  getBannerTitle getTitle getTitle
Returns the intro item or code null code private Welcome Item get Intro Item return parser get Intro Item  WelcomeItem getIntroItem getIntroItem
Returns the welcome items private Welcome Item get Items return parser get Items  WelcomeItem getItems getItems
see I Editor Part public void goto Marker I Marker marker do nothing  IEditorPart gotoMarker IMarker
public void init I Editor Site site I Editor Input input throws Part Init Exception if input instanceof Welcome Editor Input throw new Part Init Exception Invalid Input Must be I File Editor Input NON NLS 1 set Site site set Input input  IEditorSite IEditorInput PartInitException WelcomeEditorInput PartInitException IFileEditorInput setSite setInput
see I Editor Part public boolean is Dirty return false  IEditorPart isDirty
see I Editor Part public boolean is Save As Allowed return false  IEditorPart isSaveAsAllowed
Read the contents of the welcome page param is the code Input Stream code to parse throws IO Exception if there is a problem parsing the stream public void read Input Stream is throws IO Exception try parser new Welcome Parser catch Parser Configuration Exception e throw IO Exception new IO Exception init Cause e catch SAX Exception e throw IO Exception new IO Exception init Cause e parser parse is  InputStream IOException InputStream IOException WelcomeParser ParserConfigurationException IOException IOException initCause SAXException IOException IOException initCause
Reads the welcome file public void read File URL url Welcome Editor Input get Editor Input get About Info get Welcome PageURL if url null should not happen return Input Stream is null try is url open Stream read is catch IO Exception e I Status status new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH 1 IDE Workbench Messages get String Welcome Editor access Exception e NON NLS 1 IDE Workbench Plugin log IDE Workbench Messages get String Welcome Editor read File Error status NON NLS 1 finally try if is null is close catch IO Exception e  readFile WelcomeEditorInput getEditorInput getAboutInfo getWelcomePageURL InputStream openStream IOException IStatus IStatus IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchMessages getString WelcomeEditor accessException IDEWorkbenchPlugin IDEWorkbenchMessages getString WelcomeEditor readFileError IOException
Sets the styled text s bold ranges private void set Bold Ranges Styled Text styled Text int bold Ranges for int i 0 i bold Ranges length i Style Range r new Style Range bold Ranges i 0 bold Ranges i 1 null null SWT BOLD styled Text set Style Range r  setBoldRanges StyledText styledText boldRanges boldRanges StyleRange StyleRange boldRanges boldRanges styledText setStyleRange
Asks this part to take focus within the workbench p Clients should not call this method the workbench calls this method at appropriate times p public void set Focus if editor Composite null last Navigated Text null current Text null editor Composite set Focus  setFocus editorComposite lastNavigatedText currentText editorComposite setFocus
Sets the styled text s link blue ranges private void set Link Ranges Styled Text styled Text int link Ranges Color fg styled Text get Display get System Color SWT COLOR BLUE Color fg J Face Colors get Hyperlink Text styled Text get Shell get Display for int i 0 i link Ranges length i Style Range r new Style Range link Ranges i 0 link Ranges i 1 fg null styled Text set Style Range r hyperlink Ranges add r  setLinkRanges StyledText styledText linkRanges styledText getDisplay getSystemColor COLOR_BLUE JFaceColors getHyperlinkText styledText getShell getDisplay linkRanges StyleRange StyleRange linkRanges linkRanges styledText setStyleRange hyperlinkRanges

public class Welcome Editor Action Contributor extends Editor Action Bar Contributor The code Welcome Editor Action Contributor code implementation of this code I Editor Action Bar Contributor code method installs the global action handler for the given editor public void set Active Editor I Editor Part part I Action Bars action Bars get Action Bars if action Bars null action Bars set Global Action Handler Action Factory COPY get Id Welcome Editor part get Copy Action  WelcomeEditorActionContributor EditorActionBarContributor WelcomeEditorActionContributor IEditorActionBarContributor setActiveEditor IEditorPart IActionBars actionBars getActionBars actionBars actionBars setGlobalActionHandler ActionFactory getId WelcomeEditor getCopyAction

private Welcome Editor editor Part public Welcome Editor Copy Action Welcome Editor editor editor Part editor set Text IDE Workbench Messages get String Welcome Editor copy text NON NLS 1  WelcomeEditor editorPart WelcomeEditorCopyAction WelcomeEditor editorPart setText IDEWorkbenchMessages getString WelcomeEditor
public void run editor Part get Current Text copy  editorPart getCurrentText

public final static String FEATURE ID feature Id NON NLS 1 Welcome Editor Input constructor comment public Welcome Editor Input About Info info super if info null throw new Illegal Argument Exception about Info info  FEATURE_ID featureId WelcomeEditorInput WelcomeEditorInput AboutInfo IllegalArgumentException aboutInfo
about Info info public boolean exists return false  aboutInfo
return false public Object get Adapter Class adapter return null  getAdapter
return null public Image Descriptor get Image Descriptor return null  ImageDescriptor getImageDescriptor
return null public String get Name return IDE Workbench Messages get String Welcome Editor title NON NLS 1  getName IDEWorkbenchMessages getString WelcomeEditor
public I Persistable Element get Persistable return new I Persistable Element public String get Factory Id return FACTORY ID  IPersistableElement getPersistable IPersistableElement getFactoryId FACTORY_ID
return FACTORY ID public void save State I Memento memento memento put String FEATURE ID about Info get Feature Id about Info get Version Id  FACTORY_ID saveState IMemento putString FEATURE_ID aboutInfo getFeatureId aboutInfo getVersionId
public I Persistable Element get Persistable return new I Persistable Element public String get Factory Id return FACTORY ID public void save State I Memento memento memento put String FEATURE ID about Info get Feature Id about Info get Version Id  IPersistableElement getPersistable IPersistableElement getFactoryId FACTORY_ID saveState IMemento putString FEATURE_ID aboutInfo getFeatureId aboutInfo getVersionId
public About Info get About Info return about Info  AboutInfo getAboutInfo aboutInfo
public boolean equals Object o if o null o instanceof Welcome Editor Input if Welcome Editor Input o about Info get Feature Id equals about Info get Feature Id return true return false  WelcomeEditorInput WelcomeEditorInput aboutInfo getFeatureId aboutInfo getFeatureId
return false public String get Tool Tip Text return IDE Workbench Messages format Welcome Editor tool Tip new Object about Info get Feature Label NON NLS 1  getToolTipText IDEWorkbenchMessages WelcomeEditor toolTip aboutInfo getFeatureLabel

public class Welcome Editor Input Factory implements I Element Factory Welcome Editor Input Factory constructor comment public Welcome Editor Input Factory super  WelcomeEditorInputFactory IElementFactory WelcomeEditorInputFactory WelcomeEditorInputFactory
Re creates and returns an object from the state captured within the given memento p Under normal circumstances the resulting object can be expected to be persistable that is pre result get Adapter org eclipse ui I Persistable Element class pre should not return code null code p param memento a memento containing the state for the object return an object or code null code if the element could not be created public I Adaptable create Element I Memento memento Get the feature id String versioned Feature Id memento get String Welcome Editor Input FEATURE ID if versioned Feature Id null return null int colon Pos versioned Feature Id index Of if colon Pos 1 assume the memento is stale or mangled return null String feature Id versioned Feature Id substring 0 colon Pos String version Id versioned Feature Id substring colon Pos 1 issue using feature id for plug in id About Info info About Info read Feature Info feature Id version Id if info null return null return new Welcome Editor Input info  getAdapter IPersistableElement IAdaptable createElement IMemento versionedFeatureId getString WelcomeEditorInput FEATURE_ID versionedFeatureId colonPos versionedFeatureId indexOf colonPos featureId versionedFeatureId colonPos versionId versionedFeatureId colonPos AboutInfo AboutInfo readFeatureInfo featureId versionId WelcomeEditorInput

private String action Classes Creates a new welcome item public Welcome Item String text int bold Ranges int action Ranges String action Plugin Ids String action Classes int help Ranges String help Ids String help Hrefs this text text this bold Ranges bold Ranges this action Ranges action Ranges this action Plugin Ids action Plugin Ids this action Classes action Classes this help Ranges help Ranges this help Ids help Ids this help Hrefs help Hrefs  actionClasses WelcomeItem boldRanges actionRanges actionPluginIds actionClasses helpRanges helpIds helpHrefs boldRanges boldRanges actionRanges actionRanges actionPluginIds actionPluginIds actionClasses actionClasses helpRanges helpRanges helpIds helpIds helpHrefs helpHrefs
Returns the action ranges character locations public int get Action Ranges return action Ranges  getActionRanges actionRanges
Returns the bold ranges character locations public int get Bold Ranges return bold Ranges  getBoldRanges boldRanges
Returns the help ranges character locations public int get Help Ranges return help Ranges  getHelpRanges helpRanges
Returns the text to display public String get Text return text  getText
Returns true is a link action or help is present at the given character location public boolean is Link At int offset Check if there is a link at the offset for int i 0 i help Ranges length i if offset help Ranges i 0 offset help Ranges i 0 help Ranges i 1 return true Check if there is an action link at the offset for int i 0 i action Ranges length i if offset action Ranges i 0 offset action Ranges i 0 action Ranges i 1 return true return false  isLinkAt helpRanges helpRanges helpRanges helpRanges actionRanges actionRanges actionRanges actionRanges
Logs a error to the workbench log public void log Action Link Error String action Plugin Id String action Class IDE Workbench Plugin log IDE Workbench Messages get String Welcome Item unable To Load Class action Plugin Id action Class NON NLS 1 NON NLS 2  logActionLinkError actionPluginId actionClass IDEWorkbenchPlugin IDEWorkbenchMessages getString WelcomeItem unableToLoadClass actionPluginId actionClass
Open a help topic private void open Help Topic String topic String href I Help help Support Workbench Help get Help Support if help Support null if href null help Support display Help Resource href else help Support display Help Resource topic  openHelpTopic IHelp helpSupport WorkbenchHelp getHelpSupport helpSupport helpSupport displayHelpResource helpSupport displayHelpResource
Run an action private void run Action String plugin Id String class Name I Plugin Descriptor desc Platform get Plugin Registry get Plugin Descriptor plugin Id if desc null log Action Link Error plugin Id class Name return Class action Class I Action action try action Class desc get Plugin Class Loader load Class class Name catch Class Not Found Exception e log Action Link Error plugin Id class Name return try action I Action action Class new Instance catch Instantiation Exception e log Action Link Error plugin Id class Name return catch Illegal Access Exception e log Action Link Error plugin Id class Name return catch Class Cast Exception e log Action Link Error plugin Id class Name return action run  runAction pluginId className IPluginDescriptor getPluginRegistry getPluginDescriptor pluginId logActionLinkError pluginId className actionClass IAction actionClass getPluginClassLoader loadClass className ClassNotFoundException logActionLinkError pluginId className IAction actionClass newInstance InstantiationException logActionLinkError pluginId className IllegalAccessException logActionLinkError pluginId className ClassCastException logActionLinkError pluginId className
Triggers the link at the given offset if there is one public void trigger Link At int offset Check if there is a help link at the offset for int i 0 i help Ranges length i if offset help Ranges i 0 offset help Ranges i 0 help Ranges i 1 trigger the link open Help Topic help Ids i help Hrefs i return Check if there is an action link at the offset for int i 0 i action Ranges length i if offset action Ranges i 0 offset action Ranges i 0 action Ranges i 1 trigger the link run Action action Plugin Ids i action Classes i return  triggerLinkAt helpRanges helpRanges helpRanges helpRanges openHelpTopic helpIds helpHrefs actionRanges actionRanges actionRanges actionRanges runAction actionPluginIds actionClasses

private class Welcome Content Handler implements Content Handler protected Content Handler parent public void set Parent Content Handler p parent p  WelcomeContentHandler ContentHandler ContentHandler setParent ContentHandler
parent p public void characters char ch int start int length throws SAX Exception  SAXException
public void characters char ch int start int length throws SAX Exception public void end Document throws SAX Exception  SAXException endDocument SAXException
public void end Document throws SAX Exception public void end Element String namespaceURI String local Name String q Name throws SAX Exception  endDocument SAXException endElement localName qName SAXException
public void end Element String namespaceURI String local Name String q Name throws SAX Exception public void end Prefix Mapping String prefix throws SAX Exception  endElement localName qName SAXException endPrefixMapping SAXException
public void end Prefix Mapping String prefix throws SAX Exception public void ignorable Whitespace char ch int start int length throws SAX Exception  endPrefixMapping SAXException ignorableWhitespace SAXException
public void ignorable Whitespace char ch int start int length throws SAX Exception public void processing Instruction String target String data throws SAX Exception  ignorableWhitespace SAXException processingInstruction SAXException
public void processing Instruction String target String data throws SAX Exception public void set Document Locator Locator locator  processingInstruction SAXException setDocumentLocator
public void set Document Locator Locator locator public void skipped Entity String name throws SAX Exception  setDocumentLocator skippedEntity SAXException
public void skipped Entity String name throws SAX Exception public void start Document throws SAX Exception  skippedEntity SAXException startDocument SAXException
public void start Document throws SAX Exception public void start Element String namespaceURI String local Name String q Name Attributes atts throws SAX Exception  startDocument SAXException startElement localName qName SAXException
public void start Element String namespaceURI String local Name String q Name Attributes atts throws SAX Exception public void start Prefix Mapping String prefix String uri throws SAX Exception  startElement localName qName SAXException startPrefixMapping SAXException
private class Welcome Page Handler extends Welcome Content Handler public Welcome Page Handler String new Title title new Title  WelcomePageHandler WelcomeContentHandler WelcomePageHandler newTitle newTitle
public void start Element String namespaceURI String local Name String q Name Attributes atts throws SAX Exception if local Name equals TAG INTRO Item Handler h new Intro Item Handler h set Parent Welcome Page Handler this parser getXML Reader set Content Handler h else if local Name equals TAG ITEM Item Handler h new Item Handler h set Parent Welcome Page Handler this parser getXML Reader set Content Handler h  startElement localName qName SAXException localName TAG_INTRO ItemHandler IntroItemHandler setParent WelcomePageHandler getXMLReader setContentHandler localName TAG_ITEM ItemHandler ItemHandler setParent WelcomePageHandler getXMLReader setContentHandler
private class Bold Handler extends Welcome Content Handler public void characters char ch int start int length throws SAX Exception Item Handler this characters ch start length  BoldHandler WelcomeContentHandler SAXException ItemHandler
public void end Element String namespaceURI String local Name String q Name throws SAX Exception if local Name equals TAG BOLD bold Ranges add new int text Start offset text Start parser getXML Reader set Content Handler parent  endElement localName qName SAXException localName TAG_BOLD boldRanges textStart textStart getXMLReader setContentHandler
private class Action Handler extends Welcome Content Handler public Action Handler String plugin Id String class Name plugin Ids add plugin Id classes add class Name  ActionHandler WelcomeContentHandler ActionHandler pluginId className pluginIds pluginId className
classes add class Name public void characters char ch int start int length throws SAX Exception Item Handler this characters ch start length  className SAXException ItemHandler
public void end Element String namespaceURI String local Name String q Name throws SAX Exception if local Name equals TAG ACTION action Ranges add new int text Start offset text Start parser getXML Reader set Content Handler parent  endElement localName qName SAXException localName TAG_ACTION actionRanges textStart textStart getXMLReader setContentHandler
private class Topic Handler extends Welcome Content Handler public Topic Handler String help Id String href help Ids add help Id help Hrefs add href  TopicHandler WelcomeContentHandler TopicHandler helpId helpIds helpId helpHrefs
help Hrefs add href public void characters char ch int start int length throws SAX Exception Item Handler this characters ch start length  helpHrefs SAXException ItemHandler
public void end Element String namespaceURI String local Name String q Name throws SAX Exception if local Name equals TAG TOPIC help Ranges add new int text Start offset text Start parser getXML Reader set Content Handler parent  endElement localName qName SAXException localName TAG_TOPIC helpRanges textStart textStart getXMLReader setContentHandler
protected Welcome Item construct Welcome Item if is Format Wrapped replace all line delimiters with a space for int i 0 i wrap Ranges size i int range int wrap Ranges get i int start range 0 int length range 1 for int j start j start length j char ch text char At j if ch DELIMITER text replace j j 1 NON NLS 1 return new Welcome Item text to String int bold Ranges to Array new int bold Ranges size 2 int action Ranges to Array new int action Ranges size 2 String plugin Ids to Array new String plugin Ids size String classes to Array new String classes size int help Ranges to Array new int help Ranges size 2 String help Ids to Array new String help Ids size String help Hrefs to Array new String help Hrefs size  WelcomeItem constructWelcomeItem isFormatWrapped wrapRanges wrapRanges charAt WelcomeItem toString boldRanges toArray boldRanges actionRanges toArray actionRanges pluginIds toArray pluginIds toArray helpRanges toArray helpRanges helpIds toArray helpIds helpHrefs toArray helpHrefs
public void characters char ch int start int length throws SAX Exception for int i 0 i length i text append ch start i offset length  SAXException
public void start Element String namespaceURI String local Name String q Name Attributes atts throws SAX Exception text Start offset if local Name equals TAG BOLD Bold Handler h new Bold Handler h set Parent Item Handler this parser getXML Reader set Content Handler h else if local Name equals TAG ACTION Action Handler h new Action Handler atts get Value ATT PLUGIN ID atts get Value ATT CLASS h set Parent Item Handler this parser getXML Reader set Content Handler h else if local Name equals TAG PARAGRAPH wrap Start text Start else if local Name equals TAG TOPIC Topic Handler h new Topic Handler atts get Value ATT ID atts get Value ATT HREF h set Parent Item Handler this parser getXML Reader set Content Handler h  startElement localName qName SAXException textStart localName TAG_BOLD BoldHandler BoldHandler setParent ItemHandler getXMLReader setContentHandler localName TAG_ACTION ActionHandler ActionHandler getValue ATT_PLUGIN_ID getValue ATT_CLASS setParent ItemHandler getXMLReader setContentHandler localName TAG_PARAGRAPH wrapStart textStart localName TAG_TOPIC TopicHandler TopicHandler getValue ATT_ID getValue ATT_HREF setParent ItemHandler getXMLReader setContentHandler
public void end Element String namespaceURI String local Name String q Name throws SAX Exception if local Name equals TAG ITEM items add construct Welcome Item parser getXML Reader set Content Handler parent else if local Name equals TAG PARAGRAPH wrap Ranges add new int wrap Start offset wrap Start  endElement localName qName SAXException localName TAG_ITEM constructWelcomeItem getXMLReader setContentHandler localName TAG_PARAGRAPH wrapRanges wrapStart wrapStart
private class Intro Item Handler extends Item Handler public void end Element String namespaceURI String local Name String q Name throws SAX Exception if local Name equals TAG INTRO intro Item construct Welcome Item parser getXML Reader set Content Handler parent else if local Name equals TAG PARAGRAPH wrap Ranges add new int wrap Start offset wrap Start  IntroItemHandler ItemHandler endElement localName qName SAXException localName TAG_INTRO introItem constructWelcomeItem getXMLReader setContentHandler localName TAG_PARAGRAPH wrapRanges wrapStart wrapStart
Creates a new welcome parser public Welcome Parser throws Parser Configuration Exception SAX Exception Factory Configuration Error super SAX Parser Factory factory SAX Parser Factory new Instance factory set Feature http xml org sax features namespaces true NON NLS 1 parser factory newSAX Parser parser getXML Reader set Content Handler this parser getXML Reader setDTD Handler this parser getXML Reader set Entity Resolver this parser getXML Reader set Error Handler this  WelcomeParser ParserConfigurationException SAXException FactoryConfigurationError SAXParserFactory SAXParserFactory newInstance setFeature newSAXParser getXMLReader setContentHandler getXMLReader setDTDHandler getXMLReader setEntityResolver getXMLReader setErrorHandler
Returns the intro item public Welcome Item get Intro Item return intro Item  WelcomeItem getIntroItem introItem
Returns the items public Welcome Item get Items return Welcome Item items to Array new Welcome Item items size  WelcomeItem getItems WelcomeItem toArray WelcomeItem
Returns the title public String get Title return title  getTitle
Returns whether or not the welcome editor input should be wrapped public boolean is Format Wrapped return FORMAT WRAP equals format  isFormatWrapped FORMAT_WRAP
Parse the contents of the input stream public void parse Input Stream is try parser parse new Input Source is this catch SAX Exception e I Status status new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH 1 IDE Workbench Messages get String Welcome Parser parse Exception e NON NLS 1 IDE Workbench Plugin log IDE Workbench Messages get String Welcome Parser parse Error status NON NLS 1 catch IO Exception e I Status status new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH 1 IDE Workbench Messages get String Welcome Parser parse Exception e NON NLS 1 IDE Workbench Plugin log IDE Workbench Messages get String Welcome Parser parse Error status NON NLS 1  InputStream InputSource SAXException IStatus IStatus IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchMessages getString WelcomeParser parseException IDEWorkbenchPlugin IDEWorkbenchMessages getString WelcomeParser parseError IOException IStatus IStatus IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchMessages getString WelcomeParser parseException IDEWorkbenchPlugin IDEWorkbenchMessages getString WelcomeParser parseError
Handles the start element public void start Element String namespaceURI String local Name String q Name Attributes atts throws SAX Exception if local Name equals TAG WELCOME PAGE Welcome Content Handler h new Welcome Page Handler atts get Value ATT TITLE format atts get Value ATT FORMAT h set Parent this parser getXML Reader set Content Handler h  startElement localName qName SAXException localName TAG_WELCOME_PAGE WelcomeContentHandler WelcomePageHandler getValue ATT_TITLE getValue ATT_FORMAT setParent getXMLReader setContentHandler

Creates a new project capabilities wizard page param page Name the name of this page public Wizard New Project Capability Page String page Name super page Name  pageName WizardNewProjectCapabilityPage pageName pageName
Method declared on I Wizard Page public boolean can Flip To Next Page Already know there is a next page return is Page Complete  IWizardPage canFlipToNextPage isPageComplete
capability Group set Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event get Wizard get Container update Buttons  capabilityGroup setCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getWizard getContainer updateButtons
public void create Control Composite parent Workbench Help set Help parent I Help Context Ids NEW PROJECT CAPABILITY WIZARD PAGE Capability Registry reg IDE Workbench Plugin get Default get Capability Registry capability Group new Project Capability Selection Group initial Selected Categories initial Project Capabilities reg set Control capability Group create Contents parent capability Group set Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event get Wizard get Container update Buttons if reg has Capabilities set Message IDE Workbench Messages get String Wizard New Project Capability Page no Capabilities WARNING NON NLS 1  createControl WorkbenchHelp setHelp IHelpContextIds NEW_PROJECT_CAPABILITY_WIZARD_PAGE CapabilityRegistry IDEWorkbenchPlugin getDefault getCapabilityRegistry capabilityGroup ProjectCapabilitySelectionGroup initialSelectedCategories initialProjectCapabilities setControl capabilityGroup createContents capabilityGroup setCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getWizard getContainer updateButtons hasCapabilities setMessage IDEWorkbenchMessages getString WizardNewProjectCapabilityPage noCapabilities
Returns the collection of capabilities selected by the user The collection is not in prerequisite order return array of selected capabilities package Capability get Selected Capabilities return capability Group get Selected Capabilities  getSelectedCapabilities capabilityGroup getSelectedCapabilities
Sets the initial categories to be selected param categories initial categories to select package void set Initial Selected Categories Category categories initial Selected Categories categories  setInitialSelectedCategories initialSelectedCategories
Sets the initial project capabilities to be selected param capabilities initial project capabilities to select package void set Initial Project Capabilities Capability capabilities initial Project Capabilities capabilities  setInitialProjectCapabilities initialProjectCapabilities

private Listener name Modify Listener new Listener public void handle Event Event e set Location For Selection set Page Complete validate Page  nameModifyListener handleEvent setLocationForSelection setPageComplete validatePage
private Listener location Modify Listener new Listener public void handle Event Event e set Page Complete validate Page  locationModifyListener handleEvent setPageComplete validatePage
Creates a new project creation wizard page param page Name the name of this page public Wizard New Project Name And Location Page String page Name super page Name set Page Complete false initial Location Field Value Platform get Location custom Location Field Value NON NLS 1  pageName WizardNewProjectNameAndLocationPage pageName pageName setPageComplete initialLocationFieldValue getLocation customLocationFieldValue
Method declared on I Wizard Page public boolean can Flip To Next Page Already know there is a next page return is Page Complete  IWizardPage canFlipToNextPage isPageComplete
public void create Control Composite parent Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL BOTH composite set Font parent get Font Workbench Help set Help composite I Help Context Ids NEW PROJECT WIZARD PAGE create Project Name Group composite create Project Location Group composite validate Page Show description on opening set Error Message null set Message null set Control composite  createControl setLayout GridLayout setLayoutData GridData GridData FILL_BOTH setFont getFont WorkbenchHelp setHelp IHelpContextIds NEW_PROJECT_WIZARD_PAGE createProjectNameGroup createProjectLocationGroup validatePage setErrorMessage setMessage setControl
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e use Defaults use Defaults Button get Selection browse Button set Enabled use Defaults location Path Field set Enabled use Defaults location Label set Enabled use Defaults if use Defaults custom Location Field Value location Path Field get Text set Location For Selection else location Path Field set Text custom Location Field Value  SelectionListener SelectionAdapter widgetSelected SelectionEvent useDefaults useDefaultsButton getSelection browseButton setEnabled useDefaults locationPathField setEnabled useDefaults locationLabel setEnabled useDefaults useDefaults customLocationFieldValue locationPathField getText setLocationForSelection locationPathField setText customLocationFieldValue
Creates the project location specification controls param parent the parent composite private final void create Project Location Group Composite parent Font font parent get Font project specification group Composite project Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 project Group set Layout layout project Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL project Group set Font font new project label Label project Contents Label new Label project Group SWT NONE project Contents Label set Font font project Contents Label set Text IDE Workbench Messages get String Wizard New Project Creation Page project Contents Label NON NLS 1 Grid Data label Data new Grid Data label Data horizontal Span 3 project Contents Label set Layout Data label Data final Button use Defaults Button new Button project Group SWT CHECK SWT RIGHT use Defaults Button set Text IDE Workbench Messages get String Wizard New Project Creation Page use Default Label NON NLS 1 use Defaults Button set Selection use Defaults use Defaults Button set Font font Grid Data button Data new Grid Data button Data horizontal Span 3 use Defaults Button set Layout Data button Data create User Specified Project Location Group project Group use Defaults Selection Listener listener new Selection Adapter public void widget Selected Selection Event e use Defaults use Defaults Button get Selection browse Button set Enabled use Defaults location Path Field set Enabled use Defaults location Label set Enabled use Defaults if use Defaults custom Location Field Value location Path Field get Text set Location For Selection else location Path Field set Text custom Location Field Value use Defaults Button add Selection Listener listener  createProjectLocationGroup getFont projectGroup GridLayout GridLayout numColumns projectGroup setLayout projectGroup setLayoutData GridData GridData FILL_HORIZONTAL projectGroup setFont projectContentsLabel projectGroup projectContentsLabel setFont projectContentsLabel setText IDEWorkbenchMessages getString WizardNewProjectCreationPage projectContentsLabel GridData labelData GridData labelData horizontalSpan projectContentsLabel setLayoutData labelData useDefaultsButton projectGroup useDefaultsButton setText IDEWorkbenchMessages getString WizardNewProjectCreationPage useDefaultLabel useDefaultsButton setSelection useDefaults useDefaultsButton setFont GridData buttonData GridData buttonData horizontalSpan useDefaultsButton setLayoutData buttonData createUserSpecifiedProjectLocationGroup projectGroup useDefaults SelectionListener SelectionAdapter widgetSelected SelectionEvent useDefaults useDefaultsButton getSelection browseButton setEnabled useDefaults locationPathField setEnabled useDefaults locationLabel setEnabled useDefaults useDefaults customLocationFieldValue locationPathField getText setLocationForSelection locationPathField setText customLocationFieldValue useDefaultsButton addSelectionListener
Creates the project name specification controls param parent the parent composite private final void create Project Name Group Composite parent Font font parent get Font project specification group Composite project Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 project Group set Layout layout project Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL new project label Label project Label new Label project Group SWT NONE project Label set Font font project Label set Text IDE Workbench Messages get String Wizard New Project Creation Page name Label NON NLS 1 new project name entry field project Name Field new Text project Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH project Name Field set Layout Data data project Name Field set Font font Set the initial value first before listener to avoid handling an event during the creation if initial Project Field Value null project Name Field set Text initial Project Field Value project Name Field add Listener SWT Modify name Modify Listener  createProjectNameGroup getFont projectGroup GridLayout GridLayout numColumns projectGroup setLayout projectGroup setLayoutData GridData GridData FILL_HORIZONTAL projectLabel projectGroup projectLabel setFont projectLabel setText IDEWorkbenchMessages getString WizardNewProjectCreationPage nameLabel projectNameField projectGroup GridData GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH projectNameField setLayoutData projectNameField setFont initialProjectFieldValue projectNameField setText initialProjectFieldValue projectNameField addListener nameModifyListener
browse Button set Text IDE Workbench Messages get String Wizard New Project Creation Page browse Label NON NLS 1 browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Location Browse Button Pressed  browseButton setText IDEWorkbenchMessages getString WizardNewProjectCreationPage browseLabel browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLocationBrowseButtonPressed
Creates the project location specification controls param project Group the parent composite param boolean the initial enabled state of the widgets created private void create User Specified Project Location Group Composite project Group boolean enabled Font font project Group get Font location label location Label new Label project Group SWT NONE location Label set Font font location Label set Text IDE Workbench Messages get String Wizard New Project Creation Page location Label NON NLS 1 location Label set Enabled enabled project location entry field location Path Field new Text project Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH location Path Field set Layout Data data location Path Field set Font font location Path Field set Enabled enabled browse button browse Button new Button project Group SWT PUSH browse Button set Font font browse Button set Text IDE Workbench Messages get String Wizard New Project Creation Page browse Label NON NLS 1 browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Location Browse Button Pressed browse Button set Enabled enabled Set the initial value first before listener to avoid handling an event during the creation if initial Location Field Value null location Path Field set Text initial Location Field Value toOS String location Path Field add Listener SWT Modify location Modify Listener  projectGroup createUserSpecifiedProjectLocationGroup projectGroup projectGroup getFont locationLabel projectGroup locationLabel setFont locationLabel setText IDEWorkbenchMessages getString WizardNewProjectCreationPage locationLabel locationLabel setEnabled locationPathField projectGroup GridData GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH locationPathField setLayoutData locationPathField setFont locationPathField setEnabled browseButton projectGroup browseButton setFont browseButton setText IDEWorkbenchMessages getString WizardNewProjectCreationPage browseLabel browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLocationBrowseButtonPressed browseButton setEnabled initialLocationFieldValue locationPathField setText initialLocationFieldValue toOSString locationPathField addListener locationModifyListener
Returns the current project location path as entered by the user or its anticipated initial value return the project location path its anticipated initial value or code null code if no project location path is known package I Path get Location Path if use Defaults return initial Location Field Value return new Path get Project Location Field Value  IPath getLocationPath useDefaults initialLocationFieldValue getProjectLocationFieldValue
Creates a project resource handle for the current project name field value p This method does not create the project resource this is the responsibility of code I Project create code invoked by the new project resource wizard p return the new project resource handle package I Project get Project Handle return Resources Plugin get Workspace get Root get Project get Project Name  IProject IProject getProjectHandle ResourcesPlugin getWorkspace getRoot getProject getProjectName
Returns the current project name as entered by the user or its anticipated initial value return the project name its anticipated initial value or code null code if no project name is known package String get Project Name if project Name Field null return initial Project Field Value return get Project Name Field Value  getProjectName projectNameField initialProjectFieldValue getProjectNameFieldValue
Returns the value of the project name field with leading and trailing spaces removed return the project name in the field private String get Project Name Field Value if project Name Field null return NON NLS 1 else return project Name Field get Text trim  getProjectNameFieldValue projectNameField projectNameField getText
Returns the value of the project location field with leading and trailing spaces removed return the project location directory in the field private String get Project Location Field Value if location Path Field null return NON NLS 1 else return location Path Field get Text trim  getProjectLocationFieldValue locationPathField locationPathField getText
Open an appropriate directory browser private void handle Location Browse Button Pressed Directory Dialog dialog new Directory Dialog location Path Field get Shell dialog set Message IDE Workbench Messages get String Wizard New Project Creation Page directory Label NON NLS 1 String dir Name get Project Location Field Value if dir Name equals NON NLS 1 File path new File dir Name if path exists dialog set Filter Path new Path dir Name toOS String String selected Directory dialog open if selected Directory null custom Location Field Value selected Directory location Path Field set Text custom Location Field Value  handleLocationBrowseButtonPressed DirectoryDialog DirectoryDialog locationPathField getShell setMessage IDEWorkbenchMessages getString WizardNewProjectCreationPage directoryLabel dirName getProjectLocationFieldValue dirName dirName setFilterPath dirName toOSString selectedDirectory selectedDirectory customLocationFieldValue selectedDirectory locationPathField setText customLocationFieldValue
Returns whether the currently specified project content directory points to an exising project private boolean is Existing Project Location I Path path get Location Path path path append I Project Description DESCRIPTION FILE NAME return path to File exists  isExistingProjectLocation IPath getLocationPath IProjectDescription DESCRIPTION_FILE_NAME toFile
Sets the initial project name that this page will use when created The name is ignored if the create Control Composite method has already been called Leading and trailing spaces in the name are ignored param name initial project name for this page package void set Initial Project Name String name if name null initial Project Field Value null else initial Project Field Value name trim  createControl setInitialProjectName initialProjectFieldValue initialProjectFieldValue
Set the location to the default location if we are set to use Defaults private void set Location For Selection if use Defaults I Path default Path Platform get Location append get Project Name Field Value location Path Field set Text default Path toOS String  useDefaults setLocationForSelection useDefaults IPath defaultPath getLocation getProjectNameFieldValue locationPathField setText defaultPath toOSString
Returns whether this page s controls currently all contain valid values return code true code if all controls are valid and code false code if at least one is invalid private boolean validate Page I Workspace workspace IDE Workbench Plugin get Plugin Workspace String project Field Contents get Project Name Field Value if project Field Contents equals NON NLS 1 set Error Message null set Message IDE Workbench Messages get String Wizard New Project Creation Page project Name Empty NON NLS 1 return false I Status name Status workspace validate Name project Field Contents I Resource PROJECT if name Status isOK set Error Message name Status get Message return false String location Field Contents get Project Location Field Value if location Field Contents equals NON NLS 1 set Error Message null set Message IDE Workbench Messages get String Wizard New Project Creation Page project Location Empty NON NLS 1 return false I Path path new Path NON NLS 1 if path is Valid Path location Field Contents set Error Message IDE Workbench Messages get String Wizard New Project Creation Page location Error NON NLS 1 return false if use Defaults Platform get Location is Prefix Of new Path location Field Contents set Error Message IDE Workbench Messages get String Wizard New Project Creation Page default Location Error NON NLS 1 return false if get Project Handle exists set Error Message IDE Workbench Messages get String Wizard New Project Creation Page project Exists Message NON NLS 1 return false if is Existing Project Location set Error Message IDE Workbench Messages get String Wizard New Project Creation Page project Location Exists Message NON NLS 1 return false set Error Message null set Message null return true  validatePage IWorkspace IDEWorkbenchPlugin getPluginWorkspace projectFieldContents getProjectNameFieldValue projectFieldContents setErrorMessage setMessage IDEWorkbenchMessages getString WizardNewProjectCreationPage projectNameEmpty IStatus nameStatus validateName projectFieldContents IResource nameStatus setErrorMessage nameStatus getMessage locationFieldContents getProjectLocationFieldValue locationFieldContents setErrorMessage setMessage IDEWorkbenchMessages getString WizardNewProjectCreationPage projectLocationEmpty IPath isValidPath locationFieldContents setErrorMessage IDEWorkbenchMessages getString WizardNewProjectCreationPage locationError useDefaults getLocation isPrefixOf locationFieldContents setErrorMessage IDEWorkbenchMessages getString WizardNewProjectCreationPage defaultLocationError getProjectHandle setErrorMessage IDEWorkbenchMessages getString WizardNewProjectCreationPage projectExistsMessage isExistingProjectLocation setErrorMessage IDEWorkbenchMessages getString WizardNewProjectCreationPage projectLocationExistsMessage setErrorMessage setMessage
public void set Visible boolean visible super set Visible visible if visible project Name Field set Focus  setVisible setVisible projectNameField setFocus

Creates a wizard step param number the step number public Wizard Step int number super this number number  WizardStep
Returns the label for this step that can be presented to the user return String the label of this step 
Returns an explaination of this step that can be presented to the user return String the details of this step 
Returns the step s number return int the step s number public int get Number return number  getNumber
Returns the step s wizard Subclasses are responsible for calling add Pages method on the wizard if needed before returning return I Wizard the wizard to complete the step  addPages IWizard
Returns whether the step is done it s work public boolean is Done return done  isDone
Sets the step as being done public void mark As Done done true  markAsDone

private static final Stringmanifest Path meta inf Manifest mf NON NLS 1 Create an instance of this class param filename java lang String param compress boolean param include Manifest File boolean exception java io IO Exception public Zip File Resource Exporter String filename boolean compress boolean include Manifest File throws IO Exception output Stream new Zip Output Stream new File Output Stream filename use Compression compress generate Manifest File include Manifest File if generate Manifest File manifest Contents new String Buffer manifest Magic  StringmanifestPath includeManifestFile IOException ZipFileResourceExporter includeManifestFile IOException outputStream ZipOutputStream FileOutputStream useCompression generateManifestFile includeManifestFile generateManifestFile manifestContents StringBuffer manifestMagic
Create a new entry in the manifest file being constructed param pathname java lang String param file org eclipse core resources I File exception java io IO Exception exception org eclipse core runtime Core Exception protected void append To Manifest String pathname I File file throws IO Exception Core Exception String Buffer manifest Entry new String Buffer manifest Entry append name Label manifest Entry append pathname manifest Entry append newline manifest Entry append digests Label manifest Entry append sha Label byte file Contents null we don t have to Ensure Local because it was already done in write Input Stream content Stream file get Contents false Reader in new Input Stream Reader content Stream int chunk Size content Stream available String Buffer buffer new String Buffer chunk Size char read Buffer new char chunk Size int n in read read Buffer while n 0 buffer append read Buffer n in read read Buffer content Stream close file Contents buffer to String get Bytes try byte hash Value Message Digest get Instance SHA digest file Contents NON NLS 1 manifest Entry append Internal Base64 Encoder encode hash Value manifest Entry append newline manifest Entry append md5 Label hash Value Message Digest get Instance MD5 digest file Contents NON NLS 1 manifest Entry append Internal Base64 Encoder encode hash Value manifest Entry append newline newline catch No Such Algorithm Exception e should never happen return manifest Contents append manifest Entry to String  IFile IOException CoreException appendToManifest IFile IOException CoreException StringBuffer manifestEntry StringBuffer manifestEntry nameLabel manifestEntry manifestEntry manifestEntry digestsLabel manifestEntry shaLabel fileContents EnsureLocal InputStream contentStream getContents InputStreamReader contentStream chunkSize contentStream StringBuffer StringBuffer chunkSize readBuffer chunkSize readBuffer readBuffer readBuffer contentStream fileContents toString getBytes hashValue MessageDigest getInstance fileContents manifestEntry InternalBase64Encoder hashValue manifestEntry manifestEntry md5Label hashValue MessageDigest getInstance fileContents manifestEntry InternalBase64Encoder hashValue manifestEntry NoSuchAlgorithmException manifestContents manifestEntry toString
Do all required cleanup now that we re finished with the currently open zip exception java io IO Exception public void finished throws IO Exception if generate Manifest File write Manifest File output Stream close  IOException IOException generateManifestFile writeManifestFile outputStream
Create a new Zip Entry with the passed pathname and contents and write it to the current archive param pathname java lang String param contents byte exception java io IO Exception protected void write String pathname byte contents throws IO Exception Zip Entry new Entry new Zip Entry pathname if the contents are being compressed then we get the below for free if use Compression new Entry set Method Zip Entry STORED new Entry set Size contents length CRC32 checksum Calculator new CRC32 checksum Calculator update contents new Entry set Crc checksum Calculator get Value output Stream put Next Entry new Entry output Stream write contents output Stream close Entry  ZipEntry IOException IOException ZipEntry newEntry ZipEntry useCompression newEntry setMethod ZipEntry newEntry setSize checksumCalculator checksumCalculator newEntry setCrc checksumCalculator getValue outputStream putNextEntry newEntry outputStream outputStream closeEntry
Write the passed resource to the current archive param resource org eclipse core resources I File param destination Path java lang String exception java io IO Exception exception org eclipse core runtime Core Exception public void write I File resource String destination Path throws IO Exception Core Exception Byte Array Output Stream output null Input Stream content Stream null try output new Byte Array Output Stream content Stream resource get Contents false int chunk Size content Stream available byte read Buffer new byte chunk Size int n content Stream read read Buffer while n 0 output write read Buffer n content Stream read read Buffer finally if output null output close if content Stream null content Stream close write destination Path output to Byte Array if generate Manifest File append To Manifest destination Path resource  IFile destinationPath IOException CoreException IFile destinationPath IOException CoreException ByteArrayOutputStream InputStream contentStream ByteArrayOutputStream contentStream getContents chunkSize contentStream readBuffer chunkSize contentStream readBuffer readBuffer contentStream readBuffer contentStream contentStream destinationPath toByteArray generateManifestFile appendToManifest destinationPath
Write the constructed manifest mf file to the current archive exception java io IO Exception protected void write Manifest File throws IO Exception write manifest Path manifest Contents to String get Bytes  IOException writeManifestFile IOException manifestPath manifestContents toString getBytes

private booleangenerate Manifest File false Create an instance of this class Use this constructor if you wish to export specific resources without a common parent resource param resources java util Vector param filename java lang String public Zip File Resource Export Operation List resources String filename super Eliminate redundancies in list of resources being exported Iterator elements Enum resources iterator while elements Enum has Next I Resource current Resource I Resource elements Enum next if is Descendent resources current Resource elements Enum remove Removes current Resource resources To Export resources destination Filename filename  booleangenerateManifestFile ZipFileResourceExportOperation elementsEnum elementsEnum hasNext IResource currentResource IResource elementsEnum isDescendent currentResource elementsEnum currentResource resourcesToExport destinationFilename
Create an instance of this class Use this constructor if you wish to recursively export a single resource param res org eclipse core resources I Resource param filename java lang String public Zip File Resource Export Operation I Resource res String filename super resource res destination Filename filename  IResource ZipFileResourceExportOperation IResource destinationFilename
Create an instance of this class Use this constructor if you wish to export specific resources with a common parent resource affects container directory creation param res org eclipse core resources I Resource param resources java util Vector param filename java lang String public Zip File Resource Export Operation I Resource res List resources String filename this res filename resources To Export resources  IResource ZipFileResourceExportOperation IResource resourcesToExport
Add a new entry to the error table with the passed information protected void add Error String message Throwable e error Table add new Status I Status ERROR PlatformUI PLUGIN ID 0 message e  addError errorTable IStatus PLUGIN_ID
Answer the total number of file resources that exist at or below self in the resources hierarchy return int param resource org eclipse core resources I Resource protected int count Children Of I Resource resource throws Core Exception if resource get Type I Resource FILE return 1 int count 0 if resource is Accessible I Resource children I Container resource members for int i 0 i children length i count count Children Of children i return count  IResource countChildrenOf IResource CoreException getType IResource isAccessible IResource IContainer countChildrenOf
Answer a boolean indicating the number of file resources that were specified for export return int protected int count Selected Resources throws Core Exception int result 0 Iterator resources resources To Export iterator while resources has Next result count Children Of I Resource resources next return result  countSelectedResources CoreException resourcesToExport hasNext countChildrenOf IResource
Export the passed resource to the destination zip param resource org eclipse core resources I Resource protected void export Resource I Resource resource throws Interrupted Exception if resource is Accessible return if resource get Type I Resource FILE String destination Name resource get Full Path remove First Segments leadup Start Depth to String monitor sub Task destination Name try exporter write I File resource destination Name catch IO Exception e add Error IDE Workbench Messages format Zip Export error On Resource new Object resource get Full Path e NON NLS 1 catch Core Exception e add Error IDE Workbench Messages format Zip Export error On Resource new Object resource get Full Path e NON NLS 1 monitor worked 1 Modal Context check Canceled monitor else I Resource children null try children I Container resource members catch Core Exception e this should never happen because an is Accessible check is done before members is invoked add Error IDE Workbench Messages format Zip Export error On Resource new Object resource get Full Path e NON NLS 1 for int i 0 i children length i export Resource children i  IResource exportResource IResource InterruptedException isAccessible getType IResource destinationName getFullPath removeFirstSegments leadupStartDepth toString subTask destinationName IFile destinationName IOException addError IDEWorkbenchMessages ZipExport errorOnResource getFullPath CoreException addError IDEWorkbenchMessages ZipExport errorOnResource getFullPath ModalContext checkCanceled IResource IContainer CoreException isAccessible addError IDEWorkbenchMessages ZipExport errorOnResource getFullPath exportResource
Export the resources contained in the previously defined resources To Export collection protected void export Specified Resources throws Interrupted Exception Iterator resources resources To Export iterator while resources has Next I Resource current Resource I Resource resources next if resource null create Leadup Structure leadup Start Depth current Resource get Full Path segment Count 1 export Resource current Resource  resourcesToExport exportSpecifiedResources InterruptedException resourcesToExport hasNext IResource currentResource IResource createLeadupStructure leadupStartDepth currentResource getFullPath segmentCount exportResource currentResource
Answer the error table return Vector of I Status public List get Result return error Table  IStatus getResult errorTable
Returns the status of the operation If there were any errors the result is a status object containing individual status objects for each error If there were no errors the result is a status object with error code code OK code return the status public I Status get Status I Status errors new I Status error Table size error Table to Array errors return new Multi Status PlatformUI PLUGIN ID I Status OK errors IDE Workbench Messages get String Zip Export problem Encountered NON NLS 1 null  IStatus getStatus IStatus IStatus errorTable errorTable toArray MultiStatus PLUGIN_ID IStatus IDEWorkbenchMessages getString ZipExport problemEncountered
Initialize this operation exception java io IO Exception protected void initialize throws IO Exception exporter new Zip File Resource Exporter destination Filename use Compression generate Manifest File if resource null ie no parent resource was specified so just strip out projects leadup Start Depth 1 else leadup Start Depth resource get Full Path segment Count if resource get Type I Resource FILE leadup Start Depth if create Leadup Structure leadup Start Depth Math min 1 leadup Start Depth  IOException IOException ZipFileResourceExporter destinationFilename useCompression generateManifestFile leadupStartDepth leadupStartDepth getFullPath segmentCount getType IResource leadupStartDepth createLeadupStructure leadupStartDepth leadupStartDepth
Answer a boolean indicating whether the passed child is a descendent of one or more members of the passed resources collection return boolean param resources java util Vector param child org eclipse core resources I Resource protected boolean is Descendent List resources I Resource child if child get Type I Resource PROJECT return false I Resource parent child get Parent if resources contains parent return true return is Descendent resources parent  IResource isDescendent IResource getType IResource IResource getParent isDescendent
Export the resources that were previously specified for export or if a single resource was specified then export it recursively public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception this monitor monitor try initialize catch IO Exception e throw new Invocation Target Exception e IDE Workbench Messages get String Zip Export unable To Open e get Message NON NLS 1 try ie a single resource for recursive export was specified int total Work I Progress Monitor UNKNOWN try if resources To Export null total Work count Children Of resource else total Work count Selected Resources catch Core Exception e Should not happen monitor begin Task IDE Workbench Messages get String Zip Export progress total Work NON NLS 1 if resources To Export null export Resource resource else ie a list of specific resources to export was specified export Specified Resources try exporter finished catch IO Exception e throw new Invocation Target Exception e IDE Workbench Messages get String Zip Export unable To Close e get Message NON NLS 1 finally monitor done  IProgressMonitor InvocationTargetException InterruptedException IOException InvocationTargetException IDEWorkbenchMessages getString ZipExport unableToOpen getMessage totalWork IProgressMonitor resourcesToExport totalWork countChildrenOf totalWork countSelectedResources CoreException beginTask IDEWorkbenchMessages getString ZipExport totalWork resourcesToExport exportResource exportSpecifiedResources IOException InvocationTargetException IDEWorkbenchMessages getString ZipExport unableToClose getMessage
Set this boolean indicating whether each exported resource s path should include containment hierarchies as dictated by its parents param value boolean public void set Create Leadup Structure boolean value create Leadup Structure value  setCreateLeadupStructure createLeadupStructure
Set this boolean indicating whether a manifest mf file based upon the exported contents should be created and included in the final archive param value boolean public void set Generate Manifest File boolean value generate Manifest File value  setGenerateManifestFile generateManifestFile
Set this boolean indicating whether exported resources should be compressed as opposed to simply being stored param value boolean public void set Use Compression boolean value use Compression value  setUseCompression useCompression

Prevent instantiation private Dialog Util  DialogUtil
Open an error style dialog for Part Init Exception by including any extra information from the nested Core Exception if present public static void open Error Shell parent String title String message Part Init Exception exception Check for a nested Core Exception Core Exception nested Exception null I Status status exception get Status if status null status get Exception instanceof Core Exception nested Exception Core Exception status get Exception if nested Exception null Open an error dialog and include the extra status information from the nested Core Exception Error Dialog open Error parent title message nested Exception get Status else Open a regular error dialog since there is no extra information to display Message Dialog open Error parent title message  PartInitException CoreException openError PartInitException CoreException CoreException nestedException IStatus getStatus getException CoreException nestedException CoreException getException nestedException CoreException ErrorDialog openError nestedException getStatus MessageDialog openError
Removes the accelerator indicator from a label if any Also removes the accelerators which are used in Asian languages public static String remove Accel String label int start Bracket label index Of NON NLS 1 Non latin accelerator if start Bracket 0 int end Bracket label index Of If there is more than one character it is not an accelerator if end Bracket start Bracket 3 return label substring 0 start Bracket label substring end Bracket 1 int i label index Of if i 0 label label substring 0 i label substring i 1 return label  removeAccel startBracket indexOf startBracket endBracket indexOf endBracket startBracket startBracket endBracket indexOf
Return the number of rows available in the current display using the current font param parent The Composite whose Font will be queried return int The result of the display size divided by the font size public static int available Rows Composite parent int font Height parent get Font get Font Data 0 get Height int display Height parent get Display get Client Area height return display Height font Height  availableRows fontHeight getFont getFontData getHeight displayHeight getDisplay getClientArea displayHeight fontHeight
Return whether or not the font in the parent is the size of a regular font Typically used to know if a font is smaller than the High Contrast Font This method is used to make layout decisions based on screen space param parent The Composite whose Font will be queried return boolean True if there are more than 50 lines of possible text in the display public static boolean in Regular Font Mode Composite parent return available Rows parent 50  inRegularFontMode availableRows

Constructs a new Editor Area Drop Adapter param window the workbench window public Editor Area Drop Adapter I Workbench Window window this window window  EditorAreaDropAdapter EditorAreaDropAdapter IWorkbenchWindow
public void drag Enter Drop Target Event event always indicate a copy event detail DND DROP COPY  dragEnter DropTargetEvent DROP_COPY
public void drag Operation Changed Drop Target Event event always indicate a copy event detail DND DROP COPY  dragOperationChanged DropTargetEvent DROP_COPY
if page null d async Exec new Runnable public void run async Drop event page  asyncExec asyncDrop
public void drop final Drop Target Event event Display d window get Shell get Display final I Workbench Page page window get Active Page if page null d async Exec new Runnable public void run async Drop event page  DropTargetEvent getShell getDisplay IWorkbenchPage getActivePage asyncExec asyncDrop
private void async Drop Drop Target Event event I Workbench Page page Open Editor for generic I Editor Input if Editor Input Transfer get Instance is Supported Type event current Data Type event data is an array of Editor Input Data which contains an I Editor Input and the corresponding editor Id Assert is True event data instanceof Editor Input Transfer Editor Input Data Editor Input Transfer Editor Input Data editor Inputs Editor Input Transfer Editor Input Data event data for int i 0 i editor Inputs length i I Editor Input editor Input editor Inputs i input String editor Id editor Inputs i editor Id open Non External Editor page editor Input editor Id Open Editor for Marker e g Tasks Bookmarks etc else if Marker Transfer get Instance is Supported Type event current Data Type Assert is True event data instanceof I Marker I Marker markers I Marker event data for int i 0 i markers length i open Non External Editor page markers i Open Editor for resource else if Resource Transfer get Instance is Supported Type event current Data Type Assert is True event data instanceof I Resource I Resource files I Resource event data for int i 0 i files length i if files i instanceof I File I File file I File files i open Non External Editor page file  asyncDrop DropTargetEvent IWorkbenchPage IEditorInput EditorInputTransfer getInstance isSupportedType currentDataType EditorInputData IEditorInput editorId isTrue EditorInputTransfer EditorInputData EditorInputTransfer EditorInputData editorInputs EditorInputTransfer EditorInputData editorInputs IEditorInput editorInput editorInputs editorId editorInputs editorId openNonExternalEditor editorInput editorId MarkerTransfer getInstance isSupportedType currentDataType isTrue IMarker IMarker IMarker openNonExternalEditor ResourceTransfer getInstance isSupportedType currentDataType isTrue IResource IResource IResource IFile IFile IFile openNonExternalEditor
Opens an editor for the given file on the given workbench page in response to a drop on the workbench editor area In contrast to other ways of opening an editor we never open an external editor in this case since external editors appear in their own window and not in the editor area The operation fails silently if there is no suitable editor to open param page the workbench page param file the file to open return the editor part that was opened or code null code if no editor was opened private I Editor Part open Non External Editor I Workbench Page page I File file I Editor Part result try find out which editor we would normal open I Editor Descriptor default Editor Desc IDE get Default Editor file if default Editor Desc null default Editor Desc is Open External open an internal or in place editor result IDE open Editor page file true else never open an external editor in response to a drop check the OS for in place editor OLE on Win32 I Editor Registry editor Reg PlatformUI get Workbench get Editor Registry I Editor Descriptor editor Desc null if editor Reg is System In Place Editor Available file get Name editor Desc editor Reg find Editor I Editor Registry SYSTEM INPLACE EDITOR ID next lookup the default text editor if editor Desc null editor Desc editor Reg find Editor IDE Workbench Plugin DEFAULT TEXT EDITOR ID if no valid editor found bail out if editor Desc null throw new Part Init Exception IDE Workbench Messages get String IDE no File Editor Found NON NLS 1 open the editor on the file result page open Editor new File Editor Input file editor Desc get Id true catch Part Init Exception e silently ignore problems opening the editor result null return result  IEditorPart openNonExternalEditor IWorkbenchPage IFile IEditorPart IEditorDescriptor defaultEditorDesc getDefaultEditor defaultEditorDesc defaultEditorDesc isOpenExternal openEditor IEditorRegistry editorReg getWorkbench getEditorRegistry IEditorDescriptor editorDesc editorReg isSystemInPlaceEditorAvailable getName editorDesc editorReg findEditor IEditorRegistry SYSTEM_INPLACE_EDITOR_ID editorDesc editorDesc editorReg findEditor IDEWorkbenchPlugin DEFAULT_TEXT_EDITOR_ID editorDesc PartInitException IDEWorkbenchMessages getString noFileEditorFound openEditor FileEditorInput editorDesc getId PartInitException
Opens an editor for the given marker on the given workbench page in response to a drop on the workbench editor area In contrast to other ways of opening an editor we never open an external editor in this case since external editors appear in their own window and not in the editor area The operation fails silently if there is no suitable editor to open param page the workbench page param marker the marker to open return the editor part that was opened or code null code if no editor was opened private I Editor Part open Non External Editor I Workbench Page page I Marker marker I Editor Part result try get the marker resource file if marker get Resource instanceof I File return null I File file I File marker get Resource get the preferred editor id from the marker I Editor Descriptor editor Desc null try String editorID String marker get Attribute IDE EDITOR ID ATTR if editorID null I Editor Registry editor Reg PlatformUI get Workbench get Editor Registry editor Desc editor Reg find Editor editorID catch Core Exception e ignore problems with getting the marker open the editor on the marker resource file if editor Desc null editor Desc is Open External result page open Editor new File Editor Input file editor Desc get Id true else result open Non External Editor page file get the editor to update its position based on the marker if result null IDE goto Marker result marker catch Part Init Exception e silently ignore problems opening the editor result null return result  IEditorPart openNonExternalEditor IWorkbenchPage IMarker IEditorPart getResource IFile IFile IFile getResource IEditorDescriptor editorDesc getAttribute EDITOR_ID_ATTR IEditorRegistry editorReg getWorkbench getEditorRegistry editorDesc editorReg findEditor CoreException editorDesc editorDesc isOpenExternal openEditor FileEditorInput editorDesc getId openNonExternalEditor gotoMarker PartInitException
Opens an editor for the given editor input and editor id combination on the given workbench page in response to a drop on the workbench editor area In contrast to other ways of opening an editor we never open an external editor in this case since external editors appear in their own window and not in the editor area The operation fails silently if the editor cannot be opened param page the workbench page param editor Input the editor input param editor Id the editor id return the editor part that was opened or code null code if no editor was opened private I Editor Part open Non External Editor I Workbench Page page I Editor Input editor Input String editor Id I Editor Part result try I Editor Registry editor Reg PlatformUI get Workbench get Editor Registry I Editor Descriptor editor Desc editor Reg find Editor editor Id if editor Desc null editor Desc is Open External result page open Editor editor Input editor Id else result null catch Part Init Exception e silently ignore problems opening the editor result null return result  editorInput editorId IEditorPart openNonExternalEditor IWorkbenchPage IEditorInput editorInput editorId IEditorPart IEditorRegistry editorReg getWorkbench getEditorRegistry IEditorDescriptor editorDesc editorReg findEditor editorId editorDesc editorDesc isOpenExternal openEditor editorInput editorId PartInitException

Creates an instance of this dialog to display the given features p There must be at least one feature p param shell the parent shell param features the features to display param primary Feature Id the id of the primary feature or null if none param shell Title shell title param shell Message shell message param help Context Id help context id public Feature Selection Dialog Shell shell About Info features String primary Feature Id String shell Title String shell Message String help Context Id super shell if features null features length 0 throw new Illegal Argument Exception this features features this help Context Id help Context Id set Title shell Title set Message shell Message Sort ascending Arrays sort features new Comparator Collator coll Collator get Instance Locale get Default public int compare Object a Object b About Info i1 i2 String name1 name2 i1 About Info a name1 i1 get Feature Label i2 About Info b name2 i2 get Feature Label if name1 null name1 NON NLS 1 if name2 null name2 NON NLS 1 return coll compare name1 name2 Find primary feature for int i 0 i features length i if features i get Feature Id equals primary Feature Id set Initial Selections new Object features i return set a safe default set Initial Selections new Object 0  primaryFeatureId shellTitle shellMessage helpContextId FeatureSelectionDialog AboutInfo primaryFeatureId shellTitle shellMessage helpContextId IllegalArgumentException helpContextId helpContextId setTitle shellTitle setMessage shellMessage getInstance getDefault AboutInfo AboutInfo getFeatureLabel AboutInfo getFeatureLabel getFeatureId primaryFeatureId setInitialSelections setInitialSelections
Method declared on Window protected void configure Shell Shell new Shell super configure Shell new Shell Workbench Help set Help new Shell help Context Id  configureShell newShell configureShell newShell WorkbenchHelp setHelp newShell helpContextId
protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent Create label create Message Area composite Create list viewer list Viewer new List Viewer composite SWT SINGLE SWT H SCROLL SWT V SCROLL SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data height Hint convert Height In Chars To Pixels LIST HEIGHT data width Hint convert Width In Chars To Pixels LIST WIDTH list Viewer get List set Layout Data data list Viewer get List set Font parent get Font Set the label provider list Viewer set Label Provider new Label Provider public String get Text Object element Return the features s label return element null About Info element get Feature Label NON NLS 1 Set the content provider Simple List Content Provider cp new Simple List Content Provider cp set Elements features list Viewer set Content Provider cp list Viewer set Input new Object it is ignored but must be non null Set the initial selection list Viewer set Selection new Structured Selection get Initial Element Selections true Add a selection change listener list Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Update OK button enablement get Ok Button set Enabled event get Selection is Empty Add double click listener list Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event ok Pressed return composite  createDialogArea createDialogArea createMessageArea listViewer ListViewer H_SCROLL V_SCROLL GridData GridData GridData FILL_BOTH heightHint convertHeightInCharsToPixels LIST_HEIGHT widthHint convertWidthInCharsToPixels LIST_WIDTH listViewer getList setLayoutData listViewer getList setFont getFont listViewer setLabelProvider LabelProvider getText AboutInfo getFeatureLabel SimpleListContentProvider SimpleListContentProvider setElements listViewer setContentProvider listViewer setInput listViewer setSelection StructuredSelection getInitialElementSelections listViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getOkButton setEnabled getSelection isEmpty listViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent okPressed
protected void ok Pressed I Structured Selection selection I Structured Selection list Viewer get Selection set Result selection to List super ok Pressed  okPressed IStructuredSelection IStructuredSelection listViewer getSelection setResult toList okPressed

Creates a new IDE application public IDE Application There is nothing to do for IDE Application  IDEApplication IDEApplication
public Object run Object args throws Exception Display display create Display try Shell shell new Shell display SWT ON TOP if check Java Runtime Version shell Platform end Splash return EXIT OK try if check Instance Location shell Platform end Splash return EXIT OK finally if shell null shell dispose create the workbench with this advisor and run it until it exits N B create Workbench remembers the advisor and also registers the workbench globally so that all UI plug ins can find it using PlatformUI get Workbench or AbstractUI Plugin get Workbench int return Code PlatformUI create And Run Workbench display new IDE Workbench Advisor the workbench doesn t support relaunch yet bug 61809 so for now restart is used and exit data properties are checked here to substitute in the relaunch return code if needed if return Code PlatformUI RETURN RESTART return EXIT OK if the exit code property has been set to the relaunch code then return that code now otherwise this is a normal restart return EXIT RELAUNCH equals Integer get Integer PROP EXIT CODE EXIT RELAUNCH EXIT RESTART finally if display null display dispose  createDisplay ON_TOP checkJavaRuntimeVersion endSplash EXIT_OK checkInstanceLocation endSplash EXIT_OK createWorkbench getWorkbench AbstractUIPlugin getWorkbench returnCode createAndRunWorkbench IDEWorkbenchAdvisor returnCode RETURN_RESTART EXIT_OK EXIT_RELAUNCH getInteger PROP_EXIT_CODE EXIT_RELAUNCH EXIT_RESTART
Creates the display used by the application return the display used by the application protected Display create Display return PlatformUI create Display  createDisplay createDisplay
see org eclipse core runtime I Executable Extension set Initialization Data org eclipse core runtime I Configuration Element java lang String java lang Object public void set Initialization Data I Configuration Element config String property Name Object data throws Core Exception There is nothing to do for IDE Application  IExecutableExtension setInitializationData IConfigurationElement setInitializationData IConfigurationElement propertyName CoreException IDEApplication
Return a boolean value indicating whether or not the version of the Java runtime java version system property is deemed to be compatible with Eclipse The current implementation compares only the version and not things like vendor name which matches the implementation that used to be in the runtime private boolean check Java Runtime Version Shell shell try if is Compatible Version System get Property java version NON NLS 1 return true build the requirement into a version string String req Version Integer to String MIN JVM VERSION MAJOR MIN JVM VERSION MINOR MIN JVM VERSION SERVICE Message Dialog open Error shell IDE Workbench Messages get String IDE Application incompatibleJVM Title NON NLS 1 IDE Workbench Messages format IDE Application incompatibleJVM Message NON NLS 1 new Object req Version return false catch Security Exception e If the security manager won t allow us to get the system property continue for now and let things fail later on their own if necessary return true catch Number Format Exception e If the version string was in a format that we don t understand continue and let things fail later on their own if necessary return true  checkJavaRuntimeVersion isCompatibleVersion getProperty reqVersion toString MIN_JVM_VERSION_MAJOR MIN_JVM_VERSION_MINOR MIN_JVM_VERSION_SERVICE MessageDialog openError IDEWorkbenchMessages getString IDEApplication incompatibleJVMTitle IDEWorkbenchMessages IDEApplication incompatibleJVMMessage reqVersion SecurityException NumberFormatException
Return true if a valid workspace path has been set and false otherwise Prompt for and set the path if possible and required return true if a valid instance location has been set and false otherwise private boolean check Instance Location Shell shell data none was specified but an ide requires workspace Location instance Loc Platform get Instance Location if instance Loc null Message Dialog open Error shell IDE Workbench Messages get String IDE Application workspace Mandatory Title NON NLS 1 IDE Workbench Messages get String IDE Application workspace Mandatory Message NON NLS 1 return false data valid path workspace already set if instance Loc is Set make sure the meta data version is compatible or the user has chosen to overwrite it if check Valid Workspace shell instance Loc getURL return false at this point its valid so try to lock it and update the metadata version information if successful try if instance Loc lock write Workspace Version return true catch IO Exception e do nothing Message Dialog open Error shell IDE Workbench Messages get String IDE Application workspace Cannot Lock Title NON NLS 1 IDE Workbench Messages get String IDE Application workspace Cannot Lock Message NON NLS 1 return false data no Default or data not specified prompt and set Choose Workspace Data launch Data new Choose Workspace Data instance Loc get Default boolean force false while true URL workspace Url prompt For Workspace shell launch Data force if workspace Url null return false if there is an error with the first selection then force the dialog to open to give the user a chance to correct force true try the operation will fail if the url is not a valid instance data area so other checking is unneeded if instance Loc setURL workspace Url true launch Data write Persisted Data write Workspace Version return true catch Illegal State Exception e Message Dialog open Error shell IDE Workbench Messages get String IDE Application workspace Cannot Be Set Title NON NLS 1 IDE Workbench Messages get String IDE Application workspace Cannot Be Set Message NON NLS 1 return false by this point it has been determined that the workspace is already in use force the user to choose again Message Dialog open Error shell IDE Workbench Messages get String IDE Application workspace In Use Title NON NLS 1 IDE Workbench Messages get String IDE Application workspace In Use Message NON NLS 1  checkInstanceLocation instanceLoc getInstanceLocation instanceLoc MessageDialog openError IDEWorkbenchMessages getString IDEApplication workspaceMandatoryTitle IDEWorkbenchMessages getString IDEApplication workspaceMandatoryMessage instanceLoc isSet checkValidWorkspace instanceLoc instanceLoc writeWorkspaceVersion IOException MessageDialog openError IDEWorkbenchMessages getString IDEApplication workspaceCannotLockTitle IDEWorkbenchMessages getString IDEApplication workspaceCannotLockMessage noDefault ChooseWorkspaceData launchData ChooseWorkspaceData instanceLoc getDefault workspaceUrl promptForWorkspace launchData workspaceUrl instanceLoc workspaceUrl launchData writePersistedData writeWorkspaceVersion IllegalStateException MessageDialog openError IDEWorkbenchMessages getString IDEApplication workspaceCannotBeSetTitle IDEWorkbenchMessages getString IDEApplication workspaceCannotBeSetMessage MessageDialog openError IDEWorkbenchMessages getString IDEApplication workspaceInUseTitle IDEWorkbenchMessages getString IDEApplication workspaceInUseMessage
Return true if the argument version is the product s requirement and false otherwise This algorithm including behaviour in error cases was copied from the old code in the runtime private static boolean is Compatible Version String vm Version if vm Version null return false String Tokenizer tokenizer new String Tokenizer vm Version   NON NLS 1 try make sure the running vm s major is the requirement if tokenizer has More Tokens return true int major Integer parse Int tokenizer next Token if major MIN JVM VERSION MAJOR return major MIN JVM VERSION MINOR make sure the running vm s minor is the requirement if tokenizer has More Tokens return true int minor Integer parse Int tokenizer next Token if minor MIN JVM VERSION MINOR return minor MIN JVM VERSION MINOR make sure the running vm s service is the requirement if tokenizer has More Tokens return true int service Integer parse Int tokenizer next Token return service MIN JVM VERSION SERVICE catch Security Exception e If the security manager won t allow us to get the system property continue for now and let things fail later on their own if necessary return true catch Number Format Exception e If the version string was in a format that we don t understand continue and let things fail later on their own if necessary return true  isCompatibleVersion vmVersion vmVersion StringTokenizer StringTokenizer vmVersion _ hasMoreTokens parseInt nextToken MIN_JVM_VERSION_MAJOR MIN_JVM_VERSION_MINOR hasMoreTokens parseInt nextToken MIN_JVM_VERSION_MINOR MIN_JVM_VERSION_MINOR hasMoreTokens parseInt nextToken MIN_JVM_VERSION_SERVICE SecurityException NumberFormatException
Open a workspace selection dialog on the argument shell populating the argument data with the user s selection Perform first level validation on the selection by comparing the version information This method does not examine the runtime state e g is the workspace already locked param shell param launch Data param force setting to true makes the dialog open regardless of the show Dialog value return An URL storing the selected workspace or null if the user has canceled the launch operation private URL prompt For Workspace Shell shell Choose Workspace Data launch Data boolean force URL url null do new Choose Workspace Dialog shell launch Data false prompt force String instance Path launch Data get Selection if instance Path null return null the dialog is not forced on the first iteration but is on every subsequent one if there was an error then the user needs to be allowed to force true create the workspace if it does not already exist File workspace new File instance Path if workspace exists workspace mkdir try Don t use File toURL since it adds a leading slash that Platform does not handle properly See bug 54081 for more details String path workspace get Absolute Path replace File separator Char url new URL file null path NON NLS 1 catch MalformedURL Exception e Message Dialog open Error shell IDE Workbench Messages get String IDE Application workspace Invalid Title NON NLS 1 IDE Workbench Messages get String IDE Application workspace Invalid Message NON NLS 1 continue while check Valid Workspace shell url return url  launchData showDialog promptForWorkspace ChooseWorkspaceData launchData ChooseWorkspaceDialog launchData instancePath launchData getSelection instancePath instancePath getAbsolutePath separatorChar MalformedURLException MessageDialog openError IDEWorkbenchMessages getString IDEApplication workspaceInvalidTitle IDEWorkbenchMessages getString IDEApplication workspaceInvalidMessage checkValidWorkspace
Return true if the argument directory is ok to use as a workspace and false otherwise A version check will be performed and a confirmation box may be displayed on the argument shell if an older version is detected return true if the argument URL is ok to use as a workspace and false otherwise private boolean check Valid Workspace Shell shell URL url String version read Workspace Version url if the version could not be read then there is not any existing workspace data to trample e g perhaps its a new directory that is just starting to be used as a workspace if version null return true final int ide version Integer parse Int WORKSPACE VERSION VALUE int workspace version Integer parse Int version equality test is required since any version difference newer or older may result in data being trampled if workspace version ide version return true At this point workspace has been detected to be from a version other than the current ide version find out if the user wants to use it anyhow String title IDE Workbench Messages get String IDE Application version Title NON NLS 1 String message IDE Workbench Messages format IDE Application version Message NON NLS 1 new Object url get File Message Box mbox new Message Box shell SWT OK SWT CANCEL SWT ICON WARNING SWT APPLICATION MODAL mbox set Text title mbox set Message message return mbox open SWT OK  checkValidWorkspace readWorkspaceVersion ide_version parseInt WORKSPACE_VERSION_VALUE workspace_version parseInt workspace_version ide_version IDEWorkbenchMessages getString IDEApplication versionTitle IDEWorkbenchMessages IDEApplication versionMessage getFile MessageBox MessageBox ICON_WARNING APPLICATION_MODAL setText setMessage
Look at the argument URL for the workspace s version information Return that version if found and null otherwise private static String read Workspace Version URL workspace File version File get Version File workspace false if version File null version File exists return null try Although the version file is not spec ed to be a Java properties file it happens to follow the same format currently so using Properties to read it is convenient Properties props new Properties File Input Stream is new File Input Stream version File try props load is finally is close return props get Property WORKSPACE VERSION KEY catch IO Exception e IDE Workbench Plugin log Could not read version file new Status NON NLS 1 I Status ERROR IDE Workbench Plugin IDE WORKBENCH I Status ERROR e get Message null e get Message NON NLS 1 e return null  readWorkspaceVersion versionFile getVersionFile versionFile versionFile FileInputStream FileInputStream versionFile getProperty WORKSPACE_VERSION_KEY IOException IDEWorkbenchPlugin IStatus IDEWorkbenchPlugin IDE_WORKBENCH IStatus getMessage getMessage
Write the version of the metadata into a known file overwriting any existing file contents Writing the version file isn t really crucial so the function is silent about failure private static void write Workspace Version Location instance Loc Platform get Instance Location if instance Loc null instance Loc is Read Only return File version File get Version File instance Loc getURL true if version File null return Output Stream output null try String version Line WORKSPACE VERSION KEY WORKSPACE VERSION VALUE output new File Output Stream version File output write version Line get Bytes UTF 8 NON NLS 1 catch IO Exception e IDE Workbench Plugin log Could not write version file NON NLS 1 Status Util new Status I Status ERROR e get Message e finally try if output null output close catch IO Exception e do nothing  writeWorkspaceVersion instanceLoc getInstanceLocation instanceLoc instanceLoc isReadOnly versionFile getVersionFile instanceLoc versionFile OutputStream versionLine WORKSPACE_VERSION_KEY WORKSPACE_VERSION_VALUE FileOutputStream versionFile versionLine getBytes IOException IDEWorkbenchPlugin StatusUtil newStatus IStatus getMessage IOException
The version file is stored in the metadata area of the workspace This method returns an URL to the file or null if the directory or file does not exist and the create parameter is false param create If the directory and file does not exist this parameter controls whether it will be created return An url to the file or null if the version file does not exist or could not be created private static File get Version File URL workspace Url boolean create if workspace Url null return null try make sure the directory exists File meta Dir new File workspace Url get Path METADATA FOLDER if meta Dir exists create meta Dir mkdir return null make sure the file exists File version File new File meta Dir VERSION FILENAME if version File exists create version File create New File return null return version File catch IO Exception e cannot log because instance area has not been set return null  getVersionFile workspaceUrl workspaceUrl metaDir workspaceUrl getPath METADATA_FOLDER metaDir metaDir versionFile metaDir VERSION_FILENAME versionFile versionFile createNewFile versionFile IOException

Creates the exception handle for the IDE application public IDE Exception Handler I Workbench Configurer configurer super workbench Configurer configurer  IDEExceptionHandler IWorkbenchConfigurer workbenchConfigurer
Handles an event loop exception public void handle Exception Throwable t try exception Count if exception Count 1 if closing return Shell parent default Parent if dialog null dialog get Shell null dialog get Shell is Disposed parent dialog get Shell Message Box box new Message Box parent SWT ICON ERROR SWT YES SWT NO SWT SYSTEM MODAL box set Text MSG FATAL ERROR RecursiveTitle box set Message Message Format format MSG FATAL ERROR new Object MSG FATAL ERROR Recursive int result box open if result SWT YES close Workbench else if open Question Dialog t close Workbench finally exception Count  handleException exceptionCount exceptionCount defaultParent getShell getShell isDisposed getShell MessageBox MessageBox ICON_ERROR SYSTEM_MODAL setText MSG_FATAL_ERROR_RecursiveTitle setMessage MessageFormat MSG_FATAL_ERROR MSG_FATAL_ERROR_Recursive closeWorkbench openQuestionDialog closeWorkbench exceptionCount
Close the workbench and make sure all exceptions are handled private void close Workbench if closing return try closing true if dialog null dialog get Shell null dialog get Shell is Disposed dialog close workbench Configurer emergency Close catch Runtime Exception re Workbench may be in such bad shape no OS handles left out of memory etc that is cannot even close Just bail out now System err println Fatal runtime error happened during workbench emergency close NON NLS 1 re print Stack Trace throw re catch Error e Workbench may be in such bad shape no OS handles left out of memory etc that is cannot even close Just bail out now System err println Fatal error happened during workbench emergency close NON NLS 1 e print Stack Trace throw e  closeWorkbench getShell getShell isDisposed workbenchConfigurer emergencyClose RuntimeException printStackTrace printStackTrace
Inform the user about a fatal error Return true if the user decide to exit workbench or if another fatal error happens while reporting it private boolean open Question Dialog Throwable internal Error try String msg null if internal Error instanceof Out Of Memory Error msg MSG OutOfMemoryError else if internal Error instanceof Stack Overflow Error msg MSG StackOverflowError else if internal Error instanceof Virtual Machine Error msg MSG VirtualMachineError else if internal Error instanceof SWT Error msg MSG SWTError else if internal Error get Message null msg IDE Workbench Messages get String Internal Error No Arg NON NLS 1 else msg IDE Workbench Messages format Internal Error One Arg new Object internal Error get Message NON NLS 1 if Policy DEBUG OPEN ERROR DIALOG return open Question null IDE Workbench Messages get String Internal error msg internal Error 1 NON NLS 1 else return false Always open the dialog in case of major error but do not show the detail button if not in debug mode Throwable detail internal Error if Policy DEBUG OPEN ERROR DIALOG detail null return Internal Error Dialog open Question null IDE Workbench Messages get String Internal error NON NLS 1 Message Format format MSG FATAL ERROR new Object msg detail 1 catch Throwable th Workbench may be in such bad shape no OS handles left out of memory etc that is cannot show a message to the user Just bail out now System err println Error while informing user about event loop exception NON NLS 1 internal Error print Stack Trace System err println Dialog open exception NON NLS 1 th print Stack Trace return true  openQuestionDialog internalError internalError OutOfMemoryError MSG_OutOfMemoryError internalError StackOverflowError MSG_StackOverflowError internalError VirtualMachineError MSG_VirtualMachineError internalError SWTError MSG_SWTError internalError getMessage IDEWorkbenchMessages getString InternalErrorNoArg IDEWorkbenchMessages InternalErrorOneArg internalError getMessage DEBUG_OPEN_ERROR_DIALOG openQuestion IDEWorkbenchMessages getString Internal_error internalError internalError DEBUG_OPEN_ERROR_DIALOG InternalErrorDialog openQuestion IDEWorkbenchMessages getString Internal_error MessageFormat MSG_FATAL_ERROR internalError printStackTrace printStackTrace
private boolean open Question Shell parent String title String message Throwable detail int default Index String labels if detail null labels new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL else labels new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL I Dialog Constants SHOW DETAILS LABEL dialog new Internal Error Dialog parent title null message detail Message Dialog QUESTION labels default Index if detail null dialog set Detail Button 2 boolean result dialog open 0 dialog null return result  openQuestion defaultIndex IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants SHOW_DETAILS_LABEL InternalErrorDialog MessageDialog defaultIndex setDetailButton

public final class IDE Internal Workbench Images Block instantiation private IDE Internal Workbench Images  IDEInternalWorkbenchImages IDEInternalWorkbenchImages
Returns the image descriptor for the workbench image with the given symbolic name Use this method to retrieve image descriptors for any of the images named in this class param symbolic Name the symbolic name of the image return the image descriptor or code null code if none public static Image Descriptor get Image Descriptor String symbolic Name return PlatformUI get Workbench get Shared Images get Image Descriptor symbolic Name  symbolicName ImageDescriptor getImageDescriptor symbolicName getWorkbench getSharedImages getImageDescriptor symbolicName

Get the singleton instance of this class return the singleton instance of this class since 3 0 public static IDE Workbench Activity Helper get Instance if singleton null singleton new IDE Workbench Activity Helper return singleton  IDEWorkbenchActivityHelper getInstance IDEWorkbenchActivityHelper
for dynamic UI Platform get Extension Registry add Registry Change Listener new I Registry Change Listener public void registry Changed I Registry Change Event event if event get Extension Deltas org eclipse core resources natures length 0 NON NLS 1 NON NLS 2 load Natures org eclipse core resources NON NLS 1  getExtensionRegistry addRegistryChangeListener IRegistryChangeListener registryChanged IRegistryChangeEvent getExtensionDeltas loadNatures
Create a new code IDE Workbench Activity Helper code which will listen for workspace changes and promote activities accordingly private IDE Workbench Activity Helper nature Map new Hash Map for dynamic UI Platform get Extension Registry add Registry Change Listener new I Registry Change Listener public void registry Changed I Registry Change Event event if event get Extension Deltas org eclipse core resources natures length 0 NON NLS 1 NON NLS 2 load Natures org eclipse core resources NON NLS 1 load Natures listener get Change Listener Resources Plugin get Workspace add Resource Change Listener listener crawl the initial projects to set up nature bindings I Project projects Resources Plugin get Workspace get Root get Projects I Workbench Activity Support workbench Activity Support PlatformUI get Workbench get Activity Support for int i 0 i projects length i try process Project projects i workbench Activity Support catch Core Exception e do nothing  IDEWorkbenchActivityHelper IDEWorkbenchActivityHelper natureMap HashMap getExtensionRegistry addRegistryChangeListener IRegistryChangeListener registryChanged IRegistryChangeEvent getExtensionDeltas loadNatures loadNatures getChangeListener ResourcesPlugin getWorkspace addResourceChangeListener IProject ResourcesPlugin getWorkspace getRoot getProjects IWorkbenchActivitySupport workbenchActivitySupport getWorkbench getActivitySupport processProject workbenchActivitySupport CoreException
String nature Id extension get Unique Identifier nature Map put nature Id new I Plugin Contribution public String get Local Id return local Id  natureId getUniqueIdentifier natureMap natureId IPluginContribution getLocalId localId
public String get Plugin Id return plugin Id  getPluginId pluginId
For dynamic UI Clears the cache of known natures and recreates it public void load Natures nature Map clear I Extension Point point Platform get Extension Registry get Extension Point org eclipse core resources natures NON NLS 1 I Extension extensions point get Extensions for int i 0 i extensions length i I Extension extension extensions i final String local Id extension get Simple Identifier final String plugin Id extension get Declaring Plugin Descriptor get Unique Identifier String nature Id extension get Unique Identifier nature Map put nature Id new I Plugin Contribution public String get Local Id return local Id public String get Plugin Id return plugin Id  loadNatures natureMap IExtensionPoint getExtensionRegistry getExtensionPoint IExtension getExtensions IExtension localId getSimpleIdentifier pluginId getDeclaringPluginDescriptor getUniqueIdentifier natureId getUniqueIdentifier natureMap natureId IPluginContribution getLocalId localId getPluginId pluginId
public void resource Changed I Resource Change Event event if Workbench Activity Helper is Filtering return I Resource Delta main Delta event get Delta if main Delta null return Has the root changed if main Delta get Kind I Resource Delta CHANGED main Delta get Resource get Type I Resource ROOT try I Resource Delta children main Delta get Affected Children I Workbench Activity Support workbench Activity Support PlatformUI get Workbench get Activity Support for int i 0 i children length i I Resource Delta delta children i if delta get Resource get Type I Resource PROJECT I Project project I Project delta get Resource process Project project workbench Activity Support catch Core Exception exception Do nothing if there is a Core Exception  resourceChanged IResourceChangeEvent WorkbenchActivityHelper isFiltering IResourceDelta mainDelta getDelta mainDelta mainDelta getKind IResourceDelta mainDelta getResource getType IResource IResourceDelta mainDelta getAffectedChildren IWorkbenchActivitySupport workbenchActivitySupport getWorkbench getActivitySupport IResourceDelta getResource getType IResource IProject IProject getResource processProject workbenchActivitySupport CoreException CoreException
Get a change listener for listening to resource changes return private I Resource Change Listener get Change Listener return new I Resource Change Listener non Javadoc see org eclipse core resources I Resource Change Listener resource Changed org eclipse core resources I Resource Change Event public void resource Changed I Resource Change Event event if Workbench Activity Helper is Filtering return I Resource Delta main Delta event get Delta if main Delta null return Has the root changed if main Delta get Kind I Resource Delta CHANGED main Delta get Resource get Type I Resource ROOT try I Resource Delta children main Delta get Affected Children I Workbench Activity Support workbench Activity Support PlatformUI get Workbench get Activity Support for int i 0 i children length i I Resource Delta delta children i if delta get Resource get Type I Resource PROJECT I Project project I Project delta get Resource process Project project workbench Activity Support catch Core Exception exception Do nothing if there is a Core Exception  IResourceChangeListener getChangeListener IResourceChangeListener IResourceChangeListener resourceChanged IResourceChangeEvent resourceChanged IResourceChangeEvent WorkbenchActivityHelper isFiltering IResourceDelta mainDelta getDelta mainDelta mainDelta getKind IResourceDelta mainDelta getResource getType IResource IResourceDelta mainDelta getAffectedChildren IWorkbenchActivitySupport workbenchActivitySupport getWorkbench getActivitySupport IResourceDelta getResource getType IResource IProject IProject getResource processProject workbenchActivitySupport CoreException CoreException
Handle natures for the given project param project the project param workbench Activity Support the activity support protected void process Project I Project project I Workbench Activity Support workbench Activity Support throws Core Exception if project is Open return I Activity Manager activity Manager workbench Activity Support get Activity Manager String ids project get Description get Nature Ids if ids length 0 return Set activities new Hash Set activity Manager get Enabled Activity Ids boolean changed false for int j 0 j ids length j I Plugin Contribution contribution I Plugin Contribution nature Map get ids j if contribution null continue bad nature ID I Identifier identifier activity Manager get Identifier Workbench Activity Helper create Unified Id contribution if activities add All identifier get Activity Ids changed true if changed workbench Activity Support set Enabled Activity Ids activities  workbenchActivitySupport processProject IProject IWorkbenchActivitySupport workbenchActivitySupport CoreException isOpen IActivityManager activityManager workbenchActivitySupport getActivityManager getDescription getNatureIds HashSet activityManager getEnabledActivityIds IPluginContribution IPluginContribution natureMap IIdentifier activityManager getIdentifier WorkbenchActivityHelper createUnifiedId addAll getActivityIds workbenchActivitySupport setEnabledActivityIds
Unhooks the code I Resource Change Listener code public void shutdown if listener null Resources Plugin get Workspace remove Resource Change Listener listener  IResourceChangeListener ResourcesPlugin getWorkspace removeResourceChangeListener

Creates a new workbench advisor instance protected IDE Workbench Advisor super if workbench Advisor null throw new Illegal State Exception workbench Advisor this  IDEWorkbenchAdvisor workbenchAdvisor IllegalStateException workbenchAdvisor
public void initialize I Workbench Configurer configurer make sure we always save and restore workspace state configurer set Save And Restore true setup the event loop exception handler exception Handler new IDE Exception Handler configurer register workspace adapters Workbench Adapter Builder register Adapters get the command line arguments String cmd Line Args Platform get Command Line Args include the workspace location in the title if the command line option showlocation is specified for int i 0 i cmd Line Args length i if showlocation equals Ignore Case cmd Line Args i NON NLS 1 workspace Location Platform get Location toOS String break register shared images declare Workbench Images initialize the activity helper activity Helper IDE Workbench Activity Helper get Instance  IWorkbenchConfigurer setSaveAndRestore exceptionHandler IDEExceptionHandler WorkbenchAdapterBuilder registerAdapters cmdLineArgs getCommandLineArgs cmdLineArgs equalsIgnoreCase cmdLineArgs workspaceLocation getLocation toOSString declareWorkbenchImages activityHelper IDEWorkbenchActivityHelper getInstance
public void pre Startup Suspend background jobs while we startup Platform get Job Manager suspend support old welcome perspectives if intro plugin is not present if has Intro Map m get Newly Added Bundle Groups welcome Perspective Infos new Array List m size for Iterator i m values iterator i has Next About Info info About Info i next if info null info get Welcome Perspective Id null info get Welcome PageURL null welcome Perspective Infos add info Register the build actions I Progress Service service PlatformUI get Workbench get Progress Service Image Descriptor new Image IDE Internal Workbench Images get Image Descriptor IDE Internal Workbench Images IMG ETOOL BUILD EXEC service register Icon For Family new Image Resources Plugin FAMILY MANUAL BUILD service register Icon For Family new Image Resources Plugin FAMILY AUTO BUILD  preStartup getJobManager hasIntro getNewlyAddedBundleGroups welcomePerspectiveInfos ArrayList hasNext AboutInfo AboutInfo getWelcomePerspectiveId getWelcomePageURL welcomePerspectiveInfos IProgressService getWorkbench getProgressService ImageDescriptor newImage IDEInternalWorkbenchImages getImageDescriptor IDEInternalWorkbenchImages IMG_ETOOL_BUILD_EXEC registerIconForFamily newImage ResourcesPlugin FAMILY_MANUAL_BUILD registerIconForFamily newImage ResourcesPlugin FAMILY_AUTO_BUILD
public void post Startup try refresh From Local check Updates finally Resume background jobs after we startup Platform get Job Manager resume  postStartup refreshFromLocal checkUpdates getJobManager
public void post Shutdown if activity Helper null activity Helper shutdown activity Helper null if IDE Workbench Plugin get Plugin Workspace null disconnect From Workspace  postShutdown activityHelper activityHelper activityHelper IDEWorkbenchPlugin getPluginWorkspace disconnectFromWorkspace
public void event Loop Exception Throwable exception super event Loop Exception exception if exception Handler null exception Handler handle Exception exception else if get Workbench Configurer null get Workbench Configurer emergency Close  eventLoopException eventLoopException exceptionHandler exceptionHandler handleException getWorkbenchConfigurer getWorkbenchConfigurer emergencyClose
public boolean pre Window Shell Close I Workbench Window Configurer window Configurer if get Workbench Configurer get Workbench get Workbench Window Count 1 return true the user has asked to close the last window while will cause the workbench to close in due course prompt the user for confirmation I Preference Store store IDE Workbench Plugin get Default get Preference Store boolean prompt On Exit store get Boolean IDE Internal Preferences EXIT PROMPT ON CLOSE LAST WINDOW if prompt On Exit String message String product Name null I Product product Platform get Product if product null product Name product get Name if product Name null message IDE Workbench Messages get String Prompt On Exit Dialog message0 NON NLS 1 else message IDE Workbench Messages format Prompt On Exit Dialog message1 new Object product Name NON NLS 1 Message Dialog With Toggle dlg Message Dialog With Toggle open Ok Cancel Confirm window Configurer get Window get Shell IDE Workbench Messages get String Prompt On Exit Dialog shell Title NON NLS 1 message IDE Workbench Messages get String Prompt On Exit Dialog choice NON NLS 1 false null null if dlg get Return Code I Dialog Constants OK ID return false if dlg get Toggle State store set Value IDE Internal Preferences EXIT PROMPT ON CLOSE LAST WINDOW false IDE Workbench Plugin get Default save Plugin Preferences return true  preWindowShellClose IWorkbenchWindowConfigurer windowConfigurer getWorkbenchConfigurer getWorkbench getWorkbenchWindowCount IPreferenceStore IDEWorkbenchPlugin getDefault getPreferenceStore promptOnExit getBoolean IDEInternalPreferences EXIT_PROMPT_ON_CLOSE_LAST_WINDOW promptOnExit productName IProduct getProduct productName getName productName IDEWorkbenchMessages getString PromptOnExitDialog IDEWorkbenchMessages PromptOnExitDialog productName MessageDialogWithToggle MessageDialogWithToggle openOkCancelConfirm windowConfigurer getWindow getShell IDEWorkbenchMessages getString PromptOnExitDialog shellTitle IDEWorkbenchMessages getString PromptOnExitDialog getReturnCode IDialogConstants OK_ID getToggleState setValue IDEInternalPreferences EXIT_PROMPT_ON_CLOSE_LAST_WINDOW IDEWorkbenchPlugin getDefault savePluginPreferences
hook up the listeners to update the window title window Configurer get Window add Page Listener new I Page Listener public void page Activated I Workbench Page page do nothing  windowConfigurer getWindow addPageListener IPageListener pageActivated IWorkbenchPage
do nothing public void page Closed I Workbench Page page update Title page get Workbench Window  pageClosed IWorkbenchPage updateTitle getWorkbenchWindow
update Title page get Workbench Window public void page Opened I Workbench Page page do nothing  updateTitle getWorkbenchWindow pageOpened IWorkbenchPage
window Configurer get Window add Perspective Listener new I Perspective Listener public void perspective Activated I Workbench Page page I Perspective Descriptor perspective update Title page get Workbench Window  windowConfigurer getWindow addPerspectiveListener IPerspectiveListener perspectiveActivated IWorkbenchPage IPerspectiveDescriptor updateTitle getWorkbenchWindow
update Title page get Workbench Window public void perspective Changed I Workbench Page page I Perspective Descriptor perspective String change Id do nothing  updateTitle getWorkbenchWindow perspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId
window Configurer get Window get Part Service add Part Listener new I Part Listener2 public void part Activated I Workbench Part Reference ref if ref instanceof I Editor Reference ref get Page get Active Editor null update Title ref get Page get Workbench Window  windowConfigurer getWindow getPartService addPartListener IPartListener2 partActivated IWorkbenchPartReference IEditorReference getPage getActiveEditor updateTitle getPage getWorkbenchWindow
public void part Brought To Top I Workbench Part Reference ref if ref instanceof I Editor Reference ref get Page get Active Editor null update Title ref get Page get Workbench Window  partBroughtToTop IWorkbenchPartReference IEditorReference getPage getActiveEditor updateTitle getPage getWorkbenchWindow
public void part Closed I Workbench Part Reference ref do nothing  partClosed IWorkbenchPartReference
do nothing public void part Deactivated I Workbench Part Reference ref do nothing  partDeactivated IWorkbenchPartReference
do nothing public void part Opened I Workbench Part Reference ref do nothing  partOpened IWorkbenchPartReference
do nothing public void part Hidden I Workbench Part Reference ref do nothing  partHidden IWorkbenchPartReference
do nothing public void part Visible I Workbench Part Reference ref do nothing  partVisible IWorkbenchPartReference
do nothing public void part Input Changed I Workbench Part Reference ref do nothing  partInputChanged IWorkbenchPartReference
public void pre Window Open I Workbench Window Configurer window Configurer show the shortcut bar and progress indicator which are hidden by default window Configurer set Show Perspective Bar true window Configurer set Show Fast View Bars true window Configurer set Show Progress Indicator true add the drag and drop support for the editor area window Configurer add Editor Area Transfer Editor Input Transfer get Instance window Configurer add Editor Area Transfer Resource Transfer get Instance window Configurer add Editor Area Transfer Marker Transfer get Instance window Configurer configure Editor Area Drop Listener new Editor Area Drop Adapter window Configurer get Window hook up the listeners to update the window title window Configurer get Window add Page Listener new I Page Listener public void page Activated I Workbench Page page do nothing public void page Closed I Workbench Page page update Title page get Workbench Window public void page Opened I Workbench Page page do nothing window Configurer get Window add Perspective Listener new I Perspective Listener public void perspective Activated I Workbench Page page I Perspective Descriptor perspective update Title page get Workbench Window public void perspective Changed I Workbench Page page I Perspective Descriptor perspective String change Id do nothing window Configurer get Window get Part Service add Part Listener new I Part Listener2 public void part Activated I Workbench Part Reference ref if ref instanceof I Editor Reference ref get Page get Active Editor null update Title ref get Page get Workbench Window public void part Brought To Top I Workbench Part Reference ref if ref instanceof I Editor Reference ref get Page get Active Editor null update Title ref get Page get Workbench Window public void part Closed I Workbench Part Reference ref do nothing public void part Deactivated I Workbench Part Reference ref do nothing public void part Opened I Workbench Part Reference ref do nothing public void part Hidden I Workbench Part Reference ref do nothing public void part Visible I Workbench Part Reference ref do nothing public void part Input Changed I Workbench Part Reference ref do nothing  preWindowOpen IWorkbenchWindowConfigurer windowConfigurer windowConfigurer setShowPerspectiveBar windowConfigurer setShowFastViewBars windowConfigurer setShowProgressIndicator windowConfigurer addEditorAreaTransfer EditorInputTransfer getInstance windowConfigurer addEditorAreaTransfer ResourceTransfer getInstance windowConfigurer addEditorAreaTransfer MarkerTransfer getInstance windowConfigurer configureEditorAreaDropListener EditorAreaDropAdapter windowConfigurer getWindow windowConfigurer getWindow addPageListener IPageListener pageActivated IWorkbenchPage pageClosed IWorkbenchPage updateTitle getWorkbenchWindow pageOpened IWorkbenchPage windowConfigurer getWindow addPerspectiveListener IPerspectiveListener perspectiveActivated IWorkbenchPage IPerspectiveDescriptor updateTitle getWorkbenchWindow perspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId windowConfigurer getWindow getPartService addPartListener IPartListener2 partActivated IWorkbenchPartReference IEditorReference getPage getActiveEditor updateTitle getPage getWorkbenchWindow partBroughtToTop IWorkbenchPartReference IEditorReference getPage getActiveEditor updateTitle getPage getWorkbenchWindow partClosed IWorkbenchPartReference partDeactivated IWorkbenchPartReference partOpened IWorkbenchPartReference partHidden IWorkbenchPartReference partVisible IWorkbenchPartReference partInputChanged IWorkbenchPartReference
public void post Window Restore I Workbench Window Configurer window Configurer throws Workbench Exception int index PlatformUI get Workbench get Workbench Window Count 1 if index 0 welcome Perspective Infos null index welcome Perspective Infos size find a page that exist in the window I Workbench Page page window Configurer get Window get Active Page if page null I Workbench Page pages window Configurer get Window get Pages if pages null pages length 0 page pages 0 if the window does not contain a page create one String perspective Id About Info welcome Perspective Infos get index get Welcome Perspective Id if page null I Adaptable root get Default Page Input page window Configurer get Window open Page perspective Id root else I Perspective Registry reg PlatformUI get Workbench get Perspective Registry I Perspective Descriptor desc reg find Perspective With Id perspective Id if desc null page set Perspective desc set the active page and open the welcome editor window Configurer get Window set Active Page page page open Editor new Welcome Editor Input About Info welcome Perspective Infos get index WELCOME EDITOR ID true  postWindowRestore IWorkbenchWindowConfigurer windowConfigurer WorkbenchException getWorkbench getWorkbenchWindowCount welcomePerspectiveInfos welcomePerspectiveInfos IWorkbenchPage windowConfigurer getWindow getActivePage IWorkbenchPage windowConfigurer getWindow getPages perspectiveId AboutInfo welcomePerspectiveInfos getWelcomePerspectiveId IAdaptable getDefaultPageInput windowConfigurer getWindow openPage perspectiveId IPerspectiveRegistry getWorkbench getPerspectiveRegistry IPerspectiveDescriptor findPerspectiveWithId perspectiveId setPerspective windowConfigurer getWindow setActivePage openEditor WelcomeEditorInput AboutInfo welcomePerspectiveInfos WELCOME_EDITOR_ID
public void post Window Close I Workbench Window Configurer window Configurer Workbench Action Builder a Workbench Action Builder window Configurer get Data ACTION BUILDER if a null window Configurer set Data ACTION BUILDER null a dispose  postWindowClose IWorkbenchWindowConfigurer windowConfigurer WorkbenchActionBuilder WorkbenchActionBuilder windowConfigurer getData ACTION_BUILDER windowConfigurer setData ACTION_BUILDER
dlg run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I Container root Resources Plugin get Workspace get Root root refresh Local I Resource DEPTH INFINITE monitor catch Core Exception e ex 0 e  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException IContainer ResourcesPlugin getWorkspace getRoot refreshLocal IResource DEPTH_INFINITE CoreException
private void refresh From Local String command Line Args Platform get Command Line Args I Preference Store store IDE Workbench Plugin get Default get Preference Store boolean refresh store get Boolean IDE Internal Preferences REFRESH WORKSPACE ON STARTUP if refresh return Do not refresh if it was already done by core on startup for int i 0 i command Line Args length i if command Line Args i equals Ignore Case refresh NON NLS 1 return I Workbench Window window get Workbench Configurer get Workbench get Active Workbench Window Shell shell window null null window get Shell Progress Monitor Dialog dlg new Progress Monitor Jobs Dialog shell final Core Exception ex new Core Exception 1 try dlg run true true new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I Container root Resources Plugin get Workspace get Root root refresh Local I Resource DEPTH INFINITE monitor catch Core Exception e ex 0 e if ex 0 null Error Dialog open Error shell IDE Workbench Messages get String Workspace problems Title NON NLS 1 IDE Workbench Messages get String Workspace problem Message NON NLS 1 ex 0 get Status catch Interrupted Exception e Do nothing Operation was canceled catch Invocation Target Exception e String msg Invocation Target Exception refreshing from local on startup NON NLS 1 IDE Workbench Plugin log msg new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH 0 msg e get Target Exception  refreshFromLocal commandLineArgs getCommandLineArgs IPreferenceStore IDEWorkbenchPlugin getDefault getPreferenceStore getBoolean IDEInternalPreferences REFRESH_WORKSPACE_ON_STARTUP commandLineArgs commandLineArgs equalsIgnoreCase IWorkbenchWindow getWorkbenchConfigurer getWorkbench getActiveWorkbenchWindow getShell ProgressMonitorDialog ProgressMonitorJobsDialog CoreException CoreException IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException IContainer ResourcesPlugin getWorkspace getRoot refreshLocal IResource DEPTH_INFINITE CoreException ErrorDialog openError IDEWorkbenchMessages getString problemsTitle IDEWorkbenchMessages getString problemMessage getStatus InterruptedException InvocationTargetException InvocationTargetException IDEWorkbenchPlugin IStatus IDEWorkbenchPlugin IDE_WORKBENCH getTargetException
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor try status merge Resources Plugin get Workspace save true monitor catch Core Exception e status merge e get Status  IRunnableWithProgress IRunnableWithProgress IProgressMonitor ResourcesPlugin getWorkspace CoreException getStatus
Disconnect from the core workspace private void disconnect From Workspace save the workspace final Multi Status status new Multi Status IDE Workbench Plugin IDE WORKBENCH 1 IDE Workbench Messages get String Problem Saving Workbench null NON NLS 1 I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor try status merge Resources Plugin get Workspace save true monitor catch Core Exception e status merge e get Status try new Progress Monitor Jobs Dialog null run true false runnable catch Invocation Target Exception e status merge new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH 1 IDE Workbench Messages get String Internal Error e get Target Exception NON NLS 1 catch Interrupted Exception e status merge new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH 1 IDE Workbench Messages get String Internal Error e NON NLS 1 Error Dialog open Error null IDE Workbench Messages get String Problems Saving Workspace NON NLS 1 null status I Status ERROR I Status WARNING if status isOK IDE Workbench Plugin log IDE Workbench Messages get String Problems Saving Workspace status NON NLS 1  disconnectFromWorkspace MultiStatus MultiStatus IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchMessages getString ProblemSavingWorkbench IRunnableWithProgress IRunnableWithProgress IProgressMonitor ResourcesPlugin getWorkspace CoreException getStatus ProgressMonitorJobsDialog InvocationTargetException IStatus IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchMessages getString InternalError getTargetException InterruptedException IStatus IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchMessages getString InternalError ErrorDialog openError IDEWorkbenchMessages getString ProblemsSavingWorkspace IStatus IStatus IDEWorkbenchPlugin IDEWorkbenchMessages getString ProblemsSavingWorkspace
Checks if the new Updates command line argument is present and if so opens the update manager private void check Updates boolean new Updates false String command Line Args Platform get Command Line Args for int i 0 i command Line Args length i if command Line Args i equals Ignore Case new Updates NON NLS 1 new Updates true break if new Updates try Site Manager handle New Changes catch Core Exception e IDE Workbench Plugin log Problem opening update manager e get Status NON NLS 1  newUpdates checkUpdates newUpdates commandLineArgs getCommandLineArgs commandLineArgs commandLineArgs equalsIgnoreCase newUpdates newUpdates newUpdates SiteManager handleNewChanges CoreException IDEWorkbenchPlugin getStatus
see org eclipse ui application Workbench Advisor is Application Menu public boolean is Application Menu I Workbench Window Configurer window Configurer String menuID Workbench Action Builder a Workbench Action Builder window Configurer get Data ACTION BUILDER return a is Container Menu menuID  WorkbenchAdvisor isApplicationMenu isApplicationMenu IWorkbenchWindowConfigurer windowConfigurer WorkbenchActionBuilder WorkbenchActionBuilder windowConfigurer getData ACTION_BUILDER isContainerMenu
see org eclipse ui application Workbench Advisor get Default Page Input public I Adaptable get Default Page Input return Resources Plugin get Workspace get Root  WorkbenchAdvisor getDefaultPageInput IAdaptable getDefaultPageInput ResourcesPlugin getWorkspace getRoot
public String get Initial Window Perspective Id int index PlatformUI get Workbench get Workbench Window Count 1 String perspective Id null if index 0 welcome Perspective Infos null index welcome Perspective Infos size perspective Id About Info welcome Perspective Infos get index get Welcome Perspective Id if perspective Id null perspective Id IDE RESOURCE PERSPECTIVE ID return perspective Id  getInitialWindowPerspectiveId getWorkbench getWorkbenchWindowCount perspectiveId welcomePerspectiveInfos welcomePerspectiveInfos perspectiveId AboutInfo welcomePerspectiveInfos getWelcomePerspectiveId perspectiveId perspectiveId RESOURCE_PERSPECTIVE_ID perspectiveId
private void open Welcome Editors I Workbench Window window if IDE Workbench Plugin get Default get Preference Store get Boolean IDE Internal Preferences WELCOME DIALOG show the welcome page for the product the first time the workbench opens I Product product Platform get Product if product null return About Info product Info new About Info product URL url product Info get Welcome PageURL if url null return IDE Workbench Plugin get Default get Preference Store set Value IDE Internal Preferences WELCOME DIALOG false open Welcome Editor window new Welcome Editor Input product Info null else Show the welcome page for any newly installed features List welcome Features new Array List for Iterator it get Newly Added Bundle Groups entry Set iterator it has Next Map Entry entry Map Entry it next String versioned Id String entry get Key String feature Id versioned Id substring 0 versioned Id index Of About Info info About Info entry get Value if info null info get Welcome PageURL null welcome Features add info activate the feature plug in so it can run some install code I Platform Configuration platform Configuration Boot Loader get Current Platform Configuration I Platform Configuration I Feature Entry feature platform Configuration find Configured Feature Entry feature Id if feature null String pi feature get Feature Plugin Identifier if pi null Platform get Plugin pi int w Count get Workbench Configurer get Workbench get Workbench Window Count for int i 0 i welcome Features size i About Info new Info About Info welcome Features get i String id new Info get Welcome Perspective Id Other editors were already opened in post Window Restore if id null i w Count open Welcome Editor window new Welcome Editor Input new Info id  openWelcomeEditors IWorkbenchWindow IDEWorkbenchPlugin getDefault getPreferenceStore getBoolean IDEInternalPreferences WELCOME_DIALOG IProduct getProduct AboutInfo productInfo AboutInfo productInfo getWelcomePageURL IDEWorkbenchPlugin getDefault getPreferenceStore setValue IDEInternalPreferences WELCOME_DIALOG openWelcomeEditor WelcomeEditorInput productInfo welcomeFeatures ArrayList getNewlyAddedBundleGroups entrySet hasNext versionedId getKey featureId versionedId versionedId indexOf AboutInfo AboutInfo getValue getWelcomePageURL welcomeFeatures IPlatformConfiguration platformConfiguration BootLoader getCurrentPlatformConfiguration IPlatformConfiguration IFeatureEntry platformConfiguration findConfiguredFeatureEntry featureId getFeaturePluginIdentifier getPlugin wCount getWorkbenchConfigurer getWorkbench getWorkbenchWindowCount welcomeFeatures AboutInfo newInfo AboutInfo welcomeFeatures newInfo getWelcomePerspectiveId postWindowRestore wCount openWelcomeEditor WelcomeEditorInput newInfo
Returns the map of versioned feature ids info object for all installed features The format of the versioned feature id the key of the map is feature Id version Id return map of versioned feature ids info object key type code String code value type code About Info code since 3 0 private Map compute Bundle Group Map use tree map to get predicable order Map ids new Tree Map I Bundle Group Provider providers Platform get Bundle Group Providers for int i 0 i providers length i I Bundle Group groups providers i get Bundle Groups for int j 0 j groups length j I Bundle Group group groups j About Info info new About Info group String version info get Version Id version version null 0 0 0 NON NLS 1 new Plugin Version Identifier version to String String versioned Feature group get Identifier version NON NLS 1 ids put versioned Feature info return ids  featureId versionId AboutInfo computeBundleGroupMap TreeMap IBundleGroupProvider getBundleGroupProviders IBundleGroup getBundleGroups IBundleGroup AboutInfo AboutInfo getVersionId PluginVersionIdentifier toString versionedFeature getIdentifier versionedFeature
Returns the ordered map of versioned feature ids About Info that are new for this session return ordered map of versioned feature ids key type code String code infos value type code About Info code private Map get Newly Added Bundle Groups if newly Added Bundle Groups null newly Added Bundle Groups create New Bundle Groups Map return newly Added Bundle Groups  AboutInfo AboutInfo getNewlyAddedBundleGroups newlyAddedBundleGroups newlyAddedBundleGroups createNewBundleGroupsMap newlyAddedBundleGroups
Updates the old features setting and returns a map of new features private Map create New Bundle Groups Map retrieve list of installed bundle groups from last session I Dialog Settings settings IDE Workbench Plugin get Default get Dialog Settings String previous Features Array settings get Array INSTALLED FEATURES get a map of currently installed bundle groups and store it for next session Map bundle Groups compute Bundle Group Map String current Features Array new String bundle Groups size bundle Groups key Set to Array current Features Array settings put INSTALLED FEATURES current Features Array remove the previously known from the current set if previous Features Array null for int i 0 i previous Features Array length i bundle Groups remove previous Features Array i return bundle Groups  createNewBundleGroupsMap IDialogSettings IDEWorkbenchPlugin getDefault getDialogSettings previousFeaturesArray getArray INSTALLED_FEATURES bundleGroups computeBundleGroupMap currentFeaturesArray bundleGroups bundleGroups keySet toArray currentFeaturesArray INSTALLED_FEATURES currentFeaturesArray previousFeaturesArray previousFeaturesArray bundleGroups previousFeaturesArray bundleGroups
private void open Welcome Editor I Workbench Window window Welcome Editor Input input String perspective Id if get Workbench Configurer get Workbench get Workbench Window Count 0 Something is wrong there should be at least one workbench window open by now return I Workbench Window win window if perspective Id null try win get Workbench Configurer get Workbench open Workbench Window perspective Id get Default Page Input if win null win window catch Workbench Exception e IDE Workbench Plugin log Error opening window with welcome perspective e get Status NON NLS 1 return if win null win get Workbench Configurer get Workbench get Workbench Windows 0 I Workbench Page page win get Active Page String id perspective Id if id null id get Workbench Configurer get Workbench get Perspective Registry get Default Perspective if page null try page win open Page id get Default Page Input catch Workbench Exception e Error Dialog open Error win get Shell IDE Workbench Messages get String Problems Opening Page NON NLS 1 e get Message e get Status if page null return if page get Perspective null try page get Workbench Configurer get Workbench show Perspective id win catch Workbench Exception e Error Dialog open Error win get Shell IDE Workbench Messages get String Workbench open Editor Error Dialog Title NON NLS 1 IDE Workbench Messages get String Workbench open Editor Error Dialog Message NON NLS 1 e get Status return page set Editor Area Visible true see if we already have an editor I Editor Part editor page find Editor input if editor null page activate editor return try page open Editor input WELCOME EDITOR ID catch Part Init Exception e Error Dialog open Error win get Shell IDE Workbench Messages get String Workbench open Editor Error Dialog Title NON NLS 1 IDE Workbench Messages get String Workbench open Editor Error Dialog Message NON NLS 1 e get Status return  openWelcomeEditor IWorkbenchWindow WelcomeEditorInput perspectiveId getWorkbenchConfigurer getWorkbench getWorkbenchWindowCount IWorkbenchWindow perspectiveId getWorkbenchConfigurer getWorkbench openWorkbenchWindow perspectiveId getDefaultPageInput WorkbenchException IDEWorkbenchPlugin getStatus getWorkbenchConfigurer getWorkbench getWorkbenchWindows IWorkbenchPage getActivePage perspectiveId getWorkbenchConfigurer getWorkbench getPerspectiveRegistry getDefaultPerspective openPage getDefaultPageInput WorkbenchException ErrorDialog openError getShell IDEWorkbenchMessages getString Problems_Opening_Page getMessage getStatus getPerspective getWorkbenchConfigurer getWorkbench showPerspective WorkbenchException ErrorDialog openError getShell IDEWorkbenchMessages getString openEditorErrorDialogTitle IDEWorkbenchMessages getString openEditorErrorDialogMessage getStatus setEditorAreaVisible IEditorPart findEditor openEditor WELCOME_EDITOR_ID PartInitException ErrorDialog openError getShell IDEWorkbenchMessages getString openEditorErrorDialogTitle IDEWorkbenchMessages getString openEditorErrorDialogMessage getStatus
Updates the window title Format will be page Input current Perspective editor Input workspace Location product Name param window The window being updated private void update Title I Workbench Window window I Workbench Window Configurer window Configurer get Workbench Configurer get Window Configurer window String title null I Product product Platform get Product if product null title product get Name if title null title NON NLS 1 if workspace Location null title IDE Workbench Messages format Workbench Window shell Title new Object workspace Location title NON NLS 1 I Workbench Page current Page window get Active Page if current Page null I Editor Part editor current Page get Active Editor if editor null String editor Title editor get Title title IDE Workbench Messages format Workbench Window shell Title new Object editor Title title NON NLS 1 I Perspective Descriptor persp current Page get Perspective String label NON NLS 1 if persp null label persp get Label I Adaptable input current Page get Input if input null input equals get Default Page Input label current Page get Label if label null label equals NON NLS 1 title IDE Workbench Messages format Workbench Window shell Title new Object label title NON NLS 1 window Configurer set Title title  pageInput currentPerspective editorInput workspaceLocation productName updateTitle IWorkbenchWindow IWorkbenchWindowConfigurer windowConfigurer getWorkbenchConfigurer getWindowConfigurer IProduct getProduct getName workspaceLocation IDEWorkbenchMessages WorkbenchWindow shellTitle workspaceLocation IWorkbenchPage currentPage getActivePage currentPage IEditorPart currentPage getActiveEditor editorTitle getTitle IDEWorkbenchMessages WorkbenchWindow shellTitle editorTitle IPerspectiveDescriptor currentPage getPerspective getLabel IAdaptable currentPage getInput getDefaultPageInput currentPage getLabel IDEWorkbenchMessages WorkbenchWindow shellTitle windowConfigurer setTitle
Declares all IDE specific workbench images This includes both shared images named in link IDE Shared Images and internal images named in link org eclipse ui internal ide IDE Internal Workbench Images see I Workbench Configurer declare Image private void declare Workbench Images final String ICONS PATH icons full NON NLS 1 final String PATH ELOCALTOOL ICONS PATH elcl16 Enabled toolbar icons NON NLS 1 final String PATH ETOOL ICONS PATH etool16 Enabled toolbar icons NON NLS 1 final String PATH DTOOL ICONS PATH dtool16 Disabled toolbar icons NON NLS 1 final String PATH OBJECT ICONS PATH obj16 Model object icons NON NLS 1 final String PATH WIZBAN ICONS PATH wizban Wizard icons NON NLS 1 Bundle ide Bundle Platform get Bundle IDE Workbench Plugin IDE WORKBENCH declare Workbench Image ide Bundle I Shared Images IMG TOOL NEW WIZARD PATH ETOOL new wiz gif true NON NLS 1 declare Workbench Image ide Bundle I Shared Images IMG TOOL NEW WIZARD HOVER PATH ETOOL new wiz gif true NON NLS 1 declare Workbench Image ide Bundle I Shared Images IMG TOOL NEW WIZARD DISABLED PATH DTOOL new wiz gif true NON NLS 1 declare Workbench Image ide Bundle I Workbench Graphic Constants IMG ETOOL IMPORT WIZ PATH ETOOL import wiz gif false NON NLS 1 declare Workbench Image ide Bundle I Workbench Graphic Constants IMG ETOOL EXPORT WIZ PATH ETOOL export wiz gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG ETOOL BUILD EXEC PATH ETOOL build exec gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG ETOOL BUILD EXEC HOVER PATH ETOOL build exec gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG ETOOL BUILD EXEC DISABLED PATH DTOOL build exec gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG ETOOL SEARCH SRC PATH ETOOL search src gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG ETOOL SEARCH SRC HOVER PATH ETOOL search src gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG ETOOL SEARCH SRC DISABLED PATH DTOOL search src gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG ETOOL NEXT NAV PATH ETOOL next nav gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG ETOOL PREVIOUS NAV PATH ETOOL prev nav gif false NON NLS 1 declare Workbench Image ide Bundle I Workbench Graphic Constants IMG WIZBAN NEW WIZ PATH WIZBAN new wiz gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG WIZBAN NEWPRJ WIZ PATH WIZBAN newprj wiz gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG WIZBAN NEWFOLDER WIZ PATH WIZBAN newfolder wiz gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG WIZBAN NEWFILE WIZ PATH WIZBAN newfile wiz gif false NON NLS 1 declare Workbench Image ide Bundle I Workbench Graphic Constants IMG WIZBAN IMPORT WIZ PATH WIZBAN import wiz gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG WIZBAN IMPORTDIR WIZ PATH WIZBAN importdir wiz gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG WIZBAN IMPORTZIP WIZ PATH WIZBAN importzip wiz gif false NON NLS 1 declare Workbench Image ide Bundle I Workbench Graphic Constants IMG WIZBAN EXPORT WIZ PATH WIZBAN export wiz gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG WIZBAN EXPORTDIR WIZ PATH WIZBAN exportdir wiz gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG WIZBAN EXPORTZIP WIZ PATH WIZBAN exportzip wiz gif false NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG WIZBAN RESOURCEWORKINGSET WIZ PATH WIZBAN workset wiz gif false NON NLS 1 declare Workbench Image ide Bundle IDE Shared Images IMG OBJ PROJECT PATH OBJECT prj obj gif true NON NLS 1 declare Workbench Image ide Bundle IDE Shared Images IMG OBJ PROJECT CLOSED PATH OBJECT cprj obj gif true NON NLS 1 declare Workbench Image ide Bundle IDE Shared Images IMG OPEN MARKER PATH ELOCALTOOL gotoobj tsk gif true NON NLS 1 task objects declare Registry Image IDE Internal Workbench Images IMG OBJS HPRIO TSK PATH OBJECT hprio tsk gif declare Registry Image IDE Internal Workbench Images IMG OBJS MPRIO TSK PATH OBJECT mprio tsk gif declare Registry Image IDE Internal Workbench Images IMG OBJS LPRIO TSK PATH OBJECT lprio tsk gif declare Workbench Image ide Bundle IDE Shared Images IMG OBJS TASK TSK PATH OBJECT taskmrk tsk gif true NON NLS 1 declare Workbench Image ide Bundle IDE Shared Images IMG OBJS BKMRK TSK PATH OBJECT bkmrk tsk gif true NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG OBJS COMPLETE TSK PATH OBJECT complete tsk gif true NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG OBJS INCOMPLETE TSK PATH OBJECT incomplete tsk gif true NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG OBJS WELCOME ITEM PATH OBJECT welcome item gif true NON NLS 1 declare Workbench Image ide Bundle IDE Internal Workbench Images IMG OBJS WELCOME BANNER PATH OBJECT welcome banner gif true NON NLS 1 synchronization indicator objects declare Registry Image IDE Internal Workbench Images IMG OBJS WBET STAT PATH OVERLAY wbet stat gif declare Registry Image IDE Internal Workbench Images IMG OBJS SBET STAT PATH OVERLAY sbet stat gif declare Registry Image IDE Internal Workbench Images IMG OBJS CONFLICT STAT PATH OVERLAY conflict stat gif content locality indicator objects declare Registry Image IDE Internal Workbench Images IMG OBJS NOTLOCAL STAT PATH STAT notlocal stat gif declare Registry Image IDE Internal Workbench Images IMG OBJS LOCAL STAT PATH STAT local stat gif declare Registry Image IDE Internal Workbench Images IMG OBJS FILLLOCAL STAT PATH STAT filllocal stat gif  SharedImages IDEInternalWorkbenchImages IWorkbenchConfigurer declareImage declareWorkbenchImages ICONS_PATH PATH_ELOCALTOOL ICONS_PATH PATH_ETOOL ICONS_PATH PATH_DTOOL ICONS_PATH PATH_OBJECT ICONS_PATH PATH_WIZBAN ICONS_PATH ideBundle getBundle IDEWorkbenchPlugin IDE_WORKBENCH declareWorkbenchImage ideBundle ISharedImages IMG_TOOL_NEW_WIZARD PATH_ETOOL new_wiz declareWorkbenchImage ideBundle ISharedImages IMG_TOOL_NEW_WIZARD_HOVER PATH_ETOOL new_wiz declareWorkbenchImage ideBundle ISharedImages IMG_TOOL_NEW_WIZARD_DISABLED PATH_DTOOL new_wiz declareWorkbenchImage ideBundle IWorkbenchGraphicConstants IMG_ETOOL_IMPORT_WIZ PATH_ETOOL import_wiz declareWorkbenchImage ideBundle IWorkbenchGraphicConstants IMG_ETOOL_EXPORT_WIZ PATH_ETOOL export_wiz declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_ETOOL_BUILD_EXEC PATH_ETOOL build_exec declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_ETOOL_BUILD_EXEC_HOVER PATH_ETOOL build_exec declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_ETOOL_BUILD_EXEC_DISABLED PATH_DTOOL build_exec declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_ETOOL_SEARCH_SRC PATH_ETOOL search_src declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_ETOOL_SEARCH_SRC_HOVER PATH_ETOOL search_src declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_ETOOL_SEARCH_SRC_DISABLED PATH_DTOOL search_src declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_ETOOL_NEXT_NAV PATH_ETOOL next_nav declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_ETOOL_PREVIOUS_NAV PATH_ETOOL prev_nav declareWorkbenchImage ideBundle IWorkbenchGraphicConstants IMG_WIZBAN_NEW_WIZ PATH_WIZBAN new_wiz declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_WIZBAN_NEWPRJ_WIZ PATH_WIZBAN newprj_wiz declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_WIZBAN_NEWFOLDER_WIZ PATH_WIZBAN newfolder_wiz declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_WIZBAN_NEWFILE_WIZ PATH_WIZBAN newfile_wiz declareWorkbenchImage ideBundle IWorkbenchGraphicConstants IMG_WIZBAN_IMPORT_WIZ PATH_WIZBAN import_wiz declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_WIZBAN_IMPORTDIR_WIZ PATH_WIZBAN importdir_wiz declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_WIZBAN_IMPORTZIP_WIZ PATH_WIZBAN importzip_wiz declareWorkbenchImage ideBundle IWorkbenchGraphicConstants IMG_WIZBAN_EXPORT_WIZ PATH_WIZBAN export_wiz declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_WIZBAN_EXPORTDIR_WIZ PATH_WIZBAN exportdir_wiz declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_WIZBAN_EXPORTZIP_WIZ PATH_WIZBAN exportzip_wiz declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_WIZBAN_RESOURCEWORKINGSET_WIZ PATH_WIZBAN workset_wiz declareWorkbenchImage ideBundle SharedImages IMG_OBJ_PROJECT PATH_OBJECT prj_obj declareWorkbenchImage ideBundle SharedImages IMG_OBJ_PROJECT_CLOSED PATH_OBJECT cprj_obj declareWorkbenchImage ideBundle SharedImages IMG_OPEN_MARKER PATH_ELOCALTOOL gotoobj_tsk declareRegistryImage IDEInternalWorkbenchImages IMG_OBJS_HPRIO_TSK PATH_OBJECT hprio_tsk declareRegistryImage IDEInternalWorkbenchImages IMG_OBJS_MPRIO_TSK PATH_OBJECT mprio_tsk declareRegistryImage IDEInternalWorkbenchImages IMG_OBJS_LPRIO_TSK PATH_OBJECT lprio_tsk declareWorkbenchImage ideBundle SharedImages IMG_OBJS_TASK_TSK PATH_OBJECT taskmrk_tsk declareWorkbenchImage ideBundle SharedImages IMG_OBJS_BKMRK_TSK PATH_OBJECT bkmrk_tsk declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_OBJS_COMPLETE_TSK PATH_OBJECT complete_tsk declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_OBJS_INCOMPLETE_TSK PATH_OBJECT incomplete_tsk declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_OBJS_WELCOME_ITEM PATH_OBJECT welcome_item declareWorkbenchImage ideBundle IDEInternalWorkbenchImages IMG_OBJS_WELCOME_BANNER PATH_OBJECT welcome_banner declareRegistryImage IDEInternalWorkbenchImages IMG_OBJS_WBET_STAT PATH_OVERLAY wbet_stat declareRegistryImage IDEInternalWorkbenchImages IMG_OBJS_SBET_STAT PATH_OVERLAY sbet_stat declareRegistryImage IDEInternalWorkbenchImages IMG_OBJS_CONFLICT_STAT PATH_OVERLAY conflict_stat declareRegistryImage IDEInternalWorkbenchImages IMG_OBJS_NOTLOCAL_STAT PATH_STAT notlocal_stat declareRegistryImage IDEInternalWorkbenchImages IMG_OBJS_LOCAL_STAT PATH_STAT local_stat declareRegistryImage IDEInternalWorkbenchImages IMG_OBJS_FILLLOCAL_STAT PATH_STAT filllocal_stat
Declares an IDE specific workbench image param symbolic Name the symbolic name of the image param path the path of the image file this path is relative to the base of the IDE plug in param shared code true code if this is a shared image and code false code if this is not a shared image see I Workbench Configurer declare Image private void declare Workbench Image Bundle ide Bundle String symbolic Name String path boolean shared URL url ide Bundle get Entry path Image Descriptor desc Image Descriptor create FromURL url get Workbench Configurer declare Image symbolic Name desc shared  symbolicName IWorkbenchConfigurer declareImage declareWorkbenchImage ideBundle symbolicName ideBundle getEntry ImageDescriptor ImageDescriptor createFromURL getWorkbenchConfigurer declareImage symbolicName
public void fill Action Bars I Workbench Window window I Action Bar Configurer action Configurer int flags setup the action builder to populate the toolbar and menubar in the configurer Workbench Action Builder action Builder null I Workbench Window Configurer window Configurer get Workbench Configurer get Window Configurer window For proxy calls to this method it is important that we use the same object associated with the window Configurer action Builder Workbench Action Builder window Configurer get Data ACTION BUILDER if action Builder null action Builder new Workbench Action Builder window if flags FILL PROXY 0 Filling in fake actionbars if flags FILL MENU BAR 0 action Builder populate Menu Bar action Configurer if flags FILL COOL BAR 0 action Builder populate Cool Bar action Configurer else make fill and hook listeners to action builder reference to I Workbench Configurer is need for the ABOUT action window Configurer set Data ACTION BUILDER action Builder action Builder make And Populate Actions get Workbench Configurer action Configurer  fillActionBars IWorkbenchWindow IActionBarConfigurer actionConfigurer WorkbenchActionBuilder actionBuilder IWorkbenchWindowConfigurer windowConfigurer getWorkbenchConfigurer getWindowConfigurer windowConfigurer actionBuilder WorkbenchActionBuilder windowConfigurer getData ACTION_BUILDER actionBuilder actionBuilder WorkbenchActionBuilder FILL_PROXY FILL_MENU_BAR actionBuilder populateMenuBar actionConfigurer FILL_COOL_BAR actionBuilder populateCoolBar actionConfigurer IWorkbenchConfigurer windowConfigurer setData ACTION_BUILDER actionBuilder actionBuilder makeAndPopulateActions getWorkbenchConfigurer actionConfigurer
see org eclipse ui application Workbench Advisor get Main Preference Page Id public String get Main Preference Page Id indicate that we want the Workench preference page to be prominent return WORKBENCH PREFERENCE CATEGORY ID  WorkbenchAdvisor getMainPreferencePageId getMainPreferencePageId WORKBENCH_PREFERENCE_CATEGORY_ID
Tries to open the intro if one exists and otherwise will open the legacy Welcome pages see org eclipse ui application Workbench Advisor open Intro org eclipse ui application I Workbench Window Configurer public void open Intro I Workbench Window Configurer window Configurer if editors And Intros Opened return editors And Intros Opened true don t try to open the welcome editors if there is an intro if has Intro super open Intro window Configurer else open Welcome Editors window Configurer get Window save any preferences changes caused by the above actions IDE Workbench Plugin get Default save Plugin Preferences  WorkbenchAdvisor openIntro IWorkbenchWindowConfigurer openIntro IWorkbenchWindowConfigurer windowConfigurer editorsAndIntrosOpened editorsAndIntrosOpened hasIntro openIntro windowConfigurer openWelcomeEditors windowConfigurer getWindow IDEWorkbenchPlugin getDefault savePluginPreferences
Return true if the intro plugin is present and false otherwise private boolean has Intro I Workbench Configurer wc get Workbench Configurer return wc null false wc get Workbench get Intro Manager has Intro  hasIntro IWorkbenchConfigurer getWorkbenchConfigurer getWorkbench getIntroManager hasIntro
Returns the workbench action builder for the given window param window return Workbench Action Builder static Workbench Action Builder get Action Builder I Workbench Window window I Workbench Window Configurer configurer workbench Advisor get Workbench Configurer get Window Configurer window return Workbench Action Builder configurer get Data Action Builder NON NLS 1  WorkbenchActionBuilder WorkbenchActionBuilder getActionBuilder IWorkbenchWindow IWorkbenchWindowConfigurer workbenchAdvisor getWorkbenchConfigurer getWindowConfigurer WorkbenchActionBuilder getData ActionBuilder

private static Resource Bundle bundle Resource Bundle get Bundle RESOURCE BUNDLE private IDE Workbench Messages prevent instantiation of class  ResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE IDEWorkbenchMessages
Returns the formatted message for the given key in the 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  MessageFormat getString
Returns the resource object with the given key in the 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  getString getString MissingResourceException
Returns the resource object with the given key in the resource bundle If there isn t any value under the given key the default value is returned param key the resource name param def the default value return the string public static String get String String key String def try return bundle get String key catch Missing Resource Exception e return def  getString getString MissingResourceException

Create an instance of the IDE Workbench Plugin The workbench plugin is effectively the application for the workbench UI The entire UI operates as a good plugin citizen public IDE Workbench Plugin I Plugin Descriptor descriptor super descriptor inst this  IDEWorkbenchPlugin IDEWorkbenchPlugin IPluginDescriptor
Busy Indicator show While null new Runnable public void run try ret 0 element create Executable Extension class Attribute catch Core Exception e exc 0 e  BusyIndicator showWhile createExecutableExtension classAttribute CoreException
Creates an extension If the extension plugin has not been loaded a busy cursor will be activated during the duration of the load param element the config element defining the extension param class Attribute the name of the attribute carrying the class return Object the extension object throws Core Exception public static Object create Extension final I Configuration Element element final String class Attribute throws Core Exception If plugin has been loaded create extension Otherwise show busy cursor then create extension I Plugin Descriptor plugin element get Declaring Extension get Declaring Plugin Descriptor if plugin is Plugin Activated return element create Executable Extension class Attribute else final Object ret new Object 1 final Core Exception exc new Core Exception 1 Busy Indicator show While null new Runnable public void run try ret 0 element create Executable Extension class Attribute catch Core Exception e exc 0 e if exc 0 null throw exc 0 else return ret 0  classAttribute CoreException createExtension IConfigurationElement classAttribute CoreException IPluginDescriptor getDeclaringExtension getDeclaringPluginDescriptor isPluginActivated createExecutableExtension classAttribute CoreException CoreException BusyIndicator showWhile createExecutableExtension classAttribute CoreException
see Abstract Plugin for the typical implementation pattern for plugin classes public static IDE Workbench Plugin get Default return inst  AbstractPlugin IDEWorkbenchPlugin getDefault
Return the workspace used by the workbench This method is internal to the workbench and must not be called by any plugins public static I Workspace get Plugin Workspace return Resources Plugin get Workspace  IWorkspace getPluginWorkspace ResourcesPlugin getWorkspace
Log the given status to the ISV log When to use this This should be used when a Plugin Exception or a Extension Exception occur but for which an error dialog cannot be safely shown If you can show an Error Dialog then do so and do not call this method If you have a plugin exception or core exception in hand call log String I Status This convenience method is for internal use by the Workbench only and must not be called outside the workbench This method is supported in the event the log allows plugin related information to be logged 1FTTJKV This would be done by this method This method is internal to the workbench and must not be called by any plugins or examples param message A high level UI message describing when the problem happened public static void log String message get Default get Log log Status Util new Status I Status ERROR message null System err println message 1FTTJKV ITPCORE ALL log status does not allow plugin information to be recorded  PluginException ExtensionException ErrorDialog IStatus getDefault getLog StatusUtil newStatus IStatus
Log the given status to the ISV log When to use this This should be used when a Plugin Exception or a Extension Exception occur but for which an error dialog cannot be safely shown If you can show an Error Dialog then do so and do not call this method This convenience method is for internal use by the workbench only and must not be called outside the workbench This method is supported in the event the log allows plugin related information to be logged 1FTTJKV This would be done by this method This method is internal to the workbench and must not be called by any plugins or examples param message A high level UI message describing when the problem happened May be null param status The status describing the problem Must not be null public static void log String message I Status status 1FTUHE0 ITPCORE ALL API Status logging loss of semantic info if message null get Default get Log log Status Util new Status I Status ERROR message null System err println message n Reason NON NLS 1 get Default get Log log status System err println status get Message 1FTTJKV ITPCORE ALL log status does not allow plugin information to be recorded  PluginException ExtensionException ErrorDialog IStatus getDefault getLog StatusUtil newStatus IStatus nReason getDefault getLog getMessage
Method declared on AbstractUI Plugin protected void refresh Plugin Actions do nothing  AbstractUIPlugin refreshPluginActions
Set default preference values This method must be called whenever the preference store is initially loaded because the default values are not stored in the preference store protected void initialize Default Preferences I Preference Store store store set Default IDE Internal Preferences SAVE ALL BEFORE BUILD false store set Default IDE Internal Preferences SAVE INTERVAL 5 5 minutes store set Default IDE Internal Preferences WELCOME DIALOG true store set Default IDE Internal Preferences REFRESH WORKSPACE ON STARTUP false store set Default IDE Internal Preferences EXIT PROMPT ON CLOSE LAST WINDOW true store set Default IDE Internal Preferences PROJECT SWITCH PERSP MODE IDE Internal Preferences PSPM PROMPT store set Default IDE Preferences PROJECT OPEN NEW PERSPECTIVE I Workbench Preference Constants OPEN PERSPECTIVE REPLACE  initializeDefaultPreferences IPreferenceStore setDefault IDEInternalPreferences SAVE_ALL_BEFORE_BUILD setDefault IDEInternalPreferences SAVE_INTERVAL setDefault IDEInternalPreferences WELCOME_DIALOG setDefault IDEInternalPreferences REFRESH_WORKSPACE_ON_STARTUP setDefault IDEInternalPreferences EXIT_PROMPT_ON_CLOSE_LAST_WINDOW setDefault IDEInternalPreferences PROJECT_SWITCH_PERSP_MODE IDEInternalPreferences PSPM_PROMPT setDefault PROJECT_OPEN_NEW_PERSPECTIVE IWorkbenchPreferenceConstants OPEN_PERSPECTIVE_REPLACE
Return the manager that maps project nature ids to images public Project Image Registry get Project Image Registry if project Image Registry null project Image Registry new Project Image Registry project Image Registry load return project Image Registry  ProjectImageRegistry getProjectImageRegistry projectImageRegistry projectImageRegistry ProjectImageRegistry projectImageRegistry projectImageRegistry
Returns the marker image provider registry for the workbench return the marker image provider registry public Marker Image Provider Registry get Marker Image Provider Registry if marker Image Provider Registry null marker Image Provider Registry new Marker Image Provider Registry return marker Image Provider Registry  MarkerImageProviderRegistry getMarkerImageProviderRegistry markerImageProviderRegistry markerImageProviderRegistry MarkerImageProviderRegistry markerImageProviderRegistry
Returns the capability registry for the workbench return the capability registry public Capability Registry get Capability Registry if capability Registry null capability Registry new Capability Registry capability Registry load return capability Registry  CapabilityRegistry getCapabilityRegistry capabilityRegistry capabilityRegistry CapabilityRegistry capabilityRegistry capabilityRegistry
Returns the about information of all known features omitting any features which are missing this information return a possibly empty list of about infos public About Info get Feature Infos cannot be cached since bundle groups come and go List infos new Array List add an entry for each bundle group I Bundle Group Provider providers Platform get Bundle Group Providers if providers null for int i 0 i providers length i I Bundle Group bundle Groups providers i get Bundle Groups for int j 0 j bundle Groups length j infos add new About Info bundle Groups j return About Info infos to Array new About Info infos size  AboutInfo getFeatureInfos ArrayList IBundleGroupProvider getBundleGroupProviders IBundleGroup bundleGroups getBundleGroups bundleGroups AboutInfo bundleGroups AboutInfo toArray AboutInfo
Returns the about information of the primary feature return info about the primary feature or code null code if there is no primary feature or if this information is unavailable public About Info get Primary Info I Product product Platform get Product return product null null new About Info product  AboutInfo getPrimaryInfo IProduct getProduct AboutInfo

public interface I Marker Image Provider Returns the relative path for the image to be used for displaying an marker in the workbench This path is relative to the plugin location Returns code null code if there is no appropriate image param marker The marker to get an image path for see org eclipse jface resource File Image Descriptor  IMarkerImageProvider FileImageDescriptor

Creates a new code Linked Resource Decorator code public Linked Resource Decorator  LinkedResourceDecorator LinkedResourceDecorator
see org eclipse jface viewers I Base Label Provider add Listener I Label Provider Listener public void add Listener I Label Provider Listener listener  IBaseLabelProvider addListener ILabelProviderListener addListener ILabelProviderListener
see org eclipse jface viewers I Base Label Provider dispose public void dispose no resources to dispose  IBaseLabelProvider
see org eclipse jface viewers I Base Label Provider is Label Property java lang Object java lang String public boolean is Label Property Object element String property return false  IBaseLabelProvider isLabelProperty isLabelProperty
see org eclipse jface viewers I Base Label Provider remove Listener I Label Provider Listener public void remove Listener I Label Provider Listener listener  IBaseLabelProvider removeListener ILabelProviderListener removeListener ILabelProviderListener
Adds the linked resource overlay if the given element is a linked resource param element element to decorate param decoration The decoration we are adding to return the linked resource overlay or null if element is not a linked resource see org eclipse jface viewers I Lightweight Label Decorator decorate Object I Decoration public void decorate Object element I Decoration decoration if element instanceof I Resource false return I Resource resource I Resource element if resource is Linked I Path location resource get Location if location null location to File exists decoration add Overlay LINK else decoration add Overlay LINK WARNING  ILightweightLabelDecorator IDecoration IDecoration IResource IResource IResource isLinked IPath getLocation toFile addOverlay addOverlay LINK_WARNING

private Checkbox Table Viewerlist Viewer Create an instance of this class Use this constructor if you wish to specify the width and or height of the combined widget to only hardcode one of the sizing dimensions specify the other dimension s value as 1 param parent param root Object param tree Content Provider param tree Label Provider param list Content Provider param list Label Provider param style param width param height public Checkbox Tree And List Group Composite parent Object root Object I Tree Content Provider tree Content Provider I Label Provider tree Label Provider I Structured Content Provider list Content Provider I Label Provider list Label Provider int style int width int height root root Object this tree Content Provider tree Content Provider this list Content Provider list Content Provider this tree Label Provider tree Label Provider this list Label Provider list Label Provider create Contents parent width height style  privateCheckboxTableViewerlistViewer rootObject treeContentProvider treeLabelProvider listContentProvider listLabelProvider CheckboxTreeAndListGroup rootObject ITreeContentProvider treeContentProvider ILabelProvider treeLabelProvider IStructuredContentProvider listContentProvider ILabelProvider listLabelProvider rootObject treeContentProvider treeContentProvider listContentProvider listContentProvider treeLabelProvider treeLabelProvider listLabelProvider listLabelProvider createContents
This method must be called just before this window becomes visible public void about To Open determine White Checked Descendents root check New Tree Elements tree Content Provider get Elements root current Tree Selection null select the first element in the list Object elements tree Content Provider get Elements root Object primary elements length 0 elements 0 null if primary null tree Viewer set Selection new Structured Selection primary tree Viewer get Control set Focus  aboutToOpen determineWhiteCheckedDescendents checkNewTreeElements treeContentProvider getElements currentTreeSelection treeContentProvider getElements treeViewer setSelection StructuredSelection treeViewer getControl setFocus
Add the passed listener to self s collection of clients that listen for changes to element checked states param listener I Check State Listener public void add Check State Listener I Check State Listener listener listeners add listener  ICheckStateListener addCheckStateListener ICheckStateListener
Add the receiver and all of it s ancestors to the checked State Store if they are not already there private void add To Hierarchy To Checked Store Object tree Element if this tree element is already gray then its ancestors all are as well if checked State Store contains Key tree Element checked State Store put tree Element new Array List Object parent tree Content Provider get Parent tree Element if parent null add To Hierarchy To Checked Store parent  checkedStateStore addToHierarchyToCheckedStore treeElement checkedStateStore containsKey treeElement checkedStateStore treeElement ArrayList treeContentProvider getParent treeElement addToHierarchyToCheckedStore
Return a boolean indicating whether all children of the passed tree element are currently white checked return boolean param tree Element java lang Object protected boolean are All Children White Checked Object tree Element Object children tree Content Provider get Children tree Element for int i 0 i children length i if white Checked Tree Items contains children i return false return true  treeElement areAllChildrenWhiteChecked treeElement treeContentProvider getChildren treeElement whiteCheckedTreeItems
Return a boolean indicating whether all list elements associated with the passed tree element are currently checked return boolean param tree Element java lang Object protected boolean are All Elements Checked Object tree Element List checked Elements List checked State Store get tree Element if checked Elements null ie tree item not even gray checked return false return get List Items Size tree Element checked Elements size  treeElement areAllElementsChecked treeElement checkedElements checkedStateStore treeElement checkedElements getListItemsSize treeElement checkedElements
Iterate through the passed elements which are being realized for the first time and check each one in the tree viewer as appropriate protected void check New Tree Elements Object elements for int i 0 i elements length i Object current Element elements i boolean checked checked State Store contains Key current Element tree Viewer set Checked current Element checked tree Viewer set Grayed current Element checked white Checked Tree Items contains current Element  checkNewTreeElements currentElement checkedStateStore containsKey currentElement treeViewer setChecked currentElement treeViewer setGrayed currentElement whiteCheckedTreeItems currentElement
Busy Indicator show While tree Viewer get Control get Display new Runnable public void run if event get Checkable equals tree Viewer tree Item Checked event get Element event get Checked else list Item Checked event get Element event get Checked true notify Check State Change Listeners event  BusyIndicator showWhile treeViewer getControl getDisplay getCheckable treeViewer treeItemChecked getElement getChecked listItemChecked getElement getChecked notifyCheckStateChangeListeners
An item was checked in one of self s two views Determine which view this occurred in and delegate appropriately param event Check State Changed Event public void check State Changed final Check State Changed Event event Potentially long operation show a busy cursor Busy Indicator show While tree Viewer get Control get Display new Runnable public void run if event get Checkable equals tree Viewer tree Item Checked event get Element event get Checked else list Item Checked event get Element event get Checked true notify Check State Change Listeners event  CheckStateChangedEvent checkStateChanged CheckStateChangedEvent BusyIndicator showWhile treeViewer getControl getDisplay getCheckable treeViewer treeItemChecked getElement getChecked listItemChecked getElement getChecked notifyCheckStateChangeListeners
Lay out and initialize self s visual components param parent org eclipse swt widgets Composite param width int param height int protected void create Contents Composite parent int width int height int style group pane Composite composite new Composite parent style Grid Layout layout new Grid Layout layout num Columns 2 layout make Columns Equal Width true layout margin Height 0 layout margin Width 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH composite set Font parent get Font create Tree Viewer composite width 2 height create List Viewer composite width 2 height initialize  createContents GridLayout GridLayout numColumns makeColumnsEqualWidth marginHeight marginWidth setLayout setLayoutData GridData GridData FILL_BOTH setFont getFont createTreeViewer createListViewer
Create this group s list viewer protected void create List Viewer Composite parent int width int height list Viewer Checkbox Table Viewer new Check List parent SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data width Hint width data height Hint height list Viewer get Table set Layout Data data list Viewer get Table set Font parent get Font list Viewer set Content Provider list Content Provider list Viewer set Label Provider list Label Provider list Viewer add Check State Listener this  createListViewer listViewer CheckboxTableViewer newCheckList GridData GridData GridData FILL_BOTH widthHint heightHint listViewer getTable setLayoutData listViewer getTable setFont getFont listViewer setContentProvider listContentProvider listViewer setLabelProvider listLabelProvider listViewer addCheckStateListener
Create this group s tree viewer protected void create Tree Viewer Composite parent int width int height Tree tree new Tree parent SWT CHECK SWT BORDER Grid Data data new Grid Data Grid Data FILL BOTH data width Hint width data height Hint height tree set Layout Data data tree set Font parent get Font tree Viewer new Checkbox Tree Viewer tree tree Viewer set Content Provider tree Content Provider tree Viewer set Label Provider tree Label Provider tree Viewer add Tree Listener this tree Viewer add Check State Listener this tree Viewer add Selection Changed Listener this  createTreeViewer GridData GridData GridData FILL_BOTH widthHint heightHint setLayoutData setFont getFont treeViewer CheckboxTreeViewer treeViewer setContentProvider treeContentProvider treeViewer setLabelProvider treeLabelProvider treeViewer addTreeListener treeViewer addCheckStateListener treeViewer addSelectionChangedListener
Returns a boolean indicating whether the passed tree element should be at LEAST gray checked Note that this method does not consider whether it should be white checked so a specified tree item which should be white checked will result in a code true code answer from this method To determine whether a tree item should be white checked use method determine Should Be White Checked Object param tree Element java lang Object return boolean see determine Should Be White Checked java lang Object protected boolean determine Should Be At Least Gray Checked Object tree Element if any list items associated with tree Element are checked then it retains its gray checked status regardless of its children List checked List checked State Store get tree Element if checked null checked is Empty return true if any children of tree Element are still gray checked then tree Element must remain gray checked as well Object children tree Content Provider get Children tree Element for int i 0 i children length i if checked State Store contains Key children i return true return false  determineShouldBeWhiteChecked treeElement determineShouldBeWhiteChecked determineShouldBeAtLeastGrayChecked treeElement treeElement checkedStateStore treeElement isEmpty treeElement treeElement treeContentProvider getChildren treeElement checkedStateStore containsKey
Returns a boolean indicating whether the passed tree item should be white checked return boolean param tree Element java lang Object protected boolean determine Should Be White Checked Object tree Element return are All Children White Checked tree Element are All Elements Checked tree Element  treeElement determineShouldBeWhiteChecked treeElement areAllChildrenWhiteChecked treeElement areAllElementsChecked treeElement
Recursively add appropriate tree elements to the collection of known white checked tree elements param tree Element java lang Object protected void determine White Checked Descendents Object tree Element always go through all children first since their white checked statuses will be needed to determine the white checked status for this tree element Object children tree Content Provider get Elements tree Element for int i 0 i children length i determine White Checked Descendents children i now determine the white checked status for this tree element if determine Should Be White Checked tree Element set White Checked tree Element true  treeElement determineWhiteCheckedDescendents treeElement treeContentProvider getElements treeElement determineWhiteCheckedDescendents determineShouldBeWhiteChecked treeElement setWhiteChecked treeElement
Cause the tree viewer to expand all its items public void expand All tree Viewer expand All  expandAll treeViewer expandAll
Answer a flat collection of all of the checked elements in the list portion of self return java util Vector public Iterator get All Checked List Items List result new Array List Iterator list Collections Enum checked State Store values iterator while list Collections Enum has Next Iterator current Collection List list Collections Enum next iterator while current Collection has Next result add current Collection next return result iterator  getAllCheckedListItems ArrayList listCollectionsEnum checkedStateStore listCollectionsEnum hasNext currentCollection listCollectionsEnum currentCollection hasNext currentCollection
Answer a collection of all of the checked elements in the tree portion of self return java util Vector public Set get All Checked Tree Items return checked State Store key Set  getAllCheckedTreeItems checkedStateStore keySet
Answer the number of elements that have been checked by the user return int public int get Checked Element Count return checked State Store size  getCheckedElementCount checkedStateStore
Return a count of the number of list items associated with a given tree item return int param tree Element java lang Object protected int get List Items Size Object tree Element Object elements list Content Provider get Elements tree Element return elements length  treeElement getListItemsSize treeElement listContentProvider getElements treeElement
Get the table the list viewer uses return org eclipse swt widgets Table public Table get List Table return this list Viewer get Table  getListTable listViewer getTable
Logically gray check all ancestors of tree Item by ensuring that they appear in the checked table protected void gray Check Hierarchy Object tree Element if this tree element is already gray then its ancestors all are as well if checked State Store contains Key tree Element return no need to proceed upwards from here checked State Store put tree Element new Array List if determine Should Be White Checked tree Element set White Checked tree Element true Object parent tree Content Provider get Parent tree Element if parent null gray Check Hierarchy parent  treeItem grayCheckHierarchy treeElement checkedStateStore containsKey treeElement checkedStateStore treeElement ArrayList determineShouldBeWhiteChecked treeElement setWhiteChecked treeElement treeContentProvider getParent treeElement grayCheckHierarchy
Set the initial checked state of the passed list element to true public void initial Check List Item Object element Object parent tree Content Provider get Parent element current Tree Selection parent As this is not done from the UI then set the box for updating from the selection to false list Item Checked element true false update Hierarchy parent  initialCheckListItem treeContentProvider getParent currentTreeSelection listItemChecked updateHierarchy
Set the initial checked state of the passed element to true as well as to all of its children and associated list elements public void initial Check Tree Item Object element tree Item Checked element true  initialCheckTreeItem treeItemChecked
Initialize this group s viewers after they have been laid out protected void initialize tree Viewer set Input root  treeViewer setInput
Callback that s invoked when the checked status of an item in the list is changed by the user Do not try and update the hierarchy if we are building the initial list protected void list Item Checked Object list Element boolean state boolean updating From Selection List checked List Items List checked State Store get current Tree Selection if state if checked List Items null since the associated tree item has gone from 0 1 checked list items tree checking may need to be updated gray Check Hierarchy current Tree Selection checked List Items List checked State Store get current Tree Selection checked List Items add list Element else checked List Items remove list Element if checked List Items is Empty since the associated tree item has gone from 1 0 checked list items tree checking may need to be updated ungray Check Hierarchy current Tree Selection if updating From Selection update Hierarchy current Tree Selection  listItemChecked listElement updatingFromSelection checkedListItems checkedStateStore currentTreeSelection checkedListItems grayCheckHierarchy currentTreeSelection checkedListItems checkedStateStore currentTreeSelection checkedListItems listElement checkedListItems listElement checkedListItems isEmpty ungrayCheckHierarchy currentTreeSelection updatingFromSelection updateHierarchy currentTreeSelection
final I Check State Listener l I Check State Listener array i Platform run new Safe Runnable public void run l check State Changed event  ICheckStateListener ICheckStateListener SafeRunnable checkStateChanged
Notify all checked state listeners that the passed element has had its checked state changed to the passed state protected void notify Check State Change Listeners final Check State Changed Event event Object array listeners get Listeners for int i 0 i array length i final I Check State Listener l I Check State Listener array i Platform run new Safe Runnable public void run l check State Changed event  notifyCheckStateChangeListeners CheckStateChangedEvent getListeners ICheckStateListener ICheckStateListener SafeRunnable checkStateChanged
Set the contents of the list viewer based upon the specified selected tree element This also includes checking the appropriate list items param tree Element java lang Object protected void populate List Viewer final Object tree Element list Viewer set Input tree Element List list Items To Check List checked State Store get tree Element if list Items To Check null Iterator list Items Enum list Items To Check iterator while list Items Enum has Next list Viewer set Checked list Items Enum next true  treeElement populateListViewer treeElement listViewer setInput treeElement listItemsToCheck checkedStateStore treeElement listItemsToCheck listItemsEnum listItemsToCheck listItemsEnum hasNext listViewer setChecked listItemsEnum
Remove the passed listener from self s collection of clients that listen for changes to element checked states param listener I Check State Listener public void remove Check State Listener I Check State Listener listener listeners remove listener  ICheckStateListener removeCheckStateListener ICheckStateListener
Handle the selection of an item in the tree viewer param event Selection Changed Event public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection Object selected Element selection get First Element if selected Element null current Tree Selection null list Viewer set Input current Tree Selection return ie if not an item deselection if selected Element current Tree Selection populate List Viewer selected Element current Tree Selection selected Element  SelectionChangedEvent selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection selectedElement getFirstElement selectedElement currentTreeSelection listViewer setInput currentTreeSelection selectedElement currentTreeSelection populateListViewer selectedElement currentTreeSelection selectedElement
Potentially long operation show a busy cursor Busy Indicator show While tree Viewer get Control get Display new Runnable public void run set Tree Checked root selection list Viewer set All Checked selection  BusyIndicator showWhile treeViewer getControl getDisplay setTreeChecked listViewer setAllChecked
Select or deselect all of the elements in the tree depending on the value of the selection boolean Be sure to update the displayed files as well public void set All Selections final boolean selection Potentially long operation show a busy cursor Busy Indicator show While tree Viewer get Control get Display new Runnable public void run set Tree Checked root selection list Viewer set All Checked selection  setAllSelections BusyIndicator showWhile treeViewer getControl getDisplay setTreeChecked listViewer setAllChecked
Set the list viewer s providers to those passed param content Provider I Tree Content Provider param label Provider I Label Provider public void set List Providers I Structured Content Provider content Provider I Label Provider label Provider list Viewer set Content Provider content Provider list Viewer set Label Provider label Provider  contentProvider ITreeContentProvider labelProvider ILabelProvider setListProviders IStructuredContentProvider contentProvider ILabelProvider labelProvider listViewer setContentProvider contentProvider listViewer setLabelProvider labelProvider
Set the sorter that is to be applied to self s list viewer public void set List Sorter Viewer Sorter sorter list Viewer set Sorter sorter  setListSorter ViewerSorter listViewer setSorter
Set the root of the widget to be new Root Regenerate all of the tables and lists from this value param new Root public void set Root Object new Root this root new Root initialize  newRoot setRoot newRoot newRoot
Set the checked state of the passed tree element appropriately and do so recursively to all of its child tree elements as well protected void set Tree Checked Object tree Element boolean state if tree Element equals current Tree Selection list Viewer set All Checked state if state Object list Items list Content Provider get Elements tree Element List list Items Checked new Array List for int i 0 i list Items length i list Items Checked add list Items i checked State Store put tree Element list Items Checked else checked State Store remove tree Element set White Checked tree Element state tree Viewer set Checked tree Element state tree Viewer set Grayed tree Element false now logically check uncheck all children as well Object children tree Content Provider get Children tree Element for int i 0 i children length i set Tree Checked children i state  setTreeChecked treeElement treeElement currentTreeSelection listViewer setAllChecked listItems listContentProvider getElements treeElement listItemsChecked ArrayList listItems listItemsChecked listItems checkedStateStore treeElement listItemsChecked checkedStateStore treeElement setWhiteChecked treeElement treeViewer setChecked treeElement treeViewer setGrayed treeElement treeContentProvider getChildren treeElement setTreeChecked
Set the tree viewer s providers to those passed param content Provider I Tree Content Provider param label Provider I Label Provider public void set Tree Providers I Tree Content Provider content Provider I Label Provider label Provider tree Viewer set Content Provider content Provider tree Viewer set Label Provider label Provider  contentProvider ITreeContentProvider labelProvider ILabelProvider setTreeProviders ITreeContentProvider contentProvider ILabelProvider labelProvider treeViewer setContentProvider contentProvider treeViewer setLabelProvider labelProvider
Set the sorter that is to be applied to self s tree viewer public void set Tree Sorter Viewer Sorter sorter tree Viewer set Sorter sorter  setTreeSorter ViewerSorter treeViewer setSorter
Adjust the collection of references to white checked tree elements appropriately param tree Element java lang Object param is White Checked boolean protected void set White Checked Object tree Element boolean is White Checked if is White Checked if white Checked Tree Items contains tree Element white Checked Tree Items add tree Element else white Checked Tree Items remove tree Element  treeElement isWhiteChecked setWhiteChecked treeElement isWhiteChecked isWhiteChecked whiteCheckedTreeItems treeElement whiteCheckedTreeItems treeElement whiteCheckedTreeItems treeElement
Handle the collapsing of an element in a tree viewer public void tree Collapsed Tree Expansion Event event We don t need to do anything with this  treeCollapsed TreeExpansionEvent
Handle the expansionsion of an element in a tree viewer public void tree Expanded Tree Expansion Event event Object item event get Element First see if the children need to be given their checked state at all If they ve already been realized then this won t be necessary if expanded Tree Nodes contains item expanded Tree Nodes add item check New Tree Elements tree Content Provider get Children item  treeExpanded TreeExpansionEvent getElement expandedTreeNodes expandedTreeNodes checkNewTreeElements treeContentProvider getChildren
Callback that s invoked when the checked status of an item in the tree is changed by the user protected void tree Item Checked Object tree Element boolean state recursively adjust all child tree elements appropriately set Tree Checked tree Element state Object parent tree Content Provider get Parent tree Element if parent null return now update upwards in the tree hierarchy if state gray Check Hierarchy parent else ungray Check Hierarchy parent update Hierarchy tree Element  treeItemChecked treeElement setTreeChecked treeElement treeContentProvider getParent treeElement grayCheckHierarchy ungrayCheckHierarchy updateHierarchy treeElement
Logically un gray check all ancestors of tree Item iff appropriate protected void ungray Check Hierarchy Object tree Element if determine Should Be At Least Gray Checked tree Element checked State Store remove tree Element Object parent tree Content Provider get Parent tree Element if parent null ungray Check Hierarchy parent  treeItem ungrayCheckHierarchy treeElement determineShouldBeAtLeastGrayChecked treeElement checkedStateStore treeElement treeContentProvider getParent treeElement ungrayCheckHierarchy
Set the checked state of self and all ancestors appropriately protected void update Hierarchy Object tree Element boolean white Checked determine Should Be White Checked tree Element boolean should Be At Least Gray determine Should Be At Least Gray Checked tree Element tree Viewer set Checked tree Element should Be At Least Gray set White Checked tree Element white Checked if white Checked tree Viewer set Grayed tree Element should Be At Least Gray proceed up the tree element hierarchy Object parent tree Content Provider get Parent tree Element if parent null update Hierarchy parent  updateHierarchy treeElement whiteChecked determineShouldBeWhiteChecked treeElement shouldBeAtLeastGray determineShouldBeAtLeastGrayChecked treeElement treeViewer setChecked treeElement shouldBeAtLeastGray setWhiteChecked treeElement whiteChecked whiteChecked treeViewer setGrayed treeElement shouldBeAtLeastGray treeContentProvider getParent treeElement updateHierarchy
Busy Indicator show While tree Viewer get Control get Display new Runnable public void run Iterator key Iterator items key Set iterator Update the store before the hierarchy to prevent updating parents before all of the children are done while key Iterator has Next Object key key Iterator next Replace the items in the checked state store with those from the supplied items List selections List items get key if selections size 0 If it is empty remove it from the list checked State Store remove key else checked State Store put key selections proceed up the tree element hierarchy Object parent tree Content Provider get Parent key if parent null add To Hierarchy To Checked Store parent Now update hierarchies key Iterator items key Set iterator while key Iterator has Next Object key key Iterator next update Hierarchy key if current Tree Selection null current Tree Selection equals key list Viewer set All Checked false list Viewer set Checked Elements List items get key to Array  BusyIndicator showWhile treeViewer getControl getDisplay keyIterator keySet keyIterator hasNext keyIterator checkedStateStore checkedStateStore treeContentProvider getParent addToHierarchyToCheckedStore keyIterator keySet keyIterator hasNext keyIterator updateHierarchy currentTreeSelection currentTreeSelection listViewer setAllChecked listViewer setCheckedElements toArray
Update the selections of the tree elements in items to reflect the new selections provided param items Map with keys of Object the tree element and values of List the selected list elements public void update Selections final Map items Potentially long operation show a busy cursor Busy Indicator show While tree Viewer get Control get Display new Runnable public void run Iterator key Iterator items key Set iterator Update the store before the hierarchy to prevent updating parents before all of the children are done while key Iterator has Next Object key key Iterator next Replace the items in the checked state store with those from the supplied items List selections List items get key if selections size 0 If it is empty remove it from the list checked State Store remove key else checked State Store put key selections proceed up the tree element hierarchy Object parent tree Content Provider get Parent key if parent null add To Hierarchy To Checked Store parent Now update hierarchies key Iterator items key Set iterator while key Iterator has Next Object key key Iterator next update Hierarchy key if current Tree Selection null current Tree Selection equals key list Viewer set All Checked false list Viewer set Checked Elements List items get key to Array  updateSelections BusyIndicator showWhile treeViewer getControl getDisplay keyIterator keySet keyIterator hasNext keyIterator checkedStateStore checkedStateStore treeContentProvider getParent addToHierarchyToCheckedStore keyIterator keySet keyIterator hasNext keyIterator updateHierarchy currentTreeSelection currentTreeSelection listViewer setAllChecked listViewer setCheckedElements toArray

private boolean show Closed Projects true Creates a new Resource Content Provider public Container Content Provider  showClosedProjects ResourceContentProvider ContainerContentProvider
The visual part that is using this content provider is about to be disposed Deallocate all allocated SWT resources 
public void dispose see I Tree Content Provider get Children public Object get Children Object element if element instanceof I Workspace check if closed projects should be shown I Project all Projects I Workspace element get Root get Projects if show Closed Projects return all Projects Array List accessible Projects new Array List for int i 0 i all Projects length i if all Projects i is Open accessible Projects add all Projects i return accessible Projects to Array else if element instanceof I Container I Container container I Container element if container is Accessible try List children new Array List I Resource members container members for int i 0 i members length i if members i get Type I Resource FILE children add members i return children to Array catch Core Exception e this should never happen because we call is Accessible before invoking members return new Object 0  ITreeContentProvider getChildren getChildren IWorkspace IProject allProjects IWorkspace getRoot getProjects showClosedProjects allProjects ArrayList accessibleProjects ArrayList allProjects allProjects isOpen accessibleProjects allProjects accessibleProjects toArray IContainer IContainer IContainer isAccessible ArrayList IResource getType IResource toArray CoreException isAccessible
see I Tree Content Provider get Elements public Object get Elements Object element return get Children element  ITreeContentProvider getElements getElements getChildren
see I Tree Content Provider get Parent public Object get Parent Object element if element instanceof I Resource return I Resource element get Parent return null  ITreeContentProvider getParent getParent IResource IResource getParent
see I Tree Content Provider has Children public boolean has Children Object element return get Children element length 0  ITreeContentProvider hasChildren hasChildren getChildren
see I Content Provider input Changed public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged inputChanged oldInput newInput
Specify whether or not to show closed projects in the tree viewer Default is to show closed projects param show boolean if false do not show closed projects in the tree public void show Closed Projects boolean show show Closed Projects show  showClosedProjects showClosedProjects

private static final int SIZING SELECTION PANE HEIGHT 300 Creates a new instance of the widget param parent The parent widget of the group param listener A listener to forward events to Can be null if no listener is required param allow New Container Name Enable the user to type in a new container name instead of just selecting from the existing ones public Container Selection Group Composite parent Listener listener boolean allow New Container Name this parent listener allow New Container Name null  SIZING_SELECTION_PANE_HEIGHT allowNewContainerName ContainerSelectionGroup allowNewContainerName allowNewContainerName
Creates a new instance of the widget param parent The parent widget of the group param listener A listener to forward events to Can be null if no listener is required param allow New Container Name Enable the user to type in a new container name instead of just selecting from the existing ones param message The text to present to the user public Container Selection Group Composite parent Listener listener boolean allow New Container Name String message this parent listener allow New Container Name message true  allowNewContainerName ContainerSelectionGroup allowNewContainerName allowNewContainerName
Creates a new instance of the widget param parent The parent widget of the group param listener A listener to forward events to Can be null if no listener is required param allow New Container Name Enable the user to type in a new container name instead of just selecting from the existing ones param message The text to present to the user param show Closed Projects Whether or not to show closed projects public Container Selection Group Composite parent Listener listener boolean allow New Container Name String message boolean show Closed Projects this parent listener allow New Container Name message show Closed Projects SIZING SELECTION PANE HEIGHT  allowNewContainerName showClosedProjects ContainerSelectionGroup allowNewContainerName showClosedProjects allowNewContainerName showClosedProjects SIZING_SELECTION_PANE_HEIGHT
Creates a new instance of the widget param parent The parent widget of the group param listener A listener to forward events to Can be null if no listener is required param allow New Container Name Enable the user to type in a new container name instead of just selecting from the existing ones param message The text to present to the user param show Closed Projects Whether or not to show closed projects param height Hint height hint for the drill down composite public Container Selection Group Composite parent Listener listener boolean allow New Container Name String message boolean show Closed Projects int height Hint super parent SWT NONE this listener listener this allow New Container Name allow New Container Name this show Closed Projects show Closed Projects if message null create Contents message height Hint else if allow New Container Name create Contents DEFAULT MSG NEW ALLOWED height Hint else create Contents DEFAULT MSG SELECT ONLY height Hint  allowNewContainerName showClosedProjects heightHint ContainerSelectionGroup allowNewContainerName showClosedProjects heightHint allowNewContainerName allowNewContainerName showClosedProjects showClosedProjects createContents heightHint allowNewContainerName createContents DEFAULT_MSG_NEW_ALLOWED heightHint createContents DEFAULT_MSG_SELECT_ONLY heightHint
The container selection has changed in the tree view Update the container name field value and notify all listeners public void container Selection Changed I Container container selected Container container if allow New Container Name if container null container Name Field set Text NON NLS 1 else container Name Field set Text container get Full Path make Relative to String fire an event so the parent can update its controls if listener null Event change Event new Event change Event type SWT Selection change Event widget this listener handle Event change Event  containerSelectionChanged IContainer selectedContainer allowNewContainerName containerNameField setText containerNameField setText getFullPath makeRelative toString changeEvent changeEvent changeEvent handleEvent changeEvent
Creates the contents of the composite public void create Contents String message create Contents message SIZING SELECTION PANE HEIGHT  createContents createContents SIZING_SELECTION_PANE_HEIGHT
Creates the contents of the composite param height Hint height hint for the drill down composite public void create Contents String message int height Hint Grid Layout layout new Grid Layout layout margin Width 0 set Layout layout set Layout Data new Grid Data Grid Data FILL BOTH Label label new Label this SWT WRAP label set Text message label set Font this get Font if allow New Container Name container Name Field new Text this SWT SINGLE SWT BORDER container Name Field set Layout Data new Grid Data Grid Data FILL HORIZONTAL container Name Field add Listener SWT Modify listener container Name Field set Font this get Font else filler new Label this SWT NONE create Tree Viewer height Hint Dialog apply Dialog Font this  heightHint createContents heightHint GridLayout GridLayout marginWidth setLayout setLayoutData GridData GridData FILL_BOTH setText setFont getFont allowNewContainerName containerNameField containerNameField setLayoutData GridData GridData FILL_HORIZONTAL containerNameField addListener containerNameField setFont getFont createTreeViewer heightHint applyDialogFont
tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection container Selection Changed I Container selection get First Element allow null  treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection containerSelectionChanged IContainer getFirstElement
new I Double Click Listener public void double Click Double Click Event event I Selection selection event get Selection if selection instanceof I Structured Selection Object item I Structured Selection selection get First Element if tree Viewer get Expanded State item tree Viewer collapse To Level item 1 else tree Viewer expand To Level item 1  IDoubleClickListener doubleClick DoubleClickEvent ISelection getSelection IStructuredSelection IStructuredSelection getFirstElement treeViewer getExpandedState treeViewer collapseToLevel treeViewer expandToLevel
Returns a new drill down viewer for this dialog param height Hint height hint for the drill down composite return a new drill down viewer protected void create Tree Viewer int height Hint Create drill down Drill Down Composite drill Down new Drill Down Composite this SWT BORDER Grid Data spec new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL spec width Hint SIZING SELECTION PANE WIDTH spec height Hint height Hint drill Down set Layout Data spec Create tree viewer inside drill down tree Viewer new Tree Viewer drill Down SWT NONE drill Down set Child Tree tree Viewer Container Content Provider cp new Container Content Provider cp show Closed Projects show Closed Projects tree Viewer set Content Provider cp tree Viewer set Label Provider Workbench Label Provider get Decorating Workbench Label Provider tree Viewer set Sorter new Viewer Sorter tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection container Selection Changed I Container selection get First Element allow null tree Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event I Selection selection event get Selection if selection instanceof I Structured Selection Object item I Structured Selection selection get First Element if tree Viewer get Expanded State item tree Viewer collapse To Level item 1 else tree Viewer expand To Level item 1 This has to be done after the viewer has been laid out tree Viewer set Input Resources Plugin get Workspace  heightHint createTreeViewer heightHint DrillDownComposite drillDown DrillDownComposite GridData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL widthHint SIZING_SELECTION_PANE_WIDTH heightHint heightHint drillDown setLayoutData treeViewer TreeViewer drillDown drillDown setChildTree treeViewer ContainerContentProvider ContainerContentProvider showClosedProjects showClosedProjects treeViewer setContentProvider treeViewer setLabelProvider WorkbenchLabelProvider getDecoratingWorkbenchLabelProvider treeViewer setSorter ViewerSorter treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection containerSelectionChanged IContainer getFirstElement treeViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent ISelection getSelection IStructuredSelection IStructuredSelection getFirstElement treeViewer getExpandedState treeViewer collapseToLevel treeViewer expandToLevel treeViewer setInput ResourcesPlugin getWorkspace
Returns the currently entered container name Null if the field is empty Note that the container may not exist yet if the user entered a new container name in the field public I Path get Container Full Path if allow New Container Name String path Name container Name Field get Text if path Name null path Name length 1 return null else The user may not have made this absolute so do it for them return new Path path Name make Absolute else if selected Container null return null else return selected Container get Full Path  IPath getContainerFullPath allowNewContainerName pathName containerNameField getText pathName pathName pathName makeAbsolute selectedContainer selectedContainer getFullPath
Gives focus to one of the widgets in the group as determined by the group public void set Initial Focus if allow New Container Name container Name Field set Focus else tree Viewer get Tree set Focus  setInitialFocus allowNewContainerName containerNameField setFocus treeViewer getTree setFocus
Sets the selected existing container public void set Selected Container I Container container selected Container container expand to and select the specified container List items To Expand new Array List I Container parent container get Parent while parent null items To Expand add 0 parent parent parent get Parent tree Viewer set Expanded Elements items To Expand to Array tree Viewer set Selection new Structured Selection container true  setSelectedContainer IContainer selectedContainer itemsToExpand ArrayList IContainer getParent itemsToExpand getParent treeViewer setExpandedElements itemsToExpand toArray treeViewer setSelection StructuredSelection

public Overlay Icon Image Descriptor base Image Descriptor overlays Point size f Base base f Overlays overlays f Size size  OverlayIcon ImageDescriptor ImageDescriptor fBase fOverlays fSize
protected void draw Bottom Left Image Descriptor overlays if overlays null return int length overlays length int x 0 for int i 0 i 3 i if i length overlays i null Image Data id overlays i get Image Data draw Image id x get Size y id height x id width  drawBottomLeft ImageDescriptor ImageData getImageData drawImage getSize
protected void draw Bottom Right Image Descriptor overlays if overlays null return int length overlays length int x get Size x for int i 2 i 0 i if i length overlays i null Image Data id overlays i get Image Data x id width draw Image id x get Size y id height  drawBottomRight ImageDescriptor getSize ImageData getImageData drawImage getSize
see Composite Image Descriptor draw Composite Image int int protected void draw Composite Image int width int height Image Data bg if f Base null bg f Base get Image Data null bg DEFAULT IMAGE DATA draw Image bg 0 0 if f Overlays null if f Overlays length 0 draw Top Right f Overlays 0 if f Overlays length 1 draw Bottom Right f Overlays 1 if f Overlays length 2 draw Bottom Left f Overlays 2 if f Overlays length 3 draw Top Left f Overlays 3  CompositeImageDescriptor drawCompositeImage drawCompositeImage ImageData fBase fBase getImageData DEFAULT_IMAGE_DATA drawImage fOverlays fOverlays drawTopRight fOverlays fOverlays drawBottomRight fOverlays fOverlays drawBottomLeft fOverlays fOverlays drawTopLeft fOverlays
protected void draw Top Left Image Descriptor overlays if overlays null return int length overlays length int x 0 for int i 0 i 3 i if i length overlays i null Image Data id overlays i get Image Data draw Image id x 0 x id width  drawTopLeft ImageDescriptor ImageData getImageData drawImage
protected void draw Top Right Image Descriptor overlays if overlays null return int length overlays length int x get Size x for int i 2 i 0 i if i length overlays i null Image Data id overlays i get Image Data x id width draw Image id x 0  drawTopRight ImageDescriptor getSize ImageData getImageData drawImage
see Composite Image Descriptor get Size protected Point get Size return f Size  CompositeImageDescriptor getSize getSize fSize

public int compare Object ob1 Object ob2 Category c1 Category ob1 Category c2 Category ob2 return collator compare c1 get Label c2 get Label  getLabel getLabel
public int compare Object ob1 Object ob2 Capability c1 Capability ob1 Capability c2 Capability ob2 return collator compare c1 get Name c2 get Name  getName getName
Creates a new instance of the code Project Capability Selection Group code param categories the initial collection of valid categories to select param capabilities the intial collection of valid capabilities to select param registry all available capabilities registered by plug ins public Project Capability Selection Group Category categories Capability capabilities Capability Registry registry this categories capabilities null registry  ProjectCapabilitySelectionGroup ProjectCapabilitySelectionGroup CapabilityRegistry
Creates a new instance of the code Project Capability Selection Group code param categories the initial collection of valid categories to select param capabilities the intial collection of valid capabilities to select param disabled Capabilities the collection of capabilities to show as disabled param registry all available capabilities registered by plug ins public Project Capability Selection Group Category categories Capability capabilities Capability disabled Capabilities Capability Registry registry super this initial Categories categories this initial Capabilities capabilities this disabled Capabilities disabled Capabilities this registry registry  ProjectCapabilitySelectionGroup disabledCapabilities ProjectCapabilitySelectionGroup disabledCapabilities CapabilityRegistry initialCategories initialCapabilities disabledCapabilities disabledCapabilities
Create the contents of this group The basic layout is a checkbox list with a text field at the bottom to display the capability description public Control create Contents Composite parent Font font parent get Font Create the main composite for the other controls Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout make Columns Equal Width true composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL BOTH Composite for category label and list Composite cat Composite new Composite composite SWT NONE cat Composite set Layout new Grid Layout cat Composite set Layout Data new Grid Data Grid Data FILL BOTH Add a label to identify the list viewer of categories Label category Label new Label cat Composite SWT LEFT category Label set Text IDE Workbench Messages get String Project Capability Selection Group categories NON NLS 1 Grid Data data new Grid Data data vertical Alignment SWT TOP category Label set Layout Data data category Label set Font font List viewer of all available categories List Viewer list Viewer new List Viewer cat Composite list Viewer get List set Layout Data new Grid Data Grid Data FILL BOTH list Viewer get List set Font font list Viewer set Label Provider new Workbench Label Provider list Viewer set Content Provider get Content Provider list Viewer set Input get Available Categories Composite for capability label and table Composite cap Composite new Composite composite SWT NONE cap Composite set Layout new Grid Layout cap Composite set Layout Data new Grid Data Grid Data FILL BOTH Add a label to identify the checkbox tree viewer of capabilities Label capability Label new Label cap Composite SWT LEFT capability Label set Text IDE Workbench Messages get String Project Capability Selection Group capabilities NON NLS 1 data new Grid Data data vertical Alignment SWT TOP capability Label set Layout Data data capability Label set Font font Checkbox tree viewer of capabilities in selected categories checkbox Viewer Checkbox Table Viewer new Check List cap Composite SWT SINGLE SWT TOP SWT BORDER checkbox Viewer get Table set Layout Data new Grid Data Grid Data FILL BOTH checkbox Viewer get Table set Font font checkbox Viewer set Label Provider new Capability Label Provider checkbox Viewer set Content Provider get Content Provider checkbox Viewer set Input visible Capabilities Add a label to identify the text field of capability s description Label desc Label new Label composite SWT LEFT desc Label set Text IDE Workbench Messages get String Project Capability Selection Group description NON NLS 1 data new Grid Data data vertical Alignment SWT TOP data horizontal Span 2 desc Label set Layout Data data desc Label set Font font Text field to display the capability s description description Text new Text composite SWT WRAP SWT MULTI SWT V SCROLL SWT BORDER description Text set Text EMPTY DESCRIPTION description Text set Editable false data new Grid Data data horizontal Alignment Grid Data FILL data grab Excess Horizontal Space true data horizontal Span 2 description Text set Layout Data data description Text set Font font Add a text field to explain grayed out items Label gray Label new Label composite SWT LEFT gray Label set Text IDE Workbench Messages get String Project Capability Selection Group gray Items NON NLS 1 data new Grid Data data vertical Alignment SWT TOP data horizontal Span 2 gray Label set Layout Data data gray Label set Font font Setup initial context populate Dependents populate Memberships Listen for selection changes to update the description field checkbox Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Description event get Selection Properly handle user checking and unchecking project features checkbox Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Capability cap Capability event get Element if event get Checked handle Capability Checked cap else handle Capability Unchecked cap checkbox Viewer set Selection new Structured Selection cap Listen for category selection and update the list of capabilities list Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event if event get Selection instanceof I Structured Selection I Structured Selection sel I Structured Selection event get Selection visible Capabilities clear Iterator enum sel iterator while enum has Next Category cat Category enum next visible Capabilities add All cat get Elements Collections sort visible Capabilities capability Comparator checkbox Viewer refresh enum visible Capabilities iterator while enum has Next Capability cap Capability enum next if has Dependency cap checkbox Viewer set Grayed cap true if checked Capabilities contains cap checkbox Viewer set Checked cap true update Description checkbox Viewer get Selection initialize if initial Capabilities null checked Capabilities add All Arrays as List initial Capabilities if initial Categories null list Viewer set Selection new Structured Selection initial Categories return composite  createContents getFont GridLayout GridLayout numColumns makeColumnsEqualWidth setLayout setLayoutData GridData GridData FILL_BOTH catComposite catComposite setLayout GridLayout catComposite setLayoutData GridData GridData FILL_BOTH categoryLabel catComposite categoryLabel setText IDEWorkbenchMessages getString ProjectCapabilitySelectionGroup GridData GridData verticalAlignment categoryLabel setLayoutData categoryLabel setFont ListViewer listViewer ListViewer catComposite listViewer getList setLayoutData GridData GridData FILL_BOTH listViewer getList setFont listViewer setLabelProvider WorkbenchLabelProvider listViewer setContentProvider getContentProvider listViewer setInput getAvailableCategories capComposite capComposite setLayout GridLayout capComposite setLayoutData GridData GridData FILL_BOTH capabilityLabel capComposite capabilityLabel setText IDEWorkbenchMessages getString ProjectCapabilitySelectionGroup GridData verticalAlignment capabilityLabel setLayoutData capabilityLabel setFont checkboxViewer CheckboxTableViewer newCheckList capComposite checkboxViewer getTable setLayoutData GridData GridData FILL_BOTH checkboxViewer getTable setFont checkboxViewer setLabelProvider CapabilityLabelProvider checkboxViewer setContentProvider getContentProvider checkboxViewer setInput visibleCapabilities descLabel descLabel setText IDEWorkbenchMessages getString ProjectCapabilitySelectionGroup GridData verticalAlignment horizontalSpan descLabel setLayoutData descLabel setFont descriptionText V_SCROLL descriptionText setText EMPTY_DESCRIPTION descriptionText setEditable GridData horizontalAlignment GridData grabExcessHorizontalSpace horizontalSpan descriptionText setLayoutData descriptionText setFont grayLabel grayLabel setText IDEWorkbenchMessages getString ProjectCapabilitySelectionGroup grayItems GridData verticalAlignment horizontalSpan grayLabel setLayoutData grayLabel setFont populateDependents populateMemberships checkboxViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateDescription getSelection checkboxViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getElement getChecked handleCapabilityChecked handleCapabilityUnchecked checkboxViewer setSelection StructuredSelection listViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent getSelection IStructuredSelection IStructuredSelection IStructuredSelection getSelection visibleCapabilities hasNext visibleCapabilities addAll getElements visibleCapabilities capabilityComparator checkboxViewer visibleCapabilities hasNext hasDependency checkboxViewer setGrayed checkedCapabilities checkboxViewer setChecked updateDescription checkboxViewer getSelection initialCapabilities checkedCapabilities addAll asList initialCapabilities initialCategories listViewer setSelection StructuredSelection initialCategories
Marks the capability as being checked private void mark Capability Checked Capability target Capability dependent Check the target capability if checked Capabilities contains target checked Capabilities add target checkbox Viewer set Checked target true Gray the target to show the user its required by another capability if target dependent checkbox Viewer set Grayed target true Update the dependent map for the target capability add Dependency target dependent Update the membership set for the target capability String ids registry get Membership Set Ids target for int j 0 j ids length j memberships put ids j target  markCapabilityChecked checkedCapabilities checkedCapabilities checkboxViewer setChecked checkboxViewer setGrayed addDependency getMembershipSetIds
Marks the capability as being unchecked private void mark Capability Unchecked Capability target Uncheck the target capability checked Capabilities remove target checkbox Viewer set Checked target false Ungray the target as there is no dependency on it checkbox Viewer set Grayed target false Remove the dependency entry dependents remove target Update the membership set for the target capability String ids registry get Membership Set Ids target for int j 0 j ids length j if memberships get ids j target memberships remove ids j  markCapabilityUnchecked checkedCapabilities checkboxViewer setChecked checkboxViewer setGrayed getMembershipSetIds
Returns the list of categories that have capabilities registered against it private Array List get Available Categories Array List results registry get Used Categories Collections sort results category Comparator if registry get Misc Category null results add registry get Misc Category return results  ArrayList getAvailableCategories ArrayList getUsedCategories categoryComparator getMiscCategory getMiscCategory
Return code true code if the user may have made changes to the capabilities of the project Otherwise code false code if no changes were made return code true true when possible changes may have been made code false code otherwise public boolean get Capabilities Modified return modified  getCapabilitiesModified
return new Workbench Content Provider public Object get Children Object parent Element if parent Element instanceof Array List return Array List parent Element to Array else return null  WorkbenchContentProvider getChildren parentElement parentElement ArrayList ArrayList parentElement toArray
Returns the content provider for the viewers private I Content Provider get Content Provider return new Workbench Content Provider public Object get Children Object parent Element if parent Element instanceof Array List return Array List parent Element to Array else return null  IContentProvider getContentProvider WorkbenchContentProvider getChildren parentElement parentElement ArrayList ArrayList parentElement toArray
The user has changed the project capability selection Set the modified flag and clear the caches private void capabilities Modified modified true  capabilitiesModified
Add a dependency between the target and dependent capabilities private void add Dependency Capability target Capability dependent Array List descriptors Array List dependents get target if descriptors null descriptors new Array List descriptors add dependent dependents put target descriptors else if descriptors contains dependent descriptors add dependent  addDependency ArrayList ArrayList ArrayList
Returns true if the capability has any dependencies on it private boolean has Dependency Capability capability Array List descriptors Array List dependents get capability if descriptors null return false if descriptors size 1 descriptors get 0 capability return false return true  hasDependency ArrayList ArrayList
Returns whether the category is considered disabled private boolean is Disabled Capability Capability cap if disabled Caps null if disabled Capabilities null disabled Caps new Array List 0 else disabled Caps Arrays as List disabled Capabilities return disabled Caps contains cap  isDisabledCapability disabledCaps disabledCapabilities disabledCaps ArrayList disabledCaps asList disabledCapabilities disabledCaps
Populate the dependents map based on the current set of capabilities private void populate Dependents if initial Capabilities null return Linked List capabilities new Linked List capabilities add All Arrays as List initial Capabilities while capabilities is Empty Retrieve the target capability Capability target target Capability capabilities remove First Add the capability as a dependent of itself It will indicate to the uncheck handler to not uncheck this capability automatically even if a another capability which depended on it is unchecked add Dependency target target if registry has Prerequisites target Retrieve the prerequisite capabilities String prereq Ids registry get Prerequisite Ids target Capability prereq Capabilities prereq Capabilities registry find Capabilities prereq Ids For each prerequisite capability for int i 0 i prereq Capabilities length i Update the dependent map for the prerequisite capability add Dependency prereq Capabilities i target Recursive if prerequisite capability also has prerequisites if registry has Prerequisites prereq Capabilities i capabilities add Last prereq Capabilities i  populateDependents initialCapabilities LinkedList LinkedList addAll asList initialCapabilities isEmpty removeFirst addDependency hasPrerequisites prereqIds getPrerequisiteIds prereqCapabilities prereqCapabilities findCapabilities prereqIds prereqCapabilities addDependency prereqCapabilities hasPrerequisites prereqCapabilities addLast prereqCapabilities
Populate the memberships map based on the current set of capabilities private void populate Memberships if initial Capabilities null return Iterator enum Arrays as List initial Capabilities iterator while enum has Next Capability cap Capability enum next String ids registry get Membership Set Ids cap for int j 0 j ids length j memberships put ids j cap  populateMemberships initialCapabilities asList initialCapabilities hasNext getMembershipSetIds
Handle the case of a capability being checked by ensuring the action is allowed and the prerequisite capabilities are also checked private void handle Capability Checked Capability capability Cannot allow a disabled capability to be checked if is Disabled Capability capability Message Dialog open Warning checkbox Viewer get Control get Shell IDE Workbench Messages get String Project Capability Selection Group error Title NON NLS 1 IDE Workbench Messages format Project Capability Selection Group disabled Capability new Object capability get Name NON NLS 1 checkbox Viewer set Checked capability false return Cannot allow an invalid capability to be checked if capability is Valid Message Dialog open Warning checkbox Viewer get Control get Shell IDE Workbench Messages get String Project Capability Selection Group error Title NON NLS 1 IDE Workbench Messages format Project Capability Selection Group invalid Capability new Object capability get Name NON NLS 1 checkbox Viewer set Checked capability false return Is there a membership set problem String ids registry get Membership Set Ids capability for int i 0 i ids length i Capability member Capability memberships get ids i if member null member capability Message Dialog open Warning checkbox Viewer get Control get Shell IDE Workbench Messages get String Project Capability Selection Group error Title NON NLS 1 IDE Workbench Messages format Project Capability Selection Group membership Conflict new Object capability get Name member get Name NON NLS 1 checkbox Viewer set Checked capability false return Handle prerequisite by auto checking them if possible if registry has Prerequisites capability Check for any prerequisite problems Retrieve all the prerequisite capabilities including any prerequisite of the prerequisites Linked List capabilities new Linked List capabilities add Last capability while capabilities is Empty Capability target target Capability capabilities remove First Retrieve the capability s immediate prerequisites String prereq Ids registry get Prerequisite Ids target Capability prereq Capabilities prereq Capabilities registry find Capabilities prereq Ids for int i 0 i prereq Capabilities length i If the prerequisite is missing warn the user and do not allow the check to proceed if prereq Capabilities i null is Disabled Capability prereq Capabilities i prereq Capabilities i is Valid Message Dialog open Warning checkbox Viewer get Control get Shell IDE Workbench Messages get String Project Capability Selection Group error Title NON NLS 1 IDE Workbench Messages format Project Capability Selection Group missing Prereqs new Object capability get Name prereq Ids i NON NLS 1 checkbox Viewer set Checked capability false return If there is a membership problem warn the user and do not allow the check to proceed ids registry get Membership Set Ids prereq Capabilities i for int j 0 j ids length j Capability member Capability memberships get ids j if member null member prereq Capabilities i Message Dialog open Warning checkbox Viewer get Control get Shell IDE Workbench Messages get String Project Capability Selection Group error Title NON NLS 1 IDE Workbench Messages format Project Capability Selection Group membership Prereq Conflict new Object capability get Name prereq Capabilities i get Name member get Name NON NLS 1 checkbox Viewer set Checked capability false return If the prerequisite capability has prerequisites also then add it to be processed if registry has Prerequisites prereq Capabilities i capabilities add Last prereq Capabilities i Auto check all prerequisite capabilities capabilities new Linked List capabilities add Last capability For each capability that has prerequisites while capabilities is Empty Capability target target Capability capabilities remove First Retrieve the prerequisite capabilities String prereq Ids registry get Prerequisite Ids target Capability prereq Capabilities prereq Capabilities registry find Capabilities prereq Ids For each prerequisite capability for int i 0 i prereq Capabilities length i Mark it as being checked mark Capability Checked prereq Capabilities i target Recursive if prerequisite capability also has prerequisites if registry has Prerequisites prereq Capabilities i capabilities add Last prereq Capabilities i Mark the capability as checked Adds itself as a dependent this will indicate to the uncheck handler to not uncheck this capability automatically even if another capability which depends on it is unchecked mark Capability Checked capability capability Notify those interested capabilities Modified notify Check State Listner  handleCapabilityChecked isDisabledCapability MessageDialog openWarning checkboxViewer getControl getShell IDEWorkbenchMessages getString ProjectCapabilitySelectionGroup errorTitle IDEWorkbenchMessages ProjectCapabilitySelectionGroup disabledCapability getName checkboxViewer setChecked isValid MessageDialog openWarning checkboxViewer getControl getShell IDEWorkbenchMessages getString ProjectCapabilitySelectionGroup errorTitle IDEWorkbenchMessages ProjectCapabilitySelectionGroup invalidCapability getName checkboxViewer setChecked getMembershipSetIds MessageDialog openWarning checkboxViewer getControl getShell IDEWorkbenchMessages getString ProjectCapabilitySelectionGroup errorTitle IDEWorkbenchMessages ProjectCapabilitySelectionGroup membershipConflict getName getName checkboxViewer setChecked hasPrerequisites LinkedList LinkedList addLast isEmpty removeFirst prereqIds getPrerequisiteIds prereqCapabilities prereqCapabilities findCapabilities prereqIds prereqCapabilities prereqCapabilities isDisabledCapability prereqCapabilities prereqCapabilities isValid MessageDialog openWarning checkboxViewer getControl getShell IDEWorkbenchMessages getString ProjectCapabilitySelectionGroup errorTitle IDEWorkbenchMessages ProjectCapabilitySelectionGroup missingPrereqs getName prereqIds checkboxViewer setChecked getMembershipSetIds prereqCapabilities prereqCapabilities MessageDialog openWarning checkboxViewer getControl getShell IDEWorkbenchMessages getString ProjectCapabilitySelectionGroup errorTitle IDEWorkbenchMessages ProjectCapabilitySelectionGroup membershipPrereqConflict getName prereqCapabilities getName getName checkboxViewer setChecked hasPrerequisites prereqCapabilities addLast prereqCapabilities LinkedList addLast isEmpty removeFirst prereqIds getPrerequisiteIds prereqCapabilities prereqCapabilities findCapabilities prereqIds prereqCapabilities markCapabilityChecked prereqCapabilities hasPrerequisites prereqCapabilities addLast prereqCapabilities markCapabilityChecked capabilitiesModified notifyCheckStateListner
Handle the case of a capability being unchecked by ensuring the action is allowed private void handle Capability Unchecked Capability capability Array List descriptors Array List dependents get capability Note there is no need to handle the case where descriptors size is zero because it cannot happen For this method to be called the item must have been checked previously If it was checked by the user then the item itself would be a dependent If the item was checked because it was required by another capability then that other capability would be a dependent if descriptors size 1 descriptors get 0 capability If the only dependent is itself then its ok to uncheck capabilities Modified mark Capability Unchecked capability Remove this capability as a dependent on its prerequisite capabilities Recursive if a prerequisite capability no longer has any dependents if registry has Prerequisites capability Linked List capabilities new Linked List capabilities add Last capability For each capability that has prerequisite capabilities while capabilities is Empty Capability target target Capability capabilities remove First Retrieve the prerequisite capabilities String prereq Ids registry get Prerequisite Ids target Capability prereq Capabilities prereq Capabilities registry find Capabilities prereq Ids For each prerequisite capability for int i 0 i prereq Capabilities length i Retrieve the list of dependents on the prerequisite capability Capability prereq Cap prereq Capabilities i Array List prereq Dependents Array List dependents get prereq Cap Remove the dependent target capability prereq Dependents remove target if prereq Dependents is Empty Unchecked the prerequisite capability mark Capability Unchecked prereq Cap Recursive if prerequisite capability also has prerequisite capabilities if registry has Prerequisites prereq Cap capabilities add Last prereq Cap else if prereq Dependents size 1 prereq Dependents get 0 prereq Cap Only dependent is itself so ungray the item to let the user know no other capability is dependent on it checkbox Viewer set Grayed prereq Cap false Notify those interested notify Check State Listner else At least one other capability depends on it being checked so force it to remain checked and warn the user checkbox Viewer set Checked capability true Get a copy and remove the target capability Array List desc Copy Array List descriptors clone desc Copy remove capability Show the prereq problem to the user if desc Copy size 1 Capability cap Capability desc Copy get 0 Message Dialog open Warning checkbox Viewer get Control get Shell IDE Workbench Messages get String Project Capability Selection Group error Title NON NLS 1 IDE Workbench Messages format Project Capability Selection Group required Prereq new Object capability get Name cap get Name NON NLS 1 else String Buffer msg new String Buffer Iterator enum desc Copy iterator while enum has Next Capability cap Capability enum next msg append n NON NLS 1 msg append cap get Name Message Dialog open Warning checkbox Viewer get Control get Shell IDE Workbench Messages get String Project Capability Selection Group error Title NON NLS 1 IDE Workbench Messages format Project Capability Selection Group required Prereqs new Object capability get Name msg to String NON NLS 1  handleCapabilityUnchecked ArrayList ArrayList capabilitiesModified markCapabilityUnchecked hasPrerequisites LinkedList LinkedList addLast isEmpty removeFirst prereqIds getPrerequisiteIds prereqCapabilities prereqCapabilities findCapabilities prereqIds prereqCapabilities prereqCap prereqCapabilities ArrayList prereqDependents ArrayList prereqCap prereqDependents prereqDependents isEmpty markCapabilityUnchecked prereqCap hasPrerequisites prereqCap addLast prereqCap prereqDependents prereqDependents prereqCap checkboxViewer setGrayed prereqCap notifyCheckStateListner checkboxViewer setChecked ArrayList descCopy ArrayList descCopy descCopy descCopy MessageDialog openWarning checkboxViewer getControl getShell IDEWorkbenchMessages getString ProjectCapabilitySelectionGroup errorTitle IDEWorkbenchMessages ProjectCapabilitySelectionGroup requiredPrereq getName getName StringBuffer StringBuffer descCopy hasNext getName MessageDialog openWarning checkboxViewer getControl getShell IDEWorkbenchMessages getString ProjectCapabilitySelectionGroup errorTitle IDEWorkbenchMessages ProjectCapabilitySelectionGroup requiredPrereqs getName toString
Returns the collection of capabilities selected by the user The collection is not in prerequisite order return array of selected capabilities public Capability get Selected Capabilities Capability capabilities new Capability checked Capabilities size checked Capabilities to Array capabilities return capabilities  getSelectedCapabilities checkedCapabilities checkedCapabilities toArray
Return the current listener interested when the check state of a capability actually changes return Returns a I Check State Listener public I Check State Listener get Check State Listener return check State Listener  ICheckStateListener ICheckStateListener getCheckStateListener checkStateListener
Set the current listener interested when the check state of a capability actually changes param check State Listener The check State Listener to set public void set Check State Listener I Check State Listener check State Listener this check State Listener check State Listener  checkStateListener checkStateListener setCheckStateListener ICheckStateListener checkStateListener checkStateListener checkStateListener
Notify the check state listener that a capability check state has changed The event past will always be code null code as it could be triggered by code instead of user input private void notify Check State Listner if check State Listener null check State Listener check State Changed null  notifyCheckStateListner checkStateListener checkStateListener checkStateChanged
Updates the description field for the selected capability private void update Description I Selection selection String text EMPTY DESCRIPTION if selection instanceof I Structured Selection I Structured Selection sel I Structured Selection selection Capability cap Capability sel get First Element if cap null text cap get Description description Text set Text text  updateDescription ISelection EMPTY_DESCRIPTION IStructuredSelection IStructuredSelection IStructuredSelection getFirstElement getDescription descriptionText setText
public void dispose if image Table null Iterator enum image Table values iterator while enum has Next Image enum next dispose image Table null  imageTable imageTable hasNext imageTable
public Image get Image Object element Image Descriptor descriptor Capability element get Icon Descriptor if descriptor null return null obtain the cached image corresponding to the descriptor if image Table null image Table new Hashtable 40 Image image Image image Table get descriptor if image null image descriptor create Image image Table put descriptor image return image  getImage ImageDescriptor getIconDescriptor imageTable imageTable imageTable createImage imageTable
public String get Text Object element Capability cap Capability element String text cap get Name if is Disabled Capability cap text IDE Workbench Messages format Project Capability Selection Group disabled Label new Object text NON NLS 1 return text  getText getName isDisabledCapability IDEWorkbenchMessages ProjectCapabilitySelectionGroup disabledLabel

private static final int SIZING TEXT FIELD WIDTH 250 Create an instance of the group to allow the user to enter select a container and specify a resource name param parent composite widget to parent the group param client object interested in changes to the group s fields value param resource Field Label label to use in front of the resource name field param resource Type one word in lowercase to describe the resource to the user file folder project public Resource And Container Group Composite parent Listener client String resource Field Label String resource Type this parent client resource Field Label resource Type true  SIZING_TEXT_FIELD_WIDTH resourceFieldLabel resourceType ResourceAndContainerGroup resourceFieldLabel resourceType resourceFieldLabel resourceType
Create an instance of the group to allow the user to enter select a container and specify a resource name param parent composite widget to parent the group param client object interested in changes to the group s fields value param resource Field Label label to use in front of the resource name field param resource Type one word in lowercase to describe the resource to the user file folder project param show Closed Projects whether or not to show closed projects public Resource And Container Group Composite parent Listener client String resource Field Label String resource Type boolean show Closed Projects this parent client resource Field Label resource Type show Closed Projects SWT DEFAULT  resourceFieldLabel resourceType showClosedProjects ResourceAndContainerGroup resourceFieldLabel resourceType showClosedProjects resourceFieldLabel resourceType showClosedProjects
Create an instance of the group to allow the user to enter select a container and specify a resource name param parent composite widget to parent the group param client object interested in changes to the group s fields value param resource Field Label label to use in front of the resource name field param resource Type one word in lowercase to describe the resource to the user file folder project param show Closed Projects whether or not to show closed projects param height Hint height hint for the container selection widget group public Resource And Container Group Composite parent Listener client String resource Field Label String resource Type boolean show Closed Projects int height Hint super this resource Type resource Type this show Closed Projects show Closed Projects create Contents parent resource Field Label height Hint this client client  resourceFieldLabel resourceType showClosedProjects heightHint ResourceAndContainerGroup resourceFieldLabel resourceType showClosedProjects heightHint resourceType resourceType showClosedProjects showClosedProjects createContents resourceFieldLabel heightHint
Returns a boolean indicating whether all controls in this group contain valid values return boolean public boolean are All Values Valid return problem Type PROBLEM NONE  areAllValuesValid problemType PROBLEM_NONE
Creates this object s visual components param parent org eclipse swt widgets Composite param height Hint height hint for the container selection widget group protected void create Contents Composite parent String resource Label String int height Hint Font font parent get Font server name group Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL composite set Font font container group if height Hint SWT DEFAULT container Group new Container Selection Group composite this true null show Closed Projects else container Group new Container Selection Group composite this true null show Closed Projects height Hint resource name group Composite name Group new Composite composite SWT NONE layout new Grid Layout layout num Columns 2 layout margin Width 0 name Group set Layout layout name Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL name Group set Font font Label label new Label name Group SWT NONE label set Text resource Label String label set Font font resource name entry field resource Name Field new Text name Group SWT BORDER resource Name Field add Listener SWT Modify this Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH resource Name Field set Layout Data data resource Name Field set Font font validate Controls  heightHint createContents resourceLabelString heightHint getFont GridLayout GridLayout marginWidth marginHeight setLayout setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL setFont heightHint containerGroup ContainerSelectionGroup showClosedProjects containerGroup ContainerSelectionGroup showClosedProjects heightHint nameGroup GridLayout numColumns marginWidth nameGroup setLayout nameGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL nameGroup setFont nameGroup setText resourceLabelString setFont resourceNameField nameGroup resourceNameField addListener GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH resourceNameField setLayoutData resourceNameField setFont validateControls
Returns the path of the currently selected container or null if no container has been selected Note that the container may not exist yet if the user entered a new container name in the field public I Path get Container Full Path return container Group get Container Full Path  IPath getContainerFullPath containerGroup getContainerFullPath
Returns an error message indicating the current problem with the value of a control in the group or an empty message if all controls in the group contain valid values return java lang String public String get Problem Message return problem Message  getProblemMessage problemMessage
Returns the type of problem with the value of a control in the group return one of the PROBLEM  constants public int get Problem Type return problem Type  PROBLEM_ getProblemType problemType
Returns a string that is the path of the currently selected container Returns an empty string if no container has been selected public String get Resource return resource Name Field get Text  getResource resourceNameField getText
Handles events for all controls in the group param e org eclipse swt widgets Event public void handle Event Event e validate Controls if client null client handle Event e  handleEvent validateControls handleEvent
Sets the flag indicating whether existing resources are permitted public void set Allow Existing Resources boolean value allow Existing Resources value  setAllowExistingResources allowExistingResources
Sets the value of this page s container param path Full path to the container public void set Container Full Path I Path path I Resource initial Resources Plugin get Workspace get Root find Member path if initial null if initial instanceof I Container initial initial get Parent container Group set Selected Container I Container initial validate Controls  setContainerFullPath IPath IResource ResourcesPlugin getWorkspace getRoot findMember IContainer getParent containerGroup setSelectedContainer IContainer validateControls
Gives focus to the resource name field and selects its contents public void set Focus select the whole resource name resource Name Field set Selection 0 resource Name Field get Text length resource Name Field set Focus  setFocus resourceNameField setSelection resourceNameField getText resourceNameField setFocus
Sets the value of this page s resource name param value new value public void set Resource String value resource Name Field set Text value validate Controls  setResource resourceNameField setText validateControls
Returns a code boolean code indicating whether a container name represents a valid container resource in the workbench An error message is stored for future reference if the name does not represent a valid container return code boolean code indicating validity of the container name protected boolean validate Container I Path path container Group get Container Full Path if path null problem Type PROBLEM CONTAINER EMPTY problem Message IDE Workbench Messages get String Resource Group folder Empty NON NLS 1 return false I Workspace workspace Resources Plugin get Workspace String project Name path segment 0 if project Name null workspace get Root get Project project Name exists problem Type PROBLEM PROJECT DOES NOT EXIST problem Message IDE Workbench Messages get String Resource Group no Project NON NLS 1 return false return true  validateContainer IPath containerGroup getContainerFullPath problemType PROBLEM_CONTAINER_EMPTY problemMessage IDEWorkbenchMessages getString ResourceGroup folderEmpty IWorkspace ResourcesPlugin getWorkspace projectName projectName getRoot getProject projectName problemType PROBLEM_PROJECT_DOES_NOT_EXIST problemMessage IDEWorkbenchMessages getString ResourceGroup noProject
Validates the values for each of the group s controls If an invalid value is found then a descriptive error message is stored for later reference Returns a boolean indicating the validity of all of the controls in the group protected boolean validate Controls don t attempt to validate controls until they have been created if container Group null return false problem Type PROBLEM NONE problem Message NON NLS 1 if validate Container validate Resource Name return false I Path path container Group get Container Full Path append resource Name Field get Text return validate Full Resource Path path  validateControls containerGroup problemType PROBLEM_NONE problemMessage validateContainer validateResourceName IPath containerGroup getContainerFullPath resourceNameField getText validateFullResourcePath
Returns a code boolean code indicating whether the specified resource path represents a valid new resource in the workbench An error message is stored for future reference if the path does not represent a valid new resource path param resource Path the path to validate return code boolean code indicating validity of the resource path protected boolean validate Full Resource Path I Path resource Path I Workspace workspace Resources Plugin get Workspace I Status result workspace validate Path resource Path to String I Resource FOLDER if result isOK problem Type PROBLEM PATH INVALID problem Message result get Message return false if allow Existing Resources workspace get Root get Folder resource Path exists workspace get Root get File resource Path exists problem Type PROBLEM RESOURCE EXIST problem Message IDE Workbench Messages get String Resource Group name Exists NON NLS 1 return false return true  resourcePath validateFullResourcePath IPath resourcePath IWorkspace ResourcesPlugin getWorkspace IStatus validatePath resourcePath toString IResource problemType PROBLEM_PATH_INVALID problemMessage getMessage allowExistingResources getRoot getFolder resourcePath getRoot getFile resourcePath problemType PROBLEM_RESOURCE_EXIST problemMessage IDEWorkbenchMessages getString ResourceGroup nameExists
Returns a code boolean code indicating whether the resource name rep resents a valid resource name in the workbench An error message is stored for future reference if the name does not represent a valid resource name return code boolean code indicating validity of the resource name protected boolean validate Resource Name String resource Name resource Name Field get Text if resource Name equals NON NLS 1 problem Type PROBLEM RESOURCE EMPTY problem Message IDE Workbench Messages format Resource Group empty Name new Object resource Type NON NLS 1 return false if new Path is Valid Segment resource Name NON NLS 1 problem Type PROBLEM NAME INVALID problem Message IDE Workbench Messages format Resource Group invalid Filename new String resource Name NON NLS 1 return false return true  validateResourceName resourceName resourceNameField getText resourceName problemType PROBLEM_RESOURCE_EMPTY problemMessage IDEWorkbenchMessages ResourceGroup emptyName resourceType isValidSegment resourceName problemType PROBLEM_NAME_INVALID problemMessage IDEWorkbenchMessages ResourceGroup invalidFilename resourceName

Creates a new instance of the code Wizard Step Group code public Wizard Step Group super  WizardStepGroup WizardStepGroup
Create the contents of this group The basic layout is a table with a label above it public Control create Contents Composite parent Font font parent get Font parent Composite parent Create a composite to hold everything together Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL VERTICAL composite set Font font composite add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if done Image null done Image dispose done Image null if current Image null current Image dispose current Image null Add a label to identify the step list field Label label new Label composite SWT LEFT label set Text IDE Workbench Messages get String Wizard Step Group steps Label NON NLS 1 Grid Data data new Grid Data data vertical Alignment SWT TOP label set Layout Data data label set Font font Table viewer of all the steps step Viewer new Table Viewer composite SWT SINGLE SWT V SCROLL SWT BORDER SWT FULL SELECTION data new Grid Data Grid Data FILL BOTH step Viewer get Table set Layout Data data step Viewer get Table set Font font step Viewer set Content Provider get Step Provider step Viewer set Label Provider new Step Label Provider if selection Listener null step Viewer add Selection Changed Listener selection Listener return composite  createContents getFont parentComposite setLayout GridLayout setLayoutData GridData GridData FILL_VERTICAL setFont addDisposeListener DisposeListener widgetDisposed DisposeEvent doneImage doneImage doneImage currentImage currentImage currentImage setText IDEWorkbenchMessages getString WizardStepGroup stepsLabel GridData GridData verticalAlignment setLayoutData setFont stepViewer TableViewer V_SCROLL FULL_SELECTION GridData GridData FILL_BOTH stepViewer getTable setLayoutData stepViewer getTable setFont stepViewer setContentProvider getStepProvider stepViewer setLabelProvider StepLabelProvider selectionListener stepViewer addSelectionChangedListener selectionListener
Creates an image descriptor private Image create Image String icon File Name String icon Path icons full elcl16 NON NLS 1 Image Descriptor desc null try URL url basic Platform get Plugin PlatformUI PLUGIN ID get Descriptor get InstallURL URL url new URL url basic icon Path icon File Name desc Image Descriptor create FromURL url catch MalformedURL Exception e return null return desc create Image  createImage iconFileName iconPath ImageDescriptor url_basic getPlugin PLUGIN_ID getDescriptor getInstallURL url_basic iconPath iconFileName ImageDescriptor createFromURL MalformedURLException createImage
Return the image indicating a step is current private Image get Current Image if current Image null current Image create Image step current gif NON NLS 1 return current Image  getCurrentImage currentImage currentImage createImage step_current currentImage
Return the image indicating a step is done private Image get Done Image if done Image null done Image create Image step done gif NON NLS 1 return done Image  getDoneImage doneImage doneImage createImage step_done doneImage
return new Workbench Content Provider public Object get Children Object parent Element if parent Element instanceof Step Root return Step Root parent Element get Steps else return null  WorkbenchContentProvider getChildren parentElement parentElement StepRoot StepRoot parentElement getSteps
Returns the content provider for the step viewer private I Content Provider get Step Provider return new Workbench Content Provider public Object get Children Object parent Element if parent Element instanceof Step Root return Step Root parent Element get Steps else return null  IContentProvider getStepProvider WorkbenchContentProvider getChildren parentElement parentElement StepRoot StepRoot parentElement getSteps
Returns the steps public Wizard Step get Steps if step Viewer null Step Root root Step Root step Viewer get Input if root null return root get Steps return new Wizard Step 0  WizardStep getSteps stepViewer StepRoot StepRoot stepViewer getInput getSteps WizardStep
Marks the current step as being done public void mark Step As Done if current Step null current Step mark As Done  markStepAsDone currentStep currentStep markAsDone
Sets the current step being worked on Assumes the step provided exist in the steps within the group s viewer param step the wizard step being worked on public void set Current Step Wizard Step step Wizard Step old Step current Step current Step step if step Viewer null if old Step null step Viewer update old Step null if current Step null step Viewer update current Step null Update the layout so that there is enough room for the icon now if old Step null current Step null parent Composite layout true  setCurrentStep WizardStep WizardStep oldStep currentStep currentStep stepViewer oldStep stepViewer oldStep currentStep stepViewer currentStep oldStep currentStep parentComposite
Set the current listener interested when the selection state changes param listener The selection listener to set public void set Selection Listener I Selection Changed Listener listener if selection Listener null step Viewer null step Viewer remove Selection Changed Listener selection Listener selection Listener listener if selection Listener null step Viewer null step Viewer add Selection Changed Listener selection Listener  setSelectionListener ISelectionChangedListener selectionListener stepViewer stepViewer removeSelectionChangedListener selectionListener selectionListener selectionListener stepViewer stepViewer addSelectionChangedListener selectionListener
Sets the steps to be displayed Ignored is the method create Contents has not been called yet param steps the collection of steps public void set Steps Wizard Step steps if step Viewer null step Viewer set Input new Step Root steps parent Composite layout true  createContents setSteps WizardStep stepViewer stepViewer setInput StepRoot parentComposite
private Wizard Step steps public Step Root Wizard Step steps super this steps steps  WizardStep StepRoot WizardStep
public Wizard Step get Steps if steps null return new Wizard Step 0 else return steps  WizardStep getSteps WizardStep
private class Step Label Provider extends Label Provider public String get Text Object element if element instanceof Wizard Step Wizard Step step Wizard Step element return String value Of step get Number step get Label NON NLS 1 return NON NLS 1  StepLabelProvider LabelProvider getText WizardStep WizardStep WizardStep valueOf getNumber getLabel
public Image get Image Object element if element instanceof Wizard Step Wizard Step step Wizard Step element if step is Done return get Done Image if step current Step return get Current Image return null  getImage WizardStep WizardStep WizardStep isDone getDoneImage currentStep getCurrentImage

since 3 0 private Work In Progress Messages TODO Auto generated constructor stub  WorkInProgressMessages
param key return the string for the given key since 3 0 public static String get String String key TODO Auto generated method stub try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

private int initialize Parser try parser Factory SAX Parser Factory new Instance parser Factory set Namespace Aware true try parser Factory set Feature http xml org sax features string interning true NON NLS 1 parser Factory set Validating false catch SAX Exception e IDE Workbench Plugin log Problem initializing parser new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH I Status ERROR Problem initializing parser e NON NLS 1 NON NLS 2 parser parser Factory newSAX Parser XML Reader reader parser getXML Reader reader set Property http xml org sax properties lexical handler this NON NLS 1 catch Exception e IDE Workbench Plugin log Problem initializing parser new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH I Status ERROR Problem initializing parser e NON NLS 1 NON NLS 2 return 1  initializeParser parserFactory SAXParserFactory newInstance parserFactory setNamespaceAware parserFactory setFeature parserFactory setValidating SAXException IDEWorkbenchPlugin IStatus IDEWorkbenchPlugin IDE_WORKBENCH IStatus parserFactory newSAXParser XMLReader getXMLReader setProperty IDEWorkbenchPlugin IStatus IDEWorkbenchPlugin IDE_WORKBENCH IStatus
synchronized public void parse Resource I Resource resource throws Exception if resource null return parse Resource resource Need to get a File version of this resource I Path location resource get Location if location null return File file location to File if file length 0L Some SAX parsers will throw a SAX Parse Exception for a zero length file We ll just decide there s nothing to do and return gracefully First set the last modification time so we don t have to check this again unless the file changes long mod Time parse Resource get Modification Stamp Qualified Name mod Key new Qualified Name IDE Workbench Plugin IDE WORKBENCH Workbench Resource XML LAST MOD try parse Resource set Persistent Property mod Key new Long mod Time to String catch Core Exception c IDE Workbench Plugin log Problem parsing element c get Status NON NLS 1 return try parser parse file this catch SAX Exception s If the SAX Exception is the one we threw to abort the parsing just ignore it and continue processing if s get Message equals Property Parser stop NON NLS 1 We got a real error so log it but continue processing IDE Workbench Plugin log Problem parsing file new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH I Status ERROR Problem parsing file s NON NLS 1 NON NLS 2  parseResource IResource parseResource IPath getLocation toFile SAXParseException modTime parseResource getModificationStamp QualifiedName modKey QualifiedName IDEWorkbenchPlugin IDE_WORKBENCH WorkbenchResource XML_LAST_MOD parseResource setPersistentProperty modKey modTime toString CoreException IDEWorkbenchPlugin getStatus SAXException SAXException getMessage PropertyParser IDEWorkbenchPlugin IStatus IDEWorkbenchPlugin IDE_WORKBENCH IStatus
public void start Element String uri String element Name String q Name Attributes attributes throws SAX Exception We have hit an XML element We are only concerned with the root level element Figure out what it is and store it as a persistent property Once we have the root level element stored no further parsing of this file is required As a result this method will then throw a SAX Exception the recommended way of aborting parsing This method is not intended to be called It is only called from within the XML SAX parser being used long mod Time parse Resource get Modification Stamp Qualified Name mod Key new Qualified Name IDE Workbench Plugin IDE WORKBENCH Workbench Resource XML LAST MOD try parse Resource set Persistent Property mod Key new Long mod Time to String catch Core Exception c IDE Workbench Plugin log Problem parsing element c get Status NON NLS 1 We are only interested in the first element Qualified Name key String property Name I Resource Action Filter XML FIRST TAG key new Qualified Name IDE Workbench Plugin IDE WORKBENCH property Name try parse Resource set Persistent Property key element Name catch Core Exception c IDE Workbench Plugin log Problem parsing element c get Status NON NLS 1 And now we wish to abort the parsing The only other thing we looked for was the dtd name By definition the dtd declaration must occur before the first element throw new SAX Exception Property Parser stop NON NLS 1  startElement elementName qName SAXException SAXException modTime parseResource getModificationStamp QualifiedName modKey QualifiedName IDEWorkbenchPlugin IDE_WORKBENCH WorkbenchResource XML_LAST_MOD parseResource setPersistentProperty modKey modTime toString CoreException IDEWorkbenchPlugin getStatus QualifiedName propertyName IResourceActionFilter XML_FIRST_TAG QualifiedName IDEWorkbenchPlugin IDE_WORKBENCH propertyName parseResource setPersistentProperty elementName CoreException IDEWorkbenchPlugin getStatus SAXException PropertyParser
see org xml sax ext Lexical Handler comment char int int public void comment char ch int start int length throws SAX Exception No interesting behavior  LexicalHandler SAXException
see org xml sax ext Lexical Handler endCDATA public void endCDATA throws SAX Exception No interesting behavior  LexicalHandler SAXException
see org xml sax ext Lexical Handler endDTD public void endDTD throws SAX Exception No interesting behavior  LexicalHandler SAXException
see org xml sax ext Lexical Handler end Entity java lang String public void end Entity String name throws SAX Exception No interesting behavior  LexicalHandler endEntity endEntity SAXException
see org xml sax ext Lexical Handler startCDATA public void startCDATA throws SAX Exception No interesting behavior  LexicalHandler SAXException
public void startDTD String name String public Id String system Id throws SAX Exception We have hit an DTD request for this XML file The name of the DTD wanted for this XML file will be stored as a persistent property This method is not intended to be called It is only called from within the XML SAX parser being used if system Id null return Qualified Name qname new Qualified Name IDE Workbench Plugin IDE WORKBENCH I Resource Action Filter XML DTD NAME try parse Resource set Persistent Property qname system Id catch Core Exception c IDE Workbench Plugin log Problem parsing dtd element c get Status NON NLS 1  publicId systemId SAXException systemId QualifiedName QualifiedName IDEWorkbenchPlugin IDE_WORKBENCH IResourceActionFilter XML_DTD_NAME parseResource setPersistentProperty systemId CoreException IDEWorkbenchPlugin getStatus
see org xml sax ext Lexical Handler start Entity java lang String public void start Entity String name throws SAX Exception No interesting behavior  LexicalHandler startEntity startEntity SAXException
see org xml sax helpers Default Handler resolve Entity java lang String java lang String public Input Source resolve Entity String public Id String system Id throws SAX Exception return new Input Source new String Reader NON NLS 1  DefaultHandler resolveEntity InputSource resolveEntity publicId systemId SAXException InputSource StringReader

private I Resource res Create a Resource Factory This constructor is typically used for our I Element Factory side public Resource Factory  IResource ResourceFactory IElementFactory ResourceFactory
Create a Resource Factory This constructor is typically used for our I Persistable Element side public Resource Factory I Resource input res input  ResourceFactory IPersistableElement ResourceFactory IResource
see I Element Factory public I Adaptable create Element I Memento memento Get the file name String file Name memento get String TAG PATH if file Name null return null I Workspace Root root Resources Plugin get Workspace get Root String type memento get String TAG TYPE if type null Old format memento Create an I Resource using find Member Will return null for resources in closed projects res root find Member new Path file Name else int resource Type Integer parse Int type if resource Type I Resource ROOT res root else if resource Type I Resource PROJECT res root get Project file Name else if resource Type I Resource FOLDER res root get Folder new Path file Name else if resource Type I Resource FILE res root get File new Path file Name return res  IElementFactory IAdaptable createElement IMemento fileName getString TAG_PATH fileName IWorkspaceRoot ResourcesPlugin getWorkspace getRoot getString TAG_TYPE IResource findMember findMember fileName resourceType parseInt resourceType IResource resourceType IResource getProject fileName resourceType IResource getFolder fileName resourceType IResource getFile fileName
see I Persistable Element public String get Factory Id return FACTORY ID  IPersistableElement getFactoryId FACTORY_ID
see I Persistable Element public void save State I Memento memento memento put String TAG PATH res get Full Path to String memento put String TAG TYPE Integer to String res get Type  IPersistableElement saveState IMemento putString TAG_PATH getFullPath toString putString TAG_TYPE toString getType

public Object get Adapter Object o Class adapter Type if adapter Type is Instance o return o if adapter Type I Property Source class if o instanceof I Resource I Resource resource I Resource o if resource get Type I Resource FILE return new File Property Source I File o else return new Resource Property Source I Resource o return null  getAdapter adapterType adapterType isInstance adapterType IPropertySource IResource IResource IResource getType IResource FilePropertySource IFile ResourcePropertySource IResource
public Class get Adapter List return new Class I Property Source class  getAdapterList IPropertySource

public final class Workbench Adapter Builder Creates extenders and registers public static void register Adapters I Adapter Manager manager Platform get Adapter Manager I Adapter Factory factory new Workbench Adapter Factory manager register Adapters factory I Workspace class manager register Adapters factory I Workspace Root class manager register Adapters factory I Project class manager register Adapters factory I Folder class manager register Adapters factory I File class manager register Adapters factory I Marker class properties adapters I Adapter Factory pa Factory new Standard Properties Adapter Factory manager register Adapters pa Factory I Workspace class manager register Adapters pa Factory I Workspace Root class manager register Adapters pa Factory I Project class manager register Adapters pa Factory I Folder class manager register Adapters pa Factory I File class manager register Adapters pa Factory I Marker class  WorkbenchAdapterBuilder registerAdapters IAdapterManager getAdapterManager IAdapterFactory WorkbenchAdapterFactory registerAdapters IWorkspace registerAdapters IWorkspaceRoot registerAdapters IProject registerAdapters IFolder registerAdapters IFile registerAdapters IMarker IAdapterFactory paFactory StandardPropertiesAdapterFactory registerAdapters paFactory IWorkspace registerAdapters paFactory IWorkspaceRoot registerAdapters paFactory IProject registerAdapters paFactory IFolder registerAdapters paFactory IFile registerAdapters paFactory IMarker

private Object workspace Factory new Workspace Factory Returns the I Action Filter for an object protected Object get Action Filter Object o if o instanceof I Resource switch I Resource o get Type case I Resource FILE return file Adapter case I Resource FOLDER return folder Adapter case I Resource PROJECT return project Adapter if o instanceof I Marker return marker Adapter return null  workspaceFactory WorkspaceFactory IActionFilter getActionFilter IResource IResource getType IResource fileAdapter IResource folderAdapter IResource projectAdapter IMarker markerAdapter
Returns an object which is an instance of the given class associated with the given object Returns code null code if no such object can be found param adaptable Object the adaptable object being queried usually an instance of code I Adaptable code param adapter Type the type of adapter to look up return a object castable to the given adapter type or code null code if this adapter provider does not have an adapter of the given type for the given object public Object get Adapter Object o Class adapter Type if adapter Type is Instance o return o if adapter Type I Workbench Adapter class return get Workbench Element o if adapter Type I Persistable Element class return get Persistable Element o if adapter Type I Element Factory class return get Element Factory o if adapter Type I Action Filter class return get Action Filter o return null  adaptableObject IAdaptable adapterType getAdapter adapterType adapterType isInstance adapterType IWorkbenchAdapter getWorkbenchElement adapterType IPersistableElement getPersistableElement adapterType IElementFactory getElementFactory adapterType IActionFilter getActionFilter
Returns the collection of adapater types handled by this provider p This method is generally used by an adapter manager to discover which adapter types are supported in adavance of dispatching any actual code get Adapter code requests p return the collection of adapter types public Class get Adapter List return new Class I Workbench Adapter class I Element Factory class I Persistable Element class I Action Filter class  getAdapter getAdapterList IWorkbenchAdapter IElementFactory IPersistableElement IActionFilter
Returns an object which is an instance of I Element Factory associated with the given object Returns code null code if no such object can be found protected Object get Element Factory Object o if o instanceof I Resource return resource Factory if o instanceof I Workspace return workspace Factory return null  IElementFactory getElementFactory IResource resourceFactory IWorkspace workspaceFactory
Returns an object which is an instance of I Persistable Element associated with the given object Returns code null code if no such object can be found protected Object get Persistable Element Object o if o instanceof I Resource return new Resource Factory I Resource o if o instanceof I Workspace return workspace Factory return null  IPersistableElement getPersistableElement IResource ResourceFactory IResource IWorkspace workspaceFactory
Returns an object which is an instance of I Workbench Adapter associated with the given object Returns code null code if no such object can be found protected Object get Workbench Element Object o if o instanceof I Resource switch I Resource o get Type case I Resource FILE return file Adapter case I Resource FOLDER return folder Adapter case I Resource PROJECT return project Adapter if o instanceof I Workspace Root return root Adapter if o instanceof I Workspace return workspace Adapter if o instanceof I Marker return marker Adapter return null  IWorkbenchAdapter getWorkbenchElement IResource IResource getType IResource fileAdapter IResource folderAdapter IResource projectAdapter IWorkspaceRoot rootAdapter IWorkspace workspaceAdapter IMarker markerAdapter

public class Workbench File extends Workbench Resource Answer the appropriate base image to use for the passed resource optionally considering the passed open status as well iff appropriate for the type of passed resource protected Image Descriptor get Base Image I Resource resource issue move IDE specific images Image Descriptor image PlatformUI get Workbench get Editor Registry get Image Descriptor resource get Name if image null image PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG OBJ FILE return image  WorkbenchFile WorkbenchResource ImageDescriptor getBaseImage IResource ImageDescriptor getWorkbench getEditorRegistry getImageDescriptor getName getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_OBJ_FILE

public class Workbench Folder extends Workbench Resource Answer the appropriate base image to use for the passed resource optionally considering the passed open status as well iff appropriate for the type of passed resource protected Image Descriptor get Base Image I Resource resource return PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG OBJ FOLDER  WorkbenchFolder WorkbenchResource ImageDescriptor getBaseImage IResource getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_OBJ_FOLDER
Returns the children of this container public Object get Children Object o try return I Container o members catch Core Exception e return NO CHILDREN  getChildren IContainer CoreException NO_CHILDREN

public Image Descriptor get Image Descriptor Object o if o instanceof I Marker return null return IDE Workbench Plugin get Default get Marker Image Provider Registry get Image Descriptor I Marker o  ImageDescriptor getImageDescriptor IMarker IDEWorkbenchPlugin getDefault getMarkerImageProviderRegistry getImageDescriptor IMarker
see org eclipse ui model I Workbench Adapter get Label java lang Object public String get Label Object o I Marker marker I Marker o return marker get Attribute I Marker MESSAGE NON NLS 1  IWorkbenchAdapter getLabel getLabel IMarker IMarker getAttribute IMarker
see org eclipse ui model I Workbench Adapter get Parent java lang Object public Object get Parent Object o return I Marker o get Resource  IWorkbenchAdapter getParent getParent IMarker getResource
Returns whether the specific attribute matches the state of the target object param target the target object param name the attribute name param value the attriute value return code true code if the attribute matches code false code otherwise public boolean test Attribute Object target String name String value I Marker marker I Marker target if name equals TYPE try return value equals marker get Type catch Core Exception e return false else if name equals SUPER TYPE try return marker is Subtype Of value catch Core Exception e return false else if name equals PRIORITY return test Integer Attribute marker I Marker PRIORITY value else if name equals SEVERITY return test Integer Attribute marker I Marker SEVERITY value else if name equals MESSAGE try String msg String marker get Attribute I Marker MESSAGE if msg null return false return Simple Wildcard Tester test Wildcard Ignore Case value msg catch Core Exception e return false else if name equals DONE try value value to Lower Case Boolean done Boolean marker get Attribute I Marker DONE if done null return false return done boolean Value value equals true NON NLS 1 catch Core Exception e return false else if name equals RESOURCE TYPE int desired Type 0 try desired Type Integer parse Int value catch Number Format Exception e Number Format if desired Type I Resource FILE desired Type I Resource FOLDER desired Type I Resource PROJECT desired Type I Resource ROOT return false return marker get Resource get Type desired Type 0 return false  testAttribute IMarker IMarker getType CoreException SUPER_TYPE isSubtypeOf CoreException testIntegerAttribute IMarker testIntegerAttribute IMarker getAttribute IMarker SimpleWildcardTester testWildcardIgnoreCase CoreException toLowerCase getAttribute IMarker booleanValue CoreException RESOURCE_TYPE desiredType desiredType parseInt NumberFormatException eNumberFormat desiredType IResource desiredType IResource desiredType IResource desiredType IResource getResource getType desiredType
Returns whether the specific integer attribute matches a value private boolean test Integer Attribute I Marker marker String attr Name String value Integer i1 i2 try i1 Integer marker get Attribute attr Name if i1 null return false catch Core Exception e return false try i2 Integer value Of value catch Number Format Exception e return false return i1 equals i2  testIntegerAttribute IMarker attrName getAttribute attrName CoreException valueOf NumberFormatException

Hash Map image Cache new Hash Map 11 Answer the appropriate base image to use for the passed resource optionally considering the passed open status as well iff appropriate for the type of passed resource protected Image Descriptor get Base Image I Resource resource I Project project I Project resource boolean is Open project is Open String base Key is Open IDE Shared Images IMG OBJ PROJECT IDE Shared Images IMG OBJ PROJECT CLOSED if is Open try String nature Ids project get Description get Nature Ids for int i 0 i nature Ids length i Have to use a cache because Overlay Icon does not define its own equality criteria so Workbench Label Provider would always create a new image otherwise String image Key nature Ids i Image Descriptor overlay Image Image Descriptor image Cache get image Key if overlay Image null return overlay Image Image Descriptor nature Image IDE Workbench Plugin get Default get Project Image Registry get Nature Image nature Ids i if nature Image null Image Descriptor base Image IDE Internal Workbench Images get Image Descriptor base Key overlay Image new Overlay Icon base Image new Image Descriptor nature Image new Point 16 16 image Cache put image Key overlay Image return overlay Image catch Core Exception e return IDE Internal Workbench Images get Image Descriptor base Key  HashMap imageCache HashMap ImageDescriptor getBaseImage IResource IProject IProject isOpen isOpen baseKey isOpen SharedImages IMG_OBJ_PROJECT SharedImages IMG_OBJ_PROJECT_CLOSED isOpen natureIds getDescription getNatureIds natureIds OverlayIcon WorkbenchLabelProvider imageKey natureIds ImageDescriptor overlayImage ImageDescriptor imageCache imageKey overlayImage overlayImage ImageDescriptor natureImage IDEWorkbenchPlugin getDefault getProjectImageRegistry getNatureImage natureIds natureImage ImageDescriptor baseImage IDEInternalWorkbenchImages getImageDescriptor baseKey overlayImage OverlayIcon baseImage ImageDescriptor natureImage imageCache imageKey overlayImage overlayImage CoreException IDEInternalWorkbenchImages getImageDescriptor baseKey
Returns the children of this container public Object get Children Object o I Project project I Project o if project is Open try return project members catch Core Exception e don t get the children if there are problems with the project return NO CHILDREN  getChildren IProject IProject isOpen CoreException NO_CHILDREN
Returns whether the specific attribute matches the state of the target object param target the target object param name the attribute name param value the attriute value return code true code if the attribute matches code false code otherwise public boolean test Attribute Object target String name String value I Project proj I Project target if name equals NATURE try return proj is Accessible proj has Nature value catch Core Exception e return false else if name equals OPEN value value to Lower Case return proj is Open value equals true NON NLS 1 return super test Attribute target name value  testAttribute IProject IProject isAccessible hasNature CoreException toLowerCase isOpen testAttribute

public static final String XML LAST MOD xml Last Mod NON NLS 1 Answer the appropriate base image to use for the resource protected abstract Image Descriptor get Base Image I Resource resource  XML_LAST_MOD xmlLastMod ImageDescriptor getBaseImage IResource
protected abstract Image Descriptor get Base Image I Resource resource Returns an image descriptor for this object public Image Descriptor get Image Descriptor Object o I Resource resource get Resource o return resource null null get Base Image resource  ImageDescriptor getBaseImage IResource ImageDescriptor getImageDescriptor IResource getResource getBaseImage
get Label method comment public String get Label Object o I Resource resource get Resource o return resource null null resource get Name  getLabel getLabel IResource getResource getName
Returns the parent of the given object Returns null if the parent is not available public Object get Parent Object o I Resource resource get Resource o return resource null null resource get Parent  getParent IResource getResource getParent
Returns the resource corresponding to this object or null if there is none protected I Resource get Resource Object o if o instanceof I Resource return I Resource o if o instanceof I Adaptable return I Resource I Adaptable o get Adapter I Resource class return null  IResource getResource IResource IResource IAdaptable IResource IAdaptable getAdapter IResource
Returns whether the specific attribute matches the state of the target object param target the target object param name the attribute name param value the attribute value return code true code if the attribute matches code false code otherwise public boolean test Attribute Object target String name String value if target instanceof I Resource return false I Resource res I Resource target if name equals NAME return Simple Wildcard Tester test Wildcard Ignore Case value res get Name else if name equals PATH return Simple Wildcard Tester test Wildcard Ignore Case value res get Full Path to String else if name equals EXTENSION return Simple Wildcard Tester test Wildcard Ignore Case value res get File Extension else if name equals READ ONLY return res is Read Only value equals Ignore Case true NON NLS 1 else if name equals PROJECT NATURE try I Project proj res get Project return proj is Accessible proj has Nature value catch Core Exception e return false else if name equals PERSISTENT PROPERTY return test Property res true false value else if name equals PROJECT PERSISTENT PROPERTY return test Property res true true value else if name equals SESSION PROPERTY return test Property res false false value else if name equals PROJECT SESSION PROPERTY return test Property res false true value else if name equals XML FIRST TAG return testXML Property res name value else if name equals XML DTD NAME return testXML Property res name value else if name equals CONTENT TYPE ID return test Content Type Property res value return false  testAttribute IResource IResource IResource SimpleWildcardTester testWildcardIgnoreCase getName SimpleWildcardTester testWildcardIgnoreCase getFullPath toString SimpleWildcardTester testWildcardIgnoreCase getFileExtension READ_ONLY isReadOnly equalsIgnoreCase PROJECT_NATURE IProject getProject isAccessible hasNature CoreException PERSISTENT_PROPERTY testProperty PROJECT_PERSISTENT_PROPERTY testProperty SESSION_PROPERTY testProperty PROJECT_SESSION_PROPERTY testProperty XML_FIRST_TAG testXMLProperty XML_DTD_NAME testXMLProperty CONTENT_TYPE_ID testContentTypeProperty
Tests whether the content type for code resource code matches the code content Type Id code It is possible that this method call could cause the resource to be read It is also possible through poor plug in design for this method to load plug ins param resource The resource for which the content type should be determined must not be code null code param content Type Id The expected content type must not be code null code return code true code iff the best matching content type has an identifier that matches code content Type Id code code false code otherwise private final boolean test Content Type Property final I Resource resource final String content Type Id final String expected Value content Type Id trim if resource instanceof I File return false final I File file I File resource String actual Value null try final I Content Description content Description file get Content Description if content Description null final I Content Type content Type content Description get Content Type actual Value content Type get Id catch final Core Exception e Log the error final String message Core exception while retrieving the content description NON NLS 1 IDE Workbench Plugin log message new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH I Status ERROR message e return expected Value null expected Value equals actual Value  contentTypeId contentTypeId contentTypeId testContentTypeProperty IResource contentTypeId expectedValue contentTypeId IFile IFile IFile actualValue IContentDescription contentDescription getContentDescription contentDescription IContentType contentType contentDescription getContentType actualValue contentType getId CoreException IDEWorkbenchPlugin IStatus IDEWorkbenchPlugin IDE_WORKBENCH IStatus expectedValue expectedValue actualValue
Tests whether a session or persistent property on the resource or its project matches the given value param resource the resource to check param persistent Flag code true code for a persistent property code false code for a session property param project Flag code true code to check the resource s project code false code to check the resource itself param value the attribute value which has either the form property Name or property Name property Value return whether there is a match private boolean test Property I Resource resource boolean persistent Flag boolean project Flag String value String property Name String expected Val int i value index Of if i 1 property Name value substring 0 i trim expected Val value substring i 1 trim else property Name value trim expected Val null try Qualified Name key int dot property Name last Index Of if dot 1 key new Qualified Name property Name substring 0 dot property Name substring dot 1 else key new Qualified Name null property Name I Resource res To Check project Flag resource get Project resource get Project on workspace root can be null if res To Check null return false if persistent Flag String actual Val res To Check get Persistent Property key if actual Val null return false return expected Val null expected Val equals actual Val else Object actual Val res To Check get Session Property key if actual Val null return false return expected Val null expected Val equals actual Val to String catch Core Exception e ignore return false  persistentFlag projectFlag propertyName propertyName propertyValue testProperty IResource persistentFlag projectFlag propertyName expectedVal indexOf propertyName expectedVal propertyName expectedVal QualifiedName propertyName lastIndexOf QualifiedName propertyName propertyName QualifiedName propertyName IResource resToCheck projectFlag getProject getProject resToCheck persistentFlag actualVal resToCheck getPersistentProperty actualVal expectedVal expectedVal actualVal actualVal resToCheck getSessionProperty actualVal expectedVal expectedVal actualVal toString CoreException
Test whether a given xml property matches that xml element in the file Note that these properties will be stored as persistent properties If the underlying xml file changes the xml will be reparsed to re retrieve these property values param resource the resource associated with the xml file param property Name the name of the property we are looking for param value the value we expect to find return true if the value found for this property matches the value passed in as a parameter deprecated This method will be removed in future builds It has been replaced with test Content Type Property private boolean testXML Property I Resource resource String property Name String value String expected Val value trim try Qualified Name key new Qualified Name IDE Workbench Plugin IDE WORKBENCH property Name I Resource res To Check resource if res To Check null return false Check to see if the persistent properties are stale long mod Time res To Check get Modification Stamp Qualified Name mod Key new Qualified Name IDE Workbench Plugin IDE WORKBENCH XML LAST MOD String last Prop Mod res To Check get Persistent Property mod Key long real Last Prop Mod 0L if last Prop Mod null try real Last Prop Mod new Long last Prop Mod long Value catch Number Format Exception nfe log it but continue working IDE Workbench Plugin log Problem converting last mod to long in testXML Property new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH I Status ERROR Problem converting last mod to long in testXML Property nfe NON NLS 1 NON NLS 2 String actual Val null if mod Time I Resource NULL STAMP real Last Prop Mod mod Time Make sure we don t pick up stale information actual Val res To Check get Persistent Property key else if real Last Prop Mod 0l Make sure that these persistent properties are cleared so that we don t pick up any stale values by mistake If we ve never parsed this file however we don t need to worry about stale values Qualified Name qname1 new Qualified Name IDE Workbench Plugin IDE WORKBENCH I Resource Action Filter XML DTD NAME Qualified Name qname2 new Qualified Name IDE Workbench Plugin IDE WORKBENCH I Resource Action Filter XML FIRST TAG try res To Check set Persistent Property qname1 null res To Check set Persistent Property qname2 null catch Core Exception c IDE Workbench Plugin log Problem clearing stale xml properties c get Status NON NLS 1 Either we have never parsed this file or we have parsed it but the file has changed since the last time it was parsed if actual Val null try new Property Parser parse Resource res To Check catch Exception e IDE Workbench Plugin log Problem parsing for xml properties new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH I Status ERROR Problem parsing for xml properties e NON NLS 1 NON NLS 2 Now recheck the persistent property as it may have been populated actual Val res To Check get Persistent Property key if actual Val null return false return expected Val null expected Val equals actual Val catch Core Exception e Just output a message to the log file and continue IDE Workbench Plugin log Problem testing xml property e get Status NON NLS 1 return false  propertyName testContentTypeProperty testXMLProperty IResource propertyName expectedVal QualifiedName QualifiedName IDEWorkbenchPlugin IDE_WORKBENCH propertyName IResource resToCheck resToCheck modTime resToCheck getModificationStamp QualifiedName modKey QualifiedName IDEWorkbenchPlugin IDE_WORKBENCH XML_LAST_MOD lastPropMod resToCheck getPersistentProperty modKey realLastPropMod lastPropMod realLastPropMod lastPropMod longValue NumberFormatException IDEWorkbenchPlugin testXMLProperty IStatus IDEWorkbenchPlugin IDE_WORKBENCH IStatus testXMLProperty actualVal modTime IResource NULL_STAMP realLastPropMod modTime actualVal resToCheck getPersistentProperty realLastPropMod QualifiedName QualifiedName IDEWorkbenchPlugin IDE_WORKBENCH IResourceActionFilter XML_DTD_NAME QualifiedName QualifiedName IDEWorkbenchPlugin IDE_WORKBENCH IResourceActionFilter XML_FIRST_TAG resToCheck setPersistentProperty resToCheck setPersistentProperty CoreException IDEWorkbenchPlugin getStatus actualVal PropertyParser parseResource resToCheck IDEWorkbenchPlugin IStatus IDEWorkbenchPlugin IDE_WORKBENCH IStatus actualVal resToCheck getPersistentProperty actualVal expectedVal expectedVal actualVal CoreException IDEWorkbenchPlugin getStatus

public class Workbench Root Resource extends Workbench Adapter see org eclipse ui model I Workbench Adapter get Children Object Returns the children of the root resource public Object get Children Object o I Workspace Root root I Workspace Root o return root get Projects  WorkbenchRootResource WorkbenchAdapter IWorkbenchAdapter getChildren getChildren IWorkspaceRoot IWorkspaceRoot getProjects
see org eclipse ui model I Workbench Adapter get Image Descriptor Object public Image Descriptor get Image Descriptor Object object return null  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor
Returns the name of this element This will typically be used to assign a label to this object when displayed in the UI public String get Label Object o root resource has no name return IDE Workbench Messages get String Workspace NON NLS 1  getLabel IDEWorkbenchMessages getString

private I Status status private Object children public Workbench Status I Status status this status status  IStatus WorkbenchStatus IStatus
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter
Returns the children of this element public Object get Children Object o if children null I Status child Statii status get Children children new Object child Statii length for int i 0 i child Statii length i children i new Workbench Status child Statii i return children  getChildren IStatus childStatii getChildren childStatii childStatii WorkbenchStatus childStatii
see I Workbench Adapter get Label public String get Label Object o return status get Message  IWorkbenchAdapter getLabel getLabel getMessage
Returns the wrapped status object public I Status get Status return status  IStatus getStatus

public class Workbench Status List extends Workbench Adapter implements I Adaptable private Array List statii new Array List 10 public void add I Status status statii add new Workbench Status status  WorkbenchStatusList WorkbenchAdapter IAdaptable ArrayList ArrayList IStatus WorkbenchStatus
statii add new Workbench Status status public void clear statii clear  WorkbenchStatus
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter
Returns the children of this element public Object get Children Object o return statii to Array  getChildren toArray
return statii to Array public void remove Workbench Status status statii remove status  toArray WorkbenchStatus

see org eclipse ui model I Workbench Adapter get Children java lang Object public Object get Children Object o I Workspace workspace I Workspace o return workspace get Root get Projects  IWorkbenchAdapter getChildren getChildren IWorkspace IWorkspace getRoot getProjects
see org eclipse ui model I Workbench Adapter get Image Descriptor java lang Object public Image Descriptor get Image Descriptor Object object return null  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor
get Label method comment public String get Label Object o workspaces don t have a name return IDE Workbench Messages get String Workspace NON NLS 1  getLabel getLabel IDEWorkbenchMessages getString

private static final String FACTORY ID org eclipse ui internal model Workspace Factory NON NLS 1 Create a Resource Factory This constructor is typically used for our I Element Factory side public Workspace Factory  FACTORY_ID WorkspaceFactory ResourceFactory IElementFactory WorkspaceFactory
see I Element Factory public I Adaptable create Element I Memento memento return Resources Plugin get Workspace  IElementFactory IAdaptable createElement IMemento ResourcesPlugin getWorkspace
see I Persistable Element public String get Factory Id return FACTORY ID  IPersistableElement getFactoryId FACTORY_ID
see I Persistable Element public void save State I Memento memento  IPersistableElement saveState IMemento

private Menu Manager drop Down Menu Mgr Create a new instance of this class public New Wizard Drop Down Action I Workbench Window window I Action new Wizard Action super IDE Workbench Messages get String New Wizard Drop Down text NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window this new Wizard Action new Wizard Action set Tool Tip Text new Wizard Action get Tool Tip Text issues should be IDE specific images I Shared Images shared Images PlatformUI get Workbench get Shared Images set Image Descriptor shared Images get Image Descriptor I Shared Images IMG TOOL NEW WIZARD set Disabled Image Descriptor shared Images get Image Descriptor I Shared Images IMG TOOL NEW WIZARD DISABLED set Menu Creator this  MenuManager dropDownMenuMgr NewWizardDropDownAction IWorkbenchWindow IAction newWizardAction IDEWorkbenchMessages getString NewWizardDropDown IllegalArgumentException workbenchWindow newWizardAction newWizardAction setToolTipText newWizardAction getToolTipText ISharedImages sharedImages getWorkbench getSharedImages setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_NEW_WIZARD setDisabledImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_NEW_WIZARD_DISABLED setMenuCreator
create the menu manager for the drop down menu protected void create Drop Down Menu Mgr if drop Down Menu Mgr null drop Down Menu Mgr new Menu Manager drop Down Menu Mgr add new New Wizard Menu workbench Window  createDropDownMenuMgr dropDownMenuMgr dropDownMenuMgr MenuManager dropDownMenuMgr NewWizardMenu workbenchWindow
dispose method comment public void dispose if workbench Window null action has already been disposed return if drop Down Menu Mgr null drop Down Menu Mgr dispose drop Down Menu Mgr null workbench Window null  workbenchWindow dropDownMenuMgr dropDownMenuMgr dropDownMenuMgr workbenchWindow
get Menu method comment public Menu get Menu Control parent create Drop Down Menu Mgr return drop Down Menu Mgr create Context Menu parent  getMenu getMenu createDropDownMenuMgr dropDownMenuMgr createContextMenu
Create the drop down menu as a submenu of parent Necessary for Cool Bar support public Menu get Menu Menu parent create Drop Down Menu Mgr Menu menu new Menu parent I Contribution Item items drop Down Menu Mgr get Items for int i 0 i items length i I Contribution Item item items i I Contribution Item new Item item if item instanceof Action Contribution Item new Item new Action Contribution Item Action Contribution Item item get Action new Item fill menu 1 return menu  CoolBar getMenu createDropDownMenuMgr IContributionItem dropDownMenuMgr getItems IContributionItem IContributionItem newItem ActionContributionItem newItem ActionContributionItem ActionContributionItem getAction newItem
see org eclipse ui I Workbench Window Action Delegate init I Workbench Window public void init I Workbench Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow
public void run if workbench Window null action has been disposed return new Wizard Action run  workbenchWindow newWizardAction
see org eclipse ui I Action Delegate run I Action public void run I Action action  IActionDelegate IAction IAction
see org eclipse ui I Action Delegate selection Changed I Action I Selection public void selection Changed I Action action I Selection selection  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection

private I Workbench Window window Create an instance of this class Use this constructor if you do not wish to pre specify the selection that should be provided to launched shortcut wizards param element Workbench Wizard Element public New Wizard Shortcut Action I Workbench Window window Workbench Wizard Element element super element get Label element set Tool Tip Text element get Description set Image Descriptor element get Image Descriptor set Id Action Factory NEW get Id wizard Element element this window window  IWorkbenchWindow WorkbenchWizardElement NewWizardShortcutAction IWorkbenchWindow WorkbenchWizardElement getLabel setToolTipText getDescription setImageDescriptor getImageDescriptor setId ActionFactory getId wizardElement
This action has been invoked by the user public void run create instance of target wizard I New Wizard wizard try wizard I New Wizard wizard Element create Executable Extension catch Core Exception e Error Dialog open Error window get Shell IDE Workbench Messages get String New Wizard Shortcut Action error Title NON NLS 1 IDE Workbench Messages get String New Wizard Shortcut Action error Message NON NLS 1 e get Status return I Selection selection window get Selection Service get Selection I Structured Selection selection To Pass Structured Selection EMPTY if selection instanceof I Structured Selection selection To Pass wizard Element adapted Selection I Structured Selection selection else Build the selection from the I File of the editor I Workbench Part part window get Part Service get Active Part if part instanceof I Editor Part I Editor Input input I Editor Part part get Editor Input if input instanceof I File Editor Input selection To Pass new Structured Selection I File Editor Input input get File wizard init window get Workbench selection To Pass Shell parent window get Shell Wizard Dialog dialog new Wizard Dialog parent wizard dialog create Workbench Help set Help dialog get Shell I Help Context Ids NEW WIZARD SHORTCUT dialog open  INewWizard INewWizard wizardElement createExecutableExtension CoreException ErrorDialog openError getShell IDEWorkbenchMessages getString NewWizardShortcutAction errorTitle IDEWorkbenchMessages getString NewWizardShortcutAction errorMessage getStatus ISelection getSelectionService getSelection IStructuredSelection selectionToPass StructuredSelection IStructuredSelection selectionToPass wizardElement adaptedSelection IStructuredSelection IFile IWorkbenchPart getPartService getActivePart IEditorPart IEditorInput IEditorPart getEditorInput IFileEditorInput selectionToPass StructuredSelection IFileEditorInput getFile getWorkbench selectionToPass getShell WizardDialog WizardDialog WorkbenchHelp setHelp getShell IHelpContextIds NEW_WIZARD_SHORTCUT
see org eclipse ui I Plugin Contribution get Local Id public String get Local Id return wizard Element get Local Id  IPluginContribution getLocalId getLocalId wizardElement getLocalId
see org eclipse ui I Plugin Contribution get Plugin Id public String get Plugin Id return wizard Element get Plugin Id  IPluginContribution getPluginId getPluginId wizardElement getPluginId

private static boolean get Debug Option String option return true equals Ignore Case Platform get Debug Option IDE Workbench Plugin IDE WORKBENCH option NON NLS 1  getDebugOption equalsIgnoreCase getDebugOption IDEWorkbenchPlugin IDE_WORKBENCH

public class Problem Image Provider implements I Marker Image Provider Task Image Provider constructor comment public Problem Image Provider super  ProblemImageProvider IMarkerImageProvider TaskImageProvider ProblemImageProvider
Returns the relative path for the image to be used for displaying an marker in the workbench This path is relative to the plugin location Returns code null code if there is no appropriate image param marker The marker to get an image path for see org eclipse jface resource File Image Descriptor public String get Image Path I Marker marker String icon Path icons full NON NLS 1 if is Marker Type marker I Marker PROBLEM switch marker get Attribute I Marker SEVERITY I Marker SEVERITY WARNING case I Marker SEVERITY ERROR return icon Path obj16 error tsk gif NON NLS 1 case I Marker SEVERITY WARNING return icon Path obj16 warn tsk gif NON NLS 1 case I Marker SEVERITY INFO return icon Path obj16 info tsk gif NON NLS 1 return null  FileImageDescriptor getImagePath IMarker iconPath isMarkerType IMarker getAttribute IMarker IMarker SEVERITY_WARNING IMarker SEVERITY_ERROR iconPath error_tsk IMarker SEVERITY_WARNING iconPath warn_tsk IMarker SEVERITY_INFO iconPath info_tsk
Returns whether the given marker is of the given type either directly or indirectly private boolean is Marker Type I Marker marker String type try return marker is Subtype Of type catch Core Exception e return false  isMarkerType IMarker isSubtypeOf CoreException

Creates an instance of code Capability code using the information provided by the configuration element param config Element the code I Configuration Element code containing the attributes param reader the code Capability Registry Reader code used to log missing attributes throws a code Workbench Exception code if the ID nature or wizard is code null code public Capability I Configuration Element config Element Capability Registry Reader reader throws Workbench Exception super boolean missing Attribute false String attr id config Element get Attribute ATT ID String attr nature config Element get Attribute ATT NATURE ID if attr id null reader log Missing Attribute config Element ATT ID missing Attribute true if attr nature null reader log Missing Attribute config Element ATT NATURE ID missing Attribute true if config Element get Attribute ATT INSTALL WIZARD null reader log Missing Attribute config Element ATT INSTALL WIZARD missing Attribute true if missing Attribute throw new Workbench Exception Capability missing required attributes NON NLS 1 id attr id nature Id attr nature element config Element nature Descriptor Resources Plugin get Workspace get Nature Descriptor nature Id  configElement IConfigurationElement CapabilityRegistryReader WorkbenchException IConfigurationElement configElement CapabilityRegistryReader WorkbenchException missingAttribute attr_id configElement getAttribute ATT_ID attr_nature configElement getAttribute ATT_NATURE_ID attr_id logMissingAttribute configElement ATT_ID missingAttribute attr_nature logMissingAttribute configElement ATT_NATURE_ID missingAttribute configElement getAttribute ATT_INSTALL_WIZARD logMissingAttribute configElement ATT_INSTALL_WIZARD missingAttribute missingAttribute WorkbenchException attr_id natureId attr_nature configElement natureDescriptor ResourcesPlugin getWorkspace getNatureDescriptor natureId
Creates an instance of code Capability code as an unknown one for a given nature id param nature Id the nature id for the unknown capbility public Capability String nature Id super this id nature Id this nature Id nature Id  natureId natureId natureId natureId natureId
Adds the id of a capability for which this capability handles the user interface public void add HandleUI String capability Id if handleU Is null handleU Is new Array List 4 handleU Is add capability Id  addHandleUI capabilityId handleUIs handleUIs ArrayList handleUIs capabilityId
Adds the id of a perspective for which this capability wants to present as a choice in the user interface public void add Perspective Choice String persp Id if perspective Choices null perspective Choices new Array List 4 perspective Choices add persp Id  addPerspectiveChoice perspId perspectiveChoices perspectiveChoices ArrayList perspectiveChoices perspId
public String get Id return id  getId
Method declared on I Workbench Adapter public Image Descriptor get Image Descriptor Object object return get Icon Descriptor  IWorkbenchAdapter ImageDescriptor getImageDescriptor getIconDescriptor
Method declared on I Workbench Adapter public String get Label Object o return get Name  IWorkbenchAdapter getLabel getName
public String get Name if is Valid return nature Descriptor get Label else return IDE Workbench Messages format Capability name Missing new Object id NON NLS 1  getName isValid natureDescriptor getLabel IDEWorkbenchMessages nameMissing
public Image Descriptor get Icon Descriptor if icon null is Valid I Extension extension element get Declaring Extension String extending Plugin Id extension get Declaring Plugin Descriptor get Unique Identifier String location element get Attribute ATT ICON if location null location length 0 icon AbstractUI Plugin image Descriptor From Plugin extending Plugin Id location return icon  ImageDescriptor getIconDescriptor isValid IExtension getDeclaringExtension extendingPluginId getDeclaringPluginDescriptor getUniqueIdentifier getAttribute ATT_ICON AbstractUIPlugin imageDescriptorFromPlugin extendingPluginId
Returns the nature descriptor or code null code if none exist public I Project Nature Descriptor get Nature Descriptor return nature Descriptor  IProjectNatureDescriptor getNatureDescriptor natureDescriptor
public String get Nature Id return nature Id  getNatureId natureId
public Object get Adapter Class adapter if adapter I Workbench Adapter class return this else return null  getAdapter IWorkbenchAdapter
public String get Category Path if element null return NON NLS 1 else return element get Attribute ATT CATEGORY  getCategoryPath getAttribute ATT_CATEGORY
Returns a new instance of the capability install wizard Caller is responsible for calling the init method If the wizard cannot be created code null code is returned return the non initialized capability wizard or code null code if the wizard cannot be created public I Capability Install Wizard get Install Wizard if is Valid return null try return I Capability Install Wizard element create Executable Extension ATT INSTALL WIZARD catch Core Exception e IDE Workbench Plugin log Could not create capability install wizard e get Status NON NLS 1 return null  ICapabilityInstallWizard getInstallWizard isValid ICapabilityInstallWizard createExecutableExtension ATT_INSTALL_WIZARD CoreException IDEWorkbenchPlugin getStatus
Returns the description for the install wizard or code null code if none supplied public String get Install Details if is Valid return null return element get Attribute ATT INSTALL DETAILS  getInstallDetails isValid getAttribute ATT_INSTALL_DETAILS
Returns a new instance of the capability uninstall wizard Caller is responsible for calling the init method If the wizard cannot be created code null code is returned return the non initialized capability wizard or code null code if the wizard cannot be created public I Capability Uninstall Wizard get Uninstall Wizard if is Valid return null try return I Capability Uninstall Wizard element create Executable Extension ATT UNINSTALL WIZARD catch Core Exception e IDE Workbench Plugin log Could not create capability uninstall wizard e get Status NON NLS 1 return null  ICapabilityUninstallWizard getUninstallWizard isValid ICapabilityUninstallWizard createExecutableExtension ATT_UNINSTALL_WIZARD CoreException IDEWorkbenchPlugin getStatus
Returns the description for the uninstall wizard or code null code if none supplied public String get Uninstall Details if is Valid return null return element get Attribute ATT UNINSTALL DETAILS  getUninstallDetails isValid getAttribute ATT_UNINSTALL_DETAILS
public String get Description if is Valid return NON NLS 1 String description element get Attribute ATT DESCRIPTION if description null description NON NLS 1 return description  getDescription isValid getAttribute ATT_DESCRIPTION
Returns a list of ids of other capabilities for which this capability handles the user interface or code null code if not applicable public Array List get HandleU Is return handleU Is  ArrayList getHandleUIs handleUIs
Returns a list of ids of perspectives for which this capability wants to present as choices or code null code if not applicable public Array List get Perspective Choices return perspective Choices  ArrayList getPerspectiveChoices perspectiveChoices
Returns whether this capability is valid public boolean is Valid return nature Descriptor null  isValid natureDescriptor

Creates a new instance of code Capability Registry code public Capability Registry capabilities new Array List 30 categories new Array List 15  CapabilityRegistry CapabilityRegistry ArrayList ArrayList
Adds the given capability to the registry Called by the Capability Registry Reader package boolean add Capability Capability capability return capabilities add capability  CapabilityRegistryReader addCapability
Adds the given capability category to the registry Called by the Capability Registry Reader package boolean add Category Category category return categories add category  CapabilityRegistryReader addCategory
Finds the capability for the given identifier or code null code if none public Capability find Capability String id Iterator enum capabilities iterator while enum has Next Capability cap Capability enum next if id equals cap get Id return cap return null  findCapability hasNext getId
Finds the category for the given identifier or code null code if none public Category find Category String id Iterator enum categories iterator while enum has Next Category cat Category enum next if id equals cat get Root Path return cat return null  findCategory hasNext getRootPath
Finds the capability for each specified identifier Any code null code entries in the resulting array are for identifiers to which no capability exist public Capability find Capabilities String ids int count capabilities size Capability results new Capability ids length for int i 0 i ids length i String id ids i for int j 0 j count j Capability cap Capability capabilities get j if cap get Id equals id results i cap break return results  findCapabilities getId
Finds the category for each specified identifier Any code null code entries in the resulting array are for identifiers to which no category exist return an array of code I Category code public Category find Categories String ids int count categories size Category results new Category ids length for int i 0 i ids length i String id ids i for int j 0 j count j Category cat Category categories get j if cat get Id equals id results i cat break return results  ICategory findCategories getId
public Object get Adapter Class adapter if adapter I Workbench Adapter class return this else return null  getAdapter IWorkbenchAdapter
Returns the list of categories in the registry which contain at least one capability Does not include the misc and unknown categories public Array List get Used Categories Array List results new Array List categories size Iterator enum categories iterator while enum has Next Category cat Category enum next if cat has Elements results add cat return results  ArrayList getUsedCategories ArrayList ArrayList hasNext hasElements
Returns the capability for the nature id public Capability get Capability For Nature String nature Id return Capability nature To Capability get nature Id  getCapabilityForNature natureId natureToCapability natureId
Returns the list of capabilities in the registry public Array List get Capabilities return capabilities  ArrayList getCapabilities
Method declared on I Workbench Adapter public Object get Children Object o return capabilities to Array  IWorkbenchAdapter getChildren toArray
Returns the membership set ids that the specified capability belongs to public String get Membership Set Ids Capability capability I Project Nature Descriptor desc capability get Nature Descriptor if desc null return EMPTY ID LIST return desc get Nature Set Ids  getMembershipSetIds IProjectNatureDescriptor getNatureDescriptor EMPTY_ID_LIST getNatureSetIds
Returns the miscellaneous category or code null code if none public Category get Misc Category return misc Category  getMiscCategory miscCategory
Returns the capability ids that are prerequisites of the specified capability public String get Prerequisite Ids Capability capability I Project Nature Descriptor desc capability get Nature Descriptor if desc null return EMPTY ID LIST String nature Ids desc get Required Nature Ids if nature Ids length 0 return EMPTY ID LIST Array List results new Array List nature Ids length for int i 0 i nature Ids length i Capability cap Capability nature To Capability get nature Ids i if cap null results add cap get Id if results size 0 return EMPTY ID LIST else String ids new String results size results to Array ids return ids  getPrerequisiteIds IProjectNatureDescriptor getNatureDescriptor EMPTY_ID_LIST natureIds getRequiredNatureIds natureIds EMPTY_ID_LIST ArrayList ArrayList natureIds natureIds natureToCapability natureIds getId EMPTY_ID_LIST toArray
Returns the capabilities assigned to the specified project public Capability get Project Capabilities I Project project try String nature Ids project get Description get Nature Ids Array List results new Array List nature Ids length for int i 0 i nature Ids length i Capability cap Capability nature To Capability get nature Ids i if cap null cap new Capability nature Ids i map Capability cap results add cap if results size 0 return EMPTY CAP LIST else Capability caps new Capability results size results to Array caps return caps catch Core Exception e return EMPTY CAP LIST  getProjectCapabilities IProject natureIds getDescription getNatureIds ArrayList ArrayList natureIds natureIds natureToCapability natureIds natureIds mapCapability EMPTY_CAP_LIST toArray CoreException EMPTY_CAP_LIST
Returns the capabilities assigned to the specified project that are consideed disabled by core public Capability get Project Disabled Capabilities I Project project try String nature Ids project get Description get Nature Ids Array List results new Array List nature Ids length for int i 0 i nature Ids length i if project is Nature Enabled nature Ids i Capability cap Capability nature To Capability get nature Ids i if cap null cap new Capability nature Ids i map Capability cap results add cap if results size 0 return EMPTY CAP LIST else Capability caps new Capability results size results to Array caps return caps catch Core Exception e return EMPTY CAP LIST  getProjectDisabledCapabilities IProject natureIds getDescription getNatureIds ArrayList ArrayList natureIds natureIds isNatureEnabled natureIds natureToCapability natureIds natureIds mapCapability EMPTY_CAP_LIST toArray CoreException EMPTY_CAP_LIST
Returns whether the registry contains any capabilities public boolean has Capabilities return capabilities is Empty  hasCapabilities isEmpty
Returns whether the specified capability has any prerequisites public boolean has Prerequisites Capability capability return get Prerequisite Ids capability length 0  hasPrerequisites getPrerequisiteIds
Loads capabilities and capability categories from the platform s plugin registry public void load Capability Registry Reader reader new Capability Registry Reader reader read Platform get Plugin Registry this map Capabilities  CapabilityRegistryReader CapabilityRegistryReader getPluginRegistry mapCapabilities
Maps each capability in the registry to a particular category The category is defined in xml If the capability s category is not found then the capability is added to the misc category p Maps each capability in the registry to a particular nature id package void map Capabilities nature To Capability new Hash Map Iterator enum capabilities iterator while enum has Next map Capability Capability enum next  mapCapabilities natureToCapability HashMap hasNext mapCapability
private void map Capability Capability cap Map to category if cap is Valid if misc Category null misc Category new Category misc Category add Element cap else Category cat null String cat Path cap get Category Path if cat Path null cat Category find Category cat Path if cat null cat add Element cap else if misc Category null misc Category new Category misc Category add Element cap Map to nature id nature To Capability put cap get Nature Id cap  mapCapability isValid miscCategory miscCategory miscCategory addElement catPath getCategoryPath catPath findCategory catPath addElement miscCategory miscCategory miscCategory addElement natureToCapability getNatureId
Removes from the capability collection all capabilities whose UI is handle by another capability in the collection The provided collection must be in proper prerequisite order param capabilities the capabilities to be pruned return a collection of capabilities pruned public Capability prune Capabilities Capability capabilities Array List ids new Array List capabilities length for int i 0 i capabilities length i ids add capabilities i get Id for int i 0 i capabilities length i Array List handle Ids capabilities i get HandleU Is if handle Ids null ids remove All handle Ids String results new String ids size ids to Array results return find Capabilities results  pruneCapabilities ArrayList ArrayList getId ArrayList handleIds getHandleUIs handleIds removeAll handleIds toArray findCapabilities
Checks that the collection is valid If so the collection is ordered based on prerequisite param capabilities the capabilities to be checked and ordered return a status object with code code I Status OK code if the given set of natures is valid otherwise a status object indicating what is wrong with the set Also the collection of capabilities specified is ordered based on prerequisite public I Status validate Capabilities Capability capabilities String natures new String capabilities length for int i 0 i capabilities length i natures i capabilities i get Nature Id I Workspace workspace Resources Plugin get Workspace I Status status workspace validate Nature Set natures if status isOK natures workspace sort Nature Set natures for int i 0 i natures length i capabilities i Capability nature To Capability get natures i return status  IStatus IStatus validateCapabilities getNatureId IWorkspace ResourcesPlugin getWorkspace IStatus validateNatureSet sortNatureSet natureToCapability

Reads an element of the plugin registry and adds it to the capability registry if it is a capability or category or a handleUI element a child of a capability A handleUI element represents another capability for which this capability controls the user interface protected boolean read Element I Configuration Element element String name element get Name if name equals TAG CAPABILITY return read Capability element if name equals TAG CATEGORY return read Category element if name equals TAG HANDLE UI return read HandleUI element if name equals TAG PERSPECTIVE CHOICE return read Perspective Choice element return false  readElement IConfigurationElement getName TAG_CAPABILITY readCapability TAG_CATEGORY readCategory TAG_HANDLE_UI readHandleUI TAG_PERSPECTIVE_CHOICE readPerspectiveChoice
Reads a capability and adds it to the capability registry Reads all children elements which will be handleUI elements as well and adds them to the capability private boolean read Capability I Configuration Element element try Capability capability new Capability element this capability Registry add Capability capability current Capability capability read Element Children element current Capability null return true catch Workbench Exception e current Capability null return false  readCapability IConfigurationElement capabilityRegistry addCapability currentCapability readElementChildren currentCapability WorkbenchException currentCapability
Reads a capability category and adds it to the capability registry private boolean read Category I Configuration Element element try Category category new Category element capability Registry add Category category catch Workbench Exception e log an error since its not safe to show a dialog here IDE Workbench Plugin log Unable to create capability category e get Status NON NLS 1 return true  readCategory IConfigurationElement capabilityRegistry addCategory WorkbenchException IDEWorkbenchPlugin getStatus
Reads handleUI elements These elements contain the ids of other capabilities The capability that is the parent of the handleUI element controls the user interface for the capabilities whose ids are stored in the handleUI element private boolean read HandleUI I Configuration Element element String capability Id element get Attribute ATT ID if capability Id null log Missing Attribute element ATT ID if current Capability null current Capability add HandleUI capability Id return true  readHandleUI IConfigurationElement capabilityId getAttribute ATT_ID capabilityId logMissingAttribute ATT_ID currentCapability currentCapability addHandleUI capabilityId
Reads perspective Choice elements These elements contain the ids of perspectives private boolean read Perspective Choice I Configuration Element element String persp Id element get Attribute ATT ID if persp Id null log Missing Attribute element ATT ID if current Capability null current Capability add Perspective Choice persp Id return true  perspectiveChoice readPerspectiveChoice IConfigurationElement perspId getAttribute ATT_ID perspId logMissingAttribute ATT_ID currentCapability currentCapability addPerspectiveChoice perspId
Reads project capabilities and capability categories from the provided plugin registry and stores them in the provided capability registry public void read I Plugin Registry registry Capability Registry out capability Registry out read Registry registry IDE Workbench Plugin IDE WORKBENCH IDE Workbench Plugin PL CAPABILITIES  IPluginRegistry CapabilityRegistry capabilityRegistry readRegistry IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchPlugin PL_CAPABILITIES

private static final Comparator comparer new Comparator public int compare Object arg0 Object arg1 String s1 I Extension arg0 get Declaring Plugin Descriptor get Unique Identifier String s2 I Extension arg1 get Declaring Plugin Descriptor get Unique Identifier return s1 compare To Ignore Case s2  IExtension getDeclaringPluginDescriptor getUniqueIdentifier IExtension getDeclaringPluginDescriptor getUniqueIdentifier compareToIgnoreCase
The constructor protected IDE Registry Reader  IDERegistryReader
This method extracts description as a subelement of the given element return description string if defined or empty string if not protected String get Description I Configuration Element config I Configuration Element children config get Children TAG DESCRIPTION if children length 1 return children 0 get Value return NON NLS 1  getDescription IConfigurationElement IConfigurationElement getChildren TAG_DESCRIPTION getValue
Logs the error in the workbench log using the provided text and the information in the configuration element protected void log Error I Configuration Element element String text I Extension extension element get Declaring Extension I Plugin Descriptor descriptor extension get Declaring Plugin Descriptor String Buffer buf new String Buffer buf append Plugin descriptor get Unique Identifier extension extension get Extension Point Unique Identifier NON NLS 2 NON NLS 1 buf append n text NON NLS 1 IDE Workbench Plugin log buf to String  logError IConfigurationElement IExtension getDeclaringExtension IPluginDescriptor getDeclaringPluginDescriptor StringBuffer StringBuffer getUniqueIdentifier getExtensionPointUniqueIdentifier IDEWorkbenchPlugin toString
Logs a very common registry error when a required attribute is missing protected void log Missing Attribute I Configuration Element element String attribute Name log Error element Required attribute attribute Name not defined NON NLS 2 NON NLS 1  logMissingAttribute IConfigurationElement attributeName logError attributeName
Logs a very common registry error when a required child is missing protected void log Missing Element I Configuration Element element String element Name log Error element Required sub element element Name not defined NON NLS 2 NON NLS 1  logMissingElement IConfigurationElement elementName logError elementName
Logs a registry error when the configuration element is unknown protected void log Unknown Element I Configuration Element element log Error element Unknown extension tag found element get Name NON NLS 1  logUnknownElement IConfigurationElement logError getName
Apply a reproducable order to the list of extensions provided such that the order will not change as extensions are added or removed protected I Extension order Extensions I Extension extensions By default the order is based on plugin id sorted in ascending order The order for a plugin providing more than one extension for an extension point is dependent in the order listed in the XML file I Extension sorted Extension new I Extension extensions length System arraycopy extensions 0 sorted Extension 0 extensions length Collections sort Arrays as List sorted Extension comparer return sorted Extension  IExtension orderExtensions IExtension IExtension sortedExtension IExtension sortedExtension asList sortedExtension sortedExtension
Implement this method to read element s attributes If children should also be read then implementor is responsible for calling code read Element Children code Implementor is also responsible for logging missing attributes return true if element was recognized false if not  readElementChildren
protected abstract boolean read Element I Configuration Element element Read the element s children This is called by the subclass read Element method when it wants to read the children of the element protected void read Element Children I Configuration Element element read Elements element get Children  readElement IConfigurationElement readElement readElementChildren IConfigurationElement readElements getChildren
Read each element one at a time by calling the subclass implementation of code read Element code Logs an error if the element was not recognized protected void read Elements I Configuration Element elements for int i 0 i elements length i if read Element elements i log Unknown Element elements i  readElement readElements IConfigurationElement readElement logUnknownElement
Read one extension by looping through its configuration elements protected void read Extension I Extension extension read Elements extension get Configuration Elements  readExtension IExtension readElements getConfigurationElements
Start the registry reading process using the supplied plugin ID and extension point protected void read Registry I Plugin Registry registry String plugin Id String extension Point String point Id plugin Id extension Point NON NLS 1 I Extension extensions I Extension extension Points get point Id if extensions null I Extension Point point registry get Extension Point plugin Id extension Point if point null return extensions point get Extensions extensions order Extensions extensions extension Points put point Id extensions for int i 0 i extensions length i read Extension extensions i  readRegistry IPluginRegistry pluginId extensionPoint pointId pluginId extensionPoint IExtension IExtension extensionPoints pointId IExtensionPoint getExtensionPoint pluginId extensionPoint getExtensions orderExtensions extensionPoints pointId readExtension

public boolean equals Object o if o instanceof Query Comparator return false return true  QueryComparator
public int compare Object o1 Object o2 more attribues come first Marker Query q1 Marker Query o1 Marker Query q2 Marker Query o2 int size1 q1 get Attributes length int size2 q2 get Attributes length if size1 size2 return 1 if size1 size2 return 0 return 1  MarkerQuery MarkerQuery MarkerQuery MarkerQuery getAttributes getAttributes
public String get Help I Marker marker if sorted Help Queries null Set set help Queries key Set sorted Help Queries new Array List set size sorted Help Queries add All set Collections sort sorted Help Queries new Query Comparator Return the first match we assume there is only one for Iterator iter sorted Help Queries iterator iter has Next Marker Query query Marker Query iter next Marker Query Result result query perform Query marker if result null See if a matching result is registered Map results Table Map help Queries get query I Configuration Element element I Configuration Element results Table get result if element null We have a match so return the help context id return element get Attribute ATT HELP return null  getHelp IMarker sortedHelpQueries helpQueries keySet sortedHelpQueries ArrayList sortedHelpQueries addAll sortedHelpQueries QueryComparator sortedHelpQueries hasNext MarkerQuery MarkerQuery MarkerQueryResult performQuery resultsTable helpQueries IConfigurationElement IConfigurationElement resultsTable getAttribute ATT_HELP
public boolean has Resolutions I Marker marker Detect a match for Iterator iter resolution Queries key Set iterator iter has Next Marker Query query Marker Query iter next Marker Query Result result query perform Query marker if result null See if a matching result is registered Map results Table Map resolution Queries get query I Configuration Element element I Configuration Element results Table get result if element null I Marker Resolution Generator generator null if element get Declaring Extension get Declaring Plugin Descriptor is Plugin Activated The element s plugin is loaded so we instantiate the resolution try generator I Marker Resolution Generator element create Executable Extension ATT CLASS catch Core Exception e IDE Workbench Plugin log Unable to instantiate resolution generator e get Status NON NLS 1 if generator null if generator instanceof I Marker Resolution Generator2 if I Marker Resolution Generator2 generator has Resolutions marker return true else I Marker Resolution resolutions generator get Resolutions marker if resolutions length 0 there is at least one resolution return true else The element s plugin in not loaded so we assume the generator will produce resolutions for the marker return true return false  hasResolutions IMarker resolutionQueries keySet hasNext MarkerQuery MarkerQuery MarkerQueryResult performQuery resultsTable resolutionQueries IConfigurationElement IConfigurationElement resultsTable IMarkerResolutionGenerator getDeclaringExtension getDeclaringPluginDescriptor isPluginActivated IMarkerResolutionGenerator createExecutableExtension ATT_CLASS CoreException IDEWorkbenchPlugin getStatus IMarkerResolutionGenerator2 IMarkerResolutionGenerator2 hasResolutions IMarkerResolution getResolutions
public I Marker Resolution get Resolutions I Marker marker Collect all matches Array List resolutions new Array List for Iterator iter resolution Queries key Set iterator iter has Next Marker Query query Marker Query iter next Marker Query Result result query perform Query marker if result null See if a matching result is registered Map results Table Map resolution Queries get query I Configuration Element element I Configuration Element results Table get result if element null I Marker Resolution Generator generator null try generator I Marker Resolution Generator element create Executable Extension ATT CLASS catch Core Exception e IDE Workbench Plugin log Unable to instantiate resolution generator e get Status NON NLS 1 if generator null I Marker Resolution generated Resolutions generator get Resolutions marker for int i 0 i generated Resolutions length i resolutions add generated Resolutions i return I Marker Resolution resolutions to Array new I Marker Resolution resolutions size  IMarkerResolution getResolutions IMarker ArrayList ArrayList resolutionQueries keySet hasNext MarkerQuery MarkerQuery MarkerQueryResult performQuery resultsTable resolutionQueries IConfigurationElement IConfigurationElement resultsTable IMarkerResolutionGenerator IMarkerResolutionGenerator createExecutableExtension ATT_CLASS CoreException IDEWorkbenchPlugin getStatus IMarkerResolution generatedResolutions getResolutions generatedResolutions generatedResolutions IMarkerResolution toArray IMarkerResolution
Adds a help query to the registry param query a marker query param result a result for the given query param element the configuration element defining the result public void add Help Query Marker Query query Marker Query Result result I Configuration Element element add Query help Queries query result element  addHelpQuery MarkerQuery MarkerQueryResult IConfigurationElement addQuery helpQueries
Adds a resolution query to the registry param query a marker query param result a result for the given query param element the configuration element defining the result public void add Resolution Query Marker Query query Marker Query Result result I Configuration Element element add Query resolution Queries query result element  addResolutionQuery MarkerQuery MarkerQueryResult IConfigurationElement addQuery resolutionQueries
Adds a query to the given table param table the table to which the query is added param query a marker query param result a result for the given query param element the configuration element defining the result private void add Query Map table Marker Query query Marker Query Result result I Configuration Element element See if the query is already in the table Map results Map table get query if results null Create a new results table results new Hash Map Add the query to the table table put query results Add the new result results put result element  addQuery MarkerQuery MarkerQueryResult IConfigurationElement HashMap

Get the marker help that is defined in the plugin registry and add it to the given marker help registry p Warning The marker help registry must be passed in because this method is called during the process of setting up the marker help registry and at this time it has not been safely setup with the plugin p public void add Help Marker Help Registry registry I Plugin Registry plugin Registry Platform get Plugin Registry marker Help Registry registry read Registry plugin Registry IDE Workbench Plugin IDE WORKBENCH IDE Workbench Plugin PL MARKER HELP read Registry plugin Registry IDE Workbench Plugin IDE WORKBENCH IDE Workbench Plugin PL MARKER RESOLUTION  addHelp MarkerHelpRegistry IPluginRegistry pluginRegistry getPluginRegistry markerHelpRegistry readRegistry pluginRegistry IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchPlugin PL_MARKER_HELP readRegistry pluginRegistry IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchPlugin PL_MARKER_RESOLUTION
Processes one configuration element or child element protected boolean read Element I Configuration Element element if element get Name equals TAG HELP read Help Element element return true if element get Name equals TAG RESOLUTION GENERATOR read Resolution Element element return true if element get Name equals TAG ATTRIBUTE read Attribute Element element return true return false  readElement IConfigurationElement getName TAG_HELP readHelpElement getName TAG_RESOLUTION_GENERATOR readResolutionElement getName TAG_ATTRIBUTE readAttributeElement
Processes a help configuration element private void read Help Element I Configuration Element element read type String type element get Attribute ATT TYPE read attributes and values current Attribute Names new Array List current Attribute Values new Array List read Element Children element String attribute Names String current Attribute Names to Array new String current Attribute Names size String attribute Values String current Attribute Values to Array new String current Attribute Values size add query to the registry Marker Query query new Marker Query type attribute Names Marker Query Result result new Marker Query Result attribute Values marker Help Registry add Help Query query result element  readHelpElement IConfigurationElement getAttribute ATT_TYPE currentAttributeNames ArrayList currentAttributeValues ArrayList readElementChildren attributeNames currentAttributeNames toArray currentAttributeNames attributeValues currentAttributeValues toArray currentAttributeValues MarkerQuery MarkerQuery attributeNames MarkerQueryResult MarkerQueryResult attributeValues markerHelpRegistry addHelpQuery
Processes a resolution configuration element private void read Resolution Element I Configuration Element element read type String type element get Attribute ATT TYPE read attributes and values current Attribute Names new Array List current Attribute Values new Array List read Element Children element String attribute Names String current Attribute Names to Array new String current Attribute Names size String attribute Values String current Attribute Values to Array new String current Attribute Values size add query to the registry Marker Query query new Marker Query type attribute Names Marker Query Result result new Marker Query Result attribute Values marker Help Registry add Resolution Query query result element  readResolutionElement IConfigurationElement getAttribute ATT_TYPE currentAttributeNames ArrayList currentAttributeValues ArrayList readElementChildren attributeNames currentAttributeNames toArray currentAttributeNames attributeValues currentAttributeValues toArray currentAttributeValues MarkerQuery MarkerQuery attributeNames MarkerQueryResult MarkerQueryResult attributeValues markerHelpRegistry addResolutionQuery
Processes an attribute sub element private void read Attribute Element I Configuration Element element String name element get Attribute ATT NAME String value element get Attribute ATT VALUE if name null value null current Attribute Names add name current Attribute Values add value  readAttributeElement IConfigurationElement getAttribute ATT_NAME getAttribute ATT_VALUE currentAttributeNames currentAttributeValues

class Marker Image Reader extends IDE Registry Reader protected boolean read Element I Configuration Element element if element get Name equals TAG PROVIDER add Provider element return true return false  MarkerImageReader IDERegistryReader readElement IConfigurationElement getName TAG_PROVIDER addProvider
return false public void read Registry read Registry Platform get Plugin Registry IDE Workbench Plugin IDE WORKBENCH IDE Workbench Plugin PL MARKER IMAGE PROVIDER  readRegistry readRegistry getPluginRegistry IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchPlugin PL_MARKER_IMAGE_PROVIDER
Initialize this new Marker Image Provider Registry public Marker Image Provider Registry class Marker Image Reader extends IDE Registry Reader protected boolean read Element I Configuration Element element if element get Name equals TAG PROVIDER add Provider element return true return false public void read Registry read Registry Platform get Plugin Registry IDE Workbench Plugin IDE WORKBENCH IDE Workbench Plugin PL MARKER IMAGE PROVIDER new Marker Image Reader read Registry  MarkerImageProviderRegistry MarkerImageProviderRegistry MarkerImageReader IDERegistryReader readElement IConfigurationElement getName TAG_PROVIDER addProvider readRegistry readRegistry getPluginRegistry IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchPlugin PL_MARKER_IMAGE_PROVIDER MarkerImageReader readRegistry
Creates a descriptor for the marker provider extension and add it to the list of providers public void add Provider I Configuration Element element Descriptor desc new Descriptor desc element element desc plugin Descriptor element get Declaring Extension get Declaring Plugin Descriptor desc id element get Attribute ATT ID desc marker Type element get Attribute ATT MARKER TYPE desc image Path element get Attribute ATT ICON desc class Name element get Attribute ATT PROVIDER CLASS if desc image Path null desc image Descriptor get Image Descriptor desc if desc class Name null Don t need to keep these references desc element null desc plugin Descriptor null descriptors add desc  addProvider IConfigurationElement pluginDescriptor getDeclaringExtension getDeclaringPluginDescriptor getAttribute ATT_ID markerType getAttribute ATT_MARKER_TYPE imagePath getAttribute ATT_ICON className getAttribute ATT_PROVIDER_CLASS imagePath imageDescriptor getImageDescriptor className pluginDescriptor
see org eclipse ui model I Workbench Adapter get Image Descriptor Object public Image Descriptor get Image Descriptor I Marker marker int size descriptors size for int i 0 i size i Descriptor desc Descriptor descriptors get i try if marker is Subtype Of desc marker Type if desc class Name null if desc plugin Descriptor is Plugin Activated Get the image descriptor from the provider Save the image descriptor url as a persistable property so a image descriptor can be created without activating the plugin next time the workbench is started if desc provider null desc provider I Marker Image Provider IDE Workbench Plugin create Extension desc element ATT PROVIDER CLASS String path desc provider get Image Path marker if path desc image Path desc image Path path desc image Descriptor get Image Descriptor desc return desc image Descriptor return desc image Descriptor else if desc image Descriptor null Create a image descriptor to be used until the plugin gets activated desc image Path String marker get Attribute MARKER ATT KEY desc image Descriptor get Image Descriptor desc return desc image Descriptor else if desc image Descriptor null return desc image Descriptor catch Core Exception e IDE Workbench Plugin get Default get Log log new Status I Status ERROR PlatformUI PLUGIN ID 0 Exception creating image descriptor for desc marker Type NON NLS 1 e return null return null  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor IMarker isSubtypeOf markerType className pluginDescriptor isPluginActivated IMarkerImageProvider IDEWorkbenchPlugin createExtension ATT_PROVIDER_CLASS getImagePath imagePath imagePath imageDescriptor getImageDescriptor imageDescriptor imageDescriptor imageDescriptor imagePath getAttribute MARKER_ATT_KEY imageDescriptor getImageDescriptor imageDescriptor imageDescriptor imageDescriptor CoreException IDEWorkbenchPlugin getDefault getLog IStatus PLUGIN_ID markerType
Returns the image descriptor with the given relative path Image Descriptor get Image Descriptor Descriptor desc try URL installURL desc plugin Descriptor get InstallURL URL url new URL installURL desc image Path return Image Descriptor create FromURL url catch MalformedURL Exception e return null  ImageDescriptor getImageDescriptor pluginDescriptor getInstallURL imagePath ImageDescriptor createFromURL MalformedURLException

Creates a new marker query with the given type and attributes p The type may be code null code The attributes may be empty but not code null code p param marker Type the targetted marker type param marker Attributes the targetted marker attributes public Marker Query String marker Type String marker Attributes if marker Attributes null throw new Illegal Argument Exception type marker Type attributes marker Attributes compute Hash Code  markerType markerAttributes MarkerQuery markerType markerAttributes markerAttributes IllegalArgumentException markerType markerAttributes computeHashCode
Performs a query against the given marker p Returns a code Marker Query Result code if the marker is appropriate for this query correct type and has all of the query attributes otherwise code null code is returned param marker the marker to perform the query against return a marker query result or code null code public Marker Query Result perform Query I Marker marker Check type try if type null type equals marker get Type return null catch Core Exception e IDE Workbench Plugin log Error accessing marker type e get Status NON NLS 1 return null Check attributes String values new String attributes length for int i 0 i attributes length i try Object value marker get Attribute attributes i if value null return null values i value to String catch Core Exception e IDE Workbench Plugin log Error accessing marker attribute e get Status NON NLS 1 return null Create and return the result return new Marker Query Result values  MarkerQueryResult MarkerQueryResult performQuery IMarker getType CoreException IDEWorkbenchPlugin getStatus getAttribute toString CoreException IDEWorkbenchPlugin getStatus MarkerQueryResult
public boolean equals Object o if o instanceof Marker Query return false if o this return true Marker Query mq Marker Query o if type null mq type null type equals mq type return false if attributes length mq attributes length return false for int i 0 i attributes length i if attributes i equals mq attributes i return false return true  MarkerQuery MarkerQuery MarkerQuery
Method declared on Object public int hash Code return hash Code  hashCode hashCode
Computes the hash code for this instance public void compute Hash Code hash Code 19 if type null hash Code hash Code 37 type hash Code for int i 0 i attributes length i hash Code hash Code 37 attributes i hash Code  computeHashCode hashCode hashCode hashCode hashCode hashCode hashCode hashCode
Returns the targetted marker type May be code null code return the targetted marker type public String get Type return type  getType
Returns the targetted attributes The array may be empty return the targetted attributes public String get Attributes return attributes  getAttributes

Creates a new marker query result with the given values p The values may not be empty p param marker Attribute Values the target marker s attribute values public Marker Query Result String marker Attribute Values if marker Attribute Values null throw new Illegal Argument Exception values marker Attribute Values compute Hash Code  markerAttributeValues MarkerQueryResult markerAttributeValues markerAttributeValues IllegalArgumentException markerAttributeValues computeHashCode
public boolean equals Object o if o instanceof Marker Query Result return false if o this return true Marker Query Result mqr Marker Query Result o if values length mqr values length return false for int i 0 i values length i if values i equals mqr values i return false return true  MarkerQueryResult MarkerQueryResult MarkerQueryResult
Method declared on Object public int hash Code return hash Code  hashCode hashCode
Computes the hash code for this instance public void compute Hash Code hash Code 19 for int i 0 i values length i hash Code hash Code 37 values i hash Code  computeHashCode hashCode hashCode hashCode hashCode

private Map map new Hash Map 10 Returns the image for the given nature id or code null code if no image is registered for the given id public Image Descriptor get Nature Image String nature Id return Image Descriptor map get nature Id  HashMap ImageDescriptor getNatureImage natureId ImageDescriptor natureId
Reads from the plugin registry public void load Project Image Registry Reader reader new Project Image Registry Reader reader read Project Nature Images Platform get Plugin Registry this  ProjectImageRegistryReader ProjectImageRegistryReader readProjectNatureImages getPluginRegistry
Sets the image for the given nature id public void set Nature Image String nature Id Image Descriptor image map put nature Id image  setNatureImage natureId ImageDescriptor natureId

Reads the contents of the given element protected boolean read Element I Configuration Element element if element get Name equals TAG IMAGE return false String id element get Attribute ATT ID if id null log Missing Attribute element ATT ID return true String nature Id element get Attribute ATT NATURE ID if nature Id null log Missing Attribute element ATT NATURE ID return true String icon element get Attribute ATT ICON if icon null log Missing Attribute element ATT ICON return true I Extension extension element get Declaring Extension String extending Plugin Id extension get Declaring Plugin Descriptor get Unique Identifier Image Descriptor image AbstractUI Plugin image Descriptor From Plugin extending Plugin Id icon if image null registry set Nature Image nature Id image return true  readElement IConfigurationElement getName TAG_IMAGE getAttribute ATT_ID logMissingAttribute ATT_ID natureId getAttribute ATT_NATURE_ID natureId logMissingAttribute ATT_NATURE_ID getAttribute ATT_ICON logMissingAttribute ATT_ICON IExtension getDeclaringExtension extendingPluginId getDeclaringPluginDescriptor getUniqueIdentifier ImageDescriptor AbstractUIPlugin imageDescriptorFromPlugin extendingPluginId setNatureImage natureId
Read the project nature images within a registry public void read Project Nature Images I Plugin Registry in Project Image Registry out registry out read Registry in IDE Workbench Plugin IDE WORKBENCH IDE Workbench Plugin PL PROJECT NATURE IMAGES  readProjectNatureImages IPluginRegistry ProjectImageRegistry readRegistry IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchPlugin PL_PROJECT_NATURE_IMAGES

public class Resource Perspective implements I Perspective Factory Constructs a new Default layout engine public Resource Perspective super  ResourcePerspective IPerspectiveFactory ResourcePerspective
Defines the initial layout for a perspective Implementors of this method may add additional views to a perspective The perspective already contains an editor folder with code ID I Layout Factory ID EDITORS code Add additional views to the perspective in reference to the editor folder This method is only called when a new perspective is created If an old perspective is restored from a persistence file then this method is not called param layout the factory used to add views to the perspective public void create Initial Layout I Page Layout layout define Actions layout define Layout layout  ILayoutFactory ID_EDITORS createInitialLayout IPageLayout defineActions defineLayout
Defines the initial actions for a page public void define Actions I Page Layout layout Add new wizards layout add New Wizard Shortcut org eclipse ui wizards new folder NON NLS 1 layout add New Wizard Shortcut org eclipse ui wizards new file NON NLS 1 Add show views layout add Show View Shortcut I Page Layout ID RES NAV layout add Show View Shortcut I Page Layout ID BOOKMARKS layout add Show View Shortcut I Page Layout ID OUTLINE layout add Show View Shortcut I Page Layout ID PROP SHEET layout add Show View Shortcut I Page Layout ID PROBLEM VIEW layout add Show View Shortcut I Page Layout ID TASK LIST layout add Action Set I Page Layout ID NAVIGATE ACTION SET  defineActions IPageLayout addNewWizardShortcut addNewWizardShortcut addShowViewShortcut IPageLayout ID_RES_NAV addShowViewShortcut IPageLayout ID_BOOKMARKS addShowViewShortcut IPageLayout ID_OUTLINE addShowViewShortcut IPageLayout ID_PROP_SHEET addShowViewShortcut IPageLayout ID_PROBLEM_VIEW addShowViewShortcut IPageLayout ID_TASK_LIST addActionSet IPageLayout ID_NAVIGATE_ACTION_SET
Defines the initial layout for a page public void define Layout I Page Layout layout Editors are placed for free String editor Area layout get Editor Area Top left I Folder Layout top Left layout create Folder top Left I Page Layout LEFT float 0 26 editor Area NON NLS 1 top Left add View I Page Layout ID RES NAV top Left add Placeholder I Page Layout ID BOOKMARKS Bottom left I Folder Layout bottom Left layout create Folder bottom Left I Page Layout BOTTOM float 0 50 NON NLS 1 top Left NON NLS 1 bottom Left add View I Page Layout ID OUTLINE Bottom right layout add View I Page Layout ID TASK LIST I Page Layout BOTTOM float 0 66 editor Area  defineLayout IPageLayout editorArea getEditorArea IFolderLayout topLeft createFolder topLeft IPageLayout editorArea topLeft addView IPageLayout ID_RES_NAV topLeft addPlaceholder IPageLayout ID_BOOKMARKS IFolderLayout bottomLeft createFolder bottomLeft IPageLayout topLeft bottomLeft addView IPageLayout ID_OUTLINE addView IPageLayout ID_TASK_LIST IPageLayout editorArea

Answer a flat collection of the passed status and its recursive children protected static List flatten I Status a Status List result new Array List if a Status is Multi Status I Status children a Status get Children for int i 0 i children length i I Status current Child children i if current Child is Multi Status Iterator child Statii Enum flatten current Child iterator while child Statii Enum has Next result add child Statii Enum next else result add current Child else result add a Status return result  IStatus aStatus ArrayList aStatus isMultiStatus IStatus aStatus getChildren IStatus currentChild currentChild isMultiStatus childStatiiEnum currentChild childStatiiEnum hasNext childStatiiEnum currentChild aStatus
This method must not be called outside the workbench Utility method for creating status protected static I Status new Status I Status stati String message Throwable exception if message null message trim length 0 throw new Illegal Argument Exception return new Multi Status IDE Workbench Plugin IDE WORKBENCH I Status ERROR stati message exception  IStatus newStatus IStatus IllegalArgumentException MultiStatus IDEWorkbenchPlugin IDE_WORKBENCH IStatus
This method must not be called outside the workbench Utility method for creating status public static I Status new Status int severity String message Throwable exception String status Message message if message null message trim length 0 if exception get Message null status Message exception to String else status Message exception get Message return new Status severity IDE Workbench Plugin IDE WORKBENCH severity status Message exception  IStatus newStatus statusMessage getMessage statusMessage toString statusMessage getMessage IDEWorkbenchPlugin IDE_WORKBENCH statusMessage
This method must not be called outside the workbench Utility method for creating status public static I Status new Status List children String message Throwable exception List flat Status Collection new Array List Iterator iter children iterator while iter has Next I Status current Status I Status iter next Iterator children Iter flatten current Status iterator while children Iter has Next flat Status Collection add children Iter next I Status stati new I Status flat Status Collection size flat Status Collection to Array stati return new Status stati message exception  IStatus newStatus flatStatusCollection ArrayList hasNext IStatus currentStatus IStatus childrenIter currentStatus childrenIter hasNext flatStatusCollection childrenIter IStatus IStatus flatStatusCollection flatStatusCollection toArray newStatus

int start inclusive int end exclusive public Position int start int end this start start this end end 
this end end public int get Start return start  getStart
return start public int get End return end  getEnd
String Matcher constructor takes in a String object that is a simple pattern which may contain 39 39 for 0 and many characters and 39 63 39 for exactly one character Literal 39 39 and 39 39 characters must be escaped in the pattern e g quot 92 quot means literal quot quot etc Escaping any other character including the escape character itself just results in that character in the pattern e g quot 92 a quot means quot a quot and quot 92 92 quot means quot 92 quot If invoking the String Matcher with string literals in Java don t forget escape characters are represented by quot 92 92 quot param pattern the pattern to match text against param ignore Case if true case is ignored param ignore Wild Cards if true wild cards and their escape sequences are ignored everything is taken literally public String Matcher String pattern boolean ignore Case boolean ignore Wild Cards if pattern null throw new Illegal Argument Exception f Ignore Case ignore Case f Ignore Wild Cards ignore Wild Cards f Pattern pattern f Length pattern length if f Ignore Wild Cards parse No Wild Cards else parse Wild Cards  StringMatcher StringMatcher ignoreCase ignoreWildCards StringMatcher ignoreCase ignoreWildCards IllegalArgumentException fIgnoreCase ignoreCase fIgnoreWildCards ignoreWildCards fPattern fLength fIgnoreWildCards parseNoWildCards parseWildCards
Find the first occurrence of the pattern between code start code inclusive and code end code exclusive param text the String object to search in param start the starting index of the search range inclusive param end the ending index of the search range exclusive return an code String Matcher Position code object that keeps the starting inclusive and ending positions exclusive of the first occurrence of the pattern in the specified range of the text return null if not found or subtext is empty start end A pair of zeros is returned if pattern is empty string Note that for pattern like quot abc quot with leading and trailing stars position of quot abc quot is returned For a pattern like quot 63 63 quot in text quot abcdf quot 1 3 is returned public String Matcher Position find String text int start int end if text null throw new Illegal Argument Exception int tlen text length if start 0 start 0 if end tlen end tlen if end 0 start end return null if f Length 0 return new Position start start if f Ignore Wild Cards int x pos In text start end if x 0 return null return new Position x x f Length int seg Count f Segments length if seg Count 0 pattern contains only s return new Position start end int cur Pos start int match Start 1 int i for i 0 i seg Count cur Pos end i String current f Segments i int next Match reg Exp Pos In text cur Pos end current if next Match 0 return null if i 0 match Start next Match cur Pos next Match current length if i seg Count return null return new Position match Start cur Pos  StringMatcher StringMatcher IllegalArgumentException fLength fIgnoreWildCards posIn fLength segCount fSegments segCount curPos matchStart segCount curPos fSegments nextMatch regExpPosIn curPos nextMatch matchStart nextMatch curPos nextMatch segCount matchStart curPos
match the given code text code with the pattern return true if matched eitherwise false param text a String object public boolean match String text return match text 0 text length 
Given the starting inclusive and the ending exclusive positions in the code text code determine if the given substring matches with a Pattern return true if the specified portion of the text matches the pattern param text a code String code object that contains the substring to match param start marks the starting position inclusive of the substring param end marks the ending index exclusive of the substring public boolean match String text int start int end if null text throw new Illegal Argument Exception if start end return false if f Ignore Wild Cards return end start f Length f Pattern region Matches f Ignore Case 0 text start f Length int seg Count f Segments length if seg Count 0 f Has Leading Star f Has Trailing Star pattern contains only s return true if start end return f Length 0 if f Length 0 return start end int tlen text length if start 0 start 0 if end tlen end tlen int t Cur Pos start int bound end f Bound if bound 0 return false int i 0 String current f Segments i int seg Length current length process first segment if f Has Leading Star if reg Exp Region Matches text start current 0 seg Length return false else i t Cur Pos t Cur Pos seg Length if f Segments length 1 f Has Leading Star f Has Trailing Star only one segment to match no wildcards specified return t Cur Pos end process middle segments while i seg Count current f Segments i int current Match int k current index Of f Single Wild Card if k 0 current Match text Pos In text t Cur Pos end current if current Match 0 return false else current Match reg Exp Pos In text t Cur Pos end current if current Match 0 return false t Cur Pos current Match current length i process final segment if f Has Trailing Star t Cur Pos end int clen current length return reg Exp Region Matches text end clen current 0 clen return i seg Count  aPattern IllegalArgumentException fIgnoreWildCards fLength fPattern regionMatches fIgnoreCase fLength segCount fSegments segCount fHasLeadingStar fHasTrailingStar fLength fLength tCurPos fBound fSegments segLength fHasLeadingStar regExpRegionMatches segLength tCurPos tCurPos segLength fSegments fHasLeadingStar fHasTrailingStar tCurPos segCount fSegments currentMatch indexOf fSingleWildCard currentMatch textPosIn tCurPos currentMatch currentMatch regExpPosIn tCurPos currentMatch tCurPos currentMatch fHasTrailingStar tCurPos regExpRegionMatches segCount
This method parses the given pattern into segments seperated by wildcard characters Since wildcards are not being used in this case the pattern consists of a single segment private void parse No Wild Cards f Segments new String 1 f Segments 0 f Pattern f Bound f Length  parseNoWildCards fSegments fSegments fPattern fBound fLength
Parses the given pattern into segments seperated by wildcard 39 39 characters param p a String object that is a simple regular expression with and or 39 63 39 private void parse Wild Cards if f Pattern starts With NON NLS 1 f Has Leading Star true if f Pattern ends With NON NLS 1 make sure it s not an escaped wildcard if f Length 1 f Pattern char At f Length 2 f Has Trailing Star true Vector temp new Vector int pos 0 String Buffer buf new String Buffer while pos f Length char c f Pattern char At pos switch c case if pos f Length buf append c else char next f Pattern char At pos if it s an escape sequence if next next next buf append next else not an escape sequence just insert literally buf append c buf append next break case if buf length 0 new segment temp add Element buf to String f Bound buf length buf set Length 0 break case append special character representing single match wildcard buf append f Single Wild Card break default buf append c add last buffer to segment list if buf length 0 temp add Element buf to String f Bound buf length f Segments new String temp size temp copy Into f Segments  parseWildCards fPattern startsWith fHasLeadingStar fPattern endsWith fLength fPattern charAt fLength fHasTrailingStar StringBuffer StringBuffer fLength fPattern charAt fLength fPattern charAt addElement toString fBound setLength fSingleWildCard addElement toString fBound fSegments copyInto fSegments
param text a string which contains no wildcard param start the starting index in the text for search inclusive param end the stopping point of search exclusive return the starting index in the text of the pattern or 1 if not found protected int pos In String text int start int end no wild card in pattern int max end f Length if f Ignore Case int i text index Of f Pattern start if i 1 i max return 1 return i for int i start i max i if text region Matches true i f Pattern 0 f Length return i return 1  posIn fLength fIgnoreCase indexOf fPattern regionMatches fPattern fLength
param text a simple regular expression that may only contain 63 s param start the starting index in the text for search inclusive param end the stopping point of search exclusive param p a simple regular expression that may contains 63 return the starting index in the text of the pattern or 1 if not found protected int reg Exp Pos In String text int start int end String p int plen p length int max end plen for int i start i max i if reg Exp Region Matches text i p 0 plen return i return 1  regExpPosIn regExpRegionMatches
return boolean param text a String to match param t Start int that indicates the starting index of match inclusive param p String String a simple regular expression that may contain 63 param p Start param plen protected boolean reg Exp Region Matches String text int t Start String p int p Start int plen while plen 0 char tchar text char At t Start char pchar p char At p Start process wild cards if f Ignore Wild Cards skip single wild cards if pchar f Single Wild Card continue if pchar tchar continue if f Ignore Case if Character to Upper Case tchar Character to Upper Case pchar continue comparing after converting to upper case doesn t handle all cases also compare after converting to lower case if Character to Lower Case tchar Character to Lower Case pchar continue return false return true  tStart pStart regExpRegionMatches tStart pStart charAt tStart charAt pStart fIgnoreWildCards fSingleWildCard fIgnoreCase toUpperCase toUpperCase toLowerCase toLowerCase
param text the string to match param start the starting index in the text for search inclusive param end the stopping point of search exclusive param p a string that has no wildcard return the starting index in the text of the pattern or 1 if not found protected int text Pos In String text int start int end String p int plen p length int max end plen if f Ignore Case int i text index Of p start if i 1 i max return 1 return i for int i start i max i if text region Matches true i p 0 plen return i return 1  textPosIn fIgnoreCase indexOf regionMatches

Create an instance of this class public Tips And Tricks Action I Workbench Window window super IDE Workbench Messages get String Tips And Tricks text NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window set Tool Tip Text IDE Workbench Messages get String Tips And Tricks tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids TIPS AND TRICKS ACTION set Action Definition Id org eclipse ui help tips And Tricks Action NON NLS 1 workbench Window get Part Service add Part Listener this  TipsAndTricksAction IWorkbenchWindow IDEWorkbenchMessages getString TipsAndTricks IllegalArgumentException workbenchWindow setToolTipText IDEWorkbenchMessages getString TipsAndTricks toolTip WorkbenchHelp setHelp IHelpContextIds TIPS_AND_TRICKS_ACTION setActionDefinitionId tipsAndTricksAction workbenchWindow getPartService addPartListener
if href null Busy Indicator show While shell get Display new Runnable public void run Workbench Help display Help Resource href  BusyIndicator showWhile getDisplay WorkbenchHelp displayHelpResource
The user has invoked this action public void run if workbench Window null action has been disposed return Ask the user to select a feature About Info feature Infos IDE Workbench Plugin get Default get Feature Infos Array List tips And Tricks Features new Array List feature Infos length for int i 0 i feature Infos length i if feature Infos i get Tips And Tricks Href null tips And Tricks Features add feature Infos i Shell shell workbench Window get Shell if tips And Tricks Features size 0 Message Dialog open Information shell IDE Workbench Messages get String Tips And Tricks Message Dialog title NON NLS 1 IDE Workbench Messages get String Tips And Tricks Message Dialog message NON NLS 1 return About Info features new About Info tips And Tricks Features size tips And Tricks Features to Array features I Product product Platform get Product Feature Selection Dialog d new Feature Selection Dialog shell features product null null product get Id IDE Workbench Messages get String Tips And Tricks Page Selection Dialog title NON NLS 1 IDE Workbench Messages get String Tips And Tricks Page Selection Dialog message NON NLS 1 I Help Context Ids TIPS AND TRICKS PAGE SELECTION DIALOG if d open Dialog OK d get Result length 1 return About Info feature About Info d get Result 0 Open the tips and trick help topic if feature null final String href feature get Tips And Tricks Href if href null Busy Indicator show While shell get Display new Runnable public void run Workbench Help display Help Resource href else I Status status new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH 1 IDE Workbench Messages get String Tips And Tricks Error Dialog no Href null NON NLS 1 Error Dialog open Error shell IDE Workbench Messages get String Tips And Tricks Error Dialog title NON NLS 1 IDE Workbench Messages get String Tips And Tricks Error Dialog no Href NON NLS 1 status else I Status status new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH 1 IDE Workbench Messages get String Tips And Tricks Error Dialog no Href null NON NLS 1 Error Dialog open Error shell IDE Workbench Messages get String Tips And Tricks Error Dialog title NON NLS 1 IDE Workbench Messages get String Tips And Tricks Error Dialog no Features NON NLS 1 status  workbenchWindow AboutInfo featureInfos IDEWorkbenchPlugin getDefault getFeatureInfos ArrayList tipsAndTricksFeatures ArrayList featureInfos featureInfos featureInfos getTipsAndTricksHref tipsAndTricksFeatures featureInfos workbenchWindow getShell tipsAndTricksFeatures MessageDialog openInformation IDEWorkbenchMessages getString TipsAndTricksMessageDialog IDEWorkbenchMessages getString TipsAndTricksMessageDialog AboutInfo AboutInfo tipsAndTricksFeatures tipsAndTricksFeatures toArray IProduct getProduct FeatureSelectionDialog FeatureSelectionDialog getId IDEWorkbenchMessages getString TipsAndTricksPageSelectionDialog IDEWorkbenchMessages getString TipsAndTricksPageSelectionDialog IHelpContextIds TIPS_AND_TRICKS_PAGE_SELECTION_DIALOG getResult AboutInfo AboutInfo getResult getTipsAndTricksHref BusyIndicator showWhile getDisplay WorkbenchHelp displayHelpResource IStatus IStatus IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchMessages getString TipsAndTricksErrorDialog noHref ErrorDialog openError IDEWorkbenchMessages getString TipsAndTricksErrorDialog IDEWorkbenchMessages getString TipsAndTricksErrorDialog noHref IStatus IStatus IDEWorkbenchPlugin IDE_WORKBENCH IDEWorkbenchMessages getString TipsAndTricksErrorDialog noHref ErrorDialog openError IDEWorkbenchMessages getString TipsAndTricksErrorDialog IDEWorkbenchMessages getString TipsAndTricksErrorDialog noFeatures
public void dispose if workbench Window null action has already been disposed return workbench Window get Part Service remove Part Listener this workbench Window null  workbenchWindow workbenchWindow getPartService removePartListener workbenchWindow

The constructor public Configuration Manager Action do nothing  ConfigurationManagerAction
Busy Indicator show While window get Shell get Display new Runnable public void run Update ManagerUI open Configuration Manager window get Shell  BusyIndicator showWhile getShell getDisplay UpdateManagerUI openConfigurationManager getShell
Runs the action when selected public void run I Action action Busy Indicator show While window get Shell get Display new Runnable public void run Update ManagerUI open Configuration Manager window get Shell  IAction BusyIndicator showWhile getShell getDisplay UpdateManagerUI openConfigurationManager getShell
public void selection Changed I Action action I Selection selection do nothing  selectionChanged IAction ISelection
see I Workbench Window Action Delegate dispose public void dispose do nothing  IWorkbenchWindowActionDelegate
see I Workbench Window Action Delegate init public void init I Workbench Window window this window window  IWorkbenchWindowActionDelegate IWorkbenchWindow

private I Workbench Window window public Install Wizard Action do nothing  IWorkbenchWindow InstallWizardAction
public void run open Installer PlatformUI get Workbench get Active Workbench Window  openInstaller getWorkbench getActiveWorkbenchWindow
public void run I Action action open Installer window  IAction openInstaller
Busy Indicator show While window get Shell get Display new Runnable public void run Update ManagerUI open Installer window get Shell  BusyIndicator showWhile getShell getDisplay UpdateManagerUI openInstaller getShell
private void open Installer final I Workbench Window window Busy Indicator show While window get Shell get Display new Runnable public void run Update ManagerUI open Installer window get Shell  openInstaller IWorkbenchWindow BusyIndicator showWhile getShell getDisplay UpdateManagerUI openInstaller getShell
public void selection Changed I Action action I Selection selection do nothing  selectionChanged IAction ISelection
public void dispose do nothing 
public void init I Workbench Window window this window window  IWorkbenchWindow

Constructs a new action builder which contributes actions to the given window param window the window public Workbench Action Builder I Workbench Window window this window window  WorkbenchActionBuilder IWorkbenchWindow
Returns the window to which this action builder is contributing private I Workbench Window get Window return window  IWorkbenchWindow getWindow
page Listener new I Page Listener public void page Activated I Workbench Page page enable Actions page get Perspective null  pageListener IPageListener pageActivated IWorkbenchPage enableActions getPerspective
enable Actions page get Perspective null public void page Closed I Workbench Page page I Workbench Page pg get Window get Active Page enable Actions pg null pg get Perspective null  enableActions getPerspective pageClosed IWorkbenchPage IWorkbenchPage getWindow getActivePage enableActions getPerspective
enable Actions pg null pg get Perspective null public void page Opened I Workbench Page page do nothing  enableActions getPerspective pageOpened IWorkbenchPage
perspective Listener new I Perspective Listener public void perspective Activated I Workbench Page page I Perspective Descriptor perspective enable Actions true  perspectiveListener IPerspectiveListener perspectiveActivated IWorkbenchPage IPerspectiveDescriptor enableActions
enable Actions true public void perspective Changed I Workbench Page page I Perspective Descriptor perspective String change Id do nothing  enableActions perspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId
this property change notification could be from a non ui thread window get Shell get Display sync Exec new Runnable public void run update Build Actions auto Build  getShell getDisplay syncExec updateBuildActions autoBuild
pref Listener new Preferences I Property Change Listener public void property Change Preferences Property Change Event event if event get Property equals Resources Plugin PREF AUTO BUILDING final boolean auto Build Resources Plugin get Workspace is Auto Building if window get Shell null window get Shell is Disposed this property change notification could be from a non ui thread window get Shell get Display sync Exec new Runnable public void run update Build Actions auto Build  prefListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty ResourcesPlugin PREF_AUTO_BUILDING autoBuild ResourcesPlugin getWorkspace isAutoBuilding getShell getShell isDisposed getShell getDisplay syncExec updateBuildActions autoBuild
this property change notification could be from a non ui thread window get Shell get Display sync Exec new Runnable public void run update Pin Action Toolbar  getShell getDisplay syncExec updatePinActionToolbar
prop Pref Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals I Preference Constants REUSE EDITORS BOOLEAN if window get Shell null window get Shell is Disposed this property change notification could be from a non ui thread window get Shell get Display sync Exec new Runnable public void run update Pin Action Toolbar  propPrefListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty IPreferenceConstants REUSE_EDITORS_BOOLEAN getShell getShell isDisposed getShell getDisplay syncExec updatePinActionToolbar
Hooks listeners on the preference store and the window s page perspective and selection services private void hook Listeners page Listener new I Page Listener public void page Activated I Workbench Page page enable Actions page get Perspective null public void page Closed I Workbench Page page I Workbench Page pg get Window get Active Page enable Actions pg null pg get Perspective null public void page Opened I Workbench Page page do nothing get Window add Page Listener page Listener perspective Listener new I Perspective Listener public void perspective Activated I Workbench Page page I Perspective Descriptor perspective enable Actions true public void perspective Changed I Workbench Page page I Perspective Descriptor perspective String change Id do nothing get Window add Perspective Listener perspective Listener pref Listener new Preferences I Property Change Listener public void property Change Preferences Property Change Event event if event get Property equals Resources Plugin PREF AUTO BUILDING final boolean auto Build Resources Plugin get Workspace is Auto Building if window get Shell null window get Shell is Disposed this property change notification could be from a non ui thread window get Shell get Display sync Exec new Runnable public void run update Build Actions auto Build Resources Plugin get Plugin get Plugin Preferences add Property Change Listener pref Listener listener for the close editors automatically preference change prop Pref Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals I Preference Constants REUSE EDITORS BOOLEAN if window get Shell null window get Shell is Disposed this property change notification could be from a non ui thread window get Shell get Display sync Exec new Runnable public void run update Pin Action Toolbar In order to ensure that the pin action toolbar sets its size correctly the pin action should set its visiblity before we call update Pin Action Toolbar In other words we always want the Pin Action Contribution Item to be notified before the Workbench Action Builder Workbench Plugin get Default get Preference Store add Property Change Listener prop Pref Listener  hookListeners pageListener IPageListener pageActivated IWorkbenchPage enableActions getPerspective pageClosed IWorkbenchPage IWorkbenchPage getWindow getActivePage enableActions getPerspective pageOpened IWorkbenchPage getWindow addPageListener pageListener perspectiveListener IPerspectiveListener perspectiveActivated IWorkbenchPage IPerspectiveDescriptor enableActions perspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId getWindow addPerspectiveListener perspectiveListener prefListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty ResourcesPlugin PREF_AUTO_BUILDING autoBuild ResourcesPlugin getWorkspace isAutoBuilding getShell getShell isDisposed getShell getDisplay syncExec updateBuildActions autoBuild ResourcesPlugin getPlugin getPluginPreferences addPropertyChangeListener prefListener propPrefListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty IPreferenceConstants REUSE_EDITORS_BOOLEAN getShell getShell isDisposed getShell getDisplay syncExec updatePinActionToolbar updatePinActionToolbar PinActionContributionItem WorkbenchActionBuilder WorkbenchPlugin getDefault getPreferenceStore addPropertyChangeListener propPrefListener
Enables the menu items dependent on an active page and perspective Note the show view action already does its own listening so no need to do it here private void enable Actions boolean value hide Show Editor Action set Enabled value save Perspective Action set Enabled value lock Tool Bar Action set Enabled value reset Perspective Action set Enabled value edit Action Set Action set Enabled value close Persp Action set Enabled value close All Persps Action set Enabled value new Wizard Menu set Enabled value new Wizard Drop Down Action set Enabled value Bug 53560 Ctrl N shouldn t work if the menus are all disabled new Wizard Action set Enabled value import Resources Action set Enabled value export Resources Action set Enabled value  enableActions hideShowEditorAction setEnabled savePerspectiveAction setEnabled lockToolBarAction setEnabled resetPerspectiveAction setEnabled editActionSetAction setEnabled closePerspAction setEnabled closeAllPerspsAction setEnabled newWizardMenu setEnabled newWizardDropDownAction setEnabled newWizardAction setEnabled importResourcesAction setEnabled exportResourcesAction setEnabled
Builds the actions and contributes them to the given window public void make And Populate Actions I Workbench Configurer window Configurer I Action Bar Configurer action Bar Configurer make Actions window Configurer action Bar Configurer populate Menu Bar action Bar Configurer populate Cool Bar action Bar Configurer update Build Actions Resources Plugin get Workspace is Auto Building populate Status Line action Bar Configurer hook Listeners  makeAndPopulateActions IWorkbenchConfigurer windowConfigurer IActionBarConfigurer actionBarConfigurer makeActions windowConfigurer actionBarConfigurer populateMenuBar actionBarConfigurer populateCoolBar actionBarConfigurer updateBuildActions ResourcesPlugin getWorkspace isAutoBuilding populateStatusLine actionBarConfigurer hookListeners
Fills the coolbar with the workbench actions public void populate Cool Bar I Action Bar Configurer configurer I Cool Bar Manager cb Manager configurer get Cool Bar Manager Set up the context Menu I Menu Manager pop Up Menu new Menu Manager pop Up Menu add new Action Contribution Item lock Tool Bar Action pop Up Menu add new Action Contribution Item edit Action Set Action cb Manager set Context Menu Manager pop Up Menu cb Manager add new Group Marker IIDE Action Constants GROUP FILE File Group I Tool Bar Manager file Tool Bar new Tool Bar Manager cb Manager get Style file Tool Bar add new Separator I Workbench Action Constants NEW GROUP file Tool Bar add new Wizard Drop Down Action file Tool Bar add new Group Marker I Workbench Action Constants NEW EXT file Tool Bar add new Group Marker I Workbench Action Constants SAVE GROUP file Tool Bar add save Action file Tool Bar add new Group Marker I Workbench Action Constants SAVE EXT file Tool Bar add print Action file Tool Bar add new Group Marker I Workbench Action Constants PRINT EXT file Tool Bar add new Separator I Workbench Action Constants BUILD GROUP file Tool Bar add new Group Marker I Workbench Action Constants BUILD EXT file Tool Bar add new Separator I Workbench Action Constants MB ADDITIONS Add to the cool bar manager cb Manager add new Tool Bar Contribution Item file Tool Bar I Workbench Action Constants TOOLBAR FILE cb Manager add new Group Marker I Workbench Action Constants MB ADDITIONS cb Manager add new Group Marker IIDE Action Constants GROUP NAV Navigate group I Tool Bar Manager nav Tool Bar new Tool Bar Manager cb Manager get Style nav Tool Bar add new Separator I Workbench Action Constants HISTORY GROUP nav Tool Bar add new Group Marker I Workbench Action Constants GROUP APP nav Tool Bar add backward History Action nav Tool Bar add forward History Action nav Tool Bar add new Separator I Workbench Action Constants PIN GROUP nav Tool Bar add pin Editor Contribution Item Add to the cool bar manager cb Manager add new Tool Bar Contribution Item nav Tool Bar I Workbench Action Constants TOOLBAR NAVIGATE cb Manager add new Group Marker I Workbench Action Constants GROUP EDITOR  populateCoolBar IActionBarConfigurer ICoolBarManager cbManager getCoolBarManager IMenuManager popUpMenu MenuManager popUpMenu ActionContributionItem lockToolBarAction popUpMenu ActionContributionItem editActionSetAction cbManager setContextMenuManager popUpMenu cbManager GroupMarker IIDEActionConstants GROUP_FILE IToolBarManager fileToolBar ToolBarManager cbManager getStyle fileToolBar IWorkbenchActionConstants NEW_GROUP fileToolBar newWizardDropDownAction fileToolBar GroupMarker IWorkbenchActionConstants NEW_EXT fileToolBar GroupMarker IWorkbenchActionConstants SAVE_GROUP fileToolBar saveAction fileToolBar GroupMarker IWorkbenchActionConstants SAVE_EXT fileToolBar printAction fileToolBar GroupMarker IWorkbenchActionConstants PRINT_EXT fileToolBar IWorkbenchActionConstants BUILD_GROUP fileToolBar GroupMarker IWorkbenchActionConstants BUILD_EXT fileToolBar IWorkbenchActionConstants MB_ADDITIONS cbManager ToolBarContributionItem fileToolBar IWorkbenchActionConstants TOOLBAR_FILE cbManager GroupMarker IWorkbenchActionConstants MB_ADDITIONS cbManager GroupMarker IIDEActionConstants GROUP_NAV IToolBarManager navToolBar ToolBarManager cbManager getStyle navToolBar IWorkbenchActionConstants HISTORY_GROUP navToolBar GroupMarker IWorkbenchActionConstants GROUP_APP navToolBar backwardHistoryAction navToolBar forwardHistoryAction navToolBar IWorkbenchActionConstants PIN_GROUP navToolBar pinEditorContributionItem cbManager ToolBarContributionItem navToolBar IWorkbenchActionConstants TOOLBAR_NAVIGATE cbManager GroupMarker IWorkbenchActionConstants GROUP_EDITOR
Fills the menu bar with the workbench actions public void populate Menu Bar I Action Bar Configurer configurer I Menu Manager menubar configurer get Menu Manager menubar add create File Menu menubar add create Edit Menu menubar add create Navigate Menu menubar add create Project Menu menubar add new Group Marker I Workbench Action Constants MB ADDITIONS menubar add create Window Menu menubar add create Help Menu  populateMenuBar IActionBarConfigurer IMenuManager getMenuManager createFileMenu createEditMenu createNavigateMenu createProjectMenu GroupMarker IWorkbenchActionConstants MB_ADDITIONS createWindowMenu createHelpMenu
Menu Manager new Menu new Menu Manager new Text new Id public String get Menu Text String result super get Menu Text if new Quick Menu null return result String short Cut new Quick Menu get Short Cut String if short Cut null return result return result t short Cut NON NLS 1  MenuManager newMenu MenuManager newText newId getMenuText getMenuText newQuickMenu shortCut newQuickMenu getShortCutString shortCut shortCut
Creates and returns the File menu private Menu Manager create File Menu Menu Manager menu new Menu Manager IDE Workbench Messages get String Workbench file I Workbench Action Constants M FILE NON NLS 1 menu add new Group Marker I Workbench Action Constants FILE START create the New submenu using the same id for it as the New action String new Text IDE Workbench Messages get String Workbench new NON NLS 1 String new Id Action Factory NEW get Id Menu Manager new Menu new Menu Manager new Text new Id public String get Menu Text String result super get Menu Text if new Quick Menu null return result String short Cut new Quick Menu get Short Cut String if short Cut null return result return result t short Cut NON NLS 1 new Menu add new Separator new Id this new Wizard Menu new New Wizard Menu get Window new Menu add this new Wizard Menu new Menu add new Separator I Workbench Action Constants MB ADDITIONS menu add new Menu menu add new Group Marker I Workbench Action Constants NEW EXT menu add new Separator menu add close Action menu add close All Action menu add close All Saved Action menu add new Group Marker I Workbench Action Constants CLOSE EXT menu add new Separator menu add save Action menu add save As Action menu add save All Action menu add revert Action menu add new Separator menu add move Action menu add rename Action menu add refresh Action menu add new Group Marker I Workbench Action Constants SAVE EXT menu add new Separator menu add print Action menu add new Group Marker I Workbench Action Constants PRINT EXT menu add new Separator menu add open Workspace Action menu add new Group Marker I Workbench Action Constants OPEN EXT menu add new Separator menu add import Resources Action menu add export Resources Action menu add new Group Marker I Workbench Action Constants IMPORT EXT menu add new Separator I Workbench Action Constants MB ADDITIONS menu add new Separator menu add properties Action menu add Contribution Item Factory REOPEN EDITORS create get Window menu add new Group Marker I Workbench Action Constants MRU menu add new Separator menu add quit Action menu add new Group Marker I Workbench Action Constants FILE END return menu  MenuManager createFileMenu MenuManager MenuManager IDEWorkbenchMessages getString IWorkbenchActionConstants M_FILE GroupMarker IWorkbenchActionConstants FILE_START newText IDEWorkbenchMessages getString newId ActionFactory getId MenuManager newMenu MenuManager newText newId getMenuText getMenuText newQuickMenu shortCut newQuickMenu getShortCutString shortCut shortCut newMenu newId newWizardMenu NewWizardMenu getWindow newMenu newWizardMenu newMenu IWorkbenchActionConstants MB_ADDITIONS newMenu GroupMarker IWorkbenchActionConstants NEW_EXT closeAction closeAllAction closeAllSavedAction GroupMarker IWorkbenchActionConstants CLOSE_EXT saveAction saveAsAction saveAllAction revertAction moveAction renameAction refreshAction GroupMarker IWorkbenchActionConstants SAVE_EXT printAction GroupMarker IWorkbenchActionConstants PRINT_EXT openWorkspaceAction GroupMarker IWorkbenchActionConstants OPEN_EXT importResourcesAction exportResourcesAction GroupMarker IWorkbenchActionConstants IMPORT_EXT IWorkbenchActionConstants MB_ADDITIONS propertiesAction ContributionItemFactory REOPEN_EDITORS getWindow GroupMarker IWorkbenchActionConstants quitAction GroupMarker IWorkbenchActionConstants FILE_END
Creates and returns the Edit menu private Menu Manager create Edit Menu Menu Manager menu new Menu Manager IDE Workbench Messages get String Workbench edit I Workbench Action Constants M EDIT NON NLS 1 menu add new Group Marker I Workbench Action Constants EDIT START menu add undo Action menu add redo Action menu add new Group Marker I Workbench Action Constants UNDO EXT menu add new Separator menu add cut Action menu add copy Action menu add paste Action menu add new Group Marker I Workbench Action Constants CUT EXT menu add new Separator menu add delete Action menu add select All Action menu add new Separator menu add find Action menu add new Group Marker I Workbench Action Constants FIND EXT menu add new Separator menu add add Bookmark Action menu add add Task Action menu add new Group Marker I Workbench Action Constants ADD EXT menu add new Group Marker I Workbench Action Constants EDIT END menu add new Separator I Workbench Action Constants MB ADDITIONS return menu  MenuManager createEditMenu MenuManager MenuManager IDEWorkbenchMessages getString IWorkbenchActionConstants M_EDIT GroupMarker IWorkbenchActionConstants EDIT_START undoAction redoAction GroupMarker IWorkbenchActionConstants UNDO_EXT cutAction copyAction pasteAction GroupMarker IWorkbenchActionConstants CUT_EXT deleteAction selectAllAction findAction GroupMarker IWorkbenchActionConstants FIND_EXT addBookmarkAction addTaskAction GroupMarker IWorkbenchActionConstants ADD_EXT GroupMarker IWorkbenchActionConstants EDIT_END IWorkbenchActionConstants MB_ADDITIONS
Menu Manager show In Sub Menu new Menu Manager IDE Workbench Messages get String Workbench show In show In NON NLS 1 NON NLS 2 public String get Menu Text String result super get Menu Text if show In Quick Menu null return null String short Cut show In Quick Menu get Short Cut String if short Cut null return result return result t short Cut NON NLS 1  MenuManager showInSubMenu MenuManager IDEWorkbenchMessages getString showIn showIn getMenuText getMenuText showInQuickMenu shortCut showInQuickMenu getShortCutString shortCut shortCut
Creates and returns the Navigate menu private Menu Manager create Navigate Menu Menu Manager menu new Menu Manager IDE Workbench Messages get String Workbench navigate I Workbench Action Constants M NAVIGATE NON NLS 1 menu add new Group Marker I Workbench Action Constants NAV START menu add go Into Action Menu Manager go To Sub Menu new Menu Manager IDE Workbench Messages get String Workbench go To I Workbench Action Constants GO TO NON NLS 1 menu add go To Sub Menu go To Sub Menu add back Action go To Sub Menu add forward Action go To Sub Menu add up Action go To Sub Menu add new Separator I Workbench Action Constants MB ADDITIONS menu add new Separator I Workbench Action Constants OPEN EXT for int i 2 i 5 i menu add new Separator I Workbench Action Constants OPEN EXT i menu add new Separator I Workbench Action Constants SHOW EXT Menu Manager show In Sub Menu new Menu Manager IDE Workbench Messages get String Workbench show In show In NON NLS 1 NON NLS 2 public String get Menu Text String result super get Menu Text if show In Quick Menu null return null String short Cut show In Quick Menu get Short Cut String if short Cut null return result return result t short Cut NON NLS 1 show In Sub Menu add Contribution Item Factory VIEWS SHOW IN create get Window menu add show In Sub Menu for int i 2 i 5 i menu add new Separator I Workbench Action Constants SHOW EXT i menu add new Separator menu add next Action menu add previous Action menu add new Separator I Workbench Action Constants MB ADDITIONS menu add new Group Marker I Workbench Action Constants NAV END TBD Location of this actions menu add new Separator menu add backward History Action menu add forward History Action return menu  MenuManager createNavigateMenu MenuManager MenuManager IDEWorkbenchMessages getString IWorkbenchActionConstants M_NAVIGATE GroupMarker IWorkbenchActionConstants NAV_START goIntoAction MenuManager goToSubMenu MenuManager IDEWorkbenchMessages getString goTo IWorkbenchActionConstants GO_TO goToSubMenu goToSubMenu backAction goToSubMenu forwardAction goToSubMenu upAction goToSubMenu IWorkbenchActionConstants MB_ADDITIONS IWorkbenchActionConstants OPEN_EXT IWorkbenchActionConstants OPEN_EXT IWorkbenchActionConstants SHOW_EXT MenuManager showInSubMenu MenuManager IDEWorkbenchMessages getString showIn showIn getMenuText getMenuText showInQuickMenu shortCut showInQuickMenu getShortCutString shortCut shortCut showInSubMenu ContributionItemFactory VIEWS_SHOW_IN getWindow showInSubMenu IWorkbenchActionConstants SHOW_EXT nextAction previousAction IWorkbenchActionConstants MB_ADDITIONS GroupMarker IWorkbenchActionConstants NAV_END backwardHistoryAction forwardHistoryAction
Creates and returns the Project menu private Menu Manager create Project Menu Menu Manager menu new Menu Manager IDE Workbench Messages get String Workbench project I Workbench Action Constants M PROJECT NON NLS 1 menu add new Separator I Workbench Action Constants PROJ START menu add open Project Action menu add close Project Action menu add new Group Marker I Workbench Action Constants OPEN EXT menu add new Separator menu add build All Action menu add build Project Action add Working Set Build Actions menu menu add clean Action menu add toggle Auto Build Action menu add new Group Marker I Workbench Action Constants BUILD EXT menu add new Separator menu add new Group Marker I Workbench Action Constants MB ADDITIONS menu add new Group Marker I Workbench Action Constants PROJ END menu add new Separator menu add project Property Dialog Action return menu  MenuManager createProjectMenu MenuManager MenuManager IDEWorkbenchMessages getString IWorkbenchActionConstants M_PROJECT IWorkbenchActionConstants PROJ_START openProjectAction closeProjectAction GroupMarker IWorkbenchActionConstants OPEN_EXT buildAllAction buildProjectAction addWorkingSetBuildActions cleanAction toggleAutoBuildAction GroupMarker IWorkbenchActionConstants BUILD_EXT GroupMarker IWorkbenchActionConstants MB_ADDITIONS GroupMarker IWorkbenchActionConstants PROJ_END projectPropertyDialogAction
Creates and returns the Window menu private Menu Manager create Window Menu Menu Manager menu new Menu Manager IDE Workbench Messages get String Workbench window I Workbench Action Constants M WINDOW NON NLS 1 I Workbench Action action Action Factory OPEN NEW WINDOW create get Window action set Text IDE Workbench Messages get String Workbench open New Window NON NLS 1 menu add action menu add new Separator add Perspective Actions menu menu add new Separator add Keyboard Shortcuts menu menu add new Separator I Workbench Action Constants MB ADDITIONS menu add new Separator I Workbench Action Constants MB ADDITIONS end NON NLS 1 menu add open Preferences Action menu add Contribution Item Factory OPEN WINDOWS create get Window return menu  MenuManager createWindowMenu MenuManager MenuManager IDEWorkbenchMessages getString IWorkbenchActionConstants M_WINDOW IWorkbenchAction ActionFactory OPEN_NEW_WINDOW getWindow setText IDEWorkbenchMessages getString openNewWindow addPerspectiveActions addKeyboardShortcuts IWorkbenchActionConstants MB_ADDITIONS IWorkbenchActionConstants MB_ADDITIONS openPreferencesAction ContributionItemFactory OPEN_WINDOWS getWindow
Adds the perspective actions to the specified menu private void add Perspective Actions Menu Manager menu String open Text IDE Workbench Messages get String Workbench open Perspective NON NLS 1 Menu Manager change Persp Menu Mgr new Menu Manager open Text open Perspective NON NLS 1 I Contribution Item change Persp Menu Item Contribution Item Factory PERSPECTIVES SHORTLIST create get Window change Persp Menu Mgr add change Persp Menu Item menu add change Persp Menu Mgr Menu Manager show View Menu Mgr new Menu Manager IDE Workbench Messages get String Workbench show View show View NON NLS 1 NON NLS 2 I Contribution Item show View Menu Contribution Item Factory VIEWS SHORTLIST create get Window show View Menu Mgr add show View Menu menu add show View Menu Mgr menu add new Separator menu add edit Action Set Action menu add save Perspective Action menu add reset Perspective Action menu add close Persp Action menu add close All Persps Action  addPerspectiveActions MenuManager openText IDEWorkbenchMessages getString openPerspective MenuManager changePerspMenuMgr MenuManager openText openPerspective IContributionItem changePerspMenuItem ContributionItemFactory PERSPECTIVES_SHORTLIST getWindow changePerspMenuMgr changePerspMenuItem changePerspMenuMgr MenuManager showViewMenuMgr MenuManager IDEWorkbenchMessages getString showView showView IContributionItem showViewMenu ContributionItemFactory VIEWS_SHORTLIST getWindow showViewMenuMgr showViewMenu showViewMenuMgr editActionSetAction savePerspectiveAction resetPerspectiveAction closePerspAction closeAllPerspsAction
Adds the keyboard navigation submenu to the specified menu private void add Working Set Build Actions Menu Manager menu build Working Set Menu new Menu Manager IDE Workbench Messages get String Workbench build Set NON NLS 1 I Contribution Item working Set Builds new Build Set Menu window action Bar Configurer build Working Set Menu add working Set Builds menu add build Working Set Menu  addWorkingSetBuildActions MenuManager buildWorkingSetMenu MenuManager IDEWorkbenchMessages getString buildSet IContributionItem workingSetBuilds BuildSetMenu actionBarConfigurer buildWorkingSetMenu workingSetBuilds buildWorkingSetMenu
Adds the keyboard navigation submenu to the specified menu private void add Keyboard Shortcuts Menu Manager menu Menu Manager sub Menu new Menu Manager IDE Workbench Messages get String Workbench shortcuts shortcuts NON NLS 1 NON NLS 2 menu add sub Menu sub Menu add show Part Pane Menu Action sub Menu add show View Menu Action sub Menu add new Separator sub Menu add maximize Part Action sub Menu add new Separator sub Menu add activate Editor Action sub Menu add next Editor Action sub Menu add prev Editor Action sub Menu add workbook Editors Action sub Menu add new Separator sub Menu add next Part Action sub Menu add prev Part Action sub Menu add new Separator sub Menu add next Perspective Action sub Menu add prev Perspective Action  addKeyboardShortcuts MenuManager MenuManager subMenu MenuManager IDEWorkbenchMessages getString subMenu subMenu showPartPaneMenuAction subMenu showViewMenuAction subMenu subMenu maximizePartAction subMenu subMenu activateEditorAction subMenu nextEditorAction subMenu prevEditorAction subMenu workbookEditorsAction subMenu subMenu nextPartAction subMenu prevPartAction subMenu subMenu nextPerspectiveAction subMenu prevPerspectiveAction
Creates and returns the Help menu private Menu Manager create Help Menu Menu Manager menu new Menu Manager IDE Workbench Messages get String Workbench help I Workbench Action Constants M HELP NON NLS 1 See if a welcome or intro page is specified if intro Action null menu add intro Action else if quick Start Action null menu add quick Start Action menu add help Contents Action See if a tips and tricks page is specified if tips And Tricks Action null menu add tips And Tricks Action menu add new Group Marker I Workbench Action Constants HELP START menu add new Group Marker I Workbench Action Constants HELP END menu add new Group Marker I Workbench Action Constants MB ADDITIONS about should always be at the bottom menu add new Separator menu add about Action final I Mutable Context Activation Service context Activation ServiceA Context Activation Service Factory get Mutable Context Activation Service context Activation ServiceA set Active Context Ids new Hash Set Collections singleton List A final I Mutable Context Activation Service context Activation ServiceB Context Activation Service Factory get Mutable Context Activation Service context Activation ServiceB set Active Context Ids new Hash Set Collections singleton List B menu add new Separator menu add new Action Add context A to the workbench public void run I Workbench workbench PlatformUI get Workbench I Workbench Context Support workbench Context Support I Workbench Context Support workbench get Context Support workbench Context Support get Compound Context Activation Service add Context Activation Service context Activation ServiceA menu add new Action Remove context A from the workbench public void run I Workbench workbench PlatformUI get Workbench I Workbench Context Support workbench Context Support I Workbench Context Support workbench get Context Support workbench Context Support get Compound Context Activation Service remove Context Activation Service context Activation ServiceA menu add new Action Add context B to the workbench public void run I Workbench workbench PlatformUI get Workbench I Workbench Context Support workbench Context Support I Workbench Context Support workbench get Context Support workbench Context Support get Compound Context Activation Service add Context Activation Service context Activation ServiceB menu add new Action Remove context B from the workbench public void run I Workbench workbench PlatformUI get Workbench I Workbench Context Support workbench Context Support I Workbench Context Support workbench get Context Support workbench Context Support get Compound Context Activation Service remove Context Activation Service context Activation ServiceB menu add new Separator menu add new Action Add context A to the workbench page public void run I Workbench workbench PlatformUI get Workbench I Workbench Window workbench Window workbench get Active Workbench Window if workbench Window null I Workbench Page workbench Page workbench Window get Active Page if workbench Page null I Workbench Page Context Support workbench Page Context Support I Workbench Page Context Support workbench Page get Context Support workbench Page Context Support get Compound Context Activation Service add Context Activation Service context Activation ServiceA menu add new Action Remove context A from the workbench page public void run I Workbench workbench PlatformUI get Workbench I Workbench Window workbench Window workbench get Active Workbench Window if workbench Window null I Workbench Page workbench Page workbench Window get Active Page if workbench Page null I Workbench Page Context Support workbench Page Context Support I Workbench Page Context Support workbench Page get Context Support workbench Page Context Support get Compound Context Activation Service remove Context Activation Service context Activation ServiceA menu add new Action Add context B to the workbench page public void run I Workbench workbench PlatformUI get Workbench I Workbench Window workbench Window workbench get Active Workbench Window if workbench Window null I Workbench Page workbench Page workbench Window get Active Page if workbench Page null I Workbench Page Context Support workbench Page Context Support I Workbench Page Context Support workbench Page get Context Support workbench Page Context Support get Compound Context Activation Service add Context Activation Service context Activation ServiceB menu add new Action Remove context B from the workbench page public void run I Workbench workbench PlatformUI get Workbench I Workbench Window workbench Window workbench get Active Workbench Window if workbench Window null I Workbench Page workbench Page workbench Window get Active Page if workbench Page null I Workbench Page Context Support workbench Page Context Support I Workbench Page Context Support workbench Page get Context Support workbench Page Context Support get Compound Context Activation Service remove Context Activation Service context Activation ServiceB I Handler handlerA new I Handler public void execute public void execute Event event public boolean is Enabled return false I Handler handlerB new I Handler public void execute public void execute Event event public boolean is Enabled return false final I Mutable Command Handler Service command Handler ServiceA Command Handler Service Factory get Mutable Command Handler Service command Handler ServiceA set Handlers By Command Id new Hash Map Collections singleton Map command handlerA final I Mutable Command Handler Service command Handler ServiceB Command Handler Service Factory get Mutable Command Handler Service command Handler ServiceB set Handlers By Command Id new Hash Map Collections singleton Map command handlerB menu add new Separator menu add new Action Add handler A to the workbench public void run I Workbench workbench PlatformUI get Workbench I Workbench Command Support workbench Command Support I Workbench Command Support workbench get Command Support workbench Command Support get Compound Command Handler Service add Command Handler Service command Handler ServiceA menu add new Action Remove handler A from the workbench public void run I Workbench workbench PlatformUI get Workbench I Workbench Command Support workbench Command Support I Workbench Command Support workbench get Command Support workbench Command Support get Compound Command Handler Service remove Command Handler Service command Handler ServiceA menu add new Action Add handler B to the workbench public void run I Workbench workbench PlatformUI get Workbench I Workbench Command Support workbench Command Support I Workbench Command Support workbench get Command Support workbench Command Support get Compound Command Handler Service add Command Handler Service command Handler ServiceB menu add new Action Remove handler B from the workbench public void run I Workbench workbench PlatformUI get Workbench I Workbench Command Support workbench Command Support I Workbench Command Support workbench get Command Support workbench Command Support get Compound Command Handler Service remove Command Handler Service command Handler ServiceB menu add new Separator menu add new Action Add handler A to the workbench page public void run I Workbench workbench PlatformUI get Workbench I Workbench Window workbench Window workbench get Active Workbench Window if workbench Window null I Workbench Page workbench Page workbench Window get Active Page if workbench Page null I Workbench Page Command Support workbench Page Command Support I Workbench Page Command Support workbench Page get Command Support workbench Page Command Support get Compound Command Handler Service add Command Handler Service command Handler ServiceA menu add new Action Remove handler A from the workbench page public void run I Workbench workbench PlatformUI get Workbench I Workbench Window workbench Window workbench get Active Workbench Window if workbench Window null I Workbench Page workbench Page workbench Window get Active Page if workbench Page null I Workbench Page Command Support workbench Page Command Support I Workbench Page Command Support workbench Page get Command Support workbench Page Command Support get Compound Command Handler Service remove Command Handler Service command Handler ServiceA menu add new Action Add handler B to the workbench page public void run I Workbench workbench PlatformUI get Workbench I Workbench Window workbench Window workbench get Active Workbench Window if workbench Window null I Workbench Page workbench Page workbench Window get Active Page if workbench Page null I Workbench Page Command Support workbench Page Command Support I Workbench Page Command Support workbench Page get Command Support workbench Page Command Support get Compound Command Handler Service add Command Handler Service command Handler ServiceB menu add new Action Remove handler B from the workbench page public void run I Workbench workbench PlatformUI get Workbench I Workbench Window workbench Window workbench get Active Workbench Window if workbench Window null I Workbench Page workbench Page workbench Window get Active Page if workbench Page null I Workbench Page Command Support workbench Page Command Support I Workbench Page Command Support workbench Page get Command Support workbench Page Command Support get Compound Command Handler Service remove Command Handler Service command Handler ServiceB return menu  MenuManager createHelpMenu MenuManager MenuManager IDEWorkbenchMessages getString IWorkbenchActionConstants M_HELP introAction introAction quickStartAction quickStartAction helpContentsAction tipsAndTricksAction tipsAndTricksAction GroupMarker IWorkbenchActionConstants HELP_START GroupMarker IWorkbenchActionConstants HELP_END GroupMarker IWorkbenchActionConstants MB_ADDITIONS aboutAction IMutableContextActivationService contextActivationServiceA ContextActivationServiceFactory getMutableContextActivationService contextActivationServiceA setActiveContextIds HashSet singletonList IMutableContextActivationService contextActivationServiceB ContextActivationServiceFactory getMutableContextActivationService contextActivationServiceB setActiveContextIds HashSet singletonList IWorkbench getWorkbench IWorkbenchContextSupport workbenchContextSupport IWorkbenchContextSupport getContextSupport workbenchContextSupport getCompoundContextActivationService addContextActivationService contextActivationServiceA IWorkbench getWorkbench IWorkbenchContextSupport workbenchContextSupport IWorkbenchContextSupport getContextSupport workbenchContextSupport getCompoundContextActivationService removeContextActivationService contextActivationServiceA IWorkbench getWorkbench IWorkbenchContextSupport workbenchContextSupport IWorkbenchContextSupport getContextSupport workbenchContextSupport getCompoundContextActivationService addContextActivationService contextActivationServiceB IWorkbench getWorkbench IWorkbenchContextSupport workbenchContextSupport IWorkbenchContextSupport getContextSupport workbenchContextSupport getCompoundContextActivationService removeContextActivationService contextActivationServiceB IWorkbench getWorkbench IWorkbenchWindow workbenchWindow getActiveWorkbenchWindow workbenchWindow IWorkbenchPage workbenchPage workbenchWindow getActivePage workbenchPage IWorkbenchPageContextSupport workbenchPageContextSupport IWorkbenchPageContextSupport workbenchPage getContextSupport workbenchPageContextSupport getCompoundContextActivationService addContextActivationService contextActivationServiceA IWorkbench getWorkbench IWorkbenchWindow workbenchWindow getActiveWorkbenchWindow workbenchWindow IWorkbenchPage workbenchPage workbenchWindow getActivePage workbenchPage IWorkbenchPageContextSupport workbenchPageContextSupport IWorkbenchPageContextSupport workbenchPage getContextSupport workbenchPageContextSupport getCompoundContextActivationService removeContextActivationService contextActivationServiceA IWorkbench getWorkbench IWorkbenchWindow workbenchWindow getActiveWorkbenchWindow workbenchWindow IWorkbenchPage workbenchPage workbenchWindow getActivePage workbenchPage IWorkbenchPageContextSupport workbenchPageContextSupport IWorkbenchPageContextSupport workbenchPage getContextSupport workbenchPageContextSupport getCompoundContextActivationService addContextActivationService contextActivationServiceB IWorkbench getWorkbench IWorkbenchWindow workbenchWindow getActiveWorkbenchWindow workbenchWindow IWorkbenchPage workbenchPage workbenchWindow getActivePage workbenchPage IWorkbenchPageContextSupport workbenchPageContextSupport IWorkbenchPageContextSupport workbenchPage getContextSupport workbenchPageContextSupport getCompoundContextActivationService removeContextActivationService contextActivationServiceB IHandler IHandler isEnabled IHandler IHandler isEnabled IMutableCommandHandlerService commandHandlerServiceA CommandHandlerServiceFactory getMutableCommandHandlerService commandHandlerServiceA setHandlersByCommandId HashMap singletonMap IMutableCommandHandlerService commandHandlerServiceB CommandHandlerServiceFactory getMutableCommandHandlerService commandHandlerServiceB setHandlersByCommandId HashMap singletonMap IWorkbench getWorkbench IWorkbenchCommandSupport workbenchCommandSupport IWorkbenchCommandSupport getCommandSupport workbenchCommandSupport getCompoundCommandHandlerService addCommandHandlerService commandHandlerServiceA IWorkbench getWorkbench IWorkbenchCommandSupport workbenchCommandSupport IWorkbenchCommandSupport getCommandSupport workbenchCommandSupport getCompoundCommandHandlerService removeCommandHandlerService commandHandlerServiceA IWorkbench getWorkbench IWorkbenchCommandSupport workbenchCommandSupport IWorkbenchCommandSupport getCommandSupport workbenchCommandSupport getCompoundCommandHandlerService addCommandHandlerService commandHandlerServiceB IWorkbench getWorkbench IWorkbenchCommandSupport workbenchCommandSupport IWorkbenchCommandSupport getCommandSupport workbenchCommandSupport getCompoundCommandHandlerService removeCommandHandlerService commandHandlerServiceB IWorkbench getWorkbench IWorkbenchWindow workbenchWindow getActiveWorkbenchWindow workbenchWindow IWorkbenchPage workbenchPage workbenchWindow getActivePage workbenchPage IWorkbenchPageCommandSupport workbenchPageCommandSupport IWorkbenchPageCommandSupport workbenchPage getCommandSupport workbenchPageCommandSupport getCompoundCommandHandlerService addCommandHandlerService commandHandlerServiceA IWorkbench getWorkbench IWorkbenchWindow workbenchWindow getActiveWorkbenchWindow workbenchWindow IWorkbenchPage workbenchPage workbenchWindow getActivePage workbenchPage IWorkbenchPageCommandSupport workbenchPageCommandSupport IWorkbenchPageCommandSupport workbenchPage getCommandSupport workbenchPageCommandSupport getCompoundCommandHandlerService removeCommandHandlerService commandHandlerServiceA IWorkbench getWorkbench IWorkbenchWindow workbenchWindow getActiveWorkbenchWindow workbenchWindow IWorkbenchPage workbenchPage workbenchWindow getActivePage workbenchPage IWorkbenchPageCommandSupport workbenchPageCommandSupport IWorkbenchPageCommandSupport workbenchPage getCommandSupport workbenchPageCommandSupport getCompoundCommandHandlerService addCommandHandlerService commandHandlerServiceB IWorkbench getWorkbench IWorkbenchWindow workbenchWindow getActiveWorkbenchWindow workbenchWindow IWorkbenchPage workbenchPage workbenchWindow getActivePage workbenchPage IWorkbenchPageCommandSupport workbenchPageCommandSupport IWorkbenchPageCommandSupport workbenchPage getCommandSupport workbenchPageCommandSupport getCompoundCommandHandlerService removeCommandHandlerService commandHandlerServiceB
Disposes any resources and unhooks any listeners that are no longer needed Called when the window is closed public void dispose action Bar Configurer get Status Line Manager remove status Line Item if page Listener null window remove Page Listener page Listener page Listener null if perspective Listener null window remove Perspective Listener perspective Listener perspective Listener null if pref Listener null Resources Plugin get Plugin get Plugin Preferences remove Property Change Listener pref Listener pref Listener null if prop Pref Listener null Workbench Plugin get Default get Preference Store remove Property Change Listener prop Pref Listener prop Pref Listener null close Action dispose close All Action dispose close All Saved Action dispose save Action dispose save All Action dispose about Action dispose open Preferences Action dispose save As Action dispose hide Show Editor Action dispose save Perspective Action dispose reset Perspective Action dispose edit Action Set Action dispose close Persp Action dispose lock Tool Bar Action dispose close All Persps Action dispose show View Menu Action dispose show Part Pane Menu Action dispose next Part Action dispose prev Part Action dispose next Editor Action dispose prev Editor Action dispose next Perspective Action dispose prev Perspective Action dispose activate Editor Action dispose maximize Part Action dispose workbench Editors Action dispose workbook Editors Action dispose backward History Action dispose forward History Action dispose undo Action dispose redo Action dispose cut Action dispose copy Action dispose paste Action dispose delete Action dispose select All Action dispose find Action dispose print Action dispose revert Action dispose refresh Action dispose properties Action dispose quit Action dispose move Action dispose rename Action dispose go Into Action dispose back Action dispose forward Action dispose up Action dispose next Action dispose previous Action dispose editors Drop Down Action is not currently an I Workbench Action editors Drop Down Action dispose open Workspace Action dispose project Property Dialog Action dispose new Wizard Action dispose new Wizard Drop Down Action dispose import Resources Action dispose export Resources Action dispose clean Action dispose toggle Auto Build Action dispose build All Action dispose if quick Start Action null quick Start Action dispose if tips And Tricks Action null tips And Tricks Action dispose add Bookmark Action dispose add Task Action dispose build Project Action dispose open Project Action dispose close Project Action dispose pin Editor Contribution Item dispose if intro Action null intro Action dispose show In Quick Menu dispose new Quick Menu dispose null out actions to make leak debugging easier close Action null close All Action null close All Saved Action null save Action null save All Action null help Contents Action null about Action null open Preferences Action null save As Action null hide Show Editor Action null save Perspective Action null reset Perspective Action null edit Action Set Action null close Persp Action null lock Tool Bar Action null close All Persps Action null show View Menu Action null show Part Pane Menu Action null next Part Action null prev Part Action null next Editor Action null prev Editor Action null next Perspective Action null prev Perspective Action null activate Editor Action null maximize Part Action null workbench Editors Action null workbook Editors Action null backward History Action null forward History Action null undo Action null redo Action null cut Action null copy Action null paste Action null delete Action null select All Action null find Action null print Action null revert Action null refresh Action null properties Action null quit Action null move Action null rename Action null go Into Action null back Action null forward Action null up Action null next Action null previous Action null open Workspace Action null project Property Dialog Action null new Wizard Action null new Wizard Drop Down Action null import Resources Action null export Resources Action null build All Action null clean Action null toggle Auto Build Action null build Working Set Menu null quick Start Action null tips And Tricks Action null show In Quick Menu null new Quick Menu null add Bookmark Action null add Task Action null build Project Action null open Project Action null close Project Action null new Wizard Menu null pin Editor Contribution Item null status Line Item null pref Listener null prop Pref Listener null intro Action null  actionBarConfigurer getStatusLineManager statusLineItem pageListener removePageListener pageListener pageListener perspectiveListener removePerspectiveListener perspectiveListener perspectiveListener prefListener ResourcesPlugin getPlugin getPluginPreferences removePropertyChangeListener prefListener prefListener propPrefListener WorkbenchPlugin getDefault getPreferenceStore removePropertyChangeListener propPrefListener propPrefListener closeAction closeAllAction closeAllSavedAction saveAction saveAllAction aboutAction openPreferencesAction saveAsAction hideShowEditorAction savePerspectiveAction resetPerspectiveAction editActionSetAction closePerspAction lockToolBarAction closeAllPerspsAction showViewMenuAction showPartPaneMenuAction nextPartAction prevPartAction nextEditorAction prevEditorAction nextPerspectiveAction prevPerspectiveAction activateEditorAction maximizePartAction workbenchEditorsAction workbookEditorsAction backwardHistoryAction forwardHistoryAction undoAction redoAction cutAction copyAction pasteAction deleteAction selectAllAction findAction printAction revertAction refreshAction propertiesAction quitAction moveAction renameAction goIntoAction backAction forwardAction upAction nextAction previousAction editorsDropDownAction IWorkbenchAction editorsDropDownAction openWorkspaceAction projectPropertyDialogAction newWizardAction newWizardDropDownAction importResourcesAction exportResourcesAction cleanAction toggleAutoBuildAction buildAllAction quickStartAction quickStartAction tipsAndTricksAction tipsAndTricksAction addBookmarkAction addTaskAction buildProjectAction openProjectAction closeProjectAction pinEditorContributionItem introAction introAction showInQuickMenu newQuickMenu closeAction closeAllAction closeAllSavedAction saveAction saveAllAction helpContentsAction aboutAction openPreferencesAction saveAsAction hideShowEditorAction savePerspectiveAction resetPerspectiveAction editActionSetAction closePerspAction lockToolBarAction closeAllPerspsAction showViewMenuAction showPartPaneMenuAction nextPartAction prevPartAction nextEditorAction prevEditorAction nextPerspectiveAction prevPerspectiveAction activateEditorAction maximizePartAction workbenchEditorsAction workbookEditorsAction backwardHistoryAction forwardHistoryAction undoAction redoAction cutAction copyAction pasteAction deleteAction selectAllAction findAction printAction revertAction refreshAction propertiesAction quitAction moveAction renameAction goIntoAction backAction forwardAction upAction nextAction previousAction openWorkspaceAction projectPropertyDialogAction newWizardAction newWizardDropDownAction importResourcesAction exportResourcesAction buildAllAction cleanAction toggleAutoBuildAction buildWorkingSetMenu quickStartAction tipsAndTricksAction showInQuickMenu newQuickMenu addBookmarkAction addTaskAction buildProjectAction openProjectAction closeProjectAction newWizardMenu pinEditorContributionItem statusLineItem prefListener propPrefListener introAction
void update Mode Line final String text status Line Item set Text text  updateModeLine statusLineItem setText
Returns true if the menu with the given ID should be considered as an OLE container menu Container menus are preserved in OLE menu merging public boolean is Container Menu String menu Id if menu Id equals I Workbench Action Constants M FILE return true if menu Id equals I Workbench Action Constants M WINDOW return true return false  isContainerMenu menuId menuId IWorkbenchActionConstants M_FILE menuId IWorkbenchActionConstants M_WINDOW
Return whether or not given id matches the id of the coolitems that the workbench creates public boolean is Workbench Cool Item Id String id if I Workbench Action Constants TOOLBAR FILE equals Ignore Case id return true if I Workbench Action Constants TOOLBAR NAVIGATE equals Ignore Case id return true return false  isWorkbenchCoolItemId IWorkbenchActionConstants TOOLBAR_FILE equalsIgnoreCase IWorkbenchActionConstants TOOLBAR_NAVIGATE equalsIgnoreCase
Fills the status line with the workbench contribution items public void populate Status Line I Action Bar Configurer configurer I Status Line Manager status Line configurer get Status Line Manager status Line add status Line Item  populateStatusLine IActionBarConfigurer IStatusLineManager statusLine getStatusLineManager statusLine statusLineItem
final String show In Quick Menu Id org eclipse ui navigate show In Quick Menu NON NLS 1 show In Quick Menu new Quick Menu Action show In Quick Menu Id protected void fill Menu I Menu Manager menu menu add Contribution Item Factory VIEWS SHOW IN create get Window  showInQuickMenuId showInQuickMenu showInQuickMenu QuickMenuAction showInQuickMenuId fillMenu IMenuManager ContributionItemFactory VIEWS_SHOW_IN getWindow
final String new Quick Menu Id org eclipse ui file new Quick Menu NON NLS 1 new Quick Menu new Quick Menu Action new Quick Menu Id protected void fill Menu I Menu Manager menu menu add new New Wizard Menu get Window  newQuickMenuId newQuickMenu newQuickMenu QuickMenuAction newQuickMenuId fillMenu IMenuManager NewWizardMenu getWindow
Creates actions and contribution items for the menu bar toolbar and status line private void make Actions I Workbench Configurer workbench Configurer I Action Bar Configurer action Bar Configurer The actions in jface do not have menu vs enable vs disable vs color There are actions in here being passed the workbench problem set Current Action Bar Configurer action Bar Configurer issue should obtain from Configuration Item Factory status Line Item new Status Line Contribution Item Mode Contribution Item NON NLS 1 new Wizard Action Action Factory NEW create get Window register Global Action new Wizard Action new Wizard Drop Down Action IDE Action Factory NEW WIZARD DROP DOWN create get Window import Resources Action Action Factory IMPORT create get Window register Global Action import Resources Action export Resources Action Action Factory EXPORT create get Window register Global Action export Resources Action build All Action IDE Action Factory BUILD create get Window register Global Action build All Action clean Action IDE Action Factory BUILD CLEAN create get Window register Global Action clean Action toggle Auto Build Action IDE Action Factory BUILD AUTOMATICALLY create get Window register Global Action toggle Auto Build Action save Action Action Factory SAVE create get Window register Global Action save Action save As Action Action Factory SAVE AS create get Window register Global Action save As Action save All Action Action Factory SAVE ALL create get Window register Global Action save All Action undo Action Action Factory UNDO create get Window register Global Action undo Action redo Action Action Factory REDO create get Window register Global Action redo Action cut Action Action Factory CUT create get Window register Global Action cut Action copy Action Action Factory COPY create get Window register Global Action copy Action paste Action Action Factory PASTE create get Window register Global Action paste Action print Action Action Factory PRINT create get Window register Global Action print Action select All Action Action Factory SELECT ALL create get Window register Global Action select All Action find Action Action Factory FIND create get Window register Global Action find Action close Action Action Factory CLOSE create get Window register Global Action close Action close All Action Action Factory CLOSE ALL create get Window register Global Action close All Action close All Saved Action Action Factory CLOSE ALL SAVED create get Window register Global Action close All Saved Action help Contents Action Action Factory HELP CONTENTS create get Window register Global Action help Contents Action about Action Action Factory ABOUT create get Window about Action set Image Descriptor IDE Internal Workbench Images get Image Descriptor IDE Internal Workbench Images IMG OBJS DEFAULT PROD register Global Action about Action open Preferences Action Action Factory PREFERENCES create get Window register Global Action open Preferences Action add Bookmark Action IDE Action Factory BOOKMARK create get Window register Global Action add Bookmark Action add Task Action IDE Action Factory ADD TASK create get Window register Global Action add Task Action delete Action Action Factory DELETE create get Window register Global Action delete Action About Info infos IDE Workbench Plugin get Default get Feature Infos See if a welcome page is specified for int i 0 i infos length i if infos i get Welcome PageURL null quick Start Action IDE Action Factory QUICK START create get Window register Global Action quick Start Action break See if a tips and tricks page is specified for int i 0 i infos length i if infos i get Tips And Tricks Href null tips And Tricks Action IDE Action Factory TIPS AND TRICKS create get Window register Global Action tips And Tricks Action break Actions for invisible accelerators show View Menu Action Action Factory SHOW VIEW MENU create get Window register Global Action show View Menu Action show Part Pane Menu Action Action Factory SHOW PART PANE MENU create get Window register Global Action show Part Pane Menu Action next Editor Action Action Factory NEXT EDITOR create get Window prev Editor Action Action Factory PREVIOUS EDITOR create get Window Action Factory link Cycle Action Pair next Editor Action prev Editor Action register Global Action next Editor Action register Global Action prev Editor Action next Part Action Action Factory NEXT PART create get Window prev Part Action Action Factory PREVIOUS PART create get Window Action Factory link Cycle Action Pair next Part Action prev Part Action register Global Action next Part Action register Global Action prev Part Action next Perspective Action Action Factory NEXT PERSPECTIVE create get Window prev Perspective Action Action Factory PREVIOUS PERSPECTIVE create get Window Action Factory link Cycle Action Pair next Perspective Action prev Perspective Action register Global Action next Perspective Action register Global Action prev Perspective Action activate Editor Action Action Factory ACTIVATE EDITOR create get Window register Global Action activate Editor Action maximize Part Action Action Factory MAXIMIZE create get Window register Global Action maximize Part Action workbench Editors Action Action Factory SHOW OPEN EDITORS create get Window register Global Action workbench Editors Action workbook Editors Action Action Factory SHOW WORKBOOK EDITORS create get Window register Global Action workbook Editors Action hide Show Editor Action Action Factory SHOW EDITOR create get Window register Global Action hide Show Editor Action save Perspective Action Action Factory SAVE PERSPECTIVE create get Window register Global Action save Perspective Action edit Action Set Action Action Factory EDIT ACTION SETS create get Window register Global Action edit Action Set Action lock Tool Bar Action Action Factory LOCK TOOL BAR create get Window register Global Action lock Tool Bar Action reset Perspective Action Action Factory RESET PERSPECTIVE create get Window register Global Action reset Perspective Action close Persp Action Action Factory CLOSE PERSPECTIVE create get Window register Global Action close Persp Action close All Persps Action Action Factory CLOSE ALL PERSPECTIVES create get Window register Global Action close All Persps Action forward History Action Action Factory FORWARD HISTORY create get Window register Global Action forward History Action backward History Action Action Factory BACKWARD HISTORY create get Window register Global Action backward History Action revert Action Action Factory REVERT create get Window register Global Action revert Action refresh Action Action Factory REFRESH create get Window register Global Action refresh Action properties Action Action Factory PROPERTIES create get Window register Global Action properties Action quit Action Action Factory QUIT create get Window register Global Action quit Action move Action Action Factory MOVE create get Window register Global Action move Action rename Action Action Factory RENAME create get Window register Global Action rename Action go Into Action Action Factory GO INTO create get Window register Global Action go Into Action back Action Action Factory BACK create get Window register Global Action back Action forward Action Action Factory FORWARD create get Window register Global Action forward Action up Action Action Factory UP create get Window register Global Action up Action next Action Action Factory NEXT create get Window next Action set Image Descriptor IDE Internal Workbench Images get Image Descriptor IDE Internal Workbench Images IMG ETOOL NEXT NAV register Global Action next Action previous Action Action Factory PREVIOUS create get Window previous Action set Image Descriptor IDE Internal Workbench Images get Image Descriptor IDE Internal Workbench Images IMG ETOOL PREVIOUS NAV register Global Action previous Action build Project Action IDE Action Factory BUILD PROJECT create get Window register Global Action build Project Action open Project Action IDE Action Factory OPEN PROJECT create get Window register Global Action open Project Action close Project Action IDE Action Factory CLOSE PROJECT create get Window register Global Action close Project Action open Workspace Action IDE Action Factory OPEN WORKSPACE create get Window register Global Action open Workspace Action project Property Dialog Action IDE Action Factory OPEN PROJECT PROPERTIES create get Window register Global Action project Property Dialog Action if get Window get Workbench get Intro Manager has Intro intro Action Action Factory INTRO create window register Global Action intro Action final String show In Quick Menu Id org eclipse ui navigate show In Quick Menu NON NLS 1 show In Quick Menu new Quick Menu Action show In Quick Menu Id protected void fill Menu I Menu Manager menu menu add Contribution Item Factory VIEWS SHOW IN create get Window register Global Action show In Quick Menu final String new Quick Menu Id org eclipse ui file new Quick Menu NON NLS 1 new Quick Menu new Quick Menu Action new Quick Menu Id protected void fill Menu I Menu Manager menu menu add new New Wizard Menu get Window register Global Action new Quick Menu pin Editor Contribution Item Contribution Item Factory PIN EDITOR create get Window  makeActions IWorkbenchConfigurer workbenchConfigurer IActionBarConfigurer actionBarConfigurer setCurrentActionBarConfigurer actionBarConfigurer ConfigurationItemFactory statusLineItem StatusLineContributionItem ModeContributionItem newWizardAction ActionFactory getWindow registerGlobalAction newWizardAction newWizardDropDownAction IDEActionFactory NEW_WIZARD_DROP_DOWN getWindow importResourcesAction ActionFactory getWindow registerGlobalAction importResourcesAction exportResourcesAction ActionFactory getWindow registerGlobalAction exportResourcesAction buildAllAction IDEActionFactory getWindow registerGlobalAction buildAllAction cleanAction IDEActionFactory BUILD_CLEAN getWindow registerGlobalAction cleanAction toggleAutoBuildAction IDEActionFactory BUILD_AUTOMATICALLY getWindow registerGlobalAction toggleAutoBuildAction saveAction ActionFactory getWindow registerGlobalAction saveAction saveAsAction ActionFactory SAVE_AS getWindow registerGlobalAction saveAsAction saveAllAction ActionFactory SAVE_ALL getWindow registerGlobalAction saveAllAction undoAction ActionFactory getWindow registerGlobalAction undoAction redoAction ActionFactory getWindow registerGlobalAction redoAction cutAction ActionFactory getWindow registerGlobalAction cutAction copyAction ActionFactory getWindow registerGlobalAction copyAction pasteAction ActionFactory getWindow registerGlobalAction pasteAction printAction ActionFactory getWindow registerGlobalAction printAction selectAllAction ActionFactory SELECT_ALL getWindow registerGlobalAction selectAllAction findAction ActionFactory getWindow registerGlobalAction findAction closeAction ActionFactory getWindow registerGlobalAction closeAction closeAllAction ActionFactory CLOSE_ALL getWindow registerGlobalAction closeAllAction closeAllSavedAction ActionFactory CLOSE_ALL_SAVED getWindow registerGlobalAction closeAllSavedAction helpContentsAction ActionFactory HELP_CONTENTS getWindow registerGlobalAction helpContentsAction aboutAction ActionFactory getWindow aboutAction setImageDescriptor IDEInternalWorkbenchImages getImageDescriptor IDEInternalWorkbenchImages IMG_OBJS_DEFAULT_PROD registerGlobalAction aboutAction openPreferencesAction ActionFactory getWindow registerGlobalAction openPreferencesAction addBookmarkAction IDEActionFactory getWindow registerGlobalAction addBookmarkAction addTaskAction IDEActionFactory ADD_TASK getWindow registerGlobalAction addTaskAction deleteAction ActionFactory getWindow registerGlobalAction deleteAction AboutInfo IDEWorkbenchPlugin getDefault getFeatureInfos getWelcomePageURL quickStartAction IDEActionFactory QUICK_START getWindow registerGlobalAction quickStartAction getTipsAndTricksHref tipsAndTricksAction IDEActionFactory TIPS_AND_TRICKS getWindow registerGlobalAction tipsAndTricksAction showViewMenuAction ActionFactory SHOW_VIEW_MENU getWindow registerGlobalAction showViewMenuAction showPartPaneMenuAction ActionFactory SHOW_PART_PANE_MENU getWindow registerGlobalAction showPartPaneMenuAction nextEditorAction ActionFactory NEXT_EDITOR getWindow prevEditorAction ActionFactory PREVIOUS_EDITOR getWindow ActionFactory linkCycleActionPair nextEditorAction prevEditorAction registerGlobalAction nextEditorAction registerGlobalAction prevEditorAction nextPartAction ActionFactory NEXT_PART getWindow prevPartAction ActionFactory PREVIOUS_PART getWindow ActionFactory linkCycleActionPair nextPartAction prevPartAction registerGlobalAction nextPartAction registerGlobalAction prevPartAction nextPerspectiveAction ActionFactory NEXT_PERSPECTIVE getWindow prevPerspectiveAction ActionFactory PREVIOUS_PERSPECTIVE getWindow ActionFactory linkCycleActionPair nextPerspectiveAction prevPerspectiveAction registerGlobalAction nextPerspectiveAction registerGlobalAction prevPerspectiveAction activateEditorAction ActionFactory ACTIVATE_EDITOR getWindow registerGlobalAction activateEditorAction maximizePartAction ActionFactory getWindow registerGlobalAction maximizePartAction workbenchEditorsAction ActionFactory SHOW_OPEN_EDITORS getWindow registerGlobalAction workbenchEditorsAction workbookEditorsAction ActionFactory SHOW_WORKBOOK_EDITORS getWindow registerGlobalAction workbookEditorsAction hideShowEditorAction ActionFactory SHOW_EDITOR getWindow registerGlobalAction hideShowEditorAction savePerspectiveAction ActionFactory SAVE_PERSPECTIVE getWindow registerGlobalAction savePerspectiveAction editActionSetAction ActionFactory EDIT_ACTION_SETS getWindow registerGlobalAction editActionSetAction lockToolBarAction ActionFactory LOCK_TOOL_BAR getWindow registerGlobalAction lockToolBarAction resetPerspectiveAction ActionFactory RESET_PERSPECTIVE getWindow registerGlobalAction resetPerspectiveAction closePerspAction ActionFactory CLOSE_PERSPECTIVE getWindow registerGlobalAction closePerspAction closeAllPerspsAction ActionFactory CLOSE_ALL_PERSPECTIVES getWindow registerGlobalAction closeAllPerspsAction forwardHistoryAction ActionFactory FORWARD_HISTORY getWindow registerGlobalAction forwardHistoryAction backwardHistoryAction ActionFactory BACKWARD_HISTORY getWindow registerGlobalAction backwardHistoryAction revertAction ActionFactory getWindow registerGlobalAction revertAction refreshAction ActionFactory getWindow registerGlobalAction refreshAction propertiesAction ActionFactory getWindow registerGlobalAction propertiesAction quitAction ActionFactory getWindow registerGlobalAction quitAction moveAction ActionFactory getWindow registerGlobalAction moveAction renameAction ActionFactory getWindow registerGlobalAction renameAction goIntoAction ActionFactory GO_INTO getWindow registerGlobalAction goIntoAction backAction ActionFactory getWindow registerGlobalAction backAction forwardAction ActionFactory getWindow registerGlobalAction forwardAction upAction ActionFactory getWindow registerGlobalAction upAction nextAction ActionFactory getWindow nextAction setImageDescriptor IDEInternalWorkbenchImages getImageDescriptor IDEInternalWorkbenchImages IMG_ETOOL_NEXT_NAV registerGlobalAction nextAction previousAction ActionFactory getWindow previousAction setImageDescriptor IDEInternalWorkbenchImages getImageDescriptor IDEInternalWorkbenchImages IMG_ETOOL_PREVIOUS_NAV registerGlobalAction previousAction buildProjectAction IDEActionFactory BUILD_PROJECT getWindow registerGlobalAction buildProjectAction openProjectAction IDEActionFactory OPEN_PROJECT getWindow registerGlobalAction openProjectAction closeProjectAction IDEActionFactory CLOSE_PROJECT getWindow registerGlobalAction closeProjectAction openWorkspaceAction IDEActionFactory OPEN_WORKSPACE getWindow registerGlobalAction openWorkspaceAction projectPropertyDialogAction IDEActionFactory OPEN_PROJECT_PROPERTIES getWindow registerGlobalAction projectPropertyDialogAction getWindow getWorkbench getIntroManager hasIntro introAction ActionFactory registerGlobalAction introAction showInQuickMenuId showInQuickMenu showInQuickMenu QuickMenuAction showInQuickMenuId fillMenu IMenuManager ContributionItemFactory VIEWS_SHOW_IN getWindow registerGlobalAction showInQuickMenu newQuickMenuId newQuickMenu newQuickMenu QuickMenuAction newQuickMenuId fillMenu IMenuManager NewWizardMenu getWindow registerGlobalAction newQuickMenu pinEditorContributionItem ContributionItemFactory PIN_EDITOR getWindow
private void set Current Action Bar Configurer I Action Bar Configurer action Bar Configurer this action Bar Configurer action Bar Configurer  setCurrentActionBarConfigurer IActionBarConfigurer actionBarConfigurer actionBarConfigurer actionBarConfigurer
private void register Global Action I Action action action Bar Configurer register Global Action action  registerGlobalAction IAction actionBarConfigurer registerGlobalAction
Update the build actions on the toolbar and menu bar based on the current state of autobuild void update Build Actions boolean auto Building update menu bar actions in project menu build All Action set Enabled auto Building build Project Action set Enabled auto Building toggle Auto Build Action set Checked auto Building update the cool bar build button I Cool Bar Manager cool Bar Manager action Bar Configurer get Cool Bar Manager I Contribution Item cb Item cool Bar Manager find I Workbench Action Constants TOOLBAR FILE if cb Item instanceof Tool Bar Contribution Item This should not happen IDE Workbench Plugin log File toolbar contribution item is missing NON NLS 1 return Tool Bar Contribution Item tool Bar Item Tool Bar Contribution Item cb Item I Tool Bar Manager tool Bar Manager tool Bar Item get Tool Bar Manager if tool Bar Manager null error if this happens file toolbar assumed to always exist IDE Workbench Plugin log File toolbar is missing NON NLS 1 return add the build button if autobuild is on and remove it otherwise if auto Building tool Bar Manager append To Group I Workbench Action Constants BUILD GROUP build All Action tool Bar Manager update false tool Bar Item update I Cool Bar Manager SIZE else if build All Action null tool Bar Manager remove build All Action get Id tool Bar Manager update false tool Bar Item update I Cool Bar Manager SIZE  updateBuildActions autoBuilding buildAllAction setEnabled autoBuilding buildProjectAction setEnabled autoBuilding toggleAutoBuildAction setChecked autoBuilding ICoolBarManager coolBarManager actionBarConfigurer getCoolBarManager IContributionItem cbItem coolBarManager IWorkbenchActionConstants TOOLBAR_FILE cbItem ToolBarContributionItem IDEWorkbenchPlugin ToolBarContributionItem toolBarItem ToolBarContributionItem cbItem IToolBarManager toolBarManager toolBarItem getToolBarManager toolBarManager IDEWorkbenchPlugin autoBuilding toolBarManager appendToGroup IWorkbenchActionConstants BUILD_GROUP buildAllAction toolBarManager toolBarItem ICoolBarManager buildAllAction toolBarManager buildAllAction getId toolBarManager toolBarItem ICoolBarManager
Update the pin action s tool bar void update Pin Action Toolbar I Cool Bar Manager cool Bar Manager action Bar Configurer get Cool Bar Manager I Contribution Item cb Item cool Bar Manager find I Workbench Action Constants TOOLBAR NAVIGATE if cb Item instanceof Tool Bar Contribution Item This should not happen IDE Workbench Plugin log Navigation toolbar contribution item is missing NON NLS 1 return Tool Bar Contribution Item tool Bar Item Tool Bar Contribution Item cb Item I Tool Bar Manager tool Bar Manager tool Bar Item get Tool Bar Manager if tool Bar Manager null error if this happens navigation toolbar assumed to always exist IDE Workbench Plugin log Navigate toolbar is missing NON NLS 1 return tool Bar Manager update false tool Bar Item update I Cool Bar Manager SIZE  updatePinActionToolbar ICoolBarManager coolBarManager actionBarConfigurer getCoolBarManager IContributionItem cbItem coolBarManager IWorkbenchActionConstants TOOLBAR_NAVIGATE cbItem ToolBarContributionItem IDEWorkbenchPlugin ToolBarContributionItem toolBarItem ToolBarContributionItem cbItem IToolBarManager toolBarManager toolBarItem getToolBarManager toolBarManager IDEWorkbenchPlugin toolBarManager toolBarItem ICoolBarManager

Notifies this listener that the given page s perspective has been closed param page the page whose perspective was closed param perspective the descriptor of the perspective that was closed 
Notifies this listener that the given page s perspective has been opened The perspective is not active yet param page the page whose perspective was opened param perspective the descriptor of the perspective that was opened 

public interface I Layout Container Add a child to the container public void add Layout Part new Part  ILayoutContainer LayoutPart newPart
public void add Layout Part new Part Returns a list of layout children public Layout Part get Children  LayoutPart newPart LayoutPart getChildren
public Layout Part get Children Remove a child from the container public void remove Layout Part part  LayoutPart getChildren LayoutPart
public void remove Layout Part part Replace one child with another public void replace Layout Part old Part Layout Part new Part  LayoutPart LayoutPart oldPart LayoutPart newPart
public void replace Layout Part old Part Layout Part new Part public void find Sashes Layout Part to Find Part Pane Sashes result  LayoutPart oldPart LayoutPart newPart findSashes LayoutPart toFind PartPane
When a layout part closes focus will return to the previously active part This method determines whether the parts in this container should participate in this behavior If this method returns true its parts may automatically be given focus when another part is closed return true iff the parts in this container may be given focus when the active part is closed 
public boolean allows Auto Focus public void set Zoomed boolean is Zoomed  allowsAutoFocus setZoomed isZoomed

public class Int Model extends Model public Int Model int initial Value super new Integer initial Value  IntModel IntModel initialValue initialValue
Sets the value of the integer and notifies all change listeners except for the one that caused the change param new Value the new value of the integer public void set int new Value I Change Listener source set State new Integer new Value source  newValue newValue IChangeListener setState newValue
Sets the value of the integer and notifies all change listeners of the change param new Value the new value of the integer public void set int new Value set State new Integer new Value null  newValue newValue setState newValue
Returns the value of the integer return the value of the integer public int get return Integer get State int Value  getState intValue

private I Page Listener page Listener new I Page Listener public void page Activated I Workbench Page page no op  IPageListener pageListener IPageListener pageActivated IWorkbenchPage
public void page Closed I Workbench Page page set Enabled workbench Window get Pages length 0  pageClosed IWorkbenchPage setEnabled workbenchWindow getPages
public void page Opened I Workbench Page page set Enabled true  pageOpened IWorkbenchPage setEnabled
param window the window to bind the action to public Intro Action I Workbench Window window super Intro Messages get String Intro action text NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window window add Page Listener page Listener  IntroAction IWorkbenchWindow IntroMessages getString action_text IllegalArgumentException workbenchWindow addPageListener pageListener
see org eclipse ui actions Action Factory I Workbench Action dispose public void dispose workbench Window remove Page Listener page Listener workbench Window null  ActionFactory IWorkbenchAction workbenchWindow removePageListener pageListener workbenchWindow
see org eclipse jface action I Action run public void run workbench Window get Workbench get Intro Manager show Intro workbench Window false  IAction workbenchWindow getWorkbench getIntroManager showIntro workbenchWindow
see org eclipse jface action I Action get Image Descriptor public Image Descriptor get Image Descriptor return Workbench workbench Window get Workbench get Intro Descriptor get Image Descriptor  IAction getImageDescriptor ImageDescriptor getImageDescriptor workbenchWindow getWorkbench getIntroDescriptor getImageDescriptor

public interface I Intro Descriptor Creates an instance of the intro part defined in the descriptor I Intro Part create Intro throws Core Exception  IIntroDescriptor IIntroPart createIntro CoreException
Returns the part id return the id of the part 
public String get Id Returns the descriptor of the image for this part return the descriptor of the image to display next to this part  getId

Return the number of introduction extensions known by this registry return the number of introduction extensions known by this registry 
Return the introduction extensions known by this registry return the introduction extensions known by this registry 
Return the introduction extension that is bound to the given product param product Id the product identifier return the introduction extension that is bound to the given product or code null code if there is no such binding  productId
Find an intro descriptor with the given identifier param id the id return the intro descriptor or code null code 

private boolean end Tag Required true public FormattedHTML Element String name int indent Level boolean span Multiple Lines super name this indent Level indent Level this span Multiple Lines span Multiple Lines default end Tag Required true  endTagRequired FormattedHTMLElement indentLevel spanMultipleLines indentLevel indentLevel spanMultipleLines spanMultipleLines endTagRequired
public FormattedHTML Element String name int indent Level boolean span Multiple Lines boolean end Tag Required super name this indent Level indent Level this span Multiple Lines span Multiple Lines this end Tag Required end Tag Required  FormattedHTMLElement indentLevel spanMultipleLines endTagRequired indentLevel indentLevel spanMultipleLines spanMultipleLines endTagRequired endTagRequired
public FormattedHTML Element String name Map attributes Vector content int indent Level boolean span Multiple Lines super name attributes content this indent Level indent Level this span Multiple Lines span Multiple Lines end Tag Required true  FormattedHTMLElement indentLevel spanMultipleLines indentLevel indentLevel spanMultipleLines spanMultipleLines endTagRequired
Set whether the end tag is required for this element param required true if end tag required false otherwise public void set End Tag Required boolean required this end Tag Required required  setEndTagRequired endTagRequired
Set the indent level that should be applied to this element when printed param indent Level The indent Level to set public void set Indent Level int indent Level this indent Level indent Level  indentLevel indentLevel setIndentLevel indentLevel indentLevel indentLevel
Set whether or not this element should be printed over multiple lines or on a single line param span Multiple Lines true if the element should be printed over multiple lines false if it should be printed on a single line public void set Span Multiple Lines boolean span Multiple Lines this span Multiple Lines span Multiple Lines  spanMultipleLines setSpanMultipleLines spanMultipleLines spanMultipleLines spanMultipleLines
Create a string of tabs to insert before the element is printed param indent Level the number of tabs to insert return private String Buffer get Indent int indent Level figure out the tab width String Buffer indent new String Buffer for int i 0 i indent Level i indent append I IntroHTML Constants SMALL TAB return indent  indentLevel StringBuffer getIndent indentLevel StringBuffer StringBuffer indentLevel IIntroHTMLConstants SMALL_TAB
public String to String String Buffer element new String Buffer insert the indent element append get Indent indent Level add the start tag and attributes element append HTML Util createHTML Start Tag get Element Name get Element Attributes span Multiple Lines if there is no content and an end tag is not required just return the element as is if get Element Content is Empty end Tag Required return element to String include the element s content if there is any for Iterator it get Element Content iterator it has Next Object content it next element append content indent the end tag if we re on a new line if indent Level 0 span Multiple Lines element append get Indent indent Level include an end tag element append HTML Util createHTML End Tag get Element Name true return element to String  toString StringBuffer StringBuffer getIndent indentLevel HTMLUtil createHTMLStartTag getElementName getElementAttributes spanMultipleLines getElementContent isEmpty endTagRequired toString getElementContent hasNext indentLevel spanMultipleLines getIndent indentLevel HTMLUtil createHTMLEndTag getElementName toString

public HTML Element String name this element Name name this element Attributes new Hashtable this element Content new Vector  HTMLElement elementName elementAttributes elementContent
public HTML Element String name Map attributes Vector content this element Name name this element Attributes attributes this element Content content  HTMLElement elementName elementAttributes elementContent
Add an attribute with the given name and value to this HTML Element param attribute Name param attribute Value public void add Attribute String attribute Name String attribute Value if attribute Name null attribute Value null get Element Attributes put attribute Name attribute Value  HTMLElement attributeName attributeValue addAttribute attributeName attributeValue attributeName attributeValue getElementAttributes attributeName attributeValue
Add content to this element The content should be in the form of another HTML Element or a String public void add Content Object content get Element Content add content  HTMLElement addContent getElementContent
Get the attributes associated with this element return Returns the element Attributes public Map get Element Attributes if element Attributes null element Attributes new Hashtable return element Attributes  elementAttributes getElementAttributes elementAttributes elementAttributes elementAttributes
Set the attributes associated with this element param element Attributes The element Attributes to set public void set Element Attributes Map element Attributes this element Attributes element Attributes  elementAttributes elementAttributes setElementAttributes elementAttributes elementAttributes elementAttributes
Get this element s content return Returns the element Content public Vector get Element Content if element Content null element Content new Vector return element Content  elementContent getElementContent elementContent elementContent elementContent
Set this element s content param element Content The element Content to set public void set Element Content Vector element Content this element Content element Content  elementContent elementContent setElementContent elementContent elementContent elementContent
Get the name of this element return Returns the element Name public String get Element Name return element Name  elementName getElementName elementName
Set the name of this element param element Name The element Name to set public void set Element Name String element Name this element Name element Name  elementName elementName setElementName elementName elementName elementName
public String to String String Buffer element new String Buffer add the start tag and attributes element append HTML Util createHTML Start Tag get Element Name get Element Attributes false include the element s content for Iterator it get Element Content iterator it has Next Object content it next element append content include an end tag element append HTML Util createHTML End Tag get Element Name false return element to String  toString StringBuffer StringBuffer HTMLUtil createHTMLStartTag getElementName getElementAttributes getElementContent hasNext HTMLUtil createHTMLEndTag getElementName toString

public final class HTML Util Creates an HTML opening element of the form element Name element Attributes param element Name the name of the element to create param element Attributes a map of attribute names and values to be inserted into the element start tag param insert Line Break true to insert a line break after the start tag is closed false otherwise return public static String Buffer createHTML Start Tag String element Name Map element Attributes boolean insert Line Break String Buffer element new String Buffer if element Name null open the start tag element append openHTML Start Tag element Name add the attributes if there are any if element Attributes null element Attributes is Empty element append I IntroHTML Constants SPACE append create Attribute List element Attributes close the start tag element append closeHTML Tag insert Line Break return element  HTMLUtil elementName elementAttributes elementName elementAttributes insertLineBreak StringBuffer createHTMLStartTag elementName elementAttributes insertLineBreak StringBuffer StringBuffer elementName openHTMLStartTag elementName elementAttributes elementAttributes isEmpty IIntroHTMLConstants createAttributeList elementAttributes closeHTMLTag insertLineBreak
Creates an HTML start tag of the form element Name param element Name the name of the element to create param insert Line Break true to insert a new line after the start tag return public static String Buffer createHTML Start Tag String element Name boolean insert Line Break return createHTML Start Tag element Name null insert Line Break  elementName elementName insertLineBreak StringBuffer createHTMLStartTag elementName insertLineBreak createHTMLStartTag elementName insertLineBreak
Creates an HTML start tag of the form element Name and inserts a line break after the start tag param element Name the name of the element to create return public static String Buffer createHTML Start Tag String element Name return createHTML Start Tag element Name null true  elementName elementName StringBuffer createHTMLStartTag elementName createHTMLStartTag elementName
Creates an HTML closing element of the form element Name param element Name the name of the closing element to create param add New Line true to add a new line at the end return public static String Buffer createHTML End Tag String element Name boolean add New Line String Buffer closing Element new String Buffer if element Name null closing Element append I IntroHTML Constants LT append I IntroHTML Constants FORWARD SLASH append element Name append closeHTML Tag add New Line return closing Element  elementName elementName addNewLine StringBuffer createHTMLEndTag elementName addNewLine StringBuffer closingElement StringBuffer elementName closingElement IIntroHTMLConstants IIntroHTMLConstants FORWARD_SLASH elementName closeHTMLTag addNewLine closingElement
Given a map of attribute names and values this method will create a String Buffer of the attributes in the form attr Name attr Value These attributes can appear in the start tag of an HTML element param attributes the attributes to be converted into a String list return public static String create Attribute List Map attributes if attributes null return null String Buffer attribute List new String Buffer Set attr Names attributes key Set for Iterator it attr Names iterator it has Next Object name it next Object value attributes get name if name instanceof String value instanceof String attribute List append create Attribute String name String value if it has Next attribute List append I IntroHTML Constants SPACE return attribute List to String  StringBuffer attrName attrValue createAttributeList StringBuffer attributeList StringBuffer attrNames keySet attrNames hasNext attributeList createAttribute hasNext attributeList IIntroHTMLConstants attributeList toString
Creates an HTML attribute of the form attr Name attr Value param attr Name the name of the attribute param attr Value the value of the attribute return public static String Buffer create Attribute String attr Name String attr Value String Buffer attribute new String Buffer if attr Name null attr Value null attribute append attr Name append I IntroHTML Constants EQUALS append I IntroHTML Constants QUOTE append attr Value append I IntroHTML Constants QUOTE return attribute  attrName attrValue attrName attrValue StringBuffer createAttribute attrName attrValue StringBuffer StringBuffer attrName attrValue attrName IIntroHTMLConstants IIntroHTMLConstants attrValue IIntroHTMLConstants
return attribute public static String Buffer openHTML Start Tag String element Name return new String Buffer append I IntroHTML Constants LT append element Name  StringBuffer openHTMLStartTag elementName StringBuffer IIntroHTMLConstants elementName
element Name public static String Buffer closeHTML Tag return closeHTML Tag true  elementName StringBuffer closeHTMLTag closeHTMLTag
public static String Buffer closeHTML Tag boolean new Line String Buffer closing new String Buffer append I IntroHTML Constants GT if new Line closing append I IntroHTML Constants NEW LINE return closing  StringBuffer closeHTMLTag newLine StringBuffer StringBuffer IIntroHTMLConstants newLine IIntroHTMLConstants NEW_LINE
Get the absolute path of the given bundle in the form file path to plugin param bundle return public static String get Resolved Bundle Location Bundle bundle try URL bundle Location bundle get Entry NON NLS 1 if bundle Location null return null bundle Location Platform as LocalURL bundle Location return bundle Location to External Form catch Illegal State Exception e Log error Failed to access bundle NON NLS 1 bundle get Symbolic Name e return null catch IO Exception e Log error Failed to resolve URL path for bundle NON NLS 1 bundle get Symbolic Name e return null  path_to_plugin getResolvedBundleLocation bundleLocation getEntry bundleLocation bundleLocation asLocalURL bundleLocation bundleLocation toExternalForm IllegalStateException getSymbolicName IOException getSymbolicName
Get the absolute path of the bundle with id code bundle Id code If no such bundle is found return null param bundle Id return public static String get Resolved Bundle Location String bundle Id Bundle bundle Platform get Bundle bundle Id if bundle null return null return HTML Util get Resolved Bundle Location bundle  bundleId bundleId getResolvedBundleLocation bundleId getBundle bundleId HTMLUtil getResolvedBundleLocation
Determine if the contents of two character arrays are equal param a param b return public static boolean equal Char Array Content char a char b if a length b length return false for int i 0 i a length i if a i b i return false return true  equalCharArrayContent

Generates the HTML code that will be presented in the browser widget for the provided intro page param page the page to generate HTML for param title the title of the intro presentation or null public HTML Element generateHTM Lfor Page Abstract Intro Page page if page null return null this intro Page page generate and add the appropriate encoding to the top of the document generate Encoding create the main HTML element and all of its contents return generateHTML Element  HTMLElement generateHTMLforPage AbstractIntroPage introPage generateEncoding generateHTMLElement
private HTML Element generate Encoding HTML Element encoding new HTML Element NON NLS 1 TODO figure out how to handle locale based encoding As far as the HTML generator is concerned this is probably as simple as asking the model for the information return encoding  HTMLElement generateEncoding HTMLElement HTMLElement
Generates the HTML element and its content pre lt HTML gt lt HEAD gt head content lt HEAD gt lt BODY gt body content lt BODY gt lt HTML gt pre return the html HTML Element private HTML Element generateHTML Element this is the outermost element so it has no indent int indent Level 0 HTML Element html new FormattedHTML Element I IntroHTML Constants ELEMENT HTML indent Level true HTML Element head generate Head Element indent Level 1 HTML Element body generate Body Element indent Level 1 html add Content head html add Content body return html  HTMLElement HTMLElement generateHTMLElement indentLevel HTMLElement FormattedHTMLElement IIntroHTMLConstants ELEMENT_HTML indentLevel HTMLElement generateHeadElement indentLevel HTMLElement generateBodyElement indentLevel addContent addContent
Generates the HEAD element and its content pre lt HEAD gt lt BASE href quot base plugin location gt lt style type quot text css quot gt HTML IMG border 0px lt style gt lt TITLE gt page title lt TITLE gt lt LINK href quot style sheet quot gt additional head content if specified lt HEAD gt pre param indent Level the number of indents to insert before the element when it is printed return the head HTML Element private HTML Element generate Head Element int indent Level HTML Element head new FormattedHTML Element I IntroHTML Constants ELEMENT HEAD indent Level true add the title head add Content generate Title Element null indent Level 1 create the BASE element String base Path HTML Util get Resolved Bundle Location intro Page get Bundle HTML Element base generate Base Element indent Level 1 base Path if base null head add Content base create the HTML style block head add Content generate Style Element indent Level 1 add the presentation style String style Intro Plugin get Default get Intro Model Root get Presentation get Implementation Style if style null head add Content generate Link Element style indent Level 1 TODO Should intro Page get Styles return the main page style as well style intro Page get Style if style null head add Content generate Link Element style indent Level 1 add the page s inherited style s String page Styles intro Page get Styles for int i 0 i page Styles length i style page Styles i if style null head add Content generate Link Element style indent Level 1 if there is additional head conent specified in an external file include it Additional head content can be specified at the implementation level which would apply to ALL pages and at the page level which would apply only to that particular page For the implementation s head contribution String Buffer content null Intro Head intro Head Intro Plugin get Default get Intro Model Root get Presentation get Head if intro Head null content read From File intro Head get Src if content null head add Content content For the page s head contribution TODO there should only be one of these at the page level not a collection Intro Head html Heads intro Page getHTML Heads for int i 0 i html Heads length i intro Head html Heads i if intro Head null content read From File intro Head get Src if content null head add Content content return head  base_plugin_location indentLevel HTMLElement HTMLElement generateHeadElement indentLevel HTMLElement FormattedHTMLElement IIntroHTMLConstants ELEMENT_HEAD indentLevel addContent generateTitleElement indentLevel basePath HTMLUtil getResolvedBundleLocation introPage getBundle HTMLElement generateBaseElement indentLevel basePath addContent addContent generateStyleElement indentLevel IntroPlugin getDefault getIntroModelRoot getPresentation getImplementationStyle addContent generateLinkElement indentLevel introPage getStyles introPage getStyle addContent generateLinkElement indentLevel pageStyles introPage getStyles pageStyles pageStyles addContent generateLinkElement indentLevel StringBuffer IntroHead introHead IntroPlugin getDefault getIntroModelRoot getPresentation getHead introHead readFromFile introHead getSrc addContent IntroHead htmlHeads introPage getHTMLHeads htmlHeads introHead htmlHeads introHead readFromFile introHead getSrc addContent
Generates the BODY element and its content pre lt BODY gt lt DIV id quot page Id quot class quot page Class quot gt page content lt DIV gt lt BODY gt pre param indent Level the number of indents to insert before the element when it is printed return the body HTML Element private HTML Element generate Body Element int indent Level HTML Element body new FormattedHTML Element I IntroHTML Constants ELEMENT BODY indent Level true Create the div that contains the page content String page Id intro Page get Id null intro Page get Id I IntroHTML Constants DIV ID PAGE HTML Element page Content Div generate Div Element page Id indent Level 1 if intro Page get Style Id null page Content Div add Attribute I IntroHTML Constants ATTRIBUTE CLASS intro Page get Style Id Add any children of the page in the order they are defined Abstract Intro Element children intro Page get Children for int i 0 i children length i Abstract Intro Element child children i use indent Level 2 here since this element is contained within the page Content Div HTML Element child Element generate Intro Element child indent Level 2 if child Element null page Content Div add Content child Element body add Content page Content Div return body  pageId pageClass indentLevel HTMLElement HTMLElement generateBodyElement indentLevel HTMLElement FormattedHTMLElement IIntroHTMLConstants ELEMENT_BODY indentLevel pageId introPage getId introPage getId IIntroHTMLConstants DIV_ID_PAGE HTMLElement pageContentDiv generateDivElement pageId indentLevel introPage getStyleId pageContentDiv addAttribute IIntroHTMLConstants ATTRIBUTE_CLASS introPage getStyleId AbstractIntroElement introPage getChildren AbstractIntroElement indentLevel pageContentDiv HTMLElement childElement generateIntroElement indentLevel childElement pageContentDiv addContent childElement addContent pageContentDiv
Given an Intro Element generate the appropriate HTML Element param element the Intro Element param indent Level the number of indents to insert before the element when it is printed return an HTML Element private HTML Element generate Intro Element Abstract Intro Element element int indent Level if element null return null check to see if this element should be filtered from the HTML presentation if filtered From Presentation element return null switch element get Type case Abstract Intro Element GROUP return generate Intro Div Intro Group element indent Level case Abstract Intro Element LINK return generate Intro Link Intro Link element indent Level case Abstract Intro Element HTML return generate IntroHTML IntroHTML element indent Level case Abstract Intro Element IMAGE return generate Intro Image Intro Image element indent Level case Abstract Intro Element TEXT return generate Intro Text Intro Text element indent Level case Abstract Intro Element PAGE TITLE return generate Intro Title Intro Page Title element indent Level default return null  IntroElement HTMLElement IntroElement indentLevel HTMLElement HTMLElement generateIntroElement AbstractIntroElement indentLevel filteredFromPresentation getType AbstractIntroElement generateIntroDiv IntroGroup indentLevel AbstractIntroElement generateIntroLink IntroLink indentLevel AbstractIntroElement generateIntroHTML indentLevel AbstractIntroElement generateIntroImage IntroImage indentLevel AbstractIntroElement generateIntroText IntroText indentLevel AbstractIntroElement PAGE_TITLE generateIntroTitle IntroPageTitle indentLevel
Create a div element and its content from an Intro Div pre lt div id quot attrvalue quot gt lt h4 gt lt span class quot div label quot gt attrvalue lt span gt lt h4 gt any defined divs links html images text includes lt div gt pre param element the Intro Div param indent Level the number of indents to insert before the element when it is printed return a div HTML Element private HTML Element generate Intro Div Intro Group element int indent Level Create the outer div element HTML Element div Element generate Div Element element get Id indent Level if a div class was specified add it if element get Style Id null div Element add Attribute I IntroHTML Constants ATTRIBUTE CLASS element get Style Id Create the div label if specified if element get Label null HTML Element div Label generate Text Element I IntroHTML Constants ELEMENT H4 null I IntroHTML Constants SPAN CLASS DIV LABEL element get Label indent Level 1 div Element add Content div Label Add any children of the div in the order they are defined Abstract Intro Element children element get Children for int i 0 i children length i Abstract Intro Element child children i HTML Element child Element generate Intro Element child indent Level 1 if child Element null div Element add Content child Element return div Element  IntroDiv IntroDiv indentLevel HTMLElement HTMLElement generateIntroDiv IntroGroup indentLevel HTMLElement divElement generateDivElement getId indentLevel getStyleId divElement addAttribute IIntroHTMLConstants ATTRIBUTE_CLASS getStyleId getLabel HTMLElement divLabel generateTextElement IIntroHTMLConstants ELEMENT_H4 IIntroHTMLConstants SPAN_CLASS_DIV_LABEL getLabel indentLevel divElement addContent divLabel AbstractIntroElement getChildren AbstractIntroElement HTMLElement childElement generateIntroElement indentLevel childElement divElement addContent childElement divElement
Generates an anchor link element and its content from an Intro Link pre lt A id link Id class quot link quot href link Href gt lt IMG src quot blank gif quot gt lt SPAN class quot link label quot gt link Label lt SPAN gt lt P gt lt SPAN gt text lt SPAN gt lt P gt lt A gt pre param element the Intro Link param indent Level the number of indents to insert before the element when it is printed return an anchor lt A gt HTML Element private HTML Element generate Intro Link Intro Link element int indent Level HTML Element anchor generate Anchor Element element indent Level add IMG src blank gif String blank ImageURL Intro Model Root get Plugin Location I IntroHTML Constants IMAGE SRC BLANK I Intro Constants PLUGIN ID if blank ImageURL null anchor add Content generate Image Element blank ImageURL null I IntroHTML Constants IMAGE CLASS BG indent Level 1 add link image if one is specified if element get Img null HTML Element img generate Intro Element element get Img indent Level 1 if img null anchor add Content img add SPAN class link label link Label SPAN if element get Label null HTML Element label generate Span Element I IntroHTML Constants SPAN CLASS LINK LABEL indent Level 1 label add Content element get Label anchor add Content label Intro Text link Text element get Intro Text if link Text null link Text get Text null HTML Element text generate Intro Element link Text indent Level 1 if text null anchor add Content text return anchor  IntroLink linkId linkHref linkLabel IntroLink indentLevel HTMLElement HTMLElement generateIntroLink IntroLink indentLevel HTMLElement generateAnchorElement indentLevel blankImageURL IntroModelRoot getPluginLocation IIntroHTMLConstants IMAGE_SRC_BLANK IIntroConstants PLUGIN_ID blankImageURL addContent generateImageElement blankImageURL IIntroHTMLConstants IMAGE_CLASS_BG indentLevel getImg HTMLElement generateIntroElement getImg indentLevel addContent linkLabel getLabel HTMLElement generateSpanElement IIntroHTMLConstants SPAN_CLASS_LINK_LABEL indentLevel addContent getLabel addContent IntroText linkText getIntroText linkText linkText getText HTMLElement generateIntroElement linkText indentLevel addContent
Generate the appropriate HTML from an IntroHTML If the IntroHTML type is inline then the content from the referenced file is emitted as is into a div element If the type is embed an OBJECT html element is created whose code data code attribute is equal to the IntroHTML s code src code value param element the IntroHTML param indent Level the number of indents to insert before the element when it is printed return an HTML Element private HTML Element generate IntroHTML IntroHTML element int indent Level if element is Inlined return generate Inline IntroHTML element indent Level else return generate Embedded IntroHTML element indent Level  indentLevel HTMLElement HTMLElement generateIntroHTML indentLevel isInlined generateInlineIntroHTML indentLevel generateEmbeddedIntroHTML indentLevel
Generate an image element from an Intro Image pre lt IMG src image Src id image Id gt pre param element the Intro Image param indent Level the number of indents to insert before the element when it is printed return an img HTML Element private HTML Element generate Intro Image Intro Image element int indent Level HTML Element image Element generate Image Element element get Src element get Alt element get Style Id indent Level if element get Id null image Element add Attribute I IntroHTML Constants ATTRIBUTE ID element get Id return image Element  IntroImage imageSrc imageId IntroImage indentLevel HTMLElement HTMLElement generateIntroImage IntroImage indentLevel HTMLElement imageElement generateImageElement getSrc getAlt getStyleId indentLevel getId imageElement addAttribute IIntroHTMLConstants ATTRIBUTE_ID getId imageElement
Generate a paragraph lt P gt element from an Intro Text The paragraph element will contain a span element that will contain the actual text Providing the span element provides additional flexibility for CSS designers pre lt P gt lt SPAN gt span Content lt SPAN gt lt P gt pre param element the Intro Text param indent Level the number of indents to insert before the element when it is printed return a paragraph HTML Element private HTML Element generate Intro Text Intro Text element int indent Level String span Class element get Style Id null element get Style Id I IntroHTML Constants SPAN CLASS TEXT HTML Element text Element generate Text Element I IntroHTML Constants ELEMENT PARAGRAPH element get Id span Class element get Text indent Level return text Element  IntroText spanContent IntroText indentLevel HTMLElement HTMLElement generateIntroText IntroText indentLevel spanClass getStyleId getStyleId IIntroHTMLConstants SPAN_CLASS_TEXT HTMLElement textElement generateTextElement IIntroHTMLConstants ELEMENT_PARAGRAPH getId spanClass getText indentLevel textElement
param element param indent Level return private HTML Element generate Intro Title Intro Page Title element int indent Level HTML Element title Element generate Header Div element get Id element get Style Id I IntroHTML Constants ELEMENT H1 element get Title indent Level return title Element  indentLevel HTMLElement generateIntroTitle IntroPageTitle indentLevel HTMLElement titleElement generateHeaderDiv getId getStyleId IIntroHTMLConstants ELEMENT_H1 getTitle indentLevel titleElement
Generate inline content from an IntroHTML The content from the file referenced by the IntroHTML s code src code attribute is emitted as is into a div element pre lt div id quot attrvalue quot class quot attrvalue2 quot gt content from file specified in src attribute lt div gt pre param element the IntroHTML param indent Level the number of indents to insert before the element when it is printed return a div HTML Element or null if there was a problem reading from the file private HTML Element generate Inline IntroHTML IntroHTML element int indent Level String Buffer content read From File element get Src if content null content length 0 Create the outer div element String div Class element get Style Id null element get Style Id I IntroHTML Constants DIV CLASS INLINE HTML HTML Element div Element generate Div Element element get Id div Class indent Level add the content of the specified file into the div element div Element add Content content return div Element return null  indentLevel HTMLElement HTMLElement generateInlineIntroHTML indentLevel StringBuffer readFromFile getSrc divClass getStyleId getStyleId IIntroHTMLConstants DIV_CLASS_INLINE_HTML HTMLElement divElement generateDivElement getId divClass indentLevel divElement addContent divElement
Generate embedded content from an IntroHTML An OBJECT html element is created whose code data code attribute is equal to the IntroHTML s code src code value pre lt OBJECT type quot text html quot data quot attrvalue quot gt alternative text in case the object can not be rendered lt OBJECT gt pre param element the IntroHTML param indent Level the number of indents to insert before the element when it is printed return an object HTML Element private HTML Element generate Embedded IntroHTML IntroHTML element int indent Level HTML Element object Element new FormattedHTML Element I IntroHTML Constants ELEMENT OBJECT indent Level true object Element add Attribute I IntroHTML Constants ATTRIBUTE TYPE I IntroHTML Constants OBJECT TYPE if element get Id null object Element add Attribute I IntroHTML Constants ATTRIBUTE ID element get Id if element get Src null object Element add Attribute I IntroHTML Constants ATTRIBUTE DATA element get Src if element get Style Id null object Element add Attribute I IntroHTML Constants ATTRIBUTE CLASS element get Style Id The alternative content is added in case the browser can not render the specified content Intro Text html Text element get Intro Text if html Text null html Text get Text null String text Class html Text get Style Id null html Text get Style Id I IntroHTML Constants SPAN CLASS TEXT HTML Element text generate Text Element I IntroHTML Constants ELEMENT PARAGRAPH html Text get Id text Class element get Text indent Level if text null object Element add Content text if element get Intro Image null HTML Element img generate Intro Image element get Intro Image indent Level if img null object Element add Content img return object Element  indentLevel HTMLElement HTMLElement generateEmbeddedIntroHTML indentLevel HTMLElement objectElement FormattedHTMLElement IIntroHTMLConstants ELEMENT_OBJECT indentLevel objectElement addAttribute IIntroHTMLConstants ATTRIBUTE_TYPE IIntroHTMLConstants OBJECT_TYPE getId objectElement addAttribute IIntroHTMLConstants ATTRIBUTE_ID getId getSrc objectElement addAttribute IIntroHTMLConstants ATTRIBUTE_DATA getSrc getStyleId objectElement addAttribute IIntroHTMLConstants ATTRIBUTE_CLASS getStyleId IntroText htmlText getIntroText htmlText htmlText getText textClass htmlText getStyleId htmlText getStyleId IIntroHTMLConstants SPAN_CLASS_TEXT HTMLElement generateTextElement IIntroHTMLConstants ELEMENT_PARAGRAPH htmlText getId textClass getText indentLevel objectElement addContent getIntroImage HTMLElement generateIntroImage getIntroImage indentLevel objectElement addContent objectElement
Generates the BASE element for the head of the html document Each document can have only one base element pre lt BASE href baseURL gt pre param indent Level param baseURL return private HTML Element generate Base Element int indent Level String baseURL HTML Element base new FormattedHTML Element I IntroHTML Constants ELEMENT BASE indent Level true false if baseURL null base add Attribute I IntroHTML Constants ATTRIBUTE HREF baseURL return base  indentLevel HTMLElement generateBaseElement indentLevel HTMLElement FormattedHTMLElement IIntroHTMLConstants ELEMENT_BASE indentLevel addAttribute IIntroHTMLConstants ATTRIBUTE_HREF
Generates the style element that goes into HEAD pre lt style type quot text css quot gt HTML IMG border 0px lt style gt pre param indent Level the number of indents to insert before the element when it is printed return the style HTML Element private HTML Element generate Style Element int indent Level HTML Element style new FormattedHTML Element I IntroHTML Constants ELEMENT STYLE indent Level false style add Attribute I IntroHTML Constants ATTRIBUTE TYPE I IntroHTML Constants LINK STYLE style add Content I IntroHTML Constants STYLE HTML return style  indentLevel HTMLElement HTMLElement generateStyleElement indentLevel HTMLElement FormattedHTMLElement IIntroHTMLConstants ELEMENT_STYLE indentLevel addAttribute IIntroHTMLConstants ATTRIBUTE_TYPE IIntroHTMLConstants LINK_STYLE addContent IIntroHTMLConstants STYLE_HTML
Generates the title element and its content pre lt TITLE gt intro title lt TITLE gt pre param title the title of this intro page param indent Level the number of indents to insert before the element when it is printed return the title HTML Element private HTML Element generate Title Element String title int indent Level HTML Element title Element new FormattedHTML Element I IntroHTML Constants ELEMENT TITLE indent Level false if title null title Element add Content title return title Element  indentLevel HTMLElement HTMLElement generateTitleElement indentLevel HTMLElement titleElement FormattedHTMLElement IIntroHTMLConstants ELEMENT_TITLE indentLevel titleElement addContent titleElement
Generates a link element that refers to a cascading style sheet CSS pre lt LINK rel quot stylesheet quot style quot text css quot href quot style sheet quot gt pre param href the value of the href attribute for this link element param indent Level the number of indents to insert before the element when it is printed return a link HTML Element private HTML Element generate Link Element String href int indent Level HTML Element link new FormattedHTML Element I IntroHTML Constants ELEMENT LINK indent Level true false link add Attribute I IntroHTML Constants ATTRIBUTE RELATIONSHIP I IntroHTML Constants LINK REL link add Attribute I IntroHTML Constants ATTRIBUTE STYLE I IntroHTML Constants LINK STYLE if href null link add Attribute I IntroHTML Constants ATTRIBUTE HREF href return link  indentLevel HTMLElement HTMLElement generateLinkElement indentLevel HTMLElement FormattedHTMLElement IIntroHTMLConstants ELEMENT_LINK indentLevel addAttribute IIntroHTMLConstants ATTRIBUTE_RELATIONSHIP IIntroHTMLConstants LINK_REL addAttribute IIntroHTMLConstants ATTRIBUTE_STYLE IIntroHTMLConstants LINK_STYLE addAttribute IIntroHTMLConstants ATTRIBUTE_HREF
Generate an anchor element pre lt A id link Id class link Class href link Href gt lt A gt pre param link the Intro Link element that contains the value for the id and href attributes param indent Level the number of indents to insert before the element when it is printed return an anchor lt A gt HTML Element private HTML Element generate Anchor Element Intro Link link int indent Level HTML Element anchor new FormattedHTML Element I IntroHTML Constants ELEMENT ANCHOR indent Level true if link get Id null anchor add Attribute I IntroHTML Constants ATTRIBUTE ID link get Id if link get Url null anchor add Attribute I IntroHTML Constants ATTRIBUTE HREF link get Url if link get Style Id null anchor add Attribute I IntroHTML Constants ATTRIBUTE CLASS link get Style Id else anchor add Attribute I IntroHTML Constants ATTRIBUTE CLASS I IntroHTML Constants ANCHOR CLASS LINK return anchor  linkId linkClass linkHref IntroLink indentLevel HTMLElement HTMLElement generateAnchorElement IntroLink indentLevel HTMLElement FormattedHTMLElement IIntroHTMLConstants ELEMENT_ANCHOR indentLevel getId addAttribute IIntroHTMLConstants ATTRIBUTE_ID getId getUrl addAttribute IIntroHTMLConstants ATTRIBUTE_HREF getUrl getStyleId addAttribute IIntroHTMLConstants ATTRIBUTE_CLASS getStyleId addAttribute IIntroHTMLConstants ATTRIBUTE_CLASS IIntroHTMLConstants ANCHOR_CLASS_LINK
Generates a div block that contains a header and span element pre lt DIV id div Id gt lt H gt lt SPAN gt span Content lt SPAN gt lt H gt lt DIV gt pre param div Id the id of the div to create param div Class the class of the div param header Type what type of header to create e g H1 H2 etc param span Content the span content param indent Level the number of indents to insert before the element when it is printed return a div HTML Element that contains a header private HTML Element generate Header Div String div Id String div Class String header Type String span Content int indent Level create the text element P SPAN span Content SPAN P HTML Element text generate Text Element header Type null null span Content indent Level 1 create the containing div element HTML Element div generate Div Element div Id div Class indent Level div add Content text return div  divId spanContent divId divClass headerType spanContent indentLevel HTMLElement HTMLElement generateHeaderDiv divId divClass headerType spanContent indentLevel spanContent HTMLElement generateTextElement headerType spanContent indentLevel HTMLElement generateDivElement divId divClass indentLevel addContent
Generates a span element inside a text element where the text element can be a P paragraph or any of the H Header elements Providing the span element provides additional flexibility for CSS designers pre lt P gt lt SPAN gt span Content lt SPAN gt lt P gt pre param type the type of text element to create e g P H1 H2 etc param spanID the id of the span element or null param span Class the class of the span element or null param span Content the span content param indent Level the number of indents to insert before the element when it is printed return a text HTML Element that contains a span element private HTML Element generate Text Element String type String spanID String span Class String span Content int indent Level Create the span SPAN span Content SPAN HTML Element span new HTML Element I IntroHTML Constants ELEMENT SPAN if spanID null span add Attribute I IntroHTML Constants ATTRIBUTE ID spanID if span Class null span add Attribute I IntroHTML Constants ATTRIBUTE CLASS span Class if span Content null span add Content span Content Create the enclosing text element P SPAN span Content SPAN P HTML Element text new FormattedHTML Element type indent Level false text add Content span return text  spanContent spanClass spanContent indentLevel HTMLElement HTMLElement generateTextElement spanClass spanContent indentLevel spanContent HTMLElement HTMLElement IIntroHTMLConstants ELEMENT_SPAN addAttribute IIntroHTMLConstants ATTRIBUTE_ID spanClass addAttribute IIntroHTMLConstants ATTRIBUTE_CLASS spanClass spanContent addContent spanContent spanContent HTMLElement FormattedHTMLElement indentLevel addContent
Generates a DIV element with the provided indent id and class param div Id value for the div s id attribute param div Class value for the div s class attribute param indent Level the number of indents to insert before the element when it is printed return a div HTML Element private HTML Element generate Div Element String div Id String div Class int indent Level HTML Element div generate Div Element div Id indent Level div add Attribute I IntroHTML Constants ATTRIBUTE CLASS div Class return div  divId divClass indentLevel HTMLElement HTMLElement generateDivElement divId divClass indentLevel HTMLElement generateDivElement divId indentLevel addAttribute IIntroHTMLConstants ATTRIBUTE_CLASS divClass
Generates a DIV element with the provided indent and id param div Id value for the div s id attribute param indent Level the number of indents to insert before the element when it is printed return a div HTML Element private HTML Element generate Div Element String div Id int indent Level HTML Element div new FormattedHTML Element I IntroHTML Constants ELEMENT DIV indent Level true if div Id null div add Attribute I IntroHTML Constants ATTRIBUTE ID div Id return div  divId indentLevel HTMLElement HTMLElement generateDivElement divId indentLevel HTMLElement FormattedHTMLElement IIntroHTMLConstants ELEMENT_DIV indentLevel divId addAttribute IIntroHTMLConstants ATTRIBUTE_ID divId
Generates an IMG element pre lt IMG src image Src alt alt Text gt pre param image Src the value to be supplied to the src attribute param indent Level the number of indents to insert before the element when it is printed return an img HTML Element private HTML Element generate Image Element String image Src String alt Text String image Class int indent Level HTML Element image new FormattedHTML Element I IntroHTML Constants ELEMENT IMG indent Level true false image add Attribute I IntroHTML Constants ATTRIBUTE SRC image Src if alt Text null alt Text NON NLS 1 image add Attribute I IntroHTML Constants ATTRIBUTE ALT alt Text if image Class null image add Attribute I IntroHTML Constants ATTRIBUTE CLASS image Class return image  imageSrc altText imageSrc indentLevel HTMLElement HTMLElement generateImageElement imageSrc altText imageClass indentLevel HTMLElement FormattedHTMLElement IIntroHTMLConstants ELEMENT_IMG indentLevel addAttribute IIntroHTMLConstants ATTRIBUTE_SRC imageSrc altText altText addAttribute IIntroHTMLConstants ATTRIBUTE_ALT altText imageClass addAttribute IIntroHTMLConstants ATTRIBUTE_CLASS imageClass
Generate a span element pre lt SPAN class span Class gt lt SPAN gt pre param span Class the value to be supplied to the class attribute param indent Level the number of indents to insert before the element when it is printed return a span HTML Element private HTML Element generate Span Element String span Class int indent Level HTML Element span new FormattedHTML Element I IntroHTML Constants ELEMENT SPAN indent Level false span add Attribute I IntroHTML Constants ATTRIBUTE CLASS span Class return span  spanClass spanClass indentLevel HTMLElement HTMLElement generateSpanElement spanClass indentLevel HTMLElement FormattedHTMLElement IIntroHTMLConstants ELEMENT_SPAN indentLevel addAttribute IIntroHTMLConstants ATTRIBUTE_CLASS spanClass
private boolean filtered From Presentation Abstract Intro Element element if element is Of Type Abstract Intro Element BASE ELEMENT return Abstract Base Intro Element element is Filtered else return false  filteredFromPresentation AbstractIntroElement isOfType AbstractIntroElement BASE_ELEMENT AbstractBaseIntroElement isFiltered
Reads the content of the file referred to by the code src code parameter and returns the content in the form of a String Buffer If the file read contains substitution segments of the form plugin plugin id then this method will make the proper substitution the segment will be replaced with the absolute path to the plugin with id plugin id param src the file that contains the target conent return a String Buffer containing the content in the file or null private String Buffer read From File String src if src null return null Input Stream stream null String Buffer content new String Buffer Buffered Reader reader null try URL url new URL src stream url open Stream TODO Do we need to worry about the encoding here e g reader new Buffered Reader new Input Stream Reader stream Resources Plugin get Encoding reader new Buffered Reader new Input Stream Reader stream while true int character reader read if character 1 EOF break done reading file else if character Plugin Id Parser SUBSTITUTION BEGIN possible substitution Plugin Id Parser parser new Plugin Id Parser character reader If a valid plugin id was found in the proper format text will be the absolute path to that plugin Otherwise text will simply be all characters read up to but not including the next dollar sign that follows the one just found String text parser parse Plugin Id if text null content append text else make sure character is in char range before making cast if character 0x00 character 0xffff content append char character else content append character catch Exception exception Log error Error reading from file exception NON NLS 1 finally try if reader null reader close if stream null stream close catch IO Exception e Log error Error closing input stream e NON NLS 1 return null return content  StringBuffer plugin_id plugin_id StringBuffer StringBuffer readFromFile InputStream StringBuffer StringBuffer BufferedReader openStream BufferedReader InputStreamReader ResourcesPlugin getEncoding BufferedReader InputStreamReader PluginIdParser SUBSTITUTION_BEGIN PluginIdParser PluginIdParser parsePluginId IOException
protected Plugin Id Parser char token Begin Buffered Reader bufferedreader reader bufferedreader token Content new String Buffer token Begin plugin Id new String Buffer  PluginIdParser tokenBegin BufferedReader tokenContent StringBuffer tokenBegin pluginId StringBuffer
protected Plugin Id Parser int token Begin Buffered Reader bufferedreader reader bufferedreader token Content new String Buffer plugin Id new String Buffer make sure token Begin is in char range before making cast if token Begin 0x00 token Begin 0xffff token Content append char token Begin  PluginIdParser tokenBegin BufferedReader tokenContent StringBuffer pluginId StringBuffer tokenBegin tokenBegin tokenBegin tokenContent tokenBegin
This method should be called after the initial substitution identifier has been read in the substition string begins and ends with the character A properly formatted substitution string is of the form code plugin plugin id code the initial is immediately followed by the plugin segment the code plugin id code refers to a valid installed plugin the substitution string is terminated by a closing If the above conditions are not met no substitution occurs If the above conditions are met the content between and including the opening and closing characters will be replaced by the absolute path to the plugin return protected String parse Plugin Id if reader null token Content null plugin Id null return null try Mark the current position of the reader so we can roll back to this point if the proper plugin segment is not found Use 1024 as our read Ahead Limit reader mark 0x400 if find Valid Plugin Segment String plugin Path get Plugin Path if plugin Path null Didn t find a valid plugin id return token Content which contains all characters read up to not including the last if the last is part of a subsequent plugin segment it can still be processed properly return token Content to String else return plugin Path else The plugin segment was not found Reset the reader so we can continue reading character by character reader reset return token Content to String catch IO Exception exception Log error Error reading from file exception NON NLS 1 return token Content to String  plugin_id plugin_id parsePluginId tokenContent pluginId readAheadLimit findValidPluginSegment pluginPath getPluginPath pluginPath tokenContent tokenContent toString pluginPath tokenContent toString IOException tokenContent toString
This method should be called after an initial substitution character has been found that is after a It looks at the subsequent characters in the input stream to determine if they match the expected code plugin code segment of the substitution string If the expected characters are found they will be appended to the token Content String Buffer and the method will return true If they are not found false is returned and the caller should reset the Buffered Reader to the position it was in before this method was called Resetting the reader ensures that the characters read in this method can be re examined in case one of them happens to be the beginning of a valid substitution segment return true if the next characters match code plugin code and false otherwise private boolean find Valid Plugin Segment final char PLUGIN SEGMENT p l u g i n char stream Content new char PLUGIN SEGMENT length try int peek reader read stream Content 0 PLUGIN SEGMENT length if peek PLUGIN SEGMENT length HTML Util equal Char Array Content stream Content PLUGIN SEGMENT we have found the plugin segment token Content append stream Content return true The plugin segment did not immediately follow the initial return false catch IO Exception exception Log error Error reading from file exception NON NLS 1 return false  tokenContent StringBuffer BufferedReader findValidPluginSegment PLUGIN_SEGMENT streamContent PLUGIN_SEGMENT streamContent PLUGIN_SEGMENT PLUGIN_SEGMENT HTMLUtil equalCharArrayContent streamContent PLUGIN_SEGMENT tokenContent streamContent IOException
This method continues to read from the input stream until either the end of the file is reached or until a character is found that indicates the end of the substitution If the SUBSTITUTION END character is found the method looks up the plugin id that has been built up to see if it is a valid id If so return the absolute path to that plugin If not return null This method assumes that the reader is positioned just after a valid code plugin code segment in a substitution string return absolute path of the plugin id if valid null otherwise private String get Plugin Path try while true int next Char reader read if next Char 1 reached EOF while looking for closing return null else if next Char SUBSTITUTION END end of plugin id look up the plugin id If it is a valid id return the absolute path to this plugin otherwise return null String path HTML Util get Resolved Bundle Location plugin Id to String If the plugin id was not valid reset reader to the previous mark The mark should be at the character just before the last dollar sign if path null reader reset return path else we have a regular character mark the most recent non dollar char in case we don t find a valid plugin id and have to roll back Use 1024 as our read Ahead Limit reader mark 0x400 Add this character to the plugin Id and token Content String make sure we have a valid character before performing cast if next Char 0x00 next Char 0xffff token Content append char next Char only include non whitespace characters in plugin id if Character is Whitespace char next Char plugin Id append char next Char else token Content append next Char plugin Id append next Char catch IO Exception exception Log error Error reading from file exception NON NLS 1 return null  SUBSTITUTION_END getPluginPath nextChar nextChar nextChar SUBSTITUTION_END HTMLUtil getResolvedBundleLocation pluginId toString readAheadLimit pluginId tokenContent nextChar nextChar tokenContent nextChar isWhitespace nextChar pluginId nextChar tokenContent nextChar pluginId nextChar IOException

The constructor public Intro Plugin super  IntroPlugin
Returns the shared plugin instance public static Intro Plugin get Default return inst  IntroPlugin getDefault
Returns the string from the plugin s resource bundle or key if not found public static String get String String key try Resource Bundle bundle Intro Plugin get Default get Resource Bundle return bundle null bundle get String key key catch Missing Resource Exception e Log warning Intro Plugin unable to load resource bundle NON NLS 1 ok to return Key return key  getString ResourceBundle IntroPlugin getDefault getResourceBundle getString MissingResourceException IntroPlugin
Utility method to get a resource from the given key then format it with the given substitutions br public static String get Formatted String String key Object args return Message Format format get String key args  getFormattedString MessageFormat getString
Returns the plugin s resource bundle public Resource Bundle get Resource Bundle return resource Bundle  ResourceBundle getResourceBundle resourceBundle
return Returns the extension Point Manager public Extension Point Manager get Extension Point Manager return Extension Point Manager get Inst  extensionPointManager ExtensionPointManager getExtensionPointManager ExtensionPointManager getInst
Returns the model root Will always guarantee that model is loaded return Returns the intro Model Root public Intro Model Root get Intro Model Root return get Extension Point Manager get Current Model  introModelRoot IntroModelRoot getIntroModelRoot getExtensionPointManager getCurrentModel
Returns the Intro Part public static I Intro Part get Intro I Intro Part intro Part PlatformUI get Workbench get Intro Manager get Intro return intro Part  IIntroPart getIntro IIntroPart introPart getWorkbench getIntroManager getIntro introPart
Returns the Intro Part after forcing an open on it public static I Intro Part show Intro boolean standby I Intro Part intro Part PlatformUI get Workbench get Intro Manager show Intro PlatformUI get Workbench get Active Workbench Window standby return intro Part  IIntroPart showIntro IIntroPart introPart getWorkbench getIntroManager showIntro getWorkbench getActiveWorkbenchWindow introPart
Returns the standby state of the Intro Part If the intro is closed retruns false public static boolean is Intro Standby return PlatformUI get Workbench get Intro Manager is Intro Standby get Intro  isIntroStandby getWorkbench getIntroManager isIntroStandby getIntro
Sets the standby state of the Intro Part If the intro is closed retruns false public static void set Intro Standby boolean standby PlatformUI get Workbench get Intro Manager set Intro Standby get Intro standby  setIntroStandby getWorkbench getIntroManager setIntroStandby getIntro
Returns the standby state of the Intro Part If the intro is closed retruns false public static boolean close Intro Relies on Workbench return PlatformUI get Workbench get Intro Manager close Intro get Intro  closeIntro getWorkbench getIntroManager closeIntro getIntro
public void start Bundle Context context throws Exception super start context inst this try resource Bundle Resource Bundle get Bundle INTRO RESOURCE BUNDLE catch Missing Resource Exception x resource Bundle null Log warning Intro Plugin unable to load resource bundle NON NLS 1  BundleContext resourceBundle ResourceBundle getBundle INTRO_RESOURCE_BUNDLE MissingResourceException resourceBundle IntroPlugin
see org osgi framework Bundle Activator stop org osgi framework Bundle Context public void stop Bundle Context context throws Exception super stop context  BundleActivator BundleContext BundleContext

Abstract Base Intro Element I Configuration Element element super element style id element get Attribute ATT STYLE ID filtered From element get Attribute ATT FIlTERED FROM  AbstractBaseIntroElement IConfigurationElement style_id getAttribute ATT_STYLE_ID filteredFrom getAttribute ATT_FIlTERED_FROM
Abstract Base Intro Element Element element Bundle bundle super element bundle style id get Attribute element ATT STYLE ID filtered From get Attribute element ATT FIlTERED FROM  AbstractBaseIntroElement style_id getAttribute ATT_STYLE_ID filteredFrom getAttribute ATT_FIlTERED_FROM
Filter this element out based on the presentation kind private boolean check Filter State if this is Of Type Abstract Intro Element MODEL ROOT root element is not filtered return false Intro Model Root root Intro Model Root get Parent Page get Parent return root get Presentation get Implementation Kind equals filtered From true false  checkFilterState isOfType AbstractIntroElement MODEL_ROOT IntroModelRoot IntroModelRoot getParentPage getParent getPresentation getImplementationKind filteredFrom
return Returns the class id public String get Style Id return style id  getStyleId style_id
return Returns the filter kind public String get Filtered From return filtered From  filter_kind getFilteredFrom filteredFrom
Return the filter state of this intro element We need to do this when this element has been added to the model and it has a parent Also this method will not be valid if the UI has not been loaded yet because it it the creation of the UI that determines the presentation details return Returns the is Filtered public boolean is Filtered return check Filter State is Filtered  isFiltered isFiltered checkFilterState isFiltered
public void set Filter State boolean state is Filtered state  setFilterState isFiltered
protected void set Parent Abstract Intro Element parent super set Parent parent  setParent AbstractIntroElement setParent

param element Abstract Intro Container I Configuration Element element super element  AbstractIntroContainer IConfigurationElement
param element Abstract Intro Container Element element Bundle bundle super element bundle this element element  AbstractIntroContainer
Get the children of this container Loading children and resolving includes and extension is delayed until this method call return Returns all the children of this container public Abstract Intro Element get Children if loaded load Children if loaded if loaded still is false something went wrong This could happen when loading content from another external content files return new Abstract Intro Element 0 if resolved resolve Children Abstract Intro Element children Elements Abstract Intro Element convert To Model Array children Abstract Intro Element ELEMENT return children Elements  AbstractIntroElement getChildren loadChildren AbstractIntroElement resolveChildren AbstractIntroElement childrenElements AbstractIntroElement convertToModelArray AbstractIntroElement childrenElements
Returns all the children of this container that are of the specified type s br An example of an element mask is as follows p code int element Mask Intro Element IMAGE Intro Element DEFAULT LINK int element Mask Intro Element ABSTRACT CONTAINER code The return type is determined depending on the mask If the mask is a predefined constant in the Intro Element and it does not correspond to an abstract model class then the object returned can be safely cast to an array of the corresponding model class For exmaple the following code gets all groups in the given page in the same order they appear in the plugin xml markup p code Introgroup groups Intro Group page get Children Of Type Intro Element GROUP code However if the element mask is not homogenous for example LINKS GROUP then the returned array must be cast to an array of Intro Elements For exmaple the following code gets all images and links in the given page in the same order they appear in the plugin xml markup p code int element Mask Intro Element IMAGE Intro Element DEFAULT LINK Intro Element images And Links Intro Element page get Children Of Type element Mask code return An array of elements of the right type If the container has no children or no children of the specified types returns an empty array public Object get Children Of Type int element Mask Abstract Intro Element children Elements get Children if we have no children we still need to return an empty array of the correct type Vector typed Children new Vector for int i 0 i children Elements length i Abstract Intro Element element children Elements i if element is Of Type element Mask typed Children add Element element return convert To Model Array typed Children element Mask  elementMask IntroElement IntroElement DEFAULT_LINK elementMask IntroElement ABSTRACT_CONTAINER IntroElement IntroGroup getChildrenOfType IntroElement IntroElements elementMask IntroElement IntroElement DEFAULT_LINK IntroElement imagesAndLinks IntroElement getChildrenOfType elementMask getChildrenOfType elementMask AbstractIntroElement childrenElements getChildren typedChildren childrenElements AbstractIntroElement childrenElements isOfType elementMask typedChildren addElement convertToModelArray typedChildren elementMask
Utility method to convert all the content of a vector of Abstract Intro Elements into an array of Intro Elements cast to the correct class type It is assumed that all elements in this vector are Intro Element instances If element Mask is a predefined model type ie homogenous then return array of corresponding type Else returns an array of Intro Elements param vector private Object convert To Model Array Vector vector int element Mask int size vector size Object src null switch element Mask homogenous vector case Abstract Intro Element GROUP src new Intro Group size break case Abstract Intro Element LINK src new Intro Link size break case Abstract Intro Element TEXT src new Intro Text size break case Abstract Intro Element IMAGE src new Intro Image size break case Abstract Intro Element HTML src new IntroHTML size break case Abstract Intro Element INCLUDE src new Intro Include size break case Abstract Intro Element PAGE src new Intro Page size break case Abstract Intro Element ABSTRACT PAGE src new Abstract Intro Page size break case Abstract Intro Element ABSTRACT CONTAINER src new Abstract Intro Container size break case Abstract Intro Element HEAD src new Intro Head size break case Abstract Intro Element PAGE TITLE src new Intro Page Title size break default now handle left over abstract types Vector is not homogenous src src new Abstract Intro Element size break if src null return new Object 0 else vector copy Into src return src  AbstractIntroElements IntroElements IntroElement elementMask IntroElements convertToModelArray elementMask elementMask AbstractIntroElement IntroGroup AbstractIntroElement IntroLink AbstractIntroElement IntroText AbstractIntroElement IntroImage AbstractIntroElement AbstractIntroElement IntroInclude AbstractIntroElement IntroPage AbstractIntroElement ABSTRACT_PAGE AbstractIntroPage AbstractIntroElement ABSTRACT_CONTAINER AbstractIntroContainer AbstractIntroElement IntroHead AbstractIntroElement PAGE_TITLE IntroPageTitle AbstractIntroElement copyInto
Load all the children of this container A container can have other containers links htmls text image include Load them in the order they appear in the xml content file protected void load Children init the children vector children new Vector Node List node List element get Child Nodes Vector vector new Vector for int i 0 i node List get Length i Node node node List item i if node get Node Type Node ELEMENT NODE vector add node Element filtered Elements new Element vector size vector copy Into filtered Elements add the elements at the end children s vector insert Elements Before filtered Elements get Bundle children size loaded true free DOM model for memory performance element null  loadChildren NodeList nodeList getChildNodes nodeList getLength nodeList getNodeType ELEMENT_NODE filteredElements copyInto filteredElements insertElementsBefore filteredElements getBundle
Adds the given elements as children of this container before the specified index param child Elements protected void insert Elements Before Element child Elements Bundle bundle int index for int i 0 i child Elements length i Element child Element child Elements i Abstract Intro Element child get Model Child child Element bundle if child null child set Parent this children add index child index is only incremented if we actually added a child index  childElements insertElementsBefore childElements childElements childElement childElements AbstractIntroElement getModelChild childElement setParent
Adds the given elements as children of this container before the specified element The element must be a direct child of this container param child Elements protected void insert Elements Before Element child Elements Bundle bundle Abstract Intro Element child int child Location children index Of child if child Location 1 bad reference child return insert Elements Before child Elements bundle child Location  childElements insertElementsBefore childElements AbstractIntroElement childLocation indexOf childLocation insertElementsBefore childElements childLocation
Adds a child to this container depending on its type Subclasses may override if there is a child specific to the subclass param child Elements protected Abstract Intro Element get Model Child Element child Element Bundle bundle Abstract Intro Element child null if child Element get Node Name equals Ignore Case Intro Group TAG GROUP child new Intro Group child Element bundle else if child Element get Node Name equals Ignore Case Intro Link TAG LINK child new Intro Link child Element bundle else if child Element get Node Name equals Ignore Case Intro Text TAG TEXT child new Intro Text child Element bundle else if child Element get Node Name equals Ignore Case Intro Image TAG IMAGE child new Intro Image child Element bundle else if child Element get Node Name equals Ignore Case IntroHTML TAG HTML child new IntroHTML child Element bundle else if child Element get Node Name equals Ignore Case Intro Include TAG INCLUDE child new Intro Include child Element bundle else if child Element get Node Name equals Ignore Case Intro Anchor TAG ANCHOR child new Intro Anchor child Element bundle return child  childElements AbstractIntroElement getModelChild childElement AbstractIntroElement childElement getNodeName equalsIgnoreCase IntroGroup TAG_GROUP IntroGroup childElement childElement getNodeName equalsIgnoreCase IntroLink TAG_LINK IntroLink childElement childElement getNodeName equalsIgnoreCase IntroText TAG_TEXT IntroText childElement childElement getNodeName equalsIgnoreCase IntroImage TAG_IMAGE IntroImage childElement childElement getNodeName equalsIgnoreCase TAG_HTML childElement childElement getNodeName equalsIgnoreCase IntroInclude TAG_INCLUDE IntroInclude childElement childElement getNodeName equalsIgnoreCase IntroAnchor TAG_ANCHOR IntroAnchor childElement
Resolve each include in this container s children protected void resolve Children for int i 0 i children size i Abstract Intro Element child Abstract Intro Element children element At i if child get Type Abstract Intro Element INCLUDE resolve Include Intro Include child resolved true  resolveChildren AbstractIntroElement AbstractIntroElement elementAt getType AbstractIntroElement resolveInclude IntroInclude
Resolves an include Gets the intro element pointed to by the include and adds it as a child of this current container If target is not a group or any element that can be included in a group ignore this include param include private void resolve Include Intro Include include Abstract Intro Element target find Include Target include if target null target could not be found return if target is Of Type Abstract Intro Element GROUP Abstract Intro Element ABSTRACT TEXT Abstract Intro Element IMAGE Abstract Intro Element TEXT Abstract Intro Element PAGE TITLE be picky about model elements to include Can not use BASE ELEMENT model class because pages can not be included insert Target include target  resolveInclude IntroInclude AbstractIntroElement findIncludeTarget isOfType AbstractIntroElement AbstractIntroElement ABSTRACT_TEXT AbstractIntroElement AbstractIntroElement AbstractIntroElement PAGE_TITLE BASE_ELEMENT insertTarget
Find the target element pointed to by the path in the include It is assumed that config Id always points to an external config and not the same config of the inlcude param include param path return private Abstract Intro Element find Include Target Intro Include include String path include get Path Intro Model Root target Model Root Intro Model Root get Parent Page get Parent String target ConfigID include get Config Id if target ConfigID null target Model Root Extension Point Manager get Inst get Model target ConfigID if target Model Root null if the target config was not found skip this include return null Abstract Intro Element target find Target target Model Root path return target  configId AbstractIntroElement findIncludeTarget IntroInclude getPath IntroModelRoot targetModelRoot IntroModelRoot getParentPage getParent targetConfigID getConfigId targetConfigID targetModelRoot ExtensionPointManager getInst getModel targetConfigID targetModelRoot AbstractIntroElement findTarget targetModelRoot
Finds the child element that corresponds to the given path in a model param model param path return public Abstract Intro Element find Target Intro Model Root model String path extract path segments Get first segment to start search String path Segments path split NON NLS 1 if model null if the target config was not found return return null Abstract Intro Element target model find Child path Segments 0 if target null there is no element with the specified path return null found parent segment now find each child segment for int i 1 i path Segments length i if target is Of Type Abstract Intro Element ABSTRACT CONTAINER parent is not a container so no point going on return null String path Segment path Segments i target Abstract Intro Container target find Child path Segment if target null tried to find next segment and failed return null return target  AbstractIntroElement findTarget IntroModelRoot pathSegments AbstractIntroElement findChild pathSegments pathSegments isOfType AbstractIntroElement ABSTRACT_CONTAINER pathSegment pathSegments AbstractIntroContainer findChild pathSegment
see org eclipse ui internal intro impl model Intro Element get Type public Abstract Intro Element find Child String element Id return find Child element Id ID ELEMENT  IntroElement getType AbstractIntroElement findChild elementId findChild elementId ID_ELEMENT
public Abstract Intro Element find Child String element Id int element Mask if loaded load Children for int i 0 i children size i Abstract Intro Element a Child Abstract Intro Element children element At i if a Child is Of Type ID ELEMENT includes and heads do not have ids and so can not be referenced directly This means that they can not be targets for other includes Skip just in case someone adds an id to it Also this applies to all elements in the model that do not have ids continue Abstract Intro Id Element child Abstract Intro Id Element a Child if child get Id null child get Id equals element Id child is Of Type element Mask return child no child with given id amd type found return null  AbstractIntroElement findChild elementId elementMask loadChildren AbstractIntroElement aChild AbstractIntroElement elementAt aChild isOfType ID_ELEMENT AbstractIntroIdElement AbstractIntroIdElement aChild getId getId elementId isOfType elementMask
private void insert Target Intro Include include Abstract Intro Element target int include Location children index Of include if include Location 1 should never be here return children remove include Location handle merging target styles first before changing target parent to enable inheritance of styles handle Include Style Inheritence include target now clone the target node because original model should be kept intact Abstract Intro Element cloned Target null try cloned Target Abstract Intro Element target clone catch Clone Not Supported Exception ex should never be here Log error Failed to clone Intro model node ex NON NLS 1 return set parent of cloned target to be this container cloned Target set Parent this children insert Element At cloned Target include Location  insertTarget IntroInclude AbstractIntroElement includeLocation indexOf includeLocation includeLocation handleIncludeStyleInheritence AbstractIntroElement clonedTarget clonedTarget AbstractIntroElement CloneNotSupportedException clonedTarget setParent insertElementAt clonedTarget includeLocation
Updates the inherited styles based on the merge style attribute If we are including a shared group or if we are including an element from the same page do nothing For inherited alt styles we have to cache the pd from which we inherited the styles to be able to access resources in that plugin Also note that when including an container it must be resolved otherwise reparenting will cause includes in this target containet to fail param include param target private void handle Include Style Inheritence Intro Include include Abstract Intro Element target if include get Merge Style false target styles are not needed nothing to do return if target get Parent get Type Abstract Intro Element MODEL ROOT target get Parent Page equals include get Parent Page If we are including from this same page ie target is in the same page OR if we are including a shared group defined under a config do not include styles return Update the parent page styles skip style if it is null Note include both the target page styles and inherited styles The full page styles need to be include String style target get Parent Page get Style if style null get Parent Page add Style style for alt style cache bundle for loading resources style target get Parent Page get Alt Style if style null Bundle bundle target get Bundle get Parent Page add Alt Style style bundle now add inherited styles Race condition could happen here if Page A is including from Page B which is in turn including from Page A get Parent Page add Styles target get Parent Page get Styles get Parent Page add Alt Styles target get Parent Page get Alt Styles  handleIncludeStyleInheritence IntroInclude AbstractIntroElement getMergeStyle getParent getType AbstractIntroElement MODEL_ROOT getParentPage getParentPage getParentPage getStyle getParentPage addStyle getParentPage getAltStyle getBundle getParentPage addAltStyle getParentPage addStyles getParentPage getStyles getParentPage addAltStyles getParentPage getAltStyles
Creates a clone of the given target node A clone is create by simply recreating that protion of the model Note looked into the clonable interface in Java but it was not used because it makes modifications additions to the model harder to maintain Will revisit later param targer return protected Abstract Intro Element clone Target Abstract Intro Element targer return null  AbstractIntroElement cloneTarget AbstractIntroElement
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element ABSTRACT CONTAINER  IntroElement getType getType AbstractIntroElement ABSTRACT_CONTAINER
return Returns the loaded protected boolean is Loaded return loaded  isLoaded
Deep copy since class has mutable objects Leave DOM element as a shallow reference copy since DOM is immutable public Object clone throws Clone Not Supported Exception Abstract Intro Container clone Abstract Intro Container super clone clone children new Vector if children null for int i 0 i children size i Abstract Intro Element clone Child Abstract Intro Element Abstract Intro Element children element At i clone clone Child set Parent clone clone children add i clone Child return clone  CloneNotSupportedException AbstractIntroContainer AbstractIntroContainer AbstractIntroElement cloneChild AbstractIntroElement AbstractIntroElement elementAt cloneChild setParent cloneChild

Constructor used when model elements are being loaded from plugin xml Abstract Intro Element I Configuration Element element cfg Element element bundle Model Loader Util get Bundle From Configuration Element cfg Element  AbstractIntroElement IConfigurationElement cfgElement ModelLoaderUtil getBundleFromConfigurationElement cfgElement
Constructor used when model elements are being loaded from an xml content file param element param pd Abstract Intro Element Element element Bundle bundle this bundle bundle  AbstractIntroElement
Returns the configuration element from which this intro element was loaded In the case of extension returns the configuration element of the defining extension return public I Configuration Element get Cfg Element return cfg Element  IConfigurationElement getCfgElement cfgElement
DOM get Attribute retruns an empty string not null if attribute is not defined Override this behavior to be consistent with Intro Model and I Configuration element param element param att return protected String get Attribute Element element String att if element has Attribute att return element get Attribute att else return null  getAttribute IConfiguration getAttribute hasAttribute getAttribute
Returns the plugin descriptor of the plugin from which this intro element was loaded In the case of extension returns the plugin descriptor of the plugin defining the extension return public Bundle get Bundle return bundle  getBundle
Returns the specific model type of this intro element To be implemented by all subclasses return returns one of the model class types defined in this class 
Returns the parent of this intro element p Rules ul li For the model root it retruns null li li For the intro Part presentation it returns a model root li li For Pages it returns an intro model root li li For all other elements it retruns a subclass of abstract container li li for divs that are children of configs shared divs it returns the holding model root li li for Head elements that are children of Implementation elements shared Heads it returns the holding presentation element li ul return returns the parent of this intro element Null only for model root public Abstract Intro Element get Parent return parent  introPart AbstractIntroElement getParent
param parent The parent to set protected void set Parent Abstract Intro Element parent this parent parent  setParent AbstractIntroElement
Returns the parent page holding this intro element For the model root and the intro Part presentation it returns null For Pages it returns the page itself For all other element returns the holding page p Exceptions ul li for divs that are children of configs shared divs it returns null li li for Head elements that are children of Implementation elements shared Heads it returns null li ul public Abstract Intro Page get Parent Page return yourself if you are a page if is Of Type Abstract Intro Element ABSTRACT PAGE return Abstract Intro Page this Abstract Intro Element parent get Parent if parent null return null while parent null parent get Parent null parent is Of Type Abstract Intro Element ABSTRACT PAGE parent parent get Parent if parent is Of Type ABSTRACT PAGE return Abstract Intro Page parent else return null  introPart AbstractIntroPage getParentPage isOfType AbstractIntroElement ABSTRACT_PAGE AbstractIntroPage AbstractIntroElement getParent getParent isOfType AbstractIntroElement ABSTRACT_PAGE getParent isOfType ABSTRACT_PAGE AbstractIntroPage
Returns whether the element is among the specified element types An example of an element mask is as follows p code int element Mask Intro Element ABSTRACT CONTAINER int element Mask Intro Element DIV Intro Element DEFAULT LINK code param element Mask element mask formed by bitwise OR of element type constants defined in this class return code true code if this element has a matching type and code false code otherwise public boolean is Of Type int element Mask return get Type element Mask 0  elementMask IntroElement ABSTRACT_CONTAINER elementMask IntroElement IntroElement DEFAULT_LINK elementMask isOfType elementMask getType elementMask
Returns whether the types of all the elements in the given array are among the specified element types br An example of an element mask is as follows p code int element Mask Intro Element DIV Intro Element DEFAULT LINK code return code true code if all elements are of the right type and code false code if the list is empty or at least one element is not of the specified types public static final boolean all Elements Are Of Type Abstract Intro Element elements int element Mask if we have an empty list no point going on if elements length 0 return false for int i 0 i elements length i Abstract Intro Element element elements i if element is Of Type element Mask return false return true  elementMask IntroElement IntroElement DEFAULT_LINK allElementsAreOfType AbstractIntroElement elementMask AbstractIntroElement isOfType elementMask
Shallow copy Note not all parents are cloned One parent has many children The design of cloning this model assumes that when a container is cloned all its children must be cloned and reparented to it hence one clone of this container object This is why we have a shallow copy here public Object clone throws Clone Not Supported Exception return super clone  CloneNotSupportedException

protected String id Abstract Intro Id Element I Configuration Element element super element id element get Attribute ATT ID  AbstractIntroIdElement IConfigurationElement getAttribute ATT_ID
Abstract Intro Id Element Element element Bundle bundle super element bundle id get Attribute element ATT ID  AbstractIntroIdElement getAttribute ATT_ID
return Returns the id public String get Id return id  getId

param element Abstract Intro Page Element element Bundle bundle super element bundle content get Attribute element ATT CONTENT if content null init element bundle else Content is not null Resolve it Other attributes will be loaded when xml content file is loaded content Intro Model Root get Plugin Location content bundle  AbstractIntroPage getAttribute ATT_CONTENT IntroModelRoot getPluginLocation
private void init Element element Bundle bundle style get Attribute element ATT STYLE alt Style get Attribute element ATT ALT STYLE Resolve style Intro Model Root get Plugin Location style bundle alt Style Intro Model Root get Plugin Location alt Style bundle  getAttribute ATT_STYLE altStyle getAttribute ATT_ALT_STYLE IntroModelRoot getPluginLocation altStyle IntroModelRoot getPluginLocation altStyle
The page s title Each page can have one title return Returns the title of this page public String get Title title is a child of the page and so we have to load children first We also have to resolve children because someone might be including a title Update title instance after all includes and extensions have been resolved get Children if title null there should only be one title child per page safe to cast Intro Page Title titles Intro Page Title get Children Of Type Abstract Intro Element PAGE TITLE if titles length 0 title titles 0 if title null still null no title return null else return title get Title  getTitle getChildren IntroPageTitle IntroPageTitle getChildrenOfType AbstractIntroElement PAGE_TITLE getTitle
return Returns the style public String get Style return style  getStyle
return Returns the alt style public String get Alt Style return alt Style  alt_style getAltStyle altStyle
Gets all the inherited styles of this page Styles can be inherited from includes or from config Extensions p Note this call needs to get all the children of this page and so it will resolve this page might be expensive return Returns all the inherited styles of this page Returns an empty array if page is not expandable or does not have inherited styles public String get Styles call get children first to resolve includes and populate styles vector Resolving children will initialize the style vectors get Children String styles Array new String styles size styles copy Into styles Array return styles Array  configExtensions getStyles getChildren stylesArray copyInto stylesArray stylesArray
Gets all the inherited alt styles of this page ie styles for the SWT presentation A hashtable is returned that has inhertied alt styles as keys and plugin descriptors as values This is needed to be able to load resources from the inherited target plugin Note this call needs to get all the children of this page and so its will resolve this page might be expensive return Returns all the inherited styles of this page Returns an empty hashtable if page is not expandable does not have any includes or has includes that do not merge styles public Hashtable get Alt Styles call get children first to resolve includes and populate hashtable Resolving children will initialize the style vectors get Children return alt Styles  getAltStyles getChildren altStyles
Adds the given style to the list Style is not added if it already exists in the list param style protected void add Style String style init Styles Vectors if styles contains style return styles add style  addStyle initStylesVectors
public void insert Style String style int location init Styles Vectors if styles contains style return styles add location style  insertStyle initStylesVectors
Adds the given style to the list Style is not added if it already exists in the list param alt Style protected void add Alt Style String alt Style Bundle bundle init Styles Vectors if alt Styles contains Key alt Style return alt Styles put alt Style bundle  altStyle addAltStyle altStyle initStylesVectors altStyles containsKey altStyle altStyles altStyle
Util method to add given styles to the list protected void add Styles String styles for int i 0 i styles length i add Style styles i  addStyles addStyle
Util method to add map of altstyles to list protected void add Alt Styles Hashtable alt Styles this alt Styles put All alt Styles  addAltStyles altStyles altStyles putAll altStyles
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element ABSTRACT PAGE  IntroElement getType getType AbstractIntroElement ABSTRACT_PAGE
see org eclipse ui internal intro impl model Abstract Intro Container resolve Children protected void resolve Children init Styles Vectors super resolve Children  AbstractIntroContainer resolveChildren resolveChildren initStylesVectors resolveChildren
private void init Styles Vectors if styles null delay creation until needed styles new Vector if alt Styles null delay creation until needed alt Styles new Hashtable  initStylesVectors altStyles altStyles
Override parent behavior to add support for HEAD Title element in pages only and not in divs see org eclipse ui internal intro impl model Abstract Intro Container get Model Child org eclipse core runtime I Configuration Element protected Abstract Intro Element get Model Child Element child Element Bundle bundle Abstract Intro Element child null if child Element get Node Name equals Ignore Case Intro Head TAG HEAD child new Intro Head child Element bundle else if child Element get Node Name equals Ignore Case Intro Page Title TAG TITLE if we have a title only add it as a child if we did not load one before A page can only have one title if title null child new Intro Page Title child Element bundle if child null return child return super get Model Child child Element bundle  AbstractIntroContainer getModelChild IConfigurationElement AbstractIntroElement getModelChild childElement AbstractIntroElement childElement getNodeName equalsIgnoreCase IntroHead TAG_HEAD IntroHead childElement childElement getNodeName equalsIgnoreCase IntroPageTitle TAG_TITLE IntroPageTitle childElement getModelChild childElement
Returns all head contributions in this page There can be more than one head contribution in the page return public Intro Head getHTML Heads return Intro Head get Children Of Type Abstract Intro Element HEAD  IntroHead getHTMLHeads IntroHead getChildrenOfType AbstractIntroElement
load the children of this container Override parent behavior because we want to support loading content from other xml files The design is that only the id and content from the existing page are honored all other attributes are what they are defined in the external page protected void load Children if content null no content do regular loading super load Children return load the first page with correct id from content xml file Document dom new Intro Content Parser content get Document if dom null bad xml Parser would have logged fact return Element pages Model Loader Util get Elements By Tag Name dom Intro Page TAG PAGE if pages length 0 Log warning Content file has no pages NON NLS 1 return point the element of this page to the new element Pick first page with matching id Make sure to disable loading of children of current element if a matching page in the external content file is not found boolean found Matching Page false for int i 0 i pages length i Element page Element pages i if page Element get Attribute Intro Page ATT ID equals get Id this element page Element call init on the new element the filtering and the style id are loaded by the parent class init page Element get Bundle TODO revisit Special processing here should be made more general style id element get Attribute Abstract Base Intro Element ATT STYLE ID filtered From element get Attribute Abstract Base Intro Element ATT FIlTERED FROM found Matching Page true if found Matching Page now do children loading as usual super load Children else page was not found in content file Perform load actions and log fact init the children vector children new Vector loaded true free DOM model for memory performance element null Log warning Content file does not have page with id get Id NON NLS 1  loadChildren loadChildren IntroContentParser getDocument ModelLoaderUtil getElementsByTagName IntroPage TAG_PAGE foundMatchingPage pageElement pageElement getAttribute IntroPage ATT_ID getId pageElement pageElement getBundle style_id getAttribute AbstractBaseIntroElement ATT_STYLE_ID filteredFrom getAttribute AbstractBaseIntroElement ATT_FIlTERED_FROM foundMatchingPage foundMatchingPage loadChildren getId
Deep copy since class has mutable objects public Object clone throws Clone Not Supported Exception Abstract Intro Page clone Abstract Intro Page super clone if title null Intro Page Title cloned Title Intro Page Title title clone cloned Title set Parent clone clone title cloned Title styles are safe for a shallow copy if styles null clone styles Vector styles clone if alt Styles null clone alt Styles Hashtable alt Styles clone return clone  CloneNotSupportedException AbstractIntroPage AbstractIntroPage IntroPageTitle clonedTitle IntroPageTitle clonedTitle setParent clonedTitle altStyles altStyles altStyles

public void run navigate Backward  navigateBackward
public void run navigate Forward  navigateForward
public void run navigate Home  navigateHome
public void run Element Tree Selection Dialog tree Viewer new Element Tree Selection Dialog get Intro Part get Intro Site get Shell new Intro Model Label Provider new Intro Model Content Provider tree Viewer set Input get Model tree Viewer open  ElementTreeSelectionDialog treeViewer ElementTreeSelectionDialog getIntroPart getIntroSite getShell IntroModelLabelProvider IntroModelContentProvider treeViewer setInput getModel treeViewer
Creates the UI based on this implementation class param parent 
Called when the init method is called in the I Intro Part Subclasses may extend for example to get the passed Memento When extending make sure you include a call to super param intro Part throws Part Init Exception public void init I Intro Part intro Part I Memento memento throws Part Init Exception we know the class type to cast to this intro Part Customizable Intro Part intro Part this memento memento  IIntroPart introPart PartInitException IIntroPart introPart IMemento PartInitException introPart CustomizableIntroPart introPart
return public Intro Model Root get Model return Intro Plugin get Default get Intro Model Root  IntroModelRoot getModel IntroPlugin getDefault getIntroModelRoot
return Returns the intro Part public Customizable Intro Part get Intro Part return intro Part  introPart CustomizableIntroPart getIntroPart introPart
Updates the UI navigation history with either a real URL or a page ID If the navigation state is true it is assumed that we need no updates to the history and so a call to this method does nothing param page Id public void update History String location quick exit if history is Empty get Current Location equals location resetting the same location is useless return do Update History location update Navigation Actions State  pageId updateHistory isEmpty getCurrentLocation doUpdateHistory updateNavigationActionsState
private void do Update History String location we got here due to an intro URL listener or an SWT Form hyperlink listener if navigation Location get History End Position we are at the end of the vector just push push To History location else we already navigated add item at current location and clear rest of history Same as browser behavior trim History location  doUpdateHistory navigationLocation getHistoryEndPosition pushToHistory trimHistory
private void push To History String location history add location point the nav location to the end of the vector and watch out if navigation Location get History End Position  pushToHistory navigationLocation getHistoryEndPosition
private void trim History String location List new History history sub List 0 navigation Location 1 history new Vector new History history add location point the nav location to the end of the vector navigation Location get History End Position  trimHistory newHistory subList navigationLocation newHistory navigationLocation getHistoryEndPosition
Return the position of the last element in the navigation history If vector is empty return 0 param vector return private int get History End Position if history is Empty return 0 else return history size 1  getHistoryEndPosition isEmpty
protected void navigate History Backward if bad Navigation Location navigation Location 1 do nothing We are at the begining return navigation Location  navigateHistoryBackward badNavigationLocation navigationLocation navigationLocation
Navigate forward in the history return protected void navigate History Forward if bad Navigation Location navigation Location 1 do nothing We are at the begining return navigation Location  navigateHistoryForward badNavigationLocation navigationLocation navigationLocation
private boolean bad Navigation Location int navigation Location if navigation Location 0 navigation Location history size bad nav location return true else return false  badNavigationLocation navigationLocation navigationLocation navigationLocation
Subclasses must implement to set the state of the navigation actions in the toolbar 
Subclasses must implement to update the intro view actions when history is updated 
protected abstract void update Navigation Actions State public abstract boolean navigate Backward  updateNavigationActionsState navigateBackward
public abstract boolean navigate Backward public abstract boolean navigate Forward  navigateBackward navigateForward
public abstract boolean navigate Forward public abstract boolean navigate Home  navigateForward navigateHome
Called when the Intro Part is disposed Subclasses should override to dispose of resources By default this implementation does nothing public void dispose  IntroPart
Returns true if the current location in the navigation history represents a URL False if the location is an Intro Page id return Returns the location IsURL public String get Current Location return String history element At navigation Location  locationIsURL getCurrentLocation elementAt navigationLocation
public boolean can Navigate Forward return navigation Location get History End Position true false  canNavigateForward navigationLocation getHistoryEndPosition
public boolean can Navigate Backward return navigation Location 0 false true  canNavigateBackward navigationLocation
protected void add Tool Bar Actions Handle menus I Action Bars action Bars get Intro Part get Intro Site get Action Bars I Tool Bar Manager tool Bar Manager action Bars get Tool Bar Manager tool Bar Manager add view Intro Model Action tool Bar Manager update true action Bars update Action Bars  addToolBarActions IActionBars actionBars getIntroPart getIntroSite getActionBars IToolBarManager toolBarManager actionBars getToolBarManager toolBarManager viewIntroModelAction toolBarManager actionBars updateActionBars
Called when the Intro changes state By default this method does nothing Subclasses may override param standby public void standby State Changed boolean standby boolean is Standby Part Needed do nothing  standbyStateChanged isStandbyPartNeeded
Save the current state of the intro Currently we only store information about the most recently visited intro page In static case the last HTML page is remembered In dynamic case the last UI page or HTML page is remembered Note This method saves the last visited intro page in a dynamic case Subclasses need to extend to get the desired behavior relavent to the specific implementation Broswer implementation needs to cache an http web page if it happens to be the last page visited param memento public void save State I Memento memento save Current Page memento  saveState IMemento saveCurrentPage
This method saves the most recently visited dynamic intro page in the memento If a given implementation requires saving alternative information e g information about the most recently visited static page it should override this method param memento protected void save Current Page I Memento memento Intro Model Root model get Model if memento null model null return String current Page model get Current Page Id if current Page null current Page length 0 memento put String I Intro Constants MEMENTO CURRENT PAGE ATT current Page  saveCurrentPage IMemento IntroModelRoot getModel currentPage getCurrentPageId currentPage currentPage putString IIntroConstants MEMENTO_CURRENT_PAGE_ATT currentPage
get the last page if it was stored in memento This page is the last visited intro page It can be a intro page id in the case of dynamic intro Or it can be an http in the case of static intro It can also be an http in the case of dynamic intro where the last visited page is a url protected String get Cached Current Page I Memento memento get Memento if memento null return null return memento get String I Intro Constants MEMENTO CURRENT PAGE ATT  getCachedCurrentPage IMemento getMemento getString IIntroConstants MEMENTO_CURRENT_PAGE_ATT
protected boolean isURL String a String IntroURL Parser parser new IntroURL Parser a String if parser has Protocol return true return false  aString IntroURLParser IntroURLParser aString hasProtocol
return Returns the memento passed on creation public I Memento get Memento return memento  IMemento getMemento
Support dynamic awarness Clear cached models first then update UI by delegating to implementation see org eclipse core runtime I Registry Change Listener registry Changed org eclipse core runtime I Registry Change Event public void registry Changed I Registry Change Event event history clear navigation Location 0 give implementation a chance to react to change handle Registry Changed event  IRegistryChangeListener registryChanged IRegistryChangeEvent registryChanged IRegistryChangeEvent navigationLocation handleRegistryChanged
detected protected abstract void handle Registry Changed I Registry Change Event event  handleRegistryChanged IRegistryChangeEvent

Abstract Text Element Element element Bundle bundle super element bundle description will be null if there is no description element intro Text get Text Element element  AbstractTextElement introText getTextElement
Retruns the intro text element embedded in this element private Intro Text get Text Element Element element try There should only be one text element Since elements where obtained by name no point validating name Node List text Elements element get Elements By Tag Name Intro Text TAG TEXT if text Elements get Length 0 no contributions done return null Intro Text text new Intro Text Element text Elements item 0 get Bundle text set Parent this return text catch Exception e Util handle Exception e get Message e return null  IntroText getTextElement NodeList textElements getElementsByTagName IntroText TAG_TEXT textElements getLength IntroText IntroText textElements getBundle setParent handleException getMessage
return Returns the text of the child text of this element public String get Text intro text may be null if there is no child Text element if intro Text null return intro Text get Text else return null  getText introText introText getText
Returns the intro text representing the child text of this element May return null if there is no text child return Returns the intro Text public Intro Text get Intro Text return intro Text  introText IntroText getIntroText introText
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element ABSTRACT TEXT  IntroElement getType getType AbstractIntroElement ABSTRACT_TEXT
Deep copy since class has mutable objects public Object clone throws Clone Not Supported Exception Abstract Text Element clone Abstract Text Element super clone if intro Text null Intro Text clone Intro Text Intro Text intro Text clone clone Intro Text set Parent clone clone intro Text clone Intro Text return clone  CloneNotSupportedException AbstractTextElement AbstractTextElement introText IntroText cloneIntroText IntroText introText cloneIntroText setParent introText cloneIntroText

param element Intro Anchor Element element Bundle bundle super element bundle  IntroAnchor
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element ANCHOR  IntroElement getType getType AbstractIntroElement

Intro Extension Content Element element Bundle bundle super element bundle path get Attribute element ATT PATH style get Attribute element ATT STYLE alt Style get Attribute element ATT ALT STYLE this element element Resolve style Intro Model Root get Plugin Location style bundle alt Style Intro Model Root get Plugin Location alt Style bundle  IntroExtensionContent getAttribute ATT_PATH getAttribute ATT_STYLE altStyle getAttribute ATT_ALT_STYLE IntroModelRoot getPluginLocation altStyle IntroModelRoot getPluginLocation altStyle
return Returns the path public String get Path return path  getPath
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element CONTAINER EXTENSION  IntroElement getType getType AbstractIntroElement CONTAINER_EXTENSION
protected Element get Children Vector children new Vector Node List node List element get Child Nodes Vector vector new Vector for int i 0 i node List get Length i Node node node List item i if node get Node Type Node ELEMENT NODE vector add node Element filtered Elements new Element vector size vector copy Into filtered Elements free DOM model for memory performance this element null return filtered Elements  getChildren NodeList nodeList getChildNodes nodeList getLength nodeList getNodeType ELEMENT_NODE filteredElements copyInto filteredElements filteredElements
return Returns the alt Style protected String get Alt Style return alt Style  altStyle getAltStyle altStyle
return Returns the style protected String get Style return style  getStyle

param element Intro Group Element element Bundle bundle super element bundle label get Attribute element ATT LABEL  IntroGroup getAttribute ATT_LABEL
return Returns the label public String get Label return label  getLabel
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element GROUP  IntroElement getType getType AbstractIntroElement

Intro Head I Configuration Element element super element src element get Attribute ATT SRC Resolve src Intro Model Root get Plugin Location src element  IntroHead IConfigurationElement getAttribute ATT_SRC IntroModelRoot getPluginLocation
Intro Head Element element Bundle bundle super element bundle src get Attribute element ATT SRC Resolve src Intro Model Root get Plugin Location src bundle  IntroHead getAttribute ATT_SRC IntroModelRoot getPluginLocation
return Returns the src public String get Src return src  getSrc
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element HEAD  IntroElement getType getType AbstractIntroElement

Intro Home Page Element element Bundle bundle super element bundle url get Attribute element ATT URL if url null if we do not have a URL attribute then we have dynamic content is Dynamic true else check the url standby url attributes and update accordingly url Intro Model Root resolveURL url bundle  IntroHomePage getAttribute ATT_URL isDynamic IntroModelRoot
return Returns the url public String get Url return url  getUrl
Returns true if this is a dynamic model or not This is based on whether this root page has a URL attribute or not return Returns the is Dynamic public boolean is Dynamic return is Dynamic  isDynamic isDynamic isDynamic
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element HOME PAGE  IntroElement getType getType AbstractIntroElement HOME_PAGE
return Returns the is Standby Page public boolean is Standby Page return is Standby Page  isStandbyPage isStandbyPage isStandbyPage
param is Standby Page The is Standby Page to set public void set Standby Page boolean is Standby Page this is Standby Page is Standby Page  isStandbyPage isStandbyPage setStandbyPage isStandbyPage isStandbyPage isStandbyPage
THESE METHODS WILL BE REMOVED This method is a customized method for root page to return the root page links Try to get the real links in the page and all links in all divs public Intro Link get Links Vector link Vector new Vector Abstract Intro Element children get Children for int i 0 i children length i Abstract Intro Element child children i if child is Of Type Abstract Intro Element LINK link Vector add child else if child is Of Type Abstract Intro Element GROUP add Links Intro Group child link Vector Intro Link links new Intro Link link Vector size link Vector copy Into links return links  IntroLink getLinks linkVector AbstractIntroElement getChildren AbstractIntroElement isOfType AbstractIntroElement linkVector isOfType AbstractIntroElement addLinks IntroGroup linkVector IntroLink IntroLink linkVector linkVector copyInto
private void add Links Intro Group group Vector link Vector Abstract Intro Element children group get Children for int i 0 i children length i Abstract Intro Element child children i if child is Of Type Abstract Intro Element LINK link Vector add child else if child is Of Type Abstract Intro Element GROUP add Links Intro Group child link Vector  addLinks IntroGroup linkVector AbstractIntroElement getChildren AbstractIntroElement isOfType AbstractIntroElement linkVector isOfType AbstractIntroElement addLinks IntroGroup linkVector

IntroHTML Element element Bundle bundle super element bundle src get Attribute element ATT SRC html type get Attribute element ATT TYPE if html type null html type equals Ignore Case inline NON NLS 1 html type equals Ignore Case embed NON NLS 1 if type is not correct null it html type null description will be null if there is no description element intro Image get Intro Image element Resolve src Intro Model Root get Plugin Location src bundle  getAttribute ATT_SRC html_type getAttribute ATT_TYPE html_type html_type equalsIgnoreCase html_type equalsIgnoreCase html_type introImage getIntroImage IntroModelRoot getPluginLocation
Retruns the intro image element embedded in this element private Intro Image get Intro Image Element element try There should only be one text element Since elements where obtained by name no point validating name Node List image Elements element get Elements By Tag Name Intro Image TAG IMAGE if image Elements get Length 0 no contributions done return null Intro Image image new Intro Image Element image Elements item 0 get Bundle image set Parent this return image catch Exception e Util handle Exception e get Message e return null  IntroImage getIntroImage NodeList imageElements getElementsByTagName IntroImage TAG_IMAGE imageElements getLength IntroImage IntroImage imageElements getBundle setParent handleException getMessage
Returns the html type Will be either inline or embed If not null will be returned as if the attibute was nto defined return Returns the html type value public boolean is Inlined return html type null html type equals Ignore Case inline true NON NLS 1 false  isInlined html_type html_type equalsIgnoreCase
return Returns the src public String get Src return src  getSrc
Returns the intro image used as a replacement if this HTML element fails May return null if there is no image child return Returns the intro Image public Intro Image get Intro Image return intro Image  introImage IntroImage getIntroImage introImage
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element HTML  IntroElement getType getType AbstractIntroElement
Deep copy since class has mutable objects public Object clone throws Clone Not Supported Exception IntroHTML clone IntroHTML super clone if intro Image null Intro Image clone Intro Image Intro Image intro Image clone clone Intro Image set Parent clone clone intro Image clone Intro Image return clone  CloneNotSupportedException introImage IntroImage cloneIntroImage IntroImage introImage cloneIntroImage setParent introImage cloneIntroImage

Intro Image Element element Bundle bundle super element bundle src get Attribute element ATT SRC src As Is src alt get Attribute element ATT ALT Resolve src src Intro Model Root get Plugin Location src bundle  IntroImage getAttribute ATT_SRC srcAsIs getAttribute ATT_ALT IntroModelRoot getPluginLocation
return Returns the alt public String get Alt return alt  getAlt
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element IMAGE  IntroElement getType getType AbstractIntroElement
return Returns the src value already resolved as a local url public String get Src return src  getSrc
return Returns the src value as is without resolving it as a local url The src value is relative to the parent plugin public String get Src As Is return src As Is  getSrcAsIs srcAsIs

Intro Include Element element Bundle bundle super element bundle config Id get Attribute element ATT CONFIG ID path get Attribute element ATT PATH String merge Style String get Attribute element ATT MERGE STYLE merge Style merge Style String null merge Style String equals Ignore Case true true false NON NLS 1  IntroInclude configId getAttribute ATT_CONFIG_ID getAttribute ATT_PATH mergeStyleString getAttribute ATT_MERGE_STYLE mergeStyle mergeStyleString mergeStyleString equalsIgnoreCase
return Returns the config Id public String get Config Id return config Id  configId getConfigId configId
return Returns the merge Style public boolean get Merge Style return merge Style  mergeStyle getMergeStyle mergeStyle
return Returns the path public String get Path return path  getPath
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element INCLUDE  IntroElement getType getType AbstractIntroElement

param element Intro Link Element element Bundle bundle super element bundle url get Attribute element ATT URL label get Attribute element ATT LABEL url Intro Model Root resolveURL url bundle if url null check the URL IntroURL Parser parser new IntroURL Parser url if parser has Intro Url introURL parser get IntroURL There should be at most one img element Node List img Elements element get Elements By Tag Name TAG IMG if img Elements get Length 0 img new Intro Image Element img Elements item 0 get Bundle img set Parent this  IntroLink getAttribute ATT_URL getAttribute ATT_LABEL IntroModelRoot IntroURLParser IntroURLParser hasIntroUrl getIntroURL NodeList imgElements getElementsByTagName TAG_IMG imgElements getLength IntroImage imgElements getBundle setParent
return Returns the label public String get Label return label  getLabel
return Returns the url public String get Url return url  getUrl
Retruns an IntroURL instance if link has a valid intro url Returns null otherwise return Returns the introURL public IntroURL get IntroURL return introURL  getIntroURL
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element LINK  IntroElement getType getType AbstractIntroElement
return Returns the img public Intro Image get Img return img  IntroImage getImg
Deep copy since class has mutable objects public Object clone throws Clone Not Supported Exception Intro Link clone Intro Link super clone if img null Intro Image clone Intro Image Intro Image img clone clone Intro Image set Parent clone clone img clone Intro Image no need to clobe IntroURL return clone  CloneNotSupportedException IntroLink IntroLink IntroImage cloneIntroImage IntroImage cloneIntroImage setParent cloneIntroImage

Model root Takes a config Element that represents config in the plugin xml markup AND all the extension contributed to this model through the config Extension point public Intro Model Root I Configuration Element config Element I Configuration Element config Extension Elements the config element that represents the correct model root super config Element this config Extension Elements config Extension Elements  configElement configExtension IntroModelRoot IConfigurationElement configElement IConfigurationElement configExtensionElements configElement configExtensionElements configExtensionElements
public void load Model get Children  loadModel getChildren
loads the full model The children of a model root are the presentation followed by all pages and all shared groups Then if the model has extension its the unresolved container extensions followed by all extension pages and groups The presentation is loaded from the I Configuration element representing the config All else is loaded from xml content file protected void load Children children new Vector Log info Loading Intro plugin model NON NLS 1 load presentation first and create the model class for it If there is more than one presentation load first one and log rest I Configuration Element presentation Element load Presentation if presentation Element null no presentations at all exit set Model State true false false Log warning Could not find presentation element in intro config NON NLS 1 return intro Part Presentation new Intro Part Presentation presentation Element children add intro Part Presentation set parent intro Part Presentation set Parent this now load all children of the config There should only be pages and groups here And order is not important These elements are loaded from the content file DOM Document document loadDOM get Cfg Element if document null we failed to parse the content file Intro Parser would have logged the fact Parser would also have checked to see if the content file has the correct root tag set Model State true false false return load Pages document get Bundle load Shared Groups document get Bundle Attributes of root page decide if we have a static or dynamic case set Model State true true get Home Page is Dynamic  IConfiguration loadChildren IConfigurationElement presentationElement loadPresentation presentationElement setModelState introPartPresentation IntroPartPresentation presentationElement introPartPresentation introPartPresentation setParent getCfgElement setModelState loadPages getBundle loadSharedGroups getBundle setModelState getHomePage isDynamic
Sets the presentation to the given presentation The model always has the presentation as the first child so use that fact This method is used for dynamic awarness to enable replacing the new presentation with the existing one after a model refresh param presentation public void set Presentation Intro Part Presentation presentation this intro Part Presentation presentation presentation set Parent this children set 0 presentation  setPresentation IntroPartPresentation introPartPresentation setParent
Resolve each include in this container s children protected void resolve Children now handle config extension resolve Config Extensions resolved true  resolveChildren resolveConfigExtensions
private I Configuration Element load Presentation If there is more than one presentation load first one and log rest I Configuration Element presentation Elements get Cfg Element get Children Intro Part Presentation TAG PRESENTATION I Configuration Element presentation Element Model Loader Util validate Single Contribution presentation Elements Intro Part Presentation ATT HOME PAGE ID return presentation Element  IConfigurationElement loadPresentation IConfigurationElement presentationElements getCfgElement getChildren IntroPartPresentation TAG_PRESENTATION IConfigurationElement presentationElement ModelLoaderUtil validateSingleContribution presentationElements IntroPartPresentation ATT_HOME_PAGE_ID presentationElement
Loads all pages defined in this config from the xml content file private void load Pages Document dom Bundle bundle String home Page Id get Presentation get Home Page Id String standby Page Id get Presentation get Standby Page Id Element pages Model Loader Util get Elements By Tag Name dom Intro Page TAG PAGE for int i 0 i pages length i Element page Element pages i if page Element get Attribute Intro Page ATT ID equals home Page Id Create the model class for the Root Page home Page new Intro Home Page page Element bundle home Page set Parent this current Page Id home Page get Id children add home Page else if page Element get Attribute Intro Page ATT ID equals standby Page Id Create the model class for the standby Page standby Page new Intro Home Page page Element bundle standby Page set Parent this signal that it is a standby page standby Page set Standby Page true children add standby Page else Create the model class for an intro Page Intro Page page new Intro Page page Element bundle page set Parent this children add page  loadPages homePageId getPresentation getHomePageId standbyPageId getPresentation getStandbyPageId ModelLoaderUtil getElementsByTagName IntroPage TAG_PAGE pageElement pageElement getAttribute IntroPage ATT_ID homePageId homePage IntroHomePage pageElement homePage setParent currentPageId homePage getId homePage pageElement getAttribute IntroPage ATT_ID standbyPageId standbyPage IntroHomePage pageElement standbyPage setParent standbyPage setStandbyPage standbyPage IntroPage IntroPage pageElement setParent
Loads all shared groups defined in this config from the DOM private void load Shared Groups Document dom Bundle bundle Element groups Model Loader Util get Elements By Tag Name dom Intro Group TAG GROUP for int i 0 i groups length i Intro Group group new Intro Group groups i bundle group set Parent this children add group  loadSharedGroups ModelLoaderUtil getElementsByTagName IntroGroup TAG_GROUP IntroGroup IntroGroup setParent
Handles all the config Extensions to this current model private void resolve Config Extensions for int i 0 i config Extension Elements length i get the bundle from the extensions since they are defined in other plugins Bundle bundle Model Loader Util get Bundle From Configuration Element config Extension Elements i Document dom loadDOM config Extension Elements i if dom null we failed to parse the content file Intro Parser would have logged the fact Parser would also have checked to see if the content file has the correct root tag continue Find the target of this container extension and add all its children to target Make sure to pass bundle to propagate to all children Element extension Content Element load Extension Content dom bundle if extension Content Element null no extension content defined continue if extension Content Element has Attribute failed NON NLS 1 we failed to resolve this config Extension because target could not be found or is not an anchor add the extension as a unresolved child of this model children add new Intro Extension Content extension Content Element bundle continue Now load all pages and shared groups from this config extension only if we resolved this extension No point adding pages that will never be referenced Element pages Model Loader Util get Elements By Tag Name dom Intro Page TAG PAGE for int j 0 j pages length j Create the model class for an intro Page Intro Page page new Intro Page pages j bundle page set Parent this children add page load all shared groups from all config Extensions to this model load Shared Groups dom bundle  configExtensions resolveConfigExtensions configExtensionElements ModelLoaderUtil getBundleFromConfigurationElement configExtensionElements configExtensionElements extensionContentElement loadExtensionContent extensionContentElement extensionContentElement hasAttribute configExtension IntroExtensionContent extensionContentElement ModelLoaderUtil getElementsByTagName IntroPage TAG_PAGE IntroPage IntroPage setParent configExtensions loadSharedGroups
load the extension content of this config Extension into model classes and insert them at target A config extension can have only ONE extension content This is because if the extension fails we need to be able to not include the page and group contributions as part of the model param return private Element load Extension Content Document dom Bundle bundle Element extension Contents Model Loader Util get Elements By Tag Name dom Intro Extension Content TAG CONTAINER EXTENSION There should only be one container extension Element extension Content Element Model Loader Util validate Single Contribution extension Contents Intro Extension Content ATT PATH if extension Content Element null no extension Content defined return null Create the model class Intro Extension Content extension Content new Intro Extension Content extension Content Element bundle now resolve this extension String path extension Content get Path Abstract Intro Element target find Target this path if target null target is Of Type Abstract Intro Element ANCHOR target could not be found Signal failure extension Content Element set Attribute failed true NON NLS 1 NON NLS 2 else extensions are only for anchors Insert all children of this extension before this anchor Anchors need to stay as model children even after all extensions have been resolved to enable other plugins to contribute Intro Anchor target Anchor Intro Anchor target insert Anchor Children target Anchor extension Content bundle handle Extension Style Inheritence target Anchor extension Content return extension Content Element  configExtension loadExtensionContent extensionContents ModelLoaderUtil getElementsByTagName IntroExtensionContent TAG_CONTAINER_EXTENSION extensionContentElement ModelLoaderUtil validateSingleContribution extensionContents IntroExtensionContent ATT_PATH extensionContentElement extensionContent IntroExtensionContent extensionContent IntroExtensionContent extensionContentElement extensionContent getPath AbstractIntroElement findTarget isOfType AbstractIntroElement extensionContentElement setAttribute IntroAnchor targetAnchor IntroAnchor insertAnchorChildren targetAnchor extensionContent handleExtensionStyleInheritence targetAnchor extensionContent extensionContentElement
private void insert Anchor Children Intro Anchor anchor Intro Extension Content extension Content Bundle bundle Abstract Intro Container anchor Parent Abstract Intro Container anchor get Parent insert the elements of the extension before the anchor anchor Parent insert Elements Before extension Content get Children bundle anchor  insertAnchorChildren IntroAnchor IntroExtensionContent extensionContent AbstractIntroContainer anchorParent AbstractIntroContainer getParent anchorParent insertElementsBefore extensionContent getChildren
Updates the inherited styles based on the merge style attribute If we are extending a shared group do nothing For inherited alt styles we have to cache the bundle from which we inherited the styles to be able to access resources in that plugin param include param target private void handle Extension Style Inheritence Intro Anchor anchor Intro Extension Content extension Abstract Intro Container target Container Abstract Intro Container anchor get Parent if target Container get Type Abstract Intro Element GROUP target Container get Parent get Type Abstract Intro Element MODEL ROOT if we are extending a shared group defined under a config we can not include styles return Update the parent page styles skip style if it is null String style extension get Style if style null target Container get Parent Page add Style style for alt style cache bundle for loading resources style extension get Alt Style if style null Bundle bundle extension get Bundle target Container get Parent Page add Alt Style style bundle  handleExtensionStyleInheritence IntroAnchor IntroExtensionContent AbstractIntroContainer targetContainer AbstractIntroContainer getParent targetContainer getType AbstractIntroElement targetContainer getParent getType AbstractIntroElement MODEL_ROOT getStyle targetContainer getParentPage addStyle getAltStyle getBundle targetContainer getParentPage addAltStyle
Sets the model state based on all the model classes Dynamic nature of the model is always setto false when we fail to load model for any reason private void set Model State boolean loaded boolean has Valid Config boolean isdynamic Intro this loaded loaded this has Valid Config has Valid Config this isdynamic Intro isdynamic Intro  setModelState hasValidConfig isdynamicIntro hasValidConfig hasValidConfig isdynamicIntro isdynamicIntro
Returns true if there is a valid contribution to org eclipse ui intro config extension point with a valid Presentation and pages return Returns the has Valid Config public boolean has Valid Config return has Valid Config  hasValidConfig hasValidConfig hasValidConfig
return Returns the intro Part Presentation public Intro Part Presentation get Presentation return intro Part Presentation  introPartPresentation IntroPartPresentation getPresentation introPartPresentation
return Returns the root Page public Intro Home Page get Home Page return home Page  rootPage IntroHomePage getHomePage homePage
return Returns the standby Page public Intro Home Page get Standby Page return standby Page  IntroHomePage getStandbyPage standbyPage
return all pages excluding the Home Page If all pages are needed call code Abstract Intro Page get Children Of Type Intro Element ABSTRACT PAGE code public Intro Page get Pages return Intro Page get Children Of Type Abstract Intro Element PAGE  AbstractIntroPage getChildrenOfType IntroElement ABSTRACT_PAGE IntroPage getPages IntroPage getChildrenOfType AbstractIntroElement
return Returns the is Loaded public boolean is Loaded return loaded  isLoaded isLoaded
return Returns the isdynamic Intro public boolean is Dynamic return isdynamic Intro  isdynamicIntro isDynamic isdynamicIntro
return Returns the current Page Id public String get Current Page Id return current Page Id  currentPageId getCurrentPageId currentPageId
Sets the current page If the model does not have a page with the passed id the message is logged and the model retains its old current page param current Page Id The current Page Id to set param fire Event flag to indicate if event notification is needed return true if the model has a page with the passed id false otherwise If the method fails the current page remains the same as the last state public boolean set Current Page Id String page Id boolean fire Event if page Id current Page Id setting to the same page does nothing Return true because we did not actually fail just a no op return true Abstract Intro Page page Abstract Intro Page find Child page Id ABSTRACT PAGE if page null not a page Test for root page if page Id equals home Page get Id not a page nor the home page Log warning Could not find Intro page with id page Id NON NLS 1 return false current Page Id page Id if fire Event fire Property Change CURRENT PAGE PROPERTY ID return true  currentPageId currentPageId fireEvent setCurrentPageId pageId fireEvent pageId currentPageId AbstractIntroPage AbstractIntroPage findChild pageId ABSTRACT_PAGE pageId homePage getId pageId currentPageId pageId fireEvent firePropertyChange CURRENT_PAGE_PROPERTY_ID
public boolean set Current Page Id String page Id return set Current Page Id page Id true  setCurrentPageId pageId setCurrentPageId pageId
public void add Property Listener I Property Listener l prop Change Listeners add l  addPropertyListener IPropertyListener propChangeListeners
Platform run new Safe Runnable public void run l property Changed this property Id  SafeRunnable propertyChanged propertyId
public void handle Exception Throwable e super handle Exception e If an unexpected exception happens remove it to make sure the workbench keeps running prop Change Listeners remove l  handleException handleException propChangeListeners
Fires a property changed event Made public because it can be used to trigger a UI refresh param property Id the id of the property that changed public void fire Property Change final int property Id Object array prop Change Listeners get Listeners for int i 0 i array length i final I Property Listener l I Property Listener array i Platform run new Safe Runnable public void run l property Changed this property Id public void handle Exception Throwable e super handle Exception e If an unexpected exception happens remove it to make sure the workbench keeps running prop Change Listeners remove l  propertyId firePropertyChange propertyId propChangeListeners getListeners IPropertyListener IPropertyListener SafeRunnable propertyChanged propertyId handleException handleException propChangeListeners
public void remove Property Listener I Property Listener l prop Change Listeners remove l  removePropertyListener IPropertyListener propChangeListeners
return Returns the current Page return null if page is not found or if we are not in a dynamic intro mode public Abstract Intro Page get Current Page if isdynamic Intro return null Abstract Intro Page page Abstract Intro Page find Child current Page Id ABSTRACT PAGE if page null return page not a page Test for root page if current Page Id equals home Page get Id return home Page return null if page is not found return null  currentPage AbstractIntroPage getCurrentPage isdynamicIntro AbstractIntroPage AbstractIntroPage findChild currentPageId ABSTRACT_PAGE currentPageId homePage getId homePage
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element MODEL ROOT  IntroElement getType getType AbstractIntroElement MODEL_ROOT
Assumes that the passed config element has a content attribute Reads it and loads a DOM based on that attribute value return protected Document loadDOM I Configuration Element cfg Element String content cfg Element get Attribute ATT CONTENT Resolve content Intro Model Root get Plugin Location content cfg Element Document document new Intro Content Parser content get Document return document  IConfigurationElement cfgElement cfgElement getAttribute ATT_CONTENT IntroModelRoot getPluginLocation cfgElement IntroContentParser getDocument
Checks to see if the passed string is a valid URL has a protocol if yes returns it as is If no treats it as a resource relative to the declaring plugin Return the plugin relative location fully qualified Retruns null if the passed string itself is null param resource param plugin Desc return returns the URL as is if it had a protocol protected static String resolveURL String url String plugin Id Bundle bundle null if plugin Id null if plugin Id is not null use it bundle Platform get Bundle plugin Id return resolveURL url bundle  pluginDesc pluginId pluginId pluginId getBundle pluginId
Checks to see if the passed string is a valid URL has a protocol if yes returns it as is If no treats it as a resource relative to the declaring plugin Return the plugin relative location fully qualified Retruns null if the passed string itself is null param resource param plugin Desc return returns the URL as is if it had a protocol protected static String resolveURL String url I Configuration Element element Bundle bundle Model Loader Util get Bundle From Configuration Element element return resolveURL url bundle  pluginDesc IConfigurationElement ModelLoaderUtil getBundleFromConfigurationElement
see resolveURL String url I Configuration Element element protected static String resolveURL String url Bundle bundle quick exit if url null return null IntroURL Parser parser new IntroURL Parser url if parser has Protocol return url else make plugin relative url Only now we need the pd return get Plugin Location url bundle  IConfigurationElement IntroURLParser IntroURLParser hasProtocol getPluginLocation
Returns the fully qualified location of the passed resource string from the declaring plugin If the file could not be loaded from the plugin the resource is returned as is param resource return public static String get Plugin Location String resource I Configuration Element element Bundle bundle Model Loader Util get Bundle From Configuration Element element return get Plugin Location resource bundle  getPluginLocation IConfigurationElement ModelLoaderUtil getBundleFromConfigurationElement getPluginLocation
public static String get Plugin Location String resource Bundle bundle quick exits if resource null Model Loader Util bundle Has Valid State bundle return null URL local Location null try we need to perform a resolve on this URL local Location Platform find bundle new Path resource if local Location null local Location can be null if the passed resource could not be found relative to the plugin log fact return resource as is String msg String Util concat Could not find resource NON NLS 1 resource in Model Loader Util get Bundle Header NON NLS 1 bundle Constants BUNDLE NAME to String Log warning msg return resource local Location Platform as LocalURL local Location return local Location to External Form catch Exception e String msg String Util concat Failed to load resource NON NLS 1 resource from Model Loader Util get Bundle Header bundle NON NLS 1 Constants BUNDLE NAME to String Log error msg e return resource  getPluginLocation ModelLoaderUtil bundleHasValidState localLocation localLocation localLocation localLocation StringUtil ModelLoaderUtil getBundleHeader BUNDLE_NAME toString localLocation asLocalURL localLocation localLocation toExternalForm StringUtil ModelLoaderUtil getBundleHeader BUNDLE_NAME toString
Returns the fully qualified location of the passed resource string from the passed plugin id If the file could not be loaded from the plugin the resource is returned as is param resource return public static String get Plugin Location String resource String plugin Id Bundle bundle Platform get Bundle plugin Id return get Plugin Location resource bundle  getPluginLocation pluginId getBundle pluginId getPluginLocation

An Intro Part page Intro Page Element element Bundle bundle super element bundle  IntroPage
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element PAGE  IntroElement getType getType AbstractIntroElement

protected static final String TAG TITLE title NON NLS 1 Intro Page Title Element element Bundle bundle super element bundle  TAG_TITLE IntroPageTitle
return Returns the Title text public String get Title return get Text  getTitle getText
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element PAGE TITLE  IntroElement getType getType AbstractIntroElement PAGE_TITLE

Intro Part Presentation I Configuration Element element super element home Page Id element get Attribute ATT HOME PAGE ID standby Page Id element get Attribute ATT STANDBY PAGE ID  IntroPartPresentation IConfigurationElement homePageId getAttribute ATT_HOME_PAGE_ID standbyPageId getAttribute ATT_STANDBY_PAGE_ID
private void update Presentation Attributes I Configuration Element element if element null reset ie inherit type and style to be implementation type and style Then handle HEAD content for the case of HTML Browser implementation Style element get Attribute ATT STYLE implementation Kind element get Attribute ATT KIND get Head contribution regardless of implementation class Implementation class is created lazily by UI head get Head element Resolve implementation Style Intro Model Root resolveURL implementation Style element  updatePresentationAttributes IConfigurationElement implementationStyle getAttribute ATT_STYLE implementationKind getAttribute ATT_KIND getHead implementationStyle IntroModelRoot implementationStyle
Returns the style associated with the Presentation May be null if no shared presentation style is needed or in the case of static HTML OOBE return Returns the style public String get Implementation Style return implementation Style  getImplementationStyle implementationStyle
Returns the type attribute of the implementation picked by this presentation return Returns the implementation Kind public String get Implementation Kind return implementation Kind  implementationKind getImplementationKind implementationKind
Returns the model class for the Head element under an implementation Returns null if there is no head contribution param element return private Intro Head get Head I Configuration Element element try There should only be one head element Since elements where obtained by name no point validating name I Configuration Element head Elements element get Children Intro Head TAG HEAD if head Elements length 0 no contributions done return null Intro Head head new Intro Head head Elements 0 head set Parent this return head catch Exception e Util handle Exception e get Message e return null  IntroHead getHead IConfigurationElement IConfigurationElement headElements getChildren IntroHead TAG_HEAD headElements IntroHead IntroHead headElements setParent handleException getMessage
param intro Part throws Part Init Exception public void init I Intro Part intro Part I Memento memento throws Part Init Exception REVISIT Called when the actual UI needs to be created Incomplete separation of model UI Will change later should not get here if there is no valid implementation this intro Part intro Part this memento memento  introPart PartInitException IIntroPart introPart IMemento PartInitException introPart introPart
Creates the UI based on the implementation class see org eclipse ui I Workbench Part create Part Control org eclipse swt widgets Composite public void create Part Control Composite parent Vector valid Implementations get Valid Implementation Elements get Cfg Element I Configuration Element implementation Element null for int i 0 i valid Implementations size i implementation Element I Configuration Element valid Implementations element At i you want to pass primed model update Presentation Attributes implementation Element try implementation create Intro Part Implementation get Implementation Kind if implementation null failed to create executable continue implementation init intro Part memento implementation create Part Control parent Log info Loaded config implementation from NON NLS 1 Model Loader Util get Log String implementation Element class NON NLS 1 break catch SWT Error e Log error Failed to create implementation from NON NLS 1 Model Loader Util get Log String implementation Element class e NON NLS 1 implementation null implementation Element null catch Exception e Log error Failed to create implementation from NON NLS 1 Model Loader Util get Log String implementation Element class e NON NLS 1 implementation null implementation Element null if implementation Element null worst case scenario We failed in all cases implementation new Form Intro Part Implementation try implementation init intro Part memento catch Exception e should never be here Log error e get Message e return implementation create Part Control parent Log warning Loaded UI Forms implementation as a default Welcome NON NLS 1  IWorkbenchPart createPartControl createPartControl validImplementations getValidImplementationElements getCfgElement IConfigurationElement implementationElement validImplementations implementationElement IConfigurationElement validImplementations elementAt updatePresentationAttributes implementationElement createIntroPartImplementation getImplementationKind introPart createPartControl ModelLoaderUtil getLogString implementationElement SWTError ModelLoaderUtil getLogString implementationElement implementationElement ModelLoaderUtil getLogString implementationElement implementationElement implementationElement FormIntroPartImplementation introPart getMessage createPartControl
Retruns a list of valid implementation elements of the config Choose correct implementation element based on os atrributes Rules get current OS choose first contributrion with os that matches OS Otherwise choose first contribution with no os Returns null if no valid implementation is found private Vector get Valid Implementation Elements I Configuration Element config Element Vector valid List new Vector There can be more than one implementation contribution Add each valid one First start with OS then WS then no OS I Configuration Element implementation Elements config Element get Children TAG IMPLEMENTATION I Configuration Element implementation Element null if implementation Elements length 0 no contributions done return valid List String currentOS Platform getOS String currentWS Platform getWS first loop through all to find one with matching OS with or without WS for int i 0 i implementation Elements length i String os implementation Elements i get Attribute ATT OS if os null no os no match continue if list Value Has Value os currentOS found implementation with correct OS Now try if WS matches String ws implementation Elements i get Attribute ATT WS if ws null good OS and they do not care about WS we have a match valid List add implementation Elements i else good OS and we have WS if list Value Has Value ws currentWS valid List add implementation Elements i now loop through all to find one with no OS defined but with a matching WS for int i 0 i implementation Elements length i String os implementation Elements i get Attribute ATT OS if os null found implementation with no OS Now try if WS matches String ws implementation Elements i get Attribute ATT WS if ws null no OS and they do not care about WS we have a match valid List add implementation Elements i else no OS and we have WS if list Value Has Value ws currentWS valid List add implementation Elements i return valid List  getValidImplementationElements IConfigurationElement configElement validList IConfigurationElement implementationElements configElement getChildren TAG_IMPLEMENTATION IConfigurationElement implementationElement implementationElements validList implementationElements implementationElements getAttribute ATT_OS listValueHasValue implementationElements getAttribute ATT_WS validList implementationElements listValueHasValue validList implementationElements implementationElements implementationElements getAttribute ATT_OS implementationElements getAttribute ATT_WS validList implementationElements listValueHasValue validList implementationElements validList
Util method that searches for the given value in a comma separated list of values The list is retrieved as an attribute value of OS WS private boolean list Value Has Value String string Value String value String attribute Values string Value split NON NLS 1 for int i 0 i attribute Values length i if attribute Values i equals Ignore Case value return true return false  listValueHasValue stringValue attributeValues stringValue attributeValues attributeValues equalsIgnoreCase
Util method to load shared style from given kind public String get Shared Style String kind There can be more than one implementation contribution I Configuration Element implementation Elements get Cfg Element get Children TAG IMPLEMENTATION I Configuration Element implementation Element null if implementation Elements length 0 no implementations done return null loop through all to find one with matching kind for int i 0 i implementation Elements length i String a Kind implementation Elements i get Attribute ATT KIND if a Kind equals kind found implementation with matching kind String style implementation Elements i get Attribute ATT STYLE return Intro Model Root resolveURL style get Cfg Element return null  getSharedStyle IConfigurationElement implementationElements getCfgElement getChildren TAG_IMPLEMENTATION IConfigurationElement implementationElement implementationElements implementationElements aKind implementationElements getAttribute ATT_KIND aKind implementationElements getAttribute ATT_STYLE IntroModelRoot getCfgElement
Creates the actual implementation class Returns null on failure NOTE this method if not actually used now but will be when we need to expose class attribute on implmentation private Abstract Intro Part Implementation create Intro Part Implementation I Configuration Element config Element if config Element null return null Abstract Intro Part Implementation implementation null try implementation Abstract Intro Part Implementation config Element create Executable Extension class NON NLS 1 catch Exception e Util handle Exception Could not instantiate implementation class NON NLS 1 config Element get Attribute class e NON NLS 1 return implementation  AbstractIntroPartImplementation createIntroPartImplementation IConfigurationElement configElement configElement AbstractIntroPartImplementation AbstractIntroPartImplementation configElement createExecutableExtension handleException configElement getAttribute
Creates the actual implementation class Returns null on failure private Abstract Intro Part Implementation create Intro Part Implementation String implementation Type quick exits if implementation Type null return null if implementation Type equals BROWSER IMPL KIND implementation Type equals FORMS IMPL KIND implementation Type equals TEXT IMPL KIND return null Abstract Intro Part Implementation implementation null try if implementation Type equals BROWSER IMPL KIND implementation new Browser Intro Part Implementation else if implementation Type equals FORMS IMPL KIND implementation new Form Intro Part Implementation else implementation new Text Intro Part Implementation catch Exception e Util handle Exception Could not instantiate implementation NON NLS 1 implementation Type e return implementation  AbstractIntroPartImplementation createIntroPartImplementation implementationType implementationType implementationType BROWSER_IMPL_KIND implementationType FORMS_IMPL_KIND implementationType TEXT_IMPL_KIND AbstractIntroPartImplementation implementationType BROWSER_IMPL_KIND BrowserIntroPartImplementation implementationType FORMS_IMPL_KIND FormIntroPartImplementation TextIntroPartImplementation handleException implementationType
Returns the the Customizable Intro Part may return null if init has not been called yet on the presentation return Returns the intro Part public I Intro Part get Intro Part return intro Part  introPart IIntroPart getIntroPart introPart
Save the current state of the intro Delegate to the implementation to do the work as different implementations may have different requirements param memento the memento in which to store state information public void save State I Memento memento if implementation null implementation save State memento  saveState IMemento saveState
public void set Focus if implementation null implementation set Focus  setFocus setFocus
public void standby State Changed boolean standby boolean is Standby Part Needed if implementation null implementation standby State Changed standby is Standby Part Needed  standbyStateChanged isStandbyPartNeeded standbyStateChanged isStandbyPartNeeded
public void update History String location if implementation null implementation update History location  updateHistory updateHistory
public boolean navigate Forward if implementation null return implementation navigate Forward else return false  navigateForward navigateForward
public boolean navigate Backward if implementation null return implementation navigate Backward else return false  navigateBackward navigateBackward
public boolean navigate Home if implementation null return implementation navigate Home else return false  navigateHome navigateHome
Called when the Intro Part is disposed Forwards the call to the implementation class public void dispose if implementation null implementation dispose  IntroPart
Support dynamic awarness Clear cached models first then update UI by delegating to implementation see org eclipse core runtime I Registry Change Listener registry Changed org eclipse core runtime I Registry Change Event public void registry Changed I Registry Change Event event if implementation null implementation registry Changed event  IRegistryChangeListener registryChanged IRegistryChangeEvent registryChanged IRegistryChangeEvent registryChanged
return Returns the home Page Id public String get Home Page Id return home Page Id  homePageId getHomePageId homePageId
return Returns the home Page Id public String get Standby Page Id return standby Page Id  homePageId getStandbyPageId standbyPageId
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element PRESENTATION  IntroElement getType getType AbstractIntroElement
return Returns the HTML head conttent to be added to each dynamic html page in this presentation public Intro Head get Head return head  IntroHead getHead

Note model class with public constructor because it is not instantiated by the model root param element public Intro Standby Content Part I Configuration Element element super element plugin Id element get Attribute ATT PLUGIN ID class Name element get Attribute ATT CLASS  IntroStandbyContentPart IConfigurationElement pluginId getAttribute ATT_PLUGIN_ID className getAttribute ATT_CLASS
return Returns the class Name public String get Class Name return class Name  className getClassName className
return Returns the plugin Id public String get Plugin Id return plugin Id  pluginId getPluginId pluginId
see org eclipse ui internal intro impl model Intro Element get Type public int get Type this model class does not need a type so far return 0  IntroElement getType getType

Intro Text Element element Bundle bundle super element bundle Node text Node element get First Child if text Node null return if text Node get Node Type Node TEXT NODE text Node get Node Type Node CDATA SECTION NODE we may have a text or a CDATA nodes text text Node get Node Value is Formatted check If Formatted  IntroText textNode getFirstChild textNode textNode getNodeType TEXT_NODE textNode getNodeType CDATA_SECTION_NODE textNode getNodeValue isFormatted checkIfFormatted
return Returns the text description public String get Text return text  getText
see org eclipse ui internal intro impl model Intro Element get Type public int get Type return Abstract Intro Element TEXT  IntroElement getType getType AbstractIntroElement
return true if the content of this text element has any which makes it formatted public boolean check If Formatted if text null return false int i text index Of NON NLS 1 return i 1 false true  checkIfFormatted indexOf
return Returns the is Formatted public boolean is Formatted return is Formatted  isFormatted isFormatted isFormatted

Prevent creation Must be created through an IntroURL Parser This constructor assumed we have a valid intro url param url IntroURL String action Properties parameters this action action this parameters parameters  IntroURLParser
Busy Indicator show While display new Runnable public void run result 0 do Execute  BusyIndicator showWhile doExecute
Executes whatever valid Intro action is embedded in this Intro URL public boolean execute final boolean result new boolean 1 Display display Display get Current Busy Indicator show While display new Runnable public void run result 0 do Execute return result 0  getCurrent BusyIndicator showWhile doExecute
private boolean do Execute check for all supported Intro actions first if action equals CLOSE return close Intro else if action equals SET STANDBY MODE Sets the state of the intro part Does not care about passing input to the part return set Standby State get Parameter KEY STANDBY else if action equals SHOW STANDBY return handle Standby State get Parameter KEY PART ID get Parameter KEY INPUT else if action equals SHOW HELP display the full Help System return show Help else if action equals SHOW HELP TOPIC display a Help System Topic return show Help Topic get Parameter KEY ID else if action equals OPEN BROWSER display url in external browser return open Browser get Parameter KEY URL get Parameter KEY PLUGIN ID else if action equals RUN ACTION run an Intro action Get the plugin Id and the class keys Pass the parameters and the standby state return run Action get Parameter KEY PLUGIN ID get Parameter KEY CLASS parameters get Parameter KEY STANDBY else if action equals SHOW PAGE display an Intro Page return show Page get Parameter KEY ID get Parameter KEY STANDBY else if action equals SHOW MESSAGE return show Message get Parameter KEY MESSAGE else if action equals NAVIGATE return navigate get Parameter KEY DIRECTION else return handle Custom Action  doExecute closeIntro SET_STANDBY_MODE setStandbyState getParameter KEY_STANDBY SHOW_STANDBY handleStandbyState getParameter KEY_PART_ID getParameter KEY_INPUT SHOW_HELP showHelp SHOW_HELP_TOPIC showHelpTopic getParameter KEY_ID OPEN_BROWSER openBrowser getParameter KEY_URL getParameter KEY_PLUGIN_ID RUN_ACTION pluginId runAction getParameter KEY_PLUGIN_ID getParameter KEY_CLASS getParameter KEY_STANDBY SHOW_PAGE showPage getParameter KEY_ID getParameter KEY_STANDBY SHOW_MESSAGE showMessage getParameter KEY_MESSAGE getParameter KEY_DIRECTION handleCustomAction
private boolean close Intro Relies on Workbench return Intro Plugin close Intro  closeIntro IntroPlugin closeIntro
Sets the into part to standby and shows the passed standby part with the given input param part Id param input private boolean handle Standby State String part Id String input set intro to standby mode we know we have a customizable part Customizable Intro Part intro Part Customizable Intro Part Intro Plugin get Intro if intro Part null intro Part Customizable Intro Part Intro Plugin show Intro true store the flag to indicate that standbypart is needed intro Part get Control set Data I Intro Constants SHOW STANDBY PART true NON NLS 1 Intro Plugin set Intro Standby true Standby Part standby Part Standby Part intro Part get Adapter Standby Part class boolean success standby Part show Content Part part Id input if success return true we do not have a valid part Id or we failed to instantiate part or create the part content show empty part and signal failure standby Part set Top Control I Intro Constants EMPTY STANDBY CONTENT PART return false  partId handleStandbyState partId CustomizableIntroPart introPart CustomizableIntroPart IntroPlugin getIntro introPart introPart CustomizableIntroPart IntroPlugin showIntro introPart getControl setData IIntroConstants SHOW_STANDBY_PART IntroPlugin setIntroStandby StandbyPart standbyPart StandbyPart introPart getAdapter StandbyPart standbyPart showContentPart partId partId standbyPart setTopControl IIntroConstants EMPTY_STANDBY_CONTENT_PART
Set the Workbench Intro Part state param state private boolean set Standby State String state if state null return false boolean standby state equals true true false NON NLS 1 I Intro Part intro Part Intro Plugin show Intro standby if intro Part null return false else return true  setStandbyState IIntroPart introPart IntroPlugin showIntro introPart
Action proxy new Action this action public void run delegate run this 
Run an action private boolean run Action String plugin Id String class Name Properties parameters String standby State Object action Object Model Loader Util create Class Instance plugin Id class Name try if action Object instanceof I Intro Action I Intro Action intro Action I Intro Action action Object I Intro Site site Intro Plugin get Default get Intro Model Root get Presentation get Intro Part get Intro Site intro Action run site parameters else if action Object instanceof I Action I Action action I Action action Object action run else if action Object instanceof I Action Delegate final I Action Delegate delegate I Action Delegate action Object if delegate instanceof I Workbench Window Action Delegate I Workbench Window Action Delegate delegate init PlatformUI get Workbench get Active Workbench Window Action proxy new Action this action public void run delegate run this proxy run else we could not create the class return false ran action successfully Now set intro intro standby if needed if standby State null return true else return set Standby State standby State catch Exception e Log error Could not run action class Name e NON NLS 1 return false  runAction pluginId className standbyState actionObject ModelLoaderUtil createClassInstance pluginId className actionObject IIntroAction IIntroAction introAction IIntroAction actionObject IIntroSite IntroPlugin getDefault getIntroModelRoot getPresentation getIntroPart getIntroSite introAction actionObject IAction IAction IAction actionObject actionObject IActionDelegate IActionDelegate IActionDelegate actionObject IWorkbenchWindowActionDelegate IWorkbenchWindowActionDelegate getWorkbench getActiveWorkbenchWindow standbyState setStandbyState standbyState className
Open a help topic private boolean show Help Topic String href Workbench Help takes care of error handling Workbench Help display Help Resource href return true  showHelpTopic WorkbenchHelp WorkbenchHelp displayHelpResource
Open the help system private boolean show Help Workbench Help display Help return true  showHelp WorkbenchHelp displayHelp
Launch external browser private boolean open Browser String url String plugin Id no need to decode url because we will create another url from this url anyway Resolve the url just in case we are trying to load a plugin relative file url Intro Model Root resolveURL url plugin Id return Util open Browser url  openBrowser pluginId IntroModelRoot pluginId openBrowser
private boolean show Message String message if message null return false else try message URL Decoder decode message UTF 8 NON NLS 1 Dialog Util display Info Message null message return true catch Unsupported Encoding Exception e Dialog Util display Info Message null IntroURL failed To Decode NON NLS 1 new Object message return false  showMessage URLDecoder DialogUtil displayInfoMessage UnsupportedEncodingException DialogUtil displayInfoMessage failedToDecode
Display an Intro Page Take a flag to enable to disable redrawing Default is setting redraw to of p REVISIT revisit picking first page private boolean show Page String page Id String standby State set the current page id in the model This will triger appropriate listener event to the UI If setting the page in the model fails ie the page was not found in the current model look for it in loaded models return false if failed avoid flicker Customizable Intro Part current Intro Part Customizable Intro Part Intro Plugin get Intro current Intro Part get Control set Redraw false Intro Model Root model Root Intro Plugin get Default get Intro Model Root boolean success model Root set Current Page Id page Id if success success include Page To Show model Root page Id we turned drawing off Turn it on again current Intro Part get Control set Redraw true if success found page model Root get Presentation update History page Id ran action successfully Now set intro intro standby if needed if standby State null return true else return set Standby State standby State else could not find referenced page return false  showPage pageId standbyState CustomizableIntroPart currentIntroPart CustomizableIntroPart IntroPlugin getIntro currentIntroPart getControl setRedraw IntroModelRoot modelRoot IntroPlugin getDefault getIntroModelRoot modelRoot setCurrentPageId pageId includePageToShow modelRoot pageId currentIntroPart getControl setRedraw modelRoot getPresentation updateHistory pageId standbyState setStandbyState standbyState
Finds the target page and includes it in passed model param page Id return private boolean include Page To Show Intro Model Root model String page Id Abstract Intro Page page find Page To Show page Id if page null Log error Failed to clone Intro page null NON NLS 1 return false now clone the target page because original model should be kept intact Resolve target page first to resolve its includes properly Insert presentation shared style at the top of the shared styles list because once reparented the shared style is lost Finally add clone page to current model page get Children current kind String current Presentation Kind model get Presentation get Implementation Kind load shared style corresponding to same presentation kind from target model Intro Part Presentation target Presentation Intro Model Root page get Parent get Presentation String target Shared Style target Presentation get Shared Style current Presentation Kind clone Abstract Intro Page cloned Page null try cloned Page Abstract Intro Page page clone catch Clone Not Supported Exception ex should never be here Log error Failed to clone Intro model node ex NON NLS 1 return false reparent cloned target to current model cloned Page set Parent model REVISIT SWT presentation does not support multiple shared styles if target Shared Style null add target model shared style cloned Page insert Style target Shared Style 0 model children add cloned Page return model set Current Page Id cloned Page get Id  pageId includePageToShow IntroModelRoot pageId AbstractIntroPage findPageToShow pageId getChildren currentPresentationKind getPresentation getImplementationKind IntroPartPresentation targetPresentation IntroModelRoot getParent getPresentation targetSharedStyle targetPresentation getSharedStyle currentPresentationKind AbstractIntroPage clonedPage clonedPage AbstractIntroPage CloneNotSupportedException clonedPage setParent targetSharedStyle clonedPage insertStyle targetSharedStyle clonedPage setCurrentPageId clonedPage getId
Searches all loaded models for the first page with the given id param page Id return private Abstract Intro Page find Page To Show String page Id get all cached models Hashtable models Extension Point Manager get Inst get Intro Models Enumeration values models elements while values has More Elements Intro Model Root model Intro Model Root values next Element Abstract Intro Page page Abstract Intro Page model find Child page Id Abstract Intro Element ABSTRACT PAGE if page null return page could not find page in any model return null  pageId AbstractIntroPage findPageToShow pageId ExtensionPointManager getInst getIntroModels hasMoreElements IntroModelRoot IntroModelRoot nextElement AbstractIntroPage AbstractIntroPage findChild pageId AbstractIntroElement ABSTRACT_PAGE
Navigate foward in the presentation whichever one it is return private boolean navigate String direction set intro to standby mode we know we have a customizable part Customizable Intro Part intro Part Customizable Intro Part Intro Plugin get Intro if intro Part null intro is closed Do nothing return false Intro Part Presentation presentation Intro Part Presentation intro Part get Adapter Intro Part Presentation class if direction equals Ignore Case VALUE BACKWARD return presentation navigate Backward else if direction equals Ignore Case VALUE FORWARD return presentation navigate Forward else if direction equals Ignore Case VALUE HOME return presentation navigate Home return false  CustomizableIntroPart introPart CustomizableIntroPart IntroPlugin getIntro introPart IntroPartPresentation IntroPartPresentation introPart getAdapter IntroPartPresentation equalsIgnoreCase VALUE_BACKWARD navigateBackward equalsIgnoreCase VALUE_FORWARD navigateForward equalsIgnoreCase VALUE_HOME navigateHome
return Returns the action imbedded in this URL public String get Action return action  getAction
Return a parameter defined in the Intro URL Returns null if the parameter is not defined param parameter Id return public String get Parameter String parameter Id return parameters get Property parameter Id  parameterId getParameter parameterId getProperty parameterId
private boolean handle Custom Action IntroURL Action command Extension Point Manager get Inst get Shared Config Extensions Manager get Command action if command null Dialog Util display Info Message null IntroURL bad Command NON NLS 1 new Object action return false custom command execute it String Buffer url new String Buffer url append http org eclipse ui intro NON NLS 1 url append command get Replace Value trim if command get Replace Value index Of 1 NON NLS 1 command does not have parameters url append NON NLS 1 else command already has parameters url append NON NLS 1 url append retrieve Initial Query I IntroURL introURL IntroURL Factory create IntroURL url to String if introURL null return introURL execute else return false  handleCustomAction IntroURLAction ExtensionPointManager getInst getSharedConfigExtensionsManager getCommand DialogUtil displayInfoMessage badCommand StringBuffer StringBuffer getReplaceValue getReplaceValue indexOf retrieveInitialQuery IIntroURL IntroURLFactory createIntroURL toString
Recreate the initial query passed to this URL return private String retrieve Initial Query String Buffer query new String Buffer Enumeration keys parameters keys while keys has More Elements String key String keys next Element query append key query append NON NLS 1 query append parameters get key if keys has More Elements query append NON NLS 1 return query to String  retrieveInitialQuery StringBuffer StringBuffer hasMoreElements nextElement hasMoreElements toString

Note model class with public constructor because it is not instantiated by the model root public IntroURL Action I Configuration Element element super element name element get Attribute ATT NAME replaces element get Attribute ATT REPLACES  IntroURLAction IConfigurationElement getAttribute ATT_NAME getAttribute ATT_REPLACES
return Returns the class Name public String get Name return name  className getName
return Returns the plugin Id public String get Replace Value return replaces  pluginId getReplaceValue
see org eclipse ui internal intro impl model Intro Element get Type public int get Type this model class does not need a type so far return 0  IntroElement getType getType

Constructor that gets the URL to parse public IntroURL Parser String url url string url create a URL instance and parser it for parameters parse Url url if is Intro Url class instance vars are already populated by now introURL new IntroURL action parameters  IntroURLParser url_string parseUrl isIntroUrl
private void parse Url String url if url null return URL url inst null try url inst new URL url catch MalformedURL Exception e not a valid URL set state return if url inst get Protocol null URL has some valid protocol Check to see if it is an intro url has Protocol true is Intro Url is Into Url url inst if is Intro Url valid intro URL Extract the action and parameters action get Path As Action url inst parameters get Query Parameters url inst return not an Intro URL do nothing return  parseUrl url_inst url_inst MalformedURLException url_inst getProtocol hasProtocol isIntroUrl isIntoUrl url_inst isIntroUrl getPathAsAction url_inst getQueryParameters url_inst
Checks to see if tha passed URL is an Intro URL An intro URL is an http URL that has the intro plugin id as a host eg http org eclipse ui intro test param url return true if url is an intro URL private boolean is Into Url URL url if url get Protocol equals Ignore Case IntroURL INTRO PROTOCOL quick exit If it is not http url is not an Intro url return false if url get Host equals Ignore Case IntroURL INTRO HOST ID return true return false  isIntoUrl getProtocol equalsIgnoreCase INTRO_PROTOCOL getHost equalsIgnoreCase INTRO_HOST_ID
Retruns the path attribute of the passed URL stripped out of the leading Returns null if the url does not have a path param url return private String get Path As Action URL url get possible action String action url get Path remove leading from path if action null action action substring 1 return action  getPathAsAction getPath
Retruns the Query part of the URL as an instance of a Properties class param url return public Properties get Query Parameters URL url parser all query parameters Properties properties new Properties String query url get Query if query null we do not have any parameters in this URL return an empty Properties instance return properties now extract the key value pairs from the query String params query split NON NLS 1 for int i 0 i params length i for every parameter ie key value pair create a property entry we know we have the key as the first string in the array and the value as the second array String key Value Pair params i split NON NLS 1 properties set Property key Value Pair 0 key Value Pair 1 return properties  getQueryParameters getQuery keyValuePair setProperty keyValuePair keyValuePair
return Returns the has Protocol public boolean has Protocol return has Protocol  hasProtocol hasProtocol hasProtocol
return Returns the is Intro Url public boolean has Intro Url return is Intro Url  isIntroUrl hasIntroUrl isIntroUrl
return Returns the introURL Will be null if the parsed URL is not an Intro URL public IntroURL get IntroURL return introURL  getIntroURL

Prevent creation protected Base Extension Point Manager registry Platform get Extension Registry  BaseExtensionPointManager getExtensionRegistry
protected Intro Model Root load Model String attrribute Name String attribute Value get all Config extension point contributions There could be more than one config contribution but there should only be one that maps to the cached intro part id I Configuration Element intro Config get Intro Config attrribute Name attribute Value load model with the config elements of the correct contribution If there are no valid contribution model stays null if intro Config null we found matching config Get all config Extension contributed to this config and pass to model Load generic config extensions as well String config Id intro Config get Attribute ATT ID I Configuration Element intro Config Extensions null if config Id null if id of config is null pass empty array intro Config Extensions new I Configuration Element 0 else intro Config Extensions get Intro Config Extensions ATT CONFIG EXTENSION CONFIG ID config Id Intro Model Root model new Intro Model Root intro Config intro Config Extensions model load Model add the current model to the hash table of models only if it is not null They key is the model id which is the id of the config that defined this model add Cached Model model get Id model now load all generic config extension ie standby Part and command contributions load Shared Config Extensions return model return null  IntroModelRoot loadModel attrributeName attributeValue IConfigurationElement introConfig getIntroConfig attrributeName attributeValue introConfig configExtension configId introConfig getAttribute ATT_ID IConfigurationElement introConfigExtensions configId introConfigExtensions IConfigurationElement introConfigExtensions getIntroConfigExtensions ATT_CONFIG_EXTENSION_CONFIG_ID configId IntroModelRoot IntroModelRoot introConfig introConfigExtensions loadModel addCachedModel getId standbyPart loadSharedConfigExtensions
Go through all the config elements and only return the correct config that maps to the correct intro part id If there is more than one config thats maps to the same intro part id log the fact and return the first one If there are non return null param config Elements return protected I Configuration Element get Intro Config String attrribute Name String attribute Value I Configuration Element config Elements registry get Configuration Elements For CONFIG I Configuration Element config get Configuration From Attribute config Elements attrribute Name attribute Value if config null if there is no valid config log the fact Log warning No Intro configuration found with attrribute Name NON NLS 1 of value attribute Value NON NLS 1 return config  configElements IConfigurationElement getIntroConfig attrributeName attributeValue IConfigurationElement configElements getConfigurationElementsFor IConfigurationElement getConfigurationFromAttribute configElements attrributeName attributeValue attrributeName attributeValue
Go through all the config Extension elements and return an array of all extensions that match the attribute and its value If there are non return empty array This also loads all standby contributions protected I Configuration Element get Intro Config Extensions String attrribute Name String attribute Value I Configuration Element config Extension Elements registry get Configuration Elements For CONFIG EXTENSION I Configuration Element config Extensions get Configurations From Attribute config Extension Elements attrribute Name attribute Value return config Extensions  configExtension IConfigurationElement getIntroConfigExtensions attrributeName attributeValue IConfigurationElement configExtensionElements getConfigurationElementsFor CONFIG_EXTENSION IConfigurationElement configExtensions getConfigurationsFromAttribute configExtensionElements attrributeName attributeValue configExtensions
Add a model to the cache This method is private because only this manager class knows how to load an intro model param model Id param model protected void add Cached Model String model Id Intro Model Root model intro Models put model Id model  modelId addCachedModel modelId IntroModelRoot introModels modelId
Gets the given model from the cache param model Id protected Intro Model Root get Cached Model String config Id return Intro Model Root intro Models get config Id  modelId IntroModelRoot getCachedModel configId IntroModelRoot introModels configId
Go through all the config elements and only return the correct config with an attribute of the given value If there is more than one configuration element that maps to the attribute value log the fact and return the first one If there are non return null param config Elements return protected I Configuration Element get Configuration From Attribute I Configuration Element config Elements String attribute Name String attribute Value find all configs with given attribute and attibute value I Configuration Element filtered Config Elements get Configurations From Attribute config Elements attribute Name attribute Value now validate that we got only one I Configuration Element config Model Loader Util validate Single Contribution filtered Config Elements attribute Name return config  configElements IConfigurationElement getConfigurationFromAttribute IConfigurationElement configElements attributeName attributeValue IConfigurationElement filteredConfigElements getConfigurationsFromAttribute configElements attributeName attributeValue IConfigurationElement ModelLoaderUtil validateSingleContribution filteredConfigElements attributeName
Go through all the config elements and return an array of matching configs with an attribute of the given value If there are non return empty array protected I Configuration Element get Configurations From Attribute I Configuration Element config Elements String attribute Name String attribute Value find all configs with given attribute and attibute value Vector elements new Vector for int i 0 i config Elements length i String current Attribute Value config Elements i get Attribute attribute Name if current Attribute Value null current Attribute Value equals attribute Value elements add config Elements i now return array I Configuration Element filtered Config Elements new I Configuration Element elements size elements copy Into filtered Config Elements return filtered Config Elements  IConfigurationElement getConfigurationsFromAttribute IConfigurationElement configElements attributeName attributeValue configElements currentAttributeValue configElements getAttribute attributeName currentAttributeValue currentAttributeValue attributeValue configElements IConfigurationElement filteredConfigElements IConfigurationElement copyInto filteredConfigElements filteredConfigElements
Loads all shared config extennsions ie standby parts and commands protected void load Shared Config Extensions shared Config Extensions Manager new Shared Config Extensions Manager registry shared Config Extensions Manager load Shared Config Extensions  loadSharedConfigExtensions sharedConfigExtensionsManager SharedConfigExtensionsManager sharedConfigExtensionsManager loadSharedConfigExtensions
return Returns the shared Config Extensions Manager public Shared Config Extensions Manager get Shared Config Extensions Manager return shared Config Extensions Manager  sharedConfigExtensionsManager SharedConfigExtensionsManager getSharedConfigExtensionsManager sharedConfigExtensionsManager
return Returns the cached intro Models public Hashtable get Intro Models return intro Models  introModels getIntroModels introModels

Prevent creation private Extension Point Manager super  ExtensionPointManager
return Returns the inst public static Extension Point Manager get Inst return inst  ExtensionPointManager getInst
Load the intro model given the current intro id private void load Current Model current Model load Model ATT CONFIG INTRO ID this intro Id  loadCurrentModel currentModel loadModel ATT_CONFIG_INTRO_ID introId
return Returns the Intro Model root Note Prefereed way of getting to the intro model root is throught the intro plugin public Intro Model Root get Current Model if current Model null we never loaded this model before or we tried before and we failed Load it Get the correct config element based on config intro Id and log any extra contributions load Current Model return current Model  IntroModelRoot getCurrentModel currentModel introId loadCurrentModel currentModel
Load an intro model given a config id param config Id return public Intro Model Root get Model String config Id Intro Model Root model get Cached Model config Id if model null we never loaded this model before or we tried before and we failed Load it Get the correct config element based on config id and log any extra contributions model load Model ATT ID config Id return model  configId IntroModelRoot getModel configId IntroModelRoot getCachedModel configId loadModel ATT_ID configId
param intro Part Id The intro Part Id to set public void set Intro Id String intro Id this intro Id intro Id we do not have to clean model here remove cached model if it exists this current Model null  introPartId introPartId setIntroId introId introId introId currentModel
public void clear current Model null shared Config Extensions Manager null intro Models clear Log info Cleared Intro model NON NLS 1  currentModel sharedConfigExtensionsManager introModels

Creates a config parser assuming that the passed content represents a URL to the content file public Intro Content Parser String content try document parse content if document null xml file is loaded validate that we have the correct root element name Element root Element document get Document Element if root Element get Tag Name equals TAG INTRO CONTENT document null String msg Intro content file has incorrect parent tag NON NLS 1 content Log warning msg catch Exception e Log error Could not load Intro content file content e NON NLS 1  IntroContentParser rootElement getDocumentElement rootElement getTagName TAG_INTRO_CONTENT
private Document parse String fileURI Document document null try Document Builder parser Document Builder Factory new Instance new Document Builder document parser parse fileURI return document catch SAX Parse Exception spe String Buffer buffer new String Buffer Intro Parser error in line NON NLS 1 buffer append spe get Line Number buffer append uri NON NLS 1 buffer append spe get System Id buffer append n NON NLS 1 buffer append spe get Message Use the contained exception Exception x spe if spe get Exception null x spe get Exception Log error buffer to String x catch SAX Exception sxe Exception x sxe if sxe get Exception null x sxe get Exception Log error x get Message x catch Parser Configuration Exception pce Parser with specified options can t be built Log error pce get Message pce catch IO Exception ioe Log error ioe get Message ioe return null  DocumentBuilder DocumentBuilderFactory newInstance newDocumentBuilder SAXParseException StringBuffer StringBuffer IntroParser getLineNumber getSystemId getMessage getException getException toString SAXException getException getException getMessage ParserConfigurationException getMessage IOException getMessage
Returned the DOM representing the intro xml content file May return null if parsing the file failed return Returns the document public Document get Document return document  getDocument

Utility method to validate an elements name param element param valid Name return public static boolean is Valid Element Name I Configuration Element element String valid Name if element get Name equals valid Name return true else bad element name return false  validName isValidElementName IConfigurationElement validName getName validName
Utility method to verify that there is only a single config Element in the passed array of elements If the array is empty null is returned If there is more than one element in the array the first one is picked but this fact is logged Attribute passed is used for logging param config Elements return the first config Element in the array or null if the array is empty public static I Configuration Element validate Single Contribution I Configuration Element config Elements String log Attribute int array Size config Elements length if array Size 0 No one contributed to extension return null return null we should only have one so use first one I Configuration Element config Element config Elements 0 String msg String Util concat Loaded NON NLS 1 config Element get Name from get Log String config Element NON NLS 1 log Attribute to String Log info msg if array Size 1 we have more than one warn in the log for int i 1 i array Size i log each extra extension Log warning get Log String config Elements i log Attribute ignored due to multiple contributions NON NLS 1 return config Element  configElement configElements configElement IConfigurationElement validateSingleContribution IConfigurationElement configElements logAttribute arraySize configElements arraySize IConfigurationElement configElement configElements StringUtil configElement getName getLogString configElement logAttribute toString arraySize arraySize getLogString configElements logAttribute configElement
Utility method to return a string to display in log If log Attribute is not null its value is also printed public static String get Log String I Configuration Element element String log Attribute String Buffer buffer new String Buffer Bundle NON NLS 1 buffer append element get Declaring Extension get Namespace buffer append Extension NON NLS 1 buffer append element get Declaring Extension get Extension Point Unique Identifier buffer append element NON NLS 1 buffer append element get Name if log Attribute null buffer append NON NLS 1 buffer append log Attribute buffer append NON NLS 1 buffer append element get Attribute log Attribute return buffer to String  logAttribute getLogString IConfigurationElement logAttribute StringBuffer StringBuffer getDeclaringExtension getNamespace getDeclaringExtension getExtensionPointUniqueIdentifier getName logAttribute logAttribute getAttribute logAttribute toString
Utility method to verify that there is only a single Element in the passed array of elements If the list is empty null is returned If there is more than one element in the array the first one is picked but this fact is logged Attribute passed is used for logging param Elements return the first Element in the array or null if the array is empty public static Element validate Single Contribution Element elements String log Attribute int array Size elements length if array Size 0 element list in empty return null return null we should only have one so use first one Element element Element elements 0 String msg String Util concat Loaded element get Node Name NON NLS 1 from get Log String element log Attribute to String NON NLS 1 Log info msg if array Size 1 we have more than one warn in the log for int i 1 i array Size i log each extra extension Log warning get Log String element log Attribute ignored due to multiple contributions NON NLS 1 return element  validateSingleContribution logAttribute arraySize arraySize StringUtil getNodeName getLogString logAttribute toString arraySize arraySize getLogString logAttribute
Utility method to return a string to display in log If log Attribute is not null its value is also printed public static String get Log String Element element String log Attribute String Buffer buffer new String Buffer XML document NON NLS 1 buffer append element get Owner Document to String buffer append Parent NON NLS 1 buffer append element get Parent Node get Node Name buffer append element NON NLS 1 buffer append element get Node Name if log Attribute null buffer append NON NLS 1 buffer append log Attribute buffer append NON NLS 1 buffer append element get Attribute log Attribute return buffer to String  logAttribute getLogString logAttribute StringBuffer StringBuffer getOwnerDocument toString getParentNode getNodeName getNodeName logAttribute logAttribute getAttribute logAttribute toString
Returns an Element array of all first level descendant Elements with a given tag name in the order in which they are encountered in the DOM Unlike the JAXP apis which returns preorder traversal of this Element tree this method filters out children deeper than first level child nodes public static Element get Elements By Tag Name Element parent String tag Name Node List all Child Elements parent get Elements By Tag Name tag Name Vector vector new Vector for int i 0 i all Child Elements get Length i we know that the nodelist is of elements Element a Element Element all Child Elements item i if a Element get Parent Node equals parent first level child element add it vector add a Element Element filtered Elements new Element vector size vector copy Into filtered Elements return filtered Elements  getElementsByTagName tagName NodeList allChildElements getElementsByTagName tagName allChildElements getLength aElement allChildElements aElement getParentNode aElement filteredElements copyInto filteredElements filteredElements
see get Elements By Tag Name Element parent String tag Name public static Element get Elements By Tag Name Document dom String tag Name Node List all Child Elements dom get Elements By Tag Name tag Name Vector vector new Vector for int i 0 i all Child Elements get Length i we know that the nodelist is of elements Element a Element Element all Child Elements item i if a Element get Parent Node equals dom get Document Element first level child element add it Cant use get Parent here vector add a Element Element filtered Elements new Element vector size vector copy Into filtered Elements return filtered Elements  getElementsByTagName tagName getElementsByTagName tagName NodeList allChildElements getElementsByTagName tagName allChildElements getLength aElement allChildElements aElement getParentNode getDocumentElement getParent aElement filteredElements copyInto filteredElements filteredElements
public static Bundle get Bundle From Configuration Element I Configuration Element cfg return Platform get Bundle cfg get Declaring Extension get Namespace  getBundleFromConfigurationElement IConfigurationElement getBundle getDeclaringExtension getNamespace
Utility method to validate the state of a bundle Log invalid bundles to log file public static boolean bundle Has Valid State Bundle bundle if bundle null bundle get State Bundle UNINSTALLED bundle get State Bundle INSTALLED if bundle null Log error Intro tried accessing a NULL bundle null NON NLS 1 else String msg String Util concat Intro tried accessing Bundle get Bundle Header NON NLS 1 bundle Constants BUNDLE NAME vendor NON NLS 1 get Bundle Header bundle Constants BUNDLE VENDOR bundle state String value Of bundle get State to String NON NLS 1 Log error msg null return false return true  bundleHasValidState getState getState StringUtil getBundleHeader BUNDLE_NAME getBundleHeader BUNDLE_VENDOR valueOf getState toString
Retrieves the given key from the bundle header param bundle param key return public static String get Bundle Header Bundle bundle String key return String bundle get Headers get key  getBundleHeader getHeaders
Util class for creating class instances from plugins param plugin Id param class Name return public static Object create Class Instance String plugin Id String class Name quick exits if plugin Id null class Name null return null Bundle bundle Platform get Bundle plugin Id if bundle Has Valid State bundle return null Class a Class Object a Object try a Class bundle load Class class Name a Object a Class new Instance return a Object catch Exception e Log error Intro Could not instantiate class Name in plugin Id NON NLS 1 NON NLS 2 e return null  pluginId className createClassInstance pluginId className pluginId className getBundle pluginId bundleHasValidState aClass aObject aClass loadClass className aObject aClass newInstance aObject className pluginId

Prevent creation protected Shared Config Extensions Manager I Extension Registry registry this registry registry  SharedConfigExtensionsManager IExtensionRegistry
Loads all shared config extennsions ie standby parts and commands protected void load Shared Config Extensions simply create model classes for all standby Part elements under a config Extension I Configuration Element config Extension Elements registry get Configuration Elements For Base Extension Point Manager CONFIG EXTENSION for int i 0 i config Extension Elements length i I Configuration Element element config Extension Elements i if Model Loader Util is Valid Element Name element Intro Standby Content Part TAG STANDBY CONTENT PART Model Loader Util is Valid Element Name element IntroURL Action TAG ACTION if extension is not a standbypart or command ignore continue create Model Class element  loadSharedConfigExtensions standbyPart configExtension IConfigurationElement configExtensionElements getConfigurationElementsFor BaseExtensionPointManager CONFIG_EXTENSION configExtensionElements IConfigurationElement configExtensionElements ModelLoaderUtil isValidElementName IntroStandbyContentPart TAG_STANDBY_CONTENT_PART ModelLoaderUtil isValidElementName IntroURLAction TAG_ACTION createModelClass
Create an intro standby part or an intro command model class param element private void create Model Class I Configuration Element element if element get Name equals Intro Standby Content Part TAG STANDBY CONTENT PART Intro Standby Content Part standby Part Content new Intro Standby Content Part element if standby Part Content get Id null no id ignore return standby Parts put standby Part Content get Id standby Part Content else IntroURL Action introURL Command new IntroURL Action element if introURL Command get Name null introURL Command get Replace Value null no name or resolved Value ignore return commands put introURL Command get Name introURL Command  createModelClass IConfigurationElement getName IntroStandbyContentPart TAG_STANDBY_CONTENT_PART IntroStandbyContentPart standbyPartContent IntroStandbyContentPart standbyPartContent getId standbyParts standbyPartContent getId standbyPartContent IntroURLAction introURLCommand IntroURLAction introURLCommand getName introURLCommand getReplaceValue resolvedValue introURLCommand getName introURLCommand
return Returns a standby Part basd on its registred id public Intro Standby Content Part get Standby Part String part Id if part Id null return null return Intro Standby Content Part standby Parts get part Id  standbyPart IntroStandbyContentPart getStandbyPart partId partId IntroStandbyContentPart standbyParts partId
return Returns the command from its name public IntroURL Action get Command String command Name if command Name null return null return IntroURL Action commands get command Name  IntroURLAction getCommand commandName commandName IntroURLAction commandName

public Object get Children Object element Abstract Intro Element intro Element null if element instanceof Abstract Intro Element synch the resource first intro Element Abstract Intro Element element if intro Element null intro Element is Of Type Abstract Intro Element ABSTRACT CONTAINER return Abstract Intro Container intro Element get Children return new Object 0  getChildren AbstractIntroElement introElement AbstractIntroElement introElement AbstractIntroElement introElement introElement isOfType AbstractIntroElement ABSTRACT_CONTAINER AbstractIntroContainer introElement getChildren
public Object get Parent Object element Abstract Intro Element intro Element null if element instanceof Abstract Intro Element synch the resource first intro Element Abstract Intro Element element return intro Element get Parent return null  getParent AbstractIntroElement introElement AbstractIntroElement introElement AbstractIntroElement introElement getParent
public boolean has Children Object element Abstract Intro Element intro Element null if element instanceof Abstract Intro Element synch the resource first intro Element Abstract Intro Element element if intro Element null intro Element is Of Type Abstract Intro Element ABSTRACT CONTAINER return true return false  hasChildren AbstractIntroElement introElement AbstractIntroElement introElement AbstractIntroElement introElement introElement isOfType AbstractIntroElement ABSTRACT_CONTAINER
see I Structured Content Provider get Elements Object public Object get Elements Object element return get Children element  IStructuredContentProvider getElements getElements getChildren
see I Content Provider dispose public void dispose  IContentProvider
java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput

public Intro Model Label Provider super  IntroModelLabelProvider
public Image get Image Object element Image image null Abstract Intro Element intro Element null if element instanceof Abstract Intro Element synch the resource first intro Element Abstract Intro Element element if intro Element null return null int element Type intro Element get Type switch element Type case Abstract Intro Element GROUP case Abstract Intro Element PAGE case Abstract Intro Element HOME PAGE image Image Util get Image Image Util INTRO MODEL CONTAINER break default image Image Util get Image Image Util INTRO MODEL LEAF break return image  getImage AbstractIntroElement introElement AbstractIntroElement introElement AbstractIntroElement introElement elementType introElement getType elementType AbstractIntroElement AbstractIntroElement AbstractIntroElement HOME_PAGE ImageUtil getImage ImageUtil INTRO_MODEL_CONTAINER ImageUtil getImage ImageUtil INTRO_MODEL_LEAF
public String get Text Object element String label null Abstract Intro Element intro Element null if element instanceof Abstract Intro Element synch the resource first intro Element Abstract Intro Element element if intro Element null return null int element Type intro Element get Type switch element Type case Abstract Intro Element GROUP label GROUP Intro Group intro Element get Label NON NLS 1 break case Abstract Intro Element LINK label LINK Intro Link intro Element get Label NON NLS 1 break case Abstract Intro Element TEXT label TEXT Intro Text intro Element get Text NON NLS 1 break case Abstract Intro Element IMAGE label IMAGE Intro Image intro Element get Id NON NLS 1 break case Abstract Intro Element HTML label HTML IntroHTML intro Element get Id NON NLS 1 break case Abstract Intro Element INCLUDE label Unresolved INCLUDE NON NLS 1 Intro Include intro Element get Path break case Abstract Intro Element PAGE label PAGE Abstract Intro Page intro Element get Title NON NLS 1 break case Abstract Intro Element HOME PAGE label HOME PAGE NON NLS 1 Abstract Intro Page intro Element get Title break case Abstract Intro Element PRESENTATION label PRESENTATION NON NLS 1 Intro Part Presentation intro Element get Implementation Kind break case Abstract Intro Element CONTAINER EXTENSION label Unresolved Config Extension NON NLS 1 Intro Extension Content intro Element get Path break default label super get Text element break return label  getText AbstractIntroElement introElement AbstractIntroElement introElement AbstractIntroElement introElement elementType introElement getType elementType AbstractIntroElement IntroGroup introElement getLabel AbstractIntroElement IntroLink introElement getLabel AbstractIntroElement IntroText introElement getText AbstractIntroElement IntroImage introElement getId AbstractIntroElement introElement getId AbstractIntroElement IntroInclude introElement getPath AbstractIntroElement AbstractIntroPage introElement getTitle AbstractIntroElement HOME_PAGE AbstractIntroPage introElement getTitle AbstractIntroElement IntroPartPresentation introElement getImplementationKind AbstractIntroElement CONTAINER_EXTENSION ConfigExtension IntroExtensionContent introElement getPath getText

see org eclipse ui I Part Listener2 part Activated org eclipse ui I Workbench Part Reference public void part Activated I Workbench Part Reference ref handle Part Activation ref true  IPartListener2 partActivated IWorkbenchPartReference partActivated IWorkbenchPartReference handlePartActivation
see org eclipse ui I Part Listener2 part Brought To Top org eclipse ui I Workbench Part Reference public void part Brought To Top I Workbench Part Reference ref  IPartListener2 partBroughtToTop IWorkbenchPartReference partBroughtToTop IWorkbenchPartReference
see org eclipse ui I Part Listener2 part Closed org eclipse ui I Workbench Part Reference public void part Closed I Workbench Part Reference ref handle Part Activation ref false  IPartListener2 partClosed IWorkbenchPartReference partClosed IWorkbenchPartReference handlePartActivation
see org eclipse ui I Part Listener2 part Deactivated org eclipse ui I Workbench Part Reference public void part Deactivated I Workbench Part Reference ref  IPartListener2 partDeactivated IWorkbenchPartReference partDeactivated IWorkbenchPartReference
see org eclipse ui I Part Listener2 part Hidden org eclipse ui I Workbench Part Reference public void part Hidden I Workbench Part Reference ref  IPartListener2 partHidden IWorkbenchPartReference partHidden IWorkbenchPartReference
see org eclipse ui I Part Listener2 part Input Changed org eclipse ui I Workbench Part Reference public void part Input Changed I Workbench Part Reference ref  IPartListener2 partInputChanged IWorkbenchPartReference partInputChanged IWorkbenchPartReference
see org eclipse ui I Part Listener2 part Opened org eclipse ui I Workbench Part Reference public void part Opened I Workbench Part Reference ref  IPartListener2 partOpened IWorkbenchPartReference partOpened IWorkbenchPartReference
see org eclipse ui I Part Listener2 part Visible org eclipse ui I Workbench Part Reference public void part Visible I Workbench Part Reference ref  IPartListener2 partVisible IWorkbenchPartReference partVisible IWorkbenchPartReference
public void init I Intro Part intro Part I Memento memento part Listener new Part Listener default Text Intro Plugin get String Context Help Standby Part default Text NON NLS 1 Image Util register Image Image Util HELP TOPIC help topic gif NON NLS 1  IIntroPart introPart IMemento partListener PartListener defaultText IntroPlugin getString ContextHelpStandbyPart defaultText ImageUtil registerImage ImageUtil HELP_TOPIC help_topic
button add Selection Listener new Selection Adapter public void widget Selected Selection Event e do Search phrase Text get Text  addSelectionListener SelectionAdapter widgetSelected SelectionEvent doSearch phraseText getText
phrase Text add Modify Listener new Modify Listener public void modify Text Modify Event e String text phrase Text get Text button set Enabled text length 0  phraseText addModifyListener ModifyListener modifyText ModifyEvent phraseText getText setEnabled
public void key Released Key Event e if e character r if button is Enabled do Search phrase Text get Text  keyReleased KeyEvent isEnabled doSearch phraseText getText
text add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e open Link e get Href  addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent openLink getHref
public void create Part Control Composite parent Form Toolkit toolkit parent form form toolkit create Scrolled Form parent Table Wrap Layout layout new Table Wrap Layout form get Body set Layout layout Util highlight form get Body SWT COLOR YELLOW help container Has three colums search text go Composite help Container toolkit create Composite form get Body Grid Layout glayout new Grid Layout glayout num Columns 3 glayout margin Width glayout margin Height 1 help Container set Layout glayout help Container set Layout Data new Table Wrap Data Table Wrap Data FILL GRAB toolkit paint Borders For help Container Label label toolkit create Label help Container Intro Plugin get String Context Help Standby Part search NON NLS 1 label set Layout Data new Grid Data Grid Data VERTICAL ALIGN CENTER phrase Text toolkit create Text help Container NON NLS 1 phrase Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL final Button button toolkit create Button help Container Intro Plugin get String Context Help Standby Part button go SWT PUSH NON NLS 1 button add Selection Listener new Selection Adapter public void widget Selected Selection Event e do Search phrase Text get Text button set Enabled false phrase Text add Modify Listener new Modify Listener public void modify Text Modify Event e String text phrase Text get Text button set Enabled text length 0 phrase Text add Key Listener new Key Adapter public void key Released Key Event e if e character r if button is Enabled do Search phrase Text get Text title toolkit create Label form get Body null SWT WRAP title set Text Intro Plugin get String Context Help Standby Part context Help Area Title NON NLS 1 title set Font J Face Resources get Header Font title set Foreground toolkit get Colors get Color Form Colors TITLE text toolkit create Form Text form get Body true text set Image Image Util HELP TOPIC Image Util get Image Image Util HELP TOPIC text add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e open Link e get Href text set Layout Data new Table Wrap Data Table Wrap Data FILL Table Wrap Data FILL text set Text default Text false false I Workbench Window window PlatformUI get Workbench get Active Workbench Window I Part Service service window get Part Service service add Part Listener part Listener toolkit paint Borders For form get Body  createPartControl FormToolkit createScrolledForm TableWrapLayout TableWrapLayout getBody setLayout getBody COLOR_YELLOW helpContainer createComposite getBody GridLayout GridLayout numColumns marginWidth marginHeight helpContainer setLayout helpContainer setLayoutData TableWrapData TableWrapData FILL_GRAB paintBordersFor helpContainer createLabel helpContainer IntroPlugin getString ContextHelpStandbyPart setLayoutData GridData GridData VERTICAL_ALIGN_CENTER phraseText createText helpContainer phraseText setLayoutData GridData GridData FILL_HORIZONTAL createButton helpContainer IntroPlugin getString ContextHelpStandbyPart addSelectionListener SelectionAdapter widgetSelected SelectionEvent doSearch phraseText getText setEnabled phraseText addModifyListener ModifyListener modifyText ModifyEvent phraseText getText setEnabled phraseText addKeyListener KeyAdapter keyReleased KeyEvent isEnabled doSearch phraseText getText createLabel getBody setText IntroPlugin getString ContextHelpStandbyPart contextHelpArea setFont JFaceResources getHeaderFont setForeground getColors getColor FormColors createFormText getBody setImage ImageUtil HELP_TOPIC ImageUtil getImage ImageUtil HELP_TOPIC addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent openLink getHref setLayoutData TableWrapData TableWrapData TableWrapData setText defaultText IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IPartService getPartService addPartListener partListener paintBordersFor getBody
public Control get Control return form  getControl
private void do Search String phrase try String ephrase URL Encoder encode phrase UTF 8 NON NLS 1 String query tab search search Word ephrase NON NLS 1 Workbench Help display Help Resource query catch Unsupported Encoding Exception e System out println e  doSearch URLEncoder searchWord WorkbenchHelp displayHelpResource UnsupportedEncodingException
private void handle Part Activation I Workbench Part Reference ref boolean activated if text is Disposed return I Workbench Part part ref get Part false String part Id part get Site get Id Ignore ourselves if part Id equals org eclipse ui internal introview NON NLS 1 return if activated title set Text Intro Plugin get String Context Help Standby Part what Is Area Title NON NLS 1 part get Site get Registered Name NON NLS 1 NON NLS 2 String help Text create Context Help part text set Text help Text null help Text help Text null NON NLS 1 false else title set Text Intro Plugin get String Context Help Standby Part context Help Area Title NON NLS 1 text set Text default Text false false form get Body layout form reflow true  handlePartActivation IWorkbenchPartReference isDisposed IWorkbenchPart getPart partId getSite getId partId setText IntroPlugin getString ContextHelpStandbyPart whatIsArea getSite getRegisteredName helpText createContextHelp setText helpText helpText helpText setText IntroPlugin getString ContextHelpStandbyPart contextHelpArea setText defaultText getBody
private String create Context Help I Workbench Part part String text null if part null Display display part get Site get Shell get Display Control c display get Focus Control if c null c is Visible c is Disposed I Context help Context find Help Context c if help Context null text format Help Context help Context return text  createContextHelp IWorkbenchPart getSite getShell getDisplay getFocusControl isVisible isDisposed IContext helpContext findHelpContext helpContext formatHelpContext helpContext
private I Context find Help Context Control c String context Id null Control node c do context Id String node get Data HELP KEY if context Id null break node node get Parent while node null if context Id null return Help System get Context context Id return null  IContext findHelpContext contextId contextId getData HELP_KEY contextId getParent contextId HelpSystem getContext contextId
private String format Help Context I Context context String Buffer sbuf new String Buffer sbuf append form NON NLS 1 sbuf append p NON NLS 1 sbuf append decode Context Bold Tags context sbuf append p NON NLS 1 I Help Resource links context get Related Topics if links length 0 for int i 0 i links length i I Help Resource link links i sbuf append li style text indent 2 NON NLS 1 sbuf append img href NON NLS 1 sbuf append Image Util HELP TOPIC sbuf append NON NLS 1 sbuf append a href NON NLS 1 sbuf append link get Href sbuf append NON NLS 1 sbuf append link get Label sbuf append a NON NLS 1 sbuf append li NON NLS 1 sbuf append form NON NLS 1 return sbuf to String  formatHelpContext IContext StringBuffer StringBuffer decodeContextBoldTags IHelpResource getRelatedTopics IHelpResource ImageUtil HELP_TOPIC getHref getLabel toString
Make sure to support the Help system bold tag Help systen returns a regular string for get Text Use internal apis for now to get bold param context return private String decode Context Bold Tags I Context context String styled Text if context instanceof I Styled Context styled Text I Styled Context context get Styled Text else styled Text context get Text String decoded String styled Text replace All b b NON NLS 1 NON NLS 2 decoded String decoded String replace All b b NON NLS 1 NON NLS 2 return decoded String  getText decodeContextBoldTags IContext styledText IStyledContext styledText IStyledContext getStyledText styledText getText decodedString styledText replaceAll decodedString decodedString replaceAll decodedString
private void open Link Object href String url String href if url null Workbench Help display Help Resource url  openLink WorkbenchHelp displayHelpResource
public void dispose I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null return I Part Service service window get Part Service if service null return service remove Part Listener part Listener  IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IPartService getPartService removePartListener partListener
see org eclipse ui internal intro impl parts I Standby Content Part set Focus public void set Focus phrase Text set Focus  IStandbyContentPart setFocus setFocus phraseText setFocus
see org eclipse ui internal intro impl parts I Standby Content Part set Input java lang Object public void set Input Object input does nothing  IStandbyContentPart setInput setInput
public void save State I Memento memento  saveState IMemento

public void create Part Control Composite parent Form Toolkit toolkit content Composite toolkit create Composite parent content Composite set Layout new Grid Layout String text Intro Plugin get String Empty Standby Content Part text NON NLS 1 Label label toolkit create Label content Composite text SWT NULL label set Font Page Style Manager get Banner Font Grid Data gd new Grid Data Grid Data FILL HORIZONTAL label set Layout Data gd  createPartControl FormToolkit contentComposite createComposite contentComposite setLayout GridLayout IntroPlugin getString EmptyStandbyContentPart createLabel contentComposite setFont PageStyleManager getBannerFont GridData GridData GridData FILL_HORIZONTAL setLayoutData
see org eclipse ui intro config I Standby Content Part get Control public Control get Control return content Composite  IStandbyContentPart getControl getControl contentComposite
see org eclipse ui intro config I Standby Content Part init org eclipse ui intro I Intro Part public void init I Intro Part intro Part I Memento memento  IStandbyContentPart IIntroPart IIntroPart introPart IMemento
see org eclipse ui intro config I Standby Content Part set Input java lang Object public void set Input Object input  IStandbyContentPart setInput setInput
see org eclipse ui intro config I Standby Content Part set Focus public void set Focus  IStandbyContentPart setFocus setFocus
see org eclipse ui intro config I Standby Content Part dispose public void dispose  IStandbyContentPart
public void save State I Memento memento  saveState IMemento

protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache Point lsize return Link compute Size SWT DEFAULT SWT DEFAULT flush Cache Point csize content compute Size SWT DEFAULT SWT DEFAULT flush Cache int width Math max lsize x 2 HMARGIN csize x int height HMARGIN lsize y VGAP csize y return new Point width height  computeSize wHint hHint flushCache returnLink computeSize flushCache computeSize flushCache
protected void layout Composite composite boolean flush Cache Rectangle carea composite get Client Area int lwidth carea width HMARGIN 2 Point lsize return Link compute Size lwidth SWT DEFAULT flush Cache int x HMARGIN int y VMARGIN return Link set Bounds x y lsize x lsize y x 0 y lsize y VGAP content set Bounds x y carea width carea height VMARGIN lsize y VGAP  flushCache getClientArea returnLink computeSize flushCache returnLink setBounds setBounds
param parent public Standby Part Intro Model Root model this model model  StandbyPart IntroModelRoot
public void init I Intro Part intro Part I Memento memento this intro Part intro Part this memento memento  IIntroPart introPart IMemento introPart introPart
private I Memento get Memento I Memento memento String key if memento null return null return memento get Child key  IMemento getMemento IMemento getChild
public void create Part Control Composite parent toolkit new Form Toolkit parent get Display parent container Has custom layout Has return link and content stack composite container toolkit create Composite parent container set Layout new Standby Layout return hyper link Image Util register Image Image Util BACK full elcl16 home nav gif NON NLS 1 return Link toolkit create Image Hyperlink container SWT WRAP SWT CENTER return Link set Image Image Util get Image Image Util BACK return Link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e do Return content stack container content toolkit create Composite container Stack Layout slayout new Stack Layout slayout margin Width slayout margin Height 0 content set Layout slayout boolean success false if memento null success restore State memento if success add empty standby content add Empty Part update Return Link Label  createPartControl FormToolkit getDisplay createComposite setLayout StandbyLayout ImageUtil registerImage ImageUtil home_nav returnLink createImageHyperlink returnLink setImage ImageUtil getImage ImageUtil returnLink addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent doReturn createComposite StackLayout StackLayout marginWidth marginHeight setLayout restoreState addEmptyPart updateReturnLinkLabel
Empty content part used as backup for failures private void add Empty Part empty Part new Empty Standby Content Part add Standby Content Part EMPTY STANDBY CONTENT PART empty Part set Top Control EMPTY STANDBY CONTENT PART  addEmptyPart emptyPart EmptyStandbyContentPart addStandbyContentPart EMPTY_STANDBY_CONTENT_PART emptyPart setTopControl EMPTY_STANDBY_CONTENT_PART
Tries to create the last content part viewed based on content part id param memento return private boolean restore State I Memento memento String content Part Id memento get String MEMENTO STANDBY CONTENT PART ID ATT if content Part Id null return false create the cached content part Content parts are responsible for storing and reading their input state return show Content Part content Part Id null  restoreState IMemento contentPartId getString MEMENTO_STANDBY_CONTENT_PART_ID_ATT contentPartId showContentPart contentPartId
Sets the into part to standby and shows the passed standby part with the given input param part Id param input public boolean show Content Part String part Id String input Get the Intro Standby Content Part that maps to the given part Id Intro Standby Content Part standby Part Content Extension Point Manager get Inst get Shared Config Extensions Manager get Standby Part part Id if standby Part Content null String standby Content Class Name standby Part Content get Class Name String plugin Id standby Part Content get Plugin Id Object standby Content Object Model Loader Util create Class Instance plugin Id standby Content Class Name if standby Content Object instanceof I Standby Content Part I Standby Content Part content Part I Standby Content Part standby Content Object Control c add Standby Content Part part Id content Part if c null try set Top Control part Id set Input input return true catch Exception e Log error Failed to set the input input NON NLS 1 on standby part part Id e NON NLS 1 return false we do not have a valid part Id or we failed to instantiate part or create the part content show empty part and signal failure set Top Control EMPTY STANDBY CONTENT PART return false  partId showContentPart partId IntroStandbyContentPart partId IntroStandbyContentPart standbyPartContent ExtensionPointManager getInst getSharedConfigExtensionsManager getStandbyPart partId standbyPartContent standbyContentClassName standbyPartContent getClassName pluginId standbyPartContent getPluginId standbyContentObject ModelLoaderUtil createClassInstance pluginId standbyContentClassName standbyContentObject IStandbyContentPart IStandbyContentPart contentPart IStandbyContentPart standbyContentObject addStandbyContentPart partId contentPart setTopControl partId setInput partId partId setTopControl EMPTY_STANDBY_CONTENT_PART
Creates a standby Content part in the stack only if one is not already created The part Id is used as tke key in the cache The value is an instance of Control Key that wraps a control Standby Part pair along with the corresponding part id This is needed to retrive the control of a given standby part The I Memento should be passed to the Standby Part when it is initialized param standby Content public Control add Standby Content Part String part Id I Standby Content Part standby Content Control Key control Key get Cached Content part Id if control Key null standby Content init intro Part get Memento memento MEMENTO STANDBY CONTENT PART TAG try standby Content create Part Control content toolkit catch Exception e Log error Failed to create part for standby part part Id e NON NLS 1 return null Control control standby Content get Control control Key new Control Key control standby Content part Id cached Content Parts put part Id control Key return control Key get Control  standbyContent partId ControlKey StandbyPart IMemento StandbyPart standbyContent addStandbyContentPart partId IStandbyContentPart standbyContent ControlKey controlKey getCachedContent partId controlKey standbyContent introPart getMemento MEMENTO_STANDBY_CONTENT_PART_TAG standbyContent createPartControl partId standbyContent getControl controlKey ControlKey standbyContent partId cachedContentParts partId controlKey controlKey getControl
public void set Input Object input I Standby Content Part standby Content cached Control Key get Content Part standby Content set Input input update Return Link Label container layout  setInput IStandbyContentPart standbyContent cachedControlKey getContentPart standbyContent setInput updateReturnLinkLabel
public void set Top Control String key cached Control Key get Cached Content key if cached Control Key null set Top Control cached Control Key get Control  setTopControl cachedControlKey getCachedContent cachedControlKey setTopControl cachedControlKey getControl
private void set Top Control Control c Stack Layout layout Stack Layout content get Layout layout top Control c if c instanceof Composite Composite c layout content layout container layout  setTopControl StackLayout StackLayout getLayout topControl
private void update Return Link Label Abstract Intro Page page model get Current Page String link Text Intro Plugin get String Standby Part return To Intro NON NLS 1 String tool Tip Intro Plugin get String Standby Part return To NON NLS 1 page get Title NON NLS 1 return Link set Text link Text return Link set Tool Tip Text tool Tip  updateReturnLinkLabel AbstractIntroPage getCurrentPage linkText IntroPlugin getString StandbyPart returnToIntro toolTip IntroPlugin getString StandbyPart returnTo getTitle returnLink setText linkText returnLink setToolTipText toolTip
private void do Return remove the flag to indicate that standbypart is no longer needed Customizable Intro Part intro Part get Control set Data I Intro Constants SHOW STANDBY PART null Intro Plugin set Intro Standby false  doReturn CustomizableIntroPart introPart getControl setData IIntroConstants SHOW_STANDBY_PART IntroPlugin setIntroStandby
Calls dispose on all cached I Standby Content Parts public void dispose Enumeration values cached Content Parts elements while values has More Elements Control Key control Key Control Key values next Element control Key get Content Part dispose toolkit dispose  IStandbyContentParts cachedContentParts hasMoreElements ControlKey controlKey ControlKey nextElement controlKey getContentPart
Save the current state of the standby part It stores the cached content part id for later creating it on restart It also creates another subclass momento to also give the standby content part its own name space This was momentos saved by different content parts will not conflict param memento the memento in which to store state information public void save State I Memento memento save cached content part id if cached Control Key null String content Part Id cached Control Key get Content Part Id if content Part Id EMPTY STANDBY CONTENT PART do not create memento for empty standby return memento put String MEMENTO STANDBY CONTENT PART ID ATT content Part Id give standby part its own child to create a name space for I Standby Part Content contribution momentos I Memento standby Content Part Memento memento create Child MEMENTO STANDBY CONTENT PART TAG pass new memento to correct standby part I Standby Content Part standby Contentpart cached Control Key get Content Part if standby Contentpart null standby Contentpart save State standby Content Part Memento  saveState IMemento cachedControlKey contentPartId cachedControlKey getContentPartId contentPartId EMPTY_STANDBY_CONTENT_PART putString MEMENTO_STANDBY_CONTENT_PART_ID_ATT contentPartId IStandbyPartContent IMemento standbyContentPartMemento createChild MEMENTO_STANDBY_CONTENT_PART_TAG IStandbyContentPart standbyContentpart cachedControlKey getContentPart standbyContentpart standbyContentpart saveState standbyContentPartMemento
public void set Focus grab foxus first then delegate This way if content part does nothing on focus part still works return Link set Focus if cached Control Key null cached Control Key get Content Part set Focus  setFocus returnLink setFocus cachedControlKey cachedControlKey getContentPart setFocus
Checks the standby cache stack if we have already created a similar I Standby Content Part If not returns null param standby Content return private Control Key get Cached Content String key if cached Content Parts contains Key key return Control Key cached Content Parts get key return null  IStandbyContentPart standbyContent ControlKey getCachedContent cachedContentParts containsKey ControlKey cachedContentParts
Control Key Control c I Standby Content Part part String content Part Id this c c this part part this content Part Id content Part Id  ControlKey IStandbyContentPart contentPartId contentPartId contentPartId
return Returns the c public Control get Control return c  getControl
return Returns the content part public I Standby Content Part get Content Part return part  IStandbyContentPart getContentPart
return Returns the part id public String get Content Part Id return content Part Id  getContentPartId contentPartId

protected void update Navigation Actions State if get Model is Dynamic forward Action set Enabled can Navigate Forward back Action set Enabled can Navigate Backward return in static html intro use browser history forward Action set Enabled browser is Forward Enabled back Action set Enabled browser is Back Enabled  updateNavigationActionsState getModel isDynamic forwardAction setEnabled canNavigateForward backAction setEnabled canNavigateBackward forwardAction setEnabled isForwardEnabled backAction setEnabled isBackEnabled
browser add Progress Listener new Progress Listener public void changed Progress Event event  addProgressListener ProgressListener ProgressEvent
public void completed Progress Event event browser set Data frame Navigation null NON NLS 1 if get Model is Dynamic update Navigation Actions State  ProgressEvent setData frameNavigation getModel isDynamic updateNavigationActionsState
public void handle Event Event event if Intro Plugin get Default is Debugging event doit true else event doit false  handleEvent IntroPlugin getDefault isDebugging
create the browser and set it s contents public void create Part Control Composite parent browser new Browser parent SWT NONE add a location listener on the browser so we can intercept Location Events Responsible for intercepting UR Ls and updating UI with history browser add Location Listener url Listener add a location listener that will clear a flag at the end of any navigation to a page This is used in conjunction with the location listener to filter out redundant navigations due to frames browser add Progress Listener new Progress Listener public void changed Progress Event event public void completed Progress Event event browser set Data frame Navigation null NON NLS 1 if get Model is Dynamic update Navigation Actions State Enable IE pop up menu only in debug mode browser add Listener SWT Menu Detect new Listener public void handle Event Event event if Intro Plugin get Default is Debugging event doit true else event doit false add Tool Bar Actions if get Model has Valid Config browser set Text Intro Plugin get String Browser invalid Config NON NLS 1 return root page is what decides if the model is dynamic or not if get Model is Dynamic handle Dynamic Intro else handle Static Intro  createPartControl LocationEvents URLs addLocationListener urlListener addProgressListener ProgressListener ProgressEvent ProgressEvent setData frameNavigation getModel isDynamic updateNavigationActionsState addListener MenuDetect handleEvent IntroPlugin getDefault isDebugging addToolBarActions getModel hasValidConfig setText IntroPlugin getString invalidConfig getModel isDynamic handleDynamicIntro handleStaticIntro
private void handle Dynamic Intro Intro Home Page home Page get Model get Home Page check cache state String cached Page get Cached Current Page if cached Page null we have a cached state handle appropriately if isURL cached Page set the URL the browser should display boolean success browser set Url cached Page if success Log error Unable to set the following ULR in browser NON NLS 1 cached Page null return else Generate HTML for the cached page and set it on the browser get Model set Current Page Id cached Page false generate Dynamic Content For Page get Model get Current Page update History cached Page else No cached page Generate HTML for the home page and set it on the browser generate Dynamic Content For Page home Page update History home Page get Id REVISIT all set Text calls above are commented out because calling set Text twice causes problems revisit when swt bug is fixed Add this presentation as a listener to model only in dynamic case for now get Model add Property Listener this  handleDynamicIntro IntroHomePage homePage getModel getHomePage cachedPage getCachedCurrentPage cachedPage cachedPage setUrl cachedPage cachedPage getModel setCurrentPageId cachedPage generateDynamicContentForPage getModel getCurrentPage updateHistory cachedPage generateDynamicContentForPage homePage updateHistory homePage getId setText setText getModel addPropertyListener
Generate dynamic HTML for the provided page and set it in the browser widget Revisit this This method also updates the navigation history param page the page to generate HTML for private boolean generate Dynamic Content For Page Abstract Intro Page page HTML Element html getHTML Generator generateHTM Lfor Page page if html null there was an error generating the html log an error Log error Error generating HTML null NON NLS 1 return false set the browser s HTML boolean success false if browser null success browser set Text html to String if success Log error Unable to set HTML on the browser null NON NLS 1 print the HTML if we are in debug mode and have tracing turned on if Intro Plugin get Default is Debugging String print Html Platform get Debug Option org eclipse ui intro trace printHTML NON NLS 1 if print Html null print Html equals Ignore Case true NON NLS 1 System out println html return success  generateDynamicContentForPage AbstractIntroPage HTMLElement getHTMLGenerator generateHTMLforPage setText toString IntroPlugin getDefault isDebugging printHtml getDebugOption printHtml printHtml equalsIgnoreCase
Return the cached IntroHTML Generator return private IntroHTML Generator getHTML Generator if html Generator null html Generator new IntroHTML Generator return html Generator  IntroHTMLGenerator IntroHTMLGenerator getHTMLGenerator htmlGenerator htmlGenerator IntroHTMLGenerator htmlGenerator
protected void add Tool Bar Actions Handle menus I Action Bars action Bars get Intro Part get Intro Site get Action Bars I Tool Bar Manager tool Bar Manager action Bars get Tool Bar Manager action Bars set Global Action Handler Action Factory FORWARD get Id forward Action action Bars set Global Action Handler Action Factory BACK get Id back Action tool Bar Manager add home Action tool Bar Manager add back Action tool Bar Manager add forward Action tool Bar Manager update true action Bars update Action Bars update Navigation Actions State  addToolBarActions IActionBars actionBars getIntroPart getIntroSite getActionBars IToolBarManager toolBarManager actionBars getToolBarManager actionBars setGlobalActionHandler ActionFactory getId forwardAction actionBars setGlobalActionHandler ActionFactory getId backAction toolBarManager homeAction toolBarManager backAction toolBarManager forwardAction toolBarManager actionBars updateActionBars updateNavigationActionsState
public void dynamic Standby State Changed boolean standby boolean is Standby Part Needed if is Standby Part Needed we have a standby part nothing more to do in presentation return presentation is shown here toggle standby page No need to update history here Intro Home Page home Page get Model get Home Page Intro Home Page standby Page get Model get Standby Page if standby Page null standby Page home Page if standby generate Dynamic Content For Page get Model get Standby Page else REVISIT If cached page is the standby page and we are not initially in standby mode it means standby was forced on intro view on close react if get Model get Current Page equals standby Page get Id get Model set Current Page Id get Model get Home Page get Id generate Dynamic Content For Page get Model get Current Page  dynamicStandbyStateChanged isStandbyPartNeeded isStandbyPartNeeded IntroHomePage homePage getModel getHomePage IntroHomePage standbyPage getModel getStandbyPage standbyPage standbyPage homePage generateDynamicContentForPage getModel getStandbyPage getModel getCurrentPage standbyPage getId getModel setCurrentPageId getModel getHomePage getId generateDynamicContentForPage getModel getCurrentPage
Handle model property changes Property listeners are only added in the dynamic case see org eclipse ui I Property Listener property Changed java lang Object int public void property Changed Object source int prop Id if prop Id Intro Model Root CURRENT PAGE PROPERTY ID String page Id get Model get Current Page Id if page Id null page Id equals NON NLS 1 page ID was not set properly exit return generate Dynamic Content For Page get Model get Current Page  IPropertyListener propertyChanged propertyChanged propId propId IntroModelRoot CURRENT_PAGE_PROPERTY_ID pageId getModel getCurrentPageId pageId pageId generateDynamicContentForPage getModel getCurrentPage
public void set Focus browser set Focus  setFocus setFocus
public void dispose browser dispose 
Override parent behavior to handle the case when we have a static page This can happen in both the static intro case or in the dynamic when the last visited page is the dynamic browser is an http page and not an intro page protected void save Current Page I Memento memento if memento null return Handle the case where we are on a static page browser getURL returns the empty string if there is no current URL and returns about blank if we are on a dynamic page if browser null browser get Url null browser get Url length 0 browser get Url equals about blank NON NLS 1 String currentURL browser get Url if currentURL null memento put String I Intro Constants MEMENTO CURRENT PAGE ATT currentURL else super save Current Page memento  saveCurrentPage IMemento getUrl getUrl getUrl getUrl putString IIntroConstants MEMENTO_CURRENT_PAGE_ATT saveCurrentPage
public boolean navigate Backward boolean success false if get Model is Dynamic dynamic case Uses navigation history if can Navigate Backward navigate History Backward if isURL get Current Location success browser set Url get Current Location else we need to regen HTML We can not use setting current page to trigger regen for one case navigating back from an url will trigger regen since current page would be the same Abstract Intro Page page Abstract Intro Page get Model find Child get Current Location Abstract Intro Element ABSTRACT PAGE success generate Dynamic Content For Page page get Model set Current Page Id get Current Location false else success false update history only in dynamic case update Navigation Actions State else static HTML case use browser real Back success browser back return success  navigateBackward getModel isDynamic canNavigateBackward navigateHistoryBackward getCurrentLocation setUrl getCurrentLocation AbstractIntroPage AbstractIntroPage getModel findChild getCurrentLocation AbstractIntroElement ABSTRACT_PAGE generateDynamicContentForPage getModel setCurrentPageId getCurrentLocation updateNavigationActionsState
public boolean navigate Forward boolean success false if get Model is Dynamic dynamic case Uses navigation history if can Navigate Forward navigate History Forward if isURL get Current Location success browser set Url get Current Location else Abstract Intro Page page Abstract Intro Page get Model find Child get Current Location Abstract Intro Element ABSTRACT PAGE success generate Dynamic Content For Page page get Model set Current Page Id get Current Location false else success false update history only in dynamic case update Navigation Actions State else static HTML case use browser real Forward success browser forward return success  navigateForward getModel isDynamic canNavigateForward navigateHistoryForward getCurrentLocation setUrl getCurrentLocation AbstractIntroPage AbstractIntroPage getModel findChild getCurrentLocation AbstractIntroElement ABSTRACT_PAGE generateDynamicContentForPage getModel setCurrentPageId getCurrentLocation updateNavigationActionsState
public boolean navigate Home Home is URL of root page in static case and root page in dynamic Intro Home Page root Page get Model get Home Page String location null boolean success false if get Model is Dynamic location root Page get Id success get Model set Current Page Id location else location root Page get Url success browser set Url location update History location return success  navigateHome IntroHomePage rootPage getModel getHomePage getModel isDynamic rootPage getId getModel setCurrentPageId rootPage getUrl setUrl updateHistory
protected void handle Registry Changed I Registry Change Event event if get Model is Dynamic null generator first html Generator null Add this presentation as a listener to mode only in dynamic case get Model add Property Listener this get Model fire Property Change Intro Model Root CURRENT PAGE PROPERTY ID  handleRegistryChanged IRegistryChangeEvent getModel isDynamic htmlGenerator getModel addPropertyListener getModel firePropertyChange IntroModelRoot CURRENT_PAGE_PROPERTY_ID
public void standby State Changed boolean standby boolean is Standby Part Needed if we have a standby part regardless if standby state disable actions Same behavior for static html if is Standby Part Needed standby home Action set Enabled false forward Action set Enabled false back Action set Enabled false else home Action set Enabled true update Navigation Actions State if get Model is Dynamic dynamic Standby State Changed standby is Standby Part Needed else static Standby State Changed standby  standbyStateChanged isStandbyPartNeeded isStandbyPartNeeded homeAction setEnabled forwardAction setEnabled backAction setEnabled homeAction setEnabled updateNavigationActionsState getModel isDynamic dynamicStandbyStateChanged isStandbyPartNeeded staticStandbyStateChanged
Static Intro private void handle Static Intro We have a static case Set the url on the browser to be the url defined in the root page But first check memento if we can restore last visited page String url get Cached Current Page if isURL url no cached state or invalid state url get Model get Home Page get Url if url null We have no content to display log an error Log error Url is null no content to display in browser null NON NLS 1 return set the URL the browser should display boolean success browser set Url url if success Log error Unable to set the following ULR in browser url NON NLS 1 null return  handleStaticIntro getCachedCurrentPage getModel getHomePage getUrl setUrl
public void static Standby State Changed boolean standby Intro Home Page home Page get Model get Home Page Intro Home Page standby Page get Model get Standby Page if standby Page null standby Page home Page if standby browser set Url standby Page get Url else browser set Url home Page get Url  staticStandbyStateChanged IntroHomePage homePage getModel getHomePage IntroHomePage standbyPage getModel getStandbyPage standbyPage standbyPage homePage setUrl standbyPage getUrl setUrl homePage getUrl

Takes the implementation as an input public Browser Intro Part Location Listener Browser Intro Part Implementation implementation this implementation implementation  BrowserIntroPartLocationListener BrowserIntroPartImplementation
see org eclipse swt browser Location Listener changed org eclipse swt browser Location Event public void changed Location Event event  LocationListener LocationEvent LocationEvent
Intercept any Location Events on the browser If the event location is a valid IntroURL cancel the event and execute the intro action that is embedded in the URL public void changing Location Event event String url event location if url null return IntroURL Parser parser new IntroURL Parser url if parser has Intro Url stop URL first event doit false execute the action embedded in the IntroURL IntroURL introURL parser get IntroURL introURL execute return if parser has Protocol this will filter out two navigation events fired by the browser on a set Text about blank and res C WINDOWS System32 shdoclc dll navcancl htm return if implementation get Model is Dynamic Update the history even with real UR Ls Note that if we have multiple embedded URL navigations due to frames the frame Navigation flag filters them This flag is set here and is cleared by a progress listener when all the frame navigation is completed We need to update history only in dynamic case In static case the browser keeps the history Browser browser Browser event get Source if browser get Data frame Navigation null NON NLS 1 browser set Data frame Navigation true NON NLS 1 NON NLS 2 implementation update History url return  LocationEvents LocationEvent IntroURLParser IntroURLParser hasIntroUrl getIntroURL hasProtocol setText getModel isDynamic URLs frameNavigation getSource getData frameNavigation setData frameNavigation updateHistory

protected void update Navigation Actions State if get Model is Dynamic forward Action set Enabled can Navigate Forward back Action set Enabled can Navigate Backward return no actions are added in static swt  updateNavigationActionsState getModel isDynamic forwardAction setEnabled canNavigateForward backAction setEnabled canNavigateBackward
public Form Intro Part Implementation Shared style manager shared Style Manager new Shared Style Manager get Model  FormIntroPartImplementation sharedStyleManager SharedStyleManager getModel
public void create Part Control Composite container if get Model is Dynamic dynamic Create Part Control container else static Create Part Control container  createPartControl getModel isDynamic dynamicCreatePartControl staticCreatePartControl
private void dynamic Create Part Control Composite container Create single toolkit instance which is disposed of on dispose of intro part also define background of all presentation toolkit new Form Toolkit container get Display Define presentation title color Color bg shared Style Manager get Color toolkit bg NON NLS 1 if bg null toolkit set Background bg toolkit get Hyperlink Group set Hyperlink Underline Mode Hyperlink Group UNDERLINE HOVER Define presentation title color and image Form main Form toolkit create Form container Color fg shared Style Manager get Color toolkit title fg NON NLS 1 if fg null main Form set Foreground fg Image bg Image shared Style Manager get Image title image null null NON NLS 1 if bg Image null main Form set Background Image bg Image String repeat shared Style Manager get Property title image repeat NON NLS 1 if repeat null repeat equals Ignore Case true NON NLS 1 main Form set Background Image Tiled true main Page Book create Main Page Book toolkit main Form Add this presentation as a listener to model get Model add Property Listener this add Tool Bar Actions  dynamicCreatePartControl FormToolkit getDisplay sharedStyleManager getColor setBackground getHyperlinkGroup setHyperlinkUnderlineMode HyperlinkGroup UNDERLINE_HOVER mainForm createForm sharedStyleManager getColor mainForm setForeground bgImage sharedStyleManager getImage bgImage mainForm setBackgroundImage bgImage sharedStyleManager getProperty equalsIgnoreCase mainForm setBackgroundImageTiled mainPageBook createMainPageBook mainForm getModel addPropertyListener addToolBarActions
The main page book that holds Intro pages It has two pages one that holds the home page and one that holds all other pages If the presentation is configured to not show the home page with the Home Page layout then this page book will only have one page param toolkit param form return private Scrolled Page Book create Main Page Book Form Toolkit toolkit Form form get body and create page book in it Body has Grid Layout Composite body form get Body body set Layout new Grid Layout make sure page book expands h and v Scrolled Page Book page Book toolkit create Page Book body SWT V SCROLL SWT H SCROLL page Book set Layout Data new Grid Data Grid Data FILL BOTH Create root page in root page layout form only if needed if shared Style Manager use Custom Home Pagelayout if we do not have a root page form create one Root Page Form root Page Form new Root Page Form toolkit model form root Page Form create Part Control page Book shared Style Manager Create the two Page forms page Form new Page Form toolkit model form page Form create Part Control page Book shared Style Manager page Form With Nav new Page Form With Navigation toolkit model form page Form With Nav create Part Control page Book shared Style Manager now determine which page to show Show it and add it to history if the cached page is a URL ignore it We do not want to launch a browser on startup String cached Page get Cached Current Page if cached Page null isURL cached Page this will create the page in the page form model set Current Page Id cached Page Abstract Intro Page page To Show get Model get Current Page load style manager here to test for navigation Page Style Manager style Manager new Page Style Manager page To Show shared Style Manager get Properties boolean page Has Navigation style Manager show Home Page Navigation if page To Show null if page Book has Page page To Show get Id we are showing Home Page page Book show Page page To Show get Id else if page Has Navigation page or Home Page with a page layout and navigation set the page id to the static Page Form With Navigation id first create the correct content page Form With Nav show Page page To Show shared Style Manager then show the page page Book show Page Page Form With Navigation PAGE FORM WITH NAVIGATION ID else page or Home Page with a regular page layout set the page id to the static Page Form id first create the correct content page Form show Page page To Show shared Style Manager then show the page page Book show Page Page Form PAGE FORM ID update History page To Show get Id return page Book  ScrolledPageBook createMainPageBook FormToolkit GridLayout getBody setLayout GridLayout ScrolledPageBook pageBook createPageBook V_SCROLL H_SCROLL pageBook setLayoutData GridData GridData FILL_BOTH sharedStyleManager useCustomHomePagelayout RootPageForm rootPageForm RootPageForm rootPageForm createPartControl pageBook sharedStyleManager pageForm PageForm pageForm createPartControl pageBook sharedStyleManager pageFormWithNav PageFormWithNavigation pageFormWithNav createPartControl pageBook sharedStyleManager cachedPage getCachedCurrentPage cachedPage cachedPage setCurrentPageId cachedPage AbstractIntroPage pageToShow getModel getCurrentPage PageStyleManager styleManager PageStyleManager pageToShow sharedStyleManager getProperties pageHasNavigation styleManager showHomePageNavigation pageToShow pageBook hasPage pageToShow getId pageBook showPage pageToShow getId pageHasNavigation PageFormWithNavigation pageFormWithNav showPage pageToShow sharedStyleManager pageBook showPage PageFormWithNavigation PAGE_FORM_WITH_NAVIGATION_ID PageForm pageForm showPage pageToShow sharedStyleManager pageBook showPage PageForm PAGE_FORM_ID updateHistory pageToShow getId pageBook
public void dispose if toolkit null toolkit dispose 
Handle model property changes The UI is notified here of a change to the current page in the model This happens if an intro URL show Page method is executed see org eclipse ui I Property Listener property Changed java lang Object int public void property Changed Object source int prop Id if prop Id Intro Model Root CURRENT PAGE PROPERTY ID String page Id get Model get Current Page Id if page Id null page Id equals NON NLS 1 If page ID was not set properly exit return show Page get Model get Current Page  showPage IPropertyListener propertyChanged propertyChanged propId propId IntroModelRoot CURRENT_PAGE_PROPERTY_ID pageId getModel getCurrentPageId pageId pageId showPage getModel getCurrentPage
protected void add Tool Bar Actions Handle menus I Action Bars action Bars get Intro Part get Intro Site get Action Bars I Tool Bar Manager tool Bar Manager action Bars get Tool Bar Manager action Bars set Global Action Handler Action Factory FORWARD get Id forward Action action Bars set Global Action Handler Action Factory BACK get Id back Action tool Bar Manager add home Action tool Bar Manager add back Action tool Bar Manager add forward Action tool Bar Manager update true action Bars update Action Bars update Navigation Actions State  addToolBarActions IActionBars actionBars getIntroPart getIntroSite getActionBars IToolBarManager toolBarManager actionBars getToolBarManager actionBars setGlobalActionHandler ActionFactory getId forwardAction actionBars setGlobalActionHandler ActionFactory getId backAction toolBarManager homeAction toolBarManager backAction toolBarManager forwardAction toolBarManager actionBars updateActionBars updateNavigationActionsState
public void standby State Changed boolean standby boolean is Standby Part Needed if get Model is Dynamic dynamic Standby State Changed standby is Standby Part Needed else static Standby State Changed standby  standbyStateChanged isStandbyPartNeeded getModel isDynamic dynamicStandbyStateChanged isStandbyPartNeeded staticStandbyStateChanged
public void dynamic Standby State Changed boolean standby boolean is Standby Part Needed handle action enablement first if is Standby Part Needed standby home Action set Enabled false forward Action set Enabled false back Action set Enabled false else home Action set Enabled true update Navigation Actions State if is Standby Part Needed we have a standby part nothing more to do in presentation return try to show a cached page Abstract Intro Page page To Show null if standby we are in standby Show standby page in Page Form page To Show get Model get Standby Page if page To Show null page To Show get Model get Home Page else if we are showing a regular intro page or if the Home Page has a regular page layout set the page id to the static Page Form id page To Show get Model get Current Page show Page page To Show  dynamicStandbyStateChanged isStandbyPartNeeded isStandbyPartNeeded homeAction setEnabled forwardAction setEnabled backAction setEnabled homeAction setEnabled updateNavigationActionsState isStandbyPartNeeded AbstractIntroPage pageToShow PageForm pageToShow getModel getStandbyPage pageToShow pageToShow getModel getHomePage PageForm pageToShow getModel getCurrentPage showPage pageToShow
private boolean show Page Abstract Intro Page page To Show boolean pageis Cached show Existing Page page To Show if pageis Cached page has not been show before load style manager here to test for navigation Page Style Manager style Manager new Page Style Manager page To Show shared Style Manager get Properties boolean page Has Navigation style Manager show Home Page Navigation if page Has Navigation page or Home Page with a regular page layout set the page id to the static Page Form With Navigation id first create the correct content page Form With Nav show Page page To Show shared Style Manager then show the page main Page Book show Page Page Form With Navigation PAGE FORM WITH NAVIGATION ID else page or Home Page with a regular page layout set the page id to the static Page Form With Navigation id first create the correct content page Form show Page page To Show shared Style Manager then show the page main Page Book show Page Page Form PAGE FORM ID return true  showPage AbstractIntroPage pageToShow pageisCached showExistingPage pageToShow pageisCached PageStyleManager styleManager PageStyleManager pageToShow sharedStyleManager getProperties pageHasNavigation styleManager showHomePageNavigation pageHasNavigation PageFormWithNavigation pageFormWithNav showPage pageToShow sharedStyleManager mainPageBook showPage PageFormWithNavigation PAGE_FORM_WITH_NAVIGATION_ID PageFormWithNavigation pageForm showPage pageToShow sharedStyleManager mainPageBook showPage PageForm PAGE_FORM_ID
private boolean show Existing Page Abstract Intro Page page String form Page Id null if page Form has Page page get Id page Form show Page page shared Style Manager form Page Id Page Form PAGE FORM ID else if page Form With Nav has Page page get Id page Form With Nav show Page page shared Style Manager form Page Id Page Form With Navigation PAGE FORM WITH NAVIGATION ID else if main Page Book has Page page get Id form Page Id page get Id else return false main Page Book show Page form Page Id return true  showExistingPage AbstractIntroPage formPageId pageForm hasPage getId pageForm showPage sharedStyleManager formPageId PageForm PAGE_FORM_ID pageFormWithNav hasPage getId pageFormWithNav showPage sharedStyleManager formPageId PageFormWithNavigation PAGE_FORM_WITH_NAVIGATION_ID mainPageBook hasPage getId formPageId getId mainPageBook showPage formPageId
public void set Focus if model is Dynamic if main Page Book get Current Page null main Page Book get Current Page set Focus  setFocus isDynamic mainPageBook getCurrentPage mainPageBook getCurrentPage setFocus
public boolean navigate Backward boolean success false if get Model is Dynamic dynamic case Uses navigation history if can Navigate Backward navigate History Backward if isURL get Current Location success Util open Browser get Current Location else Set current page and this will triger regen Customizable Intro Part current Intro Part Customizable Intro Part Intro Plugin get Intro current Intro Part get Control set Redraw false success get Model set Current Page Id get Current Location current Intro Part get Control set Redraw true update Navigation Actions State return success  navigateBackward getModel isDynamic canNavigateBackward navigateHistoryBackward getCurrentLocation openBrowser getCurrentLocation CustomizableIntroPart currentIntroPart CustomizableIntroPart IntroPlugin getIntro currentIntroPart getControl setRedraw getModel setCurrentPageId getCurrentLocation currentIntroPart getControl setRedraw updateNavigationActionsState
public boolean navigate Forward boolean success false if get Model is Dynamic dynamic case Uses navigation history if can Navigate Forward navigate History Forward if isURL get Current Location success Util open Browser get Current Location else Set current page and this will triger regen Customizable Intro Part current Intro Part Customizable Intro Part Intro Plugin get Intro current Intro Part get Control set Redraw false success get Model set Current Page Id get Current Location current Intro Part get Control set Redraw true update Navigation Actions State return success  navigateForward getModel isDynamic canNavigateForward navigateHistoryForward getCurrentLocation openBrowser getCurrentLocation CustomizableIntroPart currentIntroPart CustomizableIntroPart IntroPlugin getIntro currentIntroPart getControl setRedraw getModel setCurrentPageId getCurrentLocation currentIntroPart getControl setRedraw updateNavigationActionsState
public boolean navigate Home Intro Home Page root Page get Model get Home Page if get Model is Dynamic Customizable Intro Part current Intro Part Customizable Intro Part Intro Plugin get Intro current Intro Part get Control set Redraw false boolean success false success get Model set Current Page Id root Page get Id update History root Page get Id current Intro Part get Control set Redraw true return success else static model Nothing to do return false  navigateHome IntroHomePage rootPage getModel getHomePage getModel isDynamic CustomizableIntroPart currentIntroPart CustomizableIntroPart IntroPlugin getIntro currentIntroPart getControl setRedraw getModel setCurrentPageId rootPage getId updateHistory rootPage getId currentIntroPart getControl setRedraw
protected void handle Registry Changed I Registry Change Event event if get Model is Dynamic Intro Plugin close Intro Intro Plugin show Intro false  handleRegistryChanged IRegistryChangeEvent getModel isDynamic IntroPlugin closeIntro IntroPlugin showIntro
private void static Create Part Control Composite parent toolkit new Form Toolkit parent get Display toolkit get Hyperlink Group set Hyperlink Underline Mode Hyperlink Group UNDERLINE HOVER create a page that has only one link The URL and tooltip will be set by the standby listener welcome Link create Static Page parent  staticCreatePartControl FormToolkit getDisplay getHyperlinkGroup setHyperlinkUnderlineMode HyperlinkGroup UNDERLINE_HOVER welcomeLink createStaticPage
public void link Activated Hyperlink Event e Hyperlink link Hyperlink e get Source Util open Browser String link get Href return  linkActivated HyperlinkEvent getSource openBrowser getHref
private Hyperlink create Static Page Composite parent Form main Form toolkit create Form parent Composite body main Form get Body Grid Layout gl new Grid Layout body set Layout gl String label Intro Plugin get String StaticHTML welcome NON NLS 1 Hyperlink link toolkit create Hyperlink body label SWT WRAP link set Font Page Style Manager get Header Font Grid Data gd new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL gd horizontal Alignment Grid Data CENTER gd vertical Alignment Grid Data CENTER link set Layout Data gd link add Hyperlink Listener new Hyperlink Adapter public void link Activated Hyperlink Event e Hyperlink link Hyperlink e get Source Util open Browser String link get Href return return link  createStaticPage mainForm createForm mainForm getBody GridLayout GridLayout setLayout IntroPlugin getString createHyperlink setFont PageStyleManager getHeaderFont GridData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL horizontalAlignment GridData verticalAlignment GridData setLayoutData addHyperlinkListener HyperlinkAdapter linkActivated HyperlinkEvent getSource openBrowser getHref
public void static Standby State Changed boolean standby Intro Home Page home Page get Model get Home Page Intro Home Page standby Page get Model get Standby Page if standby Page null standby Page home Page if standby welcome Link set Href standby Page get Url welcome Link set Tool Tip Text standby Page get Url else welcome Link set Href home Page get Url welcome Link set Tool Tip Text home Page get Url  staticStandbyStateChanged IntroHomePage homePage getModel getHomePage IntroHomePage standbyPage getModel getStandbyPage standbyPage standbyPage homePage welcomeLink setHref standbyPage getUrl welcomeLink setToolTipText standbyPage getUrl welcomeLink setHref homePage getUrl welcomeLink setToolTipText homePage getUrl

public void create Part Control Composite container Text text new Text container SWT MULTI SWT H SCROLL SWT V SCROLL Intro Model Root model Intro Plugin get Default get Intro Model Root Intro Model Serializer serializer new Intro Model Serializer model text set Text serializer to String add Tool Bar Actions  createPartControl H_SCROLL V_SCROLL IntroModelRoot IntroPlugin getDefault getIntroModelRoot IntroModelSerializer IntroModelSerializer setText toString addToolBarActions
protected void update Navigation Actions State  updateNavigationActionsState
public void set Focus  setFocus
see org eclipse ui internal intro impl model Abstract Intro Part Implementation navigate Backward public boolean navigate Backward return false  AbstractIntroPartImplementation navigateBackward navigateBackward
see org eclipse ui internal intro impl model Abstract Intro Part Implementation navigate Forward public boolean navigate Forward return false  AbstractIntroPartImplementation navigateForward navigateForward
see org eclipse ui internal intro impl model Abstract Intro Part Implementation handle Registry Changed org eclipse core runtime I Registry Change Event protected void handle Registry Changed I Registry Change Event event  AbstractIntroPartImplementation handleRegistryChanged IRegistryChangeEvent handleRegistryChanged IRegistryChangeEvent
see org eclipse ui internal intro impl model Abstract Intro Part Implementation navigate Home public boolean navigate Home return false  AbstractIntroPartImplementation navigateHome navigateHome

public Page Content Form Form Toolkit toolkit Intro Model Root model Root this toolkit toolkit this model model Root page model get Current Page  PageContentForm FormToolkit IntroModelRoot modelRoot modelRoot getCurrentPage
public Page Content Form Form Toolkit toolkit Intro Model Root model Root Abstract Intro Page page this toolkit model Root this page page  PageContentForm FormToolkit IntroModelRoot modelRoot AbstractIntroPage modelRoot
Create the form for the root page Number of columns there is equal to the number of links Every image link does not cache a model object for data retrieval param page Book public void create Part Control Scrolled Page Book content Page Book Page Style Manager page Style Manager style Manager page Style Manager categories Composite has Table Layout with one col Holds page description and composite with all other children Composite content Composite content Page Book create Page page get Id Util highlight content Composite SWT COLOR GREEN Table Wrap Layout layout new Table Wrap Layout layout top Margin 15 layout left Margin 15 layout right Margin 15 layout bottom Margin 15 layout vertical Spacing 15 content Composite set Layout layout if style Manager get Page Description null Label label toolkit create Label content Composite style Manager get Page Description SWT WRAP label set Font Page Style Manager get Banner Font Table Wrap Data td new Table Wrap Data td align Table Wrap Data FILL label set Layout Data td Store the sub title data for this composite from this page s subtitle Make sure you do this before creating the page content to filter out page sub title from content area content Composite set Data PAGE SUBTITLE style Manager get Page Sub Title create Page Children page content Composite style Manager null  pageBook createPartControl ScrolledPageBook contentPageBook PageStyleManager pageStyleManager styleManager pageStyleManager categoriesComposite contentComposite contentPageBook createPage getId contentComposite COLOR_GREEN TableWrapLayout TableWrapLayout topMargin leftMargin rightMargin bottomMargin verticalSpacing contentComposite setLayout styleManager getPageDescription createLabel contentComposite styleManager getPageDescription setFont PageStyleManager getBannerFont TableWrapData TableWrapData TableWrapData setLayoutData contentComposite setData PAGE_SUBTITLE styleManager getPageSubTitle createPageChildren contentComposite styleManager
private void create Page Children Abstract Intro Page page Composite parent setup page composite layout Page Widget Factory factory new Page Widget Factory toolkit style Manager Composite page Composite create Page Table Composite factory parent now add all children Abstract Intro Element children page get Children for int i 0 i children length i factory create Intro Element page Composite children i  createPageChildren AbstractIntroPage PageWidgetFactory PageWidgetFactory styleManager pageComposite createPageTableComposite AbstractIntroElement getChildren createIntroElement pageComposite
Creates a composite with Table Wrap Layout to hold all page children The default number of columns is 1 param parent return private Composite create Page Table Composite Page Widget Factory factory Composite parent Composite client toolkit create Composite parent Table Wrap Layout layout new Table Wrap Layout layout top Margin 0 layout bottom Margin 0 layout left Margin 0 layout right Margin 0 int num Columns style Manager get Page Number Of Columns layout num Columns num Columns 0 1 num Columns layout horizontal Spacing style Manager get Page Horizantal Spacing layout vertical Spacing style Manager get Page Vertical Spacing client set Layout layout parent has Table Wrap Layout and so update layout of this child Table Wrap Data td new Table Wrap Data Table Wrap Data FILL Table Wrap Data FILL td align Table Wrap Data FILL td grab Horizontal true client set Layout Data td return client  TableWrapLayout createPageTableComposite PageWidgetFactory createComposite TableWrapLayout TableWrapLayout topMargin bottomMargin leftMargin rightMargin numColumns styleManager getPageNumberOfColumns numColumns numColumns numColumns horizontalSpacing styleManager getPageHorizantalSpacing verticalSpacing styleManager getPageVerticalSpacing setLayout TableWrapLayout TableWrapData TableWrapData TableWrapData TableWrapData TableWrapData grabHorizontal setLayoutData

public void link Activated Hyperlink Event e String url String e get Href IntroURL Parser parser new IntroURL Parser url if parser has Intro Url execute the action embedded in the IntroURL parser get IntroURL execute return else if parser has Protocol Util open Browser url return Dialog Util display Info Message Control e get Source get Shell Intro Plugin get String Hyperlink Adapter url Is NON NLS 1 url NON NLS 1  linkActivated HyperlinkEvent getHref IntroURLParser IntroURLParser hasIntroUrl getIntroURL hasProtocol openBrowser DialogUtil displayInfoMessage getSource getShell IntroPlugin getString HyperlinkAdapter urlIs
public void link Entered Hyperlink Event e  linkEntered HyperlinkEvent
public void link Exited Hyperlink Event e  linkExited HyperlinkEvent
public Page Form Form Toolkit toolkit Intro Model Root model Root Form parent Form this toolkit toolkit this model model Root this parent Form parent Form  PageForm FormToolkit IntroModelRoot modelRoot parentForm modelRoot parentForm parentForm
Create a Form for holding pages without navigation param page Book public void create Part Control Scrolled Page Book main Page Book Shared Style Manager shared Style Manager Cash the shared style manager We need to pass it around to category forms So do not null it this shared Style Manager shared Style Manager creating page in Main page book page Form toolkit create Form main Page Book get Container main Page Book register Page get Id page Form Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 page Form get Body set Layout layout Util highlight page Form get Body SWT COLOR RED Get form body Form body is one column grid layout Add page book and navigation UI to it category Page Book toolkit create Page Book page Form get Body SWT H SCROLL SWT V SCROLL category Page Book set Layout Data new Grid Data Grid Data FILL BOTH page Form set Text root Page Style Manager get Page Sub Title  pageBook createPartControl ScrolledPageBook mainPageBook SharedStyleManager sharedStyleManager sharedStyleManager sharedStyleManager pageForm createForm mainPageBook getContainer mainPageBook registerPage getId pageForm GridLayout GridLayout marginWidth marginHeight pageForm getBody setLayout pageForm getBody COLOR_RED categoryPageBook createPageBook pageForm getBody H_SCROLL V_SCROLL categoryPageBook setLayoutData GridData GridData FILL_BOTH pageForm setText rootPageStyleManager getPageSubTitle
protected String get Id return PAGE FORM ID  getId PAGE_FORM_ID
This method is called when the current page changes It creates the Page Content Form if necessary and handles showing the page in the Page Book It creates a model Page Content Form for the current page param pageID public void show Page Abstract Intro Page page Shared Style Manager shared Style Manager if category Page Book has Page page get Id if we do not have a category form for this page create one Page Content Form category Form new Page Content Form toolkit model page load style manager only once here Page Style Manager style Manager new Page Style Manager page shared Style Manager get Properties category Form create Part Control category Page Book style Manager category Page Book show Page page get Id Get cached page subtitle from control data Composite page Composite Composite category Page Book get Current Page update main Form title parent Form set Text model get Current Page get Title update this page form s title ie Page subtitle if it exists page Form set Text String page Composite get Data PAGE SUBTITLE TODO need to transfer focus to the first link in the page somehow we may need I Intro Page interface with a few methods like set Focus etc DG  PageContentForm PageContentForm showPage AbstractIntroPage SharedStyleManager sharedStyleManager categoryPageBook hasPage getId PageContentForm categoryForm PageContentForm PageStyleManager styleManager PageStyleManager sharedStyleManager getProperties categoryForm createPartControl categoryPageBook styleManager categoryPageBook showPage getId pageComposite categoryPageBook getCurrentPage parentForm setText getCurrentPage getTitle pageForm setText pageComposite getData PAGE_SUBTITLE IIntroPage setFocus
public boolean has Page String page Id return category Page Book has Page page Id  hasPage pageId categoryPageBook hasPage pageId

public Page Form With Navigation Form Toolkit toolkit Intro Model Root model Root Form parent Form super toolkit model Root parent Form  PageFormWithNavigation FormToolkit IntroModelRoot modelRoot parentForm modelRoot parentForm
Extend parent behavior and add navigation param page Book public void create Part Control Scrolled Page Book main Page Book Shared Style Manager shared Style Manager super create Part Control main Page Book shared Style Manager Create a style manager from shared style manager We only need it for the UI navigation composite root Page Style Manager new Page Style Manager model get Home Page shared Style Manager get Properties Now create Navigation bar Composite navigation Composite toolkit create Composite page Form get Body navigation Composite set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN CENTER int number Of Links model get Home Page get Links length Grid Layout layout new Grid Layout layout num Columns number Of Links navigation Composite set Layout layout create Small Navigator navigation Composite model get Home Page get Links page Form set Text root Page Style Manager get Page Sub Title  pageBook createPartControl ScrolledPageBook mainPageBook SharedStyleManager sharedStyleManager createPartControl mainPageBook sharedStyleManager rootPageStyleManager PageStyleManager getHomePage sharedStyleManager getProperties navigationComposite createComposite pageForm getBody navigationComposite setLayoutData GridData GridData HORIZONTAL_ALIGN_CENTER numberOfLinks getHomePage getLinks GridLayout GridLayout numColumns numberOfLinks navigationComposite setLayout createSmallNavigator navigationComposite getHomePage getLinks pageForm setText rootPageStyleManager getPageSubTitle
Override parent id protected String get Id return PAGE FORM WITH NAVIGATION ID  getId PAGE_FORM_WITH_NAVIGATION_ID
private void create Small Navigator Composite parent Intro Link links for int i 0 i links length i Control c create Image Hyperlink parent links i c set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN CENTER for int i 0 i links length i Label text toolkit create Label parent links i get Label text set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN CENTER text set Foreground toolkit get Colors get Color Form Colors TITLE  createSmallNavigator IntroLink createImageHyperlink setLayoutData GridData GridData HORIZONTAL_ALIGN_CENTER createLabel getLabel setLayoutData GridData GridData HORIZONTAL_ALIGN_CENTER setForeground getColors getColor FormColors
Creates an Image Hyperlink from an Intro Link Model object is NOT cached param body param link private Control create Image Hyperlink Composite body Intro Link link Image Hyperlink image Link toolkit create Image Hyperlink body SWT NULL set link image Image image root Page Style Manager get Image link small link icon NON NLS 1 Image Util DEFAULT SMALL ROOT LINK image Link set Image image set link hover image image root Page Style Manager get Image link small hover icon null NON NLS 1 image Link set Hover Image image image Link set Tool Tip Text link get Label each link is centered in cell Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN CENTER image Link set Layout Data gd image Link set Href link get Url image Link add Hyperlink Listener hyperlink Adapter return image Link  IntroLink createImageHyperlink IntroLink ImageHyperlink imageLink createImageHyperlink rootPageStyleManager getImage ImageUtil DEFAULT_SMALL_ROOT_LINK imageLink setImage rootPageStyleManager getImage imageLink setHoverImage imageLink setToolTipText getLabel GridData GridData GridData HORIZONTAL_ALIGN_CENTER imageLink setLayoutData imageLink setHref getUrl imageLink addHyperlinkListener hyperlinkAdapter imageLink

Constructor used when page styles need to be loaded The plugin s bundle is retrieved from the page model class The default properties are assumed to be the presentation shared properties The inherrited properties are properties that we got from included and extension styles param model Root public Page Style Manager Abstract Intro Page page Properties shared Properties this page page bundle page get Bundle properties new Properties shared Properties String alt Style page get Alt Style if alt Style null load properties alt Style Alt Styles Hashtable has alt styles as keys the bundles as values Hashtable alt Styles page get Alt Styles if alt Styles null Enumeration styles alt Styles keys while styles has More Elements String style String styles next Element Properties inherited Properties new Properties Bundle bundle Bundle alt Styles get style load inherited Properties style alt Style Properties put inherited Properties bundle cache root root Intro Model Root page get Parent Page get Parent  modelRoot PageStyleManager AbstractIntroPage sharedProperties getBundle sharedProperties altStyle getAltStyle altStyle altStyle AltStyles altStyles getAltStyles altStyles altStyles hasMoreElements nextElement inheritedProperties altStyles inheritedProperties altStyleProperties inheritedProperties IntroModelRoot getParentPage getParent
Override parent method to include alt styles Use implicit keys as well public String get Property String key return get Property key true  getProperty getProperty
try to resolve a key without its page Id private String get Property String key boolean use Implicit Key Properties a Properties find Property Owner key String value super do Get Property a Properties key if use Implicit Key if value null page get Id null key starts With page get Id did not find the key as is Trim page Id and try again String relative Key key substring page get Id length return get Property relative Key return value  pageId getProperty useImplicitKey aProperties findPropertyOwner doGetProperty aProperties useImplicitKey getId startsWith getId pageId relativeKey getId getProperty relativeKey
Finds a Properties that represents an inherited shared style or this current pages style If the given key is not found the page Id is trimmed from the begining of the key and the key is looked up again If key does not start with a page Id lookup only the key as is param key return private Properties find Property Owner String key search for the key in this page s properties first if properties contains Key key return properties search inherited properties second Enumeration inherited Page Properties alt Style Properties keys while inherited Page Properties has More Elements Properties a Properties Properties inherited Page Properties next Element if a Properties contains Key key return a Properties we did not find the key Return the local properties anyway return properties  pageId pageId findPropertyOwner containsKey inheritedPageProperties altStyleProperties inheritedPageProperties hasMoreElements aProperties inheritedPageProperties nextElement aProperties containsKey aProperties
Finds the bundle from which as shared style was loaded param key return private Bundle get Alt Style Bundle String key Properties a Properties find Property Owner key return Bundle alt Style Properties get a Properties  getAltStyleBundle aProperties findPropertyOwner altStyleProperties aProperties
Finds the bundle from which this key was loaded If the key is not from an inherited alt style then use the bundle corresponding to this page param key return protected Bundle get Associated Bundle String key Properties a Properties find Property Owner key Bundle bundle Bundle alt Style Properties get a Properties if bundle null return bundle else return super get Associated Bundle key  getAssociatedBundle aProperties findPropertyOwner altStyleProperties aProperties getAssociatedBundle
default is 1 public int get Page Number Of Columns return get Int Property page layout ncolumns 0 NON NLS 1  getPageNumberOfColumns getIntProperty
public int get Number Of Columns Intro Group group return get Int Property group layout ncolumns 0 NON NLS 1  getNumberOfColumns IntroGroup getIntProperty
public int get Page Vertical Spacing return get Int Property page layout vspacing 5 NON NLS 1  getPageVerticalSpacing getIntProperty
public int get Vertical Spacing Intro Group group return get Int Property group layout vspacing 5 NON NLS 1  getVerticalSpacing IntroGroup getIntProperty
public int get Page Horizantal Spacing return get Int Property page layout hspacing 5 NON NLS 1  getPageHorizantalSpacing getIntProperty
public int get Horizantal Spacing Intro Group group return get Int Property group layout hspacing 5 NON NLS 1  getHorizantalSpacing IntroGroup getIntProperty
public int get Col Span Abstract Base Intro Element element return get Int Property element layout colspan 1 NON NLS 1  getColSpan AbstractBaseIntroElement getIntProperty
public int get Row Span Abstract Base Intro Element element return get Int Property element layout rowspan 1 NON NLS 1  getRowSpan AbstractBaseIntroElement getIntProperty
private int get Int Property Abstract Base Intro Element element String qualifier int default Value String Buffer buff create Path To Element Key element if buff null return default Value String key buff append qualifier to String return get Int Property key default Value  getIntProperty AbstractBaseIntroElement defaultValue StringBuffer createPathToElementKey defaultValue toString getIntProperty defaultValue
private int get Int Property String key int defaul Value int int Value defaul Value String value get Property key try int Value Integer parse Int value catch Number Format Exception e return int Value  getIntProperty defaulValue intValue defaulValue getProperty intValue parseInt NumberFormatException intValue
Finds the description text of the given group Looks for the Text child element whos id is specified as follows p page Id path to group description id id of child description Text element p If not found use the default description style Returns null if no default style found or any id in path is null param group return public String get Description Intro Group group String Buffer buff create Path To Element Key group if buff null return null String key buff append description id to String NON NLS 1 return do Get Description group key  pageId path_to_group getDescription IntroGroup StringBuffer createPathToElementKey toString doGetDescription
Finds the description text of the associated page Looks for the Text child element whos id is specified as follows p page Id description id id of child description Text element p If not found use the default description style Returns null if no default style found or any id in path is null param group return public String get Page Description if page get Id null return null String key page get Id description id NON NLS 1 return do Get Description page key  pageId getPageDescription getId getId doGetDescription
private String do Get Description Abstract Intro Container parent String key String path get Property key String description null if path null description find Text From Path parent path if description null return description return find Text From Style Id parent get Description Style Id  doGetDescription AbstractIntroContainer getProperty findTextFromPath findTextFromStyleId getDescriptionStyleId
private String get Description Style Id String key description style id NON NLS 1 return get Property key  getDescriptionStyleId getProperty
Finds the subtitle of the associated page Looks for the Text child element whose id is specified as follows p page Id description id id of child description Text element p If not found use the default description style param group return public String get Page Sub Title String key page get Id subtitle id NON NLS 1 String path get Property key String description null if path null description find Text From Path page path if description null return description return find Text From Style Id page get Page Sub Title Style Id  pageId getPageSubTitle getId getProperty findTextFromPath findTextFromStyleId getPageSubTitleStyleId
private String get Page Sub Title Style Id String key subtitle style id NON NLS 1 return get Property key  getPageSubTitleStyleId getProperty
private String find Text From Path Abstract Intro Container parent String path Abstract Intro Element child parent find Target root path if child null child is Of Type Abstract Intro Element TEXT make Filtered child return Intro Text child get Text return null  findTextFromPath AbstractIntroContainer AbstractIntroElement findTarget isOfType AbstractIntroElement makeFiltered IntroText getText
Returns the first direct child text element with the given style id return private String find Text From Style Id Abstract Intro Container parent String style Id Intro Text all Text Intro Text parent get Children Of Type Abstract Intro Element TEXT for int i 0 i all Text length i if all Text i get Style Id null not all elements have style id continue if all Text i get Style Id equals style Id make Filtered all Text i return all Text i get Text return null  findTextFromStyleId AbstractIntroContainer styleId IntroText allText IntroText getChildrenOfType AbstractIntroElement allText allText getStyleId allText getStyleId styleId makeFiltered allText allText getText
Util method to check model type and filter model element out if it is of the correct type param element private Abstract Intro Element make Filtered Abstract Intro Element element if element is Of Type Abstract Intro Element BASE ELEMENT Abstract Base Intro Element element set Filter State true return element  AbstractIntroElement makeFiltered AbstractIntroElement isOfType AbstractIntroElement BASE_ELEMENT AbstractBaseIntroElement setFilterState
public boolean get Show Link Description String key page get Id show link description NON NLS 1 String value get Property key if value null key show link description value get Property key if value null value true NON NLS 1 return value to Lower Case equals true NON NLS 1  getShowLinkDescription getId getProperty getProperty toLowerCase
public boolean show Home Page Navigation String key page get Id show home page navigation NON NLS 1 String value get Property key if value null key show home page navigation value get Property key if value null value true NON NLS 1 return value equals Ignore Case true NON NLS 1  showHomePageNavigation getId getProperty getProperty equalsIgnoreCase
public Color get Color Form Toolkit toolkit Abstract Base Intro Element element String Buffer buff create Path To Element Key element if buff null return null String key buff append font fg to String NON NLS 1 return get Color toolkit key  getColor FormToolkit AbstractBaseIntroElement StringBuffer createPathToElementKey toString getColor
public boolean is Bold Intro Text text String value null String Buffer buff create Path To Element Key text if buff null String key buff append font bold to String NON NLS 1 value get Property key if value null return value to Lower Case equals true NON NLS 1 if value null bold is not specified by ID Check to see if there is a style id specified for bold value get Property bold style id NON NLS 1 if value null text get Style Id null return text get Style Id equals value return false  isBold IntroText StringBuffer createPathToElementKey toString getProperty toLowerCase getProperty getStyleId getStyleId
public static Font get Banner Font return J Face Resources get Banner Font  getBannerFont JFaceResources getBannerFont
public static Font get Header Font return J Face Resources get Header Font  getHeaderFont JFaceResources getHeaderFont
Retrieves an image for a link in a page If not found uses the page s default link image If still not found uses the passed default param link param qualifier return public Image get Image Intro Link link String qualifier String default Key String key create Image Key page link qualifier special case where we have to handle this because extended code does not go through get Property in this method String value get Property key false if value null page get Id null key starts With page get Id did not use the key as is Trim page Id and try again key key substring page get Id length page Key can not become an implicit key String page Key create Image Key page null qualifier return get Image key page Key default Key  getImage IntroLink defaultKey createImageKey getProperty getProperty getId startsWith getId pageId getId pageKey pageKey createImageKey getImage pageKey defaultKey
private String create Image Key Abstract Intro Page page Intro Link link String qualifier String Buffer buff null if link null buff create Path To Element Key link if buff null return NON NLS 1 else buff new String Buffer buff append page get Id buff append NON NLS 1 buff append qualifier return buff to String  createImageKey AbstractIntroPage IntroLink StringBuffer createPathToElementKey StringBuffer getId toString
public Image get Image Intro Image intro Image String image Location intro Image get Src As Is String key create Path To Element Key intro Image to String if Image Util has Image key return Image Util get Image key key not already registered Image Util register Image key bundle image Location Image image Image Util get Image key return image  getImage IntroImage introImage imageLocation introImage getSrcAsIs createPathToElementKey introImage toString ImageUtil hasImage ImageUtil getImage ImageUtil registerImage imageLocation ImageUtil getImage
Creates a key for the given element Returns null if any id is null along the path param element return private String Buffer create Path To Element Key Abstract Intro Id Element element if element get Id null return null String Buffer buffer new String Buffer element get Id Abstract Base Intro Element parent Abstract Base Intro Element element get Parent while parent null parent is Of Type Abstract Intro Element MODEL ROOT if parent get Id null return null buffer insert 0 parent get Id NON NLS 1 parent Abstract Base Intro Element parent get Parent return buffer  StringBuffer createPathToElementKey AbstractIntroIdElement getId StringBuffer StringBuffer getId AbstractBaseIntroElement AbstractBaseIntroElement getParent isOfType AbstractIntroElement MODEL_ROOT getId getId AbstractBaseIntroElement getParent

public void link Activated Hyperlink Event e String url String e get Href IntroURL Parser parser new IntroURL Parser url if parser has Intro Url execute the action embedded in the IntroURL parser get IntroURL execute return else if parser has Protocol Util open Browser url return Dialog Util display Info Message Control e get Source get Shell Intro Plugin get String Hyperlink Adapter url Is NON NLS 1 url NON NLS 1  linkActivated HyperlinkEvent getHref IntroURLParser IntroURLParser hasIntroUrl getIntroURL hasProtocol openBrowser DialogUtil displayInfoMessage getSource getShell IntroPlugin getString HyperlinkAdapter urlIs
public void link Entered Hyperlink Event e  linkEntered HyperlinkEvent
public void link Exited Hyperlink Event e  linkExited HyperlinkEvent
protected Page Widget Factory Form Toolkit toolkit Page Style Manager style Manager this toolkit toolkit this style Manager style Manager  PageWidgetFactory FormToolkit PageStyleManager styleManager styleManager styleManager
public void create Intro Element Composite parent Abstract Intro Element element check if this element is filtered and if yes do not create it boolean is Filtered get Filter State element if is Filtered return Control c null switch element get Type case Abstract Intro Element GROUP Intro Group group Intro Group element c create Group parent group update Layout Data c element c must be a composite Composite new Parent Composite c if c instanceof Section client is a composite also new Parent Composite Section new Parent get Client Abstract Intro Element children group get Children for int i 0 i children length i create Intro Element new Parent children i break case Abstract Intro Element LINK Intro Link link Intro Link element c create Image Hyperlink parent link update Layout Data c element break case Abstract Intro Element TEXT Intro Text text Intro Text element c create Text parent text update Layout Data c element break case Abstract Intro Element IMAGE Intro Image image Intro Image element c create Image parent image update Layout Data c element break case Abstract Intro Element HTML IntroHTML html IntroHTML element if html is Inlined Intro Text html Text html get Intro Text if html Text null c create Text parent html Text else Intro Image html Image html get Intro Image if html Image null c create Image parent html Image else embedded HTML so we can show it from a link String embdded Link html get Src if embdded Link null break String link Text String Util concat p a href http org eclipse ui intro open Browser url NON NLS 1 embdded Link NON NLS 1 Intro Plugin get String HTML embedded Link NON NLS 1 a p to String NON NLS 1 link Text generate Form Text link Text c create Form Text parent link Text null if c null update Layout Data c element break default break  createIntroElement AbstractIntroElement isFiltered getFilterState isFiltered getType AbstractIntroElement IntroGroup IntroGroup createGroup updateLayoutData newParent newParent newParent getClient AbstractIntroElement getChildren createIntroElement newParent AbstractIntroElement IntroLink IntroLink createImageHyperlink updateLayoutData AbstractIntroElement IntroText IntroText createText updateLayoutData AbstractIntroElement IntroImage IntroImage createImage updateLayoutData AbstractIntroElement isInlined IntroText htmlText getIntroText htmlText createText htmlText IntroImage htmlImage getIntroImage htmlImage createImage htmlImage embddedLink getSrc embddedLink linkText StringUtil openBrowser embddedLink IntroPlugin getString embeddedLink toString linkText generateFormText linkText createFormText linkText updateLayoutData
private void update Layout Data Control c Abstract Intro Element element Table Wrap Data current Td Table Wrap Data c get Layout Data if current Td null current Td new Table Wrap Data Table Wrap Data FILL Table Wrap Data FILL current Td grab Horizontal true c set Layout Data current Td current Td colspan style Manager get Col Span Abstract Base Intro Element element current Td rowspan style Manager get Row Span Abstract Base Intro Element element  updateLayoutData AbstractIntroElement TableWrapData currentTd TableWrapData getLayoutData currentTd currentTd TableWrapData TableWrapData TableWrapData currentTd grabHorizontal setLayoutData currentTd currentTd styleManager getColSpan AbstractBaseIntroElement currentTd styleManager getRowSpan AbstractBaseIntroElement
private Composite create Group Composite parent Intro Group group String label group get Label String description style Manager get Description group Composite client null Composite control null if description null label null int style description null Section DESCRIPTION SWT NULL Section section toolkit create Section parent style if label null section set Text label if description null section set Description description color Control section group client toolkit create Composite section SWT WRAP section set Client client control section else client toolkit create Composite parent SWT WRAP control client Table Wrap Layout layout new Table Wrap Layout int num Columns style Manager get Number Of Columns group num Columns num Columns 1 1 num Columns layout num Columns num Columns layout vertical Spacing style Manager get Vertical Spacing group layout horizontal Spacing style Manager get Horizantal Spacing group client set Layout layout Util highlight client SWT COLOR YELLOW return control  createGroup IntroGroup getLabel styleManager getDescription createSection setText setDescription colorControl createComposite setClient createComposite TableWrapLayout TableWrapLayout numColumns styleManager getNumberOfColumns numColumns numColumns numColumns numColumns numColumns verticalSpacing styleManager getVerticalSpacing horizontalSpacing styleManager getHorizantalSpacing setLayout COLOR_YELLOW
Creates an Image Hyperlink from an Intro Link Model object is NOT cached param body param link private Control create Image Hyperlink Composite parent Intro Link link Control control Hyperlink link Control boolean show Link Description style Manager get Show Link Description Image link Image style Manager get Image link link icon NON NLS 1 Image Util DEFAULT LINK if show Link Description link get Text null Composite container toolkit create Composite parent Table Wrap Layout layout new Table Wrap Layout layout left Margin layout right Margin 0 layout top Margin layout bottom Margin 0 layout vertical Spacing 0 layout num Columns 2 container set Layout layout Label ilabel toolkit create Label container null ilabel set Image link Image Table Wrap Data td new Table Wrap Data td valign Table Wrap Data TOP td rowspan 2 ilabel set Layout Data td link Control toolkit create Hyperlink container null SWT WRAP td new Table Wrap Data Table Wrap Data LEFT Table Wrap Data BOTTOM td grab Vertical true link Control set Layout Data td Util highlight link Control SWT COLOR RED Util highlight container SWT COLOR DARK YELLOW Control desc create Text container link get Intro Text td new Table Wrap Data Table Wrap Data FILL Table Wrap Data TOP td grab Horizontal true td grab Vertical true desc set Layout Data td control container else Image Hyperlink image Link toolkit create Image Hyperlink parent SWT WRAP SWT CENTER image Link set Image link Image image Link set Hover Image style Manager get Image link hover icon null Table Wrap Data td new Table Wrap Data td grab Horizontal true image Link set Layout Data td link Control image Link control link Control link Control set Text link get Label link Control set Font Page Style Manager get Banner Font color Control link Control link link Control set Href link get Url link Control add Hyperlink Listener hyperlink Adapter Util highlight link Control SWT COLOR DARK YELLOW return control  IntroLink createImageHyperlink IntroLink linkControl showLinkDescription styleManager getShowLinkDescription linkImage styleManager getImage ImageUtil DEFAULT_LINK showLinkDescription getText createComposite TableWrapLayout TableWrapLayout leftMargin rightMargin topMargin bottomMargin verticalSpacing numColumns setLayout createLabel setImage linkImage TableWrapData TableWrapData TableWrapData setLayoutData linkControl createHyperlink TableWrapData TableWrapData TableWrapData grabVertical linkControl setLayoutData linkControl COLOR_RED COLOR_DARK_YELLOW createText getIntroText TableWrapData TableWrapData TableWrapData grabHorizontal grabVertical setLayoutData ImageHyperlink imageLink createImageHyperlink imageLink setImage linkImage imageLink setHoverImage styleManager getImage TableWrapData TableWrapData grabHorizontal imageLink setLayoutData linkControl imageLink linkControl linkControl setText getLabel linkControl setFont PageStyleManager getBannerFont colorControl linkControl linkControl setHref getUrl linkControl addHyperlinkListener hyperlinkAdapter linkControl COLOR_DARK_YELLOW
Creates a forms Text or Formatted Text param body param link protected Control create Text Composite parent Intro Text text Color fg style Manager get Color toolkit text boolean is Bold style Manager is Bold text formatted case If text is alredy formatted the bold property is ignored if text is Formatted return create Form Text parent generate Form Text text get Text fg non formatted case if is Bold return create Form Text parent generate Bold Form Text text get Text fg else return create Text parent text get Text fg  FormattedText createText IntroText styleManager getColor isBold styleManager isBold isFormatted createFormText generateFormText getText isBold createFormText generateBoldFormText getText createText getText
private Control create Form Text Composite parent String text Color fg Form Text form Text toolkit create Form Text parent true form Text add Hyperlink Listener hyperlink Adapter try form Text set Text text true true catch SWT Error e Log error e get Message e return create Text parent text fg if fg null form Text set Foreground fg return form Text  createFormText FormText formText createFormText formText addHyperlinkListener hyperlinkAdapter formText setText SWTError getMessage createText formText setForeground formText
private Control create Text Composite parent String text Color fg Label label toolkit create Label parent text SWT WRAP if fg null label set Foreground fg return label  createText createLabel setForeground
protected Control create Image Composite parent Intro Image image Label ilabel null Image image File style Manager get Image image if image File null ilabel toolkit create Label parent null SWT LEFT ilabel set Image image File if image get Alt null ilabel set Tool Tip Text image get Alt for images do not use default layout Grab horizontal is not what we want Table Wrap Data td new Table Wrap Data ilabel set Layout Data td return ilabel  createImage IntroImage imageFile styleManager getImage imageFile createLabel setImage imageFile getAlt setToolTipText getAlt TableWrapData TableWrapData setLayoutData
private void color Control Control element Control Abstract Base Intro Element element Color fg style Manager get Color toolkit element if fg null element Control set Foreground fg  colorControl elementControl AbstractBaseIntroElement styleManager getColor elementControl setForeground
private String generate Form Text String text String Buffer sbuf new String Buffer sbuf append form NON NLS 1 if text starts With p NON NLS 1 sbuf append text else sbuf append p NON NLS 1 sbuf append text sbuf append p NON NLS 1 sbuf append form NON NLS 1 return sbuf to String  generateFormText StringBuffer StringBuffer startsWith toString
Will be only called for non formatted text param text return private String generate Bold Form Text String text String Buffer sbuf new String Buffer sbuf append form NON NLS 1 sbuf append p NON NLS 1 sbuf append b NON NLS 1 sbuf append text sbuf append b NON NLS 1 sbuf append p NON NLS 1 sbuf append form NON NLS 1 return sbuf to String  generateBoldFormText StringBuffer StringBuffer toString
Check the filter state of the element Only base elements have the filter attribute param element return private boolean get Filter State Abstract Intro Element element if element is Of Type Abstract Intro Element BASE ELEMENT return Abstract Base Intro Element element is Filtered else return false  getFilterState AbstractIntroElement isOfType AbstractIntroElement BASE_ELEMENT AbstractBaseIntroElement isFiltered

class Page Composite extends Composite public Page Composite Composite parent int style super parent style  PageComposite PageComposite
Do not allow composite to take w Hint as is layout manager can reject the hint and compute larger width public Point compute Size int w Hint int h Hint boolean changed return Root Page Layout get Layout compute Size this w Hint h Hint changed  wHint computeSize wHint hHint RootPageLayout getLayout computeSize wHint hHint
protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache int innerW Hint w Hint if w Hint SWT DEFAULT innerW Hint LABEL MARGIN WIDTH LABEL MARGIN WIDTH Control children composite get Children Point s1 children 0 compute Size SWT DEFAULT SWT DEFAULT Point s2 children 1 compute Size innerW Hint SWT DEFAULT s2 x LABEL MARGIN WIDTH int height 2 s2 y VERTICAL SPACING s1 y 2 Point size new Point Math max s1 x s2 x height 5 return size  computeSize wHint hHint flushCache innerWHint wHint wHint innerWHint LABEL_MARGIN_WIDTH LABEL_MARGIN_WIDTH getChildren computeSize computeSize innerWHint LABEL_MARGIN_WIDTH VERTICAL_SPACING
protected void layout Composite composite boolean flush Cache Control children composite get Children Rectangle carea composite get Client Area Control content children 0 Control label children 1 Point content Size content compute Size SWT DEFAULT SWT DEFAULT Point label Size label compute Size carea width 2 LABEL MARGIN WIDTH 2 SWT DEFAULT content set Bounds carea width 2 content Size x 2 carea height 2 content Size y 2 content Size x content Size y label set Bounds LABEL MARGIN WIDTH content get Location y content Size y VERTICAL SPACING carea width LABEL MARGIN WIDTH 2 label Size y  flushCache getChildren getClientArea contentSize computeSize labelSize computeSize LABEL_MARGIN_WIDTH setBounds contentSize contentSize contentSize contentSize setBounds LABEL_MARGIN_WIDTH getLocation contentSize VERTICAL_SPACING LABEL_MARGIN_WIDTH labelSize
public void link Activated Hyperlink Event e Image Hyperlink image Link Image Hyperlink e get Source Intro Link intro Link Intro Link image Link get Data INTRO LINK IntroURL Parser parser new IntroURL Parser intro Link get Url if parser has Intro Url execute the action embedded in the IntroURL parser get IntroURL execute return else if parser has Protocol Util open Browser intro Link get Url return Dialog Util display Info Message image Link get Shell Intro Plugin get String Hyperlink Adapter url Is NON NLS 1 intro Link get Url  linkActivated HyperlinkEvent ImageHyperlink imageLink ImageHyperlink getSource IntroLink introLink IntroLink imageLink getData INTRO_LINK IntroURLParser IntroURLParser introLink getUrl hasIntroUrl getIntroURL hasProtocol openBrowser introLink getUrl DialogUtil displayInfoMessage imageLink getShell IntroPlugin getString HyperlinkAdapter urlIs introLink getUrl
public void link Entered Hyperlink Event e Image Hyperlink image Link Image Hyperlink e get Source Intro Link intro Link Intro Link image Link get Data INTRO LINK update Description intro Link get Text  linkEntered HyperlinkEvent ImageHyperlink imageLink ImageHyperlink getSource IntroLink introLink IntroLink imageLink getData INTRO_LINK updateDescription introLink getText
public void link Exited Hyperlink Event e empty text on exit update Description NON NLS 1  linkExited HyperlinkEvent updateDescription
private void update Description String text if text null text NON NLS 1 description Label set Text text description Label get Parent layout  updateDescription descriptionLabel setText descriptionLabel getParent
public Root Page Form Form Toolkit toolkit Intro Model Root model Root Form parent Form this toolkit toolkit this root Page model Root get Home Page this parent Form parent Form  RootPageForm FormToolkit IntroModelRoot modelRoot parentForm rootPage modelRoot getHomePage parentForm parentForm
Create the form for the root page Number of columns there is equal to the number of links param page Book public void create Part Control Scrolled Page Book main Page Book Shared Style Manager shard Style Manager first create the root page style manager from shared style manager root Page Style Manager new Page Style Manager root Page shard Style Manager get Properties Set title of Main form from root page title parent Form set Text root Page get Title Composite for full root page It has custom layout and two children the content composite and the description label Composite root Page Composite new Page Composite main Page Book get Container SWT NULL toolkit adapt root Page Composite main Page Book register Page root Page get Id root Page Composite root Page Composite set Layout new Root Page Layout Util highlight page Composite SWT COLOR DARK CYAN create the contents composite in the center of the root page create Root Page Content root Page Composite create description label for links description description Label create Hover Label root Page Composite Clear memory No need for style manager any more root Page Style Manager null  pageBook createPartControl ScrolledPageBook mainPageBook SharedStyleManager shardStyleManager rootPageStyleManager PageStyleManager rootPage shardStyleManager getProperties parentForm setText rootPage getTitle rootPageComposite PageComposite mainPageBook getContainer rootPageComposite mainPageBook registerPage rootPage getId rootPageComposite rootPageComposite setLayout RootPageLayout pageComposite COLOR_DARK_CYAN createRootPageContent rootPageComposite descriptionLabel createHoverLabel rootPageComposite rootPageStyleManager
Creates content of the root page private void create Root Page Content Composite root Page Composite setup page composite layout Composite content Composite toolkit create Composite root Page Composite Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN CENTER content Composite set Layout Data gd Abstract Intro Element children Abstract Intro Element root Page get Children Of Type Abstract Intro Element GROUP Abstract Intro Element LINK int num Children children length Grid Layout layout new Grid Layout separate links a bit more layout horizontal Spacing root Page Style Manager get Page Horizantal Spacing layout vertical Spacing root Page Style Manager get Page Vertical Spacing set number of columns int num Columns root Page Style Manager get Page Number Of Columns num Columns num Columns 0 num Children num Columns layout num Columns num Columns layout horizontal Spacing root Page Style Manager get Page Horizantal Spacing layout vertical Spacing root Page Style Manager get Page Vertical Spacing content Composite set Layout layout for int i 0 i children length i if Abstract Base Intro Element children i is Filtered continue if children i get Type Abstract Intro Element GROUP create Group Content content Composite Intro Group children i else if children i get Type Abstract Intro Element LINK create Image Hyperlink content Composite Intro Link children i  createRootPageContent rootPageComposite contentComposite createComposite rootPageComposite GridData GridData GridData HORIZONTAL_ALIGN_CENTER contentComposite setLayoutData AbstractIntroElement AbstractIntroElement rootPage getChildrenOfType AbstractIntroElement AbstractIntroElement numChildren GridLayout GridLayout horizontalSpacing rootPageStyleManager getPageHorizantalSpacing verticalSpacing rootPageStyleManager getPageVerticalSpacing numColumns rootPageStyleManager getPageNumberOfColumns numColumns numColumns numChildren numColumns numColumns numColumns horizontalSpacing rootPageStyleManager getPageHorizantalSpacing verticalSpacing rootPageStyleManager getPageVerticalSpacing contentComposite setLayout AbstractBaseIntroElement isFiltered getType AbstractIntroElement createGroupContent contentComposite IntroGroup getType AbstractIntroElement createImageHyperlink contentComposite IntroLink
Creates content of the root page private void create Group Content Composite parent Intro Group group Abstract Intro Element children Abstract Intro Element group get Children Of Type Abstract Intro Element GROUP Abstract Intro Element LINK int num Children children length setup page composite layout Composite content Composite toolkit create Composite parent Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN CENTER gd horizontal Span root Page Style Manager get Col Span group gd vertical Span root Page Style Manager get Row Span group content Composite set Layout Data gd Grid Layout layout new Grid Layout separate links a bit more layout horizontal Spacing 20 set number of columns int num Columns root Page Style Manager get Number Of Columns group num Columns num Columns 1 num Children num Columns layout num Columns num Columns layout vertical Spacing root Page Style Manager get Vertical Spacing group layout horizontal Spacing root Page Style Manager get Horizantal Spacing group content Composite set Layout layout for int i 0 i children length i if Abstract Base Intro Element children i is Filtered continue if children i get Type Abstract Intro Element GROUP create Group Content content Composite Intro Group children i else if children i get Type Abstract Intro Element LINK create Image Hyperlink content Composite Intro Link children i  createGroupContent IntroGroup AbstractIntroElement AbstractIntroElement getChildrenOfType AbstractIntroElement AbstractIntroElement numChildren contentComposite createComposite GridData GridData GridData HORIZONTAL_ALIGN_CENTER horizontalSpan rootPageStyleManager getColSpan verticalSpan rootPageStyleManager getRowSpan contentComposite setLayoutData GridLayout GridLayout horizontalSpacing numColumns rootPageStyleManager getNumberOfColumns numColumns numColumns numChildren numColumns numColumns numColumns verticalSpacing rootPageStyleManager getVerticalSpacing horizontalSpacing rootPageStyleManager getHorizantalSpacing contentComposite setLayout AbstractBaseIntroElement isFiltered getType AbstractIntroElement createGroupContent contentComposite IntroGroup getType AbstractIntroElement createImageHyperlink contentComposite IntroLink
Creates an Image Hyperlink from an Intro Link Model object is cached in link param body param link private void create Image Hyperlink Composite parent Intro Link link create the container composite that will hold the image Hyper Link and the label for the description Composite container toolkit create Composite parent Util highlight container SWT COLOR CYAN Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN CENTER gd horizontal Span root Page Style Manager get Col Span link gd vertical Span root Page Style Manager get Row Span link container set Layout Data gd Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 container set Layout layout Image Hyperlink image Link toolkit create Image Hyperlink container SWT NULL image Link set Image root Page Style Manager get Image link link icon NON NLS 1 Image Util DEFAULT ROOT LINK image Link set Hover Image root Page Style Manager get Image link hover icon null NON NLS 1 each link is centered in cell gd new Grid Data Grid Data HORIZONTAL ALIGN CENTER image Link set Layout Data gd cache the intro link model object for description and URL image Link set Data INTRO LINK link image Link add Hyperlink Listener hyperlink Adapter description label Label link Label toolkit create Label container link get Label gd new Grid Data Grid Data HORIZONTAL ALIGN CENTER link Label set Font Page Style Manager get Banner Font link Label set Layout Data gd  IntroLink createImageHyperlink IntroLink imageHyperLink createComposite COLOR_CYAN GridData GridData GridData HORIZONTAL_ALIGN_CENTER horizontalSpan rootPageStyleManager getColSpan verticalSpan rootPageStyleManager getRowSpan setLayoutData GridLayout GridLayout marginWidth marginHeight setLayout ImageHyperlink imageLink createImageHyperlink imageLink setImage rootPageStyleManager getImage ImageUtil DEFAULT_ROOT_LINK imageLink setHoverImage rootPageStyleManager getImage GridData GridData HORIZONTAL_ALIGN_CENTER imageLink setLayoutData imageLink setData INTRO_LINK imageLink addHyperlinkListener hyperlinkAdapter linkLabel createLabel getLabel GridData GridData HORIZONTAL_ALIGN_CENTER linkLabel setFont PageStyleManager getBannerFont linkLabel setLayoutData
Creates a label to display the link description when you hover over a hyperlink param body private Label create Hover Label Composite body Label label toolkit create Label body SWT WRAP NON NLS 1 String key String Util concat root Page get Id hover text fg NON NLS 1 NON NLS 2 to String Color fg root Page Style Manager get Color toolkit key if fg null fg toolkit get Colors get Color Form Colors TITLE label set Foreground fg label set Alignment SWT CENTER label set Font Page Style Manager get Banner Font return label  createHoverLabel createLabel StringUtil rootPage getId toString rootPageStyleManager getColor getColors getColor FormColors setForeground setAlignment setFont PageStyleManager getBannerFont

protected Bundle bundle Shared Style Manager  SharedStyleManager
Constructor used when shared styles need to be loaded The bundle is retrieved from the model root param model Root public Shared Style Manager Intro Model Root model Root bundle model Root get Bundle properties new Properties String shared Style model Root get Presentation get Implementation Style if shared Style null load properties shared Style  modelRoot SharedStyleManager IntroModelRoot modelRoot modelRoot getBundle sharedStyle modelRoot getPresentation getImplementationStyle sharedStyle sharedStyle
protected void load Properties properties String style if style null return try URL styleURL new URL style Input Stream is styleURL open Stream properties load is is close catch Exception e Log error Could not load SWT style style e NON NLS 1  InputStream openStream
Get the property from the shared properties param key return public String get Property String key return do Get Property properties key  getProperty doGetProperty
protected String do Get Property Properties a Properties String key String value a Properties get Property key if value null trim the properties as trailing balnnks cause problems value value trim return value  doGetProperty aProperties aProperties getProperty
protected RGB getRGB String key String value get Property key if value null return null if value char At 0 HEX try int r Integer parse Int value substring 1 3 16 int g Integer parse Int value substring 3 5 16 int b Integer parse Int value substring 5 7 16 return new RGB r g b catch Number Format Exception e return null  getProperty charAt parseInt parseInt parseInt NumberFormatException
Finds the bundle from which this key was loaded This is the bundle from which shared styles where loaded param key return protected Bundle get Associated Bundle String key return bundle  getAssociatedBundle
return Returns the properties public Properties get Properties return properties  getProperties
param toolkit param key return color May return null public Color get Color Form Toolkit toolkit String key Form Colors colors toolkit get Colors Color color colors get Color key if color null RGB rgb getRGB key if rgb null color colors create Color key rgb return color  getColor FormToolkit FormColors getColors getColor createColor
Retrieve an image from this page s properties given a key param key param default Page Key param default Key return public Image get Image String key String default Page Key String default Key String current Key key String value get Property current Key if value null default Page Key null current Key default Page Key value get Property default Page Key if value null if Image Util has Image current Key return Image Util get Image current Key try to register the image Bundle bundle get Associated Bundle current Key if bundle null it means that we are getting a key defined in this page s styles ie not an inherited style bundle this bundle Image Util register Image current Key bundle value Image image Image Util get Image current Key if image null return image try default We know default is already registered if default Key null return Image Util get Image default Key return null  defaultPageKey defaultKey getImage defaultPageKey defaultKey currentKey getProperty currentKey defaultPageKey currentKey defaultPageKey getProperty defaultPageKey ImageUtil hasImage currentKey ImageUtil getImage currentKey getAssociatedBundle currentKey ImageUtil registerImage currentKey ImageUtil getImage currentKey defaultKey ImageUtil getImage defaultKey
public boolean use Custom Home Pagelayout String key home page custom layout NON NLS 1 String value get Property key if value null value true NON NLS 1 return value equals Ignore Case true NON NLS 1  useCustomHomePagelayout getProperty equalsIgnoreCase

Displays core error dialog with a message from the Core error status object and a user message br The user message is retrieved from the errorID and is logged using Log log Error public static void display Core Error Dialog Shell parent String error Id Core Exception core Ex String title Intro Plugin get String Error Dialog error Title NON NLS 1 if parent null parent get Active Shell I Status status core Ex get Status String msg Intro Plugin get String error Id Error Dialog open Error parent title msg status Log error msg core Ex  logError displayCoreErrorDialog errorId CoreException coreEx IntroPlugin getString ErrorDialog errorTitle getActiveShell IStatus coreEx getStatus IntroPlugin getString errorId ErrorDialog openError coreEx
Displays error dialog with the given message br public static void display Error Message Shell parent String msg Throwable ex String title Intro Plugin get String Message Dialog error Title NON NLS 1 if parent null parent get Active Shell Message Dialog open Error parent title msg Log error msg ex  displayErrorMessage IntroPlugin getString MessageDialog errorTitle getActiveShell MessageDialog openError
Displays error dialog with a message corresponding to the error Id br The user message is retrieved from the errorID and is formatted with the passed variables Also logs the error using Log log Error public static void display Error Message Shell parent String error Id Object variables Throwable ex String msg null if variables null msg Intro Plugin get Formatted String error Id variables else msg Intro Plugin get String error Id display Error Message parent msg ex  errorId logError displayErrorMessage errorId IntroPlugin getFormattedString errorId IntroPlugin getString errorId displayErrorMessage
Displays warning dialog with a given message br also logs the info using Log log Warning msg error message to display and log public static void display Warning Message Shell parent String msg String title Intro Plugin get String Message Dialog warning Title NON NLS 1 if parent null parent get Active Shell Message Dialog open Warning parent title msg Log warning msg  logWarning displayWarningMessage IntroPlugin getString MessageDialog warningTitle getActiveShell MessageDialog openWarning
Displays warning dialog with a message corresponding to the error Id br also logs the info using Log log Warning public static void display Warning Message Shell parent String warning Id Object variables String msg null if variables null msg Intro Plugin get Formatted String warning Id variables else msg Intro Plugin get String warning Id display Warning Message parent msg  errorId logWarning displayWarningMessage warningId IntroPlugin getFormattedString warningId IntroPlugin getString warningId displayWarningMessage
Displays info dialog with a message corresponding to the info Id br also logs the info using Log log Info public static void display Info Message Shell parent String msg String title Intro Plugin get String Message Dialog info Title NON NLS 1 if parent null parent get Active Shell Message Dialog open Information parent title msg Log info msg  infoId logInfo displayInfoMessage IntroPlugin getString MessageDialog infoTitle getActiveShell MessageDialog openInformation
Displays info dialog with a message corresponding to the info Id br also logs the info using Log log Info public static void display Info Message Shell parent String info Id Object variables String msg null if variables null msg Intro Plugin get Formatted String info Id variables else msg Intro Plugin get String info Id display Info Message parent msg  infoId logInfo displayInfoMessage infoId IntroPlugin getFormattedString infoId IntroPlugin getString infoId displayInfoMessage
public static I Workbench Window get Active Workbench Window return PlatformUI get Workbench get Active Workbench Window  IWorkbenchWindow getActiveWorkbenchWindow getWorkbench getActiveWorkbenchWindow
Utility method to best find the active shell public static Shell get Active Shell Display display get Current Display Shell active Shell display get Active Shell if active Shell null return get Active Workbench Window get Shell else return active Shell  getActiveShell getCurrentDisplay activeShell getActiveShell activeShell getActiveWorkbenchWindow getShell activeShell
Utility method to best find the active Display public static Display get Current Display Display display Display get Current if display null return display else return Display get Default  getCurrentDisplay getCurrent getDefault

Convenience method to create an image descriptor from the Intro plugin Method assumes that images are under the icons directory so don t append that directory name for image Name public static Image Descriptor create Image Descriptor String image Name return create Image Descriptor Platform get Bundle I Intro Constants PLUGIN ID ICONS PATH image Name  imageName ImageDescriptor createImageDescriptor imageName createImageDescriptor getBundle IIntroConstants PLUGIN_ID ICONS_PATH imageName
Convenience method to create an image descriptor public static Image Descriptor create Image Descriptor Bundle bundle String image Name try URL image Url Platform find bundle new Path image Name Image Descriptor desc Image Descriptor create FromURL image Url return desc catch Exception e Should never be here Log error could not create Image Descriptor e NON NLS 1 return Image Descriptor get Missing Image Descriptor  ImageDescriptor createImageDescriptor imageName imageUrl imageName ImageDescriptor ImageDescriptor createFromURL imageUrl ImageDescriptor getMissingImageDescriptor
Convenience method to create an image from the Intro plugin Method assumes that images are under the icons directory so don t append that directory name for image Name public static Image create Image String image Name try Image Descriptor image Dsc create Image Descriptor image Name return image Dsc create Image catch Exception e Should never be here Log error could not create Image e NON NLS 1 return Image Descriptor get Missing Image Descriptor create Image  imageName createImage imageName ImageDescriptor imageDsc createImageDescriptor imageName imageDsc createImage ImageDescriptor getMissingImageDescriptor createImage
Util method for image re use in Intro Plugin param key return public static Image get Image String key DONOW Image registry should not have the same life span as the intro plug in It should be disposed when presentation is disposed otherwise images will stay around once Inro has been loaded return Intro Plugin get Default get Image Registry get key  getImage IntroPlugin getDefault getImageRegistry
public static boolean has Image String key Image Registry registry Intro Plugin get Default get Image Registry return registry get Descriptor key null  hasImage ImageRegistry IntroPlugin getDefault getImageRegistry getDescriptor
Register an image descriptor in the Intro Plugin image registry Has no effect if the key has already been registered param key param image Name public static void register Image String key String image Name Image Registry registry Intro Plugin get Default get Image Registry if registry get Descriptor key null key has already been registered do nothing return registry put key create Image Descriptor image Name  imageName registerImage imageName ImageRegistry IntroPlugin getDefault getImageRegistry getDescriptor createImageDescriptor imageName
public static void register Image String key Bundle bundle String image Name Image Registry registry Intro Plugin get Default get Image Registry if registry get Descriptor key null key has already been registered do nothing return registry put key create Image Descriptor bundle image Name  registerImage imageName ImageRegistry IntroPlugin getDefault getImageRegistry getDescriptor createImageDescriptor imageName

public Intro Model Serializer Intro Model Root root this buffer new String Buffer print Model Root Info root buffer Root Page Intro Home Page root Page root get Home Page print Home Page root Page buffer print Page Children root Page buffer Intro Page pages root get Pages print Pages pages buffer buffer append n n NON NLS 1 print Model Flag Tests root buffer  IntroModelSerializer IntroModelRoot StringBuffer printModelRootInfo IntroHomePage rootPage getHomePage printHomePage rootPage printPageChildren rootPage IntroPage getPages printPages printModelFlagTests
private void print Model Root Info Intro Model Root model String Buffer text text append n Intro Model Content NON NLS 1 text append n NON NLS 1 text append n n Model has valid config model has Valid Config NON NLS 1 text append n Presentation Kind NON NLS 1 model get Presentation get Implementation Kind text append n Presentation Shared Style NON NLS 1 model get Presentation get Implementation Style text append n Presentation type NON NLS 1 model get Presentation get Type text append n Home page id NON NLS 1 model get Presentation get Home Page Id Intro Head head Content model get Presentation get Head if head Content null text append n Presentation Shared Head head Content get Src NON NLS 1 text append n Number of pages not including Root Page NON NLS 1 model get Pages length text append n Number of shared groups NON NLS 1 model get Children Of Type Abstract Intro Element GROUP length text append n Number of unresolved extensions NON NLS 1 model get Children Of Type Abstract Intro Element CONTAINER EXTENSION length  printModelRootInfo IntroModelRoot StringBuffer nIntro nModel hasValidConfig nPresentation getPresentation getImplementationKind nPresentation getPresentation getImplementationStyle nPresentation getPresentation getType nHome getPresentation getHomePageId IntroHead headContent getPresentation getHead headContent nPresentation headContent getSrc nNumber getPages nNumber getChildrenOfType AbstractIntroElement nNumber getChildrenOfType AbstractIntroElement CONTAINER_EXTENSION
param text param root private void print Home Page Intro Home Page root Page String Buffer text text append n nHOME PAGE NON NLS 1 text append n NON NLS 1 text append n tis dynamic Intro Model Root root Page get Parent is Dynamic NON NLS 1 text append n tid root Page get Id NON NLS 1 text append n ttitle root Page get Title NON NLS 1 text append n tstyle root Page get Style NON NLS 1 text append n talt style root Page get Alt Style NON NLS 1 text append n turl root Page get Url NON NLS 1 text append n tstyle id root Page get Style Id NON NLS 1 print Page Styles root Page text  printHomePage IntroHomePage rootPage StringBuffer IntroModelRoot rootPage getParent isDynamic rootPage getId rootPage getTitle rootPage getStyle rootPage getAltStyle rootPage getUrl rootPage getStyleId printPageStyles rootPage
private void print Page Styles Abstract Intro Page page String Buffer text text append n tpage styles are NON NLS 1 String styles page get Styles for int i 0 i styles length i text append styles i n t t t NON NLS 1 text append n tpage alt styles are NON NLS 1 Hashtable alt Styles Hashtable page get Alt Styles Enumeration alt Styles alt Styles Hashtable keys while alt Styles has More Elements String alt Style String alt Styles next Element Bundle bundle Bundle alt Styles Hashtable get alt Style text append alt Style from bundle get Symbolic Name NON NLS 1 text append n t t NON NLS 1  printPageStyles AbstractIntroPage StringBuffer getStyles altStylesHashtable getAltStyles altStyles altStylesHashtable altStyles hasMoreElements altStyle altStyles nextElement altStylesHashtable altStyle altStyle getSymbolicName
private void print Page Children Abstract Intro Page page String Buffer text text append n tpage children page get Children length NON NLS 1 text append n NON NLS 1 print Container Children page text n t t NON NLS 1  printPageChildren AbstractIntroPage StringBuffer getChildren printContainerChildren
private void print Container Children Abstract Intro Container container String Buffer text String indent Abstract Intro Element children container get Children for int i 0 i children length i int child Type children i get Type switch child Type case Abstract Intro Element ELEMENT text append SHOULD NEVER BE HERE NON NLS 1 break case Abstract Intro Element GROUP print Group text Intro Group children i indent break case Abstract Intro Element LINK print Link text Intro Link children i indent break case Abstract Intro Element TEXT print Text text Intro Text children i indent break case Abstract Intro Element IMAGE print Image text Intro Image children i indent break case Abstract Intro Element HTML print Html text IntroHTML children i indent break case Abstract Intro Element INCLUDE print Include text Intro Include children i indent break case Abstract Intro Element HEAD print Head text Intro Head children i indent break case Abstract Intro Element PAGE TITLE print Page Title text Intro Page Title children i indent break case Abstract Intro Element ANCHOR print Anchor text Intro Anchor children i indent break  printContainerChildren AbstractIntroContainer StringBuffer AbstractIntroElement getChildren childType getType childType AbstractIntroElement AbstractIntroElement printGroup IntroGroup AbstractIntroElement printLink IntroLink AbstractIntroElement printText IntroText AbstractIntroElement printImage IntroImage AbstractIntroElement printHtml AbstractIntroElement printInclude IntroInclude AbstractIntroElement printHead IntroHead AbstractIntroElement PAGE_TITLE printPageTitle IntroPageTitle AbstractIntroElement printAnchor IntroAnchor
private void print Group String Buffer text Intro Group group String indent text append indent GROUP id group get Id NON NLS 1 indent indent t t NON NLS 1 text append indent label group get Label NON NLS 1 text append indent children group get Children length NON NLS 1 text append indent style id group get Style Id NON NLS 1 print Container Children group text indent t t NON NLS 1  printGroup StringBuffer IntroGroup getId getLabel getChildren getStyleId printContainerChildren
private void print Link String Buffer text Intro Link link String indent text append indent LINK id link get Id NON NLS 1 indent indent t t NON NLS 1 text append indent label link get Label NON NLS 1 text append indent text link get Text NON NLS 1 text append indent style id link get Style Id NON NLS 1  printLink StringBuffer IntroLink getId getLabel getText getStyleId
private void print Text String Buffer text Intro Text intro Text String indent text append indent TEXT id intro Text get Id NON NLS 1 indent indent t t NON NLS 1 text append indent text intro Text get Text NON NLS 1 text append indent style id intro Text get Style Id NON NLS 1  printText StringBuffer IntroText introText introText getId introText getText introText getStyleId
private void print Image String Buffer text Intro Image image String indent text append indent IMAGE id image get Id NON NLS 1 indent indent t t NON NLS 1 text append indent src image get Src NON NLS 1 text append indent alt image get Alt NON NLS 1 text append indent style id image get Style Id NON NLS 1  printImage StringBuffer IntroImage getId getSrc getAlt getStyleId
private void print Html String Buffer text IntroHTML html String indent text append indent HTML id html get Id NON NLS 1 indent indent t t NON NLS 1 text append indent src html get Src NON NLS 1 text append indent is Inlined html is Inlined NON NLS 1 text append indent style id html get Style Id NON NLS 1 if html get Intro Image null print Image text html get Intro Image indent t t NON NLS 1 if html get Intro Text null print Text text html get Intro Text indent t t NON NLS 1  printHtml StringBuffer getId getSrc isInlined isInlined getStyleId getIntroImage printImage getIntroImage getIntroText printText getIntroText
private void print Include String Buffer text Intro Include include String indent text append indent INCLUDE config Id include get Config Id NON NLS 1 indent indent t t NON NLS 1 text append indent path include get Path NON NLS 1 text append indent merge style include get Merge Style NON NLS 1  printInclude StringBuffer IntroInclude configId getConfigId getPath getMergeStyle
private void print Head String Buffer text Intro Head head String indent text append indent HEAD src head get Src NON NLS 1  printHead StringBuffer IntroHead getSrc
private void print Page Title String Buffer text Intro Page Title title String indent text append indent TITLE id title get Id NON NLS 1 indent indent t t NON NLS 1 text append indent title title get Title NON NLS 1 text append indent style id title get Style Id NON NLS 1  printPageTitle StringBuffer IntroPageTitle getId getTitle getStyleId
private void print Anchor String Buffer text Intro Anchor anchor String indent text append indent ANCHOR id anchor get Id NON NLS 1  printAnchor StringBuffer IntroAnchor getId
Appends a given page s categories to the Text buffer param text private void print Pages Intro Page pages String Buffer text for int i 0 i pages length i text append n nPAGE id pages i get Id NON NLS 1 text append n NON NLS 1 text append n ttitle pages i get Title NON NLS 1 text append n tstyle pages i get Style NON NLS 1 text append n talt style pages i get Alt Style NON NLS 1 text append n tstyle id pages i get Style Id NON NLS 1 print Page Styles pages i text print Page Children pages i text  printPages IntroPage StringBuffer getId getTitle getStyle getAltStyle getStyleId printPageStyles printPageChildren
private void print Model Flag Tests Intro Model Root model String Buffer text text append Model Flag Tests NON NLS 1 text append n NON NLS 1 if model get Pages length 0 text append n No first page in model n n NON NLS 1 return Intro Page first Page model get Pages 0 text append n t t First page children are NON NLS 1 text append n t t t Groups NON NLS 1 first Page get Children Of Type Abstract Intro Element GROUP length text append n t t t Links NON NLS 1 first Page get Children Of Type Abstract Intro Element LINK length text append n t t t Texts NON NLS 1 first Page get Children Of Type Abstract Intro Element TEXT length text append n t t tHTM Ls NON NLS 1 first Page get Children Of Type Abstract Intro Element HTML length text append n t t t Images NON NLS 1 first Page get Children Of Type Abstract Intro Element IMAGE length text append n t t t Includes NON NLS 1 first Page get Children Of Type Abstract Intro Element INCLUDE length text append n t t t Page Titles NON NLS 1 first Page get Children Of Type Abstract Intro Element PAGE TITLE length text append n t t t Page Heads NON NLS 1 first Page get Children Of Type Abstract Intro Element HEAD length text append n t t t Model Elements NON NLS 1 first Page get Children Of Type Abstract Intro Element ELEMENT length text append n t t t Containers NON NLS 1 first Page get Children Of Type Abstract Intro Element ABSTRACT CONTAINER length text append n t t t All Pages NON NLS 1 first Page get Children Of Type Abstract Intro Element ABSTRACT PAGE length text append n t t t Elements with Text child Abstract Text Elemets NON NLS 1 first Page get Children Of Type Abstract Intro Element ABSTRACT TEXT length Abstract Intro Element links And Groups Abstract Intro Element first Page get Children Of Type Abstract Intro Element GROUP Abstract Intro Element LINK text append n t t t Groups and Links links And Groups length NON NLS 1  printModelFlagTests IntroModelRoot StringBuffer getPages nNo IntroPage firstPage getPages tFirst tGroups firstPage getChildrenOfType AbstractIntroElement tLinks firstPage getChildrenOfType AbstractIntroElement tTexts firstPage getChildrenOfType AbstractIntroElement tHTMLs firstPage getChildrenOfType AbstractIntroElement tImages firstPage getChildrenOfType AbstractIntroElement tIncludes firstPage getChildrenOfType AbstractIntroElement tPage firstPage getChildrenOfType AbstractIntroElement PAGE_TITLE tPage firstPage getChildrenOfType AbstractIntroElement tModel firstPage getChildrenOfType AbstractIntroElement tContainers firstPage getChildrenOfType AbstractIntroElement ABSTRACT_CONTAINER tAll firstPage getChildrenOfType AbstractIntroElement ABSTRACT_PAGE tElements AbstractTextElemets firstPage getChildrenOfType AbstractIntroElement ABSTRACT_TEXT AbstractIntroElement linksAndGroups AbstractIntroElement firstPage getChildrenOfType AbstractIntroElement AbstractIntroElement tGroups linksAndGroups
return Returns the textUI public String to String return buffer to String  toString toString

private static boolean get Debug Option String option return true equals Ignore Case NON NLS 1 Platform get Debug Option PLUGIN ID option  getDebugOption equalsIgnoreCase getDebugOption PLUGIN_ID
Log an Error message with an exception Note that the message should already be localized to proper local Errors are always logged public static synchronized void 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 plugin Log log error Status  errorStatus IStatus PLUGIN_ID IStatus pluginLog errorStatus
Log an Information message Note that the message should already be localized to proper local Info messages are only logged when the trace log Info debug option is true public static synchronized void info String message if log Info logging of info messages is not enabled return if message null message NON NLS 1 Status info Status new Status I Status INFO PLUGIN ID I Status OK message null plugin Log log info Status  logInfo logInfo infoStatus IStatus PLUGIN_ID IStatus pluginLog infoStatus
Log a Warning message Note that the message should already be localized to proper local Warning messages are only logged when the plugin is in debug mode public static synchronized void warning String message if Intro Plugin get Default is Debugging plugin is not in debug mode Default is to not log warning messages return if message null message NON NLS 1 Status warning Status new Status I Status WARNING PLUGIN ID I Status OK message null plugin Log log warning Status  IntroPlugin getDefault isDebugging warningStatus IStatus PLUGIN_ID IStatus pluginLog warningStatus
Log a development debug message Debug messages are compiled out public static synchronized void debug Message String class Name String message if DEBUG Multi Status debug Status new Multi Status PLUGIN ID I Status OK class Name null Status info Status new Status I Status OK PLUGIN ID I Status OK message null debug Status add info Status plugin Log log debug Status  debugMessage className MultiStatus debugStatus MultiStatus PLUGIN_ID IStatus className infoStatus IStatus PLUGIN_ID IStatus debugStatus infoStatus pluginLog debugStatus

public static String Buffer concat String string1 String string2 String string3 String Buffer buffer new String Buffer string1 buffer append string2 buffer append string3 return buffer  StringBuffer StringBuffer StringBuffer
public static String Buffer concat String string1 String string2 String string3 String string4 String Buffer buffer concat string1 string2 string3 buffer append string4 return buffer  StringBuffer StringBuffer
public static String Buffer concat String string1 String string2 String string3 String string4 String string5 String Buffer buffer concat string1 string2 string3 string4 buffer append string5 return buffer  StringBuffer StringBuffer
public static String Buffer concat String string1 String string2 String string3 String string4 String string5 String string6 String Buffer buffer concat string1 string2 string3 string4 string5 buffer append string6 return buffer  StringBuffer StringBuffer

Handle the exception by logging to the Log br The error Id is used to NL enable the error message Pass code null code as the message Id to indicate that the error s message should be shown as the primary message public static void handle Exception String error Id Exception e handle Exception error Id e null  errorId messageId handleException errorId handleException errorId
Handle the exception by logging to the Log br The error Id is used to NL enable the error message and the variables are subsituted in the message Pass code null code as the message Id to indicate that the error s message should be shown as the primary message public static void handle Exception String error Id Exception e Object variables String msg null if variables null if variables is not null error Id will never be null msg Intro Plugin get Formatted String error Id variables else if error Id null msg e get Message else msg Intro Plugin get String error Id Log error msg e  errorId messageId handleException errorId errorId IntroPlugin getFormattedString errorId errorId getMessage IntroPlugin getString errorId
Handle the exception by displaying an Error Dialog br The error Id is used to NL enable the error message Also the error is logged by the Log Pass code null code as the message Id to indicate that the error s message should be shown as the primary message public static void handle Exception With Pop Up Shell parent String error Id Exception e if it is a core exception use Error Dialog If the error id is null this translates to giving null to this dialog which is handled by Eclipse by displaying the detyailed message directly if e instanceof Core Exception if parent null parent Dialog Util get Active Shell Dialog Util display Core Error Dialog parent error Id Core Exception e return any other exception use Message Dialog if errorID is null use error message if error Id null error Id e get Message if parent null parent Dialog Util get Active Shell Dialog Util display Error Message parent error Id e  errorId messageId handleExceptionWithPopUp errorId ErrorDialog CoreException DialogUtil getActiveShell DialogUtil displayCoreErrorDialog errorId CoreException MessageDialog errorId errorId getMessage DialogUtil getActiveShell DialogUtil displayErrorMessage errorId
public void handle Event Event e switch e type case SWT Selection System out println Selection EVENT e to String NON NLS 1 break case SWT Dispose System out println Dispose EVENT e to String NON NLS 1 break case SWT Paint System out println Paint EVENT e to String NON NLS 1 break case SWT Resize System out println Resize EVENT e to String NON NLS 1 break case SWT Mouse Double Click System out println Mouse Double Click EVENT NON NLS 1 e to String break case SWT Mouse Down System out println Mouse Down EVENT e to String NON NLS 1 break case SWT Mouse Up System out println Mouse Up EVENT e to String NON NLS 1 break case SWT Mouse Move System out println Mouse Move EVENT e to String NON NLS 1 break case SWT Mouse Enter System out println Mouse Enter EVENT e to String NON NLS 1 break case SWT Mouse Exit System out println Mouse Exit EVENT e to String NON NLS 1 break case SWT Mouse Hover System out println Mouse Hover EVENT e to String NON NLS 1 break case SWT Focus In System out println Focus In EVENT e to String NON NLS 1 break case SWT Focus Out System out println Focus Out EVENT e to String NON NLS 1 break case SWT Key Down System out println Key Down EVENT e to String NON NLS 1 break case SWT Key Up System out println Key Up EVENT e to String NON NLS 1 break case SWT Traverse System out println Traverse EVENT e to String NON NLS 1 break case SWT Show System out println Show EVENT e to String NON NLS 1 break case SWT Hide System out println Hide EVENT e to String NON NLS 1 break default System out println e to String  handleEvent toString toString toString toString MouseDoubleClick MouseDoubleClick toString MouseDown MouseDown toString MouseUp MouseUp toString MouseMove MouseMove toString MouseEnter MouseEnter toString MouseExit MouseExit toString MouseHover MouseHover toString FocusIn FocusIn toString FocusOut FocusOut toString KeyDown KeyDown toString KeyUp KeyUp toString toString toString toString toString
Utility method that will add a debug listener to the given control All common events are added param control return public static Listener add Debug Listener Control control Listener listener new Listener public void handle Event Event e switch e type case SWT Selection System out println Selection EVENT e to String NON NLS 1 break case SWT Dispose System out println Dispose EVENT e to String NON NLS 1 break case SWT Paint System out println Paint EVENT e to String NON NLS 1 break case SWT Resize System out println Resize EVENT e to String NON NLS 1 break case SWT Mouse Double Click System out println Mouse Double Click EVENT NON NLS 1 e to String break case SWT Mouse Down System out println Mouse Down EVENT e to String NON NLS 1 break case SWT Mouse Up System out println Mouse Up EVENT e to String NON NLS 1 break case SWT Mouse Move System out println Mouse Move EVENT e to String NON NLS 1 break case SWT Mouse Enter System out println Mouse Enter EVENT e to String NON NLS 1 break case SWT Mouse Exit System out println Mouse Exit EVENT e to String NON NLS 1 break case SWT Mouse Hover System out println Mouse Hover EVENT e to String NON NLS 1 break case SWT Focus In System out println Focus In EVENT e to String NON NLS 1 break case SWT Focus Out System out println Focus Out EVENT e to String NON NLS 1 break case SWT Key Down System out println Key Down EVENT e to String NON NLS 1 break case SWT Key Up System out println Key Up EVENT e to String NON NLS 1 break case SWT Traverse System out println Traverse EVENT e to String NON NLS 1 break case SWT Show System out println Show EVENT e to String NON NLS 1 break case SWT Hide System out println Hide EVENT e to String NON NLS 1 break default System out println e to String int all Events new int SWT Selection SWT Dispose SWT Paint SWT Resize SWT Mouse Double Click SWT Mouse Down SWT Mouse Up SWT Mouse Move SWT Mouse Enter SWT Mouse Exit SWT Mouse Hover SWT Focus In SWT Focus Out SWT Key Down SWT Key Up SWT Traverse SWT Show SWT Hide for int i 0 i all Events length i control add Listener all Events i listener return listener  addDebugListener handleEvent toString toString toString toString MouseDoubleClick MouseDoubleClick toString MouseDown MouseDown toString MouseUp MouseUp toString MouseMove MouseMove toString MouseEnter MouseEnter toString MouseExit MouseExit toString MouseHover MouseHover toString FocusIn FocusIn toString FocusOut FocusOut toString KeyDown KeyDown toString KeyUp KeyUp toString toString toString toString toString allEvents MouseDoubleClick MouseDown MouseUp MouseMove MouseEnter MouseExit MouseHover FocusIn FocusOut KeyDown KeyUp allEvents addListener allEvents
public static void sleep int delay try Thread sleep delay catch Interrupted Exception e  InterruptedException
public static void highlight Control control int color control set Background control get Display get System Color color  setBackground getDisplay getSystemColor
public static void highlight Focus Control Control control Display get Current get Focus Control if control null control set Background Display get Current get System Color SWT COLOR DARK RED  highlightFocusControl getCurrent getFocusControl setBackground getCurrent getSystemColor COLOR_DARK_RED
public void run try Process process do Open Browser local Href true if process null no browser already opened Launch new one process do Open Browser local Href false if process null result 0 false result 0 process exit Value 0 true false catch Exception e open Browser Error display e result 0 false  doOpenBrowser localHref doOpenBrowser localHref exitValue openBrowserError
private Process do Open Browser String href boolean remote throws Exception Process p null String web Browser try netscape first web Browser netscape NON NLS 1 String cmd create Command web Browser href remote try p Runtime get Runtime exec cmd catch IO Exception e command failed p null if p null remote int exit Code p wait For if exit Code 0 return p netscape failed Try mozilla web Browser mozilla NON NLS 1 cmd create Command web Browser href remote try p Runtime get Runtime exec cmd catch IO Exception e command failed p null if p null remote int exit Code p wait For if exit Code 0 return p all failed return null return null  doOpenBrowser webBrowser webBrowser createCommand webBrowser getRuntime IOException exitCode waitFor exitCode webBrowser createCommand webBrowser getRuntime IOException exitCode waitFor exitCode
Create a command to launch the given browser with without remote control private String create Command String browser String href boolean remote String Buffer cmd new String Buffer browser if remote cmd append remote openURL NON NLS 1 cmd append href cmd append NON NLS 1 else cmd append NON NLS 1 cmd append href return cmd to String  createCommand StringBuffer StringBuffer toString
Launch an external brwoser on the given url public static boolean open Browser String href format the href for an html file file filename html required for Mac only if href starts With file NON NLS 1 href href substring 5 while href starts With NON NLS 1 href href substring 1 href file href NON NLS 1 final String local Href href final Display display Display get Current String platform SWT get Platform if win32 equals platform NON NLS 1 return Program launch local Href else if carbon equals platform NON NLS 1 try Process process Runtime get Runtime exec usr bin open local Href NON NLS 1 if process null return false return process exit Value 0 true false catch IO Exception e open Browser Error display e return false else final boolean result new boolean 1 Thread launcher new Thread Intro browser Launcher NON NLS 1 public void run try Process process do Open Browser local Href true if process null no browser already opened Launch new one process do Open Browser local Href false if process null result 0 false result 0 process exit Value 0 true false catch Exception e open Browser Error display e result 0 false private Process do Open Browser String href boolean remote throws Exception Process p null String web Browser try netscape first web Browser netscape NON NLS 1 String cmd create Command web Browser href remote try p Runtime get Runtime exec cmd catch IO Exception e command failed p null if p null remote int exit Code p wait For if exit Code 0 return p netscape failed Try mozilla web Browser mozilla NON NLS 1 cmd create Command web Browser href remote try p Runtime get Runtime exec cmd catch IO Exception e command failed p null if p null remote int exit Code p wait For if exit Code 0 return p all failed return null return null Create a command to launch the given browser with without remote control private String create Command String browser String href boolean remote String Buffer cmd new String Buffer browser if remote cmd append remote openURL NON NLS 1 cmd append href cmd append NON NLS 1 else cmd append NON NLS 1 cmd append href return cmd to String launcher start return result 0  openBrowser startsWith startsWith localHref getCurrent getPlatform localHref getRuntime localHref exitValue IOException openBrowserError doOpenBrowser localHref doOpenBrowser localHref exitValue openBrowserError doOpenBrowser webBrowser webBrowser createCommand webBrowser getRuntime IOException exitCode waitFor exitCode webBrowser createCommand webBrowser getRuntime IOException exitCode waitFor exitCode createCommand StringBuffer StringBuffer toString
display async Exec new Runnable public void run Dialog Util display Error Message display get Active Shell Intro Plugin get String Open Broswer failed To Launch e NON NLS 1  asyncExec DialogUtil displayErrorMessage getActiveShell IntroPlugin getString OpenBroswer failedToLaunch
Display an error message if opening an external browser failes private static void open Browser Error final Display display final Exception e display async Exec new Runnable public void run Dialog Util display Error Message display get Active Shell Intro Plugin get String Open Broswer failed To Launch e NON NLS 1  openBrowserError asyncExec DialogUtil displayErrorMessage getActiveShell IntroPlugin getString OpenBroswer failedToLaunch

Create a new Intro Descriptor for an extension public Intro Descriptor I Configuration Element config Element throws Core Exception this config Element config Element load From Extension  IntroDescriptor IntroDescriptor IConfigurationElement configElement CoreException configElement configElement loadFromExtension
load a intro descriptor from the registry private void load From Extension throws Core Exception id config Element get Attribute ATT ID plugin Id config Element get Declaring Extension get Namespace String class Name config Element get Attribute ATT CLASS icon Name config Element get Attribute ATT ICON Sanity check if class Name null throw new Core Exception new Status I Status ERROR config Element get Declaring Extension get Namespace 0 Invalid extension Missing class name id NON NLS 1 null  loadFromExtension CoreException configElement getAttribute ATT_ID pluginId configElement getDeclaringExtension getNamespace className configElement getAttribute ATT_CLASS iconName configElement getAttribute ATT_ICON className CoreException IStatus configElement getDeclaringExtension getNamespace
see org eclipse ui intro I Intro Descriptor create Intro public I Intro Part create Intro throws Core Exception return I Intro Part Workbench Plugin create Extension config Element ATT CLASS  IIntroDescriptor createIntro IIntroPart createIntro CoreException IIntroPart WorkbenchPlugin createExtension configElement ATT_CLASS
see org eclipse ui I Intro Descriptor get Id public String get Id return id  IIntroDescriptor getId getId
public Image Descriptor get Image Descriptor if image Descriptor null return image Descriptor if icon Name null return null I Extension extension config Element get Declaring Extension String extending Plugin Id extension get Namespace image Descriptor AbstractUI Plugin image Descriptor From Plugin extending Plugin Id icon Name return image Descriptor  ImageDescriptor getImageDescriptor imageDescriptor imageDescriptor iconName IExtension configElement getDeclaringExtension extendingPluginId getNamespace imageDescriptor AbstractUIPlugin imageDescriptorFromPlugin extendingPluginId iconName imageDescriptor
see org eclipse ui I Plugin Contribution get Local Id public String get Local Id return id  IPluginContribution getLocalId getLocalId
see org eclipse ui I Plugin Contribution get Plugin Id public String get Plugin Id return plugin Id  IPluginContribution getPluginId getPluginId pluginId

private Intro Messages no op  IntroMessages
param key return since 3 0 public static String get String String key try return RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException

Add a descriptor to this registry param descriptor the descriptor public void add I Intro Descriptor descriptor intros add descriptor  IIntroDescriptor
Add a binding between a product and an introduction param element the element to parse throws Core Exception if the binding could not be created public void add Binding I Configuration Element element throws Core Exception String intro Id element get Attribute ATT INTROID String product Id element get Attribute ATT PRODUCTID if intro Id null product Id null I Status status new Status I Status ERROR element get Declaring Extension get Namespace I Status ERROR intro Id and product Id must be defined new Illegal Argument Exception NON NLS 1 throw new Core Exception status if binding Map contains Key product Id I Status status new Status I Status WARNING element get Declaring Extension get Namespace I Status WARNING product Id already has an intro binding Omitting binding to intro Id new Illegal Argument Exception NON NLS 1 throw new Core Exception status binding Map put product Id intro Id  CoreException addBinding IConfigurationElement CoreException introId getAttribute ATT_INTROID productId getAttribute ATT_PRODUCTID introId productId IStatus IStatus getDeclaringExtension getNamespace IStatus introId productId IllegalArgumentException CoreException bindingMap containsKey productId IStatus IStatus getDeclaringExtension getNamespace IStatus productId introId IllegalArgumentException CoreException bindingMap productId introId
see org eclipse ui internal intro I Intro Registry get Intro Count public int get Intro Count return intros size  IIntroRegistry getIntroCount getIntroCount
see org eclipse ui internal intro I Intro Registry get Intros public I Intro Descriptor get Intros return I Intro Descriptor intros to Array new I Intro Descriptor intros size  IIntroRegistry getIntros IIntroDescriptor getIntros IIntroDescriptor toArray IIntroDescriptor
public I Intro Descriptor get Intro For Product String product Id I Intro Descriptor descriptor null String intro Id String binding Map get product Id if intro Id null I Intro Descriptor intro Descs get Intros for int i 0 i intro Descs length i if intro Descs i get Id equals intro Id descriptor intro Descs i break return descriptor  IIntroDescriptor getIntroForProduct productId IIntroDescriptor introId bindingMap productId introId IIntroDescriptor introDescs getIntros introDescs introDescs getId introId introDescs
public I Intro Descriptor get Intro String id for Iterator i intros iterator i has Next I Intro Descriptor desc I Intro Descriptor i next if desc get Id equals id return desc return null  IIntroDescriptor getIntro hasNext IIntroDescriptor IIntroDescriptor getId

public Intro Registry Reader super  IntroRegistryReader
protected boolean read Element I Configuration Element element if element get Name equals TAG INTRO read Intro element return true else if element get Name equals TAG INTROPRODUCTBINDING read Binding element return true return false  readElement IConfigurationElement getName TAG_INTRO readIntro getName TAG_INTROPRODUCTBINDING readBinding
Read binding information param element the configuration element to be read private void read Binding I Configuration Element element try intro Registry add Binding element catch Core Exception e log an error since its not safe to open a dialog here Workbench Plugin log Intro Messages get String Intro could not create binding e get Status NON NLS 1  readBinding IConfigurationElement introRegistry addBinding CoreException WorkbenchPlugin IntroMessages getString could_not_create_binding getStatus
Read introduction information param element the configuration element to read private void read Intro I Configuration Element element try I Intro Descriptor descriptor new Intro Descriptor element intro Registry add descriptor catch Core Exception e log an error since its not safe to open a dialog here Workbench Plugin log Intro Messages get String Intro could not create descriptor e get Status NON NLS 1  readIntro IConfigurationElement IIntroDescriptor IntroDescriptor introRegistry CoreException WorkbenchPlugin IntroMessages getString could_not_create_descriptor getStatus
Read all introdcution extensions from the registry param in the registry to read param out the registry to populate public void read Intros I Extension Registry in Intro Registry out intro Registry out read Registry in PlatformUI PLUGIN ID I Workbench Constants PL INTRO  readIntros IExtensionRegistry IntroRegistry introRegistry readRegistry PLUGIN_ID IWorkbenchConstants PL_INTRO

public interface I Object Action Contributor extends I Object Contributor Implement this method to add actions that deal with the currently selected object or objects Actions should be added to the provided menu object Current selection can be obtained from the given selection provider return code true code if any contributions were made and code false code otherwise  IObjectActionContributor IObjectContributor
Implement this method to add menus that deal with the currently selected object or objects Menus should be added to the provided menu object Current selection can be obtained from the given selection provider return code true code if any contributions were made and code false code otherwise 
Contribute to the list the action identifiers from other contributions that this contribution wants to override Actions of these identifiers will not be contributed 

public interface I Object Contributor Returns true if this contributor should be considered for the given object  IObjectContributor
public boolean is Applicable To Object object Return whether or not the receiver can adapt to I Resource public boolean can Adapt  isApplicableTo IResource canAdapt

public interface I Perspective Service Adds the given listener for a page s perspective lifecycle events Has no effect if an identical listener is already registered param listener a perspective listener  IPerspectiveService
return the active perspective descriptor or code null code if no perspective is currently active public I Perspective Descriptor get Active Perspective  IPerspectiveDescriptor getActivePerspective
public I Perspective Descriptor get Active Perspective Removes the given page s perspective listener Has no affect if an identical listener is not registered param listener a perspective listener  IPerspectiveDescriptor getActivePerspective

public interface I Window Trim Returns the control representing this trim widget or null if it has not yet been created return the control for the trim widget  IWindowTrim
Returns the set of sides that this trim can be docked onto return bitwise or of one or more of SWT TOP SWT BOTTOM SWT LEFT and SWT RIGHT 
Called to notify the trim object that it has been docked on the given side of the layout param drop Side param insertion Point  dropSide insertionPoint

Constructs a new instance of code Key Binding Service code on a given workbench site This instance is not nested param workbench Part Site The site for which this service will be responsible should not be code null code Key Binding Service I Workbench Part Site workbench Part Site this workbench Part Site null  KeyBindingService workbenchPartSite KeyBindingService IWorkbenchPartSite workbenchPartSite workbenchPartSite
Constructs a new instance of code Key Binding Service code on a given workbench site param workbench Part Site The site for which this service will be responsible should not be code null code param parent The parent key binding service if any code null code if none Key Binding Service I Workbench Part Site workbench Part Site Key Binding Service parent this workbench Part Site workbench Part Site this parent parent  KeyBindingService workbenchPartSite KeyBindingService IWorkbenchPartSite workbenchPartSite KeyBindingService workbenchPartSite workbenchPartSite
public boolean activate Key Binding Service I Workbench Site nested Site if disposed return false Check if we should do a deactivation if nested Site null We should do a deactivation if there is one active if active Service null There is no active service Do no work return false else Deactivate the currently active nested service deactivate Nested Service return true Attempt to activate a service final I Key Binding Service service I Key Binding Service nested Services get nested Site if service null return false if service active Service The service is already active return false deactivate Nested Service activate Nested Service service return true  activateKeyBindingService IWorkbenchSite nestedSite nestedSite activeService deactivateNestedService IKeyBindingService IKeyBindingService nestedServices nestedSite activeService deactivateNestedService activateNestedService
Activates the given service without worrying about the currently active service This goes through the work of adding all of the nested context ids as enabled submissions param service The service to become active if code null code then the reference to the active service is set to code null code but nothing else happens private final void activate Nested Service final I Key Binding Service service if disposed return If I have a parent and I m the active service then deactivate so that I can make changes boolean active false boolean have Parent parent null if have Parent active parent active Service this if active parent deactivate Nested Service Update the active service active Service service Check to see that the service isn t null if service null return if have Parent if active parent activate Nested Service this else if active Service instanceof Key Binding Service I have no parent so I can make the changes myself final Key Binding Service nested Service Key Binding Service active Service Update the contexts nested Enabled Submissions nested Service get Enabled Submissions normalize Sites nested Enabled Submissions Workbench get Instance get Context Support add Enabled Submissions nested Enabled Submissions Update the handlers nested Handler Submissions nested Service get Handler Submissions normalize Sites nested Handler Submissions Workbench get Instance get Command Support add Handler Submissions nested Handler Submissions  activateNestedService IKeyBindingService haveParent haveParent activeService deactivateNestedService activeService haveParent activateNestedService activeService KeyBindingService KeyBindingService nestedService KeyBindingService activeService nestedEnabledSubmissions nestedService getEnabledSubmissions normalizeSites nestedEnabledSubmissions getInstance getContextSupport addEnabledSubmissions nestedEnabledSubmissions nestedHandlerSubmissions nestedService getHandlerSubmissions normalizeSites nestedHandlerSubmissions getInstance getCommandSupport addHandlerSubmissions nestedHandlerSubmissions
Deactives the currently active service This nulls out the reference and removes all the enabled submissions for the nested service private final void deactivate Nested Service if disposed return Don t do anything if there is no active service if active Service null return Check to see if there is a parent boolean active false if parent null Check if I m the active service if parent active Service this active true Deactivate myself so I can make changes parent deactivate Nested Service else if active Service instanceof Key Binding Service Remove all the nested context ids Workbench get Instance get Context Support remove Enabled Submissions nested Enabled Submissions Remove all of the nested handler submissions The handlers here weren t created by this instance but by the nest instance and hence can t be disposed here Workbench get Instance get Command Support remove Handler Submissions nested Handler Submissions Clear our reference to the active service active Service null If necessary let my parent know that changes have occurred if active parent activate Nested Service this  deactivateNestedService activeService activeService deactivateNestedService activeService KeyBindingService getInstance getContextSupport removeEnabledSubmissions nestedEnabledSubmissions getInstance getCommandSupport removeHandlerSubmissions nestedHandlerSubmissions activeService activateNestedService
Disposes this key binding service This clears out all of the submissions held by this service and its nested services public void dispose if disposed deactivate Nested Service disposed true Workbench get Instance get Context Support remove Enabled Submissions new Array List enabled Submissions enabled Submissions clear Each removed handler submission must dispose its corresponding handler as these handlers only exist inside of this class final List submissions new Array List handler Submissions By Command Id values final Iterator submission Itr submissions iterator while submission Itr has Next Handler Submission submission Itr next get Handler dispose Workbench get Instance get Command Support remove Handler Submissions submissions handler Submissions By Command Id clear for Iterator iterator nested Services values iterator iterator has Next Key Binding Service key Binding Service Key Binding Service iterator next key Binding Service dispose nested Enabled Submissions null nested Handler Submissions null nested Services clear  deactivateNestedService getInstance getContextSupport removeEnabledSubmissions ArrayList enabledSubmissions enabledSubmissions ArrayList handlerSubmissionsByCommandId submissionItr submissionItr hasNext HandlerSubmission submissionItr getHandler getInstance getCommandSupport removeHandlerSubmissions handlerSubmissionsByCommandId nestedServices hasNext KeyBindingService keyBindingService KeyBindingService keyBindingService nestedEnabledSubmissions nestedHandlerSubmissions nestedServices
Gets a copy of all the enabled submissions in the nesting chain return All of the nested enabled submissions including the ones from this service This list may be empty but is never code null code private final List get Enabled Submissions if disposed return null final List submissions new Array List enabled Submissions if active Service instanceof Key Binding Service final Key Binding Service nested Service Key Binding Service active Service submissions add All nested Service get Enabled Submissions return submissions  getEnabledSubmissions ArrayList enabledSubmissions activeService KeyBindingService KeyBindingService nestedService KeyBindingService activeService addAll nestedService getEnabledSubmissions
Gets a copy of all the handler submissions in the nesting chain return All of the nested handler submissions including the ones from this service This list may be empty but is never code null code private final List get Handler Submissions if disposed return null final List submissions new Array List handler Submissions By Command Id values if active Service instanceof Key Binding Service final Key Binding Service nested Service Key Binding Service active Service submissions add All nested Service get Handler Submissions return submissions  getHandlerSubmissions ArrayList handlerSubmissionsByCommandId activeService KeyBindingService KeyBindingService nestedService KeyBindingService activeService addAll nestedService getHandlerSubmissions
public I Key Binding Service get Key Binding Service I Workbench Site nested Site if disposed return null if nested Site null return null I Key Binding Service service I Key Binding Service nested Services get nested Site if service null TODO the I Nested Key Binding Service API should be based on I Workbench Part Site if nested Site instanceof I Workbench Part Site service new Key Binding Service I Workbench Part Site nested Site this else service new Key Binding Service null this nested Services put nested Site service return service  IKeyBindingService getKeyBindingService IWorkbenchSite nestedSite nestedSite IKeyBindingService IKeyBindingService nestedServices nestedSite INestedKeyBindingService IWorkbenchPartSite nestedSite IWorkbenchPartSite KeyBindingService IWorkbenchPartSite nestedSite KeyBindingService nestedServices nestedSite
public String get Scopes if disposed return null Get the nested scopes if any final String nested Scopes if active Service null nested Scopes null else nested Scopes active Service get Scopes Build the list of active scopes final Set active Scopes new Hash Set active Scopes add All enabled Context Ids if nested Scopes null for int i 0 i nested Scopes length i active Scopes add nested Scopes i return String active Scopes to Array new String active Scopes size  getScopes nestedScopes activeService nestedScopes nestedScopes activeService getScopes activeScopes HashSet activeScopes addAll enabledContextIds nestedScopes nestedScopes activeScopes nestedScopes activeScopes toArray activeScopes
Replaces the active workbench site with this service s active workbench site This ensures that the context manager will recognize the context as active Note this method modifies the list in place it is em destructive em param submissions To Modify The submissions list to modify must not be code null code but may be empty private final void normalize Sites final List submissions To Modify if disposed return final int size submissions To Modify size for int i 0 i size i final Object submission submissions To Modify get i final Object replacement Submission if submission instanceof Enabled Submission final Enabled Submission enabled Submission Enabled Submission submission if workbench Part Site equals enabled Submission get Active Workbench Part Site replacement Submission new Enabled Submission null enabled Submission get Active Shell workbench Part Site enabled Submission get Context Id else replacement Submission enabled Submission else if submission instanceof Handler Submission final Handler Submission handler Submission Handler Submission submission if workbench Part Site equals handler Submission get Active Workbench Part Site replacement Submission new Handler Submission null handler Submission get Active Shell workbench Part Site handler Submission get Command Id handler Submission get Handler handler Submission get Priority else replacement Submission handler Submission else replacement Submission submission submissions To Modify set i replacement Submission  submissionsToModify normalizeSites submissionsToModify submissionsToModify submissionsToModify replacementSubmission EnabledSubmission EnabledSubmission enabledSubmission EnabledSubmission workbenchPartSite enabledSubmission getActiveWorkbenchPartSite replacementSubmission EnabledSubmission enabledSubmission getActiveShell workbenchPartSite enabledSubmission getContextId replacementSubmission enabledSubmission HandlerSubmission HandlerSubmission handlerSubmission HandlerSubmission workbenchPartSite handlerSubmission getActiveWorkbenchPartSite replacementSubmission HandlerSubmission handlerSubmission getActiveShell workbenchPartSite handlerSubmission getCommandId handlerSubmission getHandler handlerSubmission getPriority replacementSubmission handlerSubmission replacementSubmission submissionsToModify replacementSubmission
public void register Action I Action action if disposed return unregister Action action String command Id action get Action Definition Id if command Id null If I have a parent and I m active de activate myself while making changes boolean active false if parent null parent active Service this active true parent deactivate Nested Service Create the new submission I Handler handler new Action Handler action Handler Submission handler Submission new Handler Submission null workbench Part Site get Shell workbench Part Site command Id handler Priority MEDIUM handler Submissions By Command Id put command Id handler Submission Either submit the new handler myself or simply re activate if parent null if active parent activate Nested Service this else Workbench get Instance get Command Support add Handler Submission handler Submission  registerAction IAction unregisterAction commandId getActionDefinitionId commandId activeService deactivateNestedService IHandler ActionHandler HandlerSubmission handlerSubmission HandlerSubmission workbenchPartSite getShell workbenchPartSite commandId handlerSubmissionsByCommandId commandId handlerSubmission activateNestedService getInstance getCommandSupport addHandlerSubmission handlerSubmission
public boolean remove Key Binding Service I Workbench Site nested Site if disposed return false final I Key Binding Service service I Key Binding Service nested Services remove nested Site if service null return false if service equals active Service deactivate Nested Service return true  removeKeyBindingService IWorkbenchSite nestedSite IKeyBindingService IKeyBindingService nestedServices nestedSite activeService deactivateNestedService
public void set Scopes String scopes if disposed return Either deactivate myself or remove the previous submissions myself boolean active false if parent null parent active Service this active true parent deactivate Nested Service else Workbench get Instance get Context Support remove Enabled Submissions enabled Submissions enabled Submissions clear Determine the new list of submissions enabled Context Ids new Hash Set Arrays as List scopes for Iterator iterator enabled Context Ids iterator iterator has Next String context Id String iterator next enabled Submissions add new Enabled Submission null null workbench Part Site context Id Submit the new contexts myself or simply re active myself if parent null if active parent activate Nested Service this else Workbench get Instance get Context Support add Enabled Submissions enabled Submissions  setScopes activeService deactivateNestedService getInstance getContextSupport removeEnabledSubmissions enabledSubmissions enabledSubmissions enabledContextIds HashSet asList enabledContextIds hasNext contextId enabledSubmissions EnabledSubmission workbenchPartSite contextId activateNestedService getInstance getContextSupport addEnabledSubmissions enabledSubmissions
public void unregister Action I Action action if disposed return String command Id action get Action Definition Id if command Id null Deactivate this service while making changes boolean active false if parent null parent active Service this active true parent deactivate Nested Service Remove the current submission if any Handler Submission handler Submission Handler Submission handler Submissions By Command Id remove command Id Either activate this service again or remove the submission myself if handler Submission null if parent null if active parent activate Nested Service this else Workbench get Instance get Command Support remove Handler Submission handler Submission handler Submission get Handler dispose  unregisterAction IAction commandId getActionDefinitionId commandId activeService deactivateNestedService HandlerSubmission handlerSubmission HandlerSubmission handlerSubmissionsByCommandId commandId handlerSubmission activateNestedService getInstance getCommandSupport removeHandlerSubmission handlerSubmission handlerSubmission getHandler

see org eclipse ui keys Key Formatter format org eclipse ui keys Key Sequence public String format Key key String name key to String return Util translate String RESOURCE BUNDLE name name false false  KeyFormatter KeySequence toString translateString RESOURCE_BUNDLE
public String format Key Sequence key Sequence String Buffer string Buffer new String Buffer Iterator key Stroke Itr key Sequence get Key Strokes iterator while key Stroke Itr has Next string Buffer append format Key Stroke key Stroke Itr next if key Stroke Itr has Next string Buffer append get Key Stroke Delimiter return string Buffer to String  KeySequence keySequence StringBuffer stringBuffer StringBuffer keyStrokeItr keySequence getKeyStrokes keyStrokeItr hasNext stringBuffer KeyStroke keyStrokeItr keyStrokeItr hasNext stringBuffer getKeyStrokeDelimiter stringBuffer toString
public String format Key Stroke key Stroke String key Delimiter get Key Delimiter Format the modifier keys in sorted order Sorted Set modifier Keys new Tree Set get Modifier Key Comparator modifier Keys add All key Stroke get Modifier Keys String Buffer string Buffer new String Buffer Iterator modifier Key Itr modifier Keys iterator while modifier Key Itr has Next string Buffer append format Modifier Key modifier Key Itr next string Buffer append key Delimiter Format the natural key if any Natural Key natural Key key Stroke get Natural Key if natural Key null string Buffer append format natural Key return string Buffer to String  KeyStroke keyStroke keyDelimiter getKeyDelimiter SortedSet modifierKeys TreeSet getModifierKeyComparator modifierKeys addAll keyStroke getModifierKeys StringBuffer stringBuffer StringBuffer modifierKeyItr modifierKeys modifierKeyItr hasNext stringBuffer ModifierKey modifierKeyItr stringBuffer keyDelimiter NaturalKey naturalKey keyStroke getNaturalKey naturalKey stringBuffer naturalKey stringBuffer toString
An accessor for the delimiter you wish to use between keys This is used by the default format implementations to determine the key delimiter return The delimiter to use between keys should not be code null code 
An accessor for the delimiter you wish to use between key strokes This used by the default format implementations to determine the key stroke delimiter return The delimiter to use between key strokes should not be code null code 
An accessor for the comparator to use for sorting modifier keys This is used by the default format implementations to sort the modifier keys before formatting them into a string return The comparator to use to sort modifier keys must not be code null code 

public int compare Object left Object right Modifier Key modifier Key Left Modifier Key left Modifier Key modifier Key Right Modifier Key right int modifier Key Left Rank rank modifier Key Left int modifier Key Right Rank rank modifier Key Right if modifier Key Left Rank modifier Key Right Rank return modifier Key Left Rank modifier Key Right Rank else return modifier Key Left compare To modifier Key Right  ModifierKey modifierKeyLeft ModifierKey ModifierKey modifierKeyRight ModifierKey modifierKeyLeftRank modifierKeyLeft modifierKeyRightRank modifierKeyRight modifierKeyLeftRank modifierKeyRightRank modifierKeyLeftRank modifierKeyRightRank modifierKeyLeft compareTo modifierKeyRight
protected abstract int rank Modifier Key modifier Key  ModifierKey modifierKey

public int compare Object left Object right Modifier Key modifier Key Left Modifier Key left Modifier Key modifier Key Right Modifier Key right return modifier Key Left to String compare To modifier Key Right to String  ModifierKey modifierKeyLeft ModifierKey ModifierKey modifierKeyRight ModifierKey modifierKeyLeft toString compareTo modifierKeyRight toString

Constructs a new instance of code Cancel On Modify Listener code param listener The listener which should be removed in the event of a modification event arriving should not be code null code Cancel On Modify Listener Listener listener chained Listener listener  CancelOnModifyListener CancelOnModifyListener chainedListener
public void handle Event Event event Widget widget event widget widget remove Listener SWT Modify this widget remove Listener SWT Key Down chained Listener  handleEvent removeListener removeListener KeyDown chainedListener

public String format Key Sequence key Sequence String Buffer string Buffer new String Buffer List key Strokes key Sequence get Key Strokes Key Stroke key Stroke Array Key Stroke key Strokes to Array new Key Stroke key Strokes size Set previous Modifier Keys Collections EMPTY SET List natural Keys new Array List for int i 0 i key Stroke Array length i Key Stroke key Stroke key Stroke Array i Set current Modifier Keys key Stroke get Modifier Keys if previous Modifier Keys equals current Modifier Keys End the old sequence fragment if i 0 string Buffer append format Key Strokes previous Modifier Keys natural Keys string Buffer append get Key Stroke Delimiter Start a new one previous Modifier Keys current Modifier Keys natural Keys clear natural Keys add key Stroke get Natural Key string Buffer append format Key Strokes previous Modifier Keys natural Keys return string Buffer to String  KeySequence keySequence StringBuffer stringBuffer StringBuffer keyStrokes keySequence getKeyStrokes KeyStroke keyStrokeArray KeyStroke keyStrokes toArray KeyStroke keyStrokes previousModifierKeys EMPTY_SET naturalKeys ArrayList keyStrokeArray KeyStroke keyStroke keyStrokeArray currentModifierKeys keyStroke getModifierKeys previousModifierKeys currentModifierKeys stringBuffer formatKeyStrokes previousModifierKeys naturalKeys stringBuffer getKeyStrokeDelimiter previousModifierKeys currentModifierKeys naturalKeys naturalKeys keyStroke getNaturalKey stringBuffer formatKeyStrokes previousModifierKeys naturalKeys stringBuffer toString
public String format Key Strokes Set modifier Keys List natural Keys String Buffer string Buffer new String Buffer String key Delimiter get Key Delimiter Format the modifier keys in sorted order Sorted Set sorted Modifier Keys new Tree Set get Modifier Key Comparator sorted Modifier Keys add All modifier Keys Iterator sorted Modifier Key Itr sorted Modifier Keys iterator while sorted Modifier Key Itr has Next string Buffer append format Modifier Key sorted Modifier Key Itr next string Buffer append key Delimiter Format the natural key if any Iterator natural Key Itr natural Keys iterator while natural Key Itr has Next Object natural Key natural Key Itr next if natural Key instanceof Natural Key string Buffer append format Natural Key natural Key if natural Key Itr has Next string Buffer append key Delimiter return string Buffer to String  formatKeyStrokes modifierKeys naturalKeys StringBuffer stringBuffer StringBuffer keyDelimiter getKeyDelimiter SortedSet sortedModifierKeys TreeSet getModifierKeyComparator sortedModifierKeys addAll modifierKeys sortedModifierKeyItr sortedModifierKeys sortedModifierKeyItr hasNext stringBuffer ModifierKey sortedModifierKeyItr stringBuffer keyDelimiter naturalKeyItr naturalKeys naturalKeyItr hasNext naturalKey naturalKeyItr naturalKey NaturalKey stringBuffer NaturalKey naturalKey naturalKeyItr hasNext stringBuffer keyDelimiter stringBuffer toString

Formats an individual key into a human readable format This converts the key into a format similar to Xemacs param key The key to format must not be code null code return The key formatted as a string should not be code null code public String format Key key if key instanceof Modifier Key String formatted Name Util translate String RESOURCE BUNDLE key to String null false false if formatted Name null return formatted Name return super format key to Lower Case  ModifierKey formattedName translateString RESOURCE_BUNDLE toString formattedName formattedName toLowerCase
protected String get Key Delimiter return Util translate String RESOURCE BUNDLE KEY DELIMITER KEY Key Stroke KEY DELIMITER false false  getKeyDelimiter translateString RESOURCE_BUNDLE KEY_DELIMITER_KEY KeyStroke KEY_DELIMITER
protected String get Key Stroke Delimiter return Util translate String RESOURCE BUNDLE KEY STROKE DELIMITER KEY Key Sequence KEY STROKE DELIMITER false false  getKeyStrokeDelimiter translateString RESOURCE_BUNDLE KEY_STROKE_DELIMITER_KEY KeySequence KEY_STROKE_DELIMITER
see org eclipse ui keys Abstract Key Formatter get Modifier Key Comparator protected Comparator get Modifier Key Comparator return EMACS MODIFIER KEY COMPARATOR  AbstractKeyFormatter getModifierKeyComparator getModifierKeyComparator EMACS_MODIFIER_KEY_COMPARATOR

see org eclipse ui keys Key Formatter format org eclipse ui keys Key Sequence public String format Key key return key to String  KeyFormatter KeySequence toString
see org eclipse ui keys Abstract Key Formatter get Key Delimiter protected String get Key Delimiter return Key Stroke KEY DELIMITER  AbstractKeyFormatter getKeyDelimiter getKeyDelimiter KeyStroke KEY_DELIMITER
see org eclipse ui keys Abstract Key Formatter get Key Stroke Delimiter protected String get Key Stroke Delimiter return Key Sequence KEY STROKE DELIMITER  AbstractKeyFormatter getKeyStrokeDelimiter getKeyStrokeDelimiter KeySequence KEY_STROKE_DELIMITER
see org eclipse ui keys Abstract Key Formatter get Modifier Key Comparator protected Comparator get Modifier Key Comparator return FORMAL MODIFIER KEY COMPARATOR  AbstractKeyFormatter getModifierKeyComparator getModifierKeyComparator FORMAL_MODIFIER_KEY_COMPARATOR

protected int rank Modifier Key modifier Key if Modifier Key SHIFT equals modifier Key return 0 if Modifier Key CTRL equals modifier Key return 1 if Modifier Key ALT equals modifier Key return 2 return Integer MAX VALUE  ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey MAX_VALUE
protected String get Key Delimiter return Util translate String RESOURCE BUNDLE KEY DELIMITER KEY Key Stroke KEY DELIMITER false false  getKeyDelimiter translateString RESOURCE_BUNDLE KEY_DELIMITER_KEY KeyStroke KEY_DELIMITER
protected String get Key Stroke Delimiter return Util translate String RESOURCE BUNDLE KEY STROKE DELIMITER KEY Key Sequence KEY STROKE DELIMITER false false  getKeyStrokeDelimiter translateString RESOURCE_BUNDLE KEY_STROKE_DELIMITER_KEY KeySequence KEY_STROKE_DELIMITER
protected Comparator get Modifier Key Comparator return MODIFIER KEY COMPARATOR  getModifierKeyComparator MODIFIER_KEY_COMPARATOR

protected int rank Modifier Key modifier Key if Modifier Key ALT equals modifier Key return 0 if Modifier Key CTRL equals modifier Key return 1 if Modifier Key SHIFT equals modifier Key return 2 return Integer MAX VALUE  ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey MAX_VALUE
protected String get Key Delimiter return Util translate String RESOURCE BUNDLE KEY DELIMITER KEY Key Stroke KEY DELIMITER false false  getKeyDelimiter translateString RESOURCE_BUNDLE KEY_DELIMITER_KEY KeyStroke KEY_DELIMITER
protected String get Key Stroke Delimiter return Util translate String RESOURCE BUNDLE KEY STROKE DELIMITER KEY Key Sequence KEY STROKE DELIMITER false false  getKeyStrokeDelimiter translateString RESOURCE_BUNDLE KEY_STROKE_DELIMITER_KEY KeySequence KEY_STROKE_DELIMITER
protected Comparator get Modifier Key Comparator return MODIFIER KEY COMPARATOR  getModifierKeyComparator MODIFIER_KEY_COMPARATOR

Constructs a new instance of code Key Binding State code with an empty key sequence set to reset fully param workbench To Notify The workbench that this state should keep advised of changes to the key binding state must not be code null code Key Binding State I Workbench workbench To Notify current Sequence Key Sequence get Instance workbench workbench To Notify associated Window workbench get Active Workbench Window  KeyBindingState workbenchToNotify KeyBindingState IWorkbench workbenchToNotify currentSequence KeySequence getInstance workbenchToNotify associatedWindow getActiveWorkbenchWindow
An accessor for the workbench window associated with this state This should never be code null code as the setting follows the last workbench window to have focus return The workbench window to which the key binding architecture is currently attached should never be code null code I Workbench Window get Associated Window return associated Window  IWorkbenchWindow getAssociatedWindow associatedWindow
An accessor for the current key sequence waiting for completion return The current incomplete key sequence never code null code but may be empty Key Sequence get Current Sequence return current Sequence  KeySequence getCurrentSequence currentSequence
Gets the status line contribution item which the key binding architecture uses to keep the user up to date as to the current state return The status line contribution item if any code null code if none Status Line Contribution Item get Status Line if associated Window instanceof Workbench Window Workbench Window window Workbench Window associated Window I Status Line Manager status Line window get Status Line Manager TODO implicit dependency on IDE s action builder issue implicit dependency on IDE s action builder if status Line null this can be null if we re exiting I Contribution Item item status Line find Mode Contribution Item NON NLS 1 if item instanceof Status Line Contribution Item return Status Line Contribution Item item return null  StatusLineContributionItem getStatusLine associatedWindow WorkbenchWindow WorkbenchWindow WorkbenchWindow associatedWindow IStatusLineManager statusLine getStatusLineManager statusLine IContributionItem statusLine ModeContributionItem StatusLineContributionItem StatusLineContributionItem
p Resets the state based on the current properties If the state is to collapse fully or if there are no key strokes then it sets the state to have an empty key sequence Otherwise it leaves the first key stroke in the sequence p p The workbench s status lines are updated if appropriate p void reset current Sequence Key Sequence get Instance update Status Lines  currentSequence KeySequence getInstance updateStatusLines
A mutator for the workbench window to which this state is associated param window The workbench window to associated should never be code null code void set Associated Window I Workbench Window window associated Window window  setAssociatedWindow IWorkbenchWindow associatedWindow
A mutator for the partial sequence entered by the user param sequence The current key sequence should not be code null code but may be empty void set Current Sequence Key Sequence sequence current Sequence sequence update Status Lines  setCurrentSequence KeySequence currentSequence updateStatusLines
Updates the text of the status line of the associated shell with the current sequence private void update Status Lines Status Line Contribution Item status Line get Status Line if status Line null status Line set Text get Current Sequence format  updateStatusLines StatusLineContributionItem statusLine getStatusLine statusLine statusLine setText getCurrentSequence

Resets the insertion index to point nowhere In other words it is set to code 1 code void clear Insertion Index insertion Index 1  clearInsertionIndex insertionIndex
Deletes the current selection If there is no selection then it deletes the last key stroke param key Strokes The key strokes from which to delete This list must not be code null code and must represent a valid key sequence private void delete Key Stroke List key Strokes clear Insertion Index if has Selection Delete the current selection disallowing incomplete strokes in the middle of the sequence delete Selection key Strokes false else Remove the last key stroke if key Strokes is Empty key Strokes remove key Strokes size 1  keyStrokes deleteKeyStroke keyStrokes clearInsertionIndex hasSelection deleteSelection keyStrokes keyStrokes isEmpty keyStrokes keyStrokes
Handles the key pressed and released events on the wrapped text widget This makes sure to either add the pressed key to the temporary key stroke or complete the current temporary key stroke and prompt for the next In the case of a key release this makes sure that the temporary stroke is correctly displayed corresponding with modifier keys that may have been released param event The triggering event must not be code null code public void handle Event Event event List key Strokes new Array List get Key Sequence get Key Strokes Dispatch the event to the correct handler if event type SWT Key Down handle Key Down event key Strokes else if event type SWT Key Up handle Key Up event key Strokes Update the underlying widget set Key Sequence Key Sequence get Instance key Strokes Prevent the event from reaching the widget event doit false  handleEvent keyStrokes ArrayList getKeySequence getKeyStrokes KeyDown handleKeyDown keyStrokes KeyUp handleKeyUp keyStrokes setKeySequence KeySequence getInstance keyStrokes
Handles the case where the key event is an code SWT Key Down code event This either causes a deletion if it is an unmodified backspace key stroke or an insertion if it is any other key param event The trigger key down event must not be code null code param key Strokes The current list of key strokes This valud must not be code null code and it must represent a valid key sequence private void handle Key Down Event event List key Strokes Is it an unmodified backspace character if event character SWT BS event state Mask 0 delete Key Stroke key Strokes else insert Key Stroke event key Strokes  KeyDown keyStrokes handleKeyDown keyStrokes stateMask deleteKeyStroke keyStrokes insertKeyStroke keyStrokes
Handles the case where the key event is an code SWT Key Up code event This resets the insertion index If there is an incomplete stroke then that incomplete stroke is modified to match the keys that are still held If no keys are held then the incomplete stroke is removed param event The triggering event must not be code null code param key Strokes The key strokes that are part of the current key sequence these key strokes are guaranteed to represent a valid key sequence This valud must not be code null code private void handle Key Up Event event List key Strokes if has Incomplete Stroke Figure out the SWT integer representation of the remaining values Event mock Event new Event if event key Code SWT MODIFIER MASK 0 This key up is a modifier key being released mock Event state Mask event state Mask event key Code else This key up is the other end of a key down that was trapped by the operating system or window manager mock Event state Mask event state Mask Get a reasonable facsimile of the stroke that is still pressed int key SWT Key Support convert Event To Unmodified Accelerator mock Event Key Stroke remaining Stroke SWT Key Support convert Accelerator To Key Stroke key if key Strokes is Empty key Strokes remove key Strokes size 1 if remaining Stroke get Modifier Keys is Empty key Strokes add remaining Stroke  KeyUp keyStrokes handleKeyUp keyStrokes hasIncompleteStroke mockEvent keyCode MODIFIER_MASK mockEvent stateMask stateMask keyCode mockEvent stateMask stateMask SWTKeySupport convertEventToUnmodifiedAccelerator mockEvent KeyStroke remainingStroke SWTKeySupport convertAcceleratorToKeyStroke keyStrokes isEmpty keyStrokes keyStrokes remainingStroke getModifierKeys isEmpty keyStrokes remainingStroke
p Handles the case where a key down event is leading to a key stroke being inserted The current selection is deleted and an invalid remanents of the stroke are also removed The insertion is carried out at the cursor position p p If only a natural key is selected as part of a larger key stroke then it is possible for the user to press a natural key to replace the old natural key In this situation pressing any modifier keys will replace the whole thing p p If the insertion point is not at the end of the sequence then incomplete strokes will not be immediately inserted Only when the sequence is completed is the stroke inserted This is a requirement as the widget must always represent a valid key sequence The insertion point is tracked using code insertion Index code which is an index into the key stroke array p param event The triggering key down event must not be code null code param key Strokes The key strokes into which the current stroke should be inserted This value must not be code null code and must represent a valid key sequence private void insert Key Stroke Event event List key Strokes Compute the key stroke to insert int key SWT Key Support convert Event To Unmodified Accelerator event Key Stroke stroke SWT Key Support convert Accelerator To Key Stroke key Only insert the stroke if it is not Scroll Lock Let s not get silly if Special Key NUM LOCK equals stroke get Natural Key Special Key CAPS LOCK equals stroke get Natural Key Special Key SCROLL LOCK equals stroke get Natural Key return if insertion Index 1 There is a previous replacement still going on if stroke is Complete insert Stroke At key Strokes stroke insertion Index clear Insertion Index else if has Selection There is a selection that needs to be replaced insertion Index delete Selection key Strokes stroke is Complete if stroke is Complete insertion Index key Strokes size insert Stroke At key Strokes stroke insertion Index clear Insertion Index else No selection so remove the incomplete stroke if any if has Incomplete Stroke key Strokes is Empty key Strokes remove key Strokes size 1 And then add the new stroke if key Strokes is Empty insertion Index key Strokes size is Cursor In Last Position insert Stroke At key Strokes stroke key Strokes size clear Insertion Index else I m just getting the insertion Index here No actual deletion should occur insertion Index delete Selection key Strokes stroke is Complete if stroke is Complete insert Stroke At key Strokes stroke insertion Index clear Insertion Index  insertionIndex keyStrokes insertKeyStroke keyStrokes SWTKeySupport convertEventToUnmodifiedAccelerator KeyStroke SWTKeySupport convertAcceleratorToKeyStroke ScrollLock SpecialKey NUM_LOCK getNaturalKey SpecialKey CAPS_LOCK getNaturalKey SpecialKey SCROLL_LOCK getNaturalKey insertionIndex isComplete insertStrokeAt keyStrokes insertionIndex clearInsertionIndex hasSelection insertionIndex deleteSelection keyStrokes isComplete isComplete insertionIndex keyStrokes insertStrokeAt keyStrokes insertionIndex clearInsertionIndex hasIncompleteStroke keyStrokes isEmpty keyStrokes keyStrokes keyStrokes isEmpty insertionIndex keyStrokes isCursorInLastPosition insertStrokeAt keyStrokes keyStrokes clearInsertionIndex insertionIndex insertionIndex deleteSelection keyStrokes isComplete isComplete insertStrokeAt keyStrokes insertionIndex clearInsertionIndex
private class Traversal Filter implements Listener Handles the traverse event on the text field wrapped by this class It swallows all traverse events example for tab and arrow key navigation The other forms of navigation can be reached by tabbing off of the control param event The trigger event must not be code null code public void handle Event Event event switch event detail case SWT TRAVERSE ESCAPE case SWT TRAVERSE MNEMONIC case SWT TRAVERSE NONE case SWT TRAVERSE PAGE NEXT case SWT TRAVERSE PAGE PREVIOUS case SWT TRAVERSE RETURN event type SWT None event doit false break case SWT TRAVERSE TAB NEXT case SWT TRAVERSE TAB PREVIOUS Check if modifiers other than just Shift were down if event state Mask SWT MODIFIER MASK SWT SHIFT 0 Modifiers other than shift were down event type SWT None event doit false break fall through either no modifiers or just shift case SWT TRAVERSE ARROW NEXT case SWT TRAVERSE ARROW PREVIOUS default Let the traversal happen but clear the incomplete stroke if has Incomplete Stroke List key Strokes new Array List get Key Sequence get Key Strokes if key Strokes is Empty key Strokes remove key Strokes size 1 set Key Sequence Key Sequence get Instance key Strokes  TraversalFilter handleEvent TRAVERSE_ESCAPE TRAVERSE_MNEMONIC TRAVERSE_NONE TRAVERSE_PAGE_NEXT TRAVERSE_PAGE_PREVIOUS TRAVERSE_RETURN TRAVERSE_TAB_NEXT TRAVERSE_TAB_PREVIOUS stateMask MODIFIER_MASK TRAVERSE_ARROW_NEXT TRAVERSE_ARROW_PREVIOUS hasIncompleteStroke keyStrokes ArrayList getKeySequence getKeyStrokes keyStrokes isEmpty keyStrokes keyStrokes setKeySequence KeySequence getInstance keyStrokes
Attaches the global traversal filter param event Ignored public void focus Gained Focus Event event Display get Current add Filter SWT Traverse filter  focusGained FocusEvent getCurrent addFilter
Detaches the global traversal filter param event Ignored public void focus Lost Focus Event event Display get Current remove Filter SWT Traverse filter  focusLost FocusEvent getCurrent removeFilter
private class Update Sequence Listener implements Modify Listener Handles the modify event on the underlying text widget param event The triggering event ignored public void modify Text Modify Event event try The original sequence Key Sequence original Sequence get Key Sequence The new sequence drawn from the text String contents get Text Key Sequence new Sequence Key Sequence get Instance contents Check to see if they re the same if original Sequence equals new Sequence set Key Sequence new Sequence catch Parse Exception e Abort any cut paste driven modifications set Key Sequence get Key Sequence  UpdateSequenceListener ModifyListener modifyText ModifyEvent KeySequence originalSequence getKeySequence getText KeySequence newSequence KeySequence getInstance originalSequence newSequence setKeySequence newSequence ParseException setKeySequence getKeySequence
Constructs an instance of code Key Sequence Text Field code with the text field to use If the platform is carbon MacOS X then the font is set to be the same font used to display accelerators in the menus param wrapped Text The text widget to wrap must not be code null code public Key Sequence Text Text wrapped Text text wrapped Text Set the font if the platform is carbon if carbon equals SWT get Platform NON NLS 1 Don t worry about this font name here it is the official menu font and point size on the Mac final Font font new Font text get Display Lucida Grande 13 SWT NORMAL NON NLS 1 text set Font font text add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e font dispose Add the key listener text add Listener SWT Key Up key Filter text add Listener SWT Key Down key Filter Add the focus listener that attaches the global traversal filter text add Focus Listener new Traversal Filter Manager Add an internal modify listener text add Modify Listener update Sequence Listener  KeySequenceTextField wrappedText KeySequenceText wrappedText wrappedText getPlatform getDisplay setFont addDisposeListener DisposeListener widgetDisposed DisposeEvent addListener KeyUp keyFilter addListener KeyDown keyFilter addFocusListener TraversalFilterManager addModifyListener updateSequenceListener
Clears the text field and resets all the internal values public void clear key Sequence Key Sequence get Instance text set Text EMPTY STRING  keySequence KeySequence getInstance setText EMPTY_STRING
Removes the key strokes from the list corresponding the selection If code allow Incomplete code then invalid key sequences will be allowed i e those with incomplete strokes in the non terminal position Otherwise incomplete strokes will be removed This modifies code key Strokes code in place and has no effect on the text widget this class wraps param key Strokes The list of key strokes from which the selection should be removed must not be code null code param allow Incomplete Whether incomplete strokes should be allowed to exist in the list after the deletion return The index at which a subsequent insert should occur This index only has meaning to the code insert Stroke At code method private int delete Selection List key Strokes boolean allow Incomplete Get the current selection Point selection text get Selection int start selection x int end selection y Using the key sequence format method discover the point at which adding key strokes passes or equals the start of the selection In other words find the first stroke that is part of the selection Keep track of the text range under which the stroke appears i e start Text Index string length is the first selected stroke String string new String List current Strokes new Array List Iterator key Stroke Itr key Strokes iterator int start Text Index 0 keeps track of the start of the stroke while string length start key Stroke Itr has Next start Text Index string length current Strokes add key Stroke Itr next string Key Sequence get Instance current Strokes format If string length start then the cursor is positioned between strokes i e selection is outside of a stroke int start Stroke Index if string length start start Stroke Index current Strokes size else start Stroke Index current Strokes size 1 Check to see if the cursor is only positioned rather than actually selecting something We only need to compute the end if there is a selection int end Stroke Index if start end return start Stroke Index else while string length end key Stroke Itr has Next current Strokes add key Stroke Itr next string Key Sequence get Instance current Strokes format end Stroke Index current Strokes size 1 if end Stroke Index 0 end Stroke Index 0 Remove the strokes that are touched by the selection Keep track of the first stroke removed Key Stroke start Stroke Key Stroke key Strokes get start Stroke Index while start Stroke Index end Stroke Index key Strokes remove start Stroke Index end Stroke Index Allow the first stroke removed to be replaced by an incomplete stroke if allow Incomplete Sorted Set modifier Keys new Tree Set start Stroke get Modifier Keys Key Stroke incomplete Stroke Key Stroke get Instance modifier Keys null int incomplete Stroke Length incomplete Stroke format length if start Text Index incomplete Stroke Length start key Strokes add start Stroke Index incomplete Stroke return start Stroke Index  allowIncomplete keyStrokes keyStrokes allowIncomplete insertStrokeAt deleteSelection keyStrokes allowIncomplete getSelection startTextIndex currentStrokes ArrayList keyStrokeItr keyStrokes startTextIndex keyStrokeItr hasNext startTextIndex currentStrokes keyStrokeItr KeySequence getInstance currentStrokes startStrokeIndex startStrokeIndex currentStrokes startStrokeIndex currentStrokes endStrokeIndex startStrokeIndex keyStrokeItr hasNext currentStrokes keyStrokeItr KeySequence getInstance currentStrokes endStrokeIndex currentStrokes endStrokeIndex endStrokeIndex KeyStroke startStroke KeyStroke keyStrokes startStrokeIndex startStrokeIndex endStrokeIndex keyStrokes startStrokeIndex endStrokeIndex allowIncomplete SortedSet modifierKeys TreeSet startStroke getModifierKeys KeyStroke incompleteStroke KeyStroke getInstance modifierKeys incompleteStrokeLength incompleteStroke startTextIndex incompleteStrokeLength keyStrokes startStrokeIndex incompleteStroke startStrokeIndex
An accessor for the code Key Sequence code that corresponds to the current state of the text field This includes incomplete strokes return The key sequence representation never code null code public Key Sequence get Key Sequence return key Sequence  KeySequence KeySequence getKeySequence keySequence
An accessor for the underlying text widget s contents return The text contents of this entry never code null code private String get Text return text get Text  getText getText
Tests whether the current key sequence has a stroke with no natural key return code true code is there is an incomplete stroke code false code otherwise private boolean has Incomplete Stroke return key Sequence is Complete  hasIncompleteStroke keySequence isComplete
Tests whether the current text widget has some text selection param code true code if the number of selected characters it greater than zero code false code otherwise private boolean has Selection return text get Selection Count 0  hasSelection getSelectionCount
Inserts the key stroke at the current insertion point This does a regular delete and insert as if the key had been pressed param stroke The key stroke to insert must not be code null code public void insert Key Stroke stroke if stroke is Complete return Copy the key strokes in the current key sequence List key Strokes new Array List get Key Sequence get Key Strokes if has Incomplete Stroke key Strokes is Empty key Strokes remove key Strokes size 1 int index delete Selection key Strokes false insert Stroke At key Strokes stroke index key Filter clear Insertion Index set Key Sequence Key Sequence get Instance key Strokes  KeyStroke isComplete keyStrokes ArrayList getKeySequence getKeyStrokes hasIncompleteStroke keyStrokes isEmpty keyStrokes keyStrokes deleteSelection keyStrokes insertStrokeAt keyStrokes keyFilter clearInsertionIndex setKeySequence KeySequence getInstance keyStrokes
Inserts the stroke at the given index in the list of strokes If the stroke currently at that index is incomplete then it tries to merge the two strokes If merging is a complete failure unlikely then it will simply overwrite the incomplete stroke If the stroke at the index is complete then it simply inserts the stroke independently param key Strokes The list of key strokes in which the key stroke should be appended must not be code null code param stroke The stroke to insert should not be code null code param index The index at which to insert must be a valid index into the list of key strokes private void insert Stroke At List key Strokes Key Stroke stroke int index Key Stroke current Stroke index key Strokes size null Key Stroke key Strokes get index if current Stroke null current Stroke is Complete Sorted Set modifier Keys new Tree Set current Stroke get Modifier Keys Natural Key natural Key stroke get Natural Key modifier Keys add All stroke get Modifier Keys key Strokes remove index key Strokes add index Key Stroke get Instance modifier Keys natural Key else key Strokes add index stroke  keyStrokes insertStrokeAt keyStrokes KeyStroke KeyStroke currentStroke keyStrokes KeyStroke keyStrokes currentStroke currentStroke isComplete SortedSet modifierKeys TreeSet currentStroke getModifierKeys NaturalKey naturalKey getNaturalKey modifierKeys addAll getModifierKeys keyStrokes keyStrokes KeyStroke getInstance modifierKeys naturalKey keyStrokes
Tests whether the cursor is in the last position This means that the selection extends to the last position return code true code if the selection extends to the last position code false code otherwise private boolean is Cursor In Last Position return text get Selection y get Text length  isCursorInLastPosition getSelection getText
p A mutator for the key sequence stored within this widget The text and caret position are updated p p All sequences are limited to max Strokes number of strokes in length If there are already that number of strokes then it does not show incomplete strokes and does not keep track of them p param new Key Sequence The new key sequence for this widget may be code null code if none public void set Key Sequence Key Sequence new Key Sequence key Sequence new Key Sequence Trim any extra strokes if max Strokes INFINITE List key Strokes new Array List key Sequence get Key Strokes int key Strokes Size key Strokes size for int i key Strokes Size 1 i max Strokes i key Strokes remove i key Sequence Key Sequence get Instance key Strokes Check to see if the text has changed String current String get Text String new String key Sequence format if current String equals new String We need to update the text text remove Modify Listener update Sequence Listener text set Text key Sequence format text add Modify Listener update Sequence Listener text set Selection get Text length  maxStrokes newKeySequence setKeySequence KeySequence newKeySequence keySequence newKeySequence maxStrokes keyStrokes ArrayList keySequence getKeyStrokes keyStrokesSize keyStrokes keyStrokesSize maxStrokes keyStrokes keySequence KeySequence getInstance keyStrokes currentString getText newString keySequence currentString newString removeModifyListener updateSequenceListener setText keySequence addModifyListener updateSequenceListener setSelection getText
Returns the maximum number of strokes that are permitted in this widget at one time return The maximum number of strokes will be a positive integer or code INFINITE code public int get Key Stroke Limit return max Strokes  getKeyStrokeLimit maxStrokes
A mutator for the maximum number of strokes that are permitted in this widget at one time param key Stroke Limit The maximum number of strokes must be a positive integer or code INFINITE code public void set Key Stroke Limit int key Stroke Limit if key Stroke Limit 0 key Stroke Limit INFINITE this max Strokes key Stroke Limit else throw new Illegal Argument Exception Make sure we are obeying the new limit set Key Sequence get Key Sequence  keyStrokeLimit setKeyStrokeLimit keyStrokeLimit keyStrokeLimit keyStrokeLimit maxStrokes keyStrokeLimit IllegalArgumentException setKeySequence getKeySequence

protected int rank Modifier Key modifier Key if Modifier Key SHIFT equals modifier Key return 0 if Modifier Key CTRL equals modifier Key return 1 if Modifier Key ALT equals modifier Key return 2 if Modifier Key COMMAND equals modifier Key return 3 return Integer MAX VALUE  ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey MAX_VALUE
public String format Key key String string String KEY LOOKUP get key to String return string null string super format key  KEY_LOOKUP toString
protected String get Key Delimiter return Util translate String RESOURCE BUNDLE KEY DELIMITER KEY Util ZERO LENGTH STRING false false  getKeyDelimiter translateString RESOURCE_BUNDLE KEY_DELIMITER_KEY ZERO_LENGTH_STRING
protected String get Key Stroke Delimiter return Util translate String RESOURCE BUNDLE KEY STROKE DELIMITER KEY Key Sequence KEY STROKE DELIMITER false false  getKeyStrokeDelimiter translateString RESOURCE_BUNDLE KEY_STROKE_DELIMITER_KEY KeySequence KEY_STROKE_DELIMITER
protected Comparator get Modifier Key Comparator return MODIFIER KEY COMPARATOR  getModifierKeyComparator MODIFIER_KEY_COMPARATOR

Formats an individual key into a human readable format This uses an internationalization resource bundle to look up the key This does the platform specific formatting for Carbon param key The key to format must not be code null code return The key formatted as a string should not be code null code public String format Key key String name key to String TODO consider platform specific resource bundles if carbon equals SWT get Platform NON NLS 1 String formatted Name String CARBON KEY LOOK UP get name if formatted Name null return formatted Name return super format key  toString getPlatform formattedName CARBON_KEY_LOOK_UP formattedName formattedName
protected String get Key Delimiter We must do the look up every time as our locale might change if carbon equals SWT get Platform NON NLS 1 return Util translate String RESOURCE BUNDLE CARBON KEY DELIMITER KEY Util ZERO LENGTH STRING false false else return Util translate String RESOURCE BUNDLE KEY DELIMITER KEY Key Stroke KEY DELIMITER false false  getKeyDelimiter getPlatform translateString RESOURCE_BUNDLE CARBON_KEY_DELIMITER_KEY ZERO_LENGTH_STRING translateString RESOURCE_BUNDLE KEY_DELIMITER_KEY KeyStroke KEY_DELIMITER
protected String get Key Stroke Delimiter We must do the look up every time as our locale might change if win32 equals SWT get Platform NON NLS 1 return Util translate String RESOURCE BUNDLE WIN32 KEY STROKE DELIMITER KEY Key Sequence KEY STROKE DELIMITER false false else return Util translate String RESOURCE BUNDLE KEY STROKE DELIMITER KEY Key Sequence KEY STROKE DELIMITER false false  getKeyStrokeDelimiter getPlatform translateString RESOURCE_BUNDLE WIN32_KEY_STROKE_DELIMITER_KEY KeySequence KEY_STROKE_DELIMITER translateString RESOURCE_BUNDLE KEY_STROKE_DELIMITER_KEY KeySequence KEY_STROKE_DELIMITER
see org eclipse ui keys Abstract Key Formatter get Modifier Key Comparator protected Comparator get Modifier Key Comparator return MODIFIER KEY COMPARATOR  AbstractKeyFormatter getModifierKeyComparator getModifierKeyComparator MODIFIER_KEY_COMPARATOR

public int compare Object left Object right Modifier Key modifier Key Left Modifier Key left Modifier Key modifier Key Right Modifier Key right int modifier Key Left Rank rank modifier Key Left int modifier Key Right Rank rank modifier Key Right if modifier Key Left Rank modifier Key Right Rank return modifier Key Left Rank modifier Key Right Rank else return modifier Key Left compare To modifier Key Right  ModifierKey modifierKeyLeft ModifierKey ModifierKey modifierKeyRight ModifierKey modifierKeyLeftRank modifierKeyLeft modifierKeyRightRank modifierKeyRight modifierKeyLeftRank modifierKeyRightRank modifierKeyLeftRank modifierKeyRightRank modifierKeyLeft compareTo modifierKeyRight
Calculates a rank for a given modifier key param modifier Key The modifier key to rank may be code null code return The rank of this modifier key This is a non negative number where a lower number suggests a higher rank private int rank Modifier Key modifier Key String platform SWT get Platform if win32 equals platform NON NLS 1 return rank Windows modifier Key if gtk equals platform NON NLS 1 TODO Do a look up on window manager return rankGNOME modifier Key if carbon equals platform NON NLS 1 return rank MacOSX modifier Key if motif equals platform NON NLS 1 TODO Do a look up on window manager return rankGNOME modifier Key return UNKNOWN KEY  modifierKey ModifierKey modifierKey getPlatform rankWindows modifierKey modifierKey rankMacOSX modifierKey modifierKey UNKNOWN_KEY
Provides a ranking for the modifier key based on the modifier key ordering used in the GNOME window manager param modifier Key The modifier key to rank may be code null code return The rank of this modifier key This is a non negative number where a lower number suggests a higher rank private final int rankGNOME Modifier Key modifier Key if Modifier Key SHIFT equals modifier Key return 0 if Modifier Key CTRL equals modifier Key return 1 if Modifier Key ALT equals modifier Key return 2 return UNKNOWN KEY  modifierKey ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey UNKNOWN_KEY
Provides a ranking for the modifier key based on the modifier key ordering used in the KDE window manager param modifier Key The modifier key to rank may be code null code return The rank of this modifier key This is a non negative number where a lower number suggests a higher rank private final int rankKDE Modifier Key modifier Key if Modifier Key ALT equals modifier Key return 0 if Modifier Key CTRL equals modifier Key return 1 if Modifier Key SHIFT equals modifier Key return 2 return UNKNOWN KEY  modifierKey ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey UNKNOWN_KEY
Provides a ranking for the modifier key based on the modifier key ordering used in the MacOS X operating system param modifier Key The modifier key to rank may be code null code return The rank of this modifier key This is a non negative number where a lower number suggests a higher rank private final int rank MacOSX Modifier Key modifier Key if Modifier Key SHIFT equals modifier Key return 0 if Modifier Key CTRL equals modifier Key return 1 if Modifier Key ALT equals modifier Key return 2 if Modifier Key COMMAND equals modifier Key return 3 return UNKNOWN KEY  modifierKey rankMacOSX ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey UNKNOWN_KEY
Provides a ranking for the modifier key based on the modifier key ordering used in the Windows operating system param modifier Key The modifier key to rank may be code null code return The rank of this modifier key This is a non negative number where a lower number suggests a higher rank private final int rank Windows Modifier Key modifier Key if Modifier Key CTRL equals modifier Key return 0 if Modifier Key ALT equals modifier Key return 1 if Modifier Key SHIFT equals modifier Key return 2 return UNKNOWN KEY  modifierKey rankWindows ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey UNKNOWN_KEY

Constructs a new instance of code Out Of Order Listener code with a reference to the keyboard interface which should be allowed to process uneaten events param workbench Keyboard The keyboard interface for the workbench capable of processing key bindings must not be code null code public Out Of Order Listener Workbench Keyboard workbench Keyboard keyboard workbench Keyboard  OutOfOrderListener workbenchKeyboard OutOfOrderListener WorkbenchKeyboard workbenchKeyboard workbenchKeyboard
Handles the key down event on a widget by passing uneaten events to the key binding architecture This is used to allow special keys to reach the widget first before being processed by the key binding architecture param event The event to process must not be code null code public void handle Event Event event Always remove myself as a listener Widget widget event widget if widget null widget is Disposed widget remove Listener event type this If the event is still up for grabs then re route through the global key filter if event doit List key Strokes Workbench Keyboard generate Possible Key Strokes event keyboard process Key Event key Strokes event  handleEvent isDisposed removeListener keyStrokes WorkbenchKeyboard generatePossibleKeyStrokes processKeyEvent keyStrokes

Constructs a new instance of code Out Of Order Verify Listener code with the listener that will be chained in param out Of Order Listener The listener that should be attached to the widget if the verify event is not eaten must not be code null code Out Of Order Verify Listener Out Of Order Listener out Of Order Listener chained Listener out Of Order Listener  OutOfOrderVerifyListener outOfOrderListener OutOfOrderVerifyListener OutOfOrderListener outOfOrderListener chainedListener outOfOrderListener
Checks whether any other verify listeners have triggered If not then it sets up the top level out of order listener param event The verify event after it has been processed by all other verify listeners must not be code null code public void verify Key Verify Event event Always remove myself as a listener Widget widget event widget if widget instanceof Styled Text Styled Text widget remove Verify Key Listener this If the event is still up for grabs then re route through the global key filter if event doit widget add Listener SWT Modify new Cancel On Modify Listener chained Listener widget add Listener SWT Key Down chained Listener  verifyKey VerifyEvent StyledText StyledText removeVerifyKeyListener addListener CancelOnModifyListener chainedListener addListener KeyDown chainedListener

protected int rank Modifier Key modifier Key if Modifier Key CTRL equals modifier Key return 0 if Modifier Key ALT equals modifier Key return 1 if Modifier Key SHIFT equals modifier Key return 2 return Integer MAX VALUE  ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey MAX_VALUE
protected String get Key Delimiter return Util translate String RESOURCE BUNDLE KEY DELIMITER KEY Key Stroke KEY DELIMITER false false  getKeyDelimiter translateString RESOURCE_BUNDLE KEY_DELIMITER_KEY KeyStroke KEY_DELIMITER
protected String get Key Stroke Delimiter return Util translate String RESOURCE BUNDLE KEY STROKE DELIMITER KEY Key Sequence KEY STROKE DELIMITER false false  getKeyStrokeDelimiter translateString RESOURCE_BUNDLE KEY_STROKE_DELIMITER_KEY KeySequence KEY_STROKE_DELIMITER
protected Comparator get Modifier Key Comparator return MODIFIER KEY COMPARATOR  getModifierKeyComparator MODIFIER_KEY_COMPARATOR

Generates any key strokes that are near matches to the given event The first such key stroke is always the exactly matching key stroke param event The event from which the key strokes should be generated must not be code null code return The set of nearly matching key strokes It is never code null code but may be empty public static List generate Possible Key Strokes Event event final List key Strokes new Array List 3 If this is not a keyboard event then there are no key strokes This can happen if we are listening to focus traversal events if event state Mask 0 event key Code 0 event character 0 return key Strokes Add each unique key stroke to the list for consideration final int first Accelerator SWT Key Support convert Event To Unmodified Accelerator event key Strokes add SWT Key Support convert Accelerator To Key Stroke first Accelerator We shouldn t allow delete to undergo shift resolution if event character SWT DEL return key Strokes final int second Accelerator SWT Key Support convert Event To Unshifted Modified Accelerator event if second Accelerator first Accelerator key Strokes add SWT Key Support convert Accelerator To Key Stroke second Accelerator final int third Accelerator SWT Key Support convert Event To Modified Accelerator event if third Accelerator second Accelerator third Accelerator first Accelerator key Strokes add SWT Key Support convert Accelerator To Key Stroke third Accelerator return key Strokes  generatePossibleKeyStrokes keyStrokes ArrayList stateMask keyCode keyStrokes firstAccelerator SWTKeySupport convertEventToUnmodifiedAccelerator keyStrokes SWTKeySupport convertAcceleratorToKeyStroke firstAccelerator keyStrokes secondAccelerator SWTKeySupport convertEventToUnshiftedModifiedAccelerator secondAccelerator firstAccelerator keyStrokes SWTKeySupport convertAcceleratorToKeyStroke secondAccelerator thirdAccelerator SWTKeySupport convertEventToModifiedAccelerator thirdAccelerator secondAccelerator thirdAccelerator firstAccelerator keyStrokes SWTKeySupport convertAcceleratorToKeyStroke thirdAccelerator keyStrokes
Initializes the code out Of Order Keys code member variable using the keys defined in the properties file private static void initialize Out Of Order Keys Get the key strokes which should be out of order String keys Text Util translate String RESOURCE BUNDLE OUT OF ORDER KEYS out Of Order Keys Key Sequence get Instance try out Of Order Keys Key Sequence get Instance keys Text catch Parse Exception e String message Could not parse out of order keys definition NON NLS 1 keys Text Continuing with no out of order keys NON NLS 1 Workbench Plugin log message new Status I Status ERROR Workbench Plugin PI WORKBENCH 0 message e  outOfOrderKeys initializeOutOfOrderKeys keysText translateString RESOURCE_BUNDLE OUT_OF_ORDER_KEYS outOfOrderKeys KeySequence getInstance outOfOrderKeys KeySequence getInstance keysText ParseException keysText WorkbenchPlugin IStatus WorkbenchPlugin PI_WORKBENCH
p Determines whether the given event represents a key press that should be handled as an out of order event An out of order key press is one that is passed to the focus control first Only if the focus control fails to respond will the regular key bindings get applied p p Care must be taken in choosing which keys are chosen as out of order keys This method has only been designed and test to work with the unmodified Escape key stroke p param key Strokes The key stroke in which to look for out of order keys must not be code null code return code true code if the key is an out of order key code false code otherwise private static boolean is Out Of Order Key List key Strokes Compare to see if one of the possible key strokes is out of order Iterator key Stroke Itr key Strokes iterator List out Of Order Key Strokes out Of Order Keys get Key Strokes while key Stroke Itr has Next if out Of Order Key Strokes contains key Stroke Itr next return true return false  keyStrokes isOutOfOrderKey keyStrokes keyStrokeItr keyStrokes outOfOrderKeyStrokes outOfOrderKeys getKeyStrokes keyStrokeItr hasNext outOfOrderKeyStrokes keyStrokeItr
public void handle Event Event event if DEBUG DEBUG VERBOSE System out print KEYS Listener handle Event type NON NLS 1 switch event type case SWT Key Down System out print Key Down NON NLS 1 break case SWT Traverse System out print Traverse NON NLS 1 break default System out print event type System out println state Mask 0x NON NLS 1 Integer to Hex String event state Mask key Code 0x NON NLS 1 Integer to Hex String event key Code character 0x NON NLS 1 Integer to Hex String event character NON NLS 1 filter Key Sequence Bindings event  handleEvent DEBUG_VERBOSE handleEvent KeyDown KeyDown stateMask toHexString stateMask keyCode toHexString keyCode toHexString filterKeySequenceBindings
see org eclipse ui I Window Listener window Activated org eclipse ui I Workbench Window public void window Activated I Workbench Window window check Active Window window  IWindowListener windowActivated IWorkbenchWindow windowActivated IWorkbenchWindow checkActiveWindow
see org eclipse ui I Window Listener window Closed org eclipse ui I Workbench Window public void window Closed I Workbench Window window Do nothing  IWindowListener windowClosed IWorkbenchWindow windowClosed IWorkbenchWindow
see org eclipse ui I Window Listener window Deactivated org eclipse ui I Workbench Window public void window Deactivated I Workbench Window window Do nothing  IWindowListener windowDeactivated IWorkbenchWindow windowDeactivated IWorkbenchWindow
see org eclipse ui I Window Listener window Opened org eclipse ui I Workbench Window public void window Opened I Workbench Window window Do nothing  IWindowListener windowOpened IWorkbenchWindow windowOpened IWorkbenchWindow
Constructs a new instance of code Workbench Keyboard code associated with a particular workbench param associated Workbench The workbench with which this keyboard interface should work must not be code null code param associated Activity Manager The activity manager to be used by this keyboard interface must not be code null code param associated Command Manager The command manager to be used by this keyboard interface must not be code null code public Workbench Keyboard Workbench associated Workbench I Activity Manager associated Activity Manager I Command Manager associated Command Manager workbench associated Workbench state new Key Binding State associated Workbench activity Manager associated Activity Manager command Manager associated Command Manager workbench add Window Listener window Listener  WorkbenchKeyboard associatedWorkbench associatedActivityManager associatedCommandManager WorkbenchKeyboard associatedWorkbench IActivityManager associatedActivityManager ICommandManager associatedCommandManager associatedWorkbench KeyBindingState associatedWorkbench activityManager associatedActivityManager commandManager associatedCommandManager addWindowListener windowListener
Verifies that the active workbench window is the same as the workbench window associated with the state This is used to verify that the state is properly reset as focus changes When they are not the same the state is reset and associated with the newly activated window param window The activated window must not be code null code private void check Active Window I Workbench Window window if window equals state get Associated Window reset State state set Associated Window window  checkActiveWindow IWorkbenchWindow getAssociatedWindow resetState setAssociatedWindow
Closes the multi stroke key binding assistant shell if it exists and isn t already disposed private void close Multi Key Assist Shell if multi Key Assist Shell null multi Key Assist Shell is Disposed workbench get Context Support unregister Shell multi Key Assist Shell multi Key Assist Shell close multi Key Assist Shell dispose multi Key Assist Shell null  closeMultiKeyAssistShell multiKeyAssistShell multiKeyAssistShell isDisposed getContextSupport unregisterShell multiKeyAssistShell multiKeyAssistShell multiKeyAssistShell multiKeyAssistShell
Tests whether the given command is enabled param command The command to test must not be code null code return code true code if the command is enabled or not defined code false code otherwise private static boolean is Enabled I Command command try Map attribute Values By Name command get Attribute Values By Name if attribute Values By Name contains Key enabled NON NLS 1 Boolean TRUE equals attribute Values By Name get enabled NON NLS 1 return false else return true catch Not Handled Exception e Not Handled return false  isEnabled ICommand attributeValuesByName getAttributeValuesByName attributeValuesByName containsKey attributeValuesByName NotHandledException eNotHandled
Performs the actual execution of the command by looking up the current handler from the command manager If there is a handler and it is enabled then it tries the actual execution Execution failures are logged When this method completes the key binding state is reset param command Id The identifier for the command that should be executed should not be code null code return code true code if there was a handler code false code otherwise throws Command Exception if the handler does not complete execution for some reason It is up to the caller of this method to decide whether to log the message display a dialog or ignore this exception entirely private boolean execute Command String command Id throws Command Exception if DEBUG System out println KEYS Workbench Keyboard execute Command command Id NON NLS 1 command Id NON NLS 1 Reset the key binding state close window clear status line etc reset State Dispatch to the handler I Command command command Manager get Command command Id if DEBUG DEBUG VERBOSE if command is Defined System out println KEYS not defined NON NLS 1 else if command is Handled System out println KEYS not handled NON NLS 1 else if is Enabled command System out println KEYS not enabled NON NLS 1 else try Map attribute Values By Name command get Attribute Values By Name System out println KEYS value for id attribute NON NLS 1 attribute Values By Name get id NON NLS 1 System out println KEYS value for enabled attribute NON NLS 1 attribute Values By Name get enabled NON NLS 1 catch Not Handled Exception e Not Handled System out println e Not Handled final boolean command Defined command is Defined final boolean command Handled command is Handled if command Defined command Handled is Enabled command command execute null return command Defined command Handled  commandId CommandException executeCommand commandId CommandException WorkbenchKeyboard executeCommand commandId commandId resetState ICommand commandManager getCommand commandId DEBUG_VERBOSE isDefined isHandled isEnabled attributeValuesByName getAttributeValuesByName attributeValuesByName attributeValuesByName NotHandledException eNotHandled eNotHandled commandDefined isDefined commandHandled isHandled commandDefined commandHandled isEnabled commandDefined commandHandled
p Launches the command matching a the typed key This filter an incoming code SWT Key Down code or code SWT Traverse code event at the level of the display i e before it reaches the widgets It does not allow processing in a dialog or if the key strokes does not contain a natural key p p Some key strokes defined as a property are declared as out of order keys This means that they are processed by the widget em first em Only if the other widget listeners do no useful work does it try to process key bindings For example ESC can cancel the current widget action if there is one without triggering key bindings p param event The incoming event must not be code null code private void filter Key Sequence Bindings Event event Only process key strokes containing natural keys to trigger key bindings if event key Code SWT MODIFIER MASK 0 return Allow special key out of order processing List key Strokes generate Possible Key Strokes event if is Out Of Order Key key Strokes if event type SWT Key Down Widget widget event widget if event character SWT DEL event state Mask SWT MODIFIER MASK 0 widget instanceof Text widget instanceof Combo KLUDGE Bug 54654 The text widget relies on no listener doing any work before dispatching the native delete event This does not work as we are restricted to listeners However it can be said that pressing a delete key in a text widget will never use key bindings This can be shown be considering how the event dispatching is expected to work in a text widget So we should do nothing ever return else if widget instanceof Styled Text KLUDGE Some people try to do useful work in verify listeners The way verify listeners work in SWT we need to verify the key as well otherwise we can detect that useful work has been done Styled Text widget add Verify Key Listener new Out Of Order Verify Listener new Out Of Order Listener this else widget add Listener SWT Key Down new Out Of Order Listener this Otherwise we count on a key down arriving eventually Expecting out of order handling on Ctrl Tab for example is a bad idea stick to keys that are not window traversal keys else process Key Event key Strokes event  KeyDown filterKeySequenceBindings keyCode MODIFIER_MASK keyStrokes generatePossibleKeyStrokes isOutOfOrderKey keyStrokes KeyDown stateMask MODIFIER_MASK StyledText StyledText addVerifyKeyListener OutOfOrderVerifyListener OutOfOrderListener addListener KeyDown OutOfOrderListener processKeyEvent keyStrokes
An accessor for the filter that processes key down and traverse events on the display return The global key down and traverse filter never code null code public Listener get Key Down Filter return key Down Filter  getKeyDownFilter keyDownFilter
Determines whether the key sequence is a perfect match for any command If there is a match then the corresponding command identifier is returned param key Sequence The key sequence to check for a match must never be code null code return The command identifier for the perfectly matching command code null code if no command matches private String get Perfect Match Key Sequence key Sequence return command Manager get Perfect Match key Sequence  keySequence getPerfectMatch KeySequence keySequence commandManager getPerfectMatch keySequence
public void run if System current Time Millis my Start Time delay start Time my Start Time open Multi Key Assist Shell display  currentTimeMillis myStartTime startTime myStartTime openMultiKeyAssistShell
Changes the key binding state to the given value This should be an incremental change but there are no checks to guarantee this is so It also sets up a code Shell code to be displayed after one second has elapsed This shell will show the user the possible completions for what they have typed param sequence The new key sequence for the state should not be code null code private void increment State Key Sequence sequence Record the starting time start Time System current Time Millis final long my Start Time start Time Update the state state set Current Sequence sequence state set Associated Window workbench get Active Workbench Window After some time open a shell displaying the possible completions final I Preference Store store Workbench Plugin get Default get Preference Store if store get Boolean I Preference Constants MULTI KEY ASSIST final Display display workbench get Display final int delay store get Int I Preference Constants MULTI KEY ASSIST TIME display timer Exec delay new Runnable public void run if System current Time Millis my Start Time delay start Time my Start Time open Multi Key Assist Shell display  incrementState KeySequence startTime currentTimeMillis myStartTime startTime setCurrentSequence setAssociatedWindow getActiveWorkbenchWindow IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore getBoolean IPreferenceConstants MULTI_KEY_ASSIST getDisplay getInt IPreferenceConstants MULTI_KEY_ASSIST_TIME timerExec currentTimeMillis myStartTime startTime myStartTime openMultiKeyAssistShell
Determines whether the key sequence partially matches on of the active key bindings param key Sequence The key sequence to check for a partial match must never be code null code return code true code if there is a partial match code false code otherwise private boolean is Partial Match Key Sequence key Sequence return command Manager is Partial Match key Sequence  keySequence isPartialMatch KeySequence keySequence commandManager isPartialMatch keySequence
Determines whether the key sequence perfectly matches on of the active key bindings param key Sequence The key sequence to check for a perfect match must never be code null code return code true code if there is a perfect match code false code otherwise private boolean is Perfect Match Key Sequence key Sequence return command Manager is Perfect Match key Sequence  keySequence isPerfectMatch KeySequence keySequence commandManager isPerfectMatch keySequence
Logs the given exception and opens a dialog explaining the failure param e The exception to log must not be code null code private final void log Exception Command Exception e Throwable nested Exception e get Cause Throwable exception nested Exception null e nested Exception String message Util translate String RESOURCE BUNDLE Execution Error Message NON NLS 1 String title Util translate String RESOURCE BUNDLE Execution Error Title NON NLS 1 String exception Message exception get Message if exception Message null exception Message message I Status status new Status I Status ERROR Workbench Plugin PI WORKBENCH 0 exception Message exception Error Dialog open Error workbench get Active Workbench Window get Shell title message status Workbench Plugin log message status  logException CommandException nestedException getCause nestedException nestedException translateString RESOURCE_BUNDLE ExecutionError translateString RESOURCE_BUNDLE ExecutionError exceptionMessage getMessage exceptionMessage exceptionMessage IStatus IStatus WorkbenchPlugin PI_WORKBENCH exceptionMessage ErrorDialog openError getActiveWorkbenchWindow getShell WorkbenchPlugin
Opens a code Shell code to assist the user in completing a multi stroke key binding After this method completes code multi Key Assist Shell code should point at the newly opened window param display The display on which the shell should be opened must not be code null code private void open Multi Key Assist Shell final Display display Safety check to close an already open shell if there is one if multi Key Assist Shell null multi Key Assist Shell close Get the status line If none then abort Status Line Contribution Item status Line state get Status Line if status Line null return Point status Line Location status Line get Display Location if status Line Location null return Set up the shell multi Key Assist Shell new Shell display SWT NO TRIM Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 multi Key Assist Shell set Layout layout multi Key Assist Shell set Background display get System Color SWT COLOR INFO BACKGROUND Get the list of items Map partial Matches new Tree Map new Comparator public int compare Object a Object b Key Sequence sequenceA Key Sequence a Key Sequence sequenceB Key Sequence b return sequenceA format compare To sequenceB format partial Matches put All command Manager get Partial Matches state get Current Sequence Iterator partial Match Itr partial Matches entry Set iterator while partial Match Itr has Next Map Entry entry Map Entry partial Match Itr next String command Id String entry get Value I Command command command Manager get Command command Id TODO The enabled property of I Command is broken if command is Defined activity Manager get Identifier command get Id is Enabled command is Enabled partial Match Itr remove Layout the partial matches if partial Matches is Empty Label no Matches Label new Label multi Key Assist Shell SWT NULL no Matches Label set Text Util translate String RESOURCE BUNDLE No Matches Message NON NLS 1 no Matches Label set Layout Data new Grid Data Grid Data FILL BOTH no Matches Label set Background multi Key Assist Shell get Background else Layout the table final Table completions Table new Table multi Key Assist Shell SWT SINGLE completions Table set Background multi Key Assist Shell get Background Grid Data grid Data new Grid Data Grid Data FILL BOTH completions Table set Layout Data grid Data Initialize the columns and rows final List commands new Array List remember commands Table Column column Key Sequence new Table Column completions Table SWT LEFT 0 Table Column column Command Name new Table Column completions Table SWT LEFT 1 Iterator items Itr partial Matches entry Set iterator while items Itr has Next Map Entry entry Map Entry items Itr next Key Sequence sequence Key Sequence entry get Key String command Id String entry get Value I Command command command Manager get Command command Id try String text sequence format command get Name Table Item item new Table Item completions Table SWT NULL item set Text text commands add command catch Not Defined Exception e Not much to do but this shouldn t really happen column Key Sequence pack column Command Name pack If you double click on the table it should execute the selected command completions Table add Selection Listener new Selection Listener public void widget Default Selected Selection Event event int selection Index completions Table get Selection Index if selection Index 0 I Command command I Command commands get selection Index try execute Command command get Id catch Command Exception e log Exception e public void widget Selected Selection Event event Do nothing Size the shell multi Key Assist Shell pack Point assist Shell Size multi Key Assist Shell get Size if assist Shell Size x MULTI KEY ASSIST SHELL MAX WIDTH assist Shell Size x MULTI KEY ASSIST SHELL MAX WIDTH if assist Shell Size y MULTI KEY ASSIST SHELL MAX HEIGHT assist Shell Size y MULTI KEY ASSIST SHELL MAX HEIGHT multi Key Assist Shell set Size assist Shell Size Position the shell Point assist Shell Location new Point status Line Location x status Line Location y assist Shell Size y Rectangle display Bounds display get Bounds final int display Right Edge display Bounds x display Bounds width if assist Shell Location x display Bounds x assist Shell Location x display Bounds x else if assist Shell Location x assist Shell Size x display Right Edge assist Shell Location x display Right Edge assist Shell Size x final int display Bottom Edge display Bounds y display Bounds height if assist Shell Location y display Bounds y assist Shell Location y display Bounds y else if assist Shell Location y assist Shell Size y display Bottom Edge assist Shell Location y display Bottom Edge assist Shell Size y multi Key Assist Shell set Location assist Shell Location If the shell loses focus it should be closed multi Key Assist Shell add Listener SWT Deactivate new Listener public void handle Event Event event close Multi Key Assist Shell Open the shell workbench get Context Support register Shell multi Key Assist Shell I Workbench Context Support TYPE WINDOW multi Key Assist Shell open  multiKeyAssistShell openMultiKeyAssistShell multiKeyAssistShell multiKeyAssistShell StatusLineContributionItem statusLine getStatusLine statusLine statusLineLocation statusLine getDisplayLocation statusLineLocation multiKeyAssistShell NO_TRIM GridLayout GridLayout marginHeight marginWidth multiKeyAssistShell setLayout multiKeyAssistShell setBackground getSystemColor COLOR_INFO_BACKGROUND partialMatches TreeMap KeySequence KeySequence KeySequence KeySequence compareTo partialMatches putAll commandManager getPartialMatches getCurrentSequence partialMatchItr partialMatches entrySet partialMatchItr hasNext partialMatchItr commandId getValue ICommand commandManager getCommand commandId ICommand isDefined activityManager getIdentifier getId isEnabled isEnabled partialMatchItr partialMatches isEmpty noMatchesLabel multiKeyAssistShell noMatchesLabel setText translateString RESOURCE_BUNDLE NoMatches noMatchesLabel setLayoutData GridData GridData FILL_BOTH noMatchesLabel setBackground multiKeyAssistShell getBackground completionsTable multiKeyAssistShell completionsTable setBackground multiKeyAssistShell getBackground GridData gridData GridData GridData FILL_BOTH completionsTable setLayoutData gridData ArrayList TableColumn columnKeySequence TableColumn completionsTable TableColumn columnCommandName TableColumn completionsTable itemsItr partialMatches entrySet itemsItr hasNext itemsItr KeySequence KeySequence getKey commandId getValue ICommand commandManager getCommand commandId getName TableItem TableItem completionsTable setText NotDefinedException columnKeySequence columnCommandName completionsTable addSelectionListener SelectionListener widgetDefaultSelected SelectionEvent selectionIndex completionsTable getSelectionIndex selectionIndex ICommand ICommand selectionIndex executeCommand getId CommandException logException widgetSelected SelectionEvent multiKeyAssistShell assistShellSize multiKeyAssistShell getSize assistShellSize MULTI_KEY_ASSIST_SHELL_MAX_WIDTH assistShellSize MULTI_KEY_ASSIST_SHELL_MAX_WIDTH assistShellSize MULTI_KEY_ASSIST_SHELL_MAX_HEIGHT assistShellSize MULTI_KEY_ASSIST_SHELL_MAX_HEIGHT multiKeyAssistShell setSize assistShellSize assistShellLocation statusLineLocation statusLineLocation assistShellSize displayBounds getBounds displayRightEdge displayBounds displayBounds assistShellLocation displayBounds assistShellLocation displayBounds assistShellLocation assistShellSize displayRightEdge assistShellLocation displayRightEdge assistShellSize displayBottomEdge displayBounds displayBounds assistShellLocation displayBounds assistShellLocation displayBounds assistShellLocation assistShellSize displayBottomEdge assistShellLocation displayBottomEdge assistShellSize multiKeyAssistShell setLocation assistShellLocation multiKeyAssistShell addListener handleEvent closeMultiKeyAssistShell getContextSupport registerShell multiKeyAssistShell IWorkbenchContextSupport TYPE_WINDOW multiKeyAssistShell
Processes a key press with respect to the key binding architecture This updates the mode of the command manager and runs the current handler for the command that matches the key sequence if any param potential Key Strokes The key strokes that could potentially match in the order of priority must not be code null code param event The event may be code null code return code true code if a command is executed code false code otherwise throws Command Exception if the handler does not complete execution for some reason It is up to the caller of this method to decide whether to log the message display a dialog or ignore this exception entirely public boolean press List potential Key Strokes Event event throws Command Exception TODO remove event parameter once key modified actions are removed if DEBUG DEBUG VERBOSE System out println KEYS Workbench Keyboard press potential Key Strokes NON NLS 1 potential Key Strokes NON NLS 1 TODO Kludge A partial workaround for Bug 56231 This should be removed once SWT fixes Bug 56231 such that activation works properly on all platforms if gtk equals SWT get Platform NON NLS 1 final Widget widget event widget final Shell shell if widget instanceof Control widget is Disposed shell Control widget get Shell else shell Display get Current get Active Shell Workbench Command Support workbench get Command Support process Handler Submissions false shell Workbench Context Support workbench get Context Support process Enabled Submissions false shell Key Sequence sequence Before Key Stroke state get Current Sequence for Iterator iterator potential Key Strokes iterator iterator has Next Key Sequence sequence After Key Stroke Key Sequence get Instance sequence Before Key Stroke Key Stroke iterator next if is Partial Match sequence After Key Stroke increment State sequence After Key Stroke return true else if is Perfect Match sequence After Key Stroke String command Id get Perfect Match sequence After Key Stroke return execute Command command Id sequence Before Key Stroke is Empty else if multi Key Assist Shell null event key Code SWT ARROW DOWN event key Code SWT ARROW UP event key Code SWT ARROW LEFT event key Code SWT ARROW RIGHT event key Code SWT CR We don t want to swallow keyboard navigation keys return false reset State return false  potentialKeyStrokes CommandException potentialKeyStrokes CommandException DEBUG_VERBOSE WorkbenchKeyboard potentialKeyStrokes potentialKeyStrokes getPlatform isDisposed getShell getCurrent getActiveShell WorkbenchCommandSupport getCommandSupport processHandlerSubmissions WorkbenchContextSupport getContextSupport processEnabledSubmissions KeySequence sequenceBeforeKeyStroke getCurrentSequence potentialKeyStrokes hasNext KeySequence sequenceAfterKeyStroke KeySequence getInstance sequenceBeforeKeyStroke KeyStroke isPartialMatch sequenceAfterKeyStroke incrementState sequenceAfterKeyStroke isPerfectMatch sequenceAfterKeyStroke commandId getPerfectMatch sequenceAfterKeyStroke executeCommand commandId sequenceBeforeKeyStroke isEmpty multiKeyAssistShell keyCode ARROW_DOWN keyCode ARROW_UP keyCode ARROW_LEFT keyCode ARROW_RIGHT keyCode resetState
p Actually performs the processing of the key event by interacting with the code I Command Manager code If work is carried out then the event is stopped here i e code event doit false code It does not do any processing if there are no matching key strokes p p If the active code Shell code is not the same as the one to which the state is associated then a reset occurs p param key Strokes The set of all possible matching key strokes must not be code null code param event The event to process must not be code null code void process Key Event List key Strokes Event event Dispatch the keyboard shortcut if any boolean eat Key false if key Strokes is Empty try eat Key press key Strokes event catch Command Exception e log Exception e eat Key true if eat Key switch event type case SWT Key Down event doit false break case SWT Traverse event detail SWT TRAVERSE NONE event doit true break default event type SWT NONE  ICommandManager keyStrokes processKeyEvent keyStrokes eatKey keyStrokes isEmpty eatKey keyStrokes CommandException logException eatKey eatKey KeyDown TRAVERSE_NONE
Resets the state and cancels any running timers If there is a code Shell code currently open then it closes it private void reset State start Time Long MAX VALUE state reset close Multi Key Assist Shell  resetState startTime MAX_VALUE closeMultiKeyAssistShell

Constructor for Label Decorator Action param text public Label Decorator Action Decorator Definition definition super definition get Name decorator definition set Checked decorator is Enabled  LabelDecoratorAction LabelDecoratorAction DecoratorDefinition getName setChecked isEnabled
see Action run public void run 

private class Wrapper Layout extends Layout implements I Caching Layout protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache Control children composite get Children if children length 1 return new Point 0 0 cache set Control children 0 return cache compute Size w Hint h Hint  WrapperLayout ICachingLayout computeSize wHint hHint flushCache getChildren setControl computeSize wHint hHint
protected void layout Composite composite boolean flush Cache Control children composite get Children if children length 1 return Control child children 0 Rectangle new Bounds composite get Client Area if new Bounds equals last Bounds child set Bounds new Bounds last Bounds new Bounds  flushCache getChildren newBounds getClientArea newBounds lastBounds setBounds newBounds lastBounds newBounds
see org eclipse ui internal layout I Caching Layout flush org eclipse swt widgets Control public void flush Control dirty Control flush Cache  ICachingLayout dirtyControl flushCache
Creates a code Cache Wrapper code with the given parent param parent public Cache Wrapper Composite parent proxy new Composite parent SWT NONE proxy set Layout new Wrapper Layout  CacheWrapper CacheWrapper setLayout WrapperLayout
Flush the cache Call this when the child has changed in order to force the size to be recomputed in the next resize event public void flush Cache cache flush  flushCache
Use this as the parent of the real control return the proxy contol It should be given exactly one child public Composite get Control return proxy  getControl
Dispose of any widgets created by this wrapper public void dispose if proxy null proxy dispose proxy null 

Constructs a Cell Data with default properties public Cell Data Use the default values for all fields  CellData CellData
Creates a new Cell Data that with properties that are as close as possible to the given Grid Data This is used for converting Grid Layouts into Cell Layouts param data public Cell Data Grid Data data vertical Span data vertical Span horizontal Span data horizontal Span switch data horizontal Alignment case Grid Data BEGINNING horizontal Alignment SWT LEFT break case Grid Data CENTER horizontal Alignment SWT CENTER break case Grid Data END horizontal Alignment SWT RIGHT break case Grid Data FILL horizontal Alignment SWT FILL break switch data vertical Alignment case Grid Data BEGINNING vertical Alignment SWT LEFT break case Grid Data CENTER vertical Alignment SWT CENTER break case Grid Data END vertical Alignment SWT RIGHT break case Grid Data FILL vertical Alignment SWT FILL break width Hint data width Hint height Hint data height Hint horizontal Indent data horizontal Indent hint Type OVERRIDE  CellData GridData GridLayouts CellLayouts CellData GridData verticalSpan verticalSpan horizontalSpan horizontalSpan horizontalAlignment GridData horizontalAlignment GridData horizontalAlignment GridData horizontalAlignment GridData horizontalAlignment verticalAlignment GridData verticalAlignment GridData verticalAlignment GridData verticalAlignment GridData verticalAlignment widthHint widthHint heightHint heightHint horizontalIndent horizontalIndent hintType
Copies the given Cell Data param new Data public Cell Data Cell Data new Data hint Type new Data hint Type width Hint new Data width Hint height Hint new Data height Hint horizontal Alignment new Data horizontal Alignment vertical Alignment new Data vertical Alignment horizontal Span new Data horizontal Span vertical Span new Data vertical Span  CellData newData CellData CellData newData hintType newData hintType widthHint newData widthHint heightHint newData heightHint horizontalAlignment newData horizontalAlignment verticalAlignment newData verticalAlignment horizontalSpan newData horizontalSpan verticalSpan newData verticalSpan
Sets the size hint for this control This is used to modify the control s preferred size If one dimension should remain unmodified that hint can be set to SWT DEFAULT Using a size hint of Cell Data MINIMUM ensures that the preferred control size is larger than the hint Using a size hint of Cell Data MAXIMUM ensures that the preferred size is smaller than the hint Using a size hint of Cell Data OVERRIDE ensures that the preferred size is always equal to the hint param hint Type one of Cell Data MINIMUM Cell Data MAXIMUM or Cell Data OVERRIDE param hint size hint in pixels If either dimension is set to SWT DEFAULT the hint will not affect that dimension return this public Cell Data set Hint int hint Type Point hint return set Hint hint Type hint x hint y  CellData CellData CellData hintType CellData CellData CellData CellData setHint hintType setHint hintType
Sets the size hint for this control This is used to modify the control s preferred size If one dimension should remain unmodified that hint can be set to SWT DEFAULT Using a size hint of Cell Data MINIMUM ensures that the preferred control size is larger than the hint Using a size hint of Cell Data MAXIMUM ensures that the preferred size is smaller than the hint Using a size hint of Cell Data OVERRIDE ensures that the preferred size is always equal to the hint If both hints are equal to SWT DEFAULT then the control s preferred size is unmodified param hint Type one of Cell Data MINIMUM Cell Data MAXIMUM or Cell Data OVERRIDE param horizontal horizontal hint pixels A value of SWT DEFAULT will leave the result of the control s compute Size method unmodified param vertical vertical hint pixels A value of SWT DEFAULT will leave the result of the control s compute Size method unmodified return this public Cell Data set Hint int hint Type int horizontal int vertical this hint Type hint Type this height Hint vertical this width Hint horizontal return this  CellData CellData CellData hintType CellData CellData CellData computeSize computeSize CellData setHint hintType hintType hintType heightHint widthHint
Sets the alignment for this control param horizontal Alignment one of SWT LEFT SWT RIGHT SWT FILL or SWT CENTER param vertical Alignment one of SWT TOP SWT BOTTOM SWT FILL or SWT CENTER return this public Cell Data align int horizontal Alignment int vertical Alignment this horizontal Alignment horizontal Alignment this vertical Alignment vertical Alignment return this  horizontalAlignment verticalAlignment CellData horizontalAlignment verticalAlignment horizontalAlignment horizontalAlignment verticalAlignment verticalAlignment
Sets the number of rows and columns spanned by this control param horizontal Span number of columns spanned by the control 0 param vertical Span number of rows spanned by the control 0 return this public Cell Data span int horizontal Span int vertical Span this horizontal Span horizontal Span this vertical Span vertical Span return this  horizontalSpan verticalSpan CellData horizontalSpan verticalSpan horizontalSpan horizontalSpan verticalSpan verticalSpan
Sets the indentation for this control The indentation is added to the control s position within the cell For example indentation of 10 4 will move the control right by 10 pixels and down by 4 pixels param indent indentation pixels return this public Cell Data indent Point indent return this indent indent x indent y  CellData
Sets the indentation for this cell param horizontal Indent distance pixels to move the control to the right param vertical Indent distance pixels to move the control down return this public Cell Data indent int horizontal Indent int vertical Indent this horizontal Indent horizontal Indent this vertical Indent vertical Indent return this  horizontalIndent verticalIndent CellData horizontalIndent verticalIndent horizontalIndent horizontalIndent verticalIndent verticalIndent
Returns the preferred size of the given control given the known dimensions of its cell param to Compute the control whose size is to be computed param cell Width width of the cell in pixels or SWT DEFAULT if unknown param cell Height height of the cell in pixels or SWT DEFAULT if unknown return the preferred size of the given control in pixels public Point compute Size Size Cache to Compute int cell Width int cell Height int abs Horizontal Indent Math abs horizontal Indent int abs Vertical Indent Math abs vertical Indent If we re going to indent subtract off the space that will be required for indentation from the available space if cell Width SWT DEFAULT cell Width abs Horizontal Indent if cell Height SWT DEFAULT cell Height abs Vertical Indent int control Width horizontal Alignment SWT FILL cell Width SWT DEFAULT int control Height vertical Alignment SWT FILL cell Height SWT DEFAULT Note this could be optimized further If we re using a MAXIMUM hint and non FILL alignment we could simply call compute Maximum Bounded Size using the minimum of the cell size and the hint as the boundary basically rather than applying two limits for the hint and the cell boundary we can do it in one step and reduce the size computations by half for this specific case Point control Size compute Control Size to Compute control Width control Height if cell Width SWT DEFAULT control Size x cell Width control Size compute Control Size to Compute cell Width control Height if cell Height SWT DEFAULT control Size y cell Height control Size y cell Height else if cell Height SWT DEFAULT control Size y cell Height control Size compute Control Size to Compute control Width cell Height if cell Width SWT DEFAULT control Size x cell Width control Size x cell Width If we re going to indent add the indentation to the required space control Size x abs Horizontal Indent control Size y abs Vertical Indent return control Size  toCompute cellWidth cellHeight computeSize SizeCache toCompute cellWidth cellHeight absHorizontalIndent horizontalIndent absVerticalIndent verticalIndent cellWidth cellWidth absHorizontalIndent cellHeight cellHeight absVerticalIndent controlWidth horizontalAlignment cellWidth controlHeight verticalAlignment cellHeight computeMaximumBoundedSize controlSize computeControlSize toCompute controlWidth controlHeight cellWidth controlSize cellWidth controlSize computeControlSize toCompute cellWidth controlHeight cellHeight controlSize cellHeight controlSize cellHeight cellHeight controlSize cellHeight controlSize computeControlSize toCompute controlWidth cellHeight cellWidth controlSize cellWidth controlSize cellWidth controlSize absHorizontalIndent controlSize absVerticalIndent controlSize
Arranges the given control within the given rectangle using the criteria described by this Cell Data param control param cell Bounds since 3 0 public void position Control Size Cache cache Rectangle cell Bounds int startx cell Bounds x int starty cell Bounds y int available Width cell Bounds width horizontal Indent int available Height cell Bounds height vertical Indent Point size compute Size cache available Width available Height Horizontal justification switch horizontal Alignment case SWT RIGHT startx cell Bounds x available Width size x break case SWT CENTER startx cell Bounds x available Width size x 2 break Vertical justification switch vertical Alignment case SWT BOTTOM starty cell Bounds y available Height size y break case SWT CENTER starty cell Bounds y available Height size y 2 break Position the control cache get Control set Bounds startx horizontal Indent starty vertical Indent size x size y  CellData cellBounds positionControl SizeCache cellBounds cellBounds cellBounds availableWidth cellBounds horizontalIndent availableHeight cellBounds verticalIndent computeSize availableWidth availableHeight horizontalAlignment cellBounds availableWidth cellBounds availableWidth verticalAlignment cellBounds availableHeight cellBounds availableHeight getControl setBounds horizontalIndent verticalIndent
Returns the preferred size of the given control in this cell given one or both known dimensions of the control This differs from compute Size which takes known dimensions of the b cell b as arguments param to Compute param control Width param control Height return since 3 0 private Point compute Control Size Size Cache to Compute int control Width int control Height switch hint Type case OVERRIDE return compute Override Size to Compute control Width control Height width Hint height Hint case MINIMUM return compute Minimum Bounded Size to Compute control Width control Height width Hint height Hint case MAXIMUM return compute Maximum Bounded Size to Compute control Width control Height width Hint height Hint return compute Raw Size to Compute control Width control Height  computeSize toCompute controlWidth controlHeight computeControlSize SizeCache toCompute controlWidth controlHeight hintType computeOverrideSize toCompute controlWidth controlHeight widthHint heightHint computeMinimumBoundedSize toCompute controlWidth controlHeight widthHint heightHint computeMaximumBoundedSize toCompute controlWidth controlHeight widthHint heightHint computeRawSize toCompute controlWidth controlHeight
Computes the size of the control given its outer dimensions This should be used in place of calling Control compute Size since Control compute Size takes control specific inner dimensions as hints param to Compute Control whose size will be computed param control Width width of the control pixels or SWT DEFAULT if unknown param control Height height of the control pixels or SWT DEFAULT if unknown return preferred dimensions of the control private static Point compute Raw Size Size Cache to Compute int control Width int control Height if control Width SWT DEFAULT control Height SWT DEFAULT return new Point control Width control Height Known bug we pass the OUTER dimension of the control into compute Size even though SWT expects a control specific inner dimension as width and height hints Currently SWT does not provide any means to convert outer dimensions into inner dimensions Fortunately the outer and inner dimensions tend to be quite close so we pass in the outer dimension and adjust the result if it differs from one of the hints This may cause incorrect text wrapping in rare cases and should be fixed once SWT provides a way to convert the outer dimension of a control into a valid width or height hint for Control compute Size Note that the distinction between outer and inner dimensions is undocumented in SWT and most examples also contain this bug Point result to Compute compute Size control Width control Height Hack If the result of compute Size differs from the width or height hints adjust it See above Don t remove this hack until SWT provides some way to pass correct width and height hints into compute Size Once this happens these conditions should always return false and the hack will have no effect if control Width SWT DEFAULT result x control Width else if control Height SWT DEFAULT result y control Height return result  computeSize computeSize toCompute controlWidth controlHeight computeRawSize SizeCache toCompute controlWidth controlHeight controlWidth controlHeight controlWidth controlHeight computeSize computeSize toCompute computeSize controlWidth controlHeight computeSize computeSize controlWidth controlWidth controlHeight controlHeight
Computes the preferred size of the control Optionally one or both dimensions may be fixed to a given size param control object that can compute the size of the control of interest param w Hint known width or SWT DEFAULT if the width needs to be computed param h Hint known height or SWT DEFAULT if the height needs to be computed param overrideW width that should always be returned by the control or SWT DEFAULT if the width is not being constrained param overrideH height that should always be returned by the control or SWT DEFAULT if the height is not being constrained return private static Point compute Override Size Size Cache control int w Hint int h Hint int overrideW int overrideH int result Width overrideW int result Height overrideH if w Hint SWT DEFAULT result Width w Hint if h Hint SWT DEFAULT result Height h Hint if result Width SWT DEFAULT result Height SWT DEFAULT Point result compute Raw Size control result Width result Height return result return new Point result Width result Height  wHint hHint computeOverrideSize SizeCache wHint hHint resultWidth resultHeight wHint resultWidth wHint hHint resultHeight hHint resultWidth resultHeight computeRawSize resultWidth resultHeight resultWidth resultHeight
Computes the size for the control optionally bounding the size in the x and y directions The various hints are used to determine which dimensions are already known and which dimensions need to be computed param control The control whose size should be computed param w Hint known width or SWT DEFAULT if the width needs to be computed param h Hint known height or SWT DEFAULT if the height needs to be computed param bounded Width maximum width for the control or SWT DEFAULT if the width is unbounded param bounded Height maximum height for the control or SWT DEFAULT if the height is unbounded return the preferred size of the control given that it cannot exceed the given bounds private static Point compute Maximum Bounded Size Size Cache control int w Hint int h Hint int bounded Width int bounded Height Point control Size compute Raw Size control w Hint h Hint if w Hint SWT DEFAULT bounded Width SWT DEFAULT control Size x bounded Width return compute Maximum Bounded Size control bounded Width h Hint bounded Width bounded Height if h Hint SWT DEFAULT bounded Height SWT DEFAULT control Size y bounded Height return compute Maximum Bounded Size control w Hint bounded Height bounded Width bounded Height return control Size  wHint hHint boundedWidth boundedHeight computeMaximumBoundedSize SizeCache wHint hHint boundedWidth boundedHeight controlSize computeRawSize wHint hHint wHint boundedWidth controlSize boundedWidth computeMaximumBoundedSize boundedWidth hHint boundedWidth boundedHeight hHint boundedHeight controlSize boundedHeight computeMaximumBoundedSize wHint boundedHeight boundedWidth boundedHeight controlSize
private static Point compute Minimum Bounded Size Size Cache control int w Hint int h Hint int minimum Width int minimum Height Point control Size compute Raw Size control w Hint h Hint if minimum Width SWT DEFAULT w Hint SWT DEFAULT control Size x minimum Width return compute Minimum Bounded Size control minimum Width h Hint minimum Width minimum Height if minimum Height SWT DEFAULT h Hint SWT DEFAULT control Size y minimum Height return compute Minimum Bounded Size control w Hint minimum Height minimum Width minimum Height return control Size  computeMinimumBoundedSize SizeCache wHint hHint minimumWidth minimumHeight controlSize computeRawSize wHint hHint minimumWidth wHint controlSize minimumWidth computeMinimumBoundedSize minimumWidth hHint minimumWidth minimumHeight minimumHeight hHint controlSize minimumHeight computeMinimumBoundedSize wHint minimumHeight minimumWidth minimumHeight controlSize

Creates the layout param num Cols the number of columns in this layout or 0 indicating that the whole layout should be on one row public Cell Layout int num Cols super this num Cols num Cols cols new Array List num Cols 0 3 num Cols  numCols CellLayout numCols numCols numCols ArrayList numCols numCols
Sets the amount empty space between cells param new Spacing a point x y corresponding to the number of pixels of empty space between adjacent columns and rows respectively public Cell Layout set Spacing int horizontal Spacing int vertical Spacing this horizontal Spacing horizontal Spacing this vertical Spacing vertical Spacing return this  newSpacing CellLayout setSpacing horizontalSpacing verticalSpacing horizontalSpacing horizontalSpacing verticalSpacing verticalSpacing
Sets the amount empty space between cells param new Spacing a point x y corresponding to the number of pixels of empty space between adjacent columns and rows respectively public Cell Layout set Spacing Point new Spacing horizontal Spacing new Spacing x vertical Spacing new Spacing y return this  newSpacing CellLayout setSpacing newSpacing horizontalSpacing newSpacing verticalSpacing newSpacing
Returns the amount of empty space between adjacent cells return a point x y corresponding to the number of pixels of empty space between adjacent columns and rows respectively public Point get Spacing return new Point horizontal Spacing vertical Spacing  getSpacing horizontalSpacing verticalSpacing
Sets the size of the margin around the outside of the layout param margin Width the size of the margin around the top and bottom of the layout param margin Height the size of the margin on the left and right of the layout public Cell Layout set Margins int margin Width int margin Height this margin Width margin Width this margin Height margin Height return this  marginWidth marginHeight CellLayout setMargins marginWidth marginHeight marginWidth marginWidth marginHeight marginHeight
Sets the size of the margin around the outside of the layout param new Margins point indicating the size of the horizontal and vertical margins in pixels public Cell Layout set Margins Point new Margins margin Width new Margins x margin Height new Margins y return this  newMargins CellLayout setMargins newMargins marginWidth newMargins marginHeight newMargins
Returns the size of the margins around the outside of the layout return the size of the outer margins in pixels public Point get Margins return new Point margin Width margin Height  getMargins marginWidth marginHeight
Sets the default column settings All columns will use these settings unless they have been explicitly assigned custom settings by set Column param info the properties of all default columns see set Column public Cell Layout set Default Column Row info default Col Settings info return this  setColumn setColumn CellLayout setDefaultColumn defaultColSettings
Sets the column info for the given column number the leftmost column is column 0 This replaces any existing info for the column Note that more than one column are allowed to share the same I Column Info instance if they have identical properties param col Num the column number to modify param info the properties of the column or null if this column should use the default properties public Cell Layout set Column int col Num Row info while cols size col Num cols add null cols set col Num info return this  IColumnInfo colNum CellLayout setColumn colNum colNum colNum
Sets the default row settings for this layout Unless this is overridden for an individual row all rows will use the default settings param info the row info object that should be used to set the size of rows by default public Cell Layout set Default Row Row info default Row Settings info return this  CellLayout setDefaultRow defaultRowSettings
Sets the row info for the given rows The topmost row is row 0 Multiple rows are allowed to share the same Row Info instance param row Num the row number to set param info the row info that will control the sizing of the given row or null if the row should use the default settings for this layout public Cell Layout set Row int row Num Row info while rows size row Num rows add null rows set row Num info return this  RowInfo rowNum CellLayout setRow rowNum rowNum rowNum
Returns the row info that controls the size of the given row Will return the default row settings for this layout if no custom row info has been assigned to the row param row Num return private Row get Row int row Num boolean is Horizontal if is Horizontal if row Num rows size return default Row Settings Row result Row rows get row Num if result null result default Row Settings return result else if row Num cols size return default Col Settings Row result Row cols get row Num if result null result default Col Settings return result  rowNum getRow rowNum isHorizontal isHorizontal rowNum defaultRowSettings rowNum defaultRowSettings rowNum defaultColSettings rowNum defaultColSettings
Initializes the grid Info object param children controls that are being layed out private void init Grid Control children cache set Controls children grid Info init Grid children this cached Row Min null cached Col Min null  gridInfo initGrid setControls gridInfo initGrid cachedRowMin cachedColMin
protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache Control children composite get Children init Grid children if flush Cache cache flush Determine the amount of whitespace area that cannot be used by controls Point empty Space total Empty Space int height Constraints compute Constraints true int width if w Hint SWT DEFAULT width preferred Size height Constraints false else width w Hint empty Space x int height h Hint if h Hint SWT DEFAULT height preferred Size compute Sizes height Constraints width false true else height h Hint empty Space y Point preferred Size new Point width empty Space x height empty Space y At this point we know the layout s preferred size Now adjust it if we re smaller than the minimum possible size for the composite If exactly one dimension of our preferred size is smaller than the minimum size of our composite then set that dimension to the minimum size and recompute the other dimension for example increasing the width to match a shell s minimum width may reduce the height allocated for a wrapping text widget There is no point in doing this if both dimensions are smaller than the composite s minimum size since we re already smaller than we need to be Point minimum Size Cell Layout Util compute Minimum Size composite boolean wider preferred Size x minimum Size x boolean taller preferred Size y minimum Size y if wider if taller If we re larger in both dimensions don t adjust the minimum size return preferred Size else If our preferred height is smaller than the minimum height recompute the preferred width using the minimum height return compute Size composite w Hint minimum Size y false else if taller If our preferred width is smaller than the minimum width recompute the preferred height using the minimum width return compute Size composite minimum Size x h Hint false else If both dimensions are smaller than the minimum size use the minimum size as our preferred size return minimum Size  computeSize wHint hHint flushCache getChildren initGrid flushCache emptySpace totalEmptySpace heightConstraints computeConstraints wHint preferredSize heightConstraints wHint emptySpace hHint hHint preferredSize computeSizes heightConstraints hHint emptySpace preferredSize emptySpace emptySpace minimumSize CellLayoutUtil computeMinimumSize preferredSize minimumSize preferredSize minimumSize preferredSize computeSize wHint minimumSize computeSize minimumSize hHint minimumSize
int compute Sizes int constraints int available Space boolean computing Rows int result compute Min Sizes constraints computing Rows int total Fixed sum Of Sizes result int denominator get Resize Denominator computing Rows int num Rows grid Info get Num Rows computing Rows if total Fixed available Space int remaining available Space total Fixed for int idx 0 idx num Rows denominator 0 idx Row row get Row idx computing Rows if row grows int greed row size int amount remaining greed denominator result idx amount remaining amount denominator greed return result  computeSizes availableSpace computingRows computeMinSizes computingRows totalFixed sumOfSizes getResizeDenominator computingRows numRows gridInfo getNumRows computingRows totalFixed availableSpace availableSpace totalFixed numRows getRow computingRows
Computes one dimension of the preferred size of the layout param hint contains the result if already known or SWT DEFAULT if it needs to be computed param constraints contains constraints along the other dimension or SWT DEFAULT if none For example if we are computing the preferred row sizes this would be an array of known column sizes param computing Rows if true this method returns the height pixels Otherwise it returns the width pixels int preferred Size int constraints boolean computing Rows int fixed Sizes compute Min Sizes constraints computing Rows return sum Of Sizes fixed Sizes get Dynamic Size constraints fixed Sizes computing Rows  computingRows preferredSize computingRows fixedSizes computeMinSizes computingRows sumOfSizes fixedSizes getDynamicSize fixedSizes computingRows
Computes the sum of all integers in the given array If any of the entries are SWT DEFAULT the result is SWT DEFAULT static int sum Of Sizes int input return sum Of Sizes input 0 input length  sumOfSizes sumOfSizes
static int sum Of Sizes int input int start int length int sum 0 for int idx start idx start length idx int next input idx if next SWT DEFAULT return SWT DEFAULT sum next return sum  sumOfSizes
Returns the preferred dynamic width of the layout param constraints param fixed Sizes param computing Rows return int get Dynamic Size int constraints int fixed Sizes boolean computing Rows int result 0 int numerator get Resize Denominator computing Rows If no resizable columns return if numerator 0 return 0 int row Spacing computing Rows vertical Spacing horizontal Spacing int col Spacing computing Rows horizontal Spacing vertical Spacing int num Controls grid Info controls length for int idx 0 idx num Controls idx int control Row Start grid Info get Start Pos idx computing Rows int control Row Span get Span idx computing Rows int control Col Start grid Info get Start Pos idx computing Rows int control Col Span get Span idx computing Rows int denominator get Growth Ratio control Row Start control Row Span computing Rows if denominator 0 int width Hint sum Of Sizes constraints control Col Start control Col Span if width Hint SWT DEFAULT width Hint col Spacing control Col Span 1 Compute the total control size int control Size compute Control Size idx width Hint computing Rows Subtract the amount that overlaps fixed size columns control Size sum Of Sizes fixed Sizes control Row Start control Row Span Subtract the amount that overlaps spacing between cells control Size row Spacing control Row Span 1 result Math max result control Size numerator denominator return result  fixedSizes computingRows getDynamicSize fixedSizes computingRows getResizeDenominator computingRows rowSpacing computingRows verticalSpacing horizontalSpacing colSpacing computingRows horizontalSpacing verticalSpacing numControls gridInfo numControls controlRowStart gridInfo getStartPos computingRows controlRowSpan getSpan computingRows controlColStart gridInfo getStartPos computingRows controlColSpan getSpan computingRows getGrowthRatio controlRowStart controlRowSpan computingRows widthHint sumOfSizes controlColStart controlColSpan widthHint widthHint colSpacing controlColSpan controlSize computeControlSize widthHint computingRows controlSize sumOfSizes fixedSizes controlRowStart controlRowSpan controlSize rowSpacing controlRowSpan controlSize
Computes one dimension of a control s size param control the index of the control being computed param constraint the other dimension of the control s size or SWT DEFAULT if unknown param computing Height if true this method returns a height Else it returns a width return the preferred height or width of the control in pixels int compute Control Size int control int constraint boolean computing Height Cell Data data grid Info get Cell Data control If we re looking for the preferred size of the control without hints if constraint SWT DEFAULT Point result data compute Size cache get Cache control SWT DEFAULT SWT DEFAULT Return result if computing Height return result y return result x Compute a height if computing Height return data compute Size cache get Cache control constraint SWT DEFAULT y return data compute Size cache get Cache control SWT DEFAULT constraint x  computingHeight computeControlSize computingHeight CellData gridInfo getCellData computeSize getCache computingHeight computingHeight computeSize getCache computeSize getCache
Returns the relative amount that a control starting on the given row and spanning the given length will contribute param start param length param computing Rows return int get Growth Ratio int start int length boolean computing Rows boolean will Grow false int sum 0 int end start length for int idx start idx end idx Row row get Row idx computing Rows if row larger Than Children row grows will Grow true sum row size if will Grow return 0 return sum  computingRows getGrowthRatio computingRows willGrow getRow computingRows largerThanChildren willGrow willGrow
int compute Min Sizes int constraints boolean computing Rows We cache the result of this function since it might be called more than once for a single size computation int result computing Rows cached Row Min cached Col Min if result null int column Spacing int row Spacing if computing Rows column Spacing horizontal Spacing row Spacing vertical Spacing else column Spacing vertical Spacing row Spacing horizontal Spacing int row Count grid Info get Num Rows computing Rows result new int row Count int col Count grid Info get Num Rows computing Rows int row Controls new int col Count int last Growing Row 1 for int idx 0 idx row Count idx Row row get Row idx computing Rows if row grows There is no minimum size for growing rows last Growing Row idx result idx 0 else result idx row size if row larger Than Children Determine which controls are in this row grid Info get Row row Controls idx computing Rows for int col Idx 0 col Idx row Controls length col Idx int control row Controls col Idx The get Row method will insert 1 into empty cells skip these if control 1 int control Start grid Info get Start Pos control computing Rows int control Span get Span control computing Rows If the control ends on this row and does not span any growing rows if control Start control Span 1 idx control Start last Growing Row int control Col Start grid Info get Start Pos control computing Rows int control Col Span get Span control computing Rows int control Row Span get Span control computing Rows Compute the width constraint for this control int spanned Width sum Of Sizes constraints control Col Start control Col Span if spanned Width SWT DEFAULT spanned Width column Spacing control Span 1 int control Height compute Control Size control spanned Width computing Rows Determine how much of the control spans already allocated columns int allocated Height sum Of Sizes result control Col Start control Row Span 1 row Spacing control Row Span 1 result idx Math max result idx control Height allocated Height Cache this result if computing Rows cached Row Min result else cached Col Min result return result  computeMinSizes computingRows computingRows cachedRowMin cachedColMin columnSpacing rowSpacing computingRows columnSpacing horizontalSpacing rowSpacing verticalSpacing columnSpacing verticalSpacing rowSpacing horizontalSpacing rowCount gridInfo getNumRows computingRows rowCount colCount gridInfo getNumRows computingRows rowControls colCount lastGrowingRow rowCount getRow computingRows lastGrowingRow largerThanChildren gridInfo getRow rowControls computingRows colIdx colIdx rowControls colIdx rowControls colIdx getRow controlStart gridInfo getStartPos computingRows controlSpan getSpan computingRows controlStart controlSpan controlStart lastGrowingRow controlColStart gridInfo getStartPos computingRows controlColSpan getSpan computingRows controlRowSpan getSpan computingRows spannedWidth sumOfSizes controlColStart controlColSpan spannedWidth spannedWidth columnSpacing controlSpan controlHeight computeControlSize spannedWidth computingRows allocatedHeight sumOfSizes controlColStart controlRowSpan rowSpacing controlRowSpan controlHeight allocatedHeight computingRows cachedRowMin cachedColMin
Returns the height constraints that should be used when computing column widths Requires init Grid to have been called first param result Will contain the height constraint for row i in the ith position of the array or SWT DEFAULT if there is no constraint on that row private int compute Constraints boolean horizontal Initialize the height constraints for each row basically these will always be SWT DEFAULT except for rows of type Fixed Row which have a constant height int num Rows grid Info get Num Rows horizontal int result new int num Rows for int idx 0 idx num Rows idx Row row get Row idx horizontal if row grows row larger Than Children result idx row size else result idx SWT DEFAULT return result  initGrid computeConstraints FixedRow numRows gridInfo getNumRows numRows numRows getRow largerThanChildren
Computes the total greediness of all rows return the total greediness of all rows private int get Resize Denominator boolean horizontal int result 0 int num Rows grid Info get Num Rows horizontal for int idx 0 idx num Rows idx Row row get Row idx horizontal if row grows result row size return result  getResizeDenominator numRows gridInfo getNumRows numRows getRow
protected int get Span int control Id boolean is Row Cell Data data grid Info get Cell Data control Id if is Row return data vertical Span return data horizontal Span  getSpan controlId isRow CellData gridInfo getCellData controlId isRow verticalSpan horizontalSpan
Returns the total space that will be required for margins and spacing between and around cells init Grid must have been called first return private Point total Empty Space int num Rows grid Info get Rows return new Point 2 margin Width grid Info get Cols 1 horizontal Spacing 2 margin Height num Rows 1 vertical Spacing  initGrid totalEmptySpace numRows gridInfo getRows marginWidth gridInfo getCols horizontalSpacing marginHeight numRows verticalSpacing
Returns the absolute positions of each row given the start position row sizes and row spacing param start Pos position of the initial row param sizes array of row sizes pixels param spacing space between each row pixels return array of row positions The result size is sizes length 1 The last entry is the position of the end of the layout private static int compute Row Positions int start Pos int sizes int spacing int result new int sizes length 1 result 0 start Pos for int idx 0 idx sizes length idx result idx 1 result idx sizes idx spacing return result  startPos computeRowPositions startPos startPos
protected void layout Composite composite boolean flush Cache Control children composite get Children init Grid children if flush Cache cache flush Point empty Space total Empty Space Compute the area actually available for controls once the margins and spacing is removed int available Width composite get Client Area width empty Space x int available Height composite get Client Area height empty Space y int heights compute Constraints true int widths new int grid Info get Cols Compute the actual column widths widths compute Sizes heights available Width false Compute the actual row heights based on the actual column widths heights compute Sizes widths available Height true Rectangle current Cell new Rectangle 0 0 0 0 int starty compute Row Positions composite get Client Area y margin Height heights vertical Spacing int startx compute Row Positions composite get Client Area x margin Width widths horizontal Spacing int num Children grid Info controls length for int control Id 0 control Id num Children control Id Cell Data data grid Info get Cell Data control Id int row grid Info control Row control Id int col grid Info control Col control Id current Cell x startx col current Cell width startx col data horizontal Span current Cell x horizontal Spacing current Cell y starty row current Cell height starty row data vertical Span current Cell y vertical Spacing data position Control cache get Cache control Id current Cell  flushCache getChildren initGrid flushCache emptySpace totalEmptySpace availableWidth getClientArea emptySpace availableHeight getClientArea emptySpace computeConstraints gridInfo getCols computeSizes availableWidth computeSizes availableHeight currentCell computeRowPositions getClientArea marginHeight verticalSpacing computeRowPositions getClientArea marginWidth horizontalSpacing numChildren gridInfo controlId controlId numChildren controlId CellData gridInfo getCellData controlId gridInfo controlRow controlId gridInfo controlCol controlId currentCell currentCell horizontalSpan currentCell horizontalSpacing currentCell currentCell verticalSpan currentCell verticalSpacing positionControl getCache controlId currentCell
return public int get Columns return num Cols  getColumns numCols
public boolean can Grow Composite composite boolean horizontally init Grid composite get Children int num Rows grid Info get Num Rows horizontally for int idx 0 idx num Rows idx Row row get Row idx horizontally if row grows return true return false  canGrow initGrid getChildren numRows gridInfo getNumRows numRows getRow

Returns the minimum size for the given composite That is this returns the smallest values that will have any effect when passed into the composite s set Size method Passing any smaller value is equivalent to passing the minimum size p This method is intended for use by layouts The layout can use this information when determining its preferred size Returning a preferred size smaller than the composite s minimum size is pointless since the composite could never be set to that size The layout may choose a different preferred size in this situation p p Note that this method is only concerned with restrictions imposed by the composite not it s layout If the only restriction on the composite s size is imposed by the layout then this method returns 0 0 p p Currently SWT does not expose this information through API so this method is developed using trial and error Whenever a composite is discovered that will not accept sizes below a certain threshold on some platform this method should be updated to reflect that fact p p At this time the only known composite that has a minimum size are Shells p param to Compute the composite whose minimum size is being computed return a size in pixels which is the smallest value that can be passed into the composite s set Size method static Point compute Minimum Size Composite to Compute if to Compute instanceof Shell if minimum Shell Size null Shell test Shell new Shell Shell to Compute SWT DIALOG TRIM SWT RESIZE test Shell set Size 0 0 minimum Shell Size test Shell get Size test Shell dispose return minimum Shell Size If any other composites are discovered to have minimum sizes add heuristics for them here Otherwise the composite can be reduced to size 0 0 return zero  setSize toCompute setSize computeMinimumSize toCompute toCompute minimumShellSize testShell toCompute DIALOG_TRIM testShell setSize minimumShellSize testShell getSize testShell minimumShellSize
Returns the Cell Data associated with the given control If the control does not have any layout data associated with it a default object is returned If the control has a Grid Data object associated with it an equivalent Cell Data object will be returned param control return static Cell Data get Data Control control Object layout Data control get Layout Data Cell Data data null if layout Data instanceof Cell Data data Cell Data layout Data else if layout Data instanceof Grid Data data new Cell Data Grid Data layout Data if data null data default Data return data  CellData GridData CellData CellData getData layoutData getLayoutData CellData layoutData CellData CellData layoutData layoutData GridData CellData GridData layoutData defaultData

Initialize the grid param new Controls param cols public void init Grid Control new Controls Cell Layout layout cols layout get Columns controls new Controls int area 0 int total Width 0 control Row new int controls length control Col new int controls length Get the Cell Data objects for each control and compute the total number of cells spanned by controls in this layout cell Data new Cell Data controls length for int idx 0 idx controls length idx if controls idx null continue Cell Data next Cell Layout Util get Data controls idx cell Data idx next area next horizontal Span next vertical Span total Width next horizontal Span Compute the number of columns if cols 0 cols total Width Compute the number of rows rows area cols if area cols 0 Ensure we count any partial rows rows area rows cols Allocate the grid Info array grid Info new int area for int idx 0 idx area idx grid Info idx 1 int info Idx 0 Compute the positions of each control for int idx 0 idx controls length idx Cell Data data cell Data idx Find an empty position to insert the control while grid Info info Idx 0 info Idx control Row idx info Idx cols control Col idx info Idx cols Insert the new control here for int row Idx 0 row Idx data vertical Span row Idx for int col Idx 0 col Idx data horizontal Span col Idx grid Info info Idx row Idx cols col Idx idx info Idx data horizontal Span  newControls initGrid newControls CellLayout getColumns newControls totalWidth controlRow controlCol CellData cellData CellData CellData CellLayoutUtil getData cellData horizontalSpan verticalSpan totalWidth horizontalSpan totalWidth gridInfo gridInfo gridInfo infoIdx CellData cellData gridInfo infoIdx infoIdx controlRow infoIdx controlCol infoIdx rowIdx rowIdx verticalSpan rowIdx colIdx colIdx horizontalSpan colIdx gridInfo infoIdx rowIdx colIdx infoIdx horizontalSpan
public int get Rows return rows  getRows
public int get Start Pos int control boolean row if row return control Row control else return control Col control  getStartPos controlRow controlCol
Returns the number of rows or columns param is Row if true returns the number of rows If false returns the number of columns return public int get Num Rows boolean is Row if is Row return rows else return cols  isRow getNumRows isRow isRow
public void get Row int result int row Id boolean horizontal if horizontal int prev 1 for int col Idx 0 col Idx cols col Idx int next grid Info cols row Id col Idx if prev next result col Idx 1 else result col Idx next prev next else int prev 1 for int row Idx 0 row Idx rows row Idx int next grid Info cols row Idx row Id if prev next result row Idx 1 else result row Idx next prev next  getRow rowId colIdx colIdx colIdx gridInfo rowId colIdx colIdx colIdx rowIdx rowIdx rowIdx gridInfo rowIdx rowId rowIdx rowIdx
public Cell Data get Cell Data int control Id return cell Data control Id  CellData getCellData controlId cellData controlId
public int get Cols return cols  getCols

Not intended to be instantiated private Layout Helper no op  LayoutHelper
public void perspective Activated I Workbench Page page I Perspective Descriptor new Perspective if part Perspective new Perspective part Page get Workbench Window remove Perspective Listener this try page show View view Id catch Part Init Exception e Workbench Plugin log e get Message  perspectiveActivated IWorkbenchPage IPerspectiveDescriptor newPerspective partPerspective newPerspective partPage getWorkbenchWindow removePerspectiveListener showView viewId PartInitException WorkbenchPlugin getMessage
public void perspective Changed I Workbench Page page I Perspective Descriptor perspective String change Id no op  perspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId
public void identifier Changed Identifier Event identifier Event if identifier Event has Enabled Changed I Identifier this Identifier identifier Event get Identifier if this Identifier is Enabled show view this Identifier remove Identifier Listener this I Workbench Page active Page part Page get Workbench Window get Active Page if part Page active Page part Perspective active Page get Perspective show immediately try part Page show View view Id catch Part Init Exception e Workbench Plugin log e get Message else show when the perspective becomes active part Page get Workbench Window add Perspective Listener new I Perspective Listener non Javadoc see org eclipse ui I Perspective Listener perspective Activated org eclipse ui I Workbench Page org eclipse ui I Perspective Descriptor public void perspective Activated I Workbench Page page I Perspective Descriptor new Perspective if part Perspective new Perspective part Page get Workbench Window remove Perspective Listener this try page show View view Id catch Part Init Exception e Workbench Plugin log e get Message non Javadoc see org eclipse ui I Perspective Listener perspective Changed org eclipse ui I Workbench Page org eclipse ui I Perspective Descriptor java lang String public void perspective Changed I Workbench Page page I Perspective Descriptor perspective String change Id no op  identifierChanged IdentifierEvent identifierEvent identifierEvent hasEnabledChanged IIdentifier thisIdentifier identifierEvent getIdentifier thisIdentifier isEnabled thisIdentifier removeIdentifierListener IWorkbenchPage activePage partPage getWorkbenchWindow getActivePage partPage activePage partPerspective activePage getPerspective partPage showView viewId PartInitException WorkbenchPlugin getMessage partPage getWorkbenchWindow addPerspectiveListener IPerspectiveListener IPerspectiveListener perspectiveActivated IWorkbenchPage IPerspectiveDescriptor perspectiveActivated IWorkbenchPage IPerspectiveDescriptor newPerspective partPerspective newPerspective partPage getWorkbenchWindow removePerspectiveListener showView viewId PartInitException WorkbenchPlugin getMessage IPerspectiveListener perspectiveChanged IWorkbenchPage IPerspectiveDescriptor perspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId
Creates a series of listeners that will activate the provided view on the provided page layout when code I Idenfier code enablement changes The rules for this activation are as follows p ul li if the identifier becomes enabled and the perspective of the page layout is the currently active perspective in its window then activate the views immediately li if the identifier becomes enabled and the perspective of the page layout is not the currently active perspecitve in its window then add an code I Perspective Listener code to the window and activate the views when the perspective becomes active param page Layout code Page Layout code param view Id the view id to activate upon code I Identifier code enablement public static final void add View Activator Page Layout page Layout final String view Id if view Id null return View Factory view Factory page Layout get View Factory final I Workbench Page part Page view Factory get Workbench Page if part Page null return final I Perspective Descriptor part Perspective page Layout get Descriptor I Workbench Activity Support support PlatformUI get Workbench get Activity Support I View Descriptor descriptor view Factory get View Registry find view Id if descriptor instanceof I Plugin Contribution return I Identifier identifier support get Activity Manager get Identifier Workbench Activity Helper create Unified Id I Plugin Contribution descriptor identifier add Identifier Listener new I Identifier Listener non Javadoc see org eclipse ui activities I Identifier Listener identifier Changed org eclipse ui activities Identifier Event public void identifier Changed Identifier Event identifier Event if identifier Event has Enabled Changed I Identifier this Identifier identifier Event get Identifier if this Identifier is Enabled show view this Identifier remove Identifier Listener this I Workbench Page active Page part Page get Workbench Window get Active Page if part Page active Page part Perspective active Page get Perspective show immediately try part Page show View view Id catch Part Init Exception e Workbench Plugin log e get Message else show when the perspective becomes active part Page get Workbench Window add Perspective Listener new I Perspective Listener non Javadoc see org eclipse ui I Perspective Listener perspective Activated org eclipse ui I Workbench Page org eclipse ui I Perspective Descriptor public void perspective Activated I Workbench Page page I Perspective Descriptor new Perspective if part Perspective new Perspective part Page get Workbench Window remove Perspective Listener this try page show View view Id catch Part Init Exception e Workbench Plugin log e get Message non Javadoc see org eclipse ui I Perspective Listener perspective Changed org eclipse ui I Workbench Page org eclipse ui I Perspective Descriptor java lang String public void perspective Changed I Workbench Page page I Perspective Descriptor perspective String change Id no op  IIdenfier IPerspectiveListener pageLayout PageLayout viewId IIdentifier addViewActivator PageLayout pageLayout viewId viewId ViewFactory viewFactory pageLayout getViewFactory IWorkbenchPage partPage viewFactory getWorkbenchPage partPage IPerspectiveDescriptor partPerspective pageLayout getDescriptor IWorkbenchActivitySupport getWorkbench getActivitySupport IViewDescriptor viewFactory getViewRegistry viewId IPluginContribution IIdentifier getActivityManager getIdentifier WorkbenchActivityHelper createUnifiedId IPluginContribution addIdentifierListener IIdentifierListener IIdentifierListener identifierChanged IdentifierEvent identifierChanged IdentifierEvent identifierEvent identifierEvent hasEnabledChanged IIdentifier thisIdentifier identifierEvent getIdentifier thisIdentifier isEnabled thisIdentifier removeIdentifierListener IWorkbenchPage activePage partPage getWorkbenchWindow getActivePage partPage activePage partPerspective activePage getPerspective partPage showView viewId PartInitException WorkbenchPlugin getMessage partPage getWorkbenchWindow addPerspectiveListener IPerspectiveListener IPerspectiveListener perspectiveActivated IWorkbenchPage IPerspectiveDescriptor perspectiveActivated IWorkbenchPage IPerspectiveDescriptor newPerspective partPerspective newPerspective partPage getWorkbenchWindow removePerspectiveListener showView viewId PartInitException WorkbenchPlugin getMessage IPerspectiveListener perspectiveChanged IWorkbenchPage IPerspectiveDescriptor perspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId
Create the view If it s already been been created in the provided factory return the shared instance param factory the code View Factory code to use param viewID the view id to use return the new code View Pane code throws Part Init Exception thrown if there is a problem creating the view public static final View Pane create View View Factory factory String view Id throws Part Init Exception Workbench Part Reference ref Workbench Part Reference factory create View view Id View Pane new Part View Pane ref get Pane if new Part null Workbench Page page Workbench Page ref get Page new Part new View Pane I View Reference ref page ref set Pane new Part return new Part  ViewFactory ViewPane PartInitException ViewPane createView ViewFactory viewId PartInitException WorkbenchPartReference WorkbenchPartReference createView viewId ViewPane newPart ViewPane getPane newPart WorkbenchPage WorkbenchPage getPage newPart ViewPane IViewReference setPane newPart newPart
Create the view with a specified theme If it s already been been created in the provided factory return the shared instance param factory the code View Factory code to use param viewID the view id to use return the new code View Pane code throws Part Init Exception thrown if there is a problem creating the view issue view should refer to current perspective for theme setting public static final View Pane create View View Factory factory String view Id String theme throws Part Init Exception Workbench Part Reference ref Workbench Part Reference factory create View view Id View Pane new Part View Pane ref get Pane if new Part null Workbench Page page Workbench Page ref get Page new Part new View Pane I View Reference ref page ref set Pane new Part return new Part  ViewFactory ViewPane PartInitException ViewPane createView ViewFactory viewId PartInitException WorkbenchPartReference WorkbenchPartReference createView viewId ViewPane newPart ViewPane getPane newPart WorkbenchPage WorkbenchPage getPage newPart ViewPane IViewReference setPane newPart newPart

public interface I Caching Layout Flushes cached data for the given control public void flush Control dirty Control  ICachingLayout dirtyControl

Creates an empty layout cache public Layout Cache  LayoutCache
Creates a cache for the given array of controls param controls public Layout Cache Control controls rebuild Cache controls  LayoutCache rebuildCache
Returns the size cache for the given control param idx return public Size Cache get Cache int idx return caches idx  SizeCache getCache
Sets the controls that are being cached here If these are the same controls that were used last time this method does nothing Otherwise the cache is flushed and a new cache is created for the new controls param controls public void set Controls Control controls If the number of controls has changed discard the entire cache if controls length caches length rebuild Cache controls return for int idx 0 idx controls length idx caches idx set Control controls idx  setControls rebuildCache setControl
Creates a new size cache for the given set of controls discarding any existing cache param controls the controls whose size is being cached private void rebuild Cache Control controls Size Cache new Cache new Size Cache controls length for int idx 0 idx controls length idx Try to reuse existing caches if possible if idx caches length new Cache idx caches idx new Cache idx set Control controls idx else new Cache idx new Size Cache controls idx caches new Cache  rebuildCache SizeCache newCache SizeCache newCache newCache setControl newCache SizeCache newCache
Computes the preferred size of the nth control param control Index index of the control whose size will be computed param width Hint width of the control or SWT DEFAULT if unknown param height Hint height of the control or SWT DEFAULT if unknown return the preferred size of the control public Point compute Size int control Index int width Hint int height Hint return caches control Index compute Size width Hint height Hint  controlIndex widthHint heightHint computeSize controlIndex widthHint heightHint controlIndex computeSize widthHint heightHint
Flushes the cache for the given control This should be called if exactly one of the controls has changed but the remaining controls remain unmodified param control Index public void flush int control Index caches control Index flush  controlIndex controlIndex controlIndex
Flushes the cache public void flush for int idx 0 idx caches length idx caches idx flush 

Should be called whenever a control s contents have changed Will trigger a layout parent controls if necessary param changed Control public static void resize Control changed Control Composite parent changed Control get Parent Layout parent Layout parent get Layout if parent Layout instanceof I Caching Layout I Caching Layout parent Layout flush changed Control if parent instanceof Shell parent layout true else Rectangle current Bounds parent get Bounds resize parent If the parent was resized then it has already triggered a layout Otherwise we need to manually force it to layout again if current Bounds equals parent get Bounds parent layout true  changedControl changedControl changedControl getParent parentLayout getLayout parentLayout ICachingLayout ICachingLayout parentLayout changedControl currentBounds getBounds currentBounds getBounds

Presentation Part constructor comment public Layout Part String id super this id id  PresentationPart LayoutPart
Adds a property change listener to this action Has no effect if an identical listener is already registered param listener a property change listener public void add Property Change Listener I Property Change Listener listener property Listeners add listener  addPropertyChangeListener IPropertyChangeListener propertyListeners
Removes the given listener from this action Has no effect if an identical listener is not registered param listener a property change listener public void remove Property Change Listener I Property Change Listener listener property Listeners remove listener  removePropertyChangeListener IPropertyChangeListener propertyListeners
property Listeners remove listener Creates the SWT control abstract public void create Control Composite parent  propertyListeners createControl
abstract public void create Control Composite parent Disposes the SWT control public void dispose  createControl
Gets the presentation bounds public Rectangle get Bounds return new Rectangle 0 0 0 0  getBounds
Gets the parent for this part p In general this is non null if the object has been added to a container and the container s widgetry exists The exception to this rule is Part Placeholders created when restoring a View Stack using restore State which point to the View Stack even if its widgetry doesn t exist yet Returns null in the remaining cases p p TODO change the semantics of this method to always point to the parent container regardless of whether its widgetry exists Locate and refactor code that is currently depending on the special cases p public I Layout Container get Container return container  PartPlaceholders ViewStack restoreState ViewStack ILayoutContainer getContainer
return container Get the part control This method may return null abstract public Control get Control  getControl
Gets the ID for this part public String getID return id 
Returns the compound ID for this part The compound ID is of the form primary Id secondary Id return the compound ID for this part public String get Compound Id return getID  primaryId secondaryId getCompoundId
public boolean is Compressible return false  isCompressible
Return the preference store for layout parts private I Preference Store get Preference Store return Workbench Plugin get Default get Preference Store  IPreferenceStore getPreferenceStore WorkbenchPlugin getDefault getPreferenceStore
Return whether the window s shell is activated package boolean get Shell Activated Window window get Window if window instanceof Workbench Window return Workbench Window window get Shell Activated else return false  getShellActivated getWindow WorkbenchWindow WorkbenchWindow getShellActivated
Gets the presentation size public Point get Size Rectangle r get Bounds Point pt Size new Point r width r height return pt Size  getSize getBounds ptSize ptSize
get Minimum Width added by cagatayk acm org Returns the minimum width a part can have Subclasses may override as necessary public int get Minimum Width return 0  getMinimumWidth getMinimumWidth
get Minimum Height added by cagatayk acm org Returns the minimum height a part can have Subclasses may override as necessary public int get Minimum Height return 0  getMinimumHeight getMinimumHeight
Returns the top level window for a part public Window get Window Control ctrl get Control if ctrl null Object data ctrl get Shell get Data if data instanceof Window return Window data return null  getWindow getControl getShell getData
Returns the workbench window window for a part public I Workbench Window get Workbench Window Window parent Window get Window if parent Window instanceof I Workbench Window return I Workbench Window parent Window if parent Window instanceof Detached Window return Detached Window parent Window get Workbench Page get Workbench Window return null  IWorkbenchWindow getWorkbenchWindow parentWindow getWindow parentWindow IWorkbenchWindow IWorkbenchWindow parentWindow parentWindow DetachedWindow DetachedWindow parentWindow getWorkbenchPage getWorkbenchWindow
Move the control over another one public void move Above Control ref Control  moveAbove refControl
Reparent a part public void reparent Composite new Parent Control control get Control if control null control get Parent new Parent return if control is Reparentable WARNING The commented code here doesn t work but something similar will be needed to get undockable views working on all platforms dispose create Control new Parent else make control small in case it is not resized with other controls control set Bounds 0 0 0 0 By setting the control to disabled before moving it we ensure that the focus goes away from the control and its children and moves somewhere else boolean enabled control get Enabled control set Enabled false control set Parent new Parent control set Enabled enabled  newParent getControl getParent newParent isReparentable createControl newParent setBounds getEnabled setEnabled setParent newParent setEnabled
Returns true if this part is visible public boolean is Visible Control ctrl get Control if ctrl null ctrl is Disposed return ctrl is Visible return false  isVisible getControl isDisposed isVisible
Shows the receiver if code visible code is true otherwise hide it public void set Visible boolean make Visible Control ctrl get Control if ctrl null ctrl is Disposed if make Visible ctrl get Visible return if make Visible is Focus Ancestor ctrl Workaround for Bug 60970 Editor Mgmt set Active called on an editor when it does not have focus Force focus on the shell so that when ctrl is hidden SWT does not try to send focus elsewhere which may cause some other part to be activated which affects the part activation order and can cause flicker ctrl get Shell force Focus ctrl set Visible make Visible final Object listeners property Listeners get Listeners if listeners length 0 Boolean old Value make Visible Boolean FALSE Boolean TRUE Boolean new Value make Visible Boolean TRUE Boolean FALSE Property Change Event event new Property Change Event this PROP VISIBILITY old Value new Value for int i 0 i listeners length i I Property Change Listener listeners i property Change event  setVisible makeVisible getControl isDisposed makeVisible getVisible makeVisible isFocusAncestor EditorMgmt setActive getShell forceFocus setVisible makeVisible propertyListeners getListeners oldValue makeVisible newValue makeVisible PropertyChangeEvent PropertyChangeEvent PROP_VISIBILITY oldValue newValue IPropertyChangeListener propertyChange
Returns code true code if the given control or any of its descendents has focus private boolean is Focus Ancestor Control ctrl Control f ctrl get Display get Focus Control while f null f ctrl f f get Parent return f ctrl  isFocusAncestor getDisplay getFocusControl getParent
Sets the presentation bounds public void set Bounds Rectangle r Control ctrl get Control if ctrl null ctrl set Bounds r  setBounds getControl setBounds
Sets the parent for this part public void set Container I Layout Container container if this container null this container was Removed this this container container  setContainer ILayoutContainer wasRemoved
Sets focus to this part public void set Focus  setFocus
Sets the part ID public void setID String str id str 
see org eclipse ui internal I Workbench Drag Drop Part get Part public Layout Part get Part return this  IWorkbenchDragDropPart getPart LayoutPart getPart
public I Presentable Part get Presentable Part return null  IPresentablePart getPresentablePart
public boolean resizes Vertically return true  resizesVertically
public void set Zoomed boolean is Zoomed I Layout Container container get Container if container null container set Zoomed is Zoomed  setZoomed isZoomed ILayoutContainer getContainer setZoomed isZoomed
return Returns the property Listeners protected Listener List get Property Listeners return property Listeners  propertyListeners ListenerList getPropertyListeners propertyListeners
Writes a description of the layout to the given string buffer This is used for drag drop test suites to determine if two layouts are the same Like a hash code the description should compare as equal iff the layouts are the same However it should be user readable in order to help debug failed tests Although these are english readable strings they do not need to be translated param buf public void describe Layout String Buffer buf I Presentable Part part get Presentable Part if part null buf append part get Name return  describeLayout StringBuffer IPresentablePart getPresentablePart getName
Returns an id representing this part suitable for use in a placeholder since 3 0 public String get Place Holder Id return getID  getPlaceHolderId
Tests the integrity of this object Throws an exception if the object s state is not internally consistent For use in test suites public void test Invariants  testInvariants

selection Listener new Selection Adapter public void widget Selected Selection Event e if e detail SWT DRAG check Drag Limit e else Layout Part Sash this widget Selected e x e y e width e height  selectionListener SelectionAdapter widgetSelected SelectionEvent checkDragLimit LayoutPartSash widgetSelected
Layout Part Sash Part Sash Container root Container int style super null this style style this root Container root Container selection Listener new Selection Adapter public void widget Selected Selection Event e if e detail SWT DRAG check Drag Limit e else Layout Part Sash this widget Selected e x e y e width e height init Drag Ratios  LayoutPartSash PartSashContainer rootContainer rootContainer rootContainer selectionListener SelectionAdapter widgetSelected SelectionEvent checkDragLimit LayoutPartSash widgetSelected initDragRatios
check Drag Limit contains changes by cagatayk acm org private void check Drag Limit Selection Event event Layout Tree root root Container get Layout Tree Layout Tree Node node root find Sash this Rectangle node Bounds node get Bounds optimization compute ratios only once per drag if min Ratio 0 min Ratio node get Minimum Ratio For node Bounds if max Ratio 0 max Ratio node get Maximum Ratio For node Bounds if style SWT VERTICAL limit drag to current node s bounds if event x node Bounds x event x node Bounds x if event x event width node Bounds x node Bounds width event x node Bounds x node Bounds width event width limit drag to current node s ratios float width node Bounds width if event x node Bounds x width min Ratio event x node Bounds x int width min Ratio if event x node Bounds x width max Ratio event x node Bounds x int width max Ratio else limit drag to current node s bounds if event y node Bounds y event y node Bounds y if event y event height node Bounds y node Bounds height event y node Bounds y node Bounds height event height limit drag to current node s ratios float height node Bounds height if event y node Bounds y height min Ratio event y node Bounds y int height min Ratio if event y node Bounds y height max Ratio event y node Bounds y int height max Ratio  checkDragLimit checkDragLimit SelectionEvent LayoutTree rootContainer getLayoutTree LayoutTreeNode findSash nodeBounds getBounds minRatio minRatio getMinimumRatioFor nodeBounds maxRatio maxRatio getMaximumRatioFor nodeBounds nodeBounds nodeBounds nodeBounds nodeBounds nodeBounds nodeBounds nodeBounds nodeBounds minRatio nodeBounds minRatio nodeBounds maxRatio nodeBounds maxRatio nodeBounds nodeBounds nodeBounds nodeBounds nodeBounds nodeBounds nodeBounds nodeBounds minRatio nodeBounds minRatio nodeBounds maxRatio nodeBounds maxRatio
Creates the control public void create Control Composite parent if sash null sash new Sash parent style sash add Selection Listener selection Listener  createControl addSelectionListener selectionListener
See Layout Part dispose public void dispose if sash null sash dispose sash null  LayoutPart
Gets the presentation bounds public Rectangle get Bounds if sash null return super get Bounds return sash get Bounds  getBounds getBounds getBounds
Returns the part control public Control get Control return sash  getControl
public String getID return null 
return null Layout Part Sash get Post Limit return post Limit  LayoutPartSash getPostLimit postLimit
return post Limit Layout Part Sash get Pre Limit return pre Limit  postLimit LayoutPartSash getPreLimit preLimit
int get Left return left  getLeft
int get Right return right  getRight
boolean is Horizontal return style SWT HORIZONTAL SWT HORIZONTAL  isHorizontal
return style SWT HORIZONTAL SWT HORIZONTAL boolean is Vertical return style SWT VERTICAL SWT VERTICAL  isVertical
return style SWT VERTICAL SWT VERTICAL void set Post Limit Layout Part Sash new Post Limit post Limit new Post Limit  setPostLimit LayoutPartSash newPostLimit postLimit newPostLimit
post Limit new Post Limit void set Pre Limit Layout Part Sash new Pre Limit pre Limit new Pre Limit  postLimit newPostLimit setPreLimit LayoutPartSash newPreLimit preLimit newPreLimit
void set Ratio float new Ratio int total left right left int total new Ratio right total left  setRatio newRatio newRatio
void set Sizes int left int right this left left this right right  setSizes
private void widget Selected int x int y int width int height Layout Tree root root Container get Layout Tree Layout Tree Node node root find Sash this Rectangle node Bounds node get Bounds Recompute ratio x node Bounds x y node Bounds y if style SWT VERTICAL set Sizes x node Bounds width x Layout Tree Node SASH WIDTH set Ratio float x node Bounds x float node Bounds width else set Sizes y node Bounds height y Layout Tree Node SASH WIDTH set Ratio float y node Bounds y float node Bounds height node set Bounds node Bounds init Drag Ratios  widgetSelected LayoutTree rootContainer getLayoutTree LayoutTreeNode findSash nodeBounds getBounds nodeBounds nodeBounds setSizes nodeBounds LayoutTreeNode SASH_WIDTH setRatio nodeBounds nodeBounds setSizes nodeBounds LayoutTreeNode SASH_WIDTH setRatio nodeBounds nodeBounds setBounds nodeBounds initDragRatios
private void init Drag Ratios min Ratio max Ratio 1f  initDragRatios minRatio maxRatio

Creates a fixed size row with the given width pixels The preferred sizes of child controls are ignored param size public Row int size larger Than Children false this size size grows false  largerThanChildren
Creates a row that automatically computes its size based on the preferred sizes of its children param growing public Row boolean growing this grows growing if growing size 100 
Creates a growing row param size Ratio determines the size of this row with respect to other growing rows for example a row with size 3 will be 3x as large as a row with size 1 param larger Than Children true iff the preferred size of this row should take into account the preferred sizes of its children public Row int size boolean larger Than Children this grows true this size size this larger Than Children larger Than Children  sizeRatio largerThanChildren largerThanChildren largerThanChildren largerThanChildren
Construct and return a typical growing row return a growing row public static Row growing return new Row 100 true 
Construct and return a growing row with custom properties param size relative size of this row with respect to other growing rows param larger Than Children true iff the preferred size of this row should be based on the preferred sizes of its children return a new Row public static Row growing int size boolean larger Than Children return new Row size larger Than Children  largerThanChildren largerThanChildren largerThanChildren
Construct and return a fixed size row The row will not grow when the layout is resized and its size will be computed from the default sizes of its children return a new Row public static Row fixed return new Row false 
Construct and return a fixed size row The row will always have the given width regardless of the size of the layout or the preferred sizes of its children param pixels size of the row return a fixed size row with the given width in pixels public static Row fixed int pixels return new Row pixels 

END OF HACK public Size Cache this null  SizeCache
Creates a cache for size computations on the given control param control the control for which sizes will be calculated or null to always return 0 0 public Size Cache Control control set Control control  SizeCache setControl
Sets the control whose size is being cached Does nothing will not even flush the cache if this is the same control as last time param new Control the control whose size is being cached or null to always return 0 0 public void set Control Control new Control if new Control control control new Control if control null independent Dimensions true preferred Width Or Larger Is Minimum Height false width Adjustment 0 height Adjustment 0 else independent Dimensions independent Length And Width control preferred Width Or Larger Is Minimum Height is Preferred Width Maximum control compute Hint Offset control flush  newControl setControl newControl newControl newControl independentDimensions preferredWidthOrLargerIsMinimumHeight widthAdjustment heightAdjustment independentDimensions independentLengthAndWidth preferredWidthOrLargerIsMinimumHeight isPreferredWidthMaximum computeHintOffset
Returns the control whose size is being cached return the control whose size is being cached or null if this cache always returns 0 0 public Control get Control return control  getControl
Flush the cache should be called if the control s contents may have changed since the last query public void flush flush true 
public void flush boolean recursive preferred Size null cached Width null cached Height null this flush Children recursive  preferredSize cachedWidth cachedHeight flushChildren
private Point get Preferred Size if preferred Size null preferred Size compute Size control SWT DEFAULT SWT DEFAULT return preferred Size  getPreferredSize preferredSize preferredSize computeSize preferredSize
Computes the preferred size of the control param width Hint the known width of the control pixels or SWT DEFAULT if unknown param height Hint the known height of the control pixels or SWT DEFAULT if unknown return the preferred size of the control public Point compute Size int width Hint int height Hint if control null return new Point 0 0 If both dimensions were supplied in the input return them verbatim if width Hint SWT DEFAULT height Hint SWT DEFAULT return new Point width Hint height Hint No hints given find the preferred size if width Hint SWT DEFAULT height Hint SWT DEFAULT return get Preferred Size If the length and width are independent compute the preferred size and adjust whatever dimension was supplied in the input if independent Dimensions Point result Geometry copy get Preferred Size if width Hint SWT DEFAULT result x width Hint if height Hint SWT DEFAULT result y height Hint return result Computing a height if height Hint SWT DEFAULT If we know the control s preferred size if preferred Size null If the given width is the preferred width then return the preferred size if width Hint preferred Size x return preferred Size If we have a cached height measurement if cached Height null If this was measured with the same width hint if cached Height x width Hint return cached Height If this is a control where any hint larger than the preferred width results in the minimum height determine if we can compute the result based on the preferred height if preferred Width Or Larger Is Minimum Height Computed the preferred size if we don t already know it get Preferred Size If the width hint is larger than the preferred width then we can compute the result from the preferred width if width Hint preferred Size x Point result Geometry copy preferred Size result x width Hint return result Else we can t find an existing size in the cache so recompute it from scratch cached Height compute Size control width Hint height Hint return cached Height Computing a width if width Hint SWT DEFAULT If we know the control s preferred size if preferred Size null If the given height is the preferred height then return the preferred size if height Hint preferred Size y return preferred Size If we have a cached width measurement if cached Width null If this was measured with the same height hint if cached Width y height Hint return cached Width cached Width compute Size control width Hint height Hint return cached Width return compute Size control width Hint height Hint  widthHint heightHint computeSize widthHint heightHint widthHint heightHint widthHint heightHint widthHint heightHint getPreferredSize independentDimensions getPreferredSize widthHint widthHint heightHint heightHint heightHint preferredSize widthHint preferredSize preferredSize cachedHeight cachedHeight widthHint cachedHeight preferredWidthOrLargerIsMinimumHeight getPreferredSize widthHint preferredSize preferredSize widthHint cachedHeight computeSize widthHint heightHint cachedHeight widthHint preferredSize heightHint preferredSize preferredSize cachedWidth cachedWidth heightHint cachedWidth cachedWidth computeSize widthHint heightHint cachedWidth computeSize widthHint heightHint
Compute the control s size and ensure that non default hints are returned verbatim this tries to compensate for SWT s hints which aren t really the outer width of the control param control param width Hint param height Hint return private Point compute Size Control control int width Hint int height Hint int adjusted Width Hint width Hint SWT DEFAULT SWT DEFAULT Math max 0 width Hint width Adjustment int adjusted Height Hint height Hint SWT DEFAULT SWT DEFAULT Math max 0 height Hint height Adjustment Point result control compute Size adjusted Width Hint adjusted Height Hint flush Children flush Children false If the amounts we subtracted off the width Hint and height Hint didn t do the trick then manually adjust the result to ensure that a non default hint will return that result verbatim if width Hint SWT DEFAULT result x width Hint if height Hint SWT DEFAULT result y height Hint return result  widthHint heightHint computeSize widthHint heightHint adjustedWidthHint widthHint widthHint widthAdjustment adjustedHeightHint heightHint heightHint heightAdjustment computeSize adjustedWidthHint adjustedHeightHint flushChildren flushChildren widthHint heightHint widthHint widthHint heightHint heightHint
Returns true if the preferred length of the given control is independent of the width and visa versa If this returns true then changing the width Hint argument to control compute Size will never change the resulting height and changing the height Hint will never change the resulting width Returns false if unknown p This information can be used to improve caching Incorrectly returning a value of false may decrease performance but incorrectly returning a value of true will generate incorrect layouts so always return false if unsure p param control return static boolean independent Length And Width Control control if control null return true if control instanceof Button control instanceof Progress Bar control instanceof Sash control instanceof Scale control instanceof Slider control instanceof List control instanceof Combo control instanceof Tree return true if control instanceof Label control instanceof Text return control get Style SWT WRAP 0 Unless we re certain that the control has this property we should return false return false  widthHint computeSize heightHint independentLengthAndWidth ProgressBar getStyle
Try to figure out how much we need to subtract from the hints that we pass into the given control s compute Size method This tries to compensate for bug 46112 To be removed once SWT provides an official way to compute one dimension of a control s size given the other known dimension param control private void compute Hint Offset Control control if control instanceof Composite For composites subtract off the trim size Composite composite Composite control Rectangle trim composite compute Trim 0 0 0 0 width Adjustment trim width height Adjustment trim height else For non composites subtract off 2 the border size width Adjustment control get Border Width 2 height Adjustment width Adjustment  computeSize computeHintOffset computeTrim widthAdjustment heightAdjustment widthAdjustment getBorderWidth heightAdjustment widthAdjustment
Returns true only if the control will return a constant height for any width hint larger than the preferred width Returns false if there is any situation in which the control does not have this property p Note this method is only important for wrapping controls and it can safely return false for anything else AFAIK all SWT controls have this property but to be safe they will only be added to the list once the property has been confirmed p param control return private static boolean is Preferred Width Maximum Control control return control instanceof Tool Bar control instanceof Cool Bar control instanceof Label  isPreferredWidthMaximum ToolBar CoolBar

Initialize this tree with its part public Layout Tree Layout Part part this part part  LayoutTree LayoutPart
Add the relation ship between the children in the list and returns the left children public Layout Part compute Relation Array List relations return part  LayoutPart computeRelation ArrayList
Locates the part that intersects the given point param to Find return public Layout Part find Part Point to Find return part  toFind LayoutPart findPart toFind
public boolean fixed Height return part resizes Vertically  fixedHeight resizesVertically
Dispose all Sashs in this tree public void dispose Sashes  disposeSashes
Find a Layout Part in the tree and return its sub tree Returns null if the child is not found public Layout Tree find Layout Part child if part child return null return this  LayoutPart LayoutTree LayoutPart
Find the Left Right Top and Botton sashes around this tree and set them in code sashes code public void find Sashes Part Pane Sashes sashes if get Parent null return get Parent find Sashes this sashes  findSashes PartPane getParent getParent findSashes
Find the part that is in the bottom rigth possition public Layout Part find Bottom Right return part  LayoutPart findBottomRight
Find a sash in the tree and return its sub tree Returns null if the sash is not found public Layout Tree Node find Sash Layout Part Sash sash return null  LayoutTreeNode findSash LayoutPartSash
Return the bounds of this tree which is the rectangle that contains all Controls in this tree public Rectangle get Bounds return part get Bounds  getBounds getBounds
get Minimum Width added by cagatayk acm org public int get Minimum Width return part get Minimum Width  getMinimumWidth getMinimumWidth getMinimumWidth
get Minimum Height added by cagatayk acm org public int get Minimum Height return part get Minimum Height  getMinimumHeight getMinimumHeight getMinimumHeight
Returns the parent of this tree or null if it is the root public Layout Tree Node get Parent return parent  LayoutTreeNode getParent
Inserts a new child on the tree The child will be placed beside the code relative code child Returns the new root of the tree public Layout Tree insert Layout Part child boolean left Layout Part Sash sash Layout Part relative Layout Tree relative Child find relative Layout Tree Node node new Layout Tree Node sash if relative Child null Did not find the relative part Insert beside the root node set Child left child node set Child left this return node else Layout Tree Node old Parent relative Child get Parent node set Child left child node set Child left relative Child if old Parent null It was the root Return a new root return node old Parent replace Child relative Child node return this  LayoutTree LayoutPart LayoutPartSash LayoutPart LayoutTree relativeChild LayoutTreeNode LayoutTreeNode relativeChild setChild setChild LayoutTreeNode oldParent relativeChild getParent setChild setChild relativeChild oldParent oldParent replaceChild relativeChild
Returns true if this tree can be compressed and expanded return true if springy public boolean is Compressible Added for bug 19524 return part is Compressible  isCompressible isCompressible
Returns true if this tree has visible parts otherwise returns false public boolean is Visible return part instanceof Part Placeholder  isVisible PartPlaceholder
Recompute the ratios in this tree public void recompute Ratio  recomputeRatio
Find a child in the tree and remove it and its parent The other child of its parent is placed on the parent s parent Returns the new root of the tree public Layout Tree remove Layout Part child Layout Tree tree find child if tree null return this Layout Tree Node old Parent tree get Parent if old Parent null It was the root and the only child of this tree return null if old Parent get Parent null return old Parent remove tree old Parent remove tree return this  LayoutTree LayoutPart LayoutTree LayoutTreeNode oldParent getParent oldParent oldParent getParent oldParent oldParent
Resize the parts on this tree to fit in code bounds code public void set Bounds Rectangle bounds part set Bounds bounds  setBounds setBounds
Set the parent of this tree void set Parent Layout Tree Node parent this parent parent  setParent LayoutTreeNode
Set the part of this leaf void set Part Layout Part part this part part  setPart LayoutPart
Returns a string representation of this object public String to String return part to String NON NLS 2 NON NLS 1  toString toString
Create the sashes if the children are visible and dispose it if they are not public void update Sashes Composite parent  updateSashes
Writes a description of the layout to the given string buffer This is used for drag drop test suites to determine if two layouts are the same Like a hash code the description should compare as equal iff the layouts are the same However it should be user readable in order to help debug failed tests Although these are english readable strings they should not be translated or equality tests will fail p This is only intended for use by test suites p param buf public void describe Layout String Buffer buf part describe Layout buf  describeLayout StringBuffer describeLayout

final static int SASH WIDTH 3 Initialize this tree with its sash public Layout Tree Node Layout Part Sash sash super sash  SASH_WIDTH LayoutTreeNode LayoutPartSash
Traverses the tree to find the part that intersects the given point param to Find return the part that intersects the given point public Layout Part find Part Point to Find if children 0 is Visible if children 1 is Visible return null return children 1 find Part to Find else if children 1 is Visible return children 0 find Part to Find Layout Part Sash sash get Sash Rectangle bounds sash get Bounds if sash is Vertical if to Find x bounds x bounds width 2 return children 0 find Part to Find return children 1 find Part to Find else if to Find y bounds y bounds height 2 return children 0 find Part to Find return children 1 find Part to Find  toFind LayoutPart findPart toFind isVisible isVisible findPart toFind isVisible findPart toFind LayoutPartSash getSash getBounds isVertical toFind findPart toFind findPart toFind toFind findPart toFind findPart toFind
public boolean fixed Height return children 0 is Visible children 0 fixed Height children 1 is Visible children 1 fixed Height  fixedHeight isVisible fixedHeight isVisible fixedHeight
Add the relation ship between the children in the list and returns the left children public Layout Part compute Relation Array List relations Part Sash Container Relationship Info r new Part Sash Container Relationship Info r relative children 0 compute Relation relations r part children 1 compute Relation relations r left get Sash get Left r right get Sash get Right r relationship get Sash is Vertical I Page Layout RIGHT I Page Layout BOTTOM relations add 0 r return r relative  LayoutPart computeRelation ArrayList PartSashContainer RelationshipInfo PartSashContainer RelationshipInfo computeRelation computeRelation getSash getLeft getSash getRight getSash isVertical IPageLayout IPageLayout
Dispose all Sashs in this tree public void dispose Sashes children 0 dispose Sashes children 1 dispose Sashes get Sash dispose  disposeSashes disposeSashes disposeSashes getSash
Find a Layout Part in the tree and return its sub tree Returns null if the child is not found public Layout Tree find Layout Part child Layout Tree node children 0 find child if node null return node node children 1 find child return node  LayoutPart LayoutTree LayoutPart LayoutTree
Find the part that is in the bottom right position public Layout Part find Bottom Right if children 1 is Visible return children 1 find Bottom Right return children 0 find Bottom Right  LayoutPart findBottomRight isVisible findBottomRight findBottomRight
Go up in the tree finding a parent that is common of both children Return the subtree public Layout Tree Node find Common Parent Layout Part child1 Layout Part child2 return find Common Parent child1 child2 false false  LayoutTreeNode findCommonParent LayoutPart LayoutPart findCommonParent
Go up in the tree finding a parent that is common of both children Return the subtree Layout Tree Node find Common Parent Layout Part child1 Layout Part child2 boolean found Child1 boolean found Child2 if found Child1 found Child1 find child1 null if found Child2 found Child2 find child2 null if found Child1 found Child2 return this if parent null return null return parent find Common Parent child1 child2 found Child1 found Child2  LayoutTreeNode findCommonParent LayoutPart LayoutPart foundChild1 foundChild2 foundChild1 foundChild1 foundChild2 foundChild2 foundChild1 foundChild2 findCommonParent foundChild1 foundChild2
Find a sash in the tree and return its sub tree Returns null if the sash is not found public Layout Tree Node find Sash Layout Part Sash sash if this get Sash sash return this Layout Tree Node node children 0 find Sash sash if node null return node node children 1 find Sash sash if node null return node return null  LayoutTreeNode findSash LayoutPartSash getSash LayoutTreeNode findSash findSash
Sets the elements in the array of sashes with the Left Rigth Top and Botton sashes The elements may be null depending whether there is a shash beside the code part code void find Sashes Layout Tree child Part Pane Sashes sashes Sash sash Sash get Sash get Control boolean left Or Top children 0 child if sash null Layout Part Sash part Sash get Sash If the child is in the left the sash is in the rigth and so on if left Or Top if part Sash is Vertical if sashes right null sashes right sash else if sashes bottom null sashes bottom sash else if part Sash is Vertical if sashes left null sashes left sash else if sashes top null sashes top sash if get Parent null get Parent find Sashes this sashes  findSashes LayoutTree PartPane getSash getControl leftOrTop LayoutPartSash partSash getSash leftOrTop partSash isVertical partSash isVertical getParent getParent findSashes
Return the bounds of this tree which is the rectangle that contains all Controls in this tree public Rectangle get Bounds if children 0 is Visible return children 1 get Bounds if children 1 is Visible return children 0 get Bounds Rectangle left Bounds children 0 get Bounds Rectangle right Bounds children 1 get Bounds Rectangle sash Bounds get Sash get Bounds Rectangle result new Rectangle left Bounds x left Bounds y left Bounds width left Bounds height if get Sash is Vertical result width right Bounds width left Bounds width sash Bounds width result height Math max left Bounds height right Bounds height else result height right Bounds height left Bounds height sash Bounds height result width Math max left Bounds width right Bounds width return result  getBounds isVisible getBounds isVisible getBounds leftBounds getBounds rightBounds getBounds sashBounds getSash getBounds leftBounds leftBounds leftBounds leftBounds getSash isVertical rightBounds leftBounds sashBounds leftBounds rightBounds rightBounds leftBounds sashBounds leftBounds rightBounds
Returns the sash of this node public Layout Part Sash get Sash return Layout Part Sash part  LayoutPartSash getSash LayoutPartSash
Returns true if this tree has visible parts otherwise returns false public boolean is Visible return children 0 is Visible children 1 is Visible  isVisible isVisible isVisible
Remove the child and this node from the tree Layout Tree remove Layout Tree child get Sash dispose if parent null This is the root Return the other child to be the new root if children 0 child children 1 set Parent null return children 1 children 0 set Parent null return children 0 Layout Tree Node old Parent parent if children 0 child old Parent replace Child this children 1 else old Parent replace Child this children 0 return old Parent  LayoutTree LayoutTree getSash setParent setParent LayoutTreeNode oldParent oldParent replaceChild oldParent replaceChild oldParent
Replace a child with a new child and sets the new child s parent void replace Child Layout Tree old Child Layout Tree new Child if children 0 old Child children 0 new Child else if children 1 old Child children 1 new Child new Child set Parent this if children 0 is Visible children 0 is Visible get Sash dispose  replaceChild LayoutTree oldChild LayoutTree newChild oldChild newChild oldChild newChild newChild setParent isVisible isVisible getSash
Go up from the subtree and return true if all the sash are in the direction specified by code is Vertical code public boolean same Direction boolean is Vertical Layout Tree Node sub Tree boolean tree Vertical get Sash is Vertical if tree Vertical is Vertical return false while sub Tree null if this sub Tree return true if sub Tree children 0 is Visible sub Tree children 1 is Visible if sub Tree get Sash is Vertical is Vertical return false sub Tree sub Tree get Parent return true  isVertical sameDirection isVertical LayoutTreeNode subTree treeVertical getSash isVertical treeVertical isVertical subTree subTree subTree isVisible subTree isVisible subTree getSash isVertical isVertical subTree subTree getParent
Resize the parts on this tree to fit in code bounds code public void set Bounds Rectangle bounds if bounds is Empty return if children 0 is Visible children 1 set Bounds bounds return if children 1 is Visible children 0 set Bounds bounds return Rectangle left Bounds new Rectangle bounds x bounds y bounds width bounds height Rectangle right Bounds new Rectangle bounds x bounds y bounds width bounds height Rectangle sash Bounds new Rectangle bounds x bounds y bounds width bounds height int left get Sash get Left int right get Sash get Right int total left right At first I was going to have a more elaborate weighting system but all or non is sufficient double w Left left w Right right switch get Compression Bias case 1 w Left 0 0 break case 1 w Right 0 0 break default break double w Total w Left w Right if get Sash is Vertical Work on x and width left Bounds width left right Bounds width right int redistribute bounds width SASH WIDTH total left Bounds x bounds x left Bounds width Math round redistribute w Left w Total sash Bounds x left Bounds x left Bounds width sash Bounds width SASH WIDTH if children 0 fixed Height left Bounds height children 0 get Bounds height right Bounds x sash Bounds x sash Bounds width right Bounds width bounds x bounds width right Bounds x if children 1 fixed Height right Bounds height children 1 get Bounds height adjust Widths bounds left Bounds right Bounds sash Bounds else Work on y and height int redistribute bounds height SASH WIDTH total if children 0 fixed Height left Bounds height children 0 get Bounds height else if children 1 fixed Height left Bounds height bounds height children 1 get Bounds height SASH WIDTH else left Bounds height left int Math round redistribute w Left w Total sash Bounds y left Bounds y left Bounds height sash Bounds height SASH WIDTH right Bounds y sash Bounds y sash Bounds height if children 1 fixed Height right Bounds height children 1 get Bounds height else right Bounds height bounds y bounds height right Bounds y adjust Heights bounds left Bounds right Bounds sash Bounds get Sash set Bounds sash Bounds children 0 set Bounds left Bounds children 1 set Bounds right Bounds  setBounds isEmpty isVisible setBounds isVisible setBounds leftBounds rightBounds sashBounds getSash getLeft getSash getRight wLeft wRight getCompressionBias wLeft wRight wTotal wLeft wRight getSash isVertical leftBounds rightBounds SASH_WIDTH leftBounds leftBounds wLeft wTotal sashBounds leftBounds leftBounds sashBounds SASH_WIDTH fixedHeight leftBounds getBounds rightBounds sashBounds sashBounds rightBounds rightBounds fixedHeight rightBounds getBounds adjustWidths leftBounds rightBounds sashBounds SASH_WIDTH fixedHeight leftBounds getBounds fixedHeight leftBounds getBounds SASH_WIDTH leftBounds wLeft wTotal sashBounds leftBounds leftBounds sashBounds SASH_WIDTH rightBounds sashBounds sashBounds fixedHeight rightBounds getBounds rightBounds rightBounds adjustHeights leftBounds rightBounds sashBounds getSash setBounds sashBounds setBounds leftBounds setBounds rightBounds
adjust Heights added by cagatayk acm org private boolean adjust Heights Rectangle node Rectangle left Rectangle right Rectangle sash int left Adjustment 0 int right Adjustment 0 left Adjustment adjust Child Height left node true if left Adjustment 0 right height left Adjustment right Adjustment adjust Child Height right node false if right Adjustment 0 left height right Adjustment boolean adjusted left Adjustment 0 right Adjustment 0 if adjusted sash y left y left height right y sash y sash height return adjusted  adjustHeights adjustHeights leftAdjustment rightAdjustment leftAdjustment adjustChildHeight leftAdjustment leftAdjustment rightAdjustment adjustChildHeight rightAdjustment rightAdjustment leftAdjustment rightAdjustment
adjust Child Height added by cagatayk acm org private int adjust Child Height Rectangle child Bounds Rectangle node Bounds boolean left int adjustment 0 int minimum 0 minimum left Math round get Minimum Ratio For node Bounds node Bounds height Math round 1 get Maximum Ratio For node Bounds node Bounds height SASH WIDTH if minimum child Bounds height adjustment minimum child Bounds height child Bounds height minimum return adjustment  adjustChildHeight adjustChildHeight childBounds nodeBounds getMinimumRatioFor nodeBounds nodeBounds getMaximumRatioFor nodeBounds nodeBounds SASH_WIDTH childBounds childBounds childBounds
adjust Widths added by cagatayk acm org private boolean adjust Widths Rectangle node Rectangle left Rectangle right Rectangle sash int left Adjustment 0 int right Adjustment 0 left Adjustment adjust Child Width left node true if left Adjustment 0 right width left Adjustment right Adjustment adjust Child Width right node false if right Adjustment 0 left width right Adjustment boolean adjusted left Adjustment 0 right Adjustment 0 if adjusted sash x left x left width right x sash x sash width return adjusted  adjustWidths adjustWidths leftAdjustment rightAdjustment leftAdjustment adjustChildWidth leftAdjustment leftAdjustment rightAdjustment adjustChildWidth rightAdjustment rightAdjustment leftAdjustment rightAdjustment
adjust Child Width added by cagatayk acm org private int adjust Child Width Rectangle child Bounds Rectangle node Bounds boolean left int adjustment 0 int minimum 0 minimum left Math round get Minimum Ratio For node Bounds node Bounds width Math round 1 get Maximum Ratio For node Bounds node Bounds width SASH WIDTH if minimum child Bounds width adjustment minimum child Bounds width child Bounds width minimum return adjustment  adjustChildWidth adjustChildWidth childBounds nodeBounds getMinimumRatioFor nodeBounds nodeBounds getMaximumRatioFor nodeBounds nodeBounds SASH_WIDTH childBounds childBounds childBounds
get Minimum Ratio For added by cagatayk acm org Obtain the minimum ratio required to display the control on the left using its minimum dimensions public float get Minimum Ratio For Rectangle bounds float part 0 whole 0 if get Sash is Vertical part children 0 get Minimum Width whole bounds width else part children 0 get Minimum Height whole bounds height return part 0 part whole I Page Layout RATIO MIN  getMinimumRatioFor getMinimumRatioFor getSash isVertical getMinimumWidth getMinimumHeight IPageLayout RATIO_MIN
Added by hudsonr us ibm com bug 19524 public boolean is Compressible return children 0 is Compressible children 1 is Compressible  isCompressible isCompressible isCompressible
Returns 0 if there is no bias Returns 1 if the first child should be of fixed size and the second child should be compressed Returns 1 if the second child should be of fixed size return the bias public int get Compression Bias boolean left children 0 is Compressible boolean right children 1 is Compressible if left right return 0 if right return 1 return 1  getCompressionBias isCompressible isCompressible
get Maximum Ratio For added by cagatayk acm org Obtain the maximum ratio required to display the control on the right using its minimum dimensions public float get Maximum Ratio For Rectangle bounds float part 0 whole 0 if get Sash is Vertical whole bounds width part whole children 1 get Minimum Width else whole bounds height part whole children 1 get Minimum Height return part whole part SASH WIDTH whole I Page Layout RATIO MAX  getMaximumRatioFor getMaximumRatioFor getSash isVertical getMinimumWidth getMinimumHeight SASH_WIDTH IPageLayout RATIO_MAX
get Minimum Height added by cagatayk acm org Obtain the minimum height required to display all controls under this node public int get Minimum Height int left children 0 get Minimum Height int right children 1 get Minimum Height int minimum 0 if get Sash is Vertical minimum Math max left right else if left 0 right 0 minimum left right only consider sash if both children are visible fix for placeholders if children 0 is Visible children 1 is Visible minimum SASH WIDTH return minimum  getMinimumHeight getMinimumHeight getMinimumHeight getMinimumHeight getSash isVertical isVisible isVisible SASH_WIDTH
get Minimum Width added by cagatayk acm org Obtain the minimum width required to display all controls under this node public int get Minimum Width int left children 0 get Minimum Width int right children 1 get Minimum Width int minimum 0 if get Sash is Vertical minimum Math max left right else if left 0 right 0 minimum left right only consider sash if both children are visible fix for placeholders if children 0 is Visible children 1 is Visible minimum SASH WIDTH return minimum  getMinimumWidth getMinimumWidth getMinimumWidth getMinimumWidth getSash isVertical isVisible isVisible SASH_WIDTH
boolean is Left Child Layout Tree to Test return children 0 to Test  isLeftChild LayoutTree toTest toTest
Layout Tree get Child boolean left int index left 0 1 return children index  LayoutTree getChild
Sets a child in this node void set Child boolean left Layout Part part Layout Tree child new Layout Tree part set Child left child  setChild LayoutPart LayoutTree LayoutTree setChild
Sets a child in this node void set Child boolean left Layout Tree child int index left 0 1 children index child child set Parent this  setChild LayoutTree setParent
Returns a string representation of this object public String to String String s null n NON NLS 1 if part get Control null s part get Control hash Code n NON NLS 2 NON NLS 1 String result NON NLS 1 if children 0 get Parent this result result children 0 s NON NLS 2 NON NLS 1 else result result children 0 s if children 1 get Parent this result result children 1 NON NLS 2 NON NLS 1 else result result children 1 NON NLS 1 return result  toString getControl getControl hashCode getParent getParent
Create the sashes if the children are visible and dispose it if they are not public void update Sashes Composite parent if parent null return children 0 update Sashes parent children 1 update Sashes parent if children 0 is Visible children 1 is Visible get Sash create Control parent else get Sash dispose  updateSashes updateSashes updateSashes isVisible isVisible getSash createControl getSash
Writes a description of the layout to the given string buffer This is used for drag drop test suites to determine if two layouts are the same Like a hash code the description should compare as equal iff the layouts are the same However it should be user readable in order to help debug failed tests Although these are english readable strings they should not be translated or equality tests will fail param buf public void describe Layout String Buffer buf if children 0 is Visible if children 1 is Visible return children 1 describe Layout buf return if children 1 is Visible children 0 describe Layout buf return buf append NON NLS 1 children 0 describe Layout buf buf append get Sash is Vertical NON NLS 1 NON NLS 2 children 1 describe Layout buf buf append NON NLS 1  describeLayout StringBuffer isVisible isVisible describeLayout isVisible describeLayout describeLayout getSash isVertical describeLayout

Size Cache cache Trim Data int index Size Cache cache this cache cache this controls Index index  SizeCache TrimData SizeCache controlsIndex
Creates a new initially empty trim layout public Trim Layout controls new List 4 trim Sizes new int controls length for int idx 0 idx controls length idx controls idx new Linked List trim Sizes idx SWT DEFAULT  TrimLayout trimSizes LinkedList trimSizes
Sets the empty space surrounding the center area This whitespace is located between the trim and the central widget public void set Spacing int left int right int top int bottom left Spacing left right Spacing right top Spacing top bottom Spacing bottom  setSpacing leftSpacing rightSpacing topSpacing bottomSpacing
Sets the empty space around the outside of the layout This whitespace is located outside the trim widgets param margin Width param margin Height public void set Margins int margin Width int margin Height this margin Width margin Width this margin Height margin Height  marginWidth marginHeight setMargins marginWidth marginHeight marginWidth marginWidth marginHeight marginHeight
Converts an SWT position constant into an index in the controls array param position Constant one of SWT LEFT SWT RIGHT SWT TOP or SWT BOTTOM return an index into the controls array private int convert Swt Constant To Index int position Constant switch position Constant case SWT TOP return TOP case SWT BOTTOM return BOTTOM case SWT LEFT return LEFT case SWT RIGHT return RIGHT return 0  positionConstant convertSwtConstantToIndex positionConstant positionConstant
Converts an index into the controls array into the corresponding SWT constants param index return private int convert Index To Swt Constant int index switch index case TOP return SWT TOP case BOTTOM return SWT BOTTOM case LEFT return SWT LEFT case RIGHT return SWT RIGHT case NONTRIM return SWT DEFAULT return 0  convertIndexToSwtConstant
This method separates resizable controls from non resizable controls param input the list of Size Cache to filter param resizable will contain resizable controls from the input list param non Resizable will contain non resizable controls from the input list param width if true we re interested in horizontally resizable controls Else we re interested in vertically resizable controls private static void filter Resizable List input List resizable List non Resizable boolean width Iterator iter input iterator while iter has Next Size Cache next Size Cache iter next if is Resizable next get Control width resizable add next else non Resizable add next  SizeCache nonResizable filterResizable nonResizable hasNext SizeCache SizeCache isResizable getControl nonResizable
private static boolean is Resizable Control control boolean horizontally Trim Layout Data data get Data control if data resizable return false if horizontally return data width Hint SWT DEFAULT else return data height Hint SWT DEFAULT  isResizable TrimLayoutData getData widthHint heightHint
private static Trim Layout Data get Data Control control Trim Layout Data data Trim Layout Data control get Layout Data if data null data default Data return data  TrimLayoutData getData TrimLayoutData TrimLayoutData getLayoutData defaultData
private static Point compute Size Size Cache to Compute int width Hint int height Hint Trim Layout Data data get Data to Compute get Control if width Hint SWT DEFAULT width Hint data width Hint if height Hint SWT DEFAULT height Hint data height Hint if width Hint SWT DEFAULT height Hint SWT DEFAULT return to Compute compute Size width Hint height Hint return new Point width Hint height Hint  computeSize SizeCache toCompute widthHint heightHint TrimLayoutData getData toCompute getControl widthHint widthHint widthHint heightHint heightHint heightHint widthHint heightHint toCompute computeSize widthHint heightHint widthHint heightHint
private static int get Size Size Cache to Compute int hint boolean width if width return compute Size to Compute SWT DEFAULT hint x else return compute Size to Compute hint SWT DEFAULT y  getSize SizeCache toCompute computeSize toCompute computeSize toCompute
Computes the maximum dimensions of controls in the given list param controls a list of Size Caches return private static int max Dimension List controls int hint boolean width if hint SWT DEFAULT int result 0 Iterator iter controls iterator while iter has Next Size Cache next Size Cache iter next result Math max get Size next SWT DEFAULT width result return result List resizable new Array List controls size List non Resizable new Array List controls size filter Resizable controls resizable non Resizable width int result 0 int used Height 0 Iterator iter non Resizable iterator while iter has Next Size Cache next Size Cache iter next Point next Size compute Size next SWT DEFAULT SWT DEFAULT if width result Math max result next Size x used Height next Size y else result Math max result next Size y used Height next Size x if resizable size 0 int individual Hint hint used Height resizable size iter resizable iterator while iter has Next Size Cache next Size Cache iter next result Math max result get Size next individual Hint width return result  SizeCaches maxDimension hasNext SizeCache SizeCache getSize ArrayList nonResizable ArrayList filterResizable nonResizable usedHeight nonResizable hasNext SizeCache SizeCache nextSize computeSize nextSize usedHeight nextSize nextSize usedHeight nextSize individualHint usedHeight hasNext SizeCache SizeCache getSize individualHint
Sets the trim Size pixels for the given side of the layout If SWT DEFAULT then the trim size will be computed from child controls param position one of SWT TOP SWT BOTTOM SWT LEFT SWT RIGHT param size public void set Trim Size int position int size int idx convert Swt Constant To Index position trim Sizes idx size  trimSize setTrimSize convertSwtConstantToIndex trimSizes
Returns the location of the given trim control For example returns SWT LEFT if the control is docked on the left SWT RIGHT if docked on the right etc Returns SWT DEFAULT if the given control is not a trim control param trim Control control to query return one of SWT LEFT SWT RIGHT SWT TOP SWT BOTTOM or SWT DEFAULT public int get Trim Location Control trim Control return convert Index To Swt Constant get Index trim Control  trimControl getTrimLocation trimControl convertIndexToSwtConstant getIndex trimControl
Adds the given control to the layout s trim at the given location This is equivalent to code add Trim control location null code param control new trim widget to be added param location one of SWT TOP SWT BOTTOM SWT LEFT SWT RIGHT public void add Trim Control control int location add Trim control location null  addTrim addTrim addTrim
Adds the given control to the layout s trim Note that this must be called for every trim control If the given widget is already a trim widget it will be moved to the new position Specifying a position allows a new widget to be inserted between existing trim widgets p For example this method allows the caller to say insert this new control as trim along the bottom of the layout to the left of this existing control p param control new trim widget to be added param location one of SWT TOP SWT BOTTOM SWT LEFT SWT RIGHT param position if null the control will be inserted as the last trim widget on this side of the layout Otherwise the control will be inserted before the given widget public void add Trim Control control int location Control position remove Trim control int index convert Swt Constant To Index location List list controls index Size Cache cache new Size Cache control insert Before list cache position map Part Onto Trim Data put control new Trim Data index cache  addTrim removeTrim convertSwtConstantToIndex SizeCache SizeCache insertBefore mapPartOntoTrimData TrimData
Inserts the given object into the list before the specified position If the given position is null the object is inserted at the end of the list param list a list of Size Cache private static void insert Before List list Size Cache cache Control position if position null int insertion Point 0 Iterator iter list iterator while iter has Next Size Cache next Size Cache iter next if next get Control position break insertion Point list add insertion Point cache else list add cache  SizeCache insertBefore SizeCache insertionPoint hasNext SizeCache SizeCache getControl insertionPoint insertionPoint
private static void remove List list Control to Remove Size Cache target null Iterator iter list iterator while iter has Next Size Cache next Size Cache iter next if next get Control to Remove target next break list remove target  toRemove SizeCache hasNext SizeCache SizeCache getControl toRemove
Removes the given trim widget Note that this has no effect if the widget is not a trim widget param to Remove public void remove Trim Control to Remove int idx get Index to Remove If this isn t a trim widget if idx NONTRIM return remove controls idx to Remove map Part Onto Trim Data remove to Remove  toRemove removeTrim toRemove getIndex toRemove toRemove mapPartOntoTrimData toRemove
Returns an index into the controls array above indicating the position where this trim control is located param to Query return private int get Index Control to Query Trim Data data Trim Data map Part Onto Trim Data get to Query if data null return NONTRIM return data controls Index  toQuery getIndex toQuery TrimData TrimData mapPartOntoTrimData toQuery controlsIndex
Removes any disposed widgets from this layout private void remove Disposed for int idx 0 idx controls length idx List ctrl controls idx if ctrl null Iterator iter ctrl iterator while iter has Next Size Cache next Size Cache iter next Control next Control next get Control if next Control is Disposed get Index next Control idx iter remove  removeDisposed hasNext SizeCache SizeCache nextControl getControl nextControl isDisposed getIndex nextControl
Returns the size of the trim on each side of the layout return an array of trim sizes pixels See the index constants above for the meaning of the indices private int get Trim Sizes int width Hint int height Hint int trim Size new int controls length for int idx 0 idx trim Sizes length idx if controls idx is Empty trim Size idx 0 else trim Size idx trim Sizes idx if trim Size TOP SWT DEFAULT trim Size TOP max Dimension controls TOP width Hint false if trim Size BOTTOM SWT DEFAULT trim Size BOTTOM max Dimension controls BOTTOM width Hint false if trim Size LEFT SWT DEFAULT trim Size LEFT max Dimension controls LEFT height Hint true if trim Size RIGHT SWT DEFAULT trim Size RIGHT max Dimension controls RIGHT height Hint true return trim Size  getTrimSizes widthHint heightHint trimSize trimSizes isEmpty trimSize trimSize trimSizes trimSize trimSize maxDimension widthHint trimSize trimSize maxDimension widthHint trimSize trimSize maxDimension heightHint trimSize trimSize maxDimension heightHint trimSize
protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache Point result new Point w Hint h Hint int trim Size get Trim Sizes w Hint h Hint int horizontal Trim trim Size LEFT trim Size RIGHT 2 margin Width left Spacing right Spacing int vertical Trim trim Size TOP trim Size BOTTOM 2 margin Height top Spacing bottom Spacing Point inner Size center Area compute Size w Hint SWT DEFAULT w Hint w Hint horizontal Trim h Hint SWT DEFAULT h Hint h Hint vertical Trim if w Hint SWT DEFAULT result x inner Size x horizontal Trim else if h Hint SWT DEFAULT result y inner Size y vertical Trim return new Point 0 0  computeSize wHint hHint flushCache wHint hHint trimSize getTrimSizes wHint hHint horizontalTrim trimSize trimSize marginWidth leftSpacing rightSpacing verticalTrim trimSize trimSize marginHeight topSpacing bottomSpacing innerSize centerArea computeSize wHint wHint wHint horizontalTrim hHint hHint hHint verticalTrim wHint innerSize horizontalTrim hHint innerSize verticalTrim
protected void layout Composite composite boolean flush Cache remove Disposed Rectangle client Area composite get Client Area client Area x margin Width client Area width 2 margin Width client Area y margin Height client Area height 2 margin Height int trim Size get Trim Sizes client Area width client Area height int left Of Layout client Area x int left Of Center Pane left Of Layout trim Size LEFT left Spacing int width Of Center Pane client Area width trim Size LEFT trim Size RIGHT left Spacing right Spacing int right Of Center Pane client Area x client Area width trim Size RIGHT int top Of Layout client Area y int top Of Center Pane top Of Layout trim Size TOP top Spacing int height Of Center Pane client Area height trim Size TOP trim Size BOTTOM top Spacing bottom Spacing int bottom Of Center Pane client Area y client Area height trim Size BOTTOM arrange new Rectangle left Of Layout top Of Layout client Area width trim Size TOP controls TOP true arrange new Rectangle left Of Center Pane bottom Of Center Pane width Of Center Pane trim Size BOTTOM controls BOTTOM true arrange new Rectangle left Of Layout top Of Center Pane trim Size LEFT client Area height trim Size TOP controls LEFT false arrange new Rectangle right Of Center Pane top Of Center Pane trim Size RIGHT client Area height trim Size TOP controls RIGHT false if center Area get Control null center Area get Control set Bounds left Of Center Pane top Of Center Pane width Of Center Pane height Of Center Pane  flushCache removeDisposed clientArea getClientArea clientArea marginWidth clientArea marginWidth clientArea marginHeight clientArea marginHeight trimSize getTrimSizes clientArea clientArea leftOfLayout clientArea leftOfCenterPane leftOfLayout trimSize leftSpacing widthOfCenterPane clientArea trimSize trimSize leftSpacing rightSpacing rightOfCenterPane clientArea clientArea trimSize topOfLayout clientArea topOfCenterPane topOfLayout trimSize topSpacing heightOfCenterPane clientArea trimSize trimSize topSpacing bottomSpacing bottomOfCenterPane clientArea clientArea trimSize leftOfLayout topOfLayout clientArea trimSize leftOfCenterPane bottomOfCenterPane widthOfCenterPane trimSize leftOfLayout topOfCenterPane trimSize clientArea trimSize rightOfCenterPane topOfCenterPane trimSize clientArea trimSize centerArea getControl centerArea getControl setBounds leftOfCenterPane topOfCenterPane widthOfCenterPane heightOfCenterPane
private void flush Caches for int idx 0 idx controls length idx List ctrl controls idx if ctrl null Iterator iter ctrl iterator while iter has Next Size Cache next Size Cache iter next next flush center Area flush  flushCaches hasNext SizeCache SizeCache centerArea
Arranges all the given controls in a horizontal row that fills the given rectangle param area area to be filled by the controls param controls a list of Size Caches for controls that will span the rectangle private static void arrange Rectangle area List controls boolean horizontally Point current Position new Point area x area y List resizable new Array List controls size List non Resizable new Array List controls size filter Resizable controls resizable non Resizable horizontally int sizes new int non Resizable size int idx 0 int used 0 int hint Geometry get Dimension area horizontally Compute the sizes of non resizable controls Iterator iter non Resizable iterator while iter has Next Size Cache next Size Cache iter next sizes idx get Size next hint horizontally used sizes idx idx int available Geometry get Dimension area horizontally used idx 0 int remaining Resizable resizable size iter controls iterator while iter has Next Size Cache next Size Cache iter next int this Size if is Resizable next get Control horizontally this Size available remaining Resizable available this Size remaining Resizable else this Size sizes idx idx if horizontally next get Control set Bounds current Position x current Position y this Size hint current Position x this Size else next get Control set Bounds current Position x current Position y hint this Size current Position y this Size  SizeCaches currentPosition ArrayList nonResizable ArrayList filterResizable nonResizable nonResizable getDimension nonResizable hasNext SizeCache SizeCache getSize getDimension remainingResizable hasNext SizeCache SizeCache thisSize isResizable getControl thisSize remainingResizable thisSize remainingResizable thisSize getControl setBounds currentPosition currentPosition thisSize currentPosition thisSize getControl setBounds currentPosition currentPosition thisSize currentPosition thisSize
Sets the widget that will occupy the central area of the layout Typically this will be a composite that contains the main widgetry of the application param composite control that will occupy the center of the layout or null if none public void set Center Control Control center center Area set Control center  setCenterControl centerArea setControl
Returns the control in the center of this layout return public Control get Center Control return center Area get Control  getCenterControl centerArea getControl
public void flush Control dirty Control Trim Data data Trim Data map Part Onto Trim Data get dirty Control if data null if dirty Control center Area get Control center Area flush else data cache flush  dirtyControl TrimData TrimData mapPartOntoTrimData dirtyControl dirtyControl centerArea getControl centerArea

Creates a default Trim Layout Data The default trim layout data is resizable public Trim Layout Data  TrimLayoutData TrimLayoutData
Creates a Trim Layout Data with user specified parameters param resizable if true the control will be resized with the layout If there is more than one resizable control on the same side of the layout the available space will be divided equally among all the controls param width Hint overrides the preferred width of the control pixels If SWT DEFAULT then the control s preferred width will be used This has no effect for horizontally resizable controls param height Hint overrides the preferred height of the control pixels If SWT DEFAULT then the control s preferred height will be used This has no effect for vertically resizable controls public Trim Layout Data boolean resizable int width Hint int height Hint this width Hint width Hint this height Hint height Hint this resizable resizable  TrimLayoutData widthHint heightHint TrimLayoutData widthHint heightHint widthHint widthHint heightHint heightHint

Returns code I Resource class code or code null code if the class is not available p This method exists to avoid explicit references from the generic workbench to the resources plug in p return code I Resource class code or code null code if class not available since 3 0 public static Class get Resource Class if iresource Class null tried before and succeeded return iresource Class if resources Possible tried before and failed return null resource plug in is not on prereq chain of generic wb plug in hence I Resource class won t compile and Class for Name org eclipse core resources I Resource won t find it need to be trickier Bundle bundle Platform get Bundle org eclipse core resources NON NLS 1 if bundle null resources plug in is not around assume that it will never be around resources Possible false return null resources plug in is around it s not our job to activate the plug in if Bundle Utility is Activated bundle assume it might come alive later resources Possible true return null try Class c bundle load Class org eclipse core resources I Resource NON NLS 1 remember for next time iresource Class c return iresource Class catch Class Not Found Exception e unable to load I Resource sounds pretty serious treat as if resources plug in were unavailable resources Possible false return null  IResource IResource getResourceClass iresourceClass iresourceClass resourcesPossible IResource forName IResource getBundle resourcesPossible BundleUtility isActivated resourcesPossible loadClass IResource iresourceClass iresourceClass ClassNotFoundException IResource resourcesPossible
Returns code I Contributor Resource Adapter class code or code null code if the class is not available p This method exists to avoid explicit references from the generic workbench to the IDE plug in p return code I Contributor Resource Adapter class code or code null code if class not available since 3 0 public static Class getI Contributor Resource Adapter Class if icontributor Resource Adapter Class null tried before and succeeded return icontributor Resource Adapter Class if resource Adapter Possible tried before and failed return null IDE plug in is not on prereq chain of generic wb plug in hence I Contributor Resource Adapter class won t compile and Class for Name org eclipse ui I Contributor Resource Adapter won t find it need to be trickier Bundle bundle Platform get Bundle org eclipse ui ide NON NLS 1 if bundle null IDE plug in is not around assume that it will never be around resource Adapter Possible false return null IDE plug in is around it s not our job to activate the plug in if Bundle Utility is Activated bundle assume it might come alive later resource Adapter Possible true return null try Class c bundle load Class org eclipse ui I Contributor Resource Adapter NON NLS 1 remember for next time icontributor Resource Adapter Class c return icontributor Resource Adapter Class catch Class Not Found Exception e unable to load I Contributor Resource Adapter sounds pretty serious treat as if IDE plug in were unavailable resource Adapter Possible false return null  IContributorResourceAdapter IContributorResourceAdapter getIContributorResourceAdapterClass icontributorResourceAdapterClass icontributorResourceAdapterClass resourceAdapterPossible IContributorResourceAdapter forName IContributorResourceAdapter getBundle resourceAdapterPossible BundleUtility isActivated resourceAdapterPossible loadClass IContributorResourceAdapter icontributorResourceAdapterClass icontributorResourceAdapterClass ClassNotFoundException IContributorResourceAdapter resourceAdapterPossible
Returns code Default Contributor Resource Adapter class code or code null code if the class is not available p This method exists to avoid explicit references from the generic workbench to the IDE plug in p return code Default Contributor Resource Adapter class code or code null code if class not available since 3 0 public static Class get Default Contributor Resource Adapter Class if default Contributor Resource Adapter Class null tried before and succeeded return default Contributor Resource Adapter Class if resource Adapter Possible tried before and failed return null IDE plug in is not on prereq chain of generic wb plug in hence Default Contributor Resource Adapter class won t compile and Class for Name org eclipse ui internal ide Default Contributor Resource Adapter won t find it need to be trickier Bundle bundle Platform get Bundle org eclipse ui ide NON NLS 1 if bundle null IDE plug in is not around assume that it will never be around resource Adapter Possible false return null IDE plug in is around it s not our job to activate the plug in if Bundle Utility is Activated bundle assume it might come alive later resource Adapter Possible true return null try Class c bundle load Class org eclipse ui internal ide Default Contributor Resource Adapter NON NLS 1 remember for next time default Contributor Resource Adapter Class c return default Contributor Resource Adapter Class catch Class Not Found Exception e unable to load Default Contributor Resource Adapter sounds pretty serious treat as if IDE plug in were unavailable resource Adapter Possible false return null  DefaultContributorResourceAdapter DefaultContributorResourceAdapter getDefaultContributorResourceAdapterClass defaultContributorResourceAdapterClass defaultContributorResourceAdapterClass resourceAdapterPossible DefaultContributorResourceAdapter forName DefaultContributorResourceAdapter getBundle resourceAdapterPossible BundleUtility isActivated resourceAdapterPossible loadClass DefaultContributorResourceAdapter defaultContributorResourceAdapterClass defaultContributorResourceAdapterClass ClassNotFoundException DefaultContributorResourceAdapter resourceAdapterPossible
Prevents construction private Legacy Resource Support do nothing  LegacyResourceSupport

window get Workbench get Display async Exec new Runnable public void run if workbench Window null set Checked Workbench Window workbench Window is Cool Bar Locked  getWorkbench getDisplay asyncExec workbenchWindow setChecked WorkbenchWindow workbenchWindow isCoolBarLocked
Create a new instance of code Lock Tool Bar Action code param window the workbench window this action applies to public Lock Tool Bar Action I Workbench Window window super Workbench Messages get String Lock Tool Bar Action text NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window set Action Definition Id org eclipse ui window lock Tool Bar NON NLS 1 issue missing action id set Tool Tip Text Workbench Messages get String Lock Tool Bar Action tool Tip NON NLS 1 set Enabled false queue the update for the checked state since this action is created before the coolbar window get Workbench get Display async Exec new Runnable public void run if workbench Window null set Checked Workbench Window workbench Window is Cool Bar Locked Workbench Help set Help this I Help Context Ids LOCK TOOLBAR ACTION  LockToolBarAction LockToolBarAction IWorkbenchWindow WorkbenchMessages getString LockToolBarAction IllegalArgumentException workbenchWindow setActionDefinitionId lockToolBar setToolTipText WorkbenchMessages getString LockToolBarAction toolTip setEnabled getWorkbench getDisplay asyncExec workbenchWindow setChecked WorkbenchWindow workbenchWindow isCoolBarLocked WorkbenchHelp setHelp IHelpContextIds LOCK_TOOLBAR_ACTION
public void run if workbench Window null action has been disposed return boolean locked is Checked Workbench Window workbench Window lock Cool Bar locked  workbenchWindow isChecked WorkbenchWindow workbenchWindow lockCoolBar
Method declared on Action Factory I Workbench Action public void dispose workbench Window null  ActionFactory IWorkbenchAction workbenchWindow

Creates a Maximize Part Action public Maximize Part Action I Workbench Window window super Workbench Messages get String Maximize Part Action text window NON NLS 1 set Tool Tip Text Workbench Messages get String Maximize Part Action tool Tip NON NLS 1 issue missing action id update State Workbench Help set Help this I Help Context Ids MAXIMIZE PART ACTION set Action Definition Id org eclipse ui window maximize Part NON NLS 1  MaximizePartAction MaximizePartAction IWorkbenchWindow WorkbenchMessages getString MaximizePartAction setToolTipText WorkbenchMessages getString MaximizePartAction toolTip updateState WorkbenchHelp setHelp IHelpContextIds MAXIMIZE_PART_ACTION setActionDefinitionId maximizePart
Method declared on Page Event Action public void page Activated I Workbench Page page super page Activated page update State  PageEventAction pageActivated IWorkbenchPage pageActivated updateState
Method declared on Page Event Action public void page Closed I Workbench Page page super page Closed page update State  PageEventAction pageClosed IWorkbenchPage pageClosed updateState
public void run if get Workbench Window null action has been dispose return I Workbench Page page get Active Page if page null if page instanceof Workbench Page Workbench Page real Page Workbench Page page I Workbench Part Reference part Ref page get Active Part Reference if part Ref null Workbench Page page toggle Zoom part Ref  getWorkbenchWindow IWorkbenchPage getActivePage WorkbenchPage WorkbenchPage realPage WorkbenchPage IWorkbenchPartReference partRef getActivePartReference partRef WorkbenchPage toggleZoom partRef
Updates the enabled state private void update State set Enabled get Active Page null  updateState setEnabled getActivePage

Creates a new message line as a child of the given parent public Message Line Composite parent this parent SWT LEFT  MessageLine
Creates a new message line as a child of the parent and with the given SWT stylebits public Message Line Composite parent int style super parent style f Normal Msg Area Background null  MessageLine fNormalMsgAreaBackground
private Image find Image I Status status if status isOK return null else if status matches I Status ERROR return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJS ERROR TSK else if status matches I Status WARNING return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJS WARN TSK else if status matches I Status INFO return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG OBJS INFO TSK return null  findImage IStatus IStatus getWorkbench getSharedImages getImage ISharedImages IMG_OBJS_ERROR_TSK IStatus getWorkbench getSharedImages getImage ISharedImages IMG_OBJS_WARN_TSK IStatus getWorkbench getSharedImages getImage ISharedImages IMG_OBJS_INFO_TSK
Sets the message and image to the given status code null code is a valid argument and will set the empty text and no image public void set Error Status I Status status if status null String message status get Message if message null message length 0 set Text message set Image find Image status set Background J Face Colors get Error Background get Display return set Text NON NLS 1 set Image null set Background f Normal Msg Area Background  setErrorStatus IStatus getMessage setText setImage findImage setBackground JFaceColors getErrorBackground getDisplay setText setImage setBackground fNormalMsgAreaBackground

private class Action Item public Action Item int accel I Action act accelerator accel action act  ActionItem ActionItem IAction
private class Fake Action extends Action public Fake Action String name super name  FakeAction FakeAction
super name public void run 
Accelerator Hook constructor comment public Accelerator Hook Control ctrl action List new Array List 5 ctrl add Listener SWT Key Down this ctrl add Listener SWT Key Up this  AcceleratorHook AcceleratorHook actionList ArrayList addListener KeyDown addListener KeyUp
Adds an action to the control If the action accelerator is pressed the action will be run p The accelerator for the action is derived from the action p param action an action with unique accelerator public void add I Action action if action get Accelerator 0 return action List add new Action Item action get Accelerator action  IAction getAccelerator actionList ActionItem getAccelerator
Adds an action to the control with a particular accelerator If the accelerator is pressed the action will be run p The accelerator for the action is derived from code str Accel code string The content of this string must conform to the standard J Face conventions for accelerator declaration For more information see the code org eclipse jface action Action code class p param action an action param str Accel the action accelerator see org eclipse jface action Action public void add I Action action String str Accel Action fake Action new Fake Action Fake t str Accel NON NLS 1 if fake Action get Accelerator 0 return action List add new Action Item fake Action get Accelerator action  strAccel JFace strAccel IAction strAccel fakeAction FakeAction strAccel fakeAction getAccelerator actionList ActionItem fakeAction getAccelerator
Returns the first item which represents the action returns the first item to match or code null code private Action Item find Item I Action action Iterator iter action List iterator while iter has Next Action Item item Action Item iter next if item action action return item return null  ActionItem findItem IAction actionList hasNext ActionItem ActionItem
Returns the first item with an accelerator which maches the key event returns the first item to match or code null code private Action Item find Item Event e Map event to accel int accel get Accel e if accel 0 return null Map accelerator to item Iterator iter action List iterator while iter has Next Action Item item Action Item iter next System out println Accel Integer to String item accelerator 16 if item accelerator accel return item return null  ActionItem findItem getAccel actionList hasNext ActionItem ActionItem toString
Convert a key event to an accelerator param e the key event return the int accelerator value private int get Accel Event e Debug System out println Key Event System out println t Char Integer to String int e character 16 System out println t Key Code Integer to String e key Code 16 System out println t State Mask Integer to String e state Mask 16 Real work int key int Character to Upper Case e character int mods 0 if e state Mask SWT ALT 0 mods SWT ALT if e state Mask SWT SHIFT 0 mods SWT SHIFT if e state Mask SWT CTRL 0 mods SWT CTRL key key A 1 Convert unicode to char int accel key mods e key Code Debug System out println Accel Integer to String accel 16 return accel  getAccel KeyEvent tChar toString tKeyCode toString keyCode tState toString stateMask toUpperCase stateMask stateMask stateMask keyCode toString
Notifies that a key has been pressed on the system keyboard p This method is a callback from the target control for this hook Other clients are not expected to call this method p param e an event containing information about the key press public void handle Event Event event Action Item item find Item event if item null item action run With Event event  handleEvent ActionItem findItem runWithEvent
Removes an action from the hook Does nothing if the action is not found param action an action public void remove I Action action Action Item item find Item action if item null action List remove item  IAction ActionItem findItem actionList

public final class Assert This class is not intended to be instantiated private Assert 
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression return is Legal expression NON NLS 1  IllegalArgumentException IllegalArgumentException isLegal isLegal
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression String message if expression throw new Illegal Argument Exception return expression  IllegalArgumentException IllegalArgumentException isLegal IllegalArgumentException
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown param object the value to test exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object is Not Null object NON NLS 1  IllegalArgumentException isNotNull isNotNull
Asserts that the given object is not code null code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param object the value to test param message the message to include in the exception exception Illegal Argument Exception if the object is code null code public static void is Not Null Object object String message if object null throw new Assertion Failed Exception null argument message NON NLS 1  IllegalArgumentException isNotNull AssertionFailedException
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown param expression the outcode of the check return code true code if the check passes does not return if the check fails public static boolean is True boolean expression return is True expression NON NLS 1  isTrue isTrue
Asserts that the given boolean is code true code If this is not the case some kind of unchecked exception is thrown The given message is included in that exception to aid debugging param expression the outcode of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails public static boolean is True boolean expression String message if expression throw new Assertion Failed Exception assertion failed message NON NLS 1 return expression  isTrue AssertionFailedException

package class Assertion Failed Exception extends Runtime Exception Constructs a new exception public Assertion Failed Exception  AssertionFailedException RuntimeException AssertionFailedException
Constructs a new exception with the given message public Assertion Failed Exception String detail super detail  AssertionFailedException

private Checkbox Table Viewerlist2 Viewer Create an instance of this class Use this constructor if you want the combined widget to act like others w r t sizing and set its size according to whatever is required to fill its context param parent org eclipse swt widgets Composite param root Object java lang Object param style int param child Property Name java lang String param parent Property Name java lang String param list Property Name java lang String public Checkbox Double List Group Composite parent Object root Object I Structured Content Provider list1 Content Provider I Label Provider list1 Label Provider I Structured Content Provider list2 Content Provider I Label Provider list2 Label Provider int style this parent root Object list1 Content Provider list1 Label Provider list2 Content Provider list2 Label Provider style 1 1  privateCheckboxTableViewerlist2Viewer rootObject childPropertyName parentPropertyName listPropertyName CheckboxDoubleListGroup rootObject IStructuredContentProvider list1ContentProvider ILabelProvider list1LabelProvider IStructuredContentProvider list2ContentProvider ILabelProvider list2LabelProvider rootObject list1ContentProvider list1LabelProvider list2ContentProvider list2LabelProvider
Create an instance of this class Use this constructor if you wish to specify the width and or height of the combined widget to only hardcode one of the sizing dimensions specify the other dimension s value as 1 param parent org eclipse swt widgets Composite param style int param root Object java lang Object param child Property Name java lang String param parent Property Name java lang String param list Property Name java lang String param width int param height int public Checkbox Double List Group Composite parent Object root Object I Structured Content Provider list1 Content Provider I Label Provider list1 Label Provider I Structured Content Provider list2 Content Provider I Label Provider list2 Label Provider int style int width int height super parent style root root Object this list1 Content Provider list1 Content Provider this list2 Content Provider list2 Content Provider this list1 Label Provider list1 Label Provider this list2 Label Provider list2 Label Provider create Contents parent width height  rootObject childPropertyName parentPropertyName listPropertyName CheckboxDoubleListGroup rootObject IStructuredContentProvider list1ContentProvider ILabelProvider list1LabelProvider IStructuredContentProvider list2ContentProvider ILabelProvider list2LabelProvider rootObject list1ContentProvider list1ContentProvider list2ContentProvider list2ContentProvider list1LabelProvider list1LabelProvider list2LabelProvider list2LabelProvider createContents
Add the passed listener to self s collection of clients that listen for changes to element checked states param listener I Check State Listener public void add Check State Listener I Check State Listener listener listeners add listener  ICheckStateListener addCheckStateListener ICheckStateListener
An item was checked in one of self s two views Determine which view this occurred in and delegate appropriately param event Check State Changed Event public void check State Changed Check State Changed Event event if event get Checkable equals list1 Viewer list1 Item Checked event get Element event get Checked else list2 Item Checked event get Element event get Checked notify Check State Change Listeners event  CheckStateChangedEvent checkStateChanged CheckStateChangedEvent getCheckable list1Viewer list1ItemChecked getElement getChecked list2ItemChecked getElement getChecked notifyCheckStateChangeListeners
Compute the preferred size return org eclipse swt graphics Point param w Hint int param h Hint int param changed boolean public Point compute Size int w Hint int h Hint boolean changed return new Point 1 1  wHint hHint computeSize wHint hHint
Lay out and initialize self s visual components param parent org eclipse swt widgets Composite param width int param height int protected void create Contents Composite parent int width int height group pane Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 composite set Font parent get Font composite set Layout layout composite set Layout Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL create List1 Viewer create View Pane composite width 2 height 2 create List2 Viewer create View Pane composite width 2 height 2 list1 Viewer set Input root  createContents GridLayout GridLayout numColumns setFont getFont setLayout setLayoutData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL createList1Viewer createViewPane createList2Viewer createViewPane list1Viewer setInput
Create the left viewer for this group param parent org eclipse swt widgets Composite protected void create List1 Viewer Composite parent list1 Viewer Checkbox Table Viewer new Check List parent SWT NONE list1 Viewer set Content Provider list1 Content Provider list1 Viewer set Label Provider list1 Label Provider list1 Viewer add Check State Listener this list1 Viewer add Selection Changed Listener this list1 Viewer get Table set Font parent get Font  createList1Viewer list1Viewer CheckboxTableViewer newCheckList list1Viewer setContentProvider list1ContentProvider list1Viewer setLabelProvider list1LabelProvider list1Viewer addCheckStateListener list1Viewer addSelectionChangedListener list1Viewer getTable setFont getFont
Create the right viewer for this group param parent org eclipse swt widgets Composite protected void create List2 Viewer Composite parent list2 Viewer Checkbox Table Viewer new Check List parent SWT NONE list2 Viewer set Content Provider list2 Content Provider list2 Viewer set Label Provider list2 Label Provider list2 Viewer add Check State Listener this list2 Viewer get Table set Font parent get Font  createList2Viewer list2Viewer CheckboxTableViewer newCheckList list2Viewer setContentProvider list2ContentProvider list2Viewer setLabelProvider list2LabelProvider list2Viewer addCheckStateListener list2Viewer getTable setFont getFont
Create a viewer pane in this group for the passed viewer param parent org eclipse swt widgets Composite param width int param height int protected Composite create View Pane Composite parent int width int height Composite pane new Composite parent SWT BORDER Grid Data spec new Grid Data Grid Data FILL BOTH spec width Hint width spec height Hint height pane set Layout Data spec pane set Layout new Fill Layout pane set Font parent get Font return pane  createViewPane GridData GridData GridData FILL_BOTH widthHint heightHint setLayoutData setLayout FillLayout setFont getFont
Answer a collection of all of the checked elements in the list 1 portion of self return java util Set public Set get All Checked List1 Items return checked State Store key Set  getAllCheckedList1Items checkedStateStore keySet
Answer a flat collection of all of the checked elements in the list 2 portion of self return java util Vector public List get All Checked List2 Items List result new Array List Iterator list Collections Enum checked State Store values iterator while list Collections Enum has Next Iterator current Collection List list Collections Enum next iterator while current Collection has Next result add current Collection next return result  getAllCheckedList2Items ArrayList listCollectionsEnum checkedStateStore listCollectionsEnum hasNext currentCollection listCollectionsEnum currentCollection hasNext currentCollection
Answer the number of elements that have been checked by the user return int public int get Checked Element Count return checked State Store size  getCheckedElementCount checkedStateStore
Set the checked state of the passed list 1 element as well as its associated list 2 elements public void initial Check List1 Item Object element checked State Store put element new Array List list1 Viewer set Checked element true  initialCheckList1Item checkedStateStore ArrayList list1Viewer setChecked
Handle the checking of a list 1 item protected void list1 Item Checked Object list Element boolean state if state if only one list 1 item can be checked at a time then clear the previous checked list 1 item if any if single List1 Check checked State Store clear list1 Viewer set All Checked false checked State Store put list Element new Array List else checked State Store remove list Element list2 Viewer set All Checked false the following may seem redundant but it allows other methods to invoke this method in order to fully simulate the user clicking a list 1 item list1 Viewer set Checked list Element state  list1ItemChecked listElement singleList1Check checkedStateStore list1Viewer setAllChecked checkedStateStore listElement ArrayList checkedStateStore listElement list2Viewer setAllChecked list1Viewer setChecked listElement
Handle the checking of a list 2 item protected void list2 Item Checked Object list Element boolean state List checked List Items List checked State Store get current List1 Selection if state if only one list 2 item can be checked at a time then clear the previous checked list 2 item if any if single List2 Check checked List Items null list2 Viewer set All Checked false list2 Viewer set Checked list Element true if checked List Items null list1 Item Checked current List1 Selection true checked List Items List checked State Store get current List1 Selection checked List Items add list Element else checked List Items remove list Element if checked List Items is Empty list1 Item Checked current List1 Selection false  list2ItemChecked listElement checkedListItems checkedStateStore currentList1Selection singleList2Check checkedListItems list2Viewer setAllChecked list2Viewer setChecked listElement checkedListItems list1ItemChecked currentList1Selection checkedListItems checkedStateStore currentList1Selection checkedListItems listElement checkedListItems listElement checkedListItems isEmpty list1ItemChecked currentList1Selection
final I Check State Listener l I Check State Listener array i Platform run new Safe Runnable public void run l check State Changed event  ICheckStateListener ICheckStateListener SafeRunnable checkStateChanged
Notify all checked state listeners that the passed element has had its checked state changed to the passed state protected void notify Check State Change Listeners final Check State Changed Event event Object array listeners get Listeners for int i 0 i array length i final I Check State Listener l I Check State Listener array i Platform run new Safe Runnable public void run l check State Changed event  notifyCheckStateChangeListeners CheckStateChangedEvent getListeners ICheckStateListener ICheckStateListener SafeRunnable checkStateChanged
Remove the passed listener from self s collection of clients that listen for changes to element checked states param listener I Check State Listener public void remove Check State Listener I Check State Listener listener listeners remove listener  ICheckStateListener removeCheckStateListener ICheckStateListener
Handle the selection of a list 1 item param selection I Selection public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection final Object selected Element selection get First Element if selected Element null current List1 Selection null list2 Viewer set Input current List1 Selection return ie if not an item deselection if selected Element current List1 Selection list2 Viewer set Input selected Element List list Items To Check List checked State Store get selected Element if list Items To Check null Iterator list Items Enum list Items To Check iterator while list Items Enum has Next list2 Viewer set Checked list Items Enum next true current List1 Selection selected Element  ISelection selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection selectedElement getFirstElement selectedElement currentList1Selection list2Viewer setInput currentList1Selection selectedElement currentList1Selection list2Viewer setInput selectedElement listItemsToCheck checkedStateStore selectedElement listItemsToCheck listItemsEnum listItemsToCheck listItemsEnum hasNext list2Viewer setChecked listItemsEnum currentList1Selection selectedElement
Change the list 1 viewer s providers to those passed param content Provider I Tree Content Provider param label Provider I Label Provider public void set List1 Providers I Structured Content Provider content Provider I Label Provider label Provider list1 Viewer set Content Provider content Provider list1 Viewer set Label Provider label Provider  contentProvider ITreeContentProvider labelProvider ILabelProvider setList1Providers IStructuredContentProvider contentProvider ILabelProvider labelProvider list1Viewer setContentProvider contentProvider list1Viewer setLabelProvider labelProvider
Set the sorter that is to be applied to self s list 1 viewer public void set List1 Sorter Viewer Sorter sorter list1 Viewer set Sorter sorter  setList1Sorter ViewerSorter list1Viewer setSorter
Change the list 2 viewer s providers to those passed param content Provider I Tree Content Provider param label Provider I Label Provider public void set List2 Providers I Structured Content Provider content Provider I Label Provider label Provider list2 Viewer set Content Provider content Provider list2 Viewer set Label Provider label Provider  contentProvider ITreeContentProvider labelProvider ILabelProvider setList2Providers IStructuredContentProvider contentProvider ILabelProvider labelProvider list2Viewer setContentProvider contentProvider list2Viewer setLabelProvider labelProvider
Set the sorter that is to be applied to self s list 2 viewer param sorter I Viewer Sorter public void set List2 Sorter Viewer Sorter sorter list2 Viewer set Sorter sorter  IViewerSorter setList2Sorter ViewerSorter list2Viewer setSorter
Set the root element that determines the content of list viewer 1 public void set Root Object root Element root root Element checked State Store clear list1 Viewer set Input root Element  setRoot rootElement rootElement checkedStateStore list1Viewer setInput rootElement
If this is set to true then only one list 1 item can be checked at a time The default value for this is false param value boolean public void set Single List1 Check boolean value single List1 Check value  setSingleList1Check singleList1Check
If this is set to true then only one list 2 item can be checked at a time The default value for this is false param value boolean public void set Single List2 Check boolean value single List2 Check value  setSingleList2Check singleList2Check

private Editor Descriptor descriptor Create an external editor public External Editor I Path new File Path Editor Descriptor editor Descriptor this file Path new File Path this descriptor editor Descriptor  EditorDescriptor ExternalEditor IPath newFilePath EditorDescriptor editorDescriptor filePath newFilePath editorDescriptor
open the editor If the descriptor has a program then use it otherwise build its info from the descriptor exception Throws a Core Exception if the external editor could not be opened public void open throws Core Exception Program program this descriptor get Program if program null open With User Defined Program else String path NON NLS 1 if file Path null path file Path toOS String if program execute path return throw new Core Exception new Status Status ERROR Workbench Plugin PI WORKBENCH 0 Workbench Messages format External Editor error Message new Object path NON NLS 1 null  exceptionThrows CoreException CoreException getProgram openWithUserDefinedProgram filePath filePath toOSString CoreException WorkbenchPlugin PI_WORKBENCH WorkbenchMessages ExternalEditor errorMessage
open the editor exception Throws a Core Exception if the external editor could not be opened public void open With User Defined Program throws Core Exception We need to determine if the command refers to a program in the plugin install directory Otherwise we assume the program is on the path String program File Name null I Configuration Element configuration Element descriptor get Configuration Element Check if we have a config element if we don t it is an external editor created on the resource associations page if configuration Element null try Bundle bundle Platform get Bundle configuration Element get Declaring Extension get Namespace See if the program file is in the plugin directory URL entry bundle get Entry descriptor get File Name if entry null this will bring the file local if the plugin is on a server URL local Name Platform as LocalURL entry File file new File local Name get File Check that it exists before we assert it is valid if file exists program File Name file get Absolute Path catch IO Exception e Program file is not in the plugin directory if program File Name null Program file is not in the plugin directory therefore assume it is on the path program File Name descriptor get File Name Get the full path of the file to open if file Path null throw new Core Exception new Status Status ERROR Workbench Plugin PI WORKBENCH 0 Workbench Messages format External Editor error Message new Object program File Name NON NLS 1 null String path file Path toOS String Open the file Shell Command was removed in response to PR 23888 If an exception was thrown it was not caught in time and no feedback was given to user try Runtime get Runtime exec new String program File Name path catch Exception e throw new Core Exception new Status Status ERROR Workbench Plugin PI WORKBENCH 0 Workbench Messages format External Editor error Message new Object program File Name NON NLS 1 e  exceptionThrows CoreException openWithUserDefinedProgram CoreException programFileName IConfigurationElement configurationElement getConfigurationElement configurationElement getBundle configurationElement getDeclaringExtension getNamespace getEntry getFileName localName asLocalURL localName getFile programFileName getAbsolutePath IOException programFileName programFileName getFileName filePath CoreException WorkbenchPlugin PI_WORKBENCH WorkbenchMessages ExternalEditor errorMessage programFileName filePath toOSString ShellCommand getRuntime programFileName CoreException WorkbenchPlugin PI_WORKBENCH WorkbenchMessages ExternalEditor errorMessage programFileName

public Program program Creates a new Image Descriptor The image is loaded from a file with the given name code name code public External Program Image Descriptor Program program this program program  ImageDescriptor ExternalProgramImageDescriptor
see Object equals public boolean equals Object o if o instanceof External Program Image Descriptor return false External Program Image Descriptor other External Program Image Descriptor o See if there is a name compare it if so and compare the programs if not String other Name other program get Name if other Name null return other program equals program else return other Name equals program get Name  ExternalProgramImageDescriptor ExternalProgramImageDescriptor ExternalProgramImageDescriptor otherName getName otherName otherName getName
Returns an SWT Image that is described by the information in this descriptor Each call returns a new Image public Image get Image return create Image  getImage createImage
Returns an SWT Image that is described by the information in this descriptor Each call returns a new Image public Image Data get Image Data Image Data data null Image Data default Image Workbench Images get Image Descriptor I Shared Images IMG OBJ FILE get Image Data if default Image null return null if program null data program get Image Data null return default Image The images in GNOME are too big Scaling them does not give nice result so return default Image if data height default Image height data width default Image width return default Image return data  ImageData getImageData ImageData ImageData defaultImage WorkbenchImages getImageDescriptor ISharedImages IMG_OBJ_FILE getImageData defaultImage getImageData defaultImage defaultImage defaultImage defaultImage defaultImage
see Object hash Code public int hash Code String program Name program get Name if program Name null return program hash Code else return program Name hash Code  hashCode hashCode programName getName programName hashCode programName hashCode

private List foreground Images new Array List Create an instance of this class public Overlay Composite Image Data background background Image background  foregroundImages ArrayList OverlayComposite ImageData backgroundImage
Add the passed image to this descriptor s collection of images to be composed together to create an image public void add Foreground Image Image Data image foreground Images add image  addForegroundImage ImageData foregroundImages
Superimpose self s images within the given bounds by means of draw Image see Composite Image draw Image Image Data src int ox int oy protected void draw Composite Image int width int height draw background draw Image background Image get Left Bound get Top Bound draw foreground images Iterator e foreground Images iterator while e has Next draw Image Image Data e next get Left Bound get Top Bound draw extensions if top Image null draw Image top Image get Left Bound 0 if bottom Image null draw Image bottom Image get Left Bound height bottom Image height if left Image null draw Image left Image 0 get Top Bound if right Image null draw Image right Image width right Image width get Top Bound  drawImage CompositeImage drawImage ImageData drawCompositeImage drawImage backgroundImage getLeftBound getTopBound foregroundImages hasNext drawImage ImageData getLeftBound getTopBound topImage drawImage topImage getLeftBound bottomImage drawImage bottomImage getLeftBound bottomImage leftImage drawImage leftImage getTopBound rightImage drawImage rightImage rightImage getTopBound
see Object equals public boolean equals Object o if o instanceof Overlay Composite return false Overlay Composite other Overlay Composite o return equals background Image other background Image equals left Image other left Image equals right Image other right Image equals top Image other top Image equals bottom Image other bottom Image equals foreground Images other foreground Images  OverlayComposite OverlayComposite OverlayComposite backgroundImage backgroundImage leftImage leftImage rightImage rightImage topImage topImage bottomImage bottomImage foregroundImages foregroundImages
Private utility for comparing two possibly null objects private boolean equals Object o1 Object o2 return o1 null o2 null o1 equals o2 
Answer the left most coordinate that the main image can draw to return int protected int get Left Bound if left Image null return 0 return left Image width  getLeftBound leftImage leftImage
Answer self s size as determined by the size of the initially provided base level image protected Point get Size start with basic size Point size new Point background Image width background Image height overlays may increase size if top Image null size y top Image height if bottom Image null size y bottom Image height if left Image null size x left Image width if right Image null size x right Image width return size  getSize backgroundImage backgroundImage topImage topImage bottomImage bottomImage leftImage leftImage rightImage rightImage
Answer the top most coordinate that the main image can draw to return int protected int get Top Bound if top Image null return 0 return top Image height  getTopBound topImage topImage
see Object hash Code public int hash Code return hash Code background Image hash Code left Image hash Code right Image hash Code top Image hash Code bottom Image hash Code foreground Images  hashCode hashCode hashCode backgroundImage hashCode leftImage hashCode rightImage hashCode topImage hashCode bottomImage hashCode foregroundImages
Private utility for getting the hash Code for an object that may be null private int hash Code Object o return o null 0 o hash Code  hashCode hashCode hashCode
Set the image to be drawn below the primary overlay region public void set Bottom Extension Image Data value bottom Image value  setBottomExtension ImageData bottomImage
Set the image to be drawn to the left of the primary overlay region public void set Left Extension Image Data value left Image value  setLeftExtension ImageData leftImage
Set the image to be drawn to the right of the primary overlay region public void set Right Extension Image Data value right Image value  setRightExtension ImageData rightImage
Set the image to be drawn above the primary overlay region public void set Top Extension Image Data value top Image value  setTopExtension ImageData topImage

private static boolean get Debug Option String option return true equals Ignore Case Platform get Debug Option PlatformUI PLUGIN ID option NON NLS 1  getDebugOption equalsIgnoreCase getDebugOption PLUGIN_ID

private int offset Creates a new Image Descriptor The image is loaded from a file with the given name code name code public Program Image Descriptor String full Path int offset In File filename full Path offset offset In File  ImageDescriptor ProgramImageDescriptor fullPath offsetInFile fullPath offsetInFile
see Object equals public boolean equals Object o if o instanceof Program Image Descriptor return false Program Image Descriptor other Program Image Descriptor o return filename equals other filename offset other offset  ProgramImageDescriptor ProgramImageDescriptor ProgramImageDescriptor
Returns an SWT Image that is described by the information in this descriptor Each call returns a new Image public Image get Image return create Image  getImage createImage
Returns an SWT Image that is described by the information in this descriptor public Image Data get Image Data This is a user defined offset into the file which always returns us the defualt return the default regardless return Workbench Images get Image Descriptor I Shared Images IMG OBJ FILE get Image Data  ImageData getImageData WorkbenchImages getImageDescriptor ISharedImages IMG_OBJ_FILE getImageData
see Object hash Code public int hash Code return filename hash Code offset  hashCode hashCode hashCode

public class Status Util Answer a flat collection of the passed status and its recursive children protected static List flatten I Status a Status List result new Array List if a Status is Multi Status I Status children a Status get Children for int i 0 i children length i I Status current Child children i if current Child is Multi Status Iterator child Statii Enum flatten current Child iterator while child Statii Enum has Next result add child Statii Enum next else result add current Child else result add a Status return result  StatusUtil IStatus aStatus ArrayList aStatus isMultiStatus IStatus aStatus getChildren IStatus currentChild currentChild isMultiStatus childStatiiEnum currentChild childStatiiEnum hasNext childStatiiEnum currentChild aStatus
This method must not be called outside the workbench Utility method for creating status protected static I Status new Status I Status stati String message Throwable exception Assert is True message null Assert is True message trim length 0 return new Multi Status Workbench Plugin PI WORKBENCH I Status ERROR stati message exception  IStatus newStatus IStatus isTrue isTrue MultiStatus WorkbenchPlugin PI_WORKBENCH IStatus
This method must not be called outside the workbench Utility method for creating status public static I Status new Status int severity String message Throwable exception String status Message message if message null message trim length 0 if exception get Message null status Message exception to String else status Message exception get Message return new Status severity Workbench Plugin PI WORKBENCH severity status Message exception  IStatus newStatus statusMessage getMessage statusMessage toString statusMessage getMessage WorkbenchPlugin PI_WORKBENCH statusMessage
This method must not be called outside the workbench Utility method for creating status public static I Status new Status List children String message Throwable exception List flat Status Collection new Array List Iterator iter children iterator while iter has Next I Status current Status I Status iter next Iterator children Iter flatten current Status iterator while children Iter has Next flat Status Collection add children Iter next I Status stati new I Status flat Status Collection size flat Status Collection to Array stati return new Status stati message exception  IStatus newStatus flatStatusCollection ArrayList hasNext IStatus currentStatus IStatus childrenIter currentStatus childrenIter hasNext flatStatusCollection childrenIter IStatus IStatus flatStatusCollection flatStatusCollection toArray newStatus

private static Map registry Construct a new Stopwatch and start it To reset the watch at a later time just call start again public Stopwatch String name this name name start 
Get a stopwatch from the registry static public Stopwatch get Stopwatch String name if registry null return Stopwatch registry get name else return null  getStopwatch
Print the elapsed time since start print Interval or reset Interval was last called public void print Interval String hint long time System current Time Millis last Time System out println name hint took time ms NON NLS 3 NON NLS 2 NON NLS 1 last Time System current Time Millis  printInterval resetInterval printInterval currentTimeMillis lastTime lastTime currentTimeMillis
Print the current elapsed time public void print Time long time System current Time Millis start Time System out print name is now time ms NON NLS 2 NON NLS 1  printTime currentTimeMillis startTime
Add this stopwatch to the registry public void register if registry null registry new Hash Map 2 registry put name this  HashMap
Reset the interval timer public void reset Interval last Time System current Time Millis  resetInterval lastTime currentTimeMillis
Start the watch public void start start Time last Time System current Time Millis System out println name started NON NLS 1  startTime lastTime currentTimeMillis
Stop the watch and print the elapsed time public void stop long time System current Time Millis start Time System out println name finished in time ms NON NLS 2 NON NLS 1  currentTimeMillis startTime
Remove this stopwatch from the registry public void unregister if registry null registry remove name 

int start inclusive int end exclusive public Position int start int end this start start this end end 
this end end public int get Start return start  getStart
return start public int get End return end  getEnd
String Matcher constructor takes in a String object that is a simple pattern which may contain for 0 and many characters and for exactly one character Literal and characters must be escaped in the pattern e g means literal etc Escaping any other character including the escape character itself just results in that character in the pattern e g a means a and means If invoking the String Matcher with string literals in Java don t forget escape characters are represented by param pattern the pattern to match text against param ignore Case if true case is ignored param ignore Wild Cards if true wild cards and their escape sequences are ignored everything is taken literally public String Matcher String pattern boolean ignore Case boolean ignore Wild Cards if pattern null throw new Illegal Argument Exception f Ignore Case ignore Case f Ignore Wild Cards ignore Wild Cards f Pattern pattern f Length pattern length if f Ignore Wild Cards parse No Wild Cards else parse Wild Cards  StringMatcher StringMatcher ignoreCase ignoreWildCards StringMatcher ignoreCase ignoreWildCards IllegalArgumentException fIgnoreCase ignoreCase fIgnoreWildCards ignoreWildCards fPattern fLength fIgnoreWildCards parseNoWildCards parseWildCards
Find the first occurrence of the pattern between code start code inclusive and code end code exclusive param code text code the String object to search in param code start code the starting index of the search range inclusive param code end code the ending index of the search range exclusive return an code String Matcher Position code object that keeps the starting inclusive and ending positions exclusive of the first occurrence of the pattern in the specified range of the text return null if not found or subtext is empty start end A pair of zeros is returned if pattern is empty string Note that for pattern like abc with leading and trailing stars position of abc is returned For a pattern like in text abcdf 1 3 is returned public String Matcher Position find String text int start int end if text null throw new Illegal Argument Exception int tlen text length if start 0 start 0 if end tlen end tlen if end 0 start end return null if f Length 0 return new Position start start if f Ignore Wild Cards int x pos In text start end if x 0 return null return new Position x x f Length int seg Count f Segments length if seg Count 0 pattern contains only s return new Position start end int cur Pos start int match Start 1 int i for i 0 i seg Count cur Pos end i String current f Segments i int next Match reg Exp Pos In text cur Pos end current if next Match 0 return null if i 0 match Start next Match cur Pos next Match current length if i seg Count return null return new Position match Start cur Pos  StringMatcher StringMatcher IllegalArgumentException fLength fIgnoreWildCards posIn fLength segCount fSegments segCount curPos matchStart segCount curPos fSegments nextMatch regExpPosIn curPos nextMatch matchStart nextMatch curPos nextMatch segCount matchStart curPos
match the given code text code with the pattern return true if matched eitherwise false param code text code a String object public boolean match String text return match text 0 text length 
Given the starting inclusive and the ending exclusive positions in the code text code determine if the given substring matches with a Pattern return true if the specified portion of the text matches the pattern param String code text code a String object that contains the substring to match param int code start code marks the starting position inclusive of the substring param int code end code marks the ending index exclusive of the substring public boolean match String text int start int end if null text throw new Illegal Argument Exception if start end return false if f Ignore Wild Cards return end start f Length f Pattern region Matches f Ignore Case 0 text start f Length int seg Count f Segments length if seg Count 0 f Has Leading Star f Has Trailing Star pattern contains only s return true if start end return f Length 0 if f Length 0 return start end int tlen text length if start 0 start 0 if end tlen end tlen int t Cur Pos start int bound end f Bound if bound 0 return false int i 0 String current f Segments i int seg Length current length process first segment if f Has Leading Star if reg Exp Region Matches text start current 0 seg Length return false else i t Cur Pos t Cur Pos seg Length if f Segments length 1 f Has Leading Star f Has Trailing Star only one segment to match no wildcards specified return t Cur Pos end process middle segments while i seg Count current f Segments i int current Match int k current index Of f Single Wild Card if k 0 current Match text Pos In text t Cur Pos end current if current Match 0 return false else current Match reg Exp Pos In text t Cur Pos end current if current Match 0 return false t Cur Pos current Match current length i process final segment if f Has Trailing Star t Cur Pos end int clen current length return reg Exp Region Matches text end clen current 0 clen return i seg Count  aPattern IllegalArgumentException fIgnoreWildCards fLength fPattern regionMatches fIgnoreCase fLength segCount fSegments segCount fHasLeadingStar fHasTrailingStar fLength fLength tCurPos fBound fSegments segLength fHasLeadingStar regExpRegionMatches segLength tCurPos tCurPos segLength fSegments fHasLeadingStar fHasTrailingStar tCurPos segCount fSegments currentMatch indexOf fSingleWildCard currentMatch textPosIn tCurPos currentMatch currentMatch regExpPosIn tCurPos currentMatch tCurPos currentMatch fHasTrailingStar tCurPos regExpRegionMatches segCount
This method parses the given pattern into segments seperated by wildcard characters Since wildcards are not being used in this case the pattern consists of a single segment private void parse No Wild Cards f Segments new String 1 f Segments 0 f Pattern f Bound f Length  parseNoWildCards fSegments fSegments fPattern fBound fLength
Parses the given pattern into segments seperated by wildcard characters param p a String object that is a simple regular expression with and or private void parse Wild Cards if f Pattern starts With NON NLS 1 f Has Leading Star true if f Pattern ends With NON NLS 1 make sure it s not an escaped wildcard if f Length 1 f Pattern char At f Length 2 f Has Trailing Star true Vector temp new Vector int pos 0 String Buffer buf new String Buffer while pos f Length char c f Pattern char At pos switch c case if pos f Length buf append c else char next f Pattern char At pos if it s an escape sequence if next next next buf append next else not an escape sequence just insert literally buf append c buf append next break case if buf length 0 new segment temp add Element buf to String f Bound buf length buf set Length 0 break case append special character representing single match wildcard buf append f Single Wild Card break default buf append c add last buffer to segment list if buf length 0 temp add Element buf to String f Bound buf length f Segments new String temp size temp copy Into f Segments  parseWildCards fPattern startsWith fHasLeadingStar fPattern endsWith fLength fPattern charAt fLength fHasTrailingStar StringBuffer StringBuffer fLength fPattern charAt fLength fPattern charAt addElement toString fBound setLength fSingleWildCard addElement toString fBound fSegments copyInto fSegments
param code text code a string which contains no wildcard param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive return the starting index in the text of the pattern or 1 if not found protected int pos In String text int start int end no wild card in pattern int max end f Length if f Ignore Case int i text index Of f Pattern start if i 1 i max return 1 return i for int i start i max i if text region Matches true i f Pattern 0 f Length return i return 1  posIn fLength fIgnoreCase indexOf fPattern regionMatches fPattern fLength
param code text code a simple regular expression that may only contain s param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a simple regular expression that may contains param code case Ignored code wether the pattern is not casesensitive return the starting index in the text of the pattern or 1 if not found protected int reg Exp Pos In String text int start int end String p int plen p length int max end plen for int i start i max i if reg Exp Region Matches text i p 0 plen return i return 1  caseIgnored regExpPosIn regExpRegionMatches
return boolean param code text code a String to match param code start code int that indicates the starting index of match inclusive param code end code int that indicates the ending index of match exclusive param code p code String String a simple regular expression that may contain param code ignore Case code boolean indicating wether code p code is case sensitive protected boolean reg Exp Region Matches String text int t Start String p int p Start int plen while plen 0 char tchar text char At t Start char pchar p char At p Start process wild cards if f Ignore Wild Cards skip single wild cards if pchar f Single Wild Card continue if pchar tchar continue if f Ignore Case if Character to Upper Case tchar Character to Upper Case pchar continue comparing after converting to upper case doesn t handle all cases also compare after converting to lower case if Character to Lower Case tchar Character to Lower Case pchar continue return false return true  ignoreCase regExpRegionMatches tStart pStart charAt tStart charAt pStart fIgnoreWildCards fSingleWildCard fIgnoreCase toUpperCase toUpperCase toLowerCase toLowerCase
param code text code the string to match param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a string that has no wildcard param code ignore Case code boolean indicating wether code p code is case sensitive return the starting index in the text of the pattern or 1 if not found protected int text Pos In String text int start int end String p int plen p length int max end plen if f Ignore Case int i text index Of p start if i 1 i max return 1 return i for int i start i max i if text region Matches true i p 0 plen return i return 1  ignoreCase textPosIn fIgnoreCase indexOf regionMatches

public class Test Page Listener implements I Page Listener Test Page Listener constructor comment issue seems like garbage no one using it public Test Page Listener super  TestPageListener IPageListener TestPageListener TestPageListener
Notifies this listener that the given page has been activated param page the page that was activated see I Workbench Window set Active Page public void page Activated I Workbench Page page System out println page Activated page NON NLS 2 NON NLS 1  IWorkbenchWindow setActivePage pageActivated IWorkbenchPage pageActivated
Notifies this listener that the given page has been closed param page the page that was closed see I Workbench Page close public void page Closed I Workbench Page page System out println page Closed page NON NLS 2 NON NLS 1  IWorkbenchPage pageClosed IWorkbenchPage pageClosed
Notifies this listener that the given page has been opened param page the page that was opened see I Workbench Window open Page public void page Opened I Workbench Page page System out println page Opened page NON NLS 2 NON NLS 1  IWorkbenchWindow openPage pageOpened IWorkbenchPage pageOpened

public class Test Part Listener implements I Part Listener Test Part Listener constructor comment issue seems like garbage no one using it public Test Part Listener super  TestPartListener IPartListener TestPartListener TestPartListener
Notifies this listener that the given part has been activated param part the part that was activated see I Perspective activate public void part Activated I Workbench Part part System out println part Activated part NON NLS 2 NON NLS 1  IPerspective partActivated IWorkbenchPart partActivated
Notifies this listener that the given part has been brought to the top p These events occur when an editor is brought to the top in the editor area or when a view is brought to the top in a page book with multiple views They are normally only sent when a part is brought to the top programmatically via code I Perspective bring To Top code When a part is activated by the user clicking on it only code part Activated code is sent p param part the part that was surfaced see I Perspective bring To Top public void part Brought To Top I Workbench Part part System out println part Brought To Top part NON NLS 2 NON NLS 1  IPerspective bringToTop partActivated IPerspective bringToTop partBroughtToTop IWorkbenchPart partBroughtToTop
Notifies this listener that the given part has been closed param part the part that was closed see I Perspective close public void part Closed I Workbench Part part System out println part Closed part NON NLS 2 NON NLS 1  IPerspective partClosed IWorkbenchPart partClosed
Notifies this listener that the given part has been deactivated param part the part that was deactivated see I Perspective activate public void part Deactivated I Workbench Part part System out println part Deactivated part NON NLS 2 NON NLS 1  IPerspective partDeactivated IWorkbenchPart partDeactivated
Notifies this listener that the given part has been opened param part the part that was opened public void part Opened I Workbench Part part System out println part Opened part NON NLS 2 NON NLS 1  partOpened IWorkbenchPart partOpened

public class Test Selection Listener implements org eclipse ui I Selection Listener Test Selection Listener constructor comment public Test Selection Listener super  TestSelectionListener ISelectionListener TestSelectionListener TestSelectionListener
Notifies this listener that the selection has changed param part the workbench part containing the selection param selection the new selection or code null code if none public void selection Changed I Workbench Part part I Selection selection System out println selection Changed selection NON NLS 2 NON NLS 1  selectionChanged IWorkbenchPart ISelection selectionChanged

public class UI Hack Finder Used to mark code functionality that we may want in the future public static void fix Future  UIHackFinder fixFuture
public static void fix Future Used to mark code that must be fixed up related to error handling public static void fix Handler  fixFuture fixHandler
public static void fix Handler Used to mark code that must be fixed up related to ISV or plugin public static void fixPR  fixHandler
public static void fixPR Used to mark code that must be fixed up public static void fixUI 

public static void start int operation String label if debug operation System out println start Strings operation label operations put operation label new Long System current Time Millis  startStrings currentTimeMillis
public static void end int operation String label if debug operation Long start Time Long operations remove operation label System out println Time NON NLS 1 System current Time Millis start Time long Value end Strings operation label  startTime currentTimeMillis startTime longValue endStrings

private Tab Item selected Tab Workbook constructor comment public Workbook Composite parent int style tab Folder new Tab Folder parent style tab Folder add Selection Listener new Selection Adapter public void widget Selected Selection Event event Tab Item new Selected Tab Tab Item event item if selected Tab new Selected Tab Do nothing if the selection did not change return if selected Tab null selected Tab is Disposed Workbook Page selected Page get Workbook Page selected Tab if selected Page deactivate tab Folder set Selection new Tab Item selected Tab return selected Tab new Selected Tab Workbook Page new Selected Page get Workbook Page new Selected Tab new Selected Page activate  TabItem selectedTab tabFolder TabFolder tabFolder addSelectionListener SelectionAdapter widgetSelected SelectionEvent TabItem newSelectedTab TabItem selectedTab newSelectedTab selectedTab selectedTab isDisposed WorkbookPage selectedPage getWorkbookPage selectedTab selectedPage tabFolder setSelection TabItem selectedTab selectedTab newSelectedTab WorkbookPage newSelectedPage getWorkbookPage newSelectedTab newSelectedPage
public Workbook Page get Selected Page int index tab Folder get Selection Index if index 1 When can this be 1 return null Tab Item selected Item tab Folder get Item index return Workbook Page selected Item get Data  WorkbookPage getSelectedPage tabFolder getSelectionIndex TabItem selectedItem tabFolder getItem WorkbookPage selectedItem getData
public Tab Folder get Tab Folder return tab Folder  TabFolder getTabFolder tabFolder
protected Workbook Page get Workbook Page Tab Item item try return Workbook Page item get Data catch Class Cast Exception e return null  WorkbookPage getWorkbookPage TabItem WorkbookPage getData ClassCastException
public Workbook Page get Workbook Pages Tab Item tab Items tab Folder get Items int n Items tab Items length Workbook Page workbook Pages new Workbook Page n Items for int i 0 i n Items i workbook Pages i get Workbook Page tab Items i return workbook Pages  WorkbookPage getWorkbookPages TabItem tabItems tabFolder getItems nItems tabItems WorkbookPage workbookPages WorkbookPage nItems nItems workbookPages getWorkbookPage tabItems workbookPages
public void set Selected Page Workbook Page workbook Page Tab Item new Selected Tab workbook Page get Tab Item if selected Tab new Selected Tab return selected Tab new Selected Tab workbook Page activate tab Folder set Selection new Tab Item new Selected Tab  setSelectedPage WorkbookPage workbookPage TabItem newSelectedTab workbookPage getTabItem selectedTab newSelectedTab selectedTab newSelectedTab workbookPage tabFolder setSelection TabItem newSelectedTab

public Tab Item tab Item Workbook Page constructor comment public Workbook Page Workbook parent Tab Folder folder parent get Tab Folder tab Item new Tab Item folder SWT NONE tab Item set Data this  TabItem tabItem WorkbookPage WorkbookPage TabFolder getTabFolder tabItem TabItem tabItem setData
public void activate if tab Item get Control null tab Item set Control create Control tab Item get Parent  tabItem getControl tabItem setControl createControl tabItem getParent
protected abstract Control create Control Composite parent  createControl
protected abstract Control create Control Composite parent public boolean deactivate return true  createControl
public void dispose if tab Item null return Tab Item old Item tab Item tab Item null old Item dispose  tabItem TabItem oldItem tabItem tabItem oldItem
old Item dispose public Tab Item get Tab Item return tab Item  oldItem TabItem getTabItem tabItem

Creates a new model with the given initial state param initial State public Model Object initial State state initial State  initialState initialState initialState
Returns the current state of the model return the current model state public Object get State return state  getState
Sets the current state of the model param new State the new state of the model param to Omit change listener that should be omitted from change notifications or null if all listeners should be notified public void set State Object new State I Change Listener to Omit if are Equal new State state return state new State Iterator iter views iterator while iter has Next I Change Listener next I Change Listener iter next if next to Omit next update true  newState toOmit setState newState IChangeListener toOmit areEqual newState newState hasNext IChangeListener IChangeListener toOmit
private boolean are Equal Object o1 Object o2 if o1 null return o2 null if o2 null return false return o1 equals o2  areEqual
Adds the given listener to the set of listeners that will be notified when the state changes param to Add public void add Change Listener I Change Listener change Listener change Listener update false views add change Listener  toAdd addChangeListener IChangeListener changeListener changeListener changeListener
Stops this model from sending change events from the given listener param to Remove public void remove Change Listener I Change Listener change Listener views remove change Listener  toRemove removeChangeListener IChangeListener changeListener changeListener

Editor Pane parent Pane Constructor for Multi Editor Inner Pane public Multi Editor Inner Pane Editor Pane pane I Editor Reference ref Workbench Page page Editor Stack workbook super ref page workbook parent Pane pane  EditorPane parentPane MultiEditorInnerPane MultiEditorInnerPane EditorPane IEditorReference WorkbenchPage EditorStack parentPane
Returns the outer editor public Editor Pane get Parent Pane return parent Pane  EditorPane getParentPane parentPane
Update the gradient on the inner editor title bar private void update Gradient Multi Editor multi Editor Multi Editor parent Pane get Part Reference get Part true if multi Editor null I Editor Part part I Editor Part this get Editor Reference get Part true if part null multi Editor update Gradient part  updateGradient MultiEditor multiEditor MultiEditor parentPane getPartReference getPart multiEditor IEditorPart IEditorPart getEditorReference getPart multiEditor updateGradient
Indicate focus in part public void show Focus boolean in Focus super show Focus in Focus update Gradient  showFocus inFocus showFocus inFocus updateGradient
Method declared on Part Pane package void shell Deactivated super shell Deactivated update Gradient  PartPane shellDeactivated shellDeactivated updateGradient
Method declared on Part Pane package void shell Activated super shell Activated update Gradient  PartPane shellActivated shellActivated updateGradient

public class Multi Editor Outer Pane extends Editor Pane Constructor for Multi Editor Outer Pane public Multi Editor Outer Pane I Editor Reference ref Workbench Page page Editor Stack workbook super ref page workbook  MultiEditorOuterPane EditorPane MultiEditorOuterPane MultiEditorOuterPane IEditorReference WorkbenchPage EditorStack
see Editor Pane protected void request Activation Outer editor is never activated  EditorPane requestActivation

this page page page add Part Listener new I Part Listener public void part Activated I Workbench Part part  addPartListener IPartListener partActivated IWorkbenchPart
page add Part Listener new I Part Listener public void part Activated I Workbench Part part public void part Brought To Top I Workbench Part part  addPartListener IPartListener partActivated IWorkbenchPart partBroughtToTop IWorkbenchPart
public void part Activated I Workbench Part part public void part Brought To Top I Workbench Part part public void part Deactivated I Workbench Part part  partActivated IWorkbenchPart partBroughtToTop IWorkbenchPart partDeactivated IWorkbenchPart
public void part Brought To Top I Workbench Part part public void part Deactivated I Workbench Part part public void part Opened I Workbench Part part  partBroughtToTop IWorkbenchPart partDeactivated IWorkbenchPart partOpened IWorkbenchPart
public void part Closed I Workbench Part part if part instanceof I Editor Part I Editor Part editor I Editor Part part I Editor Input input editor get Editor Input String id editor get Site get Id Iterator e editors iterator Navigation History Editor Info info null Navigation History Editor Info current Info null Navigation History Entry current get Entry active Entry if current null current Info current editor Info while e has Next info Navigation History Editor Info e next if id equals info editorID input equals info editor Input if info current Info info handle Part Closed break else info null if info null return e history iterator int i 0 while e has Next Navigation History Entry entry Navigation History Entry e next if entry editor Info info if entry handle Part Closed update the active entry since we are removing an item if i active Entry active Entry else if i active Entry if i 0 active Entry else active Entry is before item we deleted i e remove entry dispose else i update Actions  partClosed IWorkbenchPart IEditorPart IEditorPart IEditorPart IEditorInput getEditorInput getSite getId NavigationHistoryEditorInfo NavigationHistoryEditorInfo currentInfo NavigationHistoryEntry getEntry activeEntry currentInfo editorInfo hasNext NavigationHistoryEditorInfo editorInput currentInfo handlePartClosed hasNext NavigationHistoryEntry NavigationHistoryEntry editorInfo handlePartClosed activeEntry activeEntry activeEntry activeEntry activeEntry updateActions
private int active Entry 0 Creates a new Navigation History to keep the Navigation Location entries of the specified page public Navigation History Workbench Page page this page page page add Part Listener new I Part Listener public void part Activated I Workbench Part part public void part Brought To Top I Workbench Part part public void part Deactivated I Workbench Part part public void part Opened I Workbench Part part public void part Closed I Workbench Part part if part instanceof I Editor Part I Editor Part editor I Editor Part part I Editor Input input editor get Editor Input String id editor get Site get Id Iterator e editors iterator Navigation History Editor Info info null Navigation History Editor Info current Info null Navigation History Entry current get Entry active Entry if current null current Info current editor Info while e has Next info Navigation History Editor Info e next if id equals info editorID input equals info editor Input if info current Info info handle Part Closed break else info null if info null return e history iterator int i 0 while e has Next Navigation History Entry entry Navigation History Entry e next if entry editor Info info if entry handle Part Closed update the active entry since we are removing an item if i active Entry active Entry else if i active Entry if i 0 active Entry else active Entry is before item we deleted i e remove entry dispose else i update Actions  activeEntry NavigationHistory NavigationLocation NavigationHistory WorkbenchPage addPartListener IPartListener partActivated IWorkbenchPart partBroughtToTop IWorkbenchPart partDeactivated IWorkbenchPart partOpened IWorkbenchPart partClosed IWorkbenchPart IEditorPart IEditorPart IEditorPart IEditorInput getEditorInput getSite getId NavigationHistoryEditorInfo NavigationHistoryEditorInfo currentInfo NavigationHistoryEntry getEntry activeEntry currentInfo editorInfo hasNext NavigationHistoryEditorInfo editorInput currentInfo handlePartClosed hasNext NavigationHistoryEntry NavigationHistoryEntry editorInfo handlePartClosed activeEntry activeEntry activeEntry activeEntry activeEntry updateActions
private Display get Display return page get Workbench Window get Shell get Display  getDisplay getWorkbenchWindow getShell getDisplay
get Display async Exec new Runnable public void run ignore Entries Editor Site site Editor Site part get Editor Site Control c site get Pane get Control if c null c is Disposed return Navigation History Entry e get Entry active Entry if e null part get Editor Input e editor Info editor Input update Entry e add Entry part true  getDisplay asyncExec ignoreEntries EditorSite EditorSite getEditorSite getPane getControl isDisposed NavigationHistoryEntry getEntry activeEntry getEditorInput editorInfo editorInput updateEntry addEntry
public void mark Editor final I Editor Part part if ignore Entries 0 part null return Ignore all entries until the async exec runs Workaround to avoid extra entry when using Open Declaration F3 that opens another editor ignore Entries get Display async Exec new Runnable public void run ignore Entries Editor Site site Editor Site part get Editor Site Control c site get Pane get Control if c null c is Disposed return Navigation History Entry e get Entry active Entry if e null part get Editor Input e editor Info editor Input update Entry e add Entry part true  markEditor IEditorPart ignoreEntries ignoreEntries getDisplay asyncExec ignoreEntries EditorSite EditorSite getEditorSite getPane getControl isDisposed NavigationHistoryEntry getEntry activeEntry getEditorInput editorInfo editorInput updateEntry addEntry
Method declared on I Navigation History public void mark Location I Editor Part part add Entry part true  INavigationHistory markLocation IEditorPart addEntry
Navigation History Entry get Backward Entries int length active Entry Navigation History Entry entries new Navigation History Entry length for int i 0 i active Entry i entries active Entry 1 i get Entry i return entries  NavigationHistoryEntry getBackwardEntries activeEntry NavigationHistoryEntry NavigationHistoryEntry activeEntry activeEntry getEntry
Navigation History Entry get Forward Entries int length history size active Entry 1 length Math max 0 length Navigation History Entry entries new Navigation History Entry length for int i active Entry 1 i history size i entries i active Entry 1 get Entry i return entries  NavigationHistoryEntry getForwardEntries activeEntry NavigationHistoryEntry NavigationHistoryEntry activeEntry activeEntry getEntry
public I Navigation Location get Locations I Navigation Location result new I Navigation Location history size for int i 0 i result length i Navigation History Entry e Navigation History Entry history get i result i e location return result  INavigationLocation getLocations INavigationLocation INavigationLocation NavigationHistoryEntry NavigationHistoryEntry
Method declared on I Navigation History public I Navigation Location get Current Location Navigation History Entry entry get Entry active Entry return entry null null entry location  INavigationHistory INavigationLocation getCurrentLocation NavigationHistoryEntry getEntry activeEntry
Disposes this Navigation History and all entries public void dispose Iterator e history iterator while e has Next Navigation History Entry entry Navigation History Entry e next dispose Entry entry  NavigationHistory hasNext NavigationHistoryEntry NavigationHistoryEntry disposeEntry
Keeps a reference to the forward action to update its state whenever needed public void set Forward Action Navigation History Action action forward Action action update Actions  setForwardAction NavigationHistoryAction forwardAction updateActions
Keeps a reference to the backward action to update its state whenever needed public void set Backward Action Navigation History Action action backward Action action update Actions  setBackwardAction NavigationHistoryAction backwardAction updateActions
private Navigation History Entry get Entry int index if 0 index index history size return Navigation History Entry history get index return null  NavigationHistoryEntry getEntry NavigationHistoryEntry
private void add Navigation History Entry entry remove Forward Entries if history size CAPACITY Navigation History Entry e Navigation History Entry history remove 0 dispose Entry e history add entry active Entry history size 1  NavigationHistoryEntry removeForwardEntries NavigationHistoryEntry NavigationHistoryEntry disposeEntry activeEntry
private void remove Forward Entries int length history size for int i active Entry 1 i length i Navigation History Entry e Navigation History Entry history remove active Entry 1 dispose Entry e  removeForwardEntries activeEntry NavigationHistoryEntry NavigationHistoryEntry activeEntry disposeEntry
private void add Entry I Editor Part part boolean mark Location if ignore Entries 0 part null return I Navigation Location location null if mark Location part instanceof I Navigation Location Provider location I Navigation Location Provider part create Navigation Location Navigation History Entry current get Entry active Entry if current null current editor Info memento null current editor Info restore Editor check Duplicates current editor Info Navigation History Entry e create Entry page part location if current null add e else if e merge Into current dispose Entry e remove Forward Entries else add e print Entries added entry NON NLS 1 update Actions  addEntry IEditorPart markLocation ignoreEntries INavigationLocation markLocation INavigationLocationProvider INavigationLocationProvider createNavigationLocation NavigationHistoryEntry getEntry activeEntry editorInfo editorInfo restoreEditor checkDuplicates editorInfo NavigationHistoryEntry createEntry mergeInto disposeEntry removeForwardEntries printEntries updateActions
private void print Entries String label if false System out println label NON NLS 1 NON NLS 2 int size history size for int i 0 i size i String append active Entry i NON NLS 1 NON NLS 2 System out println append Index i history get i NON NLS 1 NON NLS 2  printEntries activeEntry
Returns true if the forward action can be performed otherwise returns false package boolean can Forward return 0 active Entry 1 active Entry 1 history size  canForward activeEntry activeEntry
Returns true if the backward action can be performed otherwise returns false package boolean can Backward return 0 active Entry 1 active Entry 1 history size  canBackward activeEntry activeEntry
Update the actions enable disable and tooltip state private void update Actions if backward Action null backward Action update if forward Action null forward Action update  updateActions backwardAction backwardAction forwardAction forwardAction
private void goto Entry Navigation History Entry entry if entry null return try ignore Entries if entry editor Info memento null entry editor Info restore Editor check Duplicates entry editor Info entry restore Location update Actions print Entries goto entry NON NLS 1 finally ignore Entries  gotoEntry NavigationHistoryEntry ignoreEntries editorInfo editorInfo restoreEditor checkDuplicates editorInfo restoreLocation updateActions printEntries ignoreEntries
private void update Entry Navigation History Entry active Entry if active Entry null active Entry location null return active Entry location update print Entries update Entry NON NLS 1  updateEntry NavigationHistoryEntry activeEntry activeEntry activeEntry activeEntry printEntries updateEntry
its context public void forward if can Forward shift Entry true  canForward shiftEntry
its context public void backward if can Backward shift Entry false  canBackward shiftEntry
private void shift Entry boolean forward update Entry get Entry active Entry if forward active Entry else active Entry Navigation History Entry entry get Entry active Entry if entry null goto Entry entry  shiftEntry updateEntry getEntry activeEntry activeEntry activeEntry NavigationHistoryEntry getEntry activeEntry gotoEntry
protected void shift Current Entry Navigation History Entry entry update Entry get Entry active Entry active Entry history index Of entry goto Entry entry  shiftCurrentEntry NavigationHistoryEntry updateEntry getEntry activeEntry activeEntry indexOf gotoEntry
Save the state of this history into the memento void save State I Memento memento Navigation History Entry c Entry Navigation History Entry get Entry active Entry if c Entry null c Entry editor Info is Persistable return Array List editors Array List this editors clone for Iterator iter editors iterator iter has Next Navigation History Editor Info info Navigation History Editor Info iter next if info is Persistable iter remove I Memento editors Mem memento create Child I Workbench Constants TAG EDITORS for Iterator iter editors iterator iter has Next Navigation History Editor Info info Navigation History Editor Info iter next info save State editors Mem create Child I Workbench Constants TAG EDITOR Array List list new Array List history size int size history size for int i 0 i size i Navigation History Entry entry Navigation History Entry history get i if entry editor Info is Persistable list add entry size list size for int i 0 i size i Navigation History Entry entry Navigation History Entry list get i I Memento child Mem memento create Child I Workbench Constants TAG ITEM if entry c Entry child Mem put String I Workbench Constants TAG ACTIVE true NON NLS 1 entry save State child Mem list child Mem put Integer I Workbench Constants TAG INDEX editors index Of entry editor Info  saveState IMemento NavigationHistoryEntry cEntry NavigationHistoryEntry getEntry activeEntry cEntry cEntry editorInfo isPersistable ArrayList ArrayList hasNext NavigationHistoryEditorInfo NavigationHistoryEditorInfo isPersistable IMemento editorsMem createChild IWorkbenchConstants TAG_EDITORS hasNext NavigationHistoryEditorInfo NavigationHistoryEditorInfo saveState editorsMem createChild IWorkbenchConstants TAG_EDITOR ArrayList ArrayList NavigationHistoryEntry NavigationHistoryEntry editorInfo isPersistable NavigationHistoryEntry NavigationHistoryEntry IMemento childMem createChild IWorkbenchConstants TAG_ITEM cEntry childMem putString IWorkbenchConstants TAG_ACTIVE saveState childMem childMem putInteger IWorkbenchConstants TAG_INDEX indexOf editorInfo
Restore the state of this history from the memento void restore State I Memento memento I Memento editors Mem memento get Child I Workbench Constants TAG EDITORS I Memento items memento get Children I Workbench Constants TAG ITEM if items length 0 editors Mem null if page get Active Editor null mark Location page get Active Editor return I Memento children editors Mem get Children I Workbench Constants TAG EDITOR Navigation History Editor Info editors Info new Navigation History Editor Info children length for int i 0 i editors Info length i editors Info i new Navigation History Editor Info children i editors add editors Info i for int i 0 i items length i I Memento item items i int index item get Integer I Workbench Constants TAG INDEX int Value Navigation History Editor Info info editors Info index info ref Count Navigation History Entry entry new Navigation History Entry info page null null history add entry entry restore State item if item get String I Workbench Constants TAG ACTIVE null active Entry i Navigation History Entry entry get Entry active Entry if entry null entry editor Info editor Input null if page get Active Editor page find Editor entry editor Info editor Input goto Entry entry  restoreState IMemento IMemento editorsMem getChild IWorkbenchConstants TAG_EDITORS IMemento getChildren IWorkbenchConstants TAG_ITEM editorsMem getActiveEditor markLocation getActiveEditor IMemento editorsMem getChildren IWorkbenchConstants TAG_EDITOR NavigationHistoryEditorInfo editorsInfo NavigationHistoryEditorInfo editorsInfo editorsInfo NavigationHistoryEditorInfo editorsInfo IMemento getInteger IWorkbenchConstants TAG_INDEX intValue NavigationHistoryEditorInfo editorsInfo refCount NavigationHistoryEntry NavigationHistoryEntry restoreState getString IWorkbenchConstants TAG_ACTIVE activeEntry NavigationHistoryEntry getEntry activeEntry editorInfo editorInput getActiveEditor findEditor editorInfo editorInput gotoEntry
public Navigation History Entry create Entry I Workbench Page page I Editor Part part I Navigation Location location String editorID part get Site get Id I Editor Input editor Input part get Editor Input Navigation History Editor Info info null for Iterator iter editors iterator iter has Next info Navigation History Editor Info iter next if editorID equals info editorID editor Input equals info editor Input info ref Count break else info null if info null info new Navigation History Editor Info part info ref Count editors add info return new Navigation History Entry info page part location  NavigationHistoryEntry createEntry IWorkbenchPage IEditorPart INavigationLocation getSite getId IEditorInput editorInput getEditorInput NavigationHistoryEditorInfo hasNext NavigationHistoryEditorInfo editorInput editorInput refCount NavigationHistoryEditorInfo refCount NavigationHistoryEntry
public void dispose Entry Navigation History Entry entry if entry editor Info null return entry editor Info ref Count if entry editor Info ref Count 0 editors remove entry editor Info entry dispose  disposeEntry NavigationHistoryEntry editorInfo editorInfo refCount editorInfo refCount editorInfo
void check Duplicates Navigation History Editor Info info Navigation History Editor Info dup null if info editor Input null failed to restore return for Iterator iter editors iterator iter has Next dup Navigation History Editor Info iter next if info dup info editorID equals dup editorID info editor Input equals dup editor Input break else dup null if dup null return for Iterator iter history iterator iter has Next Navigation History Entry entry Navigation History Entry iter next if entry editor Info dup entry editor Info info info ref Count editors remove dup  checkDuplicates NavigationHistoryEditorInfo NavigationHistoryEditorInfo editorInput hasNext NavigationHistoryEditorInfo editorInput editorInput hasNext NavigationHistoryEntry NavigationHistoryEntry editorInfo editorInfo refCount

private class Menu Creator implements I Menu Creator public void dispose if history Menu null for int i 0 i history Menu get Item Count i Menu Item menu Item history Menu get Item i menu Item set Data null history Menu dispose history Menu null  MenuCreator IMenuCreator historyMenu historyMenu getItemCount MenuItem menuItem historyMenu getItem menuItem setData historyMenu historyMenu
public Menu get Menu Menu parent return null  getMenu
item set Text text item add Selection Listener new Selection Adapter public void widget Selected Selection Event e history shift Current Entry Navigation History Entry e widget get Data  setText addSelectionListener SelectionAdapter widgetSelected SelectionEvent shiftCurrentEntry NavigationHistoryEntry getData
public Menu get Menu Control parent dispose history Menu new Menu parent I Workbench Page page get Workbench Window get Active Page if page null return history Menu final Navigation History history Navigation History get Workbench Window get Active Page get Navigation History Navigation History Entry entries if forward entries history get Forward Entries else entries history get Backward Entries int entries Count new int entries length for int i 0 i entries Count length i entries Count i 1 entries colapse Entries entries entries Count for int i 0 i entries length i if i MAX HISTORY LENGTH break String text entries i get History Text if text null Menu Item item new Menu Item history Menu SWT NONE item set Data entries i if entries Count i 1 text Workbench Messages format Navigation History Action locations new String text new Integer entries Count i to String NON NLS 1 item set Text text item add Selection Listener new Selection Adapter public void widget Selected Selection Event e history shift Current Entry Navigation History Entry e widget get Data return history Menu  getMenu historyMenu IWorkbenchPage getWorkbenchWindow getActivePage historyMenu NavigationHistory NavigationHistory getWorkbenchWindow getActivePage getNavigationHistory NavigationHistoryEntry getForwardEntries getBackwardEntries entriesCount entriesCount entriesCount colapseEntries entriesCount MAX_HISTORY_LENGTH getHistoryText MenuItem MenuItem historyMenu setData entriesCount WorkbenchMessages NavigationHistoryAction entriesCount toString setText addSelectionListener SelectionAdapter widgetSelected SelectionEvent shiftCurrentEntry NavigationHistoryEntry getData historyMenu
Create a new instance of code Navigation History Action code param window the workbench window this action applies to param forward if this action should move history forward of backward public Navigation History Action I Workbench Window window boolean forward super window NON NLS 1 I Shared Images shared Images window get Workbench get Shared Images if forward set Text Workbench Messages get String Navigation History Action forward text NON NLS 1 set Tool Tip Text Workbench Messages get String Navigation History Action forward tool Tip NON NLS 1 issue missing action id Workbench Help set Help this I Help Context Ids NAVIGATION HISTORY FORWARD set Image Descriptor shared Images get Image Descriptor I Shared Images IMG TOOL FORWARD set Disabled Image Descriptor shared Images get Image Descriptor I Shared Images IMG TOOL FORWARD DISABLED set Action Definition Id org eclipse ui navigate forward History NON NLS 1 else set Text Workbench Messages get String Navigation History Action backward text NON NLS 1 set Tool Tip Text Workbench Messages get String Navigation History Action backward tool Tip NON NLS 1 issue missing action id Workbench Help set Help this I Help Context Ids NAVIGATION HISTORY BACKWARD set Image Descriptor shared Images get Image Descriptor I Shared Images IMG TOOL BACK set Disabled Image Descriptor shared Images get Image Descriptor I Shared Images IMG TOOL BACK DISABLED set Action Definition Id org eclipse ui navigate backward History NON NLS 1 Workbench Help set Help this I Help Context Ids CLOSE ALL PAGES ACTION set Enabled false this forward forward set Menu Creator new Menu Creator  NavigationHistoryAction NavigationHistoryAction IWorkbenchWindow ISharedImages sharedImages getWorkbench getSharedImages setText WorkbenchMessages getString NavigationHistoryAction setToolTipText WorkbenchMessages getString NavigationHistoryAction toolTip WorkbenchHelp setHelp IHelpContextIds NAVIGATION_HISTORY_FORWARD setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_FORWARD setDisabledImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_FORWARD_DISABLED setActionDefinitionId forwardHistory setText WorkbenchMessages getString NavigationHistoryAction setToolTipText WorkbenchMessages getString NavigationHistoryAction toolTip WorkbenchHelp setHelp IHelpContextIds NAVIGATION_HISTORY_BACKWARD setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_BACK setDisabledImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_BACK_DISABLED setActionDefinitionId backwardHistory WorkbenchHelp setHelp IHelpContextIds CLOSE_ALL_PAGES_ACTION setEnabled setMenuCreator MenuCreator
Method declared on Page Event Action public void page Closed I Workbench Page page super page Closed page set Enabled false  PageEventAction pageClosed IWorkbenchPage pageClosed setEnabled
private Navigation History Entry colapse Entries Navigation History Entry entries int entries Count Array List all Entries new Array List Arrays as List entries Navigation History Entry previous Entry null int i 1 for Iterator iter all Entries iterator iter has Next Navigation History Entry entry Navigation History Entry iter next if previous Entry null String text previous Entry get History Text if text null if text equals entry get History Text previous Entry editor Info entry editor Info iter remove entries Count i continue previous Entry entry i entries new Navigation History Entry all Entries size return Navigation History Entry all Entries to Array entries  NavigationHistoryEntry colapseEntries NavigationHistoryEntry entriesCount ArrayList allEntries ArrayList asList NavigationHistoryEntry previousEntry allEntries hasNext NavigationHistoryEntry NavigationHistoryEntry previousEntry previousEntry getHistoryText getHistoryText previousEntry editorInfo editorInfo entriesCount previousEntry NavigationHistoryEntry allEntries NavigationHistoryEntry allEntries toArray
public void page Activated I Workbench Page page super page Activated page Navigation History nh Navigation History page get Navigation History if forward nh set Forward Action this else nh set Backward Action this  pageActivated IWorkbenchPage pageActivated NavigationHistory NavigationHistory getNavigationHistory setForwardAction setBackwardAction
public void run if get Workbench Window null action has been disposed return I Workbench Page page get Active Page if page null Navigation History nh Navigation History page get Navigation History if forward nh forward else nh backward  getWorkbenchWindow IWorkbenchPage getActivePage NavigationHistory NavigationHistory getNavigationHistory
public void update Set the enabled state of the action and set the tool tip text The tool tip text is set to reflect the item that one will move back forward to Workbench Page page Workbench Page get Active Page if page null return Navigation History history Navigation History page get Navigation History Navigation History Entry entries if forward set Enabled history can Forward entries history get Forward Entries if entries length 0 Navigation History Entry entry entries 0 String text Workbench Messages format Navigation History Action forward tool Tip Name new String entry get History Text NON NLS 1 set Tool Tip Text text else set Tool Tip Text Workbench Messages get String Navigation History Action forward tool Tip NON NLS 1 else set Enabled history can Backward entries history get Backward Entries if entries length 0 Navigation History Entry entry entries 0 String text Workbench Messages format Navigation History Action backward tool Tip Name new String entry get History Text NON NLS 1 set Tool Tip Text text else set Tool Tip Text Workbench Messages get String Navigation History Action backward tool Tip NON NLS 1  WorkbenchPage WorkbenchPage getActivePage NavigationHistory NavigationHistory getNavigationHistory NavigationHistoryEntry setEnabled canForward getForwardEntries NavigationHistoryEntry WorkbenchMessages NavigationHistoryAction toolTipName getHistoryText setToolTipText setToolTipText WorkbenchMessages getString NavigationHistoryAction toolTip setEnabled canBackward getBackwardEntries NavigationHistoryEntry WorkbenchMessages NavigationHistoryAction toolTipName getHistoryText setToolTipText setToolTipText WorkbenchMessages getString NavigationHistoryAction toolTip

I Memento memento Navigation History Editor Info I Editor Part part editorID part get Site get Id editor Input part get Editor Input  IMemento NavigationHistoryEditorInfo IEditorPart getSite getId editorInput getEditorInput
editor Input part get Editor Input Navigation History Editor Info I Memento memento this memento memento  editorInput getEditorInput NavigationHistoryEditorInfo IMemento
boolean is Persistable if editor Input null I Persistable Element persistable editor Input get Persistable return persistable null return memento null  isPersistable editorInput IPersistableElement editorInput getPersistable
void handle Part Closed if is Persistable return if memento null I Persistable Element persistable editor Input get Persistable memento XML Memento create Write Root I Workbench Constants TAG EDITOR memento put String I Workbench Constants TAG ID editorID memento put String I Workbench Constants TAG FACTORY ID persistable get Factory Id persistable save State memento editorID null editor Input null  handlePartClosed isPersistable IPersistableElement editorInput getPersistable XMLMemento createWriteRoot IWorkbenchConstants TAG_EDITOR putString IWorkbenchConstants TAG_ID putString IWorkbenchConstants TAG_FACTORY_ID getFactoryId saveState editorInput
void restore Editor if memento null return String factoryID memento get String I Workbench Constants TAG FACTORY ID I Element Factory factory PlatformUI get Workbench get Element Factory factoryID if factory null I Adaptable element factory create Element memento if element instanceof I Editor Input editor Input I Editor Input element editorID memento get String I Workbench Constants TAG ID memento null  restoreEditor getString IWorkbenchConstants TAG_FACTORY_ID IElementFactory getWorkbench getElementFactory IAdaptable createElement IEditorInput editorInput IEditorInput getString IWorkbenchConstants TAG_ID
void save State I Memento mem if editor Input null I Persistable Element persistable editor Input get Persistable mem put String I Workbench Constants TAG ID editorID mem put String I Workbench Constants TAG FACTORY ID persistable get Factory Id persistable save State mem else if memento null mem put Memento memento  saveState IMemento editorInput IPersistableElement editorInput getPersistable putString IWorkbenchConstants TAG_ID putString IWorkbenchConstants TAG_FACTORY_ID getFactoryId saveState putMemento

Constructs a new History Entry and intializes its editor input and editor id public Navigation History Entry Navigation History Editor Info editor Info I Workbench Page page I Editor Part part I Navigation Location location this editor Info editor Info this page page this location location if location null history Text location get Text ensure that the history Text is initialized to something if history Text null history Text length 0 if part null history Text part get Title  HistoryEntry NavigationHistoryEntry NavigationHistoryEditorInfo editorInfo IWorkbenchPage IEditorPart INavigationLocation editorInfo editorInfo historyText getText historyText historyText historyText historyText getTitle
Restores the state of the entry and the location if needed and then restores the location void restore Location if editor Info editor Input null editor Info editorID null try I Editor Part editor page open Editor editor Info editor Input editor Info editorID true if location null if editor instanceof I Navigation Location Provider location I Navigation Location Provider editor create Empty Navigation Location if location null if location Memento null location set Input editor Info editor Input location restore State location Memento location Memento null location restore Location catch Part Init Exception e ignore for now  restoreLocation editorInfo editorInput editorInfo IEditorPart openEditor editorInfo editorInput editorInfo INavigationLocationProvider INavigationLocationProvider createEmptyNavigationLocation locationMemento setInput editorInfo editorInput restoreState locationMemento locationMemento restoreLocation PartInitException
Return the label to display in the history drop down list Use the history entry text if the location has not been restored yet String get History Text if location null location exists or has been restored use its text Also update the history Text so that this value will be saved Doing so handles cases where get Text value may be dynamic String text location get Text if text null text equals NON NLS 1 text history Text else history Text text return text else return history Text  getHistoryText historyText getText getText historyText historyText historyText
Saves the state of this entry and its location Returns true if possible otherwise returns false boolean handle Part Closed if editor Info is Persistable return false if location null location Memento XML Memento create Write Root I Workbench Constants TAG POSITION location save State location Memento location release State return true  handlePartClosed editorInfo isPersistable locationMemento XMLMemento createWriteRoot IWorkbenchConstants TAG_POSITION saveState locationMemento releaseState
Saves the state of this entry and its location void save State I Memento mem Array List entries mem put String I Workbench Constants TAG HISTORY LABEL get History Text if location Memento null I Memento child Mem mem create Child I Workbench Constants TAG POSITION child Mem put Memento location Memento else if location null I Memento child Mem mem create Child I Workbench Constants TAG POSITION location save State child Mem  saveState IMemento ArrayList putString IWorkbenchConstants TAG_HISTORY_LABEL getHistoryText locationMemento IMemento childMem createChild IWorkbenchConstants TAG_POSITION childMem putMemento locationMemento IMemento childMem createChild IWorkbenchConstants TAG_POSITION saveState childMem
Restore the state of this entry void restore State I Memento mem history Text mem get String I Workbench Constants TAG HISTORY LABEL location Memento mem get Child I Workbench Constants TAG POSITION  restoreState IMemento historyText getString IWorkbenchConstants TAG_HISTORY_LABEL locationMemento getChild IWorkbenchConstants TAG_POSITION
Method declared on Object public String to String return Input editor Info editor Input Details location NON NLS 1 NON NLS 2 NON NLS 3  toString editorInfo editorInput
Disposes this entry and its location void dispose if location null location dispose editor Info null  editorInfo
Merges this entry into the current entry Returns true if the merge was possible otherwise returns false boolean merge Into Navigation History Entry current Entry if editor Info editor Input null editor Info editor Input equals current Entry editor Info editor Input if location null if current Entry location null current Entry location location return true else return location merge Into current Entry location else if current Entry location null return true return false  mergeInto NavigationHistoryEntry currentEntry editorInfo editorInput editorInfo editorInput currentEntry editorInfo editorInput currentEntry currentEntry mergeInto currentEntry currentEntry

The constructor public Object Action Contributor I Configuration Element config this config config this adaptable P TRUE equals Ignore Case config get Attribute ATT ADAPTABLE  ObjectActionContributor IConfigurationElement P_TRUE equalsIgnoreCase getAttribute ATT_ADAPTABLE
Method declared on I Object Contributor public boolean can Adapt return adaptable  IObjectContributor canAdapt
public void contribute Object Action Id Overrides List action Id Overrides if config Read read Config Element Easy case out if no actions if current Contribution actions null for int i 0 i current Contribution actions size i Action Descriptor ad Action Descriptor current Contribution actions get i String id ad get Action get Override Action Id if id null action Id Overrides add id  contributeObjectActionIdOverrides actionIdOverrides configRead readConfigElement currentContribution currentContribution ActionDescriptor ActionDescriptor currentContribution getAction getOverrideActionId actionIdOverrides
Contributes actions applicable for the current selection public boolean contribute Object Actions I Workbench Part part I Menu Manager menu I Selection Provider sel Prov List action Id Overrides if config Read read Config Element Easy case out if no actions if current Contribution actions null return false Get a structured selection I Selection sel sel Prov get Selection if sel null sel instanceof I Structured Selection return false I Structured Selection selection I Structured Selection sel Generate menu for int i 0 i current Contribution actions size i Action Descriptor ad Action Descriptor current Contribution actions get i if action Id Overrides contains ad get Id current Contribution contribute Menu Action ad menu true Update action for the current selection and part if ad get Action instanceof Object Plugin Action Object Plugin Action action Object Plugin Action ad get Action action set Active Part part action selection Changed selection return true  contributeObjectActions IWorkbenchPart IMenuManager ISelectionProvider selProv actionIdOverrides configRead readConfigElement currentContribution ISelection selProv getSelection IStructuredSelection IStructuredSelection IStructuredSelection currentContribution ActionDescriptor ActionDescriptor currentContribution actionIdOverrides getId currentContribution contributeMenuAction getAction ObjectPluginAction ObjectPluginAction ObjectPluginAction getAction setActivePart selectionChanged
Contributes menus applicable for the current selection public boolean contribute Object Menus I Menu Manager menu I Selection Provider sel Prov if config Read read Config Element Easy case out if no menus if current Contribution menus null return false Get a structured selection I Selection sel sel Prov get Selection if sel null sel instanceof I Structured Selection return false Generate menu for int i 0 i current Contribution menus size i I Configuration Element menu Element I Configuration Element current Contribution menus get i current Contribution contribute Menu menu Element menu true return true  contributeObjectMenus IMenuManager ISelectionProvider selProv configRead readConfigElement currentContribution ISelection selProv getSelection IStructuredSelection currentContribution IConfigurationElement menuElement IConfigurationElement currentContribution currentContribution contributeMenu menuElement
Method declared on Plugin Action Builder protected Action Descriptor create Action Descriptor I Configuration Element element return new Action Descriptor element Action Descriptor T POPUP  PluginActionBuilder ActionDescriptor createActionDescriptor IConfigurationElement ActionDescriptor ActionDescriptor T_POPUP
Method declared on Plugin Action Builder protected Basic Contribution create Contribution return new Object Contribution  PluginActionBuilder BasicContribution createContribution ObjectContribution
Returns true if name filter is not specified for the contribution or the current selection matches the filter public boolean is Applicable To Object object if config Read read Config Element if test Name object return false return Object Contribution current Contribution is Applicable To object  isApplicableTo configRead readConfigElement testName ObjectContribution currentContribution isApplicableTo
Reads the configuration element and all the children This creates an action descriptor for every action in the extension private void read Config Element current Contribution create Contribution read Element Children config config Read true  readConfigElement currentContribution createContribution readElementChildren configRead
protected boolean read Element I Configuration Element element String tag element get Name Found visibility sub element if tag equals Plugin Action Builder TAG VISIBILITY Object Contribution current Contribution set Visibility Test element return true Found filter sub element if tag equals Plugin Action Builder TAG FILTER Object Contribution current Contribution add Filter Test element return true if tag equals TAG ENABLEMENT Object Contribution current Contribution set Enablement Test element return true return super read Element element  readElement IConfigurationElement getName PluginActionBuilder TAG_VISIBILITY ObjectContribution currentContribution setVisibilityTest PluginActionBuilder TAG_FILTER ObjectContribution currentContribution addFilterTest TAG_ENABLEMENT ObjectContribution currentContribution setEnablementTest readElement
Returns whether the current selection matches the contribution name filter private boolean test Name Object object String name Filter config get Attribute ATT NAME FILTER if name Filter null return true String object Name null if object instanceof I Adaptable I Adaptable element I Adaptable object I Workbench Adapter de I Workbench Adapter element get Adapter I Workbench Adapter class if de null object Name de get Label element if object Name null object Name object to String return Selection Enabler verify Name Match object Name name Filter  testName nameFilter getAttribute ATT_NAME_FILTER nameFilter objectName IAdaptable IAdaptable IAdaptable IWorkbenchAdapter IWorkbenchAdapter getAdapter IWorkbenchAdapter objectName getLabel objectName objectName toString SelectionEnabler verifyNameMatch objectName nameFilter
public void add Filter Test I Configuration Element element if filter Test null filter Test new Object Filter Test filter Test add Filter Element element  addFilterTest IConfigurationElement filterTest filterTest ObjectFilterTest filterTest addFilterElement
public void set Visibility Test I Configuration Element element visibility Test new Action Expression element  setVisibilityTest IConfigurationElement visibilityTest ActionExpression
public void set Enablement Test I Configuration Element element try enablement Expression Converter get Default perform element catch Core Exception e Workbench Plugin get Default get Log log e get Status  setEnablementTest IConfigurationElement ExpressionConverter getDefault CoreException WorkbenchPlugin getDefault getLog getStatus
Returns true if name filter is not specified for the contribution or the current selection matches the filter public boolean is Applicable To Object object boolean result true if visibility Test null result result visibility Test is Enabled For object if result return result else if filter Test null result result filter Test matches object true if result return result if enablement null try I Evaluation Context context new Evaluation Context null object context add Variable selection object NON NLS 1 Evaluation Result eval Result enablement evaluate context if eval Result Evaluation Result FALSE return false catch Core Exception e enablement null Workbench Plugin get Default get Log log e get Status result false return result  isApplicableTo visibilityTest visibilityTest isEnabledFor filterTest filterTest IEvaluationContext EvaluationContext addVariable EvaluationResult evalResult evalResult EvaluationResult CoreException WorkbenchPlugin getDefault getLog getStatus

Popup Menu Manager constructor public Object Action Contributor Manager load Contributors  PopupMenuManager ObjectActionContributorManager loadContributors
Returns the class search order starting with code extensible Class code The search order is defined in this class comment private List compute Combined Order Class input Class List result new Array List 4 Class clazz input Class while clazz null add the class result add clazz add all the interfaces it implements Class interfaces clazz get Interfaces for int i 0 i interfaces length i result add interfaces i get the superclass clazz clazz get Superclass return result  extensibleClass computeCombinedOrder inputClass ArrayList inputClass getInterfaces getSuperclass
Contributes submenus and or actions applicable to the selection in the provided viewer into the provided popup menu public boolean contribute Object Actions I Workbench Part part I Menu Manager popup Menu I Selection Provider sel Prov Get a selection I Selection selection sel Prov get Selection if selection null return false Convert the selection into an element vector According to the dictionary a selection is one that is selected or a collection of selected things In reflection of this we deal with one or a collection List elements null if selection instanceof I Structured Selection elements I Structured Selection selection to List else elements new Array List 1 elements add selection Calculate the common class and interfaces List common Classes get Common Classes elements if common Classes null common Classes is Empty return false Get the resource class It will be null if any of the elements are resources themselves or do not adapt to I Resource Class resource Class get Common Resource Class elements Get the contributors If there is a resource class add it in List contributors null if resource Class null if common Classes size 1 contributors get Contributors Class common Classes get 0 else contributors new Array List for int i 0 i common Classes size i List results get Contributors Class common Classes get i if results null contributors add All results else contributors get Contributors Class common Classes get 0 resource Class for int i 1 i common Classes size i List results get Contributors Class common Classes get i if results null contributors add All results if contributors null contributors is Empty return false Do the contributions Add menus first then actions boolean actual Contributions false Array List overrides new Array List 4 for int i 0 i contributors size i I Object Action Contributor contributor I Object Action Contributor contributors get i if is Applicable To elements contributor continue if contributor contribute Object Menus popup Menu sel Prov actual Contributions true contributor contribute Object Action Id Overrides overrides for int i 0 i contributors size i I Object Action Contributor contributor I Object Action Contributor contributors get i if is Applicable To elements contributor continue if contributor contribute Object Actions part popup Menu sel Prov overrides actual Contributions true return actual Contributions  contributeObjectActions IWorkbenchPart IMenuManager popupMenu ISelectionProvider selProv ISelection selProv getSelection IStructuredSelection IStructuredSelection toList ArrayList commonClasses getCommonClasses commonClasses commonClasses isEmpty IResource resourceClass getCommonResourceClass resourceClass commonClasses getContributors commonClasses ArrayList commonClasses getContributors commonClasses addAll getContributors commonClasses resourceClass commonClasses getContributors commonClasses addAll isEmpty actualContributions ArrayList ArrayList IObjectActionContributor IObjectActionContributor isApplicableTo contributeObjectMenus popupMenu selProv actualContributions contributeObjectActionIdOverrides IObjectActionContributor IObjectActionContributor isApplicableTo contributeObjectActions popupMenu selProv actualContributions actualContributions
Returns the common denominator class for two input classes private Class get Common Class Class class1 Class class2 List list1 compute Combined Order class1 List list2 compute Combined Order class2 for int i 0 i list1 size i for int j 0 j list2 size j Class candidate1 Class list1 get i Class candidate2 Class list2 get j if candidate1 equals candidate2 return candidate1 no common class return null  getCommonClass computeCombinedOrder computeCombinedOrder
Returns the common denominator class for the given collection of objects private Class get Common Class List objects if objects null objects size 0 return null Class common Class objects get 0 get Class try easy if objects size 1 return common Class try harder for int i 1 i objects size i Object object objects get i Class new Class object get Class try the short cut if new Class equals common Class continue compute common class common Class get Common Class common Class new Class give up if common Class null return null return common Class  getCommonClass commonClass getClass commonClass newClass getClass newClass commonClass commonClass getCommonClass commonClass newClass commonClass commonClass
Returns the common denominator class and interfaces for the given collection of objects private List get Common Classes List objects if objects null objects size 0 return null Quickly handle the easy case if objects size 1 List results new Array List 1 results add objects get 0 get Class return results Compute all the super classes for the first element and then all of the interfaces for the first element and it s super classes List classes compute Class Order objects get 0 get Class List interfaces compute Interface Order classes boolean classes Empty classes is Empty boolean interfaces Empty interfaces is Empty for int i 1 i objects size i Compute all the super classes for the current element List results compute Class Order objects get i get Class if classes Empty classes Empty true if results is Empty When no super classes then it is obvious there are no common super classes with the first element so clear its list classes clear else Remove any super classes of the first element that are not in the current element s super classes list for int j 0 j classes size j if classes get j null classes Empty false if results contains classes get j classes set j null if interfaces Empty Compute all the interfaces for the current element and all of its super classes results compute Interface Order results interfaces Empty true if results is Empty When no interfaces the it is obvious there are no common interfaces between this current element and the first element so clear its list interfaces clear else Remove any interfaces of the first element that are not in the current element s interfaces list for int j 0 j interfaces size j if interfaces get j null interfaces Empty false if results contains interfaces get j interfaces set j null if interfaces Empty classes Empty As soon as we detect nothing in common just exit return null Array List results new Array List 4 Array List super Classes new Array List 4 if classes Empty for int j 0 j classes size j if classes get j null super Classes add classes get j Just keep the first super class if super Classes is Empty results add super Classes get 0 if interfaces Empty Do no include the interfaces belonging to the common super classes as these will be calculated again later in add Contributors method List drop Interfaces null if super Classes is Empty drop Interfaces compute Interface Order super Classes for int j 0 j interfaces size j if interfaces get j null if drop Interfaces null drop Interfaces contains interfaces get j results add interfaces get j return results  getCommonClasses ArrayList getClass computeClassOrder getClass computeInterfaceOrder classesEmpty isEmpty interfacesEmpty isEmpty computeClassOrder getClass classesEmpty classesEmpty isEmpty classesEmpty interfacesEmpty computeInterfaceOrder interfacesEmpty isEmpty interfacesEmpty interfacesEmpty classesEmpty ArrayList ArrayList ArrayList superClasses ArrayList classesEmpty superClasses superClasses isEmpty superClasses interfacesEmpty addContributors dropInterfaces superClasses isEmpty dropInterfaces computeInterfaceOrder superClasses dropInterfaces dropInterfaces
Returns the shared instance of this manager public static Object Action Contributor Manager get Manager if shared Instance null shared Instance new Object Action Contributor Manager return shared Instance  ObjectActionContributorManager getManager sharedInstance sharedInstance ObjectActionContributorManager sharedInstance
Loads the contributors from the workbench s registry private void load Contributors Object Action Contributor Reader reader new Object Action Contributor Reader reader read Popup Contributors this  loadContributors ObjectActionContributorReader ObjectActionContributorReader readPopupContributors
Returns the common denominator resource class for the given collection of objects Do not return a resource class if the objects are resources themselves so as to prevent double registration of actions private Class get Common Resource Class List objects if objects null objects size 0 return null Class resource Class Legacy Resource Support get Resource Class if resource Class null resources plug in not loaded no resources period return null List test List new Array List for int i 0 i objects size i Object object objects get i if object instanceof I Adaptable if resource Class is Instance object continue Object resource get Adapted Resource I Adaptable object if resource null Not a resource and does not adapt No common resource class return null test List add resource else return null return get Common Class test List  getCommonResourceClass resourceClass LegacyResourceSupport getResourceClass resourceClass testList ArrayList IAdaptable resourceClass isInstance getAdaptedResource IAdaptable testList getCommonClass testList

private Object Action Contributor Manager manager Creates popup menu contributor from this element protected void process Object Contribution I Configuration Element element String object Class Name element get Attribute ATT OBJECTCLASS if object Class Name null log Missing Attribute element ATT OBJECTCLASS return I Object Contributor contributor new Object Action Contributor element manager register Contributor contributor object Class Name  ObjectActionContributorManager processObjectContribution IConfigurationElement objectClassName getAttribute ATT_OBJECTCLASS objectClassName logMissingAttribute ATT_OBJECTCLASS IObjectContributor ObjectActionContributor registerContributor objectClassName
Implements abstract method to handle configuration elements protected boolean read Element I Configuration Element element String tag Name element get Name if tag Name equals TAG OBJECT CONTRIBUTION process Object Contribution element return true if tag Name equals Viewer Action Builder TAG CONTRIBUTION TYPE return true return false  readElement IConfigurationElement tagName getName tagName TAG_OBJECT_CONTRIBUTION processObjectContribution tagName ViewerActionBuilder TAG_CONTRIBUTION_TYPE
Reads the registry and registers popup menu contributors found there public void read Popup Contributors Object Action Contributor Manager mng set Manager mng I Extension Registry registry Platform get Extension Registry read Registry registry PlatformUI PLUGIN ID I Workbench Constants PL POPUP MENU  readPopupContributors ObjectActionContributorManager setManager IExtensionRegistry getExtensionRegistry readRegistry PLUGIN_ID IWorkbenchConstants PL_POPUP_MENU
for dynamic UI public void set Manager Object Action Contributor Manager mng manager mng  setManager ObjectActionContributorManager

Constructs a new contributor manager public Object Contributor Manager contributors new Hashtable 5 object Lookup null adapter Lookup null  ObjectContributorManager objectLookup adapterLookup
Adds contributors for the given types to the result list private void add Contributors For List types List result for Iterator classes types iterator classes has Next Class clazz Class classes next List contributor List List contributors get clazz get Name if contributor List null result add All contributor List  addContributorsFor hasNext contributorList getName contributorList addAll contributorList
Returns the class search order starting with code extensible Class code The search order is defined in this class comment protected final List compute Class Order Class extensible Class Array List result new Array List 4 Class clazz extensible Class while clazz null result add clazz clazz clazz get Superclass return result  extensibleClass computeClassOrder extensibleClass ArrayList ArrayList extensibleClass getSuperclass
Returns the interface search order for the class hierarchy described by code class List code The search order is defined in this class comment protected final List compute Interface Order List class List Array List result new Array List 4 Map seen new Hash Map 4 for Iterator list class List iterator list has Next Class interfaces Class list next get Interfaces internal Compute Interface Order interfaces result seen return result  classList computeInterfaceOrder classList ArrayList ArrayList HashMap classList hasNext getInterfaces internalComputeInterfaceOrder
Flushes the cache of contributor search paths This is generally required whenever a contributor is added or removed p It is likely easier to just toss the whole cache rather than trying to be smart and remove only those entries affected public void flush Lookup object Lookup null adapter Lookup null  flushLookup objectLookup adapterLookup
Cache the resource adapter class contributor search path private void cache Adapter Lookup Class adapter Class List results if adapter Lookup null adapter Lookup new Hash Map adapter Lookup put adapter Class results  cacheAdapterLookup adapterClass adapterLookup adapterLookup HashMap adapterLookup adapterClass
Cache the object class contributor search path private void cache Object Lookup Class object Class List results if object Lookup null object Lookup new Hash Map object Lookup put object Class results  cacheObjectLookup objectClass objectLookup objectLookup HashMap objectLookup objectClass
Get the contributions registered to this manager return an unmodifiable code Collection code containing all registered contributions The objects in this code Collection code will be code List code s containing the actual contributions since 3 0 public Collection get Contributors return Collections unmodifiable Collection contributors values  getContributors unmodifiableCollection
Returns all the contributors registered against the given object class protected List get Contributors Class object Class List object List null Lookup the results in the cache first if object Lookup null object List List object Lookup get object Class If not in cache build it if object List null object List add Contributors For object Class if object List size 0 object List EMPTY LIST Store the contribution list into the cache cache Object Lookup object Class object List return object List  getContributors objectClass objectList objectLookup objectList objectLookup objectClass objectList objectList addContributorsFor objectClass objectList objectList EMPTY_LIST cacheObjectLookup objectClass objectList objectList
Return the list of contributors for the supplied class protected List add Contributors For Class object Class List class List compute Class Order object Class List result new Array List add Contributors For class List result class List compute Interface Order class List interfaces add Contributors For class List result return result  addContributorsFor objectClass classList computeClassOrder objectClass ArrayList addContributorsFor classList classList computeInterfaceOrder classList addContributorsFor classList
Get the contributors for object including those it adapts to return The list of contributors empty if none protected List get Contributors Object object Class object Class object get Class Object adapted get Adapted Resource object if adapted null return get Contributors object Class else return get Contributors object Class adapted get Class  getContributors objectClass getClass getAdaptedResource getContributors objectClass getContributors objectClass getClass
Returns true if contributors exist in the manager for this object public boolean has Contributors For Object object List contributors get Contributors object return contributors size 0  hasContributorsFor getContributors
Add interface Class objects to the result list based on the class hierarchy Interfaces will be searched based on their position in the result list private void internal Compute Interface Order Class interfaces List result Map seen List new Interfaces new Array List seen size for int i 0 i interfaces length i Class interfac interfaces i if seen get interfac null result add interfac seen put interfac interfac new Interfaces add interfac for Iterator new List new Interfaces iterator new List has Next internal Compute Interface Order Class new List next get Interfaces result seen  internalComputeInterfaceOrder newInterfaces ArrayList newInterfaces newList newInterfaces newList hasNext internalComputeInterfaceOrder newList getInterfaces
public boolean is Applicable To I Structured Selection selection I Object Contributor contributor Iterator elements selection iterator while elements has Next if contributor is Applicable To elements next false return false return true  isApplicableTo IStructuredSelection IObjectContributor hasNext isApplicableTo
public boolean is Applicable To List list I Object Contributor contributor Iterator elements list iterator while elements has Next if contributor is Applicable To elements next false return false return true  isApplicableTo IObjectContributor hasNext isApplicableTo
see I Contributor Manager register Contributor public void register Contributor I Object Contributor contributor String target Type Vector contributor List Vector contributors get target Type if contributor List null contributor List new Vector 5 contributors put target Type contributor List contributor List add Element contributor flush Lookup  IContributorManager registerContributor registerContributor IObjectContributor targetType contributorList targetType contributorList contributorList targetType contributorList contributorList addElement flushLookup
see I Contributor Manager unregister All Contributors public void unregister All Contributors contributors new Hashtable 5 flush Lookup  IContributorManager unregisterAllContributors unregisterAllContributors flushLookup
see I Contributor Manager unregister Contributor public void unregister Contributor I Object Contributor contributor String target Type Vector contributor List Vector contributors get target Type if contributor List null return contributor List remove Element contributor flush Lookup  IContributorManager unregisterContributor unregisterContributor IObjectContributor targetType contributorList targetType contributorList contributorList removeElement flushLookup
see I Contributor Manager unregister Contributors public void unregister Contributors String target Type contributors remove target Type flush Lookup  IContributorManager unregisterContributors unregisterContributors targetType targetType flushLookup
Returns all the contributors registered against the given object class and the resource class that it has an Adaptable for protected List get Contributors Class object Class Class resource Class List object List null List resource List null Lookup the results in the cache first if object Lookup null object List List object Lookup get object Class if adapter Lookup null resource List List adapter Lookup get resource Class if object List null object List add Contributors For object Class if object List size 0 object List EMPTY LIST cache Object Lookup object Class object List if resource List null List contributors add Contributors For resource Class resource List new Array List contributors size Iterator enum contributors iterator while enum has Next I Object Contributor contributor I Object Contributor enum next if contributor can Adapt resource List add contributor if resource List size 0 resource List EMPTY LIST cache Adapter Lookup resource Class resource List Collect the contribution lists into one result Array List results new Array List object List size resource List size results add All object List results add All resource List return results  getContributors objectClass resourceClass objectList resourceList objectLookup objectList objectLookup objectClass adapterLookup resourceList adapterLookup resourceClass objectList objectList addContributorsFor objectClass objectList objectList EMPTY_LIST cacheObjectLookup objectClass objectList resourceList addContributorsFor resourceClass resourceList ArrayList hasNext IObjectContributor IObjectContributor canAdapt resourceList resourceList resourceList EMPTY_LIST cacheAdapterLookup resourceClass resourceList ArrayList ArrayList objectList resourceList addAll objectList addAll resourceList
Get the adapted resource for the supplied object If the object is an instance of I Resource or is not an instance of I Adaptable return null Otherwise see if it adapts to I Resource via I Contributor Resource Adapter param object Object return an code I Resource code or null protected Object get Adapted Resource Object object Class resource Class Legacy Resource Support get Resource Class if resource Class null return null if resource Class is Instance object return null if object instanceof I Adaptable I Adaptable adaptable I Adaptable object Class contributor Resource Adapter Class Legacy Resource Support getI Contributor Resource Adapter Class if contributor Resource Adapter Class null return null Object resource Adapter adaptable get Adapter contributor Resource Adapter Class if resource Adapter null reflective equivalent of resource Adapter Default Contributor Resource Adapter get Default try Class c Legacy Resource Support get Default Contributor Resource Adapter Class Method m c get Declared Method get Default new Class 0 NON NLS 1 resource Adapter m invoke null new Object 0 catch Exception e shouldn t happen but play it safe return null Object result reflective equivalent of result I Contributor Resource Adapter resource Adapter get Adapted Resource adaptable try Method m contributor Resource Adapter Class get Declared Method get Adapted Resource new Class I Adaptable class NON NLS 1 result m invoke resource Adapter new Object adaptable catch Exception e shouldn t happen but play it safe return null return result return null  IResource IAdaptable IResource IContributorResourceAdapter IResource getAdaptedResource resourceClass LegacyResourceSupport getResourceClass resourceClass resourceClass isInstance IAdaptable IAdaptable IAdaptable contributorResourceAdapterClass LegacyResourceSupport getIContributorResourceAdapterClass contributorResourceAdapterClass resourceAdapter getAdapter contributorResourceAdapterClass resourceAdapter resourceAdapter DefaultContributorResourceAdapter getDefault LegacyResourceSupport getDefaultContributorResourceAdapterClass getDeclaredMethod getDefault resourceAdapter IContributorResourceAdapter resourceAdapter getAdaptedResource contributorResourceAdapterClass getDeclaredMethod getAdaptedResource IAdaptable resourceAdapter

Create a new object filter public Object Filter Test do nothing  ObjectFilterTest
Add a filter element to the test This element must contain a name value filter pair as defined by the code org eclipse ui action Filters code extension point public boolean add Filter Element I Configuration Element element String name element get Attribute name NON NLS 1 if name null return false Get positive property String value element get Attribute value NON NLS 1 if value null return false if filter Elements null filter Elements new Hash Map filter Elements put name value return true  actionFilters addFilterElement IConfigurationElement getAttribute getAttribute filterElements filterElements HashMap filterElements
Returns whether the object filter correctly matches a given object The results will be code true code if there is a filter match p If code adaptable is true code the result will also be code rue code if the object is a wrapper for a resource and the resource produces a filter match p param object the object to examine returns code true code if there is a filter match public boolean matches Object object boolean adaptable Optimize it if filter Elements null return true Try out the object if this precisely Matches object return true If not adaptable or the object is a resource just return if adaptable return false be careful to avoid dependence on I Resource class which may not be present Class resource Class Legacy Resource Support get Resource Class if resource Class null return false if resource Class is Instance object return false Try out the underlying resource Object res null if object instanceof I Adaptable res I Adaptable object get Adapter resource Class if res null return false return this precisely Matches res  filterElements preciselyMatches IResource resourceClass LegacyResourceSupport getResourceClass resourceClass resourceClass isInstance IAdaptable IAdaptable getAdapter resourceClass preciselyMatches
Returns whether the object filter correctly matches a given object private boolean precisely Matches Object object Get the action filter I Action Filter filter null if object instanceof I Action Filter filter I Action Filter object else if object instanceof I Adaptable filter I Action Filter I Adaptable object get Adapter I Action Filter class if filter null return false Run the action filter Iterator iter filter Elements key Set iterator while iter has Next String name String iter next String value String filter Elements get name if filter test Attribute object name value return false return true  preciselyMatches IActionFilter IActionFilter IActionFilter IAdaptable IActionFilter IAdaptable getAdapter IActionFilter filterElements keySet hasNext filterElements testAttribute

Constructs a new Object Plugin Action public Object Plugin Action I Configuration Element action Element String id int style super action Element id style override Action Id action Element get Attribute ATT OVERRIDE ACTION ID  ObjectPluginAction ObjectPluginAction IConfigurationElement actionElement actionElement overrideActionId actionElement getAttribute ATT_OVERRIDE_ACTION_ID
protected void init Delegate super init Delegate if get Delegate instanceof I Object Action Delegate active Part null I Object Action Delegate get Delegate set Active Part this active Part  initDelegate initDelegate getDelegate IObjectActionDelegate activePart IObjectActionDelegate getDelegate setActivePart activePart
Sets the active part for the delegate p This method will be called every time the action appears in a popup menu The target Part may change with each invocation p param action the action proxy that handles presentation portion of the action param target Part the new part target public void set Active Part I Workbench Part target Part active Part target Part I Action Delegate delegate get Delegate if delegate null delegate instanceof I Object Action Delegate I Object Action Delegate delegate set Active Part this active Part  targetPart targetPart setActivePart IWorkbenchPart targetPart activePart targetPart IActionDelegate getDelegate IObjectActionDelegate IObjectActionDelegate setActivePart activePart
Returns the action identifier this action overrides return the action identifier to override or code null code public String get Override Action Id return override Action Id  getOverrideActionId overrideActionId

Create a new instance public Opened Perspectives Menu I Workbench Window window String id boolean show Separator super id this window window this show Separator show Separator  OpenedPerspectivesMenu IWorkbenchWindow showSeparator showSeparator showSeparator
Returns the text for a perspective This may be truncated to fit within the MAX TEXT LENGTH private String calc Text int number I Perspective Descriptor persp String Buffer sb new String Buffer if number 10 sb append sb append number sb append String suffix persp get Label if suffix length MAX TEXT LENGTH sb append suffix else sb append suffix substring 0 MAX TEXT LENGTH 2 sb append NON NLS 1 sb append suffix substring suffix length MAX TEXT LENGTH 2 return sb to String  MAX_TEXT_LENGTH calcText IPerspectiveDescriptor StringBuffer StringBuffer getLabel MAX_TEXT_LENGTH MAX_TEXT_LENGTH MAX_TEXT_LENGTH toString
mi add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Workbench Page page window get Active Page if page null page set Perspective desc  addSelectionListener SelectionAdapter widgetSelected SelectionEvent IWorkbenchPage getActivePage setPerspective
Fills the given menu with menu items for all opened perspectives public void fill Menu menu int index final I Workbench Page page window get Active Page if page null return Add separator if show Separator new Menu Item menu SWT SEPARATOR index index Add one item for each opened perspective I Perspective Descriptor active Persp page get Perspective I Perspective Descriptor descriptors Workbench Page page get Opened Perspectives int count 1 for int i 0 i descriptors length i final I Perspective Descriptor desc I Perspective Descriptor descriptors i Menu Item mi new Menu Item menu SWT RADIO index mi set Selection desc active Persp mi set Text calc Text count desc avoid hanging onto page or perspective directly in menu mi add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Workbench Page page window get Active Page if page null page set Perspective desc index count  IWorkbenchPage getActivePage showSeparator MenuItem IPerspectiveDescriptor activePersp getPerspective IPerspectiveDescriptor WorkbenchPage getOpenedPerspectives IPerspectiveDescriptor IPerspectiveDescriptor MenuItem MenuItem setSelection activePersp setText calcText addSelectionListener SelectionAdapter widgetSelected SelectionEvent IWorkbenchPage getActivePage setPerspective
Overridden to always return true and force dynamic menu building public boolean is Dynamic return true  isDynamic

Create a new code Open Preference Action code This default constructor allows the the action to be called from the welcome page public Open Preferences Action this PlatformUI get Workbench get Active Workbench Window  OpenPreferenceAction OpenPreferencesAction getWorkbench getActiveWorkbenchWindow
Create a new code Open Preference Action code and initialize it from the given resource bundle public Open Preferences Action I Workbench Window window super Workbench Messages get String Open Preferences text NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window set Action Definition Id org eclipse ui window preferences NON NLS 1 issue action id not set set Tool Tip Text Workbench Messages get String Open Preferences tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids OPEN PREFERENCES ACTION  OpenPreferenceAction OpenPreferencesAction IWorkbenchWindow WorkbenchMessages getString OpenPreferences IllegalArgumentException workbenchWindow setActionDefinitionId setToolTipText WorkbenchMessages getString OpenPreferences toolTip WorkbenchHelp setHelp IHelpContextIds OPEN_PREFERENCES_ACTION
public void run if workbench Window null action has been dispose return Preference Manager pm Workbench Plugin get Default get Preference Manager if pm null Preference Dialog d new Workbench Preference Dialog workbench Window get Shell pm d create Workbench Help set Help d get Shell I Help Context Ids PREFERENCE DIALOG d open  workbenchWindow PreferenceManager WorkbenchPlugin getDefault getPreferenceManager PreferenceDialog WorkbenchPreferenceDialog workbenchWindow getShell WorkbenchHelp setHelp getShell IHelpContextIds PREFERENCE_DIALOG
Method declared on Action Factory I Workbench Action public void dispose workbench Window null  ActionFactory IWorkbenchAction workbenchWindow

param base the main image param overlay the additional image a pin for example param size the size of the Overlay Icon public Overlay Icon Image Descriptor base Image Descriptor overlay Point size f Base base f Overlay overlay f Size size  OverlayIcon OverlayIcon ImageDescriptor ImageDescriptor fBase fOverlay fSize
protected void draw Composite Image int width int height Image Data bg if f Base null bg f Base get Image Data null bg DEFAULT IMAGE DATA draw Image bg 0 0 if f Overlay null draw Top Right f Overlay  drawCompositeImage ImageData fBase fBase getImageData DEFAULT_IMAGE_DATA drawImage fOverlay drawTopRight fOverlay
param overlay the additional image a pin for example to be drawn on top of the main image protected void draw Top Right Image Descriptor overlay if overlay null return int x get Size x Image Data id overlay get Image Data x id width draw Image id x 0  drawTopRight ImageDescriptor getSize ImageData getImageData drawImage
see org eclipse jface resource Composite Image Descriptor get Size protected Point get Size return f Size  CompositeImageDescriptor getSize getSize fSize
see java lang Object hash Code public int hash Code return Util hash Code f Base 17 Util hash Code f Overlay  hashCode hashCode hashCode fBase hashCode fOverlay
public boolean equals Object obj if obj instanceof Overlay Icon return false Overlay Icon overlay Icon Overlay Icon obj return Util equals this f Base overlay Icon f Base Util equals this f Overlay overlay Icon f Overlay Util equals this f Size overlay Icon f Size  OverlayIcon OverlayIcon overlayIcon OverlayIcon fBase overlayIcon fBase fOverlay overlayIcon fOverlay fSize overlayIcon fSize

Creates a new action with the given text Register this action with the workbench window for page lifecycle events param text the string used as the text for the action or code null code if there is no text param window the workbench window this action is registered with protected Page Event Action String text I Workbench Window window super text if window null throw new Illegal Argument Exception this workbench Window window this active Page window get Active Page this workbench Window add Page Listener this this workbench Window get Part Service add Part Listener this  PageEventAction IWorkbenchWindow IllegalArgumentException workbenchWindow activePage getActivePage workbenchWindow addPageListener workbenchWindow getPartService addPartListener
Returns the currently active page in the workbench window return currently active page in the workbench window or code null code in none public final I Workbench Page get Active Page return active Page  IWorkbenchPage getActivePage activePage
Returns the workbench window this action applies to return the workbench window or code null code if this action has been disposed public final I Workbench Window get Workbench Window return workbench Window  IWorkbenchWindow getWorkbenchWindow workbenchWindow
The code Page Event Action code implementation of this code I Page Listener code method records that the given page is active Subclasses may extend this method if action availability has to be recalculated public void page Activated I Workbench Page page this active Page page  PageEventAction IPageListener pageActivated IWorkbenchPage activePage
The code Page Event Action code implementation of this code I Page Listener code method clears the active page if it just closed Subclasses may extend this method if action availability has to be recalculated public void page Closed I Workbench Page page if page active Page active Page null  PageEventAction IPageListener pageClosed IWorkbenchPage activePage activePage
The code Page Event Action code implementation of this code I Page Listener code method does nothing Subclasses should extend this method if action availability has to be recalculated public void page Opened I Workbench Page page do nothing  PageEventAction IPageListener pageOpened IWorkbenchPage
The code Page Event Action code implementation of this code Action Factory I Workbench Action code method deregisters the part and page listener adding by the constructor Subclasses should extend this method to do additional cleanup since 3 0 public void dispose if workbench Window null action has already been disposed return workbench Window remove Page Listener this workbench Window get Part Service remove Part Listener this workbench Window null  PageEventAction ActionFactory IWorkbenchAction workbenchWindow workbenchWindow removePageListener workbenchWindow getPartService removePartListener workbenchWindow

Constructs a new Page Layout for other purposes public Page Layout no op  PageLayout PageLayout
Constructs a new Page Layout for the normal case of creating a new perspective public Page Layout View Sash Container container View Factory view Factory Layout Part editor Folder I Perspective Descriptor descriptor super this view Factory view Factory this root Layout Container container this editor Folder editor Folder this descriptor descriptor prefill  PageLayout PageLayout ViewSashContainer ViewFactory viewFactory LayoutPart editorFolder IPerspectiveDescriptor viewFactory viewFactory rootLayoutContainer editorFolder editorFolder
Adds the editor to a layout private void add Editor Area try Create the part Layout Part new Part create View ID EDITOR AREA if new Part null this should never happen as long as newID is the editor ID return set Ref Part ID EDITOR AREA new Part Add it to the layout root Layout Container add new Part catch Part Init Exception e Workbench Plugin log e get Message  addEditorArea LayoutPart newPart createView ID_EDITOR_AREA newPart setRefPart ID_EDITOR_AREA newPart rootLayoutContainer newPart PartInitException WorkbenchPlugin getMessage
Adds an action set to the page param action SetID Identifies the action set extension to use It must exist within the workbench registry public void add Action Set String action SetID if action Sets contains action SetID action Sets add action SetID  actionSetID addActionSet actionSetID actionSets actionSetID actionSets actionSetID
see org eclipse ui I Page Layout add Fast View java lang String public void add Fast View String id add Fast View id INVALID RATIO  IPageLayout addFastView addFastView addFastView INVALID_RATIO
public void add Fast View String id float ratio if check Part In Layout id return if id null try I View Reference ref view Factory create View id fast Views add ref force creation of the view layout rec View Layout Rec rec get View Layout Rec id true remember the ratio if valid if ratio I Page Layout RATIO MIN ratio I Page Layout RATIO MAX rec fast View Width Ratio ratio catch Part Init Exception e Workbench Plugin log e get Message  addFastView checkPartInLayout IViewReference viewFactory createView fastViews ViewLayoutRec getViewLayoutRec IPageLayout RATIO_MIN IPageLayout RATIO_MAX fastViewWidthRatio PartInitException WorkbenchPlugin getMessage
Check to see if the part Id represents a fast view s id param part Id The part s id return true if the part Id is a fast view id private boolean is Fast View Id String part Id for int i 0 i fast Views size i if I View Reference fast Views get i get Id equals part Id return true return false  partId partId partId isFastViewId partId fastViews IViewReference fastViews getId partId
Returns the view layout record for the given view id or null if not found If create is true the record is created if it doesn t already exist since 3 0 View Layout Rec get View Layout Rec String id boolean create Assert is True get Ref Part id null is Fast View Id id View Layout Rec rec View Layout Rec mapI Dto View Layout Rec get id if rec null create rec new View Layout Rec set up the view layout appropriately if the page layout is fixed if is Fixed rec is Closeable false rec is Moveable false mapI Dto View Layout Rec put id rec return rec  ViewLayoutRec getViewLayoutRec isTrue getRefPart isFastViewId ViewLayoutRec ViewLayoutRec mapIDtoViewLayoutRec ViewLayoutRec isFixed isCloseable isMoveable mapIDtoViewLayoutRec
Adds a creation wizard to the File New menu The id must name a new wizard extension contributed to the workbench s extension point named code org eclipse ui new Wizards code param id the wizard id public void add New Wizard Shortcut String id if new Wizard Action Ids contains id new Wizard Action Ids add id  newWizards addNewWizardShortcut newWizardActionIds newWizardActionIds
Add the layout part to the page s layout private void add Part Layout Part new Part String part Id int relationship float ratio String ref Id set Ref Part part Id new Part If the referenced part is inside a folder then use the folder as the reference part Layout Part ref Part get Folder Part ref Id if ref Part null ref Part get Ref Part ref Id Add it to the layout if ref Part null ratio normalize Ratio ratio root Layout Container add new Part get Part Sash Const relationship ratio ref Part else Workbench Plugin log Workbench Messages format Page Layout missing Ref Part new Object ref Id NON NLS 1 root Layout Container add new Part  addPart LayoutPart newPart partId refId setRefPart partId newPart LayoutPart refPart getFolderPart refId refPart refPart getRefPart refId refPart normalizeRatio rootLayoutContainer newPart getPartSashConst refPart WorkbenchPlugin WorkbenchMessages PageLayout missingRefPart refId rootLayoutContainer newPart
Adds a perspective shortcut to the Perspective menu The id must name a perspective extension contributed to the workbench s extension point named code org eclipse ui perspectives code param id the perspective id public void add Perspective Shortcut String id if perspective Action Ids contains id perspective Action Ids add id  addPerspectiveShortcut perspectiveActionIds perspectiveActionIds
public void add Placeholder String view Id int relationship float ratio String ref Id if check Part In Layout view Id return Create the placeholder Part Placeholder new Part new Part Placeholder view Id add Part new Part view Id relationship ratio ref Id force creation of the view layout rec get View Layout Rec view Id true  addPlaceholder viewId refId checkPartInLayout viewId PartPlaceholder newPart PartPlaceholder viewId addPart newPart viewId refId getViewLayoutRec viewId
public void add Show In Part String id if show In Part Ids contains id show In Part Ids add id  addShowInPart showInPartIds showInPartIds
Adds a view to the Show View menu The id must name a view extension contributed to the workbench s extension point named code org eclipse ui views code param id the view id public void add Show View Shortcut String id if show View Action Ids contains id show View Action Ids add id  addShowViewShortcut showViewActionIds showViewActionIds
public void add View String view Id int relationship float ratio String ref Id add View view Id relationship ratio ref Id false true  addView viewId refId addView viewId refId
private void add View String view Id int relationship float ratio String ref Id boolean standalone boolean show Title if check Part In Layout view Id return try Create the part Layout Part new Part create View view Id if new Part null add Placeholder view Id relationship ratio ref Id Layout Helper add View Activator this view Id else int appearance Presentation Factory Util ROLE VIEW if standalone if show Title appearance Presentation Factory Util ROLE STANDALONE else appearance Presentation Factory Util ROLE STANDALONE NOTITLE View Stack new Folder new View Stack root Layout Container page true appearance new Folder add new Part set Folder Part view Id new Folder add Part new Folder view Id relationship ratio ref Id force creation of the view layout rec get View Layout Rec view Id true catch Part Init Exception e Workbench Plugin log e get Message  addView viewId refId showTitle checkPartInLayout viewId LayoutPart newPart createView viewId newPart addPlaceholder viewId refId LayoutHelper addViewActivator viewId PresentationFactoryUtil ROLE_VIEW showTitle PresentationFactoryUtil ROLE_STANDALONE PresentationFactoryUtil ROLE_STANDALONE_NOTITLE ViewStack newFolder ViewStack rootLayoutContainer newFolder newPart setFolderPart viewId newFolder addPart newFolder viewId refId getViewLayoutRec viewId PartInitException WorkbenchPlugin getMessage
Verify that the part is already present in the layout and cannot be added again Log a warning message package boolean check Part In Layout String part Id if get Ref Part part Id null Workbench Plugin log Workbench Messages format Page Layout duplicate Ref Part new Object part Id NON NLS 1 return true if is Fast View Id part Id return true return false  checkPartInLayout partId getRefPart partId WorkbenchPlugin WorkbenchMessages PageLayout duplicateRefPart partId isFastViewId partId
public I Folder Layout create Folder String folder Id int relationship float ratio String ref Id if check Part In Layout folder Id return new Folder Layout this View Stack get Ref Part folder Id view Factory Create the folder View Stack folder new View Stack root Layout Container page folder setID folder Id add Part folder folder Id relationship ratio ref Id Create a wrapper return new Folder Layout this folder view Factory  IFolderLayout createFolder folderId refId checkPartInLayout folderId FolderLayout ViewStack getRefPart folderId viewFactory ViewStack ViewStack rootLayoutContainer folderId addPart folderId refId FolderLayout viewFactory
public I Placeholder Folder Layout create Placeholder Folder String folder Id int relationship float ratio String ref Id if check Part In Layout folder Id return new Placeholder Folder Layout this Container Placeholder get Ref Part folder Id Create the folder Container Placeholder folder new Container Placeholder null folder set Container root Layout Container folder set Real Container new View Stack root Layout Container page folder setID folder Id add Part folder folder Id relationship ratio ref Id Create a wrapper return new Placeholder Folder Layout this folder  IPlaceholderFolderLayout createPlaceholderFolder folderId refId checkPartInLayout folderId PlaceholderFolderLayout ContainerPlaceholder getRefPart folderId ContainerPlaceholder ContainerPlaceholder setContainer rootLayoutContainer setRealContainer ViewStack rootLayoutContainer folderId addPart folderId refId PlaceholderFolderLayout
Create a new code Layout Part code param partID the id of the part to create return the code Layout Part code or code null code if it should not be created because of activity filtering throws Part Init Exception thrown if there is a problem creating the part private Layout Part create View String partID throws Part Init Exception if partID equals ID EDITOR AREA return editor Folder else I View Descriptor view Descriptor view Factory get View Registry find partID if Workbench Activity Helper filter Item view Descriptor return null return Layout Helper create View get View Factory partID  LayoutPart LayoutPart PartInitException LayoutPart createView PartInitException ID_EDITOR_AREA editorFolder IViewDescriptor viewDescriptor viewFactory getViewRegistry WorkbenchActivityHelper filterItem viewDescriptor LayoutHelper createView getViewFactory
return the action set list for the page This is code List code of code String code s public Array List get Action Sets return action Sets  ArrayList getActionSets actionSets
return Returns the code I Perspective Descriptor code that is driving the creation of this code Page Layout code public I Perspective Descriptor get Descriptor return descriptor  IPerspectiveDescriptor PageLayout IPerspectiveDescriptor getDescriptor
return an identifier for the editor area The editor area is automatically added to each layout before any other part It should be used as a reference part for other views public String get Editor Area return ID EDITOR AREA  getEditorArea ID_EDITOR_AREA
see org eclipse ui I Page Layout get Editor Reuse Threshold public int get Editor Reuse Threshold return 1  IPageLayout getEditorReuseThreshold getEditorReuseThreshold
return code Array List code public Array List get Fast Views return fast Views  ArrayList ArrayList getFastViews fastViews
return the folder part containing the given view ID or code null code if none i e part of the page layout instead of a folder layout private View Stack get Folder Part String view Id return View Stack mapI Dto Folder get view Id  ViewStack getFolderPart viewId ViewStack mapIDtoFolder viewId
return the new wizard actions the page This is code List code of code String code s public Array List get New Wizard Action Ids return new Wizard Action Ids  ArrayList getNewWizardActionIds newWizardActionIds
return the part sash container const for a layout value private int get Part Sash Const int n Relationship return n Relationship  getPartSashConst nRelationship nRelationship
return the perspective actions This is code List code of code String code s public Array List get Perspective Action Ids return perspective Action Ids  ArrayList getPerspectiveActionIds perspectiveActionIds
return the part for a given ID package Layout Part get Ref Part String partID return Layout Part mapI Dto Part get partID  LayoutPart getRefPart LayoutPart mapIDtoPart
return the top level layout container public View Sash Container get Root Layout Container return root Layout Container  ViewSashContainer getRootLayoutContainer rootLayoutContainer
return the ids of the parts to list in the Show In prompter This is a code List code of code String code s public Array List get Show In Part Ids return show In Part Ids  ArrayList getShowInPartIds showInPartIds
return the ids of the views to list in the Show View shortcuts This is a code List code of code String code s public Array List get Show View Action Ids return show View Action Ids  ArrayList getShowViewActionIds showViewActionIds
return the code View Factory code for this code Page Layout code since 3 0 package View Factory get View Factory return view Factory  ViewFactory PageLayout ViewFactory getViewFactory viewFactory
see org eclipse ui I Page Layout is Editor Area Visible public boolean is Editor Area Visible return editor Visible  IPageLayout isEditorAreaVisible isEditorAreaVisible editorVisible
Trim the ratio so that direct manipulation of parts is easy param in the initial ratio return the normalized ratio private float normalize Ratio float in if in RATIO MIN in RATIO MIN if in RATIO MAX in RATIO MAX return in  normalizeRatio RATIO_MIN RATIO_MIN RATIO_MAX RATIO_MAX
Prefill the layout with required parts private void prefill add Editor Area Add default action sets Action Set Registry reg Workbench Plugin get Default get Action Set Registry I Action Set Descriptor array reg get Action Sets int count array length for int nX 0 nX count nX I Action Set Descriptor desc array nX if desc is Initially Visible add Action Set desc get Id  addEditorArea ActionSetRegistry WorkbenchPlugin getDefault getActionSetRegistry IActionSetDescriptor getActionSets IActionSetDescriptor isInitiallyVisible addActionSet getId
see org eclipse ui I Page Layout set Editor Area Visible boolean public void set Editor Area Visible boolean show Editor Area editor Visible show Editor Area  IPageLayout setEditorAreaVisible setEditorAreaVisible showEditorArea editorVisible showEditorArea
see org eclipse ui I Page Layout set Editor Reuse Threshold int public void set Editor Reuse Threshold int open Editors no op  IPageLayout setEditorReuseThreshold setEditorReuseThreshold openEditors
see org eclipse ui I Page Layout set Fixed boolean public void set Fixed boolean fixed this fixed fixed  IPageLayout setFixed setFixed
see org eclipse ui I Page Layout get Fixed public boolean is Fixed return fixed  IPageLayout getFixed isFixed
Map the folder part containing the given view ID param view Id the part ID param container the code Container Placeholder code package void set Folder Part String view Id Container Placeholder container Layout Part tab Folder container get Real Container mapI Dto Folder put view Id tab Folder  viewId ContainerPlaceholder setFolderPart viewId ContainerPlaceholder LayoutPart tabFolder getRealContainer mapIDtoFolder viewId tabFolder
Map the folder part containing the given view ID param view Id the part ID param folder the code View Stack code package void set Folder Part String view Id View Stack folder mapI Dto Folder put view Id folder  viewId ViewStack setFolderPart viewId ViewStack mapIDtoFolder viewId
Map an ID to a part param part Id the part ID param part the code Layout Part code package void set Ref Part String partID Layout Part part mapI Dto Part put partID part  partId LayoutPart setRefPart LayoutPart mapIDtoPart
stack Part Layoutpart String String added by dan rubel instantiations com Stack a part on top of another param new Part the new part param view Id the view ID param ref Id the reference ID private void stack Part Layout Part new Part String view Id String ref Id set Ref Part view Id new Part force creation of the view layout rec get View Layout Rec view Id true If ref part is in a folder than just add the new view to that folder View Stack folder get Folder Part ref Id if folder null folder add new Part set Folder Part view Id folder return If the ref part is in the page layout then create a new folder and add the new view Layout Part ref Part get Ref Part ref Id if ref Part null View Stack new Folder new View Stack root Layout Container page root Layout Container replace ref Part new Folder new Folder add ref Part new Folder add new Part set Folder Part ref Id new Folder set Folder Part view Id new Folder return If ref part is not found then just do add Workbench Plugin log Workbench Messages format Page Layout missing Ref Part new Object ref Id NON NLS 1 root Layout Container add new Part  stackPart dan_rubel newPart viewId refId stackPart LayoutPart newPart viewId refId setRefPart viewId newPart getViewLayoutRec viewId ViewStack getFolderPart refId newPart setFolderPart viewId LayoutPart refPart getRefPart refId refPart ViewStack newFolder ViewStack rootLayoutContainer rootLayoutContainer refPart newFolder newFolder refPart newFolder newPart setFolderPart refId newFolder setFolderPart viewId newFolder WorkbenchPlugin WorkbenchMessages PageLayout missingRefPart refId rootLayoutContainer newPart
stack Placeholder String String added by dan rubel instantiations com Stack a placeholder on top of another param view Id the view ID param ref Id the reference ID public void stack Placeholder String view Id String ref Id if check Part In Layout view Id return Create the placeholder Part Placeholder new Part new Part Placeholder view Id Layout Part ref Part get Ref Part ref Id if ref Part null new Part set Container ref Part get Container stack Part new Part view Id ref Id  stackPlaceholder dan_rubel viewId refId stackPlaceholder viewId refId checkPartInLayout viewId PartPlaceholder newPart PartPlaceholder viewId LayoutPart refPart getRefPart refId refPart newPart setContainer refPart getContainer stackPart newPart viewId refId
stack View String String modified by dan rubel instantiations com Stack one view on top of another param view Id the view ID param ref Id the reference ID public void stack View String view Id String ref Id if check Part In Layout view Id return Create the new part try Layout Part new Part create View view Id if new Part null stack Placeholder view Id ref Id Layout Helper add View Activator this view Id else stack Part new Part view Id ref Id catch Part Init Exception e Workbench Plugin log e get Message  stackView dan_rubel viewId refId stackView viewId refId checkPartInLayout viewId LayoutPart newPart createView viewId newPart stackPlaceholder viewId refId LayoutHelper addViewActivator viewId stackPart newPart viewId refId PartInitException WorkbenchPlugin getMessage
Converts SWT position constants into layout position constants param swt Constant one of SWT TOP SWT BOTTOM SWT LEFT or SWT RIGHT return one of I Page Layout TOP I Page Layout BOTTOM I Page Layout LEFT I Page Layout RIGHT or 1 indicating an invalid input since 3 0 public static int swt Constant To Layout Position int swt Constant switch swt Constant case SWT TOP return I Page Layout TOP case SWT BOTTOM return I Page Layout BOTTOM case SWT RIGHT return I Page Layout RIGHT case SWT LEFT return I Page Layout LEFT return 1  swtConstant IPageLayout IPageLayout IPageLayout IPageLayout swtConstantToLayoutPosition swtConstant swtConstant IPageLayout IPageLayout IPageLayout IPageLayout
public void add Standalone View String view Id boolean show Title int relationship float ratio String ref Id add View view Id relationship ratio ref Id true show Title View Layout Rec rec get View Layout Rec view Id true rec is Standalone true rec show Title show Title  addStandaloneView viewId showTitle refId addView viewId refId showTitle ViewLayoutRec getViewLayoutRec viewId isStandalone showTitle showTitle
public I View Layout get View Layout String view Id View Layout Rec rec get View Layout Rec view Id true if rec null return null return new View Layout this rec  IViewLayout getViewLayout viewId ViewLayoutRec getViewLayoutRec viewId ViewLayout
since 3 0 public Map getI Dto View Layout Rec Map return mapI Dto View Layout Rec  getIDtoViewLayoutRecMap mapIDtoViewLayoutRec

private Listener List listeners new Listener List Part Notifier constructor comment public Page Listener List super  ListenerList ListenerList PartNotifier PageListenerList
Adds an I Part Listener to the part service public void add Page Listener I Page Listener l listeners add l  IPartListener addPageListener IPageListener
final I Page Listener l I Page Listener array i Platform run new Safe Runnable public void run l page Activated page  IPageListener IPageListener SafeRunnable pageActivated
Notifies the listener that a part has been activated public void fire Page Activated final I Workbench Page page Object array listeners get Listeners for int i 0 i array length i final I Page Listener l I Page Listener array i Platform run new Safe Runnable public void run l page Activated page  firePageActivated IWorkbenchPage getListeners IPageListener IPageListener SafeRunnable pageActivated
final I Page Listener l I Page Listener array i Platform run new Safe Runnable public void run l page Closed page  IPageListener IPageListener SafeRunnable pageClosed
Notifies the listener that a part has been closed public void fire Page Closed final I Workbench Page page Object array listeners get Listeners for int i 0 i array length i final I Page Listener l I Page Listener array i Platform run new Safe Runnable public void run l page Closed page  firePageClosed IWorkbenchPage getListeners IPageListener IPageListener SafeRunnable pageClosed
final I Page Listener l I Page Listener listeners i Platform run new Safe Runnable public void run l page Opened page  IPageListener IPageListener SafeRunnable pageOpened
Notifies the listener that a part has been opened public void fire Page Opened final I Workbench Page page Object listeners this listeners get Listeners for int i 0 i listeners length i final I Page Listener l I Page Listener listeners i Platform run new Safe Runnable public void run l page Opened page  firePageOpened IWorkbenchPage getListeners IPageListener IPageListener SafeRunnable pageOpened
Removes an I Part Listener from the part service public void remove Page Listener I Page Listener l listeners remove l  IPartListener removePageListener IPageListener

private I Selection Changed Listener selection Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event fire Selection get Part event get Selection  ISelectionChangedListener selectionListener ISelectionChangedListener selectionChanged SelectionChangedEvent fireSelection getPart getSelection
private I Selection Changed Listener post Selection Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event fire Post Selection get Part event get Selection  ISelectionChangedListener postSelectionListener ISelectionChangedListener selectionChanged SelectionChangedEvent firePostSelection getPart getSelection
public Page Part Selection Tracker I Workbench Page page String part Id super part Id set Page page page add Part Listener this I View Part part page find View part Id if part null set Part part false  PagePartSelectionTracker IWorkbenchPage partId partId setPage addPartListener IViewPart findView partId setPart
Disposes this selection provider removes all listeners currently registered public void dispose set Part null false set Page null super dispose  setPart setPage
see I Part Listener part Activated I Workbench Part public void part Activated I Workbench Part part  IPartListener partActivated IWorkbenchPart partActivated IWorkbenchPart
see I Part Listener part Brought To Top I Workbench Part public void part Brought To Top I Workbench Part part  IPartListener partBroughtToTop IWorkbenchPart partBroughtToTop IWorkbenchPart
see I Part Listener part Closed I Workbench Part public void part Closed I Workbench Part part if get Part Id part equals get Part Id set Part null true  IPartListener partClosed IWorkbenchPart partClosed IWorkbenchPart getPartId getPartId setPart
see I Part Listener part Deactivated I Workbench Part public void part Deactivated I Workbench Part part  IPartListener partDeactivated IWorkbenchPart partDeactivated IWorkbenchPart
see I Part Listener part Opened I Workbench Part public void part Opened I Workbench Part part if get Part Id part equals get Part Id set Part part true  IPartListener partOpened IWorkbenchPart partOpened IWorkbenchPart getPartId getPartId setPart
Returns the id for the given part taking into account multi view instances which may have a secondary id since 3 0 private Object get Part Id I Workbench Part part String id part get Site get Id if part instanceof I View Part String secondary Id I View Part part get View Site get Secondary Id if secondary Id null id id secondary Id return id  getPartId IWorkbenchPart getSite getId IViewPart secondaryId IViewPart getViewSite getSecondaryId secondaryId secondaryId
The selection has changed in the part being tracked Forward it to the listeners see I Selection Changed Listener selection Changed public void selection Changed Selection Changed Event event fire Selection get Part event get Selection  ISelectionChangedListener selectionChanged selectionChanged SelectionChangedEvent fireSelection getPart getSelection
Sets the page this selection provider works for param page workbench page private void set Page I Workbench Page page f Page page  setPage IWorkbenchPage fPage
Returns the page this selection provider works for return workbench page protected I Workbench Page get Page return f Page  IWorkbenchPage getPage fPage
Returns the part this is tracking or code null code if it is not open return part or code null code protected I Workbench Part get Part return f Part  IWorkbenchPart getPart fPart
public I Selection get Selection I Workbench Part part get Part if part null I Selection Provider sp part get Site get Selection Provider if sp null return sp get Selection return null  ISelection getSelection IWorkbenchPart getPart ISelectionProvider getSite getSelectionProvider getSelection
see Abstract Debug Selection Provider get Selection Provider protected I Selection Provider get Selection Provider I Workbench Part part get Part if part null return part get Site get Selection Provider return null  AbstractDebugSelectionProvider getSelectionProvider ISelectionProvider getSelectionProvider IWorkbenchPart getPart getSite getSelectionProvider
Sets the part for this selection tracker param part the part param notify whether to send notification that the selection has changed private void set Part I Workbench Part part boolean notify if f Part null remove myself as a listener from the existing part I Selection Provider sp f Part get Site get Selection Provider if sp null sp remove Selection Changed Listener selection Listener if sp instanceof I Post Selection Provider I Post Selection Provider sp remove Post Selection Changed Listener post Selection Listener else sp remove Selection Changed Listener post Selection Listener f Part part I Selection sel null if part null I Selection Provider sp part get Site get Selection Provider if sp null sp add Selection Changed Listener selection Listener if sp instanceof I Post Selection Provider I Post Selection Provider sp add Post Selection Changed Listener post Selection Listener else sp add Selection Changed Listener post Selection Listener if notify get the selection to send below sel sp get Selection if notify fire Selection part sel fire Post Selection part sel  setPart IWorkbenchPart fPart ISelectionProvider fPart getSite getSelectionProvider removeSelectionChangedListener selectionListener IPostSelectionProvider IPostSelectionProvider removePostSelectionChangedListener postSelectionListener removeSelectionChangedListener postSelectionListener fPart ISelection ISelectionProvider getSite getSelectionProvider addSelectionChangedListener selectionListener IPostSelectionProvider IPostSelectionProvider addPostSelectionChangedListener postSelectionListener addSelectionChangedListener postSelectionListener getSelection fireSelection firePostSelection

Creates a new selection service for a specific workbench page public Page Selection Service I Workbench Page page set Page page  PageSelectionService IWorkbenchPage setPage
Sets the page private void set Page I Workbench Page page this page page  setPage IWorkbenchPage
Returns the page protected I Workbench Page get Page return page  IWorkbenchPage getPage
see Abstract Selection Service create Part Tracker String protected Abstract Part Selection Tracker create Part Tracker String part Id return new Page Part Selection Tracker get Page part Id  AbstractSelectionService createPartTracker AbstractPartSelectionTracker createPartTracker partId PagePartSelectionTracker getPage partId

class Part Drop Target Layout Part part Part Drop Target Layout Part part this part part  PartDropTarget LayoutPart PartDropTarget LayoutPart

private Listener List listeners new Listener List Part Notifier constructor comment public Part Listener List super  ListenerList ListenerList PartNotifier PartListenerList
Adds an I Part Listener to the part service public void add Part Listener I Part Listener l listeners add l  IPartListener addPartListener IPartListener
final I Part Listener l I Part Listener array i Platform run new Safe Runnable public void run l part Activated part  IPartListener IPartListener SafeRunnable partActivated
Notifies the listener that a part has been activated public void fire Part Activated final I Workbench Part part Object array listeners get Listeners for int i 0 i array length i final I Part Listener l I Part Listener array i Platform run new Safe Runnable public void run l part Activated part  firePartActivated IWorkbenchPart getListeners IPartListener IPartListener SafeRunnable partActivated
final I Part Listener l I Part Listener array i Platform run new Safe Runnable public void run l part Brought To Top part  IPartListener IPartListener SafeRunnable partBroughtToTop
Notifies the listener that a part has been brought to top public void fire Part Brought To Top final I Workbench Part part Object array listeners get Listeners for int i 0 i array length i final I Part Listener l I Part Listener array i Platform run new Safe Runnable public void run l part Brought To Top part  firePartBroughtToTop IWorkbenchPart getListeners IPartListener IPartListener SafeRunnable partBroughtToTop
final I Part Listener l I Part Listener array i Platform run new Safe Runnable public void run l part Closed part  IPartListener IPartListener SafeRunnable partClosed
Notifies the listener that a part has been closed public void fire Part Closed final I Workbench Part part Object array listeners get Listeners for int i 0 i array length i final I Part Listener l I Part Listener array i Platform run new Safe Runnable public void run l part Closed part  firePartClosed IWorkbenchPart getListeners IPartListener IPartListener SafeRunnable partClosed
final I Part Listener l I Part Listener array i Platform run new Safe Runnable public void run l part Deactivated part  IPartListener IPartListener SafeRunnable partDeactivated
Notifies the listener that a part has been deactivated public void fire Part Deactivated final I Workbench Part part Object array listeners get Listeners for int i 0 i array length i final I Part Listener l I Part Listener array i Platform run new Safe Runnable public void run l part Deactivated part  firePartDeactivated IWorkbenchPart getListeners IPartListener IPartListener SafeRunnable partDeactivated
final I Part Listener l I Part Listener array i Platform run new Safe Runnable public void run l part Opened part  IPartListener IPartListener SafeRunnable partOpened
Notifies the listener that a part has been opened public void fire Part Opened final I Workbench Part part Object array listeners get Listeners for int i 0 i array length i final I Part Listener l I Part Listener array i Platform run new Safe Runnable public void run l part Opened part  firePartOpened IWorkbenchPart getListeners IPartListener IPartListener SafeRunnable partOpened
Removes an I Part Listener from the part service public void remove Part Listener I Part Listener l listeners remove l  IPartListener removePartListener IPartListener

private Listener List listeners new Listener List Part Notifier constructor comment public Part Listener List2 super  ListenerList ListenerList PartNotifier PartListenerList2
Adds an Part Listener to the part service public void add Part Listener I Part Listener2 l listeners add l  PartListener addPartListener IPartListener2
final I Part Listener2 l I Part Listener2 array i Platform run new Safe Runnable public void run l part Activated ref  IPartListener2 IPartListener2 SafeRunnable partActivated
Notifies the listener that a part has been activated public void fire Part Activated final I Workbench Part Reference ref Object array listeners get Listeners for int i 0 i array length i final I Part Listener2 l I Part Listener2 array i Platform run new Safe Runnable public void run l part Activated ref  firePartActivated IWorkbenchPartReference getListeners IPartListener2 IPartListener2 SafeRunnable partActivated
final I Part Listener2 l I Part Listener2 array i Platform run new Safe Runnable public void run l part Brought To Top ref  IPartListener2 IPartListener2 SafeRunnable partBroughtToTop
Notifies the listener that a part has been brought to top public void fire Part Brought To Top final I Workbench Part Reference ref Object array listeners get Listeners for int i 0 i array length i final I Part Listener2 l I Part Listener2 array i Platform run new Safe Runnable public void run l part Brought To Top ref  firePartBroughtToTop IWorkbenchPartReference getListeners IPartListener2 IPartListener2 SafeRunnable partBroughtToTop
final I Part Listener2 l I Part Listener2 array i Platform run new Safe Runnable public void run l part Closed ref  IPartListener2 IPartListener2 SafeRunnable partClosed
Notifies the listener that a part has been closed public void fire Part Closed final I Workbench Part Reference ref Object array listeners get Listeners for int i 0 i array length i final I Part Listener2 l I Part Listener2 array i Platform run new Safe Runnable public void run l part Closed ref  firePartClosed IWorkbenchPartReference getListeners IPartListener2 IPartListener2 SafeRunnable partClosed
final I Part Listener2 l I Part Listener2 array i Platform run new Safe Runnable public void run l part Deactivated ref  IPartListener2 IPartListener2 SafeRunnable partDeactivated
Notifies the listener that a part has been deactivated public void fire Part Deactivated final I Workbench Part Reference ref Object array listeners get Listeners for int i 0 i array length i final I Part Listener2 l I Part Listener2 array i Platform run new Safe Runnable public void run l part Deactivated ref  firePartDeactivated IWorkbenchPartReference getListeners IPartListener2 IPartListener2 SafeRunnable partDeactivated
final I Part Listener2 l I Part Listener2 array i Platform run new Safe Runnable public void run l part Opened ref  IPartListener2 IPartListener2 SafeRunnable partOpened
Notifies the listener that a part has been opened public void fire Part Opened final I Workbench Part Reference ref Object array listeners get Listeners for int i 0 i array length i final I Part Listener2 l I Part Listener2 array i Platform run new Safe Runnable public void run l part Opened ref  firePartOpened IWorkbenchPartReference getListeners IPartListener2 IPartListener2 SafeRunnable partOpened
Platform run new Safe Runnable public void run l part Hidden ref  SafeRunnable partHidden
Notifies the listener that a part has been opened public void fire Part Hidden final I Workbench Part Reference ref Object array listeners get Listeners for int i 0 i array length i final I Part Listener2 l if array i instanceof I Part Listener2 l I Part Listener2 array i else continue Platform run new Safe Runnable public void run l part Hidden ref  firePartHidden IWorkbenchPartReference getListeners IPartListener2 IPartListener2 IPartListener2 SafeRunnable partHidden
Platform run new Safe Runnable public void run l part Visible ref  SafeRunnable partVisible
Notifies the listener that a part has been opened public void fire Part Visible final I Workbench Part Reference ref Object array listeners get Listeners for int i 0 i array length i final I Part Listener2 l if array i instanceof I Part Listener2 l I Part Listener2 array i else continue Platform run new Safe Runnable public void run l part Visible ref  firePartVisible IWorkbenchPartReference getListeners IPartListener2 IPartListener2 IPartListener2 SafeRunnable partVisible
Platform run new Safe Runnable public void run l part Input Changed ref  SafeRunnable partInputChanged
Notifies the listener that a part has been opened public void fire Part Input Changed final I Workbench Part Reference ref Object array listeners get Listeners for int i 0 i array length i final I Part Listener2 l if array i instanceof I Part Listener2 l I Part Listener2 array i else continue Platform run new Safe Runnable public void run l part Input Changed ref  firePartInputChanged IWorkbenchPartReference getListeners IPartListener2 IPartListener2 IPartListener2 SafeRunnable partInputChanged
Removes an I Part Listener from the part service public void remove Part Listener I Part Listener2 l listeners remove l  IPartListener removePartListener IPartListener2

public void key Traversed Traverse Event e Hack Currently SWT sets focus whenever we call Control traverse This doesn t cause too much of a problem for ctrl pgup and ctrl pgdn but it is seriously unexpected for other traversal events When and if it becomes possible to call traverse without forcing a focus change this if statement should be removed and ALL events should be forwarded to the container if e detail SWT TRAVERSE PAGE NEXT e detail SWT TRAVERSE PAGE PREVIOUS I Layout Container container get Container if container null container instanceof Layout Part Layout Part parent Layout Part container Control parent Control parent get Control if parent Control null parent Control is Disposed parent Control traverse e detail e doit false  keyTraversed TraverseEvent TRAVERSE_PAGE_NEXT TRAVERSE_PAGE_PREVIOUS ILayoutContainer getContainer LayoutPart LayoutPart LayoutPart parentControl getControl parentControl parentControl isDisposed parentControl
Construct a pane for a part public Part Pane I Workbench Part Reference part Reference Workbench Page workbench Page super part Reference get Id this part Reference part Reference this page workbench Page Workbench Part Reference part Reference set Pane this  PartPane IWorkbenchPartReference partReference WorkbenchPage workbenchPage partReference getId partReference partReference workbenchPage WorkbenchPartReference partReference setPane
Platform run new Safe Runnable error public void run try UI Stats start UI Stats CREATE PART CONTROL id part 0 create Part Control content Rectangle old Bounds control get Bounds Workbench Part Reference get Part Reference refresh From Part Unless refreshing the part has somehow triggered a layout we need to force a layout now SWT only triggers a layout if the bounds change so check that case here if old Bounds equals control get Bounds control layout true finally UI Stats end UI Stats CREATE PART CONTROL id  SafeRunnable UIStats UIStats CREATE_PART_CONTROL createPartControl oldBounds getBounds WorkbenchPartReference getPartReference refreshFromPart oldBounds getBounds UIStats UIStats CREATE_PART_CONTROL
public void handle Exception Throwable e Log error Workbench wb Workbench PlatformUI get Workbench if wb is Starting super handle Exception e Dispose old part Control children content get Children for int i 0 i children length i children i dispose Create new part I Workbench Part new Part create Error Part part 0 part 0 get Site set Selection Provider null new Part create Part Control content Workbench Part Reference part Reference set Part new Part part 0 new Part  handleException getWorkbench isStarting handleException getChildren IWorkbenchPart newPart createErrorPart getSite setSelectionProvider newPart createPartControl WorkbenchPartReference partReference setPart newPart newPart
Factory method for creating the SWT Control hierarchy for this Pane s child protected void create Child Control final I Workbench Part part new I Workbench Part part Reference get Part false if part 0 null return must call create Control first TODO should only really call this method from create Control if control null return Make sure the child control has not been created yet if control get Children length 0 return final Composite content new Composite control SWT NONE content set Layout new Fill Layout String error Workbench Messages format Part Pane unable To Create new Object part Reference get Title NON NLS 1 Platform run new Safe Runnable error public void run try UI Stats start UI Stats CREATE PART CONTROL id part 0 create Part Control content Rectangle old Bounds control get Bounds Workbench Part Reference get Part Reference refresh From Part Unless refreshing the part has somehow triggered a layout we need to force a layout now SWT only triggers a layout if the bounds change so check that case here if old Bounds equals control get Bounds control layout true finally UI Stats end UI Stats CREATE PART CONTROL id public void handle Exception Throwable e Log error Workbench wb Workbench PlatformUI get Workbench if wb is Starting super handle Exception e Dispose old part Control children content get Children for int i 0 i children length i children i dispose Create new part I Workbench Part new Part create Error Part part 0 part 0 get Site set Selection Provider null new Part create Part Control content Workbench Part Reference part Reference set Part new Part part 0 new Part page add Part part Reference page fire Part Opened part 0  createChildControl IWorkbenchPart IWorkbenchPart partReference getPart createControl createControl getChildren setLayout FillLayout WorkbenchMessages PartPane unableToCreate partReference getTitle SafeRunnable UIStats UIStats CREATE_PART_CONTROL createPartControl oldBounds getBounds WorkbenchPartReference getPartReference refreshFromPart oldBounds getBounds UIStats UIStats CREATE_PART_CONTROL handleException getWorkbench isStarting handleException getChildren IWorkbenchPart newPart createErrorPart getSite setSelectionProvider newPart createPartControl WorkbenchPartReference partReference setPart newPart newPart addPart partReference firePartOpened
public void add Size Menu Item Menu menu int index Add size menu Menu Item item new Menu Item menu SWT CASCADE index item set Text Workbench Messages get String Part Pane size NON NLS 1 Menu size Menu new Menu menu item set Menu size Menu add Size Items size Menu  addSizeMenuItem MenuItem MenuItem setText WorkbenchMessages getString PartPane sizeMenu setMenu sizeMenu addSizeItems sizeMenu
public void create Control Composite parent if get Control null return Create view form control new Composite parent SWT NONE control set Layout new Fill Layout the part should never be visible by default It will be made visible by activation This allows us to have views appear in tabs without becoming active by default control set Visible false Create a title bar create Title Bar Create content create Child Control When the pane or any child gains focus notify the workbench control add Listener SWT Activate this control add Traverse Listener traverse Listener  createControl getControl setLayout FillLayout setVisible createTitleBar createChildControl addListener addTraverseListener traverseListener
protected abstract I Workbench Part create Error Part I Workbench Part old Part  IWorkbenchPart createErrorPart IWorkbenchPart oldPart
protected abstract I Workbench Part create Error Part I Workbench Part old Part Create a title bar for the pane if required protected abstract void create Title Bar  IWorkbenchPart createErrorPart IWorkbenchPart oldPart createTitleBar
protected abstract void create Title Bar private public void dispose super dispose if control null control is Disposed control remove Listener SWT Activate this control remove Traverse Listener traverse Listener control dispose control null if pane Menu Manager null pane Menu Manager dispose pane Menu Manager null  createTitleBar isDisposed removeListener removeTraverseListener traverseListener paneMenuManager paneMenuManager paneMenuManager
User has requested to close the pane Take appropriate action depending on type 
Zooms in on the part contained in this pane protected void do Zoom if get Window instanceof I Workbench Window page toggle Zoom part Reference  doZoom getWindow IWorkbenchWindow toggleZoom partReference
Gets the presentation bounds public Rectangle get Bounds return get Control get Bounds  getBounds getControl getBounds
Get the control public Control get Control return control  getControl
public int get Minimum Height if control null control is Disposed return super get Minimum Height account for the borders return control compute Trim 0 0 0 0 height  getMinimumHeight isDisposed getMinimumHeight computeTrim
Answer the part child public I Workbench Part Reference get Part Reference return part Reference  IWorkbenchPartReference getPartReference partReference
see Listener public void handle Event Event event if event type SWT Activate request Activation  handleEvent requestActivation
Return whether the pane is zoomed or not public boolean is Zoomed return is Zoomed  isZoomed isZoomed
Move the control over another one public void move Above Control ref Control if get Control null get Control move Above ref Control  moveAbove refControl getControl getControl moveAbove refControl
Notify the workbook page that the part pane has been activated by the user protected void request Activation this page request Activation part Reference get Part true  requestActivation requestActivation partReference getPart
Sets the parent for this part public void set Container I Layout Container container super set Container container  setContainer ILayoutContainer setContainer
Shows the receiver if code visible code is true otherwise hide it public void set Visible boolean make Visible super set Visible make Visible if make Visible Make sure that the part is restored part Reference get Part true  setVisible makeVisible setVisible makeVisible makeVisible partReference getPart
Sets focus to this part public void set Focus request Activation I Workbench Part part part Reference get Part true if part null part set Focus  setFocus requestActivation IWorkbenchPart partReference getPart setFocus
Sets the workbench page of the view public void set Workbench Page Workbench Page workbench Page this page workbench Page  setWorkbenchPage WorkbenchPage workbenchPage workbenchPage
Set whether the pane is zoomed or not public void set Zoomed boolean is Zoomed if this is Zoomed is Zoomed return do nothing if we re already in the right state super set Zoomed is Zoomed this is Zoomed is Zoomed final Object listeners get Property Listeners get Listeners if listeners length 0 Boolean old Value is Zoomed Boolean FALSE Boolean TRUE Boolean zoomed is Zoomed Boolean TRUE Boolean FALSE Property Change Event event new Property Change Event this PROP ZOOMED old Value zoomed for int i 0 i listeners length i I Property Change Listener listeners i property Change event  setZoomed isZoomed isZoomed isZoomed setZoomed isZoomed isZoomed isZoomed getPropertyListeners getListeners oldValue isZoomed isZoomed PropertyChangeEvent PropertyChangeEvent PROP_ZOOMED oldValue IPropertyChangeListener propertyChange
Informs the pane that it s window shell has been activated 
package abstract void shell Activated Informs the pane that it s window shell has been deactivated  shellActivated
package abstract void shell Deactivated Indicate focus in part public abstract void show Focus boolean in Focus  shellDeactivated showFocus inFocus
public abstract void show Focus boolean in Focus see I Part Drop Target target Part For public Layout Part target Part For Layout Part drag Source return this  showFocus inFocus IPartDropTarget targetPartFor LayoutPart targetPartFor LayoutPart dragSource
Returns the Part Stack that contains this Part Pane or null if none return public Part Stack get Stack I Layout Container container get Container if container instanceof Part Stack return Part Stack container return null  PartStack PartPane PartStack getStack ILayoutContainer getContainer PartStack PartStack
Show a title label menu for this pane public void show Pane Menu Part Stack folder get Stack if folder null folder show System Menu  showPaneMenu PartStack getStack showSystemMenu
Show the context menu for this part public void show View Menu Part Stack folder get Stack if folder null folder show Pane Menu  showViewMenu PartStack getStack showPaneMenu
Finds and return the sashes around this part protected Sashes find Sashes Sashes result new Sashes I Layout Container container get Container if container null return result container find Sashes this result return result  findSashes ILayoutContainer getContainer findSashes
Enable the user to resize this part using the keyboard to move the specified sash protected void move Sash final Sash sash move Sash sash this  moveSash moveSash
public static void move Sash final Sash sash final Layout Part to Get Focus When Done final Key Listener listener new Key Adapter public void key Pressed Key Event e if e character SWT ESC e character r if to Get Focus When Done null to Get Focus When Done set Focus sash add Focus Listener new Focus Adapter public void focus Gained Focus Event e sash set Background sash get Display get System Color SWT COLOR LIST SELECTION sash add Key Listener listener public void focus Lost Focus Event e sash set Background null sash remove Key Listener listener sash set Focus  moveSash LayoutPart toGetFocusWhenDone KeyListener KeyAdapter keyPressed KeyEvent toGetFocusWhenDone toGetFocusWhenDone setFocus addFocusListener FocusAdapter focusGained FocusEvent setBackground getDisplay getSystemColor COLOR_LIST_SELECTION addKeyListener focusLost FocusEvent setBackground removeKeyListener setFocus
Add a menu item to the Size Menu protected void add Size Item Menu size Menu String label Message final Sash sash Menu Item item new Menu Item size Menu SWT NONE item set Text label Message NON NLS 1 item add Selection Listener new Selection Adapter public void widget Selected Selection Event e move Sash sash item set Enabled is Zoomed sash null  addSizeItem sizeMenu labelMessage MenuItem MenuItem sizeMenu setText labelMessage addSelectionListener SelectionAdapter widgetSelected SelectionEvent moveSash setEnabled isZoomed
Returns the workbench page of this pane public Workbench Page get Page return page  WorkbenchPage getPage
Add the Left Right Up Botton menu items to the Size menu protected void add Size Items Menu size Menu Sashes sashes find Sashes add Size Item size Menu Workbench Messages get String Part Pane size Left sashes left NON NLS 1 add Size Item size Menu Workbench Messages get String Part Pane size Right sashes right NON NLS 1 add Size Item size Menu Workbench Messages get String Part Pane size Top sashes top NON NLS 1 add Size Item size Menu Workbench Messages get String Part Pane size Bottom sashes bottom NON NLS 1  addSizeItems sizeMenu findSashes addSizeItem sizeMenu WorkbenchMessages getString PartPane sizeLeft addSizeItem sizeMenu WorkbenchMessages getString PartPane sizeRight addSizeItem sizeMenu WorkbenchMessages getString PartPane sizeTop addSizeItem sizeMenu WorkbenchMessages getString PartPane sizeBottom
Pin this part protected void do Dock do nothing  doDock
Set the busy state of the pane public void set Busy boolean is Busy Do nothing by default  setBusy isBusy
Show a highlight for the receiver if it is not currently the part in the front of its presentation public void show Highlight No nothing by default  showHighlight
Ensure that we are not in the zoomed before reparenting TODO I am certain this isn t correct but I ll be damned if I know what is public void reparent Composite new Parent if is Zoomed set Zoomed false super reparent new Parent  newParent isZoomed setZoomed newParent
return public abstract Control get Tool Bar  getToolBar
return public boolean has View Menu return false  hasViewMenu
param location public void show View Menu Point location  showViewMenu
public boolean is Busy return false  isBusy
see org eclipse ui internal Layout Part get Presentable Part public I Presentable Part get Presentable Part return presentable Adapter  LayoutPart getPresentablePart IPresentablePart getPresentablePart presentableAdapter

public static String WILD CARD NON NLS 1 public Part Placeholder String id super id  WILD_CARD PartPlaceholder
Creates the SWT control public void create Control Composite parent do nothing  createControl
Get the part control This method may return null public Control get Control return null  getControl
Returns whether this placeholder has a wildcard since 3 0 public boolean has Wild Card return getID index Of WILD CARD 1  hasWildCard indexOf WILD_CARD

public class Part Plugin Action extends Plugin Action Part Plugin Action constructor public Part Plugin Action I Configuration Element action Element String id int style super action Element id style  PartPluginAction PluginAction PartPluginAction PartPluginAction IConfigurationElement actionElement actionElement
Registers this action as a listener of the workbench part protected void register Selection Listener I Workbench Part a Part I Selection Provider selection Provider a Part get Site get Selection Provider if selection Provider null selection Provider add Selection Changed Listener this selection Changed selection Provider get Selection  registerSelectionListener IWorkbenchPart aPart ISelectionProvider selectionProvider aPart getSite getSelectionProvider selectionProvider selectionProvider addSelectionChangedListener selectionChanged selectionProvider getSelection
Unregisters this action as a listener of the workbench part protected void unregister Selection Listener I Workbench Part a Part I Selection Provider selection Provider a Part get Site get Selection Provider if selection Provider null selection Provider remove Selection Changed Listener this  unregisterSelectionListener IWorkbenchPart aPart ISelectionProvider selectionProvider aPart getSite getSelectionProvider selectionProvider selectionProvider removeSelectionChangedListener

Computes the ratio for this container That is the ratio of the left side over the sum of left right This is only used for serializing Part Sash Containers in a form that can be read by old versions of Eclipse This can be removed if this is no longer required return the pre Eclipse 3 0 sash ratio public float get Ratio int total left right if total 0 return float left float total else return 0 5f  PartSashContainers getRatio
public Sash Container Drop Target Layout Part source Part int side int cursor Layout Part target Part this side side this target Part target Part this source Part source Part this cursor cursor  SashContainerDropTarget LayoutPart sourcePart LayoutPart targetPart targetPart targetPart sourcePart sourcePart
public void drop if side SWT NONE Layout Part visible Part source Part if source Part instanceof Part Stack visible Part get Visible Part Part Stack source Part drop Object get Visible Parts source Part visible Part target Part side  LayoutPart visiblePart sourcePart sourcePart PartStack visiblePart getVisiblePart PartStack sourcePart dropObject getVisibleParts sourcePart visiblePart targetPart
public Cursor get Cursor return Drag Cursors get Cursor Drag Cursors position To Drag Cursor cursor  getCursor DragCursors getCursor DragCursors positionToDragCursor
public Rectangle get Snap Rectangle Rectangle target Bounds if target Part null target Bounds Drag Util get Display Bounds target Part get Control else target Bounds Drag Util get Display Bounds get Parent if side SWT CENTER side SWT NONE return target Bounds int distance Geometry get Dimension target Bounds Geometry is Horizontal side return Geometry get Extruded Edge target Bounds int distance get Docking Ratio source Part target Part side  getSnapRectangle targetBounds targetPart targetBounds DragUtil getDisplayBounds targetPart getControl targetBounds DragUtil getDisplayBounds getParent targetBounds getDimension targetBounds isHorizontal getExtrudedEdge targetBounds getDockingRatio sourcePart targetPart
this page page resize Listener new Control Adapter public void control Resized Control Event e resize Sashes parent get Client Area  resizeListener ControlAdapter controlResized ControlEvent resizeSashes getClientArea
public Part Sash Container String id final Workbench Page page super id this page page resize Listener new Control Adapter public void control Resized Control Event e resize Sashes parent get Client Area  PartSashContainer WorkbenchPage resizeListener ControlAdapter controlResized ControlEvent resizeSashes getClientArea
Given an object associated with a drag a Part Pane or Part Stack this returns the actual Part Panes being dragged param pane return private Part Pane get Visible Parts Layout Part pane if pane instanceof Part Pane return new Part Pane Part Pane pane else if pane instanceof Part Stack Part Stack stack Part Stack pane Layout Part children stack get Children Array List result new Array List children length for int idx 0 idx children length idx Layout Part next children idx if next instanceof Part Pane result add next return Part Pane result to Array new Part Pane result size return new Part Pane 0  PartPane PartStack PartPanes PartPane getVisibleParts LayoutPart PartPane PartPane PartPane PartStack PartStack PartStack LayoutPart getChildren ArrayList ArrayList LayoutPart PartPane PartPane toArray PartPane PartPane
Find the sashs around the specified part public void find Sashes Layout Part pane Part Pane Sashes sashes if root null return Layout Tree part root find pane if part null return part find Sashes sashes  findSashes LayoutPart PartPane LayoutTree findSashes
Add a part public void add Layout Part child if child null return add Enhanced child SWT RIGHT 0 5f find Bottom Right  LayoutPart addEnhanced findBottomRight
Add a new part relative to another This should be used in place of code add code It differs as follows ul li relationships are specified using SWT direction constants li li the ratio applies to the newly added child not the upper left child li ul param child new part to add to the layout param swt Direction Constant one of SWT TOP SWT BOTTOM SWT LEFT or SWT RIGHT param ratio For New Part a value between 0 0 and 1 0 specifying how much space will be allocated for the newly added part param relative existing part indicating where the new child should be attached since 3 0 void add Enhanced Layout Part child int swt Direction Constant float ratio For New Part Layout Part relative int relative Position Page Layout swt Constant To Layout Position swt Direction Constant float ratio For Upper Left Part if relative Position Page Layout RIGHT relative Position Page Layout BOTTOM ratio For Upper Left Part 1 0f ratio For New Part else ratio For Upper Left Part ratio For New Part add child relative Position ratio For Upper Left Part relative  swtDirectionConstant ratioForNewPart addEnhanced LayoutPart swtDirectionConstant ratioForNewPart LayoutPart relativePosition PageLayout swtConstantToLayoutPosition swtDirectionConstant ratioForUpperLeftPart relativePosition PageLayout relativePosition PageLayout ratioForUpperLeftPart ratioForNewPart ratioForUpperLeftPart ratioForNewPart relativePosition ratioForUpperLeftPart
Add a part relative to another For compatibility only New code should use add Enhanced above param child the new part to add param relationship one of Page Layout TOP Page Layout BOTTOM Page Layout LEFT or Page Layout RIGHT param ratio a value between 0 0 and 1 0 indicating how much space will be allocated to the UPPER LEFT pane param relative part where the new part will be attached public void add Layout Part child int relationship float ratio Layout Part relative boolean is Horizontal relationship I Page Layout LEFT relationship I Page Layout RIGHT Layout Tree node null if root null relative null node root find relative Rectangle bounds if get Parent null Control control get Page get Client Composite if control null control is Disposed bounds control get Bounds else bounds new Rectangle 0 0 800 600 bounds x 0 bounds y 0 else bounds get Bounds int total Size measure Tree bounds node is Horizontal int left int total Size ratio int right total Size left add child relationship left right relative  addEnhanced PageLayout PageLayout PageLayout PageLayout LayoutPart LayoutPart isHorizontal IPageLayout IPageLayout LayoutTree getParent getPage getClientComposite isDisposed getBounds getBounds totalSize measureTree isHorizontal totalSize totalSize
static int measure Tree Rectangle outer Bounds Layout Tree to Measure boolean horizontal if to Measure null return Geometry get Dimension outer Bounds horizontal Layout Tree Node parent to Measure get Parent if parent null return Geometry get Dimension outer Bounds horizontal if parent get Sash is Horizontal horizontal return measure Tree outer Bounds parent horizontal boolean is Left parent is Left Child to Measure Layout Tree other Child parent get Child is Left if other Child is Visible int left parent get Sash get Left int right parent get Sash get Right int child Size is Left left right int bias parent get Compression Bias Normalize bias 1 we re fixed 1 other child is fixed if is Left bias bias if bias 1 If we re fixed return the fixed size return child Size else if bias 1 If the other child is fixed return the size of the parent minus the fixed size of the other child return measure Tree outer Bounds parent horizontal left right child Size Else return the size of the parent scaled appropriately return measure Tree outer Bounds parent horizontal child Size left right return measure Tree outer Bounds parent horizontal  measureTree outerBounds LayoutTree toMeasure toMeasure getDimension outerBounds LayoutTreeNode toMeasure getParent getDimension outerBounds getSash isHorizontal measureTree outerBounds isLeft isLeftChild toMeasure LayoutTree otherChild getChild isLeft otherChild isVisible getSash getLeft getSash getRight childSize isLeft getCompressionBias isLeft childSize measureTree outerBounds childSize measureTree outerBounds childSize measureTree outerBounds
protected void add Child Relationship Info info Layout Part child info part children add child if root null root new Layout Tree child else Add the part to the tree int vertical info relationship I Page Layout LEFT info relationship I Page Layout RIGHT SWT VERTICAL SWT HORIZONTAL boolean left info relationship I Page Layout LEFT info relationship I Page Layout TOP Layout Part Sash sash new Layout Part Sash this vertical sash set Sizes info left info right if parent null child instanceof Part Placeholder sash create Control parent root root insert child left sash info relative child Added child if active child create Control parent child set Visible true child set Container this resize Sashes parent get Client Area  addChild RelationshipInfo LayoutPart LayoutTree IPageLayout IPageLayout IPageLayout IPageLayout LayoutPartSash LayoutPartSash setSizes PartPlaceholder createControl childAdded createControl setVisible setContainer resizeSashes getClientArea
Adds the child using ratio and position attributes from the specified placeholder without replacing the placeholder FIXME I believe there is a bug in compute Relation when a part is positioned relative to the editorarea We end up with a null relative and 0 0 for a ratio void add Child For Placeholder Layout Part child Layout Part placeholder Relationship Info new Relationship Info new Relationship Info new Relationship Info part child if root null new Relationship Info relationship I Page Layout RIGHT new Relationship Info relative root find Bottom Right new Relationship Info left 200 new Relationship Info right 200 find the relationship info for the placeholder Relationship Info relationships compute Relation for int i 0 i relationships length i Relationship Info info relationships i if info part placeholder new Relationship Info left info left new Relationship Info right info right new Relationship Info relationship info relationship new Relationship Info relative info relative add Child new Relationship Info if root null root update Sashes parent resize Sashes parent get Client Area  computeRelation addChildForPlaceholder LayoutPart LayoutPart RelationshipInfo newRelationshipInfo RelationshipInfo newRelationshipInfo newRelationshipInfo IPageLayout newRelationshipInfo findBottomRight newRelationshipInfo newRelationshipInfo RelationshipInfo computeRelation RelationshipInfo newRelationshipInfo newRelationshipInfo newRelationshipInfo newRelationshipInfo addChild newRelationshipInfo updateSashes resizeSashes getClientArea
See I Layout Container allow Border public boolean allows Border return true  ILayoutContainer allowBorder allowsBorder
Notification that a child layout part has been added to the container Subclasses may override this method to perform any container specific work 
protected abstract void child Added Layout Part child Notification that a child layout part has been removed from the container Subclasses may override this method to perform any container specific work  childAdded LayoutPart
protected abstract void child Removed Layout Part child Returns an array with all the relation ship between the parts public Relationship Info compute Relation Layout Tree tree Root root if is Zoomed tree Root unzoom Root Array List list new Array List if tree Root null return new Relationship Info 0 Relationship Info r new Relationship Info r part tree Root compute Relation list list add 0 r Relationship Info result new Relationship Info list size list to Array result return result  childRemoved LayoutPart RelationshipInfo computeRelation LayoutTree treeRoot isZoomed treeRoot unzoomRoot ArrayList ArrayList treeRoot RelationshipInfo RelationshipInfo RelationshipInfo treeRoot computeRelation RelationshipInfo RelationshipInfo toArray
see Layout Part get Control public void create Control Composite parent Widget if active return parent create Parent parent Widget parent add Control Listener resize Listener Drag Util add Drag Target parent this Drag Util add Drag Target parent get Shell this Array List children Array List this children clone for int i 0 length children size i length i Layout Part child Layout Part children get i child set Container this child create Control parent if root null root update Sashes parent active true resize Sashes parent get Client Area  LayoutPart getControl createControl parentWidget createParent parentWidget addControlListener resizeListener DragUtil addDragTarget DragUtil addDragTarget getShell ArrayList ArrayList LayoutPart LayoutPart setContainer createControl updateSashes resizeSashes getClientArea
Subclasses override this method to specify the composite to use to parent all children layout parts it contains 
protected abstract Composite create Parent Composite parent Widget see Layout Part dispose public void dispose if active return Drag Util remove Drag Target parent this Drag Util remove Drag Target parent get Shell this remove all Listeners if resize Listener null parent null parent remove Control Listener resize Listener resize Sashes new Rectangle 200 200 0 0 if children null for int i 0 length children size i length i Layout Part child Layout Part children get i child set Container null In Part Sash Container dispose really means deactivate so we only dispose Part Tab Folders if child instanceof View Stack child dispose dispose Parent this parent null active false  createParent parentWidget LayoutPart DragUtil removeDragTarget DragUtil removeDragTarget getShell resizeListener removeControlListener resizeListener resizeSashes LayoutPart LayoutPart setContainer PartSashContainer PartTabFolders ViewStack disposeParent
Subclasses override this method to dispose of any swt resources created during create Parent  createParent
protected abstract void dispose Parent Dispose all sashs used in this perspective public void dispose Sashes if root null root dispose Sashes  disposeParent disposeSashes disposeSashes
Return the most bottom right part or null if none public Layout Part find Bottom Right if root null return null return root find Bottom Right  LayoutPart findBottomRight findBottomRight
see Layout Part get Bounds public Rectangle get Bounds return this parent get Bounds  LayoutPart getBounds getBounds getBounds
get Minimum Height added by cagatayk acm org see Layout Part get Minimum Height public int get Minimum Height return get Layout Tree get Minimum Height  getMinimumHeight LayoutPart getMinimumHeight getMinimumHeight getLayoutTree getMinimumHeight
get Minimum Height added by cagatayk acm org see Layout Part get Minimum Width public int get Minimum Width return get Layout Tree get Minimum Width  getMinimumHeight LayoutPart getMinimumWidth getMinimumWidth getLayoutTree getMinimumWidth
see I Layout Container get Children public Layout Part get Children Layout Part result new Layout Part children size children to Array result return result  ILayoutContainer getChildren LayoutPart getChildren LayoutPart LayoutPart toArray
see Layout Part get Control public Control get Control return this parent  LayoutPart getControl getControl
public Layout Tree get Layout Tree return root  LayoutTree getLayoutTree
For themes return the current Workbench Page public Workbench Page get Page return page  WorkbenchPage WorkbenchPage getPage
Returns the composite used to parent all the layout parts contained within public Composite get Parent return parent  getParent
return parent protected boolean is Child Layout Part part return children index Of part 0  isChild LayoutPart indexOf
private boolean is Relationship Compatible int relationship boolean is Vertical if is Vertical return relationship I Page Layout RIGHT relationship I Page Layout LEFT else return relationship I Page Layout TOP relationship I Page Layout BOTTOM  isRelationshipCompatible isVertical isVertical IPageLayout IPageLayout IPageLayout IPageLayout
Returns whether this container is zoomed public boolean is Zoomed return unzoom Root null  isZoomed unzoomRoot
Remove a part public void remove Layout Part child if is Zoomed zoom Out if is Child child return children remove child if root null root root remove child if root null root update Sashes parent child Removed child if active child set Visible false child set Container null resize Sashes parent get Client Area  LayoutPart isZoomed zoomOut isChild updateSashes childRemoved setVisible setContainer resizeSashes getClientArea
Replace one part with another public void replace Layout Part old Child Layout Part new Child if is Zoomed zoom Out if is Child old Child return Layout Tree leaf null if root null leaf root find old Child if leaf null return children remove old Child children add new Child child Added new Child leaf set Part new Child if root null root update Sashes parent child Removed old Child if active old Child set Visible false old Child set Container null new Child create Control parent new Child set Container this new Child set Visible true resize Sashes parent get Client Area  LayoutPart oldChild LayoutPart newChild isZoomed zoomOut isChild oldChild LayoutTree oldChild oldChild newChild childAdded newChild setPart newChild updateSashes childRemoved oldChild oldChild setVisible oldChild setContainer newChild createControl newChild setContainer newChild setVisible resizeSashes getClientArea
private void resize Sashes Rectangle parent Size if active return if root null root set Bounds parent Size  resizeSashes parentSize setBounds parentSize
see Layout Part set Bounds public void set Bounds Rectangle r this parent set Bounds r  LayoutPart setBounds setBounds setBounds
Zoom in on a particular layout part The implementation of zoom is quite simple When zoom occurs we create a zoom root which only contains the zoom part We store the old root in unzoom Root and then active the zoom root When unzoom occurs we restore the unzoom Root and dispose the zoom root Note Method assumes we are active public void zoom In Layout Part part Sanity check if unzoom Root null return Hide main root Rectangle old Bounds root get Bounds root set Bounds new Rectangle 0 0 0 0 unzoom Root root Show zoom root root new Layout Tree part root set Bounds old Bounds  unzoomRoot unzoomRoot zoomIn LayoutPart unzoomRoot oldBounds getBounds setBounds unzoomRoot LayoutTree setBounds oldBounds
Zoom out See zoom In for implementation details Note Method assumes we are active public void zoom Out Sanity check if unzoom Root null return Dispose zoom root Rectangle old Bounds root get Bounds root set Bounds new Rectangle 0 0 0 0 Show main root root unzoom Root root set Bounds old Bounds unzoom Root null  zoomIn zoomOut unzoomRoot oldBounds getBounds setBounds unzoomRoot setBounds oldBounds unzoomRoot
public I Drop Target drag Control current Control Object dragged Object Point position Rectangle drag Rectangle if dragged Object instanceof Layout Part return null final Layout Part source Part Layout Part dragged Object if is Stack Type source Part is Pane Type source Part return null if source Part get Workbench Window get Workbench Window return null Rectangle container Bounds Drag Util get Display Bounds parent Layout Part target Part null I Layout Container source Container is Stack Type source Part I Layout Container source Part source Part get Container if container Bounds contains position if root null target Part root find Part parent to Control position if target Part null final Control target Control target Part get Control int side Compatibility Drag Target get Relative Position target Control position final Rectangle target Bounds Drag Util get Display Bounds target Control Disallow stacking if this isn t a container if side SWT DEFAULT side SWT CENTER is Stack Type target Part side Geometry get Closest Side target Bounds position A pointless drop would be one that will put the dragged object back where it started Note that it should be perfectly valid to drag an object back to where it came from however the drop should be ignored boolean pointless Drop is Zoomed if source Part target Part pointless Drop true if source Container null source Container target Part get Visible Children Count source Container 1 pointless Drop true if side SWT CENTER source Part get Container target Part pointless Drop true int cursor side if pointless Drop side SWT NONE cursor SWT CENTER return new Sash Container Drop Target source Part side cursor target Part else int side Geometry get Closest Side container Bounds position boolean pointless Drop is Zoomed if is Stack Type source Part source Part get Container null is Pane Type source Part get Visible Children Count source Part get Container 1 if root null get Visible Children Count this 1 pointless Drop true int cursor Geometry get Opposite Side side if pointless Drop side SWT NONE return new Sash Container Drop Target source Part side cursor null return null  IDropTarget currentControl draggedObject dragRectangle draggedObject LayoutPart LayoutPart sourcePart LayoutPart draggedObject isStackType sourcePart isPaneType sourcePart sourcePart getWorkbenchWindow getWorkbenchWindow containerBounds DragUtil getDisplayBounds LayoutPart targetPart ILayoutContainer sourceContainer isStackType sourcePart ILayoutContainer sourcePart sourcePart getContainer containerBounds targetPart findPart toControl targetPart targetControl targetPart getControl CompatibilityDragTarget getRelativePosition targetControl targetBounds DragUtil getDisplayBounds targetControl isStackType targetPart getClosestSide targetBounds pointlessDrop isZoomed sourcePart targetPart pointlessDrop sourceContainer sourceContainer targetPart getVisibleChildrenCount sourceContainer pointlessDrop sourcePart getContainer targetPart pointlessDrop pointlessDrop SashContainerDropTarget sourcePart targetPart getClosestSide containerBounds pointlessDrop isZoomed isStackType sourcePart sourcePart getContainer isPaneType sourcePart getVisibleChildrenCount sourcePart getContainer getVisibleChildrenCount pointlessDrop getOppositeSide pointlessDrop SashContainerDropTarget sourcePart
Returns true iff this Part Sash Container allows its parts to be stacked onto the given container param container return  PartSashContainer
public abstract boolean is Stack Type Layout Part to Test public abstract boolean is Pane Type Layout Part to Test  isStackType LayoutPart toTest isPaneType LayoutPart toTest
protected void drop Object Part Pane to Drop Layout Part visible Part Layout Part target Part int side get Control set Redraw false if side SWT CENTER if is Stack Type target Part Part Stack stack Part Stack target Part for int idx 0 idx to Drop length idx Part Pane next to Drop idx stack next stack else Part Stack new Part create Stack for int idx 0 idx to Drop length idx Part Pane next to Drop idx stack next new Part add Enhanced new Part side get Docking Ratio new Part target Part target Part set Visible Part visible Part get Container visible Part get Control set Redraw true visible Part set Focus  dropObject PartPane toDrop LayoutPart visiblePart LayoutPart targetPart getControl setRedraw isStackType targetPart PartStack PartStack targetPart toDrop PartPane toDrop PartStack newPart createStack toDrop PartPane toDrop newPart addEnhanced newPart getDockingRatio newPart targetPart targetPart setVisiblePart visiblePart getContainer visiblePart getControl setRedraw visiblePart setFocus
param source Part return  sourcePart
public void stack Layout Part new Part Part Stack container get Control set Redraw false Remove the part from old container deref Part new Part Reparent part and add it to the workbook new Part reparent get Parent container add new Part get Control set Redraw true  LayoutPart newPart PartStack getControl setRedraw derefPart newPart newPart getParent newPart getControl setRedraw
param container param visible Part  visiblePart
param container return 
param source Part protected void deref Part Layout Part source Part I Layout Container container source Part get Container if container null container remove source Part if container instanceof Layout Part if is Stack Type Layout Part container Part Stack stack Part Stack container if stack get Children length 0 remove stack stack dispose  sourcePart derefPart LayoutPart sourcePart ILayoutContainer sourcePart getContainer sourcePart LayoutPart isStackType LayoutPart PartStack PartStack getChildren
protected int get Visible Children Count I Layout Container container Treat null as an empty container if container null return 0 Layout Part children container get Children int count 0 for int idx 0 idx children length idx if children idx instanceof Part Placeholder count return count  getVisibleChildrenCount ILayoutContainer LayoutPart getChildren PartPlaceholder
protected float get Docking Ratio Layout Part dragged Layout Part target return 0 5f  getDockingRatio LayoutPart LayoutPart
Writes a description of the layout to the given string buffer This is used for drag drop test suites to determine if two layouts are the same Like a hash code the description should compare as equal iff the layouts are the same However it should be user readable in order to help debug failed tests Although these are english readable strings they should not be translated or equality tests will fail param buf public void describe Layout String Buffer buf if root null return if is Zoomed buf append zoomed NON NLS 1 root describe Layout buf else buf append layout NON NLS 1 root describe Layout buf  describeLayout StringBuffer isZoomed describeLayout describeLayout
Adds a new child to the container relative to some part param child param relationship param left preferred pixel size of the left top child param right preferred pixel size of the right bottom child param relative relative part void add Layout Part child int relationship int left int right Layout Part relative if is Zoomed zoom Out if child null return if relative null is Child relative return if relationship I Page Layout LEFT relationship I Page Layout BOTTOM relationship I Page Layout LEFT store info about relative positions Relationship Info info new Relationship Info info part child info relationship relationship info left left info right right info relative relative add Child info  LayoutPart LayoutPart isZoomed zoomOut isChild IPageLayout IPageLayout IPageLayout RelationshipInfo RelationshipInfo addChild
public void test Invariants super test Invariants Layout Part children get Children for int idx 0 idx children length idx children idx test Invariants  testInvariants testInvariants LayoutPart getChildren testInvariants

Editor Container constructor comment public Part Site I Workbench Part Reference ref I Workbench Part part I Workbench Page page this part Reference ref this part part this page page extensionID org eclipse ui UnknownID NON NLS 1 extension Name Unknown Name NON NLS 1  EditorContainer PartSite IWorkbenchPartReference IWorkbenchPart IWorkbenchPage partReference extensionName
Dispose the contributions public void dispose if menu Extenders null for int i 0 i menu Extenders size i Popup Menu Extender menu Extenders get i dispose menu Extenders null if key Binding Service null key Binding Service dispose if progress Service null progress Service dispose  menuExtenders menuExtenders PopupMenuExtender menuExtenders menuExtenders keyBindingService keyBindingService progressService progressService
Returns the action bars for the part If this part is a view then it has exclusive use of the action bars If this part is an editor then the action bars are shared among this editor and other editors of the same type public I Action Bars get Action Bars return action Bars  IActionBars getActionBars actionBars
Returns the configuration element for a part public I Configuration Element get Configuration Element return config Element  IConfigurationElement getConfigurationElement configElement
Returns the part registry extension ID return the registry extension ID public String get Id return extensionID  getId
Returns the page containing this workbench site s part return the page containing this part public I Workbench Page get Page return page  IWorkbenchPage getPage
Gets the part pane public Part Pane get Pane return pane  PartPane getPane
Returns the part public I Workbench Part get Part return part  IWorkbenchPart getPart
Returns the part reference public I Workbench Part Reference get Part Reference return part Reference  IWorkbenchPartReference getPartReference partReference
Returns the part registry plugin ID It cannot be code null code return the registry plugin ID public String get Plugin Id return pluginID  getPluginId
Returns the registered name for this part public String get Registered Name return extension Name  getRegisteredName extensionName
Returns the selection provider for a part public I Selection Provider get Selection Provider return selection Provider  ISelectionProvider getSelectionProvider selectionProvider
Returns the shell containing this part return the shell containing this part public Shell get Shell return page get Workbench Window get Shell  getShell getWorkbenchWindow getShell
Returns the workbench window containing this part return the workbench window containing this part public I Workbench Window get Workbench Window return page get Workbench Window  IWorkbenchWindow getWorkbenchWindow getWorkbenchWindow
Register a popup menu for extension public void register Context Menu String menuID Menu Manager menu Mgr I Selection Provider sel Provider if menu Extenders null menu Extenders new Array List 1 menu Extenders add new Popup Menu Extender menuID menu Mgr sel Provider part  registerContextMenu MenuManager menuMgr ISelectionProvider selProvider menuExtenders menuExtenders ArrayList menuExtenders PopupMenuExtender menuMgr selProvider
Register a popup menu with the default id for extension public void register Context Menu Menu Manager menu Mgr I Selection Provider sel Provider register Context Menu get Id menu Mgr sel Provider  registerContextMenu MenuManager menuMgr ISelectionProvider selProvider registerContextMenu getId menuMgr selProvider
get Context Menu Ids added by Dan Rubel dan rubel instantiations com Get the registered popup menu identifiers public String get Context Menu Ids if menu Extenders null return new String 0 String menu Ids new String menu Extenders size int index 0 for Iterator iter menu Extenders iterator iter has Next menu Ids index Popup Menu Extender iter next get Menu Id return menu Ids  getContextMenuIds dan_rubel getContextMenuIds menuExtenders menuIds menuExtenders menuExtenders hasNext menuIds PopupMenuExtender getMenuId menuIds
Sets the action bars for the part public void set Action Bars Sub Action Bars bars action Bars bars  setActionBars SubActionBars actionBars
Sets the configuration element for a part public void set Configuration Element I Configuration Element config Element Save for external use this config Element config Element Get extension ID extensionID config Element get Attribute id NON NLS 1 Get plugin ID pluginID config Element get Declaring Extension get Namespace Get extension name String name config Element get Attribute name NON NLS 1 if name null extension Name name  setConfigurationElement IConfigurationElement configElement configElement configElement configElement getAttribute configElement getDeclaringExtension getNamespace configElement getAttribute extensionName
Sets the part registry extension ID param id the registry extension ID protected void set Id String id extensionID id  setId
Sets the part pane public void set Pane Part Pane pane this pane pane  setPane PartPane
Sets the part public void set Part I Workbench Part new Part part new Part  setPart IWorkbenchPart newPart newPart
Sets the registered name for this part param name the registered name protected void set Registered Name String name extension Name name  setRegisteredName extensionName
Set the selection provider for a part public void set Selection Provider I Selection Provider provider selection Provider provider  setSelectionProvider ISelectionProvider selectionProvider
see I Workbench Part Site get Key Binding Service public I Key Binding Service get Key Binding Service if key Binding Service null key Binding Service new Key Binding Service this TODO why is this here and it should be using Handler Submissions directly if this instanceof Editor Site Editor Action Builder External Contributor contributor Editor Action Builder External Contributor Editor Site this get Extension Action Bar Contributor if contributor null Action Descriptor action Descriptors contributor get Extended Actions if action Descriptors null for int i 0 i action Descriptors length i Action Descriptor action Descriptor action Descriptors i if action Descriptor null I Action action action Descriptors i get Action if action null action get Action Definition Id null key Binding Service register Action action return key Binding Service  IWorkbenchPartSite getKeyBindingService IKeyBindingService getKeyBindingService keyBindingService keyBindingService KeyBindingService HandlerSubmissions EditorSite EditorActionBuilder ExternalContributor EditorActionBuilder ExternalContributor EditorSite getExtensionActionBarContributor ActionDescriptor actionDescriptors getExtendedActions actionDescriptors actionDescriptors ActionDescriptor actionDescriptor actionDescriptors actionDescriptor IAction actionDescriptors getAction getActionDefinitionId keyBindingService registerAction keyBindingService
protected String get Initial Scope Id return null  getInitialScopeId
Get an adapter for this type param adapter return public Object get Adapter Class adapter if I Workbench Site Progress Service class equals adapter return get Site Progress Service else return null  getAdapter IWorkbenchSiteProgressService getSiteProgressService
Get a progress service for the receiver return Workbench Site Progress Service private Workbench Site Progress Service get Site Progress Service if progress Service null progress Service new Workbench Site Progress Service this return progress Service  WorkbenchSiteProgressService WorkbenchSiteProgressService getSiteProgressService progressService progressService WorkbenchSiteProgressService progressService

private Default Stack Presentation Site presentation Site new Default Stack Presentation Site public void close I Presentable Part part Part Stack this close part  DefaultStackPresentationSite presentationSite DefaultStackPresentationSite IPresentablePart PartStack
public void close I Presentable Part parts Part Stack this close parts  IPresentablePart PartStack
public void drag Start I Presentable Part being Dragged Point initial Location boolean keyboard Part Stack this drag Start being Dragged initial Location keyboard  dragStart IPresentablePart beingDragged initialLocation PartStack dragStart beingDragged initialLocation
public void drag Start Point initial Location boolean keyboard Part Stack this drag Start null initial Location keyboard  dragStart initialLocation PartStack dragStart initialLocation
public boolean is Closeable I Presentable Part part return Part Stack this is Closeable part  isCloseable IPresentablePart PartStack isCloseable
public boolean is Part Moveable I Presentable Part part return Part Stack this is Moveable part  isPartMoveable IPresentablePart PartStack isMoveable
public void select Part I Presentable Part to Select Part Stack this presentation Selection Changed to Select  selectPart IPresentablePart toSelect PartStack presentationSelectionChanged toSelect
public boolean supports State int state return Part Stack this supports State state  supportsState PartStack supportsState
public void set State int new State Part Stack this set State new State  setState newState PartStack setState newState
public I Presentable Part get Selected Part return Part Stack this get Selected Part  IPresentablePart getSelectedPart PartStack getSelectedPart
public void add System Actions I Menu Manager menu Manager Part Stack this add System Actions menu Manager  addSystemActions IMenuManager menuManager PartStack addSystemActions menuManager
public boolean is Stack Moveable return can Move Folder  isStackMoveable canMoveFolder
protected abstract boolean is Moveable I Presentable Part part  isMoveable IPresentablePart
protected abstract boolean is Moveable I Presentable Part part protected abstract boolean is Closeable I Presentable Part part  isMoveable IPresentablePart isCloseable IPresentablePart
protected abstract boolean is Moveable I Presentable Part part protected abstract boolean is Closeable I Presentable Part part protected abstract void add System Actions I Menu Manager menu Manager  isMoveable IPresentablePart isCloseable IPresentablePart addSystemActions IMenuManager menuManager
protected abstract boolean is Closeable I Presentable Part part protected abstract void add System Actions I Menu Manager menu Manager protected abstract boolean supports State int new State  isCloseable IPresentablePart addSystemActions IMenuManager menuManager supportsState newState
protected abstract void add System Actions I Menu Manager menu Manager protected abstract boolean supports State int new State protected abstract boolean can Move Folder  addSystemActions IMenuManager menuManager supportsState newState canMoveFolder
protected abstract boolean supports State int new State protected abstract boolean can Move Folder protected abstract void deref Part Layout Part to Deref  supportsState newState canMoveFolder derefPart LayoutPart toDeref
protected abstract boolean can Move Folder protected abstract void deref Part Layout Part to Deref protected abstract boolean allows Drop Part Pane part  canMoveFolder derefPart LayoutPart toDeref allowsDrop PartPane
protected static void append To Group If Possible I Menu Manager m String group Id Contribution Item item try m append To Group group Id item catch Illegal Argument Exception e m add item  appendToGroupIfPossible IMenuManager groupId ContributionItem appendToGroup groupId IllegalArgumentException
Creates a new Part Stack given a constant determining which presentation to use param appearance one of the Presentation Factory Util ROLE  constants public Part Stack int appearance super Part Stack NON NLS 1 this appearance appearance  PartStack PresentationFactoryUtil ROLE_ PartStack PartStack
Returns the currently selected I Presentable Part or null if none return protected I Presentable Part get Selected Part if current null return null return current get Presentable Part  IPresentablePart IPresentablePart getSelectedPart getPresentablePart
protected I Stack Presentation Site get Presentation Site return presentation Site  IStackPresentationSite getPresentationSite presentationSite
Tests the integrity of this object Throws an exception if the object s state is invalid For use in test suites public void test Invariants Control focus Control Display get Current get Focus Control boolean current Found false Layout Part children get Children for int idx 0 idx children length idx Layout Part child children idx No null children allowed Assert is Not Null child null children are not allowed in Part Stack NON NLS 1 This object can only contain placeholders or Part Panes Assert is True child instanceof Part Placeholder child instanceof Part Pane Part Stack can only contain Part Placeholders or Part Panes NON NLS 1 Ensure that all the Part Panes have an associated presentable part I Presentable Part part child get Presentable Part if child instanceof Part Pane Assert is Not Null part All Part Panes must have a non null I Presentable Part NON NLS 1 Ensure that the child s backpointer points to this stack I Layout Container child Container child get Container Disable tests for placeholders Part Placeholder backpointers don t obey the usual rules they sometimes point to a container placeholder for this stack instead of the real stack if child instanceof Part Placeholder if is Disposed Currently we allow null backpointers if the widgetry is disposed However it is never valid for the child to have a parent other than this object if child Container null Assert is True child Container this Part Stack has a child that thinks it has a different parent NON NLS 1 else If the widgetry exists the child s backpointer must point to us Assert is True child Container this Part Stack has a child that thinks it has a different parent NON NLS 1 If this child has focus then ensure that it is selected and that we have the active appearance if Swt Util is Child child get Control focus Control Assert is True child current The part with focus is not the selected part NON NLS 1 focus check commented out since it fails when focus workaround in Layout Part set Visible is not present Assert is True get Active Stack Presentation AS ACTIVE FOCUS Ensure that current points to a valid child if child current current Found true Test the child s internal state child test Invariants If we have at least one child ensure that the current pointer points to one of them if is Disposed get Presentable Parts size 0 Assert is True current Found if is Disposed Stack Presentation presentation get Presentation If the presentation controls have focus ensure that we have the active appearance if Swt Util is Child presentation get Control focus Control Assert is True get Active Stack Presentation AS ACTIVE FOCUS The presentation has focus but does not have the active appearance NON NLS 1  testInvariants focusControl getCurrent getFocusControl currentFound LayoutPart getChildren LayoutPart isNotNull PartStack PartPanes isTrue PartPlaceholder PartPane PartStack PartPlaceholders PartPanes PartPanes IPresentablePart getPresentablePart PartPane isNotNull PartPanes IPresentablePart ILayoutContainer childContainer getContainer PartPlaceholder PartPlaceholder isDisposed childContainer isTrue childContainer PartStack isTrue childContainer PartStack SwtUtil isChild getControl focusControl isTrue LayoutPart setVisible isTrue getActive StackPresentation AS_ACTIVE_FOCUS currentFound testInvariants isDisposed getPresentableParts isTrue currentFound isDisposed StackPresentation getPresentation SwtUtil isChild getControl focusControl isTrue getActive StackPresentation AS_ACTIVE_FOCUS
public void describe Layout String Buffer buf int active State get Active if active State Stack Presentation AS ACTIVE FOCUS buf append active NON NLS 1 else if active State Stack Presentation AS ACTIVE NOFOCUS buf append active nofocus NON NLS 1 buf append NON NLS 1 Layout Part children I Layout Container this get Children int visible Children 0 for int idx 0 idx children length idx Layout Part next children idx if next instanceof Part Placeholder if idx 0 buf append NON NLS 1 if next current buf append NON NLS 1 next describe Layout buf visible Children buf append NON NLS 1  describeLayout StringBuffer activeState getActive activeState StackPresentation AS_ACTIVE_FOCUS activeState StackPresentation AS_ACTIVE_NOFOCUS active_nofocus LayoutPart ILayoutContainer getChildren visibleChildren LayoutPart PartPlaceholder describeLayout visibleChildren
See I Visual Container add public void add Layout Part child children add child show Part child null  IVisualContainer LayoutPart showPart
Add a part at a particular position protected void add Layout Part new Child Object cookie children add new Child show Part new Child cookie  LayoutPart newChild newChild showPart newChild
public boolean allows Auto Focus if presentation Site get State I Stack Presentation Site STATE MINIMIZED return false I Layout Container parent get Container if parent null parent allows Auto Focus return false return true  allowsAutoFocus presentationSite getState IStackPresentationSite STATE_MINIMIZED ILayoutContainer getContainer allowsAutoFocus
param parts protected void close I Presentable Part parts for int idx 0 idx parts length idx I Presentable Part part parts idx close part  IPresentablePart IPresentablePart
param part protected void close I Presentable Part part if presentation Site is Closeable part return Layout Part layout Part get Pane For part if layout Part null layout Part instanceof Part Pane Part Pane view Pane Part Pane layout Part view Pane do Hide  IPresentablePart presentationSite isCloseable LayoutPart layoutPart getPaneFor layoutPart layoutPart PartPane PartPane viewPane PartPane layoutPart viewPane doHide
public boolean is Disposed return get Presentation null  isDisposed getPresentation
protected Abstract Presentation Factory get Factory Abstract Presentation Factory factory Workbench Window get Page get Workbench Window get Window Configurer get Presentation Factory return factory  AbstractPresentationFactory getFactory AbstractPresentationFactory WorkbenchWindow getPage getWorkbenchWindow getWindowConfigurer getPresentationFactory
public void create Control Composite parent if is Disposed return Abstract Presentation Factory factory get Factory Presentation Serializer serializer new Presentation Serializer get Presentable Parts Stack Presentation presentation Presentation Factory Util create Presentation factory appearance parent presentation Site serializer saved Presentation State create Control parent presentation  createControl isDisposed AbstractPresentationFactory getFactory PresentationSerializer PresentationSerializer getPresentableParts StackPresentation PresentationFactoryUtil createPresentation presentationSite savedPresentationState createControl
public void create Control Composite parent Stack Presentation presentation Assert is True is Disposed if presentation Site get Presentation null return presentation Site set Presentation presentation Add all visible children to the presentation Iterator iter children iterator while iter has Next Layout Part part Layout Part iter next show Part part null Control ctrl get Presentation get Control Add a drop target that lets us drag views directly to a particular tab Drag Util add Drag Target ctrl new I Drag Over Listener public I Drop Target drag Control current Control final Object dragged Object Point position Rectangle drag Rectangle if dragged Object instanceof Part Pane return null final Part Pane pane Part Pane dragged Object if allows Drop pane return null Don t allow views to be dragged between windows if pane get Workbench Window get Workbench Window return null Regardless of the wishes of the presentation ignore 4 pixels around the edge of the control This ensures that it will always be possible to dock around the edge of the control Point control Coordinates current Control get Parent to Control position Rectangle bounds current Control get Bounds int closest Side Geometry get Closest Side bounds control Coordinates if Geometry get Distance From Edge bounds control Coordinates closest Side 5 return null End of check for stacking on edge final Stack Drop Result drop Result get Presentation drag Over current Control position if drop Result null return null return new I Drop Target public void drop If we re dragging a pane over itself do nothing if drop Result get Insertion Point pane get Presentable Part return Don t worry about reparenting the view if we re simply rearranging tabs within this folder if pane get Container Part Stack this deref Part pane pane reparent get Parent else remove pane add pane drop Result get Cookie set Selection pane pane set Focus public Cursor get Cursor return Drag Cursors get Cursor Drag Cursors CENTER public Rectangle get Snap Rectangle return drop Result get Snap Rectangle ctrl set Data this update Actions We should not have a placeholder selected once we ve created the widgetry if current instanceof Part Placeholder current null update Container Visible Tab refresh Presentation Selection Rectangle bounds presentation get Control get Bounds int minimum Height get Minimum Height if presentation Site get State I Stack Presentation Site STATE MINIMIZED bounds height minimum Height bounds width get Minimum Width bounds height minimum Height get Presentation set Bounds bounds  createControl StackPresentation isTrue isDisposed presentationSite getPresentation presentationSite setPresentation hasNext LayoutPart LayoutPart showPart getPresentation getControl DragUtil addDragTarget IDragOverListener IDropTarget currentControl draggedObject dragRectangle draggedObject PartPane PartPane PartPane draggedObject allowsDrop getWorkbenchWindow getWorkbenchWindow controlCoordinates currentControl getParent toControl currentControl getBounds closestSide getClosestSide controlCoordinates getDistanceFromEdge controlCoordinates closestSide StackDropResult dropResult getPresentation dragOver currentControl dropResult IDropTarget dropResult getInsertionPoint getPresentablePart getContainer PartStack derefPart getParent dropResult getCookie setSelection setFocus getCursor DragCursors getCursor DragCursors getSnapRectangle dropResult getSnapRectangle setData updateActions PartPlaceholder updateContainerVisibleTab refreshPresentationSelection getControl getBounds minimumHeight getMinimumHeight presentationSite getState IStackPresentationSite STATE_MINIMIZED minimumHeight getMinimumWidth minimumHeight getPresentation setBounds
Saves the current state of the presentation to saved Presentation State if the presentation exists protected void save Presentation State if is Disposed return Save the presentation s state before disposing it XML Memento memento XML Memento create Write Root I Workbench Constants TAG PRESENTATION memento put String I Workbench Constants TAG ID get Factory get Id Presentation Serializer serializer new Presentation Serializer get Presentable Parts get Presentation save State serializer memento Store the memento in saved Presentation State saved Presentation State memento  savedPresentationState savePresentationState isDisposed XMLMemento XMLMemento createWriteRoot IWorkbenchConstants TAG_PRESENTATION putString IWorkbenchConstants TAG_ID getFactory getId PresentationSerializer PresentationSerializer getPresentableParts getPresentation saveState savedPresentationState savedPresentationState
See Layout Part dispose public void dispose if is Disposed return save Presentation State presentation Site dispose Iterator iter children iterator while iter has Next Layout Part next Layout Part iter next next set Container null  LayoutPart isDisposed savePresentationState presentationSite hasNext LayoutPart LayoutPart setContainer
public void find Sashes Layout Part part Part Pane Sashes sashes I Layout Container container get Container if container null container find Sashes this sashes  findSashes LayoutPart PartPane ILayoutContainer getContainer findSashes
Forces the layout to be recomputed for all parts private void force Layout Part Sash Container cont Part Sash Container get Container if cont null Layout Tree tree cont get Layout Tree tree set Bounds get Parent get Client Area  forceLayout PartSashContainer PartSashContainer getContainer LayoutTree getLayoutTree setBounds getParent getClientArea
Gets the presentation bounds public Rectangle get Bounds if get Presentation null return new Rectangle 0 0 0 0 return get Presentation get Control get Bounds  getBounds getPresentation getPresentation getControl getBounds
See I Visual Container get Children public Layout Part get Children return Layout Part children to Array new Layout Part children size  IVisualContainer getChildren LayoutPart getChildren LayoutPart toArray LayoutPart
public Control get Control Stack Presentation presentation get Presentation if presentation null return null return presentation get Control  getControl StackPresentation getPresentation getControl
Answer the number of children public int get Item Count if is Disposed return children size return get Presentable Parts size  getItemCount isDisposed getPresentableParts
get Minimum Height added by cagatayk acm org see Layout Part get Minimum Height public int get Minimum Height if get Presentation null return 0 return get Presentation compute Minimum Size y  getMinimumHeight LayoutPart getMinimumHeight getMinimumHeight getPresentation getPresentation computeMinimumSize
Returns the Layout Part for the given I Presentable Part or null if the given I Presentable Part is not in this stack Returns null if given a null argument param part to locate or null return protected Layout Part get Pane For I Presentable Part part if part null return null Iterator iter children iterator while iter has Next Layout Part next Layout Part iter next if next get Presentable Part part return next return null  LayoutPart IPresentablePart IPresentablePart LayoutPart getPaneFor IPresentablePart hasNext LayoutPart LayoutPart getPresentablePart
Get the parent control public Composite get Parent return get Control get Parent  getParent getControl getParent
private I Presentable Part get Presentable Part At Index int idx List presentable Parts get Presentable Parts if idx 0 idx presentable Parts size return I Presentable Part presentable Parts get idx return null  IPresentablePart getPresentablePartAtIndex presentableParts getPresentableParts presentableParts IPresentablePart presentableParts
Returns a list of I Presentable Part return public List get Presentable Parts List result new Array List children size Iterator iter children iterator while iter has Next Layout Part part Layout Part iter next I Presentable Part presentable Part part get Presentable Part if presentable Part null result add presentable Part return result  IPresentablePart getPresentableParts ArrayList hasNext LayoutPart LayoutPart IPresentablePart presentablePart getPresentablePart presentablePart presentablePart
protected Stack Presentation get Presentation return presentation Site get Presentation  StackPresentation getPresentation presentationSite getPresentation
Returns the visible child public Part Pane get Visible Part if current instanceof Part Pane return Part Pane current return null  PartPane getVisiblePart PartPane PartPane
private void presentation Selection Changed I Presentable Part new Selection Ignore selection changes that occur as a result of removing a part if ignore Selection Changes return Layout Part new Part get Pane For new Selection This method should only be called on objects that are already in the layout Assert is Not Null new Part if new Part current return set Selection new Part if new Part null new Part set Focus set the title of the detached window to reflect the active tab Window window get Window if window instanceof Detached Window window get Shell set Text new Selection get Title  presentationSelectionChanged IPresentablePart newSelection ignoreSelectionChanges LayoutPart newPart getPaneFor newSelection isNotNull newPart newPart setSelection newPart newPart newPart setFocus getWindow DetachedWindow getShell setText newSelection getTitle
See I Visual Container remove public void remove Layout Part child I Presentable Part presentable Part child get Presentable Part Need to remove it from the list of children before notifying the presentation since it may set Visible false on the part leading to a part Hidden notification during which find View must not find the view being removed See bug 60039 children remove child Stack Presentation presentation get Presentation if presentable Part null presentation null ignore Selection Changes true presentation remove Part presentable Part ignore Selection Changes false if is Disposed child set Container null if child current update Container Visible Tab  IVisualContainer LayoutPart IPresentablePart presentablePart getPresentablePart setVisible partHidden findView StackPresentation getPresentation presentablePart ignoreSelectionChanges removePart presentablePart ignoreSelectionChanges isDisposed setContainer updateContainerVisibleTab
Reparent a part Also reparent visible children public void reparent Composite new Parent if new Parent is Reparentable return Control control get Control if control null control get Parent new Parent return super reparent new Parent Iterator iter children iterator while iter has Next Layout Part next Layout Part iter next next reparent new Parent  newParent newParent isReparentable getControl getParent newParent newParent hasNext LayoutPart LayoutPart newParent
See I Visual Container replace public void replace Layout Part old Child Layout Part new Child commented out but left for future reference we re using this as the cookie for the part presentation but this will almost always be null old Childs being Part Placeholders even if they aren t null we don t handle I Presentable Parts as cookies I Presentable Part old Part old Child get Presentable Part I Presentable Part new Part new Child get Presentable Part int idx children index Of old Child int num Placeholders 0 subtract the number of placeholders still existing in the list before this one they wont have parts for int i 0 i idx i if children get i instanceof Part Placeholder num Placeholders Integer cookie new Integer idx num Placeholders children add idx new Child show Part new Child cookie if old Child current new Child instanceof Part Placeholder set Selection new Child remove old Child  IVisualContainer LayoutPart oldChild LayoutPart newChild oldChilds PartPlaceholders IPresentableParts IPresentablePart oldPart oldChild getPresentablePart IPresentablePart newPart newChild getPresentablePart indexOf oldChild numPlaceholders PartPlaceholder numPlaceholders numPlaceholders newChild showPart newChild oldChild newChild PartPlaceholder setSelection newChild oldChild
public boolean resizes Vertically return presentation Site get State I Stack Presentation Site STATE MINIMIZED  resizesVertically presentationSite getState IStackPresentationSite STATE_MINIMIZED
see I Persistable public I Status restore State I Memento memento Read the active tab String active TabID memento get String I Workbench Constants TAG ACTIVE PAGE ID Read the page elements I Memento children memento get Children I Workbench Constants TAG PAGE if children null Loop through the page elements for int i 0 i children length i Get the info details I Memento child Mem children i String partID child Mem get String I Workbench Constants TAG CONTENT Create the part Layout Part part new Part Placeholder partID part set Container this add part 1FUN70C ITPUI WIN Shouldn t set Container when not active part set Container this if partID equals active TabID Mark this as the active part current part Integer expanded memento get Integer I Workbench Constants TAG EXPANDED set State expanded null expanded int Value I Stack Presentation Site STATE MINIMIZED I Stack Presentation Site STATE RESTORED I Stack Presentation Site STATE MINIMIZED Integer appearance memento get Integer I Workbench Constants TAG APPEARANCE if appearance null this appearance appearance int Value Determine if the presentation has saved any info here saved Presentation State null I Memento presentation Mementos memento get Children I Workbench Constants TAG PRESENTATION for int idx 0 idx presentation Mementos length idx I Memento child presentation Mementos idx String id child get String I Workbench Constants TAG ID if Util equals id get Factory get Id saved Presentation State child break return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1  IPersistable IStatus restoreState IMemento activeTabID getString IWorkbenchConstants TAG_ACTIVE_PAGE_ID IMemento getChildren IWorkbenchConstants TAG_PAGE IMemento childMem childMem getString IWorkbenchConstants TAG_CONTENT LayoutPart PartPlaceholder setContainer setContainer activeTabID getInteger IWorkbenchConstants TAG_EXPANDED setState intValue IStackPresentationSite STATE_MINIMIZED IStackPresentationSite STATE_RESTORED IStackPresentationSite STATE_MINIMIZED getInteger IWorkbenchConstants TAG_APPEARANCE intValue savedPresentationState IMemento presentationMementos getChildren IWorkbenchConstants TAG_PRESENTATION presentationMementos IMemento presentationMementos getString IWorkbenchConstants TAG_ID getFactory getId savedPresentationState IStatus PLUGIN_ID
see I Persistable public I Status save State I Memento memento Save the active tab if current null memento put String I Workbench Constants TAG ACTIVE PAGE ID current get Compound Id Iterator iter children iterator while iter has Next Layout Part next Layout Part iter next I Memento child Mem memento create Child I Workbench Constants TAG PAGE I Presentable Part part next get Presentable Part String tab Text Label Not Found NON NLS 1 if part null tab Text part get Name child Mem put String I Workbench Constants TAG LABEL tab Text child Mem put String I Workbench Constants TAG CONTENT next get Compound Id memento put Integer I Workbench Constants TAG EXPANDED presentation Site get State I Stack Presentation Site STATE MINIMIZED I Stack Presentation Site STATE MINIMIZED I Stack Presentation Site STATE RESTORED memento put Integer I Workbench Constants TAG APPEARANCE appearance save Presentation State if saved Presentation State null I Memento presentation State memento create Child I Workbench Constants TAG PRESENTATION presentation State put Memento saved Presentation State return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1  IPersistable IStatus saveState IMemento putString IWorkbenchConstants TAG_ACTIVE_PAGE_ID getCompoundId hasNext LayoutPart LayoutPart IMemento childMem createChild IWorkbenchConstants TAG_PAGE IPresentablePart getPresentablePart tabText LabelNotFound tabText getName childMem putString IWorkbenchConstants TAG_LABEL tabText childMem putString IWorkbenchConstants TAG_CONTENT getCompoundId putInteger IWorkbenchConstants TAG_EXPANDED presentationSite getState IStackPresentationSite STATE_MINIMIZED IStackPresentationSite STATE_MINIMIZED IStackPresentationSite STATE_RESTORED putInteger IWorkbenchConstants TAG_APPEARANCE savePresentationState savedPresentationState IMemento presentationState createChild IWorkbenchConstants TAG_PRESENTATION presentationState putMemento savedPresentationState IStatus PLUGIN_ID
protected Workbench Page get Page Workbench Window window Workbench Window get Workbench Window if window null return null return Workbench Page window get Active Page  WorkbenchPage getPage WorkbenchWindow WorkbenchWindow getWorkbenchWindow WorkbenchPage getActivePage
Set the active appearence on the tab folder param active public void set Active int active State if active State Stack Presentation AS INACTIVE if presentation Site get State I Stack Presentation Site STATE MINIMIZED set State I Stack Presentation Site STATE RESTORED presentation Site set Active active State  setActive activeState activeState StackPresentation AS_INACTIVE presentationSite getState IStackPresentationSite STATE_MINIMIZED setState IStackPresentationSite STATE_RESTORED presentationSite setActive activeState
public int get Active return presentation Site get Active  getActive presentationSite getActive
Sets the presentation bounds public void set Bounds Rectangle r if get Presentation null get Presentation set Bounds r  setBounds getPresentation getPresentation setBounds
public void set Selection Layout Part part if current part return current part if is Disposed update Actions refresh Presentation Selection  setSelection LayoutPart isDisposed updateActions refreshPresentationSelection
Subclasses should override this method to update the enablement state of their actions protected void update Actions  updateActions
private void refresh Presentation Selection if current null I Presentable Part presentable Part current get Presentable Part Stack Presentation presentation get Presentation if presentable Part null presentation null current create Control get Parent if current get Control get Parent get Control get Parent current reparent get Control get Parent current move Above get Presentation get Control presentation select Part presentable Part  refreshPresentationSelection IPresentablePart presentablePart getPresentablePart StackPresentation getPresentation presentablePart createControl getParent getControl getParent getControl getParent getControl getParent moveAbove getPresentation getControl selectPart presentablePart
protected void set State int new State if supports State new State new State presentation Site get State return int old State presentation Site get State if current null if new State I Stack Presentation Site STATE MAXIMIZED Part Pane pane get Visible Part if pane null pane do Zoom else presentation Site set Presentation State new State Workbench Page page get Page if page null if page is Zoomed page zoom Out update Control Bounds if old State I Stack Presentation Site STATE MINIMIZED force Layout if presentation Site get State I Stack Presentation Site STATE MINIMIZED Workbench Page page get Page if page null page refresh Active View  setState newState supportsState newState newState presentationSite getState oldState presentationSite getState newState IStackPresentationSite STATE_MAXIMIZED PartPane getVisiblePart doZoom presentationSite setPresentationState newState WorkbenchPage getPage isZoomed zoomOut updateControlBounds oldState IStackPresentationSite STATE_MINIMIZED forceLayout presentationSite getState IStackPresentationSite STATE_MINIMIZED WorkbenchPage getPage refreshActiveView
public void set Zoomed boolean is Zoomed super set Zoomed is Zoomed if is Zoomed presentation Site set Presentation State I Stack Presentation Site STATE MAXIMIZED else if presentation Site get State I Stack Presentation Site STATE MAXIMIZED presentation Site set Presentation State I Stack Presentation Site STATE RESTORED  setZoomed isZoomed setZoomed isZoomed isZoomed presentationSite setPresentationState IStackPresentationSite STATE_MAXIMIZED presentationSite getState IStackPresentationSite STATE_MAXIMIZED presentationSite setPresentationState IStackPresentationSite STATE_RESTORED
Makes the given part visible in the presentation param presentable Part private void show Part Layout Part part Object cookie if is Disposed return part set Container this I Presentable Part presentable Part part get Presentable Part if presentable Part null return presentation Site get Presentation add Part presentable Part cookie if current null set Selection part  presentablePart showPart LayoutPart isDisposed setContainer IPresentablePart presentablePart getPresentablePart presentablePart presentationSite getPresentation addPart presentablePart setSelection
Update the container to show the correct visible tab based on the activation list param org eclipse ui internal I Layout Container private void update Container Visible Tab Layout Part parts get Children if parts length 1 set Selection null return Part Pane sel Part null int top Index 0 Workbench Page page get Page if page null I Workbench Part Reference sorted Parts Array page get Sorted Parts List sorted Parts Arrays as List sorted Parts Array for int i 0 i parts length i if parts i instanceof Part Pane I Workbench Part Reference part Part Pane parts i get Part Reference int index sorted Parts index Of part if index top Index top Index index sel Part Part Pane parts i if sel Part null List presentable Parts get Presentable Parts if presentable Parts size 0 I Presentable Part part I Presentable Part get Presentable Parts get 0 sel Part Part Pane get Pane For part set Selection sel Part  ILayoutContainer updateContainerVisibleTab LayoutPart getChildren setSelection PartPane selPart topIndex WorkbenchPage getPage IWorkbenchPartReference sortedPartsArray getSortedParts sortedParts asList sortedPartsArray PartPane IWorkbenchPartReference PartPane getPartReference sortedParts indexOf topIndex topIndex selPart PartPane selPart presentableParts getPresentableParts presentableParts IPresentablePart IPresentablePart getPresentableParts selPart PartPane getPaneFor setSelection selPart
private void update Control Bounds Stack Presentation presentation get Presentation if presentation null Rectangle bounds presentation get Control get Bounds int minimum Height get Minimum Height if presentation Site get State I Stack Presentation Site STATE MINIMIZED bounds height minimum Height bounds width get Minimum Width bounds height minimum Height get Presentation set Bounds bounds force Layout  updateControlBounds StackPresentation getPresentation getControl getBounds minimumHeight getMinimumHeight presentationSite getState IStackPresentationSite STATE_MINIMIZED minimumHeight getMinimumWidth minimumHeight getPresentation setBounds forceLayout
public void show System Menu get Presentation show System Menu  showSystemMenu getPresentation showSystemMenu
public void show Pane Menu get Presentation show Pane Menu  showPaneMenu getPresentation showPaneMenu
public void show Part List get Presentation show Part List  showPartList getPresentation showPartList
param pane return public Control get Tab List Layout Part part if part null I Presentable Part presentable Part part get Presentable Part Stack Presentation presentation get Presentation if presentable Part null presentation null return presentation get Tab List presentable Part return new Control 0  getTabList LayoutPart IPresentablePart presentablePart getPresentablePart StackPresentation getPresentation presentablePart getTabList presentablePart
param being Dragged param initial Location param keyboard public void drag Start I Presentable Part being Dragged Point initial Location boolean keyboard if being Dragged null if can Move Folder if presentation Site get State I Stack Presentation Site STATE MAXIMIZED set State I Stack Presentation Site STATE RESTORED Drag Util perform Drag Part Stack this Geometry to Display get Parent get Presentation get Control get Bounds initial Location keyboard else if presentation Site is Part Moveable being Dragged Layout Part pane get Pane For being Dragged if pane null if presentation Site get State I Stack Presentation Site STATE MAXIMIZED presentation Site set State I Stack Presentation Site STATE RESTORED Drag Util perform Drag pane Geometry to Display get Parent get Presentation get Control get Bounds initial Location keyboard  beingDragged initialLocation dragStart IPresentablePart beingDragged initialLocation beingDragged canMoveFolder presentationSite getState IStackPresentationSite STATE_MAXIMIZED setState IStackPresentationSite STATE_RESTORED DragUtil performDrag PartStack toDisplay getParent getPresentation getControl getBounds initialLocation presentationSite isPartMoveable beingDragged LayoutPart getPaneFor beingDragged presentationSite getState IStackPresentationSite STATE_MAXIMIZED presentationSite setState IStackPresentationSite STATE_RESTORED DragUtil performDrag toDisplay getParent getPresentation getControl getBounds initialLocation
return Returns the saved Presentation State public I Memento get Saved Presentation State return saved Presentation State  savedPresentationState IMemento getSavedPresentationState savedPresentationState

View Manager constructor comment public Perspective Perspective Descriptor desc Workbench Page page throws Workbench Exception this page descriptor desc if desc null create Presentation desc  ViewManager PerspectiveDescriptor WorkbenchPage WorkbenchException createPresentation
View Manager constructor comment protected Perspective Workbench Page page throws Workbench Exception this page page this editor Area page get Editor Presentation get Layout Part this view Factory page get View Factory visible Action Sets new Array List 2 always On Action Sets new Array List 2 always Off Action Sets new Array List 2 fast Views new Array List 2 mapI Dto View Layout Rec new Hash Map  ViewManager WorkbenchPage WorkbenchException editorArea getEditorPresentation getLayoutPart viewFactory getViewFactory visibleActionSets ArrayList alwaysOnActionSets ArrayList alwaysOffActionSets ArrayList fastViews ArrayList mapIDtoViewLayoutRec HashMap
Sets the fast view attribute Note The page is expected to update action bars public void add Fast View I View Reference ref View Pane pane View Pane Workbench Part Reference ref get Pane if is Fast View ref Only remove the part from the presentation if it is actually in the presentation if presentation has Placeholder ref get Id ref get Secondary Id pane get Container null presentation remove Part pane We are drag enabling the pane because it has been disabled when it was removed from the perspective presentation fast Views add ref pane set Fast true Control ctrl pane get Control if ctrl null ctrl set Enabled false Remove focus support  addFastView IViewReference ViewPane ViewPane WorkbenchPartReference getPane isFastView hasPlaceholder getId getSecondaryId getContainer removePart fastViews setFast getControl setEnabled
Moves a part forward in the Z order of a perspective so it is visible param part the part to bring to move forward return true if the part was brought to top false if not public boolean bring To Top I View Reference ref if is Fast View ref set Active Fast View ref return true else return presentation bring Part To Top get Pane ref  bringToTop IViewReference isFastView setActiveFastView bringPartToTop getPane
Returns true if a view can close public boolean can Close View I View Part view return true  canCloseView IViewPart
Returns whether a view exists within the perspective public boolean contains View I View Part view I View Site site view get View Site I View Reference ref find View site get Id site get Secondary Id if ref null return false return view ref get Part false  containsView IViewPart IViewSite getViewSite IViewReference findView getId getSecondaryId getPart
Create the initial list of action sets private void create Initial Action Sets List string List Action Set Registry reg Workbench Plugin get Default get Action Set Registry Iterator iter string List iterator while iter has Next String id String iter next I Action Set Descriptor desc reg find Action Set id if desc null visible Action Sets add desc else Workbench Plugin log Unable to find Action Set id NON NLS 1  createInitialActionSets stringList ActionSetRegistry WorkbenchPlugin getDefault getActionSetRegistry stringList hasNext IActionSetDescriptor findActionSet visibleActionSets WorkbenchPlugin
Create a presentation for a perspective private void create Presentation Perspective Descriptor persp throws Workbench Exception if persp has Custom Definition load Custom Persp persp else load Predefined Persp persp  createPresentation PerspectiveDescriptor WorkbenchException hasCustomDefinition loadCustomPersp loadPredefinedPersp
Dispose the perspective and all views contained within public void dispose Get rid of presentation if presentation null return presentation deactivate presentation dispose Sashes Release each view I View Reference refs get View References for int i 0 length refs length i length i get View Factory release View refs i fast View Pane dispose mapI Dto View Layout Rec clear  disposeSashes IViewReference getViewReferences getViewFactory releaseView fastViewPane mapIDtoViewLayoutRec
Finds the view with the given ID that is open in this page or code null code if not found param view Id the view ID public I View Reference find View String view Id return find View view Id null  viewId IViewReference findView viewId findView viewId
Finds the view with the given id and secondary id that is open in this page or code null code if not found param view Id the view ID param secondary Id the secondary ID public I View Reference find View String id String secondary Id I View Reference refs get View References for int i 0 i refs length i I View Reference ref refs i if id equals ref get Id secondary Id null ref get Secondary Id null secondary Id equals ref get Secondary Id return ref return null  viewId secondaryId IViewReference findView secondaryId IViewReference getViewReferences IViewReference getId secondaryId getSecondaryId secondaryId getSecondaryId
Returns an array of the visible action sets public I Action Set Descriptor get Action Sets int size visible Action Sets size I Action Set Descriptor array new I Action Set Descriptor size for int i 0 i size i array i I Action Set Descriptor visible Action Sets get i return array  IActionSetDescriptor getActionSets visibleActionSets IActionSetDescriptor IActionSetDescriptor IActionSetDescriptor visibleActionSets
Returns the window s client composite widget which views and editor area will be parented private Composite get Client Composite return page get Client Composite  getClientComposite getClientComposite
Returns the perspective public I Perspective Descriptor get Desc return descriptor  IPerspectiveDescriptor getDesc
Returns the bounds of the given fast view package Rectangle get Fast View Bounds I View Reference ref Copy the bounds of the page composite Rectangle bounds page get Client Composite get Bounds get the width ratio of the fast view float ratio get Fast View Width Ratio ref get Id Compute the actual width of the fast view bounds width int ratio get Client Composite get Size x return bounds  getFastViewBounds IViewReference getClientComposite getBounds getFastViewWidthRatio getId getClientComposite getSize
Returns the docked views public I View Reference get Fast Views I View Reference array new I View Reference fast Views size fast Views to Array array return array  IViewReference getFastViews IViewReference IViewReference fastViews fastViews toArray
Returns the new wizard actions the page This is List of Strings public Array List get New Wizard Action Ids return new Wizard Action Ids  ArrayList getNewWizardActionIds newWizardActionIds
Returns the pane for a view reference private View Pane get Pane I View Reference ref return View Pane Workbench Part Reference ref get Pane  ViewPane getPane IViewReference ViewPane WorkbenchPartReference getPane
Returns the perspective actions for this page This is List of Strings public Array List get Perspective Action Ids return perspective Action Ids  ArrayList getPerspectiveActionIds perspectiveActionIds
Returns the presentation public Perspective Helper get Presentation return presentation  PerspectiveHelper getPresentation
Retrieves the ratio for the fast view with the given compound id If the ratio is not known the default ratio for the view is returned param id the compound id for the view private float get Fast View Width Ratio String id View Layout Rec rec get View Layout Rec id true if rec fast View Width Ratio I Page Layout INVALID RATIO I View Registry reg Workbench Plugin get Default get View Registry rec fast View Width Ratio reg find id get Fast View Width Ratio return rec fast View Width Ratio  getFastViewWidthRatio ViewLayoutRec getViewLayoutRec fastViewWidthRatio IPageLayout INVALID_RATIO IViewRegistry WorkbenchPlugin getDefault getViewRegistry fastViewWidthRatio getFastViewWidthRatio fastViewWidthRatio
Returns the ids of the parts to list in the Show In dialog This is a List of Strings public Array List get Show In Part Ids return show In Part Ids  ArrayList getShowInPartIds showInPartIds
Returns the time at which the last Show In was performed for the given target part or 0 if unknown public long get Show In Time String part Id Long t Long show In Times get part Id return t null 0L t long Value  getShowInTime partId showInTimes partId longValue
Returns the ids of the views to list in the Show View shortcuts This is a List of Strings public Array List get Show View Action Ids return show View Action Ids  ArrayList getShowViewActionIds showViewActionIds
Returns the view factory private View Factory get View Factory return view Factory  ViewFactory getViewFactory viewFactory
Open the tracker to allow the user to move the specified part using keyboard public void open Tracker View Pane pane presentation open Tracker pane  openTracker ViewPane openTracker
See I Workbench Page public I View Reference get View References Get normal views if presentation null return new I View Reference 0 List panes new Array List 5 presentation collect View Panes panes I View Reference result Array new I View Reference panes size fast Views size Copy fast views int n View 0 for int i 0 i fast Views size i result Array n View I View Reference fast Views get i n View Copy normal views for int i 0 i panes size i View Pane pane View Pane panes get i result Array n View pane get View Reference n View return result Array  IWorkbenchPage IViewReference getViewReferences IViewReference ArrayList collectViewPanes IViewReference resultArray IViewReference fastViews nView fastViews resultArray nView IViewReference fastViews nView ViewPane ViewPane resultArray nView getViewReference nView resultArray
see I Workbench Page Note The page is expected to update action bars public void hide Action Set String id Action Set Registry reg Workbench Plugin get Default get Action Set Registry I Action Set Descriptor desc reg find Action Set id if always On Action Sets contains desc return if desc null visible Action Sets remove desc  IWorkbenchPage hideActionSet ActionSetRegistry WorkbenchPlugin getDefault getActionSetRegistry IActionSetDescriptor findActionSet alwaysOnActionSets visibleActionSets
Hide the editor area if visible protected void hide Editor Area if is Editor Area Visible return Replace the editor area with a placeholder so we know where to put it back on show editor area request editor Holder new Part Placeholder editor Area getID presentation get Layout replace editor Area editor Holder Disable the entire editor area so if an editor had keyboard focus it will let it go if editor Area get Control null editor Area get Control set Enabled false set Editor Area Visible false  hideEditorArea isEditorAreaVisible editorHolder PartPlaceholder editorArea getLayout editorArea editorHolder editorArea getControl editorArea getControl setEnabled setEditorAreaVisible
Hides a fast view The view shrinks equally code steps code times before disappearing completely private void hide Fast View I View Reference ref int steps set Fast View Icon Selection ref false Note We always do at least one step of the animation Note This doesn t take into account the overhead of doing if ref active Fast View save Fast View Width Ratio fast View Pane hide View  hideFastView IViewReference setFastViewIconSelection activeFastView saveFastViewWidthRatio fastViewPane hideView
Hides the fast view sash for zooming in a fast view void hide Fast View Sash fast View Pane hide Fast View Sash  hideFastViewSash fastViewPane hideFastViewSash
public boolean hide View I View Reference ref If the view is locked just return View Pane pane get Pane ref Remove the view from the current presentation if is Fast View ref fast Views remove ref if pane null pane set Fast false force an update of the toolbar if active Fast View ref set Active Fast View null if pane null pane get Control set Enabled true else presentation remove Part pane Dispose view if ref count 0 get View Factory release View ref return true  hideView IViewReference ViewPane getPane isFastView fastViews setFast activeFastView setActiveFastView getControl setEnabled removePart getViewFactory releaseView
Return whether the editor area is visible or not protected boolean is Editor Area Visible return editor Holder null  isEditorAreaVisible editorHolder
Returns true if a view is fast public boolean is Fast View I View Reference ref return fast Views contains ref  isFastView IViewReference fastViews
Returns the view layout rec for the given view reference or null if not found If create is true it creates the record if not already created private View Layout Rec get View Layout Rec I View Reference ref boolean create return get View Layout Rec View Factory get Key ref create  ViewLayoutRec getViewLayoutRec IViewReference getViewLayoutRec ViewFactory getKey
Returns the view layout record for the given view id or null if not found If create is true it creates the record if not already created private View Layout Rec get View Layout Rec String view Id boolean create View Layout Rec rec View Layout Rec mapI Dto View Layout Rec get view Id if rec null create rec new View Layout Rec mapI Dto View Layout Rec put view Id rec return rec  ViewLayoutRec getViewLayoutRec viewId ViewLayoutRec ViewLayoutRec mapIDtoViewLayoutRec viewId ViewLayoutRec mapIDtoViewLayoutRec viewId
Returns true if a layout or perspective is fixed public boolean is Fixed Layout issue is there a difference between a fixed layout and a fixed perspective If not the API may need some polish Workbench Page Page Layout and Perspective all have is Fixed methods Page Layout and Perspective have their own fixed attribute we are assuming they are always in sync Workbench Page delegates to the perspective return fixed  isFixedLayout WorkbenchPage PageLayout isFixed PageLayout WorkbenchPage
Returns true if a view is standalone since 3 0 public boolean is Standalone View I View Reference ref View Layout Rec rec get View Layout Rec ref false return rec null rec is Standalone  isStandaloneView IViewReference ViewLayoutRec getViewLayoutRec isStandalone
Returns whether the title for a view should be shown This applies only to standalone views since 3 0 public boolean get Show Title View I View Reference ref View Layout Rec rec get View Layout Rec ref false return rec null rec show Title  getShowTitleView IViewReference ViewLayoutRec getViewLayoutRec showTitle
Creates a new presentation from a persistence file Note This method should not modify the current state of the perspective private void load Custom Persp Perspective Descriptor persp get the layout from the registry Perspective Registry persp Registry Perspective Registry Workbench Plugin get Default get Perspective Registry try I Memento memento persp Registry get Custom Persp persp get Id Restore the layout state Multi Status status new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages format Perspective unable To Restore Perspective new String persp get Label NON NLS 1 null status merge restore State memento status merge restore State if status get Severity I Status OK unable To Open Perspective persp status catch IO Exception e unable To Open Perspective persp null catch Workbench Exception e unable To Open Perspective persp e get Status  loadCustomPersp PerspectiveDescriptor PerspectiveRegistry perspRegistry PerspectiveRegistry WorkbenchPlugin getDefault getPerspectiveRegistry IMemento perspRegistry getCustomPersp getId MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages unableToRestorePerspective getLabel restoreState restoreState getSeverity IStatus unableToOpenPerspective IOException unableToOpenPerspective WorkbenchException unableToOpenPerspective getStatus
private void unable To Open Perspective Perspective Descriptor persp I Status status Perspective Registry persp Registry Perspective Registry Workbench Plugin get Default get Perspective Registry persp Registry delete Perspective persp If this is a predefined perspective we will not be able to delete the perspective we wouldn t want to But make sure to delete the customized portion persp delete Custom Definition String title Workbench Messages get String Perspective problem Restoring Title NON NLS 1 String msg Workbench Messages get String Perspective error Reading State NON NLS 1 if status null Message Dialog open Error Shell null title msg else Error Dialog open Error Shell null title msg status  unableToOpenPerspective PerspectiveDescriptor IStatus PerspectiveRegistry perspRegistry PerspectiveRegistry WorkbenchPlugin getDefault getPerspectiveRegistry perspRegistry deletePerspective deleteCustomDefinition WorkbenchMessages getString problemRestoringTitle WorkbenchMessages getString errorReadingState MessageDialog openError ErrorDialog openError
Create a presentation for a perspective Note This method should not modify the current state of the perspective private void load Predefined Persp Perspective Descriptor persp throws Workbench Exception Create layout engine I Perspective Factory factory null try factory persp create Factory catch Core Exception e throw new Workbench Exception Workbench Messages format Perspective unable To Load new Object persp get Id NON NLS 1 Create layout factory View Sash Container container new View Sash Container page Page Layout layout new Page Layout container get View Factory editor Area descriptor layout set Fixed descriptor get Fixed add the placeholders for the sticky folders and their contents I Placeholder Folder Layout sticky Folder Right null sticky Folder Left null sticky Folder Top null sticky Folder Bottom null I Sticky View Descriptor descs Workbench Plugin get Default get View Registry get Sticky Views for int i 0 i descs length i I Sticky View Descriptor sticky View Descriptor descs i String id sticky View Descriptor get Id switch sticky View Descriptor get Location case I Page Layout RIGHT if sticky Folder Right null sticky Folder Right layout create Placeholder Folder I Sticky View Descriptor STICKY FOLDER RIGHT I Page Layout RIGHT 75f I Page Layout ID EDITOR AREA sticky Folder Right add Placeholder id break case I Page Layout LEFT if sticky Folder Left null sticky Folder Left layout create Placeholder Folder I Sticky View Descriptor STICKY FOLDER LEFT I Page Layout LEFT 25f I Page Layout ID EDITOR AREA sticky Folder Left add Placeholder id break case I Page Layout TOP if sticky Folder Top null sticky Folder Top layout create Placeholder Folder I Sticky View Descriptor STICKY FOLDER TOP I Page Layout TOP 25f I Page Layout ID EDITOR AREA sticky Folder Top add Placeholder id break case I Page Layout BOTTOM if sticky Folder Bottom null sticky Folder Bottom layout create Placeholder Folder I Sticky View Descriptor STICKY FOLDER BOTTOM I Page Layout BOTTOM 75f I Page Layout ID EDITOR AREA sticky Folder Bottom add Placeholder id break should never be null as we ve just added the view above I View Layout view Layout layout get View Layout id view Layout set Closeable sticky View Descriptor is Closeable view Layout set Moveable sticky View Descriptor is Moveable Run layout engine factory create Initial Layout layout Perspective Extension Reader extender new Perspective Extension Reader extender extend Layout descriptor get Id layout Retrieve view layout info stored in the page layout mapI Dto View Layout Rec put All layout getI Dto View Layout Rec Map Create action sets create Initial Action Sets layout get Action Sets always On Action Sets add All visible Action Sets new Wizard Action Ids layout get New Wizard Action Ids show View Action Ids layout get Show View Action Ids perspective Action Ids layout get Perspective Action Ids show In Part Ids layout get Show In Part Ids Retrieve fast views fast Views layout get Fast Views Is the layout fixed fixed layout is Fixed Create presentation presentation new Perspective Helper page container Hide editor area if requested by factory if layout is Editor Area Visible hide Editor Area  loadPredefinedPersp PerspectiveDescriptor WorkbenchException IPerspectiveFactory createFactory CoreException WorkbenchException WorkbenchMessages unableToLoad getId ViewSashContainer ViewSashContainer PageLayout PageLayout getViewFactory editorArea setFixed getFixed IPlaceholderFolderLayout stickyFolderRight stickyFolderLeft stickyFolderTop stickyFolderBottom IStickyViewDescriptor WorkbenchPlugin getDefault getViewRegistry getStickyViews IStickyViewDescriptor stickyViewDescriptor stickyViewDescriptor getId stickyViewDescriptor getLocation IPageLayout stickyFolderRight stickyFolderRight createPlaceholderFolder IStickyViewDescriptor STICKY_FOLDER_RIGHT IPageLayout IPageLayout ID_EDITOR_AREA stickyFolderRight addPlaceholder IPageLayout stickyFolderLeft stickyFolderLeft createPlaceholderFolder IStickyViewDescriptor STICKY_FOLDER_LEFT IPageLayout IPageLayout ID_EDITOR_AREA stickyFolderLeft addPlaceholder IPageLayout stickyFolderTop stickyFolderTop createPlaceholderFolder IStickyViewDescriptor STICKY_FOLDER_TOP IPageLayout IPageLayout ID_EDITOR_AREA stickyFolderTop addPlaceholder IPageLayout stickyFolderBottom stickyFolderBottom createPlaceholderFolder IStickyViewDescriptor STICKY_FOLDER_BOTTOM IPageLayout IPageLayout ID_EDITOR_AREA stickyFolderBottom addPlaceholder IViewLayout viewLayout getViewLayout viewLayout setCloseable stickyViewDescriptor isCloseable viewLayout setMoveable stickyViewDescriptor isMoveable createInitialLayout PerspectiveExtensionReader PerspectiveExtensionReader extendLayout getId mapIDtoViewLayoutRec putAll getIDtoViewLayoutRecMap createInitialActionSets getActionSets alwaysOnActionSets addAll visibleActionSets newWizardActionIds getNewWizardActionIds showViewActionIds getShowViewActionIds perspectiveActionIds getPerspectiveActionIds showInPartIds getShowInPartIds fastViews getFastViews isFixed PerspectiveHelper isEditorAreaVisible hideEditorArea
activate protected void on Activate Update editor area state if editor Area get Control null if is Editor Area Visible Enable the editor area now that it will be made visible and can accept keyboard focus again editor Area get Control set Enabled true set Editor Area Visible true else Disable the entire editor area so if an editor had keyboard focus it will let it go editor Area get Control set Enabled false set Editor Area Visible false Update fast views Make sure the control for the fastviews are create so they can be activated for int i 0 i fast Views size i View Pane pane get Pane I View Reference fast Views get i if pane null Control ctrl pane get Control if ctrl null pane create Control get Client Composite ctrl pane get Control ctrl set Enabled false Remove focus support set All Pins Visible true presentation activate get Client Composite if should Hide Editors On Activate We do this here to ensure that create Part Control is called on the top editor before it is hidden See bug 20166 hide Editor Area should Hide Editors On Activate false  onActivate editorArea getControl isEditorAreaVisible editorArea getControl setEnabled setEditorAreaVisible editorArea getControl setEnabled setEditorAreaVisible fastViews ViewPane getPane IViewReference fastViews getControl createControl getClientComposite getControl setEnabled setAllPinsVisible getClientComposite shouldHideEditorsOnActivate createPartControl hideEditorArea shouldHideEditorsOnActivate
deactivate protected void on Deactivate presentation deactivate set Active Fast View null set All Pins Visible false Update fast views for int i 0 i fast Views size i View Pane pane get Pane I View Reference fast Views get i if pane null Control ctrl pane get Control if ctrl null ctrl set Enabled true Add focus support  onDeactivate setActiveFastView setAllPinsVisible fastViews ViewPane getPane IViewReference fastViews getControl setEnabled
Notifies that a part has been activated public void part Activated I Workbench Part active Part If a fastview is open close it if active Fast View null active Fast View get Part false active Part set Active Fast View null  partActivated IWorkbenchPart activePart activeFastView activeFastView getPart activePart setActiveFastView
The user successfully performed a Show In action on the specified part Update the history public void performed Show In String part Id show In Times put part Id new Long System current Time Millis  performedShowIn partId showInTimes partId currentTimeMillis
Sets the fast view attribute Note The page is expected to update action bars public void remove Fast View I View Reference ref View Pane pane get Pane ref if is Fast View ref if active Fast View ref set Active Fast View null fast Views remove ref pane set Fast false Control ctrl pane get Control if ctrl null ctrl set Enabled true Modify focus support We are disabling the pane because it will be enabled when it is added to the presentation When a pane is enabled a drop listener is added to it and we do not want to have multiple listeners for a pane presentation add Part pane  removeFastView IViewReference ViewPane getPane isFastView activeFastView setActiveFastView fastViews setFast getControl setEnabled addPart
Fills a presentation with layout data Note This method should not modify the current state of the perspective public I Status restore State I Memento memento Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Perspective problems Restoring Perspective null NON NLS 1 Create persp descriptor descriptor new Perspective Descriptor null null null result add descriptor restore State memento Perspective Descriptor desc Perspective Descriptor Workbench Plugin get Default get Perspective Registry find Perspective With Id descriptor get Id if desc null descriptor desc this memento memento Add the visible views I Memento views memento get Children I Workbench Constants TAG VIEW result merge create References views memento memento get Child I Workbench Constants TAG FAST VIEWS if memento null views memento get Children I Workbench Constants TAG VIEW result merge create References views return result  IStatus restoreState IMemento MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString problemsRestoringPerspective PerspectiveDescriptor restoreState PerspectiveDescriptor PerspectiveDescriptor WorkbenchPlugin getDefault getPerspectiveRegistry findPerspectiveWithId getId IMemento getChildren IWorkbenchConstants TAG_VIEW createReferences getChild IWorkbenchConstants TAG_FAST_VIEWS getChildren IWorkbenchConstants TAG_VIEW createReferences
private I Status create References I Memento views Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Perspective problems Restoring Views null NON NLS 1 for int x 0 x views length x Get the view details I Memento child Mem views x String id child Mem get String I Workbench Constants TAG ID skip creation of the intro reference it s handled elsewhere if id equals I Intro Constants INTRO VIEW ID continue String secondary Id View Factory extract Secondary Id id if secondary Id null id View Factory extract Primary Id id Create and open the view try if true equals child Mem get String I Workbench Constants TAG REMOVED NON NLS 1 view Factory create View id secondary Id catch Part Init Exception e child Mem put String I Workbench Constants TAG REMOVED true NON NLS 1 result add Status Util new Status I Status ERROR e get Message null e get Message NON NLS 1 e return result  IStatus createReferences IMemento MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString problemsRestoringViews IMemento childMem childMem getString IWorkbenchConstants TAG_ID IIntroConstants INTRO_VIEW_ID secondaryId ViewFactory extractSecondaryId secondaryId ViewFactory extractPrimaryId childMem getString IWorkbenchConstants TAG_REMOVED viewFactory createView secondaryId PartInitException childMem putString IWorkbenchConstants TAG_REMOVED StatusUtil newStatus IStatus getMessage getMessage
Fills a presentation with layout data Note This method should not modify the current state of the perspective public I Status restore State if this memento null return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1 Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Perspective problems Restoring Perspective null NON NLS 1 I Memento memento this memento this memento null I Memento bounds Mem memento get Child I Workbench Constants TAG WINDOW if bounds Mem null Rectangle r new Rectangle 0 0 0 0 r x bounds Mem get Integer I Workbench Constants TAG X int Value r y bounds Mem get Integer I Workbench Constants TAG Y int Value r height bounds Mem get Integer I Workbench Constants TAG HEIGHT int Value r width bounds Mem get Integer I Workbench Constants TAG WIDTH int Value if page get Workbench Window get Pages length 0 page get Workbench Window get Shell set Bounds r Create an empty presentation View Sash Container main Layout new View Sash Container page Perspective Helper pres new Perspective Helper page main Layout Read the layout result merge pres restore State memento get Child I Workbench Constants TAG LAYOUT Add the editor workbook Do not hide it now pres replace Placeholder With Part editor Area Add the visible views I Memento views memento get Children I Workbench Constants TAG VIEW for int x 0 x views length x Get the view details I Memento child Mem views x String id child Mem get String I Workbench Constants TAG ID String secondary Id View Factory extract Secondary Id id if secondary Id null id View Factory extract Primary Id id skip the intro as it is restored higher up in workbench if id equals I Intro Constants INTRO VIEW ID continue Create and open the view I View Reference view Ref view Factory get View id secondary Id Workbench Part Reference ref Workbench Part Reference view Ref report error if ref null String key View Factory get Key id secondary Id result add new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format Perspective could Not Find NON NLS 1 new String key null continue if ref get Pane null View Pane vp new View Pane view Ref page ref set Pane vp page add Part ref boolean will Part Be Visible pres will Part Be Visible ref get Id secondary Id if will Part Be Visible I Status restore Status view Factory restore View view Ref result add restore Status if restore Status get Severity I Status OK I View Part view I View Part ref get Part true if view null View Site site View Site view get Site View Pane pane View Pane site get Pane pres replace Placeholder With Part pane else page remove Part ref else pres replace Placeholder With Part ref get Pane Load the fast views I Memento fast Views Mem memento get Child I Workbench Constants TAG FAST VIEWS if fast Views Mem null views fast Views Mem get Children I Workbench Constants TAG VIEW for int x 0 x views length x Get the view details I Memento child Mem views x String viewID child Mem get String I Workbench Constants TAG ID String secondary Id View Factory extract Secondary Id viewID if secondary Id null viewID View Factory extract Primary Id viewID I View Reference view Ref view Factory get View viewID secondary Id Workbench Part Reference ref Workbench Part Reference view Ref if ref null String key View Factory get Key viewID secondary Id Workbench Plugin log Could not create view key NON NLS 1 NON NLS 2 result add new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format Perspective could Not Find new String key NON NLS 1 null continue Restore fast view width ratio Float ratio child Mem get Float I Workbench Constants TAG RATIO if ratio null Integer view Width child Mem get Integer I Workbench Constants TAG WIDTH if view Width null ratio new Float I Page Layout DEFAULT FASTVIEW RATIO else ratio new Float float view Width int Value float get Client Composite get Size x View Layout Rec rec get View Layout Rec view Ref true rec fast View Width Ratio ratio float Value Add to fast view list because creating a view pane will come back to check if its a fast view We really need to clean up this code fast Views add ref if ref get Pane null ref set Pane new View Pane view Ref page page add Part ref Load the view layout recs I Memento rec Mementos memento get Children I Workbench Constants TAG VIEW LAYOUT REC for int i 0 i rec Mementos length i I Memento rec Memento rec Mementos i String compound Id rec Memento get String I Workbench Constants TAG ID if compound Id null View Layout Rec rec get View Layout Rec compound Id true if I Workbench Constants FALSE equals rec Memento get String I Workbench Constants TAG CLOSEABLE rec is Closeable false if I Workbench Constants FALSE equals rec Memento get String I Workbench Constants TAG MOVEABLE rec is Moveable false if I Workbench Constants TRUE equals rec Memento get String I Workbench Constants TAG STANDALONE rec is Standalone true rec show Title I Workbench Constants FALSE equals rec Memento get String I Workbench Constants TAG SHOW TITLE Hash Set known Action Set Ids new Hash Set Load the action sets I Memento actions memento get Children I Workbench Constants TAG ACTION SET Array List actions Array new Array List actions length for int x 0 x actions length x String action SetID actions x get String I Workbench Constants TAG ID actions Array add action SetID known Action Set Ids add action SetID create Initial Action Sets actions Array Load the always on action sets actions memento get Children I Workbench Constants TAG ALWAYS ON ACTION SET for int x 0 x actions length x String action SetID actions x get String I Workbench Constants TAG ID I Action Set Descriptor d Workbench Plugin get Default get Action Set Registry find Action Set action SetID if d null always On Action Sets add d known Action Set Ids add action SetID Load the always off action sets actions memento get Children I Workbench Constants TAG ALWAYS OFF ACTION SET for int x 0 x actions length x String action SetID actions x get String I Workbench Constants TAG ID I Action Set Descriptor d Workbench Plugin get Default get Action Set Registry find Action Set action SetID if d null always Off Action Sets add d known Action Set Ids add action SetID Load show view actions actions memento get Children I Workbench Constants TAG SHOW VIEW ACTION show View Action Ids new Array List actions length for int x 0 x actions length x String id actions x get String I Workbench Constants TAG ID show View Action Ids add id Load show in times actions memento get Children I Workbench Constants TAG SHOW IN TIME for int x 0 x actions length x String id actions x get String I Workbench Constants TAG ID String time Str actions x get String I Workbench Constants TAG TIME if id null time Str null try long time Long parse Long time Str show In Times put id new Long time catch Number Format Exception e skip this one Load show in parts from registry not memento show In Part Ids get Show In Ids From Registry Load new wizard actions actions memento get Children I Workbench Constants TAG NEW WIZARD ACTION new Wizard Action Ids new Array List actions length for int x 0 x actions length x String id actions x get String I Workbench Constants TAG ID new Wizard Action Ids add id Load perspective actions actions memento get Children I Workbench Constants TAG PERSPECTIVE ACTION perspective Action Ids new Array List actions length for int x 0 x actions length x String id actions x get String I Workbench Constants TAG ID perspective Action Ids add id Array List ext Action Sets get Perspective Extension Action Sets for int i 0 i ext Action Sets size i String action SetID String ext Action Sets get i if known Action Set Ids contains action SetID continue I Action Set Descriptor d Workbench Plugin get Default get Action Set Registry find Action Set action SetID if d null always On Action Sets add d visible Action Sets add d You don t need to add this action set id to the list of known Action Set Ids The next thing we do is to add all visible Action Sets to the list of known Action Set Ids Add the visible set of action sets to our known Action Set Ids for int i 0 i visible Action Sets size i I Action Set Descriptor desc I Action Set Descriptor visible Action Sets get i if desc null known Action Set Ids add desc get Id Now go through the registry to ensure we pick up any new action sets that have been added but not yet considered by this perspective Action Set Registry reg Workbench Plugin get Default get Action Set Registry I Action Set Descriptor array reg get Action Sets int count array length for int i 0 i count i I Action Set Descriptor desc array i if known Action Set Ids contains desc get Id desc is Initially Visible add Action Set desc Save presentation presentation pres Hide the editor area if needed Need to wait for the presentation to be fully setup first Integer area Visible memento get Integer I Workbench Constants TAG AREA VISIBLE Rather than hiding the editors now we must wait until after their controls are created Th IStatus restoreState IStatus PLUGIN_ID MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString problemsRestoringPerspective IMemento IMemento boundsMem getChild IWorkbenchConstants TAG_WINDOW boundsMem boundsMem getInteger IWorkbenchConstants TAG_X intValue boundsMem getInteger IWorkbenchConstants TAG_Y intValue boundsMem getInteger IWorkbenchConstants TAG_HEIGHT intValue boundsMem getInteger IWorkbenchConstants TAG_WIDTH intValue getWorkbenchWindow getPages getWorkbenchWindow getShell setBounds ViewSashContainer mainLayout ViewSashContainer PerspectiveHelper PerspectiveHelper mainLayout restoreState getChild IWorkbenchConstants TAG_LAYOUT replacePlaceholderWithPart editorArea IMemento getChildren IWorkbenchConstants TAG_VIEW IMemento childMem childMem getString IWorkbenchConstants TAG_ID secondaryId ViewFactory extractSecondaryId secondaryId ViewFactory extractPrimaryId IIntroConstants INTRO_VIEW_ID IViewReference viewRef viewFactory getView secondaryId WorkbenchPartReference WorkbenchPartReference viewRef ViewFactory getKey secondaryId IStatus PLUGIN_ID WorkbenchMessages couldNotFind getPane ViewPane ViewPane viewRef setPane addPart willPartBeVisible willPartBeVisible getId secondaryId willPartBeVisible IStatus restoreStatus viewFactory restoreView viewRef restoreStatus restoreStatus getSeverity IStatus IViewPart IViewPart getPart ViewSite ViewSite getSite ViewPane ViewPane getPane replacePlaceholderWithPart removePart replacePlaceholderWithPart getPane IMemento fastViewsMem getChild IWorkbenchConstants TAG_FAST_VIEWS fastViewsMem fastViewsMem getChildren IWorkbenchConstants TAG_VIEW IMemento childMem childMem getString IWorkbenchConstants TAG_ID secondaryId ViewFactory extractSecondaryId secondaryId ViewFactory extractPrimaryId IViewReference viewRef viewFactory getView secondaryId WorkbenchPartReference WorkbenchPartReference viewRef ViewFactory getKey secondaryId WorkbenchPlugin IStatus PLUGIN_ID WorkbenchMessages couldNotFind childMem getFloat IWorkbenchConstants TAG_RATIO viewWidth childMem getInteger IWorkbenchConstants TAG_WIDTH viewWidth IPageLayout DEFAULT_FASTVIEW_RATIO viewWidth intValue getClientComposite getSize ViewLayoutRec getViewLayoutRec viewRef fastViewWidthRatio floatValue fastViews getPane setPane ViewPane viewRef addPart IMemento recMementos getChildren IWorkbenchConstants TAG_VIEW_LAYOUT_REC recMementos IMemento recMemento recMementos compoundId recMemento getString IWorkbenchConstants TAG_ID compoundId ViewLayoutRec getViewLayoutRec compoundId IWorkbenchConstants recMemento getString IWorkbenchConstants TAG_CLOSEABLE isCloseable IWorkbenchConstants recMemento getString IWorkbenchConstants TAG_MOVEABLE isMoveable IWorkbenchConstants recMemento getString IWorkbenchConstants TAG_STANDALONE isStandalone showTitle IWorkbenchConstants recMemento getString IWorkbenchConstants TAG_SHOW_TITLE HashSet knownActionSetIds HashSet IMemento getChildren IWorkbenchConstants TAG_ACTION_SET ArrayList actionsArray ArrayList actionSetID getString IWorkbenchConstants TAG_ID actionsArray actionSetID knownActionSetIds actionSetID createInitialActionSets actionsArray getChildren IWorkbenchConstants TAG_ALWAYS_ON_ACTION_SET actionSetID getString IWorkbenchConstants TAG_ID IActionSetDescriptor WorkbenchPlugin getDefault getActionSetRegistry findActionSet actionSetID alwaysOnActionSets knownActionSetIds actionSetID getChildren IWorkbenchConstants TAG_ALWAYS_OFF_ACTION_SET actionSetID getString IWorkbenchConstants TAG_ID IActionSetDescriptor WorkbenchPlugin getDefault getActionSetRegistry findActionSet actionSetID alwaysOffActionSets knownActionSetIds actionSetID getChildren IWorkbenchConstants TAG_SHOW_VIEW_ACTION showViewActionIds ArrayList getString IWorkbenchConstants TAG_ID showViewActionIds getChildren IWorkbenchConstants TAG_SHOW_IN_TIME getString IWorkbenchConstants TAG_ID timeStr getString IWorkbenchConstants TAG_TIME timeStr parseLong timeStr showInTimes NumberFormatException showInPartIds getShowInIdsFromRegistry getChildren IWorkbenchConstants TAG_NEW_WIZARD_ACTION newWizardActionIds ArrayList getString IWorkbenchConstants TAG_ID newWizardActionIds getChildren IWorkbenchConstants TAG_PERSPECTIVE_ACTION perspectiveActionIds ArrayList getString IWorkbenchConstants TAG_ID perspectiveActionIds ArrayList extActionSets getPerspectiveExtensionActionSets extActionSets actionSetID extActionSets knownActionSetIds actionSetID IActionSetDescriptor WorkbenchPlugin getDefault getActionSetRegistry findActionSet actionSetID alwaysOnActionSets visibleActionSets knownActionSetIds visibleActionSets knownActionSetIds knownActionSetIds visibleActionSets IActionSetDescriptor IActionSetDescriptor visibleActionSets knownActionSetIds getId ActionSetRegistry WorkbenchPlugin getDefault getActionSetRegistry IActionSetDescriptor getActionSets IActionSetDescriptor knownActionSetIds getId isInitiallyVisible addActionSet areaVisible getInteger IWorkbenchConstants TAG_AREA_VISIBLE
Returns the Action Sets read from perspective Extensions in the registry private Array List get Perspective Extension Action Sets Perspective Extension Reader reader new Perspective Extension Reader reader set Include Only Tags new String Perspective Extension Reader TAG ACTION SET Page Layout layout new Page Layout reader extend Layout descriptor get Original Id layout return layout get Action Sets  ActionSets perspectiveExtensions ArrayList getPerspectiveExtensionActionSets PerspectiveExtensionReader PerspectiveExtensionReader setIncludeOnlyTags PerspectiveExtensionReader TAG_ACTION_SET PageLayout PageLayout extendLayout getOriginalId getActionSets
Returns the Show In part ids read from the registry private Array List get Show In Ids From Registry Perspective Extension Reader reader new Perspective Extension Reader reader set Include Only Tags new String Perspective Extension Reader TAG SHOW IN PART Page Layout layout new Page Layout reader extend Layout descriptor get Original Id layout return layout get Show In Part Ids  ArrayList getShowInIdsFromRegistry PerspectiveExtensionReader PerspectiveExtensionReader setIncludeOnlyTags PerspectiveExtensionReader TAG_SHOW_IN_PART PageLayout PageLayout extendLayout getOriginalId getShowInPartIds
Save the layout public void save Desc save Desc As descriptor  saveDesc saveDescAs
Save the layout public void save Desc As I Perspective Descriptor desc Perspective Descriptor real Desc Perspective Descriptor desc get the layout from the registry Perspective Registry persp Registry Perspective Registry Workbench Plugin get Default get Perspective Registry Capture the layout state XML Memento memento XML Memento create Write Root perspective NON NLS 1 I Status status save State memento real Desc false if status get Severity I Status ERROR Error Dialog open Error Shell null Workbench Messages get String Perspective problem Saving Title NON NLS 1 Workbench Messages get String Perspective problem Saving Message NON NLS 1 status return save it to the preference store try persp Registry save Custom Persp real Desc memento descriptor real Desc catch IO Exception e persp Registry delete Perspective real Desc Message Dialog open Error Shell null Workbench Messages get String Perspective problem Saving Title NON NLS 1 Workbench Messages get String Perspective problem Saving Message NON NLS 1  saveDescAs IPerspectiveDescriptor PerspectiveDescriptor realDesc PerspectiveDescriptor PerspectiveRegistry perspRegistry PerspectiveRegistry WorkbenchPlugin getDefault getPerspectiveRegistry XMLMemento XMLMemento createWriteRoot IStatus saveState realDesc getSeverity IStatus ErrorDialog openError WorkbenchMessages getString problemSavingTitle WorkbenchMessages getString problemSavingMessage perspRegistry saveCustomPersp realDesc realDesc IOException perspRegistry deletePerspective realDesc MessageDialog openError WorkbenchMessages getString problemSavingTitle WorkbenchMessages getString problemSavingMessage
Save the layout public I Status save State I Memento memento Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Perspective problems Saving Perspective null NON NLS 1 result merge save State memento descriptor true return result  IStatus saveState IMemento MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString problemsSavingPerspective saveState
Save the layout private I Status save State I Memento memento Perspective Descriptor p boolean save Inner View State Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Perspective problems Saving Perspective null NON NLS 1 if this memento null memento put Memento this memento return result Save the version number memento put String I Workbench Constants TAG VERSION VERSION STRING result add p save State memento if save Inner View State Rectangle bounds page get Workbench Window get Shell get Bounds I Memento bounds Mem memento create Child I Workbench Constants TAG WINDOW bounds Mem put Integer I Workbench Constants TAG X bounds x bounds Mem put Integer I Workbench Constants TAG Y bounds y bounds Mem put Integer I Workbench Constants TAG HEIGHT bounds height bounds Mem put Integer I Workbench Constants TAG WIDTH bounds width Save the visible action sets Iterator enum visible Action Sets iterator while enum has Next I Action Set Descriptor desc I Action Set Descriptor enum next I Memento child memento create Child I Workbench Constants TAG ACTION SET child put String I Workbench Constants TAG ID desc get Id Save the always on action sets enum always On Action Sets iterator while enum has Next I Action Set Descriptor desc I Action Set Descriptor enum next I Memento child memento create Child I Workbench Constants TAG ALWAYS ON ACTION SET child put String I Workbench Constants TAG ID desc get Id Save the always off action sets enum always Off Action Sets iterator while enum has Next I Action Set Descriptor desc I Action Set Descriptor enum next I Memento child memento create Child I Workbench Constants TAG ALWAYS OFF ACTION SET child put String I Workbench Constants TAG ID desc get Id Save show view actions enum show View Action Ids iterator while enum has Next String str String enum next I Memento child memento create Child I Workbench Constants TAG SHOW VIEW ACTION child put String I Workbench Constants TAG ID str Save show in times enum show In Times key Set iterator while enum has Next String id String enum next Long time Long show In Times get id I Memento child memento create Child I Workbench Constants TAG SHOW IN TIME child put String I Workbench Constants TAG ID id child put String I Workbench Constants TAG TIME time to String Save new wizard actions enum new Wizard Action Ids iterator while enum has Next String str String enum next I Memento child memento create Child I Workbench Constants TAG NEW WIZARD ACTION child put String I Workbench Constants TAG ID str Save perspective actions enum perspective Action Ids iterator while enum has Next String str String enum next I Memento child memento create Child I Workbench Constants TAG PERSPECTIVE ACTION child put String I Workbench Constants TAG ID str Get visible views List view Panes new Array List 5 presentation collect View Panes view Panes Save the views enum view Panes iterator int errors 0 while enum has Next View Pane pane View Pane enum next I View Reference ref pane get View Reference I Memento view Memento memento create Child I Workbench Constants TAG VIEW view Memento put String I Workbench Constants TAG ID View Factory get Key ref if fast Views size 0 I Memento child Mem memento create Child I Workbench Constants TAG FAST VIEWS enum fast Views iterator while enum has Next I View Reference ref I View Reference enum next I Memento view Memento child Mem create Child I Workbench Constants TAG VIEW String id View Factory get Key ref view Memento put String I Workbench Constants TAG ID id float ratio get Fast View Width Ratio id view Memento put Float I Workbench Constants TAG RATIO ratio Save the view layout recs for Iterator i mapI Dto View Layout Rec key Set iterator i has Next String compound Id String i next View Layout Rec rec View Layout Rec mapI Dto View Layout Rec get compound Id if rec null rec is Closeable rec is Moveable rec is Standalone I Memento layout Memento memento create Child I Workbench Constants TAG VIEW LAYOUT REC layout Memento put String I Workbench Constants TAG ID compound Id if rec is Closeable layout Memento put String I Workbench Constants TAG CLOSEABLE I Workbench Constants FALSE if rec is Moveable layout Memento put String I Workbench Constants TAG MOVEABLE I Workbench Constants FALSE if rec is Standalone layout Memento put String I Workbench Constants TAG STANDALONE I Workbench Constants TRUE layout Memento put String I Workbench Constants TAG SHOW TITLE Boolean to String rec show Title if errors 0 String message Workbench Messages get String Perspective multiple Errors NON NLS 1 if errors 1 message Workbench Messages get String Perspective one Error NON NLS 1 Message Dialog open Error null Workbench Messages get String Error message NON NLS 1 Save the layout I Memento child Mem memento create Child I Workbench Constants TAG LAYOUT result add presentation save State child Mem Save the editor visibility state if is Editor Area Visible memento put Integer I Workbench Constants TAG AREA VISIBLE 1 else memento put Integer I Workbench Constants TAG AREA VISIBLE 0 Save the fixed state if fixed memento put Integer I Workbench Constants TAG FIXED 1 else memento put Integer I Workbench Constants TAG FIXED 0 return result  IStatus saveState IMemento PerspectiveDescriptor saveInnerViewState MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString problemsSavingPerspective putMemento putString IWorkbenchConstants TAG_VERSION VERSION_STRING saveState saveInnerViewState getWorkbenchWindow getShell getBounds IMemento boundsMem createChild IWorkbenchConstants TAG_WINDOW boundsMem putInteger IWorkbenchConstants TAG_X boundsMem putInteger IWorkbenchConstants TAG_Y boundsMem putInteger IWorkbenchConstants TAG_HEIGHT boundsMem putInteger IWorkbenchConstants TAG_WIDTH visibleActionSets hasNext IActionSetDescriptor IActionSetDescriptor IMemento createChild IWorkbenchConstants TAG_ACTION_SET putString IWorkbenchConstants TAG_ID getId alwaysOnActionSets hasNext IActionSetDescriptor IActionSetDescriptor IMemento createChild IWorkbenchConstants TAG_ALWAYS_ON_ACTION_SET putString IWorkbenchConstants TAG_ID getId alwaysOffActionSets hasNext IActionSetDescriptor IActionSetDescriptor IMemento createChild IWorkbenchConstants TAG_ALWAYS_OFF_ACTION_SET putString IWorkbenchConstants TAG_ID getId showViewActionIds hasNext IMemento createChild IWorkbenchConstants TAG_SHOW_VIEW_ACTION putString IWorkbenchConstants TAG_ID showInTimes keySet hasNext showInTimes IMemento createChild IWorkbenchConstants TAG_SHOW_IN_TIME putString IWorkbenchConstants TAG_ID putString IWorkbenchConstants TAG_TIME toString newWizardActionIds hasNext IMemento createChild IWorkbenchConstants TAG_NEW_WIZARD_ACTION putString IWorkbenchConstants TAG_ID perspectiveActionIds hasNext IMemento createChild IWorkbenchConstants TAG_PERSPECTIVE_ACTION putString IWorkbenchConstants TAG_ID viewPanes ArrayList collectViewPanes viewPanes viewPanes hasNext ViewPane ViewPane IViewReference getViewReference IMemento viewMemento createChild IWorkbenchConstants TAG_VIEW viewMemento putString IWorkbenchConstants TAG_ID ViewFactory getKey fastViews IMemento childMem createChild IWorkbenchConstants TAG_FAST_VIEWS fastViews hasNext IViewReference IViewReference IMemento viewMemento childMem createChild IWorkbenchConstants TAG_VIEW ViewFactory getKey viewMemento putString IWorkbenchConstants TAG_ID getFastViewWidthRatio viewMemento putFloat IWorkbenchConstants TAG_RATIO mapIDtoViewLayoutRec keySet hasNext compoundId ViewLayoutRec ViewLayoutRec mapIDtoViewLayoutRec compoundId isCloseable isMoveable isStandalone IMemento layoutMemento createChild IWorkbenchConstants TAG_VIEW_LAYOUT_REC layoutMemento putString IWorkbenchConstants TAG_ID compoundId isCloseable layoutMemento putString IWorkbenchConstants TAG_CLOSEABLE IWorkbenchConstants isMoveable layoutMemento putString IWorkbenchConstants TAG_MOVEABLE IWorkbenchConstants isStandalone layoutMemento putString IWorkbenchConstants TAG_STANDALONE IWorkbenchConstants layoutMemento putString IWorkbenchConstants TAG_SHOW_TITLE toString showTitle WorkbenchMessages getString multipleErrors WorkbenchMessages getString oneError MessageDialog openError WorkbenchMessages getString IMemento childMem createChild IWorkbenchConstants TAG_LAYOUT saveState childMem isEditorAreaVisible putInteger IWorkbenchConstants TAG_AREA_VISIBLE putInteger IWorkbenchConstants TAG_AREA_VISIBLE putInteger IWorkbenchConstants TAG_FIXED putInteger IWorkbenchConstants TAG_FIXED
Sets the visible action sets Note The page is expected to update action bars public void set Action Sets I Action Set Descriptor new Array We assume that changes to action set visibilty should be remembered and not reversed as parts are activated Array List turned Off Array List visible Action Sets clone for int i 0 i new Array length i I Action Set Descriptor desc new Array i turned Off remove desc if visible Action Sets contains desc make sure this always stays visible always On Action Sets add desc always Off Action Sets remove desc for int i 0 i turned Off size i I Action Set Descriptor desc I Action Set Descriptor turned Off get i make sure this always stays hidden always On Action Sets remove desc always Off Action Sets add desc visible Action Sets clear int new Size new Array length for int i 0 i new Size i visible Action Sets add new Array i  setActionSets IActionSetDescriptor newArray ArrayList turnedOff ArrayList visibleActionSets newArray IActionSetDescriptor newArray turnedOff visibleActionSets alwaysOnActionSets alwaysOffActionSets turnedOff IActionSetDescriptor IActionSetDescriptor turnedOff alwaysOnActionSets alwaysOffActionSets visibleActionSets newSize newArray newSize visibleActionSets newArray
Return the active fast view or null if there are no fast views or if there are all minimized public I View Reference get Active Fast View return active Fast View  IViewReference getActiveFastView activeFastView
Sets the active fast view If a different fast view is already open it shrinks equally code steps code times before disappearing completely Then code view code becomes active and is shown package void set Active Fast View I View Reference ref int steps if active Fast View ref return if active Fast View null View Pane pane get Pane active Fast View if pane null if pane is Zoomed presentation zoom Out hide Fast View active Fast View steps active Fast View ref try if active Fast View null if show Fast View active Fast View active Fast View null catch Runtime Exception e active Fast View null  setActiveFastView IViewReference activeFastView activeFastView ViewPane getPane activeFastView isZoomed zoomOut hideFastView activeFastView activeFastView activeFastView showFastView activeFastView activeFastView RuntimeException activeFastView
Sets the active fast view package void set Active Fast View I View Reference ref set Active Fast View ref FASTVIEW HIDE STEPS  setActiveFastView IViewReference setActiveFastView FASTVIEW_HIDE_STEPS
Sets the visibility of all fast view pins private void set All Pins Visible boolean visible Iterator iter fast Views iterator while iter has Next View Pane pane get Pane I View Reference iter next if pane null pane set Fast visible  setAllPinsVisible fastViews hasNext ViewPane getPane IViewReference setFast
Sets the selection for the shortcut bar icon representing the givevn fast view private void set Fast View Icon Selection I View Reference ref boolean selected Workbench Window window Workbench Window page get Workbench Window Fast View Bar bar window get Fast View Bar if bar null if selected bar set Selection ref else if ref bar get Selection bar set Selection null  setFastViewIconSelection IViewReference WorkbenchWindow WorkbenchWindow getWorkbenchWindow FastViewBar getFastViewBar setSelection getSelection setSelection
Sets the new wizard actions for the page This is List of Strings public void set New Wizard Action Ids Array List new List new Wizard Action Ids new List  setNewWizardActionIds ArrayList newList newWizardActionIds newList
Sets the perspective actions for this page This is List of Strings public void set Perspective Action Ids Array List list perspective Action Ids list  setPerspectiveActionIds ArrayList perspectiveActionIds
Sets the ids of the parts to list in the Show In prompter This is a List of Strings public void set Show In Part Ids Array List list show In Part Ids list  setShowInPartIds ArrayList showInPartIds
Sets the ids of the views to list in the Show View shortcuts This is a List of Strings public void set Show View Action Ids Array List list show View Action Ids list  setShowViewActionIds ArrayList showViewActionIds
see I Workbench Page Note The page is expected to update action bars public void show Action Set String id Action Set Registry reg Workbench Plugin get Default get Action Set Registry I Action Set Descriptor desc reg find Action Set id if always Off Action Sets contains desc return if desc null visible Action Sets contains desc visible Action Sets add desc  IWorkbenchPage showActionSet ActionSetRegistry WorkbenchPlugin getDefault getActionSetRegistry IActionSetDescriptor findActionSet alwaysOffActionSets visibleActionSets visibleActionSets
Show the editor area if not visible protected void show Editor Area if is Editor Area Visible return Enable the editor area now that it will be made visible and can accept keyboard focus again if editor Area get Control null editor Area get Control set Enabled true set Editor Area Visible true Replace the part holder with the editor area presentation get Layout replace editor Holder editor Area editor Holder null  showEditorArea isEditorAreaVisible editorArea getControl editorArea getControl setEnabled setEditorAreaVisible getLayout editorHolder editorArea editorHolder
private void set Editor Area Visible boolean visible Array List workbooks Editor Sash Container editor Area get Editor Workbooks for Iterator iter workbooks iterator iter has Next Editor Stack workbook Editor Stack iter next workbook set Visible visible Editor Pane pane workbook get Visible Editor if pane null pane set Visible visible editor Area set Visible visible  setEditorAreaVisible ArrayList EditorSashContainer editorArea getEditorWorkbooks hasNext EditorStack EditorStack setVisible EditorPane getVisibleEditor setVisible editorArea setVisible
Shows a fast view return whether the view was successfully shown boolean show Fast View I View Reference ref Make sure the part is restored if ref get Part true null return false View Pane pane get Pane ref if pane null return false save Fast View Width Ratio Workbench Window window Workbench Window page get Workbench Window Fast View Bar bar window get Fast View Bar if bar null return false int side bar get View Side ref fast View Pane show View get Client Composite pane side get Fast View Width Ratio ref get Id set Fast View Icon Selection ref true return true  showFastView IViewReference getPart ViewPane getPane saveFastViewWidthRatio WorkbenchWindow WorkbenchWindow getWorkbenchWindow FastViewBar getFastViewBar getViewSide fastViewPane showView getClientComposite getFastViewWidthRatio getId setFastViewIconSelection
private void save Fast View Width Ratio View Pane pane fast View Pane get Current Pane if pane null View Layout Rec rec get View Layout Rec pane get View Reference true rec fast View Width Ratio fast View Pane get Current Ratio  saveFastViewWidthRatio ViewPane fastViewPane getCurrentPane ViewLayoutRec getViewLayoutRec getViewReference fastViewWidthRatio fastViewPane getCurrentRatio
Shows the view with the given id and secondary id public I View Part show View String view Id String secondary Id throws Part Init Exception View Factory factory get View Factory I View Reference ref factory create View view Id secondary Id I View Part part I View Part ref get Part false if part null I Status status factory restore View ref if status get Severity I Status ERROR if status get Exception instanceof Part Init Exception throw Part Init Exception status get Exception else throw new Part Init Exception status else No error so the part has been created part I View Part ref get Part false View Site site View Site part get Site View Pane pane View Pane site get Pane I Preference Store store Workbench Plugin get Default get Preference Store int open View Mode store get Int I Preference Constants OPEN VIEW MODE if presentation has Placeholder view Id secondary Id presentation add Part pane else if open View Mode I Preference Constants OVM EMBED presentation add Part pane else if open View Mode I Preference Constants OVM FLOAT presentation can Detach presentation add Detached Part pane else show Fast View ref add Fast View ref Refresh the part as there might have been an error when showing return part  IViewPart showView viewId secondaryId PartInitException ViewFactory getViewFactory IViewReference createView viewId secondaryId IViewPart IViewPart getPart IStatus restoreView getSeverity IStatus getException PartInitException PartInitException getException PartInitException IViewPart getPart ViewSite ViewSite getSite ViewPane ViewPane getPane IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore openViewMode getInt IPreferenceConstants OPEN_VIEW_MODE hasPlaceholder viewId secondaryId addPart openViewMode IPreferenceConstants OVM_EMBED addPart openViewMode IPreferenceConstants OVM_FLOAT canDetach addDetachedPart showFastView addFastView
Toggles the visibility of a fast view If the view is active it is deactivated Otherwise it is activated public void toggle Fast View I View Reference ref if ref active Fast View set Active Fast View null else set Active Fast View ref  toggleFastView IViewReference activeFastView setActiveFastView setActiveFastView
Returns the old PartID return String public String get Old PartID return old PartID  oldPartID getOldPartID oldPartID
Sets the old PartID param old PartID The old PartID to set public void set Old PartID String old PartID this old PartID old PartID  oldPartID oldPartID oldPartID setOldPartID oldPartID oldPartID oldPartID
Method move Fast View Moves dragged View to the position above destination View If place At End is true add view to the end Otherwise either place above destination view or at the beginning if the destination View is null param dragged View param destination View param use Destination package void move Fast View I View Reference dragged View I View Reference destination View PR 6988 do nothing if views are the same if dragged View destination View return int insert Idx fast Views index Of destination View move the view fast Views remove dragged View if insert Idx 0 insert Idx fast Views size fast Views add dragged View else fast Views add insert Idx dragged View  moveFastView draggedView destinationView placeAtEnd destinationView draggedView destinationView useDestination moveFastView IViewReference draggedView IViewReference destinationView draggedView destinationView insertIdx fastViews indexOf destinationView fastViews draggedView insertIdx insertIdx fastViews fastViews draggedView fastViews insertIdx draggedView
for dynamic UI package void add Action Set I Action Set Descriptor new Desc for int i 0 i visible Action Sets size i I Action Set Descriptor desc I Action Set Descriptor visible Action Sets get i if desc get Id equals new Desc get Id visible Action Sets remove desc always On Action Sets remove desc always Off Action Sets remove desc break visible Action Sets add new Desc always On Action Sets add new Desc  addActionSet IActionSetDescriptor newDesc visibleActionSets IActionSetDescriptor IActionSetDescriptor visibleActionSets getId newDesc getId visibleActionSets alwaysOnActionSets alwaysOffActionSets visibleActionSets newDesc alwaysOnActionSets newDesc
for dynamic UI package void remove Action Set String id for int i 0 i visible Action Sets size i I Action Set Descriptor desc I Action Set Descriptor visible Action Sets get i if desc get Id equals id visible Action Sets remove desc always On Action Sets remove desc always Off Action Sets remove desc break  removeActionSet visibleActionSets IActionSetDescriptor IActionSetDescriptor visibleActionSets getId visibleActionSets alwaysOnActionSets alwaysOffActionSets
public void toggle Fast View Zoom fast View Pane toggle Zoom  toggleFastViewZoom fastViewPane toggleZoom
Returns whether the given view is closeable in this perspective since 3 0 public boolean is Closeable I View Reference reference View Layout Rec rec get View Layout Rec reference false if rec null return rec is Closeable return true  isCloseable IViewReference ViewLayoutRec getViewLayoutRec isCloseable
Returns whether the given view is moveable in this perspective since 3 0 public boolean is Moveable I View Reference reference View Layout Rec rec get View Layout Rec reference false if rec null return rec is Moveable return true  isMoveable IViewReference ViewLayoutRec getViewLayoutRec isMoveable
Writes a description of the layout to the given string buffer This is used for drag drop test suites to determine if two layouts are the same Like a hash code the description should compare as equal iff the layouts are the same However it should be user readable in order to help debug failed tests Although these are english readable strings they should not be translated or equality tests will fail p This is only intended for use by test suites p param buf public void describe Layout String Buffer buf I View Reference fast Views get Fast Views if fast Views length 0 buf append fastviews NON NLS 1 for int idx 0 idx fast Views length idx I View Reference ref fast Views idx if idx 0 buf append NON NLS 1 buf append ref get Part Name buf append NON NLS 1 get Presentation get Layout describe Layout buf  describeLayout StringBuffer IViewReference fastViews getFastViews fastViews fastViews IViewReference fastViews getPartName getPresentation getLayout describeLayout
Sanity checks the Layout Parts in this perspective Throws an Assertation exception if an object s internal state is invalid public void test Invariants get Presentation get Layout test Invariants  LayoutParts testInvariants getPresentation getLayout testInvariants

public Perspective Bar Contribution Item I Perspective Descriptor perspective Workbench Page workbench Page super perspective get Id this perspective perspective this workbench Page workbench Page  PerspectiveBarContributionItem IPerspectiveDescriptor WorkbenchPage workbenchPage getId workbenchPage workbenchPage
public void dispose super dispose if image null image is Disposed image dispose image null api Preference Store null workbench Page null perspective null  isDisposed apiPreferenceStore workbenchPage
public void fill Tool Bar parent int index if tool Item null parent null parent is Disposed if index 0 tool Item new Tool Item parent SWT CHECK index else tool Item new Tool Item parent SWT CHECK if image null image is Disposed create Image tool Item set Image image tool Item set Tool Tip Text Workbench Messages format Perspective Bar Contribution Item tool Tip NON NLS 1 new Object perspective get Label tool Item add Selection Listener new Selection Adapter public void widget Selected Selection Event event select tool Item set Data this TODO review need for this update  ToolBar toolItem isDisposed toolItem ToolItem toolItem ToolItem isDisposed createImage toolItem setImage toolItem setToolTipText WorkbenchMessages PerspectiveBarContributionItem toolTip getLabel toolItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent toolItem setData
private void create Image Image Descriptor image Descriptor perspective get Image Descriptor if image Descriptor null image image Descriptor create Image else image Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL DEF PERSPECTIVE create Image  createImage ImageDescriptor imageDescriptor getImageDescriptor imageDescriptor imageDescriptor createImage WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_DEF_PERSPECTIVE createImage
Image get Image if image null create Image return image  getImage createImage
public void select if workbench Page get Perspective perspective workbench Page set Perspective perspective update get Parent update true else tool Item set Selection true  workbenchPage getPerspective workbenchPage setPerspective getParent toolItem setSelection
public void update if tool Item null tool Item is Disposed tool Item set Selection workbench Page get Perspective perspective if api Preference Store get Boolean I Workbench Preference Constants SHOW TEXT ON PERSPECTIVE BAR if api Preference Store get String I Workbench Preference Constants DOCK PERSPECTIVE BAR equals I Workbench Preference Constants TOP LEFT tool Item set Text perspective get Label else tool Item set Text shorten Text perspective get Label tool Item else tool Item set Text NON NLS 1  toolItem toolItem isDisposed toolItem setSelection workbenchPage getPerspective apiPreferenceStore getBoolean IWorkbenchPreferenceConstants SHOW_TEXT_ON_PERSPECTIVE_BAR apiPreferenceStore getString IWorkbenchPreferenceConstants DOCK_PERSPECTIVE_BAR IWorkbenchPreferenceConstants TOP_LEFT toolItem setText getLabel toolItem setText shortenText getLabel toolItem toolItem setText
public void update I Perspective Descriptor new Desc perspective new Desc if tool Item null tool Item is Disposed Image Descriptor image Descriptor perspective get Image Descriptor if image Descriptor null tool Item set Image image Descriptor create Image else tool Item set Image Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL DEF PERSPECTIVE create Image tool Item set Tool Tip Text Workbench Messages format Perspective Bar Contribution Item tool Tip NON NLS 1 new Object perspective get Label update  IPerspectiveDescriptor newDesc newDesc toolItem toolItem isDisposed ImageDescriptor imageDescriptor getImageDescriptor imageDescriptor toolItem setImage imageDescriptor createImage toolItem setImage WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_DEF_PERSPECTIVE createImage toolItem setToolTipText WorkbenchMessages PerspectiveBarContributionItem toolTip getLabel
Workbench Page get Page return workbench Page  WorkbenchPage getPage workbenchPage
I Perspective Descriptor get Perspective return perspective  IPerspectiveDescriptor getPerspective
Tool Item get Tool Item return tool Item  ToolItem getToolItem toolItem
public boolean handles I Perspective Descriptor perspective Workbench Page workbench Page return this perspective perspective this workbench Page workbench Page  IPerspectiveDescriptor WorkbenchPage workbenchPage workbenchPage workbenchPage
public void set Perspective I Perspective Descriptor new Perspective this perspective new Perspective  setPerspective IPerspectiveDescriptor newPerspective newPerspective
TODO review need for this method void set Selection boolean b if tool Item null tool Item is Disposed tool Item set Selection b  setSelection toolItem toolItem isDisposed toolItem setSelection
static int get Max Width Image image return image get Bounds width 5  getMaxWidth getBounds
protected String shorten Text String text Value Tool Item item if text Value null tool Item null tool Item is Disposed return null String return Text text Value GC gc new GC item get Display int max Width get Max Width item get Image if gc text Extent text Value x max Width for int i text Value length i 0 i String test text Value substring 0 i test test ellipsis if gc text Extent test x max Width return Text test break gc dispose return return Text  shortenText textValue ToolItem textValue toolItem toolItem isDisposed returnText textValue getDisplay maxWidth getMaxWidth getImage textExtent textValue maxWidth textValue textValue textExtent maxWidth returnText returnText

public static final String SMALL FONT org eclipse ui small Font NON NLS 1 public Perspective Bar Manager int style super style  SMALL_FONT smallFont PerspectiveBarManager
public Tool Bar create Control Composite parent Tool Bar control super create Control parent if control null control is Disposed control set Font get Font return control  ToolBar createControl ToolBar createControl isDisposed setFont getFont
public Perspective Bar Manager Tool Bar toolbar super toolbar if toolbar null toolbar is Disposed toolbar set Font get Font  PerspectiveBarManager ToolBar isDisposed setFont getFont
menu Item add Selection Listener new Selection Adapter public void widget Selected Selection Event e rotate the selected item in and the other items right don t touch the Open item Menu Item menu Item Menu Item e widget Object item menu Item get Data I Contribution Item NON NLS 1 if item instanceof Perspective Bar Contribution Item Perspective Bar Contribution Item contrib Item Perspective Bar Contribution Item item update false contrib Item select  menuItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent MenuItem menuItem MenuItem menuItem getData IContributionItem PerspectiveBarContributionItem PerspectiveBarContributionItem contribItem PerspectiveBarContributionItem contribItem
public void handle Chevron Selection Event event If the popup menu is already there then pop it down This doesn t work still need to figure this out if popup null popup dispose popup null return Cool Item item Cool Item event widget Tool Bar toolbar Tool Bar get Control Control control get Control if control instanceof Tool Bar return currently we only deal with toolbar items Retrieve the current bounding rectangle for the selected cool item Rectangle item Bounds item get Bounds Convert to display coordinates i e was relative to Cool Bar Point pt cool Bar to Display new Point item Bounds x item Bounds y item Bounds x pt x item Bounds y pt y Retrieve the total number of buttons in the toolbar Tool Bar tool Bar Tool Bar control Tool Item tools tool Bar get Items int tool Count tools length int i 0 while i tool Count Starting from the leftmost tool retrieve the tool s bounding rectangle Rectangle tool Bounds tools i get Bounds Convert to display coordinates i e was relative to Tool Bar pt tool Bar to Display new Point tool Bounds x tool Bounds y tool Bounds x pt x tool Bounds y pt y Figure out the visible portion of the tool by looking at the intersection of the tool bounds with the cool item bounds Rectangle intersection item Bounds intersection tool Bounds If the tool is not completely within the cool item bounds then the tool is at least partially hidden and all remaining tools are completely hidden if intersection equals tool Bounds break i Create a pop up menu with items for each of the hidden buttons popup new Menu cool Bar for int j i j tool Count j Tool Item tool tools j Menu Item menu Item new Menu Item popup SWT NONE if tool get Selection menu Item set Enabled false menu Item set Text tool get Text menu Item set Image tool get Image menu Item set Data I Contribution Item tool get Data NON NLS 1 menu Item add Selection Listener new Selection Adapter public void widget Selected Selection Event e rotate the selected item in and the other items right don t touch the Open item Menu Item menu Item Menu Item e widget Object item menu Item get Data I Contribution Item NON NLS 1 if item instanceof Perspective Bar Contribution Item Perspective Bar Contribution Item contrib Item Perspective Bar Contribution Item item update false contrib Item select Display the pop up menu immediately below the chevron with the left edges aligned Need to convert the given point to display coordinates in order to pass them to Menu set Location i e was relative to Cool Bar pt cool Bar to Display new Point event x event y popup set Location pt x pt y popup set Visible true Display display cool Bar get Display while popup null popup is Visible if display read And Dispatch display sleep if popup null popup dispose popup null  handleChevron SelectionEvent CoolItem CoolItem ToolBar ToolBar getControl getControl ToolBar itemBounds getBounds CoolBar coolBar toDisplay itemBounds itemBounds itemBounds itemBounds ToolBar toolBar ToolBar ToolItem toolBar getItems toolCount toolCount toolBounds getBounds ToolBar toolBar toDisplay toolBounds toolBounds toolBounds toolBounds itemBounds toolBounds toolBounds coolBar toolCount ToolItem MenuItem menuItem MenuItem getSelection menuItem setEnabled menuItem setText getText menuItem setImage getImage menuItem setData IContributionItem getData menuItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent MenuItem menuItem MenuItem menuItem getData IContributionItem PerspectiveBarContributionItem PerspectiveBarContributionItem contribItem PerspectiveBarContributionItem contribItem setLocation CoolBar coolBar toDisplay setLocation setVisible coolBar getDisplay isVisible readAndDispatch
protected void relayout Tool Bar tool Bar int old Count int new Count super relayout tool Bar old Count new Count if get Control null Layout Util resize get Control  ToolBar toolBar oldCount newCount toolBar oldCount newCount getControl LayoutUtil getControl
void set Parent Cool Bar cool this cool Bar cool  setParent CoolBar coolBar
TODO end refactor this out private Font get Font return J Face Resources get Font SMALL FONT  getFont JFaceResources getFont SMALL_FONT
Method to select a Perspective Bar Contribution Item and ensure that it is visible It updates the MRU list param contrib Item the Perspective Bar Contribution Item to select void select Perspective Bar Contribution Item contrib Item if contrib Item get Tool Item null return check if not visible and ensure visible if get Control is Visible is Item Visible contrib Item get Tool Item ensure Visible contrib Item  PerspectiveBarContributionItem contribItem PerspectiveBarContributionItem PerspectiveBarContributionItem contribItem contribItem getToolItem getControl isVisible isItemVisible contribItem getToolItem ensureVisible contribItem
Method that adds a Perspective Bar Contribution Item and ensures it is visible param item the Perspective Bar Contribution Item to be added public void add Item Perspective Bar Contribution Item item insert 1 item update false  PerspectiveBarContributionItem PerspectiveBarContributionItem addItem PerspectiveBarContributionItem
Method to remove a Perspective Bar Contribution Item from the toolbar and from the MRU and sequence lists when necessary param item the Perspective Bar Contribution Item to be removed public void remove Item Perspective Bar Contribution Item item remove item  PerspectiveBarContributionItem PerspectiveBarContributionItem removeItem PerspectiveBarContributionItem
Re insert the item at the beginning of the perspective bar ensuring that it is visible to the user param contrib Item private void ensure Visible Perspective Bar Contribution Item contrib Item Perspective Bar Contribution Item new Item new Perspective Bar Contribution Item contrib Item get Perspective contrib Item get Page remove Item contrib Item contrib Item dispose contrib Item null insert 1 new Item update false  contribItem ensureVisible PerspectiveBarContributionItem contribItem PerspectiveBarContributionItem newItem PerspectiveBarContributionItem contribItem getPerspective contribItem getPage removeItem contribItem contribItem contribItem newItem
return true if the tool Item is visible on the screen false otherwise private boolean is Item Visible Tool Item tool Item Rectangle bar Bounds get Control get Bounds Rectangle item Bounds tool Item get Bounds return bar Bounds intersection item Bounds equals item Bounds  toolItem isItemVisible ToolItem toolItem barBounds getControl getBounds itemBounds toolItem getBounds barBounds itemBounds itemBounds
This method ensures that the selected item in the toolbar is visible public void arrange Toolbar check if the tool bar is visible if get Control is Visible return the tool bar should contain at least the new perspective button and 2 other buttons if get Control get Item Count 3 return Find the selected item and make sure it is visible I Contribution Item items get Items for int i 2 i items length i Perspective Bar Contribution Item contrib Item Perspective Bar Contribution Item items i if contrib Item get Tool Item get Selection if is Item Visible contrib Item get Tool Item ensure Visible contrib Item break  arrangeToolbar getControl isVisible getControl getItemCount IContributionItem getItems PerspectiveBarContributionItem contribItem PerspectiveBarContributionItem contribItem getToolItem getSelection isItemVisible contribItem getToolItem ensureVisible contribItem

public Perspective Bar New Contribution Item I Workbench Window workbench Window super Perspective Bar New Contribution Item class get Name menu Manager new Menu Manager menu Manager add Contribution Item Factory PERSPECTIVES SHORTLIST create workbench Window  PerspectiveBarNewContributionItem IWorkbenchWindow workbenchWindow PerspectiveBarNewContributionItem getName menuManager MenuManager menuManager ContributionItemFactory PERSPECTIVES_SHORTLIST workbenchWindow
public void dispose super dispose if image null image is Disposed image dispose image null  isDisposed
parent add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e tool Item get Image dispose tool Item dispose tool Item null  addDisposeListener DisposeListener widgetDisposed DisposeEvent toolItem getImage toolItem toolItem
public void widget Selected Selection Event event menu Manager update true Point point new Point event x event y if event widget instanceof Tool Item Tool Item tool Item Tool Item event widget Rectangle rectangle tool Item get Bounds point new Point rectangle x rectangle y rectangle height Menu menu menu Manager create Context Menu parent point parent to Display point menu set Location point x point y menu set Visible true  widgetSelected SelectionEvent menuManager ToolItem ToolItem toolItem ToolItem toolItem getBounds menuManager createContextMenu toDisplay setLocation setVisible
public void fill final Tool Bar parent int index if tool Item null parent null parent add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e tool Item get Image dispose tool Item dispose tool Item null tool Item new Tool Item parent SWT PUSH if image null image is Disposed image Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL NEW PAGE create Image tool Item set Image image tool Item set Text NON NLS 1 tool Item set Tool Tip Text Workbench Messages get String Perspective Bar New Contribution Item tool Tip NON NLS 1 tool Item add Selection Listener new Selection Adapter public void widget Selected Selection Event event menu Manager update true Point point new Point event x event y if event widget instanceof Tool Item Tool Item tool Item Tool Item event widget Rectangle rectangle tool Item get Bounds point new Point rectangle x rectangle y rectangle height Menu menu menu Manager create Context Menu parent point parent to Display point menu set Location point x point y menu set Visible true  ToolBar toolItem addDisposeListener DisposeListener widgetDisposed DisposeEvent toolItem getImage toolItem toolItem toolItem ToolItem isDisposed WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_NEW_PAGE createImage toolItem setImage toolItem setText toolItem setToolTipText WorkbenchMessages getString PerspectiveBarNewContributionItem toolTip toolItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent menuManager ToolItem ToolItem toolItem ToolItem toolItem getBounds menuManager createContextMenu toDisplay setLocation setVisible

return new Abstract Drop Target public void drop Window window part get Window if window instanceof Detached Window only one tab folder in a detach window so do window move if part instanceof View Stack window get Shell set Location drag Rectangle x drag Rectangle y return if only one view in tab folder then do a window move I Layout Container container part get Container if container instanceof View Stack if View Stack container get Item Count 1 window get Shell set Location drag Rectangle x drag Rectangle y return If layout is modified always zoom out if is Zoomed zoom Out do a normal part detach detach part drag Rectangle x drag Rectangle y  AbstractDropTarget getWindow DetachedWindow ViewStack getShell setLocation dragRectangle dragRectangle ILayoutContainer getContainer ViewStack ViewStack getItemCount getShell setLocation dragRectangle dragRectangle isZoomed zoomOut dragRectangle dragRectangle
public Cursor get Cursor return Drag Cursors get Cursor Drag Cursors OFFSCREEN  getCursor DragCursors getCursor DragCursors
public I Drop Target drag Control current Control Object dragged Object Point position final Rectangle drag Rectangle if dragged Object instanceof View Pane dragged Object instanceof View Stack return null final Layout Part part Layout Part dragged Object if part get Workbench Window page get Workbench Window return null return new Abstract Drop Target public void drop Window window part get Window if window instanceof Detached Window only one tab folder in a detach window so do window move if part instanceof View Stack window get Shell set Location drag Rectangle x drag Rectangle y return if only one view in tab folder then do a window move I Layout Container container part get Container if container instanceof View Stack if View Stack container get Item Count 1 window get Shell set Location drag Rectangle x drag Rectangle y return If layout is modified always zoom out if is Zoomed zoom Out do a normal part detach detach part drag Rectangle x drag Rectangle y public Cursor get Cursor return Drag Cursors get Cursor Drag Cursors OFFSCREEN  IDropTarget currentControl draggedObject dragRectangle draggedObject ViewPane draggedObject ViewStack LayoutPart LayoutPart draggedObject getWorkbenchWindow getWorkbenchWindow AbstractDropTarget getWindow DetachedWindow ViewStack getShell setLocation dragRectangle dragRectangle ILayoutContainer getContainer ViewStack ViewStack getItemCount getShell setLocation dragRectangle dragRectangle isZoomed zoomOut dragRectangle dragRectangle getCursor DragCursors getCursor DragCursors
Constructs a new object public Perspective Helper Workbench Page workbench Page View Sash Container main Layout this page workbench Page this main Layout main Layout Determine if reparenting is allowed by checking if some arbitrary Composite supports reparenting This is used to determine if detached views should be enabled this detachable false Composite client workbench Page get Client Composite if client null Composite test Child new Composite client SWT NONE this detachable test Child is Reparentable test Child dispose  PerspectiveHelper WorkbenchPage workbenchPage ViewSashContainer mainLayout workbenchPage mainLayout mainLayout workbenchPage getClientComposite testChild testChild isReparentable testChild
Show the presentation public void activate Composite parent if active return parent Widget parent Activate main layout make sure all the views have been properly parented Vector children new Vector collect View Panes children main Layout get Children Enumeration enum children elements while enum has More Elements Layout Part part Layout Part enum next Element part reparent parent main Layout create Control parent Open the detached windows for int i 0 length detached Window List size i length i Detached Window dwindow Detached Window detached Window List get i dwindow open enable All Drag enable All Drop active true  parentWidget collectViewPanes mainLayout getChildren hasMoreElements LayoutPart LayoutPart nextElement mainLayout createControl detachedWindowList DetachedWindow DetachedWindow detachedWindowList enableAllDrag enableAllDrop
Adds a part to the presentation If a placeholder exists for the part then swap the part in Otherwise add the part in the bottom right corner of the presentation public void add Part Layout Part part If part added removed always zoom out if is Zoomed zoom Out Look for a placeholder Part Placeholder placeholder null Layout Part test Part null String primary Id part getID String secondary Id null if part instanceof View Pane View Pane pane View Pane part I View Reference ref I View Reference pane get Part Reference secondary Id ref get Secondary Id if secondary Id null test Part find Part primary Id secondary Id else test Part find Part primary Id validate the test Part if test Part null test Part instanceof Part Placeholder placeholder Part Placeholder test Part If there is no placeholder do a simple add Otherwise replace the placeholder if its not a pattern matching placholder if placeholder null part reparent main Layout get Parent Layout Part relative main Layout find Bottom Right if relative null relative instanceof Part Stack main Layout stack part Part Stack relative else main Layout add part else I Layout Container container placeholder get Container if container null if container instanceof Detached Place Holder Create a detached window add the part on it Detached Place Holder holder Detached Place Holder container detached Place Holder List remove holder container remove test Part Detached Window window new Detached Window page detached Window List add window window create part create Control window get Shell Open window window get Shell set Bounds holder get Bounds window open add part to detached window View Pane pane View Pane part window get Shell set Text pane get Part Reference get Title window add pane Layout Part other Children holder get Children for int i 0 i other Children length i part get Container add other Children i else reconsistute parent if necessary if container instanceof Container Placeholder Container Placeholder container Placeholder Container Placeholder container I Layout Container parent Container container Placeholder get Container container I Layout Container container Placeholder get Real Container if container instanceof Layout Part parent Container replace container Placeholder Layout Part container container Placeholder set Real Container null reparent part if container instanceof View Stack We don t need to reparent children of Part Tab Folders since they will automatically reparent their children when they become visible This if statement used to be part of an else branch Investigate if it is still necessary part reparent main Layout get Parent see if we should replace the placeholder if placeholder has Wild Card if container instanceof Part Sash Container Part Sash Container container add Child For Placeholder part placeholder else container add part else container replace placeholder part enable direct manipulation enable Drop part  addPart LayoutPart isZoomed zoomOut PartPlaceholder LayoutPart testPart primaryId secondaryId ViewPane ViewPane ViewPane IViewReference IViewReference getPartReference secondaryId getSecondaryId secondaryId testPart findPart primaryId secondaryId testPart findPart primaryId testPart testPart testPart PartPlaceholder PartPlaceholder testPart mainLayout getParent LayoutPart mainLayout findBottomRight PartStack mainLayout PartStack mainLayout ILayoutContainer getContainer DetachedPlaceHolder DetachedPlaceHolder DetachedPlaceHolder detachedPlaceHolderList testPart DetachedWindow DetachedWindow detachedWindowList createControl getShell getShell setBounds getBounds ViewPane ViewPane getShell setText getPartReference getTitle LayoutPart otherChildren getChildren otherChildren getContainer otherChildren ContainerPlaceholder ContainerPlaceholder containerPlaceholder ContainerPlaceholder ILayoutContainer parentContainer containerPlaceholder getContainer ILayoutContainer containerPlaceholder getRealContainer LayoutPart parentContainer containerPlaceholder LayoutPart containerPlaceholder setRealContainer ViewStack PartTabFolders mainLayout getParent hasWildCard PartSashContainer PartSashContainer addChildForPlaceholder enableDrop
Return whether detachable parts can be supported public boolean can Detach return detachable  canDetach
Bring a part forward so it is visible return true if the part was brought to top false if not public boolean bring Part To Top Layout Part part I Layout Container container part get Container if container null container instanceof Part Stack Part Stack folder Part Stack container if folder get Visible Part part folder set Selection part return true return false  bringPartToTop LayoutPart ILayoutContainer getContainer PartStack PartStack PartStack getVisiblePart setSelection
Returns true is not in a tab folder or if it is the top one in a tab folder public boolean is Part Visible String part Id String secondary Id Layout Part part if secondary Id null part find Part part Id secondary Id else part find Part part Id if part null return false if part instanceof Part Placeholder return false I Layout Container container part get Container if container null container instanceof Container Placeholder return false if container null container instanceof View Stack View Stack folder View Stack container if folder get Visible Part null return false return part getID equals folder get Visible Part getID return true  isPartVisible partId secondaryId LayoutPart secondaryId findPart partId secondaryId findPart partId PartPlaceholder ILayoutContainer getContainer ContainerPlaceholder ViewStack ViewStack ViewStack getVisiblePart getVisiblePart
Returns true is not in a tab folder or if it is the top one in a tab folder public boolean will Part Be Visible String part Id return will Part Be Visible part Id null  willPartBeVisible partId willPartBeVisible partId
public boolean will Part Be Visible String part Id String secondary Id Layout Part part find Part part Id secondary Id if part null return false I Layout Container container part get Container if container null container instanceof Container Placeholder container I Layout Container Container Placeholder container get Real Container if container null container instanceof View Stack View Stack folder View Stack container if folder get Visible Part null return false return part get Compound Id equals folder get Visible Part get Compound Id return true  willPartBeVisible partId secondaryId LayoutPart findPart partId secondaryId ILayoutContainer getContainer ContainerPlaceholder ILayoutContainer ContainerPlaceholder getRealContainer ViewStack ViewStack ViewStack getVisiblePart getCompoundId getVisiblePart getCompoundId
Open the tracker to allow the user to move the specified part using keyboard public void open Tracker View Pane pane Drag Util perform Drag pane Drag Util get Display Bounds pane get Control  openTracker ViewPane DragUtil performDrag DragUtil getDisplayBounds getControl
Answer a list of the Part Placeholder objects private Part Placeholder collect Placeholders Scan the main window Part Placeholder results collect Placeholders main Layout get Children Scan each detached window if detachable for int i 0 length detached Window List size i length i Detached Window win Detached Window detached Window List get i Part Placeholder more Results collect Placeholders win get Children if more Results length 0 int new Length results length more Results length Part Placeholder new Results new Part Placeholder new Length System arraycopy results 0 new Results 0 results length System arraycopy more Results 0 new Results results length more Results length results new Results return results  PartPlaceholder PartPlaceholder collectPlaceholders PartPlaceholder collectPlaceholders mainLayout getChildren detachedWindowList DetachedWindow DetachedWindow detachedWindowList PartPlaceholder moreResults collectPlaceholders getChildren moreResults newLength moreResults PartPlaceholder newResults PartPlaceholder newLength newResults moreResults newResults moreResults newResults
Answer a list of the Part Placeholder objects private Part Placeholder collect Placeholders Layout Part parts Part Placeholder result new Part Placeholder 0 for int i 0 length parts length i length i Layout Part part parts i if part instanceof I Layout Container iterate through sub containers to find sub parts Part Placeholder new Parts collect Placeholders I Layout Container part get Children Part Placeholder new Result new Part Placeholder result length new Parts length System arraycopy result 0 new Result 0 result length System arraycopy new Parts 0 new Result result length new Parts length result new Result else if part instanceof Part Placeholder Part Placeholder new Result new Part Placeholder result length 1 System arraycopy result 0 new Result 0 result length new Result result length Part Placeholder part result new Result return result  PartPlaceholder PartPlaceholder collectPlaceholders LayoutPart PartPlaceholder PartPlaceholder LayoutPart ILayoutContainer PartPlaceholder newParts collectPlaceholders ILayoutContainer getChildren PartPlaceholder newResult PartPlaceholder newParts newResult newParts newResult newParts newResult PartPlaceholder PartPlaceholder newResult PartPlaceholder newResult newResult PartPlaceholder newResult
Answer a list of the view panes public void collect View Panes List result Scan the main window collect View Panes result main Layout get Children Scan each detached window if detachable for int i 0 length detached Window List size i length i Detached Window win Detached Window detached Window List get i collect View Panes result win get Children  collectViewPanes collectViewPanes mainLayout getChildren detachedWindowList DetachedWindow DetachedWindow detachedWindowList collectViewPanes getChildren
Answer a list of the view panes private void collect View Panes List result Layout Part parts for int i 0 length parts length i length i Layout Part part parts i if part instanceof View Pane result add part else if part instanceof I Layout Container collect View Panes result I Layout Container part get Children  collectViewPanes LayoutPart LayoutPart ViewPane ILayoutContainer collectViewPanes ILayoutContainer getChildren
Hide the presentation public void deactivate if active return disable All Drag Reparent all views to the main window Composite parent main Layout get Parent Vector children new Vector collect View Panes children main Layout get Children for int i 0 length detached Window List size i length i Detached Window window Detached Window detached Window List get i collect View Panes children window get Children Do we even need to do this if detached windows not supported Enumeration enum children elements while enum has More Elements Layout Part part Layout Part enum next Element part reparent parent Dispose main layout main Layout dispose Dispose the detached windows for int i 0 length detached Window List size i length i Detached Window window Detached Window detached Window List get i window close active false  disableAllDrag mainLayout getParent collectViewPanes mainLayout getChildren detachedWindowList DetachedWindow DetachedWindow detachedWindowList collectViewPanes getChildren hasMoreElements LayoutPart LayoutPart nextElement mainLayout detachedWindowList DetachedWindow DetachedWindow detachedWindowList
Deref a given part Deconstruct its container as required Do not remove drag listeners package void deref Part Layout Part part if part instanceof View Pane page remove Fast View View Pane part get View Reference Get vital part stats before reparenting Window old Window part get Window I Layout Container old Container part get Container Reparent the part back to the main window part reparent main Layout get Parent Update container if old Container null return old Container remove part Layout Part children old Container get Children if old Window instanceof Workbench Window boolean has Children children null children length 0 if has Children make sure one is at least visible int child Visible 0 for int i 0 i children length i if children i get Control null child Visible none visible then reprarent and remove container if old Container instanceof View Stack View Stack folder View Stack old Container if child Visible 0 I Layout Container parent Container folder get Container for int i 0 i children length i folder remove children i parent Container add children i has Children false else if child Visible 1 Layout Tree layout main Layout get Layout Tree layout layout find folder layout set Bounds layout get Bounds if has Children There are no more children in this container so get rid of it if old Container instanceof Layout Part Layout Part parent Layout Part old Container I Layout Container parent Container parent get Container if parent Container null parent Container remove parent parent dispose else if old Window instanceof Detached Window if children null children length 0 There are no more children in this container so get rid of it Turn on redraw again just in case it was off old Window get Shell set Redraw true old Window close detached Window List remove old Window else There are children If none are visible hide detached window boolean all Invisible true for int i 0 length children length i length i if children i instanceof Part Placeholder all Invisible false break if all Invisible Detached Place Holder placeholder new Detached Place Holder NON NLS 1 old Window get Shell get Bounds for int i 0 length children length i length i old Container remove children i children i set Container placeholder placeholder add children i detached Place Holder List add placeholder old Window close detached Window List remove old Window  derefPart LayoutPart ViewPane removeFastView ViewPane getViewReference oldWindow getWindow ILayoutContainer oldContainer getContainer mainLayout getParent oldContainer oldContainer LayoutPart oldContainer getChildren oldWindow WorkbenchWindow hasChildren hasChildren childVisible getControl childVisible oldContainer ViewStack ViewStack ViewStack oldContainer childVisible ILayoutContainer parentContainer getContainer parentContainer hasChildren childVisible LayoutTree mainLayout getLayoutTree setBounds getBounds hasChildren oldContainer LayoutPart LayoutPart LayoutPart oldContainer ILayoutContainer parentContainer getContainer parentContainer parentContainer oldWindow DetachedWindow oldWindow getShell setRedraw oldWindow detachedWindowList oldWindow allInvisible PartPlaceholder allInvisible allInvisible DetachedPlaceHolder DetachedPlaceHolder oldWindow getShell getBounds oldContainer setContainer detachedPlaceHolderList oldWindow detachedWindowList oldWindow
Create a detached window containing a part private void detach Layout Part source int x int y Detaching is disabled on some platforms if detachable return Layout Part part source get Part Calculate detached window size Point size part get Size if size x 0 size y 0 I Layout Container container part get Container if container instanceof Layout Part size Layout Part container get Size int width Math max size x MIN DETACH WIDTH int height Math max size y MIN DETACH HEIGHT Create detached window Detached Window window new Detached Window page detached Window List add window Open window window create window get Shell set Bounds x y width height window open if part instanceof View Stack window get Shell set Redraw false parent Widget set Redraw false Layout Part visible Part View Stack part get Visible Part Layout Part children View Stack part get Children for int i 0 i children length i if children i instanceof View Pane remove the part from its current container deref Part children i add part to detached window View Pane pane View Pane children i window get Shell set Text pane get Part Reference get Title window add pane if visible Part null bring Part To Top visible Part visible Part set Focus window get Shell set Redraw true parent Widget set Redraw true else remove the part from its current container deref Part part add part to detached window View Pane pane View Pane part window get Shell set Text pane get Part Reference get Title window add pane part set Focus  LayoutPart LayoutPart getPart getSize ILayoutContainer getContainer LayoutPart LayoutPart getSize MIN_DETACH_WIDTH MIN_DETACH_HEIGHT DetachedWindow DetachedWindow detachedWindowList getShell setBounds ViewStack getShell setRedraw parentWidget setRedraw LayoutPart visiblePart ViewStack getVisiblePart LayoutPart ViewStack getChildren ViewPane derefPart ViewPane ViewPane getShell setText getPartReference getTitle visiblePart bringPartToTop visiblePart visiblePart setFocus getShell setRedraw parentWidget setRedraw derefPart ViewPane ViewPane getShell setText getPartReference getTitle setFocus
Create a detached window containing a part public void add Detached Part Layout Part part Detaching is disabled on some platforms if detachable add Part part return Calculate detached window size int width 300 int height 300 Rectangle bounds parent Widget get Shell get Bounds int x bounds x bounds width width 2 int y bounds y bounds height height 2 Create detached window Detached Window window new Detached Window page detached Window List add window window create add part to detached window part create Control window get Shell View Pane pane View Pane part window get Shell set Text pane get Part Reference get Title window add pane Open window window get Shell set Bounds x y width height window open part set Focus enable direct manipulation enable Drop part  addDetachedPart LayoutPart addPart parentWidget getShell getBounds DetachedWindow DetachedWindow detachedWindowList createControl getShell ViewPane ViewPane getShell setText getPartReference getTitle getShell setBounds setFocus enableDrop
disable Dragging private void disable All Drag Drag Util remove Drag Target null drag Target  disableDragging disableAllDrag DragUtil removeDragTarget dragTarget
Dispose all sashs used in this perspective public void dispose Sashes main Layout dispose Sashes  disposeSashes mainLayout disposeSashes
enable Dragging private void enable All Drag Drag Util add Drag Target null drag Target  enableDragging enableAllDrag DragUtil addDragTarget dragTarget
Find the first part with a given ID in the presentation Wild cards now supported private Layout Part find Part String id return find Part id null  LayoutPart findPart findPart
Find the first part that matches the specified primary and secondary id pair Wild cards are supported private Layout Part find Part String primary Id String secondary Id check main window Array List matching Parts new Array List Layout Part part secondary Id null find Part primary Id secondary Id main Layout get Children matching Parts find Part primary Id main Layout get Children matching Parts if part null return part check each detached windows for int i 0 length detached Window List size i length i Detached Window window Detached Window detached Window List get i part secondary Id null find Part primary Id secondary Id window get Children matching Parts find Part primary Id window get Children matching Parts if part null return part for int i 0 i detached Place Holder List size i Detached Place Holder holder Detached Place Holder detached Place Holder List get i part secondary Id null find Part primary Id secondary Id holder get Children matching Parts find Part primary Id holder get Children matching Parts if part null return part sort the matching parts if matching Parts size 0 Collections sort matching Parts Matching Part most Significant Part Matching Part matching Parts get 0 if most Significant Part null return most Significant Part part Not found return null  LayoutPart findPart primaryId secondaryId ArrayList matchingParts ArrayList LayoutPart secondaryId findPart primaryId secondaryId mainLayout getChildren matchingParts findPart primaryId mainLayout getChildren matchingParts detachedWindowList DetachedWindow DetachedWindow detachedWindowList secondaryId findPart primaryId secondaryId getChildren matchingParts findPart primaryId getChildren matchingParts detachedPlaceHolderList DetachedPlaceHolder DetachedPlaceHolder detachedPlaceHolderList secondaryId findPart primaryId secondaryId getChildren matchingParts findPart primaryId getChildren matchingParts matchingParts matchingParts MatchingPart mostSignificantPart MatchingPart matchingParts mostSignificantPart mostSignificantPart
Matching Part String pid String sid Layout Part part this pid pid this sid sid this part part this len pid null 0 pid length sid null 0 sid length this has Wildcard pid null pid index Of Part Placeholder WILD CARD 1 sid null sid index Of Part Placeholder WILD CARD 1  MatchingPart LayoutPart hasWildcard indexOf PartPlaceholder WILD_CARD indexOf PartPlaceholder WILD_CARD
public int compare To Object a specific ids always outweigh ids with wildcards Matching Part ma Matching Part a if this has Wildcard ma has Wildcard return 1 if this has Wildcard ma has Wildcard return 1 if both are specific or both have wildcards simply compare based on length return ma len this len  compareTo MatchingPart MatchingPart hasWildcard hasWildcard hasWildcard hasWildcard
Find the first part with a given ID in the presentation private Layout Part find Part String id Layout Part parts Array List matching Parts for int i 0 length parts length i length i Layout Part part parts i check for part equality parts with secondary ids fail if part getID equals id if part instanceof View Pane View Pane pane View Pane part I View Reference ref I View Reference pane get Part Reference if ref get Secondary Id null continue return part check pattern matching placeholders else if part instanceof Part Placeholder Part Placeholder part has Wild Card String Matcher sm new String Matcher part getID true false if sm match id matching Parts add new Matching Part part getID null part else if part instanceof Editor Sash Container Skip else if part instanceof I Layout Container part find Part id I Layout Container part get Children matching Parts if part null return part return null  LayoutPart findPart LayoutPart ArrayList matchingParts LayoutPart ViewPane ViewPane ViewPane IViewReference IViewReference getPartReference getSecondaryId PartPlaceholder PartPlaceholder hasWildCard StringMatcher StringMatcher matchingParts MatchingPart EditorSashContainer ILayoutContainer findPart ILayoutContainer getChildren matchingParts
Find the first part that matches the specified primary and secondary id pair Wild cards are supported private Layout Part find Part String primary Id String secondary Id Layout Part parts Array List matching Parts for int i 0 length parts length i length i Layout Part part parts i check containers first if part instanceof I Layout Container Layout Part test Part find Part primary Id secondary Id I Layout Container part get Children matching Parts if test Part null return test Part check for view part equality if part instanceof View Pane View Pane pane View Pane part I View Reference ref I View Reference pane get Part Reference if ref get Id equals primary Id ref get Secondary Id null ref get Secondary Id equals secondary Id return part check placeholders else if parts i instanceof Part Placeholder String id part getID optimization don t bother parsing id if it has no separator it can t match String ph Secondary Id View Factory extract Secondary Id id if ph Secondary Id null but still need to check for wildcard case if id equals Part Placeholder WILD CARD matching Parts add new Matching Part id null part continue String ph Primary Id View Factory extract Primary Id id perfect matching pair if ph Primary Id equals primary Id ph Secondary Id equals secondary Id return part check for partial matching pair Matching Part matching Part String Matcher sm new String Matcher ph Primary Id true false if sm match primary Id sm new String Matcher ph Secondary Id true false if sm match secondary Id matching Parts add new Matching Part ph Primary Id ph Secondary Id part else if part instanceof Editor Sash Container Skip return null  LayoutPart findPart primaryId secondaryId LayoutPart ArrayList matchingParts LayoutPart ILayoutContainer LayoutPart testPart findPart primaryId secondaryId ILayoutContainer getChildren matchingParts testPart testPart ViewPane ViewPane ViewPane IViewReference IViewReference getPartReference getId primaryId getSecondaryId getSecondaryId secondaryId PartPlaceholder phSecondaryId ViewFactory extractSecondaryId phSecondaryId PartPlaceholder WILD_CARD matchingParts MatchingPart phPrimaryId ViewFactory extractPrimaryId phPrimaryId primaryId phSecondaryId secondaryId MatchingPart matchingPart StringMatcher StringMatcher phPrimaryId primaryId StringMatcher phSecondaryId secondaryId matchingParts MatchingPart phPrimaryId phSecondaryId EditorSashContainer
Returns true if a placeholder exists for a given ID public boolean has Placeholder String id return has Placeholder id null  hasPlaceholder hasPlaceholder
Returns true if a placeholder exists for a given ID since 3 0 public boolean has Placeholder String primary Id String secondary Id Layout Part test Part if secondary Id null test Part find Part primary Id else test Part find Part primary Id secondary Id return test Part null test Part instanceof Part Placeholder  hasPlaceholder primaryId secondaryId LayoutPart testPart secondaryId testPart findPart primaryId testPart findPart primaryId secondaryId testPart testPart PartPlaceholder
Returns the layout container public View Sash Container get Layout return main Layout  ViewSashContainer getLayout mainLayout
Gets the active state public boolean is Active return active  isActive
Returns whether the part is a fast view or not private boolean is Fast View I Workbench Part Reference ref if ref instanceof I View Reference Workbench Page page Workbench Page ref get Page return page is Fast View I View Reference ref return false  isFastView IWorkbenchPartReference IViewReference WorkbenchPage WorkbenchPage getPage isFastView IViewReference
Returns whether the presentation is zoomed public boolean is Zoomed return zoom Part null  isZoomed zoomPart
Returns the ratio that should be used when docking the given source part onto the given target param source newly added part param target existing part being dragged over return the final size of the source part wrt the current size of target after it is docked public static float get Docking Ratio Layout Part source Layout Part target if source instanceof View Pane source instanceof View Stack target instanceof Editor Sash Container return 0 25f return 0 5f  getDockingRatio LayoutPart LayoutPart ViewPane ViewStack EditorSashContainer
Returns whether changes to a part will affect zoom There are a few conditions for this we are zoomed the part is contained in the main window the part is not the zoom part the part is not a fast view the part and the zoom part are not in the same editor workbook public boolean part Change Affects Zoom Part Pane pane if zoom Part null return false if pane get Window get Shell page get Workbench Window get Shell return false if pane is Zoomed return false if is Fast View pane get Part Reference return false Part Pane zoom Pane Workbench Part Reference zoom Part get Pane if pane instanceof Editor Pane zoom Pane instanceof Editor Pane if Editor Pane pane get Workbook equals Editor Pane zoom Pane get Workbook return false return true  partChangeAffectsZoom PartPane zoomPart getWindow getShell getWorkbenchWindow getShell isZoomed isFastView getPartReference PartPane zoomPane WorkbenchPartReference zoomPart getPane EditorPane zoomPane EditorPane EditorPane getWorkbook EditorPane zoomPane getWorkbook
Remove all references to a part public void remove Part Layout Part part If part added removed always zoom out if is Zoomed zoom Out Reparent the part back to the main window Composite parent main Layout get Parent part reparent parent Replace part with a placeholder I Layout Container container part get Container if container null String place Holder Id part get Place Holder Id container replace part new Part Placeholder place Holder Id If the parent is root we re done Do not try to replace it with placeholder if container main Layout return If the parent is empty replace it with a placeholder Layout Part children container get Children if children null boolean all Invisible true for int i 0 length children length i length i if children i instanceof Part Placeholder all Invisible false break if all Invisible container instanceof Layout Part what type of window are we in Layout Part c Part Layout Part container Window old Window c Part get Window if old Window instanceof Workbench Window PR 1GDFVBY View Stack not disposed when page closed if container instanceof View Stack View Stack container dispose replace the real container with a Container Placeholder I Layout Container parent Container c Part get Container Container Placeholder placeholder new Container Placeholder c Part getID placeholder set Real Container container parent Container replace c Part placeholder else if old Window instanceof Detached Window Detached Place Holder placeholder new Detached Place Holder old Window get Shell get Bounds NON NLS 1 for int i 0 length children length i length i children i get Container remove children i children i set Container placeholder placeholder add children i detached Place Holder List add placeholder old Window close detached Window List remove old Window  removePart LayoutPart isZoomed zoomOut mainLayout getParent ILayoutContainer getContainer placeHolderId getPlaceHolderId PartPlaceholder placeHolderId mainLayout LayoutPart getChildren allInvisible PartPlaceholder allInvisible allInvisible LayoutPart LayoutPart cPart LayoutPart oldWindow cPart getWindow oldWindow WorkbenchWindow ViewStack ViewStack ViewStack ContainerPlaceholder ILayoutContainer parentContainer cPart getContainer ContainerPlaceholder ContainerPlaceholder cPart setRealContainer parentContainer cPart oldWindow DetachedWindow DetachedPlaceHolder DetachedPlaceHolder oldWindow getShell getBounds getContainer setContainer detachedPlaceHolderList oldWindow detachedWindowList oldWindow
Add a part to the presentation Note unlike all other Layout Parts Part Placeholders will still point to their parent container even when it is inactive This method relies on this fact to locate the parent public void replace Placeholder With Part Layout Part part If part added removed always zoom out if is Zoomed zoom Out Look for a Part Placeholder that will tell us how to position this object Part Placeholder placeholders collect Placeholders for int i 0 length placeholders length i length i if placeholders i get Compound Id equals part get Compound Id found a matching placeholder which we can replace with the new View I Layout Container container placeholders i get Container if container null if container instanceof Container Placeholder One of the children is now visible so replace the Container Placeholder with the real container Container Placeholder container Placeholder Container Placeholder container I Layout Container parent Container container Placeholder get Container container I Layout Container container Placeholder get Real Container if container instanceof Layout Part parent Container replace container Placeholder Layout Part container container Placeholder set Real Container null container replace placeholders i part return If there was no placeholder then the editor workbook is not in the workbench That s OK Just return  LayoutParts PartPlaceholders replacePlaceholderWithPart LayoutPart isZoomed zoomOut PartPlaceholder PartPlaceholder collectPlaceholders getCompoundId getCompoundId ILayoutContainer getContainer ContainerPlaceholder ContainerPlaceholder ContainerPlaceholder containerPlaceholder ContainerPlaceholder ILayoutContainer parentContainer containerPlaceholder getContainer ILayoutContainer containerPlaceholder getRealContainer LayoutPart parentContainer containerPlaceholder LayoutPart containerPlaceholder setRealContainer
see I Persistable Part public I Status restore State I Memento memento Restore main window I Memento child Mem memento get Child I Workbench Constants TAG MAIN WINDOW I Status r main Layout restore State child Mem Restore each floating window if detachable I Memento detached Windows memento get Children I Workbench Constants TAG DETACHED WINDOW for int nX 0 nX detached Windows length nX Detached Window win new Detached Window page detached Window List add win win restore State detached Windows nX I Memento children Mem memento get Children I Workbench Constants TAG HIDDEN WINDOW for int i 0 length children Mem length i length i Detached Place Holder holder new Detached Place Holder new Rectangle 0 0 0 0 NON NLS 1 holder restore State children Mem i detached Place Holder List add holder return r  IPersistablePart IStatus restoreState IMemento IMemento childMem getChild IWorkbenchConstants TAG_MAIN_WINDOW IStatus mainLayout restoreState childMem IMemento detachedWindows getChildren IWorkbenchConstants TAG_DETACHED_WINDOW detachedWindows DetachedWindow DetachedWindow detachedWindowList restoreState detachedWindows IMemento childrenMem getChildren IWorkbenchConstants TAG_HIDDEN_WINDOW childrenMem DetachedPlaceHolder DetachedPlaceHolder restoreState childrenMem detachedPlaceHolderList
see I Persistable Part public I Status save State I Memento memento Persist main window I Memento child Mem memento create Child I Workbench Constants TAG MAIN WINDOW I Status r main Layout save State child Mem if detachable Persist each detached window for int i 0 length detached Window List size i length i Detached Window window Detached Window detached Window List get i child Mem memento create Child I Workbench Constants TAG DETACHED WINDOW window save State child Mem for int i 0 length detached Place Holder List size i length i Detached Place Holder holder Detached Place Holder detached Place Holder List get i child Mem memento create Child I Workbench Constants TAG HIDDEN WINDOW holder save State child Mem return r  IPersistablePart IStatus saveState IMemento IMemento childMem createChild IWorkbenchConstants TAG_MAIN_WINDOW IStatus mainLayout saveState childMem detachedWindowList DetachedWindow DetachedWindow detachedWindowList childMem createChild IWorkbenchConstants TAG_DETACHED_WINDOW saveState childMem detachedPlaceHolderList DetachedPlaceHolder DetachedPlaceHolder detachedPlaceHolderList childMem createChild IWorkbenchConstants TAG_HIDDEN_WINDOW saveState childMem
Zoom in on a particular layout part public void zoom In I Workbench Part Reference ref Part Pane pane Workbench Part Reference ref get Pane Save zoom part zoom Part ref If view if pane instanceof View Pane parent Widget set Redraw false try I Layout Container parent Container View Pane pane get Container if parent Container instanceof View Stack Check if it is a View Stack as we only want to zoom the folder TODO Remove once all views are in View Stack TODO See Bug 48794 View Stack parent View Stack parent Container Perspective persp page get Active Perspective if persp null ref instanceof I View Reference page is Fast View I View Reference ref persp hide Fast View Sash main Layout zoom In parent pane set Zoomed true finally parent Widget set Redraw true If editor else if pane instanceof Editor Pane parent Widget set Redraw false try Editor Stack wb Editor Pane pane get Workbook Editor Sash Container ea wb get Editor Area main Layout zoom In ea ea zoom In wb wb set Zoomed true pane set Zoomed true finally parent Widget set Redraw true Otherwise else zoom Part null return  zoomIn IWorkbenchPartReference PartPane WorkbenchPartReference getPane zoomPart ViewPane parentWidget setRedraw ILayoutContainer parentContainer ViewPane getContainer parentContainer ViewStack ViewStack ViewStack ViewStack ViewStack parentContainer getActivePerspective IViewReference isFastView IViewReference hideFastViewSash mainLayout zoomIn setZoomed parentWidget setRedraw EditorPane parentWidget setRedraw EditorStack EditorPane getWorkbook EditorSashContainer getEditorArea mainLayout zoomIn zoomIn setZoomed setZoomed parentWidget setRedraw zoomPart
Zoom out public void zoom Out Sanity check if zoom Part null return Part Pane pane Workbench Part Reference zoom Part get Pane if pane instanceof View Pane parent Widget set Redraw false main Layout zoom Out pane set Zoomed false Perspective persp page get Active Perspective if persp null zoom Part instanceof I View Reference page is Fast View I View Reference zoom Part persp show Fast View I View Reference zoom Part parent Widget set Redraw true else if pane instanceof Editor Pane parent Widget set Redraw false Editor Stack wb Editor Pane pane get Workbook Editor Sash Container ea wb get Editor Area wb set Zoomed false ea zoom Out main Layout zoom Out pane set Zoomed false parent Widget set Redraw true else if null parent Widget set Redraw false main Layout zoom Out parent Widget set Redraw true Deref all zoom Part null  zoomOut zoomPart PartPane WorkbenchPartReference zoomPart getPane ViewPane parentWidget setRedraw mainLayout zoomOut setZoomed getActivePerspective zoomPart IViewReference isFastView IViewReference zoomPart showFastView IViewReference zoomPart parentWidget setRedraw EditorPane parentWidget setRedraw EditorStack EditorPane getWorkbook EditorSashContainer getEditorArea setZoomed zoomOut mainLayout zoomOut setZoomed parentWidget setRedraw parentWidget setRedraw mainLayout zoomOut parentWidget setRedraw zoomPart

private Listener List listeners new Listener List public Perspective History I Perspective Registry reg this shortcuts new Array List DEFAULT DEPTH this reg reg  ListenerList ListenerList PerspectiveHistory IPerspectiveRegistry ArrayList DEFAULT_DEPTH
public void add Listener I Property Listener l listeners add l  addListener IPropertyListener
public void remove Listener I Property Listener l listeners remove l  removeListener IPropertyListener
private void fire Change Object array listeners get Listeners for int i 0 i array length i I Property Listener element I Property Listener array i element property Changed this 0  fireChange getListeners IPropertyListener IPropertyListener propertyChanged
public I Status restore State I Memento memento I Memento children memento get Children desc NON NLS 1 for int i 0 i children length i DEFAULT DEPTH i I Perspective Descriptor desc reg find Perspective With Id children i getID if desc null shortcuts add desc return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1  IStatus restoreState IMemento IMemento getChildren DEFAULT_DEPTH IPerspectiveDescriptor findPerspectiveWithId IStatus PLUGIN_ID
public I Status save State I Memento memento Iterator iter shortcuts iterator while iter has Next I Perspective Descriptor desc I Perspective Descriptor iter next memento create Child desc desc get Id NON NLS 1 return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1  IStatus saveState IMemento hasNext IPerspectiveDescriptor IPerspectiveDescriptor createChild getId IStatus PLUGIN_ID
public void add String id I Perspective Descriptor desc reg find Perspective With Id id if desc null add desc  IPerspectiveDescriptor findPerspectiveWithId
public void add I Perspective Descriptor desc Avoid duplicates if shortcuts contains desc return If the shortcut list will be too long remove oldest ones int size shortcuts size int preferred Size DEFAULT DEPTH while size preferred Size size shortcuts remove size Insert at top as most recent shortcuts add 0 desc fire Change  IPerspectiveDescriptor preferredSize DEFAULT_DEPTH preferredSize fireChange
public void refresh From Registry boolean change false Iterator iter shortcuts iterator while iter has Next I Perspective Descriptor desc I Perspective Descriptor iter next if reg find Perspective With Id desc get Id null iter remove change true if change fire Change  refreshFromRegistry hasNext IPerspectiveDescriptor IPerspectiveDescriptor findPerspectiveWithId getId fireChange
Copy the requested number of items from the history into the destination list at the given index param dest destination list to contain the items param dest Start index in destination list to start copying items at param count number of items to copy from history return the number of items actually copied public int copy Items List dest int dest Start int count int item Count count if item Count shortcuts size item Count shortcuts size for int i 0 i item Count i dest add dest Start i shortcuts get i return item Count  destStart copyItems destStart itemCount itemCount itemCount itemCount destStart itemCount
for dynamic UI public void remove Item Object item for int i 0 i shortcuts size i if shortcuts get i item shortcuts remove i break  removeItem

private Listener List listeners new Listener List Perspective Listener List constructor comment public Perspective Listener List super  ListenerList ListenerList PerspectiveListenerList PerspectiveListenerList
Adds an I Internal Perspective Listener to the perspective service public void add Perspective Listener I Internal Perspective Listener l listeners add l  IInternalPerspectiveListener addPerspectiveListener IInternalPerspectiveListener
final I Internal Perspective Listener l I Internal Perspective Listener array nX Platform run new Safe Runnable public void run l perspective Activated page perspective  IInternalPerspectiveListener IInternalPerspectiveListener SafeRunnable perspectiveActivated
Notifies the listener that a perspective has been activated public void fire Perspective Activated final I Workbench Page page final I Perspective Descriptor perspective Object array listeners get Listeners for int nX 0 nX array length nX final I Internal Perspective Listener l I Internal Perspective Listener array nX Platform run new Safe Runnable public void run l perspective Activated page perspective  firePerspectiveActivated IWorkbenchPage IPerspectiveDescriptor getListeners IInternalPerspectiveListener IInternalPerspectiveListener SafeRunnable perspectiveActivated
final I Internal Perspective Listener l I Internal Perspective Listener array nX Platform run new Safe Runnable public void run l perspective Changed page perspective change Id  IInternalPerspectiveListener IInternalPerspectiveListener SafeRunnable perspectiveChanged changeId
Notifies the listener that a perspective has been changed public void fire Perspective Changed final I Workbench Page page final I Perspective Descriptor perspective final String change Id Object array listeners get Listeners for int nX 0 nX array length nX final I Internal Perspective Listener l I Internal Perspective Listener array nX Platform run new Safe Runnable public void run l perspective Changed page perspective change Id  firePerspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId getListeners IInternalPerspectiveListener IInternalPerspectiveListener SafeRunnable perspectiveChanged changeId
final I Internal Perspective Listener l I Internal Perspective Listener array nX Platform run new Safe Runnable public void run l perspective Closed page perspective  IInternalPerspectiveListener IInternalPerspectiveListener SafeRunnable perspectiveClosed
Notifies the listener that a perspective has been closed public void fire Perspective Closed final I Workbench Page page final I Perspective Descriptor perspective Object array listeners get Listeners for int nX 0 nX array length nX final I Internal Perspective Listener l I Internal Perspective Listener array nX Platform run new Safe Runnable public void run l perspective Closed page perspective  firePerspectiveClosed IWorkbenchPage IPerspectiveDescriptor getListeners IInternalPerspectiveListener IInternalPerspectiveListener SafeRunnable perspectiveClosed
final I Internal Perspective Listener l I Internal Perspective Listener array nX Platform run new Safe Runnable public void run l perspective Opened page perspective  IInternalPerspectiveListener IInternalPerspectiveListener SafeRunnable perspectiveOpened
Notifies the listener that a perspective has been opened public void fire Perspective Opened final I Workbench Page page final I Perspective Descriptor perspective Object array listeners get Listeners for int nX 0 nX array length nX final I Internal Perspective Listener l I Internal Perspective Listener array nX Platform run new Safe Runnable public void run l perspective Opened page perspective  firePerspectiveOpened IWorkbenchPage IPerspectiveDescriptor getListeners IInternalPerspectiveListener IInternalPerspectiveListener SafeRunnable perspectiveOpened
Removes an I Internal Perspective Listener from the perspective service public void remove Perspective Listener I Internal Perspective Listener l listeners remove l  IInternalPerspectiveListener removePerspectiveListener IInternalPerspectiveListener

private Listener List listeners new Listener List Perspective Listener List constructor comment public Perspective Listener List Old super  ListenerList ListenerList PerspectiveListenerList PerspectiveListenerListOld
Adds an I Perspective Listener to the perspective service public void add Perspective Listener I Perspective Listener l listeners add l  IPerspectiveListener addPerspectiveListener IPerspectiveListener
final I Perspective Listener l I Perspective Listener array nX Platform run new Safe Runnable public void run l perspective Activated page perspective  IPerspectiveListener IPerspectiveListener SafeRunnable perspectiveActivated
Notifies the listener that a perspective has been activated public void fire Perspective Activated final I Workbench Page page final I Perspective Descriptor perspective Object array listeners get Listeners for int nX 0 nX array length nX final I Perspective Listener l I Perspective Listener array nX Platform run new Safe Runnable public void run l perspective Activated page perspective  firePerspectiveActivated IWorkbenchPage IPerspectiveDescriptor getListeners IPerspectiveListener IPerspectiveListener SafeRunnable perspectiveActivated
final I Perspective Listener l I Perspective Listener array nX Platform run new Safe Runnable public void run l perspective Changed page perspective change Id  IPerspectiveListener IPerspectiveListener SafeRunnable perspectiveChanged changeId
Notifies the listener that a perspective has been changed public void fire Perspective Changed final I Workbench Page page final I Perspective Descriptor perspective final String change Id Object array listeners get Listeners for int nX 0 nX array length nX final I Perspective Listener l I Perspective Listener array nX Platform run new Safe Runnable public void run l perspective Changed page perspective change Id  firePerspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId getListeners IPerspectiveListener IPerspectiveListener SafeRunnable perspectiveChanged changeId
final I Perspective Listener2 l2 I Perspective Listener2 array nX Platform run new Safe Runnable public void run l2 perspective Changed page perspective part Ref change Id  IPerspectiveListener2 IPerspectiveListener2 SafeRunnable perspectiveChanged partRef changeId
Notifies the listener that a part has been affected in the given perspective public void fire Perspective Changed final I Workbench Page page final I Perspective Descriptor perspective final I Workbench Part Reference part Ref final String change Id Object array listeners get Listeners for int nX 0 nX array length nX if array nX instanceof I Perspective Listener2 final I Perspective Listener2 l2 I Perspective Listener2 array nX Platform run new Safe Runnable public void run l2 perspective Changed page perspective part Ref change Id  firePerspectiveChanged IWorkbenchPage IPerspectiveDescriptor IWorkbenchPartReference partRef changeId getListeners IPerspectiveListener2 IPerspectiveListener2 IPerspectiveListener2 SafeRunnable perspectiveChanged partRef changeId
Removes an I Perspective Listener from the perspective service public void remove Perspective Listener I Perspective Listener l listeners remove l  IPerspectiveListener removePerspectiveListener IPerspectiveListener

private Listener popup Listener new Listener public void handle Event Event event if event type SWT Menu Detect show Perspective Bar Popup new Point event x event y  popupListener handleEvent MenuDetect showPerspectiveBarPopup
and each Workbench Window has its own Perspective Switcher tool Bar Listener new Dispose Listener public void widget Disposed Dispose Event e dispose  WorkbenchWindow PerspectiveSwitcher toolBarListener DisposeListener widgetDisposed DisposeEvent
public Perspective Switcher Workbench Window window C Banner top Bar int style this window window this top Bar top Bar this style style set Property Change Listener this listener will only be run when the Shell is being disposed and each Workbench Window has its own Perspective Switcher tool Bar Listener new Dispose Listener public void widget Disposed Dispose Event e dispose  PerspectiveSwitcher WorkbenchWindow CBanner topBar topBar topBar setPropertyChangeListener WorkbenchWindow PerspectiveSwitcher toolBarListener DisposeListener widgetDisposed DisposeEvent
private static int convert Location String preference if I Workbench Preference Constants TOP RIGHT equals preference return TOP RIGHT if I Workbench Preference Constants TOP LEFT equals preference return TOP LEFT if I Workbench Preference Constants LEFT equals preference return LEFT TODO log the unknown preference return TOP RIGHT  convertLocation IWorkbenchPreferenceConstants TOP_RIGHT TOP_RIGHT IWorkbenchPreferenceConstants TOP_LEFT TOP_LEFT IWorkbenchPreferenceConstants TOP_RIGHT
public void create Control Composite parent Assert is True this parent null this parent parent set the initial location read from the preference set Perspective Bar Location Pref Util getAPI Preference Store get String I Workbench Preference Constants DOCK PERSPECTIVE BAR  createControl isTrue setPerspectiveBarLocation PrefUtil getAPIPreferenceStore getString IWorkbenchPreferenceConstants DOCK_PERSPECTIVE_BAR
public void add Perspective Shortcut I Perspective Descriptor perspective Workbench Page workbench Page if perspective Bar null return Perspective Bar Contribution Item item new Perspective Bar Contribution Item perspective workbench Page perspective Bar add Item item set Cool Item Size cool Item This is need to update the vertical size of the tool bar on GTK when using large fonts if perspective Bar null perspective Bar update true  addPerspectiveShortcut IPerspectiveDescriptor WorkbenchPage workbenchPage perspectiveBar PerspectiveBarContributionItem PerspectiveBarContributionItem workbenchPage perspectiveBar addItem setCoolItemSize coolItem perspectiveBar perspectiveBar
public I Contribution Item find Perspective Shortcut I Perspective Descriptor perspective Workbench Page page if perspective Bar null return null I Contribution Item items perspective Bar get Items int length items length for int i 0 i length i I Contribution Item item items i if item instanceof Perspective Bar Contribution Item Perspective Bar Contribution Item item handles perspective page return item return null  IContributionItem findPerspectiveShortcut IPerspectiveDescriptor WorkbenchPage perspectiveBar IContributionItem perspectiveBar getItems IContributionItem PerspectiveBarContributionItem PerspectiveBarContributionItem
public void remove Perspective Shortcut I Perspective Descriptor perspective Workbench Page page if perspective Bar null return I Contribution Item item find Perspective Shortcut perspective page if item null if item instanceof Perspective Bar Contribution Item perspective Bar remove Item Perspective Bar Contribution Item item item dispose perspective Bar update false set Cool Item Size cool Item  removePerspectiveShortcut IPerspectiveDescriptor WorkbenchPage perspectiveBar IContributionItem findPerspectiveShortcut PerspectiveBarContributionItem perspectiveBar removeItem PerspectiveBarContributionItem perspectiveBar setCoolItemSize coolItem
public void set Perspective Bar Location String preference return if the control has not been created create Control will handle updating the state in that case if parent null return int new Location convert Location preference if new Location current Location return create Control For Location new Location current Location new Location show Perspective Bar if new Location TOP LEFT new Location TOP RIGHT update Perspective Bar set Cool Item Size cool Item  setPerspectiveBarLocation createControl newLocation convertLocation newLocation currentLocation createControlForLocation newLocation currentLocation newLocation showPerspectiveBar newLocation TOP_LEFT newLocation TOP_RIGHT updatePerspectiveBar setCoolItemSize coolItem
Make the perspective bar visible in its current location This method should not be used unless the control has been successfully created private void show Perspective Bar switch current Location case TOP LEFT top Bar set Right null top Bar set Bottom perspective Cool Bar Wrapper get Control break case TOP RIGHT top Bar set Bottom null top Bar set Right perspective Cool Bar Wrapper get Control top Bar set Right Width DEFAULT RIGHT X break case LEFT top Bar set Bottom null top Bar set Right null Layout Util resize top Bar window add Perspective Bar To Trim trim Control SWT LEFT break default TODO log return Layout Util resize perspective Bar get Control  showPerspectiveBar currentLocation TOP_LEFT topBar setRight topBar setBottom perspectiveCoolBarWrapper getControl TOP_RIGHT topBar setBottom topBar setRight perspectiveCoolBarWrapper getControl topBar setRightWidth DEFAULT_RIGHT_X topBar setBottom topBar setRight LayoutUtil topBar addPerspectiveBarToTrim trimControl LayoutUtil perspectiveBar getControl
public void update boolean force if perspective Bar null return perspective Bar update force if current Location LEFT Tool Item items perspective Bar get Control get Items boolean should Expand items length 0 if should Expand trim Visible perspective Bar get Control set Visible true trim Visible should Expand if items length trim Old Length Layout Util resize trim Control trim Old Length items length  perspectiveBar perspectiveBar currentLocation ToolItem perspectiveBar getControl getItems shouldExpand shouldExpand trimVisible perspectiveBar getControl setVisible trimVisible shouldExpand trimOldLength LayoutUtil trimControl trimOldLength
public void select Perspective Shortcut I Perspective Descriptor perspective Workbench Page page boolean selected I Contribution Item item find Perspective Shortcut perspective page if item null item instanceof Perspective Bar Contribution Item if selected check if not visible and ensure visible Perspective Bar Contribution Item contrib Item Perspective Bar Contribution Item item perspective Bar select contrib Item select or de select Perspective Bar Contribution Item item set Selection selected  selectPerspectiveShortcut IPerspectiveDescriptor WorkbenchPage IContributionItem findPerspectiveShortcut PerspectiveBarContributionItem PerspectiveBarContributionItem contribItem PerspectiveBarContributionItem perspectiveBar contribItem PerspectiveBarContributionItem setSelection
public void update Perspective Shortcut I Perspective Descriptor old Desc I Perspective Descriptor new Desc Workbench Page page I Contribution Item item find Perspective Shortcut old Desc page if item null item instanceof Perspective Bar Contribution Item Perspective Bar Contribution Item item update new Desc  updatePerspectiveShortcut IPerspectiveDescriptor oldDesc IPerspectiveDescriptor newDesc WorkbenchPage IContributionItem findPerspectiveShortcut oldDesc PerspectiveBarContributionItem PerspectiveBarContributionItem newDesc
public Perspective Bar Manager get Perspective Bar return perspective Bar  PerspectiveBarManager getPerspectiveBar perspectiveBar
public void dispose if property Change Listener null api Preference Store remove Property Change Listener property Change Listener property Change Listener null tool Bar Listener null  propertyChangeListener apiPreferenceStore removePropertyChangeListener propertyChangeListener propertyChangeListener toolBarListener
private void dispose Child Controls if trim Control null trim Control dispose trim Control null if trim Separator null trim Separator dispose trim Separator null if perspective Cool Bar null perspective Cool Bar dispose perspective Cool Bar null if toolbar Wrapper null toolbar Wrapper dispose toolbar Wrapper null if perspective Bar null perspective Bar dispose perspective Bar null perspective Cool Bar Wrapper null  disposeChildControls trimControl trimControl trimControl trimSeparator trimSeparator trimSeparator perspectiveCoolBar perspectiveCoolBar perspectiveCoolBar toolbarWrapper toolbarWrapper toolbarWrapper perspectiveBar perspectiveBar perspectiveBar perspectiveCoolBarWrapper
Ensures the control has been set for the argument location If the control already exists and can be used the argument location nothing happens Updates the location attribute param new Location private void create Control For Location int new Location if there is a control then perhaps it can be reused if perspective Bar null perspective Bar get Control null perspective Bar get Control is Disposed if new Location LEFT current Location LEFT return if new Location TOP LEFT new Location TOP RIGHT current Location TOP LEFT current Location TOP RIGHT return if perspective Bar null perspective Bar get Control remove Dispose Listener tool Bar Listener otherwise dispose the current controls and make new ones dispose Child Controls if new Location LEFT create Control For Left else create Control For Top perspective Bar get Control add Dispose Listener tool Bar Listener  newLocation createControlForLocation newLocation perspectiveBar perspectiveBar getControl perspectiveBar getControl isDisposed newLocation currentLocation newLocation TOP_LEFT newLocation TOP_RIGHT currentLocation TOP_LEFT currentLocation TOP_RIGHT perspectiveBar perspectiveBar getControl removeDisposeListener toolBarListener disposeChildControls newLocation createControlForLeft createControlForTop perspectiveBar getControl addDisposeListener toolBarListener
public void property Change Property Change Event property Change Event if I Workbench Preference Constants SHOW TEXT ON PERSPECTIVE BAR equals property Change Event get Property if perspective Bar null return I Contribution Item items perspective Bar get Items for int i 0 i items length i items i update perspective Bar update true set Cool Item Size cool Item  propertyChange PropertyChangeEvent propertyChangeEvent IWorkbenchPreferenceConstants SHOW_TEXT_ON_PERSPECTIVE_BAR propertyChangeEvent getProperty perspectiveBar IContributionItem perspectiveBar getItems perspectiveBar setCoolItemSize coolItem
private void set Property Change Listener property Change Listener new I Property Change Listener public void property Change Property Change Event property Change Event if I Workbench Preference Constants SHOW TEXT ON PERSPECTIVE BAR equals property Change Event get Property if perspective Bar null return I Contribution Item items perspective Bar get Items for int i 0 i items length i items i update perspective Bar update true set Cool Item Size cool Item api Preference Store add Property Change Listener property Change Listener  setPropertyChangeListener propertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent propertyChangeEvent IWorkbenchPreferenceConstants SHOW_TEXT_ON_PERSPECTIVE_BAR propertyChangeEvent getProperty perspectiveBar IContributionItem perspectiveBar getItems perspectiveBar setCoolItemSize coolItem apiPreferenceStore addPropertyChangeListener propertyChangeListener
private void create Control For Left trim Control new Composite parent SWT NONE trim Control set Layout new Cell Layout 1 set Margins 0 0 set Spacing 3 3 set Default Row Row fixed set Default Column Row growing perspective Bar create Bar Manager SWT VERTICAL perspective Bar create Control trim Control perspective Bar get Control add Listener SWT Menu Detect popup Listener trim Separator new Label trim Control SWT SEPARATOR SWT HORIZONTAL Grid Data sep Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data HORIZONTAL ALIGN CENTER sep Data width Hint SEPARATOR LENGTH trim Separator set Layout Data sep Data trim Layout Data new Grid Data Grid Data FILL BOTH trim Visible false perspective Bar get Control set Layout Data trim Layout Data  createControlForLeft trimControl trimControl setLayout CellLayout setMargins setSpacing setDefaultRow setDefaultColumn perspectiveBar createBarManager perspectiveBar createControl trimControl perspectiveBar getControl addListener MenuDetect popupListener trimSeparator trimControl GridData sepData GridData GridData VERTICAL_ALIGN_BEGINNING GridData HORIZONTAL_ALIGN_CENTER sepData widthHint SEPARATOR_LENGTH trimSeparator setLayoutData sepData trimLayoutData GridData GridData FILL_BOTH trimVisible perspectiveBar getControl setLayoutData trimLayoutData
adjust the toolbar size to display as many items as possible perspective Cool Bar add Control Listener new Control Adapter public void control Resized Control Event e set Cool Item Size cool Item  perspectiveCoolBar addControlListener ControlAdapter controlResized ControlEvent setCoolItemSize coolItem
cool Item add Selection Listener new Selection Adapter public void widget Selected Selection Event e if e detail SWT ARROW if perspective Bar null perspective Bar handle Chevron e  coolItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent perspectiveBar perspectiveBar handleChevron
private void create Control For Top perspective Bar create Bar Manager SWT HORIZONTAL perspective Cool Bar Wrapper new Cache Wrapper top Bar perspective Cool Bar new Cool Bar perspective Cool Bar Wrapper get Control SWT FLAT cool Item new Cool Item perspective Cool Bar SWT DROP DOWN toolbar Wrapper new Cache Wrapper perspective Cool Bar perspective Bar create Control toolbar Wrapper get Control cool Item set Control toolbar Wrapper get Control perspective Cool Bar set Locked true perspective Bar set Parent perspective Cool Bar perspective Bar update true adjust the toolbar size to display as many items as possible perspective Cool Bar add Control Listener new Control Adapter public void control Resized Control Event e set Cool Item Size cool Item cool Item add Selection Listener new Selection Adapter public void widget Selected Selection Event e if e detail SWT ARROW if perspective Bar null perspective Bar handle Chevron e cool Item set Minimum Size 0 0 perspective Bar get Control add Listener SWT Menu Detect popup Listener  createControlForTop perspectiveBar createBarManager perspectiveCoolBarWrapper CacheWrapper topBar perspectiveCoolBar CoolBar perspectiveCoolBarWrapper getControl coolItem CoolItem perspectiveCoolBar DROP_DOWN toolbarWrapper CacheWrapper perspectiveCoolBar perspectiveBar createControl toolbarWrapper getControl coolItem setControl toolbarWrapper getControl perspectiveCoolBar setLocked perspectiveBar setParent perspectiveCoolBar perspectiveBar perspectiveCoolBar addControlListener ControlAdapter controlResized ControlEvent setCoolItemSize coolItem coolItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent perspectiveBar perspectiveBar handleChevron coolItem setMinimumSize perspectiveBar getControl addListener MenuDetect popupListener
param cool Item param toolbar Wrapper private void set Cool Item Size final Cool Item cool Item there is no cool Item when the bar is on the left if current Location LEFT return Tool Bar toolbar perspective Bar get Control if toolbar null return calculate the minimum width int min Width 0 if perspective Bar get Control get Item Count 0 min Width perspective Bar get Control get Item 0 get Bounds width Perspective Bar Contribution Item get Max Width perspective Bar get Control get Item 0 get Image 50 Point cool Bar Size cool Item get Parent get Size if cool Bar Size x min Width Composite banner cool Item get Parent get Parent get Parent if banner instanceof C Banner C Banner banner set Right Width min Width Rectangle area perspective Cool Bar get Client Area int row Height toolbar get Item 0 get Bounds height This gets the height of the tallest item for int i 1 i perspective Bar get Control get Item Count i row Height Math max row Height perspective Bar get Control get Item i get Bounds height update the height in the case that we need to resize smaller In that case the client area might be too high area height top Bar get Left get Bounds height int rows row Height 0 1 int Math max 1 Math floor area height row Height if rows 1 toolbar get Style SWT WRAP 0 current Location TOP LEFT Point p toolbar compute Size SWT DEFAULT SWT DEFAULT cool Item set Size cool Item compute Size p x p y return Point offset cool Item compute Size 0 0 Point wrapped Size toolbar compute Size area width offset x SWT DEFAULT int h rows row Height int w wrapped Size y h wrapped Size x wrapped Size x 1 cool Item set Size cool Item compute Size w h  coolItem toolbarWrapper setCoolItemSize CoolItem coolItem coolItem currentLocation ToolBar perspectiveBar getControl minWidth perspectiveBar getControl getItemCount minWidth perspectiveBar getControl getItem getBounds PerspectiveBarContributionItem getMaxWidth perspectiveBar getControl getItem getImage coolBarSize coolItem getParent getSize coolBarSize minWidth coolItem getParent getParent getParent CBanner CBanner setRightWidth minWidth perspectiveCoolBar getClientArea rowHeight getItem getBounds perspectiveBar getControl getItemCount rowHeight rowHeight perspectiveBar getControl getItem getBounds topBar getLeft getBounds rowHeight rowHeight getStyle currentLocation TOP_LEFT computeSize coolItem setSize coolItem computeSize coolItem computeSize wrappedSize computeSize rowHeight wrappedSize wrappedSize wrappedSize coolItem setSize coolItem computeSize
menu Item add Selection Listener new Selection Adapter public void widget Selected Selection Event e Tool Item perspective Tool Item Tool Item popup Menu get Data if perspective Tool Item null perspective Tool Item is Disposed Perspective Bar Contribution Item item Perspective Bar Contribution Item perspective Tool Item get Data item get Page close Perspective item get Perspective true  menuItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent ToolItem perspectiveToolItem ToolItem popupMenu getData perspectiveToolItem perspectiveToolItem isDisposed PerspectiveBarContributionItem PerspectiveBarContributionItem perspectiveToolItem getData getPage closePerspective getPerspective
menu Item add Selection Listener new Selection Adapter public void widget Selected Selection Event e Tool Item perspective Tool Item Tool Item popup Menu get Data if perspective Tool Item null perspective Tool Item is Disposed Perspective Bar Contribution Item item Perspective Bar Contribution Item perspective Tool Item get Data item get Page close All Perspectives  menuItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent ToolItem perspectiveToolItem ToolItem popupMenu getData perspectiveToolItem perspectiveToolItem isDisposed PerspectiveBarContributionItem PerspectiveBarContributionItem perspectiveToolItem getData getPage closeAllPerspectives
private void show Perspective Bar Popup Point pt if perspective Bar null return Get the tool item under the mouse Tool Bar tool Bar perspective Bar get Control Tool Item tool Item tool Bar get Item tool Bar to Control pt Get the action for the tool item Object data null if tool Item null data tool Item get Data if tool Item null data instanceof Perspective Bar Contribution Item if generic Menu null Menu menu new Menu tool Bar add Dock On Sub Menu menu add Show Text Item menu generic Menu menu set the state of the menu items to match the preferences generic Menu get Item 1 set Selection Pref Util getAPI Preference Store get Boolean I Workbench Preference Constants SHOW TEXT ON PERSPECTIVE BAR update Location Items generic Menu get Item 0 get Menu current Location Show popup menu generic Menu set Location pt x pt y generic Menu set Visible true return if data null data instanceof Perspective Bar Contribution Item return The perspective bar menu is created lazily here Its data is set each time to the tool item which refers to the Set Page Perspective Action which in turn refers to the page and perspective It is important not to refer to the action the page or the perspective directly since otherwise the menu hangs on to them after they are closed By hanging onto the tool item instead these references are cleared when the corresponding page or perspective is closed See bug 11282 for more details on why it is done this way if popup Menu null Menu menu new Menu tool Bar Menu Item menu Item new Menu Item menu SWT NONE menu Item set Text Workbench Messages get String Workbench Window close NON NLS 1 menu Item add Selection Listener new Selection Adapter public void widget Selected Selection Event e Tool Item perspective Tool Item Tool Item popup Menu get Data if perspective Tool Item null perspective Tool Item is Disposed Perspective Bar Contribution Item item Perspective Bar Contribution Item perspective Tool Item get Data item get Page close Perspective item get Perspective true menu Item new Menu Item menu SWT NONE menu Item set Text Workbench Messages get String Workbench Window close All NON NLS 1 menu Item add Selection Listener new Selection Adapter public void widget Selected Selection Event e Tool Item perspective Tool Item Tool Item popup Menu get Data if perspective Tool Item null perspective Tool Item is Disposed Perspective Bar Contribution Item item Perspective Bar Contribution Item perspective Tool Item get Data item get Page close All Perspectives new Menu Item menu SWT SEPARATOR add Dock On Sub Menu menu add Show Text Item menu popup Menu menu popup Menu set Data tool Item set the state of the menu items to match the preferences popup Menu get Item 4 set Selection Pref Util getAPI Preference Store get Boolean I Workbench Preference Constants SHOW TEXT ON PERSPECTIVE BAR update Location Items popup Menu get Item 3 get Menu current Location Show popup menu popup Menu set Location pt x pt y popup Menu set Visible true  showPerspectiveBarPopup perspectiveBar ToolBar toolBar perspectiveBar getControl ToolItem toolItem toolBar getItem toolBar toControl toolItem toolItem getData toolItem PerspectiveBarContributionItem genericMenu toolBar addDockOnSubMenu addShowTextItem genericMenu genericMenu getItem setSelection PrefUtil getAPIPreferenceStore getBoolean IWorkbenchPreferenceConstants SHOW_TEXT_ON_PERSPECTIVE_BAR updateLocationItems genericMenu getItem getMenu currentLocation genericMenu setLocation genericMenu setVisible PerspectiveBarContributionItem SetPagePerspectiveAction popupMenu toolBar MenuItem menuItem MenuItem menuItem setText WorkbenchMessages getString WorkbenchWindow menuItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent ToolItem perspectiveToolItem ToolItem popupMenu getData perspectiveToolItem perspectiveToolItem isDisposed PerspectiveBarContributionItem PerspectiveBarContributionItem perspectiveToolItem getData getPage closePerspective getPerspective menuItem MenuItem menuItem setText WorkbenchMessages getString WorkbenchWindow closeAll menuItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent ToolItem perspectiveToolItem ToolItem popupMenu getData perspectiveToolItem perspectiveToolItem isDisposed PerspectiveBarContributionItem PerspectiveBarContributionItem perspectiveToolItem getData getPage closeAllPerspectives MenuItem addDockOnSubMenu addShowTextItem popupMenu popupMenu setData toolItem popupMenu getItem setSelection PrefUtil getAPIPreferenceStore getBoolean IWorkbenchPreferenceConstants SHOW_TEXT_ON_PERSPECTIVE_BAR updateLocationItems popupMenu getItem getMenu currentLocation popupMenu setLocation popupMenu setVisible
param direction one of code SWT HORIZONTAL code or code SWT VERTICAL code private Perspective Bar Manager create Bar Manager int direction Perspective Bar Manager bar Manager new Perspective Bar Manager style direction bar Manager add new Perspective Bar New Contribution Item window add an item for all open perspectives Workbench Page page Workbench Page window get Active Page if page null these are returned with the most recently opened one first I Perspective Descriptor perspectives page get Opened Perspectives for int i 0 i perspectives length i bar Manager add new Perspective Bar Contribution Item perspectives i page return bar Manager  PerspectiveBarManager createBarManager PerspectiveBarManager barManager PerspectiveBarManager barManager PerspectiveBarNewContributionItem WorkbenchPage WorkbenchPage getActivePage IPerspectiveDescriptor getOpenedPerspectives barManager PerspectiveBarContributionItem barManager
private void update Location Items Menu parent int new Location Menu Item left Menu Item top Left Menu Item top Right top Right parent get Item 0 top Left parent get Item 1 left parent get Item 2 if new Location LEFT left set Selection true top Right set Selection false top Left set Selection false else if new Location TOP LEFT top Left set Selection true left set Selection false top Right set Selection false else top Right set Selection true left set Selection false top Left set Selection false  updateLocationItems newLocation MenuItem MenuItem topLeft MenuItem topRight topRight getItem topLeft getItem getItem newLocation setSelection topRight setSelection topLeft setSelection newLocation TOP_LEFT topLeft setSelection setSelection topRight setSelection topRight setSelection setSelection topLeft setSelection
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e Menu Item item Menu Item e widget String pref null if item equals menu Item Left update Location Items sub Menu LEFT pref I Workbench Preference Constants LEFT else if item equals menu Item Top Left update Location Items sub Menu TOP LEFT pref I Workbench Preference Constants TOP LEFT else update Location Items sub Menu TOP RIGHT pref I Workbench Preference Constants TOP RIGHT I Preference Store api Store Pref Util getAPI Preference Store api Store set Value I Workbench Preference Constants DOCK PERSPECTIVE BAR pref  SelectionListener SelectionAdapter widgetSelected SelectionEvent MenuItem MenuItem menuItemLeft updateLocationItems subMenu IWorkbenchPreferenceConstants menuItemTopLeft updateLocationItems subMenu TOP_LEFT IWorkbenchPreferenceConstants TOP_LEFT updateLocationItems subMenu TOP_RIGHT IWorkbenchPreferenceConstants TOP_RIGHT IPreferenceStore apiStore PrefUtil getAPIPreferenceStore apiStore setValue IWorkbenchPreferenceConstants DOCK_PERSPECTIVE_BAR
private void add Dock On Sub Menu Menu menu Menu Item item new Menu Item menu SWT CASCADE item set Text Workbench Messages get String Perspective Switcher dock On NON NLS 1 final Menu sub Menu new Menu item final Menu Item menu Item Top Right new Menu Item sub Menu SWT RADIO menu Item Top Right set Text Workbench Messages get String Perspective Switcher top Right NON NLS 1 final Menu Item menu Item Top Left new Menu Item sub Menu SWT RADIO menu Item Top Left set Text Workbench Messages get String Perspective Switcher top Left NON NLS 1 final Menu Item menu Item Left new Menu Item sub Menu SWT RADIO menu Item Left set Text Workbench Messages get String Perspective Switcher left NON NLS 1 Selection Listener listener new Selection Adapter public void widget Selected Selection Event e Menu Item item Menu Item e widget String pref null if item equals menu Item Left update Location Items sub Menu LEFT pref I Workbench Preference Constants LEFT else if item equals menu Item Top Left update Location Items sub Menu TOP LEFT pref I Workbench Preference Constants TOP LEFT else update Location Items sub Menu TOP RIGHT pref I Workbench Preference Constants TOP RIGHT I Preference Store api Store Pref Util getAPI Preference Store api Store set Value I Workbench Preference Constants DOCK PERSPECTIVE BAR pref menu Item Top Right add Selection Listener listener menu Item Top Left add Selection Listener listener menu Item Left add Selection Listener listener item set Menu sub Menu  addDockOnSubMenu MenuItem MenuItem setText WorkbenchMessages getString PerspectiveSwitcher dockOn subMenu MenuItem menuItemTopRight MenuItem subMenu menuItemTopRight setText WorkbenchMessages getString PerspectiveSwitcher topRight MenuItem menuItemTopLeft MenuItem subMenu menuItemTopLeft setText WorkbenchMessages getString PerspectiveSwitcher topLeft MenuItem menuItemLeft MenuItem subMenu menuItemLeft setText WorkbenchMessages getString PerspectiveSwitcher SelectionListener SelectionAdapter widgetSelected SelectionEvent MenuItem MenuItem menuItemLeft updateLocationItems subMenu IWorkbenchPreferenceConstants menuItemTopLeft updateLocationItems subMenu TOP_LEFT IWorkbenchPreferenceConstants TOP_LEFT updateLocationItems subMenu TOP_RIGHT IWorkbenchPreferenceConstants TOP_RIGHT IPreferenceStore apiStore PrefUtil getAPIPreferenceStore apiStore setValue IWorkbenchPreferenceConstants DOCK_PERSPECTIVE_BAR menuItemTopRight addSelectionListener menuItemTopLeft addSelectionListener menuItemLeft addSelectionListener setMenu subMenu
showtext Menu Item add Selection Listener new Selection Adapter public void widget Selected Selection Event e if perspective Bar null return boolean preference showtext Menu Item get Selection Pref Util getAPI Preference Store set Value I Workbench Preference Constants SHOW TEXT ON PERSPECTIVE BAR preference set Cool Item Size cool Item update Perspective Bar  showtextMenuItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent perspectiveBar showtextMenuItem getSelection PrefUtil getAPIPreferenceStore setValue IWorkbenchPreferenceConstants SHOW_TEXT_ON_PERSPECTIVE_BAR setCoolItemSize coolItem updatePerspectiveBar
private void add Show Text Item Menu menu final Menu Item showtext Menu Item new Menu Item menu SWT CHECK showtext Menu Item set Text Workbench Messages get String Perspective Bar show Text NON NLS 1 showtext Menu Item add Selection Listener new Selection Adapter public void widget Selected Selection Event e if perspective Bar null return boolean preference showtext Menu Item get Selection Pref Util getAPI Preference Store set Value I Workbench Preference Constants SHOW TEXT ON PERSPECTIVE BAR preference set Cool Item Size cool Item update Perspective Bar  addShowTextItem MenuItem showtextMenuItem MenuItem showtextMenuItem setText WorkbenchMessages getString PerspectiveBar showText showtextMenuItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent perspectiveBar showtextMenuItem getSelection PrefUtil getAPIPreferenceStore setValue IWorkbenchPreferenceConstants SHOW_TEXT_ON_PERSPECTIVE_BAR setCoolItemSize coolItem updatePerspectiveBar
Method to save the width of the perspective bar in the public void save State I Memento pers Bar Mem save the width of the perspective bar I Memento child Mem pers Bar Mem create Child I Workbench Constants TAG ITEM SIZE int x if current Location TOP RIGHT top Bar null x top Bar get Right Width else x DEFAULT RIGHT X child Mem put String I Workbench Constants TAG X Integer to String x  saveState IMemento persBarMem IMemento childMem persBarMem createChild IWorkbenchConstants TAG_ITEM_SIZE currentLocation TOP_RIGHT topBar topBar getRightWidth DEFAULT_RIGHT_X childMem putString IWorkbenchConstants TAG_X toString
Method to restore the width of the perspective bar public void restore State I Memento memento if memento null return restore the width of the perspective bar I Memento attributes memento get Child I Workbench Constants TAG PERSPECTIVE BAR I Memento size null if attributes null size attributes get Child I Workbench Constants TAG ITEM SIZE if size null current Location TOP RIGHT top Bar null Integer x size get Integer I Workbench Constants TAG X if x null top Bar set Right Width x int Value else top Bar set Right Width DEFAULT RIGHT X  restoreState IMemento IMemento getChild IWorkbenchConstants TAG_PERSPECTIVE_BAR IMemento getChild IWorkbenchConstants TAG_ITEM_SIZE currentLocation TOP_RIGHT topBar getInteger IWorkbenchConstants TAG_X topBar setRightWidth intValue topBar setRightWidth DEFAULT_RIGHT_X
Method to rebuild and update the toolbar when necessary void update Perspective Bar Update each item as the text may have to be shortened I Contribution Item items perspective Bar get Items for int i 0 i items length i items i update make sure the selected item is visible perspective Bar arrange Toolbar perspective Bar get Control redraw  updatePerspectiveBar IContributionItem perspectiveBar getItems perspectiveBar arrangeToolbar perspectiveBar getControl

private I Property Listener prop Listener new I Property Listener public void property Changed Object source int prop Id if prop Id Editor Site PROP REUSE EDITOR Editor Site site Editor Site source set Checked site get Reuse Editor  IPropertyListener propListener IPropertyListener propertyChanged propId propId EditorSite PROP_REUSE_EDITOR EditorSite EditorSite setChecked getReuseEditor
Creates a Pin Editor Action public Pin Editor Action I Workbench Window window super Workbench Messages get String Pin Editor Action text window NON NLS 1 set Action Definition Id org eclipse ui window pin Editor NON NLS 1 set Tool Tip Text Workbench Messages get String Pin Editor Action tool Tip NON NLS 1 set Id org eclipse ui internal Pin Editor Action NON NLS 1 issue need help constant for this Workbench Help set Help this new Object I Help Context Ids SAVE ACTION set Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL PIN EDITOR set Disabled Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL PIN EDITOR DISABLED  PinEditorAction PinEditorAction IWorkbenchWindow WorkbenchMessages getString PinEditorAction setActionDefinitionId pinEditor setToolTipText WorkbenchMessages getString PinEditorAction toolTip setId PinEditorAction WorkbenchHelp setHelp IHelpContextIds SAVE_ACTION setImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_PIN_EDITOR setDisabledImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_PIN_EDITOR_DISABLED
public void run if get Workbench Window null action has been dispose return I Editor Part editor get Active Editor if editor null Editor Site editor get Editor Site set Reuse Editor is Checked  getWorkbenchWindow IEditorPart getActiveEditor EditorSite getEditorSite setReuseEditor isChecked
protected void update State if get Workbench Window null get Active Page null set Checked false set Enabled false return I Editor Part editor get Active Editor boolean enabled editor null set Enabled enabled if enabled Editor Site site Editor Site editor get Editor Site set Checked site get Reuse Editor else set Checked false  updateState getWorkbenchWindow getActivePage setChecked setEnabled IEditorPart getActiveEditor setEnabled EditorSite EditorSite getEditorSite setChecked getReuseEditor setChecked
protected void editor Activated I Editor Part part super editor Activated part if part null Editor Site part get Editor Site add Property Listener prop Listener  editorActivated IEditorPart editorActivated EditorSite getEditorSite addPropertyListener propListener
protected void editor Deactivated I Editor Part part super editor Deactivated part if part null Editor Site part get Editor Site remove Property Listener prop Listener  editorDeactivated IEditorPart editorDeactivated EditorSite getEditorSite removePropertyListener propListener
public void dispose deactivate current editor now before super dispose because active editor will be null after call editor Deactivated get Active Editor super dispose  editorDeactivated getActiveEditor

Constructs a new instance of code Placeholder Contribution Item code from the item it is intended to replace param item The item to be replaced must not be code null code Placeholder Contribution Item final Tool Bar Contribution Item item item save Widget State id item get Id stored Height item get Current Height stored Width item get Current Width stored Minimum Items item get Minimum Items To Show stored Use Chevron item get Use Chevron  PlaceholderContributionItem PlaceholderContributionItem ToolBarContributionItem saveWidgetState getId storedHeight getCurrentHeight storedWidth getCurrentWidth storedMinimumItems getMinimumItemsToShow storedUseChevron getUseChevron
Creates a new tool bar contribution item on the given manager using the stored data to initialize some of its properties param manager The manager for which the contribution item should be created must not be code null code return A new tool bar contribution item equivalent to the contribution item this placeholder was intended to replace never code null code Tool Bar Contribution Item create Tool Bar Contribution Item final Tool Bar Manager manager Tool Bar Contribution Item tool Bar Contribution Item new Tool Bar Contribution Item manager id tool Bar Contribution Item set Current Height stored Height tool Bar Contribution Item set Current Width stored Width tool Bar Contribution Item set Minimum Items To Show stored Minimum Items tool Bar Contribution Item set Use Chevron stored Use Chevron return tool Bar Contribution Item  ToolBarContributionItem createToolBarContributionItem ToolBarManager ToolBarContributionItem toolBarContributionItem ToolBarContributionItem toolBarContributionItem setCurrentHeight storedHeight toolBarContributionItem setCurrentWidth storedWidth toolBarContributionItem setMinimumItemsToShow storedMinimumItems toolBarContributionItem setUseChevron storedUseChevron toolBarContributionItem
see org eclipse jface action I Contribution Item dispose public void dispose Do nothing  IContributionItem
see org eclipse jface action I Contribution Item fill org eclipse swt widgets Composite public void fill Composite parent throw new Unsupported Operation Exception  IContributionItem UnsupportedOperationException
int public void fill Cool Bar parent int index throw new Unsupported Operation Exception  CoolBar UnsupportedOperationException
int public void fill Menu parent int index throw new Unsupported Operation Exception  UnsupportedOperationException
int public void fill Tool Bar parent int index throw new Unsupported Operation Exception  ToolBar UnsupportedOperationException
The height of the replaced contribution item return The height int get Height return stored Height  getHeight storedHeight
see org eclipse jface action I Contribution Item get Id public String get Id return id  IContributionItem getId getId
The width of the replaced contribution item return The width int get Width return stored Width  getWidth storedWidth
see org eclipse jface action I Contribution Item is Dirty public boolean is Dirty return false  IContributionItem isDirty isDirty
see org eclipse jface action I Contribution Item is Dynamic public boolean is Dynamic return false  IContributionItem isDynamic isDynamic
see org eclipse jface action I Contribution Item is Enabled public boolean is Enabled XXX Auto generated method stub return false  IContributionItem isEnabled isEnabled
see org eclipse jface action I Contribution Item is Group Marker public boolean is Group Marker return false  IContributionItem isGroupMarker isGroupMarker
see org eclipse jface action I Contribution Item is Separator public boolean is Separator return false  IContributionItem isSeparator isSeparator
see org eclipse jface action I Contribution Item is Visible public boolean is Visible return false  IContributionItem isVisible isVisible
see org eclipse jface action I Contribution Item save Widget State public void save Widget State Do nothing  IContributionItem saveWidgetState saveWidgetState
see org eclipse jface action I Contribution Item set Parent org eclipse jface action I Contribution Manager public void set Parent I Contribution Manager parent Do nothing  IContributionItem setParent IContributionManager setParent IContributionManager
see org eclipse jface action I Contribution Item set Visible boolean public void set Visible boolean visible Do nothing  IContributionItem setVisible setVisible
Displays a string representation of this contribution item which is really just a function of its identifier public String to String return Placeholder Contribution Item id NON NLS 1 NON NLS 2  toString PlaceholderContributionItem
see org eclipse jface action I Contribution Item update public void update update null  IContributionItem
see org eclipse jface action I Contribution Item update java lang String public void update String identifier Do nothing  IContributionItem

public Placeholder Folder Layout Page Layout page Layout Container Placeholder folder super this placeholder folder this page Layout page Layout  PlaceholderFolderLayout PageLayout pageLayout ContainerPlaceholder pageLayout pageLayout
see I Placeholder Folder Layout public void add Placeholder String view Id if page Layout check Part In Layout view Id return Get the view s label I View Registry reg Workbench Plugin get Default get View Registry I View Descriptor desc reg find view Id if desc null cannot safely open the dialog so log the problem Workbench Plugin log Unable to find view label view Id NON NLS 1 return Create the placeholder Layout Part new Part new Part Placeholder view Id link Part To Page Layout view Id new Part Add it to the placeholder layout placeholder add new Part  IPlaceholderFolderLayout addPlaceholder viewId pageLayout checkPartInLayout viewId IViewRegistry WorkbenchPlugin getDefault getViewRegistry IViewDescriptor viewId WorkbenchPlugin viewId LayoutPart newPart PartPlaceholder viewId linkPartToPageLayout viewId newPart newPart
Inform the page layout of the new part created and the placeholder the part belongs to private void link Part To Page Layout String view Id Layout Part new Part page Layout set Ref Part view Id new Part force creation of the view layout rec page Layout get View Layout Rec view Id true page Layout set Folder Part view Id placeholder new Part set Container placeholder  linkPartToPageLayout viewId LayoutPart newPart pageLayout setRefPart viewId newPart pageLayout getViewLayoutRec viewId pageLayout setFolderPart viewId newPart setContainer

see org eclipse core runtime Preferences I Property Change Listener property Change Property Change Event public void property Change Property Change Event event String property Name event get Property if I Preference Constants ENABLED DECORATORS equals property Name Workbench Plugin get Default get Decorator Manager restore Listeners return if I Workbench Preference Constants DEFAULT PERSPECTIVE ID equals property Name I Workbench workbench PlatformUI get Workbench workbench get Perspective Registry set Default Perspective String event get New Value return if I Workbench Preference Constants DOCK PERSPECTIVE BAR equals property Name I Preference Store api Store Pref Util getAPI Preference Store I Workbench workbench PlatformUI get Workbench I Workbench Window workbench Windows workbench get Workbench Windows for int i 0 i workbench Windows length i I Workbench Window window workbench Windows i if window instanceof Workbench Window Workbench Window window set Perspective Bar Location api Store get String I Workbench Preference Constants DOCK PERSPECTIVE BAR return TODO the banner apperance should have its own preference if I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS equals property Name boolean new Value Pref Util getAPI Preference Store get Boolean I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS I Workbench workbench PlatformUI get Workbench I Workbench Window workbench Windows workbench get Workbench Windows for int i 0 i workbench Windows length i I Workbench Window window workbench Windows i if window instanceof Workbench Window Workbench Window window set Banner Curve new Value return Update the file associations if they have changed due to an import if I Preference Constants RESOURCES equals property Name I Editor Registry registry Workbench Plugin get Default get Editor Registry if registry instanceof Editor Registry Editor Registry editor Registry Editor Registry registry I Preference Store store Workbench Plugin get Default get Preference Store Reader reader null try String xml String store get String I Preference Constants RESOURCES if xml String null xml String length 0 reader new String Reader xml String Build the editor map Hash Map editor Map new Hash Map int i 0 I Editor Descriptor descriptors editor Registry get Sorted Editors From Plugins Get the internal editors for i 0 i descriptors length i I Editor Descriptor descriptor descriptors i editor Map put descriptor get Id descriptor Get the external OS editors descriptors editor Registry get Sorted Editors FromOS for i 0 i descriptors length i I Editor Descriptor descriptor descriptors i editor Map put descriptor get Id descriptor Update the file to editor s mappings editor Registry read Resources editor Map reader catch Workbench Exception e e print Stack Trace finally if reader null try reader close catch IO Exception e e print Stack Trace  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent propertyName getProperty IPreferenceConstants ENABLED_DECORATORS propertyName WorkbenchPlugin getDefault getDecoratorManager restoreListeners IWorkbenchPreferenceConstants DEFAULT_PERSPECTIVE_ID propertyName IWorkbench getWorkbench getPerspectiveRegistry setDefaultPerspective getNewValue IWorkbenchPreferenceConstants DOCK_PERSPECTIVE_BAR propertyName IPreferenceStore apiStore PrefUtil getAPIPreferenceStore IWorkbench getWorkbench IWorkbenchWindow workbenchWindows getWorkbenchWindows workbenchWindows IWorkbenchWindow workbenchWindows WorkbenchWindow WorkbenchWindow setPerspectiveBarLocation apiStore getString IWorkbenchPreferenceConstants DOCK_PERSPECTIVE_BAR IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS propertyName newValue PrefUtil getAPIPreferenceStore getBoolean IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS IWorkbench getWorkbench IWorkbenchWindow workbenchWindows getWorkbenchWindows workbenchWindows IWorkbenchWindow workbenchWindows WorkbenchWindow WorkbenchWindow setBannerCurve newValue IPreferenceConstants propertyName IEditorRegistry WorkbenchPlugin getDefault getEditorRegistry EditorRegistry EditorRegistry editorRegistry EditorRegistry IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore xmlString getString IPreferenceConstants xmlString xmlString StringReader xmlString HashMap editorMap HashMap IEditorDescriptor editorRegistry getSortedEditorsFromPlugins IEditorDescriptor editorMap getId editorRegistry getSortedEditorsFromOS IEditorDescriptor editorMap getId editorRegistry readResources editorMap WorkbenchException printStackTrace IOException printStackTrace

Plugin Action constructor public Plugin Action I Configuration Element action Element String id int style super null style this config Element action Element if id null set Id id else Create unique action id set Id Plugin Action Integer to String action Count NON NLS 1 action Count String def Id action Element get Attribute Action Descriptor ATT DEFINITION ID set Action Definition Id def Id plugin Id config Element get Declaring Extension get Namespace Read enablement declaration if config Element get Attribute Plugin Action Builder ATT ENABLES FOR null enabler new Selection Enabler config Element else I Configuration Element kids config Element get Children Plugin Action Builder TAG ENABLEMENT if kids length 0 enabler new Selection Enabler config Element Give enabler or delegate a chance to adjust enable state selection Changed new Structured Selection  PluginAction PluginAction IConfigurationElement actionElement configElement actionElement setId setId PluginAction toString actionCount actionCount defId actionElement getAttribute ActionDescriptor ATT_DEFINITION_ID setActionDefinitionId defId pluginId configElement getDeclaringExtension getNamespace configElement getAttribute PluginActionBuilder ATT_ENABLES_FOR SelectionEnabler configElement IConfigurationElement configElement getChildren PluginActionBuilder TAG_ENABLEMENT SelectionEnabler configElement selectionChanged StructuredSelection
Creates the delegate and refreshes its enablement protected final void create Delegate The run Attribute is null if delegate creation failed previously if delegate null run Attribute null try Object obj Workbench Plugin create Extension config Element run Attribute delegate validate Delegate obj init Delegate refresh Enablement catch Throwable e run Attribute null I Status status null if e instanceof Core Exception status Core Exception e get Status else status Status Util new Status I Status ERROR Internal plug in action delegate error on creation e NON NLS 1 String id config Element get Attribute Action Descriptor ATT ID Workbench Plugin log Could not create action delegate for id id status NON NLS 1 return  createDelegate runAttribute runAttribute WorkbenchPlugin createExtension configElement runAttribute validateDelegate initDelegate refreshEnablement runAttribute IStatus CoreException CoreException getStatus StatusUtil newStatus IStatus configElement getAttribute ActionDescriptor ATT_ID WorkbenchPlugin
Validates the object is a delegate of the expected type Subclasses can override to check for specific delegate types p b Note b Calls to the object are not allowed during this method p param obj a possible action delegate implementation return the code I Action Delegate code implementation for the object throws a code Workbench Exception code if not expect delegate type protected I Action Delegate validate Delegate Object obj throws Workbench Exception if obj instanceof I Action Delegate return I Action Delegate obj else throw new Workbench Exception Action must implement I Action Delegate NON NLS 1  IActionDelegate WorkbenchException IActionDelegate validateDelegate WorkbenchException IActionDelegate IActionDelegate WorkbenchException IActionDelegate
Initialize the action delegate by calling its lifecycle method Subclasses may override but must call this implementation first protected void init Delegate if delegate instanceof I Action Delegate2 I Action Delegate2 delegate init this  initDelegate IActionDelegate2 IActionDelegate2
Returns the action delegate if created Can be code null code if the delegate is not created yet or if previous delegate creation failed protected I Action Delegate get Delegate return delegate  IActionDelegate getDelegate
Returns true if the declaring plugin has been loaded and there is no need to delay creating the delegate any more protected boolean is Ok To Create Delegate test if the plugin has loaded String bundle Id config Element get Declaring Extension get Namespace return Bundle Utility is Activated bundle Id  isOkToCreateDelegate bundleId configElement getDeclaringExtension getNamespace BundleUtility isActivated bundleId
Return whether or not this action could have been registered due to an adaptable i e it is a resource type private boolean has Adaptable Type if adaptable Not Checked Object parent Config config Element get Parent String type Name null if parent Config null parent Config instanceof I Configuration Element type Name I Configuration Element parent Config get Attribute object Class NON NLS 1 See if this is typed at all first if type Name null adaptable Not Checked false return false Class resource Class Legacy Resource Support get Resource Class if resource Class null resources plug in not even present is Adaptable Action false adaptable Not Checked false return false if type Name equals resource Class get Name is Adaptable Action true adaptable Not Checked false return is Adaptable Action Class children resource Class get Declared Classes for int i 0 i children length i if children i get Name equals type Name is Adaptable Action true adaptable Not Checked false return is Adaptable Action adaptable Not Checked false return is Adaptable Action  hasAdaptableType adaptableNotChecked parentConfig configElement getParent typeName parentConfig parentConfig IConfigurationElement typeName IConfigurationElement parentConfig getAttribute objectClass typeName adaptableNotChecked resourceClass LegacyResourceSupport getResourceClass resourceClass isAdaptableAction adaptableNotChecked typeName resourceClass getName isAdaptableAction adaptableNotChecked isAdaptableAction resourceClass getDeclaredClasses getName typeName isAdaptableAction adaptableNotChecked isAdaptableAction adaptableNotChecked isAdaptableAction
Refresh the action enablement protected void refresh Enablement if enabler null set Enabled enabler is Enabled For Selection selection if delegate null delegate selection Changed this selection  refreshEnablement setEnabled isEnabledForSelection selectionChanged
Method declared on I Action public void run run With Event null  IAction runWithEvent
public void run With Event Event event this message dialog is problematic if delegate null create Delegate if delegate null Message Dialog open Information Display get Default get Active Shell Workbench Messages get String Information NON NLS 1 Workbench Messages get String Plugin Action operation Not Available Message NON NLS 1 return if is Enabled Message Dialog open Information Display get Default get Active Shell Workbench Messages get String Information NON NLS 1 Workbench Messages get String Plugin Action disabled Message NON NLS 1 return if event null if delegate instanceof I Action Delegate2 I Action Delegate2 delegate run With Event this event return Keep for backward compatibility with R2 0 if delegate instanceof I Action Delegate With Event I Action Delegate With Event delegate run With Event this event return delegate run this  runWithEvent createDelegate MessageDialog openInformation getDefault getActiveShell WorkbenchMessages getString WorkbenchMessages getString PluginAction operationNotAvailableMessage isEnabled MessageDialog openInformation getDefault getActiveShell WorkbenchMessages getString WorkbenchMessages getString PluginAction disabledMessage IActionDelegate2 IActionDelegate2 runWithEvent IActionDelegateWithEvent IActionDelegateWithEvent runWithEvent
Handles selection change If rule based enabled is defined it will be first to call it If the delegate is loaded it will also be given a chance public void selection Changed I Selection new Selection Update selection selection new Selection if selection null selection Structured Selection EMPTY if has Adaptable Type selection get Resource Adapters selection If the delegate can be loaded do so Otherwise just update the enablement if delegate null is Ok To Create Delegate create Delegate else refresh Enablement  selectionChanged ISelection newSelection newSelection StructuredSelection hasAdaptableType getResourceAdapters isOkToCreateDelegate createDelegate refreshEnablement
The code Selection Changed Event Action code implementation of this code I Selection Changed Listener code method calls code selection Changed I Structured Selection code when the selection is a structured one public void selection Changed Selection Changed Event event I Selection sel event get Selection selection Changed sel  SelectionChangedEventAction ISelectionChangedListener selectionChanged IStructuredSelection selectionChanged SelectionChangedEvent ISelection getSelection selectionChanged
The code Selection Changed Event Action code implementation of this code I Selection Listener code method calls code selection Changed I Structured Selection code when the selection is a structured one Subclasses may extend this method to react to the change public void selection Changed I Workbench Part part I Selection sel selection Changed sel  SelectionChangedEventAction ISelectionListener selectionChanged IStructuredSelection selectionChanged IWorkbenchPart ISelection selectionChanged
Get a new selection with the resource adaptable version of this selection private I Selection get Resource Adapters I Selection sel if sel instanceof I Structured Selection List adaptables new Array List Object elements I Structured Selection sel to Array for int i 0 i elements length i Object original Value elements i if original Value instanceof I Adaptable Class resource Class Legacy Resource Support get Resource Class if resource Class null Object adapted Value I Adaptable original Value get Adapter resource Class if adapted Value null adaptables add adapted Value return new Structured Selection adaptables else return sel  ISelection getResourceAdapters ISelection IStructuredSelection ArrayList IStructuredSelection toArray originalValue originalValue IAdaptable resourceClass LegacyResourceSupport getResourceClass resourceClass adaptedValue IAdaptable originalValue getAdapter resourceClass adaptedValue adaptedValue StructuredSelection
Returns the action identifier this action overrides Default implementation returns code null code return the action identifier to override or code null code public String get Override Action Id return null  getOverrideActionId
return the I Configuration Element used to create this Plugin Action since 3 0 protected I Configuration Element get Config Element return config Element  IConfigurationElement PluginAction IConfigurationElement getConfigElement configElement
see org eclipse ui I Plugin Contribution get Local Id public String get Local Id return get Id  IPluginContribution getLocalId getLocalId getId
see org eclipse ui I Plugin Contribution get Plugin Id public String get Plugin Id return plugin Id  IPluginContribution getPluginId getPluginId pluginId

The default constructor public Plugin Action Builder  PluginActionBuilder
Contributes submenus and or actions into the provided menu and tool bar managers public final void contribute I Menu Manager menu I Tool Bar Manager toolbar boolean append If Missing if cache null return for int i 0 i cache size i Basic Contribution contribution Basic Contribution cache get i contribution contribute menu append If Missing toolbar append If Missing  IMenuManager IToolBarManager appendIfMissing BasicContribution BasicContribution appendIfMissing appendIfMissing
This factory method returns a new Action Descriptor for the configuration element It should be implemented by subclasses  ActionDescriptor
Factory method to create the helper contribution class that will hold onto the menus and actions contributed protected Basic Contribution create Contribution return new Basic Contribution  BasicContribution createContribution BasicContribution
Returns the name of the part ID attribute that is expected in the target extension protected String get TargetID I Configuration Element element String value element get Attribute ATT TARGET ID return value null value NON NLS 1  getTargetID IConfigurationElement getAttribute ATT_TARGET_ID
Reads the contributions from the registry for the provided workbench part and the provided extension point ID protected void read Contributions String id String tag String extension Point cache null current Contribution null targetID id target Contribution Tag tag read Registry Platform get Extension Registry PlatformUI PLUGIN ID extension Point  readContributions extensionPoint currentContribution targetContributionTag readRegistry getExtensionRegistry PLUGIN_ID extensionPoint
Implements abstract method to handle the provided XML element in the registry protected boolean read Element I Configuration Element element String tag element get Name Ignore all object contributions element as these are handled by the Object Action Contributor Reader if tag equals Object Action Contributor Reader TAG OBJECT CONTRIBUTION return true Found top level contribution element if tag equals target Contribution Tag if targetID null Ignore contributions not matching target id String id get TargetID element if id null id equals targetID return true Read it s sub elements current Contribution create Contribution read Element Children element if cache null cache new Array List 4 cache add current Contribution current Contribution null return true Found menu contribution sub element if tag equals TAG MENU current Contribution add Menu element return true Found action contribution sub element if tag equals TAG ACTION current Contribution add Action create Action Descriptor element return true return false  readElement IConfigurationElement getName ObjectActionContributorReader ObjectActionContributorReader TAG_OBJECT_CONTRIBUTION targetContributionTag getTargetID currentContribution createContribution readElementChildren ArrayList currentContribution currentContribution TAG_MENU currentContribution addMenu TAG_ACTION currentContribution addAction createActionDescriptor
public void add Menu I Configuration Element element if menus null menus new Array List 1 menus add element  addMenu IConfigurationElement ArrayList
public void add Action Action Descriptor desc if actions null actions new Array List 3 actions add desc  addAction ActionDescriptor ArrayList
see org eclipse ui I Plugin Contribution get Local Id public String get Local Id return menu Element get Attribute ATT ID  IPluginContribution getLocalId getLocalId menuElement getAttribute ATT_ID
see org eclipse ui I Plugin Contribution get Plugin Id public String get Plugin Id return menu Element get Declaring Extension get Namespace  IPluginContribution getPluginId getPluginId menuElement getDeclaringExtension getNamespace
Contributes submenus and or actions into the provided menu and tool bar managers The elements added are filtered based on activity enablement public void contribute I Menu Manager menu boolean menu Append If Missing I Tool Bar Manager toolbar boolean tool Append If Missing if menus null menu null for int i 0 i menus size i final I Configuration Element menu Element I Configuration Element menus get i I Plugin Contribution pc new I Plugin Contribution non Javadoc see org eclipse ui I Plugin Contribution get Local Id public String get Local Id return menu Element get Attribute ATT ID non Javadoc see org eclipse ui I Plugin Contribution get Plugin Id public String get Plugin Id return menu Element get Declaring Extension get Namespace if Workbench Activity Helper filter Item pc continue contribute Menu menu Element menu menu Append If Missing if actions null for int i 0 i actions size i Action Descriptor ad Action Descriptor actions get i if Workbench Activity Helper filter Item ad continue if menu null contribute Menu Action ad menu menu Append If Missing if toolbar null contribute Toolbar Action ad toolbar tool Append If Missing  IMenuManager menuAppendIfMissing IToolBarManager toolAppendIfMissing IConfigurationElement menuElement IConfigurationElement IPluginContribution IPluginContribution IPluginContribution getLocalId getLocalId menuElement getAttribute ATT_ID IPluginContribution getPluginId getPluginId menuElement getDeclaringExtension getNamespace WorkbenchActivityHelper filterItem contributeMenu menuElement menuAppendIfMissing ActionDescriptor ActionDescriptor WorkbenchActivityHelper filterItem contributeMenuAction menuAppendIfMissing contributeToolbarAction toolAppendIfMissing
Creates a menu from the information in the menu configuration element and adds it into the provided menu manager If append If Missing is true and menu path slot is not found it will be created and menu will be added into it Otherwise add operation will fail protected void contribute Menu I Configuration Element menu Element I Menu Manager mng boolean append If Missing Get config data String id menu Element get Attribute ATT ID String label menu Element get Attribute ATT LABEL String path menu Element get Attribute ATT PATH if label null Workbench Plugin log Invalid Menu Extension label null id NON NLS 1 return Calculate menu path and group String group null if path null int loc path last Index Of if loc 1 group path substring loc 1 path path substring 0 loc else assume that path represents a slot so actual path portion should be null group path path null Find parent menu I Menu Manager parent mng if path null parent mng find Menu Using Path path if parent null Workbench Plugin log Invalid Menu Extension Path is invalid id NON NLS 1 return Find reference group if group null group I Workbench Action Constants MB ADDITIONS I Contribution Item sep parent find group if sep null if append If Missing add Group parent group else Workbench Plugin log Invalid Menu Extension Group is invalid id NON NLS 1 return If the menu does not exist create it I Menu Manager new Menu parent find Menu Using Path id if new Menu null new Menu new Menu Manager label id Add the menu try insert After parent group new Menu catch Illegal Argument Exception e Workbench Plugin log Invalid Menu Extension Group is missing id NON NLS 1 Get the menu again as it may be wrapped otherwise adding the separators and group markers below will not be wrapped properly if the menu was just created new Menu parent find Menu Using Path id if new Menu null Workbench Plugin log Could not find new menu id NON NLS 1 Create separators I Configuration Element children menu Element get Children for int i 0 i children length i String child Name children i get Name if child Name equals TAG SEPARATOR contribute Separator new Menu children i else if child Name equals TAG GROUP MARKER contribute Group Marker new Menu children i  appendIfMissing contributeMenu IConfigurationElement menuElement IMenuManager appendIfMissing menuElement getAttribute ATT_ID menuElement getAttribute ATT_LABEL menuElement getAttribute ATT_PATH WorkbenchPlugin lastIndexOf IMenuManager findMenuUsingPath WorkbenchPlugin IWorkbenchActionConstants MB_ADDITIONS IContributionItem appendIfMissing addGroup WorkbenchPlugin IMenuManager newMenu findMenuUsingPath newMenu newMenu MenuManager insertAfter newMenu IllegalArgumentException WorkbenchPlugin newMenu findMenuUsingPath newMenu WorkbenchPlugin IConfigurationElement menuElement getChildren childName getName childName TAG_SEPARATOR contributeSeparator newMenu childName TAG_GROUP_MARKER contributeGroupMarker newMenu
Contributes action from action descriptor into the provided menu manager protected void contribute Menu Action Action Descriptor ad I Menu Manager menu boolean append If Missing Get config data String mpath ad get Menu Path String mgroup ad get Menu Group if mpath null mgroup null return Find parent menu I Menu Manager parent menu if mpath null parent parent find Menu Using Path mpath if parent null Workbench Plugin log Invalid Menu Extension Path is invalid ad get Id NON NLS 1 return Find reference group if mgroup null mgroup I Workbench Action Constants MB ADDITIONS I Contribution Item sep parent find mgroup if sep null if append If Missing add Group parent mgroup else Workbench Plugin log Invalid Menu Extension Group is invalid ad get Id NON NLS 1 return Add action try insert After parent mgroup ad get Action catch Illegal Argument Exception e Workbench Plugin log Invalid Menu Extension Group is missing ad get Id NON NLS 1  contributeMenuAction ActionDescriptor IMenuManager appendIfMissing getMenuPath getMenuGroup IMenuManager findMenuUsingPath WorkbenchPlugin getId IWorkbenchActionConstants MB_ADDITIONS IContributionItem appendIfMissing addGroup WorkbenchPlugin getId insertAfter getAction IllegalArgumentException WorkbenchPlugin getId
Creates a named menu separator from the information in the configuration element If the separator already exists do not create a second protected void contribute Separator I Menu Manager menu I Configuration Element element String id element get Attribute ATT NAME if id null id length 0 return I Contribution Item sep menu find id if sep null return insert Menu Group menu new Separator id  contributeSeparator IMenuManager IConfigurationElement getAttribute ATT_NAME IContributionItem insertMenuGroup
Creates a named menu group marker from the information in the configuration element If the marker already exists do not create a second protected void contribute Group Marker I Menu Manager menu I Configuration Element element String id element get Attribute ATT NAME if id null id length 0 return I Contribution Item marker menu find id if marker null return insert Menu Group menu new Group Marker id  contributeGroupMarker IMenuManager IConfigurationElement getAttribute ATT_NAME IContributionItem insertMenuGroup GroupMarker
Contributes action from the action descriptor into the provided tool bar manager protected void contribute Toolbar Action Action Descriptor ad I Tool Bar Manager toolbar boolean append If Missing Get config data String t Id ad get Toolbar Id String tgroup ad get Toolbar Group Id if t Id null tgroup null return Find reference group if tgroup null tgroup I Workbench Action Constants MB ADDITIONS I Contribution Item sep null sep toolbar find tgroup if sep null if append If Missing add Group toolbar tgroup else Workbench Plugin log Invalid Toolbar Extension Group is invalid ad get Id NON NLS 1 return Add action to tool bar try insert After toolbar tgroup ad get Action catch Illegal Argument Exception e Workbench Plugin log Invalid Toolbar Extension Group is missing ad get Id NON NLS 1  contributeToolbarAction ActionDescriptor IToolBarManager appendIfMissing tId getToolbarId getToolbarGroupId tId IWorkbenchActionConstants MB_ADDITIONS IContributionItem appendIfMissing addGroup WorkbenchPlugin getId insertAfter getAction IllegalArgumentException WorkbenchPlugin getId
Inserts the separator or group marker into the menu Subclasses may override protected void insert Menu Group I Menu Manager menu Abstract Group Marker marker menu add marker  insertMenuGroup IMenuManager AbstractGroupMarker
Inserts an action after another named contribution item Subclasses may override protected void insert After I Contribution Manager mgr String ref Id Plugin Action action insert After mgr ref Id new Plugin Action Contribution Item action  insertAfter IContributionManager refId PluginAction insertAfter refId PluginActionContributionItem
Inserts a contribution item after another named contribution item Subclasses may override protected void insert After I Contribution Manager mgr String ref Id I Contribution Item item mgr insert After ref Id item  insertAfter IContributionManager refId IContributionItem insertAfter refId
Adds a group to a contribution manager Subclasses may override protected void add Group I Contribution Manager mgr String name mgr add new Separator name  addGroup IContributionManager

Creates a new contribution item from the given action The id of the action is used as the id of the item param action the action public Plugin Action Contribution Item Plugin Action action dynamic UI DDW this constructor has changed since 1113 super action PlatformUI get Workbench get Activity Support get Activity Manager add Activity Manager Listener this set up the identifier if necessary if Workbench Activity Helper is Filtering create Identifier  PluginActionContributionItem PluginAction getWorkbench getActivitySupport getActivityManager addActivityManagerListener WorkbenchActivityHelper isFiltering createIdentifier
Create the I Identifier reference for this item sicne 3 0 private void create Identifier I Workbench Activity Support workbench Activity Support PlatformUI get Workbench get Activity Support I Plugin Contribution contribution I Plugin Contribution get Action no need to check if contribution get Plugin Id null plugin actions are always from plugins identifier workbench Activity Support get Activity Manager get Identifier Workbench Activity Helper create Unified Id contribution identifier add Identifier Listener this  IIdentifier createIdentifier IWorkbenchActivitySupport workbenchActivitySupport getWorkbench getActivitySupport IPluginContribution IPluginContribution getAction getPluginId workbenchActivitySupport getActivityManager getIdentifier WorkbenchActivityHelper createUnifiedId addIdentifierListener
Dispose of the I Identifier if necessary since 3 0 private void dispose Identifier if identifier null identifier remove Identifier Listener this identifier null  IIdentifier disposeIdentifier removeIdentifierListener
The default implementation of this code I Contribution Item code method notifies the delegate if loaded and implements the code I Action Delegate2 code interface public void dispose Plugin Action proxy Plugin Action get Action if proxy null if proxy get Delegate instanceof I Action Delegate2 I Action Delegate2 proxy get Delegate dispose PlatformUI get Workbench get Activity Support get Activity Manager remove Activity Manager Listener this dispose Identifier  IContributionItem IActionDelegate2 PluginAction PluginAction getAction getDelegate IActionDelegate2 IActionDelegate2 getDelegate getWorkbench getActivitySupport getActivityManager removeActivityManagerListener disposeIdentifier
public boolean is Visible if identifier null identifier is Enabled return false return super is Visible  isVisible isEnabled isVisible
see org eclipse ui activities I Identifier Listener identifier Changed org eclipse ui activities Identifier Event public void identifier Changed Identifier Event identifier Event get Parent mark Dirty  IIdentifierListener identifierChanged IdentifierEvent identifierChanged IdentifierEvent identifierEvent getParent markDirty
public void activity Manager Changed Activity Manager Event activity Manager Event ensure that if we re going from a non filtering state that we get an identifier and vice versa if Workbench Activity Helper is Filtering identifier null create Identifier get Parent mark Dirty else if Workbench Activity Helper is Filtering identifier null dispose Identifier get Parent mark Dirty  activityManagerChanged ActivityManagerEvent activityManagerEvent WorkbenchActivityHelper isFiltering createIdentifier getParent markDirty WorkbenchActivityHelper isFiltering disposeIdentifier getParent markDirty

private String action Set Id Creates a new contribution item from the given action The id of the action is used as the id of the item param action the action public Plugin Action Cool Bar Contribution Item Plugin Action action super action set Action Set Id W Win Plugin Action action get Action Set Id  actionSetId PluginActionCoolBarContributionItem PluginAction setActionSetId WWinPluginAction getActionSetId
set Action Set Id W Win Plugin Action action get Action Set Id public String get Action Set Id return action Set Id  setActionSetId WWinPluginAction getActionSetId getActionSetId actionSetId
return action Set Id public void set Action Set Id String id this action Set Id id  actionSetId setActionSetId actionSetId

private Action Set Action Bars bars Plugin Action Set constructor comment public Plugin Action Set Action Set Descriptor desc super this desc desc  ActionSetActionBars PluginActionSet PluginActionSet ActionSetDescriptor
Adds one plugin action ref to the list public void add Plugin Action W Win Plugin Action action plugin Actions add action  addPluginAction WWinPluginAction pluginActions
Returns the list of plugin actions for the set public I Action get Plugin Actions I Action result new I Action plugin Actions size plugin Actions to Array result return result  IAction getPluginActions IAction IAction pluginActions pluginActions toArray
Disposes of this action set public void dispose Iterator iter plugin Actions iterator while iter has Next W Win Plugin Action action W Win Plugin Action iter next action dispose plugin Actions clear bars null  pluginActions hasNext WWinPluginAction WWinPluginAction pluginActions
package Action Set Action Bars get Bars return bars  ActionSetActionBars getBars
Returns the config element public I Configuration Element get Config Element return desc get Config Element  IConfigurationElement getConfigElement getConfigElement
Returns the underlying descriptor public Action Set Descriptor get Desc return desc  ActionSetDescriptor getDesc
Initializes this action set which is expected to add it actions as required to the given workbench window and action bars param window the workbench window param bars the action bars public void init I Workbench Window window I Action Bars bars this bars Action Set Action Bars bars  IWorkbenchWindow IActionBars ActionSetActionBars

private Array List adjunct Contributions new Array List 0 Constructs a new builder public Plugin Action Set Builder  ArrayList adjunctContributions ArrayList PluginActionSetBuilder
Read the actions within a config element Called by customize perspective public void build Menu And Tool Bar Structure Plugin Action Set set I Workbench Window window this action Set set this window window cache null current Contribution null targetID null target Contribution Tag TAG ACTION SET read Elements new I Configuration Element set get Config Element if cache null for int i 0 i cache size i Action Set Contribution contribution Action Set Contribution cache get i contribution contribute action Set get Bars true true if contribution is Adjunct Contributor adjunct Contributions add contribution for int i 0 i adjunct Contributions size i Action Set Contribution contribution Action Set Contribution adjunct Contributions get i Action Set Action Bars bars action Set get Bars for int j 0 j contribution adjunct Actions size j Action Descriptor adjunct Action Action Descriptor contribution adjunct Actions get j contribution contribute Adjunct Coolbar Action adjunct Action bars  buildMenuAndToolBarStructure PluginActionSet IWorkbenchWindow actionSet currentContribution targetContributionTag TAG_ACTION_SET readElements IConfigurationElement getConfigElement ActionSetContribution ActionSetContribution actionSet getBars isAdjunctContributor adjunctContributions adjunctContributions ActionSetContribution ActionSetContribution adjunctContributions ActionSetActionBars actionSet getBars adjunctActions ActionDescriptor adjunctAction ActionDescriptor adjunctActions contributeAdjunctCoolbarAction adjunctAction
protected Action Descriptor create Action Descriptor I Configuration Element element As of 2 1 the pulldown attribute was deprecated and replaced by the attribute style See doc for more details boolean pull Down Style false String style element get Attribute Action Descriptor ATT STYLE if style null pull Down Style style equals Action Descriptor STYLE PULLDOWN else String pulldown element get Attribute ATT PULLDOWN pull Down Style pulldown null pulldown equals true NON NLS 1 Action Descriptor desc null if pull Down Style desc new Action Descriptor element Action Descriptor T WORKBENCH PULLDOWN window else desc new Action Descriptor element Action Descriptor T WORKBENCH window W Win Plugin Action action W Win Plugin Action desc get Action action set Action Set Id action Set get Desc get Id action Set add Plugin Action action return desc  ActionDescriptor createActionDescriptor IConfigurationElement pullDownStyle getAttribute ActionDescriptor ATT_STYLE pullDownStyle ActionDescriptor STYLE_PULLDOWN getAttribute ATT_PULLDOWN pullDownStyle ActionDescriptor pullDownStyle ActionDescriptor ActionDescriptor T_WORKBENCH_PULLDOWN ActionDescriptor ActionDescriptor T_WORKBENCH WWinPluginAction WWinPluginAction getAction setActionSetId actionSet getDesc getId actionSet addPluginAction
Method declared on Plugin Action Builder protected Basic Contribution create Contribution return new Action Set Contribution action Set get Desc get Id window  PluginActionBuilder BasicContribution createContribution ActionSetContribution actionSet getDesc getId
Returns the insertion point for a new contribution item Clients should use this item as a reference point for insert After param start Id the reference id for insertion param sort Id the sorting id for the insertion If null then the item will be inserted at the end of all action sets param mgr the target menu manager param start Vs End if code true code the items are added at the start of action with the same id else they are added to the end return the insertion point or null if not found public static I Contribution Item find Insertion Point String start Id String sort Id I Contribution Manager mgr boolean start Vs End Get items I Contribution Item items mgr get Items Find the reference item int insert Index 0 while insert Index items length if start Id equals items insert Index get Id break insert Index if insert Index items length return null Calculate start Vs End comparison value int compare Metric 0 if start Vs End compare Metric 1 Find the insertion point for the new item We do this by iterating through all of the previous action set contributions define within the current group for int nX insert Index 1 nX items length nX I Contribution Item item items nX if item is Separator item is Group Marker Fix for bug report 18357 break if item instanceof I Action Set Contribution Item if sort Id null String test Id I Action Set Contribution Item item get Action Set Id if sort Id compare To test Id compare Metric break insert Index nX else break Return item return items insert Index  insertAfter startId sortId startVsEnd IContributionItem findInsertionPoint startId sortId IContributionManager startVsEnd IContributionItem getItems insertIndex insertIndex startId insertIndex getId insertIndex insertIndex startVsEnd compareMetric startVsEnd compareMetric insertIndex IContributionItem isSeparator isGroupMarker IActionSetContributionItem sortId testId IActionSetContributionItem getActionSetId sortId compareTo testId compareMetric insertIndex insertIndex
package static void process Action Sets Array List plugin Action Sets Workbench Window window Process the action sets in two passes On the first pass the plugin Action Set Builder will process base contributions and cache adjunct contributions On the second pass the adjunct contributions will be processed Plugin Action Set Builder builders new Plugin Action Set Builder plugin Action Sets size for int i 0 i plugin Action Sets size i Plugin Action Set set Plugin Action Set plugin Action Sets get i Plugin Action Set Builder builder new Plugin Action Set Builder builder read Action Extensions set window builders i builder for int i 0 i builders length i Plugin Action Set Builder builder builders i builder process Adjunct Contributions  processActionSets ArrayList pluginActionSets WorkbenchWindow pluginActionSetBuilder PluginActionSetBuilder PluginActionSetBuilder pluginActionSets pluginActionSets PluginActionSet PluginActionSet pluginActionSets PluginActionSetBuilder PluginActionSetBuilder readActionExtensions PluginActionSetBuilder processAdjunctContributions
protected void process Adjunct Contributions Contribute the adjunct contributions for int i 0 i adjunct Contributions size i Action Set Contribution contribution Action Set Contribution adjunct Contributions get i Action Set Action Bars bars action Set get Bars for int j 0 j contribution adjunct Actions size j Action Descriptor adjunct Action Action Descriptor contribution adjunct Actions get j contribution contribute Adjunct Coolbar Action adjunct Action bars  processAdjunctContributions adjunctContributions ActionSetContribution ActionSetContribution adjunctContributions ActionSetActionBars actionSet getBars adjunctActions ActionDescriptor adjunctAction ActionDescriptor adjunctActions contributeAdjunctCoolbarAction adjunctAction
Read the actions within a config element protected void read Action Extensions Plugin Action Set set I Workbench Window window this action Set set this window window cache null current Contribution null targetID null target Contribution Tag TAG ACTION SET read Elements new I Configuration Element set get Config Element if cache null for dynamic UI save cache for future removal lf actionset extensions Don t call add Cache it s broken and is only used for dynamic plugin removal which the workbench doesn t currently support See bug 66374 for more details Workbench Plugin get Default get Action Set Registry add Cache set get Desc get Id cache for int i 0 i cache size i Action Set Contribution contribution Action Set Contribution cache get i contribution contribute action Set get Bars true true if contribution is Adjunct Contributor adjunct Contributions add contribution else Workbench Plugin log Action Set is empty set get Desc get Id NON NLS 1  readActionExtensions PluginActionSet IWorkbenchWindow actionSet currentContribution targetContributionTag TAG_ACTION_SET readElements IConfigurationElement getConfigElement addCache WorkbenchPlugin getDefault getActionSetRegistry addCache getDesc getId ActionSetContribution ActionSetContribution actionSet getBars isAdjunctContributor adjunctContributions WorkbenchPlugin getDesc getId
public Action Set Contribution String id I Workbench Window window super action Set Id id this window Workbench Window window  ActionSetContribution IWorkbenchWindow actionSetId WorkbenchWindow
This implementation inserts the group into the action set additions group protected void add Group I Contribution Manager mgr String name I Contribution Item ref Item find Insertion Point I Workbench Action Constants MB ADDITIONS action Set Id mgr true Insert the new group marker Action Set Separator group new Action Set Separator name action Set Id if ref Item null mgr add group else mgr insert After ref Item get Id group  addGroup IContributionManager IContributionItem refItem findInsertionPoint IWorkbenchActionConstants MB_ADDITIONS actionSetId ActionSetSeparator ActionSetSeparator actionSetId refItem insertAfter refItem getId
Contributes submenus and or actions into the provided menu and tool bar managers public void contribute I Action Bars bars boolean menu Append If Missing boolean tool Append If Missing I Menu Manager menu Mgr bars get Menu Manager I Tool Bar Manager tool Bar Mgr bars get Tool Bar Manager if menus null menu Mgr null for int i 0 i menus size i I Configuration Element menu Element I Configuration Element menus get i contribute Menu menu Element menu Mgr menu Append If Missing if actions null for int i 0 i actions size i Action Descriptor ad Action Descriptor actions get i if menu Mgr null contribute Menu Action ad menu Mgr menu Append If Missing if tool Bar Mgr null if bars instanceof Action Set Action Bars contribute Coolbar Action ad Action Set Action Bars bars else contribute Toolbar Action ad tool Bar Mgr tool Append If Missing  IActionBars menuAppendIfMissing toolAppendIfMissing IMenuManager menuMgr getMenuManager IToolBarManager toolBarMgr getToolBarManager menuMgr IConfigurationElement menuElement IConfigurationElement contributeMenu menuElement menuMgr menuAppendIfMissing ActionDescriptor ActionDescriptor menuMgr contributeMenuAction menuMgr menuAppendIfMissing toolBarMgr ActionSetActionBars contributeCoolbarAction ActionSetActionBars contributeToolbarAction toolBarMgr toolAppendIfMissing
Contributes action from the action descriptor into the cool bar manager protected void contribute Adjunct Coolbar Action Action Descriptor ad Action Set Action Bars bars String tool Bar Id ad get Toolbar Id String tool Group Id ad get Toolbar Group Id String contributing Id bars get Action Set Id I Cool Bar Manager cool Bar Mgr bars get Cool Bar Manager if cool Bar Mgr null return Plugin Action action ad get Action Plugin Action Cool Bar Contribution Item action Contribution new Plugin Action Cool Bar Contribution Item action bars add Adjunct Contribution action Contribution create a coolitem for the toolbar id if it does not yet exist I Tool Bar Manager tool Bar Manager bars get Tool Bar Manager tool Bar Id Check to see if the group already exists I Contribution Item group Marker tool Bar Manager find tool Group Id Add a group marker if one does not exist if group Marker null tool Bar Manager add new Separator tool Group Id I Contribution Item ref Item find Alphabetical Order tool Group Id contributing Id tool Bar Manager if ref Item null tool Bar Manager insert After ref Item get Id action Contribution else tool Bar Manager add action Contribution tool Bar Manager update false  contributeAdjunctCoolbarAction ActionDescriptor ActionSetActionBars toolBarId getToolbarId toolGroupId getToolbarGroupId contributingId getActionSetId ICoolBarManager coolBarMgr getCoolBarManager coolBarMgr PluginAction getAction PluginActionCoolBarContributionItem actionContribution PluginActionCoolBarContributionItem addAdjunctContribution actionContribution IToolBarManager toolBarManager getToolBarManager toolBarId IContributionItem groupMarker toolBarManager toolGroupId groupMarker toolBarManager toolGroupId IContributionItem refItem findAlphabeticalOrder toolGroupId contributingId toolBarManager refItem toolBarManager insertAfter refItem getId actionContribution toolBarManager actionContribution toolBarManager
Contributes action from the action descriptor into the cool bar manager protected void contribute Coolbar Action Action Descriptor ad Action Set Action Bars bars String tool Bar Id ad get Toolbar Id String tool Group Id ad get Toolbar Group Id if tool Bar Id null tool Group Id null return String contributing Id bars get Action Set Id if tool Bar Id null tool Bar Id equals NON NLS 1 the item is being added to the coolitem for its action set tool Bar Id contributing Id if tool Bar Id equals contributing Id adding to another action set validate the id if is Valid Cool Item Id tool Bar Id window toolbarid not valid add the item to the coolitem for its action set tool Bar Id contributing Id else adjunct Actions add ad return Create the action Plugin Action action ad get Action Plugin Action Cool Bar Contribution Item action Contribution new Plugin Action Cool Bar Contribution Item action retreive the toolbar from the action bars I Tool Bar Manager tool Bar bars get Tool Bar Manager tool Bar Id Check to see if the group already exists I Contribution Item group Marker tool Bar find tool Group Id Add a group marker if one does not exist if group Marker null issue should this be a Group Marker tool Bar add new Separator tool Group Id tool Bar prepend To Group tool Group Id action Contribution tool Bar update false  contributeCoolbarAction ActionDescriptor ActionSetActionBars toolBarId getToolbarId toolGroupId getToolbarGroupId toolBarId toolGroupId contributingId getActionSetId toolBarId toolBarId toolBarId contributingId toolBarId contributingId isValidCoolItemId toolBarId toolBarId contributingId adjunctActions PluginAction getAction PluginActionCoolBarContributionItem actionContribution PluginActionCoolBarContributionItem IToolBarManager toolBar getToolBarManager toolBarId IContributionItem groupMarker toolBar toolGroupId groupMarker GroupMarker toolBar toolGroupId toolBar prependToGroup toolGroupId actionContribution toolBar
Checks to see if the cool item id is in the given window private boolean is Valid Cool Item Id String id Workbench Window window Action Set Registry registry Workbench Plugin get Default get Action Set Registry if registry find Action Set id null return true if window null return window is Workbench Cool Item Id id return false  isValidCoolItemId WorkbenchWindow ActionSetRegistry WorkbenchPlugin getDefault getActionSetRegistry findActionSet isWorkbenchCoolItemId
protected void insert Menu Group I Menu Manager menu Abstract Group Marker marker if action Set Id null I Contribution Item items menu get Items Loop thru all the current groups looking for the first group whose id than the current action set id Insert current marker just before this item then for int i 0 i items length i I Contribution Item item items i if item is Separator item is Group Marker if item instanceof I Action Set Contribution Item String test Id I Action Set Contribution Item item get Action Set Id if action Set Id compare To test Id 0 menu insert Before items i get Id marker return menu add marker  insertMenuGroup IMenuManager AbstractGroupMarker actionSetId IContributionItem getItems IContributionItem isSeparator isGroupMarker IActionSetContributionItem testId IActionSetContributionItem getActionSetId actionSetId compareTo testId insertBefore getId
private I Contribution Item find Alphabetical Order String start Id String item Id I Contribution Manager mgr I Contribution Item items mgr get Items int insert Index 0 look for starting point while insert Index items length I Contribution Item item items insert Index if item get Id equals start Id break insert Index Find the index that this item should be inserted in for int i insert Index 1 i items length i I Contribution Item item I Contribution Item items i if item is Group Marker break String test Id if item instanceof Plugin Action Cool Bar Contribution Item test Id Plugin Action Cool Bar Contribution Item item get Action Set Id else test Id item get Id if item Id null if item Id compare To test Id 1 break insert Index i if insert Index items length return null return items insert Index  IContributionItem findAlphabeticalOrder startId itemId IContributionManager IContributionItem getItems insertIndex insertIndex IContributionItem insertIndex getId startId insertIndex insertIndex IContributionItem IContributionItem isGroupMarker testId PluginActionCoolBarContributionItem testId PluginActionCoolBarContributionItem getActionSetId testId getId itemId itemId compareTo testId insertIndex insertIndex insertIndex
public boolean is Adjunct Contributor return adjunct Actions size 0  isAdjunctContributor adjunctActions
protected void insert After I Contribution Manager mgr String ref Id I Contribution Item item I Contribution Item ref Item find Insertion Point ref Id action Set Id mgr true if ref Item null mgr insert After ref Item get Id item else Workbench Plugin log Reference item ref Id not found for action item get Id NON NLS 1 NON NLS 2  insertAfter IContributionManager refId IContributionItem IContributionItem refItem findInsertionPoint refId actionSetId refItem insertAfter refItem getId WorkbenchPlugin refId getId
for dynamic UI private void revoke Contribution Workbench Window window I Action Bars bars String id revoke Action Set From Menu window get Menu Manager id I Menu Manager menu Mgr bars get Menu Manager if menu Mgr null revoke Action Set From Menu menu Mgr id revoke Action Set From Coolbar window get Cool Bar Manager id I Tool Bar Manager tool Bar Mgr bars get Tool Bar Manager if tool Bar Mgr null tool Bar Mgr instanceof Cool Item Tool Bar Manager revoke Action Set From Toolbar tool Bar Mgr id  revokeContribution WorkbenchWindow IActionBars revokeActionSetFromMenu getMenuManager IMenuManager menuMgr getMenuManager menuMgr revokeActionSetFromMenu menuMgr revokeActionSetFromCoolbar getCoolBarManager IToolBarManager toolBarMgr getToolBarManager toolBarMgr toolBarMgr CoolItemToolBarManager revokeActionSetFromToolbar toolBarMgr
for dynamic UI protected void revoke Adjunct Coolbar Action Action Descriptor ad Action Set Action Bars bars String tool Bar Id ad get Toolbar Id String tool Group Id ad get Toolbar Group Id String contributing Id bars get Action Set Id I Cool Bar Manager cool Bar Mgr bars get Cool Bar Manager Cool Item Tool Bar Manager bars get Tool Bar Manager get Parent Manager Plugin Action action ad get Action Plugin Action Cool Bar Contribution Item action Contribution new Plugin Action Cool Bar Contribution Item action bars remove Adjunct Contribution action Contribution remove a coolitem for the toolbar id if it exists I Contribution Item cb Item cool Bar Mgr find tool Bar Id if cb Item null cool Bar Mgr remove cb Item active Manager cb Item get Tool Bar Manager active Manager remove contributing Id I Contribution Item group Marker active Manager find tool Group Id if group Marker null int idx active Manager index Of tool Group Id I Contribution Item items active Manager get Items if items length idx 1 items length idx items idx 1 instanceof Separator if active Manager find tool Group Id null active Manager remove tool Group Id active Manager add Adjunct Item To Group tool Group Id contributing Id action Contribution  revokeAdjunctCoolbarAction ActionDescriptor ActionSetActionBars toolBarId getToolbarId toolGroupId getToolbarGroupId contributingId getActionSetId ICoolBarManager coolBarMgr getCoolBarManager CoolItemToolBarManager getToolBarManager getParentManager PluginAction getAction PluginActionCoolBarContributionItem actionContribution PluginActionCoolBarContributionItem removeAdjunctContribution actionContribution IContributionItem cbItem coolBarMgr toolBarId cbItem coolBarMgr cbItem activeManager cbItem getToolBarManager activeManager contributingId IContributionItem groupMarker activeManager toolGroupId groupMarker activeManager indexOf toolGroupId IContributionItem activeManager getItems activeManager toolGroupId activeManager toolGroupId activeManager addAdjunctItemToGroup toolGroupId contributingId actionContribution
for dynamic UI private void revoke Action Set From Menu I Menu Manager menu Mgr String actionset Id I Contribution Item items menu Mgr get Items Array List items To Remove new Array List String id for int i 0 i items length i if items i instanceof I Menu Manager revoke Action Set From Menu I Menu Manager items i actionset Id else if items i instanceof Action Set Contribution Item id Action Set Contribution Item items i get Action Set Id if id equals actionset Id items To Remove add items i else if items i instanceof Separator id Separator items i get Id if id equals actionset Id items To Remove add items i else if items i instanceof Group Marker id Group Marker items i get Id if id equals actionset Id items To Remove add items i java util Iterator iter items To Remove iterator while iter has Next I Contribution Item item I Contribution Item iter next menu Mgr remove item menu Mgr update true  revokeActionSetFromMenu IMenuManager menuMgr actionsetId IContributionItem menuMgr getItems ArrayList itemsToRemove ArrayList IMenuManager revokeActionSetFromMenu IMenuManager actionsetId ActionSetContributionItem ActionSetContributionItem getActionSetId actionsetId itemsToRemove getId actionsetId itemsToRemove GroupMarker GroupMarker getId actionsetId itemsToRemove itemsToRemove hasNext IContributionItem IContributionItem menuMgr menuMgr
for dynamic UI private void revoke Action Set From Coolbar I Cool Bar Manager coolbar Mgr String actionset Id I Contribution Item items coolbar Mgr get Items Array List items To Remove new Array List String id for int i 0 i items length i id items i get Id if id equals actionset Id items To Remove add items i continue if items i instanceof Tool Bar Manager revoke Action Set From Toolbar I Tool Bar Manager items i actionset Id else if items i instanceof Tool Bar Contribution Item id Tool Bar Contribution Item items i get Id if id equals actionset Id items To Remove add items i else if items i instanceof Group Marker id Group Marker items i get Id if id equals actionset Id items To Remove add items i java util Iterator iter items To Remove iterator while iter has Next coolbar Mgr remove I Contribution Item iter next coolbar Mgr update true  revokeActionSetFromCoolbar ICoolBarManager coolbarMgr actionsetId IContributionItem coolbarMgr getItems ArrayList itemsToRemove ArrayList getId actionsetId itemsToRemove ToolBarManager revokeActionSetFromToolbar IToolBarManager actionsetId ToolBarContributionItem ToolBarContributionItem getId actionsetId itemsToRemove GroupMarker GroupMarker getId actionsetId itemsToRemove itemsToRemove hasNext coolbarMgr IContributionItem coolbarMgr
for dynamic UI private void revoke Action Set From Toolbar I Tool Bar Manager toolbar Mgr String actionset Id I Contribution Item items toolbar Mgr get Items Array List items To Remove new Array List String id for int i 0 i items length i id items i get Id if id equals actionset Id items To Remove add items i continue if items i instanceof Plugin Action Cool Bar Contribution Item id Plugin Action Cool Bar Contribution Item items i get Action Set Id if id equals actionset Id items To Remove add items i else if items i instanceof Action Contribution Item id Action Contribution Item items i get Id if id equals actionset Id items To Remove add items i else if items i instanceof Group Marker id Group Marker items i get Id if id equals actionset Id items To Remove add items i java util Iterator iter items To Remove iterator while iter has Next toolbar Mgr remove I Contribution Item iter next toolbar Mgr update true  revokeActionSetFromToolbar IToolBarManager toolbarMgr actionsetId IContributionItem toolbarMgr getItems ArrayList itemsToRemove ArrayList getId actionsetId itemsToRemove PluginActionCoolBarContributionItem PluginActionCoolBarContributionItem getActionSetId actionsetId itemsToRemove ActionContributionItem ActionContributionItem getId actionsetId itemsToRemove GroupMarker GroupMarker getId actionsetId itemsToRemove itemsToRemove hasNext toolbarMgr IContributionItem toolbarMgr
for dynamic UI public void remove Action Extensions Plugin Action Set set I Workbench Window window this action Set set this window window cache null current Contribution null targetID null target Contribution Tag TAG ACTION SET String id set get Desc get Id cache Array List Workbench Plugin get Default get Action Set Registry remove Cache id read Elements new I Configuration Element set get Config Element if cache null for int i 0 i cache size i Action Set Contribution contribution Action Set Contribution cache get i contribution revoke Contribution Workbench Window window action Set get Bars id if contribution is Adjunct Contributor for int j 0 j contribution adjunct Actions size j Action Descriptor adjunct Action Action Descriptor contribution adjunct Actions get j contribution revoke Adjunct Coolbar Action adjunct Action action Set get Bars  removeActionExtensions PluginActionSet IWorkbenchWindow actionSet currentContribution targetContributionTag TAG_ACTION_SET getDesc getId ArrayList WorkbenchPlugin getDefault getActionSetRegistry removeCache readElements IConfigurationElement getConfigElement ActionSetContribution ActionSetContribution revokeContribution WorkbenchWindow actionSet getBars isAdjunctContributor adjunctActions ActionDescriptor adjunctAction ActionDescriptor adjunctActions revokeAdjunctCoolbarAction adjunctAction actionSet getBars

private List cache new Array List Plugin Action Set Reader constructor comment public Plugin Action Set Reader super  ArrayList PluginActionSetReader PluginActionSetReader
This factory method returns a new Action Descriptor for the configuration element protected Lightweight Action Descriptor create Action Descriptor I Configuration Element element return new Lightweight Action Descriptor element  ActionDescriptor LightweightActionDescriptor createActionDescriptor IConfigurationElement LightweightActionDescriptor
Return all the action descriptor within the set public Lightweight Action Descriptor read Action Descriptors Action Set Descriptor action Set read Elements new I Configuration Element action Set get Config Element Lightweight Action Descriptor actions new Lightweight Action Descriptor cache size cache to Array actions return actions  LightweightActionDescriptor readActionDescriptors ActionSetDescriptor actionSet readElements IConfigurationElement actionSet getConfigElement LightweightActionDescriptor LightweightActionDescriptor toArray
see Registry Reader protected boolean read Element I Configuration Element element String tag element get Name if tag equals Plugin Action Set Builder TAG ACTION SET read Element Children element return true if tag equals Object Action Contributor Reader TAG OBJECT CONTRIBUTION This builder is sometimes used to read the popup menu extension point Ignore all object contributions return true if tag equals Plugin Action Set Builder TAG MENU return true just cache the element don t go into it if tag equals Plugin Action Set Builder TAG ACTION cache add create Action Descriptor element return true just cache the action don t go into return false  RegistryReader readElement IConfigurationElement getName PluginActionSetBuilder TAG_ACTION_SET readElementChildren ObjectActionContributorReader TAG_OBJECT_CONTRIBUTION PluginActionSetBuilder TAG_MENU PluginActionSetBuilder TAG_ACTION createActionDescriptor

public void clear Caches for Iterator i extenders iterator i has Next Popup Menu Extender extender Popup Menu Extender i next extender read Static Actions  clearCaches hasNext PopupMenuExtender PopupMenuExtender readStaticActions
private void add Extender Popup Menu Extender extender extenders add extender  addExtender PopupMenuExtender
private void remove Extender Popup Menu Extender extender extenders remove extender  removeExtender PopupMenuExtender
private static final Popup Menu Extender Manager manager new Popup Menu Extender Manager public static final Popup Menu Extender Manager get Manager return manager  PopupMenuExtenderManager PopupMenuExtenderManager PopupMenuExtenderManager getManager
Construct a new menu extender public Popup Menu Extender String id Menu Manager menu I Selection Provider prov I Workbench Part part super this menuID id this menu menu this sel Provider prov this part part menu add Menu Listener this if menu get Remove All When Shown menu Wrapper new Sub Menu Manager menu menu Wrapper set Visible true get Manager add Extender this read Static Actions  PopupMenuExtender MenuManager ISelectionProvider IWorkbenchPart selProvider addMenuListener getRemoveAllWhenShown menuWrapper SubMenuManager menuWrapper setVisible getManager addExtender readStaticActions
get Menu Id added by Dan Rubel dan rubel instantiations com Return the menu identifier public String get Menu Id return menuID  getMenuId dan_rubel getMenuId
Contributes items registered for the object type s in the current selection private void add Object Actions I Menu Manager mgr if sel Provider null if Object Action Contributor Manager get Manager contribute Object Actions part mgr sel Provider mgr add new Separator  addObjectActions IMenuManager selProvider ObjectActionContributorManager getManager contributeObjectActions selProvider
Adds static items to the context menu private void add Static Actions I Menu Manager mgr if static Action Builder null static Action Builder contribute mgr null true  addStaticActions IMenuManager staticActionBuilder staticActionBuilder
Notifies the listener that the menu is about to be shown public void menu About To Show I Menu Manager mgr test For Additions if menu Wrapper null mgr menu Wrapper menu Wrapper remove All add Object Actions mgr add Static Actions mgr  menuAboutToShow IMenuManager testForAdditions menuWrapper menuWrapper menuWrapper removeAll addObjectActions addStaticActions
Read static items for the context menu private void read Static Actions If no menu id provided then there is no contributions to add Fix for bug 33140 if menuID null menuID length 0 static Action Builder new Viewer Action Builder if static Action Builder read Viewer Contributions menuID sel Provider part static Action Builder null  readStaticActions staticActionBuilder ViewerActionBuilder staticActionBuilder readViewerContributions selProvider staticActionBuilder
Checks for the existance of an MB ADDITIONS group private void test For Additions I Contribution Item item menu find I Workbench Action Constants MB ADDITIONS if item null Workbench Plugin log Context menu missing standard group org eclipse ui I Workbench Action Constants MB ADDITIONS menu id NON NLS 1 menuID null menuID NON NLS 1 part id NON NLS 1 part null part get Site get Id NON NLS 1 NON NLS 1  MB_ADDITIONS testForAdditions IContributionItem IWorkbenchActionConstants MB_ADDITIONS WorkbenchPlugin IWorkbenchActionConstants MB_ADDITIONS getSite getId
Dispose of the menu extender Should only be called when the part is disposed public void dispose if static Action Builder null static Action Builder dispose get Manager remove Extender this  staticActionBuilder staticActionBuilder getManager removeExtender

protected class Name Pattern Filter extends Viewer Filter public Name Pattern Filter no op  NamePatternFilter ViewerFilter NamePatternFilter
public boolean select Viewer viewer Object parent Element Object element String Matcher matcher get Matcher if matcher null viewer instanceof Table Viewer return true Table Viewer table Viewer Table Viewer viewer String match Name I Label Provider table Viewer get Label Provider get Text element A dirty editor s label will start with dirty prefix this prefix should not be taken in consideration when matching with a pattern String prefix Default Editor Presentation DIRTY PREFIX if match Name starts With prefix match Name match Name substring prefix length return match Name null matcher match match Name  parentElement StringMatcher getMatcher TableViewer TableViewer tableViewer TableViewer matchName ILabelProvider tableViewer getLabelProvider getText DefaultEditorPresentation DIRTY_PREFIX matchName startsWith matchName matchName matchName matchName
Creates a fill layout with a border public Border Fill Layout int border Size if border Size 0 throw new Illegal Argument Exception f Border Size border Size  BorderFillLayout borderSize borderSize IllegalArgumentException fBorderSize borderSize
Returns the border size public int get Border Size return f Border Size  getBorderSize fBorderSize
protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache Control children composite get Children Point min Size new Point 0 0 if children null for int i 0 i children length i Point size children i compute Size w Hint h Hint flush Cache min Size x Math max min Size x size x min Size y Math max min Size y size y min Size x f Border Size 2 RIGHT MARGIN min Size y f Border Size 2 return min Size  computeSize wHint hHint flushCache getChildren minSize computeSize wHint hHint flushCache minSize minSize minSize minSize minSize fBorderSize RIGHT_MARGIN minSize fBorderSize minSize
protected void layout Composite composite boolean flush Cache Control children composite get Children Point min Size new Point composite get Client Area width composite get Client Area height if children null for int i 0 i children length i Control child children i child set Size min Size x f Border Size 2 min Size y f Border Size 2 child set Location f Border Size f Border Size  flushCache getChildren minSize getClientArea getClientArea setSize minSize fBorderSize minSize fBorderSize setLocation fBorderSize fBorderSize
Creates an information control with the given shell as parent The given styles are applied to the shell and the table widget param parent the parent shell param shell Style the additional styles for the shell param control Style the additional styles for the control public Abstract Table Information Control Shell parent int shell Style int control Style f Shell new Shell parent shell Style Display display f Shell get Display f Shell set Background display get System Color SWT COLOR BLACK Composite for filter text and viewer f Composite new Composite f Shell SWT RESIZE Grid Layout layout new Grid Layout 1 false f Composite set Layout layout f Composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL create Filter Text f Composite f Table Viewer create Table Viewer f Composite control Style final Table table f Table Viewer get Table table add Key Listener new Key Listener public void key Pressed Key Event e if e character SWT ESC dispose else if e character SWT DEL remove Selected Items e character SWT NONE e doit false public void key Released Key Event e do nothing table add Selection Listener new Selection Listener public void widget Selected Selection Event e do nothing public void widget Default Selected Selection Event e goto Selected Element table add Mouse Move Listener new Mouse Move Listener Table Item f Last Item null public void mouse Move Mouse Event e if table equals e get Source Object o table get Item new Point e x e y if o instanceof Table Item if o equals f Last Item f Last Item Table Item o table set Selection new Table Item f Last Item else if e y table get Item Height 4 Scroll up Point p table to Display e x e y Item item f Table Viewer scroll Up p x p y if item instanceof Table Item f Last Item Table Item item table set Selection new Table Item f Last Item else if e y table get Bounds height table get Item Height 4 Scroll down Point p table to Display e x e y Item item f Table Viewer scroll Down p x p y if item instanceof Table Item f Last Item Table Item item table set Selection new Table Item f Last Item table add Mouse Listener new Mouse Adapter public void mouse Up Mouse Event e if table get Selection Count 1 return if e button 1 if table equals e get Source Object o table get Item new Point e x e y Table Item selection table get Selection 0 if selection equals o goto Selected Element if e button 3 Table Item t Item f Table Viewer get Table get Item new Point e x e y if t Item null Menu menu new Menu f Table Viewer get Table Menu Item m Item new Menu Item menu SWT NONE m Item set Text Workbench Messages get String Part Pane close NON NLS 1 m Item add Selection Listener new Selection Adapter public void widget Selected Selection Event selection Event remove Selected Items menu set Visible true int border shell Style SWT NO TRIM 0 0 BORDER f Shell set Layout new Border Fill Layout border set Info System Color install Filter  shellStyle controlStyle AbstractTableInformationControl shellStyle controlStyle fShell shellStyle fShell getDisplay fShell setBackground getSystemColor COLOR_BLACK fComposite fShell GridLayout GridLayout fComposite setLayout fComposite setLayoutData GridData GridData FILL_HORIZONTAL createFilterText fComposite fTableViewer createTableViewer fComposite controlStyle fTableViewer getTable addKeyListener KeyListener keyPressed KeyEvent removeSelectedItems keyReleased KeyEvent addSelectionListener SelectionListener widgetSelected SelectionEvent widgetDefaultSelected SelectionEvent gotoSelectedElement addMouseMoveListener MouseMoveListener TableItem fLastItem mouseMove MouseEvent getSource getItem TableItem fLastItem fLastItem TableItem setSelection TableItem fLastItem getItemHeight toDisplay fTableViewer scrollUp TableItem fLastItem TableItem setSelection TableItem fLastItem getBounds getItemHeight toDisplay fTableViewer scrollDown TableItem fLastItem TableItem setSelection TableItem fLastItem addMouseListener MouseAdapter mouseUp MouseEvent getSelectionCount getSource getItem TableItem getSelection gotoSelectedElement TableItem tItem fTableViewer getTable getItem tItem fTableViewer getTable MenuItem mItem MenuItem mItem setText WorkbenchMessages getString PartPane mItem addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectionEvent removeSelectedItems setVisible shellStyle NO_TRIM fShell setLayout BorderFillLayout setInfoSystemColor installFilter
Removes the selected items from the list and closes their corresponding tabs Selects the next item in the list or disposes it if its presentation is disposed protected void remove Selected Items int sel Ind f Table Viewer get Table get Selection Index if delete Selected Elements return f Table Viewer refresh if sel Ind f Table Viewer get Table get Item Count sel Ind f Table Viewer get Table get Item Count 1 if sel Ind 0 f Table Viewer get Table set Selection sel Ind  removeSelectedItems selInd fTableViewer getTable getSelectionIndex deleteSelectedElements fTableViewer selInd fTableViewer getTable getItemCount selInd fTableViewer getTable getItemCount selInd fTableViewer getTable setSelection selInd
protected abstract Table Viewer create Table Viewer Composite parent int style  TableViewer createTableViewer
int style protected Table Viewer get Table Viewer return f Table Viewer  TableViewer getTableViewer fTableViewer
protected Text create Filter Text Composite parent f Filter Text new Text parent SWT NONE Grid Data data new Grid Data GC gc new GC parent gc set Font parent get Font Font Metrics font Metrics gc get Font Metrics gc dispose data height Hint org eclipse jface dialogs Dialog convert Height In Chars To Pixels font Metrics 1 data horizontal Alignment Grid Data FILL data vertical Alignment Grid Data BEGINNING f Filter Text set Layout Data data f Filter Text add Key Listener new Key Listener public void key Pressed Key Event e if e key Code 0x0D return goto Selected Element if e key Code SWT ARROW DOWN f Table Viewer get Table set Focus f Table Viewer get Table set Selection 0 if e key Code SWT ARROW UP f Table Viewer get Table set Focus f Table Viewer get Table set Selection f Table Viewer get Table get Item Count 1 if e character 0x1B ESC dispose public void key Released Key Event e do nothing Horizontal separator line Label separator new Label parent SWT SEPARATOR SWT HORIZONTAL SWT LINE DOT separator set Layout Data new Grid Data Grid Data FILL HORIZONTAL return f Filter Text  createFilterText fFilterText GridData GridData setFont getFont FontMetrics fontMetrics getFontMetrics heightHint convertHeightInCharsToPixels fontMetrics horizontalAlignment GridData verticalAlignment GridData fFilterText setLayoutData fFilterText addKeyListener KeyListener keyPressed KeyEvent keyCode gotoSelectedElement keyCode ARROW_DOWN fTableViewer getTable setFocus fTableViewer getTable setSelection keyCode ARROW_UP fTableViewer getTable setFocus fTableViewer getTable setSelection fTableViewer getTable getItemCount keyReleased KeyEvent LINE_DOT setLayoutData GridData GridData FILL_HORIZONTAL fFilterText
private void set Info System Color Display display f Shell get Display set Foreground Color display get System Color SWT COLOR INFO FOREGROUND set Background Color display get System Color SWT COLOR INFO BACKGROUND  setInfoSystemColor fShell getDisplay setForegroundColor getSystemColor COLOR_INFO_FOREGROUND setBackgroundColor getSystemColor COLOR_INFO_BACKGROUND
f Filter Text add Modify Listener new Modify Listener public void modify Text Modify Event e String text Text e widget get Text int length text length if length 0 text char At length 1 text text set Matcher String text  fFilterText addModifyListener ModifyListener modifyText ModifyEvent getText charAt setMatcherString
private void install Filter f Filter Text set Text NON NLS 1 f Filter Text add Modify Listener new Modify Listener public void modify Text Modify Event e String text Text e widget get Text int length text length if length 0 text char At length 1 text text set Matcher String text  installFilter fFilterText setText fFilterText addModifyListener ModifyListener modifyText ModifyEvent getText charAt setMatcherString
The string matcher has been modified The default implementation refreshes the view and selects the first macthed element protected void string Matcher Updated refresh viewer to refilter f Table Viewer get Control set Redraw false f Table Viewer refresh select First Match f Table Viewer get Control set Redraw true  stringMatcherUpdated fTableViewer getControl setRedraw fTableViewer selectFirstMatch fTableViewer getControl setRedraw
Sets the patterns to filter out for the receiver p The following characters have special meaning any character any string p protected void set Matcher String String pattern if pattern length 0 f String Matcher null else boolean ignore Case pattern to Lower Case equals pattern f String Matcher new String Matcher pattern ignore Case false string Matcher Updated  setMatcherString fStringMatcher ignoreCase toLowerCase fStringMatcher StringMatcher ignoreCase stringMatcherUpdated
protected String Matcher get Matcher return f String Matcher  StringMatcher getMatcher fStringMatcher
Implementers can modify protected Object get Selected Element return I Structured Selection f Table Viewer get Selection get First Element  getSelectedElement IStructuredSelection fTableViewer getSelection getFirstElement
Implementers can modify protected I Structured Selection get Selected Elements return I Structured Selection f Table Viewer get Selection  IStructuredSelection getSelectedElements IStructuredSelection fTableViewer getSelection
protected abstract void goto Selected Element  gotoSelectedElement
Delete all selected elements return code true code if there are no elements left after deletion 
Selects the first element in the table which matches the current filter pattern protected void select First Match Table table f Table Viewer get Table Object element find Element table get Items if element null f Table Viewer set Selection new Structured Selection element true else f Table Viewer set Selection Structured Selection EMPTY  selectFirstMatch fTableViewer getTable findElement getItems fTableViewer setSelection StructuredSelection fTableViewer setSelection StructuredSelection
private Object find Element Table Item items I Label Provider label Provider I Label Provider f Table Viewer get Label Provider for int i 0 i items length i Object element items i get Data if f String Matcher null return element if element null String label label Provider get Text element remove the dirty prefix from the editor s label String prefix Default Editor Presentation DIRTY PREFIX if label starts With prefix label label substring prefix length if f String Matcher match label return element return null  findElement TableItem ILabelProvider labelProvider ILabelProvider fTableViewer getLabelProvider getData fStringMatcher labelProvider getText DefaultEditorPresentation DIRTY_PREFIX startsWith fStringMatcher
public abstract void set Input Object information  setInput
protected void input Changed Object new Input Object new Selection f Filter Text set Text NON NLS 1 f Table Viewer set Input new Input Resize the table s height accordingly to the new input Table viewer Table f Table Viewer get Table Point table Size viewer Table compute Size SWT DEFAULT SWT DEFAULT int table Max Height f Composite get Display get Bounds height 2 removes padding if necessary int table Height table Size y table Max Height table Size y viewer Table get Item Height viewer Table get Item Height 2 table Max Height Grid Data viewer Table get Layout Data height Hint table Height Point f Comp Size f Composite compute Size SWT DEFAULT SWT DEFAULT f Composite set Size f Comp Size f Composite get Shell set Size f Comp Size  inputChanged newInput newSelection fFilterText setText fTableViewer setInput newInput viewerTable fTableViewer getTable tableSize viewerTable computeSize tableMaxHeight fComposite getDisplay getBounds tableHeight tableSize tableMaxHeight tableSize viewerTable getItemHeight viewerTable getItemHeight tableMaxHeight GridData viewerTable getLayoutData heightHint tableHeight fCompSize fComposite computeSize fComposite setSize fCompSize fComposite getShell setSize fCompSize
public void set Visible boolean visible f Shell set Visible visible  setVisible fShell setVisible
public void dispose if f Shell null if f Shell is Disposed f Shell dispose f Shell null f Table Viewer null f Composite null f Filter Text null  fShell fShell isDisposed fShell fShell fTableViewer fComposite fFilterText
public boolean has Contents return f Table Viewer null f Table Viewer get Input null  hasContents fTableViewer fTableViewer getInput
public void set Size Constraints int max Width int max Height f Max Width max Width f Max Height max Height  setSizeConstraints maxWidth maxHeight fMaxWidth maxWidth fMaxHeight maxHeight
public Point compute Size Hint return f Shell compute Size SWT DEFAULT SWT DEFAULT  computeSizeHint fShell computeSize
public void set Location Point location Rectangle trim f Shell compute Trim 0 0 0 0 Point text Location f Composite get Location location x trim x text Location x location y trim y text Location y f Shell set Location location  setLocation fShell computeTrim textLocation fComposite getLocation textLocation textLocation fShell setLocation
public void set Size int width int height f Shell set Size width height  setSize fShell setSize
public void add Dispose Listener Dispose Listener listener f Shell add Dispose Listener listener  addDisposeListener DisposeListener fShell addDisposeListener
public void remove Dispose Listener Dispose Listener listener f Shell remove Dispose Listener listener  removeDisposeListener DisposeListener fShell removeDisposeListener
public void set Foreground Color Color foreground f Table Viewer get Table set Foreground foreground f Filter Text set Foreground foreground f Composite set Foreground foreground  setForegroundColor fTableViewer getTable setForeground fFilterText setForeground fComposite setForeground
public void set Background Color Color background f Table Viewer get Table set Background background f Filter Text set Background background f Composite set Background background  setBackgroundColor fTableViewer getTable setBackground fFilterText setBackground fComposite setBackground
public boolean is Focus Control return f Table Viewer get Control is Focus Control f Filter Text is Focus Control  isFocusControl fTableViewer getControl isFocusControl fFilterText isFocusControl
public void set Focus f Shell force Focus f Filter Text set Focus  setFocus fShell forceFocus fFilterText setFocus
public void add Focus Listener Focus Listener listener f Shell add Focus Listener listener  addFocusListener FocusListener fShell addFocusListener
public void remove Focus Listener Focus Listener listener f Shell remove Focus Listener listener  removeFocusListener FocusListener fShell removeFocusListener

private Default Part Presentation basic Stack Presentation public Basic Stack List Content Provider no op  DefaultPartPresentation basicStackPresentation BasicStackListContentProvider
public void dispose no op 
public Object get Elements Object input Element if basic Stack Presentation null return new C Tab Item 0 final Pane Folder tab Folder basic Stack Presentation get Tab Folder TODO Array List items new Array List Arrays as List tab Folder get Items for Iterator iterator items iterator iterator has Next C Tab Item tab Item C Tab Item iterator next if tab Item is Showing iterator remove return items to Array return tab Folder get Items  getElements inputElement basicStackPresentation CTabItem PaneFolder tabFolder basicStackPresentation getTabFolder ArrayList ArrayList asList tabFolder getItems hasNext CTabItem tabItem CTabItem tabItem isShowing toArray tabFolder getItems
public void input Changed Viewer viewer Object old Input Object new Input basic Stack Presentation Default Part Presentation new Input  inputChanged oldInput newInput basicStackPresentation DefaultPartPresentation newInput
private Font bold Font null public Basic Stack List Label Provider no op  boldFont BasicStackListLabelProvider
public String get Text Object element C Tab Item tab Item C Tab Item element Default Part Presentation basic Stack Presentation Default Part Presentation get Table Viewer get Input I Presentable Part presentable Part basic Stack Presentation get Part For Tab tab Item TODO the true parameter should be removed return basic Stack Presentation get Label Text presentable Part true  getText CTabItem tabItem CTabItem DefaultPartPresentation basicStackPresentation DefaultPartPresentation getTableViewer getInput IPresentablePart presentablePart basicStackPresentation getPartForTab tabItem basicStackPresentation getLabelText presentablePart
public Image get Image Object element C Tab Item tab Item C Tab Item element Default Part Presentation basic Stack Presentation Default Part Presentation get Table Viewer get Input I Presentable Part presentable Part basic Stack Presentation get Part For Tab tab Item return basic Stack Presentation get Label Image presentable Part  getImage CTabItem tabItem CTabItem DefaultPartPresentation basicStackPresentation DefaultPartPresentation getTableViewer getInput IPresentablePart presentablePart basicStackPresentation getPartForTab tabItem basicStackPresentation getLabelImage presentablePart
public Font get Font Object element C Tab Item tab Item C Tab Item element check to determine if the user selected the single tab mode C Tab Folder tab Folder tab Item get Parent boolean single Tab tab Folder get Single if in single tab mode do not use the bold font for non visible tabs if in multiple tab mode use the bold for non visible tabs only if tab Item is Showing single Tab return null if bold Font null Font original Font tab Item get Font Font Data font Data original Font get Font Data Adding the bold attribute for int i 0 i font Data length i font Data i set Style font Data i get Style SWT BOLD bold Font new Font tab Item get Display font Data return bold Font  getFont CTabItem tabItem CTabItem CTabFolder tabFolder tabItem getParent singleTab tabFolder getSingle tabItem isShowing singleTab boldFont originalFont tabItem getFont FontData fontData originalFont getFontData fontData fontData setStyle fontData getStyle boldFont tabItem getDisplay fontData boldFont
public void dispose super dispose if bold Font null bold Font dispose  boldFont boldFont
private class Basic Stack List Viewer Sorter extends Viewer Sorter public Basic Stack List Viewer Sorter no op  BasicStackListViewerSorter ViewerSorter BasicStackListViewerSorter
public Basic Stack List Viewer Sorter Collator collator super collator  BasicStackListViewerSorter
public int compare Viewer viewer Object e1 Object e2 int cat1 category e1 int cat2 category e2 if cat1 cat2 return cat1 cat2 cat1 cat2 String name1 String name2 if viewer null viewer instanceof Content Viewer name1 e1 to String name2 e2 to String else I Base Label Provider prov Content Viewer viewer get Label Provider if prov instanceof I Label Provider I Label Provider lprov I Label Provider prov name1 lprov get Text e1 name2 lprov get Text e2 I Label Provider s implementation in Basic Stack List calls Default Editor Presentation get Label Text which returns the name of dirty files begining with dirty prefix sorting should not take dirty prefix in consideration String prefix Default Editor Presentation DIRTY PREFIX if name1 starts With prefix name1 name1 substring prefix length if name2 starts With prefix name2 name2 substring prefix length else name1 e1 to String name2 e2 to String if name1 null name1 NON NLS 1 if name2 null name2 NON NLS 1 return collator compare name1 name2  ContentViewer toString toString IBaseLabelProvider ContentViewer getLabelProvider ILabelProvider ILabelProvider ILabelProvider getText getText ILabelProvider BasicStackList DefaultEditorPresentation getLabelText DefaultEditorPresentation DIRTY_PREFIX startsWith startsWith toString toString
public int category Object element C Tab Item tab Item C Tab Item element if tab Item is Showing return 1 visible return 0 not visible  CTabItem tabItem CTabItem tabItem isShowing
public Basic Stack List Shell parent int shell Style int tree Style super parent shell Style tree Style  BasicStackList shellStyle treeStyle shellStyle treeStyle
protected void internal Refresh Object element boolean using Motif motif equals SWT get Platform try This avoids a graphic is disposed error on Motif by not letting it redraw while we remove entries Some items in this table are being removed and may have icons which may have already been disposed elsewhere if using Motif get Table set Redraw false super internal Refresh element finally if using Motif get Table set Redraw true  internalRefresh usingMotif getPlatform usingMotif getTable setRedraw internalRefresh usingMotif getTable setRedraw
protected Table Viewer create Table Viewer Composite parent int style Table table new Table parent SWT SINGLE style SWT MULTI table set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING Table Viewer table Viewer new Table Viewer table non Javadoc see org eclipse jface viewers Table Viewer internal Refresh java lang Object protected void internal Refresh Object element boolean using Motif motif equals SWT get Platform try This avoids a graphic is disposed error on Motif by not letting it redraw while we remove entries Some items in this table are being removed and may have icons which may have already been disposed elsewhere if using Motif get Table set Redraw false super internal Refresh element finally if using Motif get Table set Redraw true table Viewer add Filter new Name Pattern Filter table Viewer set Content Provider new Basic Stack List Content Provider table Viewer set Sorter new Basic Stack List Viewer Sorter table Viewer set Label Provider new Basic Stack List Label Provider return table Viewer  TableViewer createTableViewer setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING TableViewer tableViewer TableViewer TableViewer internalRefresh internalRefresh usingMotif getPlatform usingMotif getTable setRedraw internalRefresh usingMotif getTable setRedraw tableViewer addFilter NamePatternFilter tableViewer setContentProvider BasicStackListContentProvider tableViewer setSorter BasicStackListViewerSorter tableViewer setLabelProvider BasicStackListLabelProvider tableViewer
public void set Input Object information Default Part Presentation basic Stack Presentation Default Part Presentation information input Changed basic Stack Presentation basic Stack Presentation get Tab Folder get Selection  setInput DefaultPartPresentation basicStackPresentation DefaultPartPresentation inputChanged basicStackPresentation basicStackPresentation getTabFolder getSelection
protected void goto Selected Element Object selected Element get Selected Element Default Part Presentation basic Stack Presentation null if selected Element null basic Stack Presentation Default Part Presentation get Table Viewer get Input close the shell dispose open the part if one was selected if basic Stack Presentation null basic Stack Presentation set Selection C Tab Item selected Element  gotoSelectedElement selectedElement getSelectedElement DefaultPartPresentation basicStackPresentation selectedElement basicStackPresentation DefaultPartPresentation getTableViewer getInput basicStackPresentation basicStackPresentation setSelection CTabItem selectedElement
protected boolean delete Selected Elements I Structured Selection structured Selection get Selected Elements if structured Selection null Default Part Presentation basic Stack Presentation Default Part Presentation get Table Viewer get Input Array List list new Array List structured Selection size for Iterator iterator structured Selection iterator iterator has Next I Presentable Part presentable Part basic Stack Presentation get Part For Tab C Tab Item iterator next list add presentable Part basic Stack Presentation close I Presentable Part list to Array new I Presentable Part list size if Default Part Presentation get Table Viewer get Input is Disposed f Composite dispose return true return false  deleteSelectedElements IStructuredSelection structuredSelection getSelectedElements structuredSelection DefaultPartPresentation basicStackPresentation DefaultPartPresentation getTableViewer getInput ArrayList ArrayList structuredSelection structuredSelection hasNext IPresentablePart presentablePart basicStackPresentation getPartForTab CTabItem presentablePart basicStackPresentation IPresentablePart toArray IPresentablePart DefaultPartPresentation getTableViewer getInput isDisposed fComposite

public void property Change Property Change Event property Change Event if is Disposed return if I Preference Constants EDITOR TAB POSITION equals property Change Event get Property is Disposed int tab Location preference Store get Int I Preference Constants EDITOR TAB POSITION get Tab Folder set Tab Position tab Location layout false else if I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS equals property Change Event get Property is Disposed boolean traditional Tab api Preference Store get Boolean I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS set Tab Style traditional Tab boolean multi Changed I Preference Constants SHOW MULTIPLE EDITOR TABS equals property Change Event get Property boolean style Changed I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS equals property Change Event get Property Pane Folder tab Folder get Tab Folder if multi Changed style Changed tab Folder null if multi Changed boolean multi preference Store get Boolean I Preference Constants SHOW MULTIPLE EDITOR TABS tab Folder set Single Tab multi else boolean simple api Preference Store get Boolean I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS tab Folder set Simple Tab simple C Tab Item tab Items tab Folder get Items for int i 0 i tab Items length i C Tab Item tab Item tab Items i init Tab tab Item get Part For Tab tab Item  propertyChange PropertyChangeEvent propertyChangeEvent isDisposed IPreferenceConstants EDITOR_TAB_POSITION propertyChangeEvent getProperty isDisposed tabLocation preferenceStore getInt IPreferenceConstants EDITOR_TAB_POSITION getTabFolder setTabPosition tabLocation IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS propertyChangeEvent getProperty isDisposed traditionalTab apiPreferenceStore getBoolean IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS setTabStyle traditionalTab multiChanged IPreferenceConstants SHOW_MULTIPLE_EDITOR_TABS propertyChangeEvent getProperty styleChanged IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS propertyChangeEvent getProperty PaneFolder tabFolder getTabFolder multiChanged styleChanged tabFolder multiChanged preferenceStore getBoolean IPreferenceConstants SHOW_MULTIPLE_EDITOR_TABS tabFolder setSingleTab apiPreferenceStore getBoolean IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS tabFolder setSimpleTab CTabItem tabItems tabFolder getItems tabItems CTabItem tabItem tabItems initTab tabItem getPartForTab tabItem
For editors we ll have to replace the contents instead of simply adding them to the presentation see org eclipse ui presentations Stack Presentation restore State org eclipse ui presentations I Presentation Serializer org eclipse ui I Memento public void restore State I Presentation Serializer serializer I Memento saved State I Memento parts saved State get Children I Workbench Constants TAG PART I Presentable Part current Part get Current Part the insertion index for the current part int insert 0 for int idx 0 idx parts length idx String id parts idx get String I Workbench Constants TAG ID if the part is not around then it doesn t get added I Presentable Part part id null null serializer get Part id if part null continue int part Index index Of part otherwise if the part is in the right place then do nothing if part Index insert insert continue otherwise remove the part and add it in the right place remove Part part add Part part part Index insert insert 1 insert reselect the part if it was previously the current if part current Part select Part part  StackPresentation restoreState IPresentationSerializer IMemento restoreState IPresentationSerializer IMemento savedState IMemento savedState getChildren IWorkbenchConstants TAG_PART IPresentablePart currentPart getCurrentPart getString IWorkbenchConstants TAG_ID IPresentablePart getPart partIndex indexOf partIndex removePart addPart partIndex currentPart selectPart
public Default Editor Presentation Composite parent I Stack Presentation Site new Site super new Pane Folder parent SWT BORDER new Site final Pane Folder tab Folder get Tab Folder preference Store add Property Change Listener property Change Listener api Preference Store add Property Change Listener property Change Listener int tab Location preference Store get Int I Preference Constants EDITOR TAB POSITION tab Folder set Tab Position tab Location tab Folder set Single Tab preference Store get Boolean I Preference Constants SHOW MULTIPLE EDITOR TABS set Tab Style api Preference Store get Boolean I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS do not support close box on unselected tabs tab Folder set Unselected Close Visible true do not support icons in unselected tabs tab Folder set Unselected Image Visible true get System Menu Manager add new Updating Action Contribution Item new System Menu Close Others this get System Menu Manager add new Updating Action Contribution Item new System Menu Close All this init  DefaultEditorPresentation IStackPresentationSite newSite PaneFolder newSite PaneFolder tabFolder getTabFolder preferenceStore addPropertyChangeListener propertyChangeListener apiPreferenceStore addPropertyChangeListener propertyChangeListener tabLocation preferenceStore getInt IPreferenceConstants EDITOR_TAB_POSITION tabFolder setTabPosition tabLocation tabFolder setSingleTab preferenceStore getBoolean IPreferenceConstants SHOW_MULTIPLE_EDITOR_TABS setTabStyle apiPreferenceStore getBoolean IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS tabFolder setUnselectedCloseVisible tabFolder setUnselectedImageVisible getSystemMenuManager UpdatingActionContributionItem SystemMenuCloseOthers getSystemMenuManager UpdatingActionContributionItem SystemMenuCloseAll
protected void widget Disposed preference Store remove Property Change Listener property Change Listener api Preference Store remove Property Change Listener property Change Listener super widget Disposed  widgetDisposed preferenceStore removePropertyChangeListener propertyChangeListener apiPreferenceStore removePropertyChangeListener propertyChangeListener widgetDisposed
protected void init Tab C Tab Item tab Item I Presentable Part part tab Item set Text get Label Text part get Tab Folder get Control get Style SWT MULTI 0 tab Item set Image get Label Image part String tool Tip Text part get Title Tool Tip if tool Tip Text equals Util ZERO LENGTH STRING tab Item set Tool Tip Text tool Tip Text  initTab CTabItem tabItem IPresentablePart tabItem setText getLabelText getTabFolder getControl getStyle tabItem setImage getLabelImage toolTipText getTitleToolTip toolTipText ZERO_LENGTH_STRING tabItem setToolTipText toolTipText
public void set Active int new State super set Active new State update Gradient  setActive newState setActive newState updateGradient
Set the tab folder tab style to a tradional style tab param traditional Tab code true code if traditional style tabs should be used code false code otherwise protected void set Tab Style boolean traditional Tab set the tab style to non simple get Tab Folder set Simple Tab traditional Tab  traditionalTab setTabStyle traditionalTab getTabFolder setSimpleTab traditionalTab
see org eclipse ui internal presentations Default Part Presentation get Current Title protected String get Current Title return NON NLS 1  DefaultPartPresentation getCurrentTitle getCurrentTitle
protected void update Gradient if is Disposed return I Theme theme PlatformUI get Workbench get Theme Manager get Current Theme Color Registry color Registry theme get Color Registry if get Active Stack Presentation AS ACTIVE FOCUS set Active Tab Colors else if get Active Stack Presentation AS ACTIVE NOFOCUS draw Gradient color Registry get I Workbench Theme Constants INACTIVE TAB TEXT COLOR new Color color Registry get I Workbench Theme Constants INACTIVE TAB BG START new int 0 true else set Inactive Tab Colors boolean resize Needed false Font tab Font theme get Font Registry get I Workbench Theme Constants TAB TEXT FONT Font old Tab Font get Tab Folder get Control get Font if old Tab Font equals tab Font get Tab Folder get Control set Font tab Font only layout on font changes resize Needed true call super to ensure that the toolbar is updated properly super update Gradient if resize Needed get Tab Folder set Tab Height compute Tab Height ensure proper control sizes for new fonts set Control Size  updateGradient isDisposed ITheme getWorkbench getThemeManager getCurrentTheme ColorRegistry colorRegistry getColorRegistry getActive StackPresentation AS_ACTIVE_FOCUS setActiveTabColors getActive StackPresentation AS_ACTIVE_NOFOCUS drawGradient colorRegistry IWorkbenchThemeConstants INACTIVE_TAB_TEXT_COLOR colorRegistry IWorkbenchThemeConstants INACTIVE_TAB_BG_START setInactiveTabColors resizeNeeded tabFont getFontRegistry IWorkbenchThemeConstants TAB_TEXT_FONT oldTabFont getTabFolder getControl getFont oldTabFont tabFont getTabFolder getControl setFont tabFont resizeNeeded updateGradient resizeNeeded getTabFolder setTabHeight computeTabHeight setControlSize
see org eclipse ui internal presentations Default Part Presentation get Pane Name protected String get Pane Name return Workbench Messages get String Editor Pane move Editor NON NLS 1  DefaultPartPresentation getPaneName getPaneName WorkbenchMessages getString EditorPane moveEditor
String get Label Text I Presentable Part presentable Part boolean include Path String title super get Label Text presentable Part include Path String text title if include Path String content Description presentable Part get Title Status if content Description equals NON NLS 1 String title Tooltip presentable Part get Title Tool Tip trim if title Tooltip ends With title title Tooltip title Tooltip substring 0 title Tooltip last Index Of title trim if title Tooltip ends With NON NLS 1 title Tooltip title Tooltip substring 0 title Tooltip last Index Of trim NON NLS 1 if title Tooltip ends With NON NLS 1 title Tooltip title Tooltip substring 0 title Tooltip last Index Of trim NON NLS 1 content Description title Tooltip if content Description equals NON NLS 1 text Message Format format Workbench Messages get String Editor Part Auto Title Format new String text content Description NON NLS 1 if presentable Part is Dirty text DIRTY PREFIX text NON NLS 1 return text  getLabelText IPresentablePart presentablePart includePath getLabelText presentablePart includePath includePath contentDescription presentablePart getTitleStatus contentDescription titleTooltip presentablePart getTitleToolTip titleTooltip endsWith titleTooltip titleTooltip titleTooltip lastIndexOf titleTooltip endsWith titleTooltip titleTooltip titleTooltip lastIndexOf titleTooltip endsWith titleTooltip titleTooltip titleTooltip lastIndexOf contentDescription titleTooltip contentDescription MessageFormat WorkbenchMessages getString EditorPart AutoTitleFormat contentDescription presentablePart isDirty DIRTY_PREFIX

private Pane Folder Button Listener button Listener new Pane Folder Button Listener public void state Button Pressed int button Id get Site set State button Id  PaneFolderButtonListener buttonListener PaneFolderButtonListener stateButtonPressed buttonId getSite setState buttonId
public void close Button Pressed C Tab Item item I Presentable Part part get Part For Tab item get Site close new I Presentable Part part  closeButtonPressed CTabItem IPresentablePart getPartForTab getSite IPresentablePart
public void show List C Tab Folder Event event event doit false show Part List  showList CTabFolderEvent showPartList
private Mouse Listener mouse Listener new Mouse Adapter public void mouse Down Mouse Event e if e widget instanceof Control Control ctrl Control e widget Point global Pos ctrl to Display new Point e x e y PR 1GDEZ25 If selection will change in mouse up ignore mouse down Else set focus C Tab Item new Item tab Folder get Item tab Folder get Control to Control global Pos if new Item null C Tab Item old Item tab Folder get Selection if new Item old Item return if current null current set Focus  MouseListener mouseListener MouseAdapter mouseDown MouseEvent globalPos toDisplay CTabItem newItem tabFolder getItem tabFolder getControl toControl globalPos newItem CTabItem oldItem tabFolder getSelection newItem oldItem setFocus
public void mouse Double Click Mouse Event e if get Site get State I Stack Presentation Site STATE MAXIMIZED get Site set State I Stack Presentation Site STATE RESTORED else get Site set State I Stack Presentation Site STATE MAXIMIZED  mouseDoubleClick MouseEvent getSite getState IStackPresentationSite STATE_MAXIMIZED getSite setState IStackPresentationSite STATE_RESTORED getSite setState IStackPresentationSite STATE_MAXIMIZED
public void handle Event Event event Point pos new Point event x event y show System Menu pos  handleEvent showSystemMenu
private Listener selection Listener new Listener public void handle Event Event e if ignore Selection Changes return I Presentable Part item get Part For Tab C Tab Item e item if item null set Selection C Tab Item e item  selectionListener handleEvent ignoreSelectionChanges IPresentablePart getPartForTab CTabItem setSelection CTabItem
private I Property Listener child Property Change Listener new I Property Listener public void property Changed Object source int property if is Disposed return if source instanceof I Presentable Part I Presentable Part part I Presentable Part source child Property Changed part property  IPropertyListener childPropertyChangeListener IPropertyListener propertyChanged isDisposed IPresentablePart IPresentablePart IPresentablePart childPropertyChanged
private Dispose Listener tab Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if e widget instanceof C Tab Item C Tab Item item C Tab Item e widget I Presentable Part part get Part For Tab item part remove Property Listener child Property Change Listener  DisposeListener tabDisposeListener DisposeListener widgetDisposed DisposeEvent CTabItem CTabItem CTabItem IPresentablePart getPartForTab removePropertyListener childPropertyChangeListener
private Dispose Listener folder Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e Default Part Presentation this widget Disposed  DisposeListener folderDisposeListener DisposeListener widgetDisposed DisposeEvent DefaultPartPresentation widgetDisposed
private Shell Listener shell Listener new Shell Adapter public void shell Activated Shell Event e shell Active true update Gradient  ShellListener shellListener ShellAdapter shellActivated ShellEvent shellActive updateGradient
public void shell Deactivated Shell Event e shell Active false update Gradient  shellDeactivated ShellEvent shellActive updateGradient
public void property Change Property Change Event event if is Disposed return String property event get Property if property equals I Theme Manager CHANGE CURRENT THEME update Gradient set Title Attributes else if property equals I Workbench Theme Constants INACTIVE TAB BG START property equals I Workbench Theme Constants INACTIVE TAB BG END property equals I Workbench Theme Constants INACTIVE TAB TEXT COLOR property equals I Workbench Theme Constants ACTIVE TAB TEXT COLOR property equals I Workbench Theme Constants ACTIVE TAB BG START property equals I Workbench Theme Constants ACTIVE TAB BG END property equals I Workbench Theme Constants TAB TEXT FONT update Gradient else if property equals I Workbench Theme Constants VIEW MESSAGE TEXT FONT set Title Attributes  propertyChange PropertyChangeEvent isDisposed getProperty IThemeManager CHANGE_CURRENT_THEME updateGradient setTitleAttributes IWorkbenchThemeConstants INACTIVE_TAB_BG_START IWorkbenchThemeConstants INACTIVE_TAB_BG_END IWorkbenchThemeConstants INACTIVE_TAB_TEXT_COLOR IWorkbenchThemeConstants ACTIVE_TAB_TEXT_COLOR IWorkbenchThemeConstants ACTIVE_TAB_BG_START IWorkbenchThemeConstants ACTIVE_TAB_BG_END IWorkbenchThemeConstants TAB_TEXT_FONT updateGradient IWorkbenchThemeConstants VIEW_MESSAGE_TEXT_FONT setTitleAttributes
pull Down Button set Tool Tip Text Workbench Messages get String Menu NON NLS 1 pull Down Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e show Pane Menu  pullDownButton setToolTipText WorkbenchMessages getString pullDownButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent showPaneMenu
drag Listener new Listener public void handle Event Event event Point local Pos new Point event x event y Ignore drags unless they are on the title area if tab Folder get Control get Style SWT TOP 0 if local Pos y tab Folder get Tab Height return else if local Pos y tab Folder get Control get Bounds height tab Folder get Tab Height return C Tab Item tab Under Pointer tab Folder get Item local Pos if tab Under Pointer null get Site drag Start tab Folder get Control to Display local Pos false return I Presentable Part part get Part For Tab tab Under Pointer if get Site is Part Moveable part drag Start tab Folder index Of tab Under Pointer get Site drag Start part tab Folder get Control to Display local Pos false drag Start 1  dragListener handleEvent localPos tabFolder getControl getStyle localPos tabFolder getTabHeight localPos tabFolder getControl getBounds tabFolder getTabHeight CTabItem tabUnderPointer tabFolder getItem localPos tabUnderPointer getSite dragStart tabFolder getControl toDisplay localPos IPresentablePart getPartForTab tabUnderPointer getSite isPartMoveable dragStart tabFolder indexOf tabUnderPointer getSite dragStart tabFolder getControl toDisplay localPos dragStart
public Default Part Presentation Pane Folder control I Stack Presentation Site stack Site super stack Site shell Active control get Control get Shell equals control get Control get Display get Active Shell tab Folder control Add listener to check for premature disposal tab Folder get Control add Dispose Listener folder Dispose Listener tab Folder set Minimize Visible stack Site supports State I Stack Presentation Site STATE MINIMIZED tab Folder set Maximize Visible stack Site supports State I Stack Presentation Site STATE MAXIMIZED tab Folder get Control get Shell add Shell Listener shell Listener title Label new Label tab Folder get Control SWT NONE title Label set Visible false title Label move Above null PlatformUI get Workbench get Theme Manager add Property Change Listener theme Listener view Tool Bar new Tool Bar control get Control SWT FLAT view Tool Bar move Above null Tool Item pull Down Button new Tool Item view Tool Bar SWT PUSH Image img Workbench Images get Image I Workbench Graphic Constants IMG LCL VIEW MENU Image hover Image Workbench Images get Image I Workbench Graphic Constants IMG LCL VIEW MENU HOVER pull Down Button set Disabled Image hover Image TODO comment this out PR 1GE56QT Avoid creation of unnecessary image pull Down Button set Image hover Image pull Down Button set Tool Tip Text Workbench Messages get String Menu NON NLS 1 pull Down Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e show Pane Menu listener to switch between visible tab Items tab Folder get Control add Listener SWT Selection selection Listener listen for mouse down on tab to set focus tab Folder get Control add Mouse Listener mouse Listener tab Folder get Control add Listener SWT Menu Detect menu Listener tab Folder add Button Listener button Listener drag Listener new Listener public void handle Event Event event Point local Pos new Point event x event y Ignore drags unless they are on the title area if tab Folder get Control get Style SWT TOP 0 if local Pos y tab Folder get Tab Height return else if local Pos y tab Folder get Control get Bounds height tab Folder get Tab Height return C Tab Item tab Under Pointer tab Folder get Item local Pos if tab Under Pointer null get Site drag Start tab Folder get Control to Display local Pos false return I Presentable Part part get Part For Tab tab Under Pointer if get Site is Part Moveable part drag Start tab Folder index Of tab Under Pointer get Site drag Start part tab Folder get Control to Display local Pos false drag Start 1 Presentation Util add Drag Listener tab Folder get Control drag Listener title Label add Mouse Listener mouse Listener Initialize system menu system Menu Manager add new Group Marker misc NON NLS 1 system Menu Manager add new Group Marker restore NON NLS 1 system Menu Manager add new Updating Action Contribution Item new System Menu Restore get Site system Menu Manager add new System Menu Move get Site get Pane Name system Menu Manager add new Group Marker size NON NLS 1 system Menu Manager add new Group Marker state NON NLS 1 system Menu Manager add new Updating Action Contribution Item new System Menu Minimize get Site system Menu Manager add new Updating Action Contribution Item new System Menu Maximize get Site system Menu Manager add new Separator close NON NLS 1 system Menu Manager add new Updating Action Contribution Item new System Menu Close get Site get Site add System Actions system Menu Manager End of system menu initialization  DefaultPartPresentation PaneFolder IStackPresentationSite stackSite stackSite shellActive getControl getShell getControl getDisplay getActiveShell tabFolder tabFolder getControl addDisposeListener folderDisposeListener tabFolder setMinimizeVisible stackSite supportsState IStackPresentationSite STATE_MINIMIZED tabFolder setMaximizeVisible stackSite supportsState IStackPresentationSite STATE_MAXIMIZED tabFolder getControl getShell addShellListener shellListener titleLabel tabFolder getControl titleLabel setVisible titleLabel moveAbove getWorkbench getThemeManager addPropertyChangeListener themeListener viewToolBar ToolBar getControl viewToolBar moveAbove ToolItem pullDownButton ToolItem viewToolBar WorkbenchImages getImage IWorkbenchGraphicConstants IMG_LCL_VIEW_MENU hoverImage WorkbenchImages getImage IWorkbenchGraphicConstants IMG_LCL_VIEW_MENU_HOVER pullDownButton setDisabledImage hoverImage pullDownButton setImage hoverImage pullDownButton setToolTipText WorkbenchMessages getString pullDownButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent showPaneMenu tabItems tabFolder getControl addListener selectionListener tabFolder getControl addMouseListener mouseListener tabFolder getControl addListener MenuDetect menuListener tabFolder addButtonListener buttonListener dragListener handleEvent localPos tabFolder getControl getStyle localPos tabFolder getTabHeight localPos tabFolder getControl getBounds tabFolder getTabHeight CTabItem tabUnderPointer tabFolder getItem localPos tabUnderPointer getSite dragStart tabFolder getControl toDisplay localPos IPresentablePart getPartForTab tabUnderPointer getSite isPartMoveable dragStart tabFolder indexOf tabUnderPointer getSite dragStart tabFolder getControl toDisplay localPos dragStart PresentationUtil addDragListener tabFolder getControl dragListener titleLabel addMouseListener mouseListener systemMenuManager GroupMarker systemMenuManager GroupMarker systemMenuManager UpdatingActionContributionItem SystemMenuRestore getSite systemMenuManager SystemMenuMove getSite getPaneName systemMenuManager GroupMarker systemMenuManager GroupMarker systemMenuManager UpdatingActionContributionItem SystemMenuMinimize getSite systemMenuManager UpdatingActionContributionItem SystemMenuMaximize getSite systemMenuManager systemMenuManager UpdatingActionContributionItem SystemMenuClose getSite getSite addSystemActions systemMenuManager
Restores a presentation from a previously stored state param serializer not null param saved State not null public void restore State I Presentation Serializer serializer I Memento saved State I Memento parts saved State get Children I Workbench Constants TAG PART for int idx 0 idx parts length idx String id parts idx get String I Workbench Constants TAG ID if id null I Presentable Part part serializer get Part id if part null add Part part tab Folder get Item Count  savedState restoreState IPresentationSerializer IMemento savedState IMemento savedState getChildren IWorkbenchConstants TAG_PART getString IWorkbenchConstants TAG_ID IPresentablePart getPart addPart tabFolder getItemCount
public void save State I Presentation Serializer context I Memento memento super save State context memento List parts get Presentable Parts Iterator iter parts iterator while iter has Next I Presentable Part next I Presentable Part iter next I Memento child Mem memento create Child I Workbench Constants TAG PART child Mem put String I Workbench Constants TAG ID context get Id next  saveState IPresentationSerializer IMemento saveState getPresentableParts hasNext IPresentablePart IPresentablePart IMemento childMem createChild IWorkbenchConstants TAG_PART childMem putString IWorkbenchConstants TAG_ID getId
This method performs initialization that must be done after the object is created Subclasses must call this method exactly once on the last line of any public constructor public void init update Gradient set Title Attributes  updateGradient setTitleAttributes
Sets the font on the title of this stack protected void set Title Attributes Assert is True is Disposed I Theme theme PlatformUI get Workbench get Theme Manager get Current Theme Font message Font theme get Font Registry get I Workbench Theme Constants VIEW MESSAGE TEXT FONT if message Font equals title Label get Font title Label set Font message Font set Control Size  setTitleAttributes isTrue isDisposed ITheme getWorkbench getThemeManager getCurrentTheme messageFont getFontRegistry IWorkbenchThemeConstants VIEW_MESSAGE_TEXT_FONT messageFont titleLabel getFont titleLabel setFont messageFont setControlSize
Sets the colors of the tab to the inactive tab colors protected final void set Inactive Tab Colors Assert is True is Disposed I Theme theme PlatformUI get Workbench get Theme Manager get Current Theme Color Registry color Registry theme get Color Registry draw Gradient color Registry get I Workbench Theme Constants INACTIVE TAB TEXT COLOR new Color color Registry get I Workbench Theme Constants INACTIVE TAB BG START color Registry get I Workbench Theme Constants INACTIVE TAB BG END new int theme get Int I Workbench Theme Constants INACTIVE TAB PERCENT theme get Boolean I Workbench Theme Constants INACTIVE TAB VERTICAL  setInactiveTabColors isTrue isDisposed ITheme getWorkbench getThemeManager getCurrentTheme ColorRegistry colorRegistry getColorRegistry drawGradient colorRegistry IWorkbenchThemeConstants INACTIVE_TAB_TEXT_COLOR colorRegistry IWorkbenchThemeConstants INACTIVE_TAB_BG_START colorRegistry IWorkbenchThemeConstants INACTIVE_TAB_BG_END getInt IWorkbenchThemeConstants INACTIVE_TAB_PERCENT getBoolean IWorkbenchThemeConstants INACTIVE_TAB_VERTICAL
Sets the colors of the tab to the active tab colors taking into account shell focus protected final void set Active Tab Colors Assert is True is Disposed I Theme theme PlatformUI get Workbench get Theme Manager get Current Theme Color Registry color Registry theme get Color Registry if is Shell Active draw Gradient color Registry get I Workbench Theme Constants ACTIVE TAB TEXT COLOR new Color color Registry get I Workbench Theme Constants ACTIVE TAB BG START color Registry get I Workbench Theme Constants ACTIVE TAB BG END new int theme get Int I Workbench Theme Constants ACTIVE TAB PERCENT theme get Boolean I Workbench Theme Constants ACTIVE TAB VERTICAL else draw Gradient color Registry get I Workbench Theme Constants ACTIVE NOFOCUS TAB TEXT COLOR new Color color Registry get I Workbench Theme Constants ACTIVE NOFOCUS TAB BG START color Registry get I Workbench Theme Constants ACTIVE NOFOCUS TAB BG END new int theme get Int I Workbench Theme Constants ACTIVE NOFOCUS TAB PERCENT theme get Boolean I Workbench Theme Constants ACTIVE NOFOCUS TAB VERTICAL  setActiveTabColors isTrue isDisposed ITheme getWorkbench getThemeManager getCurrentTheme ColorRegistry colorRegistry getColorRegistry isShellActive drawGradient colorRegistry IWorkbenchThemeConstants ACTIVE_TAB_TEXT_COLOR colorRegistry IWorkbenchThemeConstants ACTIVE_TAB_BG_START colorRegistry IWorkbenchThemeConstants ACTIVE_TAB_BG_END getInt IWorkbenchThemeConstants ACTIVE_TAB_PERCENT getBoolean IWorkbenchThemeConstants ACTIVE_TAB_VERTICAL drawGradient colorRegistry IWorkbenchThemeConstants ACTIVE_NOFOCUS_TAB_TEXT_COLOR colorRegistry IWorkbenchThemeConstants ACTIVE_NOFOCUS_TAB_BG_START colorRegistry IWorkbenchThemeConstants ACTIVE_NOFOCUS_TAB_BG_END getInt IWorkbenchThemeConstants ACTIVE_NOFOCUS_TAB_PERCENT getBoolean IWorkbenchThemeConstants ACTIVE_NOFOCUS_TAB_VERTICAL
Update the folder colors and fonts based on the current active state Subclasses should override ensuring that they call super after all color font changes protected void update Gradient Assert is True is Disposed do nothing  updateGradient isTrue isDisposed
return the required tab height for this folder protected int compute Tab Height Assert is True is Disposed GC gc new GC tab Folder get Control Compute the tab height int tab Height Math max view Tool Bar compute Size SWT DEFAULT SWT DEFAULT y gc get Font Metrics get Height gc dispose return tab Height  computeTabHeight isTrue isDisposed tabFolder getControl tabHeight viewToolBar computeSize getFontMetrics getHeight tabHeight
protected String get Pane Name return Workbench Messages get String Default Part Presentation Pane Name NON NLS 1  getPaneName WorkbenchMessages getString DefaultPartPresentation PaneName
Displays the view menu as a popup public void show Pane Menu Assert is True is Disposed I Part Menu menu get Part Menu if menu null Rectangle bounds Drag Util get Display Bounds view Tool Bar menu show Menu new Point bounds x bounds y bounds height  showPaneMenu isTrue isDisposed IPartMenu getPartMenu DragUtil getDisplayBounds viewToolBar showMenu
Returns the currently selected part or code null code return the currently selected part or code null code protected I Presentable Part get Current Assert is True is Disposed return current  IPresentablePart getCurrent isTrue isDisposed
Returns the index of the tab for the given part or returns tab Folder get Item Count if there is no such tab param part part being searched for return the index of the tab for the given part or the number of tabs if there is no such tab protected final int index Of I Presentable Part part Assert is True is Disposed if part null return tab Folder get Item Count C Tab Item items tab Folder get Items for int idx 0 idx items length idx I Presentable Part tab Part get Part For Tab items idx if part tab Part return idx return items length  tabFolder getItemCount indexOf IPresentablePart isTrue isDisposed tabFolder getItemCount CTabItem tabFolder getItems IPresentablePart tabPart getPartForTab tabPart
Returns the tab for the given part or null if there is no such tab param part the part being searched for return the tab for the given part or null if there is no such tab protected final C Tab Item get Tab I Presentable Part part Assert is True is Disposed C Tab Item items tab Folder get Items int idx index Of part if idx items length return items idx return null  CTabItem getTab IPresentablePart isTrue isDisposed CTabItem tabFolder getItems indexOf
param part param property protected void child Property Changed I Presentable Part part int property C Tab Item tab get Tab part If we re in the process of removing this part it s possible that we might still receive some events for it If everything is working perfectly this should never happen however we check for this case just to be safe if tab null return init Tab tab part switch property case I Presentable Part PROP BUSY break case I Presentable Part PROP HIGHLIGHT IF BACK Font Registry registry PlatformUI get Workbench get Theme Manager get Current Theme get Font Registry if get Current part Set bold if it does currently have focus tab set Font registry get Bold I Workbench Theme Constants TAB TEXT FONT break case I Presentable Part PROP CONTENT DESCRIPTION case I Presentable Part PROP TOOLBAR case I Presentable Part PROP PANE MENU case I Presentable Part PROP TITLE if get Current part set Control Size break  childPropertyChanged IPresentablePart CTabItem getTab initTab IPresentablePart PROP_BUSY IPresentablePart PROP_HIGHLIGHT_IF_BACK FontRegistry getWorkbench getThemeManager getCurrentTheme getFontRegistry getCurrent setFont getBold IWorkbenchThemeConstants TAB_TEXT_FONT IPresentablePart PROP_CONTENT_DESCRIPTION IPresentablePart PROP_TOOLBAR IPresentablePart PROP_PANE_MENU IPresentablePart PROP_TITLE getCurrent setControlSize
protected final I Presentable Part get Part For Tab C Tab Item item Assert is True is Disposed I Presentable Part part I Presentable Part item get Data TAB DATA return part  IPresentablePart getPartForTab CTabItem isTrue isDisposed IPresentablePart IPresentablePart getData TAB_DATA
Returns the underlying tab folder for this presentation return protected Pane Folder get Tab Folder Assert is True is Disposed return tab Folder  PaneFolder getTabFolder isTrue isDisposed tabFolder
Returns true iff the underlying tab folder has been disposed return public boolean is Disposed return tab Folder null tab Folder is Disposed  isDisposed tabFolder tabFolder isDisposed
Sets the gradient for the selected tab param fg Color param bg Colors param percentages param vertical public void draw Gradient Color fg Color Color bg Colors int percentages boolean vertical Assert is True is Disposed tab Folder set Selection Foreground fg Color tab Folder set Selection Background bg Colors percentages vertical  fgColor bgColors drawGradient fgColor bgColors isTrue isDisposed tabFolder setSelectionForeground fgColor tabFolder setSelectionBackground bgColors
public boolean is Active Assert is True is Disposed return active State Stack Presentation AS ACTIVE FOCUS  isActive isTrue isDisposed activeState StackPresentation AS_ACTIVE_FOCUS
public int get Active Assert is True is Disposed return active State  getActive isTrue isDisposed activeState
protected String get Current Title Assert is True is Disposed if current null return NON NLS 1 String result current get Title Status return result  getCurrentTitle isTrue isDisposed getTitleStatus
protected void layout boolean changed Assert is True is Disposed if changed String current Title get Current Title if current Title equals Util ZERO LENGTH STRING tab Folder set Top Left title Label title Label set Text current Title title Label set Visible true else tab Folder set Top Left null title Label set Visible false Control current Toolbar get Current Toolbar tab Folder set Top Center current Toolbar I Part Menu part Menu get Part Menu if part Menu null tab Folder set Top Right view Tool Bar view Tool Bar set Visible true else tab Folder set Top Right null view Tool Bar set Visible false tab Folder layout changed if current null Rectangle client Area tab Folder get Client Area Rectangle bounds tab Folder get Control get Bounds client Area x bounds x client Area y bounds y current set Bounds client Area  isTrue isDisposed currentTitle getCurrentTitle currentTitle ZERO_LENGTH_STRING tabFolder setTopLeft titleLabel titleLabel setText currentTitle titleLabel setVisible tabFolder setTopLeft titleLabel setVisible currentToolbar getCurrentToolbar tabFolder setTopCenter currentToolbar IPartMenu partMenu getPartMenu partMenu tabFolder setTopRight viewToolBar viewToolBar setVisible tabFolder setTopRight viewToolBar setVisible tabFolder clientArea tabFolder getClientArea tabFolder getControl getBounds clientArea clientArea setBounds clientArea
Set the size of a page in the folder protected void set Control Size Assert is True is Disposed layout true  setControlSize isTrue isDisposed
Returns the I Part Menu for the currently selected part or null if the current part does not have a menu return the I Part Menu for the currently selected part or null if none protected I Part Menu get Part Menu Assert is True is Disposed I Presentable Part part get Current Part if part null return null return part get Menu  IPartMenu IPartMenu IPartMenu getPartMenu isTrue isDisposed IPresentablePart getCurrentPart getMenu
public final void dispose if is Disposed return Dispose the tab folder This will cause widget Disposed below to be called which does the real cleanup This pattern ensures that the disposal code will run even if the widget was prematurely disposed due to its parent being destroyed tab Folder get Control dispose  isDisposed widgetDisposed tabFolder getControl
Called when the tab Folder is disposed This does the real cleanup protected void widget Disposed tab Folder get Control get Shell remove Shell Listener shell Listener Presentation Util remove Drag Listener tab Folder get Control drag Listener system Menu Manager dispose system Menu Manager remove All tab Folder get Control remove Dispose Listener folder Dispose Listener tab Folder null title Label dispose title Label null view Tool Bar dispose PlatformUI get Workbench get Theme Manager remove Property Change Listener theme Listener activation List null  tabFolder widgetDisposed tabFolder getControl getShell removeShellListener shellListener PresentationUtil removeDragListener tabFolder getControl dragListener systemMenuManager systemMenuManager removeAll tabFolder getControl removeDisposeListener folderDisposeListener tabFolder titleLabel titleLabel viewToolBar getWorkbench getThemeManager removePropertyChangeListener themeListener activationList
public void set Active int new State Assert is True is Disposed active State new State  setActive newState isTrue isDisposed activeState newState
private C Tab Item create Part Tab I Presentable Part part int tab Index Assert is True is Disposed tab Index Math min tab Index tab Folder get Item Count C Tab Item tab Item int style SWT NONE if get Site is Closeable part style SWT CLOSE ignore Selection Changes true try tab Item tab Folder create Item style tab Index finally ignore Selection Changes false tab Item set Data TAB DATA part part add Property Listener child Property Change Listener tab Item add Dispose Listener tab Dispose Listener init Tab tab Item part return tab Item  CTabItem createPartTab IPresentablePart tabIndex isTrue isDisposed tabIndex tabIndex tabFolder getItemCount CTabItem tabItem getSite isCloseable ignoreSelectionChanges tabItem tabFolder createItem tabIndex ignoreSelectionChanges tabItem setData TAB_DATA addPropertyListener childPropertyChangeListener tabItem addDisposeListener tabDisposeListener initTab tabItem tabItem
Initializes a tab for the given part Sets the text icon tool tip etc This will also be called whenever a relevant property changes in the part to reflect those changes in the tab Subclasses may override to change the appearance of tabs for a particular part param tab Item tab for the part param part the part being displayed protected void init Tab C Tab Item tab Item I Presentable Part part Assert is True is Disposed tab Item set Text part get Name tab Item set Image part get Title Image String tool Tip Text part get Title Tool Tip if tool Tip Text equals Util ZERO LENGTH STRING tab Item set Tool Tip Text tool Tip Text Font Registry registry PlatformUI get Workbench get Theme Manager get Current Theme get Font Registry if part is Busy tab Item set Font registry get Italic I Workbench Theme Constants TAB TEXT FONT else tab Item set Font null  tabItem initTab CTabItem tabItem IPresentablePart isTrue isDisposed tabItem setText getName tabItem setImage getTitleImage toolTipText getTitleToolTip toolTipText ZERO_LENGTH_STRING tabItem setToolTipText toolTipText FontRegistry getWorkbench getThemeManager getCurrentTheme getFontRegistry isBusy tabItem setFont getItalic IWorkbenchThemeConstants TAB_TEXT_FONT tabItem setFont
public void add Part I Presentable Part new Part Object cookie int idx List lru List null if cookie instanceof Integer idx Integer cookie int Value add Part new Part idx return else if cookie null cookie instanceof List When adding a part the LRU list and index are being passed from select Part In select Part when the item is invisible on the left hand side of the tab folder and the user selects it from the chevron save the LRU list of visible items get the position at which we should re insert the item then remove the item and call add Part with this information All this to support resize of the C Tab Folder pushing tabs off the left and retaining the ability for them to come back from the left during resize when possible List list List cookie lru List List list get 0 idx Integer list get 1 int Value else just calling add Part and the item is inserted in the default location idx get Item Insertion Index lru List get Visible ItemsLRU List add Part new Part idx after adding need to check if the part is showing as there are cases where the part can be added at the given index and not appear for example when the list becomes more constrained due to the addition of a chevron if tab Folder get Item Count 1 get the tab for the item dont rely on the ideal insertion index as this may be altered C Tab Item my Item get Tab new Part if my Item null return make sure the part is showing while my Item is Showing I Presentable Part lru Part null C Tab Item lru Item null get the least recently used item that is showing and remove it for int i 0 i lru List size i lru Item C Tab Item lru List get i if my Item equals lru Item lru Item C Tab Item lru List remove i break if my Item equals lru Item lru Item null break lru Part get Part For Tab lru Item do not update the activation order of the part that will be removed and added after the new item try activation List Change false remove Part lru Part decrement the index of the item being added as the removal is always of an item with a lower index then the item being added on the right add Part lru Part idx 1 finally activation List Change true  addPart IPresentablePart newPart lruList intValue addPart newPart selectPart selectPart addPart CTabFolder lruList intValue addPart getItemInsertionIndex lruList getVisibleItemsLRUList addPart newPart tabFolder getItemCount CTabItem myItem getTab newPart myItem myItem isShowing IPresentablePart lruPart CTabItem lruItem lruList lruItem CTabItem lruList myItem lruItem lruItem CTabItem lruList myItem lruItem lruItem lruPart getPartForTab lruItem activationListChange removePart lruPart addPart lruPart activationListChange
return a list containing the C Tab Item items that are visible in the C Tab Folder private List get Visible ItemsLRU List List lru List new Array List 10 save current visible items in the least recently used order Sort the items whose tabs are showing based on activation order for each item in the C Tab Folder cross index that in the activation list to come up with a LRU ordered list of C Tab Items NOTE the activation list is not always a complete list of all items for example on startup it can be empty for int i 0 i tab Folder get Item Count i C Tab Item item tab Folder get Item i only care about items that are showing if item is Showing int lru List Size lru List size if lru List Size 0 lru List add item else int j 0 any item that is NOT in the activation list returns 1 as an index hence the item will be inserted at the begining of the LRU list make it the least recently used for j 0 j lru List Size j if activation List index Of get Part For Tab item activation List index Of get Part For Tab C Tab Item lru List get j break lru List add j item return lru List  CTabItem CTabFolder getVisibleItemsLRUList lruList ArrayList CTabFolder CTabItems tabFolder getItemCount CTabItem tabFolder getItem isShowing lruListSize lruList lruListSize lruList lruListSize activationList indexOf getPartForTab activationList indexOf getPartForTab CTabItem lruList lruList lruList
return the index at which a new item should be inserted private int get Item Insertion Index Select a location for newly inserted parts Insert after the last showing item on the right int idx tab Folder get Item Count add to the end if the bounds are 0 the is Showing get Bounds logic below does not work when opening an initial perspective because no items are showing the folders bounds are set to 0 Items on GTK wont have a width of 0 so use 1 if tab Folder get Control is Visible tab Folder get Control get Bounds width 1 return idx for int i 0 i idx i C Tab Item item tab Folder get Item i make sure the item is not showing and it is on the right if item is Showing item get Bounds x 0 return i return idx  getItemInsertionIndex tabFolder getItemCount isShowing getBounds tabFolder getControl isVisible tabFolder getControl getBounds CTabItem tabFolder getItem isShowing getBounds
Adds the given presentable part to this presentation at the given index Does nothing if a tab already exists for the given part param new Part param index public void add Part I Presentable Part new Part int index If we already have a tab for this part do nothing if get Tab new Part null return create Part Tab new Part index set Control Size in some cases we don t want add Part to affect the activation list such as when we are moving an items location because it was the least recently used if activation List Change activation List add new Part  newPart addPart IPresentablePart newPart getTab newPart createPartTab newPart setControlSize addPart activationListChange activationList newPart
public void remove Part I Presentable Part old Part if current old Part current null Remove any references to the old widget tab Folder set Top Left null tab Folder set Top Center null tab Folder set Top Right null C Tab Item item get Tab old Part if item null return old Part set Visible false in some cases we don t want remove Part to affect the activation list such as when we are moving an items location because it was the least recently used if activation List Change activation List remove old Part ignore Selection Changes true try item dispose finally ignore Selection Changes false  removePart IPresentablePart oldPart oldPart tabFolder setTopLeft tabFolder setTopCenter tabFolder setTopRight CTabItem getTab oldPart oldPart setVisible removePart activationListChange activationList oldPart ignoreSelectionChanges ignoreSelectionChanges
public void select Part I Presentable Part to Select Assert is True is Disposed if to Select current return I Presentable Part old Part current current to Select if current null C Tab Item item get Tab to Select if item null If the item is not currently visible move it to last visible position on the right When loading the workbench all tabs are invisible we don t want to change tab ordering in this case if is Visible Tabs if item is Showing tab Folder get Item Count 1 try activation List Change false Save a list of the visible items in LRU order List lru List get Visible ItemsLRU List int idx get Item Insertion Index If we remove an item from the left decrement the index by 1 if item get Bounds x 0 idx remove Part to Select pass the LRU list and insertion index to add Part as it was before the remove happened List cookie new Array List 2 cookie add lru List cookie add new Integer idx add Part to Select cookie finally activation List Change true current to Select tab Folder set Selection index Of current current set Visible true if the act of setting the part visible has caused it to be removed or the folder to be disposed the case when restoring editors with non existant input then don t modify the state of this presentation any further leave the last tab visible see Bug 63721 if is Disposed return if get Tab to Select null select Part old Part return set Control Size update the newly selected item in the activation order if activation List Change activation List remove to Select activation List add to Select if old Part null old Part set Visible false  selectPart IPresentablePart toSelect isTrue isDisposed toSelect IPresentablePart oldPart toSelect CTabItem getTab toSelect isVisibleTabs isShowing tabFolder getItemCount activationListChange lruList getVisibleItemsLRUList getItemInsertionIndex getBounds removePart toSelect addPart ArrayList lruList addPart toSelect activationListChange toSelect tabFolder setSelection indexOf setVisible isDisposed getTab toSelect selectPart oldPart setControlSize activationListChange activationList toSelect activationList toSelect oldPart oldPart setVisible
return code true code if at least one tab is visible code false code otherwise private boolean is Visible Tabs boolean result false for int i 0 i tab Folder get Item Count i C Tab Item item tab Folder get Item i if item is Showing result true break return result  isVisibleTabs tabFolder getItemCount CTabItem tabFolder getItem isShowing
public I Presentable Part get Current Part Assert is True is Disposed return current  IPresentablePart getCurrentPart isTrue isDisposed
public void set Bounds Rectangle bounds Assert is True is Disposed tab Folder about To Resize tab Folder get Control set Bounds bounds layout false  setBounds isTrue isDisposed tabFolder aboutToResize tabFolder getControl setBounds
see org eclipse ui internal skins Presentation compute Minimum Size public Point compute Minimum Size return tab Folder compute Minimum Size  computeMinimumSize computeMinimumSize tabFolder computeMinimumSize
public void set Visible boolean is Visible Assert is True is Disposed if current null current set Visible is Visible tab Folder get Control set Visible is Visible  setVisible isVisible isTrue isDisposed setVisible isVisible tabFolder getControl setVisible isVisible
public void set State int state Assert is True is Disposed tab Folder set State state  setState isTrue isDisposed tabFolder setState
public I Menu Manager get System Menu Manager Assert is True is Disposed return system Menu Manager  IMenuManager getSystemMenuManager isTrue isDisposed systemMenuManager
param part param point protected void show System Menu Point point Assert is True is Disposed Menu a Menu system Menu Manager create Context Menu tab Folder get Control get Parent system Menu Manager update true a Menu set Location point x point y a Menu set Visible true  showSystemMenu isTrue isDisposed aMenu systemMenuManager createContextMenu tabFolder getControl getParent systemMenuManager aMenu setLocation aMenu setVisible
public Control get Control Assert is True is Disposed return tab Folder get Control  getControl isTrue isDisposed tabFolder getControl
public Stack Drop Result drag Over Control current Control Point location Assert is True is Disposed Determine which tab we re currently dragging over Point local Pos tab Folder get Control to Control location C Tab Item tab Under Pointer tab Folder get Item local Pos This drop target only deals with tabs if we re not dragging over a tab exit if tab Under Pointer null Rectangle title Area tab Folder get Title Area If we re dragging over the title area treat this as a drop in the last tab position if title Area contains local Pos int drag Over Index tab Folder get Item Count C Tab Item last Tab tab Folder get Item drag Over Index 1 Can t drag to end unless you can see the end if last Tab is Showing return null if drag Start 0 drag Over Index return new Stack Drop Result Geometry to Display tab Folder get Control last Tab get Bounds new Integer drag Over Index Make the drag over rectangle look like a tab at the end of the tab region We don t actually know how wide the tab will be when it s dropped so just make it 3 times wider than it is tall Rectangle drop Rectangle Geometry to Display tab Folder get Control title Area drop Rectangle width 3 drop Rectangle height return new Stack Drop Result drop Rectangle new Integer drag Over Index else return null if tab Under Pointer is Showing return null return new Stack Drop Result Geometry to Display tab Folder get Control tab Under Pointer get Bounds new Integer tab Folder index Of tab Under Pointer  StackDropResult dragOver currentControl isTrue isDisposed localPos tabFolder getControl toControl CTabItem tabUnderPointer tabFolder getItem localPos tabUnderPointer titleArea tabFolder getTitleArea titleArea localPos dragOverIndex tabFolder getItemCount CTabItem lastTab tabFolder getItem dragOverIndex lastTab isShowing dragStart dragOverIndex StackDropResult toDisplay tabFolder getControl lastTab getBounds dragOverIndex dropRectangle toDisplay tabFolder getControl titleArea dropRectangle dropRectangle StackDropResult dropRectangle dragOverIndex tabUnderPointer isShowing StackDropResult toDisplay tabFolder getControl tabUnderPointer getBounds tabFolder indexOf tabUnderPointer
Returns the toolbar control for the currently selected part or null if none not all parts have a toolbar return the current toolbar or null if none protected Control get Current Toolbar Assert is True is Disposed I Presentable Part part get Current Part if part null return null return part get Tool Bar  getCurrentToolbar isTrue isDisposed IPresentablePart getCurrentPart getToolBar
public void show System Menu Assert is True is Disposed I Presentable Part part get Current Part if part null Rectangle bounds Drag Util get Display Bounds tab Folder get Control int idx tab Folder get Selection Index if idx 1 C Tab Item item tab Folder get Item idx Rectangle item Bounds item get Bounds bounds x item Bounds x bounds y item Bounds y Point location new Point bounds x bounds y tab Folder get Tab Height show System Menu location  showSystemMenu isTrue isDisposed IPresentablePart getCurrentPart DragUtil getDisplayBounds tabFolder getControl tabFolder getSelectionIndex CTabItem tabFolder getItem itemBounds getBounds itemBounds itemBounds tabFolder getTabHeight showSystemMenu
public Control get Tab List I Presentable Part part Assert is True is Disposed Array List list new Array List if tab Folder get Tab Position SWT BOTTOM if part get Tool Bar null list add part get Tool Bar if part get Control null list add part get Control if get Tab Folder null list add get Tab Folder get Control else if get Tab Folder null list add get Tab Folder get Control if part get Tool Bar null list add part get Tool Bar if part get Control null list add part get Control return Control list to Array new Control list size  getTabList IPresentablePart isTrue isDisposed ArrayList ArrayList tabFolder getTabPosition getToolBar getToolBar getControl getControl getTabFolder getTabFolder getControl getTabFolder getTabFolder getControl getToolBar getToolBar getControl getControl toArray
protected void show List Shell parent Shell int x int y Assert is True is Disposed final Pane Folder tab Folder get Tab Folder int shell Style SWT RESIZE SWT ON TOP SWT NO TRIM int table Style SWT V SCROLL SWT H SCROLL final Basic Stack List editor List new Basic Stack List tab Folder get Control get Shell shell Style table Style editor List set Input this Point size editor List compute Size Hint Monitor mon get Tab Folder get Control get Monitor Rectangle bounds mon get Client Area if x size x bounds x bounds width x bounds x bounds width size x if y size y bounds y bounds height y bounds y bounds height size y editor List set Location new Point x y editor List set Visible true editor List set Focus editor List get Table Viewer get Table get Shell add Listener SWT Deactivate new Listener public void handle Event Event event editor List set Visible false  showList parentShell isTrue isDisposed PaneFolder tabFolder getTabFolder shellStyle ON_TOP NO_TRIM tableStyle V_SCROLL H_SCROLL BasicStackList editorList BasicStackList tabFolder getControl getShell shellStyle tableStyle editorList setInput editorList computeSizeHint getTabFolder getControl getMonitor getClientArea editorList setLocation editorList setVisible editorList setFocus editorList getTableViewer getTable getShell addListener handleEvent editorList setVisible
public void show Part List Assert is True is Disposed Pane Folder tab Folder get Tab Folder Shell shell tab Folder get Control get Shell get the last visible item int num Items tab Folder get Item Count C Tab Item item null temp Item null for int i 0 i num Items i temp Item tab Folder get Item i if temp Item is Showing item temp Item if we have no visible tabs abort if item null return Rectangle item Bounds item get Bounds int x item Bounds x item Bounds width int y item Bounds y item Bounds height Point location item get Display map tab Folder get Control null x y show List shell location x location y  showPartList isTrue isDisposed PaneFolder tabFolder getTabFolder tabFolder getControl getShell numItems tabFolder getItemCount CTabItem tempItem numItems tempItem tabFolder getItem tempItem isShowing tempItem itemBounds getBounds itemBounds itemBounds itemBounds itemBounds getDisplay tabFolder getControl showList
void set Selection C Tab Item tab Item get Site select Part get Part For Tab tab Item  setSelection CTabItem tabItem getSite selectPart getPartForTab tabItem
void close I Presentable Part presentable Part get Site close presentable Part  IPresentablePart presentablePart getSite presentablePart
Returns the List of I Presentable Part currently in this presentation List get Presentable Parts Assert is True is Disposed C Tab Item items tab Folder get Items List result new Array List items length for int idx 0 idx tab Folder get Item Count idx result add get Part For Tab items idx return result  IPresentablePart getPresentableParts isTrue isDisposed CTabItem tabFolder getItems ArrayList tabFolder getItemCount getPartForTab
Image get Label Image I Presentable Part presentable Part return presentable Part get Title Image  getLabelImage IPresentablePart presentablePart presentablePart getTitleImage
String get Label Text I Presentable Part presentable Part boolean include Path String title presentable Part get Name return title  getLabelText IPresentablePart presentablePart includePath presentablePart getName
Answers whether the shell containing this presentation is currently the active shell protected boolean is Shell Active Assert is True is Disposed return shell Active  isShellActive isTrue isDisposed shellActive

Constructs a new code Default Standalone Presentation code param parent the parent composite param new Site the site for interacting with the workbench param show Title code true code iff the part s title should be shown public Default Standalone Presentation Composite parent I Stack Presentation Site new Site boolean show Title super parent new Site Pane Folder folder get Tab Folder folder set Single Tab true if show Title folder hide Title  DefaultStandalonePresentation newSite showTitle DefaultStandalonePresentation IStackPresentationSite newSite showTitle newSite PaneFolder getTabFolder setSingleTab showTitle hideTitle

private final I Property Change Listener property Change Listener new I Property Change Listener public void property Change Property Change Event property Change Event if is Disposed return if I Preference Constants VIEW TAB POSITION equals property Change Event get Property is Disposed int tab Location preference Store get Int I Preference Constants VIEW TAB POSITION get Tab Folder set Tab Position tab Location layout false else if I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS equals property Change Event get Property is Disposed boolean traditional Tab api Preference Store get Boolean I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS set Tab Style traditional Tab  IPropertyChangeListener propertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent propertyChangeEvent isDisposed IPreferenceConstants VIEW_TAB_POSITION propertyChangeEvent getProperty isDisposed tabLocation preferenceStore getInt IPreferenceConstants VIEW_TAB_POSITION getTabFolder setTabPosition tabLocation IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS propertyChangeEvent getProperty isDisposed traditionalTab apiPreferenceStore getBoolean IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS setTabStyle traditionalTab
public Default View Presentation Composite parent I Stack Presentation Site new Site super new Pane Folder parent SWT BORDER new Site Pane Folder tab Folder get Tab Folder preference Store add Property Change Listener property Change Listener api Preference Store add Property Change Listener property Change Listener int tab Location preference Store get Int I Preference Constants VIEW TAB POSITION tab Folder set Tab Position tab Location set Tab Style api Preference Store get Boolean I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS do not support close box on unselected tabs tab Folder set Unselected Close Visible false do not support icons in unselected tabs tab Folder set Unselected Image Visible false init  DefaultViewPresentation IStackPresentationSite newSite PaneFolder newSite PaneFolder tabFolder getTabFolder preferenceStore addPropertyChangeListener propertyChangeListener apiPreferenceStore addPropertyChangeListener propertyChangeListener tabLocation preferenceStore getInt IPreferenceConstants VIEW_TAB_POSITION tabFolder setTabPosition tabLocation setTabStyle apiPreferenceStore getBoolean IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS tabFolder setUnselectedCloseVisible tabFolder setUnselectedImageVisible
Set the tab folder tab style to a tradional style tab param traditional Tab code true code if traditional style tabs should be used code false code otherwise protected void set Tab Style boolean traditional Tab set the tab style to non simple get Tab Folder set Simple Tab traditional Tab  traditionalTab setTabStyle traditionalTab getTabFolder setSimpleTab traditionalTab
protected void update Gradient if is Disposed return I Theme theme PlatformUI get Workbench get Theme Manager get Current Theme if is Active set Active Tab Colors else set Inactive Tab Colors boolean resize Needed false C Tab Item item get Tab Folder get Selection Font tab Font theme get Font Registry get I Workbench Theme Constants TAB TEXT FONT if item null get Part For Tab item is Busy item set Font null Font old Tab Font get Tab Folder get Control get Font if old Tab Font equals tab Font get Tab Folder get Control set Font tab Font resize Needed true call super to ensure that the toolbar is updated properly super update Gradient if resize Needed get Tab Folder set Tab Height compute Tab Height ensure proper control sizes for new fonts set Control Size  updateGradient isDisposed ITheme getWorkbench getThemeManager getCurrentTheme isActive setActiveTabColors setInactiveTabColors resizeNeeded CTabItem getTabFolder getSelection tabFont getFontRegistry IWorkbenchThemeConstants TAB_TEXT_FONT getPartForTab isBusy setFont oldTabFont getTabFolder getControl getFont oldTabFont tabFont getTabFolder getControl setFont tabFont resizeNeeded updateGradient resizeNeeded getTabFolder setTabHeight computeTabHeight setControlSize
public void set Active int new State super set Active new State update Gradient  setActive newState setActive newState updateGradient
protected void widget Disposed preference Store remove Property Change Listener property Change Listener api Preference Store remove Property Change Listener property Change Listener super widget Disposed  widgetDisposed preferenceStore removePropertyChangeListener propertyChangeListener apiPreferenceStore removePropertyChangeListener propertyChangeListener widgetDisposed
see org eclipse ui internal presentations Default Part Presentation get Part Menu protected String get Pane Name return Workbench Messages get String View Pane move View NON NLS 1  DefaultPartPresentation getPartMenu getPaneName WorkbenchMessages getString ViewPane moveView

public interface I Self Updating Action extends I Action Refreshes the action public void update  ISelfUpdatingAction IAction
public void update public boolean should Be Visible  shouldBeVisible

see org eclipse ui presentations Abstract Presentation Factory public Stack Presentation create Editor Presentation Composite parent I Stack Presentation Site site return new Native Stack Presentation parent site  AbstractPresentationFactory StackPresentation createEditorPresentation IStackPresentationSite NativeStackPresentation
see org eclipse ui presentations Abstract Presentation Factory public Stack Presentation create View Presentation Composite parent I Stack Presentation Site site return new Native Stack Presentation parent site  AbstractPresentationFactory StackPresentation createViewPresentation IStackPresentationSite NativeStackPresentation
public Stack Presentation create Standalone View Presentation Composite parent I Stack Presentation Site site boolean show Title TODO honour show Title return new Native Stack Presentation parent site  StackPresentation createStandaloneViewPresentation IStackPresentationSite showTitle showTitle NativeStackPresentation

private Mouse Listener mouse Listener new Mouse Adapter public void mouse Down Mouse Event e PR 1GDEZ25 If selection will change in mouse up ignore mouse down Else set focus Tab Item new Item tab Folder get Item new Point e x e y if new Item null Tab Item old Item tab Folder get Selection if new Item old Item return if current null current set Focus  MouseListener mouseListener MouseAdapter mouseDown MouseEvent TabItem newItem tabFolder getItem newItem TabItem oldItem tabFolder getSelection newItem oldItem setFocus
public void handle Event Event event Point pos new Point event x event y Tab Item item tab Folder get Item pos Tab Item item null I Presentable Part part null if item null part get Part For Tab item show Pane Menu part pos  handleEvent TabItem tabFolder getItem TabItem IPresentablePart getPartForTab showPaneMenu
private Listener selection Listener new Listener public void handle Event Event e I Presentable Part item get Part For Tab Tab Item e item if item null get Site select Part item item set Focus  selectionListener handleEvent IPresentablePart getPartForTab TabItem getSite selectPart setFocus
private Listener resize Listener new Listener public void handle Event Event e set Control Size  resizeListener handleEvent setControlSize
private I Property Listener child Property Change Listener new I Property Listener public void property Changed Object source int property if is Disposed return if source instanceof I Presentable Part I Presentable Part part I Presentable Part source child Property Changed part property  IPropertyListener childPropertyChangeListener IPropertyListener propertyChanged isDisposed IPresentablePart IPresentablePart IPresentablePart childPropertyChanged
private Dispose Listener tab Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if e widget instanceof Tab Item Tab Item item Tab Item e widget I Presentable Part part get Part For Tab item part remove Property Listener child Property Change Listener  DisposeListener tabDisposeListener DisposeListener widgetDisposed DisposeEvent TabItem TabItem TabItem IPresentablePart getPartForTab removePropertyListener childPropertyChangeListener
public Native Stack Presentation Composite parent I Stack Presentation Site stack Site super stack Site int tab Pos preference Store get Int I Preference Constants VIEW TAB POSITION tab Folder new Tab Folder parent tab Pos listener to switch between visible tab Items tab Folder add Listener SWT Selection selection Listener listener to resize visible components tab Folder add Listener SWT Resize resize Listener listen for mouse down on tab to set focus tab Folder add Mouse Listener mouse Listener tab Folder add Listener SWT Menu Detect menu Listener drag Listener new Listener public void handle Event Event event Point local Pos new Point event x event y Tab Item tab Under Pointer tab Folder get Item local Pos Tab Item tab Under Pointer null if tab Under Pointer null return I Presentable Part part get Part For Tab tab Under Pointer if get Site is Part Moveable part get Site drag Start part tab Folder to Display local Pos false Presentation Util add Drag Listener tab Folder drag Listener  NativeStackPresentation IStackPresentationSite stackSite stackSite tabPos preferenceStore getInt IPreferenceConstants VIEW_TAB_POSITION tabFolder TabFolder tabPos tabItems tabFolder addListener selectionListener tabFolder addListener resizeListener tabFolder addMouseListener mouseListener tabFolder addListener MenuDetect menuListener dragListener handleEvent localPos TabItem tabUnderPointer tabFolder getItem localPos TabItem tabUnderPointer tabUnderPointer IPresentablePart getPartForTab tabUnderPointer getSite isPartMoveable getSite dragStart tabFolder toDisplay localPos PresentationUtil addDragListener tabFolder dragListener
Returns the index of the tab for the given part or returns tab Folder get Item Count if there is no such tab param part part being searched for return the index of the tab for the given part or the number of tabs if there is no such tab private final int index Of I Presentable Part part if part null return tab Folder get Item Count Tab Item items tab Folder get Items for int idx 0 idx items length idx I Presentable Part tab Part get Part For Tab items idx if part tab Part return idx return items length  tabFolder getItemCount indexOf IPresentablePart tabFolder getItemCount TabItem tabFolder getItems IPresentablePart tabPart getPartForTab tabPart
Returns the tab for the given part or null if there is no such tab param part the part being searched for return the tab for the given part or null if there is no such tab protected final Tab Item get Tab I Presentable Part part Tab Item items tab Folder get Items int idx index Of part if idx items length return items idx return null  TabItem getTab IPresentablePart TabItem tabFolder getItems indexOf
param part param property protected void child Property Changed I Presentable Part part int property Tab Item tab get Tab part init Tab tab part  childPropertyChanged IPresentablePart TabItem getTab initTab
protected final I Presentable Part get Part For Tab Tab Item item I Presentable Part part I Presentable Part item get Data TAB DATA return part  IPresentablePart getPartForTab TabItem IPresentablePart IPresentablePart getData TAB_DATA
protected Tab Folder get Tab Folder return tab Folder  TabFolder getTabFolder tabFolder
public boolean is Disposed return tab Folder null tab Folder is Disposed  isDisposed tabFolder tabFolder isDisposed
Set the size of a page in the folder private void set Control Size if current null tab Folder null return Rectangle bounds issue as above the mere presence of a theme should not change the behaviour if map Tab To Part size 1 tab Theme Descriptor null map Tab To Part size 1 bounds calculate Page Bounds tab Folder else bounds tab Folder get Bounds current set Bounds calculate Page Bounds tab Folder current move Above tab Folder  setControlSize tabFolder mapTabToPart tabThemeDescriptor mapTabToPart calculatePageBounds tabFolder tabFolder getBounds setBounds calculatePageBounds tabFolder moveAbove tabFolder
public static Rectangle calculate Page Bounds Tab Folder folder if folder null return new Rectangle 0 0 0 0 Rectangle bounds folder get Bounds Rectangle offset folder get Client Area bounds x offset x bounds y offset y bounds width offset width bounds height offset height return bounds  calculatePageBounds TabFolder getBounds getClientArea
public void dispose if is Disposed return Presentation Util remove Drag Listener tab Folder drag Listener system Menu Manager dispose tab Folder dispose tab Folder null  isDisposed PresentationUtil removeDragListener tabFolder dragListener systemMenuManager tabFolder tabFolder
private Tab Item create Part Tab I Presentable Part part int tab Index Tab Item tab Item new Tab Item tab Folder SWT NONE tab Index tab Item set Data TAB DATA part part add Property Listener child Property Change Listener tab Item add Dispose Listener tab Dispose Listener init Tab tab Item part return tab Item  TabItem createPartTab IPresentablePart tabIndex TabItem tabItem TabItem tabFolder tabIndex tabItem setData TAB_DATA addPropertyListener childPropertyChangeListener tabItem addDisposeListener tabDisposeListener initTab tabItem tabItem
Initializes a tab for the given part Sets the text icon tool tip etc This will also be called whenever a relevant property changes in the part to reflect those changes in the tab Subclasses may override to change the appearance of tabs for a particular part param tab Item tab for the part param part the part being displayed protected void init Tab Tab Item tab Item I Presentable Part part tab Item set Text part get Name tab Item set Tool Tip Text part get Title Tool Tip Image tab Image part get Title Image if tab Image tab Item get Image tab Item set Image tab Image  tabItem initTab TabItem tabItem IPresentablePart tabItem setText getName tabItem setToolTipText getTitleToolTip tabImage getTitleImage tabImage tabItem getImage tabItem setImage tabImage
see org eclipse ui internal skins Stack Presentation add Part org eclipse ui internal skins I Presentable Part org eclipse ui internal skins I Presentable Part public void add Part I Presentable Part new Part Object cookie create Part Tab new Part tab Folder get Item Count  StackPresentation addPart IPresentablePart IPresentablePart addPart IPresentablePart newPart createPartTab newPart tabFolder getItemCount
public void remove Part I Presentable Part old Part Tab Item item get Tab old Part if item null return old Part set Visible false item dispose  removePart IPresentablePart oldPart TabItem getTab oldPart oldPart setVisible
public void select Part I Presentable Part to Select if to Select current return if current null current set Visible false current to Select if current null tab Folder set Selection index Of current current set Visible true set Control Size  selectPart IPresentablePart toSelect toSelect setVisible toSelect tabFolder setSelection indexOf setVisible setControlSize
see org eclipse ui internal skins Presentation set Bounds org eclipse swt graphics Rectangle public void set Bounds Rectangle bounds tab Folder set Bounds bounds set Control Size  setBounds setBounds tabFolder setBounds setControlSize
see org eclipse ui internal skins Presentation compute Minimum Size public Point compute Minimum Size return Geometry get Size tab Folder compute Trim 0 0 0 0  computeMinimumSize computeMinimumSize getSize tabFolder computeTrim
public void set Visible boolean is Visible if current null current set Visible is Visible tab Folder set Visible is Visible  setVisible isVisible setVisible isVisible tabFolder setVisible isVisible
see org eclipse ui internal skins Presentation set State int public void set State int state tab Folder set Minimized state I Presentation Site STATE MINIMIZED tab Folder set Maximized state I Presentation Site STATE MAXIMIZED  setState setState tabFolder setMinimized IPresentationSite STATE_MINIMIZED tabFolder setMaximized IPresentationSite STATE_MAXIMIZED
see org eclipse ui internal skins Presentation get System Menu Manager public I Menu Manager get System Menu Manager return system Menu Manager  getSystemMenuManager IMenuManager getSystemMenuManager systemMenuManager
param part param point protected void show Pane Menu I Presentable Part part Point point system Menu Manager update false Menu a Menu system Menu Manager create Context Menu tab Folder get Parent a Menu set Location point x point y a Menu set Visible true  showPaneMenu IPresentablePart systemMenuManager aMenu systemMenuManager createContextMenu tabFolder getParent aMenu setLocation aMenu setVisible
see org eclipse ui internal skins Presentation get Control public Control get Control return tab Folder  getControl getControl tabFolder
public Stack Drop Result drag Over Control current Control Point location Determine which tab we re currently dragging over Point local Pos tab Folder to Control location final Tab Item tab Under Pointer tab Folder get Item local Pos final Tab Item tab Under Pointer null This drop target only deals with tabs if we re not dragging over a tab exit if tab Under Pointer null return null return new Stack Drop Result Geometry to Display tab Folder tab Under Pointer get Bounds tab Folder index Of tab Under Pointer return null  StackDropResult dragOver currentControl localPos tabFolder toControl TabItem tabUnderPointer tabFolder getItem localPos TabItem tabUnderPointer tabUnderPointer StackDropResult toDisplay tabFolder tabUnderPointer getBounds tabFolder indexOf tabUnderPointer
see org eclipse ui presentations Stack Presentation show System Menu public void show System Menu TODO Auto generated method stub  StackPresentation showSystemMenu showSystemMenu
see org eclipse ui presentations Stack Presentation show Pane Menu public void show Pane Menu TODO Auto generated method stub  StackPresentation showPaneMenu showPaneMenu
public Control get Tab List I Presentable Part part Array List list new Array List if get Control null list add get Control if part get Tool Bar null list add part get Tool Bar if part get Control null list add part get Control return Control list to Array new Control list size  getTabList IPresentablePart ArrayList ArrayList getControl getControl getToolBar getToolBar getControl getControl toArray
see org eclipse ui presentations Stack Presentation get Current Part public I Presentable Part get Current Part return current  StackPresentation getCurrentPart IPresentablePart getCurrentPart
see org eclipse ui presentations Stack Presentation set Active int public void set Active int new State  StackPresentation setActive setActive newState

see org eclipse swt events Dispose Listener widget Disposed org eclipse swt events Dispose Event public void widget Disposed Dispose Event e Pane Folder this widget Disposed  DisposeListener widgetDisposed DisposeEvent widgetDisposed DisposeEvent PaneFolder widgetDisposed
public void widget Disposed Dispose Event e Control disposed Control Control e widget if is Disposed return Probably unnecessary but it can t hurt garbage collection disposed Control remove Dispose Listener this if disposed Control top Left Cache get Control set Top Left null if disposed Control top Right Cache get Control set Top Right null if disposed Control top Center Cache get Control set Top Center null  widgetDisposed DisposeEvent disposedControl isDisposed disposedControl removeDisposeListener disposedControl topLeftCache getControl setTopLeft disposedControl topRightCache getControl setTopRight disposedControl topCenterCache getControl setTopCenter
C Tab Folder listener private C Tab Folder2 Adapter expand Listener new C Tab Folder2 Adapter public void minimize C Tab Folder Event event event doit false notify Button Listeners I Stack Presentation Site STATE MINIMIZED  CTabFolder CTabFolder2Adapter expandListener CTabFolder2Adapter CTabFolderEvent notifyButtonListeners IStackPresentationSite STATE_MINIMIZED
public void restore C Tab Folder Event event event doit false notify Button Listeners I Stack Presentation Site STATE RESTORED  CTabFolderEvent notifyButtonListeners IStackPresentationSite STATE_RESTORED
public void maximize C Tab Folder Event event event doit false notify Button Listeners I Stack Presentation Site STATE MAXIMIZED  CTabFolderEvent notifyButtonListeners IStackPresentationSite STATE_MAXIMIZED
see org eclipse swt custom C Tab Folder2 Adapter close org eclipse swt custom C Tab Folder Event public void close C Tab Folder Event event event doit false notify Close Listeners C Tab Item event item  CTabFolder2Adapter CTabFolderEvent CTabFolderEvent notifyCloseListeners CTabItem
public void show List C Tab Folder Event event notify Show Listeners event  showList CTabFolderEvent notifyShowListeners
private Mouse Listener mouse Listener new Mouse Adapter public void mouse Down Mouse Event e mousedown State get State  MouseListener mouseListener MouseAdapter mouseDown MouseEvent mousedownState getState
public void mouse Double Click Mouse Event e  mouseDoubleClick MouseEvent
title Area Proxy set Visible false title Area Proxy add Control Listener new Control Listener public void control Moved Control Event e top Right Resized true  titleAreaProxy setVisible titleAreaProxy addControlListener ControlListener controlMoved ControlEvent topRightResized
public void control Resized Control Event e top Right Resized true  controlResized ControlEvent topRightResized
Creates a pane folder This will create exactly one child control in the given parent param parent param flags public Pane Folder Composite parent int flags Initialize tab folder tab Folder new C Tab Folder parent flags Create a proxy control to measure the title area of the tab folder title Area Proxy new Composite tab Folder SWT NONE title Area Proxy set Visible false title Area Proxy add Control Listener new Control Listener public void control Moved Control Event e top Right Resized true public void control Resized Control Event e top Right Resized true tab Folder set Top Right title Area Proxy SWT FILL tab Folder addC Tab Folder2 Listener expand Listener tab Folder add Mouse Listener mouse Listener tab Folder add Dispose Listener tab Folder Dispose Listener Initialize view form view Form new View Form tab Folder SWT NONE Only attach these to the view Form when there s actually a control to display view Form Top Left Proxy new Proxy Control view Form view Form Top Center Proxy new Proxy Control view Form view Form Top Right Proxy new Proxy Control view Form content Proxy new Proxy Control view Form view Form set Content content Proxy get Control  PaneFolder tabFolder CTabFolder titleAreaProxy tabFolder titleAreaProxy setVisible titleAreaProxy addControlListener ControlListener controlMoved ControlEvent topRightResized controlResized ControlEvent topRightResized tabFolder setTopRight titleAreaProxy tabFolder addCTabFolder2Listener expandListener tabFolder addMouseListener mouseListener tabFolder addDisposeListener tabFolderDisposeListener viewForm ViewForm tabFolder viewForm viewFormTopLeftProxy ProxyControl viewForm viewFormTopCenterProxy ProxyControl viewForm viewFormTopRightProxy ProxyControl viewForm contentProxy ProxyControl viewForm viewForm setContent contentProxy getControl
Returns the title area the empty region to the right of the tabs in the tab folder s coordinate system return the title area the empty region to the right of the tabs public Rectangle get Title Area return title Area Proxy get Bounds  getTitleArea titleAreaProxy getBounds
Return the main control for this pane folder return public Composite get Control return tab Folder  getControl tabFolder
Sets the top center control usually a toolbar or null if none Note that the control can have any parent param top Center the top center control or null if none public void set Top Center Control top Center if top Center top Center Cache get Control return remove Dispose Listener top Center Cache get Control top Center Cache set Control top Center if top Center null top Center add Dispose Listener premature Dispose Listener if put Trim On Top view Form Top Center Proxy set Target top Center Cache view Form set Top Center view Form Top Center Proxy get Control else if put Trim On Top view Form set Top Center null  topCenter setTopCenter topCenter topCenter topCenterCache getControl removeDisposeListener topCenterCache getControl topCenterCache setControl topCenter topCenter topCenter addDisposeListener prematureDisposeListener putTrimOnTop viewFormTopCenterProxy setTarget topCenterCache viewForm setTopCenter viewFormTopCenterProxy getControl putTrimOnTop viewForm setTopCenter
Sets the top right control usually a dropdown or null if none param top Right public void set Top Right Control top Right if top Right Cache get Control top Right return remove Dispose Listener top Right Cache get Control top Right Cache set Control top Right if top Right null top Right add Dispose Listener premature Dispose Listener if put Trim On Top view Form Top Right Proxy set Target top Right Cache view Form set Top Right view Form Top Right Proxy get Control else if put Trim On Top view Form set Top Right null  topRight setTopRight topRight topRightCache getControl topRight removeDisposeListener topRightCache getControl topRightCache setControl topRight topRight topRight addDisposeListener prematureDisposeListener putTrimOnTop viewFormTopRightProxy setTarget topRightCache viewForm setTopRight viewFormTopRightProxy getControl putTrimOnTop viewForm setTopRight
Sets the top left control usually a title label or null if none param top Left public void set Top Left Control top Left if top Left Cache get Control top Left return remove Dispose Listener top Left Cache get Control top Left Cache set Control top Left The top left control always goes directly in the View Form if top Left null top Left add Dispose Listener premature Dispose Listener view Form Top Left Proxy set Target top Left Cache view Form set Top Left view Form Top Left Proxy get Control else view Form Top Left Proxy set Target null view Form set Top Left null  topLeft setTopLeft topLeft topLeftCache getControl topLeft removeDisposeListener topLeftCache getControl topLeftCache setControl topLeft ViewForm topLeft topLeft addDisposeListener prematureDisposeListener viewFormTopLeftProxy setTarget topLeftCache viewForm setTopLeft viewFormTopLeftProxy getControl viewFormTopLeftProxy setTarget viewForm setTopLeft
Optimization calling this method immediately before setting the control s bounds will allow for improved caching public void about To Resize use Top Right Optimization true top Right Resized false last Width get Control get Bounds width  aboutToResize useTopRightOptimization topRightResized lastWidth getControl getBounds
public void layout boolean flush Cache Flush the cached sizes if necessary if flush Cache top Left Cache flush top Right Cache flush top Center Cache flush HACK Force the tab folder to do a layout since it doesn t always resize its title area each time set Bounds is called if use Top Right Optimization top Right Resized last Width get Control get Bounds width If we can t use the optimization then we need to force a layout of the tab folder tab Folder set Top Right title Area Proxy SWT FILL use Top Right Optimization false END OF HACK Rectangle title Area Drag Util get Display Bounds title Area Proxy Point top Right Size top Right Cache compute Size SWT DEFAULT SWT DEFAULT Point top Center Size top Center Cache compute Size SWT DEFAULT SWT DEFAULT Determine if there is enough room for the trim in the title area int required Width top Right Size x top Center Size x int required Height Math max top Right Size y top Center Size y boolean last Trim On Top put Trim On Top put Trim On Top title Area width required Width title Area height required Height Control top Right top Right Cache get Control Control top Center top Center Cache get Control if put Trim On Top Try to avoid calling set Top whenever possible since this will trigger a layout of the view Form if last Trim On Top Arrange controls in the title bar view Form Top Center Proxy set Target null view Form Top Right Proxy set Target null view Form set Top Center null view Form set Top Right null Rectangle top Right Area new Rectangle title Area x title Area width top Right Size x title Area y title Area height top Right Size y 2 top Right Size x top Right Size y if top Right null top Right set Bounds Geometry to Control top Right get Parent top Right Area if top Center null Rectangle top Center Area new Rectangle top Right Area x top Center Size x title Area y title Area height top Center Size y 2 top Center Size x top Center Size y Rectangle local Coords Geometry to Control top Center get Parent top Center Area top Center set Bounds local Coords else if last Trim On Top if top Center null view Form Top Center Proxy set Target top Center Cache view Form set Top Center view Form Top Center Proxy get Control if top Right null view Form Top Right Proxy set Target top Right Cache view Form set Top Right view Form Top Right Proxy get Control view Form set Bounds tab Folder get Client Area view Form Top Right Proxy layout view Form Top Left Proxy layout view Form Top Center Proxy layout  flushCache flushCache topLeftCache topRightCache topCenterCache setBounds useTopRightOptimization topRightResized lastWidth getControl getBounds tabFolder setTopRight titleAreaProxy useTopRightOptimization titleArea DragUtil getDisplayBounds titleAreaProxy topRightSize topRightCache computeSize topCenterSize topCenterCache computeSize requiredWidth topRightSize topCenterSize requiredHeight topRightSize topCenterSize lastTrimOnTop putTrimOnTop putTrimOnTop titleArea requiredWidth titleArea requiredHeight topRight topRightCache getControl topCenter topCenterCache getControl putTrimOnTop setTop viewForm lastTrimOnTop viewFormTopCenterProxy setTarget viewFormTopRightProxy setTarget viewForm setTopCenter viewForm setTopRight topRightArea titleArea titleArea topRightSize titleArea titleArea topRightSize topRightSize topRightSize topRight topRight setBounds toControl topRight getParent topRightArea topCenter topCenterArea topRightArea topCenterSize titleArea titleArea topCenterSize topCenterSize topCenterSize localCoords toControl topCenter getParent topCenterArea topCenter setBounds localCoords lastTrimOnTop topCenter viewFormTopCenterProxy setTarget topCenterCache viewForm setTopCenter viewFormTopCenterProxy getControl topRight viewFormTopRightProxy setTarget topRightCache viewForm setTopRight viewFormTopRightProxy getControl viewForm setBounds tabFolder getClientArea viewFormTopRightProxy viewFormTopLeftProxy viewFormTopCenterProxy
Returns the client area for this Pane Folder relative to the pane folder s control return public Rectangle get Client Area Rectangle bounds content Proxy get Control get Bounds Rectangle form Area view Form get Bounds bounds x form Area x bounds y form Area y return bounds  PaneFolder getClientArea contentProxy getControl getBounds formArea viewForm getBounds formArea formArea
Returns the current state of the folder as shown on the button icons return one of the I Stack Presentation Site STATE  constants public int get State return state  IStackPresentationSite STATE_ getState
param button Id one of the I Stack Presentation Site STATE  constants protected void notify Button Listeners int button Id if mousedown State get State Iterator iter button Listeners iterator while iter has Next Pane Folder Button Listener listener Pane Folder Button Listener iter next listener state Button Pressed button Id  buttonId IStackPresentationSite STATE_ notifyButtonListeners buttonId mousedownState getState buttonListeners hasNext PaneFolderButtonListener PaneFolderButtonListener stateButtonPressed buttonId
Notifies all listeners that the user clicked on the chevron param tab Item protected void notify Show Listeners C Tab Folder Event event Iterator iter button Listeners iterator while iter has Next Pane Folder Button Listener listener Pane Folder Button Listener iter next listener show List event  tabItem notifyShowListeners CTabFolderEvent buttonListeners hasNext PaneFolderButtonListener PaneFolderButtonListener showList
Notifies all listeners that the close button was pressed param tab Item protected void notify Close Listeners C Tab Item tab Item Iterator iter button Listeners iterator while iter has Next Pane Folder Button Listener listener Pane Folder Button Listener iter next listener close Button Pressed tab Item  tabItem notifyCloseListeners CTabItem tabItem buttonListeners hasNext PaneFolderButtonListener PaneFolderButtonListener closeButtonPressed tabItem
Sets the state that will be shown on the C Tab Folder s buttons param state one of the I Stack Presentation Site STATE  constants public void set State int state this state state tab Folder set Minimized state I Stack Presentation Site STATE MINIMIZED tab Folder set Maximized state I Stack Presentation Site STATE MAXIMIZED  CTabFolder IStackPresentationSite STATE_ setState tabFolder setMinimized IStackPresentationSite STATE_MINIMIZED tabFolder setMaximized IStackPresentationSite STATE_MAXIMIZED
public void add Button Listener Pane Folder Button Listener listener button Listeners add listener  addButtonListener PaneFolderButtonListener buttonListeners
public void remove Button Listener Pane Folder Button Listener listener button Listeners remove listener  removeButtonListener PaneFolderButtonListener buttonListeners
public void set Tab Position int new Tab Position tab Position new Tab Position tab Folder set Tab Position tab Position  setTabPosition newTabPosition tabPosition newTabPosition tabFolder setTabPosition tabPosition
public int get Tab Position return tab Position  getTabPosition tabPosition
public boolean is Disposed return tab Folder null tab Folder is Disposed  isDisposed tabFolder tabFolder isDisposed
public C Tab Item create Item int style int index return new C Tab Item tab Folder style index  CTabItem createItem CTabItem tabFolder
public Point compute Minimum Size Point result Geometry get Size tab Folder compute Trim 0 0 0 0 Add some space for the minimize and maximize buttons plus a tab Right now this isn t exposed from SWT as API so we just add 50 pixels result x 60 return result  computeMinimumSize getSize tabFolder computeTrim
Removes the dispose listener from the given control unless the given control is null or disposed param old Control control to detach the dispose listener from private void remove Dispose Listener Control old Control if Swt Util is Disposed old Control old Control remove Dispose Listener premature Dispose Listener  oldControl removeDisposeListener oldControl SwtUtil isDisposed oldControl oldControl removeDisposeListener prematureDisposeListener
private void widget Disposed remove Dispose Listener top Center Cache get Control top Center Cache set Control null remove Dispose Listener top Right Cache get Control top Right Cache set Control null remove Dispose Listener top Left Cache get Control top Left Cache set Control null  widgetDisposed removeDisposeListener topCenterCache getControl topCenterCache setControl removeDisposeListener topRightCache getControl topRightCache setControl removeDisposeListener topLeftCache getControl topLeftCache setControl
The remainder of the methods in this class redirect directly to C Tab Folder methods public void set Selection int selection tab Folder set Selection selection  CTabFolder setSelection tabFolder setSelection
param i param j param k param l return public Rectangle compute Trim int i int j int k int l return tab Folder compute Trim i j k l  computeTrim tabFolder computeTrim
param b public void set Unselected Close Visible boolean b tab Folder set Unselected Close Visible b  setUnselectedCloseVisible tabFolder setUnselectedCloseVisible
param fg Color public void set Selection Foreground Color fg Color tab Folder set Selection Foreground fg Color  fgColor setSelectionForeground fgColor tabFolder setSelectionForeground fgColor
param bg Colors param percentages param vertical public void set Selection Background Color bg Colors int percentages boolean vertical tab Folder set Selection Background bg Colors percentages vertical  bgColors setSelectionBackground bgColors tabFolder setSelectionBackground bgColors
public C Tab Item get Item int idx return tab Folder get Item idx  CTabItem getItem tabFolder getItem
public int get Selection Index return tab Folder get Selection Index  getSelectionIndex tabFolder getSelectionIndex
public int get Tab Height return tab Folder get Tab Height  getTabHeight tabFolder getTabHeight
public int index Of C Tab Item to Find return tab Folder index Of to Find  indexOf CTabItem toFind tabFolder indexOf toFind
public void set Tab Height int height tab Folder set Tab Height height  setTabHeight tabFolder setTabHeight
return public int get Item Count return tab Folder get Item Count  getItemCount tabFolder getItemCount
return public C Tab Item get Items return tab Folder get Items  CTabItem getItems tabFolder getItems
public C Tab Item get Item Point to Get return tab Folder get Item to Get  CTabItem getItem toGet tabFolder getItem toGet
public C Tab Item get Selection return tab Folder get Selection  CTabItem getSelection tabFolder getSelection
param is Visible public void set Minimize Visible boolean is Visible tab Folder set Minimize Visible is Visible  isVisible setMinimizeVisible isVisible tabFolder setMinimizeVisible isVisible
param is Visible public void set Maximize Visible boolean is Visible tab Folder set Maximize Visible is Visible  isVisible setMaximizeVisible isVisible tabFolder setMaximizeVisible isVisible
param traditional Tab public void set Simple Tab boolean traditional Tab tab Folder set Simple traditional Tab  traditionalTab setSimpleTab traditionalTab tabFolder setSimple traditionalTab
param b public void set Unselected Image Visible boolean b tab Folder set Unselected Image Visible b  setUnselectedImageVisible tabFolder setUnselectedImageVisible
param b public void set Single Tab boolean b tab Folder set Single b  setSingleTab tabFolder setSingle
public void hide Title tab Folder set Tab Height 0  hideTitle tabFolder setTabHeight

Called when the minimize maximize or restore buttons are pressed param button Id one of the I Stack Presentation Site STATE  constants public void state Button Pressed int button Id  buttonId IStackPresentationSite STATE_ stateButtonPressed buttonId
Called when a close button is pressed param item the tab whose close button was pressed public void close Button Pressed C Tab Item item  closeButtonPressed CTabItem
since 3 0 public void show List C Tab Folder Event event  showList CTabFolderEvent

Constructor param part public Presentable Part Part Pane part this part part  PresentablePart PartPane
if lazy Property Listener Proxy null lazy Property Listener Proxy new I Property Listener public void property Changed Object source int prop Id fire Property Change prop Id  lazyPropertyListenerProxy lazyPropertyListenerProxy IPropertyListener propertyChanged propId firePropertyChange propId
private I Property Listener get Property Listener Proxy if lazy Property Listener Proxy null lazy Property Listener Proxy new I Property Listener public void property Changed Object source int prop Id fire Property Change prop Id return lazy Property Listener Proxy  IPropertyListener getPropertyListenerProxy lazyPropertyListenerProxy lazyPropertyListenerProxy IPropertyListener propertyChanged propId firePropertyChange propId lazyPropertyListenerProxy
private Workbench Part Reference get Part Reference return Workbench Part Reference part get Part Reference  WorkbenchPartReference getPartReference WorkbenchPartReference getPartReference
Detach this Presentable Part from the real part No further methods should be invoked on this object public void dispose Ensure that the property listener is detached necessary to prevent leaks get Part Reference remove Property Listener get Property Listener Proxy Null out the various fields to ease garbage collection optional part null listeners clear listeners null  PresentablePart getPartReference removePropertyListener getPropertyListenerProxy
public void fire Property Change int property Id for int i 0 i listeners size i I Property Listener listeners get i property Changed this property Id  firePropertyChange propertyId IPropertyListener propertyChanged propertyId
public void add Property Listener final I Property Listener listener if listeners is Empty get Part Reference add Property Listener get Property Listener Proxy listeners add listener  addPropertyListener IPropertyListener isEmpty getPartReference addPropertyListener getPropertyListenerProxy
public void remove Property Listener final I Property Listener listener listeners remove listener if listeners is Empty get Part Reference remove Property Listener get Property Listener Proxy  removePropertyListener IPropertyListener isEmpty getPartReference removePropertyListener getPropertyListenerProxy
see org eclipse ui presentations I Presentable Part set Bounds org eclipse swt graphics Rectangle public void set Bounds Rectangle bounds part set Bounds bounds  IPresentablePart setBounds setBounds setBounds
see org eclipse ui presentations I Presentable Part set Visible boolean public void set Visible boolean is Visible part set Visible is Visible  IPresentablePart setVisible setVisible isVisible setVisible isVisible
see org eclipse ui presentations I Presentable Part set Focus public void set Focus part set Focus  IPresentablePart setFocus setFocus setFocus
see org eclipse ui presentations I Presentable Part get Name public String get Name return get Part Reference get Part Name  IPresentablePart getName getName getPartReference getPartName
see org eclipse ui presentations I Presentable Part get Title public String get Title return get Part Reference get Title  IPresentablePart getTitle getTitle getPartReference getTitle
see org eclipse ui presentations I Presentable Part get Title Status public String get Title Status return get Part Reference get Content Description  IPresentablePart getTitleStatus getTitleStatus getPartReference getContentDescription
see org eclipse ui presentations I Presentable Part get Title Image public Image get Title Image return get Part Reference get Title Image  IPresentablePart getTitleImage getTitleImage getPartReference getTitleImage
see org eclipse ui presentations I Presentable Part get Title Tool Tip public String get Title Tool Tip return get Part Reference get Title Tool Tip  IPresentablePart getTitleToolTip getTitleToolTip getPartReference getTitleToolTip
see org eclipse ui presentations I Presentable Part is Dirty public boolean is Dirty return get Part Reference is Dirty  IPresentablePart isDirty isDirty getPartReference isDirty
see org eclipse ui presentations I Presentable Part is Busy public boolean is Busy return part is Busy  IPresentablePart isBusy isBusy isBusy
see org eclipse ui presentations I Presentable Part get Tool Bar public Control get Tool Bar return part get Tool Bar  IPresentablePart getToolBar getToolBar getToolBar
if view Menu null view Menu new I Part Menu public void show Menu Point location part show View Menu location  viewMenu viewMenu IPartMenu showMenu showViewMenu
public I Part Menu get Menu if part has View Menu return null if view Menu null view Menu new I Part Menu public void show Menu Point location part show View Menu location return view Menu  IPartMenu getMenu hasViewMenu viewMenu viewMenu IPartMenu showMenu showViewMenu viewMenu
see org eclipse ui presentations I Presentable Part get Control public Control get Control return part get Control  IPresentablePart getControl getControl getControl

public static Stack Presentation create Presentation Abstract Presentation Factory factory int role Composite parent I Stack Presentation Site site I Presentation Serializer serializer I Memento memento Stack Presentation presentation null switch role case ROLE EDITOR presentation factory create Editor Presentation parent site break case ROLE STANDALONE presentation factory create Standalone View Presentation parent site true break case ROLE STANDALONE NOTITLE presentation factory create Standalone View Presentation parent site false break default presentation factory create View Presentation parent site don t initialize editors at creation time it will not contain any parts if role ROLE EDITOR memento null serializer null presentation restore State serializer memento return presentation  StackPresentation createPresentation AbstractPresentationFactory IStackPresentationSite IPresentationSerializer IMemento StackPresentation ROLE_EDITOR createEditorPresentation ROLE_STANDALONE createStandaloneViewPresentation ROLE_STANDALONE_NOTITLE createStandaloneViewPresentation createViewPresentation ROLE_EDITOR restoreState
private Presentation Factory Util  PresentationFactoryUtil

private List parts Collections EMPTY LIST public Presentation Serializer List presentable Parts parts presentable Parts  EMPTY_LIST PresentationSerializer presentableParts presentableParts
public String get Id I Presentable Part part int index parts index Of part return index NON NLS 1  getId IPresentablePart indexOf
public I Presentable Part get Part String id try Integer integer new Integer id int index integer int Value I Presentable Part result I Presentable Part parts get index return result catch Number Format Exception e catch Index Out Of Bounds Exception e return null  IPresentablePart getPart intValue IPresentablePart IPresentablePart NumberFormatException IndexOutOfBoundsException
Prevent this object from being used further Ensure that none of the methods return anything useful in order to discourage clients from hanging onto references to this object public void dispose parts Collections EMPTY LIST  EMPTY_LIST

control set Layout new Layout protected void layout Composite composite boolean flush Cache Proxy Control this layout  setLayout flushCache ProxyControl
protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache if target null return new Point 0 0 return target compute Size w Hint h Hint  computeSize wHint hHint flushCache computeSize wHint hHint
public Proxy Control Composite parent control new Composite parent SWT NONE control set Visible false control set Layout new Layout protected void layout Composite composite boolean flush Cache Proxy Control this layout protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache if target null return new Point 0 0 return target compute Size w Hint h Hint  ProxyControl setVisible setLayout flushCache ProxyControl computeSize wHint hHint flushCache computeSize wHint hHint
Sets the control whose position will be managed by this proxy param target the control or null if none public void set Target Size Cache target if this target target this target target  setTarget SizeCache
Returns the target control the control whose size is being managed return the target control or null public Control get Target Control if target null return null return target get Control  getTargetControl getControl
Returns the proxy control return the proxy control not null public Control get Control return control  getControl
Layout the target control public void layout if get Target Control null return Rectangle parent Bounds Drag Util get Display Bounds control get Parent Compute the clipped bounds for the control display coordinates Rectangle bounds control get Bounds bounds x parent Bounds x bounds y parent Bounds y bounds bounds intersection parent Bounds Rectangle target Bounds Geometry to Control get Target Control get Parent bounds get Target Control set Bounds target Bounds  getTargetControl parentBounds DragUtil getDisplayBounds getParent getBounds parentBounds parentBounds parentBounds targetBounds toControl getTargetControl getParent getTargetControl setBounds targetBounds
Destroys this object Should be the last method called on this object No further methods should be invoked after calling this public void dispose if control null return this target null control dispose control null 

private Mouse Listener mouse Listener new Mouse Adapter public void mouse Down Mouse Event e if e widget instanceof Control Control ctrl Control e widget Point global Pos ctrl to Display new Point e x e y PR 1GDEZ25 If selection will change in mouse up ignore mouse down Else set focus C Tab Item new Item pane Folder get Item pane Folder get Control to Control global Pos if new Item null C Tab Item old Item pane Folder get Selection if new Item old Item return if current null current set Focus  MouseListener mouseListener MouseAdapter mouseDown MouseEvent globalPos toDisplay CTabItem newItem paneFolder getItem paneFolder getControl toControl globalPos newItem CTabItem oldItem paneFolder getSelection newItem oldItem setFocus
public void mouse Double Click Mouse Event e if get Site get State I Stack Presentation Site STATE MAXIMIZED get Site set State I Stack Presentation Site STATE RESTORED else get Site set State I Stack Presentation Site STATE MAXIMIZED  mouseDoubleClick MouseEvent getSite getState IStackPresentationSite STATE_MAXIMIZED getSite setState IStackPresentationSite STATE_RESTORED getSite setState IStackPresentationSite STATE_MAXIMIZED
private Mouse Listener title Mouse Listener new Mouse Adapter public void mouse Down Mouse Event e if e widget instanceof Control Control ctrl Control e widget Point global Pos ctrl to Display new Point 0 title Label get Bounds height if e button 1 over Image e x show System Menu global Pos  MouseListener titleMouseListener MouseAdapter mouseDown MouseEvent globalPos toDisplay titleLabel getBounds overImage showSystemMenu globalPos
public void handle Event Event event Point pos new Point event x event y show System Menu pos  handleEvent showSystemMenu
private Listener drag Listener new Listener public void handle Event Event event Point local Pos new Point event x event y C Tab Item tab Under Pointer pane Folder get Item local Pos Drags on the title area drag the selected part only if tab Under Pointer null if pane Folder get Tab Position SWT BOTTOM local Pos y pane Folder get Control get Bounds height pane Folder get Tab Height tab Under Pointer pane Folder get Selection else if pane Folder get Tab Position SWT TOP local Pos y pane Folder get Tab Height tab Under Pointer pane Folder get Selection Not in a tab not in a title area must be dragging the whole stack if tab Under Pointer null get Site drag Start pane Folder get Control to Display local Pos false return I Presentable Part part get Part For Tab tab Under Pointer if get Site is Part Moveable part get Site drag Start part pane Folder get Control to Display local Pos false  dragListener handleEvent localPos CTabItem tabUnderPointer paneFolder getItem localPos tabUnderPointer paneFolder getTabPosition localPos paneFolder getControl getBounds paneFolder getTabHeight tabUnderPointer paneFolder getSelection paneFolder getTabPosition localPos paneFolder getTabHeight tabUnderPointer paneFolder getSelection tabUnderPointer getSite dragStart paneFolder getControl toDisplay localPos IPresentablePart getPartForTab tabUnderPointer getSite isPartMoveable getSite dragStart paneFolder getControl toDisplay localPos
private Listener selection Listener new Listener public void handle Event Event e I Presentable Part item get Part For Tab C Tab Item e item if item null get Site select Part item  selectionListener handleEvent IPresentablePart getPartForTab CTabItem getSite selectPart
private Listener resize Listener new Listener public void handle Event Event e set Control Size  resizeListener handleEvent setControlSize
private I Property Listener child Property Change Listener new I Property Listener public void property Changed Object source int property if source instanceof I Presentable Part I Presentable Part part I Presentable Part source child Property Changed part property  IPropertyListener childPropertyChangeListener IPropertyListener propertyChanged IPresentablePart IPresentablePart IPresentablePart childPropertyChanged
private Dispose Listener tab Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if e widget instanceof C Tab Item C Tab Item item C Tab Item e widget I Presentable Part part get Part For Tab item part remove Property Listener child Property Change Listener  DisposeListener tabDisposeListener DisposeListener widgetDisposed DisposeEvent CTabItem CTabItem CTabItem IPresentablePart getPartForTab removePropertyListener childPropertyChangeListener
private Shell Adapter shell Listener new Shell Adapter public void shell Activated Shell Event event update Gradient  ShellAdapter shellListener ShellAdapter shellActivated ShellEvent updateGradient
public void shell Deactivated Shell Event event update Gradient  shellDeactivated ShellEvent updateGradient
pull Down Button set Tool Tip Text R21 Presentation Messages get String Basic Stack Presentation menu NON NLS 1 pull Down Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e show Pane Menu  pullDownButton setToolTipText R21PresentationMessages getString BasicStackPresentation pullDownButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent showPaneMenu
public R21 Basic Stack Presentation R21 Pane Folder control I Stack Presentation Site stack Site super stack Site pane Folder control tab Folder set Minimize Visible stack Site supports State I Stack Presentation Site STATE MINIMIZED tab Folder set Maximize Visible stack Site supports State I Stack Presentation Site STATE MAXIMIZED title Label new C Label pane Folder get Control SWT SHADOW NONE title Label set Visible false title Label move Above null title Label add Mouse Listener title Mouse Listener title Label add Mouse Listener mouse Listener title Label add Listener SWT Menu Detect menu Listener Presentation Util add Drag Listener title Label drag Listener Color Scheme Service set View Title Font this title Label view Tool Bar new Tool Bar control get Control SWT HORIZONTAL SWT FLAT view Tool Bar move Above null pull Down Button new Tool Item view Tool Bar SWT PUSH Image img Workbench Images get Image I Workbench Graphic Constants IMG LCL VIEW MENU Image hover Image Workbench Images get Image I Workbench Graphic Constants IMG LCL VIEW MENU HOVER pull Down Button set Disabled Image null TODO comment this out PR 1GE56QT Avoid creation of unnecessary image pull Down Button set Image hover Image pull Down Button set Tool Tip Text R21 Presentation Messages get String Basic Stack Presentation menu NON NLS 1 pull Down Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e show Pane Menu listener to switch between visible tab Items pane Folder get Control add Listener SWT Selection selection Listener listener to resize visible components pane Folder get Control add Listener SWT Resize resize Listener listen for mouse down on tab to set focus pane Folder get Control add Mouse Listener mouse Listener pane Folder get Control add Listener SWT Menu Detect menu Listener tab Folder add Button Listener button Listener Presentation Util add Drag Listener pane Folder get Control drag Listener add the shell listener to track shell activations TODO check if workaround can be removed see bug 55458 pane Folder get Control get Shell add Shell Listener shell Listener Uncomment to allow dragging from the title label Presentation Util add Drag Listener title Label new Listener public void handle Event Event event if layout is Trim On Top Point local Pos new Point event x event y get Site drag Start title Label to Display local Pos false Compute the tab height int tab Height view Tool Bar compute Size SWT DEFAULT SWT DEFAULT y Enforce a minimum tab height if tab Height 20 tab Height 20 pane Folder set Tab Height tab Height populate System Menu system Menu Manager  R21BasicStackPresentation R21PaneFolder IStackPresentationSite stackSite stackSite paneFolder tabFolder setMinimizeVisible stackSite supportsState IStackPresentationSite STATE_MINIMIZED tabFolder setMaximizeVisible stackSite supportsState IStackPresentationSite STATE_MAXIMIZED titleLabel CLabel paneFolder getControl SHADOW_NONE titleLabel setVisible titleLabel moveAbove titleLabel addMouseListener titleMouseListener titleLabel addMouseListener mouseListener titleLabel addListener MenuDetect menuListener PresentationUtil addDragListener titleLabel dragListener ColorSchemeService setViewTitleFont titleLabel viewToolBar ToolBar getControl viewToolBar moveAbove pullDownButton ToolItem viewToolBar WorkbenchImages getImage IWorkbenchGraphicConstants IMG_LCL_VIEW_MENU hoverImage WorkbenchImages getImage IWorkbenchGraphicConstants IMG_LCL_VIEW_MENU_HOVER pullDownButton setDisabledImage pullDownButton setImage hoverImage pullDownButton setToolTipText R21PresentationMessages getString BasicStackPresentation pullDownButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent showPaneMenu tabItems paneFolder getControl addListener selectionListener paneFolder getControl addListener resizeListener paneFolder getControl addMouseListener mouseListener paneFolder getControl addListener MenuDetect menuListener tabFolder addButtonListener buttonListener PresentationUtil addDragListener paneFolder getControl dragListener paneFolder getControl getShell addShellListener shellListener PresentationUtil addDragListener titleLabel handleEvent isTrimOnTop localPos getSite dragStart titleLabel toDisplay localPos tabHeight viewToolBar computeSize tabHeight tabHeight paneFolder setTabHeight tabHeight populateSystemMenu systemMenuManager
Return true if code x code is over the label image private boolean over Image int x return x title Label get Image get Bounds width  overImage titleLabel getImage getBounds
param system Menu Manager private void populate System Menu I Menu Manager system Menu Manager system Menu Manager add new Group Marker misc NON NLS 1 system Menu Manager add new Group Marker restore NON NLS 1 system Menu Manager add new Updating Action Contribution Item new System Menu Restore get Site system Menu Manager add new System Menu Move get Site get Pane Name system Menu Manager add new Group Marker size NON NLS 1 system Menu Manager add new Group Marker state NON NLS 1 system Menu Manager add new Updating Action Contribution Item new System Menu Minimize get Site system Menu Manager add new Updating Action Contribution Item new System Menu Maximize get Site system Menu Manager add new Separator close NON NLS 1 system Menu Manager add new Updating Action Contribution Item new System Menu Close get Site get Site add System Actions system Menu Manager  systemMenuManager populateSystemMenu IMenuManager systemMenuManager systemMenuManager GroupMarker systemMenuManager GroupMarker systemMenuManager UpdatingActionContributionItem SystemMenuRestore getSite systemMenuManager SystemMenuMove getSite getPaneName systemMenuManager GroupMarker systemMenuManager GroupMarker systemMenuManager UpdatingActionContributionItem SystemMenuMinimize getSite systemMenuManager UpdatingActionContributionItem SystemMenuMaximize getSite systemMenuManager systemMenuManager UpdatingActionContributionItem SystemMenuClose getSite getSite addSystemActions systemMenuManager
protected String get Pane Name return R21 Presentation Messages get String Basic Stack Presentation pane NON NLS 1  getPaneName R21PresentationMessages getString BasicStackPresentation
Displays the view menu as a popup public void show Pane Menu I Part Menu menu get Part Menu if menu null Rectangle bounds Drag Util get Display Bounds view Tool Bar menu show Menu new Point bounds x bounds y bounds height  showPaneMenu IPartMenu getPartMenu DragUtil getDisplayBounds viewToolBar showMenu
Returns the currently selected part or code null code return the currently selected part or code null code protected I Presentable Part get Current return current  IPresentablePart getCurrent
Returns the index of the tab for the given part or returns tab Folder get Item Count if there is no such tab param part part being searched for return the index of the tab for the given part or the number of tabs if there is no such tab private final int index Of I Presentable Part part if part null return pane Folder get Item Count C Tab Item items pane Folder get Items for int idx 0 idx items length idx I Presentable Part tab Part get Part For Tab items idx if part tab Part return idx return items length  tabFolder getItemCount indexOf IPresentablePart paneFolder getItemCount CTabItem paneFolder getItems IPresentablePart tabPart getPartForTab tabPart
Returns the tab for the given part or null if there is no such tab param part the part being searched for return the tab for the given part or null if there is no such tab protected final C Tab Item get Tab I Presentable Part part C Tab Item items pane Folder get Items int idx index Of part if idx items length return items idx return null  CTabItem getTab IPresentablePart CTabItem paneFolder getItems indexOf
param part param property protected void child Property Changed I Presentable Part part int property C Tab Item tab get Tab part init Tab tab part switch property case I Presentable Part PROP BUSY break case I Presentable Part PROP HIGHLIGHT IF BACK Font Registry registry PlatformUI get Workbench get Theme Manager get Current Theme get Font Registry if get Current equals part Set bold if it does currently have focus tab set Font registry get Bold I Workbench Theme Constants TAB TEXT FONT break case I Presentable Part PROP TOOLBAR case I Presentable Part PROP PANE MENU case I Presentable Part PROP TITLE set Control Size break  childPropertyChanged IPresentablePart CTabItem getTab initTab IPresentablePart PROP_BUSY IPresentablePart PROP_HIGHLIGHT_IF_BACK FontRegistry getWorkbench getThemeManager getCurrentTheme getFontRegistry getCurrent setFont getBold IWorkbenchThemeConstants TAB_TEXT_FONT IPresentablePart PROP_TOOLBAR IPresentablePart PROP_PANE_MENU IPresentablePart PROP_TITLE setControlSize
protected final I Presentable Part get Part For Tab C Tab Item item I Presentable Part part I Presentable Part item get Data TAB DATA return part  IPresentablePart getPartForTab CTabItem IPresentablePart IPresentablePart getData TAB_DATA
Returns the underlying tab folder for this presentation return protected R21 Pane Folder get Pane Folder return pane Folder  R21PaneFolder getPaneFolder paneFolder
Returns true iff the underlying tab folder has been disposed return public boolean is Disposed return pane Folder null pane Folder is Disposed  isDisposed paneFolder paneFolder isDisposed
Update the tab folder s colours to match the current theme settings and active state protected void update Gradient if is Disposed return Color fg Color Color bg Colors int bg Percents boolean vertical false if is Active if get Shell Activated fg Color R21 Colors get System Color SWT COLOR TITLE FOREGROUND bg Colors R21 Colors get Active View Gradient bg Percents R21 Colors get Active View Gradient Percents else fg Color R21 Colors get System Color SWT COLOR TITLE INACTIVE FOREGROUND bg Colors R21 Colors get Deactivated View Gradient bg Percents R21 Colors get Deactivated View Gradient Percents else fg Color R21 Colors get System Color SWT COLOR LIST FOREGROUND bg Colors null bg Percents null draw Gradient fg Color bg Colors bg Percents vertical Color fg Color I Theme current Theme PlatformUI get Workbench get Theme Manager get Current Theme Font Registry font Registry current Theme get Font Registry Color Registry color Registry current Theme get Color Registry Color bg Colors new Color 2 int percent new int 1 boolean vertical if is Active C Tab Item item get Pane Folder get Selection if item null get Part For Tab item is Busy Font tab Font font Registry get I Workbench Theme Constants TAB TEXT FONT item set Font tab Font fg Color color Registry get I Workbench Theme Constants ACTIVE TAB TEXT COLOR bg Colors 0 color Registry get I Workbench Theme Constants ACTIVE TAB BG START bg Colors 1 color Registry get I Workbench Theme Constants ACTIVE TAB BG END percent 0 current Theme get Int I Workbench Theme Constants ACTIVE TAB PERCENT vertical current Theme get Boolean I Workbench Theme Constants ACTIVE TAB VERTICAL else fg Color color Registry get I Workbench Theme Constants INACTIVE TAB TEXT COLOR bg Colors 0 color Registry get I Workbench Theme Constants INACTIVE TAB BG START bg Colors 1 color Registry get I Workbench Theme Constants INACTIVE TAB BG END percent 0 current Theme get Int I Workbench Theme Constants INACTIVE TAB PERCENT vertical current Theme get Boolean I Workbench Theme Constants INACTIVE TAB VERTICAL draw Gradient fg Color bg Colors bg Percents false  updateGradient isDisposed fgColor bgColors bgPercents isActive getShellActivated fgColor R21Colors getSystemColor COLOR_TITLE_FOREGROUND bgColors R21Colors getActiveViewGradient bgPercents R21Colors getActiveViewGradientPercents fgColor R21Colors getSystemColor COLOR_TITLE_INACTIVE_FOREGROUND bgColors R21Colors getDeactivatedViewGradient bgPercents R21Colors getDeactivatedViewGradientPercents fgColor R21Colors getSystemColor COLOR_LIST_FOREGROUND bgColors bgPercents drawGradient fgColor bgColors bgPercents fgColor ITheme currentTheme getWorkbench getThemeManager getCurrentTheme FontRegistry fontRegistry currentTheme getFontRegistry ColorRegistry colorRegistry currentTheme getColorRegistry bgColors isActive CTabItem getPaneFolder getSelection getPartForTab isBusy tabFont fontRegistry IWorkbenchThemeConstants TAB_TEXT_FONT setFont tabFont fgColor colorRegistry IWorkbenchThemeConstants ACTIVE_TAB_TEXT_COLOR bgColors colorRegistry IWorkbenchThemeConstants ACTIVE_TAB_BG_START bgColors colorRegistry IWorkbenchThemeConstants ACTIVE_TAB_BG_END currentTheme getInt IWorkbenchThemeConstants ACTIVE_TAB_PERCENT currentTheme getBoolean IWorkbenchThemeConstants ACTIVE_TAB_VERTICAL fgColor colorRegistry IWorkbenchThemeConstants INACTIVE_TAB_TEXT_COLOR bgColors colorRegistry IWorkbenchThemeConstants INACTIVE_TAB_BG_START bgColors colorRegistry IWorkbenchThemeConstants INACTIVE_TAB_BG_END currentTheme getInt IWorkbenchThemeConstants INACTIVE_TAB_PERCENT currentTheme getBoolean IWorkbenchThemeConstants INACTIVE_TAB_VERTICAL drawGradient fgColor bgColors bgPercents
Draws the applicable gradient on the title area param fg Color param bg Colors param percentages param vertical public void draw Gradient Color fg Color Color bg Colors int percentages boolean vertical pane Folder set Selection Foreground fg Color pane Folder set Selection Background bg Colors percentages vertical if title Label null view Tool Bar null return title Label set Background bg Colors percentages vertical title Label set Foreground fg Color title Label update  fgColor bgColors drawGradient fgColor bgColors paneFolder setSelectionForeground fgColor paneFolder setSelectionBackground bgColors titleLabel viewToolBar titleLabel setBackground bgColors titleLabel setForeground fgColor titleLabel
public boolean is Active return active State  isActive activeState
Set the size of a page in the folder TODO Kim here I had to make this public so that the when the font was updated via the color scheme service it could relayout the presentation calling control get Layout doesn t do the trick public void set Control Size Set up the top right controls List top Right new Array List 3 if current null pane Folder set Top Left title Label title Label set Text current get Title title Label set Image current get Title Image title Label set Visible true Control current Toolbar get Current Toolbar pane Folder set Top Center current Toolbar I Part Menu part Menu get Part Menu if part Menu null pull Down Button set Enabled true else pull Down Button set Enabled false pane Folder set Top Right view Tool Bar view Tool Bar set Visible true pane Folder layout true if current null Rectangle client Area pane Folder get Client Area Rectangle bounds pane Folder get Control get Bounds client Area x bounds x client Area y bounds y current set Bounds client Area  getLayout setControlSize topRight ArrayList paneFolder setTopLeft titleLabel titleLabel setText getTitle titleLabel setImage getTitleImage titleLabel setVisible currentToolbar getCurrentToolbar paneFolder setTopCenter currentToolbar IPartMenu partMenu getPartMenu partMenu pullDownButton setEnabled pullDownButton setEnabled paneFolder setTopRight viewToolBar viewToolBar setVisible paneFolder clientArea paneFolder getClientArea paneFolder getControl getBounds clientArea clientArea setBounds clientArea
Returns the I Part Menu for the currently selected part or null if the current part does not have a menu return the I Part Menu for the currently selected part or null if none protected I Part Menu get Part Menu I Presentable Part part get Current Part if part null return null return part get Menu  IPartMenu IPartMenu IPartMenu getPartMenu IPresentablePart getCurrentPart getMenu
public void dispose if is Disposed return remove shell listener pane Folder get Control get Shell remove Shell Listener shell Listener Presentation Util remove Drag Listener pane Folder get Control drag Listener Presentation Util remove Drag Listener title Label drag Listener system Menu Manager dispose system Menu Manager remove All pane Folder get Control dispose pane Folder null title Label dispose title Label null view Tool Bar dispose  isDisposed paneFolder getControl getShell removeShellListener shellListener PresentationUtil removeDragListener paneFolder getControl dragListener PresentationUtil removeDragListener titleLabel dragListener systemMenuManager systemMenuManager removeAll paneFolder getControl paneFolder titleLabel titleLabel viewToolBar
see org eclipse ui internal skins Presentation set Active boolean public void set Active boolean is Active active State is Active update Gradient  setActive setActive isActive activeState isActive updateGradient
Return whether the window s shell is activated package boolean get Shell Activated Window window get Window if window instanceof Workbench Window return Workbench Window window get Shell Activated else return false  getShellActivated getWindow WorkbenchWindow WorkbenchWindow getShellActivated
Returns the top level window public Window get Window Control ctrl get Control if ctrl null Object data ctrl get Shell get Data if data instanceof Window return Window data return null  getWindow getControl getShell getData
private C Tab Item create Part Tab I Presentable Part part int tab Index C Tab Item tab Item int style SWT NONE if get Site is Closeable part style SWT CLOSE tab Item pane Folder create Item style tab Index tab Item set Data TAB DATA part part add Property Listener child Property Change Listener tab Item add Dispose Listener tab Dispose Listener init Tab tab Item part return tab Item  CTabItem createPartTab IPresentablePart tabIndex CTabItem tabItem getSite isCloseable tabItem paneFolder createItem tabIndex tabItem setData TAB_DATA addPropertyListener childPropertyChangeListener tabItem addDisposeListener tabDisposeListener initTab tabItem tabItem
close Button set Tool Tip Text R21 Presentation Messages get String Basic Stack Presentation close NON NLS 1 close Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e close get Current  closeButton setToolTipText R21PresentationMessages getString BasicStackPresentation closeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent getCurrent
Create a close button in the title bar for the argument part if needed private void update Close Button remove the close button if needed if current null get Site is Closeable current if close Button null close Button dispose close Button null pane Folder flush return a close button is needed so if its already there we re done if close Button null return otherwise create it close Button new Tool Item view Tool Bar SWT PUSH close Button set Disabled Image null close Button set Image Workbench Images get Image I Workbench Graphic Constants IMG LCL CLOSE VIEW HOVER close Button set Tool Tip Text R21 Presentation Messages get String Basic Stack Presentation close NON NLS 1 close Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e close get Current pane Folder flush  updateCloseButton getSite isCloseable closeButton closeButton closeButton paneFolder closeButton closeButton ToolItem viewToolBar closeButton setDisabledImage closeButton setImage WorkbenchImages getImage IWorkbenchGraphicConstants IMG_LCL_CLOSE_VIEW_HOVER closeButton setToolTipText R21PresentationMessages getString BasicStackPresentation closeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent getCurrent paneFolder
Initializes a tab for the given part Sets the text icon tool tip etc This will also be called whenever a relevant property changes in the part to reflect those changes in the tab Subclasses may override to change the appearance of tabs for a particular part param tab Item tab for the part param part the part being displayed protected void init Tab C Tab Item tab Item I Presentable Part part tab Item set Text part get Name tab Item set Image part get Title Image String tool Tip Text part get Title Tool Tip if tool Tip Text equals Util ZERO LENGTH STRING tab Item set Tool Tip Text tool Tip Text Font Registry registry PlatformUI get Workbench get Theme Manager get Current Theme get Font Registry if part is Busy tab Item set Font registry get Italic I Workbench Theme Constants TAB TEXT FONT else tab Item set Font registry get I Workbench Theme Constants TAB TEXT FONT  tabItem initTab CTabItem tabItem IPresentablePart tabItem setText getName tabItem setImage getTitleImage toolTipText getTitleToolTip toolTipText ZERO_LENGTH_STRING tabItem setToolTipText toolTipText FontRegistry getWorkbench getThemeManager getCurrentTheme getFontRegistry isBusy tabItem setFont getItalic IWorkbenchThemeConstants TAB_TEXT_FONT tabItem setFont IWorkbenchThemeConstants TAB_TEXT_FONT
public void add Part I Presentable Part new Part Object cookie int idx if cookie instanceof Integer idx Integer cookie int Value else Select a location for newly inserted parts idx pane Folder get Item Count add Part new Part idx  addPart IPresentablePart newPart intValue paneFolder getItemCount addPart newPart
Adds the given presentable part to this presentation at the given index Does nothing if a tab already exists for the given part param new Part param index public void add Part I Presentable Part new Part int index If we already have a tab for this part do nothing if get Tab new Part null return create Part Tab new Part index set Control Size  newPart addPart IPresentablePart newPart getTab newPart createPartTab newPart setControlSize
public void remove Part I Presentable Part old Part if current old Part current null C Tab Item item get Tab old Part if item null return old Part set Visible false item dispose Layout the folder again in case there is only one item set Control Size  removePart IPresentablePart oldPart oldPart CTabItem getTab oldPart oldPart setVisible setControlSize
public void select Part I Presentable Part to Select if to Select current return if current null current set Visible false current to Select if current null pane Folder set Selection index Of current current set Visible true update Close Button set Control Size  selectPart IPresentablePart toSelect toSelect setVisible toSelect paneFolder setSelection indexOf setVisible updateCloseButton setControlSize
public I Presentable Part get Current Part return current  IPresentablePart getCurrentPart
see org eclipse ui internal skins Presentation set Bounds org eclipse swt graphics Rectangle public void set Bounds Rectangle bounds pane Folder get Control set Bounds bounds set Control Size  setBounds setBounds paneFolder getControl setBounds setControlSize
see org eclipse ui internal skins Presentation compute Minimum Size public Point compute Minimum Size return Geometry get Size pane Folder compute Trim 0 0 0 0  computeMinimumSize computeMinimumSize getSize paneFolder computeTrim
public void set Visible boolean is Visible if current null current set Visible is Visible pane Folder get Control set Visible is Visible  setVisible isVisible setVisible isVisible paneFolder getControl setVisible isVisible
see org eclipse ui internal skins Presentation set State int public void set State int state tab Folder set State state  setState setState tabFolder setState
see org eclipse ui internal skins Presentation get System Menu Manager public I Menu Manager get System Menu Manager return system Menu Manager  getSystemMenuManager IMenuManager getSystemMenuManager systemMenuManager
param point protected void show System Menu Point point Menu a Menu system Menu Manager create Context Menu pane Folder get Control get Parent system Menu Manager update true a Menu set Location point x point y a Menu set Visible true  showSystemMenu aMenu systemMenuManager createContextMenu paneFolder getControl getParent systemMenuManager aMenu setLocation aMenu setVisible
see org eclipse ui internal skins Presentation get Control public Control get Control return pane Folder get Control  getControl getControl paneFolder getControl
public Stack Drop Result drag Over Control current Control Point location Determine which tab we re currently dragging over Point local Pos pane Folder get Control to Control location final C Tab Item tab Under Pointer pane Folder get Item local Pos This drop target only deals with tabs if we re not dragging over a tab exit if tab Under Pointer null return null workaround when left tab is dragged over next int drag Over Index pane Folder index Of tab Under Pointer return new Stack Drop Result Geometry to Display pane Folder get Control tab Under Pointer get Bounds new Integer drag Over Index  StackDropResult dragOver currentControl localPos paneFolder getControl toControl CTabItem tabUnderPointer paneFolder getItem localPos tabUnderPointer dragOverIndex paneFolder indexOf tabUnderPointer StackDropResult toDisplay paneFolder getControl tabUnderPointer getBounds dragOverIndex
Returns the toolbar control for the currently selected part or null if none not all parts have a toolbar return the current toolbar or null if none protected Control get Current Toolbar I Presentable Part part get Current Part if part null return null return part get Tool Bar  getCurrentToolbar IPresentablePart getCurrentPart getToolBar
public void show System Menu I Presentable Part part get Current Part if part null Rectangle bounds Drag Util get Display Bounds pane Folder get Control int idx pane Folder get Selection Index if idx 1 C Tab Item item pane Folder get Item idx Rectangle item Bounds item get Bounds bounds x item Bounds x bounds y item Bounds y Point location new Point bounds x bounds y pane Folder get Tab Height show System Menu location  showSystemMenu IPresentablePart getCurrentPart DragUtil getDisplayBounds paneFolder getControl paneFolder getSelectionIndex CTabItem paneFolder getItem itemBounds getBounds itemBounds itemBounds paneFolder getTabHeight showSystemMenu
public Control get Tab List I Presentable Part part Array List list new Array List if pane Folder get Tab Position SWT BOTTOM if part get Tool Bar null list add part get Tool Bar if part get Control null list add part get Control if get Pane Folder null list add get Pane Folder get Control else if get Pane Folder null list add get Pane Folder get Control if part get Tool Bar null list add part get Tool Bar if part get Control null list add part get Control return Control list to Array new Control list size  getTabList IPresentablePart ArrayList ArrayList paneFolder getTabPosition getToolBar getToolBar getControl getControl getPaneFolder getPaneFolder getControl getPaneFolder getPaneFolder getControl getToolBar getToolBar getControl getControl toArray
protected void show List Shell parent Shell int x int y final R21 Pane Folder tab Folder get Tab Folder int shell Style SWT RESIZE SWT ON TOP SWT NO TRIM int table Style SWT V SCROLL SWT H SCROLL final Basic Stack List editor List new Basic Stack List tab Folder get Control get Shell shell Style table Style editor List set Input this Point size editor List compute Size Hint Rectangle bounds Display get Current get Bounds if x size x bounds width x bounds width size x if y size y bounds height y bounds height size y editor List set Location new Point x y editor List set Visible true editor List set Focus editor List get Table Viewer get Table get Shell add Listener SWT Deactivate new Listener public void handle Event Event event editor List set Visible false  showList parentShell R21PaneFolder tabFolder getTabFolder shellStyle ON_TOP NO_TRIM tableStyle V_SCROLL H_SCROLL BasicStackList editorList BasicStackList tabFolder getControl getShell shellStyle tableStyle editorList setInput editorList computeSizeHint getCurrent getBounds editorList setLocation editorList setVisible editorList setFocus editorList getTableViewer getTable getShell addListener handleEvent editorList setVisible
protected void show List Default Location R21 Pane Folder tab Folder get Pane Folder Shell shell tab Folder get Control get Shell Rectangle client Area tab Folder get Client Area Point location tab Folder get Control get Display map tab Folder get Control null client Area x client Area y show List shell location x location y  showListDefaultLocation R21PaneFolder tabFolder getPaneFolder tabFolder getControl getShell clientArea tabFolder getClientArea tabFolder getControl getDisplay tabFolder getControl clientArea clientArea showList
void set Selection C Tab Item tab Item get Site select Part get Part For Tab tab Item  setSelection CTabItem tabItem getSite selectPart getPartForTab tabItem
void close I Presentable Part presentable Part get Site close new I Presentable Part presentable Part  IPresentablePart presentablePart getSite IPresentablePart presentablePart
Image get Label Image I Presentable Part presentable Part return presentable Part get Title Image  getLabelImage IPresentablePart presentablePart presentablePart getTitleImage
String get Label Text I Presentable Part presentable Part boolean include Path String title presentable Part get Title trim return title  getLabelText IPresentablePart presentablePart includePath presentablePart getTitle
see org eclipse ui presentations Stack Presentation set Active int public void set Active int new State set Active new State AS ACTIVE FOCUS  StackPresentation setActive setActive newState setActive newState AS_ACTIVE_FOCUS

public void handle Event Event event Point local Pos new Point event x event y C Tab Item tab Under Pointer tab Folder get Item local Pos if tab Under Pointer null drag the entire stack if get Site is Stack Moveable get Site drag Start tab Folder to Display local Pos false return I Presentable Part part get Part For Tab tab Under Pointer if get Site is Part Moveable part drag the part get Site drag Start part tab Folder to Display local Pos false  handleEvent localPos CTabItem tabUnderPointer tabFolder getItem localPos tabUnderPointer getSite isStackMoveable getSite dragStart tabFolder toDisplay localPos IPresentablePart getPartForTab tabUnderPointer getSite isPartMoveable getSite dragStart tabFolder toDisplay localPos
public void item Closed C Tab Folder Event e C Tab Item item C Tab Item e item if null item e doit false otherwise tab is auto disposed on return get Site close new I Presentable Part get Part For Tab item  itemClosed CTabFolderEvent CTabItem CTabItem getSite IPresentablePart getPartForTab
public void mouse Down Mouse Event e if e widget instanceof Control Control ctrl Control e widget Point global Pos ctrl to Display new Point e x e y C Tab Item new Item tab Folder get Item tab Folder to Control global Pos if new Item null show menu over icon if e button 1 over Image new Item e x get Site select Part get Part For Tab new Item show System Menu PR 1GDEZ25 If selection will change in mouse up ignore mouse down C Tab Item old Item tab Folder get Selection if new Item old Item return set focus if current null current set Focus  mouseDown MouseEvent globalPos toDisplay CTabItem newItem tabFolder getItem tabFolder toControl globalPos newItem overImage newItem getSite selectPart getPartForTab newItem showSystemMenu CTabItem oldItem tabFolder getSelection newItem oldItem setFocus
public void mouse Double Click Mouse Event e if get Site get State I Stack Presentation Site STATE MAXIMIZED get Site set State I Stack Presentation Site STATE RESTORED else get Site set State I Stack Presentation Site STATE MAXIMIZED  mouseDoubleClick MouseEvent getSite getState IStackPresentationSite STATE_MAXIMIZED getSite setState IStackPresentationSite STATE_RESTORED getSite setState IStackPresentationSite STATE_MAXIMIZED
Return true if code x code is over the tab item image return true if code x code is over the tab item image static boolean over Image C Tab Item item int x Rectangle image Bounds item get Image get Bounds return x item get Bounds x image Bounds x image Bounds width  overImage CTabItem imageBounds getImage getBounds getBounds imageBounds imageBounds
see org eclipse swt widgets Listener handle Event org eclipse swt widgets Event public void handle Event Event event Point pos new Point event x event y show System Menu pos  handleEvent handleEvent showSystemMenu
private Listener selection Listener new Listener public void handle Event Event e I Presentable Part item get Part For Tab C Tab Item e item if item null get Site select Part item  selectionListener handleEvent IPresentablePart getPartForTab CTabItem getSite selectPart
private Listener resize Listener new Listener public void handle Event Event e set Control Size  resizeListener handleEvent setControlSize
public void property Changed Object source int property if source instanceof I Presentable Part I Presentable Part part I Presentable Part source child Property Changed part property  propertyChanged IPresentablePart IPresentablePart IPresentablePart childPropertyChanged
public void widget Disposed Dispose Event e if e widget instanceof C Tab Item C Tab Item item C Tab Item e widget I Presentable Part part get Part For Tab item part remove Property Listener child Property Change Listener  widgetDisposed DisposeEvent CTabItem CTabItem CTabItem IPresentablePart getPartForTab removePropertyListener childPropertyChangeListener
private Shell Adapter shell Listener new Shell Adapter public void shell Activated Shell Event event update Gradient  ShellAdapter shellListener ShellAdapter shellActivated ShellEvent updateGradient
public void shell Deactivated Shell Event event update Gradient  shellDeactivated ShellEvent updateGradient
public void property Change Property Change Event event if I Preference Constants EDITOR TAB POSITION equals event get Property int tab Pos preference Store get Int I Preference Constants EDITOR TAB POSITION get Tab Folder set Tab Position tab Pos  propertyChange PropertyChangeEvent IPreferenceConstants EDITOR_TAB_POSITION getProperty tabPos preferenceStore getInt IPreferenceConstants EDITOR_TAB_POSITION getTabFolder setTabPosition tabPos
public R21 Editor Stack Presentation Composite parent I Stack Presentation Site stack Site super stack Site create the tab folder int tab Pos preference Store get Int I Preference Constants EDITOR TAB POSITION tab Folder new C Tab Folder parent tab Pos SWT BORDER add listener for preference changes preference Store add Property Change Listener preference Listener minimum tab width tab Folder MIN TAB WIDTH preference Store get Int I Preference Constants EDITOR TAB WIDTH prevent close button and scroll buttons from taking focus tab Folder set Tab List new Control 0 enable close button in tab folder tab Folder addC Tab Folder Listener close Listener listener to switch between visible tab Items tab Folder add Listener SWT Selection selection Listener listener to resize visible components tab Folder add Listener SWT Resize resize Listener listen for mouse down on tab to set focus show system menu and maximize restore tab Folder add Mouse Listener mouse Listener the menu tab Folder add Listener SWT Menu Detect menu Listener register drag listener Presentation Util add Drag Listener tab Folder drag Listener add the shell listener to track shell activations TODO check if workaround can be removed see bug 55458 tab Folder get Shell add Shell Listener shell Listener initialize system menu populate System Menu system Menu Manager  R21EditorStackPresentation IStackPresentationSite stackSite stackSite tabPos preferenceStore getInt IPreferenceConstants EDITOR_TAB_POSITION tabFolder CTabFolder tabPos preferenceStore addPropertyChangeListener preferenceListener tabFolder MIN_TAB_WIDTH preferenceStore getInt IPreferenceConstants EDITOR_TAB_WIDTH tabFolder setTabList tabFolder addCTabFolderListener closeListener tabItems tabFolder addListener selectionListener tabFolder addListener resizeListener tabFolder addMouseListener mouseListener tabFolder addListener MenuDetect menuListener PresentationUtil addDragListener tabFolder dragListener tabFolder getShell addShellListener shellListener populateSystemMenu systemMenuManager
Initializes the specified menu manager param menu Manager private void populate System Menu I Menu Manager menu Manager menu Manager add new Group Marker misc NON NLS 1 menu Manager add new Group Marker restore NON NLS 1 menu Manager add new Updating Action Contribution Item new System Menu Restore get Site menu Manager add new System Menu Move get Site get Pane Name menu Manager add new Group Marker size NON NLS 1 menu Manager add new Group Marker state NON NLS 1 system Menu Manager add new Updating Action Contribution Item new System Menu Minimize get Site menu Manager add new Updating Action Contribution Item new System Menu Maximize get Site menu Manager add new Separator close NON NLS 1 menu Manager add new Updating Action Contribution Item new System Menu Close get Site get Site add System Actions menu Manager  menuManager populateSystemMenu IMenuManager menuManager menuManager GroupMarker menuManager GroupMarker menuManager UpdatingActionContributionItem SystemMenuRestore getSite menuManager SystemMenuMove getSite getPaneName menuManager GroupMarker menuManager GroupMarker systemMenuManager UpdatingActionContributionItem SystemMenuMinimize getSite menuManager UpdatingActionContributionItem SystemMenuMaximize getSite menuManager menuManager UpdatingActionContributionItem SystemMenuClose getSite getSite addSystemActions menuManager
Returns the index of the tab for the given part or returns tab Folder get Item Count if there is no such tab param part part being searched for return the index of the tab for the given part or the number of tabs if there is no such tab private final int index Of I Presentable Part part if part null return tab Folder get Item Count C Tab Item items tab Folder get Items for int idx 0 idx items length idx if part get Part For Tab items idx return idx return items length  tabFolder getItemCount indexOf IPresentablePart tabFolder getItemCount CTabItem tabFolder getItems getPartForTab
Returns the tab for the given part or null if there is no such tab param part the part being searched for return the tab for the given part or null if there is no such tab protected final C Tab Item get Tab I Presentable Part part C Tab Item items tab Folder get Items int idx index Of part return idx items length items idx null  CTabItem getTab IPresentablePart CTabItem tabFolder getItems indexOf
param part param property protected void child Property Changed I Presentable Part part int property init Tab get Tab part part  childPropertyChanged IPresentablePart initTab getTab
protected final I Presentable Part get Part For Tab C Tab Item item return I Presentable Part item get Data TAB DATA  IPresentablePart getPartForTab CTabItem IPresentablePart getData TAB_DATA
protected C Tab Folder get Tab Folder return tab Folder  CTabFolder getTabFolder tabFolder
public boolean is Disposed return tab Folder null tab Folder is Disposed  isDisposed tabFolder tabFolder isDisposed
Set the size of a page in the folder private void set Control Size if current null tab Folder null current set Bounds calculate Page Bounds tab Folder  setControlSize tabFolder setBounds calculatePageBounds tabFolder
public static Rectangle calculate Page Bounds C Tab Folder folder if folder null return new Rectangle 0 0 0 0 Rectangle bounds folder get Bounds Rectangle offset folder get Client Area bounds x offset x bounds y offset y bounds width offset width bounds height offset height return bounds  calculatePageBounds CTabFolder getBounds getClientArea
public void dispose if is Disposed return remove shell listener tab Folder get Shell remove Shell Listener shell Listener remove close listener tab Folder removeC Tab Folder Listener close Listener remove drag listener Presentation Util remove Drag Listener tab Folder drag Listener remove preference listener preference Store remove Property Change Listener preference Listener dispose system menu manager system Menu Manager dispose system Menu Manager remove All dispose tab folder tab Folder dispose tab Folder null  isDisposed tabFolder getShell removeShellListener shellListener tabFolder removeCTabFolderListener closeListener PresentationUtil removeDragListener tabFolder dragListener preferenceStore removePropertyChangeListener preferenceListener systemMenuManager systemMenuManager removeAll tabFolder tabFolder
Update the tab folder s colours to match the current theme settings and active state private void update Gradient if is Disposed return Color fg Color Color bg Colors int bg Percents boolean vertical false if active State AS ACTIVE FOCUS if get Shell Activated fg Color R21 Colors get System Color SWT COLOR TITLE FOREGROUND bg Colors R21 Colors get Active Editor Gradient bg Percents R21 Colors get Active Editor Gradient Percents else fg Color R21 Colors get System Color SWT COLOR TITLE INACTIVE FOREGROUND bg Colors R21 Colors get Deactivated Editor Gradient bg Percents R21 Colors get Deactivated Editor Gradient Percents else if active State AS ACTIVE NOFOCUS fg Color R21 Colors get System Color SWT COLOR LIST FOREGROUND bg Colors R21 Colors get Active No Focus Editor Gradient bg Percents R21 Colors get Active No Focus Editor Gradient Percents else fg Color null bg Colors null bg Percents null draw Gradient fg Color bg Colors bg Percents vertical  updateGradient isDisposed fgColor bgColors bgPercents activeState AS_ACTIVE_FOCUS getShellActivated fgColor R21Colors getSystemColor COLOR_TITLE_FOREGROUND bgColors R21Colors getActiveEditorGradient bgPercents R21Colors getActiveEditorGradientPercents fgColor R21Colors getSystemColor COLOR_TITLE_INACTIVE_FOREGROUND bgColors R21Colors getDeactivatedEditorGradient bgPercents R21Colors getDeactivatedEditorGradientPercents activeState AS_ACTIVE_NOFOCUS fgColor R21Colors getSystemColor COLOR_LIST_FOREGROUND bgColors R21Colors getActiveNoFocusEditorGradient bgPercents R21Colors getActiveNoFocusEditorGradientPercents fgColor bgColors bgPercents drawGradient fgColor bgColors bgPercents
Sets the gradient for the selected tab param fg Color param bg Colors param percentages param vertical protected void draw Gradient Color fg Color Color bg Colors int percentages boolean vertical tab Folder set Selection Foreground fg Color tab Folder set Selection Background bg Colors percentages tab Folder update  fgColor bgColors drawGradient fgColor bgColors tabFolder setSelectionForeground fgColor tabFolder setSelectionBackground bgColors tabFolder
Return whether the window s shell is activated package boolean get Shell Activated Window window get Window if window instanceof Workbench Window return Workbench Window window get Shell Activated else return false  getShellActivated getWindow WorkbenchWindow WorkbenchWindow getShellActivated
Returns the top level window public Window get Window Control ctrl get Control if ctrl null Object data ctrl get Shell get Data if data instanceof Window return Window data return null  getWindow getControl getShell getData
Creates the tab item for the specified part param part param tab Index return the tab item for the part private C Tab Item create Part Tab I Presentable Part part int tab Index C Tab Item tab Item new C Tab Item tab Folder SWT NONE tab Index tab Item set Data TAB DATA part part add Property Listener child Property Change Listener tab Item add Dispose Listener tab Dispose Listener init Tab tab Item part return tab Item  tabIndex CTabItem createPartTab IPresentablePart tabIndex CTabItem tabItem CTabItem tabFolder tabIndex tabItem setData TAB_DATA addPropertyListener childPropertyChangeListener tabItem addDisposeListener tabDisposeListener initTab tabItem tabItem
Initializes a tab for the given part Sets the text icon tool tip etc This will also be called whenever a relevant property changes in the part to reflect those changes in the tab Subclasses may override to change the appearance of tabs for a particular part param tab Item tab for the part param part the part being displayed protected void init Tab C Tab Item tab Item I Presentable Part part set tab text and tooltip tab Item set Text get Label Text part true false tab Item set Tool Tip Text get Label Tool Tip Text part set tab image tab Item set Image get Label Image part following code allows a disabled image but the result was distracting didn t see any disabled image Image image get Label Image part boolean use Color Icons false should we use a preference setting if image null image is Disposed normal image tab Item set Image null disabled image if use Color Icons Image disable Image tab Item get Disabled Image if disable Image null disable Image dispose tab Item set Disabled Image null else if image equals tab Item get Image normal image tab Item set Image image disabled image if use Color Icons Image disable Image tab Item get Disabled Image if disable Image null disable Image dispose Display display tab Item get Display disable Image new Image display image SWT IMAGE DISABLE tab Item set Disabled Image disable Image  tabItem initTab CTabItem tabItem IPresentablePart tabItem setText getLabelText tabItem setToolTipText getLabelToolTipText tabItem setImage getLabelImage getLabelImage useColorIcons isDisposed tabItem setImage useColorIcons disableImage tabItem getDisabledImage disableImage disableImage tabItem setDisabledImage tabItem getImage tabItem setImage useColorIcons disableImage tabItem getDisabledImage disableImage disableImage tabItem getDisplay disableImage IMAGE_DISABLE tabItem setDisabledImage disableImage
Returns the label text that should be used for the tab item for the specified part param presentable Part param dirty Left param include Path return a formated label text String get Label Text I Presentable Part presentable Part boolean dirty Left boolean include Path String title presentable Part get Name trim String text title if include Path String title Tooltip presentable Part get Title Tool Tip trim if title Tooltip ends With title title Tooltip title Tooltip substring 0 title Tooltip last Index Of title trim if title Tooltip ends With NON NLS 1 title Tooltip title Tooltip substring 0 title Tooltip last Index Of trim NON NLS 1 if title Tooltip ends With NON NLS 1 title Tooltip title Tooltip substring 0 title Tooltip last Index Of trim NON NLS 1 if title Tooltip length 1 text title Tooltip NON NLS 1 if presentable Part is Dirty if dirty Left text text NON NLS 1 else text text NON NLS 1 return text  presentablePart dirtyLeft includePath getLabelText IPresentablePart presentablePart dirtyLeft includePath presentablePart getName includePath titleTooltip presentablePart getTitleToolTip titleTooltip endsWith titleTooltip titleTooltip titleTooltip lastIndexOf titleTooltip endsWith titleTooltip titleTooltip titleTooltip lastIndexOf titleTooltip endsWith titleTooltip titleTooltip titleTooltip lastIndexOf titleTooltip titleTooltip presentablePart isDirty dirtyLeft
Returns the image used for the tab item param presentable Part return an image Image get Label Image I Presentable Part presentable Part return presentable Part get Title Image  presentablePart getLabelImage IPresentablePart presentablePart presentablePart getTitleImage
Returns the tool tip text used for the tab item param presentable Part return a tool tip text String get Label Tool Tip Text I Presentable Part presentable Part return presentable Part get Title Tool Tip  presentablePart getLabelToolTipText IPresentablePart presentablePart presentablePart getTitleToolTip
public void add Part I Presentable Part new Part Object cookie int idx if cookie instanceof Integer idx Integer cookie int Value else Select a location for newly inserted parts idx tab Folder get Item Count if get Tab new Part null return create Part Tab new Part idx  addPart IPresentablePart newPart intValue tabFolder getItemCount getTab newPart createPartTab newPart
public void remove Part I Presentable Part old Part if current old Part current null C Tab Item item get Tab old Part if item null return old Part set Visible false item dispose  removePart IPresentablePart oldPart oldPart CTabItem getTab oldPart oldPart setVisible
public void select Part I Presentable Part to Select if to Select current return if current null current set Visible false current to Select if current null tab Folder set Selection index Of current current set Visible true set Control Size  selectPart IPresentablePart toSelect toSelect setVisible toSelect tabFolder setSelection indexOf setVisible setControlSize
see org eclipse ui internal skins Presentation set Bounds org eclipse swt graphics Rectangle public void set Bounds Rectangle bounds tab Folder set Bounds bounds set Control Size  setBounds setBounds tabFolder setBounds setControlSize
see org eclipse ui internal skins Presentation compute Minimum Size public Point compute Minimum Size return Geometry get Size tab Folder compute Trim 0 0 0 0  computeMinimumSize computeMinimumSize getSize tabFolder computeTrim
public void set Visible boolean is Visible if current null current set Visible is Visible get Tab Folder set Visible is Visible  setVisible isVisible setVisible isVisible getTabFolder setVisible isVisible
see org eclipse ui internal skins Presentation set State int public void set State int state tab Folder set Minimized state I Presentation Site STATE MINIMIZED tab Folder set Maximized state I Presentation Site STATE MAXIMIZED  setState setState tabFolder setMinimized IPresentationSite STATE_MINIMIZED tabFolder setMaximized IPresentationSite STATE_MAXIMIZED
Returns the system menu manager return the system menu manager public I Menu Manager get System Menu Manager return system Menu Manager  IMenuManager getSystemMenuManager systemMenuManager
Shows the system context menu at the specified location param point protected void show System Menu Point point Menu a Menu system Menu Manager create Context Menu tab Folder get Parent system Menu Manager update true a Menu set Location point x point y a Menu set Visible true  showSystemMenu aMenu systemMenuManager createContextMenu tabFolder getParent systemMenuManager aMenu setLocation aMenu setVisible
see org eclipse ui internal skins Presentation get Control public Control get Control return tab Folder  getControl getControl tabFolder
public Stack Drop Result drag Over Control current Control Point location Determine which tab we re currently dragging over Point local Pos tab Folder to Control location final C Tab Item tab Under Pointer tab Folder get Item local Pos This drop target only deals with tabs if we re not dragging over a tab exit if tab Under Pointer null return null workaround when left tab is dragged over next int drag Over Index tab Folder index Of tab Under Pointer return new Stack Drop Result Geometry to Display tab Folder tab Under Pointer get Bounds new Integer drag Over Index  StackDropResult dragOver currentControl localPos tabFolder toControl CTabItem tabUnderPointer tabFolder getItem localPos tabUnderPointer dragOverIndex tabFolder indexOf tabUnderPointer StackDropResult toDisplay tabFolder tabUnderPointer getBounds dragOverIndex
public void show System Menu if null current switch to the editor C Tab Item item get Tab current get Site select Part get Current Part Rectangle bounds item get Bounds int y bounds height if get Tab Folder get Tab Position SWT BOTTOM y bounds y show System Menu get Tab Folder to Display bounds x y  showSystemMenu CTabItem getTab getSite selectPart getCurrentPart getBounds getTabFolder getTabPosition showSystemMenu getTabFolder toDisplay
public void show Pane Menu I Part Menu menu get Part Menu if null menu C Tab Item tab get Tab get Current Part if null tab null tab get Control Rectangle bounds Drag Util get Display Bounds tab get Control menu show Menu new Point bounds x bounds y bounds height  showPaneMenu IPartMenu getPartMenu CTabItem getTab getCurrentPart getControl DragUtil getDisplayBounds getControl showMenu
Returns the I Part Menu for the currently selected part or null if the current part does not have a menu return the I Part Menu for the currently selected part or null if none protected I Part Menu get Part Menu I Presentable Part part get Current Part if part null return null return part get Menu  IPartMenu IPartMenu IPartMenu getPartMenu IPresentablePart getCurrentPart getMenu
public Control get Tab List I Presentable Part part Array List list new Array List if get Control null list add get Control if part get Tool Bar null list add part get Tool Bar if part get Control null list add part get Control return Control list to Array new Control list size  getTabList IPresentablePart ArrayList ArrayList getControl getControl getToolBar getToolBar getControl getControl toArray
see org eclipse ui presentations Stack Presentation get Current Part public I Presentable Part get Current Part return current  StackPresentation getCurrentPart IPresentablePart getCurrentPart
protected String get Pane Name return R21 Presentation Messages get String Editor Pane move Editor NON NLS 1  getPaneName R21PresentationMessages getString EditorPane moveEditor
see org eclipse ui presentations Stack Presentation set Active int public void set Active int new State active State new State update Gradient  StackPresentation setActive setActive newState activeState newState updateGradient

see org eclipse ui presentations Abstract Presentation Factory public Stack Presentation create Editor Presentation Composite parent I Stack Presentation Site site return new R21 Editor Stack Presentation parent site  AbstractPresentationFactory StackPresentation createEditorPresentation IStackPresentationSite R21EditorStackPresentation
see org eclipse ui presentations Abstract Presentation Factory public Stack Presentation create View Presentation Composite parent I Stack Presentation Site site return new R21 View Stack Presentation parent site  AbstractPresentationFactory StackPresentation createViewPresentation IStackPresentationSite R21ViewStackPresentation
public Stack Presentation create Standalone View Presentation Composite parent I Stack Presentation Site site boolean show Title TODO honour show Title return new R21 View Stack Presentation parent site  StackPresentation createStandaloneViewPresentation IStackPresentationSite showTitle showTitle R21ViewStackPresentation

Dispose all color pre allocated by the workbench private static void dispose Workbench Colors for int i 0 i workbench Colors length i workbench Colors i dispose  disposeWorkbenchColors workbenchColors workbenchColors
Returns the active editor gradient static public Color get Active Editor Gradient return active Editor Gradient  getActiveEditorGradient activeEditorGradient
Returns the active editor gradient end color static public Color get Active Editor Gradient End Color clr Color system Color Map get CLR EDITOR GRAD END Assert is Not Null clr return clr  getActiveEditorGradientEnd systemColorMap CLR_EDITOR_GRAD_END isNotNull
Returns the active editor gradient percents static public int get Active Editor Gradient Percents return active Editor Percentages  getActiveEditorGradientPercents activeEditorPercentages
Returns the active editor gradient start color static public Color get Active Editor Gradient Start Color clr Color system Color Map get CLR EDITOR GRAD START Assert is Not Null clr return clr  getActiveEditorGradientStart systemColorMap CLR_EDITOR_GRAD_START isNotNull
Returns the active no focus editor gradient static public Color get Active No Focus Editor Gradient return active No Focus Editor Gradient  getActiveNoFocusEditorGradient activeNoFocusEditorGradient
Returns the active no focus editor gradient percents static public int get Active No Focus Editor Gradient Percents return active No Focus Editor Percentages  getActiveNoFocusEditorGradientPercents activeNoFocusEditorPercentages
Returns the active gradient for views static public Color get Active View Gradient return active View Gradient  getActiveViewGradient activeViewGradient
Returns the active view gradient end color static public Color get Active View Gradient End Color clr Color system Color Map get CLR VIEW GRAD END Assert is Not Null clr return clr  getActiveViewGradientEnd systemColorMap CLR_VIEW_GRAD_END isNotNull
Returns the active view gradient percents static public int get Active View Gradient Percents return active View Percentages  getActiveViewGradientPercents activeViewPercentages
Returns the active view gradient start color static public Color get Active View Gradient Start Color clr Color system Color Map get CLR VIEW GRAD START Assert is Not Null clr return clr  getActiveViewGradientStart systemColorMap CLR_VIEW_GRAD_START isNotNull
Returns the gradient for editors when the window is deactivated static public Color get Deactivated Editor Gradient return deactivated Editor Gradient  getDeactivatedEditorGradient deactivatedEditorGradient
Returns the editor gradient percents when the window is deactivated static public int get Deactivated Editor Gradient Percents return deactivated Editor Percentages  getDeactivatedEditorGradientPercents deactivatedEditorPercentages
Returns the gradient for views when the window is deactivated static public Color get Deactivated View Gradient return deactivated View Gradient  getDeactivatedViewGradient deactivatedViewGradient
Returns the view gradient percents when the window is deactivated static public int get Deactivated View Gradient Percents return deactivated View Percentages  getDeactivatedViewGradientPercents deactivatedViewPercentages
Returns a color identified by an RGB value static public Color get Color RGB rgb Value Color clr Color color Map get rgb Value if clr null Display disp Display get Default clr new Color disp rgb Value color Map put rgb Value clr return clr  getColor rgbValue colorMap rgbValue getDefault rgbValue colorMap rgbValue
Returns a system color identified by a SWT constant static public Color get System Color int swt Id Integer big Int new Integer swt Id Color clr Color system Color Map get big Int if clr null Display disp Display get Default clr disp get System Color swt Id system Color Map put big Int clr return clr  getSystemColor swtId bigInt swtId systemColorMap bigInt getDefault getSystemColor swtId systemColorMap bigInt
Initialize all colors used in the workbench in case the OS is using a 256 color palette making sure the workbench colors are allocated This list comes from the designers private static void init Workbench Colors Display d if workbench Colors null return workbench Colors new Color Product pallet new Color d 255 255 255 new Color d 255 251 240 new Color d 223 223 191 new Color d 223 191 191 new Color d 192 220 192 new Color d 192 192 192 new Color d 191 191 191 new Color d 191 191 159 new Color d 191 159 191 new Color d 160 160 164 new Color d 159 159 191 new Color d 159 159 159 new Color d 159 159 127 new Color d 159 127 159 new Color d 159 127 127 new Color d 128 128 128 new Color d 127 159 159 new Color d 127 159 127 new Color d 127 127 159 new Color d 127 127 127 new Color d 127 127 95 new Color d 127 95 127 new Color d 127 95 95 new Color d 95 127 127 new Color d 95 127 95 new Color d 95 95 127 new Color d 95 95 95 new Color d 95 95 63 new Color d 95 63 95 new Color d 95 63 63 new Color d 63 95 95 new Color d 63 95 63 new Color d 63 63 95 new Color d 0 0 0 wizban pallet new Color d 195 204 224 new Color d 214 221 235 new Color d 149 168 199 new Color d 128 148 178 new Color d 106 128 158 new Color d 255 255 255 new Color d 0 0 0 new Color d 0 0 0 Perspective new Color d 132 130 132 new Color d 143 141 138 new Color d 171 168 165 Preference Dialog and Title Area Dialog new Color d 230 226 221  initWorkbenchColors workbenchColors workbenchColors PreferenceDialog TitleAreaDialog
Disposes of the colors Ignore all system colors as they do not need to be disposed static public void shutdown if init return dispose Workbench Colors Iterator iter color Map values iterator while iter has Next Color clr Color iter next if clr null clr dispose color Map clear system Color Map clear init false  disposeWorkbenchColors colorMap hasNext colorMap systemColorMap
Initializes the colors static public void startup if init return Initialize the caches first init true color Map new Hash Map 10 system Color Map new Hash Map 10 init Workbench Colors Display get Default Define active view gradient using same OS title gradient colors Color clr1 get System Color SWT COLOR TITLE BACKGROUND Color clr2 get System Color SWT COLOR TITLE BACKGROUND GRADIENT Color clr3 get System Color SWT COLOR WIDGET BACKGROUND system Color Map put CLR VIEW GRAD START clr1 system Color Map put CLR VIEW GRAD END clr3 active View Gradient new Color clr1 clr2 clr3 active View Percentages new int 50 100 Define active editor gradient using same OS title gradient colors system Color Map put CLR EDITOR GRAD START clr1 system Color Map put CLR EDITOR GRAD END null use widget default background active Editor Gradient new Color clr1 clr2 null null active Editor Percentages new int 50 90 100 Define active no focus editor gradient active No Focus Editor Gradient new Color get System Color SWT COLOR LIST BACKGROUND active No Focus Editor Percentages new int 0 Define view gradient for deactivated window using same OS title gradient colors clr1 get System Color SWT COLOR TITLE INACTIVE BACKGROUND clr2 get System Color SWT COLOR TITLE INACTIVE BACKGROUND GRADIENT clr3 get System Color SWT COLOR WIDGET BACKGROUND deactivated View Gradient new Color clr1 clr2 clr3 deactivated View Percentages new int 70 100 Define editor gradient for deactivated window using same OS title gradient colors deactivated Editor Gradient new Color clr1 clr2 null null deactivated Editor Percentages new int 70 95 100 Preload get System Color SWT COLOR WIDGET FOREGROUND get System Color SWT COLOR BLACK  colorMap HashMap systemColorMap HashMap initWorkbenchColors getDefault getSystemColor COLOR_TITLE_BACKGROUND getSystemColor COLOR_TITLE_BACKGROUND_GRADIENT getSystemColor COLOR_WIDGET_BACKGROUND systemColorMap CLR_VIEW_GRAD_START systemColorMap CLR_VIEW_GRAD_END activeViewGradient activeViewPercentages systemColorMap CLR_EDITOR_GRAD_START systemColorMap CLR_EDITOR_GRAD_END activeEditorGradient activeEditorPercentages activeNoFocusEditorGradient getSystemColor COLOR_LIST_BACKGROUND activeNoFocusEditorPercentages getSystemColor COLOR_TITLE_INACTIVE_BACKGROUND getSystemColor COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT getSystemColor COLOR_WIDGET_BACKGROUND deactivatedViewGradient deactivatedViewPercentages deactivatedEditorGradient deactivatedEditorPercentages getSystemColor COLOR_WIDGET_FOREGROUND getSystemColor COLOR_BLACK

Returns the formatted message for the given key in the 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  MessageFormat getString
Returns the resource object with the given key in the 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  getString getString MissingResourceException
Returns the resource object with the given key in the resource bundle If there isn t any value under the given key the default value is returned param key the resource name param def the default value return the string public static String get String String key String def try return bundle get String key catch Missing Resource Exception e return def  getString getString MissingResourceException

The constructor public R21 Presentation Plugin super plugin this try resource Bundle Resource Bundle get Bundle org eclipse ui internal r21presentation R21look Plugin Resources NON NLS 1 catch Missing Resource Exception x resource Bundle null  R21PresentationPlugin resourceBundle ResourceBundle getBundle R21lookPluginResources MissingResourceException resourceBundle
Returns the shared instance public static R21 Presentation Plugin get Default return plugin  R21PresentationPlugin getDefault
Returns the string from the plugin s resource bundle or key if not found public static String get Resource String String key Resource Bundle bundle R21 Presentation Plugin get Default get Resource Bundle try return bundle null bundle get String key key catch Missing Resource Exception e return key  getResourceString ResourceBundle R21PresentationPlugin getDefault getResourceBundle getString MissingResourceException
Returns the plugin s resource bundle public Resource Bundle get Resource Bundle return resource Bundle  ResourceBundle getResourceBundle resourceBundle
see org eclipse core runtime Plugin start org osgi framework Bundle Context public void start Bundle Context context throws Exception super start context R21 Colors startup  BundleContext BundleContext R21Colors
see org eclipse core runtime Plugin stop org osgi framework Bundle Context public void stop Bundle Context context throws Exception super stop context R21 Colors shutdown  BundleContext BundleContext R21Colors

private final I Property Change Listener property Change Listener new I Property Change Listener public void property Change Property Change Event property Change Event if I Preference Constants VIEW TAB POSITION equals property Change Event get Property is Disposed int tab Location preference Store get Int I Preference Constants VIEW TAB POSITION get Pane Folder set Tab Position tab Location else if I Preference Constants SHOW TRADITIONAL STYLE TABS equals property Change Event get Property is Disposed boolean traditional Tab preference Store get Boolean I Preference Constants SHOW TRADITIONAL STYLE TABS set Tab Style traditional Tab  IPropertyChangeListener propertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent propertyChangeEvent IPreferenceConstants VIEW_TAB_POSITION propertyChangeEvent getProperty isDisposed tabLocation preferenceStore getInt IPreferenceConstants VIEW_TAB_POSITION getPaneFolder setTabPosition tabLocation IPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS propertyChangeEvent getProperty isDisposed traditionalTab preferenceStore getBoolean IPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS setTabStyle traditionalTab
private R21 Pane Folder Button Listener show List Listener new R21 Pane Folder Button Listener public void show List C Tab Folder Event event event doit false show List Default Location  R21PaneFolderButtonListener showListListener R21PaneFolderButtonListener showList CTabFolderEvent showListDefaultLocation
public R21 View Stack Presentation Composite parent I Stack Presentation Site new Site super new R21 Pane Folder parent SWT BORDER new Site R21 Pane Folder tab Folder get Pane Folder tab Folder add Button Listener show List Listener preference Store add Property Change Listener property Change Listener int tab Location preference Store get Int I Preference Constants VIEW TAB POSITION tab Folder set Tab Position tab Location set Tab Style preference Store get Boolean I Preference Constants SHOW TRADITIONAL STYLE TABS do not support close box on unselected tabs tab Folder set Unselected Close Visible false do not support icons in unselected tabs tab Folder set Unselected Image Visible false set basic colors Color Scheme Service set Tab Attributes this tab Folder update Gradient  R21ViewStackPresentation IStackPresentationSite newSite R21PaneFolder newSite R21PaneFolder tabFolder getPaneFolder tabFolder addButtonListener showListListener preferenceStore addPropertyChangeListener propertyChangeListener tabLocation preferenceStore getInt IPreferenceConstants VIEW_TAB_POSITION tabFolder setTabPosition tabLocation setTabStyle preferenceStore getBoolean IPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS tabFolder setUnselectedCloseVisible tabFolder setUnselectedImageVisible ColorSchemeService setTabAttributes tabFolder updateGradient
public void set Active boolean is Active super set Active is Active update Gradient  setActive isActive setActive isActive updateGradient
see org eclipse ui presentations Stack Presentation dispose public void dispose preference Store remove Property Change Listener property Change Listener super dispose  StackPresentation preferenceStore removePropertyChangeListener propertyChangeListener
see org eclipse ui internal presentations Default Part Presentation get Part Menu protected String get Pane Name return R21 Presentation Messages get String View Pane move View NON NLS 1  DefaultPartPresentation getPartMenu getPaneName R21PresentationMessages getString ViewPane moveView

Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT TOP see SWT BOTTOM see SWT FLAT see get Style public C Tab Folder Composite parent int style super parent check Style style on Bottom get Style SWT BOTTOM 0 border Color1 new Color get Display border InsideRGB border Color2 new Color get Display border MiddleRGB border Color3 new Color get Display border OutsideRGB tool tip support tip new Shell get Shell SWT ON TOP label new Label tip SWT CENTER Add all listeners Listener listener new Listener public void handle Event Event event switch event type case SWT Dispose on Dispose break case SWT Paint on Paint event break case SWT Resize on Resize break case SWT Mouse Double Click on Mouse Double Click event break case SWT Mouse Down on Mouse Down event break case SWT Mouse Exit on Mouse Exit event break case SWT Mouse Hover on Mouse Hover event break case SWT Mouse Move on Mouse Move event break case SWT Focus In on Focus event break case SWT Focus Out on Focus event break case SWT Key Down on Key Down event break case SWT Traverse on Traverse event break int folder Events new int SWT Dispose SWT Paint SWT Resize SWT Mouse Double Click SWT Mouse Down SWT Mouse Exit SWT Mouse Hover SWT Mouse Move SWT Focus In SWT Focus Out SWT Key Down SWT Traverse for int i 0 i folder Events length i add Listener folder Events i listener create Arrow Bar create Close Bar set Border Visible style SWT BORDER 0 init Accessible  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle CTabFolder checkStyle onBottom getStyle borderColor1 getDisplay borderInsideRGB borderColor2 getDisplay borderMiddleRGB borderColor3 getDisplay borderOutsideRGB getShell ON_TOP handleEvent onDispose onPaint onResize MouseDoubleClick onMouseDoubleClick MouseDown onMouseDown MouseExit onMouseExit MouseHover onMouseHover MouseMove onMouseMove FocusIn onFocus FocusOut onFocus KeyDown onKeyDown onTraverse folderEvents MouseDoubleClick MouseDown MouseExit MouseHover MouseMove FocusIn FocusOut KeyDown folderEvents addListener folderEvents createArrowBar createCloseBar setBorderVisible initAccessible
private static int check Style int style int mask SWT TOP SWT BOTTOM SWT FLAT SWT LEFT TO RIGHT SWT RIGHT TO LEFT style style mask TOP and BOTTOM are mutually exlusive TOP is the default if style SWT TOP 0 style style SWT TOP SWT BOTTOM SWT TOP reduce the flash by not redrawing the entire area on a Resize event style SWT NO REDRAW RESIZE return style  checkStyle LEFT_TO_RIGHT RIGHT_TO_LEFT NO_REDRAW_RESIZE
Adds the listener to receive events p param listener the listener exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li li ERROR WIDGET DISPOSED when the widget has been disposed li li ERROR NULL ARGUMENT when listener is null li ul public void add Selection Listener Selection Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT Typed Listener typed Listener new Typed Listener listener add Listener SWT Selection typed Listener add Listener SWT Default Selection typed Listener  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED ERROR_NULL_ARGUMENT addSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT TypedListener typedListener TypedListener addListener typedListener addListener DefaultSelection typedListener
Adds the listener to the collection of listeners who will be notified when a tab item is closed param listener the listener which should be notified exception Illegal Argument 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 li ERROR NULL ARGUMENT if the listener is null li ul see C Tab Folder Listener see removeC Tab Folder Listener public void addC Tab Folder Listener C Tab Folder Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT add to array C Tab Folder Listener new Tab Listeners new C Tab Folder Listener tab Listeners length 1 System arraycopy tab Listeners 0 new Tab Listeners 0 tab Listeners length tab Listeners new Tab Listeners tab Listeners tab Listeners length 1 listener show Close true set Button Bounds  IllegalArgumentException ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED ERROR_NULL_ARGUMENT CTabFolderListener removeCTabFolderListener addCTabFolderListener CTabFolderListener checkWidget ERROR_NULL_ARGUMENT CTabFolderListener newTabListeners CTabFolderListener tabListeners tabListeners newTabListeners tabListeners tabListeners newTabListeners tabListeners tabListeners showClose setButtonBounds
private void close Notify C Tab Item item int time if item null return C Tab Folder Event event new C Tab Folder Event this event widget this event time time event item item event doit true if tab Listeners null for int i 0 i tab Listeners length i tab Listeners i item Closed event if event doit item dispose  closeNotify CTabItem CTabFolderEvent CTabFolderEvent tabListeners tabListeners tabListeners itemClosed
public Point compute Size int w Hint int h Hint boolean changed check Widget int min Width 0 int min Height 0 preferred width of tab area to show all tabs GC gc new GC this for int i 0 i items length i min Width items i preferred Width gc gc dispose preferred size of controls in tab items for int i 0 i items length i Control control items i get Control if control null control is Disposed Point size control compute Size w Hint h Hint min Width Math max min Width size x min Height Math max min Height size y if min Width 0 min Width DEFAULT WIDTH if min Height 0 min Height DEFAULT HEIGHT if w Hint SWT DEFAULT min Width w Hint if h Hint SWT DEFAULT min Height h Hint Rectangle trim compute Trim 0 0 min Width min Height return new Point trim width trim height  computeSize wHint hHint checkWidget minWidth minHeight minWidth preferredWidth getControl isDisposed computeSize wHint hHint minWidth minWidth minHeight minHeight minWidth minWidth DEFAULT_WIDTH minHeight minHeight DEFAULT_HEIGHT wHint minWidth wHint hHint minHeight hHint computeTrim minWidth minHeight
public Rectangle compute Trim int x int y int width int height check Widget if items length 0 if show Borders return new Rectangle x y width height int trimX x border Right 1 int trimY y border Bottom 1 int trim Width width border Right 2 int trim Height height border Bottom 2 return new Rectangle trimX trimY trim Width trim Height else int trimX x margin Width border Left int trimY y margin Height tab Height border Top 1 1 is for the line at the bottom of the tabs if on Bottom trimY y margin Height border Top int trim Width width border Left border Right 2 margin Width int trim Height height border Top border Bottom 2 margin Height tab Height 1 return new Rectangle trimX trimY trim Width trim Height  computeTrim checkWidget showBorders borderRight borderBottom trimWidth borderRight trimHeight borderBottom trimWidth trimHeight marginWidth borderLeft marginHeight tabHeight borderTop onBottom marginHeight borderTop trimWidth borderLeft borderRight marginWidth trimHeight borderTop borderBottom marginHeight tabHeight trimWidth trimHeight
Create the specified item at index void create Item C Tab Item item int index if 0 index index get Item Count SWT error SWT ERROR INVALID RANGE grow by one and rearrange the array C Tab Item new Items new C Tab Item items length 1 System arraycopy items 0 new Items 0 index new Items index item System arraycopy items index new Items index 1 items length index items new Items item parent this if selected Index index selected Index if items length 1 top Tab Index 0 reset Tab Size true else set Item Bounds show Item item if items length 1 redraw else redraw Tab Area 1  createItem CTabItem getItemCount ERROR_INVALID_RANGE CTabItem newItems CTabItem newItems newItems newItems newItems selectedIndex selectedIndex topTabIndex resetTabSize setItemBounds showItem redrawTabArea
scroll Left add Listener SWT Selection new Listener public void handle Event Event event scroll scrollLeft  scrollLeft addListener handleEvent scroll_scrollLeft
scroll Right add Listener SWT Selection new Listener public void handle Event Event event scroll scrollRight  scrollRight addListener handleEvent scroll_scrollRight
private void create Arrow Bar create arrow buttons for scrolling arrow Bar new Tool Bar this SWT FLAT arrow Bar set Visible false arrow Bar set Background background Tool Item scroll Left new Tool Item arrow Bar SWT PUSH scroll Left set Enabled false Tool Item scroll Right new Tool Item arrow Bar SWT PUSH scroll Right set Enabled false scroll Left add Listener SWT Selection new Listener public void handle Event Event event scroll scrollLeft scroll Right add Listener SWT Selection new Listener public void handle Event Event event scroll scrollRight  createArrowBar arrowBar ToolBar arrowBar setVisible arrowBar setBackground ToolItem scrollLeft ToolItem arrowBar scrollLeft setEnabled ToolItem scrollRight ToolItem arrowBar scrollRight setEnabled scrollLeft addListener handleEvent scroll_scrollLeft scrollRight addListener handleEvent scroll_scrollRight
close Item add Listener SWT Selection new Listener public void handle Event Event event close Notify get Selection event time  closeItem addListener handleEvent closeNotify getSelection
inactive Close Item add Listener SWT Selection new Listener public void handle Event Event event close Notify inactive Item event time inactive Close Bar set Visible false inactive Item null  inactiveCloseItem addListener handleEvent closeNotify inactiveItem inactiveCloseBar setVisible inactiveItem
inactive Close Bar add Listener SWT Mouse Exit new Listener public void handle Event Event event if inactive Item null Rectangle item Bounds inactive Item get Bounds if item Bounds contains event x event y return inactive Close Bar set Visible false inactive Item null  inactiveCloseBar addListener MouseExit handleEvent inactiveItem itemBounds inactiveItem getBounds itemBounds inactiveCloseBar setVisible inactiveItem
private void create Close Bar close Bar new Tool Bar this SWT FLAT close Bar set Visible false if gradient Colors null gradient Colors length 0 close Bar set Background gradient Colors gradient Colors length 1 else close Bar set Background background Tool Item close Item new Tool Item close Bar SWT PUSH inactive Close Bar new Tool Bar this SWT FLAT inactive Close Bar set Visible false inactive Close Bar set Background background Tool Item inactive Close Item new Tool Item inactive Close Bar SWT PUSH close Item add Listener SWT Selection new Listener public void handle Event Event event close Notify get Selection event time inactive Close Item add Listener SWT Selection new Listener public void handle Event Event event close Notify inactive Item event time inactive Close Bar set Visible false inactive Item null inactive Close Bar add Listener SWT Mouse Exit new Listener public void handle Event Event event if inactive Item null Rectangle item Bounds inactive Item get Bounds if item Bounds contains event x event y return inactive Close Bar set Visible false inactive Item null  createCloseBar closeBar ToolBar closeBar setVisible gradientColors gradientColors closeBar setBackground gradientColors gradientColors closeBar setBackground ToolItem closeItem ToolItem closeBar inactiveCloseBar ToolBar inactiveCloseBar setVisible inactiveCloseBar setBackground ToolItem inactiveCloseItem ToolItem inactiveCloseBar closeItem addListener handleEvent closeNotify getSelection inactiveCloseItem addListener handleEvent closeNotify inactiveItem inactiveCloseBar setVisible inactiveItem inactiveCloseBar addListener MouseExit handleEvent inactiveItem itemBounds inactiveItem getBounds itemBounds inactiveCloseBar setVisible inactiveItem
Destroy the specified item void destroy Item C Tab Item item if in Dispose return int index index Of item if index 1 return should this trigger an error insertion Index 2 if items length 1 items new C Tab Item 0 selected Index 1 top Tab Index 0 Control control item get Control if control null control is Disposed control set Visible false close Bar set Visible false if fixed Tab Height tab Height 0 redraw return shrink by one and rearrange the array C Tab Item new Items new C Tab Item items length 1 System arraycopy items 0 new Items 0 index System arraycopy items index 1 new Items index items length index 1 items new Items if top Tab Index items length top Tab Index move the selection if this item is selected if selected Index index Control control item get Control if control null control is Disposed control set Visible false selected Index 1 set Selection Math max 0 index 1 true else if selected Index index selected Index set Item Bounds redraw Tab Area 1  destroyItem CTabItem inDispose indexOf insertionIndex CTabItem selectedIndex topTabIndex getControl isDisposed setVisible closeBar setVisible fixedTabHeight tabHeight CTabItem newItems CTabItem newItems newItems newItems topTabIndex topTabIndex selectedIndex getControl isDisposed setVisible selectedIndex setSelection selectedIndex selectedIndex setItemBounds redrawTabArea
private void on Key Down Event e if e key Code SWT ARROW LEFT e key Code SWT ARROW RIGHT return int lead Key get Style SWT MIRRORED 0 SWT ARROW RIGHT SWT ARROW LEFT if e key Code lead Key if selected Index 0 set Selection selected Index 1 true else if selected Index items length 1 set Selection selected Index 1 true  onKeyDown keyCode ARROW_LEFT keyCode ARROW_RIGHT leadKey getStyle ARROW_RIGHT ARROW_LEFT keyCode leadKey selectedIndex setSelection selectedIndex selectedIndex setSelection selectedIndex
Dispose the items of the receiver private void on Dispose Usually when an item is disposed destroy Item will change the size of the items array reset the bounds of all the tabs and manage the widget associated with the tab Since the whole folder is being disposed this is not necessary For speed the in Dispose flag is used to skip over this part of the item dispose in Dispose true int length items length for int i 0 i length i if items i null items i dispose clean up resources if tip null tip is Disposed tip dispose tip null label null if arrow Left Image null arrow Left Image dispose arrow Left Image null if arrow Right Image null arrow Right Image dispose arrow Right Image null if close Image null close Image dispose close Image null gradient Colors null gradient Percents null background Image null if border Color1 null border Color1 dispose border Color1 null if border Color2 null border Color2 dispose border Color2 null if border Color3 null border Color3 dispose border Color3 null  onDispose destroyItem inDispose inDispose isDisposed arrowLeftImage arrowLeftImage arrowLeftImage arrowRightImage arrowRightImage arrowRightImage closeImage closeImage closeImage gradientColors gradientPercents backgroundImage borderColor1 borderColor1 borderColor1 borderColor2 borderColor2 borderColor2 borderColor3 borderColor3 borderColor3
private void on Focus Event e check Widget if selected Index 0 redraw Tab Area selected Index else set Selection 0 true  onFocus checkWidget selectedIndex redrawTabArea selectedIndex setSelection
Draw a border around the receiver private void draw Border GC gc Rectangle d super get Client Area if show Borders if get Style SWT FLAT 0 gc set Foreground border Color1 gc draw Rectangle d x d y d x d width 1 d y d height 1 else gc set Foreground border Color1 gc draw Rectangle d x d y d x d width 3 d y d height 3 gc set Foreground border Color2 gc draw Line d x 1 d y d height 2 d x d width 1 d y d height 2 gc draw Line d x d width 2 d y 1 d x d width 2 d y d height 1 gc set Foreground border Color3 gc draw Line d x 2 d y d height 1 d x d width 2 d y d height 1 gc draw Line d x d width 1 d y 2 d x d width 1 d y d height 2 fill in corners with parent s background gc set Foreground get Parent get Background gc draw Line d x d width 2 d y d x d width 1 d y gc draw Line d x d width 1 d y 1 d x d width 1 d y 1 gc draw Line d x d y d height 2 d x d y d height 2 gc draw Line d x d y d height 1 d x 1 d y d height 1 gc draw Line d x d width 1 d y d height 1 d x d width 1 d y d height 1 draw a separator line if items length 0 int lineY d y border Top tab Height if on Bottom lineY d y d height border Bottom tab Height 1 gc set Foreground border Color1 gc draw Line d x border Left lineY d x d width border Right lineY gc set Foreground get Foreground  drawBorder getClientArea showBorders getStyle setForeground borderColor1 drawRectangle setForeground borderColor1 drawRectangle setForeground borderColor2 drawLine drawLine setForeground borderColor3 drawLine drawLine setForeground getParent getBackground drawLine drawLine drawLine drawLine drawLine borderTop tabHeight onBottom borderBottom tabHeight setForeground borderColor1 drawLine borderLeft borderRight setForeground getForeground
public Rectangle get Client Area check Widget Point size get Size if items length 0 if show Borders return super get Client Area int width size x border Right 2 int height size y border Bottom 2 return new Rectangle border Right 1 border Bottom 1 width height else int width size x 2 margin Width border Left border Right int height size y 2 margin Height border Top border Bottom tab Height 1 return new Rectangle x Client y Client width height  getClientArea checkWidget getSize showBorders getClientArea borderRight borderBottom borderRight borderBottom marginWidth borderLeft borderRight marginHeight borderTop borderBottom tabHeight xClient yClient
Returns the height of the tab return the height of the tab exception SWT Error 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 int get Tab Height check Widget return tab Height  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED getTabHeight checkWidget tabHeight
Return the tab that is located at the specified index return the item at the specified index public C Tab Item get Item int index check Widget if index 0 index items length SWT error SWT ERROR INVALID RANGE return items index  CTabItem getItem checkWidget ERROR_INVALID_RANGE
Gets the item at a point in the widget p return the item at a point public C Tab Item get Item Point pt check Widget if items length 0 return null int last Item get Last Item last Item Math min items length 1 last Item 1 for int i top Tab Index i last Item i Rectangle bounds items i get Bounds if bounds contains pt return items i return null  CTabItem getItem checkWidget lastItem getLastItem lastItem lastItem topTabIndex lastItem getBounds
Return the number of tabs in the folder return the number of tabs in the folder public int get Item Count check Widget return items length  getItemCount checkWidget
Return the tab items return the tab items public C Tab Item get Items check Widget C Tab Item tab Items new C Tab Item items length System arraycopy items 0 tab Items 0 items length return tab Items  CTabItem getItems checkWidget CTabItem tabItems CTabItem tabItems tabItems
private int get Last Item if items length 0 return 1 Rectangle area get Client Area if area width 0 return 0 Rectangle toolspace get Tool Space if toolspace width 0 return items length 1 int width area width toolspace width int index top Tab Index int tab Width items index width while index items length 1 tab Width items index 1 width if tab Width width break index return index  getLastItem getClientArea getToolSpace topTabIndex tabWidth tabWidth tabWidth
Return the selected tab item or an empty array if there is no selection return the selected tab item public C Tab Item get Selection check Widget if selected Index 1 return null return items selected Index  CTabItem getSelection checkWidget selectedIndex selectedIndex
Return the index of the selected tab item or 1 if there is no selection return the index of the selected tab item or 1 public int get Selection Index check Widget return selected Index  getSelectionIndex checkWidget selectedIndex
private Rectangle get Tool Space boolean show Arrows scroll leftVisible scroll rightVisible if show Arrows top Right null return new Rectangle 0 0 0 0 Rectangle toolspace if show Arrows toolspace arrow Bar get Bounds toolspace width border Right if top Right null toolspace width top Right get Size x else toolspace top Right get Bounds toolspace width border Right return toolspace  getToolSpace showArrows scroll_leftVisible scroll_rightVisible showArrows topRight showArrows arrowBar getBounds borderRight topRight topRight getSize topRight getBounds borderRight
Returns the control in the top right corner of the tab folder Typically this is a close button or a composite with a menu and close button since 2 1 return the control in the top right corner of the tab folder or null exception SWT Error 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 Control get Top Right check Widget return top Right  SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED getTopRight checkWidget topRight
Return the index of the specified tab or 1 if the tab is not in the receiver return the index of the specified tab item or 1 exception SWT Error ul li ERROR NULL ARGUMENT when the item is null li ul public int index Of C Tab Item item check Widget if item null SWT error SWT ERROR NULL ARGUMENT for int i 0 i items length i if items i item return i return 1  SWTError ERROR_NULL_ARGUMENT indexOf CTabItem checkWidget ERROR_NULL_ARGUMENT
accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e String name null int childID e childID if childID 0 childID items length name items childID get Text int index name index Of if index 0 name name substring 0 index name substring index 1 e result name  addAccessibleListener AccessibleAdapter getName AccessibleEvent getText indexOf
public void get Help Accessible Event e String help null int childID e childID if childID ACC CHILDID SELF help get Tool Tip Text else if childID 0 childID items length help items childID get Tool Tip Text e result help  getHelp AccessibleEvent CHILDID_SELF getToolTipText getToolTipText
public void get Keyboard Shortcut Accessible Event e String shortcut null int childID e childID if childID 0 childID items length String text items childID get Text if text null char mnemonic get Mnemonic text if mnemonic 0 shortcut Alt mnemonic NON NLS 1 e result shortcut  getKeyboardShortcut AccessibleEvent getText getMnemonic
accessible add Accessible Control Listener new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point test Point to Control new Point e x e y int childID ACC CHILDID NONE for int i 0 i items length i if items i get Bounds contains test Point childID i break if childID ACC CHILDID NONE Rectangle location get Bounds location height location height get Client Area height if location contains test Point childID ACC CHILDID SELF e childID childID  addAccessibleControlListener AccessibleControlAdapter getChildAtPoint AccessibleControlEvent testPoint toControl CHILDID_NONE getBounds testPoint CHILDID_NONE getBounds getClientArea testPoint CHILDID_SELF
public void get Location Accessible Control Event e Rectangle location null int childID e childID if childID ACC CHILDID SELF location get Bounds if childID 0 childID items length location items childID get Bounds if location null Point pt to Display new Point location x location y e x pt x e y pt y e width location width e height location height  getLocation AccessibleControlEvent CHILDID_SELF getBounds getBounds toDisplay
public void get Child Count Accessible Control Event e e detail items length  getChildCount AccessibleControlEvent
public void get Default Action Accessible Control Event e String action null int childID e childID if childID 0 childID items length action Switch NON NLS 1 e result action  getDefaultAction AccessibleControlEvent
public void get Focus Accessible Control Event e int childID ACC CHILDID NONE if is Focus Control if selected Index 1 childID ACC CHILDID SELF else childID selected Index e childID childID  getFocus AccessibleControlEvent CHILDID_NONE isFocusControl selectedIndex CHILDID_SELF selectedIndex
public void get Role Accessible Control Event e int role 0 int childID e childID if childID ACC CHILDID SELF role ACC ROLE TABFOLDER else if childID 0 childID items length role ACC ROLE TABITEM e detail role  getRole AccessibleControlEvent CHILDID_SELF ROLE_TABFOLDER ROLE_TABITEM
public void get Selection Accessible Control Event e e childID selected Index 1 ACC CHILDID NONE selected Index  getSelection AccessibleControlEvent selectedIndex CHILDID_NONE selectedIndex
public void get State Accessible Control Event e int state 0 int childID e childID if childID ACC CHILDID SELF state ACC STATE NORMAL else if childID 0 childID items length state ACC STATE SELECTABLE if is Focus Control state ACC STATE FOCUSABLE if selected Index childID state ACC STATE SELECTED if is Focus Control state ACC STATE FOCUSED e detail state  getState AccessibleControlEvent CHILDID_SELF STATE_NORMAL STATE_SELECTABLE isFocusControl STATE_FOCUSABLE selectedIndex STATE_SELECTED isFocusControl STATE_FOCUSED
public void get Children Accessible Control Event e Object children new Object items length for int i 0 i items length i children i new Integer i e children children  getChildren AccessibleControlEvent
add Listener SWT Selection new Listener public void handle Event Event event if is Focus Control if selected Index 1 accessible set Focus ACC CHILDID SELF else accessible set Focus selected Index  addListener handleEvent isFocusControl selectedIndex setFocus CHILDID_SELF setFocus selectedIndex
add Listener SWT Focus In new Listener public void handle Event Event event if selected Index 1 accessible set Focus ACC CHILDID SELF else accessible set Focus selected Index  addListener FocusIn handleEvent selectedIndex setFocus CHILDID_SELF setFocus selectedIndex
private void init Accessible final Accessible accessible get Accessible accessible add Accessible Listener new Accessible Adapter public void get Name Accessible Event e String name null int childID e childID if childID 0 childID items length name items childID get Text int index name index Of if index 0 name name substring 0 index name substring index 1 e result name public void get Help Accessible Event e String help null int childID e childID if childID ACC CHILDID SELF help get Tool Tip Text else if childID 0 childID items length help items childID get Tool Tip Text e result help public void get Keyboard Shortcut Accessible Event e String shortcut null int childID e childID if childID 0 childID items length String text items childID get Text if text null char mnemonic get Mnemonic text if mnemonic 0 shortcut Alt mnemonic NON NLS 1 e result shortcut accessible add Accessible Control Listener new Accessible Control Adapter public void get Child At Point Accessible Control Event e Point test Point to Control new Point e x e y int childID ACC CHILDID NONE for int i 0 i items length i if items i get Bounds contains test Point childID i break if childID ACC CHILDID NONE Rectangle location get Bounds location height location height get Client Area height if location contains test Point childID ACC CHILDID SELF e childID childID public void get Location Accessible Control Event e Rectangle location null int childID e childID if childID ACC CHILDID SELF location get Bounds if childID 0 childID items length location items childID get Bounds if location null Point pt to Display new Point location x location y e x pt x e y pt y e width location width e height location height public void get Child Count Accessible Control Event e e detail items length public void get Default Action Accessible Control Event e String action null int childID e childID if childID 0 childID items length action Switch NON NLS 1 e result action public void get Focus Accessible Control Event e int childID ACC CHILDID NONE if is Focus Control if selected Index 1 childID ACC CHILDID SELF else childID selected Index e childID childID public void get Role Accessible Control Event e int role 0 int childID e childID if childID ACC CHILDID SELF role ACC ROLE TABFOLDER else if childID 0 childID items length role ACC ROLE TABITEM e detail role public void get Selection Accessible Control Event e e childID selected Index 1 ACC CHILDID NONE selected Index public void get State Accessible Control Event e int state 0 int childID e childID if childID ACC CHILDID SELF state ACC STATE NORMAL else if childID 0 childID items length state ACC STATE SELECTABLE if is Focus Control state ACC STATE FOCUSABLE if selected Index childID state ACC STATE SELECTED if is Focus Control state ACC STATE FOCUSED e detail state public void get Children Accessible Control Event e Object children new Object items length for int i 0 i items length i children i new Integer i e children children add Listener SWT Selection new Listener public void handle Event Event event if is Focus Control if selected Index 1 accessible set Focus ACC CHILDID SELF else accessible set Focus selected Index add Listener SWT Focus In new Listener public void handle Event Event event if selected Index 1 accessible set Focus ACC CHILDID SELF else accessible set Focus selected Index  initAccessible getAccessible addAccessibleListener AccessibleAdapter getName AccessibleEvent getText indexOf getHelp AccessibleEvent CHILDID_SELF getToolTipText getToolTipText getKeyboardShortcut AccessibleEvent getText getMnemonic addAccessibleControlListener AccessibleControlAdapter getChildAtPoint AccessibleControlEvent testPoint toControl CHILDID_NONE getBounds testPoint CHILDID_NONE getBounds getClientArea testPoint CHILDID_SELF getLocation AccessibleControlEvent CHILDID_SELF getBounds getBounds toDisplay getChildCount AccessibleControlEvent getDefaultAction AccessibleControlEvent getFocus AccessibleControlEvent CHILDID_NONE isFocusControl selectedIndex CHILDID_SELF selectedIndex getRole AccessibleControlEvent CHILDID_SELF ROLE_TABFOLDER ROLE_TABITEM getSelection AccessibleControlEvent selectedIndex CHILDID_NONE selectedIndex getState AccessibleControlEvent CHILDID_SELF STATE_NORMAL STATE_SELECTABLE isFocusControl STATE_FOCUSABLE selectedIndex STATE_SELECTED isFocusControl STATE_FOCUSED getChildren AccessibleControlEvent addListener handleEvent isFocusControl selectedIndex setFocus CHILDID_SELF setFocus selectedIndex addListener FocusIn handleEvent selectedIndex setFocus CHILDID_SELF setFocus selectedIndex
private void set Button Bounds update Arrow Bar update Close Bar Rectangle area super get Client Area int offset 0 if top Right null Point size top Right compute Size SWT DEFAULT tab Height int x area x area width border Right size x int y on Bottom area y area height border Bottom size y area y border Top top Right set Bounds x y size x size y offset size x boolean left Visible scroll leftVisible boolean right Visible scroll rightVisible if left Visible right Visible Point size arrow Bar compute Size SWT DEFAULT tab Height int x area x area width border Right size x offset int y on Bottom area y area height border Bottom size y area y border Top arrow Bar set Bounds x y size x size y Tool Item items arrow Bar get Items items 0 set Enabled left Visible items 1 set Enabled right Visible arrow Bar set Visible true else arrow Bar set Visible false When the close button is right at the edge of the Tab folder hide it because otherwise it may block off a part of the border on the right if show Close inactive Close Bar set Visible false C Tab Item item get Selection if item null close Bar set Visible false else int toolbar Height tab Height C Tab Item TOP MARGIN C Tab Item BOTTOM MARGIN 2 2 to ignore gap between focus rectangle Point size close Bar compute Size SWT DEFAULT toolbar Height int x item x item width size x 2 2 to not overlap focus rectangle and trim int y item y Math max 0 item height toolbar Height 2 close Bar set Bounds x y size x toolbar Height Rectangle toolspace get Tool Space Point folder Size get Size boolean visible toolspace width 0 x toolspace x x size x folder Size x border Right close Bar set Visible visible  setButtonBounds updateArrowBar updateCloseBar getClientArea topRight topRight computeSize tabHeight borderRight onBottom borderBottom borderTop topRight setBounds leftVisible scroll_leftVisible rightVisible scroll_rightVisible leftVisible rightVisible arrowBar computeSize tabHeight borderRight onBottom borderBottom borderTop arrowBar setBounds ToolItem arrowBar getItems setEnabled leftVisible setEnabled rightVisible arrowBar setVisible arrowBar setVisible showClose inactiveCloseBar setVisible CTabItem getSelection closeBar setVisible toolbarHeight tabHeight CTabItem TOP_MARGIN CTabItem BOTTOM_MARGIN closeBar computeSize toolbarHeight toolbarHeight closeBar setBounds toolbarHeight getToolSpace folderSize getSize folderSize borderRight closeBar setVisible
private boolean set Item Location if items length 0 return false Rectangle area super get Client Area int x area x int y area y border Top if on Bottom y Math max 0 area y area height border Bottom tab Height boolean changed false for int i top Tab Index 1 i 0 i if the first visible tab is not the first tab C Tab Item tab items i x tab width if changed tab x x tab y y changed true layout tab items from right to left thus making them invisible tab x x tab y y x area x border Left for int i top Tab Index i items length i continue laying out remaining visible items left to right C Tab Item tab items i tab x x tab y y x x tab width set Button Bounds return changed  setItemLocation getClientArea borderTop onBottom borderBottom tabHeight topTabIndex CTabItem borderLeft topTabIndex CTabItem setButtonBounds
private void set Last Item int index if index 0 index items length 1 return Rectangle area get Client Area if area width 0 return int max Width area width Rectangle toolspace get Tool Space if toolspace width 0 max Width toolspace width int tab Width items index width while index 0 tab Width items index 1 width if tab Width max Width break index top Tab Index index set Item Location redraw Tab Area 1  setLastItem getClientArea maxWidth getToolSpace maxWidth tabWidth tabWidth tabWidth maxWidth topTabIndex setItemLocation redrawTabArea
Layout the items and store the client area size boolean set Item Bounds boolean changed false if is Disposed return changed Rectangle area super get Client Area x Client area x border Left margin Width if on Bottom y Client area y border Top margin Height else y Client area y border Top tab Height 1 margin Height 1 is for the line at the bottom of the tabs if area width 0 area height 0 items length 0 return changed int widths new int items length GC gc new GC this for int i 0 i items length i widths i items i preferred Width gc gc dispose int old Average Width 0 int average Width area width border Left border Right items length while average Width old Average Width int width area width border Left border Right int count items length for int i 0 i items length i if widths i average Width width widths i count old Average Width average Width if count 0 average Width width count average Width Math max average Width MIN TAB WIDTH tab Height for int i 0 i items length i if widths i average Width widths i average Width int total Width 0 for int i 0 i items length i C Tab Item tab items i if tab height tab Height tab width widths i changed true tab height tab Height tab width widths i total Width widths i int area Width area x area width border Right if total Width area Width top Tab Index 0 if set Item Location changed true Is there a gap after last item showing if correct Last Item changed true return changed  setItemBounds isDisposed getClientArea xClient borderLeft marginWidth onBottom yClient borderTop marginHeight yClient borderTop tabHeight marginHeight preferredWidth oldAverageWidth averageWidth borderLeft borderRight averageWidth oldAverageWidth borderLeft borderRight averageWidth oldAverageWidth averageWidth averageWidth averageWidth averageWidth MIN_TAB_WIDTH tabHeight averageWidth averageWidth totalWidth CTabItem tabHeight tabHeight totalWidth areaWidth borderRight totalWidth areaWidth topTabIndex setItemLocation correctLastItem
private boolean on Mnemonic Event event char key event character for int i 0 i items length i if items i null char mnemonic get Mnemonic items i get Text if mnemonic 0 if Character to Upper Case key Character to Upper Case mnemonic set Selection i true return true return false  onMnemonic getMnemonic getText toUpperCase toUpperCase setSelection
Paint the receiver private void on Paint Event event Font font get Font if old Font null old Font equals font old Font font reset Tab Size true GC gc event gc Rectangle rect super get Client Area if items length 0 if show Borders if get Style SWT FLAT 0 gc set Foreground border Color1 gc draw Rectangle rect x rect y rect x rect width 1 rect y rect height 1 else gc set Foreground border Color1 gc draw Rectangle rect x rect y rect x rect width 3 rect y rect height 3 fill in right and bottom edges with parent s background gc set Background get Parent get Background gc fill Rectangle rect x rect width 2 rect y 2 rect height gc fill Rectangle rect x rect y rect height 2 rect width 2 gc set Foreground get Foreground return redraw the Border draw Border gc rect x border Left rect y border Top rect width border Left border Right rect height border Top border Bottom Rectangle clip gc get Clipping gc set Clipping clip intersection rect Draw the unselected tabs first for int i 0 i items length i if i selected Index event get Bounds intersects items i get Bounds items i on Paint gc false Selected tab comes last if selected Index 1 items selected Index on Paint gc true draw insertion mark if insertion Index 2 gc set Foreground get Display get System Color SWT COLOR LIST SELECTION if insertion Index 1 Rectangle bounds items 0 get Bounds gc draw Line bounds x bounds y bounds x bounds y bounds height 1 gc draw Line bounds x 2 bounds y bounds x 2 bounds y gc draw Line bounds x 1 bounds y 1 bounds x 1 bounds y 1 gc draw Line bounds x 1 bounds y bounds height 2 bounds x 1 bounds y bounds height 2 gc draw Line bounds x 2 bounds y bounds height 1 bounds x 2 bounds y bounds height 1 else Rectangle bounds items insertion Index get Bounds gc draw Line bounds x bounds width bounds y bounds x bounds width bounds y bounds height 1 gc draw Line bounds x bounds width 2 bounds y bounds x bounds width 2 bounds y gc draw Line bounds x bounds width 1 bounds y 1 bounds x bounds width 1 bounds y 1 gc draw Line bounds x bounds width 1 bounds y bounds height 2 bounds x bounds width 1 bounds y bounds height 2 gc draw Line bounds x bounds width 2 bounds y bounds height 1 bounds x bounds width 2 bounds y bounds height 1 gc set Foreground get Foreground gc set Background get Background  onPaint getFont oldFont oldFont oldFont resetTabSize getClientArea showBorders getStyle setForeground borderColor1 drawRectangle setForeground borderColor1 drawRectangle setBackground getParent getBackground fillRectangle fillRectangle setForeground getForeground drawBorder borderLeft borderTop borderLeft borderRight borderTop borderBottom getClipping setClipping selectedIndex getBounds getBounds onPaint selectedIndex selectedIndex onPaint insertionIndex setForeground getDisplay getSystemColor COLOR_LIST_SELECTION insertionIndex getBounds drawLine drawLine drawLine drawLine drawLine insertionIndex getBounds drawLine drawLine drawLine drawLine drawLine setForeground getForeground setBackground getBackground
private void redraw Tab Area int index int x 0 y 0 width 0 height 0 if index 1 Rectangle area super get Client Area if area width 0 area height 0 return width area x area width border Left border Right height tab Height 1 1 causes top line between content and tabs to be redrawn x area x border Left y area y border Top if on Bottom y Math max 0 area y area height border Bottom height else C Tab Item item items index x item x y item y Rectangle area super get Client Area width area x area width x height item height redraw x y width height false  redrawTabArea getClientArea borderLeft borderRight tabHeight borderLeft borderTop onBottom borderBottom CTabItem getClientArea
Removes the listener param listener the listener exception SWT Error ul li ERROR THREAD INVALID ACCESSwhen called from the wrong thread li li ERROR WIDGET DISPOSED when the widget has been disposed li li ERROR NULL ARGUMENT when listener is null li ul public void remove Selection Listener Selection Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT remove Listener SWT Selection listener remove Listener SWT Default Selection listener  SWTError ERROR_THREAD_INVALID_ACCESSwhen ERROR_WIDGET_DISPOSED ERROR_NULL_ARGUMENT removeSelectionListener SelectionListener checkWidget ERROR_NULL_ARGUMENT removeListener removeListener DefaultSelection
Removes the listener param listener the listener exception SWT Error ul li ERROR THREAD INVALID ACCESSwhen called from the wrong thread li li ERROR WIDGET DISPOSED when the widget has been disposed li li ERROR NULL ARGUMENT when listener is null li ul public void removeC Tab Folder Listener C Tab Folder Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT if tab Listeners length 0 return int index 1 for int i 0 i tab Listeners length i if listener tab Listeners i index i break if index 1 return if tab Listeners length 1 tab Listeners new C Tab Folder Listener 0 show Close false set Button Bounds return C Tab Folder Listener new Tab Listeners new C Tab Folder Listener tab Listeners length 1 System arraycopy tab Listeners 0 new Tab Listeners 0 index System arraycopy tab Listeners index 1 new Tab Listeners index tab Listeners length index 1 tab Listeners new Tab Listeners  SWTError ERROR_THREAD_INVALID_ACCESSwhen ERROR_WIDGET_DISPOSED ERROR_NULL_ARGUMENT removeCTabFolderListener CTabFolderListener checkWidget ERROR_NULL_ARGUMENT tabListeners tabListeners tabListeners tabListeners tabListeners CTabFolderListener showClose setButtonBounds CTabFolderListener newTabListeners CTabFolderListener tabListeners tabListeners newTabListeners tabListeners newTabListeners tabListeners tabListeners newTabListeners
The widget was resized Adjust the size of the currently selected page private void on Resize if items length 0 redraw return if set Item Bounds redraw Tab Area 1 Point size get Size if old Size null redraw else if on Bottom size y old Size y redraw else int x1 Math min size x old Size x if size x old Size x x1 10 int y1 Math min size y old Size y if size y old Size y y1 10 int x2 Math max size x old Size x int y2 Math max size y old Size y redraw 0 y1 x2 10 y2 y1 false redraw x1 0 x2 x1 y2 false old Size size resize content if selected Index 1 Control control items selected Index get Control if control null control is Disposed control set Bounds get Client Area  onResize setItemBounds redrawTabArea getSize oldSize onBottom oldSize oldSize oldSize oldSize oldSize oldSize oldSize oldSize selectedIndex selectedIndex getControl isDisposed setBounds getClientArea
public void set Background Color color super set Background color background color init inactive close button inactive Close Bar set Background color init scroll buttons arrow Bar set Background color init top Right control if top Right null top Right set Background color init close button if gradient Colors null close Bar set Background color  setBackground setBackground inactiveCloseBar setBackground arrowBar setBackground topRight topRight topRight setBackground gradientColors closeBar setBackground
Specify a gradient of colours to be draw in the background of the selected tab For example to draw a gradient that varies from dark blue to blue and then to white use the following call to set Background pre cfolder set Background new Color display get System Color SWT COLOR DARK BLUE display get System Color SWT COLOR BLUE display get System Color SWT COLOR WHITE display get System Color SWT COLOR WHITE new int 25 50 100 pre param colors an array of Color that specifies the colors to appear in the gradient in order of appearance left to right The value code null code clears the background gradient The value code null code can be used inside the array of Color to specify the background color param percents an array of integers between 0 and 100 specifying the percent of the width of the widget at which the color should change The size of the percents array must be one less than the size of the colors array exception SWT Error 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 set Selection Background Color colors int percents check Widget if colors null if percents null percents length colors length 1 SWT error SWT ERROR INVALID ARGUMENT if get Display get Depth 15 Don t use gradients on low color displays colors new Color colors 0 percents new int for int i 0 i percents length i if percents i 0 percents i 100 SWT error SWT ERROR INVALID ARGUMENT if i 0 percents i percents i 1 SWT error SWT ERROR INVALID ARGUMENT Are these settings the same as before if background Image null if gradient Colors null colors null gradient Colors length colors length boolean same false for int i 0 i gradient Colors length i if gradient Colors i null same colors i null else same gradient Colors i equals colors i if same break if same for int i 0 i gradient Percents length i same gradient Percents i percents i if same break if same return else background Image null Store the new settings if colors null gradient Colors null gradient Percents null close Bar set Background background else gradient Colors new Color colors length for int i 0 i colors length i gradient Colors i colors i gradient Percents new int percents length for int i 0 i percents length i gradient Percents i percents i if get Display get Depth 15 close Bar set Background background else close Bar set Background gradient Colors gradient Colors length 1 Refresh with the new settings if selected Index 1 redraw Tab Area selected Index  setBackground setBackground getSystemColor COLOR_DARK_BLUE getSystemColor COLOR_BLUE getSystemColor COLOR_WHITE getSystemColor COLOR_WHITE SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED setSelectionBackground checkWidget ERROR_INVALID_ARGUMENT getDisplay getDepth ERROR_INVALID_ARGUMENT ERROR_INVALID_ARGUMENT backgroundImage gradientColors gradientColors gradientColors gradientColors gradientColors gradientPercents gradientPercents backgroundImage gradientColors gradientPercents closeBar setBackground gradientColors gradientColors gradientPercents gradientPercents getDisplay getDepth closeBar setBackground closeBar setBackground gradientColors gradientColors selectedIndex redrawTabArea selectedIndex
Set the image to be drawn in the background of the selected tab param image the image to be drawn in the background 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 set Selection Background Image image check Widget if image background Image return if image null gradient Colors null gradient Percents null background Image image redraw Tab Area selected Index  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelectionBackground checkWidget backgroundImage gradientColors gradientPercents backgroundImage redrawTabArea selectedIndex
Toggle the visibility of the border param show true if the border should be displayed 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 set Border Visible boolean show check Widget if show Borders show return show Borders show if show Borders if get Style SWT FLAT 0 border Bottom border Top border Left border Right 1 else border Left border Top 1 border Right border Bottom 3 else border Bottom border Top border Left border Right 0 old Size null notify Listeners SWT Resize new Event  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setBorderVisible checkWidget showBorders showBorders showBorders getStyle borderBottom borderTop borderLeft borderRight borderLeft borderTop borderRight borderBottom borderBottom borderTop borderLeft borderRight oldSize notifyListeners
public void set Font Font font check Widget if font null font equals get Font return super set Font font old Font get Font reset Tab Size true  setFont checkWidget getFont setFont oldFont getFont resetTabSize
Set the foreground color of the selected tab param color the color of the text displayed in the selected tab 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 set Selection Foreground Color color check Widget if selection Foreground color return if color null color get Foreground selection Foreground color if selected Index 1 redraw Tab Area selected Index  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelectionForeground checkWidget selectionForeground getForeground selectionForeground selectedIndex redrawTabArea selectedIndex
Display an insert marker before or after the specified tab item A value of null will clear the mark param item the item with which the mark is associated or null param after true if the mark should be displayed after the specified item 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 set Insert Mark C Tab Item item boolean after check Widget int index 1 if item null index index Of item set Insert Mark index after  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setInsertMark CTabItem checkWidget indexOf setInsertMark
Display an insert marker before or after the specified tab item A value of 1 will clear the mark param index the index of the item with which the mark is associated or null param after true if the mark should be displayed after the specified item 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 set Insert Mark int index boolean after check Widget if index 1 index get Item Count SWT error SWT ERROR INVALID ARGUMENT if index 1 index 2 else index after index index if insertion Index index return int old Index insertion Index insertion Index index if index 1 redraw Tab Area index if old Index 1 redraw Tab Area old Index  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setInsertMark checkWidget getItemCount ERROR_INVALID_ARGUMENT insertionIndex oldIndex insertionIndex insertionIndex redrawTabArea oldIndex redrawTabArea oldIndex
Set the selection to the tab at the specified index param index the index of the tab item to be selected 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 set Selection int index check Widget if index 0 index items length return if selected Index index return int old Index selected Index selected Index index Control control items index control if control null control is Disposed control set Bounds get Client Area control set Visible true if old Index 1 control items old Index control if control null control is Disposed control set Visible false show Item items selected Index set Button Bounds redraw Tab Area 1  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setSelection checkWidget selectedIndex oldIndex selectedIndex selectedIndex isDisposed setBounds getClientArea setVisible oldIndex oldIndex isDisposed setVisible showItem selectedIndex setButtonBounds redrawTabArea
Set the control that appears in the top right corner of the tab folder Typically this is a close button or a composite with a Menu and close button The top Right control is optional Setting the top right control to null will remove it from the tab folder since 2 1 param control the control to be displayed in the top right corner or null 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 li ERROR INVALID ARGUMENT if the control is not a child of this C Tab Folder li ul public void set Top Right Control control check Widget if control null control get Parent this SWT error SWT ERROR INVALID ARGUMENT top Right control reset Tab Size true  topRight SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT CTabFolder setTopRight checkWidget getParent ERROR_INVALID_ARGUMENT topRight resetTabSize
Shows the item If the item is already showing in the receiver this method simply returns Otherwise the items are scrolled until the item is visible param item the item to be shown exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the item is null li li ERROR INVALID ARGUMENT if the item has been disposed li ul 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 C Tab Folder show Selection since 2 0 public void show Item C Tab Item item check Widget if item null SWT error SWT ERROR NULL ARGUMENT if item is Disposed SWT error SWT ERROR INVALID ARGUMENT int index index Of item if index top Tab Index top Tab Index index set Item Location redraw Tab Area 1 return Rectangle area get Client Area if area width 0 top Tab Index index return int right Edge area x area width Rectangle rect get Tool Space if rect width 0 right Edge rect width if item x item width right Edge return set Last Item index  IllegalArgumentException ERROR_NULL_ARGUMENT ERROR_INVALID_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS CTabFolder showSelection showItem CTabItem checkWidget ERROR_NULL_ARGUMENT isDisposed ERROR_INVALID_ARGUMENT indexOf topTabIndex topTabIndex setItemLocation redrawTabArea getClientArea topTabIndex rightEdge getToolSpace rightEdge rightEdge setLastItem
Shows the selection If the selection is already showing in the receiver this method simply returns Otherwise the items are scrolled until the selection is visible exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the listener is null li ul 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 C Tab Folder show Item C Tab Item since 2 0 public void show Selection check Widget if selected Index 1 show Item get Selection  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS CTabFolder showItem CTabItem showSelection checkWidget selectedIndex showItem getSelection
char get Mnemonic String string int index 0 int length string length do while index length string char At index index if index length return 0 if string char At index return string char At index index while index length return 0  getMnemonic charAt charAt charAt
Set the selection to the tab at the specified item param item the tab item to be selected 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 li ERROR NULL ARGUMENT if argument is null li ul public void set Selection C Tab Item item check Widget if item null SWT error SWT ERROR NULL ARGUMENT int index index Of item set Selection index  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_NULL_ARGUMENT setSelection CTabItem checkWidget ERROR_NULL_ARGUMENT indexOf setSelection
Set the selection to the tab at the specified index private void set Selection int index boolean notify int old Selected Index selected Index set Selection index if notify selected Index old Selected Index selected Index 1 Event event new Event event item get Item selected Index notify Listeners SWT Selection event  setSelection oldSelectedIndex selectedIndex setSelection selectedIndex oldSelectedIndex selectedIndex getItem selectedIndex notifyListeners
private Image scale Image Image image int old Size int new Size Display display get Display Color foreground get Foreground Color black display get System Color SWT COLOR BLACK Color background get Background Palette Data palette new Palette Data new RGB foreground getRGB background getRGB black getRGB Image Data image Data new Image Data new Size new Size 4 palette image Data transparent Pixel 1 Image temp new Image display image Data GC gc new GC temp gc set Background background gc fill Rectangle 0 0 new Size new Size gc draw Image image 0 0 old Size old Size 0 0 new Size new Size gc dispose return temp  scaleImage oldSize newSize getDisplay getForeground getSystemColor COLOR_BLACK getBackground PaletteData PaletteData ImageData imageData ImageData newSize newSize imageData transparentPixel imageData setBackground fillRectangle newSize newSize drawImage oldSize oldSize newSize newSize
private void update Close Bar Temporary code need a better way to determine tool Bar trim int toolbar Trim 4 String platform SWT get Platform if photon equals platform toolbar Trim 6 NON NLS 1 if gtk equals platform toolbar Trim 8 NON NLS 1 int max Height tab Height C Tab Item TOP MARGIN C Tab Item BOTTOM MARGIN toolbar Trim if max Height 3 return int image Height max Height 9 9 max Height if close Image null close Image get Bounds height image Height return if close Bar null close Bar dispose close Bar null if inactive Close Bar null inactive Close Bar dispose inactive Close Bar null create Close Bar Tool Item close Item close Bar get Items 0 Tool Item inactive Close Item inactive Close Bar get Items 0 if close Image null close Image dispose Display display get Display Color foreground get Foreground Color black display get System Color SWT COLOR BLACK Color background get Background Palette Data palette new Palette Data new RGB foreground getRGB background getRGB black getRGB Image Data image Data new Image Data image Height image Height 4 palette image Data transparent Pixel 1 close Image new Image display image Data GC gc new GC close Image gc set Background background gc fill Rectangle 0 0 image Height image Height gc set Foreground black draw an 9x8 x centered in image int h image Height 2 2 int inset h 8 2 gc draw Line inset inset h inset 1 h inset 1 gc draw Line inset 1 inset h inset h inset 1 gc draw Line inset h inset 1 h inset 1 inset gc draw Line inset 1 h inset 1 h inset inset gc dispose if max Height image Height rescale image Image temp scale Image close Image image Height max Height close Image dispose close Image temp close Item set Image close Image inactive Close Item set Image close Image  updateCloseBar toolBar toolbarTrim getPlatform toolbarTrim toolbarTrim maxHeight tabHeight CTabItem TOP_MARGIN CTabItem BOTTOM_MARGIN toolbarTrim maxHeight imageHeight maxHeight maxHeight closeImage closeImage getBounds imageHeight closeBar closeBar closeBar inactiveCloseBar inactiveCloseBar inactiveCloseBar createCloseBar ToolItem closeItem closeBar getItems ToolItem inactiveCloseItem inactiveCloseBar getItems closeImage closeImage getDisplay getForeground getSystemColor COLOR_BLACK getBackground PaletteData PaletteData ImageData imageData ImageData imageHeight imageHeight imageData transparentPixel closeImage imageData closeImage setBackground fillRectangle imageHeight imageHeight setForeground imageHeight drawLine drawLine drawLine drawLine maxHeight imageHeight scaleImage closeImage imageHeight maxHeight closeImage closeImage closeItem setImage closeImage inactiveCloseItem setImage closeImage
private void update Arrow Bar Temporary code need a better way to determine tool Bar trim int toolbar Trim 4 String platform SWT get Platform if photon equals platform toolbar Trim 6 NON NLS 1 if gtk equals platform toolbar Trim 8 NON NLS 1 int max Height tab Height toolbar Trim if max Height 3 return int image Height max Height 9 9 max Height if arrow Left Image null arrow Left Image get Bounds height image Height return if arrow Bar null arrow Bar dispose arrow Bar null if arrow Left Image null arrow Left Image dispose if arrow Right Image null arrow Right Image dispose create Arrow Bar Tool Item items arrow Bar get Items Tool Item left items 0 Tool Item right items 1 Display display get Display Color foreground get Foreground Color black display get System Color SWT COLOR BLACK Color background get Background Palette Data palette new Palette Data new RGB foreground getRGB background getRGB black getRGB Image Data image Data new Image Data 7 image Height 4 palette image Data transparent Pixel 1 arrow Left Image new Image display image Data GC gc new GC arrow Left Image gc set Background background gc fill Rectangle 0 0 7 image Height gc set Background black draw a 9x5 centered vertically in image int h image Height 2 2 int midpoint h 2 1 int point Arr new int 6 midpoint 5 1 midpoint 6 midpoint 5 gc fill Polygon point Arr gc dispose palette new Palette Data new RGB foreground getRGB background getRGB black getRGB image Data new Image Data 7 image Height 4 palette image Data transparent Pixel 1 arrow Right Image new Image display image Data gc new GC arrow Right Image gc set Background background gc fill Rectangle 0 0 7 image Height gc set Background black draw a 9x5 centered vertically in image point Arr new int 1 midpoint 5 6 midpoint 1 midpoint 5 gc fill Polygon point Arr gc dispose if max Height image Height rescale image Image left Temp scale Image arrow Left Image image Height max Height arrow Left Image dispose arrow Left Image left Temp Image right Temp scale Image arrow Right Image image Height max Height arrow Right Image dispose arrow Right Image right Temp left set Image arrow Left Image right set Image arrow Right Image  updateArrowBar toolBar toolbarTrim getPlatform toolbarTrim toolbarTrim maxHeight tabHeight toolbarTrim maxHeight imageHeight maxHeight maxHeight arrowLeftImage arrowLeftImage getBounds imageHeight arrowBar arrowBar arrowBar arrowLeftImage arrowLeftImage arrowRightImage arrowRightImage createArrowBar ToolItem arrowBar getItems ToolItem ToolItem getDisplay getForeground getSystemColor COLOR_BLACK getBackground PaletteData PaletteData ImageData imageData ImageData imageHeight imageData transparentPixel arrowLeftImage imageData arrowLeftImage setBackground fillRectangle imageHeight setBackground imageHeight pointArr fillPolygon pointArr PaletteData imageData ImageData imageHeight imageData transparentPixel arrowRightImage imageData arrowRightImage setBackground fillRectangle imageHeight setBackground pointArr fillPolygon pointArr maxHeight imageHeight leftTemp scaleImage arrowLeftImage imageHeight maxHeight arrowLeftImage arrowLeftImage leftTemp rightTemp scaleImage arrowRightImage imageHeight maxHeight arrowRightImage arrowRightImage rightTemp setImage arrowLeftImage setImage arrowRightImage
private void on Mouse Double Click Event event Event e new Event e item get Item new Point event x event y notify Listeners SWT Default Selection e  onMouseDoubleClick getItem notifyListeners DefaultSelection
A mouse button was pressed down If a tab was hit select the tab private void on Mouse Down Event event for int i 0 i items length i if items i get Bounds contains new Point event x event y if i selected Index show Selection return force Focus set Selection i true if is Focus Control set Focus return  onMouseDown getBounds selectedIndex showSelection forceFocus setSelection isFocusControl setFocus
private void on Mouse Exit Event event Rectangle inactive Bounds inactive Close Bar get Bounds if inactive Bounds contains event x event y return inactive Close Bar set Visible false inactive Item null show Tool Tip false tool Tip Item null if tip null tip is Disposed tip is Visible tip set Visible false  onMouseExit inactiveBounds inactiveCloseBar getBounds inactiveBounds inactiveCloseBar setVisible inactiveItem showToolTip toolTipItem isDisposed isVisible setVisible
private void on Mouse Hover Event event if tip null tip is Disposed return show Tool Tip true show Tool Tip event x event y  onMouseHover isDisposed showToolTip showToolTip
private void show Tool Tip int x int y C Tab Item item get Item new Point x y if item null if item tool Tip Item return tool Tip Item item String tooltip item get Tool Tip Text if tooltip null tooltip length 0 Display display tip get Display label set Foreground display get System Color SWT COLOR INFO FOREGROUND label set Background display get System Color SWT COLOR INFO BACKGROUND label set Text tooltip Point label Size label compute Size SWT DEFAULT SWT DEFAULT label Size x 2 label Size y 2 label set Size label Size tip pack On some platforms there is a minimum size for a shell which may be greater than the label size To avoid having the background of the tip shell showing around the label force the label to fill the entire client area Rectangle area tip get Client Area label set Size area width area height Position the tooltip and ensure that it is not located off the screen Point pt new Point item x item width 4 item y item height 2 pt to Display pt Rectangle rect display get Bounds Point tip Size tip get Size pt x Math max 0 Math min pt x rect width tip Size x pt y Math max 0 Math min pt y rect height tip Size y tip set Location pt tip set Visible true return tool Tip Item null if tip null tip is Disposed tip is Visible tip set Visible false  showToolTip CTabItem getItem toolTipItem toolTipItem getToolTipText getDisplay setForeground getSystemColor COLOR_INFO_FOREGROUND setBackground getSystemColor COLOR_INFO_BACKGROUND setText labelSize computeSize labelSize labelSize setSize labelSize getClientArea setSize toDisplay getBounds tipSize getSize tipSize tipSize setLocation setVisible toolTipItem isDisposed isVisible setVisible
private void on Mouse Move Event event if show Tool Tip show Tool Tip event x event y if show Close return C Tab Item item null for int i 0 i items length i Rectangle rect items i get Bounds if rect contains new Point event x event y item items i break if item inactive Item return inactive Close Bar set Visible false inactive Item null if item null item get Selection return int toolbar Height tab Height C Tab Item TOP MARGIN C Tab Item BOTTOM MARGIN 2 2 to ignore gap between focus rectangle Point size inactive Close Bar compute Size SWT DEFAULT toolbar Height int x item x item width size x 2 2 to not overlap focus rectangle and trim int y item y Math max 0 item height toolbar Height 2 Rectangle toolspace get Tool Space Point folder Size get Size if toolspace width 0 x toolspace x x size x folder Size x border Right inactive Close Bar set Bounds x y size x toolbar Height inactive Close Bar set Visible true inactive Item item  onMouseMove showToolTip showToolTip showClose CTabItem getBounds inactiveItem inactiveCloseBar setVisible inactiveItem getSelection toolbarHeight tabHeight CTabItem TOP_MARGIN CTabItem BOTTOM_MARGIN inactiveCloseBar computeSize toolbarHeight toolbarHeight getToolSpace folderSize getSize folderSize borderRight inactiveCloseBar setBounds toolbarHeight inactiveCloseBar setVisible inactiveItem
private void on Traverse Event event switch event detail case SWT TRAVERSE ESCAPE TEMPORARY CODE See bug report 17372 case SWT TRAVERSE RETURN case SWT TRAVERSE TAB NEXT case SWT TRAVERSE TAB PREVIOUS event doit true break case SWT TRAVERSE MNEMONIC event doit on Mnemonic event if event doit event detail SWT TRAVERSE NONE break case SWT TRAVERSE PAGE NEXT case SWT TRAVERSE PAGE PREVIOUS event doit on Page Traversal event if event doit event detail SWT TRAVERSE NONE break  onTraverse TRAVERSE_ESCAPE TRAVERSE_RETURN TRAVERSE_TAB_NEXT TRAVERSE_TAB_PREVIOUS TRAVERSE_MNEMONIC onMnemonic TRAVERSE_NONE TRAVERSE_PAGE_NEXT TRAVERSE_PAGE_PREVIOUS onPageTraversal TRAVERSE_NONE
private boolean on Page Traversal Event event int count get Item Count if count 0 return false int index get Selection Index if index 1 index 0 else int offset event detail SWT TRAVERSE PAGE NEXT 1 1 index index offset count count set Selection index true return true  onPageTraversal getItemCount getSelectionIndex TRAVERSE_PAGE_NEXT setSelection
Answer true if not all tabs can be visible in the receive thus requiring the scroll buttons to be visible private boolean scroll leftVisible return top Tab Index 0  scroll_leftVisible topTabIndex
Answer true if not all tabs can be visible in the receive thus requiring the scroll buttons to be visible private boolean scroll rightVisible only show Scroll buttons if there is more than one item and if we are not already at the last item if items length 2 return false Rectangle area get Client Area int right Edge area x area width if right Edge 0 return false if top Tab Index 0 right Edge arrow Bar get Size x if top Right null right Edge top Right get Size x C Tab Item item items items length 1 return item x item width right Edge  scroll_rightVisible getClientArea rightEdge rightEdge topTabIndex rightEdge arrowBar getSize topRight rightEdge topRight getSize CTabItem rightEdge
Scroll the tab items to the left private void scroll scrollLeft if items length 0 return set Last Item top Tab Index 1  scroll_scrollLeft setLastItem topTabIndex
Scroll the tab items to the right private void scroll scrollRight int last Index get Last Item top Tab Index last Index 1 set Item Location correct Last Item redraw Tab Area 1  scroll_scrollRight lastIndex getLastItem topTabIndex lastIndex setItemLocation correctLastItem redrawTabArea
private boolean correct Last Item Rectangle area get Client Area int right Edge area x area width if right Edge 0 return false Rectangle toolspace get Tool Space if toolspace width 0 right Edge toolspace width C Tab Item item items items length 1 if item x item width right Edge set Last Item items length 1 return true return false  correctLastItem getClientArea rightEdge rightEdge getToolSpace rightEdge CTabItem rightEdge setLastItem
Specify a fixed height for the tab items If no height is specified the default height is the height of the text or the image whichever is greater Specifying a height of 0 will revert to the default height param height the pixel value of the height or 0 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 li ERROR INVALID ARGUMENT if called with a height of less than 0 li ul public void set Tab Height int height check Widget if height 0 SWT error SWT ERROR INVALID ARGUMENT fixed Tab Height true if tab Height height return tab Height height old Size null notify Listeners SWT Resize new Event  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT setTabHeight checkWidget ERROR_INVALID_ARGUMENT fixedTabHeight tabHeight tabHeight oldSize notifyListeners
void reset Tab Size boolean check Height int old Height tab Height if fixed Tab Height check Height int temp Height 0 GC gc new GC this for int i 0 i items length i temp Height Math max temp Height items i preferred Height gc gc dispose if top Right null temp Height Math max temp Height top Right compute Size SWT DEFAULT SWT DEFAULT y tab Height temp Height if tab Height old Height old Size null notify Listeners SWT Resize new Event else set Item Bounds redraw  resetTabSize checkHeight oldHeight tabHeight fixedTabHeight checkHeight tempHeight tempHeight tempHeight preferredHeight topRight tempHeight tempHeight topRight computeSize tabHeight tempHeight tabHeight oldHeight oldSize notifyListeners setItemBounds
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 li ERROR INVALID ARGUMENT if the position value is not either SWT TOP or SWT BOTTOM li ul UNDER CONSTRUCTION since 3 0 public void set Tab Position int position check Widget if position SWT TOP position SWT BOTTOM SWT error SWT ERROR INVALID ARGUMENT if on Bottom position SWT BOTTOM on Bottom position SWT BOTTOM set Border Visible show Borders reset Tab Size true update Tab Height true Rectangle rect Before get Client Area update Items Rectangle rect After get Client Area if rect Before equals rect After notify Listeners SWT Resize new Event set Item Bounds redraw Tab Area 1 redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT setTabPosition checkWidget ERROR_INVALID_ARGUMENT onBottom onBottom setBorderVisible showBorders resetTabSize updateTabHeight rectBefore getClientArea updateItems rectAfter getClientArea rectBefore rectAfter notifyListeners setItemBounds redrawTabArea
public int get Tab Position if on Bottom return SWT BOTTOM return SWT TOP  getTabPosition onBottom

public boolean doit C Tab Folder Event Widget w super w  CTabFolderEvent

public interface C Tab Folder Listener public void item Closed C Tab Folder Event event  CTabFolderListener itemClosed CTabFolderEvent

Constructs a new instance of this class given its parent which must be a code C Tab Folder code and a style value describing its behavior and appearance The item is added to the end of the items maintained by its parent p The style value is either one of the style constants defined in 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 C Tab Folder which will be the parent of the new instance cannot be null param style the style of control to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT see Widget get Style public C Tab Item C Tab Folder parent int style this parent style parent get Item Count  CTabFolder CTabFolder IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle CTabItem CTabFolder getItemCount
Constructs a new instance of this class given its parent which must be a code C Tab Folder code a style value describing its behavior and appearance and the index at which to place it in the items maintained by its parent p The style value is either one of the style constants defined in 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 C Tab Folder which will be the parent of the new instance cannot be null param style the style of control to construct param index the index to store the receiver in its parent exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT see Widget get Style public C Tab Item C Tab Folder parent int style int index super parent check Style style parent create Item this index  CTabFolder CTabFolder IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle CTabItem CTabFolder checkStyle createItem
parent create Item this index private static int check Style int style return SWT NONE  createItem checkStyle
public void dispose if is Disposed return parent destroy Item this super dispose parent null control null tool Tip Text null  isDisposed destroyItem toolTipText
Returns a rectangle describing the receiver s size and location relative to its parent return the receiver s bounding column rectangle 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 Rectangle get Bounds check Widget return new Rectangle x y width height  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getBounds checkWidget
Gets the control that is displayed in the content are of the tab item return the control exception SWT Error ERROR THREAD INVALID ACCESS when called from the wrong thread exception SWT Error ERROR WIDGET DISPOSED when the widget has been disposed public Control get Control check Widget return control  SWTError ERROR_THREAD_INVALID_ACCESS SWTError ERROR_WIDGET_DISPOSED getControl checkWidget
return control public Display get Display if parent null SWT error SWT ERROR WIDGET DISPOSED return parent get Display  getDisplay ERROR_WIDGET_DISPOSED getDisplay
Get the image displayed in the tab if the tab is disabled return the disabled image or null public Image get Disabled Image check Widget return disabled Image  getDisabledImage checkWidget disabledImage
Returns the receiver s parent which must be a code C Tab Folder code return the receiver s parent public C Tab Folder get Parent check Widget return parent  CTabFolder CTabFolder getParent checkWidget
Returns the receiver s tool tip text or null if it has not been set return the receiver s tool tip text 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 String get Tool Tip Text check Widget return tool Tip Text  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS getToolTipText checkWidget toolTipText
Paint the receiver void on Paint GC gc boolean is Selected if width 0 height 0 return Display display get Display Color highlight Shadow display get System Color SWT COLOR WIDGET HIGHLIGHT SHADOW Color normal Shadow display get System Color SWT COLOR WIDGET NORMAL SHADOW int index parent index Of this if is Selected Rectangle bounds null if parent on Bottom if index parent top Tab Index bounds new Rectangle x 1 y 1 width 2 height 1 else bounds new Rectangle x 2 y 1 width 3 height 1 else if index parent top Tab Index bounds new Rectangle x 1 y 1 width 2 height 2 else bounds new Rectangle x 2 y 1 width 3 height 2 if parent background Image null draw a background image behind the text Rectangle image Rect parent background Image get Bounds gc draw Image parent background Image 0 0 image Rect width image Rect height bounds x bounds y bounds width bounds height else if parent gradient Colors null draw a gradient behind the text Color old Background gc get Background if parent gradient Colors length 1 if parent gradient Colors 0 null gc set Background parent gradient Colors 0 gc fill Rectangle bounds x bounds y bounds width bounds height else Color old Foreground gc get Foreground Color last Color parent gradient Colors 0 if last Color null last Color old Background for int i 0 pos 0 i parent gradient Percents length i gc set Foreground last Color last Color parent gradient Colors i 1 if last Color null last Color old Background gc set Background last Color int gradient Width parent gradient Percents i bounds width 100 pos gc fill Gradient Rectangle bounds x pos bounds y gradient Width bounds height false pos gradient Width gc set Foreground old Foreground gc set Background old Background draw tab lines if parent on Bottom gc set Foreground normal Shadow if index parent top Tab Index gc draw Line x 1 y x 1 y gc draw Line x y 1 x y height 2 gc draw Line x y height 1 x y height 1 gc draw Line x width 1 y x width 1 y gc draw Line x width y 1 x width y height 2 gc draw Line x width y height 1 x width y height 1 gc set Foreground highlight Shadow if index parent top Tab Index gc draw Line x 2 y x 2 y gc draw Line x 1 y 1 x 1 y height 2 gc draw Line x 1 y height 1 x 1 y height 1 else gc draw Line x y x y height 1 gc draw Line x width 2 y x width 2 y gc draw Line x width 1 y 1 x width 1 y height 2 gc draw Line x width 1 y height 1 x width 1 y height 1 light line across top if index parent top Tab Index gc draw Line x 3 y x width 3 y else gc draw Line x 1 y x width 3 y else gc set Foreground normal Shadow if index parent top Tab Index gc draw Line x y x y gc draw Line x y 1 x y height 2 gc draw Line x 1 y height 1 x 1 y height 1 gc draw Line x width y x width y gc draw Line x width y 1 x width y height 2 gc draw Line x width 1 y height 1 x width 1 y height 1 gc set Foreground highlight Shadow if index parent top Tab Index gc draw Line x 1 y x 1 y gc draw Line x 1 y 1 x 1 y height 2 gc draw Line x 2 y height 1 x 2 y height 1 else gc draw Line x y x y height 1 gc draw Line x width 1 y x width 1 y gc draw Line x width 1 y 1 x width 1 y height 2 gc draw Line x width 2 y height 1 x width 2 y height 1 light line across top and bottom if index parent top Tab Index gc draw Line x 1 y x width 2 y gc draw Line x 2 y height 1 x width 3 y height 1 else gc draw Line x 1 y x width 2 y gc draw Line x 1 y height 1 x width 3 y height 1 if parent is Focus Control draw a focus rectangle int x1 y1 width1 height1 if parent on Bottom if index parent top Tab Index x1 x 1 y1 y 1 width1 width 2 height1 height 1 else x1 x 2 y1 y 1 width1 width 3 height1 height 1 else if index parent top Tab Index x1 x 1 y1 y 1 width1 width 2 height1 height 2 else x1 x 2 y1 y 1 width1 width 3 height1 height 2 gc set Background display get System Color SWT COLOR BLACK gc set Foreground display get System Color SWT COLOR WHITE gc draw Focus x1 y1 width1 height1 else draw tab lines for unselected items gc set Foreground normal Shadow if parent on Bottom if index parent top Tab Index index parent get Selection Index 1 gc draw Line x y x y height 2 else if index parent top Tab Index index parent get Selection Index 1 gc draw Line x y height 2 x y height 1 draw Image int x Draw x LEFT MARGIN Image image get Image if is Selected image null Image temp get Disabled Image if temp null image temp if image null Rectangle image Bounds image get Bounds int imageX x Draw int image Height Math min height BOTTOM MARGIN TOP MARGIN image Bounds height int imageY y height image Height 2 int image Width image Bounds width image Height image Bounds height gc draw Image image image Bounds x image Bounds y image Bounds width image Bounds height imageX imageY image Width image Height x Draw image Width INTERNAL SPACING draw Text int text Width x width x Draw RIGHT MARGIN if is Selected parent show Close text Width x width x Draw parent close Bar get Size x RIGHT MARGIN if shortened Text null shortened Text Width text Width shortened Text shorten Text gc get Text text Width shortened Text Width text Width String text shortened Text if is Selected parent selection Foreground null gc set Foreground parent selection Foreground else gc set Foreground parent get Foreground int textY y height gc text Extent text SWT DRAW MNEMONIC y 2 gc draw Text text x Draw textY SWT DRAW TRANSPARENT SWT DRAW MNEMONIC gc set Foreground parent get Foreground  onPaint isSelected getDisplay highlightShadow getSystemColor COLOR_WIDGET_HIGHLIGHT_SHADOW normalShadow getSystemColor COLOR_WIDGET_NORMAL_SHADOW indexOf isSelected onBottom topTabIndex topTabIndex backgroundImage imageRect backgroundImage getBounds drawImage backgroundImage imageRect imageRect gradientColors oldBackground getBackground gradientColors gradientColors setBackground gradientColors fillRectangle oldForeground getForeground lastColor gradientColors lastColor lastColor oldBackground gradientPercents setForeground lastColor lastColor gradientColors lastColor lastColor oldBackground setBackground lastColor gradientWidth gradientPercents fillGradientRectangle gradientWidth gradientWidth setForeground oldForeground setBackground oldBackground onBottom setForeground normalShadow topTabIndex drawLine drawLine drawLine drawLine drawLine drawLine setForeground highlightShadow topTabIndex drawLine drawLine drawLine drawLine drawLine drawLine drawLine topTabIndex drawLine drawLine setForeground normalShadow topTabIndex drawLine drawLine drawLine drawLine drawLine drawLine setForeground highlightShadow topTabIndex drawLine drawLine drawLine drawLine drawLine drawLine drawLine topTabIndex drawLine drawLine drawLine drawLine isFocusControl onBottom topTabIndex topTabIndex setBackground getSystemColor COLOR_BLACK setForeground getSystemColor COLOR_WHITE drawFocus setForeground normalShadow onBottom topTabIndex getSelectionIndex drawLine topTabIndex getSelectionIndex drawLine xDraw LEFT_MARGIN getImage isSelected getDisabledImage imageBounds getBounds xDraw imageHeight BOTTOM_MARGIN TOP_MARGIN imageBounds imageHeight imageWidth imageBounds imageHeight imageBounds drawImage imageBounds imageBounds imageBounds imageBounds imageWidth imageHeight xDraw imageWidth INTERNAL_SPACING textWidth xDraw RIGHT_MARGIN isSelected showClose textWidth xDraw closeBar getSize RIGHT_MARGIN shortenedText shortenedTextWidth textWidth shortenedText shortenText getText textWidth shortenedTextWidth textWidth shortenedText isSelected selectionForeground setForeground selectionForeground setForeground getForeground textExtent DRAW_MNEMONIC drawText xDraw DRAW_TRANSPARENT DRAW_MNEMONIC setForeground getForeground
private static String shorten Text GC gc String text int width if gc text Extent text SWT DRAW MNEMONIC x width return text int ellipse Width gc text Extent ellipsis SWT DRAW MNEMONIC x int length text length int end length 1 while end 0 text text substring 0 end int l1 gc text Extent text SWT DRAW MNEMONIC x if l1 ellipse Width width return text ellipsis end return text ellipsis  shortenText textExtent DRAW_MNEMONIC ellipseWidth textExtent DRAW_MNEMONIC textExtent DRAW_MNEMONIC ellipseWidth
Answer the preferred height of the receiver for the GC int preferred Height GC gc Image image get Image int height 0 if image null height image get Bounds height String text get Text height Math max height gc text Extent text SWT DRAW MNEMONIC y return height TOP MARGIN BOTTOM MARGIN  preferredHeight getImage getBounds getText textExtent DRAW_MNEMONIC TOP_MARGIN BOTTOM_MARGIN
Answer the preferred width of the receiver for the GC int preferred Width GC gc int width 0 Image image get Image if image null width image get Bounds width String text get Text if text null if image null width INTERNAL SPACING width gc text Extent text SWT DRAW MNEMONIC x if parent show Close width INTERNAL SPACING preferred Height gc closebar will be square and will fill preferred height return width LEFT MARGIN RIGHT MARGIN  preferredWidth getImage getBounds getText INTERNAL_SPACING textExtent DRAW_MNEMONIC showClose INTERNAL_SPACING preferredHeight LEFT_MARGIN RIGHT_MARGIN
Sets the control that is used to fill the client area of the tab folder when the user selects the tab item p param control the new control or null exception Illegal Argument Exception ul li ERROR INVALID ARGUMENT if the control has been disposed li li ERROR INVALID PARENT if the control is not in the same widget tree li ul 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 set Control Control control check Widget if control null if control is Disposed SWT error SWT ERROR INVALID ARGUMENT if control get Parent parent SWT error SWT ERROR INVALID PARENT if this control null this control is Disposed this control set Visible false this control control if this control null int index parent index Of this if index parent get Selection Index this control set Bounds parent get Client Area this control set Visible true else this control set Visible false  IllegalArgumentException ERROR_INVALID_ARGUMENT ERROR_INVALID_PARENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setControl checkWidget isDisposed ERROR_INVALID_ARGUMENT getParent ERROR_INVALID_PARENT isDisposed setVisible indexOf getSelectionIndex setBounds getClientArea setVisible setVisible
public void set Image Image image check Widget if image null image equals get Image return super set Image image parent reset Tab Size true  setImage checkWidget getImage setImage resetTabSize
Sets the image that is displayed if the tab item is disabled Null will clear the image param image the image to be displayed when the item is disabled or null 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 set Disabled Image Image image check Widget if image null image equals get Disabled Image return disabled Image image parent redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setDisabledImage checkWidget getDisabledImage disabledImage
Set the widget text p This method sets the widget label The label may include mnemonic characters but must not contain line delimiters param string the new label for the widget exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the text is null li ul 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 set Text String string check Widget if string equals get Text return super set Text string shortened Text null shortened Text Width 0 parent reset Tab Size false  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setText checkWidget getText setText shortenedText shortenedTextWidth resetTabSize
Sets the receiver s tool tip text to the argument which may be null indicating that no tool tip text should be shown param string the new tool tip text or null 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 set Tool Tip Text String string check Widget tool Tip Text string  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setToolTipText checkWidget toolTipText

private Mouse Listener mouse Listener new Mouse Adapter public void mouse Down Mouse Event e mousedown State get State  MouseListener mouseListener MouseAdapter mouseDown MouseEvent mousedownState getState
public void mouse Double Click Mouse Event e  mouseDoubleClick MouseEvent
Creates a pane folder This will create exactly one child control in the given parent param parent param flags public R21 Pane Folder Composite parent int flags Initialize tab folder tab Folder new C Tab Folder parent flags Create a proxy control to measure the title area of the tab folder title Area Proxy new Composite tab Folder SWT NONE title Area Proxy set Visible false tab Folder set Top Right title Area Proxy SWT FILL tab Folder addC Tab Folder2 Listener expand Listener tab Folder add Mouse Listener mouse Listener Initialize view form view Form new View Form tab Folder SWT NONE Only attach these to the view Form when there s actuall a control to display view Form Top Left Proxy new Proxy Control view Form view Form Top Center Proxy new Proxy Control view Form view Form Top Right Proxy new Proxy Control view Form content Proxy new Proxy Control view Form view Form set Content content Proxy get Control  R21PaneFolder tabFolder CTabFolder titleAreaProxy tabFolder titleAreaProxy setVisible tabFolder setTopRight titleAreaProxy tabFolder addCTabFolder2Listener expandListener tabFolder addMouseListener mouseListener viewForm ViewForm tabFolder viewForm viewFormTopLeftProxy ProxyControl viewForm viewFormTopCenterProxy ProxyControl viewForm viewFormTopRightProxy ProxyControl viewForm contentProxy ProxyControl viewForm viewForm setContent contentProxy getControl
Return the main control for this pane folder return public Composite get Control return tab Folder  getControl tabFolder
Sets the top center control usually a toolbar or null if none Note that the control can have any parent param top Center the top center control or null if none public void set Top Center Control top Center top Center Cache set Control top Center if top Center null if put Trim On Top view Form Top Center Proxy set Target top Center Cache view Form set Top Center view Form Top Center Proxy get Control else if put Trim On Top view Form set Top Center null  topCenter setTopCenter topCenter topCenterCache setControl topCenter topCenter putTrimOnTop viewFormTopCenterProxy setTarget topCenterCache viewForm setTopCenter viewFormTopCenterProxy getControl putTrimOnTop viewForm setTopCenter
Sets the top right control usually a dropdown or null if none param top Right public void set Top Right Control top Right top Right Cache set Control top Right if top Right null if put Trim On Top view Form Top Right Proxy set Target top Right Cache view Form set Top Right view Form Top Right Proxy get Control else if put Trim On Top view Form set Top Right null  topRight setTopRight topRight topRightCache setControl topRight topRight putTrimOnTop viewFormTopRightProxy setTarget topRightCache viewForm setTopRight viewFormTopRightProxy getControl putTrimOnTop viewForm setTopRight
Sets the top left control usually a title label or null if none param top Left public void set Top Left Control top Left if top Left Cache get Control top Left top Left Cache set Control top Left The top left control always goes directly in the View Form if top Left null view Form Top Left Proxy set Target top Left Cache view Form set Top Left view Form Top Left Proxy get Control else view Form Top Left Proxy set Target null view Form set Top Left null  topLeft setTopLeft topLeft topLeftCache getControl topLeft topLeftCache setControl topLeft ViewForm topLeft viewFormTopLeftProxy setTarget topLeftCache viewForm setTopLeft viewFormTopLeftProxy getControl viewFormTopLeftProxy setTarget viewForm setTopLeft
Flush all of this folder s size caches to ensure they will be re computed on the next layout public void flush top Left Cache flush top Right Cache flush top Center Cache flush  topLeftCache topRightCache topCenterCache
public void layout boolean flush Cache Flush the cached sizes if necessary if flush Cache flush Rectangle tab Folder Client Area tab Folder get Client Area Hide tabs if there is only one if tab Folder get Item Count 2 Rectangle tab Folder Bounds tab Folder get Bounds int delta get Tab Height 1 tab Folder Client Area height delta if get Tab Position SWT TOP tab Folder Client Area y delta view Form set Bounds tab Folder Client Area view Form Top Right Proxy layout view Form Top Left Proxy layout view Form Top Center Proxy layout  flushCache flushCache tabFolderClientArea tabFolder getClientArea tabFolder getItemCount tabFolderBounds tabFolder getBounds getTabHeight tabFolderClientArea getTabPosition tabFolderClientArea viewForm setBounds tabFolderClientArea viewFormTopRightProxy viewFormTopLeftProxy viewFormTopCenterProxy
Returns the client area for this Pane Folder relative to the pane folder s control return public Rectangle get Client Area Rectangle bounds content Proxy get Control get Bounds Rectangle form Area view Form get Bounds bounds x form Area x bounds y form Area y return bounds  PaneFolder getClientArea contentProxy getControl getBounds formArea viewForm getBounds formArea formArea
Returns the current state of the folder as shown on the button icons return one of the I Stack Presentation Site STATE  constants public int get State return state  IStackPresentationSite STATE_ getState
param button Id one of the I Stack Presentation Site STATE  constants protected void notify Button Listeners int button Id if mousedown State get State Iterator iter button Listeners iterator while iter has Next R21 Pane Folder Button Listener listener R21 Pane Folder Button Listener iter next listener state Button Pressed button Id  buttonId IStackPresentationSite STATE_ notifyButtonListeners buttonId mousedownState getState buttonListeners hasNext R21PaneFolderButtonListener R21PaneFolderButtonListener stateButtonPressed buttonId
Notifies all listeners that the user clicked on the chevron param event protected void notify Show Listeners C Tab Folder Event event Iterator iter button Listeners iterator while iter has Next R21 Pane Folder Button Listener listener R21 Pane Folder Button Listener iter next listener show List event  notifyShowListeners CTabFolderEvent buttonListeners hasNext R21PaneFolderButtonListener R21PaneFolderButtonListener showList
Notifies all listeners that the close button was pressed param tab Item protected void notify Close Listeners C Tab Item tab Item Iterator iter button Listeners iterator while iter has Next R21 Pane Folder Button Listener listener R21 Pane Folder Button Listener iter next listener close Button Pressed tab Item  tabItem notifyCloseListeners CTabItem tabItem buttonListeners hasNext R21PaneFolderButtonListener R21PaneFolderButtonListener closeButtonPressed tabItem
public void add Button Listener R21 Pane Folder Button Listener listener button Listeners add listener  addButtonListener R21PaneFolderButtonListener buttonListeners
public void remove Button Listener R21 Pane Folder Button Listener listener button Listeners remove listener  removeButtonListener R21PaneFolderButtonListener buttonListeners
public void set Tab Position int new Tab Position tab Position new Tab Position tab Folder set Tab Position tab Position  setTabPosition newTabPosition tabPosition newTabPosition tabFolder setTabPosition tabPosition
public int get Tab Position return tab Position  getTabPosition tabPosition
public boolean is Disposed return tab Folder null tab Folder is Disposed  isDisposed tabFolder tabFolder isDisposed
public C Tab Item create Item int style int index return new C Tab Item tab Folder style index  CTabItem createItem CTabItem tabFolder
The remainder of the methods in this class redirect directly to C Tab Folder methods public void set Selection int selection tab Folder set Selection selection  CTabFolder setSelection tabFolder setSelection
param i param j param k param l return public Rectangle compute Trim int i int j int k int l return tab Folder compute Trim i j k l  computeTrim tabFolder computeTrim
param fg Color public void set Selection Foreground Color fg Color tab Folder set Selection Foreground fg Color  fgColor setSelectionForeground fgColor tabFolder setSelectionForeground fgColor
param bg Colors param percentages param vertical public void set Selection Background Color bg Colors int percentages boolean vertical tab Folder set Selection Background bg Colors percentages  bgColors setSelectionBackground bgColors tabFolder setSelectionBackground bgColors
public C Tab Item get Item int idx return tab Folder get Item idx  CTabItem getItem tabFolder getItem
public int get Selection Index return tab Folder get Selection Index  getSelectionIndex tabFolder getSelectionIndex
public int get Tab Height return tab Folder get Tab Height  getTabHeight tabFolder getTabHeight
public int index Of C Tab Item to Find return tab Folder index Of to Find  indexOf CTabItem toFind tabFolder indexOf toFind
public void set Tab Height int height tab Folder set Tab Height height  setTabHeight tabFolder setTabHeight
return public int get Item Count return tab Folder get Item Count  getItemCount tabFolder getItemCount
return public C Tab Item get Items return tab Folder get Items  CTabItem getItems tabFolder getItems
public C Tab Item get Item Point to Get return tab Folder get Item to Get  CTabItem getItem toGet tabFolder getItem toGet
public C Tab Item get Selection return tab Folder get Selection  CTabItem getSelection tabFolder getSelection

Called when the minimize maximize or restore buttons are pressed param button Id one of the I Stack Presentation Site STATE  constants public void state Button Pressed int button Id  buttonId IStackPresentationSite STATE_ stateButtonPressed buttonId
Called when a close button is pressed param item the tab whose close button was pressed public void close Button Pressed C Tab Item item  closeButtonPressed CTabItem
since 3 0 public void show List C Tab Folder Event event  showList CTabFolderEvent

add Paint Listener new Paint Listener public void paint Control Paint Event event on Paint event gc  addPaintListener PaintListener paintControl PaintEvent onPaint
add Control Listener new Control Adapter public void control Resized Control Event e on Resize  addControlListener ControlAdapter controlResized ControlEvent onResize
add Listener SWT Dispose new Listener public void handle Event Event e on Dispose  addListener handleEvent onDispose
private static final int OFFSCREEN 200 Constructs a new instance of this class 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 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 widget which will be the parent of the new instance cannot be null param style the style of widget to construct exception Illegal Argument Exception ul li ERROR NULL ARGUMENT if the parent is null li ul exception SWT Exception ul li ERROR THREAD INVALID ACCESS if not called from the thread that created the parent li ul see SWT BORDER see SWT FLAT see get Style public View Form Composite parent int style super parent check Style style border Color1 new Color get Display border InsideRGB border Color2 new Color get Display border MiddleRGB border Color3 new Color get Display border OutsideRGB set Border Visible style SWT BORDER 0 add Paint Listener new Paint Listener public void paint Control Paint Event event on Paint event gc add Control Listener new Control Adapter public void control Resized Control Event e on Resize add Listener SWT Dispose new Listener public void handle Event Event e on Dispose  IllegalArgumentException ERROR_NULL_ARGUMENT SWTException ERROR_THREAD_INVALID_ACCESS getStyle ViewForm checkStyle borderColor1 getDisplay borderInsideRGB borderColor2 getDisplay borderMiddleRGB borderColor3 getDisplay borderOutsideRGB setBorderVisible addPaintListener PaintListener paintControl PaintEvent onPaint addControlListener ControlAdapter controlResized ControlEvent onResize addListener handleEvent onDispose
Check the style bits to ensure that no invalid styles are applied private private static int check Style int style int mask SWT FLAT SWT LEFT TO RIGHT SWT RIGHT TO LEFT return style mask SWT NO REDRAW RESIZE  checkStyle LEFT_TO_RIGHT RIGHT_TO_LEFT NO_REDRAW_RESIZE
public Point compute Size int w Hint int h Hint boolean changed check Widget size of title bar area Point left Size new Point 0 0 if top Left null left Size top Left compute Size SWT DEFAULT SWT DEFAULT left Size x 1 1 for highlight line Point center Size new Point 0 0 if top Center null center Size top Center compute Size SWT DEFAULT SWT DEFAULT Point right Size new Point 0 0 if top Right null right Size top Right compute Size SWT DEFAULT SWT DEFAULT Point size new Point 0 0 calculate width of title bar if separate Top Center w Hint SWT DEFAULT left Size x center Size x right Size x w Hint size x left Size x right Size x size x Math max center Size x size x size y Math max left Size y right Size y 1 1 for highlight line if top Center null size y center Size y else size x left Size x center Size x right Size x size y Math max left Size y Math max center Size y right Size y 1 1 for highlight line if content null Point content Size new Point 0 0 content Size content compute Size SWT DEFAULT SWT DEFAULT size x Math max size x content Size x size y content Size y 1 1 for line bewteen content and header size x 2 margin Width size y 2 margin Height if w Hint SWT DEFAULT size x w Hint if h Hint SWT DEFAULT size y h Hint Rectangle trim compute Trim 0 0 size x size y return new Point trim width trim height  computeSize wHint hHint checkWidget leftSize topLeft leftSize topLeft computeSize leftSize centerSize topCenter centerSize topCenter computeSize rightSize topRight rightSize topRight computeSize separateTopCenter wHint leftSize centerSize rightSize wHint leftSize rightSize centerSize leftSize rightSize topCenter centerSize leftSize centerSize rightSize leftSize centerSize rightSize contentSize contentSize computeSize contentSize contentSize marginWidth marginHeight wHint wHint hHint hHint computeTrim
public Rectangle compute Trim int x int y int width int height check Widget int trimX x BORDER LEFT int trimY y BORDER TOP int trim Width width BORDER LEFT BORDER RIGHT int trim Height height BORDER TOP BORDER BOTTOM return new Rectangle trimX trimY trim Width trim Height  computeTrim checkWidget BORDER_LEFT BORDER_TOP trimWidth BORDER_LEFT BORDER_RIGHT trimHeight BORDER_TOP BORDER_BOTTOM trimWidth trimHeight
public Rectangle get Client Area check Widget Rectangle client Area super get Client Area client Area x BORDER LEFT client Area y BORDER TOP client Area width BORDER LEFT BORDER RIGHT client Area height BORDER TOP BORDER BOTTOM return client Area  getClientArea checkWidget clientArea getClientArea clientArea BORDER_LEFT clientArea BORDER_TOP clientArea BORDER_LEFT BORDER_RIGHT clientArea BORDER_TOP BORDER_BOTTOM clientArea
Returns the content area return the control in the content area of the pane or null public Control get Content check Widget return content  getContent checkWidget
Returns Control that appears in the top center of the pane Typically this is a toolbar return the control in the top center of the pane or null public Control get Top Center check Widget return top Center  getTopCenter checkWidget topCenter
Returns the Control that appears in the top left corner of the pane Typically this is a label such as C Label return the control in the top left corner of the pane or null public Control get Top Left check Widget return top Left  CLabel getTopLeft checkWidget topLeft
Returns the control in the top right corner of the pane Typically this is a Close button or a composite with a Menu and Close button return the control in the top right corner of the pane or null public Control get Top Right check Widget return top Right  getTopRight checkWidget topRight
public void layout boolean changed check Widget Rectangle rect get Client Area draw Line1 1 draw Line2 1 Point left Size new Point 0 0 if top Left null top Left is Disposed left Size top Left compute Size SWT DEFAULT SWT DEFAULT Point center Size new Point 0 0 if top Center null top Center is Disposed center Size top Center compute Size SWT DEFAULT SWT DEFAULT Point right Size new Point 0 0 if top Right null top Right is Disposed right Size top Right compute Size SWT DEFAULT SWT DEFAULT int min Top Width left Size x center Size x right Size x 2 margin Width 1 1 for highlight line int height rect y margin Height boolean top false if separate Top Center min Top Width rect width int top Height Math max right Size y left Size y if top Right null top Right is Disposed top true top Right set Bounds rect x rect width margin Width right Size x rect y 1 margin Height right Size x top Height height 1 top Height 1 for highlight line if top Left null top Left is Disposed top true left Size top Left compute Size rect width 2 margin Width right Size x 1 SWT DEFAULT top Left set Bounds rect x 1 margin Width rect y 1 margin Height left Size x top Height height Math max height rect y margin Height 1 top Height 1 for highlight line if top Center null top Center is Disposed top true if height rect y margin Height draw Line1 height height 1 1 for divider line center Size top Center compute Size rect width 2 margin Width SWT DEFAULT top Center set Bounds rect x rect width margin Width center Size x height center Size x center Size y height center Size y else int top Height Math max right Size y Math max center Size y left Size y if top Right null top Right is Disposed top true top Right set Bounds rect x rect width margin Width right Size x rect y margin Height 1 1 for highlight line right Size x top Height height 1 top Height 1 for highlight line if top Center null top Center is Disposed top true top Center set Bounds rect x rect width margin Width right Size x center Size x rect y margin Height 1 1 for highlight line center Size x top Height height Math max height rect y margin Height 1 top Height 1 for highlight line if top Left null top Left is Disposed top true left Size top Left compute Size rect width 2 margin Width right Size x center Size x 1 top Height top Left set Bounds rect x margin Width 1 1 for highlight line rect y margin Height 1 1 for highlight line left Size x top Height height Math max height rect y margin Height 1 top Height 1 for highlight line if content null content is Disposed if top draw Line2 height height 1 1 for divider line content set Bounds rect x margin Width height rect width 2 margin Width rect y rect height height margin Height  checkWidget getClientArea drawLine1 drawLine2 leftSize topLeft topLeft isDisposed leftSize topLeft computeSize centerSize topCenter topCenter isDisposed centerSize topCenter computeSize rightSize topRight topRight isDisposed rightSize topRight computeSize minTopWidth leftSize centerSize rightSize marginWidth marginHeight separateTopCenter minTopWidth topHeight rightSize leftSize topRight topRight isDisposed topRight setBounds marginWidth rightSize marginHeight rightSize topHeight topHeight topLeft topLeft isDisposed leftSize topLeft computeSize marginWidth rightSize topLeft setBounds marginWidth marginHeight leftSize topHeight marginHeight topHeight topCenter topCenter isDisposed marginHeight drawLine1 centerSize topCenter computeSize marginWidth topCenter setBounds marginWidth centerSize centerSize centerSize centerSize topHeight rightSize centerSize leftSize topRight topRight isDisposed topRight setBounds marginWidth rightSize marginHeight rightSize topHeight topHeight topCenter topCenter isDisposed topCenter setBounds marginWidth rightSize centerSize marginHeight centerSize topHeight marginHeight topHeight topLeft topLeft isDisposed leftSize topLeft computeSize marginWidth rightSize centerSize topHeight topLeft setBounds marginWidth marginHeight leftSize topHeight marginHeight topHeight isDisposed drawLine2 setBounds marginWidth marginWidth marginHeight
private void on Dispose if border Color1 null border Color1 dispose border Color1 null if border Color2 null border Color2 dispose border Color2 null if border Color3 null border Color3 dispose border Color3 null top Left null top Center null top Right null content null old Area null  onDispose borderColor1 borderColor1 borderColor1 borderColor2 borderColor2 borderColor2 borderColor3 borderColor3 borderColor3 topLeft topCenter topRight oldArea
Draws the focus border private void on Paint GC gc Rectangle d super get Client Area if show Border if get Style SWT FLAT 0 gc set Foreground border Color1 gc draw Rectangle d x d y d x d width 1 d y d height 1 else gc set Foreground border Color1 gc draw Rectangle d x d y d x d width 3 d y d height 3 gc set Foreground border Color2 gc draw Line d x 1 d y d height 2 d x d width 1 d y d height 2 gc draw Line d x d width 2 d y 1 d x d width 2 d y d height 1 gc set Foreground border Color3 gc draw Line d x 2 d y d height 1 d x d width 2 d y d height 1 gc draw Line d x d width 1 d y 2 d x d width 1 d y d height 2 if draw Line1 1 top seperator line gc set Foreground border Color1 gc draw Line d x BORDER LEFT draw Line1 d x d width BORDER RIGHT draw Line1 if draw Line2 1 content separator line gc set Foreground border Color1 gc draw Line d x BORDER LEFT draw Line2 d x d width BORDER RIGHT draw Line2 highlight on top int y draw Line1 if y 1 y draw Line2 if y 1 gc set Foreground get Display get System Color SWT COLOR WIDGET HIGHLIGHT SHADOW gc draw Line d x BORDER LEFT margin Width d y BORDER TOP margin Height d x BORDER LEFT margin Width y 1 gc draw Line d x BORDER LEFT margin Width d y BORDER TOP margin Height d x d width BORDER RIGHT margin Width 1 d y BORDER TOP margin Height gc set Foreground get Foreground  onPaint getClientArea showBorder getStyle setForeground borderColor1 drawRectangle setForeground borderColor1 drawRectangle setForeground borderColor2 drawLine drawLine setForeground borderColor3 drawLine drawLine drawLine1 setForeground borderColor1 drawLine BORDER_LEFT drawLine1 BORDER_RIGHT drawLine1 drawLine2 setForeground borderColor1 drawLine BORDER_LEFT drawLine2 BORDER_RIGHT drawLine2 drawLine1 drawLine2 setForeground getDisplay getSystemColor COLOR_WIDGET_HIGHLIGHT_SHADOW drawLine BORDER_LEFT marginWidth BORDER_TOP marginHeight BORDER_LEFT marginWidth drawLine BORDER_LEFT marginWidth BORDER_TOP marginHeight BORDER_RIGHT marginWidth BORDER_TOP marginHeight setForeground getForeground
private void on Resize layout Rectangle area super get Client Area if old Area null old Area width 0 old Area height 0 redraw else int width 0 if old Area width area width width area width old Area width BORDER RIGHT else if old Area width area width width BORDER RIGHT redraw area x area width width area y width area height false int height 0 if old Area height area height height area height old Area height BORDER BOTTOM if old Area height area height height BORDER BOTTOM redraw area x area y area height height area width height false old Area area  onResize getClientArea oldArea oldArea oldArea oldArea oldArea BORDER_RIGHT oldArea BORDER_RIGHT oldArea oldArea BORDER_BOTTOM oldArea BORDER_BOTTOM oldArea
Sets the content Setting the content to null will remove it from the pane however the creator of the content must dispose of the content param content the control to be displayed in the content area or null 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 set Content Control content check Widget if content null content get Parent this SWT error SWT ERROR INVALID ARGUMENT if this content null this content is Disposed this content set Bounds OFFSCREEN OFFSCREEN 0 0 this content content layout  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setContent checkWidget getParent ERROR_INVALID_ARGUMENT isDisposed setBounds
Set the widget font This will apply the font to the top Left top Right and top Center widgets public void set Font Font f super set Font f if top Left null top Left is Disposed top Left set Font f if top Center null top Center is Disposed top Center set Font f if top Right null top Right is Disposed top Right set Font f layout  topLeft topRight topCenter setFont setFont topLeft topLeft isDisposed topLeft setFont topCenter topCenter isDisposed topCenter setFont topRight topRight isDisposed topRight setFont
Sets the layout which is associated with the receiver to be the argument which may be null p Note View Form does not use a layout class to size and position its children p param layout the receiver s new layout or null 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 set Layout Layout layout check Widget return  ViewForm SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setLayout checkWidget
Set the control that appears in the top center of the pane Typically this is a toolbar The top Center is optional Setting the top Center to null will remove it from the pane however the creator of the top Center must dispose of the top Center param top Center the control to be displayed in the top center or null 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 set Top Center Control top Center check Widget if top Center null top Center get Parent this SWT error SWT ERROR INVALID ARGUMENT if this top Center null this top Center is Disposed this top Center set Bounds OFFSCREEN OFFSCREEN 0 0 this top Center top Center layout  topCenter topCenter topCenter topCenter topCenter SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setTopCenter topCenter checkWidget topCenter topCenter getParent ERROR_INVALID_ARGUMENT topCenter topCenter isDisposed topCenter setBounds topCenter topCenter
Set the control that appears in the top left corner of the pane Typically this is a label such as C Label The top Left is optional Setting the top left control to null will remove it from the pane however the creator of the control must dispose of the control param c the control to be displayed in the top left corner or null 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 set Top Left Control c check Widget if c null c get Parent this SWT error SWT ERROR INVALID ARGUMENT if this top Left null this top Left is Disposed this top Left set Bounds OFFSCREEN OFFSCREEN 0 0 this top Left c layout  CLabel topLeft SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setTopLeft checkWidget getParent ERROR_INVALID_ARGUMENT topLeft topLeft isDisposed topLeft setBounds topLeft
Set the control that appears in the top right corner of the pane Typically this is a Close button or a composite with a Menu and Close button The top Right is optional Setting the top right control to null will remove it from the pane however the creator of the control must dispose of the control param c the control to be displayed in the top right corner or null 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 li ERROR INVALID ARGUMENT if the control is not a child of this View Form li ul public void set Top Right Control c check Widget if c null c get Parent this SWT error SWT ERROR INVALID ARGUMENT if this top Right null this top Right is Disposed this top Right set Bounds OFFSCREEN OFFSCREEN 0 0 this top Right c layout  topRight SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS ERROR_INVALID_ARGUMENT ViewForm setTopRight checkWidget getParent ERROR_INVALID_ARGUMENT topRight topRight isDisposed topRight setBounds topRight
Specify whether the border should be displayed or not param show true if the border should be displayed 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 set Border Visible boolean show check Widget if show Border show return show Border show if show Border if get Style SWT FLAT 0 BORDER LEFT BORDER TOP BORDER RIGHT BORDER BOTTOM 1 else BORDER LEFT BORDER TOP 1 BORDER RIGHT BORDER BOTTOM 3 else BORDER BOTTOM BORDER TOP BORDER LEFT BORDER RIGHT 0 layout redraw  SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setBorderVisible checkWidget showBorder showBorder showBorder getStyle BORDER_LEFT BORDER_TOP BORDER_RIGHT BORDER_BOTTOM BORDER_LEFT BORDER_TOP BORDER_RIGHT BORDER_BOTTOM BORDER_BOTTOM BORDER_TOP BORDER_LEFT BORDER_RIGHT
If true the top Center will always appear on a separate line by itself otherwise the top Center will appear in the top row if there is room and will be moved to the second row if required param show true if the top Center will always appear on a separate line by itself 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 set Top Center Separate boolean show check Widget separate Top Center show layout  topCenter topCenter topCenter SWTException ERROR_WIDGET_DISPOSED ERROR_THREAD_INVALID_ACCESS setTopCenterSeparate checkWidget separateTopCenter

private I Stack Presentation Site site public System Menu Close I Stack Presentation Site site this site site set Text Workbench Messages get String Part Pane close NON NLS 1  IStackPresentationSite SystemMenuClose IStackPresentationSite setText WorkbenchMessages getString PartPane
public void dispose site null 
public void run I Presentable Part part site get Selected Part if part null site close new I Presentable Part part  IPresentablePart getSelectedPart IPresentablePart
public void update I Presentable Part presentable Part site get Selected Part set Enabled presentable Part null site is Closeable presentable Part  IPresentablePart presentablePart getSelectedPart setEnabled presentablePart isCloseable presentablePart
public boolean should Be Visible return true  shouldBeVisible

private Default Part Presentation presentation public System Menu Close All Default Part Presentation presentation this presentation presentation set Text Workbench Messages get String Part Pane close All NON NLS 1  DefaultPartPresentation SystemMenuCloseAll DefaultPartPresentation setText WorkbenchMessages getString PartPane closeAll
public void dispose presentation null 
public void run List parts presentation get Presentable Parts presentation close I Presentable Part parts to Array new I Presentable Part parts size  getPresentableParts IPresentablePart toArray IPresentablePart
public void update List parts presentation get Presentable Parts set Enabled parts size 0  getPresentableParts setEnabled
public boolean should Be Visible return true  shouldBeVisible

private Default Part Presentation stack Presentation public System Menu Close Others Default Part Presentation stack Presentation this stack Presentation stack Presentation set Text Workbench Messages get String Part Pane close Others NON NLS 1  DefaultPartPresentation stackPresentation SystemMenuCloseOthers DefaultPartPresentation stackPresentation stackPresentation stackPresentation setText WorkbenchMessages getString PartPane closeOthers
public void dispose stack Presentation null  stackPresentation
public void run I Presentable Part current stack Presentation get Current List others stack Presentation get Presentable Parts others remove current stack Presentation close I Presentable Part others to Array new I Presentable Part others size  IPresentablePart stackPresentation getCurrent stackPresentation getPresentableParts stackPresentation IPresentablePart toArray IPresentablePart
public void update I Presentable Part current stack Presentation get Current set Enabled current null  IPresentablePart stackPresentation getCurrent setEnabled
public boolean should Be Visible return true  shouldBeVisible

public System Menu Fast View I Stack Presentation Site site this site site set Text Workbench Messages get String View Pane fast View NON NLS 1 update  SystemMenuFastView IStackPresentationSite setText WorkbenchMessages getString ViewPane fastView
public void set Pane View Pane new Pane view Pane new Pane update  setPane ViewPane newPane viewPane newPane
public void update if view Pane null site is Part Moveable view Pane get Presentable Part set Enabled false else set Enabled true set Checked view Pane get Page get Active Perspective is Fast View view Pane get View Reference  viewPane isPartMoveable viewPane getPresentablePart setEnabled setEnabled setChecked viewPane getPage getActivePerspective isFastView viewPane getViewReference
public boolean should Be Visible if view Pane null view Pane get Page null return false Workbench Window workbench Window Workbench Window view Pane get Page get Workbench Window return workbench Window get Show Fast View Bars view Pane null site is Part Moveable view Pane get Presentable Part  shouldBeVisible viewPane viewPane getPage WorkbenchWindow workbenchWindow WorkbenchWindow viewPane getPage getWorkbenchWindow workbenchWindow getShowFastViewBars viewPane isPartMoveable viewPane getPresentablePart
public void dispose view Pane null  viewPane
public void run if is Checked view Pane do Make Fast else view Pane do Remove Fast  isChecked viewPane doMakeFast viewPane doRemoveFast

current Orientation add Change Listener new I Change Listener public void update boolean changed if changed Workbench Window workbench Window Workbench Window view Pane get Page get Workbench Window Fast View Bar bar workbench Window get Fast View Bar if bar null view Pane null bar set Orientation view Pane get View Reference current Orientation get  currentOrientation addChangeListener IChangeListener WorkbenchWindow workbenchWindow WorkbenchWindow viewPane getPage getWorkbenchWindow FastViewBar workbenchWindow getFastViewBar viewPane setOrientation viewPane getViewReference currentOrientation
public System Menu Fast View Orientation View Pane new View Pane this view Pane new View Pane current Orientation add Change Listener new I Change Listener public void update boolean changed if changed Workbench Window workbench Window Workbench Window view Pane get Page get Workbench Window Fast View Bar bar workbench Window get Fast View Bar if bar null view Pane null bar set Orientation view Pane get View Reference current Orientation get  SystemMenuFastViewOrientation ViewPane newViewPane viewPane newViewPane currentOrientation addChangeListener IChangeListener WorkbenchWindow workbenchWindow WorkbenchWindow viewPane getPage getWorkbenchWindow FastViewBar workbenchWindow getFastViewBar viewPane setOrientation viewPane getViewReference currentOrientation
public void dispose view Pane null  viewPane
public void fill Menu menu int index Workbench Window workbench Window Workbench Window view Pane get Page get Workbench Window Fast View Bar bar workbench Window get Fast View Bar if bar null view Pane null current Orientation set bar get Orientation view Pane get View Reference Menu Item orientation Item new Menu Item menu SWT CASCADE index orientation Item set Text Workbench Messages get String Fast View Bar view orientation NON NLS 1 Menu orientation Swt Menu new Menu orientation Item Radio Menu orientation Menu new Radio Menu orientation Swt Menu current Orientation orientation Menu add Menu Item Workbench Messages get String Fast View Bar horizontal new Integer SWT HORIZONTAL NON NLS 1 orientation Menu add Menu Item Workbench Messages get String Fast View Bar vertical new Integer SWT VERTICAL NON NLS 1 orientation Item set Menu orientation Swt Menu  WorkbenchWindow workbenchWindow WorkbenchWindow viewPane getPage getWorkbenchWindow FastViewBar workbenchWindow getFastViewBar viewPane currentOrientation getOrientation viewPane getViewReference MenuItem orientationItem MenuItem orientationItem setText WorkbenchMessages getString FastViewBar view_orientation orientationSwtMenu orientationItem RadioMenu orientationMenu RadioMenu orientationSwtMenu currentOrientation orientationMenu addMenuItem WorkbenchMessages getString FastViewBar orientationMenu addMenuItem WorkbenchMessages getString FastViewBar orientationItem setMenu orientationSwtMenu
public boolean is Dynamic return true  isDynamic

param site param name param state public System Menu Maximize I Stack Presentation Site site super site Workbench Messages get String Part Pane maximize NON NLS 1 I Stack Presentation Site STATE MAXIMIZED  SystemMenuMaximize IStackPresentationSite WorkbenchMessages getString PartPane IStackPresentationSite STATE_MAXIMIZED

param site param name param state public System Menu Minimize I Stack Presentation Site site super site Workbench Messages get String View Pane minimize View NON NLS 1 I Stack Presentation Site STATE MINIMIZED  SystemMenuMinimize IStackPresentationSite WorkbenchMessages getString ViewPane minimizeView IStackPresentationSite STATE_MINIMIZED

public System Menu Move I Stack Presentation Site stack Presentation Site String part Name super Workbench Messages get String Part Pane move NON NLS 1 this stack Presentation Site stack Presentation Site this move Part part Name move Pane Action new System Menu Move Pane stack Presentation Site move Pane Action set Text part Name move Folder Action new System Menu Move Folder stack Presentation Site add move Pane Action add move Folder Action  SystemMenuMove IStackPresentationSite stackPresentationSite partName WorkbenchMessages getString PartPane stackPresentationSite stackPresentationSite movePart partName movePaneAction SystemMenuMovePane stackPresentationSite movePaneAction setText partName moveFolderAction SystemMenuMoveFolder stackPresentationSite movePaneAction moveFolderAction
protected void update boolean force boolean recursive move Pane Action update move Folder Action update super update force recursive  movePaneAction moveFolderAction

private I Stack Presentation Site site public System Menu Move Folder I Stack Presentation Site site this site site set Text Workbench Messages get String View Pane move Folder NON NLS 1  IStackPresentationSite SystemMenuMoveFolder IStackPresentationSite setText WorkbenchMessages getString ViewPane moveFolder
see org eclipse jface action I Action run public void run site drag Start Display get Default get Cursor Location true  IAction dragStart getDefault getCursorLocation
public void update set Enabled site is Stack Moveable  setEnabled isStackMoveable
public boolean should Be Visible return site is Stack Moveable  shouldBeVisible isStackMoveable

I Stack Presentation Site site public System Menu Move Pane I Stack Presentation Site site this site site set Text Workbench Messages get String System Menu Move Pane Pane Name NON NLS 1  IStackPresentationSite SystemMenuMovePane IStackPresentationSite setText WorkbenchMessages getString SystemMenuMovePane PaneName
see org eclipse jface action I Action run public void run site drag Start site get Selected Part Display get Default get Cursor Location true  IAction dragStart getSelectedPart getDefault getCursorLocation
public void update I Presentable Part part site get Selected Part set Enabled part null site is Part Moveable part  IPresentablePart getSelectedPart setEnabled isPartMoveable
public boolean should Be Visible return true  shouldBeVisible

private Editor Pane editor Pane public System Menu Pin Editor Editor Pane pane set Text Workbench Messages get String Editor Pane pin Editor NON NLS 1 set Pane pane  EditorPane editorPane SystemMenuPinEditor EditorPane setText WorkbenchMessages getString EditorPane pinEditor setPane
public void dispose editor Pane null  editorPane
public void set Pane Editor Pane pane editor Pane pane update  setPane EditorPane editorPane
public void run I Workbench Part part editor Pane get Part Reference get Part true Editor Site part get Site set Reuse Editor is Checked  IWorkbenchPart editorPane getPartReference getPart EditorSite getSite setReuseEditor isChecked
public void update if editor Pane null set Enabled false return I Workbench Part part editor Pane get Part Reference get Part false if part null set Enabled false return set Enabled true set Checked Editor Site part get Site get Reuse Editor  editorPane setEnabled IWorkbenchPart editorPane getPartReference getPart setEnabled setEnabled setChecked EditorSite getSite getReuseEditor
public boolean should Be Visible if editor Pane null return false boolean reuse Editor Workbench Plugin get Default get Preference Store get Boolean I Preference Constants REUSE EDITORS BOOLEAN return reuse Editor  shouldBeVisible editorPane reuseEditor WorkbenchPlugin getDefault getPreferenceStore getBoolean IPreferenceConstants REUSE_EDITORS_BOOLEAN reuseEditor

param site param name param state public System Menu Restore I Stack Presentation Site site super site Workbench Messages get String Part Pane restore NON NLS 1 I Stack Presentation Site STATE RESTORED  SystemMenuRestore IStackPresentationSite WorkbenchMessages getString PartPane IStackPresentationSite STATE_RESTORED

private Part Pane part Pane public System Menu Size Part Pane pane set Pane pane  PartPane partPane SystemMenuSize PartPane setPane
public void set Pane Part Pane pane part Pane pane  setPane PartPane partPane
public void dispose part Pane null  partPane
public void fill Menu menu int index if part Pane null part Pane add Size Menu Item menu index  partPane partPane addSizeMenuItem
public boolean is Dynamic return true  isDynamic

private Fast View Pane fast View Pane public System Menu Size Fast View Fast View Pane fast View Pane this fast View Pane fast View Pane  FastViewPane fastViewPane SystemMenuSizeFastView FastViewPane fastViewPane fastViewPane fastViewPane
public void dispose fast View Pane null  fastViewPane
item add Selection Listener new Selection Adapter public void widget Selected Selection Event e fast View Pane move Sash  addSelectionListener SelectionAdapter widgetSelected SelectionEvent fastViewPane moveSash
public void fill Menu menu int index Menu Item item new Menu Item menu SWT NONE index item set Text Workbench Messages get String Part Pane size NON NLS 1 item add Selection Listener new Selection Adapter public void widget Selected Selection Event e fast View Pane move Sash item set Enabled fast View Pane get Current Pane null  MenuItem MenuItem setText WorkbenchMessages getString PartPane addSelectionListener SelectionAdapter widgetSelected SelectionEvent fastViewPane moveSash setEnabled fastViewPane getCurrentPane
public boolean is Dynamic return true  isDynamic

public System Menu State Change I Stack Presentation Site site String name int state this site site this state state this name name set Text name update  SystemMenuStateChange IStackPresentationSite setText
public void dispose this site null 
public void run site set State state  setState
public void update set Enabled site get State state site supports State state  setEnabled getState supportsState
public boolean should Be Visible return site supports State state  shouldBeVisible supportsState

param action public Updating Action Contribution Item I Self Updating Action action super action  UpdatingActionContributionItem ISelfUpdatingAction
see org eclipse jface action I Contribution Item is Visible public boolean is Visible I Self Updating Action action I Self Updating Action get Action return super is Visible action should Be Visible  IContributionItem isVisible isVisible ISelfUpdatingAction ISelfUpdatingAction getAction isVisible shouldBeVisible
public void update String property Name I Self Updating Action action I Self Updating Action get Action action update super update property Name  propertyName ISelfUpdatingAction ISelfUpdatingAction getAction propertyName
see org eclipse jface action I Contribution Item is Dynamic public boolean is Dynamic return true  IContributionItem isDynamic isDynamic

private String about Text public Product Info I Product product this product product  aboutText ProductInfo IProduct
Returns the product name or code null code This is shown in the window title and the About action return the product name or code null code public String get Product Name if product Name null product null product Name product get Name return product Name  getProductName productName productName getName productName
Returns the application name or code null code Note this is never shown to the user It is used to initialize the SWT Display p On Motif for example this can be used to set the name used for resource lookup p return the application name or code null code see org eclipse swt widgets Display set App Name public String get App Name if app Name null product null app Name Product Properties get App Name product return app Name  setAppName getAppName appName appName ProductProperties getAppName appName
Returns the descriptor for an image which can be shown in an about dialog for this product Products designed to run headless typically would not have such an image return the descriptor for an about image or code null code if none public Image Descriptor get About Image if about Image null product null about Image Product Properties get About Image product return about Image  ImageDescriptor getAboutImage aboutImage aboutImage ProductProperties getAboutImage aboutImage
Return an array of image descriptors for the window images to use for this product The expectations is that the elements will be the same image rendered at different sizes Products designed to run headless typically would not have such images return an array of the image descriptors for the window images or code null code if none public Image Descriptor get Window Images if window Images null product null window Images Product Properties get Window Images product return window Images  ImageDescriptor getWindowImages windowImages windowImages ProductProperties getWindowImages windowImages
Returns the text to show in an about dialog for this product Products designed to run headless typically would not have such text return the about text or code null code if none public String get About Text if about Text null product null about Text Product Properties get About Text product return about Text  getAboutText aboutText aboutText ProductProperties getAboutText aboutText

private static String load Mappings I Product product Platform get Product if product null return new String 0 URL location Platform find product get Defining Bundle new Path ABOUT MAPPINGS Property Resource Bundle bundle null Input Stream is if location null is null try is location open Stream bundle new Property Resource Bundle is catch IO Exception e bundle null finally try if is null is close catch IO Exception e do nothing if we fail to close Array List mappings List new Array List if bundle null boolean found true int i 0 while found try mappings List add bundle get String Integer to String i catch Missing Resource Exception e found false i return String mappings List to Array new String mappings List size  loadMappings IProduct getProduct getDefiningBundle ABOUT_MAPPINGS PropertyResourceBundle InputStream openStream PropertyResourceBundle IOException IOException ArrayList mappingsList ArrayList mappingsList getString toString MissingResourceException mappingsList toArray mappingsList
This instance will return properties from the given product The properties are retrieved in a lazy fashion and cached for later retrieval param product must not be null public Product Properties I Product product if product null throw new Illegal Argument Exception this product product  ProductProperties IProduct IllegalArgumentException
The application name used to initialize the SWT Display This value is distinct from the string displayed in the application title bar p E g On motif this can be used to set the name used for resource lookup p see org eclipse swt widgets Display set App Name public String get App Name if app Name null app Name get App Name product return app Name  setAppName getAppName appName appName getAppName appName
The text to show in an about dialog for this product Products designed to run headless typically would not have such text public String get About Text if about Text null about Text get About Text product return about Text  getAboutText aboutText aboutText getAboutText aboutText
An image which can be shown in an about dialog for this product Products designed to run headless typically would not have such an image p A full sized product image no larger than 500x330 pixels is shown without the about Text blurb A half sized product image no larger than 250x330 pixels is shown with the about Text blurb beside it public Image Descriptor get About Image if about Image Descriptor null about Image Descriptor get About Image product return about Image Descriptor  aboutText aboutText ImageDescriptor getAboutImage aboutImageDescriptor aboutImageDescriptor getAboutImage aboutImageDescriptor
An array of one or more images to be used for this product The expectation is that the array will contain the same image rendered at different sizes 16x16 and 32x32 Products designed to run headless typically would not have such images p If this property is given then it supercedes code WINDOW IMAGE code p public Image Descriptor get Window Images if window Image Descriptors null window Image Descriptors get Window Images product return window Image Descriptors  WINDOW_IMAGE ImageDescriptor getWindowImages windowImageDescriptors windowImageDescriptors getWindowImages windowImageDescriptors
Location of the product s welcome page special XML based format either a fully qualified valid URL or a path relative to the product s defining bundle Products designed to run headless typically would not have such a page Use of this property is discouraged in 3 0 the new org eclipse ui intro extension point should be used instead public URL get Welcome Page Url if welcome Page Url null welcome Page Url get Welcome Page Url product return welcome Page Url  getWelcomePageUrl welcomePageUrl welcomePageUrl getWelcomePageUrl welcomePageUrl
Returns the product name or code null code This is shown in the window title and the About action public String get Product Name if product Name null product Name get Product Name product return product Name  getProductName productName productName getProductName productName
Returns the id for the product or code null code if none public String get Product Id if product Id null product Id get Product Id product return product Id  getProductId productId productId getProductId productId
The application name used to initialize the SWT Display This value is distinct from the string displayed in the application title bar p E g On motif this can be used to set the name used for resource lookup p p The returned value will have n values substituted based on the current product s mappings regardless of the given product argument p see org eclipse swt widgets Display set App Name public static String get App Name I Product product String property product get Property APP NAME if property null return NON NLS 1 if property index Of 1 return property return Message Format format property mappings  setAppName getAppName IProduct getProperty APP_NAME indexOf MessageFormat
The text to show in an about dialog for this product Products designed to run headless typically would not have such text p The returned value will have n values substituted based on the current product s mappings regardless of the given product argument p public static String get About Text I Product product String property product get Property ABOUT TEXT if property null return NON NLS 1 if property index Of 1 return property return Message Format format property mappings  getAboutText IProduct getProperty ABOUT_TEXT indexOf MessageFormat
An image which can be shown in an about dialog for this product Products designed to run headless typically would not have such an image p A full sized product image no larger than 500x330 pixels is shown without the about Text blurb A half sized product image no larger than 250x330 pixels is shown with the about Text blurb beside it public static Image Descriptor get About Image I Product product return get Image product get Property ABOUT IMAGE product get Defining Bundle  aboutText aboutText ImageDescriptor getAboutImage IProduct getImage getProperty ABOUT_IMAGE getDefiningBundle
An array of one or more images to be used for this product The expectation is that the array will contain the same image rendered at different sizes 16x16 and 32x32 Products designed to run headless typically would not have such images p If this property is given then it supercedes code WINDOW IMAGE code p public static Image Descriptor get Window Images I Product product String property product get Property WINDOW IMAGES for compatibility with pre 3 0 plugins that may still use WINDOW IMAGE if property null property product get Property WINDOW IMAGE return get Images property product get Defining Bundle  WINDOW_IMAGE ImageDescriptor getWindowImages IProduct getProperty WINDOW_IMAGES WINDOW_IMAGE getProperty WINDOW_IMAGE getImages getDefiningBundle
Location of the product s welcome page special XML based format either a fully qualified valid URL or a path relative to the product s defining bundle Products designed to run headless typically would not have such a page Use of this property is discouraged in 3 0 the new org eclipse ui intro extension point should be used instead public static URL get Welcome Page Url I Product product return get Url product get Property WELCOME PAGE product get Defining Bundle  getWelcomePageUrl IProduct getUrl getProperty WELCOME_PAGE getDefiningBundle
Returns the product name or code null code This is shown in the window title and the About action public static String get Product Name I Product product return product get Name  getProductName IProduct getName
Returns the id for the product public static String get Product Id I Product product return product get Id  getProductId IProduct getId

interface I Animation Container The animation has started public abstract void animation Start  IAnimationContainer animationStart
public abstract void animation Start The animation has ended public abstract void animation Done  animationStart animationDone
see org eclipse ui internal progress Animation Item I Animation Container animation Done public void animation Done Do nothing by default  AnimationItem IAnimationContainer animationDone animationDone
see org eclipse ui internal progress Animation Item I Animation Container animation Start public void animation Start Do nothing by default  AnimationItem IAnimationContainer animationStart animationStart
private Object window Lock new Object Create a new instance of the receiver param workbench Window the window being created param manager the Animation Manager that will run this item public Animation Item Workbench Window workbench Window this window workbench Window  windowLock workbenchWindow AnimationManager AnimationItem WorkbenchWindow workbenchWindow workbenchWindow
Create the canvas that will display the image param parent public void create Control Composite parent Control animation Item create Animation Item parent animation Item add Mouse Listener new Mouse Listener non Javadoc see org eclipse swt events Mouse Listener mouse Double Click org eclipse swt events Mouse Event public void mouse Double Click Mouse Event arg0 Progress Manager Util open Progress View Animation Item this window non Javadoc see org eclipse swt events Mouse Listener mouse Down org eclipse swt events Mouse Event public void mouse Down Mouse Event arg0 Do nothing non Javadoc see org eclipse swt events Mouse Listener mouse Up org eclipse swt events Mouse Event public void mouse Up Mouse Event arg0 Do nothing animation Item add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e Animation Manager get Instance remove Item Animation Item this Animation Manager get Instance add Item this  createControl animationItem createAnimationItem animationItem addMouseListener MouseListener MouseListener mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent ProgressManagerUtil openProgressView AnimationItem MouseListener mouseDown MouseEvent mouseDown MouseEvent MouseListener mouseUp MouseEvent mouseUp MouseEvent animationItem addDisposeListener DisposeListener widgetDisposed DisposeEvent AnimationManager getInstance removeItem AnimationItem AnimationManager getInstance addItem
Create the animation item control param parent the parent Composite return Control 
Paint the image in the canvas param event The Paint Event that generated this call param image The image to display param image Data The array of Image Data Required to show an animation void paint Image Paint Event event Image image Image Data image Data event gc draw Image image 0 0  PaintEvent imageData ImageData paintImage PaintEvent ImageData imageData drawImage
Get the SWT control for the receiver return Control 
The animation has begun void animation Start animation Container animation Start  animationStart animationContainer animationStart
The animation has ended void animation Done animation Container animation Done  animationDone animationContainer animationDone
Get the preferred width of the receiver return int public int get Preferred Width return Animation Manager get Instance get Preferred Width 5  getPreferredWidth AnimationManager getInstance getPreferredWidth
Set the container that will be updated when this runs param animation Container The animation Container to set void set Animation Container I Animation Container container this animation Container container  animationContainer animationContainer setAnimationContainer IAnimationContainer animationContainer

public static Animation Manager get Instance if singleton null singleton new Animation Manager return singleton  AnimationManager getInstance AnimationManager
Get the background color to be used param control The source of the display return Color static Color get Item Background Color Control control return control get Display get System Color SWT COLOR INFO BACKGROUND  getItemBackgroundColor getDisplay getSystemColor COLOR_INFO_BACKGROUND
public I Status run InUI Thread I Progress Monitor monitor if animated animation Processor animation Started else animation Processor animation Finished return Status OK STATUS  IStatus runInUIThread IProgressMonitor animationProcessor animationStarted animationProcessor animationFinished OK_STATUS
Animation Manager animation Processor new Progress Animation Processor this listener get Progress Listener Progress Manager get Instance add Listener listener animation Update Job new Workbench Job Progress Messages get String Animation Manager Animation Start NON NLS 1 non Javadoc see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor monitor if animated animation Processor animation Started else animation Processor animation Finished return Status OK STATUS animation Update Job set System true  AnimationManager animationProcessor ProgressAnimationProcessor getProgressListener ProgressManager getInstance addListener animationUpdateJob WorkbenchJob ProgressMessages getString AnimationManager AnimationStart UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor animationProcessor animationStarted animationProcessor animationFinished OK_STATUS animationUpdateJob setSystem
Add an item to the list param item void add Item final Animation Item item animation Processor add Item item  addItem AnimationItem animationProcessor addItem
Remove an item from the list param item void remove Item final Animation Item item animation Processor remove Item item  removeItem AnimationItem animationProcessor removeItem
Return whether or not the current state is animated return boolean boolean is Animated return animated  isAnimated
Set whether or not the receiver is animated param boolean void set Animated final boolean bool animated bool animation Update Job schedule 100  setAnimated animationUpdateJob
Dispose the images in the receiver void dispose set Animated false Progress Manager get Instance remove Listener listener  setAnimated ProgressManager getInstance removeListener
see org eclipse ui internal progress I Job Progress Manager Listener add Job org eclipse ui internal progress Job Info public void add Job Job Info info increment Job Count info  IJobProgressManagerListener addJob JobInfo addJob JobInfo incrementJobCount
public void refresh Job Info Job Info info int state info get Job get State if state Job RUNNING add Job info else remove Job info  refreshJobInfo JobInfo getJob getState addJob removeJob
public void refresh All Progress Manager manager Progress Manager get Instance jobs clear set Animated false Job Info current Infos manager get Job Infos shows Debug for int i 0 i current Infos length i add Job current Infos i  refreshAll ProgressManager ProgressManager getInstance setAnimated JobInfo currentInfos getJobInfos showsDebug currentInfos addJob currentInfos
see org eclipse ui internal progress I Job Progress Manager Listener remove org eclipse ui internal progress Job Info public void remove Job Job Info info decrement Job Count info get Job  IJobProgressManagerListener JobInfo removeJob JobInfo decrementJobCount getJob
see org eclipse ui internal progress I Job Progress Manager Listener shows Debug public boolean shows Debug return false  IJobProgressManagerListener showsDebug showsDebug
private void increment Job Count Job Info info Don t count the animate job itself if is Not Tracked info return if jobs is Empty set Animated true jobs add info get Job  incrementJobCount JobInfo isNotTracked isEmpty setAnimated getJob
private void decrement Job Count Job job jobs remove job if jobs is Empty set Animated false  decrementJobCount isEmpty setAnimated
If this is one of our jobs or not running then don t bother private boolean is Not Tracked Job Info info We always track errors Job job info get Job return job get State Job RUNNING animation Processor is Processor Job job  isNotTracked JobInfo getJob getState animationProcessor isProcessorJob
see org eclipse ui internal progress I Job Progress Manager Listener add Group org eclipse ui internal progress Group Info public void add Group Group Info info Don t care about groups  IJobProgressManagerListener addGroup GroupInfo addGroup GroupInfo
see org eclipse ui internal progress I Job Progress Manager Listener remove Group org eclipse ui internal progress Group Info public void remove Group Group Info group Don t care about groups  IJobProgressManagerListener removeGroup GroupInfo removeGroup GroupInfo
see org eclipse ui internal progress I Job Progress Manager Listener refresh Group org eclipse ui internal progress Group Info public void refresh Group Group Info info Don t care about groups  IJobProgressManagerListener refreshGroup GroupInfo refreshGroup GroupInfo
private I Job Progress Manager Listener get Progress Listener return new I Job Progress Manager Listener Set jobs Collections synchronized Set new Hash Set non Javadoc see org eclipse ui internal progress I Job Progress Manager Listener add Job org eclipse ui internal progress Job Info public void add Job Job Info info increment Job Count info non Javadoc see org eclipse ui internal progress I Job Progress Manager Listener refresh Job Info org eclipse ui internal progress Job Info public void refresh Job Info Job Info info int state info get Job get State if state Job RUNNING add Job info else remove Job info non Javadoc see org eclipse ui internal progress I Job Progress Manager Listener refresh All public void refresh All Progress Manager manager Progress Manager get Instance jobs clear set Animated false Job Info current Infos manager get Job Infos shows Debug for int i 0 i current Infos length i add Job current Infos i non Javadoc see org eclipse ui internal progress I Job Progress Manager Listener remove org eclipse ui internal progress Job Info public void remove Job Job Info info decrement Job Count info get Job non Javadoc see org eclipse ui internal progress I Job Progress Manager Listener shows Debug public boolean shows Debug return false private void increment Job Count Job Info info Don t count the animate job itself if is Not Tracked info return if jobs is Empty set Animated true jobs add info get Job Decrement the job count for the job private void decrement Job Count Job job jobs remove job if jobs is Empty set Animated false If this is one of our jobs or not running then don t bother private boolean is Not Tracked Job Info info We always track errors Job job info get Job return job get State Job RUNNING animation Processor is Processor Job job non Javadoc see org eclipse ui internal progress I Job Progress Manager Listener add Group org eclipse ui internal progress Group Info public void add Group Group Info info Don t care about groups non Javadoc see org eclipse ui internal progress I Job Progress Manager Listener remove Group org eclipse ui internal progress Group Info public void remove Group Group Info group Don t care about groups non Javadoc see org eclipse ui internal progress I Job Progress Manager Listener refresh Group org eclipse ui internal progress Group Info public void refresh Group Group Info info Don t care about groups  IJobProgressManagerListener getProgressListener IJobProgressManagerListener synchronizedSet HashSet IJobProgressManagerListener addJob JobInfo addJob JobInfo incrementJobCount IJobProgressManagerListener refreshJobInfo JobInfo refreshJobInfo JobInfo getJob getState addJob removeJob IJobProgressManagerListener refreshAll refreshAll ProgressManager ProgressManager getInstance setAnimated JobInfo currentInfos getJobInfos showsDebug currentInfos addJob currentInfos IJobProgressManagerListener JobInfo removeJob JobInfo decrementJobCount getJob IJobProgressManagerListener showsDebug showsDebug incrementJobCount JobInfo isNotTracked isEmpty setAnimated getJob decrementJobCount isEmpty setAnimated isNotTracked JobInfo getJob getState animationProcessor isProcessorJob IJobProgressManagerListener addGroup GroupInfo addGroup GroupInfo IJobProgressManagerListener removeGroup GroupInfo removeGroup GroupInfo IJobProgressManagerListener refreshGroup GroupInfo refreshGroup GroupInfo
Get the preferred width for widgets displaying the animation return int Return 0 if there is no image data int get Preferred Width return animation Processor get Preferred Width  getPreferredWidth animationProcessor getPreferredWidth

private UI Job job public Awaiting Feedback Info String info Message UI Job info Job this message info Message this job info Job  UIJob AwaitingFeedbackInfo infoMessage UIJob infoJob infoMessage infoJob
Return the job for the receiver return public UI Job get Job return this job  UIJob getJob
Return the message for the receiver return public String get Message return this message  getMessage

see org eclipse ui internal progress Job Tree Element get Children Object get Children return null  JobTreeElement getChildren getChildren
String get Display String if blocked Task Name null return Progress Messages get String Blocked Jobs Dialog User Interface Tree Element NON NLS 1 return blocked Task Name  getDisplayString blockedTaskName ProgressMessages getString BlockedJobsDialog UserInterfaceTreeElement blockedTaskName
see org eclipse ui internal progress Job Tree Element get Display Image public Image get Display Image return J Face Resources get Image Progress Manager WAITING JOB KEY  JobTreeElement getDisplayImage getDisplayImage JFaceResources getImage ProgressManager WAITING_JOB_KEY
see org eclipse ui internal progress Job Tree Element get Parent Object get Parent return null  JobTreeElement getParent getParent
see org eclipse ui internal progress Job Tree Element has Children boolean has Children return false  JobTreeElement hasChildren hasChildren
see org eclipse ui internal progress Job Tree Element is Active boolean is Active return true  JobTreeElement isActive isActive
see org eclipse ui internal progress Job Tree Element is Job Info boolean is Job Info return false  JobTreeElement isJobInfo isJobInfo
see org eclipse ui internal progress Job Tree Element cancel public void cancel blocking Monitor set Canceled true  JobTreeElement blockingMonitor setCanceled
see org eclipse ui internal progress Job Tree Element is Cancellable public boolean is Cancellable return true  JobTreeElement isCancellable isCancellable
Creates a progress monitor dialog under the given shell It also sets the dialog s message The dialog is opened automatically after a reasonable delay When no longer needed the dialog must be closed by calling code close I Progress Monitor code where the supplied monitor is the same monitor passed to this factory method param parent Shell The parent shell or code null code to create a top level shell If the parent Shell is not null we will open immediately as parenting has been determined If it is code null code then the dialog will not open until there is no modal shell blocking it param blocked Monitor The monitor that is currently blocked param reason A status describing why the monitor is blocked param task Name A name to give the blocking task in the dialog return Blocked Jobs Dialog public static Blocked Jobs Dialog create Blocked Dialog Shell parent Shell I Progress Monitor blocked Monitor I Status reason String task Name use an existing dialog if available if singleton null return singleton singleton new Blocked Jobs Dialog parent Shell blocked Monitor reason if task Name null if singleton get Parent Shell null singleton set Blocked Task Name singleton get Parent Shell get Text else singleton set Blocked Task Name task Name If there is no parent shell we have not been asked for a parent so we want to avoid blocking If there is a parent then it is OK to open if parent Shell null create the job that will open the dialog after a delay Workbench Job dialog Job new Workbench Job Workbench Messages get String Event Loop Progress Monitor Open Dialog Job Name NON NLS 1 non Javadoc see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor monitor if singleton null return Status CANCEL STATUS if Progress Manager Util reschedule If Modal Shell Open this return Status CANCEL STATUS singleton open return Status OK STATUS Wait for long operation time to prevent a proliferation of dialogs dialog Job set System true dialog Job schedule PlatformUI get Workbench get Progress Service get Long Operation Time else singleton open return singleton  IProgressMonitor parentShell parentShell blockedMonitor taskName BlockedJobsDialog BlockedJobsDialog createBlockedDialog parentShell IProgressMonitor blockedMonitor IStatus taskName BlockedJobsDialog parentShell blockedMonitor taskName getParentShell setBlockedTaskName getParentShell getText setBlockedTaskName taskName parentShell WorkbenchJob dialogJob WorkbenchJob WorkbenchMessages getString EventLoopProgressMonitor OpenDialogJobName UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor CANCEL_STATUS ProgressManagerUtil rescheduleIfModalShellOpen CANCEL_STATUS OK_STATUS dialogJob setSystem dialogJob getWorkbench getProgressService getLongOperationTime
monitor is done Clear the receiver param monitor The monitor that is now cleared public static void clear I Progress Monitor monitor if singleton null return singleton close monitor  IProgressMonitor
Creates a progress monitor dialog under the given shell It also sets the dialog s message code open code is non blocking param parent Shell The parent shell or code null code to create a top level shell param blocking The monitor that is blocking the job param blocking Status A status describing why the monitor is blocked private Blocked Jobs Dialog Shell parent Shell I Progress Monitor blocking I Status blocking Status super parent Shell null Progress Manager Util get Non Modal Shell parent Shell blocking Monitor blocking if blocking Status instanceof I Job Status blocking Job I Job Status blocking Status get Job set Shell Style SWT BORDER SWT TITLE SWT APPLICATION MODAL SWT RESIZE no close button set Block On Open false set Message blocking Status get Message  parentShell blockingStatus BlockedJobsDialog parentShell IProgressMonitor IStatus blockingStatus parentShell ProgressManagerUtil getNonModalShell parentShell blockingMonitor blockingStatus IJobStatus blockingJob IJobStatus blockingStatus getJob setShellStyle APPLICATION_MODAL setBlockOnOpen setMessage blockingStatus getMessage
This method creates the dialog area under the parent composite param parent The parent Composite return parent The parent Composite protected Control create Dialog Area Composite parent set Message message create Message Area parent show Job Details parent return parent  createDialogArea setMessage createMessageArea showJobDetails
This method creates a dialog area in the parent composite and displays a progress tree viewer of the running jobs param parent The parent Composite void show Job Details Composite parent viewer new New Progress Viewer parent SWT MULTI SWT H SCROLL SWT V SCROLL SWT BORDER if blocking Job null viewer set Highlight Job blocking Job viewer set Use Hashlookup true viewer set Sorter new Viewer Sorter non Javadoc see org eclipse jface viewers Viewer Sorter compare org eclipse jface viewers Viewer java lang Object java lang Object public int compare Viewer test Viewer Object e1 Object e2 return Comparable e1 compare To e2 I Content Provider provider get Content Provider viewer set Content Provider provider viewer set Input provider viewer set Label Provider new Progress Label Provider Grid Data data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL Grid Data FILL BOTH data horizontal Span 2 int height Hint convert Height In Chars To Pixels 10 data height Hint height Hint viewer get Control set Layout Data data  showJobDetails NewProgressViewer H_SCROLL V_SCROLL blockingJob setHighlightJob blockingJob setUseHashlookup setSorter ViewerSorter ViewerSorter testViewer compareTo IContentProvider getContentProvider setContentProvider setInput setLabelProvider ProgressLabelProvider GridData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL GridData FILL_BOTH horizontalSpan heightHint convertHeightInCharsToPixels heightHint heightHint getControl setLayoutData
public Object get Elements Object input Element Object elements super get Elements input Element Object result new Object elements length 1 System arraycopy elements 0 result 1 elements length result 0 blocked Element return result  getElements inputElement getElements inputElement blockedElement
Return the content provider used for the receiver return Progress Tree Content Provider private Progress Tree Content Provider get Content Provider return new Progress Tree Content Provider viewer true non Javadoc see org eclipse ui internal progress Progress Content Provider get Elements java lang Object public Object get Elements Object input Element Object elements super get Elements input Element Object result new Object elements length 1 System arraycopy elements 0 result 1 elements length result 0 blocked Element return result  ProgressTreeContentProvider ProgressTreeContentProvider getContentProvider ProgressTreeContentProvider ProgressContentProvider getElements getElements inputElement getElements inputElement blockedElement
Clear the cursors in the dialog private void clear Cursors clear Cursor cancel Selected clear Cursor get Shell if arrow Cursor null arrow Cursor dispose if wait Cursor null wait Cursor dispose arrow Cursor null wait Cursor null  clearCursors clearCursor cancelSelected clearCursor getShell arrowCursor arrowCursor waitCursor waitCursor arrowCursor waitCursor
Clear the cursor on the supplied control param control private void clear Cursor Control control if control null control is Disposed control set Cursor null  clearCursor isDisposed setCursor
protected void configure Shell Shell shell super configure Shell shell shell set Text Progress Messages get String Blocked Jobs Dialog Blocked Title NON NLS 1 if wait Cursor null wait Cursor new Cursor shell get Display SWT CURSOR WAIT shell set Cursor wait Cursor  configureShell configureShell setText ProgressMessages getString BlockedJobsDialog BlockedTitle waitCursor waitCursor getDisplay CURSOR_WAIT setCursor waitCursor
This method sets the message in the message label param message String the String for the message area private void set Message String message String must not set null text in a label message message String null message String NON NLS 1 if message Label null message Label is Disposed return message Label set Text message  messageString setMessage messageString messageString messageString messageLabel messageLabel isDisposed messageLabel setText
see org eclipse jface dialogs Icon And Message Dialog get Image protected Image get Image return get Info Image  IconAndMessageDialog getImage getImage getInfoImage
Returns the progress monitor being used for this dialog This allows recursive blockages to also respond to cancelation return public I Progress Monitor get Progress Monitor return blocking Monitor  IProgressMonitor getProgressMonitor blockingMonitor
Requests that the blocked jobs dialog be closed The supplied monitor must be the same one that was passed to the create Blocked Dialog method param monitor return I Progress Monitor public boolean close I Progress Monitor monitor ignore requests to close the dialog from all but the first monitor if blocking Monitor monitor return false return close  createBlockedDialog IProgressMonitor IProgressMonitor blockingMonitor
public boolean close Clear the singleton first singleton null clear Cursors return super close  clearCursors
see org eclipse jface dialogs Icon And Message Dialog create Button Bar org eclipse swt widgets Composite protected Control create Button Bar Composite parent Do nothing here as we want no buttons return parent  IconAndMessageDialog createButtonBar createButtonBar
param task Name The blocked Task Name to set void set Blocked Task Name String task Name this blocked Task Name task Name  taskName blockedTaskName setBlockedTaskName taskName blockedTaskName taskName

Create a new instance of the receiver param status public Error Info I Status status String name error Status status job Name name  ErrorInfo IStatus errorStatus jobName
see org eclipse ui internal progress Job Tree Element get Parent Object get Parent return null  JobTreeElement getParent getParent
see org eclipse ui internal progress Job Tree Element has Children boolean has Children return false  JobTreeElement hasChildren hasChildren
see org eclipse ui internal progress Job Tree Element get Children Object get Children return null  JobTreeElement getChildren getChildren
see org eclipse ui internal progress Job Tree Element get Display String String get Display String return Progress Messages format Job Info Error NON NLS 1 new Object job Name error Status get Message  JobTreeElement getDisplayString getDisplayString ProgressMessages JobInfo jobName errorStatus getMessage
Return the image for the receiver return Image Image get Image return J Face Resources get Image Error Notification Manager ERROR JOB KEY  getImage JFaceResources getImage ErrorNotificationManager ERROR_JOB_KEY
see org eclipse ui internal progress Job Tree Element is Job Info boolean is Job Info return false  JobTreeElement isJobInfo isJobInfo
Return the current status of the receiver return I Status I Status get Error Status return error Status  IStatus IStatus getErrorStatus errorStatus
see org eclipse ui internal progress Job Tree Element is Active boolean is Active return true  JobTreeElement isActive isActive

Create a new instance of the receiver param parent Shell public Error Notification Dialog Shell parent Shell super parent Shell null Progress Manager Util get Default Parent parent Shell set Block On Open false set Shell Style SWT CLOSE SWT MODELESS SWT BORDER SWT TITLE SWT RESIZE  parentShell ErrorNotificationDialog parentShell parentShell ProgressManagerUtil getDefaultParent parentShell setBlockOnOpen setShellStyle
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text Progress Messages get String Error Notification Dialog Error Notification Title NON NLS 1 new Shell add Dispose Listener new Dispose Listener non Javadoc see org eclipse swt events Dispose Listener widget Disposed org eclipse swt events Dispose Event public void widget Disposed Dispose Event e get Manager clear Dialog  configureShell newShell configureShell newShell newShell setText ProgressMessages getString ErrorNotificationDialog ErrorNotificationTitle newShell addDisposeListener DisposeListener DisposeListener widgetDisposed DisposeEvent widgetDisposed DisposeEvent getManager clearDialog
see org eclipse jface window Window get Shell Style protected int get Shell Style return super get Shell Style SWT MIN  getShellStyle getShellStyle getShellStyle
protected Control create Dialog Area Composite parent initialize Dialog Units parent Composite top Area Composite super create Dialog Area parent error Viewer new Table Viewer top Area SWT MULTI SWT H SCROLL SWT V SCROLL SWT BORDER error Viewer set Sorter get Viewer Sorter error Viewer get Control add Mouse Listener new Mouse Adapter non Javadoc see org eclipse swt events Mouse Adapter mouse Double Click org eclipse swt events Mouse Event public void mouse Double Click Mouse Event e open Error Dialog error Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event clear Button set Enabled error Viewer get Selection is Empty set Details Contents Control control error Viewer get Control Grid Data data new Grid Data Grid Data FILL BOTH Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL data width Hint convert Width In Chars To Pixels 60 data height Hint convert Height In Chars To Pixels 10 control set Layout Data data init Content Provider init Label Provider apply Dialog Font parent create Details List top Area return top Area  createDialogArea initializeDialogUnits topArea createDialogArea errorViewer TableViewer topArea H_SCROLL V_SCROLL errorViewer setSorter getViewerSorter errorViewer getControl addMouseListener MouseAdapter MouseAdapter mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent openErrorDialog errorViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent clearButton setEnabled errorViewer getSelection isEmpty setDetailsContents errorViewer getControl GridData GridData GridData FILL_BOTH GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL widthHint convertWidthInCharsToPixels heightHint convertHeightInCharsToPixels setLayoutData initContentProvider initLabelProvider applyDialogFont createDetailsList topArea topArea
protected void create Buttons For Button Bar Composite parent clear Button create Button parent I Dialog Constants CLIENT ID 2 Progress Messages get String Error Notification Dialog Clear Button Title false NON NLS 1 clear Button set Enabled false clear Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Selection raw Selection error Viewer get Selection if raw Selection null raw Selection instanceof I Structured Selection I Structured Selection selection I Structured Selection raw Selection get Manager remove Errors selection to List refresh Button button create Button parent I Dialog Constants CLOSE ID I Dialog Constants CLOSE LABEL true button add Selection Listener new Selection Listener non Javadoc see org eclipse swt events Selection Listener widget Selected org eclipse swt events Selection Event public void widget Selected Selection Event e close non Javadoc see org eclipse swt events Selection Listener widget Default Selected org eclipse swt events Selection Event public void widget Default Selected Selection Event e close  createButtonsForButtonBar clearButton createButton IDialogConstants CLIENT_ID ProgressMessages getString ErrorNotificationDialog ClearButtonTitle clearButton setEnabled clearButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent ISelection rawSelection errorViewer getSelection rawSelection rawSelection IStructuredSelection IStructuredSelection IStructuredSelection rawSelection getManager removeErrors toList createButton IDialogConstants CLOSE_ID IDialogConstants CLOSE_LABEL addSelectionListener SelectionListener SelectionListener widgetSelected SelectionEvent widgetSelected SelectionEvent SelectionListener widgetDefaultSelected SelectionEvent widgetDefaultSelected SelectionEvent
java lang Object java lang Object public int compare Viewer test Viewer Object e1 Object e2 return Comparable e1 compare To e2  testViewer compareTo
Return a viewer sorter for looking at the jobs return private Viewer Sorter get Viewer Sorter return new Viewer Sorter non Javadoc see org eclipse jface viewers Viewer Sorter compare org eclipse jface viewers Viewer java lang Object java lang Object public int compare Viewer test Viewer Object e1 Object e2 return Comparable e1 compare To e2  ViewerSorter getViewerSorter ViewerSorter ViewerSorter testViewer compareTo
see org eclipse jface viewers I Content Provider dispose public void dispose Nothing of interest here  IContentProvider
see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return get Manager get Errors to Array  IStructuredContentProvider getElements getElements inputElement getManager getErrors toArray
public void input Changed Viewer viewer Object old Input Object new Input if new Input null refresh  inputChanged oldInput newInput newInput
Sets the content provider for the viewer protected void init Content Provider I Content Provider provider new I Structured Content Provider non Javadoc see org eclipse jface viewers I Content Provider dispose public void dispose Nothing of interest here non Javadoc see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return get Manager get Errors to Array non Javadoc see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input if new Input null refresh error Viewer set Content Provider provider error Viewer set Input get Manager  initContentProvider IContentProvider IStructuredContentProvider IContentProvider IStructuredContentProvider getElements getElements inputElement getManager getErrors toArray IContentProvider inputChanged inputChanged oldInput newInput newInput errorViewer setContentProvider errorViewer setInput getManager
Get the notification Manager that this is being created for return private Error Notification Manager get Manager return Progress Manager get Instance error Manager  notificationManager ErrorNotificationManager getManager ProgressManager getInstance errorManager
Refresh the contents of the viewer void refresh error Viewer refresh  errorViewer
see org eclipse jface viewers I Base Label Provider add Listener org eclipse jface viewers I Label Provider Listener public void add Listener I Label Provider Listener listener Do nothing  IBaseLabelProvider addListener ILabelProviderListener addListener ILabelProviderListener
see org eclipse jface viewers I Base Label Provider dispose public void dispose Do nothing  IBaseLabelProvider
int public Image get Column Image Object element int column Index return J Face Resources get Image Registry get Error Notification Manager ERROR JOB KEY  getColumnImage columnIndex JFaceResources getImageRegistry ErrorNotificationManager ERROR_JOB_KEY
int public String get Column Text Object element int column Index return Error Info element get Display String  getColumnText columnIndex ErrorInfo getDisplayString
java lang String public boolean is Label Property Object element String property return false  isLabelProperty
see org eclipse jface viewers I Base Label Provider remove Listener org eclipse jface viewers I Label Provider Listener public void remove Listener I Label Provider Listener listener Do nothing  IBaseLabelProvider removeListener ILabelProviderListener removeListener ILabelProviderListener
private void init Label Provider I Table Label Provider provider new I Table Label Provider non Javadoc see org eclipse jface viewers I Base Label Provider add Listener org eclipse jface viewers I Label Provider Listener public void add Listener I Label Provider Listener listener Do nothing non Javadoc see org eclipse jface viewers I Base Label Provider dispose public void dispose Do nothing non Javadoc see org eclipse jface viewers I Table Label Provider get Column Image java lang Object int public Image get Column Image Object element int column Index return J Face Resources get Image Registry get Error Notification Manager ERROR JOB KEY non Javadoc see org eclipse jface viewers I Table Label Provider get Column Text java lang Object int public String get Column Text Object element int column Index return Error Info element get Display String non Javadoc see org eclipse jface viewers I Base Label Provider is Label Property java lang Object java lang String public boolean is Label Property Object element String property return false non Javadoc see org eclipse jface viewers I Base Label Provider remove Listener org eclipse jface viewers I Label Provider Listener public void remove Listener I Label Provider Listener listener Do nothing error Viewer set Label Provider provider  initLabelProvider ITableLabelProvider ITableLabelProvider IBaseLabelProvider addListener ILabelProviderListener addListener ILabelProviderListener IBaseLabelProvider ITableLabelProvider getColumnImage getColumnImage columnIndex JFaceResources getImageRegistry ErrorNotificationManager ERROR_JOB_KEY ITableLabelProvider getColumnText getColumnText columnIndex ErrorInfo getDisplayString IBaseLabelProvider isLabelProperty isLabelProperty IBaseLabelProvider removeListener ILabelProviderListener removeListener ILabelProviderListener errorViewer setLabelProvider
Open the error dialog on the current selection private void open Error Dialog Error Info element get Single Selection if element null return Error Dialog open Error get Shell element get Display String null element get Error Status  openErrorDialog ErrorInfo getSingleSelection ErrorDialog openError getShell getDisplayString getErrorStatus
Get the single selection Return null if the selection is not just one element return Error Info or code null code private Error Info get Single Selection I Selection raw Selection error Viewer get Selection if raw Selection null raw Selection instanceof I Structured Selection I Structured Selection selection I Structured Selection raw Selection if selection size 1 return Error Info selection get First Element return null  ErrorInfo ErrorInfo getSingleSelection ISelection rawSelection errorViewer getSelection rawSelection rawSelection IStructuredSelection IStructuredSelection IStructuredSelection rawSelection ErrorInfo getFirstElement
public boolean close get Manager clear All Errors Rectangle shell Position get Shell get Bounds boolean result super close Progress Manager Util animate Down shell Position return result  getManager clearAllErrors shellPosition getShell getBounds ProgressManagerUtil animateDown shellPosition
protected void initialize Bounds super initialize Bounds Rectangle shell Position get Shell get Bounds Progress Manager Util animate Up shell Position  initializeBounds initializeBounds shellPosition getShell getBounds ProgressManagerUtil animateUp shellPosition
Create this dialog s drop down list component param details Parent the parent composite private void create Details List Composite details Parent create the list details List new List details Parent SWT BORDER SWT H SCROLL SWT V SCROLL SWT MULTI Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Grid Data VERTICAL ALIGN FILL Grid Data GRAB VERTICAL data height Hint details List get Item Height DETAILS LIST ITEM COUNT data horizontal Span 2 details List set Layout Data data Menu copy Menu new Menu details List Menu Item copy Item new Menu Item copy Menu SWT NONE copy Item add Selection Listener new Selection Listener see Selection Listener widget Selected Selection Event public void widget Selected Selection Event e copy To Clipboard see Selection Listener widget Default Selected Selection Event public void widget Default Selected Selection Event e copy To Clipboard copy Item set Text J Face Resources get String copy NON NLS 1 details List set Menu copy Menu  detailsParent createDetailsList detailsParent detailsList detailsParent H_SCROLL V_SCROLL GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL GridData VERTICAL_ALIGN_FILL GridData GRAB_VERTICAL heightHint detailsList getItemHeight DETAILS_LIST_ITEM_COUNT horizontalSpan detailsList setLayoutData copyMenu detailsList MenuItem copyItem MenuItem copyMenu copyItem addSelectionListener SelectionListener SelectionListener widgetSelected SelectionEvent widgetSelected SelectionEvent copyToClipboard SelectionListener widgetDefaultSelected SelectionEvent widgetDefaultSelected SelectionEvent copyToClipboard copyItem setText JFaceResources getString detailsList setMenu copyMenu
Set the contents of the details list to be the status from the selected error private void set Details Contents Collection status List new Array List Error Info info get Single Selection if info null selected Error info status List add selected Error get Error Status get Message if selected Error get Error Status get Exception null Throwable exception selected Error get Error Status get Exception status List add exception to String Stack Trace Element elements exception get Stack Trace for int i 0 i elements length i status List add elements i to String I Status statuses selected Error get Error Status get Children for int i 0 i statuses length i status List add NESTING INDENT statuses i get Message String items new String status List size status List to Array items details List set Items items  setDetailsContents statusList ArrayList ErrorInfo getSingleSelection selectedError statusList selectedError getErrorStatus getMessage selectedError getErrorStatus getException selectedError getErrorStatus getException statusList toString StackTraceElement getStackTrace statusList toString IStatus selectedError getErrorStatus getChildren statusList NESTING_INDENT getMessage statusList statusList toArray detailsList setItems
Copy the contents of the statuses to the clipboard private void copy To Clipboard if selected Error null return if clipboard null clipboard dispose String Buffer status Buffer new String Buffer populate Copy Buffer selected Error get Error Status status Buffer 0 clipboard new Clipboard details List get Display clipboard set Contents new Object status Buffer to String new Transfer Text Transfer get Instance  copyToClipboard selectedError StringBuffer statusBuffer StringBuffer populateCopyBuffer selectedError getErrorStatus statusBuffer detailsList getDisplay setContents statusBuffer toString TextTransfer getInstance
Put the details of the status of the error onto the stream param building Status param buffer param nesting private void populate Copy Buffer I Status building Status String Buffer buffer int nesting for int i 0 i nesting i buffer append NESTING INDENT NON NLS 1 buffer append building Status get Message if building Status get Exception null Throwable exception building Status get Exception buffer append n NON NLS 1 buffer append exception to String Stack Trace Element elements exception get Stack Trace for int i 0 i elements length i buffer append n NON NLS 1 buffer append elements i to String buffer append n NON NLS 1 I Status children building Status get Children for int i 0 i children length i populate Copy Buffer children i buffer nesting 1  buildingStatus populateCopyBuffer IStatus buildingStatus StringBuffer NESTING_INDENT buildingStatus getMessage buildingStatus getException buildingStatus getException toString StackTraceElement getStackTrace toString IStatus buildingStatus getChildren populateCopyBuffer

Create a new instance of the receiver public Error Notification Manager No special initialization  ErrorNotificationManager
Set up any images the error management needs param icons Root throws MalformedURL Exception void set Up Images URL icons Root throws MalformedURL Exception J Face Resources get Image Registry put ERROR JOB KEY Image Descriptor create FromURL new URL icons Root ERROR JOB  iconsRoot MalformedURLException setUpImages iconsRoot MalformedURLException JFaceResources getImageRegistry ERROR_JOB_KEY ImageDescriptor createFromURL iconsRoot ERROR_JOB
see java lang Runnable run public void run Exception Handler get Instance handle Exception exception  ExceptionHandler getInstance handleException
Add a new error to the list param status param job Name void add Error I Status status String job Name Handle out of memory errors via the workbench final Throwable exception status get Exception if exception null exception instanceof Out Of Memory Error PlatformUI get Workbench get Display async Exec new Runnable non Javadoc see java lang Runnable run public void run Exception Handler get Instance handle Exception exception return errors add new Error Info status job Name if dialog Active if dialog null refresh Dialog else open Error Dialog job Name status  jobName addError IStatus jobName getException OutOfMemoryError getWorkbench getDisplay asyncExec ExceptionHandler getInstance handleException ErrorInfo jobName dialogActive refreshDialog openErrorDialog jobName
see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor monitor dialog refresh return Status OK STATUS  UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor OK_STATUS
private void refresh Dialog UI Job refresh Job new UI Job Progress Messages get String Error Notification Manager Refresh Error Dialog Job NON NLS 1 non Javadoc see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor monitor dialog refresh return Status OK STATUS refresh Job set System true refresh Job schedule  refreshDialog UIJob refreshJob UIJob ProgressMessages getString ErrorNotificationManager RefreshErrorDialogJob UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor OK_STATUS refreshJob setSystem refreshJob
Get the currently registered errors in the receiver return Collection of Error Info Collection get Errors return errors  ErrorInfo getErrors
public I Status run InUI Thread I Progress Monitor monitor I Workbench workbench PlatformUI get Workbench Abort on shutdown if workbench instanceof Workbench Workbench workbench is Closing return Status CANCEL STATUS I Workbench Window window workbench get Active Workbench Window if window null return Status CANCEL STATUS dialog new Error Notification Dialog window get Shell dialog open return Status OK STATUS  IStatus runInUIThread IProgressMonitor IWorkbench getWorkbench isClosing CANCEL_STATUS IWorkbenchWindow getActiveWorkbenchWindow CANCEL_STATUS ErrorNotificationDialog getShell OK_STATUS
The job caleed job Name has just failed with status status Open the error dialog if possible otherwise log the error param job Name String The name of the Job param status I Status The status of the failure private void open Error Dialog String job Name I Status status if PlatformUI is Workbench Running We are shutdown so just log Workbench Plugin log job Name status return dialog Active true Workbench Job job new Workbench Job Progress Messages get String Error Notification Manager Open Error Dialog Job NON NLS 1 non Javadoc see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor monitor I Workbench workbench PlatformUI get Workbench Abort on shutdown if workbench instanceof Workbench Workbench workbench is Closing return Status CANCEL STATUS I Workbench Window window workbench get Active Workbench Window if window null return Status CANCEL STATUS dialog new Error Notification Dialog window get Shell dialog open return Status OK STATUS job set System true job schedule  jobName jobName IStatus openErrorDialog jobName IStatus isWorkbenchRunning WorkbenchPlugin jobName dialogActive WorkbenchJob WorkbenchJob ProgressMessages getString ErrorNotificationManager OpenErrorDialogJob UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor IWorkbench getWorkbench isClosing CANCEL_STATUS IWorkbenchWindow getActiveWorkbenchWindow CANCEL_STATUS ErrorNotificationDialog getShell OK_STATUS setSystem
Remove all of the errors supplied from the list of errors param errors To Remove Collection of Error Info void remove Errors Collection errors To Remove errors remove All errors To Remove  errorsToRemove ErrorInfo removeErrors errorsToRemove removeAll errorsToRemove
Clear all of the errors held onto by the receiver void clear All Errors errors clear  clearAllErrors
Remove the reference to the errors dialog void clear Dialog dialog null dialog Active false  clearDialog dialogActive

A job to be kept has finished void finished Job Tree Element jte  JobTreeElement
A kept job has been removed void removed Job Tree Element jte  JobTreeElement
static synchronized Finished Jobs get Instance if the Instance null the Instance new Finished Jobs return the Instance  FinishedJobs getInstance theInstance theInstance FinishedJobs theInstance
private Finished Jobs listener new I Job Progress Manager Listener public void add Job Job Info info check For Duplicates info  FinishedJobs IJobProgressManagerListener addJob JobInfo checkForDuplicates
check For Duplicates info public void add Group Group Info info check For Duplicates info  checkForDuplicates addGroup GroupInfo checkForDuplicates
check For Duplicates info public void refresh Job Info Job Info info check Tasks info  checkForDuplicates refreshJobInfo JobInfo checkTasks
check Tasks info public void refresh Group Group Info info  checkTasks refreshGroup GroupInfo
public void refresh Group Group Info info public void refresh All  refreshGroup GroupInfo refreshAll
public void remove Job Job Info info if keep info check For Duplicates info add info  removeJob JobInfo checkForDuplicates
public void remove Group Group Info group  removeGroup GroupInfo
public void remove Group Group Info group public boolean shows Debug return false  removeGroup GroupInfo showsDebug
private Finished Jobs listener new I Job Progress Manager Listener public void add Job Job Info info check For Duplicates info public void add Group Group Info info check For Duplicates info public void refresh Job Info Job Info info check Tasks info public void refresh Group Group Info info public void refresh All public void remove Job Job Info info if keep info check For Duplicates info add info public void remove Group Group Info group public boolean shows Debug return false Progress Manager get Instance add Listener listener  FinishedJobs IJobProgressManagerListener addJob JobInfo checkForDuplicates addGroup GroupInfo checkForDuplicates refreshJobInfo JobInfo checkTasks refreshGroup GroupInfo refreshAll removeJob JobInfo checkForDuplicates removeGroup GroupInfo showsDebug ProgressManager getInstance addListener
Returns true if Job Info indicates that it must be kept static boolean keep Job Info info Job job info get Job if job null Object prop job get Property New Progress Viewer KEEP PROPERTY if prop instanceof Boolean if Boolean prop boolean Value return true prop job get Property New Progress Viewer KEEPONE PROPERTY if prop instanceof Boolean if Boolean prop boolean Value return true I Status status job get Result if status null status get Severity I Status ERROR return true return false  JobInfo JobInfo getJob getProperty NewProgressViewer KEEP_PROPERTY booleanValue getProperty NewProgressViewer KEEPONE_PROPERTY booleanValue IStatus getResult getSeverity IStatus
Register for notification void add Listener Kept Jobs Listener l listeners add l  addListener KeptJobsListener
Deregister for notification void remove Listener Kept Jobs Listener l listeners remove l  removeListener KeptJobsListener
private void check For Duplicates Group Info info Object objects info get Children for int i 0 i objects length i if objects i instanceof Job Info check For Duplicates Job Info objects i  checkForDuplicates GroupInfo getChildren JobInfo checkForDuplicates JobInfo
private void check For Duplicates Job Tree Element info Job Tree Element to Be Removed find Jobs To Remove info if to Be Removed null for int i 0 i to Be Removed length i remove to Be Removed i  checkForDuplicates JobTreeElement JobTreeElement toBeRemoved findJobsToRemove toBeRemoved toBeRemoved toBeRemoved
Add given Job to list of kept jobs private void add Job Info info boolean fire false synchronized keptjobinfos if keptjobinfos contains info keptjobinfos add info long now System current Time Millis finished Time put info new Long now Object parent info get Parent if parent null keptjobinfos contains parent keptjobinfos add parent finished Time put parent new Long now fire true if fire Object l listeners get Listeners for int i 0 i l length i Kept Jobs Listener jv Kept Jobs Listener l i jv finished info  JobInfo currentTimeMillis finishedTime getParent finishedTime getListeners KeptJobsListener KeptJobsListener
static void dispose Action Job Tree Element jte if jte is Job Info Job Info ji Job Info jte Job job ji get Job if job null Object prop job get Property I Progress Constants ACTION PROPERTY if prop instanceof Action Factory I Workbench Action Action Factory I Workbench Action prop dispose  disposeAction JobTreeElement isJobInfo JobInfo JobInfo getJob getProperty IProgressConstants ACTION_PROPERTY ActionFactory IWorkbenchAction ActionFactory IWorkbenchAction
private Job Tree Element find Jobs To Remove Job Tree Element info if info is Job Info Job my Job null if info instanceof Job Info my Job Job Info info get Job else if info instanceof Sub Task Info Job Info parent Job Info Sub Task Info info get Parent if parent null my Job parent get Job if my Job null Object prop my Job get Property New Progress Viewer KEEPONE PROPERTY if prop instanceof Boolean Boolean prop boolean Value Array List found null Object my Root get Root info Job Tree Element all synchronized keptjobinfos all Job Tree Element keptjobinfos to Array new Job Tree Element keptjobinfos size for int i 0 i all length i Job Tree Element jte all i Object other Root get Root jte if other Root my Root jte is Job Info Job Info ji Job Info jte Job job ji get Job if job null job my Job job belongs To my Job if New Progress Viewer DEBUG System err println found other from family other Root NON NLS 1 if found null found new Array List found add other Root if found null return Job Tree Element found to Array new Job Tree Element found size return null  JobTreeElement findJobsToRemove JobTreeElement isJobInfo myJob JobInfo myJob JobInfo getJob SubTaskInfo JobInfo JobInfo SubTaskInfo getParent myJob getJob myJob myJob getProperty NewProgressViewer KEEPONE_PROPERTY booleanValue ArrayList myRoot getRoot JobTreeElement JobTreeElement toArray JobTreeElement JobTreeElement otherRoot getRoot otherRoot myRoot isJobInfo JobInfo JobInfo getJob myJob belongsTo myJob NewProgressViewer otherRoot ArrayList otherRoot JobTreeElement toArray JobTreeElement
private static Object get Root Job Tree Element jte Object parent while parent jte get Parent null jte Job Tree Element parent return jte  getRoot JobTreeElement getParent JobTreeElement
private void check Tasks Job Info info if keep info Task Info tinfo info get Task Info if tinfo null Job Tree Element to Be Removed null boolean fire false Job Tree Element element Job Tree Element tinfo get Parent synchronized keptjobinfos if element info keptjobinfos contains tinfo to Be Removed find Jobs To Remove element keptjobinfos add tinfo finished Time put tinfo new Long System current Time Millis if to Be Removed null for int i 0 i to Be Removed length i remove to Be Removed i if fire Object l listeners get Listeners for int i 0 i l length i Kept Jobs Listener jv Kept Jobs Listener l i jv finished info  checkTasks JobInfo TaskInfo getTaskInfo JobTreeElement toBeRemoved JobTreeElement JobTreeElement getParent toBeRemoved findJobsToRemove finishedTime currentTimeMillis toBeRemoved toBeRemoved toBeRemoved getListeners KeptJobsListener KeptJobsListener
void remove Job Tree Element jte boolean fire false synchronized keptjobinfos if keptjobinfos remove jte finished Time remove jte dispose Action jte if New Progress Viewer DEBUG System err println Finished Jobs sucessfully removed job NON NLS 1 delete all elements that have jte as their direct or indirect parent Job Tree Element jtes Job Tree Element keptjobinfos to Array new Job Tree Element keptjobinfos size for int i 0 i jtes length i Job Tree Element parent Job Tree Element jtes i get Parent if parent null if parent jte parent get Parent jte if keptjobinfos remove jtes i dispose Action jtes i finished Time remove jtes i fire true if fire notify listeners Object l listeners get Listeners for int i 0 i l length i Kept Jobs Listener jv Kept Jobs Listener l i jv removed jte  JobTreeElement finishedTime disposeAction NewProgressViewer FinishedJobs JobTreeElement JobTreeElement toArray JobTreeElement JobTreeElement JobTreeElement getParent getParent disposeAction finishedTime getListeners KeptJobsListener KeptJobsListener
Arrays sort all new Comparator public int compare Object o1 Object o2 long t1 get Finished Date As Long Job Tree Element o1 long t2 get Finished Date As Long Job Tree Element o2 if t1 t2 return 1 if t1 t2 return 1 return 0  getFinishedDateAsLong JobTreeElement getFinishedDateAsLong JobTreeElement
Returns all kept elements sorted by finished date Job Tree Element get Job Infos Job Tree Element all synchronized keptjobinfos all Job Tree Element keptjobinfos to Array new Job Tree Element keptjobinfos size Arrays sort all new Comparator public int compare Object o1 Object o2 long t1 get Finished Date As Long Job Tree Element o1 long t2 get Finished Date As Long Job Tree Element o2 if t1 t2 return 1 if t1 t2 return 1 return 0 return all  JobTreeElement getJobInfos JobTreeElement JobTreeElement toArray JobTreeElement getFinishedDateAsLong JobTreeElement getFinishedDateAsLong JobTreeElement
private long get Finished Date As Long Job Tree Element jte Object o finished Time get jte if o instanceof Long return Long o long Value return 0  getFinishedDateAsLong JobTreeElement finishedTime longValue
public Date get Finish Date Job Tree Element jte Object o finished Time get jte if o instanceof Long return new Date Long o long Value return null  getFinishDate JobTreeElement finishedTime longValue
public boolean is Finished Job Tree Element element return keptjobinfos contains element  isFinished JobTreeElement
public void clear All synchronized keptjobinfos Job Tree Element all Job Tree Element keptjobinfos to Array new Job Tree Element keptjobinfos size for int i 0 i all length i dispose Action all i keptjobinfos clear finished Time clear notify listeners Object l listeners get Listeners for int i 0 i l length i Kept Jobs Listener jv Kept Jobs Listener l i jv removed null  clearAll JobTreeElement JobTreeElement toArray JobTreeElement disposeAction finishedTime getListeners KeptJobsListener KeptJobsListener

see org eclipse ui internal progress Job Tree Element get Parent Object get Parent return null  JobTreeElement getParent getParent
boolean has Children synchronized lock return infos is Empty  hasChildren isEmpty
Object get Children synchronized lock return infos to Array  getChildren toArray
String get Display String if total 0 return task Name String message Values new String 2 message Values 0 task Name message Values 1 String value Of get Percent Done return Progress Messages format Job Info No Task Name Done Message message Values NON NLS 1  getDisplayString taskName messageValues messageValues taskName messageValues valueOf getPercentDone ProgressMessages JobInfo NoTaskNameDoneMessage messageValues
Return an integer representing the amount of work completed return int int get Percent Done return int current Work 100 total  getPercentDone currentWork
see org eclipse ui internal progress Job Tree Element is Job Info boolean is Job Info return false  JobTreeElement isJobInfo isJobInfo
see java lang Comparable compare To java lang Object public int compare To Object arg0 return get Display String compare To Job Tree Element arg0 get Display String  compareTo compareTo getDisplayString compareTo JobTreeElement getDisplayString
public void begin Task String name int total Work task Name name total total Work synchronized lock is Active true Progress Manager get Instance add Group this  beginTask totalWork taskName totalWork isActive ProgressManager getInstance addGroup
public void done synchronized lock is Active false Progress Manager get Instance remove Group this  isActive ProgressManager getInstance removeGroup
public void internal Worked double work synchronized lock current Work work  internalWorked currentWork
see org eclipse core runtime I Progress Monitor is Canceled public boolean is Canceled Just a group so no cancel state return false  IProgressMonitor isCanceled isCanceled
see org eclipse core runtime I Progress Monitor set Canceled boolean public void set Canceled boolean value cancel  IProgressMonitor setCanceled setCanceled
public void set Task Name String name synchronized this is Active true task Name name  setTaskName isActive taskName
see org eclipse core runtime I Progress Monitor sub Task java lang String public void sub Task String name Not interesting for this monitor  IProgressMonitor subTask subTask
see org eclipse core runtime I Progress Monitor worked int public void worked int work internal Worked work  IProgressMonitor internalWorked
Remove the job from the list of jobs param job void remove Job Info final Job Info job synchronized lock infos remove job if infos is Empty done  removeJobInfo JobInfo isEmpty
Remove the job from the list of jobs param job void add Job Info final Job Info job synchronized lock infos add job  addJobInfo JobInfo
see org eclipse ui internal progress Job Tree Element is Active boolean is Active return is Active  JobTreeElement isActive isActive isActive
public void cancel Object job Infos get Children for int i 0 i job Infos length i Job Info job Infos i cancel  jobInfos getChildren jobInfos JobInfo jobInfos
see org eclipse ui internal progress Job Tree Element is Cancellable public boolean is Cancellable return true  JobTreeElement isCancellable isCancellable

Add an item to the list of the items we are updating param item 
Remove an item from the list of the items we are updating param item 
Return whether or not the receiver has any items return 
Animation has begun Inform any listeners This is called from the UI Thread 
Animation has finished Inform any listeners This is called from the UI Thread 
Get the preferred width of the types of items this processor manages return 
Return whether or not this is a job used by the processor param job return 

Increment the busy count for job param job 
Decrement the busy count for job param job 

Refresh the viewer as a result of an addition of info param info 
Refresh the viewer as a result of an addition of group param info 
Refresh the I Job Progress Manager Listeners as a result of a change in info param info  IJobProgressManagerListeners
Refresh the I Job Progress Manager Listeners as a result of a change in groups param info  IJobProgressManagerListeners
Refresh the viewer for all jobs param info 
Refresh the viewer as a result of a removal of info param info 
Refresh the viewer as a result of a removal of group param info 
Return whether or not this listener shows debug information return boolean 

public interface I Progress Update Collector Refresh the viewer void refresh  IProgressUpdateCollector
Refresh the elements param elements 
Add the elements param elements Array of Job Tree Element  JobTreeElement
Remove the elements param elements Array of Job Tree Element  JobTreeElement

private int ticks 1 Return the job that the receiver is collecting data on return Job Job get Job return job  getJob
Return whether or not there is a task return boolean boolean has Task Info return task Info null  hasTaskInfo taskInfo
Set the name of the task Info param name void set Task Name String name task Info set Task Name name  taskInfo setTaskName taskInfo setTaskName
Create a top level Job Info param enclosing Job Job Info Job enclosing Job this job enclosing Job  JobInfo enclosingJob JobInfo enclosingJob enclosingJob
String get Display String String name get Display String With Status if job is System Append with a system tag if system return Progress Messages format Job Info System NON NLS 1 new Object get Job get Name return name  getDisplayString getDisplayStringWithStatus isSystem ProgressMessages JobInfo getJob getName
Get the display string based on the current status and the name of the job return String private String get Display String With Status if is Canceled return Progress Messages format Job Info Cancelled NON NLS 1 new Object get Job get Name if is Blocked return Progress Messages format Job Info Blocked NON NLS 1 new Object get Job get Name blocked Status get Message if get Job get State Job RUNNING if task Info null return get Job get Name return task Info get Display String if get Job get State Job SLEEPING return Progress Messages format Job Info Sleeping NON NLS 1 new Object get Job get Name return Progress Messages format Job Info Waiting NON NLS 1 new Object get Job get Name  getDisplayStringWithStatus isCanceled ProgressMessages JobInfo getJob getName isBlocked ProgressMessages JobInfo getJob getName blockedStatus getMessage getJob getState taskInfo getJob getName taskInfo getDisplayString getJob getState ProgressMessages JobInfo getJob getName ProgressMessages JobInfo getJob getName
public Image get Display Image int done get Percent Done if done 0 return super get Display Image if is Blocked return J Face Resources get Image Progress Manager BLOCKED JOB KEY int state get Job get State if state Job SLEEPING return J Face Resources get Image Progress Manager SLEEPING JOB KEY if state Job WAITING return J Face Resources get Image Progress Manager WAITING JOB KEY By default return the first progress image return super get Display Image  getDisplayImage getPercentDone getDisplayImage isBlocked JFaceResources getImage ProgressManager BLOCKED_JOB_KEY getJob getState JFaceResources getImage ProgressManager SLEEPING_JOB_KEY JFaceResources getImage ProgressManager WAITING_JOB_KEY getDisplayImage
see org eclipse ui internal progress Job Tree Element get Children Object get Children return children to Array  JobTreeElement getChildren getChildren toArray
see org eclipse ui internal progress Job Tree Element has Children boolean has Children return children size 0  JobTreeElement hasChildren hasChildren
Begin the task called task Name with the supplied work param task Name param work void begin Task String task Name int work task Info new Task Info this task Name work  taskName taskName beginTask taskName taskInfo TaskInfo taskName
Add the subtask to the receiver param sub Task Name void add Sub Task String sub Task Name children add new Sub Task Info this sub Task Name  subTaskName addSubTask subTaskName SubTaskInfo subTaskName
Add the amount of work to the job info param work Increment void add Work double work Increment if task Info null return if parent null ticks 1 task Info add Work work Increment else task Info add Work work Increment parent ticks  workIncrement addWork workIncrement taskInfo taskInfo addWork workIncrement taskInfo addWork workIncrement
Clear the collection of subtasks an the task info void clear Children children clear  clearChildren
see org eclipse ui internal progress Job Tree Element get Parent Object get Parent return parent  JobTreeElement getParent getParent
see org eclipse ui internal progress Job Tree Element is Job Info boolean is Job Info return true  JobTreeElement isJobInfo isJobInfo
see org eclipse ui internal progress Job Tree Element is Job Info void clear Task Info task Info null  JobTreeElement isJobInfo clearTaskInfo taskInfo
public int compare To Object arg0 if arg0 instanceof Job Info return super compare To arg0 Job Info element Job Info arg0 If the receiver is cancelled then it is lowest priority if is Canceled element is Canceled return 1 if element get Job get State get Job get State return compare Jobs element if get Job get State Job RUNNING return 1 return 1  compareTo JobInfo compareTo JobInfo JobInfo isCanceled isCanceled getJob getState getJob getState compareJobs getJob getState
Return the amount of progress we have had as a percentage If there is no progress return 1 return int int get Percent Done if has Task Info return int task Info pre Work 100 task Info total Work return 1  getPercentDone hasTaskInfo taskInfo preWork taskInfo totalWork
Return the blocked status or code null code if there isn t one return Returns the blocked Status public I Status get Blocked Status return blocked Status  blockedStatus IStatus getBlockedStatus blockedStatus
Set the description of the blocking status param blocked Status The I Status that describes the blockage or code null code public void set Blocked Status I Status blocked Status this blocked Status blocked Status  blockedStatus IStatus setBlockedStatus IStatus blockedStatus blockedStatus blockedStatus
Return whether or not the receiver is blocked return public boolean is Blocked return get Blocked Status null  isBlocked getBlockedStatus
Return whether or not the job was cancelled in the UI return boolean public boolean is Canceled return canceled  isCanceled
return Returns the task Info Task Info get Task Info return task Info  taskInfo TaskInfo getTaskInfo taskInfo
Set the Group Info to be the group param group void set Group Info Group Info group parent group  GroupInfo setGroupInfo GroupInfo
Dispose of the receiver void dispose if parent null parent remove Job Info this  removeJobInfo
Return the Group Info for the receiver if it is active return Group Info or code null code Group Info get Group Info if parent null parent is Active return parent return null  GroupInfo GroupInfo GroupInfo getGroupInfo isActive
Set the number of ticks this job represents Default is indeterminate 1 param ticks The ticks to set public void set Ticks int ticks this ticks ticks  setTicks
see org eclipse ui internal progress Job Tree Element is Active boolean is Active return get Job get State Job NONE  JobTreeElement isActive isActive getJob getState
String get Condensed Display String if has Task Info return get Task Info get Display String Without Task return get Job get Name  getCondensedDisplayString hasTaskInfo getTaskInfo getDisplayStringWithoutTask getJob getName
public void cancel this canceled true this job cancel Call the refresh so that this is updated immediately Progress Manager get Instance refresh Job Info this  ProgressManager getInstance refreshJobInfo
see org eclipse ui internal progress Job Tree Element is Cancellable public boolean is Cancellable return super is Cancellable  JobTreeElement isCancellable isCancellable isCancellable
Compare the the job of the receiver to job2 param job Info The info we are comparing to return see Comparable compare To java lang Object private int compare Jobs Job Info job Info Job job2 job Info get Job User jobs have top priority if job is User if job2 is User return 1 else if job2 is User return 1 Show the blocked ones last if is Blocked if job Info is Blocked return 1 else if job Info is Blocked return 1 if job get Priority job2 get Priority return job get Name compare To job2 get Name if job get Priority job2 get Priority return 1 return 1  jobInfo compareTo compareJobs JobInfo jobInfo jobInfo getJob isUser isUser isUser isBlocked jobInfo isBlocked jobInfo isBlocked getPriority getPriority getName compareTo getName getPriority getPriority

Return the parent of this object return Object 
Return whether or not the receiver has children return boolean 
Return the children of the receiver return Object 
Return the display String for the receiver return  displayString
Get the image for the reciever By default there is no image return Image or code null code public Image get Display Image return null  getDisplayImage
Return the condensed version of the display string return String get Condensed Display String return get Display String  getCondensedDisplayString getDisplayString
Return whether or not the receiver is an info return boolean 
see java lang Comparable compare To java lang Object public int compare To Object arg0 return get Display String compare To Job Tree Element arg0 get Display String  compareTo compareTo getDisplayString compareTo JobTreeElement getDisplayString
Return whether or not this is currently active return 
Return whether or not the receiver can be cancelled return boolean public boolean is Cancellable return false  isCancellable
Cancel the receiver public void cancel By default do nothing 

public void create Part Control Composite parent viewer new New Progress Viewer parent SWT MULTI SWT H SCROLL SWT V SCROLL viewer set Use Hashlookup true viewer set Sorter Progress Manager Util get Progress Viewer Sorter init Content Provider create Clear All Action create Cancel Action init Context Menu init Pulldown Menu init Tool Bar get Site set Selection Provider viewer  createPartControl NewProgressViewer H_SCROLL V_SCROLL setUseHashlookup setSorter ProgressManagerUtil getProgressViewerSorter initContentProvider createClearAllAction createCancelAction initContextMenu initPulldownMenu initToolBar getSite setSelectionProvider
see org eclipse ui I Workbench Part set Focus public void set Focus if viewer null viewer set Focus  IWorkbenchPart setFocus setFocus setFocus
Sets the content provider for the viewer protected void init Content Provider I Content Provider provider new Progress Tree Content Provider viewer viewer set Content Provider provider viewer set Input provider  initContentProvider IContentProvider ProgressTreeContentProvider setContentProvider setInput
menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager Job Info info get Selected Info if info null return  menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager JobInfo getSelectedInfo
Initialize the context menu for the receiver private void init Context Menu Menu Manager menu Mgr new Menu Manager Popup Menu NON NLS 1 Menu menu menu Mgr create Context Menu viewer get Control menu Mgr add cancel Action menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager Job Info info get Selected Info if info null return menu Mgr add new Separator I Workbench Action Constants MB ADDITIONS get Site register Context Menu menu Mgr viewer viewer get Control set Menu menu  initContextMenu MenuManager menuMgr MenuManager PopupMenu menuMgr createContextMenu getControl menuMgr cancelAction menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager JobInfo getSelectedInfo menuMgr IWorkbenchActionConstants MB_ADDITIONS getSite registerContextMenu menuMgr getControl setMenu
public void run Progress View Updater updater Progress View Updater get Singleton updater debug updater debug set Checked updater debug updater refresh All  ProgressViewUpdater ProgressViewUpdater getSingleton setChecked refreshAll
private void init Pulldown Menu I Menu Manager menu Mgr get View Site get Action Bars get Menu Manager menu Mgr add clear All Action menu Mgr add new Action Progress Messages get String Progress View Verbose Action NON NLS 1 I Action AS CHECK BOX non Javadoc see org eclipse jface action Action run public void run Progress View Updater updater Progress View Updater get Singleton updater debug updater debug set Checked updater debug updater refresh All  initPulldownMenu IMenuManager menuMgr getViewSite getActionBars getMenuManager menuMgr clearAllAction menuMgr ProgressMessages getString ProgressView VerboseAction IAction AS_CHECK_BOX ProgressViewUpdater ProgressViewUpdater getSingleton setChecked refreshAll
private void init Tool Bar I Action Bars bars get View Site get Action Bars I Tool Bar Manager tm bars get Tool Bar Manager tm add clear All Action  initToolBar IActionBars getViewSite getActionBars IToolBarManager getToolBarManager clearAllAction
Return the selected objects If any of the selections are not Job Infos or there is no selection then return null return Job Info or code null code private I Structured Selection get Selection If the provider has not been set yet move on I Selection Provider provider get Site get Selection Provider if provider null return null I Selection current Selection provider get Selection if current Selection instanceof I Structured Selection return I Structured Selection current Selection return null  JobInfos JobInfo IStructuredSelection getSelection ISelectionProvider getSite getSelectionProvider ISelection currentSelection getSelection currentSelection IStructuredSelection IStructuredSelection currentSelection
Get the currently selected job info Only return it if it is the only item selected and it is a Job Info return Job Info get Selected Info I Structured Selection selection get Selection if selection null selection size 1 Job Tree Element element Job Tree Element selection get First Element if element is Job Info return Job Info element return null  JobInfo JobInfo getSelectedInfo IStructuredSelection getSelection JobTreeElement JobTreeElement getFirstElement isJobInfo JobInfo
see org eclipse jface action Action run public void run viewer cancel Selection  cancelSelection
Create the cancel action for the receiver return Action private void create Cancel Action cancel Action new Action Progress Messages get String Progress View Cancel Action NON NLS 1 non Javadoc see org eclipse jface action Action run public void run viewer cancel Selection  createCancelAction cancelAction ProgressMessages getString ProgressView CancelAction cancelSelection
see org eclipse jface action Action run public void run viewer clear All  clearAll
Create the clear all action for the receiver return Action private void create Clear All Action clear All Action new Action Progress Messages get String Progress View Clear All Action NON NLS 1 non Javadoc see org eclipse jface action Action run public void run viewer clear All clear All Action set Tool Tip Text Progress Messages get String New Progress View Remove All Jobs Tool Tip NON NLS 1 Image Descriptor id Image Support get Image Descriptor icons full elcl16 progress remall gif NON NLS 1 if id null clear All Action set Image Descriptor id id Image Support get Image Descriptor icons full dlcl16 progress remall gif NON NLS 1 if id null clear All Action set Disabled Image Descriptor id  createClearAllAction clearAllAction ProgressMessages getString ProgressView ClearAllAction clearAll clearAllAction setToolTipText ProgressMessages getString NewProgressView RemoveAllJobsToolTip ImageDescriptor ImageSupport getImageDescriptor progress_remall clearAllAction setImageDescriptor ImageSupport getImageDescriptor progress_remall clearAllAction setDisabledImageDescriptor

protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache int w 0 h VERTICAL SPACING Control cs composite get Children for int i 0 i cs length i Control c cs i Point e c compute Size SWT DEFAULT SWT DEFAULT flush Cache w Math max w e x h e y VERTICAL SPACING return new Point w h  computeSize wHint hHint flushCache VERTICAL_SPACING getChildren computeSize flushCache VERTICAL_SPACING
protected void layout Composite composite boolean flush Cache int x 0 y 0 Point e composite get Size Control cs get Sorted Children boolean dark cs length 2 1 for int i 0 i cs length i Control c cs i Point s c compute Size e x SWT DEFAULT flush Cache c set Bounds x y s x s y y s y VERTICAL SPACING if refresh Backgrounds c instanceof Job Item Job Item c update Background dark dark dark  flushCache getSize getSortedChildren computeSize flushCache setBounds VERTICAL_SPACING refreshBackgrounds JobItem JobItem updateBackground
Job Tree Item Composite parent Job Tree Element info int flags super parent flags job Tree Element info map put job Tree Element this add Listener SWT Dispose this  JobTreeItem JobTreeElement jobTreeElement jobTreeElement addListener
void init Job Tree Element info if job Tree Element info map remove job Tree Element job Tree Element info map put job Tree Element this refresh  JobTreeElement jobTreeElement jobTreeElement jobTreeElement jobTreeElement
protected void dump String message if DEBUG System out println message job Tree Element hash Code NON NLS 1 NON NLS 2 System out println terminated job Terminated NON NLS 1 if job Tree Element instanceof Job Info System out println type Job Info NON NLS 1 else if job Tree Element instanceof Sub Task Info System out println type Sub Task Info NON NLS 1 else if job Tree Element instanceof Group Info System out println type Group Info NON NLS 1 Job job get Job if job null System out println name job get Name NON NLS 1 System out println is System job is System NON NLS 1 System out println keep keep Item NON NLS 1  jobTreeElement hashCode jobTerminated jobTreeElement JobInfo JobInfo jobTreeElement SubTaskInfo SubTaskInfo jobTreeElement GroupInfo GroupInfo getJob getName isSystem isSystem keepItem
void set Kept if job Terminated keep Item job Terminated true remove bring to keep mode  setKept jobTerminated keepItem jobTerminated
public void handle Event Event e switch e type case SWT Dispose map remove job Tree Element break  handleEvent jobTreeElement
Job get Job if job Tree Element instanceof Job Info return Job Info job Tree Element get Job if job Tree Element instanceof Sub Task Info return Sub Task Info job Tree Element job Info get Job return null  getJob jobTreeElement JobInfo JobInfo jobTreeElement getJob jobTreeElement SubTaskInfo SubTaskInfo jobTreeElement jobInfo getJob
public boolean kill boolean refresh boolean broadcast return true 
boolean check Keep if job Tree Element instanceof Job Info Finished Jobs keep Job Info job Tree Element set Keep return keep Item  checkKeep jobTreeElement JobInfo FinishedJobs JobInfo jobTreeElement setKeep keepItem
void set Keep keep Item true Composite parent get Parent if parent instanceof Job Tree Item Job Tree Item parent keep Item true  setKeep keepItem getParent JobTreeItem JobTreeItem keepItem
abstract boolean refresh 
public boolean remove job Terminated true refresh if dialog Context keep Item dispose return true return false  jobTerminated dialogContext keepItem
Hyperlink Job Item parent Job Tree Element info super parent info SWT NO BACKGROUND jobitem parent set Font smaller Font add Listener SWT Key Down this add Listener SWT Paint this add Listener SWT Mouse Enter this add Listener SWT Mouse Exit this add Listener SWT Mouse Down this add Listener SWT Mouse Up this add Listener SWT Focus In this add Listener SWT Focus Out this refresh  JobItem JobTreeElement NO_BACKGROUND setFont smallerFont addListener KeyDown addListener addListener MouseEnter addListener MouseExit addListener MouseDown addListener MouseUp addListener FocusIn addListener FocusOut
refresh boolean is Link Enabled return dialog Context link Enabled  isLinkEnabled dialogContext linkEnabled
public void handle Event Event e super handle Event e switch e type case SWT Dispose if goto Action null goto Action remove Property Change Listener this goto Action null break case SWT Key Down if e character r handle Activate else if e key Code SWT DEL cancel Selection else select null e break case SWT Paint paint e gc break case SWT Focus In has Focus true case SWT Mouse Enter if is Link Enabled mouse Over true redraw break case SWT Focus Out has Focus false case SWT Mouse Exit if is Link Enabled mouse Over false redraw break case SWT Default Selection handle Activate break case SWT Mouse Down if is Link Enabled select Job Item get Parent e break case SWT Mouse Up if is Link Enabled Point size get Size if e button 1 e x 0 e y 0 e x size x e y size y return handle Activate break  handleEvent handleEvent gotoAction gotoAction removePropertyChangeListener gotoAction KeyDown handleActivate keyCode cancelSelection FocusIn hasFocus MouseEnter isLinkEnabled mouseOver FocusOut hasFocus MouseExit isLinkEnabled mouseOver DefaultSelection handleActivate MouseDown isLinkEnabled JobItem getParent MouseUp isLinkEnabled getSize handleActivate
private void set Text String t if t null t NON NLS 1 if t equals text text t update Tool Tip redraw  setText updateToolTip
private void set Action I Action action if action goto Action return if goto Action null goto Action remove Property Change Listener this goto Action action if goto Action null temporary workaround for CVS action Wrapper problem String action Name goto Action get Class get Name if action Name index Of Refresh Subscriber Job 2 0 NON NLS 1 goto Action set Enabled false end of temporary workaround goto Action add Property Change Listener this update Tool Tip set Link Enable action null action is Enabled  setAction IAction gotoAction gotoAction gotoAction removePropertyChangeListener gotoAction gotoAction actionWrapper actionName gotoAction getClass getName actionName indexOf RefreshSubscriberJob gotoAction setEnabled gotoAction addPropertyChangeListener updateToolTip setLinkEnable isEnabled
private void set Link Enable boolean enable if enable link Enabled link Enabled enable if is Link Enabled set Cursor hand Cursor update Tool Tip redraw  setLinkEnable linkEnabled linkEnabled isLinkEnabled setCursor handCursor updateToolTip
private void update Tool Tip String tt text if is Link Enabled goto Action null goto Action is Enabled String tooltip goto Action get Tool Tip Text if tooltip null tooltip trim length 0 tt tooltip String oldtt get Tool Tip Text if oldtt null oldtt equals tt set Tool Tip Text tt  updateToolTip isLinkEnabled gotoAction gotoAction isEnabled gotoAction getToolTipText getToolTipText setToolTipText
get Display async Exec new Runnable public void run if is Disposed check Keep set Link Enable goto Action null goto Action is Enabled  getDisplay asyncExec isDisposed checkKeep setLinkEnable gotoAction gotoAction isEnabled
public void property Change Property Change Event event if goto Action null get Display async Exec new Runnable public void run if is Disposed check Keep set Link Enable goto Action null goto Action is Enabled  propertyChange PropertyChangeEvent gotoAction getDisplay asyncExec isDisposed checkKeep setLinkEnable gotoAction gotoAction isEnabled
public Point compute Size int w Hint int h Hint boolean changed check Widget int inner Width w Hint if inner Width SWT DEFAULT inner Width MARGINWIDTH 2 GC gc new GC this gc set Font get Font Point extent gc text Extent text gc dispose return new Point extent x 2 MARGINWIDTH extent y 2 MARGINHEIGHT  computeSize wHint hHint checkWidget innerWidth wHint innerWidth innerWidth setFont getFont textExtent
private Color getFG Color if jobitem selected return selected Text Color if is Link Enabled if mouse Over if is Error return error Color2 return link Color2 if is Error return error Color return link Color return text Color  getFGColor selectedTextColor isLinkEnabled mouseOver isError errorColor2 linkColor2 isError errorColor linkColor textColor
protected void paint GC gc Rectangle client Area get Client Area if client Area is Empty return Color fg getFG Color bg get Background if jobitem selected bg selected Color Image buffer null GC bufferGC gc if is Carbon buffer new Image get Display client Area width client Area height buffer set Background bg bufferGC new GC buffer gc get Style bufferGC set Foreground fg bufferGC set Background bg bufferGC fill Rectangle 0 0 client Area width client Area height bufferGC set Font get Font String t shorten Text bufferGC client Area width text bufferGC draw Text t MARGINWIDTH MARGINHEIGHT true int sw bufferGC string Extent t x if is Link Enabled Font Metrics fm bufferGC get Font Metrics int lineY client Area height MARGINHEIGHT fm get Descent 1 bufferGC draw Line MARGINWIDTH lineY MARGINWIDTH sw lineY if has Focus bufferGC draw Focus 0 0 sw client Area height if buffer null gc draw Image buffer 0 0 bufferGC dispose buffer dispose  clientArea getClientArea clientArea isEmpty getFGColor getBackground selectedColor isCarbon getDisplay clientArea clientArea setBackground getStyle setForeground setBackground fillRectangle clientArea clientArea setFont getFont shortenText clientArea drawText stringExtent isLinkEnabled FontMetrics getFontMetrics clientArea getDescent drawLine hasFocus drawFocus clientArea drawImage
protected boolean handle Activate if is Link Enabled goto Action null goto Action is Enabled jobitem locked true goto Action run if jobitem job Terminated jobitem kill true true return true return false  handleActivate isLinkEnabled gotoAction gotoAction isEnabled gotoAction jobTerminated
set Action new Action public void run String title Progress Messages get String New Progress View error Dialog Title NON NLS 1 String msg Progress Messages get String New Progress View error Dialog Message NON NLS 1 Error Dialog open Error get Shell title msg result  setAction ProgressMessages getString NewProgressView errorDialogTitle ProgressMessages getString NewProgressView errorDialogMessage ErrorDialog openError getShell
public boolean refresh if job Tree Element null shouldn t happen return false Job job get Job if job null check for icon property and propagate to parent if jobitem image null jobitem update Icon job check for action property Object property job get Property I Progress Constants ACTION PROPERTY if property instanceof I Action set Action I Action property poll for result status I Status status job get Result if status null status result result status if result get Severity I Status ERROR set Keep is Error true set Action new Action public void run String title Progress Messages get String New Progress View error Dialog Title NON NLS 1 String msg Progress Messages get String New Progress View error Dialog Message NON NLS 1 Error Dialog open Error get Shell title msg result check Keep now build the string for displaying String name null if job Tree Element instanceof Sub Task Info simple job case Sub Task Info sti Sub Task Info job Tree Element String task Name null if sti job Info null Task Info ti sti job Info get Task Info if ti null task Name ti get Task Name if job Terminated result null name result get Message if task Name null task Name trim length 0 name Progress Messages format Job Info Task Format new Object task Name name NON NLS 1 else name job Tree Element get Display String if task Name null task Name trim length 0 name Progress Messages format Job Info Task Format2 new Object task Name name NON NLS 1 if name length 0 dispose return true else if job Tree Element instanceof Job Info group case Job Info ji Job Info job Tree Element if job Terminated result null name result get Message if name null name trim length 0 OK equals name NON NLS 1 if keep Item dispose return true else get the Job name name get Job Name And Status ji job job Terminated false get percentage and task name String task Name null Task Info info ji get Task Info if info null task Name info get Task Name int percent info get Percent Done if percent 0 percent 100 if task Name null task Name Progress Messages format Job Info Percent NON NLS 1 new Object Integer to String percent task Name else task Name Progress Messages format Job Info Percent2 NON NLS 1 new Object Integer to String percent get sub task name String sub Task Name null Object subtasks ji get Children if subtasks null subtasks length 0 Job Tree Element sub Job Tree Element subtasks 0 if sub null sub Task Name sub get Display String boolean has Task task Name null task Name trim length 0 boolean has Sub Task sub Task Name null sub Task Name trim length 0 if has Task has Sub Task name Progress Messages format Job Info Format new Object name task Name sub Task Name NON NLS 1 else if has Task name Progress Messages format Job Info Task Format new Object name task Name NON NLS 1 else if has Sub Task name Progress Messages format Job Info Task Format new Object name sub Task Name NON NLS 1 if highlight Job job highlight Item jobitem if name null name job Tree Element get Display String set Text name return false  jobTreeElement getJob updateIcon getProperty IProgressConstants ACTION_PROPERTY IAction setAction IAction IStatus getResult getSeverity IStatus setKeep isError setAction ProgressMessages getString NewProgressView errorDialogTitle ProgressMessages getString NewProgressView errorDialogMessage ErrorDialog openError getShell checkKeep jobTreeElement SubTaskInfo SubTaskInfo SubTaskInfo jobTreeElement taskName jobInfo TaskInfo jobInfo getTaskInfo taskName getTaskName jobTerminated getMessage taskName taskName ProgressMessages JobInfo TaskFormat taskName jobTreeElement getDisplayString taskName taskName ProgressMessages JobInfo TaskFormat2 taskName jobTreeElement JobInfo JobInfo JobInfo jobTreeElement jobTerminated getMessage keepItem getJobNameAndStatus jobTerminated taskName TaskInfo getTaskInfo taskName getTaskName getPercentDone taskName taskName ProgressMessages JobInfo toString taskName taskName ProgressMessages JobInfo toString subTaskName getChildren JobTreeElement JobTreeElement subTaskName getDisplayString hasTask taskName taskName hasSubTask subTaskName subTaskName hasTask hasSubTask ProgressMessages JobInfo taskName subTaskName hasTask ProgressMessages JobInfo TaskFormat taskName hasSubTask ProgressMessages JobInfo TaskFormat subTaskName highlightJob highlightItem jobTreeElement getDisplayString setText
action Button set Tool Tip Text Progress Messages get String New Progress View Cancel Job Tool Tip NON NLS 1 action Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e action Button set Enabled false cancel Or Remove  actionButton setToolTipText ProgressMessages getString NewProgressView CancelJobToolTip actionButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent actionButton setEnabled cancelOrRemove
add Control Listener new Control Adapter public void control Resized Control Event e handle Resize  addControlListener ControlAdapter controlResized ControlEvent handleResize
Job Item Composite parent Job Tree Element info super parent info SWT NONE Assert is Not Null info Display display get Display icon Item new Label this SWT NONE icon Item add Listener SWT Mouse Down this update Icon get Job if image null icon Item set Image default Job Icon name Item new Label this SWT NONE name Item set Font bold Font name Item add Listener SWT Mouse Down this action Bar new Tool Bar this SWT FLAT action Bar set Cursor normal Cursor set cursor to overwrite any busy cursor we might have action Button new Tool Item action Bar SWT NONE action Button set Image cancel Job Icon action Button set Disabled Image cancel JobD Icon action Button set Tool Tip Text Progress Messages get String New Progress View Cancel Job Tool Tip NON NLS 1 action Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e action Button set Enabled false cancel Or Remove add Listener SWT Mouse Down this add Listener SWT Key Down this add Control Listener new Control Adapter public void control Resized Control Event e handle Resize refresh  JobItem JobTreeElement isNotNull getDisplay iconItem iconItem addListener MouseDown updateIcon getJob iconItem setImage defaultJobIcon nameItem nameItem setFont boldFont nameItem addListener MouseDown actionBar ToolBar actionBar setCursor normalCursor actionButton ToolItem actionBar actionButton setImage cancelJobIcon actionButton setDisabledImage cancelJobDIcon actionButton setToolTipText ProgressMessages getString NewProgressView CancelJobToolTip actionButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent actionButton setEnabled cancelOrRemove addListener MouseDown addListener KeyDown addControlListener ControlAdapter controlResized ControlEvent handleResize
void create Child Job Tree Element jte if locked new Hyperlink this jte  createChild JobTreeElement
void update Icon Job job if job null Image im null boolean disp Image false Display display get Display Object property job get Property ICON PROPERTY if property instanceof Image Descriptor disp Image true im Image Descriptor property create Image display else if property instanceof URL disp Image true im Image Descriptor create FromURL URL property create Image display else disp Image false im Progress Manager get Instance get Icon For job if im null im image if dispose Image image null if DEBUG System err println Job Item set Image disposed image NON NLS 1 image dispose image im dispose Image disp Image if icon Item null icon Item set Image image  updateIcon dispImage getDisplay getProperty ICON_PROPERTY ImageDescriptor dispImage ImageDescriptor createImage dispImage ImageDescriptor createFromURL createImage dispImage ProgressManager getInstance getIconFor disposeImage JobItem setImage disposeImage dispImage iconItem iconItem setImage
boolean cancel Or Remove if job Terminated return kill true true job Tree Element cancel return false  cancelOrRemove jobTerminated jobTreeElement
public void handle Event Event event switch event type case SWT Dispose super handle Event event if dispose Image image null image is Disposed if DEBUG System err println Job Item image disposed NON NLS 1 image dispose image null break case SWT Key Down if event character r do Selection else if event character t scroller get Parent force Focus else if event key Code SWT DEL cancel Selection else select null event break case SWT Mouse Down force Focus select Job Item this event break default super handle Event event break  handleEvent handleEvent disposeImage isDisposed JobItem KeyDown doSelection getParent forceFocus keyCode cancelSelection MouseDown forceFocus JobItem handleEvent
public boolean remove job Terminated true if finished Jobs is Finished job Tree Element keep Item true propagate status down Control children get Children for int i 0 i children length i if children i instanceof Job Tree Item Job Tree Item children i job Terminated true if dialog Context we never keep jobs in dialogs if keep Item check Keep if keep Item return about To Keep return super remove  jobTerminated finishedJobs isFinished jobTreeElement keepItem getChildren JobTreeItem JobTreeItem jobTerminated dialogContext keepItem checkKeep keepItem aboutToKeep
private boolean about To Keep boolean changed false finish progress reporting if progress Bar null progress Bar is Disposed progress Bar set Selection 100 progress Bar dispose changed true turn cancel button in remove button if action Button is Disposed action Button set Image clear Job Icon action Button set Disabled Image clear JobD Icon action Button set Tool Tip Text Progress Messages get String New Progress View Remove Job Tool Tip NON NLS 1 action Button set Enabled true changed true changed refresh Control c get Children for int i 0 i c length i if c i instanceof Job Tree Item changed Job Tree Item c i refresh return changed  aboutToKeep progressBar progressBar isDisposed progressBar setSelection progressBar actionButton isDisposed actionButton setImage clearJobIcon actionButton setDisabledImage clearJobDIcon actionButton setToolTipText ProgressMessages getString NewProgressView RemoveJobToolTip actionButton setEnabled getChildren JobTreeItem JobTreeItem
public boolean kill boolean refresh boolean broadcast if job Terminated if broadcast finished Jobs remove job Tree Element else dispose relayout refresh refresh return true return false  jobTerminated finishedJobs jobTreeElement
void handle Resize Point e get Size Point e1 icon Item compute Size SWT DEFAULT SWT DEFAULT e1 x MIN ICON SIZE Point e2 name Item compute Size SWT DEFAULT SWT DEFAULT Point e5 action Bar compute Size SWT DEFAULT SWT DEFAULT int iw e x MARGIN HGAP e5 x MARGIN int indent 16 HGAP int y MARGIN int h Math max e1 y e2 y name Item set Bounds MARGIN e1 x HGAP y h e2 y 2 iw e1 x HGAP e2 y y h if progress Bar null progress Bar is Disposed Point e3 progress Bar compute Size SWT DEFAULT SWT DEFAULT e3 y MAX PROGRESS HEIGHT y VGAP 1 progress Bar set Bounds MARGIN indent y iw indent e3 y y e3 y Control cs get Children for int i 0 i cs length i if cs i instanceof Hyperlink Point e4 cs i compute Size SWT DEFAULT SWT DEFAULT y VGAP cs i set Bounds MARGIN indent y iw indent e4 y y e4 y int hm MARGIN HGAP 2 int vm y e1 y 2 if hm y e1 y 2 vm hm icon Item set Bounds hm vm e1 x e1 y action Bar set Bounds e x MARGIN e5 x e y e5 y 2 e5 x e5 y  handleResize getSize iconItem computeSize MIN_ICON_SIZE nameItem computeSize actionBar computeSize nameItem setBounds progressBar progressBar isDisposed progressBar computeSize MAX_PROGRESS_HEIGHT progressBar setBounds getChildren computeSize setBounds iconItem setBounds actionBar setBounds
public Point compute Size int w Hint int h Hint boolean changed if changed cached Height 0 cached Width 0 Point e1 icon Item compute Size SWT DEFAULT SWT DEFAULT e1 x MIN ICON SIZE Point e2 name Item compute Size SWT DEFAULT SWT DEFAULT cached Width MARGIN e1 x HGAP 100 MARGIN cached Height MARGIN Math max e1 y e2 y if progress Bar null progress Bar is Disposed cached Height 1 Point e3 progress Bar compute Size SWT DEFAULT SWT DEFAULT e3 y MAX PROGRESS HEIGHT cached Height VGAP e3 y Control cs get Children for int i 0 i cs length i if cs i instanceof Hyperlink Point e4 cs i compute Size SWT DEFAULT SWT DEFAULT cached Height VGAP e4 y cached Height MARGIN int w w Hint SWT DEFAULT cached Width w Hint int h h Hint SWT DEFAULT cached Height h Hint return new Point w h  computeSize wHint hHint cachedHeight cachedWidth iconItem computeSize MIN_ICON_SIZE nameItem computeSize cachedWidth cachedHeight progressBar progressBar isDisposed cachedHeight progressBar computeSize MAX_PROGRESS_HEIGHT cachedHeight getChildren computeSize cachedHeight cachedHeight wHint cachedWidth wHint hHint cachedHeight hHint
void update Background boolean dark Color fg bg if selected fg selected Text Color bg selected Color else if highlight Job null highlight Job get Job highlight Item this fg highlight Color else fg text Color bg dark dark Color light Color set Foreground fg set Background bg Control cs get Children for int i 0 i cs length i if cs i instanceof Progress Bar cs i set Foreground fg cs i set Background bg  updateBackground selectedTextColor selectedColor highlightJob highlightJob getJob highlightItem highlightColor textColor darkColor lightColor setForeground setBackground getChildren ProgressBar setForeground setBackground
boolean set Percent Done int percent Done if percent Done 0 percent Done 100 if progress Bar null progress Bar new Progress Bar this SWT HORIZONTAL progress Bar set Maximum 100 progress Bar set Selection percent Done progress Bar add Listener SWT Mouse Down this return true else if progress Bar is Disposed progress Bar set Selection percent Done else if progress Bar null progress Bar new Progress Bar this SWT HORIZONTAL SWT INDETERMINATE progress Bar add Listener SWT Mouse Down this return true return false  setPercentDone percentDone percentDone percentDone progressBar progressBar ProgressBar progressBar setMaximum progressBar setSelection percentDone progressBar addListener MouseDown progressBar isDisposed progressBar setSelection percentDone progressBar progressBar ProgressBar progressBar addListener MouseDown
boolean is Canceled if job Tree Element instanceof Job Info return Job Info job Tree Element is Canceled return false  isCanceled jobTreeElement JobInfo JobInfo jobTreeElement isCanceled
I Status get Result check Keep if job Terminated Job job get Job if job null return job get Result return null  IStatus getResult checkKeep jobTerminated getJob getResult
public boolean refresh if is Disposed return false boolean changed false boolean is Group job Tree Element instanceof Group Info Object roots content Provider Get Children job Tree Element Job job get Job poll for properties check Keep if image null job null update Icon job name String name null if is Group name get Group Header Group Info job Tree Element else if job Tree Element instanceof Job Info name get Job Name And Status Job Info job Tree Element job job Terminated true if name null name strip Percent job Tree Element get Display String if highlight Job null highlight Job job highlight Item this name Progress Messages format Job Info Blocks User Operation Format new Object name NON NLS 1 name Item set Tool Tip Text name name Item set Text shorten Text name Item name percentage if job Tree Element instanceof Job Info Task Info ti Job Info job Tree Element get Task Info if ti null changed set Percent Done ti get Percent Done else if is Group if roots length 1 roots 0 instanceof Job Tree Element Task Info ti Job Info roots 0 get Task Info if ti null changed set Percent Done ti get Percent Done else Group Info gi Group Info job Tree Element changed set Percent Done gi get Percent Done children if job Tree Element has Children return changed Control children get Children int n 0 for int i 0 i children length i if children i instanceof Hyperlink n if is Group roots length n reuse all children int z 0 for int i 0 i children length i if children i instanceof Hyperlink Hyperlink l Hyperlink children i l init Job Tree Element roots z else Hash Set model Jobs new Hash Set for int z 0 z roots length z model Jobs add roots z find all removed Hash Set shown Jobs new Hash Set for int i 0 i children length i if children i instanceof Hyperlink Job Tree Item ji Job Tree Item children i shown Jobs add ji job Tree Element if model Jobs contains ji job Tree Element ji refresh else changed ji remove find all added for int i 0 i roots length i Object element roots i if shown Jobs contains element create Child Job Tree Element element changed true return changed  isDisposed isGroup jobTreeElement GroupInfo contentProviderGetChildren jobTreeElement getJob checkKeep updateIcon isGroup getGroupHeader GroupInfo jobTreeElement jobTreeElement JobInfo getJobNameAndStatus JobInfo jobTreeElement jobTerminated stripPercent jobTreeElement getDisplayString highlightJob highlightJob highlightItem ProgressMessages JobInfo BlocksUserOperationFormat nameItem setToolTipText nameItem setText shortenText nameItem jobTreeElement JobInfo TaskInfo JobInfo jobTreeElement getTaskInfo setPercentDone getPercentDone isGroup JobTreeElement TaskInfo JobInfo getTaskInfo setPercentDone getPercentDone GroupInfo GroupInfo jobTreeElement setPercentDone getPercentDone jobTreeElement hasChildren getChildren isGroup JobTreeElement HashSet modelJobs HashSet modelJobs HashSet shownJobs HashSet JobTreeItem JobTreeItem shownJobs jobTreeElement modelJobs jobTreeElement shownJobs createChild JobTreeElement
private String get Group Header Group Info gi String name strip Percent job Tree Element get Display String if job Terminated return get Finished String gi name true return name  getGroupHeader GroupInfo stripPercent jobTreeElement getDisplayString jobTerminated getFinishedString
private String get Job Name And Status Job Info ji Job job boolean terminated boolean with Time String name job get Name if job is System name Progress Messages format Job Info System new Object name NON NLS 1 if ji is Canceled return Progress Messages format Job Info Cancelled new Object name NON NLS 1 if terminated return get Finished String ji name with Time if ji is Blocked I Status blocked Status ji get Blocked Status return Progress Messages format Job Info Blocked NON NLS 1 new Object name blocked Status get Message switch job get State case Job RUNNING return name case Job SLEEPING return Progress Messages format Job Info Sleeping new Object name NON NLS 1 default return Progress Messages format Job Info Waiting new Object name NON NLS 1  getJobNameAndStatus JobInfo withTime getName isSystem ProgressMessages JobInfo isCanceled ProgressMessages JobInfo getFinishedString withTime isBlocked IStatus blockedStatus getBlockedStatus ProgressMessages JobInfo blockedStatus getMessage getState ProgressMessages JobInfo ProgressMessages JobInfo
private String get Finished String Job Tree Element jte String name boolean with Time String time null if with Time time get Time String jte if time null return Progress Messages format Job Info Finished At new Object name time NON NLS 1 return Progress Messages format Job Info Finished new Object name NON NLS 1  getFinishedString JobTreeElement withTime withTime getTimeString ProgressMessages JobInfo FinishedAt ProgressMessages JobInfo
private String get Time String Job Tree Element jte Date date finished Jobs get Finish Date jte if date null return Date Format get Time Instance Date Format SHORT format date return null  getTimeString JobTreeElement finishedJobs getFinishDate DateFormat getTimeInstance DateFormat
private String strip Percent String s int l s length if l 0 if s char At 0 int pos s index Of NON NLS 1 if pos 0 s s substring pos 3 else if s char At l 1 int pos s last Index Of NON NLS 1 if pos 0 s s substring 0 pos return s  stripPercent charAt indexOf charAt lastIndexOf
list add Listener SWT Mouse Down new Listener public void handle Event Event event select null event clear selection  addListener MouseDown handleEvent
scroller add Listener SWT Dispose new Listener public void handle Event Event event finished Jobs remove Listener New Progress Viewer this default Job Icon dispose cancel Job Icon dispose cancel JobD Icon dispose clear Job Icon dispose clear JobD Icon dispose hand Cursor dispose normal Cursor dispose if bold Font default Font bold Font dispose if smaller Font default Font smaller Font dispose dark Color dispose New Progress Viewer this handle Dispose null  addListener handleEvent finishedJobs removeListener NewProgressViewer defaultJobIcon cancelJobIcon cancelJobDIcon clearJobIcon clearJobDIcon handCursor normalCursor boldFont defaultFont boldFont smallerFont defaultFont smallerFont darkColor NewProgressViewer handleDispose
Create a new Progress Viewer public New Progress Viewer Composite parent int flags super parent flags Tree c get Tree if c instanceof Tree c dispose dialog Context flags SWT BORDER 0 hack to determine context finished Jobs Finished Jobs get Instance finished Jobs add Listener this Display display parent get Display hand Cursor new Cursor display SWT CURSOR HAND normal Cursor new Cursor display SWT CURSOR ARROW default Job Icon Image Support get Image Descriptor icons full progress progress task gif create Image display NON NLS 1 cancel Job Icon Image Support get Image Descriptor icons full elcl16 progress stop gif create Image display NON NLS 1 cancel JobD Icon Image Support get Image Descriptor icons full dlcl16 progress stop gif create Image display NON NLS 1 clear Job Icon Image Support get Image Descriptor icons full elcl16 progress rem gif create Image display NON NLS 1 clear JobD Icon Image Support get Image Descriptor icons full dlcl16 progress rem gif create Image display NON NLS 1 bold Font default Font Font Data fds default Font get Font Data if fds length 0 Font Data fd fds 0 int h fd get Height bold Font new Font display fd get Name h fd get Style SWT BOLD smaller Font new Font display fd get Name h fd get Style int shift is Carbon 25 10 Mac has different Gamma value light Color display get System Color SWT COLOR LIST BACKGROUND dark Color new Color display Math max 0 light Color get Red shift Math max 0 light Color get Green shift Math max 0 light Color get Blue shift text Color display get System Color SWT COLOR LIST FOREGROUND selected Text Color display get System Color SWT COLOR LIST SELECTION TEXT selected Color display get System Color SWT COLOR LIST SELECTION link Color display get System Color SWT COLOR DARK BLUE link Color2 display get System Color SWT COLOR BLUE error Color display get System Color SWT COLOR DARK RED error Color2 display get System Color SWT COLOR RED highlight Color display get System Color SWT COLOR DARK RED scroller new Scrolled Composite parent SWT H SCROLL SWT V SCROLL flags int height default Font get Font Data 0 get Height scroller get Vertical Bar set Increment height 2 scroller set Expand Horizontal true scroller set Expand Vertical true list new Composite scroller SWT NONE list set Font default Font list set Background light Color list set Layout new List Layout list add Listener SWT Mouse Down new Listener public void handle Event Event event select null event clear selection scroller add Listener SWT Dispose new Listener public void handle Event Event event finished Jobs remove Listener New Progress Viewer this default Job Icon dispose cancel Job Icon dispose cancel JobD Icon dispose clear Job Icon dispose clear JobD Icon dispose hand Cursor dispose normal Cursor dispose if bold Font default Font bold Font dispose if smaller Font default Font smaller Font dispose dark Color dispose New Progress Viewer this handle Dispose null scroller set Content list refresh UI refresh true  ProgressViewer NewProgressViewer getTree dialogContext finishedJobs FinishedJobs getInstance finishedJobs addListener getDisplay handCursor CURSOR_HAND normalCursor CURSOR_ARROW defaultJobIcon ImageSupport getImageDescriptor progress_task createImage cancelJobIcon ImageSupport getImageDescriptor progress_stop createImage cancelJobDIcon ImageSupport getImageDescriptor progress_stop createImage clearJobIcon ImageSupport getImageDescriptor progress_rem createImage clearJobDIcon ImageSupport getImageDescriptor progress_rem createImage boldFont defaultFont FontData defaultFont getFontData FontData getHeight boldFont getName getStyle smallerFont getName getStyle isCarbon lightColor getSystemColor COLOR_LIST_BACKGROUND darkColor lightColor getRed lightColor getGreen lightColor getBlue textColor getSystemColor COLOR_LIST_FOREGROUND selectedTextColor getSystemColor COLOR_LIST_SELECTION_TEXT selectedColor getSystemColor COLOR_LIST_SELECTION linkColor getSystemColor COLOR_DARK_BLUE linkColor2 getSystemColor COLOR_BLUE errorColor getSystemColor COLOR_DARK_RED errorColor2 getSystemColor COLOR_RED highlightColor getSystemColor COLOR_DARK_RED ScrolledComposite H_SCROLL V_SCROLL defaultFont getFontData getHeight getVerticalBar setIncrement setExpandHorizontal setExpandVertical setFont defaultFont setBackground lightColor setLayout ListLayout addListener MouseDown handleEvent addListener handleEvent finishedJobs removeListener NewProgressViewer defaultJobIcon cancelJobIcon cancelJobDIcon clearJobIcon clearJobDIcon handCursor normalCursor boldFont defaultFont boldFont smallerFont defaultFont smallerFont darkColor NewProgressViewer handleDispose setContent
public void set Focus if list null Control cs list get Children for int i 0 i cs length i Job Item ji Job Item cs i if ji selected ji force Focus return if cs length 0 cs 0 force Focus  setFocus getChildren JobItem JobItem forceFocus forceFocus
public Control get Control return scroller  getControl
Returns true if given element is filtered i e not shown private boolean filtered Object element if element null return true if dialog Context Progress View Updater get Singleton debug display all in debug mode return false if element instanceof Job Info return job Filtered Job Info element if element instanceof Group Info Object children Group Info element get Children for int i 0 i children length i if job Filtered Job Info children i return true if element instanceof Task Info Object parent Task Info element get Parent if parent instanceof Job Info return job Filtered Job Info parent return false  dialogContext ProgressViewUpdater getSingleton JobInfo jobFiltered JobInfo GroupInfo GroupInfo getChildren jobFiltered JobInfo TaskInfo TaskInfo getParent JobInfo jobFiltered JobInfo
private boolean job Filtered Job Info ji Job job ji get Job if job null job highlight Job return false if job null job is System job get State Job SLEEPING return true return false  jobFiltered JobInfo getJob highlightJob isSystem getState
public void add Object parent Element Object elements if DEBUG System err println add NON NLS 1 if list is Disposed return Job Tree Item last Added null for int i 0 i elements length i if filtered elements i last Added find Job Item elements i true relayout true true if last Added null reveal last Added  parentElement isDisposed JobTreeItem lastAdded lastAdded findJobItem lastAdded lastAdded
public void remove Object elements if list is Disposed return if DEBUG System err println remove NON NLS 1 boolean changed false for int i 0 i elements length i Job Tree Item ji find Job Item elements i false if ji null changed ji remove relayout changed changed  isDisposed JobTreeItem findJobItem
public void refresh Object element boolean update Labels if list is Disposed return if filtered element return Job Tree Item ji find Job Item element false if ji null not found add it workaround for 68151 ji find Job Item element true relayout true true else just a refresh if ji refresh relayout true true  updateLabels isDisposed JobTreeItem findJobItem findJobItem
public void refresh boolean update Labels if list is Disposed return if DEBUG System err println refresh All NON NLS 1 boolean changed false boolean count Changed false Job Tree Item last Added null Object roots content Provider Get Roots get Input Hash Set model Jobs new Hash Set for int z 0 z roots length z model Jobs add roots z find all removed Control children list get Children for int i 0 i children length i Job Item ji Job Item children i if model Jobs contains ji job Tree Element if DEBUG System err println refresh NON NLS 1 changed ji refresh else if DEBUG System err println remove ji job Tree Element NON NLS 1 if ji remove count Changed changed true find all added for int i 0 i roots length i Object element roots i if filtered element continue if find Job Item element false null if DEBUG System err println added NON NLS 1 last Added create Item element changed count Changed true now add kept finished jobs if dialog Context Job Tree Element infos finished Jobs get Job Infos for int i 0 i infos length i Object element infos i if filtered element continue Job Tree Item jte find Job Item element true if jte null jte set Kept last Added jte if jte instanceof Hyperlink Job Item p Job Item jte get Parent p set Kept last Added p changed count Changed true relayout changed count Changed if last Added null reveal last Added  updateLabels isDisposed refreshAll countChanged JobTreeItem lastAdded contentProviderGetRoots getInput HashSet modelJobs HashSet modelJobs getChildren JobItem JobItem modelJobs jobTreeElement jobTreeElement countChanged findJobItem lastAdded createItem countChanged dialogContext JobTreeElement finishedJobs getJobInfos JobTreeItem findJobItem setKept lastAdded JobItem JobItem getParent setKept lastAdded countChanged countChanged lastAdded lastAdded
private Job Item create Item Object element return new Job Item list Job Tree Element element  JobItem createItem JobItem JobTreeElement
private Job Tree Item find Job Item Object element boolean create Job Tree Item ji Job Tree Item map get element if ji null create Job Tree Element jte Job Tree Element element Object parent jte get Parent if parent null Job Tree Item parentji find Job Item parent true if parentji instanceof Job Item jte instanceof Task Info if find Job Item jte false null Job Item p Job Item parentji p create Child jte else ji create Item jte return ji  JobTreeItem findJobItem JobTreeItem JobTreeItem JobTreeElement JobTreeElement getParent JobTreeItem findJobItem JobItem TaskInfo findJobItem JobItem JobItem createChild createItem
public void reveal Job Tree Item jti if jti null jti is Disposed Rectangle bounds jti get Bounds int s bounds y int e bounds y bounds height int as scroller get Origin y int ae as scroller get Client Area height if s as scroller set Origin 0 s else if e ae scroller set Origin 0 as e ae  JobTreeItem isDisposed getBounds getOrigin getClientArea setOrigin setOrigin
private void relayout boolean layout boolean refresh Backgrounds if layout List Layout l List Layout list get Layout l refresh Backgrounds refresh Backgrounds Point size list compute Size list get Client Area x SWT DEFAULT list set Size size scroller set Min Size size  refreshBackgrounds ListLayout ListLayout getLayout refreshBackgrounds refreshBackgrounds computeSize getClientArea setSize setMinSize
void clear All finished Jobs clear All if DEBUG Job Tree Element elements finished Jobs get Job Infos System out println jobs elements length NON NLS 1 for int i 0 i elements length i System out println elements i NON NLS 1  clearAll finishedJobs clearAll JobTreeElement finishedJobs getJobInfos
private Control get Sorted Children Control cs list get Children Viewer Sorter vs get Sorter if vs null Hash Map map2 new Hash Map temp remember items for sorting Job Tree Element elements new Job Tree Element cs length for int i 0 i cs length i Job Item ji Job Item cs i elements i ji job Tree Element map2 put elements i ji vs sort New Progress Viewer this elements for int i 0 i cs length i cs i Job Item map2 get elements i return cs  getSortedChildren getChildren ViewerSorter getSorter HashMap HashMap JobTreeElement JobTreeElement JobItem JobItem jobTreeElement NewProgressViewer JobItem
private void select Job Item new Selection Event e boolean clear All false Job Item new Sel null Control cs get Sorted Children Job Tree Element element null if new Selection null element new Selection job Tree Element if e type SWT Key Down key if e key Code SWT ARROW UP for int i 0 i cs length i Job Item ji Job Item cs i if ji selected if i 1 0 new Sel Job Item cs i 1 if e state Mask SWT MOD2 0 new Sel selected true else clear All true break return if new Sel null cs length 0 new Sel Job Item cs cs length 1 new Sel selected true else if e key Code SWT ARROW DOWN for int i cs length 1 i 0 i Job Item ji Job Item cs i if ji selected if i 1 cs length new Sel Job Item cs i 1 if e state Mask SWT MOD2 0 new Sel selected true else clear All true break return if new Sel null cs length 0 new Sel Job Item cs 0 new Sel selected true else if e type SWT Mouse Down mouse if new Selection null clear All true else if e state Mask SWT MOD1 0 new Selection selected new Selection selected else if e state Mask SWT MOD2 0 not yet implemented else if new Selection selected return clear All true new Sel new Selection if clear All for int i 0 i cs length i Job Item ji Job Item cs i ji selected ji new Sel boolean dark cs length 2 1 for int i 0 i cs length i Job Item ji Job Item cs i ji update Background dark dark dark if new Sel null reveal new Sel  JobItem newSelection clearAll JobItem newSel getSortedChildren JobTreeElement newSelection newSelection jobTreeElement KeyDown keyCode ARROW_UP JobItem JobItem newSel JobItem stateMask newSel clearAll newSel newSel JobItem newSel keyCode ARROW_DOWN JobItem JobItem newSel JobItem stateMask newSel clearAll newSel newSel JobItem newSel MouseDown newSelection clearAll stateMask newSelection newSelection stateMask newSelection clearAll newSel newSelection clearAll JobItem JobItem newSel JobItem JobItem updateBackground newSel newSel
Shorten the given text code t code so that its length doesn t exceed the given width This implementation replaces characters in the center of the original string with an ellipsis static String shorten Text GC gc int max Width String text Value if gc text Extent text Value x max Width return text Value int length text Value length int ellipsis Width gc text Extent ELLIPSIS x int pivot length 2 int start pivot int end pivot 1 while start 0 end length String s1 text Value substring 0 start String s2 text Value substring end length int l1 gc text Extent s1 x int l2 gc text Extent s2 x if l1 ellipsis Width l2 max Width return s1 ELLIPSIS s2 start end return text Value  shortenText maxWidth textValue textExtent textValue maxWidth textValue textValue ellipsisWidth textExtent textValue textValue textExtent textExtent ellipsisWidth maxWidth textValue
Shorten the given text code t code so that its length doesn t exceed the width of the given control This implementation replaces characters in the center of the original string with an ellipsis static String shorten Text Control control String text Value if text Value null Display display control get Display GC gc new GC display int max Width control get Bounds width text Value shorten Text gc max Width text Value gc dispose return text Value  shortenText textValue textValue getDisplay maxWidth getBounds textValue shortenText maxWidth textValue textValue
Object content Provider Get Children Object parent I Content Provider provider get Content Provider if provider instanceof I Tree Content Provider return I Tree Content Provider provider get Children parent return new Object 0  contentProviderGetChildren IContentProvider getContentProvider ITreeContentProvider ITreeContentProvider getChildren
Object content Provider Get Roots Object parent I Content Provider provider get Content Provider if provider instanceof I Tree Content Provider return I Tree Content Provider provider get Elements parent return new Object 0  contentProviderGetRoots IContentProvider getContentProvider ITreeContentProvider ITreeContentProvider getElements
list get Display async Exec new Runnable public void run if DEBUG System err println forced remove NON NLS 1 Job Tree Item ji find Job Item jte false if ji null ji is Disposed ji remove relayout true true  getDisplay asyncExec JobTreeItem findJobItem isDisposed
private void forced Remove final Job Tree Element jte if list null list is Disposed list get Display async Exec new Runnable public void run if DEBUG System err println forced remove NON NLS 1 Job Tree Item ji find Job Item jte false if ji null ji is Disposed ji remove relayout true true  forcedRemove JobTreeElement isDisposed getDisplay asyncExec JobTreeItem findJobItem isDisposed
see org eclipse ui internal progress New Kept Jobs Kept Jobs Listener finished org eclipse ui internal progress Job Info public void finished Job Tree Element jte  NewKeptJobs KeptJobsListener JobInfo JobTreeElement
list get Display async Exec new Runnable public void run if info null we got a specific item to remove Job Tree Item ji find Job Item info false if ji null ji job Terminated ji dispose relayout true true else remove all terminated Control children list get Children for int i 0 i children length i Job Tree Item ji Job Item children i if ji job Terminated ji dispose relayout true true  getDisplay asyncExec JobTreeItem findJobItem jobTerminated getChildren JobTreeItem JobItem jobTerminated
public void removed final Job Tree Element info if list null list is Disposed list get Display async Exec new Runnable public void run if info null we got a specific item to remove Job Tree Item ji find Job Item info false if ji null ji job Terminated ji dispose relayout true true else remove all terminated Control children list get Children for int i 0 i children length i Job Tree Item ji Job Item children i if ji job Terminated ji dispose relayout true true  JobTreeElement isDisposed getDisplay asyncExec JobTreeItem findJobItem jobTerminated getChildren JobTreeItem JobItem jobTerminated
public I Selection get Selection if list is Disposed return new Structured Selection Array List l new Array List Control cs list get Children for int i 0 i cs length i Job Item ji Job Item cs i l add ji job Tree Element return new Structured Selection l  ISelection getSelection isDisposed StructuredSelection ArrayList ArrayList getChildren JobItem JobItem jobTreeElement StructuredSelection
public void set Selection I Selection selection  setSelection ISelection
public void set Use Hashlookup boolean b  setUseHashlookup
public void set Input I Content Provider provider refresh true  setInput IContentProvider
public void cancel Selection boolean changed false Control cs list get Children for int i 0 i cs length i Job Item ji Job Item cs i if ji selected changed ji cancel Or Remove relayout changed changed  cancelSelection getChildren JobItem JobItem cancelOrRemove
void do Selection boolean changed false Control cs list get Children for int i 0 i cs length i Job Item ji Job Item cs i if ji selected Control children ji get Children for int j 0 j children length j if children j instanceof Hyperlink Hyperlink hl Hyperlink children j if hl handle Activate return  doSelection getChildren JobItem JobItem getChildren handleActivate
protected void add Tree Listener Control c Tree Listener listener  addTreeListener TreeListener
protected void do Update Item final Item item Object element  doUpdateItem
protected Item get Children Widget o return new Item 0  getChildren
protected boolean get Expanded Item item return true  getExpanded
protected Item get Item int x int y return null  getItem
protected int get Item Count Control widget return 1  getItemCount
protected int get Item Count Item item return 0  getItemCount
protected Item get Items Item item return new Item 0  getItems
protected Item get Parent Item Item item return null  getParentItem
protected Item get Selection Control widget return new Item 0  getSelection
public Tree get Tree Tree t super get Tree if t null t is Disposed return t return null  getTree getTree isDisposed
protected Item new Item Widget parent int flags int ix return null  newItem
protected void remove All Control widget  removeAll
protected void set Expanded Item node boolean expand  setExpanded
protected void set Selection List items  setSelection
protected void show Item Item item  showItem
protected void create Children Widget widget refresh true  createChildren
protected void internal Refresh Object element boolean update Labels  internalRefresh updateLabels
public void set Highlight Job Job job highlight Job job relayout true true  setHighlightJob highlightJob

Return whether or not this has been removed from the tree return boolean public boolean is Removed return removed  isRemoved
Set whether or not this has been removed from the tree param removed boolean public void set Removed boolean removed Value this removed removed Value  setRemoved removedValue removedValue
Create a new instance of the receiver public Pending Update Adapter No initial behavior  PendingUpdateAdapter
public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter
see org eclipse ui model I Workbench Adapter get Children java lang Object public Object get Children Object o return new Object 0  IWorkbenchAdapter getChildren getChildren
see org eclipse ui model I Workbench Adapter get Image Descriptor java lang Object public Image Descriptor get Image Descriptor Object object return null  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor
see org eclipse ui model I Workbench Adapter get Label java lang Object public String get Label Object o return Progress Messages get String Pending Update Adapter Pending Label NON NLS 1  IWorkbenchAdapter getLabel getLabel ProgressMessages getString PendingUpdateAdapter PendingLabel
see org eclipse ui model I Workbench Adapter get Parent java lang Object public Object get Parent Object o return null  IWorkbenchAdapter getParent getParent

progress Region region mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e do Action  progressRegion mouseListener MouseAdapter mouseDoubleClick MouseEvent doAction
Create an instance of the receiver in the supplied region param region The Progress Region that contains the receiver Progress Animation Item Progress Region region super region workbench Window Finished Jobs get Instance add Listener this progress Region region mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event e do Action  ProgressRegion ProgressAnimationItem ProgressRegion workbenchWindow FinishedJobs getInstance addListener progressRegion mouseListener MouseAdapter mouseDoubleClick MouseEvent doAction
void do Action Job Tree Element job Tree Elements Finished Jobs get Instance get Job Infos search from end youngest for int i job Tree Elements length 1 i 0 i if job Tree Elements i instanceof Job Info Job Info ji Job Info job Tree Elements i Job job ji get Job if job null I Status status job get Result if status null status get Severity I Status ERROR String title Progress Messages get String New Progress View error Dialog Title NON NLS 1 String msg Progress Messages get String New Progress View error Dialog Message NON NLS 1 Error Dialog open Error toolbar get Shell title msg status Job Tree Element top Element Job Tree Element ji get Parent if top Element null top Element ji Finished Jobs get Instance remove top Element return I Action action null Object property job get Property I Progress Constants ACTION PROPERTY if property instanceof I Action action I Action property if action null action is Enabled action run Job Tree Element top Element Job Tree Element ji get Parent if top Element null top Element ji Finished Jobs get Instance remove top Element return progress Region process Double Click refresh  doAction JobTreeElement jobTreeElements FinishedJobs getInstance getJobInfos jobTreeElements jobTreeElements JobInfo JobInfo JobInfo jobTreeElements getJob IStatus getResult getSeverity IStatus ProgressMessages getString NewProgressView errorDialogTitle ProgressMessages getString NewProgressView errorDialogMessage ErrorDialog openError getShell JobTreeElement topElement JobTreeElement getParent topElement topElement FinishedJobs getInstance topElement IAction getProperty IProgressConstants ACTION_PROPERTY IAction IAction isEnabled JobTreeElement topElement JobTreeElement getParent topElement topElement FinishedJobs getInstance topElement progressRegion processDoubleClick
private I Action get Action Job job Object property job get Property I Progress Constants ACTION PROPERTY if property instanceof I Action return I Action property return null  IAction getAction getProperty IProgressConstants ACTION_PROPERTY IAction IAction
private void refresh Abort the refresh if we are in the process of shutting down if PlatformUI is Workbench Running return if toolbar null toolbar is Disposed return last Job Info null Job Tree Element job Tree Elements Finished Jobs get Instance get Job Infos search from end youngest for int i job Tree Elements length 1 i 0 i if job Tree Elements i instanceof Job Info Job Info ji Job Info job Tree Elements i last Job Info ji Job job ji get Job if job null I Status status job get Result if status null status get Severity I Status ERROR green arrow with error overlay init Button error Image Progress Messages format Progress Animation Item error new Object job get Name NON NLS 1 return I Action action get Action job if action null action is Enabled green arrow with exclamation mark String tt action get Tool Tip Text if tt null tt trim length 0 tt Progress Messages format Progress Animation Item ok new Object job get Name NON NLS 1 init Button ok Image tt return just the green arrow init Button none Image Progress Messages get String Progress Animation Item tasks NON NLS 1 return if animation Running init Button none Image Progress Messages get String Progress Animation Item tasks NON NLS 1 return if nothing found hide tool item toolbar set Visible false  isWorkbenchRunning isDisposed lastJobInfo JobTreeElement jobTreeElements FinishedJobs getInstance getJobInfos jobTreeElements jobTreeElements JobInfo JobInfo JobInfo jobTreeElements lastJobInfo getJob IStatus getResult getSeverity IStatus initButton errorImage ProgressMessages ProgressAnimationItem getName IAction getAction isEnabled getToolTipText ProgressMessages ProgressAnimationItem getName initButton okImage initButton noneImage ProgressMessages getString ProgressAnimationItem animationRunning initButton noneImage ProgressMessages getString ProgressAnimationItem setVisible
private void init Button Image im String tt tool Button set Image im tool Button set Tool Tip Text tt toolbar set Visible true toolbar get Parent layout must layout  initButton toolButton setImage toolButton setToolTipText setVisible getParent
top add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e Finished Jobs get Instance remove Listener Progress Animation Item this none Image dispose ok Image dispose error Image dispose  addDisposeListener DisposeListener widgetDisposed DisposeEvent FinishedJobs getInstance removeListener ProgressAnimationItem noneImage okImage errorImage
tool Button new Tool Item toolbar SWT NONE tool Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e do Action  toolButton ToolItem toolButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent doAction
protected Control create Animation Item Composite parent if ok Image null Display display parent get Display none Image Image Support get Image Descriptor icons full progress progress none gif create Image display NON NLS 1 ok Image Image Support get Image Descriptor icons full progress progress ok gif create Image display NON NLS 1 error Image Image Support get Image Descriptor icons full progress progress error gif create Image display NON NLS 1 top new Composite parent SWT NULL top add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e Finished Jobs get Instance remove Listener Progress Animation Item this none Image dispose ok Image dispose error Image dispose boolean is Carbon carbon equals SWT get Platform NON NLS 1 Grid Layout gl new Grid Layout gl num Columns is Carbon 3 2 gl margin Height 0 gl margin Width 0 gl horizontal Spacing 2 top set Layout gl bar new Progress Bar top SWT HORIZONTAL SWT INDETERMINATE bar set Visible false bar add Mouse Listener mouse Listener Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd height Hint 12 bar set Layout Data gd toolbar new Tool Bar top SWT FLAT toolbar set Visible false tool Button new Tool Item toolbar SWT NONE tool Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e do Action if is Carbon prevent that Mac growbox overlaps with toolbar item new Label top SWT NONE set Layout Data new Grid Data 4 4 refresh return top  createAnimationItem okImage getDisplay noneImage ImageSupport getImageDescriptor progress_none createImage okImage ImageSupport getImageDescriptor progress_ok createImage errorImage ImageSupport getImageDescriptor progress_error createImage addDisposeListener DisposeListener widgetDisposed DisposeEvent FinishedJobs getInstance removeListener ProgressAnimationItem noneImage okImage errorImage isCarbon getPlatform GridLayout GridLayout numColumns isCarbon marginHeight marginWidth horizontalSpacing setLayout ProgressBar setVisible addMouseListener mouseListener GridData GridData GridData FILL_HORIZONTAL heightHint setLayoutData ToolBar setVisible toolButton ToolItem toolButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent doAction isCarbon setLayoutData GridData
see org eclipse ui internal progress Animation Item get Control public Control get Control return top  AnimationItem getControl getControl
void animation Done super animation Done animation Running false if bar is Disposed return bar set Visible false refresh  animationDone animationDone animationRunning isDisposed setVisible
void animation Start super animation Start animation Running true if bar is Disposed return bar set Visible true refresh  animationStart animationStart animationRunning isDisposed setVisible
final Display display Display get Default display async Exec new Runnable public void run refresh  getDefault asyncExec
public void removed Job Tree Element info final Display display Display get Default display async Exec new Runnable public void run refresh  JobTreeElement getDefault asyncExec
final Display display Display get Default display async Exec new Runnable public void run refresh  getDefault asyncExec
public void finished final Job Tree Element jte final Display display Display get Default display async Exec new Runnable public void run refresh  JobTreeElement getDefault asyncExec

Create a new instance of the receiver and listen to the animation manager param animation Manager Progress Animation Processor Animation Manager animation Manager manager animation Manager  animationManager ProgressAnimationProcessor AnimationManager animationManager animationManager
public void start Animation Loop I Progress Monitor monitor Create an off screen image to draw on and a GC to draw with Both are disposed after the animation if items size 0 return if PlatformUI is Workbench Running return while manager is Animated monitor is Canceled Do nothing while animation is happening Progress Animation Item animation Items get Animation Items for int i 0 i animation Items length i animation Items i animation Done  startAnimationLoop IProgressMonitor isWorkbenchRunning isAnimated isCanceled ProgressAnimationItem animationItems getAnimationItems animationItems animationItems animationDone
see org eclipse ui internal progress I Animation Processor add Item org eclipse ui internal progress Animation Item public void add Item Animation Item item Assert is True item instanceof Progress Animation Item items add item  IAnimationProcessor addItem AnimationItem addItem AnimationItem isTrue ProgressAnimationItem
see org eclipse ui internal progress I Animation Processor remove Item org eclipse ui internal progress Animation Item public void remove Item Animation Item item Assert is True item instanceof Progress Animation Item items remove item  IAnimationProcessor removeItem AnimationItem removeItem AnimationItem isTrue ProgressAnimationItem
see org eclipse ui internal progress I Animation Processor has Items public boolean has Items return items size 0  IAnimationProcessor hasItems hasItems
see org eclipse ui internal progress I Animation Processor items Inactive Redraw public void items Inactive Redraw Nothing to do here as SWT handles redraw  IAnimationProcessor itemsInactiveRedraw itemsInactiveRedraw
public void animation Started Animation Item animation Items get Animation Items for int i 0 i animation Items length i animation Items i animation Start  animationStarted AnimationItem animationItems getAnimationItems animationItems animationItems animationStart
see org eclipse ui internal progress I Animation Processor get Preferred Width public int get Preferred Width return 30  IAnimationProcessor getPreferredWidth getPreferredWidth
Get the animation items currently registered for the receiver return Progress Animation Item private Progress Animation Item get Animation Items Progress Animation Item animation Items new Progress Animation Item items size items to Array animation Items return animation Items  ProgressAnimationItem ProgressAnimationItem getAnimationItems ProgressAnimationItem animationItems ProgressAnimationItem toArray animationItems animationItems
public void animation Finished Animation Item animation Items get Animation Items for int i 0 i animation Items length i animation Items i animation Done  animationFinished AnimationItem animationItems getAnimationItems animationItems animationItems animationDone
see org eclipse ui internal progress I Animation Processor is Processor Job org eclipse core runtime jobs Job public boolean is Processor Job Job job We have no jobs return false  IAnimationProcessor isProcessorJob isProcessorJob

Create a new instance of the receiver with all of the default values public Progress Content Provider this false  ProgressContentProvider
Create a new instance of the receiver with a flag to indicate if there will be debug info shown or not param no Debug If true debug information will be shown if the debug flag in the Progress Manager is true public Progress Content Provider boolean no Debug Progress View Updater get Singleton add Collector this filter Debug no Debug  noDebug ProgressManager ProgressContentProvider noDebug ProgressViewUpdater getSingleton addCollector filterDebug noDebug
public Object get Elements Object input Element return Progress Manager get Instance get Root Elements show Debug  getElements inputElement ProgressManager getInstance getRootElements showDebug
see org eclipse jface viewers I Content Provider dispose public void dispose Progress View Updater get Singleton remove Collector this  IContentProvider ProgressViewUpdater getSingleton removeCollector
java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input No change when input changes  inputChanged oldInput newInput
Return whether or not this content provider shows debug items return boolean private boolean show Debug if filter Debug return false else return Progress View Updater get Singleton debug  showDebug filterDebug ProgressViewUpdater getSingleton
Set whether or not we always filter debug Default is code false code param filter Debug The filter Debug to set public void set Filter Debug boolean filter Debug this filter Debug filter Debug  filterDebug filterDebug setFilterDebug filterDebug filterDebug filterDebug

see org eclipse jface viewers I Label Provider get Image java lang Object public Image get Image Object element return Job Tree Element element get Display Image  ILabelProvider getImage getImage JobTreeElement getDisplayImage
see org eclipse jface viewers I Label Provider get Text java lang Object public String get Text Object element return Job Tree Element element get Display String  ILabelProvider getText getText JobTreeElement getDisplayString

private static final String IMAGE KEY org eclipse ui progress images NON NLS 1 Get the progress manager currently in use return Job Progress Manager public static Progress Manager get Instance if singleton null singleton new Progress Manager return singleton  IMAGE_KEY JobProgressManager ProgressManager getInstance ProgressManager
Shutdown the singleton if there is one public static void shutdown Progress Manager if singleton null return singleton shutdown  shutdownProgressManager
I Progress Monitor With Blocking listener Create a monitor on the supplied job param new Job Job Monitor Job new Job job new Job  IProgressMonitorWithBlocking newJob JobMonitor newJob newJob
Add monitor as another monitor that param monitor void add Progress Listener I Progress Monitor With Blocking monitor listener monitor Job Info info get Job Info job Task Info current Task info get Task Info if current Task null listener begin Task current Task Name current Task total Work listener internal Worked current Task pre Work  addProgressListener IProgressMonitorWithBlocking JobInfo getJobInfo TaskInfo currentTask getTaskInfo currentTask beginTask currentTaskName currentTask totalWork internalWorked currentTask preWork
public void begin Task String task Name int total Work Job Info info get Job Info job info begin Task task Name total Work refresh Job Info info current Task Name task Name if listener null listener begin Task task Name total Work  beginTask taskName totalWork JobInfo getJobInfo beginTask taskName totalWork refreshJobInfo currentTaskName taskName beginTask taskName totalWork
public void done Job Info info get Job Info job info clear Task Info info clear Children runnable Monitors remove job if listener null listener done  JobInfo getJobInfo clearTaskInfo clearChildren runnableMonitors
public void internal Worked double work Job Info info get Job Info job if info has Task Info info add Work work refresh Job Info info if listener null listener internal Worked work  internalWorked JobInfo getJobInfo hasTaskInfo addWork refreshJobInfo internalWorked
see org eclipse core runtime I Progress Monitor is Canceled public boolean is Canceled Job Info info get Job Info job return info is Canceled  IProgressMonitor isCanceled isCanceled JobInfo getJobInfo isCanceled
public void set Canceled boolean value Job Info info get Job Info job Don t bother cancelling twice if value info is Canceled info cancel if listener null listener set Canceled value  setCanceled JobInfo getJobInfo isCanceled setCanceled
public void set Task Name String task Name Job Info info get Job Info job if info has Task Info info set Task Name task Name else begin Task task Name 100 return info clear Children refresh Job Info info current Task Name task Name if listener null listener set Task Name task Name  setTaskName taskName JobInfo getJobInfo hasTaskInfo setTaskName taskName beginTask taskName clearChildren refreshJobInfo currentTaskName taskName setTaskName taskName
public void sub Task String name if name length 0 return Job Info info get Job Info job info clear Children info add Sub Task name refresh Job Info info if listener null listener sub Task name  subTask JobInfo getJobInfo clearChildren addSubTask refreshJobInfo subTask
see org eclipse core runtime I Progress Monitor worked int public void worked int work internal Worked work  IProgressMonitor internalWorked
public void clear Blocked Job Info info get Job Info job info set Blocked Status null refresh Job Info info if listener null listener clear Blocked  clearBlocked JobInfo getJobInfo setBlockedStatus refreshJobInfo clearBlocked
public void set Blocked I Status reason Job Info info get Job Info job info set Blocked Status null refresh Job Info info if listener null listener set Blocked reason  setBlocked IStatus JobInfo getJobInfo setBlockedStatus refreshJobInfo setBlocked
Create a new instance of the receiver Progress Manager Platform get Job Manager set Progress Provider this Dialog set Blocked Handler new Workbench Dialog Blocked Handler create Change Listener Platform get Job Manager add Job Change Listener this change Listener URL icons Root Bundle Utility find PlatformUI PLUGIN ID Progress Manager PROGRESS FOLDER try set Up Image icons Root SLEEPING JOB SLEEPING JOB KEY set Up Image icons Root WAITING JOB WAITING JOB KEY set Up Image icons Root BLOCKED JOB BLOCKED JOB KEY Let the error manager set up its own icons error Manager set Up Images icons Root catch MalformedURL Exception e Progress Manager Util log Exception e  ProgressManager getJobManager setProgressProvider setBlockedHandler WorkbenchDialogBlockedHandler createChangeListener getJobManager addJobChangeListener changeListener iconsRoot BundleUtility PLUGIN_ID ProgressManager PROGRESS_FOLDER setUpImage iconsRoot SLEEPING_JOB SLEEPING_JOB_KEY setUpImage iconsRoot WAITING_JOB WAITING_JOB_KEY setUpImage iconsRoot BLOCKED_JOB BLOCKED_JOB_KEY errorManager setUpImages iconsRoot MalformedURLException ProgressManagerUtil logException
public I Status run InUI Thread I Progress Monitor monitor show In Dialog null final Event get Job return Status OK STATUS  IStatus runInUIThread IProgressMonitor showInDialog finalEvent getJob OK_STATUS
public void about To Run I Job Change Event event Job Info info get Job Info event get Job refresh Job Info info Iterator start Listeners busy Listeners For Job event get Job iterator while start Listeners has Next I Job Busy Listener next I Job Busy Listener start Listeners next next increment Busy event get Job if event get Job is User boolean no Dialog should Run In Background if no Dialog final I Job Change Event final Event event Workbench Job show Job new Workbench Job Progress Messages get String Progress Manager show In Dialog Name NON NLS 1 non Javadoc see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor monitor show In Dialog null final Event get Job return Status OK STATUS show Job set System true show Job schedule return  aboutToRun IJobChangeEvent JobInfo getJobInfo getJob refreshJobInfo startListeners busyListenersForJob getJob startListeners hasNext IJobBusyListener IJobBusyListener startListeners incrementBusy getJob getJob isUser noDialog shouldRunInBackground noDialog IJobChangeEvent finalEvent WorkbenchJob showJob WorkbenchJob ProgressMessages getString ProgressManager showInDialogName UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor showInDialog finalEvent getJob OK_STATUS showJob setSystem showJob
public void done I Job Change Event event if PlatformUI is Workbench Running return Iterator start Listeners busy Listeners For Job event get Job iterator while start Listeners has Next I Job Busy Listener next I Job Busy Listener start Listeners next next decrement Busy event get Job Job Info info get Job Info event get Job if event get Result null event get Result get Severity I Status ERROR error Manager add Error event get Result event get Job get Name jobs remove event get Job Only refresh if we are showing it remove Job Info info If there are no more left then refresh all on the last displayed one if has No Regular Job Infos is Non Displayable Job event get Job false refresh All  IJobChangeEvent isWorkbenchRunning startListeners busyListenersForJob getJob startListeners hasNext IJobBusyListener IJobBusyListener startListeners decrementBusy getJob JobInfo getJobInfo getJob getResult getResult getSeverity IStatus errorManager addError getResult getJob getName getJob removeJobInfo hasNoRegularJobInfos isNonDisplayableJob getJob refreshAll
see org eclipse core runtime jobs Job Change Adapter scheduled org eclipse core runtime jobs I Job Change Event public void scheduled I Job Change Event event update For event  JobChangeAdapter IJobChangeEvent IJobChangeEvent updateFor
Update the listeners for the receiver for the event param event private void update For I Job Change Event event if is Never Displayed Job event get Job return if jobs contains Key event get Job refresh Job Info get Job Info event get Job else add Job Info new Job Info event get Job  updateFor IJobChangeEvent isNeverDisplayedJob getJob containsKey getJob refreshJobInfo getJobInfo getJob addJobInfo JobInfo getJob
see org eclipse core runtime jobs Job Change Adapter awake org eclipse core runtime jobs I Job Change Event public void awake I Job Change Event event update For event  JobChangeAdapter IJobChangeEvent IJobChangeEvent updateFor
see org eclipse core runtime jobs Job Change Adapter sleeping org eclipse core runtime jobs I Job Change Event public void sleeping I Job Change Event event update For event  JobChangeAdapter IJobChangeEvent IJobChangeEvent updateFor
Create the I Job Change Listener registered with the Job manager private void create Change Listener change Listener new Job Change Adapter non Javadoc see org eclipse core runtime jobs Job Change Adapter about To Run org eclipse core runtime jobs I Job Change Event public void about To Run I Job Change Event event Job Info info get Job Info event get Job refresh Job Info info Iterator start Listeners busy Listeners For Job event get Job iterator while start Listeners has Next I Job Busy Listener next I Job Busy Listener start Listeners next next increment Busy event get Job if event get Job is User boolean no Dialog should Run In Background if no Dialog final I Job Change Event final Event event Workbench Job show Job new Workbench Job Progress Messages get String Progress Manager show In Dialog Name NON NLS 1 non Javadoc see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor monitor show In Dialog null final Event get Job return Status OK STATUS show Job set System true show Job schedule return non Javadoc see org eclipse core runtime jobs Job Change Adapter done org eclipse core runtime jobs I Job Change Event public void done I Job Change Event event if PlatformUI is Workbench Running return Iterator start Listeners busy Listeners For Job event get Job iterator while start Listeners has Next I Job Busy Listener next I Job Busy Listener start Listeners next next decrement Busy event get Job Job Info info get Job Info event get Job if event get Result null event get Result get Severity I Status ERROR error Manager add Error event get Result event get Job get Name jobs remove event get Job Only refresh if we are showing it remove Job Info info If there are no more left then refresh all on the last displayed one if has No Regular Job Infos is Non Displayable Job event get Job false refresh All non Javadoc see org eclipse core runtime jobs Job Change Adapter scheduled org eclipse core runtime jobs I Job Change Event public void scheduled I Job Change Event event update For event Update the listeners for the receiver for the event param event private void update For I Job Change Event event if is Never Displayed Job event get Job return if jobs contains Key event get Job refresh Job Info get Job Info event get Job else add Job Info new Job Info event get Job non Javadoc see org eclipse core runtime jobs Job Change Adapter awake org eclipse core runtime jobs I Job Change Event public void awake I Job Change Event event update For event non Javadoc see org eclipse core runtime jobs Job Change Adapter sleeping org eclipse core runtime jobs I Job Change Event public void sleeping I Job Change Event event update For event  IJobChangeListener createChangeListener changeListener JobChangeAdapter JobChangeAdapter aboutToRun IJobChangeEvent aboutToRun IJobChangeEvent JobInfo getJobInfo getJob refreshJobInfo startListeners busyListenersForJob getJob startListeners hasNext IJobBusyListener IJobBusyListener startListeners incrementBusy getJob getJob isUser noDialog shouldRunInBackground noDialog IJobChangeEvent finalEvent WorkbenchJob showJob WorkbenchJob ProgressMessages getString ProgressManager showInDialogName UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor showInDialog finalEvent getJob OK_STATUS showJob setSystem showJob JobChangeAdapter IJobChangeEvent IJobChangeEvent isWorkbenchRunning startListeners busyListenersForJob getJob startListeners hasNext IJobBusyListener IJobBusyListener startListeners decrementBusy getJob JobInfo getJobInfo getJob getResult getResult getSeverity IStatus errorManager addError getResult getJob getName getJob removeJobInfo hasNoRegularJobInfos isNonDisplayableJob getJob refreshAll JobChangeAdapter IJobChangeEvent IJobChangeEvent updateFor updateFor IJobChangeEvent isNeverDisplayedJob getJob containsKey getJob refreshJobInfo getJobInfo getJob addJobInfo JobInfo getJob JobChangeAdapter IJobChangeEvent IJobChangeEvent updateFor JobChangeAdapter IJobChangeEvent IJobChangeEvent updateFor
Set up the image in the image regsitry param icons Root param file Name param key throws MalformedURL Exception private void set Up Image URL icons Root String file Name String key throws MalformedURL Exception J Face Resources get Image Registry put key Image Descriptor create FromURL new URL icons Root file Name  iconsRoot fileName MalformedURLException setUpImage iconsRoot fileName MalformedURLException JFaceResources getImageRegistry ImageDescriptor createFromURL iconsRoot fileName
see org eclipse core runtime jobs Progress Provider create Monitor org eclipse core runtime jobs Job public I Progress Monitor create Monitor Job job return progress For job  ProgressProvider createMonitor IProgressMonitor createMonitor progressFor
public I Progress Monitor get Default Monitor only need a default monitor for operations the UI thread and only if there is a display Display display if PlatformUI is Workbench Running display PlatformUI get Workbench get Display if display is Disposed display get Thread Thread current Thread return new Event Loop Progress Monitor new Null Progress Monitor return super get Default Monitor  IProgressMonitor getDefaultMonitor isWorkbenchRunning getWorkbench getDisplay isDisposed getThread currentThread EventLoopProgressMonitor NullProgressMonitor getDefaultMonitor
Return a monitor for the job Check if we cached a monitor for this job previously for a long operation timeout check param job return I Progress Monitor public Job Monitor progress For Job job synchronized monitor Key if runnable Monitors contains Key job return Job Monitor runnable Monitors get job Job Monitor monitor new Job Monitor job runnable Monitors put job monitor return monitor  IProgressMonitor JobMonitor progressFor monitorKey runnableMonitors containsKey JobMonitor runnableMonitors JobMonitor JobMonitor runnableMonitors
Add an I Job Progress Manager Listener to listen to the changes param listener void add Listener I Job Progress Manager Listener listener listeners add listener  IJobProgressManagerListener addListener IJobProgressManagerListener
Remove the supplied I Job Progress Manager Listener from the list of listeners param listener void remove Listener I Job Progress Manager Listener listener listeners remove listener  IJobProgressManagerListener removeListener IJobProgressManagerListener
Get the Job Info for the job If it does not exist create it param job return Job Info get Job Info Job job Job Info info Job Info jobs get job if info null info new Job Info job jobs put job info return info  JobInfo JobInfo getJobInfo JobInfo JobInfo JobInfo
Refresh the I Job Progress Manager Listeners as a result of a change in info param info public void refresh Job Info Job Info info Group Info group info get Group Info if group null refresh Group group Make a copy to protect concurrency Object listener Array listeners to Array for int i 0 i listener Array length i I Job Progress Manager Listener listener I Job Progress Manager Listener listener Array i if is Non Displayable Job info get Job listener shows Debug listener refresh Job Info info  IJobProgressManagerListeners refreshJobInfo JobInfo GroupInfo getGroupInfo refreshGroup listenerArray toArray listenerArray IJobProgressManagerListener IJobProgressManagerListener listenerArray isNonDisplayableJob getJob showsDebug refreshJobInfo
Refresh the I Job Progress Manager Listeners as a result of a change in info param info public void refresh Group Group Info info Object listener Array listeners to Array for int i 0 i listener Array length i I Job Progress Manager Listener listener I Job Progress Manager Listener listener Array i listener refresh Group info  IJobProgressManagerListeners refreshGroup GroupInfo listenerArray toArray listenerArray IJobProgressManagerListener IJobProgressManagerListener listenerArray refreshGroup
Refresh all the I Job Progress Manager Listener as a result of a change in the whole model public void refresh All prune Stale Jobs Object listener Array listeners to Array for int i 0 i listener Array length i I Job Progress Manager Listener listener I Job Progress Manager Listener listener Array i listener refresh All  IJobProgressManagerListener refreshAll pruneStaleJobs listenerArray toArray listenerArray IJobProgressManagerListener IJobProgressManagerListener listenerArray refreshAll
Refresh the content providers as a result of a deletion of info param info Job Info public void remove Job Info Job Info info Job job info get Job jobs remove job synchronized monitor Key if runnable Monitors contains Key job runnable Monitors remove job Object listener Array listeners to Array for int i 0 i listener Array length i I Job Progress Manager Listener listener I Job Progress Manager Listener listener Array i if is Non Displayable Job info get Job listener shows Debug listener remove Job info  JobInfo removeJobInfo JobInfo getJob monitorKey runnableMonitors containsKey runnableMonitors listenerArray toArray listenerArray IJobProgressManagerListener IJobProgressManagerListener listenerArray isNonDisplayableJob getJob showsDebug removeJob
Remove the group from the roots and inform the listeners param group Group Info public void remove Group Group Info group Object listener Array listeners to Array for int i 0 i listener Array length i I Job Progress Manager Listener listener I Job Progress Manager Listener listener Array i listener remove Group group  GroupInfo removeGroup GroupInfo listenerArray toArray listenerArray IJobProgressManagerListener IJobProgressManagerListener listenerArray removeGroup
Refresh the content providers as a result of an addition of info param info public void add Job Info Job Info info Group Info group info get Group Info if group null refresh Group group jobs put info get Job info Object listener Array listeners to Array for int i 0 i listener Array length i I Job Progress Manager Listener listener I Job Progress Manager Listener listener Array i if is Non Displayable Job info get Job listener shows Debug listener add Job info  addJobInfo JobInfo GroupInfo getGroupInfo refreshGroup getJob listenerArray toArray listenerArray IJobProgressManagerListener IJobProgressManagerListener listenerArray isNonDisplayableJob getJob showsDebug addJob
Refresh the content providers as a result of an addition of info param info public void add Group Group Info info Object listener Array listeners to Array for int i 0 i listener Array length i I Job Progress Manager Listener listener I Job Progress Manager Listener listener Array i listener add Group info  addGroup GroupInfo listenerArray toArray listenerArray IJobProgressManagerListener IJobProgressManagerListener listenerArray addGroup
Return whether or not this job is currently displayable param job param debug If the listener is in debug mode return boolean is Non Displayable Job Job job boolean debug if is Never Displayed Job job return true if debug Always display in debug mode return false return job is System job get State Job SLEEPING  isNonDisplayableJob isNeverDisplayedJob isSystem getState
Return whether or not this job is ever displayable param job return private boolean is Never Displayed Job Job job return job null  isNeverDisplayedJob
Return the current job infos filtered on debug mode param debug return public Job Info get Job Infos boolean debug synchronized jobs Iterator iterator jobs key Set iterator Collection result new Array List while iterator has Next Job next Job iterator next if is Non Displayable Job next debug result add jobs get next Job Info infos new Job Info result size result to Array infos return infos  JobInfo getJobInfos keySet ArrayList hasNext isNonDisplayableJob JobInfo JobInfo toArray
Return the current root elements filtered on the debug mode param debug return Job Tree Element public Job Tree Element get Root Elements boolean debug synchronized jobs Iterator iterator jobs key Set iterator Set result new Hash Set while iterator has Next Job next Job iterator next if is Non Displayable Job next debug Job Info job Info Job Info jobs get next Group Info group job Info get Group Info if group null result add job Info else result add group Job Tree Element infos new Job Tree Element result size result to Array infos return infos  JobTreeElement JobTreeElement getRootElements keySet HashSet hasNext isNonDisplayableJob JobInfo jobInfo JobInfo GroupInfo jobInfo getGroupInfo jobInfo JobTreeElement JobTreeElement toArray
Return whether or not there are any jobs being displayed return boolean public boolean has Job Infos synchronized jobs Iterator iterator jobs key Set iterator while iterator has Next return true return false  hasJobInfos keySet hasNext
Return true if there are no jobs or they are all debug return boolean private boolean has No Regular Job Infos synchronized jobs Iterator iterator jobs key Set iterator while iterator has Next Job next Job iterator next if is Non Displayable Job next false return false return true  hasNoRegularJobInfos keySet hasNext isNonDisplayableJob
Returns the image descriptor with the given relative path param source return Image Image get Image Image Data source Image Data mask source get Transparency Mask return new Image null source mask  getImage ImageData ImageData getTransparencyMask
Returns the image descriptor with the given relative path param file System Path The URL for the file system to the image param loader the loader used to get this data return Image Data Image Data get Image Data URL file System Path Image Loader loader try Input Stream stream file System Path open Stream Image Data result loader load stream stream close return result catch File Not Found Exception exception Progress Manager Util log Exception exception return null catch IO Exception exception Progress Manager Util log Exception exception return null  fileSystemPath ImageData ImageData getImageData fileSystemPath ImageLoader InputStream fileSystemPath openStream ImageData FileNotFoundException ProgressManagerUtil logException IOException ProgressManagerUtil logException
Runnable dialog Wait Runnable new Runnable public void run try dialog set Open On Run false set User Interface Active false dialog run true true runnable catch Invocation Target Exception e invokes 0 e catch Interrupted Exception e interrupt 0 e finally set User Interface Active true  dialogWaitRunnable setOpenOnRun setUserInterfaceActive InvocationTargetException InterruptedException setUserInterfaceActive
public void busy Cursor While final I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception final Progress Monitor Jobs Dialog dialog new Progress Monitor Jobs Dialog Progress Manager Util get Non Modal Shell dialog set Open On Run false final Invocation Target Exception invokes new Invocation Target Exception 1 final Interrupted Exception interrupt new Interrupted Exception 1 show a busy cursor until the dialog opens Runnable dialog Wait Runnable new Runnable public void run try dialog set Open On Run false set User Interface Active false dialog run true true runnable catch Invocation Target Exception e invokes 0 e catch Interrupted Exception e interrupt 0 e finally set User Interface Active true busy Cursor While dialog Wait Runnable dialog if invokes 0 null throw invokes 0 if interrupt 0 null throw interrupt 0  busyCursorWhile IRunnableWithProgress InvocationTargetException InterruptedException ProgressMonitorJobsDialog ProgressMonitorJobsDialog ProgressManagerUtil getNonModalShell setOpenOnRun InvocationTargetException InvocationTargetException InterruptedException InterruptedException dialogWaitRunnable setOpenOnRun setUserInterfaceActive InvocationTargetException InterruptedException setUserInterfaceActive busyCursorWhile dialogWaitRunnable
Show the busy cursor while the runnable is running Schedule a job to replace it with a progress dialog param dialog Wait Runnable param dialog private void busy Cursor While Runnable dialog Wait Runnable Progress Monitor Jobs Dialog dialog create the job that will open the dialog after a delay schedule Progress Monitor Job dialog final Display display PlatformUI get Workbench get Display if display null return show a busy cursor until the dialog opens Busy Indicator show While display dialog Wait Runnable  dialogWaitRunnable busyCursorWhile dialogWaitRunnable ProgressMonitorJobsDialog scheduleProgressMonitorJob getWorkbench getDisplay BusyIndicator showWhile dialogWaitRunnable
public I Status run InUI Thread I Progress Monitor monitor set User Interface Active true if Progress Manager Util safe To Open dialog dialog open return Status OK STATUS  IStatus runInUIThread IProgressMonitor setUserInterfaceActive ProgressManagerUtil safeToOpen OK_STATUS
Schedule the job that will open the progress monitor dialog param dialog the dialog to open private void schedule Progress Monitor Job final Progress Monitor Jobs Dialog dialog final Workbench Job update Job new Workbench Job Progress Messages get String Progress Manager open Job Name NON NLS 1 non Javadoc see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor monitor set User Interface Active true if Progress Manager Util safe To Open dialog dialog open return Status OK STATUS update Job set System true update Job schedule get Long Operation Time  scheduleProgressMonitorJob ProgressMonitorJobsDialog WorkbenchJob updateJob WorkbenchJob ProgressMessages getString ProgressManager openJobName UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor setUserInterfaceActive ProgressManagerUtil safeToOpen OK_STATUS updateJob setSystem updateJob getLongOperationTime
Shutdown the receiver private void shutdown this listeners clear Platform get Job Manager set Progress Provider null Platform get Job Manager remove Job Change Listener this change Listener  getJobManager setProgressProvider getJobManager removeJobChangeListener changeListener
see org eclipse core runtime jobs Progress Provider create Progress Group public I Progress Monitor create Progress Group return new Group Info  ProgressProvider createProgressGroup IProgressMonitor createProgressGroup GroupInfo
public I Progress Monitor create Monitor Job job I Progress Monitor group int ticks Job Monitor monitor progress For job if group instanceof Group Info Group Info group Info Group Info group Job Info job Info get Job Info job job Info set Group Info group Info job Info set Ticks ticks group Info add Job Info job Info return monitor  IProgressMonitor createMonitor IProgressMonitor JobMonitor progressFor GroupInfo GroupInfo groupInfo GroupInfo JobInfo jobInfo getJobInfo jobInfo setGroupInfo groupInfo jobInfo setTicks groupInfo addJobInfo jobInfo
Add the listener to the family param family param listener void add Listener To Family Object family I Job Busy Listener listener synchronized family Key Collection current Listeners new Hash Set if family Listeners contains Key family current Listeners Collection family Listeners get family current Listeners add listener family Listeners put family current Listeners  addListenerToFamily IJobBusyListener familyKey currentListeners HashSet familyListeners containsKey currentListeners familyListeners currentListeners familyListeners currentListeners
Remove the listener from all families param listener void remove Listener I Job Busy Listener listener synchronized family Key Collection keys To Remove new Hash Set Iterator families family Listeners key Set iterator while families has Next Object next families next Collection current Listeners Collection family Listeners get next if current Listeners contains listener current Listeners remove listener if current Listeners is Empty keys To Remove add next else family Listeners put next current Listeners Remove any empty listeners Iterator keys Iterator keys To Remove iterator while keys Iterator has Next family Listeners remove keys Iterator next  removeListener IJobBusyListener familyKey keysToRemove HashSet familyListeners keySet hasNext currentListeners familyListeners currentListeners currentListeners currentListeners isEmpty keysToRemove familyListeners currentListeners keysIterator keysToRemove keysIterator hasNext familyListeners keysIterator
Return the listeners for the job param job return Collection of I Job Busy Listener private Collection busy Listeners For Job Job job if job is System return new Hash Set synchronized family Key Collection return Value new Hash Set Iterator families family Listeners key Set iterator while families has Next Object next families next if job belongs To next Collection current Listeners Collection family Listeners get next return Value add All current Listeners return return Value  IJobBusyListener busyListenersForJob isSystem HashSet familyKey returnValue HashSet familyListeners keySet hasNext belongsTo currentListeners familyListeners returnValue addAll currentListeners returnValue
public void show In Dialog Shell shell Job job if should Run In Background return final Progress Monitor Focus Job Dialog dialog new Progress Monitor Focus Job Dialog shell dialog show job  showInDialog shouldRunInBackground ProgressMonitorFocusJobDialog ProgressMonitorFocusJobDialog
public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception if fork false cancelable false backward compatible code final Progress Monitor Jobs Dialog dialog new Progress Monitor Jobs Dialog null dialog run fork cancelable runnable return busy Cursor While runnable  IRunnableWithProgress InvocationTargetException InterruptedException ProgressMonitorJobsDialog ProgressMonitorJobsDialog busyCursorWhile
Busy Indicator show While Display get Default new Runnable public void run try manager begin Rule rule get Event Loop Monitor context run false false runnable catch Invocation Target Exception e exception 0 e catch Interrupted Exception e canceled 0 e catch Operation Canceled Exception e canceled 0 new Interrupted Exception e get Message finally manager end Rule rule  BusyIndicator showWhile getDefault beginRule getEventLoopMonitor InvocationTargetException InterruptedException OperationCanceledException InterruptedException getMessage endRule
public void set Blocked I Status reason Set a shell to open with as we want to create this even if there is a modal shell Dialog get Blocked Handler show Blocked Progress Manager Util get Default Parent this reason get Task Name  setBlocked IStatus getBlockedHandler showBlocked ProgressManagerUtil getDefaultParent getTaskName
Get a progress monitor that forwards to an event loop monitor Override set Blocked so that we always open the blocked dialog return the monitor on the event loop private I Progress Monitor get Event Loop Monitor return new Event Loop Progress Monitor new Null Progress Monitor non Javadoc see org eclipse ui internal dialogs Event Loop Progress Monitor set Blocked org eclipse core runtime I Status public void set Blocked I Status reason Set a shell to open with as we want to create this even if there is a modal shell Dialog get Blocked Handler show Blocked Progress Manager Util get Default Parent this reason get Task Name  setBlocked IProgressMonitor getEventLoopMonitor EventLoopProgressMonitor NullProgressMonitor EventLoopProgressMonitor setBlocked IStatus setBlocked IStatus getBlockedHandler showBlocked ProgressManagerUtil getDefaultParent getTaskName
public void run InUI final I Runnable Context context final I Runnable With Progress runnable final I Scheduling Rule rule throws Invocation Target Exception Interrupted Exception final I Job Manager manager Platform get Job Manager final Invocation Target Exception exception new Invocation Target Exception 1 final Interrupted Exception canceled new Interrupted Exception 1 Busy Indicator show While Display get Default new Runnable public void run try manager begin Rule rule get Event Loop Monitor context run false false runnable catch Invocation Target Exception e exception 0 e catch Interrupted Exception e canceled 0 e catch Operation Canceled Exception e canceled 0 new Interrupted Exception e get Message finally manager end Rule rule Get a progress monitor that forwards to an event loop monitor Override set Blocked so that we always open the blocked dialog return the monitor on the event loop private I Progress Monitor get Event Loop Monitor return new Event Loop Progress Monitor new Null Progress Monitor non Javadoc see org eclipse ui internal dialogs Event Loop Progress Monitor set Blocked org eclipse core runtime I Status public void set Blocked I Status reason Set a shell to open with as we want to create this even if there is a modal shell Dialog get Blocked Handler show Blocked Progress Manager Util get Default Parent this reason get Task Name if exception 0 null throw exception 0 if canceled 0 null throw canceled 0  runInUI IRunnableContext IRunnableWithProgress ISchedulingRule InvocationTargetException InterruptedException IJobManager getJobManager InvocationTargetException InvocationTargetException InterruptedException InterruptedException BusyIndicator showWhile getDefault beginRule getEventLoopMonitor InvocationTargetException InterruptedException OperationCanceledException InterruptedException getMessage endRule setBlocked IProgressMonitor getEventLoopMonitor EventLoopProgressMonitor NullProgressMonitor EventLoopProgressMonitor setBlocked IStatus setBlocked IStatus getBlockedHandler showBlocked ProgressManagerUtil getDefaultParent getTaskName
see org eclipse ui progress I Progress Service get Long Operation Time public int get Long Operation Time return 800  IProgressService getLongOperationTime getLongOperationTime
public void register Icon For Family Image Descriptor icon Object family String key IMAGE KEY String value Of image Key Table size image Key Table put family key Image Registry registry J Face Resources get Image Registry Avoid registering twice if registry get Descriptor key null registry put key icon  registerIconForFamily ImageDescriptor IMAGE_KEY valueOf imageKeyTable imageKeyTable ImageRegistry JFaceResources getImageRegistry getDescriptor
public Image get Icon For Job job Enumeration families image Key Table keys while families has More Elements Object next families next Element if job belongs To next return J Face Resources get Image Registry get String image Key Table get next return null  getIconFor imageKeyTable hasMoreElements nextElement belongsTo JFaceResources getImageRegistry imageKeyTable
Iterate through all of the windows and set them to be disabled or enabled as appropriate param active The set the windows will be set to private void set User Interface Active boolean active I Workbench workbench PlatformUI get Workbench Shell shells workbench get Display get Shells for int i 0 i shells length i shells i set Enabled active  setUserInterfaceActive IWorkbench getWorkbench getDisplay getShells setEnabled
Check to see if there are any stale jobs we have not cleared out return code true code if anything was pruned private boolean prune Stale Jobs Object jobs To Check jobs key Set to Array boolean pruned false for int i 0 i jobs To Check length i Job job Job jobs To Check i if job get State Job NONE if Policy DEBUG STALE JOBS Workbench Plugin log Stale Job job get Name NON NLS 1 remove Job Info get Job Info job pruned true return pruned  pruneStaleJobs jobsToCheck keySet toArray jobsToCheck jobsToCheck getState DEBUG_STALE_JOBS WorkbenchPlugin getName removeJobInfo getJobInfo
Return whether or not dialogs should be run in the background return code true code if the dialog should not be shown private boolean should Run In Background return Workbench Plugin get Default get Preference Store get Boolean I Preference Constants RUN IN BACKGROUND  shouldRunInBackground WorkbenchPlugin getDefault getPreferenceStore getBoolean IPreferenceConstants RUN_IN_BACKGROUND

get String Progress Floating Window Ellipsis Value NON NLS 1 Return a status for the exception param exception return static I Status exception Status Throwable exception return Status Util new Status I Status ERROR exception get Message null exception get Message NON NLS 1 exception  getString ProgressFloatingWindow EllipsisValue IStatus exceptionStatus StatusUtil newStatus IStatus getMessage getMessage
Log the exception for debugging param exception static void log Exception Throwable exception Bundle Utility log PlatformUI PLUGIN ID exception  logException BundleUtility PLUGIN_ID
java lang Object java lang Object public int compare Viewer test Viewer Object e1 Object e2 return Comparable e1 compare To e2  testViewer compareTo
Return a viewer sorter for looking at the jobs return Viewer Sorter static Viewer Sorter get Progress Viewer Sorter return new Viewer Sorter non Javadoc see org eclipse jface viewers Viewer Sorter compare org eclipse jface viewers Viewer java lang Object java lang Object public int compare Viewer test Viewer Object e1 Object e2 return Comparable e1 compare To e2  ViewerSorter ViewerSorter getProgressViewerSorter ViewerSorter ViewerSorter testViewer compareTo
Open the progress view in the supplied window param window static void open Progress View Workbench Window window I Workbench Page page window get Active Page if page null return try page show View I Progress Constants PROGRESS VIEW ID catch Part Init Exception exception log Exception exception  openProgressView WorkbenchWindow IWorkbenchPage getActivePage showView IProgressConstants PROGRESS_VIEW_ID PartInitException logException
Return whether or not the progress view is missing param window return true if there is no progress view static boolean missing Progress View Workbench Window window return Workbench Plugin get Default get View Registry find I Progress Constants PROGRESS VIEW ID null  missingProgressView WorkbenchWindow WorkbenchPlugin getDefault getViewRegistry IProgressConstants PROGRESS_VIEW_ID
Shorten the given text code t code so that its length doesn t exceed the given width The default implementation replaces characters in the center of the original string with an ellipsis Override if you need a different strategy param text Value param control return String static String shorten Text String text Value Control control if text Value null return null Display display control get Display GC gc new GC display int max Width control get Bounds width 5 if gc text Extent text Value x max Width gc dispose return text Value int length text Value length int ellipsis Width gc text Extent ellipsis x Find the second space seperator and start from there int second Word find Second Whitespace text Value gc max Width int pivot length second Word 2 second Word int start pivot int end pivot 1 while start second Word end length String s1 text Value substring 0 start String s2 text Value substring end length int l1 gc text Extent s1 x int l2 gc text Extent s2 x if l1 ellipsis Width l2 max Width gc dispose return s1 ellipsis s2 start end gc dispose return text Value  textValue shortenText textValue textValue getDisplay maxWidth getBounds textExtent textValue maxWidth textValue textValue ellipsisWidth textExtent secondWord findSecondWhitespace textValue maxWidth secondWord secondWord secondWord textValue textValue textExtent textExtent ellipsisWidth maxWidth textValue
Find the second index of a whitespace Return the first index if there isn t one or 0 if there is no space at all param text Value param gc The GC to test max length param max Width The maximim extent return int private static int find Second Whitespace String text Value GC gc int max Width int first Character 0 char chars text Value to Char Array Find the first whitespace for int i 0 i chars length i if Character is Whitespace chars i first Character i break If we didn t find it once don t continue if first Character 0 return 0 Initialize to first Character in case there is no more whitespace int second Character first Character Find the second whitespace for int i first Character i chars length i if Character is Whitespace chars i second Character i break Check that we haven t gone over max width Throw out an index that is too high if gc text Extent text Value substring 0 second Character x max Width if gc text Extent text Value substring 0 first Character x max Width return 0 return first Character return second Character  textValue maxWidth findSecondWhitespace textValue maxWidth firstCharacter textValue toCharArray isWhitespace firstCharacter firstCharacter firstCharacter secondCharacter firstCharacter firstCharacter isWhitespace secondCharacter textExtent textValue secondCharacter maxWidth textExtent textValue firstCharacter maxWidth firstCharacter secondCharacter
If there are any modal shells open reschedule open Job to wait until they are closed Return true if it rescheduled false if there is nothing blocking it param open Job return boolean true if the job was rescheduled due to modal dialogs public static boolean reschedule If Modal Shell Open Job open Job Shell modal get Modal Shell if modal null return false try again in a few seconds open Job schedule PlatformUI get Workbench get Progress Service get Long Operation Time return true  openJob openJob rescheduleIfModalShellOpen openJob getModalShell openJob getWorkbench getProgressService getLongOperationTime
Return whether or not it is safe to open this dialog If so then return code true code If not then set it to open itself when it has had Progress Manager long Operation Time worth of ticks param dialog Progress Monitor Jobs Dialog that will be opening return boolean code true code if it can open Otherwise return false and set the dialog to tick public static boolean safe To Open Progress Monitor Jobs Dialog dialog Shell modal get Modal Shell if modal null return true dialog watch Ticks return false  ProgressManager longOperationTime ProgressMonitorJobsDialog safeToOpen ProgressMonitorJobsDialog getModalShell watchTicks
Return the modal shell that is currently open If there isn t one then return null return Shell or code null code public static Shell get Modal Shell I Workbench workbench PlatformUI get Workbench Shell shells workbench get Display get Shells int modal SWT APPLICATION MODAL SWT SYSTEM MODAL SWT PRIMARY MODAL for int i 0 i shells length i Do not worry about shells that will not block the user if shells i is Visible int style shells i get Style if style modal 0 return shells i return null  getModalShell IWorkbench getWorkbench getDisplay getShells APPLICATION_MODAL SYSTEM_MODAL PRIMARY_MODAL isVisible getStyle
Utility method to get the best parenting possible for a dialog If there is a modal shell create it so as to avoid two modal dialogs If not then return the shell of the active workbench window If neither can be found return null return Shell or code null code public static Shell get Default Parent Shell modal get Modal Shell if modal null return modal return get Non Modal Shell  getDefaultParent getModalShell getNonModalShell
Get the active non modal shell If there isn t one return null return public static Shell get Non Modal Shell I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null return window get Shell return null  getNonModalShell IWorkbenchWindow getWorkbench getActiveWorkbenchWindow getShell
Animate the closing of a window given the start position down to the progress region param start Position Rectangle The position to start drawing from public static void animate Down Rectangle start Position I Workbench Window current Window PlatformUI get Workbench get Active Workbench Window if current Window null return Workbench Window internal Window Workbench Window current Window Rectangle end internal Window get Progress Region get Control get Bounds Point window Location internal Window get Shell get Location end x window Location x end y window Location y Rectangle Animation animation new Rectangle Animation internal Window get Shell start Position end animation schedule  startPosition animateDown startPosition IWorkbenchWindow currentWindow getWorkbench getActiveWorkbenchWindow currentWindow WorkbenchWindow internalWindow WorkbenchWindow currentWindow internalWindow getProgressRegion getControl getBounds windowLocation internalWindow getShell getLocation windowLocation windowLocation RectangleAnimation RectangleAnimation internalWindow getShell startPosition
Animate the opening of a window given the start position down to the progress region param end Position Rectangle The position to end drawing at public static void animate Up Rectangle end Position I Workbench Window current Window PlatformUI get Workbench get Active Workbench Window if current Window null return Workbench Window internal Window Workbench Window current Window Point window Location internal Window get Shell get Location Rectangle region internal Window get Progress Region get Control get Bounds region x window Location x region y window Location y Rectangle Animation animation new Rectangle Animation internal Window get Shell region end Position animation schedule  endPosition animateUp endPosition IWorkbenchWindow currentWindow getWorkbench getActiveWorkbenchWindow currentWindow WorkbenchWindow internalWindow WorkbenchWindow currentWindow windowLocation internalWindow getShell getLocation internalWindow getProgressRegion getControl getBounds windowLocation windowLocation RectangleAnimation RectangleAnimation internalWindow getShell endPosition

Resource Bundle get Bundle BUNDLE NAME private Progress Messages prevent instantiation of class  ResourceBundle getBundle BUNDLE_NAME ProgressMessages
Returns the resource object with the given key in the 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 RESOURCE BUNDLE get String key catch Missing Resource Exception e return key  getString RESOURCE_BUNDLE getString MissingResourceException
Returns the formatted message for the given key in the 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  MessageFormat getString

Job job Create a new instance of the receiver with progress reported on the job param parent Shell The shell this is parented from public Progress Monitor Focus Job Dialog Shell parent Shell super parent Shell null Progress Manager Util get Non Modal Shell parent Shell set Cancelable true enable Details Button true  parentShell ProgressMonitorFocusJobDialog parentShell parentShell ProgressManagerUtil getNonModalShell parentShell setCancelable enableDetailsButton
see org eclipse jface dialogs Progress Monitor Dialog cancel Pressed protected void cancel Pressed job cancel super cancel Pressed  ProgressMonitorDialog cancelPressed cancelPressed cancelPressed
see org eclipse jface dialogs Progress Monitor Dialog configure Shell org eclipse swt widgets Shell protected void configure Shell Shell shell super configure Shell shell shell set Text job get Name  ProgressMonitorDialog configureShell configureShell configureShell setText getName
public void widget Selected Selection Event e Rectangle shell Position get Shell get Bounds job set Property I Progress Constants PROPERTY IN DIALOG Boolean FALSE finished Run Progress Manager Util animate Down shell Position  widgetSelected SelectionEvent shellPosition getShell getBounds setProperty IProgressConstants PROPERTY_IN_DIALOG finishedRun ProgressManagerUtil animateDown shellPosition
protected void create Buttons For Button Bar Composite parent Button run In Workspace create Button parent I Dialog Constants CLOSE ID Progress Messages get String Progress Monitor Focus Job Dialog Run In Background Button NON NLS 1 true run In Workspace add Selection Listener new Selection Adapter non Javadoc see org eclipse swt events Selection Adapter widget Selected org eclipse swt events Selection Event public void widget Selected Selection Event e Rectangle shell Position get Shell get Bounds job set Property I Progress Constants PROPERTY IN DIALOG Boolean FALSE finished Run Progress Manager Util animate Down shell Position run In Workspace set Cursor arrow Cursor create Cancel Button parent create Details Button parent  createButtonsForButtonBar runInWorkspace createButton IDialogConstants CLOSE_ID ProgressMessages getString ProgressMonitorFocusJobDialog RunInBackgroundButton runInWorkspace addSelectionListener SelectionAdapter SelectionAdapter widgetSelected SelectionEvent widgetSelected SelectionEvent shellPosition getShell getBounds setProperty IProgressConstants PROPERTY_IN_DIALOG finishedRun ProgressManagerUtil animateDown shellPosition runInWorkspace setCursor arrowCursor createCancelButton createDetailsButton
public I Status run InUI Thread I Progress Monitor monitor Shell current Shell get Shell if current Shell null current Shell is Disposed return Status CANCEL STATUS finished Run return Status OK STATUS  IStatus runInUIThread IProgressMonitor currentShell getShell currentShell currentShell isDisposed CANCEL_STATUS finishedRun OK_STATUS
public void done I Job Change Event event first of all make sure this listener is removed event get Job remove Job Change Listener this if PlatformUI is Workbench Running return nothing to do if the dialog is already closed if get Shell null return Workbench Job close Job new Workbench Job Progress Messages get String Progress Monitor Focus Job Dialog C Lose Dialog Job NON NLS 1 non Javadoc see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor monitor Shell current Shell get Shell if current Shell null current Shell is Disposed return Status CANCEL STATUS finished Run return Status OK STATUS close Job set System true close Job schedule  IJobChangeEvent getJob removeJobChangeListener isWorkbenchRunning getShell WorkbenchJob closeJob WorkbenchJob ProgressMessages getString ProgressMonitorFocusJobDialog CLoseDialogJob UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor currentShell getShell currentShell currentShell isDisposed CANCEL_STATUS finishedRun OK_STATUS closeJob setSystem closeJob
Returns a listener that will close the dialog when the job completes return I Job Change Listener private I Job Change Listener create Close Listener return new Job Change Adapter non Javadoc see org eclipse core runtime jobs I Job Change Listener done org eclipse core runtime jobs I Job Change Event public void done I Job Change Event event first of all make sure this listener is removed event get Job remove Job Change Listener this if PlatformUI is Workbench Running return nothing to do if the dialog is already closed if get Shell null return Workbench Job close Job new Workbench Job Progress Messages get String Progress Monitor Focus Job Dialog C Lose Dialog Job NON NLS 1 non Javadoc see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor monitor Shell current Shell get Shell if current Shell null current Shell is Disposed return Status CANCEL STATUS finished Run return Status OK STATUS close Job set System true close Job schedule  IJobChangeListener IJobChangeListener createCloseListener JobChangeAdapter IJobChangeListener IJobChangeEvent IJobChangeEvent getJob removeJobChangeListener isWorkbenchRunning getShell WorkbenchJob closeJob WorkbenchJob ProgressMessages getString ProgressMonitorFocusJobDialog CLoseDialogJob UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor currentShell getShell currentShell currentShell isDisposed CANCEL_STATUS finishedRun OK_STATUS closeJob setSystem closeJob
see java lang Runnable run public void run get Progress Monitor begin Task final Name final Work  getProgressMonitor beginTask finalName finalWork
public void begin Task String name int total Work final String final Name name final int final Work total Work run Async new Runnable non Javadoc see java lang Runnable run public void run get Progress Monitor begin Task final Name final Work  beginTask totalWork finalName finalWork totalWork runAsync getProgressMonitor beginTask finalName finalWork
see java lang Runnable run public void run I Progress Monitor With Blocking get Progress Monitor clear Blocked  IProgressMonitorWithBlocking getProgressMonitor clearBlocked
public void clear Blocked run Async new Runnable non Javadoc see java lang Runnable run public void run I Progress Monitor With Blocking get Progress Monitor clear Blocked  clearBlocked runAsync IProgressMonitorWithBlocking getProgressMonitor clearBlocked
see java lang Runnable run public void run get Progress Monitor done  getProgressMonitor
public void done run Async new Runnable non Javadoc see java lang Runnable run public void run get Progress Monitor done  runAsync getProgressMonitor
see java lang Runnable run public void run get Progress Monitor internal Worked final Work  getProgressMonitor internalWorked finalWork
public void internal Worked double work final double final Work work run Async new Runnable non Javadoc see java lang Runnable run public void run get Progress Monitor internal Worked final Work  internalWorked finalWork runAsync getProgressMonitor internalWorked finalWork
see org eclipse core runtime I Progress Monitor is Canceled public boolean is Canceled return get Progress Monitor is Canceled  IProgressMonitor isCanceled isCanceled getProgressMonitor isCanceled
Run the runnable as an async Exec if we are already open param runnable private void run Async Runnable runnable if already Closed return Shell current Shell get Shell Display display if current Shell null display Display get Default else display current Shell get Display display async Exec runnable  asyncExec runAsync alreadyClosed currentShell getShell currentShell getDefault currentShell getDisplay asyncExec
see java lang Runnable run public void run I Progress Monitor With Blocking get Progress Monitor set Blocked final Reason  IProgressMonitorWithBlocking getProgressMonitor setBlocked finalReason
public void set Blocked I Status reason final I Status final Reason reason run Async new Runnable non Javadoc see java lang Runnable run public void run I Progress Monitor With Blocking get Progress Monitor set Blocked final Reason  setBlocked IStatus IStatus finalReason runAsync IProgressMonitorWithBlocking getProgressMonitor setBlocked finalReason
see org eclipse core runtime I Progress Monitor set Canceled boolean public void set Canceled boolean value Just a listener doesn t matter  IProgressMonitor setCanceled setCanceled
see java lang Runnable run public void run get Progress Monitor set Task Name final Name  getProgressMonitor setTaskName finalName
public void set Task Name String name final String final Name name run Async new Runnable non Javadoc see java lang Runnable run public void run get Progress Monitor set Task Name final Name  setTaskName finalName runAsync getProgressMonitor setTaskName finalName
see java lang Runnable run public void run get Progress Monitor sub Task final Name  getProgressMonitor subTask finalName
public void sub Task String name final String final Name name run Async new Runnable non Javadoc see java lang Runnable run public void run get Progress Monitor sub Task final Name  subTask finalName runAsync getProgressMonitor subTask finalName
see org eclipse core runtime I Progress Monitor worked int public void worked int work internal Worked work  IProgressMonitor internalWorked
Return the Progress Monitor With Blocking for the receiver return private I Progress Monitor With Blocking get Blocking Progress Monitor return new I Progress Monitor With Blocking non Javadoc see org eclipse core runtime I Progress Monitor begin Task java lang String int public void begin Task String name int total Work final String final Name name final int final Work total Work run Async new Runnable non Javadoc see java lang Runnable run public void run get Progress Monitor begin Task final Name final Work non Javadoc see org eclipse core runtime I Progress Monitor With Blocking clear Blocked public void clear Blocked run Async new Runnable non Javadoc see java lang Runnable run public void run I Progress Monitor With Blocking get Progress Monitor clear Blocked non Javadoc see org eclipse core runtime I Progress Monitor done public void done run Async new Runnable non Javadoc see java lang Runnable run public void run get Progress Monitor done non Javadoc see org eclipse core runtime I Progress Monitor internal Worked double public void internal Worked double work final double final Work work run Async new Runnable non Javadoc see java lang Runnable run public void run get Progress Monitor internal Worked final Work non Javadoc see org eclipse core runtime I Progress Monitor is Canceled public boolean is Canceled return get Progress Monitor is Canceled Run the runnable as an async Exec if we are already open param runnable private void run Async Runnable runnable if already Closed return Shell current Shell get Shell Display display if current Shell null display Display get Default else display current Shell get Display display async Exec runnable non Javadoc see org eclipse core runtime I Progress Monitor With Blocking set Blocked org eclipse core runtime I Status public void set Blocked I Status reason final I Status final Reason reason run Async new Runnable non Javadoc see java lang Runnable run public void run I Progress Monitor With Blocking get Progress Monitor set Blocked final Reason non Javadoc see org eclipse core runtime I Progress Monitor set Canceled boolean public void set Canceled boolean value Just a listener doesn t matter non Javadoc see org eclipse core runtime I Progress Monitor set Task Name java lang String public void set Task Name String name final String final Name name run Async new Runnable non Javadoc see java lang Runnable run public void run get Progress Monitor set Task Name final Name non Javadoc see org eclipse core runtime I Progress Monitor sub Task java lang String public void sub Task String name final String final Name name run Async new Runnable non Javadoc see java lang Runnable run public void run get Progress Monitor sub Task final Name non Javadoc see org eclipse core runtime I Progress Monitor worked int public void worked int work internal Worked work  ProgressMonitorWithBlocking IProgressMonitorWithBlocking getBlockingProgressMonitor IProgressMonitorWithBlocking IProgressMonitor beginTask beginTask totalWork finalName finalWork totalWork runAsync getProgressMonitor beginTask finalName finalWork IProgressMonitorWithBlocking clearBlocked clearBlocked runAsync IProgressMonitorWithBlocking getProgressMonitor clearBlocked IProgressMonitor runAsync getProgressMonitor IProgressMonitor internalWorked internalWorked finalWork runAsync getProgressMonitor internalWorked finalWork IProgressMonitor isCanceled isCanceled getProgressMonitor isCanceled asyncExec runAsync alreadyClosed currentShell getShell currentShell getDefault currentShell getDisplay asyncExec IProgressMonitorWithBlocking setBlocked IStatus setBlocked IStatus IStatus finalReason runAsync IProgressMonitorWithBlocking getProgressMonitor setBlocked finalReason IProgressMonitor setCanceled setCanceled IProgressMonitor setTaskName setTaskName finalName runAsync getProgressMonitor setTaskName finalName IProgressMonitor subTask subTask finalName runAsync getProgressMonitor subTask finalName IProgressMonitor internalWorked
public int open int result super open add a listener that will close the dialog when the job completes I Job Change Listener listener create Close Listener job add Job Change Listener listener if job get State Job NONE if the job completed before we had a chance to add the listener just remove the listener and return job remove Job Change Listener listener finished Run return result  IJobChangeListener createCloseListener addJobChangeListener getState removeJobChangeListener finishedRun
Busy Indicator show While PlatformUI get Workbench get Display new Runnable public void run try Thread sleep Progress Manager Util SHORT OPERATION TIME catch Interrupted Exception e Workbench Plugin log e get Localized Message  BusyIndicator showWhile getWorkbench getDisplay ProgressManagerUtil SHORT_OPERATION_TIME InterruptedException WorkbenchPlugin getLocalizedMessage
public I Status run InUI Thread I Progress Monitor monitor if the job is done at this point we don t need the dialog if job get State Job NONE return Status CANCEL STATUS now open the progress dialog if nothing else is if Progress Manager Util safe To Open Progress Monitor Focus Job Dialog this return Status CANCEL STATUS Do not bother if the parent is disposed if get Parent Shell null get Parent Shell is Disposed return Status CANCEL STATUS open return Status OK STATUS  IStatus runInUIThread IProgressMonitor getState CANCEL_STATUS ProgressManagerUtil safeToOpen ProgressMonitorFocusJobDialog CANCEL_STATUS getParentShell getParentShell isDisposed CANCEL_STATUS OK_STATUS
Opens this dialog for the duration that the given job is running param job To Watch public void show Job job To Watch job job To Watch after the dialog is opened we can get access to its monitor job set Property I Progress Constants PROPERTY IN DIALOG Boolean TRUE Progress Manager get Instance progress For job add Progress Listener get Blocking Progress Monitor set Open On Run false about To Run start with a quick busy indicator Lock the UI as we want to preserve modality Busy Indicator show While PlatformUI get Workbench get Display new Runnable public void run try Thread sleep Progress Manager Util SHORT OPERATION TIME catch Interrupted Exception e Workbench Plugin log e get Localized Message Workbench Job open Job new Workbench Job Progress Messages get String Progress Monitor Focus Job Dialog User Dialog Job NON NLS 1 non Javadoc see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor monitor if the job is done at this point we don t need the dialog if job get State Job NONE return Status CANCEL STATUS now open the progress dialog if nothing else is if Progress Manager Util safe To Open Progress Monitor Focus Job Dialog this return Status CANCEL STATUS Do not bother if the parent is disposed if get Parent Shell null get Parent Shell is Disposed return Status CANCEL STATUS open return Status OK STATUS open Job set System true open Job schedule  jobToWatch jobToWatch jobToWatch setProperty IProgressConstants PROPERTY_IN_DIALOG ProgressManager getInstance progressFor addProgressListener getBlockingProgressMonitor setOpenOnRun aboutToRun BusyIndicator showWhile getWorkbench getDisplay ProgressManagerUtil SHORT_OPERATION_TIME InterruptedException WorkbenchPlugin getLocalizedMessage WorkbenchJob openJob WorkbenchJob ProgressMessages getString ProgressMonitorFocusJobDialog UserDialogJob UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor getState CANCEL_STATUS ProgressManagerUtil safeToOpen ProgressMonitorFocusJobDialog CANCEL_STATUS getParentShell getParentShell isDisposed CANCEL_STATUS OK_STATUS openJob setSystem openJob

protected boolean enable Details Button false Create a new instance of the receiver param parent public Progress Monitor Jobs Dialog Shell parent super parent set Shell Style get Shell Style SWT RESIZE  enableDetailsButton ProgressMonitorJobsDialog setShellStyle getShellStyle
protected Control create Dialog Area Composite parent Composite top Composite super create Dialog Area parent viewer Composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 viewer Composite set Layout layout Grid Data viewer Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL Grid Data FILL BOTH viewer Data horizontal Span 2 viewer Data height Hint 0 viewer Composite set Layout Data viewer Data return top  createDialogArea createDialogArea viewerComposite GridLayout GridLayout marginHeight marginWidth viewerComposite setLayout GridData viewerData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL GridData FILL_BOTH viewerData horizontalSpan viewerData heightHint viewerComposite setLayoutData viewerData
java lang Object java lang Object public int compare Viewer test Viewer Object e1 Object e2 return Comparable e1 compare To e2  testViewer compareTo
The details button has been selected Open or close the progress viewer as appropriate void handle Details Button Select Shell shell get Shell Point shell Size shell get Size Composite composite Composite get Dialog Area if viewer null viewer get Control dispose viewer null composite layout shell set Size shell Size x shell Size y viewer Height details Button set Text Progress Messages get String Progress Monitor Jobs Dialog Details Title NON NLS 1 else Abort if there are no jobs visible if Progress Manager get Instance get Root Elements false length 0 details Button set Enabled false return viewer new New Progress Viewer viewer Composite SWT MULTI SWT H SCROLL SWT V SCROLL SWT BORDER viewer set Use Hashlookup true viewer set Sorter new Viewer Sorter non Javadoc see org eclipse jface viewers Viewer Sorter compare org eclipse jface viewers Viewer java lang Object java lang Object public int compare Viewer test Viewer Object e1 Object e2 return Comparable e1 compare To e2 Progress Tree Content Provider provider new Progress Tree Content Provider viewer true viewer set Content Provider provider viewer set Input provider viewer set Label Provider new Progress Label Provider Grid Data viewer Data new Grid Data Grid Data GRAB HORIZONTAL Grid Data GRAB VERTICAL Grid Data FILL BOTH int height Hint convert Height In Chars To Pixels 10 viewer Data height Hint height Hint viewer get Control set Layout Data viewer Data Point size viewer get Control compute Size viewer Composite get Bounds width height Hint viewer get Control set Size size viewer Composite layout viewer get Control set Visible true viewer Height viewer get Control get Bounds height details Button set Text Progress Messages get String Progress Monitor Jobs Dialog Hide Title NON NLS 1 shell set Size shell Size x shell Size y viewer Height  handleDetailsButtonSelect getShell shellSize getSize getDialogArea getControl setSize shellSize shellSize viewerHeight detailsButton setText ProgressMessages getString ProgressMonitorJobsDialog DetailsTitle ProgressManager getInstance getRootElements detailsButton setEnabled NewProgressViewer viewerComposite H_SCROLL V_SCROLL setUseHashlookup setSorter ViewerSorter ViewerSorter testViewer compareTo ProgressTreeContentProvider ProgressTreeContentProvider setContentProvider setInput setLabelProvider ProgressLabelProvider GridData viewerData GridData GridData GRAB_HORIZONTAL GridData GRAB_VERTICAL GridData FILL_BOTH heightHint convertHeightInCharsToPixels viewerData heightHint heightHint getControl setLayoutData viewerData getControl computeSize viewerComposite getBounds heightHint getControl setSize viewerComposite getControl setVisible viewerHeight getControl getBounds detailsButton setText ProgressMessages getString ProgressMonitorJobsDialog HideTitle setSize shellSize shellSize viewerHeight
see org eclipse jface dialogs Dialog create Buttons For Button Bar org eclipse swt widgets Composite protected void create Buttons For Button Bar Composite parent super create Buttons For Button Bar parent create Details Button parent  createButtonsForButtonBar createButtonsForButtonBar createButtonsForButtonBar createDetailsButton
Create a spacer label to get the layout to not bunch the widgets param parent The parent of the new button protected void create Spacer Composite parent Make a label to force the spacing Label spacer new Label parent SWT NONE spacer set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Data GRAB HORIZONTAL  createSpacer setLayoutData GridData GridData FILL_HORIZONTAL GridData GRAB_HORIZONTAL
Create the details button for the receiver param parent The parent of the new button protected void create Details Button Composite parent details Button create Button parent I Dialog Constants DETAILS ID Progress Messages get String Progress Monitor Jobs Dialog Details Title NON NLS 1 false details Button add Selection Listener new Selection Adapter non Javadoc see org eclipse swt events Selection Listener widget Selected org eclipse swt events Selection Event public void widget Selected Selection Event e handle Details Button Select details Button set Cursor arrow Cursor details Button set Enabled enable Details Button  createDetailsButton detailsButton createButton IDialogConstants DETAILS_ID ProgressMessages getString ProgressMonitorJobsDialog DetailsTitle detailsButton addSelectionListener SelectionAdapter SelectionListener widgetSelected SelectionEvent widgetSelected SelectionEvent handleDetailsButtonSelect detailsButton setCursor arrowCursor detailsButton setEnabled enableDetailsButton
protected Control create Button Bar Composite parent Composite composite new Composite parent SWT NONE create a layout with spacing and margins appropriate for the font size Grid Layout layout new Grid Layout layout num Columns 1 this is incremented by create Button layout make Columns Equal Width false layout margin Width 0 layout margin Height 0 layout horizontal Spacing convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL SPACING layout vertical Spacing convert VerticalDL Us To Pixels I Dialog Constants VERTICAL SPACING composite set Layout layout Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 2 data horizontal Alignment Grid Data END data grab Excess Horizontal Space true composite set Layout Data data composite set Font parent get Font Add the buttons to the button bar if arrow Cursor null arrow Cursor new Cursor parent get Display SWT CURSOR ARROW create Buttons For Button Bar composite return composite  createButtonBar GridLayout GridLayout numColumns createButton makeColumnsEqualWidth marginWidth marginHeight horizontalSpacing convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_SPACING verticalSpacing convertVerticalDLUsToPixels IDialogConstants VERTICAL_SPACING setLayout GridData GridData GridData FILL_HORIZONTAL horizontalSpan horizontalAlignment GridData grabExcessHorizontalSpace setLayoutData setFont getFont arrowCursor arrowCursor getDisplay CURSOR_ARROW createButtonsForButtonBar
protected void clear Cursors if details Button null details Button is Disposed details Button set Cursor null super clear Cursors  clearCursors detailsButton detailsButton isDisposed detailsButton setCursor clearCursors
protected void update For Set Blocked I Status reason super update For Set Blocked reason enable Details true if viewer null Open the viewer if there is a block handle Details Button Select  updateForSetBlocked IStatus updateForSetBlocked enableDetails handleDetailsButtonSelect
public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception if it is run in the UI Thread don t do anything if fork enable Details false super run fork cancelable runnable  IRunnableWithProgress InvocationTargetException InterruptedException enableDetails
Set the enable state of the details button now or when it will be created param enable State a boolean to indicate the preferred state protected void enable Details boolean enable State if details Button null enable Details Button enable State else details Button set Enabled enable State  enableState enableDetails enableState detailsButton enableDetailsButton enableState detailsButton setEnabled enableState
Start watching the ticks When the long operation time has passed open the dialog param open Job The job to open when ticks are done public void watch Ticks watch Time System current Time Millis  openJob watchTicks watchTime currentTimeMillis
int public void begin Task String name int total Work super Monitor begin Task name total Work check Ticking  beginTask totalWork superMonitor beginTask totalWork checkTicking
Check if we have ticked in the last 800ms private void check Ticking if watch Time 0 return if System current Time Millis watch Time Progress Manager get Instance get Long Operation Time watch Time 1 open Dialog  checkTicking watchTime currentTimeMillis watchTime ProgressManager getInstance getLongOperationTime watchTime openDialog
see java lang Runnable run public void run if already Closed open  alreadyClosed
Open the dialog in the ui Thread private void open Dialog if PlatformUI is Workbench Running return PlatformUI get Workbench get Display sync Exec new Runnable non Javadoc see java lang Runnable run public void run if already Closed open  openDialog isWorkbenchRunning getWorkbench getDisplay syncExec alreadyClosed
see org eclipse core runtime I Progress Monitor done public void done super Monitor done check Ticking  IProgressMonitor superMonitor checkTicking
see org eclipse core runtime I Progress Monitor internal Worked double public void internal Worked double work super Monitor internal Worked work check Ticking  IProgressMonitor internalWorked internalWorked superMonitor internalWorked checkTicking
see org eclipse core runtime I Progress Monitor is Canceled public boolean is Canceled return super Monitor is Canceled  IProgressMonitor isCanceled isCanceled superMonitor isCanceled
see org eclipse core runtime I Progress Monitor set Canceled boolean public void set Canceled boolean value super Monitor set Canceled value  IProgressMonitor setCanceled setCanceled superMonitor setCanceled
public void set Task Name String name super Monitor set Task Name name check Ticking  setTaskName superMonitor setTaskName checkTicking
see org eclipse core runtime I Progress Monitor sub Task java lang String public void sub Task String name super Monitor sub Task name check Ticking  IProgressMonitor subTask subTask superMonitor subTask checkTicking
public void worked int work super Monitor worked work check Ticking  superMonitor checkTicking
public void clear Blocked We want to open on blocking too if super Monitor instanceof I Progress Monitor With Blocking I Progress Monitor With Blocking super Monitor clear Blocked  clearBlocked superMonitor IProgressMonitorWithBlocking IProgressMonitorWithBlocking superMonitor clearBlocked
public void set Blocked I Status reason open Dialog if super Monitor instanceof I Progress Monitor With Blocking I Progress Monitor With Blocking super Monitor set Blocked reason  setBlocked IStatus openDialog superMonitor IProgressMonitorWithBlocking IProgressMonitorWithBlocking superMonitor setBlocked
Create a monitor for the receiver that wrappers the superclasses monitor public void create Wrappered Monitor wrappered Monitor new I Progress Monitor With Blocking I Progress Monitor super Monitor Progress Monitor Jobs Dialog super get Progress Monitor non Javadoc see org eclipse core runtime I Progress Monitor begin Task java lang String int public void begin Task String name int total Work super Monitor begin Task name total Work check Ticking Check if we have ticked in the last 800ms private void check Ticking if watch Time 0 return if System current Time Millis watch Time Progress Manager get Instance get Long Operation Time watch Time 1 open Dialog Open the dialog in the ui Thread private void open Dialog if PlatformUI is Workbench Running return PlatformUI get Workbench get Display sync Exec new Runnable non Javadoc see java lang Runnable run public void run if already Closed open non Javadoc see org eclipse core runtime I Progress Monitor done public void done super Monitor done check Ticking non Javadoc see org eclipse core runtime I Progress Monitor internal Worked double public void internal Worked double work super Monitor internal Worked work check Ticking non Javadoc see org eclipse core runtime I Progress Monitor is Canceled public boolean is Canceled return super Monitor is Canceled non Javadoc see org eclipse core runtime I Progress Monitor set Canceled boolean public void set Canceled boolean value super Monitor set Canceled value non Javadoc see org eclipse core runtime I Progress Monitor set Task Name java lang String public void set Task Name String name super Monitor set Task Name name check Ticking non Javadoc see org eclipse core runtime I Progress Monitor sub Task java lang String public void sub Task String name super Monitor sub Task name check Ticking non Javadoc see org eclipse core runtime I Progress Monitor worked int public void worked int work super Monitor worked work check Ticking non Javadoc see org eclipse core runtime I Progress Monitor With Blocking clear Blocked public void clear Blocked We want to open on blocking too if super Monitor instanceof I Progress Monitor With Blocking I Progress Monitor With Blocking super Monitor clear Blocked non Javadoc see org eclipse core runtime I Progress Monitor With Blocking set Blocked org eclipse core runtime I Status public void set Blocked I Status reason open Dialog if super Monitor instanceof I Progress Monitor With Blocking I Progress Monitor With Blocking super Monitor set Blocked reason  createWrapperedMonitor wrapperedMonitor IProgressMonitorWithBlocking IProgressMonitor superMonitor ProgressMonitorJobsDialog getProgressMonitor IProgressMonitor beginTask beginTask totalWork superMonitor beginTask totalWork checkTicking checkTicking watchTime currentTimeMillis watchTime ProgressManager getInstance getLongOperationTime watchTime openDialog openDialog isWorkbenchRunning getWorkbench getDisplay syncExec alreadyClosed IProgressMonitor superMonitor checkTicking IProgressMonitor internalWorked internalWorked superMonitor internalWorked checkTicking IProgressMonitor isCanceled isCanceled superMonitor isCanceled IProgressMonitor setCanceled setCanceled superMonitor setCanceled IProgressMonitor setTaskName setTaskName superMonitor setTaskName checkTicking IProgressMonitor subTask subTask superMonitor subTask checkTicking IProgressMonitor superMonitor checkTicking IProgressMonitorWithBlocking clearBlocked clearBlocked superMonitor IProgressMonitorWithBlocking IProgressMonitorWithBlocking superMonitor clearBlocked IProgressMonitorWithBlocking setBlocked IStatus setBlocked IStatus openDialog superMonitor IProgressMonitorWithBlocking IProgressMonitorWithBlocking superMonitor setBlocked
public I Progress Monitor get Progress Monitor if wrappered Monitor null create Wrappered Monitor return wrappered Monitor  IProgressMonitor getProgressMonitor wrapperedMonitor createWrapperedMonitor wrapperedMonitor
public boolean close already Closed true As this sometimes delayed cache if it was already closed boolean result super close if result If it fails reset the flag already Closed false return result  alreadyClosed alreadyClosed

Workbench Window workbench Window Create a new instance of the receiver public Progress Region No default behavior  WorkbenchWindow workbenchWindow ProgressRegion
public void animation Done Add an extra refresh to the viewer in case of stale input if the controls are not disposed if viewer get Control is Disposed return viewer refresh  animationDone getControl isDisposed
see org eclipse ui internal progress Animation Item I Animation Container animation Start public void animation Start Nothing by default here  AnimationItem IAnimationContainer animationStart animationStart
see org eclipse swt events Mouse Adapter mouse Double Click org eclipse swt events Mouse Event public void mouse Double Click Mouse Event e process Double Click  MouseAdapter mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent processDoubleClick
Create the contents of the receiver in the parent Use the window for the animation item param parent The parent widget of the composite param window The Workbench Window this is in return public Control create Contents Composite parent Workbench Window window workbench Window window region new Composite parent SWT NONE Grid Layout gl new Grid Layout gl margin Height 0 gl margin Width 0 gl num Columns 3 region set Layout gl new Label region SWT SEPARATOR viewer new Progress Viewer region SWT NO FOCUS 1 36 viewer set Use Hashlookup true Control viewer Control viewer get Control Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint viewer get Size Hints x viewer Control set Layout Data gd int width Preference Animation Manager get Instance get Preferred Width 25 item new Progress Animation Item this item create Control region item set Animation Container new Animation Item I Animation Container non Javadoc see org eclipse ui internal progress Animation Item I Animation Container animation Done public void animation Done Add an extra refresh to the viewer in case of stale input if the controls are not disposed if viewer get Control is Disposed return viewer refresh non Javadoc see org eclipse ui internal progress Animation Item I Animation Container animation Start public void animation Start Nothing by default here Control item Control item get Control gd new Grid Data Grid Data FILL VERTICAL gd width Hint width Preference item Control set Layout Data gd viewer Control add Mouse Listener new Mouse Adapter non Javadoc see org eclipse swt events Mouse Adapter mouse Double Click org eclipse swt events Mouse Event public void mouse Double Click Mouse Event e process Double Click Never show debug info I Content Provider provider new Progress Viewer Content Provider viewer true viewer set Content Provider provider viewer set Input provider viewer set Label Provider new Progress Viewer Label Provider viewer Control viewer set Sorter Progress Manager Util get Progress Viewer Sorter return region  WorkbenchWindow createContents WorkbenchWindow workbenchWindow GridLayout GridLayout marginHeight marginWidth numColumns setLayout ProgressViewer NO_FOCUS setUseHashlookup viewerControl getControl GridData GridData GridData FILL_BOTH widthHint getSizeHints viewerControl setLayoutData widthPreference AnimationManager getInstance getPreferredWidth ProgressAnimationItem createControl setAnimationContainer AnimationItem IAnimationContainer AnimationItem IAnimationContainer animationDone animationDone getControl isDisposed AnimationItem IAnimationContainer animationStart animationStart itemControl getControl GridData GridData FILL_VERTICAL widthHint widthPreference itemControl setLayoutData viewerControl addMouseListener MouseAdapter MouseAdapter mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent processDoubleClick IContentProvider ProgressViewerContentProvider setContentProvider setInput setLabelProvider ProgressViewerLabelProvider viewerControl setSorter ProgressManagerUtil getProgressViewerSorter
Return the animation Item for the receiver return public Animation Item get Animation Item return item  animationItem AnimationItem getAnimationItem
Return the control for the receiver return public Control get Control return region  getControl
Process the double click event public void process Double Click Progress Manager Util open Progress View workbench Window  processDoubleClick ProgressManagerUtil openProgressView workbenchWindow

New Progress Viewer viewer public Progress Tree Content Provider New Progress Viewer main Viewer super viewer main Viewer  NewProgressViewer ProgressTreeContentProvider NewProgressViewer mainViewer mainViewer
Create a new instance of the receiver with the supplied viewer and debug flag param main Viewer param no Debug If true do not show debug information public Progress Tree Content Provider New Progress Viewer main Viewer boolean no Debug super no Debug viewer main Viewer  mainViewer noDebug ProgressTreeContentProvider NewProgressViewer mainViewer noDebug noDebug mainViewer
public Object get Children Object parent Element return Job Tree Element parent Element get Children  getChildren parentElement JobTreeElement parentElement getChildren
public Object get Parent Object element if element this return null else return Job Tree Element element get Parent  getParent JobTreeElement getParent
public boolean has Children Object element if element this return Progress Manager get Instance has Job Infos else return Job Tree Element element has Children  hasChildren ProgressManager getInstance hasJobInfos JobTreeElement hasChildren
see org eclipse ui internal progress I Progress Update Collector add org eclipse ui internal progress Job Tree Element public void add Object elements viewer add viewer get Input elements  IProgressUpdateCollector JobTreeElement getInput
see org eclipse ui internal progress I Progress Update Collector refresh public void refresh viewer refresh true  IProgressUpdateCollector
public void refresh Object elements for int i 0 i elements length i viewer refresh elements i true 
see org eclipse ui internal progress I Progress Update Collector remove org eclipse ui internal progress Job Tree Element public void remove Object elements viewer remove elements  IProgressUpdateCollector JobTreeElement

Create a new instance of the receiver with the supplied parent and style bits param parent The composite the Canvas is created in param style style bits for the canvas param items To Show the number of items this will show param num Chars The number of characters for the width hint Progress Viewer Composite parent int style int items To Show int num Chars super num Show Items items To Show max Character Width num Chars canvas new Canvas parent style hook Control canvas Compute and store a font metric GC gc new GC canvas gc set Font J Face Resources get Default Font font Metrics gc get Font Metrics gc dispose initialize Listeners  itemsToShow numChars ProgressViewer itemsToShow numChars numShowItems itemsToShow maxCharacterWidth numChars hookControl setFont JFaceResources getDefaultFont fontMetrics getFontMetrics initializeListeners
NE Copied from Content Viewer We don t want the Open Strategy hooked in Structured Viewer hook Control otherwise the canvas will take focus since it has a key listener We don t want this included in the window s tab traversal order Defeating it here is more self contained then setting the tab list on the shell or other parent composite protected void hook Control Control control control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event event handle Dispose event  ContentViewer OpenStrategy StructuredViewer hookControl hookControl addDisposeListener DisposeListener widgetDisposed DisposeEvent handleDispose
see org eclipse jface viewers Structured Viewer do Find Input Item java lang Object protected Widget do Find Input Item Object element return null No widgets associated with items  StructuredViewer doFindInputItem doFindInputItem
see org eclipse jface viewers Structured Viewer do Find Item java lang Object protected Widget do Find Item Object element return null No widgets associated with items  StructuredViewer doFindItem doFindItem
java lang Object boolean protected void do Update Item Widget item Object element boolean full Map canvas redraw  doUpdateItem fullMap
see org eclipse jface viewers Structured Viewer get Selection From Widget protected List get Selection From Widget No selection on a Canvas return EMPTY LIST  StructuredViewer getSelectionFromWidget getSelectionFromWidget EMPTY_LIST
see org eclipse jface viewers Structured Viewer internal Refresh java lang Object protected void internal Refresh Object element displayed Items get Sorted Children get Root canvas redraw  StructuredViewer internalRefresh internalRefresh displayedItems getSortedChildren getRoot
see org eclipse jface viewers Structured Viewer reveal java lang Object public void reveal Object element Nothing to do here as we do not scroll  StructuredViewer
boolean protected void set Selection To Widget List l boolean reveal Do nothing as there is no selection  setSelectionToWidget
see org eclipse jface viewers Viewer get Control public Control get Control return canvas  getControl getControl
public void paint Control Paint Event event GC gc event gc I Label Provider label Provider I Label Provider get Label Provider int item Count Math min displayed Items length num Show Items int y Offset 0 if num Show Items 1 If there is a single item try to center it Rectangle client Area canvas get Parent get Client Area int size client Area height y Offset size font Metrics get Height y Offset y Offset 2 for int i 0 i item Count i String string label Provider get Text displayed Items i gc draw String string 2 y Offset i font Metrics get Height true  paintControl PaintEvent ILabelProvider labelProvider ILabelProvider getLabelProvider itemCount displayedItems numShowItems yOffset numShowItems clientArea getParent getClientArea clientArea yOffset fontMetrics getHeight yOffset yOffset itemCount labelProvider getText displayedItems drawString yOffset fontMetrics getHeight
private void initialize Listeners canvas add Paint Listener new Paint Listener non Javadoc see org eclipse swt events Paint Listener paint Control org eclipse swt events Paint Event public void paint Control Paint Event event GC gc event gc I Label Provider label Provider I Label Provider get Label Provider int item Count Math min displayed Items length num Show Items int y Offset 0 if num Show Items 1 If there is a single item try to center it Rectangle client Area canvas get Parent get Client Area int size client Area height y Offset size font Metrics get Height y Offset y Offset 2 for int i 0 i item Count i String string label Provider get Text displayed Items i gc draw String string 2 y Offset i font Metrics get Height true  initializeListeners addPaintListener PaintListener PaintListener paintControl PaintEvent paintControl PaintEvent ILabelProvider labelProvider ILabelProvider getLabelProvider itemCount displayedItems numShowItems yOffset numShowItems clientArea getParent getClientArea clientArea yOffset fontMetrics getHeight yOffset yOffset itemCount labelProvider getText displayedItems drawString yOffset fontMetrics getHeight
see org eclipse jface viewers Content Viewer set Label Provider org eclipse jface viewers I Base Label Provider public void set Label Provider I Base Label Provider label Provider Assert is True label Provider instanceof I Label Provider super set Label Provider label Provider  ContentViewer setLabelProvider IBaseLabelProvider setLabelProvider IBaseLabelProvider labelProvider isTrue labelProvider ILabelProvider setLabelProvider labelProvider
Get the size hints for the receiver These are used for layout data return Point the preferred x and y coordinates public Point get Size Hints Display display canvas get Display GC gc new GC display Font Metrics fm gc get Font Metrics int char Width fm get Average Char Width int char Height fm get Height int max Width display get Bounds width 2 int max Height display get Bounds height 6 int font Width char Width max Character Width int font Height char Height num Show Items if max Width font Width font Width max Width if max Height font Height font Height max Height gc dispose return new Point font Width font Height  getSizeHints getDisplay FontMetrics getFontMetrics charWidth getAverageCharWidth charHeight getHeight maxWidth getBounds maxHeight getBounds fontWidth charWidth maxCharacterWidth fontHeight charHeight numShowItems maxWidth fontWidth fontWidth maxWidth maxHeight fontHeight fontHeight maxHeight fontWidth fontHeight

Create a new instance of the receiver param structured The Viewer we are providing content for public Progress Viewer Content Provider Progress Viewer structured super progress Viewer structured  ProgressViewerContentProvider ProgressViewer progressViewer
Create a new instance of the receiver param structured The Viewer we are providing content for param no Debug A flag to indicate if the debug flag is false public Progress Viewer Content Provider Progress Viewer structured boolean no Debug super no Debug progress Viewer structured  noDebug ProgressViewerContentProvider ProgressViewer noDebug noDebug progressViewer
see org eclipse ui internal progress I Progress Update Collector add org eclipse ui internal progress Job Tree Element public void add Object elements progress Viewer set Input this  IProgressUpdateCollector JobTreeElement progressViewer setInput
Return only the elements that we want to display param elements the array of elements return the elements that we want to display public Object get Displayed Values Object elements Hash Set showing new Hash Set for int i 0 i elements length i Job Tree Element element Job Tree Element elements i if element is Active if element is Job Info Job Info element get Job get State Job RUNNING continue showing add element return showing to Array  getDisplayedValues HashSet HashSet JobTreeElement JobTreeElement isActive isJobInfo JobInfo getJob getState toArray
see org eclipse ui internal progress I Progress Update Collector refresh public void refresh progress Viewer refresh true  IProgressUpdateCollector progressViewer
public void refresh Object elements Object refreshes get Roots elements true for int i 0 i refreshes length i progress Viewer refresh refreshes i true  getRoots progressViewer
see org eclipse ui internal progress I Progress Update Collector remove org eclipse ui internal progress Job Tree Element public void remove Object elements progress Viewer set Input this  IProgressUpdateCollector JobTreeElement progressViewer setInput
public Object get Elements Object input Element Job Tree Element elements Progress Manager get Instance get Root Elements false return get Displayed Values elements  getElements inputElement JobTreeElement ProgressManager getInstance getRootElements getDisplayedValues
Get the root elements of the passed elements as we only show roots Replace the element with its parent if sub With Parent is true param elements the array of elements param sub With Parent sub with parent flag return private Object get Roots Object elements boolean sub With Parent if elements length 0 return elements Hash Set roots new Hash Set for int i 0 i elements length i Job Tree Element element Job Tree Element elements i if element is Job Info Group Info group Job Info element get Group Info if group null roots add element else if sub With Parent roots add group else roots add element return roots to Array  subWithParent subWithParent getRoots subWithParent HashSet HashSet JobTreeElement JobTreeElement isJobInfo GroupInfo JobInfo getGroupInfo subWithParent toArray

public String get Text Object element Job Tree Element info Job Tree Element element return Progress Manager Util shorten Text info get Condensed Display String control  getText JobTreeElement JobTreeElement ProgressManagerUtil shortenText getCondensedDisplayString
Create a new instance of the receiver within the control param progress Viewer public Progress Viewer Label Provider Control progress Control super control progress Control  progressViewer ProgressViewerLabelProvider progressControl progressControl

boolean update All false private Updates Info Create a new instance of the info  updateAll UpdatesInfo
Add an add update param addition void add Job Tree Element addition additions add addition  JobTreeElement
Add a remove update param addition void remove Job Tree Element removal deletions add removal  JobTreeElement
Add a refresh update param addition void refresh Job Tree Element refresh refreshes add refresh  JobTreeElement
Reset the caches after completion of an update void reset additions clear deletions clear refreshes clear update All false  updateAll
void process For Update Hash Set stale Additions new Hash Set Iterator additions Iterator additions iterator while additions Iterator has Next Job Tree Element tree Element Job Tree Element additions Iterator next if tree Element is Active if deletions contains tree Element stale Additions add tree Element additions remove All stale Additions Hash Set obsolete Refresh new Hash Set Iterator refresh Iterator refreshes iterator while refresh Iterator has Next Job Tree Element tree Element Job Tree Element refresh Iterator next if deletions contains tree Element additions contains tree Element obsolete Refresh add tree Element if tree Element is Active If it is done then delete it obsolete Refresh add tree Element deletions add tree Element refreshes remove All obsolete Refresh  processForUpdate HashSet staleAdditions HashSet additionsIterator additionsIterator hasNext JobTreeElement treeElement JobTreeElement additionsIterator treeElement isActive treeElement staleAdditions treeElement removeAll staleAdditions HashSet obsoleteRefresh HashSet refreshIterator refreshIterator hasNext JobTreeElement treeElement JobTreeElement refreshIterator treeElement treeElement obsoleteRefresh treeElement treeElement isActive obsoleteRefresh treeElement treeElement removeAll obsoleteRefresh
Return a new instance of the receiver return static Progress View Updater get Singleton if singleton null singleton new Progress View Updater return singleton  ProgressViewUpdater getSingleton ProgressViewUpdater
Return whether or not there is a singleton for updates to avoid creating extra listeners return static boolean has Singleton return singleton null  hasSingleton
static void clear Singleton if singleton null Progress Manager get Instance remove Listener singleton singleton null  clearSingleton ProgressManager getInstance removeListener
Create a new instance of the receiver return private Progress View Updater create Update Job collectors new I Progress Update Collector 0 Progress Manager get Instance add Listener this  ProgressViewUpdater createUpdateJob IProgressUpdateCollector ProgressManager getInstance addListener
Add the new collector to the list of collectors param new Collector void add Collector I Progress Update Collector new Collector I Progress Update Collector new Collectors new I Progress Update Collector collectors length 1 System arraycopy collectors 0 new Collectors 0 collectors length new Collectors collectors length new Collector collectors new Collectors  newCollector addCollector IProgressUpdateCollector newCollector IProgressUpdateCollector newCollectors IProgressUpdateCollector newCollectors newCollectors newCollector newCollectors
Remove the collector from the list of collectors param new Collector void remove Collector I Progress Update Collector provider Hash Set new Collectors new Hash Set for int i 0 i collectors length i if collectors i equals provider new Collectors add collectors i I Progress Update Collector new Array new I Progress Update Collector new Collectors size new Collectors to Array new Array collectors new Array Remove ourselves if there is nothing to update if collectors length 0 clear Singleton  newCollector removeCollector IProgressUpdateCollector HashSet newCollectors HashSet newCollectors IProgressUpdateCollector newArray IProgressUpdateCollector newCollectors newCollectors toArray newArray newArray clearSingleton
Schedule an update void schedule Update if PlatformUI is Workbench Running Add in a 100ms delay so as to keep priority low update Job schedule 100  scheduleUpdate isWorkbenchRunning updateJob
public I Status run InUI Thread I Progress Monitor monitor Abort the job if there isn t anything if collectors length 0 return Status CANCEL STATUS if current Info update All synchronized update Lock current Info reset for int i 0 i collectors length i collectors i refresh else Lock while getting local copies of the caches Object update Items Object addition Items Object deletion Items synchronized update Lock current Info process For Update update Items current Info refreshes to Array addition Items current Info additions to Array deletion Items current Info deletions to Array current Info reset for int v 0 v collectors length v I Progress Update Collector collector collectors v if update Items length 0 collector refresh update Items if addition Items length 0 collector add addition Items if deletion Items length 0 collector remove deletion Items return Status OK STATUS  IStatus runInUIThread IProgressMonitor CANCEL_STATUS currentInfo updateAll updateLock currentInfo updateItems additionItems deletionItems updateLock currentInfo processForUpdate updateItems currentInfo toArray additionItems currentInfo toArray deletionItems currentInfo toArray currentInfo IProgressUpdateCollector updateItems updateItems additionItems additionItems deletionItems deletionItems OK_STATUS
Create the update job that handles the updates Info private void create Update Job update Job new Workbench Job Progress Messages get String Progress Content Provider Update Progress Job NON NLS 1 non Javadoc see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor monitor Abort the job if there isn t anything if collectors length 0 return Status CANCEL STATUS if current Info update All synchronized update Lock current Info reset for int i 0 i collectors length i collectors i refresh else Lock while getting local copies of the caches Object update Items Object addition Items Object deletion Items synchronized update Lock current Info process For Update update Items current Info refreshes to Array addition Items current Info additions to Array deletion Items current Info deletions to Array current Info reset for int v 0 v collectors length v I Progress Update Collector collector collectors v if update Items length 0 collector refresh update Items if addition Items length 0 collector add addition Items if deletion Items length 0 collector remove deletion Items return Status OK STATUS update Job set System true update Job set Priority Job DECORATE  updatesInfo createUpdateJob updateJob WorkbenchJob ProgressMessages getString ProgressContentProvider UpdateProgressJob UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor CANCEL_STATUS currentInfo updateAll updateLock currentInfo updateItems additionItems deletionItems updateLock currentInfo processForUpdate updateItems currentInfo toArray additionItems currentInfo toArray deletionItems currentInfo toArray currentInfo IProgressUpdateCollector updateItems updateItems additionItems additionItems deletionItems deletionItems OK_STATUS updateJob setSystem updateJob setPriority
Get the updates info that we are using in the receiver return Returns the current Info Updates Info get Current Info return current Info  currentInfo UpdatesInfo getCurrentInfo currentInfo
public void refresh Job Info info if is Update Job info get Job return synchronized update Lock current Info refresh info Group Info group info get Group Info if group null current Info refresh group Add in a 100ms delay so as to keep priority low schedule Update  JobInfo isUpdateJob getJob updateLock currentInfo GroupInfo getGroupInfo currentInfo scheduleUpdate
public void refresh Job Info Job Info info if is Update Job info get Job return synchronized update Lock current Info refresh info Add in a 100ms delay so as to keep priority low schedule Update  refreshJobInfo JobInfo isUpdateJob getJob updateLock currentInfo scheduleUpdate
public void refresh Group Group Info info synchronized update Lock current Info refresh info Add in a 100ms delay so as to keep priority low schedule Update  refreshGroup GroupInfo updateLock currentInfo scheduleUpdate
public void add Group Group Info info synchronized update Lock current Info add info schedule Update  addGroup GroupInfo updateLock currentInfo scheduleUpdate
public void refresh All synchronized update Lock current Info update All true Add in a 100ms delay so as to keep priority low schedule Update  refreshAll updateLock currentInfo updateAll scheduleUpdate
public void add Job Job Info info if is Update Job info get Job return synchronized update Lock Group Info group info get Group Info if group null current Info add info else current Info refresh group schedule Update  addJob JobInfo isUpdateJob getJob updateLock GroupInfo getGroupInfo currentInfo currentInfo scheduleUpdate
public void remove Job Job Info info if is Update Job info get Job return synchronized update Lock Group Info group info get Group Info if group null current Info remove info else group remove Job Info info current Info refresh group schedule Update  removeJob JobInfo isUpdateJob getJob updateLock GroupInfo getGroupInfo currentInfo removeJobInfo currentInfo scheduleUpdate
public void remove Group Group Info group synchronized update Lock current Info remove group schedule Update  removeGroup GroupInfo updateLock currentInfo scheduleUpdate
see org eclipse ui internal progress I Job Progress Manager Listener shows Debug public boolean shows Debug return debug  IJobProgressManagerListener showsDebug showsDebug
Return whether or not this is the update job This is used to determine if a final refresh is required param job return boolean is Update Job Job job return job equals update Job  isUpdateJob updateJob

Create a new instance of the receiver param parent Job param name Sub Task Info Job Info parent Job String name task Name name job Info parent Job  parentJob SubTaskInfo JobInfo parentJob taskName jobInfo parentJob
see org eclipse ui internal progress Job Tree Element get Children Object get Children return new Object 0  JobTreeElement getChildren getChildren
String get Display String if task Name null return Progress Messages get String Sub Task Info Undefined Task Name NON NLS 1 return task Name  getDisplayString taskName ProgressMessages getString SubTaskInfo UndefinedTaskName taskName
see org eclipse ui internal progress Job Tree Element has Children boolean has Children return false  JobTreeElement hasChildren hasChildren
Set the task Name of the receiver param task Name void set Task Name String name this task Name name  taskName taskName setTaskName taskName
Returns the task Name of the receiver String get Task Name return task Name  taskName getTaskName taskName
see org eclipse ui internal progress Job Tree Element get Parent Object get Parent return job Info  JobTreeElement getParent getParent jobInfo
see org eclipse ui internal progress Job Tree Element is Job Info boolean is Job Info return false  JobTreeElement isJobInfo isJobInfo
see org eclipse ui internal progress Job Tree Element is Active boolean is Active return job Info is Active  JobTreeElement isActive isActive jobInfo isActive

Create a new instance of the receiver with the supplied total work and task name param parent Job Info param info Name param total Task Info Job Info parent Job Info String info Name int total super parent Job Info info Name total Work total  parentJobInfo infoName TaskInfo JobInfo parentJobInfo infoName parentJobInfo infoName totalWork
Add the work increment to the total param work Increment void add Work double work Increment Don t bother if we are indeterminate if total Work I Progress Monitor UNKNOWN return pre Work work Increment  workIncrement addWork workIncrement totalWork IProgressMonitor preWork workIncrement
Add the amount of work to the recevier Update a parent monitor by the increment scaled to the amount of ticks this represents param work Increment int the amount of work in the receiver param parent Monitor The I Progress Monitor that is also listening param parent Ticks the number of ticks this monitor represents void add Work double work Increment I Progress Monitor parent Monitor int parent Ticks Don t bother if we are indeterminate if total Work I Progress Monitor UNKNOWN return add Work work Increment parent Monitor internal Worked work Increment parent Ticks total Work  workIncrement parentMonitor IProgressMonitor parentTicks addWork workIncrement IProgressMonitor parentMonitor parentTicks totalWork IProgressMonitor addWork workIncrement parentMonitor internalWorked workIncrement parentTicks totalWork
Get the display string for the task return String String get Display String if total Work I Progress Monitor UNKNOWN return unknown Progress if task Name null return get Display String Without Task else String message Values new String 3 message Values 0 String value Of get Percent Done message Values 1 job Info get Job get Name message Values 2 task Name return Progress Messages format Job Info Done Message message Values NON NLS 1  getDisplayString totalWork IProgressMonitor unknownProgress taskName getDisplayStringWithoutTask messageValues messageValues valueOf getPercentDone messageValues jobInfo getJob getName messageValues taskName ProgressMessages JobInfo DoneMessage messageValues
Get the display String without the task name return String public String get Display String Without Task if total Work I Progress Monitor UNKNOWN return job Info get Job get Name String message Values new String 2 message Values 0 job Info get Job get Name message Values 1 String value Of get Percent Done return Progress Messages format Job Info No Task Name Done Message message Values NON NLS 1  getDisplayStringWithoutTask totalWork IProgressMonitor jobInfo getJob getName messageValues messageValues jobInfo getJob getName messageValues valueOf getPercentDone ProgressMessages JobInfo NoTaskNameDoneMessage messageValues
Return an integer representing the amount of work completed return int get Percent Done return Math min int pre Work 100 total Work 100  getPercentDone preWork totalWork
Return the progress for a monitor whose total Work is code I Progress Monitor UNKNOWN code return String private String unknown Progress if task Name null return job Info get Job get Name else String message Values new String 2 message Values 0 job Info get Job get Name message Values 1 task Name return Progress Messages format Job Info Unknown Progress message Values NON NLS 1  totalWork IProgressMonitor unknownProgress taskName jobInfo getJob getName messageValues messageValues jobInfo getJob getName messageValues taskName ProgressMessages JobInfo UnknownProgress messageValues

class Workbench Monitor Provider Get the progress monitor for a job If it is a UI Job get the main monitor from the status line Otherwise return no monitor return I Progress Monitor I Progress Monitor get Monitor Job job if job instanceof UI Job return getUI Progress Monitor job get Name else return new Null Progress Monitor  WorkbenchMonitorProvider UIJob IProgressMonitor IProgressMonitor getMonitor UIJob getUIProgressMonitor getName NullProgressMonitor
Return the status line manager if there is one return I Status Line With Progress Manager private I Status Line Manager get Status Line Manager if PlatformUI is Workbench Running I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null window instanceof Workbench Window return Workbench Window window get Status Line Manager return null  IStatusLineWithProgressManager IStatusLineManager getStatusLineManager isWorkbenchRunning IWorkbenchWindow getWorkbench getActiveWorkbenchWindow WorkbenchWindow WorkbenchWindow getStatusLineManager
public void begin Task String name int total Work if name null name length 0 get Internal Monitor begin Task job Name total Work else get Internal Monitor begin Task name total Work  beginTask totalWork getInternalMonitor beginTask jobName totalWork getInternalMonitor beginTask totalWork
non Javadoc see org eclipse core runtime I Progress Monitor done public void done get Internal Monitor done  IProgressMonitor getInternalMonitor
non Javadoc see org eclipse core runtime I Progress Monitor internal Worked double public void internal Worked double work get Internal Monitor internal Worked work  IProgressMonitor internalWorked internalWorked getInternalMonitor internalWorked
non Javadoc see org eclipse core runtime I Progress Monitor is Canceled public boolean is Canceled return get Internal Monitor is Canceled  IProgressMonitor isCanceled isCanceled getInternalMonitor isCanceled
non Javadoc see org eclipse core runtime I Progress Monitor set Canceled boolean public void set Canceled boolean value get Internal Monitor set Canceled value  IProgressMonitor setCanceled setCanceled getInternalMonitor setCanceled
non Javadoc see org eclipse core runtime I Progress Monitor set Task Name java lang String public void set Task Name String name get Internal Monitor set Task Name name  IProgressMonitor setTaskName setTaskName getInternalMonitor setTaskName
non Javadoc see org eclipse core runtime I Progress Monitor sub Task java lang String public void sub Task String name get Internal Monitor sub Task name  IProgressMonitor subTask subTask getInternalMonitor subTask
non Javadoc see org eclipse core runtime I Progress Monitor worked int public void worked int work get Internal Monitor worked work  IProgressMonitor getInternalMonitor
Get the monitor that is being wrapped This is called lazily as we will not be able to get the monitor for the workbench outside of the UI Thread and so we will have to wait until the monitor is accessed Return a Null Progress Monitor if the one from the workbench cannot be found return I Progress Monitor private I Progress Monitor get Internal Monitor if internal Monitor null I Status Line Manager manager get Status Line Manager if manager null internal Monitor new Null Progress Monitor else internal Monitor manager get Progress Monitor return internal Monitor  NullProgressMonitor IProgressMonitor IProgressMonitor getInternalMonitor internalMonitor IStatusLineManager getStatusLineManager internalMonitor NullProgressMonitor internalMonitor getProgressMonitor internalMonitor
Get a progress monitor for use with UI Threads This monitor will use the status line directly if possible param job Name Used if the task name is null return I Progress Monitor private I Progress Monitor getUI Progress Monitor final String job Name return new I Progress Monitor I Progress Monitor internal Monitor non Javadoc see org eclipse core runtime I Progress Monitor begin Task java lang String int public void begin Task String name int total Work if name null name length 0 get Internal Monitor begin Task job Name total Work else get Internal Monitor begin Task name total Work non Javadoc see org eclipse core runtime I Progress Monitor done public void done get Internal Monitor done non Javadoc see org eclipse core runtime I Progress Monitor internal Worked double public void internal Worked double work get Internal Monitor internal Worked work non Javadoc see org eclipse core runtime I Progress Monitor is Canceled public boolean is Canceled return get Internal Monitor is Canceled non Javadoc see org eclipse core runtime I Progress Monitor set Canceled boolean public void set Canceled boolean value get Internal Monitor set Canceled value non Javadoc see org eclipse core runtime I Progress Monitor set Task Name java lang String public void set Task Name String name get Internal Monitor set Task Name name non Javadoc see org eclipse core runtime I Progress Monitor sub Task java lang String public void sub Task String name get Internal Monitor sub Task name non Javadoc see org eclipse core runtime I Progress Monitor worked int public void worked int work get Internal Monitor worked work Get the monitor that is being wrapped This is called lazily as we will not be able to get the monitor for the workbench outside of the UI Thread and so we will have to wait until the monitor is accessed Return a Null Progress Monitor if the one from the workbench cannot be found return I Progress Monitor private I Progress Monitor get Internal Monitor if internal Monitor null I Status Line Manager manager get Status Line Manager if manager null internal Monitor new Null Progress Monitor else internal Monitor manager get Progress Monitor return internal Monitor  UIThreads jobName IProgressMonitor IProgressMonitor getUIProgressMonitor jobName IProgressMonitor IProgressMonitor internalMonitor IProgressMonitor beginTask beginTask totalWork getInternalMonitor beginTask jobName totalWork getInternalMonitor beginTask totalWork IProgressMonitor getInternalMonitor IProgressMonitor internalWorked internalWorked getInternalMonitor internalWorked IProgressMonitor isCanceled isCanceled getInternalMonitor isCanceled IProgressMonitor setCanceled setCanceled getInternalMonitor setCanceled IProgressMonitor setTaskName setTaskName getInternalMonitor setTaskName IProgressMonitor subTask subTask getInternalMonitor subTask IProgressMonitor getInternalMonitor NullProgressMonitor IProgressMonitor IProgressMonitor getInternalMonitor internalMonitor IStatusLineManager getStatusLineManager internalMonitor NullProgressMonitor internalMonitor getProgressMonitor internalMonitor

Object lock new Object Set whether we are updating with the wait or busy cursor param cursor State void set Busy boolean cursor State synchronized lock busy cursor State  cursorState setBusy cursorState cursorState
private Site Update Job super Progress Messages get String Workbench Site Progress Service Cursor Job NON NLS 1  SiteUpdateJob ProgressMessages getString WorkbenchSiteProgressService CursorJob
Get the wait cursor Initialize it if required param display the display to create the cursor on return the created cursor private Cursor get Wait Cursor Display display if wait Cursor null wait Cursor new Cursor display SWT CURSOR APPSTARTING return wait Cursor  getWaitCursor waitCursor waitCursor CURSOR_APPSTARTING waitCursor
public I Status run InUI Thread I Progress Monitor monitor Control control site get Pane get Control if control null control is Disposed return Status CANCEL STATUS synchronized lock Update cursors if we are doing that if use Wait Cursor Cursor cursor null if busy cursor get Wait Cursor control get Display control set Cursor cursor site get Pane set Busy busy I Workbench Part part site get Part TODO should not access Workbench Part directly I Workbench Part defines the API if part instanceof Workbench Part Workbench Part part show Busy busy return Status OK STATUS  IStatus runInUIThread IProgressMonitor getPane getControl isDisposed CANCEL_STATUS useWaitCursor getWaitCursor getDisplay setCursor getPane setBusy IWorkbenchPart getPart WorkbenchPart IWorkbenchPart WorkbenchPart WorkbenchPart showBusy OK_STATUS
void clear Cursors if wait Cursor null wait Cursor dispose wait Cursor null  clearCursors waitCursor waitCursor waitCursor
Create a new instance of the receiver with a site of part Site param part Site Part Site public Workbench Site Progress Service final Part Site part Site site part Site update Job new Site Update Job update Job set System true  partSite partSite PartSite WorkbenchSiteProgressService PartSite partSite partSite updateJob SiteUpdateJob updateJob setSystem
Dispose the resources allocated by the receiver public void dispose if update Job null update Job cancel Progress Manager get Instance remove Listener this if wait Cursor null return wait Cursor dispose wait Cursor null  updateJob updateJob ProgressManager getInstance removeListener waitCursor waitCursor waitCursor
see org eclipse ui progress I Progress Service busy Cursor While org eclipse jface operation I Runnable With Progress public void busy Cursor While I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception get Workbench Progress Service busy Cursor While runnable  IProgressService busyCursorWhile IRunnableWithProgress busyCursorWhile IRunnableWithProgress InvocationTargetException InterruptedException getWorkbenchProgressService busyCursorWhile
long boolean public void schedule Job job long delay boolean use Half Busy Cursor job add Job Change Listener get Job Change Listener job use Half Busy Cursor job schedule delay  useHalfBusyCursor addJobChangeListener getJobChangeListener useHalfBusyCursor
int public void schedule Job job long delay schedule job delay false 
see org eclipse ui progress I Workbench Site Progress Service schedule org eclipse core runtime jobs Job public void schedule Job job schedule job 0L false  IWorkbenchSiteProgressService
see org eclipse ui progress I Workbench Site Progress Service show Busy For Family java lang Object public void show Busy For Family Object family Progress Manager get Instance add Listener To Family family this  IWorkbenchSiteProgressService showBusyForFamily showBusyForFamily ProgressManager getInstance addListenerToFamily
see org eclipse core runtime jobs Job Change Adapter about To Run org eclipse core runtime jobs I Job Change Event public void about To Run I Job Change Event event increment Busy event get Job  JobChangeAdapter aboutToRun IJobChangeEvent aboutToRun IJobChangeEvent incrementBusy getJob
see org eclipse core runtime jobs Job Change Adapter done org eclipse core runtime jobs I Job Change Event public void done I Job Change Event event decrement Busy event get Job  JobChangeAdapter IJobChangeEvent IJobChangeEvent decrementBusy getJob
Get the job change listener for this site param job param use Half Busy Cursor return I Job Change Listener public I Job Change Listener get Job Change Listener final Job job boolean use Half Busy Cursor if listener null update Job use Wait Cursor use Half Busy Cursor listener new Job Change Adapter non Javadoc see org eclipse core runtime jobs Job Change Adapter about To Run org eclipse core runtime jobs I Job Change Event public void about To Run I Job Change Event event increment Busy event get Job non Javadoc see org eclipse core runtime jobs Job Change Adapter done org eclipse core runtime jobs I Job Change Event public void done I Job Change Event event decrement Busy event get Job return listener  useHalfBusyCursor IJobChangeListener IJobChangeListener getJobChangeListener useHalfBusyCursor updateJob useWaitCursor useHalfBusyCursor JobChangeAdapter JobChangeAdapter aboutToRun IJobChangeEvent aboutToRun IJobChangeEvent incrementBusy getJob JobChangeAdapter IJobChangeEvent IJobChangeEvent decrementBusy getJob
public void decrement Busy Job job synchronized busy Lock if busy Jobs contains job return busy Jobs remove job if busy Jobs size 0 return if PlatformUI is Workbench Running update Job set Busy false update Job schedule 100 else update Job cancel  decrementBusy busyLock busyJobs busyJobs busyJobs isWorkbenchRunning updateJob setBusy updateJob updateJob
public void increment Busy Job job synchronized busy Lock if busy Jobs contains job return busy Jobs add job If it is greater than one we already set busy if busy Jobs size 1 return if PlatformUI is Workbench Running update Job set Busy true update Job schedule 100 else update Job cancel  incrementBusy busyLock busyJobs busyJobs busyJobs isWorkbenchRunning updateJob setBusy updateJob updateJob
see org eclipse ui progress I Workbench Site Progress Service warn Of Content Change public void warn Of Content Change site get Pane show Highlight  IWorkbenchSiteProgressService warnOfContentChange warnOfContentChange getPane showHighlight
org eclipse core runtime jobs Job public void show In Dialog Shell shell Job job get Workbench Progress Service show In Dialog shell job  showInDialog getWorkbenchProgressService showInDialog
Get the progress service for the workbnech return I Progress Service private I Progress Service get Workbench Progress Service return site get Workbench Window get Workbench get Progress Service  IProgressService IProgressService getWorkbenchProgressService getWorkbenchWindow getWorkbench getProgressService
public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception get Workbench Progress Service run fork cancelable runnable  IRunnableWithProgress InvocationTargetException InterruptedException getWorkbenchProgressService
see org eclipse ui progress I Progress Service run InUI org eclipse jface operation I Runnable Context org eclipse jface operation I Runnable With Progress org eclipse core runtime jobs I Scheduling Rule public void run InUI I Runnable Context context I Runnable With Progress runnable I Scheduling Rule rule throws Invocation Target Exception Interrupted Exception get Workbench Progress Service run InUI context runnable rule  IProgressService runInUI IRunnableContext IRunnableWithProgress ISchedulingRule runInUI IRunnableContext IRunnableWithProgress ISchedulingRule InvocationTargetException InterruptedException getWorkbenchProgressService runInUI
see org eclipse ui progress I Progress Service get Long Operation Time public int get Long Operation Time return get Workbench Progress Service get Long Operation Time  IProgressService getLongOperationTime getLongOperationTime getWorkbenchProgressService getLongOperationTime
see org eclipse ui progress I Progress Service register Icon For Family org eclipse jface resource Image Descriptor java lang Object public void register Icon For Family Image Descriptor icon Object family get Workbench Progress Service register Icon For Family icon family  IProgressService registerIconForFamily ImageDescriptor registerIconForFamily ImageDescriptor getWorkbenchProgressService registerIconForFamily
see org eclipse ui progress I Progress Service get Icon For org eclipse core runtime jobs Job public Image get Icon For Job job return get Workbench Progress Service get Icon For job  IProgressService getIconFor getIconFor getWorkbenchProgressService getIconFor

Creates a new code Quit Action code public Quit Action I Workbench Window window Although window is not currently used this follows the same pattern as other Action Factory actions if window null throw new Illegal Argument Exception this workbench Window window set Text Workbench Messages get String Exit text NON NLS 1 set Tool Tip Text Workbench Messages get String Exit tool Tip NON NLS 1 set Action Definition Id org eclipse ui file exit NON NLS 1 Workbench Help set Help this I Help Context Ids QUIT ACTION  QuitAction QuitAction IWorkbenchWindow ActionFactory IllegalArgumentException workbenchWindow setText WorkbenchMessages getString setToolTipText WorkbenchMessages getString toolTip setActionDefinitionId WorkbenchHelp setHelp IHelpContextIds QUIT_ACTION
public void run if workbench Window null action has been disposed return PlatformUI get Workbench close  workbenchWindow getWorkbench
Method declared on Action Factory I Workbench Action public void dispose workbench Window null  ActionFactory IWorkbenchAction workbenchWindow

Selection Adapter selection Adapter new Selection Adapter public void widget Selected Selection Event e Object new State e widget get Data data set State new State Radio Menu this  SelectionAdapter selectionAdapter SelectionAdapter widgetSelected SelectionEvent newState getData setState newState RadioMenu
Creates a set of radio menu items on the given menu param parent menu that will contain the menu items param new Data the model that will store the value of the currently selected item public Radio Menu Menu parent Model new Data this parent parent this data new Data new Data add Change Listener this  newData RadioMenu newData newData newData addChangeListener
Returns true iff the given values are considered equal param value1 param value2 return private static boolean is Equal Object value1 Object value2 if value1 null return value2 null else if value2 null return false return value1 equals value2  isEqual
Creates a new menu item with the given text and value When the item is selected the state of the model will change to match the given value param text param value public void add Menu Item String text Object value Menu Item new Item new Menu Item parent SWT RADIO new Item set Selection is Equal data get State value new Item set Text text new Item set Data value items add new Item new Item add Selection Listener selection Adapter  addMenuItem MenuItem newItem MenuItem newItem setSelection isEqual getState newItem setText newItem setData newItem newItem addSelectionListener selectionAdapter
Disposes all menu items public void dispose Iterator iter items iterator while iter has Next Menu Item next Menu Item iter next if next is Disposed next remove Selection Listener selection Adapter next dispose items clear  hasNext MenuItem MenuItem isDisposed removeSelectionListener selectionAdapter
Refreshes the selected menu items to match the current state of the model private void refresh Selection Iterator iter items iterator while iter has Next Menu Item next Menu Item iter next if next is Disposed next set Selection is Equal data get State next get Data  refreshSelection hasNext MenuItem MenuItem isDisposed setSelection isEqual getState getData
see org eclipse ui internal controls I View changed public void update boolean changed refresh Selection  IView refreshSelection

private static Rectangle interpolate Rectangle start Rectangle end double amount double initial Weight 1 0 amount Rectangle result new Rectangle int start x initial Weight end x amount int start y initial Weight end y amount int start width initial Weight end width amount int start height initial Weight end height amount return result  initialWeight initialWeight initialWeight initialWeight initialWeight
public void run Measure the start as the time of the first sync Exec if start Time 0 start Time System current Time Millis if the Shell null the Shell is Disposed done true return long current Time System current Time Millis double amount double current Time start Time double duration if amount 1 0 amount 1 0 done true Rectangle to Paint interpolate start end amount the Shell set Bounds to Paint if shell Region null shell Region dispose shell Region new Region display Rectangle rect the Shell get Client Area shell Region add rect rect x LINE WIDTH rect y LINE WIDTH rect width Math max 0 rect width 2 LINE WIDTH rect height Math max 0 rect height 2 LINE WIDTH shell Region subtract rect the Shell set Region shell Region display update if first the Shell set Visible true first false  syncExec startTime startTime currentTimeMillis theShell theShell isDisposed currentTime currentTimeMillis currentTime startTime toPaint theShell setBounds toPaint shellRegion shellRegion shellRegion theShell getClientArea shellRegion LINE_WIDTH LINE_WIDTH LINE_WIDTH LINE_WIDTH shellRegion theShell setRegion shellRegion theShell setVisible
public Rectangle Animation Shell parent Shell Rectangle start Rectangle end this parent Shell start end 400  RectangleAnimation parentShell parentShell
Creates an animation that will morph the start rectangle to the end rectangle in the given number of milliseconds The animation will take the given number of milliseconds to complete Note that this is a Job so you must invoke schedule before the animation will begin param where To Draw specifies the composite where the animation will be drawn Note that although the start and end rectangles can accept any value in display coordinates the actual animation will be clipped to the boundaries of this composite For this reason it is good to select a composite that encloses both the start and end rectangles param start initial rectangle display coordinates param end final rectangle display coordinates param duration number of milliseconds over which the animation will run public Rectangle Animation Shell parent Shell Rectangle start Rectangle end int duration super Workbench Messages get String Rectangle Animation Animating Rectangle NON NLS 1 this duration duration this start start this end end display parent Shell get Display set System true the Shell new Shell parent Shell SWT NO TRIM SWT ON TOP Color color display get System Color SWT COLOR WIDGET FOREGROUND the Shell set Background color the Shell set Bounds start shell Region new Region display  whereToDraw RectangleAnimation parentShell WorkbenchMessages getString RectangleAnimation Animating_Rectangle parentShell getDisplay setSystem theShell parentShell NO_TRIM ON_TOP getSystemColor COLOR_WIDGET_FOREGROUND theShell setBackground theShell setBounds shellRegion
if the Shell is Disposed display sync Exec new Runnable public void run the Shell dispose  theShell isDisposed syncExec theShell
if shell Region is Disposed display sync Exec new Runnable public void run shell Region dispose  shellRegion isDisposed syncExec shellRegion
protected I Status run I Progress Monitor monitor We use canvas null to indicate that the animation should be skipped on this platform if the Shell null return Status OK STATUS start Time 0 while done if the Shell is Disposed display sync Exec paint Job Don t pin the CPU Thread yield if the Shell is Disposed display sync Exec new Runnable public void run the Shell dispose if shell Region is Disposed display sync Exec new Runnable public void run shell Region dispose return Status OK STATUS  IStatus IProgressMonitor theShell OK_STATUS startTime theShell isDisposed syncExec paintJob theShell isDisposed syncExec theShell shellRegion isDisposed syncExec shellRegion OK_STATUS

public class Ref Rec public Ref Rec Object id Object value this id id this value value add Ref  RefRec RefRec addRef
add Ref public Object get Id return id  addRef getId
return id public Object get Value return value  getValue
return value public int add Ref ref Count return ref Count  addRef refCount refCount
return ref Count public int remove Ref ref Count return ref Count  refCount removeRef refCount refCount
return ref Count public int get Ref return ref Count  refCount getRef refCount
return ref Count public boolean is Not Referenced return ref Count 0  refCount isNotReferenced refCount
Creates a new counter public Reference Counter super  ReferenceCounter
Adds one reference to an object in the counter param id is a unique ID for the object return the new ref count public int add Ref Object id Ref Rec rec Ref Rec map Id To Rec get id if rec null return 0 return rec add Ref  addRef RefRec RefRec mapIdToRec addRef
Returns the object defined by an ID If the ID is not found code null code is returned return the object or code null code public Object get Object id Ref Rec rec Ref Rec map Id To Rec get id if rec null return null return rec get Value  RefRec RefRec mapIdToRec getValue
Returns a complete list of the keys in the counter return a Set containing the ID for each public Set key Set return map Id To Rec key Set  keySet mapIdToRec keySet
Adds an object to the counter for counting and gives it an initial ref count of 1 param id is a unique ID for the object param value is the object itself public void put Object id Object value Ref Rec rec new Ref Rec id value map Id To Rec put id rec  RefRec RefRec mapIdToRec
Removes one reference from an object in the counter If the ref count drops to 0 the object is removed from the counter completely param id is a unique ID for the object return the new ref count public int remove Ref Object id Ref Rec rec Ref Rec map Id To Rec get id if rec null return 0 int new Count rec remove Ref if new Count 0 map Id To Rec remove id return new Count  removeRef RefRec RefRec mapIdToRec newCount removeRef newCount mapIdToRec newCount
Returns a complete list of the values in the counter return a Collection containing the values public List values int size map Id To Rec size Array List list new Array List size Iterator iter map Id To Rec values iterator while iter has Next Ref Rec rec Ref Rec iter next list add rec get Value return list  mapIdToRec ArrayList ArrayList mapIdToRec hasNext RefRec RefRec getValue

private Array List action Sets Action Set Category constructor comment public Action Set Category String id String label super this id id this label label  ArrayList actionSets ActionSetCategory ActionSetCategory
Adds an action set to this category public void add Action Set I Action Set Descriptor desc if action Sets null action Sets new Array List 5 action Sets add desc desc set Category id  addActionSet IActionSetDescriptor actionSets actionSets ArrayList actionSets setCategory
Returns the action sets for this category May be null public Array List get Action Sets return action Sets  ArrayList getActionSets actionSets
Returns category id public String get Id return id  getId
Returns category name public String get Label return label  getLabel

private static final String ATT DESC description NON NLS 1 Create a descriptor from a config element public Action Set Descriptor I Configuration Element config Element throws Core Exception super this config Element config Element id config Element get Attribute ATT ID plugin Id config Element get Declaring Extension get Namespace label config Element get Attribute ATT LABEL description config Element get Attribute ATT DESC String str config Element get Attribute ATT VISIBLE if str null str equals true NON NLS 1 visible true Sanity check if label null throw new Core Exception new Status I Status ERROR Workbench Plugin PI WORKBENCH 0 Invalid extension missing label id NON NLS 1 null  ATT_DESC ActionSetDescriptor IConfigurationElement configElement CoreException configElement configElement configElement getAttribute ATT_ID pluginId configElement getDeclaringExtension getNamespace configElement getAttribute ATT_LABEL configElement getAttribute ATT_DESC configElement getAttribute ATT_VISIBLE CoreException IStatus WorkbenchPlugin PI_WORKBENCH
Returns the action set for this descriptor return the action set public I Action Set create Action Set throws Core Exception return new Plugin Action Set this  IActionSet createActionSet CoreException PluginActionSet
Returns an object which is an instance of the given class associated with this object Returns code null code if no such object can be found public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter
Returns the category of this action set return a non empty category name or cod null code if none specified public String get Category return category  getCategory
see I Workbench Adapter get Children public Object get Children Object o if o this return new Plugin Action Set Reader read Action Descriptors this return NO CHILDREN  IWorkbenchAdapter getChildren getChildren PluginActionSetReader readActionDescriptors NO_CHILDREN
Returns the config element public I Configuration Element get Config Element return config Element  IConfigurationElement getConfigElement configElement
Returns this action set s description This is the value of its code description code attribute return the description public String get Description return description  getDescription
Returns this action set s id This is the value of its code id code attribute p return the action set id public String get Id return id  getId
Returns this action set s label This is the value of its code label code attribute return the label public String get Label return label  getLabel
see I Workbench Adapter get Label public String get Label Object o if o this return get Label return Unknown Label NON NLS 1  IWorkbenchAdapter getLabel getLabel getLabel
Returns whether this action set is initially visible public boolean is Initially Visible if id null return visible Preferences prefs Workbench Plugin get Default get Plugin Preferences String pref Id INITIALLY HIDDEN PREF ID PREFIX get Id if prefs get Boolean pref Id return false return visible  isInitiallyVisible WorkbenchPlugin getDefault getPluginPreferences prefId INITIALLY_HIDDEN_PREF_ID_PREFIX getId getBoolean prefId
Sets whether this action set is initially visible If the action set identifier is undefined then this is ignored since 3 0 public void set Initially Visible boolean new Value if id null return Preferences prefs Workbench Plugin get Default get Plugin Preferences String pref Id INITIALLY HIDDEN PREF ID PREFIX get Id prefs set Value pref Id new Value  setInitiallyVisible newValue WorkbenchPlugin getDefault getPluginPreferences prefId INITIALLY_HIDDEN_PREF_ID_PREFIX getId setValue prefId newValue
Sets the category of this action set param cat a non empty category id public void set Category String id category id  setCategory
see org eclipse ui model I Workbench Adapter get Image Descriptor java lang Object public Image Descriptor get Image Descriptor Object object return null  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor
see org eclipse ui model I Workbench Adapter get Parent java lang Object public Object get Parent Object o return null  IWorkbenchAdapter getParent getParent
see org eclipse ui I Plugin Contribution get Local Id public String get Local Id return id  IPluginContribution getLocalId getLocalId
see org eclipse ui I Plugin Contribution get Plugin Id public String get Plugin Id return plugin Id  IPluginContribution getPluginId getPluginId pluginId

Creates a new reader public Action Set Part Associations Reader super  ActionSetPartAssociationsReader
for dynamic UI public Action Set Part Associations Reader Action Set Registry registry this registry registry  ActionSetPartAssociationsReader ActionSetRegistry
Process an extension private boolean process Extension I Configuration Element element String action Set Id element get Attribute ATT TARGET ID I Configuration Element children element get Children for int i 0 i children length i I Configuration Element child children i String type child get Name if type equals TAG PART String part Id child get Attribute ATT ID if part Id null registry add Association action Set Id part Id else Workbench Plugin log Unable to process element NON NLS 1 type in action set part associations extension NON NLS 1 element get Declaring Extension get Unique Identifier return true  processExtension IConfigurationElement actionSetId getAttribute ATT_TARGET_ID IConfigurationElement getChildren IConfigurationElement getName TAG_PART partId getAttribute ATT_ID partId addAssociation actionSetId partId WorkbenchPlugin getDeclaringExtension getUniqueIdentifier
Reads the given element for dynamic UI change access from protected to public public boolean read Element I Configuration Element element String type element get Name if type equals TAG EXTENSION return process Extension element return false  readElement IConfigurationElement getName TAG_EXTENSION processExtension
Read the association extensions within a registry public void read Registry I Extension Registry in Action Set Registry out registry out read Registry in PlatformUI PLUGIN ID I Workbench Constants PL ACTION SET PART ASSOCIATIONS  readRegistry IExtensionRegistry ActionSetRegistry readRegistry PLUGIN_ID IWorkbenchConstants PL_ACTION_SET_PART_ASSOCIATIONS

Creates the action set registry public Action Set Registry super read From Registry  ActionSetRegistry readFromRegistry
Adds an action set public void add Action Set Action Set Descriptor desc children add desc  addActionSet ActionSetDescriptor
Adds an association between an action set an a part public void add Association String action Set Id String part Id get the action set ids for this part Array List action Sets Array List map Part To Action Sets get part Id if action Sets null action Sets new Array List map Part To Action Sets put part Id action Sets get the action set I Action Set Descriptor desc find Action Set action Set Id if desc null Workbench Plugin log Unable to associate action set with part NON NLS 1 part Id Action set action Set Id not found NON NLS 2 NON NLS 1 return add the action set if it is not already present if action Sets contains desc action Sets add desc  addAssociation actionSetId partId ArrayList actionSets ArrayList mapPartToActionSets partId actionSets actionSets ArrayList mapPartToActionSets partId actionSets IActionSetDescriptor findActionSet actionSetId WorkbenchPlugin partId actionSetId actionSets actionSets
Finds and returns the registered action set with the given id param id the action set id return the action set or code null code if none see I Action Set Descriptor get Id public I Action Set Descriptor find Action Set String id Iterator enum children iterator while enum has Next I Action Set Descriptor desc I Action Set Descriptor enum next if desc get Id equals id return desc return null  IActionSetDescriptor getId IActionSetDescriptor findActionSet hasNext IActionSetDescriptor IActionSetDescriptor getId
Find a category with a given id public Action Set Category find Category String id Iterator enum categories iterator while enum has Next Action Set Category cat Action Set Category enum next if id equals cat get Id return cat return null  ActionSetCategory findCategory hasNext ActionSetCategory ActionSetCategory getId
Returns a list of the action sets known to the workbench return a list of action sets public I Action Set Descriptor get Action Sets int count children size I Action Set Descriptor array new I Action Set Descriptor count for int nX 0 nX count nX array nX I Action Set Descriptor children get nX return array  IActionSetDescriptor getActionSets IActionSetDescriptor IActionSetDescriptor IActionSetDescriptor
Returns a list of the action sets associated with the given part id return a list of action sets public I Action Set Descriptor get Action Sets For String part Id get the action set ids for this part Array List action Sets Array List map Part To Action Sets get part Id if action Sets null return new I Action Set Descriptor 0 return I Action Set Descriptor action Sets to Array new I Action Set Descriptor action Sets size  IActionSetDescriptor getActionSetsFor partId ArrayList actionSets ArrayList mapPartToActionSets partId actionSets IActionSetDescriptor IActionSetDescriptor actionSets toArray IActionSetDescriptor actionSets
Returns a list of action set categories return a list of action sets categories public Action Set Category get Categories int count categories size Action Set Category array new Action Set Category count for int i 0 i count i array i Action Set Category categories get i return array  ActionSetCategory getCategories ActionSetCategory ActionSetCategory ActionSetCategory
Adds each action set in the registry to a particular category For now everything goes into the OTHER CATEGORY public void map Action Sets To Categories Create other category Action Set Category cat new Action Set Category OTHER CATEGORY Workbench Messages get String Action Set Registry other Category NON NLS 1 categories add cat Add everything to it Iterator enum children iterator while enum has Next I Action Set Descriptor desc I Action Set Descriptor enum next cat add Action Set desc  OTHER_CATEGORY mapActionSetsToCategories ActionSetCategory ActionSetCategory OTHER_CATEGORY WorkbenchMessages getString ActionSetRegistry otherCategory hasNext IActionSetDescriptor IActionSetDescriptor addActionSet
Reads the registry public void read From Registry Action Set Registry Reader reader new Action Set Registry Reader reader read Registry Platform get Extension Registry this Action Set Part Associations Reader assoc Reader new Action Set Part Associations Reader assoc Reader read Registry Platform get Extension Registry this  readFromRegistry ActionSetRegistryReader ActionSetRegistryReader readRegistry getExtensionRegistry ActionSetPartAssociationsReader assocReader ActionSetPartAssociationsReader assocReader readRegistry getExtensionRegistry
for dynamic UI public Object remove Cache String action Set Id return map Cache To Action Sets remove action Set Id  removeCache actionSetId mapCacheToActionSets actionSetId
for dynamic UI public void remove String id I Action Set Descriptor desc find Action Set id if id null children remove desc categories remove desc  IActionSetDescriptor findActionSet
for dynamic UI public void remove Association String action Set Id String part Id I Action Set Descriptor desc find Action Set action Set Id if desc null return Array List action Sets Array List map Part To Action Sets get part Id if action Sets null return if action Sets contains desc action Sets remove desc if action Sets size 0 map Part To Action Sets remove part Id  removeAssociation actionSetId partId IActionSetDescriptor findActionSet actionSetId ArrayList actionSets ArrayList mapPartToActionSets partId actionSets actionSets actionSets actionSets mapPartToActionSets partId

Registry View Reader constructor comment public Action Set Registry Reader super  RegistryViewReader ActionSetRegistryReader
for dynamic UI public Action Set Registry Reader Action Set Registry registry this registry registry  ActionSetRegistryReader ActionSetRegistry
read Element method comment for dynamic UI change access from protected to public public boolean read Element I Configuration Element element if element get Name equals TAG SET try Action Set Descriptor desc new Action Set Descriptor element registry add Action Set desc catch Core Exception e log an error since its not safe to open a dialog here Workbench Plugin log Unable to create action set descriptor e get Status NON NLS 1 return true else return false  readElement readElement IConfigurationElement getName TAG_SET ActionSetDescriptor ActionSetDescriptor addActionSet CoreException WorkbenchPlugin getStatus
Read the view extensions within a registry public void read Registry I Extension Registry in Action Set Registry out registry out read Registry in PlatformUI PLUGIN ID I Workbench Constants PL ACTION SETS out map Action Sets To Categories  readRegistry IExtensionRegistry ActionSetRegistry readRegistry PLUGIN_ID IWorkbenchConstants PL_ACTION_SETS mapActionSetsToCategories

Creates an instance of code Category code as a miscellaneous category public Category this id MISC ID this name MISC NAME this plugin Id MISC ID TODO remove hack for bug 55172  MISC_ID MISC_NAME pluginId MISC_ID
Creates an instance of code Category code with an ID and label param id the unique identifier for the category param label the presentation label for this category public Category String id String label this id id this name label 
Creates an instance of code Category code using the information from the specified configuration element param config Element the code I Configuration Element code containing the ID label and optional parent category path throws a code Workbench Exception code if the ID or label is code null code public Category I Configuration Element config Element throws Workbench Exception id config Element get Attribute ATT ID plugin Id config Element get Declaring Extension get Namespace name config Element get Attribute ATT NAME unparsed Path config Element get Attribute ATT PARENT configuration Element config Element if id null name null throw new Workbench Exception Invalid category id NON NLS 1  configElement IConfigurationElement WorkbenchException IConfigurationElement configElement WorkbenchException configElement getAttribute ATT_ID pluginId configElement getDeclaringExtension getNamespace configElement getAttribute ATT_NAME unparsedPath configElement getAttribute ATT_PARENT configurationElement configElement WorkbenchException
public void add Element Object element if elements null elements new Array List 5 elements add element  addElement ArrayList
public Object get Adapter Class adapter if adapter I Workbench Adapter class return this else if adapter I Configuration Element class return configuration Element else return null  getAdapter IWorkbenchAdapter IConfigurationElement configurationElement
Method declared on I Workbench Adapter public Object get Children Object o return get Elements to Array  IWorkbenchAdapter getChildren getElements toArray
Method declared on I Workbench Adapter public Image Descriptor get Image Descriptor Object object return Workbench Images get Image Descriptor I Shared Images IMG OBJ FOLDER  IWorkbenchAdapter ImageDescriptor getImageDescriptor WorkbenchImages getImageDescriptor ISharedImages IMG_OBJ_FOLDER
Method declared on I Workbench Adapter public String get Label Object o return get Label  IWorkbenchAdapter getLabel getLabel
Method declared on I Category public String get Id return id  ICategory getId
Method declared on I Category public String get Label return name  ICategory getLabel
public String get Parent Path if unparsed Path null String Tokenizer stok new String Tokenizer unparsed Path NON NLS 1 parent Path new String stok count Tokens for int i 0 stok has More Tokens i parent Path i stok next Token unparsed Path null return parent Path  getParentPath unparsedPath StringTokenizer StringTokenizer unparsedPath parentPath countTokens hasMoreTokens parentPath nextToken unparsedPath parentPath
public String get Root Path String path get Parent Path if path null path length 0 return path 0 else return id  getRootPath getParentPath
Method declared on I Category public Array List get Elements return elements  ICategory ArrayList getElements
public boolean has Element Object o if elements null return false if elements is Empty return false return elements contains o  hasElement isEmpty
public boolean has Elements if elements null return elements is Empty else return false  hasElements isEmpty
see org eclipse ui model I Workbench Adapter get Parent java lang Object public Object get Parent Object o return null  IWorkbenchAdapter getParent getParent
see org eclipse ui activities support I Plugin Contribution from Plugin public boolean from Plugin return plugin Id null  IPluginContribution fromPlugin fromPlugin pluginId
see org eclipse ui activities support I Plugin Contribution get Local Id public String get Local Id return id  IPluginContribution getLocalId getLocalId
see org eclipse ui activities support I Plugin Contribution get Plugin Id public String get Plugin Id return plugin Id  IPluginContribution getPluginId getPluginId pluginId

Create a new instance of an editor descriptor Limited to internal framework calls package Editor Descriptor super  EditorDescriptor
Creates a descriptor for an external program param filename the external editor full path and filename return the editor descriptor public static Editor Descriptor create For Program String filename if filename null throw new Illegal Argument Exception Editor Descriptor editor new Editor Descriptor editor set File Name filename editor setID filename editor set Open Mode OPEN EXTERNAL Isolate the program name no directory or extension int start filename last Index Of File separator String name if start 1 name filename substring start 1 else name filename int end name last Index Of if end 1 name name substring 0 end editor set Name name get the program icon without storing it in the registry Image Descriptor image Descriptor new Program Image Descriptor filename 0 editor set Image Descriptor image Descriptor return editor  EditorDescriptor createForProgram IllegalArgumentException EditorDescriptor EditorDescriptor setFileName setOpenMode OPEN_EXTERNAL lastIndexOf lastIndexOf setName ImageDescriptor imageDescriptor ProgramImageDescriptor setImageDescriptor imageDescriptor
Return the program called program Name Return null if it is not found return org eclipse swt program Program private static Program find Program String program Name Program programs Program get Programs for int i 0 i programs length i if programs i get Name equals program Name return programs i return null  programName findProgram programName getPrograms getName programName
Creates the action contributor for this editor public I Editor Action Bar Contributor create Action Bar Contributor Handle case for predefined editor descriptors like the one for I Editor Registry SYSTEM INPLACE EDITOR ID which don t have a configuration element if configuration Element null return null Get the contributor class name String class Name configuration Element get Attribute ATT EDITOR CONTRIBUTOR if class Name null return null Create the contributor object I Editor Action Bar Contributor contributor null try contributor I Editor Action Bar Contributor Workbench Plugin create Extension configuration Element ATT EDITOR CONTRIBUTOR catch Core Exception e Workbench Plugin log Unable to create editor contributor NON NLS 1 id e get Status return contributor  IEditorActionBarContributor createActionBarContributor IEditorRegistry SYSTEM_INPLACE_EDITOR_ID configurationElement className configurationElement getAttribute ATT_EDITOR_CONTRIBUTOR className IEditorActionBarContributor IEditorActionBarContributor WorkbenchPlugin createExtension configurationElement ATT_EDITOR_CONTRIBUTOR CoreException WorkbenchPlugin getStatus
see I Resource Editor Descriptor public String get Class Name return class Name  IResourceEditorDescriptor getClassName className
see I Resource Editor Descriptor public I Configuration Element get Configuration Element return configuration Element  IResourceEditorDescriptor IConfigurationElement getConfigurationElement configurationElement
see I Resource Editor Descriptor public String get File Name if program null return file Name return program get Name  IResourceEditorDescriptor getFileName fileName getName
see I Resource Editor Descriptor public String get Id if program null return id return program get Name  IResourceEditorDescriptor getId getName
see I Resource Editor Descriptor public Image Descriptor get Image Descriptor if test Image test Image false if image Desc null issue what should be the default image image Desc Workbench Images get Image Descriptor I Shared Images IMG OBJ FILE else Image img image Desc create Image false if img null issue what should be the default image image Desc Workbench Images get Image Descriptor I Shared Images IMG OBJ FILE else img dispose return image Desc  IResourceEditorDescriptor ImageDescriptor getImageDescriptor testImage testImage imageDesc imageDesc WorkbenchImages getImageDescriptor ISharedImages IMG_OBJ_FILE imageDesc createImage imageDesc WorkbenchImages getImageDescriptor ISharedImages IMG_OBJ_FILE imageDesc
see I Resource Editor Descriptor public String get Image Filename return image Filename  IResourceEditorDescriptor getImageFilename imageFilename
see I Resource Editor Descriptor public String get Label if program null return editor Name return program get Name  IResourceEditorDescriptor getLabel editorName getName
Returns the class name of the launcher public String get Launcher return launcher Name  getLauncher launcherName
see I Resource Editor Descriptor public String get PluginID return plugin Identifier  IResourceEditorDescriptor getPluginID pluginIdentifier
Get the program for the receiver if there is one return Program public Program get Program return this program  getProgram
see org eclipse ui I Editor Descriptor is Internal public boolean is Internal return open Mode OPEN INTERNAL  IEditorDescriptor isInternal isInternal openMode OPEN_INTERNAL
see org eclipse ui I Editor Descriptor is Open In Place public boolean is Open In Place return open Mode OPEN INPLACE  IEditorDescriptor isOpenInPlace isOpenInPlace openMode OPEN_INPLACE
see org eclipse ui I Editor Descriptor is Open External public boolean is Open External return open Mode OPEN EXTERNAL  IEditorDescriptor isOpenExternal isOpenExternal openMode OPEN_EXTERNAL
Load the object properties from a memento return code true code if the values are valid code false code otherwise protected boolean load Values I Memento memento editor Name memento get String I Workbench Constants TAG LABEL image Filename memento get String I Workbench Constants TAG IMAGE class Name memento get String I Workbench Constants TAG CLASS launcher Name memento get String I Workbench Constants TAG LAUNCHER file Name memento get String I Workbench Constants TAG FILE id memento get String I Workbench Constants TAG ID plugin Identifier memento get String I Workbench Constants TAG PLUGIN Integer open Mode Int memento get Integer I Workbench Constants TAG OPEN MODE if open Mode Int null open Mode open Mode Int int Value else legacy handle the older attribute names needed to allow reading of pre 3 0 RCP workspaces boolean internal new Boolean memento get String I Workbench Constants TAG INTERNAL boolean Value boolean open In Place new Boolean memento get String I Workbench Constants TAG OPEN IN PLACE boolean Value if internal open Mode OPEN INTERNAL else if open In Place open Mode OPEN INPLACE else open Mode OPEN EXTERNAL if open Mode OPEN EXTERNAL open Mode OPEN INTERNAL open Mode OPEN INPLACE Workbench Plugin log Ignoring editor descriptor with invalid open Mode this NON NLS 1 return false String program Name memento get String I Workbench Constants TAG PROGRAM NAME if program Name null this program find Program program Name return true  loadValues IMemento editorName getString IWorkbenchConstants TAG_LABEL imageFilename getString IWorkbenchConstants TAG_IMAGE className getString IWorkbenchConstants TAG_CLASS launcherName getString IWorkbenchConstants TAG_LAUNCHER fileName getString IWorkbenchConstants TAG_FILE getString IWorkbenchConstants TAG_ID pluginIdentifier getString IWorkbenchConstants TAG_PLUGIN openModeInt getInteger IWorkbenchConstants TAG_OPEN_MODE openModeInt openMode openModeInt intValue getString IWorkbenchConstants TAG_INTERNAL booleanValue openInPlace getString IWorkbenchConstants TAG_OPEN_IN_PLACE booleanValue openMode OPEN_INTERNAL openInPlace openMode OPEN_INPLACE openMode OPEN_EXTERNAL openMode OPEN_EXTERNAL openMode OPEN_INTERNAL openMode OPEN_INPLACE WorkbenchPlugin openMode programName getString IWorkbenchConstants TAG_PROGRAM_NAME programName findProgram programName
Save the object values in a I Memento protected void save Values I Memento memento memento put String I Workbench Constants TAG LABEL editor Name memento put String I Workbench Constants TAG IMAGE image Filename memento put String I Workbench Constants TAG CLASS class Name memento put String I Workbench Constants TAG LAUNCHER launcher Name memento put String I Workbench Constants TAG FILE file Name memento put String I Workbench Constants TAG ID id memento put String I Workbench Constants TAG PLUGIN plugin Identifier memento put Integer I Workbench Constants TAG OPEN MODE open Mode legacy handle the older attribute names needed to allow reading of workspace by pre 3 0 RCP eclipses memento put String I Workbench Constants TAG INTERNAL String value Of is Internal memento put String I Workbench Constants TAG OPEN IN PLACE String value Of is Open In Place if this program null memento put String I Workbench Constants TAG PROGRAM NAME this program get Name  IMemento saveValues IMemento putString IWorkbenchConstants TAG_LABEL editorName putString IWorkbenchConstants TAG_IMAGE imageFilename putString IWorkbenchConstants TAG_CLASS className putString IWorkbenchConstants TAG_LAUNCHER launcherName putString IWorkbenchConstants TAG_FILE fileName putString IWorkbenchConstants TAG_ID putString IWorkbenchConstants TAG_PLUGIN pluginIdentifier putInteger IWorkbenchConstants TAG_OPEN_MODE openMode putString IWorkbenchConstants TAG_INTERNAL valueOf isInternal putString IWorkbenchConstants TAG_OPEN_IN_PLACE valueOf isOpenInPlace putString IWorkbenchConstants TAG_PROGRAM_NAME getName
Set the class name of an internal editor package void set Class Name String new Class Name class Name new Class Name  setClassName newClassName className newClassName
Set the configuration element which contributed this editor package void set Configuration Element I Configuration Element new Configuration Element configuration Element new Configuration Element  setConfigurationElement IConfigurationElement newConfigurationElement configurationElement newConfigurationElement
Set the filename of an external editor package void set File Name String a File Name file Name a File Name  setFileName aFileName fileName aFileName
Set the id of the editor For internal editors this is the id as provided in the extension point For external editors it is path and filename of the editor package void setID String anID id anID 
The Image to use to repesent this editor package void set Image Descriptor Image Descriptor desc image Desc desc test Image true  setImageDescriptor ImageDescriptor imageDesc testImage
The name of the image to use for this editor package void set Image Filename String a File Name image Filename a File Name  setImageFilename aFileName imageFilename aFileName
Sets the new launcher class name param new Launcher the new launcher package void set Launcher String new Launcher launcher Name new Launcher  newLauncher setLauncher newLauncher launcherName newLauncher
The label to show for this editor package void set Name String new Name editor Name new Name  setName newName editorName newName
Sets the open mode of this editor descriptor param mode the open mode issue this method is public as a temporary fix for bug 47600 public void set Open Mode int mode open Mode mode  setOpenMode openMode
The id of the plugin which contributed this editor null for external editors package void set Plugin Identifier String anID plugin Identifier anID  setPluginIdentifier pluginIdentifier
Set the receivers program param new Program package void set Program Program new Program this program new Program if editor Name null set Name new Program get Name  newProgram setProgram newProgram newProgram editorName setName newProgram getName
For debugging purposes only public String to String return Editor Descriptor editor Name NON NLS 2 NON NLS 1  toString EditorDescriptor editorName
see org eclipse ui activities support I Plugin Contribution from Plugin public boolean from Plugin return configuration Element null  IPluginContribution fromPlugin fromPlugin configurationElement
see org eclipse ui activities support I Plugin Contribution get Local Id public String get Local Id return get Id  IPluginContribution getLocalId getLocalId getId
see org eclipse ui activities support I Plugin Contribution get Plugin Id public String get Plugin Id return plugin Identifier  IPluginContribution getPluginId getPluginId pluginIdentifier

public int compare Object arg0 Object arg1 String s1 I Editor Descriptor arg0 get Label String s2 I Editor Descriptor arg1 get Label return collator compare s1 s2  IEditorDescriptor getLabel IEditorDescriptor getLabel
Return an instance of the receiver public Editor Registry super initialize From Storage  EditorRegistry initializeFromStorage
Add an editor for the given extensions with the specified possibly null extended type The editor is being registered from a plugin param editor The description of the editor as obtained from the plugin file and built by the registry reader param extensions Collection of file extensions the editor applies to param filenames Collection of filenames the editor applies to param b Default Indicates whether the editor should be made the default editor and hence appear first inside a File Editor Mapping This method is not API and should not be called outside the workbench code public void add Editor From Plugin Editor Descriptor editor List extensions List filenames boolean b Default record it in our quick reference list sorted Editors From Plugins add editor add it to the table of mappings Iterator enum extensions iterator while enum has Next String file Extension String enum next if file Extension null file Extension length 0 File Editor Mapping mapping get Mapping For file Extension NON NLS 1 if mapping null no mapping for that extension mapping new File Editor Mapping file Extension type Editor Mappings put Default mapping Key For mapping mapping mapping add Editor editor if b Default mapping set Default Editor editor add it to the table of mappings enum filenames iterator while enum has Next String filename String enum next if filename null filename length 0 File Editor Mapping mapping get Mapping For filename if mapping null no mapping for that extension String name String extension int index filename index Of if index 0 name filename extension NON NLS 1 else name filename substring 0 index extension filename substring index 1 mapping new File Editor Mapping name extension type Editor Mappings put Default mapping Key For mapping mapping mapping add Editor editor if b Default mapping set Default Editor editor Update editor map mapI Dto Editor put editor get Id editor  bDefault FileEditorMapping addEditorFromPlugin EditorDescriptor bDefault sortedEditorsFromPlugins hasNext fileExtension fileExtension fileExtension FileEditorMapping getMappingFor fileExtension FileEditorMapping fileExtension typeEditorMappings putDefault mappingKeyFor addEditor bDefault setDefaultEditor hasNext FileEditorMapping getMappingFor indexOf FileEditorMapping typeEditorMappings putDefault mappingKeyFor addEditor bDefault setDefaultEditor mapIDtoEditor getId
Add external editors to the editor mapping private void add External Editors To Editor Map I Editor Descriptor desc null Add registered editors may include external editors File Editor Mapping maps type Editor Mappings all Mappings for int i 0 i maps length i File Editor Mapping map maps i I Editor Descriptor desc Array map get Editors for int n 0 n desc Array length n desc desc Array n mapI Dto Editor put desc get Id desc  addExternalEditorsToEditorMap IEditorDescriptor FileEditorMapping typeEditorMappings allMappings FileEditorMapping IEditorDescriptor descArray getEditors descArray descArray mapIDtoEditor getId
non Javadoc Method declared on I Editor Registry public void add Property Listener I Property Listener l prop Change Listeners add l  IEditorRegistry addPropertyListener IPropertyListener propChangeListeners
non Javadoc Method declared on I Editor Registry public I Editor Descriptor find Editor String id return I Editor Descriptor mapI Dto Editor get id  IEditorRegistry IEditorDescriptor findEditor IEditorDescriptor mapIDtoEditor
final I Property Listener l I Property Listener array nX Platform run new Safe Runnable public void run l property Changed Editor Registry this type  IPropertyListener IPropertyListener SafeRunnable propertyChanged EditorRegistry
Fires a property changed event private void fire Property Change final int type Object array prop Change Listeners get Listeners for int nX 0 nX array length nX final I Property Listener l I Property Listener array nX Platform run new Safe Runnable public void run l property Changed Editor Registry this type  firePropertyChange propChangeListeners getListeners IPropertyListener IPropertyListener SafeRunnable propertyChanged EditorRegistry
public I Editor Descriptor get Default Editor the default editor will always be the system external editor this should never return null return find Editor I Editor Registry SYSTEM EXTERNAL EDITOR ID  IEditorDescriptor getDefaultEditor findEditor IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID
public I Editor Descriptor get Default Editor String filename File Editor Mapping mapping get Mapping For Filename filename I Editor Descriptor desc null if mapping 0 null desc mapping 0 get Default Editor if desc null mapping 1 null desc mapping 1 get Default Editor if Workbench Activity Helper filter Item desc return null return desc  IEditorDescriptor getDefaultEditor FileEditorMapping getMappingForFilename IEditorDescriptor getDefaultEditor getDefaultEditor WorkbenchActivityHelper filterItem
Returns the default file image private Image Descriptor get Default Image issue what should be the default image return Workbench Images get Image Descriptor I Shared Images IMG OBJ FILE  ImageDescriptor getDefaultImage WorkbenchImages getImageDescriptor ISharedImages IMG_OBJ_FILE
public I Editor Descriptor get Editors String filename I Editor Descriptor editors new I Editor Descriptor 0 I Editor Descriptor filename Editors editors I Editor Descriptor extension Editors editors File Editor Mapping mapping get Mapping For Filename filename if mapping 0 null editors mapping 0 get Editors if editors null filename Editors editors if mapping 1 null editors mapping 1 get Editors if editors null extension Editors editors editors new I Editor Descriptor filename Editors length extension Editors length System arraycopy filename Editors 0 editors 0 filename Editors length System arraycopy extension Editors 0 editors filename Editors length extension Editors length Array List list new Array List Arrays as List editors Array List filtered new Array List for Iterator i list iterator i has Next Object next i next if Workbench Activity Helper filter Item next continue filtered add next editors I Editor Descriptor filtered to Array new I Editor Descriptor filtered size return editors  IEditorDescriptor getEditors IEditorDescriptor IEditorDescriptor IEditorDescriptor filenameEditors IEditorDescriptor extensionEditors FileEditorMapping getMappingForFilename getEditors filenameEditors getEditors extensionEditors IEditorDescriptor filenameEditors extensionEditors filenameEditors filenameEditors extensionEditors filenameEditors extensionEditors ArrayList ArrayList asList ArrayList ArrayList hasNext WorkbenchActivityHelper filterItem IEditorDescriptor toArray IEditorDescriptor
Arrays sort array new Comparator public int compare Object o1 Object o2 String s1 File Editor Mapping o1 get Label String s2 File Editor Mapping o2 get Label return collator compare s1 s2  FileEditorMapping getLabel FileEditorMapping getLabel
public I File Editor Mapping get File Editor Mappings File Editor Mapping array type Editor Mappings all Mappings final Collator collator Collator get Instance Arrays sort array new Comparator public int compare Object o1 Object o2 String s1 File Editor Mapping o1 get Label String s2 File Editor Mapping o2 get Label return collator compare s1 s2 return array  IFileEditorMapping getFileEditorMappings FileEditorMapping typeEditorMappings allMappings getInstance FileEditorMapping getLabel FileEditorMapping getLabel
public Image Descriptor get Image Descriptor String filename if filename null return get Default Image Lookup in the cache first String key mapping Key For filename Image Descriptor an Image Image Descriptor extension Images get key if an Image null return an Image See if we have a mapping for the filename or extension File Editor Mapping mapping get Mapping For Filename filename for int i 0 i 2 i if mapping i null Lookup in the cache first String mapping Key mapping Key For mapping i Image Descriptor mapping Image Image Descriptor extension Images get key if mapping Image null return mapping Image Create it and cache it I Editor Descriptor editor mapping i get Default Editor if editor null mapping Image editor get Image Descriptor extension Images put mapping Key mapping Image return mapping Image Nothing time to look externally for the icon an Image get System External Editor Image Descriptor filename if an Image null an Image get Default Image for dynamic UI comment out the next line extension Images put key an Image return an Image  ImageDescriptor getImageDescriptor getDefaultImage mappingKeyFor ImageDescriptor anImage ImageDescriptor extensionImages anImage anImage FileEditorMapping getMappingForFilename mappingKey mappingKeyFor ImageDescriptor mappingImage ImageDescriptor extensionImages mappingImage mappingImage IEditorDescriptor getDefaultEditor mappingImage getImageDescriptor extensionImages mappingKey mappingImage mappingImage anImage getSystemExternalEditorImageDescriptor anImage anImage getDefaultImage extensionImages anImage anImage
Find the file editor mapping for the type Returns null if not found private File Editor Mapping get Mapping For String type if type null return null String key mapping Key For type return type Editor Mappings get key  FileEditorMapping getMappingFor mappingKeyFor typeEditorMappings
Find the file editor mappings for the given filename Return an array of two File Editor Mapping items where the first mapping is for the entire filename and the second mapping is for the filename s extension only These items can be null if no mapping exist on the filename and or filename s extension private File Editor Mapping get Mapping For Filename String filename File Editor Mapping mapping new File Editor Mapping 2 Lookup on entire filename mapping 0 get Mapping For filename Lookup on filename s extension int index filename last Index Of if index 1 String extension filename substring index mapping 1 get Mapping For extension NON NLS 1 return mapping  FileEditorMapping FileEditorMapping getMappingForFilename FileEditorMapping FileEditorMapping getMappingFor lastIndexOf getMappingFor
public I Editor Descriptor get Sorted Editors FromOS List external Editors new Array List Program programs Program get Programs for int i 0 i programs length i 1FPLRL2 ITPUI WINNT NOTEPAD editor cannot be launched Some entries start with System Root For such cases just use the file name as they are generally in directories which are on the path if file Name char At 0 file Name name exe Editor Descriptor editor new Editor Descriptor editor set Open Mode Editor Descriptor OPEN EXTERNAL editor set Program programs i determine the program icon this editor would need do not let it be cached in the workbench registry Image Descriptor desc new External Program Image Descriptor programs i editor set Image Descriptor desc external Editors add editor Object temp Array sort Editors external Editors I Editor Descriptor array new I Editor Descriptor external Editors size for int i 0 i temp Array length i array i I Editor Descriptor temp Array i return array  IEditorDescriptor getSortedEditorsFromOS externalEditors ArrayList getPrograms SystemRoot fileName charAt fileName EditorDescriptor EditorDescriptor setOpenMode EditorDescriptor OPEN_EXTERNAL setProgram ImageDescriptor ExternalProgramImageDescriptor setImageDescriptor externalEditors tempArray sortEditors externalEditors IEditorDescriptor IEditorDescriptor externalEditors tempArray IEditorDescriptor tempArray
public I Editor Descriptor get Sorted Editors From Plugins I Editor Descriptor array new I Editor Descriptor sorted Editors From Plugins size sorted Editors From Plugins to Array array return array  IEditorDescriptor getSortedEditorsFromPlugins IEditorDescriptor IEditorDescriptor sortedEditorsFromPlugins sortedEditorsFromPlugins toArray
Answer an intial id to editor map private Hash Map initial Id To Editor Map int initial Size Hash Map map new Hash Map initial Size add System Editors map return map  HashMap initialIdToEditorMap initialSize HashMap HashMap initialSize addSystemEditors
private void add System Editors Hash Map map there will always be a system external editor descriptor Editor Descriptor editor new Editor Descriptor editor setID I Editor Registry SYSTEM EXTERNAL EDITOR ID editor set Name Workbench Messages get String System Editor Description name NON NLS 1 editor set Open Mode Editor Descriptor OPEN EXTERNAL issue we need a real icon for this editor map put I Editor Registry SYSTEM EXTERNAL EDITOR ID editor there may be a system in place editor if supported by platform if Component Support in Place Editor Supported editor new Editor Descriptor editor setID I Editor Registry SYSTEM INPLACE EDITOR ID editor set Name Workbench Messages get String System In Place Description name NON NLS 1 editor set Open Mode Editor Descriptor OPEN INPLACE issue we need a real icon for this editor map put I Editor Registry SYSTEM INPLACE EDITOR ID editor  addSystemEditors HashMap EditorDescriptor EditorDescriptor IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID setName WorkbenchMessages getString SystemEditorDescription setOpenMode EditorDescriptor OPEN_EXTERNAL IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID ComponentSupport inPlaceEditorSupported EditorDescriptor IEditorRegistry SYSTEM_INPLACE_EDITOR_ID setName WorkbenchMessages getString SystemInPlaceDescription setOpenMode EditorDescriptor OPEN_INPLACE IEditorRegistry SYSTEM_INPLACE_EDITOR_ID
private void initialize From Storage type Editor Mappings new Editor Map extension Images new Hash Map Get editors from the registry Editor Registry Reader registry Reader new Editor Registry Reader registry Reader add Editors true this sort Internal Editors rebuild Internal Editor Map I Workbench workbench PlatformUI get Workbench I Preference Store store workbench get Preference Store String default Editors store get String I Preference Constants DEFAULT EDITORS String chached Default Editors store get String I Preference Constants DEFAULT EDITORS CACHE If defaults has changed load it afterwards so it overrides the users associations if default Editors null default Editors equals chached Default Editors set Product Defaults default Editors load Associations get saved earlier state else load Associations get saved earlier state set Product Defaults default Editors store put Value I Preference Constants DEFAULT EDITORS CACHE default Editors add External Editors To Editor Map  initializeFromStorage typeEditorMappings EditorMap extensionImages HashMap EditorRegistryReader registryReader EditorRegistryReader registryReader addEditors sortInternalEditors rebuildInternalEditorMap IWorkbench getWorkbench IPreferenceStore getPreferenceStore defaultEditors getString IPreferenceConstants DEFAULT_EDITORS chachedDefaultEditors getString IPreferenceConstants DEFAULT_EDITORS_CACHE defaultEditors defaultEditors chachedDefaultEditors setProductDefaults defaultEditors loadAssociations loadAssociations setProductDefaults defaultEditors putValue IPreferenceConstants DEFAULT_EDITORS_CACHE defaultEditors addExternalEditorsToEditorMap
Set the default editors according to the preference store which can be overwritten in the file properties ini private void set Product Defaults String default Editors if default Editors null default Editors length 0 return String Tokenizer ext Editors new String Tokenizer default Editors new Character I Preference Constants SEPARATOR to String while ext Editors has More Tokens String ext Editor ext Editors next Token trim int index ext Editor index Of if ext Editor length 3 index 0 index ext Editor length 1 Extension and id must have at least one char Workbench Plugin log Error setting default editor Could not parse ext Editor Default editors should be specified as ext1 editor Id1 ext2 editor Id2 NON NLS 1 NON NLS 2 return String ext ext Editor substring 0 index trim String editor Id ext Editor substring index 1 trim File Editor Mapping mapping get Mapping For ext if mapping null Workbench Plugin log Error setting default editor Could not find mapping for ext NON NLS 1 NON NLS 2 continue Editor Descriptor editor Editor Descriptor find Editor editor Id if editor null Workbench Plugin log Error setting default editor Could not find editor editor Id NON NLS 1 NON NLS 2 continue mapping set Default Editor editor  setProductDefaults defaultEditors defaultEditors defaultEditors StringTokenizer extEditors StringTokenizer defaultEditors IPreferenceConstants toString extEditors hasMoreTokens extEditor extEditors nextToken extEditor indexOf extEditor extEditor WorkbenchPlugin extEditor editorId1 editorId2 extEditor editorId extEditor FileEditorMapping getMappingFor WorkbenchPlugin EditorDescriptor EditorDescriptor findEditor editorId WorkbenchPlugin editorId setDefaultEditor
Read the editors defined in the preferences store param editor Table Editor table to store the editor definitions return true if the table is built succesfully private boolean read Editors Map editor Table Get the workbench plugin s working directory Workbench Plugin workbench Plugin Workbench Plugin get Default I Path workbench State Path workbench Plugin get State Location I Preference Store store Workbench Plugin get Default get Preference Store Reader reader null try Get the editors defined in the preferences store String xml String store get String I Preference Constants EDITORS if xml String null xml String length 0 File Input Stream stream new File Input Stream workbench State Path append I Workbench Constants EDITOR FILE NAME toOS String reader new Buffered Reader new Input Stream Reader stream utf 8 NON NLS 1 else reader new String Reader xml String XML Memento memento XML Memento create Read Root reader Editor Descriptor editor I Memento ed Mementos memento get Children I Workbench Constants TAG DESCRIPTOR Get the editors and validate each one for int i 0 i ed Mementos length i editor new Editor Descriptor boolean valid editor load Values ed Mementos i if valid continue if editor get PluginID null If the editor is from a plugin we use its ID to look it up in the mapping of editors we have obtained from plugins This allows us to verify that the editor is still valid and allows us to get the editor description from the mapping table which has a valid config element field Editor Descriptor valid Editor Descritor Editor Descriptor mapI Dto Editor get editor get Id if valid Editor Descritor null editor Table put valid Editor Descritor get Id valid Editor Descritor else This is either from a program or a user defined editor Image Descriptor descriptor if editor get Program null descriptor new Program Image Descriptor editor get File Name 0 else descriptor new External Program Image Descriptor editor get Program editor set Image Descriptor descriptor editor Table put editor get Id editor catch IO Exception e try if reader null reader close catch IO Exception ex e print Stack Trace Ignore this as the workbench may not yet have saved any state return false catch Workbench Exception e Error Dialog open Error Shell null Workbench Messages get String Editor Registry error Title NON NLS 1 Workbench Messages get String Editor Registry error Message NON NLS 1 e get Status return false return true  editorTable readEditors editorTable WorkbenchPlugin workbenchPlugin WorkbenchPlugin getDefault IPath workbenchStatePath workbenchPlugin getStateLocation IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore xmlString getString IPreferenceConstants xmlString xmlString FileInputStream FileInputStream workbenchStatePath IWorkbenchConstants EDITOR_FILE_NAME toOSString BufferedReader InputStreamReader StringReader xmlString XMLMemento XMLMemento createReadRoot EditorDescriptor IMemento edMementos getChildren IWorkbenchConstants TAG_DESCRIPTOR edMementos EditorDescriptor loadValues edMementos getPluginID EditorDescriptor validEditorDescritor EditorDescriptor mapIDtoEditor getId validEditorDescritor editorTable validEditorDescritor getId validEditorDescritor ImageDescriptor getProgram ProgramImageDescriptor getFileName ExternalProgramImageDescriptor getProgram setImageDescriptor editorTable getId IOException IOException printStackTrace WorkbenchException ErrorDialog openError WorkbenchMessages getString EditorRegistry errorTitle WorkbenchMessages getString EditorRegistry errorMessage getStatus
Read the file types and associate them to their defined editor s param editor Table The editor table containing the defined editors param reader Reader containing the preferences content for the resources throws Workbench Exception public void read Resources Map editor Table Reader reader throws Workbench Exception XML Memento memento XML Memento create Read Root reader I Memento ext Mementos memento get Children I Workbench Constants TAG INFO for int i 0 i ext Mementos length i String name ext Mementos i get String I Workbench Constants TAG NAME if name null name NON NLS 1 String extension ext Mementos i get String I Workbench Constants TAG EXTENSION I Memento id Mementos ext Mementos i get Children I Workbench Constants TAG EDITOR String editorI Ds new String id Mementos length for int j 0 j id Mementos length j editorI Ds j id Mementos j get String I Workbench Constants TAG ID id Mementos ext Mementos i get Children I Workbench Constants TAG DELETED EDITOR String deleted EditorI Ds new String id Mementos length for int j 0 j id Mementos length j deleted EditorI Ds j id Mementos j get String I Workbench Constants TAG ID File Editor Mapping mapping get Mapping For name extension NON NLS 1 if mapping null mapping new File Editor Mapping name extension List editors new Array List for int j 0 j editorI Ds length j if editorI Ds j null Editor Descriptor editor Editor Descriptor editor Table get editorI Ds j if editor null editors add editor List deleted Editors new Array List for int j 0 j deleted EditorI Ds length j if deleted EditorI Ds j null Editor Descriptor editor Editor Descriptor editor Table get deleted EditorI Ds j if editor null deleted Editors add editor Add any new editors that have already been read from the registry which were not deleted I Editor Descriptor editors Array mapping get Editors for int j 0 j editors Array length j if contains editors editors Array j deleted Editors contains editors Array j editors add editors Array j Map the editor s to the file type mapping set Editors List editors mapping set Deleted Editors List deleted Editors type Editor Mappings put mapping Key For mapping mapping  editorTable WorkbenchException readResources editorTable WorkbenchException XMLMemento XMLMemento createReadRoot IMemento extMementos getChildren IWorkbenchConstants TAG_INFO extMementos extMementos getString IWorkbenchConstants TAG_NAME extMementos getString IWorkbenchConstants TAG_EXTENSION IMemento idMementos extMementos getChildren IWorkbenchConstants TAG_EDITOR editorIDs idMementos idMementos editorIDs idMementos getString IWorkbenchConstants TAG_ID idMementos extMementos getChildren IWorkbenchConstants TAG_DELETED_EDITOR deletedEditorIDs idMementos idMementos deletedEditorIDs idMementos getString IWorkbenchConstants TAG_ID FileEditorMapping getMappingFor FileEditorMapping ArrayList editorIDs editorIDs EditorDescriptor EditorDescriptor editorTable editorIDs deletedEditors ArrayList deletedEditorIDs deletedEditorIDs EditorDescriptor EditorDescriptor editorTable deletedEditorIDs deletedEditors IEditorDescriptor editorsArray getEditors editorsArray editorsArray deletedEditors editorsArray editorsArray setEditorsList setDeletedEditorsList deletedEditors typeEditorMappings mappingKeyFor
Determine if the editors list contains the editor descriptor param editors Array The list of editors param editor Descriptor The editor descriptor return true if the editors list contains the editor descriptor private boolean contains List editors Array I Editor Descriptor editor Descriptor I Editor Descriptor current Editor Descriptor null Iterator i editors Array iterator while i has Next current Editor Descriptor I Editor Descriptor i next if current Editor Descriptor get Id equals editor Descriptor get Id return true return false  editorsArray editorDescriptor editorsArray IEditorDescriptor editorDescriptor IEditorDescriptor currentEditorDescriptor editorsArray hasNext currentEditorDescriptor IEditorDescriptor currentEditorDescriptor getId editorDescriptor getId
Creates the reader for the resources preferences defined in the preference store param editor Table The editor table containing the defined editors return true if the resources are read succesfully private boolean read Resources Map editor Table Get the workbench plugin s working directory Workbench Plugin workbench Plugin Workbench Plugin get Default I Path workbench State Path workbench Plugin get State Location I Preference Store store Workbench Plugin get Default get Preference Store Reader reader null try Get the resource types String xml String store get String I Preference Constants RESOURCES if xml String null xml String length 0 File Input Stream stream new File Input Stream workbench State Path append I Workbench Constants RESOURCE TYPE FILE NAME toOS String reader new Buffered Reader new Input Stream Reader stream utf 8 NON NLS 1 else reader new String Reader xml String Read the defined resources into the table read Resources editor Table reader catch IO Exception e try if reader null reader close catch IO Exception ex ex print Stack Trace Message Dialog open Error Shell null Workbench Messages get String Editor Registry error Title NON NLS 1 Workbench Messages get String Editor Registry error Message NON NLS 1 return false catch Workbench Exception e Error Dialog open Error Shell null Workbench Messages get String Editor Registry error Title NON NLS 1 Workbench Messages get String Editor Registry error Message NON NLS 1 e get Status return false return true  editorTable readResources editorTable WorkbenchPlugin workbenchPlugin WorkbenchPlugin getDefault IPath workbenchStatePath workbenchPlugin getStateLocation IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore xmlString getString IPreferenceConstants xmlString xmlString FileInputStream FileInputStream workbenchStatePath IWorkbenchConstants RESOURCE_TYPE_FILE_NAME toOSString BufferedReader InputStreamReader StringReader xmlString readResources editorTable IOException IOException printStackTrace MessageDialog openError WorkbenchMessages getString EditorRegistry errorTitle WorkbenchMessages getString EditorRegistry errorMessage WorkbenchException ErrorDialog openError WorkbenchMessages getString EditorRegistry errorTitle WorkbenchMessages getString EditorRegistry errorMessage getStatus
Load the serialized resource associations Return true if the operation was successful false otherwise private boolean load Associations Map editor Table new Hash Map if read Editors editor Table return false return read Resources editor Table  loadAssociations editorTable HashMap readEditors editorTable readResources editorTable
private String mapping Key For String type keep everyting lower case for case sensitive platforms return type to Lower Case  mappingKeyFor toLowerCase
Return a key that combines the file s name and extension of the given mapping private String mapping Key For File Editor Mapping mapping return mapping Key For mapping get Name mapping get Extension length 0 mapping get Extension NON NLS 1 NON NLS 2  mappingKeyFor FileEditorMapping mappingKeyFor getName getExtension getExtension
Rebuild the editor map private void rebuild Editor Map rebuild Internal Editor Map add External Editors To Editor Map  rebuildEditorMap rebuildInternalEditorMap addExternalEditorsToEditorMap
Rebuild the internal editor mapping private void rebuild Internal Editor Map Iterator enum null I Editor Descriptor desc null Allocate a new map mapI Dto Editor initial Id To Editor Map mapI Dto Editor size Add plugin editors enum sorted Editors From Plugins iterator while enum has Next desc I Editor Descriptor enum next mapI Dto Editor put desc get Id desc  rebuildInternalEditorMap IEditorDescriptor mapIDtoEditor initialIdToEditorMap mapIDtoEditor sortedEditorsFromPlugins hasNext IEditorDescriptor mapIDtoEditor getId
non Javadoc Method declared on I Editor Registry public void remove Property Listener I Property Listener l prop Change Listeners remove l  IEditorRegistry removePropertyListener IPropertyListener propChangeListeners
Save the registry to the filesystem by serializing the current resource associations public void save Associations Save the resource type descriptions List editors new Array List I Preference Store store Workbench Plugin get Default get Preference Store XML Memento memento XML Memento create Write Root I Workbench Constants TAG EDITORS File Editor Mapping maps type Editor Mappings user Mappings for int maps Index 0 maps Index maps length maps Index File Editor Mapping type maps maps Index I Memento editor Memento memento create Child I Workbench Constants TAG INFO editor Memento put String I Workbench Constants TAG NAME type get Name editor Memento put String I Workbench Constants TAG EXTENSION type get Extension I Editor Descriptor editor Array type get Editors for int i 0 i editor Array length i Editor Descriptor editor Editor Descriptor editor Array i if editors contains editor editors add editor I Memento id Memento editor Memento create Child I Workbench Constants TAG EDITOR id Memento put String I Workbench Constants TAG ID editor Array i get Id editor Array type get Deleted Editors for int i 0 i editor Array length i Editor Descriptor editor Editor Descriptor editor Array i if editors contains editor editors add editor I Memento id Memento editor Memento create Child I Workbench Constants TAG DELETED EDITOR id Memento put String I Workbench Constants TAG ID editor Array i get Id Writer writer null try writer new String Writer memento save writer writer close store set Value I Preference Constants RESOURCES writer to String catch IO Exception e try if writer null writer close catch IO Exception ex ex print Stack Trace Message Dialog open Error Shell null Saving Problems NON NLS 1 Unable to save resource associations NON NLS 1 return memento XML Memento create Write Root I Workbench Constants TAG EDITORS Iterator enum editors iterator while enum has Next Editor Descriptor editor Editor Descriptor enum next I Memento editor Memento memento create Child I Workbench Constants TAG DESCRIPTOR editor save Values editor Memento writer null try writer new String Writer memento save writer writer close store set Value I Preference Constants EDITORS writer to String catch IO Exception e try if writer null writer close catch IO Exception ex ex print Stack Trace Message Dialog open Error Shell null Error Unable to save resource associations NON NLS 1 NON NLS 2 return  saveAssociations ArrayList IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore XMLMemento XMLMemento createWriteRoot IWorkbenchConstants TAG_EDITORS FileEditorMapping typeEditorMappings userMappings mapsIndex mapsIndex mapsIndex FileEditorMapping mapsIndex IMemento editorMemento createChild IWorkbenchConstants TAG_INFO editorMemento putString IWorkbenchConstants TAG_NAME getName editorMemento putString IWorkbenchConstants TAG_EXTENSION getExtension IEditorDescriptor editorArray getEditors editorArray EditorDescriptor EditorDescriptor editorArray IMemento idMemento editorMemento createChild IWorkbenchConstants TAG_EDITOR idMemento putString IWorkbenchConstants TAG_ID editorArray getId editorArray getDeletedEditors editorArray EditorDescriptor EditorDescriptor editorArray IMemento idMemento editorMemento createChild IWorkbenchConstants TAG_DELETED_EDITOR idMemento putString IWorkbenchConstants TAG_ID editorArray getId StringWriter setValue IPreferenceConstants toString IOException IOException printStackTrace MessageDialog openError XMLMemento createWriteRoot IWorkbenchConstants TAG_EDITORS hasNext EditorDescriptor EditorDescriptor IMemento editorMemento createChild IWorkbenchConstants TAG_DESCRIPTOR saveValues editorMemento StringWriter setValue IPreferenceConstants toString IOException IOException printStackTrace MessageDialog openError
Set the collection of File Editor Mappings The given collection is converted into the internal hash table for faster lookup Each mapping goes from an extension to the collection of editors that work on it public void set File Editor Mappings File Editor Mapping new Resource Types type Editor Mappings new Editor Map for int i 0 i new Resource Types length i File Editor Mapping mapping new Resource Types i type Editor Mappings put mapping Key For mapping mapping extension Images new Hash Map rebuild Editor Map fire Property Change PROP CONTENTS  FileEditorMappings setFileEditorMappings FileEditorMapping newResourceTypes typeEditorMappings EditorMap newResourceTypes FileEditorMapping newResourceTypes typeEditorMappings mappingKeyFor extensionImages HashMap rebuildEditorMap firePropertyChange PROP_CONTENTS
public void set Default Editor String file Name String editor Id Editor Descriptor desc Editor Descriptor find Editor editor Id File Editor Mapping mapping get Mapping For Filename file Name if mapping 0 null mapping 0 set Default Editor desc if mapping 1 null mapping 1 set Default Editor desc  setDefaultEditor fileName editorId EditorDescriptor EditorDescriptor findEditor editorId FileEditorMapping getMappingForFilename fileName setDefaultEditor setDefaultEditor
Alphabetically sort the internal editors private Object sort Editors List unsorted List Object array new Object unsorted List size unsorted List to Array array Collections sort Arrays as List array comparer return array  sortEditors unsortedList unsortedList unsortedList toArray asList
Alphabetically sort the internal editors private void sort Internal Editors Object array sort Editors sorted Editors From Plugins sorted Editors From Plugins new Array List for int i 0 i array length i sorted Editors From Plugins add array i  sortInternalEditors sortEditors sortedEditorsFromPlugins sortedEditorsFromPlugins ArrayList sortedEditorsFromPlugins
Hash Map map new Hash Map public void put Default String key File Editor Mapping value default Map put key value  HashMap HashMap putDefault FileEditorMapping defaultMap
public void put String key File Editor Mapping value Object result default Map get key if value equals result map remove key else map put key value  FileEditorMapping defaultMap
public File Editor Mapping get String key Object result map get key if result null result default Map get key return File Editor Mapping result  FileEditorMapping defaultMap FileEditorMapping
public File Editor Mapping all Mappings Hash Map merge Hash Map default Map clone merge put All map Collection values merge values File Editor Mapping result new File Editor Mapping values size return File Editor Mapping values to Array result  FileEditorMapping allMappings HashMap HashMap defaultMap putAll FileEditorMapping FileEditorMapping FileEditorMapping toArray
public File Editor Mapping user Mappings Collection values map values File Editor Mapping result new File Editor Mapping values size return File Editor Mapping values to Array result  FileEditorMapping userMappings FileEditorMapping FileEditorMapping FileEditorMapping toArray
see org eclipse ui I Editor Registry is System In Place Editor Available String public boolean is System In Place Editor Available String filename return Component Support in Place Editor Available filename  IEditorRegistry isSystemInPlaceEditorAvailable isSystemInPlaceEditorAvailable ComponentSupport inPlaceEditorAvailable
public boolean is System External Editor Available String filename int n Dot filename last Index Of if n Dot 0 String str Name filename substring n Dot return Program find Program str Name null return false  isSystemExternalEditorAvailable nDot lastIndexOf nDot strName nDot findProgram strName
public Image Descriptor get System External Editor Image Descriptor String filename Program external Program null int extension Index filename last Index Of if extension Index 0 external Program Program find Program filename substring extension Index if external Program null return null else return new External Program Image Descriptor external Program  ImageDescriptor getSystemExternalEditorImageDescriptor externalProgram extensionIndex lastIndexOf extensionIndex externalProgram findProgram extensionIndex externalProgram ExternalProgramImageDescriptor externalProgram
for dynamic UI public void remove String id I Editor Descriptor desc find Editor id if id null return sorted Editors From Plugins remove desc mapI Dto Editor remove id remove Editor From Mapping type Editor Mappings default Map id remove Editor From Mapping type Editor Mappings map id  IEditorDescriptor findEditor sortedEditorsFromPlugins mapIDtoEditor removeEditorFromMapping typeEditorMappings defaultMap removeEditorFromMapping typeEditorMappings
for dynamic UI private void remove Editor From Mapping Hash Map map String id Iterator iter map values iterator File Editor Mapping mapping I Editor Descriptor editors while iter has Next mapping File Editor Mapping iter next editors mapping get Editors for int i 0 i editors length i if editors i get Id equals id mapping remove Editor Editor Descriptor editors i break if editors length 0 map remove mapping break  removeEditorFromMapping HashMap FileEditorMapping IEditorDescriptor hasNext FileEditorMapping getEditors getId removeEditor EditorDescriptor

private Editor Registry editor Registry Get the editors that are defined in the registry and add them to the Resource Editor Registry The read All flag indicates if we should read non modified plugins Warning The registry must be passed in because this method is called during the process of setting up the registry and at this time it has not been safely setup with the plugin protected void add Editors boolean read All Editor Registry registry I Extension Registry extension Registry Platform get Extension Registry this editor Registry registry read Registry extension Registry PlatformUI PLUGIN ID I Workbench Constants PL EDITOR  EditorRegistry editorRegistry ResourceEditorRegistry readAll addEditors readAll EditorRegistry IExtensionRegistry extensionRegistry getExtensionRegistry editorRegistry readRegistry extensionRegistry PLUGIN_ID IWorkbenchConstants PL_EDITOR
Implementation of the abstract method that processes one configuration element protected boolean read Element I Configuration Element element if element get Name equals TAG EDITOR return false Editor Descriptor editor new Editor Descriptor editor set Configuration Element element String id element get Attribute ATT ID if id null log Missing Attribute element ATT ID return true editor setID id I Extension extension element get Declaring Extension editor set Plugin Identifier extension get Namespace List extensions Vector new Array List List filenames Vector new Array List boolean default Editor false Get editor name required field String name element get Attribute ATT NAME if name null log Missing Attribute element ATT NAME return true editor set Name name Get editor icon required field for internal editors String icon element get Attribute ATT ICON if icon null if element get Attribute ATT CLASS null log Missing Attribute element ATT ICON return true if icon null String extending Plugin Id extension get Namespace editor set Image Descriptor AbstractUI Plugin image Descriptor From Plugin extending Plugin Id icon editor set Image Filename icon Get target extensions optional field String extensions String element get Attribute ATT EXTENSIONS if extensions String null String Tokenizer tokenizer new String Tokenizer extensions String NON NLS 1 while tokenizer has More Tokens extensions Vector add tokenizer next Token trim String filenames String element get Attribute ATT FILENAMES if filenames String null String Tokenizer tokenizer new String Tokenizer filenames String NON NLS 1 while tokenizer has More Tokens filenames Vector add tokenizer next Token trim Get launcher class or command String launcher element get Attribute ATT LAUNCHER String command element get Attribute ATT COMMAND if launcher null open using a launcer editor set Launcher launcher editor set Open Mode Editor Descriptor OPEN EXTERNAL else if command null open using an external editor editor set File Name command editor set Open Mode Editor Descriptor OPEN EXTERNAL if icon null editor set Image Descriptor Workbench Images get Image Descriptor From Program command 0 else open using an internal editor String class Name element get Attribute ATT CLASS editor set Class Name class Name editor set Open Mode Editor Descriptor OPEN INTERNAL Is this the default editor String def element get Attribute ATT DEFAULT if def null default Editor def equals Ignore Case P TRUE Add the editor to the manager editor Registry add Editor From Plugin editor extensions Vector filenames Vector default Editor return true  readElement IConfigurationElement getName TAG_EDITOR EditorDescriptor EditorDescriptor setConfigurationElement getAttribute ATT_ID logMissingAttribute ATT_ID IExtension getDeclaringExtension setPluginIdentifier getNamespace extensionsVector ArrayList filenamesVector ArrayList defaultEditor getAttribute ATT_NAME logMissingAttribute ATT_NAME setName getAttribute ATT_ICON getAttribute ATT_CLASS logMissingAttribute ATT_ICON extendingPluginId getNamespace setImageDescriptor AbstractUIPlugin imageDescriptorFromPlugin extendingPluginId setImageFilename extensionsString getAttribute ATT_EXTENSIONS extensionsString StringTokenizer StringTokenizer extensionsString hasMoreTokens extensionsVector nextToken filenamesString getAttribute ATT_FILENAMES filenamesString StringTokenizer StringTokenizer filenamesString hasMoreTokens filenamesVector nextToken getAttribute ATT_LAUNCHER getAttribute ATT_COMMAND setLauncher setOpenMode EditorDescriptor OPEN_EXTERNAL setFileName setOpenMode EditorDescriptor OPEN_EXTERNAL setImageDescriptor WorkbenchImages getImageDescriptorFromProgram className getAttribute ATT_CLASS setClassName className setOpenMode EditorDescriptor OPEN_INTERNAL getAttribute ATT_DEFAULT defaultEditor equalsIgnoreCase P_TRUE editorRegistry addEditorFromPlugin extensionsVector filenamesVector defaultEditor
for dynamic UI public void read Element Editor Registry editor Registry I Configuration Element element this editor Registry editor Registry read Element element  readElement EditorRegistry editorRegistry IConfigurationElement editorRegistry editorRegistry readElement

private List deleted Editors new Array List 1 Create an instance of this class param extension java lang String param mime Type java lang String public File Editor Mapping String extension this extension NON NLS 1  deletedEditors ArrayList mimeType FileEditorMapping
Create an instance of this class param name java lang String param extension java lang String public File Editor Mapping String name String extension super if name null name length 1 set Name NON NLS 1 else set Name name if extension null set Extension NON NLS 1 else set Extension extension  FileEditorMapping setName setName setExtension setExtension
Add the given editor to the list of editors registered public void add Editor Editor Descriptor editor editors add editor deleted Editors remove editor  addEditor EditorDescriptor deletedEditors
Clone the receiver public Object clone try File Editor Mapping clone File Editor Mapping super clone clone editors List Array List editors clone return clone catch Clone Not Supported Exception e return null  FileEditorMapping FileEditorMapping ArrayList CloneNotSupportedException
see java lang Object equals Object obj public boolean equals Object obj if this obj return true if obj instanceof File Editor Mapping return false File Editor Mapping mapping File Editor Mapping obj if this name equals mapping name return false if this extension equals mapping extension return false if compare List this editors mapping editors return false return compare List this deleted Editors mapping deleted Editors  FileEditorMapping FileEditorMapping FileEditorMapping compareList compareList deletedEditors deletedEditors
Compare the editor ids from both lists and return true if they are equals private boolean compare List List l1 List l2 if l1 size l2 size return false Iterator i1 l1 iterator Iterator i2 l2 iterator while i1 has Next i2 has Next Object o1 i1 next Object o2 i2 next if o1 null o2 null o1 equals o2 return false return true  compareList hasNext hasNext
public I Editor Descriptor get Default Editor if editors size 0 return null else return I Editor Descriptor editors get 0  IEditorDescriptor getDefaultEditor IEditorDescriptor
Method declared on I File Editor Mapping public I Editor Descriptor get Editors return I Editor Descriptor editors to Array new I Editor Descriptor editors size  IFileEditorMapping IEditorDescriptor getEditors IEditorDescriptor toArray IEditorDescriptor
public I Editor Descriptor get Deleted Editors I Editor Descriptor array new I Editor Descriptor deleted Editors size deleted Editors to Array array return array  IEditorDescriptor getDeletedEditors IEditorDescriptor IEditorDescriptor deletedEditors deletedEditors toArray
Method declared on I File Editor Mapping public String get Extension return extension  IFileEditorMapping getExtension
public Image Descriptor get Image Descriptor I Editor Descriptor editor get Default Editor if editor null return Workbench Images get Image Descriptor I Shared Images IMG OBJ FILE else return editor get Image Descriptor  ImageDescriptor getImageDescriptor IEditorDescriptor getDefaultEditor WorkbenchImages getImageDescriptor ISharedImages IMG_OBJ_FILE getImageDescriptor
Method declared on I File Editor Mapping public String get Label return name extension length 0 extension NON NLS 1 NON NLS 2  IFileEditorMapping getLabel
Method declared on I File Editor Mapping public String get Name return name  IFileEditorMapping getName
Remove the given editor from the set of editors registered public void remove Editor Editor Descriptor editor editors remove editor deleted Editors add editor  removeEditor EditorDescriptor deletedEditors
Set the default editor registered for file type described by this mapping public void set Default Editor Editor Descriptor editor editors remove editor editors add 0 editor  setDefaultEditor EditorDescriptor
Set the collection of all editors Editor Descriptor registered for the file type described by this mapping Typically an editor is registered either through a plugin or explicitly by the user modifying the associations in the preference pages This modifies the internal list to share the passed list hence the clear indication of list in the method name public void set Editors List List new Editors editors new Editors  EditorDescriptor setEditorsList newEditors newEditors
Set the collection of all editors Editor Descriptor formally registered for the file type described by this mapping which have been deleted by the user This modifies the internal list to share the passed list hence the clear indication of list in the method name public void set Deleted Editors List List new Deleted Editors deleted Editors new Deleted Editors  EditorDescriptor setDeletedEditorsList newDeletedEditors deletedEditors newDeletedEditors
Set the file s extension public void set Extension String extension this extension extension  setExtension
Set the file s name public void set Name String name this name name  setName

public interface I Action Set Disposes of this action set p Implementation should remove any references to the window and action bars created in the code init code p p Issue Should this say should remove anything they contributed in code init code Or is most of the withdrawal done automatically p  IActionSet
public void dispose Initializes this action set which is expected to add it actions as required to the given workbench window and action bars param window the workbench window param bars the action bars 

public interface I Action Set Descriptor Creates a new action set from this descriptor p Issue Consider throwing Workbench Exception rather than Core Exception p return the new action set exception Core Exception if the action set cannot be created  IActionSetDescriptor WorkbenchException CoreException CoreException
public I Action Set create Action Set throws Core Exception Returns the category id of this action set return a non empty category id or cod null code if none specified  IActionSet createActionSet CoreException
public String get Category Returns the description of this action set This is the value of its code description code attribute return the description  getCategory
public String get Description Returns the id of this action set This is the value of its code id code attribute return the action set id  getDescription
public String get Id Returns the label of this action set This is the value of its code label code attribute return the label  getId
public String get Label Returns whether this action set is initially visible public boolean is Initially Visible  getLabel isInitiallyVisible
public boolean is Initially Visible Sets the category of this action set param cat a non empty category id  isInitiallyVisible
Sets whether this action set is initially visible since 3 0 

Return the id of the view to be made sticky return the id of the view to be made sticky 
Return the namespace in which this descriptor was declared return the namespace in which this descriptor was declared 
Return the location of this sticky view Must be one of code I Page Layout LEFT code code I Page Layout RIGHT code code I Page Layout TOP code or code I Page Layout BOTTOM code return the location  IPageLayout IPageLayout IPageLayout IPageLayout
Return whether this view should be closeable return whether this view should be closeeable 
Return whether this view should be moveable return whether thsi view should be moveable 

public interface I View Descriptor extends I Workbench Part Descriptor Creates an instance of the view defined in the descriptor public I View Part create View throws Core Exception  IViewDescriptor IWorkbenchPartDescriptor IViewPart createView CoreException
public I View Part create View throws Core Exception Returns an array of strings that represent view s category path This array will be used for hierarchical presentation of the view in places like submenus return array of category tokens or null if not specified  IViewPart createView CoreException
public String get Category Path Returns the configuration element which contributed this view public I Configuration Element get Configuration Element  getCategoryPath IConfigurationElement getConfigurationElement
public I Configuration Element get Configuration Element Returns the description of this view This is the value of its code description code attribute return the description  IConfigurationElement getConfigurationElement
public String get Description Returns the id of the view public String getID  getDescription
public String getID Returns the descriptor for the icon to show for this view public Image Descriptor get Image Descriptor  ImageDescriptor getImageDescriptor
public Image Descriptor get Image Descriptor Returns the label to show for this view public String get Label  ImageDescriptor getImageDescriptor getLabel
public String get Label Returns the text of the accelerator to use for this view public String get Accelerator  getLabel getAccelerator
Returns the default fast view width ratio for this view since 2 0 
Returns whether this view allows multiple instances since 3 0 

public interface I View Registry Return a view descriptor with the given extension ID If no view exists with the ID return null  IViewRegistry
public I View Descriptor find String id Returns an enumeration of view categories if defined public Category get Categories  IViewDescriptor getCategories
public Category get Categories Return the view category count public int get Category Count  getCategories getCategoryCount
public int get Category Count Return the view count public int get View Count  getCategoryCount getViewCount
public int get View Count Return a list of views defined in the registry public I View Descriptor get Views  getViewCount IViewDescriptor getViews
public I View Descriptor get Views Return a list of sticky views defined in the registry public I Sticky View Descriptor get Sticky Views  IViewDescriptor getViews IStickyViewDescriptor getStickyViews

private String path public Category Node Category cat category cat path NON NLS 1 String category Path category get Parent Path if category Path null for int nX 0 nX category Path length nX path category Path nX NON NLS 1 path cat get Id  CategoryNode categoryPath getParentPath categoryPath categoryPath categoryPath getId
path cat get Id public String get Path return path  getId getPath
return path public Category get Category return category  getCategory
public int compare Object arg0 Object arg1 String s1 Category Node arg0 get Path String s2 Category Node arg1 get Path return collator compare s1 s2  CategoryNode getPath CategoryNode getPath
Constructs a new reader All wizards are read including projects public New Wizards Registry Reader this false  NewWizardsRegistryReader
Constructs a new reader param projects Only if true only projects are read public New Wizards Registry Reader boolean projects Only super I Workbench Constants PL NEW this projects Only projects Only  projectsOnly NewWizardsRegistryReader projectsOnly IWorkbenchConstants PL_NEW projectsOnly projectsOnly
p protected void add New Element To Result Workbench Wizard Element element I Configuration Element config defer Wizard element  addNewElementToResult WorkbenchWizardElement IConfigurationElement deferWizard
Create and answer a new Wizard Collection Element configured as a child of code parent code return org eclipse ui internal model Wizard Collection Element param parent org eclipse ui internal model Wizard Collection Element param id the id of the new collection param plugin Id the originating plugin id of the collection if any code null code otherwise param label java lang String protected Wizard Collection Element create Collection Element Wizard Collection Element parent String id String plugin Id String label Wizard Collection Element new Element new Wizard Collection Element id plugin Id label parent parent add new Element return new Element  WizardCollectionElement WizardCollectionElement WizardCollectionElement pluginId WizardCollectionElement createCollectionElement WizardCollectionElement pluginId WizardCollectionElement newElement WizardCollectionElement pluginId newElement newElement
Creates empty element collection Overrider to fill initial elements if needed protected void create Empty Wizard Collection wizard Elements new Wizard Collection Element root null root null NON NLS 2 NON NLS 1  createEmptyWizardCollection wizardElements WizardCollectionElement
Returns a new Workbench Wizard Element configured according to the parameters contained in the passed Registry May answer null if there was not enough information in the Extension to create an adequate wizard protected Workbench Wizard Element create Wizard Element I Configuration Element element if projects Only String flag element get Attribute ATT PROJECT if flag null flag equals Ignore Case STR TRUE return null return super create Wizard Element element  WorkbenchWizardElement WorkbenchWizardElement createWizardElement IConfigurationElement projectsOnly getAttribute ATT_PROJECT equalsIgnoreCase STR_TRUE createWizardElement
Stores a category element for deferred addition private void defer Category I Configuration Element config Create category Category category null try category new Category config catch Core Exception e Workbench Plugin log Cannot create category e get Status NON NLS 1 return Defer for later processing if defer Categories null defer Categories new Array List 20 defer Categories add category  deferCategory IConfigurationElement CoreException WorkbenchPlugin getStatus deferCategories deferCategories ArrayList deferCategories
Stores a wizard element for deferred addition private void defer Wizard Workbench Wizard Element element if defer Wizards null defer Wizards new Array List 50 defer Wizards add element  deferWizard WorkbenchWizardElement deferWizards deferWizards ArrayList deferWizards
Finishes the addition of categories The categories are sorted and added in a root to depth traversal private void finish Categories If no categories just return if defer Categories null return Sort categories by flattened name Category Node flat Array new Category Node defer Categories size for int i 0 i defer Categories size i flat Array i new Category Node Category defer Categories get i Collections sort Arrays as List flat Array comparer Add each category for int nX 0 nX flat Array length nX Category cat flat Array nX get Category finish Category cat Cleanup defer Categories null  finishCategories deferCategories CategoryNode flatArray CategoryNode deferCategories deferCategories flatArray CategoryNode deferCategories asList flatArray flatArray flatArray getCategory finishCategory deferCategories
Save new category definition private void finish Category Category category String category Path category get Parent Path Wizard Collection Element parent wizard Elements ie root Traverse down into parent category if category Path null for int i 0 i category Path length i Wizard Collection Element temp Element get Child WithID parent category Path i if temp Element null The parent category is invalid By returning here the category will be dropped and any wizard within the category will be added to the Other category return else parent temp Element If another category already exists with the same id ignore this one Object test get Child WithID parent category get Id if test null return if parent null create Collection Element parent category get Id category get Plugin Id category get Label  finishCategory categoryPath getParentPath WizardCollectionElement wizardElements categoryPath categoryPath WizardCollectionElement tempElement getChildWithID categoryPath tempElement tempElement getChildWithID getId createCollectionElement getId getPluginId getLabel
Finishes the recognition of primary wizards private void finish Primary if defer Primary null Array List primary new Array List for Iterator i defer Primary iterator i has Next String id String i next Workbench Wizard Element element get Wizard Elements find Wizard id true if element null primary add element primary Wizards Workbench Wizard Element primary to Array new Workbench Wizard Element primary size defer Primary null  finishPrimary deferPrimary ArrayList ArrayList deferPrimary hasNext WorkbenchWizardElement getWizardElements findWizard primaryWizards WorkbenchWizardElement toArray WorkbenchWizardElement deferPrimary
Insert the passed wizard element into the wizard collection appropriately based upon its defining extension s CATEGORY tag value param element Workbench Wizard Element param extension param current Result Wizard Collection Element private void finish Wizard Workbench Wizard Element element I Configuration Element config String Tokenizer family Tokenizer new String Tokenizer get Category String For config CATEGORY SEPARATOR use the period separated sections of the current Wizard s category to traverse through the Named Solution tree that was previously created Wizard Collection Element current Collection Element wizard Elements ie root boolean move To Other false while family Tokenizer has More Elements Wizard Collection Element temp Collection Element get Child WithID current Collection Element family Tokenizer next Token if temp Collection Element null can t find the path bump it to uncategorized move To Other true break else current Collection Element temp Collection Element if move To Other move Element To Uncategorized Category wizard Elements element else current Collection Element add element  WorkbenchWizardElement currentResult WizardCollectionElement finishWizard WorkbenchWizardElement IConfigurationElement StringTokenizer familyTokenizer StringTokenizer getCategoryStringFor CATEGORY_SEPARATOR NamedSolution WizardCollectionElement currentCollectionElement wizardElements moveToOther familyTokenizer hasMoreElements WizardCollectionElement tempCollectionElement getChildWithID currentCollectionElement familyTokenizer nextToken tempCollectionElement moveToOther currentCollectionElement tempCollectionElement moveToOther moveElementToUncategorizedCategory wizardElements currentCollectionElement
Finishes the addition of wizards The wizards are processed and categorized private void finish Wizards if defer Wizards null Iterator iter defer Wizards iterator while iter has Next Workbench Wizard Element wizard Workbench Wizard Element iter next I Configuration Element config wizard get Configuration Element finish Wizard wizard config defer Wizards null  finishWizards deferWizards deferWizards hasNext WorkbenchWizardElement WorkbenchWizardElement IConfigurationElement getConfigurationElement finishWizard deferWizards
Return the appropriate category tree location for this Wizard If a category is not specified then return a default one protected String get Category String For I Configuration Element config String result config get Attribute ATT CATEGORY if result null result UNCATEGORIZED WIZARD CATEGORY return result  getCategoryStringFor IConfigurationElement getAttribute ATT_CATEGORY UNCATEGORIZED_WIZARD_CATEGORY
Go through the children of the passed parent and answer the child with the passed name If no such child is found then return null return org eclipse ui internal model Wizard Collection Element param parent org eclipse ui internal model Wizard Collection Element param child Name java lang String protected Wizard Collection Element get Child WithID Wizard Collection Element parent String id Object children parent get Children null for int i 0 i children length i Wizard Collection Element current Child Wizard Collection Element children i if current Child get Id equals id return current Child return null  WizardCollectionElement WizardCollectionElement childName WizardCollectionElement getChildWithID WizardCollectionElement getChildren WizardCollectionElement currentChild WizardCollectionElement currentChild getId currentChild
Moves given element to Other category previously creating one if missing protected void move Element To Uncategorized Category Wizard Collection Element root Workbench Wizard Element element Wizard Collection Element other Category get Child WithID root UNCATEGORIZED WIZARD CATEGORY if other Category null other Category create Collection Element root UNCATEGORIZED WIZARD CATEGORY null UNCATEGORIZED WIZARD CATEGORY LABEL other Category add element  moveElementToUncategorizedCategory WizardCollectionElement WorkbenchWizardElement WizardCollectionElement otherCategory getChildWithID UNCATEGORIZED_WIZARD_CATEGORY otherCategory otherCategory createCollectionElement UNCATEGORIZED_WIZARD_CATEGORY UNCATEGORIZED_WIZARD_CATEGORY_LABEL otherCategory
Removes the empty categories from a wizard collection private void prune Empty Categories Wizard Collection Element parent Object children parent get Children null for int nX 0 nX children length nX Wizard Collection Element child Wizard Collection Element children nX prune Empty Categories child boolean should Prune projects Only child get Id equals FULL EXAMPLES WIZARD CATEGORY if child is Empty should Prune parent remove child  pruneEmptyCategories WizardCollectionElement getChildren WizardCollectionElement WizardCollectionElement pruneEmptyCategories shouldPrune projectsOnly getId FULL_EXAMPLES_WIZARD_CATEGORY isEmpty shouldPrune
Implement this method to read element attributes public boolean read Element I Configuration Element element if element get Name equals TAG CATEGORY defer Category element return true else if element get Name equals TAG PRIMARYWIZARD if defer Primary null defer Primary new Array List 50 defer Primary add element get Attribute ATT ID return true else return super read Element element  readElement IConfigurationElement getName TAG_CATEGORY deferCategory getName TAG_PRIMARYWIZARD deferPrimary deferPrimary ArrayList deferPrimary getAttribute ATT_ID readElement
Reads the wizards in a registry p This implementation uses a defering strategy All of the elements categories wizards are read The categories are created as the read occurs The wizards are just stored for later addition after the read completes This ensures that wizard categorization is performed after all categories have been read p protected void read Wizards super read Wizards finish Categories finish Wizards finish Primary if wizard Elements null prune Empty Categories wizard Elements  readWizards readWizards finishCategories finishWizards finishPrimary wizardElements pruneEmptyCategories wizardElements
Returns the list of wizards that are considered primary The return value for this method is cached since computing its value requires non trivial work public Workbench Wizard Element get Primary Wizards if are Wizards Read read Wizards return primary Wizards  WorkbenchWizardElement getPrimaryWizards areWizardsRead readWizards primaryWizards
Returns whether the wizards have been read already protected boolean are Wizards Read return wizard Elements null  areWizardsRead wizardElements
Returns a list of wizards project and not The return value for this method is cached since computing its value requires non trivial work public Wizard Collection Element get Wizard Elements if are Wizards Read read Wizards return wizard Elements  WizardCollectionElement getWizardElements areWizardsRead readWizards wizardElements
protected Object get Wizard Collection Elements if are Wizards Read read Wizards return wizard Elements get Children  getWizardCollectionElements areWizardsRead readWizards wizardElements getChildren
protected boolean initialize Wizard Workbench Wizard Element element I Configuration Element config boolean result super initialize Wizard element config if result return result element set Help Href config get Attribute ATT HELP HREF String desc Image config get Attribute ATT DESCRIPTION IMAGE if desc Image null I Extension extension config get Declaring Extension String extending Plugin Id extension get Namespace Image Descriptor image AbstractUI Plugin image Descriptor From Plugin extending Plugin Id desc Image element set Description Image image return result  initializeWizard WorkbenchWizardElement IConfigurationElement initializeWizard setHelpHref getAttribute ATT_HELP_HREF descImage getAttribute ATT_DESCRIPTION_IMAGE descImage IExtension getDeclaringExtension extendingPluginId getNamespace ImageDescriptor AbstractUIPlugin imageDescriptorFromPlugin extendingPluginId descImage setDescriptionImage

Create a new empty descriptor public Perspective Descriptor String id String label Perspective Descriptor original Descriptor super this id id this label label if original Descriptor null this original Id original Descriptor get Original Id this image original Descriptor image  PerspectiveDescriptor PerspectiveDescriptor originalDescriptor originalDescriptor originalId originalDescriptor getOriginalId originalDescriptor
Create a descriptor from a config element public Perspective Descriptor I Configuration Element config Element String desc throws Core Exception super this config Element config Element id config Element get Attribute ATT ID plugin Id config Element get Declaring Extension get Namespace label config Element get Attribute ATT NAME class Name config Element get Attribute ATT CLASS singleton config Element get Attribute As Is ATT SINGLETON null String str config Element get Attribute ATT FIXED if str null str equals Ignore Case true NON NLS 1 fixed true description desc Sanity check if label null class Name null throw new Core Exception new Status I Status ERROR Workbench Plugin PI WORKBENCH 0 Invalid extension missing label or class name id NON NLS 1 null Load icon String icon config Element get Attribute ATT ICON if icon null I Extension extension config Element get Declaring Extension String extending Plugin Id extension get Namespace image AbstractUI Plugin image Descriptor From Plugin extending Plugin Id icon  PerspectiveDescriptor IConfigurationElement configElement CoreException configElement configElement configElement getAttribute ATT_ID pluginId configElement getDeclaringExtension getNamespace configElement getAttribute ATT_NAME className configElement getAttribute ATT_CLASS configElement getAttributeAsIs ATT_SINGLETON configElement getAttribute ATT_FIXED equalsIgnoreCase className CoreException IStatus WorkbenchPlugin PI_WORKBENCH configElement getAttribute ATT_ICON IExtension configElement getDeclaringExtension extendingPluginId getNamespace AbstractUIPlugin imageDescriptorFromPlugin extendingPluginId
Creates a factory for a predefined perspective If the perspective is not predefined return null throws a Core Exception if the object could not be instantiated public I Perspective Factory create Factory throws Core Exception I Configuration Element element config Element if original Id null I Perspective Descriptor desc Perspective Registry Workbench Plugin get Default get Perspective Registry find Perspective With Id original Id if desc null element Perspective Descriptor desc config Element if element null return null else if class Name null element null return null Object obj Workbench Plugin create Extension element ATT CLASS return I Perspective Factory obj  CoreException IPerspectiveFactory createFactory CoreException IConfigurationElement configElement originalId IPerspectiveDescriptor PerspectiveRegistry WorkbenchPlugin getDefault getPerspectiveRegistry findPerspectiveWithId originalId PerspectiveDescriptor configElement className WorkbenchPlugin createExtension ATT_CLASS IPerspectiveFactory
Deletes the custom definition for a perspective public void delete Custom Definition Perspective Registry Workbench Plugin get Default get Perspective Registry delete Custom Definition this  deleteCustomDefinition PerspectiveRegistry WorkbenchPlugin getDefault getPerspectiveRegistry deleteCustomDefinition
Returns this perspective s description This is the value of its code description code attribute return the description public String get Description return description  getDescription
Returns whether or not this perspective is fixed public boolean get Fixed return fixed  getFixed
Returns the ID public String get Id return id  getId
Returns the descriptor of the image for this perspective return the descriptor of the image to display next to this perspective public Image Descriptor get Image Descriptor return image  ImageDescriptor getImageDescriptor
Returns the label public String get Label return label  getLabel
public String get Original Id if original Id null return id return original Id  getOriginalId originalId originalId
Returns true if this perspective has a custom file public boolean has Custom Definition return Perspective Registry Workbench Plugin get Default get Perspective Registry has Custom Definition this  hasCustomDefinition PerspectiveRegistry WorkbenchPlugin getDefault getPerspectiveRegistry hasCustomDefinition
Returns true if this perspective wants to be default public boolean has Default Flag if config Element null return false String str config Element get Attribute ATT DEFAULT if str null return false return str equals true NON NLS 1  hasDefaultFlag configElement configElement getAttribute ATT_DEFAULT
Returns true if this perspective is predefined by an extension public boolean is Predefined return class Name null  isPredefined className
Returns true if this perspective is a singleton public boolean is Singleton return singleton  isSingleton
see I Persistable public I Status restore State I Memento memento I Memento child Mem memento get Child I Workbench Constants TAG DESCRIPTOR if child Mem null id child Mem get String I Workbench Constants TAG ID original Id child Mem get String I Workbench Constants TAG DESCRIPTOR label child Mem get String I Workbench Constants TAG LABEL class Name child Mem get String I Workbench Constants TAG CLASS singleton child Mem get Integer I Workbench Constants TAG SINGLETON null Find a descriptor in the registry Perspective Descriptor descriptor Perspective Descriptor Workbench Plugin get Default get Perspective Registry find Perspective With Id get Original Id if descriptor null Copy the state from the registred descriptor image descriptor image return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1  IPersistable IStatus restoreState IMemento IMemento childMem getChild IWorkbenchConstants TAG_DESCRIPTOR childMem childMem getString IWorkbenchConstants TAG_ID originalId childMem getString IWorkbenchConstants TAG_DESCRIPTOR childMem getString IWorkbenchConstants TAG_LABEL className childMem getString IWorkbenchConstants TAG_CLASS childMem getInteger IWorkbenchConstants TAG_SINGLETON PerspectiveDescriptor PerspectiveDescriptor WorkbenchPlugin getDefault getPerspectiveRegistry findPerspectiveWithId getOriginalId IStatus PLUGIN_ID
Revert to the predefined extension template Does nothing if this descriptor is user defined public void revert To Predefined if is Predefined delete Custom Definition  revertToPredefined isPredefined deleteCustomDefinition
see I Persistable public I Status save State I Memento memento I Memento child Mem memento create Child I Workbench Constants TAG DESCRIPTOR child Mem put String I Workbench Constants TAG ID id if original Id null child Mem put String I Workbench Constants TAG DESCRIPTOR original Id child Mem put String I Workbench Constants TAG LABEL label child Mem put String I Workbench Constants TAG CLASS class Name if singleton child Mem put Integer I Workbench Constants TAG SINGLETON 1 return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1  IPersistable IStatus saveState IMemento IMemento childMem createChild IWorkbenchConstants TAG_DESCRIPTOR childMem putString IWorkbenchConstants TAG_ID originalId childMem putString IWorkbenchConstants TAG_DESCRIPTOR originalId childMem putString IWorkbenchConstants TAG_LABEL childMem putString IWorkbenchConstants TAG_CLASS className childMem putInteger IWorkbenchConstants TAG_SINGLETON IStatus PLUGIN_ID
return the configuration element used to create this perspective if one was used since 3 0 public I Configuration Element get Config Element return config Element  IConfigurationElement getConfigElement configElement
see org eclipse ui activities support I Plugin Contribution from Plugin public boolean from Plugin return plugin Id null  IPluginContribution fromPlugin fromPlugin pluginId
see org eclipse ui activities support I Plugin Contribution get Local Id public String get Local Id return id  IPluginContribution getLocalId getLocalId
see org eclipse ui activities support I Plugin Contribution get Plugin Id public String get Plugin Id return plugin Id  IPluginContribution getPluginId getPluginId pluginId

Perspective Extension Reader constructor public Perspective Extension Reader do nothing  PerspectiveExtensionReader PerspectiveExtensionReader
Read the view extensions within a registry public void extend Layout String id Page Layout out targetID id page Layout out read Registry Platform get Extension Registry PlatformUI PLUGIN ID I Workbench Constants PL PERSPECTIVE EXTENSIONS  extendLayout PageLayout pageLayout readRegistry getExtensionRegistry PLUGIN_ID IWorkbenchConstants PL_PERSPECTIVE_EXTENSIONS
Returns whether the given tag should be included private boolean include Tag String tag return include Only Tags null include Only Tags contains tag  includeTag includeOnlyTags includeOnlyTags
Process an action set private boolean process Action Set I Configuration Element element String id element get Attribute ATT ID if id null page Layout add Action Set id return true  processActionSet IConfigurationElement getAttribute ATT_ID pageLayout addActionSet
Process an extension Assumption Extension is for current perspective private boolean process Extension I Configuration Element element I Configuration Element children element get Children for int nX 0 nX children length nX I Configuration Element child children nX String type child get Name if include Tag type boolean result false if type equals TAG ACTION SET result process Action Set child else if type equals TAG VIEW result process View child else if type equals TAG VIEW SHORTCUT result process View Shortcut child else if type equals TAG WIZARD SHORTCUT result process Wizard Shortcut child else if type equals TAG PERSP SHORTCUT result process Perspective Shortcut child else if type equals TAG SHOW IN PART result process Show In Part child if result Workbench Plugin log Unable to process element NON NLS 1 type in perspective extension NON NLS 1 element get Declaring Extension get Unique Identifier return true  processExtension IConfigurationElement IConfigurationElement getChildren IConfigurationElement getName includeTag TAG_ACTION_SET processActionSet TAG_VIEW processView TAG_VIEW_SHORTCUT processViewShortcut TAG_WIZARD_SHORTCUT processWizardShortcut TAG_PERSP_SHORTCUT processPerspectiveShortcut TAG_SHOW_IN_PART processShowInPart WorkbenchPlugin getDeclaringExtension getUniqueIdentifier
Process a perspective shortcut private boolean process Perspective Shortcut I Configuration Element element String id element get Attribute ATT ID if id null page Layout add Perspective Shortcut id return true  processPerspectiveShortcut IConfigurationElement getAttribute ATT_ID pageLayout addPerspectiveShortcut
Process a show in element private boolean process Show In Part I Configuration Element element String id element get Attribute ATT ID if id null page Layout add Show In Part id return true  processShowInPart IConfigurationElement getAttribute ATT_ID pageLayout addShowInPart
process View I Configuration Element modified by dan rubel instantiations com Process a view private boolean process View I Configuration Element element Get id relative and relationship String id element get Attribute ATT ID String relative element get Attribute ATT RELATIVE String relationship element get Attribute ATT RELATIONSHIP String ratio String element get Attribute ATT RATIO boolean visible VAL FALSE equals element get Attribute ATT VISIBLE boolean closeable VAL FALSE equals element get Attribute ATT CLOSEABLE boolean moveable VAL FALSE equals element get Attribute ATT MOVEABLE boolean standalone VAL TRUE equals element get Attribute ATT STANDALONE boolean show Title VAL FALSE equals element get Attribute ATT SHOW TITLE float ratio if id null relative null relationship null return false Get the ratio if ratio String null The ratio has not been specified ratio I Page Layout NULL RATIO else try ratio new Float ratio String float Value catch Number Format Exception e return false If the ratio is outside the allowable range mark it as invalid if ratio I Page Layout RATIO MIN ratio I Page Layout RATIO MAX ratio I Page Layout INVALID RATIO Get relationship details boolean stack false boolean fast false int int Relation 0 if relationship equals VAL LEFT int Relation I Page Layout LEFT else if relationship equals VAL RIGHT int Relation I Page Layout RIGHT else if relationship equals VAL TOP int Relation I Page Layout TOP else if relationship equals VAL BOTTOM int Relation I Page Layout BOTTOM else if relationship equals VAL STACK stack true else if relationship equals VAL FAST fast true else return false If stack if stack if visible page Layout stack View id relative else page Layout stack Placeholder id relative return true If the view is a fast view if fast if ratio I Page Layout NULL RATIO The ratio has not been specified page Layout add Fast View id else page Layout add Fast View id ratio return true The view is a regular view If the ratio is not specified or is invalid use the default ratio if ratio I Page Layout NULL RATIO ratio I Page Layout INVALID RATIO ratio I Page Layout DEFAULT VIEW RATIO if visible if standalone page Layout add Standalone View id show Title int Relation ratio relative else page Layout add View id int Relation ratio relative else page Layout add Placeholder id int Relation ratio relative if closeable page Layout get View Layout id set Closeable false if moveable page Layout get View Layout id set Moveable false return true  processView IConfigurationElement dan_rubel processView IConfigurationElement getAttribute ATT_ID getAttribute ATT_RELATIVE getAttribute ATT_RELATIONSHIP ratioString getAttribute ATT_RATIO VAL_FALSE getAttribute ATT_VISIBLE VAL_FALSE getAttribute ATT_CLOSEABLE VAL_FALSE getAttribute ATT_MOVEABLE VAL_TRUE getAttribute ATT_STANDALONE showTitle VAL_FALSE getAttribute ATT_SHOW_TITLE ratioString IPageLayout NULL_RATIO ratioString floatValue NumberFormatException IPageLayout RATIO_MIN IPageLayout RATIO_MAX IPageLayout INVALID_RATIO intRelation VAL_LEFT intRelation IPageLayout VAL_RIGHT intRelation IPageLayout VAL_TOP intRelation IPageLayout VAL_BOTTOM intRelation IPageLayout VAL_STACK VAL_FAST pageLayout stackView pageLayout stackPlaceholder IPageLayout NULL_RATIO pageLayout addFastView pageLayout addFastView IPageLayout NULL_RATIO IPageLayout INVALID_RATIO IPageLayout DEFAULT_VIEW_RATIO pageLayout addStandaloneView showTitle intRelation pageLayout addView intRelation pageLayout addPlaceholder intRelation pageLayout getViewLayout setCloseable pageLayout getViewLayout setMoveable
Process a view shortcut private boolean process View Shortcut I Configuration Element element String id element get Attribute ATT ID if id null page Layout add Show View Shortcut id return true  processViewShortcut IConfigurationElement getAttribute ATT_ID pageLayout addShowViewShortcut
Process a wizard shortcut private boolean process Wizard Shortcut I Configuration Element element String id element get Attribute ATT ID if id null page Layout add New Wizard Shortcut id return true  processWizardShortcut IConfigurationElement getAttribute ATT_ID pageLayout addNewWizardShortcut
protected boolean read Element I Configuration Element element String type element get Name if type equals TAG EXTENSION String id element get Attribute ATT TARGET ID if targetID equals id return process Extension element return true return false  readElement IConfigurationElement getName TAG_EXTENSION getAttribute ATT_TARGET_ID processExtension
Sets the tags to include All others are ignored public void set Include Only Tags String tags include Only Tags new Hash Set for int i 0 i tags length i include Only Tags add tags i  setIncludeOnlyTags includeOnlyTags HashSet includeOnlyTags

store add Property Change Listener new I Property Change Listener public void property Change Property Change Event event To ensure the that no custom perspective definitions are deleted when preferences are imported merge old and new values if event get Property ends With PERSP A Perspective is being changed merge merge Perspectives event else if event get Property equals I Preference Constants PERSPECTIVES The list of perpsectives is being changed merge update Preference List I Preference Store event get Source  addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty endsWith mergePerspectives getProperty IPreferenceConstants updatePreferenceList IPreferenceStore getSource
private void merge Perspectives Property Change Event event I Preference Store store I Preference Store event get Source if event get New Value null Perpsective is being removed if the user has deleted or reverted a custom perspective let the change pass through Otherwise restore the custom perspective entry Find the matching descriptor in the registry I Perspective Descriptor perspective List get Perspectives for int i 0 i perspective List length i String id perspective List i get Id if event get Property starts With id found descriptor see if the perspective has been flagged for reverting or deleting if persp To Remove contains id restore store set Value id PERSP String event get Old Value else remove element from the list persp To Remove remove id else if event get Old Value null event get Old Value equals NON NLS 1 New perspective is being added update the perspective Registry to contain the new custom perspective String id event get Property substring 0 event get Property last Index Of PERSP if find Perspective With Id id null perspective does not already exist in registry add it Perspective Descriptor desc new Perspective Descriptor null null null String Reader reader new String Reader String event get New Value try XML Memento memento XML Memento create Read Root reader desc restore State memento add desc desc get Plugin Id catch Workbench Exception e unable To Load Perspective e get Status If necessary add to the list of perspectives update Preference List store  mergePerspectives PropertyChangeEvent IPreferenceStore IPreferenceStore getSource getNewValue IPerspectiveDescriptor perspectiveList getPerspectives perspectiveList perspectiveList getId getProperty startsWith perspToRemove setValue getOldValue perspToRemove getOldValue getOldValue perspectiveRegistry getProperty getProperty lastIndexOf findPerspectiveWithId PerspectiveDescriptor PerspectiveDescriptor StringReader StringReader getNewValue XMLMemento XMLMemento createReadRoot restoreState getPluginId WorkbenchException unableToLoadPerspective getStatus updatePreferenceList
to ensure the perspectives list stays consistent with the registry private void update Preference List I Preference Store store I Perspective Descriptor perspective List get Perspectives String Buffer persp Buffer new String Buffer for int i 0 i perspective List length i Perspective Descriptor desc Perspective Descriptor perspective List i if has Custom Definition desc persp Buffer append desc get Id append SPACE DELIMITER String new List persp Buffer to String trim store set Value I Preference Constants PERSPECTIVES new List  updatePreferenceList IPreferenceStore IPerspectiveDescriptor perspectiveList getPerspectives StringBuffer perspBuffer StringBuffer perspectiveList PerspectiveDescriptor PerspectiveDescriptor perspectiveList hasCustomDefinition perspBuffer getId SPACE_DELIMITER newList perspBuffer toString setValue IPreferenceConstants newList
Construct a new registry param root Folder is the root folder for perspective files public Perspective Registry super Workbench Plugin PI WORKBENCH I Workbench Constants PL PERSPECTIVES Platform get Extension Registry add Registry Change Listener this I Preference Store store Workbench Plugin get Default get Preference Store store add Property Change Listener new I Property Change Listener public void property Change Property Change Event event To ensure the that no custom perspective definitions are deleted when preferences are imported merge old and new values if event get Property ends With PERSP A Perspective is being changed merge merge Perspectives event else if event get Property equals I Preference Constants PERSPECTIVES The list of perpsectives is being changed merge update Preference List I Preference Store event get Source private void merge Perspectives Property Change Event event I Preference Store store I Preference Store event get Source if event get New Value null Perpsective is being removed if the user has deleted or reverted a custom perspective let the change pass through Otherwise restore the custom perspective entry Find the matching descriptor in the registry I Perspective Descriptor perspective List get Perspectives for int i 0 i perspective List length i String id perspective List i get Id if event get Property starts With id found descriptor see if the perspective has been flagged for reverting or deleting if persp To Remove contains id restore store set Value id PERSP String event get Old Value else remove element from the list persp To Remove remove id else if event get Old Value null event get Old Value equals NON NLS 1 New perspective is being added update the perspective Registry to contain the new custom perspective String id event get Property substring 0 event get Property last Index Of PERSP if find Perspective With Id id null perspective does not already exist in registry add it Perspective Descriptor desc new Perspective Descriptor null null null String Reader reader new String Reader String event get New Value try XML Memento memento XML Memento create Read Root reader desc restore State memento add desc desc get Plugin Id catch Workbench Exception e unable To Load Perspective e get Status If necessary add to the list of perspectives update Preference List store Update the list of perspectives from the registry This will be called for each perspective during an import preferences but is necessary to ensure the perspectives list stays consistent with the registry private void update Preference List I Preference Store store I Perspective Descriptor perspective List get Perspectives String Buffer persp Buffer new String Buffer for int i 0 i perspective List length i Perspective Descriptor desc Perspective Descriptor perspective List i if has Custom Definition desc persp Buffer append desc get Id append SPACE DELIMITER String new List persp Buffer to String trim store set Value I Preference Constants PERSPECTIVES new List  rootFolder PerspectiveRegistry WorkbenchPlugin PI_WORKBENCH IWorkbenchConstants PL_PERSPECTIVES getExtensionRegistry addRegistryChangeListener IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty endsWith mergePerspectives getProperty IPreferenceConstants updatePreferenceList IPreferenceStore getSource mergePerspectives PropertyChangeEvent IPreferenceStore IPreferenceStore getSource getNewValue IPerspectiveDescriptor perspectiveList getPerspectives perspectiveList perspectiveList getId getProperty startsWith perspToRemove setValue getOldValue perspToRemove getOldValue getOldValue perspectiveRegistry getProperty getProperty lastIndexOf findPerspectiveWithId PerspectiveDescriptor PerspectiveDescriptor StringReader StringReader getNewValue XMLMemento XMLMemento createReadRoot restoreState getPluginId WorkbenchException unableToLoadPerspective getStatus updatePreferenceList updatePreferenceList IPreferenceStore IPerspectiveDescriptor perspectiveList getPerspectives StringBuffer perspBuffer StringBuffer perspectiveList PerspectiveDescriptor PerspectiveDescriptor perspectiveList hasCustomDefinition perspBuffer getId SPACE_DELIMITER newList perspBuffer toString setValue IPreferenceConstants newList
Adds a perspective This is typically used by the reader public void add Perspective Perspective Descriptor desc if desc null return add desc desc get Plugin Id  addPerspective PerspectiveDescriptor getPluginId
Create a new perspective Return null if the creation failed public Perspective Descriptor create Perspective String label Perspective Descriptor original Descriptor Sanity check to avoid duplicate labels if validate Label label return null Calculate ID String id label replace   id id trim Create descriptor Perspective Descriptor desc new Perspective Descriptor id label original Descriptor add desc desc get Plugin Id return desc  PerspectiveDescriptor createPerspective PerspectiveDescriptor originalDescriptor validateLabel _ PerspectiveDescriptor PerspectiveDescriptor originalDescriptor getPluginId
Reverts a list of perspectives back to the plugin definition param persp To Revert public void revert Perspectives Array List persp To Revert indicate that the user is removing these perspectives for int i 0 i persp To Revert size i Perspective Descriptor desc Perspective Descriptor persp To Revert get i persp To Remove add desc get Id desc revert To Predefined  perspToRevert revertPerspectives ArrayList perspToRevert perspToRevert PerspectiveDescriptor PerspectiveDescriptor perspToRevert perspToRemove getId revertToPredefined
Deletes a list of perspectives param persp To Delete public void delete Perspectives Array List persp To Delete for int i 0 i persp To Delete size i delete Perspective I Perspective Descriptor persp To Delete get i  perspToDelete deletePerspectives ArrayList perspToDelete perspToDelete deletePerspective IPerspectiveDescriptor perspToDelete
Delete a perspective Has no effect if the perspective is defined in an extension public void delete Perspective I Perspective Descriptor in Perspective Descriptor desc Perspective Descriptor in Don t delete predefined perspectives if desc is Predefined persp To Remove add desc get Id remove desc get Plugin Id desc desc delete Custom Definition verify Default Perspective clean Registry  deletePerspective IPerspectiveDescriptor PerspectiveDescriptor PerspectiveDescriptor isPredefined perspToRemove getId getPluginId deleteCustomDefinition verifyDefaultPerspective cleanRegistry
Removes the custom definition of a perspective from the preference store param perspective Descriptor package void delete Custom Definition Perspective Descriptor desc remove the entry from the preference store I Preference Store store Workbench Plugin get Default get Preference Store To delete the perspective definition from the preference store use the set To Default method Since no default is defined this will remove the entry store set To Default desc get Id PERSP  perspectiveDescriptor deleteCustomDefinition PerspectiveDescriptor IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore setToDefault setToDefault getId
Method has Custom Definition param perspective Descriptor package boolean has Custom Definition Perspective Descriptor desc I Preference Store store Workbench Plugin get Default get Preference Store return store contains desc get Id PERSP  hasCustomDefinition perspectiveDescriptor hasCustomDefinition PerspectiveDescriptor IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore getId
see I Perspective Registry public I Perspective Descriptor find Perspective With Id String id Object all Descriptors get Registry Objects if all Descriptors null return null for int i 0 i all Descriptors length i I Perspective Descriptor desc I Perspective Descriptor all Descriptors i if desc get Id equals id return desc return null  IPerspectiveRegistry IPerspectiveDescriptor findPerspectiveWithId allDescriptors getRegistryObjects allDescriptors allDescriptors IPerspectiveDescriptor IPerspectiveDescriptor allDescriptors getId
see I Perspective Registry public I Perspective Descriptor find Perspective With Label String label Object all Descriptors get Registry Objects if all Descriptors null return null for int i 0 i all Descriptors length i I Perspective Descriptor desc I Perspective Descriptor all Descriptors i if desc get Label equals label return desc return null  IPerspectiveRegistry IPerspectiveDescriptor findPerspectiveWithLabel allDescriptors getRegistryObjects allDescriptors allDescriptors IPerspectiveDescriptor IPerspectiveDescriptor allDescriptors getLabel
Returns the id of the default perspective for the workbench This identifies one perspective extension within the workbench s perspective registry return the default perspective id will never be code null code public String get Default Perspective return default PerspID  getDefaultPerspective defaultPerspID
see I Perspective Registry public I Perspective Descriptor get Perspectives Object mid Array get Registry Objects if mid Array null mid Array length 0 return null I Perspective Descriptor ret Array new I Perspective Descriptor mid Array length for int i 0 i mid Array length i ret Array i I Perspective Descriptor mid Array i return ret Array  IPerspectiveRegistry IPerspectiveDescriptor getPerspectives midArray getRegistryObjects midArray midArray IPerspectiveDescriptor retArray IPerspectiveDescriptor midArray midArray retArray IPerspectiveDescriptor midArray retArray
Loads the registry public void load Load the registries load Predefined load Custom Get default perspective Get it from the R1 0 dialog settings first Fixes bug 17039 I Dialog Settings dialog Settings Workbench Plugin get Default get Dialog Settings String str dialog Settings get ID DEF PERSP if str null str length 0 set Default Perspective str dialog Settings put ID DEF PERSP NON NLS 1 else default PerspID Pref Util getAPI Preference Store get String I Workbench Preference Constants DEFAULT PERSPECTIVE ID verify Default Perspective  loadPredefined loadCustom IDialogSettings dialogSettings WorkbenchPlugin getDefault getDialogSettings dialogSettings ID_DEF_PERSP setDefaultPerspective dialogSettings ID_DEF_PERSP defaultPerspID PrefUtil getAPIPreferenceStore getString IWorkbenchPreferenceConstants DEFAULT_PERSPECTIVE_ID verifyDefaultPerspective
Read children from the file system private void load Custom Reader reader null Get the entries from the Preference store I Preference Store store Workbench Plugin get Default get Preference Store Get the space delimited list of custom perspective ids String custom Perspectives store get String I Preference Constants PERSPECTIVES String perspectives List String Converter as Array custom Perspectives for int i 0 i perspectives List length i try String xml String store get String perspectives List i PERSP if xml String null xml String length 0 reader new String Reader xml String Restore the layout state XML Memento memento XML Memento create Read Root reader Perspective Descriptor new Persp new Perspective Descriptor null null null new Persp restore State memento String id new Persp get Id I Perspective Descriptor old Persp find Perspective With Id id if old Persp null add new Persp new Persp get Plugin Id reader close catch IO Exception e unable To Load Perspective null catch Workbench Exception e unable To Load Perspective e get Status Get the entries from files if any I Path path Workbench Plugin get Default get State Location File folder path to File if folder is Directory File file List folder list Files int n Size file List length for int nX 0 nX n Size nX File file file List nX if file get Name ends With EXT get the memento Input Stream stream null try stream new File Input Stream file reader new Buffered Reader new Input Stream Reader stream utf 8 NON NLS 1 Restore the layout state XML Memento memento XML Memento create Read Root reader Perspective Descriptor new Persp new Perspective Descriptor null null null new Persp restore State memento I Perspective Descriptor old Persp find Perspective With Id new Persp get Id if old Persp null add new Persp new Persp get Plugin Id save to the preference store save Custom Persp new Persp memento delete the file file delete reader close stream close catch IO Exception e unable To Load Perspective null catch Workbench Exception e unable To Load Perspective e get Status  loadCustom IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore customPerspectives getString IPreferenceConstants perspectivesList StringConverter asArray customPerspectives perspectivesList xmlString getString perspectivesList xmlString xmlString StringReader xmlString XMLMemento XMLMemento createReadRoot PerspectiveDescriptor newPersp PerspectiveDescriptor newPersp restoreState newPersp getId IPerspectiveDescriptor oldPersp findPerspectiveWithId oldPersp newPersp newPersp getPluginId IOException unableToLoadPerspective WorkbenchException unableToLoadPerspective getStatus IPath WorkbenchPlugin getDefault getStateLocation toFile isDirectory fileList listFiles nSize fileList nSize fileList getName endsWith InputStream FileInputStream BufferedReader InputStreamReader XMLMemento XMLMemento createReadRoot PerspectiveDescriptor newPersp PerspectiveDescriptor newPersp restoreState IPerspectiveDescriptor oldPersp findPerspectiveWithId newPersp getId oldPersp newPersp newPersp getPluginId saveCustomPersp newPersp IOException unableToLoadPerspective WorkbenchException unableToLoadPerspective getStatus
private void unable To Load Perspective I Status status String title Workbench Messages get String Perspective problem Loading Title NON NLS 1 String msg Workbench Messages get String Perspective error Loading State NON NLS 1 if status null Message Dialog open Error Shell null title msg else Error Dialog open Error Shell null title msg status  unableToLoadPerspective IStatus WorkbenchMessages getString problemLoadingTitle WorkbenchMessages getString errorLoadingState MessageDialog openError ErrorDialog openError
Saves a custom perspective definition to the preference store param desc public void save Custom Persp Perspective Descriptor real Desc XML Memento memento throws IO Exception I Preference Store store Workbench Plugin get Default get Preference Store Save it to the preference store Writer writer new String Writer memento save writer writer close store set Value real Desc get Id PERSP writer to String  saveCustomPersp PerspectiveDescriptor realDesc XMLMemento IOException IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore StringWriter setValue realDesc getId toString
Gets the Custom perspective definition from the preference store param string return I Memento public I Memento get Custom Persp String id throws Workbench Exception IO Exception Reader reader null I Preference Store store Workbench Plugin get Default get Preference Store String xml String store get String id PERSP if xml String null xml String length 0 defined in store reader new String Reader xml String XML Memento memento XML Memento create Read Root reader reader close return memento  IMemento IMemento getCustomPersp WorkbenchException IOException IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore xmlString getString xmlString xmlString StringReader xmlString XMLMemento XMLMemento createReadRoot
Read children from the plugin registry private void load Predefined Perspective Registry Reader reader new Perspective Registry Reader reader read Perspectives Platform get Extension Registry this  loadPredefined PerspectiveRegistryReader PerspectiveRegistryReader readPerspectives getExtensionRegistry
Sets the default perspective for the workbench to the given perspective id The id must correspond to one perspective extension within the workbench s perspective registry param id a perspective id must not be code null code public void set Default Perspective String id I Perspective Descriptor desc find Perspective With Id id if desc null default PerspID id Pref Util getAPI Preference Store set Value I Workbench Preference Constants DEFAULT PERSPECTIVE ID id  setDefaultPerspective IPerspectiveDescriptor findPerspectiveWithId defaultPerspID PrefUtil getAPIPreferenceStore setValue IWorkbenchPreferenceConstants DEFAULT_PERSPECTIVE_ID
Return true if a label is valid and unused public boolean validate Label String label label label trim if label length 0 return false return true  validateLabel
Verifies the id of the default perspective If the default perspective is invalid use the workbench default private void verify Default Perspective Step 1 Try current def Persp Id value I Perspective Descriptor desc null if default PerspID null desc find Perspective With Id default PerspID if desc null return Step 2 Read default value default PerspID Pref Util getAPI Preference Store get String I Workbench Preference Constants DEFAULT PERSPECTIVE ID if default PerspID null desc find Perspective With Id default PerspID if desc null return Step 3 Use application specific default default PerspID Workbench get Instance get Default Perspective Id  verifyDefaultPerspective defPerspId IPerspectiveDescriptor defaultPerspID findPerspectiveWithId defaultPerspID defaultPerspID PrefUtil getAPIPreferenceStore getString IWorkbenchPreferenceConstants DEFAULT_PERSPECTIVE_ID defaultPerspID findPerspectiveWithId defaultPerspID defaultPerspID getInstance getDefaultPerspectiveId
public I Perspective Descriptor clone Perspective String id String label I Perspective Descriptor original Descriptor Check for invalid labels if label null label trim length 0 throw new Illegal Argument Exception Check for duplicates I Perspective Descriptor desc find Perspective With Id id if desc null throw new Illegal Argument Exception Create descriptor desc new Perspective Descriptor id label Perspective Descriptor original Descriptor add desc Perspective Descriptor desc get Plugin Id return desc  IPerspectiveDescriptor clonePerspective IPerspectiveDescriptor originalDescriptor IllegalArgumentException IPerspectiveDescriptor findPerspectiveWithId IllegalArgumentException PerspectiveDescriptor PerspectiveDescriptor originalDescriptor PerspectiveDescriptor getPluginId
public void revert Perspective I Perspective Descriptor persp To Revert Perspective Descriptor desc Perspective Descriptor persp To Revert persp To Remove add desc get Id desc revert To Predefined  revertPerspective IPerspectiveDescriptor perspToRevert PerspectiveDescriptor PerspectiveDescriptor perspToRevert perspToRemove getId revertToPredefined
public Object build New Cache Object I Extension Delta delta I Extension extension delta get Extension if extension null return null I Configuration Element elements extension get Configuration Elements I Perspective Descriptor desc null for int i 0 i elements length i String id elements i get Attribute I Workbench Constants TAG ID if id null continue desc find Perspective With Id id if desc null if elements i get Name equals TAG LAYOUT try String desc Text I Configuration Element children elements i get Children TAG DESCRIPTION if children length 1 desc Text children 0 get Value else desc Text NON NLS 1 desc new Perspective Descriptor elements i desc Text catch Core Exception e log an error since its not safe to open a dialog here Workbench Plugin log Unable to create layout descriptor e get Status NON NLS 1 return desc  buildNewCacheObject IExtensionDelta IExtension getExtension IConfigurationElement getConfigurationElements IPerspectiveDescriptor getAttribute IWorkbenchConstants TAG_ID findPerspectiveWithId getName TAG_LAYOUT descText IConfigurationElement getChildren TAG_DESCRIPTION descText getValue descText PerspectiveDescriptor descText CoreException WorkbenchPlugin getStatus
return desc public void post Change Processing  postChangeProcessing
public void post Change Processing public void dispose Platform get Extension Registry remove Registry Change Listener this  postChangeProcessing getExtensionRegistry removeRegistryChangeListener

Registry View Reader constructor comment public Perspective Registry Reader super  RegistryViewReader PerspectiveRegistryReader
read Element method comment for dynamic UI change access from protected to public protected boolean read Element I Configuration Element element if element get Name equals TAG LAYOUT try String desc Text get Description element Perspective Descriptor desc new Perspective Descriptor element desc Text registry add Perspective desc catch Core Exception e log an error since its not safe to open a dialog here Workbench Plugin log Unable to create layout descriptor e get Status NON NLS 1 return true return false  readElement readElement IConfigurationElement getName TAG_LAYOUT descText getDescription PerspectiveDescriptor PerspectiveDescriptor descText addPerspective CoreException WorkbenchPlugin getStatus
Read the view extensions within a registry public void read Perspectives I Extension Registry in Perspective Registry out registry out read Registry in PlatformUI PLUGIN ID I Workbench Constants PL PERSPECTIVES  readPerspectives IExtensionRegistry PerspectiveRegistry readRegistry PLUGIN_ID IWorkbenchConstants PL_PERSPECTIVES

public int compare Object arg0 Object arg1 String s1 Category Node arg0 get Flat Category String s2 Category Node arg1 get Flat Category return collator compare s1 s2  CategoryNode getFlatCategory CategoryNode getFlatCategory
Default constructor public Category Node Workbench Preference Node node this node node  CategoryNode WorkbenchPreferenceNode
Return the preference node this category represents public Workbench Preference Node get Node return node  WorkbenchPreferenceNode getNode
Return the flatten category public String get Flat Category if flat Category null initialize if flat Category null flat Category node get Label Text return flat Category  getFlatCategory flatCategory flatCategory flatCategory getLabelText flatCategory
private void initialize String category node get Category if category null return String Buffer sb new String Buffer String Tokenizer stok new String Tokenizer category PREFERENCE SEPARATOR Workbench Preference Node immediate Parent null while stok has More Tokens String pathID stok next Token immediate Parent find Node pathID if immediate Parent null return if sb length 0 sb append PREFERENCE SEPARATOR sb append immediate Parent get Label Text if sb length 0 sb append PREFERENCE SEPARATOR sb append node get Label Text flat Category sb to String  getCategory StringBuffer StringBuffer StringTokenizer StringTokenizer PREFERENCE_SEPARATOR WorkbenchPreferenceNode immediateParent hasMoreTokens nextToken immediateParent findNode immediateParent PREFERENCE_SEPARATOR immediateParent getLabelText PREFERENCE_SEPARATOR getLabelText flatCategory toString
Create a new instance configured with the workbench public Preference Page Registry Reader I Workbench new Workbench workbench new Workbench  PreferencePageRegistryReader IWorkbench newWorkbench newWorkbench
Searches for the top level node with the given id private Workbench Preference Node find Node String id for int i 0 i nodes size i Workbench Preference Node node Workbench Preference Node nodes get i if node get Id equals id return node return null  WorkbenchPreferenceNode findNode WorkbenchPreferenceNode WorkbenchPreferenceNode getId
Searches for the child node with the given ID in the provided parent node If not found null is returned private Workbench Preference Node find Node Workbench Preference Node parent String id I Preference Node sub Nodes parent get Sub Nodes for int i 0 i sub Nodes length i Workbench Preference Node node Workbench Preference Node sub Nodes i if node get Id equals id return node return null  WorkbenchPreferenceNode findNode WorkbenchPreferenceNode IPreferenceNode subNodes getSubNodes subNodes WorkbenchPreferenceNode WorkbenchPreferenceNode subNodes getId
Load the preference page contirbutions from the registry and organize preference node contributions by category into hierarchies If there is no page for a given node in the hierarchy then a blank page will be created If no category has been specified or category information is incorrect page will appear at the root level workbench log entry will be created for incorrect category information public List get Preference Contributions I Extension Registry registry load Nodes From Registry registry all nodes keyed on category List contributions new Array List root nodes which contain subnodes Add root nodes to the contributions vector String Tokenizer tokenizer String current Token Make the advisor s favorite the first category I Preference Node favorite null String favorite Id Workbench workbench get Main Preference Page Id if favorite Id null favorite find Node favorite Id if favorite null contributions add favorite Sort nodes based on flattened display path composed of actual labels of nodes referenced in category attribute Object sorted Nodes sort By Categories nodes for int i 0 i sorted Nodes length i Iterate through all the nodes Category Node category Node Category Node sorted Nodes i Workbench Preference Node node category Node get Node if node favorite skip it favorite already at the top of the list continue String category node get Category if category null contributions add node continue has category tokenizer new String Tokenizer category PREFERENCE SEPARATOR Workbench Preference Node parent null while tokenizer has More Elements current Token tokenizer next Token Workbench Preference Node child null if parent null child find Node current Token else child find Node parent current Token if child null parent null break else parent child if parent null parent add node else Could not find the parent log Workbench Plugin log Invalid preference page path category Node get Flat Category NON NLS 1 contributions add node return contributions  getPreferenceContributions IExtensionRegistry loadNodesFromRegistry ArrayList StringTokenizer currentToken IPreferenceNode favoriteId getMainPreferencePageId favoriteId findNode favoriteId sortedNodes sortByCategories sortedNodes CategoryNode categoryNode CategoryNode sortedNodes WorkbenchPreferenceNode categoryNode getNode getCategory StringTokenizer PREFERENCE_SEPARATOR WorkbenchPreferenceNode hasMoreElements currentToken nextToken WorkbenchPreferenceNode findNode currentToken findNode currentToken WorkbenchPlugin categoryNode getFlatCategory
Get the preference nodes that are defined in the registry protected void load Nodes From Registry I Extension Registry registry nodes new Array List read Registry registry PlatformUI PLUGIN ID I Workbench Constants PL PREFERENCES  loadNodesFromRegistry IExtensionRegistry ArrayList readRegistry PLUGIN_ID IWorkbenchConstants PL_PREFERENCES
Read preference page element protected boolean read Element I Configuration Element element if element get Name equals TAG PAGE false return false Workbench Preference Node node create Node workbench element if node null nodes add node read Element Children element return true  readElement IConfigurationElement getName TAG_PAGE WorkbenchPreferenceNode createNode readElementChildren
public static Workbench Preference Node create Node I Workbench workbench I Configuration Element element String name element get Attribute ATT NAME String id element get Attribute ATT ID String category element get Attribute ATT CATEGORY String image Name element get Attribute ATT ICON String class Name element get Attribute ATT CLASS if name null log Missing Attribute element ATT NAME if id null log Missing Attribute element ATT ID if class Name null log Missing Attribute element ATT CLASS if name null id null class Name null return null Image Descriptor image null if image Name null String contributing Plugin Id element get Declaring Extension get Namespace image AbstractUI Plugin image Descriptor From Plugin contributing Plugin Id image Name Workbench Preference Node node new Workbench Preference Node id name category image element workbench return node  WorkbenchPreferenceNode createNode IWorkbench IConfigurationElement getAttribute ATT_NAME getAttribute ATT_ID getAttribute ATT_CATEGORY imageName getAttribute ATT_ICON className getAttribute ATT_CLASS logMissingAttribute ATT_NAME logMissingAttribute ATT_ID className logMissingAttribute ATT_CLASS className ImageDescriptor imageName contributingPluginId getDeclaringExtension getNamespace AbstractUIPlugin imageDescriptorFromPlugin contributingPluginId imageName WorkbenchPreferenceNode WorkbenchPreferenceNode
Sort the nodes based on full category name Category used for sorting is created by substituting node I Ds with labels of the referenced nodes workbench node is excluded from sorting because it always appears first in the dialog private Object sort By Categories List category Nodes sort by categories Category Node node Array new Category Node category Nodes size for int i 0 i category Nodes size i node Array i new Category Node Workbench Preference Node category Nodes get i Collections sort Arrays as List node Array comparer return node Array  IDs sortByCategories categoryNodes CategoryNode nodeArray CategoryNode categoryNodes categoryNodes nodeArray CategoryNode WorkbenchPreferenceNode categoryNodes asList nodeArray nodeArray

private Property Page Contributor Manager manager The constructor public Property Pages Registry Reader Property Page Contributor Manager manager this manager manager  PropertyPageContributorManager PropertyPagesRegistryReader PropertyPageContributorManager
Parses child element and processes it private void process Child Element I Configuration Element element String tag element get Name if tag equals TAG FILTER String key element get Attribute ATT FILTER NAME String value element get Attribute ATT FILTER VALUE if key null value null return if filter Properties null filter Properties new Hash Map filter Properties put key value  processChildElement IConfigurationElement getName TAG_FILTER getAttribute ATT_FILTER_NAME getAttribute ATT_FILTER_VALUE filterProperties filterProperties HashMap filterProperties
Reads static property page specification private void process Page Element I Configuration Element element String plugin Id element get Declaring Extension get Namespace String page Id element get Attribute ATT ID String page Name element get Attribute ATT NAME String icon Name element get Attribute ATT ICON String page Class Name element get Attribute ATT CLASS String object Class Name element get Attribute ATT OBJECTCLASS String adaptable element get Attribute ATT ADAPTABLE if page Id null log Missing Attribute element ATT ID return if object Class Name null log Missing Attribute element ATT OBJECTCLASS return if page Class Name null log Missing Attribute element ATT CLASS return filter Properties null I Configuration Element children element get Children for int i 0 i children length i process Child Element children i I Property Page Contributor contributor new Registry Page Contributor plugin Id page Id page Name icon Name filter Properties object Class Name P TRUE equals Ignore Case adaptable element register Contributor object Class Name contributor  processPageElement IConfigurationElement pluginId getDeclaringExtension getNamespace pageId getAttribute ATT_ID pageName getAttribute ATT_NAME iconName getAttribute ATT_ICON pageClassName getAttribute ATT_CLASS objectClassName getAttribute ATT_OBJECTCLASS getAttribute ATT_ADAPTABLE pageId logMissingAttribute ATT_ID objectClassName logMissingAttribute ATT_OBJECTCLASS pageClassName logMissingAttribute ATT_CLASS filterProperties IConfigurationElement getChildren processChildElement IPropertyPageContributor RegistryPageContributor pluginId pageId pageName iconName filterProperties objectClassName P_TRUE equalsIgnoreCase registerContributor objectClassName
Reads the next contribution element public for dynamic UI public boolean read Element I Configuration Element element if element get Name equals TAG PAGE process Page Element element read Element Children element return true if element get Name equals TAG FILTER return true return false  readElement IConfigurationElement getName TAG_PAGE processPageElement readElementChildren getName TAG_FILTER
Creates object class instance and registers the contributor with the property page manager private void register Contributor String object Class Name I Property Page Contributor contributor manager register Contributor contributor object Class Name  registerContributor objectClassName IPropertyPageContributor registerContributor objectClassName
Reads all occurances of property Pages extension in the registry public void register Property Pages I Extension Registry registry read Registry registry PlatformUI PLUGIN ID I Workbench Constants PL PROPERTY PAGES  propertyPages registerPropertyPages IExtensionRegistry readRegistry PLUGIN_ID IWorkbenchConstants PL_PROPERTY_PAGES

public Registry Element Object obj state REGISTRY CACHE STATE UNKNOWN if real Objects null real Objects new Array List real Objects add obj  RegistryElement REGISTRY_CACHE_STATE_UNKNOWN realObjects realObjects ArrayList realObjects
public void add New Object Object obj if real Objects null real Objects new Array List real Objects add obj  addNewObject realObjects realObjects ArrayList realObjects
public void change State int new State if new State REGISTRY CACHE STATE UNKNOWN new State REGISTRY CACHE STATE MAX state new State  changeState newState newState REGISTRY_CACHE_STATE_UNKNOWN newState REGISTRY_CACHE_STATE_MAX newState
public Array List get Real Objects return real Objects  ArrayList getRealObjects realObjects
public Registry Manager String element Id String ext Pt Id this element Id element Id this ext Pt Id ext Pt Id cache new Hash Map  RegistryManager elementId extPtId elementId elementId extPtId extPtId HashMap
public Registry Manager get Cache return this  RegistryManager getCache
public Object get Registry Objects Object reg Elements cache values to Array if reg Elements length 0 return null Array List ret List new Array List for int i 0 i reg Elements length i Array List list Element Registry Element reg Elements i get Real Objects if list Element null List Iterator iter list Element list Iterator while iter has Next ret List add iter next ret List trim To Size Object ret ret List to Array return ret  getRegistryObjects regElements toArray regElements ArrayList retList ArrayList regElements ArrayList listElement RegistryElement regElements getRealObjects listElement ListIterator listElement listIterator hasNext retList retList trimToSize retList toArray
public void registry Changed I Registry Change Event event if PlatformUI is Workbench Running return int num Deltas 0 Display display PlatformUI get Workbench get Display if display null display is Disposed return try Just retrieve any changes relating to the extension point org eclipse ui perspectives I Extension Delta delta event get Extension Deltas element Id ext Pt Id num Deltas delta length for int i 0 i num Deltas i do Add display delta i finally if num Deltas 0 Only do the post change processing if something was actually changed in the registry If there were no deltas of relevance to this registry there should be no need to do any extra post change processing post Change Processing  registryChanged IRegistryChangeEvent isWorkbenchRunning numDeltas getWorkbench getDisplay isDisposed IExtensionDelta getExtensionDeltas elementId extPtId numDeltas numDeltas doAdd numDeltas postChangeProcessing
private void do Add Display display final I Extension Delta delta Runnable run new Runnable public void run if PlatformUI is Workbench Running return add delta display sync Exec run  doAdd IExtensionDelta isWorkbenchRunning syncExec
public void add I Extension Delta delta I Extension Point ext Pt delta get Extension Point I Extension ext delta get Extension Get the name of the plugin that is adding this extension The name of the plugin that adds the extension point is us String plugin Id ext get Namespace add build New Cache Object delta plugin Id  IExtensionDelta IExtensionPoint extPt getExtensionPoint IExtension getExtension pluginId getNamespace buildNewCacheObject pluginId
public void add Object element String plugin Id if element null Nothing to add so just return return String to Use Plugin Id plugin Id if plugin Id null plugin Id length 0 This element is being added to the registry but is not associated with a regular plug in Likely the element was created programmatically and needs to exist in the registry An example is the Other category for views Use the key INTERNAL REGISTRY ADDITION for these elements so they will not be removed from the registry with any plug in removal to Use Plugin Id INTERNAL REGISTRY ADDITION Registry Element reg Element Registry Element cache get to Use Plugin Id if reg Element null reg Element new Registry Element element cache put to Use Plugin Id reg Element else reg Element add New Object element  pluginId toUsePluginId pluginId pluginId pluginId INTERNAL_REGISTRY_ADDITION toUsePluginId INTERNAL_REGISTRY_ADDITION RegistryElement regElement RegistryElement toUsePluginId regElement regElement RegistryElement toUsePluginId regElement regElement addNewObject
This is a generic method that is expected to be over written by the parent class It should return a new element with all the relevant information from the delta param delta a delta from a listener on extension events return a new object to be added to the registry cache 
abstract public Object build New Cache Object I Extension Delta delta This is a generic method that is expected to be implemented by the parent class It should do any processing necessary once deltas have been processed and the registry modified Note that in some cases there may be no extra processing required  buildNewCacheObject IExtensionDelta
abstract public void post Change Processing Flag a series of elements in this registry cache as to be removed This does not actually remove these elements as some processing may be required before they are removed param plugins a list of plug in ids for each plug in that is being removed Only those elements in the registry cache that correspond to one of these plug ins will be flagged for removal public void remove String plugins for int i 0 i plugins length i remove plugins i  postChangeProcessing
public void remove String plugin Id Registry Element element Registry Element cache get plugin Id if element null element change State REGISTRY CACHE STATE DELETED  pluginId RegistryElement RegistryElement pluginId changeState REGISTRY_CACHE_STATE_DELETED
public void remove String plugin Id Object object if plugin Id null plugin Id INTERNAL REGISTRY ADDITION Registry Element element Registry Element cache get plugin Id if element null Find the registry element that contains this object and remove only that one Array List real Objects element get Real Objects real Objects remove object  pluginId pluginId pluginId INTERNAL_REGISTRY_ADDITION RegistryElement RegistryElement pluginId ArrayList realObjects getRealObjects realObjects
Actually go through and remove any elements from the registry that are flagged for removal This assumes that any processing required by the parent child prior to removal of this element has been completed public void clean Registry Set elements cache key Set Set keys To Remove new Hash Set Iterator iter elements iterator while iter has Next Object plugin Id iter next Registry Element elem Registry Element cache get plugin Id if elem null elem state REGISTRY CACHE STATE DELETED keys To Remove add plugin Id Now remove the deleted ones Iterator remove Iterator keys To Remove iterator while remove Iterator has Next cache remove remove Iterator next  cleanRegistry keySet keysToRemove HashSet hasNext pluginId RegistryElement RegistryElement pluginId REGISTRY_CACHE_STATE_DELETED keysToRemove pluginId removeIterator keysToRemove removeIterator hasNext removeIterator

protected static Hashtable extension Points new Hashtable The constructor protected Registry Reader  extensionPoints RegistryReader
This method extracts description as a subelement of the given element return description string if defined or empty string if not protected String get Description I Configuration Element config I Configuration Element children config get Children TAG DESCRIPTION if children length 1 return children 0 get Value return NON NLS 1  getDescription IConfigurationElement IConfigurationElement getChildren TAG_DESCRIPTION getValue
Logs the error in the workbench log using the provided text and the information in the configuration element protected static void log Error I Configuration Element element String text I Extension extension element get Declaring Extension String Buffer buf new String Buffer buf append Plugin extension get Namespace extension extension get Extension Point Unique Identifier NON NLS 2 NON NLS 1 buf append n text NON NLS 1 Workbench Plugin log buf to String  logError IConfigurationElement IExtension getDeclaringExtension StringBuffer StringBuffer getNamespace getExtensionPointUniqueIdentifier WorkbenchPlugin toString
Logs a very common registry error when a required attribute is missing protected static void log Missing Attribute I Configuration Element element String attribute Name log Error element Required attribute attribute Name not defined NON NLS 2 NON NLS 1  logMissingAttribute IConfigurationElement attributeName logError attributeName
Logs a very common registry error when a required child is missing protected static void log Missing Element I Configuration Element element String element Name log Error element Required sub element element Name not defined NON NLS 2 NON NLS 1  logMissingElement IConfigurationElement elementName logError elementName
Logs a registry error when the configuration element is unknown protected static void log Unknown Element I Configuration Element element log Error element Unknown extension tag found element get Name NON NLS 1  logUnknownElement IConfigurationElement logError getName
Comparator comparer new Comparator public int compare Object arg0 Object arg1 String s1 I Extension arg0 get Namespace String s2 I Extension arg1 get Namespace return s1 compare To Ignore Case s2  IExtension getNamespace IExtension getNamespace compareToIgnoreCase
Apply a reproducable order to the list of extensions provided such that the order will not change as extensions are added or removed protected I Extension order Extensions I Extension extensions By default the order is based on plugin id sorted in ascending order The order for a plugin providing more than one extension for an extension point is dependent in the order listed in the XML file I Extension sorted Extension new I Extension extensions length System arraycopy extensions 0 sorted Extension 0 extensions length Comparator comparer new Comparator public int compare Object arg0 Object arg1 String s1 I Extension arg0 get Namespace String s2 I Extension arg1 get Namespace return s1 compare To Ignore Case s2 Collections sort Arrays as List sorted Extension comparer return sorted Extension  IExtension orderExtensions IExtension IExtension sortedExtension IExtension sortedExtension IExtension getNamespace IExtension getNamespace compareToIgnoreCase asList sortedExtension sortedExtension
Implement this method to read element s attributes If children should also be read then implementor is responsible for calling code read Element Children code Implementor is also responsible for logging missing attributes return true if element was recognized false if not  readElementChildren
protected abstract boolean read Element I Configuration Element element Read the element s children This is called by the subclass read Element method when it wants to read the children of the element protected void read Element Children I Configuration Element element read Elements element get Children  readElement IConfigurationElement readElement readElementChildren IConfigurationElement readElements getChildren
Read each element one at a time by calling the subclass implementation of code read Element code Logs an error if the element was not recognized protected void read Elements I Configuration Element elements for int i 0 i elements length i if read Element elements i log Unknown Element elements i  readElement readElements IConfigurationElement readElement logUnknownElement
Read one extension by looping through its configuration elements protected void read Extension I Extension extension read Elements extension get Configuration Elements  readExtension IExtension readElements getConfigurationElements
Start the registry reading process using the supplied plugin ID and extension point public void read Registry I Extension Registry registry String plugin Id String extension Point I Extension Point point registry get Extension Point plugin Id extension Point if point null return I Extension extensions point get Extensions extensions order Extensions extensions for int i 0 i extensions length i read Extension extensions i  readRegistry IExtensionRegistry pluginId extensionPoint IExtensionPoint getExtensionPoint pluginId extensionPoint IExtension getExtensions orderExtensions readExtension

private String view Id public Show View Handler String view Id this view Id view Id  viewId ShowViewHandler viewId viewId viewId
public Object execute Map parameter Values By Name throws Execution Exception I Workbench Window active Workbench Window PlatformUI get Workbench get Active Workbench Window if active Workbench Window null return null I Workbench Page active Page active Workbench Window get Active Page if active Page null return null try active Page show View view Id catch Part Init Exception e Error Dialog open Error active Page get Workbench Window get Shell Workbench Messages get String Show View error Title NON NLS 1 e get Message e get Status return null  parameterValuesByName ExecutionException IWorkbenchWindow activeWorkbenchWindow getWorkbench getActiveWorkbenchWindow activeWorkbenchWindow IWorkbenchPage activePage activeWorkbenchWindow getActivePage activePage activePage showView viewId PartInitException ErrorDialog openError activePage getWorkbenchWindow getShell WorkbenchMessages getString ShowView errorTitle getMessage getStatus

public Sticky View Descriptor I Configuration Element singleton throws Core Exception id singleton get Attribute ATT ID if id null throw new Core Exception new Status I Status ERROR singleton get Declaring Extension get Namespace 0 Invalid extension missing id null NON NLS 1 namespace singleton get Declaring Extension get Namespace String location singleton get Attribute ATT LOCATION if location null if location equals Ignore Case left NON NLS 1 direction I Page Layout LEFT else if location equals Ignore Case top NON NLS 1 direction I Page Layout TOP else if location equals Ignore Case bottom NON NLS 1 direction I Page Layout BOTTOM no else for right it is the default value String closeable String singleton get Attribute ATT CLOSEABLE if closeable String null closeable closeable String equals false NON NLS 1 String moveable String singleton get Attribute ATT MOVEABLE if moveable String null moveable moveable String equals false NON NLS 1  StickyViewDescriptor IConfigurationElement CoreException getAttribute ATT_ID CoreException IStatus getDeclaringExtension getNamespace getDeclaringExtension getNamespace getAttribute ATT_LOCATION equalsIgnoreCase IPageLayout equalsIgnoreCase IPageLayout equalsIgnoreCase IPageLayout closeableString getAttribute ATT_CLOSEABLE closeableString closeableString moveableString getAttribute ATT_MOVEABLE moveableString moveableString
public int get Location return direction  getLocation
see org eclipse ui internal registry I Sticky View Descriptor get Id public String get Id return id  IStickyViewDescriptor getId getId
see org eclipse ui internal registry I Sticky View Descriptor get Namespace public String get Namespace return namespace  IStickyViewDescriptor getNamespace getNamespace
see org eclipse ui internal registry I Sticky View Descriptor is Fixed public boolean is Closeable return closeable  IStickyViewDescriptor isFixed isCloseable
see org eclipse ui internal registry I Sticky View Descriptor is Moveable public boolean is Moveable return moveable  IStickyViewDescriptor isMoveable isMoveable

Create a new View Descriptor for an extension public View Descriptor I Configuration Element e String desc throws Core Exception config Element e description desc load From Extension register Show View Handler  ViewDescriptor ViewDescriptor IConfigurationElement CoreException configElement loadFromExtension registerShowViewHandler
private void register Show View Handler I Handler show View Handler new Show View Handler id Handler Submission show View Submission new Handler Submission null null null id show View Handler Priority MEDIUM PlatformUI get Workbench get Command Support add Handler Submission show View Submission  registerShowViewHandler IHandler showViewHandler ShowViewHandler HandlerSubmission showViewSubmission HandlerSubmission showViewHandler getWorkbench getCommandSupport addHandlerSubmission showViewSubmission
see org eclipse ui internal registry I View Descriptor create View public I View Part create View throws Core Exception Object obj Workbench Plugin create Extension config Element ATT CLASS return I View Part obj  IViewDescriptor createView IViewPart createView CoreException WorkbenchPlugin createExtension configElement ATT_CLASS IViewPart
see org eclipse ui internal registry I View Descriptor get Category Path public String get Category Path return category Path  IViewDescriptor getCategoryPath getCategoryPath categoryPath
see org eclipse ui internal registry I View Descriptor get Configuration Element public I Configuration Element get Configuration Element return config Element  IViewDescriptor getConfigurationElement IConfigurationElement getConfigurationElement configElement
see org eclipse ui internal registry I View Descriptor get Description public String get Description return description  IViewDescriptor getDescription getDescription
see org eclipse ui internal registry I View Descriptor getID public String getID return id  IViewDescriptor
see org eclipse ui I Workbench Part Descriptor get Id public String get Id return id  IWorkbenchPartDescriptor getId getId
public Image Descriptor get Image Descriptor if image Descriptor null return image Descriptor String icon Name config Element get Attribute ATT ICON if icon Name null return null I Extension extension config Element get Declaring Extension String extending Plugin Id extension get Namespace image Descriptor AbstractUI Plugin image Descriptor From Plugin extending Plugin Id icon Name return image Descriptor  ImageDescriptor getImageDescriptor imageDescriptor imageDescriptor iconName configElement getAttribute ATT_ICON iconName IExtension configElement getDeclaringExtension extendingPluginId getNamespace imageDescriptor AbstractUIPlugin imageDescriptorFromPlugin extendingPluginId iconName imageDescriptor
see org eclipse ui I Workbench Part Descriptor get Label public String get Label return label  IWorkbenchPartDescriptor getLabel getLabel
see org eclipse ui internal registry I View Descriptor get Accelerator public String get Accelerator return accelerator  IViewDescriptor getAccelerator getAccelerator
see org eclipse ui internal registry I View Descriptor get Fast View Width Ratio public float get Fast View Width Ratio return fast View Width Ratio  IViewDescriptor getFastViewWidthRatio getFastViewWidthRatio fastViewWidthRatio
load a view descriptor from the registry private void load From Extension throws Core Exception id config Element get Attribute ATT ID plugin Id config Element get Declaring Extension get Namespace label config Element get Attribute ATT NAME accelerator config Element get Attribute ATT ACCELERATOR class Name config Element get Attribute ATT CLASS String category config Element get Attribute ATT CATEGORY String ratio config Element get Attribute ATT RATIO String mult config Element get Attribute ATT MULTIPLE Sanity check if label null class Name null throw new Core Exception new Status I Status ERROR config Element get Declaring Extension get Namespace 0 Invalid extension missing label or class name id NON NLS 1 null if category null String Tokenizer stok new String Tokenizer category NON NLS 1 category Path new String stok count Tokens Parse the path tokens and store them for int i 0 stok has More Tokens i category Path i stok next Token if ratio null try fast View Width Ratio new Float ratio float Value if fast View Width Ratio I Page Layout RATIO MAX fast View Width Ratio I Page Layout RATIO MAX if fast View Width Ratio I Page Layout RATIO MIN fast View Width Ratio I Page Layout RATIO MIN catch Number Format Exception e fast View Width Ratio I Page Layout DEFAULT FASTVIEW RATIO else fast View Width Ratio I Page Layout DEFAULT FASTVIEW RATIO allow Multiple mult null true equals Ignore Case mult NON NLS 1  loadFromExtension CoreException configElement getAttribute ATT_ID pluginId configElement getDeclaringExtension getNamespace configElement getAttribute ATT_NAME configElement getAttribute ATT_ACCELERATOR className configElement getAttribute ATT_CLASS configElement getAttribute ATT_CATEGORY configElement getAttribute ATT_RATIO configElement getAttribute ATT_MULTIPLE className CoreException IStatus configElement getDeclaringExtension getNamespace StringTokenizer StringTokenizer categoryPath countTokens hasMoreTokens categoryPath nextToken fastViewWidthRatio floatValue fastViewWidthRatio IPageLayout RATIO_MAX fastViewWidthRatio IPageLayout RATIO_MAX fastViewWidthRatio IPageLayout RATIO_MIN fastViewWidthRatio IPageLayout RATIO_MIN NumberFormatException fastViewWidthRatio IPageLayout DEFAULT_FASTVIEW_RATIO fastViewWidthRatio IPageLayout DEFAULT_FASTVIEW_RATIO allowMultiple equalsIgnoreCase
Returns a string representation of this descriptor For debugging purposes only public String to String return View getID NON NLS 2 NON NLS 1  toString
see org eclipse ui activities support I Plugin Contribution get Plugin Id public String get Plugin Id return plugin Id null plugin Id NON NLS 1  IPluginContribution getPluginId getPluginId pluginId pluginId
see org eclipse ui activities support I Plugin Contribution get Local Id public String get Local Id return id null id NON NLS 1  IPluginContribution getLocalId getLocalId
see org eclipse ui activities support I Plugin Contribution from Plugin public boolean from Plugin return true  IPluginContribution fromPlugin fromPlugin
see org eclipse ui internal registry I View Descriptor get Allow Multiple public boolean get Allow Multiple return allow Multiple  IViewDescriptor getAllowMultiple getAllowMultiple allowMultiple

public View Registry Element view Descriptors new Array List category Descriptors new Array List sticky Descriptors new Array List  ViewRegistryElement viewDescriptors ArrayList categoryDescriptors ArrayList stickyDescriptors ArrayList
public void add Category Category element category Descriptors add element  addCategory categoryDescriptors
public void add View Descriptor I View Descriptor element view Descriptors add element  addViewDescriptor IViewDescriptor viewDescriptors
public void add Sticky View I Sticky View Descriptor id sticky Descriptors add id  addStickyView IStickyViewDescriptor stickyDescriptors
public List get Categories return category Descriptors  getCategories categoryDescriptors
public List get View Descriptors return view Descriptors  getViewDescriptors viewDescriptors
public List get Sticky Descriptors return sticky Descriptors  getStickyDescriptors stickyDescriptors
Create a new View Registry public View Registry super Workbench Plugin PI WORKBENCH I Workbench Constants PL VIEWS views new Array List dirty Views true categories new Array List dirty Categories true sticky new Array List dirty Sticky true Platform get Extension Registry add Registry Change Listener this  ViewRegistry ViewRegistry WorkbenchPlugin PI_WORKBENCH IWorkbenchConstants PL_VIEWS ArrayList dirtyViews ArrayList dirtyCategories ArrayList dirtySticky getExtensionRegistry addRegistryChangeListener
Add a category to the registry public void add Category desc fix for 1877 if find Category desc get Id null Mark categories list as dirty dirty Categories true View Registry Element element new View Registry Element element add Category desc add element desc get Plugin Id  findCategory getId dirtyCategories ViewRegistryElement ViewRegistryElement addCategory getPluginId
Add a descriptor to the registry public void add I View Descriptor desc dirty Views true View Registry Element element new View Registry Element element add View Descriptor desc add element desc get Configuration Element get Declaring Extension get Namespace  IViewDescriptor dirtyViews ViewRegistryElement ViewRegistryElement addViewDescriptor getConfigurationElement getDeclaringExtension getNamespace
Add a sticky descriptor to the registry public void add I Sticky View Descriptor desc dirty Sticky true View Registry Element element new View Registry Element element add Sticky View desc add element desc get Namespace  IStickyViewDescriptor dirtySticky ViewRegistryElement ViewRegistryElement addStickyView getNamespace
public Object build New Cache Object I Extension Delta delta I Extension extension delta get Extension if extension null return null I Configuration Element elements extension get Configuration Elements View Registry Element reg Element new View Registry Element for int i 0 i elements length i I Configuration Element singleton elements i String id singleton get Attribute I Workbench Constants TAG ID if singleton get Name equals View Registry Reader TAG VIEW We want to create a view descriptor if find id null This view already exists Ignore this new one continue try String desc Text NON NLS 1 I Configuration Element children singleton get Children TAG DESCRIPTION if children length 1 desc Text children 0 get Value View Descriptor desc new View Descriptor singleton desc Text reg Element add View Descriptor desc dirty Views true catch Core Exception e log an error since its not safe to open a dialog here Workbench Plugin log Unable to create view descriptor e get Status NON NLS 1 else if singleton get Name equals View Registry Reader TAG CATEGORY NON NLS 1 try We want to create a category if find Category id null This category already exists Ignore this new one continue Category category new Category singleton reg Element add Category category dirty Categories true catch Workbench Exception e Workbench Plugin log Unable to create view category e get Status NON NLS 1 else if singleton get Name equals View Registry Reader TAG STICKYVIEW NON NLS 1 if find Sticky id null continue try Sticky View Descriptor desc new Sticky View Descriptor singleton reg Element add Sticky View desc dirty Sticky true catch Core Exception e log an error since its not safe to open a dialog here Workbench Plugin log Unable to create sticky view descriptor e get Status NON NLS 1 List categories reg Element get Categories List views reg Element get View Descriptors List sticky reg Element get Sticky Descriptors if categories null categories size 0 views null views size 0 sticky null sticky size 0 return null return reg Element  buildNewCacheObject IExtensionDelta IExtension getExtension IConfigurationElement getConfigurationElements ViewRegistryElement regElement ViewRegistryElement IConfigurationElement getAttribute IWorkbenchConstants TAG_ID getName ViewRegistryReader TAG_VIEW descText IConfigurationElement getChildren TAG_DESCRIPTION descText getValue ViewDescriptor ViewDescriptor descText regElement addViewDescriptor dirtyViews CoreException WorkbenchPlugin getStatus getName ViewRegistryReader TAG_CATEGORY findCategory regElement addCategory dirtyCategories WorkbenchException WorkbenchPlugin getStatus getName ViewRegistryReader TAG_STICKYVIEW findSticky StickyViewDescriptor StickyViewDescriptor regElement addStickyView dirtySticky CoreException WorkbenchPlugin getStatus regElement getCategories regElement getViewDescriptors regElement getStickyDescriptors regElement
param id return private I Sticky View Descriptor find Sticky String id build Sticky for Iterator i sticky iterator i has Next I Sticky View Descriptor desc I Sticky View Descriptor i next if id equals desc get Id return desc return null  IStickyViewDescriptor findSticky buildSticky hasNext IStickyViewDescriptor IStickyViewDescriptor getId
Find a descriptor in the registry public I View Descriptor find String id build Views Iterator enum views iterator while enum has Next I View Descriptor desc I View Descriptor enum next if id equals desc getID return desc return null  IViewDescriptor buildViews hasNext IViewDescriptor IViewDescriptor
Find a category with a given name public Category find Category String id build Categories Iterator enum categories iterator while enum has Next Category cat Category enum next if id equals cat get Root Path return cat return null  findCategory buildCategories hasNext getRootPath
Get the list of view categories public Category get Categories build Categories int n Size categories size Category ret Array new Category n Size categories to Array ret Array return ret Array  getCategories buildCategories nSize retArray nSize toArray retArray retArray
Get the list of sticky views public I Sticky View Descriptor get Sticky Views build Sticky return I Sticky View Descriptor sticky to Array new I Sticky View Descriptor sticky size  IStickyViewDescriptor getStickyViews buildSticky IStickyViewDescriptor toArray IStickyViewDescriptor
Return the view category count public int get Category Count build Categories return categories size  getCategoryCount buildCategories
Returns the Misc category This may be null if there are no miscellaneous views public Category get Misc Category return misc Category  getMiscCategory miscCategory
Return the view count public int get View Count build Views return views size  getViewCount buildViews
Get an enumeration of view descriptors public I View Descriptor get Views build Views int n Size views size I View Descriptor ret Array new I View Descriptor n Size views to Array ret Array return ret Array  IViewDescriptor getViews buildViews nSize IViewDescriptor retArray IViewDescriptor nSize toArray retArray retArray
Adds each view in the registry to a particular category The view category may be defined in xml If not the view is added to the misc category public void map Views To Categories build Categories build Views Iterator enum views iterator while enum has Next I View Descriptor desc I View Descriptor enum next Category cat null String cat Path desc get Category Path if cat Path null String root Cat cat Path 0 cat Category find Category root Cat if cat null if cat has Element desc cat add Element desc else if misc Category null misc Category new Category add misc Category build Categories if cat Path null If we get here this view specified a category which does not exist Add this view to the Other category but give out a message to the log only indicating this has been done String fmt Category 0 not found for view 1 This view added to 2 category NON NLS 1 Workbench Plugin log Message Format format fmt new Object cat Path 0 desc getID misc Category get Label NON NLS 1 misc Category add Element desc  mapViewsToCategories buildCategories buildViews hasNext IViewDescriptor IViewDescriptor catPath getCategoryPath catPath rootCat catPath findCategory rootCat hasElement addElement miscCategory miscCategory miscCategory buildCategories catPath WorkbenchPlugin MessageFormat catPath miscCategory getLabel miscCategory addElement
private void build Views if dirty Views Build up the view arraylist views new Array List Object reg Elements get Registry Objects if reg Elements null dirty Views false return for int i 0 i reg Elements length i View Registry Element element View Registry Element reg Elements i List view Descs element get View Descriptors if view Descs null view Descs size 0 Iterator iter view Descs iterator while iter has Next I View Descriptor view I View Descriptor iter next views add view dirty Views false  buildViews dirtyViews ArrayList regElements getRegistryObjects regElements dirtyViews regElements ViewRegistryElement ViewRegistryElement regElements viewDescs getViewDescriptors viewDescs viewDescs viewDescs hasNext IViewDescriptor IViewDescriptor dirtyViews
private void build Categories if dirty Categories Build up the categories arraylist categories new Array List Object reg Elements get Registry Objects if reg Elements null dirty Categories false return for int i 0 i reg Elements length i View Registry Element element View Registry Element reg Elements i List temp Categories element get Categories if temp Categories null temp Categories size 0 Iterator iter temp Categories iterator while iter has Next Category category Category iter next categories add category dirty Categories false  buildCategories dirtyCategories ArrayList regElements getRegistryObjects regElements dirtyCategories regElements ViewRegistryElement ViewRegistryElement regElements tempCategories getCategories tempCategories tempCategories tempCategories hasNext dirtyCategories
private void build Sticky if dirty Sticky Build up the categories arraylist sticky new Array List Object reg Elements get Registry Objects if reg Elements null dirty Sticky false return for int i 0 i reg Elements length i View Registry Element element View Registry Element reg Elements i List temp Sticky element get Sticky Descriptors if temp Sticky null temp Sticky size 0 Iterator iter temp Sticky iterator while iter has Next I Sticky View Descriptor desc I Sticky View Descriptor iter next sticky add desc dirty Sticky false  buildSticky dirtySticky ArrayList regElements getRegistryObjects regElements dirtySticky regElements ViewRegistryElement ViewRegistryElement regElements tempSticky getStickyDescriptors tempSticky tempSticky tempSticky hasNext IStickyViewDescriptor IStickyViewDescriptor dirtySticky
public void post Change Processing map Views To Categories  postChangeProcessing mapViewsToCategories
public void dispose Platform get Extension Registry remove Registry Change Listener this  getExtensionRegistry removeRegistryChangeListener

Registry View Reader constructor comment public View Registry Reader super  RegistryViewReader ViewRegistryReader
Reads the category element protected void read Category I Configuration Element element try Category category new Category element view Registry add category catch Core Exception e log an error since its not safe to show a dialog here Workbench Plugin log Unable to create view category e get Status NON NLS 1  readCategory IConfigurationElement viewRegistry CoreException WorkbenchPlugin getStatus
read Element method comment protected boolean read Element I Configuration Element element if element get Name equals TAG VIEW read View element return true if element get Name equals TAG CATEGORY read Category element read Element Children element return true if element get Name equals TAG STICKYVIEW read Sticky element return true return false  readElement readElement IConfigurationElement getName TAG_VIEW readView getName TAG_CATEGORY readCategory readElementChildren getName TAG_STICKYVIEW readSticky
Reads the sticky view element private void read Sticky I Configuration Element element Sticky View Descriptor desc try desc new Sticky View Descriptor element view Registry add desc catch Core Exception e log an error since its not safe to open a dialog here Workbench Plugin log Unable to create sticky view descriptor e get Status NON NLS 1  readSticky IConfigurationElement StickyViewDescriptor StickyViewDescriptor viewRegistry CoreException WorkbenchPlugin getStatus
Reads the view element protected void read View I Configuration Element element try String desc Text get Description element View Descriptor desc new View Descriptor element desc Text view Registry add desc catch Core Exception e log an error since its not safe to open a dialog here Workbench Plugin log Unable to create view descriptor e get Status NON NLS 1  readView IConfigurationElement descText getDescription ViewDescriptor ViewDescriptor descText viewRegistry CoreException WorkbenchPlugin getStatus
Read the view extensions within a registry public void read Views I Extension Registry in View Registry out throws Core Exception this does not seem to really ever be throwing an the exception view Registry out read Registry in PlatformUI PLUGIN ID I Workbench Constants PL VIEWS out map Views To Categories  readViews IExtensionRegistry ViewRegistry CoreException viewRegistry readRegistry PLUGIN_ID IWorkbenchConstants PL_VIEWS mapViewsToCategories

protected final static String true String TRUE NON NLS 1 Create an instance of this class param plugin Point Id java lang String public Wizards Registry Reader String plugin Point Id plugin Point plugin Point Id  trueString pluginPointId WizardsRegistryReader pluginPointId pluginPoint pluginPointId
Adds new wizard to the provided collection Override to provide more logic protected void add New Element To Result Workbench Wizard Element wizard I Configuration Element config wizards add wizard  addNewElementToResult WorkbenchWizardElement IConfigurationElement
Creates empty element collection Overrider to fill initial elements if needed protected void create Empty Wizard Collection wizards new Adaptable List  createEmptyWizardCollection AdaptableList
Returns a new Workbench Wizard Element configured according to the parameters contained in the passed Registry May answer null if there was not enough information in the Extension to create an adequate wizard protected Workbench Wizard Element create Wizard Element I Configuration Element element Wizard Elements must have a name attribute String name String element get Attribute ATT NAME if name String null log Missing Attribute element ATT NAME return null Workbench Wizard Element result new Workbench Wizard Element name String if initialize Wizard result element return result ie initialization was successful return null  WorkbenchWizardElement WorkbenchWizardElement createWizardElement IConfigurationElement WizardElements nameString getAttribute ATT_NAME nameString logMissingAttribute ATT_NAME WorkbenchWizardElement WorkbenchWizardElement nameString initializeWizard
Returns the first wizard with a given id public Workbench Wizard Element find Wizard String id Object wizards get Wizard Collection Elements for int nX 0 nX wizards length nX Wizard Collection Element collection Wizard Collection Element wizards nX Workbench Wizard Element element collection find Wizard id true if element null return element return null  WorkbenchWizardElement findWizard getWizardCollectionElements WizardCollectionElement WizardCollectionElement WorkbenchWizardElement findWizard
Returns a list of wizards project and not The return value for this method is cached since computing its value requires non trivial work public Adaptable List get Wizards if are Wizards Read read Wizards return wizards  AdaptableList getWizards areWizardsRead readWizards
Initialize the passed element s properties based on the contents of the passed registry Answer a boolean indicating whether the element was able to be adequately initialized return boolean param element Workbench Wizard Element param extension Extension protected boolean initialize Wizard Workbench Wizard Element element I Configuration Element config element setID config get Attribute ATT ID element set Description get Description config apply CLASS and ICON properties element set Configuration Element config String icon Name config get Attribute ATT ICON if icon Name null I Extension extension config get Declaring Extension String extending Plugin Id extension get Namespace Image Descriptor image AbstractUI Plugin image Descriptor From Plugin extending Plugin Id icon Name element set Image Descriptor image ensure that a class was specified if element get Configuration Element null log Missing Attribute config ATT CLASS return false return true  WorkbenchWizardElement initializeWizard WorkbenchWizardElement IConfigurationElement getAttribute ATT_ID setDescription getDescription setConfigurationElement iconName getAttribute ATT_ICON iconName IExtension getDeclaringExtension extendingPluginId getNamespace ImageDescriptor AbstractUIPlugin imageDescriptorFromPlugin extendingPluginId iconName setImageDescriptor getConfigurationElement logMissingAttribute ATT_CLASS
Implement this method to read element attributes public boolean read Element I Configuration Element element if element get Name equals TAG WIZARD return false Workbench Wizard Element wizard create Wizard Element element if wizard null add New Element To Result wizard element return true  readElement IConfigurationElement getName TAG_WIZARD WorkbenchWizardElement createWizardElement addNewElementToResult
Reads the wizards in a registry protected void read Wizards if are Wizards Read create Empty Wizard Collection I Extension Registry registry Platform get Extension Registry read Registry registry Workbench Plugin PI WORKBENCH plugin Point  readWizards areWizardsRead createEmptyWizardCollection IExtensionRegistry getExtensionRegistry readRegistry WorkbenchPlugin PI_WORKBENCH pluginPoint
Returns whether the wizards have been read already protected boolean are Wizards Read return wizards null  areWizardsRead
protected Object get Wizard Collection Elements if are Wizards Read read Wizards return wizards get Children  getWizardCollectionElements areWizardsRead readWizards getChildren

Creates a descriptor from a configuration element param config Element configuration element to create a descriptor from public Working Set Descriptor I Configuration Element config Element throws Core Exception super this config Element config Element id config Element get Attribute ATT ID name config Element get Attribute ATT NAME icon config Element get Attribute ATT ICON page Class Name config Element get Attribute ATT PAGE CLASS if name null throw new Core Exception new Status I Status ERROR Workbench Plugin PI WORKBENCH 0 Invalid extension missing class name id NON NLS 1 null if page Class Name null throw new Core Exception new Status I Status ERROR Workbench Plugin PI WORKBENCH 0 Invalid extension missing page class name id NON NLS 1 null  configElement WorkingSetDescriptor IConfigurationElement configElement CoreException configElement configElement configElement getAttribute ATT_ID configElement getAttribute ATT_NAME configElement getAttribute ATT_ICON pageClassName configElement getAttribute ATT_PAGE_CLASS CoreException IStatus WorkbenchPlugin PI_WORKBENCH pageClassName CoreException IStatus WorkbenchPlugin PI_WORKBENCH
Creates a working set page from this extension descriptor return a working set page created from this extension descriptor public I Working Set Page create Working Set Page Object page null if page Class Name null try page Workbench Plugin create Extension config Element ATT PAGE CLASS catch Core Exception exception Workbench Plugin log Unable to create working set page NON NLS 1 page Class Name exception get Status return I Working Set Page page  IWorkingSetPage createWorkingSetPage pageClassName WorkbenchPlugin createExtension configElement ATT_PAGE_CLASS CoreException WorkbenchPlugin pageClassName getStatus IWorkingSetPage
Returns the page s icon return the page s icon public Image Descriptor get Icon if icon null return null I Extension extension config Element get Declaring Extension String extending Plugin Id extension get Namespace return AbstractUI Plugin image Descriptor From Plugin extending Plugin Id icon  ImageDescriptor getIcon IExtension configElement getDeclaringExtension extendingPluginId getNamespace AbstractUIPlugin imageDescriptorFromPlugin extendingPluginId
Returns the working set page id return the working set page id public String get Id return id  getId
Returns the working set page class name return the working set page class name public String get Page Class Name return page Class Name  getPageClassName pageClassName
Returns the name of the working set element type the page works with return the working set element type name public String get Name return name  getName

Adds a working set descriptor param descriptor working set descriptor to add Must not exist in the registry yet public void add Working Set Descriptor Working Set Descriptor descriptor Assert is True working Set Descriptors contains Value descriptor working set descriptor already registered NON NLS 1 working Set Descriptors put descriptor get Id descriptor  addWorkingSetDescriptor WorkingSetDescriptor isTrue workingSetDescriptors containsValue workingSetDescriptors getId
Returns the default resource based working set page return the default working set page public I Working Set Page get Default Working Set Page issue this will return the IDE resource working set page not good for generic workbench Working Set Descriptor descriptor Working Set Descriptor working Set Descriptors get DEFAULT PAGE ID if descriptor null return descriptor create Working Set Page return null  IWorkingSetPage getDefaultWorkingSetPage WorkingSetDescriptor WorkingSetDescriptor workingSetDescriptors DEFAULT_PAGE_ID createWorkingSetPage
Returns the working set descriptor with the given id param page Id working set page id return the working set descriptor with the given id public Working Set Descriptor get Working Set Descriptor String page Id return Working Set Descriptor working Set Descriptors get page Id  pageId WorkingSetDescriptor getWorkingSetDescriptor pageId WorkingSetDescriptor workingSetDescriptors pageId
Returns an array of all working set descriptors return an array of all working set descriptors public Working Set Descriptor get Working Set Descriptors return Working Set Descriptor working Set Descriptors values to Array new Working Set Descriptor working Set Descriptors size  WorkingSetDescriptor getWorkingSetDescriptors WorkingSetDescriptor workingSetDescriptors toArray WorkingSetDescriptor workingSetDescriptors
Returns the working set page with the given id param page Id working set page id return the working set page with the given id public I Working Set Page get Working Set Page String page Id Working Set Descriptor descriptor Working Set Descriptor working Set Descriptors get page Id if descriptor null return null return descriptor create Working Set Page  pageId IWorkingSetPage getWorkingSetPage pageId WorkingSetDescriptor WorkingSetDescriptor workingSetDescriptors pageId createWorkingSetPage
Loads the working set registry public void load Working Set Registry Reader reader new Working Set Registry Reader reader read Working Sets Platform get Extension Registry this  WorkingSetRegistryReader WorkingSetRegistryReader readWorkingSets getExtensionRegistry
for dynamic UI public void remove Working Set Descriptor String id working Set Descriptors remove id  removeWorkingSetDescriptor workingSetDescriptors

for dynamic UI public Working Set Registry Reader super  WorkingSetRegistryReader
for dynamic UI public Working Set Registry Reader Working Set Registry registry super this registry registry  WorkingSetRegistryReader WorkingSetRegistry
Overrides method in Registry Reader see Registry Reader read Element I Configuration Element for dynamic UI change access from protected to public public boolean read Element I Configuration Element element if element get Name equals TAG try Working Set Descriptor desc new Working Set Descriptor element registry add Working Set Descriptor desc catch Core Exception e log an error since its not safe to open a dialog here Workbench Plugin log Unable to create working set descriptor e get Status NON NLS 1 return true return false  RegistryReader RegistryReader readElement IConfigurationElement readElement IConfigurationElement getName WorkingSetDescriptor WorkingSetDescriptor addWorkingSetDescriptor CoreException WorkbenchPlugin getStatus
Reads the working set extensions within a registry param in the plugin registry to read from param out the working set registry to store read entries in public void read Working Sets I Extension Registry in Working Set Registry out registry out read Registry in PlatformUI PLUGIN ID I Workbench Constants PL WORKINGSETS  readWorkingSets IExtensionRegistry WorkingSetRegistry readRegistry PLUGIN_ID IWorkbenchConstants PL_WORKINGSETS

private boolean dirty true private I Menu Listener menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager manager mark Dirty dirty true  IMenuListener menuListener IMenuListener menuAboutToShow IMenuManager markDirty
Create a new instance public Reopen Editor Menu I Workbench Window window String id boolean show Separator super id this window window this show Separator show Separator history Workbench window get Workbench get Editor History  ReopenEditorMenu IWorkbenchWindow showSeparator showSeparator showSeparator getWorkbench getEditorHistory
Returns the text for a history item This may be truncated to fit within the MAX TEXT LENGTH private String calc Text int index Editor History Item item String Buffer sb new String Buffer int mnemonic index 1 sb append mnemonic if mnemonic MAX MNEMONIC SIZE sb insert sb length mnemonic length NON NLS 1 sb append NON NLS 1 IMPORTANT avoid accessing the item s input since this can require activating plugins Instead ask the item for the info which can consult its memento if it is not restored yet String file Name item get Name String path Name item get Tool Tip Text if path Name equals file Name tool tip text isn t necessarily a path sometimes it s the same as name so it shouldn t be treated as a path then path Name NON NLS 1 I Path path new Path path Name if last segment in path is the file Name remove it if path segment Count 1 path segment path segment Count 1 equals file Name path path remove Last Segments 1 path Name path to String if file Name length path Name length MAX TEXT LENGTH 4 entire item name fits within maximum length sb append file Name if path Name length 0 sb append NON NLS 1 sb append path Name sb append NON NLS 1 else need to shorten the item name int length file Name length if length MAX TEXT LENGTH file name does not fit within length truncate it sb append file Name substring 0 MAX TEXT LENGTH 3 sb append NON NLS 1 else if length MAX TEXT LENGTH 7 sb append file Name else sb append file Name int segment Count path segment Count if segment Count 0 length 7 7 chars are taken for sb append NON NLS 1 Add first n segments that fit int i 0 while i segment Count length MAX TEXT LENGTH String segment path segment i if length segment length MAX TEXT LENGTH sb append segment sb append I Path SEPARATOR length segment length 1 i else if i 0 append at least part of the first segment sb append segment substring 0 MAX TEXT LENGTH length length MAX TEXT LENGTH break else break sb append NON NLS 1 i segment Count 1 Add last n segments that fit while i 0 length MAX TEXT LENGTH String segment path segment i if length segment length MAX TEXT LENGTH sb append I Path SEPARATOR sb append segment length segment length 1 i else break sb append NON NLS 1 return sb to String  MAX_TEXT_LENGTH calcText EditorHistoryItem StringBuffer StringBuffer MAX_MNEMONIC_SIZE fileName getName pathName getToolTipText pathName fileName pathName IPath pathName fileName segmentCount segmentCount fileName removeLastSegments pathName toString fileName pathName MAX_TEXT_LENGTH fileName pathName pathName fileName MAX_TEXT_LENGTH fileName MAX_TEXT_LENGTH MAX_TEXT_LENGTH fileName fileName segmentCount segmentCount segmentCount segmentCount MAX_TEXT_LENGTH MAX_TEXT_LENGTH IPath MAX_TEXT_LENGTH MAX_TEXT_LENGTH segmentCount MAX_TEXT_LENGTH MAX_TEXT_LENGTH IPath toString
mi set Text text mi add Selection Listener new Selection Adapter public void widget Selected Selection Event e open item  setText addSelectionListener SelectionAdapter widgetSelected SelectionEvent
Platform run new Safe Runnable public void run throws Exception String text calc Text history Index item Menu Item mi new Menu Item menu SWT PUSH menu Index 0 menu Index 0 mi set Text text mi add Selection Listener new Selection Adapter public void widget Selected Selection Event e open item  SafeRunnable calcText historyIndex MenuItem MenuItem menuIndex menuIndex setText addSelectionListener SelectionAdapter widgetSelected SelectionEvent
public void handle Exception Throwable e just skip the item if there s an error e g in the calculation of the shortened name Workbench Plugin log Error in Reopen Editor Menu fill e NON NLS 1  handleException WorkbenchPlugin ReopenEditorMenu
Fills the given menu with menu items for all windows public void fill final Menu menu int index if window get Active Page null window get Active Page get Perspective null return if get Parent instanceof Menu Manager Menu Manager get Parent add Menu Listener menu Listener int items To Show Workbench Plugin get Default get Preference Store get Int I Preference Constants RECENT FILES if items To Show 0 return Get items Editor History Item history Items history get Items int n Math min items To Show history Items length if n 0 return if show Separator new Menu Item menu SWT SEPARATOR index index final int menu Index new int index for int i 0 i n i final Editor History Item item history Items i final int history Index i Platform run new Safe Runnable public void run throws Exception String text calc Text history Index item Menu Item mi new Menu Item menu SWT PUSH menu Index 0 menu Index 0 mi set Text text mi add Selection Listener new Selection Adapter public void widget Selected Selection Event e open item public void handle Exception Throwable e just skip the item if there s an error e g in the calculation of the shortened name Workbench Plugin log Error in Reopen Editor Menu fill e NON NLS 1 dirty false  getActivePage getActivePage getPerspective getParent MenuManager MenuManager getParent addMenuListener menuListener itemsToShow WorkbenchPlugin getDefault getPreferenceStore getInt IPreferenceConstants RECENT_FILES itemsToShow EditorHistoryItem historyItems getItems itemsToShow historyItems showSeparator MenuItem menuIndex EditorHistoryItem historyItems historyIndex SafeRunnable calcText historyIndex MenuItem MenuItem menuIndex menuIndex setText addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleException WorkbenchPlugin ReopenEditorMenu
Overridden to always return true and force dynamic menu building public boolean is Dirty return dirty  isDirty
Overridden to always return true and force dynamic menu building public boolean is Dynamic return true  isDynamic
Reopens the editor for the given history item private void open Editor History Item item I Workbench Page page window get Active Page if page null try String item Name item get Name if item is Restored item restore State I Editor Input input item get Input I Editor Descriptor desc item get Descriptor if input null desc null String title Workbench Messages get String Open Recent error Title NON NLS 1 String msg Workbench Messages format Open Recent unable To Open new String item Name NON NLS 1 Message Dialog open Warning window get Shell title msg history remove item else page open Editor input desc get Id catch Part Init Exception e2 String title Workbench Messages get String Open Recent error Title NON NLS 1 Message Dialog open Warning window get Shell title e2 get Message history remove item  EditorHistoryItem IWorkbenchPage getActivePage itemName getName isRestored restoreState IEditorInput getInput IEditorDescriptor getDescriptor WorkbenchMessages getString OpenRecent errorTitle WorkbenchMessages OpenRecent unableToOpen itemName MessageDialog openWarning getShell openEditor getId PartInitException WorkbenchMessages getString OpenRecent errorTitle MessageDialog openWarning getShell getMessage

This default constructor allows the the action to be called from the welcome page public Reset Perspective Action this PlatformUI get Workbench get Active Workbench Window  ResetPerspectiveAction getWorkbench getActiveWorkbenchWindow
Create an instance of this class public Reset Perspective Action I Workbench Window window super Workbench Messages get String Reset Perspective text NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window set Action Definition Id org eclipse ui window reset Perspective NON NLS 1 issue missing action id set Tool Tip Text Workbench Messages get String Reset Perspective tool Tip NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids RESET PERSPECTIVE ACTION  ResetPerspectiveAction IWorkbenchWindow WorkbenchMessages getString ResetPerspective IllegalArgumentException workbenchWindow setActionDefinitionId resetPerspective setToolTipText WorkbenchMessages getString ResetPerspective toolTip setEnabled WorkbenchHelp setHelp IHelpContextIds RESET_PERSPECTIVE_ACTION
public void run if workbench Window null action has been disposed return I Workbench Page page workbench Window get Active Page if page null page get Perspective null String message Workbench Messages format Reset Perspective message new Object page get Perspective get Label NON NLS 1 String buttons new String I Dialog Constants OK LABEL I Dialog Constants CANCEL LABEL Message Dialog d new Message Dialog workbench Window get Shell Workbench Messages get String Reset Perspective title NON NLS 1 null message Message Dialog QUESTION buttons 0 if d open 0 page reset Perspective  workbenchWindow IWorkbenchPage workbenchWindow getActivePage getPerspective WorkbenchMessages ResetPerspective getPerspective getLabel IDialogConstants OK_LABEL IDialogConstants CANCEL_LABEL MessageDialog MessageDialog workbenchWindow getShell WorkbenchMessages getString ResetPerspective MessageDialog resetPerspective
public void dispose if workbench Window null already disposed return workbench Window null  workbenchWindow workbenchWindow

Create an instance of this class public Save Action I Workbench Window window super Workbench Messages get String Save Action text window NON NLS 1 set Text Workbench Messages get String Save Action text NON NLS 1 set Tool Tip Text Workbench Messages get String Save Action tool Tip NON NLS 1 set Id save NON NLS 1 Workbench Help set Help this I Help Context Ids SAVE ACTION set Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL SAVE EDIT set Disabled Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL SAVE EDIT DISABLED set Action Definition Id org eclipse ui file save NON NLS 1  SaveAction IWorkbenchWindow WorkbenchMessages getString SaveAction setText WorkbenchMessages getString SaveAction setToolTipText WorkbenchMessages getString SaveAction toolTip setId WorkbenchHelp setHelp IHelpContextIds SAVE_ACTION setImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_SAVE_EDIT setDisabledImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_SAVE_EDIT_DISABLED setActionDefinitionId
public void run if get Workbench Window null action has been disposed return The code below was added to track the view with focus in order to support save actions from a view Remove this experimental code if the decision is to not allow views to participate in save actions see bug 10234 I Saveable Part save View get Saveable View if save View null Workbench Page get Active Part get Site get Page save Part save View get Active Part false return I Editor Part part get Active Editor if part null I Workbench Page page part get Site get Page page save Editor part false  getWorkbenchWindow ISaveablePart saveView getSaveableView saveView WorkbenchPage getActivePart getSite getPage savePart saveView getActivePart IEditorPart getActiveEditor IWorkbenchPage getSite getPage saveEditor
protected void update State The code below was added to track the view with focus in order to support save actions from a view Remove this experimental code if the decision is to not allow views to participate in save actions see bug 10234 I Saveable Part save View get Saveable View if save View null set Enabled save View is Dirty return I Editor Part editor get Active Editor set Enabled editor null editor is Dirty  updateState ISaveablePart saveView getSaveableView saveView setEnabled saveView isDirty IEditorPart getActiveEditor setEnabled isDirty

The default constructor public Save All Action I Workbench Window window super Workbench Messages get String Save All text window NON NLS 1 set Tool Tip Text Workbench Messages get String Save All tool Tip NON NLS 1 set Id save All NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids SAVE ALL ACTION set Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL SAVEALL EDIT set Disabled Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL SAVEALL EDIT DISABLED set Action Definition Id org eclipse ui file save All NON NLS 1  SaveAllAction IWorkbenchWindow WorkbenchMessages getString SaveAll setToolTipText WorkbenchMessages getString SaveAll toolTip setId saveAll setEnabled WorkbenchHelp setHelp IHelpContextIds SAVE_ALL_ACTION setImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_SAVEALL_EDIT setDisabledImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_SAVEALL_EDIT_DISABLED setActionDefinitionId saveAll
Method declared on Page Event Action public void page Activated I Workbench Page page super page Activated page update State  PageEventAction pageActivated IWorkbenchPage pageActivated updateState
Method declared on Page Event Action public void page Closed I Workbench Page page super page Closed page update State  PageEventAction pageClosed IWorkbenchPage pageClosed updateState
public void part Closed I Workbench Part part super part Closed part if part instanceof I Editor Part part remove Property Listener this parts With Listeners remove part update State  partClosed IWorkbenchPart partClosed IEditorPart removePropertyListener partsWithListeners updateState
public void part Opened I Workbench Part part super part Opened part if part instanceof I Editor Part part add Property Listener this parts With Listeners add part update State  partOpened IWorkbenchPart partOpened IEditorPart addPropertyListener partsWithListeners updateState
public void property Changed Object source int propID if source instanceof I Editor Part if propID I Editor Part PROP DIRTY update State  propertyChanged IEditorPart IEditorPart PROP_DIRTY updateState
public void run if get Workbench Window null action has been disposed return I Workbench Page page get Active Page if page null page save All Editors false  getWorkbenchWindow IWorkbenchPage getActivePage saveAllEditors
Updates availability depending on number of targets that need saving protected void update State I Workbench Page page get Active Page set Enabled page null page get Dirty Editors length 0  updateState IWorkbenchPage getActivePage setEnabled getDirtyEditors
public void dispose super dispose for Iterator it parts With Listeners iterator it has Next I Workbench Part part I Workbench Part it next part remove Property Listener this parts With Listeners clear  partsWithListeners hasNext IWorkbenchPart IWorkbenchPart removePropertyListener partsWithListeners

Create an instance of this class public Save As Action I Workbench Window window super Workbench Messages get String Save As text window NON NLS 1 set Action Definition Id org eclipse ui file save As NON NLS 1 set Text Workbench Messages get String Save As text NON NLS 1 set Tool Tip Text Workbench Messages get String Save As tool Tip NON NLS 1 set Id save As NON NLS 1 Workbench Help set Help this I Help Context Ids SAVE AS ACTION set Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL SAVEAS EDIT set Disabled Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL SAVEAS EDIT DISABLED  SaveAsAction IWorkbenchWindow WorkbenchMessages getString SaveAs setActionDefinitionId saveAs setText WorkbenchMessages getString SaveAs setToolTipText WorkbenchMessages getString SaveAs toolTip setId saveAs WorkbenchHelp setHelp IHelpContextIds SAVE_AS_ACTION setImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_SAVEAS_EDIT setDisabledImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_SAVEAS_EDIT_DISABLED
public void run if get Workbench Window null action has been disposed return The code below was added to track the view with focus in order to support save actions from a view Remove this experimental code if the decision is to not allow views to participate in save actions see bug 10234 I Saveable Part save View get Saveable View if save View null save View do Save As return I Editor Part editor get Active Editor if editor null editor do Save As  getWorkbenchWindow ISaveablePart saveView getSaveableView saveView saveView doSaveAs IEditorPart getActiveEditor doSaveAs
protected void update State The code below was added to track the view with focus in order to support save actions from a view Remove this experimental code if the decision is to not allow views to participate in save actions see bug 10234 I Saveable Part save View get Saveable View if save View null set Enabled save View is Save As Allowed return I Editor Part editor get Active Editor set Enabled editor null editor is Save As Allowed  updateState ISaveablePart saveView getSaveableView saveView setEnabled saveView isSaveAsAllowed IEditorPart getActiveEditor setEnabled isSaveAsAllowed

Create an instance of this class public Save Perspective Action I Workbench Window window super Workbench Messages get String Save Perspective text NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window set Action Definition Id org eclipse ui window save Perspective NON NLS 1 issue missing action id set Tool Tip Text Workbench Messages get String Save Perspective tool Tip NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids SAVE PERSPECTIVE ACTION  SavePerspectiveAction IWorkbenchWindow WorkbenchMessages getString SavePerspective IllegalArgumentException workbenchWindow setActionDefinitionId savePerspective setToolTipText WorkbenchMessages getString SavePerspective toolTip setEnabled WorkbenchHelp setHelp IHelpContextIds SAVE_PERSPECTIVE_ACTION
public void run if workbench Window null action has been disposed return I Workbench Page page workbench Window get Active Page if page null return Perspective Descriptor desc Perspective Descriptor page get Perspective if desc null if desc is Singleton save Singleton else save Non Singleton  workbenchWindow IWorkbenchPage workbenchWindow getActivePage PerspectiveDescriptor PerspectiveDescriptor getPerspective isSingleton saveSingleton saveNonSingleton
Save a singleton over itself public void save Singleton String buttons new String I Dialog Constants OK LABEL I Dialog Constants CANCEL LABEL Message Dialog d new Message Dialog workbench Window get Shell Workbench Messages get String Save Perspective overwrite Title NON NLS 1 null Workbench Messages get String Save Perspective singleton Question NON NLS 1 Message Dialog QUESTION buttons 0 if d open 0 I Workbench Page page workbench Window get Active Page if page null page save Perspective  saveSingleton IDialogConstants OK_LABEL IDialogConstants CANCEL_LABEL MessageDialog MessageDialog workbenchWindow getShell WorkbenchMessages getString SavePerspective overwriteTitle WorkbenchMessages getString SavePerspective singletonQuestion MessageDialog IWorkbenchPage workbenchWindow getActivePage savePerspective
Save a singleton over the user selection public void save Non Singleton Get reg Perspective Registry reg Perspective Registry Workbench Plugin get Default get Perspective Registry Get persp name Save Perspective Dialog dlg new Save Perspective Dialog workbench Window get Shell reg I Perspective Descriptor description null I Workbench Page page workbench Window get Active Page if page null description reg find Perspective With Id page get Perspective get Id dlg set Initial Selection description if dlg open I Dialog Constants OK ID return Create descriptor Perspective Descriptor desc Perspective Descriptor dlg get Persp if desc null String name dlg get Persp Name desc reg create Perspective name Perspective Descriptor description if desc null Message Dialog open Error dlg get Shell Workbench Messages get String Save Perspective error Title NON NLS 1 Workbench Messages get String Save Perspective error Message NON NLS 1 return Save state if page null page save Perspective As desc  saveNonSingleton PerspectiveRegistry PerspectiveRegistry WorkbenchPlugin getDefault getPerspectiveRegistry SavePerspectiveDialog SavePerspectiveDialog workbenchWindow getShell IPerspectiveDescriptor IWorkbenchPage workbenchWindow getActivePage findPerspectiveWithId getPerspective getId setInitialSelection IDialogConstants OK_ID PerspectiveDescriptor PerspectiveDescriptor getPersp getPerspName createPerspective PerspectiveDescriptor MessageDialog openError getShell WorkbenchMessages getString SavePerspective errorTitle WorkbenchMessages getString SavePerspective errorMessage savePerspectiveAs
public void dispose if workbench Window null already disposed return workbench Window null  workbenchWindow workbenchWindow

protected Thread operation protected Runnable runnable public Semaphore Runnable runnable this runnable runnable notifications 0 
Attempts to acquire this semaphore Returns true if it was successfully acquired and false otherwise public synchronized boolean acquire long delay throws Interrupted Exception if Thread interrupted throw new Interrupted Exception long start System current Time Millis long time Left delay while true if notifications 0 notifications return true if time Left 0 return false wait time Left time Left start delay System current Time Millis  InterruptedException InterruptedException currentTimeMillis timeLeft timeLeft timeLeft timeLeft currentTimeMillis
public boolean equals Object obj return runnable Semaphore obj runnable 
public Thread get Operation Thread return operation  getOperationThread
return operation public Runnable get Runnable return runnable  getRunnable
return runnable public int hash Code return runnable null 0 runnable hash Code  hashCode hashCode
return runnable null 0 runnable hash Code public synchronized void release notifications notify All  hashCode notifyAll
public void set Operation Thread Thread operation this operation operation  setOperationThread
for debug only public String to String return Semaphore runnable NON NLS 1 NON NLS 2  toString

public class Shared Images implements I Shared Images Retrieves the specified image from the workbench plugin s image registry see I Shared Images public Image get Image String symbolic Name Image image Workbench Images get Image symbolic Name if image null return image if there is a descriptor for it add the image to the registry Image Descriptor desc Workbench Images get Image Descriptor symbolic Name if desc null Workbench Images get Image Registry put symbolic Name desc return Workbench Images get Image Registry get symbolic Name return null  SharedImages ISharedImages ISharedImages getImage symbolicName WorkbenchImages getImage symbolicName ImageDescriptor WorkbenchImages getImageDescriptor symbolicName WorkbenchImages getImageRegistry symbolicName WorkbenchImages getImageRegistry symbolicName
Retrieves the specified image descriptor from the workbench plugin s image registry see I Shared Images public Image Descriptor get Image Descriptor String symbolic Name return Workbench Images get Image Descriptor symbolic Name  ISharedImages ImageDescriptor getImageDescriptor symbolicName WorkbenchImages getImageDescriptor symbolicName

private I Workbench Window window Create a new menu item public Show Fast View Contribution I Workbench Window window super show Fast View Contr NON NLS 1 this window window  IWorkbenchWindow ShowFastViewContribution IWorkbenchWindow showFastViewContr
private void update Item Tool Item item I View Reference ref if item get Image ref get Title Image item set Image ref get Title Image if Util equals item get Tool Tip Text ref get Title item set Tool Tip Text ref get Title  updateItem ToolItem IViewReference getImage getTitleImage setImage getTitleImage getToolTipText getTitle setToolTipText getTitle
public void property Changed Object source int prop Id if prop Id I Workbench Part Constants PROP TITLE if item is Disposed update Item item ref  propertyChanged propId propId IWorkbenchPartConstants PROP_TITLE isDisposed updateItem
see org eclipse swt events Dispose Listener widget Disposed org eclipse swt events Dispose Event public void widget Disposed Dispose Event e ref remove Property Listener property Listener  DisposeListener widgetDisposed DisposeEvent widgetDisposed DisposeEvent removePropertyListener propertyListener
item add Selection Listener new Selection Adapter public void widget Selected Selection Event e show View ref  addSelectionListener SelectionAdapter widgetSelected SelectionEvent showView
The default implementation of this code I Contribution Item code method does nothing Subclasses may override public void fill Tool Bar parent int index Get page Workbench Page page Workbench Page window get Active Page if page null return Get views I View Reference refs page get Fast Views Create tool item for each view int size refs length for int nX 0 nX size nX final I View Reference ref refs nX final Tool Item item new Tool Item parent SWT CHECK index update Item item ref item set Data FAST VIEW ref final I Property Listener property Listener new I Property Listener public void property Changed Object source int prop Id if prop Id I Workbench Part Constants PROP TITLE if item is Disposed update Item item ref ref add Property Listener property Listener item add Dispose Listener new Dispose Listener non Javadoc see org eclipse swt events Dispose Listener widget Disposed org eclipse swt events Dispose Event public void widget Disposed Dispose Event e ref remove Property Listener property Listener Select the active fast view s icon if ref page get Active Fast View item set Selection true else item set Selection false item add Selection Listener new Selection Adapter public void widget Selected Selection Event e show View ref index  IContributionItem ToolBar WorkbenchPage WorkbenchPage getActivePage IViewReference getFastViews IViewReference ToolItem ToolItem updateItem setData FAST_VIEW IPropertyListener propertyListener IPropertyListener propertyChanged propId propId IWorkbenchPartConstants PROP_TITLE isDisposed updateItem addPropertyListener propertyListener addDisposeListener DisposeListener DisposeListener widgetDisposed DisposeEvent widgetDisposed DisposeEvent removePropertyListener propertyListener getActiveFastView setSelection setSelection addSelectionListener SelectionAdapter widgetSelected SelectionEvent showView
Returns whether the contribution is dynamic public boolean is Dynamic return true  isDynamic
Open a view private void show View I View Reference ref Workbench Page page Workbench Page ref get Page page toggle Fast View ref  showView IViewReference WorkbenchPage WorkbenchPage getPage toggleFastView

Creates a new code Show In Action code protected Show In Action I Workbench Window window I View Descriptor desc super desc get Label set Image Descriptor desc get Image Descriptor Workbench Help set Help this I Help Context Ids SHOW IN ACTION this window window this desc desc  ShowInAction ShowInAction IWorkbenchWindow IViewDescriptor getLabel setImageDescriptor getImageDescriptor WorkbenchHelp setHelp IHelpContextIds SHOW_IN_ACTION
Shows the current context in this action s view public void run I Workbench Page page window get Active Page if page null beep return I Workbench Part source Part page get Active Part if source Part null beep return Show In Context context get Context source Part if context null beep return try I View Part view page show View desc get Id I Show In Target target get Show In Target view if target null target show context success else beep Workbench Page page performed Show In desc get Id TODO move back up catch Part Init Exception e Workbench Plugin log Error showing view in Show In Action run e get Status NON NLS 1  IWorkbenchPage getActivePage IWorkbenchPart sourcePart getActivePart sourcePart ShowInContext getContext sourcePart IViewPart showView getId IShowInTarget getShowInTarget WorkbenchPage performedShowIn getId PartInitException WorkbenchPlugin ShowInAction getStatus
Returns the code I Show In Source code provided by the source part or code null code if it does not provide one param source Part the source part return an code I Show In Source code or code null code private I Show In Source get Show In Source I Workbench Part source Part if source Part instanceof I Show In Source return I Show In Source source Part Object o source Part get Adapter I Show In Source class if o instanceof I Show In Source return I Show In Source o return null  IShowInSource sourcePart IShowInSource IShowInSource getShowInSource IWorkbenchPart sourcePart sourcePart IShowInSource IShowInSource sourcePart sourcePart getAdapter IShowInSource IShowInSource IShowInSource
Returns the code I Show In Target code for the given part or code null code if it does not provide one param target Part the target part return the code I Show In Target code or code null code private I Show In Target get Show In Target I Workbench Part target Part if target Part instanceof I Show In Target return I Show In Target target Part Object o target Part get Adapter I Show In Target class if o instanceof I Show In Target return I Show In Target o return null  IShowInTarget targetPart IShowInTarget IShowInTarget getShowInTarget IWorkbenchPart targetPart targetPart IShowInTarget IShowInTarget targetPart targetPart getAdapter IShowInTarget IShowInTarget IShowInTarget
Returns the code Show In Context code to show in the selected target or code null code if there is no valid context to show p This implementation obtains the context from the code I Show In Source code of the source part if provided or if the source part is an editor it creates the context from the editor s input and selection p Subclasses may extend or reimplement return the code Show In Context code to show or code null code private Show In Context get Context I Workbench Part source Part I Show In Source source get Show In Source source Part if source null Show In Context context source get Show In Context if context null return context else if source Part instanceof I Editor Part Object input I Editor Part source Part get Editor Input I Selection Provider sp source Part get Site get Selection Provider I Selection sel sp null null sp get Selection return new Show In Context input sel return null  ShowInContext IShowInSource ShowInContext ShowInContext getContext IWorkbenchPart sourcePart IShowInSource getShowInSource sourcePart ShowInContext getShowInContext sourcePart IEditorPart IEditorPart sourcePart getEditorInput ISelectionProvider sourcePart getSite getSelectionProvider ISelection getSelection ShowInContext
Generates a system beep private void beep window get Shell get Display beep  getShell getDisplay

private boolean dirty true private I Menu Listener menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager manager mark Dirty dirty true  IMenuListener menuListener IMenuListener menuAboutToShow IMenuManager markDirty
Creates a Show In menu param window the window containing the menu public Show In Menu I Workbench Window window String id super id this window window  ShowInMenu IWorkbenchWindow
protected I Workbench Window get Window return window  IWorkbenchWindow getWindow
public boolean is Dirty return dirty  isDirty
Overridden to always return true and force dynamic menu building public boolean is Dynamic return true  isDynamic
public void fill Menu menu int index if get Parent instanceof Menu Manager Menu Manager get Parent add Menu Listener menu Listener if dirty return Menu Manager manager new Menu Manager fill Menu manager I Contribution Item items manager get Items if items length 0 Menu Item item new Menu Item menu SWT NONE index item set Text NO TARGETS MSG item set Enabled false else for int i 0 i items length i items i fill menu index dirty false  getParent MenuManager MenuManager getParent addMenuListener menuListener MenuManager MenuManager fillMenu IContributionItem getItems MenuItem MenuItem setText NO_TARGETS_MSG setEnabled
Fills the menu with Show In actions private void fill Menu I Menu Manager inner Mgr Remove all inner Mgr remove All I Workbench Part source Part get Source Part if source Part null return Show In Context context get Context source Part if context null return if context get Input null context get Selection null context get Selection is Empty return I View Descriptor view Descs get View Descriptors source Part if view Descs length 0 return for int i 0 i view Descs length i I Action action get Action view Descs i if action null inner Mgr add action  fillMenu IMenuManager innerMgr innerMgr removeAll IWorkbenchPart sourcePart getSourcePart sourcePart ShowInContext getContext sourcePart getInput getSelection getSelection isEmpty IViewDescriptor viewDescs getViewDescriptors sourcePart viewDescs viewDescs IAction getAction viewDescs innerMgr
Returns the action for the given view id or null if not found private I Action get Action I View Descriptor desc Keep a cache rather than creating a new action each time so that image caching in Action Contribution Item works I Action action I Action actions get desc get Id if action null if desc null action new Show In Action window desc actions put desc get Id action return action  IAction getAction IViewDescriptor ActionContributionItem IAction IAction getId ShowInAction getId
Returns the Show In target part ids for the given source part Merges the contributions from the current perspective and the source part private Array List get Show In Part Ids I Workbench Part source Part Array List target Ids new Array List Workbench Page page Workbench Page get Window get Active Page if page null target Ids add All page get Show In Part Ids I Show In Target List target List get Show In Target List source Part if target List null String part Ids target List get Show In Target Ids if part Ids null for int i 0 i part Ids length i if target Ids contains part Ids i target Ids add part Ids i page sort Show In Part Ids target Ids return target Ids  ArrayList getShowInPartIds IWorkbenchPart sourcePart ArrayList targetIds ArrayList WorkbenchPage WorkbenchPage getWindow getActivePage targetIds addAll getShowInPartIds IShowInTargetList targetList getShowInTargetList sourcePart targetList partIds targetList getShowInTargetIds partIds partIds targetIds partIds targetIds partIds sortShowInPartIds targetIds targetIds
Returns the source part or code null code if there is no applicable source part p This implementation returns the current part in the window Subclasses may extend or reimplement return the source part or code null code private I Workbench Part get Source Part I Workbench Page page get Window get Active Page if page null return page get Active Part return null  IWorkbenchPart getSourcePart IWorkbenchPage getWindow getActivePage getActivePart
Returns the code I Show In Source code provided by the source part or code null code if it does not provide one param source Part the source part return an code I Show In Source code or code null code private I Show In Source get Show In Source I Workbench Part source Part if source Part instanceof I Show In Source return I Show In Source source Part Object o source Part get Adapter I Show In Source class if o instanceof I Show In Source return I Show In Source o return null  IShowInSource sourcePart IShowInSource IShowInSource getShowInSource IWorkbenchPart sourcePart sourcePart IShowInSource IShowInSource sourcePart sourcePart getAdapter IShowInSource IShowInSource IShowInSource
Returns the code I Show In Target List code for the given source part or code null code if it does not provide one param source Part the source part return the code I Show In Target List code or code null code private I Show In Target List get Show In Target List I Workbench Part source Part if source Part instanceof I Show In Target List return I Show In Target List source Part Object o source Part get Adapter I Show In Target List class if o instanceof I Show In Target List return I Show In Target List o return null  IShowInTargetList sourcePart IShowInTargetList IShowInTargetList getShowInTargetList IWorkbenchPart sourcePart sourcePart IShowInTargetList IShowInTargetList sourcePart sourcePart getAdapter IShowInTargetList IShowInTargetList IShowInTargetList
Returns the code Show In Context code to show in the selected target or code null code if there is no valid context to show p This implementation obtains the context from the code I Show In Source code of the source part if provided or if the source part is an editor it creates the context from the editor s input and selection p Subclasses may extend or reimplement return the code Show In Context code to show or code null code private Show In Context get Context I Workbench Part source Part I Show In Source source get Show In Source source Part if source null Show In Context context source get Show In Context if context null return context else if source Part instanceof I Editor Part Object input I Editor Part source Part get Editor Input I Selection Provider sp source Part get Site get Selection Provider I Selection sel sp null null sp get Selection return new Show In Context input sel return null  ShowInContext IShowInSource ShowInContext ShowInContext getContext IWorkbenchPart sourcePart IShowInSource getShowInSource sourcePart ShowInContext getShowInContext sourcePart IEditorPart IEditorPart sourcePart getEditorInput ISelectionProvider sourcePart getSite getSelectionProvider ISelection getSelection ShowInContext
Returns the view descriptors to show in the dialog private I View Descriptor get View Descriptors I Workbench Part source Part String src Id source Part get Site get Id Array List ids get Show In Part Ids source Part Array List descs new Array List I View Registry reg Workbench Plugin get Default get View Registry for Iterator i ids iterator i has Next String id String i next if id equals src Id I View Descriptor desc reg find id if desc null descs add desc return I View Descriptor descs to Array new I View Descriptor descs size  IViewDescriptor getViewDescriptors IWorkbenchPart sourcePart srcId sourcePart getSite getId ArrayList getShowInPartIds sourcePart ArrayList ArrayList IViewRegistry WorkbenchPlugin getDefault getViewRegistry hasNext srcId IViewDescriptor IViewDescriptor toArray IViewDescriptor

Constructor for Show Part Pane Menu Action param text public Show Part Pane Menu Action I Workbench Window window super NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window issue missing action id init Text workbench Window get Part Service add Part Listener this Workbench Help set Help this I Help Context Ids SHOW PART PANE MENU ACTION set Action Definition Id org eclipse ui window show System Menu NON NLS 1  ShowPartPaneMenuAction ShowPartPaneMenuAction IWorkbenchWindow IllegalArgumentException workbenchWindow initText workbenchWindow getPartService addPartListener WorkbenchHelp setHelp IHelpContextIds SHOW_PART_PANE_MENU_ACTION setActionDefinitionId showSystemMenu
Initialize the menu text and tooltip protected void init Text set Text Workbench Messages get String Show Part Pane Menu Action text NON NLS 1 set Tool Tip Text Workbench Messages get String Show Part Pane Menu Action tool Tip NON NLS 1  initText setText WorkbenchMessages getString ShowPartPaneMenuAction setToolTipText WorkbenchMessages getString ShowPartPaneMenuAction toolTip
Show the pane title menu protected void show Menu Part Pane pane pane show Pane Menu  showMenu PartPane showPaneMenu
Updates the enabled state protected void update State set Enabled get Active Part null  updateState setEnabled getActivePart
See Action public void run With Event Event e if workbench Window null action has been disposed return accelerator e detail I Workbench Part part get Active Part if part null show Menu Part Site part get Site get Pane  runWithEvent workbenchWindow IWorkbenchPart getActivePart showMenu PartSite getSite getPane
See I Part Listener public void part Opened I Workbench Part part super part Opened part update State  IPartListener partOpened IWorkbenchPart partOpened updateState
See I Part Listener public void part Closed I Workbench Part part super part Closed part update State  IPartListener partClosed IWorkbenchPart partClosed updateState
See I Part Listener public void part Activated I Workbench Part part super part Activated part update State  IPartListener partActivated IWorkbenchPart partActivated updateState
See I Part Listener public void part Deactivated I Workbench Part part super part Deactivated part update State  IPartListener partDeactivated IWorkbenchPart partDeactivated updateState
public int get Accelerator int accelerator this accelerator accelerator accelerator SWT CTRL accelerator accelerator SWT SHIFT accelerator accelerator SWT ALT return accelerator  getAccelerator
public void dispose if workbench Window null already disposed return workbench Window get Part Service remove Part Listener this workbench Window null  workbenchWindow workbenchWindow getPartService removePartListener workbenchWindow

Show View Action constructor comment protected Show View Action I Workbench Window window I View Descriptor desc super NON NLS 1 String accel desc get Accelerator String label desc get Label set Text accel null label label accel NON NLS 1 set Image Descriptor desc get Image Descriptor set Tool Tip Text label Workbench Help set Help this I Help Context Ids SHOW VIEW ACTION this window window this desc desc  ShowViewAction ShowViewAction IWorkbenchWindow IViewDescriptor getAccelerator getLabel setText setImageDescriptor getImageDescriptor setToolTipText WorkbenchHelp setHelp IHelpContextIds SHOW_VIEW_ACTION
Implementation of method defined on code I Action code public void run I Workbench Page page window get Active Page if page null try page show View desc getID catch Part Init Exception e Error Dialog open Error window get Shell Workbench Messages get String Show View error Title NON NLS 1 e get Message e get Status  IAction IWorkbenchPage getActivePage showView PartInitException ErrorDialog openError getShell WorkbenchMessages getString ShowView errorTitle getMessage getStatus
see org eclipse ui activities support I Plugin Contribution from Plugin public boolean from Plugin return desc instanceof I Plugin Contribution I Plugin Contribution desc get Plugin Id null  IPluginContribution fromPlugin fromPlugin IPluginContribution IPluginContribution getPluginId
see org eclipse ui activities support I Plugin Contribution get Local Id public String get Local Id return desc get Id  IPluginContribution getLocalId getLocalId getId
public String get Plugin Id return desc instanceof I Plugin Contribution I Plugin Contribution desc get Plugin Id null  getPluginId IPluginContribution IPluginContribution getPluginId

private Comparator action Comparator new Comparator public int compare Object o1 Object o2 if collator null collator Collator get Instance I Action a1 I Action o1 I Action a2 I Action o2 return collator compare a1 get Text a2 get Text  actionComparator getInstance IAction IAction IAction IAction getText getText
private Action show Dlg Action new Action Workbench Messages get String Show View title NON NLS 1 public void run show Other  showDlgAction WorkbenchMessages getString ShowView showOther
protected boolean dirty true private I Menu Listener menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager manager mark Dirty dirty true  IMenuListener menuListener IMenuListener menuAboutToShow IMenuManager markDirty
Creates a Show View menu param window the window containing the menu public Show View Menu I Workbench Window window String id super id this window window Workbench Help set Help show Dlg Action I Help Context Ids SHOW VIEW OTHER ACTION  ShowViewMenu IWorkbenchWindow WorkbenchHelp setHelp showDlgAction IHelpContextIds SHOW_VIEW_OTHER_ACTION
public boolean is Dirty return dirty  isDirty
Overridden to always return true and force dynamic menu building public boolean is Dynamic return true  isDynamic
Fills the menu with Show View actions private void fill Menu I Menu Manager inner Mgr Remove all inner Mgr remove All If no page disable all I Workbench Page page window get Active Page if page null return If no active perspective disable all if page get Perspective null return Get visible actions List view Ids Workbench Page page get Show View Action Ids add all open views view Ids add Opened Views page view Ids List actions new Array List view Ids size for Iterator i view Ids iterator i has Next String id String i next if id equals I Intro Constants INTRO VIEW ID continue I Action action get Action id if action null if Workbench Activity Helper filter Item action continue actions add action Collections sort actions action Comparator for Iterator i actions iterator i has Next inner Mgr add I Action i next Add Other inner Mgr add new Separator inner Mgr add show Dlg Action  fillMenu IMenuManager innerMgr innerMgr removeAll IWorkbenchPage getActivePage getPerspective viewIds WorkbenchPage getShowViewActionIds viewIds addOpenedViews viewIds ArrayList viewIds viewIds hasNext IIntroConstants INTRO_VIEW_ID IAction getAction WorkbenchActivityHelper filterItem actionComparator hasNext innerMgr IAction innerMgr innerMgr showDlgAction
private List add Opened Views I Workbench Page page List actions Array List views get Parts page Array List result new Array List views size actions size for int i 0 i actions size i Object element actions get i if result index Of element 0 result add element for int i 0 i views size i Object element views get i if result index Of element 0 result add element return result  addOpenedViews IWorkbenchPage ArrayList getParts ArrayList ArrayList indexOf indexOf
Returns the action for the given view id or null if not found private I Action get Action String id Keep a cache rather than creating a new action each time so that image caching in Action Contribution Item works I Action action I Action actions get id if action null I View Registry reg Workbench Plugin get Default get View Registry I View Descriptor desc reg find id if desc null action new Show View Action window desc action set Action Definition Id id actions put id action return action  IAction getAction ActionContributionItem IAction IAction IViewRegistry WorkbenchPlugin getDefault getViewRegistry IViewDescriptor ShowViewAction setActionDefinitionId
Opens the view selection dialog protected void show Other I Workbench Page page window get Active Page if page null return Show View Dialog dlg new Show View Dialog window get Shell Workbench Plugin get Default get View Registry dlg open if dlg get Return Code Window CANCEL return I View Descriptor descs dlg get Selection for int i 0 i descs length i try page show View descs i getID catch Part Init Exception e Error Dialog open Error window get Shell Workbench Messages get String Show View error Title NON NLS 1 e get Message e get Status  showOther IWorkbenchPage getActivePage ShowViewDialog ShowViewDialog getShell WorkbenchPlugin getDefault getViewRegistry getReturnCode IViewDescriptor getSelection showView PartInitException ErrorDialog openError getShell WorkbenchMessages getString ShowView errorTitle getMessage getStatus
private Array List get Parts I Workbench Page page Array List parts Array List opened Views get page if parts null parts new Array List opened Views put page parts return parts  ArrayList getParts IWorkbenchPage ArrayList ArrayList openedViews ArrayList openedViews
public void fill Menu menu int index if get Parent instanceof Menu Manager Menu Manager get Parent add Menu Listener menu Listener if dirty return Menu Manager manager new Menu Manager fill Menu manager I Contribution Item items manager get Items for int i 0 i items length i items i fill menu index dirty false  getParent MenuManager MenuManager getParent addMenuListener menuListener MenuManager MenuManager fillMenu IContributionItem getItems
for dynamic UI protected void remove Action String view Id actions remove view Id  removeAction viewId viewId

Constructor for Show View Menu Action param window public Show View Menu Action I Workbench Window window super window issue missing action id Workbench Help set Help this I Help Context Ids SHOW VIEW MENU ACTION set Action Definition Id org eclipse ui window show View Menu NON NLS 1  ShowViewMenuAction ShowViewMenuAction IWorkbenchWindow WorkbenchHelp setHelp IHelpContextIds SHOW_VIEW_MENU_ACTION setActionDefinitionId showViewMenu
Initialize the menu text and tooltip protected void init Text set Text Workbench Messages get String Show View Menu Action text NON NLS 1 set Tool Tip Text Workbench Messages get String Show View Menu Action tool Tip NON NLS 1  initText setText WorkbenchMessages getString ShowViewMenuAction setToolTipText WorkbenchMessages getString ShowViewMenuAction toolTip
Show the pane title menu protected void show Menu Part Pane pane pane show View Menu  showMenu PartPane showViewMenu
Updates the enabled state protected void update State super update State All of the conditions in the super class passed now check for the menu if is Enabled Part Pane pane Part Site get Active Part get Site get Pane set Enabled pane instanceof View Pane View Pane pane has View Menu  updateState updateState isEnabled PartPane PartSite getActivePart getSite getPane setEnabled ViewPane ViewPane hasViewMenu

private boolean dirty true private I Menu Listener menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager manager mark Dirty dirty true  IMenuListener menuListener IMenuListener menuAboutToShow IMenuManager markDirty
Creates a new instance of this class param window the workbench window this action applies to param show Separator whether to add a separator in the menu public Switch To Window Menu I Workbench Window window String id boolean show Separator super id this workbench Window window this show Separator show Separator  showSeparator SwitchToWindowMenu IWorkbenchWindow showSeparator workbenchWindow showSeparator showSeparator
Returns the text for a window This may be truncated to fit within the MAX TEXT LENGTH private String calc Text int number I Workbench Window window String suffix window get Shell get Text if suffix null return null String Buffer sb new String Buffer if number 10 sb append sb append number sb append if suffix length MAX TEXT LENGTH sb append suffix else sb append suffix substring 0 MAX TEXT LENGTH sb append NON NLS 1 return sb to String  MAX_TEXT_LENGTH calcText IWorkbenchWindow getShell getText StringBuffer StringBuffer MAX_TEXT_LENGTH MAX_TEXT_LENGTH toString
mi add Selection Listener new Selection Adapter public void widget Selected Selection Event e Shell window Shell window get Shell if window Shell get Minimized window Shell set Minimized false window Shell set Active window Shell move Above null  addSelectionListener SelectionAdapter widgetSelected SelectionEvent windowShell getShell windowShell getMinimized windowShell setMinimized windowShell setActive windowShell moveAbove
Fills the given menu with menu items for all opened workbench windows public void fill Menu menu int index Get workbench windows I Workbench workbench workbench Window get Workbench I Workbench Window array workbench get Workbench Windows avoid showing the separator and list for 0 or 1 items if array length 2 return if get Parent instanceof Menu Manager Menu Manager get Parent add Menu Listener menu Listener if dirty return Add separator if show Separator new Menu Item menu SWT SEPARATOR index index Add one item for each window int count 1 for int i 0 i array length i final I Workbench Window window array i can encounter disposed shells if this update is in response to a shell closing if window get Shell is Disposed String name calc Text count window if name null Menu Item mi new Menu Item menu SWT RADIO index index count mi set Text name mi add Selection Listener new Selection Adapter public void widget Selected Selection Event e Shell window Shell window get Shell if window Shell get Minimized window Shell set Minimized false window Shell set Active window Shell move Above null mi set Selection window workbench Window dirty false  IWorkbench workbenchWindow getWorkbench IWorkbenchWindow getWorkbenchWindows getParent MenuManager MenuManager getParent addMenuListener menuListener showSeparator MenuItem IWorkbenchWindow getShell isDisposed calcText MenuItem MenuItem setText addSelectionListener SelectionAdapter widgetSelected SelectionEvent windowShell getShell windowShell getMinimized windowShell setMinimized windowShell setActive windowShell moveAbove setSelection workbenchWindow
Overridden to always return true and force dynamic menu building public boolean is Dirty return dirty  isDirty
Overridden to always return true and force dynamic menu building public boolean is Dynamic return true  isDynamic

Constructs a new workbench testable object public Workbench Testable do nothing  WorkbenchTestable
Initializes the workbench testable with the display and workbench and notifies all listeners that the tests can be run param display the display param workbench the workbench public void init Display display I Workbench workbench Assert is Not Null display Assert is Not Null workbench this display display this workbench workbench if get Test Harness null new Thread new Runnable public void run get Test Harness run Tests start  IWorkbench isNotNull isNotNull getTestHarness getTestHarness runTests
The code Workbench Testable code implementation of this code Testable Object code method ensures that the workbench has been set public void testing Starting Assert is Not Null workbench old Automated Mode Error Dialog AUTOMATED MODE Error Dialog AUTOMATED MODE true old Ignore Errors Safe Runnable get Ignore Errors Safe Runnable set Ignore Errors true  WorkbenchTestable TestableObject testingStarting isNotNull oldAutomatedMode ErrorDialog AUTOMATED_MODE ErrorDialog AUTOMATED_MODE oldIgnoreErrors SafeRunnable getIgnoreErrors SafeRunnable setIgnoreErrors
The code Workbench Testable code implementation of this code Testable Object code method flushes the event queue runs the test in a code sync Exec code then flushes the event queue again public void run Test Runnable test Runnable Assert is Not Null workbench display sync Exec test Runnable  WorkbenchTestable TestableObject syncExec runTest testRunnable isNotNull syncExec testRunnable
force events to be processed and ensure the close is done in the UI thread display sync Exec new Runnable public void run Assert is True workbench close  syncExec isTrue
The code Workbench Testable code implementation of this code Testable Object code method flushes the event queue then closes the workbench public void testing Finished force events to be processed and ensure the close is done in the UI thread display sync Exec new Runnable public void run Assert is True workbench close Error Dialog AUTOMATED MODE old Automated Mode Safe Runnable set Ignore Errors old Ignore Errors  WorkbenchTestable TestableObject testingFinished syncExec isTrue ErrorDialog AUTOMATED_MODE oldAutomatedMode SafeRunnable setIgnoreErrors oldIgnoreErrors

see org eclipse jface text I Information Control Creator create Information Control org eclipse swt widgets Shell public I Information Control create Information Control Shell parent return new Annotation Expansion Control parent SWT NONE f Annotation Access  IInformationControlCreator createInformationControl IInformationControl createInformationControl AnnotationExpansionControl fAnnotationAccess
see org eclipse jface text I Information Control Creator Extension can Reuse org eclipse jface text I Information Control public boolean can Reuse I Information Control control return control instanceof Annotation Expansion Control  IInformationControlCreatorExtension canReuse IInformationControl canReuse IInformationControl AnnotationExpansionControl
see org eclipse jface text I Information Control Creator Extension can Replace org eclipse jface text I Information Control Creator public boolean can Replace I Information Control Creator creator return creator this  IInformationControlCreatorExtension canReplace IInformationControlCreator canReplace IInformationControlCreator
see org eclipse jface text source I Vertical Ruler Listener annotation Selected org eclipse jface text source Vertical Ruler Event public void annotation Selected Vertical Ruler Event event f Composite Ruler fire Annotation Selected event  IVerticalRulerListener annotationSelected VerticalRulerEvent annotationSelected VerticalRulerEvent fCompositeRuler fireAnnotationSelected
see org eclipse jface text source I Vertical Ruler Listener annotation Default Selected org eclipse jface text source Vertical Ruler Event public void annotation Default Selected Vertical Ruler Event event f Composite Ruler fire Annotation Default Selected event  IVerticalRulerListener annotationDefaultSelected VerticalRulerEvent annotationDefaultSelected VerticalRulerEvent fCompositeRuler fireAnnotationDefaultSelected
see org eclipse jface text source I Vertical Ruler Listener annotation Context Menu About To Show org eclipse jface text source Vertical Ruler Event org eclipse swt widgets Menu public void annotation Context Menu About To Show Vertical Ruler Event event Menu menu f Composite Ruler fire Annotation Context Menu About To Show event menu  IVerticalRulerListener annotationContextMenuAboutToShow VerticalRulerEvent annotationContextMenuAboutToShow VerticalRulerEvent fCompositeRuler fireAnnotationContextMenuAboutToShow
Creates a new hover instance param ruler param access param double Click Listener public Annotation Expand Hover Composite Ruler ruler I Annotation Access access I Double Click Listener double Click Listener f Composite Ruler ruler f Annotation Access access f Dbl Click Listener double Click Listener  doubleClickListener AnnotationExpandHover CompositeRuler IAnnotationAccess IDoubleClickListener doubleClickListener fCompositeRuler fAnnotationAccess fDblClickListener doubleClickListener
see org eclipse jface text source I Annotation Hover get Hover Info org eclipse jface text source I Source Viewer int public String get Hover Info I Source Viewer source Viewer int line we don t have any sensible return value as text return null  IAnnotationHover getHoverInfo ISourceViewer getHoverInfo ISourceViewer sourceViewer
protected Object get Hover Info For Line I Source Viewer viewer int line I Annotation Model model viewer get Annotation Model I Document document viewer get Document if model null return null List exact new Array List Hash Map messages At Position new Hash Map Iterator e model get Annotation Iterator while e has Next Annotation annotation Annotation e next Position position model get Position annotation if position null continue if compare Ruler Line position document line 1 if is Duplicate Message messages At Position position annotation get Text continue exact add annotation if exact size 1 return null sort exact model if exact size 0 set Last Ruler Mouse Location viewer line Annotation Hover Input input new Annotation Hover Input input f Annotations Annotation exact to Array new Annotation 0 input f Viewer viewer input f Ruler Info f Composite Ruler input f Annotation Listener fg Listener input f Double Click Listener f Dbl Click Listener input model model return input  getHoverInfoForLine ISourceViewer IAnnotationModel getAnnotationModel IDocument getDocument ArrayList HashMap messagesAtPosition HashMap getAnnotationIterator hasNext getPosition compareRulerLine isDuplicateMessage messagesAtPosition getText setLastRulerMouseLocation AnnotationHoverInput AnnotationHoverInput fAnnotations toArray fViewer fRulerInfo fCompositeRuler fAnnotationListener fgListener fDoubleClickListener fDblClickListener
public int compare Object o1 Object o2 Annotation a1 Annotation o1 Annotation a2 Annotation o2 Position p1 model get Position a1 Position p2 model get Position a2 annotation order primary order by position in line secondary annotation importance if p1 offset p2 offset return get Order a2 get Order a1 else return p1 offset p2 offset  getPosition getPosition getOrder getOrder
protected void sort List exact final I Annotation Model model class Annotation Comparator implements Comparator see java util Comparator compare java lang Object java lang Object public int compare Object o1 Object o2 Annotation a1 Annotation o1 Annotation a2 Annotation o2 Position p1 model get Position a1 Position p2 model get Position a2 annotation order primary order by position in line secondary annotation importance if p1 offset p2 offset return get Order a2 get Order a1 else return p1 offset p2 offset Collections sort exact new Annotation Comparator  IAnnotationModel AnnotationComparator getPosition getPosition getOrder getOrder AnnotationComparator
protected int get Order Annotation annotation if f Annotation Access instanceof I Annotation Access Extension I Annotation Access Extension extension I Annotation Access Extension f Annotation Access return extension get Layer annotation return I Annotation Access Extension DEFAULT LAYER  getOrder fAnnotationAccess IAnnotationAccessExtension IAnnotationAccessExtension IAnnotationAccessExtension fAnnotationAccess getLayer IAnnotationAccessExtension DEFAULT_LAYER
protected boolean is Duplicate Message Map messages At Position Position position String message if messages At Position contains Key position Object value messages At Position get position if message null message equals value return true if value instanceof List List messages List value if messages contains message return true else messages add message else Array List messages new Array List messages add value messages add message messages At Position put position messages else messages At Position put position message return false  isDuplicateMessage messagesAtPosition messagesAtPosition containsKey messagesAtPosition ArrayList ArrayList messagesAtPosition messagesAtPosition
protected void set Last Ruler Mouse Location I Source Viewer viewer int line set last mouse activity in order to get the correct context menu if f Composite Ruler null Styled Text st viewer get Text Widget if st null st is Disposed if viewer instanceof I Text Viewer Extension5 int widget Line I Text Viewer Extension5 viewer model Line2 Widget Line line Point loc st get Location At Offset st get Offset At Line widget Line f Composite Ruler set Location Of Last Mouse Button Activity 0 loc y else if viewer instanceof Text Viewer TODO remove once Text Viewer implements the extension int widget Line Text Viewer viewer model Line2 Widget Line line Point loc st get Location At Offset st get Offset At Line widget Line f Composite Ruler set Location Of Last Mouse Button Activity 0 loc y  setLastRulerMouseLocation ISourceViewer fCompositeRuler StyledText getTextWidget isDisposed ITextViewerExtension5 widgetLine ITextViewerExtension5 modelLine2WidgetLine getLocationAtOffset getOffsetAtLine widgetLine fCompositeRuler setLocationOfLastMouseButtonActivity TextViewer TextViewer widgetLine TextViewer modelLine2WidgetLine getLocationAtOffset getOffsetAtLine widgetLine fCompositeRuler setLocationOfLastMouseButtonActivity
Returns the distance to the ruler line param position the position param document the document param line the line number return the distance to the ruler line protected int compare Ruler Line Position position I Document document int line if position get Offset 1 position get Length 1 try int first Line document get Line Of Offset position get Offset if line first Line return 1 if first Line line line document get Line Of Offset position get Offset position get Length return 2 catch Bad Location Exception x return 0  compareRulerLine IDocument getOffset getLength firstLine getLineOfOffset getOffset firstLine firstLine getLineOfOffset getOffset getLength BadLocationException
see org eclipse jface text source I Annotation Hover Extension get Hover Control Creator public I Information Control Creator get Hover Control Creator return fg Creator  IAnnotationHoverExtension getHoverControlCreator IInformationControlCreator getHoverControlCreator fgCreator
see org eclipse jface text source I Annotation Hover Extension get Hover Info org eclipse jface text source I Source Viewer org eclipse jface text source I Line Range int public Object get Hover Info I Source Viewer source Viewer I Line Range line Range int visible Lines return get Hover Info For Line source Viewer line Range get Start Line  IAnnotationHoverExtension getHoverInfo ISourceViewer ILineRange getHoverInfo ISourceViewer sourceViewer ILineRange lineRange visibleLines getHoverInfoForLine sourceViewer lineRange getStartLine
see org eclipse jface text source I Annotation Hover Extension get Hover Line Range org eclipse jface text source I Source Viewer int public I Line Range get Hover Line Range I Source Viewer viewer int line Number return new Line Range line Number 1  IAnnotationHoverExtension getHoverLineRange ISourceViewer ILineRange getHoverLineRange ISourceViewer lineNumber LineRange lineNumber
see org eclipse jface text source I Annotation Hover Extension can Handle Mouse Cursor public boolean can Handle Mouse Cursor return true  IAnnotationHoverExtension canHandleMouseCursor canHandleMouseCursor

public interface I Callback void run I Information Control Extension2 control  ICallback IInformationControlExtension2
public void selected Display disp f Shell get Display canvas set Cursor f Hand Cursor TODO shade for now set grey background canvas set Background get Selection Color disp highlight the viewer background at its position old Styles set Viewer Background f Annotation set the selection f Selection this if f Hover Manager null f Hover Manager show Information if f Input f Annotation Listener null Vertical Ruler Event event new Vertical Ruler Event f Annotation f Input f Annotation Listener annotation Selected event  fShell getDisplay setCursor fHandCursor setBackground getSelectionColor oldStyles setViewerBackground fAnnotation fSelection fHoverManager fHoverManager showInformation fInput fAnnotationListener VerticalRulerEvent VerticalRulerEvent fAnnotation fInput fAnnotationListener annotationSelected
public void default Selected if f Input f Annotation Listener null Vertical Ruler Event event new Vertical Ruler Event f Annotation f Input f Annotation Listener annotation Default Selected event dispose  defaultSelected fInput fAnnotationListener VerticalRulerEvent VerticalRulerEvent fAnnotation fInput fAnnotationListener annotationDefaultSelected
public void show Context Menu Menu menu if f Input f Annotation Listener null Vertical Ruler Event event new Vertical Ruler Event f Annotation f Input f Annotation Listener annotation Context Menu About To Show event menu  showContextMenu fInput fAnnotationListener VerticalRulerEvent VerticalRulerEvent fAnnotation fInput fAnnotationListener annotationContextMenuAboutToShow
public void deselect hide the popup f Hover Manager dispose Information Control deselect f Selection null reset Viewer Background old Styles old Styles null Display disp f Shell get Display canvas set Cursor null TODO remove shading for now set standard background canvas set Background disp get System Color SWT COLOR INFO BACKGROUND  fHoverManager disposeInformationControl fSelection resetViewerBackground oldStyles oldStyles fShell getDisplay setCursor setBackground getSystemColor COLOR_INFO_BACKGROUND
public void widget Disposed Dispose Event e Item item Item Widget e get Source get Data item deselect item canvas null item f Annotation null item old Styles null Widget e get Source set Data null  widgetDisposed DisposeEvent getSource getData fAnnotation oldStyles getSource setData
menu add Menu Listener new Menu Listener public void menu Hidden Menu Event e dispose  addMenuListener MenuListener menuHidden MenuEvent
public void menu Shown Menu Event e  menuShown MenuEvent
public void handle Event Event event if event type SWT Menu Detect TODO show per item menu for now show ruler context menu if f Input null Control ruler f Input f Ruler Info get Control if ruler null ruler is Disposed Menu menu ruler get Menu if menu null menu is Disposed menu set Location event x event y menu add Menu Listener new Menu Listener public void menu Hidden Menu Event e dispose public void menu Shown Menu Event e menu set Visible true  handleEvent MenuDetect fInput fInput fRulerInfo getControl isDisposed getMenu isDisposed setLocation addMenuListener MenuListener menuHidden MenuEvent menuShown MenuEvent setVisible
public void mouse Double Click Mouse Event e Item item Item Widget e get Source get Data if e button 1 item f Annotation f Input f Annotations 0 f Input f Double Click Listener null f Input f Double Click Listener double Click null special code for JDT to renew the annotation set if f Input redo Action null f Input redo Action run Annotation Expansion Control this dispose TODO special action to invoke double click action on the vertical ruler how about Canvas can Canvas e get Source Annotation a Annotation can get Data if a null a get Double Click Action run  mouseDoubleClick MouseEvent getSource getData fAnnotation fInput fAnnotations fInput fDoubleClickListener fInput fDoubleClickListener doubleClick fInput redoAction fInput redoAction AnnotationExpansionControl getSource getData getDoubleClickAction
public void mouse Up Mouse Event e Item item Item Widget e get Source get Data TODO for now to make double click work disable single click on the first item disable later when the annotationlistener selectively handles input if item null e button 1 item f Annotation f Input f Annotations 0 item default Selected  mouseUp MouseEvent getSource getData fAnnotation fInput fAnnotations defaultSelected
see org eclipse swt events Mouse Adapter mouse Down org eclipse swt events Mouse Event public void mouse Down Mouse Event e TODO Auto generated method stub super mouse Down e  MouseAdapter mouseDown MouseEvent mouseDown MouseEvent mouseDown
public void mouse Enter Mouse Event e Item item Item Widget e get Source get Data if item null item selected  mouseEnter MouseEvent getSource getData
public void mouse Exit Mouse Event e Item item Item Widget e get Source get Data if item null item deselect if the event lies outside the entire popup dispose org eclipse swt graphics Region region f Shell get Region Canvas can Canvas e get Source Point p can to Display e x e y if region null Rectangle bounds f Shell get Bounds p f Shell to Control p if bounds contains p dispose else p f Shell to Control p if region contains p dispose  mouseExit MouseEvent getSource getData fShell getRegion getSource toDisplay fShell getBounds fShell toControl fShell toControl
public void mouse Hover Mouse Event e if f Hover Manager null f Hover Manager new Hover Manager f Hover Manager takes Focus When Visible false f Hover Manager install f Composite f Hover Manager show Information  mouseHover MouseEvent fHoverManager fHoverManager HoverManager fHoverManager takesFocusWhenVisible fHoverManager fComposite fHoverManager showInformation
public void paint Control Paint Event e Canvas can Canvas e get Source Annotation a Item can get Data f Annotation if a null Rectangle rect new Rectangle f Layouter get Border Width f Layouter get Border Width f Layouter get Annotation Size f Layouter get Annotation Size if f Annotation Access Extension null f Annotation Access Extension paint a e gc can rect  paintControl PaintEvent getSource getData fAnnotation fLayouter getBorderWidth fLayouter getBorderWidth fLayouter getAnnotationSize fLayouter getAnnotationSize fAnnotationAccessExtension fAnnotationAccessExtension
public Hover Manager super new I Information Control Creator public I Information Control create Information Control Shell parent return new Default Information Control parent  HoverManager IInformationControlCreator IInformationControl createInformationControl DefaultInformationControl
public Hover Manager super new I Information Control Creator public I Information Control create Information Control Shell parent return new Default Information Control parent set Margins 5 10 set Anchor ANCHOR BOTTOM set Fallback Anchors new Anchor ANCHOR LEFT ANCHOR RIGHT  HoverManager IInformationControlCreator IInformationControl createInformationControl DefaultInformationControl setMargins setAnchor ANCHOR_BOTTOM setFallbackAnchors ANCHOR_LEFT ANCHOR_RIGHT
protected void compute Information if f Selection null Rectangle subject Area f Selection canvas get Bounds Annotation annotation f Selection f Annotation String msg if annotation null msg annotation get Text else msg null set Information msg subject Area  computeInformation fSelection subjectArea fSelection getBounds fSelection fAnnotation getText setInformation subjectArea
Creates a new control param parent param shell Style param access public Annotation Expansion Control Shell parent int shell Style I Annotation Access access f Paint Listener new My Paint Listener f Mouse Track Listener new My Mouse Track Listener f Mouse Listener new My Mouse Listener f Menu Detect Listener new My Menu Detect Listener f Dispose Listener new My Dispose Listener f Viewport Listener new I Viewport Listener public void viewport Changed int vertical Offset dispose f Layouter new Linear Layouter if access instanceof I Annotation Access Extension f Annotation Access Extension I Annotation Access Extension access f Shell new Shell parent shell Style SWT NO FOCUS SWT ON TOP Display display f Shell get Display f Shell set Background display get System Color SWT COLOR BLACK f Composite new Composite f Shell SWT NO FOCUS SWT NO REDRAW RESIZE SWT NO TRIM f Composite new Composite f Shell SWT NO FOCUS SWT NO REDRAW RESIZE SWT NO TRIM SWT V SCROLL Grid Layout layout new Grid Layout 1 true layout margin Height 0 layout margin Width 0 f Shell set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH data height Hint f Layouter get Annotation Size 2 f Layouter get Border Width 4 f Composite set Layout Data data f Composite add Mouse Track Listener new Mouse Track Adapter public void mouse Exit Mouse Event e if f Composite null return Control children f Composite get Children for int i 0 i children length i if children i get Bounds contains e x e y return if none of the children contains the event we left the popup dispose f Composite get Vertical Bar add Listener SWT Selection new Listener public void handle Event Event event Rectangle bounds f Shell get Bounds int x bounds x f Layouter get Annotation Size f Layouter get Border Width int y bounds y f Shell set Bounds x y bounds width bounds height f Hand Cursor new Cursor display SWT CURSOR HAND f Shell set Cursor f Hand Cursor f Composite set Cursor f Hand Cursor set Info System Color  shellStyle AnnotationExpansionControl shellStyle IAnnotationAccess fPaintListener MyPaintListener fMouseTrackListener MyMouseTrackListener fMouseListener MyMouseListener fMenuDetectListener MyMenuDetectListener fDisposeListener MyDisposeListener fViewportListener IViewportListener viewportChanged verticalOffset fLayouter LinearLayouter IAnnotationAccessExtension fAnnotationAccessExtension IAnnotationAccessExtension fShell shellStyle NO_FOCUS ON_TOP fShell getDisplay fShell setBackground getSystemColor COLOR_BLACK fComposite fShell NO_FOCUS NO_REDRAW_RESIZE NO_TRIM fComposite fShell NO_FOCUS NO_REDRAW_RESIZE NO_TRIM V_SCROLL GridLayout GridLayout marginHeight marginWidth fShell setLayout GridData GridData GridData FILL_BOTH heightHint fLayouter getAnnotationSize fLayouter getBorderWidth fComposite setLayoutData fComposite addMouseTrackListener MouseTrackAdapter mouseExit MouseEvent fComposite fComposite getChildren getBounds fComposite getVerticalBar addListener handleEvent fShell getBounds fLayouter getAnnotationSize fLayouter getBorderWidth fShell setBounds fHandCursor CURSOR_HAND fShell setCursor fHandCursor fComposite setCursor fHandCursor setInfoSystemColor
private void set Info System Color Display display f Shell get Display set Foreground Color display get System Color SWT COLOR INFO FOREGROUND set Background Color display get System Color SWT COLOR INFO BACKGROUND  setInfoSystemColor fShell getDisplay setForegroundColor getSystemColor COLOR_INFO_FOREGROUND setBackgroundColor getSystemColor COLOR_INFO_BACKGROUND
see org eclipse jface text I Information Control set Information java lang String public void set Information String information set Input null  IInformationControl setInformation setInformation setInput
public void set Input Object input if f Input null f Input f Viewer null f Input f Viewer remove Viewport Listener f Viewport Listener if input instanceof Annotation Hover Input f Input Annotation Hover Input input else f Input null input Changed f Input null  setInput fInput fInput fViewer fInput fViewer removeViewportListener fViewportListener AnnotationHoverInput fInput AnnotationHoverInput fInput inputChanged fInput
protected void input Changed Object new Input Object new Selection refresh  inputChanged newInput newSelection
protected void refresh adjust Item Number if f Input null return if f Input f Annotations null return if f Input f Viewer null f Input f Viewer add Viewport Listener f Viewport Listener f Shell set Region f Layouter get Shell Region f Input f Annotations length Layout layout f Layouter get Layout f Input f Annotations length f Composite set Layout layout Control children f Composite get Children for int i 0 i f Input f Annotations length i Canvas canvas Canvas children i Item item new Item item canvas canvas item f Annotation f Input f Annotations i canvas set Data item canvas redraw  adjustItemNumber fInput fInput fAnnotations fInput fViewer fInput fViewer addViewportListener fViewportListener fShell setRegion fLayouter getShellRegion fInput fAnnotations fLayouter getLayout fInput fAnnotations fComposite setLayout fComposite getChildren fInput fAnnotations fAnnotation fInput fAnnotations setData
protected void adjust Item Number if f Composite null return Control children f Composite get Children int old Size children length int new Size f Input null 0 f Input f Annotations length Display display f Shell get Display add missing items for int i old Size i new Size i Canvas canvas new Canvas f Composite SWT NONE Object grid Data f Layouter get Layout Data canvas set Layout Data grid Data canvas set Background display get System Color SWT COLOR INFO BACKGROUND canvas add Paint Listener f Paint Listener canvas add Mouse Track Listener f Mouse Track Listener canvas add Mouse Listener f Mouse Listener canvas add Listener SWT Menu Detect f Menu Detect Listener canvas add Dispose Listener f Dispose Listener dispose of exceeding resources for int i old Size i new Size i Item item Item children i 1 get Data item deselect children i 1 dispose  adjustItemNumber fComposite fComposite getChildren oldSize newSize fInput fInput fAnnotations fShell getDisplay oldSize newSize fComposite gridData fLayouter getLayoutData setLayoutData gridData setBackground getSystemColor COLOR_INFO_BACKGROUND addPaintListener fPaintListener addMouseTrackListener fMouseTrackListener addMouseListener fMouseListener addListener MenuDetect fMenuDetectListener addDisposeListener fDisposeListener oldSize newSize getData
see I Information Control set Visible boolean public void set Visible boolean visible f Shell set Visible visible  IInformationControl setVisible setVisible fShell setVisible
public void dispose if f Shell null if f Shell is Disposed f Shell dispose f Shell null f Composite null if f Hand Cursor null f Hand Cursor dispose f Hand Cursor null if f Hover Manager null f Hover Manager dispose f Hover Manager null f Selection null  fShell fShell isDisposed fShell fShell fComposite fHandCursor fHandCursor fHandCursor fHoverManager fHoverManager fHoverManager fSelection
see org eclipse jface text I Information Control Extension has Contents public boolean has Contents return f Input f Annotations null f Input f Annotations length 0  IInformationControlExtension hasContents hasContents fInput fAnnotations fInput fAnnotations
see org eclipse jface text I Information Control set Size Constraints int int public void set Size Constraints int max Width int max Height f Max Width max Width f Max Height max Height  IInformationControl setSizeConstraints setSizeConstraints maxWidth maxHeight fMaxWidth maxWidth fMaxHeight maxHeight
see org eclipse jface text I Information Control compute Size Hint public Point compute Size Hint return f Shell compute Size SWT DEFAULT SWT DEFAULT  IInformationControl computeSizeHint computeSizeHint fShell computeSize
see I Information Control set Location Point public void set Location Point location f Shell set Location location  IInformationControl setLocation setLocation fShell setLocation
see I Information Control set Size int int public void set Size int width int height f Shell set Size width height  IInformationControl setSize setSize fShell setSize
see I Information Control add Dispose Listener Dispose Listener public void add Dispose Listener Dispose Listener listener f Shell add Dispose Listener listener  IInformationControl addDisposeListener DisposeListener addDisposeListener DisposeListener fShell addDisposeListener
see I Information Control remove Dispose Listener Dispose Listener public void remove Dispose Listener Dispose Listener listener f Shell remove Dispose Listener listener  IInformationControl removeDisposeListener DisposeListener removeDisposeListener DisposeListener fShell removeDisposeListener
see I Information Control set Foreground Color Color public void set Foreground Color Color foreground f Composite set Foreground foreground  IInformationControl setForegroundColor setForegroundColor fComposite setForeground
see I Information Control set Background Color Color public void set Background Color Color background f Composite set Background background  IInformationControl setBackgroundColor setBackgroundColor fComposite setBackground
public boolean is Focus Control if f Composite is Focus Control return true else Control children f Composite get Children for int i 0 i children length i if children i is Focus Control return true return false  isFocusControl fComposite isFocusControl fComposite getChildren isFocusControl
see I Information Control set Focus public void set Focus f Shell force Focus  IInformationControl setFocus setFocus fShell forceFocus
see I Information Control add Focus Listener Focus Listener public void add Focus Listener Focus Listener listener f Shell add Focus Listener listener  IInformationControl addFocusListener FocusListener addFocusListener FocusListener fShell addFocusListener
see I Information Control remove Focus Listener Focus Listener public void remove Focus Listener Focus Listener listener f Shell remove Focus Listener listener  IInformationControl removeFocusListener FocusListener removeFocusListener FocusListener fShell removeFocusListener
private Style Range set Viewer Background Annotation annotation Styled Text text f Input f Viewer get Text Widget if text null text is Disposed return null Display disp text get Display Position pos f Input model get Position annotation if pos null return null I Region region Text Viewer f Input f Viewer model Range2 Widget Range new Region pos offset pos length Style Range ranges text get Style Ranges region get Offset region get Length List undo Ranges new Array List ranges length for int i 0 i ranges length i undo Ranges add ranges i clone int offset region get Offset Style Range current undo Ranges size 0 Style Range undo Ranges get 0 null int cur Start current null current start region get Offset region get Length int cur End current null current start current length 1 int index 0 fill no style regions while cur End region get Offset region get Length add empty range if cur Start offset Style Range undo Range new Style Range offset cur Start offset null null undo Ranges add index undo Range index step index if index undo Ranges size offset cur End current Style Range undo Ranges get index cur Start current start cur End current start current length else if index undo Ranges size last one offset cur End current null cur Start region get Offset region get Length cur End 1 else cur End region get Offset region get Length create modified styles with background List shaded Ranges new Array List undo Ranges size for Iterator it undo Ranges iterator it has Next Style Range range Style Range Style Range it next clone shaded Ranges add range range background get Highlight Color disp set the ranges one by one for Iterator iter shaded Ranges iterator iter has Next text set Style Range Style Range iter next return Style Range undo Ranges to Array undo Ranges to Array new Style Range 0  StyleRange setViewerBackground StyledText fInput fViewer getTextWidget isDisposed getDisplay fInput getPosition IRegion TextViewer fInput fViewer modelRange2WidgetRange StyleRange getStyleRanges getOffset getLength undoRanges ArrayList undoRanges getOffset StyleRange undoRanges StyleRange undoRanges curStart getOffset getLength curEnd curEnd getOffset getLength curStart StyleRange undoRange StyleRange curStart undoRanges undoRange undoRanges curEnd StyleRange undoRanges curStart curEnd undoRanges curEnd curStart getOffset getLength curEnd curEnd getOffset getLength shadedRanges ArrayList undoRanges undoRanges hasNext StyleRange StyleRange StyleRange shadedRanges getHighlightColor shadedRanges hasNext setStyleRange StyleRange StyleRange undoRanges toArray undoRanges toArray StyleRange
private void reset Viewer Background Style Range old Ranges if old Ranges null return if f Input null return Styled Text text f Input f Viewer get Text Widget if text null text is Disposed return set the ranges one by one for int i 0 i old Ranges length i text set Style Range old Ranges i  resetViewerBackground StyleRange oldRanges oldRanges fInput StyledText fInput fViewer getTextWidget isDisposed oldRanges setStyleRange oldRanges
private Color get Highlight Color Display disp return disp get System Color SWT COLOR GRAY  getHighlightColor getSystemColor COLOR_GRAY
private Color get Selection Color Display disp return disp get System Color SWT COLOR GRAY  getSelectionColor getSystemColor COLOR_GRAY

private Annotation Preference f Preference public Annotation Type String type String super Types f Type type f Super Types super Types  AnnotationPreference fPreference AnnotationType superTypes fType fSuperTypes superTypes
public String get Type return f Type  getType fType
public String get Super Types return f Super Types  getSuperTypes fSuperTypes
For internal use only return the annotation preference public Annotation Preference get Preference return f Preference  AnnotationPreference getPreference fPreference
For internal use only param preference the annotation preference public void set Annotation Preference Annotation Preference preference f Preference preference  setAnnotationPreference AnnotationPreference fPreference
public boolean is Subtype String super Type if f Super Types null super Type null return false if super Type equals f Type return true for int i f Super Types length 1 i 1 i if super Type equals f Super Types i return true return false  isSubtype superType fSuperTypes superType superType fType fSuperTypes superType fSuperTypes

private Map f Types Cache new Hash Map public Annotation Type Hierarchy  fTypesCache HashMap AnnotationTypeHierarchy
public Annotation Type get Annotation Type String type Name Annotation Type type Annotation Type f Types Cache get type Name if type null String super Types compute Super Types type Name type new Annotation Type type Name super Types f Types Cache put type Name type return type  AnnotationType getAnnotationType typeName AnnotationType AnnotationType fTypesCache typeName superTypes computeSuperTypes typeName AnnotationType typeName superTypes fTypesCache typeName
public boolean is Subtype String super Type String subtype Candidate Annotation Type type get Annotation Type subtype Candidate return type is Subtype super Type  isSubtype superType subtypeCandidate AnnotationType getAnnotationType subtypeCandidate isSubtype superType
private String compute Super Types String type Name Array List types new Array List append types get Direct Super Type type Name int index 0 while index types size String type String types get index append types get Direct Super Type type String super Types new String types size types to Array super Types return super Types  computeSuperTypes typeName ArrayList ArrayList getDirectSuperType typeName getDirectSuperType superTypes toArray superTypes superTypes
private String get Direct Super Type String type Name return String get Type Map get type Name  getDirectSuperType typeName getTypeMap typeName
private void append List list String string if string null string trim length 0 return if list contains string list add string 
private Map get Type Map if f Type Map null f Type Map read Types return f Type Map  getTypeMap fTypeMap fTypeMap readTypes fTypeMap
private Map read Types Hash Map all Types new Hash Map I Extension Point extension Point Platform get Extension Registry get Extension Point EditorsUI PLUGIN ID annotation Types NON NLS 1 if extension Point null I Configuration Element elements extension Point get Configuration Elements for int i 0 i elements length i I Configuration Element element elements i String name element get Attribute name NON NLS 1 if name null name trim length 0 continue String parent element get Attribute super NON NLS 1 if parent null parent trim length 0 parent NON NLS 1 all Types put name parent return all Types  readTypes HashMap allTypes HashMap IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint PLUGIN_ID annotationTypes extensionPoint IConfigurationElement extensionPoint getConfigurationElements IConfigurationElement getAttribute getAttribute allTypes allTypes

private Set f Cache new Hash Set public Delegating Annotation Preference Annotation Type type Annotation Preference Lookup lookup f Type type f Lookup lookup  fCache HashSet DelegatingAnnotationPreference AnnotationType AnnotationPreferenceLookup fType fLookup
private boolean is Cached Object attribute return f Cache contains attribute  isCached fCache
private void mark Cached Object attribute f Cache add attribute  markCached fCache
private Annotation Preference get Defining Preference Object attribute Annotation Preference p f Lookup get Annotation Preference Fragment f Type get Type if p null p has Value attribute return p String super Types f Type get Super Types for int i 0 i super Types length i p f Lookup get Annotation Preference Fragment super Types i if p null p has Value attribute return p return null  AnnotationPreference getDefiningPreference AnnotationPreference fLookup getAnnotationPreferenceFragment fType getType hasValue superTypes fType getSuperTypes superTypes fLookup getAnnotationPreferenceFragment superTypes hasValue
private Object get Attribute Value Object attribute if is Cached attribute Annotation Preference preference get Defining Preference attribute if preference null set Value attribute preference get Value attribute mark Cached attribute return get Value attribute  getAttributeValue isCached AnnotationPreference getDefiningPreference setValue getValue markCached getValue
private boolean get Boolean Attribute Value Object attribute Object value get Attribute Value attribute if value instanceof Boolean return Boolean value boolean Value return false  getBooleanAttributeValue getAttributeValue booleanValue
see org eclipse ui texteditor Annotation Preference get Annotation Type public Object get Annotation Type return f Type get Type  AnnotationPreference getAnnotationType getAnnotationType fType getType
see org eclipse ui texteditor Annotation Preference contributes To Header public boolean contributes To Header return get Boolean Attribute Value HEADER VALUE  AnnotationPreference contributesToHeader contributesToHeader getBooleanAttributeValue HEADER_VALUE
public I Annotation Image Provider get Annotation Image Provider if is Cached IMAGE PROVIDER Annotation Preference preference get Defining Preference IMAGE PROVIDER if preference null f Annotation Image Provider preference f Annotation Image Provider f Annotation Image Provider Attribute preference f Annotation Image Provider Attribute f Configuration Element preference f Configuration Element mark Cached IMAGE PROVIDER return super get Annotation Image Provider  IAnnotationImageProvider getAnnotationImageProvider isCached IMAGE_PROVIDER AnnotationPreference getDefiningPreference IMAGE_PROVIDER fAnnotationImageProvider fAnnotationImageProvider fAnnotationImageProviderAttribute fAnnotationImageProviderAttribute fConfigurationElement fConfigurationElement markCached IMAGE_PROVIDER getAnnotationImageProvider
see org eclipse ui texteditor Annotation Preference get Color Preference Key public String get Color Preference Key return String get Attribute Value COLOR PREFERENCE KEY  AnnotationPreference getColorPreferenceKey getColorPreferenceKey getAttributeValue COLOR_PREFERENCE_KEY
see org eclipse ui texteditor Annotation Preference get Color Preference Value public RGB get Color Preference Value return RGB get Attribute Value COLOR PREFERENCE VALUE  AnnotationPreference getColorPreferenceValue getColorPreferenceValue getAttributeValue COLOR_PREFERENCE_VALUE
see org eclipse ui texteditor Annotation Preference get Highlight Preference Key public String get Highlight Preference Key return String get Attribute Value HIGHLIGHT PREFERENCE KEY  AnnotationPreference getHighlightPreferenceKey getHighlightPreferenceKey getAttributeValue HIGHLIGHT_PREFERENCE_KEY
see org eclipse ui texteditor Annotation Preference get Highlight Preference Value public boolean get Highlight Preference Value return get Boolean Attribute Value HIGHLIGHT PREFERENCE VALUE  AnnotationPreference getHighlightPreferenceValue getHighlightPreferenceValue getBooleanAttributeValue HIGHLIGHT_PREFERENCE_VALUE
see org eclipse ui texteditor Annotation Preference get Image Descriptor public Image Descriptor get Image Descriptor return Image Descriptor get Attribute Value IMAGE DESCRIPTOR  AnnotationPreference getImageDescriptor ImageDescriptor getImageDescriptor ImageDescriptor getAttributeValue IMAGE_DESCRIPTOR
see org eclipse ui texteditor Annotation Preference get Is Go To Next Navigation Target Key public String get Is Go To Next Navigation Target Key return String get Attribute Value IS GO TO NEXT TARGET KEY  AnnotationPreference getIsGoToNextNavigationTargetKey getIsGoToNextNavigationTargetKey getAttributeValue IS_GO_TO_NEXT_TARGET_KEY
see org eclipse ui texteditor Annotation Preference get Is Go To Previous Navigation Target Key public String get Is Go To Previous Navigation Target Key return String get Attribute Value IS GO TO PREVIOUS TARGET KEY  AnnotationPreference getIsGoToPreviousNavigationTargetKey getIsGoToPreviousNavigationTargetKey getAttributeValue IS_GO_TO_PREVIOUS_TARGET_KEY
see org eclipse ui texteditor Annotation Preference get Overview Ruler Preference Key public String get Overview Ruler Preference Key return String get Attribute Value OVERVIEW RULER PREFERENCE KEY  AnnotationPreference getOverviewRulerPreferenceKey getOverviewRulerPreferenceKey getAttributeValue OVERVIEW_RULER_PREFERENCE_KEY
see org eclipse ui texteditor Annotation Preference get Overview Ruler Preference Value public boolean get Overview Ruler Preference Value return get Boolean Attribute Value OVERVIEW RULER PREFERENCE VALUE  AnnotationPreference getOverviewRulerPreferenceValue getOverviewRulerPreferenceValue getBooleanAttributeValue OVERVIEW_RULER_PREFERENCE_VALUE
see org eclipse ui texteditor Annotation Preference get Preference Label public String get Preference Label return String get Attribute Value PREFERENCE LABEL  AnnotationPreference getPreferenceLabel getPreferenceLabel getAttributeValue PREFERENCE_LABEL
public int get Presentation Layer Object value get Attribute Value PRESENTATION LAYER if value instanceof Integer return Integer value int Value return I Annotation Access Extension DEFAULT LAYER  getPresentationLayer getAttributeValue PRESENTATION_LAYER intValue IAnnotationAccessExtension DEFAULT_LAYER
see org eclipse ui texteditor Annotation Preference get Show In Next Prev Dropdown Toolbar Action Key public String get Show In Next Prev Dropdown Toolbar Action Key return String get Attribute Value SHOW IN NAVIGATION DROPDOWN KEY  AnnotationPreference getShowInNextPrevDropdownToolbarActionKey getShowInNextPrevDropdownToolbarActionKey getAttributeValue SHOW_IN_NAVIGATION_DROPDOWN_KEY
see org eclipse ui texteditor Annotation Preference get Symbolic Image Name public String get Symbolic Image Name return String get Attribute Value SYMBOLIC IMAGE NAME  AnnotationPreference getSymbolicImageName getSymbolicImageName getAttributeValue SYMBOLIC_IMAGE_NAME
see org eclipse ui texteditor Annotation Preference get Text Preference Key public String get Text Preference Key return String get Attribute Value TEXT PREFERENCE KEY  AnnotationPreference getTextPreferenceKey getTextPreferenceKey getAttributeValue TEXT_PREFERENCE_KEY
see org eclipse ui texteditor Annotation Preference get Text Preference Value public boolean get Text Preference Value return get Boolean Attribute Value TEXT PREFERENCE VALUE  AnnotationPreference getTextPreferenceValue getTextPreferenceValue getBooleanAttributeValue TEXT_PREFERENCE_VALUE
see org eclipse ui texteditor Annotation Preference get Vertical Ruler Preference Key public String get Vertical Ruler Preference Key return String get Attribute Value VERTICAL RULER PREFERENCE KEY  AnnotationPreference getVerticalRulerPreferenceKey getVerticalRulerPreferenceKey getAttributeValue VERTICAL_RULER_PREFERENCE_KEY
see org eclipse ui texteditor Annotation Preference get Vertical Ruler Preference Value public boolean get Vertical Ruler Preference Value return get Boolean Attribute Value VERTICAL RULER PREFERENCE VALUE  AnnotationPreference getVerticalRulerPreferenceValue getVerticalRulerPreferenceValue getBooleanAttributeValue VERTICAL_RULER_PREFERENCE_VALUE
see org eclipse ui texteditor Annotation Preference is Go To Next Navigation Target public boolean is Go To Next Navigation Target return get Boolean Attribute Value IS GO TO NEXT TARGET VALUE  AnnotationPreference isGoToNextNavigationTarget isGoToNextNavigationTarget getBooleanAttributeValue IS_GO_TO_NEXT_TARGET_VALUE
see org eclipse ui texteditor Annotation Preference is Go To Previous Navigation Target public boolean is Go To Previous Navigation Target return get Boolean Attribute Value IS GO TO PREVIOUS TARGET VALUE  AnnotationPreference isGoToPreviousNavigationTarget isGoToPreviousNavigationTarget getBooleanAttributeValue IS_GO_TO_PREVIOUS_TARGET_VALUE
see org eclipse ui texteditor Annotation Preference is Show In Next Prev Dropdown Toolbar Action public boolean is Show In Next Prev Dropdown Toolbar Action return get Boolean Attribute Value SHOW IN NAVIGATION DROPDOWN VALUE  AnnotationPreference isShowInNextPrevDropdownToolbarAction isShowInNextPrevDropdownToolbarAction getBooleanAttributeValue SHOW_IN_NAVIGATION_DROPDOWN_VALUE

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Editor Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE EditorMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException
public static Resource Bundle get Resource Bundle return fg Resource Bundle  ResourceBundle getResourceBundle fgResourceBundle

Creates a new edit position param editor Input the editor input param editor Id the editor ID param selection the selection param pos the position public Edit Position I Editor Input editor Input String editor Id I Selection selection Position pos Assert is Not Null editor Input Assert is Not Null editor Id f Editor Id editor Id f Editor Input editor Input f Selection selection f Position pos  editorInput editorId EditPosition IEditorInput editorInput editorId ISelection isNotNull editorInput isNotNull editorId fEditorId editorId fEditorInput editorInput fSelection fPosition
Returns the editor input for this edit position return the editor input of this edit position I Editor Input get Editor Input return f Editor Input  IEditorInput getEditorInput fEditorInput
Returns the editor id for this edit position return the editor input of this edit position String get Editor Id return f Editor Id  getEditorId fEditorId
Returns the selection of this edit position return the selection of this edit position I Selection get Selection return f Selection  ISelection getSelection fSelection
Returns the the position return the position Position get Position return f Position  getPosition fPosition

Creates a goto last edit action public Goto Last Edit Position Action Workbench Help set Help this I Abstract Text Editor Help Context Ids GOTO LAST EDIT POSITION ACTION set Id I Text Editor Action Definition Ids GOTO LAST EDIT POSITION set Action Definition Id I Text Editor Action Definition Ids GOTO LAST EDIT POSITION set Enabled false  GotoLastEditPositionAction WorkbenchHelp setHelp IAbstractTextEditorHelpContextIds GOTO_LAST_EDIT_POSITION_ACTION setId ITextEditorActionDefinitionIds GOTO_LAST_EDIT_POSITION setActionDefinitionId ITextEditorActionDefinitionIds GOTO_LAST_EDIT_POSITION setEnabled
see I Workbench Window Action Delegate init org eclipse ui I Workbench Window public void init I Workbench Window window f Window window  IWorkbenchWindowActionDelegate IWorkbenchWindow IWorkbenchWindow fWindow
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action action run  IActionDelegate IAction IAction
public void run Edit Position edit Position Text Editor Plugin get Default get Last Edit Position if edit Position null return final Position pos edit Position get Position if pos null pos is Deleted return I Workbench Window window get Window if window null return I Workbench Page page window get Active Page I Editor Part editor try editor page open Editor edit Position get Editor Input edit Position get Editor Id catch Part Init Exception ex editor null Optimization could also use else branch if editor instanceof I Text Editor I Text Editor text Editor I Text Editor editor text Editor select And Reveal pos offset pos length else if editor null final I Editor Input input editor get Editor Input final I Editor Part final Editor editor if input instanceof I File Editor Input Workspace Modify Operation op new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception I Marker marker null try marker I File Editor Input input get File create Marker I Marker TEXT marker set Attribute I Marker CHAR START pos offset marker set Attribute I Marker CHAR END pos offset pos length final Editor goto Marker marker finally if marker null marker delete try op run null catch Invocation Target Exception ex String message Editor Messages get String Editor error goto Last Edit Position message NON NLS 1 if f Window null Shell shell f Window get Shell String title Editor Messages get String Editor error goto Last Edit Position title NON NLS 1 Message Dialog open Error shell title message else Throwable t ex get Target Exception I Status status new Status I Status ERROR PlatformUI PLUGIN ID 0 message t Text Editor Plugin get Default get Log log status catch Interrupted Exception e Assert is True false this operation can not be cancelled NON NLS 1 editor set Focus  EditPosition editPosition TextEditorPlugin getDefault getLastEditPosition editPosition editPosition getPosition isDeleted IWorkbenchWindow getWindow IWorkbenchPage getActivePage IEditorPart openEditor editPosition getEditorInput editPosition getEditorId PartInitException ITextEditor ITextEditor textEditor ITextEditor textEditor selectAndReveal IEditorInput getEditorInput IEditorPart finalEditor IFileEditorInput WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException IMarker IFileEditorInput getFile createMarker IMarker setAttribute IMarker CHAR_START setAttribute IMarker CHAR_END finalEditor gotoMarker InvocationTargetException EditorMessages getString gotoLastEditPosition fWindow fWindow getShell EditorMessages getString gotoLastEditPosition MessageDialog openError getTargetException IStatus IStatus PLUGIN_ID TextEditorPlugin getDefault getLog InterruptedException isTrue setFocus
public void selection Changed I Action action I Selection selection boolean enabled Text Editor Plugin get Default get Last Edit Position null set Enabled enabled action set Enabled enabled This is no longer needed once the action is enabled if enabled adding the same action twice has no effect Text Editor Plugin get Default add Last Edit Position Dependent Action action this is always the same action for this instance f Action action  selectionChanged IAction ISelection TextEditorPlugin getDefault getLastEditPosition setEnabled setEnabled TextEditorPlugin getDefault addLastEditPositionDependentAction fAction
Returns the workbench window return the workbench window private I Workbench Window get Window if f Window null f Window PlatformUI get Workbench get Active Workbench Window return f Window  IWorkbenchWindow getWindow fWindow fWindow getWorkbench getActiveWorkbenchWindow fWindow
see I Workbench Window Action Delegate dispose public void dispose f Window null Text Editor Plugin get Default remove Last Edit Position Dependent Action f Action  IWorkbenchWindowActionDelegate fWindow TextEditorPlugin getDefault removeLastEditPositionDependentAction fAction

public Layout get Layout int item Count simple layout a row of items Grid Layout layout new Grid Layout item Count true layout horizontal Spacing 1 layout vertical Spacing 0 layout margin Height 1 layout margin Width 1 return layout  getLayout itemCount GridLayout GridLayout itemCount horizontalSpacing verticalSpacing marginHeight marginWidth
public Object get Layout Data Grid Data grid Data new Grid Data ANNOTATION SIZE 2 BORDER WIDTH ANNOTATION SIZE 2 BORDER WIDTH grid Data horizontal Alignment Grid Data CENTER grid Data vertical Alignment Grid Data CENTER return grid Data  getLayoutData GridData gridData GridData ANNOTATION_SIZE BORDER_WIDTH ANNOTATION_SIZE BORDER_WIDTH gridData horizontalAlignment GridData gridData verticalAlignment GridData gridData
public int get Annotation Size return ANNOTATION SIZE  getAnnotationSize ANNOTATION_SIZE
public int get Border Width return BORDER WIDTH  getBorderWidth BORDER_WIDTH
public Region get Shell Region int item Count no special region set to null for default shell size return null  getShellRegion itemCount

Creates a differences iterator on an array of code Range Difference code s Differences Iterator Range Difference difference Ranges f Array difference Ranges f Index 0 f Range new Array List if f Index f Array length f Difference f Array f Index else f Difference null  RangeDifference DifferencesIterator RangeDifference differenceRanges fArray differenceRanges fIndex fRange ArrayList fIndex fArray fDifference fArray fIndex fDifference
Returns the number of Range Differences int get Count return f Range size  RangeDifferences getCount fRange
Appends the edit to its list and moves to the next code Range Difference code void next f Range add f Difference if f Difference null if f Index f Array length f Difference f Array f Index else f Difference null  RangeDifference fRange fDifference fDifference fIndex fArray fDifference fArray fIndex fDifference
Difference iterators are used in pairs This method returns the other iterator Differences Iterator other Differences Iterator right Differences Iterator left if this right return left return right  DifferencesIterator DifferencesIterator DifferencesIterator
Removes all code Range Difference code s void remove All f Range clear  RangeDifference removeAll fRange

Leave uninitialized The document offset and length have to be set before use public Document Char Sequence do nothing  DocumentCharSequence
Initialize with the sequence of characters in the given document starting at the given offset with the given length param document The document param offset The offset param length The length public Document Char Sequence I Document document int offset int length f Document document f Offset offset f Length length  DocumentCharSequence IDocument fDocument fOffset fLength
see java lang Char Sequence length public int length return f Length  CharSequence fLength
public char char At int index try return f Document get Char f Offset index catch Bad Location Exception e throw new Index Out Of Bounds Exception  charAt fDocument getChar fOffset BadLocationException IndexOutOfBoundsException
see java lang Char Sequence sub Sequence int int public Char Sequence sub Sequence int start int end return new Document Char Sequence f Document start end start  CharSequence subSequence CharSequence subSequence DocumentCharSequence fDocument
public int hash Code int hash 0 for int i 0 n f Length i n i hash 29 hash char At i return hash  hashCode fLength charAt
public boolean equals Object obj if obj this return true if obj instanceof Document Char Sequence return false Document Char Sequence buffer Document Char Sequence obj int length buffer length if length f Length return false for int i 0 i length i if buffer char At i char At i return false return true  DocumentCharSequence DocumentCharSequence DocumentCharSequence fLength charAt charAt
Sets the document to the given param document the document to be set public void set Document I Document document f Document document  setDocument IDocument fDocument
Sets the offset to the given value param offset the offset to be set public void set Offset int offset f Offset offset  setOffset fOffset
Sets the length to the given value param length the length to be set public void set Length int length f Length length  setLength fLength
Creates a code Doc Line Comparator code for the given document range ignore White Space controls whether comparing lines in method code ranges Equal code should ignore whitespace param document the document from which the lines are taken param region if non code null code only lines within this range are taken param ignore White Space if code true code white space is ignored when comparing lines public Doc Line Comparator I Document document I Region region boolean ignore White Space f Document document f Ignore White Space ignore White Space if region null f Length region get Length int start region get Offset int line Offset 0 try line Offset f Document get Line Of Offset start catch Bad Location Exception ex f Line Offset line Offset f Max Offset start f Length if f Length 0 f Line Count 0 else int end Line f Document get Number Of Lines try end Line f Document get Line Of Offset start f Length catch Bad Location Exception ex f Line Count end Line f Line Offset 1 else f Line Offset 0 f Length document get Length f Line Count f Document get Number Of Lines f Max Offset f Document get Length  DocLineComparator ignoreWhiteSpace rangesEqual ignoreWhiteSpace DocLineComparator IDocument IRegion ignoreWhiteSpace fDocument fIgnoreWhiteSpace ignoreWhiteSpace fLength getLength getOffset lineOffset lineOffset fDocument getLineOfOffset BadLocationException fLineOffset lineOffset fMaxOffset fLength fLength fLineCount endLine fDocument getNumberOfLines endLine fDocument getLineOfOffset fLength BadLocationException fLineCount endLine fLineOffset fLineOffset fLength getLength fLineCount fDocument getNumberOfLines fMaxOffset fDocument getLength
Returns the number of lines in the document return number of lines public int get Range Count return f Line Count  getRangeCount fLineCount
Computes the length of line code line code param line the line requested return the line length or code 0 code if code line code is not a valid line in the document private int get Line Length int line if line f Line Count return 0 try int doc Line f Line Offset line String delim f Document get Line Delimiter doc Line int length f Document get Line Length doc Line delim null 0 delim length if line f Line Count 1 f Last Offset f Document get Line Offset doc Line f Last Length Math min length f Max Offset f Last Offset else f Last Offset 1 f Last Length length return f Last Length catch Bad Location Exception e f Last Offset 0 f Last Length 0 f Skip true return 0  getLineLength fLineCount docLine fLineOffset fDocument getLineDelimiter docLine fDocument getLineLength docLine fLineCount fLastOffset fDocument getLineOffset docLine fLastLength fMaxOffset fLastOffset fLastOffset fLastLength fLastLength BadLocationException fLastOffset fLastLength fSkip
Returns code true code if a line given by the first index matches a line specified by the other code I Range Comparator code and index param this Indexthe number of the line within this range comparator param other the range comparator to compare this with param other Index the number of the line within the other comparator return code true code if the lines are equal public boolean ranges Equal int this Index I Range Comparator other int other Index if other null other get Class get Class Doc Line Comparator dlc Doc Line Comparator other if f Ignore White Space extract this Index f This Buffer dlc extract other Index f Other Buffer return compare f This Buffer f Other Buffer else int tlen get Line Length this Index int olen dlc get Line Length other Index if tlen olen extract this Index f This Buffer dlc extract other Index f Other Buffer return f This Buffer equals f Other Buffer return false  IRangeComparator thisIndexthe otherIndex rangesEqual thisIndex IRangeComparator otherIndex getClass getClass DocLineComparator DocLineComparator fIgnoreWhiteSpace thisIndex fThisBuffer otherIndex fOtherBuffer fThisBuffer fOtherBuffer getLineLength thisIndex getLineLength otherIndex thisIndex fThisBuffer otherIndex fOtherBuffer fThisBuffer fOtherBuffer
Aborts the comparison if the number of tokens is too large return code true code to abort a token comparison public boolean skip Range Comparison int length int max I Range Comparator other return f Skip  skipRangeComparison IRangeComparator fSkip
Extract a single line from the underlying document without the line separator into the given document based character sequence param line the number of the line to extract param buffer the document based character sequence private void extract int line Document Char Sequence buffer if line f Line Count try int doc Line f Line Offset line if f Last Offset 1 f Last Offset f Document get Line Offset doc Line buffer set Document f Document buffer set Offset f Last Offset buffer set Length f Last Length return catch Bad Location Exception e f Skip true buffer set Document f Document buffer set Offset 0 buffer set Length 0  DocumentCharSequence fLineCount docLine fLineOffset fLastOffset fLastOffset fDocument getLineOffset docLine setDocument fDocument setOffset fLastOffset setLength fLastLength BadLocationException fSkip setDocument fDocument setOffset setLength
private boolean compare Char Sequence s1 Char Sequence s2 int l1 s1 length int l2 s2 length int c1 0 c2 0 int i1 0 i2 0 while c1 1 c1 1 while i1 l1 char c s1 char At i1 if Character is Whitespace c c1 c break c2 1 while i2 l2 char c s2 char At i2 if Character is Whitespace c c2 c break if c1 c2 return false return true  CharSequence CharSequence charAt isWhitespace charAt isWhitespace

Returns the number of comparable entities return the number of comparable entities 
Returns whether the comparable entity given by the first index matches an entity specified by the other code I Range Comparator code and index param this Index the index of the comparable entity within this code I Range Comparator code param other the I Range Comparator to compare this with param other Index the index of the comparable entity within the other code I Range Comparator code return code true code if the comparable entities are equal  IRangeComparator thisIndex IRangeComparator IRangeComparator otherIndex IRangeComparator
Returns whether a comparison should be skipped because it would be too costly or lengthy param length a number on which to base the decision whether to return code true code or code false code param max Length another number on which to base the decision whether to return code true code or code false code param other the other code I Range Comparator code to compare with return code true code to avoid a too lengthy range comparison  maxLength IRangeComparator

Returns the start character position of the token with the given index If the index is out of range but not negative the character position behind the last character the length of the input string is returned param index index of the token for which to return the start position return the start position of the token with the given index throws java lang Index Out Of Bounds Exception if index is negative  IndexOutOfBoundsException
Returns the character length of the token with the given index If the index is out of range but not negative the value 0 is returned param index index of the token for which to return the start position return the character length of the token with the given index throws java lang Index Out Of Bounds Exception if index is negative  IndexOutOfBoundsException

Creates a Linked Range Difference an initializes it to the error state Linked Range Difference super ERROR f Next null  LinkedRangeDifference LinkedRangeDifference fNext
Constructs and links a Linke Range Difference to another Linked Range Difference Linked Range Difference Linked Range Difference next int operation super operation f Next next  LinkeRangeDifference LinkedRangeDifference LinkedRangeDifference LinkedRangeDifference fNext
Follows the next link Linked Range Difference get Next return f Next  LinkedRangeDifference getNext fNext
boolean is Delete return kind DELETE  isDelete
boolean is Insert return kind INSERT  isInsert
Sets the next link of this Linked Range Difference void set Next Linked Range Difference next f Next next  LinkedRangeDifference setNext LinkedRangeDifference fNext

Initialize without detail message public Low Memory Exception super  LowMemoryException
Initialize with the given detail message param message the detail message public Low Memory Exception String message super message  LowMemoryException
Create a new linked range difference with the given next range and operation param next the next linked range difference param operation the operation return the new linked range difference throws Low Memory Exception public Linked Range Difference new Range Linked Range Difference next int operation throws Low Memory Exception check return new Linked Range Difference next operation  LowMemoryException LinkedRangeDifference newRange LinkedRangeDifference LowMemoryException LinkedRangeDifference
After code CHECK INTERVAL code calls check whether at least a fraction of code THRESHOLD code of the maximal available memory is free otherwise throw an link Low Memory Exception throws Low Memory Exception private void check throws Low Memory Exception if f Count CHECK INTERVAL 0 Runtime runtime Runtime get Runtime long max Memory runtime max Memory long max Free Memory max Memory runtime total Memory runtime free Memory if float max Free Memory MAXIMAL INTERVAL REQUIREMENT max Memory THRESHOLD throw f Low Memory Exception if f Count MAX INSTANCES throw f Low Memory Exception  CHECK_INTERVAL LowMemoryException LowMemoryException LowMemoryException fCount CHECK_INTERVAL getRuntime maxMemory maxMemory maxFreeMemory maxMemory totalMemory freeMemory maxFreeMemory MAXIMAL_INTERVAL_REQUIREMENT maxMemory fLowMemoryException fCount MAX_INSTANCES fLowMemoryException

Creates a new range difference with the given change kind param change Kind the kind of change public Range Difference int change Kind f Kind change Kind  changeKind RangeDifference changeKind fKind changeKind
Creates a new code Range Difference code with the given change kind and left and right ranges param kind the kind of change param right Start start index of entity on right side param right Length number of entities on right side param left Start start index of entity on left side param left Length number of entities on left side public Range Difference int kind int right Start int right Length int left Start int left Length f Kind kind f Right Start right Start f Right Length right Length f Left Start left Start f Left Length left Length  RangeDifference rightStart rightLength leftStart leftLength RangeDifference rightStart rightLength leftStart leftLength fKind fRightStart rightStart fRightLength rightLength fLeftStart leftStart fLeftLength leftLength
Creates a new code Range Difference code with the given change kind and left right and ancestor ranges param kind the kind of change param right Start start index of entity on right side param right Length number of entities on right side param left Start start index of entity on left side param left Length number of entities on left side param ancestor Start start index of entity on ancestor side param ancestor Length number of entities on ancestor side public Range Difference int kind int right Start int right Length int left Start int left Length int ancestor Start int ancestor Length this kind right Start right Length left Start left Length l Ancestor Start ancestor Start l Ancestor Length ancestor Length  RangeDifference rightStart rightLength leftStart leftLength ancestorStart ancestorLength RangeDifference rightStart rightLength leftStart leftLength ancestorStart ancestorLength rightStart rightLength leftStart leftLength lAncestorStart ancestorStart lAncestorLength ancestorLength
Returns the kind of difference return the kind of difference one of code NOCHANGE code code CHANGE code code LEFT code code RIGHT code code ANCESTOR code code CONFLICT code code ERROR code public int kind return f Kind  fKind
Returns the start index of the entity range on the ancestor side return the start index of the entity range on the ancestor side public int ancestor Start return l Ancestor Start  ancestorStart lAncestorStart
Returns the number of entities on the ancestor side return the number of entities on the ancestor side public int ancestor Length return l Ancestor Length  ancestorLength lAncestorLength
Returns the end index of the entity range on the ancestor side return the end index of the entity range on the ancestor side public int ancestor End return l Ancestor Start l Ancestor Length  ancestorEnd lAncestorStart lAncestorLength
Returns the start index of the entity range on the right side return the start index of the entity range on the right side public int right Start return f Right Start  rightStart fRightStart
Returns the number of entities on the right side return the number of entities on the right side public int right Length return f Right Length  rightLength fRightLength
Returns the end index of the entity range on the right side return the end index of the entity range on the right side public int right End return f Right Start f Right Length  rightEnd fRightStart fRightLength
Returns the start index of the entity range on the left side return the start index of the entity range on the left side public int left Start return f Left Start  leftStart fLeftStart
Returns the number of entities on the left side return the number of entities on the left side public int left Length return f Left Length  leftLength fLeftLength
Returns the end index of the entity range on the left side return the end index of the entity range on the left side public int left End return f Left Start f Left Length  leftEnd fLeftStart fLeftLength
Returns the maximum number of entities in the left right and ancestor sides of this range return the maximum number of entities in the left right and ancestor sides of this range public int max Length return Math max f Right Length Math max f Left Length l Ancestor Length  maxLength fRightLength fLeftLength lAncestorLength
Shifts the offset into the left document of the receiver param shift the number of elements to shift public void shift Left int shift Assert is True shift f Left Start 0 f Left Start shift  shiftLeft isTrue fLeftStart fLeftStart
Shifts the offset into the right document of the receiver param shift the number of elements to shift public void shift Right int shift Assert is True shift f Right Start 0 f Right Start shift  shiftRight isTrue fRightStart fRightStart
Resizes the receiver code shift code units on both sides by moving the start of the difference param shift the number of elements to shift public void extend Start int shift Assert is True shift f Right Start 0 Assert is True shift f Left Start 0 f Right Start shift f Right Length shift f Left Start shift f Left Length shift  extendStart isTrue fRightStart isTrue fLeftStart fRightStart fRightLength fLeftStart fLeftLength
Resizes the receiver code shift code units on both sides by moving the end of the difference param shift the number of elements to shift public void extend End int shift Assert is True shift f Right Length 0 Assert is True shift f Left Length 0 f Right Length shift f Left Length shift  extendEnd isTrue fRightLength isTrue fLeftLength fRightLength fLeftLength
public boolean equals Object obj if obj instanceof Range Difference Range Difference d Range Difference obj return f Kind d f Kind f Right Start d f Right Start f Right Length d f Right Length f Left Start d f Left Start f Left Length d f Left Length return false  RangeDifference RangeDifference RangeDifference fKind fKind fRightStart fRightStart fRightLength fRightLength fLeftStart fLeftStart fLeftLength fLeftLength
Returns the diff region corresponding to this range difference param differences the list of differences around this one difference param source the original document left document that this difference refers to return a code Diff Region code corresponding to this difference public Diff Region get Diff Region List differences I Document source if f Region null f Region new Diff Region this 0 differences source return f Region  DiffRegion DiffRegion getDiffRegion IDocument fRegion fRegion DiffRegion fRegion

Non instantiatiable private Range Differencer  RangeDifferencer
Finds the differences between two code I Range Comparator code s The differences are returned as an array of code Range Difference code s If no differences are detected an empty array is returned param left the left range comparator param right the right range comparator return an array of range differences or an empty array if no differences were found throws Low Memory Exception if the differencer runs out of memory public static Range Difference find Differences I Range Comparator left I Range Comparator right throws Low Memory Exception return find Differences I Progress Monitor null left right  IRangeComparator RangeDifference LowMemoryException RangeDifference findDifferences IRangeComparator IRangeComparator LowMemoryException findDifferences IProgressMonitor
Finds the differences between two code I Range Comparator code s The differences are returned as an array of code Range Difference code s If no differences are detected an empty array is returned param pm if not code null code used to report progress param left the left range comparator param right the right range comparator return an array of range differences or an empty array if no differences were found throws Low Memory Exception if the differencer runs out of memory since 2 0 public static Range Difference find Differences I Progress Monitor pm I Range Comparator left I Range Comparator right throws Low Memory Exception assert that both I Range Comparators are of the same class Assert is True right get Class equals left get Class int right Size right get Range Count int left Size left get Range Count Differences matrix only the last d of each diagonal is stored i e last Diagonal k row of d int diag Len 2 Math max right Size left Size bound on the size of edit script int max Diagonal diag Len int last Diagonal new int diag Len 1 the row containing the last d on diagonal k last Diagonal k row int origin diag Len 2 origin of diagonal 0 script corresponding to d k Linked Range Difference script new Linked Range Difference diag Len 1 int row col find common prefix for row 0 row right Size row left Size ranges Equal right row left row true row do nothing last Diagonal origin row script origin null int lower row right Size origin 1 origin 1 int upper row left Size origin 1 origin 1 if lower upper return EMPTY RESULT System out println find Differences max Diagonal lower upper Linked Range Factory factory new Linked Range Factory for each value of the edit distance for int d 1 d max Diagonal d d is the current edit distance if pm null pm worked 1 if right skip Range Comparison d max Diagonal left return EMPTY RESULT should be something we already found for each relevant diagonal d d 2 d 2 d for int k lower k upper k 2 k is the current diagonal Linked Range Difference edit if pm null pm is Canceled return EMPTY RESULT if k origin d k origin d last Diagonal k 1 last Diagonal k 1 move down row last Diagonal k 1 1 edit factory new Range script k 1 Linked Range Difference DELETE else move right row last Diagonal k 1 edit factory new Range script k 1 Linked Range Difference INSERT col row k origin edit f Right Start row edit f Left Start col Assert is True k 0 k max Diagonal script k edit slide down the diagonal as far as possible while row right Size col left Size ranges Equal right row left col true row col Assert is True k 0 k max Diagonal Unreasonable value for diagonal index last Diagonal k row if row right Size col left Size show Script script k right left return create Differences Ranges script k if row right Size lower k 2 if col left Size upper k 2 lower upper too many differences Assert is True false return null  IRangeComparator RangeDifference LowMemoryException RangeDifference findDifferences IProgressMonitor IRangeComparator IRangeComparator LowMemoryException IRangeComparators isTrue getClass getClass rightSize getRangeCount leftSize getRangeCount lastDiagonal diagLen rightSize leftSize maxDiagonal diagLen lastDiagonal diagLen lastDiagonal diagLen LinkedRangeDifference LinkedRangeDifference diagLen rightSize leftSize rangesEqual lastDiagonal rightSize leftSize EMPTY_RESULT findDifferences maxDiagonal LinkedRangeFactory LinkedRangeFactory maxDiagonal skipRangeComparison maxDiagonal EMPTY_RESULT LinkedRangeDifference isCanceled EMPTY_RESULT lastDiagonal lastDiagonal lastDiagonal newRange LinkedRangeDifference lastDiagonal newRange LinkedRangeDifference fRightStart fLeftStart isTrue maxDiagonal rightSize leftSize rangesEqual isTrue maxDiagonal lastDiagonal rightSize leftSize showScript createDifferencesRanges rightSize leftSize isTrue
Finds the differences among three code I Range Comparator code s The differences are returned as a list of code Range Difference code s If no differences are detected an empty list is returned If the ancestor range comparator is code null code a two way comparison is performed param ancestor the ancestor range comparator or code null code param left the left range comparator param right the right range comparator return an array of range differences or an empty array if no differences were found throws Low Memory Exception if the differencer runs out of memory public static Range Difference find Differences I Range Comparator ancestor I Range Comparator left I Range Comparator right throws Low Memory Exception return find Differences null ancestor left right  IRangeComparator RangeDifference LowMemoryException RangeDifference findDifferences IRangeComparator IRangeComparator IRangeComparator LowMemoryException findDifferences
Finds the differences among three code I Range Comparator code s The differences are returned as a list of code Range Difference code s If no differences are detected an empty list is returned If the ancestor range comparator is code null code a two way comparison is performed param pm if not code null code used to report progress param ancestor the ancestor range comparator or code null code param left the left range comparator param right the right range comparator return an array of range differences or an empty array if no differences were found throws Low Memory Exception if the differencer runs out of memory since 2 0 public static Range Difference find Differences I Progress Monitor pm I Range Comparator ancestor I Range Comparator left I Range Comparator right throws Low Memory Exception if ancestor null return find Differences pm left right Range Difference left Ancestor Script null Range Difference right Ancestor Script find Differences pm ancestor right if right Ancestor Script null left Ancestor Script find Differences pm ancestor left if right Ancestor Script null left Ancestor Script null return null Differences Iterator my Iter new Differences Iterator right Ancestor Script Differences Iterator your Iter new Differences Iterator left Ancestor Script List diff3 new Array List diff3 add new Range Difference Range Difference ERROR add a sentinel int change Range Start 0 int change Range End 0 Combine the two two way edit scripts into one while my Iter f Difference null your Iter f Difference null Differences Iterator start Thread my Iter remove All your Iter remove All take the next diff that is closer to the start if my Iter f Difference null start Thread your Iter else if your Iter f Difference null start Thread my Iter else not at end of both scripts take the lowest range if my Iter f Difference f Left Start your Iter f Difference f Left Start 2 common Ancestor change range start Thread my Iter else start Thread your Iter change Range Start start Thread f Difference f Left Start change Range End start Thread f Difference left End start Thread next check for overlapping changes with other thread merge overlapping changes with this range Differences Iterator other start Thread other my Iter your Iter while other f Difference null other f Difference f Left Start change Range End int new Max other f Difference left End other next if new Max change Range End change Range End new Max other other other my Iter your Iter diff3 add create Range Difference3 my Iter your Iter diff3 right left change Range Start change Range End remove sentinel diff3 remove 0 return Range Difference diff3 to Array EMPTY RESULT  IRangeComparator RangeDifference LowMemoryException RangeDifference findDifferences IProgressMonitor IRangeComparator IRangeComparator IRangeComparator LowMemoryException findDifferences RangeDifference leftAncestorScript RangeDifference rightAncestorScript findDifferences rightAncestorScript leftAncestorScript findDifferences rightAncestorScript leftAncestorScript DifferencesIterator myIter DifferencesIterator rightAncestorScript DifferencesIterator yourIter DifferencesIterator leftAncestorScript ArrayList RangeDifference RangeDifference changeRangeStart changeRangeEnd myIter fDifference yourIter fDifference DifferencesIterator startThread myIter removeAll yourIter removeAll myIter fDifference startThread yourIter yourIter fDifference startThread myIter myIter fDifference fLeftStart yourIter fDifference fLeftStart startThread myIter startThread yourIter changeRangeStart startThread fDifference fLeftStart changeRangeEnd startThread fDifference leftEnd startThread DifferencesIterator startThread myIter yourIter fDifference fDifference fLeftStart changeRangeEnd newMax fDifference leftEnd newMax changeRangeEnd changeRangeEnd newMax myIter yourIter createRangeDifference3 myIter yourIter changeRangeStart changeRangeEnd RangeDifference toArray EMPTY_RESULT
Finds the differences among two code I Range Comparator code s In contrast to code find Differences code the result contains code Range Difference code elements for non differing ranges too param left the left range comparator param right the right range comparator return an array of range differences throws Low Memory Exception if the differencer runs out of memory public static List find Ranges I Range Comparator left I Range Comparator right throws Low Memory Exception return find Ranges I Progress Monitor null left right  IRangeComparator findDifferences RangeDifference LowMemoryException findRanges IRangeComparator IRangeComparator LowMemoryException findRanges IProgressMonitor
Finds the differences among two code I Range Comparator code s In contrast to code find Differences code the result contains code Range Difference code elements for non differing ranges too param pm if not code null code used to report progress param left the left range comparator param right the right range comparator return an array of range differences throws Low Memory Exception if the differencer runs out of memory since 2 0 public static List find Ranges I Progress Monitor pm I Range Comparator left I Range Comparator right throws Low Memory Exception Range Difference in find Differences pm left right List out new Array List Range Difference rd int mstart 0 int ystart 0 for int i 0 i in length i Range Difference es in i rd new Range Difference Range Difference NOCHANGE mstart es right Start mstart ystart es left Start ystart if rd max Length 0 out add rd out add es mstart es right End ystart es left End rd new Range Difference Range Difference NOCHANGE mstart right get Range Count mstart ystart left get Range Count ystart if rd max Length 0 out add rd return out  IRangeComparator findDifferences RangeDifference LowMemoryException findRanges IProgressMonitor IRangeComparator IRangeComparator LowMemoryException RangeDifference findDifferences ArrayList RangeDifference RangeDifference RangeDifference RangeDifference rightStart leftStart maxLength rightEnd leftEnd RangeDifference RangeDifference getRangeCount getRangeCount maxLength
Finds the differences among three code I Range Comparator code s In contrast to code find Differences code the result contains code Range Difference code elements for non differing ranges too If the ancestor range comparator is code null code a two way comparison is performed param pm if not code null code used to report progress param ancestor the ancestor range comparator or code null code param left the left range comparator param right the right range comparator return an array of range differences throws Low Memory Exception if the differencer runs out of memory public static List find Ranges I Range Comparator ancestor I Range Comparator left I Range Comparator right throws Low Memory Exception return find Ranges null ancestor left right  IRangeComparator findDifferences RangeDifference LowMemoryException findRanges IRangeComparator IRangeComparator IRangeComparator LowMemoryException findRanges
Finds the differences among three code I Range Comparator code s In contrast to code find Differences code the result contains code Range Difference code elements for non differing ranges too If the ancestor range comparator is code null code a two way comparison is performed param pm if not code null code used to report progress param ancestor the ancestor range comparator or code null code param left the left range comparator param right the right range comparator return an array of range differences throws Low Memory Exception if the differencer runs out of memory since 2 0 public static List find Ranges I Progress Monitor pm I Range Comparator ancestor I Range Comparator left I Range Comparator right throws Low Memory Exception if ancestor null return find Ranges pm left right Range Difference in find Differences pm ancestor left right List out new Array List Range Difference rd int mstart 0 int ystart 0 int astart 0 for int i 0 i in length i Range Difference es in i rd new Range Difference Range Difference NOCHANGE mstart es right Start mstart ystart es left Start ystart astart es ancestor Start astart if rd max Length 0 out add rd out add es mstart es right End ystart es left End astart es ancestor End rd new Range Difference Range Difference NOCHANGE mstart right get Range Count mstart ystart left get Range Count ystart astart ancestor get Range Count astart if rd max Length 0 out add rd return out  IRangeComparator findDifferences RangeDifference LowMemoryException findRanges IProgressMonitor IRangeComparator IRangeComparator IRangeComparator LowMemoryException findRanges RangeDifference findDifferences ArrayList RangeDifference RangeDifference RangeDifference RangeDifference rightStart leftStart ancestorStart maxLength rightEnd leftEnd ancestorEnd RangeDifference RangeDifference getRangeCount getRangeCount getRangeCount maxLength
Creates a Vector of Differences Ranges out of the Linked Range Difference It coalesces adjacent changes In addition indices are changed such that the ranges are 1 open i e the end of the range is not included and 2 are zero based private static Range Difference create Differences Ranges Linked Range Difference start Linked Range Difference ep reverse Differences start Array List result new Array List Range Difference es null while ep null es new Range Difference Range Difference CHANGE if ep is Insert es f Right Start ep f Right Start 1 es f Left Start ep f Left Start Range Difference b ep do ep ep get Next es f Left Length while ep null ep is Insert ep f Right Start b f Right Start else es f Right Start ep f Right Start es f Left Start ep f Left Start Range Difference a ep deleted lines do a ep ep ep get Next es f Right Length while ep null ep is Delete ep f Right Start a f Right Start 1 boolean change ep null ep is Insert ep f Right Start a f Right Start if change Range Difference b ep replacement lines do ep ep get Next es f Left Length while ep null ep is Insert ep f Right Start b f Right Start else es f Left Length 0 es f Left Start meaning of range changes from insert after to replace with the script commands are 1 based subtract one to make them zero based es f Right Start es f Left Start result add es return Range Difference result to Array EMPTY RESULT  DifferencesRanges LinkedRangeDifference RangeDifference createDifferencesRanges LinkedRangeDifference LinkedRangeDifference reverseDifferences ArrayList ArrayList RangeDifference RangeDifference RangeDifference isInsert fRightStart fRightStart fLeftStart fLeftStart RangeDifference getNext fLeftLength isInsert fRightStart fRightStart fRightStart fRightStart fLeftStart fLeftStart RangeDifference getNext fRightLength isDelete fRightStart fRightStart isInsert fRightStart fRightStart RangeDifference getNext fLeftLength isInsert fRightStart fRightStart fLeftLength fLeftStart fRightStart fLeftStart RangeDifference toArray EMPTY_RESULT
Creates a code Range Difference3 code given the state of two Difference Iterators private static Range Difference create Range Difference3 Differences Iterator my Iter Differences Iterator your Iter List diff3 I Range Comparator right I Range Comparator left int change Range Start int change Range End int right Start right End int left Start left End int kind Range Difference ERROR Range Difference last Range Difference diff3 get diff3 size 1 Assert is True my Iter get Count 0 your Iter get Count 0 At least one range array must be non empty find corresponding lines to f Change Range Start End in right and left if my Iter get Count 0 only left changed right Start change Range Start last ancestor End last right End right End change Range End last ancestor End last right End kind Range Difference LEFT else Range Difference f Range Difference my Iter f Range get 0 Range Difference l Range Difference my Iter f Range get my Iter f Range size 1 right Start change Range Start f f Left Start f f Right Start right End change Range End l left End l right End if your Iter get Count 0 only right changed left Start change Range Start last ancestor End last left End left End change Range End last ancestor End last left End kind Range Difference RIGHT else Range Difference f Range Difference your Iter f Range get 0 Range Difference l Range Difference your Iter f Range get your Iter f Range size 1 left Start change Range Start f f Left Start f f Right Start left End change Range End l left End l right End if kind Range Difference ERROR overlapping change conflict compare the changed ranges if range Spans Equal right right Start right End right Start left left Start left End left Start kind Range Difference ANCESTOR else kind Range Difference CONFLICT return new Range Difference kind right Start right End right Start left Start left End left Start change Range Start change Range End change Range Start  RangeDifference3 DifferenceIterators RangeDifference createRangeDifference3 DifferencesIterator myIter DifferencesIterator yourIter IRangeComparator IRangeComparator changeRangeStart changeRangeEnd rightStart rightEnd leftStart leftEnd RangeDifference RangeDifference RangeDifference isTrue myIter getCount yourIter getCount fChangeRangeStart myIter getCount rightStart changeRangeStart ancestorEnd rightEnd rightEnd changeRangeEnd ancestorEnd rightEnd RangeDifference RangeDifference RangeDifference myIter fRange RangeDifference RangeDifference myIter fRange myIter fRange rightStart changeRangeStart fLeftStart fRightStart rightEnd changeRangeEnd leftEnd rightEnd yourIter getCount leftStart changeRangeStart ancestorEnd leftEnd leftEnd changeRangeEnd ancestorEnd leftEnd RangeDifference RangeDifference RangeDifference yourIter fRange RangeDifference RangeDifference yourIter fRange yourIter fRange leftStart changeRangeStart fLeftStart fRightStart leftEnd changeRangeEnd leftEnd rightEnd RangeDifference rangeSpansEqual rightStart rightEnd rightStart leftStart leftEnd leftStart RangeDifference RangeDifference RangeDifference rightStart rightEnd rightStart leftStart leftEnd leftStart changeRangeStart changeRangeEnd changeRangeStart
Tests if two ranges are equal private static boolean ranges Equal I Range Comparator a int ai I Range Comparator b int bi return a ranges Equal ai b bi  rangesEqual IRangeComparator IRangeComparator rangesEqual
Tests whether code right code and code left left changed in the same way private static boolean range Spans Equal I Range Comparator right int right Start int right Len I Range Comparator left int left Start int left Len if right Len left Len int i 0 for i 0 i right Len i if ranges Equal right right Start i left left Start i break if i right Len return true return false  rangeSpansEqual IRangeComparator rightStart rightLen IRangeComparator leftStart leftLen rightLen leftLen rightLen rangesEqual rightStart leftStart rightLen
Reverses the range differences private static Linked Range Difference reverse Differences Linked Range Difference start Linked Range Difference ep behind ahead ahead start ep null while ahead null behind ep ep ahead ahead ahead get Next ep set Next behind return ep  LinkedRangeDifference reverseDifferences LinkedRangeDifference LinkedRangeDifference getNext setNext

Creates a new diff region param difference param offset param differences param source public Diff Region Range Difference difference int offset List differences I Document source super org eclipse ui workbench texteditor quickdiff Change false null NON NLS 1 f Offset offset f Difference difference f List differences f Document source  DiffRegion RangeDifference IDocument quickdiffChange fOffset fDifference fList fDocument
public String get Type we return unknown for unchanged regions to avoid them getting displayed switch get Change Type case CHANGED return org eclipse ui workbench texteditor quickdiff Change NON NLS 1 case ADDED return org eclipse ui workbench texteditor quickdiff Addition NON NLS 1 case UNCHANGED return org eclipse ui workbench texteditor quickdiff Unchanged NON NLS 1 default return TYPE UNKNOWN  getType getChangeType quickdiffChange quickdiffAddition quickdiffUnchanged TYPE_UNKNOWN
public int get Removed Lines Below if f Offset f Difference right Length 1 if get Change Type UNCHANGED return Math max f Difference left Length f Difference right Length 0 else for List Iterator it f List list Iterator it has Next if f Difference equals it next if it has Next Range Difference next Range Difference it next if next right Length 0 return Math max next left Length next right Length 0 return 0 return 0 else return 0  getRemovedLinesBelow fOffset fDifference rightLength getChangeType fDifference leftLength fDifference rightLength ListIterator fList listIterator hasNext fDifference hasNext RangeDifference RangeDifference rightLength leftLength rightLength
public int get Change Type if f Difference kind Range Difference NOCHANGE return UNCHANGED else if f Offset f Difference left Length return ADDED else return CHANGED  getChangeType fDifference RangeDifference fOffset fDifference leftLength
public int get Removed Lines Above if get Change Type UNCHANGED f Offset 0 return 0 else for List Iterator it f List list Iterator f List size it has Previous if f Difference equals it previous if it has Previous Range Difference previous Range Difference it previous return Math max previous left Length previous right Length 0 else return 0 return 0  getRemovedLinesAbove getChangeType fOffset ListIterator fList listIterator fList hasPrevious fDifference hasPrevious RangeDifference RangeDifference leftLength rightLength
see org eclipse jface text source I Line Diff Info has Changes public boolean has Changes return get Change Type UNCHANGED get Removed Lines Above 0 get Removed Lines Below 0  ILineDiffInfo hasChanges hasChanges getChangeType getRemovedLinesAbove getRemovedLinesBelow
public String get Original Text I Document doc f Document if doc null int start Line f Difference left Start f Offset if start Line f Difference left End return new String 0 original text of an added line is empty int end Line start Line get Removed Lines Below if get Change Type UNCHANGED start Line String ret new String end Line start Line 1 for int i 0 i ret length i try ret i doc get doc get Line Offset start Line i doc get Line Length start Line i catch Bad Location Exception e ret i new String return ret in initialization phase return new String 0  getOriginalText IDocument fDocument startLine fDifference leftStart fOffset startLine fDifference leftEnd endLine startLine getRemovedLinesBelow getChangeType startLine endLine startLine getLineOffset startLine getLineLength startLine BadLocationException
public String get Text int r f Difference right Length int l f Difference left Length int c Math min r l int a r l String changed c 0 Quick Diff Messages get Formatted String quickdiff annotation changed new Integer c null NON NLS 1 String added if a 0 added Quick Diff Messages get Formatted String quickdiff annotation added new Integer a NON NLS 1 else if a 0 added Quick Diff Messages get Formatted String quickdiff annotation deleted new Integer a NON NLS 1 else added null String line c 1 c 0 Math abs a 1 Quick Diff Messages get String quickdiff annotation line plural Quick Diff Messages get String quickdiff annotation line singular NON NLS 1 NON NLS 2 String ret changed null changed changed null line NON NLS 1 NON NLS 2 NON NLS 3 changed null added null added null added NON NLS 1 NON NLS 2 NON NLS 3 added null changed null line NON NLS 1 NON NLS 2 return ret  getText fDifference rightLength fDifference leftLength QuickDiffMessages getFormattedString QuickDiffMessages getFormattedString QuickDiffMessages getFormattedString QuickDiffMessages getString line_plural QuickDiffMessages getString line_singular
return Returns the difference public Range Difference get Difference return f Difference  RangeDifference getDifference fDifference
return Returns the offset public int get Offset return f Offset  getOffset fOffset

see org eclipse jface text source I Line Diff Info get Removed Lines Below public int get Removed Lines Below return 0  ILineDiffInfo getRemovedLinesBelow getRemovedLinesBelow
see org eclipse jface text source I Line Diff Info get Removed Lines Above public int get Removed Lines Above return 0  ILineDiffInfo getRemovedLinesAbove getRemovedLinesAbove
see org eclipse jface text source I Line Diff Info get Change Type public int get Change Type return CHANGED  ILineDiffInfo getChangeType getChangeType
see org eclipse jface text source I Line Diff Info has Changes public boolean has Changes return true  ILineDiffInfo hasChanges hasChanges
see org eclipse jface text source I Line Diff Info get Original Text public String get Original Text return ORIGINAL TEXT  ILineDiffInfo getOriginalText getOriginalText ORIGINAL_TEXT
Creates a new differ public Document Line Differ  DocumentLineDiffer
public I Line Diff Info get Line Info int line if is Suspended return f Line Change Info try cache first speeds up linear search Range Difference last f Last Difference if last null last right Start line last right End line return new Diff Region last line last right Start f Differences f Left Document f Last Difference get Range Difference For Right Line line last f Last Difference if last null return new Diff Region last line last right Start f Differences f Left Document else return null  ILineDiffInfo getLineInfo isSuspended fLineChangeInfo RangeDifference fLastDifference rightStart rightEnd DiffRegion rightStart fDifferences fLeftDocument fLastDifference getRangeDifferenceForRightLine fLastDifference DiffRegion rightStart fDifferences fLeftDocument
public synchronized void revert Line int line throws Bad Location Exception if is Initialized throw new Bad Location Exception Quick Diff Messages get String quickdiff nonsynchronized NON NLS 1 Diff Region region Diff Region get Line Info line if region null f Right Document null f Left Document null return Range Difference diff region get Difference int r Offset f Right Document get Line Offset line int r Length f Right Document get Line Length line int left Line diff left Start region get Offset String replacement if left Line diff left End restoring a deleted line replacement new String else int l Offset f Left Document get Line Offset left Line int l Length f Left Document get Line Length left Line replacement f Left Document get l Offset l Length f Right Document replace r Offset r Length replacement  revertLine BadLocationException isInitialized BadLocationException QuickDiffMessages getString DiffRegion DiffRegion getLineInfo fRightDocument fLeftDocument RangeDifference getDifference rOffset fRightDocument getLineOffset rLength fRightDocument getLineLength leftLine leftStart getOffset leftLine leftEnd lOffset fLeftDocument getLineOffset leftLine lLength fLeftDocument getLineLength leftLine fLeftDocument lOffset lLength fRightDocument rOffset rLength
public synchronized void revert Block int line throws Bad Location Exception if is Initialized throw new Bad Location Exception Quick Diff Messages get String quickdiff nonsynchronized NON NLS 1 Diff Region region Diff Region get Line Info line if region null f Right Document null f Left Document null return Range Difference diff region get Difference int r Offset f Right Document get Line Offset diff right Start int r Length f Right Document get Line Offset diff right End 1 f Right Document get Line Length diff right End 1 r Offset int l Offset f Left Document get Line Offset diff left Start int l Length f Left Document get Line Offset diff left End 1 f Left Document get Line Length diff left End 1 l Offset f Right Document replace r Offset r Length f Left Document get l Offset l Length  revertBlock BadLocationException isInitialized BadLocationException QuickDiffMessages getString DiffRegion DiffRegion getLineInfo fRightDocument fLeftDocument RangeDifference getDifference rOffset fRightDocument getLineOffset rightStart rLength fRightDocument getLineOffset rightEnd fRightDocument getLineLength rightEnd rOffset lOffset fLeftDocument getLineOffset leftStart lLength fLeftDocument getLineOffset leftEnd fLeftDocument getLineLength leftEnd lOffset fRightDocument rOffset rLength fLeftDocument lOffset lLength
public synchronized void revert Selection int line int n Lines throws Bad Location Exception if is Initialized throw new Bad Location Exception Quick Diff Messages get String quickdiff nonsynchronized NON NLS 1 int r Offset 1 r Length 1 l Offset 1 l Length 1 Range Difference diff null Iterator it f Differences iterator get start while it has Next diff Range Difference it next if line diff right End r Offset f Right Document get Line Offset line int left Line Math min diff left Start line diff right Start diff left End 1 l Offset f Left Document get Line Offset left Line break if r Offset 1 l Offset 1 return get end length int to line n Lines 1 while it has Next diff Range Difference it next if to diff right End int r End Offset f Right Document get Line Offset to f Right Document get Line Length to r Length r End Offset r Offset int left Line Math min diff left Start to diff right Start diff left End 1 int l End Offset f Left Document get Line Offset left Line f Left Document get Line Length left Line l Length l End Offset l Offset break if r Length 1 l Length 1 return f Right Document replace r Offset r Length f Left Document get l Offset l Length  revertSelection nLines BadLocationException isInitialized BadLocationException QuickDiffMessages getString rOffset rLength lOffset lLength RangeDifference fDifferences hasNext RangeDifference rightEnd rOffset fRightDocument getLineOffset leftLine leftStart rightStart leftEnd lOffset fLeftDocument getLineOffset leftLine rOffset lOffset nLines hasNext RangeDifference rightEnd rEndOffset fRightDocument getLineOffset fRightDocument getLineLength rLength rEndOffset rOffset leftLine leftStart rightStart leftEnd lEndOffset fLeftDocument getLineOffset leftLine fLeftDocument getLineLength leftLine lLength lEndOffset lOffset rLength lLength fRightDocument rOffset rLength fLeftDocument lOffset lLength
public synchronized int restore After Line int line throws Bad Location Exception if is Initialized throw new Bad Location Exception Quick Diff Messages get String quickdiff nonsynchronized NON NLS 1 Diff Region region Diff Region get Line Info line if region null f Right Document null f Left Document null return 0 if region get Removed Lines Below 1 return 0 Range Difference diff null for Iterator it f Differences iterator it has Next diff Range Difference it next if line diff right Start line diff right End if diff kind Range Difference NOCHANGE it has Next diff Range Difference it next break if diff null return 0 int r Offset f Right Document get Line Offset diff right End int r Length 0 int left Line diff left Start diff right Length int l Offset f Left Document get Line Offset left Line int l Length f Left Document get Line Offset diff left End 1 f Left Document get Line Length diff left End 1 l Offset f Right Document replace r Offset r Length f Left Document get l Offset l Length return diff left Length diff right Length  restoreAfterLine BadLocationException isInitialized BadLocationException QuickDiffMessages getString DiffRegion DiffRegion getLineInfo fRightDocument fLeftDocument getRemovedLinesBelow RangeDifference fDifferences hasNext RangeDifference rightStart rightEnd RangeDifference hasNext RangeDifference rOffset fRightDocument getLineOffset rightEnd rLength leftLine leftStart rightLength lOffset fLeftDocument getLineOffset leftLine lLength fLeftDocument getLineOffset leftEnd fLeftDocument getLineLength leftEnd lOffset fRightDocument rOffset rLength fLeftDocument lOffset lLength leftLength rightLength
Returns the receivers initialization state return code true code if we are initialized and in sync with the document private boolean is Initialized return f State SYNCHRONIZED  isInitialized fState
Returns the receivers synchronization state return code true code if we are initialized and in sync with the document public synchronized boolean is Synchronized return f State SYNCHRONIZED  isSynchronized fState
Returns code true code if the differ is suspended return code true code if the differ is suspended private synchronized boolean is Suspended return f State SUSPENDED  isSuspended fState
Sets the reference provider for this instance If one has been installed before it is disposed param provider the new provider public void set Reference Provider I Quick Diff Reference Provider provider Assert is Not Null provider if provider f Reference Provider if f Reference Provider null f Reference Provider dispose f Reference Provider provider initialize  setReferenceProvider IQuickDiffReferenceProvider isNotNull fReferenceProvider fReferenceProvider fReferenceProvider fReferenceProvider
Returns the reference provider currently installed or code null code if none is installed return the current reference provider public I Quick Diff Reference Provider get Reference Provider return f Reference Provider  IQuickDiffReferenceProvider getReferenceProvider fReferenceProvider
public I Status run I Progress Monitor monitor 1 wait for any previous job that was canceled to avoid job flooding It will return relatively quickly as Range Differencer supports canceling if old Job null try old Job join catch Interrupted Exception e will not happen as noone interrupts our thread Assert is True false 2 get the reference document I Quick Diff Reference Provider provider f Reference Provider final I Document left try left provider null null provider get Reference monitor catch Core Exception e synchronized Document Line Differ this if is Canceled monitor return Status CANCEL STATUS else clear Model fire Model Changed Document Line Differ this notify All return e get Status catch Operation Canceled Exception e return Status CANCEL STATUS Getting our own copies of the documents for offline diffing We need to make sure that we do get all document modifications after copying the documents as we want to reinject them later on to become consistent Now this is fun The reference documents may be Partially Synchronized Documents which will result in a deadlock if they get changed externally before we get our exclusive copies Here s what we do we try over and over without synchronization to get copies without interleaving modification If there is a document change we just repeat I Document right f Right Document f Right Document but not subject to change I Document actual null the copy of the actual right document I Document reference null the copy of the reference left document synchronized Document Line Differ this 4 take an early exit if the documents are not valid if left null right null if is Canceled monitor return Status CANCEL STATUS else clear Model fire Model Changed Document Line Differ this notify All return Status OK STATUS set the reference document f Left Document left start listening to document events f Ignore Document Events false accessing the reference docuent offline reference provider need to be able to deal with this left add Document Listener Document Line Differ this int i 0 do if i 100 XXX this is an arbitrary emergency exit in case a referenced document goes nuts return new Status I Status ERROR Text Editor Plugin PLUGIN ID I Status OK Quick Diff Messages get Formatted String quickdiff error getting document content new Object left get Class right get Class null NON NLS 1 clear events synchronized Document Line Differ this if is Canceled monitor return Status CANCEL STATUS f Stored Events clear access documents unsynched get an exclusive copy of the actual document reference create Copy left actual create Copy right synchronized Document Line Differ this if f Stored Events size 0 reference null actual null break while true 6 Do Da Diffing Doc Line Comparator ref new Doc Line Comparator reference null false Doc Line Comparator act new Doc Line Comparator actual null false List diffs try diffs Range Differencer find Ranges monitor ref act catch Low Memory Exception e handle Low Memory e return Status CANCEL STATUS 7 Reset the model to the just gotten differences re inject stored events to get up to date synchronized Document Line Differ this if is Canceled monitor return Status CANCEL STATUS set the new differences so we can operate on them f Differences diffs reinject events accumulated in the meantime try do Document Event event synchronized Document Line Differ this if is Canceled monitor return Status CANCEL STATUS if f Stored Events is Empty we are done f Initialization Job null f State SYNCHRONIZED f Last Difference null inform blocking calls Document Line Differ this notify All break else event Document Event f Stored Events remove 0 access documents unsynched handle About To Be Changed event handle Changed event while true catch Bad Location Exception e left remove Document Listener Document Line Differ this clear Model initialize return Status CANCEL STATUS catch Low Memory Exception e handle Low Memory e return Status CANCEL STATUS fire Model Changed return Status OK STATUS  IStatus IProgressMonitor RangeDifferencer oldJob oldJob InterruptedException isTrue IQuickDiffReferenceProvider fReferenceProvider IDocument getReference CoreException DocumentLineDiffer isCanceled CANCEL_STATUS clearModel fireModelChanged DocumentLineDiffer notifyAll getStatus OperationCanceledException CANCEL_STATUS PartiallySynchronizedDocuments IDocument fRightDocument fRightDocument IDocument IDocument DocumentLineDiffer isCanceled CANCEL_STATUS clearModel fireModelChanged DocumentLineDiffer notifyAll OK_STATUS fLeftDocument fIgnoreDocumentEvents addDocumentListener DocumentLineDiffer IStatus TextEditorPlugin PLUGIN_ID IStatus QuickDiffMessages getFormattedString getting_document_content getClass getClass DocumentLineDiffer isCanceled CANCEL_STATUS fStoredEvents createCopy createCopy DocumentLineDiffer fStoredEvents DocLineComparator DocLineComparator DocLineComparator DocLineComparator RangeDifferencer findRanges LowMemoryException handleLowMemory CANCEL_STATUS DocumentLineDiffer isCanceled CANCEL_STATUS fDifferences DocumentEvent DocumentLineDiffer isCanceled CANCEL_STATUS fStoredEvents isEmpty fInitializationJob fState fLastDifference DocumentLineDiffer notifyAll DocumentEvent fStoredEvents handleAboutToBeChanged handleChanged BadLocationException removeDocumentListener DocumentLineDiffer clearModel CANCEL_STATUS LowMemoryException handleLowMemory CANCEL_STATUS fireModelChanged OK_STATUS
private boolean is Canceled I Progress Monitor monitor return f Initialization Job this monitor null monitor is Canceled  isCanceled IProgressMonitor fInitializationJob isCanceled
private void clear Model f Left Document null f Initialization Job null f Stored Events clear f Last Difference null f Differences clear  clearModel fLeftDocument fInitializationJob fStoredEvents fLastDifference fDifferences
Creates a copy of code document code and catches any exceptions that may occur if the document is not modified concurrently Do not call this method in a synchronized block as document get is called and may result in a deadlock otherwise param document the document to create a copy of return a copy of the document or code null code if an exception was thrown private I Document create Copy I Document document Assert is Not Null document TODO needs for sure a safer synchronization method this is a temporary workaround for https bugs eclipse org bugs show bug cgi id 56091 try return new Document document get catch Null Pointer Exception e catch Array Store Exception e catch Index Out Of Bounds Exception e catch Concurrent Modification Exception e return null  IDocument createCopy IDocument isNotNull show_bug NullPointerException ArrayStoreException IndexOutOfBoundsException ConcurrentModificationException
Re initializes the differ using the current reference and code Diff Initializer code synchronized void initialize make new incoming changes go into the queue of stored events plus signal we can t restore f State INITIALIZING if f Right Document null return there is no point in receiving updates before the job we get a new copy of the document for diffing f Ignore Document Events true if f Left Document null f Left Document remove Document Listener this f Left Document null if there already is a job return if it has not started yet cancel it if already running final Job old Job f Initialization Job if old Job null don t chain up jobs if there is one waiting already if old Job get State Job WAITING return else old Job cancel f Initialization Job new Job Quick Diff Messages get String quickdiff initialize NON NLS 1 This is run in a different thread As the documents might be synchronized never ever access the documents in a synchronized section or expect deadlocks See https bugs eclipse org bugs show bug cgi id 44692 public I Status run I Progress Monitor monitor 1 wait for any previous job that was canceled to avoid job flooding It will return relatively quickly as Range Differencer supports canceling if old Job null try old Job join catch Interrupted Exception e will not happen as noone interrupts our thread Assert is True false 2 get the reference document I Quick Diff Reference Provider provider f Reference Provider final I Document left try left provider null null provider get Reference monitor catch Core Exception e synchronized Document Line Differ this if is Canceled monitor return Status CANCEL STATUS else clear Model fire Model Changed Document Line Differ this notify All return e get Status catch Operation Canceled Exception e return Status CANCEL STATUS Getting our own copies of the documents for offline diffing We need to make sure that we do get all document modifications after copying the documents as we want to reinject them later on to become consistent Now this is fun The reference documents may be Partially Synchronized Documents which will result in a deadlock if they get changed externally before we get our exclusive copies Here s what we do we try over and over without synchronization to get copies without interleaving modification If there is a document change we just repeat I Document right f Right Document f Right Document but not subject to change I Document actual null the copy of the actual right document I Document reference null the copy of the reference left document synchronized Document Line Differ this 4 take an early exit if the documents are not valid if left null right null if is Canceled monitor return Status CANCEL STATUS else clear Model fire Model Changed Document Line Differ this notify All return Status OK STATUS set the reference document f Left Document left start listening to document events f Ignore Document Events false accessing the reference docuent offline reference provider need to be able to deal with this left add Document Listener Document Line Differ this int i 0 do if i 100 XXX this is an arbitrary emergency exit in case a referenced document goes nuts return new Status I Status ERROR Text Editor Plugin PLUGIN ID I Status OK Quick Diff Messages get Formatted String quickdiff error getting document content new Object left get Class right get Class null NON NLS 1 clear events synchronized Document Line Differ this if is Canceled monitor return Status CANCEL STATUS f Stored Events clear access documents unsynched get an exclusive copy of the actual document reference create Copy left actual create Copy right synchronized Document Line Differ this if f Stored Events size 0 reference null actual null break while true 6 Do Da Diffing Doc Line Comparator ref new Doc Line Comparator reference null false Doc Line Comparator act new Doc Line Comparator actual null false List diffs try diffs Range Differencer find Ranges monitor ref act catch Low Memory Exception e handle Low Memory e return Status CANCEL STATUS 7 Reset the model to the just gotten differences re inject stored events to get up to date synchronized Document Line Differ this if is Canceled monitor return Status CANCEL STATUS set the new differences so we can operate on them f Differences diffs reinject events accumulated in the meantime try do Document Event event synchronized Document Line Differ this if is Canceled monitor return Status CANCEL STATUS if f Stored Events is Empty we are done f Initialization Job null f State SYNCHRONIZED f Last Difference null inform blocking calls Document Line Differ this notify All break else event Document Event f Stored Events remove 0 access documents unsynched handle About To Be Changed event handle Changed event while true catch Bad Location Exception e left remove Document Listener Document Line Differ this clear Model initialize return Status CANCEL STATUS catch Low Memory Exception e handle Low Memory e return Status CANCEL STATUS fire Model Changed return Status OK STATUS private boolean is Canceled I Progress Monitor monitor return f Initialization Job this monitor null monitor is Canceled private void clear Model f Left Document null f Initialization Job null f Stored Events clear f Last Difference null f Differences clear Creates a copy of code document code and catches any exceptions that may occur if the document is not modified concurrently Do not call this method in a synchronized block as document get is called and may result in a deadlock otherwise param document the document to create a copy of return a copy of the document or code null code if an exception was thrown private I Document create Copy I Document document Assert is Not Null document TODO needs for sure a safer synchronization method this is a temporary workaround for https bugs eclipse org bugs show bug cgi id 56091 try return new Document document get catch Null Pointer Exception e catch Array Store Exception e catch Index Out Of Bounds Exception e catch Concurrent Modification Exception e return null f Initialization Job set System true f Initialization Job set Priority Job DECORATE f Initialization Job schedule  DiffInitializer fState fRightDocument fIgnoreDocumentEvents fLeftDocument fLeftDocument removeDocumentListener fLeftDocument oldJob fInitializationJob oldJob oldJob getState oldJob fInitializationJob QuickDiffMessages getString show_bug IStatus IProgressMonitor RangeDifferencer oldJob oldJob InterruptedException isTrue IQuickDiffReferenceProvider fReferenceProvider IDocument getReference CoreException DocumentLineDiffer isCanceled CANCEL_STATUS clearModel fireModelChanged DocumentLineDiffer notifyAll getStatus OperationCanceledException CANCEL_STATUS PartiallySynchronizedDocuments IDocument fRightDocument fRightDocument IDocument IDocument DocumentLineDiffer isCanceled CANCEL_STATUS clearModel fireModelChanged DocumentLineDiffer notifyAll OK_STATUS fLeftDocument fIgnoreDocumentEvents addDocumentListener DocumentLineDiffer IStatus TextEditorPlugin PLUGIN_ID IStatus QuickDiffMessages getFormattedString getting_document_content getClass getClass DocumentLineDiffer isCanceled CANCEL_STATUS fStoredEvents createCopy createCopy DocumentLineDiffer fStoredEvents DocLineComparator DocLineComparator DocLineComparator DocLineComparator RangeDifferencer findRanges LowMemoryException handleLowMemory CANCEL_STATUS DocumentLineDiffer isCanceled CANCEL_STATUS fDifferences DocumentEvent DocumentLineDiffer isCanceled CANCEL_STATUS fStoredEvents isEmpty fInitializationJob fState fLastDifference DocumentLineDiffer notifyAll DocumentEvent fStoredEvents handleAboutToBeChanged handleChanged BadLocationException removeDocumentListener DocumentLineDiffer clearModel CANCEL_STATUS LowMemoryException handleLowMemory CANCEL_STATUS fireModelChanged OK_STATUS isCanceled IProgressMonitor fInitializationJob isCanceled clearModel fLeftDocument fInitializationJob fStoredEvents fLastDifference fDifferences IDocument createCopy IDocument isNotNull show_bug NullPointerException ArrayStoreException IndexOutOfBoundsException ConcurrentModificationException fInitializationJob setSystem fInitializationJob setPriority fInitializationJob
public synchronized void document About To Be Changed Document Event event if f Ignore Document Events return if a initialization is going on we just store the events in the meantime if is Initialized f Initialization Job null f Stored Events add event return try handle About To Be Changed event catch Bad Location Exception e reinit On Error e return catch Null Pointer Exception e reinit On Error e return catch Array Store Exception e reinit On Error e return catch Index Out Of Bounds Exception e reinit On Error e return catch Concurrent Modification Exception e reinit On Error e return  documentAboutToBeChanged DocumentEvent fIgnoreDocumentEvents isInitialized fInitializationJob fStoredEvents handleAboutToBeChanged BadLocationException reinitOnError NullPointerException reinitOnError ArrayStoreException reinitOnError IndexOutOfBoundsException reinitOnError ConcurrentModificationException reinitOnError
Unsynchronized version of code document About To Be Changed code called by code document About To Be Changed code and link initialize param event the document event to be handled void handle About To Be Changed Document Event event throws Bad Location Exception I Document doc event get Document if doc null return store size of replaced region never synchronized not a problem f First Line doc get Line Of Offset event get Offset store change bounding lines fN Lines doc get Line Of Offset event get Offset event get Length f First Line 1  documentAboutToBeChanged documentAboutToBeChanged handleAboutToBeChanged DocumentEvent BadLocationException IDocument getDocument fFirstLine getLineOfOffset getOffset fNLines getLineOfOffset getOffset getLength fFirstLine
public synchronized void document Changed Document Event event if f Ignore Document Events return if is Initialized return https bugs eclipse org bugs show bug cgi id 44692 don t allow incremental update for changes from the reference document as this could deadlock if event get Document f Left Document initialize return try handle Changed event catch Bad Location Exception e reinit On Error e return catch Null Pointer Exception e reinit On Error e return catch Array Store Exception e reinit On Error e return catch Index Out Of Bounds Exception e reinit On Error e return catch Concurrent Modification Exception e reinit On Error e return catch Low Memory Exception e handle Low Memory e return inform listeners about change if f Update Needed Annotation Model Event ame new Annotation Model Event this false for Iterator it f Added iterator it has Next Range Difference rd Range Difference it next ame annotation Added rd get Diff Region f Differences f Left Document for Iterator it f Removed iterator it has Next Range Difference rd Range Difference it next ame annotation Removed rd get Diff Region f Differences f Left Document for Iterator it f Changed iterator it has Next Range Difference rd Range Difference it next ame annotation Changed rd get Diff Region f Differences f Left Document fire Model Changed ame f Update Needed false  documentChanged DocumentEvent fIgnoreDocumentEvents isInitialized show_bug getDocument fLeftDocument handleChanged BadLocationException reinitOnError NullPointerException reinitOnError ArrayStoreException reinitOnError IndexOutOfBoundsException reinitOnError ConcurrentModificationException reinitOnError LowMemoryException handleLowMemory fUpdateNeeded AnnotationModelEvent AnnotationModelEvent fAdded hasNext RangeDifference RangeDifference annotationAdded getDiffRegion fDifferences fLeftDocument fRemoved hasNext RangeDifference RangeDifference annotationRemoved getDiffRegion fDifferences fLeftDocument fChanged hasNext RangeDifference RangeDifference annotationChanged getDiffRegion fDifferences fLeftDocument fireModelChanged fUpdateNeeded
Re initializes the differ if an exception is thrown upon accessing the documents This can happen if the documents get concurrently modified from a background thread param e the exception thrown which is logged in debug mode private void reinit On Error Exception e if DEBUG System err println reinitializing quickdiff n e get Localized Message n e get Stack Trace NON NLS 1 NON NLS 2 initialize  reinitOnError getLocalizedMessage getStackTrace
Implementation of document Changed non synchronized param event the document event throws Low Memory Exception if the differ runs out of memory void handle Changed Document Event event throws Bad Location Exception Low Memory Exception Now here we have a great example of object oriented programming documents left right modified and unchanged are either of both I Document left f Left Document I Document right f Right Document I Document modified event get Document if modified left modified right Assert is True false String insertion event get Text int added insertion null 1 modified compute Number Of Lines insertion 1 size the size of the document change in lines put an upper bound to the delay we can afford if added 50 fN Lines 50 initialize return int size Math max fN Lines added 1 int line Delta added fN Lines int last Line f First Line fN Lines 1 int repetition Field if modified left int original Line get Right Line last Line 1 repetition Field search For Repetition Field size 1 right original Line else int original Line get Left Line last Line 1 repetition Field search For Repetition Field size 1 left original Line last Line repetition Field get enclosing range search for a consistent block of at least the size of our change before and after the change Range Difference consistent Before consistent After if modified left consistent Before find Consistent Range Before Left f First Line size consistent After find Consistent Range After Left last Line size else consistent Before find Consistent Range Before Right f First Line size consistent After find Consistent Range After Right last Line size optimize unchanged blocks if the consistent blocks around the change are larger than size we redimension them especially important when there are only very little changes int shift Before 0 if consistent Before kind Range Difference NOCHANGE int unchanged if modified left unchanged Math min f First Line consistent Before left End consistent Before left Start else unchanged Math min f First Line consistent Before right End consistent Before right Start shift Before Math max 0 unchanged size int shift After 0 if consistent After kind Range Difference NOCHANGE int unchanged if modified left unchanged consistent After left End Math max last Line 1 consistent After left Start else unchanged consistent After right End Math max last Line 1 consistent After right Start shift After Math max 0 unchanged size get the document regions that will be rediffed take into account that on the document the change has already happened left reference document int left Offset left get Line Offset consistent Before left Start shift Before int left Line Math max consistent After left End 1 0 if modified left left Line line Delta I Region left Last Line left get Line Information left Line shift After int left End Offset left Last Line get Offset left Last Line get Length I Region left Region new Region left Offset left End Offset left Offset Doc Line Comparator reference new Doc Line Comparator left left Region false right actual document int right Offset right get Line Offset consistent Before right Start shift Before int right Line Math max consistent After right End 1 0 if modified right right Line line Delta I Region right Last Line right get Line Information right Line shift After int right End Offset right Last Line get Offset right Last Line get Length I Region right Region new Region right Offset right End Offset right Offset Doc Line Comparator change new Doc Line Comparator right right Region false put an upper bound to the delay we can afford if left Line shift After consistent Before left Start shift Before 50 right Line shift After consistent Before right Start shift Before 50 initialize return debug System out println compare window size n n left get left Region get Offset left Region get Length NON NLS 1 NON NLS 2 n n right get right Region get Offset right Region get Length n NON NLS 1 NON NLS 2 compare List diffs Range Differencer find Ranges reference change if diffs size 0 diffs add new Range Difference Range Difference CHANGE 0 0 0 0 shift the partial diffs to the absolute document positions int left Shift consistent Before left Start shift Before int right Shift consistent Before right Start shift Before for Iterator it diffs iterator it has Next Range Difference d Range Difference it next d shift Left left Shift d shift Right right Shift undo optimization shifting if shift Before 0 Range Difference first Range Difference diffs get 0 if first kind Range Difference NOCHANGE first extend Start shift Before else diffs add 0 new Range Difference Range Difference NOCHANGE first right Start shift Before shift Before first left Start shift Before shift Before Range Difference last Range Difference diffs get diffs size 1 if shift After 0 if last kind Range Difference NOCHANGE last extend End shift After else diffs add new Range Difference Range Difference NOCHANGE last right End shift After last left End shift After replace changed diff range List Iterator it f Differences list Iterator Iterator new It diffs iterator Range Difference current boolean changed false replace regions from consistent Before to consistent After with new diffs search for consistent Before do Assert is True it has Next current Range Difference it next while current consistent Before Assert is True current consistent Before f Changed clear f Removed clear f Added clear replace until consistent After while current consistent After if new It has Next Object o new It next if current equals o f Removed add current f Added add o changed true it set o else f Removed add current it remove f Update Needed true Assert is True it has Next current Range Difference it next replace consistent After Assert is True current consistent After if new It has Next Object o new It next if current equals o f Removed add current f Added add o changed true it set o else f Removed add current it remove f Update Needed true add remaining new diffs while new It has Next Object next new It next f Added add next it add next changed true shift the old remaining diffs boolean init true while it has Next current Range Difference it next if init init false left Shift last left End current left Start right Shift last right End current right Start if left Shift 0 right Shift 0 changed true else break f Changed add current not needed since positional shifting is not handled by an annotation model current shift Left left Shift current shift Right right Shift f Update Needed changed f Last Difference null  documentChanged LowMemoryException handleChanged DocumentEvent BadLocationException LowMemoryException IDocument fLeftDocument IDocument fRightDocument IDocument getDocument isTrue getText computeNumberOfLines fNLines fNLines lineDelta fNLines lastLine fFirstLine fNLines repetitionField originalLine getRightLine lastLine repetitionField searchForRepetitionField originalLine originalLine getLeftLine lastLine repetitionField searchForRepetitionField originalLine lastLine repetitionField RangeDifference consistentBefore consistentAfter consistentBefore findConsistentRangeBeforeLeft fFirstLine consistentAfter findConsistentRangeAfterLeft lastLine consistentBefore findConsistentRangeBeforeRight fFirstLine consistentAfter findConsistentRangeAfterRight lastLine shiftBefore consistentBefore RangeDifference fFirstLine consistentBefore leftEnd consistentBefore leftStart fFirstLine consistentBefore rightEnd consistentBefore rightStart shiftBefore shiftAfter consistentAfter RangeDifference consistentAfter leftEnd lastLine consistentAfter leftStart consistentAfter rightEnd lastLine consistentAfter rightStart shiftAfter leftOffset getLineOffset consistentBefore leftStart shiftBefore leftLine consistentAfter leftEnd leftLine lineDelta IRegion leftLastLine getLineInformation leftLine shiftAfter leftEndOffset leftLastLine getOffset leftLastLine getLength IRegion leftRegion leftOffset leftEndOffset leftOffset DocLineComparator DocLineComparator leftRegion rightOffset getLineOffset consistentBefore rightStart shiftBefore rightLine consistentAfter rightEnd rightLine lineDelta IRegion rightLastLine getLineInformation rightLine shiftAfter rightEndOffset rightLastLine getOffset rightLastLine getLength IRegion rightRegion rightOffset rightEndOffset rightOffset DocLineComparator DocLineComparator rightRegion leftLine shiftAfter consistentBefore leftStart shiftBefore rightLine shiftAfter consistentBefore rightStart shiftBefore leftRegion getOffset leftRegion getLength rightRegion getOffset rightRegion getLength RangeDifferencer findRanges RangeDifference RangeDifference leftShift consistentBefore leftStart shiftBefore rightShift consistentBefore rightStart shiftBefore hasNext RangeDifference RangeDifference shiftLeft leftShift shiftRight rightShift shiftBefore RangeDifference RangeDifference RangeDifference extendStart shiftBefore RangeDifference RangeDifference rightStart shiftBefore shiftBefore leftStart shiftBefore shiftBefore RangeDifference RangeDifference shiftAfter RangeDifference extendEnd shiftAfter RangeDifference RangeDifference rightEnd shiftAfter leftEnd shiftAfter ListIterator fDifferences listIterator newIt RangeDifference consistentBefore consistentAfter consistentBefore isTrue hasNext RangeDifference consistentBefore isTrue consistentBefore fChanged fRemoved fAdded consistentAfter consistentAfter newIt hasNext newIt fRemoved fAdded fRemoved fUpdateNeeded isTrue hasNext RangeDifference consistentAfter isTrue consistentAfter newIt hasNext newIt fRemoved fAdded fRemoved fUpdateNeeded newIt hasNext newIt fAdded hasNext RangeDifference leftShift leftEnd leftStart rightShift rightEnd rightStart leftShift rightShift fChanged shiftLeft leftShift shiftRight rightShift fUpdateNeeded fLastDifference
Finds a consistent range of at least size before code line code in the left document param line the line before which the range has to occur param size the minimal size of the range return the first range found or the first range in the differ if none can be found private Range Difference find Consistent Range Before Left int line int size Range Difference found null for List Iterator it f Differences list Iterator it has Next Range Difference difference Range Difference it next if found null difference kind Range Difference NOCHANGE difference left End line difference left Length size difference left End line line difference left Start size found difference if difference left End line break return found  RangeDifference findConsistentRangeBeforeLeft RangeDifference ListIterator fDifferences listIterator hasNext RangeDifference RangeDifference RangeDifference leftEnd leftLength leftEnd leftStart leftEnd
Finds a consistent range of at least size after code line code in the left document param line the line after which the range has to occur param size the minimal size of the range return the first range found or the last range in the differ if none can be found private Range Difference find Consistent Range After Left int line int size Range Difference found null for List Iterator it f Differences list Iterator f Differences size it has Previous Range Difference difference Range Difference it previous if found null difference kind Range Difference NOCHANGE difference left Start line difference left Length size difference left Start line difference left End line size found difference if difference left Start line break return found  RangeDifference findConsistentRangeAfterLeft RangeDifference ListIterator fDifferences listIterator fDifferences hasPrevious RangeDifference RangeDifference RangeDifference leftStart leftLength leftStart leftEnd leftStart
Finds a consistent range of at least size before code line code in the right document param line the line before which the range has to occur param size the minimal size of the range return the first range found or the first range in the differ if none can be found private Range Difference find Consistent Range Before Right int line int size Range Difference found null int unchanged 1 the number of unchanged lines before line for List Iterator it f Differences list Iterator it has Next Range Difference difference Range Difference it next if found null found difference else if difference kind Range Difference NOCHANGE unchanged Math min line difference right End difference right Start if unchanged size found difference if difference right End line break return found  RangeDifference findConsistentRangeBeforeRight RangeDifference ListIterator fDifferences listIterator hasNext RangeDifference RangeDifference RangeDifference rightEnd rightStart rightEnd
Finds a consistent range of at least size after code line code in the right document param line the line after which the range has to occur param size the minimal size of the range return the first range found or the last range in the differ if none can be found private Range Difference find Consistent Range After Right int line int size Range Difference found null int unchanged 1 the number of unchanged lines after line for List Iterator it f Differences list Iterator f Differences size it has Previous Range Difference difference Range Difference it previous if found null found difference else if difference kind Range Difference NOCHANGE unchanged difference right End Math max line 1 difference right Start 1 to step over the changed line if unchanged size found difference if difference right Start line break return found  RangeDifference findConsistentRangeAfterRight RangeDifference ListIterator fDifferences listIterator fDifferences hasPrevious RangeDifference RangeDifference RangeDifference rightEnd rightStart rightStart
Returns the size of a repetition field starting a code line code param size the maximal length of the repeat window param doc the document to search param line the line to start searching return the size of a found repetition field or zero throws Bad Location Exception if code doc code is modified concurrently private int search For Repetition Field int size I Document doc int line throws Bad Location Exception Repetition fields a line wise repetition of maximal size code size code can urge a change to come at its end as diffing greedily takes the longest unchanged range possible pre before repeat repeat repeat repeat repeat repeat repeat repeat after pre Inserting another repeat element anywhere in the repetition field will create an addition at its end Size is one less than our window size as this is already one more than the actual number of affected lines Implementation Window of maximum repetition size Whenever the current matches the first in the window we advance it by one If there are more free slots in the window the current line is appended We terminate if the current line does not match and there are no more free slots TODO what if we have a prefix to a repetition field Probably does not matter Linked List window new Linked List int n Lines doc get Number Of Lines int repetition line 1 int l line while l 0 l n Lines I Region r doc get Line Information l String current doc get r get Offset r get Length if window is Empty window get 0 equals current repetition found shift window remove First window add Last current repetition l else no repetition add if there is room otherwise return if window size size window add Last current else break l int field Length repetition line 1 Assert is True field Length 0 return field Length  BadLocationException searchForRepetitionField IDocument BadLocationException LinkedList LinkedList nLines getNumberOfLines nLines IRegion getLineInformation getOffset getLength isEmpty removeFirst addLast addLast fieldLength isTrue fieldLength fieldLength
Gets the corresponding line on the left side for a line on the right param right Line the line on the right side return the corresponding left hand line or code 1 code private int get Left Line int right Line Range Difference d get Range Difference For Right Line right Line if d null return 1 return Math min d left End 1 d left Start right Line d right Start  rightLine getLeftLine rightLine RangeDifference getRangeDifferenceForRightLine rightLine leftEnd leftStart rightLine rightStart
Gets the corresponding line on the right side for a line on the left param left Line the line on the left side return the corresponding right hand line or code 1 code private int get Right Line int left Line Range Difference d get Range Difference For Left Line left Line if d null return 1 return Math min d right End 1 d right Start left Line d left Start  leftLine getRightLine leftLine RangeDifference getRangeDifferenceForLeftLine leftLine rightEnd rightStart leftLine leftStart
Gets the Range Difference for a line on the left hand side param left Line the line on the left side return the corresponding Range Difference or code null code private Range Difference get Range Difference For Left Line int left Line for Iterator it f Differences iterator it has Next Range Difference d Range Difference it next if left Line d left Start left Line d left End return d return null  RangeDifference leftLine RangeDifference RangeDifference getRangeDifferenceForLeftLine leftLine fDifferences hasNext RangeDifference RangeDifference leftLine leftStart leftLine leftEnd
Gets the Range Difference for a line on the right hand side param right Line the line on the right side return the corresponding Range Difference or code null code private Range Difference get Range Difference For Right Line int right Line for Iterator it f Differences iterator it has Next Range Difference d Range Difference it next if right Line d right Start right Line d right End return d return null  RangeDifference rightLine RangeDifference RangeDifference getRangeDifferenceForRightLine rightLine fDifferences hasNext RangeDifference RangeDifference rightLine rightStart rightLine rightEnd
see org eclipse jface text source I Annotation Model add Annotation Model Listener org eclipse jface text source I Annotation Model Listener public void add Annotation Model Listener I Annotation Model Listener listener f Annotation Model Listeners add listener  IAnnotationModel addAnnotationModelListener IAnnotationModelListener addAnnotationModelListener IAnnotationModelListener fAnnotationModelListeners
see org eclipse jface text source I Annotation Model remove Annotation Model Listener org eclipse jface text source I Annotation Model Listener public void remove Annotation Model Listener I Annotation Model Listener listener f Annotation Model Listeners remove listener  IAnnotationModel removeAnnotationModelListener IAnnotationModelListener removeAnnotationModelListener IAnnotationModelListener fAnnotationModelListeners
public void connect I Document document Assert is True f Right Document null f Right Document document f Open Connections if f Open Connections 1 f Right Document document f Right Document add Document Listener this initialize  IDocument isTrue fRightDocument fRightDocument fOpenConnections fOpenConnections fRightDocument fRightDocument addDocumentListener
public void disconnect I Document document Assert is True f Right Document document f Open Connections if f Open Connections 0 uninstall  IDocument isTrue fRightDocument fOpenConnections fOpenConnections
Uninstalls all components and dereferences any objects private void uninstall synchronized this f State SUSPENDED f Ignore Document Events true if f Initialization Job null f Initialization Job cancel f Initialization Job null if f Left Document null f Left Document remove Document Listener this f Left Document null if f Right Document null f Right Document remove Document Listener this f Right Document null if f Reference Provider null f Reference Provider dispose f Reference Provider null f Differences clear  fState fIgnoreDocumentEvents fInitializationJob fInitializationJob fInitializationJob fLeftDocument fLeftDocument removeDocumentListener fLeftDocument fRightDocument fRightDocument removeDocumentListener fRightDocument fReferenceProvider fReferenceProvider fReferenceProvider fDifferences
see org eclipse jface text source I Annotation Model add Annotation org eclipse jface text source Annotation org eclipse jface text Position public void add Annotation Annotation annotation Position position throw new Unsupported Operation Exception  IAnnotationModel addAnnotation addAnnotation UnsupportedOperationException
see org eclipse jface text source I Annotation Model remove Annotation org eclipse jface text source Annotation public void remove Annotation Annotation annotation throw new Unsupported Operation Exception  IAnnotationModel removeAnnotation removeAnnotation UnsupportedOperationException
return new Iterator public void remove throw new Unsupported Operation Exception  UnsupportedOperationException
public boolean has Next return iter has Next  hasNext hasNext
public Object next Range Difference diff Range Difference iter next return diff get Diff Region copy f Left Document  RangeDifference RangeDifference getDiffRegion fLeftDocument
public Iterator get Annotation Iterator final List copy new Array List f Differences final Iterator iter copy iterator return new Iterator public void remove throw new Unsupported Operation Exception public boolean has Next return iter has Next public Object next Range Difference diff Range Difference iter next return diff get Diff Region copy f Left Document  getAnnotationIterator ArrayList fDifferences UnsupportedOperationException hasNext hasNext RangeDifference RangeDifference getDiffRegion fLeftDocument
public Position get Position Annotation annotation if f Right Document null annotation instanceof Diff Region Range Difference difference Diff Region annotation get Difference try int offset f Right Document get Line Offset difference right Start return new Position offset f Right Document get Line Offset difference right End 1 f Right Document get Line Length difference right End 1 offset catch Bad Location Exception e ignore and return null return null  getPosition fRightDocument DiffRegion RangeDifference DiffRegion getDifference fRightDocument getLineOffset rightStart fRightDocument getLineOffset rightEnd fRightDocument getLineLength rightEnd BadLocationException
Informs all annotation model listeners that this model has been changed protected void fire Model Changed fire Model Changed new Annotation Model Event this  fireModelChanged fireModelChanged AnnotationModelEvent
Informs all annotation model listeners that this model has been changed as described in the annotation model event The event is sent out to all listeners implementing code I Annotation Model Listener Extension code All other listeners are notified by just calling code model Changed I Annotation Model code param event the event to be sent out to the listeners protected void fire Model Changed Annotation Model Event event Array List v new Array List f Annotation Model Listeners Iterator e v iterator while e has Next I Annotation Model Listener l I Annotation Model Listener e next if l instanceof I Annotation Model Listener Extension I Annotation Model Listener Extension l model Changed event else l model Changed this  IAnnotationModelListenerExtension modelChanged IAnnotationModel fireModelChanged AnnotationModelEvent ArrayList ArrayList fAnnotationModelListeners hasNext IAnnotationModelListener IAnnotationModelListener IAnnotationModelListenerExtension IAnnotationModelListenerExtension modelChanged modelChanged
Stops diffing of this differ All differences are cleared public synchronized void suspend if f Initialization Job null f Initialization Job cancel f Initialization Job null if f Right Document null f Right Document remove Document Listener this if f Left Document null f Left Document remove Document Listener this f Left Document null f Last Difference null f Stored Events clear f Differences clear f State SUSPENDED fire Model Changed  fInitializationJob fInitializationJob fInitializationJob fRightDocument fRightDocument removeDocumentListener fLeftDocument fLeftDocument removeDocumentListener fLeftDocument fLastDifference fStoredEvents fDifferences fState fireModelChanged
Resumes diffing of this differ Must only be called after suspend public synchronized void resume if f Right Document null f Right Document add Document Listener this initialize  fRightDocument fRightDocument addDocumentListener
Handle low memory situation during diffing Called from UI and jobs param e the low memory exception private void handle Low Memory Low Memory Exception e if DEBUG System err println Disabling Quick Diff n e NON NLS 1 suspend  handleLowMemory LowMemoryException QuickDiff

Creates a new instance public Quick Diff Extensions Registry  QuickDiffExtensionsRegistry
Returns the first descriptor with the code default code attribute set to code true code return the descriptor of the default reference provider public synchronized Reference Provider Descriptor get Default Provider ensure Registered return f Default Descriptor  ReferenceProviderDescriptor getDefaultProvider ensureRegistered fDefaultDescriptor
Returns a non modifiable list of code Reference Provider Descriptor code describing all extension to the code quick Diff Reference Provider code extension point return the list of extensions to the code quick Diff Reference Provider code extension point public synchronized List get Reference Provider Descriptors ensure Registered return f Descriptors  ReferenceProviderDescriptor quickDiffReferenceProvider quickDiffReferenceProvider getReferenceProviderDescriptors ensureRegistered fDescriptors
Ensures that the extensions are read and stored in code f Descriptors code private void ensure Registered if f Descriptors null reload Extensions  fDescriptors ensureRegistered fDescriptors reloadExtensions
Reads all extensions p This method can be called more than once in order to reload from a changed extension registry p public synchronized void reload Extensions f Default Descriptor null I Extension Registry registry Platform get Extension Registry List list new Array List I Configuration Element elements registry get Configuration Elements For Text Editor Plugin PLUGIN ID Text Editor Plugin REFERENCE PROVIDER EXTENSION POINT for int i 0 i elements length i Reference Provider Descriptor desc new Reference Provider Descriptor elements i if f Default Descriptor null desc get Default f Default Descriptor desc list add desc f Descriptors Collections unmodifiable List list  reloadExtensions fDefaultDescriptor IExtensionRegistry getExtensionRegistry ArrayList IConfigurationElement getConfigurationElementsFor TextEditorPlugin PLUGIN_ID TextEditorPlugin REFERENCE_PROVIDER_EXTENSION_POINT ReferenceProviderDescriptor ReferenceProviderDescriptor fDefaultDescriptor getDefault fDefaultDescriptor fDescriptors unmodifiableList

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Quick Diff Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE QuickDiffMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException
public static Resource Bundle get Resource Bundle return fg Resource Bundle  ResourceBundle getResourceBundle fgResourceBundle
public static String get Formatted String String key Object arg return get Formatted String key new Object arg  getFormattedString getFormattedString
public static String get Formatted String String key Object args return Message Format format get String key args  getFormattedString MessageFormat getString

Creates a new instance param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys param editor the editor this action belongs to Quick Diff Restore Action Resource Bundle bundle String prefix I Text Editor editor super bundle prefix editor  QuickDiffRestoreAction ResourceBundle ITextEditor
Called by this action s run method inside a pair of calls to code I Rewrite Target begin Compound Change code and code I Rewrite Target end Compound Change code see I Rewrite Target  IRewriteTarget beginCompoundChange IRewriteTarget endCompoundChange IRewriteTarget
public void run I Text Editor editor get Text Editor if editor null validate Editor Input State return I Rewrite Target target I Rewrite Target editor get Adapter I Rewrite Target class if target null target begin Compound Change run Compound Change if target null target end Compound Change  ITextEditor getTextEditor validateEditorInputState IRewriteTarget IRewriteTarget getAdapter IRewriteTarget beginCompoundChange runCompoundChange endCompoundChange
public void update super update if is Enabled set Enabled can Modify Editor  isEnabled setEnabled canModifyEditor
Returns the selection of the editor this action belongs to return the editor s selection or code null code protected I Text Selection get Selection if get Text Editor null return null I Selection Provider sp get Text Editor get Selection Provider if sp null return null I Selection s sp get Selection if s instanceof I Text Selection return I Text Selection s else return null  ITextSelection getSelection getTextEditor ISelectionProvider getTextEditor getSelectionProvider ISelection getSelection ITextSelection ITextSelection
Returns the annotation model of the document displayed in this action s editor if it implements the link I Annotation Model Extension I Annotation Model Extension interface return the displayed document s annotation model if it is an code I Annotation Model Extension code or code null code private I Annotation Model Extension get Model if get Text Editor null return null I Document Provider provider get Text Editor get Document Provider I Editor Input editor Input get Text Editor get Editor Input I Annotation Model m provider get Annotation Model editor Input if m instanceof I Annotation Model Extension return I Annotation Model Extension m else return null  IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension getModel getTextEditor IDocumentProvider getTextEditor getDocumentProvider IEditorInput editorInput getTextEditor getEditorInput IAnnotationModel getAnnotationModel editorInput IAnnotationModelExtension IAnnotationModelExtension
Returns the diff model associated with the annotation model of the document currently displayed in this action s editor if any return the diff model associated with the displayed document or code null code protected I Line Differ get Differ I Annotation Model Extension extension get Model if extension null return I Line Differ extension get Annotation Model I Change Ruler Column QUICK DIFF MODEL ID else return null  ILineDiffer getDiffer IAnnotationModelExtension getModel ILineDiffer getAnnotationModel IChangeRulerColumn QUICK_DIFF_MODEL_ID
Returns a code I Vertical Ruler Info code if this action s editor adapts to one return the code I Vertical Ruler Info code for the editor s vertical ruler or code null code protected I Vertical Ruler Info get Ruler if get Text Editor null return I Vertical Ruler Info get Text Editor get Adapter I Vertical Ruler Info class else return null  IVerticalRulerInfo IVerticalRulerInfo IVerticalRulerInfo getRuler getTextEditor IVerticalRulerInfo getTextEditor getAdapter IVerticalRulerInfo
Sets the status line error message to code string code param string the message to be displayed as error protected void set Status String string if get Text Editor null I Editor Status Line status Line I Editor Status Line get Text Editor get Adapter I Editor Status Line class if status Line null status Line set Message true string null  setStatus getTextEditor IEditorStatusLine statusLine IEditorStatusLine getTextEditor getAdapter IEditorStatusLine statusLine statusLine setMessage

Creates a new instance that will lazily create the implementation provided by the extension param descriptor describes the extension param editor the editor for which this action is created public Reference Selection Action Reference Provider Descriptor descriptor I Text Editor editor super AS RADIO BUTTON NON NLS 1 set Checked false set Enabled true Assert is Legal descriptor null f Descriptor descriptor f Editor editor update  ReferenceSelectionAction ReferenceProviderDescriptor ITextEditor AS_RADIO_BUTTON setChecked setEnabled isLegal fDescriptor fEditor
Creates an instance of the implementation provided by the extension if none has been created before Otherwise the cached implementation is returned return The code I Quick Diff Provider Implementation code instance provided by the extension private I Quick Diff Reference Provider get Provider if f Provider null f Provider f Descriptor create Provider return f Provider  IQuickDiffProviderImplementation IQuickDiffReferenceProvider getProvider fProvider fProvider fDescriptor createProvider fProvider
public void run Document Line Differ differ get Differ true create if needed so the user does not have to toggle display when he selects a reference if differ null return if f Editor instanceof I Text Editor Extension3 I Text Editor Extension3 extension I Text Editor Extension3 f Editor I Quick Diff Reference Provider provider get Provider if provider null provider set Active Editor f Editor if provider is Enabled differ set Reference Provider provider extension show Change Information true set Enabled true else set Enabled false  DocumentLineDiffer getDiffer fEditor ITextEditorExtension3 ITextEditorExtension3 ITextEditorExtension3 fEditor IQuickDiffReferenceProvider getProvider setActiveEditor fEditor isEnabled setReferenceProvider showChangeInformation setEnabled setEnabled
public void update two things happen here 1 checked state setting if a provider is already installed and its id matches our id we are in checked state 2 enablement if the extending plugin has been loaded we check the provider for enablement and take it as our own set Text f Descriptor get Label Document Line Differ differ get Differ false don t create it if we re not showing set Checked false if differ null I Quick Diff Reference Provider provider differ get Reference Provider if provider null provider get Id equals f Descriptor get Id set Checked true if f Descriptor is Plugin Loaded get Provider if f Provider null set Enabled false else f Provider set Active Editor f Editor set Enabled f Provider is Enabled else optimistically enable it set Enabled true  setText fDescriptor getLabel DocumentLineDiffer getDiffer setChecked IQuickDiffReferenceProvider getReferenceProvider getId fDescriptor getId setChecked fDescriptor isPluginLoaded getProvider fProvider setEnabled fProvider setActiveEditor fEditor setEnabled fProvider isEnabled setEnabled
Fetches the differ installed with the current editor s document s annotation model If none is installed yet and code create If Needed code is true one is created and attached to the model param create If Needed when set to code true code a new differ will be created if needed return the differ installed with the annotation model or code null code private Document Line Differ get Differ boolean create If Needed get annotation model if f Editor null return null I Document Provider provider f Editor get Document Provider I Editor Input editor Input f Editor get Editor Input if provider null editor Input null return null I Annotation Model m provider get Annotation Model editor Input I Annotation Model Extension model null if m instanceof I Annotation Model Extension model I Annotation Model Extension m else return null get differ Document Line Differ differ Document Line Differ model get Annotation Model I Change Ruler Column QUICK DIFF MODEL ID create if needed if differ null create If Needed differ new Document Line Differ model add Annotation Model I Change Ruler Column QUICK DIFF MODEL ID differ return differ  createIfNeeded createIfNeeded DocumentLineDiffer getDiffer createIfNeeded fEditor IDocumentProvider fEditor getDocumentProvider IEditorInput editorInput fEditor getEditorInput editorInput IAnnotationModel getAnnotationModel editorInput IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension DocumentLineDiffer DocumentLineDiffer getAnnotationModel IChangeRulerColumn QUICK_DIFF_MODEL_ID createIfNeeded DocumentLineDiffer addAnnotationModel IChangeRulerColumn QUICK_DIFF_MODEL_ID

Creates a new instance param editor the editor this action belongs to public Restore Action I Text Editor editor super Quick Diff Messages get Resource Bundle PREFIX editor  RestoreAction ITextEditor QuickDiffMessages getResourceBundle
public void update super update if is Enabled return set Enabled false I Vertical Ruler Info ruler get Ruler if ruler null return f Line ruler get Line Of Last Mouse Button Activity I Line Differ differ get Differ if differ null return I Line Diff Info info differ get Line Info f Line if info null info get Removed Lines Above 0 info get Removed Lines Below 0 if info get Removed Lines Below 0 f Line else if info get Removed Lines Above 0 if there are deleted lines above and below the line take the closer one int line Height f Cached Text Widget get Line Height if f Mouse Position null f Mouse Position y line Height line Height 2 f Line take the one below for now TODO adjust to old viewer dependent behaviour info differ get Line Info f Line if info get Removed Lines Below 1 set Text Quick Diff Messages get String SINGLE KEY else set Text Quick Diff Messages get Formatted String MULTIPLE KEY String value Of info get Removed Lines Below NON NLS 1 set Enabled true  isEnabled setEnabled IVerticalRulerInfo getRuler fLine getLineOfLastMouseButtonActivity ILineDiffer getDiffer ILineDiffInfo getLineInfo fLine getRemovedLinesAbove getRemovedLinesBelow getRemovedLinesBelow fLine getRemovedLinesAbove lineHeight fCachedTextWidget getLineHeight fMousePosition fMousePosition lineHeight lineHeight fLine getLineInfo fLine getRemovedLinesBelow setText QuickDiffMessages getString SINGLE_KEY setText QuickDiffMessages getFormattedString MULTIPLE_KEY valueOf getRemovedLinesBelow setEnabled
public void run Compound Change if is Enabled return I Line Differ differ get Differ if differ null try differ restore After Line f Line catch Bad Location Exception e set Status e get Message  runCompoundChange isEnabled ILineDiffer getDiffer restoreAfterLine fLine BadLocationException setStatus getMessage

Creates a new instance param editor the editor this action belongs to public Revert Block Action I Text Editor editor super Quick Diff Messages get Resource Bundle PREFIX editor  RevertBlockAction ITextEditor QuickDiffMessages getResourceBundle
public void update super update if is Enabled return set Enabled false I Vertical Ruler Info ruler get Ruler if ruler null return f Line ruler get Line Of Last Mouse Button Activity I Line Differ differ get Differ if differ null return I Line Diff Info info differ get Line Info f Line if info null info get Change Type I Line Diff Info UNCHANGED boolean has Block false if f Line 0 info differ get Line Info f Line 1 has Block info null info has Changes if has Block info differ get Line Info f Line 1 has Block info null info has Changes if has Block set Enabled true  isEnabled setEnabled IVerticalRulerInfo getRuler fLine getLineOfLastMouseButtonActivity ILineDiffer getDiffer ILineDiffInfo getLineInfo fLine getChangeType ILineDiffInfo hasBlock fLine getLineInfo fLine hasBlock hasChanges hasBlock getLineInfo fLine hasBlock hasChanges hasBlock setEnabled
public void run Compound Change if is Enabled return I Line Differ differ get Differ if differ null try differ revert Block f Line catch Bad Location Exception e set Status e get Message  runCompoundChange isEnabled ILineDiffer getDiffer revertBlock fLine BadLocationException setStatus getMessage

Creates a new instance param editor the editor this action belongs to public Revert Line Action I Text Editor editor super Quick Diff Messages get Resource Bundle PREFIX editor  RevertLineAction ITextEditor QuickDiffMessages getResourceBundle
public void update super update if is Enabled return set Enabled false I Vertical Ruler Info ruler get Ruler if ruler null return f Line ruler get Line Of Last Mouse Button Activity I Line Differ differ get Differ if differ null return I Line Diff Info info differ get Line Info f Line if info null info get Change Type I Line Diff Info UNCHANGED if info get Change Type I Line Diff Info ADDED set Text Quick Diff Messages get String DELETE KEY else set Text Quick Diff Messages get String REVERT KEY set Enabled true  isEnabled setEnabled IVerticalRulerInfo getRuler fLine getLineOfLastMouseButtonActivity ILineDiffer getDiffer ILineDiffInfo getLineInfo fLine getChangeType ILineDiffInfo getChangeType ILineDiffInfo setText QuickDiffMessages getString DELETE_KEY setText QuickDiffMessages getString REVERT_KEY setEnabled
public void run Compound Change if is Enabled return I Line Differ differ get Differ if differ null try differ revert Line f Line catch Bad Location Exception e set Status e get Message  runCompoundChange isEnabled ILineDiffer getDiffer revertLine fLine BadLocationException setStatus getMessage

Creates a new instance param editor the editor this action belongs to public Revert Selection Action I Text Editor editor super Quick Diff Messages get Resource Bundle Revert Selection Action editor NON NLS 1  RevertSelectionAction ITextEditor QuickDiffMessages getResourceBundle RevertSelectionAction
public void update super update if is Enabled return set Enabled false I Text Selection selection get Selection if selection null return f Start Line selection get Start Line f End Line selection get End Line only enable if mouse activity is inside line range I Vertical Ruler Info ruler get Ruler if ruler null return int activity Line ruler get Line Of Last Mouse Button Activity if activity Line f Start Line activity Line f End Line 1 1 to cover the case where the selection goes to the offset of the next line return I Line Differ differ get Differ if differ null return only enable if selection covers at least two lines if f End Line f Start Line for int i f Start Line i f End Line i I Line Diff Info info differ get Line Info i if info null info has Changes set Enabled true  isEnabled setEnabled ITextSelection getSelection fStartLine getStartLine fEndLine getEndLine IVerticalRulerInfo getRuler activityLine getLineOfLastMouseButtonActivity activityLine fStartLine activityLine fEndLine ILineDiffer getDiffer fEndLine fStartLine fStartLine fEndLine ILineDiffInfo getLineInfo hasChanges setEnabled
public void run Compound Change recheck if run without being enabled if is Enabled return I Line Differ differ get Differ if differ null try differ revert Selection f Start Line f End Line f Start Line 1 catch Bad Location Exception e set Status e get Message  runCompoundChange isEnabled ILineDiffer getDiffer revertSelection fStartLine fEndLine fStartLine BadLocationException setStatus getMessage

Creates a source viewer information control with the given shell as parent and the given font param parent the parent shell param symbolic Font Name the symbolic font name public Source Viewer Information Control Shell parent String symbolic Font Name this parent SWT NO TRIM SWT NONE symbolic Font Name null  symbolicFontName SourceViewerInformationControl symbolicFontName NO_TRIM symbolicFontName
f Text add Key Listener new Key Listener public void key Pressed Key Event e if e character 0x1B ESC f Shell dispose  fText addKeyListener KeyListener keyPressed KeyEvent fShell
public void key Released Key Event e  keyReleased KeyEvent
Creates a source viewer information control with the given shell as parent The given shell styles are applied to the created shell The given styles are applied to the created styled text widget The text widget will be initialized with the given font The status field will contain the given text or be hidden param parent the parent shell param shell Style the additional styles for the shell param style the additional styles for the styled text widget param symbolic Font Name the symbolic font name param status Field Text the text to be used in the optional status field or code null code if the status field should be hidden public Source Viewer Information Control Shell parent int shell Style int style String symbolic Font Name String status Field Text Grid Layout layout Grid Data gd f Shell new Shell parent SWT NO FOCUS SWT ON TOP shell Style Display display f Shell get Display f Shell set Background display get System Color SWT COLOR BLACK Composite composite f Shell layout new Grid Layout 1 false int border shell Style SWT NO TRIM 0 0 BORDER layout margin Height border layout margin Width border composite set Layout layout gd new Grid Data Grid Data FILL HORIZONTAL composite set Layout Data gd if status Field Text null composite new Composite composite SWT NONE layout new Grid Layout 1 false layout margin Height 0 layout margin Width 0 composite set Layout layout gd new Grid Data Grid Data FILL BOTH composite set Layout Data gd composite set Foreground display get System Color SWT COLOR INFO FOREGROUND composite set Background display get System Color SWT COLOR INFO BACKGROUND Source viewer f Viewer new Source Viewer composite null style f Viewer configure new Text Source Viewer Configuration Editors Plugin get Default get Preference Store f Viewer set Editable false f Text f Viewer get Text Widget gd new Grid Data Grid Data BEGINNING Grid Data FILL BOTH f Text set Layout Data gd f Text set Foreground parent get Display get System Color SWT COLOR INFO FOREGROUND f Text set Background parent get Display get System Color SWT COLOR INFO BACKGROUND f Text set Font J Face Resources get Font symbolic Font Name f Text add Key Listener new Key Listener public void key Pressed Key Event e if e character 0x1B ESC f Shell dispose public void key Released Key Event e Status field if status Field Text null Horizontal separator line f Separator new Label composite SWT SEPARATOR SWT HORIZONTAL SWT LINE DOT f Separator set Layout Data new Grid Data Grid Data FILL HORIZONTAL Status field label f Status Field new Label composite SWT RIGHT f Status Field set Text status Field Text Font font f Status Field get Font Font Data font Datas font get Font Data for int i 0 i font Datas length i font Datas i set Height font Datas i get Height 9 10 f Status Text Font new Font f Status Field get Display font Datas f Status Field set Font f Status Text Font Grid Data gd2 new Grid Data Grid Data FILL VERTICAL Grid Data FILL HORIZONTAL Grid Data HORIZONTAL ALIGN BEGINNING Grid Data VERTICAL ALIGN BEGINNING f Status Field set Layout Data gd2 Regarding the color see bug 41128 f Status Field set Foreground display get System Color SWT COLOR WIDGET DARK SHADOW f Status Field set Background display get System Color SWT COLOR INFO BACKGROUND add Dispose Listener this  shellStyle symbolicFontName statusFieldText SourceViewerInformationControl shellStyle symbolicFontName statusFieldText GridLayout GridData fShell NO_FOCUS ON_TOP shellStyle fShell getDisplay fShell setBackground getSystemColor COLOR_BLACK fShell GridLayout shellStyle NO_TRIM marginHeight marginWidth setLayout GridData GridData FILL_HORIZONTAL setLayoutData statusFieldText GridLayout marginHeight marginWidth setLayout GridData GridData FILL_BOTH setLayoutData setForeground getSystemColor COLOR_INFO_FOREGROUND setBackground getSystemColor COLOR_INFO_BACKGROUND fViewer SourceViewer fViewer TextSourceViewerConfiguration EditorsPlugin getDefault getPreferenceStore fViewer setEditable fText fViewer getTextWidget GridData GridData GridData FILL_BOTH fText setLayoutData fText setForeground getDisplay getSystemColor COLOR_INFO_FOREGROUND fText setBackground getDisplay getSystemColor COLOR_INFO_BACKGROUND fText setFont JFaceResources getFont symbolicFontName fText addKeyListener KeyListener keyPressed KeyEvent fShell keyReleased KeyEvent statusFieldText fSeparator LINE_DOT fSeparator setLayoutData GridData GridData FILL_HORIZONTAL fStatusField fStatusField setText statusFieldText fStatusField getFont FontData fontDatas getFontData fontDatas fontDatas setHeight fontDatas getHeight fStatusTextFont fStatusField getDisplay fontDatas fStatusField setFont fStatusTextFont GridData GridData GridData FILL_VERTICAL GridData FILL_HORIZONTAL GridData HORIZONTAL_ALIGN_BEGINNING GridData VERTICAL_ALIGN_BEGINNING fStatusField setLayoutData fStatusField setForeground getSystemColor COLOR_WIDGET_DARK_SHADOW fStatusField setBackground getSystemColor COLOR_INFO_BACKGROUND addDisposeListener
public void set Input Object input if input instanceof String set Information String input else set Information null  setInput setInformation setInformation
public void set Information String content if content null f Viewer set Input null return String spaces get Spaces For Horizontal Scrolling I Document doc new Document content spaces f Viewer set Input doc f Viewer get Text Widget set Horizontal Pixel f Horizontal Scroll Pixel  setInformation fViewer setInput getSpacesForHorizontalScrolling IDocument fViewer setInput fViewer getTextWidget setHorizontalPixel fHorizontalScrollPixel
Returns a run of spaces the length of which is at least code f Horizontal Scroll Pixel code return the spaces to add to the document content to ensure that it can be scrolled at least code f Horizontal Scroll Pixel code private String get Spaces For Horizontal Scrolling char spaces new char 300 Arrays fill spaces return new String spaces  fHorizontalScrollPixel fHorizontalScrollPixel getSpacesForHorizontalScrolling
see I Information Control set Visible boolean public void set Visible boolean visible f Shell set Visible visible  IInformationControl setVisible setVisible fShell setVisible
public void widget Disposed Dispose Event event if f Status Text Font null f Status Text Font is Disposed f Status Text Font dispose f Status Text Font null f Shell null f Text null  widgetDisposed DisposeEvent fStatusTextFont fStatusTextFont isDisposed fStatusTextFont fStatusTextFont fShell fText
public final void dispose if f Shell null f Shell is Disposed f Shell dispose else widget Disposed null  fShell fShell isDisposed fShell widgetDisposed
public void set Size int width int height if f Status Field null Grid Data gd Grid Data f Viewer get Text Widget get Layout Data Point status Size f Status Field compute Size SWT DEFAULT SWT DEFAULT true Point separator Size f Separator compute Size SWT DEFAULT SWT DEFAULT true gd height Hint height status Size y separator Size y f Shell set Size width height if f Status Field null f Shell pack true  setSize fStatusField GridData GridData fViewer getTextWidget getLayoutData statusSize fStatusField computeSize separatorSize fSeparator computeSize heightHint statusSize separatorSize fShell setSize fStatusField fShell
public void set Location Point location Rectangle trim f Shell compute Trim 0 0 0 0 Point text Location f Text get Location location x trim x text Location x location y trim y text Location y f Shell set Location location  setLocation fShell computeTrim textLocation fText getLocation textLocation textLocation fShell setLocation
see I Information Control set Size Constraints int int public void set Size Constraints int max Width int max Height f Max Width max Width f Max Height max Height  IInformationControl setSizeConstraints setSizeConstraints maxWidth maxHeight fMaxWidth maxWidth fMaxHeight maxHeight
public Point compute Size Hint Point size f Shell compute Size SWT DEFAULT SWT DEFAULT size x Math min size x f Max Width size y Math min size y f Max Height return size  computeSizeHint fShell computeSize fMaxWidth fMaxHeight
see I Information Control add Dispose Listener Dispose Listener public void add Dispose Listener Dispose Listener listener f Shell add Dispose Listener listener  IInformationControl addDisposeListener DisposeListener addDisposeListener DisposeListener fShell addDisposeListener
see I Information Control remove Dispose Listener Dispose Listener public void remove Dispose Listener Dispose Listener listener f Shell remove Dispose Listener listener  IInformationControl removeDisposeListener DisposeListener removeDisposeListener DisposeListener fShell removeDisposeListener
see I Information Control set Foreground Color Color public void set Foreground Color Color foreground f Text set Foreground foreground  IInformationControl setForegroundColor setForegroundColor fText setForeground
see I Information Control set Background Color Color public void set Background Color Color background f Text set Background background  IInformationControl setBackgroundColor setBackgroundColor fText setBackground
see I Information Control is Focus Control public boolean is Focus Control return f Text is Focus Control  IInformationControl isFocusControl isFocusControl fText isFocusControl
see I Information Control set Focus public void set Focus f Shell force Focus f Text set Focus  IInformationControl setFocus setFocus fShell forceFocus fText setFocus
see I Information Control add Focus Listener Focus Listener public void add Focus Listener Focus Listener listener f Text add Focus Listener listener  IInformationControl addFocusListener FocusListener addFocusListener FocusListener fText addFocusListener
see I Information Control remove Focus Listener Focus Listener public void remove Focus Listener Focus Listener listener f Text remove Focus Listener listener  IInformationControl removeFocusListener FocusListener removeFocusListener FocusListener fText removeFocusListener
see I Information Control Extension has Contents public boolean has Contents return f Text get Char Count 0  IInformationControlExtension hasContents hasContents fText getCharCount
param scroll Index the new horizontal scroll index void set Horizontal Scroll Pixel int scroll Index scroll Index Math max 0 scroll Index f Horizontal Scroll Pixel scroll Index  scrollIndex setHorizontalScrollPixel scrollIndex scrollIndex scrollIndex fHorizontalScrollPixel scrollIndex

see org eclipse jface text source Line Change Hover get Tab Replacement protected String get Tab Replacement return Character to String t  LineChangeHover getTabReplacement getTabReplacement toString
see org eclipse jface text source Line Change Hover get Hover Info org eclipse jface text source I Source Viewer org eclipse jface text source I Line Range int public Object get Hover Info I Source Viewer source Viewer I Line Range line Range int visible Lines f Last Scroll Index source Viewer get Text Widget get Horizontal Pixel return super get Hover Info source Viewer line Range visible Lines  LineChangeHover getHoverInfo ISourceViewer ILineRange getHoverInfo ISourceViewer sourceViewer ILineRange lineRange visibleLines fLastScrollIndex sourceViewer getTextWidget getHorizontalPixel getHoverInfo sourceViewer lineRange visibleLines
return new I Information Control Creator public I Information Control create Information Control Shell parent Source Viewer Information Control control new Source Viewer Information Control parent J Face Resources TEXT FONT control set Horizontal Scroll Pixel f Last Scroll Index return control  IInformationControlCreator IInformationControl createInformationControl SourceViewerInformationControl SourceViewerInformationControl JFaceResources TEXT_FONT setHorizontalScrollPixel fLastScrollIndex
public I Information Control Creator get Hover Control Creator return new I Information Control Creator public I Information Control create Information Control Shell parent Source Viewer Information Control control new Source Viewer Information Control parent J Face Resources TEXT FONT control set Horizontal Scroll Pixel f Last Scroll Index return control  IInformationControlCreator getHoverControlCreator IInformationControlCreator IInformationControl createInformationControl SourceViewerInformationControl SourceViewerInformationControl JFaceResources TEXT_FONT setHorizontalScrollPixel fLastScrollIndex

Creates a plug in instance public Text Editor Plugin super Assert is True fg Plugin null fg Plugin this  TextEditorPlugin isTrue fgPlugin fgPlugin
Returns the plug in instance return the text editor plug in instance since 3 0 public static Text Editor Plugin get Default return fg Plugin  TextEditorPlugin getDefault fgPlugin
Returns the last edit position returnthe last edit position or code null code if there is no last edit position see Edit Position Edit Position get Last Edit Position return f Last Edit Position  EditPosition EditPosition getLastEditPosition fLastEditPosition
Sets the last edit position param last Edit Positionthe last edit position see Edit Position public void set Last Edit Position Edit Position last Edit Position f Last Edit Position last Edit Position if f Last Edit Position null f Last Edit Position Dependent Actions null Iterator iter f Last Edit Position Dependent Actions iterator while iter has Next I Action iter next set Enabled true f Last Edit Position Dependent Actions null  lastEditPositionthe EditPosition setLastEditPosition EditPosition lastEditPosition fLastEditPosition lastEditPosition fLastEditPosition fLastEditPositionDependentActions fLastEditPositionDependentActions hasNext IAction setEnabled fLastEditPositionDependentActions
Adds the given action to the last edit position dependent actions param action the goto last edit position action void add Last Edit Position Dependent Action I Action action if f Last Edit Position null return if f Last Edit Position Dependent Actions null f Last Edit Position Dependent Actions new Hash Set f Last Edit Position Dependent Actions add action  addLastEditPositionDependentAction IAction fLastEditPosition fLastEditPositionDependentActions fLastEditPositionDependentActions HashSet fLastEditPositionDependentActions
Removes the given action from the last edit position dependent actions param action the action that depends on the last edit position void remove Last Edit Position Dependent Action I Action action if f Last Edit Position null return if f Last Edit Position Dependent Actions null f Last Edit Position Dependent Actions remove action  removeLastEditPositionDependentAction IAction fLastEditPosition fLastEditPositionDependentActions fLastEditPositionDependentActions
public void start Bundle Context context throws Exception super start context f Quick Diff Extension Registry new Quick Diff Extensions Registry Platform get Extension Registry add Registry Change Listener this PLUGIN ID  BundleContext fQuickDiffExtensionRegistry QuickDiffExtensionsRegistry getExtensionRegistry addRegistryChangeListener PLUGIN_ID
public void stop Bundle Context context throws Exception Platform get Extension Registry remove Registry Change Listener this f Quick Diff Extension Registry null super stop context  BundleContext getExtensionRegistry removeRegistryChangeListener fQuickDiffExtensionRegistry
since 3 0 public void registry Changed I Registry Change Event event if f Quick Diff Extension Registry null event get Extension Deltas PLUGIN ID REFERENCE PROVIDER EXTENSION POINT length 0 f Quick Diff Extension Registry reload Extensions  registryChanged IRegistryChangeEvent fQuickDiffExtensionRegistry getExtensionDeltas PLUGIN_ID REFERENCE_PROVIDER_EXTENSION_POINT fQuickDiffExtensionRegistry reloadExtensions
Returns this plug ins quick diff extension registry return the quick diff extension registry or code null code if this plug in has been shutdown since 3 0 public Quick Diff Extensions Registry get Quick Diff Extension Registry return f Quick Diff Extension Registry  QuickDiffExtensionsRegistry getQuickDiffExtensionRegistry fQuickDiffExtensionRegistry

private I Property Change Listener listener new I Property Change Listener public void property Change Property Change Event event fire Mapping Changed event get Property event get Old Value event get New Value  IPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent fireMappingChanged getProperty getOldValue getNewValue
param parent public Cascading Color Registry Color Registry parent this parent parent parent add Listener listener  CascadingColorRegistry ColorRegistry addListener
public Color get String symbolic Name if super has Value For symbolic Name return super get symbolic Name else return parent get symbolic Name  symbolicName hasValueFor symbolicName symbolicName symbolicName
public Set get Key Set Set key Union new Hash Set super get Key Set key Union add All parent get Key Set return key Union  getKeySet keyUnion HashSet getKeySet keyUnion addAll getKeySet keyUnion
public RGB getRGB String symbolic Name if super has Value For symbolic Name return super getRGB symbolic Name else return parent getRGB symbolic Name  symbolicName hasValueFor symbolicName symbolicName symbolicName
see org eclipse jface resource Color Registry has Value For java lang String public boolean has Value For String color Key return super has Value For color Key parent has Value For color Key  ColorRegistry hasValueFor hasValueFor colorKey hasValueFor colorKey hasValueFor colorKey
Returns whether this cascading registry has an override for the provided color key param color Key the provided color key return hether this cascading registry has an override public boolean has Override For String color Key return super has Value For color Key  colorKey hasOverrideFor colorKey hasValueFor colorKey
Disposes of all allocated resources public void dispose parent remove Listener listener Display get Current async Exec display Runnable  removeListener getCurrent asyncExec displayRunnable

private I Property Change Listener listener new I Property Change Listener public void property Change Property Change Event event fire Mapping Changed event get Property event get Old Value event get New Value  IPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent fireMappingChanged getProperty getOldValue getNewValue
public Cascading Font Registry Font Registry parent this parent parent parent add Listener listener  CascadingFontRegistry FontRegistry addListener
public Font get String symbolic Name if super has Value For symbolic Name return super get symbolic Name else return parent get symbolic Name  symbolicName hasValueFor symbolicName symbolicName symbolicName
public Set get Key Set Set key Union new Hash Set super get Key Set key Union add All parent get Key Set return key Union  getKeySet keyUnion HashSet getKeySet keyUnion addAll getKeySet keyUnion
public Font Data get Font Data String symbolic Name if super has Value For symbolic Name return super get Font Data symbolic Name else return parent get Font Data symbolic Name  FontData getFontData symbolicName hasValueFor symbolicName getFontData symbolicName getFontData symbolicName
see org eclipse jface resource Color Registry has Value For java lang String public boolean has Value For String color Key return super has Value For color Key parent has Value For color Key  ColorRegistry hasValueFor hasValueFor colorKey hasValueFor colorKey hasValueFor colorKey
Returns whether this cascading registry has an override for the provided color key param font Key the provided color key return hether this cascading registry has an override public boolean has Override For String font Key return super has Value For font Key  fontKey hasOverrideFor fontKey hasValueFor fontKey
Disposes of all allocated resources public void dispose parent remove Listener listener Display get Current async Exec display Runnable  removeListener getCurrent asyncExec displayRunnable

param base the base default map param override the override map public Cascading Map Map base Map override this base base this override override  CascadingMap
Return the union of the parent and child key sets return the union This set is read only public Set key Set Set key Set new Hash Set base key Set key Set add All override key Set return Collections unmodifiable Set key Set  keySet keySet HashSet keySet keySet addAll keySet unmodifiableSet keySet
Get the value Preference will be given to entries in the override map param key the key return the value public Object get Object key if override contains Key key return override get key return base get key  containsKey

private I Property Change Listener listener new I Property Change Listener public void property Change Property Change Event event fire event  IPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent
param color Registry param font Registry public Cascading Theme I Theme current Theme Cascading Color Registry color Registry Cascading Font Registry font Registry this current Theme current Theme this color Registry color Registry this font Registry font Registry font Registry add Listener listener color Registry add Listener listener  colorRegistry fontRegistry CascadingTheme ITheme currentTheme CascadingColorRegistry colorRegistry CascadingFontRegistry fontRegistry currentTheme currentTheme colorRegistry colorRegistry fontRegistry fontRegistry fontRegistry addListener colorRegistry addListener
param event protected void fire Property Change Event event Object listeners prop Listeners get Listeners for int i 0 i listeners length i I Property Change Listener listeners i property Change event  PropertyChangeEvent propListeners getListeners IPropertyChangeListener propertyChange
see org eclipse ui themes I Theme add Property Change Listener org eclipse jface util I Property Change Listener public void add Property Change Listener I Property Change Listener listener prop Listeners add listener  ITheme addPropertyChangeListener IPropertyChangeListener addPropertyChangeListener IPropertyChangeListener propListeners
see org eclipse ui themes I Theme remove Property Change Listener org eclipse jface util I Property Change Listener public void remove Property Change Listener I Property Change Listener listener prop Listeners remove prop Listeners  ITheme removePropertyChangeListener IPropertyChangeListener removePropertyChangeListener IPropertyChangeListener propListeners propListeners
see org eclipse ui themes I Theme get Id public String get Id return current Theme get Id  ITheme getId getId currentTheme getId
see org eclipse ui themes I Theme get Label public String get Label return current Theme get Label  ITheme getLabel getLabel currentTheme getLabel
see org eclipse ui themes I Theme get Color Registry public Color Registry get Color Registry return color Registry  ITheme getColorRegistry ColorRegistry getColorRegistry colorRegistry
see org eclipse ui themes I Theme get Font Registry public Font Registry get Font Registry return font Registry  ITheme getFontRegistry FontRegistry getFontRegistry fontRegistry
see org eclipse ui themes I Theme dispose public void dispose color Registry remove Listener listener font Registry remove Listener listener  ITheme colorRegistry removeListener fontRegistry removeListener
see org eclipse ui themes I Theme get String java lang String public String get String String key return current Theme get String key  ITheme getString getString currentTheme getString
see org eclipse ui themes I Theme get Int java lang String public int get Int String key return current Theme get Int key  ITheme getInt getInt currentTheme getInt
see org eclipse ui themes I Theme get Boolean java lang String public boolean get Boolean String key return current Theme get Boolean key  ITheme getBoolean getBoolean currentTheme getBoolean
see org eclipse ui themes I Theme key Set public Set key Set return current Theme key Set  ITheme keySet keySet currentTheme keySet

Create a new instance of the receiver param label the label for this definition param id the identifier for this definition param defaults To the id of a definition that this definition will default to param value the default value of this definition either in the form rrr ggg bbb or the name of an SWT color constant param description the description for this definition param plugin Id the identifier of the plugin that contributed this definition public Color Definition String label String id String defaults To String value String category Id boolean is Editable String description String plugin Id this label label this id id this defaults To defaults To this raw Value value this category Id category Id this description description this is Editable is Editable this plugin Id plugin Id  defaultsTo pluginId ColorDefinition defaultsTo categoryId isEditable pluginId defaultsTo defaultsTo rawValue categoryId categoryId isEditable isEditable pluginId pluginId
Create a new instance of the receiver param original the original definition This will be used to populate all fields except defaults To and value defaults To will always be code null code param value the RGB value public Color Definition Color Definition original RGB value this label original get Label this id original get Id this category Id original get Category Id this description original get Description this is Editable original is Editable this plugin Id original get Plugin Id this parsed Value value  defaultsTo defaultsTo ColorDefinition ColorDefinition getLabel getId categoryId getCategoryId getDescription isEditable isEditable pluginId getPluginId parsedValue
return the category Id or code null code if none was supplied public String get Category Id return category Id  categoryId getCategoryId categoryId
return the defaults To value or code null code if none was supplied public String get Defaults To return defaults To  defaultsTo getDefaultsTo defaultsTo
return the description text or code null code if none was supplied public String get Description return description  getDescription
return the id of this definition Should not be code null code public String get Id return id  getId
return the label text Should not be code null code public String get Label return label  getLabel
see org eclipse ui I Plugin Contribution get Local Id public String get Local Id return get Id  IPluginContribution getLocalId getLocalId getId
see org eclipse ui I Plugin Contribution get Plugin Id public String get Plugin Id return plugin Id  IPluginContribution getPluginId getPluginId pluginId
return the value Any SWT constants supplied to the constructor will be evaluated and converted into their RGB value public RGB get Value if parsed Value null parsed Value Color Utils get Color Value raw Value return parsed Value  getValue parsedValue parsedValue ColorUtils getColorValue rawValue parsedValue
see java lang Object to String public String to String return get Id  toString toString getId
see org eclipse ui internal themes I Editable is Editable public boolean is Editable return is Editable  IEditable isEditable isEditable isEditable

public Object get Children Object parent Element if parent Element instanceof Theme Element Category String category Id Theme Element Category parent Element get Id Object defintions Object category Map get category Id if defintions null defintions get Category Children category Id category Map put category Id defintions return defintions else Array List list new Array List I Hierarchal Theme Element Definition def I Hierarchal Theme Element Definition parent Element String id def get Id I Hierarchal Theme Element Definition defs if def instanceof Color Definition defs registry get Colors else defs registry get Fonts for int i 0 i defs length i if id equals defs i get Defaults To Colors And Fonts Preference Page equals I Categorized Theme Element Definition def get Category Id I Categorized Theme Element Definition defs i get Category Id list add defs i return list to Array  getChildren parentElement parentElement ThemeElementCategory categoryId ThemeElementCategory parentElement getId categoryMap categoryId getCategoryChildren categoryId categoryMap categoryId ArrayList ArrayList IHierarchalThemeElementDefinition IHierarchalThemeElementDefinition parentElement getId IHierarchalThemeElementDefinition ColorDefinition getColors getFonts getDefaultsTo ColorsAndFontsPreferencePage ICategorizedThemeElementDefinition getCategoryId ICategorizedThemeElementDefinition getCategoryId toArray
private Object get Category Children String category Id Array List list new Array List if category Id null Theme Element Category categories registry get Categories for int i 0 i categories length i if category Id equals categories i get Parent Id Set bindings theme Registry get Presentations Bindings For categories i if bindings null bindings contains workbench get Presentation Id list add categories i Color Definition color Definitions theme Registry get Colors For current Theme get Id for int i 0 i color Definitions length i if color Definitions i is Editable continue String cat Id color Definitions i get Category Id if cat Id null category Id null cat Id null category Id null category Id equals cat Id if color Definitions i get Defaults To null parent Is In Same Category color Definitions i continue list add color Definitions i Font Definition font Definitions theme Registry get Fonts For current Theme get Id for int i 0 i font Definitions length i if font Definitions i is Editable continue String cat Id font Definitions i get Category Id if cat Id null category Id null cat Id null category Id null category Id equals cat Id if font Definitions i get Defaults To null parent Is In Same Category font Definitions i continue list add font Definitions i return list to Array new Object list size  getCategoryChildren categoryId ArrayList ArrayList categoryId ThemeElementCategory getCategories categoryId getParentId themeRegistry getPresentationsBindingsFor getPresentationId ColorDefinition colorDefinitions themeRegistry getColorsFor currentTheme getId colorDefinitions colorDefinitions isEditable catId colorDefinitions getCategoryId catId categoryId catId categoryId categoryId catId colorDefinitions getDefaultsTo parentIsInSameCategory colorDefinitions colorDefinitions FontDefinition fontDefinitions themeRegistry getFontsFor currentTheme getId fontDefinitions fontDefinitions isEditable catId fontDefinitions getCategoryId catId categoryId catId categoryId categoryId catId fontDefinitions getDefaultsTo parentIsInSameCategory fontDefinitions fontDefinitions toArray
param definition return private boolean parent Is In Same Category Color Definition definition String defaults To definition get Defaults To Color Definition defs registry get Colors for int i 0 i defs length i if defs i get Id equals defaults To Colors And Fonts Preference Page equals defs i get Category Id definition get Category Id return true return false  parentIsInSameCategory ColorDefinition defaultsTo getDefaultsTo ColorDefinition getColors getId defaultsTo ColorsAndFontsPreferencePage getCategoryId getCategoryId
param definition return private boolean parent Is In Same Category Font Definition definition String defaults To definition get Defaults To Font Definition defs registry get Fonts for int i 0 i defs length i if defs i get Id equals defaults To Colors And Fonts Preference Page equals defs i get Category Id definition get Category Id return true return false  parentIsInSameCategory FontDefinition defaultsTo getDefaultsTo FontDefinition getFonts getId defaultsTo ColorsAndFontsPreferencePage getCategoryId getCategoryId
see org eclipse jface viewers I Tree Content Provider get Parent java lang Object public Object get Parent Object element return null  ITreeContentProvider getParent getParent
public boolean has Children Object element if element instanceof Theme Element Category return true else I Hierarchal Theme Element Definition def I Hierarchal Theme Element Definition element String id def get Id I Hierarchal Theme Element Definition defs if def instanceof Color Definition defs registry get Colors else defs registry get Fonts for int i 0 i defs length i if id equals defs i get Defaults To Colors And Fonts Preference Page equals I Categorized Theme Element Definition def get Category Id I Categorized Theme Element Definition defs i get Category Id return true return false  hasChildren ThemeElementCategory IHierarchalThemeElementDefinition IHierarchalThemeElementDefinition getId IHierarchalThemeElementDefinition ColorDefinition getColors getFonts getDefaultsTo ColorsAndFontsPreferencePage ICategorizedThemeElementDefinition getCategoryId ICategorizedThemeElementDefinition getCategoryId
public Object get Elements Object input Element Array List list new Array List Object uncat Children get Category Children null list add All Arrays as List uncat Children Theme Element Category categories I Theme Registry input Element get Categories for int i 0 i categories length i if categories i get Parent Id null Set bindings theme Registry get Presentations Bindings For categories i if bindings null bindings contains workbench get Presentation Id list add categories i return list to Array new Object list size  getElements inputElement ArrayList ArrayList uncatChildren getCategoryChildren addAll asList uncatChildren ThemeElementCategory IThemeRegistry inputElement getCategories getParentId themeRegistry getPresentationsBindingsFor getPresentationId toArray
see org eclipse jface viewers I Content Provider dispose public void dispose category Map clear  IContentProvider categoryMap
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer viewer Object old Input Object new Input category Map clear registry I Theme Registry new Input  IContentProvider inputChanged inputChanged oldInput newInput categoryMap IThemeRegistry newInput
private I Property Change Listener listener new I Property Change Listener public void property Change Property Change Event event fire Label Provider Changed new Label Provider Changed Event Presentation Label Provider this  IPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent fireLabelProviderChanged LabelProviderChangedEvent PresentationLabelProvider
public Presentation Label Provider hook Listeners  PresentationLabelProvider hookListeners
Hook the listeners onto the various registries public void hook Listeners color Registry add Listener listener font Registry add Listener listener  hookListeners colorRegistry addListener fontRegistry addListener
public void dispose super dispose color Registry remove Listener listener font Registry remove Listener listener for Iterator i images values iterator i has Next Image i next dispose images clear if empty Image null empty Image dispose empty Image null clear the fonts Has a side effect of firing a label property change clear Font Cache  colorRegistry removeListener fontRegistry removeListener hasNext emptyImage emptyImage emptyImage clearFontCache
Clears and disposes all fonts and fires a label changed event public void clear Font Cache for Iterator i fonts values iterator i has Next Font i next dispose fonts clear fire Label Provider Changed new Label Provider Changed Event Presentation Label Provider this  clearFontCache hasNext fireLabelProviderChanged LabelProviderChangedEvent PresentationLabelProvider
public Font get Font Object element Display display tree get Display if element instanceof Font Definition int parent Height tree get Viewer get Control get Font get Font Data 0 get Height Font base Font font Registry get Font Definition element get Id Font font Font fonts get base Font if font null Font Data data base Font get Font Data for int i 0 i data length i data i set Height parent Height font new Font display data fonts put base Font font update Column get Text element font return font update Column get Text element J Face Resources get Dialog Font return J Face Resources get Dialog Font  getFont getDisplay FontDefinition parentHeight getViewer getControl getFont getFontData getHeight baseFont fontRegistry FontDefinition getId baseFont FontData baseFont getFontData setHeight parentHeight baseFont updateColumn getText updateColumn getText JFaceResources getDialogFont JFaceResources getDialogFont
Updates the table font based on the width required to render the given text in the given font If this value is greater than largest Font Width then the font on the table is set to the provided font and largest Fotn Width is updated This is required as a workaround to bug 56593 private void update Column String text Font font Display display tree get Display GC gc new GC display gc set Font font int width gc string Extent text x if width largest Font Width largest Font Width width if tree is Disposed tree get Viewer get Control set Font font gc dispose  largestFontWidth largestFotnWidth updateColumn getDisplay setFont stringExtent largestFontWidth largestFontWidth isDisposed getViewer getControl setFont
public Image get Image Object element if element instanceof Color Definition Color c color Registry get Color Definition element get Id Image image Image images get c if image null Display display tree get Display ensure Image Size display int size presentation List get Control get Font get Font Data 0 get Height image new Image display image Size image Size GC gc new GC image gc set Background tree get Viewer get Control get Background gc set Foreground tree get Viewer get Control get Background gc draw Rectangle 0 0 image Size 1 image Size 1 gc set Foreground tree get Viewer get Control get Foreground gc set Background c int offset image Size usable Image Size 2 gc draw Rectangle offset offset usable Image Size offset usable Image Size offset gc fill Rectangle offset 1 offset 1 usable Image Size offset 1 usable Image Size offset 1 gc dispose images put c image return image else if element instanceof Font Definition return workbench get Shared Images get Image I Workbench Graphic Constants IMG OBJ FONT else return workbench get Shared Images get Image I Workbench Graphic Constants IMG OBJ THEME CATEGORY  getImage ColorDefinition colorRegistry ColorDefinition getId getDisplay ensureImageSize presentationList getControl getFont getFontData getHeight imageSize imageSize setBackground getViewer getControl getBackground setForeground getViewer getControl getBackground drawRectangle imageSize imageSize setForeground getViewer getControl getForeground setBackground imageSize usableImageSize drawRectangle usableImageSize usableImageSize fillRectangle usableImageSize usableImageSize FontDefinition getSharedImages getImage IWorkbenchGraphicConstants IMG_OBJ_FONT getSharedImages getImage IWorkbenchGraphicConstants IMG_OBJ_THEME_CATEGORY
param display return private void ensure Image Size Display display if image Size 1 image Size tree get Viewer get Tree get Item Height usable Image Size Math max 1 image Size 4  ensureImageSize imageSize imageSize getViewer getTree getItemHeight usableImageSize imageSize
public String get Text Object element if element instanceof I Hierarchal Theme Element Definition if I Hierarchal Theme Element Definition element get Defaults To null String my Category I Categorized Theme Element Definition element get Category Id I Categorized Theme Element Definition def if element instanceof Color Definition def I Categorized Theme Element Definition theme Registry find Color I Hierarchal Theme Element Definition element get Defaults To else def I Categorized Theme Element Definition theme Registry find Font I Hierarchal Theme Element Definition element get Defaults To if Colors And Fonts Preference Page equals def get Category Id my Category return Message Format format RESOURCE BUNDLE get String default Format new Object I Theme Element Definition element get Label def get Label NON NLS 1 return I Theme Element Definition element get Label  getText IHierarchalThemeElementDefinition IHierarchalThemeElementDefinition getDefaultsTo myCategory ICategorizedThemeElementDefinition getCategoryId ICategorizedThemeElementDefinition ColorDefinition ICategorizedThemeElementDefinition themeRegistry findColor IHierarchalThemeElementDefinition getDefaultsTo ICategorizedThemeElementDefinition themeRegistry findFont IHierarchalThemeElementDefinition getDefaultsTo ColorsAndFontsPreferencePage getCategoryId myCategory MessageFormat RESOURCE_BUNDLE getString defaultFormat IThemeElementDefinition getLabel getLabel IThemeElementDefinition getLabel
Create a new instance of the receiver public Colors And Fonts Preference Page theme Registry Workbench Plugin get Default get Theme Registry no op  ColorsAndFontsPreferencePage themeRegistry WorkbenchPlugin getDefault getThemeRegistry
param string param string2 return private static boolean equals String string String string2 if string null string2 null return true if string null string2 null return false if string equals string2 return true return false 
Create a button for the preference page param parent param label private Button create Button Composite parent String label Button button new Button parent SWT PUSH SWT CENTER button set Text label my Apply Dialog Font button set Button Layout Data button button set Enabled false return button  createButton setText myApplyDialogFont setButtonLayoutData setEnabled
Create the color selection control private void create Color Control Composite composite new Composite color Controls SWT NONE Grid Layout layout new Grid Layout 2 false layout margin Height 0 layout margin Width 0 composite set Layout layout color Selector new Color Selector composite color Selector get Button set Layout Data new Grid Data my Apply Dialog Font color Selector get Button color Selector set Enabled false color Reset Button create Button composite RESOURCE BUNDLE get String reset NON NLS 1  createColorControl colorControls GridLayout GridLayout marginHeight marginWidth setLayout colorSelector ColorSelector colorSelector getButton setLayoutData GridData myApplyDialogFont colorSelector getButton colorSelector setEnabled colorResetButton createButton RESOURCE_BUNDLE getString
protected Control create Contents Composite parent parent add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if applied Dialog Font null applied Dialog Font dispose  createContents addDisposeListener DisposeListener widgetDisposed DisposeEvent appliedDialogFont appliedDialogFont
protected Control create Contents Composite parent parent add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if applied Dialog Font null applied Dialog Font dispose Composite main Column new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 main Column set Font parent get Font main Column set Layout layout Grid Data data new Grid Data Grid Data BEGINNING Label label new Label main Column SWT LEFT label set Text RESOURCE BUNDLE get String colors And Fonts NON NLS 1 my Apply Dialog Font label label set Layout Data data Composite control Row new Composite main Column SWT NONE layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 control Row set Layout layout data new Grid Data Grid Data FILL HORIZONTAL control Row set Layout Data data create Tree control Row Composite control Column new Composite control Row SWT NONE data new Grid Data Grid Data FILL VERTICAL control Column set Layout Data data layout new Grid Layout layout margin Height 0 layout margin Width 0 control Column set Layout layout control Area new Composite control Column SWT NONE control Area Layout new Stack Layout control Area set Layout control Area Layout color Controls new Composite control Area SWT NONE color Controls set Layout new Fill Layout create Color Control font Controls new Composite control Area SWT NONE font Controls set Layout new Fill Layout create Font Control create Description Control main Column create Preview Control main Column hook Listeners return main Column  createContents addDisposeListener DisposeListener widgetDisposed DisposeEvent appliedDialogFont appliedDialogFont mainColumn GridLayout GridLayout marginWidth marginHeight mainColumn setFont getFont mainColumn setLayout GridData GridData GridData mainColumn setText RESOURCE_BUNDLE getString colorsAndFonts myApplyDialogFont setLayoutData controlRow mainColumn GridLayout numColumns marginHeight marginWidth controlRow setLayout GridData GridData FILL_HORIZONTAL controlRow setLayoutData createTree controlRow controlColumn controlRow GridData GridData FILL_VERTICAL controlColumn setLayoutData GridLayout marginHeight marginWidth controlColumn setLayout controlArea controlColumn controlAreaLayout StackLayout controlArea setLayout controlAreaLayout colorControls controlArea colorControls setLayout FillLayout createColorControl fontControls controlArea fontControls setLayout FillLayout createFontControl createDescriptionControl mainColumn createPreviewControl mainColumn hookListeners mainColumn
Create the text box that will contain the current color font description text if any param parent the parent code Composite code private void create Description Control Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 composite set Layout layout Grid Data data new Grid Data Grid Data FILL BOTH composite set Layout Data data Label label new Label composite SWT LEFT label set Text RESOURCE BUNDLE get String description NON NLS 1 my Apply Dialog Font label description Text new Text composite SWT H SCROLL SWT V SCROLL SWT READ ONLY SWT BORDER SWT WRAP data new Grid Data Grid Data FILL BOTH description Text set Text n n NON NLS 1 description Text set Layout Data data my Apply Dialog Font description Text  createDescriptionControl GridLayout GridLayout marginWidth marginHeight setLayout GridData GridData GridData FILL_BOTH setLayoutData setText RESOURCE_BUNDLE getString myApplyDialogFont descriptionText H_SCROLL V_SCROLL READ_ONLY GridData GridData FILL_BOTH descriptionText setText descriptionText setLayoutData myApplyDialogFont descriptionText
param font Controls2 private void create Font Control Composite composite new Composite font Controls SWT NONE Grid Layout layout new Grid Layout 1 false layout margin Height 0 layout margin Width 0 composite set Layout layout font System Button create Button composite Workbench Messages get String Fonts Preference use System Font NON NLS 1 font Change Button create Button composite J Face Resources get String open Change NON NLS 1 font Reset Button create Button composite RESOURCE BUNDLE get String reset NON NLS 1  fontControls2 createFontControl fontControls GridLayout GridLayout marginHeight marginWidth setLayout fontSystemButton createButton WorkbenchMessages getString FontsPreference useSystemFont fontChangeButton createButton JFaceResources getString openChange fontResetButton createButton RESOURCE_BUNDLE getString
public boolean select Viewer viewer Object parent Element Object element Object children I Tree Content Provider Abstract Tree Viewer viewer get Content Provider get Children element if children length 0 element instanceof Theme Element Category return filter viewer element children length 0 String label Text I Label Provider Structured Viewer viewer get Label Provider get Text element return match label Text  parentElement ITreeContentProvider AbstractTreeViewer getContentProvider getChildren ThemeElementCategory labelText ILabelProvider StructuredViewer getLabelProvider getText labelText
public int category Object element if element instanceof Theme Element Category return 0 return 1  ThemeElementCategory
public void double Click Double Click Event event I Structured Selection s I Structured Selection event get Selection Object element s get First Element if tree get Viewer is Expandable element tree get Viewer set Expanded State element tree get Viewer get Expanded State element  doubleClick DoubleClickEvent IStructuredSelection IStructuredSelection getSelection getFirstElement getViewer isExpandable getViewer setExpandedState getViewer getExpandedState
Create the code List Viewer code that will contain all color definitions as defined in the extension point param parent the parent code Composite code private void create Tree Composite parent label Provider new Presentation Label Provider create a new tree with a custom pattern matcher that will allow non category elements to be returned in the event that their children do not tree new Filtered Tree parent SWT SINGLE SWT H SCROLL SWT V SCROLL SWT BORDER new Pattern Filter non Javadoc see org eclipse ui internal dialogs Pattern Filter select org eclipse jface viewers Viewer java lang Object java lang Object public boolean select Viewer viewer Object parent Element Object element Object children I Tree Content Provider Abstract Tree Viewer viewer get Content Provider get Children element if children length 0 element instanceof Theme Element Category return filter viewer element children length 0 String label Text I Label Provider Structured Viewer viewer get Label Provider get Text element return match label Text Grid Data data new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN FILL data height Hint Math max 175 convert Height In Chars To Pixels 10 tree set Layout Data data my Apply Dialog Font tree get Viewer get Control my Apply Dialog Font tree get Filter Field tree get Viewer set Label Provider label Provider tree get Viewer set Content Provider new Theme Content Provider tree get Viewer set Sorter new Viewer Sorter non Javadoc see org eclipse jface viewers Viewer Sorter category java lang Object public int category Object element if element instanceof Theme Element Category return 0 return 1 tree get Viewer set Input Workbench Plugin get Default get Theme Registry tree get Viewer add Double Click Listener new I Double Click Listener non Javadoc see org eclipse jface viewers I Double Click Listener double Click org eclipse jface viewers Double Click Event public void double Click Double Click Event event I Structured Selection s I Structured Selection event get Selection Object element s get First Element if tree get Viewer is Expandable element tree get Viewer set Expanded State element tree get Viewer get Expanded State element  ListViewer createTree labelProvider PresentationLabelProvider FilteredTree H_SCROLL V_SCROLL PatternFilter PatternFilter parentElement ITreeContentProvider AbstractTreeViewer getContentProvider getChildren ThemeElementCategory labelText ILabelProvider StructuredViewer getLabelProvider getText labelText GridData GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_FILL heightHint convertHeightInCharsToPixels setLayoutData myApplyDialogFont getViewer getControl myApplyDialogFont getFilterField getViewer setLabelProvider labelProvider getViewer setContentProvider ThemeContentProvider getViewer setSorter ViewerSorter ViewerSorter ThemeElementCategory getViewer setInput WorkbenchPlugin getDefault getThemeRegistry getViewer addDoubleClickListener IDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent doubleClick DoubleClickEvent IStructuredSelection IStructuredSelection getSelection getFirstElement getViewer isExpandable getViewer setExpandedState getViewer getExpandedState
param main Column private void create Preview Control Composite main Column Composite composite new Composite main Column SWT NONE Grid Data data new Grid Data Grid Data FILL BOTH data height Hint 175 composite set Layout Data data Grid Layout layout new Grid Layout 1 true layout margin Height 0 layout margin Width 0 composite set Layout layout Label label new Label composite SWT LEFT label set Text RESOURCE BUNDLE get String preview NON NLS 1 my Apply Dialog Font label preview Composite new Composite composite SWT NONE data new Grid Data Grid Data FILL BOTH preview Composite set Layout Data data stack Layout new Stack Layout preview Composite set Layout stack Layout  mainColumn createPreviewControl mainColumn mainColumn GridData GridData GridData FILL_BOTH heightHint setLayoutData GridLayout GridLayout marginHeight marginWidth setLayout setText RESOURCE_BUNDLE getString myApplyDialogFont previewComposite GridData GridData FILL_BOTH previewComposite setLayoutData stackLayout StackLayout previewComposite setLayout stackLayout
public void dispose super dispose workbench get Theme Manager remove Property Change Listener theme Change Listener clear Previews color Registry dispose font Registry dispose  getThemeManager removePropertyChangeListener themeChangeListener clearPreviews colorRegistry fontRegistry
Clear all previews private void clear Previews if cascading Theme null cascading Theme dispose for Iterator i preview Set iterator i has Next I Theme Preview preview I Theme Preview i next try preview dispose catch Runtime Exception e Workbench Plugin log RESOURCE BUNDLE get String error Dispose Preview Log Status Util new Status I Status ERROR e get Message e NON NLS 1 preview Set clear  clearPreviews cascadingTheme cascadingTheme previewSet hasNext IThemePreview IThemePreview RuntimeException WorkbenchPlugin RESOURCE_BUNDLE getString errorDisposePreviewLog StatusUtil newStatus IStatus getMessage previewSet
Get the ancestor of the given color if any param definition the descendant code Color Definition code return the ancestror code Color Definition code or code null code if none private Color Definition get Color Ancestor Color Definition definition String defaults To definition get Defaults To if defaults To null return null return theme Registry find Color defaults To  ColorDefinition ColorDefinition ColorDefinition getColorAncestor ColorDefinition defaultsTo getDefaultsTo defaultsTo themeRegistry findColor defaultsTo
Get the RGB value of the given colors ancestor if any param definition the descendant code Color Definition code return the ancestror code RGB code or code null code if none private RGB get Color Ancestor Value Color Definition definition Color Definition ancestor get Color Ancestor definition if ancestor null return null return get Color Value ancestor  ColorDefinition getColorAncestorValue ColorDefinition ColorDefinition getColorAncestor getColorValue
Get the RGB value for the specified definition Cascades through preference To Set values To Set and finally the registry param definition the code Color Definition code return the code RGB code value private RGB get Color Value Color Definition definition String id definition get Id RGB updatedRGB RGB color Preferences To Set get id if updatedRGB null updatedRGB RGB color Values To Set get id if updatedRGB null updatedRGB current Theme get Color Registry getRGB id return updatedRGB  preferenceToSet valuesToSet ColorDefinition getColorValue ColorDefinition getId colorPreferencesToSet colorValuesToSet currentTheme getColorRegistry
return Return the default No preview available preview private Composite get Default Preview Control if default Preview Control null default Preview Control new Composite preview Composite SWT NONE default Preview Control set Layout new Fill Layout Label l new Label default Preview Control SWT LEFT l set Text RESOURCE BUNDLE get String no Preview Available NON NLS 1 my Apply Dialog Font l return default Preview Control  getDefaultPreviewControl defaultPreviewControl defaultPreviewControl previewComposite defaultPreviewControl setLayout FillLayout defaultPreviewControl setText RESOURCE_BUNDLE getString noPreviewAvailable myApplyDialogFont defaultPreviewControl
Get colors that descend from the provided color param definition the ancestor code Color Definition code return the Color Definitions that have the provided definition as their defaults To attribute private Color Definition get Descendant Colors Color Definition definition List list new Array List 5 String id definition get Id Color Definition colors theme Registry get Colors Color Definition sorted new Color Definition colors length System arraycopy colors 0 sorted 0 sorted length Arrays sort sorted new I Theme Registry Hierarchy Comparator colors for int i 0 i sorted length i if id equals sorted i get Defaults To list add sorted i return Color Definition list to Array new Color Definition list size  ColorDefinition ColorDefinitions defaultsTo ColorDefinition getDescendantColors ColorDefinition ArrayList getId ColorDefinition themeRegistry getColors ColorDefinition ColorDefinition IThemeRegistry HierarchyComparator getDefaultsTo ColorDefinition toArray ColorDefinition
param definition return private Font Definition get Descendant Fonts Font Definition definition List list new Array List 5 String id definition get Id Font Definition fonts theme Registry get Fonts Font Definition sorted new Font Definition fonts length System arraycopy fonts 0 sorted 0 sorted length Arrays sort sorted new I Theme Registry Hierarchy Comparator fonts for int i 0 i sorted length i if id equals sorted i get Defaults To list add sorted i return Font Definition list to Array new Font Definition list size  FontDefinition getDescendantFonts FontDefinition ArrayList getId FontDefinition themeRegistry getFonts FontDefinition FontDefinition IThemeRegistry HierarchyComparator getDefaultsTo FontDefinition toArray FontDefinition
param definition return private Font Definition get Font Ancestor Font Definition definition String defaults To definition get Defaults To if defaults To null return null return theme Registry find Font defaults To  FontDefinition getFontAncestor FontDefinition defaultsTo getDefaultsTo defaultsTo themeRegistry findFont defaultsTo
param definition return private Font Data get Font Ancestor Value Font Definition definition Font Definition ancestor get Font Ancestor definition if ancestor null return Preference Converter get Default Font Data Array get Preference Store Theme Element Helper create Preference Key current Theme definition get Id return get Font Value ancestor  FontData getFontAncestorValue FontDefinition FontDefinition getFontAncestor PreferenceConverter getDefaultFontDataArray getPreferenceStore ThemeElementHelper createPreferenceKey currentTheme getId getFontValue
param definition return protected Font Data get Font Value Font Definition definition String id definition get Id Font Data updatedFD Font Data font Preferences To Set get id if updatedFD null updatedFD Font Data font Values To Set get id if updatedFD null updatedFD current Theme get Font Registry get Font Data id return updatedFD  FontData getFontValue FontDefinition getId FontData FontData fontPreferencesToSet FontData fontValuesToSet currentTheme getFontRegistry getFontData
return protected Color Definition get Selected Color Definition Object o I Structured Selection tree get Viewer get Selection get First Element if o instanceof Color Definition return Color Definition o return null  ColorDefinition getSelectedColorDefinition IStructuredSelection getViewer getSelection getFirstElement ColorDefinition ColorDefinition
return protected Font Definition get Selected Font Definition Object o I Structured Selection tree get Viewer get Selection get First Element if o instanceof Font Definition return Font Definition o return null  FontDefinition getSelectedFontDefinition IStructuredSelection getViewer getSelection getFirstElement FontDefinition FontDefinition
public void property Change Property Change Event event Color Definition definition get Selected Color Definition RGB newRGB RGB event get New Value if definition null newRGB null newRGB equals event get Old Value set Color Preference Value definition newRGB set Registry Value definition newRGB update Color Controls definition  propertyChange PropertyChangeEvent ColorDefinition getSelectedColorDefinition getNewValue getOldValue setColorPreferenceValue setRegistryValue updateColorControls
public void selection Changed Selection Changed Event event if event get Selection is Empty swap No Controls update Color Controls null update Category Selection null else Object element I Structured Selection event get Selection get First Element if element instanceof Theme Element Category swap No Controls String description Theme Element Category element get Description description Text set Text description null description NON NLS 1 update Category Selection Theme Element Category element else if element instanceof Color Definition update Color Controls Color Definition element swap Color Controls update Category Selection Workbench Plugin get Default get Theme Registry find Category Color Definition element get Category Id else if element instanceof Font Definition update Font Controls Font Definition element swap Font Controls update Category Selection Workbench Plugin get Default get Theme Registry find Category Font Definition element get Category Id  selectionChanged SelectionChangedEvent getSelection isEmpty swapNoControls updateColorControls updateCategorySelection IStructuredSelection getSelection getFirstElement ThemeElementCategory swapNoControls ThemeElementCategory getDescription descriptionText setText updateCategorySelection ThemeElementCategory ColorDefinition updateColorControls ColorDefinition swapColorControls updateCategorySelection WorkbenchPlugin getDefault getThemeRegistry findCategory ColorDefinition getCategoryId FontDefinition updateFontControls FontDefinition swapFontControls updateCategorySelection WorkbenchPlugin getDefault getThemeRegistry findCategory FontDefinition getCategoryId
public void widget Selected Selection Event e Color Definition definition get Selected Color Definition if reset Color definition update Color Controls definition  widgetSelected SelectionEvent ColorDefinition getSelectedColorDefinition resetColor updateColorControls
public void widget Selected Selection Event e Font Definition definition get Selected Font Definition if reset Font definition update Font Controls definition  widgetSelected SelectionEvent FontDefinition getSelectedFontDefinition resetFont updateFontControls
font Change Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event Font Definition definition get Selected Font Definition if definition null Font Dialog font Dialog new Font Dialog font Change Button get Shell Font Data current Data get Font Value definition font Dialog set Font List current Data if font Dialog open null set Font Preference Value definition font Dialog get Font List set Registry Value definition font Dialog get Font List update Font Controls definition  fontChangeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent FontDefinition getSelectedFontDefinition FontDialog fontDialog FontDialog fontChangeButton getShell FontData currentData getFontValue fontDialog setFontList currentData fontDialog setFontPreferenceValue fontDialog getFontList setRegistryValue fontDialog getFontList updateFontControls
font System Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event Font Definition definition get Selected Font Definition if definition null Font Data default Font Data J Face Resources get Default Font get Font Data set Font Preference Value definition default Font Data set Registry Value definition default Font Data update Font Controls definition  fontSystemButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent FontDefinition getSelectedFontDefinition FontData defaultFontData JFaceResources getDefaultFont getFontData setFontPreferenceValue defaultFontData setRegistryValue defaultFontData updateFontControls
Hook all control listeners private void hook Listeners color Selector add Listener new I Property Change Listener non Javadoc see org eclipse jface util I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event Color Definition definition get Selected Color Definition RGB newRGB RGB event get New Value if definition null newRGB null newRGB equals event get Old Value set Color Preference Value definition newRGB set Registry Value definition newRGB update Color Controls definition tree get Viewer add Selection Changed Listener new I Selection Changed Listener non Javadoc see org eclipse jface viewers I Selection Changed Listener selection Changed org eclipse jface viewers Selection Changed Event public void selection Changed Selection Changed Event event if event get Selection is Empty swap No Controls update Color Controls null update Category Selection null else Object element I Structured Selection event get Selection get First Element if element instanceof Theme Element Category swap No Controls String description Theme Element Category element get Description description Text set Text description null description NON NLS 1 update Category Selection Theme Element Category element else if element instanceof Color Definition update Color Controls Color Definition element swap Color Controls update Category Selection Workbench Plugin get Default get Theme Registry find Category Color Definition element get Category Id else if element instanceof Font Definition update Font Controls Font Definition element swap Font Controls update Category Selection Workbench Plugin get Default get Theme Registry find Category Font Definition element get Category Id color Reset Button add Selection Listener new Selection Adapter non Javadoc see org eclipse swt events Selection Listener widget Selected org eclipse swt events Selection Event public void widget Selected Selection Event e Color Definition definition get Selected Color Definition if reset Color definition update Color Controls definition font Reset Button add Selection Listener new Selection Adapter non Javadoc see org eclipse swt events Selection Listener widget Selected org eclipse swt events Selection Event public void widget Selected Selection Event e Font Definition definition get Selected Font Definition if reset Font definition update Font Controls definition font Change Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event Font Definition definition get Selected Font Definition if definition null Font Dialog font Dialog new Font Dialog font Change Button get Shell Font Data current Data get Font Value definition font Dialog set Font List current Data if font Dialog open null set Font Preference Value definition font Dialog get Font List set Registry Value definition font Dialog get Font List update Font Controls definition font System Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event Font Definition definition get Selected Font Definition if definition null Font Data default Font Data J Face Resources get Default Font get Font Data set Font Preference Value definition default Font Data set Registry Value definition default Font Data update Font Controls definition  hookListeners colorSelector addListener IPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent ColorDefinition getSelectedColorDefinition getNewValue getOldValue setColorPreferenceValue setRegistryValue updateColorControls getViewer addSelectionChangedListener ISelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent selectionChanged SelectionChangedEvent getSelection isEmpty swapNoControls updateColorControls updateCategorySelection IStructuredSelection getSelection getFirstElement ThemeElementCategory swapNoControls ThemeElementCategory getDescription descriptionText setText updateCategorySelection ThemeElementCategory ColorDefinition updateColorControls ColorDefinition swapColorControls updateCategorySelection WorkbenchPlugin getDefault getThemeRegistry findCategory ColorDefinition getCategoryId FontDefinition updateFontControls FontDefinition swapFontControls updateCategorySelection WorkbenchPlugin getDefault getThemeRegistry findCategory FontDefinition getCategoryId colorResetButton addSelectionListener SelectionAdapter SelectionListener widgetSelected SelectionEvent widgetSelected SelectionEvent ColorDefinition getSelectedColorDefinition resetColor updateColorControls fontResetButton addSelectionListener SelectionAdapter SelectionListener widgetSelected SelectionEvent widgetSelected SelectionEvent FontDefinition getSelectedFontDefinition resetFont updateFontControls fontChangeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent FontDefinition getSelectedFontDefinition FontDialog fontDialog FontDialog fontChangeButton getShell FontData currentData getFontValue fontDialog setFontList currentData fontDialog setFontPreferenceValue fontDialog getFontList setRegistryValue fontDialog getFontList updateFontControls fontSystemButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent FontDefinition getSelectedFontDefinition FontData defaultFontData JFaceResources getDefaultFont getFontData setFontPreferenceValue defaultFontData setRegistryValue defaultFontData updateFontControls
public void property Change Property Change Event event if event get Property equals I Theme Manager CHANGE CURRENT THEME update Theme Info theme Manager refresh Category  propertyChange PropertyChangeEvent getProperty IThemeManager CHANGE_CURRENT_THEME updateThemeInfo themeManager refreshCategory
public void init I Workbench a Workbench this workbench Workbench a Workbench set Preference Store a Workbench get Preference Store final I Theme Manager theme Manager a Workbench get Theme Manager theme Change Listener new I Property Change Listener non Javadoc see org eclipse jface util I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event if event get Property equals I Theme Manager CHANGE CURRENT THEME update Theme Info theme Manager refresh Category theme Manager add Property Change Listener theme Change Listener update Theme Info theme Manager  IWorkbench aWorkbench aWorkbench setPreferenceStore aWorkbench getPreferenceStore IThemeManager themeManager aWorkbench getThemeManager themeChangeListener IPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent getProperty IThemeManager CHANGE_CURRENT_THEME updateThemeInfo themeManager refreshCategory themeManager addPropertyChangeListener themeChangeListener updateThemeInfo themeManager
private void update Theme Info I Theme Manager manager clear Previews category Map clear if label Provider null label Provider dispose nuke the old cache if color Registry null color Registry dispose if font Registry null font Registry dispose current Theme manager get Current Theme color Registry new Cascading Color Registry current Theme get Color Registry font Registry new Cascading Font Registry current Theme get Font Registry font Preferences To Set clear font Values To Set clear color Preferences To Set clear color Values To Set clear if label Provider null label Provider hook Listeners rehook the listeners  updateThemeInfo IThemeManager clearPreviews categoryMap labelProvider labelProvider colorRegistry colorRegistry fontRegistry fontRegistry currentTheme getCurrentTheme colorRegistry CascadingColorRegistry currentTheme getColorRegistry fontRegistry CascadingFontRegistry currentTheme getFontRegistry fontPreferencesToSet fontValuesToSet colorPreferencesToSet colorValuesToSet labelProvider labelProvider hookListeners
Answers whether the definition is currently set to the default value param definition the code Color Definition code to check return Return whether the definition is currently mapped to the default value either in the preference store or in the local change record of this preference page private boolean is Default Color Definition definition String id definition get Id if color Preferences To Set contains Key id if definition get Value null value based color if color Preferences To Set get id equals definition get Value return true else if color Preferences To Set get id equals get Color Ancestor Value definition return true else if definition get Value null value based color if get Preference Store is Default Theme Element Helper create Preference Key current Theme id return true else a descendant is default if it s the same value as its ancestor if get Color Value definition equals get Color Ancestor Value definition return true return false  ColorDefinition isDefault ColorDefinition getId colorPreferencesToSet containsKey getValue colorPreferencesToSet getValue colorPreferencesToSet getColorAncestorValue getValue getPreferenceStore isDefault ThemeElementHelper createPreferenceKey currentTheme getColorValue getColorAncestorValue
param definition return private boolean is Default Font Definition definition String id definition get Id if font Preferences To Set contains Key id if definition get Value null value based font if Arrays equals Font Data font Preferences To Set get id definition get Value return true else Font Data ancestor get Font Ancestor Value definition if Arrays equals Font Data font Preferences To Set get id ancestor return true else if definition get Value null value based font if get Preference Store is Default Theme Element Helper create Preference Key current Theme id return true else Font Data ancestor get Font Ancestor Value definition if ancestor null return true a descendant is default if it s the same value as its ancestor if Arrays equals get Font Value definition ancestor return true return false  isDefault FontDefinition getId fontPreferencesToSet containsKey getValue FontData fontPreferencesToSet getValue FontData getFontAncestorValue FontData fontPreferencesToSet getValue getPreferenceStore isDefault ThemeElementHelper createPreferenceKey currentTheme FontData getFontAncestorValue getFontValue
Apply the dialog font to the control and store it for later so that it can be used for a later update param control private void my Apply Dialog Font Control control control set Font J Face Resources get Dialog Font dialog Font Widgets add control  myApplyDialogFont setFont JFaceResources getDialogFont dialogFontWidgets
see org eclipse jface preference Preference Page perform Apply protected void perform Apply super perform Apply Apply the default font to the dialog Font old Font applied Dialog Font Font Definition font Definition theme Registry find Font J Face Resources DIALOG FONT if font Definition null return Font Data new Data get Font Value font Definition applied Dialog Font new Font get Control get Display new Data update For Dialog Font Change applied Dialog Font get Apply Button set Font applied Dialog Font get Defaults Button set Font applied Dialog Font if old Font null old Font dispose  PreferencePage performApply performApply performApply oldFont appliedDialogFont FontDefinition fontDefinition themeRegistry findFont JFaceResources DIALOG_FONT fontDefinition FontData newData getFontValue fontDefinition appliedDialogFont getControl getDisplay newData updateForDialogFontChange appliedDialogFont getApplyButton setFont appliedDialogFont getDefaultsButton setFont appliedDialogFont oldFont oldFont
private void perform Color Defaults Color Definition definitions theme Registry get Colors apply defaults in depth order Color Definition definitions Copy new Color Definition definitions length System arraycopy definitions 0 definitions Copy 0 definitions length Arrays sort definitions Copy new I Theme Registry Hierarchy Comparator definitions for int i 0 i definitions Copy length i reset Color definitions Copy i update Color Controls get Selected Color Definition  performColorDefaults ColorDefinition themeRegistry getColors ColorDefinition definitionsCopy ColorDefinition definitionsCopy definitionsCopy IThemeRegistry HierarchyComparator definitionsCopy resetColor definitionsCopy updateColorControls getSelectedColorDefinition
return private boolean perform Color Ok for Iterator i color Preferences To Set key Set iterator i has Next String id String i next String key Theme Element Helper create Preference Key current Theme id RGB rgb RGB color Preferences To Set get id String rgb String String Converter as String rgb String store String get Preference Store get String key if rgb String equals store String get Preference Store set Value key rgb String color Values To Set clear color Preferences To Set clear return true  performColorOk colorPreferencesToSet keySet hasNext ThemeElementHelper createPreferenceKey currentTheme colorPreferencesToSet rgbString StringConverter asString storeString getPreferenceStore getString rgbString storeString getPreferenceStore setValue rgbString colorValuesToSet colorPreferencesToSet
see org eclipse jface preference Preference Page perform Defaults protected void perform Defaults perform Color Defaults perform Font Defaults  PreferencePage performDefaults performDefaults performColorDefaults performFontDefaults
private void perform Font Defaults Font Definition definitions theme Registry get Fonts apply defaults in depth order Font Definition definitions Copy new Font Definition definitions length System arraycopy definitions 0 definitions Copy 0 definitions length Arrays sort definitions Copy new I Theme Registry Hierarchy Comparator definitions for int i 0 i definitions Copy length i reset Font definitions Copy i update Font Controls get Selected Font Definition  performFontDefaults FontDefinition themeRegistry getFonts FontDefinition definitionsCopy FontDefinition definitionsCopy definitionsCopy IThemeRegistry HierarchyComparator definitionsCopy resetFont definitionsCopy updateFontControls getSelectedFontDefinition
return private boolean perform Font Ok for Iterator i font Preferences To Set key Set iterator i has Next String id String i next String key Theme Element Helper create Preference Key current Theme id Font Data fd Font Data font Preferences To Set get id String fd String Preference Converter get Stored Representation fd String store String get Preference Store get String key if fd String equals store String get Preference Store set Value key fd String font Values To Set clear font Preferences To Set clear return true  performFontOk fontPreferencesToSet keySet hasNext ThemeElementHelper createPreferenceKey currentTheme FontData FontData fontPreferencesToSet fdString PreferenceConverter getStoredRepresentation storeString getPreferenceStore getString fdString storeString getPreferenceStore setValue fdString fontValuesToSet fontPreferencesToSet
see org eclipse jface preference I Preference Page perform Ok public boolean perform Ok return perform Color Ok perform Font Ok  IPreferencePage performOk performOk performColorOk performFontOk
Refreshes the category private void refresh Category update Color Controls null update Font Controls null  refreshCategory updateColorControls updateFontControls
Resets the supplied definition to its default value param definition the code Color Definition code to reset return whether any change was made private boolean reset Color Color Definition definition if is Default definition RGB newRGB if definition get Value null newRGB definition get Value else newRGB get Color Ancestor Value definition if newRGB null set Color Preference Value definition newRGB set Registry Value definition newRGB return true return false  ColorDefinition resetColor ColorDefinition isDefault getValue getValue getColorAncestorValue setColorPreferenceValue setRegistryValue
param definition return protected boolean reset Font Font Definition definition if is Default definition Font Data newFD if definition get Defaults To null newFD get Font Ancestor Value definition else newFD Preference Converter get Default Font Data Array get Preference Store Theme Element Helper create Preference Key current Theme definition get Id if newFD null set Font Preference Value definition newFD set Registry Value definition newFD return true return false  resetFont FontDefinition isDefault FontData getDefaultsTo getFontAncestorValue PreferenceConverter getDefaultFontDataArray getPreferenceStore ThemeElementHelper createPreferenceKey currentTheme getId setFontPreferenceValue setRegistryValue
Set the value in preferences for the given color param definition the code Color Definition code to set param newRGB the new code RGB code value for the definitions identifier protected void set Color Preference Value Color Definition definition RGB newRGB set Descendant Registry Values definition newRGB color Preferences To Set put definition get Id newRGB  ColorDefinition setColorPreferenceValue ColorDefinition setDescendantRegistryValues colorPreferencesToSet getId
Set the value in registry for the given colors children param definition the code Color Definition code whos children should be set param newRGB the new code RGB code value for the definitions identifier private void set Descendant Registry Values Color Definition definition RGB newRGB Color Definition children get Descendant Colors definition for int i 0 i children length i if is Default children i set Descendant Registry Values children i newRGB set Registry Value children i newRGB color Values To Set put children i get Id newRGB  ColorDefinition setDescendantRegistryValues ColorDefinition ColorDefinition getDescendantColors isDefault setDescendantRegistryValues setRegistryValue colorValuesToSet getId
param definition param datas private void set Descendant Registry Values Font Definition definition Font Data datas Font Definition children get Descendant Fonts definition for int i 0 i children length i if is Default children i set Descendant Registry Values children i datas set Registry Value children i datas font Values To Set put children i get Id datas  setDescendantRegistryValues FontDefinition FontData FontDefinition getDescendantFonts isDefault setDescendantRegistryValues setRegistryValue fontValuesToSet getId
param definition param datas protected void set Font Preference Value Font Definition definition Font Data datas set Descendant Registry Values definition datas font Preferences To Set put definition get Id datas  setFontPreferenceValue FontDefinition FontData setDescendantRegistryValues fontPreferencesToSet getId
Updates the working registry param definition param newRGB protected void set Registry Value Color Definition definition RGB newRGB color Registry put definition get Id newRGB  setRegistryValue ColorDefinition colorRegistry getId
param definition param datas protected void set Registry Value Font Definition definition Font Data datas font Registry put definition get Id datas  setRegistryValue FontDefinition FontData fontRegistry getId
Swap in the color selection controls protected void swap Color Controls control Area Layout top Control color Controls control Area layout  swapColorControls controlAreaLayout topControl colorControls controlArea
Swap in the font selection controls protected void swap Font Controls control Area Layout top Control font Controls control Area layout  swapFontControls controlAreaLayout topControl fontControls controlArea
Swap in no controls empty the control area protected void swap No Controls control Area Layout top Control null control Area layout  swapNoControls controlAreaLayout topControl controlArea
Set the color list param category the category to use private void update Category Selection Theme Element Category category largest Font Width 0 Composite preview Control Composite preview Map get category if preview Control null if category null try I Theme Preview preview get Theme Preview category if preview null preview Control new Composite preview Composite SWT NONE preview Control set Layout new Fill Layout I Theme theme get Cascading Theme preview create Control preview Control theme preview Set add preview catch Core Exception e preview Control new Composite preview Composite SWT NONE preview Control set Layout new Fill Layout my Apply Dialog Font preview Control Text error new Text preview Control SWT WRAP SWT READ ONLY error set Text RESOURCE BUNDLE get String error Creating Preview NON NLS 1 Workbench Plugin log RESOURCE BUNDLE get String error Create Preview Log Status Util new Status I Status ERROR e get Message e NON NLS 1 if preview Control null preview Control get Default Preview Control preview Map put category preview Control stack Layout top Control preview Control preview Composite layout  updateCategorySelection ThemeElementCategory largestFontWidth previewControl previewMap previewControl IThemePreview getThemePreview previewControl previewComposite previewControl setLayout FillLayout ITheme getCascadingTheme createControl previewControl previewSet CoreException previewControl previewComposite previewControl setLayout FillLayout myApplyDialogFont previewControl previewControl READ_ONLY setText RESOURCE_BUNDLE getString errorCreatingPreview WorkbenchPlugin RESOURCE_BUNDLE getString errorCreatePreviewLog StatusUtil newStatus IStatus getMessage previewControl previewControl getDefaultPreviewControl previewMap previewControl stackLayout topControl previewControl previewComposite
param category the category return the preview for the category or its ancestors preview if it does not have one private I Theme Preview get Theme Preview Theme Element Category category throws Core Exception I Theme Preview preview category create Preview if preview null return preview if category get Parent Id null int idx Arrays binary Search theme Registry get Categories category get Parent Id I Theme Registry ID COMPARATOR if idx 0 return get Theme Preview theme Registry get Categories idx return null  IThemePreview getThemePreview ThemeElementCategory CoreException IThemePreview createPreview getParentId binarySearch themeRegistry getCategories getParentId IThemeRegistry ID_COMPARATOR getThemePreview themeRegistry getCategories
return private I Theme get Cascading Theme if cascading Theme null cascading Theme new Cascading Theme current Theme color Registry font Registry return cascading Theme  ITheme getCascadingTheme cascadingTheme cascadingTheme CascadingTheme currentTheme colorRegistry fontRegistry cascadingTheme
Update the color controls based on the supplied definition param definition The currently selected code Color Definition code protected void update Color Controls Color Definition definition if definition null color Reset Button set Enabled false color Selector set Enabled false description Text set Text NON NLS 1 return color Selector set Color Value get Color Value definition color Reset Button set Enabled is Default definition color Selector set Enabled true String description definition get Description description Text set Text description null description NON NLS 1  ColorDefinition updateColorControls ColorDefinition colorResetButton setEnabled colorSelector setEnabled descriptionText setText colorSelector setColorValue getColorValue colorResetButton setEnabled isDefault colorSelector setEnabled getDescription descriptionText setText
protected void update Font Controls Font Definition definition if definition null font System Button set Enabled false font Reset Button set Enabled false font Change Button set Enabled false description Text set Text NON NLS 1 return font System Button set Enabled true font Reset Button set Enabled is Default definition font Change Button set Enabled true String description definition get Description description Text set Text description null description NON NLS 1  updateFontControls FontDefinition fontSystemButton setEnabled fontResetButton setEnabled fontChangeButton setEnabled descriptionText setText fontSystemButton setEnabled fontResetButton setEnabled isDefault fontChangeButton setEnabled getDescription descriptionText setText
Update for a change in the dialog font param new Font private void update For Dialog Font Change Font new Font Iterator iterator dialog Font Widgets iterator while iterator has Next Control iterator next set Font new Font recalculate the fonts for the tree label Provider clear Font Cache  newFont updateForDialogFontChange newFont dialogFontWidgets hasNext setFont newFont labelProvider clearFontCache

param value the SWT constant code String code return the value of the SWT constant or code SWT COLOR BLACK code if it could not be determined private static RGB process String value try Class clazz SWT class NON NLS 1 Field fields clazz get Declared Fields for int i 0 i fields length i Field field fields i if field get Type Integer TYPE Modifier is Static field get Modifiers Modifier is Public field get Modifiers Modifier is Final field get Modifiers if value equals field get Name return get System Color field get Int null catch Illegal Argument Exception e no op shouldnt happen We check for static before calling get Int null catch Illegal Access Exception e no op shouldnt happen We check for public before calling get Int null return get System Color SWT COLOR BLACK  COLOR_BLACK getDeclaredFields getType isStatic getModifiers isPublic getModifiers isFinal getModifiers getName getSystemColor getInt IllegalArgumentException getInt IllegalAccessException getInt getSystemColor COLOR_BLACK
Blend the two color values returning a value that is halfway between them param val1 the first value param val2 the second value return the blended color public static RGB blend RGB val1 RGB val2 int red blend val1 red val2 red int green blend val1 green val2 green int blue blend val1 blue val2 blue return new RGB red green blue 
Blend the two color values returning a value that is halfway between them param temp1 the first value param temp2 the second value return the blended int value private static int blend int temp1 int temp2 return Math abs temp1 temp2 2 Math min temp1 temp2 
param color Id the system color identifier return the RGB value of the supplied system color private static RGB get System Color int color Id return Display get Current get System Color color Id getRGB  colorId getSystemColor colorId getCurrent getSystemColor colorId
Get the RGB value for a given color param raw Value the raw value either an RGB triple or an SWT constant return Returns the RGB value public static RGB get Color Value String raw Value if raw Value null return null raw Value raw Value trim if is Direct Value raw Value return process raw Value return String Converter asRGB raw Value  rawValue getColorValue rawValue rawValue rawValue rawValue isDirectValue rawValue rawValue StringConverter rawValue
Get the RGB values for a given color array param raw Values the raw values either RGB triple or an SWT constant return Returns the RGB values public static RGB get Color Values String raw Values RGB values new RGB raw Values length for int i 0 i raw Values length i values i get Color Value raw Values i return values  rawValues getColorValues rawValues rawValues rawValues getColorValue rawValues
return whether the value returned by code get Value code is already in RGB form private static boolean is Direct Value String raw Value return raw Value null true raw Value matches d 1 3 d 1 3 d 1 3 NON NLS 1  getValue isDirectValue rawValue rawValue rawValue
Not intended to be instantiated private Color Utils no op  ColorUtils

Create a new instance of the receiver param font Name The name display ed in the preference page param unique Id The id used to refer to this definition param defaults Id The id of the font this defaults to param font Description The description of the font in the preference page public Font Definition String font Name String unique Id String defaults Id String value String category Id boolean is Editable String font Description this label font Name this id unique Id this defaults To defaults Id this value value this category Id category Id this description font Description this is Editable is Editable  fontName uniqueId defaultsId fontDescription FontDefinition fontName uniqueId defaultsId categoryId isEditable fontDescription fontName uniqueId defaultsTo defaultsId categoryId categoryId fontDescription isEditable isEditable
Create a new instance of the receiver param original Font the original definition This will be used to populate all fields except defaults To and value defaults To will always be code null code param datas the Font Data value public Font Definition Font Definition original Font Font Data datas this label original Font get Label this id original Font get Id this category Id original Font get Category Id this description original Font get Description this is Editable original Font is Editable this parsed Value datas  originalFont defaultsTo defaultsTo FontData FontDefinition FontDefinition originalFont FontData originalFont getLabel originalFont getId categoryId originalFont getCategoryId originalFont getDescription isEditable originalFont isEditable parsedValue
Returns the defaults To This is the id of the text font that this font defualts to return String or pre null pre public String get Defaults To return defaults To  defaultsTo getDefaultsTo defaultsTo
Returns the description return String or pre null pre public String get Description return description  getDescription
Returns the label return String public String get Label return label  getLabel
Returns the id return String public String get Id return id  getId
Returns the category Id return String public String get Category Id return category Id  categoryId getCategoryId categoryId
Returns the value return Font Data public Font Data get Value if value null return null if parsed Value null parsed Value J Face Resources get Font Registry best Data Array String Converter as Font Data Array value Workbench get Instance get Display return parsed Value  FontData FontData getValue parsedValue parsedValue JFaceResources getFontRegistry bestDataArray StringConverter asFontDataArray getInstance getDisplay parsedValue
see org eclipse ui internal themes I Editable is Editable public boolean is Editable return is Editable  IEditable isEditable isEditable isEditable

Returns the category of this element return the category of this element or code null code if it does not belong to one 

Returns whether this object is editable return whether this object is editable 

Return the id of the element this element defaults to return the id of the element this element defaults to or code null code if it does not default to another element 

Returns the color overrides for this theme return Color Definition  ColorDefinition
Returns the font overrides for this theme return Gradient Definition  GradientDefinition
Returns the data map for this theme return the data map This will be read only 

Returns the label for this element return the label for this element 
Returns the id for this element return the id for this element This should never be code null code 
Returns the description for this element return the description for this element This may be code null code 

Create a new comparator param definitions the elements to be sorted by depth in ID order public Hierarchy Comparator I Hierarchal Theme Element Definition definitions this definitions definitions  HierarchyComparator IHierarchalThemeElementDefinition
public int compare Object arg0 Object arg1 String def0 arg0 null null I Hierarchal Theme Element Definition arg0 get Defaults To String def1 arg1 null null I Hierarchal Theme Element Definition arg1 get Defaults To if def0 null def1 null return 0 if def0 null return 1 if def1 null return 1 return compare get Defaults To def0 get Defaults To def1  IHierarchalThemeElementDefinition getDefaultsTo IHierarchalThemeElementDefinition getDefaultsTo getDefaultsTo getDefaultsTo
param id the identifier to search for return the code I Hierarchal Theme Element Definition code that matches the id private I Hierarchal Theme Element Definition get Defaults To String id int idx Arrays binary Search definitions id ID COMPARATOR if idx 0 return definitions idx return null  IHierarchalThemeElementDefinition IHierarchalThemeElementDefinition getDefaultsTo binarySearch ID_COMPARATOR
public int compare Object arg0 Object arg1 String str0 get Compare String arg0 String str1 get Compare String arg1 return str0 compare To str1  getCompareString getCompareString compareTo
param object return code String code representation of the object private String get Compare String Object object if object instanceof String return String object else if object instanceof I Theme Element Definition return I Theme Element Definition object get Id return NON NLS 1  getCompareString IThemeElementDefinition IThemeElementDefinition getId
Returns the category matching the provided id param id the id to search for return the element matching the provided id or code null code if not found 
Returns the color matching the provided id param id the id to search for return the element matching the provided id or code null code if not found 
Returns the font matching the provided id param id the id to search for return the element matching the provided id or code null code if not found 
Returns the theme matching the provided id param id the id to search for return the element matching the provided id or code null code if not found 
Returns a list of categories defined in the registry return the categories in this registry 
Returns a list of colors defined in the registry return the colors in this registry 
Returns a list of colors defined for the given theme This is the set of base colours overlayed with any theme specific overrides param theme Id the theme id return the colors in this theme  themeId
Returns a list of fonts defined for the given theme This is the set of base fonts overlayed with any theme specific overrides param theme Id the theme id return the fonts in this theme  themeId
Returns a list of fonts defined in the registry return the fonts in this registry 
Returns a list of themes defined in the registry return the themes in this registry 
Return the data map return the data map 
Return the set of category presentation bindings param category the category to test return the set of bindings or code null code if this category has no bindings 

Returns the intensity of an RGB component using the sRGB gamma function param val Value to convert return Light intensity of the component double voltage to intensity srgb double val Handle invalid values before doing a gamma transform if val 0 0 return 0 0 if val 1 0 return 1 0 if val 0 04045 return val 12 92 return Math pow val 0 055 1 055 2 4  voltage_to_intensity_srgb
Returns a measure of the lightness in the perceptual colourspace IPT param color The colour in sRGB return Lightness in IPT space double lightness RGB color double r voltage to intensity srgb color red 255 0 double g voltage to intensity srgb color green 255 0 double b voltage to intensity srgb color blue 255 0 double l 0 3139 r 0 6395 g 0 0466 b double m 0 1516 r 0 7482 g 0 1000 b double s 0 0177 r 0 1095 g 0 8729 b double lp mp sp if l 0 0 lp Math pow l 0 43 else lp Math pow l 0 43 if m 0 0 mp Math pow m 0 43 else mp Math pow m 0 43 if s 0 0 sp Math pow s 0 43 else sp Math pow s 0 43 return 0 4000 lp 0 4000 mp 0 2000 sp  voltage_to_intensity_srgb voltage_to_intensity_srgb voltage_to_intensity_srgb
public RGB create Color Determine which pair has a higher contrast by selecting the colour with the furthest distance in lightness RGB cfg cbg1 cbg2 if fg null cfg Color Utils get Color Value fg else cfg new RGB 255 255 255 if bg1 null cbg1 Color Utils get Color Value bg1 else cbg1 new RGB 0 0 0 if bg2 null cbg2 Color Utils get Color Value bg2 else cbg2 new RGB 0 0 0 double lfg lightness cfg double lbg1 lightness cbg1 double lbg2 lightness cbg2 if Math abs lbg1 lfg Math abs lbg2 lfg return cbg1 else return cbg2  createColor ColorUtils getColorValue ColorUtils getColorValue ColorUtils getColorValue
This executable extension requires parameters to be explicitly declared via the second method described in the code I Executable Extension code documentation This class expects that there will be three parameters code foreground code code background1 code and code background2 code that describe the two colors to be blended These values may either be RGB triples or SWT constants see org eclipse core runtime I Executable Extension set Initialization Data org eclipse core runtime I Configuration Element java lang String java lang Object public void set Initialization Data I Configuration Element config String property Name Object data throws Core Exception if data instanceof Hashtable Hashtable table Hashtable data fg String table get foreground NON NLS 1 bg1 String table get background1 NON NLS 1 bg2 String table get background2 NON NLS 1  IExecutableExtension IExecutableExtension setInitializationData IConfigurationElement setInitializationData IConfigurationElement propertyName CoreException

param descriptor public Theme I Theme Descriptor descriptor theme Registry Theme Registry Workbench Plugin get Default get Theme Registry this descriptor descriptor I Workbench workbench PlatformUI get Workbench if descriptor null Color Definition definitions this descriptor get Colors I Theme theme workbench get Theme Manager get Theme I Theme Manager DEFAULT THEME if definitions length 0 theme Color Registry new Cascading Color Registry theme get Color Registry Theme Element Helper populate Registry this definitions workbench get Preference Store Font Definition font Definitions this descriptor get Fonts if font Definitions length 0 theme Font Registry new Cascading Font Registry theme get Font Registry Theme Element Helper populate Registry this font Definitions workbench get Preference Store data Map new Cascading Map Theme Registry Workbench Plugin get Default get Theme Registry get Data descriptor get Data get Color Registry add Listener get Cascade Listener get Font Registry add Listener get Cascade Listener workbench get Preference Store add Property Change Listener get Property Listener  IThemeDescriptor themeRegistry ThemeRegistry WorkbenchPlugin getDefault getThemeRegistry IWorkbench getWorkbench ColorDefinition getColors ITheme getThemeManager getTheme IThemeManager DEFAULT_THEME themeColorRegistry CascadingColorRegistry getColorRegistry ThemeElementHelper populateRegistry getPreferenceStore FontDefinition fontDefinitions getFonts fontDefinitions themeFontRegistry CascadingFontRegistry getFontRegistry ThemeElementHelper populateRegistry fontDefinitions getPreferenceStore dataMap CascadingMap ThemeRegistry WorkbenchPlugin getDefault getThemeRegistry getData getData getColorRegistry addListener getCascadeListener getFontRegistry addListener getCascadeListener getPreferenceStore addPropertyChangeListener getPropertyListener
public void property Change Property Change Event event String split Theme Element Helper split Property Name Theme this event get Property String key split 1 String theme split 0 if key equals I Preference Constants CURRENT THEME ID return try if theme Color Registry null we re using cascading registries if Cascading Color Registry get Color Registry has Override For key theme null theme equals get Id RGB rgb String Converter asRGB String event get New Value get Color Registry put key rgb process Defaults To key rgb return else if get Color Registry has Value For key theme null RGB rgb String Converter asRGB String event get New Value get Color Registry put key rgb process Defaults To key rgb return if theme Font Registry null if Cascading Font Registry get Font Registry has Override For key theme null theme equals get Id Font Data data Preference Converter basic Get Font Data String event get New Value get Font Registry put key data process Defaults To key data return else if get Font Registry has Value For key theme null Font Data data Preference Converter basic Get Font Data String event get New Value get Font Registry put key data process Defaults To key data return catch Data Format Exception e no op  propertyChange PropertyChangeEvent ThemeElementHelper splitPropertyName getProperty IPreferenceConstants CURRENT_THEME_ID themeColorRegistry CascadingColorRegistry getColorRegistry hasOverrideFor getId StringConverter getNewValue getColorRegistry processDefaultsTo getColorRegistry hasValueFor StringConverter getNewValue getColorRegistry processDefaultsTo themeFontRegistry CascadingFontRegistry getFontRegistry hasOverrideFor getId FontData PreferenceConverter basicGetFontData getNewValue getFontRegistry processDefaultsTo getFontRegistry hasValueFor FontData PreferenceConverter basicGetFontData getNewValue getFontRegistry processDefaultsTo DataFormatException
Process all fonts that default to the given ID param key the font ID param fd the new Font Data for defaulted fonts private void process Defaults To String key Font Data fd Font Definition defs Workbench Plugin get Default get Theme Registry get Fonts For get Id for int i 0 i defs length i String defaults To defs i get Defaults To if defaults To null defaults To equals key I Preference Store store Workbench Plugin get Default get Preference Store if store is Default Theme Element Helper create Preference Key Theme this defs i get Id get Font Registry put defs i get Id fd process Defaults To defs i get Id fd  FontData processDefaultsTo FontData FontDefinition WorkbenchPlugin getDefault getThemeRegistry getFontsFor getId defaultsTo getDefaultsTo defaultsTo defaultsTo IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore isDefault ThemeElementHelper createPreferenceKey getId getFontRegistry getId processDefaultsTo getId
Process all colors that default to the given ID param key the color ID param rgb the new RGB value for defaulted colors private void process Defaults To String key RGB rgb Color Definition defs Workbench Plugin get Default get Theme Registry get Colors For get Id for int i 0 i defs length i String defaults To defs i get Defaults To if defaults To null defaults To equals key I Preference Store store Workbench Plugin get Default get Preference Store if store is Default Theme Element Helper create Preference Key Theme this defs i get Id get Color Registry put defs i get Id rgb process Defaults To defs i get Id rgb  processDefaultsTo ColorDefinition WorkbenchPlugin getDefault getThemeRegistry getColorsFor getId defaultsTo getDefaultsTo defaultsTo defaultsTo IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore isDefault ThemeElementHelper createPreferenceKey getId getColorRegistry getId processDefaultsTo getId
Listener that is responsible for responding to preference changes return private I Property Change Listener get Property Listener if property Listener null property Listener new I Property Change Listener non Javadoc see org eclipse jface util I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event String split Theme Element Helper split Property Name Theme this event get Property String key split 1 String theme split 0 if key equals I Preference Constants CURRENT THEME ID return try if theme Color Registry null we re using cascading registries if Cascading Color Registry get Color Registry has Override For key theme null theme equals get Id RGB rgb String Converter asRGB String event get New Value get Color Registry put key rgb process Defaults To key rgb return else if get Color Registry has Value For key theme null RGB rgb String Converter asRGB String event get New Value get Color Registry put key rgb process Defaults To key rgb return if theme Font Registry null if Cascading Font Registry get Font Registry has Override For key theme null theme equals get Id Font Data data Preference Converter basic Get Font Data String event get New Value get Font Registry put key data process Defaults To key data return else if get Font Registry has Value For key theme null Font Data data Preference Converter basic Get Font Data String event get New Value get Font Registry put key data process Defaults To key data return catch Data Format Exception e no op Process all fonts that default to the given ID param key the font ID param fd the new Font Data for defaulted fonts private void process Defaults To String key Font Data fd Font Definition defs Workbench Plugin get Default get Theme Registry get Fonts For get Id for int i 0 i defs length i String defaults To defs i get Defaults To if defaults To null defaults To equals key I Preference Store store Workbench Plugin get Default get Preference Store if store is Default Theme Element Helper create Preference Key Theme this defs i get Id get Font Registry put defs i get Id fd process Defaults To defs i get Id fd Process all colors that default to the given ID param key the color ID param rgb the new RGB value for defaulted colors private void process Defaults To String key RGB rgb Color Definition defs Workbench Plugin get Default get Theme Registry get Colors For get Id for int i 0 i defs length i String defaults To defs i get Defaults To if defaults To null defaults To equals key I Preference Store store Workbench Plugin get Default get Preference Store if store is Default Theme Element Helper create Preference Key Theme this defs i get Id get Color Registry put defs i get Id rgb process Defaults To defs i get Id rgb return property Listener  IPropertyChangeListener getPropertyListener propertyListener propertyListener IPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent ThemeElementHelper splitPropertyName getProperty IPreferenceConstants CURRENT_THEME_ID themeColorRegistry CascadingColorRegistry getColorRegistry hasOverrideFor getId StringConverter getNewValue getColorRegistry processDefaultsTo getColorRegistry hasValueFor StringConverter getNewValue getColorRegistry processDefaultsTo themeFontRegistry CascadingFontRegistry getFontRegistry hasOverrideFor getId FontData PreferenceConverter basicGetFontData getNewValue getFontRegistry processDefaultsTo getFontRegistry hasValueFor FontData PreferenceConverter basicGetFontData getNewValue getFontRegistry processDefaultsTo DataFormatException FontData processDefaultsTo FontData FontDefinition WorkbenchPlugin getDefault getThemeRegistry getFontsFor getId defaultsTo getDefaultsTo defaultsTo defaultsTo IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore isDefault ThemeElementHelper createPreferenceKey getId getFontRegistry getId processDefaultsTo getId processDefaultsTo ColorDefinition WorkbenchPlugin getDefault getThemeRegistry getColorsFor getId defaultsTo getDefaultsTo defaultsTo defaultsTo IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore isDefault ThemeElementHelper createPreferenceKey getId getColorRegistry getId processDefaultsTo getId propertyListener
see org eclipse jface util I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event fire Property Change event  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent firePropertyChange
Listener that is responsible for rebroadcasting events fired from the base font color registry private I Property Change Listener get Cascade Listener if theme Listener null theme Listener new I Property Change Listener non Javadoc see org eclipse jface util I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event fire Property Change event return theme Listener  IPropertyChangeListener getCascadeListener themeListener themeListener IPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent firePropertyChange themeListener
public Color Registry get Color Registry if theme Color Registry null return theme Color Registry else return Workbench Theme Manager get Instance get Default Theme Color Registry  ColorRegistry getColorRegistry themeColorRegistry themeColorRegistry WorkbenchThemeManager getInstance getDefaultThemeColorRegistry
public Font Registry get Font Registry if theme Font Registry null return theme Font Registry else return Workbench Theme Manager get Instance get Default Theme Font Registry  FontRegistry getFontRegistry themeFontRegistry themeFontRegistry WorkbenchThemeManager getInstance getDefaultThemeFontRegistry
public void dispose if theme Color Registry null theme Color Registry remove Listener theme Listener theme Color Registry dispose if theme Font Registry null theme Font Registry remove Listener theme Listener theme Font Registry dispose PlatformUI get Workbench get Preference Store remove Property Change Listener get Property Listener  themeColorRegistry themeColorRegistry removeListener themeListener themeColorRegistry themeFontRegistry themeFontRegistry removeListener themeListener themeFontRegistry getWorkbench getPreferenceStore removePropertyChangeListener getPropertyListener
see org eclipse ui internal themes I Theme get Id public String get Id return descriptor null I Theme Manager DEFAULT THEME descriptor get Id  ITheme getId getId IThemeManager DEFAULT_THEME getId
see org eclipse ui I Workbench add Property Change Listener org eclipse jface util I Property Change Listener public void add Property Change Listener I Property Change Listener listener property Change Listeners add listener  IWorkbench addPropertyChangeListener IPropertyChangeListener addPropertyChangeListener IPropertyChangeListener propertyChangeListeners
see org eclipse ui I Workbench remove Property Change Listener org eclipse jface util I Property Change Listener public void remove Property Change Listener I Property Change Listener listener property Change Listeners remove listener  IWorkbench removePropertyChangeListener IPropertyChangeListener removePropertyChangeListener IPropertyChangeListener propertyChangeListeners
private void fire Property Change Property Change Event event Object listeners property Change Listeners get Listeners for int i 0 i listeners length i I Property Change Listener listeners i property Change event  firePropertyChange PropertyChangeEvent propertyChangeListeners getListeners IPropertyChangeListener propertyChange
see org eclipse ui internal themes I Theme get Label public String get Label return descriptor null RESOURCE BUNDLE get String Default Theme label descriptor get Label NON NLS 1  ITheme getLabel getLabel RESOURCE_BUNDLE getString DefaultTheme getLabel
public String get String String key if data Map null return String data Map get key return String theme Registry get Data get key  getString dataMap dataMap themeRegistry getData
public Set key Set if data Map null return data Map key Set return theme Registry get Data key Set  keySet dataMap dataMap keySet themeRegistry getData keySet
public int get Int String key String string get String key if string null return 0 try return Integer parse Int string catch Number Format Exception e return 0  getInt getString parseInt NumberFormatException
public boolean get Boolean String key String string get String key if string null return false return Boolean value Of get String key boolean Value  getBoolean getString valueOf getString booleanValue

Create a new Theme Descriptor for an extension public Theme Descriptor I Configuration Element e throws Core Exception config Element e process Extension  ThemeDescriptor ThemeDescriptor IConfigurationElement CoreException configElement processExtension
Add a color override to this descriptor param definition the definition to add void add Color Definition definition colors add definition  ColorDefinition
Add a font override to this descriptor param definition the definition to add void add Font Definition definition fonts add definition  FontDefinition
Add a data object to this descriptor param key the key param data the data void set Data String key Object data data Map put key data  setData dataMap
public Color Definition get Colors Color Definition defs Color Definition colors to Array new Color Definition colors size Arrays sort defs I Theme Registry ID COMPARATOR return defs  ColorDefinition getColors ColorDefinition ColorDefinition toArray ColorDefinition IThemeRegistry ID_COMPARATOR
see org eclipse ui internal themes I Theme Element Definition get Description public String get Description return description  IThemeElementDefinition getDescription getDescription
public Font Definition get Fonts Font Definition defs Font Definition fonts to Array new Font Definition fonts size Arrays sort defs I Theme Registry ID COMPARATOR return defs  FontDefinition getFonts FontDefinition FontDefinition toArray FontDefinition IThemeRegistry ID_COMPARATOR
see org eclipse ui internal registry I Theme Descriptor getID public String get Id return id  IThemeDescriptor getId
see org eclipse ui internal registry I Theme Descriptor get Name public String get Label return name  IThemeDescriptor getName getLabel
load a theme descriptor from the registry private void process Extension throws Core Exception id config Element get Attribute ATT ID name config Element get Attribute ATT NAME  processExtension CoreException configElement getAttribute ATT_ID configElement getAttribute ATT_NAME
Set the description param description the description void set Description String description this description description  setDescription
see org eclipse ui internal themes I Theme Descriptor get Data public Map get Data return Collections unmodifiable Map data Map  IThemeDescriptor getData getData unmodifiableMap dataMap

param label param id param description param plugin Id param element public Theme Element Category String label String id String parent Id String description String plugin Id I Configuration Element element this label label this id id this parent Id parent Id this description description this plugin Id plugin Id this element element  pluginId ThemeElementCategory parentId pluginId IConfigurationElement parentId parentId pluginId pluginId
return Returns the code I Color Example code for this category If one is not available code null code is returned throws Core Exception thrown if there is a problem instantiating the preview public I Theme Preview create Preview throws Core Exception String class String element get Attribute class NON NLS 1 if class String null equals class String NON NLS 1 return null return I Theme Preview Workbench Plugin create Extension element Theme Registry Reader ATT CLASS  IColorExample CoreException IThemePreview createPreview CoreException classString getAttribute classString classString IThemePreview WorkbenchPlugin createExtension ThemeRegistryReader ATT_CLASS
return Returns the description public String get Description return description  getDescription
return Returns the element public I Configuration Element get Element return element  IConfigurationElement getElement
see org eclipse ui internal themes I Theme Element Definition get Id public String get Id return id  IThemeElementDefinition getId getId
see org eclipse ui internal themes I Theme Element Definition get Label public String get Label return label  IThemeElementDefinition getLabel getLabel
see org eclipse ui I Plugin Contribution get Local Id public String get Local Id return id  IPluginContribution getLocalId getLocalId
see org eclipse ui I Plugin Contribution get Plugin Id public String get Plugin Id return plugin Id  IPluginContribution getPluginId getPluginId pluginId
return Returns the parent Id May be code null code public String get Parent Id return parent Id  parentId getParentId parentId

public static void populate Registry I Theme theme Font Definition definitions I Preference Store store sort the definitions by dependant ordering so that we process ancestors before children Font Definition copy Of Definitions null if theme get Id equals I Theme Manager DEFAULT THEME definitions add Defaulted definitions copy Of Definitions new Font Definition definitions length System arraycopy definitions 0 copy Of Definitions 0 definitions length Arrays sort copy Of Definitions new I Theme Registry Hierarchy Comparator definitions for int i 0 i copy Of Definitions length i Font Definition definition copy Of Definitions i install Font definition theme store  populateRegistry ITheme FontDefinition IPreferenceStore FontDefinition copyOfDefinitions getId IThemeManager DEFAULT_THEME addDefaulted copyOfDefinitions FontDefinition copyOfDefinitions copyOfDefinitions IThemeRegistry HierarchyComparator copyOfDefinitions FontDefinition copyOfDefinitions installFont
param definitions return private static Font Definition add Defaulted Font Definition definitions I Theme Registry registry Workbench Plugin get Default get Theme Registry Font Definition all Defs registry get Fonts Sorted Set set add Defaulted definitions all Defs return Font Definition set to Array new Font Definition set size  FontDefinition addDefaulted FontDefinition IThemeRegistry WorkbenchPlugin getDefault getThemeRegistry FontDefinition allDefs getFonts SortedSet addDefaulted allDefs FontDefinition toArray FontDefinition
param definition param registry param store private static void install Font Font Definition definition I Theme theme I Preference Store store Font Registry registry theme get Font Registry String id definition get Id String key create Preference Key theme id Font Data pref Font store null Preference Converter get Font Data Array store key null Font Data default Font null if definition get Value null default Font definition get Value else if definition get Defaults To null default Font registry best Data Array registry get Font Data definition get Defaults To Workbench get Instance get Display else values pushed in from jface property files Very ugly default Font registry best Data Array registry get Font Data key Workbench get Instance get Display if pref Font null pref Font Preference Converter FONTDATA ARRAY DEFAULT DEFAULT pref Font default Font if default Font null store null Preference Converter set Default store key default Font if pref Font null registry put id pref Font  installFont FontDefinition ITheme IPreferenceStore FontRegistry getFontRegistry getId createPreferenceKey FontData prefFont PreferenceConverter getFontDataArray FontData defaultFont getValue defaultFont getValue getDefaultsTo defaultFont bestDataArray getFontData getDefaultsTo getInstance getDisplay defaultFont bestDataArray getFontData getInstance getDisplay prefFont prefFont PreferenceConverter FONTDATA_ARRAY_DEFAULT_DEFAULT prefFont defaultFont defaultFont PreferenceConverter setDefault defaultFont prefFont prefFont
public static void populate Registry I Theme theme Color Definition definitions I Preference Store store sort the definitions by dependant ordering so that we process ancestors before children Color Definition copy Of Definitions null if theme get Id equals I Theme Manager DEFAULT THEME definitions add Defaulted definitions copy Of Definitions new Color Definition definitions length System arraycopy definitions 0 copy Of Definitions 0 definitions length Arrays sort copy Of Definitions new I Theme Registry Hierarchy Comparator definitions for int i 0 i copy Of Definitions length i Color Definition definition copy Of Definitions i install Color definition theme store  populateRegistry ITheme ColorDefinition IPreferenceStore ColorDefinition copyOfDefinitions getId IThemeManager DEFAULT_THEME addDefaulted copyOfDefinitions ColorDefinition copyOfDefinitions copyOfDefinitions IThemeRegistry HierarchyComparator copyOfDefinitions ColorDefinition copyOfDefinitions installColor
param definitions return private static Color Definition add Defaulted Color Definition definitions I Theme Registry registry Workbench Plugin get Default get Theme Registry Color Definition all Defs registry get Colors Sorted Set set add Defaulted definitions all Defs return Color Definition set to Array new Color Definition set size  ColorDefinition addDefaulted ColorDefinition IThemeRegistry WorkbenchPlugin getDefault getThemeRegistry ColorDefinition allDefs getColors SortedSet addDefaulted allDefs ColorDefinition toArray ColorDefinition
param definitions param all Defs return private static Sorted Set add Defaulted I Hierarchal Theme Element Definition definitions I Hierarchal Theme Element Definition all Defs Sorted Set set new Tree Set I Theme Registry ID COMPARATOR set add All Arrays as List definitions Arrays sort all Defs new I Theme Registry Hierarchy Comparator all Defs for int i 0 i all Defs length i I Hierarchal Theme Element Definition def all Defs i if def get Defaults To null if set contains def get Defaults To set add def return set  allDefs SortedSet addDefaulted IHierarchalThemeElementDefinition IHierarchalThemeElementDefinition allDefs SortedSet TreeSet IThemeRegistry ID_COMPARATOR addAll asList allDefs IThemeRegistry HierarchyComparator allDefs allDefs IHierarchalThemeElementDefinition allDefs getDefaultsTo getDefaultsTo
Installs the given color in the color registry param definition the color definition param registry the color registry param store the preference store from which to set and obtain color data private static void install Color Color Definition definition I Theme theme I Preference Store store Color Registry registry theme get Color Registry String id definition get Id String key create Preference Key theme id RGB pref Color store null Preference Converter get Color store key null RGB default Color null if definition get Value null default Color definition get Value else default Color registry getRGB definition get Defaults To if pref Color null pref Color Preference Converter COLOR DEFAULT DEFAULT pref Color default Color if default Color null store null Preference Converter set Default store key default Color if pref Color null registry put id pref Color  installColor ColorDefinition ITheme IPreferenceStore ColorRegistry getColorRegistry getId createPreferenceKey prefColor PreferenceConverter getColor defaultColor getValue defaultColor getValue defaultColor getDefaultsTo prefColor prefColor PreferenceConverter COLOR_DEFAULT_DEFAULT prefColor defaultColor defaultColor PreferenceConverter setDefault defaultColor prefColor prefColor
param theme param id return public static String create Preference Key I Theme theme String id String theme Id theme get Id if theme Id equals I Theme Manager DEFAULT THEME return id return theme Id id  createPreferenceKey ITheme themeId getId themeId IThemeManager DEFAULT_THEME themeId
param theme param property return public static String split Property Name Theme theme String property String theme Id theme get Id if theme Id equals I Theme Manager DEFAULT THEME return new String null property if property starts With theme Id return new String property substring 0 theme Id length property substring theme Id length 1 return new String null property  splitPropertyName themeId getId themeId IThemeManager DEFAULT_THEME startsWith themeId themeId themeId
Not intended to be instantiated private Theme Element Helper no op  ThemeElementHelper

Create a new Theme Registry public Theme Registry themes new Array List colors new Array List fonts new Array List categories new Array List data Map new Hash Map category Binding Map new Hash Map  ThemeRegistry ThemeRegistry ArrayList ArrayList ArrayList ArrayList dataMap HashMap categoryBindingMap HashMap
Add a descriptor to the registry void add I Theme Descriptor desc themes add desc  IThemeDescriptor
Add a descriptor to the registry void add Color Definition desc colors add desc  ColorDefinition
see org eclipse ui internal themes I Theme Registry find Category java lang String public Theme Element Category find Category String id return Theme Element Category find Descriptor get Categories id  IThemeRegistry findCategory ThemeElementCategory findCategory ThemeElementCategory findDescriptor getCategories
see org eclipse ui internal themes I Theme Registry find Color java lang String public Color Definition find Color String id return Color Definition find Descriptor get Colors id  IThemeRegistry findColor ColorDefinition findColor ColorDefinition findDescriptor getColors
see org eclipse ui internal registry I Theme Registry find java lang String public I Theme Descriptor find Theme String id return I Theme Descriptor find Descriptor get Themes id  IThemeRegistry IThemeDescriptor findTheme IThemeDescriptor findDescriptor getThemes
param descriptors param id return private I Theme Element Definition find Descriptor I Theme Element Definition descriptors String id int idx Arrays binary Search descriptors id ID COMPARATOR if idx 0 return null return descriptors idx  IThemeElementDefinition findDescriptor IThemeElementDefinition binarySearch ID_COMPARATOR
public I Theme Descriptor get Themes int n Size themes size I Theme Descriptor ret Array new I Theme Descriptor n Size themes to Array ret Array Arrays sort ret Array ID COMPARATOR return ret Array  IThemeDescriptor getThemes nSize IThemeDescriptor retArray IThemeDescriptor nSize toArray retArray retArray ID_COMPARATOR retArray
public Color Definition get Colors int n Size colors size Color Definition ret Array new Color Definition n Size colors to Array ret Array Arrays sort ret Array ID COMPARATOR return ret Array  ColorDefinition getColors nSize ColorDefinition retArray ColorDefinition nSize toArray retArray retArray ID_COMPARATOR retArray
public Color Definition get Colors For String theme Id Color Definition defs get Colors if theme Id equals I Theme Manager DEFAULT THEME return defs I Theme Descriptor desc find Theme theme Id Color Definition overrides desc get Colors return Color Definition overlay defs overrides  ColorDefinition getColorsFor themeId ColorDefinition getColors themeId IThemeManager DEFAULT_THEME IThemeDescriptor findTheme themeId ColorDefinition getColors ColorDefinition
public Font Definition get Fonts For String theme Id Font Definition defs get Fonts if theme Id equals I Theme Manager DEFAULT THEME return defs I Theme Descriptor desc find Theme theme Id Font Definition overrides desc get Fonts return Font Definition overlay defs overrides  FontDefinition getFontsFor themeId FontDefinition getFonts themeId IThemeManager DEFAULT_THEME IThemeDescriptor findTheme themeId FontDefinition getFonts FontDefinition
Overlay the overrides onto the base definitions param defs the base definitions param overrides the overrides return the overlayed elements private I Theme Element Definition overlay I Theme Element Definition defs I Theme Element Definition overrides for int i 0 i overrides length i int idx Arrays binary Search defs overrides i I Theme Registry ID COMPARATOR if idx 0 defs idx overlay defs idx overrides i return defs  IThemeElementDefinition IThemeElementDefinition IThemeElementDefinition binarySearch IThemeRegistry ID_COMPARATOR
Overlay the override onto the base definition param defs the base definition param overrides the override return the overlayed element private I Theme Element Definition overlay I Theme Element Definition original I Theme Element Definition overlay if original instanceof Color Definition Color Definition original Color Color Definition original Color Definition overlay Color Color Definition overlay return new Color Definition original Color overlay Color get Value else if original instanceof Font Definition Font Definition original Font Font Definition original Font Definition overlay Font Font Definition overlay return new Font Definition original Font overlay Font get Value return null  IThemeElementDefinition IThemeElementDefinition IThemeElementDefinition ColorDefinition ColorDefinition originalColor ColorDefinition ColorDefinition overlayColor ColorDefinition ColorDefinition originalColor overlayColor getValue FontDefinition FontDefinition originalFont FontDefinition FontDefinition overlayFont FontDefinition FontDefinition originalFont overlayFont getValue
param definition void add Font Definition definition fonts add definition  FontDefinition
public Font Definition get Fonts int n Size fonts size Font Definition ret Array new Font Definition n Size fonts to Array ret Array Arrays sort ret Array ID COMPARATOR return ret Array  FontDefinition getFonts nSize FontDefinition retArray FontDefinition nSize toArray retArray retArray ID_COMPARATOR retArray
see org eclipse ui internal themes I Theme Registry find Font java lang String public Font Definition find Font String id return Font Definition find Descriptor get Fonts id  IThemeRegistry findFont FontDefinition findFont FontDefinition findDescriptor getFonts
param definition void add Theme Element Category definition categories add definition  ThemeElementCategory
public Theme Element Category get Categories int n Size categories size Theme Element Category ret Array new Theme Element Category n Size categories to Array ret Array Arrays sort ret Array ID COMPARATOR return ret Array  ThemeElementCategory getCategories nSize ThemeElementCategory retArray ThemeElementCategory nSize toArray retArray retArray ID_COMPARATOR retArray
param name param value void set Data String name String value data Map put name value  setData dataMap
see org eclipse ui internal themes I Theme Registry get Data public Map get Data return Collections unmodifiable Map data Map  IThemeRegistry getData getData unmodifiableMap dataMap
Add the data from another map to this data param other Data the other data to add public void add Data Map other Data data Map put All other Data  otherData addData otherData dataMap putAll otherData
Add a category presentation binding The given category will only be availible if the given presentation is active param category Id the category id param presentation Id the presentation id public void add Category Presentation Binding String category Id String presentation Id Set presentations Set category Binding Map get category Id if presentations null presentations new Hash Set category Binding Map put category Id presentations presentations add presentation Id  categoryId presentationId addCategoryPresentationBinding categoryId presentationId categoryBindingMap categoryId HashSet categoryBindingMap categoryId presentationId
see org eclipse ui internal themes I Theme Registry get Presentations Bindings For org eclipse ui internal themes Theme Element Category public Set get Presentations Bindings For Theme Element Category category return Set category Binding Map get category get Id  IThemeRegistry getPresentationsBindingsFor ThemeElementCategory getPresentationsBindingsFor ThemeElementCategory categoryBindingMap getId

Theme Registry Reader constructor comment public Theme Registry Reader super  ThemeRegistryReader ThemeRegistryReader
Returns the category definitions return the category definitions public Collection get Category Definitions return category Definitions  getCategoryDefinitions categoryDefinitions
Returns the color definitions return the color definitions public Collection get Color Definitions return color Definitions  getColorDefinitions colorDefinitions
Returns the data map return the data map public Map get Data return data Map  getData dataMap
Returns the font definitions return the font definitions public Collection get Font Definitions return font Definitions  getFontDefinitions fontDefinitions
Read a category param element the element to read return the new category private Theme Element Category read Category I Configuration Element element String name element get Attribute ATT LABEL String id element get Attribute ATT ID String parent Id element get Attribute ATT PARENT ID String description null I Configuration Element descriptions element get Children TAG DESCRIPTION if descriptions length 0 description descriptions 0 get Value return new Theme Element Category name id parent Id description element get Declaring Extension get Namespace element  ThemeElementCategory readCategory IConfigurationElement getAttribute ATT_LABEL getAttribute ATT_ID parentId getAttribute ATT_PARENT_ID IConfigurationElement getChildren TAG_DESCRIPTION getValue ThemeElementCategory parentId getDeclaringExtension getNamespace
Read a color param element the element to read return the new color private Color Definition read Color I Configuration Element element String name element get Attribute ATT LABEL String id element get Attribute ATT ID String default Mapping element get Attribute ATT DEFAULTS TO String value get Platform Specific Color Value element get Children TAG COLORVALUE if value null value get Color Value element if value null default Mapping null value null default Mapping null log Error element RESOURCE BUNDLE get String Colors bad Default NON NLS 1 return null String category Id element get Attribute ATT CATEGORYID String description null boolean is Editable true String is Editable String element get Attribute ATT IS EDITABLE if is Editable String null is Editable Boolean value Of is Editable String boolean Value I Configuration Element descriptions element get Children TAG DESCRIPTION if descriptions length 0 description descriptions 0 get Value return new Color Definition name id default Mapping value category Id is Editable description element get Declaring Extension get Namespace  ColorDefinition readColor IConfigurationElement getAttribute ATT_LABEL getAttribute ATT_ID defaultMapping getAttribute ATT_DEFAULTS_TO getPlatformSpecificColorValue getChildren TAG_COLORVALUE getColorValue defaultMapping defaultMapping logError RESOURCE_BUNDLE getString badDefault categoryId getAttribute ATT_CATEGORYID isEditable isEditableString getAttribute ATT_IS_EDITABLE isEditableString isEditable valueOf isEditableString booleanValue IConfigurationElement getChildren TAG_DESCRIPTION getValue ColorDefinition defaultMapping categoryId isEditable getDeclaringExtension getNamespace
Gets the color value either via the value attribute or from a color factory param element the element to check return the color string private String get Color Value I Configuration Element element if element null return null String value element get Attribute ATT VALUE if value null value check Color Factory element return value  getColorValue IConfigurationElement getAttribute ATT_VALUE checkColorFactory
Check for platform specific color values This will return the best match for the current platform param elements the elements to check return the platform specific color if any private String get Platform Specific Color Value I Configuration Element elements return get Color Value get Best Platform Match elements  getPlatformSpecificColorValue IConfigurationElement getColorValue getBestPlatformMatch
Get the element that has os ws attributes that best match the current platform param elements the elements to check return the best match if any private I Configuration Element get Best Platform Match I Configuration Element elements I Configuration Element match null String osname Platform getOS String wsname Platform getWS for int i 0 i elements length i I Configuration Element element elements i String element Os element get Attribute ATT OS String element Ws element get Attribute ATT WS if osname equals Ignore Case element Os if wsname equals Ignore Case element Ws best possible match Return return element else match element else if wsname equals Ignore Case element Ws match element return match  IConfigurationElement getBestPlatformMatch IConfigurationElement IConfigurationElement IConfigurationElement elementOs getAttribute ATT_OS elementWs getAttribute ATT_WS equalsIgnoreCase elementOs equalsIgnoreCase elementWs equalsIgnoreCase elementWs
public boolean read Element I Configuration Element element String element Name element get Name if theme Descriptor null element Name equals TAG COLORDEFINITION Color Definition definition read Color element if definition null color Definitions add definition theme Registry add definition return true else if theme Descriptor null element Name equals TAG COLOROVERRIDE Color Definition definition read Color element if definition null theme Descriptor add definition return true else if theme Descriptor null element Name equals TAG FONTDEFINITION Font Definition definition read Font element if definition null font Definitions add definition theme Registry add definition return true else if theme Descriptor null element Name equals TAG FONTOVERRIDE Font Definition definition read Font element if definition null theme Descriptor add definition return true else if theme Descriptor null element Name equals TAG CATEGORYDEFINITION Theme Element Category definition read Category element if definition null category Definitions add definition theme Registry add definition return true else if element get Name equals TAG THEME if theme Descriptor null log Error element RESOURCE BUNDLE get String Themes bad Nesting NON NLS 1 else theme Descriptor read Theme element if theme Descriptor null read Element Children element theme Descriptor null return true else if theme Descriptor null element Name equals TAG DESCRIPTION theme Descriptor set Description element get Value return true else if element Name equals TAG DATA String name element get Attribute ATT NAME String value element get Attribute ATT VALUE if name null value null log Error element RESOURCE BUNDLE get String Data bad Data NON NLS 1 else if theme Descriptor null theme Descriptor set Data name value else theme Registry set Data name value data Map put name value return true else if element Name equals TAG CATEGORYPRESENTATIONBINDING String category Id element get Attribute ATT CATEGORYID String presentation Id element get Attribute ATT PRESENTATIONID theme Registry add Category Presentation Binding category Id presentation Id return true return false  readElement IConfigurationElement elementName getName themeDescriptor elementName TAG_COLORDEFINITION ColorDefinition readColor colorDefinitions themeRegistry themeDescriptor elementName TAG_COLOROVERRIDE ColorDefinition readColor themeDescriptor themeDescriptor elementName TAG_FONTDEFINITION FontDefinition readFont fontDefinitions themeRegistry themeDescriptor elementName TAG_FONTOVERRIDE FontDefinition readFont themeDescriptor themeDescriptor elementName TAG_CATEGORYDEFINITION ThemeElementCategory readCategory categoryDefinitions themeRegistry getName TAG_THEME themeDescriptor logError RESOURCE_BUNDLE getString badNesting themeDescriptor readTheme themeDescriptor readElementChildren themeDescriptor themeDescriptor elementName TAG_DESCRIPTION themeDescriptor setDescription getValue elementName TAG_DATA getAttribute ATT_NAME getAttribute ATT_VALUE logError RESOURCE_BUNDLE getString badData themeDescriptor themeDescriptor setData themeRegistry setData dataMap elementName TAG_CATEGORYPRESENTATIONBINDING categoryId getAttribute ATT_CATEGORYID presentationId getAttribute ATT_PRESENTATIONID themeRegistry addCategoryPresentationBinding categoryId presentationId
Read a font param element the element to read return the new font private Font Definition read Font I Configuration Element element String name element get Attribute ATT LABEL String id element get Attribute ATT ID String default Mapping element get Attribute ATT DEFAULTS TO String value get Platform Specific Font Value element get Children TAG FONTVALUE if value null value element get Attribute ATT VALUE if value null default Mapping null log Error element RESOURCE BUNDLE get String Fonts bad Default NON NLS 1 return null String category Id element get Attribute ATT CATEGORYID boolean is Editable true String is Editable String element get Attribute ATT IS EDITABLE if is Editable String null is Editable Boolean value Of is Editable String boolean Value String description null I Configuration Element descriptions element get Children TAG DESCRIPTION if descriptions length 0 description descriptions 0 get Value return new Font Definition name id default Mapping value category Id is Editable description  FontDefinition readFont IConfigurationElement getAttribute ATT_LABEL getAttribute ATT_ID defaultMapping getAttribute ATT_DEFAULTS_TO getPlatformSpecificFontValue getChildren TAG_FONTVALUE getAttribute ATT_VALUE defaultMapping logError RESOURCE_BUNDLE getString badDefault categoryId getAttribute ATT_CATEGORYID isEditable isEditableString getAttribute ATT_IS_EDITABLE isEditableString isEditable valueOf isEditableString booleanValue IConfigurationElement getChildren TAG_DESCRIPTION getValue FontDefinition defaultMapping categoryId isEditable
Check for platform specific font values This will return the best match for the current platform param elements the elements to check return the platform specific font if any private String get Platform Specific Font Value I Configuration Element elements return get Font Value get Best Platform Match elements  getPlatformSpecificFontValue IConfigurationElement getFontValue getBestPlatformMatch
Gets the font valu from the value attribute param element the element to check return the font string private String get Font Value I Configuration Element element if element null return null return element get Attribute ATT VALUE  getFontValue IConfigurationElement getAttribute ATT_VALUE
Attempt to load the color value from the color Factory attribute param element the element to load from return the value or null if it could not be obtained private String check Color Factory I Configuration Element element String value null if element get Attribute Theme Registry Reader ATT COLORFACTORY null element get Children ATT COLORFACTORY length 0 try I Color Factory factory I Color Factory element create Executable Extension ATT COLORFACTORY value String Converter as String factory create Color catch Exception e Workbench Plugin log RESOURCE BUNDLE get String Colors bad Factory NON NLS 1 Status Util new Status I Status ERROR e get Message null e get Message NON NLS 1 e return value  colorFactory checkColorFactory IConfigurationElement getAttribute ThemeRegistryReader ATT_COLORFACTORY getChildren ATT_COLORFACTORY IColorFactory IColorFactory createExecutableExtension ATT_COLORFACTORY StringConverter asString createColor WorkbenchPlugin RESOURCE_BUNDLE getString badFactory StatusUtil newStatus IStatus getMessage getMessage
Read a theme param element the element to read return the new theme protected Theme Descriptor read Theme I Configuration Element element Theme Descriptor desc null try desc new Theme Descriptor element theme Registry add desc catch Core Exception e log an error since its not safe to open a dialog here Workbench Plugin log Unable to create theme descriptor e get Status NON NLS 1 return desc  ThemeDescriptor readTheme IConfigurationElement ThemeDescriptor ThemeDescriptor themeRegistry CoreException WorkbenchPlugin getStatus
Read the theme extensions within a registry param in the registry to read param out the registry to write to public void read Themes I Extension Registry in Theme Registry out throws Core Exception this does not seem to really ever be throwing an the exception set Registry out read Registry in PlatformUI PLUGIN ID I Workbench Constants PL THEMES support for old font definitions read Registry in PlatformUI PLUGIN ID I Workbench Constants PL FONT DEFINITIONS  readThemes IExtensionRegistry ThemeRegistry CoreException setRegistry readRegistry PLUGIN_ID IWorkbenchConstants PL_THEMES readRegistry PLUGIN_ID IWorkbenchConstants PL_FONT_DEFINITIONS
Set the output registry param out the output registry public void set Registry Theme Registry out theme Registry out  setRegistry ThemeRegistry themeRegistry

private I Property Change Listener font And Color Listener new I Property Change Listener public void property Change Property Change Event event if disposed set Colors And Fonts view Message set Size view Message compute Size SWT DEFAULT SWT DEFAULT true view Form layout true  IPropertyChangeListener fontAndColorListener IPropertyChangeListener propertyChange PropertyChangeEvent setColorsAndFonts viewMessage setSize viewMessage computeSize viewForm
public void property Change Property Change Event event if disposed if I Preference Constants VIEW TAB POSITION equals event get Property set Tab Position else if I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS equals event get Property set Tab Style  propertyChange PropertyChangeEvent IPreferenceConstants VIEW_TAB_POSITION getProperty setTabPosition IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS getProperty setTabStyle
public void create Control Composite parent I Theme current Theme this theme current Theme folder new C Tab Folder parent SWT BORDER folder set Unselected Close Visible false folder set Enabled false folder set Maximize Visible true folder set Minimize Visible true view Form new View Form folder SWT NONE view Form margin Height 0 view Form margin Width 0 view Form vertical Spacing 0 view Form set Border Visible false tool Bar new Tool Bar view Form SWT FLAT SWT WRAP Tool Item tool Item new Tool Item tool Bar SWT PUSH Image hover Image Workbench Images get Image I Workbench Graphic Constants IMG LCL VIEW MENU HOVER tool Item set Image hover Image view Form set Top Right tool Bar view Message new C Label view Form SWT NONE view Message set Text Etu NON NLS 1 view Form set Top Left view Message C Tab Item item new C Tab Item folder SWT CLOSE item set Text Lorem NON NLS 1 Label text new Label view Form SWT NONE view Form set Content text text set Text Lorem ipsum dolor sit amet NON NLS 1 text set Background parent get Display get System Color SWT COLOR WHITE item new C Tab Item folder SWT CLOSE item set Text Ipsum NON NLS 1 item set Control view Form item set Image Workbench Images get Image I Shared Images IMG TOOL COPY folder set Selection item item new C Tab Item folder SWT CLOSE item set Text Dolor NON NLS 1 item new C Tab Item folder SWT CLOSE item set Text Sit NON NLS 1 current Theme add Property Change Listener font And Color Listener store add Property Change Listener preference Listener api Store add Property Change Listener preference Listener set Colors And Fonts set Tab Position set Tab Style  createControl ITheme currentTheme currentTheme CTabFolder setUnselectedCloseVisible setEnabled setMaximizeVisible setMinimizeVisible viewForm ViewForm viewForm marginHeight viewForm marginWidth viewForm verticalSpacing viewForm setBorderVisible toolBar ToolBar viewForm ToolItem toolItem ToolItem toolBar hoverImage WorkbenchImages getImage IWorkbenchGraphicConstants IMG_LCL_VIEW_MENU_HOVER toolItem setImage hoverImage viewForm setTopRight toolBar viewMessage CLabel viewForm viewMessage setText viewForm setTopLeft viewMessage CTabItem CTabItem setText viewForm viewForm setContent setText setBackground getDisplay getSystemColor COLOR_WHITE CTabItem setText setControl viewForm setImage WorkbenchImages getImage ISharedImages IMG_TOOL_COPY setSelection CTabItem setText CTabItem setText currentTheme addPropertyChangeListener fontAndColorListener addPropertyChangeListener preferenceListener apiStore addPropertyChangeListener preferenceListener setColorsAndFonts setTabPosition setTabStyle
Set the tab style from preferences protected void set Tab Style boolean traditional Tab api Store get Boolean I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS folder set Simple traditional Tab  setTabStyle traditionalTab apiStore getBoolean IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS setSimple traditionalTab
Set the tab location from preferences protected void set Tab Position int tab Location store get Int I Preference Constants VIEW TAB POSITION folder set Tab Position tab Location  setTabPosition tabLocation getInt IPreferenceConstants VIEW_TAB_POSITION setTabPosition tabLocation
Set the folder colors and fonts private void set Colors And Fonts folder set Selection Foreground theme get Color Registry get I Workbench Theme Constants ACTIVE TAB TEXT COLOR folder set Foreground theme get Color Registry get I Workbench Theme Constants INACTIVE TAB TEXT COLOR Color colors new Color 2 colors 0 theme get Color Registry get I Workbench Theme Constants INACTIVE TAB BG START colors 1 theme get Color Registry get I Workbench Theme Constants INACTIVE TAB BG END colors 0 theme get Color Registry get I Workbench Theme Constants ACTIVE TAB BG START colors 1 theme get Color Registry get I Workbench Theme Constants ACTIVE TAB BG END folder set Selection Background colors new int theme get Int I Workbench Theme Constants ACTIVE TAB PERCENT theme get Boolean I Workbench Theme Constants ACTIVE TAB VERTICAL folder set Font theme get Font Registry get I Workbench Theme Constants TAB TEXT FONT view Message set Font theme get Font Registry get I Workbench Theme Constants VIEW MESSAGE TEXT FONT  setColorsAndFonts setSelectionForeground getColorRegistry IWorkbenchThemeConstants ACTIVE_TAB_TEXT_COLOR setForeground getColorRegistry IWorkbenchThemeConstants INACTIVE_TAB_TEXT_COLOR getColorRegistry IWorkbenchThemeConstants INACTIVE_TAB_BG_START getColorRegistry IWorkbenchThemeConstants INACTIVE_TAB_BG_END getColorRegistry IWorkbenchThemeConstants ACTIVE_TAB_BG_START getColorRegistry IWorkbenchThemeConstants ACTIVE_TAB_BG_END setSelectionBackground getInt IWorkbenchThemeConstants ACTIVE_TAB_PERCENT getBoolean IWorkbenchThemeConstants ACTIVE_TAB_VERTICAL setFont getFontRegistry IWorkbenchThemeConstants TAB_TEXT_FONT viewMessage setFont getFontRegistry IWorkbenchThemeConstants VIEW_MESSAGE_TEXT_FONT
public void dispose disposed true theme remove Property Change Listener font And Color Listener store remove Property Change Listener preference Listener api Store remove Property Change Listener preference Listener  removePropertyChangeListener fontAndColorListener removePropertyChangeListener preferenceListener apiStore removePropertyChangeListener preferenceListener

private Workbench Theme Manager default Theme Color Registry new Color Registry PlatformUI get Workbench get Display default Theme Font Registry new Font Registry PlatformUI get Workbench get Display copy the font values from preferences Font Registry jface Fonts J Face Resources get Font Registry for Iterator i jface Fonts get Key Set iterator i has Next String key String i next default Theme Font Registry put key jface Fonts get Font Data key  WorkbenchThemeManager defaultThemeColorRegistry ColorRegistry getWorkbench getDisplay defaultThemeFontRegistry FontRegistry getWorkbench getDisplay FontRegistry jfaceFonts JFaceResources getFontRegistry jfaceFonts getKeySet hasNext defaultThemeFontRegistry jfaceFonts getFontData
Returns the singelton instance of the Workbench Theme Manager return singleton instance public static Workbench Theme Manager get Instance if instance null instance new Workbench Theme Manager instance get Current Theme initialize the current theme return instance  WorkbenchThemeManager WorkbenchThemeManager getInstance WorkbenchThemeManager getCurrentTheme
Disposes all Theme Entries public void dispose for Iterator i themes values iterator i has Next I Theme theme I Theme i next theme remove Property Change Listener current Theme Listener theme dispose themes clear  ThemeEntries hasNext ITheme ITheme removePropertyChangeListener currentThemeListener
private I Theme Registry get Theme Registry if theme Registry null theme Registry Workbench Plugin get Default get Theme Registry return theme Registry  IThemeRegistry getThemeRegistry themeRegistry themeRegistry WorkbenchPlugin getDefault getThemeRegistry themeRegistry
kims prototype public I Theme get Theme String id if id equals I Theme Manager DEFAULT THEME return get Theme I Theme Descriptor null I Theme Descriptor td get Theme Registry find Theme id if td null return null return get Theme td  ITheme getTheme IThemeManager DEFAULT_THEME getTheme IThemeDescriptor IThemeDescriptor getThemeRegistry findTheme getTheme
private I Theme get Theme I Theme Descriptor td I Theme theme I Theme themes get td if theme null theme new Theme td themes put td theme return theme  ITheme getTheme IThemeDescriptor ITheme ITheme
public void property Change Property Change Event event fire Property Change event if event get Source instanceof Font Registry J Face Resources get Font Registry put event get Property Font Data event get New Value else if event get Source instanceof Color Registry J Face Resources get Color Registry put event get Property RGB event get New Value  propertyChange PropertyChangeEvent firePropertyChange getSource FontRegistry JFaceResources getFontRegistry getProperty FontData getNewValue getSource ColorRegistry JFaceResources getColorRegistry getProperty getNewValue
public I Theme get Current Theme if current Theme null String theme Id PlatformUI get Workbench get Preference Store get String I Preference Constants CURRENT THEME ID if theme Id equals NON NLS 1 theme Id I Theme Manager DEFAULT THEME set Current Theme theme Id return current Theme  ITheme getCurrentTheme currentTheme themeId getWorkbench getPreferenceStore getString IPreferenceConstants CURRENT_THEME_ID themeId themeId IThemeManager DEFAULT_THEME setCurrentTheme themeId currentTheme
public void set Current Theme String id I Theme old Theme current Theme if Workbench Theme Manager get Instance do Set Current Theme id fire Property Change CHANGE CURRENT THEME old Theme get Current Theme if old Theme null old Theme remove Property Change Listener current Theme Listener current Theme add Property Change Listener current Theme Listener update the preference if required if Workbench Plugin get Default get Preference Store get String I Preference Constants CURRENT THEME ID equals id Workbench Plugin get Default get Preference Store set Value I Preference Constants CURRENT THEME ID id NON NLS 1 Workbench Plugin get Default save Plugin Preferences update the jface registries Color Registry jface Colors J Face Resources get Color Registry Color Registry theme Colors current Theme get Color Registry for Iterator i theme Colors get Key Set iterator i has Next String key String i next jface Colors put key theme Colors getRGB key Font Registry jface Fonts J Face Resources get Font Registry Font Registry theme Fonts current Theme get Font Registry for Iterator i theme Fonts get Key Set iterator i has Next String key String i next jface Fonts put key theme Fonts get Font Data key  setCurrentTheme ITheme oldTheme currentTheme WorkbenchThemeManager getInstance doSetCurrentTheme firePropertyChange CHANGE_CURRENT_THEME oldTheme getCurrentTheme oldTheme oldTheme removePropertyChangeListener currentThemeListener currentTheme addPropertyChangeListener currentThemeListener WorkbenchPlugin getDefault getPreferenceStore getString IPreferenceConstants CURRENT_THEME_ID WorkbenchPlugin getDefault getPreferenceStore setValue IPreferenceConstants CURRENT_THEME_ID WorkbenchPlugin getDefault savePluginPreferences ColorRegistry jfaceColors JFaceResources getColorRegistry ColorRegistry themeColors currentTheme getColorRegistry themeColors getKeySet hasNext jfaceColors themeColors FontRegistry jfaceFonts JFaceResources getFontRegistry FontRegistry themeFonts currentTheme getFontRegistry themeFonts getKeySet hasNext jfaceFonts themeFonts getFontData
private boolean do Set Current Theme String id I Theme old Theme current Theme I Theme new Theme get Theme id if old Theme new Theme new Theme null current Theme new Theme return true return false  doSetCurrentTheme ITheme oldTheme currentTheme ITheme newTheme getTheme oldTheme newTheme newTheme currentTheme newTheme
protected void fire Property Change Property Change Event event Object listeners property Change Listeners get Listeners for int i 0 i listeners length i I Property Change Listener listeners i property Change event  firePropertyChange PropertyChangeEvent propertyChangeListeners getListeners IPropertyChangeListener propertyChange
protected void fire Property Change String change Id I Theme old Theme I Theme new Theme Property Change Event event new Property Change Event this change Id old Theme new Theme fire Property Change event  firePropertyChange changeId ITheme oldTheme ITheme newTheme PropertyChangeEvent PropertyChangeEvent changeId oldTheme newTheme firePropertyChange
private Listener List property Change Listeners new Listener List public void add Property Change Listener I Property Change Listener listener property Change Listeners add listener  ListenerList propertyChangeListeners ListenerList addPropertyChangeListener IPropertyChangeListener propertyChangeListeners
public void remove Property Change Listener I Property Change Listener listener property Change Listeners remove listener  removePropertyChangeListener IPropertyChangeListener propertyChangeListeners
public Color Registry get Default Theme Color Registry return default Theme Color Registry  ColorRegistry getDefaultThemeColorRegistry defaultThemeColorRegistry
public Font Registry get Default Theme Font Registry return default Theme Font Registry  FontRegistry getDefaultThemeFontRegistry defaultThemeFontRegistry

public void perspective Activated I Workbench Page page I Perspective Descriptor perspective if page is Editor Area Visible set Text Workbench Messages get String Toggle Editor hide Editors NON NLS 1 else set Text Workbench Messages get String Toggle Editor show Editors NON NLS 1  perspectiveActivated IWorkbenchPage IPerspectiveDescriptor isEditorAreaVisible setText WorkbenchMessages getString ToggleEditor hideEditors setText WorkbenchMessages getString ToggleEditor showEditors
public void perspective Changed I Workbench Page page I Perspective Descriptor perspective String change Id if change Id I Workbench Page CHANGE RESET change Id I Workbench Page CHANGE EDITOR AREA HIDE change Id I Workbench Page CHANGE EDITOR AREA SHOW if page is Editor Area Visible set Text Workbench Messages get String Toggle Editor hide Editors NON NLS 1 else set Text Workbench Messages get String Toggle Editor show Editors NON NLS 1  perspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId changeId IWorkbenchPage CHANGE_RESET changeId IWorkbenchPage CHANGE_EDITOR_AREA_HIDE changeId IWorkbenchPage CHANGE_EDITOR_AREA_SHOW isEditorAreaVisible setText WorkbenchMessages getString ToggleEditor hideEditors setText WorkbenchMessages getString ToggleEditor showEditors
Creates a new code Toggle Editors Visibility Action code public Toggle Editors Visibility Action I Workbench Window window super Workbench Messages get String Toggle Editor hide Editors NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window set Action Definition Id org eclipse ui window hide Show Editors NON NLS 1 issue missing action id set Tool Tip Text Workbench Messages get String Toggle Editor tool Tip NON NLS 1 Workbench Help set Help this I Help Context Ids TOGGLE EDITORS VISIBILITY ACTION set Enabled false Once the API on I Workbench Page to hide show the editor area is removed then switch to using the internal perspective service workbench Window add Perspective Listener this  ToggleEditorsVisibilityAction ToggleEditorsVisibilityAction IWorkbenchWindow WorkbenchMessages getString ToggleEditor hideEditors IllegalArgumentException workbenchWindow setActionDefinitionId hideShowEditors setToolTipText WorkbenchMessages getString ToggleEditor toolTip WorkbenchHelp setHelp IHelpContextIds TOGGLE_EDITORS_VISIBILITY_ACTION setEnabled IWorkbenchPage workbenchWindow addPerspectiveListener
public void run if workbench Window null action has been disposed return I Workbench Page page workbench Window get Active Page if page null return boolean visible page is Editor Area Visible if visible page set Editor Area Visible false set Text Workbench Messages get String Toggle Editor show Editors NON NLS 1 else page set Editor Area Visible true set Text Workbench Messages get String Toggle Editor hide Editors NON NLS 1  workbenchWindow IWorkbenchPage workbenchWindow getActivePage isEditorAreaVisible setEditorAreaVisible setText WorkbenchMessages getString ToggleEditor showEditors setEditorAreaVisible setText WorkbenchMessages getString ToggleEditor hideEditors
public void dispose if workbench Window null already disposed return workbench Window remove Perspective Listener this workbench Window null  workbenchWindow workbenchWindow removePerspectiveListener workbenchWindow

public Trim Drop Target Composite some Composite Workbench Window the Window layout Trim Layout some Composite get Layout window Composite some Composite window the Window  TrimDropTarget someComposite WorkbenchWindow theWindow TrimLayout someComposite getLayout windowComposite someComposite theWindow
return new Abstract Drop Target public void drop dragged Trim dock drop Side  AbstractDropTarget draggedTrim dropSide
public Cursor get Cursor return Drag Cursors get Cursor Drag Cursors position To Drag Cursor drop Side  getCursor DragCursors getCursor DragCursors positionToDragCursor dropSide
public Rectangle get Snap Rectangle int smaller Math min drag Rectangle width drag Rectangle height return Geometry to Display window Composite Geometry get Extruded Edge window Composite get Client Area smaller drop Side  getSnapRectangle dragRectangle dragRectangle toDisplay windowComposite getExtrudedEdge windowComposite getClientArea dropSide
public I Drop Target drag Control current Control Object dragged Object Point position final Rectangle drag Rectangle Handle dropping window trim on the border of the workbench for example the fast view bar if dragged Object instanceof I Window Trim final I Window Trim dragged Trim I Window Trim dragged Object Control trim Control dragged Trim get Control if trim Control get Parent window Composite Control target Trim get Trim Control current Control if target Trim null int side layout get Trim Location target Trim if side SWT DEFAULT if target Trim layout get Center Control side Compatibility Drag Target get Relative Position target Trim position if side SWT CENTER side SWT DEFAULT target Trim null if side SWT DEFAULT target Trim trim Control target Trim null side layout get Trim Location trim Control side dragged Trim get Valid Sides 0 final int drop Side side final Control insertion Point target Trim return new Abstract Drop Target public void drop dragged Trim dock drop Side public Cursor get Cursor return Drag Cursors get Cursor Drag Cursors position To Drag Cursor drop Side public Rectangle get Snap Rectangle int smaller Math min drag Rectangle width drag Rectangle height return Geometry to Display window Composite Geometry get Extruded Edge window Composite get Client Area smaller drop Side return null  IDropTarget currentControl draggedObject dragRectangle draggedObject IWindowTrim IWindowTrim draggedTrim IWindowTrim draggedObject trimControl draggedTrim getControl trimControl getParent windowComposite targetTrim getTrimControl currentControl targetTrim getTrimLocation targetTrim targetTrim getCenterControl CompatibilityDragTarget getRelativePosition targetTrim targetTrim targetTrim trimControl targetTrim getTrimLocation trimControl draggedTrim getValidSides dropSide insertionPoint targetTrim AbstractDropTarget draggedTrim dropSide getCursor DragCursors getCursor DragCursors positionToDragCursor dropSide getSnapRectangle dragRectangle dragRectangle toDisplay windowComposite getExtrudedEdge windowComposite getClientArea dropSide
private Control get Trim Control Control search Source if search Source null return null if search Source get Parent window Composite return search Source return get Trim Control search Source get Parent  getTrimControl searchSource searchSource searchSource getParent windowComposite searchSource getTrimControl searchSource getParent

protected int tail 0 public synchronized void add Semaphore element int new Tail increment tail if new Tail head grow new Tail tail 1 elements tail element tail new Tail  newTail newTail newTail newTail
private void grow int new Size elements length 2 Semaphore new Elements new Semaphore new Size if tail head System arraycopy elements head new Elements head size else int new Head new Size elements length head System arraycopy elements 0 new Elements 0 tail 1 System arraycopy elements head new Elements new Head new Size new Head head new Head elements new Elements  newSize newElements newSize newElements newHead newSize newElements newElements newHead newSize newHead newHead newElements
elements new Elements private int increment int index return index elements length 1 0 index 1  newElements
public synchronized Semaphore remove if tail head return null Semaphore result elements head elements head null head increment head reset the queue if it is empty and it has grown if tail head elements length BASE SIZE elements new Semaphore BASE SIZE tail head 0 return result  BASE_SIZE BASE_SIZE
return result private int size return tail head tail head elements length head tail 
protected Thread ui public UI Lock Listener Display display this display display  UILockListener
this display display public void about To Release if isUI ui null  aboutToRelease
public boolean about To Wait Thread lock Owner if isUI If a sync Exec was executed from the current operation it has already acquired the lock So just return true if current Work null current Work get Operation Thread lock Owner return true ui Thread current Thread try do Pending Work finally UI field may be nulled if there is a nested wait during execution of pending work so make sure it is assigned before we start waiting ui Thread current Thread return false  aboutToWait lockOwner syncExec currentWork currentWork getOperationThread lockOwner currentThread doPendingWork currentThread
return false void add Pending Work Semaphore work pending Work add work  addPendingWork pendingWork
Should always be called from the UI thread void do Pending Work Semaphore work while work pending Work remove null try current Work work work get Runnable run finally current Work null work release  doPendingWork pendingWork currentWork getRunnable currentWork
void interruptUI display get Thread interrupt  getThread
display get Thread interrupt boolean is Lock Owner return is Lock Owner Thread  getThread isLockOwner isLockOwnerThread
boolean isUI return display is Disposed display get Thread Thread current Thread  isDisposed getThread currentThread
return display is Disposed display get Thread Thread current Thread boolean isUI Waiting return ui null Thread current Thread ui  isDisposed getThread currentThread isUIWaiting currentThread

Creates an instance of the UI Plugin since 3 0 public UI Plugin super inst this  UIPlugin UIPlugin
Returns the image registry for this plugin Where are the images The images typically gifs are found in the same plugins directory see Image Registry Note The workbench uses the standard J Face Image Registry to track its images In addition the class Workbench Graphic Resources provides convenience access to the graphics resources and fast field access for some of the commonly used graphical images protected Image Registry create Image Registry Just to be sure that we don t access this plug ins image registry Assert is Legal false return null  ImageRegistry JFace ImageRegistry WorkbenchGraphicResources ImageRegistry createImageRegistry isLegal
public Image Registry get Image Registry Just to be sure that we don t access this plug ins image registry Assert is Legal false return null  ImageRegistry getImageRegistry isLegal
Returns the default instance of the receiver This represents the runtime plugin return UI Plugin the singleton instance of the receiver see AbstractUI Plugin for the typical implementation pattern for plugin classes public static UI Plugin get Default return inst  UIPlugin AbstractUIPlugin UIPlugin getDefault
Set default preference values This method must be called whenever the preference store is initially loaded because the default values are not stored in the preference store protected void initialize Default Preferences I Preference Store store Do nothing This should not be called Prefs are initialized in UI Preference Initializer  initializeDefaultPreferences IPreferenceStore UIPreferenceInitializer
and save the UI plugin s preference store Pref Util setUI Callback new Pref Util I Callback public I Preference Store get Preference Store return UI Plugin this get Preference Store  PrefUtil setUICallback PrefUtil ICallback IPreferenceStore getPreferenceStore UIPlugin getPreferenceStore
return UI Plugin this get Preference Store public void save Preferences UI Plugin this save Plugin Preferences  UIPlugin getPreferenceStore savePreferences UIPlugin savePluginPreferences
public void start Bundle Context context throws Exception super start context set a callback allowing the workbench plugin to obtain and save the UI plugin s preference store Pref Util setUI Callback new Pref Util I Callback public I Preference Store get Preference Store return UI Plugin this get Preference Store public void save Preferences UI Plugin this save Plugin Preferences  BundleContext PrefUtil setUICallback PrefUtil ICallback IPreferenceStore getPreferenceStore UIPlugin getPreferenceStore savePreferences UIPlugin savePluginPreferences

public void initialize Default Preferences I Preference Store store UI Plugin get Default get Preference Store store set Default I Workbench Preference Constants OPEN NEW PERSPECTIVE I Workbench Preference Constants OPEN PERSPECTIVE REPLACE Deprecated but kept for backwards compatibility store set Default I Workbench Preference Constants PROJECT OPEN NEW PERSPECTIVE I Workbench Preference Constants OPEN PERSPECTIVE REPLACE store set Default I Workbench Preference Constants SHIFT OPEN NEW PERSPECTIVE I Workbench Preference Constants OPEN PERSPECTIVE REPLACE store set Default I Workbench Preference Constants ALTERNATE OPEN NEW PERSPECTIVE I Workbench Preference Constants OPEN PERSPECTIVE REPLACE Although there is no longer any item on the preference pages for setting the linking preference since it is now a per part setting it remains as a preference to allow product overrides of the initial state of linking in the Navigator By default linking is off store set Default I Workbench Preference Constants LINK NAVIGATOR TO EDITOR false Appearance Presentation preferences store set Default I Workbench Preference Constants PRESENTATION FACTORY ID org eclipse ui presentations default NON NLS 1 store set Default I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS true store set Default I Workbench Preference Constants DOCK PERSPECTIVE BAR I Workbench Preference Constants TOP LEFT store set Default I Workbench Preference Constants SHOW TEXT ON PERSPECTIVE BAR true the fast view bar should be on the bottom of a fresh workspace store set Default I Workbench Preference Constants INITIAL FAST VIEW BAR LOCATION I Workbench Preference Constants BOTTOM default to showing intro on startup store set Default I Workbench Preference Constants SHOW INTRO true store add Property Change Listener new PlatformUI Preference Listener  initializeDefaultPreferences IPreferenceStore UIPlugin getDefault getPreferenceStore setDefault IWorkbenchPreferenceConstants OPEN_NEW_PERSPECTIVE IWorkbenchPreferenceConstants OPEN_PERSPECTIVE_REPLACE setDefault IWorkbenchPreferenceConstants PROJECT_OPEN_NEW_PERSPECTIVE IWorkbenchPreferenceConstants OPEN_PERSPECTIVE_REPLACE setDefault IWorkbenchPreferenceConstants SHIFT_OPEN_NEW_PERSPECTIVE IWorkbenchPreferenceConstants OPEN_PERSPECTIVE_REPLACE setDefault IWorkbenchPreferenceConstants ALTERNATE_OPEN_NEW_PERSPECTIVE IWorkbenchPreferenceConstants OPEN_PERSPECTIVE_REPLACE setDefault IWorkbenchPreferenceConstants LINK_NAVIGATOR_TO_EDITOR setDefault IWorkbenchPreferenceConstants PRESENTATION_FACTORY_ID setDefault IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS setDefault IWorkbenchPreferenceConstants DOCK_PERSPECTIVE_BAR IWorkbenchPreferenceConstants TOP_LEFT setDefault IWorkbenchPreferenceConstants SHOW_TEXT_ON_PERSPECTIVE_BAR setDefault IWorkbenchPreferenceConstants INITIAL_FAST_VIEW_BAR_LOCATION IWorkbenchPreferenceConstants setDefault IWorkbenchPreferenceConstants SHOW_INTRO addPropertyChangeListener PlatformUIPreferenceListener

public class UI Synchronizer extends Synchronizer protected UI Lock Listener lock Listener public UI Synchronizer Display display UI Lock Listener lock super display this lock Listener lock  UISynchronizer UILockListener lockListener UISynchronizer UILockListener lockListener
lock Listener add Pending Work work async Exec new Runnable public void run lock Listener do Pending Work  lockListener addPendingWork asyncExec lockListener doPendingWork
public void sync Exec Runnable runnable if this thread is the UI or this thread does not own any locks just do the sync Exec if runnable null lock Listener isUI lock Listener is Lock Owner super sync Exec runnable return Semaphore work new Semaphore runnable work set Operation Thread Thread current Thread lock Listener add Pending Work work async Exec new Runnable public void run lock Listener do Pending Work try even if the UI was not blocked earlier it might become blocked before it can serve the async Exec to do the pending work do if lock Listener isUI Waiting lock Listener interruptUI while work acquire 1000 catch Interrupted Exception e  syncExec syncExec lockListener lockListener isLockOwner syncExec setOperationThread currentThread lockListener addPendingWork asyncExec lockListener doPendingWork asyncExec lockListener isUIWaiting lockListener InterruptedException

public class Bundle Utility public static boolean is Activated Bundle bundle if bundle null return false switch bundle get State case Bundle STARTING case Bundle ACTIVE case Bundle STOPPING return true default return false  BundleUtility isActivated getState
TODO needs a better name public static boolean is Ready Bundle bundle if bundle null return false switch bundle get State case Bundle RESOLVED case Bundle STARTING case Bundle ACTIVE case Bundle STOPPING return true default return false  isReady getState
public static boolean is Activated String bundle Id return is Activated Platform get Bundle bundle Id  isActivated bundleId isActivated getBundle bundleId
public static boolean is Ready String bundle Id return is Ready Platform get Bundle bundle Id  isReady bundleId isReady getBundle bundleId
public static URL find Bundle bundle String path if bundle null return null return Platform find bundle new Path path 
public static URL find String bundle Id String path return find Platform get Bundle bundle Id path  bundleId getBundle bundleId
public static void log String bundle Id Throwable exception Bundle bundle Platform get Bundle bundle Id if bundle null return I Status status new Status I Status ERROR bundle Id I Status ERROR exception get Message null exception get Message NON NLS 1 exception Platform get Log bundle log status  bundleId getBundle bundleId IStatus IStatus bundleId IStatus getMessage getMessage getLog

public Configuration Element Memento I Configuration Element configuration Element if configuration Element null throw new Null Pointer Exception this configuration Element configuration Element  ConfigurationElementMemento IConfigurationElement configurationElement configurationElement NullPointerException configurationElement configurationElement
public I Memento create Child String type return null  IMemento createChild
public I Memento create Child String type String id return null  IMemento createChild
public I Memento get Child String type I Configuration Element configuration Elements configuration Element get Children type if configuration Elements null configuration Elements length 1 return new Configuration Element Memento configuration Elements 0 return null  IMemento getChild IConfigurationElement configurationElements configurationElement getChildren configurationElements configurationElements ConfigurationElementMemento configurationElements
public I Memento get Children String type I Configuration Element configuration Elements configuration Element get Children type if configuration Elements null configuration Elements length 1 I Memento mementos new Configuration Element Memento configuration Elements length for int i 0 i configuration Elements length i mementos i new Configuration Element Memento configuration Elements i return mementos return new I Memento 0  IMemento getChildren IConfigurationElement configurationElements configurationElement getChildren configurationElements configurationElements IMemento ConfigurationElementMemento configurationElements configurationElements ConfigurationElementMemento configurationElements IMemento
public Float get Float String key String string configuration Element get Attribute key if string null try return new Float string catch Number Format Exception e Number Format return null  getFloat configurationElement getAttribute NumberFormatException eNumberFormat
public String getID return configuration Element get Attribute TAG ID  configurationElement getAttribute TAG_ID
public Integer get Integer String key String string configuration Element get Attribute key if string null try return new Integer string catch Number Format Exception e Number Format return null  getInteger configurationElement getAttribute NumberFormatException eNumberFormat
public String get String String key return configuration Element get Attribute key  getString configurationElement getAttribute
public String get Text Data return configuration Element get Value  getTextData configurationElement getValue
public void put Float String key float value  putFloat
public void put Integer String key int value  putInteger
public void put Memento I Memento memento  putMemento IMemento
public void put String String key String value  putString
public void put Text Data String data  putTextData

public final class Image Support public static Image Descriptor get Image Descriptor String path URL url Bundle Utility find PlatformUI PLUGIN ID path return Image Descriptor create FromURL url  ImageSupport ImageDescriptor getImageDescriptor BundleUtility PLUGIN_ID ImageDescriptor createFromURL
private Image Support  ImageSupport

public Old Configuration Element Memento I Configuration Element configuration Element if configuration Element null throw new Null Pointer Exception this configuration Element configuration Element  OldConfigurationElementMemento IConfigurationElement configurationElement configurationElement NullPointerException configurationElement configurationElement
public I Memento create Child String type return null  IMemento createChild
public I Memento create Child String type String id return null  IMemento createChild
public I Memento get Child String type I Configuration Element configuration Elements configuration Element get Children type if configuration Elements null configuration Elements length 1 return new Old Configuration Element Memento configuration Elements 0 return null  IMemento getChild IConfigurationElement configurationElements configurationElement getChildren configurationElements configurationElements OldConfigurationElementMemento configurationElements
public I Memento get Children String type I Configuration Element configuration Elements configuration Element get Children type if configuration Elements null configuration Elements length 1 I Memento mementos new Old Configuration Element Memento configuration Elements length for int i 0 i configuration Elements length i mementos i new Old Configuration Element Memento configuration Elements i return mementos return new I Memento 0  IMemento getChildren IConfigurationElement configurationElements configurationElement getChildren configurationElements configurationElements IMemento OldConfigurationElementMemento configurationElements configurationElements OldConfigurationElementMemento configurationElements IMemento
public Float get Float String key String string configuration Element get Attribute key if string null try return new Float string catch Number Format Exception e Number Format return null  getFloat configurationElement getAttribute NumberFormatException eNumberFormat
public String getID return configuration Element get Attribute TAG ID  configurationElement getAttribute TAG_ID
public Integer get Integer String key String string configuration Element get Attribute key if string null try return new Integer string catch Number Format Exception e Number Format return null  getInteger configurationElement getAttribute NumberFormatException eNumberFormat
public String get String String key return configuration Element get Attribute key  getString configurationElement getAttribute
public String get Text Data return configuration Element get Value  getTextData configurationElement getValue
public void put Float String key float value  putFloat
public void put Integer String key int value  putInteger
public void put Memento I Memento memento  putMemento IMemento
public void put String String key String value  putString
public void put Text Data String data  putTextData

public class Pref Util private Pref Util prevents instantiation  PrefUtil PrefUtil
public static interface I Callback I Preference Store get Preference Store  ICallback IPreferenceStore getPreferenceStore
public static interface I Callback I Preference Store get Preference Store void save Preferences  ICallback IPreferenceStore getPreferenceStore savePreferences
Sets the callback used to obtain and save the UI preference store public static final void setUI Callback I Callback callback Assert is True ui Callback null ui Callback callback  setUICallback ICallback isTrue uiCallback uiCallback
Returns the API preference store return the API preference store public static I Preference Store getAPI Preference Store if ui Preference Store null Assert is Not Null ui Callback ui Preference Store ui Callback get Preference Store return ui Preference Store  IPreferenceStore getAPIPreferenceStore uiPreferenceStore isNotNull uiCallback uiPreferenceStore uiCallback getPreferenceStore uiPreferenceStore
Returns the internal preference store return the internal preference store public static I Preference Store get Internal Preference Store return Workbench Plugin get Default get Preference Store  IPreferenceStore getInternalPreferenceStore WorkbenchPlugin getDefault getPreferenceStore
Saves both the API and internal preference stores public static void save Prefs saveAPI Prefs save Internal Prefs  savePrefs saveAPIPrefs saveInternalPrefs
Saves the API preference store if needed public static void saveAPI Prefs Assert is Not Null ui Callback ui Callback save Preferences  saveAPIPrefs isNotNull uiCallback uiCallback savePreferences
Saves the internal preference store if needed public static void save Internal Prefs Workbench Plugin get Default save Plugin Preferences  saveInternalPrefs WorkbenchPlugin getDefault savePluginPreferences

private int height Hint 1 public Status Line Contribution Item String id this id DEFAULT CHAR WIDTH  heightHint StatusLineContributionItem DEFAULT_CHAR_WIDTH
public Status Line Contribution Item String id int char Width super id this char Width char Width set Visible false no text to start with  StatusLineContributionItem charWidth charWidth charWidth setVisible
public void fill Composite parent status Line parent Label sep new Label parent SWT SEPARATOR label new C Label status Line SWT SHADOW NONE if width Hint 0 GC gc new GC status Line gc set Font status Line get Font Font Metrics fm gc get Font Metrics width Hint fm get Average Char Width char Width height Hint fm get Height gc dispose Status Line Layout Data data new Status Line Layout Data data width Hint width Hint label set Layout Data data label set Text text data new Status Line Layout Data data height Hint height Hint sep set Layout Data data  statusLine CLabel statusLine SHADOW_NONE widthHint statusLine setFont statusLine getFont FontMetrics getFontMetrics widthHint getAverageCharWidth charWidth heightHint getHeight StatusLineLayoutData StatusLineLayoutData widthHint widthHint setLayoutData setText StatusLineLayoutData heightHint heightHint setLayoutData
An accessor for the current location of this status line contribution item relative to the display return The current location of this status line code null code if not yet initialized public Point get Display Location if label null status Line null return status Line to Display label get Location return null  getDisplayLocation statusLine statusLine toDisplay getLocation
public String get Text return text  getText
public void set Text String text if text null throw new Null Pointer Exception this text text if label null label is Disposed label set Text this text if this text length 0 if is Visible set Visible false I Contribution Manager contribution Manager get Parent if contribution Manager null contribution Manager update true else if is Visible set Visible true I Contribution Manager contribution Manager get Parent if contribution Manager null contribution Manager update true  setText NullPointerException isDisposed setText isVisible setVisible IContributionManager contributionManager getParent contributionManager contributionManager isVisible setVisible IContributionManager contributionManager getParent contributionManager contributionManager

Disposes of all allocated images colors and fonts when shutting down the plug in public static final void shutdown if image Table null for Iterator i image Table values iterator i has Next Image i next dispose image Table null if color Table null for Iterator i color Table values iterator i has Next Color i next dispose color Table null if font Table null for Iterator i font Table values iterator i has Next Font i next dispose font Table null  imageTable imageTable hasNext imageTable colorTable colorTable hasNext colorTable fontTable fontTable hasNext fontTable
Get the Map of RG Bs to Colors return Returns the color Table public static Map get Color Table return color Table  RGBs colorTable getColorTable colorTable
Return the map of Font Datas to Fonts return Returns the font Table public static Map get Font Table return font Table  FontDatas fontTable getFontTable fontTable
Return the map of Image Descriptors to Images return Returns the image Table public static Map get Image Table return image Table  ImageDescriptors imageTable getImageTable imageTable

Ensures that a string is not null Converts null strings into empty strings and leaves any other string unmodified Use this to help wrap calls to methods that return null instead of the empty string Can also help protect against implementation errors in methods that are not supposed to return null param input input string may be null return input if not null or the empty string if input is null public static String safe String String input if input null return input return ZERO LENGTH STRING  safeString ZERO_LENGTH_STRING
public static void assert Instance Object object Class c assert Instance object c false  assertInstance assertInstance
public static void assert Instance Object object Class c boolean allow Null if object null allow Null return if object null c null throw new Null Pointer Exception else if c is Instance object throw new Illegal Argument Exception  assertInstance allowNull allowNull NullPointerException isInstance IllegalArgumentException
public static int compare boolean left boolean right return left false right true 1 0 1 
public static int compare Comparable left Comparable right if left null right null return 0 else if left null return 1 else if right null return 1 else return left compare To right  compareTo
public static int compare Comparable left Comparable right if left null right null return 0 else if left null return 1 else if right null return 1 else int l left length int r right length if l r return l r else for int i 0 i l i int compare To compare left i right i if compare To 0 return compare To return 0  compareTo compareTo compareTo
public static int compare int left int right return left right 
public static int compare List left List right if left null right null return 0 else if left null return 1 else if right null return 1 else int l left size int r right size if l r return l r else for int i 0 i l i int compare To compare Comparable left get i Comparable right get i if compare To 0 return compare To return 0  compareTo compareTo compareTo
public static int compare Object left Object right if left null right null return 0 else if left null return 1 else if right null return 1 else return left to String compare To right to String  toString compareTo toString
An optimized comparison that uses identity hash codes to perform the comparison between non code null code objects param left The left hand side of the comparison may be code null code param right The right hand side of the comparison may be code null code return code 0 code if they are the same code 1 code if left is code null code code 1 code if right is code null code Otherwise the left identity hash code minus the right identity hash code public static final int compare Identity Object left Object right if left null right null return 0 else if left null return 1 else if right null return 1 else return System identity Hash Code left System identity Hash Code right  compareIdentity identityHashCode identityHashCode
public static void diff Map left Map right Set left Only Set different Set right Only if left null right null left Only null different null right Only null throw new Null Pointer Exception Iterator iterator left key Set iterator while iterator has Next Object key iterator next if right contains Key key left Only add key else if Util equals left get key right get key different add key iterator right key Set iterator while iterator has Next Object key iterator next if left contains Key key right Only add key  leftOnly rightOnly leftOnly rightOnly NullPointerException keySet hasNext containsKey leftOnly keySet hasNext containsKey rightOnly
public static void diff Set left Set right Set left Only Set right Only if left null right null left Only null right Only null throw new Null Pointer Exception Iterator iterator left iterator while iterator has Next Object object iterator next if right contains object left Only add object iterator right iterator while iterator has Next Object object iterator next if left contains object right Only add object  leftOnly rightOnly leftOnly rightOnly NullPointerException hasNext leftOnly hasNext rightOnly
public static boolean ends With List left List right boolean equals if left null right null return false else int l left size int r right size if r l equals r l return false for int i 0 i r i if equals left get l i 1 right get r i 1 return false return true  endsWith
public static boolean ends With Object left Object right boolean equals if left null right null return false else int l left length int r right length if r l equals r l return false for int i 0 i r i if equals left l i 1 right r i 1 return false return true  endsWith
public static boolean equals boolean left boolean right return left right 
public static boolean equals int left int right return left right 
public static boolean equals Object left Object right return left null right null right null left equals right 
public static int hash Code boolean b return b Boolean TRUE hash Code Boolean FALSE hash Code  hashCode hashCode hashCode
public static int hash Code int i return i  hashCode
public static int hash Code Object object return object null object hash Code 0  hashCode hashCode
public static Collection safe Copy Collection collection Class c return safe Copy collection c false  safeCopy safeCopy
public static Collection safe Copy Collection collection Class c boolean allow Null Elements if collection null c null throw new Null Pointer Exception collection Collections unmodifiable Collection new Array List collection Iterator iterator collection iterator while iterator has Next assert Instance iterator next c allow Null Elements return collection  safeCopy allowNullElements NullPointerException unmodifiableCollection ArrayList hasNext assertInstance allowNullElements
public static List safe Copy List list Class c return safe Copy list c false  safeCopy safeCopy
public static List safe Copy List list Class c boolean allow Null Elements if list null c null throw new Null Pointer Exception list Collections unmodifiable List new Array List list Iterator iterator list iterator while iterator has Next assert Instance iterator next c allow Null Elements return list  safeCopy allowNullElements NullPointerException unmodifiableList ArrayList hasNext assertInstance allowNullElements
public static Map safe Copy Map map Class key Class Class value Class return safe Copy map key Class value Class false false  safeCopy keyClass valueClass safeCopy keyClass valueClass
public static Map safe Copy Map map Class key Class Class value Class boolean allow Null Keys boolean allow Null Values if map null key Class null value Class null throw new Null Pointer Exception map Collections unmodifiable Map new Hash Map map Iterator iterator map entry Set iterator while iterator has Next Map Entry entry Map Entry iterator next assert Instance entry get Key key Class allow Null Keys assert Instance entry get Value value Class allow Null Values return map  safeCopy keyClass valueClass allowNullKeys allowNullValues keyClass valueClass NullPointerException unmodifiableMap HashMap entrySet hasNext assertInstance getKey keyClass allowNullKeys assertInstance getValue valueClass allowNullValues
public static Set safe Copy Set set Class c return safe Copy set c false  safeCopy safeCopy
public static Set safe Copy Set set Class c boolean allow Null Elements if set null c null throw new Null Pointer Exception set Collections unmodifiable Set new Hash Set set Iterator iterator set iterator while iterator has Next assert Instance iterator next c allow Null Elements return set  safeCopy allowNullElements NullPointerException unmodifiableSet HashSet hasNext assertInstance allowNullElements
public static Sorted Map safe Copy Sorted Map sorted Map Class key Class Class value Class return safe Copy sorted Map key Class value Class false false  SortedMap safeCopy SortedMap sortedMap keyClass valueClass safeCopy sortedMap keyClass valueClass
public static Sorted Map safe Copy Sorted Map sorted Map Class key Class Class value Class boolean allow Null Keys boolean allow Null Values if sorted Map null key Class null value Class null throw new Null Pointer Exception sorted Map Collections unmodifiable Sorted Map new Tree Map sorted Map Iterator iterator sorted Map entry Set iterator while iterator has Next Map Entry entry Map Entry iterator next assert Instance entry get Key key Class allow Null Keys assert Instance entry get Value value Class allow Null Values return sorted Map  SortedMap safeCopy SortedMap sortedMap keyClass valueClass allowNullKeys allowNullValues sortedMap keyClass valueClass NullPointerException sortedMap unmodifiableSortedMap TreeMap sortedMap sortedMap entrySet hasNext assertInstance getKey keyClass allowNullKeys assertInstance getValue valueClass allowNullValues sortedMap
public static Sorted Set safe Copy Sorted Set sorted Set Class c return safe Copy sorted Set c false  SortedSet safeCopy SortedSet sortedSet safeCopy sortedSet
public static Sorted Set safe Copy Sorted Set sorted Set Class c boolean allow Null Elements if sorted Set null c null throw new Null Pointer Exception sorted Set Collections unmodifiable Sorted Set new Tree Set sorted Set Iterator iterator sorted Set iterator while iterator has Next assert Instance iterator next c allow Null Elements return sorted Set  SortedSet safeCopy SortedSet sortedSet allowNullElements sortedSet NullPointerException sortedSet unmodifiableSortedSet TreeSet sortedSet sortedSet hasNext assertInstance allowNullElements sortedSet
public static boolean starts With List left List right boolean equals if left null right null return false else int l left size int r right size if r l equals r l return false for int i 0 i r i if equals left get i right get i return false return true  startsWith
public static boolean starts With Object left Object right boolean equals if left null right null return false else int l left length int r right length if r l equals r l return false for int i 0 i r i if equals left i right i return false return true  startsWith
public static String translate String Resource Bundle resource Bundle String key return Util translate String resource Bundle key key true true  translateString ResourceBundle resourceBundle translateString resourceBundle
public static String translate String Resource Bundle resource Bundle String key String string boolean signal boolean trim if resource Bundle null key null try final String translated String resource Bundle get String key if translated String null return trim translated String trim translated String catch Missing Resource Exception e Missing Resource if signal System err println e Missing Resource return trim string trim string  translateString ResourceBundle resourceBundle resourceBundle translatedString resourceBundle getString translatedString translatedString translatedString MissingResourceException eMissingResource eMissingResource
private Util 

private View Pane pane View Action Bars constructor comment public View Action Bars I Action Bars parent View Pane pane super parent this pane pane  ViewPane ViewActionBars ViewActionBars IActionBars ViewPane
Returns the menu manager If items are added or removed from the manager be sure to call code update Action Bars code return the menu manager public I Menu Manager get Menu Manager return pane get Menu Manager  updateActionBars IMenuManager getMenuManager getMenuManager
Returns the tool bar manager If items are added or removed from the manager be sure to call code update Action Bars code return the tool bar manager public I Tool Bar Manager get Tool Bar Manager return pane get Tool Bar Manager  updateActionBars IToolBarManager getToolBarManager getToolBarManager
Commits all UI changes This should be called after additions or subtractions have been made to a menu status line or toolbar public void update Action Bars pane update Action Bars get Status Line Manager update false fire Action Handlers Changed  updateActionBars updateActionBars getStatusLineManager fireActionHandlersChanged

Basic constructor public View Action Builder  ViewActionBuilder
Contribute the external menus and actions applicable for this view part private void contribute To Part I View Part part I Action Bars bars part get View Site get Action Bars contribute bars get Menu Manager bars get Tool Bar Manager true  contributeToPart IViewPart IActionBars getViewSite getActionBars getMenuManager getToolBarManager
Method declared on Plugin Action Builder protected Action Descriptor create Action Descriptor org eclipse core runtime I Configuration Element element return new Action Descriptor element Action Descriptor T VIEW target Part  PluginActionBuilder ActionDescriptor createActionDescriptor IConfigurationElement ActionDescriptor ActionDescriptor T_VIEW targetPart
Return all extended actions public Action Descriptor get Extended Actions if cache null return new Action Descriptor 0 Array List results new Array List for int i 0 i cache size i Basic Contribution bc Basic Contribution cache get i if bc actions null results add All bc actions return Action Descriptor results to Array new Action Descriptor results size  ActionDescriptor getExtendedActions ActionDescriptor ArrayList ArrayList BasicContribution BasicContribution addAll ActionDescriptor toArray ActionDescriptor
Reads and apply all external contributions for this view s ID registered in view Actions extension point public void read Action Extensions I View Part view Part target Part view Part read Contributions view Part get Site get Id TAG CONTRIBUTION TYPE I Workbench Constants PL VIEW ACTIONS contribute To Part target Part  viewActions readActionExtensions IViewPart viewPart targetPart viewPart readContributions viewPart getSite getId TAG_CONTRIBUTION_TYPE IWorkbenchConstants PL_VIEW_ACTIONS contributeToPart targetPart

Basic contstructor public Viewer Action Builder  ViewerActionBuilder
protected Action Descriptor create Action Descriptor I Configuration Element element Action Descriptor desc null if part instanceof I View Part desc new Action Descriptor element Action Descriptor T VIEW part else desc new Action Descriptor element Action Descriptor T EDITOR part if provider null Plugin Action action desc get Action provider add Selection Changed Listener action return desc  ActionDescriptor createActionDescriptor IConfigurationElement ActionDescriptor IViewPart ActionDescriptor ActionDescriptor T_VIEW ActionDescriptor ActionDescriptor T_EDITOR PluginAction getAction addSelectionChangedListener
Method declared on Plugin Action Builder protected Basic Contribution create Contribution return new Viewer Contribution provider  PluginActionBuilder BasicContribution createContribution ViewerContribution
Dispose of the action builder public void dispose if cache null for int i 0 i cache size i Array List actions Basic Contribution cache get i actions if actions null for int j 0 j actions size j Plugin Action proxy Action Descriptor actions get j get Action if proxy get Delegate instanceof I Action Delegate2 I Action Delegate2 proxy get Delegate dispose cache null  ArrayList BasicContribution PluginAction ActionDescriptor getAction getDelegate IActionDelegate2 IActionDelegate2 getDelegate
protected boolean read Element I Configuration Element element String tag element get Name Found visibility sub element if tag equals Plugin Action Builder TAG VISIBILITY Viewer Contribution current Contribution set Visibility Test element return true return super read Element element  readElement IConfigurationElement getName PluginActionBuilder TAG_VISIBILITY ViewerContribution currentContribution setVisibilityTest readElement
Reads the contributions for a viewer menu This method is typically used in conjunction with code contribute code to read and then insert actions for a particular viewer menu param id the menu id param prov the selection provider for the control containing the menu param part the part containing the menu return code true code if 1 or more items were read public boolean read Viewer Contributions String id I Selection Provider prov I Workbench Part part provider prov this part part read Contributions id TAG CONTRIBUTION TYPE I Workbench Constants PL POPUP MENU return cache null  readViewerContributions ISelectionProvider IWorkbenchPart readContributions TAG_CONTRIBUTION_TYPE IWorkbenchConstants PL_POPUP_MENU
private Action Expression visibility Test public Viewer Contribution I Selection Provider sel Provider super this sel Provider sel Provider  ActionExpression visibilityTest ViewerContribution ISelectionProvider selProvider selProvider selProvider
public void set Visibility Test I Configuration Element element visibility Test new Action Expression element  setVisibilityTest IConfigurationElement visibilityTest ActionExpression
public void contribute I Menu Manager menu boolean menu Append If Missing I Tool Bar Manager toolbar boolean tool Append If Missing boolean visible true if visibility Test null I Selection selection sel Provider get Selection if selection instanceof I Structured Selection visible visibility Test is Enabled For I Structured Selection selection else visible visibility Test is Enabled For selection if visible super contribute menu menu Append If Missing toolbar tool Append If Missing  IMenuManager menuAppendIfMissing IToolBarManager toolAppendIfMissing visibilityTest ISelection selProvider getSelection IStructuredSelection visibilityTest isEnabledFor IStructuredSelection visibilityTest isEnabledFor menuAppendIfMissing toolAppendIfMissing

private boolean create true public View Reference String id I Memento memento this id null memento  ViewReference IMemento
public View Reference String id String secondary Id I Memento memento View Descriptor desc View Descriptor view Reg find id Image Descriptor i Desc null String title null if desc null i Desc desc get Image Descriptor title desc get Label String name null if memento null name memento get String I Workbench Constants TAG PART NAME if name null name title init id title null i Desc name null this secondary Id secondary Id  ViewReference secondaryId IMemento ViewDescriptor ViewDescriptor viewReg ImageDescriptor iDesc iDesc getImageDescriptor getLabel getString IWorkbenchConstants TAG_PART_NAME iDesc secondaryId secondaryId
see org eclipse ui internal Workbench Part Reference dispose public void dispose super dispose create false  WorkbenchPartReference
see org eclipse ui I Workbench Part Reference get Page public I Workbench Page get Page return page  IWorkbenchPartReference getPage IWorkbenchPage getPage
public I Workbench Part get Part boolean restore if part null return part if create return null if restore I Status status restore View this if status get Severity I Status ERROR create false Workbench workbench Workbench PlatformUI get Workbench if workbench is Starting Error Dialog open Error page get Workbench Window get Shell Workbench Messages get String View Factory unable To Restore View Title NON NLS 1 Workbench Messages format View Factory unable To Restore View Message new String get Title NON NLS 1 status I Status WARNING I Status ERROR else release References return part  IWorkbenchPart getPart IStatus restoreView getSeverity IStatus getWorkbench isStarting ErrorDialog openError getWorkbenchWindow getShell WorkbenchMessages getString ViewFactory unableToRestoreViewTitle WorkbenchMessages ViewFactory unableToRestoreViewMessage getTitle IStatus IStatus releaseReferences
public String get Registered Name if part null part get Site null return part get Site get Registered Name I View Registry reg view Reg I View Descriptor desc reg find get Id if desc null return desc get Label return get Title  getRegisteredName getSite getSite getRegisteredName IViewRegistry viewReg IViewDescriptor getId getLabel getTitle
protected String compute Part Name if part instanceof I Workbench Part2 return super compute Part Name else return get Registered Name  computePartName IWorkbenchPart2 computePartName getRegisteredName
protected String compute Content Description if part instanceof I Workbench Part2 return super compute Content Description else String raw Title get Raw Title if Util equals raw Title get Registered Name return raw Title return NON NLS 1  computeContentDescription IWorkbenchPart2 computeContentDescription rawTitle getRawTitle rawTitle getRegisteredName rawTitle
see org eclipse ui I View Reference public String get Secondary Id return secondary Id  IViewReference getSecondaryId secondaryId
see org eclipse ui I View Reference get View boolean public I View Part get View boolean restore return I View Part get Part restore  IViewReference getView IViewPart getView IViewPart getPart
see org eclipse ui I View Reference is Fast View public boolean is Fast View return page is Fast View this  IViewReference isFastView isFastView isFastView
Returns a string representing a view with the given id and optional secondary id suitable for use as a key in a map param id primary id of the view param secondary Id secondary id of the view or code null code return the key static String get Key String id String secondary Id return secondary Id null id id ID SEP secondary Id  secondaryId getKey secondaryId secondaryId ID_SEP secondaryId
Returns a string representing the given view reference suitable for use as a key in a map param view Ref the view reference return the key static String get Key I View Reference view Ref return get Key view Ref get Id view Ref get Secondary Id  viewRef getKey IViewReference viewRef getKey viewRef getId viewRef getSecondaryId
Extracts ths primary id portion of a compound id param compound Id a compound id of the form primary Id secondary Id return the primary id static String extract Primary Id String compound Id int i compound Id last Index Of ID SEP if i 1 return compound Id return compound Id substring 0 i  compoundId primaryId secondaryId extractPrimaryId compoundId compoundId lastIndexOf ID_SEP compoundId compoundId
Extracts ths secondary id portion of a compound id param compound Id a compound id of the form primary Id secondary Id return the secondary id or code null code if none static String extract Secondary Id String compound Id int i compound Id last Index Of ID SEP if i 1 return null return compound Id substring i 1  compoundId primaryId secondaryId extractSecondaryId compoundId compoundId lastIndexOf ID_SEP compoundId
Constructs a new view factory public View Factory Workbench Page page I View Registry reg super this page page this view Reg reg counter new Reference Counter  ViewFactory WorkbenchPage IViewRegistry viewReg ReferenceCounter
Platform run new Safe Runnable public void handle Exception Throwable e if reset Part 0 View Reference view Ref View Reference ref view Ref set Part null if view Ref get Pane null page hide View ref Execption is already logged result 0 new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format Perspective exception Restoring View new String key NON NLS 1 e  SafeRunnable handleException resetPart ViewReference viewRef ViewReference viewRef setPart viewRef getPane hideView IStatus PLUGIN_ID WorkbenchMessages exceptionRestoringView
public void run I View Descriptor desc view Reg find ref get Id if desc null result 0 new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format View Factory could Not Create new Object key NON NLS 1 null return Create the view I View Part view null String label desc get Label try try UI Stats start UI Stats CREATE PART label view desc create View finally UI Stats end UI Stats CREATE PART label View Reference ref set Part view catch Core Exception e Part Pane pane View Reference ref get Pane if pane null page get Perspective Presentation remove Part pane pane dispose result 0 new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format View Factory init Exception new Object desc getID NON NLS 1 e return Create site View Site site new View Site ref view page desc Part Pane pane View Reference ref get Pane if pane null pane new View Pane ref page View Reference ref set Pane pane site set Pane pane site set Action Bars new View Action Bars page get Action Bars View Pane pane try try UI Stats start UI Stats INIT PART label view init site state Mem finally UI Stats end UI Stats INIT PART label catch Part Init Exception e release View ref result 0 new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format Perspective exception Restoring View new String key NON NLS 1 e return if view get Site site release View ref result 0 new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format View Factory site Exception new Object desc getID NON NLS 1 null return reset Part 0 false Control ctrl pane get Control if ctrl null pane create Control page get Client Composite else pane create Child Control result 0 new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1  IViewDescriptor viewReg getId IStatus PLUGIN_ID WorkbenchMessages ViewFactory couldNotCreate IViewPart getLabel UIStats UIStats CREATE_PART createView UIStats UIStats CREATE_PART ViewReference setPart CoreException PartPane ViewReference getPane getPerspectivePresentation removePart IStatus PLUGIN_ID WorkbenchMessages ViewFactory initException ViewSite ViewSite PartPane ViewReference getPane ViewPane ViewReference setPane setPane setActionBars ViewActionBars getActionBars ViewPane UIStats UIStats INIT_PART stateMem UIStats UIStats INIT_PART PartInitException releaseView IStatus PLUGIN_ID WorkbenchMessages exceptionRestoringView getSite releaseView IStatus PLUGIN_ID WorkbenchMessages ViewFactory siteException resetPart getControl createControl getClientComposite createChildControl IStatus PLUGIN_ID
param ref the code I View Reference code to restore return code I Status code public I Status busy Restore View final I View Reference ref if ref get Part false null return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1 final String key get Key ref final I Memento state Mem get View State key memento Table remove key final boolean reset Part true final I Status result new I Status new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1 Platform run new Safe Runnable public void handle Exception Throwable e if reset Part 0 View Reference view Ref View Reference ref view Ref set Part null if view Ref get Pane null page hide View ref Execption is already logged result 0 new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format Perspective exception Restoring View new String key NON NLS 1 e public void run I View Descriptor desc view Reg find ref get Id if desc null result 0 new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format View Factory could Not Create new Object key NON NLS 1 null return Create the view I View Part view null String label desc get Label try try UI Stats start UI Stats CREATE PART label view desc create View finally UI Stats end UI Stats CREATE PART label View Reference ref set Part view catch Core Exception e Part Pane pane View Reference ref get Pane if pane null page get Perspective Presentation remove Part pane pane dispose result 0 new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format View Factory init Exception new Object desc getID NON NLS 1 e return Create site View Site site new View Site ref view page desc Part Pane pane View Reference ref get Pane if pane null pane new View Pane ref page View Reference ref set Pane pane site set Pane pane site set Action Bars new View Action Bars page get Action Bars View Pane pane try try UI Stats start UI Stats INIT PART label view init site state Mem finally UI Stats end UI Stats INIT PART label catch Part Init Exception e release View ref result 0 new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format Perspective exception Restoring View new String key NON NLS 1 e return if view get Site site release View ref result 0 new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format View Factory site Exception new Object desc getID NON NLS 1 null return reset Part 0 false Control ctrl pane get Control if ctrl null pane create Control page get Client Composite else pane create Child Control result 0 new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1 return result 0  IViewReference IStatus IStatus busyRestoreView IViewReference getPart IStatus PLUGIN_ID getKey IMemento stateMem getViewState mementoTable resetPart IStatus IStatus IStatus PLUGIN_ID SafeRunnable handleException resetPart ViewReference viewRef ViewReference viewRef setPart viewRef getPane hideView IStatus PLUGIN_ID WorkbenchMessages exceptionRestoringView IViewDescriptor viewReg getId IStatus PLUGIN_ID WorkbenchMessages ViewFactory couldNotCreate IViewPart getLabel UIStats UIStats CREATE_PART createView UIStats UIStats CREATE_PART ViewReference setPart CoreException PartPane ViewReference getPane getPerspectivePresentation removePart IStatus PLUGIN_ID WorkbenchMessages ViewFactory initException ViewSite ViewSite PartPane ViewReference getPane ViewPane ViewReference setPane setPane setActionBars ViewActionBars getActionBars ViewPane UIStats UIStats INIT_PART stateMem UIStats UIStats INIT_PART PartInitException releaseView IStatus PLUGIN_ID WorkbenchMessages exceptionRestoringView getSite releaseView IStatus PLUGIN_ID WorkbenchMessages ViewFactory siteException resetPart getControl createControl getClientComposite createChildControl IStatus PLUGIN_ID
Creates an instance of a view defined by id This factory implements reference counting The first call to this method will return a new view Subsequent calls will return the first view with an additional reference count The view is disposed when release View is called an equal number of times to get View public I View Reference create View final String id throws Part Init Exception return create View id null  releaseView getView IViewReference createView PartInitException createView
Creates an instance of a view defined by id and secondary id This factory implements reference counting The first call to this method will return a new view Subsequent calls will return the first view with an additional reference count The view is disposed when release View is called an equal number of times to create View public I View Reference create View String id String secondary Id throws Part Init Exception I View Descriptor desc view Reg find id ensure that the view id is valid if desc null throw new Part Init Exception Workbench Messages format View Factory could Not Create new Object id NON NLS 1 ensure that multiple instances are allowed if a secondary id is given if secondary Id null if desc get Allow Multiple throw new Part Init Exception Workbench Messages format View Factory no Multiple new Object id NON NLS 1 String key get Key id secondary Id I View Reference ref I View Reference counter get key if ref null I Memento memento I Memento memento Table get key ref new View Reference id secondary Id memento counter put key ref else counter add Ref key return ref  releaseView createView IViewReference createView secondaryId PartInitException IViewDescriptor viewReg PartInitException WorkbenchMessages ViewFactory couldNotCreate secondaryId getAllowMultiple PartInitException WorkbenchMessages ViewFactory noMultiple getKey secondaryId IViewReference IViewReference IMemento IMemento mementoTable ViewReference secondaryId addRef
Remove a view rec from the manager The I View Part dispose method must be called at a higher level private void destroy View I View Part view Free action bars pane etc Part Site site Part Site view get Site View Action Bars action Bars View Action Bars site get Action Bars action Bars dispose Part Pane pane site get Pane pane dispose Free the site site dispose  IViewPart destroyView IViewPart PartSite PartSite getSite ViewActionBars actionBars ViewActionBars getActionBars actionBars PartPane getPane
Returns the view with the given id or code null code if not found public I View Reference get View String id return get View id null  IViewReference getView getView
Returns the view with the given id and secondary id or code null code if not found public I View Reference get View String id String secondary Id String key get Key id secondary Id return I View Reference counter get key  IViewReference getView secondaryId getKey secondaryId IViewReference
return the code I View Registry code used by this factory since 3 0 public I View Registry get View Registry return view Reg  IViewRegistry IViewRegistry getViewRegistry viewReg
Returns a list of views which are open public I View Reference get Views List list counter values I View Reference array new I View Reference list size list to Array array return array  IViewReference getViews IViewReference IViewReference toArray
return the code Workbench Page code used by this factory since 3 0 public Workbench Page get Workbench Page return page  WorkbenchPage WorkbenchPage getWorkbenchPage
Returns whether a view with the same id s as the given view reference exists public boolean has View I View Reference view Ref return has View view Ref get Id view Ref get Secondary Id  hasView IViewReference viewRef hasView viewRef getId viewRef getSecondaryId
Returns whether a view with the given id exists public boolean has View String id return has View id null  hasView hasView
Returns whether a view with the given ids exists public boolean has View String id String secondary Id return get View id secondary Id null  hasView secondaryId getView secondaryId
Releases an instance of a view This factory does reference counting For more info see get View public void release View I View Reference view Ref String key get Key view Ref I View Reference ref I View Reference counter get key if ref null return int count counter remove Ref key if count 0 I View Part view I View Part ref get Part false if view null destroy View view  getView releaseView IViewReference viewRef getKey viewRef IViewReference IViewReference removeRef IViewPart IViewPart getPart destroyView
Restore view states param memento the code I Memento code to restore from return code I Status code public I Status restore State I Memento memento I Memento mem memento get Children I Workbench Constants TAG VIEW for int i 0 i mem length i for dynamic UI add the next line to replace subsequent code that is commented out restore View State mem i return new Status I Status OK PlatformUI PLUGIN ID 0 null NON NLS 1  IMemento IStatus IStatus restoreState IMemento IMemento getChildren IWorkbenchConstants TAG_VIEW restoreViewState IStatus PLUGIN_ID
final I Status result new I Status 1 Busy Indicator show While page get Workbench Window get Shell get Display new Runnable public void run result 0 busy Restore View ref  IStatus IStatus BusyIndicator showWhile getWorkbenchWindow getShell getDisplay busyRestoreView
Creates an instance of a view defined by id This factory implements reference counting The first call to this method will return a new view Subsequent calls will return the first view with an additional reference count The view is disposed when release View is called an equal number of times to get View public I Status restore View final I View Reference ref final I Status result new I Status 1 Busy Indicator show While page get Workbench Window get Shell get Display new Runnable public void run result 0 busy Restore View ref return result 0  releaseView getView IStatus restoreView IViewReference IStatus IStatus BusyIndicator showWhile getWorkbenchWindow getShell getDisplay busyRestoreView
Save view states param memento the code I Memento code to save to return code I Status code public I Status save State I Memento memento final Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String View Factory problems Saving Views null NON NLS 1 final I View Reference refs get Views for int i 0 i refs length i for dynamic UI add the following line to replace subsequent code which is commented out save View State memento refs i result return result  IMemento IStatus IStatus saveState IMemento MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString ViewFactory problemsSavingViews IViewReference getViews saveViewState
if view null Platform run new Safe Runnable public void run view save State view Memento create Child I Workbench Constants TAG VIEW STATE  SafeRunnable saveState viewMemento createChild IWorkbenchConstants TAG_VIEW_STATE
public void handle Exception Throwable e result add new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format View Factory could Not Save new String view Ref get Title NON NLS 1 e  handleException IStatus PLUGIN_ID WorkbenchMessages ViewFactory couldNotSave viewRef getTitle
for dynamic UI public I Memento save View State I Memento memento I View Reference ref Multi Status res final Multi Status result res final I Memento view Memento memento create Child I Workbench Constants TAG VIEW view Memento put String I Workbench Constants TAG ID View Factory get Key ref if ref instanceof View Reference view Memento put String I Workbench Constants TAG PART NAME View Reference ref get Part Name final I View Reference view Ref ref final I View Part view I View Part ref get Part false if view null Platform run new Safe Runnable public void run view save State view Memento create Child I Workbench Constants TAG VIEW STATE public void handle Exception Throwable e result add new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format View Factory could Not Save new String view Ref get Title NON NLS 1 e else I Memento mem get View State View Factory get Key ref if mem null I Memento child view Memento create Child I Workbench Constants TAG VIEW STATE child put Memento mem return view Memento  IMemento saveViewState IMemento IViewReference MultiStatus MultiStatus IMemento viewMemento createChild IWorkbenchConstants TAG_VIEW viewMemento putString IWorkbenchConstants TAG_ID ViewFactory getKey ViewReference viewMemento putString IWorkbenchConstants TAG_PART_NAME ViewReference getPartName IViewReference viewRef IViewPart IViewPart getPart SafeRunnable saveState viewMemento createChild IWorkbenchConstants TAG_VIEW_STATE handleException IStatus PLUGIN_ID WorkbenchMessages ViewFactory couldNotSave viewRef getTitle IMemento getViewState ViewFactory getKey IMemento viewMemento createChild IWorkbenchConstants TAG_VIEW_STATE putMemento viewMemento
for dynamic UI public void restore View State I Memento memento String compound Id memento get String I Workbench Constants TAG ID memento Table put compound Id memento  restoreViewState IMemento compoundId getString IWorkbenchConstants TAG_ID mementoTable compoundId
private I Memento get View State String key I Memento memento I Memento memento Table get key if memento null return null return memento get Child I Workbench Constants TAG VIEW STATE  IMemento getViewState IMemento IMemento mementoTable getChild IWorkbenchConstants TAG_VIEW_STATE

Part Site get Site get Pane add Property Change Listener new I Property Change Listener public void property Change Property Change Event event if handle Zoom Events if event get Property equals Part Pane PROP ZOOMED boolean standby Boolean event get New Value boolean Value set Standby standby  PartSite getSite getPane addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent handleZoomEvents getProperty PartPane PROP_ZOOMED getNewValue booleanValue setStandby
Adds a listener that toggles standby state if the view pane is zoomed private void add Pane Listener Part Site get Site get Pane add Property Change Listener new I Property Change Listener public void property Change Property Change Event event if handle Zoom Events if event get Property equals Part Pane PROP ZOOMED boolean standby Boolean event get New Value boolean Value set Standby standby  addPaneListener PartSite getSite getPane addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent handleZoomEvents getProperty PartPane PROP_ZOOMED getNewValue booleanValue setStandby
Busy Indicator show While control get Display new Runnable public void run try control set Redraw false intro Part standby State Changed standby finally control set Redraw true Workbench Window window Workbench Window Part Site get Site get Pane get Workbench Window if standby window set Cool Bar Visible true window set Perspective Bar Visible true else window set Cool Bar Visible false window set Perspective Bar Visible false window get Shell layout  BusyIndicator showWhile getDisplay setRedraw introPart standbyStateChanged setRedraw WorkbenchWindow WorkbenchWindow PartSite getSite getPane getWorkbenchWindow setCoolBarVisible setPerspectiveBarVisible setCoolBarVisible setPerspectiveBarVisible getShell
Forces the standby state of the intro part param standby update the standby state public void set Standby final boolean standby final Control control Part Site get Site get Pane get Control Busy Indicator show While control get Display new Runnable public void run try control set Redraw false intro Part standby State Changed standby finally control set Redraw true Workbench Window window Workbench Window Part Site get Site get Pane get Workbench Window if standby window set Cool Bar Visible true window set Perspective Bar Visible true else window set Cool Bar Visible false window set Perspective Bar Visible false window get Shell layout  setStandby PartSite getSite getPane getControl BusyIndicator showWhile getDisplay setRedraw introPart standbyStateChanged setRedraw WorkbenchWindow WorkbenchWindow PartSite getSite getPane getWorkbenchWindow setCoolBarVisible setPerspectiveBarVisible setCoolBarVisible setPerspectiveBarVisible getShell
Toggles handling of zoom events param handle whether to handle zoom events public void set Handle Zoom Events boolean handle handle Zoom Events handle  setHandleZoomEvents handleZoomEvents
see org eclipse ui I Workbench Part create Part Control org eclipse swt widgets Composite public void create Part Control Composite parent add Pane Listener intro Part create Part Control parent  IWorkbenchPart createPartControl createPartControl addPaneListener introPart createPartControl
public void dispose super dispose get Site get Workbench Window get Workbench get Intro Manager close Intro intro Part intro Part dispose  getSite getWorkbenchWindow getWorkbench getIntroManager closeIntro introPart introPart
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return intro Part get Adapter adapter  IAdaptable getAdapter getAdapter introPart getAdapter
see org eclipse ui I Workbench Part get Title Image public Image get Title Image return intro Part get Title Image  IWorkbenchPart getTitleImage getTitleImage introPart getTitleImage
intro Part workbench get Workbench Intro Manager create New Intro Part intro Part add Property Listener new I Property Listener public void property Changed Object source int prop Id fire Property Change prop Id  introPart getWorkbenchIntroManager createNewIntroPart introPart addPropertyListener IPropertyListener propertyChanged propId firePropertyChange propId
public void init I View Site site I Memento memento throws Part Init Exception super init site Workbench workbench Workbench site get Workbench Window get Workbench try intro Part workbench get Workbench Intro Manager create New Intro Part intro Part add Property Listener new I Property Listener public void property Changed Object source int prop Id fire Property Change prop Id intro Site new View Intro Adapter Site site workbench get Intro Descriptor intro Part init intro Site memento catch Core Exception e Workbench Plugin log Intro Messages get String Intro could not create proxy new Status I Status ERROR Workbench Plugin PI WORKBENCH I Status ERROR Intro Messages get String Intro could not create proxy e NON NLS 1 NON NLS 2  IViewSite IMemento PartInitException getWorkbenchWindow getWorkbench introPart getWorkbenchIntroManager createNewIntroPart introPart addPropertyListener IPropertyListener propertyChanged propId firePropertyChange propId introSite ViewIntroAdapterSite getIntroDescriptor introPart introSite CoreException WorkbenchPlugin IntroMessages getString could_not_create_proxy IStatus WorkbenchPlugin PI_WORKBENCH IStatus IntroMessages getString could_not_create_proxy
see org eclipse ui I Workbench Part set Focus public void set Focus intro Part set Focus  IWorkbenchPart setFocus setFocus introPart setFocus
see org eclipse ui I View Part save State org eclipse ui I Memento public void save State I Memento memento intro Part save State memento  IViewPart saveState IMemento saveState IMemento introPart saveState

private I View Site view Site public View Intro Adapter Site I View Site view Site Intro Descriptor descriptor this view Site view Site this descriptor descriptor  IViewSite viewSite ViewIntroAdapterSite IViewSite viewSite IntroDescriptor viewSite viewSite
see org eclipse ui intro I Intro Site get Action Bars public I Action Bars get Action Bars return view Site get Action Bars  IIntroSite getActionBars IActionBars getActionBars viewSite getActionBars
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return view Site get Adapter adapter  IAdaptable getAdapter getAdapter viewSite getAdapter
see org eclipse ui I Workbench Part Site get Id public String get Id return descriptor get Id  IWorkbenchPartSite getId getId getId
see org eclipse ui I Workbench Part Site get Key Binding Service public I Key Binding Service get Key Binding Service return view Site get Key Binding Service  IWorkbenchPartSite getKeyBindingService IKeyBindingService getKeyBindingService viewSite getKeyBindingService
see org eclipse ui I Workbench Site get Page public I Workbench Page get Page return view Site get Page  IWorkbenchSite getPage IWorkbenchPage getPage viewSite getPage
see org eclipse ui I Workbench Part Site get Plugin Id public String get Plugin Id return descriptor get Plugin Id  IWorkbenchPartSite getPluginId getPluginId getPluginId
see org eclipse ui I Workbench Site get Selection Provider public I Selection Provider get Selection Provider return view Site get Selection Provider  IWorkbenchSite getSelectionProvider ISelectionProvider getSelectionProvider viewSite getSelectionProvider
see org eclipse ui I Workbench Site get Shell public Shell get Shell return view Site get Shell  IWorkbenchSite getShell getShell viewSite getShell
see org eclipse ui I Workbench Site get Workbench Window public I Workbench Window get Workbench Window return view Site get Workbench Window  IWorkbenchSite getWorkbenchWindow IWorkbenchWindow getWorkbenchWindow viewSite getWorkbenchWindow
see org eclipse ui I Workbench Site set Selection Provider org eclipse jface viewers I Selection Provider public void set Selection Provider I Selection Provider provider view Site set Selection Provider provider  IWorkbenchSite setSelectionProvider ISelectionProvider setSelectionProvider ISelectionProvider viewSite setSelectionProvider
see java lang Object to String public String to String return view Site to String  toString toString viewSite toString

public View Layout Page Layout page Layout View Layout Rec rec Assert is Not Null page Layout Assert is Not Null rec this page Layout page Layout this rec rec  ViewLayout PageLayout pageLayout ViewLayoutRec isNotNull pageLayout isNotNull pageLayout pageLayout
see org eclipse ui I View Layout get Show Title public boolean get Show Title return rec show Title  IViewLayout getShowTitle getShowTitle showTitle
see org eclipse ui I View Layout is Closeable public boolean is Closeable return rec is Closeable  IViewLayout isCloseable isCloseable isCloseable
see org eclipse ui I View Layout is Moveable public boolean is Moveable return rec is Moveable  IViewLayout isMoveable isMoveable isMoveable
see org eclipse ui I View Layout is Standalone public boolean is Standalone return rec is Standalone  IViewLayout isStandalone isStandalone isStandalone
see org eclipse ui I View Layout set Closeable boolean public void set Closeable boolean closeable rec is Closeable closeable  IViewLayout setCloseable setCloseable isCloseable
see org eclipse ui I View Layout set Moveable boolean public void set Moveable boolean moveable rec is Moveable moveable  IViewLayout setMoveable setMoveable isMoveable

class Pane Tool Bar Manager extends Tool Bar Manager public Pane Tool Bar Manager int style super style  PaneToolBarManager ToolBarManager PaneToolBarManager
protected void relayout Tool Bar tool Bar int old Count int new Count tool Bar Resized tool Bar new Count tool Bar layout  ToolBar toolBar oldCount newCount toolBarResized toolBar newCount toolBar
class Pane Menu Manager extends Menu Manager public Pane Menu Manager super View Local Menu NON NLS 1  PaneMenuManager MenuManager PaneMenuManager
protected void update boolean force boolean recursive super update force recursive boolean has Menu is Empty if has Menu had View Menu had View Menu has Menu presentable Adapter fire Property Change I Presentable Part PROP PANE MENU  hasMenu isEmpty hasMenu hadViewMenu hadViewMenu hasMenu presentableAdapter firePropertyChange IPresentablePart PROP_PANE_MENU
Constructs a view pane for a view part public View Pane I View Reference ref Workbench Page page super ref page fast ref is Fast View  ViewPane IViewReference WorkbenchPage isFastView
Create control Add the title bar public void create Control Composite parent Only do this once if get Control null get Control is Disposed return super create Control parent  createControl getControl getControl isDisposed createControl
Platform run new Safe Runnable public void run Install the part s tools and menu View Action Builder builder new View Action Builder I View Part part I View Part get View Reference get Part true if part null builder read Action Extensions part Action Descriptor action Descriptors builder get Extended Actions Key Binding Service key Binding Service Key Binding Service part get Site get Key Binding Service if action Descriptors null for int i 0 i action Descriptors length i Action Descriptor action Descriptor action Descriptors i if action Descriptor null I Action action action Descriptors i get Action if action null action get Action Definition Id null key Binding Service register Action action update Action Bars  SafeRunnable ViewActionBuilder ViewActionBuilder IViewPart IViewPart getViewReference getPart readActionExtensions ActionDescriptor actionDescriptors getExtendedActions KeyBindingService keyBindingService KeyBindingService getSite getKeyBindingService actionDescriptors actionDescriptors ActionDescriptor actionDescriptor actionDescriptors actionDescriptor IAction actionDescriptors getAction getActionDefinitionId keyBindingService registerAction updateActionBars
update Action Bars public void handle Exception Throwable e Just have it logged  updateActionBars handleException
protected void create Child Control final I Workbench Part part new I Workbench Part part Reference get Part false if part 0 null return if control null return super create Child Control Platform run new Safe Runnable public void run Install the part s tools and menu View Action Builder builder new View Action Builder I View Part part I View Part get View Reference get Part true if part null builder read Action Extensions part Action Descriptor action Descriptors builder get Extended Actions Key Binding Service key Binding Service Key Binding Service part get Site get Key Binding Service if action Descriptors null for int i 0 i action Descriptors length i Action Descriptor action Descriptor action Descriptors i if action Descriptor null I Action action action Descriptors i get Action if action null action get Action Definition Id null key Binding Service register Action action update Action Bars public void handle Exception Throwable e Just have it logged  createChildControl IWorkbenchPart IWorkbenchPart partReference getPart createChildControl SafeRunnable ViewActionBuilder ViewActionBuilder IViewPart IViewPart getViewReference getPart readActionExtensions ActionDescriptor actionDescriptors getExtendedActions KeyBindingService keyBindingService KeyBindingService getSite getKeyBindingService actionDescriptors actionDescriptors ActionDescriptor actionDescriptor actionDescriptors actionDescriptor IAction actionDescriptors getAction getActionDefinitionId keyBindingService registerAction updateActionBars handleException
private void recreate Toolbars create new toolbars based on the locked vs locked state create Tool Bars create new toolbars update Action Bars  recreateToolbars createToolBars updateActionBars
private Text text public void create Part Control Composite parent text new Text parent SWT MULTI SWT READ ONLY SWT WRAP text set Foreground J Face Colors get Error Text text get Display text set Background text get Display get System Color SWT COLOR WIDGET BACKGROUND text set Text Workbench Messages get String View Pane error Message NON NLS 1  createPartControl READ_ONLY setForeground JFaceColors getErrorText getDisplay setBackground getDisplay getSystemColor COLOR_WIDGET_BACKGROUND setText WorkbenchMessages getString ViewPane errorMessage
text set Text Workbench Messages get String View Pane error Message NON NLS 1 public void set Focus if text null text set Focus  setText WorkbenchMessages getString ViewPane errorMessage setFocus setFocus
text set Focus public void set Site I Workbench Part Site site super set Site site  setFocus setSite IWorkbenchPartSite setSite
super set Site site public void set Part Name String title super set Part Name title  setSite setPartName setPartName
protected I Workbench Part create Error Part I Workbench Part old Part class Error View Part extends View Part private Text text public void create Part Control Composite parent text new Text parent SWT MULTI SWT READ ONLY SWT WRAP text set Foreground J Face Colors get Error Text text get Display text set Background text get Display get System Color SWT COLOR WIDGET BACKGROUND text set Text Workbench Messages get String View Pane error Message NON NLS 1 public void set Focus if text null text set Focus public void set Site I Workbench Part Site site super set Site site public void set Part Name String title super set Part Name title Error View Part new Part new Error View Part Part Site site Part Site old Part get Site new Part set Site site new Part set Part Name site get Registered Name site set Part new Part return new Part  IWorkbenchPart createErrorPart IWorkbenchPart oldPart ErrorViewPart ViewPart createPartControl READ_ONLY setForeground JFaceColors getErrorText getDisplay setBackground getDisplay getSystemColor COLOR_WIDGET_BACKGROUND setText WorkbenchMessages getString ViewPane errorMessage setFocus setFocus setSite IWorkbenchPartSite setSite setPartName setPartName ErrorViewPart newPart ErrorViewPart PartSite PartSite oldPart getSite newPart setSite newPart setPartName getRegisteredName setPart newPart newPart
Create a title bar for the pane the view icon and title to the far left the view toolbar appears in the middle the view pulldown menu pin button and close button to the far right protected void create Title Bar Only do this once update Titles Listen to title changes get Part Reference add Property Listener this create Tool Bars  createTitleBar updateTitles getPartReference addPropertyListener createToolBars
private void tool Bar Resized Tool Bar tool Bar int new Size if isv Tool Bar null Control ctrl get Control boolean visible ctrl null ctrl is Visible toolbar Is Visible isv Tool Bar set Visible visible presentable Adapter fire Property Change I Presentable Part PROP TOOLBAR  toolBarResized ToolBar toolBar newSize isvToolBar getControl isVisible toolbarIsVisible isvToolBar setVisible presentableAdapter firePropertyChange IPresentablePart PROP_TOOLBAR
View Form2 control set Top Center isv Tool Bar isv Tool Bar add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event event if isv Tool Bar get Item new Point event x event y null do Zoom  ViewForm2 setTopCenter isvToolBar isvToolBar addMouseListener MouseAdapter mouseDoubleClick MouseEvent isvToolBar getItem doZoom
private void create Tool Bars Composite parent Control control ISV toolbar 1GD0ISU ITPUI ALL Dbl click on view tool cause zoom isv Tool Bar isv Tool Bar Mgr create Control parent Control get Parent if locked View Form2 control set Top Center isv Tool Bar isv Tool Bar add Mouse Listener new Mouse Adapter public void mouse Double Click Mouse Event event if isv Tool Bar get Item new Point event x event y null do Zoom else isv Tool Bar set Layout Data new Grid Data Grid Data FILL BOTH isv Tool Bar add Listener SWT Activate this  createToolBars parentControl isvToolBar isvToolBarMgr createControl parentControl getParent ViewForm2 setTopCenter isvToolBar isvToolBar addMouseListener MouseAdapter mouseDoubleClick MouseEvent isvToolBar getItem doZoom isvToolBar setLayoutData GridData GridData FILL_BOTH isvToolBar addListener
public void dispose super dispose Bug 42684 The View Pane instance has been disposed but an attempt is then made to remove focus from it This happens because the View Pane is still viewed as the active part In general when disposed the control containing the title Label will also disappear disposing of the title Label As a result the reference to title Label should be dropped if isv Menu Mgr null isv Menu Mgr dispose if isv Tool Bar Mgr null isv Tool Bar Mgr dispose  ViewPane ViewPane titleLabel titleLabel titleLabel isvMenuMgr isvMenuMgr isvToolBarMgr isvToolBarMgr
see Part Pane do Hide public void do Hide get Page hide View get View Reference  PartPane doHide doHide getPage hideView getViewReference
private Rectangle get Parent Bounds Control ctrl get Control if get Container null get Container instanceof Layout Part Layout Part part Layout Part get Container if part get Control null ctrl part get Control return Drag Util get Display Bounds ctrl  getParentBounds getControl getContainer getContainer LayoutPart LayoutPart LayoutPart getContainer getControl getControl DragUtil getDisplayBounds
Make this view pane a fast view public void do Make Fast Workbench Window window Workbench Window get Page get Workbench Window Fast View Bar fast View Bar window get Fast View Bar if fast View Bar null return Shell shell window get Shell Rectangle Animation animation new Rectangle Animation shell get Parent Bounds fast View Bar get Location Of Next Icon animation schedule get Page add Fast View get View Reference  doMakeFast WorkbenchWindow WorkbenchWindow getPage getWorkbenchWindow FastViewBar fastViewBar getFastViewBar fastViewBar getShell RectangleAnimation RectangleAnimation getParentBounds fastViewBar getLocationOfNextIcon getPage addFastView getViewReference
public void do Remove Fast Shell shell get Control get Shell Rectangle initial Bounds get Parent Bounds get Page remove Fast View get View Reference Rectangle final Bounds get Parent Bounds Rectangle Animation animation new Rectangle Animation shell initial Bounds final Bounds animation schedule  doRemoveFast getControl getShell initialBounds getParentBounds getPage removeFastView getViewReference finalBounds getParentBounds RectangleAnimation RectangleAnimation initialBounds finalBounds
Pin the view protected void do Dock get Page remove Fast View get View Reference  doDock getPage removeFastView getViewReference
public String get Compound Id I View Reference ref get View Reference if ref null return View Factory get Key ref else return super get Compound Id  getCompoundId IViewReference getViewReference ViewFactory getKey getCompoundId
Returns the drag control public Control get Drag Handle return control  getDragHandle
see View Action Bars public Menu Manager get Menu Manager if isv Menu Mgr null isv Menu Mgr new Pane Menu Manager return isv Menu Mgr  ViewActionBars MenuManager getMenuManager isvMenuMgr isvMenuMgr PaneMenuManager isvMenuMgr
Returns the tab list to use when this part is active Includes the view and its tab if applicable in the appropriate order public Control get Tab List Control c get Control if get Container instanceof View Stack View Stack tf View Stack get Container return tf get Tab List this return new Control c  getTabList getControl getContainer ViewStack ViewStack ViewStack getContainer getTabList
see View Action Bars public Tool Bar Manager get Tool Bar Manager return isv Tool Bar Mgr  ViewActionBars ToolBarManager getToolBarManager isvToolBarMgr
Answer the view part child public I View Reference get View Reference return I View Reference get Part Reference  IViewReference getViewReference IViewReference getPartReference
Indicates that a property has changed param source the object whose property has changed param prop Id the id of the property which has changed property ids are generally defined as constants on the source class public void property Changed Object source int prop Id if prop Id I Workbench Part PROP TITLE update Titles  propId propertyChanged propId propId IWorkbenchPart PROP_TITLE updateTitles
Sets the fast view state If this view is a fast view then various controls like pin and minimize are added to the system bar public void set Fast boolean b fast b  setFast
package void shell Activated draw Gradient  shellActivated drawGradient
package void shell Deactivated hide Tool Bar Shell draw Gradient  shellDeactivated hideToolBarShell drawGradient
Set the active border param active void set Active boolean active has Focus active if get Container instanceof Part Stack Part Stack get Container set Active active Stack Presentation AS ACTIVE FOCUS Stack Presentation AS INACTIVE  setActive hasFocus getContainer PartStack PartStack getContainer setActive StackPresentation AS_ACTIVE_FOCUS StackPresentation AS_INACTIVE
Indicate focus in part public void show Focus boolean in Focus set Active in Focus  showFocus inFocus setActive inFocus
Return true if this view is a fast view private boolean is Fast View return page is Fast View get View Reference  isFastView isFastView getViewReference
Return true if the view may be moved boolean is Moveable return page is Fixed Layout  isMoveable isFixedLayout
Return if there should be a view menu at all There is no view menu if there is no menu manager no pull down button or if the receiver is an inactive fast view public boolean has View Menu if isv Menu Mgr null return isv Menu Mgr is Empty return false  hasViewMenu isvMenuMgr isvMenuMgr isEmpty
public void show View Menu Point location if has View Menu return If this is a fast view it may have been minimized Do nothing in this case if is Fast View page get Active Fast View get View Reference return Menu a Menu isv Menu Mgr create Context Menu get Control get Parent a Menu set Location location x location y a Menu set Visible true  showViewMenu hasViewMenu isFastView getActiveFastView getViewReference aMenu isvMenuMgr createContextMenu getControl getParent aMenu setLocation aMenu setVisible
public String to String return get Class get Name Integer to Hex String hash Code NON NLS 1  toString getClass getName toHexString hashCode
see View Action Bars public void update Action Bars if isv Menu Mgr null isv Menu Mgr update All false if isv Tool Bar Mgr null isv Tool Bar Mgr update false  ViewActionBars updateActionBars isvMenuMgr isvMenuMgr updateAll isvToolBarMgr isvToolBarMgr
Update the title attributes public void update Titles presentable Adapter fire Property Change I Presentable Part PROP TITLE  updateTitles presentableAdapter firePropertyChange IPresentablePart PROP_TITLE
see org eclipse ui internal Part Pane add Size Menu Item org eclipse swt widgets Menu public void add Size Menu Item Menu menu int index if is Moveable super add Size Menu Item menu index  PartPane addSizeMenuItem addSizeMenuItem isMoveable addSizeMenuItem
see org eclipse ui internal Part Pane do Zoom protected void do Zoom if is Moveable super do Zoom  PartPane doZoom doZoom isMoveable doZoom
public void set Container I Layout Container container I Layout Container old Container get Container if has Focus if old Container null old Container instanceof Part Stack Part Stack old Container set Active Stack Presentation AS INACTIVE if container null container instanceof Part Stack Part Stack container set Active Stack Presentation AS ACTIVE FOCUS super set Container container  setContainer ILayoutContainer ILayoutContainer oldContainer getContainer hasFocus oldContainer oldContainer PartStack PartStack oldContainer setActive StackPresentation AS_INACTIVE PartStack PartStack setActive StackPresentation AS_ACTIVE_FOCUS setContainer
public void reparent Composite new Parent super reparent new Parent if isv Tool Bar null isv Tool Bar set Parent new Parent  newParent newParent isvToolBar isvToolBar setParent newParent
public void move Above Control ref Control super move Above ref Control isv Tool Bar move Above control  moveAbove refControl moveAbove refControl isvToolBar moveAbove
public void set Visible boolean make Visible super set Visible make Visible if isv Tool Bar null isv Tool Bar set Visible make Visible toolbar Is Visible  setVisible makeVisible setVisible makeVisible isvToolBar isvToolBar setVisible makeVisible toolbarIsVisible
public boolean toolbar Is Visible Tool Bar Manager toolbar Manager get Tool Bar Manager if toolbar Manager null return false Tool Bar control toolbar Manager get Control if control null control is Disposed return false return control get Item Count 0  toolbarIsVisible ToolBarManager toolbarManager getToolBarManager toolbarManager ToolBar toolbarManager getControl isDisposed getItemCount
public void set Busy boolean is Busy if is Busy busy busy is Busy presentable Adapter fire Property Change I Presentable Part PROP BUSY  setBusy isBusy isBusy isBusy presentableAdapter firePropertyChange IPresentablePart PROP_BUSY
Return the busy state of the receiver return boolean public boolean is Busy return busy  isBusy
see org eclipse ui internal Part Pane show Highlight public void show Highlight presentable Adapter fire Property Change I Presentable Part PROP HIGHLIGHT IF BACK  PartPane showHighlight showHighlight presentableAdapter firePropertyChange IPresentablePart PROP_HIGHLIGHT_IF_BACK
see org eclipse ui internal Layout Part get Place Holder Id public String get Place Holder Id return View Factory get Key get View Reference  LayoutPart getPlaceHolderId getPlaceHolderId ViewFactory getKey getViewReference
public Control get Tool Bar if toolbar Is Visible return null Tool Bar Manager toolbar Manager get Tool Bar Manager if toolbar Manager null return null Tool Bar control toolbar Manager get Control if control null control is Disposed return null return control  getToolBar toolbarIsVisible ToolBarManager toolbarManager getToolBarManager toolbarManager ToolBar toolbarManager getControl isDisposed

This class adds the requirement that action delegates loaded on demand implement I View Action Delegate public View Plugin Action I Configuration Element action Element I View Part view Part String id int style super action Element id style this view Part view Part register Selection Listener view Part  IViewActionDelegate ViewPluginAction IConfigurationElement actionElement IViewPart viewPart actionElement viewPart viewPart registerSelectionListener viewPart
protected I Action Delegate validate Delegate Object obj throws Workbench Exception if obj instanceof I View Action Delegate return I View Action Delegate obj else throw new Workbench Exception Action must implement I View Action Delegate NON NLS 1  IActionDelegate validateDelegate WorkbenchException IViewActionDelegate IViewActionDelegate WorkbenchException IViewActionDelegate
Method declared on Plugin Action protected void init Delegate super init Delegate I View Action Delegate get Delegate init view Part  PluginAction initDelegate initDelegate IViewActionDelegate getDelegate viewPart
Returns true if the view has been set The view may be null after the constructor is called and before the view is stored We cannot create the delegate at that time public boolean is Ok To Create Delegate return super is Ok To Create Delegate view Part null  isOkToCreateDelegate isOkToCreateDelegate viewPart

public class View Sash Container extends Part Sash Container public View Sash Container Workbench Page page super root layout container page NON NLS 1  ViewSashContainer PartSashContainer ViewSashContainer WorkbenchPage
Notification that a child layout part has been added to the container Subclasses may override this method to perform any container specific work protected void child Added Layout Part child do nothing  childAdded LayoutPart
Gets root container for this part public View Sash Container get Root Container return this  ViewSashContainer getRootContainer
Notification that a child layout part has been removed from the container Subclasses may override this method to perform any container specific work protected void child Removed Layout Part child do nothing  childRemoved LayoutPart
Subclasses override this method to specify the composite to use to parent all children layout parts it contains protected Composite create Parent Composite parent Widget return parent Widget  createParent parentWidget parentWidget
Subclasses override this method to dispose of any swt resources created during create Parent protected void dispose Parent do nothing  createParent disposeParent
Get the part control This method may return null public Control get Control return this parent  getControl
see I Persistable Part public I Status restore State I Memento memento Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Root Layout Container problems Restoring Perspective null NON NLS 1 Read the info elements I Memento children memento get Children I Workbench Constants TAG INFO Create a part ID to part hashtable Map mapI Dto Part new Hash Map children length Loop through the info elements for int i 0 i children length i Get the info details I Memento child Mem children i String partID child Mem get String I Workbench Constants TAG PART String relativeID child Mem get String I Workbench Constants TAG RELATIVE int relationship 0 float ratio 0 0f int left 0 right 0 if relativeID null relationship child Mem get Integer I Workbench Constants TAG RELATIONSHIP int Value Note the ratio is used for reading pre 3 0 eclipse workspaces It should be ignored if left and right are available Float ratio Float child Mem get Float I Workbench Constants TAG RATIO Integer left Int child Mem get Integer I Workbench Constants TAG RATIO LEFT Integer right Int child Mem get Integer I Workbench Constants TAG RATIO RIGHT if left Int null right Int null left left Int int Value right right Int int Value else if ratio Float null ratio ratio Float float Value String str Folder child Mem get String I Workbench Constants TAG FOLDER Create the part Layout Part part null if str Folder null part new Part Placeholder partID else View Stack folder new View Stack page folder setID partID result add folder restore State child Mem get Child I Workbench Constants TAG FOLDER Container Placeholder placeholder new Container Placeholder partID placeholder set Real Container folder part placeholder 1FUN70C ITPUI WIN Shouldn t set Container when not active part set Container this Add the part to the layout if relativeID null add part else Layout Part ref Part Layout Part mapI Dto Part get relativeID if ref Part null if left 0 add part relationship left right ref Part else add part relationship ratio ref Part else Workbench Plugin log Unable to find part for ID relativeID NON NLS 1 mapI Dto Part put partID part return result  IPersistablePart IStatus restoreState IMemento MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString RootLayoutContainer problemsRestoringPerspective IMemento getChildren IWorkbenchConstants TAG_INFO mapIDtoPart HashMap IMemento childMem childMem getString IWorkbenchConstants TAG_PART childMem getString IWorkbenchConstants TAG_RELATIVE childMem getInteger IWorkbenchConstants TAG_RELATIONSHIP intValue ratioFloat childMem getFloat IWorkbenchConstants TAG_RATIO leftInt childMem getInteger IWorkbenchConstants TAG_RATIO_LEFT rightInt childMem getInteger IWorkbenchConstants TAG_RATIO_RIGHT leftInt rightInt leftInt intValue rightInt intValue ratioFloat ratioFloat floatValue strFolder childMem getString IWorkbenchConstants TAG_FOLDER LayoutPart strFolder PartPlaceholder ViewStack ViewStack restoreState childMem getChild IWorkbenchConstants TAG_FOLDER ContainerPlaceholder ContainerPlaceholder setRealContainer setContainer LayoutPart refPart LayoutPart mapIDtoPart refPart refPart refPart WorkbenchPlugin mapIDtoPart
see I Persistable Part public I Status save State I Memento memento Relationship Info relationships compute Relation Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Root Layout Container problems Saving Perspective null NON NLS 1 Loop through the relationship array for int i 0 i relationships length i Save the relationship info private Layout Part part private int relationship private float ratio private Layout Part relative Relationship Info info relationships i I Memento child Mem memento create Child I Workbench Constants TAG INFO child Mem put String I Workbench Constants TAG PART info part getID if info relative null child Mem put String I Workbench Constants TAG RELATIVE info relative getID child Mem put Integer I Workbench Constants TAG RELATIONSHIP info relationship child Mem put Integer I Workbench Constants TAG RATIO LEFT info left child Mem put Integer I Workbench Constants TAG RATIO RIGHT info right The ratio is only needed for saving workspaces that can be read by old versions of Eclipse It is not used in newer versions of Eclipse which use the left and right attributes instead child Mem put Float I Workbench Constants TAG RATIO info get Ratio Is this part a folder or a placeholder for one View Stack folder null if info part instanceof View Stack folder View Stack info part else if info part instanceof Container Placeholder Layout Part part Container Placeholder info part get Real Container if part instanceof View Stack folder View Stack part If this is a folder save the contents if folder null child Mem put String I Workbench Constants TAG FOLDER true NON NLS 1 I Memento folder Mem child Mem create Child I Workbench Constants TAG FOLDER result add folder save State folder Mem return result  IPersistablePart IStatus saveState IMemento RelationshipInfo computeRelation MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString RootLayoutContainer problemsSavingPerspective LayoutPart LayoutPart RelationshipInfo IMemento childMem createChild IWorkbenchConstants TAG_INFO childMem putString IWorkbenchConstants TAG_PART childMem putString IWorkbenchConstants TAG_RELATIVE childMem putInteger IWorkbenchConstants TAG_RELATIONSHIP childMem putInteger IWorkbenchConstants TAG_RATIO_LEFT childMem putInteger IWorkbenchConstants TAG_RATIO_RIGHT childMem putFloat IWorkbenchConstants TAG_RATIO getRatio ViewStack ViewStack ViewStack ContainerPlaceholder LayoutPart ContainerPlaceholder getRealContainer ViewStack ViewStack childMem putString IWorkbenchConstants TAG_FOLDER IMemento folderMem childMem createChild IWorkbenchConstants TAG_FOLDER saveState folderMem
see org eclipse ui internal I Layout Container allows Auto Focus public boolean allows Auto Focus return true  ILayoutContainer allowsAutoFocus allowsAutoFocus
protected float get Docking Ratio Layout Part dragged Layout Part target if is Stack Type target return super get Docking Ratio dragged target else return 0 25f  getDockingRatio LayoutPart LayoutPart isStackType getDockingRatio
see org eclipse ui internal Part Sash Container is Stack Type org eclipse ui internal Layout Part public boolean is Stack Type Layout Part to Test return to Test instanceof View Stack  PartSashContainer isStackType LayoutPart isStackType LayoutPart toTest toTest ViewStack
see org eclipse ui internal Part Sash Container is Pane Type org eclipse ui internal Layout Part public boolean is Pane Type Layout Part to Test return to Test instanceof View Pane  PartSashContainer isPaneType LayoutPart isPaneType LayoutPart toTest toTest ViewPane
see org eclipse ui internal Part Sash Container create Stack org eclipse ui internal Layout Part protected Part Stack create Stack View Stack result new View Stack page return result  PartSashContainer createStack LayoutPart PartStack createStack ViewStack ViewStack
protected void set Visible Part I Layout Container container Layout Part visible Part if container instanceof View Stack View Stack tab Folder View Stack container tab Folder set Selection visible Part  setVisiblePart ILayoutContainer LayoutPart visiblePart ViewStack ViewStack tabFolder ViewStack tabFolder setSelection visiblePart
see org eclipse ui internal Part Sash Container get Visible Part org eclipse ui internal I Layout Container protected Layout Part get Visible Part I Layout Container container return View Stack container get Visible Part  PartSashContainer getVisiblePart ILayoutContainer LayoutPart getVisiblePart ILayoutContainer ViewStack getVisiblePart
see org eclipse ui internal Part Sash Container deref Part org eclipse ui internal Layout Part protected void deref Part Layout Part source Part page get Active Perspective get Presentation deref Part source Part  PartSashContainer derefPart LayoutPart derefPart LayoutPart sourcePart getActivePerspective getPresentation derefPart sourcePart
protected void add Child Relationship Info info Layout Part child info part Nasty hack ensure that all views end up inside a tab folder Since the view title is provided by the tab folder this ensures that views don t get created without a title tab if child instanceof View Pane View Stack folder new View Stack page folder add child info part folder super add Child info  addChild RelationshipInfo LayoutPart ViewPane ViewStack ViewStack addChild
public void replace Layout Part old Child Layout Part new Child if is Child old Child return Nasty hack ensure that all views end up inside a tab folder Since the view title is provided by the tab folder this ensures that views don t get created without a title tab if new Child instanceof View Pane View Stack folder new View Stack page folder add new Child new Child folder super replace old Child new Child  LayoutPart oldChild LayoutPart newChild isChild oldChild newChild ViewPane ViewStack ViewStack newChild newChild oldChild newChild

Creates a new View Site public View Site I View Reference ref I View Part view Workbench Page page I View Descriptor desc super ref view page set Configuration Element desc get Configuration Element  ViewSite ViewSite IViewReference IViewPart WorkbenchPage IViewDescriptor setConfigurationElement getConfigurationElement
Returns the secondary id or code null code public String get Secondary Id return I View Reference get Part Reference get Secondary Id  getSecondaryId IViewReference getPartReference getSecondaryId
Returns the view public I View Part get View Part return I View Part get Part  IViewPart getViewPart IViewPart getPart

public void add System Actions I Menu Manager menu Manager append To Group If Possible menu Manager misc new Updating Action Contribution Item fast View Action NON NLS 1 size Item new System Menu Size Part Pane get Visible Part append To Group If Possible menu Manager size size Item NON NLS 1  addSystemActions IMenuManager menuManager appendToGroupIfPossible menuManager UpdatingActionContributionItem fastViewAction sizeItem SystemMenuSize PartPane getVisiblePart appendToGroupIfPossible menuManager sizeItem
public View Stack Workbench Page page this page true  ViewStack WorkbenchPage
public View Stack Workbench Page page boolean allows State Changes this page allows State Changes Presentation Factory Util ROLE VIEW  ViewStack WorkbenchPage allowsStateChanges allowsStateChanges PresentationFactoryUtil ROLE_VIEW
public View Stack Workbench Page page boolean allows State Changes int appearance super appearance this page page setID this to String Each folder has a unique ID so relative positioning is unambiguous this allow State Changes allows State Changes fast View Action new System Menu Fast View get Presentation Site  ViewStack WorkbenchPage allowsStateChanges toString allowStateChanges allowsStateChanges fastViewAction SystemMenuFastView getPresentationSite
protected Workbench Page get Page return page  WorkbenchPage getPage
protected boolean can Move Folder Perspective perspective page get Active Perspective if perspective null Shouldn t happen can t have a View Stack without a perspective return false return perspective is Fixed Layout  canMoveFolder getActivePerspective ViewStack isFixedLayout
protected void update Actions View Pane pane null Part Pane part get Visible Part if part instanceof View Pane pane View Pane part fast View Action set Pane pane size Item set Pane pane  updateActions ViewPane PartPane getVisiblePart ViewPane ViewPane fastViewAction setPane sizeItem setPane
public boolean is Closeable I Presentable Part part View Pane pane View Pane get Pane For part Perspective perspective page get Active Perspective if perspective null Shouldn t happen can t have a View Stack without a perspective return true return perspective is Closeable pane get View Reference  isCloseable IPresentablePart ViewPane ViewPane getPaneFor getActivePerspective ViewStack isCloseable getViewReference
protected boolean is Moveable I Presentable Part part View Pane pane View Pane get Pane For part Perspective perspective page get Active Perspective if perspective null Shouldn t happen can t have a View Stack without a perspective return true return perspective is Moveable pane get View Reference  isMoveable IPresentablePart ViewPane ViewPane getPaneFor getActivePerspective ViewStack isMoveable getViewReference
protected boolean supports State int new State if page is Fixed Layout return false return allow State Changes  supportsState newState isFixedLayout allowStateChanges
see org eclipse ui internal Part Stack deref Part org eclipse ui internal Layout Part protected void deref Part Layout Part to Deref page get Active Perspective get Presentation deref Part to Deref  PartStack derefPart LayoutPart derefPart LayoutPart toDeref getActivePerspective getPresentation derefPart toDeref
see org eclipse ui internal Part Stack allows Drop org eclipse ui internal Part Pane protected boolean allows Drop Part Pane part return part instanceof View Pane  PartStack allowsDrop PartPane allowsDrop PartPane ViewPane

Returns the singleton instance return the singleton instance public static Views Plugin get Default return instance  ViewsPlugin getDefault
Creates a new instance of the receiver see org eclipse core runtime Plugin Plugin public Views Plugin super instance this  ViewsPlugin

private final I Null Selection Listener sel Listener new I Null Selection Listener public void selection Changed I Workbench Part part I Selection selection fire Selection part selection  INullSelectionListener selListener INullSelectionListener selectionChanged IWorkbenchPart ISelection fireSelection
private final I Null Selection Listener post Sel Listener new I Null Selection Listener public void selection Changed I Workbench Part part I Selection selection fire Post Selection part selection  INullSelectionListener postSelListener INullSelectionListener selectionChanged IWorkbenchPart ISelection firePostSelection
Constructs a new selection tracker for the given window and part id param window workbench window param part Id part identifier public Window Part Selection Tracker I Workbench Window window String part Id super part Id set Window window window add Page Listener this I Workbench Page pages window get Pages for int i 0 i pages length i page Opened pages i  partId WindowPartSelectionTracker IWorkbenchWindow partId partId setWindow addPageListener IWorkbenchPage getPages pageOpened
see I Page Listener page Activated I Workbench Page public void page Activated I Workbench Page page  IPageListener pageActivated IWorkbenchPage pageActivated IWorkbenchPage
see I Page Listener page Closed I Workbench Page public void page Closed I Workbench Page page page remove Selection Listener get Part Id sel Listener page remove Post Selection Listener get Part Id post Sel Listener  IPageListener pageClosed IWorkbenchPage pageClosed IWorkbenchPage removeSelectionListener getPartId selListener removePostSelectionListener getPartId postSelListener
see I Page Listener page Opened I Workbench Page public void page Opened I Workbench Page page page add Selection Listener get Part Id sel Listener page add Post Selection Listener get Part Id post Sel Listener  IPageListener pageOpened IWorkbenchPage pageOpened IWorkbenchPage addSelectionListener getPartId selListener addPostSelectionListener getPartId postSelListener
Sets the window this tracker is working in param window workbench window private void set Window I Workbench Window window f Window window  setWindow IWorkbenchWindow fWindow
Returns the window this tracker is working in return workbench window protected I Workbench Window get Window return f Window  IWorkbenchWindow getWindow fWindow
see Abstract Part Selection Tracker dispose public void dispose super dispose f Window null  AbstractPartSelectionTracker fWindow
public I Selection get Selection I Workbench Page page get Window get Active Page if page null return page get Selection get Part Id return null  ISelection getSelection IWorkbenchPage getWindow getActivePage getSelection getPartId

Creates a new selection service for the given window public Window Selection Service I Workbench Window window set Window window  WindowSelectionService IWorkbenchWindow setWindow
Sets the window private void set Window I Workbench Window window this window window  setWindow IWorkbenchWindow
Returns the window protected I Workbench Window get Window return window  IWorkbenchWindow getWindow
see Abstract Selection Service create Part Tracker String protected Abstract Part Selection Tracker create Part Tracker String part Id return new Window Part Selection Tracker get Window part Id  AbstractSelectionService createPartTracker AbstractPartSelectionTracker createPartTracker partId WindowPartSelectionTracker getWindow partId

Creates a new workbench param display the display to be used for all UI interactions with the workbench param advisor the application specific advisor that configures and specializes this workbench instance since 3 0 private Workbench Display display Workbench Advisor advisor super if instance null instance is Running throw new Illegal State Exception Workbench Messages get String Workbench Creating Workbench Twice NON NLS 1 Assert is Not Null display Assert is Not Null advisor this advisor advisor this display display Workbench instance this for dynamic UI extension Event Handler new Extension Event Handler this Platform get Extension Registry add Registry Change Listener extension Event Handler  WorkbenchAdvisor isRunning IllegalStateException WorkbenchMessages getString CreatingWorkbenchTwice isNotNull isNotNull extensionEventHandler ExtensionEventHandler getExtensionRegistry addRegistryChangeListener extensionEventHandler
Returns the one and only instance of the workbench if there is one return the workbench or code null code if the workbench has not been created or has been created and already completed public static final Workbench get Instance return instance  getInstance
Creates the workbench and associates it with the 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 code PlatformUI code Fails if the workbench UI has already been created p p The display passed in must be the default display 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 PlatformUI RETURN OK RETURN OK for normal exit link PlatformUI RETURN RESTART RETURN RESTART if the workbench was terminated with a call to link I Workbench restart I Workbench restart other values reserved for future use public static final int create And Run Workbench Display display Workbench Advisor advisor create the workbench instance Workbench workbench new Workbench display advisor run the workbench event loop int return Code workbench runUI return return Code  RETURN_OK RETURN_OK RETURN_RESTART RETURN_RESTART IWorkbench IWorkbench createAndRunWorkbench WorkbenchAdvisor returnCode returnCode
Creates the code Display code to be used by the workbench return the display public static Display create Display setup the application name used by SWT to lookup resources on some platforms String application Name Workbench Plugin get Default get App Name if application Name null Display set App Name application Name create the display Display new Display null if Policy DEBUG SWT GRAPHICS Device Data data new Device Data data tracking true new Display new Display data else new Display new Display workaround for 1GEZ9UR and 1GF07HN new Display set Warnings false Set the priority higher than normal so as to be higher than the Job Manager Thread current Thread set Priority Math min Thread MAX PRIORITY Thread NORM PRIORITY 1 return new Display  createDisplay applicationName WorkbenchPlugin getDefault getAppName applicationName setAppName applicationName newDisplay DEBUG_SWT_GRAPHICS DeviceData DeviceData newDisplay newDisplay newDisplay setWarnings JobManager currentThread setPriority MAX_PRIORITY NORM_PRIORITY newDisplay
Returns the testable object facade for use by the test harness return the testable object facade since 3 0 public static Workbench Testable get Workbench Testable if testable Object null testable Object new Workbench Testable return testable Object  WorkbenchTestable getWorkbenchTestable testableObject testableObject WorkbenchTestable testableObject
non Javadoc Method declared on I Workbench public void add Window Listener I Window Listener l window Listeners add l  IWorkbench addWindowListener IWindowListener windowListeners
non Javadoc Method declared on I Workbench public void remove Window Listener I Window Listener l window Listeners remove l  IWorkbench removeWindowListener IWindowListener windowListeners
final I Window Listener l I Window Listener list i Platform run new Safe Runnable public void run l window Opened window  IWindowListener IWindowListener SafeRunnable windowOpened
Fire window opened event param window The window which just opened should not be code null code protected void fire Window Opened final I Workbench Window window Object list window Listeners get Listeners for int i 0 i list length i final I Window Listener l I Window Listener list i Platform run new Safe Runnable public void run l window Opened window  fireWindowOpened IWorkbenchWindow windowListeners getListeners IWindowListener IWindowListener SafeRunnable windowOpened
final I Window Listener l I Window Listener list i Platform run new Safe Runnable public void run l window Closed window  IWindowListener IWindowListener SafeRunnable windowClosed
Fire window closed event param window The window which just closed should not be code null code protected void fire Window Closed final I Workbench Window window if activated Window window Do not hang onto it so it can be GC ed activated Window null Object list window Listeners get Listeners for int i 0 i list length i final I Window Listener l I Window Listener list i Platform run new Safe Runnable public void run l window Closed window  fireWindowClosed IWorkbenchWindow activatedWindow activatedWindow windowListeners getListeners IWindowListener IWindowListener SafeRunnable windowClosed
final I Window Listener l I Window Listener list i Platform run new Safe Runnable public void run l window Activated window  IWindowListener IWindowListener SafeRunnable windowActivated
Fire window activated event param window The window which was just activated should not be code null code protected void fire Window Activated final I Workbench Window window Object list window Listeners get Listeners for int i 0 i list length i final I Window Listener l I Window Listener list i Platform run new Safe Runnable public void run l window Activated window  fireWindowActivated IWorkbenchWindow windowListeners getListeners IWindowListener IWindowListener SafeRunnable windowActivated
final I Window Listener l I Window Listener list i Platform run new Safe Runnable public void run l window Deactivated window  IWindowListener IWindowListener SafeRunnable windowDeactivated
Fire window deactivated event param window The window which was just deactivated should not be code null code protected void fire Window Deactivated final I Workbench Window window Object list window Listeners get Listeners for int i 0 i list length i final I Window Listener l I Window Listener list i Platform run new Safe Runnable public void run l window Deactivated window  fireWindowDeactivated IWorkbenchWindow windowListeners getListeners IWindowListener IWindowListener SafeRunnable windowDeactivated
Platform run new Safe Runnable public void run I Workbench Window windows get Workbench Windows for int i 0 i windows length i I Workbench Page pages windows i get Pages for int j 0 j pages length j is Closing is Closing pages j close All Editors false  SafeRunnable IWorkbenchWindow getWorkbenchWindows IWorkbenchPage getPages isClosing isClosing closeAllEditors
Platform run new Safe Runnable public void run XML Memento mem record Workbench State Save the I Memento to a file save Memento To File mem  SafeRunnable XMLMemento recordWorkbenchState IMemento saveMementoToFile
public void handle Exception Throwable e String message if e get Message null message Workbench Messages get String Error Closing No Arg NON NLS 1 else message Workbench Messages format Error Closing One Arg new Object e get Message NON NLS 1 if Message Dialog open Question null Workbench Messages get String Error message NON NLS 1 is Closing false  handleException getMessage WorkbenchMessages getString ErrorClosingNoArg WorkbenchMessages ErrorClosingOneArg getMessage MessageDialog openQuestion WorkbenchMessages getString isClosing
Platform run new Safe Runnable Workbench Messages get String Error Closing NON NLS 1 public void run if is Closing force is Closing window Manager close  SafeRunnable WorkbenchMessages getString ErrorClosing isClosing isClosing windowManager
Closes the workbench Assumes that the busy cursor is active param force true if the close is mandatory and false if the close is allowed to fail return true if the close succeeded and false otherwise private boolean busy Close final boolean force notify the advisor of pre Shutdown and allow it to veto if not forced is Closing advisor pre Shutdown if force is Closing return false save any open editors if they are dirty is Closing save All Editors force if force is Closing return false I Preference Store store get Preference Store boolean close Editors store get Boolean I Preference Constants CLOSE EDITORS ON EXIT if close Editors Platform run new Safe Runnable public void run I Workbench Window windows get Workbench Windows for int i 0 i windows length i I Workbench Page pages windows i get Pages for int j 0 j pages length j is Closing is Closing pages j close All Editors false if force is Closing return false if get Workbench Configurer get Save And Restore Platform run new Safe Runnable public void run XML Memento mem record Workbench State Save the I Memento to a file save Memento To File mem public void handle Exception Throwable e String message if e get Message null message Workbench Messages get String Error Closing No Arg NON NLS 1 else message Workbench Messages format Error Closing One Arg new Object e get Message NON NLS 1 if Message Dialog open Question null Workbench Messages get String Error message NON NLS 1 is Closing false if force is Closing return false Platform run new Safe Runnable Workbench Messages get String Error Closing NON NLS 1 public void run if is Closing force is Closing window Manager close if force is Closing return false shutdown run Event Loop false return true  busyClose preShutdown isClosing preShutdown isClosing isClosing saveAllEditors isClosing IPreferenceStore getPreferenceStore closeEditors getBoolean IPreferenceConstants CLOSE_EDITORS_ON_EXIT closeEditors SafeRunnable IWorkbenchWindow getWorkbenchWindows IWorkbenchPage getPages isClosing isClosing closeAllEditors isClosing getWorkbenchConfigurer getSaveAndRestore SafeRunnable XMLMemento recordWorkbenchState IMemento saveMementoToFile handleException getMessage WorkbenchMessages getString ErrorClosingNoArg WorkbenchMessages ErrorClosingOneArg getMessage MessageDialog openQuestion WorkbenchMessages getString isClosing isClosing SafeRunnable WorkbenchMessages getString ErrorClosing isClosing isClosing windowManager isClosing runEventLoop
Platform run new Safe Runnable Workbench Messages get String Error Closing NON NLS 1 public void run Collect dirty Editors Array List dirty Editors new Array List Array List dirty Editors Input new Array List I Workbench Window windows get Workbench Windows for int i 0 i windows length i I Workbench Page pages windows i get Pages for int j 0 j pages length j Workbench Page page Workbench Page pages j I Editor Part editors page get Dirty Editors for int k 0 k editors length k I Editor Part editor editors k if editor is Dirty if dirty Editors Input contains editor get Editor Input dirty Editors add editor dirty Editors Input add editor get Editor Input if dirty Editors size 0 I Workbench Window w get Active Workbench Window if w null w windows 0 result 0 Editor Manager save All dirty Editors final Confirm w  SafeRunnable WorkbenchMessages getString ErrorClosing dirtyEditors ArrayList dirtyEditors ArrayList ArrayList dirtyEditorsInput ArrayList IWorkbenchWindow getWorkbenchWindows IWorkbenchPage getPages WorkbenchPage WorkbenchPage IEditorPart getDirtyEditors IEditorPart isDirty dirtyEditorsInput getEditorInput dirtyEditors dirtyEditorsInput getEditorInput dirtyEditors IWorkbenchWindow getActiveWorkbenchWindow EditorManager saveAll dirtyEditors finalConfirm
public boolean save All Editors boolean confirm final boolean final Confirm confirm final boolean result new boolean 1 result 0 true Platform run new Safe Runnable Workbench Messages get String Error Closing NON NLS 1 public void run Collect dirty Editors Array List dirty Editors new Array List Array List dirty Editors Input new Array List I Workbench Window windows get Workbench Windows for int i 0 i windows length i I Workbench Page pages windows i get Pages for int j 0 j pages length j Workbench Page page Workbench Page pages j I Editor Part editors page get Dirty Editors for int k 0 k editors length k I Editor Part editor editors k if editor is Dirty if dirty Editors Input contains editor get Editor Input dirty Editors add editor dirty Editors Input add editor get Editor Input if dirty Editors size 0 I Workbench Window w get Active Workbench Window if w null w windows 0 result 0 Editor Manager save All dirty Editors final Confirm w return result 0  saveAllEditors finalConfirm SafeRunnable WorkbenchMessages getString ErrorClosing dirtyEditors ArrayList dirtyEditors ArrayList ArrayList dirtyEditorsInput ArrayList IWorkbenchWindow getWorkbenchWindows IWorkbenchPage getPages WorkbenchPage WorkbenchPage IEditorPart getDirtyEditors IEditorPart isDirty dirtyEditorsInput getEditorInput dirtyEditors dirtyEditorsInput getEditorInput dirtyEditors IWorkbenchWindow getActiveWorkbenchWindow EditorManager saveAll dirtyEditors finalConfirm
Opens a new workbench window and page with a specific perspective Assumes that busy cursor is active private I Workbench Window busy Open Workbench Window String perspID I Adaptable input throws Workbench Exception Create a workbench window becomes active window Workbench Window new Window new Workbench Window new Window create must be created before adding to window manager window Manager add new Window Create the initial page try new Window busy Open Page perspID input catch Workbench Exception e window Manager remove new Window throw e Open window after opening page to avoid flicker new Window open return new Window  IWorkbenchWindow busyOpenWorkbenchWindow IAdaptable WorkbenchException WorkbenchWindow newWindow newWorkbenchWindow newWindow windowManager newWindow newWindow busyOpenPage WorkbenchException windowManager newWindow newWindow newWindow
non Javadoc Method declared on I Workbench public boolean close return close PlatformUI RETURN OK false  IWorkbench RETURN_OK
final boolean ret new boolean 1 Busy Indicator show While null new Runnable public void run ret 0 busy Close force  BusyIndicator showWhile busyClose
Closes the workbench returning the given return code from the run method If forced the workbench is closed no matter what param return Code link PlatformUI RETURN OK RETURN OK for normal exit link PlatformUI RETURN RESTART RETURN RESTART if the workbench was terminated with a call to link I Workbench restart I Workbench restart link PlatformUI RETURN UNSTARTABLE RETURN UNSTARTABLE if the workbench could not be started other values reserved for future use param force true to force the workbench close and false for a soft close that can be canceled return true if the close was successful and false if the close was canceled package boolean close int return Code final boolean force this return Code return Code final boolean ret new boolean 1 Busy Indicator show While null new Runnable public void run ret 0 busy Close force return ret 0  returnCode RETURN_OK RETURN_OK RETURN_RESTART RETURN_RESTART IWorkbench IWorkbench RETURN_UNSTARTABLE RETURN_UNSTARTABLE returnCode returnCode returnCode BusyIndicator showWhile busyClose
public I Workbench Window get Active Workbench Window Return null if called from a non UI thread This is not spec ed behaviour and is misleading however this is how it worked in 2 1 and we cannot change it now For more details see Bug 57384 RCP Main window not active on startup if Display get Current null return null Look at the current shell and up its parent hierarchy for a workbench window Control shell display get Active Shell while shell null Object data shell get Data if data instanceof I Workbench Window return I Workbench Window data shell shell get Parent Look for the window that was last known being the active one Workbench Window win get Activated Window if win null return win Look at all the shells and pick the first one that is a workbench window Shell shells display get Shells for int i 0 i shells length i Object data shells i get Data if data instanceof I Workbench Window return I Workbench Window data Can t find anything return null  IWorkbenchWindow getActiveWorkbenchWindow getCurrent getActiveShell getData IWorkbenchWindow IWorkbenchWindow getParent WorkbenchWindow getActivatedWindow getShells getData IWorkbenchWindow IWorkbenchWindow
protected Editor History get Editor History if editor History null editor History new Editor History return editor History  EditorHistory getEditorHistory editorHistory editorHistory EditorHistory editorHistory
non Javadoc Method declared on I Workbench public I Editor Registry get Editor Registry return Workbench Plugin get Default get Editor Registry  IWorkbench IEditorRegistry getEditorRegistry WorkbenchPlugin getDefault getEditorRegistry
private int get New Window Number Get window list Window windows window Manager get Windows int count windows length Create an array of booleans size window count Cross off every number found in the window list boolean check Array new boolean count for int nX 0 nX count nX if windows nX instanceof Workbench Window Workbench Window ww Workbench Window windows nX int index ww get Number 1 if index 0 index count check Array index true Return first index which is not used If no empty index was found then every slot is full Return next index for int index 0 index count index if check Array index return index 1 return count 1  getNewWindowNumber windowManager getWindows checkArray WorkbenchWindow WorkbenchWindow WorkbenchWindow getNumber checkArray checkArray
non Javadoc Method declared on I Workbench public I Perspective Registry get Perspective Registry return Workbench Plugin get Default get Perspective Registry  IWorkbench IPerspectiveRegistry getPerspectiveRegistry WorkbenchPlugin getDefault getPerspectiveRegistry
non Javadoc Method declared on I Workbench public Preference Manager get Preference Manager return Workbench Plugin get Default get Preference Manager  IWorkbench PreferenceManager getPreferenceManager WorkbenchPlugin getDefault getPreferenceManager
non Javadoc Method declared on I Workbench public I Preference Store get Preference Store return Workbench Plugin get Default get Preference Store  IWorkbench IPreferenceStore getPreferenceStore WorkbenchPlugin getDefault getPreferenceStore
non Javadoc Method declared on I Workbench public I Shared Images get Shared Images return Workbench Plugin get Default get Shared Images  IWorkbench ISharedImages getSharedImages WorkbenchPlugin getDefault getSharedImages
Returns the window manager for this workbench return the window manager package Window Manager get Window Manager return window Manager  WindowManager getWindowManager windowManager
private File get Workbench State File I Path path Workbench Plugin get Default get State Location path path append DEFAULT WORKBENCH STATE FILENAME return path to File  getWorkbenchStateFile IPath WorkbenchPlugin getDefault getStateLocation DEFAULT_WORKBENCH_STATE_FILENAME toFile
non Javadoc Method declared on I Workbench public int get Workbench Window Count return window Manager get Window Count  IWorkbench getWorkbenchWindowCount windowManager getWindowCount
public I Workbench Window get Workbench Windows Window windows window Manager get Windows I Workbench Window dwindows new I Workbench Window windows length System arraycopy windows 0 dwindows 0 windows length return dwindows  IWorkbenchWindow getWorkbenchWindows windowManager getWindows IWorkbenchWindow IWorkbenchWindow
non Javadoc Method declared on I Workbench public I Working Set Manager get Working Set Manager return Workbench Plugin get Default get Working Set Manager  IWorkbench IWorkingSetManager getWorkingSetManager WorkbenchPlugin getDefault getWorkingSetManager
Initializes the workbench now that the display is created return true if init succeeded private boolean init Display display setup debug mode if required if Workbench Plugin get Default is Debugging Workbench Plugin DEBUG true Modal Context set Debug Mode true create workbench window manager window Manager new Window Manager I Intro Registry intro Registry Workbench Plugin get Default get Intro Registry if intro Registry get Intro Count 0 I Product product Platform get Product if product null intro Descriptor Intro Descriptor intro Registry get Intro For Product product get Id begin the initialization of the activity command and context managers workbench Activity Support new Workbench Activity Support activity Helper Activity Persistance Helper get Instance workbench Context Support new Workbench Context Support this workbench Command Support new Workbench Command Support this workbench Context Support initialize deferred key binding support workbench Command Support get Command Manager add Command Manager Listener command Manager Listener workbench Context Support get Context Manager add Context Manager Listener context Manager Listener initialize Command Resolver add Window Listener window Listener end the initialization of the activity command and context managers initialize Images initialize Fonts initialize Colors initialize Application Colors now that the workbench is sufficiently initialized let the advisor have a turn advisor internal Basic Initialize get Workbench Configurer configure use of color icons in toolbars boolean use Color Icons get Preference Store get Boolean I Preference Constants COLOR ICONS Action Contribution Item set Use Color Icons In Toolbars use Color Icons initialize workbench single click vs double click behavior initialize Single Click Option deadlock code boolean avoid Deadlock true String command Line Args Platform get Command Line Args for int i 0 i command Line Args length i if command Line Args i equals Ignore Case allow Deadlock NON NLS 1 avoid Deadlock false if avoid Deadlock UI Lock Listener ui Lock Listener new UI Lock Listener display Platform get Job Manager set Lock Listener ui Lock Listener display set Synchronizer new UI Synchronizer display ui Lock Listener attempt to restore a previous workbench state try UI Stats start UI Stats RESTORE WORKBENCH Workbench NON NLS 1 advisor pre Startup if advisor open Windows return false finally UI Stats end UI Stats RESTORE WORKBENCH Workbench NON NLS 1 force Open Perspective is Starting false return true  WorkbenchPlugin getDefault isDebugging WorkbenchPlugin ModalContext setDebugMode windowManager WindowManager IIntroRegistry introRegistry WorkbenchPlugin getDefault getIntroRegistry introRegistry getIntroCount IProduct getProduct introDescriptor IntroDescriptor introRegistry getIntroForProduct getId workbenchActivitySupport WorkbenchActivitySupport activityHelper ActivityPersistanceHelper getInstance workbenchContextSupport WorkbenchContextSupport workbenchCommandSupport WorkbenchCommandSupport workbenchContextSupport workbenchCommandSupport getCommandManager addCommandManagerListener commandManagerListener workbenchContextSupport getContextManager addContextManagerListener contextManagerListener initializeCommandResolver addWindowListener windowListener initializeImages initializeFonts initializeColors initializeApplicationColors internalBasicInitialize getWorkbenchConfigurer useColorIcons getPreferenceStore getBoolean IPreferenceConstants COLOR_ICONS ActionContributionItem setUseColorIconsInToolbars useColorIcons initializeSingleClickOption avoidDeadlock commandLineArgs getCommandLineArgs commandLineArgs commandLineArgs equalsIgnoreCase allowDeadlock avoidDeadlock avoidDeadlock UILockListener uiLockListener UILockListener getJobManager setLockListener uiLockListener setSynchronizer UISynchronizer uiLockListener UIStats UIStats RESTORE_WORKBENCH preStartup openWindows UIStats UIStats RESTORE_WORKBENCH forceOpenPerspective isStarting
Establishes the relationship between J Face actions and the command manager private void initialize Command Resolver External Action Manager get Instance set Callback new Command Callback this  JFace initializeCommandResolver ExternalActionManager getInstance setCallback CommandCallback
Initialize colors defined by the new color Definitions extension point Note this will be rolled into initialize Colors at some point since 3 0 private void initialize Application Colors Color Definition color Definitions Workbench Plugin get Default get Theme Registry get Colors Theme Element Helper populate Registry get Theme Manager get Theme I Theme Manager DEFAULT THEME color Definitions get Preference Store  colorDefinitions initializeColors initializeApplicationColors ColorDefinition colorDefinitions WorkbenchPlugin getDefault getThemeRegistry getColors ThemeElementHelper populateRegistry getThemeManager getTheme IThemeManager DEFAULT_THEME colorDefinitions getPreferenceStore
private void initialize Single Click Option I Preference Store store Workbench Plugin get Default get Preference Store boolean open On Single Click store get Boolean I Preference Constants OPEN ON SINGLE CLICK boolean select On Hover store get Boolean I Preference Constants SELECT ON HOVER boolean open After Delay store get Boolean I Preference Constants OPEN AFTER DELAY int single Click Method open On Single Click Open Strategy SINGLE CLICK Open Strategy DOUBLE CLICK if open On Single Click if select On Hover single Click Method Open Strategy SELECT ON HOVER if open After Delay single Click Method Open Strategy ARROW KEYS OPEN Open Strategy set Open Method single Click Method  initializeSingleClickOption IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore openOnSingleClick getBoolean IPreferenceConstants OPEN_ON_SINGLE_CLICK selectOnHover getBoolean IPreferenceConstants SELECT_ON_HOVER openAfterDelay getBoolean IPreferenceConstants OPEN_AFTER_DELAY singleClickMethod openOnSingleClick OpenStrategy SINGLE_CLICK OpenStrategy DOUBLE_CLICK openOnSingleClick selectOnHover singleClickMethod OpenStrategy SELECT_ON_HOVER openAfterDelay singleClickMethod OpenStrategy ARROW_KEYS_OPEN OpenStrategy setOpenMethod singleClickMethod
Initializes the workbench fonts with the stored values private void initialize Fonts Font Definition font Definitions Workbench Plugin get Default get Theme Registry get Fonts Theme Element Helper populate Registry get Theme Manager get Theme I Theme Manager DEFAULT THEME font Definitions get Preference Store  initializeFonts FontDefinition fontDefinitions WorkbenchPlugin getDefault getThemeRegistry getFonts ThemeElementHelper populateRegistry getThemeManager getTheme IThemeManager DEFAULT_THEME fontDefinitions getPreferenceStore
private void initialize Images Image Descriptor window Images Workbench Plugin get Default get Window Images if window Images null return Image images new Image window Images length for int i 0 i window Images length i images i window Images i create Image Window set Default Images images  initializeImages ImageDescriptor windowImages WorkbenchPlugin getDefault getWindowImages windowImages windowImages windowImages windowImages createImage setDefaultImages
since 3 0 private void uninitialize Images Window set Default Image null  uninitializeImages setDefaultImage
since 3 0 private void initialize Colors issue some colors are generic some are app specific Workbench Colors startup  initializeColors WorkbenchColors
Returns code true code if the workbench is in the process of closing public boolean is Closing return is Closing  isClosing isClosing
package boolean is Starting return is Starting  isStarting isStarting
return the new workbench window private Workbench Window new Workbench Window return new Workbench Window get New Window Number  WorkbenchWindow newWorkbenchWindow WorkbenchWindow getNewWindowNumber
private void force Open Perspective if get Workbench Window Count 0 there should be an open window by now bail out return String persp Id null String command Line Args Platform get Command Line Args for int i 0 i command Line Args length 1 i if command Line Args i equals Ignore Case perspective NON NLS 1 persp Id command Line Args i 1 break if persp Id null return I Perspective Descriptor desc get Perspective Registry find Perspective With Id persp Id if desc null return I Workbench Window win get Active Workbench Window if win null win get Workbench Windows 0 try show Perspective persp Id win catch Workbench Exception e String msg Workbench exception showing specified command line perspective on startup NON NLS 1 Workbench Plugin log msg new Status I Status ERROR PlatformUI PLUGIN ID 0 msg e  forceOpenPerspective getWorkbenchWindowCount perspId commandLineArgs getCommandLineArgs commandLineArgs commandLineArgs equalsIgnoreCase perspId commandLineArgs perspId IPerspectiveDescriptor getPerspectiveRegistry findPerspectiveWithId perspId IWorkbenchWindow getActiveWorkbenchWindow getWorkbenchWindows showPerspective perspId WorkbenchException WorkbenchPlugin IStatus PLUGIN_ID
package void open First Time Window create the workbench window Workbench Window new Window new Workbench Window new Window create window Manager add new Window Create the initial page try new Window open Page get Perspective Registry get Default Perspective get Default Page Input catch Workbench Exception e Error Dialog open Error new Window get Shell Workbench Messages get String Problems Opening Page NON NLS 1 e get Message e get Status new Window open  openFirstTimeWindow WorkbenchWindow newWindow newWorkbenchWindow newWindow windowManager newWindow newWindow openPage getPerspectiveRegistry getDefaultPerspective getDefaultPageInput WorkbenchException ErrorDialog openError newWindow getShell WorkbenchMessages getString Problems_Opening_Page getMessage getStatus newWindow
get String Error Reading State NON NLS 1 public void run throws Exception File Input Stream input new File Input Stream state File Buffered Reader reader new Buffered Reader new Input Stream Reader input utf 8 NON NLS 1 I Memento memento XML Memento create Read Root reader Validate known version format String version memento get String I Workbench Constants TAG VERSION boolean valid false for int i 0 i VERSION STRING length i if VERSION STRING i equals version valid true break if valid reader close String msg Workbench Messages get String Invalid workbench state ve NON NLS 1 Message Dialog open Error Shell null Workbench Messages get String Restoring Problems NON NLS 1 msg NON NLS 1 state File delete result 0 new Status I Status ERROR Workbench Plugin PI WORKBENCH I Workbench Configurer RESTORE CODE RESET msg null return Validate compatible version format We no longer support the release 1 0 format if VERSION STRING 0 equals version reader close String msg Workbench Messages get String Workbench incompatible Saved State Version NON NLS 1 boolean ignore Saved State new Message Dialog null Workbench Messages get String Workbench incompatibleUI State NON NLS 1 null msg Message Dialog WARNING new String I Dialog Constants OK LABEL I Dialog Constants CANCEL LABEL 0 open 0 OK is the default if ignore Saved State state File delete result 0 new Status I Status WARNING Workbench Plugin PI WORKBENCH I Workbench Configurer RESTORE CODE RESET msg null else result 0 new Status I Status WARNING Workbench Plugin PI WORKBENCH I Workbench Configurer RESTORE CODE EXIT msg null return Restore the saved state I Status restore Result restore State memento reader close if restore Result get Severity I Status ERROR Error Dialog open Error null Workbench Messages get String Workspace problems Title NON NLS 1 Workbench Messages get String Workbench problems Restoring Msg NON NLS 1 restore Result  getString ErrorReadingState FileInputStream FileInputStream stateFile BufferedReader BufferedReader InputStreamReader IMemento XMLMemento createReadRoot getString IWorkbenchConstants TAG_VERSION VERSION_STRING VERSION_STRING WorkbenchMessages getString Invalid_workbench_state_ve MessageDialog openError WorkbenchMessages getString Restoring_Problems stateFile IStatus WorkbenchPlugin PI_WORKBENCH IWorkbenchConfigurer RESTORE_CODE_RESET VERSION_STRING WorkbenchMessages getString incompatibleSavedStateVersion ignoreSavedState MessageDialog WorkbenchMessages getString incompatibleUIState MessageDialog IDialogConstants OK_LABEL IDialogConstants CANCEL_LABEL ignoreSavedState stateFile IStatus WorkbenchPlugin PI_WORKBENCH IWorkbenchConfigurer RESTORE_CODE_RESET IStatus WorkbenchPlugin PI_WORKBENCH IWorkbenchConfigurer RESTORE_CODE_EXIT IStatus restoreResult restoreState restoreResult getSeverity IStatus ErrorDialog openError WorkbenchMessages getString problemsTitle WorkbenchMessages getString problemsRestoringMsg restoreResult
public void handle Exception Throwable e super handle Exception e String msg e get Message null e get Message NON NLS 1 result 0 new Status I Status ERROR Workbench Plugin PI WORKBENCH I Workbench Configurer RESTORE CODE RESET msg e state File delete  handleException handleException getMessage getMessage IStatus WorkbenchPlugin PI_WORKBENCH IWorkbenchConfigurer RESTORE_CODE_RESET stateFile
package I Status restore State if get Workbench Configurer get Save And Restore String msg Workbench Messages get String Workbench restore Disabled NON NLS 1 return new Status I Status WARNING Workbench Plugin PI WORKBENCH I Workbench Configurer RESTORE CODE RESET msg null Read the workbench state file final File state File get Workbench State File If there is no state file cause one to open if state File exists String msg Workbench Messages get String Workbench no State To Restore NON NLS 1 return new Status I Status WARNING Workbench Plugin PI WORKBENCH I Workbench Configurer RESTORE CODE RESET msg null NON NLS 1 final I Status result new Status I Status OK Workbench Plugin PI WORKBENCH I Status OK null NON NLS 1 Platform run new Safe Runnable Workbench Messages get String Error Reading State NON NLS 1 public void run throws Exception File Input Stream input new File Input Stream state File Buffered Reader reader new Buffered Reader new Input Stream Reader input utf 8 NON NLS 1 I Memento memento XML Memento create Read Root reader Validate known version format String version memento get String I Workbench Constants TAG VERSION boolean valid false for int i 0 i VERSION STRING length i if VERSION STRING i equals version valid true break if valid reader close String msg Workbench Messages get String Invalid workbench state ve NON NLS 1 Message Dialog open Error Shell null Workbench Messages get String Restoring Problems NON NLS 1 msg NON NLS 1 state File delete result 0 new Status I Status ERROR Workbench Plugin PI WORKBENCH I Workbench Configurer RESTORE CODE RESET msg null return Validate compatible version format We no longer support the release 1 0 format if VERSION STRING 0 equals version reader close String msg Workbench Messages get String Workbench incompatible Saved State Version NON NLS 1 boolean ignore Saved State new Message Dialog null Workbench Messages get String Workbench incompatibleUI State NON NLS 1 null msg Message Dialog WARNING new String I Dialog Constants OK LABEL I Dialog Constants CANCEL LABEL 0 open 0 OK is the default if ignore Saved State state File delete result 0 new Status I Status WARNING Workbench Plugin PI WORKBENCH I Workbench Configurer RESTORE CODE RESET msg null else result 0 new Status I Status WARNING Workbench Plugin PI WORKBENCH I Workbench Configurer RESTORE CODE EXIT msg null return Restore the saved state I Status restore Result restore State memento reader close if restore Result get Severity I Status ERROR Error Dialog open Error null Workbench Messages get String Workspace problems Title NON NLS 1 Workbench Messages get String Workbench problems Restoring Msg NON NLS 1 restore Result public void handle Exception Throwable e super handle Exception e String msg e get Message null e get Message NON NLS 1 result 0 new Status I Status ERROR Workbench Plugin PI WORKBENCH I Workbench Configurer RESTORE CODE RESET msg e state File delete ensure at least one window was opened if result 0 isOK window Manager get Windows length 0 String msg Workbench Messages get String Workbench no Windows Restored NON NLS 1 result 0 new Status I Status ERROR Workbench Plugin PI WORKBENCH I Workbench Configurer RESTORE CODE RESET msg null return result 0  IStatus restoreState getWorkbenchConfigurer getSaveAndRestore WorkbenchMessages getString restoreDisabled IStatus WorkbenchPlugin PI_WORKBENCH IWorkbenchConfigurer RESTORE_CODE_RESET stateFile getWorkbenchStateFile stateFile WorkbenchMessages getString noStateToRestore IStatus WorkbenchPlugin PI_WORKBENCH IWorkbenchConfigurer RESTORE_CODE_RESET IStatus IStatus WorkbenchPlugin PI_WORKBENCH IStatus SafeRunnable WorkbenchMessages getString ErrorReadingState FileInputStream FileInputStream stateFile BufferedReader BufferedReader InputStreamReader IMemento XMLMemento createReadRoot getString IWorkbenchConstants TAG_VERSION VERSION_STRING VERSION_STRING WorkbenchMessages getString Invalid_workbench_state_ve MessageDialog openError WorkbenchMessages getString Restoring_Problems stateFile IStatus WorkbenchPlugin PI_WORKBENCH IWorkbenchConfigurer RESTORE_CODE_RESET VERSION_STRING WorkbenchMessages getString incompatibleSavedStateVersion ignoreSavedState MessageDialog WorkbenchMessages getString incompatibleUIState MessageDialog IDialogConstants OK_LABEL IDialogConstants CANCEL_LABEL ignoreSavedState stateFile IStatus WorkbenchPlugin PI_WORKBENCH IWorkbenchConfigurer RESTORE_CODE_RESET IStatus WorkbenchPlugin PI_WORKBENCH IWorkbenchConfigurer RESTORE_CODE_EXIT IStatus restoreResult restoreState restoreResult getSeverity IStatus ErrorDialog openError WorkbenchMessages getString problemsTitle WorkbenchMessages getString problemsRestoringMsg restoreResult handleException handleException getMessage getMessage IStatus WorkbenchPlugin PI_WORKBENCH IWorkbenchConfigurer RESTORE_CODE_RESET stateFile windowManager getWindows WorkbenchMessages getString noWindowsRestored IStatus WorkbenchPlugin PI_WORKBENCH IWorkbenchConfigurer RESTORE_CODE_RESET
non Javadoc Method declared on I Workbench public I Workbench Window open Workbench Window I Adaptable input throws Workbench Exception return open Workbench Window get Perspective Registry get Default Perspective input  IWorkbench IWorkbenchWindow openWorkbenchWindow IAdaptable WorkbenchException openWorkbenchWindow getPerspectiveRegistry getDefaultPerspective
Busy Indicator show While null new Runnable public void run try result 0 busy Open Workbench Window perspID input catch Workbench Exception e result 0 e  BusyIndicator showWhile busyOpenWorkbenchWindow WorkbenchException
public I Workbench Window open Workbench Window final String perspID final I Adaptable input throws Workbench Exception Run op in busy cursor final Object result new Object 1 Busy Indicator show While null new Runnable public void run try result 0 busy Open Workbench Window perspID input catch Workbench Exception e result 0 e if result 0 instanceof I Workbench Window return I Workbench Window result 0 else if result 0 instanceof Workbench Exception throw Workbench Exception result 0 else throw new Workbench Exception Workbench Messages get String Abnormal Workbench Conditi NON NLS 1  IWorkbenchWindow openWorkbenchWindow IAdaptable WorkbenchException BusyIndicator showWhile busyOpenWorkbenchWindow WorkbenchException IWorkbenchWindow IWorkbenchWindow WorkbenchException WorkbenchException WorkbenchException WorkbenchMessages getString Abnormal_Workbench_Conditi
private XML Memento record Workbench State XML Memento memento XML Memento create Write Root I Workbench Constants TAG WORKBENCH I Status status save State memento if status get Severity I Status OK Error Dialog open Error Shell null Workbench Messages get String Workbench problems Saving NON NLS 1 Workbench Messages get String Workbench problems Saving Msg NON NLS 1 status return memento  XMLMemento recordWorkbenchState XMLMemento XMLMemento createWriteRoot IWorkbenchConstants TAG_WORKBENCH IStatus saveState getSeverity IStatus ErrorDialog openError WorkbenchMessages getString problemsSaving WorkbenchMessages getString problemsSavingMsg
non Javadoc Method declared on I Workbench public boolean restart this is the return code from run to trigger a restart return close PlatformUI RETURN RESTART false  IWorkbench RETURN_RESTART
private I Status restore State I Memento memento Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Workbench problems Restoring null NON NLS 1 I Memento child Mem try UI Stats start UI Stats RESTORE WORKBENCH MRU List NON NLS 1 I Memento mru Memento memento get Child I Workbench Constants TAG MRU LIST NON NLS 1 if mru Memento null result add get Editor History restore State mru Memento finally UI Stats end UI Stats RESTORE WORKBENCH MRU List NON NLS 1 Get the child windows I Memento children memento get Children I Workbench Constants TAG WINDOW Read the workbench windows for int x 0 x children length x child Mem children x Workbench Window new Window new Workbench Window new Window create allow the application to specify an initial perspective to open issue temporary workaround for ignoring initial perspective String initial Perspective Id get Advisor get Initial Window Perspective Id if initial Perspective Id null I Perspective Descriptor desc get Perspective Registry find Perspective With Id initial Perspective Id result merge new Window restore State child Mem desc add the window so that any work done in new Window restore State that relies on Workbench methods has windows to work with window Manager add new Window whether the window was opened boolean opened false now that we ve added it to the window manager we need to listen for any exception that might hose us before we get a chance to open it If one occurs remove the new window from the manager try result merge new Window restore State child Mem null try get Advisor post Window Restore new Window get Window Configurer catch Workbench Exception e result add e get Status new Window open opened true finally if opened new Window close return result  IStatus restoreState IMemento MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString problemsRestoring IMemento childMem UIStats UIStats RESTORE_WORKBENCH MRUList IMemento mruMemento getChild IWorkbenchConstants TAG_MRU_LIST mruMemento getEditorHistory restoreState mruMemento UIStats UIStats RESTORE_WORKBENCH MRUList IMemento getChildren IWorkbenchConstants TAG_WINDOW childMem WorkbenchWindow newWindow newWorkbenchWindow newWindow initialPerspectiveId getAdvisor getInitialWindowPerspectiveId initialPerspectiveId IPerspectiveDescriptor getPerspectiveRegistry findPerspectiveWithId initialPerspectiveId newWindow restoreState childMem newWindow restoreState windowManager newWindow newWindow restoreState childMem getAdvisor postWindowRestore newWindow getWindowConfigurer WorkbenchException getStatus newWindow newWindow
Returns an array with the ids of all plugins that extend the code org eclipse ui startup code extension point public String get Early Activated Plugins I Extension Point point Platform get Extension Registry get Extension Point PlatformUI PLUGIN ID I Workbench Constants PL STARTUP I Extension extensions point get Extensions String result new String extensions length for int i 0 i extensions length i result i extensions i get Namespace return result  getEarlyActivatedPlugins IExtensionPoint getExtensionRegistry getExtensionPoint PLUGIN_ID IWorkbenchConstants PL_STARTUP IExtension getExtensions getNamespace
public void run I Extension Registry registry Platform get Extension Registry bug 55901 don t use get Config Elements directly for pre 3 0 compat make sure to allow both missing class attribute and a missing startup element I Extension Point point registry get Extension Point PlatformUI PLUGIN ID I Workbench Constants PL STARTUP I Extension extensions point get Extensions for int i 0 i extensions length i I Extension extension extensions i if the plugin is not in the set of disabled plugins then execute the code to start it if disabled Plugins index Of extension get Namespace 1 Platform run new Early Startup Runnable extension  IExtensionRegistry getExtensionRegistry getConfigElements IExtensionPoint getExtensionPoint PLUGIN_ID IWorkbenchConstants PL_STARTUP IExtension getExtensions IExtension disabledPlugins indexOf getNamespace EarlyStartupRunnable
private void start Plugins Runnable work new Runnable final String disabled Plugins get Preference Store get String I Preference Constants PLUGINS NOT ACTIVATED ON STARTUP public void run I Extension Registry registry Platform get Extension Registry bug 55901 don t use get Config Elements directly for pre 3 0 compat make sure to allow both missing class attribute and a missing startup element I Extension Point point registry get Extension Point PlatformUI PLUGIN ID I Workbench Constants PL STARTUP I Extension extensions point get Extensions for int i 0 i extensions length i I Extension extension extensions i if the plugin is not in the set of disabled plugins then execute the code to start it if disabled Plugins index Of extension get Namespace 1 Platform run new Early Startup Runnable extension Thread thread new Thread work thread start  startPlugins disabledPlugins getPreferenceStore getString IPreferenceConstants PLUGINS_NOT_ACTIVATED_ON_STARTUP IExtensionRegistry getExtensionRegistry getConfigElements IExtensionPoint getExtensionPoint PLUGIN_ID IWorkbenchConstants PL_STARTUP IExtension getExtensions IExtension disabledPlugins indexOf getNamespace EarlyStartupRunnable
Listener close Listener new Listener public void handle Event Event event event doit close  closeListener handleEvent
display async Exec new Runnable public void run UI Stats end UI Stats START WORKBENCH Workbench NON NLS 1  asyncExec UIStats UIStats START_WORKBENCH
Internal method for running the workbench UI This entails processing and dispatching events until the workbench is closed or restarted return return code link PlatformUI RETURN OK RETURN OK for normal exit link PlatformUI RETURN RESTART RETURN RESTART if the workbench was terminated with a call to link I Workbench restart I Workbench restart link PlatformUI RETURN UNSTARTABLE RETURN UNSTARTABLE if the workbench could not be started other values reserved for future use since 3 0 private int runUI UI Stats start UI Stats START WORKBENCH Workbench NON NLS 1 Listener close Listener new Listener public void handle Event Event event event doit close Initialize an exception handler Window I Exception Handler handler Exception Handler get Instance try react to display close event by closing workbench nicely display add Listener SWT Close close Listener install backstop to catch exceptions thrown out of event loop Window set Exception Handler handler initialize workbench and restore or open one window boolean initOK init display drop the splash screen now that a workbench window is up Platform end Splash let the advisor run its start up code if initOK advisor post Startup may trigger a close restart if initOK run Event Loop start eager plug ins start Plugins display async Exec new Runnable public void run UI Stats end UI Stats START WORKBENCH Workbench NON NLS 1 get Workbench Testable init display this the event loop run Event Loop handler display catch final Exception e if display is Disposed handler handle Exception e else String msg Exception in Workbench runUI after display was disposed NON NLS 1 Workbench Plugin log msg new Status I Status ERROR Workbench Plugin PI WORKBENCH 1 msg e finally mandatory clean up if display is Disposed display remove Listener SWT Close close Listener restart or exit based on return Code return return Code  RETURN_OK RETURN_OK RETURN_RESTART RETURN_RESTART IWorkbench IWorkbench RETURN_UNSTARTABLE RETURN_UNSTARTABLE UIStats UIStats START_WORKBENCH closeListener handleEvent IExceptionHandler ExceptionHandler getInstance addListener closeListener setExceptionHandler endSplash postStartup runEventLoop startPlugins asyncExec UIStats UIStats START_WORKBENCH getWorkbenchTestable runEventLoop isDisposed handleException WorkbenchPlugin IStatus WorkbenchPlugin PI_WORKBENCH isDisposed removeListener closeListener returnCode returnCode
private void run Event Loop Window I Exception Handler handler Display display run Event Loop true while run Event Loop try if display read And Dispatch get Advisor event Loop Idle display catch Throwable t handler handle Exception t  runEventLoop IExceptionHandler runEventLoop runEventLoop readAndDispatch getAdvisor eventLoopIdle handleException
private I Status save State I Memento memento Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Workbench problems Saving null NON NLS 1 Save the version number memento put String I Workbench Constants TAG VERSION VERSION STRING 1 Save the workbench windows I Workbench Window windows get Workbench Windows for int nX 0 nX windows length nX Workbench Window window Workbench Window windows nX I Memento child Mem memento create Child I Workbench Constants TAG WINDOW result merge window save State child Mem result add get Editor History save State memento create Child I Workbench Constants TAG MRU LIST NON NLS 1 return result  IStatus saveState IMemento MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString problemsSaving putString IWorkbenchConstants TAG_VERSION VERSION_STRING IWorkbenchWindow getWorkbenchWindows WorkbenchWindow WorkbenchWindow IMemento childMem createChild IWorkbenchConstants TAG_WINDOW saveState childMem getEditorHistory saveState createChild IWorkbenchConstants TAG_MRU_LIST
private boolean save Memento To File XML Memento memento Save it to a file File state File get Workbench State File try File Output Stream stream new File Output Stream state File Output Stream Writer writer new Output Stream Writer stream utf 8 NON NLS 1 memento save writer writer close catch IO Exception e state File delete Message Dialog open Error Shell null Workbench Messages get String Saving Problem NON NLS 1 Workbench Messages get String Problem Saving State NON NLS 1 return false Success return true  saveMementoToFile XMLMemento stateFile getWorkbenchStateFile FileOutputStream FileOutputStream stateFile OutputStreamWriter OutputStreamWriter IOException stateFile MessageDialog openError WorkbenchMessages getString SavingProblem WorkbenchMessages getString ProblemSavingState
public I Workbench Page show Perspective String perspective Id I Workbench Window window throws Workbench Exception Assert is Not Null perspective Id If the specified window has the requested perspective open then the window is given focus and the perspective is shown The page s input is ignored Workbench Window win Workbench Window window if win null Workbench Page page win get Active Workbench Page if page null I Perspective Descriptor perspectives page get Opened Perspectives for int i 0 i perspectives length i I Perspective Descriptor persp perspectives i if perspective Id equals persp get Id win get Shell open page set Perspective persp return page If another window that has the workspace root as input and the requested perpective open and active then the window is given focus I Adaptable input get Default Page Input I Workbench Window windows get Workbench Windows for int i 0 i windows length i win Workbench Window windows i if window win Workbench Page page win get Active Workbench Page if page null boolean input Same false if input null input Same page get Input null else input Same input equals page get Input if input Same Perspective persp page get Active Perspective if perspective Id equals persp get Desc get Id Shell shell win get Shell shell open if shell get Minimized shell set Minimized false return page Otherwise the requested perspective is opened and shown in the specified window or in a new window depending on the current user preference for opening perspectives and that window is given focus win Workbench Window window if win null I Preference Store store Workbench Plugin get Default get Preference Store int mode store get Int I Preference Constants OPEN PERSP MODE I Workbench Page page win get Active Workbench Page I Perspective Descriptor persp null if page null persp page get Perspective Only open a new window if user preference is set and the window has an active perspective if I Preference Constants OPM NEW WINDOW mode persp null I Workbench Window new Window open Workbench Window perspective Id input return new Window get Active Page else I Perspective Descriptor desc get Perspective Registry find Perspective With Id perspective Id if desc null throw new Workbench Exception Workbench Messages get String Workbench Page Error Recreating Perspective NON NLS 1 win get Shell open if page null page win open Page perspective Id input else page set Perspective desc return page Just throw an exception throw new Workbench Exception Workbench Messages format Workbench show Perspective Error new Object perspective Id NON NLS 1  IWorkbenchPage showPerspective perspectiveId IWorkbenchWindow WorkbenchException isNotNull perspectiveId WorkbenchWindow WorkbenchWindow WorkbenchPage getActiveWorkbenchPage IPerspectiveDescriptor getOpenedPerspectives IPerspectiveDescriptor perspectiveId getId getShell setPerspective IAdaptable getDefaultPageInput IWorkbenchWindow getWorkbenchWindows WorkbenchWindow WorkbenchPage getActiveWorkbenchPage inputSame inputSame getInput inputSame getInput inputSame getActivePerspective perspectiveId getDesc getId getShell getMinimized setMinimized WorkbenchWindow IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore getInt IPreferenceConstants OPEN_PERSP_MODE IWorkbenchPage getActiveWorkbenchPage IPerspectiveDescriptor getPerspective IPreferenceConstants OPM_NEW_WINDOW IWorkbenchWindow newWindow openWorkbenchWindow perspectiveId newWindow getActivePage IPerspectiveDescriptor getPerspectiveRegistry findPerspectiveWithId perspectiveId WorkbenchException WorkbenchMessages getString WorkbenchPage ErrorRecreatingPerspective getShell openPage perspectiveId setPerspective WorkbenchException WorkbenchMessages showPerspectiveError perspectiveId
public I Workbench Page show Perspective String perspective Id I Workbench Window window I Adaptable input throws Workbench Exception Assert is Not Null perspective Id If the specified window has the requested perspective open and the same requested input then the window is given focus and the perspective is shown boolean input Same As Window false Workbench Window win Workbench Window window if win null Workbench Page page win get Active Workbench Page if page null boolean input Same false if input null input Same page get Input null else input Same input equals page get Input if input Same input Same As Window true I Perspective Descriptor perspectives page get Opened Perspectives for int i 0 i perspectives length i I Perspective Descriptor persp perspectives i if perspective Id equals persp get Id win get Shell open page set Perspective persp return page If another window has the requested input and the requested perpective open and active then that window is given focus I Workbench Window windows get Workbench Windows for int i 0 i windows length i win Workbench Window windows i if window win Workbench Page page win get Active Workbench Page if page null boolean input Same false if input null input Same page get Input null else input Same input equals page get Input if input Same Perspective persp page get Active Perspective if perspective Id equals persp get Desc get Id win get Shell open return page If the specified window has the same requested input but not the requested perspective then the window is given focus and the perspective is opened and shown on condition that the user preference is not to open perspectives in a new window win Workbench Window window if input Same As Window win null I Preference Store store Workbench Plugin get Default get Preference Store int mode store get Int I Preference Constants OPEN PERSP MODE if I Preference Constants OPM NEW WINDOW mode I Workbench Page page win get Active Workbench Page I Perspective Descriptor desc get Perspective Registry find Perspective With Id perspective Id if desc null throw new Workbench Exception Workbench Messages get String Workbench Page Error Recreating Perspective NON NLS 1 win get Shell open if page null page win open Page perspective Id input else page set Perspective desc return page If the specified window has no active perspective then open the requested perspective and show the specified window if win null I Workbench Page page win get Active Workbench Page I Perspective Descriptor persp null if page null persp page get Perspective if persp null I Perspective Descriptor desc get Perspective Registry find Perspective With Id perspective Id if desc null throw new Workbench Exception Workbench Messages get String Workbench Page Error Recreating Perspective NON NLS 1 win get Shell open if page null page win open Page perspective Id input else page set Perspective desc return page Otherwise the requested perspective is opened and shown in a new window and the window is given focus I Workbench Window new Window open Workbench Window perspective Id input return new Window get Active Page  IWorkbenchPage showPerspective perspectiveId IWorkbenchWindow IAdaptable WorkbenchException isNotNull perspectiveId inputSameAsWindow WorkbenchWindow WorkbenchWindow WorkbenchPage getActiveWorkbenchPage inputSame inputSame getInput inputSame getInput inputSame inputSameAsWindow IPerspectiveDescriptor getOpenedPerspectives IPerspectiveDescriptor perspectiveId getId getShell setPerspective IWorkbenchWindow getWorkbenchWindows WorkbenchWindow WorkbenchPage getActiveWorkbenchPage inputSame inputSame getInput inputSame getInput inputSame getActivePerspective perspectiveId getDesc getId getShell WorkbenchWindow inputSameAsWindow IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore getInt IPreferenceConstants OPEN_PERSP_MODE IPreferenceConstants OPM_NEW_WINDOW IWorkbenchPage getActiveWorkbenchPage IPerspectiveDescriptor getPerspectiveRegistry findPerspectiveWithId perspectiveId WorkbenchException WorkbenchMessages getString WorkbenchPage ErrorRecreatingPerspective getShell openPage perspectiveId setPerspective IWorkbenchPage getActiveWorkbenchPage IPerspectiveDescriptor getPerspective IPerspectiveDescriptor getPerspectiveRegistry findPerspectiveWithId perspectiveId WorkbenchException WorkbenchMessages getString WorkbenchPage ErrorRecreatingPerspective getShell openPage perspectiveId setPerspective IWorkbenchWindow newWindow openWorkbenchWindow perspectiveId newWindow getActivePage
private void shutdown shutdown application specific portions first advisor post Shutdown for dynamic UI Platform get Extension Registry remove Registry Change Listener extension Event Handler shutdown the rest of the workbench Workbench Colors shutdown activity Helper shutdown uninitialize Images if Workbench Plugin get Default null Workbench Plugin get Default reset Workbench Theme Manager get Instance dispose  postShutdown getExtensionRegistry removeRegistryChangeListener extensionEventHandler WorkbenchColors activityHelper uninitializeImages WorkbenchPlugin getDefault WorkbenchPlugin getDefault WorkbenchThemeManager getInstance
non Javadoc Method declared on I Workbench public I Decorator Manager get Decorator Manager return Workbench Plugin get Default get Decorator Manager  IWorkbench IDecoratorManager getDecoratorManager WorkbenchPlugin getDefault getDecoratorManager
private Workbench Window get Activated Window if activated Window null Shell shell activated Window get Shell if shell null shell is Disposed return activated Window return null  WorkbenchWindow getActivatedWindow activatedWindow activatedWindow getShell isDisposed activatedWindow
package void set Activated Window Workbench Window window activated Window window  setActivatedWindow WorkbenchWindow activatedWindow
Returns the unique object that applications use to configure the workbench p IMPORTANT This method is declared package private to prevent regular plug ins from downcasting I Workbench to Workbench and getting hold of the workbench configurer that would allow them to tamper with the workbench The workbench configurer is available only to the application p package Workbench Configurer get Workbench Configurer if workbench Configurer null workbench Configurer new Workbench Configurer return workbench Configurer  IWorkbench WorkbenchConfigurer getWorkbenchConfigurer workbenchConfigurer workbenchConfigurer WorkbenchConfigurer workbenchConfigurer
Returns the workbench advisor that created this workbench p IMPORTANT This method is declared package private to prevent regular plug ins from downcasting I Workbench to Workbench and getting hold of the workbench advisor that would allow them to tamper with the workbench The workbench advisor is internal to the application p package Workbench Advisor get Advisor return advisor  IWorkbench WorkbenchAdvisor getAdvisor
non Javadoc Method declared on I Workbench public Display get Display return display  IWorkbench getDisplay
Returns the default perspective id return the default perspective id public String get Default Perspective Id String id get Advisor get Initial Window Perspective Id make sure we the advisor gave us one Assert is Not Null id return id  getDefaultPerspectiveId getAdvisor getInitialWindowPerspectiveId isNotNull
Returns the default workbench window page input return the default window page input or code null code if none public I Adaptable get Default Page Input return get Advisor get Default Page Input  IAdaptable getDefaultPageInput getAdvisor getDefaultPageInput
Returns the id of the preference page that should be presented most prominently return the id of the preference page or code null code if none public String get Main Preference Page Id String id get Advisor get Main Preference Page Id return id  getMainPreferencePageId getAdvisor getMainPreferencePageId
since 3 0 public I Element Factory get Element Factory String factory Id Assert is Not Null factory Id return Workbench Plugin get Default get Element Factory factory Id  IElementFactory getElementFactory factoryId isNotNull factoryId WorkbenchPlugin getDefault getElementFactory factoryId
see org eclipse ui I Workbench get Progress Service public I Progress Service get Progress Service return Progress Manager get Instance  IWorkbench getProgressService IProgressService getProgressService ProgressManager getInstance
private Workbench Context Support workbench Context Support public I Workbench Activity Support get Activity Support return workbench Activity Support  WorkbenchContextSupport workbenchContextSupport IWorkbenchActivitySupport getActivitySupport workbenchActivitySupport
public I Workbench Command Support get Command Support return workbench Command Support  IWorkbenchCommandSupport getCommandSupport workbenchCommandSupport
public I Workbench Context Support get Context Support return workbench Context Support  IWorkbenchContextSupport getContextSupport workbenchContextSupport
private final I Command Manager Listener command Manager Listener new I Command Manager Listener public final void command Manager Changed final Command Manager Event command Manager Event update Active Workbench Window Menu Manager false  ICommandManagerListener commandManagerListener ICommandManagerListener commandManagerChanged CommandManagerEvent commandManagerEvent updateActiveWorkbenchWindowMenuManager
public final void context Manager Changed final Context Manager Event context Manager Event final Set enabled Context Ids workbench Context Support get Context Manager get Enabled Context Ids final Map enabled Context Tree workbench Context Support create Filtered Context Tree For enabled Context Ids workbench Command Support set Active Context Ids enabled Context Tree  contextManagerChanged ContextManagerEvent contextManagerEvent enabledContextIds workbenchContextSupport getContextManager getEnabledContextIds enabledContextTree workbenchContextSupport createFilteredContextTreeFor enabledContextIds workbenchCommandSupport setActiveContextIds enabledContextTree
private final I Window Listener window Listener new I Window Listener public void window Activated I Workbench Window window update Active Workbench Window Menu Manager true  IWindowListener windowListener IWindowListener windowActivated IWorkbenchWindow updateActiveWorkbenchWindowMenuManager
public void window Closed I Workbench Window window update Active Workbench Window Menu Manager true  windowClosed IWorkbenchWindow updateActiveWorkbenchWindowMenuManager
public void window Deactivated I Workbench Window window update Active Workbench Window Menu Manager true  windowDeactivated IWorkbenchWindow updateActiveWorkbenchWindowMenuManager
public void window Opened I Workbench Window window update Active Workbench Window Menu Manager true  windowOpened IWorkbenchWindow updateActiveWorkbenchWindowMenuManager
private void update Active Workbench Window Menu Manager boolean text Only final I Workbench Window workbench Window get Active Workbench Window if workbench Window instanceof Workbench Window final Workbench Window window Workbench Window workbench Window if window is Closing return final Menu Manager menu Manager window get Menu Manager if text Only menu Manager update I Action TEXT else menu Manager update All true  updateActiveWorkbenchWindowMenuManager textOnly IWorkbenchWindow workbenchWindow getActiveWorkbenchWindow workbenchWindow WorkbenchWindow WorkbenchWindow WorkbenchWindow workbenchWindow isClosing MenuManager menuManager getMenuManager textOnly menuManager IAction menuManager updateAll
see org eclipse ui I Workbench get Intro Manager public I Intro Manager get Intro Manager return intro Manager  IWorkbench getIntroManager IIntroManager getIntroManager introManager
return the workbench intro manager since 3 0 package Workbench Intro Manager get Workbench Intro Manager return intro Manager  WorkbenchIntroManager getWorkbenchIntroManager introManager
return the intro extension for this workbench since 3 0 public Intro Descriptor get Intro Descriptor return intro Descriptor  IntroDescriptor getIntroDescriptor introDescriptor
This method exists as a test hook This method should strong NEVER strong be called by clients since 3 0 public void set Intro Descriptor Intro Descriptor descriptor if intro Manager get Intro null intro Manager close Intro intro Manager get Intro intro Descriptor descriptor  setIntroDescriptor IntroDescriptor introManager getIntro introManager closeIntro introManager getIntro introDescriptor
see org eclipse ui I Workbench get Theme Manager public I Theme Manager get Theme Manager return Workbench Theme Manager get Instance  IWorkbench getThemeManager IThemeManager getThemeManager WorkbenchThemeManager getInstance
Returns code true code if the workbench is running code false code if it has been terminated public boolean is Running return run Event Loop  isRunning runEventLoop
Return the presentation ID specified by the preference or the default ID if undefined return the presentation ID see I Workbench Preference Constants PRESENTATION FACTORY ID public String get Presentation Id String factory Id Pref Util getAPI Preference Store get String I Workbench Preference Constants PRESENTATION FACTORY ID Workaround for bug 58975 New preference mechanism does not properly initialize defaults Ensure that the UI plugin has started too if factory Id null factory Id equals NON NLS 1 factory Id org eclipse ui presentations default NON NLS 1 return factory Id  IWorkbenchPreferenceConstants PRESENTATION_FACTORY_ID getPresentationId factoryId PrefUtil getAPIPreferenceStore getString IWorkbenchPreferenceConstants PRESENTATION_FACTORY_ID factoryId factoryId factoryId factoryId
p Indicates the start of a large update within the workbench This is used to disable CPU intensive change sensitive services that were temporarily disabled in the midst of large changes This method should always be called in tandem with code large Update End code and the event loop should not be allowed to spin before that method is called p p Important always use with code large Update End code p public final void large Update Start if large Updates 0 workbench Command Support set Processing false workbench Context Support set Processing false  largeUpdateEnd largeUpdateEnd largeUpdateStart largeUpdates workbenchCommandSupport setProcessing workbenchContextSupport setProcessing
p Indicates the end of a large update within the workbench This is used to re enable services that were temporarily disabled in the midst of large changes This method should always be called in tandem with code large Update Start code and the event loop should not be allowed to spin before this method is called p p Important always protect this call by using code finally code p public final void large Update End if large Updates 0 workbench Command Support set Processing true workbench Context Support set Processing true  largeUpdateStart largeUpdateEnd largeUpdates workbenchCommandSupport setProcessing workbenchContextSupport setProcessing

Dispose all color pre allocated by the workbench private static void dispose Workbench Colors for int i 0 i workbench Colors length i workbench Colors i dispose workbench Colors null  disposeWorkbenchColors workbenchColors workbenchColors workbenchColors
Initialize all colors used in the workbench in case the OS is using a 256 color palette making sure the workbench colors are allocated This list comes from the designers private static void init Workbench Colors Display d if workbench Colors null return workbench Colors new Color Product pallet new Color d 255 255 255 new Color d 255 251 240 new Color d 223 223 191 new Color d 223 191 191 new Color d 192 220 192 new Color d 192 192 192 new Color d 191 191 191 new Color d 191 191 159 new Color d 191 159 191 new Color d 160 160 164 new Color d 159 159 191 new Color d 159 159 159 new Color d 159 159 127 new Color d 159 127 159 new Color d 159 127 127 new Color d 128 128 128 new Color d 127 159 159 new Color d 127 159 127 new Color d 127 127 159 new Color d 127 127 127 new Color d 127 127 95 new Color d 127 95 127 new Color d 127 95 95 new Color d 95 127 127 new Color d 95 127 95 new Color d 95 95 127 new Color d 95 95 95 new Color d 95 95 63 new Color d 95 63 95 new Color d 95 63 63 new Color d 63 95 95 new Color d 63 95 63 new Color d 63 63 95 new Color d 0 0 0 wizban pallet new Color d 195 204 224 new Color d 214 221 235 new Color d 149 168 199 new Color d 128 148 178 new Color d 106 128 158 new Color d 255 255 255 new Color d 0 0 0 new Color d 0 0 0 Perspective new Color d 132 130 132 new Color d 143 141 138 new Color d 171 168 165 Preference Dialog and Title Area Dialog new Color d 230 226 221  initWorkbenchColors workbenchColors workbenchColors PreferenceDialog TitleAreaDialog
Disposes of the colors Ignore all system colors as they do not need to be disposed static public void shutdown if init return dispose Workbench Colors init false  disposeWorkbenchColors
Initializes the colors static public void startup if init return Initialize the caches first init true Display display Display get Default init Workbench Colors display  getDefault initWorkbenchColors

Creates a new workbench configurer p This method is declared package private Clients are passed an instance only via link Workbench Advisor initialize Workbench Advisor initialize p package Workbench Configurer super  WorkbenchAdvisor WorkbenchAdvisor WorkbenchConfigurer
see org eclipse ui application I Workbench Configurer get Workbench public I Workbench get Workbench return PlatformUI get Workbench  IWorkbenchConfigurer getWorkbench IWorkbench getWorkbench getWorkbench
see org eclipse ui application I Workbench Configurer get Workbench Window Manager public Window Manager get Workbench Window Manager return the global workbench window manager return Workbench get Workbench get Window Manager  IWorkbenchConfigurer getWorkbenchWindowManager WindowManager getWorkbenchWindowManager getWorkbench getWindowManager
public void declare Image String symbolic Name Image Descriptor descriptor boolean shared if symbolic Name null descriptor null throw new Illegal Argument Exception Workbench Images declare Image symbolic Name descriptor shared  declareImage symbolicName ImageDescriptor symbolicName IllegalArgumentException WorkbenchImages declareImage symbolicName
public I Workbench Window Configurer get Window Configurer I Workbench Window window if window null throw new Illegal Argument Exception return Workbench Window window get Window Configurer  IWorkbenchWindowConfigurer getWindowConfigurer IWorkbenchWindow IllegalArgumentException WorkbenchWindow getWindowConfigurer
see org eclipse ui application I Workbench Configurer get Save And Restore public boolean get Save And Restore return save And Restore  IWorkbenchConfigurer getSaveAndRestore getSaveAndRestore saveAndRestore
see org eclipse ui application I Workbench Configurer set Save And Restore boolean public void set Save And Restore boolean enabled save And Restore enabled  IWorkbenchConfigurer setSaveAndRestore setSaveAndRestore saveAndRestore
public Object get Data String key if key null throw new Illegal Argument Exception return extra Data get key  getData IllegalArgumentException extraData
public void set Data String key Object data if key null throw new Illegal Argument Exception if data null extra Data put key data else extra Data remove key  setData IllegalArgumentException extraData extraData
public void emergency Close if is Emergency Closing is Emergency Closing true if Workbench get Instance null Workbench get Instance is Closing Workbench get Instance close PlatformUI RETURN EMERGENCY CLOSE true  emergencyClose isEmergencyClosing isEmergencyClosing getInstance getInstance isClosing getInstance RETURN_EMERGENCY_CLOSE
see org eclipse ui application I Workbench Configurer emergency Closing public boolean emergency Closing return is Emergency Closing  IWorkbenchConfigurer emergencyClosing emergencyClosing isEmergencyClosing
see org eclipse ui application I Workbench Configurer restore State public I Status restore State return Workbench get Workbench restore State  IWorkbenchConfigurer restoreState IStatus restoreState getWorkbench restoreState
see org eclipse ui application I Workbench Configurer open First Time Window public void open First Time Window Workbench get Workbench open First Time Window  IWorkbenchConfigurer openFirstTimeWindow openFirstTimeWindow getWorkbench openFirstTimeWindow

Constructor for Navigate Workbench Action param text public Workbench Editors Action I Workbench Window window super Workbench Messages get String Workbench Editors Action label NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window issue missing action id Workbench Help set Help this I Help Context Ids WORKBENCH EDITORS ACTION set Action Definition Id org eclipse ui window switch To Editor NON NLS 1  NavigateWorkbenchAction WorkbenchEditorsAction IWorkbenchWindow WorkbenchMessages getString WorkbenchEditorsAction IllegalArgumentException workbenchWindow WorkbenchHelp setHelp IHelpContextIds WORKBENCH_EDITORS_ACTION setActionDefinitionId switchToEditor
public void run if workbench Window null action has been disposed return I Workbench Page page workbench Window get Active Page if page null new Workbench Editors Dialog workbench Window open  workbenchWindow IWorkbenchPage workbenchWindow getActivePage WorkbenchEditorsDialog workbenchWindow
Method declared on Action Factory I Workbench Action public void dispose workbench Window null  ActionFactory IWorkbenchAction workbenchWindow

Returns the image cache used internally by the workbench public static Reference Counter get Image Cache return image Cache  ReferenceCounter getImageCache imageCache
Declares a workbench image given the path of the image file relative to the workbench plug in This is a helper method that creates the image descriptor and passes it to the main code declare Image code method param symbolic Name the symbolic name of the image param path the path of the image file relative to the base of the workbench plug ins install directory param shared code true code if this is a shared image and code false code if this is not a shared image private final static void declare Image String key String path boolean shared URL url Bundle Utility find PlatformUI PLUGIN ID path Image Descriptor desc Image Descriptor create FromURL url declare Image key desc shared  declareImage symbolicName declareImage BundleUtility PLUGIN_ID ImageDescriptor ImageDescriptor createFromURL declareImage
Declares all the workbench s images including both shared ones and internal ones private final static void declare Images declare Image I Workbench Graphic Constants IMG ETOOL PIN EDITOR PATH ETOOL pin editor gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL PIN EDITOR DISABLED PATH DTOOL pin editor gif false NON NLS 1 other toolbar buttons declare Image I Workbench Graphic Constants IMG ETOOL SAVE EDIT PATH ETOOL save edit gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL SAVE EDIT HOVER PATH ETOOL save edit gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL SAVE EDIT DISABLED PATH DTOOL save edit gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL SAVEAS EDIT PATH ETOOL saveas edit gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL SAVEAS EDIT HOVER PATH ETOOL saveas edit gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL SAVEAS EDIT DISABLED PATH DTOOL saveas edit gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL SAVEALL EDIT PATH ETOOL saveall edit gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL SAVEALL EDIT HOVER PATH ETOOL saveall edit gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL SAVEALL EDIT DISABLED PATH DTOOL saveall edit gif false NON NLS 1 declare Image I Shared Images IMG TOOL UNDO PATH ETOOL undo edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL UNDO HOVER PATH ETOOL undo edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL UNDO DISABLED PATH DTOOL undo edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL REDO PATH ETOOL redo edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL REDO HOVER PATH ETOOL redo edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL REDO DISABLED PATH DTOOL redo edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL CUT PATH ETOOL cut edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL CUT HOVER PATH ETOOL cut edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL CUT DISABLED PATH DTOOL cut edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL COPY PATH ETOOL copy edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL COPY HOVER PATH ETOOL copy edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL COPY DISABLED PATH DTOOL copy edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL PASTE PATH ETOOL paste edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL PASTE HOVER PATH ETOOL paste edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL PASTE DISABLED PATH DTOOL paste edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL DELETE PATH ETOOL delete edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL DELETE HOVER PATH ETOOL delete edit gif true NON NLS 1 declare Image I Shared Images IMG TOOL DELETE DISABLED PATH DTOOL delete edit gif true NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL PRINT EDIT PATH ETOOL print edit gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL PRINT EDIT HOVER PATH ETOOL print edit gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL PRINT EDIT DISABLED PATH DTOOL print edit gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL HELP CONTENTS PATH ETOOL help contents gif true NON NLS 1 declare Image I Shared Images IMG TOOL FORWARD PATH ELOCALTOOL forward nav gif true NON NLS 1 declare Image I Shared Images IMG TOOL FORWARD HOVER PATH ELOCALTOOL forward nav gif true NON NLS 1 declare Image I Shared Images IMG TOOL FORWARD DISABLED PATH DLOCALTOOL forward nav gif true NON NLS 1 declare Image I Shared Images IMG TOOL BACK PATH ELOCALTOOL backward nav gif true NON NLS 1 declare Image I Shared Images IMG TOOL BACK HOVER PATH ELOCALTOOL backward nav gif true NON NLS 1 declare Image I Shared Images IMG TOOL BACK DISABLED PATH DLOCALTOOL backward nav gif true NON NLS 1 declare Image I Shared Images IMG TOOL UP PATH ELOCALTOOL up nav gif true NON NLS 1 declare Image I Shared Images IMG TOOL UP HOVER PATH ELOCALTOOL up nav gif true NON NLS 1 declare Image I Shared Images IMG TOOL UP DISABLED PATH DLOCALTOOL up nav gif true NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL NEW PAGE PATH EVIEW new persp gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL NEW PAGE HOVER PATH EVIEW new persp gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL HOME NAV PATH ELOCALTOOL home nav gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL DEF PERSPECTIVE PATH EVIEW default persp gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG ETOOL DEF PERSPECTIVE HOVER PATH EVIEW default persp gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG WIZBAN WORKINGSET WIZ PATH WIZBAN workset wiz gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG VIEW DEFAULTVIEW MISC PATH EVIEW defaultview misc gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG DLGBAN SAVEAS DLG PATH WIZBAN saveas wiz gif false NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJ FONT PATH OBJECT font gif true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJ THEME CATEGORY PATH OBJECT theme category gif true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJ ACTIVITY PATH OBJECT activity gif true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJ ACTIVITY CATEGORY PATH OBJECT activity category gif true NON NLS 1 declare Image I Shared Images IMG OBJ FILE PATH OBJECT file obj gif true NON NLS 1 declare Image I Shared Images IMG OBJ FOLDER PATH OBJECT fldr obj gif true NON NLS 1 declare Image I Shared Images IMG OBJ ELEMENT PATH OBJECT elements obj gif true NON NLS 1 declare Image I Shared Images IMG DEF VIEW PATH EVIEW defaultview misc gif true NON NLS 1 declare Image I Workbench Graphic Constants IMG LCL CLOSE VIEW PATH ELOCALTOOL close view gif true NON NLS 1 declare Image I Workbench Graphic Constants IMG LCL CLOSE VIEW HOVER PATH ELOCALTOOL close view gif true NON NLS 1 declare Image I Workbench Graphic Constants IMG LCL PIN VIEW PATH ELOCALTOOL pin view gif true NON NLS 1 declare Image I Workbench Graphic Constants IMG LCL PIN VIEW HOVER PATH ELOCALTOOL pin view gif true NON NLS 1 declare Image I Workbench Graphic Constants IMG LCL MIN VIEW PATH ELOCALTOOL min view gif true NON NLS 1 declare Image I Workbench Graphic Constants IMG LCL MIN VIEW HOVER PATH ELOCALTOOL min view gif true NON NLS 1 declare Image I Workbench Graphic Constants IMG LCL VIEW MENU PATH ELOCALTOOL view menu gif true NON NLS 1 declare Image I Workbench Graphic Constants IMG LCL VIEW MENU HOVER PATH ELOCALTOOL view menu gif true NON NLS 1 declare Image I Workbench Graphic Constants IMG LCL LINKTO HELP PATH ELOCALTOOL linkto help gif true NON NLS 1 declare Image I Shared Images IMG OBJS ERROR TSK PATH OBJECT error tsk gif true NON NLS 1 declare Image I Shared Images IMG OBJS WARN TSK PATH OBJECT warn tsk gif true NON NLS 1 declare Image I Shared Images IMG OBJS INFO TSK PATH OBJECT info tsk gif true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND LEFT SOURCE PATH POINTER left source bmp true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND LEFT MASK PATH POINTER left mask bmp true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND RIGHT SOURCE PATH POINTER right source bmp true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND RIGHT MASK PATH POINTER right mask bmp true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND TOP SOURCE PATH POINTER top source bmp true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND TOP MASK PATH POINTER top mask bmp true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND BOTTOM SOURCE PATH POINTER bottom source bmp true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND BOTTOM MASK PATH POINTER bottom mask bmp true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND INVALID SOURCE PATH POINTER invalid source bmp true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND INVALID MASK PATH POINTER invalid mask bmp true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND STACK SOURCE PATH POINTER stack source bmp true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND STACK MASK PATH POINTER stack mask bmp true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND OFFSCREEN SOURCE PATH POINTER offscreen source bmp true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND OFFSCREEN MASK PATH POINTER offscreen mask bmp true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND TOFASTVIEW SOURCE PATH POINTER tofastview source bmp true NON NLS 1 declare Image I Workbench Graphic Constants IMG OBJS DND TOFASTVIEW MASK PATH POINTER tofastview mask bmp true NON NLS 1  declareImages declareImage IWorkbenchGraphicConstants IMG_ETOOL_PIN_EDITOR PATH_ETOOL pin_editor declareImage IWorkbenchGraphicConstants IMG_ETOOL_PIN_EDITOR_DISABLED PATH_DTOOL pin_editor declareImage IWorkbenchGraphicConstants IMG_ETOOL_SAVE_EDIT PATH_ETOOL save_edit declareImage IWorkbenchGraphicConstants IMG_ETOOL_SAVE_EDIT_HOVER PATH_ETOOL save_edit declareImage IWorkbenchGraphicConstants IMG_ETOOL_SAVE_EDIT_DISABLED PATH_DTOOL save_edit declareImage IWorkbenchGraphicConstants IMG_ETOOL_SAVEAS_EDIT PATH_ETOOL saveas_edit declareImage IWorkbenchGraphicConstants IMG_ETOOL_SAVEAS_EDIT_HOVER PATH_ETOOL saveas_edit declareImage IWorkbenchGraphicConstants IMG_ETOOL_SAVEAS_EDIT_DISABLED PATH_DTOOL saveas_edit declareImage IWorkbenchGraphicConstants IMG_ETOOL_SAVEALL_EDIT PATH_ETOOL saveall_edit declareImage IWorkbenchGraphicConstants IMG_ETOOL_SAVEALL_EDIT_HOVER PATH_ETOOL saveall_edit declareImage IWorkbenchGraphicConstants IMG_ETOOL_SAVEALL_EDIT_DISABLED PATH_DTOOL saveall_edit declareImage ISharedImages IMG_TOOL_UNDO PATH_ETOOL undo_edit declareImage ISharedImages IMG_TOOL_UNDO_HOVER PATH_ETOOL undo_edit declareImage ISharedImages IMG_TOOL_UNDO_DISABLED PATH_DTOOL undo_edit declareImage ISharedImages IMG_TOOL_REDO PATH_ETOOL redo_edit declareImage ISharedImages IMG_TOOL_REDO_HOVER PATH_ETOOL redo_edit declareImage ISharedImages IMG_TOOL_REDO_DISABLED PATH_DTOOL redo_edit declareImage ISharedImages IMG_TOOL_CUT PATH_ETOOL cut_edit declareImage ISharedImages IMG_TOOL_CUT_HOVER PATH_ETOOL cut_edit declareImage ISharedImages IMG_TOOL_CUT_DISABLED PATH_DTOOL cut_edit declareImage ISharedImages IMG_TOOL_COPY PATH_ETOOL copy_edit declareImage ISharedImages IMG_TOOL_COPY_HOVER PATH_ETOOL copy_edit declareImage ISharedImages IMG_TOOL_COPY_DISABLED PATH_DTOOL copy_edit declareImage ISharedImages IMG_TOOL_PASTE PATH_ETOOL paste_edit declareImage ISharedImages IMG_TOOL_PASTE_HOVER PATH_ETOOL paste_edit declareImage ISharedImages IMG_TOOL_PASTE_DISABLED PATH_DTOOL paste_edit declareImage ISharedImages IMG_TOOL_DELETE PATH_ETOOL delete_edit declareImage ISharedImages IMG_TOOL_DELETE_HOVER PATH_ETOOL delete_edit declareImage ISharedImages IMG_TOOL_DELETE_DISABLED PATH_DTOOL delete_edit declareImage IWorkbenchGraphicConstants IMG_ETOOL_PRINT_EDIT PATH_ETOOL print_edit declareImage IWorkbenchGraphicConstants IMG_ETOOL_PRINT_EDIT_HOVER PATH_ETOOL print_edit declareImage IWorkbenchGraphicConstants IMG_ETOOL_PRINT_EDIT_DISABLED PATH_DTOOL print_edit declareImage IWorkbenchGraphicConstants IMG_ETOOL_HELP_CONTENTS PATH_ETOOL help_contents declareImage ISharedImages IMG_TOOL_FORWARD PATH_ELOCALTOOL forward_nav declareImage ISharedImages IMG_TOOL_FORWARD_HOVER PATH_ELOCALTOOL forward_nav declareImage ISharedImages IMG_TOOL_FORWARD_DISABLED PATH_DLOCALTOOL forward_nav declareImage ISharedImages IMG_TOOL_BACK PATH_ELOCALTOOL backward_nav declareImage ISharedImages IMG_TOOL_BACK_HOVER PATH_ELOCALTOOL backward_nav declareImage ISharedImages IMG_TOOL_BACK_DISABLED PATH_DLOCALTOOL backward_nav declareImage ISharedImages IMG_TOOL_UP PATH_ELOCALTOOL up_nav declareImage ISharedImages IMG_TOOL_UP_HOVER PATH_ELOCALTOOL up_nav declareImage ISharedImages IMG_TOOL_UP_DISABLED PATH_DLOCALTOOL up_nav declareImage IWorkbenchGraphicConstants IMG_ETOOL_NEW_PAGE PATH_EVIEW new_persp declareImage IWorkbenchGraphicConstants IMG_ETOOL_NEW_PAGE_HOVER PATH_EVIEW new_persp declareImage IWorkbenchGraphicConstants IMG_ETOOL_HOME_NAV PATH_ELOCALTOOL home_nav declareImage IWorkbenchGraphicConstants IMG_ETOOL_DEF_PERSPECTIVE PATH_EVIEW default_persp declareImage IWorkbenchGraphicConstants IMG_ETOOL_DEF_PERSPECTIVE_HOVER PATH_EVIEW default_persp declareImage IWorkbenchGraphicConstants IMG_WIZBAN_WORKINGSET_WIZ PATH_WIZBAN workset_wiz declareImage IWorkbenchGraphicConstants IMG_VIEW_DEFAULTVIEW_MISC PATH_EVIEW defaultview_misc declareImage IWorkbenchGraphicConstants IMG_DLGBAN_SAVEAS_DLG PATH_WIZBAN saveas_wiz declareImage IWorkbenchGraphicConstants IMG_OBJ_FONT PATH_OBJECT declareImage IWorkbenchGraphicConstants IMG_OBJ_THEME_CATEGORY PATH_OBJECT theme_category declareImage IWorkbenchGraphicConstants IMG_OBJ_ACTIVITY PATH_OBJECT declareImage IWorkbenchGraphicConstants IMG_OBJ_ACTIVITY_CATEGORY PATH_OBJECT activity_category declareImage ISharedImages IMG_OBJ_FILE PATH_OBJECT file_obj declareImage ISharedImages IMG_OBJ_FOLDER PATH_OBJECT fldr_obj declareImage ISharedImages IMG_OBJ_ELEMENT PATH_OBJECT elements_obj declareImage ISharedImages IMG_DEF_VIEW PATH_EVIEW defaultview_misc declareImage IWorkbenchGraphicConstants IMG_LCL_CLOSE_VIEW PATH_ELOCALTOOL close_view declareImage IWorkbenchGraphicConstants IMG_LCL_CLOSE_VIEW_HOVER PATH_ELOCALTOOL close_view declareImage IWorkbenchGraphicConstants IMG_LCL_PIN_VIEW PATH_ELOCALTOOL pin_view declareImage IWorkbenchGraphicConstants IMG_LCL_PIN_VIEW_HOVER PATH_ELOCALTOOL pin_view declareImage IWorkbenchGraphicConstants IMG_LCL_MIN_VIEW PATH_ELOCALTOOL min_view declareImage IWorkbenchGraphicConstants IMG_LCL_MIN_VIEW_HOVER PATH_ELOCALTOOL min_view declareImage IWorkbenchGraphicConstants IMG_LCL_VIEW_MENU PATH_ELOCALTOOL view_menu declareImage IWorkbenchGraphicConstants IMG_LCL_VIEW_MENU_HOVER PATH_ELOCALTOOL view_menu declareImage IWorkbenchGraphicConstants IMG_LCL_LINKTO_HELP PATH_ELOCALTOOL linkto_help declareImage ISharedImages IMG_OBJS_ERROR_TSK PATH_OBJECT error_tsk declareImage ISharedImages IMG_OBJS_WARN_TSK PATH_OBJECT warn_tsk declareImage ISharedImages IMG_OBJS_INFO_TSK PATH_OBJECT info_tsk declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_LEFT_SOURCE PATH_POINTER left_source declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_LEFT_MASK PATH_POINTER left_mask declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_RIGHT_SOURCE PATH_POINTER right_source declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_RIGHT_MASK PATH_POINTER right_mask declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_TOP_SOURCE PATH_POINTER top_source declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_TOP_MASK PATH_POINTER top_mask declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_BOTTOM_SOURCE PATH_POINTER bottom_source declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_BOTTOM_MASK PATH_POINTER bottom_mask declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_INVALID_SOURCE PATH_POINTER invalid_source declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_INVALID_MASK PATH_POINTER invalid_mask declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_STACK_SOURCE PATH_POINTER stack_source declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_STACK_MASK PATH_POINTER stack_mask declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_OFFSCREEN_SOURCE PATH_POINTER offscreen_source declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_OFFSCREEN_MASK PATH_POINTER offscreen_mask declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_TOFASTVIEW_SOURCE PATH_POINTER tofastview_source declareImage IWorkbenchGraphicConstants IMG_OBJS_DND_TOFASTVIEW_MASK PATH_POINTER tofastview_mask
Declares a workbench image p The workbench remembers the given image descriptor under the given name and makes the image available to plug ins via link org eclipse ui I Shared Images I Workbench get Shared Images For shared images the workbench remembers the image descriptor and will manages the image object create from it clients retrieve shared images via link org eclipse ui I Shared Images get Image I Shared Images get Image For the other non shared images the workbench remembers only the image descriptor clients retrieve the image descriptor via link org eclipse ui I Shared Images get Image Descriptor I Shared Images get Image Descriptor and are entirely responsible for managing the image objects they create from it This is made confusing by the historical fact that the API interface is called I Shared Images p param symbolic Name the symbolic name of the image param descriptor the image descriptor param shared code true code if this is a shared image and code false code if this is not a shared image see org eclipse ui I Shared Images get Image see org eclipse ui I Shared Images get Image Descriptor public static void declare Image String symbolic Name Image Descriptor descriptor boolean shared descriptors put symbolic Name descriptor if shared image Registry put symbolic Name descriptor  ISharedImages IWorkbench getSharedImages ISharedImages getImage ISharedImages getImage ISharedImages getImageDescriptor ISharedImages getImageDescriptor ISharedImages symbolicName ISharedImages getImage ISharedImages getImageDescriptor declareImage symbolicName ImageDescriptor symbolicName imageRegistry symbolicName
Returns the image stored in the workbench plugin s image registry under the given symbolic name If there isn t any value associated with the name then code null code is returned The returned Image is managed by the workbench plugin s image registry Callers of this method must not dispose the returned image This method is essentially a convenient short form of Workbench Images get Image Registry get symbolic Name public static Image get Image String symbolic Name return get Image Registry get symbolic Name  WorkbenchImages getImageRegistry symbolicName getImage symbolicName getImageRegistry symbolicName
Returns the image descriptor stored under the given symbolic name If there isn t any value associated with the name then code null code is returned The class also caches commonly used images in the image registry If you are looking for one of these common images it is recommended you use the get Image method instead public static Image Descriptor get Image Descriptor String symbolic Name return Image Descriptor descriptors get symbolic Name  getImage ImageDescriptor getImageDescriptor symbolicName ImageDescriptor symbolicName
Convenience Method Returns an Image Descriptor obtained from an external program If there isn t any image then code null code is returned This method is convenience and only intended for use by the workbench because it explicitly uses the workbench s registry for caching retrieving images from other extensions other plugins must user their own registry This convenience method is subject to removal Note This consults the plugin for extension and obtains its installation location all requested images are assumed to be in a directory below and relative to that plugins installation directory public static Image Descriptor get Image Descriptor From Program String filename int offset Assert is Not Null filename String key filename offset use as it is not a valid filename character NON NLS 1 Image Descriptor desc get Image Descriptor key if desc null desc new Program Image Descriptor filename offset descriptors put key desc return desc  ImageDescriptor ImageDescriptor getImageDescriptorFromProgram isNotNull ImageDescriptor getImageDescriptor ProgramImageDescriptor
Returns the Image Registry public static Image Registry get Image Registry return image Registry  ImageRegistry ImageRegistry getImageRegistry imageRegistry
Initialize the image registry by declaring all of the required graphics This involves creating J Face image descriptors describing how to create find the image should it be needed The image is not actually allocated until requested Prefix conventions Wizard Banners WIZBAN  Preference Banners PREF BAN  Property Page Banners PROPBAN  Enable toolbar ETOOL  Disable toolbar DTOOL  Local enabled toolbar ELCL  Local Disable toolbar DLCL  Object large OBJL  Object small OBJS  View VIEW  Product images PROD  Misc images MISC  Where are the images The images typically gifs are found in the same location as this plugin class This may mean the same package directory as the package holding this class The images are declared using this get Class to ensure they are looked up via this plugin class see J Face s Image Registry public static Image Registry initialize Image Registry image Registry new Image Registry declare Images return image Registry  JFace WIZBAN_ PREF_BAN_ PROPBAN_ ETOOL_ DTOOL_ ELCL_ DLCL_ OBJL_ OBJS_ VIEW_ PROD_ MISC_ getClass JFace ImageRegistry ImageRegistry initializeImageRegistry imageRegistry ImageRegistry declareImages imageRegistry

Create a new instance of the receiver param workbench the workbench instance Workbench Intro Manager Workbench workbench this workbench workbench  WorkbenchIntroManager
public boolean close Intro I Intro Part part if intro Part null intro Part equals part return false I View Part intro View get View Intro Adapter Part if intro View null assumption is that there is only ever one intro per workbench if we ever support one per window then this will need revisiting I Workbench Page page intro View get Site get Page I View Reference reference page find View Reference I Intro Constants INTRO VIEW ID page hide View intro View if reference null reference get Part false null intro Part null return true return false return true  closeIntro IIntroPart introPart introPart IViewPart introView getViewIntroAdapterPart introView IWorkbenchPage introView getSite getPage IViewReference findViewReference IIntroConstants INTRO_VIEW_ID hideView introView getPart introPart
public I Intro Part show Intro I Workbench Window preferred Window boolean standby if preferred Window null preferred Window this workbench get Active Workbench Window if preferred Window null return null if get View Intro Adapter Part null create Intro Workbench Window preferred Window else try View Intro Adapter Part view Part get View Intro Adapter Part Workbench Page page Workbench Page view Part get Site get Page Workbench Window window Workbench Window page get Workbench Window if window equals preferred Window window get Shell set Active page show View I Intro Constants INTRO VIEW ID catch Part Init Exception e Workbench Plugin log Could not open intro new Status I Status ERROR Workbench Plugin PI WORKBENCH I Status ERROR Could not open intro e NON NLS 1 NON NLS 2 set Intro Standby intro Part standby return intro Part  IIntroPart showIntro IWorkbenchWindow preferredWindow preferredWindow preferredWindow getActiveWorkbenchWindow preferredWindow getViewIntroAdapterPart createIntro WorkbenchWindow preferredWindow ViewIntroAdapterPart viewPart getViewIntroAdapterPart WorkbenchPage WorkbenchPage viewPart getSite getPage WorkbenchWindow WorkbenchWindow getWorkbenchWindow preferredWindow getShell setActive showView IIntroConstants INTRO_VIEW_ID PartInitException WorkbenchPlugin IStatus WorkbenchPlugin PI_WORKBENCH IStatus setIntroStandby introPart introPart
param window the window to test return whether the intro exists in the given window package boolean is Intro In Window I Workbench Window test Window View Intro Adapter Part view Part get View Intro Adapter Part if view Part null return false Workbench Page page Workbench Page view Part get Site get Page Workbench Window window Workbench Window page get Workbench Window if window equals test Window return true return false  isIntroInWindow IWorkbenchWindow testWindow ViewIntroAdapterPart viewPart getViewIntroAdapterPart viewPart WorkbenchPage WorkbenchPage viewPart getSite getPage WorkbenchWindow WorkbenchWindow getWorkbenchWindow testWindow
Create a new Intro area a view currently in the provided window If there is no intro descriptor for this workbench then no work is done param preferred Window the window to create the intro in private void create Intro Workbench Window preferred Window if this workbench get Intro Descriptor null return Workbench Page workbench Page preferred Window get Active Workbench Page if workbench Page null return try workbench Page show View I Intro Constants INTRO VIEW ID catch Part Init Exception e Workbench Plugin log Intro Messages get String Intro could not create part new Status I Status ERROR Workbench Plugin PI WORKBENCH I Status ERROR Intro Messages get String Intro could not create part e NON NLS 1 NON NLS 2  preferredWindow createIntro WorkbenchWindow preferredWindow getIntroDescriptor WorkbenchPage workbenchPage preferredWindow getActiveWorkbenchPage workbenchPage workbenchPage showView IIntroConstants INTRO_VIEW_ID PartInitException WorkbenchPlugin IntroMessages getString could_not_create_part IStatus WorkbenchPlugin PI_WORKBENCH IStatus IntroMessages getString could_not_create_part
public void set Intro Standby I Intro Part part boolean standby if intro Part null intro Part equals part return View Intro Adapter Part view Intro Adapter Part get View Intro Adapter Part if view Intro Adapter Part null return Part Pane pane Part Site view Intro Adapter Part get Site get Pane if standby pane is Zoomed the zoom state is already correct just update the part s state view Intro Adapter Part set Standby standby return Workbench Page view Intro Adapter Part get Site get Page toggle Zoom pane get Part Reference  setIntroStandby IIntroPart introPart introPart ViewIntroAdapterPart viewIntroAdapterPart getViewIntroAdapterPart viewIntroAdapterPart PartPane PartSite viewIntroAdapterPart getSite getPane isZoomed viewIntroAdapterPart setStandby WorkbenchPage viewIntroAdapterPart getSite getPage toggleZoom getPartReference
public boolean is Intro Standby I Intro Part part if intro Part null intro Part equals part return false View Intro Adapter Part view Intro Adapter Part get View Intro Adapter Part if view Intro Adapter Part null return false return Part Site view Intro Adapter Part get Site get Pane is Zoomed  isIntroStandby IIntroPart introPart introPart ViewIntroAdapterPart viewIntroAdapterPart getViewIntroAdapterPart viewIntroAdapterPart PartSite viewIntroAdapterPart getSite getPane isZoomed
see org eclipse ui I Workbench find Intro public I Intro Part get Intro return intro Part  IWorkbench findIntro IIntroPart getIntro introPart
return the code View Intro Adapter Part code for this workbench code null code if it cannot be found package View Intro Adapter Part get View Intro Adapter Part I Workbench Window windows this workbench get Workbench Windows for int i 0 i windows length i I Workbench Window window windows i Workbench Page page Workbench Page window get Active Page if page null continue I Perspective Descriptor persp Descs page get Opened Perspectives for int j 0 j persp Descs length j I Perspective Descriptor descriptor persp Descs j I View Reference reference page find Perspective descriptor find View I Intro Constants INTRO VIEW ID if reference null I View Part part reference get View false if part null part instanceof View Intro Adapter Part return View Intro Adapter Part part return null  ViewIntroAdapterPart ViewIntroAdapterPart getViewIntroAdapterPart IWorkbenchWindow getWorkbenchWindows IWorkbenchWindow WorkbenchPage WorkbenchPage getActivePage IPerspectiveDescriptor perspDescs getOpenedPerspectives perspDescs IPerspectiveDescriptor perspDescs IViewReference findPerspective findView IIntroConstants INTRO_VIEW_ID IViewPart getView ViewIntroAdapterPart ViewIntroAdapterPart
return a new I Intro Part This has the side effect of setting the intro Part field to the new value package I Intro Part create New Intro Part throws Core Exception return intro Part workbench get Intro Descriptor null null workbench get Intro Descriptor create Intro  IIntroPart introPart IIntroPart createNewIntroPart CoreException introPart getIntroDescriptor getIntroDescriptor createIntro
see org eclipse ui I Workbench has Intro public boolean has Intro return workbench get Intro Descriptor null  IWorkbench hasIntro hasIntro getIntroDescriptor

private static Resource Bundle bundle Resource Bundle get Bundle RESOURCE BUNDLE private Workbench Messages prevent instantiation of class  ResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE WorkbenchMessages
Returns the formatted message for the given key in the 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  MessageFormat getString
Returns the resource object with the given key in the 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  getString getString MissingResourceException
Returns the resource object with the given key in the resource bundle If there isn t any value under the given key the default value is returned param key the resource name param def the default value return the string public static String get String String key String def try return bundle get String key catch Missing Resource Exception e return def  getString getString MissingResourceException

public void property Change Property Change Event event String property event get Property if I Working Set Manager CHANGE WORKING SET REMOVE equals property event get Old Value equals working Set set Working Set null else if Layout Part PROP VISIBILITY equals property Workbench Part Reference ref Workbench Part Reference Part Pane event get Source get Part Reference Make sure the new visible part is restored ref get Part Boolean TRUE equals event get New Value if ref null return if Boolean TRUE equals event get New Value String label visible ref get Title NON NLS 1 try UI Stats start UI Stats NOTIFY PART LISTENERS label part Listeners2 fire Part Visible ref finally UI Stats end UI Stats NOTIFY PART LISTENERS label else String label hidden ref get Title NON NLS 1 try UI Stats start UI Stats NOTIFY PART LISTENERS label part Listeners2 fire Part Hidden ref finally UI Stats end UI Stats NOTIFY PART LISTENERS label  propertyChange PropertyChangeEvent getProperty IWorkingSetManager CHANGE_WORKING_SET_REMOVE getOldValue workingSet setWorkingSet LayoutPart PROP_VISIBILITY WorkbenchPartReference WorkbenchPartReference PartPane getSource getPartReference getPart getNewValue getNewValue getTitle UIStats UIStats NOTIFY_PART_LISTENERS partListeners2 firePartVisible UIStats UIStats NOTIFY_PART_LISTENERS getTitle UIStats UIStats NOTIFY_PART_LISTENERS partListeners2 firePartHidden UIStats UIStats NOTIFY_PART_LISTENERS
Updates the contributions given the new part as the active part param new Part the new active part may be code null code public void update Active Part I Workbench Part new Part if active Part new Part return boolean is New Part An Editor new Part instanceof I Editor Part if is New Part An Editor String old Id null if top Editor null old Id top Editor get Site get Id String new Id new Part get Site get Id if the active part is an editor and the new editor is the same kind of editor then we don t have to do anything if active Part top Editor new Id equals old Id return remove the contributions of the old editor if it is a different kind of editor if old Id null old Id equals new Id deactivate Contributions top Editor true if a view was the active part disable its contributions if active Part null active Part top Editor deactivate Contributions active Part true show and enable the contributions of the new editor if it is a different kind of editor or if the old active part was a view if new Id equals old Id active Part top Editor activate Contributions new Part true else if new Part null if active Part null remove all contributions deactivate Contributions active Part true else new part is a view if old active part is a view remove all contributions but if old part is an editor only disable if active Part null deactivate Contributions active Part active Part instanceof I View Part activate Contributions new Part true Array List new Action Sets null if is New Part An Editor active Part top Editor new Part null new Action Sets calculate Action Sets new Part null else new Action Sets calculate Action Sets new Part top Editor if update Action Sets new Action Sets update Action Bars if is New Part An Editor top Editor I Editor Part new Part else if active Part top Editor new Part null since we removed all the contributions we clear the top editor top Editor null active Part new Part  newPart updateActivePart IWorkbenchPart newPart activePart newPart isNewPartAnEditor newPart IEditorPart isNewPartAnEditor oldId topEditor oldId topEditor getSite getId newId newPart getSite getId activePart topEditor newId oldId oldId oldId newId deactivateContributions topEditor activePart activePart topEditor deactivateContributions activePart newId oldId activePart topEditor activateContributions newPart newPart activePart deactivateContributions activePart activePart deactivateContributions activePart activePart IViewPart activateContributions newPart ArrayList newActionSets isNewPartAnEditor activePart topEditor newPart newActionSets calculateActionSets newPart newActionSets calculateActionSets newPart topEditor updateActionSets newActionSets updateActionBars isNewPartAnEditor topEditor IEditorPart newPart activePart topEditor newPart topEditor activePart newPart
Updates the contributions given the new part as the top Editor param new Editor the new top editor may be code null code public void update Top Editor I Editor Part new Editor if top Editor new Editor return String old Id null if top Editor null old Id top Editor get Site get Id String new Id null if new Editor null new Id new Editor get Site get Id if old Id null new Id null old Id equals new Id we don t have to change anything top Editor new Editor return Remove the contributions of the old editor if top Editor null deactivate Contributions top Editor true Show disabled the contributions of the new editor if new Editor null activate Contributions new Editor false Array List new Action Sets calculate Action Sets active Part new Editor if update Action Sets new Action Sets update Action Bars top Editor new Editor  topEditor newEditor updateTopEditor IEditorPart newEditor topEditor newEditor oldId topEditor oldId topEditor getSite getId newId newEditor newId newEditor getSite getId oldId newId oldId newId topEditor newEditor topEditor deactivateContributions topEditor newEditor activateContributions newEditor ArrayList newActionSets calculateActionSets activePart newEditor updateActionSets newActionSets updateActionBars topEditor newEditor
Activates the contributions of the given part If code enable code is code true code the contributions are visible and enabled otherwise they are disabled param part the part whose contributions are to be activated param enable code true code the contributions are to be enabled not just visible private void activate Contributions I Workbench Part part boolean enable Part Site site Part Site part get Site Sub Action Bars action Bars Sub Action Bars site get Action Bars action Bars activate enable  activateContributions IWorkbenchPart PartSite PartSite getSite SubActionBars actionBars SubActionBars getActionBars actionBars
Deactivates the contributions of the given part If code remove code is code true code the contributions are removed otherwise they are disabled param part the part whose contributions are to be deactivated param remove code true code the contributions are to be removed not just disabled private void deactivate Contributions I Workbench Part part boolean remove Part Site site Part Site part get Site Sub Action Bars action Bars Sub Action Bars site get Action Bars action Bars deactivate remove  deactivateContributions IWorkbenchPart PartSite PartSite getSite SubActionBars actionBars SubActionBars getActionBars actionBars
Calculates the action sets to show for the given part and editor param part the active part may be code null code param editor the current editor may be code null code may be the active part return the new action sets private Array List calculate Action Sets I Workbench Part part I Editor Part editor Array List new Action Sets new Array List if part null I Action Set Descriptor part Action Sets Workbench Plugin get Default get Action Set Registry get Action Sets For part get Site get Id for int i 0 i part Action Sets length i new Action Sets add part Action Sets i if editor null editor part I Action Set Descriptor editor Action Sets Workbench Plugin get Default get Action Set Registry get Action Sets For editor get Site get Id for int i 0 i editor Action Sets length i new Action Sets add editor Action Sets i return new Action Sets  ArrayList calculateActionSets IWorkbenchPart IEditorPart ArrayList newActionSets ArrayList IActionSetDescriptor partActionSets WorkbenchPlugin getDefault getActionSetRegistry getActionSetsFor getSite getId partActionSets newActionSets partActionSets IActionSetDescriptor editorActionSets WorkbenchPlugin getDefault getActionSetRegistry getActionSetsFor getSite getId editorActionSets newActionSets editorActionSets newActionSets
Updates the actions we are showing for the active part and current editor param new Action Sets the action sets to show return code true code if the action sets changed private boolean update Action Sets Array List new Action Sets if action Sets equals new Action Sets return false Perspective persp get Active Perspective if persp null action Sets new Action Sets return false hide the old for int i 0 i action Sets size i persp hide Action Set I Action Set Descriptor action Sets get i get Id show the new for int i 0 i new Action Sets size i persp show Action Set I Action Set Descriptor new Action Sets get i get Id action Sets new Action Sets window update Action Sets this calls update Action Bars window fire Perspective Changed Workbench Page this get Perspective CHANGE ACTION SET SHOW return true  newActionSets updateActionSets ArrayList newActionSets actionSets newActionSets getActivePerspective actionSets newActionSets actionSets hideActionSet IActionSetDescriptor actionSets getId newActionSets showActionSet IActionSetDescriptor newActionSets getId actionSets newActionSets updateActionSets updateActionBars firePerspectiveChanged WorkbenchPage getPerspective CHANGE_ACTION_SET_SHOW
Constructs a new page with a given perspective and input param w the parent window param layoutID must not be code null code param input the page input public Workbench Page Workbench Window w String layoutID I Adaptable input throws Workbench Exception super if layoutID null throw new Workbench Exception Workbench Messages get String Workbench Page Undefined Perspective NON NLS 1 init w layoutID input  WorkbenchPage WorkbenchWindow IAdaptable WorkbenchException WorkbenchException WorkbenchMessages getString WorkbenchPage UndefinedPerspective
Constructs a page code restore State I Memento code should be called to restore this page from data stored in a persistance file param w the parent window param input the page input public Workbench Page Workbench Window w I Adaptable input throws Workbench Exception super init w null input  restoreState IMemento WorkbenchPage WorkbenchWindow IAdaptable WorkbenchException
Activates a part The part will be brought to the front and given focus param part the part to activate public void activate I Workbench Part part Sanity check if certify Part part return if window is Closing return If zoomed unzoom if is Zoomed part Change Affects Zoom get Reference part zoom Out if part instanceof Multi Editor part Multi Editor part get Active Editor Activate part if window get Active Page this bring To Top part set Active Part part else activation List set Active part active Part part  IWorkbenchPart certifyPart isClosing isZoomed partChangeAffectsZoom getReference zoomOut MultiEditor MultiEditor getActiveEditor getActivePage bringToTop setActivePart activationList setActive activePart
Platform run new Safe Runnable Workbench Messages get String Workbench Page Error Activating View NON NLS 1 public void run if part null part set Focus Part Site site Part Site part get Site site get Pane show Focus true update Tab List part Sub Action Bars bars Sub Action Bars site get Action Bars bars part Changed part  SafeRunnable WorkbenchMessages getString WorkbenchPage ErrorActivatingView setFocus PartSite PartSite getSite getPane showFocus updateTabList SubActionBars SubActionBars getActionBars partChanged
Activates a part The part is given focus the pane is hilighted private void activate Part final I Workbench Part part Platform run new Safe Runnable Workbench Messages get String Workbench Page Error Activating View NON NLS 1 public void run if part null part set Focus Part Site site Part Site part get Site site get Pane show Focus true update Tab List part Sub Action Bars bars Sub Action Bars site get Action Bars bars part Changed part  activatePart IWorkbenchPart SafeRunnable WorkbenchMessages getString WorkbenchPage ErrorActivatingView setFocus PartSite PartSite getSite getPane showFocus updateTabList SubActionBars SubActionBars getActionBars partChanged
Add a fast view public void add Fast View I View Reference ref Perspective persp get Active Perspective if persp null return If view is zoomed unzoom if is Zoomed part Change Affects Zoom ref zoom Out Do real work persp add Fast View ref The view is now invisible If it is active then deactivate it if ref get Part false active Part activate activation List get Active Notify listeners window update Fast View Bar window fire Perspective Changed this get Perspective ref CHANGE FAST VIEW ADD window fire Perspective Changed this get Perspective CHANGE FAST VIEW ADD  addFastView IViewReference getActivePerspective isZoomed partChangeAffectsZoom zoomOut addFastView getPart activePart activationList getActive updateFastViewBar firePerspectiveChanged getPerspective CHANGE_FAST_VIEW_ADD firePerspectiveChanged getPerspective CHANGE_FAST_VIEW_ADD
Adds an I Part Listener to the part service public void add Part Listener I Part Listener l part Listeners add Part Listener l  IPartListener addPartListener IPartListener partListeners addPartListener
Adds an I Part Listener to the part service public void add Part Listener I Part Listener2 l part Listeners2 add Part Listener l  IPartListener addPartListener IPartListener2 partListeners2 addPartListener
Implements I Workbench Page see org eclipse ui I Workbench Page add Property Change Listener I Property Change Listener since 2 0 deprecated individual views should store a working set if needed and register a property change listener directly with the working set manager to receive notification when the view working set is removed public void add Property Change Listener I Property Change Listener listener property Change Listeners add listener  IWorkbenchPage IWorkbenchPage addPropertyChangeListener IPropertyChangeListener addPropertyChangeListener IPropertyChangeListener propertyChangeListeners
non Javadoc Method declared on I Selection Listener public void add Selection Listener I Selection Listener listener selection Service add Selection Listener listener  ISelectionListener addSelectionListener ISelectionListener selectionService addSelectionListener
public void add Selection Listener String part Id I Selection Listener listener selection Service add Selection Listener part Id listener  addSelectionListener partId ISelectionListener selectionService addSelectionListener partId
non Javadoc Method declared on I Selection Listener public void add Post Selection Listener I Selection Listener listener selection Service add Post Selection Listener listener  ISelectionListener addPostSelectionListener ISelectionListener selectionService addPostSelectionListener
public void add Post Selection Listener String part Id I Selection Listener listener selection Service add Post Selection Listener part Id listener  addPostSelectionListener partId ISelectionListener selectionService addPostSelectionListener partId
Moves a part forward in the Z order of a perspective so it is visible param part the part to bring to move forward public void bring To Top I Workbench Part part Sanity check Perspective persp get Active Perspective if persp null certify Part part return If zoomed then ignore if is Zoomed part Change Affects Zoom get Reference part return String label part null part get Title none NON NLS 1 boolean brought To Top false try UI Stats start UI Stats BRING PART TO TOP label Move part if part instanceof I Editor Part I Editor Reference ref I Editor Reference get Reference part brought To Top get Editor Manager set Visible Editor ref false action Switcher update Top Editor I Editor Part part if brought To Top last Active Editor null else if part instanceof I View Part I View Reference ref I View Reference get Reference part brought To Top persp bring To Top ref if brought To Top Need to make sure that the part lists are sorted correctly activation List set Active part fire Part Brought To Top part finally UI Stats end UI Stats BRING PART TO TOP label  bringToTop IWorkbenchPart getActivePerspective certifyPart isZoomed partChangeAffectsZoom getReference getTitle broughtToTop UIStats UIStats BRING_PART_TO_TOP IEditorPart IEditorReference IEditorReference getReference broughtToTop getEditorManager setVisibleEditor actionSwitcher updateTopEditor IEditorPart broughtToTop lastActiveEditor IViewPart IViewReference IViewReference getReference broughtToTop bringToTop broughtToTop activationList setActive firePartBroughtToTop UIStats UIStats BRING_PART_TO_TOP
Resets the layout for the perspective The active part in the old layout is activated in the new layout for consistent user context Assumes the busy cursor is active private void busy Reset Perspective View Intro Adapter Part intro View Adapter Workbench Intro Manager get Workbench Window get Workbench get Intro Manager get View Intro Adapter Part Part Pane intro Pane null boolean intro Full Screen false if intro View Adapter null intro Pane Part Site intro View Adapter get Site get Pane intro View Adapter set Handle Zoom Events false intro Full Screen intro Pane is Zoomed try to prevent intro flicker if intro Full Screen window get Shell set Redraw false try Always unzoom if is Zoomed zoom Out Get the current perspective This describes the working layout of the page and differs from the original template Perspective old Persp get Active Perspective Map the current perspective to the original template If the original template cannot be found then it has been deleted In that case just return PR 1GDSABU I Perspective Registry reg Workbench Plugin get Default get Perspective Registry Perspective Descriptor desc Perspective Descriptor reg find Perspective With Id old Persp get Desc get Id if desc null desc Perspective Descriptor reg find Perspective With Id Perspective Descriptor old Persp get Desc get Original Id if desc null return I Contribution Item item window find Perspective Shortcut old Persp get Desc this if item null return Notify listeners that we are doing a reset window fire Perspective Changed this desc CHANGE RESET Create new persp from original template Perspective new Persp create Perspective desc if new Persp null We re not going through with the reset so it is complete window fire Perspective Changed this desc CHANGE RESET COMPLETE return Update the perspective list and shortcut persp List swap old Persp new Persp Perspective Bar Contribution Item item set Perspective new Persp get Desc Install new persp set Perspective new Persp Destroy old persp dispose Perspective old Persp Update the Coolbar layout reset Tool Bar Layout restore the maximized intro if intro View Adapter null try ensure that the intro is visible in the new perspective show View I Intro Constants INTRO VIEW ID if intro Full Screen toggle Zoom intro Pane get Part Reference catch Part Init Exception e Workbench Plugin log Could not restore intro NON NLS 1 Status Util new Status I Status ERROR e get Message e finally we want the intro back to a normal state before we fire the event intro View Adapter set Handle Zoom Events true Notify listeners that we have completed our reset window fire Perspective Changed this desc CHANGE RESET COMPLETE finally reset the handling of zoom events possibly for the second time in case there was an exception thrown if intro View Adapter null intro View Adapter set Handle Zoom Events true if intro Full Screen window get Shell set Redraw true  busyResetPerspective ViewIntroAdapterPart introViewAdapter WorkbenchIntroManager getWorkbenchWindow getWorkbench getIntroManager getViewIntroAdapterPart PartPane introPane introFullScreen introViewAdapter introPane PartSite introViewAdapter getSite getPane introViewAdapter setHandleZoomEvents introFullScreen introPane isZoomed introFullScreen getShell setRedraw isZoomed zoomOut oldPersp getActivePerspective IPerspectiveRegistry WorkbenchPlugin getDefault getPerspectiveRegistry PerspectiveDescriptor PerspectiveDescriptor findPerspectiveWithId oldPersp getDesc getId PerspectiveDescriptor findPerspectiveWithId PerspectiveDescriptor oldPersp getDesc getOriginalId IContributionItem findPerspectiveShortcut oldPersp getDesc firePerspectiveChanged CHANGE_RESET newPersp createPerspective newPersp firePerspectiveChanged CHANGE_RESET_COMPLETE perspList oldPersp newPersp PerspectiveBarContributionItem setPerspective newPersp getDesc setPerspective newPersp disposePerspective oldPersp resetToolBarLayout introViewAdapter showView IIntroConstants INTRO_VIEW_ID introFullScreen toggleZoom introPane getPartReference PartInitException WorkbenchPlugin StatusUtil newStatus IStatus getMessage introViewAdapter setHandleZoomEvents firePerspectiveChanged CHANGE_RESET_COMPLETE introViewAdapter introViewAdapter setHandleZoomEvents introFullScreen getShell setRedraw
Implements code set Perspective code Assumes that busy cursor is active param persp identifies the new perspective private void busy Set Perspective I Perspective Descriptor desc Create new layout String label desc get Id try UI Stats start UI Stats SWITCH PERSPECTIVE label Perspective Descriptor real Desc Perspective Descriptor desc Perspective new Persp find Perspective real Desc if new Persp null new Persp create Perspective real Desc if new Persp null return window add Perspective Shortcut real Desc this Change layout set Perspective new Persp finally UI Stats end UI Stats SWITCH PERSPECTIVE label  setPerspective busySetPerspective IPerspectiveDescriptor getId UIStats UIStats SWITCH_PERSPECTIVE PerspectiveDescriptor realDesc PerspectiveDescriptor newPersp findPerspective realDesc newPersp newPersp createPerspective realDesc newPersp addPerspectiveShortcut realDesc setPerspective newPersp UIStats UIStats SWITCH_PERSPECTIVE
Shows a view Assumes that a busy cursor is active private I View Part busy Show View String viewID String secondaryID int mode throws Part Init Exception Perspective persp get Active Perspective if persp null return null If this view is already visible just return I View Reference ref persp find View viewID secondaryID I View Part view null if ref null view ref get View true if view null busy Show View view mode return view Show the view view persp show View viewID secondaryID if view null zoom Out If Necessary view busy Show View view mode window fire Perspective Changed this get Perspective get Reference view CHANGE VIEW SHOW window fire Perspective Changed this get Perspective CHANGE VIEW SHOW Just in case view was fast window update Fast View Bar return view  IViewPart busyShowView PartInitException getActivePerspective IViewReference findView IViewPart getView busyShowView showView zoomOutIfNecessary busyShowView firePerspectiveChanged getPerspective getReference CHANGE_VIEW_SHOW firePerspectiveChanged getPerspective CHANGE_VIEW_SHOW updateFastViewBar
private void busy Show View I View Part part int mode if mode VIEW ACTIVATE activate part else if mode VIEW VISIBLE I Workbench Part Reference ref get Active Part Reference if there is no active part or it s not a view bring to top if ref null ref instanceof I View Reference bring To Top part else otherwise check to see if the we re in the same stack as the active view I View Reference active View I View Reference ref I View Reference view Stack get View Reference Stack part for int i 0 i view Stack length i if view Stack i equals active View return bring To Top part  busyShowView IViewPart VIEW_ACTIVATE VIEW_VISIBLE IWorkbenchPartReference getActivePartReference IViewReference bringToTop IViewReference activeView IViewReference IViewReference viewStack getViewReferenceStack viewStack viewStack activeView bringToTop
Returns whether a part exists in the current page private boolean certify Part I Workbench Part part Workaround for bug 22325 if part null part get Site instanceof Part Site return false if part instanceof I Editor Part I Editor Reference ref I Editor Reference get Reference part return get Editor Manager contains Editor ref if part instanceof I View Part Perspective persp get Active Perspective return persp null persp contains View I View Part part return false  certifyPart IWorkbenchPart getSite PartSite IEditorPart IEditorReference IEditorReference getReference getEditorManager containsEditor IViewPart getActivePerspective containsView IViewPart
final boolean ret new boolean 1 Busy Indicator show While null new Runnable public void run ret 0 window close Page Workbench Page this true  BusyIndicator showWhile closePage WorkbenchPage
Closes the perspective public boolean close final boolean ret new boolean 1 Busy Indicator show While null new Runnable public void run ret 0 window close Page Workbench Page this true return ret 0  BusyIndicator showWhile closePage WorkbenchPage
See I Workbench Page public boolean close All Saved Editors get the Saved editors I Editor Reference editors get Editor References I Editor Reference saved Editors new I Editor Reference editors length int j 0 for int i 0 i editors length i I Editor Reference editor editors i if editor is Dirty saved Editors j editor there are no unsaved editors if j 0 return true I Editor Reference new Saved new I Editor Reference j System arraycopy saved Editors 0 new Saved 0 j return close Editors new Saved false  IWorkbenchPage closeAllSavedEditors IEditorReference getEditorReferences IEditorReference savedEditors IEditorReference IEditorReference isDirty savedEditors IEditorReference newSaved IEditorReference savedEditors newSaved closeEditors newSaved
See I Workbench Page public boolean close All Editors boolean save return close Editors get Editor References save  IWorkbenchPage closeAllEditors closeEditors getEditorReferences
See I Workbench Page public boolean close Editors I Editor Reference editor Refs boolean save if save Intersect the dirty editors with the editors that are closing I Editor Part dirty get Dirty Editors List intersect new Array List for int i 0 i editor Refs length i I Editor Reference reference editor Refs i I Editor Part ref Part reference get Editor false if ref Part null for int j 0 j dirty length j if ref Part equals dirty j intersect add ref Part break Save parts exit the method if cancel is pressed if intersect size 0 if Editor Manager save All intersect true get Workbench Window return false If the user has not cancelled a possible save request and if part is added or removed always unzoom if is Zoomed zoom Out Deactivate part if the active part is being closed boolean deactivated false for int i 0 i editor Refs length i I Workbench Part part editor Refs i get Part false if part active Part deactivated true set Active Part null if last Active Editor part last Active Editor null action Switcher update Top Editor null Close all editors for int i 0 i editor Refs length i I Editor Reference ref editor Refs i Notify interested listeners before the close window fire Perspective Changed this get Perspective ref CHANGE EDITOR CLOSE Close the editor get Editor Manager close Editor ref activation List remove ref fire Part Closed ref dispose Part ref if window is Closing deactivated activate activation List get Active Notify interested listeners after the close window fire Perspective Changed this get Perspective CHANGE EDITOR CLOSE Return true on success return true  IWorkbenchPage closeEditors IEditorReference editorRefs IEditorPart getDirtyEditors ArrayList editorRefs IEditorReference editorRefs IEditorPart refPart getEditor refPart refPart refPart EditorManager saveAll getWorkbenchWindow isZoomed zoomOut editorRefs IWorkbenchPart editorRefs getPart activePart setActivePart lastActiveEditor lastActiveEditor actionSwitcher updateTopEditor editorRefs IEditorReference editorRefs firePerspectiveChanged getPerspective CHANGE_EDITOR_CLOSE getEditorManager closeEditor activationList firePartClosed disposePart isClosing activationList getActive firePerspectiveChanged getPerspective CHANGE_EDITOR_CLOSE
See I Workbench Page close Editor public boolean close Editor I Editor Reference editor Ref boolean save I Editor Part editor editor Ref get Editor false if editor null return close Editor editor save get Editor Manager close Editor editor Ref activation List remove editor Ref fire Part Closed editor Ref return true  IWorkbenchPage closeEditor closeEditor IEditorReference editorRef IEditorPart editorRef getEditor closeEditor getEditorManager closeEditor editorRef activationList editorRef firePartClosed editorRef
See I Workbench Page close Editor public boolean close Editor I Editor Part editor boolean save Sanity check if certify Part editor return false Save part if save get Editor Manager save Editor editor true return false boolean part Was Visible editor get Active Editor I Editor Reference ref I Editor Reference get Reference editor activation List remove ref boolean part Was Active editor active Part Removing following lines to fix http dev eclipse org bugs show bug cgi id 28031 Deactivate part if part Was Active set Active Part null if last Active Editor editor action Switcher update Top Editor null last Active Editor null Notify interested listeners before the close window fire Perspective Changed this get Perspective ref CHANGE EDITOR CLOSE Close the part get Editor Manager close Editor ref fire Part Closed ref dispose Part ref Notify interested listeners after the close window fire Perspective Changed this get Perspective CHANGE EDITOR CLOSE Activate new part if part Was Active I Workbench Part top activation List get Top Editor zoom Out If Necessary top if top null Fix for bug 31122 side effect from fix 28031 above action Switcher update Top Editor null if last Active Editor editor last Active Editor null End Fix for bug 31122 top activation List get Active if top null activate top else set Active Part null else if part Was Visible I Editor Part top activation List get Top Editor zoom Out If Necessary top The editor we are bringing to top may already the visible editor due to editor manager behavior when it closes and editor If this is the case bring To Top will not call fire Part Brought To Top We must fire it from here if top null boolean is Top editor Mgr get Visible Editor top bring To Top top if is Top fire Part Brought To Top top else action Switcher update Top Editor top Return true on success return true  IWorkbenchPage closeEditor closeEditor IEditorPart certifyPart getEditorManager saveEditor partWasVisible getActiveEditor IEditorReference IEditorReference getReference activationList partWasActive activePart show_bug partWasActive setActivePart lastActiveEditor actionSwitcher updateTopEditor lastActiveEditor firePerspectiveChanged getPerspective CHANGE_EDITOR_CLOSE getEditorManager closeEditor firePartClosed disposePart firePerspectiveChanged getPerspective CHANGE_EDITOR_CLOSE partWasActive IWorkbenchPart activationList getTopEditor zoomOutIfNecessary actionSwitcher updateTopEditor lastActiveEditor lastActiveEditor activationList getActive setActivePart partWasVisible IEditorPart activationList getTopEditor zoomOutIfNecessary bringToTop firePartBroughtToTop isTop editorMgr getVisibleEditor bringToTop isTop firePartBroughtToTop actionSwitcher updateTopEditor
Closes the specified perspective If last perspective then entire page is closed param desc the descriptor of the perspective to be closed param save whether the page s editors should be save if last perspective package void close Perspective I Perspective Descriptor desc boolean save Perspective persp find Perspective desc if persp null close Perspective persp save true  closePerspective IPerspectiveDescriptor findPerspective closePerspective
Closes the specified perspective If last perspective then entire page is closed param persp the perspective to be closed param save whether the page s editors should be save if last perspective package void close Perspective Perspective persp boolean save boolean close Page Always unzoom if is Zoomed zoom Out Close all editors on last perspective close if persp List size 1 get Editor Manager get Editor Count 0 Close all editors if close All Editors save return Dispose of the perspective boolean is Active persp List get Active persp window remove Perspective Shortcut persp get Desc this if is Active set Perspective persp List get Next Active dispose Perspective persp if close Page persp List size 0 close  closePerspective closePage isZoomed zoomOut perspList getEditorManager getEditorCount closeAllEditors isActive perspList getActive removePerspectiveShortcut getDesc isActive setPerspective perspList getNextActive disposePerspective closePage perspList
Closes all perspectives in the page The page is kept so as not to lose the input param save whether the page s editors should be saved package void close All Perspectives if persp List is Empty return Always unzoom if is Zoomed zoom Out Close all editors if close All Editors true return Deactivate the active perspective and part set Perspective Perspective null Close each perspective in turn Perspective List old List persp List persp List new Perspective List Iterator enum old List iterator while enum has Next close Perspective Perspective enum next false false close  closeAllPerspectives perspList isEmpty isZoomed zoomOut closeAllEditors setPerspective PerspectiveList oldList perspList perspList PerspectiveList oldList hasNext closePerspective
composite set Bounds parent get Client Area resize Listener new Control Adapter public void control Resized Control Event e composite set Bounds parent get Client Area  setBounds getClientArea resizeListener ControlAdapter controlResized ControlEvent setBounds getClientArea
Creates the client composite private void create Client Composite final Composite parent window get Page Composite composite new Composite parent SWT NONE composite set Visible false Make visible on activate composite set Bounds parent get Client Area resize Listener new Control Adapter public void control Resized Control Event e composite set Bounds parent get Client Area parent add Control Listener resize Listener  createClientComposite getPageComposite setVisible setBounds getClientArea resizeListener ControlAdapter controlResized ControlEvent setBounds getClientArea addControlListener resizeListener
Creates a new view set Return null on failure private Perspective create Perspective Perspective Descriptor desc String label desc get Id try UI Stats start UI Stats CREATE PERSPECTIVE label Perspective persp new Perspective desc this persp List add persp window fire Perspective Opened this desc I View Reference refs persp get View References for int i 0 i refs length i I View Reference ref refs i if ref null add Part ref return persp catch Workbench Exception e if Workbench window get Workbench is Starting Message Dialog open Error window get Shell Workbench Messages get String Error NON NLS 1 Workbench Messages format Workbench show Perspective Error new String desc get Id NON NLS 1 return null finally UI Stats end UI Stats CREATE PERSPECTIVE label  createPerspective PerspectiveDescriptor getId UIStats UIStats CREATE_PERSPECTIVE perspList firePerspectiveOpened IViewReference getViewReferences IViewReference addPart WorkbenchException getWorkbench isStarting MessageDialog openError getShell WorkbenchMessages getString WorkbenchMessages showPerspectiveError getId UIStats UIStats CREATE_PERSPECTIVE
Open the tracker to allow the user to move the specified part using keyboard public void open Tracker View Pane pane Perspective persp get Active Perspective if persp null persp open Tracker pane  openTracker ViewPane getActivePerspective openTracker
Add a part to the activation list protected void add Part I Workbench Part Reference ref activation List add ref  addPart IWorkbenchPartReference activationList
Remove a part from the activation list protected void remove Part I Workbench Part Reference ref activation List remove ref  removePart IWorkbenchPartReference activationList
Deactivates a part The pane is unhilighted private void deactivate Part I Workbench Part part if part null Part Site site Part Site part get Site site get Pane show Focus false  deactivatePart IWorkbenchPart PartSite PartSite getSite getPane showFocus
final Workbench Part Reference ref0 Workbench Part Reference ref Platform run new Safe Runnable public void run ref0 dispose  WorkbenchPartReference WorkbenchPartReference SafeRunnable
ref0 dispose public void handle Exception Throwable e Exception has already being logged by Core Do nothing  handleException
private void dispose Part I Workbench Part Reference ref final Workbench Part Reference ref0 Workbench Part Reference ref Platform run new Safe Runnable public void run ref0 dispose public void handle Exception Throwable e Exception has already being logged by Core Do nothing  disposePart IWorkbenchPartReference WorkbenchPartReference WorkbenchPartReference SafeRunnable handleException
Cleanup public void dispose Always unzoom if is Zoomed zoom Out Close and dispose the editors close All Editors false Capture views I View Reference refs view Factory get Views Get rid of perspectives This will close the views Iterator enum persp List iterator while enum has Next Perspective perspective Perspective enum next window remove Perspective Shortcut perspective get Desc this window fire Perspective Closed this perspective get Desc perspective dispose persp List new Perspective List Dispose views final int errors 0 for int i 0 i refs length i final Workbench Part Reference ref Workbench Part Reference refs i fire Part Closed refs i Platform run new Safe Runnable public void run ref dispose public void handle Exception Throwable e errors 0 if errors 0 0 String message if errors 0 1 message Workbench Messages get String Workbench Page one Error Closing Page NON NLS 1 else message Workbench Messages get String Workbench Page multiple Errors Closing Page NON NLS 1 Message Dialog open Error null Workbench Messages get String Error message NON NLS 1 active Part null activation List new Activation List Get rid of editor presentation editor Presentation dispose Get rid of composite window get Page Composite remove Control Listener resize Listener composite dispose navigation History dispose sticky Perspectives clear  isZoomed zoomOut closeAllEditors IViewReference viewFactory getViews perspList hasNext removePerspectiveShortcut getDesc firePerspectiveClosed getDesc perspList PerspectiveList WorkbenchPartReference WorkbenchPartReference firePartClosed SafeRunnable handleException WorkbenchMessages getString WorkbenchPage oneErrorClosingPage WorkbenchMessages getString WorkbenchPage multipleErrorsClosingPage MessageDialog openError WorkbenchMessages getString activePart activationList ActivationList editorPresentation getPageComposite removeControlListener resizeListener navigationHistory stickyPerspectives
Dispose a perspective private void dispose Perspective Perspective persp Get views I View Reference refs persp get View References Get rid of perspective persp List remove persp window fire Perspective Closed this persp get Desc persp dispose Loop through the views for int i 0 i refs length i I View Reference ref refs i If the part is no longer reference then dispose it boolean exists view Factory has View ref if exists fire Part Closed ref activation List remove ref dispose Part ref sticky Perspectives remove persp get Desc  disposePerspective IViewReference getViewReferences perspList firePerspectiveClosed getDesc IViewReference viewFactory hasView firePartClosed activationList disposePart stickyPerspectives getDesc
return Navigation History public I Navigation History get Navigation History return navigation History  NavigationHistory INavigationHistory getNavigationHistory navigationHistory
Edits the action sets public boolean edit Action Sets Perspective persp get Active Perspective if persp null return false Create list dialog Customize Perspective Dialog dlg new Customize Perspective Dialog window get Shell persp Open boolean ret dlg open Window OK if ret window update Action Sets window fire Perspective Changed this get Perspective CHANGE RESET window fire Perspective Changed this get Perspective CHANGE RESET COMPLETE return ret  editActionSets getActivePerspective CustomizePerspectiveDialog CustomizePerspectiveDialog getShell updateActionSets firePerspectiveChanged getPerspective CHANGE_RESET firePerspectiveChanged getPerspective CHANGE_RESET_COMPLETE
Returns the first view manager with given ID public Perspective find Perspective I Perspective Descriptor desc Iterator enum persp List iterator while enum has Next Perspective mgr Perspective enum next if desc get Id equals mgr get Desc get Id return mgr return null  findPerspective IPerspectiveDescriptor perspList hasNext getId getDesc getId
See I Workbench Page find View public I View Part find View String id I View Reference ref find View Reference id if ref null return null return ref get View true  IWorkbenchPage findView IViewPart findView IViewReference findViewReference getView
see org eclipse ui I Workbench Page public I View Reference find View Reference String view Id return find View Reference view Id null  IWorkbenchPage IViewReference findViewReference viewId findViewReference viewId
public I View Reference find View Reference String view Id String secondary Id Perspective persp get Active Perspective if persp null return null return persp find View view Id secondary Id  IViewReference findViewReference viewId secondaryId getActivePerspective findView viewId secondaryId
Fire part activation out private void fire Part Activated I Workbench Part part String label activate part null part get Title none NON NLS 1 NON NLS 2 try UI Stats start UI Stats NOTIFY PART LISTENERS label part Listeners fire Part Activated part part Listeners2 fire Part Activated get Reference part selection Service part Activated part finally UI Stats end UI Stats NOTIFY PART LISTENERS label  firePartActivated IWorkbenchPart getTitle UIStats UIStats NOTIFY_PART_LISTENERS partListeners firePartActivated partListeners2 firePartActivated getReference selectionService partActivated UIStats UIStats NOTIFY_PART_LISTENERS
Fire part brought to top out private void fire Part Brought To Top I Workbench Part part String label bring To Top part null part get Title none NON NLS 1 NON NLS 2 try UI Stats start UI Stats NOTIFY PART LISTENERS label part Listeners fire Part Brought To Top part part Listeners2 fire Part Brought To Top get Reference part selection Service part Brought To Top part finally UI Stats end UI Stats NOTIFY PART LISTENERS label  firePartBroughtToTop IWorkbenchPart bringToTop getTitle UIStats UIStats NOTIFY_PART_LISTENERS partListeners firePartBroughtToTop partListeners2 firePartBroughtToTop getReference selectionService partBroughtToTop UIStats UIStats NOTIFY_PART_LISTENERS
Fire part close out private void fire Part Closed I Workbench Part Reference ref String label close ref get Title NON NLS 1 try UI Stats start UI Stats NOTIFY PART LISTENERS label I Workbench Part part ref get Part false if part null part Listeners fire Part Closed part selection Service part Closed part part Listeners2 fire Part Closed ref finally UI Stats end UI Stats NOTIFY PART LISTENERS label  firePartClosed IWorkbenchPartReference getTitle UIStats UIStats NOTIFY_PART_LISTENERS IWorkbenchPart getPart partListeners firePartClosed selectionService partClosed partListeners2 firePartClosed UIStats UIStats NOTIFY_PART_LISTENERS
Fire part deactivation out private void fire Part Deactivated I Workbench Part part String label deactivate part null part get Title none NON NLS 1 NON NLS 2 try UI Stats start UI Stats NOTIFY PART LISTENERS label part Listeners fire Part Deactivated part part Listeners2 fire Part Deactivated get Reference part selection Service part Deactivated part finally UI Stats end UI Stats NOTIFY PART LISTENERS label  firePartDeactivated IWorkbenchPart getTitle UIStats UIStats NOTIFY_PART_LISTENERS partListeners firePartDeactivated partListeners2 firePartDeactivated getReference selectionService partDeactivated UIStats UIStats NOTIFY_PART_LISTENERS
Fire part open out public void fire Part Opened I Workbench Part part String label deactivate part null part get Title none NON NLS 1 NON NLS 2 try UI Stats start UI Stats NOTIFY PART LISTENERS label part Listeners fire Part Opened part part Listeners2 fire Part Opened get Reference part selection Service part Opened part finally UI Stats end UI Stats NOTIFY PART LISTENERS label  firePartOpened IWorkbenchPart getTitle UIStats UIStats NOTIFY_PART_LISTENERS partListeners firePartOpened partListeners2 firePartOpened getReference selectionService partOpened UIStats UIStats NOTIFY_PART_LISTENERS
Fire part input changed out private void fire Part Input Changed I Workbench Part part String label input Changed part null part get Title none NON NLS 1 NON NLS 2 try UI Stats start UI Stats NOTIFY PART LISTENERS label part Listeners2 fire Part Input Changed get Reference part selection Service part Input Changed part finally UI Stats end UI Stats NOTIFY PART LISTENERS label  firePartInputChanged IWorkbenchPart inputChanged getTitle UIStats UIStats NOTIFY_PART_LISTENERS partListeners2 firePartInputChanged getReference selectionService partInputChanged UIStats UIStats NOTIFY_PART_LISTENERS
Notify property change listeners about a property change param change Id the change id param old Value old property value param new Value new property value private void fire Property Change String change Id Object old Value Object new Value Object listeners property Change Listeners get Listeners Property Change Event event new Property Change Event this change Id old Value new Value for int i 0 i listeners length i I Property Change Listener listeners i property Change event  changeId oldValue newValue firePropertyChange changeId oldValue newValue propertyChangeListeners getListeners PropertyChangeEvent PropertyChangeEvent changeId oldValue newValue IPropertyChangeListener propertyChange
public I Action Bars get Action Bars if action Bars null action Bars new W Win Action Bars window return action Bars  IActionBars getActionBars actionBars actionBars WWinActionBars actionBars
Returns an array of the visible action sets public I Action Set Descriptor get Action Sets Perspective persp get Active Perspective if persp null return persp get Action Sets else return new I Action Set Descriptor 0  IActionSetDescriptor getActionSets getActivePerspective getActionSets IActionSetDescriptor
see I Workbench Page public I Editor Part get Active Editor return get Editor Manager get Visible Editor  IWorkbenchPage IEditorPart getActiveEditor getEditorManager getVisibleEditor
non Javadoc Method declared on I Part Service public I Workbench Part get Active Part return active Part  IPartService IWorkbenchPart getActivePart activePart
non Javadoc Method declared on I Part Service public I Workbench Part Reference get Active Part Reference return get Reference active Part  IPartService IWorkbenchPartReference getActivePartReference getReference activePart
Returns the active perspective for the page code null code if none public Perspective get Active Perspective return persp List get Active  getActivePerspective perspList getActive
Returns the client composite public Composite get Client Composite return composite  getClientComposite
Answer the editor manager for this window for dynamic UI change access from private to protected protected Editor Manager get Editor Manager return editor Mgr  EditorManager getEditorManager editorMgr
Answer the perspective presentation public Perspective Helper get Perspective Presentation if get Active Perspective null return get Active Perspective get Presentation return null  PerspectiveHelper getPerspectivePresentation getActivePerspective getActivePerspective getPresentation
Answer the editor presentation public Editor Area Helper get Editor Presentation return editor Presentation  EditorAreaHelper getEditorPresentation editorPresentation
d sync Exec new Runnable public void run for int i 0 i refs length i I Workbench Part part refs i get Part true if part null result add part  syncExec IWorkbenchPart getPart
See I Workbench Page public I Editor Part get Editors final I Editor Reference refs get Editor References final Array List result new Array List refs length Display d get Workbench Window get Shell get Display Must be backward compatible d sync Exec new Runnable public void run for int i 0 i refs length i I Workbench Part part refs i get Part true if part null result add part final I Editor Part editors new I Editor Part result size return I Editor Part result to Array editors  IWorkbenchPage IEditorPart getEditors IEditorReference getEditorReferences ArrayList ArrayList getWorkbenchWindow getShell getDisplay syncExec IWorkbenchPart getPart IEditorPart IEditorPart IEditorPart toArray
public I Editor Part get Dirty Editors return get Editor Manager get Dirty Editors  IEditorPart getDirtyEditors getEditorManager getDirtyEditors
return get Editor Manager get Dirty Editors public I Editor Part find Editor I Editor Input input return get Editor Manager find Editor input  getEditorManager getDirtyEditors IEditorPart findEditor IEditorInput getEditorManager findEditor
See I Workbench Page public I Editor Reference get Editor References return get Editor Manager get Editors  IWorkbenchPage IEditorReference getEditorReferences getEditorManager getEditors
Returns the docked views public I View Reference get Fast Views Perspective persp get Active Perspective if persp null return persp get Fast Views else return new I View Reference 0  IViewReference getFastViews getActivePerspective getFastViews IViewReference
see I Workbench Page public I Adaptable get Input return input  IWorkbenchPage IAdaptable getInput
Returns the page label This is a combination of the page input and active perspective public String get Label String label Workbench Messages get String Workbench Page Unknown Label NON NLS 1 if input null I Workbench Adapter adapter I Workbench Adapter input get Adapter I Workbench Adapter class if adapter null label adapter get Label input Perspective persp get Active Perspective if persp null label Workbench Messages format Workbench Page Perspective Format new Object label persp get Desc get Label NON NLS 1 else if deferred Active Persp null label Workbench Messages format Workbench Page Perspective Format new Object label deferred Active Persp get Label NON NLS 1 return label  getLabel WorkbenchMessages getString WorkbenchPage UnknownLabel IWorkbenchAdapter IWorkbenchAdapter getAdapter IWorkbenchAdapter getLabel getActivePerspective WorkbenchMessages WorkbenchPage PerspectiveFormat getDesc getLabel deferredActivePersp WorkbenchMessages WorkbenchPage PerspectiveFormat deferredActivePersp getLabel
Returns the new wizard actions the page This is List of Strings public Array List get New Wizard Action Ids Perspective persp get Active Perspective if persp null return persp get New Wizard Action Ids else return new Array List  ArrayList getNewWizardActionIds getActivePerspective getNewWizardActionIds ArrayList
Returns the perspective public I Perspective Descriptor get Perspective if deferred Active Persp null return deferred Active Persp Perspective persp get Active Perspective if persp null return persp get Desc else return null  IPerspectiveDescriptor getPerspective deferredActivePersp deferredActivePersp getActivePerspective getDesc
Returns the perspective actions for this page This is List of Strings public Array List get Perspective Action Ids Perspective persp get Active Perspective if persp null return persp get Perspective Action Ids else return new Array List  ArrayList getPerspectiveActionIds getActivePerspective getPerspectiveActionIds ArrayList
non Javadoc Method declared on I Selection Service public I Selection get Selection return selection Service get Selection  ISelectionService ISelection getSelection selectionService getSelection
non Javadoc Method declared on I Selection Service public I Selection get Selection String part Id return selection Service get Selection part Id  ISelectionService ISelection getSelection partId selectionService getSelection partId
Returns the ids of the parts to list in the Show In prompter This is a List of Strings public Array List get Show In Part Ids Perspective persp get Active Perspective if persp null return persp get Show In Part Ids else return new Array List  ArrayList getShowInPartIds getActivePerspective getShowInPartIds ArrayList
The user successfully performed a Show In action on the specified part Update the list of Show In items accordingly public void performed Show In String part Id Perspective persp get Active Perspective if persp null persp performed Show In part Id  performedShowIn partId getActivePerspective performedShowIn partId
Collections sort part Ids new Comparator public int compare Object a Object b long ta persp get Show In Time String a long tb persp get Show In Time String b return ta tb 0 ta tb 1 1  partIds getShowInTime getShowInTime
Sorts the given collection of show in target part ids in MRU order public void sort Show In Part Ids Array List part Ids final Perspective persp get Active Perspective if persp null Collections sort part Ids new Comparator public int compare Object a Object b long ta persp get Show In Time String a long tb persp get Show In Time String b return ta tb 0 ta tb 1 1  sortShowInPartIds ArrayList partIds getActivePerspective partIds getShowInTime getShowInTime
Returns the show view actions the page This is a List of Strings public Array List get Show View Action Ids Perspective persp get Active Perspective if persp null return persp get Show View Action Ids else return new Array List  ArrayList getShowViewActionIds getActivePerspective getShowViewActionIds ArrayList
Returns the unprotected window protected Workbench Window get Unprotected Window return window  WorkbenchWindow getUnprotectedWindow
public View Factory get View Factory if view Factory null view Factory new View Factory this Workbench Plugin get Default get View Registry return view Factory  ViewFactory getViewFactory viewFactory viewFactory ViewFactory WorkbenchPlugin getDefault getViewRegistry viewFactory
See I Workbench Page public I View Reference get View References Perspective persp get Active Perspective if persp null return persp get View References else return new I View Reference 0  IWorkbenchPage IViewReference getViewReferences getActivePerspective getViewReferences IViewReference
See I Workbench Page public I View Part get Views Perspective persp get Active Perspective if persp null I View Reference refs persp get View References Array List parts new Array List refs length for int i 0 i refs length i I Workbench Part part refs i get Part true if part null parts add part I View Part result new I View Part parts size return I View Part parts to Array result return new I View Part 0  IWorkbenchPage IViewPart getViews getActivePerspective IViewReference getViewReferences ArrayList ArrayList IWorkbenchPart getPart IViewPart IViewPart IViewPart toArray IViewPart
See I Workbench Page public I Workbench Window get Workbench Window return window  IWorkbenchPage IWorkbenchWindow getWorkbenchWindow
Implements I Workbench Page see org eclipse ui I Workbench Page get Working Set since 2 0 deprecated individual views should store a working set if needed public I Working Set get Working Set return working Set  IWorkbenchPage IWorkbenchPage getWorkingSet IWorkingSet getWorkingSet workingSet
see I Workbench Page public void hide Action Set String action SetID Perspective persp get Active Perspective if persp null persp hide Action Set action SetID window update Action Sets window fire Perspective Changed this get Perspective CHANGE ACTION SET HIDE  IWorkbenchPage hideActionSet actionSetID getActivePerspective hideActionSet actionSetID updateActionSets firePerspectiveChanged getPerspective CHANGE_ACTION_SET_HIDE
public void hide View I View Reference ref if ref null return I Workbench Part part ref get Part false if part null hide View I View Part part else hide View get Active Perspective ref  hideView IViewReference IWorkbenchPart getPart hideView IViewPart hideView getActivePerspective
package void refresh Active View I Workbench Part next Active activation List get Active if next Active active Part if next Active null activate next Active else set Active Part null  refreshActiveView IWorkbenchPart nextActive activationList getActive nextActive activePart nextActive nextActive setActivePart
See I Perspective public void hide View I View Part view Sanity check Perspective persp get Active Perspective if persp null certify Part view return If part is added removed always unzoom I View Reference ref I View Reference get Reference view if is Zoomed is Fast View ref zoom Out Confirm if persp can Close View view return Activate new part if view active Part I Workbench Part prev Active activation List get Previously Active if prev Active null activate prev Active else set Active Part null hide View persp ref  IPerspective hideView IViewPart getActivePerspective certifyPart IViewReference IViewReference getReference isZoomed isFastView zoomOut canCloseView activePart IWorkbenchPart prevActive activationList getPreviouslyActive prevActive prevActive setActivePart hideView
private void hide View Perspective persp I View Reference ref Notify interested listeners before the hide window fire Perspective Changed this get Perspective ref CHANGE VIEW HIDE Hide the part persp hide View ref If the part is no longer reference then dispose it boolean exists view Factory has View ref if exists fire Part Closed ref dispose Part ref activation List remove ref Bug 42684 A View Pane instance has been disposed but an attempt is then made to remove focus from it This happens because the View Pane is still viewed as the active part The active Part should always be modified when the view is changed active Part isn t really needed anymore see declaration active Part activation List get Active Notify interested listeners after the hide window fire Perspective Changed this get Perspective CHANGE VIEW HIDE Just in case view was fast window update Fast View Bar  hideView IViewReference firePerspectiveChanged getPerspective CHANGE_VIEW_HIDE hideView viewFactory hasView firePartClosed disposePart activationList ViewPane ViewPane activePart activePart activePart activationList getActive firePerspectiveChanged getPerspective CHANGE_VIEW_HIDE updateFastViewBar
Initialize the page param w the parent window param layoutID may be code null code if restoring from file param input the page input private void init Workbench Window w String layoutID I Adaptable input throws Workbench Exception Save args this window w this input input Create presentation create Client Composite editor Presentation new Editor Area Helper this editor Mgr new Editor Manager window this editor Presentation Get perspective descriptor if layoutID null Perspective Descriptor desc Perspective Descriptor Workbench Plugin get Default get Perspective Registry find Perspective With Id layoutID if desc null throw new Workbench Exception Workbench Messages get String Workbench Page Error Recreating Perspective NON NLS 1 Perspective persp create Perspective desc if persp null return persp List set Active persp window fire Perspective Activated this desc  WorkbenchWindow IAdaptable WorkbenchException createClientComposite editorPresentation EditorAreaHelper editorMgr EditorManager editorPresentation PerspectiveDescriptor PerspectiveDescriptor WorkbenchPlugin getDefault getPerspectiveRegistry findPerspectiveWithId WorkbenchException WorkbenchMessages getString WorkbenchPage ErrorRecreatingPerspective createPerspective perspList setActive firePerspectiveActivated
See I Workbench Page public boolean is Part Visible I Workbench Part part return Part Site part get Site get Pane is Visible  IWorkbenchPage isPartVisible IWorkbenchPart PartSite getSite getPane isVisible
See I Workbench Page public boolean is Editor Area Visible Perspective persp get Active Perspective if persp null return false return persp is Editor Area Visible  IWorkbenchPage isEditorAreaVisible getActivePerspective isEditorAreaVisible
Returns whether the view is fast public boolean is Fast View I View Reference ref Perspective persp get Active Perspective if persp null return persp is Fast View ref else return false  isFastView IViewReference getActivePerspective isFastView
Returns whether the layout of the active perspective is fixed public boolean is Fixed Layout Perspective persp get Active Perspective if persp null return persp is Fixed Layout else return false  isFixedLayout getActivePerspective isFixedLayout
Return the active fast view or null if there are no fast views or if there are all minimized public I View Reference get Active Fast View Perspective persp get Active Perspective if persp null return persp get Active Fast View else return null  IViewReference getActiveFastView getActivePerspective getActiveFastView
Return true if the perspective has a dirty editor protected boolean is Save Needed return get Editor Manager is Save All Needed  isSaveNeeded getEditorManager isSaveAllNeeded
Returns whether the page is zoomed public boolean is Zoomed Perspective persp get Active Perspective if persp null return false if persp get Presentation null return false return persp get Presentation is Zoomed  isZoomed getActivePerspective getPresentation getPresentation isZoomed
Returns code true code if the window needs to unzoom for the given I Workbench Part to be seen by the user Returns false otherwise param part the part whose visibility is to be determined return code true code if the window needs to unzoom for the given I Workbench Part to be seen by the user code false code otherwise private boolean need To Zoom Out I Workbench Part part part is an editor if part instanceof I Editor Part if get Active Part instanceof I View Part return true Editor Site site Editor Site part get Site Editor Pane pane Editor Pane site get Pane Editor Stack book pane get Workbook return book equals book get Editor Area get Active Workbook part is a view if part instanceof I View Part if is Fast View I View Reference get Reference part part equals get Active Part return false else return true return true  IWorkbenchPart IWorkbenchPart needToZoomOut IWorkbenchPart IEditorPart getActivePart IViewPart EditorSite EditorSite getSite EditorPane EditorPane getPane EditorStack getWorkbook getEditorArea getActiveWorkbook IViewPart isFastView IViewReference getReference getActivePart
This method is called when the page is activated protected void on Activate Iterator enum persp List iterator while enum has Next Perspective perspective Perspective enum next window add Perspective Shortcut perspective get Desc this composite set Visible true Perspective persp get Active Perspective if persp null window select Perspective Shortcut persp get Desc this true persp on Activate update Visibility null persp if active Part null persp null I View Reference refs persp get View References for int i 0 i refs length i I View Reference ref refs i if ref null active Part ref get Part false if active Part null break if active Part null activation List set Active active Part activate Part active Part action Switcher update Active Part active Part if active Part instanceof I Editor Part last Active Editor I Editor Part active Part action Switcher update Top Editor I Editor Part active Part else I Editor Part editor editor Mgr get Visible Editor if editor null action Switcher update Top Editor editor inform the site s action bars of the current editor important that this occur during page opening Part Site site Part Site editor get Site Sub Action Bars bars Sub Action Bars site get Action Bars bars part Changed editor fire Part Activated active Part else composite set Focus  onActivate perspList hasNext addPerspectiveShortcut getDesc setVisible getActivePerspective selectPerspectiveShortcut getDesc onActivate updateVisibility activePart IViewReference getViewReferences IViewReference activePart getPart activePart activePart activationList setActive activePart activatePart activePart actionSwitcher updateActivePart activePart activePart IEditorPart lastActiveEditor IEditorPart activePart actionSwitcher updateTopEditor IEditorPart activePart IEditorPart editorMgr getVisibleEditor actionSwitcher updateTopEditor PartSite PartSite getSite SubActionBars SubActionBars getActionBars partChanged firePartActivated activePart setFocus
This method is called when the page is deactivated protected void on Deactivate if active Part null deactivate Part active Part action Switcher update Active Part null fire Part Deactivated active Part action Switcher update Top Editor null last Active Editor null if get Active Perspective null get Active Perspective on Deactivate composite set Visible false Iterator enum persp List iterator while enum has Next Perspective perspective Perspective enum next window remove Perspective Shortcut perspective get Desc this  onDeactivate activePart deactivatePart activePart actionSwitcher updateActivePart firePartDeactivated activePart actionSwitcher updateTopEditor lastActiveEditor getActivePerspective getActivePerspective onDeactivate setVisible perspList hasNext removePerspectiveShortcut getDesc
See I Workbench Page public void reuse Editor I Reusable Editor editor I Editor Input input editor set Input input fire Part Input Changed editor  IWorkbenchPage reuseEditor IReusableEditor IEditorInput setInput firePartInputChanged
See I Workbench Page public I Editor Part open Editor I Editor Input input String editorID throws Part Init Exception return open Editor input editorID true  IWorkbenchPage IEditorPart openEditor IEditorInput PartInitException openEditor
new Runnable public void run try result 0 busy Open Editor input editorID activate catch Part Init Exception e ex 0 e  busyOpenEditor PartInitException
See I Workbench Page public I Editor Part open Editor final I Editor Input input final String editorID final boolean activate throws Part Init Exception if input null editorID null throw new Illegal Argument Exception final I Editor Part result new I Editor Part 1 final Part Init Exception ex new Part Init Exception 1 Busy Indicator show While window get Workbench get Display new Runnable public void run try result 0 busy Open Editor input editorID activate catch Part Init Exception e ex 0 e if ex 0 null throw ex 0 return result 0  IWorkbenchPage IEditorPart openEditor IEditorInput PartInitException IllegalArgumentException IEditorPart IEditorPart PartInitException PartInitException BusyIndicator showWhile getWorkbench getDisplay busyOpenEditor PartInitException
See I Workbench Page open Editor private I Editor Part busy Open Editor I Editor Input input String editorID boolean activate throws Part Init Exception final Workbench workbench Workbench get Workbench Window get Workbench workbench large Update Start try return busy Open Editor Batched input editorID activate finally workbench large Update End  IWorkbenchPage openEditor IEditorPart busyOpenEditor IEditorInput PartInitException getWorkbenchWindow getWorkbench largeUpdateStart busyOpenEditorBatched largeUpdateEnd
run false false new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception editor To Save do Save monitor  IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException editorToSave doSave
Do not call this method Use code busy Open Editor code see I Workbench Page open Editor I Editor Input String boolean private I Editor Part busy Open Editor Batched I Editor Input input String editorID boolean activate throws Part Init Exception If an editor already exists for the input use it I Editor Part editor get Editor Manager find Editor input if editor null if I Editor Registry SYSTEM EXTERNAL EDITOR ID equals editorID if editor is Dirty Message Dialog dialog new Message Dialog get Workbench Window get Shell Workbench Messages get String Save NON NLS 1 null accept the default window icon Workbench Messages format Workbench Page editor Already Opened Msg new String input get Name NON NLS 1 Message Dialog QUESTION new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL 0 int save File dialog open if save File 0 try final I Editor Part editor To Save editor get Workbench Window run false false new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception editor To Save do Save monitor catch Invocation Target Exception e throw Runtime Exception e get Target Exception catch Interrupted Exception e return null else if save File 2 return null else show Editor activate editor return editor Disabled turning redraw off because it causes set Focus in activate editor to fail get Client Composite set Redraw false Remember the old visible editor I Editor Part old Visible Editor get Editor Manager get Visible Editor Otherwise create a new one This may cause the new editor to become the visible i e top editor I Editor Reference ref null ref get Editor Manager open Editor editorID input true if ref null editor ref get Editor true add Part ref if editor null fire Part Opened editor zoom Out If Necessary editor set Editor Area Visible true if activate if editor instanceof Multi Editor activate Multi Editor editor get Active Editor else activate editor else activation List set Active editor if active Part null ensure the activation list is in a valid state activation List set Active active Part The previous open Editor call may create a new editor and make it visible so send the notification I Editor Part visible Editor get Editor Manager get Visible Editor if visible Editor editor old Visible Editor editor action Switcher update Top Editor editor fire Part Brought To Top editor else bring To Top editor window fire Perspective Changed this get Perspective ref CHANGE EDITOR OPEN window fire Perspective Changed this get Perspective CHANGE EDITOR OPEN get Client Composite set Redraw true return editor  busyOpenEditor IWorkbenchPage openEditor IEditorInput IEditorPart busyOpenEditorBatched IEditorInput PartInitException IEditorPart getEditorManager findEditor IEditorRegistry SYSTEM_EXTERNAL_EDITOR_ID isDirty MessageDialog MessageDialog getWorkbenchWindow getShell WorkbenchMessages getString WorkbenchMessages WorkbenchPage editorAlreadyOpenedMsg getName MessageDialog IDialogConstants YES_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL saveFile saveFile IEditorPart editorToSave getWorkbenchWindow IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException editorToSave doSave InvocationTargetException RuntimeException getTargetException InterruptedException saveFile showEditor setFocus getClientComposite setRedraw IEditorPart oldVisibleEditor getEditorManager getVisibleEditor IEditorReference getEditorManager openEditor getEditor addPart firePartOpened zoomOutIfNecessary setEditorAreaVisible MultiEditor MultiEditor getActiveEditor activationList setActive activePart activationList setActive activePart openEditor IEditorPart visibleEditor getEditorManager getVisibleEditor visibleEditor oldVisibleEditor actionSwitcher updateTopEditor firePartBroughtToTop bringToTop firePerspectiveChanged getPerspective CHANGE_EDITOR_OPEN firePerspectiveChanged getPerspective CHANGE_EDITOR_OPEN getClientComposite setRedraw
private void show Editor boolean activate I Editor Part editor zoom Out If Necessary editor set Editor Area Visible true if activate activate editor else bring To Top editor  showEditor IEditorPart zoomOutIfNecessary setEditorAreaVisible bringToTop
See I Workbench Page public boolean is Editor Pinned I Editor Part editor return Editor Site editor get Editor Site get Reuse Editor  IWorkbenchPage isEditorPinned IEditorPart EditorSite getEditorSite getReuseEditor
Returns whether changes to a part will affect zoom There are a few conditions for this we are zoomed the part is contained in the main window the part is not the zoom part the part is not a fast view the part and the zoom part are not in the same editor workbook private boolean part Change Affects Zoom I Workbench Part Reference ref Part Pane pane Workbench Part Reference ref get Pane if pane instanceof Multi Editor Inner Pane pane Multi Editor Inner Pane pane get Parent Pane return get Active Perspective get Presentation part Change Affects Zoom pane  partChangeAffectsZoom IWorkbenchPartReference PartPane WorkbenchPartReference getPane MultiEditorInnerPane MultiEditorInnerPane getParentPane getActivePerspective getPresentation partChangeAffectsZoom
Removes a fast view public void remove Fast View I View Reference ref Perspective persp get Active Perspective if persp null return If parts change always update zoom if is Zoomed zoom Out Do real work persp remove Fast View ref Notify listeners window update Fast View Bar window fire Perspective Changed this get Perspective ref CHANGE FAST VIEW REMOVE window fire Perspective Changed this get Perspective CHANGE FAST VIEW REMOVE  removeFastView IViewReference getActivePerspective isZoomed zoomOut removeFastView updateFastViewBar firePerspectiveChanged getPerspective CHANGE_FAST_VIEW_REMOVE firePerspectiveChanged getPerspective CHANGE_FAST_VIEW_REMOVE
Removes an I Part Listener from the part service public void remove Part Listener I Part Listener l part Listeners remove Part Listener l  IPartListener removePartListener IPartListener partListeners removePartListener
Removes an I Part Listener from the part service public void remove Part Listener I Part Listener2 l part Listeners2 remove Part Listener l  IPartListener removePartListener IPartListener2 partListeners2 removePartListener
Implements I Workbench Page see org eclipse ui I Workbench Page remove Property Change Listener I Property Change Listener since 2 0 deprecated individual views should store a working set if needed and register a property change listener directly with the working set manager to receive notification when the view working set is removed public void remove Property Change Listener I Property Change Listener listener property Change Listeners remove listener  IWorkbenchPage IWorkbenchPage removePropertyChangeListener IPropertyChangeListener removePropertyChangeListener IPropertyChangeListener propertyChangeListeners
non Javadoc Method declared on I Selection Listener public void remove Selection Listener I Selection Listener listener selection Service remove Selection Listener listener  ISelectionListener removeSelectionListener ISelectionListener selectionService removeSelectionListener
public void remove Selection Listener String part Id I Selection Listener listener selection Service remove Selection Listener part Id listener  removeSelectionListener partId ISelectionListener selectionService removeSelectionListener partId
non Javadoc Method declared on I Selection Listener public void remove Post Selection Listener I Selection Listener listener selection Service remove Post Selection Listener listener  ISelectionListener removePostSelectionListener ISelectionListener selectionService removePostSelectionListener
public void remove Post Selection Listener String part Id I Selection Listener listener selection Service remove Post Selection Listener part Id listener  removePostSelectionListener partId ISelectionListener selectionService removePostSelectionListener partId
This method is called when a part is activated by clicking within it In response the part the pane and all of its actions will be activated In the current design this method is invoked by the part pane when the pane the part or any children gain focus public void request Activation I Workbench Part part Sanity check if certify Part part return Real work set Active Part part  requestActivation IWorkbenchPart certifyPart setActivePart
mgr get Control set Redraw false Busy Indicator show While null new Runnable public void run busy Reset Perspective  getControl setRedraw BusyIndicator showWhile busyResetPerspective
Resets the layout for the perspective The active part in the old layout is activated in the new layout for consistent user context public void reset Perspective Run op in busy cursor Use set redraw to eliminate the flash that can occur in the coolbar as the perspective is reset Cool Bar Manager mgr window get Cool Bar Manager try mgr get Control set Redraw false Busy Indicator show While null new Runnable public void run busy Reset Perspective finally mgr get Control set Redraw true  resetPerspective CoolBarManager getCoolBarManager getControl setRedraw BusyIndicator showWhile busyResetPerspective getControl setRedraw
Restore this page from the memento and ensure that the active perspective is equals the active descriptor otherwise create a new perspective for that descriptor If active Descriptor is null active the old perspective public I Status restore State I Memento memento I Perspective Descriptor active Descritor Restore working set String page Name memento get String I Workbench Constants TAG LABEL String label page Name null page Name NON NLS 1 NON NLS 2 try UI Stats start UI Stats RESTORE WORKBENCH Workbench Page label NON NLS 1 if page Name null page Name NON NLS 1 Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages format Workbench Page unable To Restore Perspective new String page Name NON NLS 1 null String working Set Name memento get String I Workbench Constants TAG WORKING SET if working Set Name null Working Set Manager working Set Manager Working Set Manager get Workbench Window get Workbench get Working Set Manager set Working Set working Set Manager get Working Set working Set Name Restore editor manager I Memento child Mem memento get Child I Workbench Constants TAG EDITORS result merge get Editor Manager restore State child Mem child Mem memento get Child I Workbench Constants TAG VIEWS if child Mem null result merge get View Factory restore State child Mem Get persp block child Mem memento get Child I Workbench Constants TAG PERSPECTIVES String active PartID child Mem get String I Workbench Constants TAG ACTIVE PART String active Part SecondaryID null if active PartID null active Part SecondaryID View Factory extract Secondary Id active PartID if active Part SecondaryID null active PartID View Factory extract Primary Id active PartID String active PerspectiveID child Mem get String I Workbench Constants TAG ACTIVE PERSPECTIVE Restore perspectives I Memento persp Mems child Mem get Children I Workbench Constants TAG PERSPECTIVE Perspective active Perspective null for int i 0 i persp Mems length i try Perspective persp new Perspective null this result merge persp restore State persp Mems i I Perspective Descriptor desc persp get Desc if desc equals active Descritor active Perspective persp else if active Perspective null desc get Id equals active PerspectiveID active Perspective persp persp List add persp catch Workbench Exception e boolean restore Active Perspective false if active Descritor null restore Active Perspective true else if active Perspective null active Perspective get Desc equals active Descritor restore Active Perspective true else restore Active Perspective false active Perspective create Perspective Perspective Descriptor active Descritor if active Perspective null result merge new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format Workbench show Perspective Error new String active Descritor get Id NON NLS 1 null persp List set Active active Perspective Make sure we have a valid perspective to work with otherwise return active Perspective persp List get Active if active Perspective null active Perspective persp List get Next Active persp List set Active active Perspective result merge active Perspective restore State if active Perspective null restore Active Perspective result merge active Perspective restore State if active Perspective null window fire Perspective Activated this active Perspective get Desc Restore active part if active PartID null I View Reference ref active Perspective find View active PartID active Part SecondaryID I View Part view null if ref null view ref get View true if view null active Part view child Mem memento get Child I Workbench Constants TAG NAVIGATION HISTORY if child Mem null navigation History restore State child Mem else if get Active Editor null navigation History mark Editor get Active Editor return result finally UI Stats end UI Stats RESTORE WORKBENCH Workbench Page label NON NLS 1  activeDescriptor IStatus restoreState IMemento IPerspectiveDescriptor activeDescritor pageName getString IWorkbenchConstants TAG_LABEL pageName pageName UIStats UIStats RESTORE_WORKBENCH WorkbenchPage pageName pageName MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages WorkbenchPage unableToRestorePerspective pageName workingSetName getString IWorkbenchConstants TAG_WORKING_SET workingSetName WorkingSetManager workingSetManager WorkingSetManager getWorkbenchWindow getWorkbench getWorkingSetManager setWorkingSet workingSetManager getWorkingSet workingSetName IMemento childMem getChild IWorkbenchConstants TAG_EDITORS getEditorManager restoreState childMem childMem getChild IWorkbenchConstants TAG_VIEWS childMem getViewFactory restoreState childMem childMem getChild IWorkbenchConstants TAG_PERSPECTIVES activePartID childMem getString IWorkbenchConstants TAG_ACTIVE_PART activePartSecondaryID activePartID activePartSecondaryID ViewFactory extractSecondaryId activePartID activePartSecondaryID activePartID ViewFactory extractPrimaryId activePartID activePerspectiveID childMem getString IWorkbenchConstants TAG_ACTIVE_PERSPECTIVE IMemento perspMems childMem getChildren IWorkbenchConstants TAG_PERSPECTIVE activePerspective perspMems restoreState perspMems IPerspectiveDescriptor getDesc activeDescritor activePerspective activePerspective getId activePerspectiveID activePerspective perspList WorkbenchException restoreActivePerspective activeDescritor restoreActivePerspective activePerspective activePerspective getDesc activeDescritor restoreActivePerspective restoreActivePerspective activePerspective createPerspective PerspectiveDescriptor activeDescritor activePerspective IStatus PLUGIN_ID WorkbenchMessages showPerspectiveError activeDescritor getId perspList setActive activePerspective activePerspective perspList getActive activePerspective activePerspective perspList getNextActive perspList setActive activePerspective activePerspective restoreState activePerspective restoreActivePerspective activePerspective restoreState activePerspective firePerspectiveActivated activePerspective getDesc activePartID IViewReference activePerspective findView activePartID activePartSecondaryID IViewPart getView activePart childMem getChild IWorkbenchConstants TAG_NAVIGATION_HISTORY childMem navigationHistory restoreState childMem getActiveEditor navigationHistory markEditor getActiveEditor UIStats UIStats RESTORE_WORKBENCH WorkbenchPage
See I Workbench Page public boolean save All Editors boolean confirm return get Editor Manager save All confirm false  IWorkbenchPage saveAllEditors getEditorManager saveAll
protected boolean save Part I Saveable Part saveable I Workbench Part part boolean confirm Do not certify part do allow editors inside a multipageeditor to call this return get Editor Manager save Part saveable part confirm  savePart ISaveablePart IWorkbenchPart getEditorManager savePart
Saves an editors in the workbench If code confirm code is code true code the user is prompted to confirm the command param confirm if user confirmation should be sought return code true code if the command succeeded or code false code if the user cancels the command public boolean save Editor I Editor Part editor boolean confirm return save Part editor editor confirm  saveEditor IEditorPart savePart
Saves the current perspective public void save Perspective Perspective persp get Active Perspective if persp null return Always unzoom if is Zoomed zoom Out persp save Desc  savePerspective getActivePerspective isZoomed zoomOut saveDesc
Saves the perspective public void save Perspective As I Perspective Descriptor new Desc Perspective persp get Active Perspective if persp null return I Perspective Descriptor old Desc persp get Desc Always unzoom if is Zoomed zoom Out persp save Desc As new Desc window update Perspective Shortcut old Desc new Desc this  savePerspectiveAs IPerspectiveDescriptor newDesc getActivePerspective IPerspectiveDescriptor oldDesc getDesc isZoomed zoomOut saveDescAs newDesc updatePerspectiveShortcut oldDesc newDesc
Save the state of the page public I Status save State I Memento memento We must unzoom to get correct layout if is Zoomed zoom Out Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages format Workbench Page unable To Save Perspective new String get Label NON NLS 1 null Save editor manager I Memento child Mem memento create Child I Workbench Constants TAG EDITORS result merge editor Mgr save State child Mem child Mem memento create Child I Workbench Constants TAG VIEWS result merge get View Factory save State child Mem Create persp block child Mem memento create Child I Workbench Constants TAG PERSPECTIVES if get Perspective null child Mem put String I Workbench Constants TAG ACTIVE PERSPECTIVE get Perspective get Id if get Active Part null if get Active Part instanceof I View Part I View Reference ref I View Reference get Reference get Active Part if ref null child Mem put String I Workbench Constants TAG ACTIVE PART View Factory get Key ref else child Mem put String I Workbench Constants TAG ACTIVE PART get Active Part get Site get Id Save each perspective in opened order Iterator enum persp List iterator while enum has Next Perspective persp Perspective enum next I Memento g Child Mem child Mem create Child I Workbench Constants TAG PERSPECTIVE result merge persp save State g Child Mem Save working set if set if working Set null memento put String I Workbench Constants TAG WORKING SET working Set get Name navigation History save State memento create Child I Workbench Constants TAG NAVIGATION HISTORY return result  IStatus saveState IMemento isZoomed zoomOut MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages WorkbenchPage unableToSavePerspective getLabel IMemento childMem createChild IWorkbenchConstants TAG_EDITORS editorMgr saveState childMem childMem createChild IWorkbenchConstants TAG_VIEWS getViewFactory saveState childMem childMem createChild IWorkbenchConstants TAG_PERSPECTIVES getPerspective childMem putString IWorkbenchConstants TAG_ACTIVE_PERSPECTIVE getPerspective getId getActivePart getActivePart IViewPart IViewReference IViewReference getReference getActivePart childMem putString IWorkbenchConstants TAG_ACTIVE_PART ViewFactory getKey childMem putString IWorkbenchConstants TAG_ACTIVE_PART getActivePart getSite getId perspList hasNext IMemento gChildMem childMem createChild IWorkbenchConstants TAG_PERSPECTIVE saveState gChildMem workingSet putString IWorkbenchConstants TAG_WORKING_SET workingSet getName navigationHistory saveState createChild IWorkbenchConstants TAG_NAVIGATION_HISTORY
Sets the active part private void set Active Part I Workbench Part new Part Optimize it if active Part new Part return No need to change the history if the active editor is becoming the active part boolean mark Location new Part last Active Editor String label new Part null new Part get Title none NON NLS 1 try UI Stats start UI Stats ACTIVATE PART label Notify perspective It may deactivate fast view Perspective persp get Active Perspective if persp null persp part Activated new Part Deactivate old part I Workbench Part old Part active Part if old Part null deactivate Part old Part Set active part active Part new Part if new Part null activation List set Active new Part if new Part instanceof I Editor Part last Active Editor I Editor Part new Part I Editor Reference ref I Editor Reference get Reference last Active Editor editor Mgr set Visible Editor ref true activate Part active Part if mark Location active Part null active Part instanceof I Editor Part navigation History mark Editor I Editor Part active Part Fire notifications if old Part null fire Part Deactivated old Part Update actions now so old actions have heard part deactivated and new actions can hear part activated action Switcher update Active Part new Part if new Part null fire Part Activated new Part finally UI Stats end UI Stats ACTIVATE PART label  setActivePart IWorkbenchPart newPart activePart newPart markLocation newPart lastActiveEditor newPart newPart getTitle UIStats UIStats ACTIVATE_PART getActivePerspective partActivated newPart IWorkbenchPart oldPart activePart oldPart deactivatePart oldPart activePart newPart newPart activationList setActive newPart newPart IEditorPart lastActiveEditor IEditorPart newPart IEditorReference IEditorReference getReference lastActiveEditor editorMgr setVisibleEditor activatePart activePart markLocation activePart activePart IEditorPart navigationHistory markEditor IEditorPart activePart oldPart firePartDeactivated oldPart actionSwitcher updateActivePart newPart newPart firePartActivated newPart UIStats UIStats ACTIVATE_PART
See I Workbench Page public void set Editor Area Visible boolean show Editor Area Perspective persp get Active Perspective if persp null return if show Editor Area persp is Editor Area Visible return If parts change always update zoom if is Zoomed zoom Out Update editor area visibility if show Editor Area persp show Editor Area window fire Perspective Changed this get Perspective CHANGE EDITOR AREA SHOW else persp hide Editor Area if active Part instanceof I Editor Part I Editor Part e I Editor Part active Part set Active Part null preserve editor contributions action Switcher update Top Editor e window fire Perspective Changed this get Perspective CHANGE EDITOR AREA HIDE  IWorkbenchPage setEditorAreaVisible showEditorArea getActivePerspective showEditorArea isEditorAreaVisible isZoomed zoomOut showEditorArea showEditorArea firePerspectiveChanged getPerspective CHANGE_EDITOR_AREA_SHOW hideEditorArea activePart IEditorPart IEditorPart IEditorPart activePart setActivePart actionSwitcher updateTopEditor firePerspectiveChanged getPerspective CHANGE_EDITOR_AREA_HIDE
Sets the layout of the page Assumes the new perspective is not null Keeps the active part if possible Updates the window menubar and toolbar if necessary private void set Perspective Perspective new Persp Don t do anything if already active layout Perspective old Persp get Active Perspective if old Persp new Persp return if new Persp null I Status status new Persp restore State if status get Severity I Status OK String title Workbench Messages get String Workbench Page problem Restoring Title NON NLS 1 String msg Workbench Messages get String Workbench Page error Reading State NON NLS 1 Error Dialog open Error get Workbench Window get Shell title msg status Deactivate active part ensure the switcher is not showing any action sets so it will reshow them in the new perspective action Switcher update Top Editor null I Workbench Part old Active Part active Part set Active Part null Deactivate the old layout if old Persp null old Persp on Deactivate window select Perspective Shortcut old Persp get Desc this false Activate the new layout persp List set Active new Persp if new Persp null new Persp on Activate Notify listeners of activation window fire Perspective Activated this new Persp get Desc Update the shortcut window select Perspective Shortcut new Persp get Desc this true else No need to remember old active part since there is no new active perspective to activate it in old Active Part null Update the window window update Action Sets window update Fast View Bar update Visibility old Persp new Persp Reactivate active part if old Active Part null String id old Active Part get Site get Id old Persp set Old PartID id if old Active Part instanceof I Editor Part is Editor Area Visible activate old Active Part else if old Active Part instanceof I View Part I Editor Part ed editor Mgr get Visible Editor if ed null action Switcher update Top Editor ed if find View id null activate old Active Part else activate Old Part new Persp else activate Old Part new Persp else no active part I Editor Part ed editor Mgr get Visible Editor if ed null action Switcher update Top Editor ed else activate Old Part new Persp if get Active Part null activation List get Active null activate activation List get Active if editor Presentation null editor Presentation show Visible Editor if new Persp null old Persp null if sticky Perspectives contains new Persp get Desc I View Registry view Reg Workbench Plugin get Default get View Registry I Sticky View Descriptor sticky Descs view Reg get Sticky Views for int i 0 i sticky Descs length i try show a sticky view if it was in the last perspective if old Persp find View sticky Descs i get Id null show View sticky Descs i get Id null I Workbench Page VIEW CREATE catch Part Init Exception e Workbench Plugin log Could not open view sticky Descs i get Id new Status I Status ERROR Workbench Plugin PI WORKBENCH I Status ERROR Could not open view sticky Descs i get Id e NON NLS 1 NON NLS 2 sticky Perspectives add new Persp get Desc  setPerspective newPersp oldPersp getActivePerspective oldPersp newPersp newPersp IStatus newPersp restoreState getSeverity IStatus WorkbenchMessages getString WorkbenchPage problemRestoringTitle WorkbenchMessages getString WorkbenchPage errorReadingState ErrorDialog openError getWorkbenchWindow getShell actionSwitcher updateTopEditor IWorkbenchPart oldActivePart activePart setActivePart oldPersp oldPersp onDeactivate selectPerspectiveShortcut oldPersp getDesc perspList setActive newPersp newPersp newPersp onActivate firePerspectiveActivated newPersp getDesc selectPerspectiveShortcut newPersp getDesc oldActivePart updateActionSets updateFastViewBar updateVisibility oldPersp newPersp oldActivePart oldActivePart getSite getId oldPersp setOldPartID oldActivePart IEditorPart isEditorAreaVisible oldActivePart oldActivePart IViewPart IEditorPart editorMgr getVisibleEditor actionSwitcher updateTopEditor findView oldActivePart activateOldPart newPersp activateOldPart newPersp IEditorPart editorMgr getVisibleEditor actionSwitcher updateTopEditor activateOldPart newPersp getActivePart activationList getActive activationList getActive editorPresentation editorPresentation showVisibleEditor newPersp oldPersp stickyPerspectives newPersp getDesc IViewRegistry viewReg WorkbenchPlugin getDefault getViewRegistry IStickyViewDescriptor stickyDescs viewReg getStickyViews stickyDescs oldPersp findView stickyDescs getId showView stickyDescs getId IWorkbenchPage VIEW_CREATE PartInitException WorkbenchPlugin stickyDescs getId IStatus WorkbenchPlugin PI_WORKBENCH IStatus stickyDescs getId stickyPerspectives newPersp getDesc
private void update Visibility Perspective old Persp Perspective new Persp Hash Set set new Hash Set I Workbench Part Reference refs if old Persp null refs old Persp get View References for int i 0 i refs length i Part Pane pane Workbench Part Reference refs i get Pane if pane null set add pane if new Persp null refs new Persp get View References for int i 0 i refs length i Part Pane pane Workbench Part Reference refs i get Pane if pane null set add pane Perspective Helper pres new Persp get Presentation for Iterator iter set iterator iter has Next Part Pane pane Part Pane iter next String secondary Id null if pane instanceof View Pane View Pane vp View Pane pane I View Reference ref I View Reference vp get Part Reference secondary Id ref get Secondary Id boolean is Visible pres is Part Visible pane getID secondary Id pane set Visible is Visible else for Iterator iter set iterator iter has Next Part Pane pane Part Pane iter next pane set Visible false  updateVisibility oldPersp newPersp HashSet HashSet IWorkbenchPartReference oldPersp oldPersp getViewReferences PartPane WorkbenchPartReference getPane newPersp newPersp getViewReferences PartPane WorkbenchPartReference getPane PerspectiveHelper newPersp getPresentation hasNext PartPane PartPane secondaryId ViewPane ViewPane ViewPane IViewReference IViewReference getPartReference secondaryId getSecondaryId isVisible isPartVisible secondaryId setVisible isVisible hasNext PartPane PartPane setVisible
private void activate Old Part Perspective new Persp if window is Closing return if new Persp null String oldID new Persp get Old PartID I Workbench Part prev Old Part null if oldID null prev Old Part find View oldID if prev Old Part null activate prev Old Part else if is Editor Area Visible activate get Active Editor  activateOldPart newPersp isClosing newPersp newPersp getOldPartID IWorkbenchPart prevOldPart prevOldPart findView prevOldPart prevOldPart isEditorAreaVisible getActiveEditor
Run op in busy cursor Busy Indicator show While null new Runnable public void run busy Set Perspective desc  BusyIndicator showWhile busySetPerspective
Sets the perspective param persp identifies the new perspective public void set Perspective final I Perspective Descriptor desc Going from multiple to single rows can make the coolbar and its adjacent views appear jumpy as perspectives are switched Turn off redraw to help with this Cool Bar Manager mgr window get Cool Bar Manager try mgr get Control set Redraw false get Client Composite set Redraw false Run op in busy cursor Busy Indicator show While null new Runnable public void run busy Set Perspective desc finally get Client Composite set Redraw true mgr get Control set Redraw true I Workbench Part part get Active Part if part null part set Focus  setPerspective IPerspectiveDescriptor CoolBarManager getCoolBarManager getControl setRedraw getClientComposite setRedraw BusyIndicator showWhile busySetPerspective getClientComposite setRedraw getControl setRedraw IWorkbenchPart getActivePart setFocus
Restore the toolbar layout for the active perspective protected void reset Tool Bar Layout window get Cool Bar Manager reset Item Order  resetToolBarLayout getCoolBarManager resetItemOrder
Sets the active working set for the workbench page Notifies property change listener about the change param new Working Set the active working set for the page May be null since 2 0 deprecated individual views should store a working set if needed public void set Working Set I Working Set new Working Set I Working Set old Working Set working Set working Set new Working Set if old Working Set new Working Set fire Property Change CHANGE WORKING SET REPLACE old Working Set new Working Set if new Working Set null Workbench Plugin get Default get Working Set Manager add Property Change Listener property Change Listener else Workbench Plugin get Default get Working Set Manager remove Property Change Listener property Change Listener  newWorkingSet setWorkingSet IWorkingSet newWorkingSet IWorkingSet oldWorkingSet workingSet workingSet newWorkingSet oldWorkingSet newWorkingSet firePropertyChange CHANGE_WORKING_SET_REPLACE oldWorkingSet newWorkingSet newWorkingSet WorkbenchPlugin getDefault getWorkingSetManager addPropertyChangeListener propertyChangeListener WorkbenchPlugin getDefault getWorkingSetManager removePropertyChangeListener propertyChangeListener
see I Workbench Page public void show Action Set String action SetID Perspective persp get Active Perspective if persp null persp show Action Set action SetID window update Action Sets window fire Perspective Changed this get Perspective CHANGE ACTION SET SHOW  IWorkbenchPage showActionSet actionSetID getActivePerspective showActionSet actionSetID updateActionSets firePerspectiveChanged getPerspective CHANGE_ACTION_SET_SHOW
See I Workbench Page public I View Part show View String viewID throws Part Init Exception return show View viewID null VIEW ACTIVATE  IWorkbenchPage IViewPart showView PartInitException showView VIEW_ACTIVATE
Busy Indicator show While null new Runnable public void run try result 0 busy Show View viewID secondaryID mode catch Part Init Exception e result 0 e  BusyIndicator showWhile busyShowView PartInitException
public I View Part show View final String viewID final String secondaryID final int mode throws Part Init Exception if secondaryID null if secondaryID length 0 secondaryID index Of View Factory ID SEP 1 throw new Illegal Argument Exception Workbench Messages get String Workbench Page Illegal Secondary Id NON NLS 1 if certify Mode mode throw new Illegal Argument Exception Workbench Messages get String Workbench Page Illegal View Mode NON NLS 1 Run op in busy cursor final Object result new Object 1 Busy Indicator show While null new Runnable public void run try result 0 busy Show View viewID secondaryID mode catch Part Init Exception e result 0 e if result 0 instanceof I View Part return I View Part result 0 else if result 0 instanceof Part Init Exception throw Part Init Exception result 0 else throw new Part Init Exception Workbench Messages get String Workbench Page Abnormal Workbench Condition NON NLS 1  IViewPart showView PartInitException indexOf ViewFactory ID_SEP IllegalArgumentException WorkbenchMessages getString WorkbenchPage IllegalSecondaryId certifyMode IllegalArgumentException WorkbenchMessages getString WorkbenchPage IllegalViewMode BusyIndicator showWhile busyShowView PartInitException IViewPart IViewPart PartInitException PartInitException PartInitException WorkbenchMessages getString WorkbenchPage AbnormalWorkbenchCondition
param mode the mode to test return whether the mode is recognized since 3 0 private boolean certify Mode int mode switch mode case VIEW ACTIVATE case VIEW VISIBLE case VIEW CREATE return true default return false  certifyMode VIEW_ACTIVATE VIEW_VISIBLE VIEW_CREATE
Hides the active fast view Has no effect if there is no fast view active public void hide Fast View Perspective persp get Active Perspective if persp null I View Reference ref persp get Active Fast View if ref null toggle Fast View ref  hideFastView getActivePerspective IViewReference getActiveFastView toggleFastView
Toggles the visibility of a fast view If the view is active it is deactivated Otherwise it is activated public void toggle Fast View I View Reference ref Perspective persp get Active Perspective if persp null persp toggle Fast View ref if the fast view has been deactivated if ref persp get Active Fast View I Workbench Part previously Active activation List get Previously Active I Editor Part active Editor get Active Editor if active Editor null previously Active instanceof I Editor Part set Active Part active Editor else set Active Part previously Active  toggleFastView IViewReference getActivePerspective toggleFastView getActiveFastView IWorkbenchPart previouslyActive activationList getPreviouslyActive IEditorPart activeEditor getActiveEditor activeEditor previouslyActive IEditorPart setActivePart activeEditor setActivePart previouslyActive
Zoom in on a part If the part is already in zoom then zoom out public void toggle Zoom I Workbench Part Reference ref Perspective persp get Active Perspective if persp null return Part Pane pane Workbench Part Reference ref get Pane If target part is detached fire the zoom event Note this doesn t actually cause any changes in size and is required to support intro state changes We may want to introduce the notion of a zoomed fullscreen detached view at a later time if pane get Window instanceof Detached Window pane set Zoomed pane is Zoomed return if ref instanceof I View Reference persp is Fast View I View Reference ref persp toggle Fast View Zoom return Update zoom status if is Zoomed zoom Out return else persp get Presentation zoom In ref activate ref get Part true  toggleZoom IWorkbenchPartReference getActivePerspective PartPane WorkbenchPartReference getPane getWindow DetachedWindow setZoomed isZoomed IViewReference isFastView IViewReference toggleFastViewZoom isZoomed zoomOut getPresentation zoomIn getPart
update Action Bars method comment public void update Action Bars window update Action Bars  updateActionBars updateActionBars updateActionBars
Sets the tab list of this page s composite appropriately when a part is activated private void update Tab List I Workbench Part part Part Site site Part Site part get Site Part Pane pane site get Pane if pane instanceof View Pane View Pane view Pane View Pane pane Control tab List view Pane get Tab List if pane get Window instanceof Detached Window view Pane get Control get Shell set Tab List tab List else get Client Composite set Tab List tab List else if pane instanceof Editor Pane Editor Sash Container ea Editor Pane pane get Workbook get Editor Area ea update Tab List get Client Composite set Tab List new Control ea get Parent  updateTabList IWorkbenchPart PartSite PartSite getSite PartPane getPane ViewPane ViewPane viewPane ViewPane tabList viewPane getTabList getWindow DetachedWindow viewPane getControl getShell setTabList tabList getClientComposite setTabList tabList EditorPane EditorSashContainer EditorPane getWorkbook getEditorArea updateTabList getClientComposite setTabList getParent
The title of the given part has changed For views updates the fast view button if necessary public void update Title I View Reference ref if is Fast View ref Would be more efficient to just update label of single tool item but we don t have access to it from here window update Fast View Bar  updateTitle IViewReference isFastView updateFastViewBar
Zooms out a zoomed in part package void zoom Out Perspective persp get Active Perspective if persp null persp get Presentation zoom Out  zoomOut getActivePerspective getPresentation zoomOut
Zooms out a zoomed in part if it is necessary to do so for the user to view the I Workbench Part that is the argument Otherwise does nothing param part the part to be made viewable private void zoom Out If Necessary I Workbench Part part if is Zoomed need To Zoom Out part zoom Out  IWorkbenchPart zoomOutIfNecessary IWorkbenchPart isZoomed needToZoomOut zoomOut
see I Page Layout public int get Editor Reuse Threshold I Preference Store store Workbench Plugin get Default get Preference Store return store get Int I Preference Constants REUSE EDITORS  IPageLayout getEditorReuseThreshold IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore getInt IPreferenceConstants REUSE_EDITORS
see I Page Layout public void set Editor Reuse Threshold int open Editors  IPageLayout setEditorReuseThreshold openEditors
Returns the editors in activation order oldest first public I Editor Reference get Sorted Editors return activation List get Editors  IEditorReference getSortedEditors activationList getEditors
Returns an iterator over the opened perspectives protected I Perspective Descriptor get Opened Perspectives Perspective opened persp List get Opened Perspectives I Perspective Descriptor result new I Perspective Descriptor opened length for int i 0 i result length i result i opened i get Desc return result  IPerspectiveDescriptor getOpenedPerspectives perspList getOpenedPerspectives IPerspectiveDescriptor IPerspectiveDescriptor getDesc
protected I Perspective Descriptor get Sorted Perspectives Perspective sorted Array persp List get Sorted Perspectives I Perspective Descriptor result new I Perspective Descriptor sorted Array length for int i 0 i result length i result i sorted Array i get Desc return result  IPerspectiveDescriptor getSortedPerspectives sortedArray perspList getSortedPerspectives IPerspectiveDescriptor IPerspectiveDescriptor sortedArray sortedArray getDesc
Returns the parts in activation order oldest first public I Workbench Part Reference get Sorted Parts return activation List get Parts  IWorkbenchPartReference getSortedParts activationList getParts
public I Workbench Part Reference get Reference I Workbench Part part if part null return null Part Pane pane Part Site part get Site get Pane if pane instanceof Multi Editor Inner Pane Multi Editor Inner Pane inner Pane Multi Editor Inner Pane pane return inner Pane get Parent Pane get Part Reference if pane null An error has occurred while creating the view I View Reference refs get View References for int i 0 i refs length i if refs i get Part false part return refs i return null return pane get Part Reference  IWorkbenchPartReference getReference IWorkbenchPart PartPane PartSite getSite getPane MultiEditorInnerPane MultiEditorInnerPane innerPane MultiEditorInnerPane innerPane getParentPane getPartReference IViewReference getViewReferences getPart getPartReference
void set Active I Workbench Part part if parts size 0 return Part Pane pane Part Site part get Site get Pane if pane instanceof Multi Editor Inner Pane Multi Editor Inner Pane inner Pane Multi Editor Inner Pane pane set Active inner Pane get Parent Pane get Part Reference get Part true else I Workbench Part Reference ref get Reference part if ref parts get parts size 1 return parts remove ref parts add ref pane add Property Change Listener property Change Listener  setActive IWorkbenchPart PartPane PartSite getSite getPane MultiEditorInnerPane MultiEditorInnerPane innerPane MultiEditorInnerPane setActive innerPane getParentPane getPartReference getPart IWorkbenchPartReference getReference addPropertyChangeListener propertyChangeListener
Add Move the active part to end of the list void set Active I Workbench Part Reference ref set Active ref get Part true  setActive IWorkbenchPartReference setActive getPart
void add I Workbench Part Reference ref if parts index Of ref 0 return I Workbench Part part ref get Part false if part null Part Pane pane Part Site part get Site get Pane if pane instanceof Multi Editor Inner Pane Multi Editor Inner Pane inner Pane Multi Editor Inner Pane pane add inner Pane get Parent Pane get Part Reference return Part Pane pane Workbench Part Reference ref get Pane if pane null pane add Property Change Listener property Change Listener parts add 0 ref  IWorkbenchPartReference indexOf IWorkbenchPart getPart PartPane PartSite getSite getPane MultiEditorInnerPane MultiEditorInnerPane innerPane MultiEditorInnerPane innerPane getParentPane getPartReference PartPane WorkbenchPartReference getPane addPropertyChangeListener propertyChangeListener
I Workbench Part get Active if parts is Empty return null return get Active parts size 1  IWorkbenchPart getActive isEmpty getActive
I Workbench Part get Previously Active if parts size 2 return null return get Active parts size 2  IWorkbenchPart getPreviouslyActive getActive
private I Workbench Part get Active int start I Workbench Part Reference views get View References for int i start i 0 i I Workbench Part Reference ref I Workbench Part Reference parts get i Skip parts whose containers have disabled auto focus I Workbench Part part ref get Part false if part null I Workbench Part Site site part get Site if site instanceof Part Site Part Site part Site Part Site site I Layout Container container part Site get Pane get Container if container null container allows Auto Focus continue Skip fastviews if ref instanceof I View Reference if I View Reference ref is Fast View for int j 0 j views length j if views j ref return ref get Part true else return ref get Part true return null  IWorkbenchPart getActive IWorkbenchPartReference getViewReferences IWorkbenchPartReference IWorkbenchPartReference IWorkbenchPart getPart IWorkbenchPartSite getSite PartSite PartSite partSite PartSite ILayoutContainer partSite getPane getContainer allowsAutoFocus IViewReference IViewReference isFastView getPart getPart
the index the more recent it was used int index Of I Workbench Part part return parts index Of get Reference part  indexOf IWorkbenchPart indexOf getReference
The higher the index the more recent it was used int index Of I Workbench Part Reference ref return parts index Of ref  indexOf IWorkbenchPartReference indexOf
boolean remove I Workbench Part Reference ref Part Pane pane Workbench Part Reference ref get Pane if pane null pane remove Property Change Listener property Change Listener return parts remove ref  IWorkbenchPartReference PartPane WorkbenchPartReference getPane removePropertyChangeListener propertyChangeListener
private I Editor Reference get Editors Array List editors new Array List parts size for Iterator i parts iterator i has Next I Workbench Part Reference part I Workbench Part Reference i next if part instanceof I Editor Reference editors add part return I Editor Reference editors to Array new I Editor Reference editors size  IEditorReference getEditors ArrayList ArrayList hasNext IWorkbenchPartReference IWorkbenchPartReference IEditorReference IEditorReference toArray IEditorReference
private I Workbench Part Reference get Parts I Workbench Part Reference views get View References Array List result List new Array List parts size for Iterator iterator parts iterator iterator has Next I Workbench Part Reference ref I Workbench Part Reference iterator next if ref instanceof I View Reference Filter views from other perspectives for int i 0 i views length i if views i ref result List add ref break else result List add ref I Workbench Part Reference result new I Workbench Part Reference result List size return I Workbench Part Reference result List to Array result  IWorkbenchPartReference getParts IWorkbenchPartReference getViewReferences ArrayList resultList ArrayList hasNext IWorkbenchPartReference IWorkbenchPartReference IViewReference resultList resultList IWorkbenchPartReference IWorkbenchPartReference resultList IWorkbenchPartReference resultList toArray
I Editor Part get Top Editor I Editor Reference editors get Editors if editors length 0 return editors editors length 1 get Editor true return null  IEditorPart getTopEditor IEditorReference getEditors getEditor
Creates an empty instance of the perspective list public Perspective List opened List new Array List 15 used List new Array List 15  PerspectiveList openedList ArrayList usedList ArrayList
Return all perspectives in the order they were activated public Perspective get Sorted Perspectives Perspective result new Perspective used List size return Perspective used List to Array result  getSortedPerspectives usedList usedList toArray
Adds a perspective to the list No check is done for a duplicate when adding public boolean add Perspective perspective opened List add perspective used List add 0 perspective It will be moved to top only when activated return true  openedList usedList
Returns an iterator on the perspective list in the order they were opened public Iterator iterator return opened List iterator  openedList
Returns an array with all opened perspectives public Perspective get Opened Perspectives Perspective result new Perspective opened List size return Perspective opened List to Array result  getOpenedPerspectives openedList openedList toArray
Removes a perspective from the list public boolean remove Perspective perspective if active perspective active null used List remove perspective return opened List remove perspective  usedList openedList
Swap the opened order of old perspective with the new perspective public void swap Perspective old Perspective Perspective new Perspective int old Index opened List index Of old Perspective int new Index opened List index Of new Perspective if old Index 0 new Index 0 return opened List set old Index new Perspective opened List set new Index old Perspective  oldPerspective newPerspective oldIndex openedList indexOf oldPerspective newIndex openedList indexOf newPerspective oldIndex newIndex openedList oldIndex newPerspective openedList newIndex oldPerspective
Returns whether the list contains any perspectives public boolean is Empty return opened List is Empty  isEmpty openedList isEmpty
Returns the most recently used perspective in the list public Perspective get Active return active  getActive
Returns the next most recently used perspective in the list public Perspective get Next Active if active null if used List is Empty return null else return Perspective used List get used List size 1 else if used List size 2 return null else return Perspective used List get used List size 2  getNextActive usedList isEmpty usedList usedList usedList usedList usedList
Returns the number of perspectives opened public int size return opened List size  openedList
Marks the specified perspective as the most recently used one in the list public void set Active Perspective perspective if perspective active return active perspective if perspective null used List remove perspective used List add perspective  setActive usedList usedList
for dynamic UI protected Hash Map get State Map return state Map  HashMap getStateMap stateMap
for dynamic UI protected void add Perspective Perspective persp persp List add persp  addPerspective perspList
Collections sort list new Comparator public int compare Object o1 Object o2 int pos1 1 activation List index Of I Workbench Part Reference o1 int pos2 1 activation List index Of I Workbench Part Reference o2 return pos1 pos2  activationList indexOf IWorkbenchPartReference activationList indexOf IWorkbenchPartReference
Find the stack of view references stacked with this view part param part the part return the stack of references since 3 0 private I View Reference get View Reference Stack I View Part part Sanity check Perspective persp get Active Perspective if persp null certify Part part return null I Layout Container container Part Site part get Site get Pane get Container if container instanceof View Stack View Stack folder View Stack container final Array List list new Array List folder get Children length for int i 0 i folder get Children length i Layout Part layout Part folder get Children i if layout Part instanceof View Pane I View Reference view View Pane layout Part get View Reference if view null list add view sort the list by activation order Collections sort list new Comparator public int compare Object o1 Object o2 int pos1 1 activation List index Of I Workbench Part Reference o1 int pos2 1 activation List index Of I Workbench Part Reference o2 return pos1 pos2 return I View Reference list to Array new I View Reference list size return new I View Reference find View Reference part get Site get Id part get View Site get Secondary Id  IViewReference getViewReferenceStack IViewPart getActivePerspective certifyPart ILayoutContainer PartSite getSite getPane getContainer ViewStack ViewStack ViewStack ArrayList ArrayList getChildren getChildren LayoutPart layoutPart getChildren layoutPart ViewPane IViewReference ViewPane layoutPart getViewReference activationList indexOf IWorkbenchPartReference activationList indexOf IWorkbenchPartReference IViewReference toArray IViewReference IViewReference findViewReference getSite getId getViewSite getSecondaryId
public I View Part get View Stack I View Part part I View Reference ref Stack get View Reference Stack part if ref Stack null return null I View Part stack new I View Part ref Stack length for int i 0 i ref Stack length i stack i find View ref Stack i get Id return stack  IViewPart getViewStack IViewPart IViewReference refStack getViewReferenceStack refStack IViewPart IViewPart refStack refStack findView refStack getId
Allow for programmatically resizing a part p em EXPERIMENTAL em p p Known limitations ul li currently applies only to views li li has no effect when view is zoomed li ul public void resize View I View Part part int width int height Sash Info sash Info new Sash Info Part Pane pane Part Site part get Site get Pane I Layout Container container pane get Container Layout Tree tree get Perspective Presentation get Layout root find View Stack container retrieve our layout sashes from the layout tree find Sash Parts tree pane find Sashes sash Info first set the width float delta Width width pane get Bounds width if sash Info right null Rectangle right Bounds sash Info right Node get Bounds set the new ratio sash Info right set Ratio float delta Width sash Info right get Bounds x right Bounds x float right Bounds width complete the resize sash Info right Node set Bounds right Bounds else if sash Info left null Rectangle left Bounds sash Info left Node get Bounds set the ratio sash Info left set Ratio float sash Info left get Bounds x delta Width left Bounds x float left Bounds width complete the resize sash Info left Node set Bounds sash Info left Node get Bounds next set the height float delta Height height pane get Bounds height if sash Info bottom null Rectangle bottom Bounds sash Info bottom Node get Bounds set the new ratio sash Info bottom set Ratio float delta Height sash Info bottom get Bounds y bottom Bounds y float bottom Bounds height complete the resize sash Info bottom Node set Bounds bottom Bounds else if sash Info top null Rectangle top Bounds sash Info top Node get Bounds set the ratio sash Info top set Ratio float sash Info top get Bounds y delta Height top Bounds y float top Bounds height complete the resize sash Info top Node set Bounds top Bounds  resizeView IViewPart SashInfo sashInfo SashInfo PartPane PartSite getSite getPane ILayoutContainer getContainer LayoutTree getPerspectivePresentation getLayout ViewStack findSashParts findSashes sashInfo deltaWidth getBounds sashInfo rightBounds sashInfo rightNode getBounds sashInfo setRatio deltaWidth sashInfo getBounds rightBounds rightBounds sashInfo rightNode setBounds rightBounds sashInfo leftBounds sashInfo leftNode getBounds sashInfo setRatio sashInfo getBounds deltaWidth leftBounds leftBounds sashInfo leftNode setBounds sashInfo leftNode getBounds deltaHeight getBounds sashInfo bottomBounds sashInfo bottomNode getBounds sashInfo setRatio deltaHeight sashInfo getBounds bottomBounds bottomBounds sashInfo bottomNode setBounds bottomBounds sashInfo topBounds sashInfo topNode getBounds sashInfo setRatio sashInfo getBounds deltaHeight topBounds topBounds sashInfo topNode setBounds topBounds
private void find Sash Parts Layout Tree tree Part Pane Sashes sashes Sash Info info Layout Tree parent tree get Parent if parent null return if parent part instanceof Layout Part Sash get the layout part sash from this tree node Layout Part Sash sash Layout Part Sash parent part make sure it has a sash control Control control sash get Control if control null check for a vertical sash if sash is Vertical if sashes left control info left sash info left Node parent find Sash sash else if sashes right control info right sash info right Node parent find Sash sash check for a horizontal sash else if sashes top control info top sash info top Node parent find Sash sash else if sashes bottom control info bottom sash info bottom Node parent find Sash sash recursive call to continue up the tree find Sash Parts parent sashes info  findSashParts LayoutTree PartPane SashInfo LayoutTree getParent LayoutPartSash LayoutPartSash LayoutPartSash getControl isVertical leftNode findSash rightNode findSash topNode findSash bottomNode findSash findSashParts

see org eclipse ui I Property Listener property Changed java lang Object int public void property Changed Object source int prop Id part Property Changed source prop Id  IPropertyListener propertyChanged propertyChanged propId partPropertyChanged propId
public Workbench Part Reference no op  WorkbenchPartReference
Calling this with defer Events true will queue all property change events until a subsequent call to defer Events false This should be used at the beginning of a batch of related changes to prevent duplicate property change events from being sent param should Queue private void defer Events boolean should Queue queue Events should Queue if queue Events false for int event Idx queued Events next Set Bit 0 event Idx 0 event Idx queued Events next Set Bit event Idx 1 fire Property Change event Idx queued Events clear  deferEvents deferEvents shouldQueue deferEvents shouldQueue queueEvents shouldQueue queueEvents eventIdx queuedEvents nextSetBit eventIdx eventIdx queuedEvents nextSetBit eventIdx firePropertyChange eventIdx queuedEvents
protected void set Title String new Title if Util equals title new Title return title new Title fire Property Change I Workbench Part Constants PROP TITLE  setTitle newTitle newTitle newTitle firePropertyChange IWorkbenchPartConstants PROP_TITLE
protected void set Part Name String new Part Name if Util equals part Name new Part Name return part Name new Part Name fire Property Change I Workbench Part Constants PROP PART NAME  setPartName newPartName partName newPartName partName newPartName firePropertyChange IWorkbenchPartConstants PROP_PART_NAME
protected void set Content Description String new Content Description if Util equals content Description new Content Description return content Description new Content Description fire Property Change I Workbench Part Constants PROP CONTENT DESCRIPTION  setContentDescription newContentDescription contentDescription newContentDescription contentDescription newContentDescription firePropertyChange IWorkbenchPartConstants PROP_CONTENT_DESCRIPTION
protected void set Tool Tip String new Tool Tip if Util equals tooltip new Tool Tip return tooltip new Tool Tip fire Property Change I Workbench Part Constants PROP TITLE  setToolTip newToolTip newToolTip newToolTip firePropertyChange IWorkbenchPartConstants PROP_TITLE
protected void part Property Changed Object source int prop Id We handle these properties directly some of them may be transformed before firing events to workbench listeners if prop Id I Workbench Part Constants PROP CONTENT DESCRIPTION prop Id I Workbench Part Constants PROP PART NAME prop Id I Workbench Part Constants PROP TITLE refresh From Part else Any other properties are just reported to listeners verbatim fire Property Change prop Id  partPropertyChanged propId propId IWorkbenchPartConstants PROP_CONTENT_DESCRIPTION propId IWorkbenchPartConstants PROP_PART_NAME propId IWorkbenchPartConstants PROP_TITLE refreshFromPart firePropertyChange propId
Refreshes all cached values with the values from the real part protected void refresh From Part defer Events true set Part Name compute Part Name set Title compute Title set Content Description compute Content Description set Tool Tip get Raw Tool Tip if Util equals this image part get Title Image fire Property Change I Workbench Part Constants PROP TITLE defer Events false  refreshFromPart deferEvents setPartName computePartName setTitle computeTitle setContentDescription computeContentDescription setToolTip getRawToolTip getTitleImage firePropertyChange IWorkbenchPartConstants PROP_TITLE deferEvents
public void init String id String title String tooltip Image Descriptor desc String pane Name String content Description this id id this title title this tooltip tooltip this image Descriptor desc this part Name pane Name this content Description content Description  ImageDescriptor paneName contentDescription imageDescriptor partName paneName contentDescription contentDescription
Releases any references maintained by this part reference when its actual part becomes known not called when it is disposed public void release References id null if image null image Descriptor null make sure part has inc the reference count if part null part get Title Image Reference Counter image Cache Workbench Images get Image Cache image Image image Cache get image Descriptor if image null image Cache remove Ref image Descriptor image null image Descriptor null  releaseReferences imageDescriptor getTitleImage ReferenceCounter imageCache WorkbenchImages getImageCache imageCache imageDescriptor imageCache removeRef imageDescriptor imageDescriptor
see I Workbench Part public void add Property Listener I Property Listener listener prop Change Listeners add listener  IWorkbenchPart addPropertyListener IPropertyListener propChangeListeners
see I Workbench Part public void remove Property Listener I Property Listener listener prop Change Listeners remove listener  IWorkbenchPart removePropertyListener IPropertyListener propChangeListeners
public String get Id if part null I Workbench Part Site site part get Site if site null return site get Id return Util safe String id  getId IWorkbenchPartSite getSite getId safeString
public String get Title Tool Tip return Util safe String tooltip  getTitleToolTip safeString
protected final String get Raw Tool Tip return Util safe String part get Title Tool Tip  getRawToolTip safeString getTitleToolTip
Returns the pane name for the part return the pane name for the part public String get Part Name return Util safe String part Name  getPartName safeString partName
Gets the part name directly from the associated workbench part or the empty string if none return protected final String get Raw Part Name String result NON NLS 1 if part instanceof I Workbench Part2 I Workbench Part2 part2 I Workbench Part2 part result Util safe String part2 get Part Name return result  getRawPartName IWorkbenchPart2 IWorkbenchPart2 IWorkbenchPart2 safeString getPartName
protected String compute Part Name return get Raw Part Name  computePartName getRawPartName
Returns the content description for this part return the pane name for the part public String get Content Description return Util safe String content Description  getContentDescription safeString contentDescription
Computes a new content description for the part Subclasses may override to change the default behavior return the new content description for the part protected String compute Content Description return get Raw Content Description  computeContentDescription getRawContentDescription
Returns the content description as set directly by the part or the empty string if none return the unmodified content description from the part or the empty string if none protected final String get Raw Content Description if part instanceof I Workbench Part2 I Workbench Part2 part2 I Workbench Part2 part return part2 get Content Description return NON NLS 1  getRawContentDescription IWorkbenchPart2 IWorkbenchPart2 IWorkbenchPart2 getContentDescription
public boolean is Dirty return false  isDirty
public String get Title return Util safe String title  getTitle safeString
Computes a new title for the part Subclasses may override to change the default behavior return the title for the part protected String compute Title return get Raw Title  computeTitle getRawTitle
Returns the unmodified title for the part or the empty string if none return the unmodified title as set by the I Workbench Part Returns the empty string if none protected final String get Raw Title return Util safe String part get Title  IWorkbenchPart getRawTitle safeString getTitle
public Image get Title Image if part null return part get Title Image if image null return image if image Descriptor null return null Reference Counter image Cache Workbench Images get Image Cache image Image image Cache get image Descriptor if image null image Cache add Ref image Descriptor return image image image Descriptor create Image image Cache put image Descriptor image return image  getTitleImage getTitleImage imageDescriptor ReferenceCounter imageCache WorkbenchImages getImageCache imageCache imageDescriptor imageCache addRef imageDescriptor imageDescriptor createImage imageCache imageDescriptor
private void fire Property Change int id if queue Events queued Events set id return Object listeners prop Change Listeners get Listeners for int i 0 i listeners length i I Property Listener listeners i property Changed part id  firePropertyChange queueEvents queuedEvents propChangeListeners getListeners IPropertyListener propertyChanged
public void set Part I Workbench Part part this part part if part null return part add Property Listener property Change Listener Part Site site Part Site part get Site if site null this pane null site set Pane this pane this pane null Note it might make sense to call refresh From Part here to immediately get the updated values from the part itself However we wait until after the widgetry is created to avoid breaking parts that can t return meaningful values until their widgetry exists  setPart IWorkbenchPart addPropertyListener propertyChangeListener PartSite PartSite getSite setPane refreshFromPart
public void set Pane Part Pane pane if pane null return if part null Part Site site Part Site part get Site if site null site set Pane pane return this pane pane  setPane PartPane PartSite PartSite getSite setPane
public Part Pane get Pane Part Pane result null if part null Part Site part Site Part Site part get Site if part Site null result part Site get Pane if result null result pane return result  PartPane getPane PartPane PartSite partSite PartSite getSite partSite partSite getPane
public void dispose prop Change Listeners clear if image null image Descriptor null Reference Counter image Cache Workbench Images get Image Cache if image null int count image Cache remove Ref image Descriptor if count 0 image dispose image Descriptor null image null if part null part remove Property Listener property Change Listener part dispose part null  propChangeListeners imageDescriptor ReferenceCounter imageCache WorkbenchImages getImageCache imageCache removeRef imageDescriptor imageDescriptor removePropertyListener propertyChangeListener

Create an instance of the Workbench Plugin The workbench plugin is effectively the application for the workbench UI The entire UI operates as a good plugin citizen public Workbench Plugin super inst this  WorkbenchPlugin WorkbenchPlugin
Unload all members This can be used to run a second instance of a workbench since 3 0 void reset editor Registry null if decorator Manager null decorator Manager dispose decorator Manager null Progress Manager shutdown Progress Manager theme Registry null working Set Manager null working Set Registry null preference Manager null if view Registry null view Registry dispose view Registry null if persp Registry null persp Registry dispose persp Registry null action Set Registry null shared Images null product Info null intro Registry null DEBUG false  editorRegistry decoratorManager decoratorManager decoratorManager ProgressManager shutdownProgressManager themeRegistry workingSetManager workingSetRegistry preferenceManager viewRegistry viewRegistry viewRegistry perspRegistry perspRegistry perspRegistry actionSetRegistry sharedImages productInfo introRegistry
Busy Indicator show While null new Runnable public void run try ret 0 element create Executable Extension class Attribute catch Core Exception e exc 0 e  BusyIndicator showWhile createExecutableExtension classAttribute CoreException
Creates an extension If the extension plugin has not been loaded a busy cursor will be activated during the duration of the load param element the config element defining the extension param class Attribute the name of the attribute carrying the class return the extension object throws Core Exception if the extension cannot be created public static Object create Extension final I Configuration Element element final String class Attribute throws Core Exception try If plugin has been loaded create extension Otherwise show busy cursor then create extension if Bundle Utility is Activated element get Declaring Extension get Namespace return element create Executable Extension class Attribute final Object ret new Object 1 final Core Exception exc new Core Exception 1 Busy Indicator show While null new Runnable public void run try ret 0 element create Executable Extension class Attribute catch Core Exception e exc 0 e if exc 0 null throw exc 0 return ret 0 catch Core Exception core throw core catch Exception e throw new Core Exception new Status I Status ERROR PI WORKBENCH I Status ERROR Workbench Messages get String Workbench Plugin extension NON NLS 1 e  classAttribute CoreException createExtension IConfigurationElement classAttribute CoreException BundleUtility isActivated getDeclaringExtension getNamespace createExecutableExtension classAttribute CoreException CoreException BusyIndicator showWhile createExecutableExtension classAttribute CoreException CoreException CoreException IStatus PI_WORKBENCH IStatus WorkbenchMessages getString WorkbenchPlugin
Returns the image registry for this plugin Where are the images The images typically gifs are found in the same plugins directory see Image Registry Note The workbench uses the standard J Face Image Registry to track its images In addition the class Workbench Graphic Resources provides convenience access to the graphics resources and fast field access for some of the commonly used graphical images protected Image Registry create Image Registry return Workbench Images get Image Registry  ImageRegistry JFace ImageRegistry WorkbenchGraphicResources ImageRegistry createImageRegistry WorkbenchImages getImageRegistry
Returns the action set registry for the workbench return the workbench action set registry public Action Set Registry get Action Set Registry if action Set Registry null action Set Registry new Action Set Registry return action Set Registry  ActionSetRegistry getActionSetRegistry actionSetRegistry actionSetRegistry ActionSetRegistry actionSetRegistry
Return the default instance of the receiver This represents the runtime plugin return Workbench Plugin see AbstractUI Plugin for the typical implementation pattern for plugin classes public static Workbench Plugin get Default return inst  WorkbenchPlugin AbstractUIPlugin WorkbenchPlugin getDefault
Answer the manager that maps resource types to a the description of the editor to use return I Editor Registry the editor registry used by this plug in public I Editor Registry get Editor Registry if editor Registry null editor Registry new Editor Registry return editor Registry  IEditorRegistry IEditorRegistry getEditorRegistry editorRegistry editorRegistry EditorRegistry editorRegistry
Answer the element factory for an id or code null code if not found param targetID return public I Element Factory get Element Factory String targetID Get the extension point registry I Extension Point extension Point extension Point Platform get Extension Registry get Extension Point PI WORKBENCH I Workbench Constants PL ELEMENT FACTORY if extension Point null Workbench Plugin log Unable to find element factory Extension point I Workbench Constants PL ELEMENT FACTORY not found NON NLS 2 NON NLS 1 return null Loop through the config elements I Configuration Element target Element null I Configuration Element config Elements extension Point get Configuration Elements for int j 0 j config Elements length j String strID config Elements j get Attribute id NON NLS 1 if targetID equals strID target Element config Elements j break if target Element null log it since we cannot safely display a dialog Workbench Plugin log Unable to find element factory targetID NON NLS 1 return null Create the extension I Element Factory factory null try factory I Element Factory create Extension target Element class NON NLS 1 catch Core Exception e log it since we cannot safely display a dialog Workbench Plugin log Unable to create element factory e get Status NON NLS 1 factory null return factory  IElementFactory getElementFactory IExtensionPoint extensionPoint extensionPoint getExtensionRegistry getExtensionPoint PI_WORKBENCH IWorkbenchConstants PL_ELEMENT_FACTORY extensionPoint WorkbenchPlugin IWorkbenchConstants PL_ELEMENT_FACTORY IConfigurationElement targetElement IConfigurationElement configElements extensionPoint getConfigurationElements configElements configElements getAttribute targetElement configElements targetElement WorkbenchPlugin IElementFactory IElementFactory createExtension targetElement CoreException WorkbenchPlugin getStatus
Returns the presentation factory with the given id or code null code if not found param targetID The id of the presentation factory to use return Abstract Presentation Factory or code null code if not factory matches that id public Abstract Presentation Factory get Presentation Factory String targetID Object o create Extension I Workbench Constants PL PRESENTATION FACTORIES factory targetID NON NLS 1 if o instanceof Abstract Presentation Factory return Abstract Presentation Factory o Workbench Plugin log Error creating presentation factory targetID class is not an Abstract Presentation Factory NON NLS 1 NON NLS 2 return null  AbstractPresentationFactory AbstractPresentationFactory getPresentationFactory createExtension IWorkbenchConstants PL_PRESENTATION_FACTORIES AbstractPresentationFactory AbstractPresentationFactory WorkbenchPlugin AbstractPresentationFactory
Looks up the configuration element with the given id on the given extension point and instantiates the class specified by the class attributes param extension Point Id the extension point id simple id param element Name the name of the configuration element or code null code to match any element param targetID the target id return the instantiated extension object or code null code if not found private Object create Extension String extension Point Id String element Name String targetID I Extension Point extension Point Platform get Extension Registry get Extension Point PI WORKBENCH extension Point Id if extension Point null Workbench Plugin log Unable to find extension Extension point extension Point Id not found NON NLS 1 NON NLS 2 return null Loop through the config elements I Configuration Element target Element null I Configuration Element elements extension Point get Configuration Elements for int j 0 j elements length j I Configuration Element element elements j if element Name null element Name equals element get Name String strID element get Attribute id NON NLS 1 if targetID equals strID target Element element break if target Element null log it since we cannot safely display a dialog Workbench Plugin log Unable to find extension targetID NON NLS 1 in extension point extension Point Id NON NLS 1 return null Create the extension try return create Extension target Element class NON NLS 1 catch Core Exception e log it since we cannot safely display a dialog Workbench Plugin log Unable to create extension targetID NON NLS 1 in extension point extension Point Id NON NLS 1 status e get Status NON NLS 1 return null  extensionPointId elementName createExtension extensionPointId elementName IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint PI_WORKBENCH extensionPointId extensionPoint WorkbenchPlugin extensionPointId IConfigurationElement targetElement IConfigurationElement extensionPoint getConfigurationElements IConfigurationElement elementName elementName getName getAttribute targetElement targetElement WorkbenchPlugin extensionPointId createExtension targetElement CoreException WorkbenchPlugin extensionPointId getStatus
Return the perspective registry return I Perspective Registry The registry for the receiver public I Perspective Registry get Perspective Registry if persp Registry null persp Registry new Perspective Registry persp Registry load return persp Registry  IPerspectiveRegistry IPerspectiveRegistry getPerspectiveRegistry perspRegistry perspRegistry PerspectiveRegistry perspRegistry perspRegistry
Returns the working set manager return the working set manager since 2 0 public I Working Set Manager get Working Set Manager if working Set Manager null working Set Manager new Working Set Manager working Set Manager restore State return working Set Manager  IWorkingSetManager getWorkingSetManager workingSetManager workingSetManager WorkingSetManager workingSetManager restoreState workingSetManager
Returns the working set registry return the working set registry since 2 0 public Working Set Registry get Working Set Registry if working Set Registry null working Set Registry new Working Set Registry working Set Registry load return working Set Registry  WorkingSetRegistry getWorkingSetRegistry workingSetRegistry workingSetRegistry WorkingSetRegistry workingSetRegistry workingSetRegistry
Returns the introduction registry return the introduction registry since 3 0 public I Intro Registry get Intro Registry if intro Registry null intro Registry new Intro Registry Intro Registry Reader reader new Intro Registry Reader reader read Intros Platform get Extension Registry intro Registry return intro Registry  IIntroRegistry getIntroRegistry introRegistry introRegistry IntroRegistry IntroRegistryReader IntroRegistryReader readIntros getExtensionRegistry introRegistry introRegistry
Get the preference manager return Preference Manager the preference manager for the receiver public Preference Manager get Preference Manager if preference Manager null preference Manager new Preference Manager PREFERENCE PAGE CATEGORY SEPARATOR Get the pages from the registry Preference Page Registry Reader registry Reader new Preference Page Registry Reader get Workbench List page Contributions registry Reader get Preference Contributions Platform get Extension Registry Add the contributions to the manager Iterator enum page Contributions iterator while enum has Next preference Manager add To Root I Preference Node enum next return preference Manager  PreferenceManager PreferenceManager getPreferenceManager preferenceManager preferenceManager PreferenceManager PREFERENCE_PAGE_CATEGORY_SEPARATOR PreferencePageRegistryReader registryReader PreferencePageRegistryReader getWorkbench pageContributions registryReader getPreferenceContributions getExtensionRegistry pageContributions hasNext preferenceManager addToRoot IPreferenceNode preferenceManager
Returns the shared images for the workbench return the shared image manager public I Shared Images get Shared Images if shared Images null shared Images new Shared Images return shared Images  ISharedImages getSharedImages sharedImages sharedImages SharedImages sharedImages
Returns the theme registry for the workbench return the theme registry public I Theme Registry get Theme Registry if theme Registry null try theme Registry new Theme Registry Theme Registry Reader reader new Theme Registry Reader reader read Themes Platform get Extension Registry theme Registry catch Core Exception e cannot safely show a dialog so log it Workbench Plugin log Unable to read theme registry e get Status NON NLS 1 return theme Registry  IThemeRegistry getThemeRegistry themeRegistry themeRegistry ThemeRegistry ThemeRegistryReader ThemeRegistryReader readThemes getExtensionRegistry themeRegistry CoreException WorkbenchPlugin getStatus themeRegistry
Answer the view registry return I View Registry the view registry for the receiver public I View Registry get View Registry if view Registry null view Registry new View Registry try View Registry Reader reader new View Registry Reader reader read Views Platform get Extension Registry view Registry catch Core Exception e cannot safely show a dialog so log it Workbench Plugin log Unable to read view registry e get Status NON NLS 1 return view Registry  IViewRegistry IViewRegistry getViewRegistry viewRegistry viewRegistry ViewRegistry ViewRegistryReader ViewRegistryReader readViews getExtensionRegistry viewRegistry CoreException WorkbenchPlugin getStatus viewRegistry
Answer the workbench deprecated Use code PlatformUI get Workbench code instead public I Workbench get Workbench return PlatformUI get Workbench  getWorkbench IWorkbench getWorkbench getWorkbench
Set default preference values This method must be called whenever the preference store is initially loaded because the default values are not stored in the preference store protected void initialize Default Preferences I Preference Store store Do nothing This should not be called Prefs are initialized in Workbench Preference Initializer  initializeDefaultPreferences IPreferenceStore WorkbenchPreferenceInitializer
Log the given status to the ISV log When to use this This should be used when a Plugin Exception or a Extension Exception occur but for which an error dialog cannot be safely shown If you can show an Error Dialog then do so and do not call this method If you have a plugin exception or core exception in hand call log String I Status This convenience method is for internal use by the Workbench only and must not be called outside the workbench This method is supported in the event the log allows plugin related information to be logged 1FTTJKV This would be done by this method This method is internal to the workbench and must not be called by any plugins or examples param message A high level UI message describing when the problem happened public static void log String message get Default get Log log Status Util new Status I Status ERROR message null System err println message 1FTTJKV ITPCORE ALL log status does not allow plugin information to be recorded  PluginException ExtensionException ErrorDialog IStatus getDefault getLog StatusUtil newStatus IStatus
Log the given status to the ISV log When to use this This should be used when a Plugin Exception or a Extension Exception occur but for which an error dialog cannot be safely shown If you can show an Error Dialog then do so and do not call this method This convenience method is for internal use by the workbench only and must not be called outside the workbench This method is supported in the event the log allows plugin related information to be logged 1FTTJKV This would be done by this method This method is internal to the workbench and must not be called by any plugins or examples param message A high level UI message describing when the problem happened May be null param status The status describing the problem Must not be null public static void log String message I Status status 1FTUHE0 ITPCORE ALL API Status logging loss of semantic info if message null get Default get Log log Status Util new Status I Status ERROR message null System err println message n Reason NON NLS 1 get Default get Log log status System err println status get Message 1FTTJKV ITPCORE ALL log status does not allow plugin information to be recorded  PluginException ExtensionException ErrorDialog IStatus getDefault getLog StatusUtil newStatus IStatus nReason getDefault getLog getMessage
param a Workbench the workbench for the receiver deprecated Use code PlatformUI create And Run Workbench code public void set Workbench I Workbench a Workbench Do nothing  aWorkbench createAndRunWorkbench setWorkbench IWorkbench aWorkbench
Get the decorator manager for the receiver return Decorator Manager the decorator manager for the receiver public Decorator Manager get Decorator Manager if this decorator Manager null this decorator Manager new Decorator Manager this decorator Manager restore Listeners return decorator Manager  DecoratorManager DecoratorManager getDecoratorManager decoratorManager decoratorManager DecoratorManager decoratorManager restoreListeners decoratorManager
public void start Bundle Context context throws Exception super start context bundle Context context Policy set Log get Log Start the UI plugin so that it can install the callback in Pref Util which needs to be done as early as possible before the workbench accesses any API preferences Platform get Bundle PlatformUI PLUGIN ID start  BundleContext bundleContext setLog getLog PrefUtil getBundle PLUGIN_ID
Return an array of all bundles contained in this workbench return an array of bundles in the workbench or an empty array if none since 3 0 public Bundle get Bundles return bundle Context null new Bundle 0 bundle Context get Bundles  getBundles bundleContext bundleContext getBundles
Returns the application name p Note this is never shown to the user It is used to initialize the SWT Display On Motif for example this can be used to set the name used for resource lookup p return the application name or code null code see org eclipse swt widgets Display set App Name since 3 0 public String get App Name return get Product Info get App Name  setAppName getAppName getProductInfo getAppName
Returns the name of the product return the product name or code null code if none since 3 0 public String get Product Name return get Product Info get Product Name  getProductName getProductInfo getProductName
Returns the image descriptors for the window image to use for this product return an array of the image descriptors for the window image or code null code if none since 3 0 public Image Descriptor get Window Images return get Product Info get Window Images  ImageDescriptor getWindowImages getProductInfo getWindowImages
Returns an instance that describes this plugin s product formerly primary plugin return Product Info the product info for the receiver private Product Info get Product Info if product Info null product Info new Product Info Platform get Product return product Info  ProductInfo ProductInfo getProductInfo productInfo productInfo ProductInfo getProduct productInfo
see org eclipse ui plugin AbstractUI Plugin stop org osgi framework Bundle Context public void stop Bundle Context context throws Exception super stop context SWT Resource Util shutdown  AbstractUIPlugin BundleContext BundleContext SWTResourceUtil

public void initialize Default Preferences I Preference Store store Workbench Plugin get Default get Preference Store J Face Preferences set Preference Store store store set Default I Preference Constants CLOSE EDITORS ON EXIT false store set Default I Preference Constants SHOULD PROMPT FOR ENABLEMENT true store set Default I Preference Constants EDITORLIST PULLDOWN ACTIVE false store set Default I Preference Constants EDITORLIST DISPLAY FULL NAME false store set Default I Preference Constants STICKY CYCLE false store set Default I Preference Constants REUSE EDITORS BOOLEAN false store set Default I Preference Constants REUSE DIRTY EDITORS true store set Default I Preference Constants REUSE EDITORS 8 store set Default I Preference Constants OPEN ON SINGLE CLICK false store set Default I Preference Constants SELECT ON HOVER false store set Default I Preference Constants OPEN AFTER DELAY false store set Default I Preference Constants RECENT FILES 4 store set Default I Preference Constants VIEW TAB POSITION SWT TOP store set Default I Preference Constants EDITOR TAB POSITION SWT TOP store set Default I Preference Constants SHOW MULTIPLE EDITOR TABS true store set Default I Preference Constants EDITOR TAB WIDTH 3 high store set Default I Preference Constants OPEN VIEW MODE I Preference Constants OVM EMBED store set Default I Preference Constants OPEN PERSP MODE I Preference Constants OPM ACTIVE PAGE store set Default I Preference Constants ENABLED DECORATORS NON NLS 1 store set Default I Preference Constants EDITORLIST SELECTION SCOPE I Preference Constants EDITORLIST SET PAGE SCOPE Current Window store set Default I Preference Constants EDITORLIST SORT CRITERIA I Preference Constants EDITORLIST NAME SORT Name Sort store set Default I Preference Constants COLOR ICONS true store set Default I Preference Constants SHOW SHORTCUT BAR true store set Default I Preference Constants SHOW STATUS LINE true store set Default I Preference Constants SHOW TOOL BAR true store set Default I Preference Constants MULTI KEY ASSIST false store set Default I Preference Constants MULTI KEY ASSIST TIME 1000 Option to show user jobs in a dialog store set Default I Preference Constants RUN IN BACKGROUND false Temporary option to enable wizard for project capability store set Default ENABLE CONFIGURABLE PROJECT WIZARD false NON NLS 1 Temporary option to enable single click store set Default SINGLE CLICK METHOD Open Strategy DOUBLE CLICK NON NLS 1 Temporary option to enable cool bars store set Default ENABLE COOL BARS true NON NLS 1 Temporary option to enable new menu organization store set Default ENABLE NEW MENUS true NON NLS 1 Temporary option to turn off the dialog font store set Default DISABLE DIALOG FONT false NON NLS 1 Set the default theme store set Default I Preference Constants CURRENT THEME ID I Theme Manager DEFAULT THEME store add Property Change Listener new PlatformUI Preference Listener  initializeDefaultPreferences IPreferenceStore WorkbenchPlugin getDefault getPreferenceStore JFacePreferences setPreferenceStore setDefault IPreferenceConstants CLOSE_EDITORS_ON_EXIT setDefault IPreferenceConstants SHOULD_PROMPT_FOR_ENABLEMENT setDefault IPreferenceConstants EDITORLIST_PULLDOWN_ACTIVE setDefault IPreferenceConstants EDITORLIST_DISPLAY_FULL_NAME setDefault IPreferenceConstants STICKY_CYCLE setDefault IPreferenceConstants REUSE_EDITORS_BOOLEAN setDefault IPreferenceConstants REUSE_DIRTY_EDITORS setDefault IPreferenceConstants REUSE_EDITORS setDefault IPreferenceConstants OPEN_ON_SINGLE_CLICK setDefault IPreferenceConstants SELECT_ON_HOVER setDefault IPreferenceConstants OPEN_AFTER_DELAY setDefault IPreferenceConstants RECENT_FILES setDefault IPreferenceConstants VIEW_TAB_POSITION setDefault IPreferenceConstants EDITOR_TAB_POSITION setDefault IPreferenceConstants SHOW_MULTIPLE_EDITOR_TABS setDefault IPreferenceConstants EDITOR_TAB_WIDTH setDefault IPreferenceConstants OPEN_VIEW_MODE IPreferenceConstants OVM_EMBED setDefault IPreferenceConstants OPEN_PERSP_MODE IPreferenceConstants OPM_ACTIVE_PAGE setDefault IPreferenceConstants ENABLED_DECORATORS setDefault IPreferenceConstants EDITORLIST_SELECTION_SCOPE IPreferenceConstants EDITORLIST_SET_PAGE_SCOPE setDefault IPreferenceConstants EDITORLIST_SORT_CRITERIA IPreferenceConstants EDITORLIST_NAME_SORT setDefault IPreferenceConstants COLOR_ICONS setDefault IPreferenceConstants SHOW_SHORTCUT_BAR setDefault IPreferenceConstants SHOW_STATUS_LINE setDefault IPreferenceConstants SHOW_TOOL_BAR setDefault IPreferenceConstants MULTI_KEY_ASSIST setDefault IPreferenceConstants MULTI_KEY_ASSIST_TIME setDefault IPreferenceConstants RUN_IN_BACKGROUND setDefault ENABLE_CONFIGURABLE_PROJECT_WIZARD setDefault SINGLE_CLICK_METHOD OpenStrategy DOUBLE_CLICK setDefault ENABLE_COOL_BARS setDefault ENABLE_NEW_MENUS setDefault DISABLE_DIALOG_FONT setDefault IPreferenceConstants CURRENT_THEME_ID IThemeManager DEFAULT_THEME addPropertyChangeListener PlatformUIPreferenceListener

Remembers that this window contains the given submenu param type the type of submenu one of link NEW WIZARD SUBMENU NEW WIZARD SUBMENU link OPEN PERSPECTIVE SUBMENU OPEN PERSPECTIVE SUBMENU link SHOW VIEW SUBMENU SHOW VIEW SUBMENU see contains Submenu since 3 0 public void add Submenu int type submenus type  NEW_WIZARD_SUBMENU NEW_WIZARD_SUBMENU OPEN_PERSPECTIVE_SUBMENU OPEN_PERSPECTIVE_SUBMENU SHOW_VIEW_SUBMENU SHOW_VIEW_SUBMENU containsSubmenu addSubmenu
Checks to see if this window contains the given type of submenu param type the type of submenu one of link NEW WIZARD SUBMENU NEW WIZARD SUBMENU link OPEN PERSPECTIVE SUBMENU OPEN PERSPECTIVE SUBMENU link SHOW VIEW SUBMENU SHOW VIEW SUBMENU return code true code if window contains submenu code false code otherwise see add Submenu since 3 0 public boolean contains Submenu int type return submenus type 0  NEW_WIZARD_SUBMENU NEW_WIZARD_SUBMENU OPEN_PERSPECTIVE_SUBMENU OPEN_PERSPECTIVE_SUBMENU SHOW_VIEW_SUBMENU SHOW_VIEW_SUBMENU addSubmenu containsSubmenu
Creates and initializes a new workbench window param number the number for the window public Workbench Window int number super null this number number Make sure there is a workbench This call will throw an exception if workbench not created yet PlatformUI get Workbench Add contribution managers that are exposed to other plugins add Menu Bar add Cool Bar SWT FLAT add Status Line action Presentation new Action Presentation this let the application do further configuration get Advisor pre Window Open get Window Configurer set the shell style set Shell Style get Window Configurer get Shell Style Fill the action bars fill Action Bars get Window Configurer get Action Bar Configurer FILL ALL ACTION BARS  WorkbenchWindow getWorkbench addMenuBar addCoolBar addStatusLine actionPresentation ActionPresentation getAdvisor preWindowOpen getWindowConfigurer setShellStyle getWindowConfigurer getShellStyle fillActionBars getWindowConfigurer getActionBarConfigurer FILL_ALL_ACTION_BARS
Return the style bits for the shortcut bar return int protected int perspective Bar Style return SWT FLAT SWT WRAP SWT RIGHT SWT HORIZONTAL  perspectiveBarStyle
void register Action Sets I Action Set action Sets Remove the old handlers and dispose them final Iterator old Handler Itr action Set Handlers By Command Id values iterator while old Handler Itr has Next I Handler old Handler Itr next dispose action Set Handlers By Command Id clear For each action in each action create a new action handler If there are duplicates then dispose of the earlier handler before clobbering it This avoids memory leaks for int i 0 i action Sets length i if action Sets i instanceof Plugin Action Set Plugin Action Set plugin Action Set Plugin Action Set action Sets i I Action plugin Actions plugin Action Set get Plugin Actions for int j 0 j plugin Actions length j I Action plugin Action plugin Actions j String command Id plugin Action get Action Definition Id if command Id null final Object value action Set Handlers By Command Id get command Id if value instanceof I Handler This handler is about to get clobbered so dispose it I Handler value dispose action Set Handlers By Command Id put command Id new Action Handler plugin Action Submit the new amalgamated list of action set handlers and global handlers submit Action Set And Global Handlers  registerActionSets IActionSet actionSets oldHandlerItr actionSetHandlersByCommandId oldHandlerItr hasNext IHandler oldHandlerItr actionSetHandlersByCommandId actionSets actionSets PluginActionSet PluginActionSet pluginActionSet PluginActionSet actionSets IAction pluginActions pluginActionSet getPluginActions pluginActions IAction pluginAction pluginActions commandId pluginAction getActionDefinitionId commandId actionSetHandlersByCommandId commandId IHandler IHandler actionSetHandlersByCommandId commandId ActionHandler pluginAction submitActionSetAndGlobalHandlers
void register Global Action I Action global Action String command Id global Action get Action Definition Id if command Id null final Object value global Action Handlers By Command Id get command Id if value instanceof Action Handler This handler is about to get clobbered so dispose it final Action Handler handler Action Handler value handler dispose global Action Handlers By Command Id put command Id new Action Handler global Action submit Action Set And Global Handlers  registerGlobalAction IAction globalAction commandId globalAction getActionDefinitionId commandId globalActionHandlersByCommandId commandId ActionHandler ActionHandler ActionHandler globalActionHandlersByCommandId commandId ActionHandler globalAction submitActionSetAndGlobalHandlers
p Submits the action handlers for action set actions and global actions Global actions are given priority so that if a global action and an action set action both handle the same command the global action is given priority p p These submissions are submitted as code Priority LEGACY code which means that they are the lowest priority This means that if a higher priority submission handles the same command under the same conditions that that submission will become the handler p void submit Action Set And Global Handlers Mash the action sets and global actions together with global actions taking priority Map handlers By Command Id new Hash Map handlers By Command Id put All action Set Handlers By Command Id handlers By Command Id put All global Action Handlers By Command Id Create a low priority submission for each handler final List new Handler Submissions new Array List final Shell shell get Shell if shell null for Iterator iterator handlers By Command Id entry Set iterator iterator has Next Map Entry entry Map Entry iterator next String command Id String entry get Key I Handler handler I Handler entry get Value new Handler Submissions add new Handler Submission null shell null command Id handler Priority LEGACY Remove the old submissions and the add the new ones final I Workbench Command Support command Support Workbench get Instance get Command Support command Support remove Handler Submissions handler Submissions handler Submissions new Handler Submissions command Support add Handler Submissions new Handler Submissions  submitActionSetAndGlobalHandlers handlersByCommandId HashMap handlersByCommandId putAll actionSetHandlersByCommandId handlersByCommandId putAll globalActionHandlersByCommandId newHandlerSubmissions ArrayList getShell handlersByCommandId entrySet hasNext commandId getKey IHandler IHandler getValue newHandlerSubmissions HandlerSubmission commandId IWorkbenchCommandSupport commandSupport getInstance getCommandSupport commandSupport removeHandlerSubmissions handlerSubmissions handlerSubmissions newHandlerSubmissions commandSupport addHandlerSubmissions newHandlerSubmissions
Adds an listener to the part service public void add Page Listener I Page Listener l page Listeners add Page Listener l  addPageListener IPageListener pageListeners addPageListener
NOTE Internally please use get Perspective Service instead public void add Perspective Listener org eclipse ui I Perspective Listener l perspective Listeners add Perspective Listener l  getPerspectiveService addPerspectiveListener IPerspectiveListener perspectiveListeners addPerspectiveListener
add a shortcut for the page void add Perspective Shortcut I Perspective Descriptor perspective Workbench Page workbench Page if perspective Switcher null perspective Switcher add Perspective Shortcut perspective workbench Page  addPerspectiveShortcut IPerspectiveDescriptor WorkbenchPage workbenchPage perspectiveSwitcher perspectiveSwitcher addPerspectiveShortcut workbenchPage
Configures this window to have a perspecive bar Does nothing if it already has one protected void add Perspective Bar int style Assert is True perspective Switcher null perspective Switcher new Perspective Switcher this top Bar style  addPerspectiveBar isTrue perspectiveSwitcher perspectiveSwitcher PerspectiveSwitcher topBar
Close the window Assumes that busy cursor is active private boolean busy Close Whether the window was actually closed or not boolean window Closed false Setup internal flags to indicate window is in progress of closing and no update should be done closing true update Disabled true try Only do the check if it is OK to close if we are not closing via the workbench as the workbench will check this itself Workbench workbench get Workbench Impl int count workbench get Workbench Window Count also check for starting if the first window dies on startup then we ll need to open a default window if workbench is Starting workbench is Closing count 1 window Closed workbench close else if ok To Close window Closed hard Close finally if window Closed Reset the internal flags if window was not closed closing false update Disabled false return window Closed  busyClose windowClosed updateDisabled getWorkbenchImpl getWorkbenchWindowCount isStarting isClosing windowClosed okToClose windowClosed hardClose windowClosed updateDisabled windowClosed
Opens a new page Assumes that busy cursor is active p b Note b Since release 2 0 a window is limited to contain at most one page If a page exist in the window when this method is used then another window is created for the new page Callers are strongly recommended to use the code I Workbench open Perspective code AP Is to programmatically show a perspective p protected I Workbench Page busy Open Page String perspID I Adaptable input throws Workbench Exception I Workbench Page new Page null if page List is Empty new Page new Workbench Page this perspID input page List add new Page fire Page Opened new Page set Active Page new Page else I Workbench Window window get Workbench open Workbench Window perspID input new Page window get Active Page return new Page  IWorkbench openPerspective APIs IWorkbenchPage busyOpenPage IAdaptable WorkbenchException IWorkbenchPage newPage pageList isEmpty newPage WorkbenchPage pageList newPage firePageOpened newPage setActivePage newPage IWorkbenchWindow getWorkbench openWorkbenchWindow newPage getActivePage newPage
see Window public int open get Advisor post Window Create get Window Configurer get Advisor open Intro get Window Configurer int result super open get Workbench Impl fire Window Opened this get Advisor post Window Open get Window Configurer if perspective Switcher null perspective Switcher update Perspective Bar return result  getAdvisor postWindowCreate getWindowConfigurer getAdvisor openIntro getWindowConfigurer getWorkbenchImpl fireWindowOpened getAdvisor postWindowOpen getWindowConfigurer perspectiveSwitcher perspectiveSwitcher updatePerspectiveBar
protected boolean can Handle Shell Close Event if super can Handle Shell Close Event return false let the advisor veto the user s explicit request to close the window return get Advisor pre Window Shell Close get Window Configurer  canHandleShellCloseEvent canHandleShellCloseEvent getAdvisor preWindowShellClose getWindowConfigurer
final boolean ret new boolean 1 Busy Indicator show While null new Runnable public void run ret 0 busy Close  BusyIndicator showWhile busyClose
see I Workbench Window public boolean close final boolean ret new boolean 1 Busy Indicator show While null new Runnable public void run ret 0 busy Close return ret 0  IWorkbenchWindow BusyIndicator showWhile busyClose
protected boolean is Closing return closing get Workbench Impl is Closing  isClosing getWorkbenchImpl isClosing
Return whether or not the coolbar layout is locked protected boolean is Cool Bar Locked return get Cool Bar Manager get Lock Layout  isCoolBarLocked getCoolBarManager getLockLayout
Close all of the pages private void close All Pages Deactivate active page set Active Page null Clone and deref all so that calls to get Pages returns empty list if call by page Closed event handlers Page List old List page List page List new Page List Close all Iterator enum old List iterator while enum has Next Workbench Page page Workbench Page enum next fire Page Closed page page dispose if closing show Empty Window Message  closeAllPages setActivePage getPages pageClosed PageList oldList pageList pageList PageList oldList hasNext WorkbenchPage WorkbenchPage firePageClosed showEmptyWindowMessage
Save and close all of the pages public void close All Pages boolean save if save boolean ret save All Pages true if ret return close All Pages  closeAllPages saveAllPages closeAllPages
close Perspective method comment protected boolean close Page I Workbench Page in boolean save Validate the input if page List contains in return false Workbench Page old Page Workbench Page in Save old perspective if save old Page is Save Needed if old Page save All Editors true return false If old page is activate deactivate boolean old Is Active old Page get Active Workbench Page if old Is Active set Active Page null Close old page page List remove old Page fire Page Closed old Page old Page dispose Activate new page if old Is Active I Workbench Page new Page page List get Next Active if new Page null set Active Page new Page if closing page List is Empty show Empty Window Message return true  closePerspective closePage IWorkbenchPage pageList WorkbenchPage oldPage WorkbenchPage oldPage isSaveNeeded oldPage saveAllEditors oldIsActive oldPage getActiveWorkbenchPage oldIsActive setActivePage pageList oldPage firePageClosed oldPage oldPage oldIsActive IWorkbenchPage newPage pageList getNextActive newPage setActivePage newPage pageList isEmpty showEmptyWindowMessage
private void show Empty Window Message Composite parent get Page Composite if no Open Perspective null no Open Perspective new Label parent SWT NONE no Open Perspective set Text Workbench Messages get String Workbench Window no Perspective NON NLS 1 no Open Perspective set Bounds parent get Client Area  showEmptyWindowMessage getPageComposite noOpenPerspective noOpenPerspective noOpenPerspective setText WorkbenchMessages getString WorkbenchWindow noPerspective noOpenPerspective setBounds getClientArea
protected void configure Shell Shell shell super configure Shell shell String title get Window Configurer basic Get Title if title null shell set Text title Workbench Help set Help shell I Help Context Ids WORKBENCH WINDOW get Workbench get Context Support register Shell shell I Workbench Context Support TYPE WINDOW track Shell Activation shell track Shell Resize shell  configureShell configureShell getWindowConfigurer basicGetTitle setText WorkbenchHelp setHelp IHelpContextIds WORKBENCH_WINDOW getWorkbench getContextSupport registerShell IWorkbenchContextSupport TYPE_WINDOW trackShellActivation trackShellResize
see org eclipse jface window Application Window create Trim Widgets org eclipse swt widgets Shell protected void create Trim Widgets Shell shell do nothing trim widgets are created in create Default Contents  ApplicationWindow createTrimWidgets createTrimWidgets createDefaultContents
Creates and remembers the client composite under which workbench pages create their controls since 3 0 protected Composite create Page Composite Composite parent page Composite new Composite parent SWT NONE return page Composite  createPageComposite pageComposite pageComposite
Creates the contents of the workbench window including trim controls and the client composite This MUST create the client composite via a call to code create Client Composite code since 3 0 protected Control create Contents Composite parent we know from Window create that the parent is a Shell get Advisor create Window Contents get Window Configurer Shell parent the page composite must be set by create Window Contents Assert is Not Null page Composite create Window Contents must call configurer create Page Composite NON NLS 1 return page Composite  createClientComposite createContents getAdvisor createWindowContents getWindowConfigurer createWindowContents isNotNull pageComposite createWindowContents createPageComposite pageComposite
If the perspective bar is drawn on the top right corner of the window then this method changes its appearance from curved to square This should have its own preference but for now it piggy backs on the SHOW TRADITIONAL STYLE TABS preference param square true for a square banner and false otherwise public void set Banner Curve boolean square if top Bar null top Bar set Simple square  SHOW_TRADITIONAL_STYLE_TABS setBannerCurve topBar topBar setSimple
Creates the default contents and layout of the shell param shell the shell protected void create Default Contents final Shell shell default Layout new Trim Layout default Layout set Spacing 5 5 2 2 shell set Layout default Layout Menu menu Bar get Menu Bar Manager create Menu Bar shell if get Window Configurer get Show Menu Bar shell set Menu Bar menu Bar Create the C Banner widget which parents both the Coolbar and the perspective switcher and supports some configurations on the left right and bottom top Bar new C Banner shell SWT NONE the banner gets a curve along with the new tab style TODO create a dedicated preference for this set Banner Curve Pref Util getAPI Preference Store get Boolean I Workbench Preference Constants SHOW TRADITIONAL STYLE TABS Cache Wrapper coolbar Cache Wrapper new Cache Wrapper top Bar final Control cool Bar create Cool Bar Control coolbar Cache Wrapper get Control need to resize the shell not just the coolbar s immediate parent if the coolbar wants to grow or shrink cool Bar add Listener SWT Resize new Listener public void handle Event Event event If the user is dragging the sash then we will need to force a resize However if the coolbar was resized programatically then everything is already layed out correctly There is no direct way to tell the difference between these cases however we take advantage of the fact that dragging the sash does not change the size of the shell and only force another layout if the shell size is unchanged Rectangle client Area shell get Client Area if last Shell Size x client Area width last Shell Size y client Area height Layout Util resize cool Bar last Shell Size x client Area width last Shell Size y client Area height if get Window Configurer get Show Cool Bar top Bar set Left coolbar Cache Wrapper get Control create Status Line shell fast View Bar new Fast View Bar this fast View Bar create Control shell if get Window Configurer get Show Perspective Bar add Perspective Bar perspective Bar Style perspective Switcher create Control shell create Progress Indicator shell trim Drop Target new Trim Drop Target shell this Drag Util add Drag Target shell trim Drop Target Create the client composite area where page content goes create Page Composite shell set Layout Data For Contents  createDefaultContents defaultLayout TrimLayout defaultLayout setSpacing setLayout defaultLayout menuBar getMenuBarManager createMenuBar getWindowConfigurer getShowMenuBar setMenuBar menuBar CBanner topBar CBanner setBannerCurve PrefUtil getAPIPreferenceStore getBoolean IWorkbenchPreferenceConstants SHOW_TRADITIONAL_STYLE_TABS CacheWrapper coolbarCacheWrapper CacheWrapper topBar coolBar createCoolBarControl coolbarCacheWrapper getControl coolBar addListener handleEvent clientArea getClientArea lastShellSize clientArea lastShellSize clientArea LayoutUtil coolBar lastShellSize clientArea lastShellSize clientArea getWindowConfigurer getShowCoolBar topBar setLeft coolbarCacheWrapper getControl createStatusLine fastViewBar FastViewBar fastViewBar createControl getWindowConfigurer getShowPerspectiveBar addPerspectiveBar perspectiveBarStyle perspectiveSwitcher createControl createProgressIndicator trimDropTarget TrimDropTarget DragUtil addDragTarget trimDropTarget createPageComposite setLayoutDataForContents
public void set Perspective Bar Location String location if perspective Switcher null perspective Switcher set Perspective Bar Location location  setPerspectiveBarLocation perspectiveSwitcher perspectiveSwitcher setPerspectiveBarLocation
Returns the shortcut for a page protected I Contribution Item find Perspective Shortcut I Perspective Descriptor perspective Workbench Page page return perspective Switcher null null perspective Switcher find Perspective Shortcut perspective page  IContributionItem findPerspectiveShortcut IPerspectiveDescriptor WorkbenchPage perspectiveSwitcher perspectiveSwitcher findPerspectiveShortcut
Fires page activated private void fire Page Activated I Workbench Page page page Listeners fire Page Activated page part Service page Activated page  firePageActivated IWorkbenchPage pageListeners firePageActivated partService pageActivated
Fires page closed private void fire Page Closed I Workbench Page page page Listeners fire Page Closed page part Service page Closed page  firePageClosed IWorkbenchPage pageListeners firePageClosed partService pageClosed
Fires page opened private void fire Page Opened I Workbench Page page page Listeners fire Page Opened page part Service page Opened page  firePageOpened IWorkbenchPage pageListeners firePageOpened partService pageOpened
Fires perspective activated void fire Perspective Activated I Workbench Page page I Perspective Descriptor perspective perspective Listeners fire Perspective Activated page perspective perspective Service fire Perspective Activated page perspective  firePerspectiveActivated IWorkbenchPage IPerspectiveDescriptor perspectiveListeners firePerspectiveActivated perspectiveService firePerspectiveActivated
Fires perspective changed void fire Perspective Changed I Workbench Page page I Perspective Descriptor perspective String change Id perspective Listeners fire Perspective Changed page perspective change Id perspective Service fire Perspective Changed page perspective change Id  firePerspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId perspectiveListeners firePerspectiveChanged changeId perspectiveService firePerspectiveChanged changeId
Fires perspective changed for an affected part void fire Perspective Changed I Workbench Page page I Perspective Descriptor perspective I Workbench Part Reference part Ref String change Id perspective Listeners fire Perspective Changed page perspective part Ref change Id  firePerspectiveChanged IWorkbenchPage IPerspectiveDescriptor IWorkbenchPartReference partRef changeId perspectiveListeners firePerspectiveChanged partRef changeId
Fires perspective closed void fire Perspective Closed I Workbench Page page I Perspective Descriptor perspective perspective Service fire Perspective Closed page perspective  firePerspectiveClosed IWorkbenchPage IPerspectiveDescriptor perspectiveService firePerspectiveClosed
Fires perspective opened void fire Perspective Opened I Workbench Page page I Perspective Descriptor perspective perspective Service fire Perspective Opened page perspective  firePerspectiveOpened IWorkbenchPage IPerspectiveDescriptor perspectiveService firePerspectiveOpened
Returns the action bars for this window public W Win Action Bars get Action Bars if action Bars null action Bars new W Win Action Bars this return action Bars  WWinActionBars getActionBars actionBars actionBars WWinActionBars actionBars
Returns the active page return the active page public I Workbench Page get Active Page return page List get Active  IWorkbenchPage getActivePage pageList getActive
Returns the active workbench page return the active workbench page package Workbench Page get Active Workbench Page return page List get Active  WorkbenchPage getActiveWorkbenchPage pageList getActive
Returns the page composite under which the window s pages create their controls protected Composite get Page Composite return page Composite  getPageComposite pageComposite
Answer the menu manager for this window public Menu Manager get Menu Manager return get Menu Bar Manager  MenuManager getMenuManager getMenuBarManager
Returns the number This corresponds to a page number in a window or a window number in the workbench public int get Number return number  getNumber
Returns an array of the pages in the workbench window return an array of pages public I Workbench Page get Pages return page List get Pages  IWorkbenchPage getPages pageList getPages
see I Workbench Window public I Part Service get Part Service return part Service  IWorkbenchWindow IPartService getPartService partService
Returns the layout for the shell return the layout for the shell protected Layout get Layout return null  getLayout
see I Workbench Window public I Perspective Service get Perspective Service return perspective Service  IWorkbenchWindow IPerspectiveService getPerspectiveService perspectiveService
see I Workbench Window public I Selection Service get Selection Service return part Service get Selection Service  IWorkbenchWindow ISelectionService getSelectionService partService getSelectionService
Returns code true code when the window s shell is activated code false code when it s shell is deactivated return boolean code true code when shell activated code false code when shell deactivated public boolean get Shell Activated return shell Activated  getShellActivated shellActivated
Returns the status line manager for this window if it has one return the status line manager or code null code if this window does not have a status line see add Status Line public Status Line Manager get Status Line Manager return super get Status Line Manager  addStatusLine StatusLineManager getStatusLineManager getStatusLineManager
see I Workbench Window public I Workbench get Workbench return PlatformUI get Workbench  IWorkbenchWindow IWorkbench getWorkbench getWorkbench
public String get Toolbar Label String action Set Id Action Set Registry registry Workbench Plugin get Default get Action Set Registry I Action Set Descriptor action Set registry find Action Set action Set Id if action Set null return action Set get Label else if I Workbench Action Constants TOOLBAR FILE equals Ignore Case action Set Id return Workbench Messages get String Workbench Window File Toolbar NON NLS 1 if I Workbench Action Constants TOOLBAR NAVIGATE equals Ignore Case action Set Id return Workbench Messages get String Workbench Window Navigate Toolbar NON NLS 1 return null  getToolbarLabel actionSetId ActionSetRegistry WorkbenchPlugin getDefault getActionSetRegistry IActionSetDescriptor actionSet findActionSet actionSetId actionSet actionSet getLabel IWorkbenchActionConstants TOOLBAR_FILE equalsIgnoreCase actionSetId WorkbenchMessages getString WorkbenchWindow FileToolbar IWorkbenchActionConstants TOOLBAR_NAVIGATE equalsIgnoreCase actionSetId WorkbenchMessages getString WorkbenchWindow NavigateToolbar
Unconditionally close this window Assumes the proper flags have been set correctly e i closing and update Disabled private boolean hard Close boolean result try Clear the action sets fix for bug 27416 action Presentation clear Action Sets Remove the handler submissions Bug 64024 final I Workbench workbench get Workbench final I Workbench Command Support command Support workbench get Command Support command Support remove Handler Submissions handler Submissions final Iterator submission Itr handler Submissions iterator while submission Itr has Next final Handler Submission submission Handler Submission submission Itr next submission get Handler dispose handler Submissions clear action Set Handlers By Command Id clear global Action Handlers By Command Id clear Remove the enabled submissions Bug 64024 final I Workbench Context Support context Support workbench get Context Support context Support unregister Shell get Shell close All Pages let the application do further deconfiguration get Advisor post Window Close get Window Configurer get Workbench Impl fire Window Closed this Null out the progress region Bug 64024 progress Region null finally result super close return result  updateDisabled hardClose actionPresentation clearActionSets IWorkbench getWorkbench IWorkbenchCommandSupport commandSupport getCommandSupport commandSupport removeHandlerSubmissions handlerSubmissions submissionItr handlerSubmissions submissionItr hasNext HandlerSubmission HandlerSubmission submissionItr getHandler handlerSubmissions actionSetHandlersByCommandId globalActionHandlersByCommandId IWorkbenchContextSupport contextSupport getContextSupport contextSupport unregisterShell getShell closeAllPages getAdvisor postWindowClose getWindowConfigurer getWorkbenchImpl fireWindowClosed progressRegion
see I Workbench Window public boolean is Application Menu String menuID delegate this question to the workbench advisor return get Advisor is Application Menu get Window Configurer menuID  IWorkbenchWindow isApplicationMenu getAdvisor isApplicationMenu getWindowConfigurer
Return whether or not the given id matches the id of the coolitems that the application creates package boolean is Workbench Cool Item Id String id return window Configurer contains Cool Item id  isWorkbenchCoolItemId windowConfigurer containsCoolItem
Locks unlocks the Cool Bar for the workbench param lock whether the Cool Bar should be locked or unlocked package void lock Cool Bar boolean lock get Cool Bar Manager set Lock Layout lock  CoolBar CoolBar lockCoolBar getCoolBarManager setLockLayout
Called when this window is about to be closed Subclasses may overide to add code that returns code false code to prevent closing under certain conditions public boolean ok To Close Save all of the editors if get Workbench Impl is Closing if save All Pages true return false return true  okToClose getWorkbenchImpl isClosing saveAllPages
Busy Indicator show While null new Runnable public void run try result 0 busy Open Page persp Id input catch Workbench Exception e result 0 e  BusyIndicator showWhile busyOpenPage perspId WorkbenchException
Opens a new page p b Note b Since release 2 0 a window is limited to contain at most one page If a page exist in the window when this method is used then another window is created for the new page Callers are strongly recommended to use the code I Workbench open Perspective code AP Is to programmatically show a perspective p public I Workbench Page open Page final String persp Id final I Adaptable input throws Workbench Exception Assert is Not Null persp Id Run op in busy cursor final Object result new Object 1 Busy Indicator show While null new Runnable public void run try result 0 busy Open Page persp Id input catch Workbench Exception e result 0 e if result 0 instanceof I Workbench Page return I Workbench Page result 0 else if result 0 instanceof Workbench Exception throw Workbench Exception result 0 else throw new Workbench Exception Workbench Messages get String Workbench Window exception Message NON NLS 1  IWorkbench openPerspective APIs IWorkbenchPage openPage perspId IAdaptable WorkbenchException isNotNull perspId BusyIndicator showWhile busyOpenPage perspId WorkbenchException IWorkbenchPage IWorkbenchPage WorkbenchException WorkbenchException WorkbenchException WorkbenchMessages getString WorkbenchWindow exceptionMessage
Opens a new page p b Note b Since release 2 0 a window is limited to contain at most one page If a page exist in the window when this method is used then another window is created for the new page Callers are strongly recommended to use the code I Workbench open Perspective code AP Is to programmatically show a perspective p public I Workbench Page open Page I Adaptable input throws Workbench Exception String persp Id get Workbench Impl get Perspective Registry get Default Perspective return open Page persp Id input  IWorkbench openPerspective APIs IWorkbenchPage openPage IAdaptable WorkbenchException perspId getWorkbenchImpl getPerspectiveRegistry getDefaultPerspective openPage perspId
Removes an listener from the part service public void remove Page Listener I Page Listener l page Listeners remove Page Listener l  removePageListener IPageListener pageListeners removePageListener
NOTE Internally please use get Perspective Service instead public void remove Perspective Listener org eclipse ui I Perspective Listener l perspective Listeners remove Perspective Listener l  getPerspectiveService removePerspectiveListener IPerspectiveListener perspectiveListeners removePerspectiveListener
Remove the shortcut for a page package void remove Perspective Shortcut I Perspective Descriptor perspective Workbench Page page if perspective Switcher null perspective Switcher remove Perspective Shortcut perspective page  removePerspectiveShortcut IPerspectiveDescriptor WorkbenchPage perspectiveSwitcher perspectiveSwitcher removePerspectiveShortcut
private I Status unable To Restore Page I Memento page Mem String page Name page Mem get String I Workbench Constants TAG LABEL if page Name null page Name NON NLS 1 return new Status I Status ERROR PlatformUI PLUGIN ID 0 Workbench Messages format Workbench Window unable To Restore Perspective new String page Name NON NLS 1 null  IStatus unableToRestorePage IMemento pageMem pageName pageMem getString IWorkbenchConstants TAG_LABEL pageName pageName IStatus PLUGIN_ID WorkbenchMessages WorkbenchWindow unableToRestorePerspective pageName
see I Persistable public I Status restore State I Memento memento I Perspective Descriptor active Descriptor Assert is Not Null get Shell Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Workbench Window problems Restoring Window null NON NLS 1 Read window s bounds and state Rectangle display Bounds get Shell get Display get Bounds Rectangle shell Bounds new Rectangle 0 0 0 0 I Memento fast View Mem memento get Child I Workbench Constants TAG FAST VIEW DATA if fast View Mem null if fast View Bar null fast View Bar restore State fast View Mem Integer big Int memento get Integer I Workbench Constants TAG X shell Bounds x big Int null 0 big Int int Value big Int memento get Integer I Workbench Constants TAG Y shell Bounds y big Int null 0 big Int int Value big Int memento get Integer I Workbench Constants TAG WIDTH shell Bounds width big Int null 0 big Int int Value big Int memento get Integer I Workbench Constants TAG HEIGHT shell Bounds height big Int null 0 big Int int Value if shell Bounds is Empty if shell Bounds intersects display Bounds Rectangle client Area get Shell get Display get Client Area shell Bounds x client Area x shell Bounds y client Area y get Shell set Bounds shell Bounds if true equals memento get String I Workbench Constants TAG MAXIMIZED NON NLS 1 get Shell set Maximized true if true equals memento get String I Workbench Constants TAG MINIMIZED NON NLS 1 get Shell set Minimized true restore the width of the perspective bar if perspective Switcher null perspective Switcher restore State memento Restore the cool bar order by creating all the tool bar contribution items This needs to be done before pages are created to ensure proper canonical creation of cool items if get Cool Bar Manager null Cool Bar Manager cool Bar Mgr get Cool Bar Manager I Memento cool Bar Mem memento get Child I Workbench Constants TAG COOLBAR LAYOUT if cool Bar Mem null Check if the layout is locked Integer locked Int cool Bar Mem get Integer I Workbench Constants TAG LOCKED if locked Int null locked Int int Value 1 cool Bar Mgr set Lock Layout true else cool Bar Mgr set Lock Layout false The new layout of the cool bar manager Array List cool Bar Layout new Array List Traverse through all the cool item in the memento I Memento contribution Mems cool Bar Mem get Children I Workbench Constants TAG COOLITEM for int i 0 i contribution Mems length i I Memento contribution Mem contribution Mems i String type contribution Mem get String I Workbench Constants TAG ITEM TYPE if type null Do not recognize that type continue String id contribution Mem get String I Workbench Constants TAG ID Prevent duplicate items from being read back in I Contribution Item existing Item cool Bar Mgr find id if id null existing Item null if Policy DEBUG TOOLBAR DISPOSAL System out println Not loading duplicate cool bar item id NON NLS 1 cool Bar Layout add existing Item continue I Contribution Item new Item null if type equals I Workbench Constants TAG TYPE SEPARATOR if id null new Item new Separator id else new Item new Separator else if id null if type equals I Workbench Constants TAG TYPE GROUPMARKER new Item new Group Marker id else if type equals I Workbench Constants TAG TYPE TOOLBARCONTRIBUTION type equals I Workbench Constants TAG TYPE PLACEHOLDER Get Width and height Integer width contribution Mem get Integer I Workbench Constants TAG ITEM X Integer height contribution Mem get Integer I Workbench Constants TAG ITEM Y Look for the object in the current cool bar manager I Contribution Item old Item cool Bar Mgr find id If a tool bar contribution item already exists for this id then use the old object if old Item null new Item old Item else new Item new Tool Bar Contribution Item new Tool Bar Manager cool Bar Mgr get Style id if type equals I Workbench Constants TAG TYPE PLACEHOLDER Tool Bar Contribution Item new Tool Bar Item Tool Bar Contribution Item new Item if height null new Tool Bar Item set Current Height height int Value if width null new Tool Bar Item set Current Width width int Value new Item new Placeholder Contribution Item new Tool Bar Item make it invisible by default new Item set Visible false Need to add the item to the cool bar manager so that its canonical order can be preserved I Contribution Item ref Item find Alphabetical Order I Workbench Action Constants MB ADDITIONS id cool Bar Mgr if ref Item null cool Bar Mgr insert After ref Item get Id new Item else cool Bar Mgr add new Item Set the current height and width if width null new Item instanceof Tool Bar Contribution Item Tool Bar Contribution Item new Item set Current Width width int Value if height null new Item instanceof Tool Bar Contribution Item Tool Bar Contribution Item new Item set Current Height height int Value Add new item into cool bar manager if new Item null cool Bar Layout add new Item new Item set Parent cool Bar Mgr cool Bar Mgr mark Dirty We need to check if we have everything we need in the layout final Array List final Layout new Array List I Contribution Item existing Items cool Bar Mgr get Items for int i 0 i existing Items length i I Contribution Item existing Item existing Items i This line shouldn t be necessary but is here for robustness if existing Item null continue boolean found false Iterator layout Item Itr cool Bar Layout iterator while layout Item Itr has Next I Contribution Item layout Item I Contribution Item layout Item Itr next if layout Item null layout Item equals existing Item found true break if found if existing Item null final Layout add existing Item Set the cool bar layout to the given layout final Layout add All cool Bar Layout I Contribution Item items To Set new I Contribution Item final Layout size final Layout to Array items To Set cool Bar Mgr set Items items To Set else For older workbenchs cool Bar Mem memento get Child I Workbench Constants TAG TOOLBAR LAYOUT if cool Bar Mem null Restore an older layout restore Old Cool Bar cool Bar Mem Recreate each page in the window I Workbench Page new Active Page null I Memento page Array memento get Children I Workbench Constants TAG PAGE for int i 0 i page Array length i I Memento page Mem page Array i String str Focus page Mem get String I Workbench Constants TAG FOCUS if str Focus null str Focus length 0 continue Get the input factory I Adaptable input null I Memento input Mem page Mem get Child I Workbench Constants TAG INPUT if input Mem null String factoryID input Mem get String I Workbench Constants TAG FACTORY ID if factoryID null Workbench Plugin log Unable to restore page no input factory ID NON NLS 1 result add unable To Restore Page page Mem continue try UI Stats start UI Stats RESTORE WORKBENCH Workbench Page Factory NON NLS 1 I Element Factory factory PlatformUI get Workbench get Element Factory factoryID if factory null Workbench Plugin log Unable to restore page cannot instantiate input factory factoryID NON NLS 1 result add unable To Restore Page page Mem continue Get the input element input factory create Element input Mem if input null Workbench Plugin log Unable to restore page cannot instantiate input element factoryID NON NLS 1 result add unable To Restore Page page Mem continue finally UI Stats end UI Stats RESTORE WORKBENCH Workbench Page Factory NON NLS 1 Open the perspective Workbench Page new Page null try new Page new Workbench Page this input result add new Page restore State page Mem active Descriptor page List add new Page fire Page Opened new Page catch Workbench Exception e Workbench Plugin log Unable to restore perspective constructor failed NON NLS 1 result add e get Status continue if str Focus null str Focus length 0 new Active Page new Page If there are no pages create a default if page List is Empty try String def PerspID get Workbench Impl get Perspective Registry get Default Perspective Workbench Page new Page new Workbench Page this def PerspID get Advisor get Default Page Input page List add new Page fire Page Opened new Page catch Workbench Exception e Workbench Plugin log Unable to create default perspective constructor failed NON NLS 1 result add e get Status String product Name Workbench Plugin get Default get Product Name if product Name null product Name NON NLS 1 get Shell set Text product Name Set active page if new Active Page null new Active Page page List get Next Active set Active Page new Active Page I Memento intro Mem memento get Child I Workbench Constants TAG INTRO if intro Mem null get Workbench get Intro Manager show Intro this Boolean value Of intro Mem get String I Workbench Constants TAG STANDBY boolean Value return result  IPersistable IStatus restoreState IMemento IPerspectiveDescriptor activeDescriptor isNotNull getShell MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString WorkbenchWindow problemsRestoringWindow displayBounds getShell getDisplay getBounds shellBounds IMemento fastViewMem getChild IWorkbenchConstants TAG_FAST_VIEW_DATA fastViewMem fastViewBar fastViewBar restoreState fastViewMem bigInt getInteger IWorkbenchConstants TAG_X shellBounds bigInt bigInt intValue bigInt getInteger IWorkbenchConstants TAG_Y shellBounds bigInt bigInt intValue bigInt getInteger IWorkbenchConstants TAG_WIDTH shellBounds bigInt bigInt intValue bigInt getInteger IWorkbenchConstants TAG_HEIGHT shellBounds bigInt bigInt intValue shellBounds isEmpty shellBounds displayBounds clientArea getShell getDisplay getClientArea shellBounds clientArea shellBounds clientArea getShell setBounds shellBounds getString IWorkbenchConstants TAG_MAXIMIZED getShell setMaximized getString IWorkbenchConstants TAG_MINIMIZED getShell setMinimized perspectiveSwitcher perspectiveSwitcher restoreState getCoolBarManager CoolBarManager coolBarMgr getCoolBarManager IMemento coolBarMem getChild IWorkbenchConstants TAG_COOLBAR_LAYOUT coolBarMem lockedInt coolBarMem getInteger IWorkbenchConstants TAG_LOCKED lockedInt lockedInt intValue coolBarMgr setLockLayout coolBarMgr setLockLayout ArrayList coolBarLayout ArrayList IMemento contributionMems coolBarMem getChildren IWorkbenchConstants TAG_COOLITEM contributionMems IMemento contributionMem contributionMems contributionMem getString IWorkbenchConstants TAG_ITEM_TYPE contributionMem getString IWorkbenchConstants TAG_ID IContributionItem existingItem coolBarMgr existingItem DEBUG_TOOLBAR_DISPOSAL coolBarLayout existingItem IContributionItem newItem IWorkbenchConstants TAG_TYPE_SEPARATOR newItem newItem IWorkbenchConstants TAG_TYPE_GROUPMARKER newItem GroupMarker IWorkbenchConstants TAG_TYPE_TOOLBARCONTRIBUTION IWorkbenchConstants TAG_TYPE_PLACEHOLDER contributionMem getInteger IWorkbenchConstants TAG_ITEM_X contributionMem getInteger IWorkbenchConstants TAG_ITEM_Y IContributionItem oldItem coolBarMgr oldItem newItem oldItem newItem ToolBarContributionItem ToolBarManager coolBarMgr getStyle IWorkbenchConstants TAG_TYPE_PLACEHOLDER ToolBarContributionItem newToolBarItem ToolBarContributionItem newItem newToolBarItem setCurrentHeight intValue newToolBarItem setCurrentWidth intValue newItem PlaceholderContributionItem newToolBarItem newItem setVisible IContributionItem refItem findAlphabeticalOrder IWorkbenchActionConstants MB_ADDITIONS coolBarMgr refItem coolBarMgr insertAfter refItem getId newItem coolBarMgr newItem newItem ToolBarContributionItem ToolBarContributionItem newItem setCurrentWidth intValue newItem ToolBarContributionItem ToolBarContributionItem newItem setCurrentHeight intValue newItem coolBarLayout newItem newItem setParent coolBarMgr coolBarMgr markDirty ArrayList finalLayout ArrayList IContributionItem existingItems coolBarMgr getItems existingItems IContributionItem existingItem existingItems existingItem layoutItemItr coolBarLayout layoutItemItr hasNext IContributionItem layoutItem IContributionItem layoutItemItr layoutItem layoutItem existingItem existingItem finalLayout existingItem finalLayout addAll coolBarLayout IContributionItem itemsToSet IContributionItem finalLayout finalLayout toArray itemsToSet coolBarMgr setItems itemsToSet coolBarMem getChild IWorkbenchConstants TAG_TOOLBAR_LAYOUT coolBarMem restoreOldCoolBar coolBarMem IWorkbenchPage newActivePage IMemento pageArray getChildren IWorkbenchConstants TAG_PAGE pageArray IMemento pageMem pageArray strFocus pageMem getString IWorkbenchConstants TAG_FOCUS strFocus strFocus IAdaptable IMemento inputMem pageMem getChild IWorkbenchConstants TAG_INPUT inputMem inputMem getString IWorkbenchConstants TAG_FACTORY_ID WorkbenchPlugin unableToRestorePage pageMem UIStats UIStats RESTORE_WORKBENCH WorkbenchPageFactory IElementFactory getWorkbench getElementFactory WorkbenchPlugin unableToRestorePage pageMem createElement inputMem WorkbenchPlugin unableToRestorePage pageMem UIStats UIStats RESTORE_WORKBENCH WorkbenchPageFactory WorkbenchPage newPage newPage WorkbenchPage newPage restoreState pageMem activeDescriptor pageList newPage firePageOpened newPage WorkbenchException WorkbenchPlugin getStatus strFocus strFocus newActivePage newPage pageList isEmpty defPerspID getWorkbenchImpl getPerspectiveRegistry getDefaultPerspective WorkbenchPage newPage WorkbenchPage defPerspID getAdvisor getDefaultPageInput pageList newPage firePageOpened newPage WorkbenchException WorkbenchPlugin getStatus productName WorkbenchPlugin getDefault getProductName productName productName getShell setText productName newActivePage newActivePage pageList getNextActive setActivePage newActivePage IMemento introMem getChild IWorkbenchConstants TAG_INTRO introMem getWorkbench getIntroManager showIntro valueOf introMem getString IWorkbenchConstants TAG_STANDBY booleanValue
Restores cool item order from an old workbench private boolean restore Old Cool Bar I Memento coolbar Mem Make sure the tag exist if coolbar Mem null return false Cool Bar Manager cool Bar Mgr get Cool Bar Manager Check to see if layout is locked Integer locked coolbar Mem get Integer I Workbench Constants TAG LOCKED boolean state locked null locked int Value 1 cool Bar Mgr set Lock Layout state Get the visual layout I Memento visible Layout coolbar Mem get Child I Workbench Constants TAG TOOLBAR LAYOUT Array List visible Wrap Indicies new Array List Array List visible Items new Array List if visible Layout null if read Layout visible Layout visible Items visible Wrap Indicies false return false Get the remembered layout I Memento remembered Layout coolbar Mem get Child I Workbench Constants TAG LAYOUT Array List remembered Wrap Indicies new Array List Array List remembered Items new Array List if remembered Layout null if read Layout remembered Layout remembered Items remembered Wrap Indicies false return false Create the objects if visible Items null Merge remembered layout into visible layout if remembered Items null Traverse through all the remembered items int current Index 0 for Iterator i remembered Items iterator i has Next current Index String id String i next int index 1 for Iterator iter visible Items iterator iter has Next String visible Id String iter next if visible Id equals id index visible Items index Of visible Id break The item is not in the visible list if index 1 int insert At Math max 0 Math min current Index visible Items size boolean separate Line false Check whether this item is on a separate line for Iterator iter remembered Wrap Indicies iterator iter has Next Integer wrap Index Integer iter next if wrap Index int Value insert At insert At visible Items size Add new wrap index for this Item visible Wrap Indicies add new Integer insert At separate Line true Add item to array list visible Items add insert At id If the item was not on a separate line then adjust the visible wrap indicies if separate Line Adjust visible wrap indicies for int j 0 j visible Wrap Indicies size j Integer index2 Integer visible Wrap Indicies get j if index2 int Value insert At visible Wrap Indicies set j new Integer index2 int Value 1 The new layout of the cool bar manager Array List cool Bar Layout new Array List visible Items size Add all visible items to the layout object for Iterator i visible Items iterator i has Next String id String i next Look for the object in the current cool bar manager I Contribution Item old Item null I Contribution Item new Item null if id null old Item cool Bar Mgr find id If a tool bar contribution item already exists for this id then use the old object if old Item instanceof Tool Bar Contribution Item new Item Tool Bar Contribution Item old Item else new Item new Tool Bar Contribution Item new Tool Bar Manager cool Bar Mgr get Style id make it invisible by default new Item set Visible false Need to add the item to the cool bar manager so that its canonical order can be preserved I Contribution Item ref Item find Alphabetical Order I Workbench Action Constants MB ADDITIONS id cool Bar Mgr if ref Item null cool Bar Mgr insert After ref Item get Id new Item else cool Bar Mgr add new Item Add new item into cool bar manager if new Item null cool Bar Layout add new Item new Item set Parent cool Bar Mgr cool Bar Mgr mark Dirty Add separators to the displayed Items data structure int offset 0 for int i 1 i visible Wrap Indicies size i int insert At Integer visible Wrap Indicies get i int Value offset cool Bar Layout add insert At new Separator Cool Bar Manager USER SEPARATOR offset Add any group markers in their appropriate places I Contribution Item items cool Bar Mgr get Items for int i 0 i items length i I Contribution Item item items i if item is Group Marker cool Bar Layout add Math max Math min i cool Bar Layout size 0 item I Contribution Item items To Set new I Contribution Item cool Bar Layout size cool Bar Layout to Array items To Set cool Bar Mgr set Items items To Set return true  restoreOldCoolBar IMemento coolbarMem coolbarMem CoolBarManager coolBarMgr getCoolBarManager coolbarMem getInteger IWorkbenchConstants TAG_LOCKED intValue coolBarMgr setLockLayout IMemento visibleLayout coolbarMem getChild IWorkbenchConstants TAG_TOOLBAR_LAYOUT ArrayList visibleWrapIndicies ArrayList ArrayList visibleItems ArrayList visibleLayout readLayout visibleLayout visibleItems visibleWrapIndicies IMemento rememberedLayout coolbarMem getChild IWorkbenchConstants TAG_LAYOUT ArrayList rememberedWrapIndicies ArrayList ArrayList rememberedItems ArrayList rememberedLayout readLayout rememberedLayout rememberedItems rememberedWrapIndicies visibleItems rememberedItems currentIndex rememberedItems hasNext currentIndex visibleItems hasNext visibleId visibleId visibleItems indexOf visibleId insertAt currentIndex visibleItems separateLine rememberedWrapIndicies hasNext wrapIndex wrapIndex intValue insertAt insertAt visibleItems visibleWrapIndicies insertAt separateLine visibleItems insertAt separateLine visibleWrapIndicies visibleWrapIndicies intValue insertAt visibleWrapIndicies intValue ArrayList coolBarLayout ArrayList visibleItems visibleItems hasNext IContributionItem oldItem IContributionItem newItem oldItem coolBarMgr oldItem ToolBarContributionItem newItem ToolBarContributionItem oldItem newItem ToolBarContributionItem ToolBarManager coolBarMgr getStyle newItem setVisible IContributionItem refItem findAlphabeticalOrder IWorkbenchActionConstants MB_ADDITIONS coolBarMgr refItem coolBarMgr insertAfter refItem getId newItem coolBarMgr newItem newItem coolBarLayout newItem newItem setParent coolBarMgr coolBarMgr markDirty visibleWrapIndicies insertAt visibleWrapIndicies intValue coolBarLayout insertAt CoolBarManager USER_SEPARATOR IContributionItem coolBarMgr getItems IContributionItem isGroupMarker coolBarLayout coolBarLayout IContributionItem itemsToSet IContributionItem coolBarLayout coolBarLayout toArray itemsToSet coolBarMgr setItems itemsToSet
Helper method used for restoring an old cool bar layout This method reads the memento and populatates the item id s and wrap indicies private boolean read Layout I Memento memento Array List item Ids Array List wrap Indicies Get the Wrap indicies I Memento wraps memento get Children I Workbench Constants TAG ITEM WRAP INDEX if wraps null return false for int i 0 i wraps length i I Memento wrap Mem wraps i Integer index wrap Mem get Integer I Workbench Constants TAG INDEX if index null return false wrap Indicies add index Get the Item ids I Memento saved Items memento get Children I Workbench Constants TAG ITEM if saved Items null return false for int i 0 i saved Items length i I Memento saved Mem saved Items i String id saved Mem get String I Workbench Constants TAG ID if id null return false item Ids add id return true  readLayout IMemento ArrayList itemIds ArrayList wrapIndicies IMemento getChildren IWorkbenchConstants TAG_ITEM_WRAP_INDEX IMemento wrapMem wrapMem getInteger IWorkbenchConstants TAG_INDEX wrapIndicies IMemento savedItems getChildren IWorkbenchConstants TAG_ITEM savedItems savedItems IMemento savedMem savedItems savedMem getString IWorkbenchConstants TAG_ID itemIds
Returns the contribution item that the given contribution item should be inserted after param start Id the location to start looking alphabetically param item Id the target item id param mgr the contribution manager return the contribution item that the given items should be returned after private I Contribution Item find Alphabetical Order String start Id String item Id I Contribution Manager mgr I Contribution Item items mgr get Items int insert Index 0 look for starting point while insert Index items length I Contribution Item item items insert Index if item get Id null item get Id equals start Id break insert Index Find the index that this item should be inserted in for int i insert Index 1 i items length i I Contribution Item item items i String test Id item get Id if item is Group Marker break if item Id null test Id null if item Id compare To test Id 1 break insert Index i if insert Index items length return null return items insert Index  startId itemId IContributionItem findAlphabeticalOrder startId itemId IContributionManager IContributionItem getItems insertIndex insertIndex IContributionItem insertIndex getId getId startId insertIndex insertIndex IContributionItem testId getId isGroupMarker itemId testId itemId compareTo testId insertIndex insertIndex insertIndex
public void run boolean fork boolean cancelable I Runnable With Progress runnable throws Invocation Target Exception Interrupted Exception I Workbench Context Support context Support get Workbench get Context Support final boolean key Filter Enabled context Support is Key Filter Enabled Control fast View Bar Control get Fast View Bar null null get Fast View Bar get Control boolean fast View Bar Was Enabled fast View Bar Control null false fast View Bar Control get Enabled Control perspective Bar Control get Perspective Bar null null get Perspective Bar get Control boolean perspective Bar Was Enabled perspective Bar Control null false perspective Bar Control get Enabled try if fast View Bar Control null fast View Bar Control is Disposed fast View Bar Control set Enabled false if perspective Bar Control null perspective Bar Control is Disposed perspective Bar Control set Enabled false if key Filter Enabled context Support set Key Filter Enabled false super run fork cancelable runnable finally if fast View Bar Control null fast View Bar Control is Disposed fast View Bar Control set Enabled fast View Bar Was Enabled if perspective Bar Control null perspective Bar Control is Disposed perspective Bar Control set Enabled perspective Bar Was Enabled if key Filter Enabled context Support set Key Filter Enabled true  IRunnableWithProgress InvocationTargetException InterruptedException IWorkbenchContextSupport contextSupport getWorkbench getContextSupport keyFilterEnabled contextSupport isKeyFilterEnabled fastViewBarControl getFastViewBar getFastViewBar getControl fastViewBarWasEnabled fastViewBarControl fastViewBarControl getEnabled perspectiveBarControl getPerspectiveBar getPerspectiveBar getControl perspectiveBarWasEnabled perspectiveBarControl perspectiveBarControl getEnabled fastViewBarControl fastViewBarControl isDisposed fastViewBarControl setEnabled perspectiveBarControl perspectiveBarControl isDisposed perspectiveBarControl setEnabled keyFilterEnabled contextSupport setKeyFilterEnabled fastViewBarControl fastViewBarControl isDisposed fastViewBarControl setEnabled fastViewBarWasEnabled perspectiveBarControl perspectiveBarControl isDisposed perspectiveBarControl setEnabled perspectiveBarWasEnabled keyFilterEnabled contextSupport setKeyFilterEnabled
Save all of the pages Returns true if the operation succeeded private boolean save All Pages boolean b Confirm boolean b Ret true Iterator enum page List iterator while b Ret enum has Next Workbench Page page Workbench Page enum next b Ret page save All Editors b Confirm return b Ret  saveAllPages bConfirm bRet pageList bRet hasNext WorkbenchPage WorkbenchPage bRet saveAllEditors bConfirm bRet
see I Persistable public I Status save State I Memento memento Multi Status result new Multi Status PlatformUI PLUGIN ID I Status OK Workbench Messages get String Workbench Window problems Saving Window null NON NLS 1 Save the window s state and bounds if get Shell get Maximized as Maximized State memento put String I Workbench Constants TAG MAXIMIZED true NON NLS 1 if get Shell get Minimized memento put String I Workbench Constants TAG MINIMIZED true NON NLS 1 if normal Bounds null normal Bounds get Shell get Bounds I Memento fast View Bar Mem memento create Child I Workbench Constants TAG FAST VIEW DATA if fast View Bar null fast View Bar save State fast View Bar Mem memento put Integer I Workbench Constants TAG X normal Bounds x memento put Integer I Workbench Constants TAG Y normal Bounds y memento put Integer I Workbench Constants TAG WIDTH normal Bounds width memento put Integer I Workbench Constants TAG HEIGHT normal Bounds height I Workbench Page active Page get Active Page if active Page null active Page find View I Intro Constants INTRO VIEW ID null I Memento intro Mem memento create Child I Workbench Constants TAG INTRO intro Mem put String I Workbench Constants TAG STANDBY Boolean value Of get Workbench get Intro Manager is Intro Standby get Workbench get Intro Manager get Intro to String save the width of the perspective bar I Memento pers Bar Mem memento create Child I Workbench Constants TAG PERSPECTIVE BAR if perspective Switcher null perspective Switcher save State pers Bar Mem Save the order of the cool bar contribution items if get Cool Bar Manager null get Cool Bar Manager refresh I Memento cool Bar Mem memento create Child I Workbench Constants TAG COOLBAR LAYOUT if get Cool Bar Manager get Lock Layout true cool Bar Mem put Integer I Workbench Constants TAG LOCKED 1 else cool Bar Mem put Integer I Workbench Constants TAG LOCKED 0 I Contribution Item items get Cool Bar Manager get Items for int i 0 i items length i I Memento cool Item Mem cool Bar Mem create Child I Workbench Constants TAG COOLITEM I Contribution Item item items i The id of the contribution item if item get Id null cool Item Mem put String I Workbench Constants TAG ID item get Id Write out type and size if applicable if item is Separator cool Item Mem put String I Workbench Constants TAG ITEM TYPE I Workbench Constants TAG TYPE SEPARATOR else if item is Group Marker item is Separator cool Item Mem put String I Workbench Constants TAG ITEM TYPE I Workbench Constants TAG TYPE GROUPMARKER else if item instanceof Placeholder Contribution Item cool Item Mem put String I Workbench Constants TAG ITEM TYPE I Workbench Constants TAG TYPE PLACEHOLDER else Store the identifier cool Item Mem put String I Workbench Constants TAG ITEM TYPE I Workbench Constants TAG TYPE TOOLBARCONTRIBUTION Retrieve a reasonable approximation of the height and width if possible final int height final int width if item instanceof Tool Bar Contribution Item Tool Bar Contribution Item tool Bar Item Tool Bar Contribution Item item tool Bar Item save Widget State height tool Bar Item get Current Height width tool Bar Item get Current Width else if item instanceof Placeholder Contribution Item Placeholder Contribution Item placeholder Placeholder Contribution Item item height placeholder get Height width placeholder get Width else height 1 width 1 Store the height and width cool Item Mem put Integer I Workbench Constants TAG ITEM X width cool Item Mem put Integer I Workbench Constants TAG ITEM Y height Save each page Iterator enum page List iterator while enum has Next Workbench Page page Workbench Page enum next Save perspective I Memento page Mem memento create Child I Workbench Constants TAG PAGE page Mem put String I Workbench Constants TAG LABEL page get Label result add page save State page Mem if page get Active Workbench Page page Mem put String I Workbench Constants TAG FOCUS true NON NLS 1 Get the input I Adaptable input page get Input if input null I Persistable Element persistable I Persistable Element input get Adapter I Persistable Element class if persistable null Workbench Plugin log Unable to save page input NON NLS 1 input because it does not adapt to I Persistable Element NON NLS 1 else Save input I Memento input Mem page Mem create Child I Workbench Constants TAG INPUT input Mem put String I Workbench Constants TAG FACTORY ID persistable get Factory Id persistable save State input Mem return result  IPersistable IStatus saveState IMemento MultiStatus MultiStatus PLUGIN_ID IStatus WorkbenchMessages getString WorkbenchWindow problemsSavingWindow getShell getMaximized asMaximizedState putString IWorkbenchConstants TAG_MAXIMIZED getShell getMinimized putString IWorkbenchConstants TAG_MINIMIZED normalBounds normalBounds getShell getBounds IMemento fastViewBarMem createChild IWorkbenchConstants TAG_FAST_VIEW_DATA fastViewBar fastViewBar saveState fastViewBarMem putInteger IWorkbenchConstants TAG_X normalBounds putInteger IWorkbenchConstants TAG_Y normalBounds putInteger IWorkbenchConstants TAG_WIDTH normalBounds putInteger IWorkbenchConstants TAG_HEIGHT normalBounds IWorkbenchPage activePage getActivePage activePage activePage findView IIntroConstants INTRO_VIEW_ID IMemento introMem createChild IWorkbenchConstants TAG_INTRO introMem putString IWorkbenchConstants TAG_STANDBY valueOf getWorkbench getIntroManager isIntroStandby getWorkbench getIntroManager getIntro toString IMemento persBarMem createChild IWorkbenchConstants TAG_PERSPECTIVE_BAR perspectiveSwitcher perspectiveSwitcher saveState persBarMem getCoolBarManager getCoolBarManager IMemento coolBarMem createChild IWorkbenchConstants TAG_COOLBAR_LAYOUT getCoolBarManager getLockLayout coolBarMem putInteger IWorkbenchConstants TAG_LOCKED coolBarMem putInteger IWorkbenchConstants TAG_LOCKED IContributionItem getCoolBarManager getItems IMemento coolItemMem coolBarMem createChild IWorkbenchConstants TAG_COOLITEM IContributionItem getId coolItemMem putString IWorkbenchConstants TAG_ID getId isSeparator coolItemMem putString IWorkbenchConstants TAG_ITEM_TYPE IWorkbenchConstants TAG_TYPE_SEPARATOR isGroupMarker isSeparator coolItemMem putString IWorkbenchConstants TAG_ITEM_TYPE IWorkbenchConstants TAG_TYPE_GROUPMARKER PlaceholderContributionItem coolItemMem putString IWorkbenchConstants TAG_ITEM_TYPE IWorkbenchConstants TAG_TYPE_PLACEHOLDER coolItemMem putString IWorkbenchConstants TAG_ITEM_TYPE IWorkbenchConstants TAG_TYPE_TOOLBARCONTRIBUTION ToolBarContributionItem ToolBarContributionItem toolBarItem ToolBarContributionItem toolBarItem saveWidgetState toolBarItem getCurrentHeight toolBarItem getCurrentWidth PlaceholderContributionItem PlaceholderContributionItem PlaceholderContributionItem getHeight getWidth coolItemMem putInteger IWorkbenchConstants TAG_ITEM_X coolItemMem putInteger IWorkbenchConstants TAG_ITEM_Y pageList hasNext WorkbenchPage WorkbenchPage IMemento pageMem createChild IWorkbenchConstants TAG_PAGE pageMem putString IWorkbenchConstants TAG_LABEL getLabel saveState pageMem getActiveWorkbenchPage pageMem putString IWorkbenchConstants TAG_FOCUS IAdaptable getInput IPersistableElement IPersistableElement getAdapter IPersistableElement WorkbenchPlugin IPersistableElement IMemento inputMem pageMem createChild IWorkbenchConstants TAG_INPUT inputMem putString IWorkbenchConstants TAG_FACTORY_ID getFactoryId saveState inputMem
Select the shortcut for a perspective package void select Perspective Shortcut I Perspective Descriptor perspective Workbench Page page boolean selected if perspective Switcher null perspective Switcher select Perspective Shortcut perspective page selected  selectPerspectiveShortcut IPerspectiveDescriptor WorkbenchPage perspectiveSwitcher perspectiveSwitcher selectPerspectiveShortcut
Busy Indicator show While get Shell get Display new Runnable public void run Deactivate old persp Workbench Page current Page get Active Workbench Page if current Page null current Page on Deactivate Activate new persp if in null page List contains in page List set Active in Workbench Page new Page page List get Active if new Page null new Page on Activate fire Page Activated new Page if new Page get Perspective null fire Perspective Activated new Page new Page get Perspective if is Closing return update Disabled false Update action bars implicitly calls update Action Bars update Action Sets if perspective Switcher null perspective Switcher update false get Menu Manager update I Action TEXT if no Open Perspective null in null no Open Perspective dispose no Open Perspective null  BusyIndicator showWhile getShell getDisplay WorkbenchPage currentPage getActiveWorkbenchPage currentPage currentPage onDeactivate pageList pageList setActive WorkbenchPage newPage pageList getActive newPage newPage onActivate firePageActivated newPage newPage getPerspective firePerspectiveActivated newPage newPage getPerspective isClosing updateDisabled updateActionBars updateActionSets perspectiveSwitcher perspectiveSwitcher getMenuManager IAction noOpenPerspective noOpenPerspective noOpenPerspective
Sets the active page within the window param page identifies the new active page public void set Active Page final I Workbench Page in if get Active Workbench Page in return 1FVGTNR ITPUI WINNT busy cursor for switching perspectives Busy Indicator show While get Shell get Display new Runnable public void run Deactivate old persp Workbench Page current Page get Active Workbench Page if current Page null current Page on Deactivate Activate new persp if in null page List contains in page List set Active in Workbench Page new Page page List get Active if new Page null new Page on Activate fire Page Activated new Page if new Page get Perspective null fire Perspective Activated new Page new Page get Perspective if is Closing return update Disabled false Update action bars implicitly calls update Action Bars update Action Sets if perspective Switcher null perspective Switcher update false get Menu Manager update I Action TEXT if no Open Perspective null in null no Open Perspective dispose no Open Perspective null  setActivePage IWorkbenchPage getActiveWorkbenchPage BusyIndicator showWhile getShell getDisplay WorkbenchPage currentPage getActiveWorkbenchPage currentPage currentPage onDeactivate pageList pageList setActive WorkbenchPage newPage pageList getActive newPage newPage onActivate firePageActivated newPage newPage getPerspective firePerspectiveActivated newPage newPage getPerspective isClosing updateDisabled updateActionBars updateActionSets perspectiveSwitcher perspectiveSwitcher getMenuManager IAction noOpenPerspective noOpenPerspective noOpenPerspective
Returns whether or not children exist for the Window s toolbar control Overridden for coolbar support p return boolean true if children exist false otherwise protected boolean tool Bar Children Exist Cool Bar cool Bar Control Cool Bar get Cool Bar Control return cool Bar Control get Item Count 0  toolBarChildrenExist CoolBar coolBarControl CoolBar getCoolBarControl coolBarControl getItemCount
Hooks a listener to track the activation and deactivation of the window s shell Notifies the active part and editor of the change private void track Shell Activation Shell shell shell add Shell Listener new Shell Adapter public void shell Activated Shell Event event shell Activated true get Workbench Impl set Activated Window Workbench Window this Workbench Page current Page get Active Workbench Page if current Page null I Workbench Part part current Page get Active Part if part null Part Site site Part Site part get Site site get Pane shell Activated I Editor Part editor current Page get Active Editor if editor null Part Site site Part Site editor get Site site get Pane shell Activated get Workbench Impl fire Window Activated Workbench Window this public void shell Deactivated Shell Event event shell Activated false Workbench Page current Page get Active Workbench Page if current Page null I Workbench Part part current Page get Active Part if part null Part Site site Part Site part get Site site get Pane shell Deactivated I Editor Part editor current Page get Active Editor if editor null Part Site site Part Site editor get Site site get Pane shell Deactivated get Workbench Impl fire Window Deactivated Workbench Window this  trackShellActivation addShellListener ShellAdapter shellActivated ShellEvent shellActivated getWorkbenchImpl setActivatedWindow WorkbenchWindow WorkbenchPage currentPage getActiveWorkbenchPage currentPage IWorkbenchPart currentPage getActivePart PartSite PartSite getSite getPane shellActivated IEditorPart currentPage getActiveEditor PartSite PartSite getSite getPane shellActivated getWorkbenchImpl fireWindowActivated WorkbenchWindow shellDeactivated ShellEvent shellActivated WorkbenchPage currentPage getActiveWorkbenchPage currentPage IWorkbenchPart currentPage getActivePart PartSite PartSite getSite getPane shellDeactivated IEditorPart currentPage getActiveEditor PartSite PartSite getSite getPane shellDeactivated getWorkbenchImpl fireWindowDeactivated WorkbenchWindow
Hooks a listener to track the resize of the window s shell Stores the new bounds if in normal state that is not in minimized or maximized state private void track Shell Resize Shell new Shell new Shell add Control Listener new Control Adapter public void control Moved Control Event e save Bounds public void control Resized Control Event e save Bounds private void save Bounds Shell shell get Shell if shell null return if shell is Disposed return if shell get Minimized return if shell get Maximized as Maximized State true return as Maximized State false normal Bounds shell get Bounds  trackShellResize newShell newShell addControlListener ControlAdapter controlMoved ControlEvent saveBounds controlResized ControlEvent saveBounds saveBounds getShell isDisposed getMinimized getMaximized asMaximizedState asMaximizedState normalBounds getBounds
update the action bars public void update Action Bars if update Disabled return update All required in order to enable accelerators on pull down menus get Menu Bar Manager update All false get Cool Bar Manager update false get Status Line Manager update false  updateActionBars updateDisabled updateAll getMenuBarManager updateAll getCoolBarManager getStatusLineManager
Update the visible action sets This method is typically called from a page when the user changes the visible action sets within the prespective public void update Action Sets if update Disabled return Workbench Page current Page get Active Workbench Page if current Page null action Presentation clear Action Sets else if get Cool Bar Manager null get Cool Bar Manager refresh action Presentation set Action Sets current Page get Action Sets update Action Bars hide the launch menu if it is empty String path I Workbench Action Constants M WINDOW I Workbench Action Constants SEP I Workbench Action Constants M LAUNCH I Menu Manager manager get Menu Bar Manager find Menu Using Path path I Contribution Item item get Menu Bar Manager find Using Path path TODO remove update Active Actions I Action Set action Sets action Presentation get Action Sets register Action Sets action Sets if manager null item null return item set Visible manager get Items length 2 there is a separator for the additions group thus 2  updateActionSets updateDisabled WorkbenchPage currentPage getActiveWorkbenchPage currentPage actionPresentation clearActionSets getCoolBarManager getCoolBarManager actionPresentation setActionSets currentPage getActionSets updateActionBars IWorkbenchActionConstants M_WINDOW IWorkbenchActionConstants IWorkbenchActionConstants M_LAUNCH IMenuManager getMenuBarManager findMenuUsingPath IContributionItem getMenuBarManager findUsingPath updateActiveActions IActionSet actionSets actionPresentation getActionSets registerActionSets actionSets setVisible getItems
Updates the shorcut item package void update Perspective Shortcut I Perspective Descriptor old Desc I Perspective Descriptor new Desc Workbench Page page if update Disabled return if perspective Switcher null perspective Switcher update Perspective Shortcut old Desc new Desc page  updatePerspectiveShortcut IPerspectiveDescriptor oldDesc IPerspectiveDescriptor newDesc WorkbenchPage updateDisabled perspectiveSwitcher perspectiveSwitcher updatePerspectiveShortcut oldDesc newDesc
Create the progress indicator for the receiver param shellthe parent shell private void create Progress Indicator Shell shell if get Window Configurer get Show Progress Indicator progress Region new Progress Region progress Region create Contents shell this  createProgressIndicator getWindowConfigurer getShowProgressIndicator progressRegion ProgressRegion progressRegion createContents
private Object active public Page List pages In Creation Order new Array List 4 page In Activation Order new Array List 4  PageList pagesInCreationOrder ArrayList pageInActivationOrder ArrayList
public boolean add Object object pages In Creation Order add object page In Activation Order add 0 object It will be moved to top only when activated return true  pagesInCreationOrder pageInActivationOrder
return true public Iterator iterator return pages In Creation Order iterator  pagesInCreationOrder
return pages In Creation Order iterator public boolean contains Object object return pages In Creation Order contains object  pagesInCreationOrder pagesInCreationOrder
public boolean remove Object object if active object active null page In Activation Order remove object return pages In Creation Order remove object  pageInActivationOrder pagesInCreationOrder
return pages In Creation Order remove object public boolean is Empty return pages In Creation Order is Empty  pagesInCreationOrder isEmpty pagesInCreationOrder isEmpty
public I Workbench Page get Pages int n Size pages In Creation Order size I Workbench Page ret Array new I Workbench Page n Size pages In Creation Order to Array ret Array return ret Array  IWorkbenchPage getPages nSize pagesInCreationOrder IWorkbenchPage retArray IWorkbenchPage nSize pagesInCreationOrder toArray retArray retArray
public void set Active Object page if active page return active page if page null page In Activation Order remove page page In Activation Order add page  setActive pageInActivationOrder pageInActivationOrder
public Workbench Page get Active return Workbench Page active  WorkbenchPage getActive WorkbenchPage
public Workbench Page get Next Active if active null if page In Activation Order is Empty return null else return Workbench Page page In Activation Order get page In Activation Order size 1 else if page In Activation Order size 2 return null else return Workbench Page page In Activation Order get page In Activation Order size 2  WorkbenchPage getNextActive pageInActivationOrder isEmpty WorkbenchPage pageInActivationOrder pageInActivationOrder pageInActivationOrder WorkbenchPage pageInActivationOrder pageInActivationOrder
Returns the unique object that applications use to configure this window p IMPORTANT This method is declared package private to prevent regular plug ins from downcasting I Workbench Window to Workbench Window and getting hold of the workbench window configurer that would allow them to tamper with the workbench window The workbench window configurer is available only to the application p package DO NOT CHANGE Workbench Window Configurer get Window Configurer if window Configurer null lazy initialize window Configurer new Workbench Window Configurer this return window Configurer  IWorkbenchWindow WorkbenchWindow WorkbenchWindowConfigurer getWindowConfigurer windowConfigurer windowConfigurer WorkbenchWindowConfigurer windowConfigurer
Returns the workbench advisor Assumes the workbench has been created already p IMPORTANT This method is declared private to prevent regular plug ins from downcasting I Workbench Window to Workbench Window and getting hold of the workbench advisor that would allow them to tamper with the workbench The workbench advisor is internal to the application p private private DO NOT CHANGE Workbench Advisor get Advisor return get Workbench Impl get Advisor  IWorkbenchWindow WorkbenchWindow WorkbenchAdvisor getAdvisor getWorkbenchImpl getAdvisor
Returns the I Workbench implementation private Workbench get Workbench Impl return Workbench get Instance  IWorkbench getWorkbenchImpl getInstance
Creates a clone copy of the current action bars param configurer location of managers param flags indicate which actions to load and whether its a proxy fill public void fill Action Bars I Action Bar Configurer configurer int flags Workbench workbench get Workbench Impl workbench large Update Start try get Advisor fill Action Bars this configurer flags finally workbench large Update End  fillActionBars IActionBarConfigurer getWorkbenchImpl largeUpdateStart getAdvisor fillActionBars largeUpdateEnd
The code Workbench Window code implementation of this method has the same logic as code Window code s implementation but without the resize check We don t want to skip setting the bounds if the shell has been resized since a free resize event occurs on Windows when the menubar is set in configure Shell protected void initialize Bounds Point size get Initial Size Point location get Initial Location size get Shell set Bounds get Constrained Shell Bounds new Rectangle location x location y size x size y  WorkbenchWindow configureShell initializeBounds getInitialSize getInitialLocation getShell setBounds getConstrainedShellBounds
The code Workbench Window code implementation of this method delegates to the window configurer since 3 0 protected Point get Initial Size return get Window Configurer get Initial Size  WorkbenchWindow getInitialSize getWindowConfigurer getInitialSize
param visible whether the cool bar should be shown This is only applicable if the window configurer also wishes either the cool bar to be visible since 3 0 public void set Cool Bar Visible boolean visible boolean old Value cool Bar Visible cool Bar Visible visible if old Value cool Bar Visible update Layout Data For Contents  setCoolBarVisible oldValue coolBarVisible coolBarVisible oldValue coolBarVisible updateLayoutDataForContents
return whether the cool bar should be shown This is only applicable if the window configurer also wishes either the cool bar to be visible since 3 0 public boolean get Cool Bar Visible return cool Bar Visible  getCoolBarVisible coolBarVisible
param visible whether the perspective bar should be shown This is only applicable if the window configurer also wishes either the perspective bar to be visible since 3 0 public void set Perspective Bar Visible boolean visible boolean old Value perspective Bar Visible perspective Bar Visible visible if old Value perspective Bar Visible update Layout Data For Contents  setPerspectiveBarVisible oldValue perspectiveBarVisible perspectiveBarVisible oldValue perspectiveBarVisible updateLayoutDataForContents
return whether the perspective bar should be shown This is only applicable if the window configurer also wishes either the perspective bar to be visible since 3 0 public boolean get Perspective Bar Visible return perspective Bar Visible  getPerspectiveBarVisible perspectiveBarVisible
param visible whether the perspective bar should be shown This is only applicable if the window configurer also wishes either the perspective bar to be visible since 3 0 public void set Status Line Visible boolean visible boolean old Value status Line Visible status Line Visible visible if old Value status Line Visible update Layout Data For Contents  setStatusLineVisible oldValue statusLineVisible statusLineVisible oldValue statusLineVisible updateLayoutDataForContents
return whether the perspective bar should be shown This is only applicable if the window configurer also wishes either the perspective bar to be visible since 3 0 public boolean get Status Line Visible return status Line Visible  getStatusLineVisible statusLineVisible
Note that this will only have an effect if the default implementation of Workbench Advisor create Window Contents has been invoked called I Workbench since 3 0 private void update Layout Data For Contents if default Layout null return issue this is not ideal coolbar and perspective shortcuts should be separately configurable if get Cool Bar Visible get Window Configurer get Show Cool Bar get Perspective Bar Visible get Window Configurer get Show Perspective Bar default Layout add Trim top Bar SWT TOP null top Bar set Visible true else default Layout remove Trim top Bar top Bar set Visible false if get Status Line Visible get Window Configurer get Show Status Line default Layout add Trim get Status Line Manager get Control SWT BOTTOM null get Status Line Manager get Control set Visible true else default Layout remove Trim get Status Line Manager get Control get Status Line Manager get Control set Visible false if get Window Configurer get Show Progress Indicator if progress Region get Control get Layout Data null Trim Layout Data animation Data new Trim Layout Data false progress Region get Control compute Size SWT DEFAULT SWT DEFAULT x get Status Line Manager get Control compute Size SWT DEFAULT SWT DEFAULT y progress Region get Control set Layout Data animation Data default Layout add Trim progress Region get Control SWT BOTTOM null progress Region get Control set Visible true else if progress Region null default Layout remove Trim progress Region get Control progress Region get Control set Visible false default Layout set Center Control get Page Composite  WorkbenchAdvisor createWindowContents IWorkbench updateLayoutDataForContents defaultLayout getCoolBarVisible getWindowConfigurer getShowCoolBar getPerspectiveBarVisible getWindowConfigurer getShowPerspectiveBar defaultLayout addTrim topBar topBar setVisible defaultLayout removeTrim topBar topBar setVisible getStatusLineVisible getWindowConfigurer getShowStatusLine defaultLayout addTrim getStatusLineManager getControl getStatusLineManager getControl setVisible defaultLayout removeTrim getStatusLineManager getControl getStatusLineManager getControl setVisible getWindowConfigurer getShowProgressIndicator progressRegion getControl getLayoutData TrimLayoutData animationData TrimLayoutData progressRegion getControl computeSize getStatusLineManager getControl computeSize progressRegion getControl setLayoutData animationData defaultLayout addTrim progressRegion getControl progressRegion getControl setVisible progressRegion defaultLayout removeTrim progressRegion getControl progressRegion getControl setVisible defaultLayout setCenterControl getPageComposite
public boolean get Show Fast View Bars return get Window Configurer get Show Fast View Bars  getShowFastViewBars getWindowConfigurer getShowFastViewBars
fast View Bar add Docking Listener new I Change Listener public void update boolean changed Control reference null int side fast View Bar get Side fast View Bar get Control set Layout Data new Trim Layout Data side SWT BOTTOM SWT DEFAULT SWT DEFAULT if side SWT BOTTOM get Window Configurer get Show Status Line reference get Status Line Manager get Control default Layout add Trim fast View Bar get Control side reference Workbench Page page get Active Workbench Page if page null Perspective persp page get Active Perspective I View Reference active Fast View persp get Active Fast View if active Fast View null persp set Active Fast View null persp set Active Fast View active Fast View Layout Util resize fast View Bar get Control  fastViewBar addDockingListener IChangeListener fastViewBar getSide fastViewBar getControl setLayoutData TrimLayoutData getWindowConfigurer getShowStatusLine getStatusLineManager getControl defaultLayout addTrim fastViewBar getControl WorkbenchPage getActiveWorkbenchPage getActivePerspective IViewReference activeFastView getActiveFastView activeFastView setActiveFastView setActiveFastView activeFastView LayoutUtil fastViewBar getControl
Set the layout data for the contents of the window private void set Layout Data For Contents update Layout Data For Contents if get Window Configurer get Show Fast View Bars fast View Bar null fast View Bar add Docking Listener new I Change Listener public void update boolean changed Control reference null int side fast View Bar get Side fast View Bar get Control set Layout Data new Trim Layout Data side SWT BOTTOM SWT DEFAULT SWT DEFAULT if side SWT BOTTOM get Window Configurer get Show Status Line reference get Status Line Manager get Control default Layout add Trim fast View Bar get Control side reference Workbench Page page get Active Workbench Page if page null Perspective persp page get Active Perspective I View Reference active Fast View persp get Active Fast View if active Fast View null persp set Active Fast View null persp set Active Fast View active Fast View Layout Util resize fast View Bar get Control  setLayoutDataForContents updateLayoutDataForContents getWindowConfigurer getShowFastViewBars fastViewBar fastViewBar addDockingListener IChangeListener fastViewBar getSide fastViewBar getControl setLayoutData TrimLayoutData getWindowConfigurer getShowStatusLine getStatusLineManager getControl defaultLayout addTrim fastViewBar getControl WorkbenchPage getActiveWorkbenchPage getActivePerspective IViewReference activeFastView getActiveFastView activeFastView setActiveFastView setActiveFastView activeFastView LayoutUtil fastViewBar getControl
Returns the fast view bar public Fast View Bar get Fast View Bar return fast View Bar  FastViewBar getFastViewBar fastViewBar
Returns the perspective bar public Perspective Bar Manager get Perspective Bar return perspective Switcher null null perspective Switcher get Perspective Bar  PerspectiveBarManager getPerspectiveBar perspectiveSwitcher perspectiveSwitcher getPerspectiveBar
for dynamic UI protected Action Presentation get Action Presentation return action Presentation  ActionPresentation getActionPresentation actionPresentation
see org eclipse jface window Application Window show Top Seperator protected boolean show Top Seperator return false  ApplicationWindow showTopSeperator showTopSeperator
Delegate to the presentation factory see org eclipse jface window Application Window create Status Line Manager since 3 0 protected Status Line Manager create Status Line Manager issue Application Window and Workbench Window should allow full I Status Line Manager return Status Line Manager get Window Configurer get Presentation Factory create Status Line Manager  ApplicationWindow createStatusLineManager StatusLineManager createStatusLineManager ApplicationWindow WorkbenchWindow IStatusLineManager StatusLineManager getWindowConfigurer getPresentationFactory createStatusLineManager
Delegate to the presentation factory see org eclipse jface window Application Window create Status Line since 3 0 protected void create Status Line Shell shell get Window Configurer get Presentation Factory create Status Line Control get Status Line Manager shell  ApplicationWindow createStatusLine createStatusLine getWindowConfigurer getPresentationFactory createStatusLineControl getStatusLineManager
Updates the fast view bar if present TODO The fast view bar should update itself as necessary All calls to this should be cleaned up since 3 0 public void update Fast View Bar if get Fast View Bar null get Fast View Bar update true  updateFastViewBar getFastViewBar getFastViewBar
return Returns the progress Region public Progress Region get Progress Region return progress Region  progressRegion ProgressRegion getProgressRegion progressRegion
Add the argument perspective bar control to the argument side of this window s trim param control the perspective bar s control param side one of code SWT LEFT code code SWT BOTTOM code or code SWT RIGHT code only LEFT has been tested since 3 0 public void add Perspective Bar To Trim Control control int side Control reference null the perspective bar should go before the fast view bar they re on the same side and before the status line if on the bottom if side fast View Bar get Side reference fast View Bar get Control else if side SWT BOTTOM get Window Configurer get Show Status Line reference get Status Line Manager get Control control set Layout Data new Trim Layout Data false SWT DEFAULT SWT DEFAULT default Layout add Trim control side reference  addPerspectiveBarToTrim fastViewBar getSide fastViewBar getControl getWindowConfigurer getShowStatusLine getStatusLineManager getControl setLayoutData TrimLayoutData defaultLayout addTrim

Returns whether the given id is for a cool item param the item id return code true code if it is a cool item and code false code otherwise package boolean contains Cool Item String id I Cool Bar Manager cb Manager get Cool Bar Manager if cb Manager null return false I Contribution Item cb Item cb Manager find id if cb Item null return false issue maybe we should check if cb Item is visible return true  containsCoolItem ICoolBarManager cbManager getCoolBarManager cbManager IContributionItem cbItem cbManager cbItem cbItem
see org eclipse ui application I Action Bar Configurer public I Status Line Manager get Status Line Manager return window get Status Line Manager  IActionBarConfigurer IStatusLineManager getStatusLineManager getStatusLineManager
see org eclipse ui application I Action Bar Configurer public I Menu Manager get Menu Manager return window get Menu Manager  IActionBarConfigurer IMenuManager getMenuManager getMenuManager
see org eclipse ui internal Abstract Action Bar Configurer public I Cool Bar Manager get Cool Bar Manager return window get Cool Bar Manager  AbstractActionBarConfigurer ICoolBarManager getCoolBarManager getCoolBarManager
see org eclipse ui application I Action Bar Configurer public void register Global Action I Action action window register Global Action action  IActionBarConfigurer registerGlobalAction IAction registerGlobalAction
Creates a new workbench window configurer p This method is declared package private Clients obtain instances via link Workbench Advisor get Window Configurer Workbench Advisor get Window Configurer p param window the workbench window that this object configures see Workbench Advisor get Window Configurer Workbench Window Configurer Workbench Window window if window null throw new Illegal Argument Exception this window window window Title Workbench Plugin get Default get Product Name if window Title null window Title NON NLS 1  WorkbenchAdvisor getWindowConfigurer WorkbenchAdvisor getWindowConfigurer WorkbenchAdvisor getWindowConfigurer WorkbenchWindowConfigurer WorkbenchWindow IllegalArgumentException windowTitle WorkbenchPlugin getDefault getProductName windowTitle windowTitle
see org eclipse ui application I Workbench Window Configurer get Window public I Workbench Window get Window return window  IWorkbenchWindowConfigurer getWindow IWorkbenchWindow getWindow
see org eclipse ui application I Workbench Window Configurer get Workbench Configurer public I Workbench Configurer get Workbench Configurer return Workbench get Instance get Workbench Configurer  IWorkbenchWindowConfigurer getWorkbenchConfigurer IWorkbenchConfigurer getWorkbenchConfigurer getInstance getWorkbenchConfigurer
Returns the title as set by code set Title code without consulting the shell return the window title as set or code null code if not set package String basic Get Title return window Title  setTitle basicGetTitle windowTitle
public String get Title Shell shell window get Shell if shell null update the cached title window Title shell get Text return window Title else return window Title  getTitle getShell windowTitle getText windowTitle windowTitle
public void set Title String title if title null throw new Illegal Argument Exception window Title title Shell shell window get Shell if shell null shell is Disposed shell set Text title  setTitle IllegalArgumentException windowTitle getShell isDisposed setText
see org eclipse ui application I Workbench Window Configurer get Show Menu Bar public boolean get Show Menu Bar return show Menu Bar  IWorkbenchWindowConfigurer getShowMenuBar getShowMenuBar showMenuBar
public void set Show Menu Bar boolean show show Menu Bar show Workbench Window win Workbench Window get Window Shell shell win get Shell if shell null boolean showing shell get Menu Bar null if show showing if show shell set Menu Bar win get Menu Bar Manager get Menu else shell set Menu Bar null  setShowMenuBar showMenuBar WorkbenchWindow WorkbenchWindow getWindow getShell getMenuBar setMenuBar getMenuBarManager getMenu setMenuBar
see org eclipse ui application I Workbench Window Configurer get Show Tool Bar public boolean get Show Cool Bar return show Tool Bar  IWorkbenchWindowConfigurer getShowToolBar getShowCoolBar showToolBar
see org eclipse ui application I Workbench Window Configurer public void set Show Cool Bar boolean show show Tool Bar show issue need to be able to reconfigure after window s controls created  IWorkbenchWindowConfigurer setShowCoolBar showToolBar
see org eclipse ui application I Workbench Window Configurer public boolean get Show Fast View Bars return show Fast View Bars  IWorkbenchWindowConfigurer getShowFastViewBars showFastViewBars
see org eclipse ui application I Workbench Window Configurer public void set Show Fast View Bars boolean show show Fast View Bars show issue need to be able to reconfigure after window s controls created  IWorkbenchWindowConfigurer setShowFastViewBars showFastViewBars
see org eclipse ui application I Workbench Window Configurer public boolean get Show Perspective Bar return show Perspective Bar  IWorkbenchWindowConfigurer getShowPerspectiveBar showPerspectiveBar
see org eclipse ui application I Workbench Window Configurer public void set Show Perspective Bar boolean show show Perspective Bar show issue need to be able to reconfigure after window s controls created  IWorkbenchWindowConfigurer setShowPerspectiveBar showPerspectiveBar
see org eclipse ui application I Workbench Window Configurer get Show Status Line public boolean get Show Status Line return show Status Line  IWorkbenchWindowConfigurer getShowStatusLine getShowStatusLine showStatusLine
see org eclipse ui application I Workbench Window Configurer set Show Status Line public void set Show Status Line boolean show show Status Line show issue need to be able to reconfigure after window s controls created  IWorkbenchWindowConfigurer setShowStatusLine setShowStatusLine showStatusLine
see org eclipse ui application I Workbench Window Configurer public boolean get Show Progress Indicator return show Progress Indicator  IWorkbenchWindowConfigurer getShowProgressIndicator showProgressIndicator
see org eclipse ui application I Workbench Window Configurer public void set Show Progress Indicator boolean show show Progress Indicator show issue need to be able to reconfigure after window s controls created  IWorkbenchWindowConfigurer setShowProgressIndicator showProgressIndicator
public Object get Data String key if key null throw new Illegal Argument Exception return extra Data get key  getData IllegalArgumentException extraData
public void set Data String key Object data if key null throw new Illegal Argument Exception if data null extra Data put key data else extra Data remove key  setData IllegalArgumentException extraData extraData
public void add Editor Area Transfer Transfer tranfer if tranfer null transfer Types contains tranfer transfer Types add tranfer Transfer transfers new Transfer transfer Types size transfer Types to Array transfers I Workbench Page pages window get Pages for int i 0 i pages length i Workbench Page page Workbench Page pages i Drop Target drop Target Editor Sash Container page get Editor Presentation get Layout Part get Drop Target if drop Target null drop Target set Transfer transfers  addEditorAreaTransfer transferTypes transferTypes transferTypes transferTypes toArray IWorkbenchPage getPages WorkbenchPage WorkbenchPage DropTarget dropTarget EditorSashContainer getEditorPresentation getLayoutPart getDropTarget dropTarget dropTarget setTransfer
public void configure Editor Area Drop Listener Drop Target Listener drop Target Listener if drop Target Listener null this drop Target Listener drop Target Listener I Workbench Page pages window get Pages for int i 0 i pages length i Workbench Page page Workbench Page pages i Drop Target drop Target Editor Sash Container page get Editor Presentation get Layout Part get Drop Target if drop Target null drop Target add Drop Listener this drop Target Listener  configureEditorAreaDropListener DropTargetListener dropTargetListener dropTargetListener dropTargetListener dropTargetListener IWorkbenchPage getPages WorkbenchPage WorkbenchPage DropTarget dropTarget EditorSashContainer getEditorPresentation getLayoutPart getDropTarget dropTarget dropTarget addDropListener dropTargetListener
Returns the array of code Transfer code added by the application package Transfer get Transfers Transfer transfers new Transfer transfer Types size transfer Types to Array transfers return transfers  getTransfers transferTypes transferTypes toArray
Returns the drop listener provided by the application package Drop Target Listener get Drop Target Listener return drop Target Listener  DropTargetListener getDropTargetListener dropTargetListener
public I Action Bar Configurer get Action Bar Configurer if action Bar Configurer null lazily initialize action Bar Configurer new Window Action Bar Configurer return action Bar Configurer  IActionBarConfigurer getActionBarConfigurer actionBarConfigurer actionBarConfigurer WindowActionBarConfigurer actionBarConfigurer
Returns whether the given id is for a cool item param the item id return code true code if it is a cool item and code false code otherwise package boolean contains Cool Item String id trigger lazy initialization get Action Bar Configurer return action Bar Configurer contains Cool Item id  containsCoolItem getActionBarConfigurer actionBarConfigurer containsCoolItem
see org eclipse ui application I Workbench Window Configurer public int get Shell Style return shell Style  IWorkbenchWindowConfigurer getShellStyle shellStyle
see org eclipse ui application I Workbench Window Configurer public void set Shell Style int shell Style this shell Style shell Style  IWorkbenchWindowConfigurer setShellStyle shellStyle shellStyle shellStyle
see org eclipse ui application I Workbench Window Configurer public Point get Initial Size return initial Size  IWorkbenchWindowConfigurer getInitialSize initialSize
see org eclipse ui application I Workbench Window Configurer public void set Initial Size Point size initial Size size  IWorkbenchWindowConfigurer setInitialSize initialSize
public Abstract Presentation Factory get Presentation Factory if presentation Factory null presentation Factory create Default Presentation Factory return presentation Factory  AbstractPresentationFactory getPresentationFactory presentationFactory presentationFactory createDefaultPresentationFactory presentationFactory
Creates the default presentation factory by looking up the presentation factory extension with the id specified by the presentation factory preference If the preference is null or if no matching extension is found a factory default presentation factory is used private Abstract Presentation Factory create Default Presentation Factory String factory Id Workbench window get Workbench get Presentation Id if factory Id null factory Id length 0 Abstract Presentation Factory factory Workbench Plugin get Default get Presentation Factory factory Id if factory null return factory return new Workbench Presentation Factory  AbstractPresentationFactory createDefaultPresentationFactory factoryId getWorkbench getPresentationId factoryId factoryId AbstractPresentationFactory WorkbenchPlugin getDefault getPresentationFactory factoryId WorkbenchPresentationFactory
public void set Presentation Factory Abstract Presentation Factory factory if factory null throw new Illegal Argument Exception presentation Factory factory  setPresentationFactory AbstractPresentationFactory IllegalArgumentException presentationFactory
Creates the default window contents param shell the shell public void create Default Contents Shell shell window create Default Contents shell  createDefaultContents createDefaultContents
see org eclipse ui application I Workbench Window Configurer public Menu create Menu Bar return window get Menu Manager create Menu Bar window get Shell  IWorkbenchWindowConfigurer createMenuBar getMenuManager createMenuBar getShell
see org eclipse ui application I Workbench Window Configurer public Control create Cool Bar Control Composite parent return window get Cool Bar Manager create Control parent  IWorkbenchWindowConfigurer createCoolBarControl getCoolBarManager createControl
see org eclipse ui application I Workbench Window Configurer public Control create Status Line Control Composite parent return window get Status Line Manager create Control parent  IWorkbenchWindowConfigurer createStatusLineControl getStatusLineManager createControl
see org eclipse ui application I Workbench Window Configurer public Control create Page Composite Composite parent return window create Page Composite parent  IWorkbenchWindowConfigurer createPageComposite createPageComposite

Constructor for Navigate Workbench Action public Workbook Editors Action I Workbench Window window super Workbench Messages get String Workbook Editors Action label NON NLS 1 if window null throw new Illegal Argument Exception this workbench Window window Do we need help here Workbench Help set Help this I Help Context Ids WORKBENCH EDITORS ACTION set Action Definition Id org eclipse ui window open Editor Drop Down NON NLS 1 workbench Window add Page Listener this workbench Window get Part Service add Part Listener this update State  NavigateWorkbenchAction WorkbookEditorsAction IWorkbenchWindow WorkbenchMessages getString WorkbookEditorsAction IllegalArgumentException workbenchWindow WorkbenchHelp setHelp IHelpContextIds WORKBENCH_EDITORS_ACTION setActionDefinitionId openEditorDropDown workbenchWindow addPageListener workbenchWindow getPartService addPartListener updateState
public void run if workbench Window null action has been disposed return I Workbench Page page workbench Window get Active Page if page null Workbench Page wbp Workbench Page page Editor Area Helper eah wbp get Editor Presentation if eah null eah display Editor List  workbenchWindow IWorkbenchPage workbenchWindow getActivePage WorkbenchPage WorkbenchPage EditorAreaHelper getEditorPresentation displayEditorList
public void dispose workbench Window remove Page Listener this workbench Window get Part Service remove Part Listener this workbench Window null  workbenchWindow removePageListener workbenchWindow getPartService removePartListener workbenchWindow
Updates the enabled state public void update State I Workbench Page page null if workbench Window null page workbench Window get Active Page if page null set Enabled false return enable iff there is at least one other editor to switch to set Enabled page get Editor References length 1  updateState IWorkbenchPage workbenchWindow workbenchWindow getActivePage setEnabled setEnabled getEditorReferences
see org eclipse ui I Page Listener page Activated org eclipse ui I Workbench Page public void page Activated I Workbench Page page  IPageListener pageActivated IWorkbenchPage pageActivated IWorkbenchPage
see org eclipse ui I Page Listener page Closed org eclipse ui I Workbench Page public void page Closed I Workbench Page page update State  IPageListener pageClosed IWorkbenchPage pageClosed IWorkbenchPage updateState
public void page Opened I Workbench Page page update State  pageOpened IWorkbenchPage updateState
see org eclipse ui I Part Listener part Activated org eclipse ui I Workbench Part public void part Activated I Workbench Part part no op  IPartListener partActivated IWorkbenchPart partActivated IWorkbenchPart
see org eclipse ui I Part Listener part Brought To Top org eclipse ui I Workbench Part public void part Brought To Top I Workbench Part part no op  IPartListener partBroughtToTop IWorkbenchPart partBroughtToTop IWorkbenchPart
see org eclipse ui I Part Listener part Closed org eclipse ui I Workbench Part public void part Closed I Workbench Part part update State  IPartListener partClosed IWorkbenchPart partClosed IWorkbenchPart updateState
see org eclipse ui I Part Listener part Deactivated org eclipse ui I Workbench Part public void part Deactivated I Workbench Part part no op  IPartListener partDeactivated IWorkbenchPart partDeactivated IWorkbenchPart
see org eclipse ui I Part Listener part Opened org eclipse ui I Workbench Part public void part Opened I Workbench Part part update State  IPartListener partOpened IWorkbenchPart partOpened IWorkbenchPart updateState

Creates a new working set param name the name of the new working set Should not have leading or trailing whitespace param element the content of the new working set May be empty but not code null code public Working Set String name I Adaptable elements Assert is Not Null name name must not be null NON NLS 1 this name name internal Set Elements elements  WorkingSet IAdaptable isNotNull internalSetElements
Creates a new working set from a memento param name the name of the new working set Should not have leading or trailing whitespace param memento persistence memento containing the elements of the working set Working Set String name I Memento memento Assert is Not Null name name must not be null NON NLS 1 this name name working Set Memento memento  WorkingSet IMemento isNotNull workingSetMemento
Tests the receiver and the object for equality param object object to compare the receiver to return true the object equals the receiver the name is the same false otherwise public boolean equals Object object if this object return true if object instanceof Working Set Working Set working Set Working Set object String object Page Id working Set get Id String page Id get Id boolean page Id Equal object Page Id null page Id null object Page Id null object Page Id equals page Id return working Set get Name equals get Name working Set get Elements Array equals get Elements Array page Id Equal return false  WorkingSet WorkingSet workingSet WorkingSet objectPageId workingSet getId pageId getId pageIdEqual objectPageId pageId objectPageId objectPageId pageId workingSet getName getName workingSet getElementsArray getElementsArray pageIdEqual
Returns the receiver if the requested type is either I Working Set or I Persistable Element param adapter the requested type return the receiver if the requested type is either I Working Set or I Persistable Element public Object get Adapter Class adapter if adapter I Working Set class adapter I Persistable Element class return this return null  IWorkingSet IPersistableElement IWorkingSet IPersistableElement getAdapter IWorkingSet IPersistableElement
see org eclipse ui I Working Set public I Adaptable get Elements Array List list get Elements Array return I Adaptable list to Array new I Adaptable list size  IWorkingSet IAdaptable getElements ArrayList getElementsArray IAdaptable toArray IAdaptable
Returns the elements array list Lazily restores the elements from persistence memento return the elements array list private Array List get Elements Array if elements null restore Working Set working Set Memento null return elements  ArrayList getElementsArray restoreWorkingSet workingSetMemento
see org eclipse ui I Persistable Element public String get Factory Id return FACTORY ID  IPersistableElement getFactoryId FACTORY_ID
see org eclipse ui I Working Set public String get Id return edit Page Id  IWorkingSet getId editPageId
Returns the working set icon Currently this is one of the icons specified in the extensions of the org eclipse ui working Sets extension point The extension is identified using the value returned by code get Id code Returns code null code if no icon has been specified in the extension or if code get Id code returns code null code return the working set icon or code null code since 2 1 public Image Descriptor get Image Working Set Registry registry Workbench Plugin get Default get Working Set Registry Working Set Descriptor descriptor null if edit Page Id null descriptor registry get Working Set Descriptor edit Page Id if descriptor null return null return descriptor get Icon  workingSets getId getId ImageDescriptor getImage WorkingSetRegistry WorkbenchPlugin getDefault getWorkingSetRegistry WorkingSetDescriptor editPageId getWorkingSetDescriptor editPageId getIcon
see org eclipse ui I Working Set public String get Name return name  IWorkingSet getName
Returns the hash code return the hash code public int hash Code int hash Code name hash Code get Elements Array hash Code if edit Page Id null hash Code edit Page Id hash Code return hash Code  hashCode hashCode hashCode getElementsArray hashCode editPageId hashCode editPageId hashCode hashCode
Recreates the working set elements from the persistence memento private void restore Working Set I Memento item Mementos working Set Memento get Children I Workbench Constants TAG ITEM Set items new Hash Set for int i 0 i item Mementos length i I Memento item Memento item Mementos i String factoryID item Memento get String I Workbench Constants TAG FACTORY ID if factoryID null Workbench Plugin log Unable to restore working set item no factory ID NON NLS 1 continue I Element Factory factory PlatformUI get Workbench get Element Factory factoryID if factory null Workbench Plugin log Unable to restore working set item cannot instantiate factory factoryID NON NLS 1 continue I Adaptable item factory create Element item Memento if item null Workbench Plugin log Unable to restore working set item cannot instantiate item factoryID NON NLS 1 continue items add item internal Set Elements I Adaptable items to Array new I Adaptable items size  restoreWorkingSet IMemento itemMementos workingSetMemento getChildren IWorkbenchConstants TAG_ITEM HashSet itemMementos IMemento itemMemento itemMementos itemMemento getString IWorkbenchConstants TAG_FACTORY_ID WorkbenchPlugin IElementFactory getWorkbench getElementFactory WorkbenchPlugin IAdaptable createElement itemMemento WorkbenchPlugin internalSetElements IAdaptable toArray IAdaptable
Implements I Persistable Element Persist the working set name and working set contents The contents has to be either I Persistable Elements or provide adapters for it to be persistent see org eclipse ui I Persistable Element save State I Memento public void save State I Memento memento if working Set Memento null just re save the previous memento if the working set has not been restored memento put Memento working Set Memento else memento put String I Workbench Constants TAG NAME name memento put String I Workbench Constants TAG EDIT PAGE ID edit Page Id Iterator iterator elements iterator while iterator has Next I Adaptable adaptable I Adaptable iterator next I Persistable Element persistable I Persistable Element adaptable get Adapter I Persistable Element class if persistable null I Memento item Memento memento create Child I Workbench Constants TAG ITEM item Memento put String I Workbench Constants TAG FACTORY ID persistable get Factory Id persistable save State item Memento  IPersistableElement IPersistableElements IPersistableElement saveState IMemento saveState IMemento workingSetMemento putMemento workingSetMemento putString IWorkbenchConstants TAG_NAME putString IWorkbenchConstants TAG_EDIT_PAGE_ID editPageId hasNext IAdaptable IAdaptable IPersistableElement IPersistableElement getAdapter IPersistableElement IMemento itemMemento createChild IWorkbenchConstants TAG_ITEM itemMemento putString IWorkbenchConstants TAG_FACTORY_ID getFactoryId saveState itemMemento
public void set Elements I Adaptable new Elements internal Set Elements new Elements Working Set Manager working Set Manager Working Set Manager Workbench Plugin get Default get Working Set Manager working Set Manager working Set Changed this I Working Set Manager CHANGE WORKING SET CONTENT CHANGE  setElements IAdaptable newElements internalSetElements newElements WorkingSetManager workingSetManager WorkingSetManager WorkbenchPlugin getDefault getWorkingSetManager workingSetManager workingSetChanged IWorkingSetManager CHANGE_WORKING_SET_CONTENT_CHANGE
Create a copy of the elements to store in the receiver param elements the elements to store a copy of in the receiver private void internal Set Elements I Adaptable new Elements Assert is Not Null new Elements Working set elements array must not be null NON NLS 1 elements new Array List new Elements length for int i 0 i new Elements length i elements add new Elements i  internalSetElements IAdaptable newElements isNotNull newElements ArrayList newElements newElements newElements
see org eclipse ui I Working Set public void set Id String page Id edit Page Id page Id  IWorkingSet setId pageId editPageId pageId
public void set Name String new Name Assert is Not Null new Name Working set name must not be null NON NLS 1 name new Name Working Set Manager working Set Manager Working Set Manager Workbench Plugin get Default get Working Set Manager working Set Manager working Set Changed this I Working Set Manager CHANGE WORKING SET NAME CHANGE  setName newName isNotNull newName newName WorkingSetManager workingSetManager WorkingSetManager WorkbenchPlugin getDefault getWorkingSetManager workingSetManager workingSetChanged IWorkingSetManager CHANGE_WORKING_SET_NAME_CHANGE

Implements Comparator see Comparator compare Object Object public int compare Object o1 Object o2 String name1 null String name2 null if o1 instanceof I Working Set name1 I Working Set o1 get Name if o2 instanceof I Working Set name2 I Working Set o2 get Name return f Collator compare name1 name2  IWorkingSet IWorkingSet getName IWorkingSet IWorkingSet getName fCollator

public I Adaptable create Element I Memento memento String working Set Name memento get String I Workbench Constants TAG NAME String working Set Edit Page Id memento get String I Workbench Constants TAG EDIT PAGE ID if working Set Name null return null Working Set working Set new Working Set working Set Name memento if working Set Edit Page Id null working Set set Id working Set Edit Page Id else working sets created with builds 20020418 and 20020419 will not have an edit page id fix this automatically working Set set Id org eclipse ui resource Working Set Page NON NLS 1 return working Set  IAdaptable createElement IMemento workingSetName getString IWorkbenchConstants TAG_NAME workingSetEditPageId getString IWorkbenchConstants TAG_EDIT_PAGE_ID workingSetName WorkingSet workingSet WorkingSet workingSetName workingSetEditPageId workingSet setId workingSetEditPageId workingSet setId resourceWorkingSetPage workingSet

see org eclipse ui I Working Set Manager public void add Recent Working Set I Working Set working Set internal Add Recent Working Set working Set save State  IWorkingSetManager addRecentWorkingSet IWorkingSet workingSet internalAddRecentWorkingSet workingSet saveState
public void add Working Set I Working Set working Set Assert is True working Sets contains working Set working set already registered NON NLS 1 working Sets add working Set save State fire Property Change CHANGE WORKING SET ADD null working Set  addWorkingSet IWorkingSet workingSet isTrue workingSets workingSet workingSets workingSet saveState firePropertyChange CHANGE_WORKING_SET_ADD workingSet
see org eclipse ui I Working Set Manager public void add Property Change Listener I Property Change Listener listener property Change Listeners add listener  IWorkingSetManager addPropertyChangeListener IPropertyChangeListener propertyChangeListeners
see org eclipse ui I Working Set Manager public I Working Set create Working Set String name I Adaptable elements return new Working Set name elements  IWorkingSetManager IWorkingSet createWorkingSet IAdaptable WorkingSet
see org eclipse ui I Working Set Manager public I Working Set create Working Set I Memento memento return restore Working Set memento  IWorkingSetManager IWorkingSet createWorkingSet IMemento restoreWorkingSet
see org eclipse ui I Working Set Manager create Working Set Edit Wizard org eclipse ui I Working Set since 2 1 public I Working Set Edit Wizard create Working Set Edit Wizard I Working Set working Set String edit Page Id working Set get Id Working Set Registry registry Workbench Plugin get Default get Working Set Registry I Working Set Page edit Page null if edit Page Id null edit Page registry get Working Set Page edit Page Id if edit Page null edit Page registry get Default Working Set Page if edit Page null return null Working Set Edit Wizard edit Wizard new Working Set Edit Wizard edit Page edit Wizard set Selection working Set return edit Wizard  IWorkingSetManager createWorkingSetEditWizard IWorkingSet IWorkingSetEditWizard createWorkingSetEditWizard IWorkingSet workingSet editPageId workingSet getId WorkingSetRegistry WorkbenchPlugin getDefault getWorkingSetRegistry IWorkingSetPage editPage editPageId editPage getWorkingSetPage editPageId editPage editPage getDefaultWorkingSetPage editPage WorkingSetEditWizard editWizard WorkingSetEditWizard editPage editWizard setSelection workingSet editWizard
deprecated use create Working Set Selection Dialog parent true instead public I Working Set Selection Dialog create Working Set Selection Dialog Shell parent return create Working Set Selection Dialog parent true  createWorkingSetSelectionDialog IWorkingSetSelectionDialog createWorkingSetSelectionDialog createWorkingSetSelectionDialog
see org eclipse ui I Working Set Manager public I Working Set Selection Dialog create Working Set Selection Dialog Shell parent boolean multi return new Working Set Selection Dialog parent multi  IWorkingSetManager IWorkingSetSelectionDialog createWorkingSetSelectionDialog WorkingSetSelectionDialog
Tests the receiver and the object for equality param object object to compare the receiver to return true the object equals the receiver it has the same working sets false otherwise public boolean equals Object object if this object return true if object instanceof Working Set Manager Working Set Manager working Set Manager Working Set Manager object return working Set Manager working Sets equals working Sets return false  WorkingSetManager WorkingSetManager workingSetManager WorkingSetManager workingSetManager workingSets workingSets
Display get Default sync Exec new Runnable public void run Object listeners property Change Listeners get Listeners for int i 0 i listeners length i I Property Change Listener listeners i property Change event  getDefault syncExec propertyChangeListeners getListeners IPropertyChangeListener propertyChange
Notify property change listeners about a change to the list of working sets param change Id one of I Working Set Manager CHANGE WORKING SET ADD I Working Set Manager CHANGE WORKING SET REMOVE I Working Set Manager CHANGE WORKING SET CONTENT CHANGE I Working Set Manager CHANGE WORKING SET NAME CHANGE param old Value the removed working set or null if a working set was added or changed param new Value the new or changed working set or null if a working set was removed private void fire Property Change String change Id Object old Value Object new Value final Property Change Event event new Property Change Event this change Id old Value new Value Display get Default sync Exec new Runnable public void run Object listeners property Change Listeners get Listeners for int i 0 i listeners length i I Property Change Listener listeners i property Change event  changeId IWorkingSetManager CHANGE_WORKING_SET_ADD IWorkingSetManager CHANGE_WORKING_SET_REMOVE IWorkingSetManager CHANGE_WORKING_SET_CONTENT_CHANGE IWorkingSetManager CHANGE_WORKING_SET_NAME_CHANGE oldValue newValue firePropertyChange changeId oldValue newValue PropertyChangeEvent PropertyChangeEvent changeId oldValue newValue getDefault syncExec propertyChangeListeners getListeners IPropertyChangeListener propertyChange
see org eclipse ui I Working Set Manager public I Working Set get Recent Working Sets return I Working Set recent Working Sets to Array new I Working Set recent Working Sets size  IWorkingSetManager IWorkingSet getRecentWorkingSets IWorkingSet recentWorkingSets toArray IWorkingSet recentWorkingSets
public I Working Set get Working Set String name if name null working Sets null return null Iterator iter working Sets iterator while iter has Next I Working Set working Set I Working Set iter next if name equals working Set get Name return working Set return null  IWorkingSet getWorkingSet workingSets workingSets hasNext IWorkingSet workingSet IWorkingSet workingSet getName workingSet
Returns the hash code return the hash code public int hash Code return working Sets hash Code  hashCode workingSets hashCode
see org eclipse ui I Working Set Manager public I Working Set get Working Sets return I Working Set working Sets to Array new I Working Set working Sets size  IWorkingSetManager IWorkingSet getWorkingSets IWorkingSet workingSets toArray IWorkingSet workingSets
Returns the file used as the persistence store return the file used as the persistence store private File get Working Set State File I Path path Workbench Plugin get Default get State Location path path append WORKING SET STATE FILENAME return path to File  getWorkingSetStateFile IPath WorkbenchPlugin getDefault getStateLocation WORKING_SET_STATE_FILENAME toFile
Adds the specified working set to the list of recently used working sets param working Set working set to added to the list of recently used working sets private void internal Add Recent Working Set I Working Set working Set recent Working Sets remove working Set recent Working Sets add 0 working Set if recent Working Sets size MRU SIZE recent Working Sets remove MRU SIZE  workingSet internalAddRecentWorkingSet IWorkingSet workingSet recentWorkingSets workingSet recentWorkingSets workingSet recentWorkingSets MRU_SIZE recentWorkingSets MRU_SIZE
see org eclipse ui I Working Set Manager public void remove Property Change Listener I Property Change Listener listener property Change Listeners remove listener  IWorkingSetManager removePropertyChangeListener IPropertyChangeListener propertyChangeListeners
public void remove Working Set I Working Set working Set boolean working Set Removed working Sets remove working Set boolean recent Working Set Removed recent Working Sets remove working Set if working Set Removed recent Working Set Removed save State fire Property Change CHANGE WORKING SET REMOVE working Set null  removeWorkingSet IWorkingSet workingSet workingSetRemoved workingSets workingSet recentWorkingSetRemoved recentWorkingSets workingSet workingSetRemoved recentWorkingSetRemoved saveState firePropertyChange CHANGE_WORKING_SET_REMOVE workingSet
Restores the list of most recently used working sets from the persistence store param memento the persistence store private void restore Mru List I Memento memento I Memento mru Working Sets memento get Children I Workbench Constants TAG MRU LIST for int i mru Working Sets length 1 i 0 i String working Set Name mru Working Sets i get String I Workbench Constants TAG NAME if working Set Name null I Working Set working Set get Working Set working Set Name if working Set null internal Add Recent Working Set working Set  restoreMruList IMemento IMemento mruWorkingSets getChildren IWorkbenchConstants TAG_MRU_LIST mruWorkingSets workingSetName mruWorkingSets getString IWorkbenchConstants TAG_NAME workingSetName IWorkingSet workingSet getWorkingSet workingSetName workingSet internalAddRecentWorkingSet workingSet
Reads the persistence store and creates the working sets stored in it public void restore State File state File get Working Set State File if state File exists try File Input Stream input new File Input Stream state File Buffered Reader reader new Buffered Reader new Input Stream Reader input utf 8 NON NLS 1 I Memento memento XML Memento create Read Root reader restore Working Set State memento restore Mru List memento reader close catch IO Exception e Message Dialog open Error Shell null Workbench Messages get String Problem Restoring Working Set State title NON NLS 1 Workbench Messages get String Problem Restoring Working Set State message NON NLS 1 catch Workbench Exception e Error Dialog open Error Shell null Workbench Messages get String Problem Restoring Working Set State title NON NLS 1 Workbench Messages get String Problem Restoring Working Set State message NON NLS 1 e get Status  restoreState stateFile getWorkingSetStateFile stateFile FileInputStream FileInputStream stateFile BufferedReader BufferedReader InputStreamReader IMemento XMLMemento createReadRoot restoreWorkingSetState restoreMruList IOException MessageDialog openError WorkbenchMessages getString ProblemRestoringWorkingSetState WorkbenchMessages getString ProblemRestoringWorkingSetState WorkbenchException ErrorDialog openError WorkbenchMessages getString ProblemRestoringWorkingSetState WorkbenchMessages getString ProblemRestoringWorkingSetState getStatus
Recreates a working set from the persistence store param memento the persistence store return the working set created from the memento or null if creation failed private I Working Set restore Working Set I Memento memento String factoryID memento get String I Workbench Constants TAG FACTORY ID if factoryID null if the factory id was not set in the memento then assume that the memento was created using I Memento save State and should be restored using Working Set Factory factoryID Working Set FACTORY ID I Element Factory factory PlatformUI get Workbench get Element Factory factoryID if factory null Workbench Plugin log Unable to restore working set cannot instantiate factory factoryID NON NLS 1 return null I Adaptable adaptable factory create Element memento if adaptable null Workbench Plugin log Unable to restore working set cannot instantiate working set factoryID NON NLS 1 return null if adaptable instanceof I Working Set false Workbench Plugin log Unable to restore working set element is not an I Working Set factoryID NON NLS 1 return null return I Working Set adaptable  IWorkingSet restoreWorkingSet IMemento getString IWorkbenchConstants TAG_FACTORY_ID IMemento saveState WorkingSetFactory WorkingSet FACTORY_ID IElementFactory getWorkbench getElementFactory WorkbenchPlugin IAdaptable createElement WorkbenchPlugin IWorkingSet WorkbenchPlugin IWorkingSet IWorkingSet
Recreates all working sets from the persistence store and adds them to the receiver param memento the persistence store private void restore Working Set State I Memento memento I Memento children memento get Children I Workbench Constants TAG WORKING SET for int i 0 i children length i I Working Set working Set restore Working Set children i if working Set null this working Sets add working Set fire Property Change CHANGE WORKING SET ADD null working Set  restoreWorkingSetState IMemento IMemento getChildren IWorkbenchConstants TAG_WORKING_SET IWorkingSet workingSet restoreWorkingSet workingSet workingSets workingSet firePropertyChange CHANGE_WORKING_SET_ADD workingSet
Saves the working sets in the persistence store private void save State XML Memento memento XML Memento create Write Root I Workbench Constants TAG WORKING SET MANAGER File state File get Working Set State File save Working Set State memento save Mru List memento try File Output Stream stream new File Output Stream state File Output Stream Writer writer new Output Stream Writer stream utf 8 NON NLS 1 memento save writer writer close catch IO Exception e state File delete Message Dialog open Error Shell null Workbench Messages get String Problem Saving Working Set State title NON NLS 1 Workbench Messages get String Problem Saving Working Set State message NON NLS 1  saveState XMLMemento XMLMemento createWriteRoot IWorkbenchConstants TAG_WORKING_SET_MANAGER stateFile getWorkingSetStateFile saveWorkingSetState saveMruList FileOutputStream FileOutputStream stateFile OutputStreamWriter OutputStreamWriter IOException stateFile MessageDialog openError WorkbenchMessages getString ProblemSavingWorkingSetState WorkbenchMessages getString ProblemSavingWorkingSetState
Saves the list of most recently used working sets in the persistence store param memento the persistence store private void save Mru List I Memento memento Iterator iterator recent Working Sets iterator while iterator has Next I Working Set working Set I Working Set iterator next I Memento mru Memento memento create Child I Workbench Constants TAG MRU LIST mru Memento put String I Workbench Constants TAG NAME working Set get Name  saveMruList IMemento recentWorkingSets hasNext IWorkingSet workingSet IWorkingSet IMemento mruMemento createChild IWorkbenchConstants TAG_MRU_LIST mruMemento putString IWorkbenchConstants TAG_NAME workingSet getName
Saves all persistable working sets in the persistence store param memento the persistence store see I Persistable Element private void save Working Set State I Memento memento Iterator iterator working Sets iterator while iterator has Next I Working Set working Set I Working Set iterator next I Persistable Element persistable null if working Set instanceof I Persistable Element persistable I Persistable Element working Set else if working Set instanceof I Adaptable persistable I Persistable Element I Adaptable working Set get Adapter I Persistable Element class if persistable null I Memento working Set Memento memento create Child I Workbench Constants TAG WORKING SET working Set Memento put String I Workbench Constants TAG FACTORY ID persistable get Factory Id persistable save State working Set Memento  IPersistableElement saveWorkingSetState IMemento workingSets hasNext IWorkingSet workingSet IWorkingSet IPersistableElement workingSet IPersistableElement IPersistableElement workingSet workingSet IAdaptable IPersistableElement IAdaptable workingSet getAdapter IPersistableElement IMemento workingSetMemento createChild IWorkbenchConstants TAG_WORKING_SET workingSetMemento putString IWorkbenchConstants TAG_FACTORY_ID getFactoryId saveState workingSetMemento
Persists all working sets and fires a property change event for the changed working set Should only be called by org eclipse ui internal Working Set param changed Working Set the working set that has changed param property Change Id the changed property one of CHANGE WORKING SET CONTENT CHANGE and CHANGE WORKING SET NAME CHANGE public void working Set Changed I Working Set changed Working Set String property Change Id save State fire Property Change property Change Id null changed Working Set  WorkingSet changedWorkingSet propertyChangeId CHANGE_WORKING_SET_CONTENT_CHANGE CHANGE_WORKING_SET_NAME_CHANGE workingSetChanged IWorkingSet changedWorkingSet propertyChangeId saveState firePropertyChange propertyChangeId changedWorkingSet

Returns the id of this menu contribution item param id numerical id return String string id public static String get Id int id return Working Set Menu Contribution Item class get Name id NON NLS 1  getId WorkingSetMenuContributionItem getName
Creates a new instance of the receiver param id sequential id of the new instance param action Group the action group this contribution item is created in public Working Set Menu Contribution Item int id Working Set Filter Action Group action Group I Working Set working Set super get Id id Assert is Not Null action Group Assert is Not Null working Set this id id this action Group action Group this working Set working Set  actionGroup WorkingSetMenuContributionItem WorkingSetFilterActionGroup actionGroup IWorkingSet workingSet getId isNotNull actionGroup isNotNull workingSet actionGroup actionGroup workingSet workingSet
mi add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Working Set Manager manager PlatformUI get Workbench get Working Set Manager action Group set Working Set working Set manager add Recent Working Set working Set  addSelectionListener SelectionAdapter widgetSelected SelectionEvent IWorkingSetManager getWorkbench getWorkingSetManager actionGroup setWorkingSet workingSet addRecentWorkingSet workingSet
Adds a menu item for the working set Overrides method from Contribution Item see org eclipse jface action Contribution Item fill Menu int public void fill Menu menu int index Menu Item mi new Menu Item menu SWT RADIO index mi set Text id working Set get Name NON NLS 1 NON NLS 2 mi set Selection working Set equals action Group get Working Set mi add Selection Listener new Selection Adapter public void widget Selected Selection Event e I Working Set Manager manager PlatformUI get Workbench get Working Set Manager action Group set Working Set working Set manager add Recent Working Set working Set  ContributionItem ContributionItem MenuItem MenuItem setText workingSet getName setSelection workingSet actionGroup getWorkingSet addSelectionListener SelectionAdapter widgetSelected SelectionEvent IWorkingSetManager getWorkbench getWorkingSetManager actionGroup setWorkingSet workingSet addRecentWorkingSet workingSet
Overridden to always return true and force dynamic menu building public boolean is Dynamic return true  isDynamic

private Workbench Window window Persp Action Bars constructor comment public W Win Action Bars Workbench Window window super this window window  WorkbenchWindow PerspActionBars WWinActionBars WorkbenchWindow
Clears the global action handler list public void clear Global Action Handlers  clearGlobalActionHandlers
Returns the tool bar manager public I Tool Bar Manager get Tool Bar Manager This should never be called Assert is True false return null  IToolBarManager getToolBarManager isTrue
Returns the cool bar manager public I Cool Bar Manager get Cool Bar Manager return window get Cool Bar Manager  ICoolBarManager getCoolBarManager getCoolBarManager
Get the handler for a window action param actionID an action ID declared in the registry return an action handler which implements the action ID or code null code if none is registered public I Action get Global Action Handler String actionID return null  IAction getGlobalActionHandler
Returns the menu manager If items are added or removed from the manager be sure to call code update Action Bars code return the menu manager public I Menu Manager get Menu Manager return window get Menu Manager  updateActionBars IMenuManager getMenuManager getMenuManager
Returns the status line manager If items are added or removed from the manager be sure to call code update Action Bars code return the status line manager public I Status Line Manager get Status Line Manager return window get Status Line Manager  updateActionBars IStatusLineManager getStatusLineManager getStatusLineManager
Add a handler for a window action The standard action ID s for the workbench are defined in code I Workbench Actions code see I Workbench Actions param actionID an action ID declared in the registry param handler an action which implements the action ID code null code may be passed to deregister a handler public void set Global Action Handler String actionID I Action handler  IWorkbenchActions IWorkbenchActions setGlobalActionHandler IAction
Commits all UI changes This should be called after additions or subtractions have been made to a menu status line or toolbar public void update Action Bars window update Action Bars  updateActionBars updateActionBars

private I Part Listener2 part Listner new I Part Listener2 public void part Activated I Workbench Part Reference ref I Workbench Part part ref get Part false if part null listeners fire Part Activated part selection Service part Activated part listeners2 fire Part Activated ref  IPartListener2 partListner IPartListener2 partActivated IWorkbenchPartReference IWorkbenchPart getPart firePartActivated selectionService partActivated firePartActivated
public void part Brought To Top I Workbench Part Reference ref I Workbench Part part ref get Part false if part null listeners fire Part Brought To Top part selection Service part Brought To Top part listeners2 fire Part Brought To Top ref  partBroughtToTop IWorkbenchPartReference IWorkbenchPart getPart firePartBroughtToTop selectionService partBroughtToTop firePartBroughtToTop
public void part Closed I Workbench Part Reference ref I Workbench Part part ref get Part false if part null listeners fire Part Closed part selection Service part Closed part listeners2 fire Part Closed ref  partClosed IWorkbenchPartReference IWorkbenchPart getPart firePartClosed selectionService partClosed firePartClosed
public void part Deactivated I Workbench Part Reference ref I Workbench Part part ref get Part false if part null listeners fire Part Deactivated part selection Service part Deactivated part listeners2 fire Part Deactivated ref  partDeactivated IWorkbenchPartReference IWorkbenchPart getPart firePartDeactivated selectionService partDeactivated firePartDeactivated
public void part Opened I Workbench Part Reference ref I Workbench Part part ref get Part false if part null listeners fire Part Opened part selection Service part Opened part listeners2 fire Part Opened ref  partOpened IWorkbenchPartReference IWorkbenchPart getPart firePartOpened selectionService partOpened firePartOpened
listeners2 fire Part Opened ref public void part Hidden I Workbench Part Reference ref listeners2 fire Part Hidden ref  firePartOpened partHidden IWorkbenchPartReference firePartHidden
listeners2 fire Part Hidden ref public void part Visible I Workbench Part Reference ref listeners2 fire Part Visible ref  firePartHidden partVisible IWorkbenchPartReference firePartVisible
listeners2 fire Part Visible ref public void part Input Changed I Workbench Part Reference ref listeners2 fire Part Input Changed ref  firePartVisible partInputChanged IWorkbenchPartReference firePartInputChanged
Creates a new part service for a workbench window public W Win Part Service I Workbench Window window selection Service new Window Selection Service window  WWinPartService IWorkbenchWindow selectionService WindowSelectionService
Method declared on I Part Service public void add Part Listener I Part Listener l listeners add Part Listener l  IPartService addPartListener IPartListener addPartListener
Method declared on I Part Service public void add Part Listener I Part Listener2 l listeners2 add Part Listener l  IPartService addPartListener IPartListener2 addPartListener
Method declared on I Part Service public void remove Part Listener I Part Listener l listeners remove Part Listener l  IPartService removePartListener IPartListener removePartListener
Method declared on I Part Service public void remove Part Listener I Part Listener2 l listeners2 remove Part Listener l  IPartService removePartListener IPartListener2 removePartListener
public I Workbench Part get Active Part if active Page null return active Page get Active Part else return null  IWorkbenchPart getActivePart activePage activePage getActivePart
public I Workbench Part Reference get Active Part Reference if active Page null return active Page get Active Part Reference else return null  IWorkbenchPartReference getActivePartReference activePage activePage getActivePartReference
Returns the selection service I Selection Service get Selection Service return selection Service  ISelectionService getSelectionService selectionService
void page Activated I Workbench Page new Page Optimize if new Page active Page return Unhook listener from the old page reset Update active page active Page new Page Hook listener on the new page if active Page null active Page add Part Listener part Listner if get Active Part null part Listner part Activated get Active Part Reference  pageActivated IWorkbenchPage newPage newPage activePage activePage newPage activePage activePage addPartListener partListner getActivePart partListner partActivated getActivePartReference
void page Closed I Workbench Page page Unhook listener from the old page if page active Page reset  pageClosed IWorkbenchPage activePage
Notifies that a page has been opened void page Opened I Workbench Page page page Activated page  pageOpened IWorkbenchPage pageActivated
private void reset if active Page null active Page remove Part Listener part Listner active Page null selection Service reset  activePage activePage removePartListener partListner activePage selectionService

private Perspective Listener List perspective Listeners new Perspective Listener List W Win Perspective Service constructor comment public W Win Perspective Service Workbench Window window super this workbench Window window  PerspectiveListenerList perspectiveListeners PerspectiveListenerList WWinPerspectiveService WWinPerspectiveService WorkbenchWindow workbenchWindow
Adds the given listener for a page s perspective lifecycle events Has no effect if an identical listener is already registered param listener a perspective listener public void add Perspective Listener I Internal Perspective Listener listener perspective Listeners add Perspective Listener listener  addPerspectiveListener IInternalPerspectiveListener perspectiveListeners addPerspectiveListener
Fires perspective activated protected void fire Perspective Activated I Workbench Page page I Perspective Descriptor perspective perspective Listeners fire Perspective Activated page perspective  firePerspectiveActivated IWorkbenchPage IPerspectiveDescriptor perspectiveListeners firePerspectiveActivated
Fires perspective changed protected void fire Perspective Changed I Workbench Page page I Perspective Descriptor perspective String change Id perspective Listeners fire Perspective Changed page perspective change Id  firePerspectiveChanged IWorkbenchPage IPerspectiveDescriptor changeId perspectiveListeners firePerspectiveChanged changeId
Fires perspective reset protected void fire Perspective Closed I Workbench Page page I Perspective Descriptor perspective perspective Listeners fire Perspective Closed page perspective  firePerspectiveClosed IWorkbenchPage IPerspectiveDescriptor perspectiveListeners firePerspectiveClosed
Fires perspective reset protected void fire Perspective Opened I Workbench Page page I Perspective Descriptor perspective perspective Listeners fire Perspective Opened page perspective  firePerspectiveOpened IWorkbenchPage IPerspectiveDescriptor perspectiveListeners firePerspectiveOpened
Returns the active perspective descriptor in the active workbench page return the active perspective descriptor or code null code if no perspective is currently active public I Perspective Descriptor get Active Perspective I Workbench Page page workbench Window get Active Page if page null return null else return page get Perspective  IPerspectiveDescriptor getActivePerspective IWorkbenchPage workbenchWindow getActivePage getPerspective
Removes the given page s perspective listener Has no affect if an identical listener is not registered param listener a perspective listener public void remove Perspective Listener I Internal Perspective Listener listener perspective Listeners remove Perspective Listener listener  removePerspectiveListener IInternalPerspectiveListener perspectiveListeners removePerspectiveListener

retarget Action add Property Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals I Action ENABLED Object val event get New Value if val instanceof Boolean set Enabled Boolean val boolean Value else if event get Property equals I Action CHECKED Object val event get New Value if val instanceof Boolean set Checked Boolean val boolean Value else if event get Property equals I Action TEXT Object val event get New Value if val instanceof String set Text String val else if event get Property equals I Action TOOL TIP TEXT Object val event get New Value if val instanceof String set Tool Tip Text String val  retargetAction addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty IAction getNewValue setEnabled booleanValue getProperty IAction getNewValue setChecked booleanValue getProperty IAction getNewValue setText getProperty IAction TOOL_TIP_TEXT getNewValue setToolTipText
super set Help Listener new Help Listener public void help Requested Help Event e Help Listener listener null if retarget Action null listener retarget Action get Help Listener if listener null use our own help listener listener local Help Listener if listener null pass on the event listener help Requested e  setHelpListener HelpListener helpRequested HelpEvent HelpListener retargetAction retargetAction getHelpListener localHelpListener helpRequested
Constructs a new W Win Plugin Action object public W Win Plugin Action I Configuration Element action Element I Workbench Window window String id int style super action Element id style this window window If config specifies a retarget action create it now String retarget action Element get Attribute Action Descriptor ATT RETARGET if retarget null retarget equals TRUE VALUE create a retarget action String allow Label Update action Element get Attribute Action Descriptor ATT ALLOW LABEL UPDATE String label action Element get Attribute Action Descriptor ATT LABEL if allow Label Update null allow Label Update equals TRUE VALUE retarget Action new Label Retarget Action id label style else retarget Action new Retarget Action id label style retarget Action add Property Change Listener new I Property Change Listener public void property Change Property Change Event event if event get Property equals I Action ENABLED Object val event get New Value if val instanceof Boolean set Enabled Boolean val boolean Value else if event get Property equals I Action CHECKED Object val event get New Value if val instanceof Boolean set Checked Boolean val boolean Value else if event get Property equals I Action TEXT Object val event get New Value if val instanceof String set Text String val else if event get Property equals I Action TOOL TIP TEXT Object val event get New Value if val instanceof String set Tool Tip Text String val retarget Action set Enabled false set Enabled false window get Part Service add Part Listener retarget Action I Workbench Part active Part window get Part Service get Active Part if active Part null retarget Action part Activated active Part else if we retarget the handler will look after selection changes window get Selection Service add Selection Listener this refresh Selection add To Action List this super set Help Listener new Help Listener public void help Requested Help Event e Help Listener listener null if retarget Action null listener retarget Action get Help Listener if listener null use our own help listener listener local Help Listener if listener null pass on the event listener help Requested e  WWinPluginAction WWinPluginAction IConfigurationElement actionElement IWorkbenchWindow actionElement actionElement getAttribute ActionDescriptor ATT_RETARGET TRUE_VALUE allowLabelUpdate actionElement getAttribute ActionDescriptor ATT_ALLOW_LABEL_UPDATE actionElement getAttribute ActionDescriptor ATT_LABEL allowLabelUpdate allowLabelUpdate TRUE_VALUE retargetAction LabelRetargetAction retargetAction RetargetAction retargetAction addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent getProperty IAction getNewValue setEnabled booleanValue getProperty IAction getNewValue setChecked booleanValue getProperty IAction getNewValue setText getProperty IAction TOOL_TIP_TEXT getNewValue setToolTipText retargetAction setEnabled setEnabled getPartService addPartListener retargetAction IWorkbenchPart activePart getPartService getActivePart activePart retargetAction partActivated activePart getSelectionService addSelectionListener refreshSelection addToActionList setHelpListener HelpListener helpRequested HelpEvent HelpListener retargetAction retargetAction getHelpListener localHelpListener helpRequested
Adds an item to the action list private static void add To Action List W Win Plugin Action action static Action List add action  addToActionList WWinPluginAction staticActionList
Removes an item from the action list private static void remove From Action List W Win Plugin Action action static Action List remove action  removeFromActionList WWinPluginAction staticActionList
Creates any actions which belong to an activated plugin public static void refresh Action List Iterator iter static Action List iterator while iter has Next W Win Plugin Action action W Win Plugin Action iter next if action get Delegate null action is Ok To Create Delegate action create Delegate creating the delegate also refreshes its enablement  refreshActionList staticActionList hasNext WWinPluginAction WWinPluginAction getDelegate isOkToCreateDelegate createDelegate
protected I Action Delegate validate Delegate Object obj throws Workbench Exception if obj instanceof I Workbench Window Action Delegate return I Workbench Window Action Delegate obj else throw new Workbench Exception Action must implement I Workbench Window Action Delegate NON NLS 1  IActionDelegate validateDelegate WorkbenchException IWorkbenchWindowActionDelegate IWorkbenchWindowActionDelegate WorkbenchException IWorkbenchWindowActionDelegate
Method declared on Plugin Action protected void init Delegate super init Delegate I Workbench Window Action Delegate get Delegate init window  PluginAction initDelegate initDelegate IWorkbenchWindowActionDelegate getDelegate
Disposes of the action and any resources held public void dispose remove From Action List this if retarget Action null window get Part Service remove Part Listener retarget Action retarget Action dispose retarget Action null window get Selection Service remove Selection Listener this if get Delegate null I Workbench Window Action Delegate get Delegate dispose  removeFromActionList retargetAction getPartService removePartListener retargetAction retargetAction retargetAction getSelectionService removeSelectionListener getDelegate IWorkbenchWindowActionDelegate getDelegate
Returns the action set id public String get Action Set Id return action Set Id  getActionSetId actionSetId
Returns true if the window has been set The window may be null after the constructor is called and before the window is stored We cannot create the delegate at that time public boolean is Ok To Create Delegate return super is Ok To Create Delegate window null retarget Action null  isOkToCreateDelegate isOkToCreateDelegate retargetAction
public void run With Event Event event if retarget Action null super run With Event event return if event null retarget Action run With Event event else retarget Action run  runWithEvent retargetAction runWithEvent retargetAction runWithEvent retargetAction
Sets the action set id public void set Action Set Id String new Action Set Id action Set Id new Action Set Id  setActionSetId newActionSetId actionSetId newActionSetId
The code W Win Plugin Action code implementation of this method declared on code I Action code stores the help listener in a local field The supplied listener is only used if there is no retarget action public void set Help Listener Help Listener listener local Help Listener listener  WWinPluginAction IAction setHelpListener HelpListener localHelpListener
public void set Checked boolean checked super set Checked checked This call may come from the SWT control event handler itself so notify the retarget action to keep things in sync if retarget Action null retarget Action set Checked checked  setChecked setChecked retargetAction retargetAction setChecked
Refresh the selection for the action protected void refresh Selection I Selection selection window get Selection Service get Selection selection Changed selection  refreshSelection ISelection getSelectionService getSelection selectionChanged

Constructs a new instance of code Menu Loader code param delegate The delegate from which the menu will be loaded this value must not be code null code param parent The parent of the menu to be loaded this value must not be code null code private Menu Loader final I Workbench Window Pulldown Delegate2 delegate final Menu parent this delegate delegate this parent parent this control null  MenuLoader MenuLoader IWorkbenchWindowPulldownDelegate2
Constructs a new instance of code Menu Loader code param delegate The delegate from which the menu will be loaded this value must not be code null code param parent The parent of the menu to be loaded this value must not be code null code private Menu Loader final I Workbench Window Pulldown Delegate delegate final Control parent this delegate delegate this parent null this control parent  MenuLoader MenuLoader IWorkbenchWindowPulldownDelegate
Returns the menu loaded if any return the loaded menu or code null code if none private Menu get Menu return menu  getMenu
see I Safe Runnable handle Exception java lang Throwable public void handle Exception Throwable exception Do nothing  ISafeRunnable handleException handleException
see I Safe Runnable run public void run throws Exception if parent null menu delegate get Menu control else menu I Workbench Window Pulldown Delegate2 delegate get Menu parent  ISafeRunnable getMenu IWorkbenchWindowPulldownDelegate2 getMenu
see I Menu Creator get Menu Control public Menu get Menu Control parent I Workbench Window Pulldown Delegate delegate get Pulldown Delegate if delegate null final Menu Loader menu Loader new Menu Loader delegate parent Platform run menu Loader return menu Loader get Menu else return null  IMenuCreator getMenu getMenu IWorkbenchWindowPulldownDelegate getPulldownDelegate MenuLoader menuLoader MenuLoader menuLoader menuLoader getMenu
see I Menu Creator get Menu Menu public Menu get Menu Menu parent I Workbench Window Pulldown Delegate delegate get Pulldown Delegate if delegate instanceof I Workbench Window Pulldown Delegate2 I Workbench Window Pulldown Delegate2 delegate2 I Workbench Window Pulldown Delegate2 delegate final Menu Loader menu Loader new Menu Loader delegate2 parent Platform run menu Loader return menu Loader get Menu return null  IMenuCreator getMenu getMenu IWorkbenchWindowPulldownDelegate getPulldownDelegate IWorkbenchWindowPulldownDelegate2 IWorkbenchWindowPulldownDelegate2 IWorkbenchWindowPulldownDelegate2 MenuLoader menuLoader MenuLoader menuLoader menuLoader getMenu
see I Menu Creator dispose public void dispose do nothing  IMenuCreator
W Win Plugin Pulldown constructor comment param action Element org eclipse core runtime I Configuration Element param id java lang String param window org eclipse ui I Workbench Window public W Win Plugin Pulldown I Configuration Element action Element I Workbench Window window String id int style super action Element window id style menu Proxy new Menu Proxy set Menu Creator menu Proxy  WWinPluginPulldown actionElement IConfigurationElement IWorkbenchWindow WWinPluginPulldown IConfigurationElement actionElement IWorkbenchWindow actionElement menuProxy MenuProxy setMenuCreator menuProxy
protected I Action Delegate validate Delegate Object obj throws Workbench Exception if obj instanceof I Workbench Window Pulldown Delegate return I Workbench Window Pulldown Delegate obj else throw new Workbench Exception Action must implement I Workbench Window Pulldown Delegate NON NLS 1  IActionDelegate validateDelegate WorkbenchException IWorkbenchWindowPulldownDelegate IWorkbenchWindowPulldownDelegate WorkbenchException IWorkbenchWindowPulldownDelegate
Returns the pulldown delegate If it does not exist it is created Can return code null code if delegate creation failed protected I Workbench Window Pulldown Delegate get Pulldown Delegate I Action Delegate delegate get Delegate if delegate null create Delegate delegate get Delegate return I Workbench Window Pulldown Delegate delegate  IWorkbenchWindowPulldownDelegate getPulldownDelegate IActionDelegate getDelegate createDelegate getDelegate IWorkbenchWindowPulldownDelegate

I Adapter Factory factory new I Adapter Factory public Class get Adapter List return new Class Standby Part class Intro Part Presentation class  IAdapterFactory IAdapterFactory getAdapterList StandbyPart IntroPartPresentation
public Object get Adapter Object adaptable Object Class adapter Type if adaptable Object instanceof Customizable Intro Part return null if adapter Type equals Standby Part class return get Standby Part else if adapter Type equals Intro Part Presentation class return get Presentation else return null  getAdapter adaptableObject adapterType adaptableObject CustomizableIntroPart adapterType StandbyPart getStandbyPart adapterType IntroPartPresentation getPresentation
public Customizable Intro Part register adapter to hide standbypart Platform get Adapter Manager register Adapters factory Customizable Intro Part class model can not be loaded here because the config Element of this part is still not loaded here  CustomizableIntroPart getAdapterManager registerAdapters CustomizableIntroPart configElement
public void init I Intro Site site I Memento memento throws Part Init Exception super init site memento load the correct model based in the current Intro Part id Set the Intro Part Id in the manager class String intro Id get Configuration Element get Attribute id NON NLS 1 Extension Point Manager extension Point Manager Intro Plugin get Default get Extension Point Manager extension Point Manager set Intro Id intro Id model extension Point Manager get Current Model if model null model has Valid Config we have a valid config contribution get presentation Make sure you pass corret memento presentation model get Presentation if presentation null presentation init this get Memento memento MEMENTO PRESENTATION TAG standby part is not created here for performance cache memento and detemine if we have a cached standby part this memento memento restore Standby need To Restore Standby memento add the registry listerner for dynamic awarness Platform get Extension Registry add Registry Change Listener this I Intro Constants PLUGIN ID if model null model has Valid Config Dialog Util display Error Message site get Shell Customizable Intro Part config Not Found NON NLS 1 new Object Model Loader Util get Log String get Configuration Element null null  IIntroSite IMemento PartInitException IntroPartId introId getConfigurationElement getAttribute ExtensionPointManager extensionPointManager IntroPlugin getDefault getExtensionPointManager extensionPointManager setIntroId introId extensionPointManager getCurrentModel hasValidConfig getPresentation getMemento MEMENTO_PRESENTATION_TAG restoreStandby needToRestoreStandby getExtensionRegistry addRegistryChangeListener IIntroConstants PLUGIN_ID hasValidConfig DialogUtil displayErrorMessage getShell CustomizableIntroPart configNotFound ModelLoaderUtil getLogString getConfigurationElement
Creates the UI based on how the Inro Part has been configured see org eclipse ui I Workbench Part create Part Control org eclipse swt widgets Composite public void create Part Control Composite parent container new Composite parent SWT NULL Stack Layout layout new Stack Layout layout margin Height 0 layout margin Height 0 container set Layout layout if model null model has Valid Config presentation create Part Control container do not create the standby part here for performance  InroPart IWorkbenchPart createPartControl createPartControl StackLayout StackLayout marginHeight marginHeight setLayout hasValidConfig createPartControl
Determine if we need to recreate a standby part Return true if we have a standby part memento that is not for the empty part AND stangby memento has been tagged for restore ie it was open when workbench closed param memento return private boolean need To Restore Standby I Memento memento If we have a standby memento it means we closed with standby open and so recreate it I Memento standby Memento get Memento memento MEMENTO STANDBY PART TAG if standby Memento null return false String restore standby Memento get String MEMENTO RESTORE ATT if restore null return false String cached Standby Part standby Memento get String MEMENTO STANDBY CONTENT PART ID ATT if cached Standby Part null cached Standby Part equals EMPTY STANDBY CONTENT PART return false return cached Standby Part null true false  needToRestoreStandby IMemento IMemento standbyMemento getMemento MEMENTO_STANDBY_PART_TAG standbyMemento standbyMemento getString MEMENTO_RESTORE_ATT cachedStandbyPart standbyMemento getString MEMENTO_STANDBY_CONTENT_PART_ID_ATT cachedStandbyPart cachedStandbyPart EMPTY_STANDBY_CONTENT_PART cachedStandbyPart
public void standby State Changed boolean standby do this only if there is a valid config if model null model has Valid Config return if standby we started of not in standby no need to restore standby restore Standby false boolean is Standby Part Needed is Standby Part Needed is Standby Part Needed is Standby Part Needed restore Standby if standby Part null standby is Standby Part Needed if standby part is not created yet create it only if in standby and we need to create Standby Part handle Set Focus is Standby Part Needed set Top Control is Standby Part Needed get Standby Control get Presentation Control triger state change in presentation to enable disable toobar actions For this we need to diable actions as long as we are in standby or we need to show standby part presentation standby State Changed standby is Standby Part Needed  standbyStateChanged hasValidConfig restoreStandby isStandbyPartNeeded isStandbyPartNeeded isStandbyPartNeeded isStandbyPartNeeded restoreStandby standbyPart isStandbyPartNeeded createStandbyPart handleSetFocus isStandbyPartNeeded setTopControl isStandbyPartNeeded getStandbyControl getPresentationControl standbyStateChanged isStandbyPartNeeded
Returns true if we need to show the standby part False in all other cases This basically overrides the workbench behavior of Standby normal states The design here is that if the show Standby Part flag is set then we always need to show the standby part param standby return private boolean is Standby Part Needed return container get Data SHOW STANDBY PART null false true  showStandbyPart isStandbyPartNeeded getData SHOW_STANDBY_PART
private void create Standby Part standby Part new Standby Part model standby Part init this get Memento memento MEMENTO STANDBY PART TAG standby Part create Part Control Composite get Control restore Standby false container set Data SHOW STANDBY PART true NON NLS 1  createStandbyPart standbyPart StandbyPart standbyPart getMemento MEMENTO_STANDBY_PART_TAG standbyPart createPartControl getControl restoreStandby setData SHOW_STANDBY_PART
private void handle Set Focus boolean standby if standby standby part is null when Intro has not gone into standby state yet if standby Part null standby Part set Focus else presentation set Focus  handleSetFocus standbyPart standbyPart setFocus setFocus
see org eclipse ui I Workbench Part set Focus public void set Focus handle Set Focus Intro Plugin is Intro Standby  IWorkbenchPart setFocus setFocus handleSetFocus IntroPlugin isIntroStandby
private void set Top Control Control c container has stack layout safe to cast Stack Layout layout Stack Layout container get Layout layout top Control c container layout  setTopControl StackLayout StackLayout getLayout topControl
private Control get Presentation Control return container get Children 0  getPresentationControl getChildren
private Control get Standby Control the Containet top control may have only one child if the stanndby part is not created yet This happens if the intro never goes into standby Doing this for performance if standby Part null return container get Children 1 return null  getStandbyControl standbyPart getChildren
private Intro Part Presentation get Presentation return presentation  IntroPartPresentation getPresentation
public void dispose super dispose call dispose on both parts if presentation null presentation dispose if standby Part null standby Part dispose clear all loaded models since we are disposing of the Intro Part Intro Plugin get Default get Extension Point Manager clear clean platform adapter Platform get Adapter Manager unregister Adapters factory Customizable Intro Part class if model null model has Valid Config Platform get Extension Registry remove Registry Change Listener this  standbyPart standbyPart IntroPlugin getDefault getExtensionPointManager getAdapterManager unregisterAdapters CustomizableIntroPart hasValidConfig getExtensionRegistry removeRegistryChangeListener
return Returns the standby Part private Standby Part get Standby Part return standby Part  standbyPart StandbyPart getStandbyPart standbyPart
Returns the primary control associated with this Intro part return the SWT control which displays this Intro part s content or code null code if this standby part s controls have not yet been created public Control get Control return container  getControl
public void save State I Memento memento give presentation and standby part there own children to create a name space for each But save either the presentation or the standby part as needing to be restored This way if we close with a standby mode we dont get the cached standby part Find out if presentation or standby is at the top and restore them Container has stack layout safe to cast boolean restore Presentation false Stack Layout layout Stack Layout container get Layout if get Presentation Control equals layout top Control restore Presentation true I Memento presentation Memento memento create Child MEMENTO PRESENTATION TAG I Memento standby Part Memento memento create Child MEMENTO STANDBY PART TAG if restore Presentation presentation Memento put String MEMENTO RESTORE ATT true NON NLS 1 else standby Part Memento put String MEMENTO RESTORE ATT true NON NLS 1 if presentation null presentation save State presentation Memento if standby Part null standby Part save State standby Part Memento  saveState IMemento restorePresentation StackLayout StackLayout getLayout getPresentationControl topControl restorePresentation IMemento presentationMemento createChild MEMENTO_PRESENTATION_TAG IMemento standbyPartMemento createChild MEMENTO_STANDBY_PART_TAG restorePresentation presentationMemento putString MEMENTO_RESTORE_ATT standbyPartMemento putString MEMENTO_RESTORE_ATT saveState presentationMemento standbyPart standbyPart saveState standbyPartMemento
private I Memento get Memento I Memento memento String key if memento null return null return memento get Child key  IMemento getMemento IMemento getChild
public void run String current Page Id model get Current Page Id clear model Extension Point Manager get Inst clear refresh to new model model Extension Point Manager get Inst get Current Model reuse existing presentation since we just nulled it model set Presentation get Presentation keep same page on refresh No need for notification here model set Current Page Id current Page Id false if presentation null presentation registry Changed event  currentPageId getCurrentPageId ExtensionPointManager getInst ExtensionPointManager getInst getCurrentModel setPresentation getPresentation setCurrentPageId currentPageId registryChanged
Support dynamic awarness see org eclipse core runtime I Registry Change Listener registry Changed org eclipse core runtime I Registry Change Event public void registry Changed final I Registry Change Event event Clear cached models first then update UI by delegating to implementation wrap in synch Exec because notification is asynchronous The design here is that the notification is centralized here then this event propagates and each receiving class reacts accordingly Display get Default sync Exec new Runnable public void run String current Page Id model get Current Page Id clear model Extension Point Manager get Inst clear refresh to new model model Extension Point Manager get Inst get Current Model reuse existing presentation since we just nulled it model set Presentation get Presentation keep same page on refresh No need for notification here model set Current Page Id current Page Id false if presentation null presentation registry Changed event  IRegistryChangeListener registryChanged IRegistryChangeEvent registryChanged IRegistryChangeEvent synchExec getDefault syncExec currentPageId getCurrentPageId ExtensionPointManager getInst ExtensionPointManager getInst getCurrentModel setPresentation getPresentation setCurrentPageId currentPageId registryChanged

Called to run this intro command The properties represents the key value pairs extracted from the intro URL query param site param params 

Executes whatever valid Intro command is embedded in this Intro URL Returns true if action succeeded and false otherwise 
public boolean execute return Returns the command imbedded in this URL public String get Action  getAction
Return a parameter defined in the Intro URL Returns null if the parameter is not defined param parameter Id the id of the parameter being requested return the value of the parameter or code null code if the parameter is not defined  parameterId

Non instantiable private IntroURL Factory do nothing  IntroURLFactory
Parses the given string and returns an IntroURL if the string is a valid Intro URL Returns null in all other cases Example usage pre p String Buffer url new String Buffer url append quot http org eclipse ui intro show Standby quot url append quot plugin Id org eclipse pde ui quot url append quot amp quot url append quot part Id org eclipse pde ui sample Standby Part quot url append quot amp quot url append quot input quot url append sample Id I IntroURL introURL IntroURL Factory create IntroURL url to String if introURL null introURL execute pre param url the url to construct an IntroURL from return an IntroURL or code null code if the url is invalid public static I IntroURL create IntroURL String url IntroURL Parser parser new IntroURL Parser url if parser has Intro Url IntroURL introURL parser get IntroURL return introURL return null  StringBuffer StringBuffer showStandby pluginId partId sampleStandbyPart sampleId IIntroURL IntroURLFactory createIntroURL toString IIntroURL createIntroURL IntroURLParser IntroURLParser hasIntroUrl getIntroURL

Creates the SWT controls for this standby part p Clients should not call this method The intro framework calls this method when it needs to param parent the parent control param toolkit the form toolkit being used by the I Intro Part implementation  IIntroPart
Returns the primary control associated with this standby part return the SWT control which displays this standby part s content or code null code if this standby part s controls have not yet been created 
Initializes this intro standby content part with the given intro site A memento is passed to the part which contains a snapshot of the part state from a previous session Where possible the part should try to recreate that state p This method is automatically called by the workbench shortly after part construction It marks the start of this parts lifecycle Clients must not call this method p param intro Part the intro part hosting this stanndby content part param memento this part state or code null code if there is no previous saved state exception Part Init Exception if this part was not initialized successfully  introPart PartInitException
Sets the input to show in this standby part Note that input can be null such as when the part if created through an Intro URL that does not have an input specified or when this standby part is being recreated from a previous workbench session In this case the standby part is responsible for handling a null input and recreating itself from a cached I Memento param input the input object to be used by this standby part  IMemento
Asks this standby part to take focus p Clients should not call this method the intro framework calls this method at appropriate times p 
Disposes of this standby part p Clients should not call this method The intro framework calls this method when the Customizable Intro Part is closed p  IntroPart
Saves the object state within a memento p This method is automatically called by the workbench at appropriate times Clients must not call this method directly p param memento a memento to receive the object state 

Closes the given intro part param part the intro part return code true code if the intro part was closed and code false code otherwise code false code is returned if part is code null code or it is not the intro part returned by link get Intro  getIntro
Returns the intro part Returns code null code if there is no intro part if it has been previously closed via link close Intro I Intro Part or if there is an intro part but link show Intro I Workbench Window boolean has not yet been called to create it return the intro part or code null code if none is available  closeIntro IIntroPart showIntro IWorkbenchWindow
Return whether an intro is available Note that this checks whether there is an applicable intro part that could be instantiated and shown to the user Use link get Intro to discover whether an intro part has already been created return code true code if there is an intro that could be shown and code false code if there is no intro  getIntro
Return the standby state of the given intro part param part the intro part return code true code if the part in its partially visible standy mode and code false code if in its fully visible state code false code is returned if part is code null code or it is not the intro part returned by link get Intro  getIntro
Sets the standby state of the given intro part Intro part usually should render themselves differently in the full and standby modes In standby mode the part should be partially visible to the user but otherwise allow them to work In full mode the part should be fully visible and be the center of the user s attention p This method does nothing if the part is code null code or is not the intro part returned by link get Intro p param part the intro part or code null code param standby code true code to put the part in its partially visible standy mode and code false code to make it fully visible  getIntro
Shows the intro part in the given workbench window If the intro part has not been created yet one will be created If the intro part is currently being shown in some workbench window that other window is made active param preferred Window the preferred workbench window or code null code to indicate the currently active workbench window param standby code true code to put the intro part in its partially visible standy mode and code false code to make it fully visible return the newly created or existing intro part or code null code if no intro part is available or if code preferred Window code is code null code and there is no currently active workbench window public I Intro Part show Intro I Workbench Window preferred Window  preferredWindow preferredWindow IIntroPart showIntro IWorkbenchWindow preferredWindow

Returns the site for this intro part return the intro site 
Initializes this intro part with the given intro site A memento is passed to the part which contains a snapshot of the part state from a previous session Where possible the part should try to recreate that state p This method is automatically called by the workbench shortly after part construction It marks the start of the intro s lifecycle Clients must not call this method p param site the intro site param memento the intro part state or code null code if there is no previous saved state exception Part Init Exception if this part was not initialized successfully  PartInitException
Sets the standby state of this intro part An intro part should render itself differently in the full and standby modes In standby mode the part should be partially visible to the user but otherwise allow them to work In full mode the part should be fully visible and be the center of the user s attention p This method is automatically called by the workbench at appropriate times Clients must not call this method directly call link I Intro Manager set Intro Standby I Intro Part boolean instead p param standby code true code to put this part in its partially visible standy mode and code false code to make it fully visible  IIntroManager setIntroStandby IIntroPart
Saves the object state within a memento p This method is automatically called by the workbench at appropriate times Clients must not call this method directly p param memento a memento to receive the object state 
Adds a listener for changes to properties of this intro part Has no effect if an identical listener is already registered p The properties ids are as follows ul li code I Intro Part PROP TITLE code li ul p param listener a property listener  IIntroPart PROP_TITLE
Creates the SWT controls for this intro part p Clients should not call this method the workbench calls this method when it needs to which may be never p p For implementors this is a multi step process ol li Create one or more controls within the parent li li Set the parent layout as needed li li Register any global actions with the code I Action Service code li li Register any popup menus with the code I Action Service code li li Register a selection provider with the code I Selection Service code optional li ol p param parent the parent control  IActionService IActionService ISelectionService
Disposes of this intro part p This is the last method called on the code I Intro Part code At this point the part controls if they were ever created have been disposed as part of an SWT composite There is no guarantee that create Part Control has been called so the part controls may never have been created p p Within this method a part may release any resources fonts images etc nbsp held by this part It is also very important to deregister all listeners from the workbench p p Clients should not call this method the workbench calls this method at appropriate times p  IIntroPart createPartControl
Returns the title image of this intro part If this value changes the part must fire a property listener event with link I Intro Part PROP TITLE p The title image is usually used to populate the title bar of this part s visual container Since this image is managed by the part itself callers must b not b dispose the returned image p return the title image  IIntroPart PROP_TITLE
Removes the given property listener from this intro part Has no affect if an identical listener is not registered param listener a property listener 
Asks this part to take focus within the workbench p Clients should not call this method the workbench calls this method at appropriate times To have the workbench activate a part use link I Intro Manager show Intro I Workbench Window boolean p  IIntroManager showIntro IWorkbenchWindow

Returns the part registry extension id for this intro site s part p The name comes from the code id code attribute in the configuration element p return the registry extension id 
Returns the unique identifier of the plug in that defines this intro site s part return the unique identifier of the declaring plug in see org eclipse core runtime I Plugin Descriptor get Unique Identifier  IPluginDescriptor getUniqueIdentifier
Returns the key binding service in use p The part will access this service to register all of its actions to set the active scope p return the key binding service in use 
Returns the action bars for this part site The intro part has exclusive use of its site s action bars return the action bars 

public interface I Object Action Delegate extends I Action Delegate Sets the active part for the delegate The active part is commonly used to get a working context for the action such as the shell for any dialog which is needed p This method will be called every time the action appears in a popup menu The target Part may change with each invocation p param action the action proxy that handles presentation portion of the action param target Part the new part target  IObjectActionDelegate IActionDelegate targetPart targetPart

Adds an action set with the given id to this page layout The id must name an action set contributed to the workbench s extension point named code org eclipse ui action Set code param action Set Id the action set id  actionSet actionSetId
public void add Action Set String action Set Id Adds the view with the given id to the page layout as a fast view The id must name a view contributed to the workbench s view extension point named code org eclipse ui views code param id the id of the view to be added since 2 0  addActionSet actionSetId
public void add Fast View String id Adds the view with the given id to the page layout as a fast view with the given width ratio The id must name a view contributed to the workbench s view extension point named code org eclipse ui views code param id the id of the view to be added param ratio the percentage of the workbench the fast view will cover since 2 0  addFastView
public void add Fast View String id float ratio Adds a creation wizard to the File New menu The id must name a new wizard extension contributed to the workbench s extension point named code org eclipse ui new Wizards code param id the wizard id  addFastView newWizards
public void add New Wizard Shortcut String id Adds a perspective shortcut to the Perspective menu The id must name a perspective extension contributed to the workbench s extension point named code org eclipse ui perspectives code param id the perspective id  addNewWizardShortcut
public void add Perspective Shortcut String id Adds a placeholder for a view with the given id to this page layout A view placeholder is used to define the position of a view before the view appears Initially it is invisible however if the user ever opens a view with the same id as a placeholder the view will replace the placeholder as it is being made visible The id must name a view contributed to the workbench s view extension point named code org eclipse ui views code param view Id the view id param relationship the position relative to the reference part one of code TOP code code BOTTOM code code LEFT code or code RIGHT code param ratio a ratio specifying how to divide the space currently occupied by the reference part in the range code 0 05f code to code 0 95f code Values outside this range will be clipped to facilitate direct manipulation For a vertical split the part on top gets the specified ratio of the current space and the part on bottom gets the rest Likewise for a horizontal split the part at left gets the specified ratio of the current space and the part at right gets the rest param ref Id the id of the reference part either a view id a folder id or the special editor area id returned by code get Editor Area code  addPerspectiveShortcut viewId refId getEditorArea
Adds an item to the Show In prompter The id must name a view contributed to the workbench s view extension point named code org eclipse ui views code param id the view id since 2 1 
Adds a view to the Show View menu The id must name a view contributed to the workbench s view extension point named code org eclipse ui views code param id the view id 
public void add Show View Shortcut String id Adds a view with the given id to this page layout The id must name a view contributed to the workbench s view extension point named code org eclipse ui views code param view Id the view id param relationship the position relative to the reference part one of code TOP code code BOTTOM code code LEFT code or code RIGHT code param ratio a ratio specifying how to divide the space currently occupied by the reference part in the range code 0 05f code to code 0 95f code Values outside this range will be clipped to facilitate direct manipulation For a vertical split the part on top gets the specified ratio of the current space and the part on bottom gets the rest Likewise for a horizontal split the part at left gets the specified ratio of the current space and the part at right gets the rest param ref Id the id of the reference part either a view id a folder id or the special editor area id returned by code get Editor Area code  addShowViewShortcut viewId refId getEditorArea
public void add View String view Id int relationship float ratio String ref Id Creates and adds a new folder with the given id to this page layout The position and relative size of the folder is expressed relative to a reference part param folder Id the id for the new folder This must be unique within the layout to avoid collision with other parts param relationship the position relative to the reference part one of code TOP code code BOTTOM code code LEFT code or code RIGHT code param ratio a ratio specifying how to divide the space currently occupied by the reference part in the range code 0 05f code to code 0 95f code Values outside this range will be clipped to facilitate direct manipulation For a vertical split the part on top gets the specified ratio of the current space and the part on bottom gets the rest Likewise for a horizontal split the part at left gets the specified ratio of the current space and the part at right gets the rest param ref Id the id of the reference part either a view id a folder id or the special editor area id returned by code get Editor Area code return the new folder  addView viewId refId folderId refId getEditorArea
public I Folder Layout create Folder String folder Id int relationship float ratio String ref Id Creates and adds a placeholder for a new folder with the given id to this page layout The position and relative size of the folder is expressed relative to a reference part param folder Id the id for the new folder This must be unique within the layout to avoid collision with other parts param relationship the position relative to the reference part one of code TOP code code BOTTOM code code LEFT code or code RIGHT code param ratio a ratio specifying how to divide the space currently occupied by the reference part in the range code 0 05f code to code 0 95f code Values outside this range will be clipped to facilitate direct manipulation For a vertical split the part on top gets the specified ratio of the current space and the part on bottom gets the rest Likewise for a horizontal split the part at left gets the specified ratio of the current space and the part at right gets the rest param ref Id the id of the reference part either a view id a folder id or the special editor area id returned by code get Editor Area code return a placeholder for the new folder since 2 0  IFolderLayout createFolder folderId refId folderId refId getEditorArea
Returns the special identifier for the editor area in this page layout The identifier for the editor area is also stored in code ID EDITOR AREA code p The editor area is automatically added to each layout before anything else It should be used as the point of reference when adding views to a layout p return the special id of the editor area  ID_EDITOR_AREA
public String get Editor Area Returns whether the page s layout will show the editor area return code true code when editor area visible code false code otherwise  getEditorArea
public boolean is Editor Area Visible Show or hide the editor area for the page s layout param show Editor Area code true code to show the editor area code false code to hide the editor area  isEditorAreaVisible showEditorArea
public void set Editor Area Visible boolean show Editor Area Returns the number of open editors before reusing editors or 1 if the preference settings should be used instead return the number of open editors before reusing editors or 1 if the preference settings should be used instead deprecated this always returns 1 as of Eclipse 2 1  setEditorAreaVisible showEditorArea
public int get Editor Reuse Threshold Sets the number of open editors before reusing editors If 0 the user preference settings will be used param open Editors the number of open editors deprecated this method has no effect as of Eclipse 2 1  getEditorReuseThreshold openEditors
public void set Editor Reuse Threshold int open Editors Sets whether this layout is fixed In a fixed layout layout parts cannot be moved or zoomed and the initial set of views cannot be closed param is Fixed code true code if this layout is fixed code false code if not since 3 0  setEditorReuseThreshold openEditors isFixed
public void set Fixed boolean is Fixed Returns code true code if this layout is fixed code false code if not In a fixed layout layout parts cannot be moved or zoomed and the initial set of views cannot be closed The default is code false code return code true code if this layout is fixed code false code if not since 3 0  setFixed isFixed
Returns the layout for the view or placeholder with the given id in this page layout Returns code null code if the specified view or placeholder is unknown to the layout param view Id the view id return the view layout or code null code since 3 0  viewId
Adds a standalone view with the given id to this page layout A standalone view cannot be docked together with other views A standalone view s title can optionally be hidden If hidden then any controls typically shown with the title such as the close button are also hidden p The id must name a view contributed to the workbench s view extension point named code org eclipse ui views code p param view Id the view id param show Title code true code to show the title and related controls code false code to hide them param relationship the position relative to the reference part one of code TOP code code BOTTOM code code LEFT code or code RIGHT code param ratio a ratio specifying how to divide the space currently occupied by the reference part in the range code 0 05f code to code 0 95f code Values outside this range will be clipped to facilitate direct manipulation For a vertical split the part on top gets the specified ratio of the current space and the part on bottom gets the rest Likewise for a horizontal split the part at left gets the specified ratio of the current space and the part at right gets the rest param ref Id the id of the reference part either a view id a folder id or the special editor area id returned by code get Editor Area code since 3 0 Note should we allow regular views titles to be hidden public void add Standalone View String view Id boolean show Title  viewId showTitle refId getEditorArea addStandaloneView viewId showTitle

public interface I Page Listener Notifies this listener that the given page has been activated param page the page that was activated see I Workbench Window set Active Page  IPageListener IWorkbenchWindow setActivePage
public void page Activated I Workbench Page page Notifies this listener that the given page has been closed param page the page that was closed see I Workbench Page close  pageActivated IWorkbenchPage IWorkbenchPage
public void page Closed I Workbench Page page Notifies this listener that the given page has been opened param page the page that was opened see I Workbench Window open Page  pageClosed IWorkbenchPage IWorkbenchWindow openPage

public interface I Page Service Adds the given listener for page lifecycle events Has no effect if an identical listener is already registered param listener a page listener  IPageService
public void add Page Listener I Page Listener listener Adds the given listener for a page s perspective lifecycle events Has no effect if an identical listener is already registered param listener a perspective listener  addPageListener IPageListener
return the active page or code null code if no page is currently active public I Workbench Page get Active Page  IWorkbenchPage getActivePage
public I Workbench Page get Active Page Removes the given page listener Has no affect if an identical listener is not registered param listener a page listener  IWorkbenchPage getActivePage
public void remove Page Listener I Page Listener listener Removes the given page s perspective listener Has no affect if an identical listener is not registered param listener a perspective listener  removePageListener IPageListener

Notifies this listener that the given part has been activated param part the part that was activated see I Workbench Page activate  IWorkbenchPage
Notifies this listener that the given part has been brought to the top p These events occur when an editor is brought to the top in the editor area or when a view is brought to the top in a page book with multiple views They are normally only sent when a part is brought to the top programmatically via code I Perspective bring To Top code When a part is activated by the user clicking on it only code part Activated code is sent p param part the part that was surfaced see I Workbench Page bring To Top  IPerspective bringToTop partActivated IWorkbenchPage bringToTop
Notifies this listener that the given part has been closed param part the part that was closed see I Workbench Page hide View  IWorkbenchPage hideView
Notifies this listener that the given part has been deactivated param part the part that was deactivated see I Workbench Page activate  IWorkbenchPage
Notifies this listener that the given part has been opened param part the part that was opened see I Workbench Page show View  IWorkbenchPage showView

Notifies this listener that the given part has been activated param part Ref the part that was activated see I Workbench Page activate public void part Activated I Workbench Part Reference part Ref  partRef IWorkbenchPage partActivated IWorkbenchPartReference partRef
Notifies this listener that the given part has been brought to the top p These events occur when an editor is brought to the top in the editor area or when a view is brought to the top in a page book with multiple views They are normally only sent when a part is brought to the top programmatically via code I Perspective bring To Top code When a part is activated by the user clicking on it only code part Activated code is sent p param part Ref the part that was surfaced see I Workbench Page bring To Top  IPerspective bringToTop partActivated partRef IWorkbenchPage bringToTop
Notifies this listener that the given part has been closed p Note that if other perspectives in the same page share the view this notification is not sent It is only sent when the view is being removed from the page entirely it is being disposed p param part Ref the part that was closed see I Workbench Page hide View  partRef IWorkbenchPage hideView
Notifies this listener that the given part has been deactivated param part Ref the part that was deactivated see I Workbench Page activate  partRef IWorkbenchPage
Notifies this listener that the given part has been opened p Note that if other perspectives in the same page share the view this notification is not sent It is only sent when the view is being newly opened in the page it is being created p param part Ref the part that was opened see I Workbench Page show View  partRef IWorkbenchPage showView
Notifies this listener that the given part is hidden or obscured by another part param part Ref the part that is hidden or obscured by another part  partRef
Notifies this listener that the given part is visible param part Ref the part that is visible  partRef
Notifies this listener that the given part s input was changed param part Ref the part whose input was changed  partRef

Adds the given listener for part lifecycle events Has no effect if an identical listener is already registered param listener a part listener 
Adds the given listener for part lifecycle events Has no effect if an identical listener is already registered param listener a part listener 
Returns the active part return the active part or code null code if no part is currently active 
Returns the active part reference return the active part reference or code null code if no part is currently active 
Removes the given part listener Has no affect if an identical listener is not registered param listener a part listener 
Removes the given part listener Has no affect if an identical listener is not registered param listener a part listener 

public interface I Path Editor Input extends I Editor Input Returns the local file system path of the file underlying this editor input return a local file system path  IPathEditorInput IEditorInput

public interface I Persistable Element Returns the id of the element factory which should be used to re create this object p Factory ids are declared in extensions to the standard extension point code org eclipse ui element Factories code p return the element factory id see I Element Factory  IPersistableElement elementFactories IElementFactory
public String get Factory Id Saves the state of the object in the given memento param memento the storage area for object s state  getFactoryId

public interface I Perspective Descriptor Returns the description of this perspective This is the value of its code description code attribute return the description since 3 0  IPerspectiveDescriptor
public String get Description Returns this perspective s id For perspectives declared via an extension this is the value of its code id code attribute return the perspective id  getDescription
public String get Id Returns the descriptor of the image for this perspective return the descriptor of the image to display next to this perspective  getId
public Image Descriptor get Image Descriptor Returns this perspective s label For perspectives declared via an extension this is the value of its code label code attribute return the label  ImageDescriptor getImageDescriptor

public interface I Perspective Factory Creates the initial layout for a page p Implementors of this method may add additional views to a perspective The perspective already contains an editor folder identified by the result of code I Page Layout get Editor Area code Additional views should be added to the layout using this value as the initial point of reference p param layout the page layout  IPerspectiveFactory IPageLayout getEditorArea

public interface I Perspective Listener Notifies this listener that the given page s perspective has been activated param page the page whose perspective was activated param perspective the perspective descriptor that was activated see I Workbench Page set Perspective  IPerspectiveListener IWorkbenchPage setPerspective
public void perspective Activated I Workbench Page page I Perspective Descriptor perspective Notifies this listener that the given page s perspective has changed in some way for example editor area hidden perspective reset view show hide editor open close etc param page the page whose perspective was reset param perspective the perspective descriptor param change Id one of the code CHANGE  code constants on I Workbench Page  perspectiveActivated IWorkbenchPage IPerspectiveDescriptor changeId CHANGE_ IWorkbenchPage

Notifies this listener that a part in the given page s perspective has changed in some way for example view show hide editor open close etc param page the workbench page containing the perspective param perspective the descriptor for the changed perspective param part Ref the reference to the affected part param change Id one of the code CHANGE  code constants on I Workbench Page  partRef changeId CHANGE_ IWorkbenchPage

public interface I Perspective Registry Clones an existing perspective param id the id for the cloned perspective which must not already be used by any registered perspective param label the label assigned to the cloned perspective param desc the perspective to clone return the cloned perspective descriptor since 3 0 public I Perspective Descriptor clone Perspective String id String label  IPerspectiveRegistry IPerspectiveDescriptor clonePerspective
I Perspective Descriptor desc throws Illegal Argument Exception Finds and returns the registered perspective with the given perspective id param perspective Id the perspective id return the perspective or code null code if none see I Perspective Descriptor get Id  IPerspectiveDescriptor IllegalArgumentException perspectiveId IPerspectiveDescriptor getId
public I Perspective Descriptor find Perspective With Id String perspective Id Finds and returns the registered perspective with the given label param label the label return the perspective or code null code if none see I Perspective Descriptor get Label  IPerspectiveDescriptor findPerspectiveWithId perspectiveId IPerspectiveDescriptor getLabel
public I Perspective Descriptor find Perspective With Label String label Returns the id of the default perspective for the workbench This identifies one perspective extension within the workbench s perspective registry p On startup of the platform UI the default perspective is determined using a multistep process p ol li Initially the code Resource Perspective code is default li li If a single perspective extension within the registry has a b default b attribute it will become the default perspective If two or more extensions have the b default b attribute the registry will ignore all of them and select the code Resource Perspective code li li If the user has set the default perspective within the code Perspective code dialog their preference will be selected over all others li ol p return the default perspective id will never be code null code Note revise this is out of date even before RCP  IPerspectiveDescriptor findPerspectiveWithLabel
public String get Default Perspective Returns a list of the perspectives known to the workbench return a list of perspectives  getDefaultPerspective
public I Perspective Descriptor get Perspectives Sets the default perspective for the workbench to the given perspective id The id must correspond to one perspective extension within the workbench s perspective registry param id a perspective id must not be code null code  IPerspectiveDescriptor getPerspectives
public void set Default Perspective String id Reverts a perspective back to its original definition as specified in the plug in manifest param persp To Revert the perspective to revert since 3 0  setDefaultPerspective perspToRevert

public interface I Placeholder Folder Layout Adds an invisible placeholder for a view with the given id to this folder A view placeholder is used to define the position of a view before the view appears Initially it is invisible however if the user ever opens a view with the same id as a placeholder the view will replace the placeholder as it is being made visible The id must name a view contributed to the workbench s view extension point named code org eclipse ui views code param view Id the view id  IPlaceholderFolderLayout viewId

return the local id of the contribution Must not be code null code This should correspond to the extension specific identifier for a given contribution 
return the id of the originating plugin Can be code null code if this contribution did not originate from a plugin 

public interface I Property Listener Indicates that a property has changed param source the object whose property has changed param prop Id the id of the property which has changed property ids are generally defined as constants on the source class  IPropertyListener propId

public interface I Reusable Editor extends I Editor Part Sets the input to this editor param input the editor input  IReusableEditor IEditorPart

Saves the contents of this part p If the save is successful the part should fire a property changed event reflecting the new dirty state code PROP DIRTY code property p p If the save is cancelled through user action or for any other reason the part should invoke code set Cancelled code on the code I Progress Monitor code to inform the caller p p This method is long running progress and cancellation are provided by the given progress monitor p param monitor the progress monitor  PROP_DIRTY setCancelled IProgressMonitor
Saves the contents of this part to another object p Implementors are expected to open a Save As dialog where the user will be able to select a new name for the contents After the selection is made the contents should be saved to that new name During this operation a code I Progress Monitor code should be used to indicate progress p p If the save is successful the part fires a property changed event reflecting the new dirty state code PROP DIRTY code property p  IProgressMonitor PROP_DIRTY
Returns whether the contents of this part have changed since the last save operation If this value changes the part must fire a property listener event with code PROP DIRTY code p return code true code if the contents have been modified and need saving and code false code if they have not changed since the last save  PROP_DIRTY
Returns whether the Save As operation is supported by this part return code true code if Save As is supported and code false code if not supported 
Returns whether the contents of this part should be saved when the part is closed return code true code if the contents of the part should be saved on close and code false code if the contents are expendable 

public interface I Selection Listener Notifies this listener that the selection has changed p This method is called when the selection changes from one to a code non null code value but not when the selection changes to code null code If there is a requirement to be notified in the latter scenario implement code I Null Selection Listener code The event will be posted through this method p param part the workbench part containing the selection param selection the current selection This may be code null code if code I Null Selection Listener code is implemented  ISelectionListener INullSelectionListener INullSelectionListener

public interface I Selection Service Adds the given selection listener Has no effect if an identical listener is already registered param listener a selection listener  ISelectionService
public void add Selection Listener I Selection Listener listener Adds a part specific selection listener which is notified when selection changes in the part with the given id This is independent of part activation the part need not be active for notification to be sent p When the part is created the listener is passed the part s initial selection When the part is disposed the listener is passed a code null code selection but only if the listener implements code I Null Selection Listener code p param part Id the id of the part to track param listener a selection listener since 2 0  addSelectionListener ISelectionListener INullSelectionListener partId
public void add Selection Listener String part Id I Selection Listener listener Adds the given post selection listener It is equivalent to selection changed if the selection was triggered by the mouse but it has a delay if the selection is triggered by the keyboard arrows Has no effect if an identical listener is already registered Note Works only for Structured Viewer s param listener a selection listener  addSelectionListener partId ISelectionListener StructuredViewer
public void add Post Selection Listener I Selection Listener listener Adds a part specific selection listener which is notified when selection changes in the part with the given id This is independent of part activation the part need not be active for notification to be sent p When the part is created the listener is passed the part s initial selection When the part is disposed the listener is passed a code null code selection but only if the listener implements code I Null Selection Listener code p param part Id the id of the part to track param listener a selection listener since 2 0  addPostSelectionListener ISelectionListener INullSelectionListener partId
public void add Post Selection Listener String part Id I Selection Listener listener Returns the current selection in the active part If the selection in the active part is em undefined em the active part has no selection provider the result will be code null code return the current selection or code null code if undefined  addPostSelectionListener partId ISelectionListener
public I Selection get Selection Returns the current selection in the part with the given id If the part is not open or if the selection in the active part is em undefined em the active part has no selection provider the result will be code null code param part Id the id of the part return the current selection or code null code if undefined since 2 0  ISelection getSelection partId
public I Selection get Selection String part Id Removes the given selection listener Has no effect if an identical listener is not registered param listener a selection listener  ISelection getSelection partId
public void remove Selection Listener I Selection Listener listener Removes the given part specific selection listener Has no effect if an identical listener is not registered for the given part id param part Id the id of the part to track param listener a selection listener since 2 0  removeSelectionListener ISelectionListener partId
public void remove Selection Listener String part Id I Selection Listener listener Removes the given post selection listener Has no effect if an identical listener is not registered param listener a selection listener  removeSelectionListener partId ISelectionListener
public void remove Post Selection Listener I Selection Listener listener Removes the given part specific post selection listener Has no effect if an identical listener is not registered for the given part id param part Id the id of the part to track param listener a selection listener since 2 0  removePostSelectionListener ISelectionListener partId

Retrieves the specified image from the workbench plugin s image registry Note The returned code Image code is managed by the workbench clients must b not b dispose of the returned image param symbolic Name the symbolic name of the image there are constants declared in this interface for build in images that come with the workbench return the image or code null code if not found  symbolicName
Retrieves the image descriptor for specified image from the workbench s image registry Unlike code Image code s image descriptors themselves do not need to be disposed param symbolic Name the symbolic name of the image there are constants declared in this interface for build in images that come with the workbench return the image descriptor or code null code if not found  symbolicName

public interface I Startup Will be called in a separate thread after the workbench initializes p Note that most workbench methods must be called in the UI thread since they may access SWT For example to obtain the current workbench window use code final I Workbench workbench PlatformUI get Workbench workbench get Display async Exec new Runnable public void run I Workbench Window window workbench get Active Workbench Window if window null do something code p see org eclipse swt widgets Display async Exec see org eclipse swt widgets Display sync Exec  IStartup IWorkbench getWorkbench getDisplay asyncExec IWorkbenchWindow getActiveWorkbenchWindow asyncExec syncExec

public interface I Storage Editor Input extends I Editor Input Returns the underlying I Storage object return an I Storage object exception Core Exception if this method fails  IStorageEditorInput IEditorInput IStorage IStorage CoreException

public interface I View Action Delegate extends I Action Delegate Initializes this action delegate with the view it will work in param view the view that provides the context for this delegate  IViewActionDelegate IActionDelegate

Returns whether the view is closeable The default is code true code return code true code if the view is closeable code false code if not 
Sets whether the view is closeable param closeable code true code if the view is closeable code false code if not 
Returns whether the view is moveable The default is code true code return code true code if the view is moveable code false code if not 
Sets whether the view is moveable param moveable code true code if the view is moveable code false code if not 
Returns whether the view is a standalone view see I Page Layout add Standalone View  IPageLayout addStandaloneView
Returns whether the view shows its title This is only applicable to standalone views see I Page Layout add Standalone View  IPageLayout addStandaloneView

public interface I View Part extends I Workbench Part Returns the site for this view return the view site  IViewPart IWorkbenchPart
public I View Site get View Site Initializes this view with the given view site p This method is automatically called by the workbench shortly after the part is instantiated It marks the start of the views s lifecycle Clients must not call this method p param site the view site exception Part Init Exception if this view was not initialized successfully  IViewSite getViewSite PartInitException
public void init I View Site site throws Part Init Exception Initializes this view with the given view site A memento is passed to the view which contains a snapshot of the views state from a previous session Where possible the view should try to recreate that state within the part controls p This method is automatically called by the workbench shortly after the part is instantiated It marks the start of the views s lifecycle Clients must not call this method p param site the view site param memento the I View Part state or null if there is no previous saved state exception Part Init Exception if this view was not initialized successfully  IViewSite PartInitException IViewPart PartInitException
public void init I View Site site I Memento memento throws Part Init Exception Saves the object state within a memento param memento a memento to receive the object state  IViewSite IMemento PartInitException

Returns the secondary ID for the view return the secondary ID or code null code if there is no secondary id see I Workbench Page show View String String int since 3 0  IWorkbenchPage showView
Returns the code I View Part code referenced by this object Returns code null code if the view was not instantiated or it failed to be restored Tries to restore the view if code restore code is true  IViewPart
public I View Part get View boolean restore Returns true if the view is a fast view otherwise returns false public boolean is Fast View  IViewPart getView isFastView

Returns the action bars for this part site Views have exclusive use of their site s action bars return the action bars 
Returns the secondary id for this part site s part or code null code if it has none see I Workbench Page show View String String int since 3 0  IWorkbenchPage showView

public interface I Window Listener Notifies this listener that the given window has been activated param window the window that was activated  IWindowListener
public void window Activated I Workbench Window window Notifies this listener that the given window has been deactivated param window the window that was activated  windowActivated IWorkbenchWindow
public void window Deactivated I Workbench Window window Notifies this listener that the given window has been closed param window the window that was closed see I Workbench Window close  windowDeactivated IWorkbenchWindow IWorkbenchWindow
public void window Closed I Workbench Window window Notifies this listener that the given window has been opened param window the window that was opened see I Workbench open Workbench Window  windowClosed IWorkbenchWindow IWorkbench openWorkbenchWindow

public interface I Workbench Returns the display for this workbench p Code should always ask the workbench for the display rather than rely on link Display get Default Display get Default p return the display to be used for all UI interactions with this workbench since 3 0  IWorkbench getDefault getDefault
Returns the progress service for the workbench return the progress service since 3 0 
Adds a window listener param listener the window listener to add since 2 0 
public void add Window Listener I Window Listener listener Removes a window listener param listener the window listener to remove since 2 0  addWindowListener IWindowListener
public void remove Window Listener I Window Listener listener Closes this workbench and all its open windows p If the workbench has an open editor with unsaved content the user will be given the opportunity to save it p return code true code if the workbench was successfully closed and code false code if it is still open  removeWindowListener IWindowListener
public boolean close Returns the currently active window for this workbench if any Returns code null code if there is no active workbench window Returns code null code if called from a non UI thread return the active workbench window or code null code if there is no active workbench window or if called from a non UI thread 
public I Workbench Window get Active Workbench Window Returns the editor registry for the workbench return the workbench editor registry  IWorkbenchWindow getActiveWorkbenchWindow
public I Editor Registry get Editor Registry Returns the perspective registry for the workbench return the workbench perspective registry  IEditorRegistry getEditorRegistry
public I Perspective Registry get Perspective Registry Returns the preference manager for the workbench return the workbench preference manager  IPerspectiveRegistry getPerspectiveRegistry
public Preference Manager get Preference Manager Returns the preference store for the workbench return the workbench preference store since 2 0  PreferenceManager getPreferenceManager
public I Preference Store get Preference Store Returns the shared images for the workbench return the shared image manager  IPreferenceStore getPreferenceStore
public I Shared Images get Shared Images Returns the number of open main windows associated with this workbench Note that wizards and dialogs are not included in this list since they are not considered main windows return the number of open windows since 3 0 issue Use get Workbench Windows length  ISharedImages getSharedImages getWorkbenchWindows
public int get Workbench Window Count Returns a list of the open main windows associated with this workbench Note that wizards and dialogs are not included in this list since they are not considered main windows return a list of open windows  getWorkbenchWindowCount
public I Workbench Window get Workbench Windows Returns the working set manager for the workbench return the working set manager since 2 0  IWorkbenchWindow getWorkbenchWindows
public I Working Set Manager get Working Set Manager Creates and opens a new workbench window with one page The perspective of the new page is defined by the specified perspective ID The new window and new page become active p b Note b The caller is responsible to ensure the action using this method will explicitly inform the user a new window will be opened Otherwise callers are strongly recommended to use the code open Perspective code AP Is to programmatically show a perspective to avoid confusing the user p p In most cases where this method is used the caller is tightly coupled to a particular perspective They define it in the registry and contribute some user interface action to open or activate it In situations like this a static variable is often used to identify the perspective Id p p The workbench also defines a number of menu items to activate or open each registered perspective A complete list of these perspectives is available from the perspective registry found on code I Workbench code p param perspective Id the perspective id for the window s initial page param input the page input or code null code if there is no current input This is used to seed the input for the new page s views return the new workbench window exception Workbench Exception if a new window and page could not be opened see I Workbench show Perspective public I Workbench Window open Workbench Window String perspective Id I Adaptable input  IWorkingSetManager getWorkingSetManager openPerspective APIs IWorkbench perspectiveId WorkbenchException IWorkbench showPerspective IWorkbenchWindow openWorkbenchWindow perspectiveId IAdaptable
throws Workbench Exception Creates and opens a new workbench window with one page The perspective of the new page is defined by the default perspective ID The new window and new page become active p b Note b The caller is responsible to ensure the action using this method will explicitly inform the user a new window will be opened Otherwise callers are strongly recommended to use the code open Perspective code AP Is to programmatically show a perspective to avoid confusing the user p p The workbench also defines a number of menu items to activate or open each registered perspective A complete list of these perspectives is available from the perspective registry found on code I Workbench code p param input the page input or code null code if there is no current input This is used to seed the input for the new page s views return the new workbench window exception Workbench Exception if a new window and page could not be opened see I Workbench show Perspective  WorkbenchException openPerspective APIs IWorkbench WorkbenchException IWorkbench showPerspective
public I Workbench Window open Workbench Window I Adaptable input throws Workbench Exception Closes then restarts this workbench p If the workbench has an open editor with unsaved content the user will be given the opportunity to save it p return code true code if the workbench was successfully closed and code false code if it could not be closed since 2 0  IWorkbenchWindow openWorkbenchWindow IAdaptable WorkbenchException
Shows the specified perspective to the user The caller should use this method when the perspective to be shown is not dependent on the page s input That is the perspective can open in any page depending on user preferences p The perspective may be shown in the specified window in another existing window or in a new window depending on user preferences The exact policy is controlled by the workbench to ensure consistency to the user The policy is subject to change The current policy is as follows ul li If the specified window has the requested perspective open then the window is given focus and the perspective is shown The page s input is ignored li li If another window that has the workspace root as input and the requested perpective open and active then the window is given focus li li Otherwise the requested perspective is opened and shown in the specified window or in a new window depending on the current user preference for opening perspectives and that window is given focus li ul p p The workbench also defines a number of menu items to activate or open each registered perspective A complete list of these perspectives is available from the perspective registry found on code I Workbench code p param perspective Id the perspective ID to show param window the workbench window of the action calling this method return the workbench page that the perspective was shown exception Workbench Exception if the perspective could not be shown since 2 0 public I Workbench Page show Perspective String perspective Id I Workbench Window window  IWorkbench perspectiveId WorkbenchException IWorkbenchPage showPerspective perspectiveId IWorkbenchWindow
Shows the specified perspective to the user The caller should use this method when the perspective to be shown is dependent on the page s input That is the perspective can only open in any page with the specified input p The perspective may be shown in the specified window in another existing window or in a new window depending on user preferences The exact policy is controlled by the workbench to ensure consistency to the user The policy is subject to change The current policy is as follows ul li If the specified window has the requested perspective open and the same requested input then the window is given focus and the perspective is shown li li If another window has the requested input and the requested perpective open and active then that window is given focus li li If the specified window has the same requested input but not the requested perspective then the window is given focus and the perspective is opened and shown on condition that the user preference is not to open perspectives in a new window li li Otherwise the requested perspective is opened and shown in a new window and the window is given focus li ul p p The workbench also defines a number of menu items to activate or open each registered perspective A complete list of these perspectives is available from the perspective registry found on code I Workbench code p param perspective Id the perspective ID to show param window the workbench window of the action calling this method param input the page input or code null code if there is no current input This is used to seed the input for the page s views return the workbench page that the perspective was shown exception Workbench Exception if the perspective could not be shown since 2 0 public I Workbench Page show Perspective String perspective Id I Workbench Window window I Adaptable input  IWorkbench perspectiveId WorkbenchException IWorkbenchPage showPerspective perspectiveId IWorkbenchWindow IAdaptable
Returns the decorator manager p Any client using the decorator manager should come up with the text and image for the element including any of the part s own decorations before calling the decorator manager It should also add a listener to be notified when decorations change p p Note that if the element implements code I Adaptable code decorators may use this mechanism to obtain an adapter for example an code I Resource code and derive the decoration from the adapter rather than the element Since the adapter may differ from the original element those using the decorator manager should be prepared to handle notification that the decoration for the adapter has changed in addition to handling notification that the decoration for the element has changed That is it needs to be able to map back from the adapter to the element p return the decorator manager  IAdaptable IResource
public I Decorator Manager get Decorator Manager Save all dirty editors in the workbench Opens a dialog to prompt the user if code confirm code is true Return true if successful Return false if the user has cancelled the command param confirm prompt the user if true return boolean false if the operation was cancelled  IDecoratorManager getDecoratorManager
Returns the element factory with the given id param factory Id the id of the element factory return the elment factory or code null code if none see I Element Factory since 3 0  factoryId IElementFactory
Returns an interface to manage activities at the workbench level return an interface to manage activities at the workbench level Guaranteed not to be code null code since 3 0 
Returns an interface to manage commands at the workbench level return an interface to manage commands at the workbench level Guaranteed not to be code null code since 3 0 
Returns an interface to manage contexts at the workbench level return an interface to manage contexts at the workbench level Guaranteed not to be code null code since 3 0 
Return the theme manager for this workbench return the theme manager for this workbench Guaranteed not to be code null code since 3 0 
Return the intro manager for this workbench return the intro manager for this workbench Guaranteed not to be code null code since 3 0 

Activates the given part The part will be brought to the front and given focus The part must belong to this page param part the part to activate 
public void activate I Workbench Part part Adds a property change listener param listener the property change listener to add since 2 0 deprecated individual views should store a working set if needed and register a property change listener directly with the working set manager to receive notification when the view working set is removed  IWorkbenchPart
public void add Property Change Listener I Property Change Listener listener Moves the given part forward in the Z order of this page so as to make it visible without changing which part has focus The part must belong to this page param part the part to bring forward  addPropertyChangeListener IPropertyChangeListener
public void bring To Top I Workbench Part part Closes this workbench page If this page is the active one this honor is passed along to one of the window s other pages if possible p If the page has an open editor with unsaved content the user will be given the opportunity to save it p return code true code if the page was successfully closed and code false code if it is still open  bringToTop IWorkbenchPart
public boolean close Closes all of the editors belonging to this workbench page p If the page has open editors with unsaved content and code save code is code true code the user will be given the opportunity to save them p param save return code true code if all editors were successfully closed and code false code if at least one is still open 
Closes the given code Array code of editor references The editors must belong to this workbench page p If any of the editors have unsaved content and code save code is code true code the user will be given the opportunity to save them p param editor Refs the editors to close param save code true code to save the editor contents if required recommended and code false code to discard any unsaved changes return code true code if the editors were successfully closed and code false code if the editors are still open since 3 0  editorRefs
Closes the given editor The editor must belong to this workbench page p If the editor has unsaved content and code save code is code true code the user will be given the opportunity to save it p param editor the editor to close param save code true code to save the editor contents if required recommended and code false code to discard any unsaved changes return code true code if the editor was successfully closed and code false code if the editor is still open 
public boolean close Editor I Editor Part editor boolean save Returns the view in this page with the specified id There is at most one view in the page with the specified id param view Id the id of the view extension to use return the view or code null code if none is found  closeEditor IEditorPart viewId
public I View Part find View String view Id Returns the view reference with the specified id param view Id the id of the view extension to use return the view reference or code null code if none is found since 3 0  IViewPart findView viewId viewId
public I View Reference find View Reference String view Id Returns the view reference with the specified id and secondary id param view Id the id of the view extension to use param secondary Id the secondary id to use or code null code for no secondary id return the view reference or code null code if none is found since 3 0  IViewReference findViewReference viewId viewId secondaryId
public I View Reference find View Reference String view Id String secondary Id Returns the active editor open in this page p This is the visible editor on the page or if there is more than one visible editor this is the one most recently brought to top p return the active editor or code null code if no editor is active  IViewReference findViewReference viewId secondaryId
public I Editor Part get Active Editor Returns the editor with the specified input Returns null if there is no opened editor with that input return an editor with input equals to code input code  IEditorPart getActiveEditor
public I Editor Part find Editor I Editor Input input Returns a list of the editors open in this page p Note that each page has its own editors editors are never shared between pages p return a list of open editors deprecated use get Editor References instead  IEditorPart findEditor IEditorInput getEditorReferences
public I Editor Part get Editors Returns a array of references to open editors in this page p Note that each page has its own editors editors are never shared between pages p return a list of open editors  IEditorPart getEditors
public I Editor Reference get Editor References Returns a list of dirty editors in this page return a list of dirty editors  IEditorReference getEditorReferences
public I Editor Part get Dirty Editors Returns the input for this page return the input for this page or code null code if none  IEditorPart getDirtyEditors
public I Adaptable get Input Returns the page label This will be a unique identifier within the containing workbench window return the page label  IAdaptable getInput
public String get Label Returns the current perspective descriptor for this page or code null code if the is no current perspective return the current perspective descriptor or code null code see set Perspective see save Perspective  getLabel setPerspective savePerspective
public I Perspective Descriptor get Perspective Returns a list of the reference to views visible on this page p Note that each page has its own views views are never shared between pages p return a list of references to visible views  IPerspectiveDescriptor getPerspective
public I View Reference get View References Returns a list of the views visible on this page p Note that each page has its own views views are never shared between pages p return a list of visible views deprecated use get View References instead  IViewReference getViewReferences getViewReferences
public I View Part get Views Returns the workbench window of this page return the workbench window  IViewPart getViews
public I Workbench Window get Workbench Window Returns the working set of this page return the working set of this page since 2 0 deprecated individual views should store a working set if needed  IWorkbenchWindow getWorkbenchWindow
public I Working Set get Working Set Hides an action set in this page p In most cases where this method is used the caller is tightly coupled to a particular action set They define it in the registry and may make it visible in certain scenarios by calling code show Action Set code A static variable is often used to identify the action set id in caller code p  IWorkingSet getWorkingSet showActionSet
public void hide Action Set String action SetID Hides the given view The view must belong to this page param view the view to hide  hideActionSet actionSetID
public void hide View I View Part view Hides the given view that belongs to the reference if any param view the references whos view is to be hidden since 3 0  hideView IViewPart
public void hide View I View Reference view Returns whether the specified part is visible return boolean true if part is visible  hideView IViewReference
public boolean is Part Visible I Workbench Part part Returns whether the page s current perspective is showing the editor area return code true code when editor area visible code false code otherwise  isPartVisible IWorkbenchPart
public boolean is Editor Area Visible Reuses the specified editor by setting its new input param editor the editor to be reused param input the new input for the reusable editor  isEditorAreaVisible
public void reuse Editor I Reusable Editor editor I Editor Input input Opens an editor on the given input p If this page already has an editor open on the target input that editor is activated otherwise a new editor is opened Two editor inputs input1 and input2 are considered the same if pre input1 equals input2 true pre p p The editor type is determined by mapping code editor Id code to an editor extension registered with the workbench An editor id is passed rather than an editor object to prevent the accidental creation of more than one editor for the same input It also guarantees a consistent lifecycle for editors regardless of whether they are created by the user or restored from saved data p param input the editor input param editor Id the id of the editor extension to use return an open and active editor or code null code if an external editor was opened exception Part Init Exception if the editor could not be created or initialized public I Editor Part open Editor I Editor Input input String editor Id  reuseEditor IReusableEditor IEditorInput editorId editorId PartInitException IEditorPart openEditor IEditorInput editorId
throws Part Init Exception Opens an editor on the given input p If this page already has an editor open on the target input that editor is brought to the front otherwise a new editor is opened Two editor inputs are considered the same if they equal See code Object equals Object code and code I Editor Input code If code activate true code the editor will be activated p p The editor type is determined by mapping code editor Id code to an editor extension registered with the workbench An editor id is passed rather than an editor object to prevent the accidental creation of more than one editor for the same input It also guarantees a consistent lifecycle for editors regardless of whether they are created by the user or restored from saved data p param input the editor input param editor Id the id of the editor extension to use param activate if code true code the editor will be activated return an open editor or code null code if an external editor was opened exception Part Init Exception if the editor could not be created or initialized public I Editor Part open Editor I Editor Input input String editor Id boolean activate  PartInitException IEditorInput editorId editorId PartInitException IEditorPart openEditor IEditorInput editorId
throws Part Init Exception Removes the property change listener param listener the property change listener to remove since 2 0 deprecated individual views should store a working set if needed and register a property change listener directly with the working set manager to receive notification when the view working set is removed  PartInitException
public void remove Property Change Listener I Property Change Listener listener Changes the visible views their layout and the visible action sets within the page to match the current perspective descriptor This is a rearrangement of components and not a replacement The contents of the current perspective descriptor are unaffected p For more information on perspective change see code set Perspective code p  removePropertyChangeListener IPropertyChangeListener setPerspective
public void reset Perspective Saves the contents of all dirty editors belonging to this workbench page If there are no dirty editors this method returns without effect p If code confirm code is code true code the user is prompted to confirm the command p param confirm code true code to ask the user before saving unsaved changes recommended and code false code to save unsaved changes without asking return code true code if the command succeeded and code false code if at least one editor with unsaved changes was not saved  resetPerspective
public boolean save All Editors boolean confirm Saves the contents of the given editor if dirty If not this method returns without effect p If code confirm code is code true code the user is prompted to confirm the command Otherwise the save happens without prompt p p The editor must belong to this workbench page p param editor the editor to close param confirm code true code to ask the user before saving unsaved changes recommended and code false code to save unsaved changes without asking return code true code if the command succeeded and code false code if the editor was not saved  saveAllEditors
public boolean save Editor I Editor Part editor boolean confirm Saves the visible views their layout and the visible action sets for this page to the current perspective descriptor The contents of the current perspective descriptor are overwritten  saveEditor IEditorPart
public void save Perspective Saves the visible views their layout and the visible action sets for this page to the given perspective descriptor The contents of the given perspective descriptor are overwritten and it is made the current one for this page param perspective the perspective descriptor to save to  savePerspective
public void save Perspective As I Perspective Descriptor perspective Show or hide the editor area for the page s active perspective param show Editor Area code true code to show the editor area code false code to hide the editor area  savePerspectiveAs IPerspectiveDescriptor showEditorArea
public void set Editor Area Visible boolean show Editor Area Changes the visible views their layout and the visible action sets within the page to match the given perspective descriptor This is a rearrangement of components and not a replacement The contents of the old perspective descriptor are unaffected p When a perspective change occurs the old perspective is deactivated hidden and cached for future reference Then the new perspective is activated shown The views within the page are shared by all existing perspectives to make it easy for the user to switch between one perspective and another quickly without loss of context p p During activation the action sets are modified If an action set is specified in the new perspective which is not visible in the old one it will be created If an old action set is not specified in the new perspective it will be disposed p p The visible views and their layout within the page also change If a view is specified in the new perspective which is not visible in the old one a new instance of the view will be created If an old view is not specified in the new perspective it will be hidden This view may reappear if the user selects it from the View menu or if they switch to a perspective which may be the old one where the view is visible p p The open editors are not modified by this method p param perspective the perspective descriptor  setEditorAreaVisible showEditorArea
public void set Perspective I Perspective Descriptor perspective Shows an action set in this page p In most cases where this method is used the caller is tightly coupled to a particular action set They define it in the registry and may make it visible in certain scenarios by calling code show Action Set code A static variable is often used to identify the action set id in caller code p  setPerspective IPerspectiveDescriptor showActionSet
public void show Action Set String action SetID Shows the view identified by the given view id in this page and gives it focus If there is a view identified by the given view id and with no secondary id already open in this page it is given focus param view Id the id of the view extension to use return the shown view exception Part Init Exception if the view could not be initialized  showActionSet actionSetID viewId PartInitException
public I View Part show View String view Id throws Part Init Exception Shows a view in this page with the given id and secondary id The behaviour of this method varies based on the supplied mode If code VIEW ACTIVATE code is supplied the view is focus If code VIEW VISIBLE code is supplied then it is made visible but not given focus Finally if code VIEW CREATE code is supplied the view is created and will only be made visible if it is not created in a folder that already contains visible views p This allows multiple instances of a particular view to be created They are disambiguated using the secondary id If a secondary id is given the view must allow multiple instances by having specified allow Multiple true in its extension p param view Id the id of the view extension to use param secondary Id the secondary id to use or code null code for no secondary id param mode the activation mode Must be link VIEW ACTIVATE link VIEW VISIBLE or link VIEW CREATE return a view exception Part Init Exception if the view could not be initialized exception Illegal Argument Exception if the supplied mode is not valid since 3 0  IViewPart showView viewId PartInitException VIEW_ACTIVATE VIEW_VISIBLE VIEW_CREATE allowMultiple viewId secondaryId VIEW_ACTIVATE VIEW_VISIBLE VIEW_CREATE PartInitException IllegalArgumentException
Returns true if the editor is pinned and should not be reused return boolean 
public boolean is Editor Pinned I Editor Part editor Returns the number of open editors before reusing editors return a int Note For EXPERIMENTAL use only IT MAY CHANGE IN NEAR FUTURE deprecated  isEditorPinned IEditorPart
public int get Editor Reuse Threshold Set the number of open editors before reusing editors If 0 the user preference settings will be used Note For EXPERIMENTAL use only IT MAY CHANGE IN NEAR FUTURE deprecated use I Page Layout set Editor Reuse Threshold int open Editors instead  getEditorReuseThreshold IPageLayout setEditorReuseThreshold openEditors
public void set Editor Reuse Threshold int open Editors Returns the navigation history which manages a list of entries keeping the history of places positions selection and editors the user visited making it easier to the user to move back and forward without losing context since 2 1  setEditorReuseThreshold openEditors
Returns an array of I View Parts that are stacked with the given part em EXPERIMENTAL em param part the part to test return the parts that are stacked with this part including the part in question code null code is returned if the part does not belong to this page since 3 0  IViewParts

Adds a listener for changes to properties of this workbench part Has no effect if an identical listener is already registered p The property ids are defined in link I Workbench Part Constants p param listener a property listener  IWorkbenchPartConstants
public void add Property Listener I Property Listener listener Creates the SWT controls for this workbench part p Clients should not call this method the workbench calls this method when it needs to which may be never p p For implementors this is a multi step process ol li Create one or more controls within the parent li li Set the parent layout as needed li li Register any global actions with the code I Action Service code li li Register any popup menus with the code I Action Service code li li Register a selection provider with the code I Selection Service code optional li ol p param parent the parent control  addPropertyListener IPropertyListener IActionService IActionService ISelectionService
public void create Part Control Composite parent Disposes of this workbench part p This is the last method called on the code I Workbench Part code At this point the part controls if they were ever created have been disposed as part of an SWT composite There is no guarantee that create Part Control has been called so the part controls may never have been created p p Within this method a part may release any resources fonts images etc nbsp held by this part It is also very important to deregister all listeners from the workbench p p Clients should not call this method the workbench calls this method at appropriate times p  createPartControl IWorkbenchPart createPartControl
Returns the site for this workbench part The site can be code null code while the workbench part is being initialized After the initialization is complete this value must be non code null code for the remainder of the part s life cycle return The part site this value may be code null code if the part has not yet been initialized 
Returns the title of this workbench part If this value changes the part must fire a property listener event with code PROP TITLE code p The title is used to populate the title bar of this part s visual container p return the workbench part title not code null code  PROP_TITLE
public String get Title Returns the title image of this workbench part If this value changes the part must fire a property listener event with code PROP TITLE code p The title image is usually used to populate the title bar of this part s visual container Since this image is managed by the part itself callers must b not b dispose the returned image p return the title image  getTitle PROP_TITLE
public Image get Title Image Returns the title tool tip text of this workbench part An empty string result indicates no tool tip If this value changes the part must fire a property listener event with code PROP TITLE code p The tool tip text is used to populate the title bar of this part s visual container p return the workbench part title tool tip not code null code  getTitleImage PROP_TITLE
public String get Title Tool Tip Removes the given property listener from this workbench part Has no affect if an identical listener is not registered param listener a property listener  getTitleToolTip
public void remove Property Listener I Property Listener listener Asks this part to take focus within the workbench p Clients should not call this method the workbench calls this method at appropriate times To have the workbench activate a part use code I Workbench Page activate I Workbench Part instead code p  removePropertyListener IPropertyListener IWorkbenchPage IWorkbenchPart

public interface I Workbench Part2 extends I Workbench Part Returns the name of this part If this value changes the part must fire a property listener event with link I Workbench Part Constants PROP PART NAME return the name of this view or the empty string if the name is being managed by the workbench not code null code  IWorkbenchPart2 IWorkbenchPart IWorkbenchPartConstants PROP_PART_NAME
Returns the content description of this part The content description is an optional user readable string that describes what is currently being displayed in the part By default the workbench will display the content description in a line near the top of the view or editor An empty string indicates no content description text If this value changes the part must fire a property listener event with link I Workbench Part Constants PROP CONTENT DESCRIPTION return the content description of this part not code null code  IWorkbenchPartConstants PROP_CONTENT_DESCRIPTION

public interface I Workbench Part Descriptor Returns the part id return the id of the part  IWorkbenchPartDescriptor
public String get Id Returns the descriptor of the image for this part return the descriptor of the image to display next to this part  getId
public Image Descriptor get Image Descriptor Returns the label to show for this part return the part label  ImageDescriptor getImageDescriptor

public interface I Workbench Part Reference Returns the I Workbench Part referenced by this object Returns code null code if the editors was not instantiated or it failed to be restored Tries to restore the editor if code restore code is true  IWorkbenchPartReference IWorkbenchPart
public I Workbench Part get Part boolean restore see I Workbench Part get Title public String get Title  IWorkbenchPart getPart IWorkbenchPart getTitle getTitle
public String get Title see I Workbench Part get Title Image public Image get Title Image  getTitle IWorkbenchPart getTitleImage getTitleImage
public Image get Title Image see I Workbench Part get Title Tool Tip public String get Title Tool Tip  getTitleImage IWorkbenchPart getTitleToolTip getTitleToolTip
public String get Title Tool Tip see I Workbench Part Site get Id public String get Id  getTitleToolTip IWorkbenchPartSite getId getId
public String get Id see I Workbench Part add Property Listener public void add Property Listener I Property Listener listener  getId IWorkbenchPart addPropertyListener addPropertyListener IPropertyListener
public void add Property Listener I Property Listener listener see I Workbench Part remove Property Listener public void remove Property Listener I Property Listener listener  addPropertyListener IPropertyListener IWorkbenchPart removePropertyListener removePropertyListener IPropertyListener
public void remove Property Listener I Property Listener listener Returns the workbench page that contains this part public I Workbench Page get Page  removePropertyListener IPropertyListener IWorkbenchPage getPage
Returns the name of the part as it should be shown in tabs return the part name since 3 0 
Returns the content description for the part or the empty string if none return the content description for the part since 3 0 

Returns the part registry extension id for this workbench site s part p The name comes from the code id code attribute in the configuration element p return the registry extension id 
public String get Id Returns the unique identifier of the plug in that defines this workbench site s part return the unique identifier of the declaring plug in  getId
public String get Plugin Id Returns the registered name for this workbench site s part p The name comes from the code name code attribute in the configuration element p return the part name  getPluginId
public String get Registered Name Registers a pop up menu with a particular id for extension This method should only be called if the target part has more than one context menu to register p For a detailed description of context menu registration see code register Context Menu Menu Manager I Selection Provider p param menu Id the menu id param menu Manager the menu manager param selection Provider the selection provider public void register Context Menu String menu Id Menu Manager menu Manager  getRegisteredName registerContextMenu MenuManager ISelectionProvider menuId menuManager selectionProvider registerContextMenu menuId MenuManager menuManager
I Selection Provider selection Provider Registers a pop up menu with the default id for extension The default id is defined as the part id p Within the workbench one plug in may extend the pop up menus for a view or editor within another plug in In order to be eligible for extension the target part must publish each menu by calling code register Context Menu code Once this has been done the workbench will automatically insert any action extensions which exist p p A menu id must be provided for each registered menu For consistency across parts the following strategy should be adopted by all part implementors p ol li If the target part has only one context menu it should be registered with code id part id code This can be done easily by calling code register Context Menu Menu Manager I Selection Provider li If the target part has more than one context menu a unique id should be defined for each Prefix each menu id with the part id and publish these ids within the javadoc for the target part Register each menu at runtime by calling code register Context Menu String Menu Manager I Selection Provider code li ol p Any pop up menu which is registered with the workbench should also define a code Group Marker code in the registered menu with id code I Workbench Action Constants MB ADDITIONS code Other plug ins will use this group as a reference point for insertion The marker should be defined at an appropriate location within the menu for insertion p param menu Manager the menu manager param selection Provider the selection provider public void register Context Menu Menu Manager menu Manager  ISelectionProvider selectionProvider registerContextMenu registerContextMenu MenuManager ISelectionProvider registerContextMenu MenuManager ISelectionProvider GroupMarker IWorkbenchActionConstants MB_ADDITIONS menuManager selectionProvider registerContextMenu MenuManager menuManager
I Selection Provider selection Provider Returns the key binding service in use p The part will access this service to register all of its actions to set the active scope p return the key binding service in use since 2 1  ISelectionProvider selectionProvider

public interface I Workbench Preference Page extends I Preference Page Initializes this preference page for the given workbench p This method is called automatically as the preference page is being created and initialized Clients must not call this method p param workbench the workbench  IWorkbenchPreferencePage IPreferencePage

public interface I Workbench Property Page extends I Preference Page Returns the object that owns the properties shown in this page return the object that owns the properties shown in this page  IWorkbenchPropertyPage IPreferencePage
public I Adaptable get Element Sets the object that owns the properties shown in this page The page is expected to store this object and provide it if code get Element code is called param element the object that owns the properties shown in this page  IAdaptable getElement getElement

Returns the page containing this workbench site return the page containing this workbench site 
Returns the selection provider for this workbench site return the selection provider or code null code if none 
Returns the shell for this workbench site return the shell for this workbench site 
Returns the workbench window containing this workbench site return the workbench window containing this workbench site 
Sets the selection provider for this workbench site param provider the selection provider or code null code to clear it 

public interface I Workbench Window extends I Page Service I Runnable Context Closes this workbench window p If the window has an open editor with unsaved content the user will be given the opportunity to save it p return code true code if the window was successfully closed and code false code if it is still open  IWorkbenchWindow IPageService IRunnableContext
public boolean close Returns the currently active page for this workbench window return the active page or code null code if none 
public I Workbench Page get Active Page Returns a list of the pages in this workbench window p Note that each window has its own pages pages are never shared between different windows p return a list of pages  IWorkbenchPage getActivePage
public I Workbench Page get Pages Returns the part service which tracks part activation within this workbench window return the part service  IWorkbenchPage getPages
public I Part Service get Part Service Returns the selection service which tracks selection within this workbench window return the selection service  IPartService getPartService
public I Selection Service get Selection Service Returns this workbench window s shell return the shell containing this window s controls  ISelectionService getSelectionService
public Shell get Shell Returns the workbench for this window return the workbench  getShell
public I Workbench get Workbench Returns whether the specified menu is an application menu as opposed to a part menu Application menus contain items which affect the workbench or window Part menus contain items which affect the active part view or editor p This is typically used during in place editing Application menus should be preserved during menu merging All other menus may be removed from the window p param menu Id the menu id return code true code if the specified menu is an application menu and code false code if is not issue this method should be deprecated and removed only the application would know something like this  IWorkbench getWorkbench menuId
public boolean is Application Menu String menu Id Creates and opens a new workbench page The perspective of the new page is defined by the specified perspective ID The new page become active p b Note b Since release 2 0 a window is limited to contain at most one page If a page exist in the window when this method is used then another window is created for the new page Callers are strongly recommended to use the code I Workbench show Perspective code AP Is to programmatically show a perspective p param perspective Id the perspective id for the window s initial page param input the page input or code null code if there is no current input This is used to seed the input for the new page s views return the new workbench page exception Workbench Exception if a page could not be opened see I Workbench show Perspective String I Workbench Window I Adaptable public I Workbench Page open Page String perspective Id I Adaptable input  isApplicationMenu menuId IWorkbench showPerspective APIs perspectiveId WorkbenchException IWorkbench showPerspective IWorkbenchWindow IAdaptable IWorkbenchPage openPage perspectiveId IAdaptable
throws Workbench Exception Creates and opens a new workbench page The default perspective is used as a template for creating the page The page becomes active p b Note b Since release 2 0 a window is limited to contain at most one page If a page exist in the window when this method is used then another window is created for the new page Callers are strongly recommended to use the code I Workbench show Perspective code AP Is to programmatically show a perspective p param input the page input or code null code if there is no current input This is used to seed the input for the new page s views return the new workbench window exception Workbench Exception if a page could not be opened see I Workbench show Perspective String I Workbench Window I Adaptable  WorkbenchException IWorkbench showPerspective APIs WorkbenchException IWorkbench showPerspective IWorkbenchWindow IAdaptable
public I Workbench Page open Page I Adaptable input throws Workbench Exception Sets or clears the currently active page for this workbench window param page the new active page  IWorkbenchPage openPage IAdaptable WorkbenchException

public interface I Workbench Window Action Delegate extends I Action Delegate Disposes this action delegate The implementor should unhook any references to itself so that garbage collection can occur  IWorkbenchWindowActionDelegate IActionDelegate
public void dispose Initializes this action delegate with the workbench window it will work in param window the window that provides the context for this delegate 

public interface I Workbench Window Pulldown Delegate extends I Workbench Window Action Delegate Returns the menu for this pull down action This method will only be called if the user opens the pull down menu for the action Note that it is the responsibility of the implementor to properly dispose of any SWT menus created by this method return the menu  IWorkbenchWindowPulldownDelegate IWorkbenchWindowActionDelegate

public interface I Workbench Window Pulldown Delegate2 extends I Workbench Window Pulldown Delegate Returns the menu for this pull down action This method will only be called if the user opens the pull down menu for the action Note that it is the responsibility of the implementor to properly dispose of any SWT menus created by this method return the menu  IWorkbenchWindowPulldownDelegate2 IWorkbenchWindowPulldownDelegate

public interface I Workbench Wizard extends I Wizard Initializes this creation wizard using the passed workbench and object selection p This method is called after the no argument constructor and before other methods are called p param workbench the current workbench param selection the current object selection  IWorkbenchWizard IWizard

public interface I Working Set extends I Persistable Element Returns the elements that are contained in this working set returnthe working set s elements  IWorkingSet IPersistableElement
Returns the working set id Returns code null code if no working set id has been set This is one of the ids defined by extensions of the org eclipse ui working Sets extension point It is used by the workbench to determine the page to use in the working set edit wizard The default resource edit page is used if this value is code null code return the working set id May be code null code since 2 1  workingSets
Returns the working set icon Currently this is one of the icons specified in the extensions of the org eclipse ui working Sets extension point The extension is identified using the value returned by code get Id code Returns code null code if no icon has been specified in the extension or if code get Id code returns code null code return the working set icon or code null code since 2 1  workingSets getId getId
Returns the name of the working set returnthe name of the working set 
Sets the elements that are contained in this working set param elements the elements to set in this working set 
Sets the working set id This is one of the ids defined by extensions of the org eclipse ui working Sets extension point It is used by the workbench to determine the page to use in the working set edit wizard The default resource edit page is used if this value is code null code param id the working set id May be code null code since 2 1  workingSets
Sets the name of the working set The working set name should be unique The working set name must not have leading or trailing whitespace param name the name of the working set 

Adds a property change listener param listener the property change listener to add 
Adds a working set to the top of the list of most recently used working sets making it the most recently used working set The last oldest item will be deleted if the list exceeds the size limit param working Set the working set to add to the list of most recently used working sets  workingSet
Adds a working set to the receiver The working set must not exist yet param working Set the working set to add  workingSet
Creates a new working set The working set is not added to the working set manager param name the name of the new working set Should not have leading or trailing whitespace param elements the working set contents return a new working set with the specified name and content 
Re creates and returns a working set from the state captured within the given memento param memento a memento containing the state for the working set return the restored working set or code null code if it could not be created since 3 0 
Creates a working set edit wizard for the specified working set The working set will already be set in the wizard The caller is responsible for creating and opening a wizard dialog Example code I Working Set Edit Wizard wizard working Set Manager create Working Set Edit Wizard working Set Wizard Dialog dialog new Wizard Dialog shell wizard dialog create if dialog open Window OK working Set wizard get Selection code param working Set working set to create a working set edit wizard for return a working set edit wizard to edit the specified working set If the specific edit wizard for the working set could not be loaded a default I Resource based wizard will be returned If the default edit wizard can not be loaded null is returned since 2 1  IWorkingSetEditWizard workingSetManager createWorkingSetEditWizard workingSet WizardDialog WizardDialog workingSet getSelection workingSet IResource
public I Working Set Edit Wizard create Working Set Edit Wizard I Working Set working Set deprecated use create Working Set Selection Dialog parent true instead public I Working Set Selection Dialog create Working Set Selection Dialog Shell parent  IWorkingSetEditWizard createWorkingSetEditWizard IWorkingSet workingSet createWorkingSetSelectionDialog IWorkingSetSelectionDialog createWorkingSetSelectionDialog
Creates a working set selection dialog that lists all working sets and allows the user to add remove and edit working sets The caller is responsible for opening the dialog with code I Working Set Selection Dialog open code and subsequently extracting the selected working sets using code I Working Set Selection Dialog get Selection code param parent Shell the parent shell of the working set selection dialog param multi true more than one working set can be chosen in the dialog false only one working set can be chosen Multiple working sets can still be selected and removed from the list but the dialog can only be closed when a single working set is selected return a working set selection dialog  IWorkingSetSelectionDialog IWorkingSetSelectionDialog getSelection parentShell
Returns the list of most recently used working sets The most recently used working set appears first in the list return the list of most recently used working sets 
Returns the working set with the specified name Returns null if there is no working set with that name param name the name of the working set to return return the working set with the specified name 
Returns an array of all working sets stored in the receiver return the working sets stored in the receiver 
Removes the property change listener param listener the property change listener to remove 
Removes the working set param working Set the working set to remove  workingSet

Creates an instance of code Character Key code given a unicode character This method determines the correct name for the key based on character Typically this name is a string of one character in length equal to the character that this instance represents param character the character that the resultant code Character Key code instance is to represent return an instance of code Character Key code representing the character public static Character Key get Instance char character String name switch character case BS CHARACTER name BS NAME break case CR CHARACTER name CR NAME break case DEL CHARACTER name DEL NAME break case ESC CHARACTER name ESC NAME break case FF CHARACTER name FF NAME break case LF CHARACTER name LF NAME break case NUL CHARACTER name NUL NAME break case SPACE CHARACTER name SPACE NAME break case TAB CHARACTER name TAB NAME break case VT CHARACTER name VT NAME break default name Character to String character break if character CACHE length Character Key character Key CACHE character if character Key null character Key new Character Key character name CACHE character character Key return character Key else return new Character Key character name  CharacterKey CharacterKey CharacterKey CharacterKey getInstance BS_CHARACTER BS_NAME CR_CHARACTER CR_NAME DEL_CHARACTER DEL_NAME ESC_CHARACTER ESC_NAME FF_CHARACTER FF_NAME LF_CHARACTER LF_NAME NUL_CHARACTER NUL_NAME SPACE_CHARACTER SPACE_NAME TAB_CHARACTER TAB_NAME VT_CHARACTER VT_NAME toString CharacterKey characterKey characterKey characterKey CharacterKey characterKey characterKey CharacterKey
Constructs an instance of code Character Key code given a unicode character and a name param character the unicode character this object represents param name the name of the key must not be null private Character Key char character String name super name this character character  CharacterKey CharacterKey
Gets the character that this object represents return the character that this object represents public char get Character return character  getCharacter

Formats an individual key into a human readable format This uses an internationalization resource bundle to look up the key This does not do any platform specific formatting e g Carbon s command character param key The key to format must not be code null code return The key formatted as a string should not be code null code 
Format the given key sequence into a string The manner of the conversion is dependent on the formatter It is required that unequal key seqeunces return unequal strings param key Sequence The key sequence to convert must not be code null code return A string representation of the key sequence must not be code null code  keySequence
Format the given key strokes into a string The manner of the conversion is dependent on the formatter It is required that unequal key strokes return unequal strings param key Stroke The key stroke to convert must not be Code null code return A string representation of the key stroke must not be code null code  keyStroke

Constructs an instance of code Key code given its formal string representation param name the formal string representation of this key Must not be code null code Key String name if name null throw new Null Pointer Exception this name name  NullPointerException
see java lang Comparable compare To java lang Object public int compare To Object object Key casted Object Key object int compare To name compare To casted Object name return compare To  compareTo compareTo castedObject compareTo compareTo castedObject compareTo
see java lang Object equals java lang Object public boolean equals Object object if object instanceof Key return false Key casted Object Key object boolean equals true equals name equals casted Object name return equals  castedObject castedObject
see java lang Object hash Code public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR name hash Code hash Code Computed true return hash Code  hashCode hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR hashCode hashCodeComputed hashCode
Returns the formal string representation for this key return The formal string representation for this key Guaranteed not to be code null code see java lang Object to String public String to String return name  toString toString

Provides an instance of code Compact Key Formatter code return The compact formatter never code null code public static final I Key Formatter get Compact Key Formatter return COMPACT KEY FORMATTER  CompactKeyFormatter IKeyFormatter getCompactKeyFormatter COMPACT_KEY_FORMATTER
An accessor for the current default key formatter return The default formatter never code null code public static I Key Formatter get Default return default Key Formatter  IKeyFormatter getDefault defaultKeyFormatter
Provides an instance of code Emacs Key Formatter code return The Xemacs formatter never code null code public static I Key Formatter get Emacs Key Formatter return EMACS KEY FORMATTER  EmacsKeyFormatter IKeyFormatter getEmacsKeyFormatter EMACS_KEY_FORMATTER
Provides an instance of code Formal Key Formatter code return The formal formatter never code null code public static I Key Formatter get Formal Key Formatter return FORMAL KEY FORMATTER  FormalKeyFormatter IKeyFormatter getFormalKeyFormatter FORMAL_KEY_FORMATTER
Sets the default key formatter param default Key Formatter the default key formatter Must not be code null code public static void set Default I Key Formatter default Key Formatter if default Key Formatter null throw new Null Pointer Exception Key Formatter Factory default Key Formatter default Key Formatter  defaultKeyFormatter setDefault IKeyFormatter defaultKeyFormatter defaultKeyFormatter NullPointerException KeyFormatterFactory defaultKeyFormatter defaultKeyFormatter
private Key Formatter Factory Not to be constructred  KeyFormatterFactory

Gets an instance of code Key Sequence code return a key sequence This key sequence will have no key strokes Guaranteed not to be code null code public static Key Sequence get Instance return EMPTY KEY SEQUENCE  KeySequence KeySequence getInstance EMPTY_KEY_SEQUENCE
Gets an instance of code Key Sequence code given a key sequence and a key stroke param key Sequence a key sequence Must not be code null code param key Stroke a key stroke Must not be code null code return a key sequence that is equal to the given key sequence with the given key stroke appended to the end Guaranteed not to be code null code public static Key Sequence get Instance Key Sequence key Sequence Key Stroke key Stroke if key Sequence null key Stroke null throw new Null Pointer Exception List key Strokes new Array List key Sequence get Key Strokes key Strokes add key Stroke return new Key Sequence key Strokes  KeySequence keySequence keyStroke KeySequence getInstance KeySequence keySequence KeyStroke keyStroke keySequence keyStroke NullPointerException keyStrokes ArrayList keySequence getKeyStrokes keyStrokes keyStroke KeySequence keyStrokes
Gets an instance of code Key Sequence code given a single key stroke param key Stroke a single key stroke Must not be code null code return a key sequence Guaranteed not to be code null code public static Key Sequence get Instance Key Stroke key Stroke return new Key Sequence Collections singleton List key Stroke  KeySequence keyStroke KeySequence getInstance KeyStroke keyStroke KeySequence singletonList keyStroke
Gets an instance of code Key Sequence code given an array of key strokes param key Strokes the array of key strokes This array may be empty but it must not be code null code This array must not contain code null code elements return a key sequence Guaranteed not to be code null code public static Key Sequence get Instance Key Stroke key Strokes return new Key Sequence Arrays as List key Strokes  KeySequence keyStrokes KeySequence getInstance KeyStroke keyStrokes KeySequence asList keyStrokes
Gets an instance of code Key Sequence code given a list of key strokes param key Strokes the list of key strokes This list may be empty but it must not be code null code If this list is not empty it must only contain instances of code Key Stroke code return a key sequence Guaranteed not to be code null code public static Key Sequence get Instance List key Strokes return new Key Sequence key Strokes  KeySequence keyStrokes KeyStroke KeySequence getInstance keyStrokes KeySequence keyStrokes
Gets an instance of code Key Sequence code by parsing a given a formal string representation param string the formal string representation to parse return a key sequence Guaranteed not to be code null code throws Parse Exception if the given formal string representation could not be parsed to a valid key sequence public static Key Sequence get Instance String string throws Parse Exception if string null throw new Null Pointer Exception List key Strokes new Array List String Tokenizer string Tokenizer new String Tokenizer string KEY STROKE DELIMITERS while string Tokenizer has More Tokens key Strokes add Key Stroke get Instance string Tokenizer next Token try return new Key Sequence key Strokes catch Throwable t throw new Parse Exception Could not construct key sequence with these key strokes NON NLS 1 key Strokes  KeySequence ParseException KeySequence getInstance ParseException NullPointerException keyStrokes ArrayList StringTokenizer stringTokenizer StringTokenizer KEY_STROKE_DELIMITERS stringTokenizer hasMoreTokens keyStrokes KeyStroke getInstance stringTokenizer nextToken KeySequence keyStrokes ParseException keyStrokes
Constructs an instance of code Key Sequence code given a list of key strokes param key Strokes the list of key strokes This list may be empty but it must not be code null code If this list is not empty it must only contain instances of code Key Stroke code private Key Sequence List key Strokes this key Strokes Util safe Copy key Strokes Key Stroke class for int i 0 i this key Strokes size 1 i Key Stroke key Stroke Key Stroke this key Strokes get i if key Stroke is Complete throw new Illegal Argument Exception  KeySequence keyStrokes KeyStroke KeySequence keyStrokes keyStrokes safeCopy keyStrokes KeyStroke keyStrokes KeyStroke keyStroke KeyStroke keyStrokes keyStroke isComplete IllegalArgumentException
see java lang Object equals java lang Object public int compare To Object object Key Sequence casted Object Key Sequence object int compare To Util compare key Strokes casted Object key Strokes return compare To  compareTo KeySequence castedObject KeySequence compareTo keyStrokes castedObject keyStrokes compareTo
Returns whether or not this key sequence ends with the given key sequence param key Sequence a key sequence Must not be code null code param equals whether or not an identical key sequence should be considered as a possible match return code true code iff the given key sequence ends with this key sequence public boolean ends With Key Sequence key Sequence boolean equals if key Sequence null throw new Null Pointer Exception return Util ends With key Strokes key Sequence key Strokes equals  keySequence endsWith KeySequence keySequence keySequence NullPointerException endsWith keyStrokes keySequence keyStrokes
see java lang Object equals java lang Object public boolean equals Object object if object instanceof Key Sequence return false Key Sequence casted Object Key Sequence object boolean equals true equals key Strokes equals casted Object key Strokes return equals  KeySequence KeySequence castedObject KeySequence keyStrokes castedObject keyStrokes
Formats this key sequence into the current default look return A string representation for this key sequence using the default look never code null code public String format return Key Formatter Factory get Default format this  KeyFormatterFactory getDefault
Returns the list of key strokes for this key sequence return the list of key strokes keys This list may be empty but is guaranteed not to be code null code If this list is not empty it is guaranteed to only contain instances of code Key Stroke code public List get Key Strokes return key Strokes  KeyStroke getKeyStrokes keyStrokes
see java lang Object hash Code public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR key Strokes hash Code hash Code Computed true return hash Code  hashCode hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR keyStrokes hashCode hashCodeComputed hashCode
Returns whether or not this key sequence is complete Key sequences are complete iff all of their key strokes are complete return code true code iff the key sequence is complete public boolean is Complete return key Strokes is Empty Key Stroke key Strokes get key Strokes size 1 is Complete  isComplete keyStrokes isEmpty KeyStroke keyStrokes keyStrokes isComplete
Returns whether or not this key sequence is empty Key sequences are complete iff they have no key strokes return code true code iff the key sequence is empty public boolean is Empty return key Strokes is Empty  isEmpty keyStrokes isEmpty
Returns whether or not this key sequence starts with the given key sequence param key Sequence a key sequence Must not be code null code param equals whether or not an identical key sequence should be considered as a possible match return code true code iff the given key sequence starts with this key sequence public boolean starts With Key Sequence key Sequence boolean equals if key Sequence null throw new Null Pointer Exception return Util starts With key Strokes key Sequence key Strokes equals  keySequence startsWith KeySequence keySequence keySequence NullPointerException startsWith keyStrokes keySequence keyStrokes
Returns the formal string representation for this key sequence return The formal string representation for this key sequence Guaranteed not to be code null code see java lang Object to String public String to String return Key Formatter Factory get Formal Key Formatter format this  toString toString KeyFormatterFactory getFormalKeyFormatter

Gets an instance of code Key Stroke code given a single modifier key and a natural key param modifier Key a modifier key Must not be code null code param natural Key the natural key May be code null code return a key stroke Guaranteed not to be code null code public static Key Stroke get Instance Modifier Key modifier Key Natural Key natural Key if modifier Key null throw new Null Pointer Exception return new Key Stroke new Tree Set Collections singleton List modifier Key natural Key  KeyStroke modifierKey naturalKey KeyStroke getInstance ModifierKey modifierKey NaturalKey naturalKey modifierKey NullPointerException KeyStroke TreeSet singletonList modifierKey naturalKey
Gets an instance of code Key Stroke code given an array of modifier keys and a natural key param modifier Keys the array of modifier keys This array may be empty but it must not be code null code If this array is not empty it must not contain code null code elements param natural Key the natural key May be code null code return a key stroke Guaranteed not to be code null code public static Key Stroke get Instance Modifier Key modifier Keys Natural Key natural Key Util assert Instance modifier Keys Modifier Key class return new Key Stroke new Tree Set Arrays as List modifier Keys natural Key  KeyStroke modifierKeys naturalKey KeyStroke getInstance ModifierKey modifierKeys NaturalKey naturalKey assertInstance modifierKeys ModifierKey KeyStroke TreeSet asList modifierKeys naturalKey
Gets an instance of code Key Stroke code given a natural key param natural Key the natural key May be code null code return a key stroke This key stroke will have no modifier keys Guaranteed not to be code null code public static Key Stroke get Instance Natural Key natural Key return new Key Stroke Util EMPTY SORTED SET natural Key  KeyStroke naturalKey KeyStroke getInstance NaturalKey naturalKey KeyStroke EMPTY_SORTED_SET naturalKey
Gets an instance of code Key Stroke code given a set of modifier keys and a natural key param modifier Keys the set of modifier keys This set may be empty but it must not be code null code If this set is not empty it must only contain instances of code Modifier Key code param natural Key the natural key May be code null code return a key stroke Guaranteed not to be code null code public static Key Stroke get Instance Sorted Set modifier Keys Natural Key natural Key return new Key Stroke modifier Keys natural Key  KeyStroke modifierKeys ModifierKey naturalKey KeyStroke getInstance SortedSet modifierKeys NaturalKey naturalKey KeyStroke modifierKeys naturalKey
Gets an instance of code Key Stroke code by parsing a given a formal string representation param string the formal string representation to parse return a key stroke Guaranteed not to be code null code throws Parse Exception if the given formal string representation could not be parsed to a valid key stroke public static Key Stroke get Instance String string throws Parse Exception if string null throw new Null Pointer Exception Sorted Set modifier Keys new Tree Set Natural Key natural Key null String Tokenizer string Tokenizer new String Tokenizer string KEY DELIMITERS true int i 0 while string Tokenizer has More Tokens String token string Tokenizer next Token if i 2 0 if string Tokenizer has More Tokens token token to Upper Case Modifier Key modifier Key Modifier Key Modifier Key modifier Keys By Name get token if modifier Key null modifier Keys add modifier Key throw new Parse Exception Cannot create key stroke with duplicate or non existent modifier key NON NLS 1 token else if token length 1 natural Key Character Key get Instance token char At 0 break else token token to Upper Case natural Key Natural Key Character Key character Keys By Name get token if natural Key null natural Key Natural Key Special Key special Keys By Name get token if natural Key null throw new Parse Exception Cannot create key stroke with invalid natural key NON NLS 1 token i try return new Key Stroke modifier Keys natural Key catch Throwable t throw new Parse Exception Cannot create key stroke with NON NLS 1 modifier Keys and natural Key NON NLS 1  KeyStroke ParseException KeyStroke getInstance ParseException NullPointerException SortedSet modifierKeys TreeSet NaturalKey naturalKey StringTokenizer stringTokenizer StringTokenizer KEY_DELIMITERS stringTokenizer hasMoreTokens stringTokenizer nextToken stringTokenizer hasMoreTokens toUpperCase ModifierKey modifierKey ModifierKey ModifierKey modifierKeysByName modifierKey modifierKeys modifierKey ParseException naturalKey CharacterKey getInstance charAt toUpperCase naturalKey NaturalKey CharacterKey characterKeysByName naturalKey naturalKey NaturalKey SpecialKey specialKeysByName naturalKey ParseException KeyStroke modifierKeys naturalKey ParseException modifierKeys naturalKey
Constructs an instance of code Key Stroke code given a set of modifier keys and a natural key param modifier Keys the set of modifier keys This set may be empty but it must not be code null code If this set is not empty it must only contain instances of code Modifier Key code param natural Key the natural key May be code null code private Key Stroke Sorted Set modifier Keys Natural Key natural Key this modifier Keys Util safe Copy modifier Keys Modifier Key class this natural Key natural Key this modifier Keys As Array Modifier Key this modifier Keys to Array new Modifier Key this modifier Keys size  KeyStroke modifierKeys ModifierKey naturalKey KeyStroke SortedSet modifierKeys NaturalKey naturalKey modifierKeys safeCopy modifierKeys ModifierKey naturalKey naturalKey modifierKeysAsArray ModifierKey modifierKeys toArray ModifierKey modifierKeys
see java lang Comparable compare To java lang Object public int compare To Object object Key Stroke casted Object Key Stroke object int compare To Util compare modifier Keys As Array casted Object modifier Keys As Array if compare To 0 compare To Util compare natural Key casted Object natural Key return compare To  compareTo compareTo KeyStroke castedObject KeyStroke compareTo modifierKeysAsArray castedObject modifierKeysAsArray compareTo compareTo naturalKey castedObject naturalKey compareTo
see java lang Object equals java lang Object public boolean equals Object object if object instanceof Key Stroke return false Key Stroke casted Object Key Stroke object boolean equals true equals modifier Keys equals casted Object modifier Keys equals Util equals natural Key casted Object natural Key return equals  KeyStroke KeyStroke castedObject KeyStroke modifierKeys castedObject modifierKeys naturalKey castedObject naturalKey
Formats this key stroke into the current default look return A string representation for this key stroke using the default look never code null code public String format return Key Formatter Factory get Default format this  KeyFormatterFactory getDefault
Returns the set of modifier keys for this key stroke return the set of modifier keys This set may be empty but is guaranteed not to be code null code If this set is not empty it is guaranteed to only contain instances of code Modifier Key code public Set get Modifier Keys return Collections unmodifiable Set modifier Keys  ModifierKey getModifierKeys unmodifiableSet modifierKeys
Returns the natural key for this key stroke return the natural key May be code null code public Natural Key get Natural Key return natural Key  NaturalKey getNaturalKey naturalKey
see java lang Object hash Code public int hash Code if hash Code Computed hash Code HASH INITIAL hash Code hash Code HASH FACTOR modifier Keys hash Code hash Code hash Code HASH FACTOR Util hash Code natural Key hash Code Computed true return hash Code  hashCode hashCode hashCodeComputed hashCode HASH_INITIAL hashCode hashCode HASH_FACTOR modifierKeys hashCode hashCode hashCode HASH_FACTOR hashCode naturalKey hashCodeComputed hashCode
Returns whether or not this key stroke is complete Key strokes are complete iff they have a natural key which is not code null code return code true code iff the key stroke is complete public boolean is Complete return natural Key null  isComplete naturalKey
Returns the formal string representation for this key stroke return The formal string representation for this key stroke Guaranteed not to be code null code see java lang Object to String public String to String return Key Formatter Factory get Formal Key Formatter format this  toString toString KeyFormatterFactory getFormalKeyFormatter

Constructs an instance of code Modifier Key code given a name param name The name of the key must not be null private Modifier Key String name super name  ModifierKey ModifierKey

Constructs an instance of code Natural Key code given a name param name The name of the key must not be null Natural Key String name super name  NaturalKey NaturalKey

Constructs a code Parse Exception code with the specified detail message param s the detail message public Parse Exception final String s super s  ParseException ParseException

Constructs an instance of code Special Key code given a name param name The name of the key must not be null private Special Key String name super name  SpecialKey SpecialKey

Given an SWT accelerator value provide the corresponding key stroke param accelerator The accelerator to convert should be a valid SWT accelerator value return The equivalent key stroke never code null code public static Key Stroke convert Accelerator To Key Stroke int accelerator final Sorted Set modifier Keys new Tree Set Natural Key natural Key null if accelerator SWT ALT 0 modifier Keys add Modifier Key ALT if accelerator SWT COMMAND 0 modifier Keys add Modifier Key COMMAND if accelerator SWT CTRL 0 modifier Keys add Modifier Key CTRL if accelerator SWT SHIFT 0 modifier Keys add Modifier Key SHIFT if accelerator SWT KEY MASK 0 accelerator 0 There were only accelerators natural Key null else There were other keys accelerator SWT KEY MASK switch accelerator case SWT ARROW DOWN natural Key Special Key ARROW DOWN break case SWT ARROW LEFT natural Key Special Key ARROW LEFT break case SWT ARROW RIGHT natural Key Special Key ARROW RIGHT break case SWT ARROW UP natural Key Special Key ARROW UP break case SWT BREAK natural Key Special Key BREAK break case SWT CAPS LOCK natural Key Special Key CAPS LOCK break case SWT END natural Key Special Key END break case SWT F1 natural Key Special Key F1 break case SWT F10 natural Key Special Key F10 break case SWT F11 natural Key Special Key F11 break case SWT F12 natural Key Special Key F12 break case SWT F2 natural Key Special Key F2 break case SWT F3 natural Key Special Key F3 break case SWT F4 natural Key Special Key F4 break case SWT F5 natural Key Special Key F5 break case SWT F6 natural Key Special Key F6 break case SWT F7 natural Key Special Key F7 break case SWT F8 natural Key Special Key F8 break case SWT F9 natural Key Special Key F9 break case SWT HOME natural Key Special Key HOME break case SWT INSERT natural Key Special Key INSERT break case SWT KEYPAD 0 natural Key Special Key NUMPAD 0 break case SWT KEYPAD 1 natural Key Special Key NUMPAD 1 break case SWT KEYPAD 2 natural Key Special Key NUMPAD 2 break case SWT KEYPAD 3 natural Key Special Key NUMPAD 3 break case SWT KEYPAD 4 natural Key Special Key NUMPAD 4 break case SWT KEYPAD 5 natural Key Special Key NUMPAD 5 break case SWT KEYPAD 6 natural Key Special Key NUMPAD 6 break case SWT KEYPAD 7 natural Key Special Key NUMPAD 7 break case SWT KEYPAD 8 natural Key Special Key NUMPAD 8 break case SWT KEYPAD 9 natural Key Special Key NUMPAD 9 break case SWT KEYPAD ADD natural Key Special Key NUMPAD ADD break case SWT KEYPAD CR natural Key Special Key NUMPAD ENTER break case SWT KEYPAD DECIMAL natural Key Special Key NUMPAD DECIMAL break case SWT KEYPAD DIVIDE natural Key Special Key NUMPAD DIVIDE break case SWT KEYPAD EQUAL natural Key Special Key NUMPAD EQUAL break case SWT KEYPAD MULTIPLY natural Key Special Key NUMPAD MULTIPLY break case SWT KEYPAD SUBTRACT natural Key Special Key NUMPAD SUBTRACT break case SWT NUM LOCK natural Key Special Key NUM LOCK break case SWT PAGE DOWN natural Key Special Key PAGE DOWN break case SWT PAGE UP natural Key Special Key PAGE UP break case SWT PAUSE natural Key Special Key PAUSE break case SWT PRINT SCREEN natural Key Special Key PRINT SCREEN break case SWT SCROLL LOCK natural Key Special Key SCROLL LOCK break default natural Key Character Key get Instance char accelerator 0xFFFF return Key Stroke get Instance modifier Keys natural Key  KeyStroke convertAcceleratorToKeyStroke SortedSet modifierKeys TreeSet NaturalKey naturalKey modifierKeys ModifierKey modifierKeys ModifierKey modifierKeys ModifierKey modifierKeys ModifierKey KEY_MASK naturalKey KEY_MASK ARROW_DOWN naturalKey SpecialKey ARROW_DOWN ARROW_LEFT naturalKey SpecialKey ARROW_LEFT ARROW_RIGHT naturalKey SpecialKey ARROW_RIGHT ARROW_UP naturalKey SpecialKey ARROW_UP naturalKey SpecialKey CAPS_LOCK naturalKey SpecialKey CAPS_LOCK naturalKey SpecialKey naturalKey SpecialKey naturalKey SpecialKey naturalKey SpecialKey naturalKey SpecialKey naturalKey SpecialKey naturalKey SpecialKey naturalKey SpecialKey naturalKey SpecialKey naturalKey SpecialKey naturalKey SpecialKey naturalKey SpecialKey naturalKey SpecialKey naturalKey SpecialKey naturalKey SpecialKey KEYPAD_0 naturalKey SpecialKey NUMPAD_0 KEYPAD_1 naturalKey SpecialKey NUMPAD_1 KEYPAD_2 naturalKey SpecialKey NUMPAD_2 KEYPAD_3 naturalKey SpecialKey NUMPAD_3 KEYPAD_4 naturalKey SpecialKey NUMPAD_4 KEYPAD_5 naturalKey SpecialKey NUMPAD_5 KEYPAD_6 naturalKey SpecialKey NUMPAD_6 KEYPAD_7 naturalKey SpecialKey NUMPAD_7 KEYPAD_8 naturalKey SpecialKey NUMPAD_8 KEYPAD_9 naturalKey SpecialKey NUMPAD_9 KEYPAD_ADD naturalKey SpecialKey NUMPAD_ADD KEYPAD_CR naturalKey SpecialKey NUMPAD_ENTER KEYPAD_DECIMAL naturalKey SpecialKey NUMPAD_DECIMAL KEYPAD_DIVIDE naturalKey SpecialKey NUMPAD_DIVIDE KEYPAD_EQUAL naturalKey SpecialKey NUMPAD_EQUAL KEYPAD_MULTIPLY naturalKey SpecialKey NUMPAD_MULTIPLY KEYPAD_SUBTRACT naturalKey SpecialKey NUMPAD_SUBTRACT NUM_LOCK naturalKey SpecialKey NUM_LOCK PAGE_DOWN naturalKey SpecialKey PAGE_DOWN PAGE_UP naturalKey SpecialKey PAGE_UP naturalKey SpecialKey PRINT_SCREEN naturalKey SpecialKey PRINT_SCREEN SCROLL_LOCK naturalKey SpecialKey SCROLL_LOCK naturalKey CharacterKey getInstance KeyStroke getInstance modifierKeys naturalKey
p Converts the given event into an SWT accelerator value considering the modified character with the shift modifier This is the third accelerator value that should be checked p p For example on a standard US keyboard Ctrl Shift 5 would be viewed as Ctrl Shift p param event The event to be converted must not be code null code return The combination of the state mask and the unmodified character public static int convert Event To Modified Accelerator Event event int modifiers event state Mask SWT MODIFIER MASK char character top Key event return modifiers to Upper Case character  convertEventToModifiedAccelerator stateMask MODIFIER_MASK topKey toUpperCase
p Converts the given event into an SWT accelerator value considering the unmodified character with all modifier keys This is the first accelerator value that should be checked However all alphabetic characters are considered as their uppercase equivalents p p For example on a standard US keyboard Ctrl Shift 5 would be viewed as Ctrl Shift 5 p param event The event to be converted must not be code null code return The combination of the state mask and the unmodified character public static int convert Event To Unmodified Accelerator Event event return convert Event To Unmodified Accelerator event state Mask event key Code  convertEventToUnmodifiedAccelerator convertEventToUnmodifiedAccelerator stateMask keyCode
p Converts the given state mask and key code into an SWT accelerator value considering the unmodified character with all modifier keys All alphabetic characters are considered as their uppercase equivalents p p For example on a standard US keyboard Ctrl Shift 5 would be viewed as Ctrl Shift 5 p param state Mask The integer mask of modifiers keys depressed when this was pressed param key Code The key that was pressed before being modified return The combination of the state mask and the unmodified character private static int convert Event To Unmodified Accelerator int state Mask int key Code int modifiers state Mask SWT MODIFIER MASK int character key Code return modifiers to Upper Case character  stateMask keyCode convertEventToUnmodifiedAccelerator stateMask keyCode stateMask MODIFIER_MASK keyCode toUpperCase
p Converts the given event into an SWT accelerator value considering the unmodified character with all modifier keys This is the first accelerator value that should be checked However all alphabetic characters are considered as their uppercase equivalents p p For example on a standard US keyboard Ctrl Shift 5 would be viewed as Ctrl p param event The event to be converted must not be code null code return The combination of the state mask and the unmodified character public static int convert Event To Unmodified Accelerator Key Event event return convert Event To Unmodified Accelerator event state Mask event key Code  convertEventToUnmodifiedAccelerator KeyEvent convertEventToUnmodifiedAccelerator stateMask keyCode
Converts the given event into an SWT accelerator value considering the modified character without the shift modifier This is the second accelerator value that should be checked Key strokes with alphabetic natural keys are run through code convert Event To Unmodified Accelerator code param event The event to be converted must not be code null code return The combination of the state mask without shift and the modified character public static int convert Event To Unshifted Modified Accelerator Event event Disregard alphabetic key strokes if Character is Letter char event key Code return convert Event To Unmodified Accelerator event int modifiers event state Mask SWT MODIFIER MASK SWT SHIFT char character top Key event return modifiers to Upper Case character  convertEventToUnmodifiedAccelerator convertEventToUnshiftedModifiedAccelerator isLetter keyCode convertEventToUnmodifiedAccelerator stateMask MODIFIER_MASK topKey toUpperCase
Given a key stroke this method provides the equivalent SWT accelerator value The functional inverse of code convert Accelerator To Key Stroke code param key Stroke The key stroke to convert must not be code null code return The SWT accelerator value public static final int convert Key Stroke To Accelerator final Key Stroke key Stroke int accelerator 0 final Iterator iterator key Stroke get Modifier Keys iterator while iterator has Next final Modifier Key modifier Key Modifier Key iterator next if modifier Key Modifier Key ALT accelerator SWT ALT else if modifier Key Modifier Key COMMAND accelerator SWT COMMAND else if modifier Key Modifier Key CTRL accelerator SWT CTRL else if modifier Key Modifier Key SHIFT accelerator SWT SHIFT final Natural Key natural Key key Stroke get Natural Key if natural Key instanceof Character Key accelerator Character Key natural Key get Character else if natural Key instanceof Special Key final Special Key special Key Special Key natural Key if special Key Special Key ARROW DOWN accelerator SWT ARROW DOWN else if special Key Special Key ARROW LEFT accelerator SWT ARROW LEFT else if special Key Special Key ARROW RIGHT accelerator SWT ARROW RIGHT else if special Key Special Key ARROW UP accelerator SWT ARROW UP else if special Key Special Key END accelerator SWT END else if special Key Special Key F1 accelerator SWT F1 else if special Key Special Key F10 accelerator SWT F10 else if special Key Special Key F11 accelerator SWT F11 else if special Key Special Key F12 accelerator SWT F12 else if special Key Special Key F2 accelerator SWT F2 else if special Key Special Key F3 accelerator SWT F3 else if special Key Special Key F4 accelerator SWT F4 else if special Key Special Key F5 accelerator SWT F5 else if special Key Special Key F6 accelerator SWT F6 else if special Key Special Key F7 accelerator SWT F7 else if special Key Special Key F8 accelerator SWT F8 else if special Key Special Key F9 accelerator SWT F9 else if special Key Special Key HOME accelerator SWT HOME else if special Key Special Key INSERT accelerator SWT INSERT else if special Key Special Key PAGE DOWN accelerator SWT PAGE DOWN else if special Key Special Key PAGE UP accelerator SWT PAGE UP return accelerator  convertAcceleratorToKeyStroke keyStroke convertKeyStrokeToAccelerator KeyStroke keyStroke keyStroke getModifierKeys hasNext ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey ModifierKey modifierKey ModifierKey NaturalKey naturalKey keyStroke getNaturalKey naturalKey CharacterKey CharacterKey naturalKey getCharacter naturalKey SpecialKey SpecialKey specialKey SpecialKey naturalKey specialKey SpecialKey ARROW_DOWN ARROW_DOWN specialKey SpecialKey ARROW_LEFT ARROW_LEFT specialKey SpecialKey ARROW_RIGHT ARROW_RIGHT specialKey SpecialKey ARROW_UP ARROW_UP specialKey SpecialKey specialKey SpecialKey specialKey SpecialKey specialKey SpecialKey specialKey SpecialKey specialKey SpecialKey specialKey SpecialKey specialKey SpecialKey specialKey SpecialKey specialKey SpecialKey specialKey SpecialKey specialKey SpecialKey specialKey SpecialKey specialKey SpecialKey specialKey SpecialKey specialKey SpecialKey PAGE_DOWN PAGE_DOWN specialKey SpecialKey PAGE_UP PAGE_UP
Provides an instance of code I Key Formatter code appropriate for the current instance return an instance of code I Key Formatter code appropriate for the current instance never code null code public static I Key Formatter get Key Formatter For Platform return NATIVE FORMATTER  IKeyFormatter IKeyFormatter IKeyFormatter getKeyFormatterForPlatform NATIVE_FORMATTER
Makes sure that a fully modified character is converted to the normal form This means that Ctrl key strokes must reverse the modification caused by control escaping Also all lower case letters are converted to uppercase param event The event from which the fully modified character should be pulled return The modified character uppercase and without control escaping private static char top Key Event event char character event character boolean ctrl Down event state Mask SWT CTRL 0 if ctrl Down event character event key Code event character 0x20 character 0x40 return character  topKey ctrlDown stateMask ctrlDown keyCode
Makes the given character uppercase if it is a letter param key Code The character to convert return The uppercase equivalent if any otherwise the character itself private static int to Upper Case int key Code Will this key code be truncated if key Code 0xFFFF return key Code Downcast in safety Only make characters uppercase char character char key Code return Character is Letter character Character to Upper Case character key Code  keyCode toUpperCase keyCode keyCode keyCode keyCode isLetter toUpperCase keyCode
This class should never be instantiated private SWT Key Support This class should never be instantiated  SWTKeySupport

Creates a new adaptable list All of the elements in the list must implement code I Adaptable code public Adaptable List children new Array List  IAdaptable AdaptableList ArrayList
Creates a new adaptable list with the given initial capacity All of the elements in the list must implement code I Adaptable code param initial Capacity the initial capacity of the list public Adaptable List int initial Capacity children new Array List initial Capacity  IAdaptable initialCapacity AdaptableList initialCapacity ArrayList initialCapacity
Creates a new adaptable list containing the given children param new Children the list of children public Adaptable List I Adaptable new Children this new Children length for int i 0 i new Children length i children add new Children i  newChildren AdaptableList IAdaptable newChildren newChildren newChildren newChildren
Creates a new adaptable list containing the elements of the specified collection in the order they are returned by the collection s iterator All of the elements in the list must implement code I Adaptable code param c the initial elements of this list element type code I Adaptable code public Adaptable List Collection c this c size children add All c  IAdaptable IAdaptable AdaptableList addAll
Adds the given adaptable object to this list param adaptable the new element return this list public Adaptable List add I Adaptable adaptable Assert is Not Null adaptable children add adaptable return this  AdaptableList IAdaptable isNotNull
Removes the given adaptable object from this list param adaptable the element to remove public void remove I Adaptable adaptable Assert is Not Null adaptable children remove adaptable  IAdaptable isNotNull
Returns the number of children in this list return the length of this list public int size return children size 
public Object get Adapter Class adapter if adapter I Workbench Adapter class return this return null  getAdapter IWorkbenchAdapter
see I Workbench Adapter public Object get Children Object o issue suspicious does not reference parameter return children to Array  IWorkbenchAdapter getChildren toArray
Returns the elements in this list return the elements in this list public Object get Children return children to Array  getChildren toArray
For debugging purposes only public String to String return children to String  toString toString

Creates a new workbench content provider public Base Workbench Content Provider super  BaseWorkbenchContentProvider
Method declared on I Content Provider public void dispose do nothing  IContentProvider
Returns the implementation of I Workbench Adapter for the given object Returns null if the adapter is not defined or the object is not adaptable p p param element the element return the corresponding workbench adapter object protected I Workbench Adapter get Adapter Object element if element instanceof I Adaptable return null return I Workbench Adapter I Adaptable element get Adapter I Workbench Adapter class  IWorkbenchAdapter IWorkbenchAdapter getAdapter IAdaptable IWorkbenchAdapter IAdaptable getAdapter IWorkbenchAdapter
public Object get Children Object element I Workbench Adapter adapter get Adapter element if adapter null return adapter get Children element return new Object 0  getChildren IWorkbenchAdapter getAdapter getChildren
Method declared on I Structured Content Provider public Object get Elements Object element return get Children element  IStructuredContentProvider getElements getChildren
public Object get Parent Object element I Workbench Adapter adapter get Adapter element if adapter null return adapter get Parent element return null  getParent IWorkbenchAdapter getAdapter getParent
Method declared on I Tree Content Provider public boolean has Children Object element return get Children element length 0  ITreeContentProvider hasChildren getChildren
Method declared on I Content Provider public void input Changed Viewer viewer Object old Input Object new Input do nothing  IContentProvider inputChanged oldInput newInput

public interface I Workbench Adapter Returns the children of this object When this object is displayed in a tree the returned objects will be this element s children Returns an empty array if this object has no children param o The object to get the children for return Object  IWorkbenchAdapter
public Object get Children Object o Returns an image descriptor to be used for displaying an object in the workbench Returns code null code if there is no appropriate image param object The object to get an image descriptor for return Image Descriptor  getChildren ImageDescriptor
public Image Descriptor get Image Descriptor Object object Returns the label text for this element This is typically used to assign a label to this object when displayed in the UI Returns an empty string if there is no appropriate label text for this object param o The object to get a label for return String  ImageDescriptor getImageDescriptor
public String get Label Object o Returns the logical parent of the given object in its tree Returns code null code if there is no parent or if this object doesn t belong to a tree param o The object to get the parent for return Object  getLabel

Provides a foreground color for the given element param element the element returnthe foreground color for the element or code null code to use the default foreground color 
Provides a background color for the given element param element the element returnthe background color for the element or code null code to use the default background color 
Provides a font the given element param element the element returnthe font for the element or code null code to use the default font 

Creates a new label provider for perspectives The default perspective is visually marked public Perspective Label Provider this true  PerspectiveLabelProvider
Creates a new label provider for perspectives param mark Default code true code if the default perspective is to be visually marked and code false code if the default perspective is not treated as anything special public Perspective Label Provider boolean mark Default super this mark Default mark Default  markDefault PerspectiveLabelProvider markDefault markDefault markDefault
public final Image get Image Object element if element instanceof I Perspective Descriptor I Perspective Descriptor desc I Perspective Descriptor element Image Descriptor image Descriptor desc get Image Descriptor if image Descriptor null image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL DEF PERSPECTIVE HOVER Image image Image image Cache get image Descriptor if image null image image Descriptor create Image image Cache put image Descriptor image return image return null  getImage IPerspectiveDescriptor IPerspectiveDescriptor IPerspectiveDescriptor ImageDescriptor imageDescriptor getImageDescriptor imageDescriptor imageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_DEF_PERSPECTIVE_HOVER imageCache imageDescriptor imageDescriptor createImage imageCache imageDescriptor
public final void dispose for Iterator i image Cache values iterator i has Next Image i next dispose image Cache clear  imageCache hasNext imageCache
public final String get Text Object element if element instanceof I Perspective Descriptor I Perspective Descriptor desc I Perspective Descriptor element String label desc get Label if mark Default String def PlatformUI get Workbench get Perspective Registry get Default Perspective if desc get Id equals def label Workbench Messages format Perspectives Preference default Label new Object label NON NLS 1 return label return Workbench Messages get String Perspective Label Provider unknown NON NLS 1  getText IPerspectiveDescriptor IPerspectiveDescriptor IPerspectiveDescriptor getLabel markDefault getWorkbench getPerspectiveRegistry getDefaultPerspective getId WorkbenchMessages PerspectivesPreference defaultLabel WorkbenchMessages getString PerspectiveLabelProvider
see I Table Label Provider get Column Image public final Image get Column Image Object element int column Index return get Image element  ITableLabelProvider getColumnImage getColumnImage columnIndex getImage
see I Table Label Provider get Column Text public final String get Column Text Object element int column Index return get Text element  ITableLabelProvider getColumnText getColumnText columnIndex getText

The default implementation of this code I Workbench Adapter code method returns the empty list Subclasses may override public Object get Children Object object return NO CHILDREN  IWorkbenchAdapter getChildren NO_CHILDREN
The default implementation of this code I Workbench Adapter code method returns code null code Subclasses may override public Image Descriptor get Image Descriptor Object object return null  IWorkbenchAdapter ImageDescriptor getImageDescriptor
The default implementation of this code I Workbench Adapter code method returns the empty string if the object is code null code and the object s code to String code otherwise Subclasses may override public String get Label Object object return object null object to String NON NLS 1  IWorkbenchAdapter toString getLabel toString
The default implementation of this code I Workbench Adapter code method returns code null code Subclasses may override public Object get Parent Object object return null  IWorkbenchAdapter getParent
The default implementation of this code I Workbench Adapter2 code method returns code null code Subclasses may override public RGB get Background Object element return null  IWorkbenchAdapter2 getBackground
The default implementation of this code I Workbench Adapter2 code method returns code null code Subclasses may override public RGB get Foreground Object element return null  IWorkbenchAdapter2 getForeground
The default implementation of this code I Workbench Adapter2 code method returns code null code Subclasses may override public Font Data get Font Object element return null  IWorkbenchAdapter2 FontData getFont

Creates the resource content provider public Workbench Content Provider super  WorkbenchContentProvider
public void dispose if viewer null I Workspace workspace null Object obj viewer get Input if obj instanceof I Workspace workspace I Workspace obj else if obj instanceof I Container workspace I Container obj get Workspace if workspace null workspace remove Resource Change Listener this super dispose  IWorkspace getInput IWorkspace IWorkspace IContainer IContainer getWorkspace removeResourceChangeListener
public void input Changed Viewer viewer Object old Input Object new Input super input Changed viewer old Input new Input this viewer viewer I Workspace old Workspace null I Workspace new Workspace null if old Input instanceof I Workspace old Workspace I Workspace old Input else if old Input instanceof I Container old Workspace I Container old Input get Workspace if new Input instanceof I Workspace new Workspace I Workspace new Input else if new Input instanceof I Container new Workspace I Container new Input get Workspace if old Workspace new Workspace if old Workspace null old Workspace remove Resource Change Listener this if new Workspace null new Workspace add Resource Change Listener this I Resource Change Event POST CHANGE  inputChanged oldInput newInput inputChanged oldInput newInput IWorkspace oldWorkspace IWorkspace newWorkspace oldInput IWorkspace oldWorkspace IWorkspace oldInput oldInput IContainer oldWorkspace IContainer oldInput getWorkspace newInput IWorkspace newWorkspace IWorkspace newInput newInput IContainer newWorkspace IContainer newInput getWorkspace oldWorkspace newWorkspace oldWorkspace oldWorkspace removeResourceChangeListener newWorkspace newWorkspace addResourceChangeListener IResourceChangeEvent POST_CHANGE
when this method returns ctrl get Display sync Exec new Runnable public void run process Delta delta  getDisplay syncExec processDelta
public final void resource Changed final I Resource Change Event event final I Resource Delta delta event get Delta Control ctrl viewer get Control if ctrl null ctrl is Disposed Do a sync exec not an async exec since the resource delta must be traversed in this method It is destroyed when this method returns ctrl get Display sync Exec new Runnable public void run process Delta delta  resourceChanged IResourceChangeEvent IResourceDelta getDelta getControl isDisposed getDisplay syncExec processDelta
Process a resource delta protected void process Delta I Resource Delta delta This method runs inside a sync Exec The widget may have been destroyed by the time this is run Check for this and do nothing if so Control ctrl viewer get Control if ctrl null ctrl is Disposed return Get the affected resource I Resource resource delta get Resource If any children have changed type just do a full refresh of this parent since a simple update on such children won t work and trying to map the change to a remove and add is too dicey The case is folder A renamed to existing file B answering yes to overwrite B I Resource Delta affected Children delta get Affected Children I Resource Delta CHANGED for int i 0 i affected Children length i if affected Children i get Flags I Resource Delta TYPE 0 Structured Viewer viewer refresh resource return Check the flags for changes the Navigator cares about See Resource Label Provider for the aspects it cares about Notice we don t care about F CONTENT or F MARKERS currently int change Flags delta get Flags if change Flags I Resource Delta OPEN I Resource Delta SYNC 0 Structured Viewer viewer update resource null Replacing a resource may affect its label and its children if change Flags I Resource Delta REPLACED 0 Structured Viewer viewer refresh resource true return Handle changed children for int i 0 i affected Children length i process Delta affected Children i issue several problems here should process removals before additions to avoid multiple equal elements in viewer Kim processing removals before additions was the indirect cause of 44081 and its varients Nick no delta should have an add and a remove on the same element so processing adds first is probably OK using set Redraw will cause extra flashiness set Redraw is used even for simple changes to avoid seeing a rename in two stages should turn redraw on off around combined removal and addition Kim done and only in the case of a rename both remove and add changes in one delta boolean added And Removed false try I Resource Delta added Children delta get Affected Children I Resource Delta ADDED I Resource Delta removed Children delta get Affected Children I Resource Delta REMOVED added And Removed added Children length 0 removed Children length 0 Disable redraw until the operation is finished so we don t get a flash of both the new and old item in the case of rename Only do this if we re both adding and removing files the rename case if added And Removed viewer get Control set Redraw false Process additions before removals as to not cause selection preservation prior to new objects being added Handle added children Issue one update for all insertions if added Children length 0 Object affected new Object added Children length for int i 0 i added Children length i affected i added Children i get Resource if viewer instanceof Abstract Tree Viewer Abstract Tree Viewer viewer add resource affected else Structured Viewer viewer refresh resource Handle removed children Issue one update for all removals if removed Children length 0 Object affected new Object removed Children length for int i 0 i removed Children length i affected i removed Children i get Resource if viewer instanceof Abstract Tree Viewer Abstract Tree Viewer viewer remove affected else Structured Viewer viewer refresh resource finally if added And Removed viewer get Control set Redraw true  processDelta IResourceDelta syncExec getControl isDisposed IResource getResource IResourceDelta affectedChildren getAffectedChildren IResourceDelta affectedChildren affectedChildren getFlags IResourceDelta StructuredViewer ResourceLabelProvider F_CONTENT F_MARKERS changeFlags getFlags changeFlags IResourceDelta IResourceDelta StructuredViewer changeFlags IResourceDelta StructuredViewer affectedChildren processDelta affectedChildren setRedraw setRedraw addedAndRemoved IResourceDelta addedChildren getAffectedChildren IResourceDelta IResourceDelta removedChildren getAffectedChildren IResourceDelta addedAndRemoved addedChildren removedChildren addedAndRemoved getControl setRedraw addedChildren addedChildren addedChildren addedChildren getResource AbstractTreeViewer AbstractTreeViewer StructuredViewer removedChildren removedChildren removedChildren removedChildren getResource AbstractTreeViewer AbstractTreeViewer StructuredViewer addedAndRemoved getControl setRedraw

Returns a workbench label provider that is hooked up to the decorator mechanism return a new code Decorating Label Provider code which wraps a code new code Workbench Label Provider code public static I Label Provider get Decorating Workbench Label Provider return new Decorating Label Provider new Workbench Label Provider PlatformUI get Workbench get Decorator Manager get Label Decorator  DecoratingLabelProvider WorkbenchLabelProvider ILabelProvider getDecoratingWorkbenchLabelProvider DecoratingLabelProvider WorkbenchLabelProvider getWorkbench getDecoratorManager getLabelDecorator
Creates a new workbench label provider public Workbench Label Provider no op  WorkbenchLabelProvider
Returns an image descriptor that is based on the given descriptor but decorated with additional information relating to the state of the provided object Subclasses may reimplement this method to decorate an object s image param input The base image to decorate param element The element used to look up decorations return the resuling Image Descriptor see org eclipse jface resource Composite Image Descriptor protected Image Descriptor decorate Image Image Descriptor input Object element return input  ImageDescriptor CompositeImageDescriptor ImageDescriptor decorateImage ImageDescriptor
Returns a label that is based on the given label but decorated with additional information relating to the state of the provided object Subclasses may implement this method to decorate an object s label param input The base text to decorate param element The element used to look up decorations return the resulting text protected String decorate Text String input Object element return input  decorateText
Returns the implementation of I Workbench Adapter for the given object param o the object to look up return I Workbench Adapter or code null code if the adapter is not defined or the object is not adaptable protected final I Workbench Adapter get Adapter Object o if o instanceof I Adaptable return null return I Workbench Adapter I Adaptable o get Adapter I Workbench Adapter class  IWorkbenchAdapter IWorkbenchAdapter IWorkbenchAdapter getAdapter IAdaptable IWorkbenchAdapter IAdaptable getAdapter IWorkbenchAdapter
Returns the implementation of I Workbench Adapter2 for the given object param o the object to look up return I Workbench Adapter2 or code null code if the adapter is not defined or the object is not adaptable protected final I Workbench Adapter2 get Adapter2 Object o if o instanceof I Adaptable return null return I Workbench Adapter2 I Adaptable o get Adapter I Workbench Adapter2 class  IWorkbenchAdapter2 IWorkbenchAdapter2 IWorkbenchAdapter2 getAdapter2 IAdaptable IWorkbenchAdapter2 IAdaptable getAdapter IWorkbenchAdapter2
public final Image get Image Object element obtain the base image by querying the element I Workbench Adapter adapter get Adapter element if adapter null return null Image Descriptor descriptor adapter get Image Descriptor element if descriptor null return null add any annotations to the image descriptor descriptor decorate Image descriptor element Image image Image SWT Resource Util get Image Table get descriptor if image null image descriptor create Image SWT Resource Util get Image Table put descriptor image return image  getImage IWorkbenchAdapter getAdapter ImageDescriptor getImageDescriptor decorateImage SWTResourceUtil getImageTable createImage SWTResourceUtil getImageTable
public final String get Text Object element query the element for its label I Workbench Adapter adapter get Adapter element if adapter null return NON NLS 1 String label adapter get Label element return the decorated label return decorate Text label element  getText IWorkbenchAdapter getAdapter getLabel decorateText
see org eclipse jface viewers I Color Provider get Foreground java lang Object public Color get Foreground Object element return get Color element true  IColorProvider getForeground getForeground getColor
see org eclipse jface viewers I Color Provider get Background java lang Object public Color get Background Object element return get Color element false  IColorProvider getBackground getBackground getColor
public Font get Font Object element I Workbench Adapter2 adapter get Adapter2 element if adapter null return null Font Data descriptor adapter get Font element if descriptor null return null Font font Font SWT Resource Util get Font Table get descriptor if font null font new Font Display get Current descriptor SWT Resource Util get Font Table put descriptor font return font  getFont IWorkbenchAdapter2 getAdapter2 FontData getFont SWTResourceUtil getFontTable getCurrent SWTResourceUtil getFontTable
private Color get Color Object element boolean forground I Workbench Adapter2 adapter get Adapter2 element if adapter null return null RGB descriptor forground adapter get Foreground element adapter get Background element if descriptor null return null Color color Color SWT Resource Util get Color Table get descriptor if color null color new Color Display get Current descriptor SWT Resource Util get Color Table put descriptor color return color  getColor IWorkbenchAdapter2 getAdapter2 getForeground getBackground SWTResourceUtil getColorTable getCurrent SWTResourceUtil getColorTable

Creates a new label provider for workbench parts public Workbench Part Label Provider super  WorkbenchPartLabelProvider
public final Image get Image Object element if element instanceof I Workbench Part return I Workbench Part element get Title Image return null  getImage IWorkbenchPart IWorkbenchPart getTitleImage
public final String get Text Object element if element instanceof I Workbench Part I Workbench Part part I Workbench Part element String path part get Title Tool Tip if path length 0 return part get Title else return part get Title part get Title Tool Tip NON NLS 1 NON NLS 2 return null  getText IWorkbenchPart IWorkbenchPart IWorkbenchPart getTitleToolTip getTitle getTitle getTitleToolTip
see I Table Label Provider get Column Image public final Image get Column Image Object element int column Index return get Image element  ITableLabelProvider getColumnImage getColumnImage columnIndex getImage
see I Table Label Provider get Column Text public final String get Column Text Object element int column Index return get Text element  ITableLabelProvider getColumnText getColumnText columnIndex getText

Creates a workbench viewer sorter using the default collator public Workbench Viewer Sorter super  WorkbenchViewerSorter
Creates a workbench viewer sorter using the given collator param collator the collator to use to sort strings public Workbench Viewer Sorter Collator collator super collator  WorkbenchViewerSorter
Method declared on Viewer Sorter public boolean is Sorter Property Object element String property Id return property Id equals I Basic Property Constants P TEXT  ViewerSorter isSorterProperty propertyId propertyId IBasicPropertyConstants P_TEXT

Constructs a Navigation Location with its editor part param editor Part protected Navigation Location I Editor Part editor Part this page editor Part get Site get Page this input editor Part get Editor Input  NavigationLocation editorPart NavigationLocation IEditorPart editorPart editorPart getSite getPage editorPart getEditorInput
Returns the part that the receiver holds the location for return I Editor Part protected I Editor Part get Editor Part if input null return null return page find Editor input  IEditorPart IEditorPart getEditorPart findEditor
Method declared on I Navigation Location public Object get Input return input  INavigationLocation getInput
public String get Text I Editor Part part get Editor Part if part null return new String return part get Title  getText IEditorPart getEditorPart getTitle
Method declared on I Navigation Location public void set Input Object input this input I Editor Input input  INavigationLocation setInput IEditorInput
May be extended by clients see org eclipse ui I Navigation Location dispose public void dispose release State  INavigationLocation releaseState
May be extended by clients see org eclipse ui I Navigation Location release State public void release State input null  INavigationLocation releaseState releaseState

private class Control Listener implements Listener public void handle Event Event event switch event type case SWT Activate active Editor Cell Editor control To Editor get event widget if active Editor null active Editor add Property Change Listener cell Listener update Actions Enable State break case SWT Deactivate if active Editor null active Editor remove Property Change Listener cell Listener active Editor null update Actions Enable State break default break  ControlListener handleEvent activeEditor CellEditor controlToEditor activeEditor activeEditor addPropertyChangeListener cellListener updateActionsEnableState activeEditor activeEditor removePropertyChangeListener cellListener activeEditor updateActionsEnableState
private class Action Enabled Change Listener implements I Property Change Listener private I Action action Handler protected Action Enabled Change Listener I Action action Handler super this action Handler action Handler  ActionEnabledChangeListener IPropertyChangeListener IAction actionHandler ActionEnabledChangeListener IAction actionHandler actionHandler actionHandler
public void property Change Property Change Event event if active Editor null return if event get Property equals I Action ENABLED Boolean bool Boolean event get New Value action Handler set Enabled bool boolean Value return  propertyChange PropertyChangeEvent activeEditor getProperty IAction getNewValue actionHandler setEnabled booleanValue
private class Cell Change Listener implements I Property Change Listener public void property Change Property Change Event event if active Editor null return if event get Property equals Cell Editor CUT cell Cut Action set Enabled active Editor is Cut Enabled return if event get Property equals Cell Editor COPY cell Copy Action set Enabled active Editor is Copy Enabled return if event get Property equals Cell Editor PASTE cell Paste Action set Enabled active Editor is Paste Enabled return if event get Property equals Cell Editor DELETE cell Delete Action set Enabled active Editor is Delete Enabled return if event get Property equals Cell Editor SELECT ALL cell Select All Action set Enabled active Editor is Select All Enabled return if event get Property equals Cell Editor FIND cell Find Action set Enabled active Editor is Find Enabled return if event get Property equals Cell Editor UNDO cell Undo Action set Enabled active Editor is Undo Enabled return if event get Property equals Cell Editor REDO cell Redo Action set Enabled active Editor is Redo Enabled return  CellChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent activeEditor getProperty CellEditor cellCutAction setEnabled activeEditor isCutEnabled getProperty CellEditor cellCopyAction setEnabled activeEditor isCopyEnabled getProperty CellEditor cellPasteAction setEnabled activeEditor isPasteEnabled getProperty CellEditor cellDeleteAction setEnabled activeEditor isDeleteEnabled getProperty CellEditor SELECT_ALL cellSelectAllAction setEnabled activeEditor isSelectAllEnabled getProperty CellEditor cellFindAction setEnabled activeEditor isFindEnabled getProperty CellEditor cellUndoAction setEnabled activeEditor isUndoEnabled getProperty CellEditor cellRedoAction setEnabled activeEditor isRedoEnabled
private class Cut Action Handler extends Action protected Cut Action Handler set Id Cell Editor Cut Action Handler NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids CELL CUT ACTION  CutActionHandler CutActionHandler setId CellEditorCutActionHandler setEnabled WorkbenchHelp setHelp IHelpContextIds CELL_CUT_ACTION
public void run With Event Event event if active Editor null active Editor perform Cut return if cut Action null cut Action run With Event event return  runWithEvent activeEditor activeEditor performCut cutAction cutAction runWithEvent
public void update Enabled State if active Editor null set Enabled active Editor is Cut Enabled return if cut Action null set Enabled cut Action is Enabled return set Enabled false  updateEnabledState activeEditor setEnabled activeEditor isCutEnabled cutAction setEnabled cutAction isEnabled setEnabled
private class Copy Action Handler extends Action protected Copy Action Handler set Id Cell Editor Copy Action Handler NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids CELL COPY ACTION  CopyActionHandler CopyActionHandler setId CellEditorCopyActionHandler setEnabled WorkbenchHelp setHelp IHelpContextIds CELL_COPY_ACTION
public void run With Event Event event if active Editor null active Editor perform Copy return if copy Action null copy Action run With Event event return  runWithEvent activeEditor activeEditor performCopy copyAction copyAction runWithEvent
public void update Enabled State if active Editor null set Enabled active Editor is Copy Enabled return if copy Action null set Enabled copy Action is Enabled return set Enabled false  updateEnabledState activeEditor setEnabled activeEditor isCopyEnabled copyAction setEnabled copyAction isEnabled setEnabled
private class Paste Action Handler extends Action protected Paste Action Handler set Id Cell Editor Paste Action Handler NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids CELL PASTE ACTION  PasteActionHandler PasteActionHandler setId CellEditorPasteActionHandler setEnabled WorkbenchHelp setHelp IHelpContextIds CELL_PASTE_ACTION
public void run With Event Event event if active Editor null active Editor perform Paste return if paste Action null paste Action run With Event event return  runWithEvent activeEditor activeEditor performPaste pasteAction pasteAction runWithEvent
public void update Enabled State if active Editor null set Enabled active Editor is Paste Enabled return if paste Action null set Enabled paste Action is Enabled return set Enabled false  updateEnabledState activeEditor setEnabled activeEditor isPasteEnabled pasteAction setEnabled pasteAction isEnabled setEnabled
private class Delete Action Handler extends Action protected Delete Action Handler set Id Cell Editor Delete Action Handler NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids CELL DELETE ACTION  DeleteActionHandler DeleteActionHandler setId CellEditorDeleteActionHandler setEnabled WorkbenchHelp setHelp IHelpContextIds CELL_DELETE_ACTION
public void run With Event Event event if active Editor null active Editor perform Delete return if delete Action null delete Action run With Event event return  runWithEvent activeEditor activeEditor performDelete deleteAction deleteAction runWithEvent
public void update Enabled State if active Editor null set Enabled active Editor is Delete Enabled return if delete Action null set Enabled delete Action is Enabled return set Enabled false  updateEnabledState activeEditor setEnabled activeEditor isDeleteEnabled deleteAction setEnabled deleteAction isEnabled setEnabled
private class Select All Action Handler extends Action protected Select All Action Handler set Id Cell Editor Select All Action Handler NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids CELL SELECT ALL ACTION  SelectAllActionHandler SelectAllActionHandler setId CellEditorSelectAllActionHandler setEnabled WorkbenchHelp setHelp IHelpContextIds CELL_SELECT_ALL_ACTION
public void run With Event Event event if active Editor null active Editor perform Select All return if select All Action null select All Action run With Event event return  runWithEvent activeEditor activeEditor performSelectAll selectAllAction selectAllAction runWithEvent
public void update Enabled State if active Editor null set Enabled active Editor is Select All Enabled return if select All Action null set Enabled select All Action is Enabled return set Enabled false  updateEnabledState activeEditor setEnabled activeEditor isSelectAllEnabled selectAllAction setEnabled selectAllAction isEnabled setEnabled
private class Find Action Handler extends Action protected Find Action Handler set Id Cell Editor Find Action Handler NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids CELL FIND ACTION  FindActionHandler FindActionHandler setId CellEditorFindActionHandler setEnabled WorkbenchHelp setHelp IHelpContextIds CELL_FIND_ACTION
public void run With Event Event event if active Editor null active Editor perform Find return if find Action null find Action run With Event event return  runWithEvent activeEditor activeEditor performFind findAction findAction runWithEvent
public void update Enabled State if active Editor null set Enabled active Editor is Find Enabled return if find Action null set Enabled find Action is Enabled return set Enabled false  updateEnabledState activeEditor setEnabled activeEditor isFindEnabled findAction setEnabled findAction isEnabled setEnabled
private class Undo Action Handler extends Action protected Undo Action Handler set Id Cell Editor Undo Action Handler NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids CELL UNDO ACTION  UndoActionHandler UndoActionHandler setId CellEditorUndoActionHandler setEnabled WorkbenchHelp setHelp IHelpContextIds CELL_UNDO_ACTION
public void run With Event Event event if active Editor null active Editor perform Undo return if undo Action null undo Action run With Event event return  runWithEvent activeEditor activeEditor performUndo undoAction undoAction runWithEvent
public void update Enabled State if active Editor null set Enabled active Editor is Undo Enabled return if undo Action null set Enabled undo Action is Enabled return set Enabled false  updateEnabledState activeEditor setEnabled activeEditor isUndoEnabled undoAction setEnabled undoAction isEnabled setEnabled
private class Redo Action Handler extends Action protected Redo Action Handler set Id Cell Editor Redo Action Handler NON NLS 1 set Enabled false Workbench Help set Help this I Help Context Ids CELL REDO ACTION  RedoActionHandler RedoActionHandler setId CellEditorRedoActionHandler setEnabled WorkbenchHelp setHelp IHelpContextIds CELL_REDO_ACTION
public void run With Event Event event if active Editor null active Editor perform Redo return if redo Action null redo Action run With Event event return  runWithEvent activeEditor activeEditor performRedo redoAction redoAction runWithEvent
public void update Enabled State if active Editor null set Enabled active Editor is Redo Enabled return if redo Action null set Enabled redo Action is Enabled return set Enabled false  updateEnabledState activeEditor setEnabled activeEditor isRedoEnabled redoAction setEnabled redoAction isEnabled setEnabled
Creates a code Cell Editor code action handler for the global Cut Copy Paste Delete Select All Find Undo and Redo of the action bar param action Bar the action bar to register global action handlers public Cell Editor Action Handler I Action Bars action Bar super action Bar set Global Action Handler Action Factory CUT get Id cell Cut Action action Bar set Global Action Handler Action Factory COPY get Id cell Copy Action action Bar set Global Action Handler Action Factory PASTE get Id cell Paste Action action Bar set Global Action Handler Action Factory DELETE get Id cell Delete Action action Bar set Global Action Handler Action Factory SELECT ALL get Id cell Select All Action action Bar set Global Action Handler Action Factory FIND get Id cell Find Action action Bar set Global Action Handler Action Factory UNDO get Id cell Undo Action action Bar set Global Action Handler Action Factory REDO get Id cell Redo Action  CellEditor actionBar CellEditorActionHandler IActionBars actionBar actionBar setGlobalActionHandler ActionFactory getId cellCutAction actionBar setGlobalActionHandler ActionFactory getId cellCopyAction actionBar setGlobalActionHandler ActionFactory getId cellPasteAction actionBar setGlobalActionHandler ActionFactory getId cellDeleteAction actionBar setGlobalActionHandler ActionFactory SELECT_ALL getId cellSelectAllAction actionBar setGlobalActionHandler ActionFactory getId cellFindAction actionBar setGlobalActionHandler ActionFactory getId cellUndoAction actionBar setGlobalActionHandler ActionFactory getId cellRedoAction
Adds a code Cell Editor code to the handler so that the Cut Copy Paste Delete Select All Find Undo and Redo actions are redirected to it when active param editor the code Cell Editor code public void add Cell Editor Cell Editor editor if editor null return Control control editor get Control Assert is Not Null control control To Editor put control editor control add Listener SWT Activate control Listener control add Listener SWT Deactivate control Listener if control is Focus Control active Editor editor editor add Property Change Listener cell Listener update Actions Enable State  CellEditor CellEditor addCellEditor CellEditor getControl isNotNull controlToEditor addListener controlListener addListener controlListener isFocusControl activeEditor addPropertyChangeListener cellListener updateActionsEnableState
Disposes of this action handler public void dispose set Cut Action null set Copy Action null set Paste Action null set Delete Action null set Select All Action null set Find Action null set Undo Action null set Redo Action null Iterator enum control To Editor key Set iterator while enum has Next Control control Control enum next if control is Disposed control remove Listener SWT Activate control Listener control remove Listener SWT Deactivate control Listener control To Editor clear if active Editor null active Editor remove Property Change Listener cell Listener active Editor null  setCutAction setCopyAction setPasteAction setDeleteAction setSelectAllAction setFindAction setUndoAction setRedoAction controlToEditor keySet hasNext isDisposed removeListener controlListener removeListener controlListener controlToEditor activeEditor activeEditor removePropertyChangeListener cellListener activeEditor
Removes a code Cell Editor code from the handler so that the Cut Copy Paste Delete Select All Find Undo and Redo actions are no longer redirected to it param editor the code Cell Editor code public void remove Cell Editor Cell Editor editor if editor null return if active Editor editor active Editor remove Property Change Listener cell Listener active Editor null Control control editor get Control if control null control To Editor remove control if control is Disposed control remove Listener SWT Activate control Listener control remove Listener SWT Deactivate control Listener  CellEditor CellEditor removeCellEditor CellEditor activeEditor activeEditor removePropertyChangeListener cellListener activeEditor getControl controlToEditor isDisposed removeListener controlListener removeListener controlListener
Sets the default code I Action code handler for the Copy action This code I Action code is run only if no active cell editor control param action the code I Action code to run for the Copy action or code null null if not interested public void set Copy Action I Action action if copy Action action return if copy Action null copy Action remove Property Change Listener copy Action Listener copy Action action if copy Action null copy Action add Property Change Listener copy Action Listener cell Copy Action update Enabled State  IAction IAction IAction setCopyAction IAction copyAction copyAction copyAction removePropertyChangeListener copyActionListener copyAction copyAction copyAction addPropertyChangeListener copyActionListener cellCopyAction updateEnabledState
Sets the default code I Action code handler for the Cut action This code I Action code is run only if no active cell editor control param action the code I Action code to run for the Cut action or code null null if not interested public void set Cut Action I Action action if cut Action action return if cut Action null cut Action remove Property Change Listener cut Action Listener cut Action action if cut Action null cut Action add Property Change Listener cut Action Listener cell Cut Action update Enabled State  IAction IAction IAction setCutAction IAction cutAction cutAction cutAction removePropertyChangeListener cutActionListener cutAction cutAction cutAction addPropertyChangeListener cutActionListener cellCutAction updateEnabledState
Sets the default code I Action code handler for the Delete action This code I Action code is run only if no active cell editor control param action the code I Action code to run for the Delete action or code null null if not interested public void set Delete Action I Action action if delete Action action return if delete Action null delete Action remove Property Change Listener delete Action Listener delete Action action if delete Action null delete Action add Property Change Listener delete Action Listener cell Delete Action update Enabled State  IAction IAction IAction setDeleteAction IAction deleteAction deleteAction deleteAction removePropertyChangeListener deleteActionListener deleteAction deleteAction deleteAction addPropertyChangeListener deleteActionListener cellDeleteAction updateEnabledState
Sets the default code I Action code handler for the Find action This code I Action code is run only if no active cell editor control param action the code I Action code to run for the Find action or code null null if not interested public void set Find Action I Action action if find Action action return if find Action null find Action remove Property Change Listener find Action Listener find Action action if find Action null find Action add Property Change Listener find Action Listener cell Find Action update Enabled State  IAction IAction IAction setFindAction IAction findAction findAction findAction removePropertyChangeListener findActionListener findAction findAction findAction addPropertyChangeListener findActionListener cellFindAction updateEnabledState
Sets the default code I Action code handler for the Paste action This code I Action code is run only if no active cell editor control param action the code I Action code to run for the Paste action or code null null if not interested public void set Paste Action I Action action if paste Action action return if paste Action null paste Action remove Property Change Listener paste Action Listener paste Action action if paste Action null paste Action add Property Change Listener paste Action Listener cell Paste Action update Enabled State  IAction IAction IAction setPasteAction IAction pasteAction pasteAction pasteAction removePropertyChangeListener pasteActionListener pasteAction pasteAction pasteAction addPropertyChangeListener pasteActionListener cellPasteAction updateEnabledState
Sets the default code I Action code handler for the Redo action This code I Action code is run only if no active cell editor control param action the code I Action code to run for the Redo action or code null null if not interested public void set Redo Action I Action action if redo Action action return if redo Action null redo Action remove Property Change Listener redo Action Listener redo Action action if redo Action null redo Action add Property Change Listener redo Action Listener cell Redo Action update Enabled State  IAction IAction IAction setRedoAction IAction redoAction redoAction redoAction removePropertyChangeListener redoActionListener redoAction redoAction redoAction addPropertyChangeListener redoActionListener cellRedoAction updateEnabledState
Sets the default code I Action code handler for the Select All action This code I Action code is run only if no active cell editor control param action the code I Action code to run for the Select All action or code null null if not interested public void set Select All Action I Action action if select All Action action return if select All Action null select All Action remove Property Change Listener select All Action Listener select All Action action if select All Action null select All Action add Property Change Listener select All Action Listener cell Select All Action update Enabled State  IAction IAction IAction setSelectAllAction IAction selectAllAction selectAllAction selectAllAction removePropertyChangeListener selectAllActionListener selectAllAction selectAllAction selectAllAction addPropertyChangeListener selectAllActionListener cellSelectAllAction updateEnabledState
Sets the default code I Action code handler for the Undo action This code I Action code is run only if no active cell editor control param action the code I Action code to run for the Undo action or code null null if not interested public void set Undo Action I Action action if undo Action action return if undo Action null undo Action remove Property Change Listener undo Action Listener undo Action action if undo Action null undo Action add Property Change Listener undo Action Listener cell Undo Action update Enabled State  IAction IAction IAction setUndoAction IAction undoAction undoAction undoAction removePropertyChangeListener undoActionListener undoAction undoAction undoAction addPropertyChangeListener undoActionListener cellUndoAction updateEnabledState
Updates the enable state of the Cut Copy Paste Delete Select All Find Undo and Redo action handlers private void update Actions Enable State cell Cut Action update Enabled State cell Copy Action update Enabled State cell Paste Action update Enabled State cell Delete Action update Enabled State cell Select All Action update Enabled State cell Find Action update Enabled State cell Undo Action update Enabled State cell Redo Action update Enabled State  updateActionsEnableState cellCutAction updateEnabledState cellCopyAction updateEnabledState cellPasteAction updateEnabledState cellDeleteAction updateEnabledState cellSelectAllAction updateEnabledState cellFindAction updateEnabledState cellUndoAction updateEnabledState cellRedoAction updateEnabledState

public class Cool Item Group Marker extends Group Marker Create a new group marker with the given name The group name must not be code null code or the empty string The group name is also used as the item id Note that Cool Item Group Markers must have a group name and the name must be unique param group Name the name of the group public Cool Item Group Marker String group Name super group Name  CoolItemGroupMarker GroupMarker CoolItemGroupMarkers groupName CoolItemGroupMarker groupName groupName

private Action forward Action Allocates a new Drill Down Tree Part param tree the target tree for refocusing public Drill Down Adapter Tree Viewer tree f Drill Stack new Drill Stack f Child Tree tree  forwardAction DrillDownTreePart DrillDownAdapter TreeViewer fDrillStack DrillStack fChildTree
Adds actions for go back go home and go into to a menu manager param manager is the target manager to update public void add Navigation Actions I Menu Manager manager create Actions manager add home Action manager add back Action manager add forward Action update Navigation Buttons  addNavigationActions IMenuManager createActions homeAction backAction forwardAction updateNavigationButtons
Adds actions for go back go home and go into to a tool bar manager param tool Bar is the target manager to update public void add Navigation Actions I Tool Bar Manager tool Bar create Actions tool Bar add home Action tool Bar add back Action tool Bar add forward Action update Navigation Buttons  toolBar addNavigationActions IToolBarManager toolBar createActions toolBar homeAction toolBar backAction toolBar forwardAction updateNavigationButtons
Returns whether expansion is possible for the current selection This will only be true if it has children param element the object to test for expansion return code true code if expansion is possible otherwise return code false code public boolean can Expand Object element return f Child Tree is Expandable element  canExpand fChildTree isExpandable
Returns whether go back is possible for child tree This is only possible if the client has performed one or more drilling operations return code true code if go back is possible code false code otherwise public boolean can Go Back return f Drill Stack can Go Back  canGoBack fDrillStack canGoBack
Returns whether go home is possible for child tree This is only possible if the client has performed one or more drilling operations return code true code if go home is possible code false code otherwise public boolean can Go Home return f Drill Stack can Go Home  canGoHome fDrillStack canGoHome
Returns whether go into is possible for child tree This is only possible if the current selection in the client has one item and it has children return code true code if go into is possible code false code otherwise public boolean can Go Into I Structured Selection o Selection I Structured Selection f Child Tree get Selection if o Selection null o Selection size 1 return false Object an Element o Selection get First Element return can Expand an Element  canGoInto IStructuredSelection oSelection IStructuredSelection fChildTree getSelection oSelection oSelection anElement oSelection getFirstElement canExpand anElement
Home home Action new Action Workbench Messages get String Go Home text NON NLS 1 public void run go Home  homeAction WorkbenchMessages getString GoHome goHome
I Shared Images images PlatformUI get Workbench get Shared Images back Action new Action Workbench Messages get String Go Back text NON NLS 1 public void run go Back  ISharedImages getWorkbench getSharedImages backAction WorkbenchMessages getString GoBack goBack
Forward forward Action new Action Workbench Messages get String Go Into text NON NLS 1 public void run go Into  forwardAction WorkbenchMessages getString GoInto goInto
Create the actions for navigation param tree the target tree for refocusing private void create Actions Only do this once if home Action null return Home home Action new Action Workbench Messages get String Go Home text NON NLS 1 public void run go Home home Action set Tool Tip Text Workbench Messages get String Go Home tool Tip NON NLS 1 home Action set Image Descriptor Workbench Images get Image Descriptor I Workbench Graphic Constants IMG ETOOL HOME NAV Back I Shared Images images PlatformUI get Workbench get Shared Images back Action new Action Workbench Messages get String Go Back text NON NLS 1 public void run go Back back Action set Tool Tip Text Workbench Messages get String Go Back tool Tip NON NLS 1 back Action set Image Descriptor images get Image Descriptor I Shared Images IMG TOOL BACK back Action set Disabled Image Descriptor images get Image Descriptor I Shared Images IMG TOOL BACK DISABLED Forward forward Action new Action Workbench Messages get String Go Into text NON NLS 1 public void run go Into forward Action set Tool Tip Text Workbench Messages get String Go Into tool Tip NON NLS 1 forward Action set Image Descriptor images get Image Descriptor I Shared Images IMG TOOL FORWARD forward Action set Disabled Image Descriptor images get Image Descriptor I Shared Images IMG TOOL FORWARD DISABLED Update the buttons when a selection change occurs f Child Tree add Selection Changed Listener this update Navigation Buttons  createActions homeAction homeAction WorkbenchMessages getString GoHome goHome homeAction setToolTipText WorkbenchMessages getString GoHome toolTip homeAction setImageDescriptor WorkbenchImages getImageDescriptor IWorkbenchGraphicConstants IMG_ETOOL_HOME_NAV ISharedImages getWorkbench getSharedImages backAction WorkbenchMessages getString GoBack goBack backAction setToolTipText WorkbenchMessages getString GoBack toolTip backAction setImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_BACK backAction setDisabledImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_BACK_DISABLED forwardAction WorkbenchMessages getString GoInto goInto forwardAction setToolTipText WorkbenchMessages getString GoInto toolTip forwardAction setImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_FORWARD forwardAction setDisabledImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_FORWARD_DISABLED fChildTree addSelectionChangedListener updateNavigationButtons
Expands the given items in the tree The list of items passed should be derived by calling code get Expanded code param items is a list of items within the tree which should be expanded private void expand List items f Child Tree set Expanded Elements items to Array  getExpanded fChildTree setExpandedElements toArray
Returns a list of elements corresponding to expanded nodes in child tree return a list of expandd elements private List get Expanded return Arrays as List f Child Tree get Expanded Elements  getExpanded asList fChildTree getExpandedElements
Reverts the input for the tree back to the state when code go Into code was last called p A frame is removed from the drill stack Then that frame is used to reset the input and expansion state for the child tree p public void go Back Object current Input f Child Tree get Input Drill Frame o Frame f Drill Stack go Back Object input o Frame get Element f Child Tree set Input input expand o Frame get Expansion if there was a selection it should have been preserved but if not select the element that was drilled into if f Child Tree get Selection is Empty f Child Tree set Selection new Structured Selection current Input true update Navigation Buttons  goInto goBack currentInput fChildTree getInput DrillFrame oFrame fDrillStack goBack oFrame getElement fChildTree setInput oFrame getExpansion fChildTree getSelection isEmpty fChildTree setSelection StructuredSelection currentInput updateNavigationButtons
Reverts the input for the tree back to the state when the adapter was created p All of the frames are removed from the drill stack Then the oldest frame is used to reset the input and expansion state for the child tree p public void go Home Object current Input f Child Tree get Input Drill Frame o Frame f Drill Stack go Home Object input o Frame get Element f Child Tree set Input input expand o Frame get Expansion if there was a selection it should have been preserved but if not select the element that was last drilled into if f Child Tree get Selection is Empty f Child Tree set Selection new Structured Selection current Input true update Navigation Buttons  goHome currentInput fChildTree getInput DrillFrame oFrame fDrillStack goHome oFrame getElement fChildTree setInput oFrame getExpansion fChildTree getSelection isEmpty fChildTree setSelection StructuredSelection currentInput updateNavigationButtons
Sets the input for the tree to the current selection p The current input and expansion state are saved in a frame and added to the drill stack Then the input for the tree is changed to be the current selection The expansion state for the tree is maintained during the operation p p On return the client may revert back to the previous state by invoking code go Back code or code go Home code p public void go Into I Structured Selection sel I Structured Selection f Child Tree get Selection Object element sel get First Element go Into element  goBack goHome goInto IStructuredSelection IStructuredSelection fChildTree getSelection getFirstElement goInto
Sets the input for the tree to a particular item in the tree p The current input and expansion state are saved in a frame and added to the drill stack Then the input for the tree is changed to be code new Input code The expansion state for the tree is maintained during the operation p p On return the client may revert back to the previous state by invoking code go Back code or code go Home code p param new Input the new input element public void go Into Object new Input If we can drill if can Expand new Input Save the old state Object old Input f Child Tree get Input List expanded List get Expanded f Drill Stack add new Drill Frame old Input null expanded List NON NLS 1 Install the new state f Child Tree set Input new Input expand expanded List update Navigation Buttons  newInput goBack goHome newInput goInto newInput canExpand newInput oldInput fChildTree getInput expandedList getExpanded fDrillStack DrillFrame oldInput expandedList fChildTree setInput newInput expandedList updateNavigationButtons
Resets the drill down adapter p This method is typically called when the input for the underlying view is reset by something other than the adapter On return the drill stack has been cleared and the navigation buttons reflect the new state of the underlying viewer p public void reset f Drill Stack reset update Navigation Buttons  fDrillStack updateNavigationButtons
Updates the navigation buttons when a selection change occurs in the tree public void selection Changed Selection Changed Event event update Navigation Buttons  selectionChanged SelectionChangedEvent updateNavigationButtons
Updates the enabled state for each navigation button protected void update Navigation Buttons if home Action null home Action set Enabled can Go Home back Action set Enabled can Go Back forward Action set Enabled can Go Into  updateNavigationButtons homeAction homeAction setEnabled canGoHome backAction setEnabled canGoBack forwardAction setEnabled canGoInto

private Drill Down Adapter adapter Constructs a new Drill Down Tree Viewer param parent the parent composite for this control param style the SWT style for this control public Drill Down Composite Composite parent int style super parent style create Navigation Buttons  DrillDownAdapter DrillDownTreeViewer DrillDownComposite createNavigationButtons
Creates the navigation buttons for this viewer protected void create Navigation Buttons Grid Data gid Grid Layout layout Define layout layout new Grid Layout layout margin Height layout margin Width layout horizontal Spacing layout vertical Spacing 0 set Layout layout Create a toolbar tool Bar Mgr new Tool Bar Manager SWT FLAT Tool Bar tool Bar tool Bar Mgr create Control this gid new Grid Data gid horizontal Alignment Grid Data FILL gid vertical Alignment Grid Data BEGINNING tool Bar set Layout Data gid  createNavigationButtons GridData GridLayout GridLayout marginHeight marginWidth horizontalSpacing verticalSpacing setLayout toolBarMgr ToolBarManager ToolBar toolBar toolBarMgr createControl GridData horizontalAlignment GridData verticalAlignment GridData toolBar setLayoutData
Sets the child viewer This method should only be called once after the viewer has been created param a Viewer the new child viewer public void set Child Tree Tree Viewer a Viewer Save viewer f Child Tree a Viewer Create adapter adapter new Drill Down Adapter f Child Tree adapter add Navigation Actions tool Bar Mgr tool Bar Mgr update true Set tree layout Grid Data gid new Grid Data gid grab Excess Horizontal Space gid grab Excess Vertical Space true gid horizontal Alignment gid vertical Alignment Grid Data FILL f Child Tree get Tree set Layout Data gid layout  aViewer setChildTree TreeViewer aViewer fChildTree aViewer DrillDownAdapter fChildTree addNavigationActions toolBarMgr toolBarMgr GridData GridData grabExcessHorizontalSpace grabExcessVerticalSpace horizontalAlignment verticalAlignment GridData fChildTree getTree setLayoutData

List f Expansion null Allocates a new Drill Frame param o Element the tree input element param str Property Name the visible tree property param v Expansion the current expansion state of the tree public Drill Frame Object o Element Object str Property Name List v Expansion f Element o Element f Property Name str Property Name f Expansion v Expansion  fExpansion DrillFrame oElement strPropertyName vExpansion DrillFrame oElement strPropertyName vExpansion fElement oElement fPropertyName strPropertyName fExpansion vExpansion
Compares two Objects for equality p param obj the reference object with which to compare return code true code if this object is the same as the obj argument code false code otherwise public boolean equals Object obj Compare handles if this obj return true Compare class if obj instanceof Drill Frame return false Compare contents Drill Frame o Other Drill Frame obj return f Element o Other f Element f Property Name equals o Other f Property Name  DrillFrame DrillFrame oOther DrillFrame fElement oOther fElement fPropertyName oOther fPropertyName
Returns the input element return the input element public Object get Element return f Element  getElement fElement
Returns the expansion state for a tree return the expansion state for a tree public List get Expansion return f Expansion  getExpansion fExpansion
Returns the property name return the property name public Object get Property Name return f Property Name  getPropertyName fPropertyName

Stack f Stack null Allocates a new Drill Stack public Drill Stack reset  fStack DrillStack DrillStack
Adds a drill frame to the stack param o Record the new drill frame public Drill Frame add Drill Frame o Record f Stack push o Record return o Record  oRecord DrillFrame DrillFrame oRecord fStack oRecord oRecord
Returns true if backward navigation is possible This is only true if the stack size is greater than 0 return true if backward navigation is possible public boolean can Go Back return f Stack size 0  canGoBack fStack
Returns true if go home is possible This is only true if the stack size is greater than 0 return true if go home is possible public boolean can Go Home return f Stack size 0  canGoHome fStack
Navigate backwards one record public Drill Frame go Back Drill Frame a Frame Drill Frame f Stack pop return a Frame  DrillFrame goBack DrillFrame aFrame DrillFrame fStack aFrame
Navigate to the home record public Drill Frame go Home Drill Frame a Frame Drill Frame f Stack element At 0 reset return a Frame  DrillFrame goHome DrillFrame aFrame DrillFrame fStack elementAt aFrame
Clears the navigation stack public void reset f Stack new Stack  fStack
Returns the stack size return the stack size public int size return f Stack size  fStack
Returns the top element on the stack return the top element on the stack public Drill Frame top return Drill Frame f Stack peek  DrillFrame DrillFrame fStack

private I Workbench Page page Creates an empty editor action bar contributor The action bars are furnished later via the code init code method public Editor Action Bar Contributor  IWorkbenchPage 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

public I Editor Input input private Editor Input Data String editor Id I Editor Input input this editor Id editor Id this input input  IEditorInput EditorInputData editorId IEditorInput editorId editorId
Creates a new transfer object private Editor Input Transfer  EditorInputTransfer
Returns the singleton instance return the singleton instance public static Editor Input Transfer get Instance return instance  EditorInputTransfer getInstance
Method declared on Transfer protected int get Type Ids return new int TYPEID  getTypeIds
return the list of type names protected String get Type Names return new String TYPE NAME  getTypeNames TYPE_NAME
public void java To Native Object data Transfer Data transfer Data if data instanceof Editor Input Data return Editor Input Data editor Inputs Editor Input Data data The editor input serialization format is int number of editor inputs Then the following for each editor input String editor Id String factory Id String data used to recreate the I Editor Input int editor Input Count editor Inputs length try Byte Array Output Stream out new Byte Array Output Stream Data Output Stream data Out new Data Output Stream out write the number of resources data Out write Int editor Input Count write each resource for int i 0 i editor Inputs length i write Editor Input data Out editor Inputs i cleanup data Out close out close byte bytes out to Byte Array super java To Native bytes transfer Data catch IO Exception e  javaToNative TransferData transferData EditorInputData EditorInputData editorInputs EditorInputData editorId factoryId IEditorInput editorInputCount editorInputs ByteArrayOutputStream ByteArrayOutputStream DataOutputStream dataOut DataOutputStream dataOut writeInt editorInputCount editorInputs writeEditorInput dataOut editorInputs dataOut toByteArray javaToNative transferData IOException
public Object native To Java Transfer Data transfer Data byte bytes byte super native To Java transfer Data if bytes null return null Data Input Stream in new Data Input Stream new Byte Array Input Stream bytes try int count in read Int Editor Input Data results new Editor Input Data count for int i 0 i count i results i read Editor Input in return results catch IO Exception e return null catch Workbench Exception e return null  nativeToJava TransferData transferData nativeToJava transferData DataInputStream DataInputStream ByteArrayInputStream readInt EditorInputData EditorInputData readEditorInput IOException WorkbenchException
Method read Editor Input param in return Editor Input Data private Editor Input Data read Editor Input Data Input Stream data In throws IO Exception Workbench Exception String editor Id data In readUTF String factory Id data In readUTF String xml String data In readUTF if xml String null xml String length 0 return null String Reader reader new String Reader xml String Restore the editor input XML Memento memento XML Memento create Read Root reader I Element Factory factory PlatformUI get Workbench get Element Factory factory Id if factory null I Adaptable adaptable factory create Element memento if adaptable null adaptable instanceof I Editor Input return new Editor Input Data editor Id I Editor Input adaptable return null  readEditorInput EditorInputData EditorInputData readEditorInput DataInputStream dataIn IOException WorkbenchException editorId dataIn factoryId dataIn xmlString dataIn xmlString xmlString StringReader StringReader xmlString XMLMemento XMLMemento createReadRoot IElementFactory getWorkbench getElementFactory factoryId IAdaptable createElement IEditorInput EditorInputData editorId IEditorInput
Method write Editor Input param data Out param editor Input Data private void write Editor Input Data Output Stream data Out Editor Input Data editor Input Data throws IO Exception write the id of the editor data Out writeUTF editor Input Data editor Id write the information needed to recreate the editor input if editor Input Data input null Capture the editor information XML Memento memento XML Memento create Write Root I Editor Input NON NLS 1 I Persistable Element element editor Input Data input get Persistable if element null get the I Editor Input to save its state element save State memento convert memento to String String Writer writer new String Writer memento save writer writer close write the factor ID and state information data Out writeUTF element get Factory Id data Out writeUTF writer to String  writeEditorInput dataOut editorInputData writeEditorInput DataOutputStream dataOut EditorInputData editorInputData IOException dataOut editorInputData editorId editorInputData XMLMemento XMLMemento createWriteRoot IEditorInput IPersistableElement editorInputData getPersistable IEditorInput saveState StringWriter StringWriter dataOut getFactoryId dataOut toString
public static Editor Input Data create Editor Input Data String editor Id I Editor Input input return new Editor Input Data editor Id input  EditorInputData createEditorInputData editorId IEditorInput EditorInputData editorId

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
void set Default Title set Title get Part Name  setDefaultTitle setTitle getPartName

Creates an editor input based of the given file resource param file the file resource public File Editor Input I File file if file null throw new Illegal Argument Exception this file file  FileEditorInput IFile IllegalArgumentException
Method declared on Object public int hash Code return file hash Code  hashCode hashCode
public boolean equals Object obj if this obj return true if obj instanceof File Editor Input return false File Editor Input other File Editor Input obj return file equals other file  FileEditorInput FileEditorInput FileEditorInput
Method declared on I Editor Input public boolean exists return file exists  IEditorInput
public Object get Adapter Class adapter if adapter I File class return file return file get Adapter adapter  getAdapter IFile getAdapter
Method declared on I Persistable Element public String get Factory Id return File Editor Input Factory get Factory Id  IPersistableElement getFactoryId FileEditorInputFactory getFactoryId
Method declared on I File Editor Input public I File get File return file  IFileEditorInput IFile getFile
Method declared on I Editor Input public Image Descriptor get Image Descriptor return PlatformUI get Workbench get Editor Registry get Image Descriptor file get Name  IEditorInput ImageDescriptor getImageDescriptor getWorkbench getEditorRegistry getImageDescriptor getName
Method declared on I Editor Input public String get Name return file get Name  IEditorInput getName getName
Method declared on I Editor Input public I Persistable Element get Persistable return this  IEditorInput IPersistableElement getPersistable
Method declared on I Storage Editor Input public I Storage get Storage throws Core Exception return file  IStorageEditorInput IStorage getStorage CoreException
Method declared on I Editor Input public String get Tool Tip Text return file get Full Path make Relative to String  IEditorInput getToolTipText getFullPath makeRelative toString
Method declared on I Persistable Element public void save State I Memento memento File Editor Input Factory save State memento this  IPersistableElement saveState IMemento FileEditorInputFactory saveState
issue consider using an internal adapter for I Path Editor Input rather than adding this as API public I Path get Path return file get Location  IPathEditorInput IPath getPath getLocation

Creates a new factory public File Editor Input Factory  FileEditorInputFactory
public I Adaptable create Element I Memento memento Get the file name String file Name memento get String TAG PATH if file Name null return null Get a handle to the I File which can be a handle to a resource that does not exist in workspace I File file Resources Plugin get Workspace get Root get File new Path file Name if file null return new File Editor Input file else return null  IAdaptable createElement IMemento fileName getString TAG_PATH fileName IFile IFile ResourcesPlugin getWorkspace getRoot getFile fileName FileEditorInput
Returns the element factory id for this class return the element factory id public static String get Factory Id return ID FACTORY  getFactoryId ID_FACTORY
Saves the state of the given file editor input into the given memento param memento the storage area for element state param input the file editor input public static void save State I Memento memento File Editor Input input I File file input get File memento put String TAG PATH file get Full Path to String  saveState IMemento FileEditorInput IFile getFile putString TAG_PATH getFullPath toString

private I Resource Change Listener resource Listener new I Resource Change Listener public void resource Changed I Resource Change Event event I Resource Delta main Delta event get Delta if main Delta null embedded Editor null I Resource Delta affected Element main Delta find Member get File get Full Path if affected Element null try process Delta affected Element catch Core Exception exception Failed so close the receiver if embedded Editor null embedded Editor get Site get Page close Editor embedded Editor true  IResourceChangeListener resourceListener IResourceChangeListener resourceChanged IResourceChangeEvent IResourceDelta mainDelta getDelta mainDelta embeddedEditor IResourceDelta affectedElement mainDelta findMember getFile getFullPath affectedElement processDelta affectedElement CoreException embeddedEditor embeddedEditor getSite getPage closeEditor embeddedEditor
change Runnable new Runnable public void run I Path path delta get Moved To Path I File new File delta get Resource get Workspace get Root get File path if new File null embedded Editor null embedded Editor source Changed new File In Place Editor Input new File  changeRunnable IPath getMovedToPath IFile newFile getResource getWorkspace getRoot getFile newFile embeddedEditor embeddedEditor sourceChanged FileInPlaceEditorInput newFile
change Runnable new Runnable public void run if embedded Editor null embedded Editor source Deleted embedded Editor get Site get Page close Editor embedded Editor true  changeRunnable embeddedEditor embeddedEditor sourceDeleted embeddedEditor getSite getPage closeEditor embeddedEditor
private boolean process Delta final I Resource Delta delta throws Core Exception Runnable change Runnable null switch delta get Kind case I Resource Delta REMOVED if I Resource Delta MOVED TO delta get Flags 0 change Runnable new Runnable public void run I Path path delta get Moved To Path I File new File delta get Resource get Workspace get Root get File path if new File null embedded Editor null embedded Editor source Changed new File In Place Editor Input new File else change Runnable new Runnable public void run if embedded Editor null embedded Editor source Deleted embedded Editor get Site get Page close Editor embedded Editor true break if change Runnable null embedded Editor null embedded Editor get Site get Shell get Display async Exec change Runnable return true because we are sitting on files anyway  processDelta IResourceDelta CoreException changeRunnable getKind IResourceDelta IResourceDelta MOVED_TO getFlags changeRunnable IPath getMovedToPath IFile newFile getResource getWorkspace getRoot getFile newFile embeddedEditor embeddedEditor sourceChanged FileInPlaceEditorInput newFile changeRunnable embeddedEditor embeddedEditor sourceDeleted embeddedEditor getSite getPage closeEditor embeddedEditor changeRunnable embeddedEditor embeddedEditor getSite getShell getDisplay asyncExec changeRunnable
Creates an in place editor input based on a file resource param file the file resource public File In Place Editor Input I File file super file  FileInPlaceEditorInput IFile
public void set In Place Editor I In Place Editor editor if embedded Editor editor if embedded Editor null get File get Workspace remove Resource Change Listener resource Listener embedded Editor editor if embedded Editor null get File get Workspace add Resource Change Listener resource Listener  setInPlaceEditor IInPlaceEditor embeddedEditor embeddedEditor getFile getWorkspace removeResourceChangeListener resourceListener embeddedEditor embeddedEditor getFile getWorkspace addResourceChangeListener resourceListener

public interface I Contributed Contents View Returns the workbench part which contributed the current contents of this view return the part which contributed the current contents  IContributedContentsView

public interface I Drop Action Delegate Runs the drop action on the given source and target param source The object that is being dragged param target The object that the drop is occurring over return boolean True if the drop was successful and false otherwise  IDropActionDelegate

public class Part Init Exception extends Workbench Exception Creates a new exception with the given message param message the message public Part Init Exception String message super message  PartInitException WorkbenchException PartInitException
Creates a new exception with the given message param message the message param nested Exception a exception to be wrapped by this Part Init Exception public Part Init Exception String message Throwable nested Exception super message nested Exception  nestedException PartInitException PartInitException nestedException nestedException
Creates a new exception with the given status object The message of the given status is used as the exception message param status the status object to be associated with this exception public Part Init Exception I Status status super status  PartInitException IStatus

Creates a new intro part protected Intro Part super  IntroPart
see org eclipse ui intro I Intro Part add Property Listener org eclipse ui I Property Listener public void add Property Listener I Property Listener l prop Change Listeners add l  IIntroPart addPropertyListener IPropertyListener addPropertyListener IPropertyListener propChangeListeners
see I Intro Part public abstract void create Part Control Composite parent  IIntroPart createPartControl
The code Intro Part code implementation of this code I Intro Part code method disposes the title image loaded by code set Initialization Data code Subclasses may extend public void dispose Reference Counter image Cache Workbench Images get Image Cache Image image Image image Cache get image Descriptor if image null int count image Cache remove Ref image Descriptor if count 0 image dispose Clear out the property change listeners as we should not be notifying anyone after the part has been disposed if prop Change Listeners is Empty prop Change Listeners new Listener List 1  IntroPart IIntroPart setInitializationData ReferenceCounter imageCache WorkbenchImages getImageCache imageCache imageDescriptor imageCache removeRef imageDescriptor propChangeListeners isEmpty propChangeListeners ListenerList
Platform run new Safe Runnable public void run l property Changed this property Id  SafeRunnable propertyChanged propertyId
Fires a property changed event param property Id the id of the property that changed protected void fire Property Change final int property Id Object array prop Change Listeners get Listeners for int nX 0 nX array length nX final I Property Listener l I Property Listener array nX Platform run new Safe Runnable public void run l property Changed this property Id  propertyId firePropertyChange propertyId propChangeListeners getListeners IPropertyListener IPropertyListener SafeRunnable propertyChanged propertyId
This implementation of the method declared by code I Adaptable code passes the request along to the platform s adapter manager roughly code Platform get Adapter Manager get Adapter this adapter code Subclasses may override this method however if they do so they should invoke the method on their superclass to ensure that the Platform s adapter manager is consulted public Object get Adapter Class adapter return Platform get Adapter Manager get Adapter this adapter  IAdaptable getAdapterManager getAdapter getAdapter getAdapterManager getAdapter
Returns the configuration element for this part The configuration element comes from the plug in registry entry for the extension defining this part return the configuration element for this part protected I Configuration Element get Configuration Element return config Element  IConfigurationElement getConfigurationElement configElement
Returns the default title image return the default image protected Image get Default Image return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG DEF VIEW  getDefaultImage getWorkbench getSharedImages getImage ISharedImages IMG_DEF_VIEW
see org eclipse ui intro I Intro Part get Intro Site public final I Intro Site get Intro Site return part Site  IIntroPart getIntroSite IIntroSite getIntroSite partSite
see org eclipse ui intro I Intro Part get Title Image public Image get Title Image if title Image null return title Image return get Default Image  IIntroPart getTitleImage getTitleImage titleImage titleImage getDefaultImage
The base implementation of this link I Intro Part method ignores the memento and initializes the part in a fresh state Subclasses may extend to perform any state restoration but must call the super method param site the intro site param memento the intro part state or code null code if there is no previous saved state exception Part Init Exception if this part was not initialized successfully public void init I Intro Site site I Memento memento throws Part Init Exception set Site site  IIntroPart PartInitException IIntroSite IMemento PartInitException setSite
Sets the part site p Subclasses must invoke this method from link org eclipse ui intro I Intro Part init I Intro Site I Memento p param site the intro part site protected void set Site I Intro Site site this part Site site  IIntroPart IIntroSite IMemento setSite IIntroSite partSite
see org eclipse ui intro I Intro Part remove Property Listener org eclipse ui I Property Listener public void remove Property Listener I Property Listener l prop Change Listeners remove l  IIntroPart removePropertyListener IPropertyListener removePropertyListener IPropertyListener propChangeListeners
The base implementation of this link I Intro Part method does nothing Subclasses may override param memento a memento to receive the object state public void save State I Memento memento no op  IIntroPart saveState IMemento
see I Intro Part public abstract void set Focus  IIntroPart setFocus
The code Intro Part code implementation of this code I Executable Extension code records the configuration element in and internal state variable accessible via code get Config Element code It also loads the title image if one is specified in the configuration element Subclasses may extend Should not be called by clients It is called by the core plugin when creating this executable extension public void set Initialization Data I Configuration Element cfig String property Name Object data Save config element config Element cfig Icon String str Icon cfig get Attribute icon NON NLS 1 if str Icon null return image Descriptor AbstractUI Plugin image Descriptor From Plugin config Element get Declaring Extension get Namespace str Icon if image Descriptor null return remember the image in a separatly from title Image since it must be disposed even if the title Image is changed to something else Reference Counter image Cache Workbench Images get Image Cache Image image Image image Cache get image Descriptor if image null image Cache add Ref image Descriptor else image image Descriptor create Image image Cache put image Descriptor image title Image image  IntroPart IExecutableExtension getConfigElement setInitializationData IConfigurationElement propertyName configElement strIcon getAttribute strIcon imageDescriptor AbstractUIPlugin imageDescriptorFromPlugin configElement getDeclaringExtension getNamespace strIcon imageDescriptor titleImage titleImage ReferenceCounter imageCache WorkbenchImages getImageCache imageCache imageDescriptor imageCache addRef imageDescriptor imageDescriptor createImage imageCache imageDescriptor titleImage
Sets or clears the title image of this part param title Image the title image or code null code to clear protected void set Title Image Image title Image Assert is True title Image null title Image is Disposed Do not send changes if they are the same if this title Image title Image return this title Image title Image fire Property Change I Intro Part PROP TITLE  titleImage setTitleImage titleImage isTrue titleImage titleImage isDisposed titleImage titleImage titleImage titleImage firePropertyChange IIntroPart PROP_TITLE

public interface I Page Creates the SWT control for this page under the given parent control p Clients should not call this method the workbench calls this method when it needs to which may be never p param parent the parent control  IPage
public void create Control Composite parent Disposes of this page p This is the last method called on the code I Page code Implementors should clean up any resources associated with the page p Callers of this method should ensure that the page s control if it exists has been disposed before calling this method However for backward compatibilty implementors must also ensure that the page s control has been disposed before this method returns p p Note that there is no guarantee that create Control has been called so the control may never have been created p  createControl IPage createControl
public void dispose Returns the SWT control for this page return the SWT control for this page or code null code if this page does not have a control 
public Control get Control Allows the page to make contributions to the given action bars The contributions will be visible when the page is visible p This method is automatically called shortly after code create Control code is called p param action Bars the action bars for this page  getControl createControl actionBars
public void set Action Bars I Action Bars action Bars Asks this page to take focus within its pagebook view public void set Focus  setActionBars IActionBars actionBars setFocus

public interface I Page Book View Page extends I Page Returns the site for this page May be code null code if no site has been set return the page site or code null code  IPageBookViewPage IPage
public I Page Site get Site Initializes this page with the given page site p This method is automatically called by the workbench shortly after page construction It marks the start of the pages s lifecycle Clients must not call this method p param site the page site exception Part Init Exception if this page was not initialized successfully  IPageSite getSite PartInitException

public interface I Page Site extends I Workbench Site Registers a pop up menu with a particular id for extension p Within the workbench one plug in may extend the pop up menus for a view or editor within another plug in In order to be eligible for extension the menu must be registered by calling code register Context Menu code Once this has been done the workbench will automatically insert any action extensions which exist p p A unique menu id must be provided for each registered menu This id should be published in the Javadoc for the page p p Any pop up menu which is registered with the workbench should also define a code Group Marker code in the registered menu with id code I Workbench Action Constants MB ADDITIONS code Other plug ins will use this group as a reference point for insertion The marker should be defined at an appropriate location within the menu for insertion p param menu Id the menu id param menu Manager the menu manager param selection Provider the selection provider public void register Context Menu String menu Id Menu Manager menu Manager  IPageSite IWorkbenchSite registerContextMenu GroupMarker IWorkbenchActionConstants MB_ADDITIONS menuId menuManager selectionProvider registerContextMenu menuId MenuManager menuManager
I Selection Provider selection Provider Returns the action bars for this page site Pages have exclusive use of their site s action bars return the action bars  ISelectionProvider selectionProvider

public interface I Set Selection Target Reveals and selects the given element within this target view param selection the new element to select  ISetSelectionTarget

Returns the context to show or code null code if there is currently no valid context to show return the context to show or code null code 

Shows the given context in this target The target should check the context s selection for elements to show If there are no relevant elements in the selection then it should check the context s input param context the context to show return code true code if the context could be shown code false code otherwise 

Returns the identifiers for the target parts to show The target parts must be Show In targets return the identifiers for the target parts to show see I Show In Target  IShowInTarget

Creates a new transfer object private Marker Transfer  MarkerTransfer
Locates and returns the marker associated with the given attributes param path String the resource path param id the id of the marker to get as per link I Resource get Marker I Resource get Marker return the specified marker private I Marker find Marker String path String long id I Path path new Path path String I Resource resource workspace get Root find Member path if resource null return resource get Marker id return null  pathString IResource getMarker IResource getMarker IMarker findMarker pathString IPath pathString IResource getRoot findMember getMarker
Returns the singleton instance return the singleton instance public static Marker Transfer get Instance return instance  MarkerTransfer getInstance
Method declared on Transfer protected int get Type Ids return new int TYPEID  getTypeIds
return the list of type names protected String get Type Names return new String TYPE NAME  getTypeNames TYPE_NAME
protected void java To Native Object object Transfer Data transfer Data Transfer data is an array of markers Serialized version is int number of markers Marker marker 1 Marker marker 2 repeat last four for each subsequent marker see write Marker for the Marker format Object markers Object object lazy Init markers Byte Array Output Stream byte Out new Byte Array Output Stream Data Output Stream out new Data Output Stream byte Out byte bytes null try write number of markers out write Int markers length write markers for int i 0 i markers length i write Marker I Marker markers i out out close bytes byte Out to Byte Array catch IO Exception e when in doubt send nothing if bytes null super java To Native bytes transfer Data  javaToNative TransferData transferData writeMarker lazyInit ByteArrayOutputStream byteOut ByteArrayOutputStream DataOutputStream DataOutputStream byteOut writeInt writeMarker IMarker byteOut toByteArray IOException javaToNative transferData
Initializes the transfer mechanism if necessary private void lazy Init Object markers if workspace null if markers null markers length 0 this workspace I Marker markers 0 get Resource get Workspace  lazyInit IMarker getResource getWorkspace
protected Object native To Java Transfer Data transfer Data byte bytes byte super native To Java transfer Data Data Input Stream in new Data Input Stream new Byte Array Input Stream bytes try read number of markers int n in read Int read markers I Marker markers new I Marker n for int i 0 i n i I Marker marker read Marker in if marker null return null markers i marker return markers catch IO Exception e return null  nativeToJava TransferData transferData nativeToJava transferData DataInputStream DataInputStream ByteArrayInputStream readInt IMarker IMarker IMarker readMarker IOException
Reads and returns a single marker from the given stream param data In the input stream return the marker exception IO Exception if there is a problem reading from the stream private I Marker read Marker Data Input Stream data In throws IO Exception Marker serialization format is as follows String path of resource for marker int marker ID String path data In readUTF long id data In read Long return find Marker path id  dataIn IOException IMarker readMarker DataInputStream dataIn IOException dataIn dataIn readLong findMarker
Writes the given marker to the given stream param marker the marker param data Out the output stream exception IO Exception if there is a problem writing to the stream private void write Marker I Marker marker Data Output Stream data Out throws IO Exception Marker serialization format is as follows String path of resource for marker int marker ID data Out writeUTF marker get Resource get Full Path to String data Out write Long marker get Id  dataOut IOException writeMarker IMarker DataOutputStream dataOut IOException dataOut getResource getFullPath toString dataOut writeLong getId

private String message NON NLS 1 Creates a new page The message is the empty string public Message Page do nothing  MessagePage
public void create Control Composite parent Message in default page of Outline should have margins pg Comp new Composite parent SWT NULL pg Comp set Layout new Fill Layout msg Label new Label pg Comp SWT LEFT SWT TOP SWT WRAP msg Label set Text message  createControl pgComp pgComp setLayout FillLayout msgLabel pgComp msgLabel setText
Method declared on I Page public Control get Control return pg Comp  IPage getControl pgComp
Sets focus to a part in the page public void set Focus important to give focus to the composite rather than the label as the composite will actually take focus though hidden but set Focus on a Label is a no op pg Comp set Focus  setFocus setFocus pgComp setFocus
Sets the message to the given string param message the message text public void set Message String message this message message if msg Label null msg Label set Text message  setMessage msgLabel msgLabel setText

Constructor for Tile Editor public Multi Editor super  TileEditor MultiEditor
public void do Save I Progress Monitor monitor for int i 0 i inner Editors length i I Editor Part e inner Editors i e do Save monitor  doSave IProgressMonitor innerEditors IEditorPart innerEditors doSave
e create Part Control content parent add Listener SWT Activate new Listener public void handle Event Event event if event type SWT Activate activate Editor e  createPartControl addListener handleEvent activateEditor
Create the control of the inner editor Must be called by subclass public Composite create Inner Part Control Composite parent final I Editor Part e Composite content new Composite parent SWT NONE content set Layout new Fill Layout e create Part Control content parent add Listener SWT Activate new Listener public void handle Event Event event if event type SWT Activate activate Editor e return content  createInnerPartControl IEditorPart setLayout FillLayout createPartControl addListener handleEvent activateEditor
The code Multi Editor code implementation of this method extends the code Editor Part code implementation and disposes any inner editors Subclasses may extend since 3 0 public void dispose super dispose I Editor Part editors get Inner Editors for int i 0 i editors length i editors i dispose  MultiEditor EditorPart IEditorPart getInnerEditors
see I Editor Part do Save As public void do Save As no op  IEditorPart doSaveAs doSaveAs
see I Editor Part init I Editor Site I Editor Input public void init I Editor Site site I Editor Input input throws Part Init Exception init site Multi Editor Input input  IEditorPart IEditorSite IEditorInput IEditorSite IEditorInput PartInitException MultiEditorInput
public void init I Editor Site site Multi Editor Input input throws Part Init Exception set Input input set Site site set Part Name input get Name set Title Tool Tip input get Tool Tip Text  IEditorSite MultiEditorInput PartInitException setInput setSite setPartName getName setTitleToolTip getToolTipText
public boolean is Dirty for int i 0 i inner Editors length i I Editor Part e inner Editors i if e is Dirty return true return false  isDirty innerEditors IEditorPart innerEditors isDirty
see I Editor Part is Save As Allowed public boolean is Save As Allowed return false  IEditorPart isSaveAsAllowed isSaveAsAllowed
see I Workbench Part set Focus public void set Focus inner Editors active Editor Index set Focus update Gradient inner Editors active Editor Index  IWorkbenchPart setFocus setFocus innerEditors activeEditorIndex setFocus updateGradient innerEditors activeEditorIndex
Returns the active inner editor public final I Editor Part get Active Editor return inner Editors active Editor Index  IEditorPart getActiveEditor innerEditors activeEditorIndex
Returns an array with all inner editors public final I Editor Part get Inner Editors return inner Editors  IEditorPart getInnerEditors innerEditors
Set the inner editors Should not be called by clients public final void set Children I Editor Part children inner Editors children active Editor Index 0  setChildren IEditorPart innerEditors activeEditorIndex
Activates the given nested editor param part the nested editor since 3 0 protected void activate Editor I Editor Part part I Editor Part old Editor get Active Editor active Editor Index get Index part I Editor Part e get Active Editor Editor Site inner Site Editor Site e get Editor Site Workbench Page inner Site get Page request Activation e update Gradient old Editor  activateEditor IEditorPart IEditorPart oldEditor getActiveEditor activeEditorIndex getIndex IEditorPart getActiveEditor EditorSite innerSite EditorSite getEditorSite WorkbenchPage innerSite getPage requestActivation updateGradient oldEditor
Returns the index of the given nested editor return the index of the nested editor since 3 0 protected int get Index I Editor Part editor for int i 0 i inner Editors length i if inner Editors i editor return i return 1  getIndex IEditorPart innerEditors innerEditors
Updates the gradient in the title bar public void update Gradient I Editor Part editor boolean active Editor editor get Site get Page get Active Editor boolean active Part editor get Site get Page get Active Part I Theme theme editor get Editor Site get Workbench Window get Workbench get Theme Manager get Current Theme Gradient g new Gradient Color Registry color Registry theme get Color Registry if active Part g fg Color color Registry get I Workbench Theme Constants ACTIVE TAB TEXT COLOR g bg Colors new Color 2 g bg Colors 0 color Registry get I Workbench Theme Constants ACTIVE TAB BG START g bg Colors 1 color Registry get I Workbench Theme Constants ACTIVE TAB BG END else if active Editor g fg Color color Registry get I Workbench Theme Constants ACTIVE TAB TEXT COLOR g bg Colors new Color 2 g bg Colors 0 color Registry get I Workbench Theme Constants ACTIVE TAB BG START g bg Colors 1 color Registry get I Workbench Theme Constants ACTIVE TAB BG END else g fg Color color Registry get I Workbench Theme Constants INACTIVE TAB TEXT COLOR g bg Colors new Color 2 g bg Colors 0 color Registry get I Workbench Theme Constants INACTIVE TAB BG START g bg Colors 1 color Registry get I Workbench Theme Constants INACTIVE TAB BG END g bg Percents new int theme get Int I Workbench Theme Constants ACTIVE TAB PERCENT draw Gradient editor g  updateGradient IEditorPart activeEditor getSite getPage getActiveEditor activePart getSite getPage getActivePart ITheme getEditorSite getWorkbenchWindow getWorkbench getThemeManager getCurrentTheme ColorRegistry colorRegistry getColorRegistry activePart fgColor colorRegistry IWorkbenchThemeConstants ACTIVE_TAB_TEXT_COLOR bgColors bgColors colorRegistry IWorkbenchThemeConstants ACTIVE_TAB_BG_START bgColors colorRegistry IWorkbenchThemeConstants ACTIVE_TAB_BG_END activeEditor fgColor colorRegistry IWorkbenchThemeConstants ACTIVE_TAB_TEXT_COLOR bgColors bgColors colorRegistry IWorkbenchThemeConstants ACTIVE_TAB_BG_START bgColors colorRegistry IWorkbenchThemeConstants ACTIVE_TAB_BG_END fgColor colorRegistry IWorkbenchThemeConstants INACTIVE_TAB_TEXT_COLOR bgColors bgColors colorRegistry IWorkbenchThemeConstants INACTIVE_TAB_BG_START bgColors colorRegistry IWorkbenchThemeConstants INACTIVE_TAB_BG_END bgPercents getInt IWorkbenchThemeConstants ACTIVE_TAB_PERCENT drawGradient
draw Gradient editor g Draw the gradient in the title bar protected abstract void draw Gradient I Editor Part inner Editor Gradient g  drawGradient drawGradient IEditorPart innerEditor
Return true if the shell is activated protected boolean get Shell Activated Workbench Window window Workbench Window get Site get Page get Workbench Window return window get Shell Activated  getShellActivated WorkbenchWindow WorkbenchWindow getSite getPage getWorkbenchWindow getShellActivated

Constructor for Multi Editor Input public Multi Editor Input String editorI Ds I Editor Input inner Editors super editors editorI Ds input inner Editors  MultiEditorInput MultiEditorInput editorIDs IEditorInput innerEditors editorIDs innerEditors
Returns an array with the input of all inner editors public I Editor Input get Input return input  IEditorInput getInput
Retunrs an array with the id of all inner editors public String get Editors return editors  getEditors
see I Editor Input exists public boolean exists return true  IEditorInput
see I Editor Input get Image Descriptor public Image Descriptor get Image Descriptor return null  IEditorInput getImageDescriptor ImageDescriptor getImageDescriptor
public String get Name String name NON NLS 1 for int i 0 i input length 1 i name name input i get Name NON NLS 1 name name input input length 1 get Name return name  getName getName getName
see I Editor Input get Persistable public I Persistable Element get Persistable return null  IEditorInput getPersistable IPersistableElement getPersistable
see I Editor Input get Tool Tip Text public String get Tool Tip Text return get Name  IEditorInput getToolTipText getToolTipText getName
see I Adaptable get Adapter Class public Object get Adapter Class adapter return null  IAdaptable getAdapter getAdapter

private Tab Folder tab Folder Creates a new multi page editor deprecated Use the class code Multi Page Editor Part code instead public Multi Page Editor super  TabFolder tabFolder MultiPageEditorPart MultiPageEditor
Adds a synchronized pagebook to this editor Once added the visible page of the pagebook and the visible page of the editor will be synchronized param page Book the pagebook to add protected void add Syncro Page Book Page Book page Book Add the page if sync Vector null sync Vector new Array List 1 sync Vector add page Book Set the visible page sync Page Book page Book  pageBook addSyncroPageBook PageBook pageBook syncVector syncVector ArrayList syncVector pageBook syncPageBook pageBook
tab Folder new Tab Folder parent SWT NONE tab Folder add Selection Listener new Selection Adapter public void widget Selected Selection Event e sync  tabFolder TabFolder tabFolder addSelectionListener SelectionAdapter widgetSelected SelectionEvent
The code Multi Page Editor code implementation of this code I Workbench Part code method creates a code Tab Folder code control public void create Part Control Composite parent tab Folder new Tab Folder parent SWT NONE tab Folder add Selection Listener new Selection Adapter public void widget Selected Selection Event e sync  MultiPageEditor IWorkbenchPart TabFolder createPartControl tabFolder TabFolder tabFolder addSelectionListener SelectionAdapter widgetSelected SelectionEvent
Returns this editor s workbook return the editor workbook protected Tab Folder get Folder return tab Folder  TabFolder getFolder tabFolder
Indicates that a page change has occurred Updates the sync vector protected void on Page Change if sync Vector null Iterator enum sync Vector iterator while enum has Next Page Book page Book Page Book enum next sync Page Book page Book  onPageChange syncVector syncVector hasNext PageBook pageBook PageBook syncPageBook pageBook
Removes a synchronized pagebook from this editor param page Book the pagebook to remove see add Syncro Page Book Page Book protected void remove Syncro Page Book Page Book page Book if sync Vector null sync Vector remove page Book page Book dispose  pageBook addSyncroPageBook PageBook removeSyncroPageBook PageBook pageBook syncVector syncVector pageBook pageBook
Synchronizes each registered pagebook with the editor page protected void sync if sync Vector null Iterator enum sync Vector iterator while enum has Next Page Book page Book Page Book enum next sync Page Book page Book  syncVector syncVector hasNext PageBook pageBook PageBook syncPageBook pageBook
Sets the visible page of the given pagebook to be the same as the visible page of this editor param page Book a pagebook to synchronize protected void sync Page Book Page Book page Book int pos tab Folder get Selection Index Control children page Book get Children int size children length if pos size page Book show Page children pos  pageBook syncPageBook PageBook pageBook tabFolder getSelectionIndex pageBook getChildren pageBook showPage

public abstract class Multi Page Editor Action Bar Contributor extends Editor Action Bar Contributor Creates a multi page editor action contributor protected Multi Page Editor Action Bar Contributor super  MultiPageEditorActionBarContributor EditorActionBarContributor MultiPageEditorActionBarContributor
public void set Active Editor I Editor Part part I Editor Part active Nested Editor null if part instanceof Multi Page Editor Part active Nested Editor Multi Page Editor Part part get Active Editor set Active Page active Nested Editor  setActiveEditor IEditorPart IEditorPart activeNestedEditor MultiPageEditorPart activeNestedEditor MultiPageEditorPart getActiveEditor setActivePage activeNestedEditor
Sets the active page of the the multi page editor to be the given editor Redirect actions to the given editor if actions are not already being sent to it p This method is called whenever the page changes Subclasses must implement this method to redirect actions to the given editor if not already directed to it p param active Editor the new active editor or code null code if there is no active page or if the active page does not have a corresponding editor  activeEditor

private Array List nested Editors new Array List 3 Creates an empty multi page editor with no pages protected Multi Page Editor Part super  ArrayList nestedEditors ArrayList MultiPageEditorPart
Creates and adds a new page containing the given control to this multi page editor The control may be code null code allowing it to be created and set later using code set Control code param control the control or code null code return the index of the new page see Multi Page Editor Part set Control int Control public int add Page Control control create Item control return get Page Count 1  setControl MultiPageEditorPart setControl addPage createItem getPageCount
editor add Property Listener new I Property Listener public void property Changed Object source int property Id Multi Page Editor Part this handle Property Change property Id  addPropertyListener IPropertyListener propertyChanged propertyId MultiPageEditorPart handlePropertyChange propertyId
Creates and adds a new page containing the given editor to this multi page editor This also hooks a property change listener on the nested editor param editor the nested editor param input the input for the nested editor return the index of the new page exception Part Init Exception if a new page could not be created see Multi Page Editor Part handle Property Change int the handler for property change events from the nested editor public int add Page I Editor Part editor I Editor Input input throws Part Init Exception I Editor Site site create Site editor call init first so that if an exception is thrown we have created no new widgets editor init site input Composite parent2 new Composite get Container SWT NONE parent2 set Layout new Fill Layout editor create Part Control parent2 editor add Property Listener new I Property Listener public void property Changed Object source int property Id Multi Page Editor Part this handle Property Change property Id create item for page only after create Part Control has succeeded Item item create Item parent2 remember the editor as both data on the item and in the list of editors see field comment item set Data editor nested Editors add editor return get Page Count 1  PartInitException MultiPageEditorPart handlePropertyChange addPage IEditorPart IEditorInput PartInitException IEditorSite createSite getContainer setLayout FillLayout createPartControl addPropertyListener IPropertyListener propertyChanged propertyId MultiPageEditorPart handlePropertyChange propertyId createPartControl createItem setData nestedEditors getPageCount
final C Tab Folder new Container new C Tab Folder parent SWT BOTTOM SWT FLAT new Container add Selection Listener new Selection Adapter public void widget Selected Selection Event e int new Page Index new Container index Of C Tab Item e item page Change new Page Index  CTabFolder newContainer CTabFolder newContainer addSelectionListener SelectionAdapter widgetSelected SelectionEvent newPageIndex newContainer indexOf CTabItem pageChange newPageIndex
Creates an empty container Creates a C Tab Folder with no style bits set and hooks a selection listener which calls code page Change code whenever the selected tab changes param parent The composite in which the container tab folder should be created must not be code null code return a new container private C Tab Folder create Container Composite parent use SWT FLAT style so that an extra 1 pixel border is not reserved inside the folder final C Tab Folder new Container new C Tab Folder parent SWT BOTTOM SWT FLAT new Container add Selection Listener new Selection Adapter public void widget Selected Selection Event e int new Page Index new Container index Of C Tab Item e item page Change new Page Index return new Container  CTabFolder pageChange CTabFolder createContainer CTabFolder newContainer CTabFolder newContainer addSelectionListener SelectionAdapter widgetSelected SelectionEvent newPageIndex newContainer indexOf CTabItem pageChange newPageIndex newContainer
Creates a tab item and places control in the new item The item is a C Tab Item with no style bits set param control is the control to be placed in an item return a new item private C Tab Item create Item Control control C Tab Item item new C Tab Item get Tab Folder SWT NONE item set Control control return item  CTabItem CTabItem createItem CTabItem CTabItem getTabFolder setControl
Creates the pages of this multi page editor p Subclasses must implement this method p 
protected abstract void create Pages The code Multi Page Editor code implementation of this code I Workbench Part code method creates the control for the multi page editor by calling code create Container code then code create Pages code Subclasses should implement code create Pages code rather than overriding this method param parent The parent in which the editor should be created must not be code null code public final void create Part Control Composite parent this container create Container parent create Pages set the active page page 0 by default unless it has already been done if get Active Page 1 set Active Page 0  createPages MultiPageEditor IWorkbenchPart createContainer createPages createPages createPartControl createContainer createPages getActivePage setActivePage
Creates the site for the given nested editor The code Multi Page Editor Part code implementation of this method creates an instance of code Multi Page Editor Site code Subclasses may reimplement to create more specialized sites param editor the nested editor return the editor site protected I Editor Site create Site I Editor Part editor return new Multi Page Editor Site this editor  MultiPageEditorPart MultiPageEditorSite IEditorSite createSite IEditorPart MultiPageEditorSite
The code Multi Page Editor Part code implementation of this code I Workbench Part code method disposes all nested editors Subclasses may extend public void dispose for int i 0 i nested Editors size i I Editor Part editor I Editor Part nested Editors get i dispose Part editor nested Editors clear  MultiPageEditorPart IWorkbenchPart nestedEditors IEditorPart IEditorPart nestedEditors disposePart nestedEditors
Returns the active nested editor if there is one p Subclasses should not override this method p return the active nested editor or code null code if none protected I Editor Part get Active Editor int index get Active Page if index 1 return get Editor index return null  IEditorPart getActiveEditor getActivePage getEditor
Returns the index of the currently active page or 1 if there is no active page p Subclasses should not override this method p return the index of the active page or 1 if there is no active page protected int get Active Page C Tab Folder tab Folder get Tab Folder if tab Folder null tab Folder is Disposed return tab Folder get Selection Index return 1  getActivePage CTabFolder tabFolder getTabFolder tabFolder tabFolder isDisposed tabFolder getSelectionIndex
Returns the composite control containing this multi page editor s pages This should be used as the parent when creating controls for the individual pages That is when calling code add Page Control code the passed control should be a child of this container p Warning Clients should not assume that the container is any particular subclass of Composite The actual class used may change in order to improve the look and feel of multi page editors Any code making assumptions on the particular subclass would thus be broken p p Subclasses should not override this method p return the composite or code null code if code create Part Control code has not been called yet protected Composite get Container return container  addPage createPartControl getContainer
Returns the control for the given page index or code null code if no control has been set for the page The page index must be valid p Subclasses should not override this method p param page Index the index of the page return the control for the specified page or code null code if none has been set protected Control get Control int page Index return get Item page Index get Control  pageIndex getControl pageIndex getItem pageIndex getControl
Returns the editor for the given page index The page index must be valid param page Index the index of the page return the editor for the specified page or code null code if the specified page was not created with code add Page I Editor Part I Editor Input code protected I Editor Part get Editor int page Index Item item get Item page Index if item null Object data item get Data if data instanceof I Editor Part return I Editor Part data return null  pageIndex addPage IEditorPart IEditorInput IEditorPart getEditor pageIndex getItem pageIndex getData IEditorPart IEditorPart
Returns the tab item for the given page index page index is 0 based The page index must be valid param page Index the index of the page return the tab item for the given page index private C Tab Item get Item int page Index return get Tab Folder get Item page Index  pageIndex CTabItem getItem pageIndex getTabFolder getItem pageIndex
Returns the number of pages in this multi page editor return the number of pages protected int get Page Count C Tab Folder folder get Tab Folder May not have been created yet or may have been disposed if folder null folder is Disposed return folder get Item Count return 0  getPageCount CTabFolder getTabFolder isDisposed getItemCount
Returns the image for the page with the given index or code null code if no image has been set for the page The page index must be valid param page Index the index of the page return the image or code null code if none protected Image get Page Image int page Index return get Item page Index get Image  pageIndex getPageImage pageIndex getItem pageIndex getImage
Returns the text label for the page with the given index Returns the empty string if no text label has been set for the page The page index must be valid param page Index the index of the page return the text label for the page protected String get Page Text int page Index return get Item page Index get Text  pageIndex getPageText pageIndex getItem pageIndex getText
Returns the tab folder containing this multi page editor s pages return the tab folder or code null code if code create Part Control code has not been called yet private C Tab Folder get Tab Folder return container  createPartControl CTabFolder getTabFolder
Handles a property change notification from a nested editor The default implementation simply forwards the change to listeners on this multi page editor by calling code fire Property Change code with the same property id For example if the dirty state of a nested editor changes property id code I Editor Part PROP DIRTY code this method handles it by firing a property change event for code I Editor Part PROP DIRTY code to property listeners on this multi page editor p Subclasses may extend or reimplement this method p param property Id the id of the property that changed protected void handle Property Change int property Id fire Property Change property Id  firePropertyChange IEditorPart PROP_DIRTY IEditorPart PROP_DIRTY propertyId handlePropertyChange propertyId firePropertyChange propertyId
The code Multi Page Editor Part code implementation of this code I Editor Part code method sets its site to the given site its input to the given input and the site s selection provider to a code Multi Page Selection Provider code Subclasses may extend this method param site The site for which this part is being created must not be code null code param input The input on which this editor should be created must not be code null code throws Part Init Exception If the initialization of the part fails currently never public void init I Editor Site site I Editor Input input throws Part Init Exception set Site site set Input input site set Selection Provider new Multi Page Selection Provider this  MultiPageEditorPart IEditorPart MultiPageSelectionProvider PartInitException IEditorSite IEditorInput PartInitException setSite setInput setSelectionProvider MultiPageSelectionProvider
The code Multi Page Editor Part code implementation of this code I Editor Part code method returns whether the contents of any of this multi page editor s nested editors have changed since the last save Pages created with code add Page Control code are ignored p Subclasses may extend or reimplement this method p return code true code if any of the nested editors are dirty code false code otherwise public boolean is Dirty use nested Editors to avoid SWT requests see bug 12996 for Iterator i nested Editors iterator i has Next I Editor Part editor I Editor Part i next if editor is Dirty return true return false  MultiPageEditorPart IEditorPart addPage isDirty nestedEditors nestedEditors hasNext IEditorPart IEditorPart isDirty
Notifies this multi page editor that the page with the given id has been activated This method is called when the user selects a different tab p The code Multi Page Editor Part code implementation of this method sets focus to the new page and notifies the action bar contributor if there is one This checks whether the action bar contributor is an instance of code Multi Page Editor Action Bar Contributor code and if so calls code set Active Page code with the active nested editor This also fires a selection change event if required p p Subclasses may extend this method p param new Page Index the index of the activated page protected void page Change int new Page Index XXX Workaround for 1GCN531 SWT WIN2000 C Tab Folder child s visibility is false on notification Control control get Control new Page Index if control null control set Visible true XXX End workaround set Focus I Editor Part active Editor get Editor new Page Index I Editor Action Bar Contributor contributor get Editor Site get Action Bar Contributor if contributor null contributor instanceof Multi Page Editor Action Bar Contributor Multi Page Editor Action Bar Contributor contributor set Active Page active Editor if active Editor null Workaround for 1GAUS7C ITPUI ALL Editor not activated when restored from previous session do not need second if once fixed I Selection Provider selection Provider active Editor get Site get Selection Provider if selection Provider null Selection Changed Event event new Selection Changed Event selection Provider selection Provider get Selection Multi Page Selection Provider get Site get Selection Provider fire Selection Changed event  MultiPageEditorPart MultiPageEditorActionBarContributor setActivePage newPageIndex pageChange newPageIndex CTabFolder getControl newPageIndex setVisible setFocus IEditorPart activeEditor getEditor newPageIndex IEditorActionBarContributor getEditorSite getActionBarContributor MultiPageEditorActionBarContributor MultiPageEditorActionBarContributor setActivePage activeEditor activeEditor ISelectionProvider selectionProvider activeEditor getSite getSelectionProvider selectionProvider SelectionChangedEvent SelectionChangedEvent selectionProvider selectionProvider getSelection MultiPageSelectionProvider getSite getSelectionProvider fireSelectionChanged
Platform run new Safe Runnable public void run if part get Site instanceof Multi Page Editor Site Multi Page Editor Site part Site Multi Page Editor Site part get Site part Site dispose part dispose  SafeRunnable getSite MultiPageEditorSite MultiPageEditorSite partSite MultiPageEditorSite getSite partSite
part dispose public void handle Exception Throwable e Exception has already being logged by Core Do nothing  handleException
Disposes the given part and its site param part The part to dispose must not be code null code private void dispose Part final I Workbench Part part Platform run new Safe Runnable public void run if part get Site instanceof Multi Page Editor Site Multi Page Editor Site part Site Multi Page Editor Site part get Site part Site dispose part dispose public void handle Exception Throwable e Exception has already being logged by Core Do nothing  disposePart IWorkbenchPart SafeRunnable getSite MultiPageEditorSite MultiPageEditorSite partSite MultiPageEditorSite getSite partSite handleException
Removes the page with the given index from this multi page editor The controls for the page are disposed of if the page has an editor it is disposed of too The page index must be valid param page Index the index of the page see Multi Page Editor Part add Page Control see Multi Page Editor Part add Page I Editor Part I Editor Input public void remove Page int page Index Assert is True page Index 0 page Index get Page Count get editor if any before disposing item I Editor Part editor get Editor page Index dispose item before disposing editor in case there s an exception in editor s dispose get Item page Index dispose dispose editor if any if editor null nested Editors remove editor dispose Part editor  pageIndex MultiPageEditorPart addPage MultiPageEditorPart addPage IEditorPart IEditorInput removePage pageIndex isTrue pageIndex pageIndex getPageCount IEditorPart getEditor pageIndex getItem pageIndex nestedEditors disposePart
Sets the currently active page param page Index the index of the page to be activated the index must be valid protected void set Active Page int page Index Assert is True page Index 0 page Index get Page Count get Tab Folder set Selection page Index  pageIndex setActivePage pageIndex isTrue pageIndex pageIndex getPageCount getTabFolder setSelection pageIndex
Sets the control for the given page index The page index must be valid param page Index the index of the page param control the control for the specified page or code null code to clear the control protected void set Control int page Index Control control get Item page Index set Control control  pageIndex setControl pageIndex getItem pageIndex setControl
The code Multi Page Editor code implementation of this code I Workbench Part code method sets focus on the active nested editor if there is one p Subclasses may extend or reimplement p public void set Focus set Focus get Active Page  MultiPageEditor IWorkbenchPart setFocus setFocus getActivePage
Sets focus to the control for the given page If the page has an editor this calls its code set Focus code method Otherwise this calls code set Focus code on the control for the page param page Index the index of the page private void set Focus int page Index final I Key Binding Service service get Site get Key Binding Service if page Index 0 page Index get Page Count There is no selected page so deactivate the active service if service instanceof I Nestable Key Binding Service final I Nestable Key Binding Service nestable Service I Nestable Key Binding Service service nestable Service activate Key Binding Service null else Workbench Plugin log Multi Page Editor Part set Focus Parent key binding service was not an instance of I Nestable Key Binding Service It was an instance of service get Class get Name instead NON NLS 1 NON NLS 2 return final I Editor Part editor get Editor page Index if editor null editor set Focus There is no selected page so deactivate the active service if service instanceof I Nestable Key Binding Service final I Nestable Key Binding Service nestable Service I Nestable Key Binding Service service if editor null nestable Service activate Key Binding Service editor get Editor Site else nestable Service activate Key Binding Service null else Workbench Plugin log Multi Page Editor Part set Focus Parent key binding service was not an instance of I Nestable Key Binding Service It was an instance of service get Class get Name instead NON NLS 1 NON NLS 2 else There is no selected editor so deactivate the active service if service instanceof I Nestable Key Binding Service final I Nestable Key Binding Service nestable Service I Nestable Key Binding Service service nestable Service activate Key Binding Service null else Workbench Plugin log Multi Page Editor Part set Focus Parent key binding service was not an instance of I Nestable Key Binding Service It was an instance of service get Class get Name instead NON NLS 1 NON NLS 2 Give the page s control focus final Control control get Control page Index if control null control set Focus  setFocus setFocus pageIndex setFocus pageIndex IKeyBindingService getSite getKeyBindingService pageIndex pageIndex getPageCount INestableKeyBindingService INestableKeyBindingService nestableService INestableKeyBindingService nestableService activateKeyBindingService WorkbenchPlugin MultiPageEditorPart setFocus INestableKeyBindingService getClass getName IEditorPart getEditor pageIndex setFocus INestableKeyBindingService INestableKeyBindingService nestableService INestableKeyBindingService nestableService activateKeyBindingService getEditorSite nestableService activateKeyBindingService WorkbenchPlugin MultiPageEditorPart setFocus INestableKeyBindingService getClass getName INestableKeyBindingService INestableKeyBindingService nestableService INestableKeyBindingService nestableService activateKeyBindingService WorkbenchPlugin MultiPageEditorPart setFocus INestableKeyBindingService getClass getName getControl pageIndex setFocus
Sets the image for the page with the given index or code null code to clear the image for the page The page index must be valid param page Index the index of the page param image the image or code null code protected void set Page Image int page Index Image image get Item page Index set Image image  pageIndex setPageImage pageIndex getItem pageIndex setImage
Sets the text label for the page with the given index The page index must be valid The text label must not be null param page Index the index of the page param text the text label protected void set Page Text int page Index String text get Item page Index set Text text  pageIndex setPageText pageIndex getItem pageIndex setText

Creates a site for the given editor nested within the given multi page editor param multi Page Editor the multi page editor param editor the nested editor public Multi Page Editor Site Multi Page Editor Part multi Page Editor I Editor Part editor Assert is Not Null multi Page Editor Assert is Not Null editor this multi Page Editor multi Page Editor this editor editor  multiPageEditor MultiPageEditorSite MultiPageEditorPart multiPageEditor IEditorPart isNotNull multiPageEditor isNotNull multiPageEditor multiPageEditor
Dispose the contributions public void dispose if menu Extenders null for int i 0 i menu Extenders size i Popup Menu Extender menu Extenders get i dispose menu Extenders null Remove myself from the list of nested key binding services if service null I Key Binding Service parent Service get Editor get Site get Key Binding Service if parent Service instanceof I Nestable Key Binding Service I Nestable Key Binding Service nestable Parent I Nestable Key Binding Service parent Service nestable Parent remove Key Binding Service this service null  menuExtenders menuExtenders PopupMenuExtender menuExtenders menuExtenders IKeyBindingService parentService getEditor getSite getKeyBindingService parentService INestableKeyBindingService INestableKeyBindingService nestableParent INestableKeyBindingService parentService nestableParent removeKeyBindingService
The code Multi Page Editor Site code implementation of this code I Editor Site code method returns code null code since nested editors do not have their own action bar contributor return code null code public I Editor Action Bar Contributor get Action Bar Contributor return null  MultiPageEditorSite IEditorSite IEditorActionBarContributor getActionBarContributor
The code Multi Page Editor Site code implementation of this code I Editor Site code method forwards to the multi page editor to return the action bars return The action bars from the parent multi page editor public I Action Bars get Action Bars return multi Page Editor get Editor Site get Action Bars  MultiPageEditorSite IEditorSite IActionBars getActionBars multiPageEditor getEditorSite getActionBars
The code Multi Page Editor Site code implementation of this code I Workbench Part Site code method forwards to the multi page editor to return the decorator manager return The decorator from the workbench window deprecated use I Workbench get Decorator Manager public I Label Decorator get Decorator Manager return get Workbench Window get Workbench get Decorator Manager get Label Decorator  MultiPageEditorSite IWorkbenchPartSite IWorkbench getDecoratorManager ILabelDecorator getDecoratorManager getWorkbenchWindow getWorkbench getDecoratorManager getLabelDecorator
Returns the nested editor return the nested editor public I Editor Part get Editor return editor  IEditorPart getEditor
The code Multi Page Editor Site code implementation of this code I Workbench Part Site code method returns an empty string since the nested editor is not created from the registry return An empty string public String get Id return NON NLS 1  MultiPageEditorSite IWorkbenchPartSite getId
public I Key Binding Service get Key Binding Service if service null service get Multi Page Editor get Editor Site get Key Binding Service if service instanceof I Nestable Key Binding Service I Nestable Key Binding Service nestable Service I Nestable Key Binding Service service service nestable Service get Key Binding Service this else This is an internal reference and should not be copied by client code If you are thinking of copying this DON T DO IT Workbench Plugin log Multi Page Editor Site get Key Binding Service Parent key binding service was not an instance of I Nestable Key Binding Service It was an instance of service get Class get Name instead NON NLS 1 NON NLS 2 return service  IKeyBindingService getKeyBindingService getMultiPageEditor getEditorSite getKeyBindingService INestableKeyBindingService INestableKeyBindingService nestableService INestableKeyBindingService nestableService getKeyBindingService WorkbenchPlugin MultiPageEditorSite getKeyBindingService INestableKeyBindingService getClass getName
Returns the multi page editor return the multi page editor public Multi Page Editor Part get Multi Page Editor return multi Page Editor  MultiPageEditorPart getMultiPageEditor multiPageEditor
The code Multi Page Editor Site code implementation of this code I Workbench Part Site code method forwards to the multi page editor to return the workbench page return The workbench page in which this editor site resides public I Workbench Page get Page return get Multi Page Editor get Site get Page  MultiPageEditorSite IWorkbenchPartSite IWorkbenchPage getPage getMultiPageEditor getSite getPage
The code Multi Page Editor Site code implementation of this code I Workbench Part Site code method returns an empty string since the nested editor is not created from the registry return An empty string public String get Plugin Id return NON NLS 1  MultiPageEditorSite IWorkbenchPartSite getPluginId
The code Multi Page Editor Site code implementation of this code I Workbench Part Site code method returns an empty string since the nested editor is not created from the registry return An empty string public String get Registered Name return NON NLS 1  MultiPageEditorSite IWorkbenchPartSite getRegisteredName
if selection Changed Listener null selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Multi Page Editor Site this handle Selection Changed event  selectionChangedListener selectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent MultiPageEditorSite handleSelectionChanged
Returns the selection changed listener which listens to the nested editor s selection changes and calls code handle Selection Changed code return the selection changed listener private I Selection Changed Listener get Selection Changed Listener if selection Changed Listener null selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Multi Page Editor Site this handle Selection Changed event return selection Changed Listener  handleSelectionChanged ISelectionChangedListener getSelectionChangedListener selectionChangedListener selectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent MultiPageEditorSite handleSelectionChanged selectionChangedListener
The code Multi Page Editor Site code implementation of this code I Workbench Part Site code method returns the selection provider set by code set Selection Provider code return The current selection provider public I Selection Provider get Selection Provider return selection Provider  MultiPageEditorSite IWorkbenchPartSite setSelectionProvider ISelectionProvider getSelectionProvider selectionProvider
The code Multi Page Editor Site code implementation of this code I Workbench Part Site code method forwards to the multi page editor to return the shell return The shell in which this editor site resides public Shell get Shell return get Multi Page Editor get Site get Shell  MultiPageEditorSite IWorkbenchPartSite getShell getMultiPageEditor getSite getShell
The code Multi Page Editor Site code implementation of this code I Workbench Part Site code method forwards to the multi page editor to return the workbench window return The workbench window in which this editor site resides public I Workbench Window get Workbench Window return get Multi Page Editor get Site get Workbench Window  MultiPageEditorSite IWorkbenchPartSite IWorkbenchWindow getWorkbenchWindow getMultiPageEditor getSite getWorkbenchWindow
Handles a selection changed event from the nested editor The default implementation gets the selection provider from the multi page editor s site and calls code fire Selection Changed code on it only if it is an instance of code Multi Page Selection Provider code passing a new event object p Subclasses may extend or reimplement this method p param event the event protected void handle Selection Changed Selection Changed Event event I Selection Provider parent Provider get Multi Page Editor get Site get Selection Provider if parent Provider instanceof Multi Page Selection Provider Selection Changed Event new Event new Selection Changed Event parent Provider event get Selection Multi Page Selection Provider parent Provider fire Selection Changed new Event  fireSelectionChanged MultiPageSelectionProvider handleSelectionChanged SelectionChangedEvent ISelectionProvider parentProvider getMultiPageEditor getSite getSelectionProvider parentProvider MultiPageSelectionProvider SelectionChangedEvent newEvent SelectionChangedEvent parentProvider getSelection MultiPageSelectionProvider parentProvider fireSelectionChanged newEvent
The code Multi Page Editor Site code implementation of this code I Workbench Part Site code method forwards to the multi page editor for registration param menuID The identifier for the menu param menu Mgr The menu manager param sel Provider The selection provider public void register Context Menu String menuID Menu Manager menu Mgr I Selection Provider sel Provider if menu Extenders null menu Extenders new Array List 1 menu Extenders add new Popup Menu Extender menuID menu Mgr sel Provider editor  MultiPageEditorSite IWorkbenchPartSite menuMgr selProvider registerContextMenu MenuManager menuMgr ISelectionProvider selProvider menuExtenders menuExtenders ArrayList menuExtenders PopupMenuExtender menuMgr selProvider
The code Multi Page Editor Site code implementation of this code I Workbench Part Site code method forwards to the multi page editor for registration param menu Manager The menu manager param sel Provider The selection provider public void register Context Menu Menu Manager menu Manager I Selection Provider sel Provider get Multi Page Editor get Site register Context Menu menu Manager sel Provider  MultiPageEditorSite IWorkbenchPartSite menuManager selProvider registerContextMenu MenuManager menuManager ISelectionProvider selProvider getMultiPageEditor getSite registerContextMenu menuManager selProvider
The code Multi Page Editor Site code implementation of this code I Workbench Part Site code method remembers the selection provider and also hooks a listener on it which calls code handle Selection Changed code when a selection changed event occurs param provider The selection provider see Multi Page Editor Site handle Selection Changed Selection Changed Event public void set Selection Provider I Selection Provider provider I Selection Provider old Selection Provider selection Provider selection Provider provider if old Selection Provider null old Selection Provider remove Selection Changed Listener get Selection Changed Listener if selection Provider null selection Provider add Selection Changed Listener get Selection Changed Listener  MultiPageEditorSite IWorkbenchPartSite handleSelectionChanged MultiPageEditorSite handleSelectionChanged SelectionChangedEvent setSelectionProvider ISelectionProvider ISelectionProvider oldSelectionProvider selectionProvider selectionProvider oldSelectionProvider oldSelectionProvider removeSelectionChangedListener getSelectionChangedListener selectionProvider selectionProvider addSelectionChangedListener getSelectionChangedListener
see org eclipse ui I Workbench Part Site progress End public void progress End Job job Do nothing  IWorkbenchPartSite progressEnd progressEnd
see org eclipse ui I Workbench Part Site progress Start public void progress Start Job job Do nothing  IWorkbenchPartSite progressStart progressStart
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return null  IAdaptable getAdapter getAdapter

private Multi Page Editor Part multi Page Editor Creates a selection provider for the given multi page editor param multi Page Editor the multi page editor public Multi Page Selection Provider Multi Page Editor Part multi Page Editor Assert is Not Null multi Page Editor this multi Page Editor multi Page Editor  MultiPageEditorPart multiPageEditor multiPageEditor MultiPageSelectionProvider MultiPageEditorPart multiPageEditor isNotNull multiPageEditor multiPageEditor multiPageEditor
Method declared on code I Selection Provider code public void add Selection Changed Listener I Selection Changed Listener listener listeners add listener  ISelectionProvider addSelectionChangedListener ISelectionChangedListener
final I Selection Changed Listener l I Selection Changed Listener listeners i Platform run new Safe Runnable public void run l selection Changed event  ISelectionChangedListener ISelectionChangedListener SafeRunnable selectionChanged
Notifies all registered selection changed listeners that the editor s selection has changed Only listeners registered at the time this method is called are notified param event the selection changed event public void fire Selection Changed final Selection Changed Event event Object listeners this listeners get Listeners for int i 0 i listeners length i final I Selection Changed Listener l I Selection Changed Listener listeners i Platform run new Safe Runnable public void run l selection Changed event  fireSelectionChanged SelectionChangedEvent getListeners ISelectionChangedListener ISelectionChangedListener SafeRunnable selectionChanged
Returns the multi page editor public Multi Page Editor Part get Multi Page Editor return multi Page Editor  MultiPageEditorPart getMultiPageEditor multiPageEditor
public I Selection get Selection I Editor Part active Editor multi Page Editor get Active Editor if active Editor null I Selection Provider selection Provider active Editor get Site get Selection Provider if selection Provider null return selection Provider get Selection return null  ISelection getSelection IEditorPart activeEditor multiPageEditor getActiveEditor activeEditor ISelectionProvider selectionProvider activeEditor getSite getSelectionProvider selectionProvider selectionProvider getSelection
Method declaed on code I Selection Provider code public void remove Selection Changed Listener I Selection Changed Listener listener listeners remove listener  ISelectionProvider removeSelectionChangedListener ISelectionChangedListener
public void set Selection I Selection selection I Editor Part active Editor multi Page Editor get Active Editor if active Editor null I Selection Provider selection Provider active Editor get Site get Selection Provider if selection Provider null selection Provider set Selection selection  setSelection ISelection IEditorPart activeEditor multiPageEditor getActiveEditor activeEditor ISelectionProvider selectionProvider activeEditor getSite getSelectionProvider selectionProvider selectionProvider setSelection

Creates a new page for a pagebook view protected Page 
Method declared on I Page public abstract void create Control Composite parent  IPage createControl
public abstract void create Control Composite parent The code Page code implementation of this code I Page code method disposes of this page s control if it has one and it has not already been disposed Subclasses may extend public void dispose Control ctrl get Control if ctrl null ctrl is Disposed ctrl dispose  createControl IPage getControl isDisposed
The code Page code implementation of this code I Page code method returns code null code Subclasses must reimplement  IPage
public void make Contributions I Menu Manager menu Manager I Tool Bar Manager tool Bar Manager I Status Line Manager status Line Manager  makeContributions IMenuManager menuManager IToolBarManager toolBarManager IStatusLineManager statusLineManager
public void set Action Bars I Action Bars action Bars make Contributions action Bars get Menu Manager action Bars get Tool Bar Manager action Bars get Status Line Manager  setActionBars IActionBars actionBars makeContributions actionBars getMenuManager actionBars getToolBarManager actionBars getStatusLineManager
The code Page code implementation of this code I Page Book View Page code method stores a reference to the supplied site the site which contains this page p Subclasses may extend p since 2 0 public void init I Page Site page Site site page Site  IPageBookViewPage IPageSite pageSite pageSite
Returns the site which contains this page return the site which contains this page public I Page Site get Site return site  IPageSite getSite
The code Page code implementation of this code I Page code method does nothing Subclasses must implement  IPage

protected Point compute Size Composite composite int w Hint int h Hint boolean flush Cache if w Hint SWT DEFAULT h Hint SWT DEFAULT return new Point w Hint h Hint Point result null if current Page null result current Page compute Size w Hint h Hint flush Cache else Rectangle rect composite get Client Area result new Point rect width rect height result new Point 0 0 if w Hint SWT DEFAULT result x w Hint if h Hint SWT DEFAULT result y h Hint return result  computeSize wHint hHint flushCache wHint hHint wHint hHint currentPage currentPage computeSize wHint hHint flushCache getClientArea wHint wHint hHint hHint
protected void layout Composite composite boolean flush Cache if current Page null current Page set Bounds composite get Client Area  flushCache currentPage currentPage setBounds getClientArea
private Control current Page null Creates a new empty pagebook param parent the parent composite param style the SWT style bits public Page Book Composite parent int style super parent style set Layout new Page Book Layout  currentPage PageBook setLayout PageBookLayout
Shows the given page This method has no effect if the given page is not contained in this pagebook param page the page to show public void show Page Control page if page current Page return if page get Parent this return Control old Page current Page current Page page show new page if page null if page is Disposed page set Visible true layout true if f Request Focus On Show Page page set Focus hide old after new page has been made visible in order to avoid flashing if old Page null old Page is Disposed old Page set Visible false  showPage currentPage getParent oldPage currentPage currentPage isDisposed setVisible fRequestFocusOnShowPage setFocus oldPage oldPage isDisposed oldPage setVisible

new I Property Change Listener public void property Change Property Change Event event if event get Property equals Sub Action Bars P ACTION HANDLERS active Rec null event get Source active Rec sub Action Bars refresh Global Action Handlers  IPropertyChangeListener propertyChange PropertyChangeEvent getProperty SubActionBars P_ACTION_HANDLERS activeRec getSource activeRec subActionBars refreshGlobalActionHandlers
private I Selection Changed Listener selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event page Selection Changed event  ISelectionChangedListener selectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent pageSelectionChanged
Creates a new page record initialized to the given part and page param part param page public Page Rec I Workbench Part part I Page page this part part this page page  PageRec IWorkbenchPart IPage
Disposes of this page record by code null code ing its fields public void dispose part null page null 
Method declared on I Selection Provider public void add Selection Changed Listener I Selection Changed Listener listener selection Changed Listeners add listener  ISelectionProvider addSelectionChangedListener ISelectionChangedListener selectionChangedListeners
public I Selection get Selection get the selection provider from the current page I Page current Page get Current Page during workbench startup we may be in a state when there is no current page if current Page null return Structured Selection EMPTY I Page Site site get Page Site current Page if site null return Structured Selection EMPTY I Selection Provider sel Provider site get Selection Provider if sel Provider null return sel Provider get Selection return Structured Selection EMPTY  ISelection getSelection IPage currentPage getCurrentPage currentPage StructuredSelection IPageSite getPageSite currentPage returnStructuredSelection ISelectionProvider selProvider getSelectionProvider selProvider selProvider getSelection StructuredSelection
Method declared on I Selection Provider public void remove Selection Changed Listener I Selection Changed Listener listener selection Changed Listeners remove listener  ISelectionProvider removeSelectionChangedListener ISelectionChangedListener selectionChangedListeners
final I Selection Changed Listener l I Selection Changed Listener listeners i Platform run new Safe Runnable public void run l selection Changed event  ISelectionChangedListener ISelectionChangedListener SafeRunnable selectionChanged
The selection has changed Process the event param event public void selection Changed final Selection Changed Event event pass on the notification to listeners Object listeners selection Changed Listeners get Listeners for int i 0 i listeners length i final I Selection Changed Listener l I Selection Changed Listener listeners i Platform run new Safe Runnable public void run l selection Changed event  selectionChanged SelectionChangedEvent selectionChangedListeners getListeners ISelectionChangedListener ISelectionChangedListener SafeRunnable selectionChanged
public void set Selection I Selection selection get the selection provider from the current page I Page current Page get Current Page during workbench startup we may be in a state when there is no current page if current Page null return I Page Site site get Page Site current Page if site null return I Selection Provider sel Provider site get Selection Provider and set its selection if sel Provider null sel Provider set Selection selection  setSelection ISelection IPage currentPage getCurrentPage currentPage IPageSite getPageSite currentPage ISelectionProvider selProvider getSelectionProvider selProvider selProvider setSelection
Creates a new pagebook view protected Page Book View super  PageBookView
Creates and returns the default page for this view p Subclasses must implement this method p p Subclasses must call init Page with the new page if it is an code I Page Book View Page code before calling create Control on the page p param book the pagebook control return the default page  initPage IPageBookViewPage createControl
protected abstract I Page create Default Page Page Book book Creates a page for a given part Adds it to the pagebook but does not show it param part The part we are making a page for return I Workbench Part private Page Rec create Page I Workbench Part part Page Rec rec do Create Page part if rec null map Part To Rec put part rec prepare Page rec return rec  IPage createDefaultPage PageBook IWorkbenchPart PageRec createPage IWorkbenchPart PageRec doCreatePage mapPartToRec preparePage
Prepares the page in the given page rec for use in this view param rec private void prepare Page Page Rec rec I Page Site site null Integer count if does Page Exist rec page if rec page instanceof I Page Book View Page site I Page Book View Page rec page get Site if site null We will create a site for our use site new Page Site get View Site map Page To Site put rec page site rec sub Action Bars Sub Action Bars site get Action Bars rec sub Action Bars add Property Change Listener action Bar Prop Listener for backward compability with I Page rec page set Action Bars rec sub Action Bars count new Integer 0 else site I Page Site map Page To Site get rec page rec sub Action Bars Sub Action Bars site get Action Bars count Integer map Page To Num Recs get rec page map Page To Num Recs put rec page new Integer count int Value 1  preparePage PageRec IPageSite doesPageExist IPageBookViewPage IPageBookViewPage getSite PageSite getViewSite mapPageToSite subActionBars SubActionBars getActionBars subActionBars addPropertyChangeListener actionBarPropListener IPage setActionBars subActionBars IPageSite mapPageToSite subActionBars SubActionBars getActionBars mapPageToNumRecs mapPageToNumRecs intValue
Initializes the given page with a page site p Subclasses should call this method after the page is created but before creating its controls p p Subclasses may override p param page The page to initialize protected void init Page I Page Book View Page page try page init new Page Site get View Site catch Part Init Exception e Workbench Plugin log e get Message  initPage IPageBookViewPage PageSite getViewSite PartInitException WorkbenchPlugin getMessage
The code Page Book View code implementation of this code I Workbench Part code method creates a code Page Book code control with its default page showing Subclasses may extend public void create Part Control Composite parent Create the page book book new Page Book parent SWT NONE Create the default page rec I Page default Page create Default Page book default Page Rec new Page Rec null default Page prepare Page default Page Rec Show the default page show Page Rec default Page Rec Listen to part activation events get Site get Page add Part Listener this show Bootstrap Part  PageBookView IWorkbenchPart PageBook createPartControl PageBook IPage defaultPage createDefaultPage defaultPageRec PageRec defaultPage preparePage defaultPageRec showPageRec defaultPageRec getSite getPage addPartListener showBootstrapPart
The code Page Book View code implementation of this code I Workbench Part code method cleans up all the pages Subclasses may extend public void dispose stop listening to part activation get Site get Page remove Part Listener this Deref all of the pages active Rec null if default Page Rec null check for null since the default page may not have been created ex perspective never visible default Page Rec page dispose default Page Rec null Map clone Map Hash Map map Part To Rec clone Iterator enum clone values iterator while enum has Next Page Rec rec Page Rec enum next remove Page rec Run super super dispose  PageBookView IWorkbenchPart getSite getPage removePartListener activeRec defaultPageRec defaultPageRec defaultPageRec HashMap mapPartToRec hasNext PageRec PageRec removePage
Creates a new page in the pagebook for a particular part This page will be made visible whenever the part is active and will be destroyed with a call to code do Destroy Page code p Subclasses must implement this method p p Subclasses must call init Page with the new page if it is an code I Page Book View Page code before calling create Control on the page p param part the input part return the record describing a new page for this view see do Destroy Page  doDestroyPage initPage IPageBookViewPage createControl doDestroyPage
protected abstract Page Rec do Create Page I Workbench Part part Destroys a page in the pagebook for a particular part This page was returned as a result from code do Create Page code p Subclasses must implement this method p param part the input part param page Record a page record for the part see do Create Page  PageRec doCreatePage IWorkbenchPart doCreatePage pageRecord doCreatePage
Returns true if the page has already been created param page the page to test return true if this page has already been created protected boolean does Page Exist I Page page return map Page To Num Recs contains Key page  doesPageExist IPage mapPageToNumRecs containsKey
The code Page Book View code implementation of this code I Adaptable code method delegates to the current page if it implements code I Adaptable code public Object get Adapter Class key delegate to the current page if supported I Page page get Current Page if page instanceof I Adaptable Object adaptable I Adaptable page get Adapter key if adaptable null return adaptable return super get Adapter key  PageBookView IAdaptable IAdaptable getAdapter IPage getCurrentPage IAdaptable IAdaptable getAdapter getAdapter
Returns the active important workbench part for this view p When the page book view is created it has no idea which part within the workbook should be used to generate the first page Therefore it delegates the choice to subclasses of code Page Book View code p p Implementors of this method should return an active important part in the workbench or code null code if none found p p Subclasses must implement this method p return the active important part or code null code if none  PageBookView
protected abstract I Workbench Part get Bootstrap Part Returns the part which contributed the current page to this view return the part which contributed the current page or code null code if no part contributed the current page protected I Workbench Part get Current Contributing Part if active Rec null return null return active Rec part  IWorkbenchPart getBootstrapPart IWorkbenchPart getCurrentContributingPart activeRec activeRec
Returns the currently visible page for this view or code null code if no page is currently visible return the currently visible page public I Page get Current Page if active Rec null return null return active Rec page  IPage getCurrentPage activeRec activeRec
Returns the view site for the given page of this view param page the page return the corresponding site or code null code if not found protected Page Site get Page Site I Page page return Page Site map Page To Site get page  PageSite getPageSite IPage PageSite mapPageToSite
Returns the default page for this view return the default page public I Page get Default Page return default Page Rec page  IPage getDefaultPage defaultPageRec
Returns the pagebook control for this view return the pagebook control or code null code if not initialized protected Page Book get Page Book return book  PageBook getPageBook
Returns the page record for the given part param part the part return the corresponding page record or code null code if not found protected Page Rec get Page Rec I Workbench Part part return Page Rec map Part To Rec get part  PageRec getPageRec IWorkbenchPart PageRec mapPartToRec
Returns the page record for the given page of this view param page the page return the corresponding page record or code null code if not found protected Page Rec get Page Rec I Page page Iterator enum map Part To Rec values iterator while enum has Next Page Rec rec Page Rec enum next if rec page page return rec return null  PageRec getPageRec IPage mapPartToRec hasNext PageRec PageRec
Returns whether the given part should be added to this view p Subclasses must implement this method p param part the input part return code true code if the part is relevant and code false code otherwise 
Method declared on I View Part public void init I View Site site throws Part Init Exception site set Selection Provider selection Provider super init site  IViewPart IViewSite PartInitException setSelectionProvider selectionProvider
The code Page Book View code implementation of this code I Part Listener code method shows the page when the given part is activated Subclasses may extend public void part Activated I Workbench Part part Is this an important part If not just return if is Important part return Create a page for the part Page Rec rec get Page Rec part if rec null rec create Page part Show the page if rec null show Page Rec rec else show Page Rec default Page Rec  PageBookView IPartListener partActivated IWorkbenchPart isImportant PageRec getPageRec createPage showPageRec showPageRec defaultPageRec
The code Page Book View code implementation of this code I Part Listener code method does nothing Subclasses may extend public void part Brought To Top I Workbench Part part Do nothing by default  PageBookView IPartListener partBroughtToTop IWorkbenchPart
The code Page Book View code implementation of this code I Part Listener code method deal with the closing of the active part Subclasses may extend public void part Closed I Workbench Part part Update the active part if active Rec null active Rec part part show Page Rec default Page Rec Find and remove the part page Page Rec rec get Page Rec part if rec null remove Page rec  PageBookView IPartListener partClosed IWorkbenchPart activeRec activeRec showPageRec defaultPageRec PageRec getPageRec removePage
The code Page Book View code implementation of this code I Part Listener code method does nothing Subclasses may extend public void part Deactivated I Workbench Part part Do nothing  PageBookView IPartListener partDeactivated IWorkbenchPart
see org eclipse ui I Part Listener part Opened org eclipse ui I Workbench Part public void part Opened I Workbench Part part Do nothing by default  IPartListener partOpened IWorkbenchPart partOpened IWorkbenchPart
Refreshes the global actions for the active page private void refresh Global Action Handlers Clear old actions I Action Bars bars get View Site get Action Bars bars clear Global Action Handlers Set new actions Map new Action Handlers active Rec sub Action Bars get Global Action Handlers if new Action Handlers null Set keys new Action Handlers entry Set Iterator iter keys iterator while iter has Next Map Entry entry Map Entry iter next bars set Global Action Handler String entry get Key I Action entry get Value  refreshGlobalActionHandlers IActionBars getViewSite getActionBars clearGlobalActionHandlers newActionHandlers activeRec subActionBars getGlobalActionHandlers newActionHandlers newActionHandlers entrySet hasNext setGlobalActionHandler getKey IAction getValue
Removes a page record If it is the last reference to the page dispose of it otherwise just decrement the reference count param rec private void remove Page Page Rec rec map Part To Rec remove rec part int new Count Integer map Page To Num Recs get rec page int Value 1 if new Count 0 Object site map Page To Site remove rec page map Page To Num Recs remove rec page if rec sub Action Bars null rec sub Action Bars dispose Control control rec page get Control if control null control is Disposed Dispose the page s control so pages don t have to do this in their dispose method The page s control is a child of this view s control so if this view is closed the page s control will already be disposed control dispose if site instanceof Page Site Page Site site dispose free the page do Destroy Page rec part rec else map Page To Num Recs put rec page new Integer new Count  removePage PageRec mapPartToRec newCount mapPageToNumRecs intValue newCount mapPageToSite mapPageToNumRecs subActionBars subActionBars getControl isDisposed PageSite PageSite doDestroyPage mapPageToNumRecs newCount
public void set Focus first set focus on the page book in case the page doesn t properly handle set Focus if book null book set Focus then set focus on the page if any if active Rec null active Rec page set Focus  setFocus setFocus setFocus activeRec activeRec setFocus
Handle page selection changes param event private void page Selection Changed Selection Changed Event event forward this change from a page to our site s selection provider Selection Provider provider Selection Provider get Site get Selection Provider if provider null provider selection Changed event  pageSelectionChanged SelectionChangedEvent SelectionProvider SelectionProvider getSite getSelectionProvider selectionChanged
Shows a page for the active workbench part private void show Bootstrap Part I Workbench Part part get Bootstrap Part if part null part Activated part  showBootstrapPart IWorkbenchPart getBootstrapPart partActivated
Shows page contained in the given page record in this view The page record must be one from this pagebook view p The code Page Book View code implementation of this method asks the pagebook control to show the given page s control and records that the given page is now current Subclasses may extend p param page Rec the page record containing the page to show protected void show Page Rec Page Rec page Rec If already showing do nothing if active Rec page Rec return If the page is the same just set active Rec to page Rec if active Rec null page Rec null active Rec page page Rec page active Rec page Rec return Hide old page if active Rec null active Rec sub Action Bars deactivate remove our selection listener I Selection Provider provider Page Site map Page To Site get active Rec page get Selection Provider if provider null provider remove Selection Changed Listener selection Changed Listener Show new page active Rec page Rec Control page Control active Rec page get Control if page Control null page Control is Disposed Verify that the page control is not disposed If we are closing it may have already been disposed book show Page page Control active Rec sub Action Bars activate refresh Global Action Handlers add our selection listener I Selection Provider provider Page Site map Page To Site get active Rec page get Selection Provider if provider null provider add Selection Changed Listener selection Changed Listener Update action bars get View Site get Action Bars update Action Bars  PageBookView pageRec showPageRec PageRec pageRec activeRec pageRec activeRec pageRec activeRec pageRec activeRec pageRec activeRec pageRec activeRec activeRec subActionBars ISelectionProvider PageSite mapPageToSite activeRec getSelectionProvider removeSelectionChangedListener selectionChangedListener activeRec pageRec pageControl activeRec getControl pageControl pageControl isDisposed showPage pageControl activeRec subActionBars refreshGlobalActionHandlers ISelectionProvider PageSite mapPageToSite activeRec getSelectionProvider addSelectionChangedListener selectionChangedListener getViewSite getActionBars updateActionBars
Returns the selection Provider for this page book view return a Selection Provider protected Selection Provider get Selection Provider return selection Provider  selectionProvider SelectionProvider SelectionProvider getSelectionProvider selectionProvider

Creates a new sub view site of the given parent view site param parent View Site the parent view site public Page Site I View Site parent View Site Assert is Not Null parent View Site parent Site parent View Site sub Action Bars new Sub Action Bars parent View Site get Action Bars  parentViewSite PageSite IViewSite parentViewSite isNotNull parentViewSite parentSite parentViewSite subActionBars SubActionBars parentViewSite getActionBars
Disposes of the menu extender contributions protected void dispose if menu Extenders null for int i 0 i menu Extenders size i Popup Menu Extender menu Extenders get i dispose menu Extenders null sub Action Bars dispose  menuExtenders menuExtenders PopupMenuExtender menuExtenders menuExtenders subActionBars
The Page Site implementation of this code I Page Site code method returns the code Sub Action Bars code for this site return the subactionbars for this site public I Action Bars get Action Bars return sub Action Bars  PageSite IPageSite SubActionBars IActionBars getActionBars subActionBars
Method declared on I Page Site public I Workbench Page get Page return parent Site get Page  IPageSite IWorkbenchPage getPage parentSite getPage
Method declared on I Page Site public I Selection Provider get Selection Provider return selection Provider  IPageSite ISelectionProvider getSelectionProvider selectionProvider
Method declared on I Page Site public Shell get Shell return parent Site get Shell  IPageSite getShell parentSite getShell
Method declared on I Page Site public I Workbench Window get Workbench Window return parent Site get Workbench Window  IPageSite IWorkbenchWindow getWorkbenchWindow parentSite getWorkbenchWindow
public void register Context Menu String menuID Menu Manager menu Mgr I Selection Provider sel Provider if menu Extenders null menu Extenders new Array List 1 Each page holds onto its own menu extenders so they can be properly disposed of menu Extenders add new Popup Menu Extender menuID menu Mgr sel Provider View Site parent Site get Part  registerContextMenu MenuManager menuMgr ISelectionProvider selProvider menuExtenders menuExtenders ArrayList menuExtenders PopupMenuExtender menuMgr selProvider ViewSite parentSite getPart
Method declared on I Page Site public void set Selection Provider I Selection Provider provider selection Provider provider  IPageSite setSelectionProvider ISelectionProvider selectionProvider
see org eclipse core runtime I Adaptable get Adapter java lang Class public Object get Adapter Class adapter return Platform get Adapter Manager get Adapter this adapter  IAdaptable getAdapter getAdapter getAdapterManager getAdapter

private Transfer Data current Transfer Creates a plug in drop adapter for the given viewer param viewer the viewer public Plugin Drop Adapter Structured Viewer viewer super viewer  TransferData currentTransfer PluginDropAdapter StructuredViewer
public void drop Drop Target Event event try if Plugin Transfer get Instance is Supported Type event current Data Type Plugin Transfer Data plugin Data Plugin Transfer Data event data I Drop Action Delegate delegate get Plugin Adapter plugin Data if delegate run plugin Data get Data get Current Target event detail DND DROP NONE else super drop event catch Core Exception e Workbench Plugin log Drop Failed e get Status NON NLS 1  DropTargetEvent PluginTransfer getInstance isSupportedType currentDataType PluginTransferData pluginData PluginTransferData IDropActionDelegate getPluginAdapter pluginData pluginData getData getCurrentTarget DROP_NONE CoreException WorkbenchPlugin getStatus
Returns the current transfer protected Transfer Data get Current Transfer return current Transfer  TransferData getCurrentTransfer currentTransfer
Loads the class that will perform the action associated with the given drop data param data the drop data return the viewer drop adapter protected static I Drop Action Delegate get Plugin Adapter Plugin Transfer Data data throws Core Exception I Extension Registry registry Platform get Extension Registry String adapter Name data get Extension Id I Extension Point xpt registry get Extension Point PlatformUI PLUGIN ID I Workbench Constants PL DROP ACTIONS I Extension extensions xpt get Extensions for int i 0 i extensions length i I Configuration Element configs extensions i get Configuration Elements if configs null configs length 0 String id configs 0 get Attribute id NON NLS 1 if id null id equals adapter Name return I Drop Action Delegate Workbench Plugin create Extension configs 0 ATT CLASS return null  IDropActionDelegate getPluginAdapter PluginTransferData CoreException IExtensionRegistry getExtensionRegistry adapterName getExtensionId IExtensionPoint getExtensionPoint PLUGIN_ID IWorkbenchConstants PL_DROP_ACTIONS IExtension getExtensions IConfigurationElement getConfigurationElements getAttribute adapterName IDropActionDelegate WorkbenchPlugin createExtension ATT_CLASS
see Viewer Drop Adapter perform Drop public boolean perform Drop Object data should never be called since we override the drop method return false  ViewerDropAdapter performDrop performDrop
The code Plugin Drop Adapter code implementation of this code Viewer Drop Adapter code method is used to notify the action that some aspect of the drop operation has changed Subclasses may override public boolean validate Drop Object target int operation Transfer Data transfer Type current Transfer transfer Type if current Transfer null Plugin Transfer get Instance is Supported Type current Transfer plugin cannot be loaded without the plugin data return true return false  PluginDropAdapter ViewerDropAdapter validateDrop TransferData transferType currentTransfer transferType currentTransfer PluginTransfer getInstance isSupportedType currentTransfer

private static Plugin Transfer instance new Plugin Transfer Creates a new transfer object private Plugin Transfer super  PluginTransfer PluginTransfer PluginTransfer
Returns the singleton instance return the singleton instance public static Plugin Transfer get Instance return instance  PluginTransfer getInstance
Method declared on Transfer protected int get Type Ids return new int TYPEID  getTypeIds
return the list of type names protected String get Type Names return new String TYPE NAME  getTypeNames TYPE_NAME
protected void java To Native Object data Transfer Data transfer Data Plugin Transfer Data real Data Plugin Transfer Data data if data null return try Byte Array Output Stream out new Byte Array Output Stream Data Output Stream data Out new Data Output Stream out data Out writeUTF real Data get Extension Id data Out write Int real Data get Data length data Out write real Data get Data data Out close super java To Native out to Byte Array transfer Data catch IO Exception e e print Stack Trace  javaToNative TransferData transferData PluginTransferData realData PluginTransferData ByteArrayOutputStream ByteArrayOutputStream DataOutputStream dataOut DataOutputStream dataOut realData getExtensionId dataOut writeInt realData getData dataOut realData getData dataOut javaToNative toByteArray transferData IOException printStackTrace
protected Object native To Java Transfer Data transfer Data try byte bytes byte super native To Java transfer Data Byte Array Input Stream in new Byte Array Input Stream bytes Data Input Stream data In new Data Input Stream in String extension Name data In readUTF int len data In read Int byte plugin Data new byte len data In read Fully plugin Data return new Plugin Transfer Data extension Name plugin Data catch IO Exception e e print Stack Trace can t get here return null  nativeToJava TransferData transferData nativeToJava transferData ByteArrayInputStream ByteArrayInputStream DataInputStream dataIn DataInputStream extensionName dataIn dataIn readInt pluginData dataIn readFully pluginData PluginTransferData extensionName pluginData IOException printStackTrace

byte transfer Data Creates a new record for the given extension id and data param extension Id the extension id param data the data to transfer public Plugin Transfer Data String extension Id byte data this extension Name extension Id this transfer Data data  transferData extensionId PluginTransferData extensionId extensionName extensionId transferData
Returns the data being transferred return the data public byte get Data return transfer Data  getData transferData
Returns the id of the extension that will provide the drop action return the extension id public String get Extension Id return extension Name  getExtensionId extensionName

private I Workspace workspace Resources Plugin get Workspace Creates a new transfer object private Resource Transfer  IWorkspace ResourcesPlugin getWorkspace ResourceTransfer
Returns the singleton instance return the singleton instance public static Resource Transfer get Instance return instance  ResourceTransfer getInstance
Method declared on Transfer protected int get Type Ids return new int TYPEID  getTypeIds
return the list of type names protected String get Type Names return new String TYPE NAME  getTypeNames TYPE_NAME
protected void java To Native Object data Transfer Data transfer Data if data instanceof I Resource return I Resource resources I Resource data The resource serialization format is int number of resources Then the following for each resource int resource type String path of resource int resource Count resources length try Byte Array Output Stream out new Byte Array Output Stream Data Output Stream data Out new Data Output Stream out write the number of resources data Out write Int resource Count write each resource for int i 0 i resources length i write Resource data Out resources i cleanup data Out close out close byte bytes out to Byte Array super java To Native bytes transfer Data catch IO Exception e it s best to send nothing if there were problems  javaToNative TransferData transferData IResource IResource IResource resourceCount ByteArrayOutputStream ByteArrayOutputStream DataOutputStream dataOut DataOutputStream dataOut writeInt resourceCount writeResource dataOut dataOut toByteArray javaToNative transferData IOException
protected Object native To Java Transfer Data transfer Data The resource serialization format is int number of resources Then the following for each resource int resource type String path of resource byte bytes byte super native To Java transfer Data if bytes null return null Data Input Stream in new Data Input Stream new Byte Array Input Stream bytes try int count in read Int I Resource results new I Resource count for int i 0 i count i results i read Resource in return results catch IO Exception e return null  nativeToJava TransferData transferData nativeToJava transferData DataInputStream DataInputStream ByteArrayInputStream readInt IResource IResource readResource IOException
Reads a resource from the given stream param data In the input stream return the resource exception IO Exception if there is a problem reading from the stream private I Resource read Resource Data Input Stream data In throws IO Exception int type data In read Int String path data In readUTF switch type case I Resource FOLDER return workspace get Root get Folder new Path path case I Resource FILE return workspace get Root get File new Path path case I Resource PROJECT return workspace get Root get Project path throw new Illegal Argument Exception Unknown resource type in Resource Transfer read Resource NON NLS 1  dataIn IOException IResource readResource DataInputStream dataIn IOException dataIn readInt dataIn IResource getRoot getFolder IResource getRoot getFile IResource getRoot getProject IllegalArgumentException ResourceTransfer readResource
Writes the given resource to the given stream param data Out the output stream param resource the resource exception IO Exception if there is a problem writing to the stream private void write Resource Data Output Stream data Out I Resource resource throws IO Exception data Out write Int resource get Type data Out writeUTF resource get Full Path to String  dataOut IOException writeResource DataOutputStream dataOut IResource IOException dataOut writeInt getType dataOut getFullPath toString

Constructs a new code Show In Context code with the given input and selection param input the input or code null code param selection the selection or code null code public Show In Context Object input I Selection selection set Input input set Selection selection  ShowInContext ShowInContext ISelection setInput setSelection
Returns the input or code null code to indicate no input return the input or code null code public Object get Input return input  getInput
Returns the selection or code null code to indicate no selection return the selection or code null code public I Selection get Selection return selection  ISelection getSelection
Sets the input or code null code to indicate no input param input the input or code null code public void set Input Object input this input input  setInput
Sets the selection or code null code to indicate no selection param selection the selection or code null code public void set Selection I Selection selection this selection selection  setSelection ISelection

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

Creates a new workbench part protected Workbench Part super  WorkbenchPart
Method declared on I Workbench Part public void add Property Listener I Property Listener l prop Change Listeners add l  IWorkbenchPart addPropertyListener IPropertyListener propChangeListeners
see I Workbench Part public abstract void create Part Control Composite parent  IWorkbenchPart createPartControl
public abstract void create Part Control Composite parent The code Workbench Part code implementation of this code I Workbench Part code method disposes the title image loaded by code set Initialization Data code Subclasses may extend public void dispose Reference Counter image Cache Workbench Images get Image Cache Image image Image image Cache get image Descriptor if image null int count image Cache remove Ref image Descriptor if count 0 image dispose Clear out the property change listeners as we should not be notifying anyone after the part has been disposed if prop Change Listeners is Empty prop Change Listeners new Listener List 1  createPartControl WorkbenchPart IWorkbenchPart setInitializationData ReferenceCounter imageCache WorkbenchImages getImageCache imageCache imageDescriptor imageCache removeRef imageDescriptor propChangeListeners isEmpty propChangeListeners ListenerList
final I Property Listener l I Property Listener array nX Platform run new Safe Runnable public void run l property Changed Workbench Part this property Id  IPropertyListener IPropertyListener SafeRunnable propertyChanged WorkbenchPart propertyId
Fires a property changed event param property Id the id of the property that changed protected void fire Property Change final int property Id Object array prop Change Listeners get Listeners for int nX 0 nX array length nX final I Property Listener l I Property Listener array nX Platform run new Safe Runnable public void run l property Changed Workbench Part this property Id  propertyId firePropertyChange propertyId propChangeListeners getListeners IPropertyListener IPropertyListener SafeRunnable propertyChanged WorkbenchPart propertyId
inherit Doc Subclasses may override this method however if they do so they should invoke the method on their superclass to ensure that the Platform s adapter manager is consulted public Object get Adapter Class adapter This implementation of the method declared by code I Adaptable code passes the request along to the platform s adapter manager roughly code Platform get Adapter Manager get Adapter this adapter code return Platform get Adapter Manager get Adapter this adapter  inheritDoc getAdapter IAdaptable getAdapterManager getAdapter getAdapterManager getAdapter
Returns the configuration element for this part The configuration element comes from the plug in registry entry for the extension defining this part return the configuration element for this part protected I Configuration Element get Configuration Element return config Element  IConfigurationElement getConfigurationElement configElement
Returns the default title image return the default image protected Image get Default Image return PlatformUI get Workbench get Shared Images get Image I Shared Images IMG DEF VIEW  getDefaultImage getWorkbench getSharedImages getImage ISharedImages IMG_DEF_VIEW
Method declared on I Workbench Part public I Workbench Part Site get Site return part Site  IWorkbenchPart IWorkbenchPartSite getSite partSite
inherit Doc p It is considered bad practise to overload or extend this method Parts should set their title by calling set Part Name and or set Content Description p public String get Title return title  inheritDoc setPartName setContentDescription getTitle
public Image get Title Image if title Image null return title Image return get Default Image  getTitleImage titleImage titleImage getDefaultImage
return the tool tip text public String get Title Tool Tip return tool Tip  getTitleToolTip toolTip
Method declared on I Workbench Part public void remove Property Listener I Property Listener l prop Change Listeners remove l  IWorkbenchPart removePropertyListener IPropertyListener propChangeListeners
see I Workbench Part public abstract void set Focus  IWorkbenchPart setFocus
public abstract void set Focus inherit Doc The code Workbench Part code implementation of this code I Executable Extension code records the configuration element in and internal state variable accessible via code get Config Element code It also loads the title image if one is specified in the configuration element Subclasses may extend Should not be called by clients It is called by the core plugin when creating this executable extension public void set Initialization Data I Configuration Element cfig String property Name Object data Save config element config Element cfig Part name and title part Name Util safe String cfig get Attribute name NON NLS 1 title part Name Icon String str Icon cfig get Attribute icon NON NLS 1 if str Icon null return image Descriptor AbstractUI Plugin image Descriptor From Plugin config Element get Declaring Extension get Namespace str Icon if image Descriptor null return remember the image in a separatly from title Image since it must be disposed even if the title Image is changed to something else Reference Counter image Cache Workbench Images get Image Cache Image image Image image Cache get image Descriptor if image null image Cache add Ref image Descriptor else image image Descriptor create Image image Cache put image Descriptor image title Image image  setFocus inheritDoc WorkbenchPart IExecutableExtension getConfigElement setInitializationData IConfigurationElement propertyName configElement partName safeString getAttribute partName strIcon getAttribute strIcon imageDescriptor AbstractUIPlugin imageDescriptorFromPlugin configElement getDeclaringExtension getNamespace strIcon imageDescriptor titleImage titleImage ReferenceCounter imageCache WorkbenchImages getImageCache imageCache imageDescriptor imageCache addRef imageDescriptor imageDescriptor createImage imageCache imageDescriptor titleImage
Sets the part site p Subclasses must invoke this method from code I Editor Part init code and code I View Part init code param site the workbench part site protected void set Site I Workbench Part Site site this part Site site  IEditorPart IViewPart setSite IWorkbenchPartSite partSite
Sets or clears the title of this part Clients should call this method instead of overriding get Title p This may change a title that was previously set using set Part Name or set Content Description p deprecated new code should use set Part Name and set Content Description param title the title or code null code to clear protected void set Title String title title Util safe String title Do not send changes if they are the same if Util equals this title title return this title title fire Property Change I Workbench Part PROP TITLE  getTitle setPartName setContentDescription setPartName setContentDescription setTitle safeString firePropertyChange IWorkbenchPart PROP_TITLE
Sets or clears the title image of this part param title Image the title image or code null code to clear protected void set Title Image Image title Image Assert is True title Image null title Image is Disposed Do not send changes if they are the same if this title Image title Image return this title Image title Image fire Property Change I Workbench Part PROP TITLE  titleImage setTitleImage titleImage isTrue titleImage titleImage isDisposed titleImage titleImage titleImage titleImage firePropertyChange IWorkbenchPart PROP_TITLE
Sets or clears the title tool tip text of this part Clients should call this method instead of overriding code get Title Tool Tip code param tool Tip the new tool tip text or code null code to clear protected void set Title Tool Tip String tool Tip tool Tip Util safe String tool Tip Do not send changes if they are the same if Util equals this tool Tip tool Tip return this tool Tip tool Tip fire Property Change I Workbench Part PROP TITLE  getTitleToolTip toolTip setTitleToolTip toolTip toolTip safeString toolTip toolTip toolTip toolTip toolTip firePropertyChange IWorkbenchPart PROP_TITLE
Show that this part is busy due to a Job running that it is listening to param busy boolean to indicate that the busy state has started or ended see org eclipse ui progress I Workbench Site Progress Service show Busy For Family Object since 3 0 public void show Busy boolean busy By default do nothing  IWorkbenchSiteProgressService showBusyForFamily showBusy
inherit Doc p It is considered bad practise to overload or extend this method Parts should call set Part Name to change their part name p public String get Part Name return part Name  inheritDoc setPartName getPartName partName
Sets the name of this part The name will be shown in the tab area for the part Clients should call this method instead of overriding get Part Name Setting this to the empty string will cause a default part name to be used p set Part Name and set Content Description are intended to replace set Title This may change a value that was previously set using set Title p param part Name the part name as it should be displayed in tabs since 3 0 protected void set Part Name String part Name internal Set Part Name part Name set Default Title  getPartName setPartName setContentDescription setTitle setTitle partName setPartName partName internalSetPartName partName setDefaultTitle
void set Default Title String description get Content Description String name get Part Name String new Title name if Util equals description NON NLS 1 new Title Message Format format Workbench Messages get String Workbench Part Auto Title Format new String name description NON NLS 1 set Title new Title  setDefaultTitle getContentDescription getPartName newTitle newTitle MessageFormat WorkbenchMessages getString WorkbenchPart AutoTitleFormat setTitle newTitle
inherit Doc p It is considered bad practise to overload or extend this method Parts should call set Content Description to change their content description p public String get Content Description return content Description  inheritDoc setContentDescription getContentDescription contentDescription
Sets the content description for this part The content description is typically a short string describing the current contents of the part Setting this to the empty string will cause a default content description to be used Clients should call this method instead of overriding get Content Description For views the content description is shown by default in a line near the top of the view For editors the content description is shown beside the part name when showing a list of editors If the editor is open on a file this typically contains the path to the input file without the filename or trailing slash p This may overwrite a value that was previously set in set Title p param description the content description since 3 0 protected void set Content Description String description internal Set Content Description description set Default Title  getContentDescription setTitle setContentDescription internalSetContentDescription setDefaultTitle
void internal Set Content Description String description Assert is Not Null description Do not send changes if they are the same if Util equals content Description description return this content Description description fire Property Change I Workbench Part Constants PROP CONTENT DESCRIPTION  internalSetContentDescription isNotNull contentDescription contentDescription firePropertyChange IWorkbenchPartConstants PROP_CONTENT_DESCRIPTION
void internal Set Part Name String part Name part Name Util safe String part Name Assert is Not Null part Name Do not send changes if they are the same if Util equals this part Name part Name return this part Name part Name fire Property Change I Workbench Part Constants PROP PART NAME  internalSetPartName partName partName safeString partName isNotNull partName partName partName partName partName firePropertyChange IWorkbenchPartConstants PROP_PART_NAME

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 get String PlatformUI No Workbench NON NLS 1 return Workbench get Instance  IWorkbench getWorkbench getInstance createAndRunWorkbench IllegalStateException WorkbenchMessages getString 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 instance for the this plug in public Compatibility Preference Store Important do not call initialize here due to heinous reentrancy problems  CompatibilityPreferenceStore
I Property Change Listener public void property Change Preferences Property Change Event event if silent Running fire Property Change Event event get Property event get Old Value event get New Value  IPropertyChangeListener propertyChange PropertyChangeEvent silentRunning firePropertyChangeEvent getProperty getOldValue getNewValue
Initializes this preference store void initialize ensure initialization is only done once if this prefs null return here s where we first ask for the plug in s core runtime preferences note that this causes this method to be reentered this prefs get Plugin Preferences avoid adding the listener a second time when reentered if this listener Added register listener that funnels everything to fire Property Change Event this prefs add Property Change Listener new Preferences I Property Change Listener public void property Change Preferences Property Change Event event if silent Running fire Property Change Event event get Property event get Old Value event get New Value this listener Added true  getPluginPreferences listenerAdded firePropertyChangeEvent addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent silentRunning firePropertyChangeEvent getProperty getOldValue getNewValue listenerAdded
Returns the underlying preference store return the underlying preference store private Preferences get Prefs if prefs null although we try to ensure initialization is done eagerly this cannot be guaranteed so ensure it is done here initialize return prefs  getPrefs
Method declared on I Preference Store public void add Property Change Listener final I Property Change Listener listener listeners add listener  IPreferenceStore addPropertyChangeListener IPropertyChangeListener
Method declared on I Preference Store public void remove Property Change Listener I Property Change Listener listener listeners remove listener  IPreferenceStore removePropertyChangeListener IPropertyChangeListener
final I Property Change Listener listener I Property Change Listener list i Platform run new Safe Runnable J Face Resources get String Preference Store change Error NON NLS 1 public void run listener property Change event  IPropertyChangeListener IPropertyChangeListener SafeRunnable JFaceResources getString PreferenceStore changeError propertyChange
public void fire Property Change Event String name Object old Value Object new Value efficiently handle case of 0 listeners if listeners is Empty no one interested return important create intermediate array to protect against listeners being added removed during the notification final Object list listeners get Listeners final Property Change Event event new Property Change Event this name old Value new Value for int i 0 i list length i final I Property Change Listener listener I Property Change Listener list i Platform run new Safe Runnable J Face Resources get String Preference Store change Error NON NLS 1 public void run listener property Change event  firePropertyChangeEvent oldValue newValue isEmpty getListeners PropertyChangeEvent PropertyChangeEvent oldValue newValue IPropertyChangeListener IPropertyChangeListener SafeRunnable JFaceResources getString PreferenceStore changeError propertyChange
Method declared on I Preference Store public boolean contains String name return get Prefs contains name  IPreferenceStore getPrefs
Method declared on I Preference Store public boolean get Boolean String name return get Prefs get Boolean name  IPreferenceStore getBoolean getPrefs getBoolean
Method declared on I Preference Store public boolean get Default Boolean String name return get Prefs get Default Boolean name  IPreferenceStore getDefaultBoolean getPrefs getDefaultBoolean
Method declared on I Preference Store public double get Default Double String name return get Prefs get Default Double name  IPreferenceStore getDefaultDouble getPrefs getDefaultDouble
Method declared on I Preference Store public float get Default Float String name return get Prefs get Default Float name  IPreferenceStore getDefaultFloat getPrefs getDefaultFloat
Method declared on I Preference Store public int get Default Int String name return get Prefs get Default Int name  IPreferenceStore getDefaultInt getPrefs getDefaultInt
Method declared on I Preference Store public long get Default Long String name return get Prefs get Default Long name  IPreferenceStore getDefaultLong getPrefs getDefaultLong
Method declared on I Preference Store public String get Default String String name return get Prefs get Default String name  IPreferenceStore getDefaultString getPrefs getDefaultString
Method declared on I Preference Store public double get Double String name return get Prefs get Double name  IPreferenceStore getDouble getPrefs getDouble
Method declared on I Preference Store public float get Float String name return get Prefs get Float name  IPreferenceStore getFloat getPrefs getFloat
Method declared on I Preference Store public int get Int String name return get Prefs get Int name  IPreferenceStore getInt getPrefs getInt
Method declared on I Preference Store public long get Long String name return get Prefs get Long name  IPreferenceStore getLong getPrefs getLong
Method declared on I Preference Store public String get String String name return get Prefs get String name  IPreferenceStore getString getPrefs getString
Method declared on I Preference Store public boolean is Default String name return get Prefs is Default name  IPreferenceStore isDefault getPrefs isDefault
Method declared on I Preference Store public boolean needs Saving return get Prefs needs Saving  IPreferenceStore needsSaving getPrefs needsSaving
public void put Value String name String value try temporarily suppress event notification while setting value silent Running true get Prefs set Value name value finally silent Running false  putValue silentRunning getPrefs setValue silentRunning
Method declared on I Preference Store public void set Default String name double value get Prefs set Default name value  IPreferenceStore setDefault getPrefs setDefault
Method declared on I Preference Store public void set Default String name float value get Prefs set Default name value  IPreferenceStore setDefault getPrefs setDefault
Method declared on I Preference Store public void set Default String name int value get Prefs set Default name value  IPreferenceStore setDefault getPrefs setDefault
Method declared on I Preference Store public void set Default String name long value get Prefs set Default name value  IPreferenceStore setDefault getPrefs setDefault
Method declared on I Preference Store public void set Default String name String value get Prefs set Default name value  IPreferenceStore setDefault getPrefs setDefault
Method declared on I Preference Store public void set Default String name boolean value get Prefs set Default name value  IPreferenceStore setDefault getPrefs setDefault
Method declared on I Preference Store public void set To Default String name get Prefs set To Default name  IPreferenceStore setToDefault getPrefs setToDefault
Method declared on I Preference Store public void set Value String name double value get Prefs set Value name value  IPreferenceStore setValue getPrefs setValue
Method declared on I Preference Store public void set Value String name float value get Prefs set Value name value  IPreferenceStore setValue getPrefs setValue
Method declared on I Preference Store public void set Value String name int value get Prefs set Value name value  IPreferenceStore setValue getPrefs setValue
Method declared on I Preference Store public void set Value String name long value get Prefs set Value name value  IPreferenceStore setValue getPrefs setValue
Method declared on I Preference Store public void set Value String name String value get Prefs set Value name value  IPreferenceStore setValue getPrefs setValue
Method declared on I Preference Store public void set Value String name boolean value get Prefs set Value name value  IPreferenceStore setValue getPrefs setValue
see org eclipse jface preference I Persistent Preference Store save public void save throws IO Exception AbstractUI Plugin this save Preference Store  IPersistentPreferenceStore IOException AbstractUIPlugin savePreferenceStore
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 org eclipse core runtime 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 return new Image Registry  ImageRegistry getImageRegistry ImageRegistry createImageRegistry ImageRegistry
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 Subclasses should reimplement code initialize Default Preferences code if they have custom graphic images to load p return the preference store public I Preference Store get Preference Store Create the preference store lazily if preference Store null must assign field before calling initialize since this method can be reentered during initialization preference Store new Compatibility Preference Store force initialization preference Store initialize return preference Store  initializeDefaultPreferences IPreferenceStore getPreferenceStore preferenceStore preferenceStore CompatibilityPreferenceStore preferenceStore 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 try r w state area in the local file system String read Write Path get State 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 else 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 readWritePath getStateLocation 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
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
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 created yet do nothing if Workbench get Instance null 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 getInstance refreshPluginActions 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 String read Write Path get State Location append FN DIALOG SETTINGS toOS String dialog Settings save read Write Path catch IO Exception e spec ed to ignore problems  saveDialogSettings dialogSettings readWritePath getStateLocation FN_DIALOG_SETTINGS toOSString dialogSettings readWritePath IOException
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 refresh Plugin Actions  AbstractUIPlugin inheritDoc BundleContext refreshPluginActions
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 save Dialog Settings save Preference Store preference Store null image Registry null finally super stop context  AbstractUIPlugin inheritDoc BundleContext 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

Creates an editor presentation for presenting editors p The presentation creates its controls under the given parent composite p param parent the parent composite to use for the presentation s controls param site the site used for communication between the presentation and the workbench return a newly created part presentation public abstract Stack Presentation create Editor Presentation Composite parent  StackPresentation createEditorPresentation
Creates a stack presentation for presenting regular docked views p The presentation creates its controls under the given parent composite p param parent the parent composite to use for the presentation s controls param site the site used for communication between the presentation and the workbench return a newly created part presentation public abstract Stack Presentation create View Presentation Composite parent  StackPresentation createViewPresentation
em EXPERIMENTAL em Creates a standalone stack presentation for presenting a standalone view A standalone view cannot be docked together with other views The title of a standalone view may be hidden p The presentation creates its controls under the given parent composite p param parent the parent composite to use for the presentation s controls param site the site used for communication between the presentation and the workbench param show Title code true code to show the title for the view code false code to hide it return a newly created part presentation public abstract Stack Presentation create Standalone View Presentation Composite parent  showTitle StackPresentation createStandaloneViewPresentation
Creates the status line manager for the window Subclasses may override return the window s status line manager public I Status Line Manager create Status Line Manager return new Status Line Manager  IStatusLineManager createStatusLineManager StatusLineManager
Creates the control for the window s status line Subclasses may override param status Line the window s status line manager param parent the parent composite return the window s status line control public Control create Status Line Control I Status Line Manager status Line Composite parent return Status Line Manager status Line create Control parent SWT NONE  statusLine createStatusLineControl IStatusLineManager statusLine StatusLineManager statusLine createControl
Returns a globally unique identifier for this type of presentation factory This is used to ensure that one presentation is not restored from mementos saved by a different presentation return a globally unique identifier for this type of presentation factory public String get Id return this get Class get Name  getId getClass getName

public interface I Part Menu Displays the local menu for this part as a popup at the given location param location position to display the menu at display coordinates not null since 3 0  IPartMenu

Sets the bounds of this part param bounds bounding rectangle not null 
Notifies the part whether or not it is visible in the current perspective A part is visible iff any part of its widgetry can be seen param is Visible true if the part has just become visible false if the part has just become hidden  isVisible
public void set Visible boolean is Visible Forces this part to have focus public void set Focus  setVisible isVisible setFocus
Adds a listener for changes to properties of this workbench part Has no effect if an identical listener is already registered p The properties ids are defined by the PROP  constants above p param listener a property listener not null  PROP_
Remove a listener that was previously added using add Property Listener param listener a property listener not null  addPropertyListener
Returns the short name of the part This is used as the text on the tab when this part is stacked on top of other parts return the short name of the part not null 
Returns the title of this workbench part If this value changes the part must fire a property listener event with code PROP TITLE code p The title is used to populate the title bar of this part s visual container p return the workbench part title not null  PROP_TITLE
Returns the status message from the part s title or the empty string if none This is a substring of the part s title A typical title will consist of the part name a separator and a status message describing the current contents p Presentations can query get Name and get Title Status if they want to display the status message and name separately or they can use get Title if they want to display the entire title p return the status message or the empty string if none not null  getName getTitleStatus getTitle
Returns the title image of this workbench part If this value changes the part must fire a property listener event with code PROP TITLE code p The title image is usually used to populate the title bar of this part s visual container Since this image is managed by the part itself callers must b not b dispose the returned image p return the title image  PROP_TITLE
Returns the title tool tip text of this workbench part If this value changes the part must fire a property listener event with code PROP TITLE code p The tool tip text is used to populate the title bar of this part s visual container p return the workbench part title tool tip not null  PROP_TITLE
Returns true iff the contents of this part have changed recently For editors this indicates that the part has changed since the last save For views this indicates that the view contains interesting changes that it wants to draw the user s attention to return true iff the part is dirty 
Return true if the the receiver is currently in a busy state return boolean true if busy 
Returns the local toolbar for this part or null if this part does not have a local toolbar Callers must not dispose or downcast the return value return the local toolbar for the part or null if none 
Returns the menu for this part or null if none return the menu for this part or null if none 
Returns an SWT control that can be used to indicate the tab order for this part This can be returned as part of the result to link Stack Presentation get Tab List I Presentable Part Any other use of this control is unsupported This may return a placeholder control that is only meaningful in the context of code get Tab List code return the part s control not null  StackPresentation getTabList IPresentablePart getTabList

public interface I Presentation Serializer Returns a unique identifier for the given part The identifier can later be used to restore the original part by calling get Part This identifier is guaranteed to be unique within a particular Stack Presentation However the same part may be assigned a different ID each time the presentation is saved param part a part to be identified not null return a unique identifier for the part not null  IPresentationSerializer getPart StackPresentation
Returns a presentable part given an id that was generated when the presentation was saved param id an ID that was generated by get Id I Presentable Part when the presentation was saved return the presentable part associated with the given id or null if none Note that even if the ID was valid when the presentation was saved it may not be valid when the presentation is restored Callers must be prepared to handle a null result  getId IPresentablePart

Sets the state of the container Called by the presentation when the user causes the the container to be minimized maximized etc param new State one of the STATE  constants  newState STATE_
Returns the current state of the site one of the STATE  constants return the current state of the site one of the STATE  constants  STATE_ STATE_
Returns true iff the site supports the given state param state one of the STATE  constants above return true iff the site supports the given state  STATE_
Begins dragging the given part param being Dragged the part to drag not null param initial Position the mouse position at the time of the initial mousedown display coordinates not null param keyboard true iff the drag was initiated via mouse dragging and false if the drag may be using the keyboard  beingDragged initialPosition
Closes the given set of parts param to Close the set of parts to close Not null All of the entries must be non null  toClose
Begins dragging the entire stack of parts param initial Position the mouse position at the time of the initial mousedown display coordinates not null param keyboard true iff the drag was initiated via mouse dragging and false if the drag may be using the keyboard  initialPosition
Returns true iff this site will allow the given part to be closed param to Close part to test not null return true iff the part may be closed  toClose
Returns true iff the given part can be dragged If this returns false the given part should not trigger a drag param to Move part to test not null return true iff this part is a valid drag source  toMove
Returns true iff this entire stack can be dragged return tre iff the stack can be dragged 
Makes the given part active param to Select  toSelect
Returns the currently selected part or null if the stack is empty return the currently selected part or null if the stack is empty 
Adds system actions to the given menu manager The site may make use of the following group ids ul li code close code for close actions li li code size code for resize actions li li code misc code for miscellaneous actions li ul The presentation can control the insertion position by creating these group I Ds where appropriate param menu Manager the menu manager to populate  IDs menuManager

private static Listener drag Listener new Listener public void handle Event Event event drag Event event if drag Source event widget drag Source null current Listener null  dragListener handleEvent dragEvent dragSource dragSource currentListener
Returns whether the mouse has moved enough to warrant opening a tracker private static boolean has Moved Enough Event event return Geometry distance Squared Drag Util get Event Loc event anchor HYSTERESIS HYSTERESIS  hasMovedEnough distanceSquared DragUtil getEventLoc
private static Listener move Listener new Listener public void handle Event Event event handle Mouse Move event  moveListener handleEvent handleMouseMove
private static Listener click Listener new Listener public void handle Event Event e handle Mouse Click e  clickListener handleEvent handleMouseClick
private static Listener mouse Down Listener new Listener public void handle Event Event event if event widget instanceof Control drag Source Control event widget current Listener Listener drag Source get Data LISTENER ID anchor Drag Util get Event Loc event if drag Event null drag Event widget drag Source drag Event null  mouseDownListener handleEvent dragSource currentListener dragSource getData LISTENER_ID DragUtil getEventLoc dragEvent dragEvent dragSource dragEvent
private static void handle Mouse Click Event event cancel Drag  handleMouseClick cancelDrag
private static void handle Mouse Move Event e if current Listener null drag Event null has Moved Enough e if drag Source null drag Source is Disposed drag Source e widget Event de drag Event Listener l current Listener cancel Drag l handle Event de else cancel Drag  handleMouseMove currentListener dragEvent hasMovedEnough dragSource dragSource isDisposed dragSource dragEvent currentListener cancelDrag handleEvent cancelDrag
private static void cancel Drag current Listener null drag Event null drag Source null  cancelDrag currentListener dragEvent dragSource
Adds a drag listener to the given control The behavior is very similar to control add Listener SWT Drag Detect drag Listener however the listener attached by this method is less sensitive The drag event is only fired once the user moves the cursor more than HYSTERESIS pixels p This is useful for registering a listener that will trigger an editor or view drag since an overly sensitive drag listener can cause users to accidentally drag views when trying to select a tab p p Currently only one such drag listener can be registered at a time p param control the control containing the drag listener param external Drag Listener the drag listener to attach public static void add Drag Listener Control control Listener external Drag Listener control add Listener SWT Drag Detect drag Listener control add Listener SWT Mouse Up click Listener control add Listener SWT Mouse Double Click click Listener control add Listener SWT Mouse Down mouse Down Listener control add Listener SWT Mouse Move move Listener control set Data LISTENER ID external Drag Listener  addListener DragDetect dragListener externalDragListener addDragListener externalDragListener addListener DragDetect dragListener addListener MouseUp clickListener addListener MouseDoubleClick clickListener addListener MouseDown mouseDownListener addListener MouseMove moveListener setData LISTENER_ID externalDragListener
Removes a drag listener that was previously attached using add Drag Listener param control the control containing the drag listener param external Drag Listener the drag listener to remove public static void remove Drag Listener Control control Listener external Drag Listener control remove Listener SWT Drag Detect drag Listener control remove Listener SWT Mouse Up click Listener control remove Listener SWT Mouse Double Click click Listener control remove Listener SWT Mouse Down mouse Down Listener control remove Listener SWT Mouse Move move Listener control set Data LISTENER ID null if external Drag Listener current Listener cancel Drag  addDragListener externalDragListener removeDragListener externalDragListener removeListener DragDetect dragListener removeListener MouseUp clickListener removeListener MouseDoubleClick clickListener removeListener MouseDown mouseDownListener removeListener MouseMove moveListener setData LISTENER_ID externalDragListener currentListener cancelDrag

Creates a drop result param snap Rectangle region that should be highlighted by the tracking rectangle display coordinates param cookie the presentation may attach an object to this drop result in order to identify the drop location This object will be passed back into the presentation s add method public Stack Drop Result Rectangle snap Rectangle Object cookie this snap Rectangle snap Rectangle this cookie cookie  snapRectangle StackDropResult snapRectangle snapRectangle snapRectangle
Returns a rectangle screen coordinates describing the target location for this drop operation While dragging the tracking rectangle will snap to this position return a snap rectangle not null public Rectangle get Snap Rectangle return snap Rectangle  getSnapRectangle snapRectangle
Returns the cookie for this drop result This object provided by the presentation but is remembered by the workbench It will be given back to the presentation s add method to indicate that a part is being added as a result of a drop operation return the drop cookie for this drop result public Object get Cookie return cookie  getCookie

Constructs a new stack presentation with the given site param stack Site the stack site protected Stack Presentation I Stack Presentation Site stack Site Assert is Not Null stack Site site stack Site  stackSite StackPresentation IStackPresentationSite stackSite isNotNull stackSite stackSite
Returns the presentation site not null return I Stack Presentation Site protected I Stack Presentation Site get Site return site  IStackPresentationSite IStackPresentationSite getSite
Sets the bounding rectangle for this presentation param bounds new bounding rectangle not null 
Returns the minimum size for this stack The stack is prevented from being resized smaller than this amount and this is used as the default size for the stack when it is minimized Typically this is the amount of space required to fit the minimize close and maximize buttons and one tab return the minimum size for this stack not null 
Disposes all SWT resources being used by the stack This is the last method that will be invoked on the stack 
This is invoked to notify the presentation that its activation state has changed Stack Presentations can have three possible activation states see the AS  constants above param new State one of AS INACTIVE AS ACTIVE or AS ACTIVE NOFOCUS  StackPresentations AS_ newState AS_INACTIVE AS_ACTIVE AS_ACTIVE_NOFOCUS
This causes the presentation to become visible or invisible When a presentation is invisible it must not respond to user input or modify its parts For example a presentations will be made invisible if it belongs to a perspective and the user switches to another perspective param is Visible the state to set visibility to since 3 0  isVisible
Sets the state of the presentation That is notifies the presentation that is has been minimized maximized or restored Note that this method is the only way that a presentation is allowed to change its state p If a presentation wishes to minimize itself it must call set State on its associated I Presentation Site If the site chooses to respond to the state change it will call this method at the correct time The presentation should not call this method directly p param state one of the I Presentation Site STATE  constants  setState IPresentationSite IPresentationSite STATE_
Returns the control for this presentation return the control for this presentation not null 
Adds the given part to the stack The presentation is free to determine where the part should be inserted If the part is being inserted as the result of a drag drop operation it will be given a cookie identifying the drop location Has no effect if an identical part is already in the presentation param new Part the new part to add not null param cookie an identifier for a drop location or null When the presentation attaches a cookie to a Stack Drop Result that cookie is passed back into add Part when a part is actually dropped in that location  newPart StackDropResult addPart
Removes the given part from the stack param old Part the part to remove not null  oldPart
Brings the specified part to the foreground This should not affect the current focus param to Select the new active part not null  toSelect
This method is invoked whenever a part is dragged over the stack s control It returns a Stack Drop Result if and only if the part may be dropped in this location param current Control the control being dragged over param location cursor location display coordinates return a Stack Drop Result or null if the presentation does not have a drop target in this location  StackDropResult currentControl StackDropResult
Instructs the presentation to display the system menu 
public abstract void show System Menu Instructs the presentation to display the pane menu public abstract void show Pane Menu  showSystemMenu showPaneMenu
Instructs the presentation to display a list of all parts in the stack and allow the user to change the selection using the keyboard public void show Part List  showPartList
Saves the state of this presentation to the given memento param context object that can be used to generate unique I Ds for I Presentable Parts this may be a temporary object the presentation should not keep any references to it param memento memento where the data will be saved public void save State I Presentation Serializer context I Memento memento  IDs IPresentableParts saveState IPresentationSerializer IMemento
Restores the state of this presentation to a previously saved state param context object that can be used to find I Presentable Parts given string I Ds this may be a temporary object the presentation should not keep any references to it param memento memento where the data will be saved public void restore State I Presentation Serializer context I Memento memento  IPresentableParts IDs restoreState IPresentationSerializer IMemento
Returns the tab key traversal order for the given code I Presentable Part code param part the part return the tab key traversal order  IPresentablePart

see org eclipse ui presentations Abstract Presentation Factory public Stack Presentation create Editor Presentation Composite parent I Stack Presentation Site site return new Default Editor Presentation parent site  AbstractPresentationFactory StackPresentation createEditorPresentation IStackPresentationSite DefaultEditorPresentation
see org eclipse ui presentations Abstract Presentation Factory public Stack Presentation create View Presentation Composite parent I Stack Presentation Site site return new Default View Presentation parent site  AbstractPresentationFactory StackPresentation createViewPresentation IStackPresentationSite DefaultViewPresentation
see org eclipse ui presentations Abstract Presentation Factory public Stack Presentation create Standalone View Presentation Composite parent I Stack Presentation Site site boolean show Title return new Default Standalone Presentation parent site show Title  AbstractPresentationFactory StackPresentation createStandaloneViewPresentation IStackPresentationSite showTitle DefaultStandalonePresentation showTitle

I Workbench Site Progress Service progress Service Create a new instance of the receiver using the supplied content provider and viewer Run any jobs using the site param provider param viewer param site public Deferred Tree Content Manager I Tree Content Provider provider Abstract Tree Viewer viewer I Workbench Part Site site this provider viewer Object site Service site get Adapter I Workbench Site Progress Service class if site Service null progress Service I Workbench Site Progress Service site Service  IWorkbenchSiteProgressService progressService DeferredTreeContentManager ITreeContentProvider AbstractTreeViewer IWorkbenchPartSite siteService getAdapter IWorkbenchSiteProgressService siteService progressService IWorkbenchSiteProgressService siteService
Create a new instance of the receiver using the supplied content provider and viewer param provider The content provider that will be updated param viewer The tree viewer that the results are added to public Deferred Tree Content Manager I Tree Content Provider provider Abstract Tree Viewer viewer content Provider provider tree Viewer viewer  DeferredTreeContentManager ITreeContentProvider AbstractTreeViewer contentProvider treeViewer
Provides an optimized lookup for determining if an element has children This is required because elements that are populated lazilly can t answer code get Children code just to determine the potential for children Throw an Assertion Failed Exception if element is not an instance of I Deferred Workbench Adapter param element The Object being tested This should not be code null code return boolean code true code if there are potentially children throws Runtime Exception if the element is null public boolean may Have Children Object element I Deferred Workbench Adapter adapter get Adapter element Assert is Not Null element Progress Messages get String Deferred Tree Content Manager Not Deferred NON NLS 1 return adapter is Container  getChildren AssertionFailedException IDeferredWorkbenchAdapter RuntimeException mayHaveChildren IDeferredWorkbenchAdapter getAdapter isNotNull ProgressMessages getString DeferredTreeContentManager NotDeferred isContainer
Returns the child elements of the given element or in the case of a deferred element returns a placeholder If a deferred element is used a job is created to fetch the children in the background param parent The parent object return Object or code null code if parent is not an instance of I Deferred Workbench Adapter public Object get Children final Object parent I Deferred Workbench Adapter element get Adapter parent if element null return null Pending Update Adapter placeholder new Pending Update Adapter start Fetching Deferred Children parent element placeholder return new Object placeholder  IDeferredWorkbenchAdapter getChildren IDeferredWorkbenchAdapter getAdapter PendingUpdateAdapter PendingUpdateAdapter startFetchingDeferredChildren
Return the I Deferred Workbench Adapter for element or the element if it is an instance of I Deferred Workbench Adapter If it does not exist return null param element return I Deferred Workbench Adapter or code null code protected I Deferred Workbench Adapter get Adapter Object element if element instanceof I Deferred Workbench Adapter return I Deferred Workbench Adapter element if element instanceof I Adaptable return null Object adapter I Adaptable element get Adapter I Deferred Workbench Adapter class if adapter null return null return I Deferred Workbench Adapter adapter  IDeferredWorkbenchAdapter IDeferredWorkbenchAdapter IDeferredWorkbenchAdapter IDeferredWorkbenchAdapter getAdapter IDeferredWorkbenchAdapter IDeferredWorkbenchAdapter IAdaptable IAdaptable getAdapter IDeferredWorkbenchAdapter IDeferredWorkbenchAdapter
new Object adapter get Label parent Job job new Job job Name public I Status run I Progress Monitor monitor adapter fetch Deferred Children parent collector monitor return Status OK STATUS  getLabel jobName IStatus IProgressMonitor fetchDeferredChildren OK_STATUS
Check if the object is equal to parent or one of parents children so that the job can be cancelled if the parent is refreshed param family the potential ancestor of the current parent return boolean public boolean belongs To Object family return is Parent family parent  belongsTo isParent
Check if the parent of element is equal to the parent used in this job param family The potential ancestor of the current parent param child The object to check against return boolean private boolean is Parent Object family Object child if family equals child return true I Workbench Adapter workbench Adapter get Workbench Adapter child if workbench Adapter null return false Object element Parent workbench Adapter get Parent child if element Parent null return false return is Parent family element Parent  isParent IWorkbenchAdapter workbenchAdapter getWorkbenchAdapter workbenchAdapter elementParent workbenchAdapter getParent elementParent isParent elementParent
Get the workbench adapter for the element param element The object we are adapting to private I Workbench Adapter get Workbench Adapter Object element if element instanceof I Workbench Adapter return I Workbench Adapter element if element instanceof I Adaptable return null Object workbench Adapter I Adaptable element get Adapter I Workbench Adapter class if workbench Adapter null return null return I Workbench Adapter workbench Adapter  IWorkbenchAdapter getWorkbenchAdapter IWorkbenchAdapter IWorkbenchAdapter IAdaptable workbenchAdapter IAdaptable getAdapter IWorkbenchAdapter workbenchAdapter IWorkbenchAdapter workbenchAdapter
see org eclipse core runtime jobs Job Change Adapter done org eclipse core runtime jobs I Job Change Event public void done I Job Change Event event run Clear Placeholder Job placeholder  JobChangeAdapter IJobChangeEvent IJobChangeEvent runClearPlaceholderJob
Starts a job and creates a collector for fetching the children of this deferred adapter If children are waiting to be retrieved for this parent already that job is cancelled and another is started param parent The parent object being filled in param adapter The adapter being used to fetch the children param placeholder The adapter that will be used to indicate that results are pending protected void start Fetching Deferred Children final Object parent final I Deferred Workbench Adapter adapter final Pending Update Adapter placeholder final I Element Collector collector create Element Collector parent placeholder Cancel any jobs currently fetching children for the same parent instance Platform get Job Manager cancel parent String job Name Progress Messages format Deferred Tree Content Manager Fetching Name NON NLS 1 new Object adapter get Label parent Job job new Job job Name public I Status run I Progress Monitor monitor adapter fetch Deferred Children parent collector monitor return Status OK STATUS Check if the object is equal to parent or one of parents children so that the job can be cancelled if the parent is refreshed param family the potential ancestor of the current parent return boolean public boolean belongs To Object family return is Parent family parent Check if the parent of element is equal to the parent used in this job param family The potential ancestor of the current parent param child The object to check against return boolean private boolean is Parent Object family Object child if family equals child return true I Workbench Adapter workbench Adapter get Workbench Adapter child if workbench Adapter null return false Object element Parent workbench Adapter get Parent child if element Parent null return false return is Parent family element Parent Get the workbench adapter for the element param element The object we are adapting to private I Workbench Adapter get Workbench Adapter Object element if element instanceof I Workbench Adapter return I Workbench Adapter element if element instanceof I Adaptable return null Object workbench Adapter I Adaptable element get Adapter I Workbench Adapter class if workbench Adapter null return null return I Workbench Adapter workbench Adapter job add Job Change Listener new Job Change Adapter non Javadoc see org eclipse core runtime jobs Job Change Adapter done org eclipse core runtime jobs I Job Change Event public void done I Job Change Event event run Clear Placeholder Job placeholder job set Rule adapter get Rule parent if progress Service null job schedule else progress Service schedule job  startFetchingDeferredChildren IDeferredWorkbenchAdapter PendingUpdateAdapter IElementCollector createElementCollector getJobManager jobName ProgressMessages DeferredTreeContentManager FetchingName getLabel jobName IStatus IProgressMonitor fetchDeferredChildren OK_STATUS belongsTo isParent isParent IWorkbenchAdapter workbenchAdapter getWorkbenchAdapter workbenchAdapter elementParent workbenchAdapter getParent elementParent isParent elementParent IWorkbenchAdapter getWorkbenchAdapter IWorkbenchAdapter IWorkbenchAdapter IAdaptable workbenchAdapter IAdaptable getAdapter IWorkbenchAdapter workbenchAdapter IWorkbenchAdapter workbenchAdapter addJobChangeListener JobChangeAdapter JobChangeAdapter IJobChangeEvent IJobChangeEvent runClearPlaceholderJob setRule getRule progressService progressService
public I Status run InUI Thread I Progress Monitor update Monitor Cancel the job if the tree viewer got closed if tree Viewer get Control is Disposed return Status CANCEL STATUS Prevent extra redraws on deletion and addition tree Viewer get Control set Redraw false tree Viewer add parent children tree Viewer get Control set Redraw true return Status OK STATUS  IStatus runInUIThread IProgressMonitor updateMonitor treeViewer getControl isDisposed CANCEL_STATUS treeViewer getControl setRedraw treeViewer treeViewer getControl setRedraw OK_STATUS
Create a UI Job to add the children to the parent in the tree viewer param parent param children param monitor protected void add Children final Object parent final Object children I Progress Monitor monitor Workbench Job update Job new Workbench Job Progress Messages get String Deferred Tree Content Manager Adding Children NON NLS 1 non Javadoc see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor update Monitor Cancel the job if the tree viewer got closed if tree Viewer get Control is Disposed return Status CANCEL STATUS Prevent extra redraws on deletion and addition tree Viewer get Control set Redraw false tree Viewer add parent children tree Viewer get Control set Redraw true return Status OK STATUS update Job set System true update Job schedule  UIJob addChildren IProgressMonitor WorkbenchJob updateJob WorkbenchJob ProgressMessages getString DeferredTreeContentManager AddingChildren UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor updateMonitor treeViewer getControl isDisposed CANCEL_STATUS treeViewer getControl setRedraw treeViewer treeViewer getControl setRedraw OK_STATUS updateJob setSystem updateJob
Return whether or not the element is or adapts to an I Deferred Workbench Adapter param element return boolean code true code if the element is an I Deferred Workbench Adapter public boolean is Deferred Adapter Object element return get Adapter element null  IDeferredWorkbenchAdapter IDeferredWorkbenchAdapter isDeferredAdapter getAdapter
public I Status run InUI Thread I Progress Monitor monitor if placeholder is Removed Control control tree Viewer get Control if control is Disposed return Status CANCEL STATUS tree Viewer remove placeholder placeholder set Removed true return Status OK STATUS  IStatus runInUIThread IProgressMonitor isRemoved treeViewer getControl isDisposed CANCEL_STATUS treeViewer setRemoved OK_STATUS
Run a job to clear the placeholder This is used when the update for the tree is complete so that the user is aware that no more updates are pending param placeholder protected void run Clear Placeholder Job final Pending Update Adapter placeholder if placeholder is Removed return Clear the placeholder if it is still there Workbench Job clear Job new Workbench Job Progress Messages get String Deferred Tree Content Manager Clear Job NON NLS 1 non Javadoc see org eclipse ui progress UI Job run InUI Thread org eclipse core runtime I Progress Monitor public I Status run InUI Thread I Progress Monitor monitor if placeholder is Removed Control control tree Viewer get Control if control is Disposed return Status CANCEL STATUS tree Viewer remove placeholder placeholder set Removed true return Status OK STATUS clear Job set System true clear Job schedule  runClearPlaceholderJob PendingUpdateAdapter isRemoved WorkbenchJob clearJob WorkbenchJob ProgressMessages getString DeferredTreeContentManager ClearJob UIJob runInUIThread IProgressMonitor IStatus runInUIThread IProgressMonitor isRemoved treeViewer getControl isDisposed CANCEL_STATUS treeViewer setRemoved OK_STATUS clearJob setSystem clearJob
Cancel all jobs that are fetching content for the given parent or any of its children param parent public void cancel Object parent Platform get Job Manager cancel parent  getJobManager
see org eclipse jface progress I Element Collector add java lang Object org eclipse core runtime I Progress Monitor public void add Object element I Progress Monitor monitor add new Object element monitor  IElementCollector IProgressMonitor IProgressMonitor
see org eclipse jface progress I Element Collector add java lang Object org eclipse core runtime I Progress Monitor public void add Object elements I Progress Monitor monitor add Children parent elements monitor  IElementCollector IProgressMonitor IProgressMonitor addChildren
see org eclipse jface progress I Element Collector done public void done run Clear Placeholder Job placeholder  IElementCollector runClearPlaceholderJob
Create the element collector for the receiver param parent The parent object being filled in param placeholder The adapter that will be used to indicate that results are pending return I Element Collector protected I Element Collector create Element Collector final Object parent final Pending Update Adapter placeholder return new I Element Collector non Javadoc see org eclipse jface progress I Element Collector add java lang Object org eclipse core runtime I Progress Monitor public void add Object element I Progress Monitor monitor add new Object element monitor non Javadoc see org eclipse jface progress I Element Collector add java lang Object org eclipse core runtime I Progress Monitor public void add Object elements I Progress Monitor monitor add Children parent elements monitor non Javadoc see org eclipse jface progress I Element Collector done public void done run Clear Placeholder Job placeholder  IElementCollector IElementCollector createElementCollector PendingUpdateAdapter IElementCollector IElementCollector IProgressMonitor IProgressMonitor IElementCollector IProgressMonitor IProgressMonitor addChildren IElementCollector runClearPlaceholderJob

Called by a job run in a separate thread to fetch the children of this adapter The adapter should in return notify of new children via the collector This is generally used when a content provider is getting elements p It is good practice to check the passed in monitor for cancellation This will provide good responsiveness for cancellation requests made by the user p param object the object to fetch the children for param collector the collector to notify about new children Should not be code null code param monitor a progress monitor that will never be code null code to support reporting and cancellation 
Returns whether this adapter may have children This is an optimized method used by content providers to allow showing the expand icon without having yet fetched the children for the element p If code false code is returned then the content provider may assume that this adapter has no children If code true code is returned then the job manager may assume that this adapter may have children p return code true code if the adapter may have childen and code false code otherwise 
Returns the rule used to schedule the deferred fetching of children for this adapter param object the object whose children are being fetched return the scheduling rule May be code null code see org eclipse core runtime jobs Job set Rule I Scheduling Rule  setRule ISchedulingRule

public interface I Element Collector Add the element to the I Element Collector Send any progress information to monitor param element The element being added param monitor The monitor to send updates to  IElementCollector IElementCollector
public void add Object element I Progress Monitor monitor Add the elements to the I Element Collector Send any progress information to monitor param elements The elements being added param monitor The monitor to send updates to  IProgressMonitor IElementCollector
public void add Object elements I Progress Monitor monitor The element collection is done Clean up any temporary state  IProgressMonitor

The time at which an operation becomes considered a long operation Used to determine when the busy cursor will be replaced with a progress monitor return int see I Progress Service busy Cursor While I Runnable With Progress  IProgressService busyCursorWhile IRunnableWithProgress
Register the Image Descriptor to be the icon used for all jobs that belong to family within the workbench param icon Image Descriptor that will be used when the job is being displayed param family The family to associate with see Job belongs To Object  ImageDescriptor ImageDescriptor belongsTo
public void register Icon For Family Image Descriptor icon Object family Runs the given operation in the UI thread using the given runnable context The given scheduling rule if any will be acquired for the duration of the operation If the rule is not available when this method is called a progress dialog will be displayed that gives users control over the background processes that may be blocking the runnable from proceeding p This method can act as a wrapper for uses of tt I Runnable Context tt where the tt fork tt parameter was tt false tt p Note Running long operations in the UI thread is generally not recommended This can result in the UI becoming unresponsive for the duration of the operation Where possible tt busy Cursor While tt should be used instead param context The runnable context to run the operation in param runnable The operation to run param rule A scheduling rule or code null code throws Invocation Target Exception wraps any exception or error which occurs while running the runnable throws Interrupted Exception propagated by the context if the runnable acknowledges cancelation by throwing this exception  registerIconForFamily ImageDescriptor IRunnableContext busyCursorWhile InvocationTargetException InterruptedException
Get the icon that has been registered for a Job by checking if the job belongs to any of the registered families param job return Icon or code null code if there isn t one see I Progress Service register Icon For Family Image Descriptor Object  IProgressService registerIconForFamily ImageDescriptor
Set the cursor to busy and run the runnable in a non UI Thread The calling thread will be blocked for the duration of the execution of the supplied runnable After the cursor has been running for code get Long Operation Time code replace it with a Progress Monitor Dialog so that the user may cancel Do not open the Progress Monitor Dialog if there is already a modal dialog open param runnable The runnable to execute and show the progress for see I Progress Service get Long Operation Time throws Invocation Target Exception throws Interrupted Exception public void busy Cursor While I Runnable With Progress runnable  getLongOperationTime ProgressMonitorDialog ProgressMonitorDialog IProgressService getLongOperationTime InvocationTargetException InterruptedException busyCursorWhile IRunnableWithProgress
Open a dialog on job when it starts to run and close it when the job is finished Wait for LONG OPERATION MILLISECONDS before opening the dialog Do not open if it is already done or if the user has set a preference to always run in the background Parent the dialog from the shell param shell The Shell to parent the dialog from or code null code if the active shell is to be used param job The Job that will be reported in the dialog job must not be code null code  LONG_OPERATION_MILLISECONDS

Jobs scheduled with this method will cause the part s presentation to be changed to indicate that the part is busy and in a transient state until the job completes Parts can also add customized busy indication by overriding code Workbench Part set Busy code If use Half Busy Cursor is true then the cursor will change to the half busy cursor for the duration of the job param job The job to schedule param delay The delay in scheduling param use Half Busy Cursor A boolean to indicate if the half busy cursor should be used while this job is running see Job schedule long  WorkbenchPart setBusy useHalfBusyCursor useHalfBusyCursor
Jobs scheduled with this method will cause the part s presentation to be changed to indicate that the part is busy and in a transient state until the job completes Parts can also add customized busy indication by overriding code Workbench Part set Busy code param job The job to schedule param delay The delay in scheduling see Job schedule long  WorkbenchPart setBusy
Jobs scheduled with this method will cause the part s presentation to be changed to indicate that the part is busy and in a transient state until the job completes Parts can also add customized busy indication by overriding code Workbench Part set Busy code param job The job to schedule see Job schedule  WorkbenchPart setBusy
Show busy state if any job of the specified family is running param family Object see Job belongs To Object  belongsTo
Warn that the content of the receiver has changed The method of this is determined by how the presentation shows this see I Presentable Part PROP HIGHLIGHT IF BACK  IPresentablePart PROP_HIGHLIGHT_IF_BACK

private Display cached Display Create a new instance of the receiver with the supplied name The display used will be the one from the workbench if this is available UI Jobs with this constructor will determine thier display at runtime param name the job name public UI Job String name super name  cachedDisplay UIJobs UIJob
Create a new instance of the receiver with the supplied Display param job Display the display param name the job name see Job public UI Job Display job Display String name this name set Display job Display  jobDisplay UIJob jobDisplay setDisplay jobDisplay
Convenience method to return a status for an exception param exception return I Status an error status built from the exception see Job public static I Status error Status Throwable exception return Status Util new Status I Status ERROR exception get Message null exception get Message NON NLS 1 exception  IStatus IStatus errorStatus StatusUtil newStatus IStatus getMessage getMessage
async Display async Exec new Runnable public void run long start Time System current Time Millis I Status result null try As we are in the UI Thread we can always know what to tell the job set Thread Thread current Thread if monitor is Canceled result Status CANCEL STATUS else result run InUI Thread monitor Debug testing for instrumenting UI jobs if Policy DEBUG LONG UI WARNING long elapsed System current Time Millis start Time if elapsed 100 Workbench Plugin log Progress Messages format UI Job long Job Message new Object NON NLS 1 get Name String value Of elapsed finally if result null result new Status I Status ERROR PlatformUI PLUGIN ID I Status ERROR Progress Messages get String Error NON NLS 1 null done result  asyncDisplay asyncExec startTime currentTimeMillis IStatus setThread currentThread isCanceled CANCEL_STATUS runInUIThread DEBUG_LONG_UI_WARNING currentTimeMillis startTime WorkbenchPlugin ProgressMessages UIJob longJobMessage getName valueOf IStatus PLUGIN_ID IStatus ProgressMessages getString
see org eclipse core runtime jobs Job run org eclipse core runtime I Progress Monitor Note this message is marked final Implementors should use run InUI Thread instead public final I Status run final I Progress Monitor monitor if monitor is Canceled return Status CANCEL STATUS Display async Display get Display if async Display null async Display is Disposed return Status CANCEL STATUS async Display async Exec new Runnable public void run long start Time System current Time Millis I Status result null try As we are in the UI Thread we can always know what to tell the job set Thread Thread current Thread if monitor is Canceled result Status CANCEL STATUS else result run InUI Thread monitor Debug testing for instrumenting UI jobs if Policy DEBUG LONG UI WARNING long elapsed System current Time Millis start Time if elapsed 100 Workbench Plugin log Progress Messages format UI Job long Job Message new Object NON NLS 1 get Name String value Of elapsed finally if result null result new Status I Status ERROR PlatformUI PLUGIN ID I Status ERROR Progress Messages get String Error NON NLS 1 null done result return Job ASYNC FINISH  IProgressMonitor runInUIThread IStatus IProgressMonitor isCanceled CANCEL_STATUS asyncDisplay getDisplay asyncDisplay asyncDisplay isDisposed CANCEL_STATUS asyncDisplay asyncExec startTime currentTimeMillis IStatus setThread currentThread isCanceled CANCEL_STATUS runInUIThread DEBUG_LONG_UI_WARNING currentTimeMillis startTime WorkbenchPlugin ProgressMessages UIJob longJobMessage getName valueOf IStatus PLUGIN_ID IStatus ProgressMessages getString ASYNC_FINISH
Run the job in the UI Thread param monitor return I Status  IStatus
public abstract I Status run InUI Thread I Progress Monitor monitor Sets the display to execute the async Exec in Generally this is not used if there is a valid display avaialble via PlatformUI is Workbench Running param run Display Display see UI Job get Display see PlatformUI is Workbench Running public void set Display Display run Display Assert is Not Null run Display cached Display run Display  IStatus runInUIThread IProgressMonitor asyncExec isWorkbenchRunning runDisplay UIJob getDisplay isWorkbenchRunning setDisplay runDisplay isNotNull runDisplay cachedDisplay runDisplay
Returns the display for use by the receiver when running in an async Exec If it is not set then the display set in the workbench is used If the display is null the job will not be run return Display or code null code public Display get Display If it was not set get it from the workbench if cached Display null PlatformUI is Workbench Running return PlatformUI get Workbench get Display return cached Display  asyncExec getDisplay cachedDisplay isWorkbenchRunning getWorkbench getDisplay cachedDisplay

Create a new instance of the receiver with the supplied display and name Normally this constructor would not be used as it is best to let the job find the display from the workbench param job Display Display The display to run the job with param name String public Workbench Job Display job Display String name super job Display name add Default Job Change Listener  jobDisplay WorkbenchJob jobDisplay jobDisplay addDefaultJobChangeListener
Add a new instance of the reciever with the supplied name param name String public Workbench Job String name super name add Default Job Change Listener  WorkbenchJob addDefaultJobChangeListener
public void done I Job Change Event event Abort if it is not running if PlatformUI is Workbench Running return if event get Result get Code I Status OK perform Done event  IJobChangeEvent isWorkbenchRunning getResult getCode IStatus performDone
Add a job change listeners that handles a done event if the result was I Status OK private void add Default Job Change Listener add Job Change Listener new Job Change Adapter non Javadoc see org eclipse core runtime jobs Job Change Adapter done org eclipse core runtime jobs I Job Change Event public void done I Job Change Event event Abort if it is not running if PlatformUI is Workbench Running return if event get Result get Code I Status OK perform Done event  IStatus addDefaultJobChangeListener addJobChangeListener JobChangeAdapter JobChangeAdapter IJobChangeEvent IJobChangeEvent isWorkbenchRunning getResult getCode IStatus performDone
Perform done with the supplied event This will only occur if the returned status was OK This is called only if the job is finished with an I Status OK result and the workbench is still running param event I Job Change Event public void perform Done I Job Change Event event Do nothing by default  IStatus IJobChangeEvent performDone IJobChangeEvent
see org eclipse core internal jobs Internal Job should Schedule public boolean should Schedule return super should Schedule PlatformUI is Workbench Running  InternalJob shouldSchedule shouldSchedule shouldSchedule isWorkbenchRunning
see org eclipse core runtime jobs Job should Run public boolean should Run return super should Run PlatformUI is Workbench Running  shouldRun shouldRun shouldRun isWorkbenchRunning

Returns the active working set the filter is working with return the active working set public I Working Set get Working Set return working Set  IWorkingSet getWorkingSet workingSet
Sets the active working set param working Set the working set the filter should work with public void set Working Set I Working Set working Set this working Set working Set  workingSet setWorkingSet IWorkingSet workingSet workingSet workingSet
Determines if an element should be filtered out see Viewer Filter select Viewer Object Object public boolean select Viewer viewer Object parent Element Object element I Resource resource null if working Set null return true if element instanceof I Resource resource I Resource element else if element instanceof I Adaptable I Adaptable adaptable I Adaptable element resource I Resource adaptable get Adapter I Resource class if resource null return is Enclosed resource return true  ViewerFilter parentElement IResource workingSet IResource IResource IAdaptable IAdaptable IAdaptable IResource getAdapter IResource isEnclosed
Returns if the given resource is enclosed by a working set element The I Containment Adapter of each working set element is used for the containment test If there is no I Containment Adapter for a working set element a simple resource based test is used param element resource to test for enclosure by a working set element return true if element is enclosed by a working set element and false otherwise private boolean is Enclosed I Resource element I Path element Path element get Full Path I Adaptable working Set Elements cached Working Set working set elements won t be cached if select is called directly outside filter fixes bug 14500 if working Set Elements null working Set Elements working Set get Elements for int i 0 i working Set Elements length i I Adaptable working Set Element working Set Elements i I Containment Adapter containment Adapter I Containment Adapter working Set Element get Adapter I Containment Adapter class if there is no I Containment Adapter defined for the working set element type fall back to using resource based containment check if containment Adapter null if containment Adapter contains working Set Element element I Containment Adapter CHECK CONTEXT I Containment Adapter CHECK IF CHILD I Containment Adapter CHECK IF ANCESTOR I Containment Adapter CHECK IF DESCENDANT return true else if is Enclosed Resource element element Path working Set Element return true return false  IContainmentAdapter IContainmentAdapter isEnclosed IResource IPath elementPath getFullPath IAdaptable workingSetElements cachedWorkingSet workingSetElements workingSetElements workingSet getElements workingSetElements IAdaptable workingSetElement workingSetElements IContainmentAdapter containmentAdapter IContainmentAdapter workingSetElement getAdapter IContainmentAdapter IContainmentAdapter containmentAdapter containmentAdapter workingSetElement IContainmentAdapter CHECK_CONTEXT IContainmentAdapter CHECK_IF_CHILD IContainmentAdapter CHECK_IF_ANCESTOR IContainmentAdapter CHECK_IF_DESCENDANT isEnclosedResource elementPath workingSetElement
Returns if the given resource is enclosed by a working set element A resource is enclosed if it is either a parent of a working set element a child of a working set element or a working set element itself Simple path comparison is used This is only guaranteed to return correct results for resource working set elements param element resource to test for enclosure by a working set element param element Path full absolute path of the element to test return true if element is enclosed by a working set element and false otherwise private boolean is Enclosed Resource I Resource element I Path element Path I Adaptable working Set Element I Resource working Set Resource null if working Set Element equals element return true if working Set Element instanceof I Resource working Set Resource I Resource working Set Element else working Set Resource I Resource working Set Element get Adapter I Resource class if working Set Resource null I Path resource Path working Set Resource get Full Path if resource Path is Prefix Of element Path return true if element Path is Prefix Of resource Path return true return false  elementPath isEnclosedResource IResource IPath elementPath IAdaptable workingSetElement IResource workingSetResource workingSetElement workingSetElement IResource workingSetResource IResource workingSetElement workingSetResource IResource workingSetElement getAdapter IResource workingSetResource IPath resourcePath workingSetResource getFullPath resourcePath isPrefixOf elementPath elementPath isPrefixOf resourcePath
Filters out elements that are neither a parent nor a child of a working set element see Viewer Filter filter Viewer Object Object public Object filter Viewer viewer Object parent Object elements Object result null if working Set null cached Working Set working Set get Elements try result super filter viewer parent elements finally cached Working Set null return result  ViewerFilter workingSet cachedWorkingSet workingSet getElements cachedWorkingSet

Returns code I Text Selection class code or code null code if the class is not available return code I Text Selection class code or code null code if class not available since 3 0 private static Class get Text Selection Class if i Text Selection Class null tried before and succeeded return i Text Selection Class if text Selection Possible tried before and failed return null J Face text plug in is not on prereq chain of generic wb plug in hence I Text Selection class won t compile and Class for Name org eclipse jface text I Text Selection won t find it need to be trickier Bundle bundle Platform get Bundle JFACE TEXT PLUG IN if bundle null bundle get State Bundle UNINSTALLED J Face text plug in is not around or has already been removed assume that it will never be around text Selection Possible false return null plug in is around it s not our job to activate the plug in if bundle get State Bundle INSTALLED assume it might come alive later text Selection Possible true return null try Class c bundle load Class TEXT SELECTION CLASS NON NLS 1 remember for next time i Text Selection Class c return i Text Selection Class catch Class Not Found Exception e unable to load I Text Selection sounds pretty serious treat as if J Face text plug in were unavailable text Selection Possible false return null  ITextSelection ITextSelection getTextSelectionClass iTextSelectionClass iTextSelectionClass textSelectionPossible JFace ITextSelection forName ITextSelection getBundle JFACE_TEXT_PLUG_IN getState JFace textSelectionPossible getState textSelectionPossible loadClass TEXT_SELECTION_CLASS iTextSelectionClass iTextSelectionClass ClassNotFoundException ITextSelection JFace textSelectionPossible
Create a new instance of the receiver param config Element public Selection Enabler I Configuration Element config Element super if config Element null throw new Illegal Argument Exception parse Classes config Element  configElement SelectionEnabler IConfigurationElement configElement configElement IllegalArgumentException parseClasses configElement
Check if the receiver is enabled for the given selection param selection return code true code if the given selection matches the conditions specified in code I Confirguration Element code public boolean is Enabled For Selection I Selection selection Optimize it if mode UNKNOWN return false Handle undefined selections if selection null selection Structured Selection EMPTY According to the dictionary a selection is one that is selected or a collection of selected things In reflection of this we deal with one or a collection special case structured selections if selection instanceof I Structured Selection return is Enabled For I Structured Selection selection special case text selections Code should read if selection instanceof I Text Selection int count I Text Selection selection get Length return is Enabled For selection count use Java reflection to avoid dependence of org eclipse jface text which is in an optional part of the generic workbench Class tsel Class get Text Selection Class if tsel Class null tsel Class is Instance selection try Method m tsel Class get Declared Method get Length new Class 0 NON NLS 1 Object r m invoke selection new Object 0 if r instanceof Integer return is Enabled For selection Integer r int Value else should not happen but enable if it does return true catch No Such Method Exception e should not happen fall through if it does catch Illegal Access Exception e should not happen fall through if it does catch Invocation Target Exception e should not happen fall through if it does all other cases return is Enabled For selection  IConfirgurationElement isEnabledForSelection ISelection StructuredSelection IStructuredSelection isEnabledFor IStructuredSelection ITextSelection ITextSelection getLength isEnabledFor tselClass getTextSelectionClass tselClass tselClass isInstance tselClass getDeclaredMethod getLength isEnabledFor intValue NoSuchMethodException IllegalAccessException InvocationTargetException isEnabledFor
Compare selection count with requirements private boolean verify Selection Count int count if count 0 mode NONE return false if count 0 mode ONE OR MORE return false if count 1 mode NONE OR ONE return false if count 2 mode MULTIPLE return false if mode 0 count mode return false return true  verifySelectionCount ONE_OR_MORE NONE_OR_ONE
Returns true if given structured selection matches the conditions specified in the registry for this action private boolean is Enabled For I Selection sel Object obj sel int count sel is Empty 0 1 if verify Selection Count count false return false Compare selection to enablement expression if enablement Expression null return enablement Expression is Enabled For obj Compare selection to class requirements if classes is Empty return true if obj instanceof I Adaptable I Adaptable element I Adaptable obj if verify Element element false return false else return false return true  isEnabledFor ISelection isEmpty verifySelectionCount enablementExpression enablementExpression isEnabledFor isEmpty IAdaptable IAdaptable IAdaptable verifyElement
Returns true if given text selection matches the conditions specified in the registry for this action private boolean is Enabled For I Selection sel int count if verify Selection Count count false return false Compare selection to enablement expression if enablement Expression null return enablement Expression is Enabled For sel Compare selection to class requirements if classes is Empty return true for int i 0 i classes size i Selection Class sc Selection Class classes get i if verify Class sel sc class Name return true return false  isEnabledFor ISelection verifySelectionCount enablementExpression enablementExpression isEnabledFor isEmpty SelectionClass SelectionClass verifyClass className
Returns true if given structured selection matches the conditions specified in the registry for this action private boolean is Enabled For I Structured Selection ssel int count ssel size if verify Selection Count count false return false Compare selection to enablement expression if enablement Expression null return enablement Expression is Enabled For ssel Compare selection to class requirements if classes is Empty return true for Iterator elements ssel iterator elements has Next Object obj elements next if obj instanceof I Adaptable I Adaptable element I Adaptable obj if verify Element element false return false else return false return true  isEnabledFor IStructuredSelection verifySelectionCount enablementExpression enablementExpression isEnabledFor isEmpty hasNext IAdaptable IAdaptable IAdaptable verifyElement
Parses registry element to extract mode and selection elements that will be used for verification private void parse Classes I Configuration Element config Get enables for String enables For config get Attribute Plugin Action Builder ATT ENABLES FOR if enables For null enables For NON NLS 1 if enables For equals NON NLS 1 mode ANY NUMBER else if enables For equals NON NLS 1 mode NONE OR ONE else if enables For equals NON NLS 1 mode NONE else if enables For equals NON NLS 1 mode ONE OR MORE else if enables For equals multiple NON NLS 1 enables For equals 2 NON NLS 1 mode MULTIPLE else try mode Integer parse Int enables For catch Number Format Exception e mode UNKNOWN Get enablement block I Configuration Element children config get Children Plugin Action Builder TAG ENABLEMENT if children length 0 enablement Expression new Action Expression children 0 return Get selection block children config get Children Plugin Action Builder TAG SELECTION if children length 0 classes new Array List for int i 0 i children length i I Configuration Element sel children i String cname sel get Attribute ATT CLASS String name sel get Attribute ATT NAME Selection Class sclass new Selection Class sclass class Name cname sclass name Filter name classes add sclass  parseClasses IConfigurationElement enablesFor getAttribute PluginActionBuilder ATT_ENABLES_FOR enablesFor enablesFor enablesFor ANY_NUMBER enablesFor NONE_OR_ONE enablesFor enablesFor ONE_OR_MORE enablesFor enablesFor parseInt enablesFor NumberFormatException IConfigurationElement getChildren PluginActionBuilder TAG_ENABLEMENT enablementExpression ActionExpression getChildren PluginActionBuilder TAG_SELECTION ArrayList IConfigurationElement getAttribute ATT_CLASS getAttribute ATT_NAME SelectionClass SelectionClass className nameFilter
Verifies if the element is an instance of a class with a given class name If direct match fails implementing interfaces will be tested then recursively all superclasses and their interfaces private boolean verify Class Object element String class Name Class eclass element get Class Class clazz eclass boolean match false while clazz null test the class itself if clazz get Name equals class Name match true break test all the interfaces it implements Class interfaces clazz get Interfaces for int i 0 i interfaces length i if interfaces i get Name equals class Name match true break if match true break get the superclass clazz clazz get Superclass return match  verifyClass className getClass getName className getInterfaces getName className getSuperclass
Verifies if the given element matches one of the selection requirements Element must at least pass the type test and optionally wildcard name match private boolean verify Element I Adaptable element if classes is Empty return true for int i 0 i classes size i Selection Class sc Selection Class classes get i if verify Class element sc class Name false continue if sc name Filter null return true I Workbench Adapter de I Workbench Adapter element get Adapter I Workbench Adapter class if de null verify Name Match de get Label element sc name Filter return true return false  verifyElement IAdaptable isEmpty SelectionClass SelectionClass verifyClass className nameFilter IWorkbenchAdapter IWorkbenchAdapter getAdapter IWorkbenchAdapter verifyNameMatch getLabel nameFilter
Verifies that the given name matches the given wildcard filter Returns true if it does param name param filter return code true code if there is a match public static boolean verify Name Match String name String filter return Simple Wildcard Tester test Wildcard Ignore Case filter name  verifyNameMatch SimpleWildcardTester testWildcardIgnoreCase

Construct a new Sub Action Bars object public Sub Action Bars I Action Bars parent this parent parent  SubActionBars SubActionBars IActionBars
Activate the contributions public void activate activate true 
Activate the contributions p Workaround for toolbar layout flashing when editors contribute large amounts of items In this case we want to force the items to be visible hidden only when required otherwise just change the enablement state p public void activate boolean force Visibility set Active true  forceVisibility setActive
Adds a property change listener Has no effect if an identical listener is already registered param listener a property change listener public void add Property Change Listener I Property Change Listener listener property Change Listeners add listener  addPropertyChangeListener IPropertyChangeListener propertyChangeListeners
Clear the global action handlers public void clear Global Action Handlers if action Handlers null action Handlers clear action Handlers Changed true  clearGlobalActionHandlers actionHandlers actionHandlers actionHandlersChanged
Returns a new sub menu manager param parent the parent menu manager return the menu manager protected Sub Menu Manager create Sub Menu Manager I Menu Manager parent return new Sub Menu Manager parent  SubMenuManager createSubMenuManager IMenuManager SubMenuManager
Returns a new sub toolbar manager param parent the parent toolbar manager return the tool bar manager protected Sub Tool Bar Manager create Sub Tool Bar Manager I Tool Bar Manager parent return new Sub Tool Bar Manager parent  SubToolBarManager createSubToolBarManager IToolBarManager SubToolBarManager
Deactivate the contributions public void deactivate deactivate true 
Deactivate the contributions p Workaround for menubar toolbar layout flashing when editors have many contributions In this case we want to force the contributions to be visible hidden only when required otherwise just change the enablement state p public void deactivate boolean force Hide set Active false  forceHide setActive
Dispose the contributions public void dispose if action Handlers null action Handlers clear if menu Mgr null menu Mgr dispose menu Mgr dispose Manager if status Line Mgr null status Line Mgr dispose Manager if tool Bar Mgr null tool Bar Mgr dispose Manager property Change Listeners clear  actionHandlers actionHandlers menuMgr menuMgr menuMgr disposeManager statusLineMgr statusLineMgr disposeManager toolBarMgr toolBarMgr disposeManager propertyChangeListeners
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 listeners property Change Listeners get Listeners for int i 0 i listeners length i I Property Change Listener listeners i property Change event  IPropertyChangeListener propertyChange firePropertyChange PropertyChangeEvent propertyChangeListeners getListeners IPropertyChangeListener propertyChange
Notifies any property change listeners if the global action handlers have changed protected void fire Action Handlers Changed if action Handlers Changed Doesn t actually pass the old and new values fire Property Change new Property Change Event this P ACTION HANDLERS null null action Handlers Changed false  fireActionHandlersChanged actionHandlersChanged firePropertyChange PropertyChangeEvent P_ACTION_HANDLERS actionHandlersChanged
Return whether the manager is currently active or not protected final boolean get Active return active  getActive
Get the handler for a window action param actionID an action ID declared in the registry return an action handler which implements the action ID or code null code if none is registered public I Action get Global Action Handler String actionID if action Handlers null return null return I Action action Handlers get actionID  IAction getGlobalActionHandler actionHandlers IAction actionHandlers
Returns the complete list of active global action handlers If there are no global action handlers registered return null public Map get Global Action Handlers return action Handlers  getGlobalActionHandlers actionHandlers
Returns the abstract menu manager If items are added or removed from the manager be sure to call code update Action Bars code return the menu manager public I Menu Manager get Menu Manager if menu Mgr null menu Mgr create Sub Menu Manager parent get Menu Manager menu Mgr set Visible active return menu Mgr  updateActionBars IMenuManager getMenuManager menuMgr menuMgr createSubMenuManager getMenuManager menuMgr setVisible menuMgr
Return the parent action bar manager protected final I Action Bars get Parent return parent  IActionBars getParent
Returns the status line manager If items are added or removed from the manager be sure to call code update Action Bars code return the status line manager public I Status Line Manager get Status Line Manager if status Line Mgr null status Line Mgr new Sub Status Line Manager parent get Status Line Manager status Line Mgr set Visible active return status Line Mgr  updateActionBars IStatusLineManager getStatusLineManager statusLineMgr statusLineMgr SubStatusLineManager getStatusLineManager statusLineMgr setVisible statusLineMgr
Returns the tool bar manager If items are added or removed from the manager be sure to call code update Action Bars code return the tool bar manager public I Tool Bar Manager get Tool Bar Manager if tool Bar Mgr null tool Bar Mgr create Sub Tool Bar Manager parent get Tool Bar Manager tool Bar Mgr set Visible active return tool Bar Mgr  updateActionBars IToolBarManager getToolBarManager toolBarMgr toolBarMgr createSubToolBarManager getToolBarManager toolBarMgr setVisible toolBarMgr
Return whether the sub menu manager has been created yet protected final boolean is Sub Menu Manager Created return menu Mgr null  isSubMenuManagerCreated menuMgr
Return whether the sub toolbar manager has been created yet protected final boolean is Sub Tool Bar Manager Created return tool Bar Mgr null  isSubToolBarManagerCreated toolBarMgr
Return whether the sub status line manager has been created yet protected final boolean is Sub Status Line Manager Created return status Line Mgr null  isSubStatusLineManagerCreated statusLineMgr
Notification that the target part for the action bars has changed public void part Changed I Workbench Part part  partChanged IWorkbenchPart
Removes the given property change listener Has no effect if an identical listener is not registered param listener a property change listener public void remove Property Change Listener I Property Change Listener listener property Change Listeners remove listener  removePropertyChangeListener IPropertyChangeListener propertyChangeListeners
Sets the active flag Clients should not call this method directly unless they are overriding the set Active method protected final void basic Set Active boolean active this active active  setActive basicSetActive
Activate deactivate the contributions protected void set Active boolean set active set if menu Mgr null menu Mgr set Visible set if status Line Mgr null status Line Mgr set Visible set if tool Bar Mgr null tool Bar Mgr set Visible set  setActive menuMgr menuMgr setVisible statusLineMgr statusLineMgr setVisible toolBarMgr toolBarMgr setVisible
Add a handler for a window action param actionID an action ID declared in the registry param handler an action which implements the action ID code null code may be passed to deregister a handler public void set Global Action Handler String actionID I Action handler if handler null if action Handlers null action Handlers new Hash Map 11 action Handlers put actionID handler else if action Handlers null action Handlers remove actionID action Handlers Changed true  setGlobalActionHandler IAction actionHandlers actionHandlers HashMap actionHandlers actionHandlers actionHandlers actionHandlersChanged
Commits all UI changes This should be called after additions or subtractions have been made to a menu status line or toolbar public void update Action Bars parent update Action Bars fire Action Handlers Changed  updateActionBars updateActionBars fireActionHandlersChanged

Constucts a sub action bars object using an I Action Bars2 parent param parent the action bars to vitualize public Sub Action Bars2 I Action Bars2 parent super parent  IActionBars2 SubActionBars2 IActionBars2
Returns the casted parent of the sub action bars This method can return an I Action Bars2 since it can only accept I Action Bars2 in the constructor return the casted parent protected I Action Bars2 get Casted Parent return I Action Bars2 get Parent  IActionBars2 IActionBars2 IActionBars2 getCastedParent IActionBars2 getParent
Returns a new sub coolbar manager param parent the parent coolbar manager return the cool bar manager protected Sub Cool Bar Manager create Sub Cool Bar Manager I Cool Bar Manager parent return new Sub Cool Bar Manager parent  SubCoolBarManager createSubCoolBarManager ICoolBarManager SubCoolBarManager
public I Cool Bar Manager get Cool Bar Manager if cool Bar Mgr null cool Bar Mgr create Sub Cool Bar Manager get Casted Parent get Cool Bar Manager cool Bar Mgr set Visible get Active return cool Bar Mgr  ICoolBarManager getCoolBarManager coolBarMgr coolBarMgr createSubCoolBarManager getCastedParent getCoolBarManager coolBarMgr setVisible getActive coolBarMgr
protected void set Active boolean value super set Active value if cool Bar Mgr null cool Bar Mgr set Visible value  setActive setActive coolBarMgr coolBarMgr setVisible
public void dispose super dispose if cool Bar Mgr null cool Bar Mgr remove All  coolBarMgr coolBarMgr removeAll

public interface I Test Harness Runs the tests public void run Tests  ITestHarness runTests

Returns the test harness or code null code if it has not yet been set return the test harness or code null code public I Test Harness get Test Harness return test Harness  ITestHarness getTestHarness testHarness
Sets the test harness param test Harness the test harness public void set Test Harness I Test Harness test Harness Assert is Not Null test Harness this test Harness test Harness  testHarness setTestHarness ITestHarness testHarness isNotNull testHarness testHarness testHarness
Runs the given test runnable The default implementation simply invokes code run code on the given test runnable Subclasses may extend param test Runnable the test runnable to run public void run Test Runnable test Runnable test Runnable run  testRunnable runTest testRunnable testRunnable
Notification from the test harness that it is starting to run the tests The default implementation does nothing Subclasses may override public void testing Starting do nothing  testingStarting
Notification from the test harness that it has finished running the tests The default implementation does nothing Subclasses may override public void testing Finished do nothing  testingFinished

private class Goto Marker Adapter implements I Goto Marker public void goto Marker I Marker marker Abstract Decorated Text Editor this goto Marker marker  GotoMarkerAdapter IGotoMarker gotoMarker IMarker AbstractDecoratedTextEditor gotoMarker
Creates a new text editor public Abstract Decorated Text Editor super f Annotation Preferences new Marker Annotation Preferences set Range Indicator new Default Range Indicator initialize Key Binding Scopes initialize Editor  AbstractDecoratedTextEditor fAnnotationPreferences MarkerAnnotationPreferences setRangeIndicator DefaultRangeIndicator initializeKeyBindingScopes initializeEditor
Initializes this editor Subclasses may re implement If sub classes do not change the contract this method should not be extended i e do not call code super initialize Editor code in order to avoid the temporary creation of objects that are immediately overwritten by subclasses protected void initialize Editor set Preference Store Editors Plugin get Default get Preference Store  initializeEditor initializeEditor setPreferenceStore EditorsPlugin getDefault getPreferenceStore
Initializes the key binding scopes of this editor protected void initialize Key Binding Scopes set Key Binding Scopes new String org eclipse ui text Editor Scope NON NLS 1  initializeKeyBindingScopes setKeyBindingScopes textEditorScope
public void dispose if f Source Viewer Decoration Support null f Source Viewer Decoration Support dispose f Source Viewer Decoration Support null f Annotation Access null f Annotation Preferences null f Annotation Ruler Column null super dispose  fSourceViewerDecorationSupport fSourceViewerDecorationSupport fSourceViewerDecorationSupport fAnnotationAccess fAnnotationPreferences fAnnotationRulerColumn
protected I Source Viewer create Source Viewer Composite parent I Vertical Ruler ruler int styles f Annotation Access create Annotation Access f Overview Ruler create Overview Ruler get Shared Colors I Source Viewer viewer new Source Viewer parent ruler get Overview Ruler is Overview Ruler Visible styles ensure decoration support has been created and configured get Source Viewer Decoration Support viewer return viewer  ISourceViewer createSourceViewer IVerticalRuler fAnnotationAccess createAnnotationAccess fOverviewRuler createOverviewRuler getSharedColors ISourceViewer SourceViewer getOverviewRuler isOverviewRulerVisible getSourceViewerDecorationSupport
protected I Shared Text Colors get Shared Colors I Shared Text Colors shared Colors Editors Plugin get Default get Shared Text Colors return shared Colors  ISharedTextColors getSharedColors ISharedTextColors sharedColors EditorsPlugin getDefault getSharedTextColors sharedColors
protected I Overview Ruler create Overview Ruler I Shared Text Colors shared Colors I Overview Ruler ruler new Overview Ruler get Annotation Access VERTICAL RULER WIDTH shared Colors Iterator e f Annotation Preferences get Annotation Preferences iterator while e has Next Annotation Preference preference Annotation Preference e next if preference contributes To Header ruler add Header Annotation Type preference get Annotation Type return ruler  IOverviewRuler createOverviewRuler ISharedTextColors sharedColors IOverviewRuler OverviewRuler getAnnotationAccess VERTICAL_RULER_WIDTH sharedColors fAnnotationPreferences getAnnotationPreferences hasNext AnnotationPreference AnnotationPreference contributesToHeader addHeaderAnnotationType getAnnotationType
Creates the annotation access for this editor return the created annotation access protected I Annotation Access create Annotation Access return new Default Marker Annotation Access  IAnnotationAccess createAnnotationAccess DefaultMarkerAnnotationAccess
Configures the decoration support for this editor s source viewer Subclasses may override this method but should call their superclass implementation at some point param support the decoration support to configure protected void configure Source Viewer Decoration Support Source Viewer Decoration Support support Iterator e f Annotation Preferences get Annotation Preferences iterator while e has Next support set Annotation Preference Annotation Preference e next support set Cursor Line Painter Preference Keys CURRENT LINE CURRENT LINE COLOR support set Margin Painter Preference Keys PRINT MARGIN PRINT MARGIN COLOR PRINT MARGIN COLUMN support set Symbolic Font Name get Font Property Preference Key  configureSourceViewerDecorationSupport SourceViewerDecorationSupport fAnnotationPreferences getAnnotationPreferences hasNext setAnnotationPreference AnnotationPreference setCursorLinePainterPreferenceKeys CURRENT_LINE CURRENT_LINE_COLOR setMarginPainterPreferenceKeys PRINT_MARGIN PRINT_MARGIN_COLOR PRINT_MARGIN_COLUMN setSymbolicFontName getFontPropertyPreferenceKey
public void create Part Control Composite parent super create Part Control parent if f Source Viewer Decoration Support null f Source Viewer Decoration Support install get Preference Store if is Pref Quick Diff Always On show Change Information true  createPartControl createPartControl fSourceViewerDecorationSupport fSourceViewerDecorationSupport getPreferenceStore isPrefQuickDiffAlwaysOn showChangeInformation
Tells whether the overview ruler is visible return whether the overview ruler is visible protected boolean is Overview Ruler Visible I Preference Store store get Preference Store return store null store get Boolean OVERVIEW RULER false  isOverviewRulerVisible IPreferenceStore getPreferenceStore getBoolean OVERVIEW_RULER
public void show Change Information boolean show if show f Is Change Information Shown return if f Is Change Information Shown uninstall Change Ruler Model show Change Ruler false hide change ruler if its displayed if the line number ruler is showing only the colors get removed by de installing the model else ensure Change Info Can Be Displayed install Change Ruler Model if get Change Column null get Change Column get Model null f Is Change Information Shown true else f Is Change Information Shown false  showChangeInformation fIsChangeInformationShown fIsChangeInformationShown uninstallChangeRulerModel showChangeRuler ensureChangeInfoCanBeDisplayed installChangeRulerModel getChangeColumn getChangeColumn getModel fIsChangeInformationShown fIsChangeInformationShown
Installs the differ annotation model with the current quick diff display private void install Change Ruler Model I Change Ruler Column column get Change Column if column null column set Model get Or Create Differ I Overview Ruler ruler get Overview Ruler if ruler null ruler add Annotation Type org eclipse ui workbench texteditor quickdiff Change NON NLS 1 ruler add Annotation Type org eclipse ui workbench texteditor quickdiff Addition NON NLS 1 ruler add Annotation Type org eclipse ui workbench texteditor quickdiff Deletion NON NLS 1 ruler update  installChangeRulerModel IChangeRulerColumn getChangeColumn setModel getOrCreateDiffer IOverviewRuler getOverviewRuler addAnnotationType quickdiffChange addAnnotationType quickdiffAddition addAnnotationType quickdiffDeletion
Uninstalls the differ annotation model from the current quick diff display private void uninstall Change Ruler Model I Change Ruler Column column get Change Column if column null column set Model null I Overview Ruler ruler get Overview Ruler if ruler null ruler remove Annotation Type org eclipse ui workbench texteditor quickdiff Change NON NLS 1 ruler remove Annotation Type org eclipse ui workbench texteditor quickdiff Addition NON NLS 1 ruler remove Annotation Type org eclipse ui workbench texteditor quickdiff Deletion NON NLS 1 ruler update I Annotation Model model get Differ if model instanceof Document Line Differ Document Line Differ model suspend  uninstallChangeRulerModel IChangeRulerColumn getChangeColumn setModel IOverviewRuler getOverviewRuler removeAnnotationType quickdiffChange removeAnnotationType quickdiffAddition removeAnnotationType quickdiffDeletion IAnnotationModel getDiffer DocumentLineDiffer DocumentLineDiffer
Ensures that either the line number display is a code Line Number Change Ruler code or a separate change ruler gets displayed private void ensure Change Info Can Be Displayed if is Line Number Ruler Visible if f Line Number Ruler Column instanceof I Change Ruler Column hide Line Number Ruler HACK set state already so a change ruler is created Not needed once always a change line number bar gets installed f Is Change Information Shown true show Line Number Ruler else show Change Ruler true  LineNumberChangeRuler ensureChangeInfoCanBeDisplayed isLineNumberRulerVisible fLineNumberRulerColumn IChangeRulerColumn hideLineNumberRuler fIsChangeInformationShown showLineNumberRuler showChangeRuler
see org eclipse ui texteditor I Text Editor Extension3 is Change Information Showing public boolean is Change Information Showing return f Is Change Information Shown  ITextEditorExtension3 isChangeInformationShowing isChangeInformationShowing fIsChangeInformationShown
Extracts the line differ from the displayed document s annotation model If none can be found a new differ is created and attached to the annotation model return the line differ or code null code if none could be found or created private I Annotation Model get Or Create Differ I Annotation Model differ get Differ create diff model if it doesn t if differ null I Preference Store store get Preference Store if store null String default Id store get String Abstract Decorated Text Editor Preference Constants QUICK DIFF DEFAULT PROVIDER differ new Quick Diff create Quick Diff Annotation Model this default Id if differ null I Source Viewer viewer get Source Viewer if viewer null return null I Annotation Model m viewer get Annotation Model I Annotation Model Extension model if m instanceof I Annotation Model Extension model I Annotation Model Extension m else return null model add Annotation Model I Change Ruler Column QUICK DIFF MODEL ID differ else if differ instanceof Document Line Differ f Is Change Information Shown Document Line Differ differ resume return differ  IAnnotationModel getOrCreateDiffer IAnnotationModel getDiffer IPreferenceStore getPreferenceStore defaultId getString AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_DEFAULT_PROVIDER QuickDiff createQuickDiffAnnotationModel defaultId ISourceViewer getSourceViewer IAnnotationModel getAnnotationModel IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension addAnnotationModel IChangeRulerColumn QUICK_DIFF_MODEL_ID DocumentLineDiffer fIsChangeInformationShown DocumentLineDiffer
Extracts the line differ from the displayed document s annotation model If none can be found code null code is returned return the line differ or code null code if none could be found private I Annotation Model get Differ get annotation model extension I Source Viewer viewer get Source Viewer if viewer null return null I Annotation Model m viewer get Annotation Model I Annotation Model Extension model if m instanceof I Annotation Model Extension model I Annotation Model Extension m else return null get diff model if it exists already return model get Annotation Model I Change Ruler Column QUICK DIFF MODEL ID  IAnnotationModel getDiffer ISourceViewer getSourceViewer IAnnotationModel getAnnotationModel IAnnotationModelExtension IAnnotationModelExtension IAnnotationModelExtension getAnnotationModel IChangeRulerColumn QUICK_DIFF_MODEL_ID
Returns the code I Change Ruler Column code of this editor or code null code if there is none Either the line number bar or a separate change ruler column can be returned return an instance of code I Change Ruler Column code or code null code private I Change Ruler Column get Change Column if f Change Ruler Column null return f Change Ruler Column else if f Line Number Ruler Column instanceof I Change Ruler Column return I Change Ruler Column f Line Number Ruler Column else return null  IChangeRulerColumn IChangeRulerColumn IChangeRulerColumn getChangeColumn fChangeRulerColumn fChangeRulerColumn fLineNumberRulerColumn IChangeRulerColumn IChangeRulerColumn fLineNumberRulerColumn
Sets the display state of the separate change ruler column not the quick diff display on the line number ruler column to code show code param show code true code if the change ruler column should be shown code false code if it should be hidden private void show Change Ruler boolean show I Vertical Ruler v get Vertical Ruler if v instanceof Composite Ruler Composite Ruler c Composite Ruler v if show f Change Ruler Column null c add Decorator 1 create Change Ruler Column else if show f Change Ruler Column null c remove Decorator f Change Ruler Column f Change Ruler Column null  showChangeRuler IVerticalRuler getVerticalRuler CompositeRuler CompositeRuler CompositeRuler fChangeRulerColumn addDecorator createChangeRulerColumn fChangeRulerColumn removeDecorator fChangeRulerColumn fChangeRulerColumn
Shows the line number ruler column private void show Line Number Ruler show Change Ruler false if f Line Number Ruler Column null I Vertical Ruler v get Vertical Ruler if v instanceof Composite Ruler Composite Ruler c Composite Ruler v c add Decorator 1 create Line Number Ruler Column  showLineNumberRuler showChangeRuler fLineNumberRulerColumn IVerticalRuler getVerticalRuler CompositeRuler CompositeRuler CompositeRuler addDecorator createLineNumberRulerColumn
Hides the line number ruler column private void hide Line Number Ruler if f Line Number Ruler Column null I Vertical Ruler v get Vertical Ruler if v instanceof Composite Ruler Composite Ruler c Composite Ruler v c remove Decorator f Line Number Ruler Column f Line Number Ruler Column null if f Is Change Information Shown show Change Ruler true  hideLineNumberRuler fLineNumberRulerColumn IVerticalRuler getVerticalRuler CompositeRuler CompositeRuler CompositeRuler removeDecorator fLineNumberRulerColumn fLineNumberRulerColumn fIsChangeInformationShown showChangeRuler
Returns whether the line number ruler column should be visible according to the preference store settings Subclasses may override this method to provide a custom preference setting return code true code if the line numbers should be visible protected boolean is Line Number Ruler Visible I Preference Store store get Preference Store return store null store get Boolean LINE NUMBER RULER false  isLineNumberRulerVisible IPreferenceStore getPreferenceStore getBoolean LINE_NUMBER_RULER
Returns whether quick diff info should be visible upon opening an editor according to the preference store settings return code true code if the line numbers should be visible protected boolean is Pref Quick Diff Always On I Preference Store store get Preference Store return store null store get Boolean Abstract Decorated Text Editor Preference Constants QUICK DIFF ALWAYS ON false  isPrefQuickDiffAlwaysOn IPreferenceStore getPreferenceStore getBoolean AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_ALWAYS_ON
Initializes the given line number ruler column from the preference store param ruler Column the ruler column to be initialized protected void initialize Line Number Ruler Column Line Number Ruler Column ruler Column I Shared Text Colors shared Colors get Shared Colors I Preference Store store get Preference Store if store null RGB rgb null foreground color if store contains LINE NUMBER COLOR if store is Default LINE NUMBER COLOR rgb Preference Converter get Default Color store LINE NUMBER COLOR else rgb Preference Converter get Color store LINE NUMBER COLOR if rgb null rgb new RGB 0 0 0 ruler Column set Foreground shared Colors get Color rgb rgb null background color same as editor or system default if store get Boolean PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT if store contains PREFERENCE COLOR BACKGROUND if store is Default PREFERENCE COLOR BACKGROUND rgb Preference Converter get Default Color store PREFERENCE COLOR BACKGROUND else rgb Preference Converter get Color store PREFERENCE COLOR BACKGROUND ruler Column set Background shared Colors get Color rgb ruler Column redraw  rulerColumn initializeLineNumberRulerColumn LineNumberRulerColumn rulerColumn ISharedTextColors sharedColors getSharedColors IPreferenceStore getPreferenceStore LINE_NUMBER_COLOR isDefault LINE_NUMBER_COLOR PreferenceConverter getDefaultColor LINE_NUMBER_COLOR PreferenceConverter getColor LINE_NUMBER_COLOR rulerColumn setForeground sharedColors getColor getBoolean PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT PREFERENCE_COLOR_BACKGROUND isDefault PREFERENCE_COLOR_BACKGROUND PreferenceConverter getDefaultColor PREFERENCE_COLOR_BACKGROUND PreferenceConverter getColor PREFERENCE_COLOR_BACKGROUND rulerColumn setBackground sharedColors getColor rulerColumn
Initializes the given change ruler column from the preference store param change Column the ruler column to be initialized private void initialize Change Ruler Column I Change Ruler Column change Column I Shared Text Colors shared Colors get Shared Colors I Preference Store store get Preference Store if store null I Source Viewer v get Source Viewer if v null v get Annotation Model null change Column set Model v get Annotation Model Iterator iter f Annotation Preferences get Annotation Preferences iterator while iter has Next Annotation Preference pref Annotation Preference iter next if org eclipse ui workbench texteditor quickdiff Change equals pref get Annotation Type NON NLS 1 RGB rgb get Color Preference store pref change Column set Changed Color shared Colors get Color rgb else if org eclipse ui workbench texteditor quickdiff Addition equals pref get Annotation Type NON NLS 1 RGB rgb get Color Preference store pref change Column set Added Color shared Colors get Color rgb else if org eclipse ui workbench texteditor quickdiff Deletion equals pref get Annotation Type NON NLS 1 RGB rgb get Color Preference store pref change Column set Deleted Color shared Colors get Color rgb RGB rgb null background color same as editor or system default if store get Boolean PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT if store contains PREFERENCE COLOR BACKGROUND if store is Default PREFERENCE COLOR BACKGROUND rgb Preference Converter get Default Color store PREFERENCE COLOR BACKGROUND else rgb Preference Converter get Color store PREFERENCE COLOR BACKGROUND change Column set Background shared Colors get Color rgb if change Column instanceof Line Number Change Ruler Column Line Number Change Ruler Column lncrc Line Number Change Ruler Column change Column lncrc set Display Mode store get Boolean Abstract Decorated Text Editor Preference Constants QUICK DIFF CHARACTER MODE change Column redraw  changeColumn initializeChangeRulerColumn IChangeRulerColumn changeColumn ISharedTextColors sharedColors getSharedColors IPreferenceStore getPreferenceStore ISourceViewer getSourceViewer getAnnotationModel changeColumn setModel getAnnotationModel fAnnotationPreferences getAnnotationPreferences hasNext AnnotationPreference AnnotationPreference quickdiffChange getAnnotationType getColorPreference changeColumn setChangedColor sharedColors getColor quickdiffAddition getAnnotationType getColorPreference changeColumn setAddedColor sharedColors getColor quickdiffDeletion getAnnotationType getColorPreference changeColumn setDeletedColor sharedColors getColor getBoolean PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT PREFERENCE_COLOR_BACKGROUND isDefault PREFERENCE_COLOR_BACKGROUND PreferenceConverter getDefaultColor PREFERENCE_COLOR_BACKGROUND PreferenceConverter getColor PREFERENCE_COLOR_BACKGROUND changeColumn setBackground sharedColors getColor changeColumn LineNumberChangeRulerColumn LineNumberChangeRulerColumn LineNumberChangeRulerColumn changeColumn setDisplayMode getBoolean AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_CHARACTER_MODE changeColumn
Extracts the color preference for the given preference from the given store If the given store indicates that the default value is to be used or the value stored in the preferences store is code null code the value is taken from the code Annotation Preference code s default color value p The return value is p param store the preference store param pref the annotation preference return the RGB color preference not code null code private RGB get Color Preference I Preference Store store Annotation Preference pref RGB rgb null if store contains pref get Color Preference Key if store is Default pref get Color Preference Key rgb pref get Color Preference Value else rgb Preference Converter get Color store pref get Color Preference Key if rgb null rgb pref get Color Preference Value return rgb  AnnotationPreference getColorPreference IPreferenceStore AnnotationPreference getColorPreferenceKey isDefault getColorPreferenceKey getColorPreferenceValue PreferenceConverter getColor getColorPreferenceKey getColorPreferenceValue
Creates a new line number ruler column that is appropriately initialized return the created line number column protected I Vertical Ruler Column create Line Number Ruler Column if is Pref Quick Diff Always On is Change Information Showing Line Number Change Ruler Column column new Line Number Change Ruler Column get Shared Colors column set Hover create Change Hover initialize Change Ruler Column column f Line Number Ruler Column column else f Line Number Ruler Column new Line Number Ruler Column initialize Line Number Ruler Column f Line Number Ruler Column return f Line Number Ruler Column  IVerticalRulerColumn createLineNumberRulerColumn isPrefQuickDiffAlwaysOn isChangeInformationShowing LineNumberChangeRulerColumn LineNumberChangeRulerColumn getSharedColors setHover createChangeHover initializeChangeRulerColumn fLineNumberRulerColumn fLineNumberRulerColumn LineNumberRulerColumn initializeLineNumberRulerColumn fLineNumberRulerColumn fLineNumberRulerColumn
Creates and returns a code Line Change Hover code to be used on this editor s change ruler column This default implementation returns a plain code Line Change Hover code Subclasses may override return the change hover to be used by this editors quick diff display protected Line Change Hover create Change Hover return new Text Change Hover  LineChangeHover LineChangeHover LineChangeHover createChangeHover TextChangeHover
Creates a new change ruler column for quick diff display independent of the line number ruler column return a new change ruler column protected I Change Ruler Column create Change Ruler Column I Change Ruler Column column new Change Ruler Column column set Hover create Change Hover f Change Ruler Column column initialize Change Ruler Column f Change Ruler Column return f Change Ruler Column  IChangeRulerColumn createChangeRulerColumn IChangeRulerColumn ChangeRulerColumn setHover createChangeHover fChangeRulerColumn initializeChangeRulerColumn fChangeRulerColumn fChangeRulerColumn
Returns link create Composite Ruler Subclasses should not override this method but rather code create Composite Ruler code if they want to contribute their own vertical ruler implementation If not an instance of link Composite Ruler is returned the built in ruler columns line numbers annotations will not work p May become code final code in the future p see Abstract Text Editor create Vertical Ruler protected I Vertical Ruler create Vertical Ruler Composite Ruler ruler create Composite Ruler I Preference Store store get Preference Store if ruler null store null for Iterator iter ruler get Decorator Iterator iter has Next I Vertical Ruler Column column I Vertical Ruler Column iter next if column instanceof Annotation Ruler Column f Annotation Ruler Column Annotation Ruler Column column for Iterator iter2 f Annotation Preferences get Annotation Preferences iterator iter2 has Next Annotation Preference preference Annotation Preference iter2 next String key preference get Vertical Ruler Preference Key boolean show Annotation true if key null store contains key show Annotation store get Boolean key if show Annotation f Annotation Ruler Column add Annotation Type preference get Annotation Type f Annotation Ruler Column add Annotation Type Annotation TYPE UNKNOWN break return ruler  createCompositeRuler createCompositeRuler CompositeRuler AbstractTextEditor createVerticalRuler IVerticalRuler createVerticalRuler CompositeRuler createCompositeRuler IPreferenceStore getPreferenceStore getDecoratorIterator hasNext IVerticalRulerColumn IVerticalRulerColumn AnnotationRulerColumn fAnnotationRulerColumn AnnotationRulerColumn fAnnotationPreferences getAnnotationPreferences hasNext AnnotationPreference AnnotationPreference getVerticalRulerPreferenceKey showAnnotation showAnnotation getBoolean showAnnotation fAnnotationRulerColumn addAnnotationType getAnnotationType fAnnotationRulerColumn addAnnotationType TYPE_UNKNOWN
Creates a composite ruler to be used as the vertical ruler by this editor Subclasses may re implement this method return the vertical ruler protected Composite Ruler create Composite Ruler Composite Ruler ruler new Composite Ruler ruler add Decorator 0 new Annotation Ruler Column VERTICAL RULER WIDTH get Annotation Access if is Line Number Ruler Visible ruler add Decorator 1 create Line Number Ruler Column else if is Pref Quick Diff Always On ruler add Decorator 1 create Change Ruler Column return ruler  CompositeRuler createCompositeRuler CompositeRuler CompositeRuler addDecorator AnnotationRulerColumn VERTICAL_RULER_WIDTH getAnnotationAccess isLineNumberRulerVisible addDecorator createLineNumberRulerColumn isPrefQuickDiffAlwaysOn addDecorator createChangeRulerColumn
protected void handle Preference Store Changed Property Change Event event try I Source Viewer source Viewer get Source Viewer if source Viewer null return String property event get Property if f Source Viewer Decoration Support null f Overview Ruler null OVERVIEW RULER equals property if is Overview Ruler Visible show Overview Ruler else hide Overview Ruler return if LINE NUMBER RULER equals property if is Line Number Ruler Visible show Line Number Ruler else hide Line Number Ruler return if Abstract Decorated Text Editor Preference Constants EDITOR TAB WIDTH equals property source Viewer get Text Widget set Tabs get Preference Store get Int Abstract Decorated Text Editor Preference Constants EDITOR TAB WIDTH return if f Line Number Ruler Column null LINE NUMBER COLOR equals property PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT equals property PREFERENCE COLOR BACKGROUND equals property initialize Line Number Ruler Column f Line Number Ruler Column if f Change Ruler Column null LINE NUMBER COLOR equals property PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT equals property PREFERENCE COLOR BACKGROUND equals property initialize Change Ruler Column f Change Ruler Column if f Line Number Ruler Column instanceof Line Number Change Ruler Column Abstract Decorated Text Editor Preference Constants QUICK DIFF CHARACTER MODE equals property initialize Change Ruler Column get Change Column Annotation Preference pref get Annotation Preference property if pref null I Change Ruler Column column get Change Column if column null Object type pref get Annotation Type if type instanceof String String annotation Type String type if annotation Type starts With org eclipse ui workbench texteditor quickdiff NON NLS 1 initialize Change Ruler Column column Annotation Preference annotation Preference get Vertical Ruler Annotation Preference property if annotation Preference null event get New Value instanceof Boolean Object type annotation Preference get Annotation Type if Boolean event get New Value boolean Value f Annotation Ruler Column add Annotation Type type else f Annotation Ruler Column remove Annotation Type type get Vertical Ruler update finally super handle Preference Store Changed event  handlePreferenceStoreChanged PropertyChangeEvent ISourceViewer sourceViewer getSourceViewer sourceViewer getProperty fSourceViewerDecorationSupport fOverviewRuler OVERVIEW_RULER isOverviewRulerVisible showOverviewRuler hideOverviewRuler LINE_NUMBER_RULER isLineNumberRulerVisible showLineNumberRuler hideLineNumberRuler AbstractDecoratedTextEditorPreferenceConstants EDITOR_TAB_WIDTH sourceViewer getTextWidget setTabs getPreferenceStore getInt AbstractDecoratedTextEditorPreferenceConstants EDITOR_TAB_WIDTH fLineNumberRulerColumn LINE_NUMBER_COLOR PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT PREFERENCE_COLOR_BACKGROUND initializeLineNumberRulerColumn fLineNumberRulerColumn fChangeRulerColumn LINE_NUMBER_COLOR PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT PREFERENCE_COLOR_BACKGROUND initializeChangeRulerColumn fChangeRulerColumn fLineNumberRulerColumn LineNumberChangeRulerColumn AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_CHARACTER_MODE initializeChangeRulerColumn getChangeColumn AnnotationPreference getAnnotationPreference IChangeRulerColumn getChangeColumn getAnnotationType annotationType annotationType startsWith initializeChangeRulerColumn AnnotationPreference annotationPreference getVerticalRulerAnnotationPreference annotationPreference getNewValue annotationPreference getAnnotationType getNewValue booleanValue fAnnotationRulerColumn addAnnotationType fAnnotationRulerColumn removeAnnotationType getVerticalRuler handlePreferenceStoreChanged
Returns the code Annotation Preference code corresponding to code color Key code param color Key the color key return the corresponding code Annotation Preference code private Annotation Preference get Annotation Preference String color Key for Iterator iter f Annotation Preferences get Annotation Preferences iterator iter has Next Annotation Preference pref Annotation Preference iter next if color Key equals pref get Color Preference Key return pref return null  AnnotationPreference colorKey colorKey AnnotationPreference AnnotationPreference getAnnotationPreference colorKey fAnnotationPreferences getAnnotationPreferences hasNext AnnotationPreference AnnotationPreference colorKey getColorPreferenceKey
Returns the annotation preference for which the given preference matches a vertical ruler preference key param preference Key the preference key string return the annotation preference or code null code if none private Annotation Preference get Vertical Ruler Annotation Preference String preference Key if preference Key null return null Iterator e f Annotation Preferences get Annotation Preferences iterator while e has Next Annotation Preference info Annotation Preference e next if info null preference Key equals info get Vertical Ruler Preference Key return info return null  preferenceKey AnnotationPreference getVerticalRulerAnnotationPreference preferenceKey preferenceKey fAnnotationPreferences getAnnotationPreferences hasNext AnnotationPreference AnnotationPreference preferenceKey getVerticalRulerPreferenceKey
Shows the overview ruler protected void show Overview Ruler if f Overview Ruler null if get Source Viewer instanceof I Source Viewer Extension I Source Viewer Extension get Source Viewer show Annotations Overview true f Source Viewer Decoration Support update Overview Decorations  showOverviewRuler fOverviewRuler getSourceViewer ISourceViewerExtension ISourceViewerExtension getSourceViewer showAnnotationsOverview fSourceViewerDecorationSupport updateOverviewDecorations
Hides the overview ruler protected void hide Overview Ruler if get Source Viewer instanceof I Source Viewer Extension f Source Viewer Decoration Support hide Annotation Overview I Source Viewer Extension get Source Viewer show Annotations Overview false  hideOverviewRuler getSourceViewer ISourceViewerExtension fSourceViewerDecorationSupport hideAnnotationOverview ISourceViewerExtension getSourceViewer showAnnotationsOverview
Returns the annotation access return the annotation access protected I Annotation Access get Annotation Access if f Annotation Access null f Annotation Access create Annotation Access return f Annotation Access  IAnnotationAccess getAnnotationAccess fAnnotationAccess fAnnotationAccess createAnnotationAccess fAnnotationAccess
Returns the annotation preference lookup return the annotation preference lookup protected Annotation Preference Lookup get Annotation Preference Lookup return Editors Plugin get Default get Annotation Preference Lookup  AnnotationPreferenceLookup getAnnotationPreferenceLookup EditorsPlugin getDefault getAnnotationPreferenceLookup
Returns the overview ruler return the overview ruler protected I Overview Ruler get Overview Ruler if f Overview Ruler null f Overview Ruler create Overview Ruler get Shared Colors return f Overview Ruler  IOverviewRuler getOverviewRuler fOverviewRuler fOverviewRuler createOverviewRuler getSharedColors fOverviewRuler
Returns the source viewer decoration support param viewer the viewer for which to return a decoration support return the source viewer decoration support protected Source Viewer Decoration Support get Source Viewer Decoration Support I Source Viewer viewer if f Source Viewer Decoration Support null f Source Viewer Decoration Support new Source Viewer Decoration Support viewer get Overview Ruler get Annotation Access get Shared Colors configure Source Viewer Decoration Support f Source Viewer Decoration Support return f Source Viewer Decoration Support  SourceViewerDecorationSupport getSourceViewerDecorationSupport ISourceViewer fSourceViewerDecorationSupport fSourceViewerDecorationSupport SourceViewerDecorationSupport getOverviewRuler getAnnotationAccess getSharedColors configureSourceViewerDecorationSupport fSourceViewerDecorationSupport fSourceViewerDecorationSupport
Returns the annotation preferences return the annotation preferences protected Marker Annotation Preferences get Annotation Preferences return f Annotation Preferences  MarkerAnnotationPreferences getAnnotationPreferences fAnnotationPreferences
If the editor can be saved all marker ranges have been changed according to the text manipulations However those changes are not yet propagated to the marker manager Thus when opening a marker the marker s position in the editor must be determined as it might differ from the position stated in the marker param marker the marker to go to deprecated visibility will be reduced use code get Adapter I Goto Marker class for accessing this method code public void goto Marker I Marker marker if get Source Viewer null return int start Marker Utilities get Char Start marker int end Marker Utilities get Char End marker if start 0 end 0 there is only a line number int line Marker Utilities get Line Number marker if line 1 marker line numbers are 1 based line try I Document document get Document Provider get Document get Editor Input select And Reveal document get Line Offset line document get Line Length line catch Bad Location Exception x marker refers to invalid text position do nothing else look up the current range of the marker when the document has been edited I Annotation Model model get Document Provider get Annotation Model get Editor Input if model instanceof Abstract Marker Annotation Model Abstract Marker Annotation Model marker Model Abstract Marker Annotation Model model Position pos marker Model get Marker Position marker if pos null pos is Deleted use position instead of marker values start pos get Offset end pos get Offset pos get Length if pos null pos is Deleted do nothing if position has been deleted return I Document document get Document Provider get Document get Editor Input int length document get Length if end 1 length start length select And Reveal start end start  getAdapter IGotoMarker gotoMarker IMarker getSourceViewer MarkerUtilities getCharStart MarkerUtilities getCharEnd MarkerUtilities getLineNumber IDocument getDocumentProvider getDocument getEditorInput selectAndReveal getLineOffset getLineLength BadLocationException IAnnotationModel getDocumentProvider getAnnotationModel getEditorInput AbstractMarkerAnnotationModel AbstractMarkerAnnotationModel markerModel AbstractMarkerAnnotationModel markerModel getMarkerPosition isDeleted getOffset getOffset getLength isDeleted IDocument getDocumentProvider getDocument getEditorInput getLength selectAndReveal
see org eclipse ui texteditor Status Text Editor is Error Status org eclipse core runtime I Status protected boolean is Error Status I Status status see bug 42230 return super is Error Status status status get Code I Resource Status READ ONLY LOCAL status get Severity I Status CANCEL  StatusTextEditor isErrorStatus IStatus isErrorStatus IStatus isErrorStatus getCode IResourceStatus READ_ONLY_LOCAL getSeverity IStatus
protected void create Actions super create Actions Resource Action action new Add Marker Action Text Editor Messages get Resource Bundle Editor Add Bookmark this I Marker BOOKMARK true NON NLS 1 action set Help Context Id I Text Editor Help Context Ids BOOKMARK ACTION action set Action Definition Id I Text Editor Action Definition Ids ADD BOOKMARK set Action IDE Action Factory BOOKMARK get Id action action new Add Task Action Text Editor Messages get Resource Bundle Editor Add Task this NON NLS 1 action set Help Context Id I Text Editor Help Context Ids ADD TASK ACTION action set Action Definition Id I Text Editor Action Definition Ids ADD TASK set Action IDE Action Factory ADD TASK get Id action  createActions createActions ResourceAction AddMarkerAction TextEditorMessages getResourceBundle AddBookmark IMarker setHelpContextId ITextEditorHelpContextIds BOOKMARK_ACTION setActionDefinitionId ITextEditorActionDefinitionIds ADD_BOOKMARK setAction IDEActionFactory getId AddTaskAction TextEditorMessages getResourceBundle AddTask setHelpContextId ITextEditorHelpContextIds ADD_TASK_ACTION setActionDefinitionId ITextEditorActionDefinitionIds ADD_TASK setAction IDEActionFactory ADD_TASK getId
public Object get Adapter Class adapter if I Goto Marker class equals adapter return f Goto Marker Adapter if I Annotation Access class equals adapter return get Annotation Access return super get Adapter adapter  getAdapter IGotoMarker fGotoMarkerAdapter IAnnotationAccess getAnnotationAccess getAdapter
protected void set Document Provider I Editor Input input f Implicit Document Provider Document Provider Registry get Default get Document Provider input I Document Provider provider super get Document Provider if provider instanceof Forwarding Document Provider Forwarding Document Provider forwarder Forwarding Document Provider provider forwarder set Parent Provider f Implicit Document Provider  setDocumentProvider IEditorInput fImplicitDocumentProvider DocumentProviderRegistry getDefault getDocumentProvider IDocumentProvider getDocumentProvider ForwardingDocumentProvider ForwardingDocumentProvider ForwardingDocumentProvider setParentProvider fImplicitDocumentProvider
public I Document Provider get Document Provider I Document Provider provider super get Document Provider if provider null return f Implicit Document Provider return provider  IDocumentProvider getDocumentProvider IDocumentProvider getDocumentProvider fImplicitDocumentProvider
see org eclipse ui texteditor Abstract Text Editor dispose Document Provider protected void dispose Document Provider super dispose Document Provider f Implicit Document Provider null  AbstractTextEditor disposeDocumentProvider disposeDocumentProvider disposeDocumentProvider fImplicitDocumentProvider
protected void do Set Input I Editor Input input throws Core Exception if f Is Change Information Shown if is Pref Quick Diff Always On only uninstall the model since we will reuse the change ruler uninstall Change Ruler Model f Is Change Information Shown false else show Change Information false super do Set Input input if is Pref Quick Diff Always On show Change Information true  doSetInput IEditorInput CoreException fIsChangeInformationShown isPrefQuickDiffAlwaysOn uninstallChangeRulerModel fIsChangeInformationShown showChangeInformation doSetInput isPrefQuickDiffAlwaysOn showChangeInformation

Prevent initialization private Abstract Decorated Text Editor Preference Constants  AbstractDecoratedTextEditorPreferenceConstants
Initializes the given preference store with the default values param store the preference store to be initialized public static void initialize Default Values I Preference Store store store set Default Abstract Decorated Text Editor Preference Constants USE ANNOTATIONS PREFERENCE PAGE false store set Default Abstract Decorated Text Editor Preference Constants USE QUICK DIFF PREFERENCE PAGE false store set Default Abstract Decorated Text Editor Preference Constants EDITOR CURRENT LINE true Preference Converter set Default store Abstract Decorated Text Editor Preference Constants EDITOR CURRENT LINE COLOR new RGB 232 242 254 store set Default Abstract Decorated Text Editor Preference Constants EDITOR TAB WIDTH 4 store set Default Abstract Decorated Text Editor Preference Constants EDITOR PRINT MARGIN false store set Default Abstract Decorated Text Editor Preference Constants EDITOR PRINT MARGIN COLUMN 80 Preference Converter set Default store Abstract Decorated Text Editor Preference Constants EDITOR PRINT MARGIN COLOR new RGB 176 180 185 store set Default Abstract Decorated Text Editor Preference Constants EDITOR LINE NUMBER RULER false Preference Converter set Default store Abstract Decorated Text Editor Preference Constants EDITOR LINE NUMBER RULER COLOR new RGB 0 0 0 if store get Boolean USE QUICK DIFF PREFERENCE PAGE store set Default Abstract Decorated Text Editor Preference Constants QUICK DIFF ALWAYS ON true store set Default Abstract Decorated Text Editor Preference Constants QUICK DIFF CHARACTER MODE false store set Default Abstract Decorated Text Editor Preference Constants QUICK DIFF DEFAULT PROVIDER org eclipse ui internal editors quickdiff Last Save Reference Provider NON NLS 1 store set Default Abstract Decorated Text Editor Preference Constants EDITOR OVERVIEW RULER true store set Default Abstract Decorated Text Editor Preference Constants EDITOR UNKNOWN INDICATION false store set Default Abstract Decorated Text Editor Preference Constants EDITOR UNKNOWN INDICATION IN OVERVIEW RULER false Preference Converter set Default store Abstract Decorated Text Editor Preference Constants EDITOR UNKNOWN INDICATION COLOR new RGB 0 0 0 store set Default Abstract Decorated Text Editor Preference Constants EDITOR USE CUSTOM CARETS false store set Default Abstract Decorated Text Editor Preference Constants EDITOR WIDE CARET true store set Default Abstract Decorated Text Editor Preference Constants EDITOR SELECTION FOREGROUND DEFAULT COLOR true store set Default Abstract Decorated Text Editor Preference Constants EDITOR SELECTION BACKGROUND DEFAULT COLOR true Marker Annotation Preferences initialize Default Values store  initializeDefaultValues IPreferenceStore setDefault AbstractDecoratedTextEditorPreferenceConstants USE_ANNOTATIONS_PREFERENCE_PAGE setDefault AbstractDecoratedTextEditorPreferenceConstants USE_QUICK_DIFF_PREFERENCE_PAGE setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_CURRENT_LINE PreferenceConverter setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_CURRENT_LINE_COLOR setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_TAB_WIDTH setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_PRINT_MARGIN setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_PRINT_MARGIN_COLUMN PreferenceConverter setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_PRINT_MARGIN_COLOR setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_LINE_NUMBER_RULER PreferenceConverter setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_LINE_NUMBER_RULER_COLOR getBoolean USE_QUICK_DIFF_PREFERENCE_PAGE setDefault AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_ALWAYS_ON setDefault AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_CHARACTER_MODE setDefault AbstractDecoratedTextEditorPreferenceConstants QUICK_DIFF_DEFAULT_PROVIDER LastSaveReferenceProvider setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_OVERVIEW_RULER setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_UNKNOWN_INDICATION setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_UNKNOWN_INDICATION_IN_OVERVIEW_RULER PreferenceConverter setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_UNKNOWN_INDICATION_COLOR setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_USE_CUSTOM_CARETS setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_WIDE_CARET setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_FOREGROUND_DEFAULT_COLOR setDefault AbstractDecoratedTextEditorPreferenceConstants EDITOR_SELECTION_BACKGROUND_DEFAULT_COLOR MarkerAnnotationPreferences initializeDefaultValues

The actual functionality of this operation param monitor a progress monitor to track execution throws Core Exception  CoreException
public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try execute monitor catch Core Exception x throw new Invocation Target Exception x  IProgressMonitor InvocationTargetException InterruptedException CoreException InvocationTargetException
Creates a new element info initialized with the given document and annotation model param document the document param model the annotation model public Element Info I Document document I Annotation Model model f Document document f Model model f Count 0 f Can Be Saved false f Is State Validated false  ElementInfo IDocument IAnnotationModel fDocument fModel fCount fCanBeSaved fIsStateValidated
An element info equals another object if this object is an element info and if the documents of the two element infos are equal see Object equals java lang Object public boolean equals Object o if o instanceof Element Info Element Info e Element Info o return f Document equals e f Document return false  ElementInfo ElementInfo ElementInfo fDocument fDocument
see Object hash Code public int hash Code return f Document hash Code  hashCode hashCode fDocument hashCode
public void document Changed Document Event event f Can Be Saved true remove Unchanged Element Listeners f Element this fire Element Dirty State Changed f Element f Can Be Saved  documentChanged DocumentEvent fCanBeSaved removeUnchangedElementListeners fElement fireElementDirtyStateChanged fElement fCanBeSaved
see I Document Listener document About To Be Changed Document Event public void document About To Be Changed Document Event event  IDocumentListener documentAboutToBeChanged DocumentEvent documentAboutToBeChanged DocumentEvent
Creates a new document provider protected Abstract Document Provider  AbstractDocumentProvider
Creates the document for the given element p Subclasses must implement this method p param element the element return the document exception Core Exception if the document could not be created  CoreException
Creates an annotation model for the given element p Subclasses must implement this method p param element the element return the annotation model exception Core Exception if the annotation model could not be created  CoreException
Performs the actual work of saving the given document provided for the given element p Subclasses must implement this method p param monitor a progress monitor to report progress and request cancellation param element the element param document the document param overwrite indicates whether an overwrite should happen if necessary exception Core Exception if document could not be stored to the given element  CoreException
Returns the runnable context for this document provider param monitor a progress monitor to track the operation return the runnable context for this document provider since 3 0 
Returns the scheduling rule required for executing code synchronize code on the given element This default implementation returns code null code param element the element return the scheduling rule for code synchronize code since 3 0 protected I Scheduling Rule get Synchronize Rule Object element return null  ISchedulingRule getSynchronizeRule
Returns the scheduling rule required for executing code validate State code on the given element This default implementation returns code null code param element the element return the scheduling rule for code validate State code since 3 0 protected I Scheduling Rule get Validate State Rule Object element return null  validateState validateState ISchedulingRule getValidateStateRule
Returns the scheduling rule required for executing code save code on the given element This default implementation returns code null code param element the element return the scheduling rule for code save code since 3 0 protected I Scheduling Rule get Save Rule Object element return null  ISchedulingRule getSaveRule
Returns the scheduling rule required for executing code reset code on the given element This default implementation returns code null code param element the element return the scheduling rule for code reset code since 3 0 protected I Scheduling Rule get Reset Rule Object element return null  ISchedulingRule getResetRule
Returns the element info object for the given element param element the element return the element info object or code null code if none protected Element Info get Element Info Object element return Element Info f Element Info Map get element  ElementInfo getElementInfo ElementInfo fElementInfoMap
Creates a new element info object for the given element p This method is called from code connect code when an element info needs to be created The code Abstract Document Provider code implementation of this method returns a new element info object whose document and annotation model are the values of code create Document element code and code create Annotation Model element code respectively Subclasses may override p param element the element return a new element info object exception Core Exception if the document or annotation model could not be created protected Element Info create Element Info Object element throws Core Exception return new Element Info create Document element create Annotation Model element  AbstractDocumentProvider createDocument createAnnotationModel CoreException ElementInfo createElementInfo CoreException ElementInfo createDocument createAnnotationModel
Disposes of the given element info object p This method is called when an element info is disposed The code Abstract Document Provider code implementation of this method does nothing Subclasses may reimplement p param element the element param info the element info object protected void dispose Element Info Object element Element Info info  AbstractDocumentProvider disposeElementInfo ElementInfo
Called on initial creation and when the dirty state of the element changes to code false code Adds all listeners which must be active as long as the element is not dirty This method is called before code fire Element Dirty State Changed code or code fire Element Content Replaced code is called Subclasses may extend param element the element param info the element info object protected void add Unchanged Element Listeners Object element Element Info info if info f Document null info f Document add Document Listener info  fireElementDirtyStateChanged fireElementContentReplaced addUnchangedElementListeners ElementInfo fDocument fDocument addDocumentListener
Called when the given element gets dirty Removes all listeners which must be active only when the element is not dirty This method is called before code fire Element Dirty State Changed code or code fire Element Content Replaced code is called Subclasses may extend param element the element param info the element info object protected void remove Unchanged Element Listeners Object element Element Info info if info f Document null info f Document remove Document Listener info  fireElementDirtyStateChanged fireElementContentReplaced removeUnchangedElementListeners ElementInfo fDocument fDocument removeDocumentListener
Enumerates the elements connected via this document provider return the list of elements element type code Object code protected Iterator get Connected Elements Set s new Hash Set Set keys f Element Info Map key Set if keys null s add All keys return s iterator  getConnectedElements HashSet fElementInfoMap keySet addAll
public final void connect Object element throws Core Exception Element Info info Element Info f Element Info Map get element if info null info create Element Info element if info null info new Element Info null null info f Element element add Unchanged Element Listeners element info f Element Info Map put element info if f Element Info Map size 1 connected info f Count  CoreException ElementInfo ElementInfo fElementInfoMap createElementInfo ElementInfo fElement addUnchangedElementListeners fElementInfoMap fElementInfoMap fCount
This hook method is called when this provider starts managing documents for elements I e it is called when the first element gets connected to this provider Subclasses may extend since 2 0 protected void connected 
public final void disconnect Object element Element Info info Element Info f Element Info Map get element if info null return if info f Count 1 f Element Info Map remove element remove Unchanged Element Listeners element info dispose Element Info element info if f Element Info Map size 0 disconnected else info f Count  ElementInfo ElementInfo fElementInfoMap fCount fElementInfoMap removeUnchangedElementListeners disposeElementInfo fElementInfoMap fCount
This hook method is called when this provider stops managing documents for element I e it is called when the last element gets disconnected from this provider Subclasses may extend since 2 0 protected void disconnected 
public I Document get Document Object element if element null return null Element Info info Element Info f Element Info Map get element return info null info f Document null  IDocument getDocument ElementInfo ElementInfo fElementInfoMap fDocument
public boolean must Save Document Object element if element null return false Element Info info Element Info f Element Info Map get element return info null info f Count 1 info f Can Be Saved false  mustSaveDocument ElementInfo ElementInfo fElementInfoMap fCount fCanBeSaved
public I Annotation Model get Annotation Model Object element if element null return null Element Info info Element Info f Element Info Map get element return info null info f Model null  IAnnotationModel getAnnotationModel ElementInfo ElementInfo fElementInfoMap fModel
public boolean can Save Document Object element if element null return false Element Info info Element Info f Element Info Map get element return info null info f Can Be Saved false  canSaveDocument ElementInfo ElementInfo fElementInfoMap fCanBeSaved
Executes the actual work of reseting the given elements document param element the element param monitor the progress monitor throws Core Exception since 3 0 protected void do Reset Document Object element I Progress Monitor monitor throws Core Exception Element Info info Element Info f Element Info Map get element if info null I Document original null I Status status null try original create Document element catch Core Exception x status x get Status info f Status status if original null fire Element Content About To Be Replaced element info f Document set original get if info f Can Be Saved info f Can Be Saved false add Unchanged Element Listeners element info fire Element Content Replaced element fire Element Dirty State Changed element false  CoreException doResetDocument IProgressMonitor CoreException ElementInfo ElementInfo fElementInfoMap IDocument IStatus createDocument CoreException getStatus fStatus fireElementContentAboutToBeReplaced fDocument fCanBeSaved fCanBeSaved addUnchangedElementListeners fireElementContentReplaced fireElementDirtyStateChanged
Executes the given operation in the providers runnable context param operation the operation to be executes param monitor the progress monitor exception Core Exception the operation s core exception since 3 0 protected void execute Operation Document Provider Operation operation I Progress Monitor monitor throws Core Exception try I Runnable Context runner get Operation Runner monitor if runner null runner run false false operation else operation run monitor catch Invocation Target Exception x Throwable e x get Target Exception if e instanceof Core Exception throw Core Exception e String message e get Message null e get Message NON NLS 1 throw new Core Exception new Status I Status ERROR Text Editor Plugin PLUGIN ID I Status ERROR message e catch Interrupted Exception x String message x get Message null x get Message NON NLS 1 throw new Core Exception new Status I Status CANCEL Text Editor Plugin PLUGIN ID I Status OK message x  CoreException executeOperation DocumentProviderOperation IProgressMonitor CoreException IRunnableContext getOperationRunner InvocationTargetException getTargetException CoreException CoreException getMessage getMessage CoreException IStatus TextEditorPlugin PLUGIN_ID IStatus InterruptedException getMessage getMessage CoreException IStatus TextEditorPlugin PLUGIN_ID IStatus
class Reset Operation extends Document Provider Operation implements I Scheduling Rule Provider protected void execute I Progress Monitor monitor throws Core Exception do Reset Document element monitor  ResetOperation DocumentProviderOperation ISchedulingRuleProvider IProgressMonitor CoreException doResetDocument
public I Scheduling Rule get Scheduling Rule return get Reset Rule element  ISchedulingRule getSchedulingRule getResetRule
public final void reset Document final Object element throws Core Exception if element null return class Reset Operation extends Document Provider Operation implements I Scheduling Rule Provider protected void execute I Progress Monitor monitor throws Core Exception do Reset Document element monitor public I Scheduling Rule get Scheduling Rule return get Reset Rule element execute Operation new Reset Operation get Progress Monitor  resetDocument CoreException ResetOperation DocumentProviderOperation ISchedulingRuleProvider IProgressMonitor CoreException doResetDocument ISchedulingRule getSchedulingRule getResetRule executeOperation ResetOperation getProgressMonitor
protected void execute I Progress Monitor pm throws Core Exception Element Info info Element Info f Element Info Map get element if info null if info f Document document Status status new Status I Status WARNING Text Editor Plugin PLUGIN ID I Status ERROR Editor Messages get String Abstract Document Provider error save inuse null NON NLS 1 throw new Core Exception status do Save Document pm element document overwrite if pm null pm is Canceled return info f Can Be Saved false add Unchanged Element Listeners element info fire Element Dirty State Changed element false else do Save Document pm element document overwrite  IProgressMonitor CoreException ElementInfo ElementInfo fElementInfoMap fDocument IStatus TextEditorPlugin PLUGIN_ID IStatus EditorMessages getString AbstractDocumentProvider CoreException doSaveDocument isCanceled fCanBeSaved addUnchangedElementListeners fireElementDirtyStateChanged doSaveDocument
public I Scheduling Rule get Scheduling Rule return get Save Rule element  ISchedulingRule getSchedulingRule getSaveRule
public final void save Document I Progress Monitor monitor final Object element final I Document document final boolean overwrite throws Core Exception if element null return class Save Operation extends Document Provider Operation implements I Scheduling Rule Provider see org eclipse ui texteditor Abstract Document Provider Document Provider Operation execute org eclipse core runtime I Progress Monitor protected void execute I Progress Monitor pm throws Core Exception Element Info info Element Info f Element Info Map get element if info null if info f Document document Status status new Status I Status WARNING Text Editor Plugin PLUGIN ID I Status ERROR Editor Messages get String Abstract Document Provider error save inuse null NON NLS 1 throw new Core Exception status do Save Document pm element document overwrite if pm null pm is Canceled return info f Can Be Saved false add Unchanged Element Listeners element info fire Element Dirty State Changed element false else do Save Document pm element document overwrite public I Scheduling Rule get Scheduling Rule return get Save Rule element execute Operation new Save Operation monitor  saveDocument IProgressMonitor IDocument CoreException SaveOperation DocumentProviderOperation ISchedulingRuleProvider AbstractDocumentProvider DocumentProviderOperation IProgressMonitor IProgressMonitor CoreException ElementInfo ElementInfo fElementInfoMap fDocument IStatus TextEditorPlugin PLUGIN_ID IStatus EditorMessages getString AbstractDocumentProvider CoreException doSaveDocument isCanceled fCanBeSaved addUnchangedElementListeners fireElementDirtyStateChanged doSaveDocument ISchedulingRule getSchedulingRule getSaveRule executeOperation SaveOperation
The code Abstract Document Provider code implementation of this code I Document Provider code method does nothing Subclasses may reimplement param element the element public void about To Change Object element  AbstractDocumentProvider IDocumentProvider aboutToChange
The code Abstract Document Provider code implementation of this code I Document Provider code method does nothing Subclasses may reimplement param element the element public void changed Object element  AbstractDocumentProvider IDocumentProvider
public void add Element State Listener I Element State Listener listener Assert is Not Null listener if f Element State Listeners contains listener f Element State Listeners add listener  addElementStateListener IElementStateListener isNotNull fElementStateListeners fElementStateListeners
see I Document Provider remove Element State Listener I Element State Listener public void remove Element State Listener I Element State Listener listener Assert is Not Null listener f Element State Listeners remove listener  IDocumentProvider removeElementStateListener IElementStateListener removeElementStateListener IElementStateListener isNotNull fElementStateListeners
Informs all registered element state listeners about a change in the dirty state of the given element param element the element param is Dirty the new dirty state see I Element State Listener element Dirty State Changed Object boolean protected void fire Element Dirty State Changed Object element boolean is Dirty Iterator e new Array List f Element State Listeners iterator while e has Next I Element State Listener l I Element State Listener e next l element Dirty State Changed element is Dirty  isDirty IElementStateListener elementDirtyStateChanged fireElementDirtyStateChanged isDirty ArrayList fElementStateListeners hasNext IElementStateListener IElementStateListener elementDirtyStateChanged isDirty
Informs all registered element state listeners about an impending replace of the given element s content param element the element see I Element State Listener element Content About To Be Replaced Object protected void fire Element Content About To Be Replaced Object element Iterator e new Array List f Element State Listeners iterator while e has Next I Element State Listener l I Element State Listener e next l element Content About To Be Replaced element  IElementStateListener elementContentAboutToBeReplaced fireElementContentAboutToBeReplaced ArrayList fElementStateListeners hasNext IElementStateListener IElementStateListener elementContentAboutToBeReplaced
Informs all registered element state listeners about the just completed replace of the given element s content param element the element see I Element State Listener element Content Replaced Object protected void fire Element Content Replaced Object element Iterator e new Array List f Element State Listeners iterator while e has Next I Element State Listener l I Element State Listener e next l element Content Replaced element  IElementStateListener elementContentReplaced fireElementContentReplaced ArrayList fElementStateListeners hasNext IElementStateListener IElementStateListener elementContentReplaced
Informs all registered element state listeners about the deletion of the given element param element the element see I Element State Listener element Deleted Object protected void fire Element Deleted Object element Iterator e new Array List f Element State Listeners iterator while e has Next I Element State Listener l I Element State Listener e next l element Deleted element  IElementStateListener elementDeleted fireElementDeleted ArrayList fElementStateListeners hasNext IElementStateListener IElementStateListener elementDeleted
Informs all registered element state listeners about a move param original Element the element before the move param moved Element the element after the move see I Element State Listener element Moved Object Object protected void fire Element Moved Object original Element Object moved Element Iterator e new Array List f Element State Listeners iterator while e has Next I Element State Listener l I Element State Listener e next l element Moved original Element moved Element  originalElement movedElement IElementStateListener elementMoved fireElementMoved originalElement movedElement ArrayList fElementStateListeners hasNext IElementStateListener IElementStateListener elementMoved originalElement movedElement
since 2 0 public long get Modification Stamp Object element return 0  getModificationStamp
since 2 0 public long get Synchronization Stamp Object element return 0  getSynchronizationStamp
since 2 0 public boolean is Deleted Object element return false  isDeleted
since 2 0 public boolean is Read Only Object element return true  isReadOnly
since 2 0 public boolean is Modifiable Object element return false  isModifiable
Returns whether code validate State code has been called for the given element since the element s state has potentially been invalidated param element the element return whether code validate State code has been called for the given element since 2 0 public boolean is State Validated Object element Element Info info Element Info f Element Info Map get element if info null return info f Is State Validated return false  validateState validateState isStateValidated ElementInfo ElementInfo fElementInfoMap fIsStateValidated
Hook method for validating the state of the given element Must not take care of cache updating etc Default implementation is empty param element the element param computation Context the context in which validation happens exception Core Exception in case validation fails since 2 0 protected void do Validate State Object element Object computation Context throws Core Exception  computationContext CoreException doValidateState computationContext CoreException
protected void execute I Progress Monitor monitor throws Core Exception Element Info info Element Info f Element Info Map get element if info null return do Validate State element computation Context do Update State Cache element info f Is State Validated true fire Element State Validation Changed element true  IProgressMonitor CoreException ElementInfo ElementInfo fElementInfoMap doValidateState computationContext doUpdateStateCache fIsStateValidated fireElementStateValidationChanged
public I Scheduling Rule get Scheduling Rule return get Validate State Rule element  ISchedulingRule getSchedulingRule getValidateStateRule
public void validate State final Object element final Object computation Context throws Core Exception if element null return class Validate State Operation extends Document Provider Operation implements I Scheduling Rule Provider protected void execute I Progress Monitor monitor throws Core Exception Element Info info Element Info f Element Info Map get element if info null return do Validate State element computation Context do Update State Cache element info f Is State Validated true fire Element State Validation Changed element true public I Scheduling Rule get Scheduling Rule return get Validate State Rule element execute Operation new Validate State Operation get Progress Monitor  validateState computationContext CoreException ValidateStateOperation DocumentProviderOperation ISchedulingRuleProvider IProgressMonitor CoreException ElementInfo ElementInfo fElementInfoMap doValidateState computationContext doUpdateStateCache fIsStateValidated fireElementStateValidationChanged ISchedulingRule getSchedulingRule getValidateStateRule executeOperation ValidateStateOperation getProgressMonitor
Hook method for updating the state of the given element Default implementation is empty param element the element exception Core Exception in case state cache updating fails since 2 0 protected void do Update State Cache Object element throws Core Exception  CoreException doUpdateStateCache CoreException
Returns whether the state of the element must be invalidated given its previous read only state param element the element param was Read Only the previous read only state return code true code if the state of the given element must be invalidated since 2 0 protected boolean invalidates State Object element boolean was Read Only Assert is True PR10806 UC5 ENABLED PR14469 ENABLED boolean read Only Changed is Read Only element was Read Only was Read Only if PR14469 ENABLED return read Only Changed can Save Document element return read Only Changed  wasReadOnly invalidatesState wasReadOnly isTrue PR10806_UC5_ENABLED PR14469_ENABLED readOnlyChanged isReadOnly wasReadOnly wasReadOnly PR14469_ENABLED readOnlyChanged canSaveDocument readOnlyChanged
final public void update State Cache Object element throws Core Exception Element Info info Element Info f Element Info Map get element if info null boolean was Read Only is Read Only element do Update State Cache element if invalidates State element was Read Only info f Is State Validated false fire Element State Validation Changed element false  updateStateCache CoreException ElementInfo ElementInfo fElementInfoMap wasReadOnly isReadOnly doUpdateStateCache invalidatesState wasReadOnly fIsStateValidated fireElementStateValidationChanged
public void set Can Save Document Object element if element null Element Info info Element Info f Element Info Map get element if info null info f Can Be Saved true remove Unchanged Element Listeners element info fire Element Dirty State Changed element info f Can Be Saved  setCanSaveDocument ElementInfo ElementInfo fElementInfoMap fCanBeSaved removeUnchangedElementListeners fireElementDirtyStateChanged fCanBeSaved
Informs all registered element state listeners about a change in the state validation of the given element param element the element param is State Validated see I Element State Listener Extension element State Validation Changed Object boolean since 2 0 protected void fire Element State Validation Changed Object element boolean is State Validated Iterator e new Array List f Element State Listeners iterator while e has Next Object o e next if o instanceof I Element State Listener Extension I Element State Listener Extension l I Element State Listener Extension o l element State Validation Changed element is State Validated  isStateValidated IElementStateListenerExtension elementStateValidationChanged fireElementStateValidationChanged isStateValidated ArrayList fElementStateListeners hasNext IElementStateListenerExtension IElementStateListenerExtension IElementStateListenerExtension elementStateValidationChanged isStateValidated
Informs all registered element state listeners about the current state change of the element param element the element see I Element State Listener Extension element State Changing Object since 2 0 protected void fire Element State Changing Object element Iterator e new Array List f Element State Listeners iterator while e has Next Object o e next if o instanceof I Element State Listener Extension I Element State Listener Extension l I Element State Listener Extension o l element State Changing element  IElementStateListenerExtension elementStateChanging fireElementStateChanging ArrayList fElementStateListeners hasNext IElementStateListenerExtension IElementStateListenerExtension IElementStateListenerExtension elementStateChanging
Informs all registered element state listeners about the failed state change of the element param element the element see I Element State Listener Extension element State Change Failed Object since 2 0 protected void fire Element State Change Failed Object element Iterator e new Array List f Element State Listeners iterator while e has Next Object o e next if o instanceof I Element State Listener Extension I Element State Listener Extension l I Element State Listener Extension o l element State Change Failed element  IElementStateListenerExtension elementStateChangeFailed fireElementStateChangeFailed ArrayList fElementStateListeners hasNext IElementStateListenerExtension IElementStateListenerExtension IElementStateListenerExtension elementStateChangeFailed
public I Status get Status Object element Element Info info Element Info f Element Info Map get element if info null if info f Status null return info f Status return info f Document null STATUS ERROR STATUS OK return STATUS ERROR  IStatus getStatus ElementInfo ElementInfo fElementInfoMap fStatus fStatus fDocument STATUS_ERROR STATUS_OK STATUS_ERROR
Performs the actual work of synchronizing the given element param element the element param monitor the progress monitor exception Core Exception in the case that synchronization fails since 3 0 protected void do Synchronize Object element I Progress Monitor monitor throws Core Exception  CoreException doSynchronize IProgressMonitor CoreException
class Synchronize Operation extends Document Provider Operation implements I Scheduling Rule Provider protected void execute I Progress Monitor monitor throws Core Exception do Synchronize element monitor  SynchronizeOperation DocumentProviderOperation ISchedulingRuleProvider IProgressMonitor CoreException doSynchronize
public I Scheduling Rule get Scheduling Rule return get Synchronize Rule element  ISchedulingRule getSchedulingRule getSynchronizeRule
public final void synchronize final Object element throws Core Exception if element null return class Synchronize Operation extends Document Provider Operation implements I Scheduling Rule Provider protected void execute I Progress Monitor monitor throws Core Exception do Synchronize element monitor public I Scheduling Rule get Scheduling Rule return get Synchronize Rule element execute Operation new Synchronize Operation get Progress Monitor  CoreException SynchronizeOperation DocumentProviderOperation ISchedulingRuleProvider IProgressMonitor CoreException doSynchronize ISchedulingRule getSchedulingRule getSynchronizeRule executeOperation SynchronizeOperation getProgressMonitor
since 2 1 public I Progress Monitor get Progress Monitor return f Progress Monitor null new Null Progress Monitor f Progress Monitor  IProgressMonitor getProgressMonitor fProgressMonitor NullProgressMonitor fProgressMonitor
since 2 1 public void set Progress Monitor I Progress Monitor progress Monitor f Progress Monitor progress Monitor  setProgressMonitor IProgressMonitor progressMonitor fProgressMonitor progressMonitor
since 3 0 public boolean is Synchronized Object element return true  isSynchronized

Retrieves all markers from this model p Subclasses must implement this method p return the list of markers throws Core Exception if there is a problem getting the markers  CoreException
Deletes the given markers from this model p Subclasses must implement this method p param markers the array of markers throws Core Exception if there are problems deleting the markers  CoreException
Tells the model whether it should listen for marker changes p Subclasses must implement this method p param listen code true code if this model should listen and code false code otherwise 
Determines whether the marker is acceptable as an addition to this model If the marker say represents an aspect or range of no interest to this model the marker is rejected p Subclasses must implement this method p param marker the marker return code true code if the marker is acceptable 
Creates a new annotation model The annotation model does not manage any annotations and is not connected to any document protected Abstract Marker Annotation Model  AbstractMarkerAnnotationModel
Adds the given marker updater to this annotation model It is the client s responsibility to ensure the consistency of the set of registered marker updaters param marker Updater the marker updater to be added protected void add Marker Updater I Marker Updater marker Updater if f Instantiated Marker Updaters contains marker Updater f Instantiated Marker Updaters add marker Updater  markerUpdater addMarkerUpdater IMarkerUpdater markerUpdater fInstantiatedMarkerUpdaters markerUpdater fInstantiatedMarkerUpdaters markerUpdater
Removes the given marker updater from this annotation model param marker Updater the marker updater to be removed protected void remove Marker Updater I Marker Updater marker Updater f Instantiated Marker Updaters remove marker Updater  markerUpdater removeMarkerUpdater IMarkerUpdater markerUpdater fInstantiatedMarkerUpdaters markerUpdater
Creates a new annotation for the given marker p Subclasses may override p param marker the marker return the new marker annotation protected Marker Annotation create Marker Annotation I Marker marker return new Marker Annotation marker  MarkerAnnotation createMarkerAnnotation IMarker MarkerAnnotation
Handles an unanticipated code Core Exception code in a standard manner param exception the exception param message a message to aid debugging protected void handle Core Exception Core Exception exception String message Bundle bundle Platform get Bundle PlatformUI PLUGIN ID I Log log Platform get Log bundle if message null log log new Status I Status ERROR PlatformUI PLUGIN ID 0 message exception else log log exception get Status  CoreException handleCoreException CoreException getBundle PLUGIN_ID ILog getLog IStatus PLUGIN_ID getStatus
Creates and returns the character position of the given marker based on its attributes p Subclasses may override p param marker the marker return the new position or code null code if the marker attributes do not specify a valid position protected Position create Position From Marker I Marker marker int start Marker Utilities get Char Start marker int end Marker Utilities get Char End marker if start end end start end start end start end end start if start 1 end 1 marker line number is 1 based int line Marker Utilities get Line Number marker if line 0 f Document null try start f Document get Line Offset line 1 end start catch Bad Location Exception x if start 1 end 1 return new Position start end start return null  createPositionFromMarker IMarker MarkerUtilities getCharStart MarkerUtilities getCharEnd MarkerUtilities getLineNumber fDocument fDocument getLineOffset BadLocationException
Creates an annotation for the given marker and adds it to this model Does nothing if the marker is not acceptable to this model param marker the marker see is Acceptable I Marker protected final void add Marker Annotation I Marker marker if is Acceptable marker Position p create Position From Marker marker if p null try Marker Annotation annotation create Marker Annotation marker if annotation null add Annotation annotation p false catch Bad Location Exception e ignore invalid position  isAcceptable IMarker addMarkerAnnotation IMarker isAcceptable createPositionFromMarker MarkerAnnotation createMarkerAnnotation addAnnotation BadLocationException
Connects to the source of markers as marker change listener see Annotation Model connected protected void connected listen To Marker Changes true try catchup With Markers catch Core Exception x if x get Status get Code I Resource Status RESOURCE NOT FOUND handle Core Exception x Text Editor Messages get String Abstract Marker Annotation Model connected NON NLS 1 fire Model Changed  AnnotationModel listenToMarkerChanges catchupWithMarkers CoreException getStatus getCode IResourceStatus RESOURCE_NOT_FOUND handleCoreException TextEditorMessages getString AbstractMarkerAnnotationModel fireModelChanged
Installs all marker updaters for this marker annotation model private void install Marker Updaters initialize lists indicates that the initialization happened f Marker Updater Specifications new Array List 2 f Instantiated Marker Updaters new Array List 2 populate list I Extension Point extension Point Platform get Extension Registry get Extension Point EditorsUI PLUGIN ID marker Updaters NON NLS 1 if extension Point null I Configuration Element elements extension Point get Configuration Elements for int i 0 i elements length i f Marker Updater Specifications add elements i  installMarkerUpdaters fMarkerUpdaterSpecifications ArrayList fInstantiatedMarkerUpdaters ArrayList IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint PLUGIN_ID markerUpdaters extensionPoint IConfigurationElement extensionPoint getConfigurationElements fMarkerUpdaterSpecifications
Uninstalls all marker updaters private void uninstall Marker Updaters if f Instantiated Marker Updaters null f Instantiated Marker Updaters clear f Instantiated Marker Updaters null if f Marker Updater Specifications null f Marker Updater Specifications clear f Marker Updater Specifications null  uninstallMarkerUpdaters fInstantiatedMarkerUpdaters fInstantiatedMarkerUpdaters fInstantiatedMarkerUpdaters fMarkerUpdaterSpecifications fMarkerUpdaterSpecifications fMarkerUpdaterSpecifications
Removes the marker change listener see Annotation Model disconnected protected void disconnected listen To Marker Changes false uninstall Marker Updaters  AnnotationModel listenToMarkerChanges uninstallMarkerUpdaters
Returns the position known to this annotation model for the given marker param marker the marker return the position or code null code if none public Position get Marker Position I Marker marker Marker Annotation a get Marker Annotation marker if a null return Position get Annotation Map get a return null  getMarkerPosition IMarker MarkerAnnotation getMarkerAnnotation getAnnotationMap
Updates the annotation corresponding to the given marker which has changed in some way p Subclasses may override p param marker the marker protected void modify Marker Annotation I Marker marker Marker Annotation a get Marker Annotation marker if a null Position p create Position From Marker marker if p null a update modify Annotation Position a p false  modifyMarkerAnnotation IMarker MarkerAnnotation getMarkerAnnotation createPositionFromMarker modifyAnnotationPosition
protected void remove Annotations List annotations boolean fire Model Changed boolean model Initiated if annotations null annotations size 0 List marker Annotations new Array List for Iterator e annotations iterator e has Next Annotation a Annotation e next if a instanceof Marker Annotation marker Annotations add a remove annotations from annotation model remove Annotation a false if marker Annotations size 0 if model Initiated if model initiated also remove it from the marker manager listen To Marker Changes false try I Marker m new I Marker marker Annotations size for int i 0 i m length i Marker Annotation ma Marker Annotation marker Annotations get i m i ma get Marker delete Markers m catch Core Exception x handle Core Exception x Text Editor Messages get String Abstract Marker Annotation Model remove Annotations NON NLS 1 listen To Marker Changes true else remember deleted annotations in order to remove their markers later on f Deleted Annotations add All marker Annotations if fire Model Changed fire Model Changed  removeAnnotations fireModelChanged modelInitiated markerAnnotations ArrayList hasNext MarkerAnnotation markerAnnotations removeAnnotation markerAnnotations modelInitiated listenToMarkerChanges IMarker IMarker markerAnnotations MarkerAnnotation MarkerAnnotation markerAnnotations getMarker deleteMarkers CoreException handleCoreException TextEditorMessages getString AbstractMarkerAnnotationModel removeAnnotations listenToMarkerChanges fDeletedAnnotations addAll markerAnnotations fireModelChanged fireModelChanged
Removes the annotation corresponding to the given marker Does nothing if there is no annotation for this marker param marker the marker protected final void remove Marker Annotation I Marker marker Marker Annotation a get Marker Annotation marker if a null remove Annotation a false  removeMarkerAnnotation IMarker MarkerAnnotation getMarkerAnnotation removeAnnotation
Re populates this model with annotations for all markers retrieved from the maker source via code retrieve Markers code throws Core Exception if there is a problem getting the markers private void catchup With Markers throws Core Exception for Iterator e get Annotation Iterator false e has Next Annotation a Annotation e next if a instanceof Marker Annotation remove Annotation a false I Marker markers retrieve Markers if markers null for int i 0 i markers length i add Marker Annotation markers i  retrieveMarkers CoreException catchupWithMarkers CoreException getAnnotationIterator hasNext MarkerAnnotation removeAnnotation IMarker retrieveMarkers addMarkerAnnotation
Returns this model s annotation for the given marker param marker the marker return the annotation or code null code if none public final Marker Annotation get Marker Annotation I Marker marker Iterator e get Annotation Iterator false while e has Next Object o e next if o instanceof Marker Annotation Marker Annotation a Marker Annotation o if marker equals a get Marker return a return null  MarkerAnnotation getMarkerAnnotation IMarker getAnnotationIterator hasNext MarkerAnnotation MarkerAnnotation MarkerAnnotation getMarker
Creates a marker updater as specified in the given configuration element param element the configuration element return the created marker updater or code null code if none could be created private I Marker Updater create Marker Updater I Configuration Element element try return I Marker Updater element create Executable Extension class NON NLS 1 catch Core Exception x handle Core Exception x Text Editor Messages get String Abstract Marker Annotation Model create Marker Updater NON NLS 1 return null  IMarkerUpdater createMarkerUpdater IConfigurationElement IMarkerUpdater createExecutableExtension CoreException handleCoreException TextEditorMessages getString AbstractMarkerAnnotationModel createMarkerUpdater
Checks whether a marker updater is registered for the type of the given marker but not yet instantiated If so the method instantiates the marker updater and registers it with this model param marker the marker for which to look for an updater since 2 0 private void check Marker Updaters I Marker marker List to Be Deleted new Array List for int i 0 i f Marker Updater Specifications size i I Configuration Element spec I Configuration Element f Marker Updater Specifications get i String marker Type spec get Attribute marker Type NON NLS 1 if marker Type null Marker Utilities is Marker Type marker marker Type to Be Deleted add spec I Marker Updater updater create Marker Updater spec if updater null add Marker Updater updater for int i 0 i to Be Deleted size i f Marker Updater Specifications remove to Be Deleted get i  checkMarkerUpdaters IMarker toBeDeleted ArrayList fMarkerUpdaterSpecifications IConfigurationElement IConfigurationElement fMarkerUpdaterSpecifications markerType getAttribute markerType markerType MarkerUtilities isMarkerType markerType toBeDeleted IMarkerUpdater createMarkerUpdater addMarkerUpdater toBeDeleted fMarkerUpdaterSpecifications toBeDeleted
Updates the given marker according to the given position in the given document If the given position is code null code the marker is assumed to carry the correct positional information If it is detected that the marker is invalid and should thus be deleted this method returns code false code param marker the marker to be updated param document the document into which the given position points param position the current position of the marker inside the given document return code false code if the marker is invalid throws Core Exception if there is a problem updating the marker since 2 0 deprecated use code update Marker I Document I Marker Position code instead This method will be changed to protected public boolean update Marker I Marker marker I Document document Position position throws Core Exception if f Marker Updater Specifications null install Marker Updaters if f Marker Updater Specifications is Empty check Marker Updaters marker boolean isOK true for int i 0 i f Instantiated Marker Updaters size i I Marker Updater updater I Marker Updater f Instantiated Marker Updaters get i String marker Type updater get Marker Type if marker Type null Marker Utilities is Marker Type marker marker Type if position null compatibility code position create Position From Marker marker isOK isOK updater update Marker marker document position return isOK  CoreException updateMarker IDocument IMarker updateMarker IMarker IDocument CoreException fMarkerUpdaterSpecifications installMarkerUpdaters fMarkerUpdaterSpecifications isEmpty checkMarkerUpdaters fInstantiatedMarkerUpdaters IMarkerUpdater IMarkerUpdater fInstantiatedMarkerUpdaters markerType getMarkerType markerType MarkerUtilities isMarkerType markerType createPositionFromMarker updateMarker
Updates the given marker according to the given position in the given document If the given position is code null code the marker is assumed to carry the correct positional information If it is detected that the marker is invalid and should thus be deleted this method returns code false code param marker the marker to be updated param document the document into which the given position points param position the current position of the marker inside the given document return code false code if the marker is invalid throws Core Exception if there is a problem updating the marker since 3 0 public boolean update Marker I Document document I Marker marker Position position throws Core Exception listen To Marker Changes false try return update Marker marker document position finally listen To Marker Changes true  CoreException updateMarker IDocument IMarker CoreException listenToMarkerChanges updateMarker listenToMarkerChanges
Updates the markers managed by this annotation model by calling all registered marker updaters code I Marker Updater code param document the document to which this model is currently connected throws Core Exception if there is a problem updating the markers public void update Markers I Document document throws Core Exception Assert is True f Document document I Annotation Map annotation Map get Annotation Map if annotation Map size 0 f Deleted Annotations size 0 return if f Marker Updater Specifications null install Marker Updaters listen To Marker Changes false try update all markers with the positions known by the annotation model for Iterator e get Annotation Iterator false e has Next Object o e next if o instanceof Marker Annotation Marker Annotation a Marker Annotation o I Marker marker a get Marker Position position Position annotation Map get a if update Marker marker document position if f Deleted Annotations contains a f Deleted Annotations add a if f Deleted Annotations is Empty remove Annotations f Deleted Annotations true true f Deleted Annotations clear finally listen To Marker Changes true  IMarkerUpdater CoreException updateMarkers IDocument CoreException isTrue fDocument IAnnotationMap annotationMap getAnnotationMap annotationMap fDeletedAnnotations fMarkerUpdaterSpecifications installMarkerUpdaters listenToMarkerChanges getAnnotationIterator hasNext MarkerAnnotation MarkerAnnotation MarkerAnnotation IMarker getMarker annotationMap updateMarker fDeletedAnnotations fDeletedAnnotations fDeletedAnnotations isEmpty removeAnnotations fDeletedAnnotations fDeletedAnnotations listenToMarkerChanges
Resets all the markers to their original state public void reset Markers re initializes the positions from the markers for Iterator e get Annotation Iterator false e has Next Object o e next if o instanceof Marker Annotation Marker Annotation a Marker Annotation o Position p create Position From Marker a get Marker if p null remove Annotation a false try add Annotation a p false catch Bad Location Exception e1 ignore invalid position add the markers of deleted positions back to the annotation model for Iterator e f Deleted Annotations iterator e has Next Object o e next if o instanceof Marker Annotation Marker Annotation a Marker Annotation o Position p create Position From Marker a get Marker if p null try add Annotation a p false catch Bad Location Exception e1 ignore invalid position f Deleted Annotations clear fire annotation model changed fire Model Changed  resetMarkers getAnnotationIterator hasNext MarkerAnnotation MarkerAnnotation MarkerAnnotation createPositionFromMarker getMarker removeAnnotation addAnnotation BadLocationException fDeletedAnnotations hasNext MarkerAnnotation MarkerAnnotation MarkerAnnotation createPositionFromMarker getMarker addAnnotation BadLocationException fDeletedAnnotations fireModelChanged
see org eclipse jface text source I Persistable Annotation Model commit org eclipse jface text I Document public void commit I Document document throws Core Exception update Markers document  IPersistableAnnotationModel IDocument IDocument CoreException updateMarkers
see org eclipse jface text source I Persistable Annotation Model revert org eclipse jface text I Document public void revert I Document document reset Markers  IPersistableAnnotationModel IDocument IDocument resetMarkers
see org eclipse jface text source I Persistable Annotation Model reinitialize org eclipse jface text I Document public void reinitialize I Document document reset Markers  IPersistableAnnotationModel IDocument IDocument resetMarkers

The factory method creating the underlying action param editor the editor the action to be created will work on param ruler Info the vertical ruler the action to be created will work on return the created action  rulerInfo
public void set Active Editor I Action caller Action I Editor Part target Editor if f Editor null I Vertical Ruler Info ruler Info I Vertical Ruler Info f Editor get Adapter I Vertical Ruler Info class if ruler Info null Control control ruler Info get Control if control null control is Disposed control remove Mouse Listener this if f Editor instanceof I Text Editor Extension I Text Editor Extension f Editor remove Ruler Context Menu Listener this f Editor target Editor f Caller Action caller Action f Action null if f Editor null f Editor instanceof I Text Editor if f Editor instanceof I Text Editor Extension I Text Editor Extension f Editor add Ruler Context Menu Listener this I Vertical Ruler Info ruler Info I Vertical Ruler Info f Editor get Adapter I Vertical Ruler Info class if ruler Info null f Action create Action I Text Editor f Editor ruler Info update Control control ruler Info get Control if control null control is Disposed control add Mouse Listener this  setActiveEditor IAction callerAction IEditorPart targetEditor fEditor IVerticalRulerInfo rulerInfo IVerticalRulerInfo fEditor getAdapter IVerticalRulerInfo rulerInfo rulerInfo getControl isDisposed removeMouseListener fEditor ITextEditorExtension ITextEditorExtension fEditor removeRulerContextMenuListener fEditor targetEditor fCallerAction callerAction fAction fEditor fEditor ITextEditor fEditor ITextEditorExtension ITextEditorExtension fEditor addRulerContextMenuListener IVerticalRulerInfo rulerInfo IVerticalRulerInfo fEditor getAdapter IVerticalRulerInfo rulerInfo fAction createAction ITextEditor fEditor rulerInfo rulerInfo getControl isDisposed addMouseListener
see org eclipse ui I Action Delegate run org eclipse jface action I Action public void run I Action caller Action if f Action null f Action run  IActionDelegate IAction IAction callerAction fAction fAction
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection update  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection
Requests the adaptee to update itself to the current state private void update if f Action instanceof I Update I Update f Action update if f Caller Action null f Caller Action set Text f Action get Text f Caller Action set Enabled f Action is Enabled  fAction IUpdate IUpdate fAction fCallerAction fCallerAction setText fAction getText fCallerAction setEnabled fAction isEnabled
see I Menu Listener menu About To Show org eclipse jface action I Menu Manager public void menu About To Show I Menu Manager manager update  IMenuListener menuAboutToShow IMenuManager menuAboutToShow IMenuManager
see Mouse Listener mouse Double Click org eclipse swt events Mouse Event public void mouse Double Click Mouse Event e  MouseListener mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent
see Mouse Listener mouse Down org eclipse swt events Mouse Event public void mouse Down Mouse Event e update  MouseListener mouseDown MouseEvent mouseDown MouseEvent
see Mouse Listener mouse Up org eclipse swt events Mouse Event public void mouse Up Mouse Event e  MouseListener mouseUp MouseEvent mouseUp MouseEvent

Detectors for editor input changes during the process of state validation public void input Document About To Be Changed I Document old Input I Document new Input  inputDocumentAboutToBeChanged IDocument oldInput IDocument newInput
Detectors for editor input changes during the process of state validation public void input Document About To Be Changed I Document old Input I Document new Input public void input Document Changed I Document old Input I Document new Input input Changed true  inputDocumentAboutToBeChanged IDocument oldInput IDocument newInput inputDocumentChanged IDocument oldInput IDocument newInput inputChanged
final boolean document Changed new boolean 1 I Document Listener listener new I Document Listener public void document About To Be Changed Document Event event  documentChanged IDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent
public void document About To Be Changed Document Event event public void document Changed Document Event event document Changed 0 true  documentAboutToBeChanged DocumentEvent documentChanged DocumentEvent documentChanged
public void verify Text Verify Event e I Document document get Document Provider get Document get Editor Input final boolean document Changed new boolean 1 I Document Listener listener new I Document Listener public void document About To Be Changed Document Event event public void document Changed Document Event event document Changed 0 true try if document null document add Document Listener listener if validate Editor Input State document Changed 0 e doit false finally if document null document remove Document Listener listener  verifyText VerifyEvent IDocument getDocumentProvider getDocument getEditorInput documentChanged IDocumentListener IDocumentListener documentAboutToBeChanged DocumentEvent documentChanged DocumentEvent documentChanged addDocumentListener validateEditorInputState documentChanged removeDocumentListener
Runnable r new Runnable public void run enable Sanity Checking true if is State Validated f Validator null I Source Viewer viewer get Source Viewer if viewer null Styled Text text Widget viewer get Text Widget if text Widget null text Widget is Disposed text Widget remove Verify Listener f Validator f Validator null enable State Validation false else if is State Validated f Validator null I Source Viewer viewer get Source Viewer if viewer null Styled Text text Widget viewer get Text Widget if text Widget null text Widget is Disposed f Validator new Validator enable State Validation true text Widget add Verify Listener f Validator  enableSanityChecking isStateValidated fValidator ISourceViewer getSourceViewer StyledText textWidget getTextWidget textWidget textWidget isDisposed textWidget removeVerifyListener fValidator fValidator enableStateValidation isStateValidated fValidator ISourceViewer getSourceViewer StyledText textWidget getTextWidget textWidget textWidget isDisposed fValidator enableStateValidation textWidget addVerifyListener fValidator
public void element State Validation Changed final Object element final boolean is State Validated if element null element equals get Editor Input Runnable r new Runnable public void run enable Sanity Checking true if is State Validated f Validator null I Source Viewer viewer get Source Viewer if viewer null Styled Text text Widget viewer get Text Widget if text Widget null text Widget is Disposed text Widget remove Verify Listener f Validator f Validator null enable State Validation false else if is State Validated f Validator null I Source Viewer viewer get Source Viewer if viewer null Styled Text text Widget viewer get Text Widget if text Widget null text Widget is Disposed f Validator new Validator enable State Validation true text Widget add Verify Listener f Validator execute r  elementStateValidationChanged isStateValidated getEditorInput enableSanityChecking isStateValidated fValidator ISourceViewer getSourceViewer StyledText textWidget getTextWidget textWidget textWidget isDisposed textWidget removeVerifyListener fValidator fValidator enableStateValidation isStateValidated fValidator ISourceViewer getSourceViewer StyledText textWidget getTextWidget textWidget textWidget isDisposed fValidator enableStateValidation textWidget addVerifyListener fValidator
if element null element equals get Editor Input Runnable r new Runnable public void run enable Sanity Checking true fire Property Change PROP DIRTY  getEditorInput enableSanityChecking firePropertyChange PROP_DIRTY
public void element Dirty State Changed Object element boolean is Dirty if element null element equals get Editor Input Runnable r new Runnable public void run enable Sanity Checking true fire Property Change PROP DIRTY execute r  elementDirtyStateChanged isDirty getEditorInput enableSanityChecking firePropertyChange PROP_DIRTY
Runnable r new Runnable public void run enable Sanity Checking true remember Selection reset Highlight Range  enableSanityChecking rememberSelection resetHighlightRange
public void element Content About To Be Replaced Object element if element null element equals get Editor Input Runnable r new Runnable public void run enable Sanity Checking true remember Selection reset Highlight Range execute r  elementContentAboutToBeReplaced getEditorInput enableSanityChecking rememberSelection resetHighlightRange
Runnable r new Runnable public void run enable Sanity Checking true fire Property Change PROP DIRTY restore Selection handle Element Content Replaced  enableSanityChecking firePropertyChange PROP_DIRTY restoreSelection handleElementContentReplaced
public void element Content Replaced Object element if element null element equals get Editor Input Runnable r new Runnable public void run enable Sanity Checking true fire Property Change PROP DIRTY restore Selection handle Element Content Replaced execute r  elementContentReplaced getEditorInput enableSanityChecking firePropertyChange PROP_DIRTY restoreSelection handleElementContentReplaced
if deleted Element null deleted Element equals get Editor Input Runnable r new Runnable public void run enable Sanity Checking true close false  deletedElement deletedElement getEditorInput enableSanityChecking
public void element Deleted Object deleted Element if deleted Element null deleted Element equals get Editor Input Runnable r new Runnable public void run enable Sanity Checking true close false execute r  elementDeleted deletedElement deletedElement deletedElement getEditorInput enableSanityChecking
Runnable r new Runnable public void run enable Sanity Checking true if can Handle Move I Editor Input original Element I Editor Input moved Element close true return if moved Element null moved Element instanceof I Editor Input remember Selection I Document Provider d get Document Provider I Document changed null String previous Content null if is Dirty changed d get Document get Editor Input if changed null previous Content changed get set Input I Editor Input moved Element if changed null d get Document get Editor Input set previous Content validate State get Editor Input update Status Field I Text Editor Action Constants STATUS CATEGORY ELEMENT STATE restore Selection  enableSanityChecking canHandleMove IEditorInput originalElement IEditorInput movedElement movedElement movedElement IEditorInput rememberSelection IDocumentProvider getDocumentProvider IDocument previousContent isDirty getDocument getEditorInput previousContent setInput IEditorInput movedElement getDocument getEditorInput previousContent validateState getEditorInput updateStatusField ITextEditorActionConstants STATUS_CATEGORY_ELEMENT_STATE restoreSelection
public void element Moved final Object original Element final Object moved Element if original Element null original Element equals get Editor Input Runnable r new Runnable public void run enable Sanity Checking true if can Handle Move I Editor Input original Element I Editor Input moved Element close true return if moved Element null moved Element instanceof I Editor Input remember Selection I Document Provider d get Document Provider I Document changed null String previous Content null if is Dirty changed d get Document get Editor Input if changed null previous Content changed get set Input I Editor Input moved Element if changed null d get Document get Editor Input set previous Content validate State get Editor Input update Status Field I Text Editor Action Constants STATUS CATEGORY ELEMENT STATE restore Selection execute r  elementMoved originalElement movedElement originalElement originalElement getEditorInput enableSanityChecking canHandleMove IEditorInput originalElement IEditorInput movedElement movedElement movedElement IEditorInput rememberSelection IDocumentProvider getDocumentProvider IDocument previousContent isDirty getDocument getEditorInput previousContent setInput IEditorInput movedElement getDocument getEditorInput previousContent validateState getEditorInput updateStatusField ITextEditorActionConstants STATUS_CATEGORY_ELEMENT_STATE restoreSelection
since 2 0 public void element State Changing Object element if element null element equals get Editor Input enable Sanity Checking false  elementStateChanging getEditorInput enableSanityChecking
since 2 0 public void element State Change Failed Object element if element null element equals get Editor Input enable Sanity Checking true  elementStateChangeFailed getEditorInput enableSanityChecking
Executes the given runnable in the UI thread param runnable runnable to be executed since 3 0 private void execute Runnable runnable if Display get Current null runnable run else if f Display null f Display get Site get Shell get Display f Display async Exec runnable  getCurrent fDisplay fDisplay getSite getShell getDisplay fDisplay asyncExec
private Runnable f Runnable new Runnable public void run f Is Runnable Posted false if f Source Viewer null update Content Dependent Actions remember the last edit position if is Dirty f Update Last Edit Position f Update Last Edit Position false I Selection sel get Selection Provider get Selection I Editor Input input get Editor Input I Document document get Document Provider get Document input if f Local Last Edit Position null document remove Position f Local Last Edit Position f Local Last Edit Position null if sel instanceof I Text Selection sel is Empty I Text Selection s I Text Selection sel f Local Last Edit Position new Position s get Offset s get Length try document add Position f Local Last Edit Position catch Bad Location Exception ex f Local Last Edit Position null Text Editor Plugin get Default set Last Edit Position new Edit Position input get Editor Site get Id get Selection Provider get Selection f Local Last Edit Position  fRunnable fIsRunnablePosted fSourceViewer updateContentDependentActions isDirty fUpdateLastEditPosition fUpdateLastEditPosition ISelection getSelectionProvider getSelection IEditorInput getEditorInput IDocument getDocumentProvider getDocument fLocalLastEditPosition removePosition fLocalLastEditPosition fLocalLastEditPosition ITextSelection isEmpty ITextSelection ITextSelection fLocalLastEditPosition getOffset getLength addPosition fLocalLastEditPosition BadLocationException fLocalLastEditPosition TextEditorPlugin getDefault setLastEditPosition EditPosition getEditorSite getId getSelectionProvider getSelection fLocalLastEditPosition
public void text Changed Text Event event Also works for text events which do not base on a Document Event This way if the visible document of the viewer changes all content dependent actions are updated as well if f Display null f Display get Site get Shell get Display if event get Document Event null f Update Last Edit Position true if f Is Runnable Posted f Is Runnable Posted true f Display async Exec f Runnable  textChanged TextEvent DocumentEvent fDisplay fDisplay getSite getShell getDisplay getDocumentEvent fUpdateLastEditPosition fIsRunnablePosted fIsRunnablePosted fDisplay asyncExec fRunnable
public void input Document About To Be Changed I Document old Input I Document new Input if old Input null f Local Last Edit Position null old Input remove Position f Local Last Edit Position f Local Last Edit Position null  inputDocumentAboutToBeChanged IDocument oldInput IDocument newInput oldInput fLocalLastEditPosition oldInput removePosition fLocalLastEditPosition fLocalLastEditPosition
see org eclipse jface text I Text Input Listener input Document Changed org eclipse jface text I Document org eclipse jface text I Document public void input Document Changed I Document old Input I Document new Input  ITextInputListener inputDocumentChanged IDocument IDocument inputDocumentChanged IDocument oldInput IDocument newInput
see I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event handle Preference Store Changed event  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent handlePreferenceStoreChanged
public void property Change Property Change Event event if f Source Viewer null return String property event get Property if get Font Property Preference Key equals property initialize Viewer Font f Source Viewer update Caret  propertyChange PropertyChangeEvent fSourceViewer getProperty getFontPropertyPreferenceKey initializeViewerFont fSourceViewer updateCaret
public void verify Key Verify Event event Action Activation Code code null int size f Activation Codes size for int i 0 i size i code Action Activation Code f Activation Codes get i if code matches event I Action action get Action code f Action Id if action null if action instanceof I Update I Update action update if action is Enabled action instanceof I Read Only Dependent I Read Only Dependent dependent I Read Only Dependent action boolean writable dependent is Enabled true if writable event doit false return else if action is Enabled event doit false action run return  verifyKey VerifyEvent ActionActivationCode fActivationCodes ActionActivationCode fActivationCodes IAction getAction fActionId IUpdate IUpdate isEnabled IReadOnlyDependent IReadOnlyDependent IReadOnlyDependent isEnabled isEnabled
Installs this trigger on the editor s text widget since 2 0 public void install if f Is Installed if f Source Viewer instanceof I Text Viewer Extension I Text Viewer Extension e I Text Viewer Extension f Source Viewer e prepend Verify Key Listener this else Styled Text text f Source Viewer get Text Widget text add Verify Key Listener this f Key Binding Service get Editor Site get Key Binding Service f Is Installed true  fIsInstalled fSourceViewer ITextViewerExtension ITextViewerExtension ITextViewerExtension fSourceViewer prependVerifyKeyListener StyledText fSourceViewer getTextWidget addVerifyKeyListener fKeyBindingService getEditorSite getKeyBindingService fIsInstalled
Uninstalls this trigger from the editor s text widget since 2 0 public void uninstall if f Is Installed if f Source Viewer instanceof I Text Viewer Extension I Text Viewer Extension e I Text Viewer Extension f Source Viewer e remove Verify Key Listener this else if f Source Viewer null Styled Text text f Source Viewer get Text Widget if text null text is Disposed text remove Verify Key Listener f Activation Code Trigger f Is Installed false f Key Binding Service null  fIsInstalled fSourceViewer ITextViewerExtension ITextViewerExtension ITextViewerExtension fSourceViewer removeVerifyKeyListener fSourceViewer StyledText fSourceViewer getTextWidget isDisposed removeVerifyKeyListener fActivationCodeTrigger fIsInstalled fKeyBindingService
Registers the given action for key activation param action the action to be registered since 2 0 public void register Action For Key Activation I Action action if action get Action Definition Id null f Key Binding Service register Action action  registerActionForKeyActivation IAction getActionDefinitionId fKeyBindingService registerAction
The given action is no longer available for key activation param action the action to be unregistered since 2 0 public void unregister Action From Key Activation I Action action if action get Action Definition Id null f Key Binding Service unregister Action action  unregisterActionFromKeyActivation IAction getActionDefinitionId fKeyBindingService unregisterAction
Sets the keybindings scopes for this editor param key Binding Scopes the keybinding scopes since 2 1 public void set Scopes String key Binding Scopes if key Binding Scopes null key Binding Scopes length 0 f Key Binding Service set Scopes key Binding Scopes  keyBindingScopes setScopes keyBindingScopes keyBindingScopes keyBindingScopes fKeyBindingService setScopes keyBindingScopes
Creates a new action activation code for the given action id param action Id the action id public Action Activation Code String action Id f Action Id action Id  actionId ActionActivationCode actionId fActionId actionId
Returns code true code if this activation code matches the given verify event param event the event to test for matching return whether this activation code matches code event code public boolean matches Verify Event event return event character f Character f Key Code 1 event key Code f Key Code f State Mask SWT DEFAULT event state Mask f State Mask  VerifyEvent fCharacter fKeyCode keyCode fKeyCode fStateMask stateMask fStateMask
see I Part Listener part Activated org eclipse ui I Workbench Part public void part Activated I Workbench Part part f Active Part part handle Activation  IPartListener partActivated IWorkbenchPart partActivated IWorkbenchPart fActivePart handleActivation
see I Part Listener part Brought To Top org eclipse ui I Workbench Part public void part Brought To Top I Workbench Part part  IPartListener partBroughtToTop IWorkbenchPart partBroughtToTop IWorkbenchPart
see I Part Listener part Closed org eclipse ui I Workbench Part public void part Closed I Workbench Part part  IPartListener partClosed IWorkbenchPart partClosed IWorkbenchPart
see I Part Listener part Deactivated org eclipse ui I Workbench Part public void part Deactivated I Workbench Part part f Active Part null  IPartListener partDeactivated IWorkbenchPart partDeactivated IWorkbenchPart fActivePart
see I Part Listener part Opened org eclipse ui I Workbench Part public void part Opened I Workbench Part part  IPartListener partOpened IWorkbenchPart partOpened IWorkbenchPart
e widget get Display async Exec new Runnable public void run handle Activation  getDisplay asyncExec handleActivation
public void shell Activated Shell Event e Workaround for problem described in http dev eclipse org bugs show bug cgi id 11731 Will be removed when SWT has solved the problem e widget get Display async Exec new Runnable public void run handle Activation  shellActivated ShellEvent show_bug getDisplay asyncExec handleActivation
Handles the activation triggering a element state check in the editor private void handle Activation if f Is Handling Activation return if f Active Part Abstract Text Editor this f Is Handling Activation true try safely Sanity Check State get Editor Input finally f Is Handling Activation false  handleActivation fIsHandlingActivation fActivePart AbstractTextEditor fIsHandlingActivation safelySanityCheckState getEditorInput fIsHandlingActivation
Creates a new mapping param action Id the action id param action the Styled Text action public Id Map Entry String action Id int action f Action Id action Id f Action action  actionId StyledText IdMapEntry actionId fActionId actionId fAction
Returns the action id return the action id public String get Action Id return f Action Id  getActionId fActionId
Returns the action return the action public int get Action return f Action  getAction fAction
Creates a new scroll action that scroll the given number of lines If the increment is lt 0 it s scrolling up if gt 0 it s scrolling down param scroll Increment the number of lines to scroll public Scroll Lines Action int scroll Increment f Scroll Increment scroll Increment  scrollIncrement ScrollLinesAction scrollIncrement fScrollIncrement scrollIncrement
public void run I Source Viewer viewer get Source Viewer if viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 viewer Styled Text text Widget viewer get Text Widget int top Index text Widget get Top Index int new Top Index Math max 0 top Index f Scroll Increment viewer set Top Index extension widget Line2 Model Line new Top Index else int top Index viewer get Top Index int new Top Index Math max 0 top Index f Scroll Increment viewer set Top Index new Top Index  ISourceViewer getSourceViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 StyledText textWidget getTextWidget topIndex textWidget getTopIndex newTopIndex topIndex fScrollIncrement setTopIndex widgetLine2ModelLine newTopIndex topIndex getTopIndex newTopIndex topIndex fScrollIncrement setTopIndex newTopIndex
class Toggle Insert Mode Action extends Resource Action public Toggle Insert Mode Action Resource Bundle bundle String prefix super bundle prefix I Action AS CHECK BOX  ToggleInsertModeAction ResourceAction ToggleInsertModeAction ResourceBundle IAction AS_CHECK_BOX
see org eclipse jface action I Action run public void run switch To Next Insert Mode  IAction switchToNextInsertMode
since 3 0 public boolean is Checked return f Insert Mode SMART INSERT  isChecked fInsertMode SMART_INSERT
class Toggle Overwrite Mode Action extends Resource Action public Toggle Overwrite Mode Action Resource Bundle bundle String prefix super bundle prefix  ToggleOverwriteModeAction ResourceAction ToggleOverwriteModeAction ResourceBundle
see org eclipse jface action I Action run public void run toggle Overwrite Mode  IAction toggleOverwriteMode
Create a new line end action param text Widget the styled text widget param do Select a boolean flag which tells if the text up to the line end should be selected public Line End Action Styled Text text Widget boolean do Select super text Widget ST LINE END f Do Select do Select  textWidget doSelect LineEndAction StyledText textWidget doSelect textWidget LINE_END fDoSelect doSelect
public void run boolean is Smart Home End Enabled false I Preference Store store get Preference Store if store null is Smart Home End Enabled store get Boolean Abstract Text Editor PREFERENCE NAVIGATION SMART HOME END Styled Text st get Source Viewer get Text Widget if st null st is Disposed return int caret Offset st get Caret Offset int line Number st get Line At Offset caret Offset int line Offset st get Offset At Line line Number int line Length try int caret Offset In Document widget Offset2 Model Offset get Source Viewer caret Offset line Length get Source Viewer get Document get Line Information Of Offset caret Offset In Document get Length catch Bad Location Exception ex return int line End Offset line Offset line Length int delta line End Offset st get Char Count if delta 0 line End Offset delta line Length delta String line NON NLS 1 if line Length 0 line st get Text line Offset line End Offset 1 int i line Length 1 while i 1 Character is Whitespace line char At i i i Remember current selection Point old Selection st get Selection Compute new caret position int new Caret Offset 1 if is Smart Home End Enabled if caret Offset line Offset i to end of line new Caret Offset line End Offset else to end of text new Caret Offset line Offset i else if caret Offset line End Offset to end of line new Caret Offset line End Offset if new Caret Offset 1 new Caret Offset caret Offset else st set Caret Offset new Caret Offset st set Caret Offset new Caret Offset if f Do Select if caret Offset old Selection y st set Selection old Selection y new Caret Offset else st set Selection old Selection x new Caret Offset else st set Selection new Caret Offset fire Selection Changed old Selection  isSmartHomeEndEnabled IPreferenceStore getPreferenceStore isSmartHomeEndEnabled getBoolean AbstractTextEditor PREFERENCE_NAVIGATION_SMART_HOME_END StyledText getSourceViewer getTextWidget isDisposed caretOffset getCaretOffset lineNumber getLineAtOffset caretOffset lineOffset getOffsetAtLine lineNumber lineLength caretOffsetInDocument widgetOffset2ModelOffset getSourceViewer caretOffset lineLength getSourceViewer getDocument getLineInformationOfOffset caretOffsetInDocument getLength BadLocationException lineEndOffset lineOffset lineLength lineEndOffset getCharCount lineEndOffset lineLength lineLength getText lineOffset lineEndOffset lineLength isWhitespace charAt oldSelection getSelection newCaretOffset isSmartHomeEndEnabled caretOffset lineOffset newCaretOffset lineEndOffset newCaretOffset lineOffset caretOffset lineEndOffset newCaretOffset lineEndOffset newCaretOffset newCaretOffset caretOffset setCaretOffset newCaretOffset setCaretOffset newCaretOffset fDoSelect caretOffset oldSelection setSelection oldSelection newCaretOffset setSelection oldSelection newCaretOffset setSelection newCaretOffset fireSelectionChanged oldSelection
Creates a new line start action param text Widget the styled text widget param do Select a boolean flag which tells if the text up to the beginning of the line should be selected public Line Start Action final Styled Text text Widget final boolean do Select super text Widget ST LINE START f Do Select do Select  textWidget doSelect LineStartAction StyledText textWidget doSelect textWidget LINE_START fDoSelect doSelect
Computes the offset of the line start position param document The document where to compute the line start position param line The line to determine the start position of param length The length of the line param offset The caret position in the document return The offset of the line start since 3 0 protected int get Line Start Position final I Document document final String line final int length final int offset int index 0 while index length Character is Whitespace line char At index index return index  getLineStartPosition IDocument isWhitespace charAt
public void run boolean is Smart Home End Enabled false I Preference Store store get Preference Store if store null is Smart Home End Enabled store get Boolean Abstract Text Editor PREFERENCE NAVIGATION SMART HOME END Styled Text st get Source Viewer get Text Widget if st null st is Disposed return int caret Offset st get Caret Offset int line Number st get Line At Offset caret Offset int line Offset st get Offset At Line line Number int line Length int caret Offset In Document final I Document document get Source Viewer get Document try caret Offset In Document widget Offset2 Model Offset get Source Viewer caret Offset line Length document get Line Information Of Offset caret Offset In Document get Length catch Bad Location Exception ex return String line NON NLS 1 if line Length 0 int end line Offset line Length 1 end Math min end st get Char Count 1 line st get Text line Offset end Compute the line start offset int index get Line Start Position document line line Length caret Offset In Document Remember current selection Point old Selection st get Selection Compute new caret position int new Caret Offset 1 if is Smart Home End Enabled if caret Offset line Offset index to beginning of line new Caret Offset line Offset else to beginning of text new Caret Offset line Offset index else if caret Offset line Offset to beginning of line new Caret Offset line Offset if new Caret Offset 1 new Caret Offset caret Offset else st set Caret Offset new Caret Offset if f Do Select if caret Offset old Selection y st set Selection old Selection y new Caret Offset else st set Selection old Selection x new Caret Offset else st set Selection new Caret Offset fire Selection Changed old Selection  isSmartHomeEndEnabled IPreferenceStore getPreferenceStore isSmartHomeEndEnabled getBoolean AbstractTextEditor PREFERENCE_NAVIGATION_SMART_HOME_END StyledText getSourceViewer getTextWidget isDisposed caretOffset getCaretOffset lineNumber getLineAtOffset caretOffset lineOffset getOffsetAtLine lineNumber lineLength caretOffsetInDocument IDocument getSourceViewer getDocument caretOffsetInDocument widgetOffset2ModelOffset getSourceViewer caretOffset lineLength getLineInformationOfOffset caretOffsetInDocument getLength BadLocationException lineLength lineOffset lineLength getCharCount getText lineOffset getLineStartPosition lineLength caretOffsetInDocument oldSelection getSelection newCaretOffset isSmartHomeEndEnabled caretOffset lineOffset newCaretOffset lineOffset newCaretOffset lineOffset caretOffset lineOffset newCaretOffset lineOffset newCaretOffset newCaretOffset caretOffset setCaretOffset newCaretOffset fDoSelect caretOffset oldSelection setSelection oldSelection newCaretOffset setSelection oldSelection newCaretOffset setSelection newCaretOffset fireSelectionChanged oldSelection
public void run if f Source Viewer null return Styled Text text f Source Viewer get Text Widget if text null text is Disposed return Point location text get Location At Offset text get Caret Offset location x 0 if f Vertical Ruler instanceof I Vertical Ruler Extension I Vertical Ruler Extension f Vertical Ruler set Location Of Last Mouse Button Activity location x location y location text to Display location f Ruler Context Menu set Location location x location y f Ruler Context Menu set Visible true  fSourceViewer StyledText fSourceViewer getTextWidget isDisposed getLocationAtOffset getCaretOffset fVerticalRuler IVerticalRulerExtension IVerticalRulerExtension fVerticalRuler setLocationOfLastMouseButtonActivity toDisplay fRulerContextMenu setLocation fRulerContextMenu setVisible
see org eclipse jface viewers I Selection Provider add Selection Changed Listener I Selection Changed Listener public void add Selection Changed Listener I Selection Changed Listener listener if f Source Viewer null f Source Viewer get Selection Provider add Selection Changed Listener listener  ISelectionProvider addSelectionChangedListener ISelectionChangedListener addSelectionChangedListener ISelectionChangedListener fSourceViewer fSourceViewer getSelectionProvider addSelectionChangedListener
see org eclipse jface viewers I Selection Provider get Selection public I Selection get Selection return do Get Selection  ISelectionProvider getSelection ISelection getSelection doGetSelection
see org eclipse jface viewers I Selection Provider remove Selection Changed Listener I Selection Changed Listener public void remove Selection Changed Listener I Selection Changed Listener listener if f Source Viewer null f Source Viewer get Selection Provider remove Selection Changed Listener listener  ISelectionProvider removeSelectionChangedListener ISelectionChangedListener removeSelectionChangedListener ISelectionChangedListener fSourceViewer fSourceViewer getSelectionProvider removeSelectionChangedListener
see org eclipse jface viewers I Selection Provider set Selection I Selection public void set Selection I Selection selection do Set Selection selection  ISelectionProvider setSelection ISelection setSelection ISelection doSetSelection
public void add Post Selection Changed Listener I Selection Changed Listener listener if f Source Viewer null if f Source Viewer get Selection Provider instanceof I Post Selection Provider I Post Selection Provider provider I Post Selection Provider f Source Viewer get Selection Provider provider add Post Selection Changed Listener listener  addPostSelectionChangedListener ISelectionChangedListener fSourceViewer fSourceViewer getSelectionProvider IPostSelectionProvider IPostSelectionProvider IPostSelectionProvider fSourceViewer getSelectionProvider addPostSelectionChangedListener
public void remove Post Selection Changed Listener I Selection Changed Listener listener if f Source Viewer null if f Source Viewer get Selection Provider instanceof I Post Selection Provider I Post Selection Provider provider I Post Selection Provider f Source Viewer get Selection Provider provider remove Post Selection Changed Listener listener  removePostSelectionChangedListener ISelectionChangedListener fSourceViewer fSourceViewer getSelectionProvider IPostSelectionProvider IPostSelectionProvider IPostSelectionProvider fSourceViewer getSelectionProvider removePostSelectionChangedListener
since 3 0 public boolean is Valid I Selection post Selection return f Selection Listener null f Selection Listener is Valid post Selection  isValid ISelection postSelection fSelectionListener fSelectionListener isValid postSelection
Installs this selection changed listener with the given selection provider If the selection provider is a post selection provider post selection changed events are the preferred choice otherwise normal selection changed events are requested param selection Provider public void install I Selection Provider selection Provider if selection Provider null return if selection Provider instanceof I Post Selection Provider I Post Selection Provider provider I Post Selection Provider selection Provider provider add Post Selection Changed Listener this else selection Provider add Selection Changed Listener this  selectionProvider ISelectionProvider selectionProvider selectionProvider selectionProvider IPostSelectionProvider IPostSelectionProvider IPostSelectionProvider selectionProvider addPostSelectionChangedListener selectionProvider addSelectionChangedListener
Removes this selection changed listener from the given selection provider param selection Provider the selection provider public void uninstall I Selection Provider selection Provider if selection Provider null return if selection Provider instanceof I Post Selection Provider I Post Selection Provider provider I Post Selection Provider selection Provider provider remove Post Selection Changed Listener this else selection Provider remove Selection Changed Listener this  selectionProvider ISelectionProvider selectionProvider selectionProvider selectionProvider IPostSelectionProvider IPostSelectionProvider IPostSelectionProvider selectionProvider removePostSelectionChangedListener selectionProvider removeSelectionChangedListener
see org eclipse jface viewers I Selection Changed Listener selection Changed org eclipse jface viewers Selection Changed Event public synchronized void selection Changed Selection Changed Event event f Post Selection event get Selection  ISelectionChangedListener selectionChanged SelectionChangedEvent selectionChanged SelectionChangedEvent fPostSelection getSelection
since 3 0 public synchronized void document About To Be Changed Document Event event f Post Selection INVALID SELECTION  documentAboutToBeChanged DocumentEvent fPostSelection INVALID_SELECTION
since 3 0 public void document Changed Document Event event  documentChanged DocumentEvent
public synchronized boolean is Valid I Selection selection return f Post Selection INVALID SELECTION f Post Selection selection  isValid ISelection fPostSelection INVALID_SELECTION fPostSelection
public void set Document I Document document if f Document null f Document remove Document Listener this f Document document if f Document null f Document add Document Listener this  setDocument IDocument fDocument fDocument removeDocumentListener fDocument fDocument fDocument addDocumentListener
public void install I Selection Provider selection Provider super install selection Provider if selection Provider null selection Provider add Selection Changed Listener this  ISelectionProvider selectionProvider selectionProvider selectionProvider selectionProvider addSelectionChangedListener
public void uninstall I Selection Provider selection Provider if selection Provider null selection Provider remove Selection Changed Listener this if f Document null f Document remove Document Listener this f Document null super uninstall selection Provider  ISelectionProvider selectionProvider selectionProvider selectionProvider removeSelectionChangedListener fDocument fDocument removeDocumentListener fDocument selectionProvider
public int f Value public String to String return String value Of f Value  fValue toString valueOf fValue
Creates a new text editor If not explicitly set this editor uses a code Source Viewer Configuration code to configure its source viewer This viewer does not have a range indicator installed nor any menu id set By default the created editor runs in 1 0 context menu registration compatibility mode protected Abstract Text Editor super f Editor Context Menu Id null f Ruler Context Menu Id null f Help Context Id null  SourceViewerConfiguration AbstractTextEditor fEditorContextMenuId fRulerContextMenuId fHelpContextId
see I Text Editor get Document Provider public I Document Provider get Document Provider return f Explicit Document Provider  ITextEditor getDocumentProvider IDocumentProvider getDocumentProvider fExplicitDocumentProvider
Returns the editor s range indicator May return code null code if no range indicator is installed return the editor s range indicator which may be code null code protected final Annotation get Range Indicator return f Range Indicator  getRangeIndicator fRangeIndicator
Returns the editor s source viewer configuration May return code null code before the editor s part has been created and after disposal return the editor s source viewer configuration which may be code null code protected final Source Viewer Configuration get Source Viewer Configuration return f Configuration  SourceViewerConfiguration getSourceViewerConfiguration fConfiguration
Returns the editor s source viewer May return code null code before the editor s part has been created and after disposal return the editor s source viewer which may be code null code protected final I Source Viewer get Source Viewer return f Source Viewer  ISourceViewer getSourceViewer fSourceViewer
Returns the editor s vertical ruler May return code null code before the editor s part has been created and after disposal return the editor s vertical ruler which may be code null code protected final I Vertical Ruler get Vertical Ruler return f Vertical Ruler  IVerticalRuler getVerticalRuler fVerticalRuler
Returns the editor s context menu id May return code null code before the editor s part has been created return the editor s context menu id which may be code null code protected final String get Editor Context Menu Id return f Editor Context Menu Id  getEditorContextMenuId fEditorContextMenuId
Returns the ruler s context menu id May return code null code before the editor s part has been created return the ruler s context menu id which may be code null code protected final String get Ruler Context Menu Id return f Ruler Context Menu Id  getRulerContextMenuId fRulerContextMenuId
Returns the editor s help context id or code null code if none has been set return the editor s help context id which may be code null code protected final String get Help Context Id return f Help Context Id  getHelpContextId fHelpContextId
Returns this editor s preference store or code null code if none has been set return this editor s preference store which may be code null code protected final I Preference Store get Preference Store return f Preference Store  IPreferenceStore getPreferenceStore fPreferenceStore
Sets this editor s document provider This method must be called before the editor s control is created param provider the document provider protected void set Document Provider I Document Provider provider Assert is Not Null provider f Explicit Document Provider provider  setDocumentProvider IDocumentProvider isNotNull fExplicitDocumentProvider
Sets this editor s source viewer configuration used to configure its internal source viewer This method must be called before the editor s control is created If not this editor uses a code Source Viewer Configuration code param configuration the source viewer configuration object protected void set Source Viewer Configuration Source Viewer Configuration configuration Assert is Not Null configuration f Configuration configuration  SourceViewerConfiguration setSourceViewerConfiguration SourceViewerConfiguration isNotNull fConfiguration
Sets the annotation which this editor uses to represent the highlight range if the editor is configured to show the entire document If the range indicator is not set this editor will not show a range indication param range Indicator the annotation protected void set Range Indicator Annotation range Indicator Assert is Not Null range Indicator f Range Indicator range Indicator  rangeIndicator setRangeIndicator rangeIndicator isNotNull rangeIndicator fRangeIndicator rangeIndicator
Sets this editor s context menu id param context Menu Id the context menu id protected void set Editor Context Menu Id String context Menu Id Assert is Not Null context Menu Id f Editor Context Menu Id context Menu Id  contextMenuId setEditorContextMenuId contextMenuId isNotNull contextMenuId fEditorContextMenuId contextMenuId
Sets the ruler s context menu id param context Menu Id the context menu id protected void set Ruler Context Menu Id String context Menu Id Assert is Not Null context Menu Id f Ruler Context Menu Id context Menu Id  contextMenuId setRulerContextMenuId contextMenuId isNotNull contextMenuId fRulerContextMenuId contextMenuId
Sets the context menu registration 1 0 compatibility mode See class description for more details param compatible code true code if compatibility mode is enabled since 2 0 protected final void set Compatibility Mode boolean compatible f Compatibility Mode compatible  setCompatibilityMode fCompatibilityMode
Sets the editor s help context id param help Context Id the help context id protected void set Help Context Id String help Context Id Assert is Not Null help Context Id f Help Context Id help Context Id  helpContextId setHelpContextId helpContextId isNotNull helpContextId fHelpContextId helpContextId
Sets the keybinding scopes for this editor param scopes a non empty array of keybinding scope identifiers since 2 1 protected void set Key Binding Scopes String scopes Assert is True scopes null scopes length 0 f Key Binding Scopes scopes  setKeyBindingScopes isTrue fKeyBindingScopes
Sets this editor s preference store This method must be called before the editor s control is created param store the preference store or code null code to unset the preference store protected void set Preference Store I Preference Store store if f Preference Store null f Preference Store remove Property Change Listener f Property Change Listener f Preference Store store if f Preference Store null f Preference Store add Property Change Listener f Property Change Listener  setPreferenceStore IPreferenceStore fPreferenceStore fPreferenceStore removePropertyChangeListener fPropertyChangeListener fPreferenceStore fPreferenceStore fPreferenceStore addPropertyChangeListener fPropertyChangeListener
public boolean is Editable I Document Provider provider get Document Provider if provider instanceof I Document Provider Extension I Document Provider Extension extension I Document Provider Extension provider return extension is Modifiable get Editor Input return false  isEditable IDocumentProvider getDocumentProvider IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension isModifiable getEditorInput
inherit Doc p Returns code null code after disposal p return the selection provider or code null code if the editor has been disposed public I Selection Provider get Selection Provider return f Selection Provider  inheritDoc ISelectionProvider getSelectionProvider fSelectionProvider
Remembers the current selection of this editor This method is called when e g the content of the editor is about to be reverted to the saved state This method remembers the selection in a semantic format i e in a format which allows to restore the selection even if the originally selected text is no longer part of the editor s content p Subclasses should implement this method including all necessary state This default implementation remembers the textual range only and is thus purely syntactic p see restore Selection since 2 0 protected void remember Selection f Remembered Selection do Get Selection  restoreSelection rememberSelection fRememberedSelection doGetSelection
Returns the current selection return I Selection since 2 1 protected I Selection do Get Selection I Selection Provider sp null if f Source Viewer null sp f Source Viewer get Selection Provider return sp null null sp get Selection  ISelection ISelection doGetSelection ISelectionProvider fSourceViewer fSourceViewer getSelectionProvider getSelection
Restores a selection previously remembered by code remember Selection code Subclasses may reimplement this method and thereby semantically adapt the remembered selection This default implementation just selects the remembered textual range see remember Selection since 2 0 protected void restore Selection if f Remembered Selection instanceof I Text Selection I Text Selection text Selection I Text Selection f Remembered Selection if is Valid Selection text Selection get Offset text Selection get Length do Set Selection f Remembered Selection f Remembered Selection null  rememberSelection rememberSelection restoreSelection fRememberedSelection ITextSelection ITextSelection textSelection ITextSelection fRememberedSelection isValidSelection textSelection getOffset textSelection getLength doSetSelection fRememberedSelection fRememberedSelection
Tells whether the given selection is valid param offset the offset of the selection param length the length of the selection return code true code if the selection is valid since 2 1 private boolean is Valid Selection int offset int length I Document Provider provider get Document Provider if provider null I Document document provider get Document get Editor Input if document null int end offset length int document Length document get Length return 0 offset offset document Length 0 end end document Length return false  isValidSelection IDocumentProvider getDocumentProvider IDocument getDocument getEditorInput documentLength getLength documentLength documentLength
Sets the given selection param selection since 2 1 protected void do Set Selection I Selection selection if selection instanceof I Text Selection I Text Selection text Selection I Text Selection selection select And Reveal text Selection get Offset text Selection get Length  doSetSelection ISelection ITextSelection ITextSelection textSelection ITextSelection selectAndReveal textSelection getOffset textSelection getLength
public void menu About To Show I Menu Manager menu String id menu get Id if get Ruler Context Menu Id equals id set Focus ruler Context Menu About To Show menu else if get Editor Context Menu Id equals id set Focus editor Context Menu About To Show menu  menuAboutToShow IMenuManager getId getRulerContextMenuId setFocus rulerContextMenuAboutToShow getEditorContextMenuId setFocus editorContextMenuAboutToShow
Creates and returns the listener on this editor s context menus return the menu listener protected final I Menu Listener get Context Menu Listener if f Menu Listener null f Menu Listener new I Menu Listener public void menu About To Show I Menu Manager menu String id menu get Id if get Ruler Context Menu Id equals id set Focus ruler Context Menu About To Show menu else if get Editor Context Menu Id equals id set Focus editor Context Menu About To Show menu return f Menu Listener  IMenuListener getContextMenuListener fMenuListener fMenuListener IMenuListener menuAboutToShow IMenuManager getId getRulerContextMenuId setFocus rulerContextMenuAboutToShow getEditorContextMenuId setFocus editorContextMenuAboutToShow fMenuListener
Creates and returns the listener on this editor s vertical ruler return the mouse listener protected final Mouse Listener get Ruler Mouse Listener if f Mouse Listener null f Mouse Listener new Mouse Listener private boolean f Double Clicked false private void trigger Action String actionID I Action action get Action actionID if action null if action instanceof I Update I Update action update if action is Enabled action run public void mouse Up Mouse Event e set Focus if 1 e button f Double Clicked trigger Action I Text Editor Action Constants RULER CLICK f Double Clicked false public void mouse Double Click Mouse Event e if 1 e button f Double Clicked true trigger Action I Text Editor Action Constants RULER DOUBLE CLICK public void mouse Down Mouse Event e Styled Text text f Source Viewer get Text Widget if text null text is Disposed Display display text get Display Point location display get Cursor Location f Ruler Context Menu set Location location x location y return f Mouse Listener  MouseListener getRulerMouseListener fMouseListener fMouseListener MouseListener fDoubleClicked triggerAction IAction getAction IUpdate IUpdate isEnabled mouseUp MouseEvent setFocus fDoubleClicked triggerAction ITextEditorActionConstants RULER_CLICK fDoubleClicked mouseDoubleClick MouseEvent fDoubleClicked triggerAction ITextEditorActionConstants RULER_DOUBLE_CLICK mouseDown MouseEvent StyledText fSourceViewer getTextWidget isDisposed getDisplay getCursorLocation fRulerContextMenu setLocation fMouseListener
private Runnable f Runnable new Runnable public void run check whether editor has not been disposed yet if f Source Viewer null f Source Viewer get Document null update Selection Dependent Actions  fRunnable fSourceViewer fSourceViewer getDocument updateSelectionDependentActions
public void selection Changed Selection Changed Event event if f Display null f Display get Site get Shell get Display f Display async Exec f Runnable handle Cursor Position Changed  selectionChanged SelectionChangedEvent fDisplay fDisplay getSite getShell getDisplay fDisplay asyncExec fRunnable handleCursorPositionChanged
Returns this editor s selection changed listener to be installed on the editor s source viewer return the listener protected final I Selection Changed Listener get Selection Changed Listener if f Selection Changed Listener null f Selection Changed Listener new I Selection Changed Listener private Runnable f Runnable new Runnable public void run check whether editor has not been disposed yet if f Source Viewer null f Source Viewer get Document null update Selection Dependent Actions private Display f Display public void selection Changed Selection Changed Event event if f Display null f Display get Site get Shell get Display f Display async Exec f Runnable handle Cursor Position Changed return f Selection Changed Listener  ISelectionChangedListener getSelectionChangedListener fSelectionChangedListener fSelectionChangedListener ISelectionChangedListener fRunnable fSourceViewer fSourceViewer getDocument updateSelectionDependentActions fDisplay selectionChanged SelectionChangedEvent fDisplay fDisplay getSite getShell getDisplay fDisplay asyncExec fRunnable handleCursorPositionChanged fSelectionChangedListener
f Cursor Listener new I Cursor Listener public void key Pressed Key Event e handle Cursor Position Changed  fCursorListener ICursorListener keyPressed KeyEvent handleCursorPositionChanged
public void key Released Key Event e  keyReleased KeyEvent
public void mouse Double Click Mouse Event e  mouseDoubleClick MouseEvent
public void mouse Down Mouse Event e  mouseDown MouseEvent
public void mouse Up Mouse Event e handle Cursor Position Changed  mouseUp MouseEvent handleCursorPositionChanged
Returns this editor s cursor listener to be installed on the editor s source viewer This listener is listening to key and mouse button events It triggers the updating of the status line by calling code handle Cursor Position Changed code return the listener since 2 0 protected final I Cursor Listener get Cursor Listener if f Cursor Listener null f Cursor Listener new I Cursor Listener public void key Pressed Key Event e handle Cursor Position Changed public void key Released Key Event e public void mouse Double Click Mouse Event e public void mouse Down Mouse Event e public void mouse Up Mouse Event e handle Cursor Position Changed return f Cursor Listener  handleCursorPositionChanged ICursorListener getCursorListener fCursorListener fCursorListener ICursorListener keyPressed KeyEvent handleCursorPositionChanged keyReleased KeyEvent mouseDoubleClick MouseEvent mouseDown MouseEvent mouseUp MouseEvent handleCursorPositionChanged fCursorListener
I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try if get Document Provider instanceof I Document Provider Extension2 I Document Provider Extension2 extension I Document Provider Extension2 get Document Provider extension set Progress Monitor monitor do Set Input input catch Core Exception x throw new Invocation Target Exception x finally if get Document Provider instanceof I Document Provider Extension2 I Document Provider Extension2 extension I Document Provider Extension2 get Document Provider extension set Progress Monitor null  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException getDocumentProvider IDocumentProviderExtension2 IDocumentProviderExtension2 IDocumentProviderExtension2 getDocumentProvider setProgressMonitor doSetInput CoreException InvocationTargetException getDocumentProvider IDocumentProviderExtension2 IDocumentProviderExtension2 IDocumentProviderExtension2 getDocumentProvider setProgressMonitor
Implements the code init code method of code I Editor Part code Subclasses replacing code init code may choose to call this method in their implementation param window the site s workbench window param site the editor s site param input the editor input for the editor being created throws Part Init Exception if link do Set Input I Editor Input fails or gets canceled see org eclipse ui I Editor Part init org eclipse ui I Editor Site org eclipse ui I Editor Input since 2 1 protected final void internal Init I Workbench Window window final I Editor Site site final I Editor Input input throws Part Init Exception I Runnable With Progress runnable new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try if get Document Provider instanceof I Document Provider Extension2 I Document Provider Extension2 extension I Document Provider Extension2 get Document Provider extension set Progress Monitor monitor do Set Input input catch Core Exception x throw new Invocation Target Exception x finally if get Document Provider instanceof I Document Provider Extension2 I Document Provider Extension2 extension I Document Provider Extension2 get Document Provider extension set Progress Monitor null try window run false true runnable catch Interrupted Exception x catch Invocation Target Exception x Throwable t x get Target Exception if t instanceof Core Exception throw new Part Init Exception Core Exception t get Status throw new Part Init Exception new Status I Status ERROR Text Editor Plugin PLUGIN ID I Status OK Editor Messages get String Editor error init t NON NLS 1  IEditorPart PartInitException doSetInput IEditorInput IEditorPart IEditorSite IEditorInput internalInit IWorkbenchWindow IEditorSite IEditorInput PartInitException IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException getDocumentProvider IDocumentProviderExtension2 IDocumentProviderExtension2 IDocumentProviderExtension2 getDocumentProvider setProgressMonitor doSetInput CoreException InvocationTargetException getDocumentProvider IDocumentProviderExtension2 IDocumentProviderExtension2 IDocumentProviderExtension2 getDocumentProvider setProgressMonitor InterruptedException InvocationTargetException getTargetException CoreException PartInitException CoreException getStatus PartInitException IStatus TextEditorPlugin PLUGIN_ID IStatus EditorMessages getString
public void init final I Editor Site site final I Editor Input input throws Part Init Exception set Site site I Workbench Window window get Site get Workbench Window internal Init window site input window get Part Service add Part Listener f Activation Listener window get Shell add Shell Listener f Activation Listener  IEditorSite IEditorInput PartInitException setSite IWorkbenchWindow getSite getWorkbenchWindow internalInit getPartService addPartListener fActivationListener getShell addShellListener fActivationListener
Creates the vertical ruler to be used by this editor Subclasses may re implement this method return the vertical ruler protected I Vertical Ruler create Vertical Ruler return new Vertical Ruler VERTICAL RULER WIDTH  IVerticalRuler createVerticalRuler VerticalRuler VERTICAL_RULER_WIDTH
Creates the source viewer to be used by this editor Subclasses may re implement this method param parent the parent control param ruler the vertical ruler param styles style bits code SWT WRAP code is currently not supported return the source viewer protected I Source Viewer create Source Viewer Composite parent I Vertical Ruler ruler int styles return new Source Viewer parent ruler styles  ISourceViewer createSourceViewer IVerticalRuler SourceViewer
Initializes the drag and drop support for the given viewer based on provided editor adapter for drop target listeners param viewer the viewer since 3 0 protected void initialize Drag And Drop I Source Viewer viewer I Text Editor Drop Target Listener listener I Text Editor Drop Target Listener get Adapter I Text Editor Drop Target Listener class if listener null Object object Platform get Adapter Manager load Adapter this org eclipse ui texteditor I Text Editor Drop Target Listener NON NLS 1 if object instanceof I Text Editor Drop Target Listener listener I Text Editor Drop Target Listener object if listener null Drop Target drop Target new Drop Target viewer get Text Widget DND DROP COPY DND DROP MOVE drop Target set Transfer listener get Transfers drop Target add Drop Listener listener  initializeDragAndDrop ISourceViewer ITextEditorDropTargetListener ITextEditorDropTargetListener getAdapter ITextEditorDropTargetListener getAdapterManager loadAdapter ITextEditorDropTargetListener ITextEditorDropTargetListener ITextEditorDropTargetListener DropTarget dropTarget DropTarget getTextWidget DROP_COPY DROP_MOVE dropTarget setTransfer getTransfers dropTarget addDropListener
The code Abstract Text Editor code implementation of this code I Workbench Part code method creates the vertical ruler and source viewer p Subclasses may extend this method Besides extending this method the behavior of code create Part Control code may be customized by calling extending or replacing the following methods br Subclasses may supply customized implementations for some members using the following methods before code create Part Control code is invoked ul li linkplain set Source Viewer Configuration Source Viewer Configuration set Source Viewer Configuration to supply a custom source viewer configuration li li linkplain set Range Indicator Annotation set Range Indicator to provide a range indicator li li linkplain set Help Context Id String set Help Context Id to provide a help context id li li linkplain set Editor Context Menu Id String set Editor Context Menu Id to set a custom context menu id li li linkplain set Ruler Context Menu Id String set Ruler Context Menu Id to set a custom ruler context menu id li ul br Subclasses may replace the following methods called from within code create Part Control code ul li linkplain create Vertical Ruler create Vertical Ruler to supply a custom vertical ruler li li linkplain create Source Viewer Composite I Vertical Ruler int create Source Viewer to supply a custom source viewer li li linkplain get Selection Provider get Selection Provider to supply a custom selection provider li ul br Subclasses may extend the following methods called from within code create Part Control code ul li linkplain initialize Viewer Colors I Source Viewer initialize Viewer Colors to customize the viewer color scheme may also be replaced li li linkplain initialize Drag And Drop I Source Viewer initialize Drag And Drop to customize drag and drop may also be replaced li li linkplain create Navigation Actions create Navigation Actions to add navigation actions li li linkplain create Actions create Actions to add text editor actions li ul p param parent the parent composite public void create Part Control Composite parent f Vertical Ruler create Vertical Ruler int styles SWT V SCROLL SWT H SCROLL SWT MULTI SWT BORDER SWT FULL SELECTION f Source Viewer create Source Viewer parent f Vertical Ruler styles if f Configuration null f Configuration new Source Viewer Configuration f Source Viewer configure f Configuration if f Range Indicator null f Source Viewer set Range Indicator f Range Indicator f Source Viewer add Text Listener f Text Listener f Source Viewer add Text Input Listener f Text Listener get Selection Provider add Selection Changed Listener get Selection Changed Listener initialize Viewer Font f Source Viewer initialize Viewer Colors f Source Viewer initialize Find Scope Color f Source Viewer initialize Drag And Drop f Source Viewer Styled Text styled Text f Source Viewer get Text Widget gestures commented out until proper solution i e preference page can be found for bug 28417 final Map gesture Map new Hash Map gesture Map put E org eclipse ui navigate forward History gesture Map put N org eclipse ui file save gesture Map put NW org eclipse ui file save All gesture Map put S org eclipse ui file close gesture Map put SW org eclipse ui file close All gesture Map put W org eclipse ui navigate backward History gesture Map put EN org eclipse ui edit copy gesture Map put ES org eclipse ui edit paste gesture Map put EW org eclipse ui edit cut Capture capture Capture create capture set Control styled Text capture add Capture Listener new Capture Listener public void gesture Gesture gesture if gesture get Pen 3 String action Id String gesture Map get Util recognize gesture get Points 20 if action Id null I Key Binding Service key Binding Service get Editor Site get Key Binding Service if key Binding Service instanceof Key Binding Service I Action action Key Binding Service key Binding Service get Action action Id if action null if action instanceof I Update I Update action update if action is Enabled action run return f Text Context Menu set Visible true styled Text add Mouse Listener get Cursor Listener styled Text add Key Listener get Cursor Listener if get Help Context Id null Workbench Help set Help styled Text get Help Context Id String id f Editor Context Menu Id null f Editor Context Menu Id DEFAULT EDITOR CONTEXT MENU ID Menu Manager manager new Menu Manager id id manager set Remove All When Shown true manager add Menu Listener get Context Menu Listener f Text Context Menu manager create Context Menu styled Text comment this line if using gestures above styled Text set Menu f Text Context Menu if f Editor Context Menu Id null get Site register Context Menu f Editor Context Menu Id manager get Selection Provider else if f Compatibility Mode get Site register Context Menu DEFAULT EDITOR CONTEXT MENU ID manager get Selection Provider if f Editor Context Menu Id null f Compatibility Mode f Editor Context Menu Id null String part Id get Site get Id if part Id null get Site register Context Menu part Id Editor Context manager get Selection Provider NON NLS 1 if f Editor Context Menu Id null f Editor Context Menu Id DEFAULT EDITOR CONTEXT MENU ID id f Ruler Context Menu Id null f Ruler Context Menu Id DEFAULT RULER CONTEXT MENU ID manager new Menu Manager id id manager set Remove All When Shown true manager add Menu Listener get Context Menu Listener Control ruler Control f Vertical Ruler get Control f Ruler Context Menu manager create Context Menu ruler Control ruler Control set Menu f Ruler Context Menu ruler Control add Mouse Listener get Ruler Mouse Listener if f Ruler Context Menu Id null get Site register Context Menu f Ruler Context Menu Id manager get Selection Provider else if f Compatibility Mode get Site register Context Menu DEFAULT RULER CONTEXT MENU ID manager get Selection Provider if f Ruler Context Menu Id null f Compatibility Mode f Ruler Context Menu Id null String part Id get Site get Id if part Id null get Site register Context Menu part Id Ruler Context manager get Selection Provider NON NLS 1 if f Ruler Context Menu Id null f Ruler Context Menu Id DEFAULT RULER CONTEXT MENU ID get Site set Selection Provider get Selection Provider f Selection Listener new Selection Listener f Selection Listener install get Selection Provider f Selection Listener set Document get Document Provider get Document get Editor Input initialize Activation Code Trigger create Navigation Actions create Accessibility Actions create Actions initialize Source Viewer get Editor Input J Face Resources get Font Registry add Listener f Font Property Change Listener  AbstractTextEditor IWorkbenchPart createPartControl createPartControl setSourceViewerConfiguration SourceViewerConfiguration setSourceViewerConfiguration setRangeIndicator setRangeIndicator setHelpContextId setHelpContextId setEditorContextMenuId setEditorContextMenuId setRulerContextMenuId setRulerContextMenuId createPartControl createVerticalRuler createVerticalRuler createSourceViewer IVerticalRuler createSourceViewer getSelectionProvider getSelectionProvider createPartControl initializeViewerColors ISourceViewer initializeViewerColors initializeDragAndDrop ISourceViewer initializeDragAndDrop createNavigationActions createNavigationActions createActions createActions createPartControl fVerticalRuler createVerticalRuler V_SCROLL H_SCROLL FULL_SELECTION fSourceViewer createSourceViewer fVerticalRuler fConfiguration fConfiguration SourceViewerConfiguration fSourceViewer fConfiguration fRangeIndicator fSourceViewer setRangeIndicator fRangeIndicator fSourceViewer addTextListener fTextListener fSourceViewer addTextInputListener fTextListener getSelectionProvider addSelectionChangedListener getSelectionChangedListener initializeViewerFont fSourceViewer initializeViewerColors fSourceViewer initializeFindScopeColor fSourceViewer initializeDragAndDrop fSourceViewer StyledText styledText fSourceViewer getTextWidget gestureMap HashMap gestureMap forwardHistory gestureMap gestureMap saveAll gestureMap gestureMap closeAll gestureMap backwardHistory gestureMap gestureMap gestureMap setControl styledText addCaptureListener CaptureListener getPen actionId gestureMap getPoints actionId IKeyBindingService keyBindingService getEditorSite getKeyBindingService keyBindingService KeyBindingService IAction KeyBindingService keyBindingService getAction actionId IUpdate IUpdate isEnabled fTextContextMenu setVisible styledText addMouseListener getCursorListener styledText addKeyListener getCursorListener getHelpContextId WorkbenchHelp setHelp styledText getHelpContextId fEditorContextMenuId fEditorContextMenuId DEFAULT_EDITOR_CONTEXT_MENU_ID MenuManager MenuManager setRemoveAllWhenShown addMenuListener getContextMenuListener fTextContextMenu createContextMenu styledText styledText setMenu fTextContextMenu fEditorContextMenuId getSite registerContextMenu fEditorContextMenuId getSelectionProvider fCompatibilityMode getSite registerContextMenu DEFAULT_EDITOR_CONTEXT_MENU_ID getSelectionProvider fEditorContextMenuId fCompatibilityMode fEditorContextMenuId partId getSite getId partId getSite registerContextMenu partId EditorContext getSelectionProvider fEditorContextMenuId fEditorContextMenuId DEFAULT_EDITOR_CONTEXT_MENU_ID fRulerContextMenuId fRulerContextMenuId DEFAULT_RULER_CONTEXT_MENU_ID MenuManager setRemoveAllWhenShown addMenuListener getContextMenuListener rulerControl fVerticalRuler getControl fRulerContextMenu createContextMenu rulerControl rulerControl setMenu fRulerContextMenu rulerControl addMouseListener getRulerMouseListener fRulerContextMenuId getSite registerContextMenu fRulerContextMenuId getSelectionProvider fCompatibilityMode getSite registerContextMenu DEFAULT_RULER_CONTEXT_MENU_ID getSelectionProvider fRulerContextMenuId fCompatibilityMode fRulerContextMenuId partId getSite getId partId getSite registerContextMenu partId RulerContext getSelectionProvider fRulerContextMenuId fRulerContextMenuId DEFAULT_RULER_CONTEXT_MENU_ID getSite setSelectionProvider getSelectionProvider fSelectionListener SelectionListener fSelectionListener getSelectionProvider fSelectionListener setDocument getDocumentProvider getDocument getEditorInput initializeActivationCodeTrigger createNavigationActions createAccessibilityActions createActions initializeSourceViewer getEditorInput JFaceResources getFontRegistry addListener fFontPropertyChangeListener
Initializes the activation code trigger since 2 1 private void initialize Activation Code Trigger f Activation Code Trigger install f Activation Code Trigger set Scopes f Key Binding Scopes  initializeActivationCodeTrigger fActivationCodeTrigger fActivationCodeTrigger setScopes fKeyBindingScopes
Initializes the given viewer s font param viewer the viewer since 2 0 private void initialize Viewer Font I Source Viewer viewer boolean is Shared Font true Font font null String symbolic Font Name get Symbolic Font Name if symbolic Font Name null font J Face Resources get Font symbolic Font Name else if f Preference Store null Backward compatibility if f Preference Store contains J Face Resources TEXT FONT f Preference Store is Default J Face Resources TEXT FONT Font Data data Preference Converter get Font Data f Preference Store J Face Resources TEXT FONT if data null is Shared Font false font new Font viewer get Text Widget get Display data if font null font J Face Resources get Text Font set Font viewer font if f Font null f Font dispose f Font null if is Shared Font f Font font  initializeViewerFont ISourceViewer isSharedFont symbolicFontName getSymbolicFontName symbolicFontName JFaceResources getFont symbolicFontName fPreferenceStore fPreferenceStore JFaceResources TEXT_FONT fPreferenceStore isDefault JFaceResources TEXT_FONT FontData PreferenceConverter getFontData fPreferenceStore JFaceResources TEXT_FONT isSharedFont getTextWidget getDisplay JFaceResources getTextFont setFont fFont fFont fFont isSharedFont fFont
Sets the font for the given viewer sustaining selection and scroll position param source Viewer the source viewer param font the font since 2 0 private void set Font I Source Viewer source Viewer Font font if source Viewer get Document null Point selection source Viewer get Selected Range int top Index source Viewer get Top Index Styled Text styled Text source Viewer get Text Widget Control parent styled Text if source Viewer instanceof I Text Viewer Extension I Text Viewer Extension extension I Text Viewer Extension source Viewer parent extension get Control parent set Redraw false styled Text set Font font if f Vertical Ruler instanceof I Vertical Ruler Extension I Vertical Ruler Extension e I Vertical Ruler Extension f Vertical Ruler e set Font font source Viewer set Selected Range selection x selection y source Viewer set Top Index top Index if parent instanceof Composite Composite composite Composite parent composite layout true parent set Redraw true else Styled Text styled Text source Viewer get Text Widget styled Text set Font font if f Vertical Ruler instanceof I Vertical Ruler Extension I Vertical Ruler Extension e I Vertical Ruler Extension f Vertical Ruler e set Font font  sourceViewer setFont ISourceViewer sourceViewer sourceViewer getDocument sourceViewer getSelectedRange topIndex sourceViewer getTopIndex StyledText styledText sourceViewer getTextWidget styledText sourceViewer ITextViewerExtension ITextViewerExtension ITextViewerExtension sourceViewer getControl setRedraw styledText setFont fVerticalRuler IVerticalRulerExtension IVerticalRulerExtension IVerticalRulerExtension fVerticalRuler setFont sourceViewer setSelectedRange sourceViewer setTopIndex topIndex setRedraw StyledText styledText sourceViewer getTextWidget styledText setFont fVerticalRuler IVerticalRulerExtension IVerticalRulerExtension IVerticalRulerExtension fVerticalRuler setFont
Creates a color from the information stored in the given preference store Returns code null code if there is no such information available param store the store to read from param key the key used for the lookup in the preference store param display the display used create the color return the created color according to the specification in the preference store since 2 0 private Color create Color I Preference Store store String key Display display RGB rgb null if store contains key if store is Default key rgb Preference Converter get Default Color store key else rgb Preference Converter get Color store key if rgb null return new Color display rgb return null  createColor IPreferenceStore isDefault PreferenceConverter getDefaultColor PreferenceConverter getColor
Initializes the fore and background colors of the given viewer for both normal and selected text param viewer the viewer to be initialized since 2 0 protected void initialize Viewer Colors I Source Viewer viewer I Preference Store store get Preference Store if store null Styled Text styled Text viewer get Text Widget foreground color Color color store get Boolean PREFERENCE COLOR FOREGROUND SYSTEM DEFAULT null create Color store PREFERENCE COLOR FOREGROUND styled Text get Display styled Text set Foreground color if f Foreground Color null f Foreground Color dispose f Foreground Color color background color color store get Boolean PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT null create Color store PREFERENCE COLOR BACKGROUND styled Text get Display styled Text set Background color if f Background Color null f Background Color dispose f Background Color color selection foreground color color store get Boolean PREFERENCE COLOR SELECTION FOREGROUND SYSTEM DEFAULT null create Color store PREFERENCE COLOR SELECTION FOREGROUND styled Text get Display styled Text set Selection Foreground color if f Selection Foreground Color null f Selection Foreground Color dispose f Selection Foreground Color color selection background color color store get Boolean PREFERENCE COLOR SELECTION BACKGROUND SYSTEM DEFAULT null create Color store PREFERENCE COLOR SELECTION BACKGROUND styled Text get Display styled Text set Selection Background color if f Selection Background Color null f Selection Background Color dispose f Selection Background Color color  initializeViewerColors ISourceViewer IPreferenceStore getPreferenceStore StyledText styledText getTextWidget getBoolean PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT createColor PREFERENCE_COLOR_FOREGROUND styledText getDisplay styledText setForeground fForegroundColor fForegroundColor fForegroundColor getBoolean PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT createColor PREFERENCE_COLOR_BACKGROUND styledText getDisplay styledText setBackground fBackgroundColor fBackgroundColor fBackgroundColor getBoolean PREFERENCE_COLOR_SELECTION_FOREGROUND_SYSTEM_DEFAULT createColor PREFERENCE_COLOR_SELECTION_FOREGROUND styledText getDisplay styledText setSelectionForeground fSelectionForegroundColor fSelectionForegroundColor fSelectionForegroundColor getBoolean PREFERENCE_COLOR_SELECTION_BACKGROUND_SYSTEM_DEFAULT createColor PREFERENCE_COLOR_SELECTION_BACKGROUND styledText getDisplay styledText setSelectionBackground fSelectionBackgroundColor fSelectionBackgroundColor fSelectionBackgroundColor
Initializes the background color used for highlighting the document ranges defining search scopes param viewer the viewer to initialize since 2 0 private void initialize Find Scope Color I Source Viewer viewer I Preference Store store get Preference Store if store null Styled Text styled Text viewer get Text Widget Color color create Color store PREFERENCE COLOR FIND SCOPE styled Text get Display I Find Replace Target target viewer get Find Replace Target if target null target instanceof I Find Replace Target Extension I Find Replace Target Extension target set Scope Highlight Color color if f Find Scope Highlight Color null f Find Scope Highlight Color dispose f Find Scope Highlight Color color  initializeFindScopeColor ISourceViewer IPreferenceStore getPreferenceStore StyledText styledText getTextWidget createColor PREFERENCE_COLOR_FIND_SCOPE styledText getDisplay IFindReplaceTarget getFindReplaceTarget IFindReplaceTargetExtension IFindReplaceTargetExtension setScopeHighlightColor fFindScopeHighlightColor fFindScopeHighlightColor fFindScopeHighlightColor
Initializes the editor s source viewer based on the given editor input param input the editor input to be used to initialize the source viewer private void initialize Source Viewer I Editor Input input I Annotation Model model get Document Provider get Annotation Model input I Document document get Document Provider get Document input if document null f Source Viewer set Document document model f Source Viewer set Editable is Editable f Source Viewer show Annotations model null if f Element State Listener instanceof I Element State Listener Extension I Element State Listener Extension extension I Element State Listener Extension f Element State Listener extension element State Validation Changed input false if f Initial Caret null f Initial Caret get Source Viewer get Text Widget get Caret if f Is Overwriting f Source Viewer get Text Widget invoke Action ST TOGGLE OVERWRITE handle Insert Mode Changed  initializeSourceViewer IEditorInput IAnnotationModel getDocumentProvider getAnnotationModel IDocument getDocumentProvider getDocument fSourceViewer setDocument fSourceViewer setEditable isEditable fSourceViewer showAnnotations fElementStateListener IElementStateListenerExtension IElementStateListenerExtension IElementStateListenerExtension fElementStateListener elementStateValidationChanged fInitialCaret fInitialCaret getSourceViewer getTextWidget getCaret fIsOverwriting fSourceViewer getTextWidget invokeAction TOGGLE_OVERWRITE handleInsertModeChanged
Initializes the editor s title based on the given editor input param input the editor input to be used private void initialize Title I Editor Input input Image old Image f Title Image f Title Image null String title NON NLS 1 if input null I Editor Registry editor Registry get Editor Site get Page get Workbench Window get Workbench get Editor Registry I Editor Descriptor editor Desc editor Registry find Editor get Site get Id Image Descriptor image Desc editor Desc null editor Desc get Image Descriptor null f Title Image image Desc null image Desc create Image null title input get Name set Title Image f Title Image set Title title fire Property Change PROP DIRTY if old Image null old Image is Disposed old Image dispose  initializeTitle IEditorInput oldImage fTitleImage fTitleImage IEditorRegistry editorRegistry getEditorSite getPage getWorkbenchWindow getWorkbench getEditorRegistry IEditorDescriptor editorDesc editorRegistry findEditor getSite getId ImageDescriptor imageDesc editorDesc editorDesc getImageDescriptor fTitleImage imageDesc imageDesc createImage getName setTitleImage fTitleImage setTitle firePropertyChange PROP_DIRTY oldImage oldImage isDisposed oldImage
Hook method for setting the document provider for the given input This default implementation does nothing Clients may reimplement param input the input of this editor since 3 0 protected void set Document Provider I Editor Input input  setDocumentProvider IEditorInput
If there is no explicit document provider set the implicit one is re initialized based on the given editor input param input the editor input private void update Document Provider I Editor Input input I Progress Monitor remembered Progress Monitor null I Document Provider provider get Document Provider if provider null provider remove Element State Listener f Element State Listener if provider instanceof I Document Provider Extension2 I Document Provider Extension2 extension I Document Provider Extension2 provider remembered Progress Monitor extension get Progress Monitor extension set Progress Monitor null set Document Provider input provider get Document Provider if provider null provider add Element State Listener f Element State Listener if provider instanceof I Document Provider Extension2 I Document Provider Extension2 extension I Document Provider Extension2 provider extension set Progress Monitor remembered Progress Monitor  updateDocumentProvider IEditorInput IProgressMonitor rememberedProgressMonitor IDocumentProvider getDocumentProvider removeElementStateListener fElementStateListener IDocumentProviderExtension2 IDocumentProviderExtension2 IDocumentProviderExtension2 rememberedProgressMonitor getProgressMonitor setProgressMonitor setDocumentProvider getDocumentProvider addElementStateListener fElementStateListener IDocumentProviderExtension2 IDocumentProviderExtension2 IDocumentProviderExtension2 setProgressMonitor rememberedProgressMonitor
Called directly from code set Input code and from within a workspace runnable from code init code this method does the actual setting of the editor input Closes the editor if code input code is code null code Disconnects from any previous editor input and its document provider and connects to the new one p Subclasses may extend p param input the input to be set exception Core Exception if input cannot be connected to the document provider protected void do Set Input I Editor Input input throws Core Exception if input null close is Save On Close Needed else I Editor Input old Input get Editor Input if old Input null get Document Provider disconnect old Input super set Input input update Document Provider input I Document Provider provider get Document Provider if provider null I Status s new Status I Status ERROR PlatformUI PLUGIN ID I Status OK Editor Messages get String Editor error no provider null NON NLS 1 throw new Core Exception s provider connect input initialize Title input if f Source Viewer null initialize Source Viewer input if f Is Overwriting toggle Overwrite Mode set Insert Mode Insert Mode get Legal Insert Modes get 0 update Caret update Status Field I Text Editor Action Constants STATUS CATEGORY ELEMENT STATE if f Selection Listener null f Selection Listener set Document get Document Provider get Document input  setInput CoreException doSetInput IEditorInput CoreException isSaveOnCloseNeeded IEditorInput oldInput getEditorInput oldInput getDocumentProvider oldInput setInput updateDocumentProvider IDocumentProvider getDocumentProvider IStatus IStatus PLUGIN_ID IStatus EditorMessages getString no_provider CoreException initializeTitle fSourceViewer initializeSourceViewer fIsOverwriting toggleOverwriteMode setInsertMode InsertMode getLegalInsertModes updateCaret updateStatusField ITextEditorActionConstants STATUS_CATEGORY_ELEMENT_STATE fSelectionListener fSelectionListener setDocument getDocumentProvider getDocument
public final void set Input I Editor Input input try do Set Input input catch Core Exception x String title Editor Messages get String Editor error setinput title NON NLS 1 String msg Editor Messages get String Editor error setinput message NON NLS 1 Shell shell get Site get Shell Error Dialog open Error shell title msg x get Status  setInput IEditorInput doSetInput CoreException EditorMessages getString EditorMessages getString getSite getShell ErrorDialog openError getStatus
display async Exec new Runnable public void run if f Source Viewer null check whether editor has not been disposed yet get Site get Page close Editor Abstract Text Editor this save  asyncExec fSourceViewer getSite getPage closeEditor AbstractTextEditor
public void close final boolean save enable Sanity Checking false Display display get Site get Shell get Display display async Exec new Runnable public void run if f Source Viewer null check whether editor has not been disposed yet get Site get Page close Editor Abstract Text Editor this save  enableSanityChecking getSite getShell getDisplay asyncExec fSourceViewer getSite getPage closeEditor AbstractTextEditor
The code Abstract Text Editor code implementation of this code I Workbench Part code method may be extended by subclasses Subclasses must call code super dispose code p Note that many methods may return code null code after the editor is disposed p public void dispose if f Activation Listener null I Workbench Window window get Site get Workbench Window window get Part Service remove Part Listener f Activation Listener Shell shell window get Shell if shell null shell is Disposed shell remove Shell Listener f Activation Listener f Activation Listener null if f Title Image null f Title Image dispose f Title Image null if f Font null f Font dispose f Font null dispose Non Default Caret f Initial Caret null if f Foreground Color null f Foreground Color dispose f Foreground Color null if f Background Color null f Background Color dispose f Background Color null if f Selection Foreground Color null f Selection Foreground Color dispose f Selection Foreground Color null if f Selection Background Color null f Selection Background Color dispose f Selection Background Color null if f Find Scope Highlight Color null f Find Scope Highlight Color dispose f Find Scope Highlight Color null if f Font Property Change Listener null J Face Resources get Font Registry remove Listener f Font Property Change Listener f Font Property Change Listener null if f Property Change Listener null if f Preference Store null f Preference Store remove Property Change Listener f Property Change Listener f Preference Store null f Property Change Listener null if f Activation Code Trigger null f Activation Code Trigger uninstall f Activation Code Trigger null if f Selection Listener null f Selection Listener uninstall get Selection Provider f Selection Listener null dispose Document Provider if f Source Viewer null if f Text Listener null f Source Viewer remove Text Listener f Text Listener f Source Viewer remove Text Input Listener f Text Listener f Text Listener null f Text Input Listener null f Selection Provider null f Source Viewer null if f Text Context Menu null f Text Context Menu dispose f Text Context Menu null if f Ruler Context Menu null f Ruler Context Menu dispose f Ruler Context Menu null if f Actions null f Actions clear f Actions null if f Selection Actions null f Selection Actions clear f Selection Actions null if f Content Actions null f Content Actions clear f Content Actions null if f Property Actions null f Property Actions clear f Property Actions null if f State Actions null f State Actions clear f State Actions null if f Activation Codes null f Activation Codes clear f Activation Codes null if f Editor Status Line null f Editor Status Line null if f Configuration null f Configuration null super set Input null super dispose  AbstractTextEditor IWorkbenchPart fActivationListener IWorkbenchWindow getSite getWorkbenchWindow getPartService removePartListener fActivationListener getShell isDisposed removeShellListener fActivationListener fActivationListener fTitleImage fTitleImage fTitleImage fFont fFont fFont disposeNonDefaultCaret fInitialCaret fForegroundColor fForegroundColor fForegroundColor fBackgroundColor fBackgroundColor fBackgroundColor fSelectionForegroundColor fSelectionForegroundColor fSelectionForegroundColor fSelectionBackgroundColor fSelectionBackgroundColor fSelectionBackgroundColor fFindScopeHighlightColor fFindScopeHighlightColor fFindScopeHighlightColor fFontPropertyChangeListener JFaceResources getFontRegistry removeListener fFontPropertyChangeListener fFontPropertyChangeListener fPropertyChangeListener fPreferenceStore fPreferenceStore removePropertyChangeListener fPropertyChangeListener fPreferenceStore fPropertyChangeListener fActivationCodeTrigger fActivationCodeTrigger fActivationCodeTrigger fSelectionListener fSelectionListener getSelectionProvider fSelectionListener disposeDocumentProvider fSourceViewer fTextListener fSourceViewer removeTextListener fTextListener fSourceViewer removeTextInputListener fTextListener fTextListener fTextInputListener fSelectionProvider fSourceViewer fTextContextMenu fTextContextMenu fTextContextMenu fRulerContextMenu fRulerContextMenu fRulerContextMenu fActions fActions fActions fSelectionActions fSelectionActions fSelectionActions fContentActions fContentActions fContentActions fPropertyActions fPropertyActions fPropertyActions fStateActions fStateActions fStateActions fActivationCodes fActivationCodes fActivationCodes fEditorStatusLine fEditorStatusLine fConfiguration fConfiguration setInput
Disposes of the connection with the document provider Subclasses may extend since 3 0 protected void dispose Document Provider I Document Provider provider get Document Provider if provider null I Editor Input input get Editor Input if input null provider disconnect input if f Element State Listener null provider remove Element State Listener f Element State Listener f Element State Listener null f Explicit Document Provider null  disposeDocumentProvider IDocumentProvider getDocumentProvider IEditorInput getEditorInput fElementStateListener removeElementStateListener fElementStateListener fElementStateListener fExplicitDocumentProvider
Determines whether the given preference change affects the editor s presentation This implementation always returns code false code May be reimplemented by subclasses param event the event which should be investigated return code true code if the event describes a preference change affecting the editor s presentation since 2 0 protected boolean affects Text Presentation Property Change Event event return false  affectsTextPresentation PropertyChangeEvent
Returns the symbolic font name for this editor as defined in XML return a String with the symbolic font name or code null code if none is defined since 2 1 private String get Symbolic Font Name if get Configuration Element null return get Configuration Element get Attribute symbolic Font Name NON NLS 1 else return null  getSymbolicFontName getConfigurationElement getConfigurationElement getAttribute symbolicFontName
Returns the property preference key for the editor font Subclasses may replace this method return a String with the key since 2 1 protected final String get Font Property Preference Key String symbolic Font Name get Symbolic Font Name if symbolic Font Name null return symbolic Font Name else return J Face Resources TEXT FONT  getFontPropertyPreferenceKey symbolicFontName getSymbolicFontName symbolicFontName symbolicFontName JFaceResources TEXT_FONT
Handles a property change event describing a change of the editor s preference store and updates the preference related editor properties p Subclasses may extend p param event the property change event protected void handle Preference Store Changed Property Change Event event if f Source Viewer null return String property event get Property if get Font Property Preference Key equals property There is a separate handler for font preference changes return else if PREFERENCE COLOR FOREGROUND equals property PREFERENCE COLOR FOREGROUND SYSTEM DEFAULT equals property PREFERENCE COLOR BACKGROUND equals property PREFERENCE COLOR BACKGROUND SYSTEM DEFAULT equals property PREFERENCE COLOR SELECTION FOREGROUND equals property PREFERENCE COLOR SELECTION FOREGROUND SYSTEM DEFAULT equals property PREFERENCE COLOR SELECTION BACKGROUND equals property PREFERENCE COLOR SELECTION BACKGROUND SYSTEM DEFAULT equals property initialize Viewer Colors f Source Viewer else if PREFERENCE COLOR FIND SCOPE equals property initialize Find Scope Color f Source Viewer else if PREFERENCE USE CUSTOM CARETS equals property update Caret else if PREFERENCE WIDE CARET equals property update Caret if affects Text Presentation event f Source Viewer invalidate Text Presentation  handlePreferenceStoreChanged PropertyChangeEvent fSourceViewer getProperty getFontPropertyPreferenceKey PREFERENCE_COLOR_FOREGROUND PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT PREFERENCE_COLOR_BACKGROUND PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT PREFERENCE_COLOR_SELECTION_FOREGROUND PREFERENCE_COLOR_SELECTION_FOREGROUND_SYSTEM_DEFAULT PREFERENCE_COLOR_SELECTION_BACKGROUND PREFERENCE_COLOR_SELECTION_BACKGROUND_SYSTEM_DEFAULT initializeViewerColors fSourceViewer PREFERENCE_COLOR_FIND_SCOPE initializeFindScopeColor fSourceViewer PREFERENCE_USE_CUSTOM_CARETS updateCaret PREFERENCE_WIDE_CARET updateCaret affectsTextPresentation fSourceViewer invalidateTextPresentation
Returns the progress monitor related to this editor It should not be necessary to extend this method return the progress monitor related to this editor since 2 1 protected I Progress Monitor get Progress Monitor I Progress Monitor pm null I Status Line Manager manager get Status Line Manager if manager null pm manager get Progress Monitor return pm null pm new Null Progress Monitor  IProgressMonitor getProgressMonitor IProgressMonitor IStatusLineManager getStatusLineManager getProgressMonitor NullProgressMonitor
Handles an external change of the editor s input element Subclasses may extend protected void handle Editor Input Changed String title String msg Shell shell get Site get Shell final I Document Provider provider get Document Provider if provider null fix for http dev eclipse org bugs show bug cgi id 15066 close false return final I Editor Input input get Editor Input if provider is Deleted input if is Save As Allowed title Editor Messages get String Editor error activated deleted save title NON NLS 1 msg Editor Messages get String Editor error activated deleted save message NON NLS 1 String buttons Editor Messages get String Editor error activated deleted save button save NON NLS 1 Editor Messages get String Editor error activated deleted save button close NON NLS 1 Message Dialog dialog new Message Dialog shell title null msg Message Dialog QUESTION buttons 0 if dialog open 0 I Progress Monitor pm get Progress Monitor perform Save As pm if pm is Canceled handle Editor Input Changed else close false else title Editor Messages get String Editor error activated deleted close title NON NLS 1 msg Editor Messages get String Editor error activated deleted close message NON NLS 1 if Message Dialog open Confirm shell title msg close false else title Editor Messages get String Editor error activated outofsync title NON NLS 1 msg Editor Messages get String Editor error activated outofsync message NON NLS 1 if Message Dialog open Question shell title msg try if provider instanceof I Document Provider Extension I Document Provider Extension extension I Document Provider Extension provider extension synchronize input else do Set Input input catch Core Exception x I Status status x get Status if status null status get Severity I Status CANCEL title Editor Messages get String Editor error refresh outofsync title NON NLS 1 msg Editor Messages get String Editor error refresh outofsync message NON NLS 1 Error Dialog open Error shell title msg x get Status  handleEditorInputChanged getSite getShell IDocumentProvider getDocumentProvider show_bug IEditorInput getEditorInput isDeleted isSaveAsAllowed EditorMessages getString EditorMessages getString EditorMessages getString EditorMessages getString MessageDialog MessageDialog MessageDialog IProgressMonitor getProgressMonitor performSaveAs isCanceled handleEditorInputChanged EditorMessages getString EditorMessages getString MessageDialog openConfirm EditorMessages getString EditorMessages getString MessageDialog openQuestion IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension doSetInput CoreException IStatus getStatus getSeverity IStatus EditorMessages getString EditorMessages getString ErrorDialog openError getStatus
The code Abstract Text Editor code implementation of this code I Editor Part code method calls code perform Save As code Subclasses may reimplement public void do Save As 1GEUSSR ITPUI ALL User should never loose changes made in the editors Changed Behavior to make sure that if called inside a regular save because of deletion of input element there is a way to report back to the caller perform Save As get Progress Monitor  AbstractTextEditor IEditorPart performSaveAs doSaveAs performSaveAs getProgressMonitor
Performs a save as and reports the result state back to the given progress monitor This default implementation does nothing Subclasses may reimplement param progress Monitor the progress monitor for communicating result state or code null code protected void perform Save As I Progress Monitor progress Monitor  progressMonitor performSaveAs IProgressMonitor progressMonitor
The code Abstract Text Editor code implementation of this code I Editor Part code method may be extended by subclasses param progress Monitor the progress monitor for communicating result state or code null code public void do Save I Progress Monitor progress Monitor I Document Provider p get Document Provider if p null return if p is Deleted get Editor Input if is Save As Allowed 1GEUSSR ITPUI ALL User should never loose changes made in the editors Changed Behavior to make sure that if called inside a regular save because of deletion of input element there is a way to report back to the caller perform Save As progress Monitor else Shell shell get Site get Shell String title Editor Messages get String Editor error save deleted title NON NLS 1 String msg Editor Messages get String Editor error save deleted message NON NLS 1 Message Dialog open Error shell title msg else update State get Editor Input validate State get Editor Input perform Save false progress Monitor  AbstractTextEditor IEditorPart progressMonitor doSave IProgressMonitor progressMonitor IDocumentProvider getDocumentProvider isDeleted getEditorInput isSaveAsAllowed performSaveAs progressMonitor getSite getShell EditorMessages getString EditorMessages getString MessageDialog openError updateState getEditorInput validateState getEditorInput performSave progressMonitor
Enables disables sanity checking param enable code true code if sanity checking should be enabled code false code otherwise since 2 0 protected void enable Sanity Checking boolean enable synchronized this f Is Sanity Check Enabled enable  enableSanityChecking fIsSanityCheckEnabled
Checks the state of the given editor input if sanity checking is enabled param input the editor input whose state is to be checked since 2 0 protected void safely Sanity Check State I Editor Input input boolean enabled false synchronized this enabled f Is Sanity Check Enabled if enabled sanity Check State input  safelySanityCheckState IEditorInput fIsSanityCheckEnabled sanityCheckState
Checks the state of the given editor input param input the editor input whose state is to be checked since 2 0 protected void sanity Check State I Editor Input input I Document Provider p get Document Provider if p null return if p instanceof I Document Provider Extension3 I Document Provider Extension3 p3 I Document Provider Extension3 p long stamp p get Modification Stamp input if stamp f Modification Stamp f Modification Stamp stamp if p3 is Synchronized input handle Editor Input Changed else if f Modification Stamp 1 f Modification Stamp p get Synchronization Stamp input long stamp p get Modification Stamp input if stamp f Modification Stamp f Modification Stamp stamp if stamp p get Synchronization Stamp input handle Editor Input Changed update State get Editor Input update Status Field I Text Editor Action Constants STATUS CATEGORY ELEMENT STATE  sanityCheckState IEditorInput IDocumentProvider getDocumentProvider IDocumentProviderExtension3 IDocumentProviderExtension3 IDocumentProviderExtension3 getModificationStamp fModificationStamp fModificationStamp isSynchronized handleEditorInputChanged fModificationStamp fModificationStamp getSynchronizationStamp getModificationStamp fModificationStamp fModificationStamp getSynchronizationStamp handleEditorInputChanged updateState getEditorInput updateStatusField ITextEditorActionConstants STATUS_CATEGORY_ELEMENT_STATE
Enables disables state validation param enable code true code if state validation should be enabled code false code otherwise since 2 1 protected void enable State Validation boolean enable synchronized this f Is State Validation Enabled enable  enableStateValidation fIsStateValidationEnabled
Validates the state of the given editor input The predominate intent of this method is to take any action probably necessary to ensure that the input can persistently be changed param input the input to be validated since 2 0 protected void validate State I Editor Input input I Document Provider provider get Document Provider if provider instanceof I Document Provider Extension return I Document Provider Extension extension I Document Provider Extension provider try extension validate State input get Site get Shell catch Core Exception x I Status status x get Status if status null status get Severity I Status CANCEL Bundle bundle Platform get Bundle PlatformUI PLUGIN ID I Log log Platform get Log bundle log log x get Status Shell shell get Site get Shell String title Editor Messages get String Editor error validate Edit title NON NLS 1 String msg Editor Messages get String Editor error validate Edit message NON NLS 1 Error Dialog open Error shell title msg x get Status return if f Source Viewer null f Source Viewer set Editable is Editable update State Dependent Actions  validateState IEditorInput IDocumentProvider getDocumentProvider IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension validateState getSite getShell CoreException IStatus getStatus getSeverity IStatus getBundle PLUGIN_ID ILog getLog getStatus getSite getShell EditorMessages getString validateEdit EditorMessages getString validateEdit ErrorDialog openError getStatus fSourceViewer fSourceViewer setEditable isEditable updateStateDependentActions
see java lang Runnable run public void run validate State input  validateState
public boolean validate Editor Input State boolean enabled false synchronized this enabled f Is State Validation Enabled if enabled I Source Viewer viewer get Source Viewer if viewer null return false f Text Input Listener input Changed false viewer add Text Input Listener f Text Input Listener try final I Editor Input input get Editor Input Busy Indicator show While get Site get Shell get Display new Runnable see java lang Runnable run public void run validate State input sanity Check State input return is Editor Input Read Only f Text Input Listener input Changed finally viewer remove Text Input Listener f Text Input Listener return is Editor Input Read Only  validateEditorInputState fIsStateValidationEnabled ISourceViewer getSourceViewer fTextInputListener inputChanged addTextInputListener fTextInputListener IEditorInput getEditorInput BusyIndicator showWhile getSite getShell getDisplay validateState sanityCheckState isEditorInputReadOnly fTextInputListener inputChanged removeTextInputListener fTextInputListener isEditorInputReadOnly
Updates the state of the given editor input such as read only flag param input the input to be validated since 2 0 protected void update State I Editor Input input I Document Provider provider get Document Provider if provider instanceof I Document Provider Extension I Document Provider Extension extension I Document Provider Extension provider try boolean was Read Only is Editor Input Read Only extension update State Cache input if f Source Viewer null f Source Viewer set Editable is Editable if was Read Only is Editor Input Read Only update State Dependent Actions catch Core Exception x Bundle bundle Platform get Bundle PlatformUI PLUGIN ID I Log log Platform get Log bundle log log x get Status  updateState IEditorInput IDocumentProvider getDocumentProvider IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension wasReadOnly isEditorInputReadOnly updateStateCache fSourceViewer fSourceViewer setEditable isEditable wasReadOnly isEditorInputReadOnly updateStateDependentActions CoreException getBundle PLUGIN_ID ILog getLog getStatus
Performs the save and handles errors appropriately param overwrite indicates whether or not overwriting is allowed param progress Monitor the monitor in which to run the operation since 3 0 protected void perform Save boolean overwrite I Progress Monitor progress Monitor I Document Provider provider get Document Provider if provider null return try provider about To Change get Editor Input I Editor Input input get Editor Input provider save Document progress Monitor input get Document Provider get Document input overwrite editor Saved catch Core Exception x I Status status x get Status if status null status get Severity I Status CANCEL handle Exception On Save x progress Monitor finally provider changed get Editor Input  progressMonitor performSave IProgressMonitor progressMonitor IDocumentProvider getDocumentProvider aboutToChange getEditorInput IEditorInput getEditorInput saveDocument progressMonitor getDocumentProvider getDocument editorSaved CoreException IStatus getStatus getSeverity IStatus handleExceptionOnSave progressMonitor getEditorInput
Handles the given exception If the exception reports an out of sync situation this is reported to the user Otherwise the exception is generically reported param exception the exception to handle param progress Monitor the progress monitor protected void handle Exception On Save Core Exception exception I Progress Monitor progress Monitor try f Error Correction On Save Shell shell get Site get Shell boolean is Synchronized false I Document Provider p get Document Provider if p instanceof I Document Provider Extension3 I Document Provider Extension3 p3 I Document Provider Extension3 p is Synchronized p3 is Synchronized get Editor Input else long modified Stamp p get Modification Stamp get Editor Input long synch Stamp p get Synchronization Stamp get Editor Input is Synchronized modified Stamp synch Stamp if f Error Correction On Save 1 is Synchronized String title Editor Messages get String Editor error save outofsync title NON NLS 1 String msg Editor Messages get String Editor error save outofsync message NON NLS 1 if Message Dialog open Question shell title msg perform Save true progress Monitor else 1GEUPKR ITPJUI ALL Loosing work with simultaneous edits Set progress monitor to canceled in order to report back to enclosing operations if progress Monitor null progress Monitor set Canceled true else String title Editor Messages get String Editor error save title NON NLS 1 String msg Editor Messages get String Editor error save message NON NLS 1 Error Dialog open Error shell title msg exception get Status 1GEUPKR ITPJUI ALL Loosing work with simultaneous edits Set progress monitor to canceled in order to report back to enclosing operations if progress Monitor null progress Monitor set Canceled true finally f Error Correction On Save  progressMonitor handleExceptionOnSave CoreException IProgressMonitor progressMonitor fErrorCorrectionOnSave getSite getShell isSynchronized IDocumentProvider getDocumentProvider IDocumentProviderExtension3 IDocumentProviderExtension3 IDocumentProviderExtension3 isSynchronized isSynchronized getEditorInput modifiedStamp getModificationStamp getEditorInput synchStamp getSynchronizationStamp getEditorInput isSynchronized modifiedStamp synchStamp fErrorCorrectionOnSave isSynchronized EditorMessages getString EditorMessages getString MessageDialog openQuestion performSave progressMonitor progressMonitor progressMonitor setCanceled EditorMessages getString EditorMessages getString ErrorDialog openError getStatus progressMonitor progressMonitor setCanceled fErrorCorrectionOnSave
The code Abstract Text Editor code implementation of this code I Editor Part code method returns code false code Subclasses may override return code false code public boolean is Save As Allowed return false  AbstractTextEditor IEditorPart isSaveAsAllowed
see Editor Part is Save On Close Needed public boolean is Save On Close Needed I Document Provider p get Document Provider return p null false p must Save Document get Editor Input  EditorPart isSaveOnCloseNeeded isSaveOnCloseNeeded IDocumentProvider getDocumentProvider mustSaveDocument getEditorInput
see Editor Part is Dirty public boolean is Dirty I Document Provider p get Document Provider return p null false p can Save Document get Editor Input  EditorPart isDirty isDirty IDocumentProvider getDocumentProvider canSaveDocument getEditorInput
The code Abstract Text Editor code implementation of this code I Text Editor code method may be extended by subclasses public void do Revert To Saved I Document Provider p get Document Provider if p null return perform Revert  AbstractTextEditor ITextEditor doRevertToSaved IDocumentProvider getDocumentProvider performRevert
Performs revert and handles errors appropriately p Subclasses may extend p since 3 0 protected void perform Revert I Document Provider provider get Document Provider if provider null return try provider about To Change get Editor Input provider reset Document get Editor Input editor Saved catch Core Exception x I Status status x get Status if status null status get Severity I Status CANCEL Shell shell get Site get Shell String title Editor Messages get String Editor error revert title NON NLS 1 String msg Editor Messages get String Editor error revert message NON NLS 1 Error Dialog open Error shell title msg x get Status finally provider changed get Editor Input  performRevert IDocumentProvider getDocumentProvider aboutToChange getEditorInput resetDocument getEditorInput editorSaved CoreException IStatus getStatus getSeverity IStatus getSite getShell EditorMessages getString EditorMessages getString ErrorDialog openError getStatus getEditorInput
Performs any additional action necessary to perform after the input document s content has been replaced p Clients may extended this method since 3 0 protected void handle Element Content Replaced  handleElementContentReplaced
public void set Action String actionID I Action action Assert is Not Null actionID if action null action I Action f Actions remove actionID if action null f Activation Code Trigger unregister Action From Key Activation action else f Actions put actionID action f Activation Code Trigger register Action For Key Activation action  setAction IAction isNotNull IAction fActions fActivationCodeTrigger unregisterActionFromKeyActivation fActions fActivationCodeTrigger registerActionForKeyActivation
public void set Action Activation Code String actionID char activation Character int activation Key Code int activation State Mask Assert is Not Null actionID Action Activation Code found find Action Activation Code actionID if found null found new Action Activation Code actionID f Activation Codes add found found f Character activation Character found f Key Code activation Key Code found f State Mask activation State Mask  setActionActivationCode activationCharacter activationKeyCode activationStateMask isNotNull ActionActivationCode findActionActivationCode ActionActivationCode fActivationCodes fCharacter activationCharacter fKeyCode activationKeyCode fStateMask activationStateMask
Returns the activation code registered for the specified action param actionID the action id return the registered activation code or code null code if no code has been installed private Action Activation Code find Action Activation Code String actionID int size f Activation Codes size for int i 0 i size i Action Activation Code code Action Activation Code f Activation Codes get i if actionID equals code f Action Id return code return null  ActionActivationCode findActionActivationCode fActivationCodes ActionActivationCode ActionActivationCode fActivationCodes fActionId
public void remove Action Activation Code String actionID Assert is Not Null actionID Action Activation Code code find Action Activation Code actionID if code null f Activation Codes remove code  removeActionActivationCode isNotNull ActionActivationCode findActionActivationCode fActivationCodes
public I Action get Action String actionID Assert is Not Null actionID I Action action I Action f Actions get actionID if action null action find Contributed Action actionID if action null set Action actionID action return action  IAction getAction isNotNull IAction IAction fActions findContributedAction setAction
Configuration Element Sorter sorter new Configuration Element Sorter inherit Doc public I Configuration Element get Configuration Element Object object return I Configuration Element object  ConfigurationElementSorter ConfigurationElementSorter inheritDoc IConfigurationElement getConfigurationElement IConfigurationElement
Returns the action with the given action id that has been contributed via XML to this editor The lookup honors the dependencies of plug ins param actionID the action id to look up return the action that has been contributed since 2 0 private I Action find Contributed Action String actionID List actions new Array List I Configuration Element elements Platform get Extension Registry get Configuration Elements For PlatformUI PLUGIN ID editor Actions NON NLS 1 for int i 0 i elements length i I Configuration Element element elements i if TAG CONTRIBUTION TYPE equals element get Name if get Site get Id equals element get Attribute targetID NON NLS 1 continue I Configuration Element children element get Children action NON NLS 1 for int j 0 j children length j I Configuration Element child children j if actionID equals child get Attribute actionID NON NLS 1 actions add child int action Size actions size if action Size 0 I Configuration Element element if action Size 1 I Configuration Element action Array I Configuration Element actions to Array new I Configuration Element action Size Configuration Element Sorter sorter new Configuration Element Sorter inherit Doc public I Configuration Element get Configuration Element Object object return I Configuration Element object sorter sort action Array element action Array 0 else element I Configuration Element actions get 0 String def Id element get Attribute Action Descriptor ATT DEFINITION ID return new Editor Plugin Action element this def Id I Action AS UNSPECIFIED NON NLS 1 return null  IAction findContributedAction ArrayList IConfigurationElement getExtensionRegistry getConfigurationElementsFor PLUGIN_ID editorActions IConfigurationElement TAG_CONTRIBUTION_TYPE getName getSite getId getAttribute IConfigurationElement getChildren IConfigurationElement getAttribute actionSize actionSize IConfigurationElement actionSize IConfigurationElement actionArray IConfigurationElement toArray IConfigurationElement actionSize ConfigurationElementSorter ConfigurationElementSorter inheritDoc IConfigurationElement getConfigurationElement IConfigurationElement actionArray actionArray IConfigurationElement defId getAttribute ActionDescriptor ATT_DEFINITION_ID EditorPluginAction defId IAction AS_UNSPECIFIED
Updates the specified action by calling code I Update update code if applicable param action Id the action id private void update Action String action Id Assert is Not Null action Id if f Actions null I Action action I Action f Actions get action Id if action instanceof I Update I Update action update  IUpdate actionId updateAction actionId isNotNull actionId fActions IAction IAction fActions actionId IUpdate IUpdate
Marks or unmarks the given action to be updated on text selection changes param action Id the action id param mark code true code if the action is selection dependent public void mark As Selection Dependent Action String action Id boolean mark Assert is Not Null action Id if mark if f Selection Actions contains action Id f Selection Actions add action Id else f Selection Actions remove action Id  actionId markAsSelectionDependentAction actionId isNotNull actionId fSelectionActions actionId fSelectionActions actionId fSelectionActions actionId
Marks or unmarks the given action to be updated on content changes param action Id the action id param mark code true code if the action is content dependent public void mark As Content Dependent Action String action Id boolean mark Assert is Not Null action Id if mark if f Content Actions contains action Id f Content Actions add action Id else f Content Actions remove action Id  actionId markAsContentDependentAction actionId isNotNull actionId fContentActions actionId fContentActions actionId fContentActions actionId
Marks or unmarks the given action to be updated on property changes param action Id the action id param mark code true code if the action is property dependent since 2 0 public void mark As Property Dependent Action String action Id boolean mark Assert is Not Null action Id if mark if f Property Actions contains action Id f Property Actions add action Id else f Property Actions remove action Id  actionId markAsPropertyDependentAction actionId isNotNull actionId fPropertyActions actionId fPropertyActions actionId fPropertyActions actionId
Marks or unmarks the given action to be updated on state changes param action Id the action id param mark code true code if the action is state dependent since 2 0 public void mark As State Dependent Action String action Id boolean mark Assert is Not Null action Id if mark if f State Actions contains action Id f State Actions add action Id else f State Actions remove action Id  actionId markAsStateDependentAction actionId isNotNull actionId fStateActions actionId fStateActions actionId fStateActions actionId
Updates all selection dependent actions protected void update Selection Dependent Actions if f Selection Actions null Iterator e f Selection Actions iterator while e has Next update Action String e next  updateSelectionDependentActions fSelectionActions fSelectionActions hasNext updateAction
Updates all content dependent actions protected void update Content Dependent Actions if f Content Actions null Iterator e f Content Actions iterator while e has Next update Action String e next  updateContentDependentActions fContentActions fContentActions hasNext updateAction
Updates all property dependent actions since 2 0 protected void update Property Dependent Actions if f Property Actions null Iterator e f Property Actions iterator while e has Next update Action String e next  updatePropertyDependentActions fPropertyActions fPropertyActions hasNext updateAction
Updates all state dependent actions since 2 0 protected void update State Dependent Actions if f State Actions null Iterator e f State Actions iterator while e has Next update Action String e next  updateStateDependentActions fStateActions fStateActions hasNext updateAction
Creates action entries for all SWT Styled Text actions as defined in code org eclipse swt custom ST code Overwrites and extends the list of these actions afterwards p Subclasses may extend p since 2 0 protected void create Navigation Actions I Action action Styled Text text Widget get Source Viewer get Text Widget for int i 0 i ACTION MAP length i Id Map Entry entry ACTION MAP i action new Text Navigation Action text Widget entry get Action action set Action Definition Id entry get Action Id set Action entry get Action Id action action new Toggle Overwrite Mode Action Editor Messages get Resource Bundle Editor Toggle Overwrite Mode NON NLS 1 action set Action Definition Id I Text Editor Action Definition Ids TOGGLE OVERWRITE set Action I Text Editor Action Definition Ids TOGGLE OVERWRITE action text Widget set Key Binding SWT INSERT SWT NULL action new Scroll Lines Action 1 action set Action Definition Id I Text Editor Action Definition Ids SCROLL LINE UP set Action I Text Editor Action Definition Ids SCROLL LINE UP action action new Scroll Lines Action 1 action set Action Definition Id I Text Editor Action Definition Ids SCROLL LINE DOWN set Action I Text Editor Action Definition Ids SCROLL LINE DOWN action action new Line End Action text Widget false action set Action Definition Id I Text Editor Action Definition Ids LINE END set Action I Text Editor Action Definition Ids LINE END action action new Line Start Action text Widget false action set Action Definition Id I Text Editor Action Definition Ids LINE START set Action I Text Editor Action Definition Ids LINE START action action new Line End Action text Widget true action set Action Definition Id I Text Editor Action Definition Ids SELECT LINE END set Action I Text Editor Action Definition Ids SELECT LINE END action action new Line Start Action text Widget true action set Action Definition Id I Text Editor Action Definition Ids SELECT LINE START set Action I Text Editor Action Definition Ids SELECT LINE START action set Action Activation Code I Text Editor Action Definition Ids LINE END char 0 SWT END SWT NONE set Action Activation Code I Text Editor Action Definition Ids LINE START char 0 SWT HOME SWT NONE set Action Activation Code I Text Editor Action Definition Ids SELECT LINE END char 0 SWT END SWT SHIFT set Action Activation Code I Text Editor Action Definition Ids SELECT LINE START char 0 SWT HOME SWT SHIFT to accommodate https bugs eclipse org bugs show bug cgi id 51516 nullify handling of DELETE key by Styled Text text Widget set Key Binding SWT DEL SWT NULL  StyledText createNavigationActions IAction StyledText textWidget getSourceViewer getTextWidget ACTION_MAP IdMapEntry ACTION_MAP TextNavigationAction textWidget getAction setActionDefinitionId getActionId setAction getActionId ToggleOverwriteModeAction EditorMessages getResourceBundle ToggleOverwriteMode setActionDefinitionId ITextEditorActionDefinitionIds TOGGLE_OVERWRITE setAction ITextEditorActionDefinitionIds TOGGLE_OVERWRITE textWidget setKeyBinding ScrollLinesAction setActionDefinitionId ITextEditorActionDefinitionIds SCROLL_LINE_UP setAction ITextEditorActionDefinitionIds SCROLL_LINE_UP ScrollLinesAction setActionDefinitionId ITextEditorActionDefinitionIds SCROLL_LINE_DOWN setAction ITextEditorActionDefinitionIds SCROLL_LINE_DOWN LineEndAction textWidget setActionDefinitionId ITextEditorActionDefinitionIds LINE_END setAction ITextEditorActionDefinitionIds LINE_END LineStartAction textWidget setActionDefinitionId ITextEditorActionDefinitionIds LINE_START setAction ITextEditorActionDefinitionIds LINE_START LineEndAction textWidget setActionDefinitionId ITextEditorActionDefinitionIds SELECT_LINE_END setAction ITextEditorActionDefinitionIds SELECT_LINE_END LineStartAction textWidget setActionDefinitionId ITextEditorActionDefinitionIds SELECT_LINE_START setAction ITextEditorActionDefinitionIds SELECT_LINE_START setActionActivationCode ITextEditorActionDefinitionIds LINE_END setActionActivationCode ITextEditorActionDefinitionIds LINE_START setActionActivationCode ITextEditorActionDefinitionIds SELECT_LINE_END setActionActivationCode ITextEditorActionDefinitionIds SELECT_LINE_START show_bug StyledText textWidget setKeyBinding
Creates this editor s accessibility actions since 2 0 private void create Accessibility Actions I Action action new Show Ruler Context Menu Action action set Action Definition Id I Text Editor Action Definition Ids SHOW RULER CONTEXT MENU set Action I Text Editor Action Definition Ids SHOW RULER CONTEXT MENU action  createAccessibilityActions IAction ShowRulerContextMenuAction setActionDefinitionId ITextEditorActionDefinitionIds SHOW_RULER_CONTEXT_MENU setAction ITextEditorActionDefinitionIds SHOW_RULER_CONTEXT_MENU
action new Shift Action Editor Messages get Resource Bundle Editor Shift Right this I Text Operation Target SHIFT RIGHT NON NLS 1 public void update update For Tab  ShiftAction EditorMessages getResourceBundle ShiftRight ITextOperationTarget SHIFT_RIGHT updateForTab
Creates this editor s standard actions and connects them with the global workbench actions p Subclasses may extend p protected void create Actions Resource Action action action new Text Operation Action Editor Messages get Resource Bundle Editor Undo this I Text Operation Target UNDO NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids UNDO ACTION action set Action Definition Id I Text Editor Action Definition Ids UNDO set Action I Text Editor Action Constants UNDO action action new Text Operation Action Editor Messages get Resource Bundle Editor Redo this I Text Operation Target REDO NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids REDO ACTION action set Action Definition Id I Text Editor Action Definition Ids REDO set Action I Text Editor Action Constants REDO action action new Text Operation Action Editor Messages get Resource Bundle Editor Cut this I Text Operation Target CUT NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids CUT ACTION action set Action Definition Id I Text Editor Action Definition Ids CUT set Action I Text Editor Action Constants CUT action action new Text Operation Action Editor Messages get Resource Bundle Editor Copy this I Text Operation Target COPY true NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids COPY ACTION action set Action Definition Id I Text Editor Action Definition Ids COPY set Action I Text Editor Action Constants COPY action action new Text Operation Action Editor Messages get Resource Bundle Editor Paste this I Text Operation Target PASTE NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids PASTE ACTION action set Action Definition Id I Text Editor Action Definition Ids PASTE set Action I Text Editor Action Constants PASTE action action new Text Operation Action Editor Messages get Resource Bundle Editor Delete this I Text Operation Target DELETE NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids DELETE ACTION action set Action Definition Id I Text Editor Action Definition Ids DELETE set Action I Text Editor Action Constants DELETE action action new Delete Line Action Editor Messages get Resource Bundle Editor Delete Line this Delete Line Action WHOLE false NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids DELETE LINE ACTION action set Action Definition Id I Text Editor Action Definition Ids DELETE LINE set Action I Text Editor Action Constants DELETE LINE action action new Delete Line Action Editor Messages get Resource Bundle Editor Cut Line this Delete Line Action WHOLE true NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids CUT LINE ACTION action set Action Definition Id I Text Editor Action Definition Ids CUT LINE set Action I Text Editor Action Constants CUT LINE action action new Delete Line Action Editor Messages get Resource Bundle Editor Delete Line To Beginning this Delete Line Action TO BEGINNING false NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids DELETE LINE TO BEGINNING ACTION action set Action Definition Id I Text Editor Action Definition Ids DELETE LINE TO BEGINNING set Action I Text Editor Action Constants DELETE LINE TO BEGINNING action action new Delete Line Action Editor Messages get Resource Bundle Editor Cut Line To Beginning this Delete Line Action TO BEGINNING true NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids CUT LINE TO BEGINNING ACTION action set Action Definition Id I Text Editor Action Definition Ids CUT LINE TO BEGINNING set Action I Text Editor Action Constants CUT LINE TO BEGINNING action action new Delete Line Action Editor Messages get Resource Bundle Editor Delete Line To End this Delete Line Action TO END false NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids DELETE LINE TO END ACTION action set Action Definition Id I Text Editor Action Definition Ids DELETE LINE TO END set Action I Text Editor Action Constants DELETE LINE TO END action action new Delete Line Action Editor Messages get Resource Bundle Editor Cut Line To End this Delete Line Action TO END true NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids CUT LINE TO END ACTION action set Action Definition Id I Text Editor Action Definition Ids CUT LINE TO END set Action I Text Editor Action Constants CUT LINE TO END action action new Mark Action Editor Messages get Resource Bundle Editor Set Mark this Mark Action SET MARK NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids SET MARK ACTION action set Action Definition Id I Text Editor Action Definition Ids SET MARK set Action I Text Editor Action Constants SET MARK action action new Mark Action Editor Messages get Resource Bundle Editor Clear Mark this Mark Action CLEAR MARK NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids CLEAR MARK ACTION action set Action Definition Id I Text Editor Action Definition Ids CLEAR MARK set Action I Text Editor Action Constants CLEAR MARK action action new Mark Action Editor Messages get Resource Bundle Editor Swap Mark this Mark Action SWAP MARK NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids SWAP MARK ACTION action set Action Definition Id I Text Editor Action Definition Ids SWAP MARK set Action I Text Editor Action Constants SWAP MARK action action new Text Operation Action Editor Messages get Resource Bundle Editor Select All this I Text Operation Target SELECT ALL true NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids SELECT ALL ACTION action set Action Definition Id I Text Editor Action Definition Ids SELECT ALL set Action I Text Editor Action Constants SELECT ALL action action new Shift Action Editor Messages get Resource Bundle Editor Shift Right this I Text Operation Target SHIFT RIGHT NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids SHIFT RIGHT ACTION action set Action Definition Id I Text Editor Action Definition Ids SHIFT RIGHT set Action I Text Editor Action Constants SHIFT RIGHT action action new Shift Action Editor Messages get Resource Bundle Editor Shift Right this I Text Operation Target SHIFT RIGHT NON NLS 1 public void update update For Tab set Action I Text Editor Action Constants SHIFT RIGHT TAB action action new Shift Action Editor Messages get Resource Bundle Editor Shift Left this I Text Operation Target SHIFT LEFT NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids SHIFT LEFT ACTION action set Action Definition Id I Text Editor Action Definition Ids SHIFT LEFT set Action I Text Editor Action Constants SHIFT LEFT action action new Text Operation Action Editor Messages get Resource Bundle Editor Print this I Text Operation Target PRINT true NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids PRINT ACTION action set Action Definition Id I Text Editor Action Definition Ids PRINT set Action I Text Editor Action Constants PRINT action action new Find Replace Action Editor Messages get Resource Bundle Editor Find Replace this NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids FIND ACTION action set Action Definition Id I Text Editor Action Definition Ids FIND REPLACE set Action I Text Editor Action Constants FIND action action new Find Next Action Editor Messages get Resource Bundle Editor Find Next this true NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids FIND NEXT ACTION action set Action Definition Id I Text Editor Action Definition Ids FIND NEXT set Action I Text Editor Action Constants FIND NEXT action action new Find Next Action Editor Messages get Resource Bundle Editor Find Previous this false NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids FIND PREVIOUS ACTION action set Action Definition Id I Text Editor Action Definition Ids FIND PREVIOUS set Action I Text Editor Action Constants FIND PREVIOUS action action new Incremental Find Action Editor Messages get Resource Bundle Editor Find Incremental this true NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids FIND INCREMENTAL ACTION action set Action Definition Id I Text Editor Action Definition Ids FIND INCREMENTAL set Action I Text Editor Action Constants FIND INCREMENTAL action action new Incremental Find Action Editor Messages get Resource Bundle Editor Find Incremental Reverse this false NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids FIND INCREMENTAL REVERSE ACTION action set Action Definition Id I Text Editor Action Definition Ids FIND INCREMENTAL REVERSE set Action I Text Editor Action Constants FIND INCREMENTAL REVERSE action action new Save Action Editor Messages get Resource Bundle Editor Save this NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids SAVE ACTION if the line below is uncommented then the key binding does not work any more see https bugs eclipse org bugs show bug cgi id 53417 action set Action Definition Id I Text Editor Action Definition Ids SAVE set Action I Text Editor Action Constants SAVE action action new Revert To Saved Action Editor Messages get Resource Bundle Editor Revert this NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids REVERT TO SAVED ACTION action set Action Definition Id I Text Editor Action Definition Ids REVERT TO SAVED set Action I Text Editor Action Constants REVERT TO SAVED action action new Goto Line Action Editor Messages get Resource Bundle Editor Goto Line this NON NLS 1 action set Help Context Id I Abstract Text Editor Help Context Ids GOTO LINE ACTION action set Action Definition Id I Text Editor Action Definition Ids LINE GOTO set Action I Text Editor Action Constants GOTO LINE action action new Move Lines Action Editor Messages get Resource Bundle Editor Move Lines Up this tru createActions ResourceAction TextOperationAction EditorMessages getResourceBundle ITextOperationTarget setHelpContextId IAbstractTextEditorHelpContextIds UNDO_ACTION setActionDefinitionId ITextEditorActionDefinitionIds setAction ITextEditorActionConstants TextOperationAction EditorMessages getResourceBundle ITextOperationTarget setHelpContextId IAbstractTextEditorHelpContextIds REDO_ACTION setActionDefinitionId ITextEditorActionDefinitionIds setAction ITextEditorActionConstants TextOperationAction EditorMessages getResourceBundle ITextOperationTarget setHelpContextId IAbstractTextEditorHelpContextIds CUT_ACTION setActionDefinitionId ITextEditorActionDefinitionIds setAction ITextEditorActionConstants TextOperationAction EditorMessages getResourceBundle ITextOperationTarget setHelpContextId IAbstractTextEditorHelpContextIds COPY_ACTION setActionDefinitionId ITextEditorActionDefinitionIds setAction ITextEditorActionConstants TextOperationAction EditorMessages getResourceBundle ITextOperationTarget setHelpContextId IAbstractTextEditorHelpContextIds PASTE_ACTION setActionDefinitionId ITextEditorActionDefinitionIds setAction ITextEditorActionConstants TextOperationAction EditorMessages getResourceBundle ITextOperationTarget setHelpContextId IAbstractTextEditorHelpContextIds DELETE_ACTION setActionDefinitionId ITextEditorActionDefinitionIds setAction ITextEditorActionConstants DeleteLineAction EditorMessages getResourceBundle DeleteLine DeleteLineAction setHelpContextId IAbstractTextEditorHelpContextIds DELETE_LINE_ACTION setActionDefinitionId ITextEditorActionDefinitionIds DELETE_LINE setAction ITextEditorActionConstants DELETE_LINE DeleteLineAction EditorMessages getResourceBundle CutLine DeleteLineAction setHelpContextId IAbstractTextEditorHelpContextIds CUT_LINE_ACTION setActionDefinitionId ITextEditorActionDefinitionIds CUT_LINE setAction ITextEditorActionConstants CUT_LINE DeleteLineAction EditorMessages getResourceBundle DeleteLineToBeginning DeleteLineAction TO_BEGINNING setHelpContextId IAbstractTextEditorHelpContextIds DELETE_LINE_TO_BEGINNING_ACTION setActionDefinitionId ITextEditorActionDefinitionIds DELETE_LINE_TO_BEGINNING setAction ITextEditorActionConstants DELETE_LINE_TO_BEGINNING DeleteLineAction EditorMessages getResourceBundle CutLineToBeginning DeleteLineAction TO_BEGINNING setHelpContextId IAbstractTextEditorHelpContextIds CUT_LINE_TO_BEGINNING_ACTION setActionDefinitionId ITextEditorActionDefinitionIds CUT_LINE_TO_BEGINNING setAction ITextEditorActionConstants CUT_LINE_TO_BEGINNING DeleteLineAction EditorMessages getResourceBundle DeleteLineToEnd DeleteLineAction TO_END setHelpContextId IAbstractTextEditorHelpContextIds DELETE_LINE_TO_END_ACTION setActionDefinitionId ITextEditorActionDefinitionIds DELETE_LINE_TO_END setAction ITextEditorActionConstants DELETE_LINE_TO_END DeleteLineAction EditorMessages getResourceBundle CutLineToEnd DeleteLineAction TO_END setHelpContextId IAbstractTextEditorHelpContextIds CUT_LINE_TO_END_ACTION setActionDefinitionId ITextEditorActionDefinitionIds CUT_LINE_TO_END setAction ITextEditorActionConstants CUT_LINE_TO_END MarkAction EditorMessages getResourceBundle SetMark MarkAction SET_MARK setHelpContextId IAbstractTextEditorHelpContextIds SET_MARK_ACTION setActionDefinitionId ITextEditorActionDefinitionIds SET_MARK setAction ITextEditorActionConstants SET_MARK MarkAction EditorMessages getResourceBundle ClearMark MarkAction CLEAR_MARK setHelpContextId IAbstractTextEditorHelpContextIds CLEAR_MARK_ACTION setActionDefinitionId ITextEditorActionDefinitionIds CLEAR_MARK setAction ITextEditorActionConstants CLEAR_MARK MarkAction EditorMessages getResourceBundle SwapMark MarkAction SWAP_MARK setHelpContextId IAbstractTextEditorHelpContextIds SWAP_MARK_ACTION setActionDefinitionId ITextEditorActionDefinitionIds SWAP_MARK setAction ITextEditorActionConstants SWAP_MARK TextOperationAction EditorMessages getResourceBundle SelectAll ITextOperationTarget SELECT_ALL setHelpContextId IAbstractTextEditorHelpContextIds SELECT_ALL_ACTION setActionDefinitionId ITextEditorActionDefinitionIds SELECT_ALL setAction ITextEditorActionConstants SELECT_ALL ShiftAction EditorMessages getResourceBundle ShiftRight ITextOperationTarget SHIFT_RIGHT setHelpContextId IAbstractTextEditorHelpContextIds SHIFT_RIGHT_ACTION setActionDefinitionId ITextEditorActionDefinitionIds SHIFT_RIGHT setAction ITextEditorActionConstants SHIFT_RIGHT ShiftAction EditorMessages getResourceBundle ShiftRight ITextOperationTarget SHIFT_RIGHT updateForTab setAction ITextEditorActionConstants SHIFT_RIGHT_TAB ShiftAction EditorMessages getResourceBundle ShiftLeft ITextOperationTarget SHIFT_LEFT setHelpContextId IAbstractTextEditorHelpContextIds SHIFT_LEFT_ACTION setActionDefinitionId ITextEditorActionDefinitionIds SHIFT_LEFT setAction ITextEditorActionConstants SHIFT_LEFT TextOperationAction EditorMessages getResourceBundle ITextOperationTarget setHelpContextId IAbstractTextEditorHelpContextIds PRINT_ACTION setActionDefinitionId ITextEditorActionDefinitionIds setAction ITextEditorActionConstants FindReplaceAction EditorMessages getResourceBundle FindReplace setHelpContextId IAbstractTextEditorHelpContextIds FIND_ACTION setActionDefinitionId ITextEditorActionDefinitionIds FIND_REPLACE setAction ITextEditorActionConstants FindNextAction EditorMessages getResourceBundle FindNext setHelpContextId IAbstractTextEditorHelpContextIds FIND_NEXT_ACTION setActionDefinitionId ITextEditorActionDefinitionIds FIND_NEXT setAction ITextEditorActionConstants FIND_NEXT FindNextAction EditorMessages getResourceBundle FindPrevious setHelpContextId IAbstractTextEditorHelpContextIds FIND_PREVIOUS_ACTION setActionDefinitionId ITextEditorActionDefinitionIds FIND_PREVIOUS setAction ITextEditorActionConstants FIND_PREVIOUS IncrementalFindAction EditorMessages getResourceBundle FindIncremental setHelpContextId IAbstractTextEditorHelpContextIds FIND_INCREMENTAL_ACTION setActionDefinitionId ITextEditorActionDefinitionIds FIND_INCREMENTAL setAction ITextEditorActionConstants FIND_INCREMENTAL IncrementalFindAction EditorMessages getResourceBundle FindIncrementalReverse setHelpContextId IAbstractTextEditorHelpContextIds FIND_INCREMENTAL_REVERSE_ACTION setActionDefinitionId ITextEditorActionDefinitionIds FIND_INCREMENTAL_REVERSE setAction ITextEditorActionConstants FIND_INCREMENTAL_REVERSE SaveAction EditorMessages getResourceBundle setHelpContextId IAbstractTextEditorHelpContextIds SAVE_ACTION show_bug setActionDefinitionId ITextEditorActionDefinitionIds setAction ITextEditorActionConstants RevertToSavedAction EditorMessages getResourceBundle setHelpContextId IAbstractTextEditorHelpContextIds REVERT_TO_SAVED_ACTION setActionDefinitionId ITextEditorActionDefinitionIds REVERT_TO_SAVED setAction ITextEditorActionConstants REVERT_TO_SAVED GotoLineAction EditorMessages getResourceBundle GotoLine setHelpContextId IAbstractTextEditorHelpContextIds GOTO_LINE_ACTION setActionDefinitionId ITextEditorActionDefinitionIds LINE_GOTO setAction ITextEditorActionConstants GOTO_LINE MoveLinesAction EditorMessages getResourceBundle MoveLinesUp
Convenience method to add the action installed under the given action id to the given menu param menu the menu to add the action to param action Id the id of the action to be added protected final void add Action I Menu Manager menu String action Id I Action action get Action action Id if action null if action instanceof I Update I Update action update menu add action  actionId addAction IMenuManager actionId IAction getAction actionId IUpdate IUpdate
Convenience method to add the action installed under the given action id to the specified group of the menu param menu the menu to add the action to param group the group in the menu param action Id the id of the action to add protected final void add Action I Menu Manager menu String group String action Id I Action action get Action action Id if action null if action instanceof I Update I Update action update I Menu Manager sub Menu menu find Menu Using Path group if sub Menu null sub Menu add action else menu append To Group group action  actionId addAction IMenuManager actionId IAction getAction actionId IUpdate IUpdate IMenuManager subMenu findMenuUsingPath subMenu subMenu appendToGroup
Convenience method to add a new group after the specified group param menu the menu to add the new group to param existing Group the group after which to insert the new group param new Group the new group protected final void add Group I Menu Manager menu String existing Group String new Group I Menu Manager sub Menu menu find Menu Using Path existing Group if sub Menu null sub Menu add new Separator new Group else menu append To Group existing Group new Separator new Group  existingGroup newGroup addGroup IMenuManager existingGroup newGroup IMenuManager subMenu findMenuUsingPath existingGroup subMenu subMenu newGroup appendToGroup existingGroup newGroup
Sets up the ruler context menu before it is made visible p Subclasses may extend to add other actions p param menu the menu protected void ruler Context Menu About To Show I Menu Manager menu menu add new Separator I Text Editor Action Constants GROUP REST menu add new Separator I Text Editor Action Constants MB ADDITIONS for Iterator i f Ruler Context Menu Listeners iterator i has Next I Menu Listener i next menu About To Show menu add Action menu I Text Editor Action Constants RULER MANAGE BOOKMARKS add Action menu I Text Editor Action Constants RULER MANAGE TASKS  rulerContextMenuAboutToShow IMenuManager ITextEditorActionConstants GROUP_REST ITextEditorActionConstants MB_ADDITIONS fRulerContextMenuListeners hasNext IMenuListener menuAboutToShow addAction ITextEditorActionConstants RULER_MANAGE_BOOKMARKS addAction ITextEditorActionConstants RULER_MANAGE_TASKS
Sets up this editor s context menu before it is made visible p Subclasses may extend to add other actions p param menu the menu protected void editor Context Menu About To Show I Menu Manager menu menu add new Separator I Text Editor Action Constants GROUP UNDO menu add new Separator I Text Editor Action Constants GROUP COPY menu add new Separator I Text Editor Action Constants GROUP PRINT menu add new Separator I Text Editor Action Constants GROUP EDIT menu add new Separator I Text Editor Action Constants GROUP FIND menu add new Separator I Text Editor Action Constants GROUP ADD menu add new Separator I Text Editor Action Constants GROUP REST menu add new Separator I Text Editor Action Constants MB ADDITIONS menu add new Separator I Text Editor Action Constants GROUP SAVE if is Editable add Action menu I Text Editor Action Constants GROUP UNDO I Text Editor Action Constants UNDO add Action menu I Text Editor Action Constants GROUP UNDO I Text Editor Action Constants REVERT TO SAVED add Action menu I Text Editor Action Constants GROUP COPY I Text Editor Action Constants CUT add Action menu I Text Editor Action Constants GROUP COPY I Text Editor Action Constants COPY add Action menu I Text Editor Action Constants GROUP COPY I Text Editor Action Constants PASTE add Action menu I Text Editor Action Constants GROUP SAVE I Text Editor Action Constants SAVE else add Action menu I Text Editor Action Constants GROUP COPY I Text Editor Action Constants COPY  editorContextMenuAboutToShow IMenuManager ITextEditorActionConstants GROUP_UNDO ITextEditorActionConstants GROUP_COPY ITextEditorActionConstants GROUP_PRINT ITextEditorActionConstants GROUP_EDIT ITextEditorActionConstants GROUP_FIND ITextEditorActionConstants GROUP_ADD ITextEditorActionConstants GROUP_REST ITextEditorActionConstants MB_ADDITIONS ITextEditorActionConstants GROUP_SAVE isEditable addAction ITextEditorActionConstants GROUP_UNDO ITextEditorActionConstants addAction ITextEditorActionConstants GROUP_UNDO ITextEditorActionConstants REVERT_TO_SAVED addAction ITextEditorActionConstants GROUP_COPY ITextEditorActionConstants addAction ITextEditorActionConstants GROUP_COPY ITextEditorActionConstants addAction ITextEditorActionConstants GROUP_COPY ITextEditorActionConstants addAction ITextEditorActionConstants GROUP_SAVE ITextEditorActionConstants addAction ITextEditorActionConstants GROUP_COPY ITextEditorActionConstants
Returns the status line manager of this editor return the status line manager of this editor since 2 0 private I Status Line Manager get Status Line Manager I Editor Action Bar Contributor contributor get Editor Site get Action Bar Contributor if contributor instanceof Editor Action Bar Contributor return null I Action Bars action Bars Editor Action Bar Contributor contributor get Action Bars if action Bars null return null return action Bars get Status Line Manager  IStatusLineManager getStatusLineManager IEditorActionBarContributor getEditorSite getActionBarContributor EditorActionBarContributor IActionBars actionBars EditorActionBarContributor getActionBars actionBars actionBars getStatusLineManager
public Object get Adapter Class required if I Editor Status Line class equals required if f Editor Status Line null I Status Line Manager status Line Manager get Status Line Manager I Selection Provider selection Provider get Selection Provider if status Line Manager null selection Provider null f Editor Status Line new Editor Status Line status Line Manager selection Provider return f Editor Status Line if I Vertical Ruler Info class equals required if f Vertical Ruler null return f Vertical Ruler if I Mark Region Target class equals required if f Mark Region Target null I Status Line Manager manager get Status Line Manager if manager null f Mark Region Target f Source Viewer null null new Mark Region Target f Source Viewer manager return f Mark Region Target if Delete Line Target class equals required if f Delete Line Target null f Delete Line Target new Delete Line Target f Source Viewer return f Delete Line Target if Incremental Find Target class equals required if f Incremental Find Target null I Status Line Manager manager get Status Line Manager if manager null f Incremental Find Target f Source Viewer null null new Incremental Find Target f Source Viewer manager return f Incremental Find Target if I Find Replace Target class equals required if f Find Replace Target null I Find Replace Target target f Source Viewer null null f Source Viewer get Find Replace Target if target null f Find Replace Target new Find Replace Target this target if f Find Scope Highlight Color null f Find Replace Target set Scope Highlight Color f Find Scope Highlight Color return f Find Replace Target if I Text Operation Target class equals required return f Source Viewer null null f Source Viewer get Text Operation Target if I Rewrite Target class equals required if f Source Viewer instanceof I Text Viewer Extension I Text Viewer Extension extension I Text Viewer Extension f Source Viewer return extension get Rewrite Target return null if Control class equals required return f Source Viewer null f Source Viewer get Text Widget null return super get Adapter required  getAdapter IEditorStatusLine fEditorStatusLine IStatusLineManager statusLineManager getStatusLineManager ISelectionProvider selectionProvider getSelectionProvider statusLineManager selectionProvider fEditorStatusLine EditorStatusLine statusLineManager selectionProvider fEditorStatusLine IVerticalRulerInfo fVerticalRuler fVerticalRuler IMarkRegionTarget fMarkRegionTarget IStatusLineManager getStatusLineManager fMarkRegionTarget fSourceViewer MarkRegionTarget fSourceViewer fMarkRegionTarget DeleteLineTarget fDeleteLineTarget fDeleteLineTarget DeleteLineTarget fSourceViewer fDeleteLineTarget IncrementalFindTarget fIncrementalFindTarget IStatusLineManager getStatusLineManager fIncrementalFindTarget fSourceViewer IncrementalFindTarget fSourceViewer fIncrementalFindTarget IFindReplaceTarget fFindReplaceTarget IFindReplaceTarget fSourceViewer fSourceViewer getFindReplaceTarget fFindReplaceTarget FindReplaceTarget fFindScopeHighlightColor fFindReplaceTarget setScopeHighlightColor fFindScopeHighlightColor fFindReplaceTarget ITextOperationTarget fSourceViewer fSourceViewer getTextOperationTarget IRewriteTarget fSourceViewer ITextViewerExtension ITextViewerExtension ITextViewerExtension fSourceViewer getRewriteTarget fSourceViewer fSourceViewer getTextWidget getAdapter
see I Workbench Part set Focus public void set Focus if f Source Viewer null f Source Viewer get Text Widget null f Source Viewer get Text Widget set Focus  IWorkbenchPart setFocus setFocus fSourceViewer fSourceViewer getTextWidget fSourceViewer getTextWidget setFocus
see I Text Editor shows Highlight Range Only public boolean shows Highlight Range Only return f Show Highlight Range Only  ITextEditor showsHighlightRangeOnly showsHighlightRangeOnly fShowHighlightRangeOnly
see I Text Editor show Highlight Range Only boolean public void show Highlight Range Only boolean show Highlight Range Only f Show Highlight Range Only show Highlight Range Only  ITextEditor showHighlightRangeOnly showHighlightRangeOnly showHighlightRangeOnly fShowHighlightRangeOnly showHighlightRangeOnly
public void set Highlight Range int offset int length boolean move Cursor if f Source Viewer null return if f Show Highlight Range Only if move Cursor f Source Viewer set Visible Region offset length else I Region range Indication f Source Viewer get Range Indication if range Indication null offset range Indication get Offset length range Indication get Length f Source Viewer set Range Indication offset length move Cursor  setHighlightRange moveCursor fSourceViewer fShowHighlightRangeOnly moveCursor fSourceViewer setVisibleRegion IRegion rangeIndication fSourceViewer getRangeIndication rangeIndication rangeIndication getOffset rangeIndication getLength fSourceViewer setRangeIndication moveCursor
public I Region get Highlight Range if f Source Viewer null return null if f Show Highlight Range Only return get Coverage f Source Viewer return f Source Viewer get Range Indication  IRegion getHighlightRange fSourceViewer fShowHighlightRangeOnly getCoverage fSourceViewer fSourceViewer getRangeIndication
public void reset Highlight Range if f Source Viewer null return if f Show Highlight Range Only f Source Viewer reset Visible Region else f Source Viewer remove Range Indication  resetHighlightRange fSourceViewer fShowHighlightRangeOnly fSourceViewer resetVisibleRegion fSourceViewer removeRangeIndication
Adjusts the highlight range so that at least the specified range is highlighted p Subclasses may re implement this method p param offset the offset of the range which at least should be highlighted param length the length of the range which at least should be highlighted protected void adjust Highlight Range int offset int length if f Source Viewer null return if f Source Viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 f Source Viewer extension expose Model Range new Region offset length else if is Visible f Source Viewer offset length f Source Viewer reset Visible Region  adjustHighlightRange fSourceViewer fSourceViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 fSourceViewer exposeModelRange isVisible fSourceViewer fSourceViewer resetVisibleRegion
see I Text Editor select And Reveal int int public void select And Reveal int start int length select And Reveal start length start length  ITextEditor selectAndReveal selectAndReveal selectAndReveal
Selects and reveals the specified ranges in this text editor param selection Start the offset of the selection param selection Length the length of the selection param reveal Start the offset of the revealed range param reveal Length the length of the revealed range since 3 0 protected void select And Reveal int selection Start int selection Length int reveal Start int reveal Length if f Source Viewer null return I Selection selection get Selection Provider get Selection if selection instanceof Text Selection Text Selection text Selection Text Selection selection if text Selection get Offset 0 text Selection get Length 0 mark In Navigation History Styled Text widget f Source Viewer get Text Widget widget set Redraw false adjust Highlight Range reveal Start reveal Length f Source Viewer reveal Range reveal Start reveal Length f Source Viewer set Selected Range selection Start selection Length mark In Navigation History widget set Redraw true  selectionStart selectionLength revealStart revealLength selectAndReveal selectionStart selectionLength revealStart revealLength fSourceViewer ISelection getSelectionProvider getSelection TextSelection TextSelection textSelection TextSelection textSelection getOffset textSelection getLength markInNavigationHistory StyledText fSourceViewer getTextWidget setRedraw adjustHighlightRange revealStart revealLength fSourceViewer revealRange revealStart revealLength fSourceViewer setSelectedRange selectionStart selectionLength markInNavigationHistory setRedraw
since 2 1 public I Navigation Location create Empty Navigation Location return new Text Selection Navigation Location this false  INavigationLocation createEmptyNavigationLocation TextSelectionNavigationLocation
see org eclipse ui I Navigation Location Provider create Navigation Location public I Navigation Location create Navigation Location return new Text Selection Navigation Location this true  INavigationLocationProvider createNavigationLocation INavigationLocation createNavigationLocation TextSelectionNavigationLocation
Writes a check mark of the given situation into the navigation history since 2 1 protected void mark In Navigation History I Workbench Page page get Editor Site get Page page get Navigation History mark Location this  markInNavigationHistory IWorkbenchPage getEditorSite getPage getNavigationHistory markLocation
Hook which gets called when the editor has been saved Subclasses may extend since 2 1 protected void editor Saved I Workbench Page page get Editor Site get Page I Navigation Location locations page get Navigation History get Locations I Editor Input input get Editor Input for int i 0 i locations length i if locations i instanceof Text Selection Navigation Location if input equals locations i get Input Text Selection Navigation Location location Text Selection Navigation Location locations i location part Saved this  editorSaved IWorkbenchPage getEditorSite getPage INavigationLocation getNavigationHistory getLocations IEditorInput getEditorInput TextSelectionNavigationLocation getInput TextSelectionNavigationLocation TextSelectionNavigationLocation partSaved
see Workbench Part fire Property Change int protected void fire Property Change int property super fire Property Change property update Property Dependent Actions  WorkbenchPart firePropertyChange firePropertyChange firePropertyChange updatePropertyDependentActions
public void set Status Field I Status Field field String category Assert is Not Null category if field null if f Status Fields null f Status Fields new Hash Map 3 f Status Fields put category field update Status Field category else if f Status Fields null f Status Fields remove category if f Incremental Find Target null I Text Editor Action Constants STATUS CATEGORY FIND FIELD equals category f Incremental Find Target set Status Field field  setStatusField IStatusField isNotNull fStatusFields fStatusFields HashMap fStatusFields updateStatusField fStatusFields fStatusFields fIncrementalFindTarget ITextEditorActionConstants STATUS_CATEGORY_FIND_FIELD fIncrementalFindTarget setStatusField
Returns the current status field for the given status category param category the status category return the current status field for the given status category since 2 0 protected I Status Field get Status Field String category if category null f Status Fields null return I Status Field f Status Fields get category return null  IStatusField getStatusField fStatusFields IStatusField fStatusFields
Returns whether this editor is in overwrite or insert mode return code true code if in insert mode code false code for overwrite mode since 2 0 protected boolean is In Insert Mode return f Is Overwriting  isInInsertMode fIsOverwriting
since 3 0 public Insert Mode get Insert Mode return f Insert Mode  InsertMode getInsertMode fInsertMode
public void set Insert Mode Insert Mode new Mode List legal Modes get Legal Insert Modes if legal Modes contains new Mode throw new Illegal Argument Exception f Insert Mode new Mode handle Insert Mode Changed  setInsertMode InsertMode newMode legalModes getLegalInsertModes legalModes newMode IllegalArgumentException fInsertMode newMode handleInsertModeChanged
Returns the set of legal insert modes If insert modes are configured all defined insert modes are legal return the set of legal insert modes since 3 0 protected List get Legal Insert Modes if f Legal Insert Modes null f Legal Insert Modes new Array List f Legal Insert Modes add SMART INSERT f Legal Insert Modes add INSERT return f Legal Insert Modes  getLegalInsertModes fLegalInsertModes fLegalInsertModes ArrayList fLegalInsertModes SMART_INSERT fLegalInsertModes fLegalInsertModes
private void switch To Next Insert Mode Insert Mode mode get Insert Mode List legal Modes get Legal Insert Modes int i 0 while i legal Modes size if legal Modes get i mode break i i i 1 legal Modes size Insert Mode new Mode Insert Mode legal Modes get i set Insert Mode new Mode  switchToNextInsertMode InsertMode getInsertMode legalModes getLegalInsertModes legalModes legalModes legalModes InsertMode newMode InsertMode legalModes setInsertMode newMode
private void toggle Overwrite Mode if f Is Overwrite Mode Enabled f Is Overwriting f Is Overwriting f Source Viewer get Text Widget invoke Action ST TOGGLE OVERWRITE handle Insert Mode Changed  toggleOverwriteMode fIsOverwriteModeEnabled fIsOverwriting fIsOverwriting fSourceViewer getTextWidget invokeAction TOGGLE_OVERWRITE handleInsertModeChanged
Configures the given insert mode as legal or illegal This call is ignored if the set of legal input modes would be empty after the call param mode the insert mode to be configured param legal code true code if the given mode is legal code false code otherwise since 3 0 protected void configure Insert Mode Insert Mode mode boolean legal List legal Modes get Legal Insert Modes if legal if legal Modes contains mode legal Modes add mode else if legal Modes size 1 if get Insert Mode mode switch To Next Insert Mode legal Modes remove mode  configureInsertMode InsertMode legalModes getLegalInsertModes legalModes legalModes legalModes getInsertMode switchToNextInsertMode legalModes
Sets the overwrite mode enablement param enable code true code to enable new overwrite mode code false code to disable since 3 0 protected void enable Overwrite Mode boolean enable if f Is Overwriting enable toggle Overwrite Mode f Is Overwrite Mode Enabled enable  enableOverwriteMode fIsOverwriting toggleOverwriteMode fIsOverwriteModeEnabled
private Caret create Overwrite Caret Styled Text styled Text Caret caret new Caret styled Text SWT NULL GC gc new GC styled Text XXX this overwrite box is not proportional font aware take a as a medium sized character Point char Size gc string Extent a NON NLS 1 caret set Size char Size x styled Text get Line Height gc dispose return caret  createOverwriteCaret StyledText styledText styledText styledText charSize stringExtent setSize charSize styledText getLineHeight
private Caret create Insert Caret Styled Text styled Text Caret caret new Caret styled Text SWT NULL caret set Size get Caret Width Preference styled Text get Line Height return caret  createInsertCaret StyledText styledText styledText setSize getCaretWidthPreference styledText getLineHeight
private Image create Raw Insert Mode Caret Image Styled Text styled Text Palette Data caret Palette new Palette Data new RGB new RGB 0 0 0 new RGB 255 255 255 int width get Caret Width Preference int width Offset width 1 Image Data image Data new Image Data 4 width Offset styled Text get Line Height 1 caret Palette Display display styled Text get Display Image bracket Image new Image display image Data GC gc new GC bracket Image gc set Foreground display get System Color SWT COLOR WHITE gc set Line Width 1 int height image Data height 3 gap between two bars of one third of the height draw boxes using lines as drawing a line of a certain width produces rounded corners for int i 0 i width i gc draw Line i 0 i height 1 gc draw Line i image Data height height i image Data height 1 gc dispose return bracket Image  createRawInsertModeCaretImage StyledText styledText PaletteData caretPalette PaletteData getCaretWidthPreference widthOffset ImageData imageData ImageData widthOffset styledText getLineHeight caretPalette styledText getDisplay bracketImage imageData bracketImage setForeground getSystemColor COLOR_WHITE setLineWidth imageData drawLine drawLine imageData imageData bracketImage
private Caret create Raw Insert Mode Caret Styled Text styled Text don t draw special raw caret if no smart mode is enabled if get Legal Insert Modes contains SMART INSERT return create Insert Caret styled Text Caret caret new Caret styled Text SWT NULL Image image create Raw Insert Mode Caret Image styled Text if image null caret set Image image else caret set Size get Caret Width Preference styled Text get Line Height return caret  createRawInsertModeCaret StyledText styledText getLegalInsertModes SMART_INSERT createInsertCaret styledText styledText createRawInsertModeCaretImage styledText setImage setSize getCaretWidthPreference styledText getLineHeight
private int get Caret Width Preference if get Preference Store null get Preference Store get Boolean PREFERENCE WIDE CARET return WIDE CARET WIDTH return SINGLE CARET WIDTH  getCaretWidthPreference getPreferenceStore getPreferenceStore getBoolean PREFERENCE_WIDE_CARET WIDE_CARET_WIDTH SINGLE_CARET_WIDTH
private void update Caret if get Source Viewer null return Styled Text styled Text get Source Viewer get Text Widget Insert Mode mode get Insert Mode styled Text set Caret null dispose Non Default Caret if get Preference Store null get Preference Store get Boolean PREFERENCE USE CUSTOM CARETS Assert is True f Non Default Caret null else if f Is Overwriting f Non Default Caret create Overwrite Caret styled Text else if SMART INSERT mode f Non Default Caret create Insert Caret styled Text else if INSERT mode f Non Default Caret create Raw Insert Mode Caret styled Text if f Non Default Caret null styled Text set Caret f Non Default Caret f Non Default Caret Image f Non Default Caret get Image else if f Initial Caret styled Text get Caret styled Text set Caret f Initial Caret  updateCaret getSourceViewer StyledText styledText getSourceViewer getTextWidget InsertMode getInsertMode styledText setCaret disposeNonDefaultCaret getPreferenceStore getPreferenceStore getBoolean PREFERENCE_USE_CUSTOM_CARETS isTrue fNonDefaultCaret fIsOverwriting fNonDefaultCaret createOverwriteCaret styledText SMART_INSERT fNonDefaultCaret createInsertCaret styledText fNonDefaultCaret createRawInsertModeCaret styledText fNonDefaultCaret styledText setCaret fNonDefaultCaret fNonDefaultCaretImage fNonDefaultCaret getImage fInitialCaret styledText getCaret styledText setCaret fInitialCaret
private void dispose Non Default Caret if f Non Default Caret Image null f Non Default Caret Image dispose f Non Default Caret Image null if f Non Default Caret null f Non Default Caret dispose f Non Default Caret null  disposeNonDefaultCaret fNonDefaultCaretImage fNonDefaultCaretImage fNonDefaultCaretImage fNonDefaultCaret fNonDefaultCaret fNonDefaultCaret
Handles a change of the editor s insert mode Subclasses may extend since 2 0 protected void handle Insert Mode Changed update Insert Mode Action update Caret update Status Field I Text Editor Action Constants STATUS CATEGORY INPUT MODE  handleInsertModeChanged updateInsertModeAction updateCaret updateStatusField ITextEditorActionConstants STATUS_CATEGORY_INPUT_MODE
private void update Insert Mode Action this may be called before the part is fully initialized see configure Insert Mode drop out in this case if get Site null return I Action action get Action I Text Editor Action Constants TOGGLE INSERT MODE if action null action set Enabled f Is Overwriting action set Checked f Insert Mode SMART INSERT  updateInsertModeAction configureInsertMode getSite IAction getAction ITextEditorActionConstants TOGGLE_INSERT_MODE setEnabled fIsOverwriting setChecked fInsertMode SMART_INSERT
Handles a potential change of the cursor position Subclasses may extend since 2 0 protected void handle Cursor Position Changed update Status Field I Text Editor Action Constants STATUS CATEGORY INPUT POSITION  handleCursorPositionChanged updateStatusField ITextEditorActionConstants STATUS_CATEGORY_INPUT_POSITION
Updates the status fields for the given category param category since 2 0 protected void update Status Field String category if category null return I Status Field field get Status Field category if field null String text null if I Text Editor Action Constants STATUS CATEGORY INPUT POSITION equals category text get Cursor Position else if I Text Editor Action Constants STATUS CATEGORY ELEMENT STATE equals category text is Editor Input Read Only f Read Only Label f Writable Label else if I Text Editor Action Constants STATUS CATEGORY INPUT MODE equals category Insert Mode mode get Insert Mode if f Is Overwriting text f Overwrite Mode Label else if INSERT mode text f Insert Mode Label else if SMART INSERT mode text f Smart Insert Mode Label field set Text text null f Error Label text  updateStatusField IStatusField getStatusField ITextEditorActionConstants STATUS_CATEGORY_INPUT_POSITION getCursorPosition ITextEditorActionConstants STATUS_CATEGORY_ELEMENT_STATE isEditorInputReadOnly fReadOnlyLabel fWritableLabel ITextEditorActionConstants STATUS_CATEGORY_INPUT_MODE InsertMode getInsertMode fIsOverwriting fOverwriteModeLabel fInsertModeLabel SMART_INSERT fSmartInsertModeLabel setText fErrorLabel
Updates all status fields since 2 0 protected void update Status Fields if f Status Fields null Iterator e f Status Fields key Set iterator while e has Next update Status Field String e next  updateStatusFields fStatusFields fStatusFields keySet hasNext updateStatusField
Returns a description of the cursor position return a description of the cursor position since 2 0 protected String get Cursor Position if f Source Viewer null return f Error Label Styled Text styled Text f Source Viewer get Text Widget int caret widget Offset2 Model Offset f Source Viewer styled Text get Caret Offset I Document document f Source Viewer get Document if document null return f Error Label try int line document get Line Of Offset caret int line Offset document get Line Offset line int tab Width styled Text get Tabs int column 0 for int i line Offset i caret i if t document get Char i column tab Width tab Width 0 0 column tab Width else column f Line Label f Value line 1 f Column Label f Value column 1 return Message Format format f Position Label Pattern f Position Label Pattern Arguments catch Bad Location Exception x return f Error Label  getCursorPosition fSourceViewer fErrorLabel StyledText styledText fSourceViewer getTextWidget widgetOffset2ModelOffset fSourceViewer styledText getCaretOffset IDocument fSourceViewer getDocument fErrorLabel getLineOfOffset lineOffset getLineOffset tabWidth styledText getTabs lineOffset getChar tabWidth tabWidth tabWidth fLineLabel fValue fColumnLabel fValue MessageFormat fPositionLabelPattern fPositionLabelPatternArguments BadLocationException fErrorLabel
public boolean is Editor Input Read Only I Document Provider provider get Document Provider if provider instanceof I Document Provider Extension I Document Provider Extension extension I Document Provider Extension provider return extension is Read Only get Editor Input return true  isEditorInputReadOnly IDocumentProvider getDocumentProvider IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension isReadOnly getEditorInput
public boolean is Editor Input Modifiable I Document Provider provider get Document Provider if provider instanceof I Document Provider Extension I Document Provider Extension extension I Document Provider Extension provider return extension is Modifiable get Editor Input return true  isEditorInputModifiable IDocumentProvider getDocumentProvider IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension isModifiable getEditorInput
since 2 0 public void add Ruler Context Menu Listener I Menu Listener listener f Ruler Context Menu Listeners add listener  addRulerContextMenuListener IMenuListener fRulerContextMenuListeners
since 2 0 public void remove Ruler Context Menu Listener I Menu Listener listener f Ruler Context Menu Listeners remove listener  removeRulerContextMenuListener IMenuListener fRulerContextMenuListeners
Returns whether this editor can handle the move of the original element so that it ends up being the moved element By default this method returns code true code Subclasses may reimplement param original Element the original element param moved Element the moved element return whether this editor can handle the move of the original element so that it ends up being the moved element since 2 0 protected boolean can Handle Move I Editor Input original Element I Editor Input moved Element return true  originalElement movedElement canHandleMove IEditorInput originalElement IEditorInput movedElement
Returns the offset of the given source viewer s document that corresponds to the given widget offset or code 1 code if there is no such offset param viewer the source viewer param widget Offset the widget offset return the corresponding offset in the source viewer s document or code 1 code since 2 1 protected final static int widget Offset2 Model Offset I Source Viewer viewer int widget Offset if viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 viewer return extension widget Offset2 Model Offset widget Offset return widget Offset viewer get Visible Region get Offset  widgetOffset widgetOffset2ModelOffset ISourceViewer widgetOffset ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 widgetOffset2ModelOffset widgetOffset widgetOffset getVisibleRegion getOffset
Returns the offset of the given source viewer s text widget that corresponds to the given model offset or code 1 code if there is no such offset param viewer the source viewer param model Offset the model offset return the corresponding offset in the source viewer s text widget or code 1 code since 3 0 protected final static int model Offset2 Widget Offset I Source Viewer viewer int model Offset if viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 viewer return extension model Offset2 Widget Offset model Offset return model Offset viewer get Visible Region get Offset  modelOffset modelOffset2WidgetOffset ISourceViewer modelOffset ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 modelOffset2WidgetOffset modelOffset modelOffset getVisibleRegion getOffset
Returns the minimal region of the given source viewer s document that completely comprises everything that is visible in the viewer s widget param viewer the viewer go return the coverage for return the minimal region of the source viewer s document comprising the contents of the viewer s widget since 2 1 protected final static I Region get Coverage I Source Viewer viewer if viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 viewer return extension get Model Coverage return viewer get Visible Region  IRegion getCoverage ISourceViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 getModelCoverage getVisibleRegion
Tells whether the given region is visible in the given source viewer param viewer the source viewer param offset the offset of the region param length the length of the region return code true code if visible since 2 1 protected final static boolean is Visible I Source Viewer viewer int offset int length if viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 viewer I Region overlap extension model Range2 Widget Range new Region offset length return overlap null return viewer overlaps With Visible Region offset length  isVisible ISourceViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 IRegion modelRange2WidgetRange overlapsWithVisibleRegion
since 3 0 public void show Change Information boolean show do nothing  showChangeInformation
since 3 0 public boolean is Change Information Showing return false  isChangeInformationShowing

Creates a new action for the given text editor The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param text Editor the text editor param marker Type the type of marker to add param ask For Label code true code if the user should be asked for a label for the new marker see Text Editor Action Text Editor Action Resource Bundle String I Text Editor public Add Marker Action Resource Bundle bundle String prefix I Text Editor text Editor String marker Type boolean ask For Label super bundle prefix text Editor f Bundle bundle f Prefix prefix f Marker Type marker Type f Ask For Label ask For Label  ResourceAction textEditor markerType askForLabel TextEditorAction TextEditorAction ResourceBundle ITextEditor AddMarkerAction ResourceBundle ITextEditor textEditor markerType askForLabel textEditor fBundle fPrefix fMarkerType markerType fAskForLabel askForLabel
Returns this action s resource bundle return this action s resource bundle protected Resource Bundle get Resource Bundle return f Bundle  ResourceBundle getResourceBundle fBundle
Returns this action s resource key prefix return this action s resource key prefix protected String get Resource Key Prefix return f Prefix  getResourceKeyPrefix fPrefix
public void run I Resource resource get Resource if resource null return Map attributes get Initial Attributes if f Ask For Label if ask For Label attributes return try Marker Utilities create Marker resource attributes f Marker Type catch Core Exception x Bundle bundle Platform get Bundle PlatformUI PLUGIN ID I Log log Platform get Log bundle log log x get Status Shell shell get Text Editor get Site get Shell String title get String f Bundle f Prefix error dialog title f Prefix error dialog title NON NLS 2 NON NLS 1 String msg get String f Bundle f Prefix error dialog message f Prefix error dialog message NON NLS 2 NON NLS 1 Error Dialog open Error shell title msg x get Status  IResource getResource getInitialAttributes fAskForLabel askForLabel MarkerUtilities createMarker fMarkerType CoreException getBundle PLUGIN_ID ILog getLog getStatus getTextEditor getSite getShell getString fBundle fPrefix fPrefix getString fBundle fPrefix fPrefix ErrorDialog openError getStatus
see Text Editor Action update public void update set Enabled get Resource null  TextEditorAction setEnabled getResource
String message get String f Bundle f Prefix dialog message f Prefix dialog message NON NLS 2 NON NLS 1 I Input Validator input Validator new I Input Validator public String is Valid String new Text return new Text null new Text trim length 0 null NON NLS 1  getString fBundle fPrefix fPrefix IInputValidator inputValidator IInputValidator isValid newText newText newText
Asks the user for a marker label Returns code true code if a label is entered code false code if the user cancels the input dialog The value for the attribute code message code is modified in the given attribute map param attributes the attributes map return code true code if a label has been entered protected boolean ask For Label Map attributes Object o attributes get message NON NLS 1 String proposal o instanceof String String o NON NLS 1 if proposal null proposal NON NLS 1 String title get String f Bundle f Prefix dialog title f Prefix dialog title NON NLS 2 NON NLS 1 String message get String f Bundle f Prefix dialog message f Prefix dialog message NON NLS 2 NON NLS 1 I Input Validator input Validator new I Input Validator public String is Valid String new Text return new Text null new Text trim length 0 null NON NLS 1 Input Dialog dialog new Input Dialog get Text Editor get Site get Shell title message proposal input Validator String label null if dialog open Window CANCEL label dialog get Value if label null return false label label trim if label length 0 return false attributes put message label NON NLS 1 return true  askForLabel getString fBundle fPrefix fPrefix getString fBundle fPrefix fPrefix IInputValidator inputValidator IInputValidator isValid newText newText newText InputDialog InputDialog getTextEditor getSite getShell inputValidator getValue
Returns the attributes the new marker will be initialized with p Subclasses may extend or replace this method p return the attributes the new marker will be initialized with protected Map get Initial Attributes Map attributes new Hash Map 11 I Text Selection selection I Text Selection get Text Editor get Selection Provider get Selection if selection is Empty int start selection get Offset int length selection get Length if length 0 length length start length Marker Utilities set Char Start attributes start Marker Utilities set Char End attributes start length marker line numbers are 1 based int line selection get Start Line Marker Utilities set Line Number attributes line 1 1 line 1 I Document document get Text Editor get Document Provider get Document get Text Editor get Editor Input Marker Utilities set Message attributes get Label Proposal document start length return attributes  getInitialAttributes HashMap ITextSelection ITextSelection getTextEditor getSelectionProvider getSelection isEmpty getOffset getLength MarkerUtilities setCharStart MarkerUtilities setCharEnd getStartLine MarkerUtilities setLineNumber IDocument getTextEditor getDocumentProvider getDocument getTextEditor getEditorInput MarkerUtilities setMessage getLabelProposal
Returns the initial label for the marker param document the document from which to extract a label proposal param offset the document offset of the range from which to extract the label proposal param length the length of the range from which to extract the label proposal return the label proposal protected String get Label Proposal I Document document int offset int length try if length 0 find first white char but skip leading white chars int i 0 boolean skip true while i length boolean is Whitespace Character is Whitespace document get Char offset i if skip is Whitespace break if skip is Whitespace skip false i String label document get offset i return label trim char ch Get the first white char before the selection int left offset int line document get Line Of Offset offset int limit document get Line Offset line while left limit ch document get Char left if Character is Whitespace ch break left limit document get Line Length line Now get the first letter while left limit ch document get Char left if Character is Whitespace ch break left if left limit return null limit Math min limit left MAX LABEL LENGTH Get the next white char int right offset length limit limit offset length while right limit ch document get Char right if Character is Whitespace ch break right Trim the string and return it if left right String label document get left right left return label trim catch Bad Location Exception x don t proposal label then return null  getLabelProposal IDocument isWhitespace isWhitespace getChar isWhitespace isWhitespace getLineOfOffset getLineOffset getChar isWhitespace getLineLength getChar isWhitespace MAX_LABEL_LENGTH getChar isWhitespace BadLocationException
Returns the resource on which to create the marker or code null code if there is no applicable resource This queries the editor s input using code get Adapter I Resource class code Subclasses may override this method return the resource to which to attach the newly created marker protected I Resource get Resource I Text Editor editor get Text Editor if editor null I Editor Input input editor get Editor Input return I Resource I Adaptable input get Adapter I Resource class return null  getAdapter IResource IResource getResource ITextEditor getTextEditor IEditorInput getEditorInput IResource IAdaptable getAdapter IResource

Creates a new action for the given text editor The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the text editor see Add Marker Action Add Marker Action Resource Bundle String I Text Editor String boolean since 3 0 public Add Task Action Resource Bundle bundle String prefix I Text Editor editor super bundle prefix editor I Marker TASK false  ResourceAction AddMarkerAction AddMarkerAction ResourceBundle ITextEditor AddTaskAction ResourceBundle ITextEditor IMarker
public void run I Resource resource get Resource if resource null return Map attributes get Initial Attributes Task Properties Dialog dialog new Task Properties Dialog get Text Editor get Site get Shell dialog set Resource resource dialog set Initial Attributes attributes dialog open  IResource getResource getInitialAttributes TaskPropertiesDialog TaskPropertiesDialog getTextEditor getSite getShell setResource setInitialAttributes

Creates a new uninitialized annotation preference Note that instances with a code null code annotation type are invalid and should not be used public Annotation Preference  AnnotationPreference
Creates a new annotation preference for the given annotation type param annotation Type the annotation type param color Key the preference key for the presentation color param text Key the preference key for the visibility inside text param overview Ruler Key the preference key for the visibility in the overview ruler param presentation Layer the presentation layer public Annotation Preference Object annotation Type String color Key String text Key String overview Ruler Key int presentation Layer f Annotation Type annotation Type set Value COLOR PREFERENCE KEY color Key set Value TEXT PREFERENCE KEY text Key set Value OVERVIEW RULER PREFERENCE KEY overview Ruler Key set Value PRESENTATION LAYER presentation Layer  annotationType colorKey textKey overviewRulerKey presentationLayer AnnotationPreference annotationType colorKey textKey overviewRulerKey presentationLayer fAnnotationType annotationType setValue COLOR_PREFERENCE_KEY colorKey setValue TEXT_PREFERENCE_KEY textKey setValue OVERVIEW_RULER_PREFERENCE_KEY overviewRulerKey setValue PRESENTATION_LAYER presentationLayer
Sets the given value for the given attribute param attribute the attribute param value the attribute value since 3 0 protected void set Value Object attribute Object value f Attributes put attribute value  setValue fAttributes
Sets the given value for the given attribute param attribute the attribute param value the attribute value since 3 0 protected void set Value Object attribute int value f Attributes put attribute new Integer value  setValue fAttributes
Sets the given value for the given attribute param attribute the attribute param value the attribute value since 3 0 protected void set Value Object attribute boolean value f Attributes put attribute value Boolean TRUE Boolean FALSE  setValue fAttributes
Returns the value of the given attribute as string param attribute the attribute return the attribute value since 3 0 protected String get String Value Object attribute Object value f Attributes get attribute if value instanceof String return String value return null  getStringValue fAttributes
Returns the value of the given attribute as boolean param attribute the attribute return the attribute value since 3 0 protected boolean get Boolean Value Object attribute Object value f Attributes get attribute if value instanceof Boolean return Boolean value boolean Value return false  getBooleanValue fAttributes booleanValue
Returns the value of the given attribute as integer param attribute the attribute return the attribute value since 3 0 protected int get Integer Value Object attribute Object value f Attributes get attribute if value instanceof Integer return Integer value int Value return 0  getIntegerValue fAttributes intValue
Returns the value of the given attribute param attribute the attribute return the attribute value since 3 0 public Object get Value Object attribute return f Attributes get attribute  getValue fAttributes
Returns whether the given attribute is defined param attribute the attribute return code true code if the attribute has a value code false code otherwise since 3 0 public boolean has Value Object attribute return f Attributes get attribute null  hasValue fAttributes
Returns whether the given string is a preference key param key the string to test return code true code if the string is a preference key public boolean is Preference Key String key if key null return false return key equals get String Value COLOR PREFERENCE KEY key equals get String Value OVERVIEW RULER PREFERENCE KEY key equals get String Value TEXT PREFERENCE KEY key equals get String Value HIGHLIGHT PREFERENCE KEY key equals get String Value TEXT STYLE PREFERENCE KEY key equals get String Value VERTICAL RULER PREFERENCE KEY  isPreferenceKey getStringValue COLOR_PREFERENCE_KEY getStringValue OVERVIEW_RULER_PREFERENCE_KEY getStringValue TEXT_PREFERENCE_KEY getStringValue HIGHLIGHT_PREFERENCE_KEY getStringValue TEXT_STYLE_PREFERENCE_KEY getStringValue VERTICAL_RULER_PREFERENCE_KEY
Returns the annotation type Should not be null in a completely set up instance return the annotation type code null code if the receiver has not been initialized yet public Object get Annotation Type return f Annotation Type  getAnnotationType fAnnotationType
Returns the marker type return the marker type or code null code if none is set deprecated since 3 0 public String get Marker Type return f Marker Type  getMarkerType fMarkerType
Returns the marker severity return the marker severity deprecated since 3 0 public int get Severity return f Severity  getSeverity fSeverity
Sets the annotation type Note that instances with a code null code annotation type are considered invalid and should not be used with the framework param annotation Type the annotation type public void set Annotation Type Object annotation Type f Annotation Type annotation Type  annotationType setAnnotationType annotationType fAnnotationType annotationType
Sets the marker type param marker Type the marker type public void set Marker Type String marker Type f Marker Type marker Type  markerType setMarkerType markerType fMarkerType markerType
Sets the marker severity param severity the marker severity public void set Severity int severity f Severity severity  setSeverity fSeverity
Returns the preference key for the presentation color return the preference key for the presentation color or code null code if none is set public String get Color Preference Key return get String Value COLOR PREFERENCE KEY  getColorPreferenceKey getStringValue COLOR_PREFERENCE_KEY
Returns the default presentation color return the default presentation color or code null code if none is set public RGB get Color Preference Value return RGB get Value COLOR PREFERENCE VALUE  getColorPreferenceValue getValue COLOR_PREFERENCE_VALUE
Returns the presentation string for this annotation type return the presentation string for this annotation type or code null code if none is set public String get Preference Label return get String Value PREFERENCE LABEL  getPreferenceLabel getStringValue PREFERENCE_LABEL
Returns the preference key for the visibility in the overview ruler return the preference key for the visibility in the overview ruler or code null code if none is set public String get Overview Ruler Preference Key return get String Value OVERVIEW RULER PREFERENCE KEY  getOverviewRulerPreferenceKey getStringValue OVERVIEW_RULER_PREFERENCE_KEY
Returns the default visibility in the overview ruler return the default visibility in the overview ruler public boolean get Overview Ruler Preference Value return get Boolean Value OVERVIEW RULER PREFERENCE VALUE  getOverviewRulerPreferenceValue getBooleanValue OVERVIEW_RULER_PREFERENCE_VALUE
Returns the preference key for the visibility in the vertical ruler return the preference key for the visibility in the vertical ruler or code null code if none is set since 3 0 public String get Vertical Ruler Preference Key return get String Value VERTICAL RULER PREFERENCE KEY  getVerticalRulerPreferenceKey getStringValue VERTICAL_RULER_PREFERENCE_KEY
Returns the default visibility in the vertical ruler return the default visibility in the vertical ruler since 3 0 public boolean get Vertical Ruler Preference Value return get Boolean Value VERTICAL RULER PREFERENCE VALUE  getVerticalRulerPreferenceValue getBooleanValue VERTICAL_RULER_PREFERENCE_VALUE
Returns the presentation layer return the presentation layer public int get Presentation Layer return get Integer Value PRESENTATION LAYER  getPresentationLayer getIntegerValue PRESENTATION_LAYER
Returns the preference key for the visibility inside text return the preference key for the visibility inside text or code null code if none is set public String get Text Preference Key return get String Value TEXT PREFERENCE KEY  getTextPreferenceKey getStringValue TEXT_PREFERENCE_KEY
Returns the default visibility inside text return the default visibility inside text public boolean get Text Preference Value return get Boolean Value TEXT PREFERENCE VALUE  getTextPreferenceValue getBooleanValue TEXT_PREFERENCE_VALUE
Returns the preference key for highlighting inside text return the preference key for highlighting inside text or code null code if none is set since 3 0 public String get Highlight Preference Key return get String Value HIGHLIGHT PREFERENCE KEY  getHighlightPreferenceKey getStringValue HIGHLIGHT_PREFERENCE_KEY
Returns the default value for highlighting inside text return the default value for highlighting inside text since 3 0 public boolean get Highlight Preference Value return get Boolean Value HIGHLIGHT PREFERENCE VALUE  getHighlightPreferenceValue getBooleanValue HIGHLIGHT_PREFERENCE_VALUE
Returns whether the annotation type contributes to the header of the overview ruler return code true code if the annotation type contributes to the header of the overview ruler public boolean contributes To Header return get Boolean Value HEADER VALUE  contributesToHeader getBooleanValue HEADER_VALUE
Sets the preference key for the presentation color param color Key the preference key public void set Color Preference Key String color Key set Value COLOR PREFERENCE KEY color Key  colorKey setColorPreferenceKey colorKey setValue COLOR_PREFERENCE_KEY colorKey
Sets the default presentation color param color Value the default color public void set Color Preference Value RGB color Value set Value COLOR PREFERENCE VALUE color Value  colorValue setColorPreferenceValue colorValue setValue COLOR_PREFERENCE_VALUE colorValue
Sets the presentation label of this annotation type param label the presentation label public void set Preference Label String label set Value PREFERENCE LABEL label  setPreferenceLabel setValue PREFERENCE_LABEL
Sets the preference key for the visibility in the overview ruler param overview Ruler Key the preference key public void set Overview Ruler Preference Key String overview Ruler Key set Value OVERVIEW RULER PREFERENCE KEY overview Ruler Key  overviewRulerKey setOverviewRulerPreferenceKey overviewRulerKey setValue OVERVIEW_RULER_PREFERENCE_KEY overviewRulerKey
Sets the default visibility in the overview ruler param overview Ruler Value code true code if visible by default code false code otherwise public void set Overview Ruler Preference Value boolean overview Ruler Value set Value OVERVIEW RULER PREFERENCE VALUE overview Ruler Value  overviewRulerValue setOverviewRulerPreferenceValue overviewRulerValue setValue OVERVIEW_RULER_PREFERENCE_VALUE overviewRulerValue
Sets the preference key for the visibility in the vertical ruler param vertical Ruler Key the preference key since 3 0 public void set Vertical Ruler Preference Key String vertical Ruler Key set Value VERTICAL RULER PREFERENCE KEY vertical Ruler Key  verticalRulerKey setVerticalRulerPreferenceKey verticalRulerKey setValue VERTICAL_RULER_PREFERENCE_KEY verticalRulerKey
Sets the default visibility in the vertical ruler param vertical Ruler Value code true code if visible by default code false code otherwise since 3 0 public void set Vertical Ruler Preference Value boolean vertical Ruler Value set Value VERTICAL RULER PREFERENCE VALUE vertical Ruler Value  verticalRulerValue setVerticalRulerPreferenceValue verticalRulerValue setValue VERTICAL_RULER_PREFERENCE_VALUE verticalRulerValue
Sets the presentation layer param presentation Layer the presentation layer public void set Presentation Layer int presentation Layer set Value PRESENTATION LAYER presentation Layer  presentationLayer setPresentationLayer presentationLayer setValue PRESENTATION_LAYER presentationLayer
Sets the preference key for the visibility of squiggles inside text param text Key the preference key public void set Text Preference Key String text Key set Value TEXT PREFERENCE KEY text Key  textKey setTextPreferenceKey textKey setValue TEXT_PREFERENCE_KEY textKey
Sets the default visibility inside text param text Value code true code if visible by default code false code otherwise public void set Text Preference Value boolean text Value set Value TEXT PREFERENCE VALUE text Value  textValue setTextPreferenceValue textValue setValue TEXT_PREFERENCE_VALUE textValue
Sets the preference key for highlighting inside text param highlight Key the preference key since 3 0 public void set Highlight Preference Key String highlight Key set Value HIGHLIGHT PREFERENCE KEY highlight Key  highlightKey setHighlightPreferenceKey highlightKey setValue HIGHLIGHT_PREFERENCE_KEY highlightKey
Sets the default value for highlighting inside text param highlight Value code true code if highlighted in text by default code false code otherwise since 3 0 public void set Highlight Preference Value boolean highlight Value set Value HIGHLIGHT PREFERENCE VALUE highlight Value  highlightValue setHighlightPreferenceValue highlightValue setValue HIGHLIGHT_PREFERENCE_VALUE highlightValue
Sets whether the annotation type contributes to the overview ruler s header param contributes To Header code true code if in header code false code otherwise public void set Contributes To Header boolean contributes To Header set Value HEADER VALUE contributes To Header  contributesToHeader setContributesToHeader contributesToHeader setValue HEADER_VALUE contributesToHeader
Returns the default value for go to next navigation enablement return code true code if enabled by default since 3 0 public boolean is Go To Next Navigation Target return get Boolean Value IS GO TO NEXT TARGET VALUE  isGoToNextNavigationTarget getBooleanValue IS_GO_TO_NEXT_TARGET_VALUE
Sets the default value for go to next navigation enablement param is Go To Next Navigation Target code true code if enabled by default since 3 0 public void set Is Go To Next Navigation Target boolean is Go To Next Navigation Target set Value IS GO TO NEXT TARGET VALUE is Go To Next Navigation Target  isGoToNextNavigationTarget setIsGoToNextNavigationTarget isGoToNextNavigationTarget setValue IS_GO_TO_NEXT_TARGET_VALUE isGoToNextNavigationTarget
Returns the preference key for go to next navigation enablement return the preference key or code null code if the key is undefined since 3 0 public String get Is Go To Next Navigation Target Key return get String Value IS GO TO NEXT TARGET KEY  getIsGoToNextNavigationTargetKey getStringValue IS_GO_TO_NEXT_TARGET_KEY
Sets the preference key for go to next navigation enablement param is Go To Next Navigation Target Key code true code if enabled by default since 3 0 public void set Is Go To Next Navigation Target Key String is Go To Next Navigation Target Key set Value IS GO TO NEXT TARGET KEY is Go To Next Navigation Target Key  isGoToNextNavigationTargetKey setIsGoToNextNavigationTargetKey isGoToNextNavigationTargetKey setValue IS_GO_TO_NEXT_TARGET_KEY isGoToNextNavigationTargetKey
Returns the default value for go to previous navigation enablement return code true code if enabled by default since 3 0 public boolean is Go To Previous Navigation Target return get Boolean Value IS GO TO PREVIOUS TARGET VALUE  isGoToPreviousNavigationTarget getBooleanValue IS_GO_TO_PREVIOUS_TARGET_VALUE
Sets the default value for go to previous navigation enablement param is Go To Previous Navigation Target code true code if enabled by default since 3 0 public void set Is Go To Previous Navigation Target boolean is Go To Previous Navigation Target set Value IS GO TO PREVIOUS TARGET VALUE is Go To Previous Navigation Target  isGoToPreviousNavigationTarget setIsGoToPreviousNavigationTarget isGoToPreviousNavigationTarget setValue IS_GO_TO_PREVIOUS_TARGET_VALUE isGoToPreviousNavigationTarget
Returns the preference key for go to previous navigation enablement return the preference key or code null code if the key is undefined since 3 0 public String get Is Go To Previous Navigation Target Key return get String Value IS GO TO PREVIOUS TARGET KEY  getIsGoToPreviousNavigationTargetKey getStringValue IS_GO_TO_PREVIOUS_TARGET_KEY
Sets the preference key for go to previous navigation enablement param is Go To Previous Navigation Target Key the preference key since 3 0 public void set Is Go To Previous Navigation Target Key String is Go To Previous Navigation Target Key set Value IS GO TO PREVIOUS TARGET KEY is Go To Previous Navigation Target Key  isGoToPreviousNavigationTargetKey setIsGoToPreviousNavigationTargetKey isGoToPreviousNavigationTargetKey setValue IS_GO_TO_PREVIOUS_TARGET_KEY isGoToPreviousNavigationTargetKey
Returns the preference key for the visibility in the next previous drop down toolbar action return the preference key or code null code if the key is undefined since 3 0 public String get Show In Next Prev Dropdown Toolbar Action Key return get String Value SHOW IN NAVIGATION DROPDOWN KEY  getShowInNextPrevDropdownToolbarActionKey getStringValue SHOW_IN_NAVIGATION_DROPDOWN_KEY
Sets the preference key for the visibility in the next previous drop down toolbar action param show In Next Prev Dropdown Toolbar Action Key the preference key since 3 0 public void set Show In Next Prev Dropdown Toolbar Action Key String show In Next Prev Dropdown Toolbar Action Key set Value SHOW IN NAVIGATION DROPDOWN KEY show In Next Prev Dropdown Toolbar Action Key  showInNextPrevDropdownToolbarActionKey setShowInNextPrevDropdownToolbarActionKey showInNextPrevDropdownToolbarActionKey setValue SHOW_IN_NAVIGATION_DROPDOWN_KEY showInNextPrevDropdownToolbarActionKey
Returns the default value for the visibility in the next previous drop down toolbar action return code true code if enabled by default since 3 0 public boolean is Show In Next Prev Dropdown Toolbar Action return get Boolean Value SHOW IN NAVIGATION DROPDOWN VALUE  isShowInNextPrevDropdownToolbarAction getBooleanValue SHOW_IN_NAVIGATION_DROPDOWN_VALUE
Sets the default value for the visibility in the next previous drop down toolbar action param show In Next Prev Dropdown Toolbar Action code true code if enabled by default since 3 0 public void set Show In Next Prev Dropdown Toolbar Action boolean show In Next Prev Dropdown Toolbar Action set Value SHOW IN NAVIGATION DROPDOWN VALUE show In Next Prev Dropdown Toolbar Action  showInNextPrevDropdownToolbarAction setShowInNextPrevDropdownToolbarAction showInNextPrevDropdownToolbarAction setValue SHOW_IN_NAVIGATION_DROPDOWN_VALUE showInNextPrevDropdownToolbarAction
Sets the preference key for the text style property param key the new key since 3 0 public void set Text Style Preference Key String key set Value TEXT STYLE PREFERENCE KEY key  setTextStylePreferenceKey setValue TEXT_STYLE_PREFERENCE_KEY
Returns the preference key for the decoration style used when the annotation is shown in text return the preference key for the decoration style or code null code if the key is undefined since 3 0 public String get Text Style Preference Key return get String Value TEXT STYLE PREFERENCE KEY  getTextStylePreferenceKey getStringValue TEXT_STYLE_PREFERENCE_KEY
Returns the value for the decoration style used when the annotation is shown in text return the value for the decoration style or code null code if the key is undefined since 3 0 public String get Text Style Value return get String Value TEXT STYLE PREFERENCE VALUE  getTextStyleValue getStringValue TEXT_STYLE_PREFERENCE_VALUE
Sets the value for the text style property param value the new text decoration style since 3 0 public void set Text Style Value String value if STYLE NONE equals value STYLE BOX equals value STYLE IBEAM equals value STYLE SQUIGGLES equals value STYLE UNDERLINE equals value throw new Illegal Argument Exception set Value TEXT STYLE PREFERENCE VALUE value  setTextStyleValue STYLE_NONE STYLE_BOX STYLE_IBEAM STYLE_SQUIGGLES STYLE_UNDERLINE IllegalArgumentException setValue TEXT_STYLE_PREFERENCE_VALUE
Returns the image descriptor for the image to be drawn in the vertical ruler The provided image is only used if code get Annotation Image Provider code returns code null code return the image descriptor or code null code since 3 0 public Image Descriptor get Image Descriptor return Image Descriptor get Value IMAGE DESCRIPTOR  getAnnotationImageProvider ImageDescriptor getImageDescriptor ImageDescriptor getValue IMAGE_DESCRIPTOR
Sets the image descriptor for the image to be drawn in the vertical ruler param descriptor the image descriptor since 3 0 public void set Image Descriptor Image Descriptor descriptor set Value IMAGE DESCRIPTOR descriptor  setImageDescriptor ImageDescriptor setValue IMAGE_DESCRIPTOR
Returns the symbolic name of the image to be drawn in the vertical ruler The image is only used if code get Image Descriptor code returns code null code return the symbolic name of the image or code null code since 3 0 public String get Symbolic Image Name return get String Value SYMBOLIC IMAGE NAME  getImageDescriptor getSymbolicImageName getStringValue SYMBOLIC_IMAGE_NAME
Sets the symbolic name of the image to be drawn in the vertical ruler param symbolic Image Name the symbolic image name since 3 0 public void set Symbolic Image Name String symbolic Image Name set Value SYMBOLIC IMAGE NAME symbolic Image Name  symbolicImageName setSymbolicImageName symbolicImageName setValue SYMBOLIC_IMAGE_NAME symbolicImageName
Returns the annotation image provider If no default annotation image provider has been set this method checks whether the annotation image provider data has been set If so an annotation image provider is created if the configuration element s plug in is loaded When an annotation image provider has been created successfully it is set as the default annotation image provider return the annotation image provider since 3 0 public I Annotation Image Provider get Annotation Image Provider if f Annotation Image Provider null if f Configuration Element null f Annotation Image Provider Attribute null Bundle bundle Platform get Bundle f Configuration Element get Declaring Extension get Namespace if bundle null bundle get State Bundle ACTIVE try f Annotation Image Provider I Annotation Image Provider f Configuration Element create Executable Extension f Annotation Image Provider Attribute catch Core Exception x Text Editor Plugin get Default get Log log x get Status return f Annotation Image Provider  IAnnotationImageProvider getAnnotationImageProvider fAnnotationImageProvider fConfigurationElement fAnnotationImageProviderAttribute getBundle fConfigurationElement getDeclaringExtension getNamespace getState fAnnotationImageProvider IAnnotationImageProvider fConfigurationElement createExecutableExtension fAnnotationImageProviderAttribute CoreException TextEditorPlugin getDefault getLog getStatus fAnnotationImageProvider
Sets the annotation image provider who provides images for annotations of the specified annotation type param provider the annotation image provider since 3 0 public void set Annotation Image Provider I Annotation Image Provider provider f Annotation Image Provider provider set Value IMAGE PROVIDER provider null  setAnnotationImageProvider IAnnotationImageProvider fAnnotationImageProvider setValue IMAGE_PROVIDER
Sets the data needed to create the annotation image provider param configuration Element the configuration element param annotation Image Provider Attribute the attribute of the configuration element since 3 0 public void set Annotation Image Provider Data I Configuration Element configuration Element String annotation Image Provider Attribute f Configuration Element configuration Element f Annotation Image Provider Attribute annotation Image Provider Attribute set Value IMAGE PROVIDER annotation Image Provider Attribute null  configurationElement annotationImageProviderAttribute setAnnotationImageProviderData IConfigurationElement configurationElement annotationImageProviderAttribute fConfigurationElement configurationElement fAnnotationImageProviderAttribute annotationImageProviderAttribute setValue IMAGE_PROVIDER annotationImageProviderAttribute
Sets the property of this annotation preference whether it should be included on the default annotation preference page param include On Preference Page the new value since 3 0 public void set Include On Preference Page boolean include On Preference Page set Value INCLUDE ON PREFERENCE PAGE include On Preference Page  includeOnPreferencePage setIncludeOnPreferencePage includeOnPreferencePage setValue INCLUDE_ON_PREFERENCE_PAGE includeOnPreferencePage
Returns the property of the receiver of whether it should be included on the default annotation preference page return the include On Preference Page property since 3 0 public boolean is Include On Preference Page Object value f Attributes get INCLUDE ON PREFERENCE PAGE if value instanceof Boolean return Boolean value boolean Value return true  includeOnPreferencePage isIncludeOnPreferencePage fAttributes INCLUDE_ON_PREFERENCE_PAGE booleanValue
Merges the values of the given preference into this preference Existing values will not be overwritten Subclasses may extend param preference the preference to merge into this preference since 3 0 public void merge Annotation Preference preference if get Annotation Type equals preference get Annotation Type return for int i 0 i ATTRIBUTES length i if has Value ATTRIBUTES i set Value ATTRIBUTES i preference get Value ATTRIBUTES i if f Annotation Image Provider null f Annotation Image Provider preference f Annotation Image Provider if f Configuration Element null f Configuration Element preference f Configuration Element if f Annotation Image Provider Attribute null f Annotation Image Provider Attribute preference f Annotation Image Provider Attribute  AnnotationPreference getAnnotationType getAnnotationType hasValue setValue getValue fAnnotationImageProvider fAnnotationImageProvider fAnnotationImageProvider fConfigurationElement fConfigurationElement fConfigurationElement fAnnotationImageProviderAttribute fAnnotationImageProviderAttribute fAnnotationImageProviderAttribute

Creates a new annotation preference lookup object public Annotation Preference Lookup  AnnotationPreferenceLookup
Returns the annotation preference of a given annotation param annotation the annotation return the annotation preference for the given annotation or code null code public Annotation Preference get Annotation Preference Annotation annotation return get Annotation Preference annotation get Type  AnnotationPreference getAnnotationPreference getAnnotationPreference getType
Returns the annotation preference defined for the given annotation type param annotation Type the annotation type return the annotation preference for the given annotation type or code null code public Annotation Preference get Annotation Preference String annotation Type if annotation Type null annotation Type Annotation TYPE UNKNOWN return null Annotation Type Hierarchy hierarchy get Annotation Type Hierarchy Annotation Type type hierarchy get Annotation Type annotation Type Annotation Preference preference type get Preference if preference null preference new Delegating Annotation Preference type this type set Annotation Preference preference return preference  annotationType AnnotationPreference getAnnotationPreference annotationType annotationType annotationType TYPE_UNKNOWN AnnotationTypeHierarchy getAnnotationTypeHierarchy AnnotationType getAnnotationType annotationType AnnotationPreference getPreference DelegatingAnnotationPreference setAnnotationPreference
Returns the annotation preference fragment defined for the given annotation type p For internal use only Not intended to be called by clients param annotation Type the annotation type return the defined annotation preference fragment public Annotation Preference get Annotation Preference Fragment String annotation Type Map fragments get Preference Fragments return Annotation Preference fragments get annotation Type  annotationType AnnotationPreference getAnnotationPreferenceFragment annotationType getPreferenceFragments AnnotationPreference annotationType
Returns the annotation type hierarchy and creates it when not yet done return the annotation type hierarchy private Annotation Type Hierarchy get Annotation Type Hierarchy return Editors Plugin get Default get Annotation Type Hierarchy  AnnotationTypeHierarchy getAnnotationTypeHierarchy EditorsPlugin getDefault getAnnotationTypeHierarchy
Returns a map between annotation type names and annotation preference fragments and creates it if not yet done return the map between annotation type names and annotation preference fragments private Map get Preference Fragments if f Fragments null f Fragments new Hash Map Marker Annotation Preferences p new Marker Annotation Preferences Iterator e p get Annotation Preference Fragments iterator while e has Next Annotation Preference fragment Annotation Preference e next Object annotation Type fragment get Annotation Type Annotation Preference preference Annotation Preference f Fragments get annotation Type if preference null f Fragments put annotation Type fragment else preference merge fragment return f Fragments  getPreferenceFragments fFragments fFragments HashMap MarkerAnnotationPreferences MarkerAnnotationPreferences getAnnotationPreferenceFragments hasNext AnnotationPreference AnnotationPreference annotationType getAnnotationType AnnotationPreference AnnotationPreference fFragments annotationType fFragments annotationType fFragments

int f Marker Severity UNDEFINED boolean is Marker Severity Defined return f Marker Severity UNDEFINED  fMarkerSeverity isMarkerSeverityDefined fMarkerSeverity
Creates a new annotation lookup object public Annotation Type Lookup  AnnotationTypeLookup
Computes the annotation type that corresponds to the state of the given marker param marker the marker return the annotation type or code null code public String get Annotation Type I Marker marker String marker Type Marker Utilities get Marker Type marker if marker Type null int severity Marker Utilities get Severity marker return get Annotation Type marker Type severity return null  getAnnotationType IMarker markerType MarkerUtilities getMarkerType markerType MarkerUtilities getSeverity getAnnotationType markerType
Computes the annotation type that corresponds to the given marker type and the given marker severity param marker Type the marker type param marker Severity the marker severity return the annotation type or code null code public String get Annotation Type String marker Type int marker Severity String annotation Type lookup Annotation Type marker Type marker Severity if annotation Type null return annotation Type String super Types Marker Utilities get Super Types marker Type for int i 0 i super Types length i annotation Type lookup Annotation Type super Types i marker Severity if annotation Type null return annotation Type return null  markerType markerSeverity getAnnotationType markerType markerSeverity annotationType lookupAnnotationType markerType markerSeverity annotationType annotationType superTypes MarkerUtilities getSuperTypes markerType superTypes annotationType lookupAnnotationType superTypes markerSeverity annotationType annotationType
Returns the annotation type for the given marker type and the given marker severity param marker Type the marker type param severity the marker severity return the annotation type private String lookup Annotation Type String marker Type int severity if f Mapping null initialize Mapping Object value f Mapping get marker Type if value instanceof String return String value if value instanceof Map Map severity Map Map value return String severity Map get new Integer severity return null  markerType lookupAnnotationType markerType fMapping initializeMapping fMapping markerType severityMap severityMap
Initializes the mapping between markers and their property values and annotation types private void initialize Mapping f Mapping new Hash Map List mappings get Annotation Type Mappings for int i 0 l mappings size i l i Annotation Type Mapping atm Annotation Type Mapping mappings get i if atm is Marker Severity Defined Object severity Map f Mapping get atm f Marker Type if severity Map instanceof Map severity Map new Hash Map f Mapping put atm f Marker Type severity Map Map map Map severity Map map put new Integer atm f Marker Severity atm f Annotation Type else f Mapping put atm f Marker Type atm f Annotation Type  initializeMapping fMapping HashMap getAnnotationTypeMappings AnnotationTypeMapping AnnotationTypeMapping isMarkerSeverityDefined severityMap fMapping fMarkerType severityMap severityMap HashMap fMapping fMarkerType severityMap severityMap fMarkerSeverity fAnnotationType fMapping fMarkerType fAnnotationType
Returns the list of annotation type mappings generated from the extensions provided for the annotation type extension point return a list of annotation type mappings private List get Annotation Type Mappings List annotation Type Mappings new Array List read compatibility mode read Extension Point annotation Type Mappings marker Annotation Specification annotation Type NON NLS 1 NON NLS 2 read new extension point read Extension Point annotation Type Mappings annotation Types name NON NLS 1 NON NLS 2 return annotation Type Mappings  getAnnotationTypeMappings annotationTypeMappings ArrayList readExtensionPoint annotationTypeMappings markerAnnotationSpecification annotationType readExtensionPoint annotationTypeMappings annotationTypes annotationTypeMappings
Reads the extensions provided for the given extension point name Uses the given type attribute name to create annotation type mappings that are appended to the given list param annotation Type Mappings the list to be populated param extension Point Name the name of the extension point to read param type Attribute Name the name of attribute specifying the annotation type private void read Extension Point List annotation Type Mappings String extension Point Name String type Attribute Name I Extension Point extension Point Platform get Extension Registry get Extension Point EditorsUI PLUGIN ID extension Point Name if extension Point null I Configuration Element elements extension Point get Configuration Elements for int i 0 i elements length i Annotation Type Mapping mapping create Mapping elements i type Attribute Name if mapping null annotation Type Mappings add mapping  annotationTypeMappings extensionPointName typeAttributeName readExtensionPoint annotationTypeMappings extensionPointName typeAttributeName IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint PLUGIN_ID extensionPointName extensionPoint IConfigurationElement extensionPoint getConfigurationElements AnnotationTypeMapping createMapping typeAttributeName annotationTypeMappings
Creates an annotation type mapping from the given configuration element param element the configuration element param type Attribute Name the name of the attribute specifying the annotation type return the annotation type mapping or code null code private Annotation Type Mapping create Mapping I Configuration Element element String type Attribute Name Annotation Type Mapping mapping new Annotation Type Mapping String s element get Attribute type Attribute Name NON NLS 1 if s null s trim length 0 return null mapping f Annotation Type s s element get Attribute marker Type NON NLS 1 if s null s trim length 0 return null mapping f Marker Type s s element get Attribute marker Severity NON NLS 1 if s null s trim length 0 mapping f Marker Severity String Converter as Int s Annotation Type Mapping UNDEFINED return mapping  typeAttributeName AnnotationTypeMapping createMapping IConfigurationElement typeAttributeName AnnotationTypeMapping AnnotationTypeMapping getAttribute typeAttributeName fAnnotationType getAttribute markerType fMarkerType getAttribute markerSeverity fMarkerSeverity StringConverter asInt AnnotationTypeMapping

Creates a new basic marker updater public Basic Marker Updater super  BasicMarkerUpdater
see I Marker Updater get Attribute public String get Attribute return ATTRIBUTES  IMarkerUpdater getAttribute getAttribute
see I Marker Updater get Marker Type public String get Marker Type return null  IMarkerUpdater getMarkerType getMarkerType
public boolean update Marker I Marker marker I Document document Position position if position null return true if position is Deleted return false boolean offsets Initialized false boolean offsets Changed false int marker Start Marker Utilities get Char Start marker int marker End Marker Utilities get Char End marker if marker Start 1 marker End 1 offsets Initialized true int offset position get Offset if marker Start offset Marker Utilities set Char Start marker offset offsets Changed true offset position get Length if marker End offset Marker Utilities set Char End marker offset offsets Changed true if offsets Initialized offsets Changed Marker Utilities get Line Number marker 1 try marker line numbers are 1 based Marker Utilities set Line Number marker document get Line Of Offset position get Offset 1 catch Bad Location Exception x return true  updateMarker IMarker IDocument isDeleted offsetsInitialized offsetsChanged markerStart MarkerUtilities getCharStart markerEnd MarkerUtilities getCharEnd markerStart markerEnd offsetsInitialized getOffset markerStart MarkerUtilities setCharStart offsetsChanged getLength markerEnd MarkerUtilities setCharEnd offsetsChanged offsetsInitialized offsetsChanged MarkerUtilities getLineNumber MarkerUtilities setLineNumber getLineOfOffset getOffset BadLocationException

private Status Field Def String category String action Id boolean visible int width In Chars Assert is Not Null category this category category this action Id action Id this visible visible this width In Chars width In Chars  StatusFieldDef actionId widthInChars isNotNull actionId actionId widthInChars widthInChars
Creates an empty editor action bar contributor The action bars are furnished later via the code init code method see org eclipse ui I Editor Action Bar Contributor init org eclipse ui I Action Bars org eclipse ui I Workbench Page public Basic Text Editor Action Contributor f Find Next new Retarget Text Editor Action Editor Messages get Resource Bundle Editor Find Next NON NLS 1 f Find Next set Action Definition Id I Text Editor Action Definition Ids FIND NEXT f Find Previous new Retarget Text Editor Action Editor Messages get Resource Bundle Editor Find Previous NON NLS 1 f Find Previous set Action Definition Id I Text Editor Action Definition Ids FIND PREVIOUS f Incremental Find new Retarget Text Editor Action Editor Messages get Resource Bundle Editor Find Incremental NON NLS 1 f Incremental Find set Action Definition Id I Text Editor Action Definition Ids FIND INCREMENTAL f Incremental Find Reverse new Retarget Text Editor Action Editor Messages get Resource Bundle Editor Find Incremental Reverse NON NLS 1 f Incremental Find Reverse set Action Definition Id I Text Editor Action Definition Ids FIND INCREMENTAL REVERSE f Goto Line new Retarget Text Editor Action Editor Messages get Resource Bundle Editor Goto Line NON NLS 1 f Goto Line set Action Definition Id I Text Editor Action Definition Ids LINE GOTO f Status Fields new Hash Map 3 for int i 0 i STATUS FIELD DEFS length i Status Field Def field Def STATUS FIELD DEFS i f Status Fields put field Def new Status Line Contribution Item field Def category field Def visible field Def width In Chars  IEditorActionBarContributor IActionBars IWorkbenchPage BasicTextEditorActionContributor fFindNext RetargetTextEditorAction EditorMessages getResourceBundle FindNext fFindNext setActionDefinitionId ITextEditorActionDefinitionIds FIND_NEXT fFindPrevious RetargetTextEditorAction EditorMessages getResourceBundle FindPrevious fFindPrevious setActionDefinitionId ITextEditorActionDefinitionIds FIND_PREVIOUS fIncrementalFind RetargetTextEditorAction EditorMessages getResourceBundle FindIncremental fIncrementalFind setActionDefinitionId ITextEditorActionDefinitionIds FIND_INCREMENTAL fIncrementalFindReverse RetargetTextEditorAction EditorMessages getResourceBundle FindIncrementalReverse fIncrementalFindReverse setActionDefinitionId ITextEditorActionDefinitionIds FIND_INCREMENTAL_REVERSE fGotoLine RetargetTextEditorAction EditorMessages getResourceBundle GotoLine fGotoLine setActionDefinitionId ITextEditorActionDefinitionIds LINE_GOTO fStatusFields HashMap STATUS_FIELD_DEFS StatusFieldDef fieldDef STATUS_FIELD_DEFS fStatusFields fieldDef StatusLineContributionItem fieldDef fieldDef fieldDef widthInChars
Returns the active editor part return the active editor part protected final I Editor Part get Active Editor Part return f Active Editor Part  IEditorPart getActiveEditorPart fActiveEditorPart
Returns the action registered with the given text editor param editor the editor or code null code param action Id the action id return the action or code null code if none protected final I Action get Action I Text Editor editor String action Id return editor null action Id null null editor get Action action Id  actionId IAction getAction ITextEditor actionId actionId getAction actionId
The method installs the global action handlers for the given text editor p This method cannot be overridden by subclasses p param part the active editor part since 2 0 private void do Set Active Editor I Editor Part part if f Active Editor Part part return if f Active Editor Part instanceof I Text Editor Extension I Text Editor Extension extension I Text Editor Extension f Active Editor Part for int i 0 i STATUS FIELD DEFS length i extension set Status Field null STATUS FIELD DEFS i category f Active Editor Part part I Text Editor editor part instanceof I Text Editor I Text Editor part null I Action Bars action Bars get Action Bars if action Bars null for int i 0 i ACTIONS length i action Bars set Global Action Handler ACTIONS i get Action editor ACTIONS i f Find Next set Action get Action editor I Text Editor Action Constants FIND NEXT f Find Previous set Action get Action editor I Text Editor Action Constants FIND PREVIOUS f Incremental Find set Action get Action editor I Text Editor Action Constants FIND INCREMENTAL f Incremental Find Reverse set Action get Action editor I Text Editor Action Constants FIND INCREMENTAL REVERSE f Goto Line set Action get Action editor I Text Editor Action Constants GOTO LINE for int i 0 i STATUS FIELD DEFS length i if f Active Editor Part instanceof I Text Editor Extension Status Line Contribution Item status Field Status Line Contribution Item f Status Fields get STATUS FIELD DEFS i status Field set Action Handler get Action editor STATUS FIELD DEFS i action Id I Text Editor Extension extension I Text Editor Extension f Active Editor Part extension set Status Field status Field STATUS FIELD DEFS i category  doSetActiveEditor IEditorPart fActiveEditorPart fActiveEditorPart ITextEditorExtension ITextEditorExtension ITextEditorExtension fActiveEditorPart STATUS_FIELD_DEFS setStatusField STATUS_FIELD_DEFS fActiveEditorPart ITextEditor ITextEditor ITextEditor IActionBars actionBars getActionBars actionBars actionBars setGlobalActionHandler getAction fFindNext setAction getAction ITextEditorActionConstants FIND_NEXT fFindPrevious setAction getAction ITextEditorActionConstants FIND_PREVIOUS fIncrementalFind setAction getAction ITextEditorActionConstants FIND_INCREMENTAL fIncrementalFindReverse setAction getAction ITextEditorActionConstants FIND_INCREMENTAL_REVERSE fGotoLine setAction getAction ITextEditorActionConstants GOTO_LINE STATUS_FIELD_DEFS fActiveEditorPart ITextEditorExtension StatusLineContributionItem statusField StatusLineContributionItem fStatusFields STATUS_FIELD_DEFS statusField setActionHandler getAction STATUS_FIELD_DEFS actionId ITextEditorExtension ITextEditorExtension fActiveEditorPart setStatusField statusField STATUS_FIELD_DEFS
The code Basic Text Editor Action Contributor code implementation of this code I Editor Action Bar Contributor code method installs the global action handler for the given text editor by calling a private helper method p Subclasses may extend p param part inherit Doc public void set Active Editor I Editor Part part do Set Active Editor part  BasicTextEditorActionContributor IEditorActionBarContributor inheritDoc setActiveEditor IEditorPart doSetActiveEditor
public void contribute To Menu I Menu Manager menu I Menu Manager edit Menu menu find Menu Using Path I Workbench Action Constants M EDIT if edit Menu null edit Menu prepend To Group I Workbench Action Constants FIND EXT f Incremental Find Reverse edit Menu prepend To Group I Workbench Action Constants FIND EXT f Incremental Find edit Menu prepend To Group I Workbench Action Constants FIND EXT f Find Previous edit Menu prepend To Group I Workbench Action Constants FIND EXT f Find Next I Menu Manager navigate Menu menu find Menu Using Path I Workbench Action Constants M NAVIGATE if navigate Menu null navigate Menu append To Group I Workbench Action Constants MB ADDITIONS f Goto Line  contributeToMenu IMenuManager IMenuManager editMenu findMenuUsingPath IWorkbenchActionConstants M_EDIT editMenu editMenu prependToGroup IWorkbenchActionConstants FIND_EXT fIncrementalFindReverse editMenu prependToGroup IWorkbenchActionConstants FIND_EXT fIncrementalFind editMenu prependToGroup IWorkbenchActionConstants FIND_EXT fFindPrevious editMenu prependToGroup IWorkbenchActionConstants FIND_EXT fFindNext IMenuManager navigateMenu findMenuUsingPath IWorkbenchActionConstants M_NAVIGATE navigateMenu navigateMenu appendToGroup IWorkbenchActionConstants MB_ADDITIONS fGotoLine
public void contribute To Status Line I Status Line Manager status Line Manager super contribute To Status Line status Line Manager for int i 0 i STATUS FIELD DEFS length i status Line Manager add I Contribution Item f Status Fields get STATUS FIELD DEFS i  contributeToStatusLine IStatusLineManager statusLineManager contributeToStatusLine statusLineManager STATUS_FIELD_DEFS statusLineManager IContributionItem fStatusFields STATUS_FIELD_DEFS
since 2 0 public void dispose do Set Active Editor null super dispose  doSetActiveEditor

see Abstract Ruler Action Delegate create Action I Text Editor I Vertical Ruler Info protected I Action create Action I Text Editor editor I Vertical Ruler Info ruler Info return new Marker Ruler Action Text Editor Messages get Resource Bundle Editor Manage Bookmarks editor ruler Info I Marker BOOKMARK true NON NLS 1  AbstractRulerActionDelegate createAction ITextEditor IVerticalRulerInfo IAction createAction ITextEditor IVerticalRulerInfo rulerInfo MarkerRulerAction TextEditorMessages getResourceBundle ManageBookmarks rulerInfo IMarker

Creates and initializes the action for the given text editor The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the text editor param to Upper code true code if this is an uppercase action code false code otherwise see Resource Action Resource Action Resource Bundle String public Case Action Resource Bundle bundle String prefix Abstract Text Editor editor boolean to Upper super bundle prefix editor f To Upper to Upper update  ResourceAction toUpper ResourceAction ResourceAction ResourceBundle CaseAction ResourceBundle AbstractTextEditor toUpper fToUpper toUpper
public void run I Text Editor editor get Text Editor if editor null return if validate Editor Input State return I Source Viewer viewer Abstract Text Editor editor get Source Viewer if viewer null return I Document document viewer get Document if document null return Styled Text st viewer get Text Widget if st null return Point sel viewer get Selected Range if sel null return try if the selection is empty we select the word string using the viewer s double click strategy if sel y 0 TODO find a better way to do this although there are multiple partitionings on a single document String partition get Content Type viewer document sel x Source Viewer Configuration svc f Editor get Source Viewer Configuration never null when viewer instantiated I Text Double Click Strategy dcs svc get Double Click Strategy viewer partition if dcs null dcs double Clicked viewer sel viewer get Selected Range if sel y 0 return if the selection is still empty we re done String target document get sel x sel y String replacement f To Upper target to Upper Case target to Lower Case if target equals replacement document replace sel x target length replacement catch Bad Location Exception x ignore and return return reinstall selection and move it into view viewer set Selected Range sel x sel y don t use the viewer s reveal feature in order to avoid jumping around st show Selection  ITextEditor getTextEditor validateEditorInputState ISourceViewer AbstractTextEditor getSourceViewer IDocument getDocument StyledText getTextWidget getSelectedRange getContentType SourceViewerConfiguration fEditor getSourceViewerConfiguration ITextDoubleClickStrategy getDoubleClickStrategy doubleClicked getSelectedRange fToUpper toUpperCase toLowerCase BadLocationException setSelectedRange showSelection

Initialize with the given preference store param preference Store the preference store public Property Change Listener I Preference Store preference Store set Preference Store preference Store  preferenceStore PropertyChangeListener IPreferenceStore preferenceStore setPreferenceStore preferenceStore
see org eclipse jface util I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event I Preference Store child Preference Store get Preference Store handle Property Change Event child Preference Store event  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent IPreferenceStore childPreferenceStore getPreferenceStore handlePropertyChangeEvent childPreferenceStore
Registers this listener on the preference store public void register get Preference Store add Property Change Listener this  getPreferenceStore addPropertyChangeListener
Unregisters this listener from the preference store public void unregister get Preference Store remove Property Change Listener this  getPreferenceStore removePropertyChangeListener
Returns the preference store return the preference store public I Preference Store get Preference Store return f Preference Store  IPreferenceStore getPreferenceStore fPreferenceStore
Sets the preference store param preference Store the preference store to set public void set Preference Store I Preference Store preference Store f Preference Store preference Store  preferenceStore setPreferenceStore IPreferenceStore preferenceStore fPreferenceStore preferenceStore
Sets the chained preference stores param preference Stores the chained preference stores to set public Chained Preference Store I Preference Store preference Stores Assert is True preference Stores null preference Stores length 0 f Preference Stores preference Stores Create listeners for int i 0 length f Preference Stores length i length i Property Change Listener listener new Property Change Listener f Preference Stores i f Child Listeners add listener  preferenceStores ChainedPreferenceStore IPreferenceStore preferenceStores isTrue preferenceStores preferenceStores fPreferenceStores preferenceStores fPreferenceStores PropertyChangeListener PropertyChangeListener fPreferenceStores fChildListeners
public void add Property Change Listener I Property Change Listener listener if f Client Listeners size 0 register Child Listeners f Client Listeners add listener  addPropertyChangeListener IPropertyChangeListener fClientListeners registerChildListeners fClientListeners
public void remove Property Change Listener I Property Change Listener listener f Client Listeners remove listener if f Client Listeners size 0 unregister Child Listeners  removePropertyChangeListener IPropertyChangeListener fClientListeners fClientListeners unregisterChildListeners
see org eclipse jface preference I Preference Store contains java lang String public boolean contains String name return get Visible Store name null  IPreferenceStore getVisibleStore
see org eclipse jface preference I Preference Store fire Property Change Event java lang String java lang Object java lang Object public void fire Property Change Event String name Object old Value Object new Value fire Property Change Event new Property Change Event this name old Value new Value  IPreferenceStore firePropertyChangeEvent firePropertyChangeEvent oldValue newValue firePropertyChangeEvent PropertyChangeEvent oldValue newValue
Fire the given property change event param event the property change event private void fire Property Change Event Property Change Event event Object listeners f Client Listeners get Listeners for int i 0 i listeners length i I Property Change Listener listeners i property Change event  firePropertyChangeEvent PropertyChangeEvent fClientListeners getListeners IPropertyChangeListener propertyChange
public boolean get Boolean String name I Preference Store visible Store get Visible Store name if visible Store null return visible Store get Boolean name return BOOLEAN DEFAULT DEFAULT  getBoolean IPreferenceStore visibleStore getVisibleStore visibleStore visibleStore getBoolean BOOLEAN_DEFAULT_DEFAULT
public boolean get Default Boolean String name I Preference Store visible Store get Visible Store name if visible Store null return visible Store get Default Boolean name return BOOLEAN DEFAULT DEFAULT  getDefaultBoolean IPreferenceStore visibleStore getVisibleStore visibleStore visibleStore getDefaultBoolean BOOLEAN_DEFAULT_DEFAULT
public double get Default Double String name I Preference Store visible Store get Visible Store name if visible Store null return visible Store get Default Double name return DOUBLE DEFAULT DEFAULT  getDefaultDouble IPreferenceStore visibleStore getVisibleStore visibleStore visibleStore getDefaultDouble DOUBLE_DEFAULT_DEFAULT
public float get Default Float String name I Preference Store visible Store get Visible Store name if visible Store null return visible Store get Default Float name return FLOAT DEFAULT DEFAULT  getDefaultFloat IPreferenceStore visibleStore getVisibleStore visibleStore visibleStore getDefaultFloat FLOAT_DEFAULT_DEFAULT
public int get Default Int String name I Preference Store visible Store get Visible Store name if visible Store null return visible Store get Default Int name return INT DEFAULT DEFAULT  getDefaultInt IPreferenceStore visibleStore getVisibleStore visibleStore visibleStore getDefaultInt INT_DEFAULT_DEFAULT
public long get Default Long String name I Preference Store visible Store get Visible Store name if visible Store null return visible Store get Default Long name return LONG DEFAULT DEFAULT  getDefaultLong IPreferenceStore visibleStore getVisibleStore visibleStore visibleStore getDefaultLong LONG_DEFAULT_DEFAULT
public String get Default String String name I Preference Store visible Store get Visible Store name if visible Store null return visible Store get Default String name return STRING DEFAULT DEFAULT  getDefaultString IPreferenceStore visibleStore getVisibleStore visibleStore visibleStore getDefaultString STRING_DEFAULT_DEFAULT
public double get Double String name I Preference Store visible Store get Visible Store name if visible Store null return visible Store get Double name return DOUBLE DEFAULT DEFAULT  getDouble IPreferenceStore visibleStore getVisibleStore visibleStore visibleStore getDouble DOUBLE_DEFAULT_DEFAULT
public float get Float String name I Preference Store visible Store get Visible Store name if visible Store null return visible Store get Float name return FLOAT DEFAULT DEFAULT  getFloat IPreferenceStore visibleStore getVisibleStore visibleStore visibleStore getFloat FLOAT_DEFAULT_DEFAULT
public int get Int String name I Preference Store visible Store get Visible Store name if visible Store null return visible Store get Int name return INT DEFAULT DEFAULT  getInt IPreferenceStore visibleStore getVisibleStore visibleStore visibleStore getInt INT_DEFAULT_DEFAULT
public long get Long String name I Preference Store visible Store get Visible Store name if visible Store null return visible Store get Long name return LONG DEFAULT DEFAULT  getLong IPreferenceStore visibleStore getVisibleStore visibleStore visibleStore getLong LONG_DEFAULT_DEFAULT
public String get String String name I Preference Store visible Store get Visible Store name if visible Store null return visible Store get String name return STRING DEFAULT DEFAULT  getString IPreferenceStore visibleStore getVisibleStore visibleStore visibleStore getString STRING_DEFAULT_DEFAULT
public boolean is Default String name I Preference Store visible Store get Visible Store name if visible Store null return visible Store is Default name return false  isDefault IPreferenceStore visibleStore getVisibleStore visibleStore visibleStore isDefault
see org eclipse jface preference I Preference Store needs Saving public boolean needs Saving throw new Unsupported Operation Exception  IPreferenceStore needsSaving needsSaving UnsupportedOperationException
see org eclipse jface preference I Preference Store put Value java lang String java lang String public void put Value String name String value throw new Unsupported Operation Exception  IPreferenceStore putValue putValue UnsupportedOperationException
see org eclipse jface preference I Preference Store set Default java lang String double public void set Default String name double value throw new Unsupported Operation Exception  IPreferenceStore setDefault setDefault UnsupportedOperationException
see org eclipse jface preference I Preference Store set Default java lang String float public void set Default String name float value throw new Unsupported Operation Exception  IPreferenceStore setDefault setDefault UnsupportedOperationException
see org eclipse jface preference I Preference Store set Default java lang String int public void set Default String name int value throw new Unsupported Operation Exception  IPreferenceStore setDefault setDefault UnsupportedOperationException
see org eclipse jface preference I Preference Store set Default java lang String long public void set Default String name long value throw new Unsupported Operation Exception  IPreferenceStore setDefault setDefault UnsupportedOperationException
see org eclipse jface preference I Preference Store set Default java lang String java lang String public void set Default String name String default Object throw new Unsupported Operation Exception  IPreferenceStore setDefault setDefault defaultObject UnsupportedOperationException
see org eclipse jface preference I Preference Store set Default java lang String boolean public void set Default String name boolean value throw new Unsupported Operation Exception  IPreferenceStore setDefault setDefault UnsupportedOperationException
see org eclipse jface preference I Preference Store set To Default java lang String public void set To Default String name throw new Unsupported Operation Exception  IPreferenceStore setToDefault setToDefault UnsupportedOperationException
see org eclipse jface preference I Preference Store set Value java lang String double public void set Value String name double value throw new Unsupported Operation Exception  IPreferenceStore setValue setValue UnsupportedOperationException
see org eclipse jface preference I Preference Store set Value java lang String float public void set Value String name float value throw new Unsupported Operation Exception  IPreferenceStore setValue setValue UnsupportedOperationException
see org eclipse jface preference I Preference Store set Value java lang String int public void set Value String name int value throw new Unsupported Operation Exception  IPreferenceStore setValue setValue UnsupportedOperationException
see org eclipse jface preference I Preference Store set Value java lang String long public void set Value String name long value throw new Unsupported Operation Exception  IPreferenceStore setValue setValue UnsupportedOperationException
see org eclipse jface preference I Preference Store set Value java lang String java lang String public void set Value String name String value throw new Unsupported Operation Exception  IPreferenceStore setValue setValue UnsupportedOperationException
see org eclipse jface preference I Preference Store set Value java lang String boolean public void set Value String name boolean value throw new Unsupported Operation Exception  IPreferenceStore setValue setValue UnsupportedOperationException
Handle property change event from the child listener with the given child preference store param child Preference Store the child preference store param event the event private void handle Property Change Event I Preference Store child Preference Store Property Change Event event String property event get Property Object old Value event get Old Value Object new Value event get New Value I Preference Store visible Store get Visible Store property Assume that the property is there but has no default value its owner relies on the default default value see https bugs eclipse org bugs show bug cgi id 52827 if visible Store null new Value null visible Store child Preference Store if visible Store null no visible store Assert is True new Value null if old Value null removal in child last in chain removal in this chained preference store fire Property Change Event event else if visible Store child Preference Store event from visible store Assert is Not Null new Value if old Value null change in child visible store change in this chained preference store fire Property Change Event event else insertion in child I Preference Store old Visible Store null int i 0 int length f Preference Stores length while i length f Preference Stores i visible Store do nothing while old Visible Store null i length if f Preference Stores i contains property old Visible Store f Preference Stores i i if old Visible Store null insertion in child first in chain insertion in this chained preference store fire Property Change Event event else insertion in child not first in chain old Value get Other Value property old Visible Store new Value if old Value equals new Value insertion in child different old value change in this chained preference store fire Property Change Event property old Value new Value else insertion in child same old value no change in this chained preference store else event from other than the visible store boolean event Before Visible Store false for int i 0 length f Preference Stores length i length i I Preference Store store f Preference Stores i if store visible Store break if store child Preference Store event Before Visible Store true break if event Before Visible Store removal in child before visible store Assert is True new Value null new Value get Other Value property visible Store old Value if new Value equals old Value removal in child before visible store different old value change in this chained preference store fire Property Change Event property old Value new Value else removal in child before visible store same old value no change in this chained preference store else event behind visible store no change in this chained preference store  childPreferenceStore handlePropertyChangeEvent IPreferenceStore childPreferenceStore PropertyChangeEvent getProperty oldValue getOldValue newValue getNewValue IPreferenceStore visibleStore getVisibleStore show_bug visibleStore newValue visibleStore childPreferenceStore visibleStore isTrue newValue oldValue firePropertyChangeEvent visibleStore childPreferenceStore isNotNull newValue oldValue firePropertyChangeEvent IPreferenceStore oldVisibleStore fPreferenceStores fPreferenceStores visibleStore oldVisibleStore fPreferenceStores oldVisibleStore fPreferenceStores oldVisibleStore firePropertyChangeEvent oldValue getOtherValue oldVisibleStore newValue oldValue newValue firePropertyChangeEvent oldValue newValue eventBeforeVisibleStore fPreferenceStores IPreferenceStore fPreferenceStores visibleStore childPreferenceStore eventBeforeVisibleStore eventBeforeVisibleStore isTrue newValue newValue getOtherValue visibleStore oldValue newValue oldValue firePropertyChangeEvent oldValue newValue
Returns an object of the same dynamic type as code this Value code the returned object encapsulates the value of the code property code from the preference code store code param property the name of the considered property param store the preference store param this Value the given value return the other value throws java lang Illegal Argument Exception if code this Value code has a different type than code Boolean code code Double code code Float code code Integer code code Long code or code String code private Object get Other Value String property I Preference Store store Object this Value Object other Value if this Value instanceof Boolean other Value new Boolean store get Boolean property else if this Value instanceof Double other Value new Double store get Double property else if this Value instanceof Float other Value new Float store get Float property else if this Value instanceof Integer other Value new Integer store get Int property else if this Value instanceof Long other Value new Long store get Long property else if this Value instanceof String other Value store get String property else throw new Illegal Argument Exception return other Value  thisValue thisValue IllegalArgumentException thisValue getOtherValue IPreferenceStore thisValue otherValue thisValue otherValue getBoolean thisValue otherValue getDouble thisValue otherValue getFloat thisValue otherValue getInt thisValue otherValue getLong thisValue otherValue getString IllegalArgumentException otherValue
Returns the preference store from which the given property s value is visible param property the name of the property return the preference store from which the property s value is visible code null code if the property is unknown private I Preference Store get Visible Store String property I Preference Store visible Store null for int i 0 length f Preference Stores length i length visible Store null i I Preference Store store f Preference Stores i if store contains property visible Store store return visible Store  IPreferenceStore getVisibleStore IPreferenceStore visibleStore fPreferenceStores visibleStore IPreferenceStore fPreferenceStores visibleStore visibleStore
Register the child listeners on the child preference stores private void register Child Listeners Iterator iter f Child Listeners iterator while iter has Next Property Change Listener listener Property Change Listener iter next listener register  registerChildListeners fChildListeners hasNext PropertyChangeListener PropertyChangeListener
Unregister the child listeners from the child preference stores private void unregister Child Listeners Iterator iter f Child Listeners iterator while iter has Next Property Change Listener listener Property Change Listener iter next listener unregister  unregisterChildListeners fChildListeners hasNext PropertyChangeListener PropertyChangeListener

Sorts the given array based on its elements configuration elements according to the prerequisite relation of their defining plug ins param elements the array to be sorted public final void sort Object elements Arrays sort elements new Configuration Element Comparator elements  ConfigurationElementComparator
Returns the configuration element for the given object param object the object return the object s configuration element must not be code null code 
private Map f Prereqs Mapping public Configuration Element Comparator Object elements Assert is Not Null elements initialize elements  fPrereqsMapping ConfigurationElementComparator isNotNull
public int compare Object object0 Object object1 if depends On object0 object1 return 1 if depends On object1 object0 return 1 return 0  dependsOn dependsOn
Returns whether one configuration element depends on the other element This is done by checking the dependency chain of the defining plug ins param element0 the first element param element1 the second element return code true code if code element0 code depends on code element1 code since 2 0 private boolean depends On Object element0 Object element1 if element0 null element1 null return false String plugin Desc0 String f Descriptor Mapping get element0 String plugin Desc1 String f Descriptor Mapping get element1 performance tuning code below would give same result if plugin Desc0 equals plugin Desc1 return false Set prereqU Ids0 Set f Prereqs Mapping get plugin Desc0 return prereqU Ids0 contains plugin Desc1  dependsOn pluginDesc0 fDescriptorMapping pluginDesc1 fDescriptorMapping pluginDesc0 pluginDesc1 prereqUIds0 fPrereqsMapping pluginDesc0 prereqUIds0 pluginDesc1
Initialize this comparator param elements an array of Java editor hover descriptors private void initialize Object elements int length elements length f Descriptor Mapping new Hash Map length f Prereqs Mapping new Hash Map length Set f Bundle Set new Hash Set length for int i 0 i length i I Extension extension get Configuration Element elements i get Declaring Extension Bundle bundle Platform get Bundle extension get Namespace f Descriptor Mapping put elements i bundle get Symbolic Name f Bundle Set add bundle Iterator iter f Bundle Set iterator while iter has Next Bundle bundle Bundle iter next List to Test new Array List f Bundle Set to Test remove bundle Set prereqU Ids new Hash Set Math max 0 to Test size 1 f Prereqs Mapping put bundle get Symbolic Name prereqU Ids String requires String bundle get Headers get Constants REQUIRE BUNDLE Manifest Element manifest Elements try manifest Elements Manifest Element parse Header Constants REQUIRE BUNDLE requires catch Bundle Exception e continue int i 0 while i manifest Elements length to Test is Empty String prereqU Id manifest Elements i get Value for int j 0 j to Test size Bundle toTest j Bundle to Test get j if toTest j get Symbolic Name equals prereqU Id to Test remove toTest j prereqU Ids add toTest j get Symbolic Name else j i  fDescriptorMapping HashMap fPrereqsMapping HashMap fBundleSet HashSet IExtension getConfigurationElement getDeclaringExtension getBundle getNamespace fDescriptorMapping getSymbolicName fBundleSet fBundleSet hasNext toTest ArrayList fBundleSet toTest prereqUIds HashSet toTest fPrereqsMapping getSymbolicName prereqUIds getHeaders REQUIRE_BUNDLE ManifestElement manifestElements manifestElements ManifestElement parseHeader REQUIRE_BUNDLE BundleException manifestElements toTest isEmpty prereqUId manifestElements getValue toTest toTest_j toTest toTest_j getSymbolicName prereqUId toTest toTest_j prereqUIds toTest_j getSymbolicName

Creates and initializes the action for the given text editor The action configures its visual representation from the given resource bundle The action works by asking the text editor at the time for its text operation target adapter using code get Adapter I Text Operation Target class code The action runs the content assist operation on this target param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the text editor see Resource Action Resource Action Resource Bundle String public Content Assist Action Resource Bundle bundle String prefix I Text Editor editor super bundle prefix editor  getAdapter ITextOperationTarget ResourceAction ResourceAction ResourceAction ResourceBundle ContentAssistAction ResourceBundle ITextEditor
Busy Indicator show While display new Runnable public void run f Operation Target do Operation I Source Viewer CONTENTASSIST PROPOSALS  BusyIndicator showWhile fOperationTarget doOperation ISourceViewer CONTENTASSIST_PROPOSALS
Runs the content assist operation on the editor s text operation target public void run if f Operation Target null I Text Editor editor get Text Editor if editor null validate Editor Input State Display display null I Workbench Part Site site editor get Site Shell shell site get Shell if shell null shell is Disposed display shell get Display Busy Indicator show While display new Runnable public void run f Operation Target do Operation I Source Viewer CONTENTASSIST PROPOSALS  fOperationTarget ITextEditor getTextEditor validateEditorInputState IWorkbenchPartSite getSite getShell isDisposed getDisplay BusyIndicator showWhile fOperationTarget doOperation ISourceViewer CONTENTASSIST_PROPOSALS
The code Content Assist Action code implementation of this code I Update code method discovers the operation through the current editor s code I Text Operation Target code adapter and sets the enabled state accordingly public void update I Text Editor editor get Text Editor if f Operation Target null editor null f Operation Target I Text Operation Target editor get Adapter I Text Operation Target class if f Operation Target null set Enabled false return if f Operation Target instanceof I Text Operation Target Extension I Text Operation Target Extension target Extension I Text Operation Target Extension f Operation Target target Extension enable Operation I Source Viewer CONTENTASSIST PROPOSALS can Modify Editor set Enabled f Operation Target can Do Operation I Source Viewer CONTENTASSIST PROPOSALS  ContentAssistAction IUpdate ITextOperationTarget ITextEditor getTextEditor fOperationTarget fOperationTarget ITextOperationTarget getAdapter ITextOperationTarget fOperationTarget setEnabled fOperationTarget ITextOperationTargetExtension ITextOperationTargetExtension targetExtension ITextOperationTargetExtension fOperationTarget targetExtension enableOperation ISourceViewer CONTENTASSIST_PROPOSALS canModifyEditor setEnabled fOperationTarget canDoOperation ISourceViewer CONTENTASSIST_PROPOSALS
see Text Editor Action set Editor I Text Editor public void set Editor I Text Editor editor super set Editor editor f Operation Target null  TextEditorAction setEditor ITextEditor setEditor ITextEditor setEditor fOperationTarget

Creates a line delimiter conversion action param editor the editor param line Delimiter the target line delimiter to convert the editor s document to public Convert Line Delimiters Action I Text Editor editor String line Delimiter this Editor Messages get Resource Bundle dummy editor line Delimiter NON NLS 1  lineDelimiter ConvertLineDelimitersAction ITextEditor lineDelimiter EditorMessages getResourceBundle lineDelimiter
Creates a line delimiter conversion action param bundle the resource bundle param prefix the prefix for the resource bundle lookup param editor the editor param line Delimiter the target line delimiter to convert the editor s document to public Convert Line Delimiters Action Resource Bundle bundle String prefix I Text Editor editor String line Delimiter super bundle prefix editor f Line Delimiter line Delimiter String platform Line Delimiter System get Property line separator NON NLS 1 set Text Editor Messages get String get Label Key f Line Delimiter platform Line Delimiter update  lineDelimiter ConvertLineDelimitersAction ResourceBundle ITextEditor lineDelimiter fLineDelimiter lineDelimiter platformLineDelimiter getProperty setText EditorMessages getString getLabelKey fLineDelimiter platformLineDelimiter
public void run try I Text Editor editor get Text Editor if editor null return if validate Editor Input State return Object adapter editor get Adapter I Rewrite Target class if adapter instanceof I Rewrite Target I Rewrite Target target I Rewrite Target adapter I Document document target get Document if document null Shell shell get Text Editor get Site get Shell Convert Runnable runnable new Convert Runnable target f Line Delimiter if document get Number Of Lines 40 Busy Indicator show While shell get Display runnable else Progress Monitor Dialog dialog new Progress Monitor Dialog shell dialog run false true runnable catch Interrupted Exception e action cancelled catch Invocation Target Exception e should not happen  ITextEditor getTextEditor validateEditorInputState getAdapter IRewriteTarget IRewriteTarget IRewriteTarget IRewriteTarget IDocument getDocument getTextEditor getSite getShell ConvertRunnable ConvertRunnable fLineDelimiter getNumberOfLines BusyIndicator showWhile getDisplay ProgressMonitorDialog ProgressMonitorDialog InterruptedException InvocationTargetException
Returns a new runnable for converting all line delimiters in the code rewrite Target code to code line Delimter code param rewrite Target param line Delimiter public Convert Runnable I Rewrite Target rewrite Target String line Delimiter f Rewrite Target rewrite Target f Line Delimiter line Delimiter  rewriteTarget lineDelimter rewriteTarget lineDelimiter ConvertRunnable IRewriteTarget rewriteTarget lineDelimiter fRewriteTarget rewriteTarget fLineDelimiter lineDelimiter
public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception I Document document f Rewrite Target get Document final int line Count document get Number Of Lines monitor begin Task Editor Messages get String Editor Convert Line Delimiter title line Count NON NLS 1 f Rewrite Target set Redraw false f Rewrite Target begin Compound Change if document instanceof I Document Extension I Document Extension document start Sequential Rewrite true Map partitioners Text Utilities remove Document Partitioners document try for int i 0 i line Count i if monitor is Canceled throw new Interrupted Exception final String delimiter document get Line Delimiter i if delimiter null delimiter length 0 delimiter equals f Line Delimiter I Region region document get Line Information i document replace region get Offset region get Length delimiter length f Line Delimiter monitor worked 1 catch Bad Location Exception e throw new Invocation Target Exception e finally if partitioners null Text Utilities add Document Partitioners document partitioners if document instanceof I Document Extension I Document Extension document stop Sequential Rewrite f Rewrite Target end Compound Change f Rewrite Target set Redraw true monitor done  IProgressMonitor InvocationTargetException InterruptedException IDocument fRewriteTarget getDocument lineCount getNumberOfLines beginTask EditorMessages getString ConvertLineDelimiter lineCount fRewriteTarget setRedraw fRewriteTarget beginCompoundChange IDocumentExtension IDocumentExtension startSequentialRewrite TextUtilities removeDocumentPartitioners lineCount isCanceled InterruptedException getLineDelimiter fLineDelimiter IRegion getLineInformation getOffset getLength fLineDelimiter BadLocationException InvocationTargetException TextUtilities addDocumentPartitioners IDocumentExtension IDocumentExtension stopSequentialRewrite fRewriteTarget endCompoundChange fRewriteTarget setRedraw
public void run try run new Null Progress Monitor catch Interrupted Exception e should not happen catch Invocation Target Exception e should not happen  NullProgressMonitor InterruptedException InvocationTargetException
Computes and returns the key to be used to lookup the action s label in its resource bundle param line Delimiter the line delimiter param platform Line Delimiter the platform line delimiter return the key used to lookup the action s label private static String get Label Key String line Delimiter String platform Line Delimiter if line Delimiter equals platform Line Delimiter if line Delimiter equals r n NON NLS 1 return Editor Convert Line Delimiter to Windows default label NON NLS 1 if line Delimiter equals n NON NLS 1 return Editor Convert Line Delimiter toUNIX default label NON NLS 1 if line Delimiter equals r NON NLS 1 return Editor Convert Line Delimiter to Mac default label NON NLS 1 else if line Delimiter equals r n NON NLS 1 return Editor Convert Line Delimiter to Windows label NON NLS 1 if line Delimiter equals n NON NLS 1 return Editor Convert Line Delimiter toUNIX label NON NLS 1 if line Delimiter equals r NON NLS 1 return Editor Convert Line Delimiter to Mac label NON NLS 1 return null  lineDelimiter platformLineDelimiter getLabelKey lineDelimiter platformLineDelimiter lineDelimiter platformLineDelimiter lineDelimiter ConvertLineDelimiter toWindows lineDelimiter ConvertLineDelimiter lineDelimiter ConvertLineDelimiter toMac lineDelimiter ConvertLineDelimiter toWindows lineDelimiter ConvertLineDelimiter lineDelimiter ConvertLineDelimiter toMac
Internally sets the enable state of this action private boolean do Enable return can Modify Editor  doEnable canModifyEditor
see I Update update public void update super update set Enabled do Enable  IUpdate setEnabled doEnable

Returns a new default marker annotation access with the given preferences param marker Annotation Preferences deprecated As of 3 0 replaced by link org eclipse ui texteditor Default Marker Annotation Access Default Marker Annotation Access public Default Marker Annotation Access Marker Annotation Preferences marker Annotation Preferences f Marker Annotation Preferences marker Annotation Preferences  markerAnnotationPreferences DefaultMarkerAnnotationAccess DefaultMarkerAnnotationAccess DefaultMarkerAnnotationAccess MarkerAnnotationPreferences markerAnnotationPreferences fMarkerAnnotationPreferences markerAnnotationPreferences
Creates a new default marker annotation access using the standard preference lookup strategy which is the one provided by the enclosing plug in since 3 0 public Default Marker Annotation Access  DefaultMarkerAnnotationAccess
Returns the annotation preference for the given annotation param annotation the annotation return the annotation preference for the given annotation or code null code private Annotation Preference get Annotation Preference Annotation annotation Annotation Preference Lookup lookup get Annotation Preference Lookup if lookup null return lookup get Annotation Preference annotation return null  AnnotationPreference getAnnotationPreference AnnotationPreferenceLookup getAnnotationPreferenceLookup getAnnotationPreference
Returns the annotation preference lookup used by this annotation access return the annotation preference lookup since 3 0 protected Annotation Preference Lookup get Annotation Preference Lookup return Editors Plugin get Default get Annotation Preference Lookup  AnnotationPreferenceLookup getAnnotationPreferenceLookup EditorsPlugin getDefault getAnnotationPreferenceLookup
see org eclipse jface text source I Annotation Access get Type org eclipse jface text source Annotation public Object get Type Annotation annotation return annotation get Type  IAnnotationAccess getType getType getType
see org eclipse jface text source I Annotation Access is Multi Line org eclipse jface text source Annotation public boolean is Multi Line Annotation annotation return true  IAnnotationAccess isMultiLine isMultiLine
see org eclipse jface text source I Annotation Access is Temporary org eclipse jface text source Annotation public boolean is Temporary Annotation annotation return annotation is Persistent  IAnnotationAccess isTemporary isTemporary isPersistent
since 3 0 public String get Type Label Annotation annotation Annotation Preference preference get Annotation Preference annotation return preference null preference get Preference Label null  getTypeLabel AnnotationPreference getAnnotationPreference getPreferenceLabel
public int get Layer Annotation annotation Annotation Preference preference get Annotation Preference annotation if preference null return preference get Presentation Layer if annotation instanceof I Annotation Presentation I Annotation Presentation presentation I Annotation Presentation annotation return presentation get Layer backward compatibility ignore exceptions just return default layer try Method method annotation get Class get Method get Layer null NON NLS 1 Integer result Integer method invoke annotation null return result int Value catch Security Exception x catch Illegal Argument Exception x catch No Such Method Exception x catch Illegal Access Exception x catch Invocation Target Exception x return I Annotation Access Extension DEFAULT LAYER  getLayer AnnotationPreference getAnnotationPreference getPresentationLayer IAnnotationPresentation IAnnotationPresentation IAnnotationPresentation getLayer getClass getMethod getLayer intValue SecurityException IllegalArgumentException NoSuchMethodException IllegalAccessException InvocationTargetException IAnnotationAccessExtension DEFAULT_LAYER
public void paint Annotation annotation GC gc Canvas canvas Rectangle bounds if annotation instanceof I Annotation Presentation I Annotation Presentation presentation I Annotation Presentation annotation presentation paint gc canvas bounds return Annotation Preference preference get Annotation Preference annotation if preference null Object type get Type annotation String annotation Type type null null type to String Image image get Image annotation preference annotation Type if image null Image Utilities draw Image image gc canvas bounds SWT CENTER SWT TOP return backward compatibility ignore exceptions just don t paint try Method method annotation get Class get Method paint new Class GC class Canvas class Rectangle class NON NLS 1 method invoke annotation new Object gc canvas bounds catch Security Exception x catch Illegal Argument Exception x catch No Such Method Exception x catch Illegal Access Exception x catch Invocation Target Exception x  IAnnotationPresentation IAnnotationPresentation IAnnotationPresentation AnnotationPreference getAnnotationPreference getType annotationType toString getImage annotationType ImageUtilities drawImage getClass getMethod SecurityException IllegalArgumentException NoSuchMethodException IllegalAccessException InvocationTargetException
public boolean is Paintable Annotation annotation if annotation instanceof I Annotation Presentation return true Annotation Preference preference get Annotation Preference annotation if preference null return false Object type get Type annotation String annotation Type type null null type to String Image image get Image annotation preference annotation Type return image null  isPaintable IAnnotationPresentation AnnotationPreference getAnnotationPreference getType annotationType toString getImage annotationType
see org eclipse jface text source I Annotation Access Extension is Subtype java lang Object java lang Object public boolean is Subtype Object annotation Type Object potential Supertype Annotation Type Hierarchy hierarchy get Annotation Type Hierarchy return hierarchy is Subtype potential Supertype to String annotation Type to String  IAnnotationAccessExtension isSubtype isSubtype annotationType potentialSupertype AnnotationTypeHierarchy getAnnotationTypeHierarchy isSubtype potentialSupertype toString annotationType toString
public Object get Supertypes Object annotation Type Annotation Type Hierarchy hierarchy get Annotation Type Hierarchy Annotation Type type hierarchy get Annotation Type annotation Type to String return type get Super Types  getSupertypes annotationType AnnotationTypeHierarchy getAnnotationTypeHierarchy AnnotationType getAnnotationType annotationType toString getSuperTypes
Returns the annotation type hierarchy used by this annotation access return the annotation type hierarchy since 3 0 protected Annotation Type Hierarchy get Annotation Type Hierarchy return Editors Plugin get Default get Annotation Type Hierarchy  AnnotationTypeHierarchy getAnnotationTypeHierarchy EditorsPlugin getDefault getAnnotationTypeHierarchy
Translates the given symbolic image name into the according symbolic image name the link org eclipse ui I Shared Images understands param symbolic Image Name the symbolic system image name to be translated return the shared image name since 3 0 private String translate Symbolic Image Name String symbolic Image Name return String MAPPING get symbolic Image Name  ISharedImages symbolicImageName translateSymbolicImageName symbolicImageName symbolicImageName
Returns the image for the given annotation and the given annotation preferences or code null code if there is no such image param annotation the annotation param preference the annotation preference param annotation Type the annotation type return the image or code null code since 3 0 private Image get Image Annotation annotation Annotation Preference preference String annotation Type Image Registry registry Editors Plugin get Default get Image Registry I Annotation Image Provider annotation Image Provider preference get Annotation Image Provider if annotation Image Provider null Image image annotation Image Provider get Managed Image annotation if image null return image String id annotation Image Provider get Image Descriptor Id annotation if id null image registry get id if image null Image Descriptor descriptor annotation Image Provider get Image Descriptor id registry put id descriptor image registry get id return image if annotation Type null return null Image image registry get annotation Type if image null Image Descriptor descriptor preference get Image Descriptor if descriptor null registry put annotation Type descriptor image registry get annotation Type else String key translate Symbolic Image Name preference get Symbolic Image Name if key null I Shared Images shared Images PlatformUI get Workbench get Shared Images image shared Images get Image key return image  annotationType getImage AnnotationPreference annotationType ImageRegistry EditorsPlugin getDefault getImageRegistry IAnnotationImageProvider annotationImageProvider getAnnotationImageProvider annotationImageProvider annotationImageProvider getManagedImage annotationImageProvider getImageDescriptorId ImageDescriptor annotationImageProvider getImageDescriptor annotationType annotationType ImageDescriptor getImageDescriptor annotationType annotationType translateSymbolicImageName getSymbolicImageName ISharedImages sharedImages getWorkbench getSharedImages sharedImages getImage

Creates a new range indicator public Default Range Indicator  DefaultRangeIndicator
public void paint GC gc Canvas canvas Rectangle bounds Point canvas Size canvas get Size int x 0 int y bounds y int w canvas Size x int h bounds height int b 1 if y h canvas Size y h canvas Size y y if y 0 h h y y 0 if h 0 return Image image get Image canvas gc draw Image image 0 0 w h x y w h gc set Background canvas get Display get System Color SWT COLOR LIST SELECTION gc fill Rectangle x bounds y w b gc fill Rectangle x bounds y bounds height b w b  canvasSize getSize canvasSize canvasSize canvasSize getImage drawImage setBackground getDisplay getSystemColor COLOR_LIST_SELECTION fillRectangle fillRectangle
see org eclipse jface text source I Annotation Presentation get Layer public int get Layer return I Annotation Presentation DEFAULT LAYER  IAnnotationPresentation getLayer getLayer IAnnotationPresentation DEFAULT_LAYER
control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Image null f Image is Disposed f Image dispose f Image null  addDisposeListener DisposeListener widgetDisposed DisposeEvent fImage fImage isDisposed fImage fImage
Returns the image of this range indicator param control the control return an image private Image get Image Control control if f Image null f Image create Image control get Display control get Size control add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e if f Image null f Image is Disposed f Image dispose f Image null else Rectangle image Rectangle f Image get Bounds Point control Size control get Size if image Rectangle width control Size x image Rectangle height control Size y f Image dispose f Image create Image control get Display control Size return f Image  getImage fImage fImage createImage getDisplay getSize addDisposeListener DisposeListener widgetDisposed DisposeEvent fImage fImage isDisposed fImage fImage imageRectangle fImage getBounds controlSize getSize imageRectangle controlSize imageRectangle controlSize fImage fImage createImage getDisplay controlSize fImage
Creates and returns a new SWT image with the given size on the given display which is used as this range indicator s image param display the display on which to create the image param size the image size return a new image private static Image create Image Display display Point size int width size x int height size y if fg Palette Data null fg Palette Data create Palette display Image Data image Data new Image Data width height 1 fg Palette Data for int y 0 y height y for int x 0 x width x image Data set Pixel x y x y 2 return new Image display image Data  createImage fgPaletteData fgPaletteData createPalette ImageData imageData ImageData fgPaletteData imageData setPixel imageData
Creates and returns a new color palette data param display return the new color palette data private static Palette Data create Palette Display display Color c1 Color c2 if false range lighter c1 display get System Color SWT COLOR WIDGET BACKGROUND c2 display get System Color SWT COLOR LIST BACKGROUND else range darker c1 display get System Color SWT COLOR LIST SELECTION c2 display get System Color SWT COLOR WIDGET BACKGROUND RGB rgbs new RGB new RGB c1 get Red c1 get Green c1 get Blue new RGB c2 get Red c2 get Green c2 get Blue return new Palette Data rgbs  PaletteData createPalette getSystemColor COLOR_WIDGET_BACKGROUND getSystemColor COLOR_LIST_BACKGROUND getSystemColor COLOR_LIST_SELECTION getSystemColor COLOR_WIDGET_BACKGROUND getRed getGreen getBlue getRed getGreen getBlue PaletteData

Creates a line delimiter conversion action param bundle the resource bundle for UI strings param prefix the prefix for the property keys into code bundle code param editor the editor param type the line deletion type must be one of code WHOLE LINE code code TO BEGINNING code or code TO END code public Delete Line Action Resource Bundle bundle String prefix I Text Editor editor int type this bundle prefix editor type true  WHOLE_LINE TO_BEGINNING TO_END DeleteLineAction ResourceBundle ITextEditor
Creates a line deletion action param bundle the resource bundle for UI strings param prefix the prefix for the property keys into code bundle code param editor the editor param type the line deletion type must be one of code WHOLE LINE code code TO BEGINNING code or code TO END code param copy To Clipboard if code true code the contents of the deleted line are copied to the clipboard since 2 1 public Delete Line Action Resource Bundle bundle String prefix I Text Editor editor int type boolean copy To Clipboard super bundle prefix editor f Type type f Copy To Clipboard copy To Clipboard update  WHOLE_LINE TO_BEGINNING TO_END copyToClipboard DeleteLineAction ResourceBundle ITextEditor copyToClipboard fType fCopyToClipboard copyToClipboard
Returns the editor s document param editor the editor return the editor s document private static I Document get Document I Text Editor editor I Document Provider document Provider editor get Document Provider if document Provider null return null I Document document document Provider get Document editor get Editor Input if document null return null return document  IDocument getDocument ITextEditor IDocumentProvider documentProvider getDocumentProvider documentProvider IDocument documentProvider getDocument getEditorInput
Returns the editor s selection param editor the editor return the editor s selection private static I Text Selection get Selection I Text Editor editor I Selection Provider selection Provider editor get Selection Provider if selection Provider null return null I Selection selection selection Provider get Selection if selection instanceof I Text Selection return null return I Text Selection selection  ITextSelection getSelection ITextEditor ISelectionProvider selectionProvider getSelectionProvider selectionProvider ISelection selectionProvider getSelection ITextSelection ITextSelection
public void run if f Target null return I Text Editor editor get Text Editor if editor null return if validate Editor Input State return I Document document get Document editor if document null return I Text Selection selection get Selection editor if selection null return try f Target delete Line document selection get Offset f Type f Copy To Clipboard catch Bad Location Exception e should not happen  fTarget ITextEditor getTextEditor validateEditorInputState IDocument getDocument ITextSelection getSelection fTarget deleteLine getOffset fType fCopyToClipboard BadLocationException
public void update super update if is Enabled return if can Modify Editor set Enabled false return I Text Editor editor get Text Editor if editor null f Target Delete Line Target editor get Adapter Delete Line Target class else f Target null set Enabled f Target null  isEnabled canModifyEditor setEnabled ITextEditor getTextEditor fTarget DeleteLineTarget getAdapter DeleteLineTarget fTarget setEnabled fTarget

Creates the clipboard param viewer the text viewer public Delete Line Clipboard I Text Viewer viewer Assert is Not Null viewer f Viewer viewer  DeleteLineClipboard ITextViewer isNotNull fViewer
Returns the text viewer return the text viewer public I Text Viewer get Viewer return f Viewer  ITextViewer getViewer fViewer
Saves the current state to be compared later using code check State code private void save State f Index f Viewer get Text Widget get Caret Offset  checkState saveState fIndex fViewer getTextWidget getCaretOffset
Checks that the state has not changed since it was saved return returns code true code if the current state is the same as when it was last saved private boolean has Same State return f Index f Viewer get Text Widget get Caret Offset  hasSameState fIndex fViewer getTextWidget getCaretOffset
Checks the state of the clipboard public void check State if f Clipboard null Styled Text text f Viewer get Text Widget if text null return f Viewer get Selection Provider add Selection Changed Listener this text add Focus Listener this text add Mouse Listener this text add Modify Listener this f Clipboard new Clipboard text get Display f Buffer set Length 0 else if has Same State f Buffer set Length 0  checkState fClipboard StyledText fViewer getTextWidget fViewer getSelectionProvider addSelectionChangedListener addFocusListener addMouseListener addModifyListener fClipboard getDisplay fBuffer setLength hasSameState fBuffer setLength
Appends the given string to this clipboard param delta String the string to append public void append String delta String f Buffer append delta String String string f Buffer to String Transfer data Types new Transfer Text Transfer get Instance Object data new Object string f Clipboard set Contents data data Types  deltaString deltaString fBuffer deltaString fBuffer toString dataTypes TextTransfer getInstance fClipboard setContents dataTypes
Uninstalls this action private void uninstall if f Clipboard null return Styled Text text f Viewer get Text Widget if text null return f Viewer get Selection Provider remove Selection Changed Listener this text remove Focus Listener this text remove Mouse Listener this text remove Modify Listener this f Clipboard dispose f Clipboard null  fClipboard StyledText fViewer getTextWidget fViewer getSelectionProvider removeSelectionChangedListener removeFocusListener removeMouseListener removeModifyListener fClipboard fClipboard
Mark whether a deletion is in progress param deleting code true code if a deletion is in progress public void set Deleting boolean deleting f Deleting deleting  setDeleting fDeleting
see org eclipse swt events Mouse Listener mouse Double Click Mouse Event public void mouse Double Click Mouse Event e uninstall  MouseListener mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent
see org eclipse swt events Mouse Listener mouse Down Mouse Event public void mouse Down Mouse Event e uninstall  MouseListener mouseDown MouseEvent mouseDown MouseEvent
see org eclipse swt events Mouse Listener mouse Up Mouse Event public void mouse Up Mouse Event e uninstall  MouseListener mouseUp MouseEvent mouseUp MouseEvent
see org eclipse jface viewers I Selection Changed Listener selection Changed Selection Changed Event public void selection Changed Selection Changed Event event uninstall  ISelectionChangedListener selectionChanged SelectionChangedEvent selectionChanged SelectionChangedEvent
see org eclipse swt events Focus Listener focus Gained Focus Event public void focus Gained Focus Event e uninstall  FocusListener focusGained FocusEvent focusGained FocusEvent
see org eclipse swt events Focus Listener focus Lost Focus Event public void focus Lost Focus Event e uninstall  FocusListener focusLost FocusEvent focusLost FocusEvent
see org eclipse jface text I Text Listener text Changed Text Event public void text Changed Text Event event uninstall  ITextListener textChanged TextEvent textChanged TextEvent
see org eclipse swt events Modify Listener modify Text Modify Event public void modify Text Modify Event e if f Deleting uninstall  ModifyListener modifyText ModifyEvent modifyText ModifyEvent fDeleting
Creates a new target param viewer the viewer that the new target operates on public Delete Line Target I Text Viewer viewer f Clipboard new Delete Line Clipboard viewer  DeleteLineTarget ITextViewer fClipboard DeleteLineClipboard
Returns the document s delete region specified by position and type param documentthe document param positionthe position param type the line deletion type must be one of code WHOLE LINE code code TO BEGINNING code or code TO END code return the document s delete region throws Bad Location Exception private static I Region get Delete Region I Document document int position int type throws Bad Location Exception int line document get Line Of Offset position int offset 0 int length 0 switch type case Delete Line Action WHOLE offset document get Line Offset line length document get Line Length line break case Delete Line Action TO BEGINNING offset document get Line Offset line length position offset break case Delete Line Action TO END offset position I Region line Region document get Line Information line int end line Region get Offset line Region get Length if position end String line Delimiter document get Line Delimiter line length line Delimiter null 0 line Delimiter length else length end offset break default throw new Illegal Argument Exception return new Region offset length  WHOLE_LINE TO_BEGINNING TO_END BadLocationException IRegion getDeleteRegion IDocument BadLocationException getLineOfOffset DeleteLineAction getLineOffset getLineLength DeleteLineAction TO_BEGINNING getLineOffset DeleteLineAction TO_END IRegion lineRegion getLineInformation lineRegion getOffset lineRegion getLength lineDelimiter getLineDelimiter lineDelimiter lineDelimiter IllegalArgumentException
Deletes the specified fraction of the line of the given offset param document the document param position the offset param type the line deletion type must be one of code WHOLE LINE code code TO BEGINNING code or code TO END code param copy To Clipboard code true code if the deleted line should be copied to the clipboard throws Bad Location Exception if position is not valid in the given document public void delete Line I Document document int position int type boolean copy To Clipboard throws Bad Location Exception I Region delete Region get Delete Region document position type int offset delete Region get Offset int length delete Region get Length if length 0 return if copy To Clipboard f Clipboard check State try f Clipboard append document get offset length catch SWT Error e if e code DND ERROR CANNOT SET CLIPBOARD throw e see https bugs eclipse org bugs show bug cgi id 59459 don t delete if copy to clipboard fails rather log abort log Status status new Status I Status ERROR Text Editor Plugin PLUGIN ID e code Editor Messages get String Editor error clipboard copy failed message e NON NLS 1 Text Editor Plugin get Default get Log log status f Clipboard uninstall return don t delete f Clipboard set Deleting true document replace offset length null f Clipboard set Deleting false f Clipboard save State else document replace offset length null  WHOLE_LINE TO_BEGINNING TO_END copyToClipboard BadLocationException deleteLine IDocument copyToClipboard BadLocationException IRegion deleteRegion getDeleteRegion deleteRegion getOffset deleteRegion getLength copyToClipboard fClipboard checkState fClipboard SWTError ERROR_CANNOT_SET_CLIPBOARD show_bug IStatus TextEditorPlugin PLUGIN_ID EditorMessages getString TextEditorPlugin getDefault getLog fClipboard fClipboard setDeleting fClipboard setDeleting fClipboard saveState

Returns the standard document provider registry return the default document provider registry public static Document Provider Registry get Default if fg Registry null fg Registry new Document Provider Registry return fg Registry  DocumentProviderRegistry getDefault fgRegistry fgRegistry DocumentProviderRegistry fgRegistry
Creates a new document provider registry and initializes it with the information found in the plug in registry private Document Provider Registry initialize  DocumentProviderRegistry
Reads the comma separated value of the given configuration element for the given attribute name and remembers the configuration element in the given map under the individual tokens of the attribute value param map the map param element the configuration element param attribute Name the attribute name private void read Map map I Configuration Element element String attribute Name String value element get Attribute attribute Name if value null String Tokenizer tokenizer new String Tokenizer value NON NLS 1 while tokenizer has More Tokens String token tokenizer next Token trim Set s Set map get token if s null s new Hash Set map put token s s add element  attributeName IConfigurationElement attributeName getAttribute attributeName StringTokenizer StringTokenizer hasMoreTokens nextToken HashSet
Initializes the document provider registry It retrieves all implementers of the code document Providers code extension point and remembers those implementers based on the name extensions and the editor input types they are for private void initialize I Extension Point extension Point extension Point Platform get Extension Registry get Extension Point EditorsUI PLUGIN ID document Providers NON NLS 1 if extension Point null String msg Message Format format Text Editor Messages get String Document Provider Registry error extension point not found new Object PlatformUI PLUGIN ID NON NLS 1 Bundle bundle Platform get Bundle PlatformUI PLUGIN ID I Log log Platform get Log bundle log log new Status I Status ERROR PlatformUI PLUGIN ID 0 msg null return I Configuration Element elements extension Point get Configuration Elements for int i 0 i elements length i read f Extension Mapping elements i extensions NON NLS 1 read f Input Type Mapping elements i input Types NON NLS 1  documentProviders IExtensionPoint extensionPoint extensionPoint getExtensionRegistry getExtensionPoint PLUGIN_ID documentProviders extensionPoint MessageFormat TextEditorMessages getString DocumentProviderRegistry extension_point_not_found PLUGIN_ID getBundle PLUGIN_ID ILog getLog IStatus PLUGIN_ID IConfigurationElement extensionPoint getConfigurationElements fExtensionMapping fInputTypeMapping inputTypes
Returns the document provider for the given configuration element If there is no instantiated document provider remembered for this element a new document provider is created and put into the cache param entry the configuration element return the document provider for the given entry private I Document Provider get Document Provider I Configuration Element entry I Document Provider provider I Document Provider f Instances get entry if provider null try provider I Document Provider entry create Executable Extension class NON NLS 1 f Instances put entry provider catch Core Exception x return provider  IDocumentProvider getDocumentProvider IConfigurationElement IDocumentProvider IDocumentProvider fInstances IDocumentProvider createExecutableExtension fInstances CoreException
Returns the first enumerated element of the given set param set the set return the first configuration element in the set or code null code if none private I Configuration Element select Configuration Element Set set if set null set is Empty Iterator e set iterator return I Configuration Element e next return null  IConfigurationElement selectConfigurationElement isEmpty IConfigurationElement
Returns a shared document provider for the given name extension param extension the name extension to be used for lookup return the shared document provider or code null code public I Document Provider get Document Provider String extension Set set Set f Extension Mapping get extension if set null I Configuration Element entry select Configuration Element set return get Document Provider entry return null  IDocumentProvider getDocumentProvider fExtensionMapping IConfigurationElement selectConfigurationElement getDocumentProvider
Computes the class hierarchy of the given type The type is part of the computed hierarchy param type the type return a list containing the super class hierarchy private List compute Class List Class type List result new Array List Class c type while c null result add c c c get Superclass return result  computeClassList ArrayList getSuperclass
Computes the list of all interfaces for the given list of classes The interface lists of the given classes are concatenated param classes a list of link java lang Class objects return a list with elements of type code Class code private List compute Interface List List classes List result new Array List 4 Hashtable visited new Hashtable 4 Iterator e classes iterator while e has Next Class c Class e next compute Interface List c get Interfaces result visited return result  computeInterfaceList ArrayList hasNext computeInterfaceList getInterfaces
Computes the list of all interfaces of the given list of interfaces taking a depth first approach param interfaces an array of link java lang Class objects denoting interfaces param result the result list param visited map of visited interfaces private void compute Interface List Class interfaces List result Hashtable visited List to Be Visited new Array List interfaces length for int i 0 i interfaces length i Class iface interfaces i if visited get iface null visited put iface iface result add iface to Be Visited add iface Iterator e to Be Visited iterator while e has Next Class iface Class e next compute Interface List iface get Interfaces result visited  computeInterfaceList toBeVisited ArrayList toBeVisited toBeVisited hasNext computeInterfaceList getInterfaces
Returns the configuration elements for the first class in the list of given classes for which configuration elements have been remembered param classes a list of link java lang Class objects return an input type mapping or code null code private Object get First Input Type Mapping List classes Iterator e classes iterator while e has Next Class c Class e next Object mapping f Input Type Mapping get c get Name if mapping null return mapping return null  getFirstInputTypeMapping hasNext fInputTypeMapping getName
Returns the appropriate configuration element for the given type If there is no configuration element for the type s name first the list of super classes is searched and if not successful the list of all interfaces param type a link java lang Class object return an input type mapping or code null code private Object find Input Type Mapping Class type if type null return null Object mapping f Input Type Mapping get type get Name if mapping null return mapping List class List compute Class List type mapping get First Input Type Mapping class List if mapping null return mapping return get First Input Type Mapping compute Interface List class List  findInputTypeMapping fInputTypeMapping getName classList computeClassList getFirstInputTypeMapping classList getFirstInputTypeMapping computeInterfaceList classList
Returns the shared document for the type of the given editor input param editor Input the input for whose type the provider is looked up return the shared document provider public I Document Provider get Document Provider I Editor Input editor Input I Document Provider provider null I File file I File editor Input get Adapter I File class if file null provider get Document Provider file get File Extension if provider null Set set Set find Input Type Mapping editor Input get Class if set null I Configuration Element entry select Configuration Element set provider get Document Provider entry return provider  editorInput IDocumentProvider getDocumentProvider IEditorInput editorInput IDocumentProvider IFile IFile editorInput getAdapter IFile getDocumentProvider getFileExtension findInputTypeMapping editorInput getClass IConfigurationElement selectConfigurationElement getDocumentProvider

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Editor Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE EditorMessages
public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException
public static Resource Bundle get Resource Bundle return fg Resource Bundle  ResourceBundle getResourceBundle fgResourceBundle

public void selection Changed Selection Changed Event event f Status Line Manager set Error Message null null f Status Line Manager set Message null null Assert is True this f Status Line Clearer uninstall Status Line Clearer  selectionChanged SelectionChangedEvent fStatusLineManager setErrorMessage fStatusLineManager setMessage isTrue fStatusLineClearer uninstallStatusLineClearer
Constructor for Editor Status Line param status Line Manager the status line manager param selection Provider the selection provider public Editor Status Line I Status Line Manager status Line Manager I Selection Provider selection Provider Assert is Not Null status Line Manager Assert is Not Null selection Provider f Status Line Manager status Line Manager f Selection Provider selection Provider  EditorStatusLine statusLineManager selectionProvider EditorStatusLine IStatusLineManager statusLineManager ISelectionProvider selectionProvider isNotNull statusLineManager isNotNull selectionProvider fStatusLineManager statusLineManager fSelectionProvider selectionProvider
Returns the status line manager return the status line manager public I Status Line Manager get Status Line Manager return f Status Line Manager  IStatusLineManager getStatusLineManager fStatusLineManager
Returns the selection provider return the selection provider public I Selection Provider get Selection Provider return f Selection Provider  ISelectionProvider getSelectionProvider fSelectionProvider
public void set Message boolean error String message Image image if error f Status Line Manager set Error Message image message else Clear error message f Status Line Manager set Error Message null null f Status Line Manager set Message image message if is Message Empty message uninstall Status Line Clearer else install Status Line Clearer  setMessage fStatusLineManager setErrorMessage fStatusLineManager setErrorMessage fStatusLineManager setMessage isMessageEmpty uninstallStatusLineClearer installStatusLineClearer
Returns whether this given string is empty param message a string return code true code if the string is code null code has 0 length or only white space characters private static boolean is Message Empty String message return message null message trim length 0  isMessageEmpty
Uninstalls the status line clearer private void uninstall Status Line Clearer if f Status Line Clearer null return f Selection Provider remove Selection Changed Listener f Status Line Clearer f Status Line Clearer null  uninstallStatusLineClearer fStatusLineClearer fSelectionProvider removeSelectionChangedListener fStatusLineClearer fStatusLineClearer
Installs the status line clearer private void install Status Line Clearer if f Status Line Clearer null return Status Line Clearer status Line Clearer new Status Line Clearer f Selection Provider add Selection Changed Listener status Line Clearer f Status Line Clearer status Line Clearer  installStatusLineClearer fStatusLineClearer StatusLineClearer statusLineClearer StatusLineClearer fSelectionProvider addSelectionChangedListener statusLineClearer fStatusLineClearer statusLineClearer

Creates a new find replace action for the given workbench part The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param workbench Part the workbench part param forward the search direction see Resource Action Resource Action Resource Bundle String public Find Next Action Resource Bundle bundle String prefix I Workbench Part workbench Part boolean forward super bundle prefix f Workbench Part workbench Part f Forward forward update  ResourceAction workbenchPart ResourceAction ResourceAction ResourceBundle FindNextAction ResourceBundle IWorkbenchPart workbenchPart fWorkbenchPart workbenchPart fForward
Creates a new find replace action for the given workbench window The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param workbench Window the workbench window param forward the search direction see Resource Action Resource Action Resource Bundle String deprecated use Find Replace Action Resource Bundle String I Workbench Part boolean instead public Find Next Action Resource Bundle bundle String prefix I Workbench Window workbench Window boolean forward super bundle prefix f Workbench Window workbench Window f Forward forward update  ResourceAction workbenchWindow ResourceAction ResourceAction ResourceBundle FindReplaceAction ResourceBundle IWorkbenchPart FindNextAction ResourceBundle IWorkbenchWindow workbenchWindow fWorkbenchWindow workbenchWindow fForward
Returns the find string based on the selection or the find history return the find string private String get Find String String string get Selection String if string null f Reg Ex Search string equals f Selection f Find History is Empty string String f Find History get 0 return string  getFindString getSelectionString fRegExSearch fSelection fFindHistory isEmpty fFindHistory
Returns the status line manager of the active editor return the status line manager of the active editor private I Status Line Manager get Status Line Manager I Editor Part editor f Workbench Part get Site get Page get Active Editor if editor null return null I Editor Action Bar Contributor contributor editor get Editor Site get Action Bar Contributor if contributor instanceof Editor Action Bar Contributor return Editor Action Bar Contributor contributor get Action Bars get Status Line Manager return null  IStatusLineManager getStatusLineManager IEditorPart fWorkbenchPart getSite getPage getActiveEditor IEditorActionBarContributor getEditorSite getActionBarContributor EditorActionBarContributor EditorActionBarContributor getActionBars getStatusLineManager
Sets the no matches found error message to the status line since 3 0 private void status Not Found f Workbench Part get Site get Shell get Display beep I Status Line Manager manager get Status Line Manager if manager null return manager set Message Editor Messages get String Find Next Status no Match label NON NLS 1  statusNotFound fWorkbenchPart getSite getShell getDisplay IStatusLineManager getStatusLineManager setMessage EditorMessages getString FindNext noMatch
Clears the status line private void status Clear I Status Line Manager manager get Status Line Manager if manager null return manager set Error Message NON NLS 1 manager set Message NON NLS 1  statusClear IStatusLineManager getStatusLineManager setErrorMessage setMessage
public void run if f Target null read Configuration f Find String get Find String if f Find String null status Not Found return status Clear if find Next f Find String f Forward f Case Init f Wrap Init f Whole Word Init f Reg Ex Search f Reg Ex Search status Not Found write Configuration  fTarget readConfiguration fFindString getFindString fFindString statusNotFound statusClear findNext fFindString fForward fCaseInit fWrapInit fWholeWordInit fRegExSearch fRegExSearch statusNotFound writeConfiguration
public void update if f Workbench Part null f Workbench Window null f Workbench Part f Workbench Window get Part Service get Active Part if f Workbench Part null f Target I Find Replace Target f Workbench Part get Adapter I Find Replace Target class else f Target null set Enabled f Target null f Target can Perform Find  fWorkbenchPart fWorkbenchWindow fWorkbenchPart fWorkbenchWindow getPartService getActivePart fWorkbenchPart fTarget IFindReplaceTarget fWorkbenchPart getAdapter IFindReplaceTarget fTarget setEnabled fTarget fTarget canPerformFind
private int find Index String find String int start Position boolean forward Search boolean case Sensitive boolean wrap Search boolean whole Word boolean reg Ex Search if forward Search if wrap Search int index find And Select start Position find String true case Sensitive whole Word reg Ex Search if index 1 beep index find And Select 1 find String true case Sensitive whole Word reg Ex Search return index return find And Select start Position find String true case Sensitive whole Word reg Ex Search backward if wrap Search int index find And Select start Position 1 find String false case Sensitive whole Word reg Ex Search if index 1 beep index find And Select 1 find String false case Sensitive whole Word reg Ex Search return index return find And Select start Position 1 find String false case Sensitive whole Word reg Ex Search  findIndex findString startPosition forwardSearch caseSensitive wrapSearch wholeWord regExSearch forwardSearch wrapSearch findAndSelect startPosition findString caseSensitive wholeWord regExSearch findAndSelect findString caseSensitive wholeWord regExSearch findAndSelect startPosition findString caseSensitive wholeWord regExSearch wrapSearch findAndSelect startPosition findString caseSensitive wholeWord regExSearch findAndSelect findString caseSensitive wholeWord regExSearch findAndSelect startPosition findString caseSensitive wholeWord regExSearch
Returns whether the specified search string can be found using the given options param find String the string to search for param forward Search the search direction param case Sensitive should the search honor cases param wrap Searchshould the search wrap to the start end if end start reached param whole Word does the find string represent a complete word param reg Ex Search if code true code find String represents a regular expression return code true code if the find string can be found using the given options since 3 0 private boolean find Next String find String boolean forward Search boolean case Sensitive boolean wrap Search boolean whole Word boolean reg Ex Search Point r f Target get Selection int find Replace Position r x if forward Search find Replace Position r y int index find Index find String find Replace Position forward Search case Sensitive wrap Search whole Word reg Ex Search if index 1 return true return false  findString forwardSearch caseSensitive wrapSearchshould wholeWord regExSearch findString findNext findString forwardSearch caseSensitive wrapSearch wholeWord regExSearch fTarget getSelection findReplacePosition forwardSearch findReplacePosition findIndex findString findReplacePosition forwardSearch caseSensitive wrapSearch wholeWord regExSearch
private void beep Shell shell null if f Workbench Part null shell f Workbench Part get Site get Shell else if f Workbench Window null shell f Workbench Window get Shell if shell null shell is Disposed shell get Display beep  fWorkbenchPart fWorkbenchPart getSite getShell fWorkbenchWindow fWorkbenchWindow getShell isDisposed getDisplay
Searches for a string starting at the given offset and using the specified search directives If a string has been found it is selected and its start offset is returned param offset the offset at which searching starts param find String the string which should be found param forward Search the direction of the search param case Sensitive code true code performs a case sensitive search code false code an insensitive search param whole Word if code true code only occurrences are reported in which the find String stands as a word by itself param reg Ex Search if code true code find String represents a regular expression return the position of the specified string or 1 if the string has not been found since 3 0 private int find And Select int offset String find String boolean forward Search boolean case Sensitive boolean whole Word boolean reg Ex Search if f Target instanceof I Find Replace Target Extension3 try return I Find Replace Target Extension3 f Target find And Select offset find String forward Search case Sensitive whole Word reg Ex Search catch Pattern Syntax Exception ex return 1 else return f Target find And Select offset find String forward Search case Sensitive whole Word  findString forwardSearch caseSensitive wholeWord findString regExSearch findString findAndSelect findString forwardSearch caseSensitive wholeWord regExSearch fTarget IFindReplaceTargetExtension3 IFindReplaceTargetExtension3 fTarget findAndSelect findString forwardSearch caseSensitive wholeWord regExSearch PatternSyntaxException fTarget findAndSelect findString forwardSearch caseSensitive wholeWord
Returns the dialog settings object used to share state between several find replace dialogs return the dialog settings to be used private I Dialog Settings get Dialog Settings I Dialog Settings settings Text Editor Plugin get Default get Dialog Settings f Dialog Settings settings get Section Find Replace Dialog class get Name if f Dialog Settings null f Dialog Settings settings add New Section Find Replace Dialog class get Name return f Dialog Settings  IDialogSettings getDialogSettings IDialogSettings TextEditorPlugin getDefault getDialogSettings fDialogSettings getSection FindReplaceDialog getName fDialogSettings fDialogSettings addNewSection FindReplaceDialog getName fDialogSettings
Initializes itself from the dialog settings with the same state as at the previous invocation private void read Configuration I Dialog Settings s get Dialog Settings f Wrap Init s get Boolean wrap NON NLS 1 f Case Init s get Boolean casesensitive NON NLS 1 f Whole Word Init s get Boolean wholeword NON NLS 1 f Reg Ex Search s get Boolean is Reg Ex NON NLS 1 f Selection s get selection NON NLS 1 String find History s get Array findhistory NON NLS 1 if find History null f Find History clear for int i 0 i find History length i f Find History add find History i  readConfiguration IDialogSettings getDialogSettings fWrapInit getBoolean fCaseInit getBoolean fWholeWordInit getBoolean fRegExSearch getBoolean isRegEx fSelection findHistory getArray findHistory fFindHistory findHistory fFindHistory findHistory
Stores its current configuration in the dialog store private void write Configuration if f Find String null return I Dialog Settings s get Dialog Settings String selection f Target get Selection Text if selection null selection NON NLS 1 s put selection selection NON NLS 1 if f Find History is Empty f Find String equals f Find History get 0 return int index f Find History index Of f Find String if index 1 f Find History remove index f Find History add 0 f Find String while f Find History size 8 f Find History remove 8 String names new String f Find History size f Find History to Array names s put findhistory names NON NLS 1  writeConfiguration fFindString IDialogSettings getDialogSettings fTarget getSelectionText fFindHistory isEmpty fFindString fFindHistory fFindHistory indexOf fFindString fFindHistory fFindHistory fFindString fFindHistory fFindHistory fFindHistory fFindHistory toArray
Returns the actual selection of the find replace target return the actual selection of the find replace target private String get Selection String 1GF86V3 ITPUI WINNT Internal errors using Find Replace Dialog Now uses Text Utilities rather than focusing on n String selection f Target get Selection Text if selection null selection length 0 int info Text Utilities index Of Text Utilities DELIMITERS selection 0 if info 0 0 return selection substring 0 info 0 else if info 0 1 return selection return null  getSelectionString TextUtilities fTarget getSelectionText TextUtilities indexOf TextUtilities

Creates a new find replace dialog accessor anchored at the given part site param site the part site public Find Replace Dialog Stub I Workbench Part Site site f Window site get Workbench Window f Dialog new Find Replace Dialog site get Shell f Dialog create f Dialog get Shell add Dispose Listener this I Part Service service f Window get Part Service service add Part Listener this part Activated service get Active Part  FindReplaceDialogStub IWorkbenchPartSite fWindow getWorkbenchWindow fDialog FindReplaceDialog getShell fDialog fDialog getShell addDisposeListener IPartService fWindow getPartService addPartListener partActivated getActivePart
Returns the find replace dialog return the find replace dialog public Find Replace Dialog get Dialog return f Dialog  FindReplaceDialog getDialog fDialog
public void part Activated I Workbench Part part I Find Replace Target target part null null I Find Replace Target part get Adapter I Find Replace Target class f Previous Part f Part f Part target null null part if f Previous Target target f Previous Target target if f Dialog null boolean is Editable false if f Part instanceof I Text Editor Extension2 I Text Editor Extension2 extension I Text Editor Extension2 f Part is Editable extension is Editor Input Modifiable f Dialog update Target target is Editable  partActivated IWorkbenchPart IFindReplaceTarget IFindReplaceTarget getAdapter IFindReplaceTarget fPreviousPart fPart fPart fPreviousTarget fPreviousTarget fDialog isEditable fPart ITextEditorExtension2 ITextEditorExtension2 ITextEditorExtension2 fPart isEditable isEditorInputModifiable fDialog updateTarget isEditable
public void part Closed I Workbench Part part if part f Previous Part f Previous Part null f Previous Target null if part f Part part Activated null  partClosed IWorkbenchPart fPreviousPart fPreviousPart fPreviousTarget fPart partActivated
public void widget Disposed Dispose Event event if fg Find Replace Dialog Stub this fg Find Replace Dialog Stub null if f Window null f Window get Part Service remove Part Listener this f Window null f Dialog null f Part null f Previous Part null f Previous Target null  widgetDisposed DisposeEvent fgFindReplaceDialogStub fgFindReplaceDialogStub fWindow fWindow getPartService removePartListener fWindow fDialog fPart fPreviousPart fPreviousTarget
see I Part Listener part Opened I Workbench Part public void part Opened I Workbench Part part  IPartListener partOpened IWorkbenchPart partOpened IWorkbenchPart
see I Part Listener part Deactivated I Workbench Part public void part Deactivated I Workbench Part part  IPartListener partDeactivated IWorkbenchPart partDeactivated IWorkbenchPart
see I Part Listener part Brought To Top I Workbench Part public void part Brought To Top I Workbench Part part  IPartListener partBroughtToTop IWorkbenchPart partBroughtToTop IWorkbenchPart
Creates a new find replace action for the given workbench part The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param workbench Part the workbench part see Resource Action Resource Action Resource Bundle String public Find Replace Action Resource Bundle bundle String prefix I Workbench Part workbench Part super bundle prefix f Workbench Part workbench Part update  ResourceAction workbenchPart ResourceAction ResourceAction ResourceBundle FindReplaceAction ResourceBundle IWorkbenchPart workbenchPart fWorkbenchPart workbenchPart
Creates a new find replace action for the given workbench window The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param workbench Window the workbench window see Resource Action Resource Action Resource Bundle String deprecated use Find Replace Action Resource Bundle String I Workbench Part instead public Find Replace Action Resource Bundle bundle String prefix I Workbench Window workbench Window super bundle prefix f Workbench Window workbench Window update  ResourceAction workbenchWindow ResourceAction ResourceAction ResourceBundle FindReplaceAction ResourceBundle IWorkbenchPart FindReplaceAction ResourceBundle IWorkbenchWindow workbenchWindow fWorkbenchWindow workbenchWindow
public void run if f Target null return if fg Find Replace Dialog Stub null Shell shell f Workbench Part get Site get Shell Find Replace Dialog dialog fg Find Replace Dialog Stub get Dialog if dialog null shell dialog get Parent Shell fg Find Replace Dialog Stub null here to avoid timing issues dialog close if fg Find Replace Dialog Stub null fg Find Replace Dialog Stub new Find Replace Dialog Stub f Workbench Part get Site boolean is Editable false if f Workbench Part instanceof I Text Editor Extension2 is Editable I Text Editor Extension2 f Workbench Part is Editor Input Modifiable Find Replace Dialog dialog fg Find Replace Dialog Stub get Dialog dialog update Target f Target is Editable dialog open  fTarget fgFindReplaceDialogStub fWorkbenchPart getSite getShell FindReplaceDialog fgFindReplaceDialogStub getDialog getParentShell fgFindReplaceDialogStub fgFindReplaceDialogStub fgFindReplaceDialogStub FindReplaceDialogStub fWorkbenchPart getSite isEditable fWorkbenchPart ITextEditorExtension2 isEditable ITextEditorExtension2 fWorkbenchPart isEditorInputModifiable FindReplaceDialog fgFindReplaceDialogStub getDialog updateTarget fTarget isEditable
public void update if f Workbench Part null f Workbench Window null f Workbench Part f Workbench Window get Part Service get Active Part if f Workbench Part null f Target I Find Replace Target f Workbench Part get Adapter I Find Replace Target class else f Target null set Enabled f Target null f Target can Perform Find  fWorkbenchPart fWorkbenchWindow fWorkbenchPart fWorkbenchWindow getPartService getActivePart fWorkbenchPart fTarget IFindReplaceTarget fWorkbenchPart getAdapter IFindReplaceTarget fTarget setEnabled fTarget fTarget canPerformFind

public void shell Activated Shell Event e String old Text f Find Field get Text XXX workaround for 10766 List old List new Array List old List add All f Find History read Configuration f Find Field remove Modify Listener f Find Modify Listener update Combo f Find Field f Find History if f Find History equals old List f Find History is Empty f Find Field set Text String f Find History get 0 else f Find Field set Text old Text if find Field Had Focus f Find Field set Selection new Point 0 f Find Field get Text length f Find Field add Modify Listener f Find Modify Listener f Active Shell Shell e widget update Button State if find Field Had Focus get Shell f Active Shell f Find Field is Disposed f Find Field set Focus  shellActivated ShellEvent oldText fFindField getText oldList ArrayList oldList addAll fFindHistory readConfiguration fFindField removeModifyListener fFindModifyListener updateCombo fFindField fFindHistory fFindHistory oldList fFindHistory isEmpty fFindField setText fFindHistory fFindField setText oldText findFieldHadFocus fFindField setSelection fFindField getText fFindField addModifyListener fFindModifyListener fActiveShell updateButtonState findFieldHadFocus getShell fActiveShell fFindField isDisposed fFindField setFocus
Returns code true code if the find field had focus code false code if it did not return code true code if the find field had focus code false code if it did not private boolean find Field Had Focus See bug 45447 Under GTK and Motif the focus of the find field is already gone when shell Deactivated is called On the other hand focus has already been restored when shell Activated is called Therefore we select and give focus if either f Give Focus To Find Field is true or the find field has focus return f Give Focus To Find Field ok To Use f Find Field f Find Field is Focus Control  findFieldHadFocus shellDeactivated shellActivated fGiveFocusToFindField fGiveFocusToFindField okToUse fFindField fFindField isFocusControl
public void shell Deactivated Shell Event e f Give Focus To Find Field f Find Field is Focus Control store Settings f Global Radio Button set Selection true f Selected Range Radio Button set Selection false f Use Selected Lines false if f Target null f Target instanceof I Find Replace Target Extension I Find Replace Target Extension f Target set Scope null f Old Scope null f Active Shell null update Button State  shellDeactivated ShellEvent fGiveFocusToFindField fFindField isFocusControl storeSettings fGlobalRadioButton setSelection fSelectedRangeRadioButton setSelection fUseSelectedLines fTarget fTarget IFindReplaceTargetExtension IFindReplaceTargetExtension fTarget setScope fOldScope fActiveShell updateButtonState
public void modify Text Modify Event e if is Incremental Search is Reg Ex Search Available And Checked if f Find Field get Text equals f Target null NON NLS 1 empty selection at base location int offset f Incremental Base Location x if is Forward Search f Needs Initial Find Before Replace is Forward Search f Needs Initial Find Before Replace offset offset f Incremental Base Location y f Needs Initial Find Before Replace false find And Select offset is Forward Search is Case Sensitive Search is Whole Word Search is Reg Ex Search Available And Checked NON NLS 1 else perform Search false update Button State is Incremental Search  modifyText ModifyEvent isIncrementalSearch isRegExSearchAvailableAndChecked fFindField getText fTarget fIncrementalBaseLocation isForwardSearch fNeedsInitialFindBeforeReplace isForwardSearch fNeedsInitialFindBeforeReplace fIncrementalBaseLocation fNeedsInitialFindBeforeReplace findAndSelect isForwardSearch isCaseSensitiveSearch isWholeWordSearch isRegExSearchAvailableAndChecked performSearch updateButtonState isIncrementalSearch
Creates a new dialog with the given shell as parent param parent Shell the parent shell public Find Replace Dialog Shell parent Shell super parent Shell f Parent Shell null f Target null f Dialog Position Init null f Find History new Array List HISTORY SIZE 1 f Replace History new Array List HISTORY SIZE 1 f Wrap Init false f Case Init false f Is Reg Ex Init false f Whole Word Init false f Incremental Init false f Global Init true f Forward Init true read Configuration set Shell Style SWT CLOSE SWT MODELESS SWT BORDER SWT TITLE set Block On Open false  parentShell FindReplaceDialog parentShell parentShell fParentShell fTarget fDialogPositionInit fFindHistory ArrayList HISTORY_SIZE fReplaceHistory ArrayList HISTORY_SIZE fWrapInit fCaseInit fIsRegExInit fWholeWordInit fIncrementalInit fGlobalInit fForwardInit readConfiguration setShellStyle setBlockOnOpen
Returns this dialog s parent shell return the dialog s parent shell public Shell get Parent Shell return super get Parent Shell  getParentShell getParentShell
Returns code true code if control can be used param control the control to be checked return code true code if control can be used private boolean ok To Use Control control return control null control is Disposed  okToUse isDisposed
public void create super create Shell shell get Shell shell add Shell Listener f Activation Listener if f Location null shell set Location f Location set help context Workbench Help set Help shell I Abstract Text Editor Help Context Ids FIND REPLACE DIALOG fill in combo contents f Find Field remove Modify Listener f Find Modify Listener update Combo f Find Field f Find History f Find Field add Modify Listener f Find Modify Listener update Combo f Replace Field f Replace History get find string init Find String From Selection set dialog position if f Dialog Position Init null shell set Bounds f Dialog Position Init shell set Text Editor Messages get String Find Replace title NON NLS 1 shell set Image null  getShell addShellListener fActivationListener fLocation setLocation fLocation WorkbenchHelp setHelp IAbstractTextEditorHelpContextIds FIND_REPLACE_DIALOG fFindField removeModifyListener fFindModifyListener updateCombo fFindField fFindHistory fFindField addModifyListener fFindModifyListener updateCombo fReplaceField fReplaceHistory initFindStringFromSelection fDialogPositionInit setBounds fDialogPositionInit setText EditorMessages getString FindReplace setImage
Create the button section of the find replace dialog param parent the parent composite return the button section private Composite create Button Section Composite parent Composite panel new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout make Columns Equal Width true panel set Layout layout f Find Next Button make Button panel Find Replace Find Next Button label 102 true new Selection Adapter NON NLS 1 public void widget Selected Selection Event e if is Incremental Search is Reg Ex Search Available And Checked init Incremental Base Location f Needs Initial Find Before Replace false perform Search update Find History f Find Next Button set Focus set Grid Data f Find Next Button Grid Data FILL true Grid Data FILL false f Replace Find Button make Button panel Find Replace Replace Find Button label 103 false new Selection Adapter NON NLS 1 public void widget Selected Selection Event e if f Needs Initial Find Before Replace perform Search if perform Replace Selection perform Search update Find And Replace History f Replace Find Button set Focus set Grid Data f Replace Find Button Grid Data FILL true Grid Data FILL false f Replace Selection Button make Button panel Find Replace Replace Selection Button label 104 false new Selection Adapter NON NLS 1 public void widget Selected Selection Event e if f Needs Initial Find Before Replace perform Search perform Replace Selection update Find And Replace History f Find Next Button set Focus set Grid Data f Replace Selection Button Grid Data FILL true Grid Data FILL false f Replace All Button make Button panel Find Replace Replace All Button label 105 false new Selection Adapter NON NLS 1 public void widget Selected Selection Event e perform Replace All update Find And Replace History f Find Next Button set Focus set Grid Data f Replace All Button Grid Data FILL true Grid Data FILL false Make the all the buttons the same size as the Remove Selection button f Replace All Button set Enabled is Editable return panel  createButtonSection GridLayout GridLayout numColumns makeColumnsEqualWidth setLayout fFindNextButton makeButton FindReplace FindNextButton SelectionAdapter widgetSelected SelectionEvent isIncrementalSearch isRegExSearchAvailableAndChecked initIncrementalBaseLocation fNeedsInitialFindBeforeReplace performSearch updateFindHistory fFindNextButton setFocus setGridData fFindNextButton GridData GridData fReplaceFindButton makeButton FindReplace ReplaceFindButton SelectionAdapter widgetSelected SelectionEvent fNeedsInitialFindBeforeReplace performSearch performReplaceSelection performSearch updateFindAndReplaceHistory fReplaceFindButton setFocus setGridData fReplaceFindButton GridData GridData fReplaceSelectionButton makeButton FindReplace ReplaceSelectionButton SelectionAdapter widgetSelected SelectionEvent fNeedsInitialFindBeforeReplace performSearch performReplaceSelection updateFindAndReplaceHistory fFindNextButton setFocus setGridData fReplaceSelectionButton GridData GridData fReplaceAllButton makeButton FindReplace ReplaceAllButton SelectionAdapter widgetSelected SelectionEvent performReplaceAll updateFindAndReplaceHistory fFindNextButton setFocus setGridData fReplaceAllButton GridData GridData fReplaceAllButton setEnabled isEditable
Creates the options configuration section of the find replace dialog param parent the parent composite return the options configuration section private Composite create Config Panel Composite parent Composite panel new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout make Columns Equal Width true panel set Layout layout Composite direction Group create Direction Group panel set Grid Data direction Group Grid Data FILL true Grid Data FILL false Composite scope Group create Scope Group panel set Grid Data scope Group Grid Data FILL true Grid Data FILL false Composite options Group create Options Group panel set Grid Data options Group Grid Data FILL true Grid Data FILL false Grid Data data Grid Data options Group get Layout Data data horizontal Span 2 options Group set Layout Data data return panel  createConfigPanel GridLayout GridLayout numColumns makeColumnsEqualWidth setLayout directionGroup createDirectionGroup setGridData directionGroup GridData GridData scopeGroup createScopeGroup setGridData scopeGroup GridData GridData optionsGroup createOptionsGroup setGridData optionsGroup GridData GridData GridData GridData optionsGroup getLayoutData horizontalSpan optionsGroup setLayoutData
protected Control create Contents Composite parent Composite panel new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 1 layout make Columns Equal Width true panel set Layout layout Composite input Panel create Input Panel panel set Grid Data input Panel Grid Data FILL true Grid Data CENTER false Composite config Panel create Config Panel panel set Grid Data config Panel Grid Data FILL true Grid Data CENTER true Composite button PanelB create Button Section panel set Grid Data button PanelB Grid Data FILL true Grid Data CENTER false Composite status Bar create Status And Close Button panel set Grid Data status Bar Grid Data FILL true Grid Data CENTER false update Button State apply Dialog Font panel Setup content assistants for find and replace combos f Proposal Popup Background Color new Color get Shell get Display new RGB 254 241 233 f Proposal Popup Foreground Color new Color get Shell get Display new RGB 0 0 0 return panel  createContents GridLayout GridLayout numColumns makeColumnsEqualWidth setLayout inputPanel createInputPanel setGridData inputPanel GridData GridData configPanel createConfigPanel setGridData configPanel GridData GridData buttonPanelB createButtonSection setGridData buttonPanelB GridData GridData statusBar createStatusAndCloseButton setGridData statusBar GridData GridData updateButtonState applyDialogFont fProposalPopupBackgroundColor getShell getDisplay fProposalPopupForegroundColor getShell getDisplay
private void set Content Assists Enablement boolean enable if enable if f Find Content Assist Handler null f Find Content Assist Handler Content Assist Handler create Handler For Combo f Find Field create Content Assistant f Replace Content Assist Handler Content Assist Handler create Handler For Combo f Replace Field create Content Assistant f Find Content Assist Handler set Enabled true f Replace Content Assist Handler set Enabled true else if f Find Content Assist Handler null return f Find Content Assist Handler set Enabled false f Replace Content Assist Handler set Enabled false  setContentAssistsEnablement fFindContentAssistHandler fFindContentAssistHandler ContentAssistHandler createHandlerForCombo fFindField createContentAssistant fReplaceContentAssistHandler ContentAssistHandler createHandlerForCombo fReplaceField createContentAssistant fFindContentAssistHandler setEnabled fReplaceContentAssistHandler setEnabled fFindContentAssistHandler fFindContentAssistHandler setEnabled fReplaceContentAssistHandler setEnabled
Creates the direction defining part of the options defining section of the find replace dialog param parent the parent composite return the direction defining part private Composite create Direction Group Composite parent Composite panel new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 panel set Layout layout Group group new Group panel SWT SHADOW ETCHED IN group set Text Editor Messages get String Find Replace Direction NON NLS 1 Grid Layout group Layout new Grid Layout group set Layout group Layout group set Layout Data new Grid Data Grid Data FILL BOTH Selection Listener selection Listener new Selection Listener public void widget Selected Selection Event e if is Incremental Search is Reg Ex Search Available And Checked init Incremental Base Location public void widget Default Selected Selection Event e f Forward Radio Button new Button group SWT RADIO SWT LEFT f Forward Radio Button set Text Editor Messages get String Find Replace Forward Radio Button label NON NLS 1 set Grid Data f Forward Radio Button Grid Data BEGINNING false Grid Data CENTER false f Forward Radio Button add Selection Listener selection Listener Button backward Radio Button new Button group SWT RADIO SWT LEFT backward Radio Button set Text Editor Messages get String Find Replace Backward Radio Button label NON NLS 1 set Grid Data backward Radio Button Grid Data BEGINNING false Grid Data CENTER false backward Radio Button add Selection Listener selection Listener backward Radio Button set Selection f Forward Init f Forward Radio Button set Selection f Forward Init return panel  createDirectionGroup GridLayout GridLayout marginWidth marginHeight setLayout SHADOW_ETCHED_IN setText EditorMessages getString FindReplace GridLayout groupLayout GridLayout setLayout groupLayout setLayoutData GridData GridData FILL_BOTH SelectionListener selectionListener SelectionListener widgetSelected SelectionEvent isIncrementalSearch isRegExSearchAvailableAndChecked initIncrementalBaseLocation widgetDefaultSelected SelectionEvent fForwardRadioButton fForwardRadioButton setText EditorMessages getString FindReplace ForwardRadioButton setGridData fForwardRadioButton GridData GridData fForwardRadioButton addSelectionListener selectionListener backwardRadioButton backwardRadioButton setText EditorMessages getString FindReplace BackwardRadioButton setGridData backwardRadioButton GridData GridData backwardRadioButton addSelectionListener selectionListener backwardRadioButton setSelection fForwardInit fForwardRadioButton setSelection fForwardInit
Creates the scope defining part of the find replace dialog param parent the parent composite return the scope defining part since 2 0 private Composite create Scope Group Composite parent Composite panel new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 panel set Layout layout Group group new Group panel SWT SHADOW ETCHED IN group set Text Editor Messages get String Find Replace Scope NON NLS 1 Grid Layout group Layout new Grid Layout group set Layout group Layout group set Layout Data new Grid Data Grid Data FILL BOTH f Global Radio Button new Button group SWT RADIO SWT LEFT f Global Radio Button set Text Editor Messages get String Find Replace Global Radio Button label NON NLS 1 set Grid Data f Global Radio Button Grid Data BEGINNING false Grid Data CENTER false f Global Radio Button set Selection f Global Init f Global Radio Button add Selection Listener new Selection Listener public void widget Selected Selection Event e if f Global Radio Button get Selection f Use Selected Lines return f Use Selected Lines false use Selected Lines false public void widget Default Selected Selection Event e f Selected Range Radio Button new Button group SWT RADIO SWT LEFT f Selected Range Radio Button set Text Editor Messages get String Find Replace Selected Range Radio Button label NON NLS 1 set Grid Data f Selected Range Radio Button Grid Data BEGINNING false Grid Data CENTER false f Selected Range Radio Button set Selection f Global Init f Use Selected Lines f Global Init f Selected Range Radio Button add Selection Listener new Selection Listener public void widget Selected Selection Event e if f Selected Range Radio Button get Selection f Use Selected Lines return f Use Selected Lines true use Selected Lines true public void widget Default Selected Selection Event e return panel  createScopeGroup GridLayout GridLayout marginWidth marginHeight setLayout SHADOW_ETCHED_IN setText EditorMessages getString FindReplace GridLayout groupLayout GridLayout setLayout groupLayout setLayoutData GridData GridData FILL_BOTH fGlobalRadioButton fGlobalRadioButton setText EditorMessages getString FindReplace GlobalRadioButton setGridData fGlobalRadioButton GridData GridData fGlobalRadioButton setSelection fGlobalInit fGlobalRadioButton addSelectionListener SelectionListener widgetSelected SelectionEvent fGlobalRadioButton getSelection fUseSelectedLines fUseSelectedLines useSelectedLines widgetDefaultSelected SelectionEvent fSelectedRangeRadioButton fSelectedRangeRadioButton setText EditorMessages getString FindReplace SelectedRangeRadioButton setGridData fSelectedRangeRadioButton GridData GridData fSelectedRangeRadioButton setSelection fGlobalInit fUseSelectedLines fGlobalInit fSelectedRangeRadioButton addSelectionListener SelectionListener widgetSelected SelectionEvent fSelectedRangeRadioButton getSelection fUseSelectedLines fUseSelectedLines useSelectedLines widgetDefaultSelected SelectionEvent
Tells the dialog to perform searches only in the scope given by the actually selected lines param selected Lines code true code if selected lines should be used since 2 0 private void use Selected Lines boolean selected Lines if is Incremental Search is Reg Ex Search Available And Checked init Incremental Base Location if f Target null f Target instanceof I Find Replace Target Extension return I Find Replace Target Extension extension Target I Find Replace Target Extension f Target if selected Lines I Region scope if f Old Scope null Point line Selection extension Target get Line Selection scope new Region line Selection x line Selection y else scope f Old Scope f Old Scope null int offset is Forward Search scope get Offset scope get Offset scope get Length extension Target set Selection offset 0 extension Target set Scope scope else f Old Scope extension Target get Scope extension Target set Scope null  selectedLines useSelectedLines selectedLines isIncrementalSearch isRegExSearchAvailableAndChecked initIncrementalBaseLocation fTarget fTarget IFindReplaceTargetExtension IFindReplaceTargetExtension extensionTarget IFindReplaceTargetExtension fTarget selectedLines IRegion fOldScope lineSelection extensionTarget getLineSelection lineSelection lineSelection fOldScope fOldScope isForwardSearch getOffset getOffset getLength extensionTarget setSelection extensionTarget setScope fOldScope extensionTarget getScope extensionTarget setScope
Creates the panel where the user specifies the text to search for and the optional replacement text param parent the parent composite return the input panel private Composite create Input Panel Composite parent Modify Listener listener new Modify Listener public void modify Text Modify Event e update Button State Composite panel new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 panel set Layout layout Label find Label new Label panel SWT LEFT find Label set Text Editor Messages get String Find Replace Find label NON NLS 1 set Grid Data find Label Grid Data BEGINNING false Grid Data CENTER false f Find Field new Combo panel SWT DROP DOWN SWT BORDER set Grid Data f Find Field Grid Data FILL true Grid Data CENTER false f Find Field add Modify Listener f Find Modify Listener f Replace Label new Label panel SWT LEFT f Replace Label set Text Editor Messages get String Find Replace Replace label NON NLS 1 set Grid Data f Replace Label Grid Data BEGINNING false Grid Data CENTER false f Replace Field new Combo panel SWT DROP DOWN SWT BORDER set Grid Data f Replace Field Grid Data FILL true Grid Data CENTER false f Replace Field add Modify Listener listener return panel  createInputPanel ModifyListener ModifyListener modifyText ModifyEvent updateButtonState GridLayout GridLayout numColumns setLayout findLabel findLabel setText EditorMessages getString FindReplace setGridData findLabel GridData GridData fFindField DROP_DOWN setGridData fFindField GridData GridData fFindField addModifyListener fFindModifyListener fReplaceLabel fReplaceLabel setText EditorMessages getString FindReplace setGridData fReplaceLabel GridData GridData fReplaceField DROP_DOWN setGridData fReplaceField GridData GridData fReplaceField addModifyListener
Creates the functional options part of the options defining section of the find replace dialog param parent the parent composite return the options group private Composite create Options Group Composite parent Composite panel new Composite parent SWT NULL Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 panel set Layout layout Group group new Group panel SWT SHADOW NONE group set Text Editor Messages get String Find Replace Options NON NLS 1 Grid Layout group Layout new Grid Layout group Layout num Columns 2 group Layout make Columns Equal Width true group set Layout group Layout group set Layout Data new Grid Data Grid Data FILL BOTH Selection Listener selection Listener new Selection Listener public void widget Selected Selection Event e store Settings public void widget Default Selected Selection Event e f Case Check Box new Button group SWT CHECK SWT LEFT f Case Check Box set Text Editor Messages get String Find Replace Case Check Box label NON NLS 1 set Grid Data f Case Check Box Grid Data BEGINNING false Grid Data CENTER false f Case Check Box set Selection f Case Init f Case Check Box add Selection Listener selection Listener f Wrap Check Box new Button group SWT CHECK SWT LEFT f Wrap Check Box set Text Editor Messages get String Find Replace Wrap Check Box label NON NLS 1 set Grid Data f Wrap Check Box Grid Data BEGINNING false Grid Data CENTER false f Wrap Check Box set Selection f Wrap Init f Wrap Check Box add Selection Listener selection Listener f Whole Word Check Box new Button group SWT CHECK SWT LEFT f Whole Word Check Box set Text Editor Messages get String Find Replace Whole Word Check Box label NON NLS 1 set Grid Data f Whole Word Check Box Grid Data BEGINNING false Grid Data CENTER false f Whole Word Check Box set Selection f Whole Word Init f Whole Word Check Box add Selection Listener selection Listener f Incremental Check Box new Button group SWT CHECK SWT LEFT f Incremental Check Box set Text Editor Messages get String Find Replace Incremental Check Box label NON NLS 1 set Grid Data f Incremental Check Box Grid Data BEGINNING false Grid Data CENTER false f Incremental Check Box set Selection f Incremental Init f Incremental Check Box add Selection Listener new Selection Listener public void widget Selected Selection Event e if is Incremental Search is Reg Ex Search init Incremental Base Location store Settings public void widget Default Selected Selection Event e f Is Reg Ex Check Box new Button group SWT CHECK SWT LEFT f Is Reg Ex Check Box set Text Editor Messages get String Find Replace Reg Ex Checkbox label NON NLS 1 set Grid Data f Is Reg Ex Check Box Grid Data BEGINNING false Grid Data CENTER false Grid Data f Is Reg Ex Check Box get Layout Data horizontal Span 2 f Is Reg Ex Check Box set Selection f Is Reg Ex Init f Is Reg Ex Check Box add Selection Listener new Selection Adapter see org eclipse swt events Selection Adapter widget Selected org eclipse swt events Selection Event public void widget Selected Selection Event e boolean new State f Is Reg Ex Check Box get Selection f Incremental Check Box set Enabled new State update Button State store Settings set Content Assists Enablement new State f Whole Word Check Box set Enabled is Reg Ex Search Available And Checked f Whole Word Check Box add Selection Listener new Selection Adapter see org eclipse swt events Selection Adapter widget Selected org eclipse swt events Selection Event public void widget Selected Selection Event e update Button State f Incremental Check Box set Enabled is Reg Ex Search Available And Checked return panel  createOptionsGroup GridLayout GridLayout marginWidth marginHeight setLayout SHADOW_NONE setText EditorMessages getString FindReplace GridLayout groupLayout GridLayout groupLayout numColumns groupLayout makeColumnsEqualWidth setLayout groupLayout setLayoutData GridData GridData FILL_BOTH SelectionListener selectionListener SelectionListener widgetSelected SelectionEvent storeSettings widgetDefaultSelected SelectionEvent fCaseCheckBox fCaseCheckBox setText EditorMessages getString FindReplace CaseCheckBox setGridData fCaseCheckBox GridData GridData fCaseCheckBox setSelection fCaseInit fCaseCheckBox addSelectionListener selectionListener fWrapCheckBox fWrapCheckBox setText EditorMessages getString FindReplace WrapCheckBox setGridData fWrapCheckBox GridData GridData fWrapCheckBox setSelection fWrapInit fWrapCheckBox addSelectionListener selectionListener fWholeWordCheckBox fWholeWordCheckBox setText EditorMessages getString FindReplace WholeWordCheckBox setGridData fWholeWordCheckBox GridData GridData fWholeWordCheckBox setSelection fWholeWordInit fWholeWordCheckBox addSelectionListener selectionListener fIncrementalCheckBox fIncrementalCheckBox setText EditorMessages getString FindReplace IncrementalCheckBox setGridData fIncrementalCheckBox GridData GridData fIncrementalCheckBox setSelection fIncrementalInit fIncrementalCheckBox addSelectionListener SelectionListener widgetSelected SelectionEvent isIncrementalSearch isRegExSearch initIncrementalBaseLocation storeSettings widgetDefaultSelected SelectionEvent fIsRegExCheckBox fIsRegExCheckBox setText EditorMessages getString FindReplace RegExCheckbox setGridData fIsRegExCheckBox GridData GridData GridData fIsRegExCheckBox getLayoutData horizontalSpan fIsRegExCheckBox setSelection fIsRegExInit fIsRegExCheckBox addSelectionListener SelectionAdapter SelectionAdapter widgetSelected SelectionEvent widgetSelected SelectionEvent newState fIsRegExCheckBox getSelection fIncrementalCheckBox setEnabled newState updateButtonState storeSettings setContentAssistsEnablement newState fWholeWordCheckBox setEnabled isRegExSearchAvailableAndChecked fWholeWordCheckBox addSelectionListener SelectionAdapter SelectionAdapter widgetSelected SelectionEvent widgetSelected SelectionEvent updateButtonState fIncrementalCheckBox setEnabled isRegExSearchAvailableAndChecked
Creates the status and close section of the dialog param parent the parent composite return the status and close button private Composite create Status And Close Button Composite parent Composite panel new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width 0 layout margin Height 0 panel set Layout layout f Status Label new Label panel SWT LEFT set Grid Data f Status Label Grid Data FILL true Grid Data CENTER false String label Editor Messages get String Find Replace Close Button label NON NLS 1 Button close Button create Button panel 101 label false set Grid Data close Button Grid Data END false Grid Data END false return panel  createStatusAndCloseButton GridLayout GridLayout numColumns marginWidth marginHeight setLayout fStatusLabel setGridData fStatusLabel GridData GridData EditorMessages getString FindReplace CloseButton closeButton createButton setGridData closeButton GridData GridData
see Dialog button Pressed protected void button Pressed int buttonID if buttonID 101 close  buttonPressed buttonPressed
Returns the position of the specified search string or code 1 code if the string can not be found when searching using the given options param find String the string to search for param start Position the position at which to start the search param forward Search the direction of the search param case Sensitiveshould the search be case sensitive param wrap Searchshould the search wrap to the start end if arrived at the end start param whole Word does the search string represent a complete word param reg Ex Search if code true code find String represents a regular expression return the occurrence of the find string following the options or code 1 code if nothing found since 3 0 private int find Index String find String int start Position boolean forward Search boolean case Sensitive boolean wrap Search boolean whole Word boolean reg Ex Search if forward Search if wrap Search int index find And Select start Position find String true case Sensitive whole Word reg Ex Search if index 1 if ok To Use get Shell is Incremental Search get Shell get Display beep index find And Select 1 find String true case Sensitive whole Word reg Ex Search return index return find And Select start Position find String true case Sensitive whole Word reg Ex Search backward if wrap Search int index find And Select start Position 1 find String false case Sensitive whole Word reg Ex Search if index 1 if ok To Use get Shell is Incremental Search get Shell get Display beep index find And Select 1 find String false case Sensitive whole Word reg Ex Search return index return find And Select start Position 1 find String false case Sensitive whole Word reg Ex Search  findString startPosition forwardSearch caseSensitiveshould wrapSearchshould wholeWord regExSearch findString findIndex findString startPosition forwardSearch caseSensitive wrapSearch wholeWord regExSearch forwardSearch wrapSearch findAndSelect startPosition findString caseSensitive wholeWord regExSearch okToUse getShell isIncrementalSearch getShell getDisplay findAndSelect findString caseSensitive wholeWord regExSearch findAndSelect startPosition findString caseSensitive wholeWord regExSearch wrapSearch findAndSelect startPosition findString caseSensitive wholeWord regExSearch okToUse getShell isIncrementalSearch getShell getDisplay findAndSelect findString caseSensitive wholeWord regExSearch findAndSelect startPosition findString caseSensitive wholeWord regExSearch
Searches for a string starting at the given offset and using the specified search directives If a string has been found it is selected and its start offset is returned param offset the offset at which searching starts param find String the string which should be found param forward Search the direction of the search param case Sensitive code true code performs a case sensitive search code false code an insensitive search param whole Word if code true code only occurrences are reported in which the find String stands as a word by itself param reg Ex Search if code true code find String represents a regular expression return the position of the specified string or 1 if the string has not been found since 3 0 private int find And Select int offset String find String boolean forward Search boolean case Sensitive boolean whole Word boolean reg Ex Search if f Target instanceof I Find Replace Target Extension3 return I Find Replace Target Extension3 f Target find And Select offset find String forward Search case Sensitive whole Word reg Ex Search else return f Target find And Select offset find String forward Search case Sensitive whole Word  findString forwardSearch caseSensitive wholeWord findString regExSearch findString findAndSelect findString forwardSearch caseSensitive wholeWord regExSearch fTarget IFindReplaceTargetExtension3 IFindReplaceTargetExtension3 fTarget findAndSelect findString forwardSearch caseSensitive wholeWord regExSearch fTarget findAndSelect findString forwardSearch caseSensitive wholeWord
Replaces the selection with code replace String code If code reg Ex Replace code is code true code code replace String code is a regex replace pattern which will get expanded if the underlying target supports it Returns the region of the inserted text note that the returned selection covers the expanded pattern in case of regex replace param replace String the replace string or a regex pattern param reg Ex Replace code true code if code replace String code is a pattern return the selection after replacing i e the inserted text since 3 0 Point replace Selection String replace String boolean reg Ex Replace if f Target instanceof I Find Replace Target Extension3 I Find Replace Target Extension3 f Target replace Selection replace String reg Ex Replace else f Target replace Selection replace String return f Target get Selection  replaceString regExReplace replaceString replaceString regExReplace replaceString replaceSelection replaceString regExReplace fTarget IFindReplaceTargetExtension3 IFindReplaceTargetExtension3 fTarget replaceSelection replaceString regExReplace fTarget replaceSelection replaceString fTarget getSelection
Returns whether the specified search string can be found using the given options param find String the string to search for param forward Search the direction of the search param case Sensitiveshould the search be case sensitive param wrap Searchshould the search wrap to the start end if arrived at the end start param whole Word does the search string represent a complete word param incremental is this an incremental search param reg Ex Search if code true code find String represents a regular expression return code true code if the search string can be found using the given options since 3 0 private boolean find Next String find String boolean forward Search boolean case Sensitive boolean wrap Search boolean whole Word boolean incremental boolean reg Ex Search if f Target null return false Point r null if incremental r f Incremental Base Location else r f Target get Selection int find Replace Position r x if forward Search f Needs Initial Find Before Replace forward Search f Needs Initial Find Before Replace find Replace Position r y f Needs Initial Find Before Replace false int index find Index find String find Replace Position forward Search case Sensitive wrap Search whole Word reg Ex Search if index 1 return true return false  findString forwardSearch caseSensitiveshould wrapSearchshould wholeWord regExSearch findString findNext findString forwardSearch caseSensitive wrapSearch wholeWord regExSearch fTarget fIncrementalBaseLocation fTarget getSelection findReplacePosition forwardSearch fNeedsInitialFindBeforeReplace forwardSearch fNeedsInitialFindBeforeReplace findReplacePosition fNeedsInitialFindBeforeReplace findIndex findString findReplacePosition forwardSearch caseSensitive wrapSearch wholeWord regExSearch
Returns the dialog s boundaries return the dialog s boundaries private Rectangle get Dialog Boundaries if ok To Use get Shell return get Shell get Bounds else return f Dialog Position Init  getDialogBoundaries okToUse getShell getShell getBounds fDialogPositionInit
Returns the dialog s history return the dialog s history private List get Find History return f Find History  getFindHistory fFindHistory
Retrieves the string to search for from the appropriate text input field and returns it return the search string private String get Find String if ok To Use f Find Field return f Find Field get Text return NON NLS 1  getFindString okToUse fFindField fFindField getText
Returns the dialog s replace history return the dialog s replace history private List get Replace History return f Replace History  getReplaceHistory fReplaceHistory
Retrieves the replacement string from the appropriate text input field and returns it return the replacement string private String get Replace String if ok To Use f Replace Field return f Replace Field get Text return NON NLS 1  getReplaceString okToUse fReplaceField fReplaceField getText
Returns the actual selection of the find replace target return the selection of the target private String get Selection String String selection f Target get Selection Text if selection null selection length 0 int info Text Utilities index Of Text Utilities DELIMITERS selection 0 if info 0 0 return selection substring 0 info 0 else if info 0 1 return selection return null  getSelectionString fTarget getSelectionText TextUtilities indexOf TextUtilities
see org eclipse jface window Window close public boolean close handle Dialog Close return super close  handleDialogClose
Removes focus changed listener from browser and stores settings for re open private void handle Dialog Close remove listeners if ok To Use f Find Field f Find Field remove Modify Listener f Find Modify Listener if f Parent Shell null f Parent Shell remove Shell Listener f Activation Listener f Parent Shell null get Shell remove Shell Listener f Activation Listener store current settings in case of re open store Settings if f Target null f Target instanceof I Find Replace Target Extension I Find Replace Target Extension f Target end Session set Content Assists Enablement false f Find Content Assist Handler null f Replace Content Assist Handler null f Proposal Popup Background Color dispose f Proposal Popup Foreground Color dispose prevent leaks f Active Shell null f Target null  handleDialogClose okToUse fFindField fFindField removeModifyListener fFindModifyListener fParentShell fParentShell removeShellListener fActivationListener fParentShell getShell removeShellListener fActivationListener storeSettings fTarget fTarget IFindReplaceTargetExtension IFindReplaceTargetExtension fTarget endSession setContentAssistsEnablement fFindContentAssistHandler fReplaceContentAssistHandler fProposalPopupBackgroundColor fProposalPopupForegroundColor fActiveShell fTarget
Writes the current selection to the dialog settings since 3 0 private void write Selection if f Target null return String selection f Target get Selection Text if selection null selection NON NLS 1 I Dialog Settings s get Dialog Settings s put selection selection NON NLS 1  writeSelection fTarget fTarget getSelectionText IDialogSettings getDialogSettings
Stores the current state in the dialog settings since 2 0 private void store Settings f Dialog Position Init get Dialog Boundaries f Wrap Init is Wrap Search f Whole Word Init is Whole Word Setting f Case Init is Case Sensitive Search f Is Reg Ex Init is Reg Ex Search f Incremental Init is Incremental Search f Forward Init is Forward Search write Configuration  storeSettings fDialogPositionInit getDialogBoundaries fWrapInit isWrapSearch fWholeWordInit isWholeWordSetting fCaseInit isCaseSensitiveSearch fIsRegExInit isRegExSearch fIncrementalInit isIncrementalSearch fForwardInit isForwardSearch writeConfiguration
Initializes the string to search for and the appropriate text inout field based on the selection found in the action s target private void init Find String From Selection if f Target null ok To Use f Find Field String selection get Selection String f Find Field remove Modify Listener f Find Modify Listener if selection null f Find Field set Text selection if selection equals f Target get Selection Text use Selected Lines true f Global Radio Button set Selection false f Selected Range Radio Button set Selection true f Use Selected Lines true else if equals f Find Field get Text NON NLS 1 if f Find History size 0 f Find Field set Text String f Find History get 0 else f Find Field set Text NON NLS 1 f Find Field set Selection new Point 0 f Find Field get Text length f Find Field add Modify Listener f Find Modify Listener  initFindStringFromSelection fTarget okToUse fFindField getSelectionString fFindField removeModifyListener fFindModifyListener fFindField setText fTarget getSelectionText useSelectedLines fGlobalRadioButton setSelection fSelectedRangeRadioButton setSelection fUseSelectedLines fFindField getText fFindHistory fFindField setText fFindHistory fFindField setText fFindField setSelection fFindField getText fFindField addModifyListener fFindModifyListener
Initializes the anchor used as starting point for incremental searching since 2 0 private void init Incremental Base Location if f Target null is Incremental Search is Reg Ex Search Available And Checked f Incremental Base Location f Target get Selection else f Incremental Base Location new Point 0 0  initIncrementalBaseLocation fTarget isIncrementalSearch isRegExSearchAvailableAndChecked fIncrementalBaseLocation fTarget getSelection fIncrementalBaseLocation
Retrieves and returns the option case sensitivity from the appropriate check box return code true code if case sensitive private boolean is Case Sensitive Search if ok To Use f Case Check Box return f Case Check Box get Selection return f Case Init  isCaseSensitiveSearch okToUse fCaseCheckBox fCaseCheckBox getSelection fCaseInit
Retrieves and returns the reg Ex option from the appropriate check box return code true code if case sensitive since 3 0 private boolean is Reg Ex Search if ok To Use f Is Reg Ex Check Box return f Is Reg Ex Check Box get Selection return f Is Reg Ex Init  regEx isRegExSearch okToUse fIsRegExCheckBox fIsRegExCheckBox getSelection fIsRegExInit
If the target supports regular expressions search retrieves and returns reg Ex option from appropriate check box return code true code if reg Ex is available and checked since 3 0 private boolean is Reg Ex Search Available And Checked if ok To Use f Is Reg Ex Check Box return f Is Target Supporting Reg Ex f Is Reg Ex Check Box get Selection return f Is Reg Ex Init  regEx regEx isRegExSearchAvailableAndChecked okToUse fIsRegExCheckBox fIsTargetSupportingRegEx fIsRegExCheckBox getSelection fIsRegExInit
Retrieves and returns the option search direction from the appropriate check box return code true code if searching forward private boolean is Forward Search if ok To Use f Forward Radio Button return f Forward Radio Button get Selection return f Forward Init  isForwardSearch okToUse fForwardRadioButton fForwardRadioButton getSelection fForwardInit
Retrieves and returns the option search whole words from the appropriate check box return code true code if searching for whole words private boolean is Whole Word Setting if ok To Use f Whole Word Check Box return f Whole Word Check Box get Selection return f Whole Word Init  isWholeWordSetting okToUse fWholeWordCheckBox fWholeWordCheckBox getSelection fWholeWordInit
Returns code true code if searching should be restricted to entire words code false code if not This is the case if the respective checkbox is turned on regex is off and the checkbox is enabled i e the current find string is an entire word return code true code if the search is restricted to whole words private boolean is Whole Word Search return is Whole Word Setting is Reg Ex Search Available And Checked ok To Use f Whole Word Check Box f Whole Word Check Box is Enabled true  isWholeWordSearch isWholeWordSetting isRegExSearchAvailableAndChecked okToUse fWholeWordCheckBox fWholeWordCheckBox isEnabled
Retrieves and returns the option wrap search from the appropriate check box return code true code if wrapping while searching private boolean is Wrap Search if ok To Use f Wrap Check Box return f Wrap Check Box get Selection return f Wrap Init  isWrapSearch okToUse fWrapCheckBox fWrapCheckBox getSelection fWrapInit
Retrieves and returns the option incremental search from the appropriate check box return code true code if incremental search since 2 0 private boolean is Incremental Search if ok To Use f Incremental Check Box return f Incremental Check Box get Selection return f Incremental Init  isIncrementalSearch okToUse fIncrementalCheckBox fIncrementalCheckBox getSelection fIncrementalInit
Creates a button param parent the parent control param key the key to lookup the button label param id the button id param dflt Button is this button the default button param listener a button pressed listener return the new button private Button make Button Composite parent String key int id boolean dflt Button Selection Listener listener String label Editor Messages get String key Button b create Button parent id label dflt Button b add Selection Listener listener return b  dfltButton makeButton dfltButton SelectionListener EditorMessages getString createButton dfltButton addSelectionListener
Returns the status line manager of the active editor or code null code if there is no such editor return the status line manager of the active editor private I Editor Status Line get Status Line Manager I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null return null I Workbench Page page window get Active Page if page null return null I Editor Part editor page get Active Editor if editor null return null return I Editor Status Line editor get Adapter I Editor Status Line class  IEditorStatusLine getStatusLineManager IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IWorkbenchPage getActivePage IEditorPart getActiveEditor IEditorStatusLine getAdapter IEditorStatusLine
Sets the given status message in the status line param error code true code if it is an error param message the error message private void status Message boolean error String message f Status Label set Text message if error f Status Label set Foreground J Face Colors get Error Text f Status Label get Display else f Status Label set Foreground null I Editor Status Line status Line get Status Line Manager if status Line null status Line set Message error message null if error get Shell get Display beep  statusMessage fStatusLabel setText fStatusLabel setForeground JFaceColors getErrorText fStatusLabel getDisplay fStatusLabel setForeground IEditorStatusLine statusLine getStatusLineManager statusLine statusLine setMessage getShell getDisplay
Sets the given error message in the status line param message the message private void status Error String message status Message true message  statusError statusMessage
Sets the given message in the status line param message the message private void status Message String message status Message false message  statusMessage statusMessage
class Replace All Runnable implements Runnable public int number Of Occurrences public void run number Of Occurrences replace All find String replace String null replace String is Forward Search is Case Sensitive Search is Wrap Search is Whole Word Search is Reg Ex Search Available And Checked NON NLS 1  ReplaceAllRunnable numberOfOccurrences numberOfOccurrences replaceAll findString replaceString replaceString isForwardSearch isCaseSensitiveSearch isWrapSearch isWholeWordSearch isRegExSearchAvailableAndChecked
Replaces all occurrences of the user s find String with the replace string Indicate to the user the number of replacements that occur private void perform Replace All int replace Count 0 final String replace String get Replace String final String find String get Find String if find String null find String length 0 class Replace All Runnable implements Runnable public int number Of Occurrences public void run number Of Occurrences replace All find String replace String null replace String is Forward Search is Case Sensitive Search is Wrap Search is Whole Word Search is Reg Ex Search Available And Checked NON NLS 1 try Replace All Runnable runnable new Replace All Runnable Busy Indicator show While f Active Shell get Display runnable replace Count runnable number Of Occurrences if replace Count 0 if replace Count 1 not plural status Message Editor Messages get String Find Replace Status replacement label NON NLS 1 else String msg Editor Messages get String Find Replace Status replacements label NON NLS 1 msg Message Format format msg new Object String value Of replace Count status Message msg else status Message Editor Messages get String Find Replace Status no Match label NON NLS 1 catch Pattern Syntax Exception ex status Error ex get Localized Message catch Illegal State Exception ex we don t keep state in this dialog write Selection update Button State  findString performReplaceAll replaceCount replaceString getReplaceString findString getFindString findString findString ReplaceAllRunnable numberOfOccurrences numberOfOccurrences replaceAll findString replaceString replaceString isForwardSearch isCaseSensitiveSearch isWrapSearch isWholeWordSearch isRegExSearchAvailableAndChecked ReplaceAllRunnable ReplaceAllRunnable BusyIndicator showWhile fActiveShell getDisplay replaceCount numberOfOccurrences replaceCount replaceCount statusMessage EditorMessages getString FindReplace EditorMessages getString FindReplace MessageFormat valueOf replaceCount statusMessage statusMessage EditorMessages getString FindReplace noMatch PatternSyntaxException statusError getLocalizedMessage IllegalStateException writeSelection updateButtonState
Validates the state of the find replace target return code true code if target can be changed code false code otherwise since 2 1 private boolean validate Target State if f Target instanceof I Find Replace Target Extension2 I Find Replace Target Extension2 extension I Find Replace Target Extension2 f Target if extension validate Target State status Error Editor Messages get String Find Replace Dialog read only NON NLS 1 update Button State return false return is Editable  validateTargetState fTarget IFindReplaceTargetExtension2 IFindReplaceTargetExtension2 IFindReplaceTargetExtension2 fTarget validateTargetState statusError EditorMessages getString FindReplaceDialog read_only updateButtonState isEditable
Replaces the current selection of the target with the user s replace string return code true code if the operation was successful private boolean perform Replace Selection if validate Target State return false String replace String get Replace String if replace String null replace String NON NLS 1 boolean replaced try replace Selection replace String is Reg Ex Search Available And Checked replaced true write Selection catch Pattern Syntax Exception ex status Error ex get Localized Message replaced false catch Illegal State Exception ex replaced false update Button State return replaced  performReplaceSelection validateTargetState replaceString getReplaceString replaceString replaceString replaceSelection replaceString isRegExSearchAvailableAndChecked writeSelection PatternSyntaxException statusError getLocalizedMessage IllegalStateException updateButtonState
Locates the user s find String in the text of the target private void perform Search perform Search is Incremental Search is Reg Ex Search Available And Checked  findString performSearch performSearch isIncrementalSearch isRegExSearchAvailableAndChecked
Locates the user s find String in the text of the target param must Init Incremental Base Location code true code if base location must be initialized since 3 0 private void perform Search boolean must Init Incremental Base Location if must Init Incremental Base Location init Incremental Base Location String find String get Find String if find String null find String length 0 try boolean something Found find Next find String is Forward Search is Case Sensitive Search is Wrap Search is Whole Word Search is Incremental Search is Reg Ex Search Available And Checked is Reg Ex Search Available And Checked if something Found status Message NON NLS 1 else status Message Editor Messages get String Find Replace Status no Match label NON NLS 1 catch Pattern Syntax Exception ex status Error ex get Localized Message catch Illegal State Exception ex we don t keep state in this dialog write Selection update Button State  findString mustInitIncrementalBaseLocation performSearch mustInitIncrementalBaseLocation mustInitIncrementalBaseLocation initIncrementalBaseLocation findString getFindString findString findString somethingFound findNext findString isForwardSearch isCaseSensitiveSearch isWrapSearch isWholeWordSearch isIncrementalSearch isRegExSearchAvailableAndChecked isRegExSearchAvailableAndChecked somethingFound statusMessage statusMessage EditorMessages getString FindReplace noMatch PatternSyntaxException statusError getLocalizedMessage IllegalStateException writeSelection updateButtonState
Replaces all occurrences of the user s find String with the replace string Returns the number of replacements that occur param find String the string to search for param replace String the replacement string param forward Searchthe search direction param case Sensitive should the search be case sensitive param wrap Searchshould search wrap to start end if end start is reached param whole Word does the search string represent a complete word param reg Ex Search if code true code find String represents a regular expression return the number of occurrences since 3 0 private int replace All String find String String replace String boolean forward Search boolean case Sensitive boolean wrap Search boolean whole Word boolean reg Ex Search int replace Count 0 int find Replace Position 0 if wrap Search search the whole text find Replace Position 0 forward Search true else if f Target get Selection Text null the cursor is set to the end or beginning of the selected text Point selection f Target get Selection find Replace Position selection x if validate Target State return replace Count if f Target instanceof I Find Replace Target Extension I Find Replace Target Extension f Target set Replace All Mode true try int index 0 while index 1 index find And Select find Replace Position find String forward Search case Sensitive whole Word reg Ex Search if index 1 substring not contained from current position Point selection replace Selection replace String reg Ex Search replace Count if forward Search find Replace Position selection x selection y else find Replace Position selection x 1 if find Replace Position 1 break finally if f Target instanceof I Find Replace Target Extension I Find Replace Target Extension f Target set Replace All Mode false return replace Count  findString findString replaceString forwardSearchthe caseSensitive wrapSearchshould wholeWord regExSearch findString replaceAll findString replaceString forwardSearch caseSensitive wrapSearch wholeWord regExSearch replaceCount findReplacePosition wrapSearch findReplacePosition forwardSearch fTarget getSelectionText fTarget getSelection findReplacePosition validateTargetState replaceCount fTarget IFindReplaceTargetExtension IFindReplaceTargetExtension fTarget setReplaceAllMode findAndSelect findReplacePosition findString forwardSearch caseSensitive wholeWord regExSearch replaceSelection replaceString regExSearch replaceCount forwardSearch findReplacePosition findReplacePosition findReplacePosition fTarget IFindReplaceTargetExtension IFindReplaceTargetExtension fTarget setReplaceAllMode replaceCount
Attaches the given layout specification to the code component code param component the component param horizontal Alignment horizontal alignment param grab Excess Horizontal Space grab excess horizontal space param vertical Alignment vertical alignment param grab Excess Vertical Space grab excess vertical space private void set Grid Data Control component int horizontal Alignment boolean grab Excess Horizontal Space int vertical Alignment boolean grab Excess Vertical Space Grid Data gd new Grid Data gd horizontal Alignment horizontal Alignment gd grab Excess Horizontal Space grab Excess Horizontal Space gd vertical Alignment vertical Alignment gd grab Excess Vertical Space grab Excess Vertical Space component set Layout Data gd  horizontalAlignment grabExcessHorizontalSpace verticalAlignment grabExcessVerticalSpace setGridData horizontalAlignment grabExcessHorizontalSpace verticalAlignment grabExcessVerticalSpace GridData GridData horizontalAlignment horizontalAlignment grabExcessHorizontalSpace grabExcessHorizontalSpace verticalAlignment verticalAlignment grabExcessVerticalSpace grabExcessVerticalSpace setLayoutData
Updates the enabled state of the buttons private void update Button State update Button State false  updateButtonState updateButtonState
Updates the enabled state of the buttons param disable Replace code true code if replace button must be disabled since 3 0 private void update Button State boolean disable Replace if ok To Use get Shell ok To Use f Find Next Button String selected Text null if f Target null selected Text f Target get Selection Text boolean selection selected Text null selected Text length 0 boolean enable f Target null f Active Shell f Parent Shell f Active Shell get Shell String str get Find String boolean find String str null str length 0 boolean whole Word is Word str is Reg Ex Search Available And Checked f Whole Word Check Box set Enabled whole Word f Find Next Button set Enabled enable find String f Replace Selection Button set Enabled disable Replace enable is Editable selection f Needs Initial Find Before Replace is Reg Ex Search Available And Checked f Replace Find Button set Enabled disable Replace enable is Editable find String selection f Needs Initial Find Before Replace is Reg Ex Search Available And Checked f Replace All Button set Enabled enable is Editable find String  disableReplace updateButtonState disableReplace okToUse getShell okToUse fFindNextButton selectedText fTarget selectedText fTarget getSelectionText selectedText selectedText fTarget fActiveShell fParentShell fActiveShell getShell getFindString findString wholeWord isWord isRegExSearchAvailableAndChecked fWholeWordCheckBox setEnabled wholeWord fFindNextButton setEnabled findString fReplaceSelectionButton setEnabled disableReplace isEditable fNeedsInitialFindBeforeReplace isRegExSearchAvailableAndChecked fReplaceFindButton setEnabled disableReplace isEditable findString fNeedsInitialFindBeforeReplace isRegExSearchAvailableAndChecked fReplaceAllButton setEnabled isEditable findString
Tests whether each character in the given string is a letter param str return code true code if the given string is a word since 3 0 private boolean is Word String str if str null str length 0 return false for int i 0 i str length i if Character is Java Identifier Part str char At i return false return true  isWord isJavaIdentifierPart charAt
Updates the given combo with the given content param combo combo to be updated param content to be put into the combo private void update Combo Combo combo List content combo remove All for int i 0 i content size i combo add content get i to String  updateCombo removeAll toString
Called after executed find replace action to update the history private void update Find And Replace History update Find History if ok To Use f Replace Field update History f Replace Field f Replace History  updateFindAndReplaceHistory updateFindHistory okToUse fReplaceField updateHistory fReplaceField fReplaceHistory
Called after executed find action to update the history private void update Find History if ok To Use f Find Field f Find Field remove Modify Listener f Find Modify Listener update History f Find Field f Find History f Find Field add Modify Listener f Find Modify Listener  updateFindHistory okToUse fFindField fFindField removeModifyListener fFindModifyListener updateHistory fFindField fFindHistory fFindField addModifyListener fFindModifyListener
Updates the combo with the history param combo to be updated param history to be put into the combo private void update History Combo combo List history String find String combo get Text int index history index Of find String if index 0 if index 1 history remove index history add 0 find String update Combo combo history combo set Text find String  updateHistory findString getText indexOf findString findString updateCombo setText findString
Returns whether the target is editable return code true code if target is editable private boolean is Editable boolean is Editable f Target null false f Target is Editable return f Is Target Editable is Editable  isEditable isEditable fTarget fTarget isEditable fIsTargetEditable isEditable
Updates this dialog because of a different target param target the new target param is Target Editable code true code if the new target can be modifed since 2 0 public void update Target I Find Replace Target target boolean is Target Editable f Is Target Editable is Target Editable f Needs Initial Find Before Replace true if target f Target if f Target null f Target instanceof I Find Replace Target Extension I Find Replace Target Extension f Target end Session f Target target if target null f Is Target Supporting Reg Ex target instanceof I Find Replace Target Extension3 if f Target null f Target instanceof I Find Replace Target Extension I Find Replace Target Extension f Target begin Session f Global Init true f Global Radio Button set Selection f Global Init f Selected Range Radio Button set Selection f Global Init f Use Selected Lines f Global Init if ok To Use f Is Reg Ex Check Box f Is Reg Ex Check Box set Enabled f Is Target Supporting Reg Ex if ok To Use f Whole Word Check Box f Whole Word Check Box set Enabled is Reg Ex Search Available And Checked if ok To Use f Incremental Check Box f Incremental Check Box set Enabled is Reg Ex Search Available And Checked if ok To Use f Replace Label f Replace Label set Enabled is Editable f Replace Field set Enabled is Editable init Find String From Selection init Incremental Base Location update Button State see pr 51073 f Give Focus To Find Field true set Content Assists Enablement is Reg Ex Search Available And Checked  isTargetEditable updateTarget IFindReplaceTarget isTargetEditable fIsTargetEditable isTargetEditable fNeedsInitialFindBeforeReplace fTarget fTarget fTarget IFindReplaceTargetExtension IFindReplaceTargetExtension fTarget endSession fTarget fIsTargetSupportingRegEx IFindReplaceTargetExtension3 fTarget fTarget IFindReplaceTargetExtension IFindReplaceTargetExtension fTarget beginSession fGlobalInit fGlobalRadioButton setSelection fGlobalInit fSelectedRangeRadioButton setSelection fGlobalInit fUseSelectedLines fGlobalInit okToUse fIsRegExCheckBox fIsRegExCheckBox setEnabled fIsTargetSupportingRegEx okToUse fWholeWordCheckBox fWholeWordCheckBox setEnabled isRegExSearchAvailableAndChecked okToUse fIncrementalCheckBox fIncrementalCheckBox setEnabled isRegExSearchAvailableAndChecked okToUse fReplaceLabel fReplaceLabel setEnabled isEditable fReplaceField setEnabled isEditable initFindStringFromSelection initIncrementalBaseLocation updateButtonState fGiveFocusToFindField setContentAssistsEnablement isRegExSearchAvailableAndChecked
Sets the parent shell of this dialog to be the given shell param shell the new parent shell public void set Parent Shell Shell shell if shell f Parent Shell if f Parent Shell null f Parent Shell remove Shell Listener f Activation Listener f Parent Shell shell f Parent Shell add Shell Listener f Activation Listener f Active Shell shell  setParentShell fParentShell fParentShell fParentShell removeShellListener fActivationListener fParentShell fParentShell addShellListener fActivationListener fActiveShell
Returns the dialog settings object used to share state between several find replace dialogs return the dialog settings to be used private I Dialog Settings get Dialog Settings I Dialog Settings settings Text Editor Plugin get Default get Dialog Settings f Dialog Settings settings get Section get Class get Name if f Dialog Settings null f Dialog Settings settings add New Section get Class get Name return f Dialog Settings  IDialogSettings getDialogSettings IDialogSettings TextEditorPlugin getDefault getDialogSettings fDialogSettings getSection getClass getName fDialogSettings fDialogSettings addNewSection getClass getName fDialogSettings
Initializes itself from the dialog settings with the same state as at the previous invocation private void read Configuration I Dialog Settings s get Dialog Settings try int x s get Int x NON NLS 1 int y s get Int y NON NLS 1 f Location new Point x y catch Number Format Exception e f Location null f Wrap Init s get Boolean wrap NON NLS 1 f Case Init s get Boolean casesensitive NON NLS 1 f Whole Word Init s get Boolean wholeword NON NLS 1 f Incremental Init s get Boolean incremental NON NLS 1 f Is Reg Ex Init s get Boolean is Reg Ex NON NLS 1 String find History s get Array findhistory NON NLS 1 if find History null List history get Find History history clear for int i 0 i find History length i history add find History i String replace History s get Array replacehistory NON NLS 1 if replace History null List history get Replace History history clear for int i 0 i replace History length i history add replace History i  readConfiguration IDialogSettings getDialogSettings getInt getInt fLocation NumberFormatException fLocation fWrapInit getBoolean fCaseInit getBoolean fWholeWordInit getBoolean fIncrementalInit getBoolean fIsRegExInit getBoolean isRegEx findHistory getArray findHistory getFindHistory findHistory findHistory replaceHistory getArray replaceHistory getReplaceHistory replaceHistory replaceHistory
Stores its current configuration in the dialog store private void write Configuration I Dialog Settings s get Dialog Settings Point location get Shell get Location s put x location x NON NLS 1 s put y location y NON NLS 1 s put wrap f Wrap Init NON NLS 1 s put casesensitive f Case Init NON NLS 1 s put wholeword f Whole Word Init NON NLS 1 s put incremental f Incremental Init NON NLS 1 s put is Reg Ex f Is Reg Ex Init NON NLS 1 List history get Find History while history size 8 history remove 8 String names new String history size history to Array names s put findhistory names NON NLS 1 history get Replace History while history size 8 history remove 8 names new String history size history to Array names s put replacehistory names NON NLS 1  writeConfiguration IDialogSettings getDialogSettings getShell getLocation fWrapInit fCaseInit fWholeWordInit fIncrementalInit isRegEx fIsRegExInit getFindHistory toArray getReplaceHistory toArray
see org eclipse jface text I Information Control Creator create Information Control org eclipse swt widgets Shell public I Information Control create Information Control Shell parent return new Default Information Control parent  IInformationControlCreator createInformationControl IInformationControl createInformationControl DefaultInformationControl
Create a new regex content assistant return a new configured content assistant since 3 0 private Subject Control Content Assistant create Content Assistant final Subject Control Content Assistant content Assistant new Subject Control Content Assistant content Assistant set Restore Completion Proposal Size get Settings Find Replace Dialog completion proposal size NON NLS 1 I Content Assist Processor processor new Reg Ex Content Assist Processor content Assistant set Content Assist Processor processor I Document DEFAULT CONTENT TYPE content Assistant enable Auto Activation is Reg Ex Search Available And Checked content Assistant set Proposal Selector Background f Proposal Popup Background Color content Assistant set Proposal Selector Foreground f Proposal Popup Foreground Color content Assistant set Context Information Popup Orientation I Content Assistant CONTEXT INFO ABOVE content Assistant set Information Control Creator new I Information Control Creator see org eclipse jface text I Information Control Creator create Information Control org eclipse swt widgets Shell public I Information Control create Information Control Shell parent return new Default Information Control parent return content Assistant  SubjectControlContentAssistant createContentAssistant SubjectControlContentAssistant contentAssistant SubjectControlContentAssistant contentAssistant setRestoreCompletionProposalSize getSettings FindReplaceDialog completion_proposal_size IContentAssistProcessor RegExContentAssistProcessor contentAssistant setContentAssistProcessor IDocument DEFAULT_CONTENT_TYPE contentAssistant enableAutoActivation isRegExSearchAvailableAndChecked contentAssistant setProposalSelectorBackground fProposalPopupBackgroundColor contentAssistant setProposalSelectorForeground fProposalPopupForegroundColor contentAssistant setContextInformationPopupOrientation IContentAssistant CONTEXT_INFO_ABOVE contentAssistant setInformationControlCreator IInformationControlCreator IInformationControlCreator createInformationControl IInformationControl createInformationControl DefaultInformationControl contentAssistant
private I Dialog Settings get Settings String section Name I Dialog Settings plugin Dialog Settings Text Editor Plugin get Default get Dialog Settings I Dialog Settings settings plugin Dialog Settings get Section section Name if settings null settings plugin Dialog Settings add New Section section Name return settings  IDialogSettings getSettings sectionName IDialogSettings pluginDialogSettings TextEditorPlugin getDefault getDialogSettings IDialogSettings pluginDialogSettings getSection sectionName pluginDialogSettings addNewSection sectionName

Creates a new find replace target param editor the editor param target the wrapped find replace target public Find Replace Target Abstract Text Editor editor I Find Replace Target target f Editor editor f Target target  FindReplaceTarget AbstractTextEditor IFindReplaceTarget fEditor fTarget
Returns the wrapped find replace target return the wrapped find replace target private I Find Replace Target get Target return f Target  IFindReplaceTarget getTarget fTarget
Returns the find replace target extension return the find replace target extension private I Find Replace Target Extension get Extension if f Target instanceof I Find Replace Target Extension return I Find Replace Target Extension f Target return null  IFindReplaceTargetExtension getExtension fTarget IFindReplaceTargetExtension IFindReplaceTargetExtension fTarget
public boolean can Perform Find if get Target null return get Target can Perform Find return false  canPerformFind getTarget getTarget canPerformFind
public int find And Select int offset String find String boolean search Forward boolean case Sensitive boolean whole Word if get Target null return get Target find And Select offset find String search Forward case Sensitive whole Word return 1  findAndSelect findString searchForward caseSensitive wholeWord getTarget getTarget findAndSelect findString searchForward caseSensitive wholeWord
public int find And Select int offset String find String boolean search Forward boolean case Sensitive boolean whole Word boolean reg Ex Search if get Target instanceof I Find Replace Target Extension3 return I Find Replace Target Extension3 get Target find And Select offset find String search Forward case Sensitive whole Word reg Ex Search fallback if reg Ex Search get Target null return get Target find And Select offset find String search Forward case Sensitive whole Word return 1  findAndSelect findString searchForward caseSensitive wholeWord regExSearch getTarget IFindReplaceTargetExtension3 IFindReplaceTargetExtension3 getTarget findAndSelect findString searchForward caseSensitive wholeWord regExSearch regExSearch getTarget getTarget findAndSelect findString searchForward caseSensitive wholeWord
public Point get Selection if get Target null return get Target get Selection return null  getSelection getTarget getTarget getSelection
public String get Selection Text if get Target null return get Target get Selection Text return null  getSelectionText getTarget getTarget getSelectionText
public boolean is Editable if get Target null if get Target is Editable return true return f Editor is Editor Input Modifiable return false  isEditable getTarget getTarget isEditable fEditor isEditorInputModifiable
see org eclipse jface text I Find Replace Target replace Selection java lang String public void replace Selection String text if get Target null get Target replace Selection text  IFindReplaceTarget replaceSelection replaceSelection getTarget getTarget replaceSelection
public void replace Selection String text boolean reg Ex Replace if get Target instanceof I Find Replace Target Extension3 I Find Replace Target Extension3 get Target replace Selection text reg Ex Replace return fallback if reg Ex Replace get Target null get Target replace Selection text  replaceSelection regExReplace getTarget IFindReplaceTargetExtension3 IFindReplaceTargetExtension3 getTarget replaceSelection regExReplace regExReplace getTarget getTarget replaceSelection
see org eclipse jface text I Find Replace Target Extension begin Session public void begin Session if get Extension null get Extension begin Session  IFindReplaceTargetExtension beginSession beginSession getExtension getExtension beginSession
see org eclipse jface text I Find Replace Target Extension end Session public void end Session if get Extension null get Extension end Session  IFindReplaceTargetExtension endSession endSession getExtension getExtension endSession
public I Region get Scope if get Extension null return get Extension get Scope return null  IRegion getScope getExtension getExtension getScope
see org eclipse jface text I Find Replace Target Extension set Scope org eclipse jface text I Region public void set Scope I Region scope if get Extension null get Extension set Scope scope  IFindReplaceTargetExtension setScope IRegion setScope IRegion getExtension getExtension setScope
public Point get Line Selection if get Extension null return get Extension get Line Selection return null  getLineSelection getExtension getExtension getLineSelection
see org eclipse jface text I Find Replace Target Extension set Selection int int public void set Selection int offset int length if get Extension null get Extension set Selection offset length  IFindReplaceTargetExtension setSelection setSelection getExtension getExtension setSelection
see org eclipse jface text I Find Replace Target Extension set Scope Highlight Color org eclipse swt graphics Color public void set Scope Highlight Color Color color if get Extension null get Extension set Scope Highlight Color color  IFindReplaceTargetExtension setScopeHighlightColor setScopeHighlightColor getExtension getExtension setScopeHighlightColor
see org eclipse jface text I Find Replace Target Extension set Replace All Mode boolean public void set Replace All Mode boolean replace All if get Extension null get Extension set Replace All Mode replace All  IFindReplaceTargetExtension setReplaceAllMode setReplaceAllMode replaceAll getExtension getExtension setReplaceAllMode replaceAll
see org eclipse ui texteditor I Find Replace Target Extension2 validate Target State public boolean validate Target State return f Editor validate Editor Input State  IFindReplaceTargetExtension2 validateTargetState validateTargetState fEditor validateEditorInputState

public String is Valid String input if input null input length 0 return NON NLS 1 try int i Integer parse Int input if i 0 f Last Line i return f Bundle get String f Prefix dialog invalid range NON NLS 1 catch Number Format Exception x return f Bundle get String f Prefix dialog invalid input NON NLS 1 return null  isValid parseInt fLastLine fBundle getString fPrefix invalid_range NumberFormatException fBundle getString fPrefix invalid_input
see Input Dialog Input Dialog org eclipse swt widgets Shell java lang String java lang String java lang String org eclipse jface dialogs I Input Validator public Goto Line Dialog Shell parent String title String message String initial Value I Input Validator validator super parent title message initial Value validator  InputDialog InputDialog IInputValidator GotoLineDialog initialValue IInputValidator initialValue
protected Control create Dialog Area Composite parent Control result super create Dialog Area parent get Text set Focus apply Dialog Font result return result  createDialogArea createDialogArea getText setFocus applyDialogFont
Creates a new action for the given text editor The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the text editor see Text Editor Action Text Editor Action Resource Bundle String I Text Editor public Goto Line Action Resource Bundle bundle String prefix I Text Editor editor super bundle prefix editor f Bundle bundle f Prefix prefix  ResourceAction TextEditorAction TextEditorAction ResourceBundle ITextEditor GotoLineAction ResourceBundle ITextEditor fBundle fPrefix
Jumps to the given line param line the line to jump to private void goto Line int line I Text Editor editor get Text Editor I Document Provider provider editor get Document Provider I Document document provider get Document editor get Editor Input try int start document get Line Offset line editor select And Reveal start 0 I Workbench Page page editor get Site get Page page activate editor catch Bad Location Exception x ignore  gotoLine ITextEditor getTextEditor IDocumentProvider getDocumentProvider IDocument getDocument getEditorInput getLineOffset selectAndReveal IWorkbenchPage getSite getPage BadLocationException
public void run try I Text Editor editor get Text Editor if editor null return I Document Provider doc Provider editor get Document Provider if doc Provider null return I Document document doc Provider get Document editor get Editor Input if document null return f Last Line document get Line Of Offset document get Length 1 String title f Bundle get String f Prefix dialog title NON NLS 1 String message Message Format format f Bundle get String f Prefix dialog message new Object new Integer f Last Line NON NLS 1 Goto Line Dialog d new Goto Line Dialog editor get Site get Shell title message new Number Validator NON NLS 1 if d open Window OK try int line Integer parse Int d get Value goto Line line 1 catch Number Format Exception x catch Bad Location Exception x  ITextEditor getTextEditor IDocumentProvider docProvider getDocumentProvider docProvider IDocument docProvider getDocument getEditorInput fLastLine getLineOfOffset getLength fBundle getString fPrefix MessageFormat fBundle getString fPrefix fLastLine GotoLineDialog GotoLineDialog getSite getShell NumberValidator parseInt getValue gotoLine NumberFormatException BadLocationException

Returns the image for the given annotation or code null code The returned image is managed by this annotation image provided If the annotation image provider does not support managed images clients have to manage the annotation images For that clients first ask for the image descriptor id for a given annotation code get Image Descriptor Id Annotation code as then for the image descriptor The image descriptor id should be used to manage the annotation images using an code Image Registry code param annotation the annotation return the managed image  getImageDescriptorId ImageRegistry
Returns the image descriptor id of the image for the given annotation param annotation the annotation return the image descriptor id 
Returns the image descriptor for the given symbolic name param image Descritpor Id the image descriptor id return the image descriptor  imageDescritporId

Connects the given element to this document provider This tells the provider that caller of this method is interested to work with the document provided for the given domain model element By counting the invocations of this method and code disconnect Object code this provider can assume to know the correct number of clients working with the document provided for that domain model element p The given element must not be code null code param element the element exception Core Exception if the textual representation or the annotation model of the element could not be created  CoreException
Disconnects the given element from this document provider This tells the provider that the caller of this method is no longer interested in working with the document provided for the given domain model element By counting the invocations of code connect Object code and of this method this provider can assume to know the correct number of clients working with the document provided for that domain model element p The given element must not be code null code param element the element 
Returns the document for the given element Usually the document contains a textual presentation of the content of the element or is the element itself param element the element or code null code return the document or code null code if none 
Resets the given element s document to its last saved state Element state listeners are notified both before code element Content About To Be Replaced code and after code element Content Replaced code the content is changed param element the element or code null code exception Core Exception if document could not be reset for the given element  elementContentAboutToBeReplaced elementContentReplaced CoreException
Saves the given document provided for the given element param monitor a progress monitor to report progress and request cancellation param element the element or code null code param document the document param overwrite indicates whether overwrite should be performed while saving the given element if necessary exception Core Exception if document could not be stored to the given element  CoreException
Returns the modification stamp of the given element param element the element return the modification stamp of the given element 
Returns the time stamp of the last synchronization of the given element and it s provided document param element the element return the synchronization stamp of the given element 
Returns whether the given element has been deleted param element the element return code true code if the element has been deleted 
Returns whether the document provided for the given element must be saved param element the element or code null code return code true code if the document must be saved and code false code otherwise including the element is code null code 
Returns whether the document provided for the given element differs from its original state which would required that it be saved param element the element or code null code return code true code if the document can be saved and code false code otherwise including the element is code null code 
Returns the annotation model for the given element param element the element or code null code return the annotation model or code null code if none 
Informs this document provider about upcoming changes of the given element The changes might cause change notifications specific for the type of the given element If this provider manages a document for the given element the document provider must not change the document because of the notifications received after code about To Change code has been and before code changed code is called In this case it is assumed that the document is already up to date e g a save operation is a typical case p The concrete nature of the change notification depends on the concrete type of the given element If the element is e g an code I Resource code the notification is a resource delta param element the element or code null code  aboutToChange IResource
Informs this document provider that the given element has been changed All notifications have been sent out If this provider manages a document for the given element the document provider must from now on change the document on the receipt of change notifications The concrete nature of the change notification depends on the concrete type of the given element If the element is e g an code I Resource code the notification is a resource delta param element the element or code null code  IResource
Adds the given element state listener to this document provider Has no effect if an identical listener is already registered param listener the listener 
Removes the given element state listener from this document provider Has no affect if an identical listener is not registered param listener the listener 

Returns whether the document provider thinks that the given element is read only If this method returns code true code code save Document code could fail This method does not say anything about the document constructed from the given element If the given element is not connected to this document provider the return value is undefined Document providers are allowed to use a cache to answer this question i e there can be a difference between the real state of the element and the return value param element the element return code true code if the given element is read only code false code otherwise  saveDocument
Returns whether the document provider thinks that the given element can persistently be modified This is orthogonal to code is Read Only code as read only elements may be modifiable and writable elements may not be modifiable If the given element is not connected to this document provider the result is undefined Document providers are allowed to use a cache to answer this question i e there can be a difference between the real state of the element and the return value param element the element return code true code if the given element is modifiable code false code otherwise  isReadOnly
Validates the state of the given element This method may change the real state of the element If using it also updates the internal caches so that this method may also change the results returned by code is Read Only code and code is Modifiable code If the given element is not connected to this document provider the effect is undefined param element the element param computation Context the context in which the computation is performed e g a SWT shell exception Core Exception if validating fails  isReadOnly isModifiable computationContext CoreException
Returns whether the state of the given element has been validated param element the element return code true code if the state has been validated 
Updates the state cache for the given element This method may change the result returned by code is Read Only code and code is Modifiable code If the given element is not connected to this document provider the effect is undefined param element the element exception Core Exception if validating fails  isReadOnly isModifiable CoreException
Marks the document managed for the given element as saveable I e code can Be Saved element code will return code true code afterwards param element the element  canBeSaved
Returns the status of the given element param element the element return the status of the given element 
Synchronizes the document provided for the given element with the given element After that call code get Synchronization Time Stamp code and code get Modification Time Stamp code return the same value param element the element exception Core Exception if the synchronization could not be performed  getSynchronizationTimeStamp getModificationTimeStamp CoreException

Sets this providers progress monitor param progress Monitor  progressMonitor
Returns this providers progress monitor return I Progress Monitor  IProgressMonitor

Returns whether the information provided for the given element is in sync with the element param element the element return code true code if the information is in sync with the element code false code otherwise 

public interface I Editor Status Line Sets the image and message to be displayed on the status line p The error flag indicates that the message is an error message If the error flag is set a potential non error message is overridden If the error message is code null code the non error message is displayed p param error indicates that the message is an error message param message the message to set may be code null code to clear the message param image the image to set may be code null code to clear the image  IEditorStatusLine

Notifies that the dirty state of the given element has changed param element the element param is Dirty the new dirty state  isDirty
Notifies that the content of the given element is about to be replaced param element the element 
Notifies that the content of the given element has been replaced param element the element 
Notifies that the given element has been deleted param element the element 
Notifies that the element has moved If code moved Element code is code null code it is similar to code element Deleted original Element code param original Element the element before the move param moved Element the element after the move  movedElement elementDeleted originalElement originalElement movedElement

Notifies that the state validation of the given element has changed param element the element param is State Validated the flag indicating whether state validation is done  isStateValidated
Notifies that the given element is currently being changed This method may be sent from a non ui thread param element the element 
Notifies that changing the given element has failed param element the element 

Validates the state of this target The predominate intent of this method is to take any action probably necessary to ensure that the target can persistently be changed return code true code if the target was validated code false code otherwise 

deprecated As of 3 0 replaced by link org eclipse jface text source Image Utilities draw Image Image GC Canvas Rectangle int int public static void draw Image Image image GC gc Canvas canvas Rectangle r int halign int valign org eclipse jface text source Image Utilities draw Image image gc canvas r halign valign  ImageUtilities drawImage drawImage ImageUtilities drawImage
deprecated As of 3 0 replaced by link org eclipse jface text source Image Utilities draw Image Image GC Canvas Rectangle int public static void draw Image Image image GC gc Canvas canvas Rectangle r int align org eclipse jface text source Image Utilities draw Image image gc canvas r align  ImageUtilities drawImage drawImage ImageUtilities drawImage

Returns the marker type for which this updater is responsible If the result is code null code the updater assumes responsibility for any marker type return the marker type or code null code for any marker type 
Returns the attributes for which this updater is responsible If the result is code null code the updater assumes responsibility for any attributes return the attributes or code null code for any attribute 
Updates the given marker according to the position of the given document If the given position is code null code the marker is assumed to carry the correct positional information param marker the marker to be updated param document the document into which the given position points param position the current position of the marker inside the given document return code false code if the updater recognizes that the marker should be deleted 

Creates a new incremental find action for the given workbench part The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param workbench Part the workbench part param forward code true code if the search direction is forward see Resource Action Resource Action Resource Bundle String since 2 1 public Incremental Find Action Resource Bundle bundle String prefix I Workbench Part workbench Part boolean forward super bundle prefix f Workbench Part workbench Part f Forward forward update  ResourceAction workbenchPart ResourceAction ResourceAction ResourceBundle IncrementalFindAction ResourceBundle IWorkbenchPart workbenchPart fWorkbenchPart workbenchPart fForward
Creates a new incremental find action for the given workbench window The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param workbench Window the workbench window param forward code true code if the search direction is forward see Resource Action Resource Action Resource Bundle String deprecated use Find Replace Action Resource Bundle String I Workbench Part boolean instead since 2 1 public Incremental Find Action Resource Bundle bundle String prefix I Workbench Window workbench Window boolean forward super bundle prefix f Workbench Window workbench Window f Forward forward update  ResourceAction workbenchWindow ResourceAction ResourceAction ResourceBundle FindReplaceAction ResourceBundle IWorkbenchPart IncrementalFindAction ResourceBundle IWorkbenchWindow workbenchWindow fWorkbenchWindow workbenchWindow fForward
public void run if f Target null return if f Target instanceof Incremental Find Target Incremental Find Target f Target set Direction f Forward if f Target instanceof I Find Replace Target Extension I Find Replace Target Extension f Target begin Session  fTarget fTarget IncrementalFindTarget IncrementalFindTarget fTarget setDirection fForward fTarget IFindReplaceTargetExtension IFindReplaceTargetExtension fTarget beginSession
public void update if f Workbench Part null f Workbench Window null f Workbench Part f Workbench Window get Part Service get Active Part if f Workbench Part null f Target I Find Replace Target f Workbench Part get Adapter Incremental Find Target class else f Target null set Enabled f Target null f Target can Perform Find  fWorkbenchPart fWorkbenchWindow fWorkbenchPart fWorkbenchWindow getPartService getActivePart fWorkbenchPart fTarget IFindReplaceTarget fWorkbenchPart getAdapter IncrementalFindTarget fTarget setEnabled fTarget fTarget canPerformFind

Creates a new search result data object and fills it with the current values of this target public Search Result Point p f Target get Selection selection p x length p y index f Current Index find Length f Find String length found f Found forward f Forward  SearchResult fTarget getSelection fCurrentIndex findLength fFindString fFound fForward
Stores the search result private void save State f Session Stack push new Search Result  saveState fSessionStack SearchResult
Restores the search result since 2 1 private void restore State Styled Text text f Text Viewer get Text Widget if text null text is Disposed return Search Result search Result null if f Session Stack empty search Result Search Result f Session Stack pop if search Result null text get Display beep return text set Selection Range search Result selection search Result length text show Selection relies on the contents of the String Buffer f Find String set Length search Result find Length f Current Index search Result index f Found search Result found f Forward search Result forward Recalculate the indices if f Find String length f Case Position f Case Position 1 if f Session Stack size f Wrap Position f Wrap Position 1  restoreState StyledText fTextViewer getTextWidget isDisposed SearchResult searchResult fSessionStack searchResult SearchResult fSessionStack searchResult getDisplay setSelectionRange searchResult searchResult showSelection StringBuffer fFindString setLength searchResult findLength fCurrentIndex searchResult fFound searchResult fForward searchResult fFindString fCasePosition fCasePosition fSessionStack fWrapPosition fWrapPosition
Sets the direction for the next search This can be called before code begin Session code to set the initial search direction param forward code true code if the next search should be forward see begin Session since 2 1 public void set Direction boolean forward f Forward forward  beginSession beginSession setDirection fForward
Creates an instance of an incremental find target param viewer the text viewer to operate on param manager the status line manager for output public Incremental Find Target I Text Viewer viewer I Status Line Manager manager Assert is Not Null viewer Assert is Not Null manager f Text Viewer viewer f Status Line manager f Target viewer get Find Replace Target  IncrementalFindTarget ITextViewer IStatusLineManager isNotNull isNotNull fTextViewer fStatusLine fTarget getFindReplaceTarget
see I Find Replace Target can Perform Find public boolean can Perform Find return f Target can Perform Find  IFindReplaceTarget canPerformFind canPerformFind fTarget canPerformFind
see I Find Replace Target find And Select int String boolean boolean boolean public int find And Select int offset String find String boolean search Forward boolean case Sensitive boolean whole Word return f Target find And Select offset find String search Forward case Sensitive whole Word  IFindReplaceTarget findAndSelect findAndSelect findString searchForward caseSensitive wholeWord fTarget findAndSelect findString searchForward caseSensitive wholeWord
see I Find Replace Target get Selection public Point get Selection return f Target get Selection  IFindReplaceTarget getSelection getSelection fTarget getSelection
see I Find Replace Target get Selection Text public String get Selection Text return f Target get Selection Text  IFindReplaceTarget getSelectionText getSelectionText fTarget getSelectionText
see I Find Replace Target is Editable public boolean is Editable return false  IFindReplaceTarget isEditable isEditable
see I Find Replace Target replace Selection String public void replace Selection String text  IFindReplaceTarget replaceSelection replaceSelection
public void begin Session f Searching true Workaround since some accelerators get handled directly by the OS if f Installed save State repeat Search f Forward update Status f Searching false return f Find String set Length 0 f Session Stack new Stack f Case Position 1 f Wrap Position 1 f Found true clear initial selection Styled Text text f Text Viewer get Text Widget if text null text is Disposed f Current Index text get Caret Offset text set Selection f Current Index else f Current Index 0 install Set the mark if f Text Viewer instanceof I Text Viewer Extension I Text Viewer Extension f Text Viewer set Mark f Current Index update Status if f Target instanceof I Find Replace Target Extension I Find Replace Target Extension f Target begin Session f Searching false  beginSession fSearching fInstalled saveState repeatSearch fForward updateStatus fSearching fFindString setLength fSessionStack fCasePosition fWrapPosition fFound StyledText fTextViewer getTextWidget isDisposed fCurrentIndex getCaretOffset setSelection fCurrentIndex fCurrentIndex fTextViewer ITextViewerExtension ITextViewerExtension fTextViewer setMark fCurrentIndex updateStatus fTarget IFindReplaceTargetExtension IFindReplaceTargetExtension fTarget beginSession fSearching
public void end Session if f Target instanceof I Find Replace Target Extension I Find Replace Target Extension f Target end Session will uninstall itself  endSession fTarget IFindReplaceTargetExtension IFindReplaceTargetExtension fTarget endSession
see I Find Replace Target Extension get Scope public I Region get Scope return null  IFindReplaceTargetExtension getScope IRegion getScope
see I Find Replace Target Extension set Global boolean public void set Global boolean global  IFindReplaceTargetExtension setGlobal setGlobal
see I Find Replace Target Extension set Scope I Region public void set Scope I Region scope  IFindReplaceTargetExtension setScope IRegion setScope IRegion
see I Find Replace Target Extension set Replace All Mode boolean public void set Replace All Mode boolean replace All  IFindReplaceTargetExtension setReplaceAllMode setReplaceAllMode replaceAll
Installs this target I e adds all required listeners private void install if f Installed return Styled Text text f Text Viewer get Text Widget if text null return text add Mouse Listener this text add Focus Listener this f Text Viewer add Text Listener this I Selection Provider selection Provider f Text Viewer get Selection Provider if selection Provider null selection Provider add Selection Changed Listener this if f Text Viewer instanceof I Text Viewer Extension I Text Viewer Extension f Text Viewer prepend Verify Key Listener this else text add Verify Key Listener this f Installed true  fInstalled StyledText fTextViewer getTextWidget addMouseListener addFocusListener fTextViewer addTextListener ISelectionProvider selectionProvider fTextViewer getSelectionProvider selectionProvider selectionProvider addSelectionChangedListener fTextViewer ITextViewerExtension ITextViewerExtension fTextViewer prependVerifyKeyListener addVerifyKeyListener fInstalled
Uninstalls itself I e removes all listeners installed in code install code private void uninstall f Text Viewer remove Text Listener this I Selection Provider selection Provider f Text Viewer get Selection Provider if selection Provider null selection Provider remove Selection Changed Listener this Styled Text text f Text Viewer get Text Widget if text null text remove Mouse Listener this text remove Focus Listener this if f Text Viewer instanceof I Text Viewer Extension I Text Viewer Extension f Text Viewer remove Verify Key Listener this else if text null text remove Verify Key Listener this f Installed false  fTextViewer removeTextListener ISelectionProvider selectionProvider fTextViewer getSelectionProvider selectionProvider selectionProvider removeSelectionChangedListener StyledText fTextViewer getTextWidget removeMouseListener removeFocusListener fTextViewer ITextViewerExtension ITextViewerExtension fTextViewer removeVerifyKeyListener removeVerifyKeyListener fInstalled
Updates the status line since 2 1 private void update Status if f Installed return String string f Find String to String String wrap Prefix f Wrap Position 1 WRAPPED NON NLS 1 String reverse Prefix f Forward REVERSE NON NLS 1 if f Found String pattern Editor Messages get String Editor Find Incremental not found pattern NON NLS 1 status Error Message Format format pattern new Object reverse Prefix wrap Prefix string else if string length 0 if f Forward status Message FIELD NAME else status Message REVERSE FIELD NAME else if f Forward f Wrap Position 1 String pattern Editor Messages get String Editor Find Incremental found pattern NON NLS 1 status Message Message Format format pattern new Object reverse Prefix wrap Prefix string else status Message string  updateStatus fInstalled fFindString toString wrapPrefix fWrapPosition reversePrefix fForward fFound EditorMessages getString FindIncremental not_found statusError MessageFormat reversePrefix wrapPrefix fForward statusMessage FIELD_NAME statusMessage REVERSE_FIELD_NAME fForward fWrapPosition EditorMessages getString FindIncremental statusMessage MessageFormat reversePrefix wrapPrefix statusMessage
public void verify Key Verify Event event if event doit return f Searching true if event character 0 switch event key Code ALT CTRL ARROW LEFT ARROW RIGHT leave case SWT ARROW LEFT case SWT ARROW RIGHT case SWT HOME case SWT END case SWT PAGE DOWN case SWT PAGE UP leave break case SWT ARROW DOWN save State set Direction true repeat Search f Forward event doit false break case SWT ARROW UP save State set Direction false repeat Search f Forward event doit false break event character 0 else switch event character ESC CR quit case 0x1B case 0x0D leave event doit false break backspaceand delete case 0x08 case 0x7F restore State event doit false break default if event state Mask 0 event state Mask SWT SHIFT event state Mask SWT ALT SWT CTRL SWT ALT SWT CTRL covers Alt Gr see bug 43049 save State add Char Search event character event doit false break update Status f Searching false  verifyKey VerifyEvent fSearching keyCode ARROW_LEFT ARROW_RIGHT ARROW_LEFT ARROW_RIGHT PAGE_DOWN PAGE_UP ARROW_DOWN saveState setDirection repeatSearch fForward ARROW_UP saveState setDirection repeatSearch fForward restoreState stateMask stateMask stateMask AltGr saveState addCharSearch updateStatus fSearching
Repeats the last search while possibly changing the direction param forward code true code iff the next search should be forward return if the search was successful since 2 1 private boolean repeat Search boolean forward if f Find String length 0 f Find String new String Buffer f Prev Find String f Case Position f Prev Case Position String string f Find String to String if string length 0 f Found true return true Styled Text text f Text Viewer get Text Widget Cannot use f Target get Selection since that does not return which side of the selection the caret is on int start Index text get Caret Offset if forward start Index 1 Check to see if a wrap is necessary if f Found f Forward forward start Index 1 if f Wrap Position 1 f Wrap Position f Session Stack size f Forward forward Find the string text set Redraw false int index f Target find And Select start Index string f Forward f Case Position 1 false Set the caret on the left if the search is reversed if forward Point p f Target get Selection text set Selection Range p x p y p y p null text set Redraw true Take appropriate action boolean found index 1 if found f Found text f Text Viewer get Text Widget if text null text is Disposed text get Display beep if found f Current Index start Index f Found found return found  repeatSearch fFindString fFindString StringBuffer fPrevFindString fCasePosition fPrevCasePosition fFindString toString fFound StyledText fTextViewer getTextWidget fTarget getSelection startIndex getCaretOffset startIndex fFound fForward startIndex fWrapPosition fWrapPosition fSessionStack fForward setRedraw fTarget findAndSelect startIndex fForward fCasePosition fTarget getSelection setSelectionRange setRedraw fFound fTextViewer getTextWidget isDisposed getDisplay fCurrentIndex startIndex fFound
Adds the given character to the search string and repeats the search with the last parameters param c the character to append to the search pattern return code true code the search found a match since 2 1 private boolean add Char Search char c Add char to pattern if f Case Position 1 Character is Upper Case c Character to Lower Case c c f Case Position f Find String length f Find String append c String string f Find String to String Styled Text text f Text Viewer get Text Widget text set Redraw false int index f Target find And Select f Current Index string f Forward f Case Position 1 false Set the caret on the left if the search is reversed if f Forward Point p f Target get Selection text set Selection Range p x p y p y text set Redraw true Take appropriate action boolean found index 1 if found f Found text f Text Viewer get Text Widget if text null text is Disposed text get Display beep f Found found return found  addCharSearch fCasePosition isUpperCase toLowerCase fCasePosition fFindString fFindString fFindString toString StyledText fTextViewer getTextWidget setRedraw fTarget findAndSelect fCurrentIndex fForward fCasePosition fForward fTarget getSelection setSelectionRange setRedraw fFound fTextViewer getTextWidget isDisposed getDisplay fFound
Leaves this incremental search session private void leave if f Find String length 0 f Prev Find String f Find String to String f Prev Case Position f Case Position status Clear uninstall f Session Stack null  fFindString fPrevFindString fFindString toString fPrevCasePosition fCasePosition statusClear fSessionStack
see I Text Listener text Changed Text Event public void text Changed Text Event event if event get Document Event null leave  ITextListener textChanged TextEvent textChanged TextEvent getDocumentEvent
see Mouse Listener mouse Double Click Mouse Event public void mouse Double Click Mouse Event e leave  MouseListener mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent
see Mouse Listener mouse Down org eclipse swt events Mouse Event public void mouse Down Mouse Event e leave  MouseListener mouseDown MouseEvent mouseDown MouseEvent
see Mouse Listener mouse Up org eclipse swt events Mouse Event public void mouse Up Mouse Event e leave  MouseListener mouseUp MouseEvent mouseUp MouseEvent
see Focus Listener focus Gained org eclipse swt events Focus Event public void focus Gained Focus Event e leave  FocusListener focusGained FocusEvent focusGained FocusEvent
see Focus Listener focus Lost org eclipse swt events Focus Event public void focus Lost Focus Event e leave  FocusListener focusLost FocusEvent focusLost FocusEvent
Sets the given string as status message clears the status error message param string the status message private void status Message String string if f Status Field null if f Is Status Field Extension I Status Field Extension f Status Field set Error Text null f Status Field set Text escape Tabs string I Status Field Extension f Status Field set Visible true f Status Line update true else f Status Line set Error Message null f Status Field set Text escape Tabs string else f Status Line set Error Message null f Status Line set Message escape Tabs string  statusMessage fStatusField fIsStatusFieldExtension IStatusFieldExtension fStatusField setErrorText fStatusField setText escapeTabs IStatusFieldExtension fStatusField setVisible fStatusLine fStatusLine setErrorMessage fStatusField setText escapeTabs fStatusLine setErrorMessage fStatusLine setMessage escapeTabs
Sets the status error message clears the status message param string the status error message private void status Error String string if f Status Field null if f Is Status Field Extension I Status Field Extension f Status Field set Error Text escape Tabs string f Status Field set Text NON NLS 1 I Status Field Extension f Status Field set Visible true f Status Line update true else f Status Line set Error Message escape Tabs string f Status Field set Text NON NLS 1 else f Status Line set Error Message escape Tabs string f Status Line set Message null  statusError fStatusField fIsStatusFieldExtension IStatusFieldExtension fStatusField setErrorText escapeTabs fStatusField setText IStatusFieldExtension fStatusField setVisible fStatusLine fStatusLine setErrorMessage escapeTabs fStatusField setText fStatusLine setErrorMessage escapeTabs fStatusLine setMessage
Clears the status message and the status error message private void status Clear if f Status Field null if f Is Status Field Extension f Status Field set Text NON NLS 1 I Status Field Extension f Status Field set Error Text null I Status Field Extension f Status Field set Visible false f Status Line update true else f Status Field set Text NON NLS 1 f Status Line set Error Message null else f Status Line set Error Message null f Status Line set Message null  statusClear fStatusField fIsStatusFieldExtension fStatusField setText IStatusFieldExtension fStatusField setErrorText IStatusFieldExtension fStatusField setVisible fStatusLine fStatusField setText fStatusLine setErrorMessage fStatusLine setErrorMessage fStatusLine setMessage
Translates all tab characters into a proper status line presentation param string the string in which to translate the tabs return the given string with all tab characters replace with a proper status line presentation private String escape Tabs String string String Buffer buffer new String Buffer int begin 0 int end string index Of t begin while end 0 buffer append string substring begin end buffer append TAB begin end 1 end string index Of t begin buffer append string substring begin return buffer to String  escapeTabs StringBuffer StringBuffer indexOf indexOf toString
public Point get Line Selection if f Target instanceof I Find Replace Target Extension return I Find Replace Target Extension f Target get Line Selection return null XXX should not return null  getLineSelection fTarget IFindReplaceTargetExtension IFindReplaceTargetExtension fTarget getLineSelection
see I Find Replace Target Extension set Selection int int public void set Selection int offset int length if f Target instanceof I Find Replace Target Extension I Find Replace Target Extension f Target set Selection offset length  IFindReplaceTargetExtension setSelection setSelection fTarget IFindReplaceTargetExtension IFindReplaceTargetExtension fTarget setSelection
see I Find Replace Target Extension set Scope Highlight Color Color public void set Scope Highlight Color Color color  IFindReplaceTargetExtension setScopeHighlightColor setScopeHighlightColor
public void selection Changed Selection Changed Event e boolean ignore false I Selection selection e get Selection if selection instanceof I Text Selection I Text Selection text Selection I Text Selection selection Point range get Selection ignore text Selection get Offset text Selection get Length range x range y if f Searching ignore leave  selectionChanged SelectionChangedEvent ISelection getSelection ITextSelection ITextSelection textSelection ITextSelection getSelection textSelection getOffset textSelection getLength fSearching
Sets the find status field for this incremental find target param status Field the status field since 3 0 void set Status Field I Status Field status Field f Status Field status Field f Is Status Field Extension f Status Field instanceof I Status Field Extension  statusField setStatusField IStatusField statusField fStatusField statusField fIsStatusFieldExtension fStatusField IStatusFieldExtension

Creates a new info form param parent the parent composite public Info Form Composite parent Display display parent get Display f Background Color display get System Color SWT COLOR LIST BACKGROUND f Foreground Color display get System Color SWT COLOR LIST FOREGROUND f Separator Color new Color display 152 170 203 f Property Change Listener new I Property Change Listener public void property Change Property Change Event event handle Property Change event J Face Resources get Font Registry add Listener f Property Change Listener f Scrolled Composite new Scrolled Composite parent SWT H SCROLL SWT V SCROLL f Scrolled Composite set Always Show Scroll Bars false f Scrolled Composite set Expand Horizontal true f Scrolled Composite set Expand Vertical true f Scrolled Composite add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e J Face Resources get Font Registry remove Listener f Property Change Listener f Scrolled Composite null f Separator Color dispose f Separator Color null f Header null f Banner null f Text null Composite composite create Composite f Scrolled Composite composite set Layout new Grid Layout f Header create Header composite null create Label composite null create Label composite null f Banner create Banner composite null Composite separator create Composite Separator composite Grid Data data new Grid Data Grid Data FILL HORIZONTAL data height Hint 2 separator set Layout Data data f Text create Label composite null create Label composite null f Scrolled Composite set Content composite f Scrolled Composite set Min Size composite compute Size SWT DEFAULT SWT DEFAULT create Action Controls composite  InfoForm getDisplay fBackgroundColor getSystemColor COLOR_LIST_BACKGROUND fForegroundColor getSystemColor COLOR_LIST_FOREGROUND fSeparatorColor fPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent handlePropertyChange JFaceResources getFontRegistry addListener fPropertyChangeListener fScrolledComposite ScrolledComposite H_SCROLL V_SCROLL fScrolledComposite setAlwaysShowScrollBars fScrolledComposite setExpandHorizontal fScrolledComposite setExpandVertical fScrolledComposite addDisposeListener DisposeListener widgetDisposed DisposeEvent JFaceResources getFontRegistry removeListener fPropertyChangeListener fScrolledComposite fSeparatorColor fSeparatorColor fHeader fBanner fText createComposite fScrolledComposite setLayout GridLayout fHeader createHeader createLabel createLabel fBanner createBanner createCompositeSeparator GridData GridData GridData FILL_HORIZONTAL heightHint setLayoutData fText createLabel createLabel fScrolledComposite setContent fScrolledComposite setMinSize computeSize createActionControls
Hook method for creating an appropriate action control param parent the action control s parent control protected void create Action Controls Composite parent  createActionControls
Returns the control of this form return the root control of this form public Control get Control return f Scrolled Composite  getControl fScrolledComposite
Sets the header text of this info form param header the header text public void set Header Text String header f Header set Text header  setHeaderText fHeader setText
Sets the banner text of this info form param banner the banner text public void set Banner Text String banner f Banner set Text banner  setBannerText fBanner setText
Sets the info of this info form param info the info text public void set Info String info f Text set Text info  setInfo fText setText
protected void handle Property Change Property Change Event event if f Header null f Header set Font J Face Resources get Header Font if f Banner null f Banner set Font J Face Resources get Banner Font Control control f Scrolled Composite get Content f Scrolled Composite set Min Size control compute Size SWT DEFAULT SWT DEFAULT f Scrolled Composite set Content control f Scrolled Composite layout true f Scrolled Composite redraw  handlePropertyChange PropertyChangeEvent fHeader fHeader setFont JFaceResources getHeaderFont fBanner fBanner setFont JFaceResources getBannerFont fScrolledComposite getContent fScrolledComposite setMinSize computeSize fScrolledComposite setContent fScrolledComposite fScrolledComposite
private Composite create Composite Composite parent Composite composite new Composite parent SWT NONE composite set Background f Background Color return composite  createComposite setBackground fBackgroundColor
private Composite create Composite Separator Composite parent Composite composite new Composite parent SWT NONE composite set Background f Separator Color return composite  createCompositeSeparator setBackground fSeparatorColor
private Label create Label Composite parent String text Label label new Label parent SWT NONE if text null label set Text text label set Background f Background Color label set Foreground f Foreground Color return label  createLabel setText setBackground fBackgroundColor setForeground fForegroundColor
private Label create Header Composite parent String text Label label new Label parent SWT NONE if text null label set Text text label set Background f Background Color label set Foreground f Foreground Color label set Font J Face Resources get Header Font return label  createHeader setText setBackground fBackgroundColor setForeground fForegroundColor setFont JFaceResources getHeaderFont
private Label create Banner Composite parent String text Label label new Label parent SWT NONE if text null label set Text text label set Background f Background Color label set Foreground f Foreground Color label set Font J Face Resources get Banner Font return label  createBanner setText setBackground fBackgroundColor setForeground fForegroundColor setFont JFaceResources getBannerFont

Creates a new smart enter action param bundle the resource bundle param prefix the prefix to use to get properties from code bundle code param text Editor the editor that the action acts upon param above whether new lines are inserted above or below the caret s line public Insert Line Action Resource Bundle bundle String prefix I Text Editor text Editor boolean above super bundle prefix text Editor f Above above  textEditor InsertLineAction ResourceBundle ITextEditor textEditor textEditor fAbove
public void update super update if is Enabled set Enabled can Modify Editor  isEnabled setEnabled canModifyEditor
public void run I Text Editor ed get Text Editor if ed instanceof Abstract Text Editor return if validate Editor Input State return Abstract Text Editor editor Abstract Text Editor ed I Source Viewer sv editor get Source Viewer if sv null return Styled Text st sv get Text Widget if st null st is Disposed return get current line int caret Offset st get Caret Offset int line Number st get Line At Offset caret Offset int line Offset st get Offset At Line line Number int line Length get Line Length st line Number line Offset insert a new line relative to the current depending on f Above String line st get Text Range line Offset line Length boolean white Space is Whitespace line String delimiter st get Line Delimiter int insertion Point where the new line should be inserted if f Above if white Space insertion Point caret Offset else insertion Point line Offset get Indentation Length line else insertion Point line Offset line Length operating directly on the widget we get all the auto indentation for free st replace Text Range insertion Point 0 delimiter int new Caret Offset 1 if f Above white Space new Caret Offset st get Offset At Line line Number get Line Length st line Number line Offset else if f Above white Space int next Line line Number 1 int next Line Offset st get Offset At Line next Line int next Line Length get Line Length st next Line next Line Offset new Caret Offset next Line Offset next Line Length if new Caret Offset 1 st set Caret Offset new Caret Offset st show Selection  ITextEditor getTextEditor AbstractTextEditor validateEditorInputState AbstractTextEditor AbstractTextEditor ISourceViewer getSourceViewer StyledText getTextWidget isDisposed caretOffset getCaretOffset lineNumber getLineAtOffset caretOffset lineOffset getOffsetAtLine lineNumber lineLength getLineLength lineNumber lineOffset fAbove getTextRange lineOffset lineLength whiteSpace isWhitespace getLineDelimiter insertionPoint fAbove whiteSpace insertionPoint caretOffset insertionPoint lineOffset getIndentationLength insertionPoint lineOffset lineLength replaceTextRange insertionPoint newCaretOffset fAbove whiteSpace newCaretOffset getOffsetAtLine lineNumber getLineLength lineNumber lineOffset fAbove whiteSpace nextLine lineNumber nextLineOffset getOffsetAtLine nextLine nextLineLength getLineLength nextLine nextLineOffset newCaretOffset nextLineOffset nextLineLength newCaretOffset setCaretOffset newCaretOffset showSelection
Determines the length of a line without the terminating line delimiter param st the Styled Text widget param line Number the number of the line param line Offset the line s offset return the length of the line without terminating delimiter private int get Line Length Styled Text st int line Number int line Offset int line Length if st get Line Count line Number 1 end of display area no next line line Length st get Char Count line Offset else line Length st get Offset At Line line Number 1 next line offset line Length line Offset line Length st get Line Delimiter length subtract line delimiter return line Length  StyledText lineNumber lineOffset getLineLength StyledText lineNumber lineOffset lineLength getLineCount lineNumber lineLength getCharCount lineOffset lineLength getOffsetAtLine lineNumber lineLength lineOffset lineLength getLineDelimiter lineLength
Computes the indentation of a line param line a non code null code string return the number of whitespace characters at the beginning of code line code private int get Indentation Length String line Assert is Not Null line int pos for pos 0 pos line length pos if Character is Whitespace line char At pos break return pos  getIndentationLength isNotNull isWhitespace charAt
Checks if a string consists only of whitespace param string return code true code if code string code consists of whitespace only code false code otherwise private boolean is Whitespace String string if string null return true return string trim length 0  isWhitespace

Returns whether the actions would be enabled if its target would be enabled given the writable state described by code is Writable code code is Enabled code and code is Enabled boolean code holds the following invariants is Enabled false if is Enabled true false is Enabled false false is Enabled true if is Enabled true true is Enabled false true param is Writable return the hypothetical enable state of the action  isWritable isEnabled isEnabled isEnabled isEnabled isEnabled isEnabled isEnabled isEnabled isWritable

Returns the scheduling rule return a scheduling rule or code null code if none 

Sets the text of this status field param text the text shown in the status field 
Sets the image of this status field param image the image shown in the status field 

public interface I Status Field Extension Sets the text of this status field p The error text overrides the current text until the error text is cleared set to code null code p param text the error text shown in the status field or code null code to clear see I Status Field set Text String  IStatusFieldExtension IStatusField setText
Sets the error image of this status field p The error image overrides the current image until the error image is cleared set to code null code p param image the error image shown in the status field or code null code to clear see I Status Field set Image Image  IStatusField setImage
Sets tool tip text for this status field param string the new tool tip text or code null code to clear 
Sets whether this status field is visible within the status line param visible code true code if this item should be visible code false code otherwise 

Returns this text editor s document provider return the document provider 
Closes this text editor after optionally saving changes param save code true code if unsaved changed should be saved and code false code if unsaved changed should be discarded 
Returns whether the text in this text editor can be changed by the user return code true code if it can be edited and code false code if it is read only 
Abandons all modifications applied to this text editor s input element s textual presentation since the last save operation 
Installs the given action under the given action id param actionID the action id param action the action or code null code to clear it see get Action String  getAction
Returns the action installed under the given action id param action Id the action id return the action or code null code if none see set Action String I Action  actionId setAction IAction
Sets the given activation code for the specified action If there is an activation code already registered it is replaced The activation code consists of the same information as a code Key Event code If the activation code is triggered and the associated action is enabled the action is performed and the triggering code Key Event code is considered consumed If the action is disabled the code Key Event code is passed on unmodified Thus action activation codes and action accelerators differ in their model of event consumption The key code parameter can be code 1 code to indicate a wild card The state mask parameter can be SWT DEFAULT to indicate a wild card param action Id the action id param activation Character the activation code character param activation Key Code the activation code key code or code 1 code for wild card param activation State Mask the activation code state mask or code SWT DEFAULT code for wild card  KeyEvent KeyEvent KeyEvent actionId activationCharacter activationKeyCode activationStateMask
Removes any installed activation code for the specified action If no activation code is installed this method does not have any effect param action Id the action id  actionId
Returns whether this text editor is configured to show only the highlighted range of the text return code true code if only the highlighted range is shown and code false code if this editor shows the entire text of the document see show Highlight Range Only boolean  showHighlightRangeOnly
Configures this text editor to show only the highlighted range of the text param show Highlight Range Only code true code if only the highlighted range is shown and code false code if this editor shows the entire text of the document see shows Highlight Range Only  showHighlightRangeOnly showsHighlightRangeOnly
Sets the highlighted range of this text editor to the specified region param offset the offset of the highlighted range param length the length of the highlighted range param move Cursor code true code if the cursor should be moved to the start of the highlighted range and code false code to leave the cursor unaffected see get Highlight Range  moveCursor getHighlightRange
Returns the highlighted range of this text editor return the highlighted range see set Highlight Range int int boolean  setHighlightRange
I Region get Highlight Range Resets the highlighted range of this text editor void reset Highlight Range  IRegion getHighlightRange resetHighlightRange
Returns this text editor s selection provider Repeated calls to this method return the same selection provider return the selection provider 
Selects and reveals the specified range in this text editor param offset the offset of the selection param length the length of the selection 

Returns the list of code Transfer code agents that are supported by this listener return the list of transfer agents supported by this listener 

Informs the editor which status field is to be used when posting status information in the given category param field the status field to be used param category the status information category see I Text Editor Action Constants  ITextEditorActionConstants
Returns whether the editor s input is read only The semantics of this method is orthogonal to code is Editable code as it talks about the editor input i e the domain element and b not b about the editor document return code true code if the editor input is read only  isEditable
Adds a ruler context menu listener to the editor param listener the listener 
Removes a ruler context menu listener from the editor param listener the listener 

Returns whether the editor s input can be persistently be modified This is orthogonal to code I Text Editor Extension is Editor Input Read Only code as read only elements may be modifiable and writable elements may not be modifiable If the given element is not connected to this document provider the result is undefined Document providers are allowed to use a cache to answer this question i e there can be a difference between the real state of the element and the return value return code true code if the editor input is modifiable  ITextEditorExtension isEditorInputReadOnly
Validates the state of the given editor input The predominate intent of this method is to take any action probably necessary to ensure that the input can persistently be changed return code true code if the input was validated code false code otherwise 

public static class Insert Mode private Insert Mode  InsertMode InsertMode
Returns the current input mode of this editor return the current input mode of this editor 
Sets the insert mode of this editor param mode the new insert mode exception Illegal Argument Exception if code mode code is not a legal insert mode for this editor  IllegalArgumentException
Sets the display of quick diff information param show code true code if quick diff information should be shown code false code otherwise 
Returns the quick diff display state return code true code if quick diff info is displayed code false code otherwise 

public interface I Update Requests that this object update itself void update  IUpdate

public void linking Focus Lost Linked Position position Linked ModeUI Target target mark navigation history I Workbench Window win PlatformUI get Workbench get Active Workbench Window if win null I Workbench Page page win get Active Page if page null I Editor Part part page get Active Editor page get Navigation History mark Location part  linkingFocusLost LinkedPosition LinkedModeUITarget IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IWorkbenchPage getActivePage IEditorPart getActiveEditor getNavigationHistory markLocation
see org eclipse jface text link Linked ModeUI I Linked ModeUI Focus Listener linked Focus Gained org eclipse jface text link Linked Position org eclipse jface text link Linked ModeUI Linked ModeUI Target public void linking Focus Gained Linked Position position Linked ModeUI Target target does nothing  LinkedModeUI ILinkedModeUIFocusListener linkedFocusGained LinkedPosition LinkedModeUI LinkedModeUITarget linkingFocusGained LinkedPosition LinkedModeUITarget
param model param viewer public Editor Linked ModeUI Linked Mode Model model I Text Viewer viewer super model viewer set Position Listener new Editor History Updater  EditorLinkedModeUI LinkedModeModel ITextViewer setPositionListener EditorHistoryUpdater
param model param viewers public Editor Linked ModeUI Linked Mode Model model I Text Viewer viewers super model viewers set Position Listener new Editor History Updater  EditorLinkedModeUI LinkedModeModel ITextViewer setPositionListener EditorHistoryUpdater
param model param target public Editor Linked ModeUI Linked Mode Model model Linked ModeUI Target target super model target set Position Listener new Editor History Updater  EditorLinkedModeUI LinkedModeModel LinkedModeUITarget setPositionListener EditorHistoryUpdater
param model param targets public Editor Linked ModeUI Linked Mode Model model Linked ModeUI Target targets super model targets set Position Listener new Editor History Updater  EditorLinkedModeUI LinkedModeModel LinkedModeUITarget setPositionListener EditorHistoryUpdater

Constructor for Mark Action param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the text editor param type the mark action type must be one of code SET MARK code code CLEAR MARK code or code SWAP MARK code public Mark Action Resource Bundle bundle String prefix I Text Editor editor int type super bundle prefix editor f Type type  MarkAction ResourceAction SET_MARK CLEAR_MARK SWAP_MARK MarkAction ResourceBundle ITextEditor fType
public void run I Text Editor editor get Text Editor if editor null return I Mark Region Target target I Mark Region Target editor get Adapter I Mark Region Target class if target null return switch f Type case SET MARK target set Mark At Cursor true break case CLEAR MARK target set Mark At Cursor false break case SWAP MARK target swap Mark And Cursor break  ITextEditor getTextEditor IMarkRegionTarget IMarkRegionTarget getAdapter IMarkRegionTarget fType SET_MARK setMarkAtCursor CLEAR_MARK setMarkAtCursor SWAP_MARK swapMarkAndCursor

Returns an image for the given display as specified by the given image descriptor param display the display param descriptor the image descriptor return an image for the display as specified by the descriptor deprecated As of 3 0 visual presentation is no longer supported annotation with a visible presentation should implement link org eclipse jface text source I Annotation Presentation protected static Image get Image Display display Image Descriptor descriptor Map map get Image Registry display Image image Image map get descriptor if image null image descriptor create Image map put descriptor image return image  IAnnotationPresentation getImage ImageDescriptor getImageRegistry createImage
display dispose Exec new Runnable public void run if fg Image Registry null Map map fg Image Registry fg Image Registry null Iterator e map values iterator while e has Next Image image Image e next if image is Disposed image dispose  disposeExec fgImageRegistry fgImageRegistry fgImageRegistry hasNext isDisposed
Returns an image registry for the given display If no such registry exists the registry is created param display the display return the image registry for the given display deprecated As of 3 0 visual presentation is no longer supported annotation with a visible presentation should implement link org eclipse jface text source I Annotation Presentation protected static Map get Image Registry Display display if fg Image Registry null fg Image Registry new Hash Map display dispose Exec new Runnable public void run if fg Image Registry null Map map fg Image Registry fg Image Registry null Iterator e map values iterator while e has Next Image image Image e next if image is Disposed image dispose return fg Image Registry  IAnnotationPresentation getImageRegistry fgImageRegistry fgImageRegistry HashMap disposeExec fgImageRegistry fgImageRegistry fgImageRegistry hasNext isDisposed fgImageRegistry
Creates a new annotation for the given marker param marker the marker public Marker Annotation I Marker marker super marker  MarkerAnnotation IMarker
Creates a new annotation of the given type for the given marker param annotation Type the annotation type param marker the marker since 3 0 public Marker Annotation String annotation Type I Marker marker super annotation Type marker initialize  annotationType MarkerAnnotation annotationType IMarker annotationType
Sets the marker image to the given image param image the new marker image deprecated As of 3 0 visual presentation is no longer supported annotation with a visible presentation should implement link org eclipse jface text source I Annotation Presentation protected void set Image Image image f Image image  IAnnotationPresentation setImage fImage
Initializes the annotation s icon representation and its drawing layer based upon the properties of the underlying marker deprecated As of 3 0 visual presentation is no longer supported annotation with a visible presentation should implement link org eclipse jface text source I Annotation Presentation protected void initialize I Marker marker get Marker String name get Unknown Image Name marker if Marker Utilities is Marker Type marker I Marker TASK name IDE Shared Images IMG OBJS TASK TSK else if Marker Utilities is Marker Type marker I Marker BOOKMARK name IDE Shared Images IMG OBJS BKMRK TSK else if Marker Utilities is Marker Type marker I Marker PROBLEM switch Marker Utilities get Severity marker case I Marker SEVERITY INFO name I Shared Images IMG OBJS INFO TSK break case I Marker SEVERITY WARNING name I Shared Images IMG OBJS WARN TSK break case I Marker SEVERITY ERROR name I Shared Images IMG OBJS ERROR TSK break f Image null f Image Name name  IAnnotationPresentation IMarker getMarker getUnknownImageName MarkerUtilities isMarkerType IMarker SharedImages IMG_OBJS_TASK_TSK MarkerUtilities isMarkerType IMarker SharedImages IMG_OBJS_BKMRK_TSK MarkerUtilities isMarkerType IMarker MarkerUtilities getSeverity IMarker SEVERITY_INFO ISharedImages IMG_OBJS_INFO_TSK IMarker SEVERITY_WARNING ISharedImages IMG_OBJS_WARN_TSK IMarker SEVERITY_ERROR ISharedImages IMG_OBJS_ERROR_TSK fImage fImageName
Returns the annotations drawing layer p Note This is only for backward compatibility p return the annotations drawing layer deprecated As of 3 0 replaced by link org eclipse jface text source I Annotation Access Extension get Layer org eclipse jface text source Annotation since 3 0 public int get Layer if f Presentation Layer 1 Backward compatibility return f Presentation Layer Annotation Preference preference Editors Plugin get Default get Annotation Preference Lookup get Annotation Preference this if preference null return preference get Presentation Layer else return I Annotation Access Extension DEFAULT LAYER  IAnnotationAccessExtension getLayer getLayer fPresentationLayer fPresentationLayer AnnotationPreference EditorsPlugin getDefault getAnnotationPreferenceLookup getAnnotationPreference getPresentationLayer IAnnotationAccessExtension DEFAULT_LAYER
Sets the layer of this annotation p Note This is only for backward compatibility p param layer the layer of this annotation deprecated As of 3 0 annotation with a visible presentation should implement link org eclipse jface text source I Annotation Presentation since 3 0 protected void set Layer int layer f Presentation Layer layer  IAnnotationPresentation setLayer fPresentationLayer
Implement this method to draw a graphical representation of this annotation within the given bounds This default implementation does nothing p Note This is only for backward compatibility p param gc the drawing GC param canvas the canvas to draw on param r the bounds inside the canvas to draw on deprecated As of 3 0 replaced by link org eclipse jface text source I Annotation Access Extension paint org eclipse jface text source Annotation GC Canvas Rectangle since 3 0 public void paint GC gc Canvas canvas Rectangle r Image image get Image canvas get Display if image null Image Utilities draw Image image gc canvas r SWT CENTER SWT TOP  IAnnotationAccessExtension getImage getDisplay ImageUtilities drawImage
Informs this annotation about changes applied to its underlying marker and adapts to those changes public void update super update initialize 
Returns the name of an image used to visually represent markers of unknown type This implementation returns code null code Subclasses may replace this method param marker the marker of unknown type return the name of an image for markers of unknown type deprecated As of 3 0 visual presentation is no longer supported annotation with a visible presentation should implement link org eclipse jface text source I Annotation Presentation protected String get Unknown Image Name I Marker marker return null  IAnnotationPresentation getUnknownImageName IMarker
Returns the image of the given name Subclasses may extend this method If so subclasses must assume responsibility for disposing the images they create param name the name of the requested image return the image or code null code if there is no such image deprecated As of 3 0 visual presentation is no longer supported annotation with a visible presentation should implement link org eclipse jface text source I Annotation Presentation protected Image get Image String name if name null return PlatformUI get Workbench get Shared Images get Image name return null  IAnnotationPresentation getImage getWorkbench getSharedImages getImage
Returns an image for this annotation It first consults the workbench adapter for this annotation s marker If none is defined it tries to find an image for the image name of this annotation param display the display for which the image is requested return the image for this annotation deprecated As of 3 0 visual presentation is no longer supported annotation with a visible presentation should implement link org eclipse jface text source I Annotation Presentation protected Image get Image Display display if f Image null I Marker marker get Marker if marker exists I Workbench Adapter adapter I Workbench Adapter marker get Adapter I Workbench Adapter class if adapter null Image Descriptor descriptor adapter get Image Descriptor marker if descriptor null f Image get Image display descriptor if f Image null f Image get Image f Image Name return f Image  IAnnotationPresentation getImage fImage IMarker getMarker IWorkbenchAdapter IWorkbenchAdapter getAdapter IWorkbenchAdapter ImageDescriptor getImageDescriptor fImage getImage fImage fImage getImage fImageName fImage

Initializes the given preference store with the default marker annotation values param store the preference store to be initialized since 3 0 public static void initialize Default Values I Preference Store store boolean ignore Annotations Pref Page store get Boolean Abstract Decorated Text Editor Preference Constants USE ANNOTATIONS PREFERENCE PAGE boolean ignore Quick Diff Pref Page store get Boolean Abstract Decorated Text Editor Preference Constants USE QUICK DIFF PREFERENCE PAGE Marker Annotation Preferences preferences new Marker Annotation Preferences Iterator e preferences get Annotation Preferences iterator while e has Next Annotation Preference info Annotation Preference e next if ignore Annotations Pref Page info is Include On Preference Page is Complete info continue if ignore Quick Diff Pref Page info get Annotation Type equals org eclipse ui workbench texteditor quickdiff Change NON NLS 1 info get Annotation Type equals org eclipse ui workbench texteditor quickdiff Addition NON NLS 1 info get Annotation Type equals org eclipse ui workbench texteditor quickdiff Deletion NON NLS 1 continue store set Default info get Text Preference Key info get Text Preference Value store set Default info get Overview Ruler Preference Key info get Overview Ruler Preference Value if info get Vertical Ruler Preference Key null store set Default info get Vertical Ruler Preference Key info get Vertical Ruler Preference Value Preference Converter set Default store info get Color Preference Key info get Color Preference Value if info get Show In Next Prev Dropdown Toolbar Action Key null store set Default info get Show In Next Prev Dropdown Toolbar Action Key info is Show In Next Prev Dropdown Toolbar Action if info get Is Go To Next Navigation Target Key null store set Default info get Is Go To Next Navigation Target Key info is Go To Next Navigation Target if info get Is Go To Previous Navigation Target Key null store set Default info get Is Go To Previous Navigation Target Key info is Go To Previous Navigation Target if info get Highlight Preference Key null store set Default info get Highlight Preference Key info get Highlight Preference Value if info get Text Style Preference Key null store set Default info get Text Style Preference Key info get Text Style Value  initializeDefaultValues IPreferenceStore ignoreAnnotationsPrefPage getBoolean AbstractDecoratedTextEditorPreferenceConstants USE_ANNOTATIONS_PREFERENCE_PAGE ignoreQuickDiffPrefPage getBoolean AbstractDecoratedTextEditorPreferenceConstants USE_QUICK_DIFF_PREFERENCE_PAGE MarkerAnnotationPreferences MarkerAnnotationPreferences getAnnotationPreferences hasNext AnnotationPreference AnnotationPreference ignoreAnnotationsPrefPage isIncludeOnPreferencePage isComplete ignoreQuickDiffPrefPage getAnnotationType quickdiffChange getAnnotationType quickdiffAddition getAnnotationType quickdiffDeletion setDefault getTextPreferenceKey getTextPreferenceValue setDefault getOverviewRulerPreferenceKey getOverviewRulerPreferenceValue getVerticalRulerPreferenceKey setDefault getVerticalRulerPreferenceKey getVerticalRulerPreferenceValue PreferenceConverter setDefault getColorPreferenceKey getColorPreferenceValue getShowInNextPrevDropdownToolbarActionKey setDefault getShowInNextPrevDropdownToolbarActionKey isShowInNextPrevDropdownToolbarAction getIsGoToNextNavigationTargetKey setDefault getIsGoToNextNavigationTargetKey isGoToNextNavigationTarget getIsGoToPreviousNavigationTargetKey setDefault getIsGoToPreviousNavigationTargetKey isGoToPreviousNavigationTarget getHighlightPreferenceKey setDefault getHighlightPreferenceKey getHighlightPreferenceValue getTextStylePreferenceKey setDefault getTextStylePreferenceKey getTextStyleValue
Removes the marker annotation values which are shown on the general Annotations page from the given store and prevents setting the default values in the future p Note In order to work this method must be called before any call to link initialize Default Values I Preference Store p p This method is not part of the API and must only be called by link org eclipse ui editors text EditorsUI p param store the preference store to be initialized throws Illegal State Exception if not called by link org eclipse ui editors text EditorsUI since 3 0 public static void use Annotations Preference Page I Preference Store store throws Illegal State Exception check Access store put Value Abstract Decorated Text Editor Preference Constants USE ANNOTATIONS PREFERENCE PAGE Boolean to String true Marker Annotation Preferences preferences new Marker Annotation Preferences Iterator e preferences get Annotation Preferences iterator while e has Next Annotation Preference info Annotation Preference e next Only reset annotations shown on Annotations preference page if info is Include On Preference Page is Complete info continue store set To Default info get Text Preference Key store set To Default info get Overview Ruler Preference Key if info get Vertical Ruler Preference Key null store set To Default info get Vertical Ruler Preference Key store set To Default info get Color Preference Key if info get Show In Next Prev Dropdown Toolbar Action Key null store set To Default info get Show In Next Prev Dropdown Toolbar Action Key if info get Is Go To Next Navigation Target Key null store set To Default info get Is Go To Next Navigation Target Key if info get Is Go To Previous Navigation Target Key null store set To Default info get Is Go To Previous Navigation Target Key if info get Highlight Preference Key null store set To Default info get Highlight Preference Key if info get Text Style Preference Key null store set To Default info get Text Style Preference Key  initializeDefaultValues IPreferenceStore IllegalStateException useAnnotationsPreferencePage IPreferenceStore IllegalStateException checkAccess putValue AbstractDecoratedTextEditorPreferenceConstants USE_ANNOTATIONS_PREFERENCE_PAGE toString MarkerAnnotationPreferences MarkerAnnotationPreferences getAnnotationPreferences hasNext AnnotationPreference AnnotationPreference isIncludeOnPreferencePage isComplete setToDefault getTextPreferenceKey setToDefault getOverviewRulerPreferenceKey getVerticalRulerPreferenceKey setToDefault getVerticalRulerPreferenceKey setToDefault getColorPreferenceKey getShowInNextPrevDropdownToolbarActionKey setToDefault getShowInNextPrevDropdownToolbarActionKey getIsGoToNextNavigationTargetKey setToDefault getIsGoToNextNavigationTargetKey getIsGoToPreviousNavigationTargetKey setToDefault getIsGoToPreviousNavigationTargetKey getHighlightPreferenceKey setToDefault getHighlightPreferenceKey getTextStylePreferenceKey setToDefault getTextStylePreferenceKey
Removes the Quick Diff marker annotation values which are shown on the general Quick Diff page from the given store and prevents setting the default values in the future p Note In order to work this method must be called before any call to link initialize Default Values I Preference Store p p This method is not part of the API and must only be called by link EditorsUI p param store the preference store to be initialized throws Illegal State Exception if not called by link EditorsUI since 3 0 public static void use Quick Diff Preference Page I Preference Store store throws Illegal State Exception check Access store put Value Abstract Decorated Text Editor Preference Constants USE QUICK DIFF PREFERENCE PAGE Boolean to String true Marker Annotation Preferences preferences new Marker Annotation Preferences Iterator e preferences get Annotation Preferences iterator while e has Next Annotation Preference info Annotation Preference e next Only reset annotations shown on Quick Diff preference page if info get Annotation Type equals org eclipse ui workbench texteditor quickdiff Change NON NLS 1 info get Annotation Type equals org eclipse ui workbench texteditor quickdiff Addition NON NLS 1 info get Annotation Type equals org eclipse ui workbench texteditor quickdiff Deletion NON NLS 1 continue store set To Default info get Text Preference Key store set To Default info get Overview Ruler Preference Key if info get Vertical Ruler Preference Key null store set To Default info get Vertical Ruler Preference Key store set To Default info get Color Preference Key if info get Show In Next Prev Dropdown Toolbar Action Key null store set To Default info get Show In Next Prev Dropdown Toolbar Action Key if info get Is Go To Next Navigation Target Key null store set To Default info get Is Go To Next Navigation Target Key if info get Is Go To Previous Navigation Target Key null store set To Default info get Is Go To Previous Navigation Target Key if info get Highlight Preference Key null store set To Default info get Highlight Preference Key if info get Text Style Preference Key null store set To Default info get Text Style Preference Key  initializeDefaultValues IPreferenceStore IllegalStateException useQuickDiffPreferencePage IPreferenceStore IllegalStateException checkAccess putValue AbstractDecoratedTextEditorPreferenceConstants USE_QUICK_DIFF_PREFERENCE_PAGE toString MarkerAnnotationPreferences MarkerAnnotationPreferences getAnnotationPreferences hasNext AnnotationPreference AnnotationPreference getAnnotationType quickdiffChange getAnnotationType quickdiffAddition getAnnotationType quickdiffDeletion setToDefault getTextPreferenceKey setToDefault getOverviewRulerPreferenceKey getVerticalRulerPreferenceKey setToDefault getVerticalRulerPreferenceKey setToDefault getColorPreferenceKey getShowInNextPrevDropdownToolbarActionKey setToDefault getShowInNextPrevDropdownToolbarActionKey getIsGoToNextNavigationTargetKey setToDefault getIsGoToNextNavigationTargetKey getIsGoToPreviousNavigationTargetKey setToDefault getIsGoToPreviousNavigationTargetKey getHighlightPreferenceKey setToDefault getHighlightPreferenceKey getTextStylePreferenceKey setToDefault getTextStylePreferenceKey
Checks correct access throws Illegal State Exception if not called by link EditorsUI since 3 0 private static void check Access throws Illegal State Exception Stack Trace Element elements new Throwable get Stack Trace if elements 2 get Class Name equals EditorsUI class get Name elements 3 get Class Name equals EditorsUI class get Name throw new Illegal State Exception  IllegalStateException checkAccess IllegalStateException StackTraceElement getStackTrace getClassName getName getClassName getName IllegalStateException
Creates a new marker annotation preferences to access marker annotation preferences public Marker Annotation Preferences  MarkerAnnotationPreferences
Returns all extensions provided for the code marker Annotation Specification code extension point return all extensions provided for the code marker Annotation Specification code extension point public List get Annotation Preferences if f Preferences null initialize return f Preferences  markerAnnotationSpecification markerAnnotationSpecification getAnnotationPreferences fPreferences fPreferences
Returns all extensions provided for the code marker Annotation Specification code extension point including fragments Fragments share the preference part with a marker annotation specifications provided for a super type but do change the presentation part return all extensions provided for the code marker Annotation Specification code extension point including fragments public List get Annotation Preference Fragments if f Fragments null initialize return f Fragments  markerAnnotationSpecification markerAnnotationSpecification getAnnotationPreferenceFragments fFragments fFragments
public int compare Object o1 Object o2 if o1 o2 return 0 Annotation Preference ap1 Annotation Preference o1 Annotation Preference ap2 Annotation Preference o2 String label1 ap1 get Preference Label String label2 ap2 get Preference Label if label1 null label2 null return 0 if label1 null return 1 if label2 null return 1 return collator compare label1 label2  AnnotationPreference AnnotationPreference AnnotationPreference AnnotationPreference getPreferenceLabel getPreferenceLabel
Reads all extensions provided for the code marker Annotation Specification code extension point and translates them into code Annotation Preference code objects private void initialize initialize lists indicates that the initialization happened f Fragments new Array List 2 f Preferences new Array List 2 populate list I Extension Point extension Point Platform get Extension Registry get Extension Point EditorsUI PLUGIN ID marker Annotation Specification NON NLS 1 if extension Point null I Configuration Element elements extension Point get Configuration Elements for int i 0 i elements length i Annotation Preference spec create Spec elements i if spec null f Fragments add spec if is Complete spec f Preferences add spec final Collator collator Collator get Instance Collections sort f Fragments new Comparator see java util Comparator compare java lang Object java lang Object public int compare Object o1 Object o2 if o1 o2 return 0 Annotation Preference ap1 Annotation Preference o1 Annotation Preference ap2 Annotation Preference o2 String label1 ap1 get Preference Label String label2 ap2 get Preference Label if label1 null label2 null return 0 if label1 null return 1 if label2 null return 1 return collator compare label1 label2  markerAnnotationSpecification AnnotationPreference fFragments ArrayList fPreferences ArrayList IExtensionPoint extensionPoint getExtensionRegistry getExtensionPoint PLUGIN_ID markerAnnotationSpecification extensionPoint IConfigurationElement extensionPoint getConfigurationElements AnnotationPreference createSpec fFragments isComplete fPreferences getInstance fFragments AnnotationPreference AnnotationPreference AnnotationPreference AnnotationPreference getPreferenceLabel getPreferenceLabel
Checks if code spec code has all the attributes previously required by the marker annotation preference extension point These are color text and overview ruler preference keys param spec the code Annotation Preference code to check return code true code if code spec code is complete code false code otherwise since 3 0 private static boolean is Complete Annotation Preference spec return spec get Color Preference Key null spec get Color Preference Value null spec get Text Preference Key null spec get Overview Ruler Preference Key null  AnnotationPreference isComplete AnnotationPreference getColorPreferenceKey getColorPreferenceValue getTextPreferenceKey getOverviewRulerPreferenceKey
Creates a code Annotation Preference code the given configuration element param element the configuration element return the created annotation preference private Annotation Preference create Spec I Configuration Element element String s int i boolean b Annotation Preference info new Annotation Preference s element get Attribute annotation Type NON NLS 1 if s null s trim length 0 return null info set Annotation Type s s element get Attribute label NON NLS 1 if s null s trim length 0 info set Preference Label s s element get Attribute marker Type NON NLS 1 if s null s trim length 0 info set Marker Type s s element get Attribute marker Severity NON NLS 1 if s null s trim length 0 i String Converter as Int s I Marker SEVERITY INFO info set Severity i s element get Attribute text Preference Key NON NLS 1 if s null s trim length 0 info set Text Preference Key s s element get Attribute text Preference Value NON NLS 1 if s null s trim length 0 b String Converter as Boolean s false info set Text Preference Value b s element get Attribute highlight Preference Key NON NLS 1 if s null s trim length 0 info set Highlight Preference Key s s element get Attribute highlight Preference Value NON NLS 1 if s null s trim length 0 b String Converter as Boolean s false info set Highlight Preference Value b s element get Attribute overview Ruler Preference Key NON NLS 1 if s null s trim length 0 info set Overview Ruler Preference Key s s element get Attribute overview Ruler Preference Value NON NLS 1 if s null s trim length 0 b String Converter as Boolean s false info set Overview Ruler Preference Value b s element get Attribute vertical Ruler Preference Key NON NLS 1 if s null s trim length 0 info set Vertical Ruler Preference Key s s element get Attribute vertical Ruler Preference Value NON NLS 1 if s null s trim length 0 b String Converter as Boolean s true info set Vertical Ruler Preference Value b s element get Attribute color Preference Key NON NLS 1 if s null s trim length 0 info set Color Preference Key s s element get Attribute color Preference Value NON NLS 1 if s null s trim length 0 RGB rgb String Converter asRGB s info set Color Preference Value rgb null new RGB 0 0 0 rgb s element get Attribute presentation Layer NON NLS 1 if s null s trim length 0 i String Converter as Int s 0 info set Presentation Layer i s element get Attribute contributes To Header NON NLS 1 if s null s trim length 0 b String Converter as Boolean s false info set Contributes To Header b s element get Attribute show In Next Prev Dropdown Toolbar Action Key NON NLS 1 if s null s trim length 0 info set Show In Next Prev Dropdown Toolbar Action Key s s element get Attribute show In Next Prev Dropdown Toolbar Action NON NLS 1 if s null s trim length 0 b String Converter as Boolean s false info set Show In Next Prev Dropdown Toolbar Action b s element get Attribute is Go To Next Navigation Target Key NON NLS 1 if s null s trim length 0 info set Is Go To Next Navigation Target Key s s element get Attribute is Go To Next Navigation Target NON NLS 1 if s null s trim length 0 b String Converter as Boolean s false info set Is Go To Next Navigation Target b s element get Attribute is Go To Previous Navigation Target Key NON NLS 1 if s null s trim length 0 info set Is Go To Previous Navigation Target Key s s element get Attribute is Go To Previous Navigation Target NON NLS 1 if s null s trim length 0 b String Converter as Boolean s false info set Is Go To Previous Navigation Target b s element get Attribute symbolic Icon NON NLS 1 if s null s trim length 0 info set Symbolic Image Name s s element get Attribute icon NON NLS 1 if s null s trim length 0 info set Image Descriptor get Image Descriptor s element s element get Attribute annotation Image Provider NON NLS 1 if s null s trim length 0 info set Annotation Image Provider Data element annotation Image Provider NON NLS 1 s element get Attribute text Style Preference Key NON NLS 1 if s null s trim length 0 info set Text Style Preference Key s s element get Attribute text Style Preference Value NON NLS 1 if s null s trim length 0 if Annotation Preference STYLE BOX equals s Annotation Preference STYLE IBEAM equals s Annotation Preference STYLE SQUIGGLES equals s Annotation Preference STYLE UNDERLINE equals s info set Text Style Value s else info set Text Style Value Annotation Preference STYLE NONE s element get Attribute include On Preference Page NON NLS 1 info set Include On Preference Page s null String Converter as Boolean s true return info  AnnotationPreference AnnotationPreference createSpec IConfigurationElement AnnotationPreference AnnotationPreference getAttribute annotationType setAnnotationType getAttribute setPreferenceLabel getAttribute markerType setMarkerType getAttribute markerSeverity StringConverter asInt IMarker SEVERITY_INFO setSeverity getAttribute textPreferenceKey setTextPreferenceKey getAttribute textPreferenceValue StringConverter asBoolean setTextPreferenceValue getAttribute highlightPreferenceKey setHighlightPreferenceKey getAttribute highlightPreferenceValue StringConverter asBoolean setHighlightPreferenceValue getAttribute overviewRulerPreferenceKey setOverviewRulerPreferenceKey getAttribute overviewRulerPreferenceValue StringConverter asBoolean setOverviewRulerPreferenceValue getAttribute verticalRulerPreferenceKey setVerticalRulerPreferenceKey getAttribute verticalRulerPreferenceValue StringConverter asBoolean setVerticalRulerPreferenceValue getAttribute colorPreferenceKey setColorPreferenceKey getAttribute colorPreferenceValue StringConverter setColorPreferenceValue getAttribute presentationLayer StringConverter asInt setPresentationLayer getAttribute contributesToHeader StringConverter asBoolean setContributesToHeader getAttribute showInNextPrevDropdownToolbarActionKey setShowInNextPrevDropdownToolbarActionKey getAttribute showInNextPrevDropdownToolbarAction StringConverter asBoolean setShowInNextPrevDropdownToolbarAction getAttribute isGoToNextNavigationTargetKey setIsGoToNextNavigationTargetKey getAttribute isGoToNextNavigationTarget StringConverter asBoolean setIsGoToNextNavigationTarget getAttribute isGoToPreviousNavigationTargetKey setIsGoToPreviousNavigationTargetKey getAttribute isGoToPreviousNavigationTarget StringConverter asBoolean setIsGoToPreviousNavigationTarget getAttribute symbolicIcon setSymbolicImageName getAttribute setImageDescriptor getImageDescriptor getAttribute annotationImageProvider setAnnotationImageProviderData annotationImageProvider getAttribute textStylePreferenceKey setTextStylePreferenceKey getAttribute textStylePreferenceValue AnnotationPreference STYLE_BOX AnnotationPreference STYLE_IBEAM AnnotationPreference STYLE_SQUIGGLES AnnotationPreference STYLE_UNDERLINE setTextStyleValue setTextStyleValue AnnotationPreference STYLE_NONE getAttribute includeOnPreferencePage setIncludeOnPreferencePage StringConverter asBoolean
Returns the image descriptor for the icon path specified by the given configuration element param icon Path the icon path param element the configuration element return the image descriptor since 3 0 private Image Descriptor get Image Descriptor String icon Path I Configuration Element element String plugin Id element get Declaring Extension get Namespace Bundle bundle Platform get Bundle plugin Id if bundle null return null try return Image Descriptor create FromURL new URL bundle get Entry icon Path NON NLS 1 catch MalformedURL Exception x Editors Plugin log x return null  iconPath ImageDescriptor getImageDescriptor iconPath IConfigurationElement pluginId getDeclaringExtension getNamespace getBundle pluginId ImageDescriptor createFromURL getEntry iconPath MalformedURLException EditorsPlugin

Creates a new action for the given ruler and editor The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in link org eclipse ui texteditor Resource Action constructor or code null code if none param editor the editor param ruler the ruler param marker Type the type of marker param ask For Label code true code if the user should be asked for a label when a new marker is created see Resource Action Resource Action Resource Bundle String since 2 0 public Marker Ruler Action Resource Bundle bundle String prefix I Text Editor editor I Vertical Ruler Info ruler String marker Type boolean ask For Label super bundle prefix f Ruler ruler f Text Editor editor f Marker Type marker Type f Ask For Label ask For Label f Bundle bundle f Prefix prefix f Add Label get String bundle prefix add label prefix add label NON NLS 2 NON NLS 1 f Remove Label get String bundle prefix remove label prefix remove label NON NLS 2 NON NLS 1  ResourceAction markerType askForLabel ResourceAction ResourceAction ResourceBundle MarkerRulerAction ResourceBundle ITextEditor IVerticalRulerInfo markerType askForLabel fRuler fTextEditor fMarkerType markerType fAskForLabel askForLabel fBundle fPrefix fAddLabel getString fRemoveLabel getString
deprecated use code Marker Ruler Action Resource Bundle String I Text Editor I Vertical Ruler Info String boolean code instead public Marker Ruler Action Resource Bundle bundle String prefix I Vertical Ruler ruler I Text Editor editor String marker Type boolean ask For Label this bundle prefix editor ruler marker Type ask For Label  MarkerRulerAction ResourceBundle ITextEditor IVerticalRulerInfo MarkerRulerAction ResourceBundle IVerticalRuler ITextEditor markerType askForLabel markerType askForLabel
Returns this action s text editor return this action s text editor protected I Text Editor get Text Editor return f Text Editor  ITextEditor getTextEditor fTextEditor
Returns this action s vertical ruler return this action s vertical ruler deprecated use code get Vertical Ruler Info code instead protected I Vertical Ruler get Vertical Ruler if f Ruler instanceof I Vertical Ruler return I Vertical Ruler f Ruler return null  getVerticalRulerInfo IVerticalRuler getVerticalRuler fRuler IVerticalRuler IVerticalRuler fRuler
Returns this action s vertical ruler info return this action s vertical ruler info since 2 0 protected I Vertical Ruler Info get Vertical Ruler Info return f Ruler  IVerticalRulerInfo getVerticalRulerInfo fRuler
Returns this action s resource bundle return this action s resource bundle protected Resource Bundle get Resource Bundle return f Bundle  ResourceBundle getResourceBundle fBundle
Returns this action s resource key prefix return this action s resource key prefix protected String get Resource Key Prefix return f Prefix  getResourceKeyPrefix fPrefix
public void update bug 38745 int line get Vertical Ruler get Line Of Last Mouse Button Activity 1 I Document document get Document if document null if line get Document get Number Of Lines set Enabled false set Text f Add Label else set Enabled true f Markers get Markers set Text f Markers is Empty f Add Label f Remove Label  getVerticalRuler getLineOfLastMouseButtonActivity IDocument getDocument getDocument getNumberOfLines setEnabled setText fAddLabel setEnabled fMarkers getMarkers setText fMarkers isEmpty fAddLabel fRemoveLabel
public void run if f Markers is Empty add Marker else remove Markers f Markers  fMarkers isEmpty addMarker removeMarkers fMarkers
Returns the resource for which to create the marker or code null code if there is no applicable resource return the resource for which to create the marker or code null code protected I Resource get Resource I Editor Input input f Text Editor get Editor Input I Resource resource I Resource input get Adapter I File class if resource null resource I Resource input get Adapter I Resource class return resource  IResource getResource IEditorInput fTextEditor getEditorInput IResource IResource getAdapter IFile IResource getAdapter IResource
Returns the code Abstract Marker Annotation Model code of the editor s input return the marker annotation model protected Abstract Marker Annotation Model get Annotation Model I Document Provider provider f Text Editor get Document Provider I Annotation Model model provider get Annotation Model f Text Editor get Editor Input if model instanceof Abstract Marker Annotation Model return Abstract Marker Annotation Model model return null  AbstractMarkerAnnotationModel AbstractMarkerAnnotationModel getAnnotationModel IDocumentProvider fTextEditor getDocumentProvider IAnnotationModel getAnnotationModel fTextEditor getEditorInput AbstractMarkerAnnotationModel AbstractMarkerAnnotationModel
Returns the code I Document code of the editor s input return the document of the editor s input protected I Document get Document I Document Provider provider f Text Editor get Document Provider return provider get Document f Text Editor get Editor Input  IDocument IDocument getDocument IDocumentProvider fTextEditor getDocumentProvider getDocument fTextEditor getEditorInput
Checks whether a position includes the ruler s line of activity param position the position to be checked param document the document the position refers to return code true code if the line is included by the given position protected boolean includes Ruler Line Position position I Document document if position null try int marker Line document get Line Of Offset position get Offset int line f Ruler get Line Of Last Mouse Button Activity if line marker Line return true commented because of 1GEUOZ9 ITPJUI ALL Confusing UI for multi line Bookmarks and Tasks return marker Line line line document get Line Of Offset position get Offset position get Length catch Bad Location Exception x return false  includesRulerLine IDocument markerLine getLineOfOffset getOffset fRuler getLineOfLastMouseButtonActivity markerLine markerLine getLineOfOffset getOffset getLength BadLocationException
Handles core exceptions This implementation logs the exceptions with the workbench plug in and shows an error dialog param exception the exception to be handled param message the message to be logged with the given exception protected void handle Core Exception Core Exception exception String message Bundle bundle Platform get Bundle PlatformUI PLUGIN ID I Log log Platform get Log bundle if message null log log new Status I Status ERROR PlatformUI PLUGIN ID 0 message exception else log log exception get Status Shell shell get Text Editor get Site get Shell String title get String f Bundle f Prefix error dialog title f Prefix error dialog title NON NLS 2 NON NLS 1 String msg get String f Bundle f Prefix error dialog message f Prefix error dialog message NON NLS 2 NON NLS 1 Error Dialog open Error shell title msg exception get Status  handleCoreException CoreException getBundle PLUGIN_ID ILog getLog IStatus PLUGIN_ID getStatus getTextEditor getSite getShell getString fBundle fPrefix fPrefix getString fBundle fPrefix fPrefix ErrorDialog openError getStatus
Returns all markers which include the ruler s line of activity return all a list of markers which include the ruler s line of activity protected List get Markers List markers new Array List I Resource resource get Resource I Document document get Document Abstract Marker Annotation Model model get Annotation Model if resource null model null resource exists try I Marker all Markers resource find Markers f Marker Type true I Resource DEPTH ZERO if all Markers null for int i 0 i all Markers length i if includes Ruler Line model get Marker Position all Markers i document markers add all Markers i catch Core Exception x handle Core Exception x Text Editor Messages get String Marker Ruler Action get Marker NON NLS 1 return markers  getMarkers ArrayList IResource getResource IDocument getDocument AbstractMarkerAnnotationModel getAnnotationModel IMarker allMarkers findMarkers fMarkerType IResource DEPTH_ZERO allMarkers allMarkers includesRulerLine getMarkerPosition allMarkers allMarkers CoreException handleCoreException TextEditorMessages getString MarkerRulerAction getMarker
Creates a new marker according to the specification of this action and adds it to the marker resource protected void add Marker I Resource resource get Resource if resource null return Map attributes get Initial Attributes if f Ask For Label if ask For Label attributes return try Marker Utilities create Marker resource attributes f Marker Type catch Core Exception x handle Core Exception x Text Editor Messages get String Marker Ruler Action add Marker NON NLS 1  addMarker IResource getResource getInitialAttributes fAskForLabel askForLabel MarkerUtilities createMarker fMarkerType CoreException handleCoreException TextEditorMessages getString MarkerRulerAction addMarker
get Resource get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i markers size i I Marker marker I Marker markers get i marker delete  getResource getWorkspace IWorkspaceRunnable IProgressMonitor CoreException IMarker IMarker
Removes the given markers param markers the markers to be deleted protected void remove Markers final List markers try get Resource get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i markers size i I Marker marker I Marker markers get i marker delete null I Workspace AVOID UPDATE null catch Core Exception x handle Core Exception x Text Editor Messages get String Marker Ruler Action remove Markers NON NLS 1  removeMarkers getResource getWorkspace IWorkspaceRunnable IProgressMonitor CoreException IMarker IMarker IWorkspace AVOID_UPDATE CoreException handleCoreException TextEditorMessages getString MarkerRulerAction removeMarkers
String message get String f Bundle f Prefix add dialog message f Prefix add dialog message NON NLS 2 NON NLS 1 I Input Validator input Validator new I Input Validator public String is Valid String new Text return new Text null new Text trim length 0 null NON NLS 1  getString fBundle fPrefix fPrefix IInputValidator inputValidator IInputValidator isValid newText newText newText
Asks the user for a marker label Returns code true code if a label is entered code false code if the user cancels the input dialog Sets the value of the attribute code message code in the given map of attributes param attributes the map of attributes return code true code if the map of attributes has successfully been initialized protected boolean ask For Label Map attributes Object o attributes get message NON NLS 1 String proposal o instanceof String String o NON NLS 1 if proposal null proposal NON NLS 1 String title get String f Bundle f Prefix add dialog title f Prefix add dialog title NON NLS 2 NON NLS 1 String message get String f Bundle f Prefix add dialog message f Prefix add dialog message NON NLS 2 NON NLS 1 I Input Validator input Validator new I Input Validator public String is Valid String new Text return new Text null new Text trim length 0 null NON NLS 1 Input Dialog dialog new Input Dialog f Text Editor get Site get Shell title message proposal input Validator String label null if dialog open Window CANCEL label dialog get Value if label null return false label label trim if label length 0 return false Marker Utilities set Message attributes label return true  askForLabel getString fBundle fPrefix fPrefix getString fBundle fPrefix fPrefix IInputValidator inputValidator IInputValidator isValid newText newText newText InputDialog InputDialog fTextEditor getSite getShell inputValidator getValue MarkerUtilities setMessage
Returns the attributes with which a newly created marker will be initialized return the initial marker attributes protected Map get Initial Attributes Map attributes new Hash Map 11 I Document Provider provider f Text Editor get Document Provider I Document document provider get Document f Text Editor get Editor Input int line f Ruler get Line Of Last Mouse Button Activity int start 1 int end 1 int length 0 try I Region line Information document get Line Information line start line Information get Offset length line Information get Length end start length catch Bad Location Exception x marker line numbers are 1 based Marker Utilities set Message attributes get Label Proposal document start length Marker Utilities set Line Number attributes line 1 Marker Utilities set Char Start attributes start Marker Utilities set Char End attributes end return attributes  getInitialAttributes HashMap IDocumentProvider fTextEditor getDocumentProvider IDocument getDocument fTextEditor getEditorInput fRuler getLineOfLastMouseButtonActivity IRegion lineInformation getLineInformation lineInformation getOffset lineInformation getLength BadLocationException MarkerUtilities setMessage getLabelProposal MarkerUtilities setLineNumber MarkerUtilities setCharStart MarkerUtilities setCharEnd
Returns the initial label for the marker param document the document from which to extract a label proposal param offset the document offset of the range from which to extract the label proposal param length the length of the range from which to extract the label proposal return the label proposal since 3 0 protected String get Label Proposal I Document document int offset int length try String label document get offset length trim if label length MAX LABEL LENGTH return label else return label substring 0 MAX LABEL LENGTH catch Bad Location Exception x don t proposal label then return null  getLabelProposal IDocument MAX_LABEL_LENGTH MAX_LABEL_LENGTH BadLocationException

deprecated use super class instead public Marker Ruler Info Action Resource Bundle bundle String prefix I Vertical Ruler Info ruler I Text Editor editor String marker Type boolean ask For Label super bundle prefix editor ruler marker Type ask For Label  MarkerRulerInfoAction ResourceBundle IVerticalRulerInfo ITextEditor markerType askForLabel markerType askForLabel

see I Marker Updater get Attribute public String get Attribute return ATTRIBUTES  IMarkerUpdater getAttribute getAttribute
see I Marker Updater get Marker Type public String get Marker Type return null  IMarkerUpdater getMarkerType getMarkerType
public boolean update Marker I Marker marker I Document document Position position if position is Deleted return false if Marker Utilities get Char Start marker 1 Marker Utilities get Char End marker 1 Marker Utilities set Char Start marker position get Offset Marker Utilities set Char End marker position get Offset position get Length if Marker Utilities get Line Number marker 1 try marker line numbers are 1 based Marker Utilities set Line Number marker document get Line Of Offset position get Offset 1 catch Bad Location Exception x return true  updateMarker IMarker IDocument isDeleted MarkerUtilities getCharStart MarkerUtilities getCharEnd MarkerUtilities setCharStart getOffset MarkerUtilities setCharEnd getOffset getLength MarkerUtilities getLineNumber MarkerUtilities setLineNumber getLineOfOffset getOffset BadLocationException

public String get Super Types String type Name String cached Types String f Super Types Cache get type Name if cached Types null cached Types compute Super Types type Name f Super Types Cache put type Name cached Types return cached Types  getSuperTypes typeName cachedTypes fSuperTypesCache typeName cachedTypes cachedTypes computeSuperTypes typeName fSuperTypesCache typeName cachedTypes cachedTypes
private String compute Super Types String type Name Array List types new Array List append All types get Direct Super Types type Name int index 0 while index types size String type String types get index append All types get Direct Super Types type String super Types new String types size types to Array super Types return super Types  computeSuperTypes typeName ArrayList ArrayList appendAll getDirectSuperTypes typeName appendAll getDirectSuperTypes superTypes toArray superTypes superTypes
private String get Direct Super Types String type Name return String get Type Map get type Name  getDirectSuperTypes typeName getTypeMap typeName
private void append All List list Object objects for int i 0 i objects length i Object o objects i if list contains o list add o  appendAll
private Map get Type Map if f Type Map null f Type Map read Types return f Type Map  getTypeMap fTypeMap fTypeMap readTypes fTypeMap
private Map read Types Hash Map all Types new Hash Map I Extension Point point Platform get Extension Registry get Extension Point Resources Plugin PI RESOURCES Resources Plugin PT MARKERS if point null I Extension extensions point get Extensions for int i 0 i extensions length i I Extension extension extensions i Array List types new Array List I Configuration Element config Elements extension get Configuration Elements for int j 0 j config Elements length j I Configuration Element element config Elements j if element get Name equals Ignore Case super NON NLS 1 String type element get Attribute type NON NLS 1 if type null types add type String super Types new String types size types to Array super Types all Types put extension get Unique Identifier super Types return all Types  readTypes HashMap allTypes HashMap IExtensionPoint getExtensionRegistry getExtensionPoint ResourcesPlugin PI_RESOURCES ResourcesPlugin PT_MARKERS IExtension getExtensions IExtension ArrayList ArrayList IConfigurationElement configElements getConfigurationElements configElements IConfigurationElement configElements getName equalsIgnoreCase getAttribute superTypes toArray superTypes allTypes getUniqueIdentifier superTypes allTypes
Don t allow instantiation private Marker Utilities  MarkerUtilities
Returns the ending character offset of the given marker param marker the marker return the ending character offset or code 1 code if not set see I Marker CHAR END see I Marker get Attribute java lang String int public static int get Char End I Marker marker return get Int Attribute marker I Marker CHAR END 1  IMarker CHAR_END IMarker getAttribute getCharEnd IMarker getIntAttribute IMarker CHAR_END
Returns the starting character offset of the given marker param marker the marker return the starting character offset or code 1 code if not set see I Marker CHAR START see I Marker get Attribute java lang String int public static int get Char Start I Marker marker return get Int Attribute marker I Marker CHAR START 1  IMarker CHAR_START IMarker getAttribute getCharStart IMarker getIntAttribute IMarker CHAR_START
Returns the specified attribute of the given marker as an integer Returns the given default if the attribute value is not an integer param markerthe marker param attribute Namethe name of the attribute param default Valuethe default value return the attribute s value or the default value if the attribute does not exist or isn t an int private static int get Int Attribute I Marker marker String attribute Name int default Value if marker exists return marker get Attribute attribute Name default Value return default Value  attributeNamethe defaultValuethe getIntAttribute IMarker attributeName defaultValue getAttribute attributeName defaultValue defaultValue
Returns the line number of the given marker param marker the marker return the line number or code 1 code if not set see I Marker LINE NUMBER see I Marker get Attribute java lang String int public static int get Line Number I Marker marker return get Int Attribute marker I Marker LINE NUMBER 1  IMarker LINE_NUMBER IMarker getAttribute getLineNumber IMarker getIntAttribute IMarker LINE_NUMBER
Returns the priority of the given marker param marker the marker return the priority or code I Marker PRIORITY NORMAL code if not set see I Marker PRIORITY see I Marker PRIORITY NORMAL see I Marker get Attribute java lang String int public static int get Priority I Marker marker return get Int Attribute marker I Marker PRIORITY I Marker PRIORITY NORMAL  IMarker PRIORITY_NORMAL IMarker IMarker PRIORITY_NORMAL IMarker getAttribute getPriority IMarker getIntAttribute IMarker IMarker PRIORITY_NORMAL
Returns the severity of the given marker param marker the marker return the priority or code I Marker SEVERITY INFO code if not set see I Marker SEVERITY see I Marker SEVERITY INFO see I Marker get Attribute java lang String int public static int get Severity I Marker marker return get Int Attribute marker I Marker SEVERITY I Marker SEVERITY INFO  IMarker SEVERITY_INFO IMarker IMarker SEVERITY_INFO IMarker getAttribute getSeverity IMarker getIntAttribute IMarker IMarker SEVERITY_INFO
Handles a core exception which occurs when accessing marker attributes param e the core exception private static void handle Core Exception Core Exception e Bundle bundle Platform get Bundle PlatformUI PLUGIN ID I Log log Platform get Log bundle log log e get Status  handleCoreException CoreException getBundle PLUGIN_ID ILog getLog getStatus
Returns whether the given marker is of the given type either directly or indirectly param marker the marker to be checked param type the reference type return code true code if maker is an instance of the reference type public static boolean is Marker Type I Marker marker String type if marker null try return marker exists marker is Subtype Of type catch Core Exception x handle Core Exception x return false  isMarkerType IMarker isSubtypeOf CoreException handleCoreException
Returns the marker type of the given marker or code null code if the type could not be determined param marker the marker return the marker type since 3 0 public static String get Marker Type I Marker marker try return marker get Type catch Core Exception x handle Core Exception x return null  getMarkerType IMarker getType CoreException handleCoreException
Returns the message associated with the given marker param marker the marker return the message associated with the marker or code null code since 3 0 public static String get Message I Marker marker return marker get Attribute I Marker MESSAGE null  getMessage IMarker getAttribute IMarker
Sets the ending character offset of the given marker param marker the marker param char End the ending character offset see I Marker CHAR END see I Marker set Attribute java lang String int public static void set Char End I Marker marker int char End set Int Attribute marker I Marker CHAR END char End  charEnd IMarker CHAR_END IMarker setAttribute setCharEnd IMarker charEnd setIntAttribute IMarker CHAR_END charEnd
Sets the ending character offset in the given map using the standard marker attribute name as the key param map the map key type code String code value type code Object code param char End the ending character offset see I Marker CHAR END public static void set Char End Map map int char End map put I Marker CHAR END new Integer char End  charEnd IMarker CHAR_END setCharEnd charEnd IMarker CHAR_END charEnd
Sets the starting character offset of the given marker param marker the marker param char Start the starting character offset see I Marker CHAR START see I Marker set Attribute java lang String int public static void set Char Start I Marker marker int char Start set Int Attribute marker I Marker CHAR START char Start  charStart IMarker CHAR_START IMarker setAttribute setCharStart IMarker charStart setIntAttribute IMarker CHAR_START charStart
Sets the starting character offset in the given map using the standard marker attribute name as the key param map the map key type code String code value type code Object code param char Start the starting character offset see I Marker CHAR START public static void set Char Start Map map int char Start map put I Marker CHAR START new Integer char Start  charStart IMarker CHAR_START setCharStart charStart IMarker CHAR_START charStart
Sets the specified attribute of the given marker as an integer param marker the marker param attribute Name the attribute name param value the int value private static void set Int Attribute I Marker marker String attribute Name int value try if marker exists marker set Attribute attribute Name value catch Core Exception e handle Core Exception e  attributeName setIntAttribute IMarker attributeName setAttribute attributeName CoreException handleCoreException
Sets the line number of the given marker param marker the marker param line Num the line number see I Marker LINE NUMBER see I Marker set Attribute java lang String int public static void set Line Number I Marker marker int line Num set Int Attribute marker I Marker LINE NUMBER line Num  lineNum IMarker LINE_NUMBER IMarker setAttribute setLineNumber IMarker lineNum setIntAttribute IMarker LINE_NUMBER lineNum
Sets the line number in the given map using the standard marker attribute name as the key param map the map key type code String code value type code Object code param line Num the line number see I Marker LINE NUMBER public static void set Line Number Map map int line Num map put I Marker LINE NUMBER new Integer line Num  lineNum IMarker LINE_NUMBER setLineNumber lineNum IMarker LINE_NUMBER lineNum
Sets the message in the given map using the standard marker attribute name as the key param map the map key type code String code value type code Object code param message the message see I Marker MESSAGE public static void set Message Map map String message map put I Marker MESSAGE message  IMarker setMessage IMarker
I Workspace Runnable r new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception I Marker marker resource create Marker marker Type marker set Attributes attributes  IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException IMarker createMarker markerType setAttributes
Creates a marker on the given resource with the given type and attributes p This method modifies the workspace progress is not reported to the user p param resource the resource param attributes the attribute map key type code String code value type code Object code param marker Type the type of marker throws Core Exception if this method fails see I Resource create Marker java lang String public static void create Marker final I Resource resource final Map attributes final String marker Type throws Core Exception I Workspace Runnable r new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception I Marker marker resource create Marker marker Type marker set Attributes attributes resource get Workspace run r null I Workspace AVOID UPDATE null  markerType CoreException IResource createMarker createMarker IResource markerType CoreException IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor CoreException IMarker createMarker markerType setAttributes getWorkspace IWorkspace AVOID_UPDATE
Returns the list of super types for the given marker The list is a depth first list and maintains the sequence in which the super types are listed in the marker specification param marker Type the marker s type return a depth first list of all super types of the given marker type public static String get Super Types String marker Type if fg Marker Type Hierarchy null fg Marker Type Hierarchy new Marker Type Hierarchy return fg Marker Type Hierarchy get Super Types marker Type  markerType getSuperTypes markerType fgMarkerTypeHierarchy fgMarkerTypeHierarchy MarkerTypeHierarchy fgMarkerTypeHierarchy getSuperTypes markerType

Creates a Mark Region Taret param viewer the text viewer param manager the status line manager public Mark Region Target I Text Viewer viewer I Status Line Manager manager f Viewer viewer f Status Line manager  MarkRegionTaret MarkRegionTarget ITextViewer IStatusLineManager fViewer fStatusLine
public void set Mark At Cursor boolean set if f Viewer instanceof I Text Viewer Extension return I Text Viewer Extension viewer Extension I Text Viewer Extension f Viewer if set Point selection f Viewer get Selected Range viewer Extension set Mark selection x f Status Line set Error Message NON NLS 1 f Status Line set Message Editor Messages get String Editor mark status message mark set NON NLS 1 else viewer Extension set Mark 1 f Status Line set Error Message NON NLS 1 f Status Line set Message Editor Messages get String Editor mark status message mark cleared NON NLS 1  setMarkAtCursor fViewer ITextViewerExtension ITextViewerExtension viewerExtension ITextViewerExtension fViewer fViewer getSelectedRange viewerExtension setMark fStatusLine setErrorMessage fStatusLine setMessage EditorMessages getString viewerExtension setMark fStatusLine setErrorMessage fStatusLine setMessage EditorMessages getString
public void swap Mark And Cursor if f Viewer instanceof I Text Viewer Extension return I Text Viewer Extension viewer Extension I Text Viewer Extension f Viewer int mark Position viewer Extension get Mark if mark Position 1 f Status Line set Error Message Editor Messages get String Mark Region Target mark Not Set NON NLS 1 f Status Line set Message NON NLS 1 return if is Visible f Viewer mark Position f Status Line set Error Message Editor Messages get String Mark Region Target mark Not Visible NON NLS 1 f Status Line set Message NON NLS 1 return Point selection f Viewer get Selected Range viewer Extension set Mark selection x f Viewer set Selected Range mark Position 0 f Viewer reveal Range mark Position 0 f Status Line set Error Message NON NLS 1 f Status Line set Message Editor Messages get String Editor mark status message mark swapped NON NLS 1  swapMarkAndCursor fViewer ITextViewerExtension ITextViewerExtension viewerExtension ITextViewerExtension fViewer markPosition viewerExtension getMark markPosition fStatusLine setErrorMessage EditorMessages getString MarkRegionTarget markNotSet fStatusLine setMessage isVisible fViewer markPosition fStatusLine setErrorMessage EditorMessages getString MarkRegionTarget markNotVisible fStatusLine setMessage fViewer getSelectedRange viewerExtension setMark fViewer setSelectedRange markPosition fViewer revealRange markPosition fStatusLine setErrorMessage fStatusLine setMessage EditorMessages getString
Tells whether the given offset is visible in the given text viewer param viewer the text viewer param offset the offset to check return code true code if the given offset is visible in the given text viewer since 2 1 protected final static boolean is Visible I Text Viewer viewer int offset if viewer instanceof I Text Viewer Extension5 I Text Viewer Extension5 extension I Text Viewer Extension5 viewer return extension model Offset2 Widget Offset offset 0 else I Region region viewer get Visible Region int v Offset region get Offset return v Offset offset offset v Offset region get Length  isVisible ITextViewer ITextViewerExtension5 ITextViewerExtension5 ITextViewerExtension5 modelOffset2WidgetOffset IRegion getVisibleRegion vOffset getOffset vOffset vOffset getLength

Installs the exit strategy with all event sources public void install if f Is Installed uninstall f Is Installed true I Source Viewer viewer f Editor get Source Viewer if viewer null return f Widget Event Source viewer get Text Widget if f Widget Event Source null return f Widget Event Source add Verify Key Listener this f Widget Event Source add Mouse Listener this f Widget Event Source add Focus Listener this f Document Event Source viewer get Document if f Document Event Source null f Document Event Source add Document Listener this  fIsInstalled fIsInstalled ISourceViewer fEditor getSourceViewer fWidgetEventSource getTextWidget fWidgetEventSource fWidgetEventSource addVerifyKeyListener fWidgetEventSource addMouseListener fWidgetEventSource addFocusListener fDocumentEventSource getDocument fDocumentEventSource fDocumentEventSource addDocumentListener
Uninstalls the exit strategy with all event sources it was previously registered with public void uninstall if f Widget Event Source null f Widget Event Source remove Verify Key Listener this f Widget Event Source remove Mouse Listener this f Widget Event Source remove Focus Listener this f Widget Event Source null if f Document Event Source null f Document Event Source remove Document Listener this f Document Event Source null f Is Installed false  fWidgetEventSource fWidgetEventSource removeVerifyKeyListener fWidgetEventSource removeMouseListener fWidgetEventSource removeFocusListener fWidgetEventSource fDocumentEventSource fDocumentEventSource removeDocumentListener fDocumentEventSource fIsInstalled
public void verify Key Verify Event event if event state Mask f State Mask end Compound Edit  verifyKey VerifyEvent stateMask fStateMask endCompoundEdit
public void mouse Double Click Mouse Event e end Compound Edit  mouseDoubleClick MouseEvent endCompoundEdit
public void mouse Down Mouse Event e end Compound Edit  mouseDown MouseEvent endCompoundEdit
public void mouse Up Mouse Event e  mouseUp MouseEvent
public void mouse Up Mouse Event e public void focus Lost Focus Event e end Compound Edit  mouseUp MouseEvent focusLost FocusEvent endCompoundEdit
public void focus Gained Focus Event e  focusGained FocusEvent
public void focus Gained Focus Event e public void document About To Be Changed Document Event event don t do this since it will break interaction between the move Up and move Down actions if f Description corresponds To event end Compound Edit  focusGained FocusEvent documentAboutToBeChanged DocumentEvent moveUp moveDown fDescription correspondsTo endCompoundEdit
public void document Changed Document Event event  documentChanged DocumentEvent
Creates and initializes the action for the given text editor The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the text editor param upwards code true code if the selected lines should be moved upwards code false code if downwards param copy if code true code the action will copy lines instead of moving them see Text Editor Action Text Editor Action Resource Bundle String I Text Editor public Move Lines Action Resource Bundle bundle String prefix Abstract Text Editor editor boolean upwards boolean copy super bundle prefix editor f Editor editor f Upwards upwards f Copy copy update  ResourceAction TextEditorAction TextEditorAction ResourceBundle ITextEditor MoveLinesAction ResourceBundle AbstractTextEditor fEditor fUpwards fCopy
Ends the compound change private void begin Compound Edit if f Edit In Progress f Editor null return f Edit In Progress true f Exit Strategy install I Rewrite Target target I Rewrite Target f Editor get Adapter I Rewrite Target class if target null target begin Compound Change  beginCompoundEdit fEditInProgress fEditor fEditInProgress fExitStrategy IRewriteTarget IRewriteTarget fEditor getAdapter IRewriteTarget beginCompoundChange
Checks if code selection code is contained by the visible region of code viewer code As a special case a selection is considered contained even if it extends over the visible region but the extension stays on a partially contained line and contains only white space param selection the selection to be checked param viewer the viewer displaying a visible region of code selection code s document return code true code if code selection code is contained code false code otherwise private boolean contained By Visible Region I Text Selection selection I Source Viewer viewer int min selection get Offset int max min selection get Length I Document document viewer get Document I Region visible if viewer instanceof I Text Viewer Extension5 visible I Text Viewer Extension5 viewer get Model Coverage else visible viewer get Visible Region int vis Offset visible get Offset try if vis Offset min if document get Line Of Offset vis Offset selection get Start Line return false if is Whitespace document get min vis Offset min show Status return false int vis End vis Offset visible get Length if vis End max if document get Line Of Offset vis End selection get End Line return false if is Whitespace document get vis End max vis End show Status return false return true catch Bad Location Exception e return false  containedByVisibleRegion ITextSelection ISourceViewer getOffset getLength IDocument getDocument IRegion ITextViewerExtension5 ITextViewerExtension5 getModelCoverage getVisibleRegion visOffset getOffset visOffset getLineOfOffset visOffset getStartLine isWhitespace visOffset showStatus visEnd visOffset getLength visEnd getLineOfOffset visEnd getEndLine isWhitespace visEnd visEnd showStatus BadLocationException
Ends the compound change private void end Compound Edit if f Edit In Progress f Editor null return f Exit Strategy uninstall I Rewrite Target target I Rewrite Target f Editor get Adapter I Rewrite Target class if target null target end Compound Change f Edit In Progress false  endCompoundEdit fEditInProgress fEditor fExitStrategy IRewriteTarget IRewriteTarget fEditor getAdapter IRewriteTarget endCompoundChange fEditInProgress
Given a selection on a document computes the lines fully or partially covered by code selection code A line in the document is considered covered if code selection code comprises any characters on it including the terminating delimiter p Note that the last line in a selection is not considered covered if the selection only comprises the line delimiter at its beginning that is considered part of the second last line As a special case if the selection is empty a line is considered covered if the caret is at any position in the line including between the delimiter and the start of the line The line containing the delimiter is not considered covered in that case p param document the document code selection code refers to param selection a selection on code document code param viewer the code I Source Viewer code displaying code document code return a selection describing the range of lines partially covered by code selection code without any terminating line delimiters throws Bad Location Exception if the selection is out of bounds when the underlying document has changed during the call private I Text Selection get Moving Selection I Document document I Text Selection selection I Source Viewer viewer throws Bad Location Exception int low document get Line Offset selection get Start Line int end Line selection get End Line int high document get Line Offset end Line document get Line Length end Line get everything up to last line without its delimiter String delim document get Line Delimiter end Line if delim null high delim length the new selection will cover the entire lines being moved except for the last line s delimiter The exception to this rule is an empty last line which will stay covered including its delimiter if delim null document get Line Length end Line delim length f Add Delimiter true else f Add Delimiter false return new Text Selection document low high low  ISourceViewer BadLocationException ITextSelection getMovingSelection IDocument ITextSelection ISourceViewer BadLocationException getLineOffset getStartLine endLine getEndLine getLineOffset endLine getLineLength endLine getLineDelimiter endLine getLineLength endLine fAddDelimiter fAddDelimiter TextSelection
Computes the region of the skipped line given the text block to be moved If code f Upwards code is code true code the line above code selection code is selected otherwise the line below param document the document code selection code refers to param selection the selection on code document code that will be moved return the region comprising the line that code selection code will be moved over without its terminating delimiter private I Text Selection get Skipped Line I Document document I Text Selection selection int skipped LineN f Upwards selection get Start Line 1 selection get End Line 1 if skipped LineN 0 skipped LineN document get Number Of Lines return null try I Region line document get Line Information skipped LineN return new Text Selection document line get Offset line get Length catch Bad Location Exception e only happens on concurrent modifications return null  fUpwards ITextSelection getSkippedLine IDocument ITextSelection skippedLineN fUpwards getStartLine getEndLine skippedLineN skippedLineN getNumberOfLines IRegion getLineInformation skippedLineN TextSelection getOffset getLength BadLocationException
Checks for white space in a string param string the string to be checked or code null code return code true code if code string code contains only white space or is code null code code false code otherwise private boolean is Whitespace String string return string null true string trim length 0  isWhitespace
public void run With Event Event event update Short Cut event get involved objects if f Editor null return if validate Editor Input State return I Source Viewer viewer f Editor get Source Viewer if viewer null return I Document document viewer get Document if document null return Styled Text widget viewer get Text Widget if widget null return get selection Point p viewer get Selected Range if p null return I Text Selection sel new Text Selection document p x p y I Text Selection skipped Line get Skipped Line document sel if skipped Line null return try I Text Selection moving Area get Moving Selection document sel viewer if either the skipped line or the moving lines are outside the widget s visible area bail out if contained By Visible Region moving Area viewer contained By Visible Region skipped Line viewer return get the content to be moved around the moving selected area and the skipped line String moving moving Area get Text String skipped skipped Line get Text if moving null skipped null return String delim String insertion int offset deviation if f Upwards delim document get Line Delimiter skipped Line get End Line Assert is Not Null delim if f Copy insertion moving delim offset moving Area get Offset deviation 0 else insertion moving delim skipped offset skipped Line get Offset deviation skipped Line get Length delim length else delim document get Line Delimiter moving Area get End Line Assert is Not Null delim if f Copy insertion moving delim offset skipped Line get Offset deviation moving Area get Length delim length else insertion skipped delim moving offset moving Area get Offset deviation skipped length delim length modify the document begin Compound Edit if f Copy f Description new Edit Description offset 0 insertion length document replace offset 0 insertion else f Description new Edit Description offset insertion length insertion length document replace offset insertion length insertion move the selection along int sel Offset moving Area get Offset deviation int sel Length moving Area get Length f Add Delimiter delim length 0 if viewer instanceof I Text Viewer Extension5 sel Length Math min sel Length viewer get Visible Region get Offset viewer get Visible Region get Length sel Offset else TODO need to check what is necessary in the projection case select And Reveal viewer sel Offset sel Length catch Bad Location Exception x won t happen without concurrent modification bail out return  runWithEvent updateShortCut fEditor validateEditorInputState ISourceViewer fEditor getSourceViewer IDocument getDocument StyledText getTextWidget getSelectedRange ITextSelection TextSelection ITextSelection skippedLine getSkippedLine skippedLine ITextSelection movingArea getMovingSelection containedByVisibleRegion movingArea containedByVisibleRegion skippedLine movingArea getText skippedLine getText fUpwards getLineDelimiter skippedLine getEndLine isNotNull fCopy movingArea getOffset skippedLine getOffset skippedLine getLength getLineDelimiter movingArea getEndLine isNotNull fCopy skippedLine getOffset movingArea getLength movingArea getOffset beginCompoundEdit fCopy fDescription EditDescription fDescription EditDescription selOffset movingArea getOffset selLength movingArea getLength fAddDelimiter ITextViewerExtension5 selLength selLength getVisibleRegion getOffset getVisibleRegion getLength selOffset selectAndReveal selOffset selLength BadLocationException
Saves the state mask of code event code for comparison with the next event in order to detect key changes in the set of keys pressed by the user param event the event that triggered this action private void update Short Cut Event event f State Mask event state Mask  updateShortCut fStateMask stateMask
Performs similar to Abstract Text Editor select And Reveal but does not update the viewers highlight area param viewer the viewer that we want to select on param offset the offset of the selection param length the length of the selection private void select And Reveal I Text Viewer viewer int offset int length invert selection to avoid jumping to the end of the selection in st show Selection viewer set Selected Range offset length length viewer reveal Range offset length will trigger jumping Styled Text st viewer get Text Widget if st null st show Selection only minimal scrolling  AbstractTextEditor selectAndReveal selectAndReveal ITextViewer showSelection setSelectedRange revealRange StyledText getTextWidget showSelection
Displays information in the status line why a line move is not possible private void show Status I Editor Status Line status I Editor Status Line f Editor get Adapter I Editor Status Line class if status null return status set Message false Editor Messages get String ILLEGAL MOVE null  showStatus IEditorStatusLine IEditorStatusLine fEditor getAdapter IEditorStatusLine setMessage EditorMessages getString ILLEGAL_MOVE
public void update super update if is Enabled set Enabled can Modify Editor  isEnabled setEnabled canModifyEditor

deprecated use Workbench Chained Text Font Field Editor public Propagating Font Field Editor String name String label Text Composite parent super name label Text parent  WorkbenchChainedTextFontFieldEditor PropagatingFontFieldEditor labelText labelText

public interface I Quick Diff Reference Provider Returns the reference document for the quick diff display param monitor a preference monitor to monitor cancel the process or code null code return the reference document for the quick diff display or code null code if getting the document was canceled or there is no reference available throws Core Exception if getting the document fails  IQuickDiffReferenceProvider CoreException
I Document get Reference I Progress Monitor monitor throws Core Exception Called when the reference is no longer used and the provider can free resources void dispose  IDocument getReference IProgressMonitor CoreException
Returns the id of this reference provider return the id of this provider as stated in the extending plugin s manifest 
Sets the active editor for the provider implementation Will usually just be called right after creation of the implementation param editor the active editor 
Gives the implementation a hook to publish its enablement The action corresponding to this implementation might be grayed out or not shown at all based on the value presented here return code false code if the implementation cannot be executed code true code if it can or if it cannot be decided yet 
Sets the id of this implementation This method will be called right after creation and code id code will be set to the code Id code attribute specified in the extension s declaration param id the provider s new id 

Creates a new instance public Quick Diff  QuickDiff
Returns the first descriptor with the code default code attribute set to code true code p Clients should not cache this value because it can change when plug ins get dynamically added or removed p return the descriptor of the default reference provider or code null code if none public Reference Provider Descriptor get Default Provider Quick Diff Extensions Registry registry Text Editor Plugin get Default get Quick Diff Extension Registry if registry null return registry get Default Provider return null  ReferenceProviderDescriptor getDefaultProvider QuickDiffExtensionsRegistry TextEditorPlugin getDefault getQuickDiffExtensionRegistry getDefaultProvider
Returns a non modifiable list of code Reference Provider Descriptor code describing all extension to the code quick Diff Reference Provider code extension point p Clients should not cache this list because it can change when plug ins get dynamically added or removed p return the non modifiable list of extensions to the code quick Diff Reference Provider code extension point public List get Reference Provider Descriptors Quick Diff Extensions Registry registry Text Editor Plugin get Default get Quick Diff Extension Registry if registry null return registry get Reference Provider Descriptors return Collections EMPTY LIST  ReferenceProviderDescriptor quickDiffReferenceProvider quickDiffReferenceProvider getReferenceProviderDescriptors QuickDiffExtensionsRegistry TextEditorPlugin getDefault getQuickDiffExtensionRegistry getReferenceProviderDescriptors EMPTY_LIST
Returns the quick diff reference provider registered under code id code or the default reference provider The returned provider gets its editor set to code editor code If neither the requested provider nor the default provider return code true code from code is Enabled code after having the editor set code null code is returned p Clients should not cache this value because it can change when plug ins get dynamically added or removed p param editor the editor to be installed with the returned provider param id the id as specified in the code plugin xml code that installs the reference provider return the reference provider registered under code id code or the default reference provider or code null code public I Quick Diff Reference Provider get Reference Provider Or Default I Text Editor editor String id Assert is Not Null editor Assert is Not Null id List descs get Reference Provider Descriptors I Quick Diff Reference Provider provider null try to fetch preferred provider load if needed for Iterator iter descs iterator iter has Next Reference Provider Descriptor desc Reference Provider Descriptor iter next if desc get Id equals id provider desc create Provider if provider null provider set Active Editor editor if provider is Enabled break provider dispose provider null if not found get default provider as specified by the extension point if provider null Reference Provider Descriptor default Descriptor get Default Provider if default Descriptor null provider default Descriptor create Provider if provider null provider set Active Editor editor if provider is Enabled provider dispose provider null return provider  isEnabled IQuickDiffReferenceProvider getReferenceProviderOrDefault ITextEditor isNotNull isNotNull getReferenceProviderDescriptors IQuickDiffReferenceProvider hasNext ReferenceProviderDescriptor ReferenceProviderDescriptor getId createProvider setActiveEditor isEnabled ReferenceProviderDescriptor defaultDescriptor getDefaultProvider defaultDescriptor defaultDescriptor createProvider setActiveEditor isEnabled
Creates a new line differ annotation model with its reference provider set to the reference provider obtained by calling code get Reference Provider Or Default editor id code param editor the editor to be installed with the returned provider param id the id as specified in the code plugin xml code that installs the reference provider return a quick diff annotation model public I Annotation Model create Quick Diff Annotation Model I Text Editor editor String id I Quick Diff Reference Provider provider get Reference Provider Or Default editor id if provider null Document Line Differ differ new Document Line Differ differ set Reference Provider provider return differ else return null  getReferenceProviderOrDefault IAnnotationModel createQuickDiffAnnotationModel ITextEditor IQuickDiffReferenceProvider getReferenceProviderOrDefault DocumentLineDiffer DocumentLineDiffer setReferenceProvider

public void menu About To Show I Menu Manager manager update the toggle action itself update I Menu Manager menu I Menu Manager manager find MENU ID only add menu if it isn t there yet if menu null HACK pre install menu groups This is needed since we get the blank context menu but want to show up in the same position as the extension added Quick Diff Toggle Action The extension is added at the end naturally but other menus debug add don t add themselves to MB ADDITIONS or alike but rather to the end too So we pre install their respective menu groups here TODO move these into editor as well if manager find GROUP DEBUB null manager insert Before I Workbench Action Constants MB ADDITIONS new Separator GROUP DEBUB if manager find GROUP ADD null manager insert After I Workbench Action Constants MB ADDITIONS new Separator GROUP ADD if manager find GROUP RESTORE null manager insert After GROUP ADD new Separator GROUP RESTORE if manager find GROUP QUICKDIFF null manager insert After GROUP RESTORE new Separator GROUP QUICKDIFF create quickdiff menu menu new Menu Manager Quick Diff Messages get String MENU LABEL KEY MENU ID List descriptors new Quick Diff get Reference Provider Descriptors for Iterator it descriptors iterator it has Next Reference Provider Descriptor desc Reference Provider Descriptor it next Reference Selection Action action new Reference Selection Action desc f Editor if action is Enabled menu add action manager append To Group GROUP QUICKDIFF menu create restore menu if this action is enabled if is Connected for int i 0 i f Restore Actions length i f Restore Actions i update only add block action if selection action is not enabled if f Restore Actions 0 is Enabled manager append To Group GROUP RESTORE f Restore Actions 0 else if f Restore Actions 1 is Enabled manager append To Group GROUP RESTORE f Restore Actions 1 if f Restore Actions 2 is Enabled manager append To Group GROUP RESTORE f Restore Actions 2 if f Restore Actions 3 is Enabled manager append To Group GROUP RESTORE f Restore Actions 3  menuAboutToShow IMenuManager IMenuManager IMenuManager MENU_ID QuickDiffToggleAction MB_ADDITIONS GROUP_DEBUB insertBefore IWorkbenchActionConstants MB_ADDITIONS GROUP_DEBUB GROUP_ADD insertAfter IWorkbenchActionConstants MB_ADDITIONS GROUP_ADD GROUP_RESTORE insertAfter GROUP_ADD GROUP_RESTORE GROUP_QUICKDIFF insertAfter GROUP_RESTORE GROUP_QUICKDIFF MenuManager QuickDiffMessages getString MENU_LABEL_KEY MENU_ID QuickDiff getReferenceProviderDescriptors hasNext ReferenceProviderDescriptor ReferenceProviderDescriptor ReferenceSelectionAction ReferenceSelectionAction fEditor isEnabled appendToGroup GROUP_QUICKDIFF isConnected fRestoreActions fRestoreActions fRestoreActions isEnabled appendToGroup GROUP_RESTORE fRestoreActions fRestoreActions isEnabled appendToGroup GROUP_RESTORE fRestoreActions fRestoreActions isEnabled appendToGroup GROUP_RESTORE fRestoreActions fRestoreActions isEnabled appendToGroup GROUP_RESTORE fRestoreActions
public void set Active Editor I Action action I Editor Part target Editor f Proxy action remove Popup Menu if target Editor instanceof I Text Editor f Editor I Text Editor target Editor else f Editor null for int i 0 i f Restore Actions length i f Restore Actions i set Editor f Editor set Popup Menu  setActiveEditor IAction IEditorPart targetEditor fProxy removePopupMenu targetEditor ITextEditor fEditor ITextEditor targetEditor fEditor fRestoreActions fRestoreActions setEditor fEditor setPopupMenu
Removes the ruler context menu listener from the current editor private void remove Popup Menu if f Editor instanceof I Text Editor Extension return I Text Editor Extension f Editor remove Ruler Context Menu Listener f Listener  removePopupMenu fEditor ITextEditorExtension ITextEditorExtension fEditor removeRulerContextMenuListener fListener
Installs a submenu with code f Editor code s ruler context menu that contains the choices for the quick diff reference This allows the toggle action to lazily install the menu once quick diff has been enabled see Quick Diff Toggle Action private void set Popup Menu if f Editor instanceof I Text Editor Extension return I Text Editor Extension f Editor add Ruler Context Menu Listener f Listener  fEditor QuickDiffToggleAction setPopupMenu fEditor ITextEditorExtension ITextEditorExtension fEditor addRulerContextMenuListener fListener
States whether this toggle action has been installed and a incremental differ has been installed with the line number bar return code true code if a differ has been installed on code f Editor code boolean is Connected if f Editor instanceof I Text Editor Extension3 return false return I Text Editor Extension3 f Editor is Change Information Showing  fEditor isConnected fEditor ITextEditorExtension3 ITextEditorExtension3 fEditor isChangeInformationShowing
public void run I Action action f Proxy action if f Editor null return if f Editor instanceof I Text Editor Extension3 I Text Editor Extension3 extension I Text Editor Extension3 f Editor extension show Change Information extension is Change Information Showing  IAction fProxy fEditor fEditor ITextEditorExtension3 ITextEditorExtension3 ITextEditorExtension3 fEditor showChangeInformation isChangeInformationShowing
see org eclipse ui I Action Delegate selection Changed org eclipse jface action I Action org eclipse jface viewers I Selection public void selection Changed I Action action I Selection selection f Proxy action  IActionDelegate selectionChanged IAction ISelection selectionChanged IAction ISelection fProxy
public void update if f Proxy null return if is Connected f Proxy set Text Quick Diff Messages get String quickdiff toggle disable NON NLS 1 else f Proxy set Text Quick Diff Messages get String quickdiff toggle enable NON NLS 1  fProxy isConnected fProxy setText QuickDiffMessages getString fProxy setText QuickDiffMessages getString

Creates a new descriptor for code element code p This method is for internal use only p param element the extension point element to be described public Reference Provider Descriptor I Configuration Element element Assert is Legal element null f Configuration element  ReferenceProviderDescriptor IConfigurationElement isLegal fConfiguration
Reads if needed and returns the label of this extension return the label for this extension public String get Label if f Label null f Label f Configuration get Attribute LABEL ATTRIBUTE Assert is Not Null f Label return f Label  getLabel fLabel fLabel fConfiguration getAttribute LABEL_ATTRIBUTE isNotNull fLabel fLabel
Reads if needed and returns the id of this extension return the id for this extension public String get Id if f Id null f Id f Configuration get Attribute ID ATTRIBUTE Assert is Not Null f Id return f Id  getId fId fId fConfiguration getAttribute ID_ATTRIBUTE isNotNull fId fId
Creates a referenceprovider as described in the extension s xml Sets the id on the provider return a new instance of the reference provider described by this descriptor public I Quick Diff Reference Provider create Provider try I Quick Diff Reference Provider impl I Quick Diff Reference Provider f Configuration create Executable Extension CLASS ATTRIBUTE impl set Id get Id return impl catch Core Exception e return null  IQuickDiffReferenceProvider createProvider IQuickDiffReferenceProvider IQuickDiffReferenceProvider fConfiguration createExecutableExtension CLASS_ATTRIBUTE setId getId CoreException
States whether the plugin declaring this extension has been loaded already return code true code if the extension point s plugin has been loaded code false code otherwise public boolean is Plugin Loaded if f Bundle null f Bundle Platform get Bundle f Configuration get Declaring Extension get Namespace return f Bundle null f Bundle get State Bundle ACTIVE  isPluginLoaded fBundle fBundle getBundle fConfiguration getDeclaringExtension getNamespace fBundle fBundle getState
Reads if needed and returns the default attribute value of this extension return the default attribute value for this extension public boolean get Default if f Default null String def f Configuration get Attribute DEFAULT ATTRIBUTE if true equals Ignore Case def NON NLS 1 f Default Boolean TRUE else f Default Boolean FALSE return f Default boolean Value  getDefault fDefault fConfiguration getAttribute DEFAULT_ATTRIBUTE equalsIgnoreCase fDefault fDefault fDefault booleanValue

see I Content Assist Processor compute Completion Proposals I Text Viewer int public I Completion Proposal compute Completion Proposals I Text Viewer viewer int document Offset return compute Completion Proposals I Content Assist Subject Control null document Offset  IContentAssistProcessor computeCompletionProposals ITextViewer ICompletionProposal computeCompletionProposals ITextViewer documentOffset computeCompletionProposals IContentAssistSubjectControl documentOffset
see I Content Assist Processor compute Context Information I Text Viewer int public I Context Information compute Context Information I Text Viewer viewer int document Offset return compute Context Information I Content Assist Subject Control null document Offset  IContentAssistProcessor computeContextInformation ITextViewer IContextInformation computeContextInformation ITextViewer documentOffset computeContextInformation IContentAssistSubjectControl documentOffset
see I Content Assist Processor get Completion Proposal Auto Activation Characters public char get Completion Proposal Auto Activation Characters return new char  IContentAssistProcessor getCompletionProposalAutoActivationCharacters getCompletionProposalAutoActivationCharacters
see I Content Assist Processor get Context Information Auto Activation Characters public char get Context Information Auto Activation Characters return new char  IContentAssistProcessor getContextInformationAutoActivationCharacters getContextInformationAutoActivationCharacters
see I Content Assist Processor get Context Information Validator public I Context Information Validator get Context Information Validator return f Validator  IContentAssistProcessor getContextInformationValidator IContextInformationValidator getContextInformationValidator fValidator
see I Content Assist Processor get Error Message public String get Error Message return null  IContentAssistProcessor getErrorMessage getErrorMessage
public I Completion Proposal compute Completion Proposals I Content Assist Subject Control content Assist Subject Control int document Offset List results new Array List fg Proposal Keys size Iterator iter fg Proposal Keys iterator while iter has Next add Proposal String iter next content Assist Subject Control document Offset results true if results is Empty iter fg Proposal Keys iterator while iter has Next add Proposal String iter next content Assist Subject Control document Offset results false return I Completion Proposal results to Array new I Completion Proposal results size  ICompletionProposal computeCompletionProposals IContentAssistSubjectControl contentAssistSubjectControl documentOffset ArrayList fgProposalKeys fgProposalKeys hasNext addProposal contentAssistSubjectControl documentOffset isEmpty fgProposalKeys hasNext addProposal contentAssistSubjectControl documentOffset ICompletionProposal toArray ICompletionProposal
see I Subject Control Content Assist Processor compute Context Information I Content Assist Subject Control int public I Context Information compute Context Information I Content Assist Subject Control content Assist Subject Control int document Offset return null  ISubjectControlContentAssistProcessor computeContextInformation IContentAssistSubjectControl IContextInformation computeContextInformation IContentAssistSubjectControl contentAssistSubjectControl documentOffset
private void add Proposal String proposal Key I Content Assist Subject Control content Assist Subject Control int document Offset List results boolean filter String proposal String fg Proposal Strings get proposal Key compute correct replacement if filter String selection null try selection content Assist Subject Control get Document get document Offset 1 1 catch Bad Location Exception e return if selection null selection length 0 proposal length 0 proposal char At 0 selection char At 0 return proposal proposal substring 1 String display String get String proposal Key display String NON NLS 1 String additional Info get String proposal Key additional Info NON NLS 1 I Context Information info create Context Information proposal Key Move cursor on to the left if the proposal ends with int relative Offset proposal length XXX currently there s no smartness position the cursor after the proposal if relative Offset 0 proposal char At relative Offset 1 relative Offset results add new Completion Proposal proposal document Offset 0 Math max 0 relative Offset null display String info additional Info  addProposal proposalKey IContentAssistSubjectControl contentAssistSubjectControl documentOffset fgProposalStrings proposalKey contentAssistSubjectControl getDocument documentOffset BadLocationException charAt charAt displayString getString proposalKey displayString additionalInfo getString proposalKey additionalInfo IContextInformation createContextInformation proposalKey relativeOffset relativeOffset charAt relativeOffset relativeOffset CompletionProposal documentOffset relativeOffset displayString additionalInfo
private I Context Information create Context Information String proposal Key return null  IContextInformation createContextInformation proposalKey
private String get String String proposal Key String type return Editor Messages get String Find Replace reg Ex Content Assist type proposal Key NON NLS 1 NON NLS 2  getString proposalKey EditorMessages getString FindReplace regExContentAssist proposalKey

Retrieves and returns the value with the given key from the given resource bundle or returns the given default value if there is no such resource Convenience method for dealing gracefully with missing resources param bundle the resource bundle param key the resource key param default Value the default value or code null code return the resource value or the given default value which may be code null code protected static String get String Resource Bundle bundle String key String default Value String value default Value try value bundle get String key catch Missing Resource Exception x return value  defaultValue getString ResourceBundle defaultValue defaultValue getString MissingResourceException
Creates a new action that configures itself from the given resource bundle p The following keys prepended by the given option prefix are used for retrieving resources from the given bundle ul li code label code code set Text code li li code tooltip code code set Tool Tip Text code li li code image code code set Image Descriptor code li li code description code code set Description code li ul p param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys or code null code if none paramstyle one of code I Action AS PUSH BUTTON code code I Action AS CHECK BOX code and code I Action AS RADIO BUTTON code see Resource Action Resource Action Resource Bundle String see org eclipse jface action I Action AS CHECK BOX see org eclipse jface action I Action AS DROP DOWN MENU see org eclipse jface action I Action AS PUSH BUTTON see org eclipse jface action I Action AS RADIO BUTTON since 2 1 public Resource Action Resource Bundle bundle String prefix int style super null style initialize bundle prefix  setText setToolTipText setImageDescriptor setDescription IAction AS_PUSH_BUTTON IAction AS_CHECK_BOX IAction AS_RADIO_BUTTON ResourceAction ResourceAction ResourceBundle IAction AS_CHECK_BOX IAction AS_DROP_DOWN_MENU IAction AS_PUSH_BUTTON IAction AS_RADIO_BUTTON ResourceAction ResourceBundle
Creates a new action that configures itself from the given resource bundle p The following keys prepended by the given option prefix are used for retrieving resources from the given bundle ul li code label code code set Text code li li code tooltip code code set Tool Tip Text code li li code image code code set Image Descriptor code li li code description code code set Description code li ul p param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys or code null code if none public Resource Action Resource Bundle bundle String prefix super initialize bundle prefix  setText setToolTipText setImageDescriptor setDescription ResourceAction ResourceBundle
Sets the action s help context id param context Id the help context id public final void set Help Context Id String context Id Workbench Help set Help this context Id  contextId setHelpContextId contextId WorkbenchHelp setHelp contextId
Initializes this action using the given bundle and prefix param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys or code null code if none since 2 1 protected void initialize Resource Bundle bundle String prefix String label Key label NON NLS 1 String tooltip Key tooltip NON NLS 1 String image Key image NON NLS 1 String description Key description NON NLS 1 if prefix null prefix length 0 label Key prefix label Key tooltip Key prefix tooltip Key image Key prefix image Key description Key prefix description Key set Text get String bundle label Key label Key set Tool Tip Text get String bundle tooltip Key null set Description get String bundle description Key null String file get String bundle image Key null if file null file trim length 0 set Image Descriptor Image Descriptor create From File get Class file  ResourceBundle labelKey tooltipKey imageKey descriptionKey labelKey labelKey tooltipKey tooltipKey imageKey imageKey descriptionKey descriptionKey setText getString labelKey labelKey setToolTipText getString tooltipKey setDescription getString descriptionKey getString imageKey setImageDescriptor ImageDescriptor createFromFile getClass

public void resource Changed I Resource Change Event e I Resource Delta delta e get Delta if delta null f Resource null I Resource Delta child delta find Member f Resource get Full Path if child null update child get Marker Deltas  resourceChanged IResourceChangeEvent IResourceDelta getDelta fResource IResourceDelta findMember fResource getFullPath getMarkerDeltas
Creates a marker annotation model with the given resource as the source of the markers param resource the resource public Resource Marker Annotation Model I Resource resource Assert is Not Null resource f Resource resource f Workspace resource get Workspace  ResourceMarkerAnnotationModel IResource isNotNull fResource fWorkspace getWorkspace
see Abstract Marker Annotation Model is Acceptable I Marker protected boolean is Acceptable I Marker marker return marker null f Resource equals marker get Resource  AbstractMarkerAnnotationModel isAcceptable IMarker isAcceptable IMarker fResource getResource
Updates this model to the given marker deltas param marker Deltas the array of marker deltas protected void update I Marker Delta marker Deltas if marker Deltas length 0 return for int i 0 i marker Deltas length i I Marker Delta delta marker Deltas i switch delta get Kind case I Resource Delta ADDED add Marker Annotation delta get Marker break case I Resource Delta REMOVED remove Marker Annotation delta get Marker break case I Resource Delta CHANGED modify Marker Annotation delta get Marker break fire Model Changed  markerDeltas IMarkerDelta markerDeltas markerDeltas markerDeltas IMarkerDelta markerDeltas getKind IResourceDelta addMarkerAnnotation getMarker IResourceDelta removeMarkerAnnotation getMarker IResourceDelta modifyMarkerAnnotation getMarker fireModelChanged
protected void listen To Marker Changes boolean listen if listen f Workspace add Resource Change Listener f Resource Change Listener else f Workspace remove Resource Change Listener f Resource Change Listener  listenToMarkerChanges fWorkspace addResourceChangeListener fResourceChangeListener fWorkspace removeResourceChangeListener fResourceChangeListener
f Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i markers length i markers i delete  fWorkspace IWorkspaceRunnable IProgressMonitor CoreException
protected void delete Markers final I Marker markers throws Core Exception f Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i markers length i markers i delete null I Workspace AVOID UPDATE null  deleteMarkers IMarker CoreException fWorkspace IWorkspaceRunnable IProgressMonitor CoreException IWorkspace AVOID_UPDATE
see Abstract Marker Annotation Model retrieve Markers protected I Marker retrieve Markers throws Core Exception return f Resource find Markers I Marker MARKER true I Resource DEPTH ZERO  AbstractMarkerAnnotationModel retrieveMarkers IMarker retrieveMarkers CoreException fResource findMarkers IMarker IResource DEPTH_ZERO
Returns the resource serving as the source of markers for this annotation model return the resource serving as the source of markers for this annotation model since 2 0 protected I Resource get Resource return f Resource  IResource getResource fResource

public I Annotation Model create Annotation Model I Path location I File file File Buffers get Workspace File At Location location if file null return new Resource Marker Annotation Model file return null  IAnnotationModel createAnnotationModel IPath IFile FileBuffers getWorkspaceFileAtLocation ResourceMarkerAnnotationModel

The listener to pick up changes of the target action private I Property Change Listener f Listener new I Property Change Listener public void property Change Property Change Event event update event  IPropertyChangeListener fListener IPropertyChangeListener propertyChange PropertyChangeEvent
Creates a new action The action configures its initial visual representation from the given resource bundle If this action s wrapped action is set to code null code it also uses the information in the resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none paramstyle one of code I Action AS PUSH BUTTON code code I Action AS CHECK BOX code and code I Action AS RADIO BUTTON code see Resource Action Resource Action Resource Bundle String int see I Action AS CHECK BOX see I Action AS DROP DOWN MENU see I Action AS PUSH BUTTON see I Action AS RADIO BUTTON since 2 1 public Retarget Text Editor Action Resource Bundle bundle String prefix int style super bundle prefix style f Default Text get Text install Help Listener  ResourceAction IAction AS_PUSH_BUTTON IAction AS_CHECK_BOX IAction AS_RADIO_BUTTON ResourceAction ResourceAction ResourceBundle IAction AS_CHECK_BOX IAction AS_DROP_DOWN_MENU IAction AS_PUSH_BUTTON IAction AS_RADIO_BUTTON RetargetTextEditorAction ResourceBundle fDefaultText getText installHelpListener
Creates a new action The action configures its initial visual representation from the given resource bundle If this action s wrapped action is set to code null code it also uses the information in the resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none see Resource Action Resource Action Resource Bundle String public Retarget Text Editor Action Resource Bundle bundle String prefix super bundle prefix f Default Text get Text install Help Listener  ResourceAction ResourceAction ResourceAction ResourceBundle RetargetTextEditorAction ResourceBundle fDefaultText getText installHelpListener
Creates a new action The action configures its initial visual representation from the given resource bundle If this action s wrapped action is set to code null code it also uses the information in the resource bundle The action gets the given action id param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param action Id the action id paramstyle one of code I Action AS PUSH BUTTON code code I Action AS CHECK BOX code and code I Action AS RADIO BUTTON code see Resource Action Resource Action Resource Bundle String int see I Action AS CHECK BOX see I Action AS DROP DOWN MENU see I Action AS PUSH BUTTON see I Action AS RADIO BUTTON since 2 1 public Retarget Text Editor Action Resource Bundle bundle String prefix String action Id int style super bundle prefix style f Default Text get Text set Id action Id install Help Listener  ResourceAction actionId IAction AS_PUSH_BUTTON IAction AS_CHECK_BOX IAction AS_RADIO_BUTTON ResourceAction ResourceAction ResourceBundle IAction AS_CHECK_BOX IAction AS_DROP_DOWN_MENU IAction AS_PUSH_BUTTON IAction AS_RADIO_BUTTON RetargetTextEditorAction ResourceBundle actionId fDefaultText getText setId actionId installHelpListener
Creates a new action The action configures its initial visual representation from the given resource bundle If this action s wrapped action is set to code null code it also uses the information in the resource bundle The action gets the given action id param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param action Id the action id see Resource Action Resource Action Resource Bundle String since 2 0 public Retarget Text Editor Action Resource Bundle bundle String prefix String action Id super bundle prefix f Default Text get Text set Id action Id install Help Listener  ResourceAction actionId ResourceAction ResourceAction ResourceBundle RetargetTextEditorAction ResourceBundle actionId fDefaultText getText setId actionId installHelpListener
Updates to the changes of the underlying action param event the change event describing the state change private void update Property Change Event event if ENABLED equals event get Property Boolean bool Boolean event get New Value set Enabled bool boolean Value else if TEXT equals event get Property set Text String event get New Value else if TOOL TIP TEXT equals event get Property set Tool Tip Text String event get New Value else if CHECKED equals event get Property Boolean bool Boolean event get New Value set Checked bool boolean Value  PropertyChangeEvent getProperty getNewValue setEnabled booleanValue getProperty setText getNewValue TOOL_TIP_TEXT getProperty setToolTipText getNewValue getProperty getNewValue setChecked booleanValue
Sets the underlying action param action the underlying action public void set Action I Action action if f Action null f Action remove Property Change Listener f Listener f Action null f Action action if f Action null set Enabled false if get Style AS CHECK BOX get Style AS RADIO BUTTON set Checked false set Text f Default Text set Tool Tip Text NON NLS 1 else set Enabled f Action is Enabled if f Action get Style AS CHECK BOX f Action get Style AS RADIO BUTTON super set Checked f Action is Checked set Text f Action get Text set Tool Tip Text f Action get Tool Tip Text f Action add Property Change Listener f Listener  setAction IAction fAction fAction removePropertyChangeListener fListener fAction fAction fAction setEnabled getStyle AS_CHECK_BOX getStyle AS_RADIO_BUTTON setChecked setText fDefaultText setToolTipText setEnabled fAction isEnabled fAction getStyle AS_CHECK_BOX fAction getStyle AS_RADIO_BUTTON setChecked fAction isChecked setText fAction getText setToolTipText fAction getToolTipText fAction addPropertyChangeListener fListener
super set Help Listener new Help Listener public void help Requested Help Event e Help Listener listener null if f Action null if we have a handler see if it has a help listener listener f Action get Help Listener if listener null use our own help listener listener f Local Help Listener if listener null pass on the event listener help Requested e  setHelpListener HelpListener helpRequested HelpEvent HelpListener fAction fAction getHelpListener fLocalHelpListener helpRequested
Installs the help listener since 2 1 private void install Help Listener super set Help Listener new Help Listener public void help Requested Help Event e Help Listener listener null if f Action null if we have a handler see if it has a help listener listener f Action get Help Listener if listener null use our own help listener listener f Local Help Listener if listener null pass on the event listener help Requested e  installHelpListener setHelpListener HelpListener helpRequested HelpEvent HelpListener fAction fAction getHelpListener fLocalHelpListener helpRequested
The code Retarget Text Editor Action code implementation of this method declared on code I Action code stores the help listener in a local field The supplied listener is only used if there is no handler param listener the help listener since 2 1 public void set Help Listener Help Listener listener f Local Help Listener listener  RetargetTextEditorAction IAction setHelpListener HelpListener fLocalHelpListener
see I Action run public void run if f Action null f Action run  IAction fAction fAction

Creates a new action for the given text editor The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the text editor see Text Editor Action Text Editor Action Resource Bundle String I Text Editor public Revert To Saved Action Resource Bundle bundle String prefix I Text Editor editor super bundle prefix editor  ResourceAction TextEditorAction TextEditorAction ResourceBundle ITextEditor RevertToSavedAction ResourceBundle ITextEditor
see I Action run public void run get Text Editor do Revert To Saved  IAction getTextEditor doRevertToSaved
see Text Editor Action update public void update set Enabled get Text Editor is Dirty  TextEditorAction setEnabled getTextEditor isDirty

Creates a new action for the given text editor The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the text editor see Text Editor Action Text Editor Action Resource Bundle String I Text Editor public Save Action Resource Bundle bundle String prefix I Text Editor editor super bundle prefix editor  ResourceAction TextEditorAction TextEditorAction ResourceBundle ITextEditor SaveAction ResourceBundle ITextEditor
see I Action run public void run get Text Editor get Site get Page save Editor get Text Editor false  IAction getTextEditor getSite getPage saveEditor getTextEditor
see Text Editor Action update public void update set Enabled get Text Editor is Dirty  TextEditorAction setEnabled getTextEditor isDirty

Creates a new action for the given ruler and editor The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the editor see Resource Action Resource Action Resource Bundle String public Select Annotation Ruler Action Resource Bundle bundle String prefix I Text Editor editor super bundle prefix editor  ResourceAction ResourceAction ResourceAction ResourceBundle SelectAnnotationRulerAction ResourceBundle ITextEditor
public void set Editor I Text Editor editor if get Text Editor null I Vertical Ruler Info service I Vertical Ruler Info get Text Editor get Adapter I Vertical Ruler Info class if service instanceof I Vertical Ruler Info Extension I Vertical Ruler Info Extension service remove Vertical Ruler Listener this super set Editor editor if get Text Editor null I Vertical Ruler Info service I Vertical Ruler Info get Text Editor get Adapter I Vertical Ruler Info class if service instanceof I Vertical Ruler Info Extension I Vertical Ruler Info Extension service add Vertical Ruler Listener this  setEditor ITextEditor getTextEditor IVerticalRulerInfo IVerticalRulerInfo getTextEditor getAdapter IVerticalRulerInfo IVerticalRulerInfoExtension IVerticalRulerInfoExtension removeVerticalRulerListener setEditor getTextEditor IVerticalRulerInfo IVerticalRulerInfo getTextEditor getAdapter IVerticalRulerInfo IVerticalRulerInfoExtension IVerticalRulerInfoExtension addVerticalRulerListener
Returns the code Abstract Marker Annotation Model code of the editor s input return the marker annotation model or code null code if there s none protected I Annotation Model get Annotation Model I Document Provider provider get Text Editor get Document Provider return provider get Annotation Model get Text Editor get Editor Input  AbstractMarkerAnnotationModel IAnnotationModel getAnnotationModel IDocumentProvider getTextEditor getDocumentProvider getAnnotationModel getTextEditor getEditorInput
see org eclipse ui texteditor I Vertical Ruler Listener annotation Selected org eclipse ui texteditor Vertical Ruler Event public void annotation Selected Vertical Ruler Event event  IVerticalRulerListener annotationSelected VerticalRulerEvent annotationSelected VerticalRulerEvent
public void annotation Default Selected Vertical Ruler Event event Annotation a event get Selected Annotation I Annotation Model model get Annotation Model Position position model get Position a if position null return get Text Editor select And Reveal position offset position length  annotationDefaultSelected VerticalRulerEvent getSelectedAnnotation IAnnotationModel getAnnotationModel getPosition getTextEditor selectAndReveal
see org eclipse ui texteditor I Vertical Ruler Listener annotation Context Menu About To Show org eclipse ui texteditor Vertical Ruler Event org eclipse swt widgets Menu public void annotation Context Menu About To Show Vertical Ruler Event event Menu menu  IVerticalRulerListener annotationContextMenuAboutToShow VerticalRulerEvent annotationContextMenuAboutToShow VerticalRulerEvent

Creates a new action for the given ruler and editor The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the editor param ruler the ruler see Resource Action Resource Action Resource Bundle String public Select Marker Ruler Action Resource Bundle bundle String prefix I Text Editor editor I Vertical Ruler Info ruler super bundle prefix f Ruler ruler f Text Editor editor f Bundle bundle f Prefix prefix  ResourceAction ResourceAction ResourceAction ResourceBundle SelectMarkerRulerAction ResourceBundle ITextEditor IVerticalRulerInfo fRuler fTextEditor fBundle fPrefix
see Select Marker Ruler Action Resource Bundle String I Text Editor I Vertical Ruler Info deprecated As of 3 0 replaced by link Select Marker Ruler Action Resource Bundle String I Text Editor I Vertical Ruler Info public Select Marker Ruler Action Resource Bundle bundle String prefix I Vertical Ruler ruler I Text Editor editor this bundle prefix editor ruler  SelectMarkerRulerAction ResourceBundle ITextEditor IVerticalRulerInfo SelectMarkerRulerAction ResourceBundle ITextEditor IVerticalRulerInfo SelectMarkerRulerAction ResourceBundle IVerticalRuler ITextEditor
see I Update update public void update f Markers get Markers set Enabled f Markers is Empty  IUpdate fMarkers getMarkers setEnabled fMarkers isEmpty
public void run I Marker marker choose Marker f Markers boolean is Problem Marker Marker Utilities is Marker Type marker I Marker PROBLEM boolean is Task Marker Marker Utilities is Marker Type marker I Marker TASK if is Problem Marker is Task Marker I Workbench Page page f Text Editor get Site get Page I View Part view page find View is Problem Marker I Page Layout ID PROBLEM VIEW I Page Layout ID TASK LIST NON NLS 1 NON NLS 2 if view null boolean selection Set false try Method method view get Class get Method set Selection new Class I Structured Selection class boolean class NON NLS 1 method invoke view new Object new Structured Selection marker Boolean TRUE selection Set true catch No Such Method Exception x selection Set false catch Illegal Access Exception x selection Set false catch Invocation Target Exception x selection Set false if selection Set return Select and reveal in editor int offset Marker Utilities get Char Start marker int end Offset Marker Utilities get Char End marker if offset 1 end Offset 1 f Text Editor select And Reveal offset end Offset offset  IMarker chooseMarker fMarkers isProblemMarker MarkerUtilities isMarkerType IMarker isTaskMarker MarkerUtilities isMarkerType IMarker isProblemMarker isTaskMarker IWorkbenchPage fTextEditor getSite getPage IViewPart findView isProblemMarker IPageLayout ID_PROBLEM_VIEW IPageLayout ID_TASK_LIST selectionSet getClass getMethod setSelection IStructuredSelection StructuredSelection selectionSet NoSuchMethodException selectionSet IllegalAccessException selectionSet InvocationTargetException selectionSet selectionSet MarkerUtilities getCharStart endOffset MarkerUtilities getCharEnd endOffset fTextEditor selectAndReveal endOffset
Chooses the marker with the highest layer If there are multiple markers at the found layer the first marker is taken param markers the list of markers to choose from return the chosen marker protected I Marker choose Marker List markers Abstract Marker Annotation Model model get Annotation Model I Annotation Access Extension access get Annotation Access Extension I Marker marker null int max Layer 0 Iterator iter markers iterator while iter has Next I Marker m I Marker iter next Annotation a model get Marker Annotation m if a null if access null marker m break int l access get Layer a if l max Layer if marker null marker m else if l max Layer max Layer l marker m return marker  IMarker chooseMarker AbstractMarkerAnnotationModel getAnnotationModel IAnnotationAccessExtension getAnnotationAccessExtension IMarker maxLayer hasNext IMarker IMarker getMarkerAnnotation getLayer maxLayer maxLayer maxLayer
Returns the annotation access extension return the annotation access extension or code null code if this action s editor has no such extension since 3 0 protected I Annotation Access Extension get Annotation Access Extension Object adapter f Text Editor get Adapter I Annotation Access class if adapter instanceof I Annotation Access Extension return I Annotation Access Extension adapter return null  IAnnotationAccessExtension getAnnotationAccessExtension fTextEditor getAdapter IAnnotationAccess IAnnotationAccessExtension IAnnotationAccessExtension
Returns the resource for which to create the marker or code null code if there is no applicable resource return the resource for which to create the marker or code null code protected I Resource get Resource I Editor Input input f Text Editor get Editor Input I Resource resource I Resource input get Adapter I File class if resource null resource I Resource input get Adapter I Resource class return resource  IResource getResource IEditorInput fTextEditor getEditorInput IResource IResource getAdapter IFile IResource getAdapter IResource
Returns the code Abstract Marker Annotation Model code of the editor s input return the marker annotation model or code null code if there s none protected Abstract Marker Annotation Model get Annotation Model I Document Provider provider f Text Editor get Document Provider I Annotation Model model provider get Annotation Model f Text Editor get Editor Input if model instanceof Abstract Marker Annotation Model return Abstract Marker Annotation Model model return null  AbstractMarkerAnnotationModel AbstractMarkerAnnotationModel getAnnotationModel IDocumentProvider fTextEditor getDocumentProvider IAnnotationModel getAnnotationModel fTextEditor getEditorInput AbstractMarkerAnnotationModel AbstractMarkerAnnotationModel
Returns the code I Document code of the editor s input return the document of the editor s input protected I Document get Document I Document Provider provider f Text Editor get Document Provider return provider get Document f Text Editor get Editor Input  IDocument IDocument getDocument IDocumentProvider fTextEditor getDocumentProvider getDocument fTextEditor getEditorInput
Checks whether a position includes the ruler s line of activity param position the position to be checked param document the document the position refers to return code true code if the line is included by the given position protected boolean includes Ruler Line Position position I Document document if position null try int marker Line document get Line Of Offset position get Offset int line f Ruler get Line Of Last Mouse Button Activity if line marker Line return true commented because of 1GEUOZ9 ITPJUI ALL Confusing UI for multi line Bookmarks and Tasks return marker Line line line document get Line Of Offset position get Offset position get Length catch Bad Location Exception x return false  includesRulerLine IDocument markerLine getLineOfOffset getOffset fRuler getLineOfLastMouseButtonActivity markerLine markerLine getLineOfOffset getOffset getLength BadLocationException
Handles core exceptions This implementation logs the exceptions with the workbench plug in and shows an error dialog param exception the exception to be handled param message the message to be logged with the given exception protected void handle Core Exception Core Exception exception String message Bundle bundle Platform get Bundle PlatformUI PLUGIN ID I Log log Platform get Log bundle if message null log log new Status I Status ERROR PlatformUI PLUGIN ID 0 message exception else log log exception get Status Shell shell f Text Editor get Site get Shell String title get String f Bundle f Prefix error dialog title f Prefix error dialog title NON NLS 2 NON NLS 1 String msg get String f Bundle f Prefix error dialog message f Prefix error dialog message NON NLS 2 NON NLS 1 Error Dialog open Error shell title msg exception get Status  handleCoreException CoreException getBundle PLUGIN_ID ILog getLog IStatus PLUGIN_ID getStatus fTextEditor getSite getShell getString fBundle fPrefix fPrefix getString fBundle fPrefix fPrefix ErrorDialog openError getStatus
Returns all markers which include the ruler s line of activity return a list with all markers which include the ruler s line of activity protected List get Markers List markers new Array List I Resource resource get Resource I Document document get Document Abstract Marker Annotation Model model get Annotation Model if resource null model null resource exists try I Marker all Markers resource find Markers null true I Resource DEPTH ZERO if all Markers null for int i 0 i all Markers length i if includes Ruler Line model get Marker Position all Markers i document markers add all Markers i catch Core Exception x handle Core Exception x Text Editor Messages get String Select Marker Ruler Action get Marker NON NLS 1 return markers  getMarkers ArrayList IResource getResource IDocument getDocument AbstractMarkerAnnotationModel getAnnotationModel IMarker allMarkers findMarkers IResource DEPTH_ZERO allMarkers allMarkers includesRulerLine getMarkerPosition allMarkers allMarkers CoreException handleCoreException TextEditorMessages getString SelectMarkerRulerAction getMarker

deprecated As of 2 1 replaced by link org eclipse ui texteditor Select Marker Ruler Action Select Marker Ruler Action Resource Bundle String I Text Editor I Vertical Ruler Info public Select Marker Ruler Info Action Resource Bundle bundle String prefix I Vertical Ruler Info ruler I Text Editor editor super bundle prefix editor ruler  SelectMarkerRulerAction SelectMarkerRulerAction ResourceBundle ITextEditor IVerticalRulerInfo SelectMarkerRulerInfoAction ResourceBundle IVerticalRulerInfo ITextEditor

see Abstract Ruler Action Delegate create Action I Text Editor I Vertical Ruler Info protected I Action create Action I Text Editor editor I Vertical Ruler Info ruler Info return new Select Marker Ruler Action Text Editor Messages get Resource Bundle Editor Select Marker editor ruler Info NON NLS 1  AbstractRulerActionDelegate createAction ITextEditor IVerticalRulerInfo IAction createAction ITextEditor IVerticalRulerInfo rulerInfo SelectMarkerRulerAction TextEditorMessages getResourceBundle SelectMarker rulerInfo

Creates and initializes the action for the given text editor and operation code The action configures its visual representation from the given resource bundle The action works by asking the text editor at the time for its text operation target adapter using code get Adapter I Text Operation Target class code The action runs that operation with the given opcode param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the text editor param operation Code the operation code see Text Editor Action Text Editor Action Resource Bundle String I Text Editor public Shift Action Resource Bundle bundle String prefix I Text Editor editor int operation Code super bundle prefix editor f Operation Code operation Code update  getAdapter ITextOperationTarget ResourceAction operationCode TextEditorAction TextEditorAction ResourceBundle ITextEditor ShiftAction ResourceBundle ITextEditor operationCode fOperationCode operationCode
Busy Indicator show While display new Runnable public void run f Operation Target do Operation f Operation Code  BusyIndicator showWhile fOperationTarget doOperation fOperationCode
The code Text Operation Action code implementation of this code I Action code method runs the operation with the current operation code public void run if f Operation Code 1 f Operation Target null return I Text Editor editor get Text Editor if editor null return if validate Editor Input State return Display display null I Workbench Part Site site editor get Site Shell shell site get Shell if shell null shell is Disposed display shell get Display Busy Indicator show While display new Runnable public void run f Operation Target do Operation f Operation Code  TextOperationAction IAction fOperationCode fOperationTarget ITextEditor getTextEditor validateEditorInputState IWorkbenchPartSite getSite getShell isDisposed getDisplay BusyIndicator showWhile fOperationTarget doOperation fOperationCode
public void update super update if is Enabled return if can Modify Editor set Enabled false return I Text Editor editor get Text Editor if f Operation Target null editor null f Operation Code 1 f Operation Target I Text Operation Target editor get Adapter I Text Operation Target class  isEnabled canModifyEditor setEnabled ITextEditor getTextEditor fOperationTarget fOperationCode fOperationTarget ITextOperationTarget getAdapter ITextOperationTarget
Enablement when tab key is pressed the current selection has to be cover multiple lines since 3 0 protected void update For Tab super update if is Enabled if can Modify Editor set Enabled false return I Text Editor editor get Text Editor if f Operation Target null editor null f Operation Code 1 f Operation Target I Text Operation Target editor get Adapter I Text Operation Target class boolean is Enabled f Operation Target null f Operation Target can Do Operation f Operation Code set Enabled is Enabled  updateForTab isEnabled canModifyEditor setEnabled ITextEditor getTextEditor fOperationTarget fOperationCode fOperationTarget ITextOperationTarget getAdapter ITextOperationTarget isEnabled fOperationTarget fOperationTarget canDoOperation fOperationCode setEnabled isEnabled
see Text Editor Action set Editor I Text Editor public void set Editor I Text Editor editor super set Editor editor f Operation Target null  TextEditorAction setEditor ITextEditor setEditor ITextEditor setEditor fOperationTarget
public boolean is Enabled boolean is Writable if is Writable return false Note that this implementation still honors the result returned by can Do Operation I e if the viewer is set to read only this method still returns false It covers the case in which the viewer is also writable I Text Editor editor get Text Editor if f Operation Target null editor null f Operation Code 1 f Operation Target I Text Operation Target editor get Adapter I Text Operation Target class return f Operation Target null f Operation Target can Do Operation f Operation Code  isEnabled isWritable isWritable canDoOperation ITextEditor getTextEditor fOperationTarget fOperationCode fOperationTarget ITextOperationTarget getAdapter ITextOperationTarget fOperationTarget fOperationTarget canDoOperation fOperationCode

Creates a new annotation for the given marker see I Marker param marker the marker public Simple Marker Annotation I Marker marker this Editors Plugin get Default get Annotation Type Lookup get Annotation Type marker marker  IMarker SimpleMarkerAnnotation IMarker EditorsPlugin getDefault getAnnotationTypeLookup getAnnotationType
Creates a new annotation of the given type for the given marker param annotation Type the annotation type param marker the marker public Simple Marker Annotation String annotation Type I Marker marker super annotation Type true null Assert is Not Null marker f Marker marker  annotationType SimpleMarkerAnnotation annotationType IMarker annotationType isNotNull fMarker
Returns this annotation s underlying marker return the marker public I Marker get Marker return f Marker  IMarker getMarker fMarker
The code Simple Marker Annotation code implementation of this code Object code method returns code true code iff the other object is of the same class and the marker handles are equal see Object equals java lang Object public boolean equals Object o if o null o get Class get Class return f Marker equals Simple Marker Annotation o f Marker return false  SimpleMarkerAnnotation getClass getClass fMarker SimpleMarkerAnnotation fMarker
see Object hash Code public int hash Code return f Marker hash Code  hashCode hashCode fMarker hashCode
Informs this annotation about changes applied to its underlying marker and adapts to those changes p Subclasses may extend this method p public void update update Type  updateType
Updates the type to be synchronized with its underlying marker since 3 0 private void update Type String annotation Type Editors Plugin get Default get Annotation Type Lookup get Annotation Type f Marker if annotation Type null annotation Type equals get Type set Type annotation Type  updateType annotationType EditorsPlugin getDefault getAnnotationTypeLookup getAnnotationType fMarker annotationType annotationType getType setType annotationType
see org eclipse jface text source Annotation get Text public String get Text return Marker Utilities get Message f Marker  getText getText MarkerUtilities getMessage fMarker

public void draw Annotation annotation GC gc Styled Text text Widget int offset int length Color color if gc null Point left text Widget get Location At Offset offset Point right text Widget get Location At Offset offset length int y left y text Widget get Line Height 1 gc set Foreground color gc draw Line left x y right x y else text Widget redraw Range offset length true  StyledText textWidget textWidget getLocationAtOffset textWidget getLocationAtOffset textWidget getLineHeight setForeground drawLine textWidget redrawRange
public void draw Annotation annotation GC gc Styled Text text Widget int offset int length Color color if length 0 fgI Beam Strategy draw annotation gc text Widget offset length color return if gc null Point left text Widget get Location At Offset offset Point right text Widget get Location At Offset offset length int x1 left x int x2 right x 1 int y1 left y int y2 y1 text Widget get Line Height 1 gc set Foreground color gc draw Rectangle x1 y1 x2 x1 y2 y1 else text Widget redraw Range offset length true  StyledText textWidget fgIBeamStrategy textWidget textWidget getLocationAtOffset textWidget getLocationAtOffset textWidget getLineHeight setForeground drawRectangle textWidget redrawRange
public void draw Annotation annotation GC gc Styled Text text Widget int offset int length Color color if gc null Point left text Widget get Location At Offset offset int x1 left x int y1 left y gc set Foreground color gc draw Line x1 y1 x1 left y text Widget get Line Height 1 else text Widget redraw Range offset length true  StyledText textWidget textWidget getLocationAtOffset setForeground drawLine textWidget getLineHeight textWidget redrawRange
see I Property Change Listener property Change org eclipse jface util Property Change Event public void property Change Property Change Event event if f Margin Painter null f Symbolic Font Name null f Symbolic Font Name equals event get Property f Margin Painter initialize  IPropertyChangeListener propertyChange PropertyChangeEvent propertyChange PropertyChangeEvent fMarginPainter fSymbolicFontName fSymbolicFontName getProperty fMarginPainter
Creates a new decoration support for the given viewer param source Viewer the source viewer param overview Ruler the viewer s overview ruler param annotation Access the annotation access param shared Text Colors the shared text color manager public Source Viewer Decoration Support I Source Viewer source Viewer I Overview Ruler overview Ruler I Annotation Access annotation Access I Shared Text Colors shared Text Colors f Source Viewer source Viewer f Overview Ruler overview Ruler f Annotation Access annotation Access f Shared Text Colors shared Text Colors  sourceViewer overviewRuler annotationAccess sharedTextColors SourceViewerDecorationSupport ISourceViewer sourceViewer IOverviewRuler overviewRuler IAnnotationAccess annotationAccess ISharedTextColors sharedTextColors fSourceViewer sourceViewer fOverviewRuler overviewRuler fAnnotationAccess annotationAccess fSharedTextColors sharedTextColors
if f Preference Store null f Property Change Listener new I Property Change Listener public void property Change Property Change Event event handle Preference Store Changed event  fPreferenceStore fPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent handlePreferenceStoreChanged
Installs this decoration support on the given preference store It assumes that this support has completely been configured param store the preference store public void install I Preference Store store f Preference Store store if f Preference Store null f Property Change Listener new I Property Change Listener public void property Change Property Change Event event handle Preference Store Changed event f Preference Store add Property Change Listener f Property Change Listener update Text Decorations update Overview Decorations  IPreferenceStore fPreferenceStore fPreferenceStore fPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent handlePreferenceStoreChanged fPreferenceStore addPropertyChangeListener fPropertyChangeListener updateTextDecorations updateOverviewDecorations
Updates the text decorations for all configured annotation types private void update Text Decorations Styled Text widget f Source Viewer get Text Widget if widget null widget is Disposed return if are Matching Characters Shown show Matching Characters else hide Matching Characters if is Cursor Line Shown show Cursor Line else hide Cursor Line if is Margin Shown show Margin else hide Margin Iterator e f Annotation Type Key Map key Set iterator while e has Next Object type e next Object style get Annotation Decoration Type type if style Annotation Preference STYLE NONE show Annotations type false false else hide Annotations type false false if are Annotations Highlighted type show Annotations type true false else hide Annotations type true false update Annotation Painter  updateTextDecorations StyledText fSourceViewer getTextWidget isDisposed areMatchingCharactersShown showMatchingCharacters hideMatchingCharacters isCursorLineShown showCursorLine hideCursorLine isMarginShown showMargin hideMargin fAnnotationTypeKeyMap keySet hasNext getAnnotationDecorationType AnnotationPreference STYLE_NONE showAnnotations hideAnnotations areAnnotationsHighlighted showAnnotations hideAnnotations updateAnnotationPainter
Returns the annotation decoration style used for the show in text preference for a given annotation type param annotation Type the annotation type being looked up return the decoration style for code type code since 3 0 private Object get Annotation Decoration Type Object annotation Type if are Annotations Shown annotation Type f Preference Store null Annotation Preference info Annotation Preference f Annotation Type Key Map get annotation Type if info null String key info get Text Style Preference Key if key null return f Preference Store get String key else legacy return Annotation Preference STYLE SQUIGGLES return Annotation Preference STYLE NONE  annotationType getAnnotationDecorationType annotationType areAnnotationsShown annotationType fPreferenceStore AnnotationPreference AnnotationPreference fAnnotationTypeKeyMap annotationType getTextStylePreferenceKey fPreferenceStore getString AnnotationPreference STYLE_SQUIGGLES AnnotationPreference STYLE_NONE
Updates the annotation overview for all configured annotation types public void update Overview Decorations if f Overview Ruler null Iterator e f Annotation Type Key Map key Set iterator while e has Next Object type e next if is Annotation Overview Shown type show Annotation Overview type false else hide Annotation Overview type false f Overview Ruler update  updateOverviewDecorations fOverviewRuler fAnnotationTypeKeyMap keySet hasNext isAnnotationOverviewShown showAnnotationOverview hideAnnotationOverview fOverviewRuler
Uninstalls this support from the preference store it has previously been installed on If there is no such preference store this call is without effect public void uninstall if f Preference Store null f Preference Store remove Property Change Listener f Property Change Listener f Property Change Listener null f Preference Store null if f Font Property Change Listener null J Face Resources get Font Registry remove Listener f Font Property Change Listener f Font Property Change Listener null  fPreferenceStore fPreferenceStore removePropertyChangeListener fPropertyChangeListener fPropertyChangeListener fPreferenceStore fFontPropertyChangeListener JFaceResources getFontRegistry removeListener fFontPropertyChangeListener fFontPropertyChangeListener
Disposes this decoration support Internally calls code uninstall code public void dispose uninstall update Text Decorations update Overview Decorations  updateTextDecorations updateOverviewDecorations
Sets the character pair matcher for the matching character painter param pair Matcher public void set Character Pair Matcher I Character Pair Matcher pair Matcher f Character Pair Matcher pair Matcher  pairMatcher setCharacterPairMatcher ICharacterPairMatcher pairMatcher fCharacterPairMatcher pairMatcher
Sets the preference keys for the annotation painter param type the annotation type param color Key the preference key for the color param editor Key the preference key for the presentation in the text area param overview Ruler Key the preference key for the presentation in the overview ruler param layer the layer public void set Annotation Painter Preference Keys Object type String color Key String editor Key String overview Ruler Key int layer Annotation Preference info new Annotation Preference type color Key editor Key overview Ruler Key layer f Annotation Type Key Map put type info  colorKey editorKey overviewRulerKey setAnnotationPainterPreferenceKeys colorKey editorKey overviewRulerKey AnnotationPreference AnnotationPreference colorKey editorKey overviewRulerKey fAnnotationTypeKeyMap
Sets the preference info for the annotation painter param info the preference info to be set public void set Annotation Preference Annotation Preference info f Annotation Type Key Map put info get Annotation Type info  setAnnotationPreference AnnotationPreference fAnnotationTypeKeyMap getAnnotationType
Sets the preference keys for the cursor line painter param enable Key the preference key for the cursor line painter param color Key the preference key for the color used by the cursor line painter public void set Cursor Line Painter Preference Keys String enable Key String color Key f Cursor Line Painter Enable Key enable Key f Cursor Line Painter Color Key color Key  enableKey colorKey setCursorLinePainterPreferenceKeys enableKey colorKey fCursorLinePainterEnableKey enableKey fCursorLinePainterColorKey colorKey
Sets the preference keys for the margin painter param enable Key the preference key for the margin painter param color Key the preference key for the color used by the margin painter param column Key the preference key for the margin column public void set Margin Painter Preference Keys String enable Key String color Key String column Key f Margin Painter Enable Key enable Key f Margin Painter Color Key color Key f Margin Painter Column Key column Key  enableKey colorKey columnKey setMarginPainterPreferenceKeys enableKey colorKey columnKey fMarginPainterEnableKey enableKey fMarginPainterColorKey colorKey fMarginPainterColumnKey columnKey
Sets the preference keys for the matching character painter param enable Key the preference key for the matching character painter param color Key the preference key for the color used by the matching character painter public void set Matching Character Painter Preference Keys String enable Key String color Key f Matching Character Painter Enable Key enable Key f Matching Character Painter Color Key color Key  enableKey colorKey setMatchingCharacterPainterPreferenceKeys enableKey colorKey fMatchingCharacterPainterEnableKey enableKey fMatchingCharacterPainterColorKey colorKey
Sets the symbolic font name that is used for computing the margin width param symbolic Font Name public void set Symbolic Font Name String symbolic Font Name f Symbolic Font Name symbolic Font Name  symbolicFontName setSymbolicFontName symbolicFontName fSymbolicFontName symbolicFontName
Returns the annotation preference for the given key param preference Key the preference key string return the annotation preference private Annotation Preference get Annotation Preference Info String preference Key Iterator e f Annotation Type Key Map values iterator while e has Next Annotation Preference info Annotation Preference e next if info null info is Preference Key preference Key return info return null  preferenceKey AnnotationPreference getAnnotationPreferenceInfo preferenceKey fAnnotationTypeKeyMap hasNext AnnotationPreference AnnotationPreference isPreferenceKey preferenceKey
protected void handle Preference Store Changed Property Change Event event String p event get Property if f Matching Character Painter Enable Key null f Matching Character Painter Enable Key equals p f Character Pair Matcher null if are Matching Characters Shown show Matching Characters else hide Matching Characters return if f Matching Character Painter Color Key null f Matching Character Painter Color Key equals p if f Matching Character Painter null f Matching Character Painter set Color get Color f Matching Character Painter Color Key f Matching Character Painter paint I Painter CONFIGURATION return if f Cursor Line Painter Enable Key null f Cursor Line Painter Enable Key equals p if is Cursor Line Shown show Cursor Line else hide Cursor Line return if f Cursor Line Painter Color Key null f Cursor Line Painter Color Key equals p if f Cursor Line Painter null hide Cursor Line show Cursor Line return if f Margin Painter Enable Key null f Margin Painter Enable Key equals p if is Margin Shown show Margin else hide Margin return if f Margin Painter Color Key null f Margin Painter Color Key equals p if f Margin Painter null f Margin Painter set Margin Ruler Color get Color f Margin Painter Color Key f Margin Painter paint I Painter CONFIGURATION return if f Margin Painter Column Key null f Margin Painter Column Key equals p if f Margin Painter null f Preference Store null f Margin Painter set Margin Ruler Column f Preference Store get Int f Margin Painter Column Key f Margin Painter paint I Painter CONFIGURATION return Annotation Preference info get Annotation Preference Info p if info null if info get Color Preference Key equals p Color color get Color info get Color Preference Key if f Annotation Painter null f Annotation Painter set Annotation Type Color info get Annotation Type color f Annotation Painter paint I Painter CONFIGURATION set Annotation Overview Color info get Annotation Type color return if info get Text Preference Key equals p info get Text Style Preference Key null info get Text Style Preference Key equals p Object style get Annotation Decoration Type info get Annotation Type if Annotation Preference STYLE NONE style show Annotations info get Annotation Type false true else hide Annotations info get Annotation Type false true return if info get Highlight Preference Key null info get Highlight Preference Key equals p if are Annotations Highlighted info get Annotation Type show Annotations info get Annotation Type true true else hide Annotations info get Annotation Type true true return Object style get Annotation Decoration Type info get Annotation Type if style Annotation Preference STYLE NONE show Annotations info get Annotation Type false false else hide Annotations info get Annotation Type false false if info get Overview Ruler Preference Key equals p if is Annotation Overview Shown info get Annotation Type show Annotation Overview info get Annotation Type true else hide Annotation Overview info get Annotation Type true return  handlePreferenceStoreChanged PropertyChangeEvent getProperty fMatchingCharacterPainterEnableKey fMatchingCharacterPainterEnableKey fCharacterPairMatcher areMatchingCharactersShown showMatchingCharacters hideMatchingCharacters fMatchingCharacterPainterColorKey fMatchingCharacterPainterColorKey fMatchingCharacterPainter fMatchingCharacterPainter setColor getColor fMatchingCharacterPainterColorKey fMatchingCharacterPainter IPainter fCursorLinePainterEnableKey fCursorLinePainterEnableKey isCursorLineShown showCursorLine hideCursorLine fCursorLinePainterColorKey fCursorLinePainterColorKey fCursorLinePainter hideCursorLine showCursorLine fMarginPainterEnableKey fMarginPainterEnableKey isMarginShown showMargin hideMargin fMarginPainterColorKey fMarginPainterColorKey fMarginPainter fMarginPainter setMarginRulerColor getColor fMarginPainterColorKey fMarginPainter IPainter fMarginPainterColumnKey fMarginPainterColumnKey fMarginPainter fPreferenceStore fMarginPainter setMarginRulerColumn fPreferenceStore getInt fMarginPainterColumnKey fMarginPainter IPainter AnnotationPreference getAnnotationPreferenceInfo getColorPreferenceKey getColor getColorPreferenceKey fAnnotationPainter fAnnotationPainter setAnnotationTypeColor getAnnotationType fAnnotationPainter IPainter setAnnotationOverviewColor getAnnotationType getTextPreferenceKey getTextStylePreferenceKey getTextStylePreferenceKey getAnnotationDecorationType getAnnotationType AnnotationPreference STYLE_NONE showAnnotations getAnnotationType hideAnnotations getAnnotationType getHighlightPreferenceKey getHighlightPreferenceKey areAnnotationsHighlighted getAnnotationType showAnnotations getAnnotationType hideAnnotations getAnnotationType getAnnotationDecorationType getAnnotationType AnnotationPreference STYLE_NONE showAnnotations getAnnotationType hideAnnotations getAnnotationType getOverviewRulerPreferenceKey isAnnotationOverviewShown getAnnotationType showAnnotationOverview getAnnotationType hideAnnotationOverview getAnnotationType
Returns the shared color for the given key param key the color key string return the shared color for the given key private Color get Color String key if f Preference Store null RGB rgb Preference Converter get Color f Preference Store key return get Color rgb return null  getColor fPreferenceStore PreferenceConverter getColor fPreferenceStore getColor
Returns the shared color for the given RGB param rgb the RGB return the shared color for the given RGB private Color get Color RGB rgb return f Shared Text Colors get Color rgb  getColor fSharedTextColors getColor
Returns the color of the given annotation type param annotation Type the annotation type return the color of the annotation type private Color get Annotation Type Color Object annotation Type Annotation Preference info Annotation Preference f Annotation Type Key Map get annotation Type if info null return get Color info get Color Preference Key return null  annotationType getAnnotationTypeColor annotationType AnnotationPreference AnnotationPreference fAnnotationTypeKeyMap annotationType getColor getColorPreferenceKey
Returns the layer of the given annotation type param annotation Type the annotation type return the layer private int get Annotation Type Layer Object annotation Type Annotation Preference info Annotation Preference f Annotation Type Key Map get annotation Type if info null return info get Presentation Layer return 0  annotationType getAnnotationTypeLayer annotationType AnnotationPreference AnnotationPreference fAnnotationTypeKeyMap annotationType getPresentationLayer
Enables showing of matching characters private void show Matching Characters if f Matching Character Painter null if f Source Viewer instanceof I Text Viewer Extension2 f Matching Character Painter new Matching Character Painter f Source Viewer f Character Pair Matcher f Matching Character Painter set Color get Color f Matching Character Painter Color Key I Text Viewer Extension2 extension I Text Viewer Extension2 f Source Viewer extension add Painter f Matching Character Painter  showMatchingCharacters fMatchingCharacterPainter fSourceViewer ITextViewerExtension2 fMatchingCharacterPainter MatchingCharacterPainter fSourceViewer fCharacterPairMatcher fMatchingCharacterPainter setColor getColor fMatchingCharacterPainterColorKey ITextViewerExtension2 ITextViewerExtension2 fSourceViewer addPainter fMatchingCharacterPainter
Disables showing of matching characters private void hide Matching Characters if f Matching Character Painter null if f Source Viewer instanceof I Text Viewer Extension2 I Text Viewer Extension2 extension I Text Viewer Extension2 f Source Viewer extension remove Painter f Matching Character Painter f Matching Character Painter deactivate true f Matching Character Painter dispose f Matching Character Painter null  hideMatchingCharacters fMatchingCharacterPainter fSourceViewer ITextViewerExtension2 ITextViewerExtension2 ITextViewerExtension2 fSourceViewer removePainter fMatchingCharacterPainter fMatchingCharacterPainter fMatchingCharacterPainter fMatchingCharacterPainter
Tells whether matching characters are shown return code true code if the matching characters are shown private boolean are Matching Characters Shown if f Preference Store null f Matching Character Painter Enable Key null return f Preference Store get Boolean f Matching Character Painter Enable Key return false  areMatchingCharactersShown fPreferenceStore fMatchingCharacterPainterEnableKey fPreferenceStore getBoolean fMatchingCharacterPainterEnableKey
Shows the cursor line private void show Cursor Line if f Cursor Line Painter null if f Source Viewer instanceof I Text Viewer Extension2 f Cursor Line Painter new Cursor Line Painter f Source Viewer f Cursor Line Painter set Highlight Color get Color f Cursor Line Painter Color Key I Text Viewer Extension2 extension I Text Viewer Extension2 f Source Viewer extension add Painter f Cursor Line Painter  showCursorLine fCursorLinePainter fSourceViewer ITextViewerExtension2 fCursorLinePainter CursorLinePainter fSourceViewer fCursorLinePainter setHighlightColor getColor fCursorLinePainterColorKey ITextViewerExtension2 ITextViewerExtension2 fSourceViewer addPainter fCursorLinePainter
Hides the cursor line private void hide Cursor Line if f Cursor Line Painter null if f Source Viewer instanceof I Text Viewer Extension2 I Text Viewer Extension2 extension I Text Viewer Extension2 f Source Viewer extension remove Painter f Cursor Line Painter f Cursor Line Painter deactivate true f Cursor Line Painter dispose f Cursor Line Painter null  hideCursorLine fCursorLinePainter fSourceViewer ITextViewerExtension2 ITextViewerExtension2 ITextViewerExtension2 fSourceViewer removePainter fCursorLinePainter fCursorLinePainter fCursorLinePainter fCursorLinePainter
Tells whether the cursor line is shown return code true code if the cursor line is shown private boolean is Cursor Line Shown if f Preference Store null f Cursor Line Painter Enable Key null return f Preference Store get Boolean f Cursor Line Painter Enable Key return false  isCursorLineShown fPreferenceStore fCursorLinePainterEnableKey fPreferenceStore getBoolean fCursorLinePainterEnableKey
Shows the margin private void show Margin if f Margin Painter null if f Source Viewer instanceof I Text Viewer Extension2 f Margin Painter new Margin Painter f Source Viewer f Margin Painter set Margin Ruler Color get Color f Margin Painter Color Key if f Preference Store null f Margin Painter set Margin Ruler Column f Preference Store get Int f Margin Painter Column Key I Text Viewer Extension2 extension I Text Viewer Extension2 f Source Viewer extension add Painter f Margin Painter f Font Property Change Listener new Font Property Change Listener J Face Resources get Font Registry add Listener f Font Property Change Listener  showMargin fMarginPainter fSourceViewer ITextViewerExtension2 fMarginPainter MarginPainter fSourceViewer fMarginPainter setMarginRulerColor getColor fMarginPainterColorKey fPreferenceStore fMarginPainter setMarginRulerColumn fPreferenceStore getInt fMarginPainterColumnKey ITextViewerExtension2 ITextViewerExtension2 fSourceViewer addPainter fMarginPainter fFontPropertyChangeListener FontPropertyChangeListener JFaceResources getFontRegistry addListener fFontPropertyChangeListener
Hides the margin private void hide Margin if f Margin Painter null if f Source Viewer instanceof I Text Viewer Extension2 J Face Resources get Font Registry remove Listener f Font Property Change Listener f Font Property Change Listener null I Text Viewer Extension2 extension I Text Viewer Extension2 f Source Viewer extension remove Painter f Margin Painter f Margin Painter deactivate true f Margin Painter dispose f Margin Painter null  hideMargin fMarginPainter fSourceViewer ITextViewerExtension2 JFaceResources getFontRegistry removeListener fFontPropertyChangeListener fFontPropertyChangeListener ITextViewerExtension2 ITextViewerExtension2 fSourceViewer removePainter fMarginPainter fMarginPainter fMarginPainter fMarginPainter
Tells whether the margin is shown return code true code if the margin is shown private boolean is Margin Shown if f Preference Store null f Margin Painter Enable Key null return f Preference Store get Boolean f Margin Painter Enable Key return false  isMarginShown fPreferenceStore fMarginPainterEnableKey fPreferenceStore getBoolean fMarginPainterEnableKey
Enables annotations in the source viewer for the given annotation type param annotation Type the annotation type param highlighting code true code if highlighting code false code if painting squiggles param update Painter if code true code update the annotation painter since 3 0 private void show Annotations Object annotation Type boolean highlighting boolean update Painter if f Source Viewer instanceof I Text Viewer Extension2 if f Annotation Painter null f Annotation Painter create Annotation Painter if f Source Viewer instanceof I Text Viewer Extension4 I Text Viewer Extension4 f Source Viewer add Text Presentation Listener f Annotation Painter I Text Viewer Extension2 extension I Text Viewer Extension2 f Source Viewer extension add Painter f Annotation Painter f Annotation Painter set Annotation Type Color annotation Type get Annotation Type Color annotation Type if highlighting f Annotation Painter add Highlight Annotation Type annotation Type else f Annotation Painter add Annotation Type annotation Type get Annotation Decoration Type annotation Type if update Painter update Annotation Painter  annotationType updatePainter showAnnotations annotationType updatePainter fSourceViewer ITextViewerExtension2 fAnnotationPainter fAnnotationPainter createAnnotationPainter fSourceViewer ITextViewerExtension4 ITextViewerExtension4 fSourceViewer addTextPresentationListener fAnnotationPainter ITextViewerExtension2 ITextViewerExtension2 fSourceViewer addPainter fAnnotationPainter fAnnotationPainter setAnnotationTypeColor annotationType getAnnotationTypeColor annotationType fAnnotationPainter addHighlightAnnotationType annotationType fAnnotationPainter addAnnotationType annotationType getAnnotationDecorationType annotationType updatePainter updateAnnotationPainter
Creates and configures the annotation painter and configures return an annotation painter since 3 0 protected Annotation Painter create Annotation Painter Annotation Painter painter new Annotation Painter f Source Viewer f Annotation Access TODO add extension point for drawing strategies painter add Drawing Strategy Annotation Preference STYLE BOX fg Box Strategy painter add Drawing Strategy Annotation Preference STYLE NONE fg Null Strategy painter add Drawing Strategy Annotation Preference STYLE SQUIGGLES fg Squiggles Strategy painter add Drawing Strategy Annotation Preference STYLE UNDERLINE fg Underline Strategy painter add Drawing Strategy Annotation Preference STYLE IBEAM fgI Beam Strategy return painter  AnnotationPainter createAnnotationPainter AnnotationPainter AnnotationPainter fSourceViewer fAnnotationAccess addDrawingStrategy AnnotationPreference STYLE_BOX fgBoxStrategy addDrawingStrategy AnnotationPreference STYLE_NONE fgNullStrategy addDrawingStrategy AnnotationPreference STYLE_SQUIGGLES fgSquigglesStrategy addDrawingStrategy AnnotationPreference STYLE_UNDERLINE fgUnderlineStrategy addDrawingStrategy AnnotationPreference STYLE_IBEAM fgIBeamStrategy
Updates the annotation painter since 3 0 private void update Annotation Painter if f Annotation Painter null return f Annotation Painter paint I Painter CONFIGURATION if f Annotation Painter is Painting Annotations if f Source Viewer instanceof I Text Viewer Extension2 I Text Viewer Extension2 extension I Text Viewer Extension2 f Source Viewer extension remove Painter f Annotation Painter if f Source Viewer instanceof I Text Viewer Extension4 I Text Viewer Extension4 f Source Viewer remove Text Presentation Listener f Annotation Painter f Annotation Painter deactivate true f Annotation Painter dispose f Annotation Painter null  updateAnnotationPainter fAnnotationPainter fAnnotationPainter IPainter fAnnotationPainter isPaintingAnnotations fSourceViewer ITextViewerExtension2 ITextViewerExtension2 ITextViewerExtension2 fSourceViewer removePainter fAnnotationPainter fSourceViewer ITextViewerExtension4 ITextViewerExtension4 fSourceViewer removeTextPresentationListener fAnnotationPainter fAnnotationPainter fAnnotationPainter fAnnotationPainter
Hides annotations in the source viewer for the given annotation type param annotation Type the annotation type param highlighting code true code if highlighting code false code if painting squiggles param update Painter if code true code update the annotation painter since 3 0 private void hide Annotations Object annotation Type boolean highlighting boolean update Painter if f Annotation Painter null if highlighting f Annotation Painter remove Highlight Annotation Type annotation Type else f Annotation Painter remove Annotation Type annotation Type if update Painter update Annotation Painter  annotationType updatePainter hideAnnotations annotationType updatePainter fAnnotationPainter fAnnotationPainter removeHighlightAnnotationType annotationType fAnnotationPainter removeAnnotationType annotationType updatePainter updateAnnotationPainter
Tells whether annotations are shown in the source viewer for the given type param annotation Type the annotation type return code true code if the annotations are shown private boolean are Annotations Shown Object annotation Type if f Preference Store null Annotation Preference info Annotation Preference f Annotation Type Key Map get annotation Type if info null String key info get Text Preference Key return key null f Preference Store get Boolean key return false  annotationType areAnnotationsShown annotationType fPreferenceStore AnnotationPreference AnnotationPreference fAnnotationTypeKeyMap annotationType getTextPreferenceKey fPreferenceStore getBoolean
Tells whether annotations are highlighted in the source viewer for the given type param annotation Type the annotation type return code true code if the annotations are highlighted since 3 0 private boolean are Annotations Highlighted Object annotation Type if f Preference Store null Annotation Preference info Annotation Preference f Annotation Type Key Map get annotation Type if info null return info get Highlight Preference Key null f Preference Store get Boolean info get Highlight Preference Key return false  annotationType areAnnotationsHighlighted annotationType fPreferenceStore AnnotationPreference AnnotationPreference fAnnotationTypeKeyMap annotationType getHighlightPreferenceKey fPreferenceStore getBoolean getHighlightPreferenceKey
Tells whether annotation overview is enabled for the given type param annotation Type the annotation type return code true code if the annotation overview is shown private boolean is Annotation Overview Shown Object annotation Type if f Preference Store null f Overview Ruler null Annotation Preference info Annotation Preference f Annotation Type Key Map get annotation Type if info null return f Preference Store get Boolean info get Overview Ruler Preference Key return false  annotationType isAnnotationOverviewShown annotationType fPreferenceStore fOverviewRuler AnnotationPreference AnnotationPreference fAnnotationTypeKeyMap annotationType fPreferenceStore getBoolean getOverviewRulerPreferenceKey
Enable annotation overview for the given annotation type param annotation Type the annotation type param update code true code if the overview should be updated private void show Annotation Overview Object annotation Type boolean update if f Overview Ruler null f Overview Ruler set Annotation Type Color annotation Type get Annotation Type Color annotation Type f Overview Ruler set Annotation Type Layer annotation Type get Annotation Type Layer annotation Type f Overview Ruler add Annotation Type annotation Type if update f Overview Ruler update  annotationType showAnnotationOverview annotationType fOverviewRuler fOverviewRuler setAnnotationTypeColor annotationType getAnnotationTypeColor annotationType fOverviewRuler setAnnotationTypeLayer annotationType getAnnotationTypeLayer annotationType fOverviewRuler addAnnotationType annotationType fOverviewRuler
Hides the annotation overview for the given type param annotation Type the annotation type param update code true code if the overview should be updated private void hide Annotation Overview Object annotation Type boolean update if f Overview Ruler null f Overview Ruler remove Annotation Type annotation Type if update f Overview Ruler update  annotationType hideAnnotationOverview annotationType fOverviewRuler fOverviewRuler removeAnnotationType annotationType fOverviewRuler
Hides the annotation overview public void hide Annotation Overview if f Overview Ruler null Iterator e f Annotation Type Key Map key Set iterator while e has Next f Overview Ruler remove Annotation Type e next f Overview Ruler update  hideAnnotationOverview fOverviewRuler fAnnotationTypeKeyMap keySet hasNext fOverviewRuler removeAnnotationType fOverviewRuler
Sets the annotation overview color for the given annotation type param annotation Type the annotation type param color the color private void set Annotation Overview Color Object annotation Type Color color if f Overview Ruler null f Overview Ruler set Annotation Type Color annotation Type color f Overview Ruler update  annotationType setAnnotationOverviewColor annotationType fOverviewRuler fOverviewRuler setAnnotationTypeColor annotationType fOverviewRuler

see org eclipse swt events Mouse Adapter mouse Double Click org eclipse swt events Mouse Event public void mouse Double Click Mouse Event e if f Action Handler null f Action Handler is Enabled f Action Handler run  MouseAdapter mouseDoubleClick MouseEvent mouseDoubleClick MouseEvent fActionHandler fActionHandler isEnabled fActionHandler
Creates a new item with the given id param id the item s id public Status Line Contribution Item String id this id true DEFAULT WIDTH IN CHARS  StatusLineContributionItem DEFAULT_WIDTH_IN_CHARS
Creates a new item with the given attributes param id the item s id param visible the visibility of this item param width In Chars the width in characters since 3 0 public Status Line Contribution Item String id boolean visible int width In Chars super id set Visible visible f Width In Chars width In Chars  widthInChars StatusLineContributionItem widthInChars setVisible fWidthInChars widthInChars
see I Status Field set Text String public void set Text String text f Text text update Message Label  IStatusField setText setText fText updateMessageLabel
see I Status Field set Image Image public void set Image Image image f Image image update Message Label  IStatusField setImage setImage fImage updateMessageLabel
since 3 0 public void set Error Text String text f Error Text text update Message Label  setErrorText fErrorText updateMessageLabel
since 3 0 public void set Error Image Image image f Error Image image update Message Label  setErrorImage fErrorImage updateMessageLabel
since 3 0 public void set Tool Tip Text String string f Tool Tip Text string update Message Label  setToolTipText fToolTipText updateMessageLabel
f Label add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e f Mouse Listener null  fLabel addDisposeListener DisposeListener widgetDisposed DisposeEvent fMouseListener
public void fill Composite parent Label sep new Label parent SWT SEPARATOR f Label new C Label parent SWT SHADOW NONE f Label add Dispose Listener new Dispose Listener public void widget Disposed Dispose Event e f Mouse Listener null if f Action Handler null f Mouse Listener new Listener f Label add Mouse Listener f Mouse Listener Status Line Layout Data data new Status Line Layout Data data width Hint get Width Hint parent f Label set Layout Data data data new Status Line Layout Data data height Hint get Height Hint parent sep set Layout Data data update Message Label  fLabel CLabel SHADOW_NONE fLabel addDisposeListener DisposeListener widgetDisposed DisposeEvent fMouseListener fActionHandler fMouseListener fLabel addMouseListener fMouseListener StatusLineLayoutData StatusLineLayoutData widthHint getWidthHint fLabel setLayoutData StatusLineLayoutData heightHint getHeightHint setLayoutData updateMessageLabel
public void set Action Handler I Action action Handler if f Action Handler null action Handler null f Mouse Listener null if f Label is Disposed f Label remove Mouse Listener f Mouse Listener f Mouse Listener null f Action Handler action Handler if f Label null f Label is Disposed f Mouse Listener null f Action Handler null f Mouse Listener new Listener f Label add Mouse Listener f Mouse Listener  setActionHandler IAction actionHandler fActionHandler actionHandler fMouseListener fLabel isDisposed fLabel removeMouseListener fMouseListener fMouseListener fActionHandler actionHandler fLabel fLabel isDisposed fMouseListener fActionHandler fMouseListener fLabel addMouseListener fMouseListener
Returns the width hint for this label param control the root control of this label return the width hint for this label since 2 1 private int get Width Hint Composite control if f Fixed Width 0 GC gc new GC control gc set Font control get Font f Fixed Width gc get Font Metrics get Average Char Width f Width In Chars f Fixed Width INDENT 2 gc dispose return f Fixed Width  getWidthHint fFixedWidth setFont getFont fFixedWidth getFontMetrics getAverageCharWidth fWidthInChars fFixedWidth fFixedWidth
Returns the height hint for this label param control the root control of this label return the height hint for this label since 3 0 private int get Height Hint Composite control if f Fixed Height 0 GC gc new GC control gc set Font control get Font f Fixed Height gc get Font Metrics get Height gc dispose return f Fixed Height  getHeightHint fFixedHeight setFont getFont fFixedHeight getFontMetrics getHeight fFixedHeight
Updates the message label widget since 3 0 private void update Message Label if f Label null f Label is Disposed Display display f Label get Display if f Error Text null f Error Text length 0 f Error Image null f Label set Foreground J Face Colors get Error Text display f Label set Text f Error Text f Label set Image f Error Image if f Tool Tip Text null f Label set Tool Tip Text f Tool Tip Text else if f Error Text length f Width In Chars f Label set Tool Tip Text f Error Text else f Label set Tool Tip Text null else f Label set Foreground display get System Color SWT COLOR WIDGET FOREGROUND f Label set Text f Text f Label set Image f Image if f Tool Tip Text null f Label set Tool Tip Text f Tool Tip Text else if f Text null f Text length f Width In Chars f Label set Tool Tip Text f Text else f Label set Tool Tip Text null  updateMessageLabel fLabel fLabel isDisposed fLabel getDisplay fErrorText fErrorText fErrorImage fLabel setForeground JFaceColors getErrorText fLabel setText fErrorText fLabel setImage fErrorImage fToolTipText fLabel setToolTipText fToolTipText fErrorText fWidthInChars fLabel setToolTipText fErrorText fLabel setToolTipText fLabel setForeground getSystemColor COLOR_WIDGET_FOREGROUND fLabel setText fText fLabel setImage fImage fToolTipText fLabel setToolTipText fToolTipText fText fText fWidthInChars fLabel setToolTipText fText fLabel setToolTipText

public void create Part Control Composite parent f Parent new Composite parent SWT NONE f Stack Layout new Stack Layout f Parent set Layout f Stack Layout f Default Composite new Composite f Parent SWT NONE f Default Composite set Layout new Fill Layout super create Part Control f Default Composite update Part Control get Editor Input  createPartControl fParent fStackLayout StackLayout fParent setLayout fStackLayout fDefaultComposite fParent fDefaultComposite setLayout FillLayout createPartControl fDefaultComposite updatePartControl getEditorInput
Checks if the status of the given input is OK If not the status control is shown rather than the default control param input the input whose status is checked public void update Part Control I Editor Input input if f Status Control null f Status Control dispose f Status Control null Control front null if f Parent null input null if get Document Provider instanceof I Document Provider Extension I Document Provider Extension extension I Document Provider Extension get Document Provider I Status status extension get Status input if is Error Status status front f Default Composite else f Status Control create Status Control f Parent status front f Status Control if f Stack Layout top Control front f Stack Layout top Control front f Parent layout update Status Fields  updatePartControl IEditorInput fStatusControl fStatusControl fStatusControl fParent getDocumentProvider IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension getDocumentProvider IStatus getStatus isErrorStatus fDefaultComposite fStatusControl createStatusControl fParent fStatusControl fStackLayout topControl fStackLayout topControl fParent updateStatusFields
Returns whether the given status indicates an error Subclasses may override param status the status to be checked return code true code if the status indicates an error code false code otherwise since 3 0 protected boolean is Error Status I Status status return status null status isOK  isErrorStatus IStatus
Creates the status control for the given status May be overridden by subclasses param parent the parent control param status the status return the new status control protected Control create Status Control Composite parent I Status status Info Form info Form new Info Form parent info Form set Header Text get Status Header status info Form set Banner Text get Status Banner status info Form set Info get Status Message status return info Form get Control  createStatusControl IStatus InfoForm infoForm InfoForm infoForm setHeaderText getStatusHeader infoForm setBannerText getStatusBanner infoForm setInfo getStatusMessage infoForm getControl
Returns a header for the given status param status the status whose message is returned return a header for the given status protected String get Status Header I Status status return NON NLS 1  getStatusHeader IStatus
Returns a banner for the given status param status the status whose message is returned return a banner for the given status protected String get Status Banner I Status status return NON NLS 1  getStatusBanner IStatus
Returns a message for the given status param status the status whose message is returned return a message for the given status protected String get Status Message I Status status return status get Message  getStatusMessage IStatus getMessage
protected void update Status Field String category I Document Provider provider get Document Provider if provider instanceof I Document Provider Extension I Document Provider Extension extension I Document Provider Extension provider I Status status extension get Status get Editor Input if is Error Status status I Status Field field get Status Field category if field null field set Text f Error Label return super update Status Field category  updateStatusField IDocumentProvider getDocumentProvider IDocumentProviderExtension IDocumentProviderExtension IDocumentProviderExtension IStatus getStatus getEditorInput isErrorStatus IStatusField getStatusField setText fErrorLabel updateStatusField
protected void do Set Input I Editor Input input throws Core Exception super do Set Input input if f Parent null f Parent is Disposed update Part Control get Editor Input  doSetInput IEditorInput CoreException doSetInput fParent fParent isDisposed updatePartControl getEditorInput
public void do Revert To Saved http dev eclipse org bugs show bug cgi id 19014 super do Revert To Saved if f Parent null f Parent is Disposed update Part Control get Editor Input  doRevertToSaved show_bug doRevertToSaved fParent fParent isDisposed updatePartControl getEditorInput
protected void sanity Check State I Editor Input input http dev eclipse org bugs show bug cgi id 19014 super sanity Check State input if f Parent null f Parent is Disposed update Part Control get Editor Input  sanityCheckState IEditorInput show_bug sanityCheckState fParent fParent isDisposed updatePartControl getEditorInput

Creates a new action for the given ruler and editor The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the text editor param ruler the vertical ruler info see Marker Ruler Action Marker Ruler Action Resource Bundle String I Text Editor I Vertical Ruler Info String boolean public Task Marker Ruler Action Resource Bundle bundle String prefix I Text Editor editor I Vertical Ruler Info ruler super bundle prefix editor ruler I Marker TASK false  ResourceAction MarkerRulerAction MarkerRulerAction ResourceBundle ITextEditor IVerticalRulerInfo TaskMarkerRulerAction ResourceBundle ITextEditor IVerticalRulerInfo IMarker
protected void add Marker I Resource resource get Resource if resource null return Task Properties Dialog dialog new Task Properties Dialog get Text Editor get Site get Shell dialog set Resource resource dialog set Initial Attributes get Initial Attributes dialog open  addMarker IResource getResource TaskPropertiesDialog TaskPropertiesDialog getTextEditor getSite getShell setResource setInitialAttributes getInitialAttributes
see Abstract Ruler Action Delegate create Action I Text Editor I Vertical Ruler Info protected I Action create Action I Text Editor editor I Vertical Ruler Info ruler Info return new Task Marker Ruler Action Text Editor Messages get Resource Bundle Editor Manage Tasks editor ruler Info NON NLS 1  AbstractRulerActionDelegate createAction ITextEditor IVerticalRulerInfo IAction createAction ITextEditor IVerticalRulerInfo rulerInfo TaskMarkerRulerAction TextEditorMessages getResourceBundle ManageTasks rulerInfo

Creates a new action param viewer the viewer param operation Code the opcode public Text Viewer Action I Text Viewer viewer int operation Code f Operation Code operation Code f Operation Target viewer get Text Operation Target update  operationCode TextViewerAction ITextViewer operationCode fOperationCode operationCode fOperationTarget getTextOperationTarget
Updates the enabled state of the action Fires a property change if the enabled state changes see Action fire Property Change String Object Object public void update boolean was Enabled is Enabled boolean is Enabled f Operation Target null f Operation Target can Do Operation f Operation Code set Enabled is Enabled if was Enabled is Enabled fire Property Change ENABLED was Enabled Boolean TRUE Boolean FALSE is Enabled Boolean TRUE Boolean FALSE  firePropertyChange wasEnabled isEnabled isEnabled fOperationTarget fOperationTarget canDoOperation fOperationCode setEnabled isEnabled wasEnabled isEnabled firePropertyChange wasEnabled isEnabled
see Action run public void run if f Operation Code 1 f Operation Target null f Operation Target do Operation f Operation Code  fOperationCode fOperationTarget fOperationTarget doOperation fOperationCode
Creates a new dialog param parent the shell parent of the dialog param template the template to edit param edit whether this is a new template or an existing being edited param is Name Modifiable whether the name of the template may be modified param registry the context type registry to use public Edit Template Dialog Shell parent Template template boolean edit boolean is Name Modifiable Context Type Registry registry super parent set Shell Style get Shell Style SWT MAX SWT RESIZE String title edit Text Editor Template Messages get String Edit Template Dialog title edit NON NLS 1 Text Editor Template Messages get String Edit Template Dialog title new NON NLS 1 set Title title f Template template f Is Name Modifiable is Name Modifiable List contexts new Array List for Iterator it registry context Types it has Next Template Context Type type Template Context Type it next contexts add new String type get Id type get Name f Context Types String contexts to Array new String contexts size f Validation Status new Status Info f Context Type Registry registry Template Context Type type f Context Type Registry get Context Type template get Context Type Id f Template Processor set Context Type type  isNameModifiable EditTemplateDialog isNameModifiable ContextTypeRegistry setShellStyle getShellStyle TextEditorTemplateMessages getString EditTemplateDialog TextEditorTemplateMessages getString EditTemplateDialog setTitle fTemplate fIsNameModifiable isNameModifiable ArrayList contextTypes hasNext TemplateContextType TemplateContextType getId getName fContextTypes toArray fValidationStatus StatusInfo fContextTypeRegistry TemplateContextType fContextTypeRegistry getContextType getContextTypeId fTemplateProcessor setContextType
public void create super create update initial ok button to be disabled for new templates boolean valid f Name Text null f Name Text get Text trim length 0 if valid Status Info status new Status Info status set Error Text Editor Template Messages get String Edit Template Dialog error noname NON NLS 1 update Buttons Enable State status  fNameText fNameText getText StatusInfo StatusInfo setError TextEditorTemplateMessages getString EditTemplateDialog updateButtonsEnableState
Modify Listener listener new Modify Listener public void modify Text Modify Event e do Text Widget Changed e widget  ModifyListener ModifyListener modifyText ModifyEvent doTextWidgetChanged
f Name Text add Focus Listener new Focus Listener public void focus Gained Focus Event e  fNameText addFocusListener FocusListener focusGained FocusEvent
public void focus Lost Focus Event e if f Suppress Error f Suppress Error false update Buttons  focusLost FocusEvent fSuppressError fSuppressError updateButtons
f Insert Variable Button set Text Text Editor Template Messages get String Edit Template Dialog insert variable NON NLS 1 f Insert Variable Button add Selection Listener new Selection Listener public void widget Selected Selection Event e f Pattern Editor get Text Widget set Focus f Pattern Editor do Operation I Source Viewer CONTENTASSIST PROPOSALS  fInsertVariableButton setText TextEditorTemplateMessages getString EditTemplateDialog fInsertVariableButton addSelectionListener SelectionListener widgetSelected SelectionEvent fPatternEditor getTextWidget setFocus fPatternEditor doOperation ISourceViewer CONTENTASSIST_PROPOSALS
public void widget Default Selected Selection Event e  widgetDefaultSelected SelectionEvent
protected Control create Dialog Area Composite ancestor Composite parent new Composite ancestor SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 parent set Layout layout parent set Layout Data new Grid Data Grid Data FILL BOTH Modify Listener listener new Modify Listener public void modify Text Modify Event e do Text Widget Changed e widget if f Is Name Modifiable create Label parent Text Editor Template Messages get String Edit Template Dialog name NON NLS 1 Composite composite new Composite parent SWT NONE composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL layout new Grid Layout layout num Columns 3 layout margin Width 0 layout margin Height 0 composite set Layout layout f Name Text create Text composite f Name Text add Modify Listener listener f Name Text add Focus Listener new Focus Listener public void focus Gained Focus Event e public void focus Lost Focus Event e if f Suppress Error f Suppress Error false update Buttons create Label composite Text Editor Template Messages get String Edit Template Dialog context NON NLS 1 f Context Combo new Combo composite SWT READ ONLY for int i 0 i f Context Types length i f Context Combo add f Context Types i 1 f Context Combo add Modify Listener listener create Label parent Text Editor Template Messages get String Edit Template Dialog description NON NLS 1 int desc Flags f Is Name Modifiable SWT BORDER SWT BORDER SWT READ ONLY f Description Text new Text parent desc Flags f Description Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Description Text add Modify Listener listener Label pattern Label create Label parent Text Editor Template Messages get String Edit Template Dialog pattern NON NLS 1 pattern Label set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING f Pattern Editor create Editor parent Label filler new Label parent SWT NONE filler set Layout Data new Grid Data Composite composite new Composite parent SWT NONE layout new Grid Layout layout margin Width 0 layout margin Height 0 composite set Layout layout composite set Layout Data new Grid Data f Insert Variable Button new Button composite SWT NONE f Insert Variable Button set Layout Data get Button Grid Data f Insert Variable Button f Insert Variable Button set Text Text Editor Template Messages get String Edit Template Dialog insert variable NON NLS 1 f Insert Variable Button add Selection Listener new Selection Listener public void widget Selected Selection Event e f Pattern Editor get Text Widget set Focus f Pattern Editor do Operation I Source Viewer CONTENTASSIST PROPOSALS public void widget Default Selected Selection Event e f Description Text set Text f Template get Description if f Is Name Modifiable f Name Text set Text f Template get Name f Name Text add Modify Listener listener f Context Combo select get Index f Template get Context Type Id else f Pattern Editor get Control set Focus initialize Actions apply Dialog Font parent return composite  createDialogArea GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_BOTH ModifyListener ModifyListener modifyText ModifyEvent doTextWidgetChanged fIsNameModifiable createLabel TextEditorTemplateMessages getString EditTemplateDialog setLayoutData GridData GridData FILL_HORIZONTAL GridLayout numColumns marginWidth marginHeight setLayout fNameText createText fNameText addModifyListener fNameText addFocusListener FocusListener focusGained FocusEvent focusLost FocusEvent fSuppressError fSuppressError updateButtons createLabel TextEditorTemplateMessages getString EditTemplateDialog fContextCombo READ_ONLY fContextTypes fContextCombo fContextTypes fContextCombo addModifyListener createLabel TextEditorTemplateMessages getString EditTemplateDialog descFlags fIsNameModifiable READ_ONLY fDescriptionText descFlags fDescriptionText setLayoutData GridData GridData FILL_HORIZONTAL fDescriptionText addModifyListener patternLabel createLabel TextEditorTemplateMessages getString EditTemplateDialog patternLabel setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING fPatternEditor createEditor setLayoutData GridData GridLayout marginWidth marginHeight setLayout setLayoutData GridData fInsertVariableButton fInsertVariableButton setLayoutData getButtonGridData fInsertVariableButton fInsertVariableButton setText TextEditorTemplateMessages getString EditTemplateDialog fInsertVariableButton addSelectionListener SelectionListener widgetSelected SelectionEvent fPatternEditor getTextWidget setFocus fPatternEditor doOperation ISourceViewer CONTENTASSIST_PROPOSALS widgetDefaultSelected SelectionEvent fDescriptionText setText fTemplate getDescription fIsNameModifiable fNameText setText fTemplate getName fNameText addModifyListener fContextCombo getIndex fTemplate getContextTypeId fPatternEditor getControl setFocus initializeActions applyDialogFont
private void do Text Widget Changed Widget w if w f Name Text f Suppress Error false String name f Name Text get Text f Template set Name name update Buttons else if w f Context Combo String name f Context Combo get Text String context Id get Context Id name f Template set Context Type Id context Id f Template Processor set Context Type f Context Type Registry get Context Type context Id else if w f Description Text String desc f Description Text get Text f Template set Description desc  doTextWidgetChanged fNameText fSuppressError fNameText getText fTemplate setName updateButtons fContextCombo fContextCombo getText contextId getContextId fTemplate setContextTypeId contextId fTemplateProcessor setContextType fContextTypeRegistry getContextType contextId fDescriptionText fDescriptionText getText fTemplate setDescription
private String get Context Id String name if name null return name for int i 0 i f Context Types length i if name equals f Context Types i 1 return f Context Types i 0 return name  getContextId fContextTypes fContextTypes fContextTypes
private void do Source Changed I Document document String text document get f Template set Pattern text f Validation Status setOK Template Context Type context Type f Context Type Registry get Context Type f Template get Context Type Id if context Type null try context Type validate text catch Template Exception e f Validation Status set Error e get Localized Message update Undo Action update Buttons  doSourceChanged IDocument fTemplate setPattern fValidationStatus TemplateContextType contextType fContextTypeRegistry getContextType fTemplate getContextTypeId contextType contextType TemplateException fValidationStatus setError getLocalizedMessage updateUndoAction updateButtons
private static Grid Data get Button Grid Data Button button Grid Data data new Grid Data Grid Data FILL HORIZONTAL TODO get some button hints data height Hint SWT Util get Button Height Hint button return data  GridData getButtonGridData GridData GridData GridData FILL_HORIZONTAL heightHint SWTUtil getButtonHeightHint
private static Label create Label Composite parent String name Label label new Label parent SWT NULL label set Text name label set Layout Data new Grid Data return label  createLabel setText setLayoutData GridData
private static Text create Text Composite parent Text text new Text parent SWT BORDER text set Layout Data new Grid Data Grid Data FILL HORIZONTAL return text  createText setLayoutData GridData GridData FILL_HORIZONTAL
viewer add Text Listener new I Text Listener public void text Changed Text Event event if event get Document Event null do Source Changed event get Document Event get Document  addTextListener ITextListener textChanged TextEvent getDocumentEvent doSourceChanged getDocumentEvent getDocument
viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Selection Dependent Actions  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateSelectionDependentActions
viewer prepend Verify Key Listener new Verify Key Listener public void verify Key Verify Event event handle Verify Key Pressed event  prependVerifyKeyListener VerifyKeyListener verifyKey VerifyEvent handleVerifyKeyPressed
private Source Viewer create Editor Composite parent Source Viewer viewer create Viewer parent I Document document new Document f Template get Pattern viewer set Editable true viewer set Document document int n Lines document get Number Of Lines if n Lines 5 n Lines 5 else if n Lines 12 n Lines 12 Control control viewer get Control Grid Data data new Grid Data Grid Data FILL BOTH data width Hint convert Width In Chars To Pixels 80 data height Hint convert Height In Chars To Pixels n Lines control set Layout Data data viewer add Text Listener new I Text Listener public void text Changed Text Event event if event get Document Event null do Source Changed event get Document Event get Document viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event update Selection Dependent Actions viewer prepend Verify Key Listener new Verify Key Listener public void verify Key Verify Event event handle Verify Key Pressed event return viewer  SourceViewer createEditor SourceViewer createViewer IDocument fTemplate getPattern setEditable setDocument nLines getNumberOfLines nLines nLines nLines nLines getControl GridData GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels heightHint convertHeightInCharsToPixels nLines setLayoutData addTextListener ITextListener textChanged TextEvent getDocumentEvent doSourceChanged getDocumentEvent getDocument addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent updateSelectionDependentActions prependVerifyKeyListener VerifyKeyListener verifyKey VerifyEvent handleVerifyKeyPressed
Source Viewer Configuration configuration new Source Viewer Configuration public I Content Assistant get Content Assistant I Source Viewer source Viewer Content Assistant assistant new Content Assistant assistant enable Auto Activation true assistant enable Auto Insert true assistant set Content Assist Processor f Template Processor I Document DEFAULT CONTENT TYPE return assistant  SourceViewerConfiguration SourceViewerConfiguration IContentAssistant getContentAssistant ISourceViewer sourceViewer ContentAssistant ContentAssistant enableAutoActivation enableAutoInsert setContentAssistProcessor fTemplateProcessor IDocument DEFAULT_CONTENT_TYPE
Creates the viewer to be used to display the pattern Subclasses may override param parent the parent composite of the viewer return a configured code Source Viewer code protected Source Viewer create Viewer Composite parent Source Viewer viewer new Source Viewer parent null null false SWT BORDER SWT V SCROLL SWT H SCROLL Source Viewer Configuration configuration new Source Viewer Configuration public I Content Assistant get Content Assistant I Source Viewer source Viewer Content Assistant assistant new Content Assistant assistant enable Auto Activation true assistant enable Auto Insert true assistant set Content Assist Processor f Template Processor I Document DEFAULT CONTENT TYPE return assistant viewer configure configuration return viewer  SourceViewer SourceViewer createViewer SourceViewer SourceViewer V_SCROLL H_SCROLL SourceViewerConfiguration SourceViewerConfiguration IContentAssistant getContentAssistant ISourceViewer sourceViewer ContentAssistant ContentAssistant enableAutoActivation enableAutoInsert setContentAssistProcessor fTemplateProcessor IDocument DEFAULT_CONTENT_TYPE
private void handle Verify Key Pressed Verify Event event if event doit return if event state Mask SWT MOD1 return switch event character case f Pattern Editor do Operation I Source Viewer CONTENTASSIST PROPOSALS event doit false break CTRL Z case z a 1 f Pattern Editor do Operation I Text Operation Target UNDO event doit false break  handleVerifyKeyPressed VerifyEvent stateMask fPatternEditor doOperation ISourceViewer CONTENTASSIST_PROPOSALS fPatternEditor doOperation ITextOperationTarget
manager set Remove All When Shown true manager add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr fill Context Menu mgr  setRemoveAllWhenShown addMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu
private void initialize Actions Text Viewer Action action new Text Viewer Action f Pattern Editor I Text Operation Target UNDO action set Text Text Editor Template Messages get String Edit Template Dialog undo NON NLS 1 f Global Actions put I Text Editor Action Constants UNDO action action new Text Viewer Action f Pattern Editor I Text Operation Target CUT action set Text Text Editor Template Messages get String Edit Template Dialog cut NON NLS 1 f Global Actions put I Text Editor Action Constants CUT action action new Text Viewer Action f Pattern Editor I Text Operation Target COPY action set Text Text Editor Template Messages get String Edit Template Dialog copy NON NLS 1 f Global Actions put I Text Editor Action Constants COPY action action new Text Viewer Action f Pattern Editor I Text Operation Target PASTE action set Text Text Editor Template Messages get String Edit Template Dialog paste NON NLS 1 f Global Actions put I Text Editor Action Constants PASTE action action new Text Viewer Action f Pattern Editor I Text Operation Target SELECT ALL action set Text Text Editor Template Messages get String Edit Template Dialog select all NON NLS 1 f Global Actions put I Text Editor Action Constants SELECT ALL action action new Text Viewer Action f Pattern Editor I Source Viewer CONTENTASSIST PROPOSALS action set Text Text Editor Template Messages get String Edit Template Dialog content assist NON NLS 1 f Global Actions put Content Assist Proposal action NON NLS 1 f Selection Actions add I Text Editor Action Constants CUT f Selection Actions add I Text Editor Action Constants COPY f Selection Actions add I Text Editor Action Constants PASTE create context menu Menu Manager manager new Menu Manager null null manager set Remove All When Shown true manager add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr fill Context Menu mgr Styled Text text f Pattern Editor get Text Widget Menu menu manager create Context Menu text text set Menu menu  initializeActions TextViewerAction TextViewerAction fPatternEditor ITextOperationTarget setText TextEditorTemplateMessages getString EditTemplateDialog fGlobalActions ITextEditorActionConstants TextViewerAction fPatternEditor ITextOperationTarget setText TextEditorTemplateMessages getString EditTemplateDialog fGlobalActions ITextEditorActionConstants TextViewerAction fPatternEditor ITextOperationTarget setText TextEditorTemplateMessages getString EditTemplateDialog fGlobalActions ITextEditorActionConstants TextViewerAction fPatternEditor ITextOperationTarget setText TextEditorTemplateMessages getString EditTemplateDialog fGlobalActions ITextEditorActionConstants TextViewerAction fPatternEditor ITextOperationTarget SELECT_ALL setText TextEditorTemplateMessages getString EditTemplateDialog fGlobalActions ITextEditorActionConstants SELECT_ALL TextViewerAction fPatternEditor ISourceViewer CONTENTASSIST_PROPOSALS setText TextEditorTemplateMessages getString EditTemplateDialog fGlobalActions ContentAssistProposal fSelectionActions ITextEditorActionConstants fSelectionActions ITextEditorActionConstants fSelectionActions ITextEditorActionConstants MenuManager MenuManager setRemoveAllWhenShown addMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu StyledText fPatternEditor getTextWidget createContextMenu setMenu
private void fill Context Menu I Menu Manager menu menu add new Group Marker I Text Editor Action Constants GROUP UNDO menu append To Group I Text Editor Action Constants GROUP UNDO I Action f Global Actions get I Text Editor Action Constants UNDO menu add new Separator I Text Editor Action Constants GROUP EDIT menu append To Group I Text Editor Action Constants GROUP EDIT I Action f Global Actions get I Text Editor Action Constants CUT menu append To Group I Text Editor Action Constants GROUP EDIT I Action f Global Actions get I Text Editor Action Constants COPY menu append To Group I Text Editor Action Constants GROUP EDIT I Action f Global Actions get I Text Editor Action Constants PASTE menu append To Group I Text Editor Action Constants GROUP EDIT I Action f Global Actions get I Text Editor Action Constants SELECT ALL menu add new Separator templates NON NLS 1 menu append To Group templates I Action f Global Actions get Content Assist Proposal NON NLS 1 NON NLS 2  fillContextMenu IMenuManager GroupMarker ITextEditorActionConstants GROUP_UNDO appendToGroup ITextEditorActionConstants GROUP_UNDO IAction fGlobalActions ITextEditorActionConstants ITextEditorActionConstants GROUP_EDIT appendToGroup ITextEditorActionConstants GROUP_EDIT IAction fGlobalActions ITextEditorActionConstants appendToGroup ITextEditorActionConstants GROUP_EDIT IAction fGlobalActions ITextEditorActionConstants appendToGroup ITextEditorActionConstants GROUP_EDIT IAction fGlobalActions ITextEditorActionConstants appendToGroup ITextEditorActionConstants GROUP_EDIT IAction fGlobalActions ITextEditorActionConstants SELECT_ALL appendToGroup IAction fGlobalActions ContentAssistProposal
private void update Selection Dependent Actions Iterator iterator f Selection Actions iterator while iterator has Next update Action String iterator next  updateSelectionDependentActions fSelectionActions hasNext updateAction
private void update Undo Action I Action action I Action f Global Actions get I Text Editor Action Constants UNDO if action instanceof I Update I Update action update  updateUndoAction IAction IAction fGlobalActions ITextEditorActionConstants IUpdate IUpdate
private void update Action String action Id I Action action I Action f Global Actions get action Id if action instanceof I Update I Update action update  updateAction actionId IAction IAction fGlobalActions actionId IUpdate IUpdate
private int get Index String contextid if contextid null return 1 for int i 0 i f Context Types length i if contextid equals f Context Types i 0 return i return 1  getIndex fContextTypes fContextTypes
private void update Buttons Status Info status boolean valid f Name Text null f Name Text get Text trim length 0 if valid status new Status Info if f Suppress Error status set Error Text Editor Template Messages get String Edit Template Dialog error noname NON NLS 1 else status f Validation Status update Status status  updateButtons StatusInfo fNameText fNameText getText StatusInfo fSuppressError setError TextEditorTemplateMessages getString EditTemplateDialog fValidationStatus updateStatus

Creates a new message line as a child of the given parent param parent the parent composite public Message Line Composite parent this parent SWT LEFT  MessageLine
Creates a new message line as a child of the parent and with the given SWT stylebits param parent the parent composite param style the style public Message Line Composite parent int style super parent style f Normal Msg Area Background get Background  MessageLine fNormalMsgAreaBackground getBackground
private Image find Image I Status status if status isOK return null return null  findImage IStatus
Sets the message and image to the given status code null code is a valid argument and will set the empty text and no image param status the status public void set Error Status I Status status if status null status isOK String message status get Message if message null message length 0 set Text message set Image find Image status set Background J Face Colors get Error Background get Display return set Text NON NLS 1 set Image null set Background f Normal Msg Area Background  setErrorStatus IStatus getMessage setText setImage findImage setBackground JFaceColors getErrorBackground getDisplay setText setImage setBackground fNormalMsgAreaBackground

Creates an instane of a status dialog param parent the parent shell public Status Dialog Shell parent super parent f Last Status new Status Info  StatusDialog fLastStatus StatusInfo
Specifies whether status line appears to the left of the buttons default or above them param above Buttons if code true code status line is placed above buttons if code false code to the right public void set Status Line Above Buttons boolean above Buttons f Status Line Above Buttons above Buttons  aboveButtons setStatusLineAboveButtons aboveButtons fStatusLineAboveButtons aboveButtons
Update the dialog s status line to reflect the given status It is save to call this method before the dialog has been opened param status the status protected void update Status I Status status f Last Status status if f Status Line null f Status Line is Disposed update Buttons Enable State status f Status Line set Error Status status  updateStatus IStatus fLastStatus fStatusLine fStatusLine isDisposed updateButtonsEnableState fStatusLine setErrorStatus
Returns the last status return the last status public I Status get Status return f Last Status  IStatus getStatus fLastStatus
Updates the status of the ok button to reflect the given status Subclasses may override this method to update additional buttons param status the status protected void update Buttons Enable State I Status status if f Ok Button null f Ok Button is Disposed f Ok Button set Enabled status matches I Status ERROR  updateButtonsEnableState IStatus fOkButton fOkButton isDisposed fOkButton setEnabled IStatus
protected void configure Shell Shell shell super configure Shell shell if f Title null shell set Text f Title  configureShell configureShell fTitle setText fTitle
public void create super create if f Last Status null policy dialogs are not allowed to come up with an error message if f Last Status matches I Status ERROR Status Info status new Status Info status set Error NON NLS 1 f Last Status status update Status f Last Status  fLastStatus fLastStatus IStatus StatusInfo StatusInfo setError fLastStatus updateStatus fLastStatus
see Dialog create Buttons For Button Bar Composite protected void create Buttons For Button Bar Composite parent f Ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButtonsForButtonBar fOkButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
protected Control create Button Bar Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout if f Status Line Above Buttons layout num Columns 1 else layout num Columns 2 layout margin Height 0 layout margin Width convert HorizontalDL Us To Pixels I Dialog Constants HORIZONTAL MARGIN composite set Layout layout composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Status Line new Message Line composite f Status Line set Alignment SWT LEFT f Status Line set Layout Data new Grid Data Grid Data FILL HORIZONTAL f Status Line set Error Status null apply Dialog Font composite super create Button Bar composite return composite  createButtonBar GridLayout GridLayout fStatusLineAboveButtons numColumns numColumns marginHeight marginWidth convertHorizontalDLUsToPixels IDialogConstants HORIZONTAL_MARGIN setLayout setLayoutData GridData GridData FILL_HORIZONTAL fStatusLine MessageLine fStatusLine setAlignment fStatusLine setLayoutData GridData GridData FILL_HORIZONTAL fStatusLine setErrorStatus applyDialogFont createButtonBar
Sets the title for this dialog param title the title public void set Title String title f Title title null title NON NLS 1 Shell shell get Shell if shell null shell is Disposed shell set Text f Title  setTitle fTitle getShell isDisposed setText fTitle
Sets the image for this dialog param image the image public void set Image Image image f Image image Shell shell get Shell if shell null shell is Disposed shell set Image f Image  setImage fImage getShell isDisposed setImage fImage

Creates a status set to OK no message public Status Info this OK null  StatusInfo
Creates a status param severity The status severity ERROR WARNING INFO and OK param message The message of the status Applies only for ERROR WARNING and INFO public Status Info int severity String message f Status Message message f Severity severity  StatusInfo fStatusMessage fSeverity
Returns if the status severity is OK return code true code if the status severity is OK public boolean isOK return f Severity I Status OK  fSeverity IStatus
Returns if the status severity is WARNING return code true code if the status severity is WARNING public boolean is Warning return f Severity I Status WARNING  isWarning fSeverity IStatus
Returns if the status severity is INFO return code true code if the status severity is INFO public boolean is Info return f Severity I Status INFO  isInfo fSeverity IStatus
Returns if the status severity is ERROR return code true code if the status severity is ERROR public boolean is Error return f Severity I Status ERROR  isError fSeverity IStatus
Returns the message return the message see I Status get Message public String get Message return f Status Message  IStatus getMessage getMessage fStatusMessage
Sets the status to ERROR param error Message the error message can be empty but not null public void set Error String error Message Assert is Not Null error Message f Status Message error Message f Severity I Status ERROR  errorMessage setError errorMessage isNotNull errorMessage fStatusMessage errorMessage fSeverity IStatus
Sets the status to WARNING param warning Message the warning message can be empty but not null public void set Warning String warning Message Assert is Not Null warning Message f Status Message warning Message f Severity I Status WARNING  warningMessage setWarning warningMessage isNotNull warningMessage fStatusMessage warningMessage fSeverity IStatus
Sets the status to INFO param info Message the info message can be empty but not null public void set Info String info Message Assert is Not Null info Message f Status Message info Message f Severity I Status INFO  infoMessage setInfo infoMessage isNotNull infoMessage fStatusMessage infoMessage fSeverity IStatus
Sets the status to OK public void setOK f Status Message null f Severity I Status OK  fStatusMessage fSeverity IStatus
see I Status matches int public boolean matches int severity Mask return f Severity severity Mask 0  IStatus severityMask fSeverity severityMask
Returns always code false code see I Status is Multi Status public boolean is Multi Status return false  IStatus isMultiStatus isMultiStatus
see I Status get Severity public int get Severity return f Severity  IStatus getSeverity getSeverity fSeverity
see I Status get Plugin public String get Plugin return NON NLS 1  IStatus getPlugin getPlugin
Returns always code null code see I Status get Exception public Throwable get Exception return null  IStatus getException getException
Returns always the error severity see I Status get Code public int get Code return f Severity  IStatus getCode getCode fSeverity
Returns always code null code see I Status get Children public I Status get Children return new I Status 0  IStatus getChildren IStatus getChildren IStatus

see I Structured Content Provider get Elements Object public Object get Elements Object input return f Store get Template Data false  IStructuredContentProvider getElements getElements fStore getTemplateData
see I Content Provider input Changed Viewer Object Object public void input Changed Viewer viewer Object old Input Object new Input f Store Template Store new Input  IContentProvider inputChanged inputChanged oldInput newInput fStore TemplateStore newInput
see I Content Provider dispose public void dispose f Store null  IContentProvider fStore

see org eclipse jface viewers I Table Label Provider get Column Image java lang Object int public Image get Column Image Object element int column Index return null  ITableLabelProvider getColumnImage getColumnImage columnIndex
public String get Column Text Object element int column Index Template Persistence Data data Template Persistence Data element Template template data get Template switch column Index case 0 return template get Name case 1 Template Context Type type f Context Type Registry get Context Type template get Context Type Id if type null return type get Name else return template get Context Type Id case 2 return template get Description default return NON NLS 1  getColumnText columnIndex TemplatePersistenceData TemplatePersistenceData getTemplate columnIndex getName TemplateContextType fContextTypeRegistry getContextType getContextTypeId getName getContextTypeId getDescription
Creates a new template preference page protected Template Preference Page super set Description Text Editor Template Messages get String Template Preference Page message NON NLS 1  TemplatePreferencePage setDescription TextEditorTemplateMessages getString TemplatePreferencePage
Returns the template store return the template store public Template Store get Template Store return f Template Store  TemplateStore getTemplateStore fTemplateStore
Returns the context type registry return the context type registry public Context Type Registry get Context Type Registry return f Context Type Registry  ContextTypeRegistry getContextTypeRegistry fContextTypeRegistry
Sets the template store param store the new template store public void set Template Store Template Store store f Template Store store  setTemplateStore TemplateStore fTemplateStore
Sets the context type registry param registry the new context type registry public void set Context Type Registry Context Type Registry registry f Context Type Registry registry  setContextTypeRegistry ContextTypeRegistry fContextTypeRegistry
see org eclipse ui I Workbench Preference Page init org eclipse ui I Workbench public void init I Workbench workbench  IWorkbenchPreferencePage IWorkbench IWorkbench
f Table Viewer set Sorter new Viewer Sorter public int compare Viewer viewer Object object1 Object object2 if object1 instanceof Template Persistence Data object2 instanceof Template Persistence Data Template left Template Persistence Data object1 get Template Template right Template Persistence Data object2 get Template int result left get Name compare To Ignore Case right get Name if result 0 return result return left get Description compare To Ignore Case right get Description return super compare viewer object1 object2  fTableViewer setSorter ViewerSorter TemplatePersistenceData TemplatePersistenceData TemplatePersistenceData getTemplate TemplatePersistenceData getTemplate getName compareToIgnoreCase getName getDescription compareToIgnoreCase getDescription
public boolean is Sorter Property Object element String property return true  isSorterProperty
f Table Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event e edit  fTableViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent
f Table Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e selection Changed1  fTableViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent selectionChanged1
f Table Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Template Persistence Data d Template Persistence Data event get Element d set Enabled event get Checked  fTableViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent TemplatePersistenceData TemplatePersistenceData getElement setEnabled getChecked
f Add Button set Layout Data get Button Grid Data f Add Button f Add Button add Listener SWT Selection new Listener public void handle Event Event e add  fAddButton setLayoutData getButtonGridData fAddButton fAddButton addListener handleEvent
f Edit Button set Layout Data get Button Grid Data f Edit Button f Edit Button add Listener SWT Selection new Listener public void handle Event Event e edit  fEditButton setLayoutData getButtonGridData fEditButton fEditButton addListener handleEvent
f Remove Button set Layout Data get Button Grid Data f Remove Button f Remove Button add Listener SWT Selection new Listener public void handle Event Event e remove  fRemoveButton setLayoutData getButtonGridData fRemoveButton fRemoveButton addListener handleEvent
f Restore Button set Layout Data get Button Grid Data f Restore Button f Restore Button add Listener SWT Selection new Listener public void handle Event Event e restore Deleted  fRestoreButton setLayoutData getButtonGridData fRestoreButton fRestoreButton addListener handleEvent restoreDeleted
f Revert Button set Layout Data get Button Grid Data f Revert Button f Revert Button add Listener SWT Selection new Listener public void handle Event Event e revert  fRevertButton setLayoutData getButtonGridData fRevertButton fRevertButton addListener handleEvent
f Import Button set Layout Data get Button Grid Data f Import Button f Import Button add Listener SWT Selection new Listener public void handle Event Event e import   fImportButton setLayoutData getButtonGridData fImportButton fImportButton addListener handleEvent import_
f Export Button set Layout Data get Button Grid Data f Export Button f Export Button add Listener SWT Selection new Listener public void handle Event Event e export  fExportButton setLayoutData getButtonGridData fExportButton fExportButton addListener handleEvent
protected Control create Contents Composite ancestor Composite parent new Composite ancestor SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout margin Height 0 layout margin Width 0 parent set Layout layout Composite inner Parent new Composite parent SWT NONE Grid Layout inner Layout new Grid Layout inner Layout num Columns 2 inner Layout margin Height 0 inner Layout margin Width 0 inner Parent set Layout inner Layout Grid Data gd new Grid Data Grid Data FILL BOTH gd horizontal Span 2 inner Parent set Layout Data gd Table table new Table inner Parent SWT CHECK SWT BORDER SWT MULTI SWT FULL SELECTION Grid Data data new Grid Data Grid Data FILL BOTH data width Hint convert Width In Chars To Pixels 3 data height Hint convert Height In Chars To Pixels 10 table set Layout Data data table set Header Visible true table set Lines Visible true Table Layout table Layout new Table Layout table set Layout table Layout Table Column column1 new Table Column table SWT NONE column1 set Text Text Editor Template Messages get String Template Preference Page column name NON NLS 1 Table Column column2 new Table Column table SWT NONE column2 set Text Text Editor Template Messages get String Template Preference Page column context NON NLS 1 Table Column column3 new Table Column table SWT NONE column3 set Text Text Editor Template Messages get String Template Preference Page column description NON NLS 1 f Table Viewer new Checkbox Table Viewer table f Table Viewer set Label Provider new Template Label Provider f Table Viewer set Content Provider new Template Content Provider f Table Viewer set Sorter new Viewer Sorter public int compare Viewer viewer Object object1 Object object2 if object1 instanceof Template Persistence Data object2 instanceof Template Persistence Data Template left Template Persistence Data object1 get Template Template right Template Persistence Data object2 get Template int result left get Name compare To Ignore Case right get Name if result 0 return result return left get Description compare To Ignore Case right get Description return super compare viewer object1 object2 public boolean is Sorter Property Object element String property return true f Table Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event e edit f Table Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e selection Changed1 f Table Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Template Persistence Data d Template Persistence Data event get Element d set Enabled event get Checked Composite buttons new Composite inner Parent SWT NONE buttons set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING layout new Grid Layout layout margin Height 0 layout margin Width 0 buttons set Layout layout f Add Button new Button buttons SWT PUSH f Add Button set Text Text Editor Template Messages get String Template Preference Page new NON NLS 1 f Add Button set Layout Data get Button Grid Data f Add Button f Add Button add Listener SWT Selection new Listener public void handle Event Event e add f Edit Button new Button buttons SWT PUSH f Edit Button set Text Text Editor Template Messages get String Template Preference Page edit NON NLS 1 f Edit Button set Layout Data get Button Grid Data f Edit Button f Edit Button add Listener SWT Selection new Listener public void handle Event Event e edit f Remove Button new Button buttons SWT PUSH f Remove Button set Text Text Editor Template Messages get String Template Preference Page remove NON NLS 1 f Remove Button set Layout Data get Button Grid Data f Remove Button f Remove Button add Listener SWT Selection new Listener public void handle Event Event e remove create Separator buttons f Restore Button new Button buttons SWT PUSH f Restore Button set Text Text Editor Template Messages get String Template Preference Page restore NON NLS 1 f Restore Button set Layout Data get Button Grid Data f Restore Button f Restore Button add Listener SWT Selection new Listener public void handle Event Event e restore Deleted f Revert Button new Button buttons SWT PUSH f Revert Button set Text Text Editor Template Messages get String Template Preference Page revert NON NLS 1 f Revert Button set Layout Data get Button Grid Data f Revert Button f Revert Button add Listener SWT Selection new Listener public void handle Event Event e revert create Separator buttons f Import Button new Button buttons SWT PUSH f Import Button set Text Text Editor Template Messages get String Template Preference Page import NON NLS 1 f Import Button set Layout Data get Button Grid Data f Import Button f Import Button add Listener SWT Selection new Listener public void handle Event Event e import  f Export Button new Button buttons SWT PUSH f Export Button set Text Text Editor Template Messages get String Template Preference Page export NON NLS 1 f Export Button set Layout Data get Button Grid Data f Export Button f Export Button add Listener SWT Selection new Listener public void handle Event Event e export f Pattern Viewer do Create Viewer parent if is Show Formatter Setting f Format Button new Button parent SWT CHECK f Format Button set Text Text Editor Template Messages get String Template Preference Page use code formatter NON NLS 1 Grid Data gd1 new Grid Data gd1 horizontal Span 2 f Format Button set Layout Data gd1 f Format Button set Selection get Preference Store get Boolean get Formatter Preference Key f Table Viewer set Input f Template Store f Table Viewer set All Checked false f Table Viewer set Checked Elements get Enabled Templates update Buttons configure Table Resizing inner Parent buttons table column1 column2 column3 Dialog apply Dialog Font parent return parent  createContents GridLayout GridLayout numColumns marginHeight marginWidth setLayout innerParent GridLayout innerLayout GridLayout innerLayout numColumns innerLayout marginHeight innerLayout marginWidth innerParent setLayout innerLayout GridData GridData GridData FILL_BOTH horizontalSpan innerParent setLayoutData innerParent FULL_SELECTION GridData GridData GridData FILL_BOTH widthHint convertWidthInCharsToPixels heightHint convertHeightInCharsToPixels setLayoutData setHeaderVisible setLinesVisible TableLayout tableLayout TableLayout setLayout tableLayout TableColumn TableColumn setText TextEditorTemplateMessages getString TemplatePreferencePage TableColumn TableColumn setText TextEditorTemplateMessages getString TemplatePreferencePage TableColumn TableColumn setText TextEditorTemplateMessages getString TemplatePreferencePage fTableViewer CheckboxTableViewer fTableViewer setLabelProvider TemplateLabelProvider fTableViewer setContentProvider TemplateContentProvider fTableViewer setSorter ViewerSorter TemplatePersistenceData TemplatePersistenceData TemplatePersistenceData getTemplate TemplatePersistenceData getTemplate getName compareToIgnoreCase getName getDescription compareToIgnoreCase getDescription isSorterProperty fTableViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent fTableViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent selectionChanged1 fTableViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent TemplatePersistenceData TemplatePersistenceData getElement setEnabled getChecked innerParent setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING GridLayout marginHeight marginWidth setLayout fAddButton fAddButton setText TextEditorTemplateMessages getString TemplatePreferencePage fAddButton setLayoutData getButtonGridData fAddButton fAddButton addListener handleEvent fEditButton fEditButton setText TextEditorTemplateMessages getString TemplatePreferencePage fEditButton setLayoutData getButtonGridData fEditButton fEditButton addListener handleEvent fRemoveButton fRemoveButton setText TextEditorTemplateMessages getString TemplatePreferencePage fRemoveButton setLayoutData getButtonGridData fRemoveButton fRemoveButton addListener handleEvent createSeparator fRestoreButton fRestoreButton setText TextEditorTemplateMessages getString TemplatePreferencePage fRestoreButton setLayoutData getButtonGridData fRestoreButton fRestoreButton addListener handleEvent restoreDeleted fRevertButton fRevertButton setText TextEditorTemplateMessages getString TemplatePreferencePage fRevertButton setLayoutData getButtonGridData fRevertButton fRevertButton addListener handleEvent createSeparator fImportButton fImportButton setText TextEditorTemplateMessages getString TemplatePreferencePage fImportButton setLayoutData getButtonGridData fImportButton fImportButton addListener handleEvent import_ fExportButton fExportButton setText TextEditorTemplateMessages getString TemplatePreferencePage fExportButton setLayoutData getButtonGridData fExportButton fExportButton addListener handleEvent fPatternViewer doCreateViewer isShowFormatterSetting fFormatButton fFormatButton setText TextEditorTemplateMessages getString TemplatePreferencePage GridData GridData horizontalSpan fFormatButton setLayoutData fFormatButton setSelection getPreferenceStore getBoolean getFormatterPreferenceKey fTableViewer setInput fTemplateStore fTableViewer setAllChecked fTableViewer setCheckedElements getEnabledTemplates updateButtons configureTableResizing innerParent applyDialogFont
Creates a separator between buttons param parent return private Label create Separator Composite parent Label separator new Label parent SWT NONE separator set Visible false Grid Data gd new Grid Data gd horizontal Alignment Grid Data FILL gd vertical Alignment Grid Data BEGINNING gd height Hint 4 separator set Layout Data gd return separator  createSeparator setVisible GridData GridData horizontalAlignment GridData verticalAlignment GridData heightHint setLayoutData
Returns whether the formatter preference checkbox should be shown return code true code if the formatter preference checkbox should be shown code false code otherwise protected boolean is Show Formatter Setting return true  isShowFormatterSetting
parent add Control Listener new Control Adapter public void control Resized Control Event e Rectangle area parent get Client Area Point preferred Size table compute Size SWT DEFAULT SWT DEFAULT int width area width 2 table get Border Width if preferred Size y area height Subtract the scrollbar width from the total column width if a vertical scrollbar will be required Point v Bar Size table get Vertical Bar get Size width v Bar Size x width buttons get Size x Point old Size table get Size if old Size x width table is getting smaller so make the columns smaller first and then resize the table to match the client area width column1 set Width width 4 column2 set Width width 4 column3 set Width width column1 get Width column2 get Width table set Size width area height else table is getting bigger so make the table bigger first and then make the columns wider to match the client area width table set Size width area height column1 set Width width 4 column2 set Width width 4 column3 set Width width column1 get Width column2 get Width  addControlListener ControlAdapter controlResized ControlEvent getClientArea preferredSize computeSize getBorderWidth preferredSize vBarSize getVerticalBar getSize vBarSize getSize oldSize getSize oldSize setWidth setWidth setWidth getWidth getWidth setSize setSize setWidth setWidth setWidth getWidth getWidth
Correctly resizes the table so no phantom columns appear private static void configure Table Resizing final Composite parent final Composite buttons final Table table final Table Column column1 final Table Column column2 final Table Column column3 parent add Control Listener new Control Adapter public void control Resized Control Event e Rectangle area parent get Client Area Point preferred Size table compute Size SWT DEFAULT SWT DEFAULT int width area width 2 table get Border Width if preferred Size y area height Subtract the scrollbar width from the total column width if a vertical scrollbar will be required Point v Bar Size table get Vertical Bar get Size width v Bar Size x width buttons get Size x Point old Size table get Size if old Size x width table is getting smaller so make the columns smaller first and then resize the table to match the client area width column1 set Width width 4 column2 set Width width 4 column3 set Width width column1 get Width column2 get Width table set Size width area height else table is getting bigger so make the table bigger first and then make the columns wider to match the client area width table set Size width area height column1 set Width width 4 column2 set Width width 4 column3 set Width width column1 get Width column2 get Width  configureTableResizing TableColumn TableColumn TableColumn addControlListener ControlAdapter controlResized ControlEvent getClientArea preferredSize computeSize getBorderWidth preferredSize vBarSize getVerticalBar getSize vBarSize getSize oldSize getSize oldSize setWidth setWidth setWidth getWidth getWidth setSize setSize setWidth setWidth setWidth getWidth getWidth
private Template Persistence Data get Enabled Templates List enabled new Array List Template Persistence Data datas f Template Store get Template Data false for int i 0 i datas length i if datas i is Enabled enabled add datas i return Template Persistence Data enabled to Array new Template Persistence Data enabled size  TemplatePersistenceData getEnabledTemplates ArrayList TemplatePersistenceData fTemplateStore getTemplateData isEnabled TemplatePersistenceData toArray TemplatePersistenceData
private Source Viewer do Create Viewer Composite parent Label label new Label parent SWT NONE label set Text Text Editor Template Messages get String Template Preference Page preview NON NLS 1 Grid Data data new Grid Data data horizontal Span 2 label set Layout Data data Source Viewer viewer create Viewer parent viewer set Editable false Control control viewer get Control data new Grid Data Grid Data FILL BOTH data horizontal Span 2 data height Hint convert Height In Chars To Pixels 5 control set Layout Data data return viewer  SourceViewer doCreateViewer setText TextEditorTemplateMessages getString TemplatePreferencePage GridData GridData horizontalSpan setLayoutData SourceViewer createViewer setEditable getControl GridData GridData FILL_BOTH horizontalSpan heightHint convertHeightInCharsToPixels setLayoutData
Creates configures and returns a source viewer to present the template pattern on the preference page Clients may override to provide a custom source viewer featuring e g syntax coloring param parent the parent control return a configured source viewer protected Source Viewer create Viewer Composite parent Source Viewer viewer new Source Viewer parent null null false SWT BORDER SWT V SCROLL SWT H SCROLL Source Viewer Configuration configuration new Source Viewer Configuration viewer configure configuration I Document document new Document viewer set Document document return viewer  SourceViewer createViewer SourceViewer SourceViewer V_SCROLL H_SCROLL SourceViewerConfiguration SourceViewerConfiguration IDocument setDocument
private static Grid Data get Button Grid Data Button button Grid Data data new Grid Data Grid Data FILL HORIZONTAL TODO replace SWT Util data width Hint SWT Util get Button Width Hint button data height Hint SWT Util get Button Height Hint button return data  GridData getButtonGridData GridData GridData GridData FILL_HORIZONTAL SWTUtil widthHint SWTUtil getButtonWidthHint heightHint SWTUtil getButtonHeightHint
private void selection Changed1 update Viewer Input update Buttons  selectionChanged1 updateViewerInput updateButtons
Updates the pattern viewer protected void update Viewer Input I Structured Selection selection I Structured Selection f Table Viewer get Selection if selection size 1 Template Persistence Data data Template Persistence Data selection get First Element Template template data get Template f Pattern Viewer get Document set template get Pattern else f Pattern Viewer get Document set NON NLS 1  updateViewerInput IStructuredSelection IStructuredSelection fTableViewer getSelection TemplatePersistenceData TemplatePersistenceData getFirstElement getTemplate fPatternViewer getDocument getPattern fPatternViewer getDocument
Updates the buttons protected void update Buttons I Structured Selection selection I Structured Selection f Table Viewer get Selection int selection Count selection size int item Count f Table Viewer get Table get Item Count boolean can Restore f Template Store get Template Data true length f Template Store get Template Data false length boolean can Revert false for Iterator it selection iterator it has Next Template Persistence Data data Template Persistence Data it next if data is Modified can Revert true break f Edit Button set Enabled selection Count 1 f Export Button set Enabled selection Count 0 f Remove Button set Enabled selection Count 0 selection Count item Count f Restore Button set Enabled can Restore f Revert Button set Enabled can Revert  updateButtons IStructuredSelection IStructuredSelection fTableViewer getSelection selectionCount itemCount fTableViewer getTable getItemCount canRestore fTemplateStore getTemplateData fTemplateStore getTemplateData canRevert hasNext TemplatePersistenceData TemplatePersistenceData isModified canRevert fEditButton setEnabled selectionCount fExportButton setEnabled selectionCount fRemoveButton setEnabled selectionCount selectionCount itemCount fRestoreButton setEnabled canRestore fRevertButton setEnabled canRevert
private void add Template template new Template Iterator it f Context Type Registry context Types if it has Next template set Context Type Id Template Context Type it next get Id Dialog dialog create Template Edit Dialog template false true if dialog open Window OK Template Persistence Data data new Template Persistence Data template true f Template Store add data f Table Viewer refresh f Table Viewer set Checked data true f Table Viewer set Selection new Structured Selection data  fContextTypeRegistry contextTypes hasNext setContextTypeId TemplateContextType getId createTemplateEditDialog TemplatePersistenceData TemplatePersistenceData fTemplateStore fTableViewer fTableViewer setChecked fTableViewer setSelection StructuredSelection
Creates the edit dialog Subclasses may override this method to provide a custom dialog param template the template being edited param edit whether the dialog should be editable param is Name Modifiable whether the template name may be modified return an code Edit Template Dialog code which will be opened protected Dialog create Template Edit Dialog Template template boolean edit boolean is Name Modifiable return new Edit Template Dialog get Shell template edit is Name Modifiable f Context Type Registry  isNameModifiable EditTemplateDialog createTemplateEditDialog isNameModifiable EditTemplateDialog getShell isNameModifiable fContextTypeRegistry
private void edit I Structured Selection selection I Structured Selection f Table Viewer get Selection Object objects selection to Array if objects null objects length 1 return Template Persistence Data data Template Persistence Data selection get First Element edit data  IStructuredSelection IStructuredSelection fTableViewer getSelection toArray TemplatePersistenceData TemplatePersistenceData getFirstElement
private void edit Template Persistence Data data Template old Template data get Template Template new Template new Template old Template Dialog dialog create Template Edit Dialog new Template true true if dialog open Window OK if new Template get Name equals old Template get Name Message Dialog open Question get Shell Text Editor Template Messages get String Template Preference Page question create new title NON NLS 1 Text Editor Template Messages get String Template Preference Page question create new message NON NLS 1 data new Template Persistence Data new Template true f Template Store add data f Table Viewer refresh else data set Template new Template f Table Viewer refresh data selection Changed1 f Table Viewer set Checked data data is Enabled f Table Viewer set Selection new Structured Selection data  TemplatePersistenceData oldTemplate getTemplate newTemplate oldTemplate createTemplateEditDialog newTemplate newTemplate getName oldTemplate getName MessageDialog openQuestion getShell TextEditorTemplateMessages getString TemplatePreferencePage TextEditorTemplateMessages getString TemplatePreferencePage TemplatePersistenceData newTemplate fTemplateStore fTableViewer setTemplate newTemplate fTableViewer selectionChanged1 fTableViewer setChecked isEnabled fTableViewer setSelection StructuredSelection
private void import  File Dialog dialog new File Dialog get Shell dialog set Text Text Editor Template Messages get String Template Preference Page import title NON NLS 1 dialog set Filter Extensions new String Text Editor Template Messages get String Template Preference Page import extension NON NLS 1 String path dialog open if path null return try Template Reader Writer reader new Template Reader Writer File file new File path if file exists Input Stream input new Buffered Input Stream new File Input Stream file Template Persistence Data datas reader read input null for int i 0 i datas length i Template Persistence Data data datas i f Template Store add data f Table Viewer refresh f Table Viewer set All Checked false f Table Viewer set Checked Elements get Enabled Templates catch File Not Found Exception e open Read Error Dialog e catch IO Exception e open Read Error Dialog e  import_ FileDialog FileDialog getShell setText TextEditorTemplateMessages getString TemplatePreferencePage setFilterExtensions TextEditorTemplateMessages getString TemplatePreferencePage TemplateReaderWriter TemplateReaderWriter InputStream BufferedInputStream FileInputStream TemplatePersistenceData TemplatePersistenceData fTemplateStore fTableViewer fTableViewer setAllChecked fTableViewer setCheckedElements getEnabledTemplates FileNotFoundException openReadErrorDialog IOException openReadErrorDialog
private void export I Structured Selection selection I Structured Selection f Table Viewer get Selection Object templates selection to Array Template Persistence Data datas new Template Persistence Data templates length for int i 0 i templates length i datas i Template Persistence Data templates i export datas  IStructuredSelection IStructuredSelection fTableViewer getSelection toArray TemplatePersistenceData TemplatePersistenceData TemplatePersistenceData
private void export Template Persistence Data templates File Dialog dialog new File Dialog get Shell SWT SAVE dialog set Text Text Editor Template Messages get Formatted String Template Preference Page export title new Integer templates length NON NLS 1 dialog set Filter Extensions new String Text Editor Template Messages get String Template Preference Page export extension NON NLS 1 dialog set File Name Text Editor Template Messages get String Template Preference Page export filename NON NLS 1 String path dialog open if path null return File file new File path if file is Hidden String title Text Editor Template Messages get String Template Preference Page export error title NON NLS 1 String message Text Editor Template Messages get Formatted String Template Preference Page export error hidden file get Absolute Path NON NLS 1 Message Dialog open Error get Shell title message return if file exists file can Write String title Text Editor Template Messages get String Template Preference Page export error title NON NLS 1 String message Text Editor Template Messages get Formatted String Template Preference Page export error can Not Write file get Absolute Path NON NLS 1 Message Dialog open Error get Shell title message return if file exists confirm Overwrite file try Output Stream output new Buffered Output Stream new File Output Stream file Template Reader Writer writer new Template Reader Writer writer save templates output catch Exception e open Write Error Dialog e  TemplatePersistenceData FileDialog FileDialog getShell setText TextEditorTemplateMessages getFormattedString TemplatePreferencePage setFilterExtensions TextEditorTemplateMessages getString TemplatePreferencePage setFileName TextEditorTemplateMessages getString TemplatePreferencePage isHidden TextEditorTemplateMessages getString TemplatePreferencePage TextEditorTemplateMessages getFormattedString TemplatePreferencePage getAbsolutePath MessageDialog openError getShell canWrite TextEditorTemplateMessages getString TemplatePreferencePage TextEditorTemplateMessages getFormattedString TemplatePreferencePage canNotWrite getAbsolutePath MessageDialog openError getShell confirmOverwrite OutputStream BufferedOutputStream FileOutputStream TemplateReaderWriter TemplateReaderWriter openWriteErrorDialog
private boolean confirm Overwrite File file return Message Dialog open Question get Shell Text Editor Template Messages get String Template Preference Page export exists title NON NLS 1 Text Editor Template Messages get Formatted String Template Preference Page export exists message file get Absolute Path NON NLS 1  confirmOverwrite MessageDialog openQuestion getShell TextEditorTemplateMessages getString TemplatePreferencePage TextEditorTemplateMessages getFormattedString TemplatePreferencePage getAbsolutePath
private void remove I Structured Selection selection I Structured Selection f Table Viewer get Selection Iterator elements selection iterator while elements has Next Template Persistence Data data Template Persistence Data elements next f Template Store delete data f Table Viewer refresh  IStructuredSelection IStructuredSelection fTableViewer getSelection hasNext TemplatePersistenceData TemplatePersistenceData fTemplateStore fTableViewer
private void restore Deleted f Template Store restore Deleted f Table Viewer refresh f Table Viewer set Checked Elements get Enabled Templates update Buttons  restoreDeleted fTemplateStore restoreDeleted fTableViewer fTableViewer setCheckedElements getEnabledTemplates updateButtons
private void revert I Structured Selection selection I Structured Selection f Table Viewer get Selection Iterator elements selection iterator while elements has Next Template Persistence Data data Template Persistence Data elements next data revert f Table Viewer refresh selection Changed1 f Table Viewer set Checked get Enabled Templates true  IStructuredSelection IStructuredSelection fTableViewer getSelection hasNext TemplatePersistenceData TemplatePersistenceData fTableViewer selectionChanged1 fTableViewer setChecked getEnabledTemplates
public void set Visible boolean visible super set Visible visible if visible set Title Text Editor Template Messages get String Template Preference Page title NON NLS 1  setVisible setVisible setTitle TextEditorTemplateMessages getString TemplatePreferencePage
protected void perform Defaults if is Show Formatter Setting I Preference Store prefs get Preference Store f Format Button set Selection prefs get Default Boolean get Formatter Preference Key f Template Store restore Defaults refresh f Table Viewer refresh f Table Viewer set All Checked false f Table Viewer set Checked Elements get Enabled Templates  performDefaults isShowFormatterSetting IPreferenceStore getPreferenceStore fFormatButton setSelection getDefaultBoolean getFormatterPreferenceKey fTemplateStore restoreDefaults fTableViewer fTableViewer setAllChecked fTableViewer setCheckedElements getEnabledTemplates
public boolean perform Ok if is Show Formatter Setting I Preference Store prefs get Preference Store prefs set Value get Formatter Preference Key f Format Button get Selection try f Template Store save catch IO Exception e open Write Error Dialog e return super perform Ok  performOk isShowFormatterSetting IPreferenceStore getPreferenceStore setValue getFormatterPreferenceKey fFormatButton getSelection fTemplateStore IOException openWriteErrorDialog performOk
Returns the key to use for the formatter preference return the formatter preference key protected String get Formatter Preference Key return DEFAULT FORMATTER PREFERENCE KEY  getFormatterPreferenceKey DEFAULT_FORMATTER_PREFERENCE_KEY
public boolean perform Cancel try f Template Store load catch IO Exception e open Read Error Dialog e return false return super perform Cancel  performCancel fTemplateStore IOException openReadErrorDialog performCancel
private void open Read Error Dialog Exception e String title Text Editor Template Messages get String Template Preference Page error read title NON NLS 1 String message Text Editor Template Messages get String Template Preference Page error read message NON NLS 1 Message Dialog open Error get Shell title message  openReadErrorDialog TextEditorTemplateMessages getString TemplatePreferencePage TextEditorTemplateMessages getString TemplatePreferencePage MessageDialog openError getShell
private void open Write Error Dialog Exception e String title Text Editor Template Messages get String Template Preference Page error write title NON NLS 1 String message Text Editor Template Messages get String Template Preference Page error write message NON NLS 1 Message Dialog open Error get Shell title message  openWriteErrorDialog TextEditorTemplateMessages getString TemplatePreferencePage TextEditorTemplateMessages getString TemplatePreferencePage MessageDialog openError getShell
protected Source Viewer get Viewer return f Pattern Viewer  SourceViewer getViewer fPatternViewer
protected Table Viewer get Table Viewer return f Table Viewer  TableViewer getTableViewer fTableViewer

private static Comparator fg Template Variable Proposal Comparator new Comparator public int compare Object arg0 Object arg1 Template Variable Proposal proposal0 Template Variable Proposal arg0 Template Variable Proposal proposal1 Template Variable Proposal arg1 return proposal0 get Display String compare To proposal1 get Display String  fgTemplateVariableProposalComparator TemplateVariableProposal TemplateVariableProposal TemplateVariableProposal TemplateVariableProposal getDisplayString compareTo getDisplayString
public boolean equals Object arg0 return false 
Sets the context type param context Type the context type for this processor public void set Context Type Template Context Type context Type f Context Type context Type  contextType setContextType TemplateContextType contextType fContextType contextType
Returns the context type return the context type public Template Context Type get Context Type return f Context Type  TemplateContextType getContextType fContextType
public I Completion Proposal compute Completion Proposals I Text Viewer viewer int document Offset if f Context Type null return null List proposals new Array List String text viewer get Document get int start get Start text document Offset int end document Offset String string text substring start end String prefix string length 2 string substring 2 null int offset start int length end start for Iterator iterator f Context Type resolvers iterator has Next Template Variable Resolver variable Template Variable Resolver iterator next if prefix null variable get Type starts With prefix proposals add new Template Variable Proposal variable offset length viewer Collections sort proposals fg Template Variable Proposal Comparator return I Completion Proposal proposals to Array new I Completion Proposal proposals size  ICompletionProposal computeCompletionProposals ITextViewer documentOffset fContextType ArrayList getDocument getStart documentOffset documentOffset fContextType hasNext TemplateVariableResolver TemplateVariableResolver getType startsWith TemplateVariableProposal fgTemplateVariableProposalComparator ICompletionProposal toArray ICompletionProposal
Guesses the start position of the completion private int get Start String string int end int start end if start 1 string char At start 1 return start 1 while start 0 Character is Unicode Identifier Part string char At start 1 start if start 2 string char At start 1 string char At start 2 return start 2 return end  getStart charAt isUnicodeIdentifierPart charAt charAt charAt
see I Content Assist Processor compute Context Information I Text Viewer int public I Context Information compute Context Information I Text Viewer viewer int document Offset return null  IContentAssistProcessor computeContextInformation ITextViewer IContextInformation computeContextInformation ITextViewer documentOffset
see I Content Assist Processor get Completion Proposal Auto Activation Characters public char get Completion Proposal Auto Activation Characters return new char  IContentAssistProcessor getCompletionProposalAutoActivationCharacters getCompletionProposalAutoActivationCharacters
see I Content Assist Processor get Context Information Auto Activation Characters public char get Context Information Auto Activation Characters return null  IContentAssistProcessor getContextInformationAutoActivationCharacters getContextInformationAutoActivationCharacters
see I Content Assist Processor get Error Message public String get Error Message return null  IContentAssistProcessor getErrorMessage getErrorMessage
see I Content Assist Processor get Context Information Validator public I Context Information Validator get Context Information Validator return null  IContentAssistProcessor getContextInformationValidator IContextInformationValidator getContextInformationValidator

Creates a template variable proposal param variable the template variable param offset the offset to replace param length the length to replace param viewer the viewer public Template Variable Proposal Template Variable Resolver variable int offset int length I Text Viewer viewer f Variable variable f Offset offset f Length length f Viewer viewer  TemplateVariableProposal TemplateVariableResolver ITextViewer fVariable fOffset fLength fViewer
public void apply I Document document try String variable f Variable get Type equals dollar f Variable get Type NON NLS 1 NON NLS 2 NON NLS 3 document replace f Offset f Length variable f Selection new Point f Offset variable length 0 catch Bad Location Exception e Shell shell f Viewer get Text Widget get Shell Message Dialog open Error shell Text Editor Template Messages get String Template Variable Proposal error title e get Message NON NLS 1  IDocument fVariable getType fVariable getType fOffset fLength fSelection fOffset BadLocationException fViewer getTextWidget getShell MessageDialog openError TextEditorTemplateMessages getString TemplateVariableProposal getMessage
see I Completion Proposal get Selection I Document public Point get Selection I Document document return f Selection  ICompletionProposal getSelection IDocument getSelection IDocument fSelection
see I Completion Proposal get Additional Proposal Info public String get Additional Proposal Info return null  ICompletionProposal getAdditionalProposalInfo getAdditionalProposalInfo
see I Completion Proposal get Display String public String get Display String return f Variable get Type f Variable get Description NON NLS 1  ICompletionProposal getDisplayString getDisplayString fVariable getType fVariable getDescription
see I Completion Proposal get Image public Image get Image return null  ICompletionProposal getImage getImage
see I Completion Proposal get Context Information public I Context Information get Context Information return null  ICompletionProposal getContextInformation IContextInformation getContextInformation

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Text Editor Template Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE TextEditorTemplateMessages
param key return public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key  getString fgResourceBundle getString MissingResourceException
Gets a string from the resource bundle and formats it with the argument param keythe string used to get the bundle value must not be null param arg return public static String get Formatted String String key Object arg return Message Format format get String key new Object arg  getFormattedString MessageFormat getString
Gets a string from the resource bundle and formats it with arguments param key param args return public static String get Formatted String String key Object args return Message Format format get String key args  getFormattedString MessageFormat getString

Creates and initializes the action for the given text editor The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the text editor see Resource Action Resource Action Resource Bundle String protected Text Editor Action Resource Bundle bundle String prefix I Text Editor editor super bundle prefix set Editor editor update  ResourceAction ResourceAction ResourceAction ResourceBundle TextEditorAction ResourceBundle ITextEditor setEditor
Creates and initializes the action for the given text editor The action configures its visual representation from the given resource bundle param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the text editor param style the style of this action see Resource Action Resource Action Resource Bundle String int since 3 0 protected Text Editor Action Resource Bundle bundle String prefix I Text Editor editor int style super bundle prefix style set Editor editor update  ResourceAction ResourceAction ResourceAction ResourceBundle TextEditorAction ResourceBundle ITextEditor setEditor
Returns the action s text editor return the action s text editor protected I Text Editor get Text Editor return f Text Editor  ITextEditor getTextEditor fTextEditor
Retargets this action to the given editor param editor the new editor or code null code if none public void set Editor I Text Editor editor f Text Editor editor  setEditor ITextEditor fTextEditor
Always enables this action if it is connected to a text editor If the associated editor is code null code the action is disabled Subclasses may override public void update set Enabled get Text Editor null  setEnabled getTextEditor
Checks the editor s modifiable state Returns code true code if the editor can be modified taking in account the possible editor extensions p If the editor implements code I Text Editor Extension2 code this method returns link I Text Editor Extension2 is Editor Input Modifiable br else if the editor implements code I Text Editor Extension2 code it returns link I Text Editor Extension is Editor Input Read Only br else link I Text Editor is Editable is returned or code false code if the editor is code null code p p There is only a difference to link validate Editor Input State if the editor implements code I Text Editor Extension2 code p return code true code if a modifying action should be enabled code false code otherwise since 3 0 protected boolean can Modify Editor I Text Editor editor get Text Editor if editor instanceof I Text Editor Extension2 return I Text Editor Extension2 editor is Editor Input Modifiable else if editor instanceof I Text Editor Extension return I Text Editor Extension editor is Editor Input Read Only else if editor null return editor is Editable else return false  ITextEditorExtension2 ITextEditorExtension2 isEditorInputModifiable ITextEditorExtension2 ITextEditorExtension isEditorInputReadOnly ITextEditor isEditable validateEditorInputState ITextEditorExtension2 canModifyEditor ITextEditor getTextEditor ITextEditorExtension2 ITextEditorExtension2 isEditorInputModifiable ITextEditorExtension ITextEditorExtension isEditorInputReadOnly isEditable
Checks and validates the editor s modifiable state Returns code true code if an action can proceed modifying the editor s input code false code if it should not p If the editor implements code I Text Editor Extension2 code this method returns link I Text Editor Extension2 validate Editor Input State br else if the editor implements code I Text Editor Extension code it returns link I Text Editor Extension is Editor Input Read Only br else link I Text Editor is Editable is returned or code false code if the editor is code null code p p There is only a difference to link can Modify Editor if the editor implements code I Text Editor Extension2 code p return code true code if a modifying action can proceed to modify the underlying document code false code otherwise since 3 0 protected boolean validate Editor Input State I Text Editor editor get Text Editor if editor instanceof I Text Editor Extension2 return I Text Editor Extension2 editor validate Editor Input State else if editor instanceof I Text Editor Extension return I Text Editor Extension editor is Editor Input Read Only else if editor null return editor is Editable else return false  ITextEditorExtension2 ITextEditorExtension2 validateEditorInputState ITextEditorExtension ITextEditorExtension isEditorInputReadOnly ITextEditor isEditable canModifyEditor ITextEditorExtension2 validateEditorInputState ITextEditor getTextEditor ITextEditorExtension2 ITextEditorExtension2 validateEditorInputState ITextEditorExtension ITextEditorExtension isEditorInputReadOnly isEditable

private static Resource Bundle fg Resource Bundle Resource Bundle get Bundle RESOURCE BUNDLE private Text Editor Messages  ResourceBundle fgResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE TextEditorMessages
Gets a string from the resource bundle param key the string used to get the bundle value must not be code null code return the string from the resource bundle public static String get String String key try return fg Resource Bundle get String key catch Missing Resource Exception e return key NON NLS 2 NON NLS 1  getString fgResourceBundle getString MissingResourceException
Returns a resource bundle return the resource bundle public static Resource Bundle get Resource Bundle return fg Resource Bundle  ResourceBundle getResourceBundle fgResourceBundle

Creates a new code Text Navigation Action code param text Widget the text widget param action the styled text widget action public Text Navigation Action Styled Text text Widget int action f Text Widget text Widget f Action action  TextNavigationAction textWidget TextNavigationAction StyledText textWidget fTextWidget textWidget fAction
Returns the text widget this actions is bound to return returns the text widget this actions is bound to protected Styled Text get Text Widget return f Text Widget  StyledText getTextWidget fTextWidget
public void run Point selection f Text Widget get Selection f Text Widget invoke Action f Action fire Selection Changed selection  fTextWidget getSelection fTextWidget invokeAction fAction fireSelectionChanged
private void do Fire Selection Changed Point selection Event event new Event event x selection x event y selection y f Text Widget notify Listeners SWT Selection event  doFireSelectionChanged fTextWidget notifyListeners
Sends a selection event with the current selection to all selection listeners of the action s text widget since 3 0 protected void fire Selection Changed fire Selection Changed null  fireSelectionChanged fireSelectionChanged
Fires a selection event to all selection listener of the action s text widget if the current selection differs from the given selection param old Selection the old selection since 3 0 protected void fire Selection Changed Point old Selection Point selection f Text Widget get Selection if old Selection null selection equals old Selection do Fire Selection Changed selection  oldSelection fireSelectionChanged oldSelection fTextWidget getSelection oldSelection oldSelection doFireSelectionChanged
see I Action run With Event Event public void run With Event Event event run  IAction runWithEvent runWithEvent
see I Action set Action Definition Id String public void set Action Definition Id String id f Action Definition Id id  IAction setActionDefinitionId setActionDefinitionId fActionDefinitionId
see I Action get Action Definition Id public String get Action Definition Id return f Action Definition Id  IAction getActionDefinitionId getActionDefinitionId fActionDefinitionId
see I Action set Id String public void set Id String id f Action Id id  IAction setId setId fActionId
see I Action get Id public String get Id return f Action Id  IAction getId getId fActionId
see I Action add Property Change Listener I Property Change Listener public void add Property Change Listener I Property Change Listener listener  IAction addPropertyChangeListener IPropertyChangeListener addPropertyChangeListener IPropertyChangeListener
see I Action get Accelerator public int get Accelerator return 0  IAction getAccelerator getAccelerator
see I Action get Description public String get Description return null  IAction getDescription getDescription
see I Action get Disabled Image Descriptor public Image Descriptor get Disabled Image Descriptor return null  IAction getDisabledImageDescriptor ImageDescriptor getDisabledImageDescriptor
see I Action get Help Listener public Help Listener get Help Listener return null  IAction getHelpListener HelpListener getHelpListener
see I Action get Hover Image Descriptor public Image Descriptor get Hover Image Descriptor return null  IAction getHoverImageDescriptor ImageDescriptor getHoverImageDescriptor
see I Action get Image Descriptor public Image Descriptor get Image Descriptor return null  IAction getImageDescriptor ImageDescriptor getImageDescriptor
see I Action get Menu Creator public I Menu Creator get Menu Creator return null  IAction getMenuCreator IMenuCreator getMenuCreator
see I Action get Style public int get Style return 0  IAction getStyle getStyle
see I Action get Text public String get Text return null  IAction getText getText
see I Action get Tool Tip Text public String get Tool Tip Text return null  IAction getToolTipText getToolTipText
see I Action is Checked public boolean is Checked return false  IAction isChecked isChecked
see I Action is Enabled public boolean is Enabled return true  IAction isEnabled isEnabled
see I Action remove Property Change Listener I Property Change Listener public void remove Property Change Listener I Property Change Listener listener  IAction removePropertyChangeListener IPropertyChangeListener removePropertyChangeListener IPropertyChangeListener
deprecated public void set Accelerator int keycode  setAccelerator
see I Action set Checked boolean public void set Checked boolean checked  IAction setChecked setChecked
see I Action set Description String public void set Description String text  IAction setDescription setDescription
see I Action set Disabled Image Descriptor Image Descriptor public void set Disabled Image Descriptor Image Descriptor new Image  IAction setDisabledImageDescriptor ImageDescriptor setDisabledImageDescriptor ImageDescriptor newImage
see I Action set Enabled boolean public void set Enabled boolean enabled  IAction setEnabled setEnabled
see I Action set Help Listener Help Listener public void set Help Listener Help Listener listener  IAction setHelpListener HelpListener setHelpListener HelpListener
see I Action set Hover Image Descriptor Image Descriptor public void set Hover Image Descriptor Image Descriptor new Image  IAction setHoverImageDescriptor ImageDescriptor setHoverImageDescriptor ImageDescriptor newImage
see I Action set Image Descriptor Image Descriptor public void set Image Descriptor Image Descriptor new Image  IAction setImageDescriptor ImageDescriptor setImageDescriptor ImageDescriptor newImage
see I Action set Menu Creator I Menu Creator public void set Menu Creator I Menu Creator creator  IAction setMenuCreator IMenuCreator setMenuCreator IMenuCreator
see I Action set Text String public void set Text String text  IAction setText setText
see I Action set Tool Tip Text String public void set Tool Tip Text String text  IAction setToolTipText setToolTipText

Creates and initializes the action for the given text editor and operation code The action configures its visual representation from the given resource bundle The action works by asking the text editor at the time for its text operation target adapter using code get Adapter I Text Operation Target class code The action runs that operation with the given opcode param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the text editor param operation Code the operation code see Text Editor Action Text Editor Action Resource Bundle String I Text Editor public Text Operation Action Resource Bundle bundle String prefix I Text Editor editor int operation Code super bundle prefix editor f Operation Code operation Code update  getAdapter ITextOperationTarget ResourceAction operationCode TextEditorAction TextEditorAction ResourceBundle ITextEditor TextOperationAction ResourceBundle ITextEditor operationCode fOperationCode operationCode
Creates and initializes the action for the given text editor and operation code The action configures its visual representation from the given resource bundle The action works by asking the text editor at the time for its text operation target adapter using code get Adapter I Text Operation Target class code The action runs that operation with the given opcode param bundle the resource bundle param prefix a prefix to be prepended to the various resource keys described in code Resource Action code constructor or code null code if none param editor the text editor param operation Code the operation code param runs On Read Only code true code if action can be executed on read only files see Text Editor Action Text Editor Action Resource Bundle String I Text Editor since 2 0 public Text Operation Action Resource Bundle bundle String prefix I Text Editor editor int operation Code boolean runs On Read Only super bundle prefix editor f Operation Code operation Code f Runs On Read Only runs On Read Only update  getAdapter ITextOperationTarget ResourceAction operationCode runsOnReadOnly TextEditorAction TextEditorAction ResourceBundle ITextEditor TextOperationAction ResourceBundle ITextEditor operationCode runsOnReadOnly fOperationCode operationCode fRunsOnReadOnly runsOnReadOnly
Busy Indicator show While display new Runnable public void run f Operation Target do Operation f Operation Code  BusyIndicator showWhile fOperationTarget doOperation fOperationCode
The code Text Operation Action code implementation of this code I Action code method runs the operation with the current operation code public void run if f Operation Code 1 f Operation Target null return I Text Editor editor get Text Editor if editor null return if f Runs On Read Only validate Editor Input State return Display display null I Workbench Part Site site editor get Site Shell shell site get Shell if shell null shell is Disposed display shell get Display Busy Indicator show While display new Runnable public void run f Operation Target do Operation f Operation Code  TextOperationAction IAction fOperationCode fOperationTarget ITextEditor getTextEditor fRunsOnReadOnly validateEditorInputState IWorkbenchPartSite getSite getShell isDisposed getDisplay BusyIndicator showWhile fOperationTarget doOperation fOperationCode
The code Text Operation Action code implementation of this code I Update code method discovers the operation through the current editor s code I Text Operation Target code adapter and sets the enabled state accordingly public void update super update if f Runs On Read Only can Modify Editor set Enabled false return I Text Editor editor get Text Editor if f Operation Target null editor null f Operation Code 1 f Operation Target I Text Operation Target editor get Adapter I Text Operation Target class boolean is Enabled f Operation Target null f Operation Target can Do Operation f Operation Code set Enabled is Enabled  TextOperationAction IUpdate ITextOperationTarget fRunsOnReadOnly canModifyEditor setEnabled ITextEditor getTextEditor fOperationTarget fOperationCode fOperationTarget ITextOperationTarget getAdapter ITextOperationTarget isEnabled fOperationTarget fOperationTarget canDoOperation fOperationCode setEnabled isEnabled
see Text Editor Action set Editor I Text Editor public void set Editor I Text Editor editor super set Editor editor f Operation Target null  TextEditorAction setEditor ITextEditor setEditor ITextEditor setEditor fOperationTarget

Creates a new text selection navigation location param part the text editor part param initialize a boolean indicating whether to initialize the new instance from the current selection public Text Selection Navigation Location I Text Editor part boolean initialize super part if initialize I Selection s part get Selection Provider get Selection if s null s is Empty return I Text Selection selection I Text Selection s if selection get Offset 0 selection get Length 0 return I Document document get Document part Position position new Position selection get Offset selection get Length if install On Document document position f Document document f Position position if part is Dirty f Saved Position new Position f Position offset f Position length  TextSelectionNavigationLocation ITextEditor ISelection getSelectionProvider getSelection isEmpty ITextSelection ITextSelection getOffset getLength IDocument getDocument getOffset getLength installOnDocument fDocument fPosition isDirty fSavedPosition fPosition fPosition
Returns the text editor s document param part the text editor return the document of the given text editor private I Document get Document I Text Editor part I Document Provider provider part get Document Provider return provider get Document part get Editor Input  IDocument getDocument ITextEditor IDocumentProvider getDocumentProvider getDocument getEditorInput
Installs the given position on the given document param document the document param position the position return code true code if the position could be installed private boolean install On Document I Document document Position position if document null position null if document contains Position Category CATEGORY document add Position Category CATEGORY document add Position Updater fg Position Updater try document add Position CATEGORY position return true catch Bad Location Exception e catch Bad Position Category Exception e return false  installOnDocument IDocument containsPositionCategory addPositionCategory addPositionUpdater fgPositionUpdater addPosition BadLocationException BadPositionCategoryException
Uninstalls the given position from the given document param document the document param position the position return code true code if the position could be uninstalled private boolean uninstall From Document I Document document Position position if document null position null try document remove Position CATEGORY position Position category document get Positions CATEGORY if category null category length 0 document remove Position Category CATEGORY document remove Position Updater fg Position Updater return true catch Bad Position Category Exception e return false  uninstallFromDocument IDocument removePosition getPositions removePositionCategory removePositionUpdater fgPositionUpdater BadPositionCategoryException
see Object to String public String to String return Selection f Position NON NLS 1 NON NLS 2  toString toString fPosition
Tells whether this location is equal to the current location in the given text editor param part the text editor return code true code if the locations are equal private boolean equals Location Of I Text Editor part if f Position null return true if f Position is Deleted return false I Selection Provider provider part get Site get Selection Provider I Selection selection provider get Selection if selection instanceof I Text Selection I Text Selection text Selection I Text Selection selection if text Selection get Offset f Position offset text Selection get Length f Position length String text text Selection get Text if text null try return text equals f Document get f Position offset f Position length catch Bad Location Exception e return false  equalsLocationOf ITextEditor fPosition fPosition isDeleted ISelectionProvider getSite getSelectionProvider ISelection getSelection ITextSelection ITextSelection textSelection ITextSelection textSelection getOffset fPosition textSelection getLength fPosition textSelection getText fDocument fPosition fPosition BadLocationException
public void dispose uninstall From Document f Document f Position f Document null f Position null f Saved Position null super dispose  uninstallFromDocument fDocument fPosition fDocument fPosition fSavedPosition
Releases the state of this location public void release State deactivate uninstall From Document f Document f Position f Document null f Position null f Saved Position null super release State  releaseState uninstallFromDocument fDocument fPosition fDocument fPosition fSavedPosition releaseState
Merges the given location into this one param location the location to merge into this one return code true code if merging was successful public boolean merge Into I Navigation Location location if location null return false if get Class location get Class return false if f Position null f Position is Deleted return true Text Selection Navigation Location s Text Selection Navigation Location location if s f Position null s f Position is Deleted uninstall From Document f Document f Position s f Document f Document s f Position f Position s f Saved Position f Saved Position return true if s f Document f Document if s f Position overlaps With f Position offset f Position length f Position offset f Position length s f Position offset s f Position offset s f Position length f Position offset s f Position offset f Position offset s f Position length f Position length return true return false  mergeInto INavigationLocation getClass getClass fPosition fPosition isDeleted TextSelectionNavigationLocation TextSelectionNavigationLocation fPosition fPosition isDeleted uninstallFromDocument fDocument fPosition fDocument fDocument fPosition fPosition fSavedPosition fSavedPosition fDocument fDocument fPosition overlapsWith fPosition fPosition fPosition fPosition fPosition fPosition fPosition fPosition fPosition fPosition fPosition fPosition
Restores this location public void restore Location if f Position null f Position is Deleted return I Editor Part part get Editor Part if part instanceof I Text Editor I Text Editor editor I Text Editor get Editor Part editor select And Reveal f Position offset f Position length  restoreLocation fPosition fPosition isDeleted IEditorPart getEditorPart ITextEditor ITextEditor ITextEditor getEditorPart selectAndReveal fPosition fPosition
Restores the object state from the given memento param memento the memento public void restore State I Memento memento I Editor Part part get Editor Part if part instanceof I Text Editor restore f Document get Document I Text Editor part Integer offset memento get Integer I Workbench Constants TAG X Integer length memento get Integer I Workbench Constants TAG Y String deleted memento get String I Workbench Constants TAG INFO if offset null length null Position p new Position offset int Value length int Value if deleted null p is Deleted DELETED equals deleted true false activate if install On Document f Document p f Position p if part is Dirty f Saved Position new Position f Position offset f Position length  restoreState IMemento IEditorPart getEditorPart ITextEditor fDocument getDocument ITextEditor getInteger IWorkbenchConstants TAG_X getInteger IWorkbenchConstants TAG_Y getString IWorkbenchConstants TAG_INFO intValue intValue isDeleted installOnDocument fDocument fPosition isDirty fSavedPosition fPosition fPosition
Stores the object state into the given memento param memento the memento public void save State I Memento memento if f Saved Position null memento put Integer I Workbench Constants TAG X f Saved Position offset memento put Integer I Workbench Constants TAG Y f Saved Position length memento put String I Workbench Constants TAG INFO f Saved Position is Deleted DELETED NOT DELETED  saveState IMemento fSavedPosition putInteger IWorkbenchConstants TAG_X fSavedPosition putInteger IWorkbenchConstants TAG_Y fSavedPosition putString IWorkbenchConstants TAG_INFO fSavedPosition isDeleted NOT_DELETED
Hook method which is called when the given editor has been saved param part the editor part public void part Saved I Editor Part part http dev eclipse org bugs show bug cgi id 25440 if f Position null f Position is Deleted f Saved Position null else f Saved Position new Position f Position offset f Position length  partSaved IEditorPart show_bug fPosition fPosition isDeleted fSavedPosition fSavedPosition fPosition fPosition
Updates the this location public void update I Editor Part part get Editor Part if part instanceof I Text Editor I Text Editor text Editor I Text Editor get Editor Part if equals Location Of text Editor return I Selection s text Editor get Selection Provider get Selection if s null s is Empty return I Text Selection selection I Text Selection s if selection get Offset 0 selection get Length 0 return f Position offset selection get Offset f Position length selection get Length f Position is Deleted false if part is Dirty f Saved Position new Position f Position offset f Position length  IEditorPart getEditorPart ITextEditor ITextEditor textEditor ITextEditor getEditorPart equalsLocationOf textEditor ISelection textEditor getSelectionProvider getSelection isEmpty ITextSelection ITextSelection getOffset getLength fPosition getOffset fPosition getLength fPosition isDeleted isDirty fSavedPosition fPosition fPosition

see Core Exception Core Exception org eclipse core runtime I Status public Validate State Exception I Status status super status  CoreException CoreException IStatus ValidateStateException IStatus

Creates a new font field editor with the given parameters param name the editor s name param label Text the text shown as editor description param parent the editor s parent widget public Workbench Chained Text Font Field Editor String name String label Text Composite parent super name label Text parent Editor Messages get String Workbench Chained Text Font Field Editor default Workbench Text Font NON NLS 1  labelText WorkbenchChainedTextFontFieldEditor labelText labelText EditorMessages getString WorkbenchChainedTextFontFieldEditor defaultWorkbenchTextFont
Starts the propagation of the text font preference set in the workbench to given target preference store using the given preference key param target the target preference store param target Key the key to be used in the target preference store public static void start Propagate I Preference Store target String target Key Plugin plugin Platform get Plugin org eclipse ui workbench NON NLS 1 if plugin instanceof AbstractUI Plugin AbstractUI Plugin ui Plugin AbstractUI Plugin plugin I Preference Store store ui Plugin get Preference Store if store null Propagating Font Field Editor start Propagate store J Face Resources TEXT FONT target target Key  targetKey startPropagate IPreferenceStore targetKey getPlugin AbstractUIPlugin AbstractUIPlugin uiPlugin AbstractUIPlugin IPreferenceStore uiPlugin getPreferenceStore PropagatingFontFieldEditor startPropagate JFaceResources TEXT_FONT targetKey

Create a new color return a new color This must never be code null code 

Adds a property listener to the theme Any events fired by the underlying registries will cause an event to be fired This event is the same event that was fired by the registry As such the source attribute of the event will not be this theme but rather the color or font registry param listener the listener to add 
Dispose of this theme This method is called by the workbench when appropriate and should never be called by a user 
Get arbitrary data associated with this theme param key the key return the data or the default value code false code if none exists or if the value cannot be treated as a boolean 
Return this themes color registry return this themes color registry 
Return this themes font registry return this themes font registry 
Returns the id of this theme return the id of this theme Guarenteed not to be code null code 
Get arbitrary data associated with this theme param key the key return the data or the default value code 0 code if none exists or if the value cannot be treated as an integer 
Returns the label of this theme return the label of this theme Guarenteed not be code null code 
Get arbitrary data associated with this theme param key the key return the data or code null code if none exists 
Get the set of keys associated with this theme return the Set of keys 
Removes a property listener from the theme param listener the listener to remove 

Adds a property listener to the manager Any events fired by the underlying registries of the current theme will cause an event to be fired This event is the same event that was fired by the registry As such the source attribute of the event will not be this manager but rather the color or font registry Additionally an event is fired when the current theme changes to a new theme The property attribute of such an event will have the value link I Theme Manager CHANGE CURRENT THEME param listener the listener to add void add Property Change Listener  IThemeManager CHANGE_CURRENT_THEME addPropertyChangeListener
Get the currently active theme return the current theme This will never be code null code 
Get a theme param id the theme to find return the code I Theme code or code null code if it cannot be found  ITheme
Removes a property listener from the workbench param listener the listener to remove void remove Property Change Listener  removePropertyChangeListener
Set the currently active theme param id the id of the new active theme 

Create the preview control param parent the Composite in which to create the example param current Theme the theme to preview  currentTheme
Dispose of resources used by this previewer This method is called by the workbench when appropriate and should never be called by a user 

public RGB create Color if color1 null color2 null return new RGB 0 0 0 else if color1 null color2 null return Color Utils get Color Value color1 else if color1 null color2 null return Color Utils get Color Value color2 else RGB rgb1 Color Utils get Color Value color1 RGB rgb2 Color Utils get Color Value color2 return Color Utils blend rgb1 rgb2  createColor ColorUtils getColorValue ColorUtils getColorValue ColorUtils getColorValue ColorUtils getColorValue ColorUtils
This executable extension requires parameters to be explicitly declared via the second method described in the code I Executable Extension code documentation This class expects that there will be two parameters code color1 code and code color2 code that describe the two colors to be blended These values may either be RGB triples or SWT constants see org eclipse core runtime I Executable Extension set Initialization Data org eclipse core runtime I Configuration Element java lang String java lang Object public void set Initialization Data I Configuration Element config String property Name Object data throws Core Exception if data instanceof Hashtable Hashtable table Hashtable data color1 String table get color1 NON NLS 1 color2 String table get color2 NON NLS 1  IExecutableExtension IExecutableExtension setInitializationData IConfigurationElement setInitializationData IConfigurationElement propertyName CoreException

private Bookmark Navigator view Creates a bookmark action protected Bookmark Action Bookmark Navigator view String label super view get Viewer label this view view  BookmarkNavigator BookmarkAction BookmarkNavigator getViewer
Returns the bookmarks view public Bookmark Navigator get View return view  BookmarkNavigator getView

The constructor public Bookmark Content Provider Bookmark Navigator bookmarks View super  BookmarkContentProvider BookmarkNavigator bookmarksView
The visual part that is using this content provider is about to be disposed Deallocate all allocated SWT resources public void dispose I Resource resource I Resource viewer get Input if resource null resource get Workspace remove Resource Change Listener this  IResource IResource getInput getWorkspace removeResourceChangeListener
Returns all the bookmarks that should be shown for the current settings Object get Bookmarks I Resource resource try return resource find Markers I Marker BOOKMARK true I Resource DEPTH INFINITE catch Core Exception e return new Object 0  getBookmarks IResource findMarkers IMarker IResource DEPTH_INFINITE CoreException
public Object get Children Object element If the input element is a workbench return a list of the existing bookmarks Otherwise return an empty list if element instanceof I Resource return get Bookmarks I Resource element else return new Object 0  getChildren IResource getBookmarks IResource
return new Object 0 public Object get Elements Object element return get Children element  getElements getChildren
Recursively walks over the resource delta and gathers all marker deltas Marker deltas are placed into one of the three given vectors depending on the type of delta add remove or change void get Marker Deltas I Resource Delta delta List additions List removals List changes I Marker Delta marker Deltas delta get Marker Deltas for int i 0 i marker Deltas length i I Marker Delta marker Delta marker Deltas i I Marker marker marker Delta get Marker switch marker Delta get Kind case I Resource Delta ADDED if marker Delta is Subtype Of I Marker BOOKMARK additions add marker break case I Resource Delta REMOVED if marker Delta is Subtype Of I Marker BOOKMARK removals add marker break case I Resource Delta CHANGED if marker Delta is Subtype Of I Marker BOOKMARK changes add marker break recurse on child deltas I Resource Delta children delta get Affected Children for int i 0 i children length i get Marker Deltas children i additions removals changes  getMarkerDeltas IResourceDelta IMarkerDelta markerDeltas getMarkerDeltas markerDeltas IMarkerDelta markerDelta markerDeltas IMarker markerDelta getMarker markerDelta getKind IResourceDelta markerDelta isSubtypeOf IMarker IResourceDelta markerDelta isSubtypeOf IMarker IResourceDelta markerDelta isSubtypeOf IMarker IResourceDelta getAffectedChildren getMarkerDeltas
Method declared on I Tree Content Provider public Object get Parent Object element return input  ITreeContentProvider getParent
has Children method comment public boolean has Children Object element if element instanceof I Workspace return true else return false  hasChildren hasChildren IWorkspace
public void input Changed Viewer new Viewer Object old Input Object new Input if old Input null I Resource resource I Resource new Input resource get Workspace add Resource Change Listener this this viewer new Viewer this input I Resource new Input  inputChanged newViewer oldInput newInput oldInput IResource IResource newInput getWorkspace addResourceChangeListener newViewer IResource newInput
viewer get Control get Display async Exec new Runnable public void run This method runs inside an async Exec The widget may have been destroyed by the time this is run Check for this and do nothing if so Control ctrl viewer get Control if ctrl null ctrl is Disposed return viewer refresh  getControl getDisplay asyncExec asyncExec getControl isDisposed
The workbench has changed Process the delta and provide updates to the viewer inside the UI thread see I Resource Change Listener resource Changed public void resource Changed final I Resource Change Event event gather all marker changes from the delta be sure to do this in the calling thread as the delta is destroyed when this method returns final List additions new Array List final List removals new Array List final List changes new Array List I Resource Delta delta event get Delta if delta null return get Marker Deltas delta additions removals changes update the viewer based on the marker changes in the UI thread if additions size removals size changes size 0 viewer get Control get Display async Exec new Runnable public void run This method runs inside an async Exec The widget may have been destroyed by the time this is run Check for this and do nothing if so Control ctrl viewer get Control if ctrl null ctrl is Disposed return viewer refresh  IResourceChangeListener resourceChanged resourceChanged IResourceChangeEvent ArrayList ArrayList ArrayList IResourceDelta getDelta getMarkerDeltas getControl getDisplay asyncExec asyncExec getControl isDisposed

final static int COLUMN LOCATION 4 public Bookmark Label Provider Bookmark Navigator view Image Descriptor desc view get Image Descriptor obj16 bkmrk tsk gif NON NLS 1 image desc create Image  COLUMN_LOCATION BookmarkLabelProvider BookmarkNavigator ImageDescriptor getImageDescriptor bkmrk_tsk createImage
public void dispose if image null image dispose image null 
Method declared on Label Provider public Image get Image Object element return image  LabelProvider getImage
public String get Column Text Object element int column Index if element instanceof I Marker return NON NLS 1 I Marker marker I Marker element switch column Index case COLUMN DESCRIPTION return marker get Attribute I Marker MESSAGE NON NLS 1 case COLUMN RESOURCE return marker get Resource get Name case COLUMN FOLDER return get Container Name marker case COLUMN LOCATION int line marker get Attribute I Marker LINE NUMBER 1 if line 1 return NON NLS 1 return Bookmark Messages format Line Indicator text new String String value Of line NON NLS 1 return NON NLS 1  getColumnText columnIndex IMarker IMarker IMarker columnIndex COLUMN_DESCRIPTION getAttribute IMarker COLUMN_RESOURCE getResource getName COLUMN_FOLDER getContainerName COLUMN_LOCATION getAttribute IMarker LINE_NUMBER BookmarkMessages LineIndicator valueOf
public Image get Column Image Object element int index if index COLUMN ICON return image return null  getColumnImage COLUMN_ICON
Returns the container name if it is defined or empty string if not public static String get Container Name I Marker marker I Path path marker get Resource get Full Path int n path segment Count 1 n is the number of segments in container not path if n 0 return NON NLS 1 int len 0 for int i 0 i n i len path segment i length account for s if n 1 len n 1 String Buffer sb new String Buffer len for int i 0 i n i if i 0 sb append sb append path segment i return sb to String  getContainerName IMarker IPath getResource getFullPath segmentCount StringBuffer StringBuffer toString

private static Resource Bundle bundle Resource Bundle get Bundle RESOURCE BUNDLE private Bookmark Messages prevent instantiation of class  ResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE BookmarkMessages
Returns the formatted message for the given key in the 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  MessageFormat getString
Returns the resource object with the given key in the 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  getString getString MissingResourceException

private int column public Sort By Action int column this column column  SortByAction
public void run sorter set Top Priority column update Sort State viewer refresh I Dialog Settings workbench Settings get Plugin get Dialog Settings I Dialog Settings settings workbench Settings get Section Bookmark Sort State NON NLS 1 if settings null settings workbench Settings add New Section Bookmark Sort State NON NLS 1 sorter save State settings  setTopPriority updateSortState IDialogSettings workbenchSettings getPlugin getDialogSettings IDialogSettings workbenchSettings getSection BookmarkSortState workbenchSettings addNewSection BookmarkSortState saveState
private int direction public Change Sort Direction Action int direction this direction direction  ChangeSortDirectionAction
public void run sorter set Top Priority Direction direction update Sort State viewer refresh I Dialog Settings workbench Settings get Plugin get Dialog Settings I Dialog Settings settings workbench Settings get Section Bookmark Sort State NON NLS 1 if settings null settings workbench Settings add New Section Bookmark Sort State NON NLS 1 sorter save State settings  setTopPriorityDirection updateSortState IDialogSettings workbenchSettings getPlugin getDialogSettings IDialogSettings workbenchSettings getSection BookmarkSortState workbenchSettings addNewSection BookmarkSortState saveState
Creates the bookmarks view public Bookmark Navigator super  BookmarkNavigator
mgr set Remove All When Shown true mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr fill Context Menu mgr  setRemoveAllWhenShown addMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu
Set the double click action viewer add Open Listener new I Open Listener public void open Open Event event open Action run  addOpenListener IOpenListener OpenEvent openAction
viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Selection Changed I Structured Selection event get Selection  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged IStructuredSelection getSelection
viewer get Control add Key Listener new Key Adapter public void key Pressed Key Event e handle Key Pressed e  getControl addKeyListener KeyAdapter keyPressed KeyEvent handleKeyPressed
Adds this views contributions to the workbench void add Contributions I Shared Images shared Images PlatformUI get Workbench get Shared Images Create the actions open Action new Open Bookmark Action this open Action set Image Descriptor get Image Descriptor elcl16 gotoobj tsk gif NON NLS 1 copy Action new Copy Bookmark Action this copy Action set Image Descriptor shared Images get Image Descriptor I Shared Images IMG TOOL COPY paste Action new Paste Bookmark Action this paste Action set Image Descriptor shared Images get Image Descriptor I Shared Images IMG TOOL PASTE remove Action new Remove Bookmark Action this remove Action set Image Descriptor shared Images get Image Descriptor I Shared Images IMG TOOL DELETE remove Action set Disabled Image Descriptor shared Images get Image Descriptor I Shared Images IMG TOOL DELETE DISABLED edit Action new Edit Bookmark Action this select All Action new Select All Action this show In Navigator Action new Show In Navigator Action get View Site get Page viewer initializes action enabled state handle Selection Changed Structured Selection EMPTY Create dynamic menu mgr Dynamic is currently required to support action contributions Menu Manager mgr new Menu Manager mgr set Remove All When Shown true mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr fill Context Menu mgr Menu menu mgr create Context Menu viewer get Control viewer get Control set Menu menu get Site register Context Menu mgr viewer Add actions to the local tool bar I Tool Bar Manager tbm get View Site get Action Bars get Tool Bar Manager tbm add remove Action tbm add open Action tbm update false Register with action service I Action Bars action Bars get View Site get Action Bars action Bars set Global Action Handler Action Factory COPY get Id copy Action action Bars set Global Action Handler Action Factory PASTE get Id paste Action action Bars set Global Action Handler Action Factory DELETE get Id remove Action action Bars set Global Action Handler Action Factory SELECT ALL get Id select All Action Set the double click action viewer add Open Listener new I Open Listener public void open Open Event event open Action run viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Selection Changed I Structured Selection event get Selection viewer get Control add Key Listener new Key Adapter public void key Pressed Key Event e handle Key Pressed e  addContributions ISharedImages sharedImages getWorkbench getSharedImages openAction OpenBookmarkAction openAction setImageDescriptor getImageDescriptor gotoobj_tsk copyAction CopyBookmarkAction copyAction setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_COPY pasteAction PasteBookmarkAction pasteAction setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_PASTE removeAction RemoveBookmarkAction removeAction setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_DELETE removeAction setDisabledImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_DELETE_DISABLED editAction EditBookmarkAction selectAllAction SelectAllAction showInNavigatorAction ShowInNavigatorAction getViewSite getPage handleSelectionChanged StructuredSelection MenuManager MenuManager setRemoveAllWhenShown addMenuListener IMenuListener menuAboutToShow IMenuManager fillContextMenu createContextMenu getControl getControl setMenu getSite registerContextMenu IToolBarManager getViewSite getActionBars getToolBarManager removeAction openAction IActionBars actionBars getViewSite getActionBars actionBars setGlobalActionHandler ActionFactory getId copyAction actionBars setGlobalActionHandler ActionFactory getId pasteAction actionBars setGlobalActionHandler ActionFactory getId removeAction actionBars setGlobalActionHandler ActionFactory SELECT_ALL getId selectAllAction addOpenListener IOpenListener OpenEvent openAction addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged IStructuredSelection getSelection getControl addKeyListener KeyAdapter keyPressed KeyEvent handleKeyPressed
public void create Part Control Composite parent clipboard new Clipboard parent get Display create Table parent viewer new Table Viewer table create Columns sorter new Bookmark Sorter viewer set Content Provider new Bookmark Content Provider this viewer set Label Provider new Bookmark Label Provider this viewer set Input Resources Plugin get Workspace get Root viewer set Sorter sorter I Dialog Settings workbench Settings get Plugin get Dialog Settings I Dialog Settings settings workbench Settings get Section Bookmark Sort State NON NLS 1 sorter restore State settings add Contributions init Drag And Drop create Sort Actions fill Action Bars update Sort State update Paste Enablement get Site set Selection Provider viewer if memento null restore State memento memento null Workbench Help set Help viewer get Control I Bookmark Help Context Ids BOOKMARK VIEW  createPartControl getDisplay createTable TableViewer createColumns BookmarkSorter setContentProvider BookmarkContentProvider setLabelProvider BookmarkLabelProvider setInput ResourcesPlugin getWorkspace getRoot setSorter IDialogSettings workbenchSettings getPlugin getDialogSettings IDialogSettings workbenchSettings getSection BookmarkSortState restoreState addContributions initDragAndDrop createSortActions fillActionBars updateSortState updatePasteEnablement getSite setSelectionProvider restoreState WorkbenchHelp setHelp getControl IBookmarkHelpContextIds BOOKMARK_VIEW
public void dispose if clipboard null clipboard dispose 
Notifies this listener that the menu is about to be shown by the given menu manager param manager the menu manager void fill Context Menu I Menu Manager manager manager add open Action manager add copy Action update Paste Enablement manager add paste Action manager add remove Action manager add select All Action manager add show In Navigator Action manager add new Separator I Workbench Action Constants MB ADDITIONS manager add new Separator manager add edit Action  fillContextMenu IMenuManager openAction copyAction updatePasteEnablement pasteAction removeAction selectAllAction showInNavigatorAction IWorkbenchActionConstants MB_ADDITIONS editAction
if adapter I Show In Source class return new I Show In Source public Show In Context get Show In Context return new Show In Context null get Viewer get Selection  IShowInSource IShowInSource ShowInContext getShowInContext ShowInContext getViewer getSelection
if adapter I Show In Target List class return new I Show In Target List public String get Show In Target Ids return new String I Page Layout ID RES NAV  IShowInTargetList IShowInTargetList getShowInTargetIds IPageLayout ID_RES_NAV
public Object get Adapter Class adapter if adapter I Show In Source class return new I Show In Source public Show In Context get Show In Context return new Show In Context null get Viewer get Selection if adapter I Show In Target List class return new I Show In Target List public String get Show In Target Ids return new String I Page Layout ID RES NAV return super get Adapter adapter  getAdapter IShowInSource IShowInSource ShowInContext getShowInContext ShowInContext getViewer getSelection IShowInTargetList IShowInTargetList getShowInTargetIds IPageLayout ID_RES_NAV getAdapter
Returns the image descriptor with the given relative path Image Descriptor get Image Descriptor String relative Path String icon Path icons full NON NLS 1 try URL installURL get Plugin get Descriptor get InstallURL URL url new URL installURL icon Path relative Path return Image Descriptor create FromURL url catch MalformedURL Exception e Assert is True false return null  ImageDescriptor getImageDescriptor relativePath iconPath getPlugin getDescriptor getInstallURL iconPath relativePath ImageDescriptor createFromURL MalformedURLException isTrue
Returns the UI plugin for the bookmarks view static AbstractUI Plugin get Plugin return AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID  AbstractUIPlugin getPlugin AbstractUIPlugin getPlugin PLUGIN_ID
Returns the shell Shell get Shell return get View Site get Shell  getShell getViewSite getShell
Returns the viewer used to display bookmarks return the viewer or code null code if this view s controls have not been created yet Structured Viewer get Viewer return viewer  StructuredViewer getViewer
Returns the workspace I Workspace get Workspace return Resources Plugin get Workspace  IWorkspace getWorkspace ResourcesPlugin getWorkspace
Handles key events in viewer void handle Key Pressed Key Event event if event character SWT DEL event state Mask 0 remove Action is Enabled remove Action run  handleKeyPressed KeyEvent stateMask removeAction isEnabled removeAction
Handles a selection change param selection the new selection void handle Selection Changed I Structured Selection selection update the actions open Action selection Changed selection remove Action selection Changed selection edit Action selection Changed selection select All Action selection Changed selection show In Navigator Action selection Changed selection  handleSelectionChanged IStructuredSelection openAction selectionChanged removeAction selectionChanged editAction selectionChanged selectAllAction selectionChanged showInNavigatorAction selectionChanged
Method declared on I View Part public void init I View Site site I Memento memento throws Part Init Exception super init site memento this memento memento  IViewPart IViewSite IMemento PartInitException
Text Transfer get Instance Drag Source Listener listener new Drag Source Adapter public void drag Set Data Drag Source Event event perform Drag Set Data event  TextTransfer getInstance DragSourceListener DragSourceAdapter dragSetData DragSourceEvent performDragSetData
perform Drag Set Data event public void drag Finished Drag Source Event event  performDragSetData dragFinished DragSourceEvent
Adds drag and drop support to the bookmark navigator protected void init Drag And Drop int operations DND DROP COPY Transfer transfer Types new Transfer Marker Transfer get Instance Text Transfer get Instance Drag Source Listener listener new Drag Source Adapter public void drag Set Data Drag Source Event event perform Drag Set Data event public void drag Finished Drag Source Event event viewer add Drag Support operations transfer Types listener  initDragAndDrop DROP_COPY transferTypes MarkerTransfer getInstance TextTransfer getInstance DragSourceListener DragSourceAdapter dragSetData DragSourceEvent performDragSetData dragFinished DragSourceEvent addDragSupport transferTypes
The user is attempting to drag marker data Add the appropriate data to the event depending on the transfer type void perform Drag Set Data Drag Source Event event if Marker Transfer get Instance is Supported Type event data Type event data I Structured Selection viewer get Selection to Array return if Text Transfer get Instance is Supported Type event data Type Object markers I Structured Selection viewer get Selection to Array if markers null String Buffer buffer new String Buffer I Label Provider provider I Label Provider get Viewer get Label Provider for int i 0 i markers length i if i 0 buffer append System get Property line separator NON NLS 1 buffer append provider get Text I Marker markers i event data buffer to String return  performDragSetData DragSourceEvent MarkerTransfer getInstance isSupportedType dataType IStructuredSelection getSelection toArray TextTransfer getInstance isSupportedType dataType IStructuredSelection getSelection toArray StringBuffer StringBuffer ILabelProvider ILabelProvider getViewer getLabelProvider getProperty getText IMarker toString
void restore State I Memento memento I Workspace Root root Resources Plugin get Workspace get Root I Memento selection Mem memento get Child TAG SELECTION if selection Mem null Array List selection List new Array List I Memento marker Mems selection Mem get Children TAG MARKER for int i 0 i marker Mems length i try long id new Long marker Mems i get String TAG ID long Value I Resource resource root find Member marker Mems i get String TAG RESOURCE if resource null I Marker marker resource find Marker id if marker null selection List add marker catch Core Exception e viewer set Selection new Structured Selection selection List Scrollable scrollable Scrollable viewer get Control save vertical position Scroll Bar bar scrollable get Vertical Bar if bar null try String pos Str memento get String TAG VERTICAL POSITION int position position new Integer pos Str int Value bar set Selection position catch Number Format Exception e bar scrollable get Horizontal Bar if bar null try String pos Str memento get String TAG HORIZONTAL POSITION int position position new Integer pos Str int Value bar set Selection position catch Number Format Exception e update Sort State viewer refresh  restoreState IMemento IWorkspaceRoot ResourcesPlugin getWorkspace getRoot IMemento selectionMem getChild TAG_SELECTION selectionMem ArrayList selectionList ArrayList IMemento markerMems selectionMem getChildren TAG_MARKER markerMems markerMems getString TAG_ID longValue IResource findMember markerMems getString TAG_RESOURCE IMarker findMarker selectionList CoreException setSelection StructuredSelection selectionList getControl ScrollBar getVerticalBar posStr getString TAG_VERTICAL_POSITION posStr intValue setSelection NumberFormatException getHorizontalBar posStr getString TAG_HORIZONTAL_POSITION posStr intValue setSelection NumberFormatException updateSortState
public void save State I Memento memento if viewer null if this memento null Keep the old state memento put Memento this memento return Scrollable scrollable Scrollable viewer get Control Object markers I Structured Selection viewer get Selection to Array if markers length 0 I Memento selection Mem memento create Child TAG SELECTION for int i 0 i markers length i I Memento element Mem selection Mem create Child TAG MARKER I Marker marker I Marker markers i element Mem put String TAG RESOURCE marker get Resource get Full Path to String element Mem put String TAG ID String value Of marker get Id save vertical position Scroll Bar bar scrollable get Vertical Bar int position bar null bar get Selection 0 memento put String TAG VERTICAL POSITION String value Of position save horizontal position bar scrollable get Horizontal Bar position bar null bar get Selection 0 memento put String TAG HORIZONTAL POSITION String value Of position  saveState IMemento putMemento getControl IStructuredSelection getSelection toArray IMemento selectionMem createChild TAG_SELECTION IMemento elementMem selectionMem createChild TAG_MARKER IMarker IMarker elementMem putString TAG_RESOURCE getResource getFullPath toString elementMem putString TAG_ID valueOf getId ScrollBar getVerticalBar getSelection putString TAG_VERTICAL_POSITION valueOf getHorizontalBar getSelection putString TAG_HORIZONTAL_POSITION valueOf
Method declared on I Workbench Part public void set Focus if viewer null viewer get Control set Focus  IWorkbenchPart setFocus getControl setFocus
Selection Listener header Listener new Selection Adapter Handles the case of user selecting the header area p If the column has not been selected previously it will set the sorter of that column to be the current tasklist sorter Repeated presses on the same column header will toggle sorting order ascending descending public void widget Selected Selection Event e column selected first column doesn t count int column table index Of Table Column e widget 1 if column sorter get Top Priority sorter reverse Top Priority else sorter set Top Priority column update Sort State viewer refresh I Dialog Settings workbench Settings get Plugin get Dialog Settings I Dialog Settings settings workbench Settings get Section Bookmark Sort State NON NLS 1 if settings null settings workbench Settings add New Section Bookmark Sort State NON NLS 1 sorter save State settings  SelectionListener headerListener SelectionAdapter widgetSelected SelectionEvent indexOf TableColumn getTopPriority reverseTopPriority setTopPriority updateSortState IDialogSettings workbenchSettings getPlugin getDialogSettings IDialogSettings workbenchSettings getSection BookmarkSortState workbenchSettings addNewSection BookmarkSortState saveState
void create Columns Selection Listener header Listener new Selection Adapter Handles the case of user selecting the header area p If the column has not been selected previously it will set the sorter of that column to be the current tasklist sorter Repeated presses on the same column header will toggle sorting order ascending descending public void widget Selected Selection Event e column selected first column doesn t count int column table index Of Table Column e widget 1 if column sorter get Top Priority sorter reverse Top Priority else sorter set Top Priority column update Sort State viewer refresh I Dialog Settings workbench Settings get Plugin get Dialog Settings I Dialog Settings settings workbench Settings get Section Bookmark Sort State NON NLS 1 if settings null settings workbench Settings add New Section Bookmark Sort State NON NLS 1 sorter save State settings Table Layout layout new Table Layout table set Layout layout table set Header Visible true for int i 0 i column Headers length i layout add Column Data column Layouts i Table Column tc new Table Column table SWT NONE i tc set Resizable column Layouts i resizable tc set Text column Headers i if i 0 tc add Selection Listener header Listener  createColumns SelectionListener headerListener SelectionAdapter widgetSelected SelectionEvent indexOf TableColumn getTopPriority reverseTopPriority setTopPriority updateSortState IDialogSettings workbenchSettings getPlugin getDialogSettings IDialogSettings workbenchSettings getSection BookmarkSortState workbenchSettings addNewSection BookmarkSortState saveState TableLayout TableLayout setLayout setHeaderVisible columnHeaders addColumnData columnLayouts TableColumn TableColumn setResizable columnLayouts setText columnHeaders addSelectionListener headerListener
Creates the table control void create Table Composite parent table new Table parent SWT H SCROLL SWT V SCROLL SWT MULTI SWT FULL SELECTION table set Lines Visible true table set Layout new Table Layout  createTable H_SCROLL V_SCROLL FULL_SELECTION setLinesVisible setLayout TableLayout
Fills the local tool bar and menu manager with actions void fill Action Bars I Action Bars action Bars get View Site get Action Bars I Menu Manager menu action Bars get Menu Manager I Menu Manager submenu new Menu Manager Bookmark Messages get String Sort Menu Group text NON NLS 1 menu add submenu submenu add sort By Description Action submenu add sort By Resource Action submenu add sort By Folder Action submenu add sort By Line Action submenu add sort By Creation Time submenu add new Separator submenu add sort Ascending Action submenu add sort Descending Action  fillActionBars IActionBars actionBars getViewSite getActionBars IMenuManager actionBars getMenuManager IMenuManager MenuManager BookmarkMessages getString SortMenuGroup sortByDescriptionAction sortByResourceAction sortByFolderAction sortByLineAction sortByCreationTime sortAscendingAction sortDescendingAction
void create Sort Actions sort By Description Action new Sort By Action Bookmark Sorter DESCRIPTION sort By Description Action set Text Bookmark Messages get String Column Description text NON NLS 1 Workbench Help set Help sort By Description Action I Bookmark Help Context Ids SORT DESCRIPTION ACTION sort By Resource Action new Sort By Action Bookmark Sorter RESOURCE sort By Resource Action set Text Bookmark Messages get String Column Resource text NON NLS 1 Workbench Help set Help sort By Resource Action I Bookmark Help Context Ids SORT RESOURCE ACTION sort By Folder Action new Sort By Action Bookmark Sorter FOLDER sort By Folder Action set Text Bookmark Messages get String Column Folder text NON NLS 1 Workbench Help set Help sort By Folder Action I Bookmark Help Context Ids SORT FOLDER ACTION sort By Line Action new Sort By Action Bookmark Sorter LOCATION sort By Line Action set Text Bookmark Messages get String Column Location text NON NLS 1 Workbench Help set Help sort By Line Action I Bookmark Help Context Ids SORT LOCATION ACTION sort By Creation Time new Sort By Action Bookmark Sorter CREATION TIME sort By Creation Time set Text Bookmark Messages get String Column Creation Time text NON NLS 1 Workbench Help set Help sort By Creation Time I Bookmark Help Context Ids SORT CREATION TIME ACTION sort Ascending Action new Change Sort Direction Action Bookmark Sorter ASCENDING sort Ascending Action set Text Bookmark Messages get String Sort Direction Ascending text NON NLS 1 Workbench Help set Help sort Ascending Action I Bookmark Help Context Ids SORT ASCENDING ACTION sort Descending Action new Change Sort Direction Action Bookmark Sorter DESCENDING sort Descending Action set Text Bookmark Messages get String Sort Direction Descending text NON NLS 1 Workbench Help set Help sort Descending Action I Bookmark Help Context Ids SORT DESCENDING ACTION  createSortActions sortByDescriptionAction SortByAction BookmarkSorter sortByDescriptionAction setText BookmarkMessages getString ColumnDescription WorkbenchHelp setHelp sortByDescriptionAction IBookmarkHelpContextIds SORT_DESCRIPTION_ACTION sortByResourceAction SortByAction BookmarkSorter sortByResourceAction setText BookmarkMessages getString ColumnResource WorkbenchHelp setHelp sortByResourceAction IBookmarkHelpContextIds SORT_RESOURCE_ACTION sortByFolderAction SortByAction BookmarkSorter sortByFolderAction setText BookmarkMessages getString ColumnFolder WorkbenchHelp setHelp sortByFolderAction IBookmarkHelpContextIds SORT_FOLDER_ACTION sortByLineAction SortByAction BookmarkSorter sortByLineAction setText BookmarkMessages getString ColumnLocation WorkbenchHelp setHelp sortByLineAction IBookmarkHelpContextIds SORT_LOCATION_ACTION sortByCreationTime SortByAction BookmarkSorter CREATION_TIME sortByCreationTime setText BookmarkMessages getString ColumnCreationTime WorkbenchHelp setHelp sortByCreationTime IBookmarkHelpContextIds SORT_CREATION_TIME_ACTION sortAscendingAction ChangeSortDirectionAction BookmarkSorter sortAscendingAction setText BookmarkMessages getString SortDirectionAscending WorkbenchHelp setHelp sortAscendingAction IBookmarkHelpContextIds SORT_ASCENDING_ACTION sortDescendingAction ChangeSortDirectionAction BookmarkSorter sortDescendingAction setText BookmarkMessages getString SortDirectionDescending WorkbenchHelp setHelp sortDescendingAction IBookmarkHelpContextIds SORT_DESCENDING_ACTION
void update Sort State int column sorter get Top Priority sort By Description Action set Checked column Bookmark Sorter DESCRIPTION sort By Resource Action set Checked column Bookmark Sorter RESOURCE sort By Folder Action set Checked column Bookmark Sorter FOLDER sort By Line Action set Checked column Bookmark Sorter LOCATION sort By Creation Time set Checked column Bookmark Sorter CREATION TIME int direction sorter get Top Priority Direction sort Ascending Action set Checked direction Bookmark Sorter ASCENDING sort Descending Action set Checked direction Bookmark Sorter DESCENDING  updateSortState getTopPriority sortByDescriptionAction setChecked BookmarkSorter sortByResourceAction setChecked BookmarkSorter sortByFolderAction setChecked BookmarkSorter sortByLineAction setChecked BookmarkSorter sortByCreationTime setChecked BookmarkSorter CREATION_TIME getTopPriorityDirection sortAscendingAction setChecked BookmarkSorter sortDescendingAction setChecked BookmarkSorter
Updates the enablement of the paste action void update Paste Enablement Paste if clipboard contains tasks Marker Transfer transfer Marker Transfer get Instance I Marker marker Data I Marker get Clipboard get Contents transfer boolean can Paste false if marker Data null for int i 0 i marker Data length i try if marker Data i get Type equals I Marker BOOKMARK can Paste true break catch Core Exception e can Paste false paste Action set Enabled can Paste  updatePasteEnablement MarkerTransfer MarkerTransfer getInstance IMarker markerData IMarker getClipboard getContents canPaste markerData markerData markerData getType IMarker canPaste CoreException canPaste pasteAction setEnabled canPaste
Clipboard get Clipboard return clipboard  getClipboard

Creates the dialog By default this dialog creates a new bookmark To set the resource and initial attributes for the new bookmark use code set Resource code and code set Initial Attributes code To show or modify an existing bookmark use code set Marker code param shell the parent shell public Bookmark Properties Dialog Shell parent Shell super parent Shell  setResource setInitialAttributes setMarker BookmarkPropertiesDialog parentShell parentShell
public Bookmark Properties Dialog Shell parent Shell String title super parent Shell this title title  BookmarkPropertiesDialog parentShell parentShell
public void create super create 
Sets the marker to show or modify param marker the marker or code null code to create a new marker public void set Marker I Marker marker this marker marker  setMarker IMarker
Returns the marker being created or modified For a new marker this returns code null code until the dialog returns but is non null after public I Marker get Marker return marker  IMarker getMarker
Sets the resource to use when creating a new bookmark If not set the new bookmark is created on the workspace root public void set Resource I Resource resource this resource resource  setResource IResource
Returns the resource to use when creating a new bookmark or code null code if none has been set If not set the new bookmark is created on the workspace root public I Resource get Resource return resource  IResource getResource
Sets initial attributes to use when creating a new bookmark If not set the new bookmark is created with default attributes public void set Initial Attributes Map initial Attributes this initial Attributes initial Attributes  setInitialAttributes initialAttributes initialAttributes initialAttributes
Returns the initial attributes to use when creating a new bookmark or code null code if not set If not set the new bookmark is created with default attributes public Map get Initial Attributes return initial Attributes  getInitialAttributes initialAttributes
protected void configure Shell Shell new Shell super configure Shell new Shell if title null new Shell set Text Bookmark Messages get String Properties Dialog Title text NON NLS 1 else new Shell set Text title  configureShell newShell configureShell newShell newShell setText BookmarkMessages getString PropertiesDialogTitle newShell setText
protected Control create Dialog Area Composite parent initialize resources properties if marker null resource marker get Resource try initial Attributes marker get Attributes catch Core Exception e else if initial Attributes null resource null resource I Resource Resources Plugin get Workspace get Root Composite composite Composite super create Dialog Area parent initialize Dialog Units composite create Description Area composite if marker null create Creation Time Area composite if resource null resource get Type I Resource ROOT create Resource Area composite update Dialog From Marker return composite  createDialogArea getResource initialAttributes getAttributes CoreException initialAttributes IResource ResourcesPlugin getWorkspace getRoot createDialogArea initializeDialogUnits createDescriptionArea createCreationTimeArea getType IResource createResourceArea updateDialogFromMarker
Method create Creation Time Area param composite private void create Creation Time Area Composite parent String creation Bookmark Messages get String Marker Creation Time text NON NLS 1 Font font parent get Font Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout Label label new Label composite SWT NONE label set Text creation label set Font font creation Time new Label composite SWT NONE creation Time set Font font  createCreationTimeArea createCreationTimeArea BookmarkMessages getString MarkerCreationTime getFont GridLayout GridLayout numColumns setLayout setText setFont creationTime creationTime setFont
Creates the OK and Cancel buttons protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
description Text add Modify Listener new Modify Listener public void modify Text Modify Event e mark Dirty  descriptionText addModifyListener ModifyListener modifyText ModifyEvent markDirty
Creates the area for the Description field private void create Description Area Composite parent Font font parent get Font Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout Label label new Label composite SWT NONE label set Text Bookmark Messages get String Column Description dialog Text NON NLS 1 label set Font font int style SWT SINGLE SWT BORDER description Text new Text composite style Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL grid Data width Hint convert HorizontalDL Us To Pixels 400 description Text set Layout Data grid Data description Text set Font font description Text add Modify Listener new Modify Listener public void modify Text Modify Event e mark Dirty  createDescriptionArea getFont GridLayout GridLayout numColumns setLayout setText BookmarkMessages getString ColumnDescription dialogText setFont descriptionText GridData gridData GridData GridData FILL_HORIZONTAL gridData widthHint convertHorizontalDLUsToPixels descriptionText setLayoutData gridData descriptionText setFont descriptionText addModifyListener ModifyListener modifyText ModifyEvent markDirty
Creates the area for the Resource field private void create Resource Area Composite parent Font font parent get Font Composite composite new Composite parent SWT NONE Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL composite set Layout Data grid Data Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout Label resource Label new Label composite SWT NONE resource Label set Text Bookmark Messages get String Column Resource dialog Text NON NLS 1 resource Label set Font font resource Text new Text composite SWT SINGLE SWT WRAP SWT READ ONLY SWT BORDER grid Data new Grid Data Grid Data FILL HORIZONTAL resource Text set Layout Data grid Data resource Text set Font font Label folder Label new Label composite SWT NONE folder Label set Text Bookmark Messages get String Column Folder dialog Text NON NLS 1 folder Label set Font font folder Text new Text composite SWT SINGLE SWT WRAP SWT READ ONLY SWT BORDER grid Data new Grid Data Grid Data FILL HORIZONTAL folder Text set Layout Data grid Data folder Text set Font font Label location Label new Label composite SWT NONE location Label set Text Bookmark Messages get String Column Location dialog Text NON NLS 1 location Label set Font font location Text new Text composite SWT SINGLE SWT WRAP SWT READ ONLY SWT BORDER grid Data new Grid Data Grid Data FILL HORIZONTAL location Text set Layout Data grid Data location Text set Font font  createResourceArea getFont GridData gridData GridData GridData FILL_HORIZONTAL setLayoutData gridData GridLayout GridLayout numColumns setLayout resourceLabel resourceLabel setText BookmarkMessages getString ColumnResource dialogText resourceLabel setFont resourceText READ_ONLY gridData GridData GridData FILL_HORIZONTAL resourceText setLayoutData gridData resourceText setFont folderLabel folderLabel setText BookmarkMessages getString ColumnFolder dialogText folderLabel setFont folderText READ_ONLY gridData GridData GridData FILL_HORIZONTAL folderText setLayoutData gridData folderText setFont locationLabel locationLabel setText BookmarkMessages getString ColumnLocation dialogText locationLabel setFont locationText READ_ONLY gridData GridData GridData FILL_HORIZONTAL locationText setLayoutData gridData locationText setFont
Updates the dialog from the marker state private void update Dialog From Marker if marker null update Dialog For New Marker return description Text set Text Marker Util get Message marker if creation Time null creation Time set Text Marker Util get Creation Time marker if resource Text null resource Text set Text Marker Util get Resource Name marker if folder Text null folder Text set Text Marker Util get Container Name marker if location Text null int line Marker Util get Line Number marker if line 0 location Text set Text NON NLS 1 else location Text set Text Bookmark Messages format Line Indicator text new String String value Of line NON NLS 1 description Text select All  updateDialogFromMarker updateDialogForNewMarker descriptionText setText MarkerUtil getMessage creationTime creationTime setText MarkerUtil getCreationTime resourceText resourceText setText MarkerUtil getResourceName folderText folderText setText MarkerUtil getContainerName locationText MarkerUtil getLineNumber locationText setText locationText setText BookmarkMessages LineIndicator valueOf descriptionText selectAll
void update Dialog For New Marker if resource null resource Text set Text resource get Name I Path path resource get Full Path int n path segment Count 1 n is the number of segments in container not path if n 0 int len 0 for int i 0 i n i len path segment i length account for s if n 1 len n 1 String Buffer sb new String Buffer len for int i 0 i n i if i 0 sb append sb append path segment i folder Text set Text sb to String if initial Attributes null Object description initial Attributes get I Marker MESSAGE if description null description instanceof String description Text set Text String description description Text select All Object line initial Attributes get I Marker LINE NUMBER if line null line instanceof Integer location Text set Text Bookmark Messages format Line Indicator text new String line to String NON NLS 1  updateDialogForNewMarker resourceText setText getName IPath getFullPath segmentCount StringBuffer StringBuffer folderText setText toString initialAttributes initialAttributes IMarker descriptionText setText descriptionText selectAll initialAttributes IMarker LINE_NUMBER locationText setText BookmarkMessages LineIndicator toString
Method declared on Dialog protected void ok Pressed save Changes super ok Pressed  okPressed saveChanges okPressed
private void mark Dirty dirty true  markDirty
private boolean is Dirty return dirty  isDirty
Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception if marker null create Marker else if is Dirty update Marker  ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException createMarker isDirty updateMarker
Saves the changes made in the dialog if needed Creates a new bookmark if needed Updates the existing bookmark only if there have been changes private void save Changes try Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception if marker null create Marker else if is Dirty update Marker null catch Core Exception e Error Dialog open Error get Shell Bookmark Messages get String Error null e get Status NON NLS 1 return  saveChanges ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException createMarker isDirty updateMarker CoreException ErrorDialog openError getShell BookmarkMessages getString getStatus
Creates or updates the marker Must be called within a workspace runnable private void update Marker throws Core Exception Set the marker attributes from the current dialog field values Do not use set Attributes Map as that overwrites any attributes not covered by the dialog Map attrs get Marker Attributes From Dialog for Iterator i attrs key Set iterator i has Next String key String i next Object val attrs get key marker set Attribute key val  updateMarker CoreException setAttributes getMarkerAttributesFromDialog keySet hasNext setAttribute
Returns the marker attributes to save back to the marker based on the current dialog fields private Map get Marker Attributes From Dialog Map attribs new Hash Map attribs put I Marker MESSAGE description Text get Text return attribs  getMarkerAttributesFromDialog HashMap IMarker descriptionText getText
private void create Marker if resource null resource instanceof I File return I File file I File resource try I Marker new Marker file create Marker I Marker BOOKMARK if initial Attributes null new Marker set Attributes initial Attributes String message description Text get Text new Marker set Attribute I Marker MESSAGE message catch Core Exception e  createMarker IFile IFile IFile IMarker newMarker createMarker IMarker initialAttributes newMarker setAttributes initialAttributes descriptionText getText newMarker setAttribute IMarker CoreException

ASCENDING creation time public Bookmark Sorter reset State  BookmarkSorter resetState
public void reverse Top Priority directions priorities 0 1  reverseTopPriority
public void set Top Priority int priority if priority 0 priority priorities length return int index 1 for int i 0 i priorities length i if priorities i priority index i if index 1 reset State return shift the array for int i index i 0 i priorities i priorities i 1 priorities 0 priority directions priority DEFAULT DIRECTIONS priority  setTopPriority resetState DEFAULT_DIRECTIONS
public void set Top Priority Direction int direction if direction ASCENDING direction DESCENDING directions priorities 0 direction  setTopPriorityDirection
public int get Top Priority Direction return directions priorities 0  getTopPriorityDirection
public int get Top Priority return priorities 0  getTopPriority
public int get Priorities return priorities  getPriorities
public void reset State priorities new int DEFAULT PRIORITIES length System arraycopy DEFAULT PRIORITIES 0 priorities 0 priorities length directions new int DEFAULT DIRECTIONS length System arraycopy DEFAULT DIRECTIONS 0 directions 0 directions length  resetState DEFAULT_PRIORITIES DEFAULT_PRIORITIES DEFAULT_DIRECTIONS DEFAULT_DIRECTIONS
private int compare I Marker marker1 I Marker marker2 int depth if depth priorities length return 0 int column priorities depth switch column case DESCRIPTION String desc1 marker1 get Attribute I Marker MESSAGE NON NLS 1 String desc2 marker2 get Attribute I Marker MESSAGE NON NLS 1 int result collator compare desc1 desc2 if result 0 return compare marker1 marker2 depth 1 return result directions column case RESOURCE String res1 marker1 get Resource get Name String res2 marker2 get Resource get Name int result collator compare res1 res2 if result 0 return compare marker1 marker2 depth 1 return result directions column case FOLDER String folder1 Bookmark Label Provider get Container Name marker1 String folder2 Bookmark Label Provider get Container Name marker2 int result collator compare folder1 folder2 if result 0 return compare marker1 marker2 depth 1 return result directions column case LOCATION int line1 marker1 get Attribute I Marker LINE NUMBER 1 int line2 marker2 get Attribute I Marker LINE NUMBER 1 int result line1 line2 if result 0 return compare marker1 marker2 depth 1 return result directions column case CREATION TIME long result try result marker1 get Creation Time marker2 get Creation Time catch Core Exception e result 0 if result 0 return compare marker1 marker2 depth 1 return int result directions column return 0  IMarker IMarker getAttribute IMarker getAttribute IMarker getResource getName getResource getName BookmarkLabelProvider getContainerName BookmarkLabelProvider getContainerName getAttribute IMarker LINE_NUMBER getAttribute IMarker LINE_NUMBER CREATION_TIME getCreationTime getCreationTime CoreException
public int compare Viewer viewer Object e1 Object e2 I Marker marker1 I Marker e1 I Marker marker2 I Marker e2 return compare marker1 marker2 0  IMarker IMarker IMarker IMarker
public void save State I Dialog Settings settings if settings null return for int i 0 i priorities length i settings put priority i priorities i NON NLS 1 settings put direction i directions i NON NLS 1  saveState IDialogSettings
public void restore State I Dialog Settings settings if settings null return try for int i 0 i priorities length i priorities i settings get Int priority i NON NLS 1 directions i settings get Int direction i NON NLS 1 catch Number Format Exception e reset State  restoreState IDialogSettings getInt getInt NumberFormatException resetState

Creates the action public Copy Bookmark Action Bookmark Navigator bookmark Navigator super bookmark Navigator Bookmark Messages get String Copy Bookmark text NON NLS 1 Workbench Help set Help this I Bookmark Help Context Ids COPY BOOKMARK ACTION set Enabled false  CopyBookmarkAction BookmarkNavigator bookmarkNavigator bookmarkNavigator BookmarkMessages getString CopyBookmark WorkbenchHelp setHelp IBookmarkHelpContextIds COPY_BOOKMARK_ACTION setEnabled
Performs this action public void run Get the selected markers Bookmark Navigator bookmark Navigator get View Structured Viewer viewer bookmark Navigator get Viewer I Structured Selection selection I Structured Selection viewer get Selection if selection is Empty return List list selection to List I Marker markers new I Marker list size list to Array markers set Clipboard markers create Bookmark Report markers  BookmarkNavigator bookmarkNavigator getView StructuredViewer bookmarkNavigator getViewer IStructuredSelection IStructuredSelection getSelection isEmpty toList IMarker IMarker toArray setClipboard createBookmarkReport
Updates enablement based on the current selection public void selection Changed I Structured Selection sel set Enabled sel is Empty  selectionChanged IStructuredSelection setEnabled isEmpty
private void set Clipboard I Marker markers String marker Report try Place the markers on the clipboard Object data new Object markers marker Report Transfer transfer Types new Transfer Marker Transfer get Instance Text Transfer get Instance set the clipboard contents get View get Clipboard set Contents data transfer Types catch SWT Error e if e code DND ERROR CANNOT SET CLIPBOARD throw e if Message Dialog open Question get View get Shell Bookmark Messages get String Copy To Clipboard Problem Dialog title Bookmark Messages get String Copy To Clipboard Problem Dialog message NON NLS 1 NON NLS 2 set Clipboard markers marker Report  setClipboard IMarker markerReport markerReport transferTypes MarkerTransfer getInstance TextTransfer getInstance getView getClipboard setContents transferTypes SWTError ERROR_CANNOT_SET_CLIPBOARD MessageDialog openQuestion getView getShell BookmarkMessages getString CopyToClipboardProblemDialog BookmarkMessages getString CopyToClipboardProblemDialog setClipboard markerReport
private String create Bookmark Report I Marker markers String report NON NLS 1 write header report Bookmark Messages get String Column Description header t NON NLS 1 report Bookmark Messages get String Column Resource header t NON NLS 1 report Bookmark Messages get String Column Folder header t NON NLS 1 report Bookmark Messages get String Column Location header NON NLS 1 report System get Property line separator NON NLS 1 write markers for int i 0 i markers length i report Marker Util get Message markers i t report Marker Util get Resource Name markers i t report Marker Util get Container Name markers i t int line Marker Util get Line Number markers i report Bookmark Messages format Line Indicator text new String String value Of line NON NLS 1 report System get Property line separator NON NLS 1 return report  createBookmarkReport IMarker BookmarkMessages getString ColumnDescription BookmarkMessages getString ColumnResource BookmarkMessages getString ColumnFolder BookmarkMessages getString ColumnLocation getProperty MarkerUtil getMessage MarkerUtil getResourceName MarkerUtil getContainerName MarkerUtil getLineNumber BookmarkMessages LineIndicator valueOf getProperty

protected Edit Bookmark Action Bookmark Navigator view super view Bookmark Messages get String Properties text NON NLS 1 Workbench Help set Help this I Bookmark Help Context Ids BOOKMARK PROPERTIES ACTION set Enabled false  EditBookmarkAction BookmarkNavigator BookmarkMessages getString WorkbenchHelp setHelp IBookmarkHelpContextIds BOOKMARK_PROPERTIES_ACTION setEnabled
private I Marker marker public void run if marker null edit Bookmark  IMarker editBookmark
Sets marker to the current selection if the selection is an instance of code org eclipse core resources I Marker code and the selected marker s resource is an instance of code org eclipse core resources I File code Otherwise sets marker to null public void selection Changed I Structured Selection selection marker null set Enabled false if selection size 1 return Object o selection get First Element if o instanceof I Marker return I Marker selected Marker I Marker o I Resource resource selected Marker get Resource if resource instanceof I File marker selected Marker set Enabled true  IMarker IFile selectionChanged IStructuredSelection setEnabled getFirstElement IMarker IMarker selectedMarker IMarker IResource selectedMarker getResource IFile selectedMarker setEnabled
new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception Bookmark Properties Dialog dialog new Bookmark Properties Dialog get View get Site get Shell dialog set Marker marker dialog open  IWorkspaceRunnable IProgressMonitor CoreException BookmarkPropertiesDialog BookmarkPropertiesDialog getView getSite getShell setMarker
private void edit Bookmark I File file I File marker get Resource try file get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception Bookmark Properties Dialog dialog new Bookmark Properties Dialog get View get Site get Shell dialog set Marker marker dialog open null catch Core Exception e IDE Workbench Plugin log null e get Status We don t care  editBookmark IFile IFile getResource getWorkspace IWorkspaceRunnable IProgressMonitor CoreException BookmarkPropertiesDialog BookmarkPropertiesDialog getView getSite getShell setMarker CoreException IDEWorkbenchPlugin getStatus

Don t allow instantiation private Marker Util  MarkerUtil
Returns the ending character offset of the given marker static int get Char End I Marker marker return marker get Attribute I Marker CHAR END 1  getCharEnd IMarker getAttribute IMarker CHAR_END
Returns the starting character offset of the given marker static int get Char Start I Marker marker return marker get Attribute I Marker CHAR START 1  getCharStart IMarker getAttribute IMarker CHAR_START
Returns the container name if it is defined or empty string if not static String get Container Name I Marker marker I Path path marker get Resource get Full Path int n path segment Count 1 n is the number of segments in container not path if n 0 return NON NLS 1 int len 0 for int i 0 i n i len path segment i length account for s if n 1 len n 1 String Buffer sb new String Buffer len for int i 0 i n i if i 0 sb append sb append path segment i return sb to String  getContainerName IMarker IPath getResource getFullPath segmentCount StringBuffer StringBuffer toString
Returns the line number of the given marker static int get Line Number I Marker marker return marker get Attribute I Marker LINE NUMBER 1  getLineNumber IMarker getAttribute IMarker LINE_NUMBER
Returns the text for the location field static String get Location I Marker marker return marker get Attribute I Marker LOCATION NON NLS 1  getLocation IMarker getAttribute IMarker
Returns the message attribute of the given marker or the empty string if the message attribute is not defined static String get Message I Marker marker return marker get Attribute I Marker MESSAGE NON NLS 1  getMessage IMarker getAttribute IMarker
Returns the numeric value of the given string which is assumed to represent a numeric value return code true code if numeric code false code if not static int get Numeric Value String value boolean negative false int i 0 int len value length skip any leading workaround for 1GCE69U ITPJCORE ALL Java problems should not have in location if i len value char At i i if i len value char At i negative true i int result 0 while i len int digit Character digit value char At i 10 if digit 0 return result result result 10 digit if negative result result return result  getNumericValue charAt charAt charAt
Returns name if it is defined or blank string if not static String get Resource Name I Marker marker return marker get Resource get Name  getResourceName IMarker getResource getName
Returns the creation time of the marker as a string static String get Creation Time I Marker marker try return Date Format get Date Time Instance Date Format LONG Date Format MEDIUM format new Date marker get Creation Time catch Core Exception e return null  getCreationTime IMarker DateFormat getDateTimeInstance DateFormat DateFormat getCreationTime CoreException

public Open Bookmark Action Bookmark Navigator view super view Bookmark Messages get String Open Bookmark text NON NLS 1 set Tool Tip Text Bookmark Messages get String Open Bookmark tool Tip NON NLS 1 Workbench Help set Help this I Bookmark Help Context Ids OPEN BOOKMARK ACTION set Enabled false  OpenBookmarkAction BookmarkNavigator BookmarkMessages getString OpenBookmark setToolTipText BookmarkMessages getString OpenBookmark toolTip WorkbenchHelp setHelp IBookmarkHelpContextIds OPEN_BOOKMARK_ACTION setEnabled
public void run I Workbench Page page get View get Site get Page for Iterator i get Structured Selection iterator i has Next I Marker marker I Marker i next try IDE open Editor page marker Open Strategy activate On Open catch Part Init Exception e Open an error style dialog for Part Init Exception by including any extra information from the nested Core Exception if present Check for a nested Core Exception Core Exception nested Exception null I Status status e get Status if status null status get Exception instanceof Core Exception nested Exception Core Exception status get Exception if nested Exception null Open an error dialog and include the extra status information from the nested Core Exception Error Dialog open Error get View get Shell Bookmark Messages get String Open Bookmark error Title NON NLS 1 e get Message nested Exception get Status else Open a regular error dialog since there is no extra information to display Message Dialog open Error get View get Shell Bookmark Messages get String Open Bookmark error Title NON NLS 1 e get Message  IWorkbenchPage getView getSite getPage getStructuredSelection hasNext IMarker IMarker openEditor OpenStrategy activateOnOpen PartInitException PartInitException CoreException CoreException CoreException nestedException IStatus getStatus getException CoreException nestedException CoreException getException nestedException CoreException ErrorDialog openError getView getShell BookmarkMessages getString OpenBookmark errorTitle getMessage nestedException getStatus MessageDialog openError getView getShell BookmarkMessages getString OpenBookmark errorTitle getMessage
public void selection Changed I Structured Selection sel set Enabled sel is Empty  selectionChanged IStructuredSelection setEnabled isEmpty

The constructor public Paste Bookmark Action Bookmark Navigator view super view Bookmark Messages get String Paste Bookmark text NON NLS 1 this view view Workbench Help set Help this I Bookmark Help Context Ids PASTE BOOKMARK ACTION set Enabled false  PasteBookmarkAction BookmarkNavigator BookmarkMessages getString PasteBookmark WorkbenchHelp setHelp IBookmarkHelpContextIds PASTE_BOOKMARK_ACTION setEnabled
view get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i marker Data length i Only paste tasks not problems if marker Data i get Type equals I Marker BOOKMARK continue Paste to the same resource as the original I Resource resource marker Data i get Resource Map attributes marker Data i get Attributes I Marker marker resource create Marker I Marker BOOKMARK marker set Attributes attributes new Markers add marker  getWorkspace IWorkspaceRunnable IProgressMonitor CoreException markerData markerData getType IMarker IResource markerData getResource markerData getAttributes IMarker createMarker IMarker setAttributes newMarkers
if new Markers size 0 view get Shell get Display async Exec new Runnable public void run view get Viewer set Selection new Structured Selection new Markers view update Paste Enablement  newMarkers getShell getDisplay asyncExec getViewer setSelection StructuredSelection newMarkers updatePasteEnablement
Copies the marker s from the clipboard to the bookmark navigator view public void run Get the markers from the clipboard Marker Transfer transfer Marker Transfer get Instance final I Marker marker Data I Marker view get Clipboard get Contents transfer if marker Data null return final Array List new Markers new Array List try view get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i marker Data length i Only paste tasks not problems if marker Data i get Type equals I Marker BOOKMARK continue Paste to the same resource as the original I Resource resource marker Data i get Resource Map attributes marker Data i get Attributes I Marker marker resource create Marker I Marker BOOKMARK marker set Attributes attributes new Markers add marker null catch Core Exception e Error Dialog open Error view get Shell Bookmark Messages get String Paste Bookmark error Title NON NLS 1 null e get Status return Need to do this in an async Exec even though we re in the UI thread here since the bookmark navigator updates itself with the addition in an async Exec which hasn t been processed yet Must be done outside I Workspace Runnable above since notification for add is sent after I Workspace Runnable is run if new Markers size 0 view get Shell get Display async Exec new Runnable public void run view get Viewer set Selection new Structured Selection new Markers view update Paste Enablement  MarkerTransfer MarkerTransfer getInstance IMarker markerData IMarker getClipboard getContents markerData ArrayList newMarkers ArrayList getWorkspace IWorkspaceRunnable IProgressMonitor CoreException markerData markerData getType IMarker IResource markerData getResource markerData getAttributes IMarker createMarker IMarker setAttributes newMarkers CoreException ErrorDialog openError getShell BookmarkMessages getString PasteBookmark errorTitle getStatus asyncExec asyncExec IWorkspaceRunnable IWorkspaceRunnable newMarkers getShell getDisplay asyncExec getViewer setSelection StructuredSelection newMarkers updatePasteEnablement

public Remove Bookmark Action Bookmark Navigator view super view Bookmark Messages get String Remove Bookmark text NON NLS 1 set Tool Tip Text Bookmark Messages get String Remove Bookmark tool Tip NON NLS 1 Workbench Help set Help this I Bookmark Help Context Ids REMOVE BOOKMARK ACTION set Enabled false  RemoveBookmarkAction BookmarkNavigator BookmarkMessages getString RemoveBookmark setToolTipText BookmarkMessages getString RemoveBookmark toolTip WorkbenchHelp setHelp IBookmarkHelpContextIds REMOVE_BOOKMARK_ACTION setEnabled
get View get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for Iterator iter sel iterator iter has Next Object o iter next if o instanceof I Marker I Marker marker I Marker o marker delete  getView getWorkspace IWorkspaceRunnable IProgressMonitor CoreException hasNext IMarker IMarker IMarker
Delete the marker selection public void run final I Structured Selection sel get Structured Selection if sel is Empty return try get View get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for Iterator iter sel iterator iter has Next Object o iter next if o instanceof I Marker I Marker marker I Marker o marker delete null catch Core Exception e Error Dialog open Error get View get Shell Bookmark Messages get String Remove Bookmark error Title null e get Status NON NLS 1  IStructuredSelection getStructuredSelection isEmpty getView getWorkspace IWorkspaceRunnable IProgressMonitor CoreException hasNext IMarker IMarker IMarker CoreException ErrorDialog openError getView getShell BookmarkMessages getString RemoveBookmark errorTitle getStatus
public void selection Changed I Structured Selection sel set Enabled sel is Empty  selectionChanged IStructuredSelection setEnabled isEmpty

public Select All Action Bookmark Navigator view super view Bookmark Messages get String Select All text NON NLS 1 set Tool Tip Text Bookmark Messages get String Select All tool Tip NON NLS 1 Workbench Help set Help this I Bookmark Help Context Ids SELECT ALL BOOKMARK ACTION set Enabled true  SelectAllAction BookmarkNavigator BookmarkMessages getString SelectAll setToolTipText BookmarkMessages getString SelectAll toolTip WorkbenchHelp setHelp IBookmarkHelpContextIds SELECT_ALL_BOOKMARK_ACTION setEnabled
public void run Viewer viewer get View get Viewer Control control viewer get Control if control instanceof Table Table control select All viewer set Selection viewer get Selection false  getView getViewer getControl selectAll setSelection getSelection

Creates a content outline view with no content outline pages public Content Outline super  ContentOutline
Method declared on I Selection Provider public void add Selection Changed Listener I Selection Changed Listener listener get Selection Provider add Selection Changed Listener listener  ISelectionProvider addSelectionChangedListener ISelectionChangedListener getSelectionProvider addSelectionChangedListener
protected I Page create Default Page Page Book book Message Page page new Message Page init Page page page create Control book page set Message default Text return page  IPage createDefaultPage PageBook MessagePage MessagePage initPage createControl setMessage defaultText
The code Page Book View code implementation of this code I Workbench Part code method creates a code Page Book code control with its default page showing public void create Part Control Composite parent super create Part Control parent Workbench Help set Help get Page Book CONTENT OUTLINE VIEW HELP CONTEXT ID  PageBookView IWorkbenchPart PageBook createPartControl createPartControl WorkbenchHelp setHelp getPageBook CONTENT_OUTLINE_VIEW_HELP_CONTEXT_ID
protected Page Rec do Create Page I Workbench Part part Try to get an outline page Object obj part get Adapter I Content Outline Page class if obj instanceof I Content Outline Page I Content Outline Page page I Content Outline Page obj if page instanceof I Page Book View Page init Page I Page Book View Page page page create Control get Page Book return new Page Rec part page There is no content outline return null  PageRec doCreatePage IWorkbenchPart getAdapter IContentOutlinePage IContentOutlinePage IContentOutlinePage IContentOutlinePage IPageBookViewPage initPage IPageBookViewPage createControl getPageBook PageRec
protected void do Destroy Page I Workbench Part part Page Rec rec I Content Outline Page page I Content Outline Page rec page page dispose rec dispose  doDestroyPage IWorkbenchPart PageRec IContentOutlinePage IContentOutlinePage
if key I Contributed Contents View class return new I Contributed Contents View public I Workbench Part get Contributing Part return get Contributing Editor  IContributedContentsView IContributedContentsView IWorkbenchPart getContributingPart getContributingEditor
public Object get Adapter Class key if key I Contributed Contents View class return new I Contributed Contents View public I Workbench Part get Contributing Part return get Contributing Editor return super get Adapter key  getAdapter IContributedContentsView IContributedContentsView IWorkbenchPart getContributingPart getContributingEditor getAdapter
protected I Workbench Part get Bootstrap Part I Workbench Page page get Site get Page if page null return page get Active Editor else return null  IWorkbenchPart getBootstrapPart IWorkbenchPage getSite getPage getActiveEditor
Returns the editor which contributed the current page to this view return the editor which contributed the current page or code null code if no editor contributed the current page private I Workbench Part get Contributing Editor return get Current Contributing Part  IWorkbenchPart getContributingEditor getCurrentContributingPart
Method declared on I Selection Provider public I Selection get Selection get the selection from the selection provider return get Selection Provider get Selection  ISelectionProvider ISelection getSelection getSelectionProvider getSelection
We only want to track editors protected boolean is Important I Workbench Part part We only care about editors return part instanceof I Editor Part  isImportant IWorkbenchPart IEditorPart
Treat this the same as part activation public void part Brought To Top I Workbench Part part part Activated part  partBroughtToTop IWorkbenchPart partActivated
Method declared on I Selection Provider public void remove Selection Changed Listener I Selection Changed Listener listener get Selection Provider remove Selection Changed Listener listener  ISelectionProvider removeSelectionChangedListener ISelectionChangedListener getSelectionProvider removeSelectionChangedListener
Method declared on I Selection Changed Listener public void selection Changed Selection Changed Event event get Selection Provider selection Changed event  ISelectionChangedListener selectionChanged SelectionChangedEvent getSelectionProvider selectionChanged
Method declared on I Selection Provider public void set Selection I Selection selection get Selection Provider set Selection selection  ISelectionProvider setSelection ISelection getSelectionProvider setSelection
The code Content Outline code implementation of this code Page Book View code method extends the behavior of its parent to use the current page as a selection provider param page Rec the page record containing the page to show protected void show Page Rec Page Rec page Rec I Page Site page Site get Page Site page Rec page I Selection Provider provider page Site get Selection Provider if provider null page Rec page instanceof I Content Outline Page This means that the page did not set a provider during its initialization so for backward compatibility we will set the page itself as the provider page Site set Selection Provider I Content Outline Page page Rec page super show Page Rec page Rec  ContentOutline PageBookView pageRec showPageRec PageRec pageRec IPageSite pageSite getPageSite pageRec ISelectionProvider pageSite getSelectionProvider pageRec IContentOutlinePage pageSite setSelectionProvider IContentOutlinePage pageRec showPageRec pageRec

private Tree Viewer tree Viewer Create a new content outline page protected Content Outline Page super  TreeViewer treeViewer ContentOutlinePage
Method declared on I Selection Provider public void add Selection Changed Listener I Selection Changed Listener listener selection Changed Listeners add listener  ISelectionProvider addSelectionChangedListener ISelectionChangedListener selectionChangedListeners
The code Content Outline Page code implementation of this code I Content Outline Page code method creates a tree viewer Subclasses must extend this method configure the tree viewer with a proper content provider label provider and input element param parent public void create Control Composite parent tree Viewer new Tree Viewer parent SWT MULTI SWT H SCROLL SWT V SCROLL tree Viewer add Selection Changed Listener this  ContentOutlinePage IContentOutlinePage createControl treeViewer TreeViewer H_SCROLL V_SCROLL treeViewer addSelectionChangedListener
final I Selection Changed Listener l I Selection Changed Listener listeners i Platform run new Safe Runnable public void run l selection Changed event  ISelectionChangedListener ISelectionChangedListener SafeRunnable selectionChanged
Fires a selection changed event param selection the new selection protected void fire Selection Changed I Selection selection create an event final Selection Changed Event event new Selection Changed Event this selection fire the event Object listeners selection Changed Listeners get Listeners for int i 0 i listeners length i final I Selection Changed Listener l I Selection Changed Listener listeners i Platform run new Safe Runnable public void run l selection Changed event  fireSelectionChanged ISelection SelectionChangedEvent SelectionChangedEvent selectionChangedListeners getListeners ISelectionChangedListener ISelectionChangedListener SafeRunnable selectionChanged
public Control get Control if tree Viewer null return null return tree Viewer get Control  getControl treeViewer treeViewer getControl
public I Selection get Selection if tree Viewer null return Structured Selection EMPTY return tree Viewer get Selection  ISelection getSelection treeViewer StructuredSelection treeViewer getSelection
Returns this page s tree viewer return this page s tree viewer or code null code if code create Control code has not been called yet protected Tree Viewer get Tree Viewer return tree Viewer  createControl TreeViewer getTreeViewer treeViewer
see org eclipse ui part I Page Book View Page init org eclipse ui part I Page Site public void init I Page Site page Site super init page Site page Site set Selection Provider this  IPageBookViewPage IPageSite IPageSite pageSite pageSite pageSite setSelectionProvider
Method declared on I Selection Provider public void remove Selection Changed Listener I Selection Changed Listener listener selection Changed Listeners remove listener  ISelectionProvider removeSelectionChangedListener ISelectionChangedListener selectionChangedListeners
Gives notification that the tree selection has changed public void selection Changed Selection Changed Event event fire Selection Changed event get Selection  selectionChanged SelectionChangedEvent fireSelectionChanged getSelection
Sets focus to a part in the page public void set Focus tree Viewer get Control set Focus  setFocus treeViewer getControl setFocus
Method declared on I Selection Provider public void set Selection I Selection selection if tree Viewer null tree Viewer set Selection selection  ISelectionProvider setSelection ISelection treeViewer treeViewer setSelection

Constructs a new action for the specified frame list param frame List the frame list public Back Action Frame List frame List super frame List set Text Frame List Messages get String Back text NON NLS 1 I Shared Images images PlatformUI get Workbench get Shared Images set Image Descriptor images get Image Descriptor I Shared Images IMG TOOL BACK set Disabled Image Descriptor images get Image Descriptor I Shared Images IMG TOOL BACK DISABLED Workbench Help set Help this I Frame List Help Context Ids BACK ACTION update  frameList BackAction FrameList frameList frameList setText FrameListMessages getString ISharedImages getWorkbench getSharedImages setImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_BACK setDisabledImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_BACK_DISABLED WorkbenchHelp setHelp IFrameListHelpContextIds BACK_ACTION
private Frame get Previous Frame Frame List list get Frame List return list get Frame list get Current Index 1  getPreviousFrame FrameList getFrameList getFrame getCurrentIndex
private String get Tool Tip Text Frame previous Frame if previous Frame null String text previous Frame get Tool Tip Text if text null text length 0 return Frame List Messages format Back tool Tip One Arg new Object text NON NLS 1 return Frame List Messages get String Back tool Tip NON NLS 1  getToolTipText previousFrame previousFrame previousFrame getToolTipText FrameListMessages toolTipOneArg FrameListMessages getString toolTip
Calls code back code on the frame list public void run get Frame List back  getFrameList
Updates this action s enabled state and tool tip text This action is enabled only when there is a previous frame in the frame list The tool tip text is Back to plus the tool tip text for the previous frame public void update super update Frame previous Frame get Previous Frame set Enabled previous Frame null set Tool Tip Text get Tool Tip Text previous Frame  previousFrame getPreviousFrame setEnabled previousFrame setToolTipText getToolTipText previousFrame

Constructs a new action for the specified frame list param frame List the frame list public Forward Action Frame List frame List super frame List set Text Frame List Messages get String Forward text NON NLS 1 I Shared Images images PlatformUI get Workbench get Shared Images set Image Descriptor images get Image Descriptor I Shared Images IMG TOOL FORWARD set Disabled Image Descriptor images get Image Descriptor I Shared Images IMG TOOL FORWARD DISABLED Workbench Help set Help this I Frame List Help Context Ids FORWARD ACTION update  frameList ForwardAction FrameList frameList frameList setText FrameListMessages getString ISharedImages getWorkbench getSharedImages setImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_FORWARD setDisabledImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_FORWARD_DISABLED WorkbenchHelp setHelp IFrameListHelpContextIds FORWARD_ACTION
private Frame get Next Frame Frame List list get Frame List return list get Frame list get Current Index 1  getNextFrame FrameList getFrameList getFrame getCurrentIndex
private String get Tool Tip Text Frame next Frame if next Frame null String text next Frame get Tool Tip Text if text null text length 0 return Frame List Messages format Forward tool Tip One Arg new Object text NON NLS 1 return Frame List Messages get String Forward tool Tip NON NLS 1  getToolTipText nextFrame nextFrame nextFrame getToolTipText FrameListMessages toolTipOneArg FrameListMessages getString toolTip
Calls code forward code on the frame list public void run get Frame List forward  getFrameList
Updates this action s enabled state and tool tip text This action is enabled only when there is a next frame in the frame list The tool tip text is Forward to plus the tool tip text for the next frame public void update super update Frame next Frame get Next Frame set Enabled next Frame null set Tool Tip Text get Tool Tip Text next Frame  nextFrame getNextFrame setEnabled nextFrame setToolTipText getToolTipText nextFrame

Constructs a new frame p This implementation does nothing public Frame 
Returns the index of the frame in the frame list Only valid once the frame has been added to the frame list return the index of the frame in the frame list public int get Index return index  getIndex
Returns the displayable name for the frame return the displayable name for the frame public String get Name return name  getName
Returns the frame list return the frame list public Frame List get Parent return parent  FrameList getParent
Returns the tool tip text to show for the frame This can form part of the tool tip for actions like the back and forward actions return the tool tip text to show for the frame public String get Tool Tip Text return tool Tip Text  getToolTipText toolTipText
Sets the index of the frame in the frame list Should only be called by the frame list param index the index of the frame in the frame list public void set Index int index this index index  setIndex
Sets the displayable name for the frame param name the displayable name public void set Name String name this name name  setName
Sets the frame list param parent the frame list public void set Parent Frame List parent this parent parent  setParent FrameList
Sets the tool tip text to show for the frame This can form part of the tool tip for actions like the back and forward actions param tool Tip Text the tool tip text to show for the frame public void set Tool Tip Text String tool Tip Text this tool Tip Text tool Tip Text  toolTipText setToolTipText toolTipText toolTipText toolTipText

private I Property Change Listener property Change Listener new I Property Change Listener public void property Change Property Change Event event Frame Action this handle Property Change event  IPropertyChangeListener propertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent FrameAction handlePropertyChange
Constructs a new action for the specified frame list and adds a property change listener on it param frame List the frame list protected Frame Action Frame List frame List this frame List frame List frame List add Property Change Listener property Change Listener  frameList FrameAction FrameList frameList frameList frameList frameList addPropertyChangeListener propertyChangeListener
Disposes this frame action This implementation removes the property change listener from the frame list public void dispose frame List remove Property Change Listener property Change Listener  frameList removePropertyChangeListener propertyChangeListener
Returns the frame list public Frame List get Frame List return frame List  FrameList getFrameList frameList
Returns the image descriptor with the given relative path static Image Descriptor get Image Descriptor String relative Path String icon Path icons full NON NLS 1 try AbstractUI Plugin plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID URL installURL plugin get Descriptor get InstallURL URL url new URL installURL icon Path relative Path return Image Descriptor create FromURL url catch MalformedURL Exception e should not happen return Image Descriptor get Missing Image Descriptor  ImageDescriptor getImageDescriptor relativePath iconPath AbstractUIPlugin AbstractUIPlugin getPlugin PLUGIN_ID getDescriptor getInstallURL iconPath relativePath ImageDescriptor createFromURL MalformedURLException ImageDescriptor getMissingImageDescriptor
Handles a property change event from the frame list This implementation calls code update code protected void handle Property Change Property Change Event event update  handlePropertyChange PropertyChangeEvent
Updates this action This implementation does nothing Most implementations will override this method public void update 

Creates a new frame list with the given source param source the frame source public Frame List I Frame Source source this source source Frame frame source get Frame I Frame Source CURRENT FRAME 0 frame set Parent this frame set Index 0 frames new Array List frames add frame current 0  FrameList IFrameSource getFrame IFrameSource CURRENT_FRAME setParent setIndex ArrayList
Adds a property change listener Has no effect if an identical listener is already registered param listener a property change listener public void add Property Change Listener I Property Change Listener listener property Listeners add listener  addPropertyChangeListener IPropertyChangeListener propertyListeners
Moves the frame pointer back by one Has no effect if there is no frame before the current one Fires a code P CURRENT FRAME code property change event public void back if current 0 set Current current 1  P_CURRENT_FRAME setCurrent
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 listeners property Listeners get Listeners for int i 0 i listeners length i I Property Change Listener listeners i property Change event  IPropertyChangeListener propertyChange firePropertyChange PropertyChangeEvent propertyListeners getListeners IPropertyChangeListener propertyChange
Moves the frame pointer forward by one Has no effect if there is no frame after the current one Fires a code P CURRENT FRAME code property change event public void forward if current frames size 1 set Current current 1  P_CURRENT_FRAME setCurrent
Returns the current frame Returns code null code if there is no current frame return the current frame or code null code public Frame get Current Frame return get Frame current  getCurrentFrame getFrame
Returns the index of the current frame return the index of the current frame public int get Current Index return current  getCurrentIndex
Returns the frame at the given index or code null code if the index is le 0 or ge code size code param index the index of the requested frame return the frame at the given index or code null code public Frame get Frame int index if index 0 index frames size return null return Frame frames get index  getFrame
Returns the frame source public I Frame Source get Source return source  IFrameSource getSource
Adds the given frame after the current frame and advances the pointer to the new frame Before doing so updates the current frame and removes any frames following the current frame Fires a code P CURRENT FRAME code property change event param frame the frame to add public void goto Frame Frame frame for int i frames size i current frames remove i frame set Parent this int index frames size frame set Index index frames add frame set Current index  P_CURRENT_FRAME gotoFrame setParent setIndex setCurrent
Removes a property change listener Has no effect if an identical listener is not registered param listener a property change listener public void remove Property Change Listener I Property Change Listener listener property Listeners remove listener  removePropertyChangeListener IPropertyChangeListener propertyListeners
Sets the current frame to the one with the given index Updates the old current frame and fires a code P CURRENT FRAME code property change event if the current frame changes param new Current the index of the frame void set Current int new Current Assert is True new Current 0 new Current frames size int old Current this current if old Current new Current update Current Frame this current new Current fire Property Change new Property Change Event this P CURRENT FRAME get Frame old Current get Frame new Current  P_CURRENT_FRAME newCurrent setCurrent newCurrent isTrue newCurrent newCurrent oldCurrent oldCurrent newCurrent updateCurrentFrame newCurrent firePropertyChange PropertyChangeEvent P_CURRENT_FRAME getFrame oldCurrent getFrame newCurrent
Sets the current frame to the frame with the given index Fires a code P CURRENT FRAME code property change event if the current frame changes public void set Current Index int index if index 1 index current set Current index  P_CURRENT_FRAME setCurrentIndex setCurrent
Returns the number of frames in the frame list public int size return frames size 
Replaces the current frame in this list with the current frame from the frame source No event is fired public void update Current Frame Assert is True current 0 Frame frame source get Frame I Frame Source CURRENT FRAME I Frame Source FULL CONTEXT frame set Parent this frame set Index current frames set current frame  updateCurrentFrame isTrue getFrame IFrameSource CURRENT_FRAME IFrameSource FULL_CONTEXT setParent setIndex

private static Resource Bundle bundle Resource Bundle get Bundle RESOURCE BUNDLE private Frame List Messages prevent instantiation of class  ResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE FrameListMessages
Returns the formatted message for the given key in the 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  MessageFormat getString
Returns the resource object with the given key in the 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  getString getString MissingResourceException

Constructs a new action for the specified frame list param frame List the frame list public Go Into Action Frame List frame List super frame List set Text Frame List Messages get String Go Into text NON NLS 1 set Tool Tip Text Frame List Messages get String Go Into tool Tip NON NLS 1 Workbench Help set Help this I Frame List Help Context Ids GO INTO ACTION update  frameList GoIntoAction FrameList frameList frameList setText FrameListMessages getString GoInto setToolTipText FrameListMessages getString GoInto toolTip WorkbenchHelp setHelp IFrameListHelpContextIds GO_INTO_ACTION
private Frame get Selection Frame int flags return get Frame List get Source get Frame I Frame Source SELECTION FRAME flags  getSelectionFrame getFrameList getSource getFrame IFrameSource SELECTION_FRAME
Calls code goto Frame code on the frame list with a frame representing the currently selected container public void run Frame selection Frame get Selection Frame I Frame Source FULL CONTEXT if selection Frame null get Frame List goto Frame selection Frame  gotoFrame selectionFrame getSelectionFrame IFrameSource FULL_CONTEXT selectionFrame getFrameList gotoFrame selectionFrame
Updates this action s enabled state This action is enabled only when there is a frame for the current selection public void update super update Frame selection Frame get Selection Frame 0 set Enabled selection Frame null  selectionFrame getSelectionFrame setEnabled selectionFrame

Returns a new frame describing the state of the source If the code FULL CONTEXT code flag is specified then the full context of the source should be captured by the frame Otherwise only the visible aspects of the frame such as the name and tool tip text will be used param which Frame one of the frame constants defined in this interface param flags a bit wise OR of the flag constants defined in this interface return a new frame describing the current state of the source  FULL_CONTEXT whichFrame

Constructs a frame for the specified tree viewer The frame s input name and tool tip text are not set param viewer the tree viewer public Tree Frame Abstract Tree Viewer viewer this viewer viewer  TreeFrame AbstractTreeViewer
Constructs a frame for the specified tree viewer The frame s input element is set to the specified input element The frame s name and tool tip text are set to the text for the input element as provided by the viewer s label provider param viewer the tree viewer param input the input element public Tree Frame Abstract Tree Viewer viewer Object input this viewer set Input input I Label Provider provider I Label Provider viewer get Label Provider String name provider get Text input set Name name set Tool Tip Text name  TreeFrame AbstractTreeViewer setInput ILabelProvider ILabelProvider getLabelProvider getText setName setToolTipText
Returns the expanded elements return the expanded elements public Object get Expanded Elements return expanded Elements  getExpandedElements expandedElements
Returns the input element return the input element public Object get Input return input  getInput
Returns the selection return the selection public I Selection get Selection return selection  ISelection getSelection
Returns the tree viewer return the tree viewer public Abstract Tree Viewer get Viewer return viewer  AbstractTreeViewer getViewer
Restore I Persistable Elements from the specified memento param memento memento to restore elements from return list of restored elements May be empty private List restore Elements I Memento memento I Memento element Mem memento get Children TAG ELEMENT List elements new Array List element Mem length for int i 0 i element Mem length i String factoryID element Mem i get String TAG FACTORY ID if factoryID null I Element Factory factory PlatformUI get Workbench get Element Factory factoryID if factory null elements add factory create Element element Mem i return elements  IPersistableElements restoreElements IMemento IMemento elementMem getChildren TAG_ELEMENT ArrayList elementMem elementMem elementMem getString TAG_FACTORY_ID IElementFactory getWorkbench getElementFactory createElement elementMem
Restore the frame from the specified memento param memento memento to restore frame from public void restore State I Memento memento I Memento child Mem memento get Child TAG FRAME INPUT if child Mem null return String factoryID child Mem get String TAG FACTORY ID I Adaptable frame Input null if factoryID null I Element Factory factory PlatformUI get Workbench get Element Factory factoryID if factory null frame Input factory create Element child Mem if frame Input null input frame Input I Memento expanded Mem memento get Child TAG EXPANDED if expanded Mem null List elements restore Elements expanded Mem expanded Elements Object elements to Array new Object elements size else expanded Elements new Object 0 I Memento selection Mem memento get Child TAG SELECTION if selection Mem null List elements restore Elements selection Mem selection new Structured Selection elements else selection Structured Selection EMPTY  restoreState IMemento IMemento childMem getChild TAG_FRAME_INPUT childMem childMem getString TAG_FACTORY_ID IAdaptable frameInput IElementFactory getWorkbench getElementFactory frameInput createElement childMem frameInput frameInput IMemento expandedMem getChild TAG_EXPANDED expandedMem restoreElements expandedMem expandedElements toArray expandedElements IMemento selectionMem getChild TAG_SELECTION selectionMem restoreElements selectionMem StructuredSelection StructuredSelection
Save the specified elements to the given memento The elements have to be adaptable to I Persistable Element param elements elements to persist param memento memento to persist elements in private void save Elements Object elements I Memento memento for int i 0 i elements length i if elements i instanceof I Adaptable I Persistable Element persistable I Persistable Element I Adaptable elements i get Adapter I Persistable Element class if persistable null I Memento element Mem memento create Child TAG ELEMENT element Mem put String TAG FACTORY ID persistable get Factory Id persistable save State element Mem  IPersistableElement saveElements IMemento IAdaptable IPersistableElement IPersistableElement IAdaptable getAdapter IPersistableElement IMemento elementMem createChild TAG_ELEMENT elementMem putString TAG_FACTORY_ID getFactoryId saveState elementMem
Save the frame state in the given memento param memento memento to persist the frame state in public void save State I Memento memento if input instanceof I Adaptable return I Persistable Element persistable I Persistable Element I Adaptable input get Adapter I Persistable Element class if persistable null I Memento frame Memento memento create Child TAG FRAME INPUT frame Memento put String TAG FACTORY ID persistable get Factory Id persistable save State frame Memento if expanded Elements length 0 I Memento expanded Mem memento create Child TAG EXPANDED save Elements expanded Elements expanded Mem always I Structured Selection since we only deal with tree viewers if selection instanceof I Structured Selection Object elements I Structured Selection selection to Array if elements length 0 I Memento selection Mem memento create Child TAG SELECTION save Elements elements selection Mem  saveState IMemento IAdaptable IPersistableElement IPersistableElement IAdaptable getAdapter IPersistableElement IMemento frameMemento createChild TAG_FRAME_INPUT frameMemento putString TAG_FACTORY_ID getFactoryId saveState frameMemento expandedElements IMemento expandedMem createChild TAG_EXPANDED saveElements expandedElements expandedMem IStructuredSelection IStructuredSelection IStructuredSelection toArray IMemento selectionMem createChild TAG_SELECTION saveElements selectionMem
Sets the input element param input the input element public void set Input Object input this input input  setInput
Sets the expanded elements param expanded Elements the expanded elements public void set Expanded Elements Object expanded Elements this expanded Elements expanded Elements  expandedElements setExpandedElements expandedElements expandedElements expandedElements
Sets the selection param selection the selection public void set Selection I Selection selection this selection selection  setSelection ISelection

Constructs a new tree viewer frame source for the specified tree viewer param viewer the tree viewer public Tree Viewer Frame Source Abstract Tree Viewer viewer this viewer viewer  TreeViewerFrameSource AbstractTreeViewer
public void connect To Frame List frame List frame List add Property Change Listener new I Property Change Listener public void property Change Property Change Event event Tree Viewer Frame Source this handle Property Change event  connectTo FrameList frameList frameList addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent TreeViewerFrameSource handlePropertyChange
Connects this source as a listener on the frame list so that when the current frame changes the viewer is updated public void connect To Frame List frame List frame List add Property Change Listener new I Property Change Listener public void property Change Property Change Event event Tree Viewer Frame Source this handle Property Change event  connectTo FrameList frameList frameList addPropertyChangeListener IPropertyChangeListener propertyChange PropertyChangeEvent TreeViewerFrameSource handlePropertyChange
Returns a new tree frame capturing the specified input element param input the input element return the tree frame protected Tree Frame create Frame Object input return new Tree Frame viewer input  TreeFrame createFrame TreeFrame
Updates the viewer in response to the current frame changing param frame the new value for the current frame protected void frame Changed Tree Frame frame viewer get Control set Redraw false viewer set Input frame get Input viewer set Expanded Elements frame get Expanded Elements viewer set Selection frame get Selection true viewer get Control set Redraw true  frameChanged TreeFrame getControl setRedraw setInput getInput setExpandedElements getExpandedElements setSelection getSelection getControl setRedraw
Returns the current frame param flags a bit wise OR of the frame source flag constants return the current frame protected Frame get Current Frame int flags Object input viewer get Input Tree Frame frame create Frame input if flags I Frame Source FULL CONTEXT 0 frame set Selection viewer get Selection frame set Expanded Elements viewer get Expanded Elements return frame  getCurrentFrame getInput TreeFrame createFrame IFrameSource FULL_CONTEXT setSelection getSelection setExpandedElements getExpandedElements
public Frame get Frame int which Frame int flags switch which Frame case I Frame Source CURRENT FRAME return get Current Frame flags case I Frame Source PARENT FRAME return get Parent Frame flags case I Frame Source SELECTION FRAME return get Selection Frame flags default return null  getFrame whichFrame whichFrame IFrameSource CURRENT_FRAME getCurrentFrame IFrameSource PARENT_FRAME getParentFrame IFrameSource SELECTION_FRAME getSelectionFrame
Returns the parent frame or code null code if there is no parent frame param flags a bit wise OR of the frame source flag constants return the parent frame or code null code protected Frame get Parent Frame int flags Object input viewer get Input I Tree Content Provider provider I Tree Content Provider viewer get Content Provider Object parent provider get Parent input if parent null return null else Tree Frame frame create Frame parent if flags I Frame Source FULL CONTEXT 0 frame set Selection viewer get Selection include current input in expanded set Object expanded viewer get Expanded Elements Object new Expanded new Object expanded length 1 System arraycopy expanded 0 new Expanded 0 expanded length new Expanded new Expanded length 1 input frame set Expanded Elements new Expanded return frame  getParentFrame getInput ITreeContentProvider ITreeContentProvider getContentProvider getParent TreeFrame createFrame IFrameSource FULL_CONTEXT setSelection getSelection getExpandedElements newExpanded newExpanded newExpanded newExpanded setExpandedElements newExpanded
Returns the frame for the selection or code null code if there is no frame for the selection param flags a bit wise OR of the frame source flag constants return the selection frame or code null code protected Frame get Selection Frame int flags I Structured Selection sel I Structured Selection viewer get Selection if sel size 1 Object o sel get First Element if viewer is Expandable o Tree Frame frame create Frame o if flags I Frame Source FULL CONTEXT 0 frame set Selection viewer get Selection frame set Expanded Elements viewer get Expanded Elements return frame return null  getSelectionFrame IStructuredSelection IStructuredSelection getSelection getFirstElement isExpandable TreeFrame createFrame IFrameSource FULL_CONTEXT setSelection getSelection setExpandedElements getExpandedElements
Returns the tree viewer return the tree viewer public Abstract Tree Viewer get Viewer return viewer  AbstractTreeViewer getViewer
Handles a property change event from the frame list Calls code frame Changed code when the current frame changes protected void handle Property Change Property Change Event event if Frame List P CURRENT FRAME equals event get Property frame Changed Tree Frame event get New Value  frameChanged handlePropertyChange PropertyChangeEvent FrameList P_CURRENT_FRAME getProperty frameChanged TreeFrame getNewValue

Constructs a new action for the specified frame list param frame List the frame list public Up Action Frame List frame List super frame List set Text Frame List Messages get String Up text NON NLS 1 I Shared Images images PlatformUI get Workbench get Shared Images set Image Descriptor images get Image Descriptor I Shared Images IMG TOOL UP set Disabled Image Descriptor images get Image Descriptor I Shared Images IMG TOOL UP DISABLED Workbench Help set Help this I Frame List Help Context Ids UP ACTION update  frameList UpAction FrameList frameList frameList setText FrameListMessages getString ISharedImages getWorkbench getSharedImages setImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_UP setDisabledImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_UP_DISABLED WorkbenchHelp setHelp IFrameListHelpContextIds UP_ACTION
Frame get Parent Frame int flags return get Frame List get Source get Frame I Frame Source PARENT FRAME flags  getParentFrame getFrameList getSource getFrame IFrameSource PARENT_FRAME
String get Tool Tip Text Frame parent Frame if parent Frame null String text parent Frame get Tool Tip Text if text null text length 0 return Frame List Messages format Up tool Tip One Arg new Object text NON NLS 1 return Frame List Messages get String Up tool Tip NON NLS 1  getToolTipText parentFrame parentFrame parentFrame getToolTipText FrameListMessages toolTipOneArg FrameListMessages getString toolTip
Calls code goto Frame code on the frame list with a frame representing the parent of the current input public void run Frame parent Frame get Parent Frame I Frame Source FULL CONTEXT if parent Frame null get Frame List goto Frame parent Frame  gotoFrame parentFrame getParentFrame IFrameSource FULL_CONTEXT parentFrame getFrameList gotoFrame parentFrame
Updates this action s enabled state and tool tip text This action is enabled only when there is a parent frame for the current frame in the frame list The tool tip text is Up to plus the tool tip text for the parent frame public void update super update Frame parent Frame get Parent Frame 0 set Enabled parent Frame null set Tool Tip Text get Tool Tip Text parent Frame  parentFrame getParentFrame setEnabled parentFrame setToolTipText getToolTipText parentFrame

public Action Add Global Task I Workbench Part part set Text Messages get String add Global Task Action title NON NLS 1 set Image Descriptor Image Factory get Image Descriptor ENABLED IMAGE PATH set Tool Tip Text Messages get String add Global Task Action tooltip NON NLS 1 this part part  ActionAddGlobalTask IWorkbenchPart setText getString addGlobalTaskAction setImageDescriptor ImageFactory getImageDescriptor ENABLED_IMAGE_PATH setToolTipText getString addGlobalTaskAction
public void run Dialog Task Properties dialog new Dialog Task Properties part get Site get Shell Messages get String add Global Task Dialog title NON NLS 1 dialog open  DialogTaskProperties DialogTaskProperties getSite getShell getString addGlobalTaskDialog

Creates the action public Action Copy Marker I Workbench Part part I Selection Provider provider super provider Messages get String copy Action title NON NLS 1 this part part set Image Descriptor PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG TOOL COPY set Enabled false  ActionCopyMarker IWorkbenchPart ISelectionProvider getString copyAction setImageDescriptor getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_TOOL_COPY setEnabled
Sets the clipboard that the marker s will be copied to param clipboard the clipboard void set Clipboard Clipboard clipboard this clipboard clipboard  setClipboard
Sets the properties to be added to the plain text marker report that will be copied to the clipboard param properties void set Properties I Field properties this properties properties  setProperties IField
Copies the selected I Marker objects to the clipboard If properties have been set also copies a plain text report of the selected markers to the clipboard public void run I Structured Selection selection get Structured Selection if selection null selection is Empty clipboard null return List list selection to List I Marker markers new I Marker list size list to Array markers set Clipboard markers create Marker Report markers  IMarker IStructuredSelection getStructuredSelection isEmpty toList IMarker IMarker toArray setClipboard createMarkerReport
Updates enablement based on the current selection public void selection Changed I Structured Selection selection set Enabled selection null selection is Empty  selectionChanged IStructuredSelection setEnabled isEmpty
private void set Clipboard I Marker markers String marker Report try Place the markers on the clipboard Object data Transfer transfer Types if marker Report null data new Object markers transfer Types new Transfer Marker Transfer get Instance else data new Object markers marker Report transfer Types new Transfer Marker Transfer get Instance Text Transfer get Instance clipboard set Contents data transfer Types catch SWT Error e if e code DND ERROR CANNOT SET CLIPBOARD throw e if Message Dialog open Question part get Site get Shell Messages get String Copy To Clipboard Problem Dialog title Messages get String Copy To Clipboard Problem Dialog message NON NLS 1 NON NLS 2 set Clipboard markers marker Report  setClipboard IMarker markerReport transferTypes markerReport transferTypes MarkerTransfer getInstance markerReport transferTypes MarkerTransfer getInstance TextTransfer getInstance setContents transferTypes SWTError ERROR_CANNOT_SET_CLIPBOARD MessageDialog openQuestion getSite getShell getString CopyToClipboardProblemDialog getString CopyToClipboardProblemDialog setClipboard markerReport
Creates a plain text report of the selected markers based on predefined properties param markers return the marker report String create Marker Report I Marker raw Markers Concrete Marker markers try markers Marker List create Markers raw Markers catch Core Exception e Error Dialog open Error part get Site get Shell Messages get String Error NON NLS 1 null e get Status return NON NLS 1 String Buffer report new String Buffer final String NEWLINE System get Property line separator NON NLS 1 final char DELIMITER t if properties null return null create header for int i 0 i properties length i report append properties i get Description if i properties length 1 report append NEWLINE else report append DELIMITER for int i 0 i markers length i Concrete Marker marker markers i for int j 0 j properties length j report append properties j get Value marker if j properties length 1 report append NEWLINE else report append DELIMITER return report to String  createMarkerReport IMarker rawMarkers ConcreteMarker MarkerList createMarkers rawMarkers CoreException ErrorDialog openError getSite getShell getString getStatus StringBuffer StringBuffer getProperty getDescription ConcreteMarker getValue toString

Constructs an Action Delete Completed instance param part param provider public Action Delete Completed Task View part I Selection Provider provider super provider Messages get String delete Completed Action title NON NLS 1 this part part set Enabled false  ActionDeleteCompleted ActionDeleteCompleted TaskView ISelectionProvider getString deleteCompletedAction setEnabled
Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor for int i 0 i completed size i I Marker marker I Marker completed get i try marker delete catch Core Exception e  ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor IMarker IMarker CoreException
public void run final List completed get Completed Tasks Check if there is anything to do if completed size 0 Message Dialog open Information part get Site get Shell Messages get String delete Completed Tasks dialog Title NON NLS 1 Messages get String delete Completed Tasks none Completed NON NLS 1 return String message if completed size 1 message Messages get String delete Completed Tasks permanent Singular NON NLS 1 else message Messages format delete Completed Tasks permanent Plural NON NLS 1 new Object new Integer completed size Verify if Message Dialog open Confirm part get Site get Shell Messages get String delete Completed Tasks dialog Title NON NLS 1 message return try Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor for int i 0 i completed size i I Marker marker I Marker completed get i try marker delete catch Core Exception e null catch Core Exception e Error Dialog open Error part get Site get Shell Messages get String delete Completed Tasks error Message null e get Status NON NLS 1  getCompletedTasks MessageDialog openInformation getSite getShell getString deleteCompletedTasks dialogTitle getString deleteCompletedTasks noneCompleted getString deleteCompletedTasks permanentSingular deleteCompletedTasks permanentPlural MessageDialog openConfirm getSite getShell getString deleteCompletedTasks dialogTitle ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor IMarker IMarker CoreException CoreException ErrorDialog openError getSite getShell getString deleteCompletedTasks errorMessage getStatus
private List get Completed Tasks List completed new Array List I Selection Provider sel get Selection Provider Marker List marker List part get Visible Markers Concrete Marker markers marker List to Array for int i 0 i markers length i Concrete Marker marker markers i if marker instanceof Task Marker Task Marker task Marker Task Marker marker if task Marker get Done 1 completed add task Marker get Marker return completed  getCompletedTasks ArrayList ISelectionProvider getSelectionProvider MarkerList markerList getVisibleMarkers ConcreteMarker markerList toArray ConcreteMarker TaskMarker TaskMarker taskMarker TaskMarker taskMarker getDone taskMarker getMarker
see org eclipse ui actions Selection Provider Action selection Changed org eclipse jface viewers I Structured Selection public void selection Changed I Structured Selection selection set Enabled selection is Empty  SelectionProviderAction selectionChanged IStructuredSelection selectionChanged IStructuredSelection setEnabled isEmpty

param provider public Action Mark Completed I Selection Provider provider super provider Messages get String mark Completed Action title NON NLS 1 set Enabled false  ActionMarkCompleted ISelectionProvider getString markCompletedAction setEnabled
Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor for Iterator iterator get Structured Selection iterator iterator has Next Object obj iterator next if obj instanceof I Marker I Marker marker I Marker obj try marker set Attribute I Marker DONE true catch Core Exception e  ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor getStructuredSelection hasNext IMarker IMarker IMarker setAttribute IMarker CoreException
public void run try Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor for Iterator iterator get Structured Selection iterator iterator has Next Object obj iterator next if obj instanceof I Marker I Marker marker I Marker obj try marker set Attribute I Marker DONE true catch Core Exception e null catch Core Exception e  ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor getStructuredSelection hasNext IMarker IMarker IMarker setAttribute IMarker CoreException CoreException
public void selection Changed I Structured Selection selection set Enabled false if selection null selection is Empty return for Iterator iterator selection iterator iterator has Next Object obj iterator next if obj instanceof I Marker return I Marker marker I Marker obj if marker get Attribute I Marker USER EDITABLE true return if marker get Attribute I Marker DONE false return set Enabled true  selectionChanged IStructuredSelection setEnabled isEmpty hasNext IMarker IMarker IMarker getAttribute IMarker USER_EDITABLE getAttribute IMarker setEnabled

public Action Marker Properties I Workbench Part part I Selection Provider provider super provider Messages get String properties Action title NON NLS 1 set Enabled false this part part  ActionMarkerProperties IWorkbenchPart ISelectionProvider getString propertiesAction setEnabled
public void run if is Enabled return Object obj get Structured Selection get First Element if obj instanceof I Marker return I Marker marker I Marker obj Dialog Marker Properties dialog new Dialog Marker Properties part get Site get Shell dialog set Marker marker dialog open  isEnabled getStructuredSelection getFirstElement IMarker IMarker IMarker DialogMarkerProperties DialogMarkerProperties getSite getShell setMarker
see org eclipse ui actions Selection Provider Action selection Changed org eclipse jface viewers I Structured Selection public void selection Changed I Structured Selection selection set Enabled selection null selection size 1  SelectionProviderAction selectionChanged IStructuredSelection selectionChanged IStructuredSelection setEnabled

public Action Open Marker I Workbench Part part I Selection Provider provider super provider Messages get String open Action title NON NLS 1 this part part set Image Descriptor Image Factory get Image Descriptor IMAGE PATH set Disabled Image Descriptor Image Factory get Image Descriptor DISABLED IMAGE PATH set Enabled false  ActionOpenMarker IWorkbenchPart ISelectionProvider getString openAction setImageDescriptor ImageFactory getImageDescriptor IMAGE_PATH setDisabledImageDescriptor ImageFactory getImageDescriptor DISABLED_IMAGE_PATH setEnabled
public void run I Structured Selection selection get Structured Selection if selection null selection size 1 return Object obj selection get First Element if obj instanceof I Marker return I Marker marker I Marker obj optimization if the active editor has the same input as the selected marker then Reveal Marker Action would have been run and we only need to activate the editor I Editor Part editor part get Site get Page get Active Editor if editor null I Editor Input input editor get Editor Input if input instanceof I File Editor Input I File file I File Editor Input input get File if marker get Resource equals file part get Site get Page activate editor if marker get Resource instanceof I File try IDE open Editor part get Site get Page marker Open Strategy activate On Open catch Part Init Exception e Open an error style dialog for Part Init Exception by including any extra information from the nested Core Exception if present Check for a nested Core Exception Core Exception nested Exception null I Status status e get Status if status null status get Exception instanceof Core Exception nested Exception Core Exception status get Exception if nested Exception null Open an error dialog and include the extra status information from the nested Core Exception Error Dialog open Error part get Site get Shell Messages get String Open Marker error Title NON NLS 1 e get Message nested Exception get Status else Open a regular error dialog since there is no extra information to display Message Dialog open Error part get Site get Shell Messages get String Open Marker error Title NON NLS 1 e get Message  IStructuredSelection getStructuredSelection getFirstElement IMarker IMarker IMarker RevealMarkerAction IEditorPart getSite getPage getActiveEditor IEditorInput getEditorInput IFileEditorInput IFile IFileEditorInput getFile getResource getSite getPage getResource IFile openEditor getSite getPage OpenStrategy activateOnOpen PartInitException PartInitException CoreException CoreException CoreException nestedException IStatus getStatus getException CoreException nestedException CoreException getException nestedException CoreException ErrorDialog openError getSite getShell getString OpenMarker errorTitle getMessage nestedException getStatus MessageDialog openError getSite getShell getString OpenMarker errorTitle getMessage
public void selection Changed I Structured Selection selection set Enabled selection null selection size 1  selectionChanged IStructuredSelection setEnabled

Creates the action public Action Paste Marker I Workbench Part part I Selection Provider provider super provider Messages get String paste Action title NON NLS 1 this part part this pastable Types new String 0 set Image Descriptor PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG TOOL PASTE set Enabled false  ActionPasteMarker IWorkbenchPart ISelectionProvider getString pasteAction pastableTypes setImageDescriptor getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_TOOL_PASTE setEnabled
void set Clipboard Clipboard clipboard this clipboard clipboard  setClipboard
Copies the marker s from the clipboard to the bookmark navigator view public void run Get the markers from the clipboard Marker Transfer transfer Marker Transfer get Instance I Marker marker Data I Marker clipboard get Contents transfer paste marker Data  MarkerTransfer MarkerTransfer getInstance IMarker markerData IMarker getContents markerData
Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i markers length i String type markers i get Type Paste to the same resource as the original I Resource resource markers i get Resource Map attributes markers i get Attributes I Marker marker resource create Marker type marker set Attributes attributes new Markers add marker  ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException getType IResource getResource getAttributes IMarker createMarker setAttributes newMarkers
if get Selection Provider null new Markers size 0 part get Site get Shell get Display async Exec new Runnable public void run get Selection Provider set Selection new Structured Selection new Markers  getSelectionProvider newMarkers getSite getShell getDisplay asyncExec getSelectionProvider setSelection StructuredSelection newMarkers
void paste final I Marker markers if markers null return final Array List new Markers new Array List try Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i markers length i String type markers i get Type Paste to the same resource as the original I Resource resource markers i get Resource Map attributes markers i get Attributes I Marker marker resource create Marker type marker set Attributes attributes new Markers add marker null catch Core Exception e Error Dialog open Error part get Site get Shell Messages get String Paste Marker error Title NON NLS 1 null e get Status return Need to do this in an async Exec even though we re in the UI thread here since the marker view updates itself with the addition in an async Exec which hasn t been processed yet Must be done outside I Workspace Runnable above since notification for add is sent after I Workspace Runnable is run if get Selection Provider null new Markers size 0 part get Site get Shell get Display async Exec new Runnable public void run get Selection Provider set Selection new Structured Selection new Markers  IMarker ArrayList newMarkers ArrayList ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException getType IResource getResource getAttributes IMarker createMarker setAttributes newMarkers CoreException ErrorDialog openError getSite getShell getString PasteMarker errorTitle getStatus asyncExec asyncExec IWorkspaceRunnable IWorkspaceRunnable getSelectionProvider newMarkers getSite getShell getDisplay asyncExec getSelectionProvider setSelection StructuredSelection newMarkers
void update Enablement set Enabled false if clipboard null return Paste if clipboard contains pastable markers Marker Transfer transfer Marker Transfer get Instance I Marker marker Data I Marker clipboard get Contents transfer if marker Data null marker Data length 1 pastable Types null return for int i 0 i marker Data length i try I Marker marker marker Data i if marker exists break boolean pastable false for int j 0 j pastable Types length j if marker is Subtype Of String pastable Types j pastable true break if pastable return if Util is Editable marker return catch Core Exception e return set Enabled true  updateEnablement setEnabled MarkerTransfer MarkerTransfer getInstance IMarker markerData IMarker getContents markerData markerData pastableTypes markerData IMarker markerData pastableTypes isSubtypeOf pastableTypes isEditable CoreException setEnabled
param strings void set Pastable Types String strings pastable Types strings  setPastableTypes pastableTypes

public Action Problem Properties I Workbench Part part I Selection Provider provider super provider Messages get String properties Action title NON NLS 1 set Enabled false this part part  ActionProblemProperties IWorkbenchPart ISelectionProvider getString propertiesAction setEnabled
public void run if is Enabled return Object obj get Structured Selection get First Element if obj instanceof I Marker return I Marker marker I Marker obj Dialog Marker Properties dialog new Dialog Problem Properties part get Site get Shell dialog set Marker marker dialog open  isEnabled getStructuredSelection getFirstElement IMarker IMarker IMarker DialogMarkerProperties DialogProblemProperties getSite getShell setMarker
see org eclipse ui actions Selection Provider Action selection Changed org eclipse jface viewers I Structured Selection public void selection Changed I Structured Selection selection set Enabled selection null selection size 1  SelectionProviderAction selectionChanged IStructuredSelection selectionChanged IStructuredSelection setEnabled

Creates the action public Action Remove Marker I Workbench Part part I Selection Provider provider super provider Messages get String delete Action title NON NLS 1 this part part set Image Descriptor PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG TOOL DELETE set Disabled Image Descriptor PlatformUI get Workbench get Shared Images get Image Descriptor I Shared Images IMG TOOL DELETE DISABLED set Tool Tip Text Messages get String delete Action tooltip NON NLS 1 set Enabled false  ActionRemoveMarker IWorkbenchPart ISelectionProvider getString deleteAction setImageDescriptor getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_TOOL_DELETE setDisabledImageDescriptor getWorkbench getSharedImages getImageDescriptor ISharedImages IMG_TOOL_DELETE_DISABLED setToolTipText getString deleteAction setEnabled
Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for Iterator iter selection iterator iter has Next Object o iter next if o instanceof I Marker I Marker marker I Marker o marker delete  ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException hasNext IMarker IMarker IMarker
Delete the marker selection public void run if is Enabled return final I Structured Selection selection get Structured Selection if selection is Empty return try Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for Iterator iter selection iterator iter has Next Object o iter next if o instanceof I Marker I Marker marker I Marker o marker delete null catch Core Exception e Error Dialog open Error part get Site get Shell Messages get String Remove Marker error Title null e get Status NON NLS 1  isEnabled IStructuredSelection getStructuredSelection isEmpty ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException hasNext IMarker IMarker IMarker CoreException ErrorDialog openError getSite getShell getString RemoveMarker errorTitle getStatus
public void selection Changed I Structured Selection selection set Enabled false if selection null selection is Empty return for Iterator iterator selection iterator iterator has Next Object obj iterator next if obj instanceof I Marker return I Marker marker I Marker obj if Util is Editable marker return set Enabled true  selectionChanged IStructuredSelection setEnabled isEmpty hasNext IMarker IMarker IMarker isEditable setEnabled

public Action Resolve Marker I Workbench Part part I Selection Provider provider super provider Messages get String resolve Marker Action title NON NLS 1 this part part set Enabled false  ActionResolveMarker IWorkbenchPart ISelectionProvider getString resolveMarkerAction setEnabled
Displays a list of resolutions and performs the selection public void run if is Enabled return I Marker marker get Marker if marker null return I Marker Resolution resolutions get Resolutions marker if resolutions length 0 Message Dialog open Information part get Site get Shell Messages get String resolve Marker Action dialog Title NON NLS 1 Messages get String resolve Marker Action no Resolutions Label NON NLS 1 return Marker Resolution Selection Dialog d new Marker Resolution Selection Dialog part get Site get Shell resolutions if d open Dialog OK return Object result d get Result if result null result length 0 I Marker Resolution result 0 run marker  isEnabled IMarker getMarker IMarkerResolution getResolutions MessageDialog openInformation getSite getShell getString resolveMarkerAction dialogTitle getString resolveMarkerAction noResolutionsLabel MarkerResolutionSelectionDialog MarkerResolutionSelectionDialog getSite getShell getResult IMarkerResolution
Returns the resolutions for the given marker param the marker for which to obtain resolutions return the resolutions for the selected marker private I Marker Resolution get Resolutions I Marker marker return IDE get Marker Help Registry get Resolutions marker  IMarkerResolution getResolutions IMarker getMarkerHelpRegistry getResolutions
Returns the selected marker may be code null code return the selected marker private I Marker get Marker I Structured Selection selection get Structured Selection only enable for single selection if selection size 1 return null return I Marker selection get First Element  IMarker getMarker IStructuredSelection getStructuredSelection IMarker getFirstElement
public void selection Changed I Structured Selection selection set Enabled false if selection size 1 return I Marker marker I Marker selection get First Element if marker null return set Enabled IDE get Marker Help Registry has Resolutions marker  selectionChanged IStructuredSelection setEnabled IMarker IMarker getFirstElement setEnabled getMarkerHelpRegistry hasResolutions

protected I Workbench Part part public Action Reveal Marker I Workbench Part part I Selection Provider provider super provider NON NLS 1 this part part  IWorkbenchPart ActionRevealMarker IWorkbenchPart ISelectionProvider
public void run I Structured Selection selection get Structured Selection Object obj selection get First Element if obj null obj instanceof I Marker return I Marker marker I Marker obj I Editor Part editor part get Site get Page get Active Editor if editor null return I Editor Input input editor get Editor Input if input instanceof I File Editor Input I File file I File Editor Input input get File if marker get Resource equals file try IDE open Editor part get Site get Page marker false catch Core Exception e  IStructuredSelection getStructuredSelection getFirstElement IMarker IMarker IMarker IEditorPart getSite getPage getActiveEditor IEditorInput getEditorInput IFileEditorInput IFile IFileEditorInput getFile getResource openEditor getSite getPage CoreException
public void selection Changed I Structured Selection selection set Enabled selection null selection size 1 if is Enabled run  selectionChanged IStructuredSelection setEnabled isEnabled

param provider public Action Select All Table Viewer provider super provider Messages get String select All Action title NON NLS 1 set Enabled true  ActionSelectAll TableViewer getString selectAllAction setEnabled
public void run Table Viewer viewer Table Viewer get Selection Provider Object elements I Structured Content Provider viewer get Content Provider get Elements viewer get Input Structured Selection new Selection new Structured Selection elements super get Selection Provider set Selection new Selection  TableViewer TableViewer getSelectionProvider IStructuredContentProvider getContentProvider getElements getInput StructuredSelection newSelection StructuredSelection getSelectionProvider setSelection newSelection
see org eclipse ui actions Selection Provider Action selection Changed org eclipse jface viewers I Structured Selection public void selection Changed I Structured Selection selection set Enabled selection is Empty  SelectionProviderAction selectionChanged IStructuredSelection selectionChanged IStructuredSelection setEnabled isEmpty

public Action Task Properties I Workbench Part part I Selection Provider provider super provider Messages get String properties Action title NON NLS 1 set Enabled false this part part  ActionTaskProperties IWorkbenchPart ISelectionProvider getString propertiesAction setEnabled
public void run if is Enabled return Object obj get Structured Selection get First Element if obj instanceof I Marker return I Marker marker I Marker obj Dialog Marker Properties dialog new Dialog Task Properties part get Site get Shell dialog set Marker marker dialog open  isEnabled getStructuredSelection getFirstElement IMarker IMarker IMarker DialogMarkerProperties DialogTaskProperties getSite getShell setMarker
see org eclipse ui actions Selection Provider Action selection Changed org eclipse jface viewers I Structured Selection public void selection Changed I Structured Selection selection set Enabled selection null selection size 1  SelectionProviderAction selectionChanged IStructuredSelection selectionChanged IStructuredSelection setEnabled

private String description public Bookmark Filter super new String I Marker BOOKMARK  BookmarkFilter IMarker
Returns true iff the given marker is accepted by this filter public boolean select Marker Concrete Marker marker return is Enabled super select Marker marker select By Description marker  selectMarker ConcreteMarker isEnabled selectMarker selectByDescription
private boolean select By Description Concrete Marker marker if description null description equals NON NLS 1 return true String marker Description marker get Description int index marker Description index Of description return contains index 0 index 0  selectByDescription ConcreteMarker markerDescription getDescription markerDescription indexOf
boolean get Contains return contains  getContains
String get Description return description  getDescription
void set Contains boolean contains this contains contains  setContains
void set Description String description this description description  setDescription
void reset State super reset State contains DEFAULT CONTAINS description DEFAULT DESCRIPTION  resetState resetState DEFAULT_CONTAINS DEFAULT_DESCRIPTION
public void restore State I Dialog Settings dialog Settings super restore State dialog Settings I Dialog Settings settings dialog Settings get Section TAG DIALOG SECTION if settings null String setting settings get TAG CONTAINS if setting null contains Boolean value Of setting boolean Value setting settings get TAG DESCRIPTION if setting null description new String setting  restoreState IDialogSettings dialogSettings restoreState dialogSettings IDialogSettings dialogSettings getSection TAG_DIALOG_SECTION TAG_CONTAINS valueOf booleanValue TAG_DESCRIPTION
public void save State I Dialog Settings dialog Settings super save State dialog Settings if dialog Settings null I Dialog Settings settings dialog Settings get Section TAG DIALOG SECTION if settings null settings dialog Settings add New Section TAG DIALOG SECTION settings put TAG CONTAINS contains settings put TAG DESCRIPTION description  saveState IDialogSettings dialogSettings saveState dialogSettings dialogSettings IDialogSettings dialogSettings getSection TAG_DIALOG_SECTION dialogSettings addNewSection TAG_DIALOG_SECTION TAG_CONTAINS TAG_DESCRIPTION

param to Copy public Bookmark Marker I Marker to Copy super to Copy  toCopy BookmarkMarker IMarker toCopy toCopy

private I Cell Modifier cell Modifier new I Cell Modifier public Object get Value Object element String property if element instanceof Concrete Marker I Marker MESSAGE equals property return Concrete Marker element get Description else return null  ICellModifier cellModifier ICellModifier getValue ConcreteMarker IMarker ConcreteMarker getDescription
public boolean can Modify Object element String property return true  canModify
public void modify Object element String property Object value if element instanceof Item Item item Item element Object data item get Data if data instanceof Concrete Marker I Marker marker Concrete Marker data get Marker try if marker get Attribute property equals value if I Marker MESSAGE equals property marker set Attribute I Marker MESSAGE value catch Core Exception e Error Dialog open Error get Site get Shell Messages get String error Modifying Bookmark null e get Status NON NLS 1  getData ConcreteMarker IMarker ConcreteMarker getMarker getAttribute IMarker setAttribute IMarker CoreException ErrorDialog openError getSite getShell getString errorModifyingBookmark getStatus
public void create Part Control Composite parent super create Part Control parent TODO Check for possible reliance on I Marker Table Viewer table Viewer get Viewer Cell Editor cell Editors new Cell Editor table Viewer get Table get Column Count Cell Editor description Cell Editor new Text Cell Editor table Viewer get Table cell Editors 0 description Cell Editor table Viewer set Cell Editors cell Editors table Viewer set Cell Modifier cell Modifier table Viewer set Column Properties TABLE COLUMN PROPERTIES cell Editor Action Handler new Cell Editor Action Handler get View Site get Action Bars cell Editor Action Handler add Cell Editor description Cell Editor cell Editor Action Handler set Copy Action copy Action cell Editor Action Handler set Paste Action paste Action cell Editor Action Handler set Delete Action delete Action cell Editor Action Handler set Select All Action select All Action  createPartControl createPartControl IMarker TableViewer tableViewer getViewer CellEditor cellEditors CellEditor tableViewer getTable getColumnCount CellEditor descriptionCellEditor TextCellEditor tableViewer getTable cellEditors descriptionCellEditor tableViewer setCellEditors cellEditors tableViewer setCellModifier cellModifier tableViewer setColumnProperties TABLE_COLUMN_PROPERTIES cellEditorActionHandler CellEditorActionHandler getViewSite getActionBars cellEditorActionHandler addCellEditor descriptionCellEditor cellEditorActionHandler setCopyAction copyAction cellEditorActionHandler setPasteAction pasteAction cellEditorActionHandler setDeleteAction deleteAction cellEditorActionHandler setSelectAllAction selectAllAction
public void dispose if cell Editor Action Handler null cell Editor Action Handler dispose super dispose  cellEditorActionHandler cellEditorActionHandler
public void init I View Site view Site I Memento memento throws Part Init Exception super init view Site memento I Dialog Settings dialog Settings get Dialog Settings bookmark Filter restore State dialog Settings  IViewSite viewSite IMemento PartInitException viewSite IDialogSettings dialogSettings getDialogSettings bookmarkFilter restoreState dialogSettings
public void save State I Memento memento I Dialog Settings dialog Settings get Dialog Settings bookmark Filter save State dialog Settings super save State memento  saveState IMemento IDialogSettings dialogSettings getDialogSettings bookmarkFilter saveState dialogSettings saveState
protected Column Layout Data get Default Column Layouts return DEFAULT COLUMN LAYOUTS  ColumnLayoutData getDefaultColumnLayouts DEFAULT_COLUMN_LAYOUTS
protected I Dialog Settings get Dialog Settings AbstractUI Plugin plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID I Dialog Settings workbench Settings plugin get Dialog Settings I Dialog Settings settings workbench Settings get Section TAG DIALOG SECTION if settings null settings workbench Settings add New Section TAG DIALOG SECTION return settings  IDialogSettings getDialogSettings AbstractUIPlugin AbstractUIPlugin getPlugin PLUGIN_ID IDialogSettings workbenchSettings getDialogSettings IDialogSettings workbenchSettings getSection TAG_DIALOG_SECTION workbenchSettings addNewSection TAG_DIALOG_SECTION
protected I Field get Hidden Fields return HIDDEN FIELDS  IField getHiddenFields HIDDEN_FIELDS
protected String get Root Types return ROOT TYPES  getRootTypes ROOT_TYPES
protected Object get Viewer Input return Resources Plugin get Workspace get Root  getViewerInput ResourcesPlugin getWorkspace getRoot
protected I Field get Visible Fields return VISIBLE FIELDS  IField getVisibleFields VISIBLE_FIELDS
public void set Selection I Structured Selection structured Selection boolean reveal TODO added because nick doesn t like public API inherited from internal classes super set Selection structured Selection reveal  setSelection IStructuredSelection structuredSelection setSelection structuredSelection
see org eclipse ui views markers internal Marker View get Marker Types protected String get Marker Types return new String I Marker BOOKMARK  MarkerView getMarkerTypes getMarkerTypes IMarker
public void open Filters Dialog Dialog Bookmark Filter dialog new Dialog Bookmark Filter get Site get Shell bookmark Filter if dialog open Window OK bookmark Filter Bookmark Filter dialog get Filter bookmark Filter save State get Dialog Settings refresh  openFiltersDialog DialogBookmarkFilter DialogBookmarkFilter getSite getShell bookmarkFilter bookmarkFilter BookmarkFilter getFilter bookmarkFilter saveState getDialogSettings
see org eclipse ui views markers internal Marker View get Filter protected Marker Filter get Filter return bookmark Filter  MarkerView getFilter MarkerFilter getFilter bookmarkFilter
see org eclipse ui views markers internal Marker View update Filter Selection org eclipse core resources I Resource protected void update Filter Selection I Resource resources bookmark Filter set Focus Resource resources  MarkerView updateFilterSelection IResource updateFilterSelection IResource bookmarkFilter setFocusResource

private I Marker marker public Concrete Marker I Marker to Copy marker to Copy refresh  IMarker ConcreteMarker IMarker toCopy toCopy
Clears any cached information This frees up some memory but will slow down the next comparison operation It is a good idea to call this on a set of markers after sorting them in order to reduce their memory cost public void clear Cache resource Name Key null description Key null in Folder Key null  clearCache resourceNameKey descriptionKey inFolderKey
Refresh the properties of this marker from the underlying I Marker instance public void refresh clear Cache description Util get Property I Marker MESSAGE marker resource Name marker get Resource get Name in Folder Util get Container Name marker line marker get Attribute I Marker LINE NUMBER 1 try creation Time marker get Creation Time catch Core Exception e creation Time 0 try type marker get Type catch Core Exception e1 type NON NLS 1  IMarker clearCache getProperty IMarker resourceName getResource getName inFolder getContainerName getAttribute IMarker LINE_NUMBER creationTime getCreationTime CoreException creationTime getType CoreException
public I Resource get Resource return marker get Resource  IResource getResource getResource
public String get Type return type  getType
public String get Description return description  getDescription
public Collation Key get Description Key if description Key null description Key Collator get Instance get Collation Key description return description Key  CollationKey getDescriptionKey descriptionKey descriptionKey getInstance getCollationKey descriptionKey
public String get Resource Name return resource Name  getResourceName resourceName
public Collation Key get Resource Name Key if resource Name Key null resource Name Key Collator get Instance get Collation Key resource Name return resource Name Key  CollationKey getResourceNameKey resourceNameKey resourceNameKey getInstance getCollationKey resourceName resourceNameKey
public int get Line return line  getLine
public String get Folder return in Folder  getFolder inFolder
public Collation Key get Folder Key if in Folder Key null in Folder Key Collator get Instance get Collation Key in Folder return in Folder Key  CollationKey getFolderKey inFolderKey inFolderKey getInstance getCollationKey inFolder inFolderKey
public long get Creation Time return creation Time  getCreationTime creationTime
public I Marker get Marker return marker  IMarker getMarker
public boolean equals Object object if object instanceof Concrete Marker return false Concrete Marker other Concrete Marker object return other get Marker equals get Marker  ConcreteMarker ConcreteMarker ConcreteMarker getMarker getMarker
public int hash Code return get Marker hash Code  hashCode getMarker hashCode

Constructor for Default Marker Resource Adapter Default Marker Resource Adapter super  DefaultMarkerResourceAdapter DefaultMarkerResourceAdapter
Return the default instance used for Marker View adapting static I Task List Resource Adapter get Default if singleton null singleton new Default Marker Resource Adapter return singleton  MarkerView ITaskListResourceAdapter getDefault DefaultMarkerResourceAdapter
see I Marker Resource Adapter get Affected Resource I Adaptable public I Resource get Affected Resource I Adaptable adaptable I Resource resource I Resource adaptable get Adapter I Resource class if resource null return I File adaptable get Adapter I File class else return resource  IMarkerResourceAdapter getAffectedResource IAdaptable IResource getAffectedResource IAdaptable IResource IResource getAdapter IResource IFile getAdapter IFile

Constructs a new Deferred Queue param viewer public Deferred Queue Table Viewer viewer this viewer viewer  DeferredQueue DeferredQueue TableViewer
Returns the set of items currently visible in the viewer read only return the set of processed items public Object get Visible Items synchronized visible Items return visible Items to Array  getVisibleItems visibleItems visibleItems toArray
Queues the given set of items to be refreshed in the viewer If there are any items in the viewer or its queues that compare as equal to one of these items the new item will replace the old one Should be run in a background thread param changes set if items to be refreshed in the viewer public void change Collection changes Iterator iter changes iterator while iter has Next Object next iter next boolean is Visible false synchronized visible Items if visible Items contains next visible Items remove next visible Items add next pending Changes add next is Visible true has Pending Changes true if is Visible if insertions In Middle contains next insertions In Middle remove next insertions In Middle add next has Pending Changes true else if insertions At End contains next insertions At End remove next insertions At End add next has Pending Changes true  hasNext isVisible visibleItems visibleItems visibleItems visibleItems pendingChanges isVisible hasPendingChanges isVisible insertionsInMiddle insertionsInMiddle insertionsInMiddle hasPendingChanges insertionsAtEnd insertionsAtEnd insertionsAtEnd hasPendingChanges
Sets the desired contents of the viewer enqueueing any additions and removals necessary such that the final contents of the viewer will be as specified Should be run in a background thread If the given montor is canceled possibly in another thread the operation will be aborted without modifying the queue param new Pending Contents desired contents of the viewer param mon progress monitor public void set Collection new Pending Contents I Progress Monitor mon mon begin Task SETTING CONTENTS 100 Set of items in new Pending Contents that are not currently in visible Items Set new Insertions new Hash Set New pending Removals queue Set new Pending Removals new Hash Set New insertions In Middle queue Set new Insertions In Middle new Hash Set New insertions At End queue Set new Insertions At End new End Set add With Progress new Insertions new Pending Contents mon 5 synchronized visible Items add With Progress new Pending Removals visible Items mon 5 remove With Progress new Pending Removals new Insertions mon 5 remove With Progress new Insertions visible Items mon 5 if new Insertions is Empty new Pending Removals is Empty return Sub Progress Monitor sub new Sub Progress Monitor mon 80 Sort Util partition new Insertions In Middle new Insertions At End new Insertions At End new Insertions sort Order last Visible sub Do nothing if the operation was cancelled if mon is Canceled mon done return Now we ve computed everything Apply all the computed changes has Pending Changes true last Dirty false insertions At End clear insertions At End new Insertions At End insertions In Middle clear insertions In Middle new Insertions In Middle pending Removals clear pending Removals new Pending Removals mon done  newPendingContents newPendingContents IProgressMonitor beginTask SETTING_CONTENTS newPendingContents visibleItems newInsertions HashSet pendingRemovals newPendingRemovals HashSet insertionsInMiddle newInsertionsInMiddle HashSet insertionsAtEnd newInsertionsAtEnd newEndSet addWithProgress newInsertions newPendingContents visibleItems addWithProgress newPendingRemovals visibleItems removeWithProgress newPendingRemovals newInsertions removeWithProgress newInsertions visibleItems newInsertions isEmpty newPendingRemovals isEmpty SubProgressMonitor SubProgressMonitor SortUtil newInsertionsInMiddle newInsertionsAtEnd newInsertionsAtEnd newInsertions sortOrder lastVisible isCanceled hasPendingChanges lastDirty insertionsAtEnd insertionsAtEnd newInsertionsAtEnd insertionsInMiddle insertionsInMiddle newInsertionsInMiddle pendingRemovals pendingRemovals newPendingRemovals
Applies the next set of changes to the table Returns the number of items actually refreshed Must run in the UI thread param maximum To Change maximum number of queued changes to apply return the number of changes actually applied private int next Change int maximum To Change Collection result Sort Util remove First pending Changes maximum To Change viewer update result to Array null return result size  maximumToChange nextChange maximumToChange SortUtil removeFirst pendingChanges maximumToChange toArray
Applies the next set of removals from the table Must run in the UI thread param maximum To Remove maximum number of items to remove from the table return the number of items actually removed private int next Removal int maximum To Remove Array List result new Array List maximum To Remove int counter maximum To Remove Iterator iter pending Removals iterator while iter has Next counter 0 Object next iter next result add next if last Visible null last Visible equals next last Dirty true iter remove counter synchronized visible Items visible Items remove All result viewer remove result to Array if last Dirty last Visible viewer get Element At viewer get Table get Item Count 1 return result size  maximumToRemove nextRemoval maximumToRemove ArrayList ArrayList maximumToRemove maximumToRemove pendingRemovals hasNext lastVisible lastVisible lastDirty visibleItems visibleItems removeAll toArray lastDirty lastVisible getElementAt getTable getItemCount
Applies the next set of insertions into the middle of the queue param maximum To Insert return private int next Insertion In Middle int maximum To Insert refresh Queues new Null Progress Monitor Collection result Sort Util remove First insertions In Middle maximum To Insert synchronized visible Items visible Items add All result We manually compute the insertion position because setting a sorter on the viewer would force a refresh which can be very slow with a large number of items Iterator iter result iterator while iter has Next Object element iter next int insertion Pos get Insert Position element viewer insert element insertion Pos return result size  maximumToInsert nextInsertionInMiddle maximumToInsert refreshQueues NullProgressMonitor SortUtil removeFirst insertionsInMiddle maximumToInsert visibleItems visibleItems addAll hasNext insertionPos getInsertPosition insertionPos
Applies the next insertion at the end of the table Returns the number of items actually inserted param maximum To Insert maximum number of items to insert into the end of the table return the number of items actually inserted into the table private int next Insertion At End int maximum To Insert refresh Queues new Null Progress Monitor List result new Array List maximum To Insert Iterator iter insertions At End iterator for int counter 0 counter maximum To Insert iter has Next counter last Visible iter next result add last Visible iter remove synchronized visible Items visible Items add All result viewer add result to Array return result size  maximumToInsert nextInsertionAtEnd maximumToInsert refreshQueues NullProgressMonitor ArrayList maximumToInsert insertionsAtEnd maximumToInsert hasNext lastVisible lastVisible visibleItems visibleItems addAll toArray
Clears the set of visible items and reinserts everything from scratch public void reset synchronized visible Items visible Items remove All pending Removals insertions In Middle add All visible Items last Visible null last Dirty true visible Items clear pending Removals clear has Pending Changes true  visibleItems visibleItems removeAll pendingRemovals insertionsInMiddle addAll visibleItems lastVisible lastDirty visibleItems pendingRemovals hasPendingChanges
Returns true iff there are pending changes remaining to be applied return true iff there are pending changes to be applied to the table public boolean has Pending Changes return has Pending Changes  hasPendingChanges hasPendingChanges
Returns an estimate of the work remaining the result is meaningful with respect to the return value of next Update return an estimate of the work remaining public int work Remaining return pending Removals size insertions At End size insertions In Middle size pending Changes size  nextUpdate workRemaining pendingRemovals insertionsAtEnd insertionsInMiddle pendingChanges
Cancels all pending insertions and removals public void cancel Pending insertions At End clear insertions In Middle clear pending Removals clear has Pending Changes false  cancelPending insertionsAtEnd insertionsInMiddle pendingRemovals hasPendingChanges
public void set Comparator Comparator c if sort Order c return sort Order c last Visible null insertions In Middle add All insertions At End insertions At End new End Set last Dirty true reset  setComparator sortOrder sortOrder lastVisible insertionsInMiddle addAll insertionsAtEnd insertionsAtEnd newEndSet lastDirty
Applies any deferred sorting param mon public void refresh Queues I Progress Monitor mon if last Dirty if mon is Canceled return Hash Set new Insertions In Middle new Hash Set Sort Util partition new Insertions In Middle insertions At End insertions At End insertions In Middle sort Order last Visible mon if mon is Canceled insertions In Middle remove All insertions At End else insertions In Middle new Insertions In Middle last Dirty false  refreshQueues IProgressMonitor lastDirty isCanceled HashSet newInsertionsInMiddle HashSet SortUtil newInsertionsInMiddle insertionsAtEnd insertionsAtEnd insertionsInMiddle sortOrder lastVisible isCanceled insertionsInMiddle removeAll insertionsAtEnd insertionsInMiddle newInsertionsInMiddle lastDirty
Determines the insertion position for the given element in the table Note that this is essentially the same as Table Viewer get Insert Position but we need to do it here because if we set a sorter on the Table Viewer this will force a refresh of the table which can be extremely slow param element object whose insertion position is being computed return private int get Insert Position Object element Table table viewer get Table if sort Order null return table get Item Count int count table get Item Count int min 0 max count 1 while min max int mid min max 2 Object data table get Item mid get Data int compare sort Order compare data element if compare 0 find first item element while compare 0 mid if mid count break data table get Item mid get Data compare sort Order compare data element return mid if compare 0 min mid 1 else max mid 1 return min  TableViewer getInsertPosition TableViewer getInsertPosition getTable sortOrder getItemCount getItemCount getItem getData sortOrder getItem getData sortOrder
Performs a single update to the viewer Based on the contents of the pending queues items will either be removed added or refreshed in the viewer in that order This should only be called within a synchronized block since the various queues shouldn t be modified during an update This method is invoked repeatedly by jobs to gradually apply the pending changes public int next Update int pending Removals Size pending Removals size if pending Removals Size 0 int current Size count Visible Items Determine if we should remove incrementally or rebuild the table from scratch int final Size current Size pending Removals Size if final Size final Size 2 current Size current Size If we re removing enough items that it would be faster just to rebuild the table from scratch do it that way reset get Viewer refresh return 0 return next Removal next Update Size else if insertions In Middle size 0 return next Insertion In Middle next Update Size else if insertions At End size 0 return next Insertion At End MAX UPDATE else if pending Changes size 0 return next Change MAX UPDATE has Pending Changes false return 0  nextUpdate pendingRemovalsSize pendingRemovals pendingRemovalsSize currentSize countVisibleItems finalSize currentSize pendingRemovalsSize finalSize finalSize currentSize currentSize getViewer nextRemoval nextUpdateSize insertionsInMiddle nextInsertionInMiddle nextUpdateSize insertionsAtEnd nextInsertionAtEnd MAX_UPDATE pendingChanges nextChange MAX_UPDATE hasPendingChanges
return int count Visible Items synchronized visible Items return visible Items size  countVisibleItems visibleItems visibleItems
Returns the number of items that should be added or removed in the next incremental update This is used for the operations whose runtime increases with the size of the visible items return the number of changes that should be applied in the next update private int next Update Size int size GROWTH LIMIT MAX UPDATE MIN UPDATE GROWTH LIMIT count Visible Items MIN UPDATE return size  nextUpdateSize GROWTH_LIMIT MAX_UPDATE MIN_UPDATE GROWTH_LIMIT countVisibleItems MIN_UPDATE
Returns the Table Viewer that is being populated return the Table Viewer that is being modified public Table Viewer get Viewer return viewer  TableViewer TableViewer TableViewer getViewer
Returns a new empty set to be used for insertions At End return private Set new End Set if sort Order null return new Hash Set else return new Tree Set sort Order  insertionsAtEnd newEndSet sortOrder HashSet TreeSet sortOrder
Removes all the given items from the target collection and updates the given progress monitor by the given amount If the monitor is cancelled no changes are made to the target collection param target items will be removed from this collection param to Remove items to be removed from the collection param mon progress monitor to be updated param worked amount to update the monitor private static void remove With Progress Collection target Collection to Remove I Progress Monitor mon int worked if mon is Canceled return target remove All to Remove mon worked worked  toRemove removeWithProgress toRemove IProgressMonitor isCanceled removeAll toRemove
Inserts all the given items into the target collection and updates the progress monitor If the monitor is cancelled no changes will be made to the target param target collection into which items will be inserted param to Insert items to be inserted into the collection param mon progress monitor that will be updated param worked amount to update the progress monitor private static void add With Progress Collection target Collection to Insert I Progress Monitor mon int worked if mon is Canceled return target add All to Insert mon worked worked  toInsert addWithProgress toInsert IProgressMonitor isCanceled addAll toInsert
return public Comparator get Sorter return sort Order  getSorter sortOrder

combo add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE e detail SWT TRAVERSE RETURN e doit false  addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE TRAVERSE_RETURN
description set Layout Data data description add Modify Listener new Modify Listener public void modify Text Modify Event e Dialog Bookmark Filter this mark Dirty  setLayoutData addModifyListener ModifyListener modifyText ModifyEvent DialogBookmarkFilter markDirty
private String does Not Contain Messages get String filters Dialog does Not Contain NON NLS 1 public Description Group Composite parent description Label new Label parent SWT NONE description Label set Font parent get Font description Label set Text Messages get String filters Dialog description Label NON NLS 1 combo new Combo parent SWT READ ONLY combo set Font parent get Font combo add contains combo add does Not Contain combo add Selection Listener selection Listener Prevent Esc and Return from closing the dialog when the combo is active combo add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE e detail SWT TRAVERSE RETURN e doit false description new Text parent SWT SINGLE SWT BORDER description set Font parent get Font Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 3 description set Layout Data data description add Modify Listener new Modify Listener public void modify Text Modify Event e Dialog Bookmark Filter this mark Dirty  doesNotContain getString filtersDialog doesNotContain DescriptionGroup descriptionLabel descriptionLabel setFont getFont descriptionLabel setText getString filtersDialog descriptionLabel READ_ONLY setFont getFont doesNotContain addSelectionListener selectionListener addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE TRAVERSE_RETURN setFont getFont GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData addModifyListener ModifyListener modifyText ModifyEvent DialogBookmarkFilter markDirty
public boolean get Contains return combo get Selection Index combo index Of contains  getContains getSelectionIndex indexOf
public void set Contains boolean value if value combo select combo index Of contains else combo select combo index Of does Not Contain  setContains indexOf indexOf doesNotContain
public void set Description String text if text null description set Text NON NLS 1 else description set Text text  setDescription setText setText
public String get Description return description get Text  getDescription getText
public void update Enablement description Label set Enabled is Filter Enabled combo set Enabled is Filter Enabled description set Enabled is Filter Enabled  updateEnablement descriptionLabel setEnabled isFilterEnabled setEnabled isFilterEnabled setEnabled isFilterEnabled
param parent Shell param filter public Dialog Bookmark Filter Shell parent Shell Bookmark Filter filter super parent Shell filter  parentShell DialogBookmarkFilter parentShell BookmarkFilter parentShell
protected void create Attributes Area Composite parent Composite composite new Composite parent SWT NONE composite set Font parent get Font composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout layout new Grid Layout 5 false layout vertical Spacing 7 composite set Layout layout description Group new Description Group composite  createAttributesArea setFont getFont setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout verticalSpacing setLayout descriptionGroup DescriptionGroup
protected void update Filter FromUI Bookmark Filter filter Bookmark Filter get Filter filter set Contains description Group get Contains filter set Description description Group get Description trim super update Filter FromUI  updateFilterFromUI BookmarkFilter BookmarkFilter getFilter setContains descriptionGroup getContains setDescription descriptionGroup getDescription updateFilterFromUI
protected void updateUI From Filter Bookmark Filter filter Bookmark Filter get Filter description Group set Contains filter get Contains description Group set Description filter get Description super updateUI From Filter  updateUIFromFilter BookmarkFilter BookmarkFilter getFilter descriptionGroup setContains getContains descriptionGroup setDescription getDescription updateUIFromFilter
see org eclipse ui views markerview Filters Dialog update Enabled State protected void update Enabled State super update Enabled State description Group update Enablement  FiltersDialog updateEnabledState updateEnabledState updateEnabledState descriptionGroup updateEnablement
protected void reset Pressed description Group set Contains Bookmark Filter DEFAULT CONTAINS description Group set Description Bookmark Filter DEFAULT DESCRIPTION super reset Pressed  resetPressed descriptionGroup setContains BookmarkFilter DEFAULT_CONTAINS descriptionGroup setDescription BookmarkFilter DEFAULT_DESCRIPTION resetPressed

see org eclipse jface viewers I Table Label Provider get Column Image java lang Object int public Image get Column Image Object element int column Index return null  ITableLabelProvider getColumnImage getColumnImage columnIndex
public String get Column Text Object element int column Index if element instanceof Marker Type return NON NLS 1 Marker Type type Marker Type element if column Index 0 return type get Label if column Index 1 String super Types NON NLS 1 Marker Type supers type get Supertypes for int i 0 i supers length i super Types supers i get Label if i supers length 1 super Types NON NLS 1 return super Types return NON NLS 1  getColumnText columnIndex MarkerType MarkerType MarkerType columnIndex getLabel columnIndex superTypes MarkerType getSupertypes superTypes getLabel superTypes superTypes
private Button select Button Creates the working set filter selection widgets param parent the parent composite of the working set widgets Working Set Group Composite parent radio button has to be part of main radio button group button create Radio Button parent Messages get String filters Dialog no Working Set NON NLS 1 Grid Data data new Grid Data Grid Data FILL HORIZONTAL button set Layout Data data Composite composite new Composite parent SWT NONE composite set Font parent get Font Grid Layout layout new Grid Layout Button radio new Button parent SWT RADIO layout margin Width radio compute Size SWT DEFAULT SWT DEFAULT x layout margin Height 0 radio dispose composite set Layout layout select Button create Button composite SELECT WORKING SET ID Messages get String filters Dialog working Set Select false NON NLS 1  selectButton WorkingSetGroup createRadioButton getString filtersDialog noWorkingSet GridData GridData GridData FILL_HORIZONTAL setLayoutData setFont getFont GridLayout GridLayout marginWidth computeSize marginHeight setLayout selectButton createButton SELECT_WORKING_SET_ID getString filtersDialog workingSetSelect
Returns wether or not a working set filter should be used return true a working set filter should be used false a working set filter should not be used boolean get Selection return button get Selection  getSelection getSelection
Returns the selected working set filter or null if none is selected return the selected working set filter or null if none is selected I Working Set get Working Set return I Working Set button get Data  IWorkingSet getWorkingSet IWorkingSet getData
Sets the working set filter selection param selected true a working set filter should be used false no working set filter should be used void set Selection boolean selected button set Selection selected if selected any Resource Button set Selection false any Resource In Same Project Button set Selection false selected Resource Button set Selection false selected Resource And Children Button set Selection false  setSelection setSelection anyResourceButton setSelection anyResourceInSameProjectButton setSelection selectedResourceButton setSelection selectedResourceAndChildrenButton setSelection
Opens the working set selection dialog void select Pressed I Working Set Selection Dialog dialog PlatformUI get Workbench get Working Set Manager create Working Set Selection Dialog get Shell false I Working Set working Set get Working Set if working Set null dialog set Selection new I Working Set working Set if dialog open Window OK mark Dirty I Working Set result dialog get Selection if result null result length 0 set Working Set result 0 else set Working Set null if get Selection false set Selection true  selectPressed IWorkingSetSelectionDialog getWorkbench getWorkingSetManager createWorkingSetSelectionDialog getShell IWorkingSet workingSet getWorkingSet workingSet setSelection IWorkingSet workingSet markDirty IWorkingSet getSelection setWorkingSet setWorkingSet getSelection setSelection
Sets the specified working set param working Set the working set void set Working Set I Working Set working Set button set Data working Set if working Set null button set Text Messages format filters Dialog working Set NON NLS 1 new Object working Set get Name else button set Text Messages get String filters Dialog no Working Set NON NLS 1  workingSet setWorkingSet IWorkingSet workingSet setData workingSet workingSet setText filtersDialog workingSet workingSet getName setText getString filtersDialog noWorkingSet
void set Enabled boolean enabled button set Enabled enabled select Button set Enabled enabled  setEnabled setEnabled selectButton setEnabled
protected Selection Listener selection Listener new Selection Adapter public void widget Selected Selection Event e Dialog Marker Filter this widget Selected e  SelectionListener selectionListener SelectionAdapter widgetSelected SelectionEvent DialogMarkerFilter widgetSelected
protected I Check State Listener check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Dialog Marker Filter this check State Changed event  ICheckStateListener checkStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent DialogMarkerFilter checkStateChanged
Creates a new filters dialog Dialog Marker Filter Shell parent Shell Marker Filter filter super parent Shell this filter filter  DialogMarkerFilter parentShell MarkerFilter parentShell
protected void button Pressed int button Id if button Id RESET ID reset Pressed mark Dirty else if button Id SELECT WORKING SET ID working Set Group select Pressed else if button Id SELECT ALL ID types Viewer set All Checked true else if button Id DESELECT ALL ID types Viewer set All Checked false else super button Pressed button Id  buttonPressed buttonId buttonId RESET_ID resetPressed markDirty buttonId SELECT_WORKING_SET_ID workingSetGroup selectPressed buttonId SELECT_ALL_ID typesViewer setAllChecked buttonId DESELECT_ALL_ID typesViewer setAllChecked buttonPressed buttonId
This method is called when a button is checked or unchecked It updates the enablement state of all widgets and marks the dialog as dirty void check State Changed Check State Changed Event event update Enabled State mark Dirty  checkStateChanged CheckStateChangedEvent updateEnabledState markDirty
Method declared on Window protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text Messages get String filters Dialog title NON NLS 1  configureShell newShell configureShell newShell newShell setText getString filtersDialog
reset add Selection Listener new Selection Adapter public void widget Selected Selection Event event button Pressed Integer event widget get Data int Value  addSelectionListener SelectionAdapter widgetSelected SelectionEvent buttonPressed getData intValue
protected void create Reset Area Composite parent Composite composite new Composite parent SWT NONE composite set Font parent get Font Grid Layout layout new Grid Layout layout margin Width 0 composite set Layout layout composite set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END Button reset new Button composite SWT PUSH reset set Text Messages get String restore Defaults text NON NLS 1 reset set Data new Integer RESET ID reset add Selection Listener new Selection Adapter public void widget Selected Selection Event event button Pressed Integer event widget get Data int Value reset set Font composite get Font set Button Layout Data reset  createResetArea setFont getFont GridLayout GridLayout marginWidth setLayout setLayoutData GridData GridData HORIZONTAL_ALIGN_END setText getString restoreDefaults setData RESET_ID addSelectionListener SelectionAdapter widgetSelected SelectionEvent buttonPressed getData intValue setFont getFont setButtonLayoutData
Creates a check box button with the given parent and text param parent the parent composite param text the text for the check box param grab Row code true code to grab the remaining horizontal space code false code otherwise return the check box button protected Button create Checkbox Composite parent String text boolean grab Row Button button new Button parent SWT CHECK if grab Row Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL button set Layout Data grid Data button set Text text button add Selection Listener selection Listener button set Font parent get Font return button  grabRow createCheckbox grabRow grabRow GridData gridData GridData GridData FILL_HORIZONTAL setLayoutData gridData setText addSelectionListener selectionListener setFont getFont
Creates a combo box with the given parent items and selection param parent the parent composite param items the items for the combo box param selection Index the index of the item to select return the combo box protected Combo create Combo Composite parent String items int selection Index Combo combo new Combo parent SWT DROP DOWN SWT READ ONLY combo set Layout Data new Grid Data Grid Data FILL HORIZONTAL combo set Font parent get Font combo set Items items combo select selection Index combo add Selection Listener selection Listener return combo  selectionIndex createCombo selectionIndex DROP_DOWN READ_ONLY setLayoutData GridData GridData FILL_HORIZONTAL setFont getFont setItems selectionIndex addSelectionListener selectionListener
Method declared on Dialog protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent create On Off Area composite create Marker Limit Area composite create Types Area composite create Resource Area composite create Attributes Area composite create Reset Area composite create Separator Line composite updateUI From Filter return composite  createDialogArea createDialogArea createOnOffArea createMarkerLimitArea createTypesArea createResourceArea createAttributesArea createResetArea createSeparatorLine updateUIFromFilter
Creates a separator line above the OK Cancel buttons bar param parent the parent composite protected void create Separator Line Composite parent Build the separator line Label separator new Label parent SWT HORIZONTAL SWT SEPARATOR Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 1 separator set Layout Data gd  createSeparatorLine GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData
Creates a radio button with the given parent and text param parent the parent composite param text the text for the check box return the radio box button protected Button create Radio Button Composite parent String text Button button new Button parent SWT RADIO button set Text text button set Font parent get Font button add Selection Listener selection Listener return button  createRadioButton setText setFont getFont addSelectionListener selectionListener
Creates the area showing which resources should be considered param parent the parent composite protected void create Resource Area Composite parent Composite group new Composite parent SWT NONE group set Layout Data new Grid Data Grid Data FILL HORIZONTAL group set Layout new Grid Layout group set Font parent get Font any Resource Button create Radio Button group Messages get String filters Dialog any Resource NON NLS 1 any Resource In Same Project Button create Radio Button group Messages get String filters Dialog any Resource In Same Project NON NLS 1 added by cagatayk acm org selected Resource Button create Radio Button group Messages get String filters Dialog selected Resource NON NLS 1 selected Resource And Children Button create Radio Button group Messages get String filters Dialog selected And Children NON NLS 1 working Set Group new Working Set Group group  createResourceArea setLayoutData GridData GridData FILL_HORIZONTAL setLayout GridLayout setFont getFont anyResourceButton createRadioButton getString filtersDialog anyResource anyResourceInSameProjectButton createRadioButton getString filtersDialog anyResourceInSameProject selectedResourceButton createRadioButton getString filtersDialog selectedResource selectedResourceAndChildrenButton createRadioButton getString filtersDialog selectedAndChildren workingSetGroup WorkingSetGroup
Creates the area showing which marker types should be included param parent the parent composite protected void create Types Area Composite parent Font font parent get Font Composite composite new Composite parent SWT NONE composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout layout new Grid Layout composite set Layout layout Label label new Label composite SWT NONE label set Text Messages get String filters Dialog show Items Of Type NON NLS 1 label set Font font Table table new Table composite SWT CHECK SWT H SCROLL SWT V SCROLL SWT MULTI SWT FULL SELECTION SWT BORDER table set Lines Visible true table set Header Visible true Table Layout table Layout new Table Layout table set Layout table Layout table Layout add Column Data new Column Pixel Data 150 true Table Column tc new Table Column table SWT NONE 0 tc set Text Messages get String filters Dialog type column Header NON NLS 1 table Layout add Column Data new Column Pixel Data 224 true tc new Table Column table SWT NONE 1 tc set Text Messages get String filters Dialog super Typecolumn Header NON NLS 1 types Viewer new Checkbox Table Viewer table Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL grid Data height Hint 105 grid Data width Hint 350 types Viewer get Table set Font font types Viewer get Control set Layout Data grid Data types Viewer set Content Provider get Content Provider types Viewer set Label Provider get Label Provider types Viewer set Sorter get Sorter types Viewer add Check State Listener check State Listener types Viewer set Input filter get Root Types to Array Composite button Composite new Composite composite SWT NONE Grid Layout button Layout new Grid Layout button Layout margin Width 0 button Composite set Layout button Layout select All Button create Button button Composite SELECT ALL ID Messages get String filters Dialog select All NON NLS 1 false deselect All Button create Button button Composite DESELECT ALL ID Messages get String filters Dialog deselect All NON NLS 1 false  createTypesArea getFont setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout setLayout setText getString filtersDialog showItemsOfType setFont H_SCROLL V_SCROLL FULL_SELECTION setLinesVisible setHeaderVisible TableLayout tableLayout TableLayout setLayout tableLayout tableLayout addColumnData ColumnPixelData TableColumn TableColumn setText getString filtersDialog columnHeader tableLayout addColumnData ColumnPixelData TableColumn setText getString filtersDialog superTypecolumnHeader typesViewer CheckboxTableViewer GridData gridData GridData GridData FILL_HORIZONTAL gridData heightHint gridData widthHint typesViewer getTable setFont typesViewer getControl setLayoutData gridData typesViewer setContentProvider getContentProvider typesViewer setLabelProvider getLabelProvider typesViewer setSorter getSorter typesViewer addCheckStateListener checkStateListener typesViewer setInput getRootTypes toArray buttonComposite GridLayout buttonLayout GridLayout buttonLayout marginWidth buttonComposite setLayout buttonLayout selectAllButton createButton buttonComposite SELECT_ALL_ID getString filtersDialog selectAll deselectAllButton createButton buttonComposite DESELECT_ALL_ID getString filtersDialog deselectAll
return new I Structured Content Provider public Object get Elements Object input Element List roots filter get Root Types List elements new Array List for int i 0 i roots size i Object obj roots get i if obj instanceof Marker Type elements add obj Marker Type sub Types Marker Type obj get All Sub Types for int j 0 j sub Types length j Marker Type sub Type sub Types j if elements contains sub Type elements add sub Type return elements to Array  IStructuredContentProvider getElements inputElement getRootTypes ArrayList MarkerType MarkerType subTypes MarkerType getAllSubTypes subTypes MarkerType subType subTypes subType subType toArray
return elements to Array public void dispose  toArray
public void dispose public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
private I Structured Content Provider get Content Provider return new I Structured Content Provider public Object get Elements Object input Element List roots filter get Root Types List elements new Array List for int i 0 i roots size i Object obj roots get i if obj instanceof Marker Type elements add obj Marker Type sub Types Marker Type obj get All Sub Types for int j 0 j sub Types length j Marker Type sub Type sub Types j if elements contains sub Type elements add sub Type return elements to Array public void dispose public void input Changed Viewer viewer Object old Input Object new Input  IStructuredContentProvider getContentProvider IStructuredContentProvider getElements inputElement getRootTypes ArrayList MarkerType MarkerType subTypes MarkerType getAllSubTypes subTypes MarkerType subType subTypes subType subType toArray inputChanged oldInput newInput
Creates the filter enablement area param parent the parent composite protected void create On Off Area Composite parent Font font parent get Font Composite composite new Composite parent SWT NONE composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL composite set Font font composite set Layout new Grid Layout filter Enabled Button create Checkbox composite Messages get String filters Dialog on Off NON NLS 1 false filter Enabled Button set Font composite get Font filter Enabled Button set Layout Data new Grid Data filter Enabled Button add Selection Listener selection Listener  createOnOffArea getFont setLayoutData GridData GridData FILL_HORIZONTAL setFont setLayout GridLayout filterEnabledButton createCheckbox getString filtersDialog onOff filterEnabledButton setFont getFont filterEnabledButton setLayoutData GridData filterEnabledButton addSelectionListener selectionListener
marker Limit set Font font marker Limit add Modify Listener new Modify Listener public void modify Text Modify Event e mark Dirty  markerLimit setFont markerLimit addModifyListener ModifyListener modifyText ModifyEvent markDirty
Creates the area where the user can specify a maximum number of items to display in the table param parent the parent composite protected void create Marker Limit Area Composite parent Font font parent get Font Composite composite new Composite parent SWT NONE composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL composite set Font font Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout filter On Marker Limit create Checkbox composite Messages get String filters Dialog limit Visible Markers To NON NLS 1 false filter On Marker Limit set Font composite get Font filter On Marker Limit set Layout Data new Grid Data filter On Marker Limit add Selection Listener selection Listener marker Limit new Text composite SWT SINGLE SWT BORDER marker Limit set Text Limit 6 Grid Data grid Data new Grid Data grid Data width Hint convert Width In Chars To Pixels 10 marker Limit set Layout Data grid Data marker Limit set Font font marker Limit add Modify Listener new Modify Listener public void modify Text Modify Event e mark Dirty  createMarkerLimitArea getFont setLayoutData GridData GridData FILL_HORIZONTAL setFont GridLayout GridLayout numColumns setLayout filterOnMarkerLimit createCheckbox getString filtersDialog limitVisibleMarkersTo filterOnMarkerLimit setFont getFont filterOnMarkerLimit setLayoutData GridData filterOnMarkerLimit addSelectionListener selectionListener markerLimit markerLimit setTextLimit GridData gridData GridData gridData widthHint convertWidthInCharsToPixels markerLimit setLayoutData gridData markerLimit setFont markerLimit addModifyListener ModifyListener modifyText ModifyEvent markDirty
This method is intended to be overridden by subclasses of Filters Dialog The attributes area will be created just above the Restore Defaults button param parent the parent Composite protected void create Attributes Area Composite parent  FiltersDialog createAttributesArea
private I Label Provider get Label Provider return new Types Label Provider  ILabelProvider getLabelProvider TypesLabelProvider
Returns the selected marker types return the selected marker types protected List get Selected Types return Arrays as List types Viewer get Checked Elements  getSelectedTypes asList typesViewer getCheckedElements
return new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 Marker Type t1 Marker Type e1 Marker Type t2 Marker Type e2 return collator compare t1 get Label t2 get Label  ViewerSorter MarkerType MarkerType MarkerType MarkerType getLabel getLabel
protected Viewer Sorter get Sorter return new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 Marker Type t1 Marker Type e1 Marker Type t2 Marker Type e2 return collator compare t1 get Label t2 get Label  ViewerSorter getSorter ViewerSorter MarkerType MarkerType MarkerType MarkerType getLabel getLabel
Updates the filter from the UI state Must be done here rather than by extending open because after super open is called the widgetry is disposed protected void ok Pressed try int marker Limit Integer parse Int this marker Limit get Text if marker Limit 1 throw new Number Format Exception update Filter FromUI super ok Pressed catch Number Format Exception e Number Format Message Box message Box new Message Box get Shell SWT OK SWT APPLICATION MODAL SWT ICON ERROR message Box set Text Messages get String filters Dialog title Marker Limit Invalid NON NLS 1 message Box set Message Messages get String filters Dialog message Marker Limit Invalid NON NLS 1 message Box open if marker Limit force Focus marker Limit set Selection 0 marker Limit get Char Count marker Limit show Selection  okPressed markerLimit parseInt markerLimit getText markerLimit NumberFormatException updateFilterFromUI okPressed NumberFormatException eNumberFormat MessageBox messageBox MessageBox getShell APPLICATION_MODAL ICON_ERROR messageBox setText getString filtersDialog titleMarkerLimitInvalid messageBox setMessage getString filtersDialog messageMarkerLimitInvalid messageBox markerLimit forceFocus markerLimit setSelection markerLimit getCharCount markerLimit showSelection
Handles a press of the Reset button Updates the UI state to correspond to a reset filter but doesn t actually reset our filter protected void reset Pressed filter Enabled Button set Selection Marker Filter DEFAULT ACTIVATION STATUS filter On Marker Limit set Selection Marker Filter DEFAULT FILTER ON MARKER LIMIT marker Limit set Text String value Of Marker Filter DEFAULT MARKER LIMIT types Viewer set All Checked true int on Resource Marker Filter DEFAULT ON RESOURCE any Resource Button set Selection on Resource Marker Filter ON ANY RESOURCE any Resource In Same Project Button set Selection on Resource Marker Filter ON ANY RESOURCE OF SAME PROJECT selected Resource Button set Selection on Resource Marker Filter ON SELECTED RESOURCE ONLY selected Resource And Children Button set Selection on Resource Marker Filter ON SELECTED RESOURCE AND CHILDREN working Set Group set Selection on Resource Marker Filter ON WORKING SET update Enabled State  resetPressed filterEnabledButton setSelection MarkerFilter DEFAULT_ACTIVATION_STATUS filterOnMarkerLimit setSelection MarkerFilter DEFAULT_FILTER_ON_MARKER_LIMIT markerLimit setText valueOf MarkerFilter DEFAULT_MARKER_LIMIT typesViewer setAllChecked onResource MarkerFilter DEFAULT_ON_RESOURCE anyResourceButton setSelection onResource MarkerFilter ON_ANY_RESOURCE anyResourceInSameProjectButton setSelection onResource MarkerFilter ON_ANY_RESOURCE_OF_SAME_PROJECT selectedResourceButton setSelection onResource MarkerFilter ON_SELECTED_RESOURCE_ONLY selectedResourceAndChildrenButton setSelection onResource MarkerFilter ON_SELECTED_RESOURCE_AND_CHILDREN workingSetGroup setSelection onResource MarkerFilter ON_WORKING_SET updateEnabledState
Sets the selected marker types param marker Types void set Selected Types List marker Types types Viewer set Checked Elements new Object 0 for int i 0 i marker Types size i Object obj marker Types get i if obj instanceof Marker Type types Viewer set Checked obj true  markerTypes setSelectedTypes markerTypes typesViewer setCheckedElements markerTypes markerTypes MarkerType typesViewer setChecked
Updates the enabled state of the widgetry protected void update Enabled State filter On Marker Limit set Enabled is Filter Enabled marker Limit set Enabled is Filter Enabled filter On Marker Limit get Selection types Viewer get Table set Enabled is Filter Enabled select All Button set Enabled is Filter Enabled types Viewer get Table get Item Count 0 deselect All Button set Enabled is Filter Enabled types Viewer get Table get Item Count 0 any Resource Button set Enabled is Filter Enabled any Resource In Same Project Button set Enabled is Filter Enabled selected Resource Button set Enabled is Filter Enabled selected Resource And Children Button set Enabled is Filter Enabled working Set Group set Enabled is Filter Enabled  updateEnabledState filterOnMarkerLimit setEnabled isFilterEnabled markerLimit setEnabled isFilterEnabled filterOnMarkerLimit getSelection typesViewer getTable setEnabled isFilterEnabled selectAllButton setEnabled isFilterEnabled typesViewer getTable getItemCount deselectAllButton setEnabled isFilterEnabled typesViewer getTable getItemCount anyResourceButton setEnabled isFilterEnabled anyResourceInSameProjectButton setEnabled isFilterEnabled selectedResourceButton setEnabled isFilterEnabled selectedResourceAndChildrenButton setEnabled isFilterEnabled workingSetGroup setEnabled isFilterEnabled
Updates the given filter from the UI state protected void update Filter FromUI filter set Enabled filter Enabled Button get Selection filter set Selected Types get Selected Types if selected Resource Button get Selection filter set On Resource Marker Filter ON SELECTED RESOURCE ONLY else if selected Resource And Children Button get Selection filter set On Resource Marker Filter ON SELECTED RESOURCE AND CHILDREN else if any Resource In Same Project Button get Selection filter set On Resource Marker Filter ON ANY RESOURCE OF SAME PROJECT else if working Set Group get Selection filter set On Resource Marker Filter ON WORKING SET else filter set On Resource Marker Filter ON ANY RESOURCE filter set Working Set working Set Group get Working Set int marker Limit Marker Filter DEFAULT MARKER LIMIT try marker Limit Integer parse Int this marker Limit get Text catch Number Format Exception e filter set Marker Limit marker Limit filter set Filter On Marker Limit filter On Marker Limit get Selection  updateFilterFromUI setEnabled filterEnabledButton getSelection setSelectedTypes getSelectedTypes selectedResourceButton getSelection setOnResource MarkerFilter ON_SELECTED_RESOURCE_ONLY selectedResourceAndChildrenButton getSelection setOnResource MarkerFilter ON_SELECTED_RESOURCE_AND_CHILDREN anyResourceInSameProjectButton getSelection setOnResource MarkerFilter ON_ANY_RESOURCE_OF_SAME_PROJECT workingSetGroup getSelection setOnResource MarkerFilter ON_WORKING_SET setOnResource MarkerFilter ON_ANY_RESOURCE setWorkingSet workingSetGroup getWorkingSet markerLimit MarkerFilter DEFAULT_MARKER_LIMIT markerLimit parseInt markerLimit getText NumberFormatException setMarkerLimit markerLimit setFilterOnMarkerLimit filterOnMarkerLimit getSelection
Updates the UI state from the given filter protected void updateUI From Filter filter Enabled Button set Selection filter is Enabled set Selected Types filter get Selected Types int on filter get On Resource any Resource Button set Selection on Marker Filter ON ANY RESOURCE any Resource In Same Project Button set Selection on Marker Filter ON ANY RESOURCE OF SAME PROJECT selected Resource Button set Selection on Marker Filter ON SELECTED RESOURCE ONLY selected Resource And Children Button set Selection on Marker Filter ON SELECTED RESOURCE AND CHILDREN working Set Group set Selection on Marker Filter ON WORKING SET working Set Group set Working Set filter get Working Set marker Limit set Text filter get Marker Limit NON NLS 1 filter On Marker Limit set Selection filter get Filter On Marker Limit update Enabled State  updateUIFromFilter filterEnabledButton setSelection isEnabled setSelectedTypes getSelectedTypes getOnResource anyResourceButton setSelection MarkerFilter ON_ANY_RESOURCE anyResourceInSameProjectButton setSelection MarkerFilter ON_ANY_RESOURCE_OF_SAME_PROJECT selectedResourceButton setSelection MarkerFilter ON_SELECTED_RESOURCE_ONLY selectedResourceAndChildrenButton setSelection MarkerFilter ON_SELECTED_RESOURCE_AND_CHILDREN workingSetGroup setSelection MarkerFilter ON_WORKING_SET workingSetGroup setWorkingSet getWorkingSet markerLimit setText getMarkerLimit filterOnMarkerLimit setSelection getFilterOnMarkerLimit updateEnabledState
Handles selection on a check box or combo box protected void widget Selected Selection Event e update Enabled State mark Dirty  widgetSelected SelectionEvent updateEnabledState markDirty
return code true code if the dirty flag has been set otherwise code false code boolean is Dirty return dirty  isDirty
Marks the dialog as dirty void mark Dirty dirty true  markDirty
public void set Filter Marker Filter new Filter filter new Filter updateUI From Filter  setFilter MarkerFilter newFilter newFilter updateUIFromFilter
return the Marker Filter associated with the dialog public Marker Filter get Filter return filter  MarkerFilter MarkerFilter getFilter
return code true code if the filter s enablement button is checked otherwise code false code protected boolean is Filter Enabled return filter Enabled Button null filter Enabled Button get Selection  isFilterEnabled filterEnabledButton filterEnabledButton getSelection

Creates the dialog By default this dialog creates a new marker To set the resource and initial attributes for the new marker use code set Resource code and code set Initial Attributes code To show or modify an existing marker use code set Marker code param shell the parent shell Dialog Marker Properties Shell parent Shell super parent Shell  setResource setInitialAttributes setMarker DialogMarkerProperties parentShell parentShell
Creates the dialog By default this dialog creates a new marker To set the resource and initial attributes for the new marker use code set Resource code and code set Initial Attributes code To show or modify an existing marker use code set Marker code param shell the parent shell param title the title of the dialog Dialog Marker Properties Shell parent Shell String title super parent Shell this title title  setResource setInitialAttributes setMarker DialogMarkerProperties parentShell parentShell
see org eclipse jface window Window create public void create super create 
Sets the marker to show or modify param marker the marker or code null code to create a new marker void set Marker I Marker marker this marker marker if marker null try type marker get Type catch Core Exception e  setMarker IMarker getType CoreException
Returns the marker being created or modified For a new marker this returns code null code until the dialog returns but is non null after I Marker get Marker return marker  IMarker getMarker
Sets the resource to use when creating a new marker If not set the new marker is created on the workspace root public void set Resource I Resource resource this resource resource  setResource IResource
Returns the resource to use when creating a new marker or code null code if none has been set If not set the new marker is created on the workspace root I Resource get Resource return resource  IResource getResource
Sets initial attributes to use when creating a new marker If not set the new marker is created with default attributes void set Initial Attributes Map initial Attributes this initial Attributes initial Attributes  setInitialAttributes initialAttributes initialAttributes initialAttributes
Returns the initial attributes to use when creating a new marker or code null code if not set If not set the new marker is created with default attributes Map get Initial Attributes if initial Attributes null initial Attributes new Hash Map return initial Attributes  getInitialAttributes initialAttributes initialAttributes HashMap initialAttributes
Method declared on Window protected void configure Shell Shell new Shell super configure Shell new Shell if title null new Shell set Text Messages get String properties Dialog title NON NLS 1 else new Shell set Text title  configureShell newShell configureShell newShell newShell setText getString propertiesDialog newShell setText
Method declared on Dialog protected Control create Dialog Area Composite parent initialize resources properties if marker null resource marker get Resource try initial Attributes marker get Attributes catch Core Exception e else if resource null resource Resources Plugin get Workspace get Root Composite composite Composite super create Dialog Area parent initialize Dialog Units composite create Description Area composite if marker null create Creation Time Area composite create Attributes Area composite if resource null create Resource Area composite update Dialog From Marker update Enablement return composite  createDialogArea getResource initialAttributes getAttributes CoreException ResourcesPlugin getWorkspace getRoot createDialogArea initializeDialogUnits createDescriptionArea createCreationTimeArea createAttributesArea createResourceArea updateDialogFromMarker updateEnablement
Method create Creation Time Area param composite private void create Creation Time Area Composite parent String creation Messages get String properties Dialog creation Time text NON NLS 1 Font font parent get Font Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout Label label new Label composite SWT NONE label set Text creation label set Font font creation Time new Label composite SWT NONE creation Time set Font font  createCreationTimeArea createCreationTimeArea getString propertiesDialog creationTime getFont GridLayout GridLayout numColumns setLayout setText setFont creationTime creationTime setFont
Creates the OK and Cancel buttons protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
Creates the area for the Description field private void create Description Area Composite parent Font font parent get Font Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout Label label new Label composite SWT NONE label set Text Messages get String properties Dialog description text NON NLS 1 label set Font font int style SWT SINGLE SWT BORDER description Text new Text composite style Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL grid Data width Hint convert HorizontalDL Us To Pixels 400 description Text set Layout Data grid Data description Text set Font font description Text add Modify Listener new Modify Listener public void modify Text Modify Event e mark Dirty  createDescriptionArea getFont GridLayout GridLayout numColumns setLayout setText getString propertiesDialog setFont descriptionText GridData gridData GridData GridData FILL_HORIZONTAL gridData widthHint convertHorizontalDLUsToPixels descriptionText setLayoutData gridData descriptionText setFont descriptionText addModifyListener ModifyListener modifyText ModifyEvent markDirty
This method is intended to be overridden by subclasses The attributes area is created between the creation time area and the resource area param parent the parent composite protected void create Attributes Area Composite parent  createAttributesArea
Creates the area for the Resource field private void create Resource Area Composite parent Font font parent get Font Composite composite new Composite parent SWT NONE Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL composite set Layout Data grid Data Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout Label resource Label new Label composite SWT NONE resource Label set Text Messages get String properties Dialog resource text NON NLS 1 resource Label set Font font resource Text new Text composite SWT SINGLE SWT WRAP SWT READ ONLY SWT BORDER grid Data new Grid Data Grid Data FILL HORIZONTAL resource Text set Layout Data grid Data resource Text set Font font Label folder Label new Label composite SWT NONE folder Label set Text Messages get String properties Dialog folder text NON NLS 1 folder Label set Font font folder Text new Text composite SWT SINGLE SWT WRAP SWT READ ONLY SWT BORDER grid Data new Grid Data Grid Data FILL HORIZONTAL folder Text set Layout Data grid Data folder Text set Font font Label location Label new Label composite SWT NONE location Label set Text Messages get String properties Dialog location text NON NLS 1 location Label set Font font location Text new Text composite SWT SINGLE SWT WRAP SWT READ ONLY SWT BORDER grid Data new Grid Data Grid Data FILL HORIZONTAL location Text set Layout Data grid Data location Text set Font font  createResourceArea getFont GridData gridData GridData GridData FILL_HORIZONTAL setLayoutData gridData GridLayout GridLayout numColumns setLayout resourceLabel resourceLabel setText getString propertiesDialog resourceLabel setFont resourceText READ_ONLY gridData GridData GridData FILL_HORIZONTAL resourceText setLayoutData gridData resourceText setFont folderLabel folderLabel setText getString propertiesDialog folderLabel setFont folderText READ_ONLY gridData GridData GridData FILL_HORIZONTAL folderText setLayoutData gridData folderText setFont locationLabel locationLabel setText getString propertiesDialog locationLabel setFont locationText READ_ONLY gridData GridData GridData FILL_HORIZONTAL locationText setLayoutData gridData locationText setFont
Updates the dialog from the marker state protected void update Dialog From Marker if marker null update Dialog For New Marker return description Text set Text Util get Property I Marker MESSAGE marker if creation Time null creation Time set Text Util get Creation Time marker if resource Text null resource Text set Text Util get Resource Name marker if folder Text null folder Text set Text Util get Container Name marker if location Text null String line Util get Property I Marker LINE NUMBER marker if line equals NON NLS 1 location Text set Text NON NLS 1 else location Text set Text Messages format label line Number new String line NON NLS 1 description Text select All  updateDialogFromMarker updateDialogForNewMarker descriptionText setText getProperty IMarker creationTime creationTime setText getCreationTime resourceText resourceText setText getResourceName folderText folderText setText getContainerName locationText getProperty IMarker LINE_NUMBER locationText setText locationText setText lineNumber descriptionText selectAll
Updates the dialog from the predefined attributes protected void update Dialog For New Marker if resource null resource Text null folder Text null resource Text set Text resource get Name I Path path resource get Full Path int n path segment Count 1 n is the number of segments in container not path if n 0 int len 0 for int i 0 i n i len path segment i length account for s if n 1 len n 1 String Buffer sb new String Buffer len for int i 0 i n i if i 0 sb append sb append path segment i folder Text set Text sb to String if initial Attributes null Object description initial Attributes get I Marker MESSAGE if description null description instanceof String description Text set Text String description description Text select All Object line initial Attributes get I Marker LINE NUMBER if line null line instanceof Integer location Text null location Text set Text Messages format label line Number new Object line NON NLS 1  updateDialogForNewMarker resourceText folderText resourceText setText getName IPath getFullPath segmentCount StringBuffer StringBuffer folderText setText toString initialAttributes initialAttributes IMarker descriptionText setText descriptionText selectAll initialAttributes IMarker LINE_NUMBER locationText locationText setText lineNumber
Method declared on Dialog protected void ok Pressed if marker null Util is Editable marker save Changes super ok Pressed  okPressed isEditable saveChanges okPressed
Sets the dialog s dirty flag to code true code protected void mark Dirty dirty true  markDirty
return ul li code true code if the dirty flag has been set to true li li code false code otherwise li ul protected boolean is Dirty return dirty  isDirty
Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception if marker null create Marker monitor if is Dirty update Marker monitor attrs  ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException createMarker isDirty updateMarker
public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try monitor begin Task 100 NON NLS 1 Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception if marker null create Marker monitor if is Dirty update Marker monitor attrs monitor monitor done catch Core Exception e core Exceptions 0 e  IProgressMonitor InvocationTargetException InterruptedException beginTask ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException createMarker isDirty updateMarker CoreException coreExceptions
Saves the changes made in the dialog if needed Creates a new marker if needed Updates the existing marker only if there have been changes private void save Changes final Core Exception core Exceptions new Core Exception 1 try final Map attrs get Marker Attributes PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress non Javadoc see org eclipse jface operation I Runnable With Progress run org eclipse core runtime I Progress Monitor public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try monitor begin Task 100 NON NLS 1 Resources Plugin get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception if marker null create Marker monitor if is Dirty update Marker monitor attrs monitor monitor done catch Core Exception e core Exceptions 0 e catch Invocation Target Exception e IDE Workbench Plugin log e get Message Status Util new Status I Status ERROR e get Message e return catch Interrupted Exception e if core Exceptions 0 null Error Dialog open Error get Shell Messages get String Error null core Exceptions 0 get Status NON NLS 1  saveChanges CoreException coreExceptions CoreException getMarkerAttributes getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IRunnableWithProgress IProgressMonitor IProgressMonitor InvocationTargetException InterruptedException beginTask ResourcesPlugin getWorkspace IWorkspaceRunnable IProgressMonitor CoreException createMarker isDirty updateMarker CoreException coreExceptions InvocationTargetException IDEWorkbenchPlugin getMessage StatusUtil newStatus IStatus getMessage InterruptedException coreExceptions ErrorDialog openError getShell getString coreExceptions getStatus
Creates or updates the marker Must be called within a workspace runnable param monitor the monitor we report to param attrs the attributes from the dialog private void update Marker I Progress Monitor monitor Map attrs throws Core Exception Set the marker attributes from the current dialog field values Do not use set Attributes Map as that overwrites any attributes not covered by the dialog int increment 50 attrs size for Iterator i attrs key Set iterator i has Next monitor worked increment String key String i next Object val attrs get key marker set Attribute key val  updateMarker IProgressMonitor CoreException setAttributes keySet hasNext setAttribute
Returns the marker attributes to save back to the marker based on the current dialog fields protected Map get Marker Attributes Map attrs if initial Attributes null attrs initial Attributes else attrs new Hash Map attrs put I Marker MESSAGE description Text get Text return attrs  getMarkerAttributes initialAttributes initialAttributes HashMap IMarker descriptionText getText
Create the marker and report progress to the monitor param monitor throws a Core Exception private void create Marker I Progress Monitor monitor throws Core Exception if resource null return monitor worked 10 marker resource create Marker type monitor worked 40  CoreException createMarker IProgressMonitor CoreException createMarker
Updates widget enablement for the dialog Should be overridden by subclasses protected void update Enablement description Text set Editable is Editable  updateEnablement descriptionText setEditable isEditable
return ul li code true code if the marker is editable or the dialog is creating a new marker li li code false code if the marker is not editable li ul protected boolean is Editable if marker null return true return Util is Editable marker  isEditable isEditable
Sets the marker type when creating a new marker param type the marker type void set Type String type this type type  setType

combo add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE e detail SWT TRAVERSE RETURN e doit false  addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE TRAVERSE_RETURN
description set Layout Data data description add Modify Listener new Modify Listener public void modify Text Modify Event e Dialog Problem Filter this mark Dirty  setLayoutData addModifyListener ModifyListener modifyText ModifyEvent DialogProblemFilter markDirty
private String does Not Contain Messages get String filters Dialog does Not Contain NON NLS 1 public Description Group Composite parent description Label new Label parent SWT NONE description Label set Font parent get Font description Label set Text Messages get String filters Dialog description Label NON NLS 1 combo new Combo parent SWT READ ONLY combo set Font parent get Font combo add contains combo add does Not Contain combo add Selection Listener selection Listener Prevent Esc and Return from closing the dialog when the combo is active combo add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE e detail SWT TRAVERSE RETURN e doit false description new Text parent SWT SINGLE SWT BORDER description set Font parent get Font Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 3 description set Layout Data data description add Modify Listener new Modify Listener public void modify Text Modify Event e Dialog Problem Filter this mark Dirty  doesNotContain getString filtersDialog doesNotContain DescriptionGroup descriptionLabel descriptionLabel setFont getFont descriptionLabel setText getString filtersDialog descriptionLabel READ_ONLY setFont getFont doesNotContain addSelectionListener selectionListener addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE TRAVERSE_RETURN setFont getFont GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData addModifyListener ModifyListener modifyText ModifyEvent DialogProblemFilter markDirty
public boolean get Contains return combo get Selection Index combo index Of contains  getContains getSelectionIndex indexOf
public void set Contains boolean value if value combo select combo index Of contains else combo select combo index Of does Not Contain  setContains indexOf indexOf doesNotContain
public void set Description String text if text null description set Text NON NLS 1 else description set Text text  setDescription setText setText
public String get Description return description get Text  getDescription getText
public void update Enablement description Label set Enabled is Filter Enabled combo set Enabled is Filter Enabled description set Enabled is Filter Enabled  updateEnablement descriptionLabel setEnabled isFilterEnabled setEnabled isFilterEnabled setEnabled isFilterEnabled
public Severity Group Composite parent Selection Listener listener new Selection Adapter public void widget Selected Selection Event e update Enablement Dialog Problem Filter this mark Dirty  SeverityGroup SelectionListener SelectionAdapter widgetSelected SelectionEvent updateEnablement DialogProblemFilter markDirty
private Button info Button public Severity Group Composite parent Selection Listener listener new Selection Adapter public void widget Selected Selection Event e update Enablement Dialog Problem Filter this mark Dirty enablement Button new Button parent SWT CHECK Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 2 enablement Button set Layout Data data enablement Button set Font parent get Font enablement Button set Text Messages get String filters Dialog severity Label NON NLS 1 enablement Button add Selection Listener listener error Button new Button parent SWT CHECK error Button set Font parent get Font error Button set Text Messages get String filters Dialog severity Error NON NLS 1 error Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL error Button add Selection Listener selection Listener warning Button new Button parent SWT CHECK warning Button set Font parent get Font warning Button set Text Messages get String filters Dialog severity Warning NON NLS 1 warning Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL warning Button add Selection Listener selection Listener info Button new Button parent SWT CHECK info Button set Font parent get Font info Button set Text Messages get String filters Dialog severity Info NON NLS 1 info Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL info Button add Selection Listener selection Listener  infoButton SeverityGroup SelectionListener SelectionAdapter widgetSelected SelectionEvent updateEnablement DialogProblemFilter markDirty enablementButton GridData GridData GridData FILL_HORIZONTAL horizontalSpan enablementButton setLayoutData enablementButton setFont getFont enablementButton setText getString filtersDialog severityLabel enablementButton addSelectionListener errorButton errorButton setFont getFont errorButton setText getString filtersDialog severityError errorButton setLayoutData GridData GridData FILL_HORIZONTAL errorButton addSelectionListener selectionListener warningButton warningButton setFont getFont warningButton setText getString filtersDialog severityWarning warningButton setLayoutData GridData GridData FILL_HORIZONTAL warningButton addSelectionListener selectionListener infoButton infoButton setFont getFont infoButton setText getString filtersDialog severityInfo infoButton setLayoutData GridData GridData FILL_HORIZONTAL infoButton addSelectionListener selectionListener
info Button add Selection Listener selection Listener public boolean is Enabled return enablement Button get Selection  infoButton addSelectionListener selectionListener isEnabled enablementButton getSelection
return enablement Button get Selection public void set Enabled boolean enabled enablement Button set Selection enabled  enablementButton getSelection setEnabled enablementButton setSelection
enablement Button set Selection enabled public boolean is Error Selected return error Button get Selection  enablementButton setSelection isErrorSelected errorButton getSelection
return error Button get Selection public void set Error Selected boolean selected error Button set Selection selected  errorButton getSelection setErrorSelected errorButton setSelection
error Button set Selection selected public boolean is Warning Selected return warning Button get Selection  errorButton setSelection isWarningSelected warningButton getSelection
return warning Button get Selection public void set Warning Selected boolean selected warning Button set Selection selected  warningButton getSelection setWarningSelected warningButton setSelection
warning Button set Selection selected public boolean is Info Selected return info Button get Selection  warningButton setSelection isInfoSelected infoButton getSelection
return info Button get Selection public void set Info Selected boolean selected info Button set Selection selected  infoButton getSelection setInfoSelected infoButton setSelection
public void update Enablement enablement Button set Enabled is Filter Enabled error Button set Enabled enablement Button is Enabled is Enabled warning Button set Enabled enablement Button is Enabled is Enabled info Button set Enabled enablement Button is Enabled is Enabled  updateEnablement enablementButton setEnabled isFilterEnabled errorButton setEnabled enablementButton isEnabled isEnabled warningButton setEnabled enablementButton isEnabled isEnabled infoButton setEnabled enablementButton isEnabled isEnabled
param parent Shell param filter public Dialog Problem Filter Shell parent Shell Problem Filter filter super parent Shell filter  parentShell DialogProblemFilter parentShell ProblemFilter parentShell
protected void create Attributes Area Composite parent Composite composite new Composite parent SWT NONE composite set Font parent get Font composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout layout new Grid Layout 5 false layout vertical Spacing 7 composite set Layout layout description Group new Description Group composite severity Group new Severity Group composite  createAttributesArea setFont getFont setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout verticalSpacing setLayout descriptionGroup DescriptionGroup severityGroup SeverityGroup
protected void update Filter FromUI Problem Filter filter Problem Filter get Filter filter set Contains description Group get Contains filter set Description description Group get Description trim filter set Select By Severity severity Group is Enabled int severity 0 if severity Group is Error Selected severity severity Problem Filter SEVERITY ERROR if severity Group is Warning Selected severity severity Problem Filter SEVERITY WARNING if severity Group is Info Selected severity severity Problem Filter SEVERITY INFO filter set Severity severity super update Filter FromUI  updateFilterFromUI ProblemFilter ProblemFilter getFilter setContains descriptionGroup getContains setDescription descriptionGroup getDescription setSelectBySeverity severityGroup isEnabled severityGroup isErrorSelected ProblemFilter SEVERITY_ERROR severityGroup isWarningSelected ProblemFilter SEVERITY_WARNING severityGroup isInfoSelected ProblemFilter SEVERITY_INFO setSeverity updateFilterFromUI
protected void updateUI From Filter Problem Filter filter Problem Filter get Filter description Group set Contains filter get Contains description Group set Description filter get Description severity Group set Enabled filter get Select By Severity int severity filter get Severity severity Group set Error Selected severity Problem Filter SEVERITY ERROR 0 severity Group set Warning Selected severity Problem Filter SEVERITY WARNING 0 severity Group set Info Selected severity Problem Filter SEVERITY INFO 0 super updateUI From Filter  updateUIFromFilter ProblemFilter ProblemFilter getFilter descriptionGroup setContains getContains descriptionGroup setDescription getDescription severityGroup setEnabled getSelectBySeverity getSeverity severityGroup setErrorSelected ProblemFilter SEVERITY_ERROR severityGroup setWarningSelected ProblemFilter SEVERITY_WARNING severityGroup setInfoSelected ProblemFilter SEVERITY_INFO updateUIFromFilter
protected void update Enabled State super update Enabled State description Group update Enablement severity Group update Enablement  updateEnabledState updateEnabledState descriptionGroup updateEnablement severityGroup updateEnablement
protected void reset Pressed description Group set Contains Problem Filter DEFAULT CONTAINS description Group set Description Problem Filter DEFAULT DESCRIPTION severity Group set Enabled Problem Filter DEFAULT SELECT BY SEVERITY severity Group set Error Selected Problem Filter DEFAULT SEVERITY Problem Filter SEVERITY ERROR 0 severity Group set Warning Selected Problem Filter DEFAULT SEVERITY Problem Filter SEVERITY WARNING 0 severity Group set Info Selected Problem Filter DEFAULT SEVERITY Problem Filter SEVERITY INFO 0 super reset Pressed  resetPressed descriptionGroup setContains ProblemFilter DEFAULT_CONTAINS descriptionGroup setDescription ProblemFilter DEFAULT_DESCRIPTION severityGroup setEnabled ProblemFilter DEFAULT_SELECT_BY_SEVERITY severityGroup setErrorSelected ProblemFilter DEFAULT_SEVERITY ProblemFilter SEVERITY_ERROR severityGroup setWarningSelected ProblemFilter DEFAULT_SEVERITY ProblemFilter SEVERITY_WARNING severityGroup setInfoSelected ProblemFilter DEFAULT_SEVERITY ProblemFilter SEVERITY_INFO resetPressed

private Label severity Label Dialog Problem Properties Shell parent Shell super parent Shell  severityLabel DialogProblemProperties parentShell parentShell
protected void create Attributes Area Composite parent super create Attributes Area parent Composite composite new Composite parent SWT NONE composite set Font parent get Font composite set Layout new Grid Layout severity Label new Label composite SWT NONE severity Label set Font composite get Font  createAttributesArea createAttributesArea setFont getFont setLayout GridLayout severityLabel severityLabel setFont getFont
protected void update Dialog From Marker super update Dialog From Marker I Marker marker get Marker if marker null return TODO display image rather than text Field Severity type new Field Severity severity Label set Image type get Image marker int severity marker get Attribute I Marker SEVERITY 1 if severity I Marker SEVERITY ERROR severity Label set Text Messages format properties Dialog severity Label NON NLS 1 new String Messages get String properties Dialog error Label NON NLS 1 else if severity I Marker SEVERITY WARNING severity Label set Text Messages format properties Dialog severity Label NON NLS 1 new String Messages get String properties Dialog warning Label NON NLS 1 else if severity I Marker SEVERITY INFO severity Label set Text Messages format properties Dialog severity Label NON NLS 1 new String Messages get String properties Dialog info Label NON NLS 1 else severity Label set Text Messages format properties Dialog severity Label NON NLS 1 new String Messages get String properties Dialog noseverity Label NON NLS 1  updateDialogFromMarker updateDialogFromMarker IMarker getMarker FieldSeverity FieldSeverity severityLabel setImage getImage getAttribute IMarker IMarker SEVERITY_ERROR severityLabel setText propertiesDialog severityLabel getString propertiesDialog errorLabel IMarker SEVERITY_WARNING severityLabel setText propertiesDialog severityLabel getString propertiesDialog warningLabel IMarker SEVERITY_INFO severityLabel setText propertiesDialog severityLabel getString propertiesDialog infoLabel severityLabel setText propertiesDialog severityLabel getString propertiesDialog noseverityLabel

combo add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE e detail SWT TRAVERSE RETURN e doit false  addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE TRAVERSE_RETURN
description set Layout Data data description add Modify Listener new Modify Listener public void modify Text Modify Event e Dialog Task Filter this mark Dirty  setLayoutData addModifyListener ModifyListener modifyText ModifyEvent DialogTaskFilter markDirty
private String does Not Contain Messages get String filters Dialog does Not Contain NON NLS 1 public Description Group Composite parent description Label new Label parent SWT NONE description Label set Font parent get Font description Label set Text Messages get String filters Dialog description Label NON NLS 1 combo new Combo parent SWT READ ONLY combo set Font parent get Font combo add contains combo add does Not Contain combo add Selection Listener selection Listener Prevent Esc and Return from closing the dialog when the combo is active combo add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE e detail SWT TRAVERSE RETURN e doit false description new Text parent SWT SINGLE SWT BORDER description set Font parent get Font Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 3 description set Layout Data data description add Modify Listener new Modify Listener public void modify Text Modify Event e Dialog Task Filter this mark Dirty  doesNotContain getString filtersDialog doesNotContain DescriptionGroup descriptionLabel descriptionLabel setFont getFont descriptionLabel setText getString filtersDialog descriptionLabel READ_ONLY setFont getFont doesNotContain addSelectionListener selectionListener addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE TRAVERSE_RETURN setFont getFont GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData addModifyListener ModifyListener modifyText ModifyEvent DialogTaskFilter markDirty
public boolean get Contains return combo get Selection Index combo index Of contains  getContains getSelectionIndex indexOf
public void set Contains boolean value if value combo select combo index Of contains else combo select combo index Of does Not Contain  setContains indexOf indexOf doesNotContain
public void set Description String text if text null description set Text NON NLS 1 else description set Text text  setDescription setText setText
public String get Description return description get Text  getDescription getText
public void update Enablement description Label set Enabled is Filter Enabled combo set Enabled is Filter Enabled description set Enabled is Filter Enabled  updateEnablement descriptionLabel setEnabled isFilterEnabled setEnabled isFilterEnabled setEnabled isFilterEnabled
public Priority Group Composite parent Selection Listener listener new Selection Adapter public void widget Selected Selection Event e update Enablement Dialog Task Filter this mark Dirty  PriorityGroup SelectionListener SelectionAdapter widgetSelected SelectionEvent updateEnablement DialogTaskFilter markDirty
private Button low Button public Priority Group Composite parent Selection Listener listener new Selection Adapter public void widget Selected Selection Event e update Enablement Dialog Task Filter this mark Dirty enablement Button new Button parent SWT CHECK Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 2 enablement Button set Layout Data data enablement Button set Font parent get Font enablement Button set Text Messages get String filters Dialog priority Label NON NLS 1 enablement Button add Selection Listener listener high Button new Button parent SWT CHECK high Button set Font parent get Font high Button set Text Messages get String filters Dialog priority High NON NLS 1 high Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL high Button add Selection Listener selection Listener normal Button new Button parent SWT CHECK normal Button set Font parent get Font normal Button set Text Messages get String filters Dialog priority Normal NON NLS 1 normal Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL normal Button add Selection Listener selection Listener low Button new Button parent SWT CHECK low Button set Font parent get Font low Button set Text Messages get String filters Dialog priority Low NON NLS 1 low Button set Layout Data new Grid Data Grid Data FILL HORIZONTAL low Button add Selection Listener selection Listener  lowButton PriorityGroup SelectionListener SelectionAdapter widgetSelected SelectionEvent updateEnablement DialogTaskFilter markDirty enablementButton GridData GridData GridData FILL_HORIZONTAL horizontalSpan enablementButton setLayoutData enablementButton setFont getFont enablementButton setText getString filtersDialog priorityLabel enablementButton addSelectionListener highButton highButton setFont getFont highButton setText getString filtersDialog priorityHigh highButton setLayoutData GridData GridData FILL_HORIZONTAL highButton addSelectionListener selectionListener normalButton normalButton setFont getFont normalButton setText getString filtersDialog priorityNormal normalButton setLayoutData GridData GridData FILL_HORIZONTAL normalButton addSelectionListener selectionListener lowButton lowButton setFont getFont lowButton setText getString filtersDialog priorityLow lowButton setLayoutData GridData GridData FILL_HORIZONTAL lowButton addSelectionListener selectionListener
low Button add Selection Listener selection Listener public boolean is Enabled return enablement Button get Selection  lowButton addSelectionListener selectionListener isEnabled enablementButton getSelection
return enablement Button get Selection public void set Enabled boolean enabled enablement Button set Selection enabled  enablementButton getSelection setEnabled enablementButton setSelection
enablement Button set Selection enabled public boolean is High Selected return high Button get Selection  enablementButton setSelection isHighSelected highButton getSelection
return high Button get Selection public void set High Selected boolean selected high Button set Selection selected  highButton getSelection setHighSelected highButton setSelection
high Button set Selection selected public boolean is Normal Selected return normal Button get Selection  highButton setSelection isNormalSelected normalButton getSelection
return normal Button get Selection public void set Normal Selected boolean selected normal Button set Selection selected  normalButton getSelection setNormalSelected normalButton setSelection
normal Button set Selection selected public boolean is Low Selected return low Button get Selection  normalButton setSelection isLowSelected lowButton getSelection
return low Button get Selection public void set Low Selected boolean selected low Button set Selection selected  lowButton getSelection setLowSelected lowButton setSelection
public void update Enablement enablement Button set Enabled is Filter Enabled high Button set Enabled enablement Button is Enabled is Enabled normal Button set Enabled enablement Button is Enabled is Enabled low Button set Enabled enablement Button is Enabled is Enabled  updateEnablement enablementButton setEnabled isFilterEnabled highButton setEnabled enablementButton isEnabled isEnabled normalButton setEnabled enablementButton isEnabled isEnabled lowButton setEnabled enablementButton isEnabled isEnabled
public Status Group Composite parent Selection Listener enablement Listener new Selection Adapter public void widget Selected Selection Event e update Enablement Dialog Task Filter this mark Dirty  StatusGroup SelectionListener enablementListener SelectionAdapter widgetSelected SelectionEvent updateEnablement DialogTaskFilter markDirty
Selection Listener listener new Selection Adapter public void widget Selected Selection Event e complete Button set Selection incomplete Button get Selection incomplete Button set Selection complete Button get Selection Dialog Task Filter this mark Dirty  SelectionListener SelectionAdapter widgetSelected SelectionEvent completeButton setSelection incompleteButton getSelection incompleteButton setSelection completeButton getSelection DialogTaskFilter markDirty
private Button incomplete Button public Status Group Composite parent Selection Listener enablement Listener new Selection Adapter public void widget Selected Selection Event e update Enablement Dialog Task Filter this mark Dirty enablement Button new Button parent SWT CHECK Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 2 enablement Button set Layout Data data enablement Button set Font parent get Font enablement Button set Text Messages get String filters Dialog status Label NON NLS 1 enablement Button add Selection Listener enablement Listener Composite composite new Composite parent SWT NONE composite set Font parent get Font Grid Layout layout new Grid Layout 2 false layout margin Height 0 layout margin Width 0 composite set Layout layout data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 3 composite set Layout Data data Selection Listener listener new Selection Adapter public void widget Selected Selection Event e complete Button set Selection incomplete Button get Selection incomplete Button set Selection complete Button get Selection Dialog Task Filter this mark Dirty complete Button new Button composite SWT RADIO complete Button set Font composite get Font complete Button set Text Messages get String filters Dialog status Complete NON NLS 1 complete Button add Selection Listener listener incomplete Button new Button composite SWT RADIO incomplete Button set Font composite get Font incomplete Button set Text Messages get String filters Dialog status Incomplete NON NLS 1 incomplete Button add Selection Listener listener  incompleteButton StatusGroup SelectionListener enablementListener SelectionAdapter widgetSelected SelectionEvent updateEnablement DialogTaskFilter markDirty enablementButton GridData GridData GridData FILL_HORIZONTAL horizontalSpan enablementButton setLayoutData enablementButton setFont getFont enablementButton setText getString filtersDialog statusLabel enablementButton addSelectionListener enablementListener setFont getFont GridLayout GridLayout marginHeight marginWidth setLayout GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData SelectionListener SelectionAdapter widgetSelected SelectionEvent completeButton setSelection incompleteButton getSelection incompleteButton setSelection completeButton getSelection DialogTaskFilter markDirty completeButton completeButton setFont getFont completeButton setText getString filtersDialog statusComplete completeButton addSelectionListener incompleteButton incompleteButton setFont getFont incompleteButton setText getString filtersDialog statusIncomplete incompleteButton addSelectionListener
incomplete Button add Selection Listener listener public boolean is Enabled return enablement Button get Selection  incompleteButton addSelectionListener isEnabled enablementButton getSelection
return enablement Button get Selection public void set Enabled boolean enabled enablement Button set Selection enabled  enablementButton getSelection setEnabled enablementButton setSelection
enablement Button set Selection enabled public boolean get Done return complete Button get Selection  enablementButton setSelection getDone completeButton getSelection
return complete Button get Selection public void set Done boolean done complete Button set Selection done incomplete Button set Selection done  completeButton getSelection setDone completeButton setSelection incompleteButton setSelection
public void update Enablement enablement Button set Enabled is Filter Enabled complete Button set Enabled enablement Button is Enabled is Enabled incomplete Button set Enabled enablement Button is Enabled is Enabled  updateEnablement enablementButton setEnabled isFilterEnabled completeButton setEnabled enablementButton isEnabled isEnabled incompleteButton setEnabled enablementButton isEnabled isEnabled
param parent Shell param filter public Dialog Task Filter Shell parent Shell Task Filter filter super parent Shell filter  parentShell DialogTaskFilter parentShell TaskFilter parentShell
protected void create Attributes Area Composite parent Composite composite new Composite parent SWT NONE composite set Font parent get Font composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout layout new Grid Layout 5 false layout vertical Spacing 7 composite set Layout layout description Group new Description Group composite priority Group new Priority Group composite status Group new Status Group composite  createAttributesArea setFont getFont setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout verticalSpacing setLayout descriptionGroup DescriptionGroup priorityGroup PriorityGroup statusGroup StatusGroup
protected void update Filter FromUI Task Filter filter Task Filter get Filter filter set Contains description Group get Contains filter set Description description Group get Description trim filter set Select By Priority priority Group is Enabled int priority 0 if priority Group is High Selected priority priority Task Filter PRIORITY HIGH if priority Group is Normal Selected priority priority Task Filter PRIORITY NORMAL if priority Group is Low Selected priority priority Task Filter PRIORITY LOW filter set Priority priority filter set Select By Done status Group is Enabled filter set Done status Group get Done super update Filter FromUI  updateFilterFromUI TaskFilter TaskFilter getFilter setContains descriptionGroup getContains setDescription descriptionGroup getDescription setSelectByPriority priorityGroup isEnabled priorityGroup isHighSelected TaskFilter PRIORITY_HIGH priorityGroup isNormalSelected TaskFilter PRIORITY_NORMAL priorityGroup isLowSelected TaskFilter PRIORITY_LOW setPriority setSelectByDone statusGroup isEnabled setDone statusGroup getDone updateFilterFromUI
protected void updateUI From Filter Task Filter filter Task Filter get Filter description Group set Contains filter get Contains description Group set Description filter get Description priority Group set Enabled filter get Select By Priority int priority filter get Priority priority Group set High Selected priority Task Filter PRIORITY HIGH 0 priority Group set Normal Selected priority Task Filter PRIORITY NORMAL 0 priority Group set Low Selected priority Task Filter PRIORITY LOW 0 status Group set Enabled filter get Select By Done status Group set Done filter get Done super updateUI From Filter  updateUIFromFilter TaskFilter TaskFilter getFilter descriptionGroup setContains getContains descriptionGroup setDescription getDescription priorityGroup setEnabled getSelectByPriority getPriority priorityGroup setHighSelected TaskFilter PRIORITY_HIGH priorityGroup setNormalSelected TaskFilter PRIORITY_NORMAL priorityGroup setLowSelected TaskFilter PRIORITY_LOW statusGroup setEnabled getSelectByDone statusGroup setDone getDone updateUIFromFilter
protected void update Enabled State super update Enabled State description Group update Enablement priority Group update Enablement status Group update Enablement  updateEnabledState updateEnabledState descriptionGroup updateEnablement priorityGroup updateEnablement statusGroup updateEnablement
protected void reset Pressed description Group set Contains Task Filter DEFAULT CONTAINS description Group set Description Task Filter DEFAULT DESCRIPTION priority Group set Enabled Task Filter DEFAULT SELECT BY PRIORITY priority Group set High Selected Task Filter DEFAULT PRIORITY Task Filter PRIORITY HIGH 0 priority Group set Normal Selected Task Filter DEFAULT PRIORITY Task Filter PRIORITY NORMAL 0 priority Group set Low Selected Task Filter DEFAULT PRIORITY Task Filter PRIORITY NORMAL 0 status Group set Enabled Task Filter DEFAULT SELECT BY DONE status Group set Done Task Filter DEFAULT DONE super reset Pressed  resetPressed descriptionGroup setContains TaskFilter DEFAULT_CONTAINS descriptionGroup setDescription TaskFilter DEFAULT_DESCRIPTION priorityGroup setEnabled TaskFilter DEFAULT_SELECT_BY_PRIORITY priorityGroup setHighSelected TaskFilter DEFAULT_PRIORITY TaskFilter PRIORITY_HIGH priorityGroup setNormalSelected TaskFilter DEFAULT_PRIORITY TaskFilter PRIORITY_NORMAL priorityGroup setLowSelected TaskFilter DEFAULT_PRIORITY TaskFilter PRIORITY_NORMAL statusGroup setEnabled TaskFilter DEFAULT_SELECT_BY_DONE statusGroup setDone TaskFilter DEFAULT_DONE resetPressed

param parent Shell public Dialog Task Properties Shell parent Shell super parent Shell set Type I Marker TASK  parentShell DialogTaskProperties parentShell parentShell setType IMarker
param parent Shell Dialog Task Properties Shell parent Shell String title super parent Shell title set Type I Marker TASK  parentShell DialogTaskProperties parentShell parentShell setType IMarker
protected void create Attributes Area Composite parent super create Attributes Area parent Composite composite new Composite parent SWT NONE composite set Font parent get Font Grid Layout layout new Grid Layout layout num Columns 3 composite set Layout layout Label label new Label composite SWT NONE label set Font composite get Font label set Text Messages get String properties Dialog priority NON NLS 1 priority Combo new Combo composite SWT READ ONLY priority Combo set Items new String PRIORITY HIGH PRIORITY NORMAL PRIORITY LOW Prevent Esc and Return from closing the dialog when the combo is active priority Combo add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE e detail SWT TRAVERSE RETURN e doit false priority Combo set Font composite get Font priority Combo add Selection Listener new Selection Adapter public void widget Selected Selection Event e if get Marker null Map initial Attributes get Initial Attributes initial Attributes put I Marker PRIORITY new Integer get Priority From Dialog mark Dirty completed Checkbox new Button composite SWT CHECK completed Checkbox set Font composite get Font completed Checkbox set Text Messages get String properties Dialog completed NON NLS 1 Grid Data grid Data new Grid Data grid Data horizontal Indent convert HorizontalDL Us To Pixels 20 completed Checkbox set Layout Data grid Data completed Checkbox add Selection Listener new Selection Adapter public void widget Selected Selection Event e if get Marker null Map initial Attributes get Initial Attributes initial Attributes put I Marker DONE new Boolean completed Checkbox get Selection mark Dirty  createAttributesArea createAttributesArea setFont getFont GridLayout GridLayout numColumns setLayout setFont getFont setText getString propertiesDialog priorityCombo READ_ONLY priorityCombo setItems PRIORITY_HIGH PRIORITY_NORMAL PRIORITY_LOW priorityCombo addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE TRAVERSE_RETURN priorityCombo setFont getFont priorityCombo addSelectionListener SelectionAdapter widgetSelected SelectionEvent getMarker initialAttributes getInitialAttributes initialAttributes IMarker getPriorityFromDialog markDirty completedCheckbox completedCheckbox setFont getFont completedCheckbox setText getString propertiesDialog GridData gridData GridData gridData horizontalIndent convertHorizontalDLUsToPixels completedCheckbox setLayoutData gridData completedCheckbox addSelectionListener SelectionAdapter widgetSelected SelectionEvent getMarker initialAttributes getInitialAttributes initialAttributes IMarker completedCheckbox getSelection markDirty
protected boolean get Completed I Marker marker get Marker if marker null Map attributes get Initial Attributes Object done attributes get I Marker DONE return done null done instanceof Boolean Boolean done boolean Value else return marker get Attribute I Marker DONE false  getCompleted IMarker getMarker getInitialAttributes IMarker booleanValue getAttribute IMarker
protected int get Priority I Marker marker get Marker int priority I Marker PRIORITY NORMAL if marker null Map attributes get Initial Attributes Object priority Obj attributes get I Marker PRIORITY if priority Obj null priority Obj instanceof Integer priority Integer priority Obj int Value else priority marker get Attribute I Marker PRIORITY I Marker PRIORITY NORMAL return priority  getPriority IMarker getMarker IMarker PRIORITY_NORMAL getInitialAttributes priorityObj IMarker priorityObj priorityObj priorityObj intValue getAttribute IMarker IMarker PRIORITY_NORMAL
protected void update Enablement super update Enablement priority Combo set Enabled is Editable completed Checkbox set Enabled is Editable  updateEnablement updateEnablement priorityCombo setEnabled isEditable completedCheckbox setEnabled isEditable
protected void update Dialog For New Marker Map initial Attributes get Initial Attributes int priority get Priority initial Attributes put I Marker PRIORITY new Integer priority if priority I Marker PRIORITY HIGH priority Combo select priority Combo index Of PRIORITY HIGH else if priority I Marker PRIORITY LOW priority Combo select priority Combo index Of PRIORITY LOW else priority Combo select priority Combo index Of PRIORITY NORMAL boolean completed get Completed initial Attributes put I Marker DONE new Boolean completed completed Checkbox set Selection completed super update Dialog For New Marker  updateDialogForNewMarker initialAttributes getInitialAttributes getPriority initialAttributes IMarker IMarker PRIORITY_HIGH priorityCombo priorityCombo indexOf PRIORITY_HIGH IMarker PRIORITY_LOW priorityCombo priorityCombo indexOf PRIORITY_LOW priorityCombo priorityCombo indexOf PRIORITY_NORMAL getCompleted initialAttributes IMarker completedCheckbox setSelection updateDialogForNewMarker
protected void update Dialog From Marker Map initial Attributes get Initial Attributes int priority get Priority initial Attributes put I Marker PRIORITY new Integer priority if priority I Marker PRIORITY HIGH priority Combo select priority Combo index Of PRIORITY HIGH else if priority I Marker PRIORITY LOW priority Combo select priority Combo index Of PRIORITY LOW else priority Combo select priority Combo index Of PRIORITY NORMAL boolean completed get Completed initial Attributes put I Marker DONE new Boolean completed completed Checkbox set Selection completed super update Dialog From Marker  updateDialogFromMarker initialAttributes getInitialAttributes getPriority initialAttributes IMarker IMarker PRIORITY_HIGH priorityCombo priorityCombo indexOf PRIORITY_HIGH IMarker PRIORITY_LOW priorityCombo priorityCombo indexOf PRIORITY_LOW priorityCombo priorityCombo indexOf PRIORITY_NORMAL getCompleted initialAttributes IMarker completedCheckbox setSelection updateDialogFromMarker
private int get Priority From Dialog int priority I Marker PRIORITY NORMAL if priority Combo get Selection Index priority Combo index Of PRIORITY HIGH priority I Marker PRIORITY HIGH else if priority Combo get Selection Index priority Combo index Of PRIORITY LOW priority I Marker PRIORITY LOW return priority  getPriorityFromDialog IMarker PRIORITY_NORMAL priorityCombo getSelectionIndex priorityCombo indexOf PRIORITY_HIGH IMarker PRIORITY_HIGH priorityCombo getSelectionIndex priorityCombo indexOf PRIORITY_LOW IMarker PRIORITY_LOW
protected Map get Marker Attributes Map attrs super get Marker Attributes attrs put I Marker PRIORITY new Integer get Priority From Dialog attrs put I Marker DONE new Boolean completed Checkbox get Selection Object user Editable attrs get I Marker USER EDITABLE if user Editable null user Editable instanceof Boolean attrs put I Marker USER EDITABLE new Boolean true return attrs  getMarkerAttributes getMarkerAttributes IMarker getPriorityFromDialog IMarker completedCheckbox getSelection userEditable IMarker USER_EDITABLE userEditable userEditable IMarker USER_EDITABLE

The constructor public Field Creation Time description Messages get String description creation Time NON NLS 1  FieldCreationTime getString creationTime
see org eclipse ui views markers internal I Field get Description public String get Description return description  IField getDescription getDescription
see org eclipse ui views markers internal I Field get Description Image public Image get Description Image return image  IField getDescriptionImage getDescriptionImage
see org eclipse ui views markers internal I Field get Column Header Text public String get Column Header Text return description  IField getColumnHeaderText getColumnHeaderText
see org eclipse ui views markers internal I Field get Column Header Image public Image get Column Header Image return image  IField getColumnHeaderImage getColumnHeaderImage
public String get Value Object obj if obj null obj instanceof Concrete Marker return NON NLS 1 Concrete Marker marker Concrete Marker obj return Util get Creation Time marker get Creation Time  getValue ConcreteMarker ConcreteMarker ConcreteMarker getCreationTime getCreationTime
see org eclipse ui views markers internal I Field get Image java lang Object public Image get Image Object obj return null  IField getImage getImage
public int compare Object obj1 Object obj2 if obj1 null obj2 null obj1 instanceof Concrete Marker obj2 instanceof Concrete Marker return 0 Concrete Marker marker1 Concrete Marker obj1 Concrete Marker marker2 Concrete Marker obj2 long value marker1 get Creation Time marker2 get Creation Time if value 0 return 1 else if value 0 return 1 else return 0  ConcreteMarker ConcreteMarker ConcreteMarker ConcreteMarker ConcreteMarker ConcreteMarker getCreationTime getCreationTime

private Image image public Field Done description Messages get String completion description NON NLS 1 image Image Factory get Image DESCRIPTION IMAGE PATH  FieldDone getString ImageFactory getImage DESCRIPTION_IMAGE_PATH
see org eclipse ui views markers internal I Field get Description public String get Description return description  IField getDescription getDescription
see org eclipse ui views markers internal I Field get Description Image public Image get Description Image return image  IField getDescriptionImage getDescriptionImage
see org eclipse ui views markers internal I Field get Column Header Text public String get Column Header Text return NON NLS 1  IField getColumnHeaderText getColumnHeaderText
see org eclipse ui views markers internal I Field get Column Header Image public Image get Column Header Image return image  IField getColumnHeaderImage getColumnHeaderImage
see org eclipse ui views markers internal I Field get Value java lang Object public String get Value Object obj return NON NLS 1  IField getValue getValue
public Image get Image Object obj if obj null obj instanceof Task Marker return null Task Marker marker Task Marker obj int done marker get Done if done 1 return null if done 1 return Image Factory get Image COMPLETE IMAGE PATH return Image Factory get Image INCOMPLETE IMAGE PATH  getImage TaskMarker TaskMarker TaskMarker getDone ImageFactory getImage COMPLETE_IMAGE_PATH ImageFactory getImage INCOMPLETE_IMAGE_PATH
public int compare Object obj1 Object obj2 if obj1 null obj2 null obj1 instanceof Task Marker obj2 instanceof Task Marker return 0 Task Marker marker1 Task Marker obj1 Task Marker marker2 Task Marker obj2 int value1 marker1 get Done int value2 marker2 get Done return value1 value2  TaskMarker TaskMarker TaskMarker TaskMarker TaskMarker TaskMarker getDone getDone

private Image image public Field Folder description Messages get String description folder NON NLS 1  FieldFolder getString
see org eclipse ui views markers internal I Field get Description public String get Description return description  IField getDescription getDescription
see org eclipse ui views markers internal I Field get Description Image public Image get Description Image return image  IField getDescriptionImage getDescriptionImage
see org eclipse ui views markers internal I Field get Column Header Text public String get Column Header Text return description  IField getColumnHeaderText getColumnHeaderText
see org eclipse ui views markers internal I Field get Column Header Image public Image get Column Header Image return image  IField getColumnHeaderImage getColumnHeaderImage
public String get Value Object obj if obj null obj instanceof Concrete Marker return NON NLS 1 Concrete Marker marker Concrete Marker obj return marker get Folder  getValue ConcreteMarker ConcreteMarker ConcreteMarker getFolder
see org eclipse ui views markers internal I Field get Image java lang Object public Image get Image Object obj return null  IField getImage getImage
public int compare Object obj1 Object obj2 if obj1 null obj2 null obj1 instanceof Concrete Marker obj2 instanceof Concrete Marker return 0 Concrete Marker marker1 Concrete Marker obj1 Concrete Marker marker2 Concrete Marker obj2 return marker1 get Folder Key compare To marker2 get Folder Key  ConcreteMarker ConcreteMarker ConcreteMarker ConcreteMarker ConcreteMarker ConcreteMarker getFolderKey compareTo getFolderKey

private Image image public Field Line Number description Messages get String description line Number NON NLS 1  FieldLineNumber getString lineNumber
see org eclipse ui views markers internal I Field get Description public String get Description return description  IField getDescription getDescription
see org eclipse ui views markers internal I Field get Description Image public Image get Description Image return image  IField getDescriptionImage getDescriptionImage
see org eclipse ui views markers internal I Field get Column Header Text public String get Column Header Text return description  IField getColumnHeaderText getColumnHeaderText
see org eclipse ui views markers internal I Field get Column Header Image public Image get Column Header Image return image  IField getColumnHeaderImage getColumnHeaderImage
public String get Value Object obj if obj null obj instanceof Concrete Marker return NON NLS 1 Concrete Marker marker Concrete Marker obj if marker get Line 0 return NON NLS 1 return Messages format label line Number new String Integer to String marker get Line NON NLS 1  getValue ConcreteMarker ConcreteMarker ConcreteMarker getLine lineNumber toString getLine
see org eclipse ui views markers internal I Field get Image java lang Object public Image get Image Object obj return null  IField getImage getImage
public int compare Object obj1 Object obj2 if obj1 null obj2 null obj1 instanceof Concrete Marker obj2 instanceof Concrete Marker return 0 Concrete Marker marker1 Concrete Marker obj1 Concrete Marker marker2 Concrete Marker obj2 return marker1 get Line marker2 get Line  ConcreteMarker ConcreteMarker ConcreteMarker ConcreteMarker ConcreteMarker ConcreteMarker getLine getLine

private Image image public Field Message description Messages get String description message NON NLS 1  FieldMessage getString
see org eclipse ui views markers internal I Field get Description public String get Description return description  IField getDescription getDescription
see org eclipse ui views markers internal I Field get Description Image public Image get Description Image return image  IField getDescriptionImage getDescriptionImage
see org eclipse ui views markers internal I Field get Column Header Text public String get Column Header Text return description  IField getColumnHeaderText getColumnHeaderText
see org eclipse ui views markers internal I Field get Column Header Image public Image get Column Header Image return image  IField getColumnHeaderImage getColumnHeaderImage
public String get Value Object obj if obj null obj instanceof Concrete Marker return NON NLS 1 Concrete Marker marker Concrete Marker obj return marker get Description  getValue ConcreteMarker ConcreteMarker ConcreteMarker getDescription
see org eclipse ui views markers internal I Field get Image java lang Object public Image get Image Object obj return null  IField getImage getImage
public int compare Object obj1 Object obj2 if obj1 null obj2 null obj1 instanceof Concrete Marker obj2 instanceof Concrete Marker return 0 Concrete Marker marker1 Concrete Marker obj1 Concrete Marker marker2 Concrete Marker obj2 return marker1 get Description Key compare To marker2 get Description Key  ConcreteMarker ConcreteMarker ConcreteMarker ConcreteMarker ConcreteMarker ConcreteMarker getDescriptionKey compareTo getDescriptionKey

private Image image public Field Priority description Messages get String priority description NON NLS 1 image Image Factory get Image DESCRIPTION IMAGE PATH  FieldPriority getString ImageFactory getImage DESCRIPTION_IMAGE_PATH
see org eclipse ui views markers internal I Field get Description public String get Description return description  IField getDescription getDescription
see org eclipse ui views markers internal I Field get Description Image public Image get Description Image return image  IField getDescriptionImage getDescriptionImage
see org eclipse ui views markers internal I Field get Column Header Text public String get Column Header Text return NON NLS 1  IField getColumnHeaderText getColumnHeaderText
see org eclipse ui views markers internal I Field get Column Header Image public Image get Column Header Image return image  IField getColumnHeaderImage getColumnHeaderImage
see org eclipse ui views markers internal I Field get Value java lang Object public String get Value Object obj return NON NLS 1  IField getValue getValue
public Image get Image Object obj if obj null obj instanceof Task Marker return null try int priority Task Marker obj get Priority if priority I Marker PRIORITY HIGH return Image Factory get Image HIGH PRIORITY IMAGE PATH if priority I Marker PRIORITY LOW return Image Factory get Image LOW PRIORITY IMAGE PATH catch Number Format Exception e return null return null  getImage TaskMarker TaskMarker getPriority IMarker PRIORITY_HIGH ImageFactory getImage HIGH_PRIORITY_IMAGE_PATH IMarker PRIORITY_LOW ImageFactory getImage LOW_PRIORITY_IMAGE_PATH NumberFormatException
public int compare Object obj1 Object obj2 if obj1 null obj2 null obj1 instanceof Task Marker obj2 instanceof Task Marker return 0 int priority1 Task Marker obj1 get Priority int priority2 Task Marker obj2 get Priority return priority1 priority2  TaskMarker TaskMarker TaskMarker getPriority TaskMarker getPriority

private Image image public Field Resource description Messages get String description resource NON NLS 1  FieldResource getString
see org eclipse ui views markers internal I Field get Description public String get Description return description  IField getDescription getDescription
see org eclipse ui views markers internal I Field get Description Image public Image get Description Image return image  IField getDescriptionImage getDescriptionImage
see org eclipse ui views markers internal I Field get Column Header Text public String get Column Header Text return description  IField getColumnHeaderText getColumnHeaderText
see org eclipse ui views markers internal I Field get Column Header Image public Image get Column Header Image return image  IField getColumnHeaderImage getColumnHeaderImage
public String get Value Object obj if obj null obj instanceof Concrete Marker return NON NLS 1 Concrete Marker marker Concrete Marker obj return marker get Resource Name  getValue ConcreteMarker ConcreteMarker ConcreteMarker getResourceName
see org eclipse ui views markers internal I Field get Image java lang Object public Image get Image Object obj return null  IField getImage getImage
public int compare Object obj1 Object obj2 if obj1 null obj2 null obj1 instanceof Concrete Marker obj2 instanceof Concrete Marker return 0 Concrete Marker marker1 Concrete Marker obj1 Concrete Marker marker2 Concrete Marker obj2 return marker1 get Resource Name Key compare To marker2 get Resource Name Key  ConcreteMarker ConcreteMarker ConcreteMarker ConcreteMarker ConcreteMarker ConcreteMarker getResourceNameKey compareTo getResourceNameKey

private Image image public Field Severity description Messages get String problem Severity description NON NLS 1 image null  FieldSeverity getString problemSeverity
see org eclipse ui views markers internal I Field get Description public String get Description return description  IField getDescription getDescription
see org eclipse ui views markers internal I Field get Description Image public Image get Description Image return image  IField getDescriptionImage getDescriptionImage
see org eclipse ui views markers internal I Field get Column Header Text public String get Column Header Text return NON NLS 1  IField getColumnHeaderText getColumnHeaderText
see org eclipse ui views markers internal I Field get Column Header Image public Image get Column Header Image return null  IField getColumnHeaderImage getColumnHeaderImage
see org eclipse ui views markers internal I Field get Value java lang Object public String get Value Object obj return Problem Marker obj get Severity NON NLS 1  IField getValue getValue ProblemMarker getSeverity
public Image get Image Object obj if obj null obj instanceof Problem Marker return null int severity Problem Marker obj get Severity if severity I Marker SEVERITY ERROR return Image Factory get Image IMAGE ERROR PATH if severity I Marker SEVERITY WARNING return Image Factory get Image IMAGE WARNING PATH if severity I Marker SEVERITY INFO return Image Factory get Image IMAGE INFO PATH return null  getImage ProblemMarker ProblemMarker getSeverity IMarker SEVERITY_ERROR ImageFactory getImage IMAGE_ERROR_PATH IMarker SEVERITY_WARNING ImageFactory getImage IMAGE_WARNING_PATH IMarker SEVERITY_INFO ImageFactory getImage IMAGE_INFO_PATH
public int compare Object obj1 Object obj2 if obj1 null obj2 null obj1 instanceof Problem Marker obj2 instanceof Problem Marker return 0 int severity1 Problem Marker obj1 get Severity int severity2 Problem Marker obj2 get Severity return severity1 severity2  ProblemMarker ProblemMarker ProblemMarker getSeverity ProblemMarker getSeverity

Creates the action public Filters Action Marker View view super Messages get String filters Action title NON NLS 1 set Image Descriptor Image Factory get Image Descriptor elcl16 filter ps gif NON NLS 1 set Tool Tip Text Messages get String filters Action tooltip NON NLS 1 this view view set Enabled true  FiltersAction MarkerView getString filtersAction setImageDescriptor ImageFactory getImageDescriptor filter_ps setToolTipText getString filtersAction setEnabled
Opens the dialog Notifies the view if the filter has been modified public void run view open Filters Dialog  openFiltersDialog

public interface I Deferred Table Content Provider public Object get Elements I Progress Monitor monitor  IDeferredTableContentProvider getElements IProgressMonitor

public interface I Field return the description of the field String get Description  IField getDescription
String get Description return the image associated with the description of the field or code null code Image get Description Image  getDescription getDescriptionImage
Image get Description Image return The text to be displayed in the column header for this field String get Column Header Text  getDescriptionImage getColumnHeaderText
String get Column Header Text return The image to be displayed in the column header for this field or code null code Image get Column Header Image  getColumnHeaderText getColumnHeaderImage
param obj return The String value of the object for this particular field to be displayed to the user 
param obj return The image value of the object for this particular field to be displayed to the user or code null code 
param obj1 param obj2 return Either li a negative number if the value of obj1 is less than the value of obj2 for this field li code 0 code if the value of obj1 and the value of obj2 are equal for this field li a positive number if the value of obj1 is greater than the value of obj2 for this field 

Filters the list of elements Removes the elements that need to filtered out from the list param elements 
param item return ul li code true code if the item will make it through the filter li li code false code if the item will not make it through the filter li ul 

param additions new items added param removals items removed param changes changed items 

private static Image Descriptor create String path try URL url Platform get Plugin PlatformUI PLUGIN ID get Descriptor get InstallURL url new URL url icons full path NON NLS 1 return Image Descriptor create FromURL url catch MalformedURL Exception e MalformedURL return null  ImageDescriptor getPlugin PLUGIN_ID getDescriptor getInstallURL ImageDescriptor createFromURL MalformedURLException eMalformedURL
Returns an image for the given path or code null code if an image could not be created param path the path of the image relative to org eclipse ui icons full return the image located at the specified path or code null code if no image could be created public static Image get Image String path Image image Image image Registry get path if image null Image Descriptor image Descriptor get Image Descriptor path if image Descriptor null image image Descriptor create Image false if image null System err println Image Factory class error creating image for path NON NLS 1 image Registry put path image return image  getImage imageRegistry ImageDescriptor imageDescriptor getImageDescriptor imageDescriptor imageDescriptor createImage ImageFactory imageRegistry
Returns an image descriptor for the given path or code null code if no image could be found param path the path of the image relative to org eclipse ui icons full return an image descriptor or code null code if no image was found at the specified path public static Image Descriptor get Image Descriptor String path Image Descriptor image Descriptor Image Descriptor map get path if image Descriptor null image Descriptor create path map put path image Descriptor return image Descriptor  ImageDescriptor getImageDescriptor ImageDescriptor imageDescriptor ImageDescriptor imageDescriptor imageDescriptor imageDescriptor imageDescriptor

param additions new markers added param removals markers removed param changes changed markers 

Returns the resource to query for the markers to display for the given adaptable param adaptable the adaptable being queried return the resource or code null code if there is no adapted resource for this object 

public interface I Table Listener public void contents Found Collection contents  ITableListener contentsFound
public interface I Table Listener public void contents Found Collection contents public void invalid  ITableListener contentsFound
public void contents Found Collection contents public void invalid public void drawable  contentsFound

public interface I Table View Content Provider public Object get Elements  ITableViewContentProvider getElements
public Object get Elements public I Filter get Filter  getElements IFilter getFilter
public Object get Elements public I Filter get Filter public void set Filter I Filter filter  getElements IFilter getFilter setFilter IFilter
public I Filter get Filter public void set Filter I Filter filter public void add Items Changed Listener I Items Changed Listener listener  IFilter getFilter setFilter IFilter addItemsChangedListener IItemsChangedListener
public void set Filter I Filter filter public void add Items Changed Listener I Items Changed Listener listener public void remove Items Changed Listener I Items Changed Listener listener  setFilter IFilter addItemsChangedListener IItemsChangedListener removeItemsChangedListener IItemsChangedListener

Marker Filter String root Types types Model new Marker Types Model for int i 0 i root Types length i Marker Type type types Model get Type root Types i if this root Types contains type this root Types add type  MarkerFilter rootTypes typesModel MarkerTypesModel rootTypes MarkerType typesModel getType rootTypes rootTypes rootTypes
private void add All Sub Types for int i 0 i root Types size i Marker Type root Type Marker Type root Types get i add All Sub Types root Type  addAllSubTypes rootTypes MarkerType rootType MarkerType rootTypes addAllSubTypes rootType
private void add All Sub Types Marker Type type if type null return if selected Types contains type selected Types add type Marker Type sub Types type get Subtypes for int i 0 i sub Types length i add All Sub Types sub Types i  addAllSubTypes MarkerType selectedTypes selectedTypes MarkerType subTypes getSubtypes subTypes addAllSubTypes subTypes
Adds all markers in the given set of resources to the given list param result List param resources param marker Type Id param depth throws Core Exception private List find Markers I Resource resources int depth int limit I Progress Monitor mon boolean ignore Exceptions throws Core Exception if resources null return Collections EMPTY LIST List result List new Array List resources length 2 Optimization if a type appears in the selected Types list along with all of its subtypes then combine these in a single search List of types that haven t been replaced by one of their supertypes Hash Set types To Search new Hash Set selected Types size List of types that appeared in selected Types along with all of their subtypes Hash Set include All Subtypes new Hash Set selected Types size types To Search add All selected Types Iterator iter selected Types iterator while iter has Next Marker Type type Marker Type iter next Collection subtypes Arrays as List type get All Sub Types if selected Types contains All subtypes types To Search remove All subtypes include All Subtypes add type mon begin Task Messages get String Marker Filter searching types To Search size resources length NON NLS 1 Use this hash set to determine if there are any resources in the list that appear along with their parent Hash Set resources To Search new Hash Set Insert all the resources into the hashset for int idx 0 idx resources length idx I Resource next resources idx if next exists continue if resources To Search contains next mon worked types To Search size else resources To Search add next Iterate through all the selected resources for int resource Idx 0 resource Idx resources length resource Idx iter types To Search iterator I Resource resource resources resource Idx Skip resources that don t exist if resource is Accessible continue if depth I Resource DEPTH INFINITE Determine if any parent of this resource is also in our filter I Resource parent resource get Parent boolean found false while parent null if resources To Search contains parent found true parent parent get Parent If a parent of this resource is also in the filter we can skip it because we ll pick up its markers when we search the parent if found continue Iterate through all the marker types while iter has Next Marker Type marker Type Marker Type iter next Only search for subtypes of the marker if we found all of its subtypes in the filter criteria I Marker markers resource find Markers marker Type get Id include All Subtypes contains marker Type depth mon worked 1 for int idx 0 idx markers length idx Concrete Marker marker try marker Marker List create Marker markers idx catch Core Exception e if ignore Exceptions continue else throw e if limit 1 result List size limit return result List if select Marker marker result List add marker mon done return result List  resultList markerTypeId CoreException findMarkers IResource IProgressMonitor ignoreExceptions CoreException EMPTY_LIST resultList ArrayList selectedTypes HashSet typesToSearch HashSet selectedTypes selectedTypes HashSet includeAllSubtypes HashSet selectedTypes typesToSearch addAll selectedTypes selectedTypes hasNext MarkerType MarkerType asList getAllSubTypes selectedTypes containsAll typesToSearch removeAll includeAllSubtypes beginTask getString MarkerFilter typesToSearch HashSet resourcesToSearch HashSet IResource resourcesToSearch typesToSearch resourcesToSearch resourceIdx resourceIdx resourceIdx typesToSearch IResource resourceIdx isAccessible IResource DEPTH_INFINITE IResource getParent resourcesToSearch getParent hasNext MarkerType markerType MarkerType IMarker findMarkers markerType getId includeAllSubtypes markerType ConcreteMarker MarkerList createMarker CoreException ignoreExceptions resultList resultList selectMarker resultList resultList
Subclasses should override to determine if the given marker passes the filter param marker return code true code if the marker passes the filter and code false code otherwise protected boolean select Marker Concrete Marker marker return true  selectMarker ConcreteMarker
Searches the workspace for markers that pass this filter return Concrete Marker find Markers I Progress Monitor mon boolean ignore Exceptions throws Core Exception List unfiltered Collections EMPTY LIST if is Enabled unfiltered find Markers new I Resource Resources Plugin get Workspace get Root I Resource DEPTH INFINITE 1 mon ignore Exceptions else int limit get Filter On Marker Limit get Marker Limit 1 1 int limit 1 switch get On Resource case ON ANY RESOURCE unfiltered find Markers new I Resource Resources Plugin get Workspace get Root I Resource DEPTH INFINITE limit mon ignore Exceptions break case ON SELECTED RESOURCE ONLY unfiltered find Markers focus Resource I Resource DEPTH ZERO limit mon ignore Exceptions break case ON SELECTED RESOURCE AND CHILDREN unfiltered find Markers focus Resource I Resource DEPTH INFINITE limit mon ignore Exceptions break case ON ANY RESOURCE OF SAME PROJECT unfiltered find Markers get Projects focus Resource I Resource DEPTH INFINITE limit mon ignore Exceptions break case ON WORKING SET unfiltered find Markers get Resources In Working Set I Resource DEPTH INFINITE limit mon ignore Exceptions if unfiltered null unfiltered Collections EMPTY LIST return Concrete Marker unfiltered to Array new Concrete Marker unfiltered size  ConcreteMarker findMarkers IProgressMonitor ignoreExceptions CoreException EMPTY_LIST isEnabled findMarkers IResource ResourcesPlugin getWorkspace getRoot IResource DEPTH_INFINITE ignoreExceptions getFilterOnMarkerLimit getMarkerLimit getOnResource ON_ANY_RESOURCE findMarkers IResource ResourcesPlugin getWorkspace getRoot IResource DEPTH_INFINITE ignoreExceptions ON_SELECTED_RESOURCE_ONLY findMarkers focusResource IResource DEPTH_ZERO ignoreExceptions ON_SELECTED_RESOURCE_AND_CHILDREN findMarkers focusResource IResource DEPTH_INFINITE ignoreExceptions ON_ANY_RESOURCE_OF_SAME_PROJECT findMarkers getProjects focusResource IResource DEPTH_INFINITE ignoreExceptions ON_WORKING_SET findMarkers getResourcesInWorkingSet IResource DEPTH_INFINITE ignoreExceptions EMPTY_LIST ConcreteMarker toArray ConcreteMarker
I Resource get Resources In Working Set if working Set null return new I Resource 0 I Adaptable elements working Set get Elements List result new Array List elements length for int idx 0 idx elements length idx I Resource next I Resource elements idx get Adapter I Resource class if next null result add next return I Resource result to Array new I Resource result size  IResource getResourcesInWorkingSet workingSet IResource IAdaptable workingSet getElements ArrayList IResource IResource getAdapter IResource IResource toArray IResource
Returns a set of strings representing the full pathnames to every resource directly or indirectly contained in the working set A resource is in the working set iff its path name can be found in this set return private Set get Working Set As Set Of Paths if cached Working Set null Hash Set result new Hash Set add Resources And Children result get Resources In Working Set cached Working Set result return cached Working Set  getWorkingSetAsSetOfPaths cachedWorkingSet HashSet HashSet addResourcesAndChildren getResourcesInWorkingSet cachedWorkingSet cachedWorkingSet
Adds the paths of all resources in the given array to the given set private void add Resources And Children Hash Set result I Resource resources for int idx 0 idx resources length idx I Resource current Resource resources idx result add current Resource get Full Path to String if current Resource instanceof I Container I Container cont I Container current Resource try add Resources And Children result cont members catch Core Exception e Ignore errors  addResourcesAndChildren HashSet IResource IResource currentResource currentResource getFullPath toString currentResource IContainer IContainer IContainer currentResource addResourcesAndChildren CoreException
Returns the set of projects that contain the given set of resources param resources return static I Project get Projects I Resource resources if resources null return new I Project 0 Collection projects get Projects As Collection resources return I Project projects to Array new I Project projects size  IProject getProjects IResource IProject getProjectsAsCollection IProject toArray IProject
static Collection get Projects As Collection I Resource resources Hash Set projects new Hash Set for int idx 0 idx resources length idx projects add resources idx get Project return projects  getProjectsAsCollection IResource HashSet HashSet getProject
public boolean select Concrete Marker marker if is Enabled return true return select By Type marker select By Selection marker select Marker marker  ConcreteMarker isEnabled selectByType selectBySelection selectMarker
private boolean select By Type Concrete Marker marker return selected Types contains types Model get Type marker get Type  selectByType ConcreteMarker selectedTypes typesModel getType getType
Returns whether the specified marker should be filter out or not param marker the marker to test return true the marker should not be filtered out false the marker should be filtered out private boolean select By Selection Concrete Marker marker if on Resource ON ANY RESOURCE marker null return true if focus Resource null return true I Resource resource marker get Resource if on Resource ON WORKING SET if working Set null return true if resource null return is Enclosed resource else if on Resource ON ANY RESOURCE OF SAME PROJECT I Project project resource get Project if project null return false for int i 0 i focus Resource length i I Project selected Project focus Resource i get Project if selected Project null continue if project equals selected Project return true else if on Resource ON SELECTED RESOURCE ONLY for int i 0 i focus Resource length i if resource equals focus Resource i return true else if on Resource ON SELECTED RESOURCE AND CHILDREN for int i 0 i focus Resource length i I Resource parent Resource resource while parent Resource null if parent Resource equals focus Resource i return true parent Resource parent Resource get Parent return false  selectBySelection ConcreteMarker onResource ON_ANY_RESOURCE focusResource IResource getResource onResource ON_WORKING_SET workingSet isEnclosed onResource ON_ANY_RESOURCE_OF_SAME_PROJECT IProject getProject focusResource IProject selectedProject focusResource getProject selectedProject selectedProject onResource ON_SELECTED_RESOURCE_ONLY focusResource focusResource onResource ON_SELECTED_RESOURCE_AND_CHILDREN focusResource IResource parentResource parentResource parentResource focusResource parentResource parentResource getParent
Returns if the given resource is enclosed by a working set element Previous versions of this method used I Containment Adapter for containment tests For performance reasons this is no longer possible Code that relies on this behavior should be updated appropriately param element resource to test for enclosure by a working set element return true if element is enclosed by a working set element and false otherwise private boolean is Enclosed I Resource element if working Set null return false Set working Set Paths get Working Set As Set Of Paths return working Set Paths contains element get Full Path to String  IContainmentAdapter isEnclosed IResource workingSet workingSetPaths getWorkingSetAsSetOfPaths workingSetPaths getFullPath toString
return the defined limit on the number of markers to be displayed int get Marker Limit return marker Limit  getMarkerLimit markerLimit
Sets the limit on the number of markers to be displayed param the new limit void set Marker Limit int marker Limit this marker Limit marker Limit  setMarkerLimit markerLimit markerLimit markerLimit
return ul li code Marker Filter ON ANY RESOURCE code if showing items associated with any resource li li code Marker Filter ON SELECTED RESOURCE ONLY code if showing items associated with the selected resource within the workbench li li code Marker Filter ON SELECTED RESOURCE AND CHILDREN code if showing items associated with the selected resource within the workbench and its children li li code Marker Filter ON ANY RESOURCE OF SAME PROJECT code if showing items in the same project as the selected resource within the workbench li li code Marker Filter ON WORKING SET code if showing items in some working set li ul int get On Resource return on Resource  MarkerFilter ON_ANY_RESOURCE MarkerFilter ON_SELECTED_RESOURCE_ONLY MarkerFilter ON_SELECTED_RESOURCE_AND_CHILDREN MarkerFilter ON_ANY_RESOURCE_OF_SAME_PROJECT MarkerFilter ON_WORKING_SET getOnResource onResource
Sets the type of filtering by selection param on Resource must be one of ul li code Marker Filter ON ANY RESOURCE code li li code Marker Filter ON SELECTED RESOURCE ONLY code li li code Marker Filter ON SELECTED RESOURCE AND CHILDREN code li li code Marker Filter ON ANY RESOURCE OF SAME PROJECT code li li code Marker Filter ON WORKING SET code li ul void set On Resource int on Resource if on Resource ON ANY RESOURCE on Resource ON WORKING SET this on Resource on Resource  onResource MarkerFilter ON_ANY_RESOURCE MarkerFilter ON_SELECTED_RESOURCE_ONLY MarkerFilter ON_SELECTED_RESOURCE_AND_CHILDREN MarkerFilter ON_ANY_RESOURCE_OF_SAME_PROJECT MarkerFilter ON_WORKING_SET setOnResource onResource onResource ON_ANY_RESOURCE onResource ON_WORKING_SET onResource onResource
return the selected resource s withing the workbench I Resource get Focus Resource return focus Resource  IResource getFocusResource focusResource
Sets the focused resources public void set Focus Resource I Resource resources focus Resource resources  setFocusResource IResource focusResource
return ul li code true code if the filter is enabled li li code false code if the filter is not enabled li ul boolean is Enabled return enabled  isEnabled
return ul li code true code if filtering by marker limit is enabled li li code false code if filtering by marker limit is not enabled li ul boolean get Filter On Marker Limit return filter On Marker Limit  getFilterOnMarkerLimit filterOnMarkerLimit
return the root marker types List get Root Types return root Types  getRootTypes rootTypes
return the selected marker types to be displayed List get Selected Types return selected Types  getSelectedTypes selectedTypes
return the current working set or code null code if no working set is defined I Working Set get Working Set return working Set  IWorkingSet getWorkingSet workingSet
Sets the enablement state of the filter void set Enabled boolean enabled this enabled enabled  setEnabled
Sets the enablement state of filtering by marker limit void set Filter On Marker Limit boolean filter On Marker Limit this filter On Marker Limit filter On Marker Limit  setFilterOnMarkerLimit filterOnMarkerLimit filterOnMarkerLimit filterOnMarkerLimit
Sets the selected marker types to be displayed The List b MUST ONLY b contain code Marker Type code objects void set Selected Types List selected Types this selected Types selected Types  MarkerType setSelectedTypes selectedTypes selectedTypes selectedTypes
Sets the current working set void set Working Set I Working Set working Set this working Set working Set cached Working Set null  setWorkingSet IWorkingSet workingSet workingSet workingSet cachedWorkingSet
void reset State enabled DEFAULT ACTIVATION STATUS filter On Marker Limit DEFAULT FILTER ON MARKER LIMIT marker Limit DEFAULT MARKER LIMIT on Resource DEFAULT ON RESOURCE selected Types clear add All Sub Types set Working Set null  resetState DEFAULT_ACTIVATION_STATUS filterOnMarkerLimit DEFAULT_FILTER_ON_MARKER_LIMIT markerLimit DEFAULT_MARKER_LIMIT onResource DEFAULT_ON_RESOURCE selectedTypes addAllSubTypes setWorkingSet
public void restore State I Dialog Settings dialog Settings reset State I Dialog Settings settings dialog Settings get Section TAG DIALOG SECTION if settings null String setting settings get TAG ENABLED if setting null enabled Boolean value Of setting boolean Value setting settings get TAG FILTER ON MARKER LIMIT if setting null filter On Marker Limit Boolean value Of setting boolean Value setting settings get TAG MARKER LIMIT if setting null try marker Limit Integer parse Int setting catch Number Format Exception e Number Format setting settings get TAG ON RESOURCE if setting null try on Resource Integer parse Int setting catch Number Format Exception e Number Format setting settings get TAG SELECTED TYPES if setting null selected Types clear String Tokenizer string Tokenizer new String Tokenizer setting while string Tokenizer has More Tokens Marker Type marker Type types Model get Type string Tokenizer next Token TAG TYPES DELIMITER if marker Type null selected Types contains marker Type selected Types add marker Type setting settings get TAG WORKING SET if setting null set Working Set Workbench Plugin get Default get Working Set Manager get Working Set setting  restoreState IDialogSettings dialogSettings resetState IDialogSettings dialogSettings getSection TAG_DIALOG_SECTION TAG_ENABLED valueOf booleanValue TAG_FILTER_ON_MARKER_LIMIT filterOnMarkerLimit valueOf booleanValue TAG_MARKER_LIMIT markerLimit parseInt NumberFormatException eNumberFormat TAG_ON_RESOURCE onResource parseInt NumberFormatException eNumberFormat TAG_SELECTED_TYPES selectedTypes StringTokenizer stringTokenizer StringTokenizer stringTokenizer hasMoreTokens MarkerType markerType typesModel getType stringTokenizer nextToken TAG_TYPES_DELIMITER markerType selectedTypes markerType selectedTypes markerType TAG_WORKING_SET setWorkingSet WorkbenchPlugin getDefault getWorkingSetManager getWorkingSet
public void save State I Dialog Settings dialog Settings if dialog Settings null I Dialog Settings settings dialog Settings get Section TAG DIALOG SECTION if settings null settings dialog Settings add New Section TAG DIALOG SECTION settings put TAG ENABLED enabled settings put TAG FILTER ON MARKER LIMIT filter On Marker Limit settings put TAG MARKER LIMIT marker Limit settings put TAG ON RESOURCE on Resource String marker Type Ids NON NLS 1 for int i 0 i selected Types size i Marker Type marker Type Marker Type selected Types get i marker Type Ids marker Type get Id TAG TYPES DELIMITER settings put TAG SELECTED TYPES marker Type Ids if working Set null settings put TAG WORKING SET working Set get Name  saveState IDialogSettings dialogSettings dialogSettings IDialogSettings dialogSettings getSection TAG_DIALOG_SECTION dialogSettings addNewSection TAG_DIALOG_SECTION TAG_ENABLED TAG_FILTER_ON_MARKER_LIMIT filterOnMarkerLimit TAG_MARKER_LIMIT markerLimit TAG_ON_RESOURCE onResource markerTypeIds selectedTypes MarkerType markerType MarkerType selectedTypes markerTypeIds markerType getId TAG_TYPES_DELIMITER TAG_SELECTED_TYPES markerTypeIds workingSet TAG_WORKING_SET workingSet getName

I Field properties public Marker Label Provider I Field properties this properties properties  IField MarkerLabelProvider IField
public Image get Column Image Object element int column Index if element null element instanceof I Marker properties null column Index properties length return null return properties column Index get Image element  getColumnImage columnIndex IMarker columnIndex columnIndex getImage
public String get Column Text Object element int column Index if element null element instanceof I Marker properties null column Index properties length return NON NLS 1 return properties column Index get Value element  getColumnText columnIndex IMarker columnIndex columnIndex getValue

Creates an initially empty marker list public Marker List this new Concrete Marker 0  MarkerList ConcreteMarker
public Marker List Collection markers this Concrete Marker markers to Array new Concrete Marker markers size  MarkerList ConcreteMarker toArray ConcreteMarker
Creates a list containing the given set of markers param markers public Marker List Concrete Marker markers this markers markers  MarkerList ConcreteMarker
Clears any cached collation keys Use to free up some memory if the markers in this list won t be sorted for awhile public void clear Cache for int i 0 i markers length i Concrete Marker marker Concrete Marker markers i marker clear Cache marker Table null  clearCache ConcreteMarker ConcreteMarker clearCache markerTable
Returns the marker table or lazily creates it if it doesn t exist yet return a map of I Marker onto Concrete Marker containing all the Concrete Markers in the list private Map get Marker Map if marker Table null marker Table new Hash Map for int idx 0 idx markers length idx Concrete Marker marker markers idx marker Table put marker get Marker marker return marker Table  IMarker ConcreteMarker ConcreteMarkers getMarkerMap markerTable markerTable HashMap ConcreteMarker markerTable getMarker markerTable
Returns an existing marker from the list that is associated with the given I Marker param to Find the I Marker to lookup in the list return the Concrete Marker that corresponds to the given I Marker public Concrete Marker get Marker I Marker to Find return Concrete Marker get Marker Map get to Find  IMarker toFind IMarker ConcreteMarker IMarker ConcreteMarker getMarker IMarker toFind ConcreteMarker getMarkerMap toFind
public static Concrete Marker create Marker I Marker marker throws Core Exception if marker is Subtype Of I Marker TASK return new Task Marker marker else if marker is Subtype Of I Marker BOOKMARK return new Bookmark Marker marker else if marker is Subtype Of I Marker PROBLEM return new Problem Marker marker else return new Concrete Marker marker  ConcreteMarker createMarker IMarker CoreException isSubtypeOf IMarker TaskMarker isSubtypeOf IMarker BookmarkMarker isSubtypeOf IMarker ProblemMarker ConcreteMarker
public void refresh for int marker Idx 0 marker Idx markers length marker Idx Concrete Marker next markers marker Idx next refresh  markerIdx markerIdx markerIdx ConcreteMarker markerIdx
public List as List return Arrays as List markers  asList asList
public Marker List find Markers Collection ofI Marker List result new Array List ofI Marker size Iterator iter ofI Marker iterator while iter has Next I Marker next I Marker iter next Concrete Marker marker get Marker next if marker null result add marker return new Marker List result  MarkerList findMarkers ofIMarker ArrayList ofIMarker ofIMarker hasNext IMarker IMarker ConcreteMarker getMarker MarkerList
public static Concrete Marker create Markers I Marker source throws Core Exception Concrete Marker result new Concrete Marker source length for int idx 0 idx source length idx result idx create Marker source idx return result  ConcreteMarker createMarkers IMarker CoreException ConcreteMarker ConcreteMarker createMarker
Computes the set of markers that match the given filter param filter the filter to apply param mon the monitor to update param ignore Exceptions whether or not exception will be shown return Marker List throws Core Exception public static Marker List compute Marker Filter filter I Progress Monitor mon boolean ignore Exceptions throws Core Exception return new Marker List filter find Markers mon ignore Exceptions  ignoreExceptions MarkerList CoreException MarkerList MarkerFilter IProgressMonitor ignoreExceptions CoreException MarkerList findMarkers ignoreExceptions
Returns a new Marker List containing all markers in the workspace of the specified types param types return I Marker throws Core Exception public static I Marker compute String types throws Core Exception Array List result new Array List I Resource input Resources Plugin get Workspace get Root for int i 0 i types length i I Marker new Markers input find Markers types i true I Resource DEPTH INFINITE result add All Arrays as List new Markers return I Marker result to Array new I Marker result size  MarkerList IMarker CoreException IMarker CoreException ArrayList ArrayList IResource ResourcesPlugin getWorkspace getRoot IMarker newMarkers findMarkers IResource DEPTH_INFINITE addAll asList newMarkers IMarker toArray IMarker
Returns the markers in the list Read only return an array of markers in the list public Concrete Marker to Array return markers  ConcreteMarker toArray
Returns the number of items in the list return the number of items public int get Item Count return markers length  getItemCount
Returns the number of error markers in the list return the number of errors public int get Errors return get Marker Counts I Marker SEVERITY ERROR  getErrors getMarkerCounts IMarker SEVERITY_ERROR
Returns the number of info markers in the list return the number of info markers public int get Infos return get Marker Counts I Marker SEVERITY INFO  getInfos getMarkerCounts IMarker SEVERITY_INFO
Returns the number of warning markers in the list return the number of warning markers public int get Warnings return get Marker Counts I Marker SEVERITY WARNING  getWarnings getMarkerCounts IMarker SEVERITY_WARNING
Returns an array of marker counts where get Marker Counts severity is the number of markers in the list with the given severity return an array of marker counts private int get Marker Counts if marker Counts null marker Counts new int 0 0 0 for int idx 0 idx markers length idx Concrete Marker marker markers idx if marker instanceof Problem Marker int severity Problem Marker markers idx get Severity if severity 0 severity 2 marker Counts severity return marker Counts  getMarkerCounts getMarkerCounts markerCounts markerCounts ConcreteMarker ProblemMarker ProblemMarker getSeverity markerCounts markerCounts

private Listener List listeners new Listener List public Marker Registry  ListenerList ListenerList MarkerRegistry
Disposes the registry releasing all listeners and any other allocated resources public void dispose listeners clear set Input null  setInput
return a filtered sorted list of markers public Object get Elements Object elements get Unfiltered Elements if filter null Object filtered Items filter filter elements return filtered Items return elements  getElements getUnfilteredElements filteredItems filteredItems
return an unfiltered list of elements public Object get Unfiltered Elements if input null return new Object 0 List elements new Array List for int i 0 i types length i try I Marker new Markers input find Markers types i true I Resource DEPTH INFINITE elements add All Arrays as List new Markers catch Core Exception e return elements to Array  getUnfilteredElements ArrayList IMarker newMarkers findMarkers IResource DEPTH_INFINITE addAll asList newMarkers CoreException toArray
return the registry s filter or code null code if no filter has been assigned to the registry public I Filter get Filter return filter  IFilter getFilter
return the registry s input resource public I Resource get Input return input  IResource getInput
Sets the registry s filter param filter public void set Filter I Filter filter if this filter null this filter equals filter this filter filter  setFilter IFilter
Sets the registry s input resource param resource public void set Input I Resource resource if input null if input equals resource return input get Workspace remove Resource Change Listener this input resource if input null resource get Workspace add Resource Change Listener this  setInput IResource getWorkspace removeResourceChangeListener getWorkspace addResourceChangeListener
return the base marker types that the registry is tracking public String get Types return types  getTypes
Sets the base marker types to track By default the registry will search for all markers of these types and their subtypes param types public void set Types String types if types null this types new String 0 else this types types  setTypes
Convenience method used if only interested in one base marker type param type public void set Type String type set Types new String type  setType setTypes
public void resource Changed I Resource Change Event event gather all marker changes from the delta be sure to do this in the calling thread as the delta is destroyed when this method returns final List additions new Array List final List removals new Array List final List changes new Array List I Resource Delta delta event get Delta if delta null return get Marker Deltas delta additions removals changes filter additions and changes but not removals since they have already been deleted filter List additions filter List changes notify Listeners additions removals changes  resourceChanged IResourceChangeEvent ArrayList ArrayList ArrayList IResourceDelta getDelta getMarkerDeltas filterList filterList notifyListeners
Recursively walks over the resource delta and gathers all marker deltas Marker deltas are placed into one of the two given lists depending on the type of delta add or remove private void get Marker Deltas I Resource Delta delta List additions List removals List changes I Marker Delta marker Deltas delta get Marker Deltas for int i 0 i marker Deltas length i I Marker Delta marker Delta marker Deltas i I Marker marker marker Delta get Marker switch marker Delta get Kind case I Resource Delta ADDED boolean added false for int j 0 j types length added j if marker Delta is Subtype Of types j additions add marker added true break case I Resource Delta REMOVED boolean added false for int j 0 j types length added j if marker Delta is Subtype Of types j removals add marker added true break case I Resource Delta CHANGED boolean added false for int j 0 j types length added j if marker Delta is Subtype Of types j changes add marker added true break recurse on child deltas I Resource Delta children delta get Affected Children for int i 0 i children length i get Marker Deltas children i additions removals changes  getMarkerDeltas IResourceDelta IMarkerDelta markerDeltas getMarkerDeltas markerDeltas IMarkerDelta markerDelta markerDeltas IMarker markerDelta getMarker markerDelta getKind IResourceDelta markerDelta isSubtypeOf IResourceDelta markerDelta isSubtypeOf IResourceDelta markerDelta isSubtypeOf IResourceDelta getAffectedChildren getMarkerDeltas
private void notify Listeners List additions List removals List changes Object listeners this listeners get Listeners for int i 0 i listeners length i I Items Changed Listener listener I Items Changed Listener listeners i listener items Changed additions removals changes  notifyListeners getListeners IItemsChangedListener IItemsChangedListener itemsChanged
see org eclipse ui views internal tableview I Table View Content Provider add Items Changed Listener org eclipse ui views internal tableview I Items Changed Listener public void add Items Changed Listener I Items Changed Listener listener listeners add listener  ITableViewContentProvider addItemsChangedListener IItemsChangedListener addItemsChangedListener IItemsChangedListener
see org eclipse ui views internal tableview I Table View Content Provider remove Items Changed Listener org eclipse ui views internal tableview I Items Changed Listener public void remove Items Changed Listener I Items Changed Listener listener listeners remove listener  ITableViewContentProvider removeItemsChangedListener IItemsChangedListener removeItemsChangedListener IItemsChangedListener
return the number of items public int get Item Count TODO do this more efficiently return get Elements length  getItemCount getElements
public int get Raw Item Count TODO do this more efficiently return get Unfiltered Elements length  getRawItemCount getUnfilteredElements
private void filter List List list if filter null list null return int i 0 while i list size if filter select list get i i else list remove i  filterList

Creates a new marker type public Marker Type Marker Types Model model String id String label String supertype Ids this model model this id id this label label this supertype Ids supertype Ids  MarkerType MarkerTypesModel supertypeIds supertypeIds supertypeIds
Returns all this type s supertypes public Marker Type get All Supertypes Array List result new Array List get All Supertypes result return Marker Type result to Array new Marker Type result size  MarkerType getAllSupertypes ArrayList ArrayList getAllSupertypes MarkerType toArray MarkerType
Appends all this type s supertypes to the given list private void get All Supertypes Array List result Marker Type supers get Supertypes for int i 0 i supers length i Marker Type sup supers i if result contains sup result add sup sup get All Supertypes result  getAllSupertypes ArrayList MarkerType getSupertypes MarkerType getAllSupertypes
Returns the marker type id public String get Id return id  getId
Returns the human readable label for this marker type public String get Label return label  getLabel
Returns the types which have this type as a direct supertype return the direct subtypes of this type public Marker Type get Subtypes Marker Type types model get Types Array List result new Array List for int i 0 i types length i Marker Type type types i String supers type get Supertype Ids for int j 0 j supers length j if supers j equals id result add type return Marker Type result to Array new Marker Type result size  MarkerType getSubtypes MarkerType getTypes ArrayList ArrayList MarkerType getSupertypeIds MarkerType toArray MarkerType
public Marker Type get All Sub Types List sub Types new Array List add Sub Types sub Types this Marker Type subs new Marker Type sub Types size sub Types to Array subs return subs  MarkerType getAllSubTypes subTypes ArrayList addSubTypes subTypes MarkerType MarkerType subTypes subTypes toArray
private void add Sub Types List list Marker Type super Type Marker Type sub Types super Type get Subtypes for int i 0 i sub Types length i Marker Type sub Type sub Types i if list contains sub Type list add sub Type add Sub Types list sub Type  addSubTypes MarkerType superType MarkerType subTypes superType getSubtypes subTypes MarkerType subType subTypes subType subType addSubTypes subType
Returns the marker type ids for this type s supertypes public String get Supertype Ids return supertype Ids  getSupertypeIds supertypeIds
Returns this type s direct supertypes public Marker Type get Supertypes Array List result new Array List for int i 0 i supertype Ids length i Marker Type sup model get Type supertype Ids i if sup null result add sup return Marker Type result to Array new Marker Type result size  MarkerType getSupertypes ArrayList ArrayList supertypeIds MarkerType getType supertypeIds MarkerType toArray MarkerType
Returns whether this marker type is considered to be a subtype of the given marker type return boolean code true code if this type is the same as or a subtype of the given type public boolean is Subtype Of Marker Type super Type if id equals super Type get Id return true for int i 0 i supertype Ids length i Marker Type sup model get Type supertype Ids i if sup null sup is Subtype Of super Type return true return false  isSubtypeOf MarkerType superType superType getId supertypeIds MarkerType getType supertypeIds isSubtypeOf superType
public boolean equals Object other if other instanceof Marker Type return false return Marker Type other get Id equals this id  MarkerType MarkerType getId

Creates a new marker types model public Marker Types Model types read Types  MarkerTypesModel readTypes
Returns the marker type with the given id or code null code if there is no such marker type public Marker Type get Type String id return Marker Type types get id  MarkerType getType MarkerType
Returns all known marker types public Marker Type get Types Marker Type result new Marker Type types size types values to Array result return result  MarkerType getTypes MarkerType MarkerType toArray
Returns the label for the given marker type Workaround until we have labels in XML private String get Well Known Label String type if type equals I Marker PROBLEM return Problem NON NLS 1 if type equals I Marker TASK return Task NON NLS 1 if type equals org eclipse jdt core problem NON NLS 1 return Java Problem NON NLS 1 return type  getWellKnownLabel IMarker IMarker
Reads the marker types from the registry private Hash Map read Types Hash Map types new Hash Map I Extension Point point Platform get Plugin Registry get Extension Point Resources Plugin PI RESOURCES Resources Plugin PT MARKERS if point null Gather all registered marker types I Extension extensions point get Extensions for int i 0 i extensions length i I Extension ext extensions i String id ext get Unique Identifier String label ext get Label if label equals NON NLS 1 label get Well Known Label id Array List supers List new Array List I Configuration Element config Elements ext get Configuration Elements for int j 0 j config Elements length j I Configuration Element elt config Elements j if elt get Name equals Ignore Case super NON NLS 1 String sup elt get Attribute type NON NLS 1 if sup null supers List add sup String super Types new String supers List size supers List to Array super Types Marker Type type new Marker Type this id label super Types types put id type return types  HashMap readTypes HashMap HashMap IExtensionPoint getPluginRegistry getExtensionPoint ResourcesPlugin PI_RESOURCES ResourcesPlugin PT_MARKERS IExtension getExtensions IExtension getUniqueIdentifier getLabel getWellKnownLabel ArrayList supersList ArrayList IConfigurationElement configElements getConfigurationElements configElements IConfigurationElement configElements getName equalsIgnoreCase getAttribute supersList superTypes supersList supersList toArray superTypes MarkerType MarkerType superTypes

I Resource Change Listener resource Listener new I Resource Change Listener public void resource Changed I Resource Change Event event String marker Types get Marker Types boolean refresh Needed false for int idx 0 idx marker Types length idx I Marker Delta marker Deltas event find Marker Deltas marker Types idx true List changes new Array List marker Deltas length examine Delta marker Deltas changes if marker Deltas length changes size refresh Needed true Marker List changed current Markers find Markers changes changed refresh change changed as List Refresh everything if markers were added or removed if refresh Needed marker Count Dirty true refresh  IResourceChangeListener resourceListener IResourceChangeListener resourceChanged IResourceChangeEvent markerTypes getMarkerTypes refreshNeeded markerTypes IMarkerDelta markerDeltas findMarkerDeltas markerTypes ArrayList markerDeltas examineDelta markerDeltas markerDeltas refreshNeeded MarkerList currentMarkers findMarkers asList refreshNeeded markerCountDirty
private I Selection Listener focus Listener new I Selection Listener public void selection Changed I Workbench Part part I Selection selection Marker View this focus Selection Changed part selection  ISelectionListener focusListener ISelectionListener selectionChanged IWorkbenchPart ISelection MarkerView focusSelectionChanged
private void internal Refresh I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception int marker Limit get Marker Limit monitor begin Task Messages get String Marker View 19 marker Limit 1 60 100 NON NLS 1 halt Table Updates I Job Manager job Man Platform get Job Manager I Workspace Root root Resources Plugin get Workspace get Root try monitor sub Task WAITING FOR WORKSPACE CHANGES TO FINISH job Man begin Rule root monitor if monitor is Canceled return monitor sub Task SEARCHING FOR MARKERS Sub Progress Monitor sub Monitor new Sub Progress Monitor monitor 10 current Markers Marker List compute get Filter sub Monitor true if monitor is Canceled return if marker Count Dirty monitor sub Task REFRESHING MARKER COUNTS total Markers Marker List compute get Marker Types length marker Count Dirty false catch Core Exception e throw new Invocation Target Exception e finally job Man end Rule root if monitor is Canceled return Exit immediately if the markers have changed in the meantime Collection markers Arrays as List current Markers to Array if marker Limit 1 monitor sub Task FILTERING ON MARKER LIMIT Sub Progress Monitor mon new Sub Progress Monitor monitor 40 markers Sort Util get First markers get Sorter marker Limit mon if monitor is Canceled return current Markers new Marker List markers monitor sub Task QUEUEING VIEWER UPDATES Sub Progress Monitor sub new Sub Progress Monitor monitor 50 set Contents markers sub if monitor is Canceled return ui Job schedule try ui Job join catch Interrupted Exception e monitor done monitor done  internalRefresh IProgressMonitor InvocationTargetException InterruptedException markerLimit getMarkerLimit beginTask getString MarkerView markerLimit haltTableUpdates IJobManager jobMan getJobManager IWorkspaceRoot ResourcesPlugin getWorkspace getRoot subTask WAITING_FOR_WORKSPACE_CHANGES_TO_FINISH jobMan beginRule isCanceled subTask SEARCHING_FOR_MARKERS SubProgressMonitor subMonitor SubProgressMonitor currentMarkers MarkerList getFilter subMonitor isCanceled markerCountDirty subTask REFRESHING_MARKER_COUNTS totalMarkers MarkerList getMarkerTypes markerCountDirty CoreException InvocationTargetException jobMan endRule isCanceled asList currentMarkers toArray markerLimit subTask FILTERING_ON_MARKER_LIMIT SubProgressMonitor SubProgressMonitor SortUtil getFirst getSorter markerLimit isCanceled currentMarkers MarkerList subTask QUEUEING_VIEWER_UPDATES SubProgressMonitor SubProgressMonitor setContents isCanceled uiJob uiJob InterruptedException
Messages format Marker View refresh Title new Object get Title NON NLS 1 new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception internal Refresh monitor  MarkerView refreshTitle getTitle IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException internalRefresh
Causes the view to re sync its contents with the workspace Note that changes will be scheduled in a background job and may not take effect immediately protected void refresh if ui Job null createUI Job if refresh Job null refresh Job new Restartable Job Messages format Marker View refresh Title new Object get Title NON NLS 1 new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception internal Refresh monitor get Progress Service refresh Job restart  uiJob createUIJob refreshJob refreshJob RestartableJob MarkerView refreshTitle getTitle IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException internalRefresh getProgressService refreshJob
public void init I View Site site I Memento memento throws Part Init Exception super init site memento get Progress Service show Busy For Family Resources Plugin FAMILY MANUAL BUILD get Progress Service show Busy For Family Resources Plugin FAMILY AUTO BUILD  IViewSite IMemento PartInitException getProgressService showBusyForFamily ResourcesPlugin FAMILY_MANUAL_BUILD getProgressService showBusyForFamily ResourcesPlugin FAMILY_AUTO_BUILD
public void create Part Control Composite parent clipboard new Clipboard parent get Display super create Part Control parent init Drag And Drop get Site get Page add Selection Listener focus Listener focus Selection Changed get Site get Page get Active Part get Site get Page get Selection Resources Plugin get Workspace add Resource Change Listener resource Listener refresh Set help on the view itself get Viewer get Control add Help Listener new Help Listener non Javadoc see org eclipse swt events Help Listener help Requested org eclipse swt events Help Event public void help Requested Help Event e String context Id null See if there is a context registered for the current selection Concrete Marker marker Concrete Marker I Structured Selection get Viewer get Selection get First Element if marker null context Id IDE get Marker Help Registry get Help marker get Marker if context Id null context Id PlatformUI PLUGIN ID task list view context Workbench Help display Help context Id  createPartControl getDisplay createPartControl initDragAndDrop getSite getPage addSelectionListener focusListener focusSelectionChanged getSite getPage getActivePart getSite getPage getSelection ResourcesPlugin getWorkspace addResourceChangeListener resourceListener getViewer getControl addHelpListener HelpListener HelpListener helpRequested HelpEvent helpRequested HelpEvent contextId ConcreteMarker ConcreteMarker IStructuredSelection getViewer getSelection getFirstElement contextId getMarkerHelpRegistry getHelp getMarker contextId contextId PLUGIN_ID task_list_view_context WorkbenchHelp displayHelp contextId
protected void viewer Selection Changed I Structured Selection selection Object raw Selection selection to Array I Marker markers new I Marker raw Selection length for int idx 0 idx raw Selection length idx markers idx Concrete Marker raw Selection idx get Marker set Selection new Structured Selection markers update Status Message selection  viewerSelectionChanged IStructuredSelection rawSelection toArray IMarker IMarker rawSelection rawSelection ConcreteMarker rawSelection getMarker setSelection StructuredSelection updateStatusMessage
public void dispose super dispose Resources Plugin get Workspace remove Resource Change Listener resource Listener get Site get Page remove Selection Listener focus Listener dispose of selection provider actions open Action dispose copy Action dispose select All Action dispose delete Action dispose reveal Action dispose show In Navigator Action dispose properties Action dispose clipboard dispose  ResourcesPlugin getWorkspace removeResourceChangeListener resourceListener getSite getPage removeSelectionListener focusListener openAction copyAction selectAllAction deleteAction revealAction showInNavigatorAction propertiesAction
protected void create Actions Table Viewer viewer get Viewer reveal Action new Action Reveal Marker this get Selection Provider open Action new Action Open Marker this get Selection Provider copy Action new Action Copy Marker this get Selection Provider copy Action set Clipboard clipboard copy Action set Properties get Fields paste Action new Action Paste Marker this get Selection Provider paste Action set Clipboard clipboard paste Action set Pastable Types get Marker Types delete Action new Action Remove Marker this get Selection Provider select All Action new Action Select All viewer show In Navigator Action new Show In Navigator Action get View Site get Page get Selection Provider properties Action new Action Marker Properties this get Selection Provider super create Actions put Action FILTERS ACTION ID new Filters Action this  createActions TableViewer getViewer revealAction ActionRevealMarker getSelectionProvider openAction ActionOpenMarker getSelectionProvider copyAction ActionCopyMarker getSelectionProvider copyAction setClipboard copyAction setProperties getFields pasteAction ActionPasteMarker getSelectionProvider pasteAction setClipboard pasteAction setPastableTypes getMarkerTypes deleteAction ActionRemoveMarker getSelectionProvider selectAllAction ActionSelectAll showInNavigatorAction ShowInNavigatorAction getViewSite getPage getSelectionProvider propertiesAction ActionMarkerProperties getSelectionProvider createActions putAction FILTERS_ACTION_ID FiltersAction
protected abstract String get Marker Types  getMarkerTypes
protected void init Tool Bar I Tool Bar Manager tbm tbm add delete Action tbm add get Action Table View FILTERS ACTION ID tbm update false  initToolBar IToolBarManager deleteAction getAction TableView FILTERS_ACTION_ID
protected void register Global Actions I Action Bars action Bars action Bars set Global Action Handler Action Factory COPY get Id copy Action action Bars set Global Action Handler Action Factory PASTE get Id paste Action action Bars set Global Action Handler Action Factory DELETE get Id delete Action action Bars set Global Action Handler Action Factory SELECT ALL get Id select All Action action Bars set Global Action Handler Action Factory PROPERTIES get Id properties Action  registerGlobalActions IActionBars actionBars actionBars setGlobalActionHandler ActionFactory getId copyAction actionBars setGlobalActionHandler ActionFactory getId pasteAction actionBars setGlobalActionHandler ActionFactory getId deleteAction actionBars setGlobalActionHandler ActionFactory SELECT_ALL getId selectAllAction actionBars setGlobalActionHandler ActionFactory getId propertiesAction
Transfer transfer Types new Transfer Marker Transfer get Instance Text Transfer get Instance Drag Source Listener listener new Drag Source Adapter public void drag Set Data Drag Source Event event perform Drag Set Data event  transferTypes MarkerTransfer getInstance TextTransfer getInstance DragSourceListener DragSourceAdapter dragSetData DragSourceEvent performDragSetData
perform Drag Set Data event public void drag Finished Drag Source Event event  performDragSetData dragFinished DragSourceEvent
protected void init Drag And Drop int operations DND DROP COPY Transfer transfer Types new Transfer Marker Transfer get Instance Text Transfer get Instance Drag Source Listener listener new Drag Source Adapter public void drag Set Data Drag Source Event event perform Drag Set Data event public void drag Finished Drag Source Event event get Viewer add Drag Support operations transfer Types listener  initDragAndDrop DROP_COPY transferTypes MarkerTransfer getInstance TextTransfer getInstance DragSourceListener DragSourceAdapter dragSetData DragSourceEvent performDragSetData dragFinished DragSourceEvent getViewer addDragSupport transferTypes
The user is attempting to drag marker data Add the appropriate data to the event depending on the transfer type private void perform Drag Set Data Drag Source Event event if Marker Transfer get Instance is Supported Type event data Type event data I Structured Selection get Viewer get Selection to Array return if Text Transfer get Instance is Supported Type event data Type List selection I Structured Selection get Viewer get Selection to List try I Marker markers new I Marker selection size selection to Array markers if markers null event data copy Action create Marker Report markers catch Array Store Exception e  performDragSetData DragSourceEvent MarkerTransfer getInstance isSupportedType dataType IStructuredSelection getViewer getSelection toArray TextTransfer getInstance isSupportedType dataType IStructuredSelection getViewer getSelection toList IMarker IMarker toArray copyAction createMarkerReport ArrayStoreException
protected void fill Context Menu I Menu Manager manager if manager null return manager add open Action manager add show In Navigator Action manager add new Separator manager add copy Action paste Action update Enablement manager add paste Action manager add delete Action manager add select All Action fill Context Menu Additions manager manager add new Separator I Workbench Action Constants MB ADDITIONS manager add new Separator manager add properties Action  fillContextMenu IMenuManager openAction showInNavigatorAction copyAction pasteAction updateEnablement pasteAction deleteAction selectAllAction fillContextMenuAdditions IWorkbenchActionConstants MB_ADDITIONS propertiesAction
protected void fill Context Menu Additions I Menu Manager manager  fillContextMenuAdditions IMenuManager
see org eclipse ui views internal tableview Table View get Filter protected abstract Marker Filter get Filter  TableView getFilter MarkerFilter getFilter
protected void handle Key Pressed Key Event event if event character SWT DEL event state Mask 0 delete Action is Enabled delete Action run  handleKeyPressed KeyEvent stateMask deleteAction isEnabled deleteAction
see org eclipse ui views internal tableview Table View handle Open Event org eclipse jface viewers Open Event protected void handle Open Event Open Event event open Action run  TableView handleOpenEvent OpenEvent handleOpenEvent OpenEvent openAction
protected void save Selection I Memento memento I Structured Selection selection I Structured Selection get Viewer get Selection I Memento selection Mem memento create Child TAG SELECTION for Iterator iterator selection iterator iterator has Next Concrete Marker marker Concrete Marker iterator next I Memento element Mem selection Mem create Child TAG MARKER element Mem put String TAG RESOURCE marker get Marker get Resource get Full Path to String element Mem put String TAG ID String value Of marker get Marker get Id  saveSelection IMemento IStructuredSelection IStructuredSelection getViewer getSelection IMemento selectionMem createChild TAG_SELECTION hasNext ConcreteMarker ConcreteMarker IMemento elementMem selectionMem createChild TAG_MARKER elementMem putString TAG_RESOURCE getMarker getResource getFullPath toString elementMem putString TAG_ID valueOf getMarker getId
protected I Structured Selection restore Selection I Memento memento if memento null return new Structured Selection I Workspace Root root Resources Plugin get Workspace get Root I Memento selection Memento memento get Child TAG SELECTION if selection Memento null return new Structured Selection Array List selection List new Array List I Memento marker Mems selection Memento get Children TAG MARKER for int i 0 i marker Mems length i try long id new Long marker Mems i get String TAG ID long Value I Resource resource root find Member marker Mems i get String TAG RESOURCE if resource null I Marker marker resource find Marker id if marker null selection List add current Markers get Marker marker catch Core Exception e return new Structured Selection selection List  IStructuredSelection restoreSelection IMemento StructuredSelection IWorkspaceRoot ResourcesPlugin getWorkspace getRoot IMemento selectionMemento getChild TAG_SELECTION selectionMemento StructuredSelection ArrayList selectionList ArrayList IMemento markerMems selectionMemento getChildren TAG_MARKER markerMems markerMems getString TAG_ID longValue IResource findMember markerMems getString TAG_RESOURCE IMarker findMarker selectionList currentMarkers getMarker CoreException StructuredSelection selectionList
protected abstract String get Root Types  getRootTypes
param part param selection protected void focus Selection Changed I Workbench Part part I Selection selection List resources new Array List if part instanceof I Editor Part I Editor Input input I Editor Part part get Editor Input if input instanceof File Editor Input resources add File Editor Input input get File else if selection instanceof I Structured Selection for Iterator iterator I Structured Selection selection iterator iterator has Next Object object iterator next if object instanceof I Adaptable I Task List Resource Adapter task List Resource Adapter Object adapter I Adaptable object get Adapter I Task List Resource Adapter class if adapter null adapter instanceof I Task List Resource Adapter task List Resource Adapter I Task List Resource Adapter adapter else task List Resource Adapter Default Marker Resource Adapter get Default I Resource resource task List Resource Adapter get Affected Resource I Adaptable object if resource null resources add resource I Resource focus new I Resource resources size resources to Array focus update Focus Resource focus  focusSelectionChanged IWorkbenchPart ISelection ArrayList IEditorPart IEditorInput IEditorPart getEditorInput FileEditorInput FileEditorInput getFile IStructuredSelection IStructuredSelection hasNext IAdaptable ITaskListResourceAdapter taskListResourceAdapter IAdaptable getAdapter ITaskListResourceAdapter ITaskListResourceAdapter taskListResourceAdapter ITaskListResourceAdapter taskListResourceAdapter DefaultMarkerResourceAdapter getDefault IResource taskListResourceAdapter getAffectedResource IAdaptable IResource IResource toArray updateFocusResource
param resources 
void update Focus Resource I Resource resources boolean update Needed update Needed focus Resources resources focus Resources resources update Filter Selection resources if update Needed refresh  updateFocusResource IResource updateNeeded updateNeeded focusResources focusResources updateFilterSelection updateNeeded
private boolean update Needed I Resource old Resources I Resource new Resources determine if an update if refiltering is required Marker Filter filter get Filter if filter is Enabled return false int on Resource filter get On Resource if on Resource Marker Filter ON ANY RESOURCE on Resource Marker Filter ON WORKING SET return false if new Resources null new Resources length 1 return false if old Resources null old Resources length 1 return true if Arrays equals old Resources new Resources return false if on Resource Marker Filter ON ANY RESOURCE OF SAME PROJECT Collection old Projects Marker Filter get Projects As Collection old Resources Collection new Projects Marker Filter get Projects As Collection new Resources if old Projects size new Projects size return new Projects contains All old Projects else return true return true  updateNeeded IResource oldResources IResource newResources MarkerFilter getFilter isEnabled onResource getOnResource onResource MarkerFilter ON_ANY_RESOURCE onResource MarkerFilter ON_WORKING_SET newResources newResources oldResources oldResources oldResources newResources onResource MarkerFilter ON_ANY_RESOURCE_OF_SAME_PROJECT oldProjects MarkerFilter getProjectsAsCollection oldResources newProjects MarkerFilter getProjectsAsCollection newResources oldProjects newProjects newProjects containsAll oldProjects
Returns the marker limit or 1 if unlimited return private int get Marker Limit Marker Filter filter get Filter if filter is Enabled filter get Filter On Marker Limit return 1 return filter get Marker Limit  getMarkerLimit MarkerFilter getFilter isEnabled getFilterOnMarkerLimit getMarkerLimit
private boolean within Marker Limit int to Test int limit get Marker Limit return limit 1 to Test limit  withinMarkerLimit toTest getMarkerLimit toTest
void update Title String current Title get Title String view Name get Configuration Element get Attribute name NON NLS 1 String status NON NLS 1 int filtered Count current Markers get Item Count int total Count get Total Markers if filtered Count total Count status Messages format filter items Message new Object new Integer total Count NON NLS 1 else status Messages format filter matched Message new Object new Integer filtered Count new Integer total Count NON NLS 1 set Content Description status  updateTitle currentTitle getTitle viewName getConfigurationElement getAttribute filteredCount currentMarkers getItemCount totalCount getTotalMarkers filteredCount totalCount itemsMessage totalCount matchedMessage filteredCount totalCount setContentDescription
Updates the message displayed in the status line This method is invoked in the following cases ul li when this view is first created li li when new elements are added li li when something is deleted li li when the filters change li ul p By default this method calls code update Status Message I Structured Selection code with the current selection or code null code Classes wishing to override this functionality should just override the method code update Status Message I Structured Selection code p protected void update Status Message I Selection selection get Viewer get Selection if selection instanceof I Structured Selection update Status Message I Structured Selection selection else update Status Message null  updateStatusMessage IStructuredSelection updateStatusMessage IStructuredSelection updateStatusMessage ISelection getViewer getSelection IStructuredSelection updateStatusMessage IStructuredSelection updateStatusMessage
Updates that message displayed in the status line If the selection parameter is code null code or its size is 0 the status area is blanked out If only 1 marker is selected the status area is updated with the contents of the message attribute of this marker In other cases more than one marker is selected the status area indicates how many items have been selected p This method may be overwritten p p This method is called whenever a selection changes in this view p param selection a valid selection or code null code protected void update Status Message I Structured Selection selection String message NON NLS 1 if selection null selection size 0 Show stats on all items in the view message update Summary Visible else if selection size 1 Use the Message attribute of the marker Concrete Marker marker Concrete Marker selection get First Element message marker get Description NON NLS 1 else if selection size 1 Show stats on only those items in the selection message update Summary Selected selection get View Site get Action Bars get Status Line Manager set Message message  updateStatusMessage IStructuredSelection updateSummaryVisible ConcreteMarker ConcreteMarker getFirstElement getDescription updateSummarySelected getViewSite getActionBars getStatusLineManager setMessage
param selection return the summary status message protected String update Summary Selected I Structured Selection selection Show how many items selected return Messages format marker status Summary Selected new Object new Integer selection size NON NLS 1 NON NLS 2  updateSummarySelected IStructuredSelection statusSummarySelected
return the update summary protected String update Summary Visible return NON NLS 1  updateSummaryVisible
public abstract void open Filters Dialog  openFiltersDialog
Given a selection of I Marker reveals the corresponding elements in the viewer param structured Selection param reveal public void set Selection I Structured Selection structured Selection boolean reveal Table Viewer viewer get Viewer List new Selection new Array List structured Selection size for Iterator i structured Selection iterator i has Next Object next i next if next instanceof I Marker Concrete Marker marker current Markers get Marker I Marker next if marker null new Selection add marker if viewer null viewer set Selection new Structured Selection new Selection reveal  IMarker structuredSelection setSelection IStructuredSelection structuredSelection TableViewer getViewer newSelection ArrayList structuredSelection structuredSelection hasNext IMarker ConcreteMarker currentMarkers getMarker IMarker newSelection setSelection StructuredSelection newSelection
void set Contents Collection contents I Progress Monitor mon if within Marker Limit contents size super set Contents contents mon else super set Contents Collections EMPTY LIST mon  setContents IProgressMonitor withinMarkerLimit setContents setContents EMPTY_LIST
protected Marker List get Visible Markers return current Markers  MarkerList getVisibleMarkers currentMarkers
Returns the total number of markers Should not be called while the marker list is still updating return the total number of markers in the workspace including everything that doesn t pass the filters int get Total Markers The number of visible markers should never exceed the total number of markers in the workspace If this assertation fails it probably indicates some sort of concurrency problem most likely get Total Markers was called while we were still computing the marker lists Assert is True total Markers current Markers get Item Count return total Markers  getTotalMarkers getTotalMarkers isTrue totalMarkers currentMarkers getItemCount totalMarkers
see org eclipse ui views markers internal Table View sorter Changed protected void sorter Changed refresh  TableView sorterChanged sorterChanged
private static void examine Delta I Marker Delta deltas List changes for int idx 0 idx deltas length idx I Marker Delta delta deltas idx int kind delta get Kind if kind I Resource Delta CHANGED changes add deltas idx get Marker  examineDelta IMarkerDelta IMarkerDelta getKind IResourceDelta getMarker
public void show Busy boolean busy super show Busy busy if busy pre Busy Markers total Markers else Only bold if there has been a change in count if total Markers pre Busy Markers get Progress Service warn Of Content Change  showBusy showBusy preBusyMarkers totalMarkers totalMarkers preBusyMarkers getProgressService warnOfContentChange
public I Status run InUI Thread I Progress Monitor monitor update Status Message update Title return Status OK STATUS  IStatus runInUIThread IProgressMonitor updateStatusMessage updateTitle OK_STATUS
Create the UI Job used in the receiver for updates private void createUI Job ui Job new Workbench Job Messages get String Marker View refresh Progress NON NLS 1 public I Status run InUI Thread I Progress Monitor monitor update Status Message update Title return Status OK STATUS ui Job set Priority Job INTERACTIVE ui Job set System true  UIJob createUIJob uiJob WorkbenchJob getString MarkerView refreshProgress IStatus runInUIThread IProgressMonitor updateStatusMessage updateTitle OK_STATUS uiJob setPriority uiJob setSystem

private final static Resource Bundle bundle Resource Bundle get Bundle Messages class get Name private Messages super  ResourceBundle ResourceBundle getBundle getName
public static String format String key Object args return Message Format format get String key args  MessageFormat getString
public static String get String String key return Util get String bundle key  getString getString

private int severity public Problem Filter super new String I Marker PROBLEM  ProblemFilter IMarker
public boolean select Marker Concrete Marker marker if marker instanceof Problem Marker return false Problem Marker problem Marker Problem Marker marker return is Enabled super select Marker problem Marker select By Description problem Marker select By Severity problem Marker  selectMarker ConcreteMarker ProblemMarker ProblemMarker problemMarker ProblemMarker isEnabled selectMarker problemMarker selectByDescription problemMarker selectBySeverity problemMarker
private boolean select By Description Concrete Marker item if description null description equals NON NLS 1 return true String marker Description item get Description int index marker Description index Of description return contains index 0 index 0  selectByDescription ConcreteMarker markerDescription getDescription markerDescription indexOf
private boolean select By Severity Problem Marker item if select By Severity int marker Severity item get Severity if marker Severity I Marker SEVERITY ERROR return severity SEVERITY ERROR 0 else if marker Severity I Marker SEVERITY WARNING return severity SEVERITY WARNING 0 else if marker Severity I Marker SEVERITY INFO return severity SEVERITY INFO 0 return true  selectBySeverity ProblemMarker selectBySeverity markerSeverity getSeverity markerSeverity IMarker SEVERITY_ERROR SEVERITY_ERROR markerSeverity IMarker SEVERITY_WARNING SEVERITY_WARNING markerSeverity IMarker SEVERITY_INFO SEVERITY_INFO
public boolean get Contains return contains  getContains
public String get Description return description  getDescription
public boolean get Select By Severity return select By Severity  getSelectBySeverity selectBySeverity
public int get Severity return severity  getSeverity
public void set Contains boolean contains this contains contains  setContains
public void set Description String description this description description  setDescription
public void set Select By Severity boolean select By Severity this select By Severity select By Severity  setSelectBySeverity selectBySeverity selectBySeverity selectBySeverity
public void set Severity int severity this severity severity  setSeverity
public void reset State super reset State contains DEFAULT CONTAINS description DEFAULT DESCRIPTION select By Severity DEFAULT SELECT BY SEVERITY severity DEFAULT SEVERITY  resetState resetState DEFAULT_CONTAINS DEFAULT_DESCRIPTION selectBySeverity DEFAULT_SELECT_BY_SEVERITY DEFAULT_SEVERITY
public void restore State I Dialog Settings dialog Settings super restore State dialog Settings I Dialog Settings settings dialog Settings get Section TAG DIALOG SECTION if settings null String setting settings get TAG CONTAINS if setting null contains Boolean value Of setting boolean Value setting settings get TAG DESCRIPTION if setting null description new String setting setting settings get TAG SELECT BY SEVERITY if setting null select By Severity Boolean value Of setting boolean Value setting settings get TAG SEVERITY if setting null try severity Integer parse Int setting catch Number Format Exception e Number Format  restoreState IDialogSettings dialogSettings restoreState dialogSettings IDialogSettings dialogSettings getSection TAG_DIALOG_SECTION TAG_CONTAINS valueOf booleanValue TAG_DESCRIPTION TAG_SELECT_BY_SEVERITY selectBySeverity valueOf booleanValue TAG_SEVERITY parseInt NumberFormatException eNumberFormat
public void save State I Dialog Settings dialog Settings super save State dialog Settings if dialog Settings null I Dialog Settings settings dialog Settings get Section TAG DIALOG SECTION if settings null settings dialog Settings add New Section TAG DIALOG SECTION settings put TAG CONTAINS contains settings put TAG DESCRIPTION description settings put TAG SELECT BY SEVERITY select By Severity settings put TAG SEVERITY severity  saveState IDialogSettings dialogSettings saveState dialogSettings dialogSettings IDialogSettings dialogSettings getSection TAG_DIALOG_SECTION dialogSettings addNewSection TAG_DIALOG_SECTION TAG_CONTAINS TAG_DESCRIPTION TAG_SELECT_BY_SEVERITY selectBySeverity TAG_SEVERITY

private int severity public Problem Marker I Marker to Copy super to Copy  ProblemMarker IMarker toCopy toCopy
see org eclipse ui views markers internal Concrete Marker refresh public void refresh super refresh severity get Marker get Attribute I Marker SEVERITY 1  ConcreteMarker getMarker getAttribute IMarker
public int get Severity return severity  getSeverity

public void dispose if resolve Marker Action null resolve Marker Action dispose super dispose  resolveMarkerAction resolveMarkerAction
public void init I View Site view Site I Memento memento throws Part Init Exception super init view Site memento problem Filter restore State get Dialog Settings  IViewSite viewSite IMemento PartInitException viewSite problemFilter restoreState getDialogSettings
public void save State I Memento memento problem Filter save State get Dialog Settings super save State memento  saveState IMemento problemFilter saveState getDialogSettings saveState
protected Column Layout Data get Default Column Layouts return DEFAULT COLUMN LAYOUTS  ColumnLayoutData getDefaultColumnLayouts DEFAULT_COLUMN_LAYOUTS
protected I Dialog Settings get Dialog Settings AbstractUI Plugin plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID I Dialog Settings workbench Settings plugin get Dialog Settings I Dialog Settings settings workbench Settings get Section TAG DIALOG SECTION if settings null settings workbench Settings add New Section TAG DIALOG SECTION return settings  IDialogSettings getDialogSettings AbstractUIPlugin AbstractUIPlugin getPlugin PLUGIN_ID IDialogSettings workbenchSettings getDialogSettings IDialogSettings workbenchSettings getSection TAG_DIALOG_SECTION workbenchSettings addNewSection TAG_DIALOG_SECTION
protected void create Actions super create Actions properties Action new Action Problem Properties this get Selection Provider resolve Marker Action new Action Resolve Marker this get Selection Provider  createActions createActions propertiesAction ActionProblemProperties getSelectionProvider resolveMarkerAction ActionResolveMarker getSelectionProvider
protected void create Columns Table table super create Columns table Table Column columns table get Columns if columns null columns length 1 columns 0 set Resizable false  createColumns createColumns TableColumn getColumns setResizable
protected void fill Context Menu Additions I Menu Manager manager manager add new Separator manager add resolve Marker Action  fillContextMenuAdditions IMenuManager resolveMarkerAction
protected Dialog Marker Filter get Filters Dialog return new Dialog Problem Filter get Viewer get Control get Shell problem Filter  DialogMarkerFilter getFiltersDialog DialogProblemFilter getViewer getControl getShell problemFilter
protected I Field get Hidden Fields return HIDDEN FIELDS  IField getHiddenFields HIDDEN_FIELDS
protected String get Root Types return ROOT TYPES  getRootTypes ROOT_TYPES
protected Table Sorter get Sorter if sorter null sorter new Table Sorter get Fields DEFAULT PRIORITIES DEFAULT DIRECTIONS return sorter  TableSorter getSorter TableSorter getFields DEFAULT_PRIORITIES DEFAULT_DIRECTIONS
protected Object get Viewer Input return Resources Plugin get Workspace get Root  getViewerInput ResourcesPlugin getWorkspace getRoot
protected I Field get Visible Fields return VISIBLE FIELDS  IField getVisibleFields VISIBLE_FIELDS
protected void init Menu I Menu Manager menu super init Menu menu  initMenu IMenuManager initMenu
void update Title Marker List visible Markers get Visible Markers String breakdown format Summary Break Down visible Markers int filtered Count visible Markers get Item Count int total Count get Total Markers if filtered Count total Count breakdown Messages format problem filter matched Message NON NLS 1 new Object breakdown new Integer filtered Count new Integer total Count set Content Description breakdown  updateTitle MarkerList visibleMarkers getVisibleMarkers formatSummaryBreakDown visibleMarkers filteredCount visibleMarkers getItemCount totalCount getTotalMarkers filteredCount totalCount matchedMessage filteredCount totalCount setContentDescription
private String format Summary Break Down Marker List visible Markers return Messages format problem status Summary Breakdown NON NLS 1 new Object new Integer visible Markers get Errors new Integer visible Markers get Warnings new Integer visible Markers get Infos  formatSummaryBreakDown MarkerList visibleMarkers statusSummaryBreakdown visibleMarkers getErrors visibleMarkers getWarnings visibleMarkers getInfos
private String get Summary Marker List markers String message Key String message Messages format message Key new Object new Integer markers get Item Count format Summary Break Down markers return message  getSummary MarkerList messageKey messageKey getItemCount formatSummaryBreakDown
Retrieves statistical information the total number of markers with each severity type for the markers contained in the selection passed in This information is then massaged into a string which may be displayed by the caller param selection a valid selection or code null code return a message ready for display protected String update Summary Selected I Structured Selection selection return get Summary new Marker List selection to List problem status Summary Selected NON NLS 1  updateSummarySelected IStructuredSelection getSummary MarkerList toList statusSummarySelected
see org eclipse ui views markers internal Marker View get Marker Types protected String get Marker Types return new String I Marker PROBLEM  MarkerView getMarkerTypes getMarkerTypes IMarker
see org eclipse ui views markers internal Marker View get Filter protected Marker Filter get Filter return problem Filter  MarkerView getFilter MarkerFilter getFilter problemFilter
public void open Filters Dialog Dialog Problem Filter dialog new Dialog Problem Filter get Viewer get Control get Shell problem Filter if dialog open Window OK problem Filter Problem Filter dialog get Filter problem Filter save State get Dialog Settings refresh  openFiltersDialog DialogProblemFilter DialogProblemFilter getViewer getControl getShell problemFilter problemFilter ProblemFilter getFilter problemFilter saveState getDialogSettings
see org eclipse ui views markers internal Marker View update Filter Selection org eclipse core resources I Resource protected void update Filter Selection I Resource resources problem Filter set Focus Resource resources  MarkerView updateFilterSelection IResource updateFilterSelection IResource problemFilter setFocusResource

the Job add Job Change Listener new Job Change Adapter public void done I Job Change Event e synchronized lock current Monitor null if restart Needed schedule In Service  theJob addJobChangeListener JobChangeAdapter IJobChangeEvent currentMonitor restartNeeded scheduleInService
Constructs a new Restartable Job with the given name that will run the given runnable param name param new Runnable param service I Workbench Site Progress Service the service we are going to use to show progress or code null code public Restartable Job String name I Runnable With Progress new Runnable I Workbench Site Progress Service service this runnable new Runnable progress Service service create Job name the Job add Job Change Listener new Job Change Adapter public void done I Job Change Event e synchronized lock current Monitor null if restart Needed schedule In Service  RestartableJob newRunnable IWorkbenchSiteProgressService RestartableJob IRunnableWithProgress newRunnable IWorkbenchSiteProgressService newRunnable progressService createJob theJob addJobChangeListener JobChangeAdapter IJobChangeEvent currentMonitor restartNeeded scheduleInService
the Job new Job name protected I Status run I Progress Monitor inner Monitor try synchronized lock restart Needed false current Monitor inner Monitor runnable run inner Monitor catch Invocation Target Exception e return Status Util new Status I Status ERROR e to String e get Target Exception catch Interrupted Exception e return Status CANCEL STATUS if inner Monitor is Canceled return Status CANCEL STATUS else return Status OK STATUS  theJob IStatus IProgressMonitor innerMonitor restartNeeded currentMonitor innerMonitor innerMonitor InvocationTargetException StatusUtil newStatus IStatus toString getTargetException InterruptedException CANCEL_STATUS innerMonitor isCanceled CANCEL_STATUS OK_STATUS
Instantiates the actual Job object param name private void create Job String name the Job new Job name protected I Status run I Progress Monitor inner Monitor try synchronized lock restart Needed false current Monitor inner Monitor runnable run inner Monitor catch Invocation Target Exception e return Status Util new Status I Status ERROR e to String e get Target Exception catch Interrupted Exception e return Status CANCEL STATUS if inner Monitor is Canceled return Status CANCEL STATUS else return Status OK STATUS the Job set Priority Job DECORATE the Job set System true  createJob theJob IStatus IProgressMonitor innerMonitor restartNeeded currentMonitor innerMonitor innerMonitor InvocationTargetException StatusUtil newStatus IStatus toString getTargetException InterruptedException CANCEL_STATUS innerMonitor isCanceled CANCEL_STATUS OK_STATUS theJob setPriority theJob setSystem
Aborts the currently running job if any by cancelling its progress monitor and reschedules it If there is no currently running job it will be started public void restart synchronized lock if current Monitor null schedule In Service else if restart Needed restart Needed true the Job cancel  currentMonitor scheduleInService restartNeeded restartNeeded theJob
Schedules the job Does nothing if the job is already running public void schedule synchronized lock if current Monitor null schedule In Service else if current Monitor is Canceled restart Needed true  currentMonitor scheduleInService currentMonitor isCanceled restartNeeded
Schedule the Job using the progress service if there is one private void schedule In Service if progress Service null the Job schedule else progress Service schedule the Job 0 true  theJob scheduleInService progressService theJob progressService theJob
Cancels the job If the job is currently running it will be terminated as soon as possible public void cancel synchronized lock the Job cancel restart Needed false  theJob restartNeeded

I Selection the Selection null public void add Selection Changed Listener I Selection Changed Listener listener listeners add listener  ISelection theSelection addSelectionChangedListener ISelectionChangedListener
public I Selection get Selection return the Selection  ISelection getSelection theSelection
public void remove Selection Changed Listener I Selection Changed Listener listener listeners remove listener  removeSelectionChangedListener ISelectionChangedListener
public void set Selection I Selection selection the Selection selection Selection Changed Event e new Selection Changed Event this selection Iterator iter listeners iterator while iter has Next I Selection Changed Listener next I Selection Changed Listener iter next next selection Changed e  setSelection ISelection theSelection SelectionChangedEvent SelectionChangedEvent hasNext ISelectionChangedListener ISelectionChangedListener selectionChanged

Returns the k smallest items in the given collection Runs in O n time average case The resulting collection is not sorted param elements param c return public static Collection get First Collection elements Comparator c int k I Progress Monitor mon Collection result new Array List elements size mon begin Task Messages get String Sort Util finding first 1000 NON NLS 1 get First result elements c k mon 1000 mon done return result  getFirst IProgressMonitor ArrayList beginTask getString SortUtil finding_first getFirst
private static void get First Collection result Collection elements Comparator c int k I Progress Monitor mon int total Work if mon is Canceled return if elements size k result add All elements mon worked total Work return Object pivot if elements instanceof Array List pivot Array List elements get elements size 2 else pivot elements iterator next Collection more new Array List elements size Collection less new Array List elements size Collection equal new Array List partition Helper less more equal elements c pivot mon total Work 2 if less size k get First result less c k mon total Work 2 else if less size equal size k int count k less size result add All less Iterator iter equal iterator while iter has Next count 0 Object next iter next result add next count mon worked total Work 2 else if less size equal size more size k result add All less result add All equal get First result more c k less size equal size mon total Work 2  getFirst IProgressMonitor totalWork isCanceled addAll totalWork ArrayList ArrayList ArrayList ArrayList ArrayList partitionHelper totalWork getFirst totalWork addAll hasNext totalWork addAll addAll getFirst totalWork
private static void partition Helper Collection less Collection more Collection equal Collection input Comparator c Object to Test I Progress Monitor mon int total Work int work Remaining total Work int counter 0 int total Items input size Iterator iter input iterator while iter has Next Object next iter next int compare Result c compare next to Test if compare Result 0 less add next else if compare Result 0 more add next else equal add next counter if counter 100 if mon is Canceled return int next Worked counter work Remaining total Items mon worked next Worked work Remaining next Worked total Items counter counter 0 mon worked work Remaining  partitionHelper toTest IProgressMonitor totalWork workRemaining totalWork totalItems hasNext compareResult toTest compareResult compareResult isCanceled nextWorked workRemaining totalItems nextWorked workRemaining nextWorked totalItems workRemaining
Divides the items in the input collection into three sets based on whether they are less than equal to or greater than the test item If the given monitor is cancelled possibly by another thread the operation will be aborted In this case the insertions may only be partially complete param less param more param equal param input param c param to Test param mon public static void partition Collection less Collection more Collection equal Collection input Comparator c Object to Test I Progress Monitor mon mon begin Task Messages get String Sort Util partitioning input size NON NLS 1 if to Test null c null int counter 0 Iterator iter input iterator while iter has Next Object next iter next counter if counter 20 mon worked counter counter 0 if mon is Canceled return more add next mon worked counter else partition Helper less more equal input c to Test mon input size mon done  toTest toTest IProgressMonitor beginTask getString SortUtil toTest hasNext isCanceled partitionHelper toTest
Removes and returns the first n items from the given collection param collection param num To Remove return public static List remove First Collection collection int num To Remove int to Remove Math min collection size num To Remove List removed new Array List to Remove Iterator iter collection iterator for int idx 0 idx to Remove idx removed add iter next iter remove return removed  numToRemove removeFirst numToRemove toRemove numToRemove ArrayList toRemove toRemove
Finds and returns the greatest element in the given collection or null if the collection is empty param to Search collection to search param c comparator used to determine the greatest item return the greatest item in the collection public static Object find Greatest Collection to Search Comparator c If this set is already sorted using the given comparator just return the last element if to Search instanceof Sorted Set Sorted Set to Search comparator equals c return Sorted Set to Search last Otherwise exhaustively search for the greatest element Object result null Iterator iter to Search iterator while iter has Next Object next iter next if result null c compare result next 0 result next return result  toSearch findGreatest toSearch toSearch SortedSet SortedSet toSearch SortedSet toSearch toSearch hasNext

private Job disable Updates Job new Workbench Job TABLE SYNCHRONIZATION public I Status run InUI Thread I Progress Monitor monitor if control Exists get Viewer get Table set Redraw false return Status OK STATUS  disableUpdatesJob WorkbenchJob TABLE_SYNCHRONIZATION IStatus runInUIThread IProgressMonitor controlExists getViewer getTable setRedraw OK_STATUS
private Job enable Updates Job new Workbench Job TABLE SYNCHRONIZATION public I Status run InUI Thread I Progress Monitor monitor if control Exists get Viewer get Table set Redraw true return Status OK STATUS  enableUpdatesJob WorkbenchJob TABLE_SYNCHRONIZATION IStatus runInUIThread IProgressMonitor controlExists getViewer getTable setRedraw OK_STATUS
boolean control Exists true Widget Refresh Job String title super title  controlExists WidgetRefreshJob
Will be executed each time the update thread wakes up This makes a single incremental update to the viewer ie adds or removes a few items public I Status run InUI Thread I Progress Monitor monitor If we can t get the lock terminate without blocking the UI thread if lock get Depth 0 last Worked 0 return Status OK STATUS lock acquire try if PlatformUI is Workbench Running control Exists false else control Exists control Exists if control Exists last Worked update Viewer finally lock release return Status OK STATUS  IStatus runInUIThread IProgressMonitor getDepth lastWorked OK_STATUS isWorkbenchRunning controlExists controlExists controlExists controlExists lastWorked updateViewer OK_STATUS
update Job new Restartable Job TABLE SYNCHRONIZATION new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception do Update monitor  updateJob RestartableJob TABLE_SYNCHRONIZATION IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException doUpdate
Creates a new Table Content Provider that will control the contents of the given viewer param viewer param description user readable string that will be included in progress monitors param service I Workbench Site Progress Service or code null null the service that this content provider will inform of updates public Table Content Provider Table Viewer viewer String description I Workbench Site Progress Service service this queues new Deferred Queue viewer this description description ui Job new Widget Refresh Job UPDATING TABLE WIDGET ui Job set Priority Job LONG ui Job set System true update Job new Restartable Job TABLE SYNCHRONIZATION new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception do Update monitor service lock Platform get Job Manager new Lock  TableContentProvider IWorkbenchSiteProgressService TableContentProvider TableViewer IWorkbenchSiteProgressService DeferredQueue uiJob WidgetRefreshJob UPDATING_TABLE_WIDGET uiJob setPriority uiJob setSystem updateJob RestartableJob TABLE_SYNCHRONIZATION IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException doUpdate getJobManager newLock
Sets the view s sorter or null if no sorting is to be used param c comparator that controls the view s sort order or null if no sorting public void set Sorter Table Sorter c if sort Order c sort Order c schedule Update  setSorter TableSorter sortOrder sortOrder scheduleUpdate
see org eclipse jface viewers I Structured Content Provider get Elements java lang Object public Object get Elements Object input Element return queues get Visible Items  IStructuredContentProvider getElements getElements inputElement getVisibleItems
see org eclipse jface viewers I Content Provider dispose public void dispose No state to dispose here  IContentProvider
see org eclipse jface viewers I Content Provider input Changed org eclipse jface viewers Viewer java lang Object java lang Object public void input Changed Viewer input Viewer Object old Input Object new Input schedule Update  IContentProvider inputChanged inputChanged inputViewer oldInput newInput scheduleUpdate
Sets the contents of the table Note that the changes may not become visible immediately as the viewer will actually be updated in a background thread param new Visible Items public void set Collection new Visible Items I Progress Monitor mon lock acquire try queues set new Visible Items mon schedule Update finally lock release  newVisibleItems newVisibleItems IProgressMonitor newVisibleItems scheduleUpdate
If the contents of the viewer have somehow become out of sync with the visible Items set this method will restore synchronization private void resync if control Exists int count queues get Viewer get Table get Item Count if count queues count Visible Items queues get Viewer refresh  visibleItems controlExists getViewer getTable getItemCount countVisibleItems getViewer
Causes the given collection of items to be refreshed param changes collection of objects that have changed void change Collection changes lock acquire try Ensure that this is never done in the user interface thread Assert is True Display get Current null queues change changes schedule Update finally lock release  isTrue getCurrent scheduleUpdate
Returns the Table Viewer being populated by this content provider return the Table Viewer being populated by this content provider private Table Viewer get Viewer return queues get Viewer  TableViewer TableViewer TableViewer getViewer getViewer
Returns true iff the control exists and has not yet been disposed return private boolean control Exists Control control get Viewer get Control if control null control is Disposed return false return true  controlExists getViewer getControl isDisposed
Returns true iff this content provider contains changes that are not yet reflected in the viewer return true iff the reciever has unprocessed changes public boolean has Pending Changes return queues has Pending Changes sort Order queues get Sorter  hasPendingChanges hasPendingChanges sortOrder getSorter
Returns an estimate of the total work remaining used for progress monitors return private int total Work return queues work Remaining 1  totalWork workRemaining
Starts the update thread this will continue to make incremental changes to the viewer until the pending sets become empty Does nothing if the update thread is already running or if there are no changes to process private void schedule Update if has Pending Changes update Job schedule  scheduleUpdate hasPendingChanges updateJob
Cancels any pending changes to the viewer The contents of the viewer will be left in whatever state they are in at the time Any changes that have not yet been applied will be lost It is a good idea to call this method before performing a long computation that will ultimately invalidate the contents of the viewer public void cancel Pending Changes update Job cancel lock acquire try queues cancel Pending finally lock release  cancelPendingChanges updateJob cancelPending
private void do Update I Progress Monitor monitor throws Interrupted Exception Do not update if the workbench is shutdown if PlatformUI is Workbench Running return This counter represents how many work units remain unused in the progress monitor int remaining Work Units 100000 monitor begin Task description remaining Work Units disable Updates Job schedule disable Updates Job join try Loop until there are no more changes to apply the control is destroyed the monitor is cancelled or another job takes over while has Pending Changes monitor is Canceled Ensure that we aren t running in the UI thread Assert is True Display get Current null try int total Work lock acquire try total Work total Work if sort Order queues get Sorter queues set Comparator sort Order Sub Progress Monitor sub new Sub Progress Monitor monitor 0 queues refresh Queues sub finally lock release try ui Job schedule Wait for the current update job to complete before scheduling another ui Job join catch Illegal State Exception e Ignore this exception it means that the Job manager was shut down which is expected at the end of the application Note that we need to check for this by catching the exception rather than using something like if job Manager Is Shut Down since the job manager might be shut down in another thread between the time we evaluate the if statement and when we schedule the job Estimate how much of the remaining work we ll be doing in this update and update the progress bar appropriately int consumed Units ui Job last Worked remaining Work Units total Work monitor worked consumed Units remaining Work Units consumed Units catch Interrupted Exception e monitor set Canceled true if ui Job control Exists break finally Only send updates if we can send them to the workbench if PlatformUI is Workbench Running enable Updates Job schedule enable Updates Job join monitor done  doUpdate IProgressMonitor InterruptedException isWorkbenchRunning remainingWorkUnits beginTask remainingWorkUnits disableUpdatesJob disableUpdatesJob hasPendingChanges isCanceled isTrue getCurrent totalWork totalWork totalWork sortOrder getSorter setComparator sortOrder SubProgressMonitor SubProgressMonitor refreshQueues uiJob uiJob IllegalStateException jobManagerIsShutDown consumedUnits uiJob lastWorked remainingWorkUnits totalWork consumedUnits remainingWorkUnits consumedUnits InterruptedException setCanceled uiJob controlExists isWorkbenchRunning enableUpdatesJob enableUpdatesJob
Performs a single update to the viewer Based on the contents of the pending queues items will either be removed added or refreshed in the viewer in that order This should only be called within a synchronized block since the various queues shouldn t be modified during an update This method is invoked repeatedly by jobs to gradually apply the pending changes private int update Viewer int result Note that this method is only called when we have the lock so acquiring it here does nothing but we re acquire it anyway in case future refactoring causes this to be called when we don t own the lock lock acquire try if get Viewer get Sorter null get Viewer set Sorter null resync result queues next Update finally lock release return result  updateViewer getViewer getSorter getViewer setSorter nextUpdate

public Table Sort Action Table View view Table Sort Dialog dialog super Messages get String sort Action title NON NLS 1 this view view this dialog dialog set Enabled true  TableSortAction TableView TableSortDialog getString sortAction setEnabled
public void run if dialog open Window OK dialog is Dirty view set Sorter dialog get Sorter  isDirty setSorter getSorter

private final Comparator column Comparator new Comparator public int compare Object arg0 Object arg1 int index0 1 int index1 1 for int i 0 i property Text length i if property Text i equals arg0 index0 i if property Text i equals arg1 index1 i return index0 index1  columnComparator propertyText propertyText propertyText
public Table Sort Dialog Shell parent Shell Table Sorter sorter super parent Shell this sorter sorter dirty false  TableSortDialog parentShell TableSorter parentShell
Method declared on Window protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text Messages get String sort Dialog title NON NLS 1  configureShell newShell configureShell newShell newShell setText getString sortDialog
protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent if sorter null return composite create Priorities Area composite create Restore Defaults Button composite create Separator Line composite return composite  createDialogArea createDialogArea createPrioritiesArea createRestoreDefaultsButton createSeparatorLine
private void create Priorities Area Composite parent Composite priorities Area new Composite parent SWT NULL priorities Area set Layout new Grid Layout 3 false int priorities sorter get Priorities ascending Buttons new Button priorities length descending Buttons new Button priorities length priority Combos new Combo Math min priorities length Table Sorter MAX DEPTH init Priotity Text Label sort By Label new Label priorities Area SWT NULL sort By Label set Text Messages get String sort Dialog label NON NLS 1 Grid Data data new Grid Data data horizontal Span 3 sort By Label set Layout Data data for int i 0 i priority Combos length i final int index i Label number Label new Label priorities Area SWT NULL number Label set Text Messages format sort Dialog column Label new Object new Integer i 1 NON NLS 1 priority Combos i new Combo priorities Area SWT READ ONLY priority Combos i set Layout Data new Grid Data Grid Data FILL HORIZONTAL Composite direction Group new Composite priorities Area SWT NONE direction Group set Layout new Grid Layout 2 false ascending Buttons i new Button direction Group SWT RADIO ascending Buttons i set Text Messages get String sort Direction Ascending text NON NLS 1 ascending Buttons i add Selection Listener new Selection Adapter public void widget Selected Selection Event e mark Dirty descending Buttons i new Button direction Group SWT RADIO descending Buttons i set Text Messages get String sort Direction Descending text NON NLS 1 descending Buttons i add Selection Listener new Selection Adapter public void widget Selected Selection Event e mark Dirty if i priority Combos length 1 priority Combos i add Selection Listener new Selection Adapter public void widget Selected Selection Event e int old Selection Direction Table Sorter ASCENDING if descending Buttons index get Selection old Selection Direction Table Sorter DESCENDING Array List old Selection List new Array List Arrays as List priority Combos index get Items old Selection List remove All Arrays as List priority Combos index 1 get Items if old Selection List size 1 return String old Selection String old Selection List get 0 String new Selection priority Combos index get Item priority Combos index get Selection Index if old Selection equals new Selection return for int j index 1 j priority Combos length j int new Selection Index priority Combos j index Of new Selection this combo s current selection is equal to new Selection if priority Combos j get Selection Index new Selection Index priority Combos j remove new Selection int insertion Point 1 Arrays binary Search priority Combos j get Items old Selection column Comparator if insertion Point 0 insertion Point priority Combos j get Item Count priority Combos j add old Selection insertion Point else priority Combos j add old Selection priority Combos j select priority Combos j index Of old Selection ascending Buttons index set Selection ascending Buttons j get Selection descending Buttons index set Selection descending Buttons j get Selection ascending Buttons j set Selection old Selection Direction Table Sorter ASCENDING descending Buttons j set Selection old Selection Direction Table Sorter DESCENDING this combo contains new Selection else if new Selection Index 0 priority Combos j remove new Selection int insertion Point 1 Arrays binary Search priority Combos j get Items old Selection column Comparator if insertion Point 0 insertion Point priority Combos j get Item Count priority Combos j add old Selection insertion Point else priority Combos j add old Selection mark Dirty else priority Combos i add Selection Listener new Selection Adapter public void widget Selected Selection Event e mark Dirty updateUI From Sorter  createPrioritiesArea prioritiesArea prioritiesArea setLayout GridLayout getPriorities ascendingButtons descendingButtons priorityCombos TableSorter MAX_DEPTH initPriotityText sortByLabel prioritiesArea sortByLabel setText getString sortDialog GridData GridData horizontalSpan sortByLabel setLayoutData priorityCombos numberLabel prioritiesArea numberLabel setText sortDialog columnLabel priorityCombos prioritiesArea READ_ONLY priorityCombos setLayoutData GridData GridData FILL_HORIZONTAL directionGroup prioritiesArea directionGroup setLayout GridLayout ascendingButtons directionGroup ascendingButtons setText getString sortDirectionAscending ascendingButtons addSelectionListener SelectionAdapter widgetSelected SelectionEvent markDirty descendingButtons directionGroup descendingButtons setText getString sortDirectionDescending descendingButtons addSelectionListener SelectionAdapter widgetSelected SelectionEvent markDirty priorityCombos priorityCombos addSelectionListener SelectionAdapter widgetSelected SelectionEvent oldSelectionDirection TableSorter descendingButtons getSelection oldSelectionDirection TableSorter ArrayList oldSelectionList ArrayList asList priorityCombos getItems oldSelectionList removeAll asList priorityCombos getItems oldSelectionList oldSelection oldSelectionList newSelection priorityCombos getItem priorityCombos getSelectionIndex oldSelection newSelection priorityCombos newSelectionIndex priorityCombos indexOf newSelection newSelection priorityCombos getSelectionIndex newSelectionIndex priorityCombos newSelection insertionPoint binarySearch priorityCombos getItems oldSelection columnComparator insertionPoint insertionPoint priorityCombos getItemCount priorityCombos oldSelection insertionPoint priorityCombos oldSelection priorityCombos priorityCombos indexOf oldSelection ascendingButtons setSelection ascendingButtons getSelection descendingButtons setSelection descendingButtons getSelection ascendingButtons setSelection oldSelectionDirection TableSorter descendingButtons setSelection oldSelectionDirection TableSorter newSelection newSelectionIndex priorityCombos newSelection insertionPoint binarySearch priorityCombos getItems oldSelection columnComparator insertionPoint insertionPoint priorityCombos getItemCount priorityCombos oldSelection insertionPoint priorityCombos oldSelection markDirty priorityCombos addSelectionListener SelectionAdapter widgetSelected SelectionEvent markDirty updateUIFromSorter
private void create Restore Defaults Button Composite parent Button defaults Button new Button parent SWT PUSH defaults Button set Text Messages get String restore Defaults text NON NLS 1 set Button Size defaults Button new Grid Data Grid Data HORIZONTAL ALIGN END Grid Data FILL HORIZONTAL defaults Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e restore Defaults mark Dirty  createRestoreDefaultsButton defaultsButton defaultsButton setText getString restoreDefaults setButtonSize defaultsButton GridData GridData HORIZONTAL_ALIGN_END GridData FILL_HORIZONTAL defaultsButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent restoreDefaults markDirty
private void create Separator Line Composite parent Label separator new Label parent SWT SEPARATOR SWT HORIZONTAL separator set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN CENTER separator set Foreground new Color parent get Display 150 150 150 separator set Background new Color parent get Display 150 150 150  createSeparatorLine setLayoutData GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_CENTER setForeground getDisplay setBackground getDisplay
private void restore Defaults updateUI sorter get Default Priorities sorter get Default Directions  restoreDefaults getDefaultPriorities getDefaultDirections
private void updateUI From Sorter updateUI sorter get Priorities sorter get Directions  updateUIFromSorter getPriorities getDirections
private void updateUI int priorities int directions Array List available Priorities new Array List Arrays as List property Text for int i 0 i priority Combos length i priority Combos i remove All for int j 0 j available Priorities size j priority Combos i add String available Priorities get j priority Combos i select priority Combos i index Of property Text priorities i available Priorities remove property Text priorities i ascending Buttons i set Selection directions priorities i Table Sorter ASCENDING descending Buttons i set Selection directions priorities i Table Sorter DESCENDING  ArrayList availablePriorities ArrayList asList propertyText priorityCombos priorityCombos removeAll availablePriorities priorityCombos availablePriorities priorityCombos priorityCombos indexOf propertyText availablePriorities propertyText ascendingButtons setSelection TableSorter descendingButtons setSelection TableSorter
protected void ok Pressed if is Dirty for int i priority Combos length 1 i 0 i String column priority Combos i get Item priority Combos i get Selection Index int index 1 for int j 0 j property Text length index 1 j if property Text j equals column index j if index 1 sorter reset State return sorter set Top Priority properties index int direction Table Sorter ASCENDING if descending Buttons i get Selection direction Table Sorter DESCENDING sorter set Top Priority Direction direction super ok Pressed  okPressed isDirty priorityCombos priorityCombos getItem priorityCombos getSelectionIndex propertyText propertyText resetState setTopPriority TableSorter descendingButtons getSelection TableSorter setTopPriorityDirection okPressed
return boolean public boolean is Dirty return dirty  isDirty
Sets the dirty flag to true public void mark Dirty dirty true  markDirty
Set the layout data of the button to a Grid Data with appropriate heights and widths param button private void set Button Size Button button Grid Data button Data button Data height Hint convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT int width Hint convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH button Data width Hint Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x button set Layout Data button Data  GridData setButtonSize GridData buttonData buttonData heightHint convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH buttonData widthHint widthHint computeSize setLayoutData buttonData
private void init Priotity Text I Field unordered Properties sorter get Fields properties new I Field unordered Properties length System arraycopy unordered Properties 0 properties 0 properties length property Text new String properties length for int i 0 i properties length i property Text i properties i get Description  initPriotityText IField unorderedProperties getFields IField unorderedProperties unorderedProperties propertyText propertyText getDescription
public Table Sorter get Sorter return sorter  TableSorter getSorter

public Table Sorter Table Sorter other this other get Fields other get Default Priorities other get Default Directions priorities other get Priorities directions other get Directions  TableSorter TableSorter getFields getDefaultPriorities getDefaultDirections getPriorities getDirections
public Table Sorter I Field properties final int default Priorities final int default Directions super this fields properties if properties null default Priorities null default Directions null properties length default Priorities length properties length default Directions length verify Priorities default Priorities verify Directions default Directions this priorities new int 0 this directions new int 0 this default Priorities new int 0 this default Directions new int 0 else this priorities new int default Priorities length System arraycopy default Priorities 0 this priorities 0 priorities length this directions new int default Directions length System arraycopy default Directions 0 this directions 0 directions length this default Priorities new int default Priorities length System arraycopy default Priorities 0 this default Priorities 0 default Priorities length this default Directions new int default Directions length System arraycopy default Directions 0 this default Directions 0 default Directions length  TableSorter IField defaultPriorities defaultDirections defaultPriorities defaultDirections defaultPriorities defaultDirections verifyPriorities defaultPriorities verifyDirections defaultDirections defaultPriorities defaultDirections defaultPriorities defaultPriorities defaultDirections defaultDirections defaultPriorities defaultPriorities defaultPriorities defaultPriorities defaultPriorities defaultDirections defaultDirections defaultDirections defaultDirections defaultDirections
protected void reset State System arraycopy default Priorities 0 priorities 0 priorities length System arraycopy default Directions 0 directions 0 directions length  resetState defaultPriorities defaultDirections
public void reverse Top Priority directions priorities 0 1  reverseTopPriority
public void set Top Priority I Field property for int i 0 i fields length i if fields i equals property set Top Priority i return  setTopPriority IField setTopPriority
public void set Top Priority int priority if priority 0 priority priorities length return int index 1 for int i 0 i priorities length i if priorities i priority index i if index 1 reset State return shift the array for int i index i 0 i priorities i priorities i 1 priorities 0 priority directions priority default Directions priority  setTopPriority resetState defaultDirections
public void set Top Priority Direction int direction if direction ASCENDING direction DESCENDING directions priorities 0 direction  setTopPriorityDirection
public int get Top Priority Direction return directions priorities 0  getTopPriorityDirection
public int get Top Priority return priorities 0  getTopPriority
public int get Priorities int copy new int priorities length System arraycopy priorities 0 copy 0 copy length return copy  getPriorities
public int get Directions int copy new int directions length System arraycopy directions 0 copy 0 copy length return copy  getDirections
public int get Default Priorities int copy new int default Priorities length System arraycopy default Priorities 0 copy 0 copy length return copy  getDefaultPriorities defaultPriorities defaultPriorities
public int get Default Directions int copy new int default Directions length System arraycopy default Directions 0 copy 0 copy length return copy  getDefaultDirections defaultDirections defaultDirections
public int compare Viewer viewer Object e1 Object e2 return compare e1 e2 0 
protected int compare Object obj1 Object obj2 int depth if depth priorities length return 0 int column priorities depth I Field property fields column int result property compare obj1 obj2 if result 0 return compare obj1 obj2 depth 1 return result directions column  IField
return I Field an array of fields public I Field get Fields return fields  IField IField getFields
private boolean verify Priorities int priorities int length priorities length boolean included new boolean length Arrays fill included false for int i 0 i length i int priority priorities i if priority 0 priority length return false if included priority return false included priority true return true  verifyPriorities
private boolean verify Directions int directions for int i 0 i directions length i if directions i ASCENDING directions i DESCENDING return false return true  verifyDirections
see java util Comparator compare java lang Object java lang Object public int compare Object o1 Object o2 return compare null o1 o2 
public void save State I Dialog Settings dialog Settings if dialog Settings null return I Dialog Settings settings dialog Settings get Section TAG DIALOG SECTION if settings null settings dialog Settings add New Section TAG DIALOG SECTION for int i 0 i priorities length i settings put TAG PRIORITY i priorities i settings put TAG DIRECTION i directions i settings put TAG DEFAULT PRIORITY i default Priorities i settings put TAG DEFAULT DIRECTION i default Directions i  saveState IDialogSettings dialogSettings dialogSettings IDialogSettings dialogSettings getSection TAG_DIALOG_SECTION dialogSettings addNewSection TAG_DIALOG_SECTION TAG_PRIORITY TAG_DIRECTION TAG_DEFAULT_PRIORITY defaultPriorities TAG_DEFAULT_DIRECTION defaultDirections
public void restore State I Dialog Settings dialog Settings if dialog Settings null reset State return I Dialog Settings settings dialog Settings get Section TAG DIALOG SECTION if settings null reset State return try for int i 0 i priorities length i String priority settings get TAG PRIORITY i if priority null reset State return priorities i Integer parse Int priority String direction settings get TAG DIRECTION i if direction null reset State return directions i Integer parse Int direction String default Priority settings get TAG DEFAULT PRIORITY i if default Priority null reset State return default Priorities i Integer parse Int default Priority String default Direction settings get TAG DEFAULT DIRECTION i if default Direction null reset State return default Directions i Integer parse Int default Direction catch Number Format Exception e reset State  restoreState IDialogSettings dialogSettings dialogSettings resetState IDialogSettings dialogSettings getSection TAG_DIALOG_SECTION resetState TAG_PRIORITY resetState parseInt TAG_DIRECTION resetState parseInt defaultPriority TAG_DEFAULT_PRIORITY defaultPriority resetState defaultPriorities parseInt defaultPriority defaultDirection TAG_DEFAULT_DIRECTION defaultDirection resetState defaultDirections parseInt defaultDirection NumberFormatException resetState

Method declared on I View Part public void init I View Site site I Memento memento throws Part Init Exception super init site memento this memento memento  IViewPart IViewSite IMemento PartInitException
void halt Table Updates content cancel Pending Changes  haltTableUpdates cancelPendingChanges
void change Collection to Refresh content change to Refresh  toRefresh toRefresh
void set Contents Collection contents I Progress Monitor mon content set contents mon  setContents IProgressMonitor
protected I Selection Provider get Selection Provider return selection Provider  ISelectionProvider getSelectionProvider selectionProvider
abstract protected void viewer Selection Changed I Structured Selection selection  viewerSelectionChanged IStructuredSelection
public void create Part Control Composite parent parent set Layout new Fill Layout viewer new Table Viewer create Table parent restore Column Widths memento create Columns viewer get Table content new Table Content Provider viewer Messages format Table View populating NON NLS 1 new Object get Title get Progress Service viewer set Content Provider content viewer set Label Provider new Table View Label Provider get Visible Fields viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection viewer Selection Changed selection set Sorter get Sorter create the actions before the input is set on the viewer but after the sorter and filter are set so the actions will be enabled correctly create Actions viewer set Input get Viewer Input viewer set Selection restore Selection memento Scrollable scrollable Scrollable viewer get Control Scroll Bar bar scrollable get Vertical Bar if bar null bar set Selection restore Vertical Scroll Bar Position memento bar scrollable get Horizontal Bar if bar null bar set Selection restore Horizontal Scroll Bar Position memento Menu Manager mgr init Context Menu Menu menu mgr create Context Menu viewer get Control viewer get Control set Menu menu get Site register Context Menu mgr get Selection Provider get Site set Selection Provider get Selection Provider init Action Bars get View Site get Action Bars register Global Actions get View Site get Action Bars viewer add Open Listener new I Open Listener public void open Open Event event handle Open Event event viewer get Control add Key Listener new Key Adapter public void key Pressed Key Event e handle Key Pressed e  createPartControl setLayout FillLayout TableViewer createTable restoreColumnWidths createColumns getTable TableContentProvider TableView getTitle getProgressService setContentProvider setLabelProvider TableViewLabelProvider getVisibleFields addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection viewerSelectionChanged setSorter getSorter createActions setInput getViewerInput setSelection restoreSelection getControl ScrollBar getVerticalBar setSelection restoreVerticalScrollBarPosition getHorizontalBar setSelection restoreHorizontalScrollBarPosition MenuManager initContextMenu createContextMenu getControl getControl setMenu getSite registerContextMenu getSelectionProvider getSite setSelectionProvider getSelectionProvider initActionBars getViewSite getActionBars registerGlobalActions getViewSite getActionBars addOpenListener IOpenListener OpenEvent handleOpenEvent getControl addKeyListener KeyAdapter keyPressed KeyEvent handleKeyPressed
param selection protected void set Selection I Structured Selection selection get Selection Provider set Selection selection  setSelection IStructuredSelection getSelectionProvider setSelection
param sorter2 void set Sorter Table Sorter sorter2 Table Sorter new Sorter new Table Sorter sorter2 sorter new Sorter content set Sorter new Sorter new Sorter save State get Dialog Settings sorter Changed  setSorter TableSorter TableSorter newSorter TableSorter newSorter setSorter newSorter newSorter saveState getDialogSettings sorterChanged
see org eclipse ui I Workbench Part dispose public void dispose  IWorkbenchPart
Creates the table control protected Table create Table Composite parent Table table new Table parent SWT H SCROLL SWT V SCROLL SWT MULTI SWT FULL SELECTION table set Lines Visible true table set Font parent get Font return table  createTable H_SCROLL V_SCROLL FULL_SELECTION setLinesVisible setFont getFont
protected void create Columns final Table table Selection Listener header Listener get Header Listener Table Layout layout new Table Layout table set Layout layout table set Header Visible true final I Field fields get Visible Fields Column Layout Data column Widths column Layouts if column Widths null column Widths get Default Column Layouts for int i 0 i fields length i if column Widths null i column Widths length column Widths i null layout add Column Data new Column Pixel Data 504 fields length true else layout add Column Data column Widths i Table Column tc new Table Column table SWT NONE i tc set Text fields i get Column Header Text tc set Image fields i get Column Header Image tc add Selection Listener header Listener  createColumns SelectionListener headerListener getHeaderListener TableLayout TableLayout setLayout setHeaderVisible IField getVisibleFields ColumnLayoutData columnWidths columnLayouts columnWidths columnWidths getDefaultColumnLayouts columnWidths columnWidths columnWidths addColumnData ColumnPixelData addColumnData columnWidths TableColumn TableColumn setText getColumnHeaderText setImage getColumnHeaderImage addSelectionListener headerListener
protected void create Actions if get Sort Dialog null put Action SORT ACTION ID new Table Sort Action this get Sort Dialog  createActions getSortDialog putAction SORT_ACTION_ID TableSortAction getSortDialog
protected I Action get Action String id return I Action actions get id  IAction getAction IAction
protected void put Action String id I Action action actions put id action  putAction IAction
mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr get Viewer cancel Editing fill Context Menu mgr  addMenuListener IMenuListener menuAboutToShow IMenuManager getViewer cancelEditing fillContextMenu
protected Menu Manager init Context Menu Menu Manager mgr new Menu Manager mgr set Remove All When Shown true mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager mgr get Viewer cancel Editing fill Context Menu mgr return mgr  MenuManager initContextMenu MenuManager MenuManager setRemoveAllWhenShown addMenuListener IMenuListener menuAboutToShow IMenuManager getViewer cancelEditing fillContextMenu
protected abstract void init Tool Bar I Tool Bar Manager tbm  initToolBar IToolBarManager
protected abstract void init Tool Bar I Tool Bar Manager tbm protected void init Action Bars I Action Bars action Bars init Menu action Bars get Menu Manager init Tool Bar action Bars get Tool Bar Manager  initToolBar IToolBarManager initActionBars IActionBars actionBars initMenu actionBars getMenuManager initToolBar actionBars getToolBarManager
protected void init Menu I Menu Manager menu I Action sort Action get Action SORT ACTION ID if sort Action null menu add sort Action I Action filters Action get Action FILTERS ACTION ID if filters Action null menu add filters Action  initMenu IMenuManager IAction sortAction getAction SORT_ACTION_ID sortAction sortAction IAction filtersAction getAction FILTERS_ACTION_ID filtersAction filtersAction
protected abstract void register Global Actions I Action Bars action Bars  registerGlobalActions IActionBars actionBars
protected abstract void register Global Actions I Action Bars action Bars protected abstract void fill Context Menu I Menu Manager manager  registerGlobalActions IActionBars actionBars fillContextMenu IMenuManager
public void set Focus Table Viewer viewer get Viewer if viewer null viewer get Control is Disposed viewer get Control set Focus  setFocus TableViewer getViewer getControl isDisposed getControl setFocus
protected Table Sorter get Sorter if sorter null int priorities new int get Fields length int directions new int get Fields length for int i 0 i get Fields length i priorities i i Arrays fill directions Table Sorter ASCENDING sorter new Table Sorter get Fields priorities directions sorter restore State get Dialog Settings return sorter  TableSorter getSorter getFields getFields getFields TableSorter TableSorter getFields restoreState getDialogSettings
protected I Field get Fields I Field v Props get Visible Fields I Field h Props get Hidden Fields I Field fields new I Field v Props length h Props length System arraycopy v Props 0 fields 0 v Props length System arraycopy h Props 0 fields v Props length h Props length return fields  IField getFields IField vProps getVisibleFields IField hProps getHiddenFields IField IField vProps hProps vProps vProps hProps vProps hProps
protected abstract Object get Viewer Input  getViewerInput
protected abstract Object get Viewer Input protected abstract I Field get Visible Fields  getViewerInput IField getVisibleFields
protected abstract I Field get Visible Fields protected abstract I Field get Hidden Fields  IField getVisibleFields IField getHiddenFields
protected abstract I Field get Hidden Fields protected abstract I Dialog Settings get Dialog Settings  IField getHiddenFields IDialogSettings getDialogSettings
protected abstract I Dialog Settings get Dialog Settings protected Table Viewer get Viewer return viewer  IDialogSettings getDialogSettings TableViewer getViewer
protected Selection Listener get Header Listener return new Selection Adapter Handles the case of user selecting the header area public void widget Selected Selection Event e int column get Viewer get Table index Of Table Column e widget if column get Sorter get Top Priority get Sorter reverse Top Priority else get Sorter set Top Priority column set Sorter get Sorter  SelectionListener getHeaderListener SelectionAdapter widgetSelected SelectionEvent getViewer getTable indexOf TableColumn getSorter getTopPriority getSorter reverseTopPriority getSorter setTopPriority setSorter getSorter
protected abstract Column Layout Data get Default Column Layouts  ColumnLayoutData getDefaultColumnLayouts
protected Table Sort Dialog get Sort Dialog if get Sorter null return new Table Sort Dialog get Site get Shell get Sorter return null  TableSortDialog getSortDialog getSorter TableSortDialog getSite getShell getSorter
get Site get Shell get Display async Exec new Runnable public void run viewer get Control set Redraw false viewer refresh false viewer get Control set Redraw true  getSite getShell getDisplay asyncExec getControl setRedraw getControl setRedraw
protected void sorter Changed viewer set Sorter get Sorter final Table Viewer viewer get Viewer if viewer null return get Site get Shell get Display async Exec new Runnable public void run viewer get Control set Redraw false viewer refresh false viewer get Control set Redraw true  sorterChanged setSorter getSorter TableViewer getViewer getSite getShell getDisplay asyncExec getControl setRedraw getControl setRedraw
protected abstract void handle Key Pressed Key Event event  handleKeyPressed KeyEvent
protected abstract void handle Key Pressed Key Event event protected abstract void handle Open Event Open Event event  handleKeyPressed KeyEvent handleOpenEvent OpenEvent
public void save State I Memento memento super save State memento save column widths Table Column columns viewer get Table get Columns for int i 0 i columns length i memento put Integer TAG COLUMN WIDTH i columns i get Width save Selection memento save vertical position Scrollable scrollable Scrollable viewer get Control Scroll Bar bar scrollable get Vertical Bar int position bar null bar get Selection 0 memento put Integer TAG VERTICAL POSITION position save horizontal position bar scrollable get Horizontal Bar position bar null bar get Selection 0 memento put Integer TAG HORIZONTAL POSITION position  saveState IMemento saveState TableColumn getTable getColumns putInteger TAG_COLUMN_WIDTH getWidth saveSelection getControl ScrollBar getVerticalBar getSelection putInteger TAG_VERTICAL_POSITION getHorizontalBar getSelection putInteger TAG_HORIZONTAL_POSITION
protected abstract void save Selection I Memento memento  saveSelection IMemento
private void restore Column Widths I Memento memento if memento null return column Layouts new Column Layout Data get Fields length for int i 0 i column Layouts length i Integer width memento get Integer TAG COLUMN WIDTH i if width null column Layouts null break else column Layouts i new Column Pixel Data width int Value true  restoreColumnWidths IMemento columnLayouts ColumnLayoutData getFields columnLayouts getInteger TAG_COLUMN_WIDTH columnLayouts columnLayouts ColumnPixelData intValue
protected abstract I Structured Selection restore Selection I Memento memento  IStructuredSelection restoreSelection IMemento
private int restore Vertical Scroll Bar Position I Memento memento if memento null return 0 Integer position memento get Integer TAG VERTICAL POSITION return position null 0 position int Value  restoreVerticalScrollBarPosition IMemento getInteger TAG_VERTICAL_POSITION intValue
private int restore Horizontal Scroll Bar Position I Memento memento if memento null return 0 Integer position memento get Integer TAG HORIZONTAL POSITION return position null 0 position int Value  restoreHorizontalScrollBarPosition IMemento getInteger TAG_HORIZONTAL_POSITION intValue
Get the I Workbench Site Progress Service for the receiver return I Workbench Site Progress Service or code null code protected I Workbench Site Progress Service get Progress Service I Workbench Site Progress Service service null Object site Service get Site get Adapter I Workbench Site Progress Service class if site Service null service I Workbench Site Progress Service site Service return service  IWorkbenchSiteProgressService IWorkbenchSiteProgressService IWorkbenchSiteProgressService getProgressService IWorkbenchSiteProgressService siteService getSite getAdapter IWorkbenchSiteProgressService siteService IWorkbenchSiteProgressService siteService

I Field fields public Table View Label Provider I Field fields this fields fields  IField TableViewLabelProvider IField
public Image get Column Image Object element int column Index if fields null column Index 0 column Index fields length return null return fields column Index get Image element  getColumnImage columnIndex columnIndex columnIndex columnIndex getImage
public String get Column Text Object element int column Index if fields null column Index 0 column Index fields length return null return fields column Index get Value element  getColumnText columnIndex columnIndex columnIndex columnIndex getValue

private boolean select By Done public Task Filter super new String I Marker TASK  selectByDone TaskFilter IMarker
public boolean select Marker Concrete Marker marker if marker instanceof Task Marker return false Task Marker task Marker Task Marker marker return is Enabled super select Marker task Marker select By Description task Marker select By Done task Marker select By Priority task Marker  selectMarker ConcreteMarker TaskMarker TaskMarker taskMarker TaskMarker isEnabled selectMarker taskMarker selectByDescription taskMarker selectByDone taskMarker selectByPriority taskMarker
private boolean select By Description Concrete Marker marker if description null description equals NON NLS 1 return true int index marker get Description index Of description return contains index 0 index 0  selectByDescription ConcreteMarker getDescription indexOf
private boolean select By Done Task Marker item if select By Done return done item get Done 1 return true  selectByDone TaskMarker selectByDone getDone
private boolean select By Priority Task Marker marker if priority 0 select By Priority int marker Priority marker get Priority if marker Priority I Marker PRIORITY HIGH return priority PRIORITY HIGH 0 else if marker Priority I Marker PRIORITY NORMAL return priority PRIORITY NORMAL 0 else if marker Priority I Marker PRIORITY LOW return priority PRIORITY LOW 0 return true  selectByPriority TaskMarker selectByPriority markerPriority getPriority markerPriority IMarker PRIORITY_HIGH PRIORITY_HIGH markerPriority IMarker PRIORITY_NORMAL PRIORITY_NORMAL markerPriority IMarker PRIORITY_LOW PRIORITY_LOW
public boolean get Contains return contains  getContains
public String get Description return description  getDescription
public boolean get Done return done  getDone
public int get Priority return priority  getPriority
public boolean get Select By Done return select By Done  getSelectByDone selectByDone
public boolean get Select By Priority return select By Priority  getSelectByPriority selectByPriority
public void set Contains boolean contains this contains contains  setContains
public void set Description String description this description description  setDescription
public void set Done boolean done this done done  setDone
public void set Priority int priority this priority priority  setPriority
public void set Select By Done boolean select By Done this select By Done select By Done  setSelectByDone selectByDone selectByDone selectByDone
public void set Select By Priority boolean select By Priority this select By Priority select By Priority  setSelectByPriority selectByPriority selectByPriority selectByPriority
public void reset State super reset State contains DEFAULT CONTAINS description DEFAULT DESCRIPTION done DEFAULT DONE priority DEFAULT PRIORITY select By Done DEFAULT SELECT BY DONE select By Priority DEFAULT SELECT BY PRIORITY  resetState resetState DEFAULT_CONTAINS DEFAULT_DESCRIPTION DEFAULT_DONE DEFAULT_PRIORITY selectByDone DEFAULT_SELECT_BY_DONE selectByPriority DEFAULT_SELECT_BY_PRIORITY
public void restore State I Dialog Settings dialog Settings super restore State dialog Settings I Dialog Settings settings dialog Settings get Section TAG DIALOG SECTION if settings null String setting settings get TAG CONTAINS if setting null contains Boolean value Of setting boolean Value setting settings get TAG DESCRIPTION if setting null description new String setting setting settings get TAG DONE if setting null done Boolean value Of setting boolean Value setting settings get TAG PRIORITY if setting null try priority Integer parse Int setting catch Number Format Exception e Number Format setting settings get TAG SELECT BY DONE if setting null select By Done Boolean value Of setting boolean Value setting settings get TAG SELECT BY PRIORITY if setting null select By Priority Boolean value Of setting boolean Value  restoreState IDialogSettings dialogSettings restoreState dialogSettings IDialogSettings dialogSettings getSection TAG_DIALOG_SECTION TAG_CONTAINS valueOf booleanValue TAG_DESCRIPTION TAG_DONE valueOf booleanValue TAG_PRIORITY parseInt NumberFormatException eNumberFormat TAG_SELECT_BY_DONE selectByDone valueOf booleanValue TAG_SELECT_BY_PRIORITY selectByPriority valueOf booleanValue
public void save State I Dialog Settings dialog Settings super save State dialog Settings if dialog Settings null I Dialog Settings settings dialog Settings get Section TAG DIALOG SECTION if settings null settings dialog Settings add New Section TAG DIALOG SECTION settings put TAG CONTAINS contains settings put TAG DESCRIPTION description settings put TAG DONE done settings put TAG PRIORITY priority settings put TAG SELECT BY DONE select By Done settings put TAG SELECT BY PRIORITY select By Priority  saveState IDialogSettings dialogSettings saveState dialogSettings dialogSettings IDialogSettings dialogSettings getSection TAG_DIALOG_SECTION dialogSettings addNewSection TAG_DIALOG_SECTION TAG_CONTAINS TAG_DESCRIPTION TAG_DONE TAG_PRIORITY TAG_SELECT_BY_DONE selectByDone TAG_SELECT_BY_PRIORITY selectByPriority

param to Copy public Task Marker I Marker to Copy super to Copy  toCopy TaskMarker IMarker toCopy toCopy
public void refresh super refresh priority get Marker get Attribute I Marker PRIORITY I Marker PRIORITY NORMAL done 1 if get Marker get Attribute I Marker USER EDITABLE true done 0 if get Marker get Attribute I Marker DONE false done 1  getMarker getAttribute IMarker IMarker PRIORITY_NORMAL getMarker getAttribute IMarker USER_EDITABLE getMarker getAttribute IMarker
public int get Priority return priority  getPriority
public int get Done return done  getDone

private I Cell Modifier cell Modifier new I Cell Modifier public Object get Value Object element String property if element instanceof Concrete Marker I Marker marker Concrete Marker element get Marker if COMPLETION equals property return new Boolean marker get Attribute I Marker DONE false if I Marker PRIORITY equals property return new Integer I Marker PRIORITY HIGH marker get Attribute I Marker PRIORITY I Marker PRIORITY NORMAL if I Marker MESSAGE equals property return marker get Attribute I Marker MESSAGE NON NLS 1 return null  ICellModifier cellModifier ICellModifier getValue ConcreteMarker IMarker ConcreteMarker getMarker getAttribute IMarker IMarker IMarker PRIORITY_HIGH getAttribute IMarker IMarker PRIORITY_NORMAL IMarker getAttribute IMarker
public boolean can Modify Object element String property return Util is Editable Concrete Marker element get Marker  canModify isEditable ConcreteMarker getMarker
public void modify Object element String property Object value if element instanceof Item Item item Item element Object data item get Data if data instanceof Concrete Marker Concrete Marker concrete Marker Concrete Marker data I Marker marker concrete Marker get Marker try Object old Value get Value data property if old Value null old Value equals value if COMPLETION equals property marker set Attribute I Marker DONE value else if I Marker PRIORITY equals property marker set Attribute I Marker PRIORITY I Marker PRIORITY HIGH Integer value int Value else if I Marker MESSAGE equals property marker set Attribute I Marker MESSAGE value concrete Marker refresh catch Core Exception e Error Dialog open Error get Site get Shell Messages get String error Modifying Task null e get Status NON NLS 1  getData ConcreteMarker ConcreteMarker concreteMarker ConcreteMarker IMarker concreteMarker getMarker oldValue getValue oldValue oldValue setAttribute IMarker IMarker setAttribute IMarker IMarker PRIORITY_HIGH intValue IMarker setAttribute IMarker concreteMarker CoreException ErrorDialog openError getSite getShell getString errorModifyingTask getStatus
public void create Part Control Composite parent super create Part Control parent Table Viewer table Viewer get Viewer Cell Editor cell Editors new Cell Editor table Viewer get Table get Column Count cell Editors 0 new Checkbox Cell Editor table Viewer get Table String priorities new String Messages get String priority high NON NLS 1 Messages get String priority normal NON NLS 1 Messages get String priority low NON NLS 1 cell Editors 1 new Combo Box Cell Editor table Viewer get Table priorities SWT READ ONLY Cell Editor description Cell Editor new Text Cell Editor table Viewer get Table cell Editors 2 description Cell Editor table Viewer set Cell Editors cell Editors table Viewer set Cell Modifier cell Modifier table Viewer set Column Properties TABLE COLUMN PROPERTIES cell Editor Action Handler new Cell Editor Action Handler get View Site get Action Bars cell Editor Action Handler add Cell Editor description Cell Editor cell Editor Action Handler set Copy Action copy Action cell Editor Action Handler set Paste Action paste Action cell Editor Action Handler set Delete Action delete Action cell Editor Action Handler set Select All Action select All Action  createPartControl createPartControl TableViewer tableViewer getViewer CellEditor cellEditors CellEditor tableViewer getTable getColumnCount cellEditors CheckboxCellEditor tableViewer getTable getString getString getString cellEditors ComboBoxCellEditor tableViewer getTable READ_ONLY CellEditor descriptionCellEditor TextCellEditor tableViewer getTable cellEditors descriptionCellEditor tableViewer setCellEditors cellEditors tableViewer setCellModifier cellModifier tableViewer setColumnProperties TABLE_COLUMN_PROPERTIES cellEditorActionHandler CellEditorActionHandler getViewSite getActionBars cellEditorActionHandler addCellEditor descriptionCellEditor cellEditorActionHandler setCopyAction copyAction cellEditorActionHandler setPasteAction pasteAction cellEditorActionHandler setDeleteAction deleteAction cellEditorActionHandler setSelectAllAction selectAllAction
public void dispose if cell Editor Action Handler null cell Editor Action Handler dispose if mark Completed Action null mark Completed Action dispose super dispose  cellEditorActionHandler cellEditorActionHandler markCompletedAction markCompletedAction
public void init I View Site view Site I Memento memento throws Part Init Exception super init view Site memento task Filter new Task Filter I Dialog Settings dialog Settings get Dialog Settings if task Filter null task Filter restore State dialog Settings  IViewSite viewSite IMemento PartInitException viewSite taskFilter TaskFilter IDialogSettings dialogSettings getDialogSettings taskFilter taskFilter restoreState dialogSettings
public void save State I Memento memento I Dialog Settings dialog Settings get Dialog Settings if task Filter null task Filter save State dialog Settings super save State memento  saveState IMemento IDialogSettings dialogSettings getDialogSettings taskFilter taskFilter saveState dialogSettings saveState
protected Column Layout Data get Default Column Layouts return DEFAULT COLUMN LAYOUTS  ColumnLayoutData getDefaultColumnLayouts DEFAULT_COLUMN_LAYOUTS
protected I Dialog Settings get Dialog Settings AbstractUI Plugin plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID I Dialog Settings workbench Settings plugin get Dialog Settings I Dialog Settings settings workbench Settings get Section TAG DIALOG SECTION if settings null settings workbench Settings add New Section TAG DIALOG SECTION return settings  IDialogSettings getDialogSettings AbstractUIPlugin AbstractUIPlugin getPlugin PLUGIN_ID IDialogSettings workbenchSettings getDialogSettings IDialogSettings workbenchSettings getSection TAG_DIALOG_SECTION workbenchSettings addNewSection TAG_DIALOG_SECTION
protected void create Actions super create Actions I Selection Provider sel Provider get Selection Provider add Global Task Action new Action Add Global Task this delete Completed Action new Action Delete Completed this sel Provider mark Completed Action new Action Mark Completed sel Provider properties Action new Action Task Properties this sel Provider  createActions createActions ISelectionProvider selProvider getSelectionProvider addGlobalTaskAction ActionAddGlobalTask deleteCompletedAction ActionDeleteCompleted selProvider markCompletedAction ActionMarkCompleted selProvider propertiesAction ActionTaskProperties selProvider
protected void create Columns Table table super create Columns table Table Column columns table get Columns if columns null columns length 1 columns 0 set Resizable false if columns length 2 columns 1 set Resizable false  createColumns createColumns TableColumn getColumns setResizable setResizable
protected void fill Context Menu I Menu Manager manager manager add add Global Task Action manager add new Separator super fill Context Menu manager  fillContextMenu IMenuManager addGlobalTaskAction fillContextMenu
protected void fill Context Menu Additions I Menu Manager manager manager add new Separator manager add mark Completed Action manager add delete Completed Action  fillContextMenuAdditions IMenuManager markCompletedAction deleteCompletedAction
protected Dialog Marker Filter get Filters Dialog return new Dialog Task Filter get Site get Shell task Filter  DialogMarkerFilter getFiltersDialog DialogTaskFilter getSite getShell taskFilter
protected I Field get Hidden Fields return HIDDEN FIELDS  IField getHiddenFields HIDDEN_FIELDS
protected String get Root Types return ROOT TYPES  getRootTypes ROOT_TYPES
protected Object get Viewer Input return Resources Plugin get Workspace get Root  getViewerInput ResourcesPlugin getWorkspace getRoot
protected I Field get Visible Fields return VISIBLE FIELDS  IField getVisibleFields VISIBLE_FIELDS
protected void init Tool Bar I Tool Bar Manager tool Bar Manager tool Bar Manager add add Global Task Action super init Tool Bar tool Bar Manager  initToolBar IToolBarManager toolBarManager toolBarManager addGlobalTaskAction initToolBar toolBarManager
public void set Selection I Structured Selection structured Selection boolean reveal TODO added because nick doesn t like public API inherited from internal classes super set Selection structured Selection reveal  setSelection IStructuredSelection structuredSelection setSelection structuredSelection
see org eclipse ui views markers internal Marker View get Marker Types protected String get Marker Types return new String I Marker TASK  MarkerView getMarkerTypes getMarkerTypes IMarker
see org eclipse ui views markers internal Marker View get Filter protected Marker Filter get Filter return task Filter  MarkerView getFilter MarkerFilter getFilter taskFilter
public void open Filters Dialog Dialog Task Filter dialog new Dialog Task Filter get Site get Shell task Filter if dialog open Window OK task Filter Task Filter dialog get Filter task Filter save State get Dialog Settings refresh  openFiltersDialog DialogTaskFilter DialogTaskFilter getSite getShell taskFilter taskFilter TaskFilter getFilter taskFilter saveState getDialogSettings
see org eclipse ui views markers internal Marker View update Filter Selection org eclipse core resources I Resource protected void update Filter Selection I Resource resources task Filter set Focus Resource resources  MarkerView updateFilterSelection IResource updateFilterSelection IResource taskFilter setFocusResource

public static String get String Resource Bundle resource Bundle String key throws Illegal Argument Exception if resource Bundle null key null throw new Illegal Argument Exception String value key try value resource Bundle get String key catch Missing Resource Exception e Missing Resource System err println e Missing Resource return value null value trim null  getString ResourceBundle resourceBundle IllegalArgumentException resourceBundle IllegalArgumentException resourceBundle getString MissingResourceException eMissingResource eMissingResource
public static String get Property String property I Marker marker if marker null return NON NLS 1 try Object obj marker get Attribute property if obj null return obj to String return NON NLS 1 catch Core Exception e return NON NLS 1  getProperty IMarker getAttribute toString CoreException
public static String get Creation Time long timestamp return Date Format get Date Time Instance Date Format LONG Date Format MEDIUM format new Date timestamp  getCreationTime DateFormat getDateTimeInstance DateFormat DateFormat
public static String get Creation Time I Marker marker try return get Creation Time marker get Creation Time catch Core Exception e return NON NLS 1  getCreationTime IMarker getCreationTime getCreationTime CoreException
public static String get Container Name I Marker marker I Path path marker get Resource get Full Path int n path segment Count 1 n is the number of segments in container not path if n 0 return NON NLS 1 int len 0 for int i 0 i n i len path segment i length account for s if n 1 len n 1 String Buffer sb new String Buffer len for int i 0 i n i if i 0 sb append sb append path segment i return sb to String  getContainerName IMarker IPath getResource getFullPath segmentCount StringBuffer StringBuffer toString
public static String get Resource Name I Marker marker return marker get Resource get Name  getResourceName IMarker getResource getName
public static boolean is Editable I Marker marker if marker null return false try return marker is Subtype Of I Marker BOOKMARK marker is Subtype Of I Marker TASK marker get Attribute I Marker USER EDITABLE true catch Core Exception e return false  isEditable IMarker isSubtypeOf IMarker isSubtypeOf IMarker getAttribute IMarker USER_EDITABLE CoreException
private Util super 

Returns the id of the view used to show markers of the same type as the given marker param marker the marker return the view id or code null code if no appropriate view could be determined throws Core Exception if an exception occurs testing the type of the marker public static String get View Id I Marker marker throws Core Exception if marker is Subtype Of I Marker TASK return I Page Layout ID TASK LIST else if marker is Subtype Of I Marker PROBLEM return I Page Layout ID PROBLEM VIEW else if marker is Subtype Of I Marker BOOKMARK return I Page Layout ID BOOKMARKS return null  CoreException getViewId IMarker CoreException isSubtypeOf IMarker IPageLayout ID_TASK_LIST isSubtypeOf IMarker IPageLayout ID_PROBLEM_VIEW isSubtypeOf IMarker IPageLayout ID_BOOKMARKS
Shows the given marker in the appropriate view in the given page This must be called from the UI thread param page the workbench page in which to show the marker param marker the marker to show param show View code true code if the view should be shown first code false code to only show the marker if the view is already showing return code true code if the marker was successfully shown code false code if not public static boolean show Marker I Workbench Page page I Marker marker boolean show View try String view Id get View Id marker if view Id null I View Part view show View page show View view Id page find View view Id if view instanceof Marker View Structured Selection selection new Structured Selection marker Marker View marker View Marker View view marker View set Selection selection true return true return marker View get Selection equals selection catch Core Exception e ignore return false  showView showMarker IWorkbenchPage IMarker showView viewId getViewId viewId IViewPart showView showView viewId findView viewId MarkerView StructuredSelection StructuredSelection MarkerView markerView MarkerView markerView setSelection markerView getSelection CoreException

Creates the action param navigator the resource navigator param label the label for the action public Collapse All Action I Resource Navigator navigator String label super navigator label Workbench Help set Help this I Navigator Help Context Ids COLLAPSE ALL ACTION set Enabled true  CollapseAllAction IResourceNavigator WorkbenchHelp setHelp INavigatorHelpContextIds COLLAPSE_ALL_ACTION setEnabled
Implementation of method defined on code I Action code public void run get Navigator get Viewer collapse All  IAction getNavigator getViewer collapseAll

Creates a new action param shell the shell for any dialogs param clipboard a platform clipboard public Copy Action Shell shell Clipboard clipboard super Resource Navigator Messages get String Copy Action title NON NLS 1 Assert is Not Null shell Assert is Not Null clipboard this shell shell this clipboard clipboard set Tool Tip Text Resource Navigator Messages get String Copy Action tool Tip NON NLS 1 set Id Copy Action ID Workbench Help set Help this I Navigator Help Context Ids COPY ACTION  CopyAction ResourceNavigatorMessages getString CopyAction isNotNull isNotNull setToolTipText ResourceNavigatorMessages getString CopyAction toolTip setId CopyAction WorkbenchHelp setHelp INavigatorHelpContextIds COPY_ACTION
Creates a new action param shell the shell for any dialogs param clipboard a platform clipboard param paste Action a paste action since 2 0 public Copy Action Shell shell Clipboard clipboard Paste Action paste Action this shell clipboard this paste Action paste Action  pasteAction CopyAction PasteAction pasteAction pasteAction pasteAction
The code Copy Action code implementation of this method defined on code I Action code copies the selected resources to the clipboard public void run List selected Resources get Selected Resources I Resource resources I Resource selected Resources to Array new I Resource selected Resources size Get the file names and a string representation final int length resources length int actual Length 0 String file Names new String length String Buffer buf new String Buffer for int i 0 i length i I Path location resources i get Location location may be null See bug 29491 if location null file Names actual Length location toOS String if i 0 buf append n NON NLS 1 buf append resources i get Name was one or more of the locations null if actual Length length String temp File Names file Names file Names new String actual Length for int i 0 i actual Length i file Names i temp File Names i set Clipboard resources file Names buf to String update the enablement of the paste action workaround since the clipboard does not suppot callbacks if paste Action null paste Action get Structured Selection null paste Action selection Changed paste Action get Structured Selection  CopyAction IAction selectedResources getSelectedResources IResource IResource selectedResources toArray IResource selectedResources actualLength fileNames StringBuffer StringBuffer IPath getLocation fileNames actualLength toOSString getName actualLength tempFileNames fileNames fileNames actualLength actualLength fileNames tempFileNames setClipboard fileNames toString pasteAction pasteAction getStructuredSelection pasteAction selectionChanged pasteAction getStructuredSelection
Set the clipboard contents Prompt to retry if clipboard is busy param resources the resources to copy to the clipboard param file Names file names of the resources to copy to the clipboard param names string representation of all names private void set Clipboard I Resource resources String file Names String names try set the clipboard contents if file Names length 0 clipboard set Contents new Object resources file Names names new Transfer Resource Transfer get Instance File Transfer get Instance Text Transfer get Instance else clipboard set Contents new Object resources names new Transfer Resource Transfer get Instance Text Transfer get Instance catch SWT Error e if e code DND ERROR CANNOT SET CLIPBOARD throw e if Message Dialog open Question shell Resource Navigator Messages get String Copy To Clipboard Problem Dialog title Resource Navigator Messages get String Copy To Clipboard Problem Dialog message NON NLS 1 NON NLS 2 set Clipboard resources file Names names  fileNames setClipboard IResource fileNames fileNames setContents fileNames ResourceTransfer getInstance FileTransfer getInstance TextTransfer getInstance setContents ResourceTransfer getInstance TextTransfer getInstance SWTError ERROR_CANNOT_SET_CLIPBOARD MessageDialog openQuestion ResourceNavigatorMessages getString CopyToClipboardProblemDialog ResourceNavigatorMessages getString CopyToClipboardProblemDialog setClipboard fileNames
The code Copy Action code implementation of this code Selection Listener Action code method enables this action if one or more resources of compatible types are selected protected boolean update Selection I Structured Selection selection if super update Selection selection return false if get Selected Non Resources size 0 return false List selected Resources get Selected Resources if selected Resources size 0 return false boolean proj Selected selection Is Of Type I Resource PROJECT boolean file Folders Selected selection Is Of Type I Resource FILE I Resource FOLDER if proj Selected file Folders Selected return false selection must be homogeneous if proj Selected file Folders Selected return false must have a common parent I Container first Parent I Resource selected Resources get 0 get Parent if first Parent null return false Iterator resources Enum selected Resources iterator while resources Enum has Next I Resource current Resource I Resource resources Enum next if current Resource get Parent equals first Parent return false resource location must exist if current Resource get Location null return false return true  CopyAction SelectionListenerAction updateSelection IStructuredSelection updateSelection getSelectedNonResources selectedResources getSelectedResources selectedResources projSelected selectionIsOfType IResource fileFoldersSelected selectionIsOfType IResource IResource projSelected fileFoldersSelected projSelected fileFoldersSelected IContainer firstParent IResource selectedResources getParent firstParent resourcesEnum selectedResources resourcesEnum hasNext IResource currentResource IResource resourcesEnum currentResource getParent firstParent currentResource getLocation

private Resource Pattern Filter resource Filter Create a Filters Content Provider using the selections from the suppliec resource filter public Filters Content Provider Resource Pattern Filter filter this resource Filter filter  ResourcePatternFilter resourceFilter FiltersContentProvider FiltersContentProvider ResourcePatternFilter resourceFilter
Method declared on I Content Provider public void dispose  IContentProvider
public void dispose Returns the filters which are enabled by default return a list of strings public static List get Default Filters if default Filters null read Filters return default Filters  getDefaultFilters defaultFilters readFilters defaultFilters
Returns the filters currently defined for the navigator return a list of strings public static List get Defined Filters if defined Filters null read Filters return defined Filters  getDefinedFilters definedFilters readFilters definedFilters
Method declared on I Structured Content Provider public Object get Elements Object input Element return get Defined Filters to Array  IStructuredContentProvider getElements inputElement getDefinedFilters toArray
Return the initially selected elements public String get Initial Selections return this resource Filter get Patterns  getInitialSelections resourceFilter getPatterns
Method declared on I Content Provider public void input Changed Viewer viewer Object old Input Object new Input  IContentProvider inputChanged oldInput newInput
Reads the filters currently defined for the workbench private static void read Filters defined Filters new Array List default Filters new Array List AbstractUI Plugin plugin AbstractUI Plugin Platform get Plugin IDE Workbench Plugin IDE WORKBENCH if plugin null I Extension Point extension plugin get Descriptor get Extension Point Resource Pattern Filter FILTERS TAG if extension null I Extension extensions extension get Extensions for int i 0 i extensions length i I Configuration Element config Elements extensions i get Configuration Elements for int j 0 j config Elements length j String pattern config Elements j get Attribute pattern NON NLS 1 if pattern null defined Filters add pattern String selected config Elements j get Attribute selected NON NLS 1 if selected null selected equals Ignore Case true NON NLS 1 default Filters add pattern  readFilters definedFilters ArrayList defaultFilters ArrayList AbstractUIPlugin AbstractUIPlugin getPlugin IDEWorkbenchPlugin IDE_WORKBENCH IExtensionPoint getDescriptor getExtensionPoint ResourcePatternFilter FILTERS_TAG IExtension getExtensions IConfigurationElement configElements getConfigurationElements configElements configElements getAttribute definedFilters configElements getAttribute equalsIgnoreCase defaultFilters

Creates the action param navigator the resource navigator param label the label for the action public Filter Selection Action I Resource Navigator navigator String label super navigator label set Tool Tip Text FILTER TOOL TIP Workbench Help set Help this I Navigator Help Context Ids FILTER SELECTION ACTION set Enabled true  FilterSelectionAction IResourceNavigator setToolTipText FILTER_TOOL_TIP WorkbenchHelp setHelp INavigatorHelpContextIds FILTER_SELECTION_ACTION setEnabled
public void run I Resource Navigator navigator get Navigator Resource Pattern Filter filter navigator get Pattern Filter Filters Content Provider content Provider new Filters Content Provider filter List Selection Dialog dialog new List Selection Dialog get Shell get Viewer content Provider new Label Provider FILTER SELECTION MESSAGE dialog set Title FILTER TITLE MESSAGE dialog set Initial Selections content Provider get Initial Selections dialog open if dialog get Return Code Dialog OK Object results dialog get Result String selected Patterns new String results length System arraycopy results 0 selected Patterns 0 results length filter set Patterns selected Patterns navigator set Filters Preference selected Patterns Viewer viewer get Viewer viewer get Control set Redraw false viewer refresh viewer get Control set Redraw true  IResourceNavigator getNavigator ResourcePatternFilter getPatternFilter FiltersContentProvider contentProvider FiltersContentProvider ListSelectionDialog ListSelectionDialog getShell getViewer contentProvider LabelProvider FILTER_SELECTION_MESSAGE setTitle FILTER_TITLE_MESSAGE setInitialSelections contentProvider getInitialSelections getReturnCode getResult selectedPatterns selectedPatterns setPatterns selectedPatterns setFiltersPreference selectedPatterns getViewer getControl setRedraw getControl setRedraw

private Goto Resource Action go To Resource Action public Goto Action Group I Resource Navigator navigator super navigator  GotoResourceAction goToResourceAction GotoActionGroup IResourceNavigator
public void fill Context Menu I Menu Manager menu I Structured Selection selection I Structured Selection get Context get Selection if selection size 1 if Resource Selection Util all Resources Are Of Type selection I Resource FOLDER menu add go Into Action else I Structured Selection resource Selection Resource Selection Util all Resources selection I Resource PROJECT if resource Selection null resource Selection is Empty I Project project I Project resource Selection get First Element if project is Open menu add go Into Action  fillContextMenu IMenuManager IStructuredSelection IStructuredSelection getContext getSelection ResourceSelectionUtil allResourcesAreOfType IResource goIntoAction IStructuredSelection resourceSelection ResourceSelectionUtil allResources IResource resourceSelection resourceSelection isEmpty IProject IProject resourceSelection getFirstElement isOpen goIntoAction
public void fill Action Bars I Action Bars action Bars action Bars set Global Action Handler I Workbench Action Constants GO INTO go Into Action action Bars set Global Action Handler Action Factory BACK get Id back Action action Bars set Global Action Handler Action Factory FORWARD get Id forward Action action Bars set Global Action Handler I Workbench Action Constants UP up Action action Bars set Global Action Handler I Workbench Action Constants GO TO RESOURCE go To Resource Action I Tool Bar Manager tool Bar action Bars get Tool Bar Manager tool Bar add back Action tool Bar add forward Action tool Bar add up Action  fillActionBars IActionBars actionBars actionBars setGlobalActionHandler IWorkbenchActionConstants GO_INTO goIntoAction actionBars setGlobalActionHandler ActionFactory getId backAction actionBars setGlobalActionHandler ActionFactory getId forwardAction actionBars setGlobalActionHandler IWorkbenchActionConstants upAction actionBars setGlobalActionHandler IWorkbenchActionConstants GO_TO_RESOURCE goToResourceAction IToolBarManager toolBar actionBars getToolBarManager toolBar backAction toolBar forwardAction toolBar upAction
protected void make Actions Frame List frame List navigator get Frame List go Into Action new Go Into Action frame List back Action new Back Action frame List forward Action new Forward Action frame List up Action new Up Action frame List go To Resource Action new Goto Resource Action navigator Resource Navigator Messages get String Go To Resource label NON NLS 1  makeActions FrameList frameList getFrameList goIntoAction GoIntoAction frameList backAction BackAction frameList forwardAction ForwardAction frameList upAction UpAction frameList goToResourceAction GotoResourceAction ResourceNavigatorMessages getString GoToResource
public void update Action Bars Action Context context get Context boolean enable false Fix for bug 26126 Resource change listener could call update Action Bars without a context being set This should never happen because resource navigator sets context immediately after this group is created if context null I Structured Selection selection I Structured Selection context get Selection if selection size 1 Object object selection get First Element if object instanceof I Project enable I Project object is Open else if object instanceof I Folder enable true go Into Action set Enabled enable the rest of the actions update by listening to frame list changes  updateActionBars ActionContext getContext updateActionBars IStructuredSelection IStructuredSelection getSelection getFirstElement IProject IProject isOpen IFolder goIntoAction setEnabled

public class Goto Resource Action extends Resource Navigator Action Creates a new instance of the class since 2 0 public Goto Resource Action I Resource Navigator navigator String label super navigator label Workbench Help set Help this I Navigator Help Context Ids GOTO RESOURCE ACTION  GotoResourceAction ResourceNavigatorAction GotoResourceAction IResourceNavigator WorkbenchHelp setHelp INavigatorHelpContextIds GOTO_RESOURCE_ACTION
Collect all resources in the workbench open a dialog asking the user to select a resource and change the selection in the navigator public void run I Container container I Container get Viewer get Input Goto Resource Dialog dialog new Goto Resource Dialog get Shell container I Resource FILE I Resource FOLDER I Resource PROJECT dialog open Object result dialog get Result if result null result length 0 result 0 instanceof I Resource false return I Resource selection I Resource result 0 get Viewer set Selection new Structured Selection selection true  IContainer IContainer getViewer getInput GotoResourceDialog GotoResourceDialog getShell IResource IResource IResource getResult IResource IResource IResource getViewer setSelection StructuredSelection

Creates a new instance of the class protected Goto Resource Dialog Shell parent Shell I Container container int types Mask super parent Shell container types Mask set Title Resource Navigator Messages get String Goto title NON NLS 1 Workbench Help set Help parent Shell I Navigator Help Context Ids GOTO RESOURCE DIALOG  GotoResourceDialog parentShell IContainer typesMask parentShell typesMask setTitle ResourceNavigatorMessages getString WorkbenchHelp setHelp parentShell INavigatorHelpContextIds GOTO_RESOURCE_DIALOG

Returns the pattern filter return the pattern filter 
Returns the active working set or code null code if none return the active working set or code null code if none since 2 0 
I Working Set get Working Set Returns the current sorter Resource Sorter get Sorter  IWorkingSet getWorkingSet ResourceSorter getSorter
Resource Sorter get Sorter Sets the current sorter void set Sorter Resource Sorter sorter  ResourceSorter getSorter setSorter ResourceSorter
Sets the values of the filter preference to be the strings in preference values 
void set Filters Preference String patterns Returns the viewer which shows the resource tree Tree Viewer get Viewer  setFiltersPreference TreeViewer getViewer
Tree Viewer get Viewer Returns the frame list for this navigator Frame List get Frame List  TreeViewer getViewer FrameList getFrameList
Returns whether this navigator s selection automatically tracks the active editor return code true code if linking is enabled code false code if not since 2 1 
Sets the working set for this view or code null code to clear it param working Set the working set or code null code to clear it since 2 0  workingSet
Sets whether this navigator s selection automatically tracks the active editor param enabled code true code to enable code false code to disable since 2 1 

Only the singleton instance of this class may be used private Local Selection Transfer  LocalSelectionTransfer
Returns the singleton return Local Selection Transfer public static Local Selection Transfer get Instance return INSTANCE  LocalSelectionTransfer LocalSelectionTransfer getInstance
Returns the local transfer data return the local transfer data public I Selection get Selection return selection  ISelection getSelection
Tests whether native drop data matches this transfer type param result result of converting the native drop data to Java return true if the native drop data does not match this transfer type false otherwise private boolean is Invalid Native Type Object result return result instanceof byte TYPE NAME equals new String byte result  isInvalidNativeType TYPE_NAME
Returns the type id used to identify this transfer return the type id used to identify this transfer protected int get Type Ids return new int TYPEID  getTypeIds
Returns the type name used to identify this transfer return the type name used to identify this transfer protected String get Type Names return new String TYPE NAME  getTypeNames TYPE_NAME
Overrides org eclipse swt dnd Byte Array Transfer java To Native Object Transfer Data Only encode the transfer type name since the selection is read and written in the same process see org eclipse swt dnd Byte Array Transfer java To Native java lang Object org eclipse swt dnd Transfer Data public void java To Native Object object Transfer Data transfer Data byte check TYPE NAME get Bytes super java To Native check transfer Data  ByteArrayTransfer javaToNative TransferData ByteArrayTransfer javaToNative TransferData javaToNative TransferData transferData TYPE_NAME getBytes javaToNative transferData
Overrides org eclipse swt dnd Byte Array Transfer native To Java Transfer Data Test if the native drop data matches this transfer type see org eclipse swt dnd Byte Array Transfer native To Java Transfer Data public Object native To Java Transfer Data transfer Data Object result super native To Java transfer Data if is Invalid Native Type result I Log log IDE Workbench Plugin get Default get Log log log new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH I Status ERROR Resource Navigator Messages get String Local Selection Transfer error Message null NON NLS 1 return selection  ByteArrayTransfer nativeToJava TransferData ByteArrayTransfer nativeToJava TransferData nativeToJava TransferData transferData nativeToJava transferData isInvalidNativeType ILog IDEWorkbenchPlugin getDefault getLog IStatus IDEWorkbenchPlugin IDE_WORKBENCH IStatus ResourceNavigatorMessages getString LocalSelectionTransfer errorMessage
Sets the transfer data for local use param s the transfer data public void set Selection I Selection s selection s  setSelection ISelection
Returns the time when the selection operation this transfer is associated with was started return the time when the selection operation has started see org eclipse swt events Typed Event time public long get Selection Set Time return selection Set Time  TypedEvent getSelectionSetTime selectionSetTime
Sets the time when the selection operation this transfer is associated with was started If assigning this from an SWT event be sure to use code set Selection Time event time 0xFFFF code param time the time when the selection operation was started see org eclipse swt events Typed Event time public void set Selection Set Time long time selection Set Time time  setSelectionTime TypedEvent setSelectionSetTime selectionSetTime

super navigator resource Change Listener new I Resource Change Listener public void resource Changed I Resource Change Event event handle Resource Changed event  resourceChangeListener IResourceChangeListener resourceChanged IResourceChangeEvent handleResourceChanged
Constructs the main action group public Main Action Group I Resource Navigator navigator super navigator resource Change Listener new I Resource Change Listener public void resource Changed I Resource Change Event event handle Resource Changed event Resources Plugin get Workspace add Resource Change Listener resource Change Listener I Resource Change Event POST CHANGE make Sub Groups  MainActionGroup IResourceNavigator resourceChangeListener IResourceChangeListener resourceChanged IResourceChangeEvent handleResourceChanged ResourcesPlugin getWorkspace addResourceChangeListener resourceChangeListener IResourceChangeEvent POST_CHANGE makeSubGroups
get Navigator get Site get Shell get Display sync Exec new Runnable public void run add Task Action selection Changed selection goto Group update Action Bars refactor Group update Action Bars workspace Group update Action Bars  getNavigator getSite getShell getDisplay syncExec addTaskAction selectionChanged gotoGroup updateActionBars refactorGroup updateActionBars workspaceGroup updateActionBars
Handles a resource changed event by updating the enablement if one of the selected projects is opened or closed protected void handle Resource Changed I Resource Change Event event Action Context context get Context if context null return final I Structured Selection selection I Structured Selection context get Selection if Resource Selection Util all Resources Are Of Type selection I Resource PROJECT false return List sel selection to List I Resource Delta delta event get Delta if delta null return I Resource Delta proj Deltas delta get Affected Children I Resource Delta CHANGED for int i 0 i proj Deltas length i I Resource Delta proj Delta proj Deltas i if proj Delta get Flags I Resource Delta OPEN 0 if sel contains proj Delta get Resource get Navigator get Site get Shell get Display sync Exec new Runnable public void run add Task Action selection Changed selection goto Group update Action Bars refactor Group update Action Bars workspace Group update Action Bars  handleResourceChanged IResourceChangeEvent ActionContext getContext IStructuredSelection IStructuredSelection getSelection ResourceSelectionUtil allResourcesAreOfType IResource toList IResourceDelta getDelta IResourceDelta projDeltas getAffectedChildren IResourceDelta projDeltas IResourceDelta projDelta projDeltas projDelta getFlags IResourceDelta projDelta getResource getNavigator getSite getShell getDisplay syncExec addTaskAction selectionChanged gotoGroup updateActionBars refactorGroup updateActionBars workspaceGroup updateActionBars
Makes the actions contained directly in this action group protected void make Actions Shell shell navigator get Site get Shell add Bookmark Action new Add Bookmark Action shell add Task Action new Add Task Action shell property Dialog Action new Property Dialog Action shell navigator get Viewer import Action new Import Resources Action navigator get Site get Workbench Window import Action set Disabled Image Descriptor get Image Descriptor dtool16 import wiz gif NON NLS 1 import Action set Image Descriptor get Image Descriptor etool16 import wiz gif NON NLS 1 export Action new Export Resources Action navigator get Site get Workbench Window export Action set Disabled Image Descriptor get Image Descriptor dtool16 export wiz gif NON NLS 1 export Action set Image Descriptor get Image Descriptor etool16 export wiz gif NON NLS 1 collapse All Action new Collapse All Action navigator Resource Navigator Messages get String Collapse All Action title NON NLS 1 collapse All Action set Tool Tip Text Resource Navigator Messages get String Collapse All Action tool Tip NON NLS 1 collapse All Action set Image Descriptor get Image Descriptor elcl16 collapseall gif NON NLS 1 toggle Linking Action new Toggle Linking Action navigator Resource Navigator Messages get String Toggle Linking Action text NON NLS 1 toggle Linking Action set Tool Tip Text Resource Navigator Messages get String Toggle Linking Action tool Tip NON NLS 1 toggle Linking Action set Image Descriptor get Image Descriptor elcl16 synced gif NON NLS 1  makeActions getSite getShell addBookmarkAction AddBookmarkAction addTaskAction AddTaskAction propertyDialogAction PropertyDialogAction getViewer importAction ImportResourcesAction getSite getWorkbenchWindow importAction setDisabledImageDescriptor getImageDescriptor import_wiz importAction setImageDescriptor getImageDescriptor import_wiz exportAction ExportResourcesAction getSite getWorkbenchWindow exportAction setDisabledImageDescriptor getImageDescriptor export_wiz exportAction setImageDescriptor getImageDescriptor export_wiz collapseAllAction CollapseAllAction ResourceNavigatorMessages getString CollapseAllAction collapseAllAction setToolTipText ResourceNavigatorMessages getString CollapseAllAction toolTip collapseAllAction setImageDescriptor getImageDescriptor toggleLinkingAction ToggleLinkingAction ResourceNavigatorMessages getString ToggleLinkingAction toggleLinkingAction setToolTipText ResourceNavigatorMessages getString ToggleLinkingAction toolTip toggleLinkingAction setImageDescriptor getImageDescriptor
I Property Change Listener working Set Updater new I Property Change Listener public void property Change Property Change Event event String property event get Property if Working Set Filter Action Group CHANGE WORKING SET equals property I Resource Navigator navigator get Navigator Object new Value event get New Value if new Value instanceof I Working Set navigator set Working Set I Working Set new Value else if new Value null navigator set Working Set null  IPropertyChangeListener workingSetUpdater IPropertyChangeListener propertyChange PropertyChangeEvent getProperty WorkingSetFilterActionGroup CHANGE_WORKING_SET IResourceNavigator getNavigator newValue getNewValue newValue IWorkingSet setWorkingSet IWorkingSet newValue newValue setWorkingSet
Makes the sub action groups protected void make Sub Groups goto Group new Goto Action Group navigator open Group new Open Action Group navigator refactor Group new Refactor Action Group navigator I Property Change Listener working Set Updater new I Property Change Listener public void property Change Property Change Event event String property event get Property if Working Set Filter Action Group CHANGE WORKING SET equals property I Resource Navigator navigator get Navigator Object new Value event get New Value if new Value instanceof I Working Set navigator set Working Set I Working Set new Value else if new Value null navigator set Working Set null Tree Viewer tree View navigator get Viewer Shell shell tree View get Control get Shell working Set Group new Working Set Filter Action Group shell working Set Updater working Set Group set Working Set navigator get Working Set sort And Filter Group new Sort And Filter Action Group navigator workspace Group new Workspace Action Group navigator  makeSubGroups gotoGroup GotoActionGroup openGroup OpenActionGroup refactorGroup RefactorActionGroup IPropertyChangeListener workingSetUpdater IPropertyChangeListener propertyChange PropertyChangeEvent getProperty WorkingSetFilterActionGroup CHANGE_WORKING_SET IResourceNavigator getNavigator newValue getNewValue newValue IWorkingSet setWorkingSet IWorkingSet newValue newValue setWorkingSet TreeViewer treeView getViewer treeView getControl getShell workingSetGroup WorkingSetFilterActionGroup workingSetUpdater workingSetGroup setWorkingSet getWorkingSet sortAndFilterGroup SortAndFilterActionGroup workspaceGroup WorkspaceActionGroup
Extends the superclass implementation to set the context in the subgroups public void set Context Action Context context super set Context context goto Group set Context context open Group set Context context refactor Group set Context context sort And Filter Group set Context context workspace Group set Context context  setContext ActionContext setContext gotoGroup setContext openGroup setContext refactorGroup setContext sortAndFilterGroup setContext workspaceGroup setContext
Fills the context menu with the actions contained in this group and its subgroups param menu the context menu public void fill Context Menu I Menu Manager menu I Structured Selection selection I Structured Selection get Context get Selection boolean only Files Selected selection is Empty Resource Selection Util all Resources Are Of Type selection I Resource FILE Menu Manager new Menu new Menu Manager Resource Navigator Messages get String Resource Navigator new NON NLS 1 menu add new Menu new New Wizard Menu new Menu navigator get Site get Workbench Window false goto Group fill Context Menu menu open Group fill Context Menu menu menu add new Separator refactor Group fill Context Menu menu menu add new Separator menu add import Action menu add export Action import Action selection Changed selection export Action selection Changed selection menu add new Separator workspace Group fill Context Menu menu menu add new Separator I Workbench Action Constants MB ADDITIONS menu add new Separator I Workbench Action Constants MB ADDITIONS end NON NLS 1 menu add new Separator if selection size 1 property Dialog Action selection Changed selection menu add property Dialog Action  fillContextMenu IMenuManager IStructuredSelection IStructuredSelection getContext getSelection onlyFilesSelected isEmpty ResourceSelectionUtil allResourcesAreOfType IResource MenuManager newMenu MenuManager ResourceNavigatorMessages getString ResourceNavigator newMenu NewWizardMenu newMenu getSite getWorkbenchWindow gotoGroup fillContextMenu openGroup fillContextMenu refactorGroup fillContextMenu importAction exportAction importAction selectionChanged exportAction selectionChanged workspaceGroup fillContextMenu IWorkbenchActionConstants MB_ADDITIONS IWorkbenchActionConstants MB_ADDITIONS propertyDialogAction selectionChanged propertyDialogAction
Adds the actions in this group and its subgroups to the action bars public void fill Action Bars I Action Bars action Bars action Bars set Global Action Handler Action Factory PROPERTIES get Id property Dialog Action action Bars set Global Action Handler IDE Action Factory BOOKMARK get Id add Bookmark Action action Bars set Global Action Handler IDE Action Factory ADD TASK get Id add Task Action goto Group fill Action Bars action Bars open Group fill Action Bars action Bars refactor Group fill Action Bars action Bars working Set Group fill Action Bars action Bars sort And Filter Group fill Action Bars action Bars workspace Group fill Action Bars action Bars I Menu Manager menu action Bars get Menu Manager menu add toggle Linking Action I Tool Bar Manager tool Bar action Bars get Tool Bar Manager tool Bar add new Separator tool Bar add collapse All Action tool Bar add toggle Linking Action  fillActionBars IActionBars actionBars actionBars setGlobalActionHandler ActionFactory getId propertyDialogAction actionBars setGlobalActionHandler IDEActionFactory getId addBookmarkAction actionBars setGlobalActionHandler IDEActionFactory ADD_TASK getId addTaskAction gotoGroup fillActionBars actionBars openGroup fillActionBars actionBars refactorGroup fillActionBars actionBars workingSetGroup fillActionBars actionBars sortAndFilterGroup fillActionBars actionBars workspaceGroup fillActionBars actionBars IMenuManager actionBars getMenuManager toggleLinkingAction IToolBarManager toolBar actionBars getToolBarManager toolBar toolBar collapseAllAction toolBar toggleLinkingAction
Updates the actions which were added to the action bars delegating to the subgroups as necessary public void update Action Bars I Structured Selection selection I Structured Selection get Context get Selection property Dialog Action set Enabled selection size 1 add Bookmark Action selection Changed selection add Task Action selection Changed selection goto Group update Action Bars open Group update Action Bars refactor Group update Action Bars working Set Group update Action Bars sort And Filter Group update Action Bars workspace Group update Action Bars  updateActionBars IStructuredSelection IStructuredSelection getContext getSelection propertyDialogAction setEnabled addBookmarkAction selectionChanged addTaskAction selectionChanged gotoGroup updateActionBars openGroup updateActionBars refactorGroup updateActionBars workingSetGroup updateActionBars sortAndFilterGroup updateActionBars workspaceGroup updateActionBars
Runs the default action open file by delegating the open group public void run Default Action I Structured Selection selection open Group run Default Action selection  runDefaultAction IStructuredSelection openGroup runDefaultAction
Handles a key pressed event by invoking the appropriate action delegating to the subgroups as necessary public void handle Key Pressed Key Event event refactor Group handle Key Pressed event workspace Group handle Key Pressed event  handleKeyPressed KeyEvent refactorGroup handleKeyPressed workspaceGroup handleKeyPressed
Extends the superclass implementation to dispose the actions in this group and its subgroups public void dispose Resources Plugin get Workspace remove Resource Change Listener resource Change Listener collapse All Action dispose export Action dispose import Action dispose property Dialog Action dispose toggle Linking Action dispose goto Group dispose open Group dispose refactor Group dispose sort And Filter Group dispose working Set Group dispose workspace Group dispose super dispose  ResourcesPlugin getWorkspace removeResourceChangeListener resourceChangeListener collapseAllAction exportAction importAction propertyDialogAction toggleLinkingAction gotoGroup openGroup refactorGroup sortAndFilterGroup workingSetGroup workspaceGroup

Constructs a new drag adapter public Navigator Drag Adapter I Selection Provider provider selection Provider provider  NavigatorDragAdapter ISelectionProvider selectionProvider
public void drag Finished Drag Source Event event Local Selection Transfer get Instance set Selection null if event doit false return final int type Mask I Resource FOLDER I Resource FILE if event detail DND DROP MOVE never delete resources when dragging outside Eclipse workaround for bug 30543 if last Data Type null File Transfer get Instance is Supported Type last Data Type return I Resource resources get Selected Resources type Mask Drag Source drag Source Drag Source event widget Control control drag Source get Control Shell shell control get Shell Read Only State Checker checker if resources null resources length 0 return checker new Read Only State Checker shell CHECK MOVE TITLE CHECK DELETE MESSAGE resources checker check Read Only Resources resources delete the old elements for int i 0 i resources length i try resources i delete I Resource KEEP HISTORY I Resource FORCE null catch Core Exception e e print Stack Trace else if event detail DND DROP TARGET MOVE I Resource resources get Selected Resources type Mask file moved for us by OS no need to delete the resources just update the view if resources null return for int i 0 i resources length i try resources i refresh Local I Resource DEPTH INFINITE null catch Core Exception e e print Stack Trace  dragFinished DragSourceEvent LocalSelectionTransfer getInstance setSelection typeMask IResource IResource DROP_MOVE lastDataType FileTransfer getInstance isSupportedType lastDataType IResource getSelectedResources typeMask DragSource dragSource DragSource dragSource getControl getShell ReadOnlyStateChecker ReadOnlyStateChecker CHECK_MOVE_TITLE CHECK_DELETE_MESSAGE checkReadOnlyResources IResource KEEP_HISTORY IResource CoreException printStackTrace DROP_TARGET_MOVE IResource getSelectedResources typeMask refreshLocal IResource DEPTH_INFINITE CoreException printStackTrace
public void drag Set Data Drag Source Event event final int type Mask I Resource FILE I Resource FOLDER I Resource resources get Selected Resources type Mask if resources null resources length 0 return last Data Type event data Type use local selection transfer if possible if Local Selection Transfer get Instance is Supported Type event data Type event data Local Selection Transfer get Instance get Selection return use resource transfer if possible if Resource Transfer get Instance is Supported Type event data Type event data resources return resort to a file transfer if File Transfer get Instance is Supported Type event data Type return Get the path of each file and set as the drag data final int length resources length int actual Length 0 String file Names new String length for int i 0 i length i I Path location resources i get Location location may be null See bug 29491 if location null file Names actual Length location toOS String if actual Length 0 return was one or more of the locations null if actual Length length String temp File Names file Names file Names new String actual Length for int i 0 i actual Length i file Names i temp File Names i event data file Names  dragSetData DragSourceEvent typeMask IResource IResource IResource getSelectedResources typeMask lastDataType dataType LocalSelectionTransfer getInstance isSupportedType dataType LocalSelectionTransfer getInstance getSelection ResourceTransfer getInstance isSupportedType dataType FileTransfer getInstance isSupportedType dataType actualLength fileNames IPath getLocation fileNames actualLength toOSString actualLength actualLength tempFileNames fileNames fileNames actualLength actualLength fileNames tempFileNames fileNames
public void drag Start Drag Source Event event last Data Type null Workaround for 1GEUS9V Drag Source drag Source Drag Source event widget Control control drag Source get Control if control control get Display get Focus Control event doit false return I Structured Selection selection I Structured Selection selection Provider get Selection for Iterator i selection iterator i has Next Object next i next if next instanceof I File next instanceof I Folder event doit false return if selection is Empty event doit false return Local Selection Transfer get Instance set Selection selection event doit true  dragStart DragSourceEvent lastDataType DragSource dragSource DragSource dragSource getControl getDisplay getFocusControl IStructuredSelection IStructuredSelection selectionProvider getSelection hasNext IFile IFolder isEmpty LocalSelectionTransfer getInstance setSelection
private I Resource get Selected Resources int resource Types List resources new Array List I Resource result new I Resource 0 I Selection selection selection Provider get Selection if selection instanceof I Structured Selection selection is Empty return null I Structured Selection structured Selection I Structured Selection selection if structured Selection null return null loop through list and look for matching items Iterator enum structured Selection iterator while enum has Next Object obj enum next if obj instanceof I Resource I Resource res I Resource obj if res get Type resource Types res get Type resources add res result new I Resource resources size resources to Array result return result  IResource getSelectedResources resourceTypes ArrayList IResource IResource ISelection selectionProvider getSelection IStructuredSelection isEmpty IStructuredSelection structuredSelection IStructuredSelection structuredSelection structuredSelection hasNext IResource IResource IResource getType resourceTypes getType IResource toArray

Constructs a new drop adapter public Navigator Drop Adapter Structured Viewer viewer super viewer  NavigatorDropAdapter StructuredViewer
public void drag Enter Drop Target Event event if File Transfer get Instance is Supported Type event current Data Type event detail DND DROP DEFAULT default to copy when dragging from outside Eclipse Fixes bug 16308 event detail DND DROP COPY super drag Enter event  dragEnter DropTargetEvent FileTransfer getInstance isSupportedType currentDataType DROP_DEFAULT DROP_COPY dragEnter
Returns an error status with the given info private I Status error String message return error message null  IStatus
Returns an error status with the given info private I Status error String message Throwable exception return new Status I Status ERROR PlatformUI PLUGIN ID 0 message exception  IStatus IStatus PLUGIN_ID
Returns the actual target of the drop given the resource under the mouse If the mouse target is a file then the drop actually occurs in its parent If the drop location is before or after the mouse target and feedback is enabled the target is also the parent private I Container get Actual Target I Resource mouse Target if cursor is before or after mouse Target set target to parent if get Feedback Enabled if get Current Location LOCATION BEFORE get Current Location LOCATION AFTER return mouse Target get Parent if cursor is on a file return the parent if mouse Target get Type I Resource FILE return mouse Target get Parent otherwise the mouse Target is the real target return I Container mouse Target  IContainer getActualTarget IResource mouseTarget mouseTarget getFeedbackEnabled getCurrentLocation LOCATION_BEFORE getCurrentLocation LOCATION_AFTER mouseTarget getParent mouseTarget getType IResource mouseTarget getParent mouseTarget IContainer mouseTarget
Returns the display private Display get Display return get Viewer get Control get Display  getDisplay getViewer getControl getDisplay
Returns the resource selection from the Local Selection Transfer return the resource selection from the Local Selection Transfer private I Resource get Selected Resources I Resource selected Resources null I Selection selection Local Selection Transfer get Instance get Selection if selection instanceof I Structured Selection List selection List I Structured Selection selection to List selected Resources I Resource selection List to Array new I Resource selection List size return selected Resources  LocalSelectionTransfer LocalSelectionTransfer IResource getSelectedResources IResource selectedResources ISelection LocalSelectionTransfer getInstance getSelection IStructuredSelection selectionList IStructuredSelection toList selectedResources IResource selectionList toArray IResource selectionList selectedResources
Returns the shell private Shell get Shell return get Viewer get Control get Shell  getShell getViewer getControl getShell
Returns an error status with the given info private I Status info String message return new Status I Status INFO PlatformUI PLUGIN ID 0 message null  IStatus IStatus PLUGIN_ID
Adds the given status to the list of problems Discards OK statuses If the status is a multi status only its children are added private void merge Status Multi Status status I Status to Merge if to Merge isOK status merge to Merge  mergeStatus MultiStatus IStatus toMerge toMerge toMerge
Returns an status indicating success private I Status ok return new Status Status OK PlatformUI PLUGIN ID 0 Resource Navigator Messages get String Drop Adapter ok null NON NLS 1  IStatus PLUGIN_ID ResourceNavigatorMessages getString DropAdapter
Opens an error dialog if necessary Takes care of complex rules necessary for making the error dialog look nice private void open Error I Status status if status null return String generic Title Resource Navigator Messages get String Drop Adapter title NON NLS 1 int codes I Status ERROR I Status WARNING simple case one error not a multistatus if status is Multi Status Error Dialog open Error get Shell generic Title null status codes return one error single child of multistatus I Status children status get Children if children length 1 Error Dialog open Error get Shell status get Message null children 0 codes return several problems Error Dialog open Error get Shell generic Title null status codes  openError IStatus genericTitle ResourceNavigatorMessages getString DropAdapter IStatus IStatus isMultiStatus ErrorDialog openError getShell genericTitle IStatus getChildren ErrorDialog openError getShell getMessage ErrorDialog openError getShell genericTitle
Perform the drop see Drop Target Listener drop org eclipse swt dnd Drop Target Event public boolean perform Drop final Object data always Overwrite false if get Current Target null data null return false boolean result false I Status status null I Resource resources null Transfer Data current Transfer get Current Transfer if Local Selection Transfer get Instance is Supported Type current Transfer resources get Selected Resources else if Resource Transfer get Instance is Supported Type current Transfer resources I Resource data else if File Transfer get Instance is Supported Type current Transfer status perform File Drop data result status isOK else result Navigator Drop Adapter super perform Drop data if resources null if get Current Operation DND DROP COPY status perform Resource Copy get Shell resources else status perform Resource Move resources open Error status return result  DropTargetListener DropTargetEvent performDrop alwaysOverwrite getCurrentTarget IStatus IResource TransferData currentTransfer getCurrentTransfer LocalSelectionTransfer getInstance isSupportedType currentTransfer getSelectedResources ResourceTransfer getInstance isSupportedType currentTransfer IResource FileTransfer getInstance isSupportedType currentTransfer performFileDrop NavigatorDropAdapter performDrop getCurrentOperation DROP_COPY performResourceCopy getShell performResourceMove openError
Display get Current async Exec new Runnable public void run get Shell force Active Copy Files And Folders Operation operation new Copy Files And Folders Operation get Shell operation copy Files names target  getCurrent asyncExec getShell forceActive CopyFilesAndFoldersOperation CopyFilesAndFoldersOperation getShell copyFiles
Performs a drop using the File Transfer transfer type private I Status perform File Drop Object data Multi Status problems new Multi Status PlatformUI PLUGIN ID 0 Resource Navigator Messages get String Drop Adapter problem Importing null NON NLS 1 merge Status problems validate Target get Current Target get Current Transfer final I Container target get Actual Target I Resource get Current Target final String names String data Run the import operation asynchronously Otherwise the drag source e g Windows Explorer will be blocked while the operation executes Fixes bug 16478 Display get Current async Exec new Runnable public void run get Shell force Active Copy Files And Folders Operation operation new Copy Files And Folders Operation get Shell operation copy Files names target return problems  FileTransfer IStatus performFileDrop MultiStatus MultiStatus PLUGIN_ID ResourceNavigatorMessages getString DropAdapter problemImporting mergeStatus validateTarget getCurrentTarget getCurrentTransfer IContainer getActualTarget IResource getCurrentTarget getCurrent asyncExec getShell forceActive CopyFilesAndFoldersOperation CopyFilesAndFoldersOperation getShell copyFiles
Performs a resource copy private I Status perform Resource Copy Shell shell I Resource sources Multi Status problems new Multi Status PlatformUI PLUGIN ID 1 Resource Navigator Messages get String Drop Adapter problems Moving null NON NLS 1 merge Status problems validate Target get Current Target get Current Transfer I Container target get Actual Target I Resource get Current Target Copy Files And Folders Operation operation new Copy Files And Folders Operation shell operation copy Resources sources target return problems  IStatus performResourceCopy IResource MultiStatus MultiStatus PLUGIN_ID ResourceNavigatorMessages getString DropAdapter problemsMoving mergeStatus validateTarget getCurrentTarget getCurrentTransfer IContainer getActualTarget IResource getCurrentTarget CopyFilesAndFoldersOperation CopyFilesAndFoldersOperation copyResources
Performs a resource move private I Status perform Resource Move I Resource sources Multi Status problems new Multi Status PlatformUI PLUGIN ID 1 Resource Navigator Messages get String Drop Adapter problems Moving null NON NLS 1 merge Status problems validate Target get Current Target get Current Transfer I Container target get Actual Target I Resource get Current Target Read Only State Checker checker new Read Only State Checker get Shell Resource Navigator Messages get String Move Resource Action title NON NLS 1 Resource Navigator Messages get String Move Resource Action check Move Message NON NLS 1 sources checker check Read Only Resources sources Move Files And Folders Operation operation new Move Files And Folders Operation get Shell operation copy Resources sources target return problems  IStatus performResourceMove IResource MultiStatus MultiStatus PLUGIN_ID ResourceNavigatorMessages getString DropAdapter problemsMoving mergeStatus validateTarget getCurrentTarget getCurrentTransfer IContainer getActualTarget IResource getCurrentTarget ReadOnlyStateChecker ReadOnlyStateChecker getShell ResourceNavigatorMessages getString MoveResourceAction ResourceNavigatorMessages getString MoveResourceAction checkMoveMessage checkReadOnlyResources MoveFilesAndFoldersOperation MoveFilesAndFoldersOperation getShell copyResources
get Display sync Exec new Runnable public void run Message Dialog dialog new Message Dialog get Shell Resource Navigator Messages get String Drop Adapter question null msg Message Dialog QUESTION options 0 NON NLS 1 dialog open int return Val dialog get Return Code String return Codes YES ALL NO CANCEL return Code 0 return Val 0 CANCEL return Codes return Val  getDisplay syncExec MessageDialog MessageDialog getShell ResourceNavigatorMessages getString DropAdapter MessageDialog returnVal getReturnCode returnCodes returnCode returnVal returnCodes returnVal
public String query Overwrite String path String if always Overwrite return ALL final String return Code CANCEL final String msg Resource Navigator Messages format Drop Adapter overwrite Query new Object path String NON NLS 1 final String options I Dialog Constants YES LABEL I Dialog Constants YES TO ALL LABEL I Dialog Constants NO LABEL I Dialog Constants CANCEL LABEL get Display sync Exec new Runnable public void run Message Dialog dialog new Message Dialog get Shell Resource Navigator Messages get String Drop Adapter question null msg Message Dialog QUESTION options 0 NON NLS 1 dialog open int return Val dialog get Return Code String return Codes YES ALL NO CANCEL return Code 0 return Val 0 CANCEL return Codes return Val if return Code 0 ALL always Overwrite true return return Code 0  queryOverwrite pathString alwaysOverwrite returnCode ResourceNavigatorMessages DropAdapter overwriteQuery pathString IDialogConstants YES_LABEL IDialogConstants YES_TO_ALL_LABEL IDialogConstants NO_LABEL IDialogConstants CANCEL_LABEL getDisplay syncExec MessageDialog MessageDialog getShell ResourceNavigatorMessages getString DropAdapter MessageDialog returnVal getReturnCode returnCodes returnCode returnVal returnCodes returnVal returnCode alwaysOverwrite returnCode
This method is used to notify the action that some aspect of the drop operation has changed public boolean validate Drop Object target int drag Operation Transfer Data transfer Type if drag Operation DND DROP NONE last Valid Operation drag Operation if File Transfer get Instance is Supported Type transfer Type last Valid Operation DND DROP COPY only allow copying when dragging from outside Eclipse return false if super validate Drop target drag Operation transfer Type return true return validate Target target transfer Type isOK  validateDrop dragOperation TransferData transferType dragOperation DROP_NONE lastValidOperation dragOperation FileTransfer getInstance isSupportedType transferType lastValidOperation DROP_COPY validateDrop dragOperation transferType validateTarget transferType
Ensures that the drop target meets certain criteria private I Status validate Target Object target Transfer Data transfer Type if target instanceof I Resource return info Resource Navigator Messages get String Drop Adapter target Must Be Resource NON NLS 1 I Resource resource I Resource target if resource is Accessible return error Resource Navigator Messages get String Drop Adapter can Not Drop Into Closed Project NON NLS 1 I Container destination get Actual Target resource if destination get Type I Resource ROOT return error Resource Navigator Messages get String Drop Adapter resources Can Not Be Siblings NON NLS 1 String message null drag within Eclipse if Local Selection Transfer get Instance is Supported Type transfer Type I Resource selected Resources get Selected Resources if selected Resources null message Resource Navigator Messages get String Drop Adapter drop Operation Error Other NON NLS 1 else Copy Files And Folders Operation operation if last Valid Operation DND DROP COPY operation new Copy Files And Folders Operation get Shell else operation new Move Files And Folders Operation get Shell message operation validate Destination destination selected Resources file import else if File Transfer get Instance is Supported Type transfer Type String source Names String File Transfer get Instance native To Java transfer Type if source Names null source names will be null on Linux Use empty names to do destination validation Fixes bug 29778 source Names new String 0 Copy Files And Folders Operation copy Operation new Copy Files And Folders Operation get Shell message copy Operation validate Import Destination destination source Names if message null return error message return ok  IStatus validateTarget TransferData transferType IResource ResourceNavigatorMessages getString DropAdapter targetMustBeResource IResource IResource isAccessible ResourceNavigatorMessages getString DropAdapter canNotDropIntoClosedProject IContainer getActualTarget getType IResource ResourceNavigatorMessages getString DropAdapter resourcesCanNotBeSiblings LocalSelectionTransfer getInstance isSupportedType transferType IResource selectedResources getSelectedResources selectedResources ResourceNavigatorMessages getString DropAdapter dropOperationErrorOther CopyFilesAndFoldersOperation lastValidOperation DROP_COPY CopyFilesAndFoldersOperation getShell MoveFilesAndFoldersOperation getShell validateDestination selectedResources FileTransfer getInstance isSupportedType transferType sourceNames FileTransfer getInstance nativeToJava transferType sourceNames sourceNames CopyFilesAndFoldersOperation copyOperation CopyFilesAndFoldersOperation getShell copyOperation validateImportDestination sourceNames

Constructs a new frame source for the specified resource navigator param navigator the resource navigator public Navigator Frame Source Resource Navigator navigator super navigator get Tree Viewer this navigator navigator  NavigatorFrameSource ResourceNavigator getTreeViewer
Returns a new frame This implementation extends the super implementation by setting the frame s tool tip text to show the full path for the input element protected Tree Frame create Frame Object input Tree Frame frame super create Frame input frame set Name navigator get Frame Name input frame set Tool Tip Text navigator get Frame Tool Tip Text input return frame  TreeFrame createFrame TreeFrame createFrame setName getFrameName setToolTipText getFrameToolTipText
Also updates the navigator s title protected void frame Changed Tree Frame frame I Resource resource I Resource frame get Input I Project project resource get Project if project null project is Open false Message Dialog open Information navigator get View Site get Shell Resource Navigator Messages get String Navigator Frame Source closed Project title NON NLS 1 Resource Navigator Messages format Navigator Frame Source closed Project message new Object project get Name NON NLS 1 navigator get Frame List back else super frame Changed frame navigator update Title  frameChanged TreeFrame IResource IResource getInput IProject getProject isOpen MessageDialog openInformation getViewSite getShell ResourceNavigatorMessages getString NavigatorFrameSource closedProject ResourceNavigatorMessages NavigatorFrameSource closedProject getName getFrameList frameChanged updateTitle

public static final String OPEN WITH ID PlatformUI PLUGIN ID Open With Sub Menu NON NLS 1 public Open Action Group I Resource Navigator navigator super navigator  OPEN_WITH_ID PLUGIN_ID OpenWithSubMenu OpenActionGroup IResourceNavigator
protected void make Actions open File Action new Open File Action navigator get Site get Page  makeActions openFileAction OpenFileAction getSite getPage
public void fill Context Menu I Menu Manager menu I Structured Selection selection I Structured Selection get Context get Selection boolean any Resource Selected selection is Empty Resource Selection Util all Resources Are Of Type selection I Resource PROJECT I Resource FOLDER I Resource FILE boolean only Files Selected selection is Empty Resource Selection Util all Resources Are Of Type selection I Resource FILE if only Files Selected open File Action selection Changed selection menu add open File Action fill Open With Menu menu selection if any Resource Selected add New Window Action menu selection  fillContextMenu IMenuManager IStructuredSelection IStructuredSelection getContext getSelection anyResourceSelected isEmpty ResourceSelectionUtil allResourcesAreOfType IResource IResource IResource onlyFilesSelected isEmpty ResourceSelectionUtil allResourcesAreOfType IResource onlyFilesSelected openFileAction selectionChanged openFileAction fillOpenWithMenu anyResourceSelected addNewWindowAction
Adds the Open With submenu to the context menu param menu the context menu param selection the current selection private void fill Open With Menu I Menu Manager menu I Structured Selection selection Only supported if exactly one file is selected if selection size 1 return Object element selection get First Element if element instanceof I File return Menu Manager submenu new Menu Manager Resource Navigator Messages get String Resource Navigator open With OPEN WITH ID NON NLS 1 submenu add new Open With Menu navigator get Site get Page I File element menu add submenu  OpenWith fillOpenWithMenu IMenuManager IStructuredSelection getFirstElement IFile MenuManager MenuManager ResourceNavigatorMessages getString ResourceNavigator openWith OPEN_WITH_ID OpenWithMenu getSite getPage IFile
Adds the Open in New Window action to the context menu param menu the context menu param selection the current selection private void add New Window Action I Menu Manager menu I Structured Selection selection Only supported if exactly one container i e open project or folder is selected if selection size 1 return Object element selection get First Element if element instanceof I Container return if element instanceof I Project I Project element is Open return menu add new Open In New Window Action navigator get Site get Workbench Window I Container element  addNewWindowAction IMenuManager IStructuredSelection getFirstElement IContainer IProject IProject isOpen OpenInNewWindowAction getSite getWorkbenchWindow IContainer
Runs the default action open file public void run Default Action I Structured Selection selection Object element selection get First Element if element instanceof I File open File Action selection Changed selection open File Action run  runDefaultAction IStructuredSelection getFirstElement IFile openFileAction selectionChanged openFileAction

Creates a new action param shell the shell for any dialogs public Paste Action Shell shell Clipboard clipboard super Resource Navigator Messages get String Paste Action title NON NLS 1 Assert is Not Null shell Assert is Not Null clipboard this shell shell this clipboard clipboard set Tool Tip Text Resource Navigator Messages get String Paste Action tool Tip NON NLS 1 set Id Paste Action ID Workbench Help set Help this I Navigator Help Context Ids PASTE ACTION  PasteAction ResourceNavigatorMessages getString PasteAction isNotNull isNotNull setToolTipText ResourceNavigatorMessages getString PasteAction toolTip setId PasteAction WorkbenchHelp setHelp INavigatorHelpContextIds PASTE_ACTION
Returns the actual target of the paste action Returns null if no valid target is selected return the actual target of the paste action private I Resource get Target List selected Resources get Selected Resources for int i 0 i selected Resources size i I Resource resource I Resource selected Resources get i if resource instanceof I Project I Project resource is Open return null if resource get Type I Resource FILE resource resource get Parent if resource null return resource return null  IResource getTarget selectedResources getSelectedResources selectedResources IResource IResource selectedResources IProject IProject isOpen getType IResource getParent
Returns whether any of the given resources are linked resources param resources resource to check for linked type may be null return true one or more resources are linked false none of the resources are linked private boolean is Linked I Resource resources for int i 0 i resources length i if resources i is Linked return true return false  isLinked IResource isLinked
Implementation of method defined on code I Action code public void run try a resource transfer Resource Transfer res Transfer Resource Transfer get Instance I Resource resource Data I Resource clipboard get Contents res Transfer if resource Data null resource Data length 0 if resource Data 0 get Type I Resource PROJECT enablement checks for all projects for int i 0 i resource Data length i Copy Project Operation operation new Copy Project Operation this shell operation copy Project I Project resource Data i else enablement should ensure that we always have access to a container I Container container get Container Copy Files And Folders Operation operation new Copy Files And Folders Operation this shell operation copy Resources resource Data container return try a file transfer File Transfer file Transfer File Transfer get Instance String file Data String clipboard get Contents file Transfer if file Data null enablement should ensure that we always have access to a container I Container container get Container Copy Files And Folders Operation operation new Copy Files And Folders Operation this shell operation copy Files file Data container  IAction ResourceTransfer resTransfer ResourceTransfer getInstance IResource resourceData IResource getContents resTransfer resourceData resourceData resourceData getType IResource resourceData CopyProjectOperation CopyProjectOperation copyProject IProject resourceData IContainer getContainer CopyFilesAndFoldersOperation CopyFilesAndFoldersOperation copyResources resourceData FileTransfer fileTransfer FileTransfer getInstance fileData getContents fileTransfer fileData IContainer getContainer CopyFilesAndFoldersOperation CopyFilesAndFoldersOperation copyFiles fileData
Returns the container to hold the pasted resources private I Container get Container List selection get Selected Resources if selection get 0 instanceof I File return I File selection get 0 get Parent else return I Container selection get 0  IContainer getContainer getSelectedResources IFile IFile getParent IContainer
shell get Display sync Exec new Runnable public void run clipboard must have resources or files Resource Transfer res Transfer Resource Transfer get Instance clipboard Data 0 I Resource clipboard get Contents res Transfer  getDisplay syncExec ResourceTransfer resTransfer ResourceTransfer getInstance clipboardData IResource getContents resTransfer
The code Paste Action code implementation of this code Selection Listener Action code method enables this action if a resource compatible with what is on the clipboard is selected Clipboard must have I Resource or java io File Projects can always be pasted if they are open Workspace folder may not be copied into itself Files and folders may be pasted to a single selected folder in open project or multiple selected files in the same folder protected boolean update Selection I Structured Selection selection if super update Selection selection return false final I Resource clipboard Data new I Resource 1 shell get Display sync Exec new Runnable public void run clipboard must have resources or files Resource Transfer res Transfer Resource Transfer get Instance clipboard Data 0 I Resource clipboard get Contents res Transfer I Resource resource Data clipboard Data 0 boolean is Project Res resource Data null resource Data length 0 resource Data 0 get Type I Resource PROJECT if is Project Res for int i 0 i resource Data length i make sure all resource data are open projects can paste open projects regardless of selection if resource Data i get Type I Resource PROJECT I Project resource Data i is Open false return false return true if get Selected Non Resources size 0 return false I Resource target Resource get Target target Resource is null if no valid target is selected e g open project or selection is empty if target Resource null return false can paste files and folders to a single selection file folder open project or multiple file selection with the same parent List selected Resources get Selected Resources if selected Resources size 1 for int i 0 i selected Resources size i I Resource resource I Resource selected Resources get i if resource get Type I Resource FILE return false if target Resource equals resource get Parent return false if resource Data null linked resources can only be pasted into projects if is Linked resource Data target Resource get Type I Resource PROJECT return false if target Resource get Type I Resource FOLDER don t try to copy folder to self for int i 0 i resource Data length i if target Resource equals resource Data i return false return true Transfer Data transfers clipboard get Available Types File Transfer file Transfer File Transfer get Instance for int i 0 i transfers length i if file Transfer is Supported Type transfers i return true return false  PasteAction SelectionListenerAction IResource updateSelection IStructuredSelection updateSelection IResource clipboardData IResource getDisplay syncExec ResourceTransfer resTransfer ResourceTransfer getInstance clipboardData IResource getContents resTransfer IResource resourceData clipboardData isProjectRes resourceData resourceData resourceData getType IResource isProjectRes resourceData resourceData getType IResource IProject resourceData isOpen getSelectedNonResources IResource targetResource getTarget targetResource targetResource selectedResources getSelectedResources selectedResources selectedResources IResource IResource selectedResources getType IResource targetResource getParent resourceData isLinked resourceData targetResource getType IResource targetResource getType IResource resourceData targetResource resourceData TransferData getAvailableTypes FileTransfer fileTransfer FileTransfer getInstance fileTransfer isSupportedType

private Text Action Handler text Action Handler public Refactor Action Group I Resource Navigator navigator super navigator  TextActionHandler textActionHandler RefactorActionGroup IResourceNavigator
public void dispose if clipboard null clipboard dispose clipboard null super dispose 
public void fill Context Menu I Menu Manager menu I Structured Selection selection I Structured Selection get Context get Selection boolean any Resource Selected selection is Empty Resource Selection Util all Resources Are Of Type selection I Resource PROJECT I Resource FOLDER I Resource FILE copy Action selection Changed selection menu add copy Action paste Action selection Changed selection menu add paste Action if any Resource Selected delete Action selection Changed selection menu add delete Action move Action selection Changed selection menu add move Action rename Action selection Changed selection menu add rename Action  fillContextMenu IMenuManager IStructuredSelection IStructuredSelection getContext getSelection anyResourceSelected isEmpty ResourceSelectionUtil allResourcesAreOfType IResource IResource IResource copyAction selectionChanged copyAction pasteAction selectionChanged pasteAction anyResourceSelected deleteAction selectionChanged deleteAction moveAction selectionChanged moveAction renameAction selectionChanged renameAction
public void fill Action Bars I Action Bars action Bars text Action Handler new Text Action Handler action Bars hooks handlers text Action Handler set Copy Action copy Action text Action Handler set Paste Action paste Action text Action Handler set Delete Action delete Action rename Action set Text Action Handler text Action Handler action Bars set Global Action Handler Action Factory MOVE get Id move Action action Bars set Global Action Handler Action Factory RENAME get Id rename Action  fillActionBars IActionBars actionBars textActionHandler TextActionHandler actionBars textActionHandler setCopyAction copyAction textActionHandler setPasteAction pasteAction textActionHandler setDeleteAction deleteAction renameAction setTextActionHandler textActionHandler actionBars setGlobalActionHandler ActionFactory getId moveAction actionBars setGlobalActionHandler ActionFactory getId renameAction
Handles a key pressed event by invoking the appropriate action public void handle Key Pressed Key Event event if event character SWT DEL event state Mask 0 if delete Action is Enabled delete Action run Swallow the event event doit false else if event key Code SWT F2 event state Mask 0 if rename Action is Enabled rename Action run Swallow the event event doit false  handleKeyPressed KeyEvent stateMask deleteAction isEnabled deleteAction keyCode stateMask renameAction isEnabled renameAction
protected void make Actions Tree Viewer tree Viewer Tree Viewer navigator get Viewer Shell shell navigator get Site get Shell clipboard new Clipboard shell get Display paste Action new Paste Action shell clipboard I Shared Images images PlatformUI get Workbench get Shared Images paste Action set Disabled Image Descriptor images get Image Descriptor I Shared Images IMG TOOL PASTE DISABLED paste Action set Image Descriptor images get Image Descriptor I Shared Images IMG TOOL PASTE copy Action new Copy Action shell clipboard paste Action copy Action set Disabled Image Descriptor images get Image Descriptor I Shared Images IMG TOOL COPY DISABLED copy Action set Image Descriptor images get Image Descriptor I Shared Images IMG TOOL COPY move Action new Resource Navigator Move Action shell tree Viewer rename Action new Resource Navigator Rename Action shell tree Viewer delete Action new Delete Resource Action shell delete Action set Disabled Image Descriptor images get Image Descriptor I Shared Images IMG TOOL DELETE DISABLED delete Action set Image Descriptor images get Image Descriptor I Shared Images IMG TOOL DELETE  makeActions TreeViewer treeViewer TreeViewer getViewer getSite getShell getDisplay pasteAction PasteAction ISharedImages getWorkbench getSharedImages pasteAction setDisabledImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_PASTE_DISABLED pasteAction setImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_PASTE copyAction CopyAction pasteAction copyAction setDisabledImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_COPY_DISABLED copyAction setImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_COPY moveAction ResourceNavigatorMoveAction treeViewer renameAction ResourceNavigatorRenameAction treeViewer deleteAction DeleteResourceAction deleteAction setDisabledImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_DELETE_DISABLED deleteAction setImageDescriptor getImageDescriptor ISharedImages IMG_TOOL_DELETE
public void update Action Bars I Structured Selection selection I Structured Selection get Context get Selection copy Action selection Changed selection paste Action selection Changed selection delete Action selection Changed selection move Action selection Changed selection rename Action selection Changed selection  updateActionBars IStructuredSelection IStructuredSelection getContext getSelection copyAction selectionChanged pasteAction selectionChanged deleteAction selectionChanged moveAction selectionChanged renameAction selectionChanged

private I Part Listener part Listener new I Part Listener public void part Activated I Workbench Part part if part instanceof I Editor Part editor Activated I Editor Part part  IPartListener partListener IPartListener partActivated IWorkbenchPart IEditorPart editorActivated IEditorPart
editor Activated I Editor Part part public void part Brought To Top I Workbench Part part  editorActivated IEditorPart partBroughtToTop IWorkbenchPart
public void part Brought To Top I Workbench Part part public void part Closed I Workbench Part part  partBroughtToTop IWorkbenchPart partClosed IWorkbenchPart
public void part Closed I Workbench Part part public void part Deactivated I Workbench Part part  partClosed IWorkbenchPart partDeactivated IWorkbenchPart
public void part Deactivated I Workbench Part part public void part Opened I Workbench Part part  partDeactivated IWorkbenchPart partOpened IWorkbenchPart
new I Property Change Listener public void property Change Property Change Event event String property event get Property Object new Value event get New Value Object old Value event get Old Value I Working Set filter Working Set working Set Filter get Working Set if I Working Set Manager CHANGE WORKING SET REMOVE equals property old Value filter Working Set set Working Set null else if I Working Set Manager CHANGE WORKING SET NAME CHANGE equals property new Value filter Working Set update Title else if I Working Set Manager CHANGE WORKING SET CONTENT CHANGE equals property new Value filter Working Set get Viewer refresh  IPropertyChangeListener propertyChange PropertyChangeEvent getProperty newValue getNewValue oldValue getOldValue IWorkingSet filterWorkingSet workingSetFilter getWorkingSet IWorkingSetManager CHANGE_WORKING_SET_REMOVE oldValue filterWorkingSet setWorkingSet IWorkingSetManager CHANGE_WORKING_SET_NAME_CHANGE newValue filterWorkingSet updateTitle IWorkingSetManager CHANGE_WORKING_SET_CONTENT_CHANGE newValue filterWorkingSet getViewer
Constructs a new resource navigator view public Resource Navigator I Dialog Settings views Settings get Plugin get Dialog Settings settings views Settings get Section STORE SECTION if settings null settings views Settings add New Section STORE SECTION migrate Dialog Settings init Linking Enabled  ResourceNavigator IDialogSettings viewsSettings getPlugin getDialogSettings viewsSettings getSection STORE_SECTION viewsSettings addNewSection STORE_SECTION migrateDialogSettings initLinkingEnabled
Converts the given selection into a form usable by the viewer where the elements are resources private Structured Selection convert Selection I Selection selection Array List list new Array List if selection instanceof I Structured Selection I Structured Selection ssel I Structured Selection selection for Iterator i ssel iterator i has Next Object o i next I Resource resource null if o instanceof I Resource resource I Resource o else if o instanceof I Adaptable resource I Resource I Adaptable o get Adapter I Resource class if resource null list add resource return new Structured Selection list  StructuredSelection convertSelection ISelection ArrayList ArrayList IStructuredSelection IStructuredSelection IStructuredSelection hasNext IResource IResource IResource IAdaptable IResource IAdaptable getAdapter IResource StructuredSelection
public void create Part Control Composite parent Tree Viewer viewer create Viewer parent this viewer viewer if memento null restore Filters restore Linking Enabled frame List create Frame List init Drag And Drop update Title init Context Menu init Resource Sorter init Working Set Filter make sure input is set after sorters and filters to avoid unnecessary refreshes viewer set Input get Initial Input make actions after setting input because some actions look at the viewer for enablement e g the Up action make Actions Fill the action bars and update the global action handlers enabled state to match the current selection get Action Group fill Action Bars get View Site get Action Bars update Action Bars I Structured Selection viewer get Selection get Site set Selection Provider viewer get Site get Page add Part Listener part Listener I Working Set Manager working Set Manager get Plugin get Workbench get Working Set Manager working Set Manager add Property Change Listener property Change Listener if memento null restore State memento memento null Set help for the view Workbench Help set Help viewer get Control get Help Context Id  createPartControl TreeViewer createViewer restoreFilters restoreLinkingEnabled frameList createFrameList initDragAndDrop updateTitle initContextMenu initResourceSorter initWorkingSetFilter setInput getInitialInput makeActions getActionGroup fillActionBars getViewSite getActionBars updateActionBars IStructuredSelection getSelection getSite setSelectionProvider getSite getPage addPartListener partListener IWorkingSetManager workingSetManager getPlugin getWorkbench getWorkingSetManager workingSetManager addPropertyChangeListener propertyChangeListener restoreState WorkbenchHelp setHelp getControl getHelpContextId
Returns the help context id to use for this view since 2 0 protected String get Help Context Id return I Navigator Help Context Ids RESOURCE VIEW  getHelpContextId INavigatorHelpContextIds RESOURCE_VIEW
menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager Resource Navigator this fill Context Menu manager  menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager ResourceNavigator fillContextMenu
Initializes and registers the context menu since 2 0 protected void init Context Menu Menu Manager menu Mgr new Menu Manager Popup Menu NON NLS 1 menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager Resource Navigator this fill Context Menu manager Tree Viewer viewer get Tree Viewer Menu menu menu Mgr create Context Menu viewer get Tree viewer get Tree set Menu menu get Site register Context Menu menu Mgr viewer  initContextMenu MenuManager menuMgr MenuManager PopupMenu menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager ResourceNavigator fillContextMenu TreeViewer getTreeViewer menuMgr createContextMenu getTree getTree setMenu getSite registerContextMenu menuMgr
Creates the viewer param parent the parent composite since 2 0 protected Tree Viewer create Viewer Composite parent Tree Viewer viewer new Tree Viewer parent SWT MULTI SWT H SCROLL SWT V SCROLL viewer set Use Hashlookup true init Content Provider viewer init Label Provider viewer init Filters viewer init Listeners viewer return viewer  TreeViewer createViewer TreeViewer TreeViewer H_SCROLL V_SCROLL setUseHashlookup initContentProvider initLabelProvider initFilters initListeners
Sets the content provider for the viewer param viewer the viewer since 2 0 protected void init Content Provider Tree Viewer viewer viewer set Content Provider new Workbench Content Provider  initContentProvider TreeViewer setContentProvider WorkbenchContentProvider
Sets the label provider for the viewer param viewer the viewer since 2 0 protected void init Label Provider Tree Viewer viewer viewer set Label Provider new Decorating Label Provider new Workbench Label Provider get Plugin get Workbench get Decorator Manager get Label Decorator  initLabelProvider TreeViewer setLabelProvider DecoratingLabelProvider WorkbenchLabelProvider getPlugin getWorkbench getDecoratorManager getLabelDecorator
Adds the filters to the viewer param viewer the viewer since 2 0 protected void init Filters Tree Viewer viewer viewer add Filter pattern Filter viewer add Filter working Set Filter  initFilters TreeViewer addFilter patternFilter addFilter workingSetFilter
Initializes the linking enabled setting from the preference store private void init Linking Enabled Try the dialog settings first which remember the last choice String setting settings get I Workbench Preference Constants LINK NAVIGATOR TO EDITOR if setting null linking Enabled setting equals true NON NLS 1 return If not in the dialog settings check the preference store for the default setting Use the UI plugin s preference store since this is a public preference AbstractUI Plugin ui Plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID linking Enabled ui Plugin get Preference Store get Boolean I Workbench Preference Constants LINK NAVIGATOR TO EDITOR  initLinkingEnabled IWorkbenchPreferenceConstants LINK_NAVIGATOR_TO_EDITOR linkingEnabled AbstractUIPlugin uiPlugin AbstractUIPlugin getPlugin PLUGIN_ID linkingEnabled uiPlugin getPreferenceStore getBoolean IWorkbenchPreferenceConstants LINK_NAVIGATOR_TO_EDITOR
protected void init Listeners Tree Viewer viewer viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Selection Changed event  initListeners TreeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged
viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Double Click event  addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleDoubleClick
viewer add Open Listener new I Open Listener public void open Open Event event handle Open event  addOpenListener IOpenListener OpenEvent handleOpen
viewer get Control add Key Listener new Key Listener public void key Pressed Key Event event handle Key Pressed event  getControl addKeyListener KeyListener keyPressed KeyEvent handleKeyPressed
handle Key Pressed event public void key Released Key Event event handle Key Released event  handleKeyPressed keyReleased KeyEvent handleKeyReleased
Adds the listeners to the viewer param viewer the viewer since 2 0 protected void init Listeners Tree Viewer viewer viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Selection Changed event viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Double Click event viewer add Open Listener new I Open Listener public void open Open Event event handle Open event viewer get Control add Key Listener new Key Listener public void key Pressed Key Event event handle Key Pressed event public void key Released Key Event event handle Key Released event  initListeners TreeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleDoubleClick addOpenListener IOpenListener OpenEvent handleOpen getControl addKeyListener KeyListener keyPressed KeyEvent handleKeyPressed keyReleased KeyEvent handleKeyReleased
public void dispose get Site get Page remove Part Listener part Listener I Working Set Manager working Set Manager get Plugin get Workbench get Working Set Manager working Set Manager remove Property Change Listener property Change Listener if get Action Group null get Action Group dispose Control control viewer get Control if drag Detect Listener null control null control is Disposed false control remove Listener SWT Drag Detect drag Detect Listener super dispose  getSite getPage removePartListener partListener IWorkingSetManager workingSetManager getPlugin getWorkbench getWorkingSetManager workingSetManager removePropertyChangeListener propertyChangeListener getActionGroup getActionGroup getControl dragDetectListener isDisposed removeListener DragDetect dragDetectListener
An editor has been activated Sets the selection in this navigator to be the editor s input if linking is enabled param editor the active editor since 2 0 protected void editor Activated I Editor Part editor if is Linking Enabled return I Editor Input input editor get Editor Input if input instanceof I File Editor Input I File Editor Input file Input I File Editor Input input I File file file Input get File I Selection new Selection new Structured Selection file if get Tree Viewer get Selection equals new Selection get Tree Viewer get Tree show Selection else get Tree Viewer set Selection new Selection true  editorActivated IEditorPart isLinkingEnabled IEditorInput getEditorInput IFileEditorInput IFileEditorInput fileInput IFileEditorInput IFile fileInput getFile ISelection newSelection StructuredSelection getTreeViewer getSelection newSelection getTreeViewer getTree showSelection getTreeViewer setSelection newSelection
Called when the context menu is about to open Delegates to the action group using the viewer s selection as the action context since 2 0 protected void fill Context Menu I Menu Manager menu I Structured Selection selection I Structured Selection get Viewer get Selection get Action Group set Context new Action Context selection get Action Group fill Context Menu menu  fillContextMenu IMenuManager IStructuredSelection IStructuredSelection getViewer getSelection getActionGroup setContext ActionContext getActionGroup fillContextMenu
since 2 0 public Frame List get Frame List return frame List  FrameList getFrameList frameList
Returns the initial input for the viewer Tries to convert the page input to a resource either directly or via I Adaptable If the resource is a container it uses that If the resource is a file it uses its parent folder If a resource could not be obtained it uses the workspace root since 2 0 protected I Adaptable get Initial Input I Adaptable input get Site get Page get Input if input null I Resource resource null if input instanceof I Resource resource I Resource input else resource I Resource input get Adapter I Resource class if resource null switch resource get Type case I Resource FILE return resource get Parent case I Resource FOLDER case I Resource PROJECT case I Resource ROOT return I Container resource default Unknown resource type Fall through break return Resources Plugin get Workspace get Root  IAdaptable IAdaptable getInitialInput IAdaptable getSite getPage getInput IResource IResource IResource IResource getAdapter IResource getType IResource getParent IResource IResource IResource IContainer ResourcesPlugin getWorkspace getRoot
Returns the pattern filter for this view return the pattern filter since 2 0 public Resource Pattern Filter get Pattern Filter return this pattern Filter  ResourcePatternFilter getPatternFilter patternFilter
Returns the working set for this view return the working set since 2 0 public I Working Set get Working Set return working Set Filter get Working Set  IWorkingSet getWorkingSet workingSetFilter getWorkingSet
Returns the navigator s plugin public AbstractUI Plugin get Plugin return AbstractUI Plugin Platform get Plugin IDE Workbench Plugin IDE WORKBENCH  AbstractUIPlugin getPlugin AbstractUIPlugin getPlugin IDEWorkbenchPlugin IDE_WORKBENCH
Returns the sorter since 2 0 public Resource Sorter get Sorter return Resource Sorter get Tree Viewer get Sorter  ResourceSorter getSorter ResourceSorter getTreeViewer getSorter
Returns the resource viewer which shows the resource hierarchy since 2 0 public Tree Viewer get Viewer return viewer  TreeViewer getViewer
Returns the tree viewer which shows the resource hierarchy since 2 0 public Tree Viewer get Tree Viewer return viewer  TreeViewer getTreeViewer
Returns the shell to use for opening dialogs Used in this class and in the actions deprecated use get View Site get Shell public Shell get Shell return get View Site get Shell  getViewSite getShell getShell getViewSite getShell
Returns the message to show in the status line param selection the current selection return the status line message since 2 0 protected String get Status Line Message I Structured Selection selection if selection size 1 Object o selection get First Element if o instanceof I Resource return I Resource o get Full Path make Relative to String else return Resource Navigator Messages get String Resource Navigator one Item Selected NON NLS 1 if selection size 1 return Resource Navigator Messages format Resource Navigator status Line NON NLS 1 new Object new Integer selection size return NON NLS 1  getStatusLineMessage IStructuredSelection getFirstElement IResource IResource getFullPath makeRelative toString ResourceNavigatorMessages getString ResourceNavigator oneItemSelected ResourceNavigatorMessages ResourceNavigator statusLine
Returns the name for the given element Used as the name for the current frame String get Frame Name Object element if element instanceof I Resource return I Resource element get Name else return I Label Provider get Tree Viewer get Label Provider get Text element  getFrameName IResource IResource getName ILabelProvider getTreeViewer getLabelProvider getText
Returns the tool tip text for the given element Used as the tool tip text for the current frame and for the view title tooltip String get Frame Tool Tip Text Object element if element instanceof I Resource I Path path I Resource element get Full Path if path is Root return Resource Navigator Messages get String Resource Manager tool Tip NON NLS 1 else return path make Relative to String else return I Label Provider get Tree Viewer get Label Provider get Text element  getFrameToolTipText IResource IPath IResource getFullPath isRoot ResourceNavigatorMessages getString ResourceManager toolTip makeRelative toString ILabelProvider getTreeViewer getLabelProvider getText
Handles an open event from the viewer Opens an editor on the selected file param event the open event since 2 0 protected void handle Open Open Event event I Structured Selection selection I Structured Selection event get Selection get Action Group run Default Action selection  handleOpen OpenEvent IStructuredSelection IStructuredSelection getSelection getActionGroup runDefaultAction
Handles a double click event from the viewer Expands or collapses a folder when double clicked param event the double click event since 2 0 protected void handle Double Click Double Click Event event I Structured Selection selection I Structured Selection event get Selection Object element selection get First Element 1GBZIA0 ITPUI WIN2000 Double clicking in navigator should expand collapse containers Tree Viewer viewer get Tree Viewer if viewer is Expandable element viewer set Expanded State element viewer get Expanded State element  handleDoubleClick DoubleClickEvent IStructuredSelection IStructuredSelection getSelection getFirstElement TreeViewer getTreeViewer isExpandable setExpandedState getExpandedState
get Shell get Display async Exec new Runnable public void run if drag Detected false only synchronize with editor when the selection is not the result of a drag Fixes bug 22274 link To Editor sel  getShell getDisplay asyncExec dragDetected linkToEditor
Handles a selection changed event from the viewer Updates the status line and the action bars and links to editor if option enabled param event the selection event since 2 0 protected void handle Selection Changed Selection Changed Event event final I Structured Selection sel I Structured Selection event get Selection update Status Line sel update Action Bars sel drag Detected false if is Linking Enabled get Shell get Display async Exec new Runnable public void run if drag Detected false only synchronize with editor when the selection is not the result of a drag Fixes bug 22274 link To Editor sel  handleSelectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection updateStatusLine updateActionBars dragDetected isLinkingEnabled getShell getDisplay asyncExec dragDetected linkToEditor
Handles a key press event from the viewer Delegates to the action group param event the key event since 2 0 protected void handle Key Pressed Key Event event get Action Group handle Key Pressed event  handleKeyPressed KeyEvent getActionGroup handleKeyPressed
Handles a key release in the viewer Does nothing by default param event the key event since 2 0 protected void handle Key Released Key Event event  handleKeyReleased KeyEvent
Method declared on I View Part public void init I View Site site I Memento memento throws Part Init Exception super init site memento this memento memento  IViewPart IViewSite IMemento PartInitException
viewer add Drop Support ops DND DROP DEFAULT transfers adapter drag Detect Listener new Listener public void handle Event Event event drag Detected true  addDropSupport DROP_DEFAULT dragDetectListener handleEvent dragDetected
Adds drag and drop support to the navigator since 2 0 protected void init Drag And Drop int ops DND DROP COPY DND DROP MOVE Transfer transfers new Transfer Local Selection Transfer get Instance Resource Transfer get Instance File Transfer get Instance Plugin Transfer get Instance Tree Viewer viewer get Tree Viewer viewer add Drag Support ops transfers new Navigator Drag Adapter I Selection Provider viewer Navigator Drop Adapter adapter new Navigator Drop Adapter viewer adapter set Feedback Enabled false viewer add Drop Support ops DND DROP DEFAULT transfers adapter drag Detect Listener new Listener public void handle Event Event event drag Detected true viewer get Control add Listener SWT Drag Detect drag Detect Listener  initDragAndDrop DROP_COPY DROP_MOVE LocalSelectionTransfer getInstance ResourceTransfer getInstance FileTransfer getInstance PluginTransfer getInstance TreeViewer getTreeViewer addDragSupport NavigatorDragAdapter ISelectionProvider NavigatorDropAdapter NavigatorDropAdapter setFeedbackEnabled addDropSupport DROP_DEFAULT dragDetectListener handleEvent dragDetected getControl addListener DragDetect dragDetectListener
Creates the frame source and frame list and connects them since 2 0 protected Frame List create Frame List Navigator Frame Source frame Source new Navigator Frame Source this Frame List frame List new Frame List frame Source frame Source connect To frame List return frame List  FrameList createFrameList NavigatorFrameSource frameSource NavigatorFrameSource FrameList frameList FrameList frameSource frameSource connectTo frameList frameList
Initializes the sorter protected void init Resource Sorter int sort Type Resource Sorter NAME try int sort Int 0 if memento null String sort Str memento get String TAG SORTER if sort Str null sort Int new Integer sort Str int Value else sort Int settings get Int STORE SORT TYPE if sort Int Resource Sorter NAME sort Int Resource Sorter TYPE sort Type sort Int catch Number Format Exception e set Sorter new Resource Sorter sort Type  initResourceSorter sortType ResourceSorter sortInt sortStr getString TAG_SORTER sortStr sortInt sortStr intValue sortInt getInt STORE_SORT_TYPE sortInt ResourceSorter sortInt ResourceSorter sortType sortInt NumberFormatException setSorter ResourceSorter sortType
Restores the working set filter from the persistence store void init Working Set Filter String working Set Name settings get STORE WORKING SET if working Set Name null working Set Name equals false NON NLS 1 I Working Set Manager working Set Manager get Plugin get Workbench get Working Set Manager I Working Set working Set working Set Manager get Working Set working Set Name if working Set null Only initialize filter Don t set working set into viewer Working set is set via Working Set Filter Action Group during action creation working Set Filter set Working Set working Set  initWorkingSetFilter workingSetName STORE_WORKING_SET workingSetName workingSetName IWorkingSetManager workingSetManager getPlugin getWorkbench getWorkingSetManager IWorkingSet workingSet workingSetManager getWorkingSet workingSetName workingSet WorkingSetFilterActionGroup workingSetFilter setWorkingSet workingSet
Returns whether the navigator selection automatically tracks the active editor return code true code if linking is enabled code false code if not since 2 0 this was protected in 2 0 but was made public in 2 1 public boolean is Linking Enabled return linking Enabled  isLinkingEnabled linkingEnabled
Activates the editor if the selected resource is open since 2 0 protected void link To Editor I Structured Selection selection Object obj selection get First Element if obj instanceof I File selection size 1 I File file I File obj I Workbench Page page get Site get Page I Editor Part editor page find Editor new File Editor Input file if editor null page bring To Top editor return  linkToEditor IStructuredSelection getFirstElement IFile IFile IFile IWorkbenchPage getSite getPage IEditorPart findEditor FileEditorInput bringToTop
Creates the action group which encapsulates all actions for the view protected void make Actions set Action Group new Main Action Group this  makeActions setActionGroup MainActionGroup
Migrates the dialog settings from the UI plugin store to the Views plugin store private void migrate Dialog Settings AbstractUI Plugin ui Plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID I Dialog Settings ui Settings ui Plugin get Dialog Settings ui Settings ui Settings get Section STORE SECTION if ui Settings null String working Set Name ui Settings get STORE WORKING SET if working Set Name null working Set Name length 0 settings put STORE WORKING SET working Set Name ui Settings put STORE WORKING SET NON NLS 1 String sort Type ui Settings get STORE SORT TYPE if sort Type null sort Type length 0 settings put STORE SORT TYPE sort Type ui Settings put STORE SORT TYPE NON NLS 1  migrateDialogSettings AbstractUIPlugin uiPlugin AbstractUIPlugin getPlugin PLUGIN_ID IDialogSettings uiSettings uiPlugin getDialogSettings uiSettings uiSettings getSection STORE_SECTION uiSettings workingSetName uiSettings STORE_WORKING_SET workingSetName workingSetName STORE_WORKING_SET workingSetName uiSettings STORE_WORKING_SET sortType uiSettings STORE_SORT_TYPE sortType sortType STORE_SORT_TYPE sortType uiSettings STORE_SORT_TYPE
Restores the saved filter settings private void restore Filters I Memento filters Mem memento get Child TAG FILTERS if filters Mem null filters have been defined I Memento children filters Mem get Children TAG FILTER check if first element has new tag defined indicates new version if children length 0 children 0 get String TAG IS ENABLED null Array List selected Filters new Array List Array List un Selected Filters new Array List for int i 0 i children length i if children i get String TAG IS ENABLED equals String value Of true selected Filters add children i get String TAG ELEMENT else enabled false un Selected Filters add children i get String TAG ELEMENT merge filters from Memento with selected true filters from plugins ensure there are no duplicates don t override user preferences List plugin Filters Filters Content Provider get Default Filters for Iterator iter plugin Filters iterator iter has Next String element String iter next if selected Filters contains element un Selected Filters contains element selected Filters add element Convert to an array of Strings String pattern Array new String selected Filters size selected Filters to Array pattern Array get Pattern Filter set Patterns pattern Array else filters defined old version ignore filters from plugins String filters new String children length for int i 0 i children length i filters i children i get String TAG ELEMENT get Pattern Filter set Patterns filters else no filters defined old version ignore filters from plugins get Pattern Filter set Patterns new String 0  restoreFilters IMemento filtersMem getChild TAG_FILTERS filtersMem IMemento filtersMem getChildren TAG_FILTER getString TAG_IS_ENABLED ArrayList selectedFilters ArrayList ArrayList unSelectedFilters ArrayList getString TAG_IS_ENABLED valueOf selectedFilters getString TAG_ELEMENT unSelectedFilters getString TAG_ELEMENT pluginFilters FiltersContentProvider getDefaultFilters pluginFilters hasNext selectedFilters unSelectedFilters selectedFilters patternArray selectedFilters selectedFilters toArray patternArray getPatternFilter setPatterns patternArray getString TAG_ELEMENT getPatternFilter setPatterns getPatternFilter setPatterns
Restores the state of the receiver to the state described in the specified memento param memento the memento since 2 0 protected void restore State I Memento memento Tree Viewer viewer get Tree Viewer I Memento frame Memento memento get Child TAG CURRENT FRAME if frame Memento null Tree Frame frame new Tree Frame viewer frame restore State frame Memento frame set Name get Frame Name frame get Input frame set Tool Tip Text get Frame Tool Tip Text frame get Input viewer set Selection new Structured Selection frame get Input frame List goto Frame frame else I Container container Resources Plugin get Workspace get Root I Memento child Mem memento get Child TAG EXPANDED if child Mem null Array List elements new Array List I Memento element Mem child Mem get Children TAG ELEMENT for int i 0 i element Mem length i Object element container find Member element Mem i get String TAG PATH if element null elements add element viewer set Expanded Elements elements to Array child Mem memento get Child TAG SELECTION if child Mem null Array List list new Array List I Memento element Mem child Mem get Children TAG ELEMENT for int i 0 i element Mem length i Object element container find Member element Mem i get String TAG PATH if element null list add element viewer set Selection new Structured Selection list  restoreState IMemento TreeViewer getTreeViewer IMemento frameMemento getChild TAG_CURRENT_FRAME frameMemento TreeFrame TreeFrame restoreState frameMemento setName getFrameName getInput setToolTipText getFrameToolTipText getInput setSelection StructuredSelection getInput frameList gotoFrame IContainer ResourcesPlugin getWorkspace getRoot IMemento childMem getChild TAG_EXPANDED childMem ArrayList ArrayList IMemento elementMem childMem getChildren TAG_ELEMENT elementMem findMember elementMem getString TAG_PATH setExpandedElements toArray childMem getChild TAG_SELECTION childMem ArrayList ArrayList IMemento elementMem childMem getChildren TAG_ELEMENT elementMem findMember elementMem getString TAG_PATH setSelection StructuredSelection
Restores the linking enabled state private void restore Linking Enabled Integer val memento get Integer I Workbench Preference Constants LINK NAVIGATOR TO EDITOR if val null linking Enabled val int Value 0  restoreLinkingEnabled getInteger IWorkbenchPreferenceConstants LINK_NAVIGATOR_TO_EDITOR linkingEnabled intValue
see View Part save State public void save State I Memento memento Tree Viewer viewer get Tree Viewer if viewer null if this memento null Keep the old state memento put Memento this memento return save sorter memento put Integer TAG SORTER get Sorter get Criteria save filters String filters get Pattern Filter get Patterns List selected Filters Arrays as List filters List all Filters Filters Content Provider get Defined Filters I Memento filters Mem memento create Child TAG FILTERS for Iterator iter all Filters iterator iter has Next String element String iter next I Memento child filters Mem create Child TAG FILTER child put String TAG ELEMENT element child put String TAG IS ENABLED String value Of selected Filters contains element if frame List get Current Index 0 save frame it s not the home workspace frame Tree Frame current Frame Tree Frame frame List get Current Frame I Memento frame Memento memento create Child TAG CURRENT FRAME current Frame save State frame Memento else save visible expanded elements Object expanded Elements viewer get Visible Expanded Elements if expanded Elements length 0 I Memento expanded Mem memento create Child TAG EXPANDED for int i 0 i expanded Elements length i if expanded Elements i instanceof I Resource I Memento element Mem expanded Mem create Child TAG ELEMENT element Mem put String TAG PATH I Resource expanded Elements i get Full Path to String save selection Object elements I Structured Selection viewer get Selection to Array if elements length 0 I Memento selection Mem memento create Child TAG SELECTION for int i 0 i elements length i if elements i instanceof I Resource I Memento element Mem selection Mem create Child TAG ELEMENT element Mem put String TAG PATH I Resource elements i get Full Path to String save Linking Enabled memento  ViewPart saveState saveState IMemento TreeViewer getTreeViewer putMemento putInteger TAG_SORTER getSorter getCriteria getPatternFilter getPatterns selectedFilters asList allFilters FiltersContentProvider getDefinedFilters IMemento filtersMem createChild TAG_FILTERS allFilters hasNext IMemento filtersMem createChild TAG_FILTER putString TAG_ELEMENT putString TAG_IS_ENABLED valueOf selectedFilters frameList getCurrentIndex TreeFrame currentFrame TreeFrame frameList getCurrentFrame IMemento frameMemento createChild TAG_CURRENT_FRAME currentFrame saveState frameMemento expandedElements getVisibleExpandedElements expandedElements IMemento expandedMem createChild TAG_EXPANDED expandedElements expandedElements IResource IMemento elementMem expandedMem createChild TAG_ELEMENT elementMem putString TAG_PATH IResource expandedElements getFullPath toString IStructuredSelection getSelection toArray IMemento selectionMem createChild TAG_SELECTION IResource IMemento elementMem selectionMem createChild TAG_ELEMENT elementMem putString TAG_PATH IResource getFullPath toString saveLinkingEnabled
Saves the linking enabled state private void save Linking Enabled I Memento memento memento put Integer I Workbench Preference Constants LINK NAVIGATOR TO EDITOR linking Enabled 1 0  saveLinkingEnabled IMemento putInteger IWorkbenchPreferenceConstants LINK_NAVIGATOR_TO_EDITOR linkingEnabled
Selects and reveals the specified elements public void select Reveal I Selection selection Structured Selection ssel convert Selection selection if ssel is Empty get Viewer get Control set Redraw false get Viewer set Selection ssel true get Viewer get Control set Redraw true  selectReveal ISelection StructuredSelection convertSelection isEmpty getViewer getControl setRedraw getViewer setSelection getViewer getControl setRedraw
Saves the filters defined as strings in code patterns code in the preference store public void set Filters Preference String patterns String Buffer sb new String Buffer for int i 0 i patterns length i if i 0 sb append Resource Pattern Filter COMMA SEPARATOR sb append patterns i get Plugin get Preference Store set Value Resource Pattern Filter FILTERS TAG sb to String remove value in old workbench preference store location I Preference Store preference Store IDE Workbench Plugin get Default get Preference Store String stored Patterns preference Store get String Resource Pattern Filter FILTERS TAG if stored Patterns length 0 preference Store set Value Resource Pattern Filter FILTERS TAG NON NLS 1  setFiltersPreference StringBuffer StringBuffer ResourcePatternFilter COMMA_SEPARATOR getPlugin getPreferenceStore setValue ResourcePatternFilter FILTERS_TAG toString IPreferenceStore preferenceStore IDEWorkbenchPlugin getDefault getPreferenceStore storedPatterns preferenceStore getString ResourcePatternFilter FILTERS_TAG storedPatterns preferenceStore setValue ResourcePatternFilter FILTERS_TAG
see I Workbench Part set Focus public void set Focus get Tree Viewer get Tree set Focus  IWorkbenchPart setFocus setFocus getTreeViewer getTree setFocus
Note For experimental use only Sets the decorator for the navigator p As of 2 0 this method no longer has any effect p param decorator a label decorator or code null code for no decorations deprecated use the decorators extension point instead see I Workbench get Decorator Manager public void set Label Decorator I Label Decorator decorator do nothing  IWorkbench getDecoratorManager setLabelDecorator ILabelDecorator
see I Resource Navigator set Linking Enabled boolean since 2 1 public void set Linking Enabled boolean enabled this linking Enabled enabled remember the last setting in the dialog settings settings put I Workbench Preference Constants LINK NAVIGATOR TO EDITOR enabled if turning linking on update the selection to correspond to the active editor if enabled I Editor Part editor get Site get Page get Active Editor if editor null editor Activated editor  IResourceNavigator setLinkingEnabled setLinkingEnabled linkingEnabled IWorkbenchPreferenceConstants LINK_NAVIGATOR_TO_EDITOR IEditorPart getSite getPage getActiveEditor editorActivated
Sets the resource sorter param sorter the resource sorter since 2 0 public void set Sorter Resource Sorter sorter Tree Viewer viewer get Tree Viewer Viewer Sorter viewer Sorter viewer get Sorter viewer get Control set Redraw false if viewer Sorter sorter viewer refresh else viewer set Sorter sorter viewer get Control set Redraw true settings put STORE SORT TYPE sorter get Criteria update the sort actions checked state update Action Bars I Structured Selection viewer get Selection  setSorter ResourceSorter TreeViewer getTreeViewer ViewerSorter viewerSorter getSorter getControl setRedraw viewerSorter setSorter getControl setRedraw STORE_SORT_TYPE getCriteria updateActionBars IStructuredSelection getSelection
public void set Working Set I Working Set working Set Tree Viewer tree Viewer get Tree Viewer Object expanded tree Viewer get Expanded Elements I Selection selection tree Viewer get Selection working Set Filter set Working Set working Set if working Set null settings put STORE WORKING SET working Set get Name else settings put STORE WORKING SET NON NLS 1 update Title tree Viewer refresh tree Viewer set Expanded Elements expanded if selection is Empty false selection instanceof I Structured Selection I Structured Selection structured Selection I Structured Selection selection tree Viewer reveal structured Selection get First Element  setWorkingSet IWorkingSet workingSet TreeViewer treeViewer getTreeViewer treeViewer getExpandedElements ISelection treeViewer getSelection workingSetFilter setWorkingSet workingSet workingSet STORE_WORKING_SET workingSet getName STORE_WORKING_SET updateTitle treeViewer treeViewer setExpandedElements isEmpty IStructuredSelection IStructuredSelection structuredSelection IStructuredSelection treeViewer structuredSelection getFirstElement
Updates the action bar actions param selection the current selection since 2 0 protected void update Action Bars I Structured Selection selection Resource Navigator Action Group group get Action Group if group null group set Context new Action Context selection group update Action Bars  updateActionBars IStructuredSelection ResourceNavigatorActionGroup getActionGroup setContext ActionContext updateActionBars
Updates the message shown in the status line param selection the current selection protected void update Status Line I Structured Selection selection String msg get Status Line Message selection get View Site get Action Bars get Status Line Manager set Message msg  updateStatusLine IStructuredSelection getStatusLineMessage getViewSite getActionBars getStatusLineManager setMessage
Updates the title text and title tool tip Called whenever the input of the viewer changes Called whenever the input of the viewer changes since 2 0 public void update Title Object input get Viewer get Input String view Name get Configuration Element get Attribute name NON NLS 1 I Workspace workspace Resources Plugin get Workspace I Working Set working Set working Set Filter get Working Set if input null input equals workspace input equals workspace get Root set Content Description NON NLS 1 if working Set null set Title Tool Tip Resource Navigator Messages format Resource Navigator working Set Tool Tip NON NLS 1 new Object working Set get Name else set Title Tool Tip NON NLS 1 else I Label Provider label Provider I Label Provider get Tree Viewer get Label Provider String input Tool Tip get Frame Tool Tip Text input set Content Description label Provider get Text input if working Set null set Title Tool Tip Resource Navigator Messages format Resource Navigator working Set Input Tool Tip NON NLS 1 new Object input Tool Tip working Set get Name else set Title Tool Tip input Tool Tip  updateTitle getViewer getInput viewName getConfigurationElement getAttribute IWorkspace ResourcesPlugin getWorkspace IWorkingSet workingSet workingSetFilter getWorkingSet getRoot setContentDescription workingSet setTitleToolTip ResourceNavigatorMessages ResourceNavigator workingSetToolTip workingSet getName setTitleToolTip ILabelProvider labelProvider ILabelProvider getTreeViewer getLabelProvider inputToolTip getFrameToolTipText setContentDescription labelProvider getText workingSet setTitleToolTip ResourceNavigatorMessages ResourceNavigator workingSetInputToolTip inputToolTip workingSet getName setTitleToolTip inputToolTip
Returns the action group return the action group protected Resource Navigator Action Group get Action Group return action Group  ResourceNavigatorActionGroup getActionGroup actionGroup
Sets the action group param action Group the action group protected void set Action Group Resource Navigator Action Group action Group this action Group action Group  actionGroup setActionGroup ResourceNavigatorActionGroup actionGroup actionGroup actionGroup
public Object get Adapter Class adapter if adapter I Show In Source class return get Show In Source if adapter I Show In Target class return get Show In Target return null  getAdapter IShowInSource getShowInSource IShowInTarget getShowInTarget
return new I Show In Source public Show In Context get Show In Context return new Show In Context get Viewer get Input get Viewer get Selection  IShowInSource ShowInContext getShowInContext ShowInContext getViewer getInput getViewer getSelection
Returns the code I Show In Source code for this view protected I Show In Source get Show In Source return new I Show In Source public Show In Context get Show In Context return new Show In Context get Viewer get Input get Viewer get Selection  IShowInSource IShowInSource getShowInSource IShowInSource ShowInContext getShowInContext ShowInContext getViewer getInput getViewer getSelection
return new I Show In Target public boolean show Show In Context context Array List to Select new Array List I Selection sel context get Selection if sel instanceof I Structured Selection I Structured Selection ssel I Structured Selection sel for Iterator i ssel iterator i has Next Object o i next if o instanceof I Resource to Select add o else if o instanceof I Marker I Resource r I Marker o get Resource if r get Type I Resource ROOT to Select add r else if o instanceof I Adaptable I Adaptable adaptable I Adaptable o o adaptable get Adapter I Resource class if o instanceof I Resource to Select add o else o adaptable get Adapter I Marker class if o instanceof I Marker I Resource r I Marker o get Resource if r get Type I Resource ROOT to Select add r if to Select is Empty Object input context get Input if input instanceof I Adaptable I Adaptable adaptable I Adaptable input Object o adaptable get Adapter I Resource class if o instanceof I Resource to Select add o if to Select is Empty select Reveal new Structured Selection to Select return true return false  IShowInTarget ShowInContext ArrayList toSelect ArrayList ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection hasNext IResource toSelect IMarker IResource IMarker getResource getType IResource toSelect IAdaptable IAdaptable IAdaptable getAdapter IResource IResource toSelect getAdapter IMarker IMarker IResource IMarker getResource getType IResource toSelect toSelect isEmpty getInput IAdaptable IAdaptable IAdaptable getAdapter IResource IResource toSelect toSelect isEmpty selectReveal StructuredSelection toSelect
Returns the code I Show In Target code for this view protected I Show In Target get Show In Target return new I Show In Target public boolean show Show In Context context Array List to Select new Array List I Selection sel context get Selection if sel instanceof I Structured Selection I Structured Selection ssel I Structured Selection sel for Iterator i ssel iterator i has Next Object o i next if o instanceof I Resource to Select add o else if o instanceof I Marker I Resource r I Marker o get Resource if r get Type I Resource ROOT to Select add r else if o instanceof I Adaptable I Adaptable adaptable I Adaptable o o adaptable get Adapter I Resource class if o instanceof I Resource to Select add o else o adaptable get Adapter I Marker class if o instanceof I Marker I Resource r I Marker o get Resource if r get Type I Resource ROOT to Select add r if to Select is Empty Object input context get Input if input instanceof I Adaptable I Adaptable adaptable I Adaptable input Object o adaptable get Adapter I Resource class if o instanceof I Resource to Select add o if to Select is Empty select Reveal new Structured Selection to Select return true return false  IShowInTarget IShowInTarget getShowInTarget IShowInTarget ShowInContext ArrayList toSelect ArrayList ISelection getSelection IStructuredSelection IStructuredSelection IStructuredSelection hasNext IResource toSelect IMarker IResource IMarker getResource getType IResource toSelect IAdaptable IAdaptable IAdaptable getAdapter IResource IResource toSelect getAdapter IMarker IMarker IResource IMarker getResource getType IResource toSelect toSelect isEmpty getInput IAdaptable IAdaptable IAdaptable getAdapter IResource IResource toSelect toSelect isEmpty selectReveal StructuredSelection toSelect

Creates a new instance of the class public Resource Navigator Action I Resource Navigator navigator String label super navigator get Viewer label this navigator navigator  ResourceNavigatorAction IResourceNavigator getViewer
Returns the resource navigator for which this action was created public I Resource Navigator get Navigator return navigator  IResourceNavigator getNavigator
Returns the resource viewer protected Viewer get Viewer return get Navigator get Viewer  getViewer getNavigator getViewer
Returns the shell to use within actions protected Shell get Shell return get Navigator get Site get Shell  getShell getNavigator getSite getShell
Returns the workbench protected I Workbench get Workbench return PlatformUI get Workbench  IWorkbench getWorkbench getWorkbench
Returns the workbench window protected I Workbench Window get Workbench Window return get Navigator get Site get Workbench Window  IWorkbenchWindow getWorkbenchWindow getNavigator getSite getWorkbenchWindow

Constructs a new navigator action group and creates its actions param navigator the resource navigator public Resource Navigator Action Group I Resource Navigator navigator this navigator navigator make Actions  ResourceNavigatorActionGroup IResourceNavigator makeActions
Returns the image descriptor with the given relative path protected Image Descriptor get Image Descriptor String relative Path String icon Path icons full NON NLS 1 try AbstractUI Plugin plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID URL installURL plugin get Descriptor get InstallURL URL url new URL installURL icon Path relative Path return Image Descriptor create FromURL url catch MalformedURL Exception e should not happen return Image Descriptor get Missing Image Descriptor  ImageDescriptor getImageDescriptor relativePath iconPath AbstractUIPlugin AbstractUIPlugin getPlugin PLUGIN_ID getDescriptor getInstallURL iconPath relativePath ImageDescriptor createFromURL MalformedURLException ImageDescriptor getMissingImageDescriptor
Returns the resource navigator public I Resource Navigator get Navigator return navigator  IResourceNavigator getNavigator
Handles a key pressed event by invoking the appropriate action Does nothing by default public void handle Key Pressed Key Event event  handleKeyPressed KeyEvent
Makes the actions contained in this action group protected abstract void make Actions  makeActions
Runs the default action in the group Does nothing by default param selection the current selection public void run Default Action I Structured Selection selection  runDefaultAction IStructuredSelection

private static Resource Bundle bundle Resource Bundle get Bundle RESOURCE BUNDLE private Resource Navigator Messages prevent instantiation of class  ResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE ResourceNavigatorMessages
Returns the formatted message for the given key in the 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  MessageFormat getString
Returns the resource object with the given key in the 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  getString getString MissingResourceException

Create a Resource Navigator Move Action and use the supplied viewer to update the UI param shell Shell param structure Viewer Structured Viewer public Resource Navigator Move Action Shell shell Structured Viewer structure Viewer super shell Workbench Help set Help this I Navigator Help Context Ids RESOURCE NAVIGATOR MOVE ACTION this viewer structure Viewer this move Project Action new Move Project Action shell  ResourceNavigatorMoveAction structureViewer StructuredViewer ResourceNavigatorMoveAction StructuredViewer structureViewer WorkbenchHelp setHelp INavigatorHelpContextIds RESOURCE_NAVIGATOR_MOVE_ACTION structureViewer moveProjectAction MoveProjectAction
public void run if move Project Action is Enabled move Project Action run return super run List destinations get Destinations if destinations null destinations is Empty false I Workspace Root root Resources Plugin get Workspace get Root List resources new Array List Iterator iterator destinations iterator while iterator has Next I Resource new Resource root find Member I Path iterator next if new Resource null resources add new Resource this viewer set Selection new Structured Selection resources true  moveProjectAction isEnabled moveProjectAction getDestinations isEmpty IWorkspaceRoot ResourcesPlugin getWorkspace getRoot ArrayList hasNext IResource newResource findMember IPath newResource newResource setSelection StructuredSelection
protected boolean update Selection I Structured Selection selection move Project Action selection Changed selection return super update Selection selection move Project Action is Enabled  updateSelection IStructuredSelection moveProjectAction selectionChanged updateSelection moveProjectAction isEnabled

private Tree Viewer viewer Create a Resource Navigator Rename Action and use the tree of the supplied viewer for editing param shell Shell param tree Viewer Tree Viewer public Resource Navigator Rename Action Shell shell Tree Viewer tree Viewer super shell tree Viewer get Tree Workbench Help set Help this I Navigator Help Context Ids RESOURCE NAVIGATOR RENAME ACTION this viewer tree Viewer  TreeViewer ResourceNavigatorRenameAction treeViewer TreeViewer ResourceNavigatorRenameAction TreeViewer treeViewer treeViewer getTree WorkbenchHelp setHelp INavigatorHelpContextIds RESOURCE_NAVIGATOR_RENAME_ACTION treeViewer
protected void run With New Path I Path path I Resource resource I Workspace Root root resource get Project get Workspace get Root super run With New Path path resource if this viewer null I Resource new Resource root find Member path if new Resource null this viewer set Selection new Structured Selection new Resource true  runWithNewPath IPath IResource IWorkspaceRoot getProject getWorkspace getRoot runWithNewPath IResource newResource findMember newResource setSelection StructuredSelection newResource
Handle the key release public void handle Key Released Key Event event if event key Code SWT F2 event state Mask 0 is Enabled run  handleKeyReleased KeyEvent keyCode stateMask isEnabled

static final String FILTERS TAG resource Filters NON NLS 1 Creates a new resource pattern filter public Resource Pattern Filter super  FILTERS_TAG resourceFilters ResourcePatternFilter
Return the currently configured String Matchers If there aren t any look them up private String Matcher get Matchers if this matchers null initialize From Preferences return this matchers  StringMatchers StringMatcher getMatchers initializeFromPreferences
Gets the patterns for the receiver Returns the cached values if there are any if not look it up public String get Patterns if this patterns null initialize From Preferences return this patterns  getPatterns initializeFromPreferences
Initializes the filters from the preference store private void initialize From Preferences get the filters that were saved by Resource Navigator set Filters Preference I Preference Store views Prefs IDE Workbench Plugin get Default get Preference Store String stored Patterns views Prefs get String FILTERS TAG if stored Patterns length 0 try to migrate patterns from old workbench preference store location I Preference Store workbench Prefs PlatformUI get Workbench get Preference Store stored Patterns workbench Prefs get String FILTERS TAG if stored Patterns length 0 views Prefs set Value FILTERS TAG stored Patterns workbench Prefs set Value FILTERS TAG NON NLS 1 if stored Patterns length 0 revert to all filter extensions with selected true if there are no filters in the preference store List default Filters Filters Content Provider get Default Filters String patterns new String default Filters size default Filters to Array patterns set Patterns patterns return Get the strings separated by a comma and filter them from the currently defined ones List defined Filters Filters Content Provider get Defined Filters String Tokenizer entries new String Tokenizer stored Patterns COMMA SEPARATOR List patterns new Array List while entries has More Elements String next Token entries next Token if defined Filters index Of next Token 1 patterns add next Token Convert to an array of Strings String pattern Array new String patterns size patterns to Array pattern Array set Patterns pattern Array  initializeFromPreferences ResourceNavigator setFiltersPreference IPreferenceStore viewsPrefs IDEWorkbenchPlugin getDefault getPreferenceStore storedPatterns viewsPrefs getString FILTERS_TAG storedPatterns IPreferenceStore workbenchPrefs getWorkbench getPreferenceStore storedPatterns workbenchPrefs getString FILTERS_TAG storedPatterns viewsPrefs setValue FILTERS_TAG storedPatterns workbenchPrefs setValue FILTERS_TAG storedPatterns defaultFilters FiltersContentProvider getDefaultFilters defaultFilters defaultFilters toArray setPatterns definedFilters FiltersContentProvider getDefinedFilters StringTokenizer StringTokenizer storedPatterns COMMA_SEPARATOR ArrayList hasMoreElements nextToken nextToken definedFilters indexOf nextToken nextToken patternArray toArray patternArray setPatterns patternArray
public boolean select Viewer viewer Object parent Element Object element I Resource resource null if element instanceof I Resource resource I Resource element else if element instanceof I Adaptable I Adaptable adaptable I Adaptable element resource I Resource adaptable get Adapter I Resource class if resource null String name resource get Name String Matcher test Matchers get Matchers for int i 0 i test Matchers length i if test Matchers i match name return false return true return true  parentElement IResource IResource IResource IAdaptable IAdaptable IAdaptable IResource getAdapter IResource getName StringMatcher testMatchers getMatchers testMatchers testMatchers
Sets the patterns to filter out for the receiver public void set Patterns String new Patterns this patterns new Patterns this matchers new String Matcher new Patterns length for int i 0 i new Patterns length i Reset the matchers to prevent constructor overhead matchers i new String Matcher new Patterns i true false  setPatterns newPatterns newPatterns StringMatcher newPatterns newPatterns StringMatcher newPatterns

Private constructor to block instantiation private Resource Selection Util  ResourceSelectionUtil
Returns whether the types of the resources in the given selection are among the specified resource types param selection the selection param resource Mask resource mask formed by bitwise OR of resource type constants defined on code I Resource code return code true code if all selected elements are resources of the right type and code false code if at least one element is either a resource of some other type or a non resource see I Resource get Type public static boolean all Resources Are Of Type I Structured Selection selection int resource Mask Iterator resources selection iterator while resources has Next Object next resources next if next instanceof I Resource return false if resource Is Type I Resource next resource Mask return false return true  resourceMask IResource IResource getType allResourcesAreOfType IStructuredSelection resourceMask hasNext IResource resourceIsType IResource resourceMask
Returns the selection adapted to I Resource Returns null if any of the entries are not adaptable param selection the selection param resource Mask resource mask formed by bitwise OR of resource type constants defined on code I Resource code return I Structured Selection or null if any of the entries are not adaptable see I Resource get Type public static I Structured Selection all Resources I Structured Selection selection int resource Mask Iterator adaptables selection iterator List result new Array List while adaptables has Next Object next adaptables next if next instanceof I Adaptable Object resource I Adaptable next get Adapter I Resource class if resource null return null else if resource Is Type I Resource resource resource Mask result add resource else return null return new Structured Selection result  IResource resourceMask IResource IStructuredSelection IResource getType IStructuredSelection allResources IStructuredSelection resourceMask ArrayList hasNext IAdaptable IAdaptable getAdapter IResource resourceIsType IResource resourceMask StructuredSelection
Returns whether the type of the given resource is among the specified resource types param resource the resource param resource Mask resource mask formed by bitwise OR of resource type constants defined on code I Resource code return code true code if the resources has a matching type and code false code otherwise see I Resource get Type public static boolean resource Is Type I Resource resource int resource Mask return resource get Type resource Mask 0  resourceMask IResource IResource getType resourceIsType IResource resourceMask getType resourceMask

Creates a resource sorter that will use the given sort criteria param criteria the sort criterion to use one of code NAME code or code TYPE code public Resource Sorter int criteria super this criteria criteria  ResourceSorter
Returns an integer value representing the relative sort priority of the given element based on its class p ul li resources code I Resource code 2 li li project references code Project Reference code 1 li li everything else 0 li ul p param element the element return the sort priority larger numbers means more important protected int class Comparison Object element if element instanceof I Resource return 2 return 0  IResource ProjectReference classComparison IResource
public int compare Viewer viewer Object o1 Object o2 have to deal with non resources in navigator if one or both objects are not resources returned a comparison based on class if o1 instanceof I Resource o2 instanceof I Resource return compare Class o1 o2 I Resource r1 I Resource o1 I Resource r2 I Resource o2 if r1 instanceof I Container r2 instanceof I Container return compare Names r1 r2 else if r1 instanceof I Container return 1 else if r2 instanceof I Container return 1 else if criteria NAME return compare Names r1 r2 else if criteria TYPE return compare Types r1 r2 else return 0  IResource IResource compareClass IResource IResource IResource IResource IContainer IContainer compareNames IContainer IContainer compareNames compareTypes
Returns a number reflecting the collation order of the given elements based on their class param element1 the first element to be ordered param element2 the second element to be ordered return a negative number if the first element is less than the second element the value code 0 code if the first element is equal to the second element and a positive number if the first element is greater than the second element protected int compare Class Object element1 Object element2 return class Comparison element1 class Comparison element2  compareClass classComparison classComparison
Returns a number reflecting the collation order of the given resources based on their resource names param resource1 the first resource element to be ordered param resource2 the second resource element to be ordered return a negative number if the first element is less than the second element the value code 0 code if the first element is equal to the second element and a positive number if the first element is greater than the second element protected int compare Names I Resource resource1 I Resource resource2 return collator compare resource1 get Name resource2 get Name  compareNames IResource IResource getName getName
Returns a number reflecting the collation order of the given resources based on their respective file extensions Resources with the same file extension will be collated based on their names param resource1 the first resource element to be ordered param resource2 the second resource element to be ordered return a negative number if the first element is less than the second element the value code 0 code if the first element is equal to the second element and a positive number if the first element is greater than the second element protected int compare Types I Resource resource1 I Resource resource2 String ext1 get Extension For resource1 String ext2 get Extension For resource2 Compare extensions If they re different then return a value that indicates correct extension ordering If they re the same then return a value that indicates the correct NAME ordering int result collator compare ext1 ext2 if result 0 ie different extensions return result return compare Names resource1 resource2  compareTypes IResource IResource getExtensionFor getExtensionFor compareNames
Returns the sort criteria of this sorter return the sort criterion one of code NAME code or code TYPE code public int get Criteria return criteria  getCriteria
Returns the extension portion of the given resource param resource the resource return the file extension possibily the empty string private String get Extension For I Resource resource String ext resource get File Extension return ext null ext NON NLS 1  getExtensionFor IResource getFileExtension
Sets the sort criteria of this sorter param criteria the sort criterion one of code Resource Sorter NAME code or code Resource Sorter TYPE code public void set Criteria int criteria this criteria criteria  ResourceSorter ResourceSorter setCriteria

private I Workbench Page page public Show In Navigator Action I Workbench Page page I Selection Provider viewer super viewer Resource Navigator Messages get String Show In Navigator text NON NLS 1 Assert is Not Null page this page page set Description Resource Navigator Messages get String Show In Navigator tool Tip NON NLS 1 Workbench Help set Help this I Navigator Help Context Ids SHOW IN NAVIGATOR ACTION  IWorkbenchPage ShowInNavigatorAction IWorkbenchPage ISelectionProvider ResourceNavigatorMessages getString ShowInNavigator isNotNull setDescription ResourceNavigatorMessages getString ShowInNavigator toolTip WorkbenchHelp setHelp INavigatorHelpContextIds SHOW_IN_NAVIGATOR_ACTION
Returns the resources in the given selection return a list of code I Resource code List get Resources I Structured Selection selection List v new Array List for Iterator i selection iterator i has Next Object o i next if o instanceof I Resource v add o else if o instanceof I Marker I Resource resource I Marker o get Resource v add resource else if o instanceof I Adaptable I Resource resource I Resource I Adaptable o get Adapter I Resource class if resource null v add resource return v  IResource getResources IStructuredSelection ArrayList hasNext IResource IMarker IResource IMarker getResource IAdaptable IResource IResource IAdaptable getAdapter IResource
Shows the Navigator view and sets its selection to the resources selected in this action s selection provider public void run List v get Resources get Structured Selection if v is Empty return try I View Part view page show View I Page Layout ID RES NAV if view instanceof I Set Selection Target I Selection selection new Structured Selection v I Set Selection Target view select Reveal selection catch Part Init Exception e Error Dialog open Error page get Workbench Window get Shell Resource Navigator Messages get String Show In Navigator error Message NON NLS 1 e get Message e get Status  getResources getStructuredSelection isEmpty IViewPart showView IPageLayout ID_RES_NAV ISetSelectionTarget ISelection StructuredSelection ISetSelectionTarget selectReveal PartInitException ErrorDialog openError getWorkbenchWindow getShell ResourceNavigatorMessages getString ShowInNavigator errorMessage getMessage getStatus
Method declared on Selection Provider Action public void selection Changed I Structured Selection selection set Enabled get Resources selection is Empty  SelectionProviderAction selectionChanged IStructuredSelection setEnabled getResources isEmpty

private Filter Selection Action filter Action public Sort And Filter Action Group I Resource Navigator navigator super navigator  FilterSelectionAction filterAction SortAndFilterActionGroup IResourceNavigator
protected void make Actions sort By Name Action new Sort View Action navigator false sort By Type Action new Sort View Action navigator true filter Action new Filter Selection Action navigator Resource Navigator Messages get String Resource Navigator filter Text NON NLS 1 filter Action set Disabled Image Descriptor get Image Descriptor dlcl16 filter ps gif NON NLS 1 filter Action set Image Descriptor get Image Descriptor elcl16 filter ps gif NON NLS 1  makeActions sortByNameAction SortViewAction sortByTypeAction SortViewAction filterAction FilterSelectionAction ResourceNavigatorMessages getString ResourceNavigator filterText filterAction setDisabledImageDescriptor getImageDescriptor filter_ps filterAction setImageDescriptor getImageDescriptor filter_ps
public void fill Action Bars I Action Bars action Bars I Menu Manager menu action Bars get Menu Manager I Menu Manager submenu new Menu Manager Resource Navigator Messages get String Resource Navigator sort NON NLS 1 menu add submenu submenu add sort By Name Action submenu add sort By Type Action menu add filter Action  fillActionBars IActionBars actionBars IMenuManager actionBars getMenuManager IMenuManager MenuManager ResourceNavigatorMessages getString ResourceNavigator sortByNameAction sortByTypeAction filterAction
public void update Action Bars int criteria navigator get Sorter get Criteria sort By Name Action set Checked criteria Resource Sorter NAME sort By Type Action set Checked criteria Resource Sorter TYPE  updateActionBars getSorter getCriteria sortByNameAction setChecked ResourceSorter sortByTypeAction setChecked ResourceSorter

Creates the action param navigator the resource navigator param sort By Type code true code for sort by type code false code for sort by name public Sort View Action I Resource Navigator navigator boolean sort By Type super navigator sort By Type Resource Navigator Messages get String Sort View by Type Resource Navigator Messages get String Sort View by Name NON NLS 2 NON NLS 1 if sort By Type set Tool Tip Text Resource Navigator Messages get String Sort View tool Tip By Type NON NLS 1 else set Tool Tip Text Resource Navigator Messages get String Sort View tool Tip By Name NON NLS 1 set Enabled true sort Criteria sort By Type Resource Sorter TYPE Resource Sorter NAME Workbench Help set Help this I Navigator Help Context Ids SORT VIEW ACTION  sortByType SortViewAction IResourceNavigator sortByType sortByType ResourceNavigatorMessages getString SortView byType ResourceNavigatorMessages getString SortView byName sortByType setToolTipText ResourceNavigatorMessages getString SortView toolTipByType setToolTipText ResourceNavigatorMessages getString SortView toolTipByName setEnabled sortCriteria sortByType ResourceSorter ResourceSorter WorkbenchHelp setHelp INavigatorHelpContextIds SORT_VIEW_ACTION
public void run I Resource Navigator navigator get Navigator Resource Sorter sorter navigator get Sorter if sorter null navigator set Sorter new Resource Sorter sort Criteria else sorter set Criteria sort Criteria navigator set Sorter sorter  IResourceNavigator getNavigator ResourceSorter getSorter setSorter ResourceSorter sortCriteria setCriteria sortCriteria setSorter

int start inclusive int end exclusive public Position int start int end this start start this end end 
this end end public int get Start return start  getStart
return start public int get End return end  getEnd
String Matcher constructor takes in a String object that is a simple pattern which may contain for 0 and many characters and for exactly one character Literal and characters must be escaped in the pattern e g means literal etc Escaping any other character including the escape character itself just results in that character in the pattern e g a means a and means If invoking the String Matcher with string literals in Java don t forget escape characters are represented by param pattern the pattern to match text against param ignore Case if true case is ignored param ignore Wild Cards if true wild cards and their escape sequences are ignored everything is taken literally public String Matcher String pattern boolean ignore Case boolean ignore Wild Cards if pattern null throw new Illegal Argument Exception f Ignore Case ignore Case f Ignore Wild Cards ignore Wild Cards f Pattern pattern f Length pattern length if f Ignore Wild Cards parse No Wild Cards else parse Wild Cards  StringMatcher StringMatcher ignoreCase ignoreWildCards StringMatcher ignoreCase ignoreWildCards IllegalArgumentException fIgnoreCase ignoreCase fIgnoreWildCards ignoreWildCards fPattern fLength fIgnoreWildCards parseNoWildCards parseWildCards
Find the first occurrence of the pattern between code start code inclusive and code end code exclusive param code text code the String object to search in param code start code the starting index of the search range inclusive param code end code the ending index of the search range exclusive return an code String Matcher Position code object that keeps the starting inclusive and ending positions exclusive of the first occurrence of the pattern in the specified range of the text return null if not found or subtext is empty start end A pair of zeros is returned if pattern is empty string Note that for pattern like abc with leading and trailing stars position of abc is returned For a pattern like in text abcdf 1 3 is returned public String Matcher Position find String text int start int end if text null throw new Illegal Argument Exception int tlen text length if start 0 start 0 if end tlen end tlen if end 0 start end return null if f Length 0 return new Position start start if f Ignore Wild Cards int x pos In text start end if x 0 return null return new Position x x f Length int seg Count f Segments length if seg Count 0 pattern contains only s return new Position start end int cur Pos start int match Start 1 int i for i 0 i seg Count cur Pos end i String current f Segments i int next Match reg Exp Pos In text cur Pos end current if next Match 0 return null if i 0 match Start next Match cur Pos next Match current length if i seg Count Ensure all segments match return null return new Position match Start cur Pos  StringMatcher StringMatcher IllegalArgumentException fLength fIgnoreWildCards posIn fLength segCount fSegments segCount curPos matchStart segCount curPos fSegments nextMatch regExpPosIn curPos nextMatch matchStart nextMatch curPos nextMatch segCount matchStart curPos
match the given code text code with the pattern return true if matched eitherwise false param code text code a String object public boolean match String text return match text 0 text length 
Given the starting inclusive and the ending exclusive poisitions in the code text code determine if the given substring matches with a Pattern return true if the specified portion of the text matches the pattern param String code text code a String object that contains the substring to match param int code start code marks the starting position inclusive of the substring param int code end code marks the ending index exclusive of the substring public boolean match String text int start int end if null text throw new Illegal Argument Exception if start end return false if f Ignore Wild Cards return end start f Length f Pattern region Matches f Ignore Case 0 text start f Length int seg Count f Segments length if seg Count 0 f Has Leading Star f Has Trailing Star pattern contains only s return true if start end return f Length 0 if f Length 0 return start end int tlen text length if start 0 start 0 if end tlen end tlen int t Cur Pos start int bound end f Bound if bound 0 return false int i 0 String current f Segments i int seg Length current length process first segment if f Has Leading Star if reg Exp Region Matches text start current 0 seg Length return false else i t Cur Pos t Cur Pos seg Length if f Segments length 1 f Has Leading Star f Has Trailing Star only one segment to match no wildcards specified return t Cur Pos end process middle segments for i seg Count t Cur Pos bound i current f Segments i int current Match int k current index Of f Single Wild Card if k 0 current Match text Pos In text t Cur Pos end current if current Match 0 return false else current Match reg Exp Pos In text t Cur Pos end current if current Match 0 return false t Cur Pos current Match current length process final segment if f Has Trailing Star t Cur Pos end int clen current length return reg Exp Region Matches text end clen current 0 clen return i seg Count  aPattern IllegalArgumentException fIgnoreWildCards fLength fPattern regionMatches fIgnoreCase fLength segCount fSegments segCount fHasLeadingStar fHasTrailingStar fLength fLength tCurPos fBound fSegments segLength fHasLeadingStar regExpRegionMatches segLength tCurPos tCurPos segLength fSegments fHasLeadingStar fHasTrailingStar tCurPos segCount tCurPos fSegments currentMatch indexOf fSingleWildCard currentMatch textPosIn tCurPos currentMatch currentMatch regExpPosIn tCurPos currentMatch tCurPos currentMatch fHasTrailingStar tCurPos regExpRegionMatches segCount
This method parses the given pattern into segments seperated by wildcard characters Since wildcards are not being used in this case the pattern consists of a single segment private void parse No Wild Cards f Segments new String 1 f Segments 0 f Pattern f Bound f Length  parseNoWildCards fSegments fSegments fPattern fBound fLength
Parses the given pattern into segments seperated by wildcard characters param p a String object that is a simple regular expression with and or private void parse Wild Cards if f Pattern starts With NON NLS 1 f Has Leading Star true if f Pattern ends With NON NLS 1 make sure it s not an escaped wildcard if f Length 1 f Pattern char At f Length 2 f Has Trailing Star true Vector temp new Vector int pos 0 String Buffer buf new String Buffer while pos f Length char c f Pattern char At pos switch c case if pos f Length buf append c else char next f Pattern char At pos if it s an escape sequence if next next next buf append next else not an escape sequence just insert literally buf append c buf append next break case if buf length 0 new segment temp add Element buf to String f Bound buf length buf set Length 0 break case append special character representing single match wildcard buf append f Single Wild Card break default buf append c add last buffer to segment list if buf length 0 temp add Element buf to String f Bound buf length f Segments new String temp size temp copy Into f Segments  parseWildCards fPattern startsWith fHasLeadingStar fPattern endsWith fLength fPattern charAt fLength fHasTrailingStar StringBuffer StringBuffer fLength fPattern charAt fLength fPattern charAt addElement toString fBound setLength fSingleWildCard addElement toString fBound fSegments copyInto fSegments
param code text code a string which contains no wildcard param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive return the starting index in the text of the pattern or 1 if not found protected int pos In String text int start int end no wild card in pattern int max end f Length if f Ignore Case int i text index Of f Pattern start if i 1 i max return 1 return i for int i start i max i if text region Matches true i f Pattern 0 f Length return i return 1  posIn fLength fIgnoreCase indexOf fPattern regionMatches fPattern fLength
param code text code a simple regular expression that may only contain s param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a simple regular expression that may contains param code case Ignored code wether the pattern is not casesensitive return the starting index in the text of the pattern or 1 if not found protected int reg Exp Pos In String text int start int end String p int plen p length int max end plen for int i start i max i if reg Exp Region Matches text i p 0 plen return i return 1  caseIgnored regExpPosIn regExpRegionMatches
return boolean param code text code a String to match param code start code int that indicates the starting index of match inclusive param code end code int that indicates the ending index of match exclusive param code p code String String a simple regular expression that may contain param code ignore Case code boolean indicating wether code p code is case sensitive protected boolean reg Exp Region Matches String text int t Start String p int p Start int plen while plen 0 char tchar text char At t Start char pchar p char At p Start process wild cards if f Ignore Wild Cards skip single wild cards if pchar f Single Wild Card continue if pchar tchar continue if f Ignore Case if Character to Upper Case tchar Character to Upper Case pchar continue comparing after converting to upper case doesn t handle all cases also compare after converting to lower case if Character to Lower Case tchar Character to Lower Case pchar continue return false return true  ignoreCase regExpRegionMatches tStart pStart charAt tStart charAt pStart fIgnoreWildCards fSingleWildCard fIgnoreCase toUpperCase toUpperCase toLowerCase toLowerCase
param code text code the string to match param code start code the starting index in the text for search inclusive param code end code the stopping point of search exclusive param code p code a string that has no wildcard param code ignore Case code boolean indicating wether code p code is case sensitive return the starting index in the text of the pattern or 1 if not found protected int text Pos In String text int start int end String p int plen p length int max end plen if f Ignore Case int i text index Of p start if i 1 i max return 1 return i for int i 0 i max i if text region Matches true i p 0 plen return i return 1  ignoreCase textPosIn fIgnoreCase indexOf regionMatches

Constructs a new action public Toggle Linking Action I Resource Navigator navigator String label super navigator label set Checked navigator is Linking Enabled  ToggleLinkingAction IResourceNavigator setChecked isLinkingEnabled
Runs the action public void run get Navigator set Linking Enabled is Checked  getNavigator setLinkingEnabled isChecked

private Refresh Action refresh Action public Workspace Action Group I Resource Navigator navigator super navigator  RefreshAction refreshAction WorkspaceActionGroup IResourceNavigator
public void fill Action Bars I Action Bars action Bars action Bars set Global Action Handler Action Factory REFRESH get Id refresh Action action Bars set Global Action Handler IDE Action Factory BUILD PROJECT get Id build Action action Bars set Global Action Handler IDE Action Factory REBUILD PROJECT get Id rebuild Action action Bars set Global Action Handler IDE Action Factory OPEN PROJECT get Id open Project Action action Bars set Global Action Handler IDE Action Factory CLOSE PROJECT get Id close Project Action  fillActionBars IActionBars actionBars actionBars setGlobalActionHandler ActionFactory getId refreshAction actionBars setGlobalActionHandler IDEActionFactory BUILD_PROJECT getId buildAction actionBars setGlobalActionHandler IDEActionFactory REBUILD_PROJECT getId rebuildAction actionBars setGlobalActionHandler IDEActionFactory OPEN_PROJECT getId openProjectAction actionBars setGlobalActionHandler IDEActionFactory CLOSE_PROJECT getId closeProjectAction
Adds the build open project close project and refresh resource actions to the context menu p The following conditions apply build only projects selected auto build disabled at least one builder present open project only projects selected at least one closed project close project only projects selected at least one open project refresh no closed project selected p p Both the open project and close project action may be on the menu at the same time p p No disabled action should be on the context menu p param menu context menu to add actions to public void fill Context Menu I Menu Manager menu I Structured Selection selection I Structured Selection get Context get Selection boolean is Project Selection true boolean has Open Projects false boolean has Closed Projects false boolean has Builder true false if any project is closed or does not have builder Iterator resources selection iterator while resources has Next has Open Projects has Closed Projects has Builder is Project Selection Object next resources next I Project project null if next instanceof I Project project I Project next else if next instanceof I Adaptable project I Project I Adaptable next get Adapter I Project class if project null is Project Selection false continue if project is Open has Open Projects true if has Builder has Builder project has Builder false else has Closed Projects true has Builder false if selection is Empty is Project Selection Resources Plugin get Workspace is Auto Building has Builder Allow manual incremental build only if auto build is off build Action selection Changed selection menu add build Action if has Closed Projects refresh Action selection Changed selection menu add refresh Action if is Project Selection if has Closed Projects open Project Action selection Changed selection menu add open Project Action if has Open Projects close Project Action selection Changed selection menu add close Project Action  fillContextMenu IMenuManager IStructuredSelection IStructuredSelection getContext getSelection isProjectSelection hasOpenProjects hasClosedProjects hasBuilder hasNext hasOpenProjects hasClosedProjects hasBuilder isProjectSelection IProject IProject IProject IAdaptable IProject IAdaptable getAdapter IProject isProjectSelection isOpen hasOpenProjects hasBuilder hasBuilder hasBuilder hasClosedProjects hasBuilder isEmpty isProjectSelection ResourcesPlugin getWorkspace isAutoBuilding hasBuilder buildAction selectionChanged buildAction hasClosedProjects refreshAction selectionChanged refreshAction isProjectSelection hasClosedProjects openProjectAction selectionChanged openProjectAction hasOpenProjects closeProjectAction selectionChanged closeProjectAction
Handles a key pressed event by invoking the appropriate action public void handle Key Pressed Key Event event if event key Code SWT F5 event state Mask 0 if refresh Action is Enabled refresh Action refresh All Swallow the event event doit false  handleKeyPressed KeyEvent keyCode stateMask refreshAction isEnabled refreshAction refreshAll
Returns whether there are builders configured on the given project return code true code if it has builders code false code if not or if this could not be determined boolean has Builder I Project project try I Command commands project get Description get Build Spec if commands length 0 return true catch Core Exception e Cannot determine if project has builders Project is closed or does not exist Fall through to return false return false  hasBuilder IProject ICommand getDescription getBuildSpec CoreException
protected void make Actions Shell shell navigator get Site get Shell open Project Action new Open Resource Action shell close Project Action new Close Resource Action shell refresh Action new Refresh Action shell refresh Action set Disabled Image Descriptor get Image Descriptor dlcl16 refresh nav gif NON NLS 1 refresh Action set Image Descriptor get Image Descriptor elcl16 refresh nav gif NON NLS 1 build Action new Build Action shell Incremental Project Builder INCREMENTAL BUILD rebuild Action new Build Action shell Incremental Project Builder FULL BUILD  makeActions getSite getShell openProjectAction OpenResourceAction closeProjectAction CloseResourceAction refreshAction RefreshAction refreshAction setDisabledImageDescriptor getImageDescriptor refresh_nav refreshAction setImageDescriptor getImageDescriptor refresh_nav buildAction BuildAction IncrementalProjectBuilder INCREMENTAL_BUILD rebuildAction BuildAction IncrementalProjectBuilder FULL_BUILD
public void update Action Bars I Structured Selection selection I Structured Selection get Context get Selection refresh Action selection Changed selection build Action selection Changed selection rebuild Action selection Changed selection open Project Action selection Changed selection close Project Action selection Changed selection  updateActionBars IStructuredSelection IStructuredSelection getContext getSelection refreshAction selectionChanged buildAction selectionChanged rebuildAction selectionChanged openProjectAction selectionChanged closeProjectAction selectionChanged

package class Categories Action extends Property Sheet Action Creates the Categories action This action is used to show or hide categories properties public Categories Action Property Sheet Viewer viewer String name super viewer name Workbench Help set Help this I Properties Help Context Ids CATEGORIES ACTION  CategoriesAction PropertySheetAction CategoriesAction PropertySheetViewer WorkbenchHelp setHelp IPropertiesHelpContextIds CATEGORIES_ACTION
Toggles the display of categories for the properties public void run Property Sheet Viewer ps get Property Sheet ps deactivate Cell Editor if is Checked ps show Categories else ps hide Categories  PropertySheetViewer getPropertySheet deactivateCellEditor isChecked showCategories hideCategories

public class Color Property Descriptor extends Property Descriptor Creates an property descriptor with the given id and display name param id the id of the property param display Name the name to display for the property public Color Property Descriptor Object id String display Name super id display Name  ColorPropertyDescriptor PropertyDescriptor displayName ColorPropertyDescriptor displayName displayName
The code Color Property Descriptor code implementation of this code I Property Descriptor code method creates and returns a new code Color Cell Editor code p The editor is configured with the current validator if there is one p public Cell Editor create Property Editor Composite parent Cell Editor editor new Color Cell Editor parent if get Validator null editor set Validator get Validator return editor  ColorPropertyDescriptor IPropertyDescriptor ColorCellEditor CellEditor createPropertyEditor CellEditor ColorCellEditor getValidator setValidator getValidator

param values the possible label values that this code I Label Provider code may return public Combo Box Label Provider String values this values values  ILabelProvider ComboBoxLabelProvider
return the possible label values that this code I Label Provider code may return public String get Values return values  ILabelProvider getValues
param values the possible label values that this code I Label Provider code may return public void set Values String values this values values  ILabelProvider setValues
Returns the code String code that maps to the given code Integer code offset in the values array param element an code Integer code object whose value is a valid location within the values array of the receiver return a code String code from the provided values array or the empty code String code see org eclipse jface viewers I Label Provider get Text java lang Object public String get Text Object element if element null return NON NLS 1 if element instanceof Integer int index Integer element int Value if index 0 index values length return values index else return NON NLS 1 return NON NLS 1  ILabelProvider getText getText intValue

Creates an property descriptor with the given id display name and list of value labels to display in the combo box cell editor param id the id of the property param display Name the name to display for the property param values Array the list of possible values to display in the combo box public Combo Box Property Descriptor Object id String display Name String values Array super id display Name values values Array  displayName valuesArray ComboBoxPropertyDescriptor displayName valuesArray displayName valuesArray
The code Combo Box Property Descriptor code implementation of this code I Property Descriptor code method creates and returns a new code Combo Box Cell Editor code p The editor is configured with the current validator if there is one p public Cell Editor create Property Editor Composite parent Cell Editor editor new Combo Box Cell Editor parent values SWT READ ONLY if get Validator null editor set Validator get Validator return editor  ComboBoxPropertyDescriptor IPropertyDescriptor ComboBoxCellEditor CellEditor createPropertyEditor CellEditor ComboBoxCellEditor READ_ONLY getValidator setValidator getValidator
The code Combo Box Property Descriptor code implementation of this code I Property Descriptor code method returns the value set by the code set Provider code method or if no value has been set it returns a code Combo Box Label Provider code created from the values Array of this code Combo Box Property Descriptor code see set Label Provider public I Label Provider get Label Provider if is Label Provider Set return super get Label Provider else return new Combo Box Label Provider values  ComboBoxPropertyDescriptor IPropertyDescriptor setProvider ComboBoxLabelProvider valuesArray ComboBoxPropertyDescriptor setLabelProvider ILabelProvider getLabelProvider isLabelProviderSet getLabelProvider ComboBoxLabelProvider

Creates the action public Copy Property Action Property Sheet Viewer viewer String name Clipboard clipboard super viewer name Workbench Help set Help this I Properties Help Context Ids COPY PROPERTY ACTION this clipboard clipboard  CopyPropertyAction PropertySheetViewer WorkbenchHelp setHelp IPropertiesHelpContextIds COPY_PROPERTY_ACTION
Performs this action public void run Get the selected property I Structured Selection selection I Structured Selection get Property Sheet get Selection if selection is Empty return Assume single selection I Property Sheet Entry entry I Property Sheet Entry selection get First Element Place text on the clipboard String Buffer buffer new String Buffer buffer append entry get Display Name buffer append t NON NLS 1 buffer append entry get Value As String set Clipboard buffer to String  IStructuredSelection IStructuredSelection getPropertySheet getSelection isEmpty IPropertySheetEntry IPropertySheetEntry getFirstElement StringBuffer StringBuffer getDisplayName getValueAsString setClipboard toString
Updates enablement based on the current selection public void selection Changed I Structured Selection sel set Enabled sel is Empty  selectionChanged IStructuredSelection setEnabled isEmpty
private void set Clipboard String text try Object data new Object text Transfer transfer Types new Transfer Text Transfer get Instance clipboard set Contents data transfer Types catch SWT Error e if e code DND ERROR CANNOT SET CLIPBOARD throw e if Message Dialog open Question get Property Sheet get Control get Shell Workbench Messages get String Copy To Clipboard Problem Dialog title Workbench Messages get String Copy To Clipboard Problem Dialog message NON NLS 1 NON NLS 2 set Clipboard text  setClipboard transferTypes TextTransfer getInstance setContents transferTypes SWTError ERROR_CANNOT_SET_CLIPBOARD MessageDialog openQuestion getPropertySheet getControl getShell WorkbenchMessages getString CopyToClipboardProblemDialog WorkbenchMessages getString CopyToClipboardProblemDialog setClipboard

package class Defaults Action extends Property Sheet Action Create the Defaults action This action is used to set the properties back to their default values public Defaults Action Property Sheet Viewer viewer String name super viewer name Workbench Help set Help this I Properties Help Context Ids DEFAULTS ACTION  DefaultsAction PropertySheetAction DefaultsAction PropertySheetViewer WorkbenchHelp setHelp IPropertiesHelpContextIds DEFAULTS_ACTION
Reset the properties to their default values public void run get Property Sheet deactivate Cell Editor get Property Sheet reset Properties  getPropertySheet deactivateCellEditor getPropertySheet resetProperties

Creates an property source for a file resource param file the file resource public File Property Source I File file super file  FilePropertySource IFile
Get a Property Descriptor that defines the size property return the Property Descriptor private static Property Descriptor get Initial Property Descriptor return file Descriptor  PropertyDescriptor PropertyDescriptor PropertyDescriptor getInitialPropertyDescriptor fileDescriptor
public I Property Descriptor get Property Descriptors I Property Descriptor super Descriptors super get Property Descriptors int super Length super Descriptors length I Property Descriptor file Descriptors new I Property Descriptor super Length 1 System arraycopy super Descriptors 0 file Descriptors 0 super Length file Descriptors super Length get Initial Property Descriptor return file Descriptors  IPropertyDescriptor getPropertyDescriptors IPropertyDescriptor superDescriptors getPropertyDescriptors superLength superDescriptors IPropertyDescriptor fileDescriptors IPropertyDescriptor superLength superDescriptors fileDescriptors superLength fileDescriptors superLength getInitialPropertyDescriptor fileDescriptors
public Object get Property Value Object key Object return Value super get Property Value key if return Value null return return Value if key equals I Resource Property Constants P SIZE RES return get Size String I File element return null  getPropertyValue returnValue getPropertyValue returnValue returnValue IResourcePropertyConstants P_SIZE_RES getSizeString IFile
Return a String that indicates the size of the supplied file private String get Size String I File file if file is Local I Resource DEPTH ZERO return NOT LOCAL TEXT else I Path location file get Location if location null if file is Linked return UNDEFINED PATH VARIABLE return FILE NOT FOUND else File local File location to File if local File exists return Long to String local File length return FILE NOT FOUND  getSizeString IFile isLocal IResource DEPTH_ZERO NOT_LOCAL_TEXT IPath getLocation isLinked UNDEFINED_PATH_VARIABLE FILE_NOT_FOUND localFile toFile localFile toString localFile FILE_NOT_FOUND

package class Filter Action extends Property Sheet Action Create the Filter action This action is used to show or hide expert properties public Filter Action Property Sheet Viewer viewer String name super viewer name Workbench Help set Help this I Properties Help Context Ids FILTER ACTION  FilterAction PropertySheetAction FilterAction PropertySheetViewer WorkbenchHelp setHelp IPropertiesHelpContextIds FILTER_ACTION
Toggle the display of expert properties public void run Property Sheet Viewer ps get Property Sheet ps deactivate Cell Editor if is Checked ps show Expert else ps hide Expert  PropertySheetViewer getPropertySheet deactivateCellEditor isChecked showExpert hideExpert

package interface I Cell Editor Activation Listener Notifies that the cell editor has been activated param cell Editor the cell editor which has been activated  ICellEditorActivationListener cellEditor
public void cell Editor Activated Cell Editor cell Editor Notifies that the cell editor has been deactivated param cell Editor the cell editor which has been deactivated  cellEditorActivated CellEditor cellEditor cellEditor

private static Resource Bundle bundle Resource Bundle get Bundle RESOURCE BUNDLE private IDE Properties Messages prevent instantiation of class  ResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE IDEPropertiesMessages
Returns the formatted message for the given key in the 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  MessageFormat getString
Returns the resource object with the given key in the 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  getString getString MissingResourceException

public interface I Property Descriptor Creates and returns a new cell editor for editing this property Returns code null code if the property is not editable param parent the parent widget for the cell editor return the cell editor for this property or code null code if this property cannot be edited  IPropertyDescriptor
public Cell Editor create Property Editor Composite parent Returns the name of the category to which this property belongs Properties belonging to the same category are grouped together visually This localized string is shown to the user return the category name or code null code if the default category is to be used  CellEditor createPropertyEditor
public String get Category Returns a brief description of this property This localized string is shown to the user when this property is selected return a brief description or code null code if none  getCategory
public String get Description Returns the display name for this property This localized string is shown to the user as the name of this property return a displayable name  getDescription
public String get Display Name Returns a list of filter types to which this property belongs The user is able to toggle the filters to show hide properties belonging to a filter type p Valid values for these flags are declared as constants on code I Property Sheet Entry code p return a list of filter types to which this property belongs or code null code if none  getDisplayName IPropertySheetEntry
public String get Filter Flags Returns the help context id for this property or code null code if this property has no help context id p NOTE Help support system API s changed since 2 0 and arrays of contexts are no longer supported p p Thus the only valid non code null code return type for this method is a code String code representing a context id The previously valid return types are deprecated The plural name for this method is unfortunate p return the help context id for this entry  getFilterFlags
public Object get Help Context Ids Returns the id for this property This object is used internally to distinguish one property descriptor from another return the property id  getHelpContextIds
public Object get Id Returns the label provider for this property The label provider is used to obtain the text and possible image for displaying the it value it of this property return the label provider used to display this property  getId
public I Label Provider get Label Provider Returns whether this property descriptor and the given one are compatible p The property sheet uses this method during multiple selection to determine whether two property descriptors with the same id are in fact the same property and can be displayed as a single entry in the property sheet p param another Property the other property descriptor return code true code if the property descriptors are compatible and code false code otherwise  ILabelProvider getLabelProvider anotherProperty

Adds the given listener to this entry s collection of listeners param listener the listener to add public void add Property Sheet Entry Listener  addPropertySheetEntryListener
I Property Sheet Entry Listener listener Apply the current cell editor value public void apply Editor Value  IPropertySheetEntryListener applyEditorValue
public void apply Editor Value Called when the entry is no longer needed public void dispose  applyEditorValue
Returns the entry s category return the entry s category 
Returns the child entries for this entry return the child entries for this entry 
Return a short description of the property sheet entry Typically this description is shown in a status line when the entry is selected return the entry s description 
Returns the name used to display the property return the name used to display the property 
Return the code Cell Editor code used to edit the property param parent the parent widget for the editor return the code Cell Editor code used to edit the property  CellEditor CellEditor
Returns the error text to display if the value is invalid return the error text to display when the value is invalid or code null code 
Return the filter ids used to group entries into levels such as Expert Valid values are defined as constants on this interface return the filter ids used to group entries into levels such as Expert 
Returns the help context id for this entry or code null code if this entry has no help context id p NOTE Help support system API s changed since 2 0 and arrays of contexts are no longer supported p p Thus the only valid non code null code return type for this method is a code String code representing a context id The previously valid return types are deprecated The plural name for this method is unfortunate p return the help context id for this entry 
Returns the image for the property value if there is one This image is managed by the entry it came from Callers of this method must never dispose the returned image return the image for this property value or code null code 
Returns the value of the objects expressed as a String return the value of the objects expressed as a String 
Returns code true code if the entry has children return code true code if the entry has children 
Removes the given listener from this entry s collection of listeners param listener the listener to remove public void remove Property Sheet Entry Listener  removePropertySheetEntryListener
Resets the property value to its default value if it has been changed p Does nothing if the notion of a default value is not meaningful for the property p 
Sets the objects which represent the property values for this entry In the case of the root entry these objects are the input to the viewer param values the values for this entry 

public interface I Property Sheet Entry Listener A node s children have changed children added or removed param node the node whose s children have changed  IPropertySheetEntryListener
void child Entries Changed I Property Sheet Entry node A entry s error message has changed param entry the entry whose s error message has changed  childEntriesChanged IPropertySheetEntry
void error Message Changed I Property Sheet Entry entry A entry s value has changed param entry the entry whose s value has changed  errorMessageChanged IPropertySheetEntry

Returns a value for this property source that can be edited in a property sheet p This value is used when this code I Property Source code is appearing in the property sheet as the value of a property of some other code I Property Source code p p This value is passed as the input to a cell editor opening on an code I Property Source code p p This value is also used when an code I Property Source code is being used as the value in a code set Property Value code message The reciever of the message would then typically use the editable value to update the original property source or construct a new instance p p For example an email address which is a property source may have an editable value which is a string so that it can be edited in a text cell editor The email address would also have a constructor or setter that takes the edited string so that an appropriate instance can be created or the original instance modified when the edited value is set p p This behavior is important for another reason When the property sheet is showing properties for more than one object multiple selection a property sheet entry will display and edit a single value typically coming from the first selected object After a property has been edited in a cell editor the same value is set as the property value for all of the objects This is fine for primitive types but otherwise all of the objects end up with a reference to the same value Thus by creating an editable value and using it to update the state of the original property source object one is able to edit several property source objects at once multiple selection return a value that can be edited  IPropertySource IPropertySource IPropertySource IPropertySource setPropertyValue
public Object get Editable Value Returns the list of property descriptors for this property source The code get Property Value code and code set Property Value code methods are used to read and write the actual property values by specifying the property ids from these property descriptors p Implementors should cache the descriptors as they will be asked for the descriptors with any edit update Since descriptors provide cell editors returning the same descriptors if possible allows for efficient updating p return the property descriptors  getEditableValue getPropertyValue setPropertyValue
public I Property Descriptor get Property Descriptors Returns the value of the property with the given id if it has one Returns code null code if the property s value is code null code value or if this source does not have the specified property see set Property Value param id the id of the property being set return the value of the property or code null code  IPropertyDescriptor getPropertyDescriptors setPropertyValue
public Object get Property Value Object id Returns whether the value of the property with the given id has changed from its default value Returns code false code if this source does not have the specified property p If the notion of default value is not meaningful for the specified property than code true code is returned p param id the id of the property return code true code if the value of the specified property has changed from its original default value or if the specified property does not have a meaningful default value and code false code otherwise see I Property Source2 is Property Resettable Object see reset Property Value Object  getPropertyValue IPropertySource2 isPropertyResettable resetPropertyValue
public boolean is Property Set Object id Resets the property with the given id to its default value if possible p Does nothing if the notion of a default value is not meaningful for the specified property or if the property s value cannot be changed or if this source does not have the specified property p p Callers will check if this code I Property Source code implements code I Property Source2 code and this method will only be called if code I Property Source2 is Property Resettable Object code returns code true code for the property with the given id p param id the id of the property being reset see is Property Set Object see I Property Source2 is Property Resettable Object  isPropertySet IPropertySource IPropertySource2 IPropertySource2 isPropertyResettable isPropertySet IPropertySource2 isPropertyResettable
public void reset Property Value Object id Sets the property with the given id if possible Does nothing if the property s value cannot be changed or if this source does not have the specified property p In general a property source should not directly reference the value parameter unless it is an atomic object that can be shared such as a string p p An important reason for this is that several property sources with compatible descriptors could be appearing in the property sheet at the same time An editor produces a single edited value which is passed as the value parameter of this message to all the property sources Thus to avoid a situation where all of the property sources reference the same value they should use the value parameter to create a new instance of the real value for the given property p p There is another reason why a level of indirection is useful The real value of property may be a type that cannot be edited with a standard cell editor However instead of returning the real value in code get Property Value code the value could be converted to a code String code which could be edited with a standard cell editor The edited value will be passed to this method which can then turn it back into the real property value p p Another variation on returning a value other than the real property value in code get Property Value code is to return a value which is an code I Property Source code or for which the property sheet can obtain an code I Property Source code In this case the value to edit is obtained from the child property source using code get Editable Value code It is this editable value that will be passed back via this method when it has been editted p see get Property Value see get Editable Value param id the id of the property being set param value the new value for the property code null code is allowed  resetPropertyValue getPropertyValue getPropertyValue IPropertySource IPropertySource getEditableValue getPropertyValue getEditableValue

Returns whether the value of the property with the specified id is resettable to a default value param id the id of the property return code true code if the property with the specified id has a meaningful default value to which it can be resetted to and code false code otherwise see I Property Source reset Property Value Object see I Property Source is Property Set Object  IPropertySource resetPropertyValue IPropertySource isPropertySet

public interface I Property Source Provider Returns a property source for the given object param object the object  IPropertySourceProvider

private static Resource Bundle bundle Resource Bundle get Bundle RESOURCE BUNDLE private Properties Messages prevent instantiation of class  ResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE PropertiesMessages
Returns the formatted message for the given key in the 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  MessageFormat getString
Returns the resource object with the given key in the 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  getString getString MissingResourceException

private boolean incompatible false Creates a new property descriptor with the given id and display name public Property Descriptor Object id String display Name Assert is Not Null id Assert is Not Null display Name this id id this display display Name  PropertyDescriptor displayName isNotNull isNotNull displayName displayName
The code Property Descriptor code implementation of this code I Property Descriptor code method returns code null code p Since no cell editor is returned the property is read only p public Cell Editor create Property Editor Composite parent return null  PropertyDescriptor IPropertyDescriptor CellEditor createPropertyEditor
Returns code true code if this property descriptor is to be always considered incompatible with any other property descriptor This prevents a property from displaying during multiple selection return code true code to indicate always incompatible protected boolean get Always Incompatible return incompatible  getAlwaysIncompatible
The code Property Descriptor code implementation of this code I Property Descriptor code method returns the value set by the code set Category code method If unset this method returns code null code indicating the default category see set Category public String get Category return category  PropertyDescriptor IPropertyDescriptor setCategory setCategory getCategory
The code Property Descriptor code implementation of this code I Property Descriptor code method returns the value set by the code set Description code method If unset this method returns code null code indicating no description see set Description public String get Description return description  PropertyDescriptor IPropertyDescriptor setDescription setDescription getDescription
The code Simple Property Descriptor code implementation of this code I Property Descriptor code method returns the value supplied on the constructor public String get Display Name return display  SimplePropertyDescriptor IPropertyDescriptor getDisplayName
The code Simple Property Descriptor code implementation of this code I Property Descriptor code method returns the value set by the code set Filter Flags code method If unset this method returns code null code p Valid values for these flags are declared as constants on code I Property Sheet Entry code public String get Filter Flags return filter Flags  SimplePropertyDescriptor IPropertyDescriptor setFilterFlags IPropertySheetEntry getFilterFlags filterFlags
The code Simple Property Descriptor code implementation of this code I Property Descriptor code method returns the value set by the code set Help Context Id code method If unset this method returns code null code see set Help Context Ids public Object get Help Context Ids return help Ids  SimplePropertyDescriptor IPropertyDescriptor setHelpContextId setHelpContextIds getHelpContextIds helpIds
The code Property Descriptor code implementation of this code I Property Descriptor code method returns the value supplied on the constructor public Object get Id return id  PropertyDescriptor IPropertyDescriptor getId
The code Property Descriptor code implementation of this code I Property Descriptor code method returns the value set by the code set Provider code method or if no value has been set it returns a code Label Provider code see set Label Provider public I Label Provider get Label Provider if label Provider null return label Provider else return new Label Provider  PropertyDescriptor IPropertyDescriptor setProvider LabelProvider setLabelProvider ILabelProvider getLabelProvider labelProvider labelProvider LabelProvider
Returns the input validator for editing the property return the validator used to verify correct values for this property or code null code protected I Cell Editor Validator get Validator return validator  ICellEditorValidator getValidator
Returns whether a label provider has been set on the receiver return whether a label provider has been set on the receiver see set Label Provider since 3 0 public boolean is Label Provider Set return label Provider null  setLabelProvider isLabelProviderSet labelProvider
The code Simple Property Descriptor code implementation of this code I Property Descriptor code method returns true if the other property has the same id and category and code get Always Incompatible code returns false public boolean is Compatible With I Property Descriptor another Property if get Always Incompatible return false Compare id Object id1 get Id Object id2 another Property get Id if id1 equals id2 return false Compare Category may be null if get Category null if another Property get Category null return false else if get Category equals another Property get Category return false return true  SimplePropertyDescriptor IPropertyDescriptor getAlwaysIncompatible isCompatibleWith IPropertyDescriptor anotherProperty getAlwaysIncompatible getId anotherProperty getId getCategory anotherProperty getCategory getCategory anotherProperty getCategory
Sets a flag indicating whether this property descriptor is to be always considered incompatible with any other property descriptor Setting this flag prevents a property from displaying during multiple selection param flag code true code to indicate always incompatible public void set Always Incompatible boolean flag incompatible flag  setAlwaysIncompatible
Sets the category for this property descriptor param category the category for the descriptor or code null code if none see get Category public void set Category String category this category category  getCategory setCategory
Sets the description for this property descriptor The description should be limited to a single line so that it can be displayed in the status line param description the description or code null code if none see get Description public void set Description String description this description description  getDescription setDescription
Sets the the filter flags for this property descriptor The description should be limited to a single line so that it can be displayed in the status line p Valid values for these flags are declared as constants on code I Property Sheet Entry code p param value the filter flags see get Filter Flags public void set Filter Flags String value filter Flags value  IPropertySheetEntry getFilterFlags setFilterFlags filterFlags
Sets the help context id for this property descriptor NOTE Help support system API s changed since 2 0 and arrays of contexts are no longer supported p p Thus the only valid parameter type for this method is a code String code representing a context id The previously valid parameter types are deprecated The plural name for this method is unfortunate p param context Ids the help context ids or code null code if none see get Help Context Ids public void set Help Context Ids Object context Ids help Ids context Ids  contextIds getHelpContextIds setHelpContextIds contextIds helpIds contextIds
Sets the label provider for this property descriptor p If no label provider is set an instance of code Label Provider code will be created as the default when needed p param provider the label provider for the descriptor or code null code if the default label provider should be used see get Label Provider public void set Label Provider I Label Provider provider label Provider provider  LabelProvider getLabelProvider setLabelProvider ILabelProvider labelProvider
Sets the input validator for the cell editor for this property descriptor p Issue This method should be unnecessary is the cell editor s own validator is used p param validator the cell input validator or code null code if none public void set Validator I Cell Editor Validator validator this validator validator  setValidator ICellEditorValidator

private I Selection bootstrap Selection Creates a property sheet view public Property Sheet super  ISelection bootstrapSelection PropertySheet
protected I Page create Default Page Page Book book Property Sheet Page page new Property Sheet Page init Page page page create Control book return page  IPage createDefaultPage PageBook PropertySheetPage PropertySheetPage initPage createControl
The code Property Sheet code implementation of this code I Workbench Part code method creates a code Page Book code control with its default page showing public void create Part Control Composite parent super create Part Control parent Workbench Help set Help get Page Book I Properties Help Context Ids PROPERTY SHEET VIEW  PropertySheet IWorkbenchPart PageBook createPartControl createPartControl WorkbenchHelp setHelp getPageBook IPropertiesHelpContextIds PROPERTY_SHEET_VIEW
public void dispose run super super dispose remove ourselves as a selection listener get Site get Page remove Selection Listener this  getSite getPage removeSelectionListener
protected Page Rec do Create Page I Workbench Part part Try to get a custom property sheet page I Property Sheet Page page I Property Sheet Page part get Adapter I Property Sheet Page class if page null if page instanceof I Page Book View Page init Page I Page Book View Page page page create Control get Page Book return new Page Rec part page Use the default page return null  PageRec doCreatePage IWorkbenchPart IPropertySheetPage IPropertySheetPage getAdapter IPropertySheetPage IPageBookViewPage initPage IPageBookViewPage createControl getPageBook PageRec
protected void do Destroy Page I Workbench Part part Page Rec rec I Property Sheet Page page I Property Sheet Page rec page page dispose rec dispose  doDestroyPage IWorkbenchPart PageRec IPropertySheetPage IPropertySheetPage
protected I Workbench Part get Bootstrap Part I Workbench Page page get Site get Page if page null bootstrap Selection page get Selection return page get Active Part else return null  IWorkbenchPart getBootstrapPart IWorkbenchPage getSite getPage bootstrapSelection getSelection getActivePart
Method declared on I View Part public void init I View Site site throws Part Init Exception site get Page add Selection Listener this super init site  IViewPart IViewSite PartInitException getPage addSelectionListener
The property sheet may show properties for any view other than this view protected boolean is Important I Workbench Part part return part this  isImportant IWorkbenchPart
The code Property Sheet code implementation of this code I Part Listener code method first sees if the active part is an code I Contributed Contents View code adapter and if so asks it for its contributing part public void part Activated I Workbench Part part I Contributed Contents View view I Contributed Contents View part get Adapter I Contributed Contents View class I Workbench Part source null if view null source view get Contributing Part if source null super part Activated source else super part Activated part When the view is first opened pass the selection to the page if bootstrap Selection null I Property Sheet Page page I Property Sheet Page get Current Page if page null page selection Changed part bootstrap Selection bootstrap Selection null  PropertySheet IPartListener IContributedContentsView partActivated IWorkbenchPart IContributedContentsView IContributedContentsView getAdapter IContributedContentsView IWorkbenchPart getContributingPart partActivated partActivated bootstrapSelection IPropertySheetPage IPropertySheetPage getCurrentPage selectionChanged bootstrapSelection bootstrapSelection
public void selection Changed I Workbench Part part I Selection sel we ignore our own selection or null selection if part this sel null return pass the selection to the page I Property Sheet Page page I Property Sheet Page get Current Page if page null page selection Changed part sel  selectionChanged IWorkbenchPart ISelection IPropertySheetPage IPropertySheetPage getCurrentPage selectionChanged

private String id Create a Property Sheet Viewer action protected Property Sheet Action Property Sheet Viewer viewer String name super name this id name this viewer viewer  PropertySheetViewer PropertySheetAction PropertySheetViewer
Return the unique action ID that will be used in contribution managers public String get Id return id  getId
Return the Property Sheet Viewer public Property Sheet Viewer get Property Sheet return viewer  PropertySheetViewer PropertySheetViewer getPropertySheet
Set the unique ID that should be used in the contribution managers public void set Id String new Id id new Id  setId newId newId

private boolean should Auto Expand true Create a Property Sheet category with name public Property Sheet Category String name category Name name  shouldAutoExpand PropertySheet PropertySheetCategory categoryName
Add an code I Property Sheet Entry code to the list of entries in this category public void add Entry I Property Sheet Entry entry entries add entry  IPropertySheetEntry addEntry IPropertySheetEntry
Return the category name public String get Category Name return category Name  getCategoryName categoryName
Returns code true code if this category should be automatically expanded The default value is code true code return code true code if this category should be automatically expanded code false code otherwise public boolean get Auto Expand return should Auto Expand  getAutoExpand shouldAutoExpand
Sets if this category should be automatically expanded public void set Auto Expand boolean auto Expand should Auto Expand auto Expand  setAutoExpand autoExpand shouldAutoExpand autoExpand
Returns the entries in this category return the entries in this category public I Property Sheet Entry get Child Entries return I Property Sheet Entry entries to Array new I Property Sheet Entry entries size  IPropertySheetEntry getChildEntries IPropertySheetEntry toArray IPropertySheetEntry
Removes all of the entries in this category Doing so allows us to reuse this category entry public void remove All Entries entries new Array List  removeAllEntries ArrayList

private I Cell Editor Listener cell Editor Listener new I Cell Editor Listener public void editor Value Changed boolean old Valid State boolean new Valid State if new Valid State currently not valid so show an error message set Error Text editor get Error Message else currently valid set Error Text null  ICellEditorListener cellEditorListener ICellEditorListener editorValueChanged oldValidState newValidState newValidState setErrorText getErrorMessage setErrorText
set Error Text null public void cancel Editor set Error Text null  setErrorText cancelEditor setErrorText
set Error Text null public void apply Editor Value Property Sheet Entry this apply Editor Value  setErrorText applyEditorValue PropertySheetEntry applyEditorValue
Method declared on I Property Sheet Entry public void add Property Sheet Entry Listener I Property Sheet Entry Listener listener listeners add listener  IPropertySheetEntry addPropertySheetEntryListener IPropertySheetEntryListener
public void apply Editor Value if editor null return Check if editor has a valid value if editor is Value Valid set Error Text editor get Error Message return set Error Text null See if the value changed and if so update Object new Value editor get Value boolean changed false if values length 1 changed true else if edit Value null if new Value null changed true else if edit Value equals new Value changed true Set the editor value if changed set Value new Value  applyEditorValue isValueValid setErrorText getErrorMessage setErrorText newValue getValue editValue newValue editValue newValue setValue newValue
Collator coll Collator get Instance Locale get Default public int compare Object a Object b I Property Descriptor d1 d2 String dname1 dname2 d1 I Property Descriptor a dname1 d1 get Display Name d2 I Property Descriptor b dname2 d2 get Display Name return coll compare dname1 dname2  getInstance getDefault IPropertyDescriptor IPropertyDescriptor getDisplayName IPropertyDescriptor getDisplayName
Return the sorted intersection of all the code I Property Descriptor code s for the objects return List private List compute Merged Property Descriptors if values length 0 return new Array List 0 get all descriptors from each object Map property Descriptor Maps new Map values length for int i 0 i values length i Object object values i I Property Source source get Property Source object if source null if one of the selected items is not a property source then we show no properties return new Array List 0 get the property descriptors keyed by id property Descriptor Maps i compute Property Descriptors For source intersect Map intersection property Descriptor Maps 0 for int i 1 i property Descriptor Maps length i get the current ids Object ids intersection key Set to Array for int j 0 j ids length j Object object property Descriptor Maps i get ids j if object null see if the descriptors which have the same id are compatible I Property Descriptor intersection get ids j is Compatible With I Property Descriptor object intersection remove ids j Sort the descriptors List descriptors new Array List intersection values Collections sort descriptors new Comparator Collator coll Collator get Instance Locale get Default public int compare Object a Object b I Property Descriptor d1 d2 String dname1 dname2 d1 I Property Descriptor a dname1 d1 get Display Name d2 I Property Descriptor b dname2 d2 get Display Name return coll compare dname1 dname2 return descriptors  IPropertyDescriptor computeMergedPropertyDescriptors ArrayList propertyDescriptorMaps IPropertySource getPropertySource ArrayList propertyDescriptorMaps computePropertyDescriptorsFor propertyDescriptorMaps propertyDescriptorMaps keySet toArray propertyDescriptorMaps IPropertyDescriptor isCompatibleWith IPropertyDescriptor ArrayList getInstance getDefault IPropertyDescriptor IPropertyDescriptor getDisplayName IPropertyDescriptor getDisplayName
Returns an map of property descritptors keyed on id for the given property source param source a property source for which to obtain descriptors return a table of decriptors keyed on their id private Map compute Property Descriptors For I Property Source source I Property Descriptor descriptors source get Property Descriptors Map result new Hash Map descriptors length 2 1 for int i 0 i descriptors length i result put descriptors i get Id descriptors i return result  computePropertyDescriptorsFor IPropertySource IPropertyDescriptor getPropertyDescriptors HashMap getId
Create our child entries private void create Child Entries get the current descriptors List descriptors compute Merged Property Descriptors rebuild child entries using old when possible child Entries new Property Sheet Entry descriptors size for int i 0 i descriptors size i I Property Descriptor d I Property Descriptor descriptors get i create new entry Property Sheet Entry entry new Property Sheet Entry entry set Descriptor d entry set Parent this entry set Property Source Provider property Source Provider entry refresh Values child Entries i entry  createChildEntries computeMergedPropertyDescriptors childEntries PropertySheetEntry IPropertyDescriptor IPropertyDescriptor PropertySheetEntry PropertySheetEntry setDescriptor setParent setPropertySourceProvider propertySourceProvider refreshValues childEntries
public void dispose if editor null editor dispose editor null recursive call to dispose children if child Entries null for int i 0 i child Entries length i an error in a property source may cause refresh Child Entries to fail Since the Workbench handles such errors we can be left in a state where a child entry is null if child Entries i null child Entries i dispose  childEntries childEntries refreshChildEntries childEntries childEntries
The child entries of this entry have changed children added or removed Notify all listeners of the change private void fire Child Entries Changed if listeners null return Object array listeners get Listeners for int i 0 i array length i I Property Sheet Entry Listener listener I Property Sheet Entry Listener array i listener child Entries Changed this  fireChildEntriesChanged getListeners IPropertySheetEntryListener IPropertySheetEntryListener childEntriesChanged
The error message of this entry has changed Notify all listeners of the change private void fire Error Message Changed if listeners null return Object array listeners get Listeners for int i 0 i array length i I Property Sheet Entry Listener listener I Property Sheet Entry Listener array i listener error Message Changed this  fireErrorMessageChanged getListeners IPropertySheetEntryListener IPropertySheetEntryListener errorMessageChanged
The values of this entry have changed Notify all listeners of the change private void fire Value Changed if listeners null return Object array listeners get Listeners for int i 0 i array length i I Property Sheet Entry Listener listener I Property Sheet Entry Listener array i listener value Changed this  fireValueChanged getListeners IPropertySheetEntryListener IPropertySheetEntryListener valueChanged
Method declared on I Property Sheet Entry public String get Category return descriptor get Category  IPropertySheetEntry getCategory getCategory
public I Property Sheet Entry get Child Entries if child Entries null create Child Entries return child Entries  IPropertySheetEntry getChildEntries childEntries createChildEntries childEntries
Method declared on I Property Sheet Entry public String get Description return descriptor get Description  IPropertySheetEntry getDescription getDescription
Returns the descriptor for this entry return I Property Descriptor private I Property Descriptor get Descriptor return descriptor  IPropertyDescriptor IPropertyDescriptor getDescriptor
Method declared on I Property Sheet Entry public String get Display Name return descriptor get Display Name  IPropertySheetEntry getDisplayName getDisplayName
public Cell Editor get Editor Composite parent if editor null editor descriptor create Property Editor parent if editor null editor add Listener cell Editor Listener if editor null editor set Value edit Value set Error Text editor get Error Message return editor  CellEditor getEditor createPropertyEditor addListener cellEditorListener setValue editValue setErrorText getErrorMessage
Returns the edit value for the object at the given index param index the value object index return the edit value for the object at the given index protected Object get Edit Value int index Object value values index I Property Source source get Property Source value if source null value source get Editable Value return value  getEditValue IPropertySource getPropertySource getEditableValue
Method declared on I Property Sheet Entry public String get Error Text return error Text  IPropertySheetEntry getErrorText errorText
Method declared on I Property Sheet Entry public String get Filters return descriptor get Filter Flags  IPropertySheetEntry getFilters getFilterFlags
Method declared on I Property Sheet Entry public Object get Help Context Ids return descriptor get Help Context Ids  IPropertySheetEntry getHelpContextIds getHelpContextIds
public Image get Image I Label Provider provider descriptor get Label Provider if provider null return null return provider get Image edit Value  getImage ILabelProvider getLabelProvider getImage editValue
Returns an property source for the given object param object an object for which to obtain a property source or code null code if a property source is not available return an property source for the given object private I Property Source get Property Source Object object if sources contains Key object return I Property Source sources get object I Property Source result null if property Source Provider null result property Source Provider get Property Source object else if object instanceof I Property Source result I Property Source object else if object instanceof I Adaptable result I Property Source I Adaptable object get Adapter I Property Source class sources put object result return result  IPropertySource getPropertySource containsKey IPropertySource IPropertySource propertySourceProvider propertySourceProvider getPropertySource IPropertySource IPropertySource IAdaptable IPropertySource IAdaptable getAdapter IPropertySource
public String get Value As String if edit Value null return NON NLS 1 I Label Provider provider descriptor get Label Provider if provider null return edit Value to String return provider get Text edit Value  getValueAsString editValue ILabelProvider getLabelProvider editValue toString getText editValue
Returns the value objects of this entry return Object private Object get Values return values  getValues
public boolean has Child Entries if child Entries null child Entries length 0 return true see if we could have entires if we were asked return compute Merged Property Descriptors size 0  hasChildEntries childEntries childEntries computeMergedPropertyDescriptors
Update our child entries This implementation tries to reuse child entries if possible if the id of the new descriptor matches the descriptor id of the old entry private void refresh Child Entries if child Entries null no children to refresh return get the current descriptors List descriptors compute Merged Property Descriptors cache old entries by their descriptor id Map entry Cache new Hash Map child Entries length 2 1 for int i 0 i child Entries length i entry Cache put child Entries i get Descriptor get Id child Entries i create a list of entries to dispose List entries To Dispose new Array List Arrays as List child Entries rebuild child entries using old when possible child Entries new Property Sheet Entry descriptors size boolean entries Changed descriptors size entry Cache size for int i 0 i descriptors size i I Property Descriptor d I Property Descriptor descriptors get i see if we have an entry matching this descriptor Property Sheet Entry entry Property Sheet Entry entry Cache get d get Id if entry null reuse old entry entry set Descriptor d entries To Dispose remove entry else create new entry entry new Property Sheet Entry entry set Descriptor d entry set Parent this entry set Property Source Provider property Source Provider entries Changed true entry refresh Values child Entries i entry if entries Changed fire Child Entries Changed Dispose of entries which are no longer needed for int i 0 i entries To Dispose size i I Property Sheet Entry entries To Dispose get i dispose  refreshChildEntries childEntries computeMergedPropertyDescriptors entryCache HashMap childEntries childEntries entryCache childEntries getDescriptor getId childEntries entriesToDispose ArrayList asList childEntries childEntries PropertySheetEntry entriesChanged entryCache IPropertyDescriptor IPropertyDescriptor PropertySheetEntry PropertySheetEntry entryCache getId setDescriptor entriesToDispose PropertySheetEntry setDescriptor setParent setPropertySourceProvider propertySourceProvider entriesChanged refreshValues childEntries entriesChanged fireChildEntriesChanged entriesToDispose IPropertySheetEntry entriesToDispose
Refresh the entry tree from the root down private void refresh From Root if parent null refresh Child Entries else parent refresh From Root  refreshFromRoot refreshChildEntries refreshFromRoot
Update our value objects We ask our parent for the property values based on our descriptor private void refresh Values get our parent s value objects Object current Sources parent get Values loop through the objects getting our property value from each Object new Values new Object current Sources length for int i 0 i current Sources length i I Property Source source parent get Property Source current Sources i new Values i source get Property Value descriptor get Id set our new values set Values new Values  refreshValues currentSources getValues newValues currentSources currentSources IPropertySource getPropertySource currentSources newValues getPropertyValue getId setValues newValues
Method declared on I Property Sheet Entry public void remove Property Sheet Entry Listener I Property Sheet Entry Listener listener listeners remove listener  IPropertySheetEntry removePropertySheetEntryListener IPropertySheetEntryListener
public void reset Property Value if parent null root does not have a default value return Use our parent s values to reset our values boolean change false Object objects parent get Values for int i 0 i objects length i I Property Source source get Property Source objects i if source is Property Set descriptor get Id fix for https bugs eclipse org bugs show bug cgi id 21756 if source instanceof I Property Source2 I Property Source2 extended Source I Property Source2 source continue with next if property is not resettable if extended Source is Property Resettable descriptor get Id continue source reset Property Value descriptor get Id change true if change refresh From Root  resetPropertyValue getValues IPropertySource getPropertySource isPropertySet getId show_bug IPropertySource2 IPropertySource2 extendedSource IPropertySource2 extendedSource isPropertyResettable getId resetPropertyValue getId refreshFromRoot
Set the descriptor param new Descriptor private void set Descriptor I Property Descriptor new Descriptor if our descriptor is changing we have to get rid of our current editor if there is one if descriptor new Descriptor editor null editor dispose editor null descriptor new Descriptor  newDescriptor setDescriptor IPropertyDescriptor newDescriptor newDescriptor newDescriptor
private void set Error Text String new Error Text error Text new Error Text inform listeners fire Error Message Changed  setErrorText newErrorText errorText newErrorText fireErrorMessageChanged
Sets the parent of the entry to be property Sheet Entry param property Sheet Entry private void set Parent Property Sheet Entry property Sheet Entry parent property Sheet Entry  propertySheetEntry propertySheetEntry setParent PropertySheetEntry propertySheetEntry propertySheetEntry
Sets a property source provider for this entry This provider is used to obtain an code I Property Source code for each of this entries objects If no provider is set then a default provider is used param provider I Property Source Provider public void set Property Source Provider I Property Source Provider provider property Source Provider provider  IPropertySource IPropertySourceProvider setPropertySourceProvider IPropertySourceProvider propertySourceProvider
Set the value for this entry p We set the given value as the value for all our value objects We then call our parent to update the property we represent with the given value We then trigger a model refresh p param new Value the new value private void set Value Object new Value Set the value for int i 0 i values length i values i new Value Inform our parent parent value Changed this Refresh the model refresh From Root  newValue setValue newValue newValue valueChanged refreshFromRoot
The code Property Sheet Entry code implmentation of this method declared on code I Property Sheet Entry code will obtain an editable value for the given objects and update the child entries p Updating the child entries will typically call this method on the child entries and thus the entire entry tree is updated p param objects the new values for this entry public void set Values Object objects values objects sources new Hash Map values length 2 1 if values length 0 edit Value null else set the first value object as the entry s value Object new Value values 0 see if we should convert the value to an editable value I Property Source source get Property Source new Value if source null new Value source get Editable Value edit Value new Value update our child entries refresh Child Entries inform listeners that our value changed fire Value Changed  PropertySheetEntry IPropertySheetEntry setValues HashMap editValue newValue IPropertySource getPropertySource newValue newValue getEditableValue editValue newValue refreshChildEntries fireValueChanged
The value of the given child entry has changed Therefore we must set this change into our value objects p We must inform our parent so that it can update its value objects p p Subclasses may override to set the property value in some custom way p param child the child entry that changed its value protected void value Changed Property Sheet Entry child for int i 0 i values length i I Property Source source get Property Source values i source set Property Value child get Descriptor get Id child get Edit Value i inform our parent if parent null parent value Changed this  valueChanged PropertySheetEntry IPropertySource getPropertySource setPropertyValue getDescriptor getId getEditValue valueChanged

private Clipboard clipboard Creates a new property sheet page public Property Sheet Page super  PropertySheetPage
add a listener to track when the entry selection changes viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Entry Selection event get Selection  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleEntrySelection getSelection
public void help Requested Help Event e Get the context for the selected item I Structured Selection selection I Structured Selection viewer get Selection if selection is Empty I Property Sheet Entry entry I Property Sheet Entry selection get First Element Object help Context Id entry get Help Context Ids if help Context Id null if help Context Id instanceof String Workbench Help display Help String help Context Id return Since 2 0 the only valid type for help Context Ids is a String a single id However for backward compatibility we have to handle and array of contexts Strings and or I Contexts or a context computer Object contexts null if help Context Id instanceof I Context Computer get local contexts contexts I Context Computer help Context Id get Local Contexts e else contexts Object help Context Id Ignore all but the first element in the array if contexts 0 instanceof I Context Workbench Help display Help I Context contexts 0 else Workbench Help display Help String contexts 0 return No help for the selection so show page help Workbench Help display Help HELP CONTEXT PROPERTY SHEET PAGE  helpRequested HelpEvent IStructuredSelection IStructuredSelection getSelection isEmpty IPropertySheetEntry IPropertySheetEntry getFirstElement helpContextId getHelpContextIds helpContextId helpContextId WorkbenchHelp displayHelp helpContextId helpContextIds IContexts helpContextId IContextComputer IContextComputer helpContextId getLocalContexts helpContextId IContext WorkbenchHelp displayHelp IContext WorkbenchHelp displayHelp WorkbenchHelp displayHelp HELP_CONTEXT_PROPERTY_SHEET_PAGE
public void create Control Composite parent create a new viewer viewer new Property Sheet Viewer parent set the model for the viewer if root Entry null create a new root Property Sheet Entry root new Property Sheet Entry if provider null set the property source provider root set Property Source Provider provider root Entry root viewer set Root Entry root Entry viewer add Activation Listener get Cell Editor Activation Listener add a listener to track when the entry selection changes viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Entry Selection event get Selection init Drag And Drop make Actions Create the popup menu for the page Menu Manager menu Mgr new Menu Manager Popup Menu NON NLS 1 menu Mgr add copy Action menu Mgr add new Separator menu Mgr add defaults Action Menu menu menu Mgr create Context Menu viewer get Control viewer get Control set Menu menu Set help on the viewer viewer get Control add Help Listener new Help Listener see Help Listener help Requested Help Event public void help Requested Help Event e Get the context for the selected item I Structured Selection selection I Structured Selection viewer get Selection if selection is Empty I Property Sheet Entry entry I Property Sheet Entry selection get First Element Object help Context Id entry get Help Context Ids if help Context Id null if help Context Id instanceof String Workbench Help display Help String help Context Id return Since 2 0 the only valid type for help Context Ids is a String a single id However for backward compatibility we have to handle and array of contexts Strings and or I Contexts or a context computer Object contexts null if help Context Id instanceof I Context Computer get local contexts contexts I Context Computer help Context Id get Local Contexts e else contexts Object help Context Id Ignore all but the first element in the array if contexts 0 instanceof I Context Workbench Help display Help I Context contexts 0 else Workbench Help display Help String contexts 0 return No help for the selection so show page help Workbench Help display Help HELP CONTEXT PROPERTY SHEET PAGE  createControl PropertySheetViewer rootEntry PropertySheetEntry PropertySheetEntry setPropertySourceProvider rootEntry setRootEntry rootEntry addActivationListener getCellEditorActivationListener addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleEntrySelection getSelection initDragAndDrop makeActions MenuManager menuMgr MenuManager PopupMenu menuMgr copyAction menuMgr menuMgr defaultsAction menuMgr createContextMenu getControl getControl setMenu getControl addHelpListener HelpListener HelpListener helpRequested HelpEvent helpRequested HelpEvent IStructuredSelection IStructuredSelection getSelection isEmpty IPropertySheetEntry IPropertySheetEntry getFirstElement helpContextId getHelpContextIds helpContextId helpContextId WorkbenchHelp displayHelp helpContextId helpContextIds IContexts helpContextId IContextComputer IContextComputer helpContextId getLocalContexts helpContextId IContext WorkbenchHelp displayHelp IContext WorkbenchHelp displayHelp WorkbenchHelp displayHelp HELP_CONTEXT_PROPERTY_SHEET_PAGE
The code Property Sheet Page code implementation of this code I Page code method disposes of this page s entries public void dispose super dispose if root Entry null root Entry dispose root Entry null if clipboard null clipboard dispose clipboard null  PropertySheetPage IPage rootEntry rootEntry rootEntry
if cell Editor Activation Listener null cell Editor Activation Listener new I Cell Editor Activation Listener public void cell Editor Activated Cell Editor cell Editor if cell Editor Action Handler null cell Editor Action Handler add Cell Editor cell Editor  cellEditorActivationListener cellEditorActivationListener ICellEditorActivationListener cellEditorActivated CellEditor cellEditor cellEditorActionHandler cellEditorActionHandler addCellEditor cellEditor
cell Editor Action Handler add Cell Editor cell Editor public void cell Editor Deactivated Cell Editor cell Editor if cell Editor Action Handler null cell Editor Action Handler remove Cell Editor cell Editor  cellEditorActionHandler addCellEditor cellEditor cellEditorDeactivated CellEditor cellEditor cellEditorActionHandler cellEditorActionHandler removeCellEditor cellEditor
Returns the cell editor activation listener for this page return I Cell Editor Activation Listener the cell editor activation listener for this page private I Cell Editor Activation Listener get Cell Editor Activation Listener if cell Editor Activation Listener null cell Editor Activation Listener new I Cell Editor Activation Listener public void cell Editor Activated Cell Editor cell Editor if cell Editor Action Handler null cell Editor Action Handler add Cell Editor cell Editor public void cell Editor Deactivated Cell Editor cell Editor if cell Editor Action Handler null cell Editor Action Handler remove Cell Editor cell Editor return cell Editor Activation Listener  ICellEditorActivationListener ICellEditorActivationListener getCellEditorActivationListener cellEditorActivationListener cellEditorActivationListener ICellEditorActivationListener cellEditorActivated CellEditor cellEditor cellEditorActionHandler cellEditorActionHandler addCellEditor cellEditor cellEditorDeactivated CellEditor cellEditor cellEditorActionHandler cellEditorActionHandler removeCellEditor cellEditor cellEditorActivationListener
public Control get Control if viewer null return null return viewer get Control  getControl getControl
Returns the image descriptor with the given relative path param relative Path The path relative to the workspace root return Image Descriptor the descriptor for the receiver private Image Descriptor get Image Descriptor String relative Path String icon Path icons full NON NLS 1 Bundle bundle Platform get Bundle PlatformUI PLUGIN ID URL url bundle get Entry icon Path relative Path return Image Descriptor create FromURL url  relativePath ImageDescriptor ImageDescriptor getImageDescriptor relativePath iconPath getBundle PLUGIN_ID getEntry iconPath relativePath ImageDescriptor createFromURL
Handles a selection change in the entry table param selection the new selection public void handle Entry Selection I Selection selection if defaults Action null if selection is Empty defaults Action set Enabled false return see if item is editable boolean editable viewer get Active Cell Editor null defaults Action set Enabled editable  handleEntrySelection ISelection defaultsAction isEmpty defaultsAction setEnabled getActiveCellEditor defaultsAction setEnabled
Text Transfer get Instance Drag Source Listener listener new Drag Source Adapter public void drag Set Data Drag Source Event event perform Drag Set Data event  TextTransfer getInstance DragSourceListener DragSourceAdapter dragSetData DragSourceEvent performDragSetData
perform Drag Set Data event public void drag Finished Drag Source Event event Nothing to do here  performDragSetData dragFinished DragSourceEvent
Adds drag and drop support protected void init Drag And Drop int operations DND DROP COPY Transfer transfer Types new Transfer Text Transfer get Instance Drag Source Listener listener new Drag Source Adapter public void drag Set Data Drag Source Event event perform Drag Set Data event public void drag Finished Drag Source Event event Nothing to do here Drag Source drag Source new Drag Source Table Tree viewer get Control get Table operations drag Source set Transfer transfer Types drag Source add Drag Listener listener  initDragAndDrop DROP_COPY transferTypes TextTransfer getInstance DragSourceListener DragSourceAdapter dragSetData DragSourceEvent performDragSetData dragFinished DragSourceEvent DragSource dragSource DragSource TableTree getControl getTable dragSource setTransfer transferTypes dragSource addDragListener
The user is attempting to drag Add the appropriate data to the event param event The event sent from the drag and drop support void perform Drag Set Data Drag Source Event event Get the selected property I Structured Selection selection I Structured Selection viewer get Selection if selection is Empty return Assume single selection I Property Sheet Entry entry I Property Sheet Entry selection get First Element Place text as the data String Buffer buffer new String Buffer buffer append entry get Display Name buffer append t NON NLS 1 buffer append entry get Value As String event data buffer to String  performDragSetData DragSourceEvent IStructuredSelection IStructuredSelection getSelection isEmpty IPropertySheetEntry IPropertySheetEntry getFirstElement StringBuffer StringBuffer getDisplayName getValueAsString toString
Make action objects private void make Actions I Shared Images shared Images PlatformUI get Workbench get Shared Images Restore Default Value defaults Action new Defaults Action viewer defaults NON NLS 1 defaults Action set Text Properties Messages get String Defaults text NON NLS 1 defaults Action set Tool Tip Text Properties Messages get String Defaults tool Tip NON NLS 1 defaults Action set Image Descriptor get Image Descriptor elcl16 defaults ps gif NON NLS 1 defaults Action set Disabled Image Descriptor get Image Descriptor dlcl16 defaults ps gif NON NLS 1 defaults Action set Enabled false Show Advanced Properties filter Action new Filter Action viewer filter NON NLS 1 filter Action set Text Properties Messages get String Filter text NON NLS 1 filter Action set Tool Tip Text Properties Messages get String Filter tool Tip NON NLS 1 filter Action set Image Descriptor get Image Descriptor elcl16 filter ps gif NON NLS 1 filter Action set Checked false Show Categories categories Action new Categories Action viewer categories NON NLS 1 categories Action set Text Properties Messages get String Categories text NON NLS 1 categories Action set Tool Tip Text Properties Messages get String Categories tool Tip NON NLS 1 categories Action set Image Descriptor get Image Descriptor elcl16 tree mode gif NON NLS 1 categories Action set Checked true Copy Shell shell viewer get Control get Shell clipboard new Clipboard shell get Display copy Action new Copy Property Action viewer copy clipboard NON NLS 1 copy Action set Text Properties Messages get String Copy Property text NON NLS 1 copy Action set Image Descriptor shared Images get Image Descriptor I Shared Images IMG TOOL COPY  makeActions ISharedImages sharedImages getWorkbench getSharedImages defaultsAction DefaultsAction defaultsAction setText PropertiesMessages getString defaultsAction setToolTipText PropertiesMessages getString toolTip defaultsAction setImageDescriptor getImageDescriptor defaults_ps defaultsAction setDisabledImageDescriptor getImageDescriptor defaults_ps defaultsAction setEnabled filterAction FilterAction filterAction setText PropertiesMessages getString filterAction setToolTipText PropertiesMessages getString toolTip filterAction setImageDescriptor getImageDescriptor filter_ps filterAction setChecked categoriesAction CategoriesAction categoriesAction setText PropertiesMessages getString categoriesAction setToolTipText PropertiesMessages getString toolTip categoriesAction setImageDescriptor getImageDescriptor tree_mode categoriesAction setChecked getControl getShell getDisplay copyAction CopyPropertyAction copyAction setText PropertiesMessages getString CopyProperty copyAction setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_COPY
public void make Contributions I Menu Manager menu Manager I Tool Bar Manager tool Bar Manager I Status Line Manager status Line Manager add actions to the tool bar tool Bar Manager add categories Action tool Bar Manager add filter Action tool Bar Manager add defaults Action add actions to the menu menu Manager add categories Action menu Manager add filter Action set status line manager into the viewer viewer set Status Line Manager status Line Manager  makeContributions IMenuManager menuManager IToolBarManager toolBarManager IStatusLineManager statusLineManager toolBarManager categoriesAction toolBarManager filterAction toolBarManager defaultsAction menuManager categoriesAction menuManager filterAction setStatusLineManager statusLineManager
Updates the model for the viewer p Note that this means ensuring that the model reflects the state of the current viewer input p public void refresh if viewer null return calling set Input on the viewer will cause the model to refresh viewer set Input viewer get Input  setInput setInput getInput
public void selection Changed I Workbench Part part I Selection selection if viewer null return change the viewer input since the workbench selection has changed if selection instanceof I Structured Selection viewer set Input I Structured Selection selection to Array  selectionChanged IWorkbenchPart ISelection IStructuredSelection setInput IStructuredSelection toArray
The code Property Sheet Page code implementation of this code I Page code method calls code make Contributions code for backwards compatibility with previous versions of code I Page code p Subclasses may reimplement p public void set Action Bars I Action Bars action Bars super set Action Bars action Bars cell Editor Action Handler new Cell Editor Action Handler action Bars cell Editor Action Handler set Copy Action copy Action  PropertySheetPage IPage makeContributions IPage setActionBars IActionBars actionBars setActionBars actionBars cellEditorActionHandler CellEditorActionHandler actionBars cellEditorActionHandler setCopyAction copyAction
Sets focus to a part in the page public void set Focus viewer get Control set Focus  setFocus getControl setFocus
Sets the given property source provider as the property source provider p Calling this method is only valid if you are using this page s default root entry p param new Provider the property source provider public void set Property Source Provider I Property Source Provider new Provider provider new Provider if root Entry instanceof Property Sheet Entry Property Sheet Entry root Entry set Property Source Provider provider the following will trigger an update viewer set Root Entry root Entry  newProvider setPropertySourceProvider IPropertySourceProvider newProvider newProvider rootEntry PropertySheetEntry PropertySheetEntry rootEntry setPropertySourceProvider setRootEntry rootEntry
Sets the given entry as the model for the page param entry the root entry public void set Root Entry I Property Sheet Entry entry root Entry entry if viewer null the following will trigger an update viewer set Root Entry root Entry  setRootEntry IPropertySheetEntry rootEntry setRootEntry rootEntry

private Listener List activation Listeners new Listener List 3 Creates a property sheet viewer on a newly created table tree control under the given parent The viewer has no input and no root entry param parent the parent control public Property Sheet Viewer Composite parent table Tree new Table Tree parent SWT FULL SELECTION SWT SINGLE SWT HIDE SELECTION configure the widget Table table table Tree get Table table set Lines Visible true table set Header Visible true configure the columns add Columns add our listeners to the widget hook Control create a new table tree editor table Tree Editor new Table Tree Editor table Tree create the entry and editor listener create Entry Listener create Editor Listener  ListenerList activationListeners ListenerList PropertySheetViewer tableTree TableTree FULL_SELECTION HIDE_SELECTION tableTree getTable setLinesVisible setHeaderVisible addColumns hookControl tableTreeEditor TableTreeEditor tableTree createEntryListener createEditorListener
Activate a cell editor for the given selected table tree item param item the selected table tree item private void activate Cell Editor Table Tree Item item ensure the cell editor is visible table Tree show Selection Get the entry for this item I Property Sheet Entry active Entry I Property Sheet Entry item get Data Get the cell editor for the entry Note that the editor parent must be the Table control that is underneath the Table Tree cell Editor active Entry get Editor table Tree get Table if cell Editor null unable to create the editor return activate the cell editor cell Editor activate if the cell editor has no control we can stop now Control control cell Editor get Control if control null cell Editor deactivate cell Editor null return add our editor listener cell Editor add Listener editor Listener set the layout of the table tree editor to match the cell editor Cell Editor Layout Data layout cell Editor get Layout Data table Tree Editor horizontal Alignment layout horizontal Alignment table Tree Editor grab Horizontal layout grab Horizontal table Tree Editor minimum Width layout minimum Width table Tree Editor set Editor control item column To Edit set the error text from the cel editor set Error Message cell Editor get Error Message give focus to the cell editor cell Editor set Focus notify of activation fire Cell Editor Activated cell Editor  activateCellEditor TableTreeItem tableTree showSelection IPropertySheetEntry activeEntry IPropertySheetEntry getData TableTree cellEditor activeEntry getEditor tableTree getTable cellEditor cellEditor cellEditor getControl cellEditor cellEditor cellEditor addListener editorListener CellEditor LayoutData cellEditor getLayoutData tableTreeEditor horizontalAlignment horizontalAlignment tableTreeEditor grabHorizontal grabHorizontal tableTreeEditor minimumWidth minimumWidth tableTreeEditor setEditor columnToEdit setErrorMessage cellEditor getErrorMessage cellEditor setFocus fireCellEditorActivated cellEditor
Adds a cell editor activation listener Has no effect if an identical activation listener is already registered param listener a cell editor activation listener package void add Activation Listener I Cell Editor Activation Listener listener activation Listeners add listener  addActivationListener ICellEditorActivationListener activationListeners
Add columns to the table tree and set up the layout manager accordingly private void add Columns Table table table Tree get Table create the columns Table Column columns table get Columns for int i 0 i column Labels length i String string column Labels i if string null Table Column column if i columns length column columns i else column new Table Column table 0 column set Text string property column Column Layout Data c1 Layout new Column Weight Data 40 false value column Column Layout Data c2 Layout new Column Weight Data 60 true set columns in Table layout Table Layout layout new Table Layout layout add Column Data c1 Layout layout add Column Data c2 Layout table set Layout layout  addColumns tableTree getTable TableColumn getColumns columnLabels columnLabels TableColumn TableColumn setText ColumnLayoutData c1Layout ColumnWeightData ColumnLayoutData c2Layout ColumnWeightData TableLayout TableLayout addColumnData c1Layout addColumnData c2Layout setLayout
Asks the entry currently being edited to apply its current cell editor value private void apply Editor Value Table Tree Item tree Item table Tree Editor get Item tree Item can be null when view is opened if tree Item null tree Item is Disposed return I Property Sheet Entry entry I Property Sheet Entry tree Item get Data entry apply Editor Value  applyEditorValue TableTreeItem treeItem tableTreeEditor getItem treeItem treeItem treeItem isDisposed IPropertySheetEntry IPropertySheetEntry treeItem getData applyEditorValue
Creates the child items for the given widget item or table tree This method is called when the item is expanded for the first time or when an item is assigned as the root of the table tree param widget Table Tree Item or Table Tree to create the children in private void create Children Widget widget get the current child items Table Tree Item child Items if widget table Tree child Items table Tree get Items else child Items Table Tree Item widget get Items if child Items length 0 Object data child Items 0 get Data if data null children already there return remove the dummy child Items 0 dispose get the children and create their table tree items Object node widget get Data List children get Children node if children is Empty this item does t actually have any children return for int i 0 i children size i create a new table tree item create Item children get i widget i  TableTreeItem TableTree createChildren TableTreeItem childItems tableTree childItems tableTree getItems childItems TableTreeItem getItems childItems childItems getData childItems getData getChildren isEmpty createItem
private void create Editor Listener editor Listener new I Cell Editor Listener public void cancel Editor deactivate Cell Editor  createEditorListener editorListener ICellEditorListener cancelEditor deactivateCellEditor
deactivate Cell Editor public void editor Value Changed boolean old Valid State boolean new Valid State Do nothing  deactivateCellEditor editorValueChanged oldValidState newValidState
Do nothing public void apply Editor Value Do nothing  applyEditorValue
Creates a new cell editor listener private void create Editor Listener editor Listener new I Cell Editor Listener public void cancel Editor deactivate Cell Editor public void editor Value Changed boolean old Valid State boolean new Valid State Do nothing public void apply Editor Value Do nothing  createEditorListener editorListener ICellEditorListener cancelEditor deactivateCellEditor editorValueChanged oldValidState newValidState applyEditorValue
entry Listener new I Property Sheet Entry Listener public void child Entries Changed I Property Sheet Entry entry update the children of the given entry if entry root Entry update Children Of entry table Tree else Table Tree Item item find Item entry if item null update Children Of entry item  entryListener IPropertySheetEntryListener childEntriesChanged IPropertySheetEntry rootEntry updateChildrenOf tableTree TableTreeItem findItem updateChildrenOf
public void value Changed I Property Sheet Entry entry update the given entry Table Tree Item item find Item entry if item null update Entry entry item  valueChanged IPropertySheetEntry TableTreeItem findItem updateEntry
update Entry entry item public void error Message Changed I Property Sheet Entry entry update the error message set Error Message entry get Error Text  updateEntry errorMessageChanged IPropertySheetEntry setErrorMessage getErrorText
Creates a new property sheet entry listener private void create Entry Listener entry Listener new I Property Sheet Entry Listener public void child Entries Changed I Property Sheet Entry entry update the children of the given entry if entry root Entry update Children Of entry table Tree else Table Tree Item item find Item entry if item null update Children Of entry item public void value Changed I Property Sheet Entry entry update the given entry Table Tree Item item find Item entry if item null update Entry entry item public void error Message Changed I Property Sheet Entry entry update the error message set Error Message entry get Error Text  createEntryListener entryListener IPropertySheetEntryListener childEntriesChanged IPropertySheetEntry rootEntry updateChildrenOf tableTree TableTreeItem findItem updateChildrenOf valueChanged IPropertySheetEntry TableTreeItem findItem updateEntry errorMessageChanged IPropertySheetEntry setErrorMessage getErrorText
Creates a new table tree item sets the given entry or category node in its user data field and adds a listener to the node if it is an entry param node the entry or category associated with this item param parent the parent widget param index indicates the position to insert the item into its parent private void create Item Object node Widget parent int index create the item Table Tree Item item if parent instanceof Table Tree Item item new Table Tree Item Table Tree Item parent SWT NONE index else item new Table Tree Item Table Tree parent SWT NONE index set the user data field item set Data node add our listener if node instanceof I Property Sheet Entry I Property Sheet Entry node add Property Sheet Entry Listener entry Listener update the visual presentation if node instanceof I Property Sheet Entry update Entry I Property Sheet Entry node item else update Category Property Sheet Category node item  createItem TableTreeItem TableTreeItem TableTreeItem TableTreeItem TableTreeItem TableTree setData IPropertySheetEntry IPropertySheetEntry addPropertySheetEntryListener entryListener IPropertySheetEntry updateEntry IPropertySheetEntry updateCategory PropertySheetCategory
Deactivate the currently active cell editor package void deactivate Cell Editor table Tree Editor set Editor null null column To Edit if cell Editor null cell Editor deactivate fire Cell Editor Deactivated cell Editor cell Editor remove Listener editor Listener cell Editor null clear any error message from the editor set Error Message null  deactivateCellEditor tableTreeEditor setEditor columnToEdit cellEditor cellEditor fireCellEditorDeactivated cellEditor cellEditor removeListener editorListener cellEditor setErrorMessage
Sends out a selection changed event for the entry table to all registered listeners private void entry Selection Changed Selection Changed Event change Event new Selection Changed Event this get Selection fire Selection Changed change Event  entrySelectionChanged SelectionChangedEvent changeEvent SelectionChangedEvent getSelection fireSelectionChanged changeEvent
Return a table tree item in the property sheet that has the same entry in its user data field as the supplied entry Return code null code if there is no such item param entry the entry to serach for return the Table Tree Item for the entry or code null code if there isn t one private Table Tree Item find Item I Property Sheet Entry entry Iterate through table Tree Items to find item Table Tree Item items table Tree get Items for int i 0 i items length i Table Tree Item item items i Table Tree Item find Item find Item entry item if find Item null return find Item return null  TableTreeItem TableTreeItem findItem IPropertySheetEntry tableTreeItems TableTreeItem tableTree getItems TableTreeItem TableTreeItem findItem findItem findItem findItem
Return a table tree item in the property sheet that has the same entry in its user data field as the supplied entry Return code null code if there is no such item param entry the entry to search for param item the item look in return the Table Tree Item for the entry or code null code if there isn t one private Table Tree Item find Item I Property Sheet Entry entry Table Tree Item item compare with current item if entry item get Data return item recurse over children Table Tree Item items item get Items for int i 0 i items length i Table Tree Item child Item items i Table Tree Item find Item find Item entry child Item if find Item null return find Item return null  TableTreeItem TableTreeItem findItem IPropertySheetEntry TableTreeItem getData TableTreeItem getItems TableTreeItem childItem TableTreeItem findItem findItem childItem findItem findItem
Notifies all registered cell editor activation listeners of a cell editor activation param activated Cell Editor the activated cell editor private void fire Cell Editor Activated Cell Editor activated Cell Editor Object listeners activation Listeners get Listeners for int i 0 i listeners length i I Cell Editor Activation Listener listeners i cell Editor Activated activated Cell Editor  activatedCellEditor fireCellEditorActivated CellEditor activatedCellEditor activationListeners getListeners ICellEditorActivationListener cellEditorActivated activatedCellEditor
Notifies all registered cell editor activation listeners of a cell editor deactivation param activated Cell Editor the deactivated cell editor private void fire Cell Editor Deactivated Cell Editor activated Cell Editor Object listeners activation Listeners get Listeners for int i 0 i listeners length i I Cell Editor Activation Listener listeners i cell Editor Deactivated activated Cell Editor  activatedCellEditor fireCellEditorDeactivated CellEditor activatedCellEditor activationListeners getListeners ICellEditorActivationListener cellEditorDeactivated activatedCellEditor
Returns the active cell editor of this property sheet viewer or code null code if no cell editor is active return the active cell editor public Cell Editor get Active Cell Editor return cell Editor  CellEditor getActiveCellEditor cellEditor
Returns the children of the given category or entry param node a category or entry return the children of the given category or entry element type code I Property Sheet Entry code or code Property Sheet Category code private List get Children Object node cast the entry or category I Property Sheet Entry entry null Property Sheet Category category null if node instanceof I Property Sheet Entry entry I Property Sheet Entry node else category Property Sheet Category node get the child entries or categories List children if category null children get Children entry else children get Children category return children  IPropertySheetEntry PropertySheetCategory getChildren IPropertySheetEntry PropertySheetCategory IPropertySheetEntry IPropertySheetEntry PropertySheetCategory getChildren getChildren
Returns the child entries of the given entry param entry The entry to search return the children of the given entry element type code I Property Sheet Entry code private List get Children I Property Sheet Entry entry if the entry is the root and we are showing categories and we have more than the defualt category return the categories if entry root Entry is Showing Categories if categories length 1 categories length 1 categories 0 get Category Name equals MISCELLANEOUS CATEGORY NAME return Arrays as List categories return the filtered child entries return get Filtered Entries entry get Child Entries  IPropertySheetEntry getChildren IPropertySheetEntry rootEntry isShowingCategories getCategoryName MISCELLANEOUS_CATEGORY_NAME asList getFilteredEntries getChildEntries
Returns the child entries of the given category param category The category to search return the children of the given category element type code I Property Sheet Entry code private List get Children Property Sheet Category category return get Filtered Entries category get Child Entries  IPropertySheetEntry getChildren PropertySheetCategory getFilteredEntries getChildEntries
non Javadoc Method declared on Viewer public Control get Control return table Tree  getControl tableTree
Returns the entries which match the current filter param entries the entries to filter return the entries which match the current filter element type code I Property Sheet Entry code private List get Filtered Entries I Property Sheet Entry entries if no filter just return all entries if is Showing Expert Properties return Arrays as List entries check each entry for the filter List filtered Entries new Array List entries length for int i 0 i entries length i String filters entries i get Filters boolean expert false if filters null for int j 0 j filters length j if filters j equals I Property Sheet Entry FILTER ID EXPERT expert true break if expert filtered Entries add entries i return filtered Entries  IPropertySheetEntry getFilteredEntries IPropertySheetEntry isShowingExpertProperties asList filteredEntries ArrayList getFilters IPropertySheetEntry FILTER_ID_EXPERT filteredEntries filteredEntries
The code Property Sheet Viewer code implementation of this method declared on code I Input Provider code returns the objects for which the viewer is currently showing properties It returns an code Object code or code null code public Object get Input return input  PropertySheetViewer IInputProvider getInput
Returns the root entry for this property sheet viewer The root entry is not visible in the viewer return the root entry or code null code public I Property Sheet Entry get Root Entry return root Entry  IPropertySheetEntry getRootEntry rootEntry
The code Property Sheet Viewer code implementation of this code I Selection Provider code method returns the result as a code Structured Selection code p Note that this method only includes code I Property Sheet Entry code in the selection no categories p public I Selection get Selection if table Tree get Selection Count 0 return Structured Selection EMPTY Table Tree Item sel table Tree get Selection List entries new Array List sel length for int i 0 i sel length i Table Tree Item ti sel i Object data ti get Data if data instanceof I Property Sheet Entry entries add data return new Structured Selection entries  PropertySheetViewer ISelectionProvider StructuredSelection IPropertySheetEntry ISelection getSelection tableTree getSelectionCount StructuredSelection TableTreeItem tableTree getSelection ArrayList TableTreeItem getData IPropertySheetEntry StructuredSelection
Selection in the viewer occurred Check if there is an active cell editor If yes deactivate it and check if a new cell editor must be activated param selection the Table Tree Item that is selected private void handle Select Table Tree Item selection deactivate the current cell editor if cell Editor null apply Editor Value deactivate Cell Editor get the new selection Table Tree Item sel new Table Tree Item selection if sel length 0 set Message null set Error Message null else Object object sel 0 get Data assume single selection if object instanceof I Property Sheet Entry get the entry for this item I Property Sheet Entry active Entry I Property Sheet Entry object display the description for the item set Message active Entry get Description activate a cell editor on the selection activate Cell Editor sel 0 entry Selection Changed  TableTreeItem handleSelect TableTreeItem cellEditor applyEditorValue deactivateCellEditor TableTreeItem TableTreeItem setMessage setErrorMessage getData IPropertySheetEntry IPropertySheetEntry activeEntry IPropertySheetEntry setMessage activeEntry getDescription activateCellEditor entrySelectionChanged
The expand icon for a node in this viewer has been selected to collapse a subtree Deactivate the cell editor param event the SWT tree event private void handle Tree Collapse Tree Event event if cell Editor null apply Editor Value deactivate Cell Editor  handleTreeCollapse TreeEvent cellEditor applyEditorValue deactivateCellEditor
The expand icon for a node in this viewer has been selected to expand the subtree Create the children 1 level deep p Note that we use a dummy item no user data to show a icon beside an item which has children before the item is expanded now that it is being expanded we have to create the real child items p param event the SWT tree event private void handle Tree Expand Tree Event event create Children event item  handleTreeExpand TreeEvent createChildren
Hides the categories package void hide Categories is Showing Categories false categories null refresh  hideCategories isShowingCategories
Hides the expert properties package void hide Expert is Showing Expert Properties false refresh  hideExpert isShowingExpertProperties
activation table Tree add Selection Listener new Selection Adapter public void widget Default Selected Selection Event e handle Select Table Tree Item e item  tableTree addSelectionListener SelectionAdapter widgetDefaultSelected SelectionEvent handleSelect TableTreeItem
table Tree get Table add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event event only activate if there is a cell editor Point pt new Point event x event y Table Tree Item item table Tree get Item pt if item null handle Select item  tableTree getTable addMouseListener MouseAdapter mouseDown MouseEvent TableTreeItem tableTree getItem handleSelect
allows for lazy creation of children table Tree add Tree Listener new Tree Listener public void tree Expanded final Tree Event event handle Tree Expand event  tableTree addTreeListener TreeListener treeExpanded TreeEvent handleTreeExpand
handle Tree Expand event public void tree Collapsed final Tree Event event handle Tree Collapse event  handleTreeExpand treeCollapsed TreeEvent handleTreeCollapse
table Tree get Table add Key Listener new Key Adapter public void key Released Key Event e if e character SWT ESC deactivate Cell Editor else if e key Code SWT F5 The following will simulate a reselect set Input get Input  tableTree getTable addKeyListener KeyAdapter keyReleased KeyEvent deactivateCellEditor keyCode setInput getInput
Establish this viewer as a listener on the control private void hook Control Handle selections in the Table Tree Part1 Double click only allow traversal via keyboard without activation table Tree add Selection Listener new Selection Adapter public void widget Default Selected Selection Event e handle Select Table Tree Item e item Part2 handle single click activation of cell editor table Tree get Table add Mouse Listener new Mouse Adapter public void mouse Down Mouse Event event only activate if there is a cell editor Point pt new Point event x event y Table Tree Item item table Tree get Item pt if item null handle Select item Add a tree listener to expand and collapse which allows for lazy creation of children table Tree add Tree Listener new Tree Listener public void tree Expanded final Tree Event event handle Tree Expand event public void tree Collapsed final Tree Event event handle Tree Collapse event Refresh the table when F5 pressed table Tree get Table add Key Listener new Key Adapter public void key Released Key Event e if e character SWT ESC deactivate Cell Editor else if e key Code SWT F5 The following will simulate a reselect set Input get Input  hookControl TableTree tableTree addSelectionListener SelectionAdapter widgetDefaultSelected SelectionEvent handleSelect TableTreeItem tableTree getTable addMouseListener MouseAdapter mouseDown MouseEvent TableTreeItem tableTree getItem handleSelect tableTree addTreeListener TreeListener treeExpanded TreeEvent handleTreeExpand treeCollapsed TreeEvent handleTreeCollapse tableTree getTable addKeyListener KeyAdapter keyReleased KeyEvent deactivateCellEditor keyCode setInput getInput
Updates all of the items in the tree p Note that this means ensuring that the tree items reflect the state of the model entry tree it does not mean telling the model to update itself p public void refresh if root Entry null update Children Of root Entry table Tree  rootEntry updateChildrenOf rootEntry tableTree
Removes the given cell editor activation listener from this viewer Has no effect if an identical activation listener is not registered param listener a cell editor activation listener package void remove Activation Listener I Cell Editor Activation Listener listener activation Listeners remove listener  removeActivationListener ICellEditorActivationListener activationListeners
Remove the given item from the table tree Remove our listener if the item s user data is a an entry then set the user data to null param item the item to remove private void remove Item Table Tree Item item Object data item get Data if data instanceof I Property Sheet Entry I Property Sheet Entry data remove Property Sheet Entry Listener entry Listener item set Data null item dispose  removeItem TableTreeItem getData IPropertySheetEntry IPropertySheetEntry removePropertySheetEntryListener entryListener setData
Reset the selected properties to their default values public void reset Properties Determine the selection I Structured Selection selection I Structured Selection get Selection Iterate over entries and reset them Iterator enum selection iterator while enum has Next I Property Sheet Entry enum next reset Property Value  resetProperties IStructuredSelection IStructuredSelection getSelection hasNext IPropertySheetEntry resetPropertyValue
Sets the error message to be displayed in the status line param error Message the message to be displayed or code null code private void set Error Message String error Message show the error message if status Line Manager null status Line Manager set Error Message error Message  errorMessage setErrorMessage errorMessage statusLineManager statusLineManager setErrorMessage errorMessage
The code Property Sheet Viewer code implementation of this method declared on code Viewer code method sets the objects for which the viewer is currently showing properties p The input must be an code Object code or code null code p param new Input the input of this viewer or code null code if none public void set Input Object new Input need to save any changed value when user clicks elsewhere apply Editor Value deactivate our cell editor deactivate Cell Editor set the new input to the root entry input Object new Input if input null input new Object 0 if root Entry null root Entry set Values input ensure first level children are visible update Children Of root Entry table Tree  PropertySheetViewer newInput setInput newInput applyEditorValue deactivateCellEditor newInput rootEntry rootEntry setValues updateChildrenOf rootEntry tableTree
Sets the message to be displayed in the status line This message is displayed when there is no error message param message the message to be displayed or code null code private void set Message String message show the message if status Line Manager null status Line Manager set Message message  setMessage statusLineManager statusLineManager setMessage
Sets the root entry for this property sheet viewer The root entry is not visible in the viewer param root the root entry public void set Root Entry I Property Sheet Entry root If we have a root entry remove our entry listener if root Entry null root Entry remove Property Sheet Entry Listener entry Listener root Entry root Set the root as user data on the table Tree table Tree set Data root Entry Add an I Property Sheet Entry Listener to listen for entry change notifications root Entry add Property Sheet Entry Listener entry Listener Pass our input to the root this will trigger entry change callbacks to update this viewer set Input input  setRootEntry IPropertySheetEntry rootEntry rootEntry removePropertySheetEntryListener entryListener rootEntry tableTree tableTree setData rootEntry IPropertySheetEntryListener rootEntry addPropertySheetEntryListener entryListener setInput
see org eclipse jface viewers Viewer set Selection org eclipse jface viewers I Selection boolean public void set Selection I Selection selection boolean reveal Do nothing by default  setSelection ISelection setSelection ISelection
Sets the status line manager this view will use to show messages param manager the status line manager public void set Status Line Manager I Status Line Manager manager status Line Manager manager  setStatusLineManager IStatusLineManager statusLineManager
Shows the categories package void show Categories is Showing Categories true refresh  showCategories isShowingCategories
Shows the expert properties package void show Expert is Showing Expert Properties true refresh  showExpert isShowingExpertProperties
Collator coll Collator get Instance Locale get Default public int compare Object a Object b Property Sheet Category c1 c2 String dname1 dname2 c1 Property Sheet Category a dname1 c1 get Category Name c2 Property Sheet Category b dname2 c2 get Category Name return coll compare dname1 dname2  getInstance getDefault PropertySheetCategory PropertySheetCategory getCategoryName PropertySheetCategory getCategoryName
Updates the categories Reuses old categories if possible private void update Categories lazy initialize if categories null categories new Property Sheet Category 0 get all the filtered child entries of the root List child Entries get Filtered Entries root Entry get Child Entries if the list is empty just set an empty categories array if child Entries size 0 categories new Property Sheet Category 0 return cache old categories by their descriptor name Map category Cache new Hash Map categories length 2 1 for int i 0 i categories length i categories i remove All Entries category Cache put categories i get Category Name categories i create a list of categories to get rid of List categories To Remove new Array List Arrays as List categories Determine the categories Property Sheet Category misc Property Sheet Category category Cache get MISCELLANEOUS CATEGORY NAME if misc null misc new Property Sheet Category MISCELLANEOUS CATEGORY NAME boolean add Misc false for int i 0 i child Entries size i I Property Sheet Entry child Entry I Property Sheet Entry child Entries get i String category Name child Entry get Category if category Name null misc add Entry child Entry add Misc true categories To Remove remove misc else Property Sheet Category category Property Sheet Category category Cache get category Name if category null category new Property Sheet Category category Name category Cache put category Name category else categories To Remove remove category category add Entry child Entry Add the PSE MISC category if it has entries if add Misc category Cache put MISCELLANEOUS CATEGORY NAME misc Sort the categories List list new Array List category Cache values for int i 0 i categories To Remove size i list remove categories To Remove get i Collections sort list new Comparator Collator coll Collator get Instance Locale get Default public int compare Object a Object b Property Sheet Category c1 c2 String dname1 dname2 c1 Property Sheet Category a dname1 c1 get Category Name c2 Property Sheet Category b dname2 c2 get Category Name return coll compare dname1 dname2 categories Property Sheet Category list to Array new Property Sheet Category list size  updateCategories PropertySheetCategory childEntries getFilteredEntries rootEntry getChildEntries childEntries PropertySheetCategory categoryCache HashMap removeAllEntries categoryCache getCategoryName categoriesToRemove ArrayList asList PropertySheetCategory PropertySheetCategory categoryCache MISCELLANEOUS_CATEGORY_NAME PropertySheetCategory MISCELLANEOUS_CATEGORY_NAME addMisc childEntries IPropertySheetEntry childEntry IPropertySheetEntry childEntries categoryName childEntry getCategory categoryName addEntry childEntry addMisc categoriesToRemove PropertySheetCategory PropertySheetCategory categoryCache categoryName PropertySheetCategory categoryName categoryCache categoryName categoriesToRemove addEntry childEntry PSE_MISC addMisc categoryCache MISCELLANEOUS_CATEGORY_NAME ArrayList categoryCache categoriesToRemove categoriesToRemove getInstance getDefault PropertySheetCategory PropertySheetCategory getCategoryName PropertySheetCategory getCategoryName PropertySheetCategory toArray PropertySheetCategory
Update the category but not its parent or children param category the category to update param item the tree item for the given entry private void update Category Property Sheet Category category Table Tree Item item ensure that backpointer is correct item set Data category Update the name and value columns item set Text 0 category get Category Name item set Text 1 NON NLS 1 update the icon if category get Auto Expand we auto expand categories when they first appear create Children item item set Expanded true category set Auto Expand false else we do not want to auto expand categories if the user has collpased them update Plus category item  updateCategory PropertySheetCategory TableTreeItem setData setText getCategoryName setText getAutoExpand createChildren setExpanded setAutoExpand updatePlus
Update the child entries or categories of the given entry or category If the given node is the root entry and we are showing categories then the child entries are categories otherwise they are entries param node the entry or category whose children we will update param widget the widget for the given entry either a code Table Tree code if the node is the root node or a code Table Tree Item code otherwise private void update Children Of Object node Widget widget cast the entry or category I Property Sheet Entry entry null Property Sheet Category category null if node instanceof I Property Sheet Entry entry I Property Sheet Entry node else category Property Sheet Category node get the current child table tree items Table Tree Item item null Table Tree Item child Items if node root Entry child Items table Tree get Items else item Table Tree Item widget child Items item get Items optimization prune collapsed subtrees if item null item get Expanded remove all children for int i 0 i child Items length i if child Items i get Data null remove Item child Items i append a dummy if necessary if category null entry has Child Entries may already have a dummy its is either a category which always has at least one child or an entry with chidren Note that this test is not perfect if we have filtering on then there in fact may be no entires to show when the user presses the expand icon But this is an acceptable compromise if child Items length 1 child Items 0 get Data null if already a dummy do nothing new Table Tree Item item SWT NULL return get the child entries or categories if node root Entry is Showing Categories update the categories update Categories List children get Children node remove items Set set new Hash Set child Items length 2 1 for int i 0 i child Items length i Object data child Items i get Data if data null Object e data int ix children index Of e if ix 0 not found remove Item child Items i else found set add e else if data null the dummy item dispose WORKAROUND int old Cnt 1 if widget table Tree old Cnt table Tree get Item Count add new items int new Size children size for int i 0 i new Size i Object el children get i if set contains el create Item el widget i WORKAROUND if widget table Tree old Cnt 0 table Tree get Item Count 1 table Tree set Redraw false table Tree set Redraw true get the child table tree items after our changes if entry root Entry child Items table Tree get Items else child Items item get Items update the child items This ensures that the children are in the correct order are showing the correct values for int i 0 i new Size i Object el children get i if el instanceof I Property Sheet Entry update Entry I Property Sheet Entry el child Items i else update Category Property Sheet Category el child Items i update Children Of el child Items i The tree s original selection may no longer apply after the update so fire the selection changed event entry Selection Changed  TableTree TableTreeItem updateChildrenOf IPropertySheetEntry PropertySheetCategory IPropertySheetEntry IPropertySheetEntry PropertySheetCategory TableTreeItem TableTreeItem childItems rootEntry childItems tableTree getItems TableTreeItem childItems getItems getExpanded childItems childItems getData removeItem childItems hasChildEntries childItems childItems getData TableTreeItem rootEntry isShowingCategories updateCategories getChildren HashSet childItems childItems childItems getData indexOf removeItem childItems oldCnt tableTree oldCnt tableTree getItemCount newSize newSize createItem tableTree oldCnt tableTree getItemCount tableTree setRedraw tableTree setRedraw rootEntry childItems tableTree getItems childItems getItems newSize IPropertySheetEntry updateEntry IPropertySheetEntry childItems updateCategory PropertySheetCategory childItems updateChildrenOf childItems entrySelectionChanged
Update the given entry but not its children or parent param entry the entry we will update param item the tree item for the given entry private void update Entry I Property Sheet Entry entry Table Tree Item item ensure that backpointer is correct item set Data entry update the name and value columns item set Text 0 entry get Display Name item set Text 1 entry get Value As String Image image entry get Image if item get Image 1 image item set Image 1 image update the icon update Plus entry item  updateEntry IPropertySheetEntry TableTreeItem setData setText getDisplayName setText getValueAsString getImage getImage setImage updatePlus
Updates the icon of the tree item from the given entry or category param node the entry or category param item the table tree item being updated private void update Plus Object node Table Tree Item item cast the entry or category I Property Sheet Entry entry null Property Sheet Category category null if node instanceof I Property Sheet Entry entry I Property Sheet Entry node else category Property Sheet Category node boolean has Plus item get Item Count 0 boolean needs Plus category null entry has Child Entries boolean remove All false boolean add Dummy false if has Plus needs Plus if needs Plus add Dummy true else remove All true if remove All remove all children Table Tree Item items item get Items for int i 0 i items length i remove Item items i if add Dummy new Table Tree Item item SWT NULL append a dummy to create the plus sign  updatePlus TableTreeItem IPropertySheetEntry PropertySheetCategory IPropertySheetEntry IPropertySheetEntry PropertySheetCategory hasPlus getItemCount needsPlus hasChildEntries removeAll addDummy hasPlus needsPlus needsPlus addDummy removeAll removeAll TableTreeItem getItems removeItem addDummy TableTreeItem

Creates a Property Source and stores its I Resource param res the resource for which this is a property source public Resource Property Source I Resource res this element res  PropertySource IResource ResourcePropertySource IResource
Return the value for the date String for the timestamp of the supplied resource return String param I Resource the resource to query private String get Date String Value I Resource resource if resource is Local I Resource DEPTH ZERO return NOT LOCAL TEXT I Path location resource get Location if location null if resource is Linked return UNDEFINED PATH VARIABLE return FILE NOT FOUND else File local File location to File if local File exists Date Format format new Simple Date Format return format format new Date local File last Modified return FILE NOT FOUND  IResource getDateStringValue IResource isLocal IResource DEPTH_ZERO NOT_LOCAL_TEXT IPath getLocation isLinked UNDEFINED_PATH_VARIABLE FILE_NOT_FOUND localFile toFile localFile DateFormat SimpleDateFormat localFile lastModified FILE_NOT_FOUND
Method declared on I Property Source public Object get Editable Value return this  IPropertySource getEditableValue
Get the location of a resource private String get Location Text I Resource resource if resource is Local I Resource DEPTH ZERO return NOT LOCAL TEXT I Path resolved Location resource get Location I Path location resolved Location if resource is Linked location resource get Raw Location if location null return FILE NOT FOUND else String location String location toOS String if resolved Location null is Path Variable resource No path variable used Display the file not exist message in the location Fixes bug 33318 File file resolved Location to File if file exists location String FILE NOT EXIST TEXT NON NLS 1 return location String  getLocationText IResource isLocal IResource DEPTH_ZERO NOT_LOCAL_TEXT IPath resolvedLocation getLocation IPath resolvedLocation isLinked getRawLocation FILE_NOT_FOUND locationString toOSString resolvedLocation isPathVariable resolvedLocation toFile locationString FILE_NOT_EXIST_TEXT locationString
Get the resolved location of a resource This resolves path variables if present in the resource path private String get Resolved Location Text I Resource resource if resource is Local I Resource DEPTH ZERO return NOT LOCAL TEXT I Path location resource get Location if location null if resource is Linked return UNDEFINED PATH VARIABLE return FILE NOT FOUND else String location String location toOS String File file location to File if file exists location String FILE NOT EXIST TEXT NON NLS 1 return location String  getResolvedLocationText IResource isLocal IResource DEPTH_ZERO NOT_LOCAL_TEXT IPath getLocation isLinked UNDEFINED_PATH_VARIABLE FILE_NOT_FOUND locationString toOSString toFile locationString FILE_NOT_EXIST_TEXT locationString
public I Property Descriptor get Property Descriptors if is Path Variable element return property Descriptors Link Variable else return property Descriptors  IPropertyDescriptor getPropertyDescriptors isPathVariable propertyDescriptorsLinkVariable propertyDescriptors
public Object get Property Value Object name if name equals I Basic Property Constants P TEXT return element get Name if name equals I Resource Property Constants P PATH RES return element get Full Path to String if name equals I Resource Property Constants P LAST MODIFIED RES return get Date String Value element if name equals I Resource Property Constants P EDITABLE RES if element is Read Only return IDE Properties Messages get String Resource Property false NON NLS 1 else return IDE Properties Messages get String Resource Property true NON NLS 1 if name equals I Resource Property Constants P DERIVED RES return String value Of element is Derived if name equals I Resource Property Constants P LINKED RES return String value Of element is Linked if name equals I Resource Property Constants P LOCATION RES return get Location Text element if name equals I Resource Property Constants P RESOLVED LOCATION RES return get Resolved Location Text element return null  getPropertyValue IBasicPropertyConstants P_TEXT getName IResourcePropertyConstants P_PATH_RES getFullPath toString IResourcePropertyConstants P_LAST_MODIFIED_RES getDateStringValue IResourcePropertyConstants P_EDITABLE_RES isReadOnly IDEPropertiesMessages getString ResourceProperty IDEPropertiesMessages getString ResourceProperty IResourcePropertyConstants P_DERIVED_RES valueOf isDerived IResourcePropertyConstants P_LINKED_RES valueOf isLinked IResourcePropertyConstants P_LOCATION_RES getLocationText IResourcePropertyConstants P_RESOLVED_LOCATION_RES getResolvedLocationText
Returns whether the given resource is a linked resource bound to a path variable param resource resource to test return boolean code true code the given resource is a linked resource bound to a path variable code false code the given resource is either not a linked resource or it is not using a path variable private boolean is Path Variable I Resource resource if resource is Linked return false I Path resolved Location resource get Location if resolved Location null missing path variable return true I Path raw Location resource get Raw Location if resolved Location equals raw Location return false return true  isPathVariable IResource isLinked IPath resolvedLocation getLocation resolvedLocation IPath rawLocation getRawLocation resolvedLocation rawLocation
Method declared on I Property Source public boolean is Property Set Object property return false  IPropertySource isPropertySet
The code Resource Property Source code implementation of this code I Property Source code method does nothing since all properties are read only  ResourcePropertySource IPropertySource
public void reset Property Value Object property The code Resource Property Source code implementation of this code I Property Source code method does nothing since all properties are read only public void set Property Value Object name Object value  resetPropertyValue ResourcePropertySource IPropertySource setPropertyValue
Get the java io File equivalent of the passed I File If the location does not exist then return code null code param resource the resource to lookup return java io File or code null code protected File get File I Resource resource I Path location resource get Location if location null return null else return location to File  IFile getFile IResource IPath getLocation toFile

public class Text Property Descriptor extends Property Descriptor Creates an property descriptor with the given id and display name param id the id of the property param display Name the name to display for the property public Text Property Descriptor Object id String display Name super id display Name  TextPropertyDescriptor PropertyDescriptor displayName TextPropertyDescriptor displayName displayName
The code Text Property Descriptor code implementation of this code I Property Descriptor code method creates and returns a new code Text Cell Editor code p The editor is configured with the current validator if there is one p public Cell Editor create Property Editor Composite parent Cell Editor editor new Text Cell Editor parent if get Validator null editor set Validator get Validator return editor  TextPropertyDescriptor IPropertyDescriptor TextCellEditor CellEditor createPropertyEditor CellEditor TextCellEditor getValidator setValidator getValidator

class Copy Task Action extends Task Action Creates the action public Copy Task Action Task List tasklist String id super tasklist id Workbench Help set Help this I Task List Help Context Ids COPY TASK ACTION  CopyTaskAction TaskAction CopyTaskAction TaskList WorkbenchHelp setHelp ITaskListHelpContextIds COPY_TASK_ACTION
Performs this action public void run Get the selected markers Task List task List get Task List Table Viewer viewer task List get Table Viewer I Structured Selection selection I Structured Selection viewer get Selection if selection is Empty return task List cancel Editing List list selection to List I Marker markers new I Marker list size list to Array markers set Clipboard markers Task List create Marker Report markers Update paste enablement task List update Paste Enablement  TaskList taskList getTaskList TableViewer taskList getTableViewer IStructuredSelection IStructuredSelection getSelection isEmpty taskList cancelEditing toList IMarker IMarker toArray setClipboard TaskList createMarkerReport taskList updatePasteEnablement
private void set Clipboard I Marker markers String marker Report try Place the markers on the clipboard Object data new Object markers marker Report Transfer transfer Types new Transfer Marker Transfer get Instance Text Transfer get Instance set the clipboard contents get Task List get Clipboard set Contents data transfer Types catch SWT Error e if e code DND ERROR CANNOT SET CLIPBOARD throw e if Message Dialog open Question get Shell Task List Messages get String Copy To Clipboard Problem Dialog title Task List Messages get String Copy To Clipboard Problem Dialog message NON NLS 1 NON NLS 2 set Clipboard markers marker Report  setClipboard IMarker markerReport markerReport transferTypes MarkerTransfer getInstance TextTransfer getInstance getTaskList getClipboard setContents transferTypes SWTError ERROR_CANNOT_SET_CLIPBOARD MessageDialog openQuestion getShell TaskListMessages getString CopyToClipboardProblemDialog TaskListMessages getString CopyToClipboardProblemDialog setClipboard markerReport

Constructor for Default Task List Resource Adapter Default Task List Resource Adapter super  DefaultTaskListResourceAdapter DefaultTaskListResourceAdapter
Return the default instance used for Task List adapting static I Task List Resource Adapter get Default if singleton null singleton new Default Task List Resource Adapter return singleton  TaskList ITaskListResourceAdapter getDefault DefaultTaskListResourceAdapter
public I Resource get Affected Resource I Adaptable adaptable I Resource resource I Resource adaptable get Adapter I Resource class if resource null return I File adaptable get Adapter I File class else return resource  IResource getAffectedResource IAdaptable IResource IResource getAdapter IResource IFile getAdapter IFile

Creates the action public Filters Action Task List tasklist String id super tasklist id Workbench Help set Help this I Task List Help Context Ids FILTERS ACTION  FiltersAction TaskList WorkbenchHelp setHelp ITaskListHelpContextIds FILTERS_ACTION
Performs this action public void run Filters Dialog dialog new Filters Dialog get Shell Tasks Filter filter get Task List get Filter dialog set Filter filter int result dialog open if result Filters Dialog OK get Task List filter Changed  FiltersDialog FiltersDialog getShell TasksFilter getTaskList getFilter setFilter FiltersDialog getTaskList filterChanged

Enum Value int value String text Image image this value value this text text this image image  EnumValue
this image image int get Value return value  getValue
return value String get Text return text  getText
return text Image get Image return image  getImage
private Enum Value values Enum Type Enum Value values this values values  EnumValue EnumType EnumValue
this values values Enum Value get Values return values  EnumValue getValues
Checkbox Enum Group Composite parent String text Enum Type type this type type although not needed for layout this composite is needed to get the tab order right Composite enable Composite new Composite parent SWT NONE enable Composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL enable Composite set Layout new Fill Layout enable Button new Button enable Composite SWT CHECK enable Button add Selection Listener selection Listener enable Button set Text text Composite value Composite new Composite parent SWT NONE value Composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL value Composite set Layout new Fill Layout Enum Value values type get Values value Buttons new Button values length for int i 0 i values length i Button value Button new Button value Composite SWT CHECK value Button set Text values i get Text value Buttons i value Button  CheckboxEnumGroup EnumType enableComposite enableComposite setLayoutData GridData GridData FILL_HORIZONTAL enableComposite setLayout FillLayout enableButton enableComposite enableButton addSelectionListener selectionListener enableButton setText valueComposite valueComposite setLayoutData GridData GridData FILL_HORIZONTAL valueComposite setLayout FillLayout EnumValue getValues valueButtons valueButton valueComposite valueButton setText getText valueButtons valueButton
boolean get Enabled return enable Button get Enabled  getEnabled enableButton getEnabled
void set Enabled boolean enabled enable Button set Enabled enabled update Enabled State  setEnabled enableButton setEnabled updateEnabledState
boolean get Selection return enable Button get Selection  getSelection enableButton getSelection
void set Selection boolean selected enable Button set Selection selected update Enabled State  setSelection enableButton setSelection updateEnabledState
void update Enabled State boolean enabled enable Button is Enabled enable Button get Selection for int i 0 i value Buttons length i value Buttons i set Enabled enabled  updateEnabledState enableButton isEnabled enableButton getSelection valueButtons valueButtons setEnabled
int get Value Mask int mask 0 Enum Value values type get Values for int i 0 i value Buttons length i if value Buttons i get Selection mask 1 values i get Value return mask  getValueMask EnumValue getValues valueButtons valueButtons getSelection getValue
void set Value Mask int mask Enum Value values type get Values for int i 0 i values length i value Buttons i set Selection mask 1 values i get Value 0  setValueMask EnumValue getValues valueButtons setSelection getValue
Label Combo Text Group Composite parent String label Text String combo Strings String initial Text int width Hint Font font parent get Font Composite group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 Set the margin width to 0 in order to line up with other items layout margin Width 0 group set Layout layout group set Font font label new Label group SWT NONE label set Text label Text label set Font font combo create Combo group combo Strings 0 text new Text parent SWT SINGLE SWT BORDER Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL grid Data width Hint width Hint text set Layout Data grid Data text set Font font text set Text initial Text  LabelComboTextGroup labelText comboStrings initialText widthHint getFont GridLayout GridLayout numColumns marginWidth setLayout setFont setText labelText setFont createCombo comboStrings GridData gridData GridData GridData FILL_HORIZONTAL gridData widthHint widthHint setLayoutData gridData setFont setText initialText
private Button button Creates the working set filter selection widgets param parent the parent composite of the working set widgets Working Set Group Composite parent radio button has to be part of main radio button group button create Radio Button parent Task List Messages get String Task List no Working Set NON NLS 1 Grid Data data new Grid Data Grid Data FILL HORIZONTAL button set Layout Data data Composite composite new Composite parent SWT NONE composite set Font parent get Font Grid Layout layout new Grid Layout Button radio new Button parent SWT RADIO layout margin Width radio compute Size SWT DEFAULT SWT DEFAULT x layout margin Height 0 radio dispose composite set Layout layout create Button composite SELECT ID Task List Messages get String Task List working Set Select false NON NLS 1  WorkingSetGroup createRadioButton TaskListMessages getString TaskList noWorkingSet GridData GridData GridData FILL_HORIZONTAL setLayoutData setFont getFont GridLayout GridLayout marginWidth computeSize marginHeight setLayout createButton SELECT_ID TaskListMessages getString TaskList workingSetSelect
Returns wether or not a working set filter should be used return true a working set filter should be used false a working set filter should not be used boolean get Selection return button get Selection  getSelection getSelection
Returns the selected working set filter or null if none is selected return the selected working set filter or null if none is selected I Working Set get Working Set return I Working Set button get Data  IWorkingSet getWorkingSet IWorkingSet getData
Sets the working set filter selection param selected true a working set filter should be used false no working set filter should be used void set Selection boolean selected button set Selection selected if selected any Resource Button set Selection false any Resource In Same Project Button set Selection false selected Resource Button set Selection false selected Resource And Children Button set Selection false  setSelection setSelection anyResourceButton setSelection anyResourceInSameProjectButton setSelection selectedResourceButton setSelection selectedResourceAndChildrenButton setSelection
Opens the working set selection dialog void select Pressed I Working Set Selection Dialog dialog PlatformUI get Workbench get Working Set Manager create Working Set Selection Dialog get Shell false I Working Set working Set get Working Set if working Set null dialog set Selection new I Working Set working Set if dialog open Window OK I Working Set result dialog get Selection if result null result length 0 set Working Set result 0 else set Working Set null if get Selection false set Selection true  selectPressed IWorkingSetSelectionDialog getWorkbench getWorkingSetManager createWorkingSetSelectionDialog getShell IWorkingSet workingSet getWorkingSet workingSet setSelection IWorkingSet workingSet IWorkingSet getSelection setWorkingSet setWorkingSet getSelection setSelection
Sets the specified working set param working Set the working set void set Working Set I Working Set working Set button set Data working Set if working Set null button set Text Task List Messages format Task List working Set NON NLS 1 new Object working Set get Name else button set Text Task List Messages get String Task List no Working Set NON NLS 1  workingSet setWorkingSet IWorkingSet workingSet setData workingSet workingSet setText TaskListMessages TaskList workingSet workingSet getName setText TaskListMessages getString TaskList noWorkingSet
Selection Listener selection Listener new Selection Adapter public void widget Selected Selection Event e Filters Dialog this widget Selected e  SelectionListener selectionListener SelectionAdapter widgetSelected SelectionEvent FiltersDialog widgetSelected
private I Check State Listener check State Listener new I Check State Listener public void check State Changed Check State Changed Event event Filters Dialog this check State Changed event  ICheckStateListener checkStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent FiltersDialog checkStateChanged
Creates a new filters dialog public Filters Dialog Shell parent Shell super parent Shell init Types  FiltersDialog parentShell parentShell initTypes
protected void button Pressed int button Id if RESET ID button Id reset Pressed else if SELECT ID button Id working Set Group select Pressed else super button Pressed button Id  buttonPressed buttonId RESET_ID buttonId resetPressed SELECT_ID buttonId workingSetGroup selectPressed buttonPressed buttonId
public void check State Changed Check State Changed Event event Marker Type type Marker Type event get Element types Viewer set Subtree Checked type event get Checked Marker Type all Supertypes type get All Supertypes for int i 0 i all Supertypes length i types Viewer set Checked all Supertypes i false update Enabled State  checkStateChanged CheckStateChangedEvent MarkerType MarkerType getElement typesViewer setSubtreeChecked getChecked MarkerType allSupertypes getAllSupertypes allSupertypes typesViewer setChecked allSupertypes updateEnabledState
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text Task List Messages get String Task List filter NON NLS 1 Workbench Help set Help new Shell I Task List Help Context Ids FILTERS DIALOG  configureShell newShell configureShell newShell newShell setText TaskListMessages getString TaskList WorkbenchHelp setHelp newShell ITaskListHelpContextIds FILTERS_DIALOG
Creates the area showing filtering criteria on attribute values param parent the parent composite void create Attributes Area Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout composite set Font parent get Font String filters Task List Messages get String Task List contains Task List Messages get String Task List does Not Contain NON NLS 2 NON NLS 1 description Group new Label Combo Text Group composite Task List Messages get String Task List where Description filters 200 NON NLS 2 NON NLS 1 severity Group new Checkbox Enum Group composite Task List Messages get String Task List severity label severity Type NON NLS 1 priority Group new Checkbox Enum Group composite Task List Messages get String Task List priority label priority Type NON NLS 1 completion Group new Checkbox Enum Group composite Task List Messages get String Task List status label completion Type NON NLS 1  createAttributesArea GridLayout GridLayout numColumns setLayout setFont getFont TaskListMessages getString TaskList TaskListMessages getString TaskList doesNotContain descriptionGroup LabelComboTextGroup TaskListMessages getString TaskList whereDescription severityGroup CheckboxEnumGroup TaskListMessages getString TaskList severityType priorityGroup CheckboxEnumGroup TaskListMessages getString TaskList priorityType completionGroup CheckboxEnumGroup TaskListMessages getString TaskList completionType
void create Reset Area Composite parent Composite composite new Composite parent SWT NONE composite set Font parent get Font composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END Button reset new Button composite SWT PUSH reset set Text Task List Messages get String Task List reset Text NON NLS 1 reset set Data new Integer RESET ID reset add Selection Listener new Selection Adapter public void widget Selected Selection Event event button Pressed Integer event widget get Data int Value reset set Font composite get Font set Button Layout Data reset  createResetArea setFont getFont setLayout GridLayout setLayoutData GridData GridData HORIZONTAL_ALIGN_END setText TaskListMessages getString TaskList resetText setData RESET_ID addSelectionListener SelectionAdapter widgetSelected SelectionEvent buttonPressed getData intValue setFont getFont setButtonLayoutData
Creates a check box button with the given parent and text param parent the parent composite param text the text for the check box param grab Row code true code to grab the remaining horizontal space code false code otherwise return the check box button Button create Checkbox Composite parent String text boolean grab Row Button button new Button parent SWT CHECK if grab Row Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL button set Layout Data grid Data button set Text text button add Selection Listener selection Listener button set Font parent get Font return button  grabRow createCheckbox grabRow grabRow GridData gridData GridData GridData FILL_HORIZONTAL setLayoutData gridData setText addSelectionListener selectionListener setFont getFont
Creates a combo box with the given parent items and selection param parent the parent composite param items the items for the combo box param selection Index the index of the item to select return the combo box Combo create Combo Composite parent String items int selection Index Combo combo new Combo parent SWT DROP DOWN SWT READ ONLY combo set Layout Data new Grid Data Grid Data FILL HORIZONTAL combo set Font parent get Font combo set Items items combo select selection Index combo add Selection Listener selection Listener return combo  selectionIndex createCombo selectionIndex DROP_DOWN READ_ONLY setLayoutData GridData GridData FILL_HORIZONTAL setFont getFont setItems selectionIndex addSelectionListener selectionListener
protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent create Marker Limit Area composite create Types Area composite create Resource Area composite create Attributes Area composite create Reset Area composite create Separator Line composite updateUI From Filter get Filter return composite  createDialogArea createDialogArea createMarkerLimitArea createTypesArea createResourceArea createAttributesArea createResetArea createSeparatorLine updateUIFromFilter getFilter
Creates a separator line above the OK Cancel buttons bar param parent the parent composite void create Separator Line Composite parent Build the separator line Label separator new Label parent SWT HORIZONTAL SWT SEPARATOR Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 1 separator set Layout Data gd  createSeparatorLine GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData
Creates a radio button with the given parent and text param parent the parent composite param text the text for the check box return the radio box button Button create Radio Button Composite parent String text Button button new Button parent SWT RADIO button set Text text button set Font parent get Font button add Selection Listener selection Listener return button  createRadioButton setText setFont getFont addSelectionListener selectionListener
Creates the area showing which resources should be considered param parent the parent composite void create Resource Area Composite parent Composite group new Composite parent SWT NONE group set Layout Data new Grid Data Grid Data FILL HORIZONTAL group set Layout new Grid Layout group set Font parent get Font any Resource Button create Radio Button group Task List Messages get String Task List any Resource NON NLS 1 any Resource In Same Project Button create Radio Button group Task List Messages get String Task List any Resource In Same Project NON NLS 1 added by cagatayk acm org selected Resource Button create Radio Button group Task List Messages get String Task List selected Resource NON NLS 1 selected Resource And Children Button create Radio Button group Task List Messages get String Task List selected And Children NON NLS 1 working Set Group new Working Set Group group  createResourceArea setLayoutData GridData GridData FILL_HORIZONTAL setLayout GridLayout setFont getFont anyResourceButton createRadioButton TaskListMessages getString TaskList anyResource anyResourceInSameProjectButton createRadioButton TaskListMessages getString TaskList anyResourceInSameProject selectedResourceButton createRadioButton TaskListMessages getString TaskList selectedResource selectedResourceAndChildrenButton createRadioButton TaskListMessages getString TaskList selectedAndChildren workingSetGroup WorkingSetGroup
Creates the area showing which marker types should be included param parent the parent composite void create Types Area Composite parent Composite composite new Composite parent SWT NONE composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL Grid Layout layout new Grid Layout composite set Layout layout Label label new Label composite SWT NONE label set Text Task List Messages get String Task List show Items Of Type NON NLS 1 types Viewer new Checkbox Tree Viewer composite Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL grid Data height Hint 100 types Viewer get Control set Layout Data grid Data types Viewer set Content Provider get Content Provider types Viewer set Label Provider get Label Provider types Viewer set Sorter get Sorter types Viewer set Auto Expand Level Abstract Tree Viewer ALL LEVELS types Viewer add Check State Listener check State Listener types Viewer set Input get Marker Types  createTypesArea setLayoutData GridData GridData FILL_HORIZONTAL GridLayout GridLayout setLayout setText TaskListMessages getString TaskList showItemsOfType typesViewer CheckboxTreeViewer GridData gridData GridData GridData FILL_HORIZONTAL gridData heightHint typesViewer getControl setLayoutData gridData typesViewer setContentProvider getContentProvider typesViewer setLabelProvider getLabelProvider typesViewer setSorter getSorter typesViewer setAutoExpandLevel AbstractTreeViewer ALL_LEVELS typesViewer addCheckStateListener checkStateListener typesViewer setInput getMarkerTypes
I Tree Content Provider get Content Provider return new I Tree Content Provider public void input Changed Viewer viewer Object old Input Object new Input  ITreeContentProvider getContentProvider ITreeContentProvider inputChanged oldInput newInput
return new I Tree Content Provider public void input Changed Viewer viewer Object old Input Object new Input public void dispose  ITreeContentProvider inputChanged oldInput newInput
public void dispose public Object get Elements Object input Element return new Object marker Types Model get Type I Marker PROBLEM marker Types Model get Type I Marker TASK  getElements inputElement markerTypesModel getType IMarker markerTypesModel getType IMarker
public Object get Children Object parent Element Marker Type type Marker Type parent Element return type get Subtypes  getChildren parentElement MarkerType MarkerType parentElement getSubtypes
return type get Subtypes public Object get Parent Object element return null  getSubtypes getParent
return null public boolean has Children Object element return get Children element length 0  hasChildren getChildren
I Tree Content Provider get Content Provider return new I Tree Content Provider public void input Changed Viewer viewer Object old Input Object new Input public void dispose public Object get Elements Object input Element return new Object marker Types Model get Type I Marker PROBLEM marker Types Model get Type I Marker TASK public Object get Children Object parent Element Marker Type type Marker Type parent Element return type get Subtypes public Object get Parent Object element return null public boolean has Children Object element return get Children element length 0  ITreeContentProvider getContentProvider ITreeContentProvider inputChanged oldInput newInput getElements inputElement markerTypesModel getType IMarker markerTypesModel getType IMarker getChildren parentElement MarkerType MarkerType parentElement getSubtypes getParent hasChildren getChildren
void create Marker Limit Area Composite parent Font font parent get Font Composite composite new Composite parent SWT NONE composite set Layout Data new Grid Data Grid Data FILL HORIZONTAL composite set Font font Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout filter On Marker Limit create Checkbox composite Task List Messages get String Task List limit Visible Tasks To false NON NLS 1 filter On Marker Limit set Layout Data new Grid Data marker Limit new Text composite SWT SINGLE SWT BORDER marker Limit set Text Limit 6 Grid Data grid Data new Grid Data grid Data width Hint convert Width In Chars To Pixels 10 marker Limit set Layout Data grid Data marker Limit set Font font  createMarkerLimitArea getFont setLayoutData GridData GridData FILL_HORIZONTAL setFont GridLayout GridLayout numColumns setLayout filterOnMarkerLimit createCheckbox TaskListMessages getString TaskList limitVisibleTasksTo filterOnMarkerLimit setLayoutData GridData markerLimit markerLimit setTextLimit GridData gridData GridData gridData widthHint convertWidthInCharsToPixels markerLimit setLayoutData gridData markerLimit setFont
Returns the filter which this dialog is configuring return the filter public Tasks Filter get Filter if filter null filter new Tasks Filter return filter  TasksFilter getFilter TasksFilter
I Label Provider get Label Provider return new Label Provider public String get Text Object element Marker Type type Marker Type element return type get Label  ILabelProvider getLabelProvider LabelProvider getText MarkerType MarkerType getLabel
I Label Provider get Label Provider return new Label Provider public String get Text Object element Marker Type type Marker Type element return type get Label  ILabelProvider getLabelProvider LabelProvider getText MarkerType MarkerType getLabel
Collections sort types List new Comparator Collator collator Collator get Instance public int compare Object o1 Object o2 return collator compare Marker Type o1 get Label Marker Type o2 get Label  typesList getInstance MarkerType getLabel MarkerType getLabel
Returns the marker types to display return the marker types to display Marker Type get Marker Types if marker Types null Array List types List new Array List Marker Type types marker Types Model get Types for int i 0 i types length i Marker Type type types i if type get Label length 0 if type is Subtype Of marker Types Model get Type I Marker PROBLEM type is Subtype Of marker Types Model get Type I Marker TASK types List add type Collections sort types List new Comparator Collator collator Collator get Instance public int compare Object o1 Object o2 return collator compare Marker Type o1 get Label Marker Type o2 get Label marker Types new Marker Type types List size types List to Array marker Types return marker Types  MarkerType getMarkerTypes markerTypes ArrayList typesList ArrayList MarkerType markerTypesModel getTypes MarkerType getLabel isSubtypeOf markerTypesModel getType IMarker isSubtypeOf markerTypesModel getType IMarker typesList typesList getInstance MarkerType getLabel MarkerType getLabel markerTypes MarkerType typesList typesList toArray markerTypes markerTypes
Returns the ids of the selected marker types return the ids of the selected marker types String get Selected Types Object checked types Viewer get Checked Elements Array List list new Array List for int i 0 i checked length i Marker Type type Marker Type checked i Skip it if any supertypes have already been included Relies on get Checked Elements using a pre order traversal so parents are earlier in the list boolean found false for int j list size j 0 if type is Subtype Of Marker Type list get j found true break if found list add type String types new String list size for int i 0 i list size i types i Marker Type list get i get Id return types  getSelectedTypes typesViewer getCheckedElements ArrayList ArrayList MarkerType MarkerType getCheckedElements isSubtypeOf MarkerType MarkerType getId
return new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 Marker Type t1 Marker Type e1 Marker Type t2 Marker Type e2 return collator compare t1 get Label t2 get Label  ViewerSorter MarkerType MarkerType MarkerType MarkerType getLabel getLabel
Viewer Sorter get Sorter return new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 Marker Type t1 Marker Type e1 Marker Type t2 Marker Type e2 return collator compare t1 get Label t2 get Label  ViewerSorter getSorter ViewerSorter MarkerType MarkerType MarkerType MarkerType getLabel getLabel
Returns the id of the marker type at the given index param type Index the index of the marker type in the UI list return the id of the marker type at the given index String get Type Id int type Index return get Marker Types type Index get Id  typeIndex getTypeId typeIndex getMarkerTypes typeIndex getId
Returns the index of the given marker type param marker Type the marker type id return the index of the marker type int get Type Index String marker Type Marker Type types get Marker Types for int i 0 i types length i String id types i get Id if id null marker Type null id equals marker Type return i return 1  markerType getTypeIndex markerType MarkerType getMarkerTypes getId markerType markerType
void init Types severity Type new Enum Type new Enum Value new Enum Value I Marker SEVERITY ERROR Task List Messages get String Task List severity error Marker Util get Image error NON NLS 2 NON NLS 1 new Enum Value I Marker SEVERITY WARNING Task List Messages get String Task List severity warning Marker Util get Image warn NON NLS 2 NON NLS 1 new Enum Value I Marker SEVERITY INFO Task List Messages get String Task List severity info Marker Util get Image info NON NLS 2 NON NLS 1 priority Type new Enum Type new Enum Value new Enum Value I Marker PRIORITY HIGH Task List Messages get String Task List priority high Marker Util get Image hprio NON NLS 2 NON NLS 1 new Enum Value I Marker PRIORITY NORMAL Task List Messages get String Task List priority normal null NON NLS 1 new Enum Value I Marker PRIORITY LOW Task List Messages get String Task List priority low Marker Util get Image lprio NON NLS 2 NON NLS 1 completion Type new Enum Type new Enum Value new Enum Value 1 Task List Messages get String Task List status completed null NON NLS 1 new Enum Value 0 Task List Messages get String Task List status not Completed null NON NLS 1  initTypes severityType EnumType EnumValue EnumValue IMarker SEVERITY_ERROR TaskListMessages getString TaskList MarkerUtil getImage EnumValue IMarker SEVERITY_WARNING TaskListMessages getString TaskList MarkerUtil getImage EnumValue IMarker SEVERITY_INFO TaskListMessages getString TaskList MarkerUtil getImage priorityType EnumType EnumValue EnumValue IMarker PRIORITY_HIGH TaskListMessages getString TaskList MarkerUtil getImage EnumValue IMarker PRIORITY_NORMAL TaskListMessages getString TaskList EnumValue IMarker PRIORITY_LOW TaskListMessages getString TaskList MarkerUtil getImage completionType EnumType EnumValue EnumValue TaskListMessages getString TaskList EnumValue TaskListMessages getString TaskList notCompleted
Updates the filter from the UI state Must be done here rather than by extending open because after super open is called the widgetry is disposed protected void ok Pressed try int parse Result Integer parse Int this marker Limit get Text if parse Result 1 throw new Number Format Exception update Filter FromUI get Filter super ok Pressed catch Number Format Exception e Number Format Message Box message Box new Message Box get Shell SWT OK SWT APPLICATION MODAL SWT ICON ERROR message Box set Text Task List Messages get String Task List title Marker Limit Invalid NON NLS 1 message Box set Message Task List Messages get String Task List message Marker Limit Invalid NON NLS 1 message Box open if marker Limit force Focus marker Limit set Selection 0 marker Limit get Char Count marker Limit show Selection  okPressed parseResult parseInt markerLimit getText parseResult NumberFormatException updateFilterFromUI getFilter okPressed NumberFormatException eNumberFormat MessageBox messageBox MessageBox getShell APPLICATION_MODAL ICON_ERROR messageBox setText TaskListMessages getString TaskList titleMarkerLimitInvalid messageBox setMessage TaskListMessages getString TaskList messageMarkerLimitInvalid messageBox markerLimit forceFocus markerLimit setSelection markerLimit getCharCount markerLimit showSelection
Handles a press of the Reset button Updates the UI state to correspond to a reset filter but doesn t actually reset our filter void reset Pressed updateUI From Filter new Tasks Filter  resetPressed updateUIFromFilter TasksFilter
Returns whether any of the selected types are a subtype of the given type boolean selection Includes Subtype Of String type Marker Type super Type marker Types Model get Type type if super Type null return false Object checked types Viewer get Checked Elements for int i 0 i checked length i if Marker Type checked i is Subtype Of super Type return true return false  selectionIncludesSubtypeOf MarkerType superType markerTypesModel getType superType typesViewer getCheckedElements MarkerType isSubtypeOf superType
Sets the filter which this dialog is to configure param filter the filter public void set Filter Tasks Filter filter this filter filter  setFilter TasksFilter
Sets the selected marker types param type Ids the ids of the marker types to select void set Selected Types String type Ids types Viewer set Checked Elements new Marker Type 0 for int i 0 i type Ids length i Marker Type type marker Types Model get Type type Ids i if type null types Viewer set Subtree Checked type true  typeIds setSelectedTypes typeIds typesViewer setCheckedElements MarkerType typeIds MarkerType markerTypesModel getType typeIds typesViewer setSubtreeChecked
Updates the enabled state of the widgetry void update Enabled State marker Limit set Enabled filter On Marker Limit get Selection boolean is Problem Selected selection Includes Subtype Of I Marker PROBLEM boolean is Task Selected selection Includes Subtype Of I Marker TASK severity Group set Enabled is Problem Selected priority Group set Enabled is Task Selected completion Group set Enabled is Task Selected  updateEnabledState markerLimit setEnabled filterOnMarkerLimit getSelection isProblemSelected selectionIncludesSubtypeOf IMarker isTaskSelected selectionIncludesSubtypeOf IMarker severityGroup setEnabled isProblemSelected priorityGroup setEnabled isTaskSelected completionGroup setEnabled isTaskSelected
Updates the given filter from the UI state param filter the filter to update void update Filter FromUI Tasks Filter tasks Filter tasks Filter types get Selected Types if selected Resource Button get Selection tasks Filter on Resource Tasks Filter ON SELECTED RESOURCE ONLY else if selected Resource And Children Button get Selection tasks Filter on Resource Tasks Filter ON SELECTED RESOURCE AND CHILDREN else if any Resource In Same Project Button get Selection added by cagatayk acm org tasks Filter on Resource Tasks Filter ON ANY RESOURCE OF SAME PROJECT else if working Set Group get Selection tasks Filter on Resource Tasks Filter ON WORKING SET else tasks Filter on Resource Tasks Filter ON ANY RESOURCE tasks Filter working Set working Set Group get Working Set tasks Filter description Filter Kind description Group combo get Selection Index tasks Filter description Filter description Group text get Text tasks Filter filter On Description tasks Filter description Filter equals NON NLS 1 tasks Filter filter On Severity severity Group get Selection tasks Filter severity Filter severity Group get Value Mask tasks Filter filter On Priority priority Group get Selection tasks Filter priority Filter priority Group get Value Mask tasks Filter filter On Completion completion Group get Selection tasks Filter completion Filter completion Group get Value Mask int limit Tasks Filter DEFAULT MARKER LIMIT try limit Integer parse Int this marker Limit get Text catch Number Format Exception e Number Format tasks Filter set Marker Limit limit tasks Filter set Filter On Marker Limit filter On Marker Limit get Selection  updateFilterFromUI TasksFilter tasksFilter tasksFilter getSelectedTypes selectedResourceButton getSelection tasksFilter onResource TasksFilter ON_SELECTED_RESOURCE_ONLY selectedResourceAndChildrenButton getSelection tasksFilter onResource TasksFilter ON_SELECTED_RESOURCE_AND_CHILDREN anyResourceInSameProjectButton getSelection tasksFilter onResource TasksFilter ON_ANY_RESOURCE_OF_SAME_PROJECT workingSetGroup getSelection tasksFilter onResource TasksFilter ON_WORKING_SET tasksFilter onResource TasksFilter ON_ANY_RESOURCE tasksFilter workingSet workingSetGroup getWorkingSet tasksFilter descriptionFilterKind descriptionGroup getSelectionIndex tasksFilter descriptionFilter descriptionGroup getText tasksFilter filterOnDescription tasksFilter descriptionFilter tasksFilter filterOnSeverity severityGroup getSelection tasksFilter severityFilter severityGroup getValueMask tasksFilter filterOnPriority priorityGroup getSelection tasksFilter priorityFilter priorityGroup getValueMask tasksFilter filterOnCompletion completionGroup getSelection tasksFilter completionFilter completionGroup getValueMask TasksFilter DEFAULT_MARKER_LIMIT parseInt markerLimit getText NumberFormatException eNumberFormat tasksFilter setMarkerLimit tasksFilter setFilterOnMarkerLimit filterOnMarkerLimit getSelection
Updates the UI state from the given filter param filter the filter to use void updateUI From Filter Tasks Filter tasks Filter set Selected Types tasks Filter types int on tasks Filter on Resource any Resource Button set Selection on Tasks Filter ON ANY RESOURCE any Resource In Same Project Button set Selection on Tasks Filter ON ANY RESOURCE OF SAME PROJECT added by cagatayk acm org selected Resource Button set Selection on Tasks Filter ON SELECTED RESOURCE ONLY selected Resource And Children Button set Selection on Tasks Filter ON SELECTED RESOURCE AND CHILDREN working Set Group set Selection on Tasks Filter ON WORKING SET working Set Group set Working Set tasks Filter working Set description Group combo select tasks Filter description Filter Kind description Group text set Text tasks Filter description Filter severity Group set Selection tasks Filter filter On Severity severity Group set Value Mask tasks Filter severity Filter priority Group set Selection tasks Filter filter On Priority priority Group set Value Mask tasks Filter priority Filter completion Group set Selection tasks Filter filter On Completion completion Group set Value Mask tasks Filter completion Filter marker Limit set Text tasks Filter get Marker Limit NON NLS 1 filter On Marker Limit set Selection tasks Filter get Filter On Marker Limit update Enabled State  updateUIFromFilter TasksFilter tasksFilter setSelectedTypes tasksFilter tasksFilter onResource anyResourceButton setSelection TasksFilter ON_ANY_RESOURCE anyResourceInSameProjectButton setSelection TasksFilter ON_ANY_RESOURCE_OF_SAME_PROJECT selectedResourceButton setSelection TasksFilter ON_SELECTED_RESOURCE_ONLY selectedResourceAndChildrenButton setSelection TasksFilter ON_SELECTED_RESOURCE_AND_CHILDREN workingSetGroup setSelection TasksFilter ON_WORKING_SET workingSetGroup setWorkingSet tasksFilter workingSet descriptionGroup tasksFilter descriptionFilterKind descriptionGroup setText tasksFilter descriptionFilter severityGroup setSelection tasksFilter filterOnSeverity severityGroup setValueMask tasksFilter severityFilter priorityGroup setSelection tasksFilter filterOnPriority priorityGroup setValueMask tasksFilter priorityFilter completionGroup setSelection tasksFilter filterOnCompletion completionGroup setValueMask tasksFilter completionFilter markerLimit setText tasksFilter getMarkerLimit filterOnMarkerLimit setSelection tasksFilter getFilterOnMarkerLimit updateEnabledState
Handles selection on a check box or combo box void widget Selected Selection Event e update Enabled State  widgetSelected SelectionEvent updateEnabledState

Creates the action public Goto Task Action Task List tasklist String id super tasklist id Workbench Help set Help this I Task List Help Context Ids GOTO TASK ACTION  GotoTaskAction TaskList WorkbenchHelp setHelp ITaskListHelpContextIds GOTO_TASK_ACTION
Performs this action This action works only for single selection public void run I Structured Selection selection I Structured Selection get Task List get Selection Object o selection get First Element if o instanceof I Marker return I Marker marker I Marker o I Resource resource marker get Resource if marker exists resource instanceof I File I Workbench Page page get Task List get Site get Page try IDE open Editor page marker Open Strategy activate On Open catch Part Init Exception e Dialog Util open Error page get Workbench Window get Shell Task List Messages get String Goto Task error Message NON NLS 1 e get Message e  IStructuredSelection IStructuredSelection getTaskList getSelection getFirstElement IMarker IMarker IMarker IResource getResource IFile IWorkbenchPage getTaskList getSite getPage openEditor OpenStrategy activateOnOpen PartInitException DialogUtil openError getWorkbenchWindow getShell TaskListMessages getString GotoTask errorMessage getMessage

Returns the resource to query for the markers to display for the given adaptable param adaptable the adaptable being queried return the resource or code null code if there is no adapted resource for this object 

Create a Mark Completed Action param tasklist param id protected Mark Completed Action Task List tasklist String id super tasklist id Workbench Help set Help this I Task List Help Context Ids MARK COMPLETED ACTION  MarkCompletedAction MarkCompletedAction TaskList WorkbenchHelp setHelp ITaskListHelpContextIds MARK_COMPLETED_ACTION
Sets the completed value of the currently selected actions public void run I Selection markers get Task List get Selection if markers instanceof I Structured Selection Iterator selections I Structured Selection markers iterator while selections has Next I Marker next Marker I Marker selections next get Task List set Property next Marker I Marker DONE Boolean TRUE  ISelection getTaskList getSelection IStructuredSelection IStructuredSelection hasNext IMarker nextMarker IMarker getTaskList setProperty nextMarker IMarker
Returns whether this action should be enabled for the given selection public boolean should Enable I Structured Selection selection if selection is Empty return false for Iterator i selection iterator i has Next I Marker marker I Marker i next if Marker Util is Marker Type marker I Marker TASK Marker Util is Complete marker Marker Util is Editable marker return false return true  shouldEnable IStructuredSelection isEmpty hasNext IMarker IMarker MarkerUtil isMarkerType IMarker MarkerUtil isComplete MarkerUtil isEditable

Creates a new marker type public Marker Type Marker Types Model model String id String label String supertype Ids this model model this id id this label label this supertype Ids supertype Ids  MarkerType MarkerTypesModel supertypeIds supertypeIds supertypeIds
Returns all this type s supertypes public Marker Type get All Supertypes Array List result new Array List get All Supertypes result return Marker Type result to Array new Marker Type result size  MarkerType getAllSupertypes ArrayList ArrayList getAllSupertypes MarkerType toArray MarkerType
Appends all this type s supertypes to the given list private void get All Supertypes Array List result Marker Type supers get Supertypes for int i 0 i supers length i Marker Type sup supers i if result contains sup result add sup sup get All Supertypes result  getAllSupertypes ArrayList MarkerType getSupertypes MarkerType getAllSupertypes
Returns the marker type id public String get Id return id  getId
Returns the human readable label for this marker type public String get Label return label  getLabel
Returns the types which have this type as a direct supertype return the direct subtypes of this type public Marker Type get Subtypes Marker Type types model get Types Array List result new Array List for int i 0 i types length i Marker Type type types i String supers type get Supertype Ids for int j 0 j supers length j if supers j equals id result add type return Marker Type result to Array new Marker Type result size  MarkerType getSubtypes MarkerType getTypes ArrayList ArrayList MarkerType getSupertypeIds MarkerType toArray MarkerType
Returns the marker type ids for this type s supertypes public String get Supertype Ids return supertype Ids  getSupertypeIds supertypeIds
Returns this type s direct supertypes public Marker Type get Supertypes Array List result new Array List for int i 0 i supertype Ids length i Marker Type sup model get Type supertype Ids i if sup null result add sup return Marker Type result to Array new Marker Type result size  MarkerType getSupertypes ArrayList ArrayList supertypeIds MarkerType getType supertypeIds MarkerType toArray MarkerType
Returns whether this marker type is considered to be a subtype of the given marker type return boolean code true code if this type is the same as or a subtype of the given type public boolean is Subtype Of Marker Type super Type if id equals super Type get Id return true for int i 0 i supertype Ids length i Marker Type sup model get Type supertype Ids i if sup null sup is Subtype Of super Type return true return false  isSubtypeOf MarkerType superType superType getId supertypeIds MarkerType getType supertypeIds isSubtypeOf superType

Creates a new marker types model public Marker Types Model types read Types  MarkerTypesModel readTypes
Returns the marker type with the given id or code null code if there is no such marker type public Marker Type get Type String id return Marker Type types get id  MarkerType getType MarkerType
Returns all known marker types public Marker Type get Types Marker Type result new Marker Type types size types values to Array result return result  MarkerType getTypes MarkerType MarkerType toArray
Returns the label for the given marker type Workaround until we have labels in XML private String get Well Known Label String type if type equals I Marker PROBLEM return Problem NON NLS 1 if type equals I Marker TASK return Task NON NLS 1 if type equals org eclipse jdt core problem NON NLS 1 return Java Problem NON NLS 1 return type  getWellKnownLabel IMarker IMarker
Reads the marker types from the registry private Hash Map read Types Hash Map types new Hash Map I Extension Point point Platform get Plugin Registry get Extension Point Resources Plugin PI RESOURCES Resources Plugin PT MARKERS if point null Gather all registered marker types I Extension extensions point get Extensions for int i 0 i extensions length i I Extension ext extensions i String id ext get Unique Identifier String label ext get Label if label equals NON NLS 1 label get Well Known Label id Array List supers List new Array List I Configuration Element config Elements ext get Configuration Elements for int j 0 j config Elements length j I Configuration Element elt config Elements j if elt get Name equals Ignore Case super NON NLS 1 String sup elt get Attribute type NON NLS 1 if sup null supers List add sup String super Types new String supers List size supers List to Array super Types Marker Type type new Marker Type this id label super Types types put id type return types  HashMap readTypes HashMap HashMap IExtensionPoint getPluginRegistry getExtensionPoint ResourcesPlugin PI_RESOURCES ResourcesPlugin PT_MARKERS IExtension getExtensions IExtension getUniqueIdentifier getLabel getWellKnownLabel ArrayList supersList ArrayList IConfigurationElement configElements getConfigurationElements configElements IConfigurationElement configElements getName equalsIgnoreCase getAttribute supersList superTypes supersList supersList toArray superTypes MarkerType MarkerType superTypes

Don t allow instantiation private Marker Util  MarkerUtil
Creates an image descriptor for the image file referred to by the given relative path relative to the icons directory for the plug in static Image Descriptor create Image Descriptor String relative Path String icon Path icons full NON NLS 1 try URL URL BASIC Task List get Plugin get Descriptor get InstallURL URL url new URL URL BASIC icon Path relative Path return Image Descriptor create FromURL url catch MalformedURL Exception e Assert is True false return null  ImageDescriptor createImageDescriptor relativePath iconPath URL_BASIC TaskList getPlugin getDescriptor getInstallURL URL_BASIC iconPath relativePath ImageDescriptor createFromURL MalformedURLException isTrue
Creates the map of image descriptors static void create Image Descriptors String LOCAL elcl16 NON NLS 1 String LOCAL DISABLED dlcl16 NON NLS 1 String OBJ obj16 NON NLS 1 image Descriptors new Hash Map 51 image Descriptors put header complete create Image Descriptor obj16 header complete gif NON NLS 2 NON NLS 1 image Descriptors put header priority create Image Descriptor obj16 header priority gif NON NLS 2 NON NLS 1 image Descriptors put task create Image Descriptor OBJ taskmrk tsk gif NON NLS 2 NON NLS 1 image Descriptors put error create Image Descriptor OBJ error tsk gif NON NLS 2 NON NLS 1 image Descriptors put warn create Image Descriptor OBJ warn tsk gif NON NLS 2 NON NLS 1 image Descriptors put info create Image Descriptor OBJ info tsk gif NON NLS 2 NON NLS 1 image Descriptors put hprio create Image Descriptor OBJ hprio tsk gif NON NLS 2 NON NLS 1 image Descriptors put lprio create Image Descriptor OBJ lprio tsk gif NON NLS 2 NON NLS 1 image Descriptors put complete tsk create Image Descriptor OBJ complete tsk gif NON NLS 2 NON NLS 1 image Descriptors put incomplete tsk create Image Descriptor OBJ incomplete tsk gif NON NLS 2 NON NLS 1 image Descriptors put gotoobj create Image Descriptor LOCAL gotoobj tsk gif NON NLS 2 NON NLS 1 image Descriptors put addtsk create Image Descriptor LOCAL addtsk tsk gif NON NLS 2 NON NLS 1 image Descriptors put addtsk disabled create Image Descriptor LOCAL DISABLED addtsk tsk gif NON NLS 2 NON NLS 1 image Descriptors put showcomplete create Image Descriptor LOCAL showcomplete tsk gif NON NLS 2 NON NLS 1 image Descriptors put selected mode create Image Descriptor LOCAL selected mode gif NON NLS 2 NON NLS 1 image Descriptors put selected mode disabled create Image Descriptor LOCAL DISABLED selected mode gif NON NLS 2 NON NLS 1 image Descriptors put showchild mode create Image Descriptor LOCAL showchild mode gif NON NLS 2 NON NLS 1 image Descriptors put showchild mode disabled create Image Descriptor LOCAL DISABLED showchild mode gif NON NLS 2 NON NLS 1 image Descriptors put showerr disabled create Image Descriptor LOCAL DISABLED showerr tsk gif NON NLS 2 NON NLS 1 image Descriptors put showwarn disabled create Image Descriptor LOCAL DISABLED showwarn tsk gif NON NLS 2 NON NLS 1 image Descriptors put showtsk disabled create Image Descriptor LOCAL DISABLED showtsk tsk gif NON NLS 2 NON NLS 1 image Descriptors put filter create Image Descriptor LOCAL filter ps gif NON NLS 2 NON NLS 1  createImageDescriptors LOCAL_DISABLED imageDescriptors HashMap imageDescriptors header_complete createImageDescriptor header_complete imageDescriptors header_priority createImageDescriptor header_priority imageDescriptors createImageDescriptor taskmrk_tsk imageDescriptors createImageDescriptor error_tsk imageDescriptors createImageDescriptor warn_tsk imageDescriptors createImageDescriptor info_tsk imageDescriptors createImageDescriptor hprio_tsk imageDescriptors createImageDescriptor lprio_tsk imageDescriptors complete_tsk createImageDescriptor complete_tsk imageDescriptors incomplete_tsk createImageDescriptor incomplete_tsk imageDescriptors createImageDescriptor gotoobj_tsk imageDescriptors createImageDescriptor addtsk_tsk imageDescriptors addtsk_disabled createImageDescriptor LOCAL_DISABLED addtsk_tsk imageDescriptors createImageDescriptor showcomplete_tsk imageDescriptors selected_mode createImageDescriptor selected_mode imageDescriptors selected_mode_disabled createImageDescriptor LOCAL_DISABLED selected_mode imageDescriptors showchild_mode createImageDescriptor showchild_mode imageDescriptors showchild_mode_disabled createImageDescriptor LOCAL_DISABLED showchild_mode imageDescriptors showerr_disabled createImageDescriptor LOCAL_DISABLED showerr_tsk imageDescriptors showwarn_disabled createImageDescriptor LOCAL_DISABLED showwarn_tsk imageDescriptors showtsk_disabled createImageDescriptor LOCAL_DISABLED showtsk_tsk imageDescriptors createImageDescriptor filter_ps
Returns the ending character offset of the given marker public static int get Char End I Marker marker return marker get Attribute I Marker CHAR END 1  getCharEnd IMarker getAttribute IMarker CHAR_END
Returns the starting character offset of the given marker public static int get Char Start I Marker marker return marker get Attribute I Marker CHAR START 1  getCharStart IMarker getAttribute IMarker CHAR_START
Returns the icon to be used in the tasklist for the complete state of a task Returns null for markers that are not tasks public static Image get Complete Image I Marker marker if is Marker Type marker I Marker TASK if is Complete marker return get Image complete tsk NON NLS 1 else if is Read Only marker don t show a check box for read only tasks return get Image incomplete tsk NON NLS 1 return null  getCompleteImage IMarker isMarkerType IMarker isComplete getImage complete_tsk isReadOnly getImage incomplete_tsk
Returns the text to be used for the complete state of a task Returns the empty string for markers that are not tasks public static String get Complete Text I Marker marker if is Marker Type marker I Marker TASK if is Complete marker return Task List Messages get String Task List completed NON NLS 1 else return Task List Messages get String Task List not Completed NON NLS 1 return NON NLS 1  getCompleteText IMarker isMarkerType IMarker isComplete TaskListMessages getString TaskList TaskListMessages getString TaskList notCompleted
Returns the text to be used for the kind of marker public static String get Kind Text I Marker marker if is Marker Type marker I Marker TASK return Task List Messages get String Task List task NON NLS 1 switch get Severity marker case I Marker SEVERITY ERROR return Task List Messages get String Task List error NON NLS 1 case I Marker SEVERITY WARNING return Task List Messages get String Task List warning NON NLS 1 case I Marker SEVERITY INFO return Task List Messages get String Task List info NON NLS 1 return NON NLS 1  getKindText IMarker isMarkerType IMarker TaskListMessages getString TaskList getSeverity IMarker SEVERITY_ERROR TaskListMessages getString TaskList IMarker SEVERITY_WARNING TaskListMessages getString TaskList IMarker SEVERITY_INFO TaskListMessages getString TaskList
Returns the container name if it is defined or empty string if not public static String get Container Name I Marker marker I Path path marker get Resource get Full Path int n path segment Count 1 n is the number of segments in container not path if n 0 return NON NLS 1 int len 0 for int i 0 i n i len path segment i length account for s if n 1 len n 1 String Buffer sb new String Buffer len for int i 0 i n i if i 0 sb append sb append path segment i return sb to String  getContainerName IMarker IPath getResource getFullPath segmentCount StringBuffer StringBuffer toString
Returns the image with the given key or code null code if not found static Image get Image String key Image image Image image Registry get key if image null Image Descriptor desc get Image Descriptor key if desc null image desc create Image false if image null System err println Task List Error creating image for key NON NLS 1 image Registry put key image return image  getImage imageRegistry ImageDescriptor getImageDescriptor createImage TaskList imageRegistry
Returns the image that should be used to visually represent the marker based on its type and priority static public Image get Image I Marker marker if is Marker Type marker I Marker PROBLEM switch get Severity marker case I Marker SEVERITY ERROR return get Image error NON NLS 1 case I Marker SEVERITY WARNING return get Image warn NON NLS 1 case I Marker SEVERITY INFO return get Image info NON NLS 1 else if is Marker Type marker I Marker TASK return get Image task NON NLS 1 return null  getImage IMarker isMarkerType IMarker getSeverity IMarker SEVERITY_ERROR getImage IMarker SEVERITY_WARNING getImage IMarker SEVERITY_INFO getImage isMarkerType IMarker getImage
Returns the image descriptor with the given key or code null code if not found static Image Descriptor get Image Descriptor String key Image Descriptor desc Image Descriptor image Descriptors get key if desc null System err println Task List No image descriptor for key NON NLS 1 return desc  ImageDescriptor getImageDescriptor ImageDescriptor ImageDescriptor imageDescriptors TaskList
Returns the text for the line and location column given the marker public static String get Line And Location I Marker marker int line Number get Line Number marker String location get Location marker return get Line And Location line Number location  getLineAndLocation IMarker lineNumber getLineNumber getLocation getLineAndLocation lineNumber
Returns the text for the line and location column given the line number and location text public static String get Line And Location int line Number String location if line Number 1 if location equals NON NLS 1 return NON NLS 1 else return location else if location equals NON NLS 1 return line format new Object Integer to String line Number else return line And Location format new Object Integer to String line Number location  getLineAndLocation lineNumber lineNumber toString lineNumber lineAndLocation toString lineNumber
Returns the line number of the given marker public static int get Line Number I Marker marker return marker get Attribute I Marker LINE NUMBER 1  getLineNumber IMarker getAttribute IMarker LINE_NUMBER
Returns the text for the location field public static String get Location I Marker marker return marker get Attribute I Marker LOCATION NON NLS 1  getLocation IMarker getAttribute IMarker
Returns the message attribute of the given marker or the empty string if the message attribute is not defined public static String get Message I Marker marker return marker get Attribute I Marker MESSAGE NON NLS 1  getMessage IMarker getAttribute IMarker
Returns the numeric value of the given string which is assumed to represent a numeric value return code true code if numeric code false code if not static public int get Numeric Value String value boolean negative false int i 0 int len value length skip any leading workaround for 1GCE69U ITPJCORE ALL Java problems should not have in location if i len value char At i i if i len value char At i negative true i int result 0 while i len int digit Character digit value char At i 10 if digit 0 return result result result 10 digit if negative result result return result  getNumericValue charAt charAt charAt
Returns the priority of the given marker Default is PRIORITY NORMAL public static int get Priority I Marker marker return marker get Attribute I Marker PRIORITY I Marker PRIORITY NORMAL  PRIORITY_NORMAL getPriority IMarker getAttribute IMarker IMarker PRIORITY_NORMAL
Returns an image that should visually represent marker s priority in the tasklist public static Image get Priority Image I Marker marker switch get Priority marker case I Marker PRIORITY HIGH return get Image hprio NON NLS 1 case I Marker PRIORITY NORMAL return null no image for normal priority case I Marker PRIORITY LOW return get Image lprio NON NLS 1 return null  getPriorityImage IMarker getPriority IMarker PRIORITY_HIGH getImage IMarker PRIORITY_NORMAL IMarker PRIORITY_LOW getImage
Returns the text for the given marker s priority public static String get Priority Text I Marker marker if is Marker Type marker I Marker TASK return NON NLS 1 switch get Priority marker case I Marker PRIORITY HIGH return Task List Messages get String Task List high NON NLS 1 case I Marker PRIORITY NORMAL return Task List Messages get String Task List normal NON NLS 1 case I Marker PRIORITY LOW return Task List Messages get String Task List low NON NLS 1 return NON NLS 1  getPriorityText IMarker isMarkerType IMarker getPriority IMarker PRIORITY_HIGH TaskListMessages getString TaskList IMarker PRIORITY_NORMAL TaskListMessages getString TaskList IMarker PRIORITY_LOW TaskListMessages getString TaskList
Implements I Provider interface by supporting a number of properties required for visual representation of markers in the tasklist static public Object get Property Object object String key I Marker marker I Marker object optimizations check properties needed for Task List Label Provider first then those needed for cell modifiers use instead of equals for efficiency if I Basic Property Constants P IMAGE key return get Image marker if I Marker Constants P COMPLETE IMAGE key return get Complete Image marker if I Marker Constants P PRIORITY IMAGE key return get Priority Image marker if I Marker MESSAGE key return get Message marker if I Marker Constants P RESOURCE NAME key return get Resource Name marker if I Marker Constants P CONTAINER NAME key return get Container Name marker if I Marker Constants P LINE AND LOCATION key return get Line And Location marker if I Marker PRIORITY key this property is used only by cell editor where order is High Normal Low return new Integer I Marker PRIORITY HIGH get Priority marker if I Marker DONE key return is Complete marker Boolean TRUE Boolean FALSE if I Basic Property Constants P TEXT key return get Message marker return null  IProvider getProperty IMarker IMarker TaskListLabelProvider IBasicPropertyConstants P_IMAGE getImage IMarkerConstants P_COMPLETE_IMAGE getCompleteImage IMarkerConstants P_PRIORITY_IMAGE getPriorityImage IMarker getMessage IMarkerConstants P_RESOURCE_NAME getResourceName IMarkerConstants P_CONTAINER_NAME getContainerName IMarkerConstants P_LINE_AND_LOCATION getLineAndLocation IMarker IMarker PRIORITY_HIGH getPriority IMarker isComplete IBasicPropertyConstants P_TEXT getMessage
Returns name if it is defined or blank string if not public static String get Resource Name I Marker marker return marker get Resource get Name  getResourceName IMarker getResource getName
Returns the severity of the given marker Default is SEVERITY WARNING public static int get Severity I Marker marker return marker get Attribute I Marker SEVERITY I Marker SEVERITY WARNING  SEVERITY_WARNING getSeverity IMarker getAttribute IMarker IMarker SEVERITY_WARNING
A helper method that returns true if the given marker is marked as complete in the tasklist Only tasks can be complete public static boolean is Complete I Marker marker return marker get Attribute I Marker DONE false  isComplete IMarker getAttribute IMarker
Returns whether the given marker is editable Only tasks which have not been marked as read only are editable public static boolean is Editable I Marker marker return is Marker Type marker I Marker TASK is Read Only marker  isEditable IMarker isMarkerType IMarker isReadOnly
Returns whether the given marker is of the given type either directly or indirectly public static boolean is Marker Type I Marker marker String type try return marker is Subtype Of type catch Core Exception e return false  isMarkerType IMarker isSubtypeOf CoreException
Returns whether the given marker is read only public static boolean is Read Only I Marker marker return marker get Attribute I Marker USER EDITABLE true  isReadOnly IMarker getAttribute IMarker USER_EDITABLE
Returns the creation time of the marker as a string public static String get Creation Time I Marker marker try return Date Format get Date Time Instance Date Format LONG Date Format MEDIUM format new Date marker get Creation Time catch Core Exception e return null  getCreationTime IMarker DateFormat getDateTimeInstance DateFormat DateFormat getCreationTime CoreException

Creates the action public New Task Action Task List tasklist String id super tasklist id Workbench Help set Help this I Task List Help Context Ids NEW TASK ACTION  NewTaskAction TaskList WorkbenchHelp setHelp ITaskListHelpContextIds NEW_TASK_ACTION
Opens the new task dialog and shows the newly created task when done The new task is created on the currently selected resource public void run Task Properties Dialog dialog new Task Properties Dialog get Shell dialog set Resource get Task List get Resource int result dialog open if result Dialog OK show Marker dialog get Marker  TaskPropertiesDialog TaskPropertiesDialog getShell setResource getTaskList getResource showMarker getMarker
which hasn t been processed yet get Shell get Display async Exec new Runnable public void run get Task List set Selection new Structured Selection marker true  getShell getDisplay asyncExec getTaskList setSelection StructuredSelection
Show the newly created marker private void show Marker final I Marker marker if marker null return if get Task List should Show marker Need to do this in an async Exec even though we re in the UI thread here since the task list updates itself with the addition in an async Exec which hasn t been processed yet get Shell get Display async Exec new Runnable public void run get Task List set Selection new Structured Selection marker true else Message Dialog open Information get Shell Task List Messages get String New Task not Shown Title NON NLS 1 Task List Messages get String New Task not Shown Msg NON NLS 1  showMarker IMarker getTaskList shouldShow asyncExec asyncExec getShell getDisplay asyncExec getTaskList setSelection StructuredSelection MessageDialog openInformation getShell TaskListMessages getString NewTask notShownTitle TaskListMessages getString NewTask notShownMsg

Creates a new action public Paste Task Action Task List tasklist String id super tasklist id Workbench Help set Help this I Task List Help Context Ids PASTE TASK ACTION  PasteTaskAction TaskList WorkbenchHelp setHelp ITaskListHelpContextIds PASTE_TASK_ACTION
get Task List get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i marker Data length i Only paste tasks not problems if marker Data i get Type equals I Marker TASK continue Paste to the same resource as the original I Resource resource marker Data i get Resource Map attributes marker Data i get Attributes I Marker marker resource create Marker I Marker TASK marker set Attributes attributes new Markers add marker  getTaskList getWorkspace IWorkspaceRunnable IProgressMonitor CoreException markerData markerData getType IMarker IResource markerData getResource markerData getAttributes IMarker createMarker IMarker setAttributes newMarkers
if new Markers size 0 get Shell get Display async Exec new Runnable public void run Task List task List get Task List task List set Selection new Structured Selection new Markers true  newMarkers getShell getDisplay asyncExec TaskList taskList getTaskList taskList setSelection StructuredSelection newMarkers
Implementation of method defined on code I Action code public void run Get the markers from the clipboard Marker Transfer transfer Marker Transfer get Instance final I Marker marker Data I Marker get Task List get Clipboard get Contents transfer if marker Data null return final Array List new Markers new Array List try get Task List get Workspace run new I Workspace Runnable public void run I Progress Monitor monitor throws Core Exception for int i 0 i marker Data length i Only paste tasks not problems if marker Data i get Type equals I Marker TASK continue Paste to the same resource as the original I Resource resource marker Data i get Resource Map attributes marker Data i get Attributes I Marker marker resource create Marker I Marker TASK marker set Attributes attributes new Markers add marker null catch Core Exception e Error Dialog open Error get Shell Task List Messages get String Paste Task error Message NON NLS 1 null e get Status return Need to do this in an async Exec even though we re in the UI thread here since the task list updates itself with the addition in an async Exec which hasn t been processed yet Must be done outside I Workspace Runnable above since notification for add is sent after I Workspace Runnable is run if new Markers size 0 get Shell get Display async Exec new Runnable public void run Task List task List get Task List task List set Selection new Structured Selection new Markers true  IAction MarkerTransfer MarkerTransfer getInstance IMarker markerData IMarker getTaskList getClipboard getContents markerData ArrayList newMarkers ArrayList getTaskList getWorkspace IWorkspaceRunnable IProgressMonitor CoreException markerData markerData getType IMarker IResource markerData getResource markerData getAttributes IMarker createMarker IMarker setAttributes newMarkers CoreException ErrorDialog openError getShell TaskListMessages getString PasteTask errorMessage getStatus asyncExec asyncExec IWorkspaceRunnable IWorkspaceRunnable newMarkers getShell getDisplay asyncExec TaskList taskList getTaskList taskList setSelection StructuredSelection newMarkers

Creates the action public Purge Completed Action Task List tasklist String id super tasklist id Workbench Help set Help this I Task List Help Context Ids PURGE COMPLETED TASK ACTION  PurgeCompletedAction TaskList WorkbenchHelp setHelp ITaskListHelpContextIds PURGE_COMPLETED_TASK_ACTION
Fetches all the completed tasks in the workspace and deletes them public void run try I Resource resource get Task List get Resource int depth get Task List get Resource Depth I Marker tasks resource find Markers I Marker TASK true depth final List completed new Array List for int i 0 i tasks length i I Marker task tasks i if Marker Util is Complete task Marker Util is Read Only task completed add task Check if there is anything to do if completed size 0 Message Dialog open Information get Shell Task List Messages get String Purge Completed title NON NLS 1 Task List Messages get String Purge Completed none Completed NON NLS 1 return Verify if Message Dialog open Confirm get Shell Task List Messages get String Purge Completed title NON NLS 1 Task List Messages format Purge Completed permanent NON NLS 1 new Object new Integer completed size return I Marker to Delete new I Marker completed size completed to Array to Delete get Task List get Workspace delete Markers to Delete catch Core Exception e Error Dialog open Error get Shell Task List Messages get String Purge Completed error Message null e get Status NON NLS 1  IResource getTaskList getResource getTaskList getResourceDepth IMarker findMarkers IMarker ArrayList IMarker MarkerUtil isComplete MarkerUtil isReadOnly MessageDialog openInformation getShell TaskListMessages getString PurgeCompleted TaskListMessages getString PurgeCompleted noneCompleted MessageDialog openConfirm getShell TaskListMessages getString PurgeCompleted TaskListMessages PurgeCompleted IMarker toDelete IMarker toArray toDelete getTaskList getWorkspace deleteMarkers toDelete CoreException ErrorDialog openError getShell TaskListMessages getString PurgeCompleted errorMessage getStatus

Creates the action public Remove Task Action Task List tasklist String id super tasklist id Workbench Help set Help this I Task List Help Context Ids REMOVE TASK ACTION  RemoveTaskAction TaskList WorkbenchHelp setHelp ITaskListHelpContextIds REMOVE_TASK_ACTION
Removes all the tasks in the current selection from the task list public void run Task List task List get Task List Table Viewer viewer task List get Table Viewer I Structured Selection selection I Structured Selection viewer get Selection if selection is Empty return task List cancel Editing get the index of the selected item which has focus Table table viewer get Table int focus Index table get Selection Index try List list I Structured Selection selection to List I Marker markers new I Marker list size list to Array markers be sure to only invoke one workspace operation task List get Workspace delete Markers markers set the selection to be the one which took the place of the one with focus int count table get Item Count if focus Index count table set Selection focus Index else if count 0 table set Selection count 1 update the viewer s selection since setting the table selection does not notify the viewer viewer set Selection viewer get Selection true catch Core Exception e Error Dialog open Error get Shell Task List Messages get String Remove Task error Message NON NLS 1 null e get Status  TaskList taskList getTaskList TableViewer taskList getTableViewer IStructuredSelection IStructuredSelection getSelection isEmpty taskList cancelEditing getTable focusIndex getSelectionIndex IStructuredSelection toList IMarker IMarker toArray taskList getWorkspace deleteMarkers getItemCount focusIndex setSelection focusIndex setSelection setSelection getSelection CoreException ErrorDialog openError getShell TaskListMessages getString RemoveTask errorMessage getStatus

Creates the action protected Resolve Marker Action Task List tasklist String id super tasklist id Workbench Help set Help this I Task List Help Context Ids RESOLVE MARKER ACTION  ResolveMarkerAction TaskList WorkbenchHelp setHelp ITaskListHelpContextIds RESOLVE_MARKER_ACTION
Returns whether this action should be enabled given the selection public boolean should Enable I Structured Selection selection if selection size 1 return false I Marker marker I Marker selection get First Element if marker null return false return IDE get Marker Help Registry has Resolutions marker  shouldEnable IStructuredSelection IMarker IMarker getFirstElement getMarkerHelpRegistry hasResolutions
Displays a list of resolutions and performs the selection public void run I Marker marker get Marker if marker null return get Task List cancel Editing I Marker Resolution resolutions get Resolutions marker if resolutions length 0 Message Dialog open Information get Shell Task List Messages get String Resolve title NON NLS 1 Task List Messages get String Resolve no Resolutions Label NON NLS 1 return Marker Resolution Selection Dialog d new Marker Resolution Selection Dialog get Shell resolutions if d open Dialog OK return Object result d get Result if result null result length 0 I Marker Resolution result 0 run marker  IMarker getMarker getTaskList cancelEditing IMarkerResolution getResolutions MessageDialog openInformation getShell TaskListMessages getString TaskListMessages getString noResolutionsLabel MarkerResolutionSelectionDialog MarkerResolutionSelectionDialog getShell getResult IMarkerResolution
Returns the resolutions for the given marker param the marker for which to obtain resolutions return the resolutions for the selected marker private I Marker Resolution get Resolutions I Marker marker return IDE get Marker Help Registry get Resolutions marker  IMarkerResolution getResolutions IMarker getMarkerHelpRegistry getResolutions
Returns the selected marker may be code null code return the selected marker private I Marker get Marker I Structured Selection selection I Structured Selection get Task List get Selection only enable for single selection if selection size 1 return null return I Marker selection get First Element  IMarker getMarker IStructuredSelection IStructuredSelection getTaskList getSelection IMarker getFirstElement

Creates the action protected Select All Tasks Action Task List tasklist String id super tasklist id Workbench Help set Help this I Task List Help Context Ids SELECT ALL TASKS ACTION  SelectAllTasksAction TaskList WorkbenchHelp setHelp ITaskListHelpContextIds SELECT_ALL_TASKS_ACTION
Selects all resources in the view public void run get Task List cancel Editing Table Viewer viewer get Task List get Table Viewer viewer get Table select All force viewer selection change viewer set Selection viewer get Selection  getTaskList cancelEditing TableViewer getTaskList getTableViewer getTable selectAll setSelection getSelection

Task Action constructor protected Task Action Task List tasklist String id super this task List tasklist set Id id  TaskAction TaskAction TaskList taskList setId
Returns the shell to use within actions protected Shell get Shell return task List get Site get Shell  getShell taskList getSite getShell
Returns the task list viewer protected Task List get Task List return task List  TaskList getTaskList taskList
Stores the current state value of this toggle action into the dialog store using action ID as a key protected void store Value I Dialog Settings workbench Settings Task List get Plugin get Dialog Settings I Dialog Settings settings workbench Settings get Section Task Action NON NLS 1 if settings null settings workbench Settings add New Section Task Action NON NLS 1 settings put get Id is Checked  storeValue IDialogSettings workbenchSettings TaskList getPlugin getDialogSettings IDialogSettings workbenchSettings getSection TaskAction workbenchSettings addNewSection TaskAction getId isChecked

public String get Column Text Object element int column Index if column Index 3 column Index 6 return String Marker Util get Property element keys column Index return NON NLS 1  getColumnText columnIndex columnIndex columnIndex MarkerUtil getProperty columnIndex
public Image get Column Image Object element int column Index if column Index 0 column Index 2 return Image Marker Util get Property element keys column Index return null  getColumnImage columnIndex columnIndex columnIndex MarkerUtil getProperty columnIndex
private int column public Sort By Action int column this column column  SortByAction
public void run sorter set Top Priority column update Sorting State viewer refresh I Dialog Settings workbench Settings get Plugin get Dialog Settings I Dialog Settings settings workbench Settings get Section TAG SORT SECTION if settings null settings workbench Settings add New Section TAG SORT SECTION sorter save State settings  setTopPriority updateSortingState IDialogSettings workbenchSettings getPlugin getDialogSettings IDialogSettings workbenchSettings getSection TAG_SORT_SECTION workbenchSettings addNewSection TAG_SORT_SECTION saveState
private int direction public Sort Direction Action int direction this direction direction  SortDirectionAction
public void run sorter set Top Priority Direction direction update Sorting State viewer refresh I Dialog Settings workbench Settings get Plugin get Dialog Settings I Dialog Settings settings workbench Settings get Section TAG SORT SECTION if settings null settings workbench Settings add New Section TAG SORT SECTION sorter save State settings  setTopPriorityDirection updateSortingState IDialogSettings workbenchSettings getPlugin getDialogSettings IDialogSettings workbenchSettings getSection TAG_SORT_SECTION workbenchSettings addNewSection TAG_SORT_SECTION saveState
private I Part Listener part Listener new I Part Listener public void part Activated I Workbench Part part Task List this part Activated part  IPartListener partListener IPartListener partActivated IWorkbenchPart TaskList partActivated
Task List this part Activated part public void part Brought To Top I Workbench Part part  TaskList partActivated partBroughtToTop IWorkbenchPart
public void part Brought To Top I Workbench Part part public void part Closed I Workbench Part part Task List this part Closed part  partBroughtToTop IWorkbenchPart partClosed IWorkbenchPart TaskList partClosed
Task List this part Closed part public void part Deactivated I Workbench Part part  TaskList partClosed partDeactivated IWorkbenchPart
public void part Deactivated I Workbench Part part public void part Opened I Workbench Part part  partDeactivated IWorkbenchPart partOpened IWorkbenchPart
private I Selection Changed Listener focus Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Task List this focus Selection Changed event  ISelectionChangedListener focusSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent TaskList focusSelectionChanged
private I Cell Modifier cell Modifier new I Cell Modifier public Object get Value Object element String property return Marker Util get Property element property  ICellModifier cellModifier ICellModifier getValue MarkerUtil getProperty
public boolean can Modify Object element String property return Marker Util is Editable I Marker element  canModify MarkerUtil isEditable IMarker
Modifies a marker as a result of a successfully completed direct editing public void modify Object element String property Object value Item item Item element I Marker marker I Marker item get Data set Property marker property value  IMarker IMarker getData setProperty
Creates a new task list view public Task List super  TaskList
void add Drag Support Control control int operations DND DROP COPY Transfer transfer Types new Transfer Marker Transfer get Instance Text Transfer get Instance Drag Source Listener listener new Drag Source Adapter public void drag Set Data Drag Source Event event perform Drag Set Data event public void drag Finished Drag Source Event event viewer add Drag Support operations transfer Types listener  addDragSupport DROP_COPY transferTypes MarkerTransfer getInstance TextTransfer getInstance DragSourceListener DragSourceAdapter dragSetData DragSourceEvent performDragSetData dragFinished DragSourceEvent addDragSupport transferTypes
viewer add Drag Support operations transfer Types listener void cancel Editing get Table Viewer cancel Editing  addDragSupport transferTypes cancelEditing getTableViewer cancelEditing
Selection Listener header Listener new Selection Adapter Handles the case of user selecting the header area p If the column has not been selected previously it will set the sorter of that column to be the current tasklist sorter Repeated presses on the same column header will toggle sorting order ascending descending public void widget Selected Selection Event e column selected need to sort int column table index Of Table Column e widget if column sorter get Top Priority sorter reverse Top Priority else sorter set Top Priority column update Sorting State viewer refresh I Dialog Settings workbench Settings get Plugin get Dialog Settings I Dialog Settings settings workbench Settings get Section TAG SORT SECTION if settings null settings workbench Settings add New Section TAG SORT SECTION sorter save State settings  SelectionListener headerListener SelectionAdapter widgetSelected SelectionEvent indexOf TableColumn getTopPriority reverseTopPriority setTopPriority updateSortingState IDialogSettings workbenchSettings getPlugin getDialogSettings IDialogSettings workbenchSettings getSection TAG_SORT_SECTION workbenchSettings addNewSection TAG_SORT_SECTION saveState
void create Columns This class handles selections of the column headers Selection of the column header will cause resorting of the shown tasks using that column s sorter Repeated selection of the header will toggle sorting order ascending versus descending Selection Listener header Listener new Selection Adapter Handles the case of user selecting the header area p If the column has not been selected previously it will set the sorter of that column to be the current tasklist sorter Repeated presses on the same column header will toggle sorting order ascending descending public void widget Selected Selection Event e column selected need to sort int column table index Of Table Column e widget if column sorter get Top Priority sorter reverse Top Priority else sorter set Top Priority column update Sorting State viewer refresh I Dialog Settings workbench Settings get Plugin get Dialog Settings I Dialog Settings settings workbench Settings get Section TAG SORT SECTION if settings null settings workbench Settings add New Section TAG SORT SECTION sorter save State settings if memento null restore columns width I Memento children memento get Children TAG COLUMN if children null for int i 0 i children length i Integer val children i get Integer TAG NUMBER if val null int index val int Value val children i get Integer TAG WIDTH if val null column Layouts index new Column Pixel Data val int Value true boolean text carbon equals SWT get Platform NON NLS 1 Table Layout layout new Table Layout table set Layout layout table set Header Visible true for int i 0 i column Headers length i Table Column tc new Table Column table SWT NONE i if text i 1 tc set Image Marker Util get Image header complete NON NLS 1 else if text i 2 tc set Image Marker Util get Image header priority NON NLS 1 else tc set Text column Headers i if text i 1 i 2 tc pack column Layouts i new Column Pixel Data Math max 19 tc get Width false tc set Resizable column Layouts i resizable layout add Column Data column Layouts i tc add Selection Listener header Listener  createColumns SelectionListener headerListener SelectionAdapter widgetSelected SelectionEvent indexOf TableColumn getTopPriority reverseTopPriority setTopPriority updateSortingState IDialogSettings workbenchSettings getPlugin getDialogSettings IDialogSettings workbenchSettings getSection TAG_SORT_SECTION workbenchSettings addNewSection TAG_SORT_SECTION saveState IMemento getChildren TAG_COLUMN getInteger TAG_NUMBER intValue getInteger TAG_WIDTH columnLayouts ColumnPixelData intValue getPlatform TableLayout TableLayout setLayout setHeaderVisible columnHeaders TableColumn TableColumn setImage MarkerUtil getImage header_complete setImage MarkerUtil getImage header_priority setText columnHeaders columnLayouts ColumnPixelData getWidth setResizable columnLayouts addColumnData columnLayouts addSelectionListener headerListener
Returns a string that summarizes the contents of the given markers static String create Marker Report I Marker markers String Buffer buf new String Buffer Create the header buf append Task List Messages get String Task List report Kind NON NLS 1 buf append t NON NLS 1 buf append Task List Messages get String Task List report Status NON NLS 1 buf append t NON NLS 1 buf append Task List Messages get String Task List report Priority NON NLS 1 buf append t NON NLS 1 buf append Task List Messages get String Task List header Description NON NLS 1 buf append t NON NLS 1 buf append Task List Messages get String Task List header Resource NON NLS 1 buf append t NON NLS 1 buf append Task List Messages get String Task List header Folder NON NLS 1 buf append t NON NLS 1 buf append Task List Messages get String Task List header Location NON NLS 1 buf append System get Property line separator NON NLS 1 Create the report for the markers for int i 0 i markers length i write Marker buf markers i return buf to String  createMarkerReport IMarker StringBuffer StringBuffer TaskListMessages getString TaskList reportKind TaskListMessages getString TaskList reportStatus TaskListMessages getString TaskList reportPriority TaskListMessages getString TaskList headerDescription TaskListMessages getString TaskList headerResource TaskListMessages getString TaskList headerFolder TaskListMessages getString TaskList headerLocation getProperty writeMarker toString
Writes a string representation of the given marker to the buffer static void write Marker String Buffer buf I Marker marker buf append Marker Util get Kind Text marker buf append t NON NLS 1 buf append Marker Util get Complete Text marker buf append t NON NLS 1 buf append Marker Util get Priority Text marker buf append t NON NLS 1 buf append Marker Util get Message marker buf append t NON NLS 1 buf append Marker Util get Resource Name marker buf append t NON NLS 1 buf append Marker Util get Container Name marker buf append t NON NLS 1 buf append Marker Util get Line And Location marker buf append System get Property line separator NON NLS 1  writeMarker StringBuffer IMarker MarkerUtil getKindText MarkerUtil getCompleteText MarkerUtil getPriorityText MarkerUtil getMessage MarkerUtil getResourceName MarkerUtil getContainerName MarkerUtil getLineAndLocation getProperty
package boolean is Marker Limit Exceeded return marker Limit Exceeded  isMarkerLimitExceeded markerLimitExceeded
package void set Marker Limit Exceeded boolean marker Limit Exceeded this marker Limit Exceeded marker Limit Exceeded if marker Limit Exceeded stack Layout top Control composite Marker Limit Exceeded else stack Layout top Control table parent layout  setMarkerLimitExceeded markerLimitExceeded markerLimitExceeded markerLimitExceeded markerLimitExceeded stackLayout topControl compositeMarkerLimitExceeded stackLayout topControl
public void create Part Control Composite parent long t System current Time Millis create Part Control0 parent t System current Time Millis t System out println Task List create Part Control t ms  createPartControl currentTimeMillis createPartControl0 currentTimeMillis TaskList createPartControl
private void create Part Control0 Composite parent this parent parent clipboard new Clipboard parent get Display create Table parent viewer new Table Viewer table viewer set Use Hashlookup true create Columns make Actions fill Action Bars add Drag Support table composite Marker Limit Exceeded new Composite parent SWT NONE composite Marker Limit Exceeded set Layout new Grid Layout Label label Marker Limit Exceeded new Label composite Marker Limit Exceeded SWT WRAP label Marker Limit Exceeded set Text Task List Messages get String Task List marker Limit Exceeded NON NLS 1 parent set Layout stack Layout set Marker Limit Exceeded false viewer set Content Provider new Task List Content Provider this viewer set Label Provider new Task List Label Provider if memento null restore filter I Memento filter Mem memento get Child TAG FILTER if filter Mem null get Filter restore State filter Mem sorter new Task Sorter I Dialog Settings workbench Settings get Plugin get Dialog Settings I Dialog Settings settings workbench Settings get Section TAG SORT SECTION sorter restore State settings viewer set Sorter sorter update the menu to indicate how task are currently sorted update Sorting State viewer set Input get Workspace get Root viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event Task List this selection Changed event viewer add Open Listener new I Open Listener public void open Open Event event goto Task Action run viewer get Control add Key Listener new Key Adapter public void key Pressed Key Event e handle Key Pressed e Add in some accessibility support to supplement the description that we already get from the SWT table viewer get Control get Accessible add Accessible Control Listener new Accessible Control Adapter non Javadoc see org eclipse swt accessibility Accessible Control Listener get Value org eclipse swt accessibility Accessible Control Event public void get Value Accessible Control Event e int child Index e childID if child Index ACC CHILDID SELF super get Value e return Object item viewer get Element At child Index if item instanceof I Marker I Marker marker I Marker item If it is editable all we need is completeness the rest is found by the table accessibility if Marker Util is Editable marker e result Marker Util get Complete Text marker else Otherwise all it needs is severity e result Marker Util get Kind Text marker else super get Value e return Cell Editor editors new Cell Editor column Headers length editors 1 new Checkbox Cell Editor table String priorities new String Task List Messages get String Task List high NON NLS 1 Task List Messages get String Task List normal NON NLS 1 Task List Messages get String Task List low NON NLS 1 editors 2 new Combo Box Cell Editor table priorities SWT READ ONLY editors 3 description Editor new Text Cell Editor table viewer set Cell Editors editors viewer set Cell Modifier cell Modifier viewer set Column Properties table Column Properties Configure the context menu to be lazily populated on each pop up Menu Manager menu Mgr new Menu Manager Popup Menu NON NLS 1 menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager Task List this fill Context Menu manager Menu menu menu Mgr create Context Menu table table set Menu menu Be sure to register it so that other plug ins can add actions get Site register Context Menu menu Mgr viewer Track selection in the page get Site get Page add Part Listener part Listener Add global action handlers editor Action Handler new Cell Editor Action Handler get View Site get Action Bars editor Action Handler add Cell Editor description Editor editor Action Handler set Copy Action copy Task Action editor Action Handler set Paste Action paste Task Action editor Action Handler set Delete Action remove Task Action editor Action Handler set Select All Action select All Action get View Site get Action Bars set Global Action Handler Action Factory PROPERTIES get Id properties Action get Site set Selection Provider viewer if memento null restore State memento memento null Set help on the view itself viewer get Control add Help Listener new Help Listener see Help Listener help Requested Help Event public void help Requested Help Event e String context Id null See if there is a context registered for the current selection I Marker marker I Marker I Structured Selection get Selection get First Element if marker null context Id IDE get Marker Help Registry get Help marker if context Id null context Id I Task List Help Context Ids TASK LIST VIEW Workbench Help display Help context Id Prime the status line and title update Status Message update Title  createPartControl0 getDisplay createTable TableViewer setUseHashlookup createColumns makeActions fillActionBars addDragSupport compositeMarkerLimitExceeded compositeMarkerLimitExceeded setLayout GridLayout labelMarkerLimitExceeded compositeMarkerLimitExceeded labelMarkerLimitExceeded setText TaskListMessages getString TaskList markerLimitExceeded setLayout stackLayout setMarkerLimitExceeded setContentProvider TaskListContentProvider setLabelProvider TaskListLabelProvider IMemento filterMem getChild TAG_FILTER filterMem getFilter restoreState filterMem TaskSorter IDialogSettings workbenchSettings getPlugin getDialogSettings IDialogSettings workbenchSettings getSection TAG_SORT_SECTION restoreState setSorter updateSortingState setInput getWorkspace getRoot addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent TaskList selectionChanged addOpenListener IOpenListener OpenEvent gotoTaskAction getControl addKeyListener KeyAdapter keyPressed KeyEvent handleKeyPressed getControl getAccessible addAccessibleControlListener AccessibleControlAdapter AccessibleControlListener getValue AccessibleControlEvent getValue AccessibleControlEvent childIndex childIndex CHILDID_SELF getValue getElementAt childIndex IMarker IMarker IMarker MarkerUtil isEditable MarkerUtil getCompleteText MarkerUtil getKindText getValue CellEditor CellEditor columnHeaders CheckboxCellEditor TaskListMessages getString TaskList TaskListMessages getString TaskList TaskListMessages getString TaskList ComboBoxCellEditor READ_ONLY descriptionEditor TextCellEditor setCellEditors setCellModifier cellModifier setColumnProperties tableColumnProperties MenuManager menuMgr MenuManager PopupMenu menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager TaskList fillContextMenu menuMgr createContextMenu setMenu getSite registerContextMenu menuMgr getSite getPage addPartListener partListener editorActionHandler CellEditorActionHandler getViewSite getActionBars editorActionHandler addCellEditor descriptionEditor editorActionHandler setCopyAction copyTaskAction editorActionHandler setPasteAction pasteTaskAction editorActionHandler setDeleteAction removeTaskAction editorActionHandler setSelectAllAction selectAllAction getViewSite getActionBars setGlobalActionHandler ActionFactory getId propertiesAction getSite setSelectionProvider restoreState getControl addHelpListener HelpListener HelpListener helpRequested HelpEvent helpRequested HelpEvent contextId IMarker IMarker IStructuredSelection getSelection getFirstElement contextId getMarkerHelpRegistry getHelp contextId contextId ITaskListHelpContextIds TASK_LIST_VIEW WorkbenchHelp displayHelp contextId updateStatusMessage updateTitle
Creates the table control void create Table Composite parent table new Table parent SWT H SCROLL SWT V SCROLL SWT MULTI SWT FULL SELECTION table set Lines Visible true table set Layout new Table Layout new Table Editor table  createTable H_SCROLL V_SCROLL FULL_SELECTION setLinesVisible setLayout TableLayout TableEditor
public void dispose super dispose get Site get Page remove Part Listener part Listener if focus Selection Provider null focus Selection Provider remove Selection Changed Listener focus Selection Changed Listener focus Selection Provider null focus Part null if editor Action Handler null editor Action Handler dispose editor Action Handler null if clipboard null clipboard dispose  getSite getPage removePartListener partListener focusSelectionProvider focusSelectionProvider removeSelectionChangedListener focusSelectionChangedListener focusSelectionProvider focusPart editorActionHandler editorActionHandler editorActionHandler
Activates the editor on the given marker public void edit I Marker marker viewer edit Element marker 3  IMarker editElement
Fills the local tool bar and menu manager with actions void fill Action Bars I Action Bars action Bars get View Site get Action Bars I Menu Manager menu action Bars get Menu Manager I Menu Manager submenu new Menu Manager Task List Messages get String Sort By Menu text NON NLS 1 menu add submenu submenu add sort By Category Action submenu add sort By Completed Action submenu add sort By Priority Action submenu add sort By Description Action submenu add sort By Resource Action submenu add sort By Container Action submenu add sort By Location Action submenu add sort By Creation Time Action submenu add new Separator submenu add sort Ascending Action submenu add sort Descending Action menu add filters Action I Tool Bar Manager tool Bar action Bars get Tool Bar Manager tool Bar add new Task Action tool Bar add remove Task Action tool Bar add filters Action  fillActionBars IActionBars actionBars getViewSite getActionBars IMenuManager actionBars getMenuManager IMenuManager MenuManager TaskListMessages getString SortByMenu sortByCategoryAction sortByCompletedAction sortByPriorityAction sortByDescriptionAction sortByResourceAction sortByContainerAction sortByLocationAction sortByCreationTimeAction sortAscendingAction sortDescendingAction filtersAction IToolBarManager toolBar actionBars getToolBarManager toolBar newTaskAction toolBar removeTaskAction toolBar filtersAction
Contributes actions to the pop up menu void fill Context Menu I Menu Manager menu update enabled state for actions that aren t updated in selection Changed I Structured Selection selection I Structured Selection get Selection mark Completed Action set Enabled mark Completed Action should Enable selection resolve Marker Action set Enabled resolve Marker Action should Enable selection add the actions to the menu menu add new Task Action menu add goto Task Action menu add new Separator menu add copy Task Action menu add paste Task Action menu add remove Task Action menu add new Separator menu add mark Completed Action menu add purge Completed Action menu add new Separator menu add resolve Marker Action menu add new Separator I Workbench Action Constants MB ADDITIONS menu add new Separator I Workbench Action Constants MB ADDITIONS end NON NLS 1 menu add properties Action  fillContextMenu IMenuManager selectionChanged IStructuredSelection IStructuredSelection getSelection markCompletedAction setEnabled markCompletedAction shouldEnable resolveMarkerAction setEnabled resolveMarkerAction shouldEnable newTaskAction gotoTaskAction copyTaskAction pasteTaskAction removeTaskAction markCompletedAction purgeCompletedAction resolveMarkerAction IWorkbenchActionConstants MB_ADDITIONS IWorkbenchActionConstants MB_ADDITIONS propertiesAction
new Runnable public void run Filter has already been updated by dialog just refresh Don t need to update labels for existing elements since changes to filter settings don t affect them viewer get Control set Redraw false viewer refresh false viewer get Control set Redraw true update after refresh since the content provider caches summary info update Status Message update Title  getControl setRedraw getControl setRedraw updateStatusMessage updateTitle
The filter settings have changed Refreshes the viewer and title bar void filter Changed Busy Indicator show While viewer get Control get Shell get Display new Runnable public void run Filter has already been updated by dialog just refresh Don t need to update labels for existing elements since changes to filter settings don t affect them viewer get Control set Redraw false viewer refresh false viewer get Control set Redraw true update after refresh since the content provider caches summary info update Status Message update Title  filterChanged BusyIndicator showWhile getControl getShell getDisplay getControl setRedraw getControl setRedraw updateStatusMessage updateTitle
void focus Selection Changed Selection Changed Event event update Focus Resource event get Selection  focusSelectionChanged SelectionChangedEvent updateFocusResource getSelection
if adapter I Show In Source class return new I Show In Source public Show In Context get Show In Context return new Show In Context null get Selection  IShowInSource IShowInSource ShowInContext getShowInContext ShowInContext getSelection
if adapter I Show In Target List class return new I Show In Target List public String get Show In Target Ids return new String I Page Layout ID RES NAV  IShowInTargetList IShowInTargetList getShowInTargetIds IPageLayout ID_RES_NAV
public Object get Adapter Class adapter if adapter I Show In Source class return new I Show In Source public Show In Context get Show In Context return new Show In Context null get Selection if adapter I Show In Target List class return new I Show In Target List public String get Show In Target Ids return new String I Page Layout ID RES NAV return super get Adapter adapter  getAdapter IShowInSource IShowInSource ShowInContext getShowInContext ShowInContext getSelection IShowInTargetList IShowInTargetList getShowInTargetIds IPageLayout ID_RES_NAV getAdapter
Returns a clipboard for cut copy paste actions p May only be called after this part s viewer has been created The clipboard is disposed when this part is disposed p return a clipboard since 2 0 package Clipboard get Clipboard return clipboard  getClipboard
Returns the filter for the viewer Tasks Filter get Filter return filter  TasksFilter getFilter
Returns the UI plugin for the task list static AbstractUI Plugin get Plugin return AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID  AbstractUIPlugin getPlugin AbstractUIPlugin getPlugin PLUGIN_ID
Returns the resource for which the task list is showing tasks return the resource possibly the workspace root public I Resource get Resource if show Selections if focus Resources null focus Resources length 1 focus Resources 0 null return focus Resources 0 return get Workspace get Root  IResource getResource showSelections focusResources focusResources focusResources focusResources getWorkspace getRoot
public I Resource get Resources if show Selections if focus Resources null return focus Resources return new I Resource get Workspace get Root  IResource getResources showSelections focusResources focusResources IResource getWorkspace getRoot
Returns the resource depth which the task list is using to show tasks return an code I Resource DEPTH  code constant int get Resource Depth if show Selections show Children Hierarchy return I Resource DEPTH ZERO else return I Resource DEPTH INFINITE  IResource DEPTH_ getResourceDepth showSelections showChildrenHierarchy IResource DEPTH_ZERO IResource DEPTH_INFINITE
API method which returns the current selection return the current selection element type code I Marker code public I Selection get Selection return viewer get Selection  IMarker ISelection getSelection getSelection
Returns the message to display in the status line String get Status Message I Structured Selection selection if selection null selection size 1 I Marker marker I Marker selection get First Element return Marker Util get Message marker Task List Content Provider provider Task List Content Provider viewer get Content Provider if selection null selection size 1 return provider get Status Summary Selected selection else return provider get Status Summary Visible  getStatusMessage IStructuredSelection IMarker IMarker getFirstElement MarkerUtil getMessage TaskListContentProvider TaskListContentProvider getContentProvider getStatusSummarySelected getStatusSummaryVisible
When created new task instance is cached in order to keep it at the top of the list until first edited This method returns it or null if there is no task instance pending for first editing Table Viewer get Table Viewer return viewer  TableViewer getTableViewer
Returns the workspace I Workspace get Workspace return Resources Plugin get Workspace  IWorkspace getWorkspace ResourcesPlugin getWorkspace
Handles key events in viewer void handle Key Pressed Key Event event if event character SWT DEL event state Mask 0 remove Task Action is Enabled remove Task Action run  handleKeyPressed KeyEvent stateMask removeTaskAction isEnabled removeTaskAction
public void init I View Site site I Memento memento throws Part Init Exception super init site memento this memento memento  IViewSite IMemento PartInitException
Returns whether we are interested in markers on the given resource boolean check Resource I Resource resource if show Selections return true I Resource resources get Resources I Resource resource2 if show Owner Project I Project project for int i 0 l resources length i l i resource2 resources i if resource2 null return true else project resource2 get Project if project null project equals resource get Project return true if show Children Hierarchy for int i 0 l resources length i l i resource2 resources i if resource2 null resource2 get Full Path is Prefix Of resource get Full Path return true else for int i 0 l resources length i l i resource2 resources i if resource equals resource2 return true return false  checkResource IResource showSelections IResource getResources IResource showOwnerProject IProject getProject getProject showChildrenHierarchy getFullPath isPrefixOf getFullPath
Returns whether the given marker should be shown given the current filter settings boolean should Show I Marker marker return check Resource marker get Resource get Filter select marker  shouldShow IMarker checkResource getResource getFilter
Makes actions used in the local tool bar and popup menu void make Actions I Shared Images shared Images PlatformUI get Workbench get Shared Images goto goto Task Action new Goto Task Action this goto File NON NLS 1 goto Task Action set Text Task List Messages get String Goto Task text NON NLS 1 goto Task Action set Tool Tip Text Task List Messages get String Goto Task tooltip NON NLS 1 goto Task Action set Image Descriptor Marker Util get Image Descriptor gotoobj NON NLS 1 goto Task Action set Enabled false new task new Task Action new New Task Action this new Task NON NLS 1 new Task Action set Text Task List Messages get String New Task text NON NLS 1 new Task Action set Tool Tip Text Task List Messages get String New Task tooltip NON NLS 1 new Task Action set Image Descriptor Marker Util get Image Descriptor addtsk NON NLS 1 new Task Action set Disabled Image Descriptor Marker Util get Image Descriptor addtsk disabled NON NLS 1 copy task copy Task Action new Copy Task Action this copy NON NLS 1 copy Task Action set Text Task List Messages get String Copy Task text NON NLS 1 copy Task Action set Tool Tip Text Task List Messages get String Copy Task tooltip NON NLS 1 copy Task Action set Enabled false paste task paste Task Action new Paste Task Action this paste NON NLS 1 paste Task Action set Text Task List Messages get String Paste Task text NON NLS 1 paste Task Action set Tool Tip Text Task List Messages get String Paste Task tooltip NON NLS 1 paste Task Action set Enabled false remove task remove Task Action new Remove Task Action this delete NON NLS 1 remove Task Action set Text Task List Messages get String Remove Task text NON NLS 1 remove Task Action set Tool Tip Text Task List Messages get String Remove Task tooltip NON NLS 1 remove Task Action set Image Descriptor shared Images get Image Descriptor I Shared Images IMG TOOL DELETE remove Task Action set Disabled Image Descriptor shared Images get Image Descriptor I Shared Images IMG TOOL DELETE DISABLED remove Task Action set Enabled false mark completed task mark Completed Action new Mark Completed Action this mark Completed NON NLS 1 mark Completed Action set Text Task List Messages get String Mark Completed text NON NLS 1 mark Completed Action set Tool Tip Text Task List Messages get String Mark Completed tooltip NON NLS 1 mark Completed Action set Enabled false delete completed task purge Completed Action new Purge Completed Action this delete Completed NON NLS 1 purge Completed Action set Text Task List Messages get String Purge Completed text NON NLS 1 purge Completed Action set Tool Tip Text Task List Messages get String Purge Completed tooltip NON NLS 1 purge Completed Action set Image Descriptor shared Images get Image Descriptor I Shared Images IMG TOOL DELETE purge Completed Action set Enabled true select all select All Action new Select All Tasks Action this select All NON NLS 1 select All Action set Text Task List Messages get String Select All text NON NLS 1 select All Action set Tool Tip Text Task List Messages get String Select All tooltip NON NLS 1 resolutions resolve Marker Action new Resolve Marker Action this resolve NON NLS 1 resolve Marker Action set Text Task List Messages get String Resolve text NON NLS 1 resolve Marker Action set Tool Tip Text Task List Messages get String Resolve tooltip NON NLS 1 resolve Marker Action set Enabled false Sort by sort By Category Action new Sort By Action Task Sorter TYPE sort By Category Action set Text Task List Messages get String Sort By Category text NON NLS 1 sort By Category Action set Tool Tip Text Task List Messages get String Sort By Category tooltip NON NLS 1 Workbench Help set Help sort By Category Action I Task List Help Context Ids TASK SORT TYPE ACTION sort By Completed Action new Sort By Action Task Sorter COMPLETION sort By Completed Action set Text Task List Messages get String Sort By Completed text NON NLS 1 sort By Completed Action set Tool Tip Text Task List Messages get String Sort By Completed tooltip NON NLS 1 Workbench Help set Help sort By Completed Action I Task List Help Context Ids TASK SORT COMPLETED ACTION sort By Priority Action new Sort By Action Task Sorter PRIORITY sort By Priority Action set Text Task List Messages get String Sort By Priority text NON NLS 1 sort By Priority Action set Tool Tip Text Task List Messages get String Sort By Priority tooltip NON NLS 1 Workbench Help set Help sort By Priority Action I Task List Help Context Ids TASK SORT PRIORITY ACTION sort By Description Action new Sort By Action Task Sorter DESCRIPTION sort By Description Action set Text Task List Messages get String Sort By Description text NON NLS 1 sort By Description Action set Tool Tip Text Task List Messages get String Sort By Description tooltip NON NLS 1 Workbench Help set Help sort By Description Action I Task List Help Context Ids TASK SORT DESCRIPTION ACTION sort By Resource Action new Sort By Action Task Sorter RESOURCE sort By Resource Action set Text Task List Messages get String Sort By Resource text NON NLS 1 sort By Resource Action set Tool Tip Text Task List Messages get String Sort By Resource tooltip NON NLS 1 Workbench Help set Help sort By Resource Action I Task List Help Context Ids TASK SORT RESOURCE ACTION sort By Container Action new Sort By Action Task Sorter FOLDER sort By Container Action set Text Task List Messages get String Sort By Container text NON NLS 1 sort By Container Action set Tool Tip Text Task List Messages get String Sort By Container tooltip NON NLS 1 Workbench Help set Help sort By Container Action I Task List Help Context Ids TASK SORT FOLDER ACTION sort By Location Action new Sort By Action Task Sorter LOCATION sort By Location Action set Text Task List Messages get String Sort By Location text NON NLS 1 sort By Location Action set Tool Tip Text Task List Messages get String Sort By Location tooltip NON NLS 1 Workbench Help set Help sort By Location Action I Task List Help Context Ids TASK SORT LOCATION ACTION sort By Creation Time Action new Sort By Action Task Sorter CREATION TIME sort By Creation Time Action set Text Task List Messages get String Sort By Creation Time text NON NLS 1 sort By Creation Time Action set Tool Tip Text Task List Messages get String Sort By Creation Time tooltip NON NLS 1 Workbench Help set Help sort By Creation Time Action I Task List Help Context Ids TASK SORT CREATION TIME ACTION sort Ascending Action new Sort Direction Action Task Sorter ASCENDING sort Ascending Action set Text Task List Messages get String Sort Ascending text NON NLS 1 sort Ascending Action set Tool Tip Text Task List Messages get String Sort Ascending tooltip NON NLS 1 Workbench Help set Help sort Ascending Action I Task List Help Context Ids TASK SORT ASCENDING ACTION sort Descending Action new Sort Direction Action Task Sorter DESCENDING sort Descending Action set Text Task List Messages get String Sort Descending text NON NLS 1 sort Descending Action set Tool Tip Text Task List Messages get String Sort Descending tooltip NON NLS 1 Workbench Help set Help sort Descending Action I Task List Help Context Ids TASK SORT DESCENDING ACTION filters filters Action new Filters Action this filter NON NLS 1 filters Action set Text Task List Messages get String Filters text NON NLS 1 filters Action set Tool Tip Text Task List Messages get String Filters tooltip NON NLS 1 filters Action set Image Descriptor Marker Util get Image Descriptor filter NON NLS 1 properties properties Action new Task Properties Action this properties NON NLS 1 properties Action set Text Task List Messages get String Properties text NON NLS 1 properties Action set Tool Tip Text Task List Messages get String Properties tooltip NON NLS 1 properties Action set Enabled false  makeActions ISharedImages sharedImages getWorkbench getSharedImages gotoTaskAction GotoTaskAction gotoFile gotoTaskAction setText TaskListMessages getString GotoTask gotoTaskAction setToolTipText TaskListMessages getString GotoTask gotoTaskAction setImageDescriptor MarkerUtil getImageDescriptor gotoTaskAction setEnabled newTaskAction NewTaskAction newTask newTaskAction setText TaskListMessages getString NewTask newTaskAction setToolTipText TaskListMessages getString NewTask newTaskAction setImageDescriptor MarkerUtil getImageDescriptor newTaskAction setDisabledImageDescriptor MarkerUtil getImageDescriptor addtsk_disabled copyTaskAction CopyTaskAction copyTaskAction setText TaskListMessages getString CopyTask copyTaskAction setToolTipText TaskListMessages getString CopyTask copyTaskAction setEnabled pasteTaskAction PasteTaskAction pasteTaskAction setText TaskListMessages getString PasteTask pasteTaskAction setToolTipText TaskListMessages getString PasteTask pasteTaskAction setEnabled removeTaskAction RemoveTaskAction removeTaskAction setText TaskListMessages getString RemoveTask removeTaskAction setToolTipText TaskListMessages getString RemoveTask removeTaskAction setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_DELETE removeTaskAction setDisabledImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_DELETE_DISABLED removeTaskAction setEnabled markCompletedAction MarkCompletedAction markCompleted markCompletedAction setText TaskListMessages getString MarkCompleted markCompletedAction setToolTipText TaskListMessages getString MarkCompleted markCompletedAction setEnabled purgeCompletedAction PurgeCompletedAction deleteCompleted purgeCompletedAction setText TaskListMessages getString PurgeCompleted purgeCompletedAction setToolTipText TaskListMessages getString PurgeCompleted purgeCompletedAction setImageDescriptor sharedImages getImageDescriptor ISharedImages IMG_TOOL_DELETE purgeCompletedAction setEnabled selectAllAction SelectAllTasksAction selectAll selectAllAction setText TaskListMessages getString SelectAll selectAllAction setToolTipText TaskListMessages getString SelectAll resolveMarkerAction ResolveMarkerAction resolveMarkerAction setText TaskListMessages getString resolveMarkerAction setToolTipText TaskListMessages getString resolveMarkerAction setEnabled sortByCategoryAction SortByAction TaskSorter sortByCategoryAction setText TaskListMessages getString SortByCategory sortByCategoryAction setToolTipText TaskListMessages getString SortByCategory WorkbenchHelp setHelp sortByCategoryAction ITaskListHelpContextIds TASK_SORT_TYPE_ACTION sortByCompletedAction SortByAction TaskSorter sortByCompletedAction setText TaskListMessages getString SortByCompleted sortByCompletedAction setToolTipText TaskListMessages getString SortByCompleted WorkbenchHelp setHelp sortByCompletedAction ITaskListHelpContextIds TASK_SORT_COMPLETED_ACTION sortByPriorityAction SortByAction TaskSorter sortByPriorityAction setText TaskListMessages getString SortByPriority sortByPriorityAction setToolTipText TaskListMessages getString SortByPriority WorkbenchHelp setHelp sortByPriorityAction ITaskListHelpContextIds TASK_SORT_PRIORITY_ACTION sortByDescriptionAction SortByAction TaskSorter sortByDescriptionAction setText TaskListMessages getString SortByDescription sortByDescriptionAction setToolTipText TaskListMessages getString SortByDescription WorkbenchHelp setHelp sortByDescriptionAction ITaskListHelpContextIds TASK_SORT_DESCRIPTION_ACTION sortByResourceAction SortByAction TaskSorter sortByResourceAction setText TaskListMessages getString SortByResource sortByResourceAction setToolTipText TaskListMessages getString SortByResource WorkbenchHelp setHelp sortByResourceAction ITaskListHelpContextIds TASK_SORT_RESOURCE_ACTION sortByContainerAction SortByAction TaskSorter sortByContainerAction setText TaskListMessages getString SortByContainer sortByContainerAction setToolTipText TaskListMessages getString SortByContainer WorkbenchHelp setHelp sortByContainerAction ITaskListHelpContextIds TASK_SORT_FOLDER_ACTION sortByLocationAction SortByAction TaskSorter sortByLocationAction setText TaskListMessages getString SortByLocation sortByLocationAction setToolTipText TaskListMessages getString SortByLocation WorkbenchHelp setHelp sortByLocationAction ITaskListHelpContextIds TASK_SORT_LOCATION_ACTION sortByCreationTimeAction SortByAction TaskSorter CREATION_TIME sortByCreationTimeAction setText TaskListMessages getString SortByCreationTime sortByCreationTimeAction setToolTipText TaskListMessages getString SortByCreationTime WorkbenchHelp setHelp sortByCreationTimeAction ITaskListHelpContextIds TASK_SORT_CREATION_TIME_ACTION sortAscendingAction SortDirectionAction TaskSorter sortAscendingAction setText TaskListMessages getString SortAscending sortAscendingAction setToolTipText TaskListMessages getString SortAscending WorkbenchHelp setHelp sortAscendingAction ITaskListHelpContextIds TASK_SORT_ASCENDING_ACTION sortDescendingAction SortDirectionAction TaskSorter sortDescendingAction setText TaskListMessages getString SortDescending sortDescendingAction setToolTipText TaskListMessages getString SortDescending WorkbenchHelp setHelp sortDescendingAction ITaskListHelpContextIds TASK_SORT_DESCENDING_ACTION filtersAction FiltersAction filtersAction setText TaskListMessages getString filtersAction setToolTipText TaskListMessages getString filtersAction setImageDescriptor MarkerUtil getImageDescriptor propertiesAction TaskPropertiesAction propertiesAction setText TaskListMessages getString propertiesAction setToolTipText TaskListMessages getString propertiesAction setEnabled
The markers have changed Update the status line and title bar void markers Changed update Status Message update Title  markersChanged updateStatusMessage updateTitle
void part Activated I Workbench Part part if part focus Part return if focus Selection Provider null focus Selection Provider remove Selection Changed Listener focus Selection Changed Listener focus Selection Provider null focus Part part if focus Part null focus Selection Provider focus Part get Site get Selection Provider if focus Selection Provider null focus Selection Provider add Selection Changed Listener focus Selection Changed Listener update Focus Resource focus Selection Provider get Selection else update Focus Resource null  partActivated IWorkbenchPart focusPart focusSelectionProvider focusSelectionProvider removeSelectionChangedListener focusSelectionChangedListener focusSelectionProvider focusPart focusPart focusSelectionProvider focusPart getSite getSelectionProvider focusSelectionProvider focusSelectionProvider addSelectionChangedListener focusSelectionChangedListener updateFocusResource focusSelectionProvider getSelection updateFocusResource
void part Closed I Workbench Part part if part focus Part return if focus Selection Provider null focus Selection Provider remove Selection Changed Listener focus Selection Changed Listener focus Selection Provider null focus Part null  partClosed IWorkbenchPart focusPart focusSelectionProvider focusSelectionProvider removeSelectionChangedListener focusSelectionChangedListener focusSelectionProvider focusPart
The user is attempting to drag marker data Add the appropriate data to the event depending on the transfer type void perform Drag Set Data Drag Source Event event if Marker Transfer get Instance is Supported Type event data Type event data I Structured Selection viewer get Selection to Array return if Text Transfer get Instance is Supported Type event data Type Object data I Structured Selection viewer get Selection to Array if data null I Marker markers new I Marker data length for int i 0 i markers length i markers i I Marker data i event data create Marker Report markers return  performDragSetData DragSourceEvent MarkerTransfer getInstance isSupportedType dataType IStructuredSelection getSelection toArray TextTransfer getInstance isSupportedType dataType IStructuredSelection getSelection toArray IMarker IMarker IMarker createMarkerReport
void restore State I Memento memento restore selection I Workspace Root root Resources Plugin get Workspace get Root I Memento selection Mem memento get Child TAG SELECTION if selection Mem null Array List selection List new Array List I Memento marker Mems selection Mem get Children TAG MARKER for int i 0 i marker Mems length i try long id Long parse Long marker Mems i get String TAG ID I Resource resource root find Member marker Mems i get String TAG RESOURCE if resource null I Marker marker resource find Marker id if marker null selection List add marker catch Number Format Exception e catch Core Exception e viewer set Selection new Structured Selection selection List Table table viewer get Table restore vertical position try String top Index Str memento get String TAG TOP INDEX table set Top Index Integer parse Int top Index Str catch Number Format Exception e  restoreState IMemento IWorkspaceRoot ResourcesPlugin getWorkspace getRoot IMemento selectionMem getChild TAG_SELECTION selectionMem ArrayList selectionList ArrayList IMemento markerMems selectionMem getChildren TAG_MARKER markerMems parseLong markerMems getString TAG_ID IResource findMember markerMems getString TAG_RESOURCE IMarker findMarker selectionList NumberFormatException CoreException setSelection StructuredSelection selectionList getTable topIndexStr getString TAG_TOP_INDEX setTopIndex parseInt topIndexStr NumberFormatException
public void save State I Memento memento if viewer null if this memento null Keep the old state memento put Memento this memento return save filter get Filter save State memento create Child TAG FILTER save columns width Table table viewer get Table Table Column columns table get Columns check whether it has ever been layed out workaround for 1GDTU19 ITPUI WIN2000 Task list columns collapsed left boolean should Save false for int i 0 i columns length i if column Layouts i resizable columns i get Width 0 should Save true break if should Save for int i 0 i columns length i if column Layouts i resizable I Memento child memento create Child TAG COLUMN child put Integer TAG NUMBER i child put Integer TAG WIDTH columns i get Width save selection Object markers I Structured Selection viewer get Selection to Array if markers length 0 I Memento selection Mem memento create Child TAG SELECTION for int i 0 i markers length i I Memento element Mem selection Mem create Child TAG MARKER I Marker marker I Marker markers i element Mem put String TAG RESOURCE marker get Resource get Full Path to String element Mem put String TAG ID String value Of marker get Id save vertical position int top Index table get Top Index memento put String TAG TOP INDEX String value Of top Index  saveState IMemento putMemento getFilter saveState createChild TAG_FILTER getTable TableColumn getColumns shouldSave columnLayouts getWidth shouldSave shouldSave columnLayouts IMemento createChild TAG_COLUMN putInteger TAG_NUMBER putInteger TAG_WIDTH getWidth IStructuredSelection getSelection toArray IMemento selectionMem createChild TAG_SELECTION IMemento elementMem selectionMem createChild TAG_MARKER IMarker IMarker elementMem putString TAG_RESOURCE getResource getFullPath toString elementMem putString TAG_ID valueOf getId topIndex getTopIndex putString TAG_TOP_INDEX valueOf topIndex
Handles marker selection change in the task list by updating availability of the actions in the local tool bar void selection Changed Selection Changed Event event I Structured Selection selection I Structured Selection event get Selection update Status Message selection update Title update Paste Enablement If selection is empty then disable copy remove and goto if selection is Empty copy Task Action set Enabled false remove Task Action set Enabled false goto Task Action set Enabled false properties Action set Enabled false return Can only open properties for a single task at a time properties Action set Enabled selection size 1 Can always copy copy Task Action set Enabled true Determine if goto should be enabled I Marker selected Marker I Marker selection get First Element boolean can Jump selection size 1 selected Marker get Resource get Type I Resource FILE goto Task Action set Enabled can Jump Determine if remove should be enabled boolean can Remove true for Iterator markers selection iterator markers has Next I Marker m I Marker markers next if Marker Util is Editable m can Remove false break remove Task Action set Enabled can Remove if there is an active editor on the selection s input tell the editor to goto the marker if can Jump I Editor Part editor get Site get Page get Active Editor if editor null I Editor Input input editor get Editor Input if input instanceof I File Editor Input I File file I File Editor Input input get File if selected Marker get Resource equals file IDE goto Marker editor selected Marker  selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection updateStatusMessage updateTitle updatePasteEnablement isEmpty copyTaskAction setEnabled removeTaskAction setEnabled gotoTaskAction setEnabled propertiesAction setEnabled propertiesAction setEnabled copyTaskAction setEnabled IMarker selectedMarker IMarker getFirstElement canJump selectedMarker getResource getType IResource gotoTaskAction setEnabled canJump canRemove hasNext IMarker IMarker MarkerUtil isEditable canRemove removeTaskAction setEnabled canRemove canJump IEditorPart getSite getPage getActiveEditor IEditorInput getEditorInput IFileEditorInput IFile IFileEditorInput getFile selectedMarker getResource gotoMarker selectedMarker
Method declared on I Workbench Part public void set Focus viewer get Control set Focus  IWorkbenchPart setFocus getControl setFocus
Sets the property on a marker to the given value exception Core Exception if an error occurs setting the value void set Property I Marker marker String property Object value if Marker Util get Property marker property equals value return try if property table Column Properties 1 Completed marker set Attribute I Marker DONE value else if property table Column Properties 2 Priority this property is used only by cell editor where order is High Normal Low marker set Attribute I Marker PRIORITY I Marker PRIORITY HIGH Integer value int Value else if property table Column Properties 3 Description marker set Attribute I Marker MESSAGE value Let s not refilter too lightly see if it is needed Task Sorter sorter Task Sorter viewer get Sorter if sorter null sorter get Column Number 3 viewer refresh catch Core Exception e String msg Task List Messages get String Task List error Modifying Task NON NLS 1 Error Dialog open Error get Site get Shell msg null e get Status  CoreException setProperty IMarker MarkerUtil getProperty tableColumnProperties setAttribute IMarker tableColumnProperties setAttribute IMarker IMarker PRIORITY_HIGH intValue tableColumnProperties setAttribute IMarker TaskSorter TaskSorter getSorter getColumnNumber CoreException TaskListMessages getString TaskList errorModifyingTask ErrorDialog openError getSite getShell getStatus
API method which sets the current selection of this viewer param selection a structured selection of code I Marker code objects param reveal code true code to reveal the selection false otherwise public void set Selection I Selection selection boolean reveal Assert is True selection instanceof I Structured Selection I Structured Selection ssel I Structured Selection selection for Iterator i ssel iterator i has Next Assert is True i next instanceof I Marker if viewer null viewer set Selection selection reveal  IMarker setSelection ISelection isTrue IStructuredSelection IStructuredSelection IStructuredSelection hasNext isTrue IMarker setSelection
boolean show Children Hierarchy switch get Filter on Resource case Tasks Filter ON ANY RESOURCE case Tasks Filter ON SELECTED RESOURCE AND CHILDREN case Tasks Filter ON ANY RESOURCE OF SAME PROJECT added by cagatayk acm org case Tasks Filter ON WORKING SET default return true case Tasks Filter ON SELECTED RESOURCE ONLY return false  showChildrenHierarchy getFilter onResource TasksFilter ON_ANY_RESOURCE TasksFilter ON_SELECTED_RESOURCE_AND_CHILDREN TasksFilter ON_ANY_RESOURCE_OF_SAME_PROJECT TasksFilter ON_WORKING_SET TasksFilter ON_SELECTED_RESOURCE_ONLY
boolean show Selections switch get Filter on Resource case Tasks Filter ON SELECTED RESOURCE ONLY case Tasks Filter ON SELECTED RESOURCE AND CHILDREN case Tasks Filter ON ANY RESOURCE OF SAME PROJECT added by cagatayk acm org return true case Tasks Filter ON ANY RESOURCE case Tasks Filter ON WORKING SET default return false  showSelections getFilter onResource TasksFilter ON_SELECTED_RESOURCE_ONLY TasksFilter ON_SELECTED_RESOURCE_AND_CHILDREN TasksFilter ON_ANY_RESOURCE_OF_SAME_PROJECT TasksFilter ON_ANY_RESOURCE TasksFilter ON_WORKING_SET
show Owner Project added by cagatayk acm org boolean show Owner Project return get Filter on Resource Tasks Filter ON ANY RESOURCE OF SAME PROJECT  showOwnerProject showOwnerProject getFilter onResource TasksFilter ON_ANY_RESOURCE_OF_SAME_PROJECT
Processes state change of the show Selections switch If true it will resync with the saved input element Otherwise it will reconfigure to show all the problems tasks in the workbench void toggle Input Selection boolean value if value handle Input input Selection false else detach from input and link to the workbench object handle Input Workbench Plugin get Plugin Workbench true update Title  showSelections toggleInputSelection handleInput inputSelection handleInput WorkbenchPlugin getPluginWorkbench updateTitle
If true current input will be remembered and further selections will be ignored void toggle Lock Input boolean value if value handle Input input Selection false locked Input null else locked Input I Element get Input String locked Input Path if locked Input null locked Input instanceof I Resource I Resource resource I Resource locked Input locked Input Path resource get Full Path to String I Dialog Store store Workbench Plugin get Default get Dialog Store store put STORE LOCKED INPUT locked Input Path update Title  toggleLockInput handleInput inputSelection lockedInput lockedInput IElement getInput lockedInputPath lockedInput lockedInput IResource IResource IResource lockedInput lockedInputPath getFullPath toString IDialogStore WorkbenchPlugin getDefault getDialogStore STORE_LOCKED_INPUT lockedInputPath updateTitle
Updates the focus resource and refreshes if we re showing only tasks for the focus resource void update Focus Resource I Selection selection Array List list new Array List if selection instanceof I Structured Selection Iterator iterator I Structured Selection selection iterator while iterator has Next Object object iterator next if object instanceof I Adaptable I Task List Resource Adapter task List Resource Adapter Object adapter I Adaptable object get Adapter I Task List Resource Adapter class if adapter null adapter instanceof I Task List Resource Adapter task List Resource Adapter I Task List Resource Adapter adapter else task List Resource Adapter Default Task List Resource Adapter get Default I Resource resource task List Resource Adapter get Affected Resource I Adaptable object if resource null list add resource if list size 0 focus Part instanceof I Editor Part I Editor Input input I Editor Part focus Part get Editor Input if input null if input instanceof I File Editor Input I File file I File Editor Input input get File if file null list add file else I Resource resource I Resource input get Adapter I Resource class if resource null resource I File input get Adapter I File class if resource null list add resource int l list size if l 1 return required to achieve lazy update behavior I Resource resources I Resource list to Array new I Resource l for int i 0 i l i Assert is Not Null resources i if Arrays equals resources focus Resources boolean update Needed false if show Owner Project int m focus Resources null 0 focus Resources length if l m update Needed true else for int i 0 i l i I Project old Project m 1 null focus Resources 0 get Project I Project new Project resources 0 get Project boolean projects Equal old Project null new Project null old Project equals new Project if projects Equal update Needed true break else if show Selections update Needed true remember the focus resources even if update is not needed so that we know them if the filter settings change focus Resources resources if update Needed viewer get Control set Redraw false viewer refresh viewer get Control set Redraw true update Status Message update Title  updateFocusResource ISelection ArrayList ArrayList IStructuredSelection IStructuredSelection hasNext IAdaptable ITaskListResourceAdapter taskListResourceAdapter IAdaptable getAdapter ITaskListResourceAdapter ITaskListResourceAdapter taskListResourceAdapter ITaskListResourceAdapter taskListResourceAdapter DefaultTaskListResourceAdapter getDefault IResource taskListResourceAdapter getAffectedResource IAdaptable focusPart IEditorPart IEditorInput IEditorPart focusPart getEditorInput IFileEditorInput IFile IFileEditorInput getFile IResource IResource getAdapter IResource IFile getAdapter IFile IResource IResource toArray IResource isNotNull focusResources updateNeeded showOwnerProject focusResources focusResources updateNeeded IProject oldProject focusResources getProject IProject newProject getProject projectsEqual oldProject newProject oldProject newProject projectsEqual updateNeeded showSelections updateNeeded focusResources updateNeeded getControl setRedraw getControl setRedraw updateStatusMessage updateTitle
Updates the enablement of the paste action void update Paste Enablement Paste if clipboard contains tasks Marker Transfer transfer Marker Transfer get Instance I Marker marker Data I Marker get Clipboard get Contents transfer boolean can Paste false if marker Data null for int i 0 i marker Data length i if Marker Util is Marker Type marker Data i I Marker TASK can Paste true break paste Task Action set Enabled can Paste  updatePasteEnablement MarkerTransfer MarkerTransfer getInstance IMarker markerData IMarker getClipboard getContents canPaste markerData markerData MarkerUtil isMarkerType markerData IMarker canPaste pasteTaskAction setEnabled canPaste
Updates that message displayed in the status line void update Status Message I Selection selection viewer get Selection if selection instanceof I Structured Selection update Status Message I Structured Selection selection else update Status Message null  updateStatusMessage ISelection getSelection IStructuredSelection updateStatusMessage IStructuredSelection updateStatusMessage
Updates that message displayed in the status line void update Status Message I Structured Selection selection String message get Status Message selection get View Site get Action Bars get Status Line Manager set Message message  updateStatusMessage IStructuredSelection getStatusMessage getViewSite getActionBars getStatusLineManager setMessage
Updates the title of the view Should be called when filters change void update Title Task List Content Provider provider Task List Content Provider get Table Viewer get Content Provider String summary provider get Title Summary set Content Description summary  updateTitle TaskListContentProvider TaskListContentProvider getTableViewer getContentProvider getTitleSummary setContentDescription
Method update Sorting State void update Sorting State int cur Column sorter get Top Priority sort By Category Action set Checked cur Column Task Sorter TYPE sort By Completed Action set Checked cur Column Task Sorter COMPLETION sort By Priority Action set Checked cur Column Task Sorter PRIORITY sort By Description Action set Checked cur Column Task Sorter DESCRIPTION sort By Resource Action set Checked cur Column Task Sorter RESOURCE sort By Container Action set Checked cur Column Task Sorter FOLDER sort By Location Action set Checked cur Column Task Sorter LOCATION sort By Creation Time Action set Checked cur Column Task Sorter CREATION TIME int cur Direction sorter get Top Priority Direction sort Ascending Action set Checked cur Direction Task Sorter ASCENDING sort Descending Action set Checked cur Direction Task Sorter DESCENDING  updateSortingState updateSortingState curColumn getTopPriority sortByCategoryAction setChecked curColumn TaskSorter sortByCompletedAction setChecked curColumn TaskSorter sortByPriorityAction setChecked curColumn TaskSorter sortByDescriptionAction setChecked curColumn TaskSorter sortByResourceAction setChecked curColumn TaskSorter sortByContainerAction setChecked curColumn TaskSorter sortByLocationAction setChecked curColumn TaskSorter sortByCreationTimeAction setChecked curColumn TaskSorter CREATION_TIME curDirection getTopPriorityDirection sortAscendingAction setChecked curDirection TaskSorter sortDescendingAction setChecked curDirection TaskSorter

The constructor public Task List Content Provider Task List task List this task List task List this viewer task List get Table Viewer  TaskListContentProvider TaskList taskList taskList taskList taskList getTableViewer
private boolean get Filter On Marker Limit return task List get Filter get Filter On Marker Limit  getFilterOnMarkerLimit taskList getFilter getFilterOnMarkerLimit
private int get Marker Limit return task List get Filter get Marker Limit  getMarkerLimit taskList getFilter getMarkerLimit
private boolean is Marker Limit Exceeded return task List is Marker Limit Exceeded  isMarkerLimitExceeded taskList isMarkerLimitExceeded
private void set Marker Limit Exceeded boolean marker Limit Exceeded task List set Marker Limit Exceeded marker Limit Exceeded  setMarkerLimitExceeded markerLimitExceeded taskList setMarkerLimitExceeded markerLimitExceeded
Returns a one line string containing a summary of the number of visible tasks and problems public String get Status Summary Visible if visible Marker Counts null return NON NLS 1 return Task List Messages format Task List status Summary Visible NON NLS 1 new Object new Integer sum visible Marker Counts get Status Summary Breakdown visible Marker Counts  getStatusSummaryVisible visibleMarkerCounts TaskListMessages TaskList statusSummaryVisible visibleMarkerCounts getStatusSummaryBreakdown visibleMarkerCounts
Returns a one line string containing a summary of the number of selected tasks and problems param selection the current selection public String get Status Summary Selected I Structured Selection selection int selected Marker Counts get Marker Counts selection to List return Task List Messages format Task List status Summary Selected NON NLS 1 new Object new Integer sum selected Marker Counts get Status Summary Breakdown selected Marker Counts  getStatusSummarySelected IStructuredSelection selectedMarkerCounts getMarkerCounts toList TaskListMessages TaskList statusSummarySelected selectedMarkerCounts getStatusSummaryBreakdown selectedMarkerCounts
Returns a one line string containing a summary of the number of given tasks errors warnings and infos private String get Status Summary Breakdown int counts return Task List Messages format Task List status Summary Breakdown NON NLS 1 new Object new Integer counts TASKS new Integer counts ERRORS new Integer counts WARNINGS new Integer counts INFOS  getStatusSummaryBreakdown TaskListMessages TaskList statusSummaryBreakdown
Returns a one line string containing a summary of the number items being shown by the filter for display in the title bar public String get Title Summary if visible Marker Counts null return NON NLS 1 int visible Marker Count sum visible Marker Counts Tasks Filter filter Tasks Filter task List get Filter if filter is Showing All return Task List Messages format Task List title Summary Unfiltered NON NLS 1 new Object new Integer visible Marker Count else return Task List Messages format Task List title Summary Filtered NON NLS 1 new Object new Integer visible Marker Count new Integer get Total Marker Count  getTitleSummary visibleMarkerCounts visibleMarkerCount visibleMarkerCounts TasksFilter TasksFilter taskList getFilter isShowingAll TaskListMessages TaskList titleSummaryUnfiltered visibleMarkerCount TaskListMessages TaskList titleSummaryFiltered visibleMarkerCount getTotalMarkerCount
Returns the sum of the given counts private int sum int counts int sum 0 for int i 0 l counts length i l i sum counts i return sum 
Returns the count of all markers in the workspace which can be shown in the task list This is computed once then maintained incrementally by the delta processing private int get Total Marker Count if total Marker Count 1 total Marker Count 0 try I Resource root task List get Workspace get Root I Marker markers root find Markers null true I Resource DEPTH INFINITE for int i 0 i markers length i if is Root Type markers i total Marker Count catch Core Exception e shouldn t happen return total Marker Count  getTotalMarkerCount totalMarkerCount totalMarkerCount IResource taskList getWorkspace getRoot IMarker findMarkers IResource DEPTH_INFINITE isRootType totalMarkerCount CoreException totalMarkerCount
Returns whether the given marker is a subtype of one of the root types private boolean is Root Type I Marker marker String root Types Tasks Filter ROOT TYPES for int i 0 l root Types length i l i if Marker Util is Marker Type marker root Types i return true return false  isRootType IMarker rootTypes TasksFilter ROOT_TYPES rootTypes MarkerUtil isMarkerType rootTypes
Returns the markers to show in the task list private I Marker get Markers throws Core Exception I Resource resources task List get Resources int l resources length I Resource resource boolean b Exists false for int i 0 i l i resource resources i if resource null resource exists b Exists true break if b Exists return new I Marker 0 if task List show Owner Project I Resource project Resources new I Resource l I Resource project for int i 0 i l i resource resources i if resource null project resource get Project if project null project Resources i project else project Resources i resource resources project Resources int depth task List get Resource Depth Tasks Filter filter task List get Filter Set set new Hash Set for int i 0 i l i resource resources i if resource null I Marker markers resource find Markers null true depth for int j 0 j markers length j I Marker marker markers j if filter select marker set add marker I Marker result new I Marker set size set to Array result return result  IMarker getMarkers CoreException IResource taskList getResources IResource bExists bExists bExists IMarker taskList showOwnerProject IResource projectResources IResource IResource getProject projectResources projectResources projectResources taskList getResourceDepth TasksFilter taskList getFilter HashSet IMarker findMarkers IMarker IMarker IMarker toArray
Returns the number of tasks errors warnings infos in the given markers private int get Marker Counts List markers int marker Counts new int 4 Iterator iterator markers iterator while iterator has Next I Marker marker I Marker iterator next if Marker Util is Marker Type marker I Marker PROBLEM switch Marker Util get Severity marker case I Marker SEVERITY ERROR marker Counts ERRORS break case I Marker SEVERITY WARNING marker Counts WARNINGS break case I Marker SEVERITY INFO marker Counts INFOS break else if Marker Util is Marker Type marker I Marker TASK marker Counts TASKS return marker Counts  getMarkerCounts markerCounts hasNext IMarker IMarker MarkerUtil isMarkerType IMarker MarkerUtil getSeverity IMarker SEVERITY_ERROR markerCounts IMarker SEVERITY_WARNING markerCounts IMarker SEVERITY_INFO markerCounts MarkerUtil isMarkerType IMarker markerCounts markerCounts
Updates the marker counts for the given delta Assumptions the delta is either an addition or a removal problem severities don t change private void update Marker Counts I Marker Delta marker Delta int difference if visible Marker Counts null return if marker Delta is Subtype Of I Marker PROBLEM int severity marker Delta get Attribute I Marker SEVERITY I Marker SEVERITY WARNING switch severity case I Marker SEVERITY ERROR visible Marker Counts ERRORS difference break case I Marker SEVERITY WARNING visible Marker Counts WARNINGS difference break case I Marker SEVERITY INFO visible Marker Counts INFOS difference break else if marker Delta is Subtype Of I Marker TASK visible Marker Counts TASKS difference  updateMarkerCounts IMarkerDelta markerDelta visibleMarkerCounts markerDelta isSubtypeOf IMarker markerDelta getAttribute IMarker IMarker SEVERITY_WARNING IMarker SEVERITY_ERROR visibleMarkerCounts IMarker SEVERITY_WARNING visibleMarkerCounts IMarker SEVERITY_INFO visibleMarkerCounts markerDelta isSubtypeOf IMarker visibleMarkerCounts
Updates the viewer given the lists of added removed and changes markers This is called inside an sync Exec private void update Viewer List additions List removals List changes The widget may have been destroyed by the time this is run Check for this and do nothing if so Control ctrl viewer get Control if ctrl null ctrl is Disposed return update the viewer based on the marker changes process removals before additions to avoid multiple equal elements in the viewer if removals size 0 Cancel any open cell editor We assume that the one being edited is the one being removed viewer cancel Editing viewer remove removals to Array if additions size 0 viewer add additions to Array if changes size 0 viewer update changes to Array null  syncExec updateViewer getControl isDisposed cancelEditing toArray toArray toArray
The visual part that is using this content provider is about to be disposed Deallocate all allocated SWT resources public void dispose if input null input get Workspace remove Resource Change Listener this input null  getWorkspace removeResourceChangeListener
public void input Changed Viewer viewer Object old Input Object new Input if this input null this input get Workspace remove Resource Change Listener this this input I Resource new Input if this input null this input get Workspace add Resource Change Listener this I Resource Change Event POST CHANGE this viewer Table Viewer viewer  inputChanged oldInput newInput getWorkspace removeResourceChangeListener IResource newInput getWorkspace addResourceChangeListener IResourceChangeEvent POST_CHANGE TableViewer
viewer get Control get Display sync Exec new Runnable public void run viewer refresh  getControl getDisplay syncExec
viewer get Control get Display sync Exec new Runnable public void run viewer refresh  getControl getDisplay syncExec
Returns all the markers that should be shown for the current settings public Object get Elements Object parent try I Marker markers get Markers this visible Marker Counts get Marker Counts Arrays as List markers if get Filter On Marker Limit markers length get Marker Limit if is Marker Limit Exceeded set Marker Limit Exceeded true viewer get Control get Display sync Exec new Runnable public void run viewer refresh return new I Marker 0 else if is Marker Limit Exceeded set Marker Limit Exceeded false viewer get Control get Display sync Exec new Runnable public void run viewer refresh return markers catch Core Exception e return new I Marker 0  getElements IMarker getMarkers visibleMarkerCounts getMarkerCounts asList getFilterOnMarkerLimit getMarkerLimit isMarkerLimitExceeded setMarkerLimitExceeded getControl getDisplay syncExec IMarker isMarkerLimitExceeded setMarkerLimitExceeded getControl getDisplay syncExec CoreException IMarker
viewer get Control get Display sync Exec new Runnable public void run if get Filter On Marker Limit sum visible Marker Counts get Marker Limit if is Marker Limit Exceeded set Marker Limit Exceeded true viewer refresh else if task List is Marker Limit Exceeded set Marker Limit Exceeded false viewer refresh else update Viewer additions removals changes Update the task list s status message XXX Quick and dirty solution here Would be better to have a separate model for the tasks and have both the content provider and the task list register for updates XXX Do this inside the sync Exec since we re talking to status line widget task List markers Changed  getControl getDisplay syncExec getFilterOnMarkerLimit visibleMarkerCounts getMarkerLimit isMarkerLimitExceeded setMarkerLimitExceeded taskList isMarkerLimitExceeded setMarkerLimitExceeded updateViewer syncExec taskList markersChanged
The workbench has changed Process the delta and issue updates to the viewer inside the UI thread see I Resource Change Listener resource Changed public void resource Changed final I Resource Change Event event gather all marker changes from the delta be sure to do this in the calling thread as the delta is destroyed when this method returns I Marker Delta marker Deltas event find Marker Deltas null true if marker Deltas null return int old Total total Marker Count final List additions new Array List final List removals new Array List final List changes new Array List for int i 0 i marker Deltas length i I Marker Delta marker Delta marker Deltas i if marker Delta null continue int i Kind marker Delta get Kind for int j 0 j Tasks Filter ROOT TYPES length j if marker Delta is Subtype Of Tasks Filter ROOT TYPES j Updates the total count of markers given the applicable marker deltas if total Marker Count 1 switch i Kind case I Resource Delta ADDED total Marker Count break case I Resource Delta REMOVED total Marker Count break Partition the marker deltas into one of the three given lists depending on the type of delta add remove or change The resulting lists contain the corresponding markers not the deltas Deltas which are not under the current focus resource are discarded This also updates the marker counts I Resource resource marker Delta get Resource if resource null continue boolean affected By task List check Resource resource task List get Filter select marker Delta if affected By I Marker marker marker Delta get Marker switch i Kind case I Resource Delta ADDED additions add marker update Marker Counts marker Delta 1 break case I Resource Delta REMOVED removals add marker update Marker Counts marker Delta 1 break case I Resource Delta CHANGED changes add marker Assume attribute changes don t affect marker counts This is only true if problem severities can t change break break if old Total total Marker Count additions size removals size changes size 0 no changes to markers that we care about return do the required viewer updates in the UI thread need to use sync Exec see 1G95PU8 ITPUI WIN2000 Changing task description flashes old description viewer get Control get Display sync Exec new Runnable public void run if get Filter On Marker Limit sum visible Marker Counts get Marker Limit if is Marker Limit Exceeded set Marker Limit Exceeded true viewer refresh else if task List is Marker Limit Exceeded set Marker Limit Exceeded false viewer refresh else update Viewer additions removals changes Update the task list s status message XXX Quick and dirty solution here Would be better to have a separate model for the tasks and have both the content provider and the task list register for updates XXX Do this inside the sync Exec since we re talking to status line widget task List markers Changed  IResourceChangeListener resourceChanged resourceChanged IResourceChangeEvent IMarkerDelta markerDeltas findMarkerDeltas markerDeltas oldTotal totalMarkerCount ArrayList ArrayList ArrayList markerDeltas IMarkerDelta markerDelta markerDeltas markerDelta iKind markerDelta getKind TasksFilter ROOT_TYPES markerDelta isSubtypeOf TasksFilter ROOT_TYPES totalMarkerCount iKind IResourceDelta totalMarkerCount IResourceDelta totalMarkerCount IResource markerDelta getResource affectedBy taskList checkResource taskList getFilter markerDelta affectedBy IMarker markerDelta getMarker iKind IResourceDelta updateMarkerCounts markerDelta IResourceDelta updateMarkerCounts markerDelta IResourceDelta oldTotal totalMarkerCount syncExec getControl getDisplay syncExec getFilterOnMarkerLimit visibleMarkerCounts getMarkerLimit isMarkerLimitExceeded setMarkerLimitExceeded taskList isMarkerLimitExceeded setMarkerLimitExceeded updateViewer syncExec taskList markersChanged

private static Resource Bundle bundle Resource Bundle get Bundle RESOURCE BUNDLE private Task List Messages prevent instantiation of class  ResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE TaskListMessages
Returns the formatted message for the given key in the 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  MessageFormat getString
Returns the resource object with the given key in the 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  getString getString MissingResourceException

Creates the action public Task Properties Action Task List tasklist String id super tasklist id Workbench Help set Help this I Task List Help Context Ids TASK PROPERTIES ACTION  TaskPropertiesAction TaskList WorkbenchHelp setHelp ITaskListHelpContextIds TASK_PROPERTIES_ACTION
Performs this action public void run I Structured Selection sel I Structured Selection get Task List get Selection Object o sel get First Element if o instanceof I Marker Task Properties Dialog dialog new Task Properties Dialog get Shell dialog set Marker I Marker o dialog open  IStructuredSelection IStructuredSelection getTaskList getSelection getFirstElement IMarker TaskPropertiesDialog TaskPropertiesDialog getShell setMarker IMarker

Creates the dialog By default this dialog creates a new task To set the resource and initial attributes for the new task use code set Resource code and code set Initial Attributes code To show or modify an existing task use code set Marker code param parent Shell the parent shell public Task Properties Dialog Shell parent Shell super parent Shell  setResource setInitialAttributes setMarker parentShell TaskPropertiesDialog parentShell parentShell
Sets the marker to show or modify param marker the marker or code null code to create a new marker public void set Marker I Marker marker this marker marker  setMarker IMarker
Returns the marker being created or modified For a new marker this returns code null code until the dialog returns but is non null after public I Marker get Marker return marker  IMarker getMarker
Sets the resource to use when creating a new task If not set the new task is created on the workspace root public void set Resource I Resource resource this resource resource  setResource IResource
Returns the resource to use when creating a new task or code null code if none has been set If not set the new task is created on the workspace root public I Resource get Resource return resource  IResource getResource
Sets initial attributes to use when creating a new task If not set the new task is created with default attributes public void set Initial Attributes Map initial Attributes this initial Attributes initial Attributes  setInitialAttributes initialAttributes initialAttributes initialAttributes
Returns the initial attributes to use when creating a new task or code null code if not set If not set the new task is created with default attributes public Map get Initial Attributes return initial Attributes  getInitialAttributes initialAttributes
protected void configure Shell Shell new Shell super configure Shell new Shell if marker null new Shell set Text Task List Messages get String Task Prop new Task Title NON NLS 1 else String kind Marker Util get Kind Text marker new Shell set Text Task List Messages format Task Prop properties Title new Object kind NON NLS 1 Workbench Help set Help new Shell I Task List Help Context Ids PROPERTIES DIALOG  configureShell newShell configureShell newShell newShell setText TaskListMessages getString TaskProp newTaskTitle MarkerUtil getKindText newShell setText TaskListMessages TaskProp propertiesTitle WorkbenchHelp setHelp newShell ITaskListHelpContextIds PROPERTIES_DIALOG
protected Control create Dialog Area Composite parent Composite composite Composite super create Dialog Area parent initialize Dialog Units composite create Description Area composite if marker null create Creation Time Area composite if is Task create Priority And Status Area composite else create Severity Area composite create Resource Area composite update Dialog From Marker return composite  createDialogArea createDialogArea initializeDialogUnits createDescriptionArea createCreationTimeArea isTask createPriorityAndStatusArea createSeverityArea createResourceArea updateDialogFromMarker
Method create Creation Time Area param composite private void create Creation Time Area Composite parent Font font parent get Font Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout Label label new Label composite SWT NONE label set Text Task List Messages get String Task Prop creation Time NON NLS 1 label set Font font creation Time new Label composite SWT NONE creation Time set Font font  createCreationTimeArea createCreationTimeArea getFont GridLayout GridLayout numColumns setLayout setText TaskListMessages getString TaskProp creationTime setFont creationTime creationTime setFont
Creates only the OK button if showing problem properties otherwise creates both OK and Cancel buttons protected void create Buttons For Button Bar Composite parent create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true if is Editable create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL isEditable createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL
Creates the area for the Description field private void create Description Area Composite parent Font font parent get Font Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout Label label new Label composite SWT NONE label set Text Task List Messages get String Task Prop description NON NLS 1 label set Font font int style SWT SINGLE SWT BORDER if is Editable style SWT READ ONLY description Text new Text composite style Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL grid Data width Hint convert HorizontalDL Us To Pixels 400 description Text set Layout Data grid Data description Text set Font font  createDescriptionArea getFont GridLayout GridLayout numColumns setLayout setText TaskListMessages getString TaskProp setFont isEditable READ_ONLY descriptionText GridData gridData GridData GridData FILL_HORIZONTAL gridData widthHint convertHorizontalDLUsToPixels descriptionText setLayoutData gridData descriptionText setFont
Creates the area for the Priority and Status fields private void create Priority And Status Area Composite parent Font font parent get Font Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 composite set Layout layout Label label new Label composite SWT NONE label set Text Task List Messages get String Task Prop priority NON NLS 1 label set Font font priority Combo new Combo composite SWT READ ONLY priority Combo set Items new String Task List Messages get String Task List high NON NLS 1 Task List Messages get String Task List normal NON NLS 1 Task List Messages get String Task List low NON NLS 1 Prevent Esc and Return from closing the dialog when the combo is active priority Combo add Traverse Listener new Traverse Listener public void key Traversed Traverse Event e if e detail SWT TRAVERSE ESCAPE e detail SWT TRAVERSE RETURN e doit false priority Combo set Font font completed Checkbox new Button composite SWT CHECK completed Checkbox set Text Task List Messages get String Task Prop completed NON NLS 1 Grid Data grid Data new Grid Data grid Data horizontal Indent convert HorizontalDL Us To Pixels 20 completed Checkbox set Layout Data grid Data completed Checkbox set Font font if is Editable priority Combo set Enabled false completed Checkbox set Enabled false  createPriorityAndStatusArea getFont GridLayout GridLayout numColumns setLayout setText TaskListMessages getString TaskProp setFont priorityCombo READ_ONLY priorityCombo setItems TaskListMessages getString TaskList TaskListMessages getString TaskList TaskListMessages getString TaskList priorityCombo addTraverseListener TraverseListener keyTraversed TraverseEvent TRAVERSE_ESCAPE TRAVERSE_RETURN priorityCombo setFont completedCheckbox completedCheckbox setText TaskListMessages getString TaskProp GridData gridData GridData gridData horizontalIndent convertHorizontalDLUsToPixels completedCheckbox setLayoutData gridData completedCheckbox setFont isEditable priorityCombo setEnabled completedCheckbox setEnabled
Creates the area for the Severity field private void create Severity Area Composite parent Font font parent get Font Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout Label label new Label composite SWT NONE label set Text Task List Messages get String Task Prop severity NON NLS 1 label set Font font workaround for bug 11078 Can t get a read only combo box severity Label new Label composite SWT NONE severity Label set Font font severity Combo new Combo composite SWT READ ONLY severity Combo set Items new String Task List Messages get String Task List error NON NLS 1 Task List Messages get String Task List warning NON NLS 1 Task List Messages get String Task List info NON NLS 1  createSeverityArea getFont GridLayout GridLayout numColumns setLayout setText TaskListMessages getString TaskProp setFont severityLabel severityLabel setFont severityCombo READ_ONLY severityCombo setItems TaskListMessages getString TaskList TaskListMessages getString TaskList TaskListMessages getString TaskList
Creates the area for the Resource field private void create Resource Area Composite parent I Resource resource get Resource if marker null if resource null return if resource get Type I Resource FILE I Resource FOLDER I Resource PROJECT 0 return Font font parent get Font Composite composite new Composite parent SWT NONE Grid Data grid Data new Grid Data Grid Data FILL HORIZONTAL composite set Layout Data grid Data Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout Label resource Label new Label composite SWT NONE resource Label set Text Task List Messages get String Task Prop on Resource NON NLS 1 resource Label set Font font resource Text new Text composite SWT SINGLE SWT WRAP SWT READ ONLY SWT BORDER grid Data new Grid Data Grid Data FILL HORIZONTAL resource Text set Layout Data grid Data resource Text set Font font Label folder Label new Label composite SWT NONE folder Label set Text Task List Messages get String Task Prop in Folder NON NLS 1 folder Label set Font font folder Text new Text composite SWT SINGLE SWT WRAP SWT READ ONLY SWT BORDER grid Data new Grid Data Grid Data FILL HORIZONTAL folder Text set Layout Data grid Data folder Text set Font font Label location Label new Label composite SWT NONE location Label set Text Task List Messages get String Task Prop location NON NLS 1 location Label set Font font location Text new Text composite SWT SINGLE SWT WRAP SWT READ ONLY SWT BORDER grid Data new Grid Data Grid Data FILL HORIZONTAL location Text set Layout Data grid Data location Text set Font font  createResourceArea IResource getResource getType IResource IResource IResource getFont GridData gridData GridData GridData FILL_HORIZONTAL setLayoutData gridData GridLayout GridLayout numColumns setLayout resourceLabel resourceLabel setText TaskListMessages getString TaskProp onResource resourceLabel setFont resourceText READ_ONLY gridData GridData GridData FILL_HORIZONTAL resourceText setLayoutData gridData resourceText setFont folderLabel folderLabel setText TaskListMessages getString TaskProp inFolder folderLabel setFont folderText READ_ONLY gridData GridData GridData FILL_HORIZONTAL folderText setLayoutData gridData folderText setFont locationLabel locationLabel setText TaskListMessages getString TaskProp locationLabel setFont locationText READ_ONLY gridData GridData GridData FILL_HORIZONTAL locationText setLayoutData gridData locationText setFont
Updates the dialog from the marker state private void update Dialog From Marker if marker null update Dialog For New Marker return description Text set Text Marker Util get Message marker description Text select All creation Time set Text Marker Util get Creation Time marker if is Task priority Combo clear Selection priority Combo select I Marker PRIORITY HIGH Marker Util get Priority marker completed Checkbox set Selection Marker Util is Complete marker mark Dirty else workaround for bug 11078 Can t get a read only combo box severity Combo clear Selection severity Combo select I Marker SEVERITY ERROR Marker Util get Severity marker String sev NON NLS 1 switch Marker Util get Severity marker case I Marker SEVERITY ERROR sev Task List Messages get String Task List error NON NLS 1 break case I Marker SEVERITY WARNING sev Task List Messages get String Task List warning NON NLS 1 break case I Marker SEVERITY INFO sev Task List Messages get String Task List info NON NLS 1 break severity Label set Text sev resource Text set Text Marker Util get Resource Name marker folder Text set Text Marker Util get Container Name marker location Text set Text Marker Util get Line And Location marker  updateDialogFromMarker updateDialogForNewMarker descriptionText setText MarkerUtil getMessage descriptionText selectAll creationTime setText MarkerUtil getCreationTime isTask priorityCombo clearSelection priorityCombo IMarker PRIORITY_HIGH MarkerUtil getPriority completedCheckbox setSelection MarkerUtil isComplete markDirty severityCombo clearSelection severityCombo IMarker SEVERITY_ERROR MarkerUtil getSeverity MarkerUtil getSeverity IMarker SEVERITY_ERROR TaskListMessages getString TaskList IMarker SEVERITY_WARNING TaskListMessages getString TaskList IMarker SEVERITY_INFO TaskListMessages getString TaskList severityLabel setText resourceText setText MarkerUtil getResourceName folderText setText MarkerUtil getContainerName locationText setText MarkerUtil getLineAndLocation
Updates the dialog to reflect the state for a new marker private void update Dialog For New Marker Map attrs get Initial Attributes String desc NON NLS 1 if attrs null Object o attrs get I Marker MESSAGE if o instanceof String desc String o description Text set Text desc description Text select All int pri I Marker PRIORITY NORMAL if attrs null Object o attrs get I Marker PRIORITY if o instanceof Integer int val Integer o int Value if val I Marker PRIORITY LOW val I Marker PRIORITY HIGH pri val priority Combo deselect All priority Combo select I Marker PRIORITY HIGH pri boolean completed false if attrs null Object o attrs get I Marker DONE if o instanceof Boolean completed Boolean o boolean Value completed Checkbox set Selection completed I Resource resource get Resource if resource null resource Text null resource Text set Text resource get Name I Resource parent resource get Parent folder Text set Text parent null parent get Full Path to String substring 1 NON NLS 1 int line 1 String loc NON NLS 1 if attrs null Object o attrs get I Marker LINE NUMBER if o instanceof Integer line Integer o int Value o attrs get I Marker LOCATION if o instanceof String loc String o if location Text null location Text set Text Marker Util get Line And Location line loc mark Dirty return  updateDialogForNewMarker getInitialAttributes IMarker descriptionText setText descriptionText selectAll IMarker PRIORITY_NORMAL IMarker intValue IMarker PRIORITY_LOW IMarker PRIORITY_HIGH priorityCombo deselectAll priorityCombo IMarker PRIORITY_HIGH IMarker booleanValue completedCheckbox setSelection IResource getResource resourceText resourceText setText getName IResource getParent folderText setText getFullPath toString IMarker LINE_NUMBER intValue IMarker locationText locationText setText MarkerUtil getLineAndLocation markDirty
Method declared on Dialog protected void ok Pressed save Changes super ok Pressed  okPressed saveChanges okPressed
private void mark Dirty dirty true  markDirty
private boolean is Dirty return dirty  isDirty
Returns whether the marker is editable private boolean is Editable return marker null Marker Util is Editable marker  isEditable MarkerUtil isEditable
Returns code true code if a task is being created or modified Returns code false code if a problem is being shown private boolean is Task return marker null Marker Util is Marker Type marker I Marker TASK  isTask MarkerUtil isMarkerType IMarker
see org eclipse core resources I Workspace Runnable run org eclipse core runtime I Progress Monitor public void run I Progress Monitor monitor throws Core Exception create Or Update Marker monitor attrs  IWorkspaceRunnable IProgressMonitor IProgressMonitor CoreException createOrUpdateMarker
public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I Workspace Runnable runnable new I Workspace Runnable non Javadoc see org eclipse core resources I Workspace Runnable run org eclipse core runtime I Progress Monitor public void run I Progress Monitor monitor throws Core Exception create Or Update Marker monitor attrs Resources Plugin get Workspace run runnable monitor catch Core Exception e core Exceptions 0 e  IProgressMonitor InvocationTargetException InterruptedException IWorkspaceRunnable IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor IProgressMonitor CoreException createOrUpdateMarker ResourcesPlugin getWorkspace CoreException coreExceptions
Saves the changes made in the dialog if needed Creates a new task if needed Updates the existing task only if there have been changes Does nothing for problems since they cannot be modified private void save Changes if is Editable is Dirty return final Core Exception core Exceptions new Core Exception 1 final Map attrs get Marker Attributes From Dialog try PlatformUI get Workbench get Progress Service busy Cursor While new I Runnable With Progress non Javadoc see org eclipse jface operation I Runnable With Progress run org eclipse core runtime I Progress Monitor public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try I Workspace Runnable runnable new I Workspace Runnable non Javadoc see org eclipse core resources I Workspace Runnable run org eclipse core runtime I Progress Monitor public void run I Progress Monitor monitor throws Core Exception create Or Update Marker monitor attrs Resources Plugin get Workspace run runnable monitor catch Core Exception e core Exceptions 0 e catch Invocation Target Exception e IDE Workbench Plugin log e get Message Status Util new Status I Status ERROR e get Message e return catch Interrupted Exception e IDE Workbench Plugin log e get Message Status Util new Status I Status ERROR e get Message e return if core Exceptions 0 null Error Dialog open Error get Shell Task List Messages get String Task Prop error Message NON NLS 1 null core Exceptions 0 get Status  saveChanges isEditable isDirty CoreException coreExceptions CoreException getMarkerAttributesFromDialog getWorkbench getProgressService busyCursorWhile IRunnableWithProgress IRunnableWithProgress IProgressMonitor IProgressMonitor InvocationTargetException InterruptedException IWorkspaceRunnable IWorkspaceRunnable IWorkspaceRunnable IProgressMonitor IProgressMonitor CoreException createOrUpdateMarker ResourcesPlugin getWorkspace CoreException coreExceptions InvocationTargetException IDEWorkbenchPlugin getMessage StatusUtil newStatus IStatus getMessage InterruptedException IDEWorkbenchPlugin getMessage StatusUtil newStatus IStatus getMessage coreExceptions ErrorDialog openError getShell TaskListMessages getString TaskProp errorMessage coreExceptions getStatus
Creates or updates the marker Must be called within a workspace runnable param monitor The monitor to report to param attrs The atrributes entered from the dialog throws Core Exception private void create Or Update Marker I Progress Monitor monitor Map attrs throws Core Exception monitor begin Task Task List Messages get String Task Properties Dialog Working On Marker 100 NON NLS 1 if marker null monitor sub Task Task List Messages get String Task Properties Dialog Creating Marker NON NLS 1 I Resource resource get Resource if resource null resource Resources Plugin get Workspace get Root monitor worked 25 marker resource create Marker I Marker TASK Map initial Attrs get Initial Attributes if initial Attrs null marker set Attributes initial Attrs monitor worked 25 else monitor worked 50 Set the marker attributes from the current dialog field values Do not use set Attributes Map as that overwrites any attributes not covered by the dialog monitor sub Task Task List Messages get String Task Properties Dialog Updating Attributes NON NLS 1 int increment 50 attrs key Set size for Iterator i attrs key Set iterator i has Next String key String i next Object val attrs get key marker set Attribute key val monitor worked increment monitor done  CoreException createOrUpdateMarker IProgressMonitor CoreException beginTask TaskListMessages getString TaskPropertiesDialog WorkingOnMarker subTask TaskListMessages getString TaskPropertiesDialog CreatingMarker IResource getResource ResourcesPlugin getWorkspace getRoot createMarker IMarker initialAttrs getInitialAttributes initialAttrs setAttributes initialAttrs setAttributes subTask TaskListMessages getString TaskPropertiesDialog UpdatingAttributes keySet keySet hasNext setAttribute
Returns the marker attributes to save back to the marker based on the current dialog fields private Map get Marker Attributes From Dialog Map attribs new Hash Map 11 if is Task attribs put I Marker MESSAGE description Text get Text int i priority Combo get Selection Index if i 1 attribs put I Marker PRIORITY new Integer I Marker PRIORITY HIGH i attribs put I Marker DONE completed Checkbox get Selection Boolean TRUE Boolean FALSE return attribs  getMarkerAttributesFromDialog HashMap isTask IMarker descriptionText getText priorityCombo getSelectionIndex IMarker IMarker PRIORITY_HIGH IMarker completedCheckbox getSelection

private static final String TAG MARKER LIMIT marker Limit NON NLS 1 public Tasks Filter reset  TAG_MARKER_LIMIT markerLimit TasksFilter
boolean get Filter On Marker Limit return filter On Marker Limit  getFilterOnMarkerLimit filterOnMarkerLimit
void set Filter On Marker Limit boolean filter On Marker Limit this filter On Marker Limit filter On Marker Limit  setFilterOnMarkerLimit filterOnMarkerLimit filterOnMarkerLimit filterOnMarkerLimit
int get Marker Limit return marker Limit  getMarkerLimit markerLimit
void set Marker Limit int marker Limit if marker Limit 1 marker Limit Tasks Filter DEFAULT MARKER LIMIT if marker Limit Tasks Filter MINIMUM MARKER LIMIT marker Limit Tasks Filter MINIMUM MARKER LIMIT else if marker Limit Tasks Filter MAXIMUM MARKER LIMIT marker Limit Tasks Filter MAXIMUM MARKER LIMIT this marker Limit marker Limit  setMarkerLimit markerLimit markerLimit markerLimit TasksFilter DEFAULT_MARKER_LIMIT markerLimit TasksFilter MINIMUM_MARKER_LIMIT markerLimit TasksFilter MINIMUM_MARKER_LIMIT markerLimit TasksFilter MAXIMUM_MARKER_LIMIT markerLimit TasksFilter MAXIMUM_MARKER_LIMIT markerLimit markerLimit
boolean check Description String desc if desc null be paranoid desc NON NLS 1 boolean contains contains Substring desc description Filter return description Filter Kind FILTER CONTAINS contains contains  checkDescription containsSubstring descriptionFilter descriptionFilterKind FILTER_CONTAINS
public Object clone try return super clone catch Clone Not Supported Exception e throw new Error shouldn t happen  CloneNotSupportedException
boolean contains Substring String string String substring int str Len string length int sub Len substring length int len str Len sub Len for int i 0 i len i if string region Matches true i substring 0 sub Len return true return false  containsSubstring strLen subLen strLen subLen regionMatches subLen
Returns if the given resource is enclosed by a working set element The I Containment Adapter of each working set element is used for the containment test If there is no I Containment Adapter for a working set element a simple resource based test is used param element resource to test for enclosure by a working set element return true if element is enclosed by a working set element and false otherwise private boolean is Enclosed I Resource element I Path element Path element get Full Path I Adaptable working Set Elements working Set get Elements if element Path is Empty element Path is Root return false for int i 0 i working Set Elements length i I Adaptable working Set Element working Set Elements i I Containment Adapter containment Adapter I Containment Adapter working Set Element get Adapter I Containment Adapter class if there is no I Containment Adapter defined for the working set element type fall back to using resource based containment check if containment Adapter null if containment Adapter contains working Set Element element I Containment Adapter CHECK CONTEXT I Containment Adapter CHECK IF CHILD I Containment Adapter CHECK IF DESCENDANT return true else if is Enclosed Resource element element Path working Set Element return true return false  IContainmentAdapter IContainmentAdapter isEnclosed IResource IPath elementPath getFullPath IAdaptable workingSetElements workingSet getElements elementPath isEmpty elementPath isRoot workingSetElements IAdaptable workingSetElement workingSetElements IContainmentAdapter containmentAdapter IContainmentAdapter workingSetElement getAdapter IContainmentAdapter IContainmentAdapter containmentAdapter containmentAdapter workingSetElement IContainmentAdapter CHECK_CONTEXT IContainmentAdapter CHECK_IF_CHILD IContainmentAdapter CHECK_IF_DESCENDANT isEnclosedResource elementPath workingSetElement
Returns if the given resource is enclosed by a working set element A resource is enclosed if it is either a parent of a working set element a child of a working set element or a working set element itself Simple path comparison is used This is only guaranteed to return correct results for resource working set elements param element resource to test for enclosure by a working set element param element Path full absolute path of the element to test return true if element is enclosed by a working set element and false otherwise private boolean is Enclosed Resource I Resource element I Path element Path I Adaptable working Set Element I Resource working Set Resource null if working Set Element equals element return true if working Set Element instanceof I Resource working Set Resource I Resource working Set Element else working Set Resource I Resource working Set Element get Adapter I Resource class if working Set Resource null I Path resource Path working Set Resource get Full Path if resource Path is Prefix Of element Path return true return false  elementPath isEnclosedResource IResource IPath elementPath IAdaptable workingSetElement IResource workingSetResource workingSetElement workingSetElement IResource workingSetResource IResource workingSetElement workingSetResource IResource workingSetElement getAdapter IResource workingSetResource IPath resourcePath workingSetResource getFullPath resourcePath isPrefixOf elementPath
public void reset types ROOT TYPES on Resource ON ANY RESOURCE filter On Description false description Filter NON NLS 1 filter On Severity false severity Filter 0 filter On Priority false priority Filter 0 filter On Completion false completion Filter 0 filter On Marker Limit true marker Limit DEFAULT MARKER LIMIT  ROOT_TYPES onResource ON_ANY_RESOURCE filterOnDescription descriptionFilter filterOnSeverity severityFilter filterOnPriority priorityFilter filterOnCompletion completionFilter filterOnMarkerLimit markerLimit DEFAULT_MARKER_LIMIT
see I Persistable public void restore State I Memento memento I Memento children memento get Children TAG TYPE types new String children length for int i 0 i children length i types i children i get String TAG ID Integer ival memento get Integer TAG ON RESOURCE on Resource ival null ON ANY RESOURCE ival int Value restore Working Set memento get String TAG WORKING SET ival memento get Integer TAG FILTER ON DESCRIPTION filter On Description ival null ival int Value 1 ival memento get Integer TAG DESCRIPTION FILTER KIND description Filter Kind ival null FILTER CONTAINS ival int Value description Filter memento get String TAG DESCRIPTION FILTER if description Filter null description Filter NON NLS 1 ival memento get Integer TAG FILTER ON SEVERITY filter On Severity ival null ival int Value 1 ival memento get Integer TAG SEVERITY FILTER severity Filter ival null 0 ival int Value ival memento get Integer TAG FILTER ON PRIORITY filter On Priority ival null ival int Value 1 ival memento get Integer TAG PRIORITY FILTER priority Filter ival null 0 ival int Value ival memento get Integer TAG FILTER ON COMPLETION filter On Completion ival null ival int Value 1 ival memento get Integer TAG COMPLETION FILTER completion Filter ival null 0 ival int Value ival memento get Integer TAG FILTER ON MARKER LIMIT filter On Marker Limit ival null ival int Value 1 ival memento get Integer TAG MARKER LIMIT marker Limit ival null DEFAULT MARKER LIMIT ival int Value  IPersistable restoreState IMemento IMemento getChildren TAG_TYPE getString TAG_ID getInteger TAG_ON_RESOURCE onResource ON_ANY_RESOURCE intValue restoreWorkingSet getString TAG_WORKING_SET getInteger TAG_FILTER_ON_DESCRIPTION filterOnDescription intValue getInteger TAG_DESCRIPTION_FILTER_KIND descriptionFilterKind FILTER_CONTAINS intValue descriptionFilter getString TAG_DESCRIPTION_FILTER descriptionFilter descriptionFilter getInteger TAG_FILTER_ON_SEVERITY filterOnSeverity intValue getInteger TAG_SEVERITY_FILTER severityFilter intValue getInteger TAG_FILTER_ON_PRIORITY filterOnPriority intValue getInteger TAG_PRIORITY_FILTER priorityFilter intValue getInteger TAG_FILTER_ON_COMPLETION filterOnCompletion intValue getInteger TAG_COMPLETION_FILTER completionFilter intValue getInteger TAG_FILTER_ON_MARKER_LIMIT filterOnMarkerLimit intValue getInteger TAG_MARKER_LIMIT markerLimit DEFAULT_MARKER_LIMIT intValue
Restores the saved working set if any param the saved working set name or null private void restore Working Set String working Set Name if working Set Name null I Working Set Manager working Set Manager PlatformUI get Workbench get Working Set Manager I Working Set working Set working Set Manager get Working Set working Set Name if working Set null this working Set working Set  restoreWorkingSet workingSetName workingSetName IWorkingSetManager workingSetManager getWorkbench getWorkingSetManager IWorkingSet workingSet workingSetManager getWorkingSet workingSetName workingSet workingSet workingSet
Saves the object state within a memento param memento a memento to receive the object state public void save State I Memento memento for int i 0 i types length i memento create Child TAG TYPE put String TAG ID types i memento put Integer TAG ON RESOURCE on Resource if working Set null memento put String TAG WORKING SET working Set get Name memento put Integer TAG FILTER ON DESCRIPTION filter On Description 1 0 memento put Integer TAG DESCRIPTION FILTER KIND description Filter Kind memento put String TAG DESCRIPTION FILTER description Filter memento put Integer TAG FILTER ON SEVERITY filter On Severity 1 0 memento put Integer TAG SEVERITY FILTER severity Filter memento put Integer TAG FILTER ON PRIORITY filter On Priority 1 0 memento put Integer TAG PRIORITY FILTER priority Filter memento put Integer TAG FILTER ON COMPLETION filter On Completion 1 0 memento put Integer TAG COMPLETION FILTER completion Filter memento put Integer TAG FILTER ON MARKER LIMIT filter On Marker Limit 1 0 memento put Integer TAG MARKER LIMIT marker Limit  saveState IMemento createChild TAG_TYPE putString TAG_ID putInteger TAG_ON_RESOURCE onResource workingSet putString TAG_WORKING_SET workingSet getName putInteger TAG_FILTER_ON_DESCRIPTION filterOnDescription putInteger TAG_DESCRIPTION_FILTER_KIND descriptionFilterKind putString TAG_DESCRIPTION_FILTER descriptionFilter putInteger TAG_FILTER_ON_SEVERITY filterOnSeverity putInteger TAG_SEVERITY_FILTER severityFilter putInteger TAG_FILTER_ON_PRIORITY filterOnPriority putInteger TAG_PRIORITY_FILTER priorityFilter putInteger TAG_FILTER_ON_COMPLETION filterOnCompletion putInteger TAG_COMPLETION_FILTER completionFilter putInteger TAG_FILTER_ON_MARKER_LIMIT filterOnMarkerLimit putInteger TAG_MARKER_LIMIT markerLimit
public boolean select Viewer viewer Object parent Element Object element return select I Marker element  parentElement IMarker
public boolean select I Marker marker resource settings are handled by the content provider return select By Type marker select By Attributes marker select By Working Set marker  IMarker selectByType selectByAttributes selectByWorkingSet
public boolean select I Marker Delta marker Delta resource settings are handled by the content provider return select By Type marker Delta select By Attributes marker Delta select By Working Set marker Delta  IMarkerDelta markerDelta selectByType markerDelta selectByAttributes markerDelta selectByWorkingSet markerDelta
private boolean select By Type I Marker marker for int i 0 i types length i if Marker Util is Marker Type marker types i return true return false  selectByType IMarker MarkerUtil isMarkerType
private boolean select By Type I Marker Delta marker Delta for int i 0 i types length i if marker Delta is Subtype Of types i return true return false  selectByType IMarkerDelta markerDelta markerDelta isSubtypeOf
Returns whether the specified marker should be filter out or not param marker the marker to test return true the marker should not be filtered out false the marker should be filtered out private boolean select By Working Set I Marker marker if working Set null on Resource ON WORKING SET return true I Resource resource I Resource marker get Resource if resource null return is Enclosed resource return false  selectByWorkingSet IMarker workingSet onResource ON_WORKING_SET IResource IResource getResource isEnclosed
Returns whether the specified marker delta should be filter out or not param marker Delta the marker delta to test return true the marker delta should not be filtered out false the marker delta should be filtered out private boolean select By Working Set I Marker Delta marker Delta if working Set null on Resource ON WORKING SET return true I Resource resource I Resource marker Delta get Resource if resource null return is Enclosed resource return false  markerDelta selectByWorkingSet IMarkerDelta markerDelta workingSet onResource ON_WORKING_SET IResource IResource markerDelta getResource isEnclosed
private boolean select By Attributes I Marker marker severity filter applies only to problems if filter On Severity Marker Util is Marker Type marker I Marker PROBLEM int sev Marker Util get Severity marker if severity Filter 1 sev 0 return false priority and completion filters apply only to tasks avoid doing type check more than once if filter On Priority filter On Completion Marker Util is Marker Type marker I Marker TASK if filter On Priority int pri Marker Util get Priority marker if priority Filter 1 pri 0 return false if filter On Completion boolean complete Marker Util is Complete marker if completion Filter complete 2 1 0 return false description applies to all markers if filter On Description String desc Marker Util get Message marker if check Description desc return false return true  selectByAttributes IMarker filterOnSeverity MarkerUtil isMarkerType IMarker MarkerUtil getSeverity severityFilter filterOnPriority filterOnCompletion MarkerUtil isMarkerType IMarker filterOnPriority MarkerUtil getPriority priorityFilter filterOnCompletion MarkerUtil isComplete completionFilter filterOnDescription MarkerUtil getMessage checkDescription
private boolean select By Attributes I Marker Delta marker Delta severity filter applies only to problems if filter On Severity marker Delta is Subtype Of I Marker PROBLEM int sev marker Delta get Attribute I Marker SEVERITY I Marker SEVERITY WARNING if severity Filter 1 sev 0 return false priority and completion filters apply only to tasks avoid doing type check more than once if filter On Priority filter On Completion marker Delta is Subtype Of I Marker TASK if filter On Priority int pri marker Delta get Attribute I Marker PRIORITY I Marker PRIORITY NORMAL if priority Filter 1 pri 0 return false if filter On Completion boolean complete marker Delta get Attribute I Marker DONE false if completion Filter complete 2 1 0 return false description applies to all markers if filter On Description String desc marker Delta get Attribute I Marker MESSAGE NON NLS 1 if check Description desc return false return true  selectByAttributes IMarkerDelta markerDelta filterOnSeverity markerDelta isSubtypeOf IMarker markerDelta getAttribute IMarker IMarker SEVERITY_WARNING severityFilter filterOnPriority filterOnCompletion markerDelta isSubtypeOf IMarker filterOnPriority markerDelta getAttribute IMarker IMarker PRIORITY_NORMAL priorityFilter filterOnCompletion markerDelta getAttribute IMarker completionFilter filterOnDescription markerDelta getAttribute IMarker checkDescription
Returns whether the filter is including all markers return code true code if the filter includes all markers code false code if not public boolean is Showing All if filter On Description filter On Severity filter On Priority filter On Completion return false if on Resource ON ANY RESOURCE return false Hash Set set new Hash Set Arrays as List types if set size ROOT TYPES length return false for int i 0 i ROOT TYPES length i if set contains ROOT TYPES i return false return true  isShowingAll filterOnDescription filterOnSeverity filterOnPriority filterOnCompletion onResource ON_ANY_RESOURCE HashSet HashSet asList ROOT_TYPES ROOT_TYPES ROOT_TYPES

Creates a new task sorter public Task Sorter reset State  TaskSorter resetState
Compares two markers sorting first by the main column of this sorter then by subsequent columns depending on the column sort order public int compare Viewer viewer Object e1 Object e2 I Marker m1 I Marker e1 I Marker m2 I Marker e2 return compare Column Value m1 m2 0  IMarker IMarker IMarker IMarker compareColumnValue
public void set Top Priority int priority if priority 0 priority priorities length return int index 1 for int i 0 i priorities length i if priorities i priority index i break if index 1 reset State return shift the array for int i index i 0 i priorities i priorities i 1 priorities 0 priority directions priority DEFAULT DIRECTIONS priority  setTopPriority resetState DEFAULT_DIRECTIONS
public int get Top Priority return priorities 0  getTopPriority
public int get Priorities return priorities  getPriorities
public void set Top Priority Direction int direction if direction DEFAULT DIRECTION directions priorities 0 DEFAULT DIRECTIONS priorities 0 else if direction ASCENDING direction DESCENDING directions priorities 0 direction  setTopPriorityDirection DEFAULT_DIRECTION DEFAULT_DIRECTIONS
public int get Top Priority Direction return directions priorities 0  getTopPriorityDirection
public void reverse Top Priority directions priorities 0 1  reverseTopPriority
public void reset State priorities new int DEFAULT PRIORITIES length System arraycopy DEFAULT PRIORITIES 0 priorities 0 priorities length directions new int DEFAULT DIRECTIONS length System arraycopy DEFAULT DIRECTIONS 0 directions 0 directions length  resetState DEFAULT_PRIORITIES DEFAULT_PRIORITIES DEFAULT_DIRECTIONS DEFAULT_DIRECTIONS
Compares two markers based only on the value of the specified column private int compare Column Value I Marker m1 I Marker m2 int depth if depth priorities length return 0 int column Number priorities depth int direction directions column Number switch column Number case TYPE category int result get Category Order m1 get Category Order m2 if result 0 return compare Column Value m1 m2 depth 1 return result direction case COMPLETION completed int result get Completed Order m1 get Completed Order m2 if result 0 return compare Column Value m1 m2 depth 1 return result direction case PRIORITY priority int result get Priority Order m1 get Priority Order m2 if result 0 return compare Column Value m1 m2 depth 1 return result direction case DESCRIPTION description int result collator compare Marker Util get Message m1 Marker Util get Message m2 if result 0 return compare Column Value m1 m2 depth 1 return result direction case RESOURCE resource name I Resource r1 m1 get Resource I Resource r2 m2 get Resource String n1 r1 get Name String n2 r2 get Name int result collator compare n1 n2 if result 0 return compare Column Value m1 m2 depth 1 return result direction case FOLDER container name String c1 Marker Util get Container Name m1 String c2 Marker Util get Container Name m2 int result c1 equals c2 0 collator compare c1 c2 if result 0 return compare Column Value m1 m2 depth 1 return result direction case LOCATION line and location int result compare Line And Location m1 m2 if result 0 return compare Column Value m1 m2 depth 1 return result direction case CREATION TIME creation time int result compare Creation Time m1 m2 if result 0 return compare Column Value m1 m2 depth 1 return result direction default return 0  compareColumnValue IMarker IMarker columnNumber columnNumber columnNumber getCategoryOrder getCategoryOrder compareColumnValue getCompletedOrder getCompletedOrder compareColumnValue getPriorityOrder getPriorityOrder compareColumnValue MarkerUtil getMessage MarkerUtil getMessage compareColumnValue IResource getResource IResource getResource getName getName compareColumnValue MarkerUtil getContainerName MarkerUtil getContainerName compareColumnValue compareLineAndLocation compareColumnValue CREATION_TIME compareCreationTime compareColumnValue
Compares the creation time of two markers private int compare Creation Time I Marker m1 I Marker m2 long result try result m1 get Creation Time m2 get Creation Time catch Core Exception e result 0 if result 0 return 1 else if result 0 return 1 return 0  compareCreationTime IMarker IMarker getCreationTime getCreationTime CoreException
Compares the line number and location of the two markers If line number is specified for both this sorts first by line number numerically then by start offset numerically then by location textually If line number is not specified for either this sorts by location Otherwise if only one has a line number this sorts by the combined text for line number and location private int compare Line And Location I Marker m1 I Marker m2 int line1 Marker Util get Line Number m1 int line2 Marker Util get Line Number m2 if line1 1 line2 1 if line1 line2 return line1 line2 int start1 Marker Util get Char Start m1 int start2 Marker Util get Char Start m2 if start1 1 start2 1 if start1 start2 return start1 start2 String loc1 Marker Util get Location m1 String loc2 Marker Util get Location m2 return collator compare loc1 loc2 if line1 1 line2 1 String loc1 Marker Util get Location m1 String loc2 Marker Util get Location m2 return collator compare loc1 loc2 String loc1 Marker Util get Line And Location m1 String loc2 Marker Util get Line And Location m2 return collator compare loc1 loc2  compareLineAndLocation IMarker IMarker MarkerUtil getLineNumber MarkerUtil getLineNumber MarkerUtil getCharStart MarkerUtil getCharStart MarkerUtil getLocation MarkerUtil getLocation MarkerUtil getLocation MarkerUtil getLocation MarkerUtil getLineAndLocation MarkerUtil getLineAndLocation
Returns the sort order for the given marker based on its category Lower numbers appear first private int get Category Order I Marker marker if Marker Util is Marker Type marker I Marker PROBLEM switch Marker Util get Severity marker case I Marker SEVERITY ERROR return 4 case I Marker SEVERITY WARNING return 3 case I Marker SEVERITY INFO return 2 else if Marker Util is Marker Type marker I Marker TASK return 1 return 1000  getCategoryOrder IMarker MarkerUtil isMarkerType IMarker MarkerUtil getSeverity IMarker SEVERITY_ERROR IMarker SEVERITY_WARNING IMarker SEVERITY_INFO MarkerUtil isMarkerType IMarker
Returns the sort order for the given marker based on its completion status Lower numbers appear first private int get Completed Order I Marker marker if Marker Util is Marker Type marker I Marker TASK return Marker Util is Complete marker 2 1 return 0  getCompletedOrder IMarker MarkerUtil isMarkerType IMarker MarkerUtil isComplete
Returns the sort order for the given marker based on its priority private int get Priority Order I Marker marker if Marker Util is Marker Type marker I Marker TASK return Marker Util get Priority marker return 1  getPriorityOrder IMarker MarkerUtil isMarkerType IMarker MarkerUtil getPriority
public void save State I Dialog Settings settings if settings null return for int i 0 i directions length i settings put direction i directions i NON NLS 1 settings put priority i priorities i NON NLS 1  saveState IDialogSettings
public void restore State I Dialog Settings settings if settings null return try for int i 0 i priorities length i directions i settings get Int direction i NON NLS 1 priorities i settings get Int priority i NON NLS 1 catch Number Format Exception e reset State  restoreState IDialogSettings getInt getInt NumberFormatException resetState

private static final String filler NON NLS 1 Answer a string representing the Base 64 encoded form of the passed byte array return java lang String param contents byte public static String encode byte contents String Buffer result new String Buffer for int i 0 i contents length i i 3 if result length 76 result append n r NON NLS 1 output character 1 result append mappings char At contents i 0xFC 2 output character 2 int c2 contents i 0x03 4 if i 1 contents length result append mappings char At c2 result append filler result append filler return result to String c2 contents i 1 0xF0 4 result append mappings char At c2 output character 3 int c3 contents i 1 0x0F 2 if i 2 contents length result append mappings char At c3 result append filler return result to String c3 contents i 2 0xC0 6 result append mappings char At c3 output character 4 result append mappings char At contents i 2 0x3F return result to String  StringBuffer StringBuffer charAt charAt toString charAt charAt toString charAt charAt toString

private static final String RESOURCE BUNDLE org eclipse ui wizards datatransfer messages NON NLS 1 private static Resource Bundle bundle Resource Bundle get Bundle RESOURCE BUNDLE private Data Transfer Messages prevent instantiation of class  RESOURCE_BUNDLE ResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE DataTransferMessages
Returns the formatted message for the given key in the 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  MessageFormat getString
Returns the resource object with the given key in the 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  getString getString MissingResourceException

Constructor for External Project Import Wizard public External Project Import Wizard super  ExternalProjectImportWizard ExternalProjectImportWizard
public void add Pages super add Pages main Page new Wizard External Project Import Page add Page main Page  addPages addPages mainPage WizardExternalProjectImportPage addPage mainPage
Returns the image descriptor with the given relative path private Image Descriptor get Image Descriptor String relative Path String icon Path icons full NON NLS 1 try AbstractUI Plugin plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID URL installURL plugin get Descriptor get InstallURL URL url new URL installURL icon Path relative Path return Image Descriptor create FromURL url catch MalformedURL Exception e Should not happen return null  ImageDescriptor getImageDescriptor relativePath iconPath AbstractUIPlugin AbstractUIPlugin getPlugin PLUGIN_ID getDescriptor getInstallURL iconPath relativePath ImageDescriptor createFromURL MalformedURLException
public void init I Workbench workbench I Structured Selection current Selection set Window Title Data Transfer Messages get String Data Transfer import Title NON NLS 1 set Default Page Image Descriptor get Image Descriptor wizban importdir wiz gif NON NLS 1  IWorkbench IStructuredSelection currentSelection setWindowTitle DataTransferMessages getString DataTransfer importTitle setDefaultPageImageDescriptor getImageDescriptor importdir_wiz
Method declared on I Wizard public boolean perform Cancel return true  IWizard performCancel
Method declared on I Wizard public boolean perform Finish return main Page create Existing Project null  IWizard performFinish mainPage createExistingProject

package class File System Exporter Creates the specified file system directory at code destination Path code This creates a new file system directory public void create Folder I Path destination Path new File destination Path toOS String mkdir  FileSystemExporter destinationPath createFolder IPath destinationPath destinationPath toOSString
Writes the passed resource to the specified location recursively public void write I Resource resource I Path destination Path throws Core Exception IO Exception if resource get Type I Resource FILE write File I File resource destination Path else write Children I Container resource destination Path  IResource IPath destinationPath CoreException IOException getType IResource writeFile IFile destinationPath writeChildren IContainer destinationPath
Exports the passed container s children protected void write Children I Container folder I Path destination Path throws Core Exception IO Exception if folder is Accessible I Resource children folder members for int i 0 i children length i I Resource child children i write Resource child destination Path append child get Name  writeChildren IContainer IPath destinationPath CoreException IOException isAccessible IResource IResource writeResource destinationPath getName
Writes the passed file resource to the specified destination on the local file system protected void write File I File file I Path destination Path throws IO Exception Core Exception File Output Stream output null Input Stream content Stream null try content Stream file get Contents false output new File Output Stream destination Path toOS String int chunk Size content Stream available byte read Buffer new byte chunk Size int n content Stream read read Buffer while n 0 output write read Buffer n content Stream read read Buffer finally if output null output close if content Stream null content Stream close  writeFile IFile IPath destinationPath IOException CoreException FileOutputStream InputStream contentStream contentStream getContents FileOutputStream destinationPath toOSString chunkSize contentStream readBuffer chunkSize contentStream readBuffer readBuffer contentStream readBuffer contentStream contentStream
Writes the passed resource to the specified location recursively protected void write Resource I Resource resource I Path destination Path throws Core Exception IO Exception if resource get Type I Resource FILE write File I File resource destination Path else create Folder destination Path write Children I Container resource destination Path  writeResource IResource IPath destinationPath CoreException IOException getType IResource writeFile IFile destinationPath createFolder destinationPath writeChildren IContainer destinationPath

private boolean create Container Directories true Create an instance of this class Use this constructor if you wish to export specific resources without a common parent resource public File System Export Operation List resources String destination Path I Overwrite Query overwrite Implementor super Eliminate redundancies in list of resources being exported Iterator elements Enum resources iterator while elements Enum has Next I Resource current Resource I Resource elements Enum next if is Descendent resources current Resource elements Enum remove Remove current Resource resources To Export resources path new Path destination Path overwrite Callback overwrite Implementor  createContainerDirectories FileSystemExportOperation destinationPath IOverwriteQuery overwriteImplementor elementsEnum elementsEnum hasNext IResource currentResource IResource elementsEnum isDescendent currentResource elementsEnum currentResource resourcesToExport destinationPath overwriteCallback overwriteImplementor
Create an instance of this class Use this constructor if you wish to recursively export a single resource public File System Export Operation I Resource res String destination Path I Overwrite Query overwrite Implementor super resource res path new Path destination Path overwrite Callback overwrite Implementor  FileSystemExportOperation IResource destinationPath IOverwriteQuery overwriteImplementor destinationPath overwriteCallback overwriteImplementor
Create an instance of this class Use this constructor if you wish to export specific resources with a common parent resource affects container directory creation public File System Export Operation I Resource res List resources String destination Path I Overwrite Query overwrite Implementor this res destination Path overwrite Implementor resources To Export resources  FileSystemExportOperation IResource destinationPath IOverwriteQuery overwriteImplementor destinationPath overwriteImplementor resourcesToExport
Add a new entry to the error table with the passed information protected void add Error String message Throwable e error Table add new Status I Status ERROR PlatformUI PLUGIN ID 0 message e  addError errorTable IStatus PLUGIN_ID
Answer the total number of file resources that exist at or below self in the resources hierarchy return int param parent Resource org eclipse core resources I Resource protected int count Children Of I Resource parent Resource throws Core Exception if parent Resource get Type I Resource FILE return 1 int count 0 if parent Resource is Accessible I Resource children I Container parent Resource members for int i 0 i children length i count count Children Of children i return count  parentResource IResource countChildrenOf IResource parentResource CoreException parentResource getType IResource parentResource isAccessible IResource IContainer parentResource countChildrenOf
Answer a boolean indicating the number of file resources that were specified for export return int protected int count Selected Resources throws Core Exception int result 0 Iterator resources resources To Export iterator while resources has Next result count Children Of I Resource resources next return result  countSelectedResources CoreException resourcesToExport hasNext countChildrenOf IResource
Create the directories required for exporting the passed resource based upon its container hierarchy param child Resource org eclipse core resources I Resource protected void create Leadup Directories For I Resource child Resource I Path resource Path child Resource get Full Path remove Last Segments 1 for int i 0 i resource Path segment Count i path path append resource Path segment i exporter create Folder path  childResource IResource createLeadupDirectoriesFor IResource childResource IPath resourcePath childResource getFullPath removeLastSegments resourcePath segmentCount resourcePath createFolder
Recursively export the previously specified resource protected void export All Resources throws Interrupted Exception if resource get Type I Resource FILE export File I File resource path else try export Children I Container resource members path catch Core Exception e not safe to show a dialog should never happen because the file system export wizard ensures that the single resource chosen for export is both existent and accessible error Table add e  exportAllResources InterruptedException getType IResource exportFile IFile exportChildren IContainer CoreException errorTable
Export all of the resources contained in the passed collection param children java util Enumeration param current Path I Path protected void export Children I Resource children I Path current Path throws Interrupted Exception for int i 0 i children length i I Resource child children i if child is Accessible continue if child get Type I Resource FILE export File I File child current Path else I Path destination current Path append child get Name exporter create Folder destination try export Children I Container child members destination catch Core Exception e not safe to show a dialog should never happen because i this method is called recursively iterating over the result of members which only answers existing children ii there is an is Accessible check done before members is invoked error Table add e get Status  currentPath IPath exportChildren IResource IPath currentPath InterruptedException IResource isAccessible getType IResource exportFile IFile currentPath IPath currentPath getName createFolder exportChildren IContainer CoreException isAccessible errorTable getStatus
Export the passed file to the specified location param file org eclipse core resources I File param location org eclipse core runtime I Path protected void export File I File file I Path location throws Interrupted Exception I Path full Path location append file get Name monitor sub Task file get Full Path to String String proper Path String full Path toOS String File target File new File proper Path String if target File exists if target File can Write error Table add new Status I Status ERROR PlatformUI PLUGIN ID 0 Data Transfer Messages format Data Transfer cannot Overwrite NON NLS 1 new Object target File get Absolute Path null monitor worked 1 return if overwrite State OVERWRITE NONE return if overwrite State OVERWRITE ALL String overwrite Answer overwrite Callback query Overwrite proper Path String if overwrite Answer equals I Overwrite Query CANCEL throw new Interrupted Exception if overwrite Answer equals I Overwrite Query NO monitor worked 1 return if overwrite Answer equals I Overwrite Query NO ALL monitor worked 1 overwrite State OVERWRITE NONE return if overwrite Answer equals I Overwrite Query ALL overwrite State OVERWRITE ALL try exporter write file full Path catch IO Exception e error Table add new Status I Status ERROR PlatformUI PLUGIN ID 0 Data Transfer Messages format Data Transfer error Exporting NON NLS 1 new Object full Path e get Message e catch Core Exception e error Table add new Status I Status ERROR PlatformUI PLUGIN ID 0 Data Transfer Messages format Data Transfer error Exporting NON NLS 1 new Object full Path e get Message e monitor worked 1 Modal Context check Canceled monitor  IFile IPath exportFile IFile IPath InterruptedException IPath fullPath getName subTask getFullPath toString properPathString fullPath toOSString targetFile properPathString targetFile targetFile canWrite errorTable IStatus PLUGIN_ID DataTransferMessages DataTransfer cannotOverwrite targetFile getAbsolutePath overwriteState OVERWRITE_NONE overwriteState OVERWRITE_ALL overwriteAnswer overwriteCallback queryOverwrite properPathString overwriteAnswer IOverwriteQuery InterruptedException overwriteAnswer IOverwriteQuery overwriteAnswer IOverwriteQuery NO_ALL overwriteState OVERWRITE_NONE overwriteAnswer IOverwriteQuery overwriteState OVERWRITE_ALL fullPath IOException errorTable IStatus PLUGIN_ID DataTransferMessages DataTransfer errorExporting fullPath getMessage CoreException errorTable IStatus PLUGIN_ID DataTransferMessages DataTransfer errorExporting fullPath getMessage ModalContext checkCanceled
Export the resources contained in the previously defined resources To Export collection protected void export Specified Resources throws Interrupted Exception Iterator resources resources To Export iterator I Path init Path I Path path clone while resources has Next I Resource current Resource I Resource resources next if current Resource is Accessible continue path init Path if resource null No root resource specified and creation of containment directories is required Create containers from depth 2 onwards ie project s child inclusive for each resource being exported if create Leadup Structure create Leadup Directories For current Resource else Root resource specified Must create containment directories from this point onwards for each resource being exported I Path containers To Create current Resource get Full Path remove First Segments resource get Full Path segment Count remove Last Segments 1 for int i 0 i containers To Create segment Count i path path append containers To Create segment i exporter create Folder path if current Resource get Type I Resource FILE export File I File current Resource path else if create Container Directories path path append current Resource get Name exporter create Folder path try export Children I Container current Resource members path catch Core Exception e should never happen because is Accessible is called before members is invoked which implicitly does an existence check error Table add e get Status  resourcesToExport exportSpecifiedResources InterruptedException resourcesToExport IPath initPath IPath hasNext IResource currentResource IResource currentResource isAccessible initPath createLeadupStructure createLeadupDirectoriesFor currentResource IPath containersToCreate currentResource getFullPath removeFirstSegments getFullPath segmentCount removeLastSegments containersToCreate segmentCount containersToCreate createFolder currentResource getType IResource exportFile IFile currentResource createContainerDirectories currentResource getName createFolder exportChildren IContainer currentResource CoreException isAccessible errorTable getStatus
Returns the status of the export operation If there were any errors the result is a status object containing individual status objects for each error If there were no errors the result is a status object with error code code OK code return the status public I Status get Status I Status errors new I Status error Table size error Table to Array errors return new Multi Status PlatformUI PLUGIN ID I Status OK errors Data Transfer Messages get String File System Export Operation problems Exporting NON NLS 1 null  IStatus getStatus IStatus IStatus errorTable errorTable toArray MultiStatus PLUGIN_ID IStatus DataTransferMessages getString FileSystemExportOperation problemsExporting
Answer a boolean indicating whether the passed child is a descendent of one or more members of the passed resources collection return boolean param resources java util List param child org eclipse core resources I Resource protected boolean is Descendent List resources I Resource child if child get Type I Resource PROJECT return false I Resource parent child get Parent if resources contains parent return true return is Descendent resources parent  IResource isDescendent IResource getType IResource IResource getParent isDescendent
Export the resources that were previously specified for export or if a single resource was specified then export it recursively public void run I Progress Monitor progress Monitor throws Interrupted Exception this monitor progress Monitor if resource null if create Leadup Structure create Leadup Directories For resource if create Container Directories resource get Type I Resource FILE ensure it s a container path path append resource get Name exporter create Folder path try int total Work I Progress Monitor UNKNOWN try if resources To Export null total Work count Children Of resource else total Work count Selected Resources catch Core Exception e Should not happen error Table add e get Status monitor begin Task Data Transfer Messages get String Data Transfer exporting Title total Work NON NLS 1 if resources To Export null export All Resources else export Specified Resources finally monitor done  IProgressMonitor progressMonitor InterruptedException progressMonitor createLeadupStructure createLeadupDirectoriesFor createContainerDirectories getType IResource getName createFolder totalWork IProgressMonitor resourcesToExport totalWork countChildrenOf totalWork countSelectedResources CoreException errorTable getStatus beginTask DataTransferMessages getString DataTransfer exportingTitle totalWork resourcesToExport exportAllResources exportSpecifiedResources
Set this boolean indicating whether a directory should be created for Folder resources that are explicitly passed for export param value boolean public void set Create Container Directories boolean value create Container Directories value  setCreateContainerDirectories createContainerDirectories
Set this boolean indicating whether each exported resource s complete path should include containment hierarchies as dictated by its parents param value boolean public void set Create Leadup Structure boolean value create Leadup Structure value  setCreateLeadupStructure createLeadupStructure
Set this boolean indicating whether exported resources should automatically overwrite existing files when a conflict occurs If not query the user param value boolean public void set Overwrite Files boolean value if value overwrite State OVERWRITE ALL  setOverwriteFiles overwriteState OVERWRITE_ALL

private Wizard File System Resource Export Page1 main Page Creates a wizard for exporting workspace resources to the local file system public File System Export Wizard AbstractUI Plugin plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID I Dialog Settings workbench Settings plugin get Dialog Settings I Dialog Settings section workbench Settings get Section File System Export Wizard NON NLS 1 if section null section workbench Settings add New Section File System Export Wizard NON NLS 1 set Dialog Settings section  WizardFileSystemResourceExportPage1 mainPage FileSystemExportWizard AbstractUIPlugin AbstractUIPlugin getPlugin PLUGIN_ID IDialogSettings workbenchSettings getDialogSettings IDialogSettings workbenchSettings getSection FileSystemExportWizard workbenchSettings addNewSection FileSystemExportWizard setDialogSettings
public void add Pages super add Pages main Page new Wizard File System Resource Export Page1 selection add Page main Page  addPages addPages mainPage WizardFileSystemResourceExportPage1 addPage mainPage
Returns the image descriptor with the given relative path private Image Descriptor get Image Descriptor String relative Path String icon Path icons full NON NLS 1 try AbstractUI Plugin plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID URL installURL plugin get Descriptor get InstallURL URL url new URL installURL icon Path relative Path return Image Descriptor create FromURL url catch MalformedURL Exception e Should not happen return null  ImageDescriptor getImageDescriptor relativePath iconPath AbstractUIPlugin AbstractUIPlugin getPlugin PLUGIN_ID getDescriptor getInstallURL iconPath relativePath ImageDescriptor createFromURL MalformedURLException
public void init I Workbench workbench I Structured Selection current Selection this selection current Selection List selected Resources IDE compute Selected Resources current Selection if selected Resources is Empty this selection new Structured Selection selected Resources look it up if current selection after resource adapting is empty if selection is Empty workbench get Active Workbench Window null I Workbench Page page workbench get Active Workbench Window get Active Page if page null I Editor Part current Editor page get Active Editor if current Editor null Object selected Resource current Editor get Editor Input get Adapter I Resource class if selected Resource null selection new Structured Selection selected Resource set Window Title Data Transfer Messages get String Data Transfer export NON NLS 1 set Default Page Image Descriptor get Image Descriptor wizban exportdir wiz gif NON NLS 1 set Needs Progress Monitor true  IWorkbench IStructuredSelection currentSelection currentSelection selectedResources computeSelectedResources currentSelection selectedResources isEmpty StructuredSelection selectedResources isEmpty getActiveWorkbenchWindow IWorkbenchPage getActiveWorkbenchWindow getActivePage IEditorPart currentEditor getActiveEditor currentEditor selectedResource currentEditor getEditorInput getAdapter IResource selectedResource StructuredSelection selectedResource setWindowTitle DataTransferMessages getString DataTransfer setDefaultPageImageDescriptor getImageDescriptor exportdir_wiz setNeedsProgressMonitor
Method declared on I Wizard public boolean perform Finish return main Page finish  IWizard performFinish mainPage

private Wizard File System Resource Import Page1 main Page Creates a wizard for importing resources into the workspace from the file system public File System Import Wizard AbstractUI Plugin plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID I Dialog Settings workbench Settings plugin get Dialog Settings I Dialog Settings section workbench Settings get Section File System Import Wizard NON NLS 1 if section null section workbench Settings add New Section File System Import Wizard NON NLS 1 set Dialog Settings section  WizardFileSystemResourceImportPage1 mainPage FileSystemImportWizard AbstractUIPlugin AbstractUIPlugin getPlugin PLUGIN_ID IDialogSettings workbenchSettings getDialogSettings IDialogSettings workbenchSettings getSection FileSystemImportWizard workbenchSettings addNewSection FileSystemImportWizard setDialogSettings
public void add Pages super add Pages main Page new Wizard File System Resource Import Page1 workbench selection add Page main Page  addPages addPages mainPage WizardFileSystemResourceImportPage1 addPage mainPage
Returns the image descriptor with the given relative path private Image Descriptor get Image Descriptor String relative Path String icon Path icons full NON NLS 1 try AbstractUI Plugin plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID URL installURL plugin get Descriptor get InstallURL URL url new URL installURL icon Path relative Path return Image Descriptor create FromURL url catch MalformedURL Exception e Should not happen return null  ImageDescriptor getImageDescriptor relativePath iconPath AbstractUIPlugin AbstractUIPlugin getPlugin PLUGIN_ID getDescriptor getInstallURL iconPath relativePath ImageDescriptor createFromURL MalformedURLException
public void init I Workbench workbench I Structured Selection current Selection this workbench workbench this selection current Selection List selected Resources IDE compute Selected Resources current Selection if selected Resources is Empty this selection new Structured Selection selected Resources set Window Title Data Transfer Messages get String Data Transfer import Title NON NLS 1 set Default Page Image Descriptor get Image Descriptor wizban importdir wiz gif NON NLS 1 set Needs Progress Monitor true  IWorkbench IStructuredSelection currentSelection currentSelection selectedResources computeSelectedResources currentSelection selectedResources isEmpty StructuredSelection selectedResources setWindowTitle DataTransferMessages getString DataTransfer importTitle setDefaultPageImageDescriptor getImageDescriptor importdir_wiz setNeedsProgressMonitor
Method declared on I Wizard public boolean perform Finish return main Page finish  IWizard performFinish mainPage

public final static File System Structure Provider INSTANCE new File System Structure Provider Creates an instance of code File System Structure Provider code private File System Structure Provider super  FileSystemStructureProvider FileSystemStructureProvider FileSystemStructureProvider FileSystemStructureProvider
public List get Children Object element File folder File element String children folder list int children Length children null 0 children length List result new Array List children Length for int i 0 i children Length i result add new File folder children i return result  getChildren childrenLength ArrayList childrenLength childrenLength
public Input Stream get Contents Object element try return new File Input Stream File element catch File Not Found Exception e return null  InputStream getContents FileInputStream FileNotFoundException
Method declared on I Import Structure Provider public String get Full Path Object element return File element get Path  IImportStructureProvider getFullPath getPath
public String get Label Object element Get the name if it is empty then return the path as it is a file root File file File element String name file get Name if name length 0 return file get Path else return name  getLabel getName getPath
Method declared on I Import Structure Provider public boolean is Folder Object element return File element is Directory  IImportStructureProvider isFolder isDirectory

public interface I Import Structure Provider Returns a collection with the children of the specified structured element List get Children Object element  IImportStructureProvider getChildren
List get Children Object element Returns the contents of the specified structured element or code null code if there is a problem determining the element s contents param element a structured element return the contents of the structured element or code null code  getChildren
Input Stream get Contents Object element Returns the full path of the specified structured element param element a structured element return the display label of the structured element  InputStream getContents
String get Full Path Object element Returns the display label of the specified structured element param element a structured element return the display label of the structured element  getFullPath
String get Label Object element Returns a boolean indicating whether the passed structured element represents a container element as opposed to a leaf element return boolean param element java lang Object  getLabel

private int overwrite State OVERWRITE NOT SET Creates a new operation that recursively imports the entire contents of the specified root file system object p The code source code parameter represents the root file system object to import All contents of this object are imported Valid types for this parameter are determined by the supplied code I Import Structure Provider code p p The code provider code parameter allows this operation to deal with the source object in an abstract way This operation calls methods on the provider and the provider in turn calls specific methods on the source object p p The default import behavior is to recreate the complete container structure for the contents of the root file system object in their destination If code set Create Container Structure code is set to false then the container structure created is relative to the root file system object p param container Path the full path of the destination container within the workspace param source the root file system object to import param provider the file system structure provider to use param overwrite Implementor the overwrite strategy to use public Import Operation I Path container Path Object source I Import Structure Provider provider I Overwrite Query overwrite Implementor super this destination Path container Path this source source this provider provider overwrite Callback overwrite Implementor  overwriteState OVERWRITE_NOT_SET IImportStructureProvider setCreateContainerStructure containerPath overwriteImplementor ImportOperation IPath containerPath IImportStructureProvider IOverwriteQuery overwriteImplementor destinationPath containerPath overwriteCallback overwriteImplementor
Creates a new operation that imports specific file system objects In this usage context the specified source file system object is used by the operation solely to determine the destination container structure of the file system objects being imported p The code source code parameter represents the root file system object to import Valid types for this parameter are determined by the supplied code I Import Structure Provider code The contents of the source which are to be imported are specified in the code files To Import code parameter p p The code provider code parameter allows this operation to deal with the source object in an abstract way This operation calls methods on the provider and the provider in turn calls specific methods on the source object p p The code files To Import code parameter specifies what contents of the root file system object are to be imported p p The default import behavior is to recreate the complete container structure for the file system objects in their destination If code set Create Container Structure code is set to code false code then the container structure created for each of the file system objects is relative to the supplied root file system object p param container Path the full path of the destination container within the workspace param source the root file system object to import from param provider the file system structure provider to use param overwrite Implementor the overwrite strategy to use param files To Import the list of file system objects to be imported element type code Object code public Import Operation I Path container Path Object source I Import Structure Provider provider I Overwrite Query overwrite Implementor List files To Import this container Path source provider overwrite Implementor set Files To Import files To Import  IImportStructureProvider filesToImport filesToImport setCreateContainerStructure containerPath overwriteImplementor filesToImport ImportOperation IPath containerPath IImportStructureProvider IOverwriteQuery overwriteImplementor filesToImport containerPath overwriteImplementor setFilesToImport filesToImport
Creates a new operation that imports specific file system objects p The code provider code parameter allows this operation to deal with the source object in an abstract way This operation calls methods on the provider and the provider in turn calls specific methods on the source object p p The code files To Import code parameter specifies what file system objects are to be imported p p The default import behavior is to recreate the complete container structure for the file system objects in their destination If code set Create Container Structure code is set to code false code then no container structure is created for each of the file system objects p param container Path the full path of the destination container within the workspace param provider the file system structure provider to use param overwrite Implementor the overwrite strategy to use param files To Import the list of file system objects to be imported element type code Object code public Import Operation I Path container Path I Import Structure Provider provider I Overwrite Query overwrite Implementor List files To Import this container Path null provider overwrite Implementor set Files To Import files To Import  filesToImport setCreateContainerStructure containerPath overwriteImplementor filesToImport ImportOperation IPath containerPath IImportStructureProvider IOverwriteQuery overwriteImplementor filesToImport containerPath overwriteImplementor setFilesToImport filesToImport
Prompts if existing resources should be overwritten Recursively collects existing read only files to overwrite and resources that should not be overwritten param destination Path destination path to check for existing files param sources file system objects that may exist in the destination param no Overwrite files that were selected to be skipped don t overwrite object type I Path param overwrite Readonly the collected existing read only files to overwrite object type I Path void collect Existing Readonly Files I Path destination Path List sources Array List no Overwrite Array List overwrite Readonly int policy I Workspace Root workspace Root Resources Plugin get Workspace get Root Iterator source Iter sources iterator I Path source Root Path null if this source null source Root Path new Path provider get Full Path this source while source Iter has Next Object source source Iter next I Path source Path new Path provider get Full Path source I Path new Destination Path I Resource new Destination if source Root Path null new Destination Path destination Path append provider get Label source else int prefix Length source Path matching First Segments source Root Path I Path relative Source Path source Path remove First Segments prefix Length new Destination Path this destination Path append relative Source Path new Destination workspace Root find Member new Destination Path if new Destination null continue I Folder folder get Folder new Destination if folder null if policy POLICY FORCE OVERWRITE if this overwrite State OVERWRITE NONE query Overwrite new Destination Path no Overwrite add folder continue if provider is Folder source collect Existing Readonly Files new Destination Path provider get Children source no Overwrite overwrite Readonly POLICY FORCE OVERWRITE else I File file get File new Destination if file null if query Overwrite File file policy no Overwrite add file get Full Path else if file is Read Only overwrite Readonly add file  destinationPath noOverwrite IPath overwriteReadonly IPath collectExistingReadonlyFiles IPath destinationPath ArrayList noOverwrite ArrayList overwriteReadonly IWorkspaceRoot workspaceRoot ResourcesPlugin getWorkspace getRoot sourceIter IPath sourceRootPath sourceRootPath getFullPath sourceIter hasNext sourceIter IPath sourcePath getFullPath IPath newDestinationPath IResource newDestination sourceRootPath newDestinationPath destinationPath getLabel prefixLength sourcePath matchingFirstSegments sourceRootPath IPath relativeSourcePath sourcePath removeFirstSegments prefixLength newDestinationPath destinationPath relativeSourcePath newDestination workspaceRoot findMember newDestinationPath newDestination IFolder getFolder newDestination POLICY_FORCE_OVERWRITE overwriteState OVERWRITE_NONE queryOverwrite newDestinationPath noOverwrite isFolder collectExistingReadonlyFiles newDestinationPath getChildren noOverwrite overwriteReadonly POLICY_FORCE_OVERWRITE IFile getFile newDestination queryOverwriteFile noOverwrite getFullPath isReadOnly overwriteReadonly
Creates the folders that appear in the specified resource path These folders are created relative to the destination container param path the relative path of the resource return the container resource coresponding to the given path exception Core Exception if this method failed I Container create Containers For I Path path throws Core Exception I Container current Folder I Container destination Container int segment Count path segment Count No containers to create if segment Count 0 return current Folder Needs to be handles differently at the root if current Folder get Type I Resource ROOT return create From Root path for int i 0 i segment Count i current Folder current Folder get Folder new Path path segment i if current Folder exists I Folder current Folder create false true null return current Folder  CoreException IContainer createContainersFor IPath CoreException IContainer currentFolder IContainer destinationContainer segmentCount segmentCount segmentCount currentFolder currentFolder getType IResource createFromRoot segmentCount currentFolder currentFolder getFolder currentFolder IFolder currentFolder currentFolder
Creates the folders that appear in the specified resource path assuming that the destination Container begins at the root Do not create projects param path the relative path of the resource return the container resource coresponding to the given path exception Core Exception if this method failed private I Container create From Root I Path path throws Core Exception int segment Count path segment Count Assume the project exists I Container current Folder I Workspace Root destination Container get Project path segment 0 for int i 1 i segment Count i current Folder current Folder get Folder new Path path segment i if current Folder exists I Folder current Folder create false true null return current Folder  destinationContainer CoreException IContainer createFromRoot IPath CoreException segmentCount segmentCount IContainer currentFolder IWorkspaceRoot destinationContainer getProject segmentCount currentFolder currentFolder getFolder currentFolder IFolder currentFolder currentFolder
Deletes the given resource If the resource fails to be deleted adds a status object to the list to be returned by code get Result code param resource the resource void delete Resource I Resource resource try resource delete I Resource KEEP HISTORY null catch Core Exception e error Table add e get Status  getResult deleteResource IResource IResource KEEP_HISTORY CoreException errorTable getStatus
protected void execute I Progress Monitor progress Monitor monitor progress Monitor try if selected Files null Set the amount to 1000 as we have no idea of how long this will take monitor begin Task Data Transfer Messages get String Data Transfer import Task 1000 NON NLS 1 Container Generator generator new Container Generator destination Path monitor worked 30 validate Files Arrays as List new Object source monitor worked 50 destination Container generator generate Container new Sub Progress Monitor monitor 50 import Recursively From source POLICY DEFAULT Be sure it finishes monitor worked 90 else Choose twice the selected files size to take folders into account int creation Count selected Files size monitor begin Task Data Transfer Messages get String Data Transfer import Task creation Count 100 NON NLS 1 Container Generator generator new Container Generator destination Path monitor worked 30 validate Files selected Files monitor worked 50 destination Container generator generate Container new Sub Progress Monitor monitor 50 import File System Objects selected Files monitor done catch Core Exception e error Table add e get Status finally monitor done  IProgressMonitor progressMonitor progressMonitor selectedFiles beginTask DataTransferMessages getString DataTransfer importTask ContainerGenerator ContainerGenerator destinationPath validateFiles asList destinationContainer generateContainer SubProgressMonitor importRecursivelyFrom POLICY_DEFAULT creationCount selectedFiles beginTask DataTransferMessages getString DataTransfer importTask creationCount ContainerGenerator ContainerGenerator destinationPath validateFiles selectedFiles destinationContainer generateContainer SubProgressMonitor importFileSystemObjects selectedFiles CoreException errorTable getStatus
Returns the container resource that the passed file system object should be imported into param file System Object the file system object being imported return the container resource that the passed file system object should be imported into exception Core Exception if this method failed I Container get Destination Container For Object file System Object throws Core Exception I Path pathname new Path provider get Full Path file System Object if create Container Structure return create Containers For pathname remove Last Segments 1 else if source file System Object return null I Path source Path new Path provider get Full Path source I Path dest Container Path pathname remove Last Segments 1 I Path relative Path dest Container Path remove First Segments source Path segment Count set Device null return create Containers For relative Path  fileSystemObject CoreException IContainer getDestinationContainerFor fileSystemObject CoreException IPath getFullPath fileSystemObject createContainerStructure createContainersFor removeLastSegments fileSystemObject IPath sourcePath getFullPath IPath destContainerPath removeLastSegments IPath relativePath destContainerPath removeFirstSegments sourcePath segmentCount setDevice createContainersFor relativePath
Returns the resource either casted to or adapted to an I File param resource resource to cast adapt return the resource either casted to or adapted to an I File code null code if the resource does not adapt to I File I File get File I Resource resource if resource instanceof I File return I File resource if resource instanceof I Adaptable return I File I Adaptable resource get Adapter I File class return null  IFile IFile IFile IFile getFile IResource IFile IFile IAdaptable IFile IAdaptable getAdapter IFile
Returns the resource either casted to or adapted to an I Folder param resource resource to cast adapt return the resource either casted to or adapted to an I Folder code null code if the resource does not adapt to I Folder I Folder get Folder I Resource resource if resource instanceof I Folder return I Folder resource if resource instanceof I Adaptable return I Folder I Adaptable resource get Adapter I Folder class return null  IFolder IFolder IFolder IFolder getFolder IResource IFolder IFolder IAdaptable IFolder IAdaptable getAdapter IFolder
Returns the rejected files based on the given multi status param multi Status multi status to use to determine file rejection param files source files return list of rejected files as absolute paths Object type I Path Array List get Rejected Files I Status multi Status I File files Array List rejected Files new Array List I Status status multi Status get Children for int i 0 i status length i if status i isOK false rejected Files add files i get Full Path return rejected Files  multiStatus IPath ArrayList getRejectedFiles IStatus multiStatus IFile ArrayList rejectedFiles ArrayList IStatus multiStatus getChildren rejectedFiles getFullPath rejectedFiles
Returns the status of the import operation If there were any errors the result is a status object containing individual status objects for each error If there were no errors the result is a status object with error code code OK code return the status public I Status get Status I Status errors new I Status error Table size error Table to Array errors return new Multi Status PlatformUI PLUGIN ID I Status OK errors Data Transfer Messages get String Import Operation import Problems NON NLS 1 null  IStatus getStatus IStatus IStatus errorTable errorTable toArray MultiStatus PLUGIN_ID IStatus DataTransferMessages getString ImportOperation importProblems
Imports the specified file system object into the workspace If the import fails adds a status object to the list to be returned by code get Result code param file Object the file system object to be imported param policy determines how the file object is imported void import File Object file Object int policy I Container container Resource try container Resource get Destination Container For file Object catch Core Exception e I Status core Status e get Status String new Message Data Transfer Messages format Import Operation core Import Error new Object file Object core Status get Message NON NLS 1 I Status status new Status core Status get Severity core Status get Plugin core Status get Code new Message null error Table add status return String file Object Path provider get Full Path file Object monitor sub Task file Object Path I File target Resource container Resource get File new Path provider get Label file Object monitor worked 1 if rejected Files contains target Resource get Full Path return ensure that the source and target are not the same I Path target Path target Resource get Location Use Files for comparison to avoid platform specific case issues if target Path null target Path to File equals new File file Object Path error Table add new Status I Status ERROR PlatformUI PLUGIN ID 0 Data Transfer Messages format Import Operation target Same As Source Error NON NLS 1 new Object file Object Path null return Input Stream content Stream provider get Contents file Object if content Stream null error Table add new Status I Status ERROR PlatformUI PLUGIN ID 0 Data Transfer Messages format Import Operation open Stream Error new Object file Object Path NON NLS 1 null return try if target Resource exists target Resource set Contents content Stream I Resource KEEP HISTORY null else target Resource create content Stream false null catch Core Exception e error Table add e get Status finally try content Stream close catch IO Exception e error Table add new Status I Status ERROR PlatformUI PLUGIN ID 0 Data Transfer Messages format Import Operation close Stream Error new Object file Object Path NON NLS 1 e  getResult fileObject importFile fileObject IContainer containerResource containerResource getDestinationContainerFor fileObject CoreException IStatus coreStatus getStatus newMessage DataTransferMessages ImportOperation coreImportError fileObject coreStatus getMessage IStatus coreStatus getSeverity coreStatus getPlugin coreStatus getCode newMessage errorTable fileObjectPath getFullPath fileObject subTask fileObjectPath IFile targetResource containerResource getFile getLabel fileObject rejectedFiles targetResource getFullPath IPath targetPath targetResource getLocation targetPath targetPath toFile fileObjectPath errorTable IStatus PLUGIN_ID DataTransferMessages ImportOperation targetSameAsSourceError fileObjectPath InputStream contentStream getContents fileObject contentStream errorTable IStatus PLUGIN_ID DataTransferMessages ImportOperation openStreamError fileObjectPath targetResource targetResource setContents contentStream IResource KEEP_HISTORY targetResource contentStream CoreException errorTable getStatus contentStream IOException errorTable IStatus PLUGIN_ID DataTransferMessages ImportOperation closeStreamError fileObjectPath
Imports the specified file system objects into the workspace If the import fails adds a status object to the list to be returned by code get Status code param files To Import the list of file system objects to import element type code Object code exception Operation Canceled Exception if canceled void import File System Objects List files To Import Iterator files Enum files To Import iterator while files Enum has Next Object file System Object files Enum next if source null We just import what we are given into the destination I Path source Path new Path provider get Full Path file System Object remove Last Segments 1 if provider is Folder file System Object source Path is Empty If we don t have a parent then we have selected the file systems root Roots can t copied at least not under windows error Table add new Status I Status INFO PlatformUI PLUGIN ID 0 Data Transfer Messages get String Import Operation cannot Copy NON NLS 1 null continue source source Path to File import Recursively From file System Object POLICY DEFAULT  getStatus filesToImport OperationCanceledException importFileSystemObjects filesToImport filesEnum filesToImport filesEnum hasNext fileSystemObject filesEnum IPath sourcePath getFullPath fileSystemObject removeLastSegments isFolder fileSystemObject sourcePath isEmpty errorTable IStatus PLUGIN_ID DataTransferMessages getString ImportOperation cannotCopy sourcePath toFile importRecursivelyFrom fileSystemObject POLICY_DEFAULT
Imports the specified file system container object into the workspace If the import fails adds a status object to the list to be returned by code get Result code param file Object the file system container object to be imported param policy determines how the folder object and children are imported return the policy to use to import the folder s children int import Folder Object folder Object int policy I Container container Resource try container Resource get Destination Container For folder Object catch Core Exception e error Table add e get Status return policy if container Resource null return policy monitor sub Task provider get Full Path folder Object I Workspace workspace destination Container get Workspace I Path container Path container Resource get Full Path I Path resource Path container Path append provider get Label folder Object Do not attempt the import if the resource path is unchanged This may happen when importing from a zip file if resource Path equals container Path return policy if workspace get Root exists resource Path if rejected Files contains resource Path return POLICY SKIP CHILDREN return POLICY FORCE OVERWRITE try workspace get Root get Folder resource Path create false true null catch Core Exception e error Table add e get Status return policy  getResult fileObject importFolder folderObject IContainer containerResource containerResource getDestinationContainerFor folderObject CoreException errorTable getStatus containerResource subTask getFullPath folderObject IWorkspace destinationContainer getWorkspace IPath containerPath containerResource getFullPath IPath resourcePath containerPath getLabel folderObject resourcePath containerPath getRoot resourcePath rejectedFiles resourcePath POLICY_SKIP_CHILDREN POLICY_FORCE_OVERWRITE getRoot getFolder resourcePath CoreException errorTable getStatus
Imports the specified file system object recursively into the workspace If the import fails adds a status object to the list to be returned by code get Status code param file System Object the file system object to be imported param policy determines how the file system object and children are imported exception Operation Canceled Exception if canceled void import Recursively From Object file System Object int policy if monitor is Canceled throw new Operation Canceled Exception if provider is Folder file System Object import File file System Object policy return int child Policy import Folder file System Object policy if child Policy POLICY SKIP CHILDREN Iterator children provider get Children file System Object iterator while children has Next import Recursively From children next child Policy  getStatus fileSystemObject OperationCanceledException importRecursivelyFrom fileSystemObject isCanceled OperationCanceledException isFolder fileSystemObject importFile fileSystemObject childPolicy importFolder fileSystemObject childPolicy POLICY_SKIP_CHILDREN getChildren fileSystemObject hasNext importRecursivelyFrom childPolicy
Queries the user whether the resource with the specified path should be overwritten by a file system object that is being imported param path the workspace path of the resource that needs to be overwritten return code true code to overwrite code false code to not overwrite exception Operation Canceled Exception if canceled boolean query Overwrite I Path resource Path throws Operation Canceled Exception String overwrite Answer overwrite Callback query Overwrite resource Path make Relative to String if overwrite Answer equals I Overwrite Query CANCEL throw new Operation Canceled Exception Data Transfer Messages get String Data Transfer empty String NON NLS 1 if overwrite Answer equals I Overwrite Query NO return false if overwrite Answer equals I Overwrite Query NO ALL this overwrite State OVERWRITE NONE return false if overwrite Answer equals I Overwrite Query ALL this overwrite State OVERWRITE ALL return true  OperationCanceledException queryOverwrite IPath resourcePath OperationCanceledException overwriteAnswer overwriteCallback queryOverwrite resourcePath makeRelative toString overwriteAnswer IOverwriteQuery OperationCanceledException DataTransferMessages getString DataTransfer emptyString overwriteAnswer IOverwriteQuery overwriteAnswer IOverwriteQuery NO_ALL overwriteState OVERWRITE_NONE overwriteAnswer IOverwriteQuery overwriteState OVERWRITE_ALL
Returns whether the given file should be overwritten param target File the file to ask to overwrite param policy determines if the user is queried for overwrite return code true code if the file should be overwritten and code false code if not boolean query Overwrite File I File target File int policy If force overwrite is on don t bother if policy POLICY FORCE OVERWRITE if this overwrite State OVERWRITE NOT SET query Overwrite target File get Full Path return false if this overwrite State OVERWRITE NONE return false return true  targetFile queryOverwriteFile IFile targetFile POLICY_FORCE_OVERWRITE overwriteState OVERWRITE_NOT_SET queryOverwrite targetFile getFullPath overwriteState OVERWRITE_NONE
Sets the context for use by the VCM provider to prompt the user for check out of files param shell context for use by the VCM provider to prompt user for check out The user will not be prompted if set to code null code see I Workspace validate Edit org eclipse core resources I File java lang Object since 2 1 public void set Context Shell shell context shell  IWorkspace validateEdit IFile setContext
Sets whether the containment structures that are implied from the full paths of file system objects being imported should be duplicated in the workbench param value code true code if containers should be created and code false code otherwise public void set Create Container Structure boolean value create Container Structure value  setCreateContainerStructure createContainerStructure
Sets the file system objects to import param files To Import the list of file system objects to be imported element type code Object code public void set Files To Import List files To Import this selected Files files To Import  filesToImport setFilesToImport filesToImport selectedFiles filesToImport
Sets whether imported file system objects should automatically overwrite existing workbench resources when a conflict occurs param value code true code to automatically overwrite and code false code otherwise public void set Overwrite Resources boolean value if value this overwrite State OVERWRITE ALL  setOverwriteResources overwriteState OVERWRITE_ALL
Validates that the given source resources can be copied to the destination as decided by the VCM provider param existing Files existing files to validate return list of rejected files as absolute paths Object type I Path Array List validate Edit List existing Files Array List rejected Files new Array List if existing Files size 0 I File files I File existing Files to Array new I File existing Files size I Workspace workspace Resources Plugin get Workspace I Status status workspace validate Edit files context if status is Multi Status rejected Files get Rejected Files status files else if status isOK throw new Operation Canceled Exception Data Transfer Messages get String Data Transfer empty String NON NLS 1 return rejected Files  existingFiles IPath ArrayList validateEdit existingFiles ArrayList rejectedFiles ArrayList existingFiles IFile IFile existingFiles toArray IFile existingFiles IWorkspace ResourcesPlugin getWorkspace IStatus validateEdit isMultiStatus rejectedFiles getRejectedFiles OperationCanceledException DataTransferMessages getString DataTransfer emptyString rejectedFiles
Validates the given file system objects The user is prompted to overwrite existing files Existing read only files are validated with the VCM provider param source Files files to validate void validate Files List source Files Array List no Overwrite new Array List Array List overwrite Readonly new Array List collect Existing Readonly Files destination Path source Files no Overwrite overwrite Readonly POLICY DEFAULT rejected Files validate Edit overwrite Readonly rejected Files add All no Overwrite  sourceFiles validateFiles sourceFiles ArrayList noOverwrite ArrayList ArrayList overwriteReadonly ArrayList collectExistingReadonlyFiles destinationPath sourceFiles noOverwrite overwriteReadonly POLICY_DEFAULT rejectedFiles validateEdit overwriteReadonly rejectedFiles addAll noOverwrite

private boolean populated false Create a code Minimized File System Element code with the supplied name and parent param name the name of the file element this represents param parent the containing parent param is Directory indicated if this could have children or not Minimized File System Element String name File System Element parent boolean is Directory super name parent is Directory  MinimizedFileSystemElement isDirectory MinimizedFileSystemElement FileSystemElement isDirectory isDirectory
Returns a list of the files that are immediate children Use the supplied provider if it needs to be populated of this folder public Adaptable List get Files I Import Structure Provider provider if populated populate provider return super get Files  AdaptableList getFiles IImportStructureProvider getFiles
Returns a list of the folders that are immediate children Use the supplied provider if it needs to be populated of this folder public Adaptable List get Folders I Import Structure Provider provider if populated populate provider return super get Folders  AdaptableList getFolders IImportStructureProvider getFolders
Return whether or not population has happened for the receiver boolean is Populated return this populated  isPopulated
Return whether or not population has not happened for the receiver boolean not Populated return this populated  notPopulated
Populate the files and folders of the receiver using the suppliec structure provider param provider org eclipse ui wizards datatransfer I Import Structure Provider private void populate I Import Structure Provider provider Object file System Object get File System Object List children provider get Children file System Object if children null children new Array List 1 Iterator children Enum children iterator while children Enum has Next Object child children Enum next String element Label provider get Label child Create one level below Minimized File System Element result new Minimized File System Element element Label this provider is Folder child result set File System Object child set Populated  IImportStructureProvider IImportStructureProvider fileSystemObject getFileSystemObject getChildren fileSystemObject ArrayList childrenEnum childrenEnum hasNext childrenEnum elementLabel getLabel MinimizedFileSystemElement MinimizedFileSystemElement elementLabel isFolder setFileSystemObject setPopulated
Set whether or not population has happened for the receiver to true void set Populated this populated true  setPopulated

class Populate Element Operation extends Populate Root Operation Create a new code Populate Elements Operation code param root Object the object to be populated param structure Provider the object that defines how we are to populate it public Populate Element Operation Minimized File System Element root Object I Import Structure Provider structure Provider super root Object structure Provider  PopulateElementOperation PopulateRootOperation PopulateElementsOperation rootObject structureProvider PopulateElementOperation MinimizedFileSystemElement rootObject IImportStructureProvider structureProvider rootObject structureProvider
Populates the children of element down to level depth private void populate Element Minimized File System Element element I Progress Monitor monitor throws Interrupted Exception Object file System Object element get File System Object Modal Context check Canceled monitor List children provider get Children file System Object if children null children new Array List 1 Iterator children Enum children iterator while children Enum has Next Create one level below create Element element children Enum next 1 element set Populated  populateElement MinimizedFileSystemElement IProgressMonitor InterruptedException fileSystemObject getFileSystemObject ModalContext checkCanceled getChildren fileSystemObject ArrayList childrenEnum childrenEnum hasNext createElement childrenEnum setPopulated
Runs the operation The result of this operation is always the elemen provided public void run I Progress Monitor monitor throws Interrupted Exception try this monitor monitor monitor begin Task Data Transfer Messages get String Data Transfer scanning Children I Progress Monitor UNKNOWN NON NLS 1 Minimized File System Element element Minimized File System Element root populate Element element monitor finally monitor done  IProgressMonitor InterruptedException beginTask DataTransferMessages getString DataTransfer scanningChildren IProgressMonitor MinimizedFileSystemElement MinimizedFileSystemElement populateElement

public class Populate Root Operation extends Select Files Operation Create a new code Populate Files Operation code param root Object the object to be populated param structure Provider the object that defines how we are to populate it public Populate Root Operation Object root Object I Import Structure Provider structure Provider super root Object structure Provider  PopulateRootOperation SelectFilesOperation PopulateFilesOperation rootObject structureProvider PopulateRootOperation rootObject IImportStructureProvider structureProvider rootObject structureProvider
Creates and returns a code File System Element code if the specified file system object merits one The criteria for this are if the file system object is a container then it must have either a child container or an associated file if the file system object is a file then it must have an extension suitable for selection protected File System Element create Element File System Element parent Object file System Object throws Interrupted Exception Iterate on level deep return create Element parent file System Object 2  FileSystemElement FileSystemElement createElement FileSystemElement fileSystemObject InterruptedException createElement fileSystemObject
Creates and returns a code File System Element code if the specified file system object merits one The criteria for this are if the file system object is a container then it must have either a child container or an associated file if the file system object is a file then it must have an extension suitable for selection recurse down for depth to populate children protected File System Element create Element File System Element parent Object file System Object int depth throws Interrupted Exception Modal Context check Canceled monitor boolean is Container provider is Folder file System Object String element Label parent null provider get Full Path file System Object provider get Label file System Object Minimized File System Element result new Minimized File System Element element Label parent is Container result set File System Object file System Object if is Container if depth 0 List children provider get Children file System Object if children null children new Array List 1 Iterator children Enum children iterator while children Enum has Next create Element result children Enum next depth 1 result set Populated return result  FileSystemElement FileSystemElement createElement FileSystemElement fileSystemObject InterruptedException ModalContext checkCanceled isContainer isFolder fileSystemObject elementLabel getFullPath fileSystemObject getLabel fileSystemObject MinimizedFileSystemElement MinimizedFileSystemElement elementLabel isContainer setFileSystemObject fileSystemObject isContainer getChildren fileSystemObject ArrayList childrenEnum childrenEnum hasNext createElement childrenEnum setPopulated

File System Elementresult Creates a new code Select Files Operation code public Select Files Operation Object root Object I Import Structure Provider structure Provider super root root Object provider structure Provider  FileSystemElementresult SelectFilesOperation SelectFilesOperation rootObject IImportStructureProvider structureProvider rootObject structureProvider
Creates and returns a code File System Element code if the specified file system object merits one The criteria for this are if the file system object is a container then it must have either a child container or an associated file if the file system object is a file then it must have an extension suitable for selection protected File System Element create Element File System Element parent Object file System Object throws Interrupted Exception Modal Context check Canceled monitor boolean is Container provider is Folder file System Object String element Label parent null provider get Full Path file System Object provider get Label file System Object if is Container has Desired Extension element Label return null File System Element result new File System Element element Label parent is Container result set File System Object file System Object if is Container boolean have Child Or File false List children provider get Children file System Object if children null children new Array List 1 Iterator children Enum children iterator while children Enum has Next if create Element result children Enum next null have Child Or File true if have Child Or File parent null parent remove Folder result result null return result  FileSystemElement FileSystemElement createElement FileSystemElement fileSystemObject InterruptedException ModalContext checkCanceled isContainer isFolder fileSystemObject elementLabel getFullPath fileSystemObject getLabel fileSystemObject isContainer hasDesiredExtension elementLabel FileSystemElement FileSystemElement elementLabel isContainer setFileSystemObject fileSystemObject isContainer haveChildOrFile getChildren fileSystemObject ArrayList childrenEnum childrenEnum hasNext createElement childrenEnum haveChildOrFile haveChildOrFile removeFolder
Returns the extension portion of the passed filename string protected String get Extension For String filename int n Index filename last Index Of if n Index 0 return filename substring n Index 1 return NON NLS 1  getExtensionFor nIndex lastIndexOf nIndex nIndex
Returns the resulting root file system element public File System Element get Result return result  FileSystemElement getResult
Returns a boolean indicating whether the extension of the passed filename is one of the extensions specified as desired by the filter protected boolean has Desired Extension String filename if desired Extensions null ie all extensions are fine return true int extensions Size desired Extensions length for int i 0 i extensions Size i if get Extension For filename equals Ignore Case desired Extensions i return true return false  hasDesiredExtension desiredExtensions extensionsSize desiredExtensions extensionsSize getExtensionFor equalsIgnoreCase desiredExtensions
Runs the operation public void run I Progress Monitor monitor throws Interrupted Exception try this monitor monitor monitor begin Task Data Transfer Messages get String Data Transfer scanning Matching I Progress Monitor UNKNOWN NON NLS 1 result create Element null root if result null result new File System Element provider get Label root null provider is Folder root result set File System Object root finally monitor done  IProgressMonitor InterruptedException beginTask DataTransferMessages getString DataTransfer scanningMatching IProgressMonitor createElement FileSystemElement getLabel isFolder setFileSystemObject
Sets the file extensions which are desired A value of code null code indicates that all files should be kept regardless of extension public void set Desired Extensions String extensions desired Extensions extensions  setDesiredExtensions desiredExtensions

private File Filter project Filter new File Filter Only accept those files that are project public boolean accept File path Name return path Name get Name equals I Project Description DESCRIPTION FILE NAME  FileFilter projectFilter FileFilter pathName pathName getName IProjectDescription DESCRIPTION_FILE_NAME
private Listener location Modify Listener new Listener public void handle Event Event e set Page Complete validate Page  locationModifyListener handleEvent setPageComplete validatePage
private static final int SIZING TEXT FIELD WIDTH 250 Creates a new project creation wizard page public Wizard External Project Import Page super wizard External Project Page NON NLS 1 set Page Complete false set Title Data Transfer Messages get String Wizard External Project Import Page title NON NLS 1 set Description Data Transfer Messages get String Wizard External Project Import Page description NON NLS 1  SIZING_TEXT_FIELD_WIDTH WizardExternalProjectImportPage wizardExternalProjectPage setPageComplete setTitle DataTransferMessages getString WizardExternalProjectImportPage setDescription DataTransferMessages getString WizardExternalProjectImportPage
non Javadoc Method declared on I Dialog Page public void create Control Composite parent initialize Dialog Units parent Composite composite new Composite parent SWT NULL Workbench Help set Help composite I Help Context Ids NEW PROJECT WIZARD PAGE composite set Layout new Grid Layout composite set Layout Data new Grid Data Grid Data FILL BOTH composite set Font parent get Font create Project Name Group composite create Project Location Group composite validate Page Show description on opening set Error Message null set Message null set Control composite  IDialogPage createControl initializeDialogUnits WorkbenchHelp setHelp IHelpContextIds NEW_PROJECT_WIZARD_PAGE setLayout GridLayout setLayoutData GridData GridData FILL_BOTH setFont getFont createProjectNameGroup createProjectLocationGroup validatePage setErrorMessage setMessage setControl
Creates the project location specification controls param parent the parent composite private final void create Project Location Group Composite parent project specification group Composite project Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 project Group set Layout layout project Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL project Group set Font parent get Font new project label Label project Contents Label new Label project Group SWT NONE project Contents Label set Text Data Transfer Messages get String Wizard External Project Import Page project Contents Label NON NLS 1 project Contents Label set Font parent get Font create User Specified Project Location Group project Group  createProjectLocationGroup projectGroup GridLayout GridLayout numColumns projectGroup setLayout projectGroup setLayoutData GridData GridData FILL_HORIZONTAL projectGroup setFont getFont projectContentsLabel projectGroup projectContentsLabel setText DataTransferMessages getString WizardExternalProjectImportPage projectContentsLabel projectContentsLabel setFont getFont createUserSpecifiedProjectLocationGroup projectGroup
Creates the project name specification controls param parent the parent composite private final void create Project Name Group Composite parent Font dialog Font parent get Font project specification group Composite project Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 project Group set Font dialog Font project Group set Layout layout project Group set Layout Data new Grid Data Grid Data FILL HORIZONTAL new project label Label project Label new Label project Group SWT NONE project Label set Text Data Transfer Messages get String Wizard External Project Import Page name Label NON NLS 1 project Label set Font dialog Font new project name entry field project Name Field new Text project Group SWT BORDER SWT READ ONLY Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH project Name Field set Layout Data data project Name Field set Font dialog Font  createProjectNameGroup dialogFont getFont projectGroup GridLayout GridLayout numColumns projectGroup setFont dialogFont projectGroup setLayout projectGroup setLayoutData GridData GridData FILL_HORIZONTAL projectLabel projectGroup projectLabel setText DataTransferMessages getString WizardExternalProjectImportPage nameLabel projectLabel setFont dialogFont projectNameField projectGroup READ_ONLY GridData GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH projectNameField setLayoutData projectNameField setFont dialogFont
this browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Location Browse Button Pressed  browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLocationBrowseButtonPressed
Creates the project location specification controls param project Group the parent composite param boolean the initial enabled state of the widgets created private void create User Specified Project Location Group Composite project Group Font dialog Font project Group get Font project location entry field this location Path Field new Text project Group SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH this location Path Field set Layout Data data this location Path Field set Font dialog Font browse button this browse Button new Button project Group SWT PUSH this browse Button set Text Data Transfer Messages get String Wizard External Project Import Page browse Label NON NLS 1 this browse Button set Font dialog Font set Button Layout Data this browse Button this browse Button add Selection Listener new Selection Adapter public void widget Selected Selection Event event handle Location Browse Button Pressed location Path Field add Listener SWT Modify location Modify Listener  projectGroup createUserSpecifiedProjectLocationGroup projectGroup dialogFont projectGroup getFont locationPathField projectGroup GridData GridData GridData FILL_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH locationPathField setLayoutData locationPathField setFont dialogFont browseButton projectGroup browseButton setText DataTransferMessages getString WizardExternalProjectImportPage browseLabel browseButton setFont dialogFont setButtonLayoutData browseButton browseButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleLocationBrowseButtonPressed locationPathField addListener locationModifyListener
Returns the current project location path as entered by the user or its anticipated initial value return the project location path its anticipated initial value or code null code if no project location path is known public I Path get Location Path return new Path get Project Location Field Value  IPath getLocationPath getProjectLocationFieldValue
Creates a project resource handle for the current project name field value p This method does not create the project resource this is the responsibility of code I Project create code invoked by the new project resource wizard p return the new project resource handle public I Project get Project Handle return Resources Plugin get Workspace get Root get Project get Project Name  IProject IProject getProjectHandle ResourcesPlugin getWorkspace getRoot getProject getProjectName
Returns the current project name as entered by the user or its anticipated initial value return the project name its anticipated initial value or code null code if no project name is known public String get Project Name return get Project Name Field Value  getProjectName getProjectNameFieldValue
Returns the value of the project name field with leading and trailing spaces removed return the project name in the field private String get Project Name Field Value if project Name Field null return NON NLS 1 else return project Name Field get Text trim  getProjectNameFieldValue projectNameField projectNameField getText
Returns the value of the project location field with leading and trailing spaces removed return the project location directory in the field private String get Project Location Field Value return location Path Field get Text trim  getProjectLocationFieldValue locationPathField getText
Open an appropriate directory browser private void handle Location Browse Button Pressed Directory Dialog dialog new Directory Dialog location Path Field get Shell dialog set Message Data Transfer Messages get String Wizard External Project Import Page directory Label NON NLS 1 String dir Name get Project Location Field Value if dir Name length 0 dir Name previously Browsed Directory if dir Name length 0 NON NLS 1 dialog set Filter Path get Workspace get Root get Location toOS String else File path new File dir Name if path exists dialog set Filter Path new Path dir Name toOS String String selected Directory dialog open if selected Directory null previously Browsed Directory selected Directory location Path Field set Text previously Browsed Directory set Project Name project File previously Browsed Directory  handleLocationBrowseButtonPressed DirectoryDialog DirectoryDialog locationPathField getShell setMessage DataTransferMessages getString WizardExternalProjectImportPage directoryLabel dirName getProjectLocationFieldValue dirName dirName previouslyBrowsedDirectory dirName setFilterPath getWorkspace getRoot getLocation toOSString dirName setFilterPath dirName toOSString selectedDirectory selectedDirectory previouslyBrowsedDirectory selectedDirectory locationPathField setText previouslyBrowsedDirectory setProjectName projectFile previouslyBrowsedDirectory
Returns whether this page s controls currently all contain valid values return code true code if all controls are valid and code false code if at least one is invalid private boolean validate Page String location Field Contents get Project Location Field Value if location Field Contents equals NON NLS 1 set Error Message null set Message Data Transfer Messages get String Wizard External Project Import Page project Location Empty NON NLS 1 return false I Path path new Path NON NLS 1 if path is Valid Path location Field Contents set Error Message Data Transfer Messages get String Wizard External Project Import Page location Error NON NLS 1 return false File project File project File location Field Contents if project File null set Error Message Data Transfer Messages format Wizard External Project Import Page notA Project NON NLS 1 new String location Field Contents return false else set Project Name project File if get Project Handle exists set Error Message Data Transfer Messages get String Wizard External Project Import Page project Exists Message NON NLS 1 return false set Error Message null set Message null return true  validatePage locationFieldContents getProjectLocationFieldValue locationFieldContents setErrorMessage setMessage DataTransferMessages getString WizardExternalProjectImportPage projectLocationEmpty IPath isValidPath locationFieldContents setErrorMessage DataTransferMessages getString WizardExternalProjectImportPage locationError projectFile projectFile locationFieldContents projectFile setErrorMessage DataTransferMessages WizardExternalProjectImportPage notAProject locationFieldContents setProjectName projectFile getProjectHandle setErrorMessage DataTransferMessages getString WizardExternalProjectImportPage projectExistsMessage setErrorMessage setMessage
return true private I Workspace get Workspace I Workspace workspace IDE Workbench Plugin get Plugin Workspace return workspace  IWorkspace getWorkspace IWorkspace IDEWorkbenchPlugin getPluginWorkspace
Return whether or not the specifed location is a prefix of the root private boolean is Prefix Of Root I Path location Path return Platform get Location is Prefix Of location Path  isPrefixOfRoot IPath locationPath getLocation isPrefixOf locationPath
Set the project name using either the name of the parent of the file or the name entry in the xml for the file private void set Project Name File project File If there is no file or the user has already specified forget it if project File null return I Path path new Path project File get Path I Project Description new Description null try new Description get Workspace load Project Description path catch Core Exception exception no good couldn t get the name if new Description null this description null this project Name Field set Text NON NLS 1 else this description new Description this project Name Field set Text this description get Name  setProjectName projectFile projectFile IPath projectFile getPath IProjectDescription newDescription newDescription getWorkspace loadProjectDescription CoreException newDescription projectNameField setText newDescription projectNameField setText getName
Return a project file from the specified location If there isn t one return null private File project File String location Field Contents File directory new File location Field Contents if directory is File return null File files directory list Files this project Filter if files null files length 1 return files 0 else return null  projectFile locationFieldContents locationFieldContents isFile listFiles projectFilter
Workspace Modify Operation op new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception monitor begin Task 2000 NON NLS 1 project create description new Sub Progress Monitor monitor 1000 if monitor is Canceled throw new Operation Canceled Exception project open new Sub Progress Monitor monitor 1000  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException beginTask SubProgressMonitor isCanceled OperationCanceledException SubProgressMonitor
Creates a new project resource with the selected name p In normal usage this method is invoked after the user has pressed Finish on the wizard the enablement of the Finish button implies that all controls on the pages currently contain valid values p return the created project resource or code null code if the project was not created I Project create Existing Project String project Name project Name Field get Text final I Workspace workspace Resources Plugin get Workspace final I Project project workspace get Root get Project project Name if this description null this description workspace new Project Description project Name I Path location Path get Location Path If it is under the root use the default location if is Prefix Of Root location Path this description set Location null else this description set Location location Path else this description set Name project Name create the new project operation Workspace Modify Operation op new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception monitor begin Task 2000 NON NLS 1 project create description new Sub Progress Monitor monitor 1000 if monitor is Canceled throw new Operation Canceled Exception project open new Sub Progress Monitor monitor 1000 run the new project creation operation try get Container run true true op catch Interrupted Exception e return null catch Invocation Target Exception e ie one of the steps resulted in a core exception Throwable t e get Target Exception if t instanceof Core Exception if Core Exception t get Status get Code I Resource Status CASE VARIANT EXISTS Message Dialog open Error get Shell Data Transfer Messages get String Wizard External Project Import Page error Message NON NLS 1 Data Transfer Messages get String Wizard External Project Import Page case Variant Exists Error NON NLS 1 else Error Dialog open Error get Shell Data Transfer Messages get String Wizard External Project Import Page error Message NON NLS 1 null Core Exception t get Status return null return project  IProject createExistingProject projectName projectNameField getText IWorkspace ResourcesPlugin getWorkspace IProject getRoot getProject projectName newProjectDescription projectName IPath locationPath getLocationPath isPrefixOfRoot locationPath setLocation setLocation locationPath setName projectName WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException beginTask SubProgressMonitor isCanceled OperationCanceledException SubProgressMonitor getContainer InterruptedException InvocationTargetException getTargetException CoreException CoreException getStatus getCode IResourceStatus CASE_VARIANT_EXISTS MessageDialog openError getShell DataTransferMessages getString WizardExternalProjectImportPage errorMessage DataTransferMessages getString WizardExternalProjectImportPage caseVariantExistsError ErrorDialog openError getShell DataTransferMessages getString WizardExternalProjectImportPage errorMessage CoreException getStatus
public void set Visible boolean visible super set Visible visible if visible this location Path Field set Focus  setVisible setVisible locationPathField setFocus

private static final StringSTORE CREATE DIRECTORIES FOR SPECIFIED CONTAINER ID Wizard File System Export Page1 STORE CREATE DIRECTORIES FOR SPECIFIED CONTAINER ID NON NLS 1 Create an instance of this class protected Wizard File System Export Page1 String name I Structured Selection selection super name selection  StringSTORE_CREATE_DIRECTORIES_FOR_SPECIFIED_CONTAINER_ID WizardFileSystemExportPage1 STORE_CREATE_DIRECTORIES_FOR_SPECIFIED_CONTAINER_ID WizardFileSystemExportPage1 IStructuredSelection
Create an instance of this class public Wizard File System Export Page1 I Structured Selection selection this file System Export Page1 selection NON NLS 1 set Title Data Transfer Messages get String Data Transfer file System Title NON NLS 1 set Description Data Transfer Messages get String File Export export Local File System NON NLS 1  WizardFileSystemExportPage1 IStructuredSelection fileSystemExportPage1 setTitle DataTransferMessages getString DataTransfer fileSystemTitle setDescription DataTransferMessages getString FileExport exportLocalFileSystem
Add the passed value to self s destination widget s history param value java lang String protected void add Destination Item String value destination Name Field add value  addDestinationItem destinationNameField
non Javadoc Method declared on I Dialog Page public void create Control Composite parent super create Control parent give Focus To Destination  IDialogPage createControl createControl giveFocusToDestination
Create the export destination specification widgets param parent org eclipse swt widgets Composite protected void create Destination Group Composite parent destination specification group Composite destination Selection Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 destination Selection Group set Layout layout destination Selection Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN FILL new Label destination Selection Group SWT NONE set Text get Destination Label destination name entry field destination Name Field new Combo destination Selection Group SWT SINGLE SWT BORDER destination Name Field add Listener SWT Modify this destination Name Field add Listener SWT Selection this Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH destination Name Field set Layout Data data destination browse button destination Browse Button new Button destination Selection Group SWT PUSH destination Browse Button set Text Data Transfer Messages get String Data Transfer browse NON NLS 1 destination Browse Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL destination Browse Button add Listener SWT Selection this new Label parent SWT NONE vertical spacer  createDestinationGroup destinationSelectionGroup GridLayout GridLayout numColumns destinationSelectionGroup setLayout destinationSelectionGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_FILL destinationSelectionGroup setText getDestinationLabel destinationNameField destinationSelectionGroup destinationNameField addListener destinationNameField addListener GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH destinationNameField setLayoutData destinationBrowseButton destinationSelectionGroup destinationBrowseButton setText DataTransferMessages getString DataTransfer destinationBrowseButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL destinationBrowseButton addListener
Create the export options specification widgets param parent org eclipse swt widgets Composite protected void create Options Group Composite parent options group Composite options Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 options Group set Layout layout options Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL overwrite checkbox overwrite Existing Files Checkbox new Button options Group SWT CHECK SWT LEFT overwrite Existing Files Checkbox set Text Data Transfer Messages get String Export File overwrite Existing NON NLS 1 create directory structure checkbox create Directory Structure Checkbox new Button options Group SWT CHECK SWT LEFT create Directory Structure Checkbox set Text Data Transfer Messages get String Export File create Directory Structure NON NLS 1 create Directory Structure Checkbox add Listener SWT Selection this create directory for container checkbox create Directories For Selected Containers Checkbox new Button options Group SWT CHECK SWT LEFT create Directories For Selected Containers Checkbox set Text Data Transfer Messages get String Export File create Directories For Selected NON NLS 1 initial setup create Directory Structure Checkbox set Selection true  createOptionsGroup optionsGroup GridLayout GridLayout marginHeight optionsGroup setLayout optionsGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL overwriteExistingFilesCheckbox optionsGroup overwriteExistingFilesCheckbox setText DataTransferMessages getString ExportFile overwriteExisting createDirectoryStructureCheckbox optionsGroup createDirectoryStructureCheckbox setText DataTransferMessages getString ExportFile createDirectoryStructure createDirectoryStructureCheckbox addListener createDirectoriesForSelectedContainersCheckbox optionsGroup createDirectoriesForSelectedContainersCheckbox setText DataTransferMessages getString ExportFile createDirectoriesForSelected createDirectoryStructureCheckbox setSelection
Attempts to ensure that the specified directory exists on the local file system Answers a boolean indicating success return boolean param directory java io File protected boolean ensure Directory Exists File directory if directory exists if query Yes No Question Data Transfer Messages get String Data Transfer create Target Directory NON NLS 1 return false if directory mkdirs display Error Dialog Data Transfer Messages get String Data Transfer directory Creation Error NON NLS 1 give Focus To Destination return false return true  ensureDirectoryExists queryYesNoQuestion DataTransferMessages getString DataTransfer createTargetDirectory displayErrorDialog DataTransferMessages getString DataTransfer directoryCreationError giveFocusToDestination
If the target for export does not exist then attempt to create it Answer a boolean indicating whether the target exists ie if it either pre existed or this method was able to create it return boolean protected boolean ensure Target Is Valid File target Directory if target Directory exists target Directory is Directory display Error Dialog Data Transfer Messages get String File Export directory Exists NON NLS 1 give Focus To Destination return false return ensure Directory Exists target Directory  ensureTargetIsValid targetDirectory targetDirectory targetDirectory isDirectory displayErrorDialog DataTransferMessages getString FileExport directoryExists giveFocusToDestination ensureDirectoryExists targetDirectory
Set up and execute the passed Operation Answer a boolean indicating success return boolean protected boolean execute Export Operation File System Export Operation op op set Create Container Directories create Directories For Selected Containers Checkbox get Selection op set Create Leadup Structure create Directory Structure Checkbox get Selection op set Overwrite Files overwrite Existing Files Checkbox get Selection try get Container run true true op catch Interrupted Exception e return false catch Invocation Target Exception e display Error Dialog e get Target Exception get Message return false I Status status op get Status if status isOK Error Dialog open Error get Container get Shell Data Transfer Messages get String Data Transfer export Problems NON NLS 1 null no special message status return false return true  executeExportOperation FileSystemExportOperation setCreateContainerDirectories createDirectoriesForSelectedContainersCheckbox getSelection setCreateLeadupStructure createDirectoryStructureCheckbox getSelection setOverwriteFiles overwriteExistingFilesCheckbox getSelection getContainer InterruptedException InvocationTargetException displayErrorDialog getTargetException getMessage IStatus getStatus ErrorDialog openError getContainer getShell DataTransferMessages getString DataTransfer exportProblems
The Finish button was pressed Try to do the required work now and answer a boolean indicating success If false is returned then the wizard will not close return boolean public boolean finish if ensure Target Is Valid new File get Destination Value return false List resources To Export get Selected Resources about to invoke the operation so save our state save Widget Values if resources To Export size 0 return execute Export Operation new File System Export Operation get Source Resource resources To Export get Destination Value this Message Dialog open Information get Container get Shell Data Transfer Messages get String Data Transfer information NON NLS 1 Data Transfer Messages get String File Export none Selected NON NLS 1 return false  ensureTargetIsValid getDestinationValue resourcesToExport getSelectedResources saveWidgetValues resourcesToExport executeExportOperation FileSystemExportOperation getSourceResource resourcesToExport getDestinationValue MessageDialog openInformation getContainer getShell DataTransferMessages getString DataTransfer DataTransferMessages getString FileExport noneSelected
Answer the string to display in self as the destination type return java lang String protected String get Destination Label return Data Transfer Messages get String Data Transfer directory NON NLS 1  getDestinationLabel DataTransferMessages getString DataTransfer
Answer the contents of self s destination specification widget return java lang String protected String get Destination Value return destination Name Field get Text trim  getDestinationValue destinationNameField getText
Set the current input focus to self s destination entry field protected void give Focus To Destination destination Name Field set Focus  giveFocusToDestination destinationNameField setFocus
Open an appropriate destination browser so that the user can specify a source to import from protected void handle Destination Browse Button Pressed Directory Dialog dialog new Directory Dialog get Container get Shell SWT SAVE dialog set Message Data Transfer Messages get String Data Transfer select Destination NON NLS 1 dialog set Filter Path get Destination Value String selected Directory Name dialog open if selected Directory Name null set Destination Value selected Directory Name  handleDestinationBrowseButtonPressed DirectoryDialog DirectoryDialog getContainer getShell setMessage DataTransferMessages getString DataTransfer selectDestination setFilterPath getDestinationValue selectedDirectoryName selectedDirectoryName setDestinationValue selectedDirectoryName
Handle all events and enablements for widgets in this page param e org eclipse swt widgets Event public void handle Event Event e Widget source e widget if source destination Browse Button handle Destination Browse Button Pressed super handle Event e  handleEvent destinationBrowseButton handleDestinationBrowseButtonPressed handleEvent
Hook method for saving widget values for restoration by the next instance of this class protected void internal Save Widget Values update directory names history I Dialog Settings settings get Dialog Settings if settings null String directory Names settings get Array STORE DESTINATION NAMES ID if directory Names null directory Names new String 0 directory Names add To History directory Names get Destination Value settings put STORE DESTINATION NAMES ID directory Names options settings put STORE OVERWRITE EXISTING FILES ID overwrite Existing Files Checkbox get Selection settings put STORE CREATE STRUCTURE ID create Directory Structure Checkbox get Selection settings put STORE CREATE DIRECTORIES FOR SPECIFIED CONTAINER ID create Directories For Selected Containers Checkbox get Selection  internalSaveWidgetValues IDialogSettings getDialogSettings directoryNames getArray STORE_DESTINATION_NAMES_ID directoryNames directoryNames directoryNames addToHistory directoryNames getDestinationValue STORE_DESTINATION_NAMES_ID directoryNames STORE_OVERWRITE_EXISTING_FILES_ID overwriteExistingFilesCheckbox getSelection STORE_CREATE_STRUCTURE_ID createDirectoryStructureCheckbox getSelection STORE_CREATE_DIRECTORIES_FOR_SPECIFIED_CONTAINER_ID createDirectoriesForSelectedContainersCheckbox getSelection
Hook method for restoring widget values to the values that they held last time this wizard was used to completion protected void restore Widget Values I Dialog Settings settings get Dialog Settings if settings null String directory Names settings get Array STORE DESTINATION NAMES ID if directory Names null return ie no settings stored destination set Destination Value directory Names 0 for int i 0 i directory Names length i add Destination Item directory Names i options overwrite Existing Files Checkbox set Selection settings get Boolean STORE OVERWRITE EXISTING FILES ID create Directory Structure Checkbox set Selection settings get Boolean STORE CREATE STRUCTURE ID create Directories For Selected Containers Checkbox set Selection settings get Boolean STORE CREATE DIRECTORIES FOR SPECIFIED CONTAINER ID  restoreWidgetValues IDialogSettings getDialogSettings directoryNames getArray STORE_DESTINATION_NAMES_ID directoryNames setDestinationValue directoryNames directoryNames addDestinationItem directoryNames overwriteExistingFilesCheckbox setSelection getBoolean STORE_OVERWRITE_EXISTING_FILES_ID createDirectoryStructureCheckbox setSelection getBoolean STORE_CREATE_STRUCTURE_ID createDirectoriesForSelectedContainersCheckbox setSelection getBoolean STORE_CREATE_DIRECTORIES_FOR_SPECIFIED_CONTAINER_ID
Set the contents of self s destination specification widget to the passed value param value java lang String protected void set Destination Value String value destination Name Field set Text value  setDestinationValue destinationNameField setText
Answer a boolean indicating whether self s destination specification widgets currently all contain valid values return boolean protected boolean validate Destination Group return get Destination Value equals NON NLS 1  validateDestinationGroup getDestinationValue

private final static String STORE SELECTED TYPES ID Wizard File System Import Page1 STORE SELECTED TYPES ID NON NLS 1 Creates an instance of this class protected Wizard File System Import Page1 String name I Workbench a Workbench I Structured Selection selection super name selection  STORE_SELECTED_TYPES_ID WizardFileSystemImportPage1 STORE_SELECTED_TYPES_ID WizardFileSystemImportPage1 IWorkbench aWorkbench IStructuredSelection
Creates an instance of this class public Wizard File System Import Page1 I Workbench a Workbench I Structured Selection selection this file System Import Page1 a Workbench selection NON NLS 1 set Title Data Transfer Messages get String Data Transfer file System Title NON NLS 1 set Description Data Transfer Messages get String File Import import File System NON NLS 1  WizardFileSystemImportPage1 IWorkbench aWorkbench IStructuredSelection fileSystemImportPage1 aWorkbench setTitle DataTransferMessages getString DataTransfer fileSystemTitle setDescription DataTransferMessages getString FileImport importFileSystem
Adds the recursive contents of the passed file system element to this page s collection of selected resources protected void add To Selected Resources File System Element element if element is Directory Object children element get Folders get Children element for int i 0 i children length i add To Selected Resources File System Element children i children element get Files get Children element for int i 0 i children length i add To Selected Resources File System Element children i else selected Resources add element  addToSelectedResources FileSystemElement isDirectory getFolders getChildren addToSelectedResources FileSystemElement getFiles getChildren addToSelectedResources FileSystemElement selectedResources
Create the import options specification widgets protected void create Options Group Composite parent options group Composite options Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 options Group set Layout layout options Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL overwrite checkbox overwrite Existing Resources Checkbox new Button options Group SWT CHECK overwrite Existing Resources Checkbox set Text Data Transfer Messages get String File Import overwrite Existing NON NLS 1 create containers checkbox create Container Structure Checkbox new Button options Group SWT CHECK create Container Structure Checkbox set Text Data Transfer Messages get String File Import create Complete NON NLS 1  createOptionsGroup optionsGroup GridLayout GridLayout marginHeight optionsGroup setLayout optionsGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL overwriteExistingResourcesCheckbox optionsGroup overwriteExistingResourcesCheckbox setText DataTransferMessages getString FileImport overwriteExisting createContainerStructureCheckbox optionsGroup createContainerStructureCheckbox setText DataTransferMessages getString FileImport createComplete
Create the import source specification widgets protected void create Source Group Composite parent Composite source Container Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 source Container Group set Layout layout source Container Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL new Label source Container Group SWT NONE set Text get Source Label source name entry field source Name Field new Combo source Container Group SWT BORDER source Name Field add Listener SWT Modify this source Name Field add Listener SWT Selection this Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH source Name Field set Layout Data data source browse button source Browse Button new Button source Container Group SWT PUSH source Browse Button set Text Data Transfer Messages get String Data Transfer browse NON NLS 1 source Browse Button add Listener SWT Selection this source Browse Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL source types group Composite source Types Group new Composite parent SWT NONE layout new Grid Layout layout num Columns 3 source Types Group set Layout layout source Types Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL all types radio import All Resources Radio new Button source Types Group SWT RADIO import All Resources Radio set Text Data Transfer Messages get String Data Transfer all Types NON NLS 1 import All Resources Radio add Listener SWT Selection this data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data horizontal Span 3 import All Resources Radio set Layout Data data import specific types radio import Typed Resources Radio new Button source Types Group SWT RADIO import Typed Resources Radio set Text Data Transfer Messages get String File Import filesof Type NON NLS 1 import Typed Resources Radio add Listener SWT Selection this types combo types To Import Field new Combo source Types Group SWT NONE data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH types To Import Field set Layout Data data types To Import Field add Listener SWT Modify this types edit button types To Import Edit Button new Button source Types Group SWT PUSH types To Import Edit Button set Text Data Transfer Messages get String File Import edit NON NLS 1 types To Import Edit Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN END types To Import Edit Button add Listener SWT Selection this details of files to import group Composite file Details Group new Composite parent SWT NONE layout new Grid Layout layout num Columns 2 file Details Group set Layout layout file Details Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL details button details Button new Button file Details Group SWT PUSH details Button set Text Data Transfer Messages get String Data Transfer details NON NLS 1 details Button add Listener SWT Selection this details label details Description Label new Label file Details Group SWT NONE data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL details Description Label set Layout Data data initial setup types To Import Field set Enabled false types To Import Edit Button set Enabled false import All Resources Radio set Selection true reset Selection source Name Field set Focus  createSourceGroup sourceContainerGroup GridLayout GridLayout numColumns sourceContainerGroup setLayout sourceContainerGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL sourceContainerGroup setText getSourceLabel sourceNameField sourceContainerGroup sourceNameField addListener sourceNameField addListener GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH sourceNameField setLayoutData sourceBrowseButton sourceContainerGroup sourceBrowseButton setText DataTransferMessages getString DataTransfer sourceBrowseButton addListener sourceBrowseButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL sourceTypesGroup GridLayout numColumns sourceTypesGroup setLayout sourceTypesGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL importAllResourcesRadio sourceTypesGroup importAllResourcesRadio setText DataTransferMessages getString DataTransfer allTypes importAllResourcesRadio addListener GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL horizontalSpan importAllResourcesRadio setLayoutData importTypedResourcesRadio sourceTypesGroup importTypedResourcesRadio setText DataTransferMessages getString FileImport filesofType importTypedResourcesRadio addListener typesToImportField sourceTypesGroup GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH typesToImportField setLayoutData typesToImportField addListener typesToImportEditButton sourceTypesGroup typesToImportEditButton setText DataTransferMessages getString FileImport typesToImportEditButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_END typesToImportEditButton addListener fileDetailsGroup GridLayout numColumns fileDetailsGroup setLayout fileDetailsGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL detailsButton fileDetailsGroup detailsButton setText DataTransferMessages getString DataTransfer detailsButton addListener detailsDescriptionLabel fileDetailsGroup GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL detailsDescriptionLabel setLayoutData typesToImportField setEnabled typesToImportEditButton setEnabled importAllResourcesRadio setSelection resetSelection sourceNameField setFocus
Display the appropriate string representing a selection of the passed size protected void display Selected Count int selected File Count if selected File Count 1 details Description Label set Text Data Transfer Messages get String Data Transfer one Selected NON NLS 1 else details Description Label set Text Data Transfer Messages format File Import files Selected new Object String value Of selected File Count NON NLS 1  displaySelectedCount selectedFileCount selectedFileCount detailsDescriptionLabel setText DataTransferMessages getString DataTransfer oneSelected detailsDescriptionLabel setText DataTransferMessages FileImport filesSelected valueOf selectedFileCount
Answer a boolean indicating whether the specified source currently exists and is valid protected boolean ensure Source Is Valid if new File get Source Directory Name is Directory return true display Error Dialog Data Transfer Messages get String File Import invalid Source NON NLS 1 source Name Field set Focus return false  ensureSourceIsValid getSourceDirectoryName isDirectory displayErrorDialog DataTransferMessages getString FileImport invalidSource sourceNameField setFocus
Execute the passed import operation Answer a boolean indicating success protected boolean execute Import Operation Import Operation op initialize Operation op try get Container run true true op catch Interrupted Exception e return false catch Invocation Target Exception e display Error Dialog e get Target Exception get Message return false I Status status op get Status if status isOK Error Dialog open Error get Container get Shell Data Transfer Messages get String File Import import Problems NON NLS 1 null no special message status return false return true  executeImportOperation ImportOperation initializeOperation getContainer InterruptedException InvocationTargetException displayErrorDialog getTargetException getMessage IStatus getStatus ErrorDialog openError getContainer getShell DataTransferMessages getString FileImport importProblems
The Finish button was pressed Try to do the required work now and answer a boolean indicating success If false is returned then the wizard will not close public boolean finish if ensure Source Is Valid return false if selected Resources null import All Resources Radio get Selection about to invoke the operation so save our state save Widget Values return import All Resources else ensure that files of appropriate extension will be marked as selected if selected Resources null if get File System Tree null return false about to invoke the operation so save our state save Widget Values if selected Resources size 0 List file System Objects new Array List selected Resources size Iterator resources Enum selected Resources iterator while resources Enum has Next file System Objects add File System Element resources Enum next get File System Object return import Resources file System Objects Message Dialog open Information get Container get Shell Data Transfer Messages get String Data Transfer information NON NLS 1 Data Transfer Messages get String File Import none Selected NON NLS 1 return false  ensureSourceIsValid selectedResources importAllResourcesRadio getSelection saveWidgetValues importAllResources selectedResources getFileSystemTree saveWidgetValues selectedResources fileSystemObjects ArrayList selectedResources resourcesEnum selectedResources resourcesEnum hasNext fileSystemObjects FileSystemElement resourcesEnum getFileSystemObject importResources fileSystemObjects MessageDialog openInformation getContainer getShell DataTransferMessages getString DataTransfer DataTransferMessages getString FileImport noneSelected
Answer the root File System Element that represents the contents of the currently specified source If this File System Element is not currently defined then create and return it protected File System Element get File System Tree if root null return root File source Directory get Source Directory if source Directory null return null return select Files source Directory File System Structure Provider INSTANCE  FileSystemElement FileSystemElement FileSystemElement getFileSystemTree sourceDirectory getSourceDirectory sourceDirectory selectFiles sourceDirectory FileSystemStructureProvider
Answer self s import source root element protected File System Element get Root return root  FileSystemElement getRoot
Answer self s current collection of selected resources protected List get Selected Resources return selected Resources  getSelectedResources selectedResources
Returns a File object representing the currently named source directory iff it exists as a valid directory or code null code otherwise protected File get Source Directory File source Directory new File get Source Directory Name if source Directory exists source Directory is Directory display Error Dialog Data Transfer Messages get String File Import invalid Source NON NLS 1 source Name Field set Focus return null return source Directory  getSourceDirectory sourceDirectory getSourceDirectoryName sourceDirectory sourceDirectory isDirectory displayErrorDialog DataTransferMessages getString FileImport invalidSource sourceNameField setFocus sourceDirectory
Answer the directory name specified as being the import source Note that if it ends with a separator then the separator is first removed so that java treats it as a proper directory private String get Source Directory Name I Path result new Path source Name Field get Text trim if result get Device null result segment Count 0 something like c result result add Trailing Separator else result result remove Trailing Separator return result toOS String  getSourceDirectoryName IPath sourceNameField getText getDevice segmentCount addTrailingSeparator removeTrailingSeparator toOSString
Answer the string to display as the label for the source specification field protected String get Source Label return Data Transfer Messages get String File Import source Title NON NLS 1  getSourceLabel DataTransferMessages getString FileImport sourceTitle
Returns a collection of the currently specified resource types or code null code to indicate that all types should be imported protected List get Types To Import if import All Resources Radio get Selection return null List result new Array List String Tokenizer tokenizer new String Tokenizer types To Import Field get Text TYPE DELIMITER while tokenizer has More Tokens String current Extension tokenizer next Token trim if current Extension equals NON NLS 1 result add current Extension return result  getTypesToImport importAllResourcesRadio getSelection ArrayList StringTokenizer StringTokenizer typesToImportField getText TYPE_DELIMITER hasMoreTokens currentExtension nextToken currentExtension currentExtension
Returns an array of the currently specified resource types or code null code to indicate that all types should be imported protected String get Types To Import Array List types To Import get Types To Import if types To Import null return null String result new String types To Import size types To Import to Array result return result  getTypesToImportArray typesToImport getTypesToImport typesToImport typesToImport typesToImport toArray
Open a selection dialog and note the selections protected void handle Details Button Pressed File System Element root Element get File System Tree if root Element null List new Selections query Resources To Import root Element if new Selections null selected Resources new Selections display Selected Count selected Resources size  handleDetailsButtonPressed FileSystemElement rootElement getFileSystemTree rootElement newSelections queryResourcesToImport rootElement newSelections selectedResources newSelections displaySelectedCount selectedResources
Handle all events and enablements for widgets in this dialog public void handle Event Event e Widget source e widget if source source Name Field reset Selection else if source source Browse Button handle Source Browse Button Pressed else if source import All Resources Radio reset Selection else if source import Typed Resources Radio reset Selection types To Import Field set Focus else if source details Button handle Details Button Pressed else if source types To Import Field reset Selection else if source types To Import Edit Button handle Types Edit Button Pressed super handle Event e  handleEvent sourceNameField resetSelection sourceBrowseButton handleSourceBrowseButtonPressed importAllResourcesRadio resetSelection importTypedResourcesRadio resetSelection typesToImportField setFocus detailsButton handleDetailsButtonPressed typesToImportField resetSelection typesToImportEditButton handleTypesEditButtonPressed handleEvent
Open an appropriate source browser so that the user can specify a source to import from protected void handle Source Browse Button Pressed Directory Dialog dialog new Directory Dialog source Name Field get Shell SWT SAVE dialog set Message Data Transfer Messages get String File Import select Source NON NLS 1 dialog set Filter Path get Source Directory Name String selected Directory dialog open if selected Directory null if selected Directory equals get Source Directory Name reset Selection source Name Field set Text selected Directory  handleSourceBrowseButtonPressed DirectoryDialog DirectoryDialog sourceNameField getShell setMessage DataTransferMessages getString FileImport selectSource setFilterPath getSourceDirectoryName selectedDirectory selectedDirectory selectedDirectory getSourceDirectoryName resetSelection sourceNameField setText selectedDirectory
Open a registered type selection dialog and note the selections in self s types to export field protected void handle Types Edit Button Pressed I File Editor Mapping editor Mappings PlatformUI get Workbench get Editor Registry get File Editor Mappings List selected Types get Types To Import List initial Selections new Array List for int i 0 i editor Mappings length i I File Editor Mapping mapping editor Mappings i if selected Types contains mapping get Extension initial Selections add mapping List Selection Dialog dialog new List Selection Dialog get Container get Shell editor Mappings File Editor Mapping Content Provider INSTANCE File Editor Mapping Label Provider INSTANCE Data Transfer Messages get String File Import select Types NON NLS 1 dialog set Initial Selections initial Selections to Array dialog set Title Data Transfer Messages get String File Import type Selection Title NON NLS 1 dialog open Object new Selected Types dialog get Result if new Selected Types null ie did not press Cancel List result new Array List new Selected Types length for int i 0 i new Selected Types length i result add I File Editor Mapping new Selected Types i get Extension set Types To Import result  handleTypesEditButtonPressed IFileEditorMapping editorMappings getWorkbench getEditorRegistry getFileEditorMappings selectedTypes getTypesToImport initialSelections ArrayList editorMappings IFileEditorMapping editorMappings selectedTypes getExtension initialSelections ListSelectionDialog ListSelectionDialog getContainer getShell editorMappings FileEditorMappingContentProvider FileEditorMappingLabelProvider DataTransferMessages getString FileImport selectTypes setInitialSelections initialSelections toArray setTitle DataTransferMessages getString FileImport typeSelectionTitle newSelectedTypes getResult newSelectedTypes ArrayList newSelectedTypes newSelectedTypes IFileEditorMapping newSelectedTypes getExtension setTypesToImport
Recursively import all resources starting at the user specified source location Answer a boolean indicating success protected boolean import All Resources return execute Import Operation new Import Operation get Container Full Path get Source Directory File System Structure Provider INSTANCE this  importAllResources executeImportOperation ImportOperation getContainerFullPath getSourceDirectory FileSystemStructureProvider
Import the resources with extensions as specified by the user protected boolean import Resources List file System Objects return execute Import Operation new Import Operation get Container Full Path get Source Directory File System Structure Provider INSTANCE this file System Objects  importResources fileSystemObjects executeImportOperation ImportOperation getContainerFullPath getSourceDirectory FileSystemStructureProvider fileSystemObjects
Initializes the specified operation appropriately protected void initialize Operation Import Operation op op set Create Container Structure create Container Structure Checkbox get Selection op set Overwrite Resources overwrite Existing Resources Checkbox get Selection  initializeOperation ImportOperation setCreateContainerStructure createContainerStructureCheckbox getSelection setOverwriteResources overwriteExistingResourcesCheckbox getSelection
Opens a resource selection dialog with the passed root as input and returns a collection with the resources that were subsequently specified for import by the user or code null code if the dialog was canceled protected List query Resources To Import File System Element root Element File Selection Dialog dialog new File Selection Dialog get Container get Shell root Element Data Transfer Messages get String File Import select Resources NON NLS 1 dialog set Initial Selections selected Resources to Array dialog set Expand All On Open true dialog open if dialog get Result null return null return Arrays as List dialog get Result  queryResourcesToImport FileSystemElement rootElement FileSelectionDialog FileSelectionDialog getContainer getShell rootElement DataTransferMessages getString FileImport selectResources setInitialSelections selectedResources toArray setExpandAllOnOpen getResult asList getResult
Reset the selected resources collection and update the ui appropriately protected void reset Selection details Description Label set Text Data Transfer Messages get String Data Transfer all Files NON NLS 1 selected Resources null root null  resetSelection detailsDescriptionLabel setText DataTransferMessages getString DataTransfer allFiles selectedResources
Use the dialog store to restore widget values to the values that they held last time this wizard was used to completion protected void restore Widget Values I Dialog Settings settings get Dialog Settings if settings null String source Names settings get Array STORE SOURCE NAMES ID if source Names null return ie no values stored so stop set all specific types radios and related enablements boolean import All settings get Boolean STORE IMPORT ALL RESOURCES ID import All Resources Radio set Selection import All import Typed Resources Radio set Selection import All set filenames history source Name Field set Text source Names 0 for int i 0 i source Names length i source Name Field add source Names i set selected types String selected Types settings get Array STORE SELECTED TYPES ID if selected Types length 0 types To Import Field set Text selected Types 0 for int i 0 i selected Types length i types To Import Field add selected Types i radio buttons and checkboxes overwrite Existing Resources Checkbox set Selection settings get Boolean STORE OVERWRITE EXISTING RESOURCES ID create Container Structure Checkbox set Selection settings get Boolean STORE CREATE CONTAINER STRUCTURE ID  restoreWidgetValues IDialogSettings getDialogSettings sourceNames getArray STORE_SOURCE_NAMES_ID sourceNames importAll getBoolean STORE_IMPORT_ALL_RESOURCES_ID importAllResourcesRadio setSelection importAll importTypedResourcesRadio setSelection importAll sourceNameField setText sourceNames sourceNames sourceNameField sourceNames selectedTypes getArray STORE_SELECTED_TYPES_ID selectedTypes typesToImportField setText selectedTypes selectedTypes typesToImportField selectedTypes overwriteExistingResourcesCheckbox setSelection getBoolean STORE_OVERWRITE_EXISTING_RESOURCES_ID createContainerStructureCheckbox setSelection getBoolean STORE_CREATE_CONTAINER_STRUCTURE_ID
Since Finish was pressed write widget values to the dialog store so that they will persist into the next invocation of this wizard page protected void save Widget Values I Dialog Settings settings get Dialog Settings if settings null update source names history String source Names settings get Array STORE SOURCE NAMES ID if source Names null source Names new String 0 source Names add To History source Names get Source Directory Name settings put STORE SOURCE NAMES ID source Names update specific types to import history String selected Types Names settings get Array STORE SELECTED TYPES ID if selected Types Names null selected Types Names new String 0 if import Typed Resources Radio get Selection selected Types Names add To History selected Types Names types To Import Field get Text settings put STORE SELECTED TYPES ID selected Types Names radio buttons and checkboxes settings put STORE IMPORT ALL RESOURCES ID import All Resources Radio get Selection settings put STORE OVERWRITE EXISTING RESOURCES ID overwrite Existing Resources Checkbox get Selection settings put STORE CREATE CONTAINER STRUCTURE ID create Container Structure Checkbox get Selection  saveWidgetValues IDialogSettings getDialogSettings sourceNames getArray STORE_SOURCE_NAMES_ID sourceNames sourceNames sourceNames addToHistory sourceNames getSourceDirectoryName STORE_SOURCE_NAMES_ID sourceNames selectedTypesNames getArray STORE_SELECTED_TYPES_ID selectedTypesNames selectedTypesNames importTypedResourcesRadio getSelection selectedTypesNames addToHistory selectedTypesNames typesToImportField getText STORE_SELECTED_TYPES_ID selectedTypesNames STORE_IMPORT_ALL_RESOURCES_ID importAllResourcesRadio getSelection STORE_OVERWRITE_EXISTING_RESOURCES_ID overwriteExistingResourcesCheckbox getSelection STORE_CREATE_CONTAINER_STRUCTURE_ID createContainerStructureCheckbox getSelection
Invokes a file selection operation using the specified file system and structure provider If the user specifies files to be imported then this selection is cached for later retrieval and is returned protected File System Element select Files Object root File System Object I Import Structure Provider structure Provider try Select Files Operation op new Select Files Operation root File System Object structure Provider op set Desired Extensions get Types To Import Array get Container run true true op root op get Result set Selected Resources new Array List add To Selected Resources root catch Interrupted Exception e return null catch Invocation Target Exception e display Error Dialog e get Target Exception get Message return null return root  FileSystemElement selectFiles rootFileSystemObject IImportStructureProvider structureProvider SelectFilesOperation SelectFilesOperation rootFileSystemObject structureProvider setDesiredExtensions getTypesToImportArray getContainer getResult setSelectedResources ArrayList addToSelectedResources InterruptedException InvocationTargetException displayErrorDialog getTargetException getMessage
Respond to the user selecting deselecting items in the extensions list public void selection Changed Selection Changed Event event if import Typed Resources Radio get Selection reset Selection  selectionChanged SelectionChangedEvent importTypedResourcesRadio getSelection resetSelection
Set self s import source root element protected void set Root File System Element value root value  setRoot FileSystemElement
Set self s current collection of selected resources protected void set Selected Resources List value selected Resources value  setSelectedResources selectedResources
Populate self s import types field based upon the passed types collection protected void set Types To Import List types String Buffer result new String Buffer for int i 0 i types size i if i 0 result append TYPE DELIMITER result append NON NLS 1 result append types get i types To Import Field set Text result to String  setTypesToImport StringBuffer StringBuffer TYPE_DELIMITER typesToImportField setText toString
Set the enablements of self s widgets protected void update Widget Enablements types To Import Field set Enabled import Typed Resources Radio get Selection types To Import Edit Button set Enabled import Typed Resources Radio get Selection  updateWidgetEnablements typesToImportField setEnabled importTypedResourcesRadio getSelection typesToImportEditButton setEnabled importTypedResourcesRadio getSelection
Answer a boolean indicating whether self s source specification widgets currently all contain valid values protected boolean validate Source Group return get Source Directory Name equals NON NLS 1  validateSourceGroup getSourceDirectoryName

private static final String SELECT DESTINATION TITLE Data Transfer Messages get String File Export select Destination Title NON NLS 1 Create an instance of this class protected Wizard File System Resource Export Page1 String name I Structured Selection selection super name selection  SELECT_DESTINATION_TITLE DataTransferMessages getString FileExport selectDestinationTitle WizardFileSystemResourceExportPage1 IStructuredSelection
Create an instance of this class public Wizard File System Resource Export Page1 I Structured Selection selection this file System Export Page1 selection NON NLS 1 set Title Data Transfer Messages get String Data Transfer file System Title NON NLS 1 set Description Data Transfer Messages get String File Export export Local File System NON NLS 1  WizardFileSystemResourceExportPage1 IStructuredSelection fileSystemExportPage1 setTitle DataTransferMessages getString DataTransfer fileSystemTitle setDescription DataTransferMessages getString FileExport exportLocalFileSystem
Add the passed value to self s destination widget s history param value java lang String protected void add Destination Item String value destination Name Field add value  addDestinationItem destinationNameField
non Javadoc Method declared on I Dialog Page public void create Control Composite parent super create Control parent give Focus To Destination Workbench Help set Help get Control I Data Transfer Help Context Ids FILE SYSTEM EXPORT WIZARD PAGE  IDialogPage createControl createControl giveFocusToDestination WorkbenchHelp setHelp getControl IDataTransferHelpContextIds FILE_SYSTEM_EXPORT_WIZARD_PAGE
Create the export destination specification widgets param parent org eclipse swt widgets Composite protected void create Destination Group Composite parent Font font parent get Font destination specification group Composite destination Selection Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 destination Selection Group set Layout layout destination Selection Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN FILL destination Selection Group set Font font Label destination Label new Label destination Selection Group SWT NONE destination Label set Text get Destination Label destination Label set Font font destination name entry field destination Name Field new Combo destination Selection Group SWT SINGLE SWT BORDER destination Name Field add Listener SWT Modify this destination Name Field add Listener SWT Selection this Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH destination Name Field set Layout Data data destination Name Field set Font font destination browse button destination Browse Button new Button destination Selection Group SWT PUSH destination Browse Button set Text Data Transfer Messages get String Data Transfer browse NON NLS 1 destination Browse Button add Listener SWT Selection this destination Browse Button set Font font set Button Layout Data destination Browse Button new Label parent SWT NONE vertical spacer  createDestinationGroup getFont destinationSelectionGroup GridLayout GridLayout numColumns destinationSelectionGroup setLayout destinationSelectionGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_FILL destinationSelectionGroup setFont destinationLabel destinationSelectionGroup destinationLabel setText getDestinationLabel destinationLabel setFont destinationNameField destinationSelectionGroup destinationNameField addListener destinationNameField addListener GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH destinationNameField setLayoutData destinationNameField setFont destinationBrowseButton destinationSelectionGroup destinationBrowseButton setText DataTransferMessages getString DataTransfer destinationBrowseButton addListener destinationBrowseButton setFont setButtonLayoutData destinationBrowseButton
Create the buttons in the options group protected void create Options Group Buttons Group options Group Font font options Group get Font create Overwrite Existing options Group font create Directory Structure Options options Group font  createOptionsGroupButtons optionsGroup optionsGroup getFont createOverwriteExisting optionsGroup createDirectoryStructureOptions optionsGroup
Create the buttons for the group that determine if the entire or selected directory structure should be created param options Group param font protected void create Directory Structure Options Group options Group Font font create directory structure radios create Directory Structure Button new Button options Group SWT RADIO SWT LEFT create Directory Structure Button set Text Data Transfer Messages get String File Export create Directory Structure NON NLS 1 create Directory Structure Button set Selection false create Directory Structure Button set Font font create directory structure radios create Selection Only Button new Button options Group SWT RADIO SWT LEFT create Selection Only Button set Text Data Transfer Messages get String File Export create Selected Directories NON NLS 1 create Selection Only Button set Selection true create Selection Only Button set Font font  optionsGroup createDirectoryStructureOptions optionsGroup createDirectoryStructureButton optionsGroup createDirectoryStructureButton setText DataTransferMessages getString FileExport createDirectoryStructure createDirectoryStructureButton setSelection createDirectoryStructureButton setFont createSelectionOnlyButton optionsGroup createSelectionOnlyButton setText DataTransferMessages getString FileExport createSelectedDirectories createSelectionOnlyButton setSelection createSelectionOnlyButton setFont
Create the button for checking if we should ask if we are going to overwrite existing files param options Group param font protected void create Overwrite Existing Group options Group Font font overwrite checkbox overwrite Existing Files Checkbox new Button options Group SWT CHECK SWT LEFT overwrite Existing Files Checkbox set Text Data Transfer Messages get String Export File overwrite Existing NON NLS 1 overwrite Existing Files Checkbox set Font font  optionsGroup createOverwriteExisting optionsGroup overwriteExistingFilesCheckbox optionsGroup overwriteExistingFilesCheckbox setText DataTransferMessages getString ExportFile overwriteExisting overwriteExistingFilesCheckbox setFont
Attempts to ensure that the specified directory exists on the local file system Answers a boolean indicating success return boolean param directory java io File protected boolean ensure Directory Exists File directory if directory exists if query Yes No Question Data Transfer Messages get String Data Transfer create Target Directory NON NLS 1 return false if directory mkdirs display Error Dialog Data Transfer Messages get String Data Transfer directory Creation Error NON NLS 1 give Focus To Destination return false return true  ensureDirectoryExists queryYesNoQuestion DataTransferMessages getString DataTransfer createTargetDirectory displayErrorDialog DataTransferMessages getString DataTransfer directoryCreationError giveFocusToDestination
If the target for export does not exist then attempt to create it Answer a boolean indicating whether the target exists ie if it either pre existed or this method was able to create it return boolean protected boolean ensure Target Is Valid File target Directory if target Directory exists target Directory is Directory display Error Dialog Data Transfer Messages get String File Export directory Exists NON NLS 1 give Focus To Destination return false return ensure Directory Exists target Directory  ensureTargetIsValid targetDirectory targetDirectory targetDirectory isDirectory displayErrorDialog DataTransferMessages getString FileExport directoryExists giveFocusToDestination ensureDirectoryExists targetDirectory
Set up and execute the passed Operation Answer a boolean indicating success return boolean protected boolean execute Export Operation File System Export Operation op op set Create Leadup Structure create Directory Structure Button get Selection op set Overwrite Files overwrite Existing Files Checkbox get Selection try get Container run true true op catch Interrupted Exception e return false catch Invocation Target Exception e display Error Dialog e get Target Exception return false I Status status op get Status if status isOK Error Dialog open Error get Container get Shell Data Transfer Messages get String Data Transfer export Problems NON NLS 1 null no special message status return false return true  executeExportOperation FileSystemExportOperation setCreateLeadupStructure createDirectoryStructureButton getSelection setOverwriteFiles overwriteExistingFilesCheckbox getSelection getContainer InterruptedException InvocationTargetException displayErrorDialog getTargetException IStatus getStatus ErrorDialog openError getContainer getShell DataTransferMessages getString DataTransfer exportProblems
The Finish button was pressed Try to do the required work now and answer a boolean indicating success If false is returned then the wizard will not close return boolean public boolean finish if ensure Target Is Valid new File get Destination Value return false List resources To Export get White Checked Resources Save dirty editors if possible but do not stop if not all are saved save Dirty Editors about to invoke the operation so save our state save Widget Values if resources To Export size 0 return execute Export Operation new File System Export Operation null resources To Export get Destination Value this Message Dialog open Information get Container get Shell Data Transfer Messages get String Data Transfer information NON NLS 1 Data Transfer Messages get String File Export none Selected NON NLS 1 return false  ensureTargetIsValid getDestinationValue resourcesToExport getWhiteCheckedResources saveDirtyEditors saveWidgetValues resourcesToExport executeExportOperation FileSystemExportOperation resourcesToExport getDestinationValue MessageDialog openInformation getContainer getShell DataTransferMessages getString DataTransfer DataTransferMessages getString FileExport noneSelected
Answer the string to display in self as the destination type return java lang String protected String get Destination Label return Data Transfer Messages get String File Export to Directory NON NLS 1  getDestinationLabel DataTransferMessages getString FileExport toDirectory
Answer the contents of self s destination specification widget return java lang String protected String get Destination Value return destination Name Field get Text trim  getDestinationValue destinationNameField getText
Set the current input focus to self s destination entry field protected void give Focus To Destination destination Name Field set Focus  giveFocusToDestination destinationNameField setFocus
Open an appropriate destination browser so that the user can specify a source to import from protected void handle Destination Browse Button Pressed Directory Dialog dialog new Directory Dialog get Container get Shell SWT SAVE dialog set Message SELECT DESTINATION MESSAGE dialog set Text SELECT DESTINATION TITLE dialog set Filter Path get Destination Value String selected Directory Name dialog open if selected Directory Name null set Error Message null set Destination Value selected Directory Name  handleDestinationBrowseButtonPressed DirectoryDialog DirectoryDialog getContainer getShell setMessage SELECT_DESTINATION_MESSAGE setText SELECT_DESTINATION_TITLE setFilterPath getDestinationValue selectedDirectoryName selectedDirectoryName setErrorMessage setDestinationValue selectedDirectoryName
Handle all events and enablements for widgets in this page param e Event public void handle Event Event e Widget source e widget if source destination Browse Button handle Destination Browse Button Pressed update Page Completion  handleEvent destinationBrowseButton handleDestinationBrowseButtonPressed updatePageCompletion
Hook method for saving widget values for restoration by the next instance of this class protected void internal Save Widget Values update directory names history I Dialog Settings settings get Dialog Settings if settings null String directory Names settings get Array STORE DESTINATION NAMES ID if directory Names null directory Names new String 0 directory Names add To History directory Names get Destination Value settings put STORE DESTINATION NAMES ID directory Names options settings put STORE OVERWRITE EXISTING FILES ID overwrite Existing Files Checkbox get Selection settings put STORE CREATE STRUCTURE ID create Directory Structure Button get Selection  internalSaveWidgetValues IDialogSettings getDialogSettings directoryNames getArray STORE_DESTINATION_NAMES_ID directoryNames directoryNames directoryNames addToHistory directoryNames getDestinationValue STORE_DESTINATION_NAMES_ID directoryNames STORE_OVERWRITE_EXISTING_FILES_ID overwriteExistingFilesCheckbox getSelection STORE_CREATE_STRUCTURE_ID createDirectoryStructureButton getSelection
Hook method for restoring widget values to the values that they held last time this wizard was used to completion protected void restore Widget Values I Dialog Settings settings get Dialog Settings if settings null String directory Names settings get Array STORE DESTINATION NAMES ID if directory Names null return ie no settings stored destination set Destination Value directory Names 0 for int i 0 i directory Names length i add Destination Item directory Names i options overwrite Existing Files Checkbox set Selection settings get Boolean STORE OVERWRITE EXISTING FILES ID boolean create Directories settings get Boolean STORE CREATE STRUCTURE ID create Directory Structure Button set Selection create Directories create Selection Only Button set Selection create Directories  restoreWidgetValues IDialogSettings getDialogSettings directoryNames getArray STORE_DESTINATION_NAMES_ID directoryNames setDestinationValue directoryNames directoryNames addDestinationItem directoryNames overwriteExistingFilesCheckbox setSelection getBoolean STORE_OVERWRITE_EXISTING_FILES_ID createDirectories getBoolean STORE_CREATE_STRUCTURE_ID createDirectoryStructureButton setSelection createDirectories createSelectionOnlyButton setSelection createDirectories
Set the contents of the receivers destination specification widget to the passed value protected void set Destination Value String value destination Name Field set Text value  setDestinationValue destinationNameField setText
Answer a boolean indicating whether the receivers destination specification widgets currently all contain valid values protected boolean validate Destination Group String destination Value get Destination Value if destination Value length 0 set Message destination Empty Message return false String conflicting Container get Conflicting Container Name For destination Value if conflicting Container null set Error Message null else set Error Message Data Transfer Messages format File Export conflicting Container NON NLS 1 new Object conflicting Container give Focus To Destination return false return true  validateDestinationGroup destinationValue getDestinationValue destinationValue setMessage destinationEmptyMessage conflictingContainer getConflictingContainerNameFor destinationValue conflictingContainer setErrorMessage setErrorMessage DataTransferMessages FileExport conflictingContainer conflictingContainer giveFocusToDestination
Get the message used to denote an empty destination protected String destination Empty Message return Data Transfer Messages get String File Export destination Empty NON NLS 1  destinationEmptyMessage DataTransferMessages getString FileExport destinationEmpty
Returns the name of a container with a location that encompasses target Directory Returns null if there is no conflict param target Directory the path of the directory to check return the conflicting container name or code null code protected String get Conflicting Container Name For String target Directory I Workspace Root root Resources Plugin get Workspace get Root I Path test Path new Path target Directory if root get Location is Prefix Of test Path return Data Transfer Messages get String File Export root Name NON NLS 1 I Project projects root get Projects for int i 0 i projects length i if projects i get Location is Prefix Of test Path return projects i get Name return null  targetDirectory targetDirectory getConflictingContainerNameFor targetDirectory IWorkspaceRoot ResourcesPlugin getWorkspace getRoot IPath testPath targetDirectory getLocation isPrefixOf testPath DataTransferMessages getString FileExport rootName IProject getProjects getLocation isPrefixOf testPath getName

protected static final String SOURCE EMPTY MESSAGE Data Transfer Messages get String File Import source Empty NON NLS 1 Creates an instance of this class protected Wizard File System Resource Import Page1 String name I Workbench a Workbench I Structured Selection selection super name selection  SOURCE_EMPTY_MESSAGE DataTransferMessages getString FileImport sourceEmpty WizardFileSystemResourceImportPage1 IWorkbench aWorkbench IStructuredSelection
Creates an instance of this class param a Workbench I Workbench param selection I Structured Selection public Wizard File System Resource Import Page1 I Workbench a Workbench I Structured Selection selection this file System Import Page1 a Workbench selection NON NLS 1 set Title Data Transfer Messages get String Data Transfer file System Title NON NLS 1 set Description Data Transfer Messages get String File Import import File System NON NLS 1  aWorkbench IWorkbench IStructuredSelection WizardFileSystemResourceImportPage1 IWorkbench aWorkbench IStructuredSelection fileSystemImportPage1 aWorkbench setTitle DataTransferMessages getString DataTransfer fileSystemTitle setDescription DataTransferMessages getString FileImport importFileSystem
Creates a new button with the given id p The code Dialog code implementation of this framework method creates a standard push button registers for selection events including button presses and registers default buttons with its shell The button id is stored as the buttons client data Note that the parent s layout is assumed to be a Grid Layout and the number of columns in this layout is incremented Subclasses may override p param parent the parent composite param id the id of the button see code I Dialog Constants  ID code constants for standard dialog button ids param label the label from the button param default Button code true code if the button is to be the default button and code false code otherwise protected Button create Button Composite parent int id String label boolean default Button increment the number of columns in the button bar Grid Layout parent get Layout num Columns Button button new Button parent SWT PUSH button set Font parent get Font Grid Data button Data new Grid Data Grid Data FILL HORIZONTAL button set Layout Data button Data button set Data new Integer id button set Text label if default Button Shell shell parent get Shell if shell null shell set Default Button button button set Focus return button  GridLayout IDialogConstants _ID defaultButton createButton defaultButton GridLayout getLayout numColumns setFont getFont GridData buttonData GridData GridData FILL_HORIZONTAL setLayoutData buttonData setData setText defaultButton getShell setDefaultButton setFocus
Creates the buttons for selecting specific types or selecting all or none of the elements param parent the parent control protected final void create Buttons Group Composite parent top level group Composite button Composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 layout make Columns Equal Width true button Composite set Layout layout button Composite set Font parent get Font Grid Data button Data new Grid Data Grid Data VERTICAL ALIGN FILL Grid Data HORIZONTAL ALIGN FILL button Data horizontal Span 2 button Composite set Layout Data button Data types edit button select Types Button create Button button Composite I Dialog Constants SELECT TYPES ID SELECT TYPES TITLE false Selection Listener listener new Selection Adapter public void widget Selected Selection Event e handle Types Edit Button Pressed select Types Button add Selection Listener listener set Button Layout Data select Types Button select All Button create Button button Composite I Dialog Constants SELECT ALL ID SELECT ALL TITLE false listener new Selection Adapter public void widget Selected Selection Event e set All Selections true select All Button add Selection Listener listener set Button Layout Data select All Button deselect All Button create Button button Composite I Dialog Constants DESELECT ALL ID DESELECT ALL TITLE false listener new Selection Adapter public void widget Selected Selection Event e set All Selections false deselect All Button add Selection Listener listener set Button Layout Data deselect All Button  createButtonsGroup buttonComposite GridLayout GridLayout numColumns makeColumnsEqualWidth buttonComposite setLayout buttonComposite setFont getFont GridData buttonData GridData GridData VERTICAL_ALIGN_FILL GridData HORIZONTAL_ALIGN_FILL buttonData horizontalSpan buttonComposite setLayoutData buttonData selectTypesButton createButton buttonComposite IDialogConstants SELECT_TYPES_ID SELECT_TYPES_TITLE SelectionListener SelectionAdapter widgetSelected SelectionEvent handleTypesEditButtonPressed selectTypesButton addSelectionListener setButtonLayoutData selectTypesButton selectAllButton createButton buttonComposite IDialogConstants SELECT_ALL_ID SELECT_ALL_TITLE SelectionAdapter widgetSelected SelectionEvent setAllSelections selectAllButton addSelectionListener setButtonLayoutData selectAllButton deselectAllButton createButton buttonComposite IDialogConstants DESELECT_ALL_ID DESELECT_ALL_TITLE SelectionAdapter widgetSelected SelectionEvent setAllSelections deselectAllButton addSelectionListener setButtonLayoutData deselectAllButton
non Javadoc Method declared on I Dialog Page public void create Control Composite parent super create Control parent validate Source Group Workbench Help set Help get Control I Data Transfer Help Context Ids FILE SYSTEM IMPORT WIZARD PAGE  IDialogPage createControl createControl validateSourceGroup WorkbenchHelp setHelp getControl IDataTransferHelpContextIds FILE_SYSTEM_IMPORT_WIZARD_PAGE
Create the import options specification widgets protected void create Options Group Buttons Group options Group overwrite checkbox overwrite Existing Resources Checkbox new Button options Group SWT CHECK overwrite Existing Resources Checkbox set Font options Group get Font overwrite Existing Resources Checkbox set Text Data Transfer Messages get String File Import overwrite Existing NON NLS 1 create containers radio create Container Structure Button new Button options Group SWT RADIO create Container Structure Button set Font options Group get Font create Container Structure Button set Text Data Transfer Messages get String File Import create Complete NON NLS 1 create Container Structure Button set Selection false create selection only radio create Only Selected Button new Button options Group SWT RADIO create Only Selected Button set Font options Group get Font create Only Selected Button set Text Data Transfer Messages get String File Import create Selected Folders NON NLS 1 create Only Selected Button set Selection true  createOptionsGroupButtons optionsGroup overwriteExistingResourcesCheckbox optionsGroup overwriteExistingResourcesCheckbox setFont optionsGroup getFont overwriteExistingResourcesCheckbox setText DataTransferMessages getString FileImport overwriteExisting createContainerStructureButton optionsGroup createContainerStructureButton setFont optionsGroup getFont createContainerStructureButton setText DataTransferMessages getString FileImport createComplete createContainerStructureButton setSelection createOnlySelectedButton optionsGroup createOnlySelectedButton setFont optionsGroup getFont createOnlySelectedButton setText DataTransferMessages getString FileImport createSelectedFolders createOnlySelectedButton setSelection
Create the group for creating the root directory protected void create Root Directory Group Composite parent Composite source Container Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 source Container Group set Layout layout source Container Group set Font parent get Font source Container Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL Label group Label new Label source Container Group SWT NONE group Label set Text get Source Label group Label set Font parent get Font source name entry field source Name Field new Combo source Container Group SWT BORDER Grid Data data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL data width Hint SIZING TEXT FIELD WIDTH source Name Field set Layout Data data source Name Field set Font parent get Font source Name Field add Selection Listener new Selection Adapter public void widget Selected Selection Event e update From Source Field source Name Field add Key Listener new Key Listener see Key Listener key Pressed public void key Pressed Key Event e If there has been a key pressed then mark as dirty entry Changed true see Key Listener key Released public void key Released Key Event e source Name Field add Focus Listener new Focus Listener see Focus Listener focus Gained Focus Event public void focus Gained Focus Event e Do nothing when getting focus see Focus Listener focus Lost Focus Event public void focus Lost Focus Event e Clear the flag to prevent constant update if entry Changed entry Changed false update From Source Field source browse button source Browse Button new Button source Container Group SWT PUSH source Browse Button set Text Data Transfer Messages get String Data Transfer browse NON NLS 1 source Browse Button add Listener SWT Selection this source Browse Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL source Browse Button set Font parent get Font set Button Layout Data source Browse Button  createRootDirectoryGroup sourceContainerGroup GridLayout GridLayout numColumns sourceContainerGroup setLayout sourceContainerGroup setFont getFont sourceContainerGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL groupLabel sourceContainerGroup groupLabel setText getSourceLabel groupLabel setFont getFont sourceNameField sourceContainerGroup GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL widthHint SIZING_TEXT_FIELD_WIDTH sourceNameField setLayoutData sourceNameField setFont getFont sourceNameField addSelectionListener SelectionAdapter widgetSelected SelectionEvent updateFromSourceField sourceNameField addKeyListener KeyListener KeyListener keyPressed keyPressed KeyEvent entryChanged KeyListener keyReleased keyReleased KeyEvent sourceNameField addFocusListener FocusListener FocusListener focusGained FocusEvent focusGained FocusEvent FocusListener focusLost FocusEvent focusLost FocusEvent entryChanged entryChanged updateFromSourceField sourceBrowseButton sourceContainerGroup sourceBrowseButton setText DataTransferMessages getString DataTransfer sourceBrowseButton addListener sourceBrowseButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL sourceBrowseButton setFont getFont setButtonLayoutData sourceBrowseButton
Update the receiver from the source name field private void update From Source Field set Source Name source Name Field get Text Update enablements when this is selected update Widget Enablements  updateFromSourceField setSourceName sourceNameField getText updateWidgetEnablements
Creates and returns a code File System Element code if the specified file system object merits one The criteria for this are Also create the children protected Minimized File System Element create Root Element Object file System Object I Import Structure Provider provider boolean is Container provider is Folder file System Object String element Label provider get Label file System Object Use an empty label so that display of the element s full name doesn t include a confusing label Minimized File System Element dummy Parent new Minimized File System Element null true NON NLS 1 dummy Parent set Populated Minimized File System Element result new Minimized File System Element element Label dummy Parent is Container result set File System Object file System Object Get the files for the element so as to build the first level result get Files provider return dummy Parent  FileSystemElement MinimizedFileSystemElement createRootElement fileSystemObject IImportStructureProvider isContainer isFolder fileSystemObject elementLabel getLabel fileSystemObject MinimizedFileSystemElement dummyParent MinimizedFileSystemElement dummyParent setPopulated MinimizedFileSystemElement MinimizedFileSystemElement elementLabel dummyParent isContainer setFileSystemObject fileSystemObject getFiles dummyParent
Create the import source specification widgets protected void create Source Group Composite parent create Root Directory Group parent create File Selection Group parent create Buttons Group parent  createSourceGroup createRootDirectoryGroup createFileSelectionGroup createButtonsGroup
Enable or disable the button group protected void enable Button Group boolean enable select Types Button set Enabled enable select All Button set Enabled enable deselect All Button set Enabled enable  enableButtonGroup selectTypesButton setEnabled selectAllButton setEnabled deselectAllButton setEnabled
Answer a boolean indicating whether the specified source currently exists and is valid protected boolean ensure Source Is Valid if new File get Source Directory Name is Directory return true display Error Dialog Data Transfer Messages get String File Import invalid Source NON NLS 1 source Name Field set Focus return false  ensureSourceIsValid getSourceDirectoryName isDirectory displayErrorDialog DataTransferMessages getString FileImport invalidSource sourceNameField setFocus
Execute the passed import operation Answer a boolean indicating success protected boolean execute Import Operation Import Operation op initialize Operation op try get Container run true true op catch Interrupted Exception e return false catch Invocation Target Exception e display Error Dialog e get Target Exception return false I Status status op get Status if status isOK Error Dialog open Error get Container get Shell Data Transfer Messages get String File Import import Problems NON NLS 1 null no special message status return false return true  executeImportOperation ImportOperation initializeOperation getContainer InterruptedException InvocationTargetException displayErrorDialog getTargetException IStatus getStatus ErrorDialog openError getContainer getShell DataTransferMessages getString FileImport importProblems
The Finish button was pressed Try to do the required work now and answer a boolean indicating success If false is returned then the wizard will not close return boolean public boolean finish if ensure Source Is Valid return false save Widget Values Iterator resources Enum get Selected Resources iterator List file System Objects new Array List while resources Enum has Next file System Objects add File System Element resources Enum next get File System Object if file System Objects size 0 return import Resources file System Objects Message Dialog open Information get Container get Shell Data Transfer Messages get String Data Transfer information NON NLS 1 Data Transfer Messages get String File Import none Selected NON NLS 1 return false  ensureSourceIsValid saveWidgetValues resourcesEnum getSelectedResources fileSystemObjects ArrayList resourcesEnum hasNext fileSystemObjects FileSystemElement resourcesEnum getFileSystemObject fileSystemObjects importResources fileSystemObjects MessageDialog openInformation getContainer getShell DataTransferMessages getString DataTransfer DataTransferMessages getString FileImport noneSelected
return new Workbench Content Provider public Object get Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o return element get Files File System Structure Provider INSTANCE get Children element return new Object 0  WorkbenchContentProvider getChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement getFiles FileSystemStructureProvider getChildren
Returns a content provider for code File System Element code s that returns only files as children protected I Tree Content Provider get File Provider return new Workbench Content Provider public Object get Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o return element get Files File System Structure Provider INSTANCE get Children element return new Object 0  FileSystemElement ITreeContentProvider getFileProvider WorkbenchContentProvider getChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement getFiles FileSystemStructureProvider getChildren
Answer the root File System Element that represents the contents of the currently specified source If this File System Element is not currently defined then create and return it protected Minimized File System Element get File System Tree File source Directory get Source Directory if source Directory null return null return select Files source Directory File System Structure Provider INSTANCE  FileSystemElement FileSystemElement MinimizedFileSystemElement getFileSystemTree sourceDirectory getSourceDirectory sourceDirectory selectFiles sourceDirectory FileSystemStructureProvider
return new Workbench Content Provider public Object get Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o return element get Folders File System Structure Provider INSTANCE get Children element return new Object 0  WorkbenchContentProvider getChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement getFolders FileSystemStructureProvider getChildren
public boolean has Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o if element is Populated return get Children element length 0 else If we have not populated then wait until asked return true return false  hasChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement isPopulated getChildren
Returns a content provider for code File System Element code s that returns only folders as children protected I Tree Content Provider get Folder Provider return new Workbench Content Provider public Object get Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o return element get Folders File System Structure Provider INSTANCE get Children element return new Object 0 public boolean has Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o if element is Populated return get Children element length 0 else If we have not populated then wait until asked return true return false  FileSystemElement ITreeContentProvider getFolderProvider WorkbenchContentProvider getChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement getFolders FileSystemStructureProvider getChildren hasChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement isPopulated getChildren
Returns a File object representing the currently named source directory iff it exists as a valid directory or code null code otherwise protected File get Source Directory return get Source Directory this source Name Field get Text  getSourceDirectory getSourceDirectory sourceNameField getText
Returns a File object representing the currently named source directory iff it exists as a valid directory or code null code otherwise param path a String not yet formatted for java io File compatability private File get Source Directory String path File source Directory new File get Source Directory Name path if source Directory exists source Directory is Directory return null return source Directory  getSourceDirectory sourceDirectory getSourceDirectoryName sourceDirectory sourceDirectory isDirectory sourceDirectory
Answer the directory name specified as being the import source Note that if it ends with a separator then the separator is first removed so that java treats it as a proper directory private String get Source Directory Name return get Source Directory Name this source Name Field get Text  getSourceDirectoryName getSourceDirectoryName sourceNameField getText
Answer the directory name specified as being the import source Note that if it ends with a separator then the separator is first removed so that java treats it as a proper directory private String get Source Directory Name String source Name I Path result new Path source Name trim if result get Device null result segment Count 0 something like c result result add Trailing Separator else result result remove Trailing Separator return result toOS String  getSourceDirectoryName sourceName IPath sourceName getDevice segmentCount addTrailingSeparator removeTrailingSeparator toOSString
Answer the string to display as the label for the source specification field protected String get Source Label return Data Transfer Messages get String File Import from Directory NON NLS 1  getSourceLabel DataTransferMessages getString FileImport fromDirectory
Handle all events and enablements for widgets in this dialog param event Event public void handle Event Event event if event widget source Browse Button handle Source Browse Button Pressed super handle Event event  handleEvent sourceBrowseButton handleSourceBrowseButtonPressed handleEvent
Open an appropriate source browser so that the user can specify a source to import from protected void handle Source Browse Button Pressed String current Source this source Name Field get Text Directory Dialog dialog new Directory Dialog source Name Field get Shell SWT SAVE dialog set Text SELECT SOURCE TITLE dialog set Message SELECT SOURCE MESSAGE dialog set Filter Path get Source Directory Name current Source String selected Directory dialog open if selected Directory null Just quit if the directory is not valid if get Source Directory selected Directory null selected Directory equals current Source return else If it is valid then proceed to populate set Error Message null set Source Name selected Directory selection Group set Focus  handleSourceBrowseButtonPressed currentSource sourceNameField getText DirectoryDialog DirectoryDialog sourceNameField getShell setText SELECT_SOURCE_TITLE setMessage SELECT_SOURCE_MESSAGE setFilterPath getSourceDirectoryName currentSource selectedDirectory selectedDirectory getSourceDirectory selectedDirectory selectedDirectory currentSource setErrorMessage setSourceName selectedDirectory selectionGroup setFocus
Open a registered type selection dialog and note the selections in the receivers types to export field Added here so that inner classes can have access protected void handle Types Edit Button Pressed super handle Types Edit Button Pressed  handleTypesEditButtonPressed handleTypesEditButtonPressed
Import the resources with extensions as specified by the user protected boolean import Resources List file System Objects Import Operation operation new Import Operation get Container Full Path get Source Directory File System Structure Provider INSTANCE this file System Objects operation set Context get Shell return execute Import Operation operation  importResources fileSystemObjects ImportOperation ImportOperation getContainerFullPath getSourceDirectory FileSystemStructureProvider fileSystemObjects setContext getShell executeImportOperation
Initializes the specified operation appropriately protected void initialize Operation Import Operation op op set Create Container Structure create Container Structure Button get Selection op set Overwrite Resources overwrite Existing Resources Checkbox get Selection  initializeOperation ImportOperation setCreateContainerStructure createContainerStructureButton getSelection setOverwriteResources overwriteExistingResourcesCheckbox getSelection
Returns whether the extension provided is an extension that has been specified for export by the user param extension the resource name return code true code if the resource name is suitable for export based upon its extension protected boolean is Exportable Extension String extension if selected Types null ie all extensions are acceptable return true Iterator enum selected Types iterator while enum has Next if extension equals Ignore Case String enum next return true return false  isExportableExtension selectedTypes selectedTypes hasNext equalsIgnoreCase
Repopulate the view based on the currently entered directory protected void reset Selection Minimized File System Element current Root get File System Tree this selection Group set Root current Root  resetSelection MinimizedFileSystemElement currentRoot getFileSystemTree selectionGroup setRoot currentRoot
Use the dialog store to restore widget values to the values that they held last time this wizard was used to completion protected void restore Widget Values I Dialog Settings settings get Dialog Settings if settings null String source Names settings get Array STORE SOURCE NAMES ID if source Names null return ie no values stored so stop set filenames history for int i 0 i source Names length i source Name Field add source Names i radio buttons and checkboxes overwrite Existing Resources Checkbox set Selection settings get Boolean STORE OVERWRITE EXISTING RESOURCES ID boolean create Structure settings get Boolean STORE CREATE CONTAINER STRUCTURE ID create Container Structure Button set Selection create Structure create Only Selected Button set Selection create Structure  restoreWidgetValues IDialogSettings getDialogSettings sourceNames getArray STORE_SOURCE_NAMES_ID sourceNames sourceNames sourceNameField sourceNames overwriteExistingResourcesCheckbox setSelection getBoolean STORE_OVERWRITE_EXISTING_RESOURCES_ID createStructure getBoolean STORE_CREATE_CONTAINER_STRUCTURE_ID createContainerStructureButton setSelection createStructure createOnlySelectedButton setSelection createStructure
Since Finish was pressed write widget values to the dialog store so that they will persist into the next invocation of this wizard page protected void save Widget Values I Dialog Settings settings get Dialog Settings if settings null update source names history String source Names settings get Array STORE SOURCE NAMES ID if source Names null source Names new String 0 source Names add To History source Names get Source Directory Name settings put STORE SOURCE NAMES ID source Names radio buttons and checkboxes settings put STORE OVERWRITE EXISTING RESOURCES ID overwrite Existing Resources Checkbox get Selection settings put STORE CREATE CONTAINER STRUCTURE ID create Container Structure Button get Selection  saveWidgetValues IDialogSettings getDialogSettings sourceNames getArray STORE_SOURCE_NAMES_ID sourceNames sourceNames sourceNames addToHistory sourceNames getSourceDirectoryName STORE_SOURCE_NAMES_ID sourceNames STORE_OVERWRITE_EXISTING_RESOURCES_ID overwriteExistingResourcesCheckbox getSelection STORE_CREATE_CONTAINER_STRUCTURE_ID createContainerStructureButton getSelection
Busy Indicator show While get Shell get Display new Runnable public void run Create the root element from the supplied file system object results 0 create Root Element root File System Object structure Provider  BusyIndicator showWhile getShell getDisplay createRootElement rootFileSystemObject structureProvider
Invokes a file selection operation using the specified file system and structure provider If the user specifies files to be imported then this selection is cached for later retrieval and is returned protected Minimized File System Element select Files final Object root File System Object final I Import Structure Provider structure Provider final Minimized File System Element results new Minimized File System Element 1 Busy Indicator show While get Shell get Display new Runnable public void run Create the root element from the supplied file system object results 0 create Root Element root File System Object structure Provider return results 0  MinimizedFileSystemElement selectFiles rootFileSystemObject IImportStructureProvider structureProvider MinimizedFileSystemElement MinimizedFileSystemElement BusyIndicator showWhile getShell getDisplay createRootElement rootFileSystemObject structureProvider
Set all of the selections in the selection group to value Implemented here to provide access for inner classes param value boolean protected void set All Selections boolean value super set All Selections value  setAllSelections setAllSelections
Sets the source name of the import to be the supplied path Adds the name of the path to the list of items in the source combo and selects it param path the path to be added protected void set Source Name String path if path length 0 String current Items this source Name Field get Items int selection Index 1 for int i 0 i current Items length i if current Items i equals path selection Index i if selection Index 0 int old Length current Items length String new Items new String old Length 1 System arraycopy current Items 0 new Items 0 old Length new Items old Length path this source Name Field set Items new Items selection Index old Length this source Name Field select selection Index reset Selection  setSourceName currentItems sourceNameField getItems selectionIndex currentItems currentItems selectionIndex selectionIndex oldLength currentItems newItems oldLength currentItems newItems oldLength newItems oldLength sourceNameField setItems newItems selectionIndex oldLength sourceNameField selectionIndex resetSelection
public void filter Elements Collection files I Progress Monitor monitor throws Interrupted Exception if files null throw new Interrupted Exception Iterator files List files iterator while files List has Next if monitor is Canceled throw new Interrupted Exception check File files List next  filterElements IProgressMonitor InterruptedException InterruptedException filesList filesList hasNext isCanceled InterruptedException checkFile filesList
public void filter Elements Object files I Progress Monitor monitor throws Interrupted Exception if files null throw new Interrupted Exception for int i 0 i files length i if monitor is Canceled throw new Interrupted Exception check File files i  filterElements IProgressMonitor InterruptedException InterruptedException isCanceled InterruptedException checkFile
private void check File Object file Element Minimized File System Element file Minimized File System Element file Element if is Exportable Extension file get File Name Extension List elements new Array List File System Element parent file get Parent if selection Map contains Key parent elements List selection Map get parent elements add file selection Map put parent elements  checkFile fileElement MinimizedFileSystemElement MinimizedFileSystemElement fileElement isExportableExtension getFileNameExtension ArrayList FileSystemElement getParent selectionMap containsKey selectionMap selectionMap
I Runnable With Progress runnable new I Runnable With Progress public void run final I Progress Monitor monitor throws Interrupted Exception monitor begin Task Data Transfer Messages get String Import Page filter Selections I Progress Monitor UNKNOWN NON NLS 1 get Selected Resources filter monitor  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InterruptedException beginTask DataTransferMessages getString ImportPage filterSelections IProgressMonitor getSelectedResources
Update the tree to only select those elements that match the selected types protected void setup Selections Based On Selected Types Progress Monitor Dialog dialog new Progress Monitor Jobs Dialog get Container get Shell final Map selection Map new Hashtable final I Element Filter filter new I Element Filter public void filter Elements Collection files I Progress Monitor monitor throws Interrupted Exception if files null throw new Interrupted Exception Iterator files List files iterator while files List has Next if monitor is Canceled throw new Interrupted Exception check File files List next public void filter Elements Object files I Progress Monitor monitor throws Interrupted Exception if files null throw new Interrupted Exception for int i 0 i files length i if monitor is Canceled throw new Interrupted Exception check File files i private void check File Object file Element Minimized File System Element file Minimized File System Element file Element if is Exportable Extension file get File Name Extension List elements new Array List File System Element parent file get Parent if selection Map contains Key parent elements List selection Map get parent elements add file selection Map put parent elements I Runnable With Progress runnable new I Runnable With Progress public void run final I Progress Monitor monitor throws Interrupted Exception monitor begin Task Data Transfer Messages get String Import Page filter Selections I Progress Monitor UNKNOWN NON NLS 1 get Selected Resources filter monitor try dialog run true true runnable catch Invocation Target Exception exception Couldn t start Do nothing return catch Interrupted Exception exception Got interrupted Do nothing return make sure that all paint operations caused by closing the progress dialog get flushed otherwise extra pixels will remain on the screen until update Selections is completed get Shell update The update Selections method accesses SWT widgets so cannot be executed as part of the above progress dialog operation since the operation forks a new process if selection Map null update Selections selection Map  setupSelectionsBasedOnSelectedTypes ProgressMonitorDialog ProgressMonitorJobsDialog getContainer getShell selectionMap IElementFilter IElementFilter filterElements IProgressMonitor InterruptedException InterruptedException filesList filesList hasNext isCanceled InterruptedException checkFile filesList filterElements IProgressMonitor InterruptedException InterruptedException isCanceled InterruptedException checkFile checkFile fileElement MinimizedFileSystemElement MinimizedFileSystemElement fileElement isExportableExtension getFileNameExtension ArrayList FileSystemElement getParent selectionMap containsKey selectionMap selectionMap IRunnableWithProgress IRunnableWithProgress IProgressMonitor InterruptedException beginTask DataTransferMessages getString ImportPage filterSelections IProgressMonitor getSelectedResources InvocationTargetException InterruptedException updateSelections getShell updateSelections selectionMap updateSelections selectionMap
public void set Visible boolean visible super set Visible visible reset Selection if visible this source Name Field set Focus  setVisible setVisible resetSelection sourceNameField setFocus
Update the selections with those in map Implemented here to give inner class visibility param map Map key tree elements values Lists of list elements protected void update Selections Map map super update Selections map  updateSelections updateSelections
Check if widgets are enabled or disabled by a change in the dialog Provided here to give access to inner classes param event Event protected void update Widget Enablements super update Widget Enablements  updateWidgetEnablements updateWidgetEnablements
Answer a boolean indicating whether self s source specification widgets currently all contain valid values protected boolean validate Source Group File source Directory get Source Directory if source Directory null set Message SOURCE EMPTY MESSAGE enable Button Group false return false if source Conflicts With Destination new Path source Directory get Path set Error Message get Source Conflict Message NON NLS 1 enable Button Group false return false enable Button Group true return true  validateSourceGroup sourceDirectory getSourceDirectory sourceDirectory setMessage SOURCE_EMPTY_MESSAGE enableButtonGroup sourceConflictsWithDestination sourceDirectory getPath setErrorMessage getSourceConflictMessage enableButtonGroup enableButtonGroup
Returns whether the source location conflicts with the destination resource This will occur if the source is already under the destination param source Path the path to check return code true code if there is a conflict code false code if not protected boolean source Conflicts With Destination I Path source Path I Container container get Specified Container if container null return false else I Path destination Location get Specified Container get Location if destination Location null return destination Location is Prefix Of source Path else null destination location is handled in Wizard Resource Import Page return false  sourcePath sourceConflictsWithDestination IPath sourcePath IContainer getSpecifiedContainer IPath destinationLocation getSpecifiedContainer getLocation destinationLocation destinationLocation isPrefixOf sourcePath WizardResourceImportPage

private final static StringSTORE COMPRESS CONTENTS ID Wizard Zip File Export Page1 STORE COMPRESS CONTENTS ID NON NLS 1 Create an instance of this class Note that this constructor is here primarily to keep the Jar File Export Page1 subclass happy param name java lang String protected Wizard Zip File Export Page1 String name I Structured Selection selection super name selection  StringSTORE_COMPRESS_CONTENTS_ID WizardZipFileExportPage1 STORE_COMPRESS_CONTENTS_ID JarFileExportPage1 WizardZipFileExportPage1 IStructuredSelection
Create an instance of this class public Wizard Zip File Export Page1 I Structured Selection selection this zip File Export Page1 selection NON NLS 1 set Title Data Transfer Messages get String Zip Export export Title NON NLS 1 set Description Data Transfer Messages get String Zip Export description NON NLS 1  WizardZipFileExportPage1 IStructuredSelection zipFileExportPage1 setTitle DataTransferMessages getString ZipExport exportTitle setDescription DataTransferMessages getString ZipExport
Create the export options specification widgets param parent org eclipse swt widgets Composite protected void create Options Group Composite parent options group Composite options Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 options Group set Layout layout options Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL overwrite checkbox overwrite Existing File Checkbox new Button options Group SWT CHECK SWT LEFT overwrite Existing File Checkbox set Text Data Transfer Messages get String Zip Export overwrite File NON NLS 1 create directory structure checkbox create Directory Structure Checkbox new Button options Group SWT CHECK SWT LEFT create Directory Structure Checkbox set Text Data Transfer Messages get String Export File create Directory Structure NON NLS 1 compress checkbox compress Contents Checkbox new Button options Group SWT CHECK SWT LEFT compress Contents Checkbox set Text Data Transfer Messages get String Zip Export compress Contents NON NLS 1 initial setup create Directory Structure Checkbox set Selection true compress Contents Checkbox set Selection true  createOptionsGroup optionsGroup GridLayout GridLayout marginHeight optionsGroup setLayout optionsGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL overwriteExistingFileCheckbox optionsGroup overwriteExistingFileCheckbox setText DataTransferMessages getString ZipExport overwriteFile createDirectoryStructureCheckbox optionsGroup createDirectoryStructureCheckbox setText DataTransferMessages getString ExportFile createDirectoryStructure compressContentsCheckbox optionsGroup compressContentsCheckbox setText DataTransferMessages getString ZipExport compressContents createDirectoryStructureCheckbox setSelection compressContentsCheckbox setSelection
Returns a boolean indicating whether the directory portion of the passed pathname is valid and available for use return boolean protected boolean ensure Target Directory Is Valid String full Pathname int separator Index full Pathname last Index Of File separator if separator Index 1 ie default dir which is fine return true return ensure Target Is Valid new File full Pathname substring 0 separator Index  ensureTargetDirectoryIsValid fullPathname separatorIndex fullPathname lastIndexOf separatorIndex ensureTargetIsValid fullPathname separatorIndex
Returns a boolean indicating whether the passed File handle is is valid and available for use return boolean protected boolean ensure Target File Is Valid File target File if target File exists target File is Directory display Error Dialog Data Transfer Messages get String Zip Export must Be File NON NLS 1 give Focus To Destination return false if target File exists if overwrite Existing File Checkbox get Selection target File can Write if query Yes No Question Data Transfer Messages get String Zip Export already Exists NON NLS 1 return false if target File can Write display Error Dialog Data Transfer Messages get String Zip Export already Exists Error NON NLS 1 give Focus To Destination return false return true  ensureTargetFileIsValid targetFile targetFile targetFile isDirectory displayErrorDialog DataTransferMessages getString ZipExport mustBeFile giveFocusToDestination targetFile overwriteExistingFileCheckbox getSelection targetFile canWrite queryYesNoQuestion DataTransferMessages getString ZipExport alreadyExists targetFile canWrite displayErrorDialog DataTransferMessages getString ZipExport alreadyExistsError giveFocusToDestination
Ensures that the target output file and its containing directory are both valid and able to be used Answer a boolean indicating these return boolean protected boolean ensure Target Is Valid String target Path get Destination Value if ensure Target Directory Is Valid target Path return false if ensure Target File Is Valid new File target Path return false return true  ensureTargetIsValid targetPath getDestinationValue ensureTargetDirectoryIsValid targetPath ensureTargetFileIsValid targetPath
Export the passed resource and recursively export all of its child resources iff it s a container Answer a boolean indicating success return boolean protected boolean execute Export Operation Zip File Export Operation op op set Create Leadup Structure create Directory Structure Checkbox get Selection op set Use Compression compress Contents Checkbox get Selection try get Container run true true op catch Interrupted Exception e return false catch Invocation Target Exception e display Error Dialog e get Target Exception get Message return false I Status status op get Status if status isOK Error Dialog open Error get Container get Shell Data Transfer Messages get String Data Transfer export Problems NON NLS 1 null no special message status return false return true  executeExportOperation ZipFileExportOperation setCreateLeadupStructure createDirectoryStructureCheckbox getSelection setUseCompression compressContentsCheckbox getSelection getContainer InterruptedException InvocationTargetException displayErrorDialog getTargetException getMessage IStatus getStatus ErrorDialog openError getContainer getShell DataTransferMessages getString DataTransfer exportProblems
The Finish button was pressed Try to do the required work now and answer a boolean indicating success If false is returned then the wizard will not close return boolean public boolean finish if ensure Target Is Valid return false List resources To Export get Selected Resources about to invoke the operation so save our state save Widget Values if resources To Export size 0 return execute Export Operation new Zip File Export Operation null resources To Export get Destination Value Message Dialog open Information get Container get Shell Data Transfer Messages get String Data Transfer information NON NLS 1 Data Transfer Messages get String File Export none Selected NON NLS 1 return false  ensureTargetIsValid resourcesToExport getSelectedResources saveWidgetValues resourcesToExport executeExportOperation ZipFileExportOperation resourcesToExport getDestinationValue MessageDialog openInformation getContainer getShell DataTransferMessages getString DataTransfer DataTransferMessages getString FileExport noneSelected
Answer the string to display in self as the destination type return java lang String protected String get Destination Label return Data Transfer Messages get String Zip Export destination Label NON NLS 1  getDestinationLabel DataTransferMessages getString ZipExport destinationLabel
Answer the contents of self s destination specification widget If this value does not have the required suffix then add it first return java lang String protected String get Destination Value String required Suffix get Output Suffix String destination Text super get Destination Value if destination Text to Lower Case ends With required Suffix to Lower Case destination Text required Suffix return destination Text  getDestinationValue requiredSuffix getOutputSuffix destinationText getDestinationValue destinationText toLowerCase endsWith requiredSuffix toLowerCase destinationText requiredSuffix destinationText
Answer the suffix that files exported from this wizard must have If this suffix is a file extension which is typically the case then it must include the leading period character return java lang String protected String get Output Suffix return zip NON NLS 1  getOutputSuffix
Open an appropriate destination browser so that the user can specify a source to import from protected void handle Destination Browse Button Pressed File Dialog dialog new File Dialog get Container get Shell SWT SAVE dialog set Filter Extensions new String jar zip NON NLS 1 String current Source String get Destination Value int last Separator Index current Source String last Index Of File separator if last Separator Index 1 dialog set Filter Path current Source String substring 0 last Separator Index String selected File Name dialog open if selected File Name null set Destination Value selected File Name  handleDestinationBrowseButtonPressed FileDialog FileDialog getContainer getShell setFilterExtensions currentSourceString getDestinationValue lastSeparatorIndex currentSourceString lastIndexOf lastSeparatorIndex setFilterPath currentSourceString lastSeparatorIndex selectedFileName selectedFileName setDestinationValue selectedFileName
Hook method for saving widget values for restoration by the next instance of this class protected void internal Save Widget Values update directory names history I Dialog Settings settings get Dialog Settings if settings null String directory Names settings get Array STORE DESTINATION NAMES ID if directory Names null directory Names new String 0 String new Directory Names new String directory Names length 1 System arraycopy directory Names 0 new Directory Names 1 directory Names length new Directory Names 0 get Destination Value settings put STORE DESTINATION NAMES ID directory Names options settings put STORE OVERWRITE EXISTING FILE ID overwrite Existing File Checkbox get Selection settings put STORE CREATE STRUCTURE ID create Directory Structure Checkbox get Selection settings put STORE COMPRESS CONTENTS ID compress Contents Checkbox get Selection  internalSaveWidgetValues IDialogSettings getDialogSettings directoryNames getArray STORE_DESTINATION_NAMES_ID directoryNames directoryNames newDirectoryNames directoryNames directoryNames newDirectoryNames directoryNames newDirectoryNames getDestinationValue STORE_DESTINATION_NAMES_ID directoryNames STORE_OVERWRITE_EXISTING_FILE_ID overwriteExistingFileCheckbox getSelection STORE_CREATE_STRUCTURE_ID createDirectoryStructureCheckbox getSelection STORE_COMPRESS_CONTENTS_ID compressContentsCheckbox getSelection
Hook method for restoring widget values to the values that they held last time this wizard was used to completion protected void restore Widget Values I Dialog Settings settings get Dialog Settings if settings null String directory Names settings get Array STORE DESTINATION NAMES ID if directory Names null directory Names length 0 return ie no settings stored destination set Destination Value directory Names 0 for int i 0 i directory Names length i add Destination Item directory Names i options overwrite Existing File Checkbox set Selection settings get Boolean STORE OVERWRITE EXISTING FILE ID create Directory Structure Checkbox set Selection settings get Boolean STORE CREATE STRUCTURE ID compress Contents Checkbox set Selection settings get Boolean STORE COMPRESS CONTENTS ID  restoreWidgetValues IDialogSettings getDialogSettings directoryNames getArray STORE_DESTINATION_NAMES_ID directoryNames directoryNames setDestinationValue directoryNames directoryNames addDestinationItem directoryNames overwriteExistingFileCheckbox setSelection getBoolean STORE_OVERWRITE_EXISTING_FILE_ID createDirectoryStructureCheckbox setSelection getBoolean STORE_CREATE_STRUCTURE_ID compressContentsCheckbox setSelection getBoolean STORE_COMPRESS_CONTENTS_ID

private final static String STORE SELECTED TYPES ID Wizard Zip File Import Page1 STORE SELECTED TYPES ID NON NLS 1 Creates an instance of this class public Wizard Zip File Import Page1 I Workbench a Workbench I Structured Selection selection super zip File Import Page1 a Workbench selection NON NLS 1 set Title Data Transfer Messages get String Zip Export export Title NON NLS 1 set Description Data Transfer Messages get String Zip Import description NON NLS 1  STORE_SELECTED_TYPES_ID WizardZipFileImportPage1 STORE_SELECTED_TYPES_ID WizardZipFileImportPage1 IWorkbench aWorkbench IStructuredSelection zipFileImportPage1 aWorkbench setTitle DataTransferMessages getString ZipExport exportTitle setDescription DataTransferMessages getString ZipImport
Called when the user presses the Cancel button Return a boolean indicating permission to close the wizard public boolean cancel clear Provider Cache return true  clearProviderCache
Clears the cached structure provider after first finalizing it properly protected void clear Provider Cache if provider Cache null close Zip File provider Cache get Zip File provider Cache null  clearProviderCache providerCache closeZipFile providerCache getZipFile providerCache
Attempts to close the passed zip file and answers a boolean indicating success protected boolean close Zip File Zip File file try file close catch IO Exception e display Error Dialog Data Transfer Messages format Zip Import could Not Close new Object file get Name NON NLS 1 return false return true  closeZipFile ZipFile IOException displayErrorDialog DataTransferMessages ZipImport couldNotClose getName
Create the import options specification widgets protected void create Options Group Composite parent options group Composite options Group new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height 0 options Group set Layout layout options Group set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data GRAB HORIZONTAL overwrite checkbox overwrite Existing Resources Checkbox new Button options Group SWT CHECK overwrite Existing Resources Checkbox set Text Data Transfer Messages get String File Import overwrite Existing NON NLS 1  createOptionsGroup optionsGroup GridLayout GridLayout marginHeight optionsGroup setLayout optionsGroup setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL GridData GRAB_HORIZONTAL overwriteExistingResourcesCheckbox optionsGroup overwriteExistingResourcesCheckbox setText DataTransferMessages getString FileImport overwriteExisting
Display the appropriate string representing a selection of the passed size protected void display Selected Count int selected Entry Count if selected Entry Count 1 details Description Label set Text Data Transfer Messages get String Import Page one Selected NON NLS 1 else details Description Label set Text Data Transfer Messages format Zip Import entries Selected new Object String value Of selected Entry Count NON NLS 1  displaySelectedCount selectedEntryCount selectedEntryCount detailsDescriptionLabel setText DataTransferMessages getString ImportPage oneSelected detailsDescriptionLabel setText DataTransferMessages ZipImport entriesSelected valueOf selectedEntryCount
Answer a boolean indicating whether the specified source currently exists and is valid ie proper format protected boolean ensure Source Is Valid Zip File specified File get Specified Source File if specified File null return false return close Zip File specified File  ensureSourceIsValid ZipFile specifiedFile getSpecifiedSourceFile specifiedFile closeZipFile specifiedFile
The Finish button was pressed Try to do the required work now and answer a boolean indicating success If code false code is returned then the wizard will not close public boolean finish if super finish return false clear Provider Cache return true  clearProviderCache
Answer the root File System Element that represents the contents of the currently specified zip file If this File System Element is not currently defined then create and return it protected File System Element get File System Tree if get Root null return get Root Zip File source File get Specified Source File if source File null return null Zip File Structure Provider provider get Structure Provider source File return select Files provider get Root provider  FileSystemElement FileSystemElement FileSystemElement getFileSystemTree getRoot getRoot ZipFile sourceFile getSpecifiedSourceFile sourceFile ZipFileStructureProvider getStructureProvider sourceFile selectFiles getRoot
Answer the string to display as the label for the source specification field protected String get Source Label return Data Transfer Messages get String Zip Export destination Label NON NLS 1  getSourceLabel DataTransferMessages getString ZipExport destinationLabel
Answer a handle to the zip file currently specified as being the source Return null if this file does not exist or is not of valid format protected Zip File get Specified Source File try return new Zip File source Name Field get Text catch Zip Exception e display Error Dialog Data Transfer Messages get String Zip Import bad Format NON NLS 1 catch IO Exception e display Error Dialog Data Transfer Messages get String Zip Import could Not Read NON NLS 1 source Name Field set Focus return null  ZipFile getSpecifiedSourceFile ZipFile sourceNameField getText ZipException displayErrorDialog DataTransferMessages getString ZipImport badFormat IOException displayErrorDialog DataTransferMessages getString ZipImport couldNotRead sourceNameField setFocus
Returns a structure provider for the specified zip file protected Zip File Structure Provider get Structure Provider Zip File target Zip if provider Cache null provider Cache new Zip File Structure Provider target Zip else if provider Cache get Zip File get Name equals target Zip get Name clear Provider Cache ie new value so finalize remove old value provider Cache new Zip File Structure Provider target Zip else if provider Cache get Zip File equals target Zip close Zip File target Zip ie duplicate handle to same zip return provider Cache  ZipFileStructureProvider getStructureProvider ZipFile targetZip providerCache providerCache ZipFileStructureProvider targetZip providerCache getZipFile getName targetZip getName clearProviderCache providerCache ZipFileStructureProvider targetZip providerCache getZipFile targetZip closeZipFile targetZip providerCache
Open a File Dialog so that the user can specify the source file to import from protected void handle Source Browse Button Pressed String selected File query Zip File To Import if selected File null if selected File equals source Name Field get Text reset Selection source Name Field set Text selected File  FileDialog handleSourceBrowseButtonPressed selectedFile queryZipFileToImport selectedFile selectedFile sourceNameField getText resetSelection sourceNameField setText selectedFile
Recursively import all resources starting at the user specified source location Answer a boolean indicating success protected boolean import All Resources Zip File Structure Provider structure Provider get Structure Provider get Specified Source File return execute Import Operation new Import Operation get Container Full Path structure Provider get Root structure Provider this  importAllResources ZipFileStructureProvider structureProvider getStructureProvider getSpecifiedSourceFile executeImportOperation ImportOperation getContainerFullPath structureProvider getRoot structureProvider
Import the resources with extensions as specified by the user protected boolean import Resources List file System Objects Zip File Structure Provider structure Provider get Structure Provider get Specified Source File return execute Import Operation new Import Operation get Container Full Path structure Provider get Root structure Provider this file System Objects  importResources fileSystemObjects ZipFileStructureProvider structureProvider getStructureProvider getSpecifiedSourceFile executeImportOperation ImportOperation getContainerFullPath structureProvider getRoot structureProvider fileSystemObjects
Initializes the specified operation appropriately protected void initialize Operation Import Operation op op set Overwrite Resources overwrite Existing Resources Checkbox get Selection  initializeOperation ImportOperation setOverwriteResources overwriteExistingResourcesCheckbox getSelection
Opens a file selection dialog and returns a string representing the selected file or code null code if the dialog was canceled protected String query Zip File To Import File Dialog dialog new File Dialog source Name Field get Shell SWT OPEN dialog set Filter Extensions new String FILE IMPORT MASK String current Source String source Name Field get Text int last Separator Index current Source String last Index Of File separator if last Separator Index 1 dialog set Filter Path current Source String substring 0 last Separator Index return dialog open  queryZipFileToImport FileDialog FileDialog sourceNameField getShell setFilterExtensions FILE_IMPORT_MASK currentSourceString sourceNameField getText lastSeparatorIndex currentSourceString lastIndexOf lastSeparatorIndex setFilterPath currentSourceString lastSeparatorIndex
Use the dialog store to restore widget values to the values that they held last time this wizard was used to completion protected void restore Widget Values I Dialog Settings settings get Dialog Settings if settings null String source Names settings get Array STORE SOURCE NAMES ID if source Names null return ie no settings stored set all specific types radios and related enablements if settings get Boolean STORE IMPORT ALL RESOURCES ID import All Resources Radio set Selection true import Typed Resources Radio set Selection false else import Typed Resources Radio set Selection true import All Resources Radio set Selection false set filenames history source Name Field set Text source Names 0 for int i 0 i source Names length i source Name Field add source Names i set selected types String selected Types settings get Array STORE SELECTED TYPES ID if selected Types length 0 types To Import Field set Text String selected Types 0 for int i 0 i selected Types length i types To Import Field add String selected Types i radio buttons and checkboxes overwrite Existing Resources Checkbox set Selection settings get Boolean STORE OVERWRITE EXISTING RESOURCES ID  restoreWidgetValues IDialogSettings getDialogSettings sourceNames getArray STORE_SOURCE_NAMES_ID sourceNames getBoolean STORE_IMPORT_ALL_RESOURCES_ID importAllResourcesRadio setSelection importTypedResourcesRadio setSelection importTypedResourcesRadio setSelection importAllResourcesRadio setSelection sourceNameField setText sourceNames sourceNames sourceNameField sourceNames selectedTypes getArray STORE_SELECTED_TYPES_ID selectedTypes typesToImportField setText selectedTypes selectedTypes typesToImportField selectedTypes overwriteExistingResourcesCheckbox setSelection getBoolean STORE_OVERWRITE_EXISTING_RESOURCES_ID
Since Finish was pressed write widget values to the dialog store so that they will persist into the next invocation of this wizard page Note that this method is identical to the one that appears in the superclass This is necessary because proper overriding of instance variables is not occurring protected void save Widget Values I Dialog Settings settings get Dialog Settings if settings null update source names history String source Names settings get Array STORE SOURCE NAMES ID if source Names null source Names new String 0 source Names add To History source Names source Name Field get Text settings put STORE SOURCE NAMES ID source Names update specific types to import history String selected Types Names settings get Array STORE SELECTED TYPES ID if selected Types Names null selected Types Names new String 0 if import Typed Resources Radio get Selection selected Types Names add To History selected Types Names types To Import Field get Text settings put STORE SELECTED TYPES ID selected Types Names radio buttons and checkboxes settings put STORE IMPORT ALL RESOURCES ID import All Resources Radio get Selection settings put STORE OVERWRITE EXISTING RESOURCES ID overwrite Existing Resources Checkbox get Selection  saveWidgetValues IDialogSettings getDialogSettings sourceNames getArray STORE_SOURCE_NAMES_ID sourceNames sourceNames sourceNames addToHistory sourceNames sourceNameField getText STORE_SOURCE_NAMES_ID sourceNames selectedTypesNames getArray STORE_SELECTED_TYPES_ID selectedTypesNames selectedTypesNames importTypedResourcesRadio getSelection selectedTypesNames addToHistory selectedTypesNames typesToImportField getText STORE_SELECTED_TYPES_ID selectedTypesNames STORE_IMPORT_ALL_RESOURCES_ID importAllResourcesRadio getSelection STORE_OVERWRITE_EXISTING_RESOURCES_ID overwriteExistingResourcesCheckbox getSelection

private final static String STORE COMPRESS CONTENTS ID Wizard Zip File Resource Export Page1 STORE COMPRESS CONTENTS ID NON NLS 1 Create an instance of this class param name java lang String protected Wizard Zip File Resource Export Page1 String name I Structured Selection selection super name selection  STORE_COMPRESS_CONTENTS_ID WizardZipFileResourceExportPage1 STORE_COMPRESS_CONTENTS_ID WizardZipFileResourceExportPage1 IStructuredSelection
Create an instance of this class param I Structured Selection selection public Wizard Zip File Resource Export Page1 I Structured Selection selection this zip File Export Page1 selection NON NLS 1 set Title Data Transfer Messages get String Zip Export export Title NON NLS 1 set Description Data Transfer Messages get String Zip Export description NON NLS 1  IStructuredSelection WizardZipFileResourceExportPage1 IStructuredSelection zipFileExportPage1 setTitle DataTransferMessages getString ZipExport exportTitle setDescription DataTransferMessages getString ZipExport
non Javadoc Method declared on I Dialog Page public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Data Transfer Help Context Ids ZIP FILE EXPORT WIZARD PAGE  IDialogPage createControl createControl WorkbenchHelp setHelp getControl IDataTransferHelpContextIds ZIP_FILE_EXPORT_WIZARD_PAGE
Create the export options specification widgets protected void create Options Group Buttons Group options Group Font font options Group get Font compress checkbox compress Contents Checkbox new Button options Group SWT CHECK SWT LEFT compress Contents Checkbox set Text Data Transfer Messages get String Zip Export compress Contents NON NLS 1 compress Contents Checkbox set Font font create Directory Structure Options options Group font initial setup create Directory Structure Button set Selection true create Selection Only Button set Selection false compress Contents Checkbox set Selection true  createOptionsGroupButtons optionsGroup optionsGroup getFont compressContentsCheckbox optionsGroup compressContentsCheckbox setText DataTransferMessages getString ZipExport compressContents compressContentsCheckbox setFont createDirectoryStructureOptions optionsGroup createDirectoryStructureButton setSelection createSelectionOnlyButton setSelection compressContentsCheckbox setSelection
Returns a boolean indicating whether the directory portion of the passed pathname is valid and available for use protected boolean ensure Target Directory Is Valid String full Pathname int separator Index full Pathname last Index Of File separator if separator Index 1 ie default dir which is fine return true return ensure Target Is Valid new File full Pathname substring 0 separator Index  ensureTargetDirectoryIsValid fullPathname separatorIndex fullPathname lastIndexOf separatorIndex ensureTargetIsValid fullPathname separatorIndex
Returns a boolean indicating whether the passed File handle is is valid and available for use protected boolean ensure Target File Is Valid File target File if target File exists target File is Directory display Error Dialog Data Transfer Messages get String Zip Export must Be File NON NLS 1 give Focus To Destination return false if target File exists if target File can Write if query Yes No Question Data Transfer Messages get String Zip Export already Exists NON NLS 1 return false else display Error Dialog Data Transfer Messages get String Zip Export already Exists Error NON NLS 1 give Focus To Destination return false return true  ensureTargetFileIsValid targetFile targetFile targetFile isDirectory displayErrorDialog DataTransferMessages getString ZipExport mustBeFile giveFocusToDestination targetFile targetFile canWrite queryYesNoQuestion DataTransferMessages getString ZipExport alreadyExists displayErrorDialog DataTransferMessages getString ZipExport alreadyExistsError giveFocusToDestination
Ensures that the target output file and its containing directory are both valid and able to be used Answer a boolean indicating validity protected boolean ensure Target Is Valid String target Path get Destination Value if ensure Target Directory Is Valid target Path return false if ensure Target File Is Valid new File target Path return false return true  ensureTargetIsValid targetPath getDestinationValue ensureTargetDirectoryIsValid targetPath ensureTargetFileIsValid targetPath
Export the passed resource and recursively export all of its child resources iff it s a container Answer a boolean indicating success protected boolean execute Export Operation Zip File Export Operation op op set Create Leadup Structure create Directory Structure Button get Selection op set Use Compression compress Contents Checkbox get Selection try get Container run true true op catch Interrupted Exception e return false catch Invocation Target Exception e display Error Dialog e get Target Exception return false I Status status op get Status if status isOK Error Dialog open Error get Container get Shell Data Transfer Messages get String Data Transfer export Problems NON NLS 1 null no special message status return false return true  executeExportOperation ZipFileExportOperation setCreateLeadupStructure createDirectoryStructureButton getSelection setUseCompression compressContentsCheckbox getSelection getContainer InterruptedException InvocationTargetException displayErrorDialog getTargetException IStatus getStatus ErrorDialog openError getContainer getShell DataTransferMessages getString DataTransfer exportProblems
The Finish button was pressed Try to do the required work now and answer a boolean indicating success If false is returned then the wizard will not close returns boolean public boolean finish if ensure Target Is Valid return false List resources To Export get White Checked Resources Save dirty editors if possible but do not stop if not all are saved save Dirty Editors about to invoke the operation so save our state save Widget Values if resources To Export size 0 return execute Export Operation new Zip File Export Operation null resources To Export get Destination Value Message Dialog open Information get Container get Shell Data Transfer Messages get String Data Transfer information NON NLS 1 Data Transfer Messages get String File Export none Selected NON NLS 1 return false  ensureTargetIsValid resourcesToExport getWhiteCheckedResources saveDirtyEditors saveWidgetValues resourcesToExport executeExportOperation ZipFileExportOperation resourcesToExport getDestinationValue MessageDialog openInformation getContainer getShell DataTransferMessages getString DataTransfer DataTransferMessages getString FileExport noneSelected
Answer the string to display in the receiver as the destination type protected String get Destination Label return Data Transfer Messages get String Zip Export destination Label NON NLS 1  getDestinationLabel DataTransferMessages getString ZipExport destinationLabel
Answer the contents of self s destination specification widget If this value does not have a suffix then add it first protected String get Destination Value String ideal Suffix get Output Suffix String destination Text super get Destination Value only append a suffix if the destination doesn t already have a in its last path segment Also prevent the user from selecting a directory Allowing this will create a zip file in the directory if destination Text length 0 destination Text ends With File separator int dot Index destination Text last Index Of if dot Index 1 the last path seperator index int path Sep Index destination Text last Index Of File separator if path Sep Index 1 dot Index path Sep Index destination Text ideal Suffix else destination Text ideal Suffix return destination Text  getDestinationValue idealSuffix getOutputSuffix destinationText getDestinationValue destinationText destinationText endsWith dotIndex destinationText lastIndexOf dotIndex pathSepIndex destinationText lastIndexOf pathSepIndex dotIndex pathSepIndex destinationText idealSuffix destinationText idealSuffix destinationText
Answer the suffix that files exported from this wizard should have If this suffix is a file extension which is typically the case then it must include the leading period character protected String get Output Suffix return zip NON NLS 1  getOutputSuffix
Open an appropriate destination browser so that the user can specify a source to import from protected void handle Destination Browse Button Pressed File Dialog dialog new File Dialog get Container get Shell SWT SAVE dialog set Filter Extensions new String zip NON NLS 1 NON NLS 2 dialog set Text Data Transfer Messages get String Zip Export select Destination Title NON NLS 1 String current Source String get Destination Value int last Separator Index current Source String last Index Of File separator if last Separator Index 1 dialog set Filter Path current Source String substring 0 last Separator Index String selected File Name dialog open if selected File Name null set Error Message null set Destination Value selected File Name  handleDestinationBrowseButtonPressed FileDialog FileDialog getContainer getShell setFilterExtensions setText DataTransferMessages getString ZipExport selectDestinationTitle currentSourceString getDestinationValue lastSeparatorIndex currentSourceString lastIndexOf lastSeparatorIndex setFilterPath currentSourceString lastSeparatorIndex selectedFileName selectedFileName setErrorMessage setDestinationValue selectedFileName
Hook method for saving widget values for restoration by the next instance of this class protected void internal Save Widget Values update directory names history I Dialog Settings settings get Dialog Settings if settings null String directory Names settings get Array STORE DESTINATION NAMES ID if directory Names null directory Names new String 0 directory Names add To History directory Names get Destination Value settings put STORE DESTINATION NAMES ID directory Names settings put STORE CREATE STRUCTURE ID create Directory Structure Button get Selection settings put STORE COMPRESS CONTENTS ID compress Contents Checkbox get Selection  internalSaveWidgetValues IDialogSettings getDialogSettings directoryNames getArray STORE_DESTINATION_NAMES_ID directoryNames directoryNames directoryNames addToHistory directoryNames getDestinationValue STORE_DESTINATION_NAMES_ID directoryNames STORE_CREATE_STRUCTURE_ID createDirectoryStructureButton getSelection STORE_COMPRESS_CONTENTS_ID compressContentsCheckbox getSelection
Hook method for restoring widget values to the values that they held last time this wizard was used to completion protected void restore Widget Values I Dialog Settings settings get Dialog Settings if settings null String directory Names settings get Array STORE DESTINATION NAMES ID if directory Names null directory Names length 0 return ie no settings stored destination set Destination Value directory Names 0 for int i 0 i directory Names length i add Destination Item directory Names i boolean set Structure settings get Boolean STORE CREATE STRUCTURE ID create Directory Structure Button set Selection set Structure create Selection Only Button set Selection set Structure compress Contents Checkbox set Selection settings get Boolean STORE COMPRESS CONTENTS ID  restoreWidgetValues IDialogSettings getDialogSettings directoryNames getArray STORE_DESTINATION_NAMES_ID directoryNames directoryNames setDestinationValue directoryNames directoryNames addDestinationItem directoryNames setStructure getBoolean STORE_CREATE_STRUCTURE_ID createDirectoryStructureButton setSelection setStructure createSelectionOnlyButton setSelection setStructure compressContentsCheckbox setSelection getBoolean STORE_COMPRESS_CONTENTS_ID
see org eclipse ui wizards datatransfer Wizard File System Resource Export Page1 destination Empty Message protected String destination Empty Message return Data Transfer Messages get String Zip Export destination Empty NON NLS 1  WizardFileSystemResourceExportPage1 destinationEmptyMessage destinationEmptyMessage DataTransferMessages getString ZipExport destinationEmpty

Wizard Zip File Resource Import Page1 STORE SELECTED TYPES ID NON NLS 1 Creates an instance of this class param a Workbench I Workbench param selection I Structured Selection public Wizard Zip File Resource Import Page1 I Workbench a Workbench I Structured Selection selection super zip File Import Page1 a Workbench selection NON NLS 1 set Title Data Transfer Messages get String Zip Export export Title NON NLS 1 set Description Data Transfer Messages get String Zip Import description NON NLS 1  WizardZipFileResourceImportPage1 STORE_SELECTED_TYPES_ID aWorkbench IWorkbench IStructuredSelection WizardZipFileResourceImportPage1 IWorkbench aWorkbench IStructuredSelection zipFileImportPage1 aWorkbench setTitle DataTransferMessages getString ZipExport exportTitle setDescription DataTransferMessages getString ZipImport
Called when the user presses the Cancel button Return a boolean indicating permission to close the wizard return boolean public boolean cancel clear Provider Cache return true  clearProviderCache
Clears the cached structure provider after first finalizing it properly protected void clear Provider Cache if provider Cache null close Zip File provider Cache get Zip File provider Cache null  clearProviderCache providerCache closeZipFile providerCache getZipFile providerCache
Attempts to close the passed zip file and answers a boolean indicating success protected boolean close Zip File Zip File file try file close catch IO Exception e display Error Dialog Data Transfer Messages format Zip Import could Not Close new Object file get Name NON NLS 1 return false return true  closeZipFile ZipFile IOException displayErrorDialog DataTransferMessages ZipImport couldNotClose getName
non Javadoc Method declared on I Dialog Page public void create Control Composite parent super create Control parent Workbench Help set Help get Control I Data Transfer Help Context Ids ZIP FILE IMPORT WIZARD PAGE  IDialogPage createControl createControl WorkbenchHelp setHelp getControl IDataTransferHelpContextIds ZIP_FILE_IMPORT_WIZARD_PAGE
Create the options specification widgets There is only one in this case so create no group param parent org eclipse swt widgets Composite protected void create Options Group Composite parent overwrite checkbox overwrite Existing Resources Checkbox new Button parent SWT CHECK overwrite Existing Resources Checkbox set Text Data Transfer Messages get String File Import overwrite Existing NON NLS 1 overwrite Existing Resources Checkbox set Font parent get Font  createOptionsGroup overwriteExistingResourcesCheckbox overwriteExistingResourcesCheckbox setText DataTransferMessages getString FileImport overwriteExisting overwriteExistingResourcesCheckbox setFont getFont
Answer a boolean indicating whether the specified source currently exists and is valid ie proper format protected boolean ensure Source Is Valid Zip File specified File get Specified Source File if specified File null return false return close Zip File specified File  ensureSourceIsValid ZipFile specifiedFile getSpecifiedSourceFile specifiedFile closeZipFile specifiedFile
The Finish button was pressed Try to do the required work now and answer a boolean indicating success If code false code is returned then the wizard will not close return boolean public boolean finish if super finish return false clear Provider Cache return true  clearProviderCache
return new Workbench Content Provider public Object get Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o return element get Files current Provider get Children element return new Object 0  WorkbenchContentProvider getChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement getFiles currentProvider getChildren
Returns a content provider for code File System Element code s that returns only files as children protected I Tree Content Provider get File Provider return new Workbench Content Provider public Object get Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o return element get Files current Provider get Children element return new Object 0  FileSystemElement ITreeContentProvider getFileProvider WorkbenchContentProvider getChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement getFiles currentProvider getChildren
Answer the root File System Element that represents the contents of the currently specified zip file If this File System Element is not currently defined then create and return it protected Minimized File System Element get File System Tree Zip File source File get Specified Source File if source File null Clear out the provider as well this current Provider null return null Zip File Structure Provider provider get Structure Provider source File this current Provider provider return select Files provider get Root provider  FileSystemElement FileSystemElement MinimizedFileSystemElement getFileSystemTree ZipFile sourceFile getSpecifiedSourceFile sourceFile currentProvider ZipFileStructureProvider getStructureProvider sourceFile currentProvider selectFiles getRoot
return new Workbench Content Provider public Object get Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o return element get Folders current Provider get Children element return new Object 0  WorkbenchContentProvider getChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement getFolders currentProvider getChildren
public boolean has Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o if element is Populated return get Children element length 0 else If we have not populated then wait until asked return true return false  hasChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement isPopulated getChildren
Returns a content provider for code File System Element code s that returns only folders as children protected I Tree Content Provider get Folder Provider return new Workbench Content Provider public Object get Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o return element get Folders current Provider get Children element return new Object 0 public boolean has Children Object o if o instanceof Minimized File System Element Minimized File System Element element Minimized File System Element o if element is Populated return get Children element length 0 else If we have not populated then wait until asked return true return false  FileSystemElement ITreeContentProvider getFolderProvider WorkbenchContentProvider getChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement getFolders currentProvider getChildren hasChildren MinimizedFileSystemElement MinimizedFileSystemElement MinimizedFileSystemElement isPopulated getChildren
Answer the string to display as the label for the source specification field protected String get Source Label return Data Transfer Messages get String Zip Import from File NON NLS 1  getSourceLabel DataTransferMessages getString ZipImport fromFile
Answer a handle to the zip file currently specified as being the source Return null if this file does not exist or is not of valid format protected Zip File get Specified Source File return get Specified Source File source Name Field get Text  ZipFile getSpecifiedSourceFile getSpecifiedSourceFile sourceNameField getText
Answer a handle to the zip file currently specified as being the source Return null if this file does not exist or is not of valid format private Zip File get Specified Source File String file Name if file Name length 0 return null try return new Zip File file Name catch Zip Exception e display Error Dialog Data Transfer Messages get String Zip Import bad Format NON NLS 1 catch IO Exception e display Error Dialog Data Transfer Messages get String Zip Import could Not Read NON NLS 1 source Name Field set Focus return null  ZipFile getSpecifiedSourceFile fileName fileName ZipFile fileName ZipException displayErrorDialog DataTransferMessages getString ZipImport badFormat IOException displayErrorDialog DataTransferMessages getString ZipImport couldNotRead sourceNameField setFocus
Returns a structure provider for the specified zip file protected Zip File Structure Provider get Structure Provider Zip File target Zip if provider Cache null provider Cache new Zip File Structure Provider target Zip else if provider Cache get Zip File get Name equals target Zip get Name clear Provider Cache ie new value so finalize remove old value provider Cache new Zip File Structure Provider target Zip else if provider Cache get Zip File equals target Zip close Zip File target Zip ie duplicate handle to same zip return provider Cache  ZipFileStructureProvider getStructureProvider ZipFile targetZip providerCache providerCache ZipFileStructureProvider targetZip providerCache getZipFile getName targetZip getName clearProviderCache providerCache ZipFileStructureProvider targetZip providerCache getZipFile targetZip closeZipFile targetZip providerCache
Open a File Dialog so that the user can specify the source file to import from protected void handle Source Browse Button Pressed String selected File query Zip File To Import if selected File null if selected File equals source Name Field get Text Be sure it is valid before we go setting any names Zip File source File get Specified Source File selected File if source File null close Zip File source File set Source Name selected File selection Group set Focus  FileDialog handleSourceBrowseButtonPressed selectedFile queryZipFileToImport selectedFile selectedFile sourceNameField getText ZipFile sourceFile getSpecifiedSourceFile selectedFile sourceFile closeZipFile sourceFile setSourceName selectedFile selectionGroup setFocus
Import the resources with extensions as specified by the user protected boolean import Resources List file System Objects Zip File zip File get Specified Source File Zip File Structure Provider structure Provider get Structure Provider zip File Import Operation operation new Import Operation get Container Full Path structure Provider get Root structure Provider this file System Objects operation set Context get Shell boolean result execute Import Operation operation close Zip File zip File return result  importResources fileSystemObjects ZipFile zipFile getSpecifiedSourceFile ZipFileStructureProvider structureProvider getStructureProvider zipFile ImportOperation ImportOperation getContainerFullPath structureProvider getRoot structureProvider fileSystemObjects setContext getShell executeImportOperation closeZipFile zipFile
Initializes the specified operation appropriately protected void initialize Operation Import Operation op op set Overwrite Resources overwrite Existing Resources Checkbox get Selection  initializeOperation ImportOperation setOverwriteResources overwriteExistingResourcesCheckbox getSelection
Opens a file selection dialog and returns a string representing the selected file or code null code if the dialog was canceled protected String query Zip File To Import File Dialog dialog new File Dialog source Name Field get Shell SWT OPEN dialog set Filter Extensions new String FILE IMPORT MASK dialog set Text Data Transfer Messages get String Zip Import Source title NON NLS 1 String current Source String source Name Field get Text int last Separator Index current Source String last Index Of File separator if last Separator Index 1 dialog set Filter Path current Source String substring 0 last Separator Index return dialog open  queryZipFileToImport FileDialog FileDialog sourceNameField getShell setFilterExtensions FILE_IMPORT_MASK setText DataTransferMessages getString ZipImportSource currentSourceString sourceNameField getText lastSeparatorIndex currentSourceString lastIndexOf lastSeparatorIndex setFilterPath currentSourceString lastSeparatorIndex
Repopulate the view based on the currently entered directory protected void reset Selection super reset Selection set All Selections true  resetSelection resetSelection setAllSelections
Use the dialog store to restore widget values to the values that they held last time this wizard was used to completion protected void restore Widget Values I Dialog Settings settings get Dialog Settings if settings null String source Names settings get Array STORE SOURCE NAMES ID if source Names null return ie no settings stored set filenames history for int i 0 i source Names length i source Name Field add source Names i radio buttons and checkboxes overwrite Existing Resources Checkbox set Selection settings get Boolean STORE OVERWRITE EXISTING RESOURCES ID  restoreWidgetValues IDialogSettings getDialogSettings sourceNames getArray STORE_SOURCE_NAMES_ID sourceNames sourceNames sourceNameField sourceNames overwriteExistingResourcesCheckbox setSelection getBoolean STORE_OVERWRITE_EXISTING_RESOURCES_ID
Since Finish was pressed write widget values to the dialog store so that they will persist into the next invocation of this wizard page Note that this method is identical to the one that appears in the superclass This is necessary because proper overriding of instance variables is not occurring protected void save Widget Values I Dialog Settings settings get Dialog Settings if settings null update source names history String source Names settings get Array STORE SOURCE NAMES ID if source Names null source Names new String 0 source Names add To History source Names source Name Field get Text settings put STORE SOURCE NAMES ID source Names update specific types to import history String selected Types Names settings get Array STORE SELECTED TYPES ID if selected Types Names null selected Types Names new String 0 settings put STORE OVERWRITE EXISTING RESOURCES ID overwrite Existing Resources Checkbox get Selection  saveWidgetValues IDialogSettings getDialogSettings sourceNames getArray STORE_SOURCE_NAMES_ID sourceNames sourceNames sourceNames addToHistory sourceNames sourceNameField getText STORE_SOURCE_NAMES_ID sourceNames selectedTypesNames getArray STORE_SELECTED_TYPES_ID selectedTypesNames selectedTypesNames STORE_OVERWRITE_EXISTING_RESOURCES_ID overwriteExistingResourcesCheckbox getSelection
Answer a boolean indicating whether self s source specification widgets currently all contain valid values protected boolean validate Source Group If there is nothing being provided to the input then there is a problem if this current Provider null set Message SOURCE EMPTY MESSAGE enable Button Group false return false else enable Button Group true return true  validateSourceGroup currentProvider setMessage SOURCE_EMPTY_MESSAGE enableButtonGroup enableButtonGroup

private static final Stringmanifest Path meta inf Manifest mf NON NLS 1 Create an instance of this class param filename java lang String param compress boolean param include Manifest File boolean exception java io IO Exception public Zip File Exporter String filename boolean compress boolean include Manifest File throws IO Exception output Stream new Zip Output Stream new File Output Stream filename use Compression compress generate Manifest File include Manifest File if generate Manifest File manifest Contents new String Buffer manifest Magic  StringmanifestPath includeManifestFile IOException ZipFileExporter includeManifestFile IOException outputStream ZipOutputStream FileOutputStream useCompression generateManifestFile includeManifestFile generateManifestFile manifestContents StringBuffer manifestMagic
Create a new entry in the manifest file being constructed param pathname java lang String param file org eclipse core resources I File exception java io IO Exception exception org eclipse core runtime Core Exception protected void append To Manifest String pathname I File file throws IO Exception Core Exception String Buffer manifest Entry new String Buffer manifest Entry append name Label manifest Entry append pathname manifest Entry append newline manifest Entry append digests Label manifest Entry append sha Label byte file Contents null we don t have to Ensure Local because it was already done in write Input Stream content Stream file get Contents false Reader in new Input Stream Reader content Stream int chunk Size content Stream available String Buffer buffer new String Buffer chunk Size char read Buffer new char chunk Size int n in read read Buffer while n 0 buffer append read Buffer n in read read Buffer content Stream close file Contents buffer to String get Bytes try byte hash Value Message Digest get Instance SHA digest file Contents NON NLS 1 manifest Entry append Base64 Encoder encode hash Value manifest Entry append newline manifest Entry append md5 Label hash Value Message Digest get Instance MD5 digest file Contents NON NLS 1 manifest Entry append Base64 Encoder encode hash Value manifest Entry append newline newline catch No Such Algorithm Exception e should never happen return manifest Contents append manifest Entry to String  IFile IOException CoreException appendToManifest IFile IOException CoreException StringBuffer manifestEntry StringBuffer manifestEntry nameLabel manifestEntry manifestEntry manifestEntry digestsLabel manifestEntry shaLabel fileContents EnsureLocal InputStream contentStream getContents InputStreamReader contentStream chunkSize contentStream StringBuffer StringBuffer chunkSize readBuffer chunkSize readBuffer readBuffer readBuffer contentStream fileContents toString getBytes hashValue MessageDigest getInstance fileContents manifestEntry Base64Encoder hashValue manifestEntry manifestEntry md5Label hashValue MessageDigest getInstance fileContents manifestEntry Base64Encoder hashValue manifestEntry NoSuchAlgorithmException manifestContents manifestEntry toString
Do all required cleanup now that we re finished with the currently open zip exception java io IO Exception public void finished throws IO Exception if generate Manifest File write Manifest File output Stream close  IOException IOException generateManifestFile writeManifestFile outputStream
Create a new Zip Entry with the passed pathname and contents and write it to the current archive param pathname java lang String param contents byte exception java io IO Exception protected void write String pathname byte contents throws IO Exception Zip Entry new Entry new Zip Entry pathname if the contents are being compressed then we get the below for free if use Compression new Entry set Method Zip Entry STORED new Entry set Size contents length CRC32 checksum Calculator new CRC32 checksum Calculator update contents new Entry set Crc checksum Calculator get Value output Stream put Next Entry new Entry output Stream write contents output Stream close Entry  ZipEntry IOException IOException ZipEntry newEntry ZipEntry useCompression newEntry setMethod ZipEntry newEntry setSize checksumCalculator checksumCalculator newEntry setCrc checksumCalculator getValue outputStream putNextEntry newEntry outputStream outputStream closeEntry
Write the passed resource to the current archive param resource org eclipse core resources I File param destination Path java lang String exception java io IO Exception exception org eclipse core runtime Core Exception public void write I File resource String destination Path throws IO Exception Core Exception Byte Array Output Stream output null Input Stream content Stream null try output new Byte Array Output Stream content Stream resource get Contents false int chunk Size content Stream available byte read Buffer new byte chunk Size int n content Stream read read Buffer while n 0 output write read Buffer n content Stream read read Buffer finally if output null output close if content Stream null content Stream close write destination Path output to Byte Array if generate Manifest File append To Manifest destination Path resource  IFile destinationPath IOException CoreException IFile destinationPath IOException CoreException ByteArrayOutputStream InputStream contentStream ByteArrayOutputStream contentStream getContents chunkSize contentStream readBuffer chunkSize contentStream readBuffer readBuffer contentStream readBuffer contentStream contentStream destinationPath toByteArray generateManifestFile appendToManifest destinationPath
Write the constructed manifest mf file to the current archive exception java io IO Exception protected void write Manifest File throws IO Exception write manifest Path manifest Contents to String get Bytes  IOException writeManifestFile IOException manifestPath manifestContents toString getBytes

private boolean generate Manifest File false Create an instance of this class Use this constructor if you wish to export specific resources without a common parent resource param resources java util Vector param filename java lang String public Zip File Export Operation List resources String filename super Eliminate redundancies in list of resources being exported Iterator elements Enum resources iterator while elements Enum has Next I Resource current Resource I Resource elements Enum next if is Descendent resources current Resource elements Enum remove Removes current Resource resources To Export resources destination Filename filename  generateManifestFile ZipFileExportOperation elementsEnum elementsEnum hasNext IResource currentResource IResource elementsEnum isDescendent currentResource elementsEnum currentResource resourcesToExport destinationFilename
Create an instance of this class Use this constructor if you wish to recursively export a single resource param res org eclipse core resources I Resource param filename java lang String public Zip File Export Operation I Resource res String filename super resource res destination Filename filename  IResource ZipFileExportOperation IResource destinationFilename
Create an instance of this class Use this constructor if you wish to export specific resources with a common parent resource affects container directory creation param res org eclipse core resources I Resource param resources java util Vector param filename java lang String public Zip File Export Operation I Resource res List resources String filename this res filename resources To Export resources  IResource ZipFileExportOperation IResource resourcesToExport
Add a new entry to the error table with the passed information protected void add Error String message Throwable e error Table add new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH 0 message e  addError errorTable IStatus IDEWorkbenchPlugin IDE_WORKBENCH
Answer the total number of file resources that exist at or below self in the resources hierarchy return int param check Resource org eclipse core resources I Resource protected int count Children Of I Resource check Resource throws Core Exception if check Resource get Type I Resource FILE return 1 int count 0 if check Resource is Accessible I Resource children I Container check Resource members for int i 0 i children length i count count Children Of children i return count  checkResource IResource countChildrenOf IResource checkResource CoreException checkResource getType IResource checkResource isAccessible IResource IContainer checkResource countChildrenOf
Answer a boolean indicating the number of file resources that were specified for export return int protected int count Selected Resources throws Core Exception int result 0 Iterator resources resources To Export iterator while resources has Next result count Children Of I Resource resources next return result  countSelectedResources CoreException resourcesToExport hasNext countChildrenOf IResource
Export the passed resource to the destination zip Export with no path leadup param export Resource org eclipse core resources I Resource protected void export Resource I Resource export Resource throws Interrupted Exception export Resource export Resource 1  exportResource IResource exportResource IResource exportResource InterruptedException exportResource exportResource
Export the passed resource to the destination zip param export Resource org eclipse core resources I Resource param depth the number of resource levels to be included in the path including the resourse itself protected void export Resource I Resource export Resource int leadup Depth throws Interrupted Exception if export Resource is Accessible return if export Resource get Type I Resource FILE String destination Name I Path full Path export Resource get Full Path if create Leadup Structure destination Name full Path make Relative to String else destination Name full Path remove First Segments full Path segment Count leadup Depth to String monitor sub Task destination Name try exporter write I File export Resource destination Name catch IO Exception e add Error Data Transfer Messages format Data Transfer error Exporting NON NLS 1 new Object export Resource get Full Path make Relative e get Message e catch Core Exception e add Error Data Transfer Messages format Data Transfer error Exporting NON NLS 1 new Object export Resource get Full Path make Relative e get Message e monitor worked 1 Modal Context check Canceled monitor else I Resource children null try children I Container export Resource members catch Core Exception e this should never happen because an is Accessible check is done before members is invoked add Error Data Transfer Messages format Data Transfer error Exporting new Object export Resource get Full Path e NON NLS 1 for int i 0 i children length i export Resource children i leadup Depth 1  exportResource IResource exportResource IResource exportResource leadupDepth InterruptedException exportResource isAccessible exportResource getType IResource destinationName IPath fullPath exportResource getFullPath createLeadupStructure destinationName fullPath makeRelative toString destinationName fullPath removeFirstSegments fullPath segmentCount leadupDepth toString subTask destinationName IFile exportResource destinationName IOException addError DataTransferMessages DataTransfer errorExporting exportResource getFullPath makeRelative getMessage CoreException addError DataTransferMessages DataTransfer errorExporting exportResource getFullPath makeRelative getMessage ModalContext checkCanceled IResource IContainer exportResource CoreException isAccessible addError DataTransferMessages DataTransfer errorExporting exportResource getFullPath exportResource leadupDepth
Export the resources contained in the previously defined resources To Export collection protected void export Specified Resources throws Interrupted Exception Iterator resources resources To Export iterator while resources has Next I Resource current Resource I Resource resources next export Resource current Resource  resourcesToExport exportSpecifiedResources InterruptedException resourcesToExport hasNext IResource currentResource IResource exportResource currentResource
Answer the error table return Vector of I Status public List get Result return error Table  IStatus getResult errorTable
Returns the status of the operation If there were any errors the result is a status object containing individual status objects for each error If there were no errors the result is a status object with error code code OK code return the status public I Status get Status I Status errors new I Status error Table size error Table to Array errors return new Multi Status IDE Workbench Plugin IDE WORKBENCH I Status OK errors Data Transfer Messages get String File System Export Operation problems Exporting NON NLS 1 null  IStatus getStatus IStatus IStatus errorTable errorTable toArray MultiStatus IDEWorkbenchPlugin IDE_WORKBENCH IStatus DataTransferMessages getString FileSystemExportOperation problemsExporting
Initialize this operation exception java io IO Exception protected void initialize throws IO Exception exporter new Zip File Exporter destination Filename use Compression generate Manifest File  IOException IOException ZipFileExporter destinationFilename useCompression generateManifestFile
Answer a boolean indicating whether the passed child is a descendent of one or more members of the passed resources collection return boolean param resources java util Vector param child org eclipse core resources I Resource protected boolean is Descendent List resources I Resource child if child get Type I Resource PROJECT return false I Resource parent child get Parent if resources contains parent return true return is Descendent resources parent  IResource isDescendent IResource getType IResource IResource getParent isDescendent
Export the resources that were previously specified for export or if a single resource was specified then export it recursively public void run I Progress Monitor progress Monitor throws Invocation Target Exception Interrupted Exception this monitor progress Monitor try initialize catch IO Exception e throw new Invocation Target Exception e Data Transfer Messages format Zip Export cannot Open new Object e get Message NON NLS 1 try ie a single resource for recursive export was specified int total Work I Progress Monitor UNKNOWN try if resources To Export null total Work count Children Of resource else total Work count Selected Resources catch Core Exception e Should not happen monitor begin Task Data Transfer Messages get String Data Transfer exporting Title total Work NON NLS 1 if resources To Export null export Resource resource else ie a list of specific resources to export was specified export Specified Resources try exporter finished catch IO Exception e throw new Invocation Target Exception e Data Transfer Messages format Zip Export cannot Close new Object e get Message NON NLS 1 finally monitor done  IProgressMonitor progressMonitor InvocationTargetException InterruptedException progressMonitor IOException InvocationTargetException DataTransferMessages ZipExport cannotOpen getMessage totalWork IProgressMonitor resourcesToExport totalWork countChildrenOf totalWork countSelectedResources CoreException beginTask DataTransferMessages getString DataTransfer exportingTitle totalWork resourcesToExport exportResource exportSpecifiedResources IOException InvocationTargetException DataTransferMessages ZipExport cannotClose getMessage
Set this boolean indicating whether each exported resource s path should include containment hierarchies as dictated by its parents param value boolean public void set Create Leadup Structure boolean value create Leadup Structure value  setCreateLeadupStructure createLeadupStructure
Set this boolean indicating whether a manifest mf file based upon the exported contents should be created and included in the final archive param value boolean public void set Generate Manifest File boolean value generate Manifest File value  setGenerateManifestFile generateManifestFile
Set this boolean indicating whether exported resources should be compressed as opposed to simply being stored param value boolean public void set Use Compression boolean value use Compression value  setUseCompression useCompression

private Wizard Zip File Resource Export Page1 main Page Creates a wizard for exporting workspace resources to a zip file public Zip File Export Wizard AbstractUI Plugin plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID I Dialog Settings workbench Settings plugin get Dialog Settings I Dialog Settings section workbench Settings get Section Zip File Export Wizard NON NLS 1 if section null section workbench Settings add New Section Zip File Export Wizard NON NLS 1 set Dialog Settings section  WizardZipFileResourceExportPage1 mainPage ZipFileExportWizard AbstractUIPlugin AbstractUIPlugin getPlugin PLUGIN_ID IDialogSettings workbenchSettings getDialogSettings IDialogSettings workbenchSettings getSection ZipFileExportWizard workbenchSettings addNewSection ZipFileExportWizard setDialogSettings
public void add Pages super add Pages main Page new Wizard Zip File Resource Export Page1 selection add Page main Page  addPages addPages mainPage WizardZipFileResourceExportPage1 addPage mainPage
Returns the image descriptor with the given relative path private Image Descriptor get Image Descriptor String relative Path String icon Path icons full NON NLS 1 try AbstractUI Plugin plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID URL installURL plugin get Descriptor get InstallURL URL url new URL installURL icon Path relative Path return Image Descriptor create FromURL url catch MalformedURL Exception e Should not happen return null  ImageDescriptor getImageDescriptor relativePath iconPath AbstractUIPlugin AbstractUIPlugin getPlugin PLUGIN_ID getDescriptor getInstallURL iconPath relativePath ImageDescriptor createFromURL MalformedURLException
public void init I Workbench workbench I Structured Selection current Selection this selection current Selection List selected Resources IDE compute Selected Resources current Selection if selected Resources is Empty this selection new Structured Selection selected Resources set Window Title Data Transfer Messages get String Data Transfer export NON NLS 1 set Default Page Image Descriptor get Image Descriptor wizban exportzip wiz gif NON NLS 1 set Needs Progress Monitor true  IWorkbench IStructuredSelection currentSelection currentSelection selectedResources computeSelectedResources currentSelection selectedResources isEmpty StructuredSelection selectedResources setWindowTitle DataTransferMessages getString DataTransfer setDefaultPageImageDescriptor getImageDescriptor exportzip_wiz setNeedsProgressMonitor
Method declared on I Wizard public boolean perform Finish return main Page finish  IWizard performFinish mainPage

private Wizard Zip File Resource Import Page1 main Page Creates a wizard for importing resources into the workspace from a zip file public Zip File Import Wizard AbstractUI Plugin plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID I Dialog Settings workbench Settings plugin get Dialog Settings I Dialog Settings section workbench Settings get Section Zip File Import Wizard NON NLS 1 if section null section workbench Settings add New Section Zip File Import Wizard NON NLS 1 set Dialog Settings section  WizardZipFileResourceImportPage1 mainPage ZipFileImportWizard AbstractUIPlugin AbstractUIPlugin getPlugin PLUGIN_ID IDialogSettings workbenchSettings getDialogSettings IDialogSettings workbenchSettings getSection ZipFileImportWizard workbenchSettings addNewSection ZipFileImportWizard setDialogSettings
public void add Pages super add Pages main Page new Wizard Zip File Resource Import Page1 workbench selection add Page main Page  addPages addPages mainPage WizardZipFileResourceImportPage1 addPage mainPage
Returns the image descriptor with the given relative path private Image Descriptor get Image Descriptor String relative Path String icon Path icons full NON NLS 1 try AbstractUI Plugin plugin AbstractUI Plugin Platform get Plugin PlatformUI PLUGIN ID URL installURL plugin get Descriptor get InstallURL URL url new URL installURL icon Path relative Path return Image Descriptor create FromURL url catch MalformedURL Exception e Should not happen return null  ImageDescriptor getImageDescriptor relativePath iconPath AbstractUIPlugin AbstractUIPlugin getPlugin PLUGIN_ID getDescriptor getInstallURL iconPath relativePath ImageDescriptor createFromURL MalformedURLException
public void init I Workbench workbench I Structured Selection current Selection this workbench workbench this selection current Selection List selected Resources IDE compute Selected Resources current Selection if selected Resources is Empty this selection new Structured Selection selected Resources set Window Title Data Transfer Messages get String Data Transfer import Title NON NLS 1 set Default Page Image Descriptor get Image Descriptor wizban importzip wiz gif NON NLS 1 set Needs Progress Monitor true  IWorkbench IStructuredSelection currentSelection currentSelection selectedResources computeSelectedResources currentSelection selectedResources isEmpty StructuredSelection selectedResources setWindowTitle DataTransferMessages getString DataTransfer importTitle setDefaultPageImageDescriptor getImageDescriptor importzip_wiz setNeedsProgressMonitor
Method declared on I Wizard public boolean perform Cancel return main Page cancel  IWizard performCancel mainPage
Method declared on I Wizard public boolean perform Finish return main Page finish  IWizard performFinish mainPage

private Map directory Entry Cache new Hash Map Creates a code Zip File Structure Provider code which will operate on the passed zip file public Zip File Structure Provider Zip File source File super zip File source File  directoryEntryCache HashMap ZipFileStructureProvider ZipFileStructureProvider ZipFile sourceFile zipFile sourceFile
Adds the specified child to the internal collection of the parent s children protected void add To Children Zip Entry parent Zip Entry child List child List List children get parent if child List null child List new Array List children put parent child List child List add child  addToChildren ZipEntry ZipEntry childList childList childList ArrayList childList childList
Creates a new container zip entry with the specified name iff it has not already been created protected void create Container I Path pathname if directory Entry Cache contains Key pathname return Zip Entry parent if pathname segment Count 1 parent root else parent Zip Entry directory Entry Cache get pathname remove Last Segments 1 Zip Entry new Entry new Zip Entry pathname to String directory Entry Cache put pathname new Entry add To Children parent new Entry  createContainer IPath directoryEntryCache containsKey ZipEntry segmentCount ZipEntry directoryEntryCache removeLastSegments ZipEntry newEntry ZipEntry toString directoryEntryCache newEntry addToChildren newEntry
Creates a new file zip entry with the specified name protected void create File Zip Entry entry I Path pathname new Path entry get Name Zip Entry parent if pathname segment Count 1 parent root else parent Zip Entry directory Entry Cache get pathname remove Last Segments 1 add To Children parent entry  createFile ZipEntry IPath getName ZipEntry segmentCount ZipEntry directoryEntryCache removeLastSegments addToChildren
public List get Children Object element if children null initialize return List children get element  getChildren
public Input Stream get Contents Object element try return zip File get Input Stream Zip Entry element catch IO Exception e return null  InputStream getContents zipFile getInputStream ZipEntry IOException
Method declared on I Import Structure Provider public String get Full Path Object element return Zip Entry element get Name  IImportStructureProvider getFullPath ZipEntry getName
public String get Label Object element if element equals root return Zip Entry element get Name return new Path Zip Entry element get Name last Segment  getLabel ZipEntry getName ZipEntry getName lastSegment
Returns the entry that this importer uses as the root sentinel return java util zip Zip Entry public Zip Entry get Root return root  ZipEntry ZipEntry getRoot
Returns the zip file that this provider provides structure for public Zip File get Zip File return zip File  ZipFile getZipFile zipFile
Initializes this object s children table based on the contents of the specified source file protected void initialize children new Hash Map 1000 Enumeration entries zip File entries while entries has More Elements Zip Entry entry Zip Entry entries next Element if entry is Directory I Path path new Path entry get Name add Trailing Separator int path Segment Count path segment Count for int i 1 i path Segment Count i create Container path upto Segment i create File entry  HashMap zipFile hasMoreElements ZipEntry ZipEntry nextElement isDirectory IPath getName addTrailingSeparator pathSegmentCount segmentCount pathSegmentCount createContainer uptoSegment createFile
Method declared on I Import Structure Provider public boolean is Folder Object element return Zip Entry element is Directory  IImportStructureProvider isFolder ZipEntry isDirectory

private Wizard New File Creation Page main Page Creates a wizard for creating a new file resource in the workspace public Basic New File Resource Wizard super  WizardNewFileCreationPage mainPage BasicNewFileResourceWizard
public void add Pages super add Pages main Page new Wizard New File Creation Page new File Page1 get Selection NON NLS 1 main Page set Title Resource Messages get String File Resource page Title NON NLS 1 main Page set Description Resource Messages get String File Resource description NON NLS 1 add Page main Page  addPages addPages mainPage WizardNewFileCreationPage newFilePage1 getSelection mainPage setTitle ResourceMessages getString FileResource pageTitle mainPage setDescription ResourceMessages getString FileResource addPage mainPage
public void init I Workbench workbench I Structured Selection current Selection super init workbench current Selection set Window Title Resource Messages get String File Resource shell Title NON NLS 1 set Needs Progress Monitor true  IWorkbench IStructuredSelection currentSelection currentSelection setWindowTitle ResourceMessages getString FileResource shellTitle setNeedsProgressMonitor
protected void initialize Default Page Image Descriptor String icon Path icons full NON NLS 1 try URL installURL Platform get Plugin PlatformUI PLUGIN ID get Descriptor get InstallURL URL url new URL installURL icon Path wizban newfile wiz gif NON NLS 1 Image Descriptor desc Image Descriptor create FromURL url set Default Page Image Descriptor desc catch MalformedURL Exception e Should not happen Ignore  initializeDefaultPageImageDescriptor iconPath getPlugin PLUGIN_ID getDescriptor getInstallURL iconPath newfile_wiz ImageDescriptor ImageDescriptor createFromURL setDefaultPageImageDescriptor MalformedURLException
public boolean perform Finish I File file main Page create New File if file null return false select And Reveal file Open editor on new file I Workbench Window dw get Workbench get Active Workbench Window try if dw null I Workbench Page page dw get Active Page if page null IDE open Editor page file true catch Part Init Exception e Dialog Util open Error dw get Shell Resource Messages get String File Resource error Message NON NLS 1 e get Message e return true  performFinish IFile mainPage createNewFile selectAndReveal IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IWorkbenchPage getActivePage openEditor PartInitException DialogUtil openError getShell ResourceMessages getString FileResource errorMessage getMessage

private Wizard New Folder Main Page main Page Creates a wizard for creating a new folder resource in the workspace public Basic New Folder Resource Wizard super  WizardNewFolderMainPage mainPage BasicNewFolderResourceWizard
public void add Pages super add Pages main Page new Wizard New Folder Main Page Resource Messages get String New Folder text get Selection NON NLS 1 add Page main Page  addPages addPages mainPage WizardNewFolderMainPage ResourceMessages getString NewFolder getSelection addPage mainPage
public void init I Workbench workbench I Structured Selection current Selection super init workbench current Selection set Window Title Resource Messages get String New Folder title NON NLS 1 set Needs Progress Monitor true  IWorkbench IStructuredSelection currentSelection currentSelection setWindowTitle ResourceMessages getString NewFolder setNeedsProgressMonitor
protected void initialize Default Page Image Descriptor String icon Path icons full NON NLS 1 try URL installURL Platform get Plugin PlatformUI PLUGIN ID get Descriptor get InstallURL URL url new URL installURL icon Path wizban newfolder wiz gif NON NLS 1 Image Descriptor desc Image Descriptor create FromURL url set Default Page Image Descriptor desc catch MalformedURL Exception e Should not happen Ignore  initializeDefaultPageImageDescriptor iconPath getPlugin PLUGIN_ID getDescriptor getInstallURL iconPath newfolder_wiz ImageDescriptor ImageDescriptor createFromURL setDefaultPageImageDescriptor MalformedURLException
public boolean perform Finish I Folder folder main Page create New Folder if folder null return false select And Reveal folder return true  performFinish IFolder mainPage createNewFolder selectAndReveal

Creates a wizard for creating a new project resource in the workspace public Basic New Project Resource Wizard I Dialog Settings workbench Settings IDE Workbench Plugin get Default get Dialog Settings I Dialog Settings section workbench Settings get Section Basic New Project Resource Wizard NON NLS 1 if section null section workbench Settings add New Section Basic New Project Resource Wizard NON NLS 1 set Dialog Settings section  BasicNewProjectResourceWizard IDialogSettings workbenchSettings IDEWorkbenchPlugin getDefault getDialogSettings IDialogSettings workbenchSettings getSection BasicNewProjectResourceWizard workbenchSettings addNewSection BasicNewProjectResourceWizard setDialogSettings
public void add Pages super add Pages main Page new Wizard New Project Creation Page basic New Project Page NON NLS 1 main Page set Title Resource Messages get String New Project title NON NLS 1 main Page set Description Resource Messages get String New Project description NON NLS 1 this add Page main Page only add page if there are already projects in the workspace if Resources Plugin get Workspace get Root get Projects length 0 reference Page new Wizard New Project Reference Page basic Reference Project Page NON NLS 1 reference Page set Title Resource Messages get String New Project reference Title NON NLS 1 reference Page set Description Resource Messages get String New Project reference Description NON NLS 1 this add Page reference Page  addPages addPages mainPage WizardNewProjectCreationPage basicNewProjectPage mainPage setTitle ResourceMessages getString NewProject mainPage setDescription ResourceMessages getString NewProject addPage mainPage ResourcesPlugin getWorkspace getRoot getProjects referencePage WizardNewProjectReferencePage basicReferenceProjectPage referencePage setTitle ResourceMessages getString NewProject referenceTitle referencePage setDescription ResourceMessages getString NewProject referenceDescription addPage referencePage
create the new project operation Workspace Modify Operation op new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception create Project description new Project Handle monitor  WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException createProject newProjectHandle
Creates a new project resource with the selected name p In normal usage this method is invoked after the user has pressed Finish on the wizard the enablement of the Finish button implies that all controls on the pages currently contain valid values p p Note that this wizard caches the new project once it has been successfully created subsequent invocations of this method will answer the same project resource without attempting to create it again p return the created project resource or code null code if the project was not created private I Project create New Project if new Project null return new Project get a project handle final I Project new Project Handle main Page get Project Handle get a project descriptor I Path new Path null if main Page use Defaults new Path main Page get Location Path I Workspace workspace Resources Plugin get Workspace final I Project Description description workspace new Project Description new Project Handle get Name description set Location new Path update the referenced project if provided if reference Page null I Project ref Projects reference Page get Referenced Projects if ref Projects length 0 description set Referenced Projects ref Projects create the new project operation Workspace Modify Operation op new Workspace Modify Operation protected void execute I Progress Monitor monitor throws Core Exception create Project description new Project Handle monitor run the new project creation operation try get Container run true true op catch Interrupted Exception e return null catch Invocation Target Exception e ie one of the steps resulted in a core exception Throwable t e get Target Exception if t instanceof Core Exception if Core Exception t get Status get Code I Resource Status CASE VARIANT EXISTS Message Dialog open Error get Shell Resource Messages get String New Project error Message NON NLS 1 Resource Messages format New Project case Variant Exists Error new String new Project Handle get Name NON NLS 1 else Error Dialog open Error get Shell Resource Messages get String New Project error Message NON NLS 1 null no special message Core Exception t get Status else Core Exceptions are handled above but unexpected runtime exceptions and errors may still occur IDE Workbench Plugin get Default get Log log new Status I Status ERROR IDE Workbench Plugin IDE WORKBENCH 0 t to String t Message Dialog open Error get Shell Resource Messages get String New Project error Message NON NLS 1 Resource Messages format New Project internal Error new Object t get Message NON NLS 1 return null new Project new Project Handle return new Project  IProject createNewProject newProject newProject IProject newProjectHandle mainPage getProjectHandle IPath newPath mainPage useDefaults newPath mainPage getLocationPath IWorkspace ResourcesPlugin getWorkspace IProjectDescription newProjectDescription newProjectHandle getName setLocation newPath referencePage IProject refProjects referencePage getReferencedProjects refProjects setReferencedProjects refProjects WorkspaceModifyOperation WorkspaceModifyOperation IProgressMonitor CoreException createProject newProjectHandle getContainer InterruptedException InvocationTargetException getTargetException CoreException CoreException getStatus getCode IResourceStatus CASE_VARIANT_EXISTS MessageDialog openError getShell ResourceMessages getString NewProject errorMessage ResourceMessages NewProject caseVariantExistsError newProjectHandle getName ErrorDialog openError getShell ResourceMessages getString NewProject errorMessage CoreException getStatus CoreExceptions IDEWorkbenchPlugin getDefault getLog IStatus IDEWorkbenchPlugin IDE_WORKBENCH toString MessageDialog openError getShell ResourceMessages getString NewProject errorMessage ResourceMessages NewProject internalError getMessage newProject newProjectHandle newProject
Creates a project resource given the project handle and description param description the project description to create a project resource for param project Handle the project handle to create a project resource for param monitor the progress monitor to show visual progress with exception Core Exception if the operation fails exception Operation Canceled Exception if the operation is canceled void create Project I Project Description description I Project project Handle I Progress Monitor monitor throws Core Exception Operation Canceled Exception try monitor begin Task 2000 NON NLS 1 project Handle create description new Sub Progress Monitor monitor 1000 if monitor is Canceled throw new Operation Canceled Exception project Handle open new Sub Progress Monitor monitor 1000 finally monitor done  projectHandle CoreException OperationCanceledException createProject IProjectDescription IProject projectHandle IProgressMonitor CoreException OperationCanceledException beginTask projectHandle SubProgressMonitor isCanceled OperationCanceledException projectHandle SubProgressMonitor
Returns the newly created project return the created project or code null code if project not created public I Project get New Project return new Project  IProject getNewProject newProject
public void init I Workbench workbench I Structured Selection current Selection super init workbench current Selection set Needs Progress Monitor true set Window Title Resource Messages get String New Project window Title NON NLS 1  IWorkbench IStructuredSelection currentSelection currentSelection setNeedsProgressMonitor setWindowTitle ResourceMessages getString NewProject windowTitle
protected void initialize Default Page Image Descriptor String icon Path icons full NON NLS 1 try URL installURL IDE Workbench Plugin get Default get Descriptor get InstallURL URL url new URL installURL icon Path wizban newprj wiz gif NON NLS 1 Image Descriptor desc Image Descriptor create FromURL url set Default Page Image Descriptor desc catch MalformedURL Exception e Should not happen Ignore  initializeDefaultPageImageDescriptor iconPath IDEWorkbenchPlugin getDefault getDescriptor getInstallURL iconPath newprj_wiz ImageDescriptor ImageDescriptor createFromURL setDefaultPageImageDescriptor MalformedURLException
private static void open In New Window I Perspective Descriptor desc Open the page try PlatformUI get Workbench open Workbench Window desc get Id Resources Plugin get Workspace get Root catch Workbench Exception e I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null Error Dialog open Error window get Shell WINDOW PROBLEMS TITLE e get Message e get Status  openInNewWindow IPerspectiveDescriptor getWorkbench openWorkbenchWindow getId ResourcesPlugin getWorkspace getRoot WorkbenchException IWorkbenchWindow getWorkbench getActiveWorkbenchWindow ErrorDialog openError getShell WINDOW_PROBLEMS_TITLE getMessage getStatus
public boolean perform Finish create New Project if new Project null return false update Perspective select And Reveal new Project return true  performFinish createNewProject newProject updatePerspective selectAndReveal newProject
private static void replace Current Perspective I Perspective Descriptor persp Get the active page I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null return I Workbench Page page window get Active Page if page null return Set the perspective page set Perspective persp  replaceCurrentPerspective IPerspectiveDescriptor IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IWorkbenchPage getActivePage setPerspective
Stores the configuration element for the wizard The config element will be used in code perform Finish code to set the result perspective public void set Initialization Data I Configuration Element cfig String property Name Object data config Element cfig  performFinish setInitializationData IConfigurationElement propertyName configElement
Updates the perspective for the active page within the window protected void update Perspective update Perspective config Element  updatePerspective updatePerspective configElement
Updates the perspective based on the current settings in the Workbench Perspectives preference page Use the setting for the new perspective opening if we are set to open in a new perspective p A new project wizard class will need to implement the code I Executable Extension code interface so as to gain access to the wizard s code I Configuration Element code That is the configuration element to pass into this method p param config Element the element we are updating with see I Preference Constants OPM NEW WINDOW see I Preference Constants OPM ACTIVE PAGE see I Workbench Preference Constants NO NEW PERSPECTIVE public static void update Perspective I Configuration Element config Element Do not change perspective if the configuration element is not specified if config Element null return Retrieve the new project open perspective preference setting String persp Setting Pref Util getAPI Preference Store get String IDE Preferences PROJECT OPEN NEW PERSPECTIVE String prompt Setting IDE Workbench Plugin get Default get Preference Store get String IDE Internal Preferences PROJECT SWITCH PERSP MODE Return if do not switch perspective setting and are not prompting if prompt Setting equals Message Dialog With Toggle PROMPT persp Setting equals I Workbench Preference Constants NO NEW PERSPECTIVE return Read the requested perspective id to be opened String final Persp Id config Element get Attribute FINAL PERSPECTIVE if final Persp Id null return Map perspective id to descriptor I Perspective Registry reg PlatformUI get Workbench get Perspective Registry leave this code in the perspective of a given project may map to activities other than those that the wizard itself maps to I Perspective Descriptor final Persp reg find Perspective With Id final Persp Id if final Persp null final Persp instanceof I Plugin Contribution I Plugin Contribution contribution I Plugin Contribution final Persp if contribution get Plugin Id null I Workbench Activity Support workbench Activity Support PlatformUI get Workbench get Activity Support I Activity Manager activity Manager workbench Activity Support get Activity Manager I Identifier identifier activity Manager get Identifier Workbench Activity Helper create Unified Id contribution Set id Activities identifier get Activity Ids if id Activities is Empty Set enabled Ids new Hash Set activity Manager get Enabled Activity Ids if enabled Ids add All id Activities workbench Activity Support set Enabled Activity Ids enabled Ids else IDE Workbench Plugin log Unable to find persective NON NLS 1 final Persp Id in Basic New Project Resource Wizard update Perspective NON NLS 1 return gather the preferred perspectives always consider the final perspective and those derived from it to be preferred Array List preferred Persp Ids new Array List add Perspective And Descendants preferred Persp Ids final Persp Id String preferred config Element get Attribute PREFERRED PERSPECTIVES if preferred null String Tokenizer tok new String Tokenizer preferred t n r f NON NLS 1 while tok has More Tokens add Perspective And Descendants preferred Persp Ids tok next Token I Workbench Window window PlatformUI get Workbench get Active Workbench Window if window null I Workbench Page page window get Active Page if page null I Perspective Descriptor current Persp page get Perspective don t switch if the current perspective is a preferred perspective if current Persp null preferred Persp Ids contains current Persp get Id return prompt the user to switch if confirm Perspective Switch window final Persp return int workbench Perspective Setting Workbench Plugin get Default get Preference Store get Int I Preference Constants OPEN PERSP MODE open perspective in new window setting if workbench Perspective Setting I Preference Constants OPM NEW WINDOW open In New Window final Persp return replace active perspective setting otherwise replace Current Perspective final Persp  IExecutableExtension IConfigurationElement configElement IPreferenceConstants OPM_NEW_WINDOW IPreferenceConstants OPM_ACTIVE_PAGE IWorkbenchPreferenceConstants NO_NEW_PERSPECTIVE updatePerspective IConfigurationElement configElement configElement perspSetting PrefUtil getAPIPreferenceStore getString PROJECT_OPEN_NEW_PERSPECTIVE promptSetting IDEWorkbenchPlugin getDefault getPreferenceStore getString IDEInternalPreferences PROJECT_SWITCH_PERSP_MODE promptSetting MessageDialogWithToggle perspSetting IWorkbenchPreferenceConstants NO_NEW_PERSPECTIVE finalPerspId configElement getAttribute FINAL_PERSPECTIVE finalPerspId IPerspectiveRegistry getWorkbench getPerspectiveRegistry IPerspectiveDescriptor finalPersp findPerspectiveWithId finalPerspId finalPersp finalPersp IPluginContribution IPluginContribution IPluginContribution finalPersp getPluginId IWorkbenchActivitySupport workbenchActivitySupport getWorkbench getActivitySupport IActivityManager activityManager workbenchActivitySupport getActivityManager IIdentifier activityManager getIdentifier WorkbenchActivityHelper createUnifiedId idActivities getActivityIds idActivities isEmpty enabledIds HashSet activityManager getEnabledActivityIds enabledIds addAll idActivities workbenchActivitySupport setEnabledActivityIds enabledIds IDEWorkbenchPlugin finalPerspId BasicNewProjectResourceWizard updatePerspective ArrayList preferredPerspIds ArrayList addPerspectiveAndDescendants preferredPerspIds finalPerspId configElement getAttribute PREFERRED_PERSPECTIVES StringTokenizer StringTokenizer hasMoreTokens addPerspectiveAndDescendants preferredPerspIds nextToken IWorkbenchWindow getWorkbench getActiveWorkbenchWindow IWorkbenchPage getActivePage IPerspectiveDescriptor currentPersp getPerspective currentPersp preferredPerspIds currentPersp getId confirmPerspectiveSwitch finalPersp workbenchPerspectiveSetting WorkbenchPlugin getDefault getPreferenceStore getInt IPreferenceConstants OPEN_PERSP_MODE workbenchPerspectiveSetting IPreferenceConstants OPM_NEW_WINDOW openInNewWindow finalPersp replaceCurrentPerspective finalPersp
Adds to the list all perspective I Ds in the Workbench who s original ID matches the given ID param perspective Ids the list of perspective I Ds to supplement param id the id to query since 3 0 private static void add Perspective And Descendants List perspective Ids String id I Perspective Registry registry PlatformUI get Workbench get Perspective Registry I Perspective Descriptor perspectives registry get Perspectives for int i 0 i perspectives length i issue illegal ref to workbench internal class consider adding get Original Id as API on I Perspective Descriptor Perspective Descriptor descriptor Perspective Descriptor perspectives i if descriptor get Original Id equals id perspective Ids add descriptor get Id  IDs perspectiveIds IDs addPerspectiveAndDescendants perspectiveIds IPerspectiveRegistry getWorkbench getPerspectiveRegistry IPerspectiveDescriptor getPerspectives getOriginalId IPerspectiveDescriptor PerspectiveDescriptor PerspectiveDescriptor getOriginalId perspectiveIds getId
Prompts the user for whether to switch perspectives param window The workbench window in which to switch perspectives must not be code null code param final Persp The perspective to switch to must not be code null code return code true code if it s OK to switch code false code otherwise private static boolean confirm Perspective Switch I Workbench Window window I Perspective Descriptor final Persp I Preference Store store IDE Workbench Plugin get Default get Preference Store String pspm store get String IDE Internal Preferences PROJECT SWITCH PERSP MODE if IDE Internal Preferences PSPM PROMPT equals pspm Return whether or not we should always switch return IDE Internal Preferences PSPM ALWAYS equals pspm Message Dialog With Toggle dialog Message Dialog With Toggle open Yes No Question window get Shell Resource Messages get String New Project persp Switch Title NON NLS 1 Resource Messages format New Project persp Switch Message NON NLS 1 new Object final Persp get Label null use the default message for the toggle false toggle is initially unchecked store IDE Internal Preferences PROJECT SWITCH PERSP MODE int result dialog get Return Code If we are not going to prompt anymore propogate the choice if dialog get Toggle State String preference Value if result I Dialog Constants YES ID Doesn t matter if it is replace or new window as we are going to use the open perspective setting preference Value I Workbench Preference Constants OPEN PERSPECTIVE REPLACE else preference Value I Workbench Preference Constants NO NEW PERSPECTIVE update PROJECT OPEN NEW PERSPECTIVE to correspond Pref Util getAPI Preference Store set Value IDE Preferences PROJECT OPEN NEW PERSPECTIVE preference Value return result I Dialog Constants YES ID  finalPersp confirmPerspectiveSwitch IWorkbenchWindow IPerspectiveDescriptor finalPersp IPreferenceStore IDEWorkbenchPlugin getDefault getPreferenceStore getString IDEInternalPreferences PROJECT_SWITCH_PERSP_MODE IDEInternalPreferences PSPM_PROMPT IDEInternalPreferences PSPM_ALWAYS MessageDialogWithToggle MessageDialogWithToggle openYesNoQuestion getShell ResourceMessages getString NewProject perspSwitchTitle ResourceMessages NewProject perspSwitchMessage finalPersp getLabel IDEInternalPreferences PROJECT_SWITCH_PERSP_MODE getReturnCode getToggleState preferenceValue IDialogConstants YES_ID preferenceValue IWorkbenchPreferenceConstants OPEN_PERSPECTIVE_REPLACE preferenceValue IWorkbenchPreferenceConstants NO_NEW_PERSPECTIVE PROJECT_OPEN_NEW_PERSPECTIVE PrefUtil getAPIPreferenceStore setValue PROJECT_OPEN_NEW_PERSPECTIVE preferenceValue IDialogConstants YES_ID

protected I Structured Selection selection Creates an empty wizard for creating a new resource in the workspace protected Basic New Resource Wizard super  IStructuredSelection BasicNewResourceWizard
Returns the selection which was passed to code init code return the selection public I Structured Selection get Selection return selection  IStructuredSelection getSelection
Returns the workbench which was passed to code init code return the workbench public I Workbench get Workbench return workbench  IWorkbench getWorkbench
The code Basic New Resource Wizard code implementation of this code I Workbench Wizard code method records the given workbench and selection and initializes the default banner image for the pages by calling code initialize Default Page Image Descriptor code Subclasses may extend public void init I Workbench workbench I Structured Selection current Selection this workbench workbench this selection current Selection initialize Default Page Image Descriptor  BasicNewResourceWizard IWorkbenchWizard initializeDefaultPageImageDescriptor IWorkbench IStructuredSelection currentSelection currentSelection initializeDefaultPageImageDescriptor
Initializes the default page image descriptor to an appropriate banner By calling code set Default Page Image Descriptor code The default implementation of this method uses a generic new wizard image p Subclasses may reimplement p protected void initialize Default Page Image Descriptor String icon Path icons full NON NLS 1 try URL installURL Platform get Plugin PlatformUI PLUGIN ID get Descriptor get InstallURL URL url new URL installURL icon Path wizban new wiz gif NON NLS 1 Image Descriptor desc Image Descriptor create FromURL url set Default Page Image Descriptor desc catch MalformedURL Exception e Should not happen Ignore  setDefaultPageImageDescriptor initializeDefaultPageImageDescriptor iconPath getPlugin PLUGIN_ID getDescriptor getInstallURL iconPath new_wiz ImageDescriptor ImageDescriptor createFromURL setDefaultPageImageDescriptor MalformedURLException
Selects and reveals the newly added resource in all parts of the active workbench window s active page see I Set Selection Target protected void select And Reveal I Resource new Resource select And Reveal new Resource get Workbench get Active Workbench Window  ISetSelectionTarget selectAndReveal IResource newResource selectAndReveal newResource getWorkbench getActiveWorkbenchWindow
Attempts to select and reveal the specified resource in all parts within the supplied workbench window s active page p Checks all parts in the active page to see if they implement code I Set Selection Target code either directly or as an adapter If so tells the part to select and reveal the specified resource p param resource the resource to be selected and revealed param window the workbench window to select and reveal the resource see I Set Selection Target public static void select And Reveal I Resource resource I Workbench Window window validate the input if window null resource null return I Workbench Page page window get Active Page if page null return get all the view and editor parts List parts new Array List I Workbench Part Reference refs page get View References for int i 0 i refs length i I Workbench Part part refs i get Part false if part null parts add part refs page get Editor References for int i 0 i refs length i if refs i get Part false null parts add refs i get Part false final I Selection selection new Structured Selection resource Iterator enum parts iterator while enum has Next I Workbench Part part I Workbench Part enum next get the part s I Set Selection Target implementation I Set Selection Target target null if part instanceof I Set Selection Target target I Set Selection Target part else target I Set Selection Target part get Adapter I Set Selection Target class if target null select and reveal resource final I Set Selection Target final Target target window get Shell get Display async Exec new Runnable public void run final Target select Reveal selection  ISetSelectionTarget ISetSelectionTarget selectAndReveal IResource IWorkbenchWindow IWorkbenchPage getActivePage ArrayList IWorkbenchPartReference getViewReferences IWorkbenchPart getPart getEditorReferences getPart getPart ISelection StructuredSelection hasNext IWorkbenchPart IWorkbenchPart ISetSelectionTarget ISetSelectionTarget ISetSelectionTarget ISetSelectionTarget ISetSelectionTarget getAdapter ISetSelectionTarget ISetSelectionTarget finalTarget getShell getDisplay asyncExec finalTarget selectReveal

private static Resource Bundle bundle Resource Bundle get Bundle RESOURCE BUNDLE private Resource Messages prevent instantiation of class  ResourceBundle ResourceBundle getBundle RESOURCE_BUNDLE ResourceMessages
Returns the formatted message for the given key in the 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  MessageFormat getString
Returns the resource object with the given key in the 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  getString getString MissingResourceException

public class Workbench Exception extends Core Exception Creates a new exception with the given message param message the message public Workbench Exception String message this new Status I Status ERROR PlatformUI PLUGIN ID 0 message null  WorkbenchException CoreException WorkbenchException IStatus PLUGIN_ID
Creates a new exception with the given message param message the message param nested Exception an exception to be wrapped by this Workbench Exception public Workbench Exception String message Throwable nested Exception this new Status I Status ERROR PlatformUI PLUGIN ID 0 message nested Exception  nestedException WorkbenchException WorkbenchException nestedException IStatus PLUGIN_ID nestedException
Creates a new exception with the given status object The message of the given status is used as the exception message param status the status object to be associated with this exception public Workbench Exception I Status status super status  WorkbenchException IStatus

Creates a code Document code from the code Reader code and returns a memento on the first code Element code for reading the document p Same as calling create Read Root reader null p param reader the code Reader code used to create the memento s document return a memento on the first code Element code for reading the document throws code Workbench Exception code if IO problems invalid format or no element public static XML Memento create Read Root Reader reader throws Workbench Exception return create Read Root reader null  createReadRoot WorkbenchException XMLMemento createReadRoot WorkbenchException createReadRoot
Creates a code Document code from the code Reader code and returns a memento on the first code Element code for reading the document param reader the code Reader code used to create the memento s document param base Dir the directory used to resolve relative file names in the XML document This directory must exist and include the trailing separator The directory format including the separators must be valid for the platform Can be code null code if not needed return a memento on the first code Element code for reading the document throws code Workbench Exception code if IO problems invalid format or no element public static XML Memento create Read Root Reader reader String base Dir throws Workbench Exception String error Message null Exception exception null try Document Builder Factory factory Document Builder Factory new Instance Document Builder parser factory new Document Builder Input Source source new Input Source reader if base Dir null source set System Id base Dir Document document parser parse source Node List list document get Child Nodes for int i 0 i list get Length i Node node list item i if node instanceof Element return new XML Memento document Element node catch Parser Configuration Exception e exception e error Message Workbench Messages get String XML Memento parser Config Error NON NLS 1 catch IO Exception e exception e error Message Workbench Messages get String XML Memento io Error NON NLS 1 catch SAX Exception e exception e error Message Workbench Messages get String XML Memento format Error NON NLS 1 String problem Text null if exception null problem Text exception get Message if problem Text null problem Text length 0 problem Text error Message null error Message Workbench Messages get String XML Memento no Element NON NLS 1 throw new Workbench Exception problem Text exception  baseDir WorkbenchException XMLMemento createReadRoot baseDir WorkbenchException errorMessage DocumentBuilderFactory DocumentBuilderFactory newInstance DocumentBuilder newDocumentBuilder InputSource InputSource baseDir setSystemId baseDir NodeList getChildNodes getLength XMLMemento ParserConfigurationException errorMessage WorkbenchMessages getString XMLMemento parserConfigError IOException errorMessage WorkbenchMessages getString XMLMemento ioError SAXException errorMessage WorkbenchMessages getString XMLMemento formatError problemText problemText getMessage problemText problemText problemText errorMessage errorMessage WorkbenchMessages getString XMLMemento noElement WorkbenchException problemText
Returns a root memento for writing a document param type the element node type to create on the document return the root memento for writing a document public static XML Memento create Write Root String type Document document try document Document Builder Factory new Instance new Document Builder new Document Element element document create Element type document append Child element return new XML Memento document element catch Parser Configuration Exception e throw new Error e  XMLMemento createWriteRoot DocumentBuilderFactory newInstance newDocumentBuilder newDocument createElement appendChild XMLMemento ParserConfigurationException
Creates a memento for the specified document and element p Clients should use code create Read Root code and code create Write Root code to create the initial memento on a document p param document the document for the memento param element the element node for the memento public XML Memento Document document Element element super this factory document this element element  createReadRoot createWriteRoot XMLMemento
public I Memento create Child String type Element child factory create Element type element append Child child return new XML Memento factory child  IMemento createChild createElement appendChild XMLMemento
public I Memento create Child String type String id Element child factory create Element type child set Attribute TAG ID id null id NON NLS 1 element append Child child return new XML Memento factory child  IMemento createChild createElement setAttribute TAG_ID appendChild XMLMemento
public I Memento copy Child I Memento child Element child Element XML Memento child element Element new Element Element factory import Node child Element true element append Child new Element return new XML Memento factory new Element  IMemento copyChild IMemento childElement XMLMemento newElement importNode childElement appendChild newElement XMLMemento newElement
public I Memento get Child String type Get the nodes Node List nodes element get Child Nodes int size nodes get Length if size 0 return null Find the first node which is a child of this node for int nX 0 nX size nX Node node nodes item nX if node instanceof Element Element element Element node if element get Node Name equals type return new XML Memento factory element A child was not found return null  IMemento getChild NodeList getChildNodes getLength getNodeName XMLMemento
public I Memento get Children String type Get the nodes Node List nodes element get Child Nodes int size nodes get Length if size 0 return new I Memento 0 Extract each node with given type Array List list new Array List size for int nX 0 nX size nX Node node nodes item nX if node instanceof Element Element element Element node if element get Node Name equals type list add element Create a memento for each node size list size I Memento results new I Memento size for int x 0 x size x results x new XML Memento factory Element list get x return results  IMemento getChildren NodeList getChildNodes getLength IMemento ArrayList ArrayList getNodeName IMemento IMemento XMLMemento
public Float get Float String key Attr attr element get Attribute Node key if attr null return null String str Value attr get Value try return new Float str Value catch Number Format Exception e Workbench Plugin log Memento problem Invalid float for key NON NLS 1 key value str Value NON NLS 1 return null  getFloat getAttributeNode strValue getValue strValue NumberFormatException WorkbenchPlugin strValue
Method declared in I Memento public String getID return element get Attribute TAG ID  IMemento getAttribute TAG_ID
public Integer get Integer String key Attr attr element get Attribute Node key if attr null return null String str Value attr get Value try return new Integer str Value catch Number Format Exception e Workbench Plugin log Memento problem invalid integer for key key NON NLS 1 value str Value NON NLS 1 return null  getInteger getAttributeNode strValue getValue strValue NumberFormatException WorkbenchPlugin strValue
public String get String String key Attr attr element get Attribute Node key if attr null return null return attr get Value  getString getAttributeNode getValue
public String get Text Data Text text Node get Text Node if text Node null return text Node get Data else return null  getTextData textNode getTextNode textNode textNode getData
Returns the Text node of the memento Each memento is allowed only one Text node return the Text node of the memento or code null code if the memento has no Text node private Text get Text Node Get the nodes Node List nodes element get Child Nodes int size nodes get Length if size 0 return null for int nX 0 nX size nX Node node nodes item nX if node instanceof Text return Text node a Text node was not found return null  getTextNode NodeList getChildNodes getLength
Places the element s attributes into the document private void put Element Element element Named Node Map node Map element get Attributes int size node Map get Length for int i 0 i size i Attr attr Attr node Map item i put String attr get Name attr get Value Node List nodes element get Child Nodes size nodes get Length for int i 0 i size i Node node nodes item i if node instanceof Element XML Memento child XML Memento create Child node get Node Name child put Element Element node  putElement NamedNodeMap nodeMap getAttributes nodeMap getLength nodeMap putString getName getValue NodeList getChildNodes getLength XMLMemento XMLMemento createChild getNodeName putElement
Method declared in I Memento public void put Float String key float f element set Attribute key String value Of f  IMemento putFloat setAttribute valueOf
Method declared in I Memento public void put Integer String key int n element set Attribute key String value Of n  IMemento putInteger setAttribute valueOf
Method declared in I Memento public void put Memento I Memento memento put Element XML Memento memento element  IMemento putMemento IMemento putElement XMLMemento
public void put String String key String value if value null return element set Attribute key value  putString setAttribute
public void put Text Data String data Text text Node get Text Node if text Node null text Node factory create Text Node data element append Child text Node else text Node set Data data  putTextData textNode getTextNode textNode textNode createTextNode appendChild textNode textNode setData
Saves this memento s document current values to the specified writer param writer the writer used to save the memento s document throws IO Exception if there is a problem serializing the document to the stream public void save Writer writer throws IO Exception Result result new Stream Result writer Source source new DOM Source factory try Transformer transformer Transformer Factory new Instance new Transformer transformer set Output Property Output Keys INDENT yes NON NLS 1 transformer set Output Property Output Keys METHOD xml NON NLS 1 transformer transform source result catch Transformer Configuration Exception e throw IO Exception new IO Exception init Cause e catch Transformer Exception e throw IO Exception new IO Exception init Cause e  IOException IOException StreamResult DOMSource TransformerFactory newInstance newTransformer setOutputProperty OutputKeys setOutputProperty OutputKeys TransformerConfigurationException IOException IOException initCause TransformerException IOException IOException initCause

Returns the action code for this activity see ACTION FEATURE INSTALL see ACTION FEATURE REMOVE see ACTION SITE INSTALL see ACTION SITE REMOVE see ACTION UNCONFIGURE see ACTION CONFIGURE see ACTION REVERT see ACTION RECONCILIATION return action code as defined in this interface since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  ACTION_FEATURE_INSTALL ACTION_FEATURE_REMOVE ACTION_SITE_INSTALL ACTION_SITE_REMOVE ACTION_UNCONFIGURE ACTION_CONFIGURE ACTION_REVERT ACTION_RECONCILIATION
Returns the displayable label for this action return diplayable label for action since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Returns the creation date of this activity return activity date since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Returns the activity completion status see STATUS OK see STATUS NOK return completion status as defined in this interface since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  STATUS_OK STATUS_NOK
Returns the installation configuration that was the result of this action return installation configuration since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 

Returns the underlying unfiltered site return the underlying site since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Indicates whether updates can be applied to the site code I Status is Ok code return code true code if the site can be updated code false code otherwise If updates cannot be aplied the status contains the error message and the possible exception see I Status return an I Status since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  IStatus isOk IStatus IStatus
Indicates whether updates can be applied to the site A configuration site is tagged a non updatable by reading the platform configuration for this site return code true code if the site can be updated code false code otherwise since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Install the specified feature on this site param feature feature to install param verification Listener verification listener or code null code param monitor progress monitor or code null code exception Core Exception since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  verificationListener CoreException
Install the specified feature on this site Only the specified optional features will be installed param feature feature to install param optional Features optional features to install param verification Listener verification listener or code null code param monitor progress monitor or code null code exception Core Exception since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  optionalFeatures verificationListener CoreException
Remove uninstall the specified feature from this site param feature feature to remove param monitor progress monitor or code null code since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Indicates if the specified feature is broken A feature is considered to be broken in the context of this site if some of the plug ins referenced by the feature are not installed on this site The status code is code I Status ERROR code if the feature is considered broken The Status may contain the reason why the feature is broken The status code is code I Status OK code if the feature is not considered broken param feature the feature return the status for this feature on this configured site since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  IStatus IStatus
Indicates if the specified feature is configured on this site param feature the feature return code true code if the feature is configured code false code otherwise since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Configure the specified feature on this site The configured feature will be included on next startup param feature the feature since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Unconfigure the specified feature from this site The unconfigured feature will be omitted on the next startup param feature the feature since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Return references to features configured on this site return an array of feature references or an empty array since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Return all features installed on this site configured as well as unconfigured Note that if the site requires reconciliation the result may not match the result of the corresponding method on the underlying site see I Site get Feature References return an array of site feature references or an empty array since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  ISite getFeatureReferences
Returns the install configuration object this site is part of return install configuration object since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Adds a change listener to the configured site param listener the listener to add since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Removes a change listener from the configured site param listener the listener to remove since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Indicates if the site is an extension site return code true code if the site is an extension site code false code otherwise since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Indicates if the site is a product site return code true code if the site is a product site code false code otherwise since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Indicates if the site is a private site This does not check if this private site belongs to the product that is running return code true code if the site is a private site code false code otherwise since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p deprecated private site are considered the same as extension site 3 0 
Indicates if the site has been linked by a native installer return code true code if the site is a natively linked site code false code otherwise since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Sets if the site is enabled parem code true code if the site is enable code false code otherwise since 2 1 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Indicates if the site is enabled If a site is not enable all teh features are considered disabled return code true code if the site is enable code false code otherwise since 2 1 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 

Indicates the specified feature was installed param feature the feature since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Indicates the specified feature was removed uninstalled param feature the feature since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Indicates the specified feature was configured param feature the feature since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Indicates the specified feature was unconfigured param feature the feature since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 

Indicates if this is the current configuration return code true code if this is the current configuration code false code otherwise since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Return the sites that are part of this configuration return an array of configured sites or an empty array since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Create a new installation site based on a local file system directory Note the site is not added to the configuration as a result of this call param directory file directory return new site exception Core Exception since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  CoreException
Create a new linked site based on a local file system directory Note the site is not added to the configuration as a result of this call The linked site is only created if the directory is an already existing extension site and if it is not already natively linked to the local site param directory file directory return new linked site exception Core Exception since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  CoreException
Adds the specified site to this configuration param site new site since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Removes the specified site from this configuration param site site to remove since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Adds a configuration change listener param listener the listener since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Removes a configuration change listener param listener the listener since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Return the list of activities that resulted in this configuration There is always at least one activity return an array of activities since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Retrun the date the configuration was created return create date since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Return the configuration label return the configuration label If the configuration label was not explicitly set a default label is generated based on the creation date since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Sets the configuration label param label the label since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Returns an integer that represents a time stamp created at the beginning of a new configuration time line Time line is started when configuration state is created by a full file system reconciliation All configurations subsequently created will have the same time line until the next full reconciliation Certain operations e g revert make sense only between objects that belong to the same time line since 2 0 2 return the time stamp of the full system reconciliation b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 

Indicates the specified site was added to the configuration param site the site since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Indicates the specified site was removed from the configuration param site the site since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 

Sets the list of session delta to present to the user param deltas an Array of code I Session Delta code since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  ISessionDelta
Prompt the user to configure or unconfigure new features found during reconciliation since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 

Return the current configuration return current configuration since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Return configuration history return an array of configurations or an empty array since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Reverts the local site to use the specified configuration The result of this operation is a new configuration that contains the same configured features as the specified configuration The new configuration becomes the current configuration param configuration configuration state to revert to param monitor progress monitor param handler problem handler exception Core Exception since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p public void revert To I Install Configuration configuration I Progress Monitor monitor I Problem Handler handler  CoreException revertTo IInstallConfiguration IProgressMonitor IProblemHandler
Creates a new configuration containing the same state as the specified configuration The new configuration is not added to this lical site return cloned configuration exception Core Exception since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  CoreException
Adds the specified configuration to this local site The new configuration becomes the current one param config the configuration since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Saves the local site state exception Core Exception since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p return true if a restart is needed This return code was added in 3 0  CoreException
Indicates how many configuration histories should be maintained Histories beyond the specified count are automatically deleted return number of past configurations to keep as history since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Sets the number of past configurations to keep in history param history number of configuration to keep since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Adds a site change listener param listener the listener since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Removes a site listener param listener the listener since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Save the specified configuration Saved configurations are not deleted based on the history count They must be explicitly removed param configuration the configuration to save return the preserved configuration or code null code if the configuration to save is code null code exception Core Exception since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p public I Install Configuration add To Preserved Configurations I Install Configuration configuration  CoreException IInstallConfiguration addToPreservedConfigurations IInstallConfiguration
Removes the specified configuration from the list of previously saved configurations param configuration the configuration to remove since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Return the list of saved configurations return an array of configurations or an empty array since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Indicates if the state of the specified feature and its children features A feature is considered to be unhappy in the context of this site if some of the plug ins referenced by the feature or any of its children are not installed on this site A feature is considered to be happy in the context of a local site if all the plug ins referenced by the feature or any of its children are installed on the site and no other version of any of the plug ins are installed on any other site of the local site A feature is considered to be ambiguous in the context of a local site if all the plug ins referenced by the feature or any of its children are installed on the site and other version of any of the plug ins are installed on any other site of the local site param feature the feature see I Feature STATUS HAPPY see I Feature STATUS UNHAPPY see I Feature STATUS AMBIGUOUS return the state of the feature exception Core Exception since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  IFeature STATUS_HAPPY IFeature STATUS_UNHAPPY IFeature STATUS_AMBIGUOUS CoreException

Indicates the current configuration has changed param configuration the current cunfiguration since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Indicates the specified configuration was removed param configuration the configuration since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 

Local system change listener interface p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see Local System Info add Info Listener I Local System Info Listener see Local System Info remove Info Listener I Local System Info Listener see Local System Info fire System Info Changed I Volume int since 2 0  LocalSystemInfo addInfoListener ILocalSystemInfoListener LocalSystemInfo removeInfoListener ILocalSystemInfoListener LocalSystemInfo fireSystemInfoChanged IVolume

Report problem param problem Text problem text return code true code if the operation should continue code false code if the operation should be cancelled since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  problemText

Returns the list of Features found during reconciliation return an array of feature references or an empty array since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Returns the date the reconciliation occured return the date of the reconciliation since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Returns the type of the processing type that will affect all the associated features return the processing type see I Session Delta ENABLE see I Session Delta DISABLE since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  ISessionDelta ISessionDelta
Process all the feature references of the Session Delta Removes the Session Delta from the file system after processing it param progress Monitor the progress monitor throws Core Exception if an error occurs since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  progressMonitor CoreException
Process the selected feature references of the Session Delta Removes the Session Delta from the file system after processing it param selected list of selected feature references to be processed param monitor the progress monitor throws Core Exception if an error occurs since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  CoreException
Removes the Session Delta from the file system without processing it since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 

Returns the available free space on this volume Returns the amount of free space available to this user on the volume The method takes into account any space quotas or other native mechanisms that may restrict space usage on a given volume return the amount of free space available in units of Kbyte or an indication the size is not known see Local System Info SIZE UNKNOWN since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  LocalSystemInfo SIZE_UNKNOWN
returns volume label Returns the label of the volume return volume label as string or code null code if the label cannot be determined since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
Returns volume type Returns the type of the volume return volume type see Local System Info VOLUME UNKNOWN see Local System Info VOLUME INVALID PATH see Local System Info VOLUME REMOVABLE see Local System Info VOLUME FIXED see Local System Info VOLUME REMOTE see Local System Info VOLUME CDROM see Local System Info VOLUME FLOPPY 3 see Local System Info VOLUME FLOPPY 5 since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  LocalSystemInfo VOLUME_UNKNOWN LocalSystemInfo VOLUME_INVALID_PATH LocalSystemInfo VOLUME_REMOVABLE LocalSystemInfo VOLUME_FIXED LocalSystemInfo VOLUME_REMOTE LocalSystemInfo VOLUME_CDROM LocalSystemInfo VOLUME_FLOPPY_3 LocalSystemInfo VOLUME_FLOPPY_5
Returns the volume path Returns the path that represents the mount point of the volume return mount point file since 2 0 p b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 

change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p public static final int VOLUME REMOTE 3 Indicates a cdrom volume compact disc since 2 0 p b Note b This field is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken  VOLUME_REMOTE
p public static final int VOLUME CDROM 4 Indicates a ramdisk volume memory since 2 0 p b Note b This field is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p public static final int VOLUME RAMDISK 5 Indicates the volume is removable floppy disk 5 1 4 since 2 0  VOLUME_CDROM VOLUME_RAMDISK
b Note b This field is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p public static final int VOLUME FLOPPY 5 6 Indicates the volume is removable floppy disk 3 1 2  VOLUME_FLOPPY_5
p b Note b This field is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
public static final int VOLUME FLOPPY 3 7 Indicates a new volume has been added since 2 0 p b Note b This field is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p  VOLUME_FLOPPY_3
p b Note b This field is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken 
b Note b This field is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
private static Array List listeners new Array List private static boolean has Natives false static try  ArrayList ArrayList hasNatives
catch Unsatisfied Link Error e  UnsatisfiedLinkError
catch Unsatisfied Link Error e Update Core warn Unable to load native library update NON NLS 1  UnsatisfiedLinkError UpdateCore
Update Core warn Unable to load native library update NON NLS 1  UpdateCore
Update Core warn Unable to load native library update NON NLS 1 has Natives false  UpdateCore hasNatives

public class Configurator Utils Returns the current platform configuration This method replaces the one we used to call on Boot Loader return platform configuration used in current instance of platform since 3 0 public static I Platform Configuration get Current Platform Configuration acquire factory service first Bundle Context context Configuration Activator get Bundle Context Service Reference config FactorySR context get Service Reference I Platform Configuration Factory class get Name if config FactorySR null throw new Illegal State Exception I Platform Configuration Factory config Factory I Platform Configuration Factory context get Service config FactorySR if config Factory null throw new Illegal State Exception get the configuration using the factory I Platform Configuration current Config config Factory get Current Platform Configuration context unget Service config FactorySR return current Config  ConfiguratorUtils BootLoader IPlatformConfiguration getCurrentPlatformConfiguration BundleContext ConfigurationActivator getBundleContext ServiceReference configFactorySR getServiceReference IPlatformConfigurationFactory getName configFactorySR IllegalStateException IPlatformConfigurationFactory configFactory IPlatformConfigurationFactory getService configFactorySR configFactory IllegalStateException IPlatformConfiguration currentConfig configFactory getCurrentPlatformConfiguration ungetService configFactorySR currentConfig
Returns a platform configuration object optionally initialized with previously saved configuration information We will use this method instead of the old one in Boot Loader param url location of previously save configuration information If code null code is specified an empty configuration object is returned return platform configuration used in current instance of platform public static I Platform Configuration get Platform Configuration URL url throws IO Exception acquire factory service first Bundle Context context Configuration Activator get Bundle Context Service Reference config FactorySR context get Service Reference I Platform Configuration Factory class get Name if config FactorySR null throw new Illegal State Exception I Platform Configuration Factory config Factory I Platform Configuration Factory context get Service config FactorySR if config Factory null throw new Illegal State Exception get the configuration using the factory I Platform Configuration config config Factory get Platform Configuration url context unget Service config FactorySR return config  BootLoader IPlatformConfiguration getPlatformConfiguration IOException BundleContext ConfigurationActivator getBundleContext ServiceReference configFactorySR getServiceReference IPlatformConfigurationFactory getName configFactorySR IllegalStateException IPlatformConfigurationFactory configFactory IPlatformConfigurationFactory getService configFactorySR configFactory IllegalStateException IPlatformConfiguration configFactory getPlatformConfiguration ungetService configFactorySR
return the URL of this eclispe installation public static URL get InstallURL return Configuration Activator get InstallURL  getInstallURL ConfigurationActivator getInstallURL

Returns the URL for this site return site url since 2 0 
Returns the policy for this site return site policy since 2 0 
Sets the site policy param policy site policy since 2 0 
Returns a list of features visible on the site Note that this is simply a reflection of the site content The features may or may not be actually configured return an array of feature entries or an empty array if no features are found A feature entry is returned as a path relative to the site URL since 2 0 
Returns a list of plug ins visible on the site Note that this is simply a reflection of the site content and the current policy for the site The plug ins may or may not end up being used by Eclipse depends on which plug in are actually bound by the platform return an array of plug in entries or an empty array if no plug ins are found A plug in entry is returned as a path relative to the site URL since 2 0 
Returns a stamp reflecting the current state of the site If called repeatedly returns the same value as long as no changes were made to the site changes to features or plugins return site change stamp since 2 0 
Returns a stamp reflecting the current state of the features on the site If called repeatedly returns the same value as long as no changes were made to features on the site return site features change stamp since 2 0 deprecated Do not use this method 
Returns a stamp reflecting the current state of the plug ins on the site If called repeatedly returns the same value as long as no changes were made to plug ins on the site return site plug ins change stamp since 2 0 deprecated Do not use this method 
Returns an indication whether the site can be updated return code true code if site can be updated code false code otherwise since 2 0 
Returns an indication whether the site represents an install site that has been linked via a native installer using the links linkfile mechanism return code true code if the site is linked code false code otherwise since 2 0 
Return policy type return policy type since 2 0 
Return policy inclusion exclusion list return the list as an array since 2 0 
Set new policy list The list entries are interpreted based on the policy type See description of the policy type constants for details param list policy inclusion exclusion list as an array Returns an empty array if there are no entries see USER INCLUDE see USER EXCLUDE since 2 0  USER_INCLUDE USER_EXCLUDE
Returns feature identifier return feature identifier since 2 0 
Returns the currently configured version for the feature return feature version as string or code null code since 2 0 
Returns the identifier of the feature plug in for this feature entry Note that there is no guarantee that a feature in fact supplies a corresponding feature plugin so the result can be code null code Also if supplied there is no guarantee that the plugin will in fact be loaded into the plug in registry at runtime due to rules and constraint checking performed by the registry loading support Consequently code making use of this method must handle these conditions return feature identifier as string or code null code since 2 1 
Returns the version of the feature plug in for this feature entry Note that there is no guarantee that a feature in fact supplies a corresponding feature plugin so the result can be code null code Also if supplied there is no guarantee that the plugin will in fact be loaded into the plug in registry at runtime due to rules and constraint checking performed by the registry loading support Consequently code making use of this method must handle these conditions return feature version as string or code null code since 2 0 
Returns the application to run when this feature is the primary feature return application identifier or code null code since 2 0 
Returns UR Ls to the feature root locations The root UR Ls are install locations of the feature plugin and its fragments return array of UR Ls or an empty array since 2 0  URLs URLs URLs
Returns an indication whether this feature has been defined to act as a primary feature return code true code if the feature can be primary code false code otherwise since 2 0 
Create a site entry param url site URL param policy site policy return created site entry since 2 0 
Create a site policy The policy determines the way the site plug in are processed at startpu param type policy type param list an array of site relative paths representing the inclusion exclusion list return created site policy entry since 2 0 
Create a feature entry param id feature identifier Must not be code null code param version feature version as String Can be code null code param plugin Version version of the feature plugin as String Can be code null code param primary code true code if the feature is defined as a primary feature otherwise code false code param application identifier of the application to run when this feature is the primary feature Can be code null code If specified the identifier must represent a valid extension registered in the code org eclipse core runtime applications code extension point param root an array of UR Ls to feature root directories These are UR Ls to install locations for the feature plugin and its fragments Can be code null code return create feature entry since 2 0  pluginVersion URLs URLs
Create a feature entry param id feature identifier Must not be code null code param version feature version as String Can be code null code param plugin Identifier identifier of the feature plugin as String Can be code null code param plugin Version version of the feature plugin as String Can be code null code param primary code true code if the feature is defined as a primary feature otherwise code false code param application identifier of the application to run when this feature is the primary feature Can be code null code If specified the identifier must represent a valid extension registered in the code org eclipse core runtime applications code extension point param root an array of UR Ls to feature root directories These are UR Ls to install locations for the feature plugin and its fragments Can be code null code return create feature entry since 2 1  pluginIdentifier pluginVersion URLs URLs
Configures the specified site entry If a site entry with the same site URL is already configured the entry is b not b replaced param entry site entry since 2 0 
Configures the specified site entry If a site entry with the same site URL is already configured the replacement behavior for the entry can be specified param entry site entry param replace indicating whether an existing configured entry with the same URL should be replaced code true code or not code false code since 2 0 
Unconfigures the specified entry Does not do anything if the entry is not configured param entry site entry since 2 0 
Returns configured site entries return array of site entries Returns an empty array if no sites are configured since 2 0 
Returns a site entry matching the specified URL param url site url return matching site entry or code null code if no match found since 2 0 
Configures the feature entry If another feature entry with the same feature identifier already exists it is replaced param entry feature entry since 2 0 
Unconfigures the specified feature entry if it exists param entry feature entry since 2 0 
Returns a list of configured feature entries return array or entries or an empty array if no entries are configured since 2 0 
Locates the specified feature entry param id feature identifier return ferature entry or code null code since 2 0 
Returns the URL location of the configuration information return configuration location URL or code null code if the configuration location could not be determined since 2 0 
Returns a stamp reflecting the current state of the configuration If called repeatedly returns the same value as long as no changes were made to the configuration changes to sites features or plugins return configuration change stamp since 2 0 
Returns a stamp reflecting the current state of the features in the configuration If called repeatedly returns the same value as long as no changes were made to features in the configuration return configuration features change stamp since 2 0 deprecated Do not use this method 
Returns a stamp reflecting the current state of the plug ins in the configuration If called repeatedly returns the same value as long as no changes were made to plug ins in the configuration return configuration plug ins change stamp since 2 0 deprecated Do not use this method 
Returns the identifier of the configured primary feature A primary feature is used to specify product customization information for a running instance of Eclipse return primary feature identifier or code null code if none configured since 2 0 
Computes the plug in path for this configuration The result includes all plug ins visible on each of the configured sites based on each site policy return an array of plug in path elements full URL entries or an empty array since 2 0 
Returns an array of bootstrap plugin identifiers whose location needs to be explicitly identified in the configuration return an array of identifiers or empty array otherwise since 2 0 deprecated Do not use this method Check the osgi bundles system property for the urls of the automatically started bundles 
Sets the location of a bootstrap plugin see I Platform Configuration get Bootstrap Plugin Identifiers param id plugin identifier Must match one of the entries returned by get Bootstrap Plugin Identifiers param location since 2 0 deprecated Do not use this method Use the osig bundles system property contains the urls of the automatically started bundles  IPlatformConfiguration getBootstrapPluginIdentifiers getBootstrapPluginIdentifiers
Returns an indication whether the configuration can be updated return code true code if configuration can be updated code false code otherwise since 2 0 
Returns an indication whether the configuration is transient A transient configuration typically represents a scenario where the configuration was computed for a single instantiation of the platform and is not guaranteed to be valid on subsequent instantiations return code true code if configuration is transient code false code otherwise since 2 0 
Indicates whether the configuration is transient or not A transient configuration typically represents a scenario where the configuration was computed for a single instantiation of the platform and is not guaranteed to be valid on subsequent instantiations This method has no effect if called on the current platform configuration param value code true code if configuration is transient code false code otherwise since 2 0 
Called to refresh the configuration information In particular causes change stamps to be recomputed based on the current configuration state and updates the lists of available plug ins since 2 0 
Called to save the configuration information since 2 0 
Called to save the configuration information in the specified location param url save location since 2 0 

public interface I Platform Configuration Factory Returns the current platform configuration return platform configuration used in current instance of platform  IPlatformConfigurationFactory
public I Platform Configuration get Current Platform Configuration Returns a platform configuration object optionally initialized with previously saved configuration information param url location of previously save configuration information If code null code is specified an empty configuration object is returned return platform configuration used in current instance of platform  IPlatformConfiguration getCurrentPlatformConfiguration

p This class may be instantiated or subclassed by clients p p 
b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see org eclipse update core I Archive Reference see org eclipse update core model Archive Reference Model  IArchiveReference ArchiveReferenceModel

The factory is responsible for constructing the correct concrete implementation of the model objects for each particular feature type This class creates model objects that correspond to the concrete implementation classes provided in this package The actual feature creation method is subclass responsibility 
p This class must be subclassed by clients p p 
change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see org eclipse update core I Feature Factory  IFeatureFactory
see org eclipse update core model Feature Model Factory since 2 0 public abstract class Base Feature Factory extends Feature Model Factory implements I Feature Factory  FeatureModelFactory BaseFeatureFactory FeatureModelFactory IFeatureFactory
deprecated implement create Feature URL I Site I Progress Monitor instead see I Feature Factory create Feature URL I Site since 2 0  createFeature ISite IProgressMonitor IFeatureFactory createFeature ISite
public I Feature create Feature URL url I Site site throws Core Exception return create Feature url site null  IFeature createFeature ISite CoreException createFeature
subclass see I Feature Factory create Feature URL I Site I Progress Monitor since 2 0  IFeatureFactory createFeature ISite IProgressMonitor
public abstract I Feature create Feature URL url I Site site I Progress Monitor monitor throws Core Exception Create a concrete implementation of feature model  IFeature createFeature ISite IProgressMonitor CoreException
return feature model since 2 0 public Feature Model create Feature Model return new Feature  FeatureModel createFeatureModel

Initialize the install handler see I Install Handler initialize int I Feature I Install Handler Entry Install Monitor since 2 0 public void initialize int type I Feature feature I Install Handler Entry entry Install Monitor monitor throws Core Exception if this initialized return else if feature null throw new Illegal Argument Exception this type type this feature feature this entry entry this monitor monitor this initialized true  IInstallHandler IFeature IInstallHandlerEntry InstallMonitor IFeature IInstallHandlerEntry InstallMonitor CoreException IllegalArgumentException
Called at the start of the install action see I Install Handler install Initiated since 2 0 public void install Initiated throws Core Exception  IInstallHandler installInitiated installInitiated CoreException
Called after files corresponding to plug in entries have been downloaded but before they are actully unpacked and installed see I Install Handler plugins Downloaded I Plugin Entry since 2 0 public void plugins Downloaded I Plugin Entry plugins throws Core Exception this plugin Entries plugins  IInstallHandler pluginsDownloaded IPluginEntry pluginsDownloaded IPluginEntry CoreException pluginEntries
Called after files corresponding to non plug in entries have been downloaded see I Install Handler non Plugin Data Downloaded I Non Plugin Entry I Verification Listener since 2 0 public void non Plugin Data Downloaded I Non Plugin Entry non Plugin Data I Verification Listener listener throws Core Exception this non Plugin Entries non Plugin Data  IInstallHandler nonPluginDataDownloaded INonPluginEntry IVerificationListener nonPluginDataDownloaded INonPluginEntry nonPluginData IVerificationListener CoreException nonPluginEntries nonPluginData
Called after the feature files and any downloaded plug ins have been installed see I Install Handler complete Install I Feature Content Consumer since 2 0 public void complete Install I Feature Content Consumer consumer throws Core Exception  IInstallHandler completeInstall IFeatureContentConsumer completeInstall IFeatureContentConsumer CoreException
Called at the end of the install action see I Install Handler install Completed boolean since 2 0 public void install Completed boolean success throws Core Exception  IInstallHandler installCompleted installCompleted CoreException
Called at the start of the configure action see I Install Handler configure Initiated since 2 0 public void configure Initiated throws Core Exception  IInstallHandler configureInitiated configureInitiated CoreException
Called after the feature has been configured see I Install Handler complete Configure since 2 0 public void complete Configure throws Core Exception  IInstallHandler completeConfigure completeConfigure CoreException
Called at the end of the configure action see I Install Handler configure Completed boolean since 2 0 public void configure Completed boolean success throws Core Exception  IInstallHandler configureCompleted configureCompleted CoreException
Called at the start of the unconfigure action see I Install Handler unconfigure Initiated since 2 0 public void unconfigure Initiated throws Core Exception  IInstallHandler unconfigureInitiated unconfigureInitiated CoreException
Called after the feature has been unconfigured see I Install Handler complete Unconfigure since 2 0 public void complete Unconfigure throws Core Exception  IInstallHandler completeUnconfigure completeUnconfigure CoreException
Called at the end of the unconfigure action see I Install Handler unconfigure Completed boolean since 2 0 public void unconfigure Completed boolean success throws Core Exception  IInstallHandler unconfigureCompleted unconfigureCompleted CoreException
Called at the start of the uninstall action see I Install Handler uninstall Initiated since 2 0 public void uninstall Initiated throws Core Exception  IInstallHandler uninstallInitiated uninstallInitiated CoreException
Called after the feature has been uninstalled see I Install Handler complete Uninstall since 2 0 public void complete Uninstall throws Core Exception  IInstallHandler completeUninstall completeUninstall CoreException
Called at the end of the uninstall action see I Install Handler uninstall Completed boolean since 2 0 public void uninstall Completed boolean success throws Core Exception  IInstallHandler uninstallCompleted uninstallCompleted CoreException

Base implementation of a site factory The factory is responsible for constructing the correct concrete implementation of the model objects for each particular site type This class creates model objects that correspond 
The actual site creation method is subclass responsibility p This class must be subclassed by clients p p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see org eclipse update core I Site Factory see org eclipse update core model Site Model Factory  ISiteFactory SiteModelFactory
since 2 0 public abstract class Base Site Factory extends Site Model Factory implements I Site Factory  BaseSiteFactory SiteModelFactory ISiteFactory
Create site Implementation of this method must be provided by subclass see I Site Factory create Site URL since 2 0  ISiteFactory createSite
public abstract I Site create Site URL url throws Core Exception Invalid Site Type Exception Helper method to access resouce bundle for site The default implementation attempts to load the appropriately localized  ISite createSite CoreException InvalidSiteTypeException
param url base URL used to load the resource bundle return resource bundle or code null code since 2 0 
Resource Bundle bundle null try url Update Manager Utils as DirectoryURL url Class Loader l new URL Class Loader new URL url null  ResourceBundle UpdateManagerUtils asDirectoryURL ClassLoader URLClassLoader
bundle Resource Bundle get Bundle Site SITE FILE Locale get Default l catch Missing Resource Exception e Update Core warn e get Localized Message url to External Form NON NLS 1 catch MalformedURL Exception e Update Core warn Policy bind Base Site Factory Cannot Retrive Parent Directory url to External Form NON NLS 1  ResourceBundle getBundle SITE_FILE getDefault MissingResourceException UpdateCore getLocalizedMessage toExternalForm MalformedURLException UpdateCore BaseSiteFactory CannotRetriveParentDirectory toExternalForm

Convenience implementation of feature category definition p This class may be instantiated or subclassed by clients 
p p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback 
from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see org eclipse update core I Category  ICategory

since 2 0 
public class Content Reference Unknown size indication since 2 0  ContentReference
public static final long UNKNOWN SIZE 1 Default executable permission when installing a content reference Will add executable bit if necessary  UNKNOWN_SIZE
public static final int DEFAULT EXECUTABLE PERMISSION 1 private static final String FILE URL PROTOCOL file NON NLS 1 private String id  DEFAULT_EXECUTABLE_PERMISSION FILE_URL_PROTOCOL
private URL url reference is either URL reference OR private File file local file reference private Response response 
private long length true if a copy of a Contentreferenec in a temp local directory private boolean temp Local false  tempLocal
private long last Modified do not allow default contruction private Content Reference Create content reference from URL  lastModified ContentReference
param id symbolic path identifier param url actual referenced URL since 2 0 public Content Reference String id URL url this id id null id NON NLS 1 this url url can be null this file null  ContentReference
Create content reference from file param id symbolic path identifier param file actual referenced file since 2 0 public Content Reference String id File file this id id null id NON NLS 1 this file file can be null this url null  ContentReference
A factory method to create a content reference of the same type param id symbolic path identifier param file actual referenced file return content reference of the same type since 2 0 public Content Reference create Content Reference String id File file  ContentReference createContentReference
return new Content Reference id file true private Content Reference String id File file boolean b this id file set Temp Local b Retrieves the symbolic path identifier for the reference  ContentReference ContentReference setTempLocal
return symbolic path identifier since 2 0 public String get Identifier return id  getIdentifier
Creates an input stream for the reference return input stream exception IO Exception unable to create stream since 2 0  IOException
public Input Stream get Input Stream throws IO Exception if file null return new File Input Stream file else if url null if response null  InputStream getInputStream IOException FileInputStream
URL resolvedURL URL Encoder encode url response Update Core get Plugin get resolvedURL Update Manager Utils check Connection Result response resolvedURL  URLEncoder UpdateCore getPlugin UpdateManagerUtils checkConnectionResult
length response get Content Length return is else throw new IO Exception Policy bind Content Reference Unable To Create Input Stream this to String NON NLS 1  getContentLength IOException ContentReference UnableToCreateInputStream toString
Creates an input stream for the reference 
exception IO Exception unable to create stream since 2 0 Input Stream get Partial Input Stream long offset throws IO Exception if url null http equals url get Protocol NON NLS 1 URL resolvedURL URL Encoder encode url response Update Core get Plugin get resolvedURL if response instanceof Http Response Http Response response set Offset offset Update Manager Utils check Connection Result response resolvedURL Input Stream is response get Input Stream length offset response get Content Length  IOException InputStream getPartialInputStream IOException getProtocol URLEncoder UpdateCore getPlugin HttpResponse HttpResponse setOffset UpdateManagerUtils checkConnectionResult InputStream getInputStream getContentLength

p see org eclipse update core I Feature see org eclipse update core model Feature Model  IFeature FeatureModel
public class Feature extends Feature Model implements I Feature Simple file name of the default feature manifest file since 2 0  FeatureModel IFeature
public static final String FEATURE FILE feature NON NLS 1 File extension of the default feature manifest file since 2 0 public static final String FEATURE XML FEATURE FILE xml NON NLS 1 private I Site site feature site private I Feature Content Provider feature Content Provider content provider private List of I Feature Reference included Feature References  FEATURE_FILE FEATURE_XML FEATURE_FILE ISite IFeatureContentProvider featureContentProvider IFeatureReference includedFeatureReferences
PERF new instance variable private Versioned Identifier version Id private Install Aborted Exception aborted Exception null  VersionedIdentifier versionId InstallAbortedException abortedException
Feature default constructor since 2 0 public Feature 
Compares two features for equality param object feature object to compare with return code true code if the two features are equal 
since 2 0 public boolean equals Object object if object instanceof I Feature return false I Feature f I Feature object return get Versioned Identifier equals f get Versioned Identifier  IFeature IFeature IFeature getVersionedIdentifier getVersionedIdentifier
Returns the feature identifier 
see I Feature get Versioned Identifier since 2 0 public Versioned Identifier get Versioned Identifier if version Id null  IFeature getVersionedIdentifier VersionedIdentifier getVersionedIdentifier versionId
return version Id String id get Feature Identifier String ver get Feature Version if id null ver null  versionId getFeatureIdentifier getFeatureVersion
try version Id new Versioned Identifier id ver return version Id catch Exception e Update Core warn  versionId VersionedIdentifier versionId UpdateCore
Unable to create versioned identifier id ver NON NLS 1 NON NLS 2 version Id new Versioned Identifier getURL to External Form null  versionId VersionedIdentifier toExternalForm
return version Id Returns the site this feature is associated with see I Feature get Site  versionId IFeature getSite
since 2 0 public I Site get Site return site Returns the feature URL  ISite getSite
see I Feature getURL since 2 0 public URL getURL I Feature Content Provider content Provider null try content Provider get Feature Content Provider catch Core Exception e Update Core warn No content Provider e NON NLS 1 return content Provider null content Provider getURL null Returns an information entry referencing the location of the feature update site see I Feature get Update Site Entry since 2 0 public IURL Entry get Update Site Entry return IURL Entry get Update Site Entry Model Return an array of information entries referencing locations of other update sites see I Feature get Discovery Site Entries since 2 0 public IURL Entry get Discovery Site Entries URL Entry Model result get Discovery Site Entry Models if result length 0 return new IURL Entry 0 else return IURL Entry result Returns and optional custom install handler entry see I Feature get Install Handler Entry since 2 0 public I Install Handler Entry get Install Handler Entry return I Install Handler Entry get Install Handler Model Returns the feature description see I Feature get Description since 2 0 public IURL Entry get Description return IURL Entry get Description Model Returns the copyright information for the feature see I Feature get Copyright since 2 0 public IURL Entry get Copyright return IURL Entry get Copyright Model Returns the license information for the feature see I Feature get License since 2 0 public IURL Entry get License return IURL Entry get License Model Return optional image for the feature see I Feature get Image since 2 0 public URL get Image return get ImageURL Return a list of plug in dependencies for this feature see I Feature get Raw Imports since 2 0 public I Import get Raw Imports Import Model result get Import Models if result length 0 return new I Import 0 else return I Import result Install the contents of this feature into the specified target feature This method is a reference implementation of the feature installation protocol Other concrete feature implementation that override this method need to implement this protocol see I Feature install I Feature I Verification Listener I Progress Monitor since 2 0 public I Feature Reference install I Feature target Feature I Verification Listener verification Listener I Progress Monitor progress throws Install Aborted Exception Core Exception call other API with all optional features or setup variable meaning install all return install target Feature null verification Listener progress Install the contents of this feature into the specified target feature This method is a reference implementation of the feature installation protocol Other concrete feature implementation that override this method need to implement this protocol see I Feature install I Feature I Verification Listener I Progress Monitor since 2 0 public I Feature Reference install I Feature target Feature I Feature Reference optionalfeatures I Verification Listener verification Listener I Progress Monitor progress throws Install Aborted Exception Core Exception DEBUG debug Installing getURL to External Form NON NLS 1 Error Recovery Log recovery Log Error Recovery Log get Log make sure we have an Install Monitor Install Monitor monitor if progress null  IFeature IFeatureContentProvider contentProvider contentProvider getFeatureContentProvider CoreException UpdateCore contentProvider contentProvider IFeature getUpdateSiteEntry IURLEntry getUpdateSiteEntry IURLEntry getUpdateSiteEntryModel IFeature getDiscoverySiteEntries IURLEntry getDiscoverySiteEntries URLEntryModel getDiscoverySiteEntryModels IURLEntry IURLEntry IFeature getInstallHandlerEntry IInstallHandlerEntry getInstallHandlerEntry IInstallHandlerEntry getInstallHandlerModel IFeature getDescription IURLEntry getDescription IURLEntry getDescriptionModel IFeature getCopyright IURLEntry getCopyright IURLEntry getCopyrightModel IFeature getLicense IURLEntry getLicense IURLEntry getLicenseModel IFeature getImage getImage getImageURL IFeature getRawImports IImport getRawImports ImportModel getImportModels IImport IImport IFeature IFeature IVerificationListener IProgressMonitor IFeatureReference IFeature targetFeature IVerificationListener verificationListener IProgressMonitor InstallAbortedException CoreException targetFeature verificationListener IFeature IFeature IVerificationListener IProgressMonitor IFeatureReference IFeature targetFeature IFeatureReference IVerificationListener verificationListener IProgressMonitor InstallAbortedException CoreException toExternalForm ErrorRecoveryLog recoveryLog ErrorRecoveryLog getLog InstallMonitor InstallMonitor
else if progress instanceof Install Monitor monitor Install Monitor progress else monitor new Install Monitor progress Setup optional install handler  InstallMonitor InstallMonitor InstallMonitor
this this get Install Handler Entry monitor boolean success false Throwable original Exception null aborted Exception null Get source feature provider and verifier  getInstallHandlerEntry originalException abortedException
I Feature Content Provider provider get Feature Content Provider I Verifier verifier provider get Verifier I Feature Reference result null I Feature Reference already Installed Feature null  IFeatureContentProvider getFeatureContentProvider IVerifier getVerifier IFeatureReference IFeatureReference alreadyInstalledFeature
I Plugin Entry target Site Plugin Entries null try determine list of plugins to install find the intersection between the plugin entries already contained on the target site and plugin entries packaged in source feature  IPluginEntry targetSitePluginEntries
I Site target Site target Feature get Site if target Site null debug The site to install in is null NON NLS 1 target Site Plugin Entries new I Plugin Entry 0  ISite targetSite targetFeature getSite targetSite targetSitePluginEntries IPluginEntry
target Site Plugin Entries target Site get Plugin Entries I Plugin Entry plugins To Install Update Manager Utils diff source Feature Plugin Entries target Site Plugin Entries I Non Plugin Entry non Plugins To Install get Non Plugin Entries  targetSitePluginEntries targetSite getPluginEntries IPluginEntry pluginsToInstall UpdateManagerUtils sourceFeaturePluginEntries targetSitePluginEntries INonPluginEntry nonPluginsToInstall getNonPluginEntries
I Feature Reference children get Included Feature References if optionalfeatures null children Update Manager Utils optional Children To Install children optionalfeatures determine number of monitor tasks 2 tasks for the feature jar download verify install 2 n tasks for plugin entries download verify install for each 1 m tasks per non plugin data entry download for each 1 task for custom non plugin entry handling 1 for all combined 5 x tasks for children features 5 subtasks per install int task Count 2 2 plugins To Install length non Plugins To Install length 1 5 children length monitor begin Task task Count NON NLS 1 Sub Progress Monitor sub Monitor null  IFeatureReference getIncludedFeatureReferences UpdateManagerUtils optionalChildrenToInstall taskCount pluginsToInstall nonPluginsToInstall beginTask taskCount SubProgressMonitor subMonitor
start log recovery Log open Error Recovery Log START INSTALL LOG Start the installation tasks handler install Initiated Download and verify feature archive s Content Reference references provider get Feature Entry Archive References monitor verify References verifier references monitor verification Listener true monitor Work monitor 1 Download and verify plugin archives for int i 0 i plugins To Install length i references provider get Plugin Entry Archive References plugins To Install i monitor verify References verifier references monitor  recoveryLog ErrorRecoveryLog START_INSTALL_LOG installInitiated ContentReference getFeatureEntryArchiveReferences verifyReferences verificationListener monitorWork pluginsToInstall getPluginEntryArchiveReferences pluginsToInstall verifyReferences
verification Listener false monitor Work monitor 1 handler plugins Downloaded plugins To Install Download non plugin archives Verification handled by optional install handler for int i 0 i non Plugins To Install length i references  verificationListener monitorWork pluginsDownloaded pluginsToInstall nonPluginsToInstall
provider get Non Plugin Entry Archive References non Plugins To Install i monitor monitor Work monitor 1  getNonPluginEntryArchiveReferences nonPluginsToInstall monitorWork
non Plugins To Install verification Listener All archives are downloaded and verified Get ready to install consumer target Feature get Feature Content Consumer install the children feature check if they are optional and if they should be installed 2 0 1  nonPluginsToInstall verificationListener targetFeature getFeatureContentConsumer
for int i 0 i children length i I Feature child Feature null try child Feature children i get Feature null catch Core Exception e  IFeature childFeature childFeature getFeature CoreException
if child Feature null sub Monitor new Sub Progress Monitor monitor 5 Site target Site install need to cast child Feature optionalfeatures consumer verifier verification Listener sub Monitor  childFeature subMonitor SubProgressMonitor targetSite childFeature verificationListener subMonitor
Install plugin files 
monitor worked 1 continue I Content Consumer plugin Consumer consumer open plugins To Install i TODO consumer open returns either Site File Packed Plugin Content Consumer or Site File Plugin Content Consumer and they are fed either Plugin Entry Archive Reference or Plugin Entry Content References  IContentConsumer pluginConsumer pluginsToInstall SiteFilePackedPluginContentConsumer SiteFilePluginContentConsumer PluginEntryArchiveReference PluginEntryContentReferences
if plugins To Install i instanceof Plugin Entry Model Plugin Entry Model plugins To Install i is Unpack plugin can run from a jar references provider get Plugin Entry Archive References plugins To Install i monitor else plugin must be unpacked references provider get Plugin Entry Content References plugins To Install i monitor String msg NON NLS 1 sub Monitor new Sub Progress Monitor monitor 1 Versioned Identifier plugin Ver Id plugins To Install i get Versioned Identifier String pluginID plugin Ver Id null plugin Ver Id get Identifier NON NLS 1 msg Policy bind Feature Task Install Plugin Files pluginID NON NLS 1 for int j 0 j references length j set Monitor Task Name sub Monitor msg references j get Identifier plugin Consumer store references j sub Monitor Install Registry register Plugin plugins To Install i if monitor is Canceled abort  pluginsToInstall PluginEntryModel PluginEntryModel pluginsToInstall isUnpack getPluginEntryArchiveReferences pluginsToInstall getPluginEntryContentReferences pluginsToInstall subMonitor SubProgressMonitor VersionedIdentifier pluginVerId pluginsToInstall getVersionedIdentifier pluginVerId pluginVerId getIdentifier TaskInstallPluginFiles setMonitorTaskName subMonitor getIdentifier pluginConsumer subMonitor InstallRegistry registerPlugin pluginsToInstall isCanceled
store will throw Core Exception if another feature is already installed in the same place already Installed Feature feature Already Installed target Site  CoreException alreadyInstalledFeature featureAlreadyInstalled targetSite
Install feature files references provider get Feature Entry Content References monitor  getFeatureEntryContentReferences
msg Policy bind Feature Task Install Feature Files NON NLS 1 for int i 0 i references length i set Monitor Task Name sub Monitor  TaskInstallFeatureFiles setMonitorTaskName subMonitor
Install Registry register Feature this else monitor worked 1 if monitor is Canceled abort call handler to complete installation eg handle non plugin entries handler complete Install consumer monitor Work monitor 1 indicate install success success true  InstallRegistry registerFeature isCanceled completeInstall monitorWork
original Exception e finally Exception new Exception null try if consumer null if success result consumer close if result null result already Installed Feature 18867 if result null optionalfeatures null  originalException newException alreadyInstalledFeature
reinitialize Feature result close the log recovery Log close Error Recovery Log END INSTALL LOG else consumer abort handler install Completed success if abort is done no need for the log to stay recovery Log delete catch Core Exception e new Exception e original exception wins unless it is Install Aborted Exception  reinitializeFeature recoveryLog ErrorRecoveryLog END_INSTALL_LOG installCompleted recoveryLog CoreException newException InstallAbortedException
if original Exception null throw Utilities new Core Exception Policy bind Install Handler error this get Label NON NLS 1  originalException newCoreException InstallHandler getLabel
throw Utilities new Core Exception Policy bind Install Handler error this get Label NON NLS 1 new Exception if aborted Exception null throw aborted Exception return result  newCoreException InstallHandler getLabel newException abortedException abortedException
Returns an array of plug in entries referenced by this feature see I Feature get Plugin Entries  IFeature getPluginEntries
since 2 0 public I Plugin Entry get Raw Plugin Entries Plugin Entry Model result get Plugin Entry Models if result length 0 return new I Plugin Entry 0 else return I Plugin Entry result  IPluginEntry getRawPluginEntries PluginEntryModel getPluginEntryModels IPluginEntry IPluginEntry
Method filter param result return I Plugin Entry  IPluginEntry
private I Plugin Entry filter Plugin Entry I Plugin Entry all List list new Array List if all null  IPluginEntry filterPluginEntry IPluginEntry ArrayList
for int i 0 i all length i if Update Manager Utils is Valid Environment all i list add all i I Plugin Entry result new I Plugin Entry list size if list is Empty list to Array result  UpdateManagerUtils isValidEnvironment IPluginEntry IPluginEntry isEmpty toArray

Constructor for File Filter public File Filter String filter super this filter Path new Path filter  FileFilter FileFilter filterPath
returns true if the name matches the rule public boolean accept String name if name null return false no pattern matching must be equals I Path name Path new Path name if filter Path last Segment index Of 1 return filter Path equals name Path check same file extension if extension exists a txt txt or same file name a txt a String extension filter Path get File Extension if extension equals NON NLS 1 if extension equals Ignore Case name Path get File Extension return false else I Path no Extension filter Path remove File Extension String file Name no Extension last Segment if file Name equals NON NLS 1 if name Path last Segment starts With file Name return false check same path I Path p1 name Path remove Last Segments 1 I Path p2 filter Path remove Last Segments 1 return p1 equals p2  IPath namePath filterPath lastSegment indexOf filterPath namePath filterPath getFileExtension equalsIgnoreCase namePath getFileExtension IPath noExtension filterPath removeFileExtension fileName noExtension lastSegment fileName namePath lastSegment startsWith fileName IPath namePath removeLastSegments IPath filterPath removeLastSegments
Feature content provider constructor param base feature URL The interpretation of this URL is specific to each content provider since 2 0 public Feature Content Provider URL base this base base this feature null  FeatureContentProvider
Returns the feature url see I Feature Content Provider getURL public URL getURL return base  IFeatureContentProvider
Returns the feature associated with this content provider see I Feature Content Provider get Feature public I Feature get Feature return feature  IFeatureContentProvider getFeature IFeature getFeature
Sets the feature associated with this content provider see I Feature Content Provider set Feature I Feature public void set Feature I Feature feature this feature feature  IFeatureContentProvider setFeature IFeature setFeature IFeature
Returns the specified reference as a local file system reference If required the file represented by the specified content reference is first downloaded to the local system param ref content reference param monitor progress monitor can be code null code exception IO Exception exception Core Exception since 2 0 public Content Reference as Local Reference Content Reference ref Install Monitor monitor throws IO Exception Core Exception check to see if this is already a local reference if ref is Local Reference return ref check to see if we already have a local file for this reference String key ref to String need to synch as another thread my have created the file but is still copying into it File local File null File Fragment local File Fragment null Object key Lock null synchronized lock if locks get key null locks put key key key Lock locks get key synchronized key Lock local File Utilities lookup Local File key if local File null check if the cached file is still valid no newer version on server if Update Manager Utils is Same Timestamp ref asURL local File last Modified return ref create Content Reference ref get Identifier local File if local File null local File Fragment Update Manager Utils lookup Local File Fragment key download the referenced file into local temporary area Input Stream is null Output Stream os null long bytes Copied 0 long input Length 0 boolean success false if monitor null monitor save State monitor set Task Name Policy bind Feature Content Provider Downloading NON NLS 1 monitor sub Task ref get Identifier NON NLS 1 monitor set Total Count ref get Input Size monitor show Copy Details true try if local File Fragment null http equals ref asURL get Protocol NON NLS 1 local File local File Fragment get File try get partial input stream is ref get Partial Input Stream local File Fragment get Size input Length ref get Input Size local File Fragment get Size get output stream to append to file fragment os new Buffered Output Stream new File Output Stream local File true catch IO Exception e try if is null is close catch IO Exception ioe is null os null local File Fragment null if is null must download from scratch local File Utilities create Local File get Working Directory null try is ref get Input Stream input Length ref get Input Size catch IO Exception e throw Utilities new Core Exception Policy bind Feature Content Provider Unable To Retrieve NON NLS 1 new Object ref e try os new Buffered Output Stream new File Output Stream local File catch File Not Found Exception e throw Utilities new Core Exception Policy bind Feature Content Provider Unable To Create NON NLS 1 new Object local File e Date start new Date if local File Fragment null bytes Copied local File Fragment get Size if monitor null monitor increment Count bytes Copied Transfer as many bytes as possible from input to output stream long offset Update Manager Utils copy is os monitor input Length if offset 1 bytes Copied offset if bytes Copied 0 preserve partially downloaded file Update Manager Utils map Local File Fragment key new File Fragment local File bytes Copied if monitor is Canceled String msg Policy bind Feature Installation Cancelled NON NLS 1 throw new Install Aborted Exception msg null else throw new Feature Download Exception Policy bind Feature Content Provider Exception Downloading NON NLS 1 new Object getURL to External Form new IO Exception else Update Manager Utils un Map Local File Fragment key Date stop new Date long time Inseconds stop get Time start get Time 1000 time in milliseconds 1000 time in seconds Internal Site Manager downloaded ref get Input Size time Inseconds ref asURL success true file is downloaded succesfully map it Utilities map Local File key local File catch Class Cast Exception e throw Utilities new Core Exception Policy bind Feature Content Provider Unable To Create NON NLS 1 new Object local File e finally Do not close IS if user cancel closing IS will read the entire Stream until the end if success is null try is close catch IO Exception e if os null try os close should flush buffer stream catch IO Exception e if success bytes Copied 0 set the timestamp on the temp file to match the remote timestamp local File set Last Modified ref get Last Modified if monitor null monitor restore State locks remove key end lock Content Reference reference ref create Content Reference ref get Identifier local File return reference  IOException CoreException ContentReference asLocalReference ContentReference InstallMonitor IOException CoreException isLocalReference toString localFile FileFragment localFileFragment keyLock keyLock keyLock localFile lookupLocalFile localFile UpdateManagerUtils isSameTimestamp localFile lastModified createContentReference getIdentifier localFile localFile localFileFragment UpdateManagerUtils lookupLocalFileFragment InputStream OutputStream bytesCopied inputLength saveState setTaskName FeatureContentProvider subTask getIdentifier setTotalCount getInputSize showCopyDetails localFileFragment getProtocol localFile localFileFragment getFile getPartialInputStream localFileFragment getSize inputLength getInputSize localFileFragment getSize BufferedOutputStream FileOutputStream localFile IOException IOException localFileFragment localFile createLocalFile getWorkingDirectory getInputStream inputLength getInputSize IOException newCoreException FeatureContentProvider UnableToRetrieve BufferedOutputStream FileOutputStream localFile FileNotFoundException newCoreException FeatureContentProvider UnableToCreate localFile localFileFragment bytesCopied localFileFragment getSize incrementCount bytesCopied UpdateManagerUtils inputLength bytesCopied bytesCopied UpdateManagerUtils mapLocalFileFragment FileFragment localFile bytesCopied isCanceled InstallationCancelled InstallAbortedException FeatureDownloadException FeatureContentProvider ExceptionDownloading toExternalForm IOException UpdateManagerUtils unMapLocalFileFragment timeInseconds getTime getTime InternalSiteManager getInputSize timeInseconds mapLocalFile localFile ClassCastException newCoreException FeatureContentProvider UnableToCreate localFile IOException IOException bytesCopied localFile setLastModified getLastModified restoreState ContentReference createContentReference getIdentifier localFile
Returns the specified reference as a local file If required the file represented by the specified content reference is first downloaded to the local system param ref content reference param monitor progress monitor can be code null code exception IO Exception exception Core Exception since 2 0 public File as Local File Content Reference ref Install Monitor monitor throws IO Exception Core Exception File file ref as File if file null SWITCH COPY LOCAL return file Content Reference local Ref as Local Reference ref monitor file local Ref as File return file  IOException CoreException asLocalFile ContentReference InstallMonitor IOException CoreException asFile SWITCH_COPY_LOCAL ContentReference localRef asLocalReference localRef asFile
Returns working directory for this content provider return working directory exception IO Exception since 2 0 protected File get Working Directory throws IO Exception if tmp Dir null tmp Dir Utilities create Working Directory return tmp Dir  IOException getWorkingDirectory IOException tmpDir tmpDir createWorkingDirectory tmpDir
Returns the total size of all archives required for the specified plug in and non plug in entries the packaging view see I Feature Content Provider get Download Size For I Plugin Entry I Non Plugin Entry public long get Download Size For I Plugin Entry plugin Entries I Non Plugin Entry non Plugin Entries long result 0 if both are null or empty return UNKNOWN size if plugin Entries null plugin Entries length 0 non Plugin Entries null non Plugin Entries length 0 return Content Entry Model UNKNOWN SIZE loop on plugin entries long size 0 if plugin Entries null for int i 0 i plugin Entries length i size Plugin Entry Model plugin Entries i get Download Size if size Content Entry Model UNKNOWN SIZE return Content Entry Model UNKNOWN SIZE result size loop on non plugin entries if non Plugin Entries null for int i 0 i non Plugin Entries length i size Non Plugin Entry Model non Plugin Entries i get Download Size if size Content Entry Model UNKNOWN SIZE return Content Entry Model UNKNOWN SIZE result size return result  IFeatureContentProvider getDownloadSizeFor IPluginEntry INonPluginEntry getDownloadSizeFor IPluginEntry pluginEntries INonPluginEntry nonPluginEntries pluginEntries pluginEntries nonPluginEntries nonPluginEntries ContentEntryModel UNKNOWN_SIZE pluginEntries pluginEntries PluginEntryModel pluginEntries getDownloadSize ContentEntryModel UNKNOWN_SIZE ContentEntryModel UNKNOWN_SIZE nonPluginEntries nonPluginEntries NonPluginEntryModel nonPluginEntries getDownloadSize ContentEntryModel UNKNOWN_SIZE ContentEntryModel UNKNOWN_SIZE
Returns the total size of all files required for the specified plug in and non plug in entries the logical view see I Feature Content Provider get Install Size For I Plugin Entry I Non Plugin Entry public long get Install Size For I Plugin Entry plugin Entries I Non Plugin Entry non Plugin Entries long result 0 if both are null or empty return UNKNOWN size if plugin Entries null plugin Entries length 0 non Plugin Entries null non Plugin Entries length 0 return Content Entry Model UNKNOWN SIZE loop on plugin entries long size 0 if plugin Entries null for int i 0 i plugin Entries length i size Plugin Entry Model plugin Entries i get Install Size if size Content Entry Model UNKNOWN SIZE return Content Entry Model UNKNOWN SIZE result size loop on non plugin entries if non Plugin Entries null for int i 0 i non Plugin Entries length i size Non Plugin Entry Model non Plugin Entries i get Install Size if size Content Entry Model UNKNOWN SIZE return Content Entry Model UNKNOWN SIZE result size return result  IFeatureContentProvider getInstallSizeFor IPluginEntry INonPluginEntry getInstallSizeFor IPluginEntry pluginEntries INonPluginEntry nonPluginEntries pluginEntries pluginEntries nonPluginEntries nonPluginEntries ContentEntryModel UNKNOWN_SIZE pluginEntries pluginEntries PluginEntryModel pluginEntries getInstallSize ContentEntryModel UNKNOWN_SIZE ContentEntryModel UNKNOWN_SIZE nonPluginEntries nonPluginEntries NonPluginEntryModel nonPluginEntries getInstallSize ContentEntryModel UNKNOWN_SIZE ContentEntryModel UNKNOWN_SIZE
Returns the path identifier for a plugin entry code plugins lt plugin Id   lt plugin Version jar code return the path identifier protected String get PathID I Plugin Entry entry return Site DEFAULT PLUGIN PATH entry get Versioned Identifier to String JAR EXTENSION  pluginId _ pluginVersion getPathID IPluginEntry DEFAULT_PLUGIN_PATH getVersionedIdentifier toString JAR_EXTENSION
Returns the path identifer for a non plugin entry code features lt feature Id   lt feature Version lt data Id code return the path identifier protected String get PathID I Non Plugin Entry entry String non Plugin BaseID Site DEFAULT FEATURE PATH feature get Versioned Identifier to String NON NLS 1 return non Plugin BaseID entry get Identifier  featureId _ featureVersion dataId getPathID INonPluginEntry nonPluginBaseID DEFAULT_FEATURE_PATH getVersionedIdentifier toString nonPluginBaseID getIdentifier
Sets the permission of all the Content References Check for the permissions content Reference and use it to set the permissions of other Content Reference protected void validate Permissions Content Reference references if references null references length 0 return Map permissions get Permissions references if permissions is Empty return for int i 0 i references length i Content Reference content Reference references i String id content Reference get Identifier Object value null if value matches One Rule id permissions null Integer permission Integer value content Reference set Permission permission int Value  ContentReferences contentReference ContentReference validatePermissions ContentReference getPermissions isEmpty ContentReference contentReference contentReference getIdentifier matchesOneRule contentReference setPermission intValue
Returns the value of the matching rule or code null code if none found A rule is matched if the id is equals to a key or if the id is resolved by a key if the id is code path file txt code it is resolved by code path code or code path txt code param id the identifier param permissions list of rules return Object the value of the matcing rule or code null code private Object matches One Rule String id Map permissions Set key Set permissions key Set Iterator iter key Set iterator while iter has Next File Filter rule File Filter iter next if rule accept id return permissions get rule return null  matchesOneRule keySet keySet keySet hasNext FileFilter FileFilter
private Map get Permissions Content Reference references Map result new Hash Map search for permissions boolean notfound true Content Reference permission Reference null for int i 0 i references length notfound i Content Reference content Reference references i if DOT PERMISSIONS equals content Reference get Identifier notfound false permission Reference content Reference if notfound return result Properties prop new Properties try prop load permission Reference get Input Stream catch IO Exception e Update Core warn e NON NLS 1 String executables prop get Property EXECUTABLES if executables null return result String Tokenizer tokenizer new String Tokenizer executables NON NLS 1 Integer default Executable Permission new Integer Content Reference DEFAULT EXECUTABLE PERMISSION while tokenizer has More Tokens File Filter filter new File Filter tokenizer next Token result put filter default Executable Permission return result  getPermissions ContentReference HashMap ContentReference permissionReference ContentReference contentReference DOT_PERMISSIONS contentReference getIdentifier permissionReference contentReference permissionReference getInputStream IOException UpdateCore getProperty StringTokenizer StringTokenizer defaultExecutablePermission ContentReference DEFAULT_EXECUTABLE_PERMISSION hasMoreTokens FileFilter FileFilter nextToken defaultExecutablePermission

Feature reference default constructor public Feature Reference super  FeatureReference
Constructor Feature Reference param ref the reference to copy public Feature Reference I Feature Reference ref super Feature Reference Model ref try setURL ref getURL catch Core Exception e Update Core warn e NON NLS 1  FeatureReference FeatureReference IFeatureReference FeatureReferenceModel CoreException UpdateCore
Constructor Feature Reference param ref the reference to copy public Feature Reference Feature Reference Model ref super ref try setURL ref getURL catch Core Exception e Update Core warn e NON NLS 1  FeatureReference FeatureReference FeatureReferenceModel CoreException UpdateCore
Returns the feature this reference points to return the feature on the Site deprecated use get Feaure I Progress Monitor public I Feature get Feature throws Core Exception return get Feature null  getFeaure IProgressMonitor IFeature getFeature CoreException getFeature
Returns the feature this reference points to return the feature on the Site public I Feature get Feature I Progress Monitor monitor throws Core Exception if exact Feature null return exact Feature exact Feature get Feature this monitor return exact Feature  IFeature getFeature IProgressMonitor CoreException exactFeature exactFeature exactFeature getFeature exactFeature
Returns the feature the reference points to param ref the feature reference return the feature on the Site protected I Feature get Feature I Feature Reference ref I Progress Monitor monitor throws Core Exception I Feature feature null URL refURL ref getURL feature create Feature refURL monitor return feature  IFeature getFeature IFeatureReference IProgressMonitor CoreException IFeature createFeature
private I Feature create Feature URL url I Progress Monitor monitor throws Core Exception String type get Type I Site site get Site if the site exists use the site factory if site null return site create Feature type url monitor I Feature Factory factory Feature Type Factory get Instance get Factory type return factory create Feature url site monitor  IFeature createFeature IProgressMonitor CoreException getType ISite getSite createFeature IFeatureFactory FeatureTypeFactory getInstance getFactory createFeature
Returns the update site for the referenced feature see I Feature Reference get Site since 2 0 public I Site get Site return I Site get Site Model  IFeatureReference getSite ISite getSite ISite getSiteModel
Sets the feature reference URL This is typically performed as part of the feature reference creation operation Once set the url should not be reset see I Feature Reference setURL URL since 2 0 public void setURL URL url throws Core Exception if url null setURL String url to External Form try resolve url null catch MalformedURL Exception e throw Utilities new Core Exception Policy bind Feature Reference Unable To ResolveURL url to External Form e NON NLS 1  IFeatureReference CoreException setURLString toExternalForm MalformedURLException newCoreException FeatureReference UnableToResolveURL toExternalForm
Associates a site with the feature reference This is typically performed as part of the feature reference creation operation Once set the site should not be reset see I Feature Reference set Site I Site since 2 0 public void set Site I Site site set Site Model Site Model site  IFeatureReference setSite ISite setSite ISite setSiteModel SiteModel
Returns the feature identifier see I Feature Reference get Versioned Identifier since 2 0 public Versioned Identifier get Versioned Identifier if version Id null return version Id String id get Feature Identifier String ver get Feature Version if id null ver null try version Id new Versioned Identifier id ver return version Id catch Exception e Update Core warn Unable to create versioned identifier id ver NON NLS 1 NON NLS 2 we need the exact match or we may have an infinite loop version Id new Versioned Identifier getURL to External Form null try version Id get Feature null get Versioned Identifier catch Core Exception e Update Core warn e NON NLS 1 return version Id  IFeatureReference getVersionedIdentifier VersionedIdentifier getVersionedIdentifier versionId versionId getFeatureIdentifier getFeatureVersion versionId VersionedIdentifier versionId UpdateCore versionId VersionedIdentifier toExternalForm versionId getFeature getVersionedIdentifier CoreException UpdateCore versionId
see org eclipse update core I Feature Reference get Name public String get Name if super get Label null return super get Label try return get Feature null get Label catch Core Exception e return get Versioned Identifier to String  IFeatureReference getName getName getLabel getLabel getFeature getLabel CoreException getVersionedIdentifier toString
Get optional operating system specification as a comma separated string return the operating system specification string or code null code since 2 1 public String getOS if super getOS null getURL null try return get Feature null getOS catch Core Exception e return null return super getOS  getFeature CoreException
Get optional windowing system specification as a comma separated string return the windowing system specification string or code null code since 2 1 public String getWS if super getWS null getURL null try return get Feature null getWS catch Core Exception e return null return super getWS  getFeature CoreException
Get optional system architecture specification as a comma separated string return the system architecture specification string or code null code since 2 1 public String getOS Arch if super getOS Arch null getURL null try return get Feature null getOS Arch catch Core Exception e return null return super getOS Arch  getOSArch getOSArch getFeature getOSArch CoreException getOSArch
Get optional locale specification as a comma separated string return the locale specification string or code null code since 2 1 public String getNL if super getNL null getURL null try return get Feature null getNL catch Core Exception e return null return super getNL  getFeature CoreException
Returns code true code if this feature is patching another feature code false code otherwise return boolean public boolean is Patch if super get Patch null try return get Feature null is Patch catch Core Exception e return false return true equals Ignore Case super get Patch NON NLS 1  isPatch getPatch getFeature isPatch CoreException equalsIgnoreCase getPatch

return the archive symbolic path or code null code since 2 0 
Retrieve the site archive URL return the archive URL or code null code since 2 0 

separated by a slash For example code tools utilities print code defines a category that is a child of code tools utilities code and grandchild of code tools code p 
directly instantiate or subclass the provided implementation of this interface p 
b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken 

for a feature p Clients may implement this interface However in most cases clients will only use the content consumer provided by the feature type s implemented by the platform p 
p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken 

Indicates a happy feature A feature is considered to be ambiguous in the context of a local site 
if all the plug ins referenced by the feature are installed on the site and other version of any of the plug ins are installed on any other site of the local site see org eclipse update configuration I Configured Site get Broken Status I Feature  IConfiguredSite getBrokenStatus IFeature
public static final int STATUS AMBIGUOUS 1  STATUS_AMBIGUOUS
Indicates an unhappy feature A feature is considered to be unhappy in the context of this site if some of the plug ins referenced by the feature are not installed on this site 
since 2 0 public static final int STATUS UNHAPPY 2  STATUS_UNHAPPY
Indicates a disable feature see org eclipse update configuration I Configured Site get Broken Status I Feature  IConfiguredSite getBrokenStatus IFeature
public static final int STATUS DISABLED 1  STATUS_DISABLED
Indicates the one click update will search the location of the nesting root feature since 2 0 1 
public static final int SEARCH LOCATION DEFAULT 0  SEARCH_LOCATION_DEFAULT
Indicates the one click update will search the location defined by the feature since 2 0 1 
public static final int SEARCH LOCATION FEATURE 1  SEARCH_LOCATION_FEATURE
Indicates the one click update will search both the location of the nesting root feature and the location defined by the feature 
since 2 0 1 public static final int SEARCH LOCATION BOTH 2  SEARCH_LOCATION_BOTH
Returns the feature identifier return the feature identifier since 2 0 
Returns the site this feature is associated with return the site for this feature 
public I Site get Site Returns the displayable label of the feature return feature label or code null code since 2 0  ISite getSite
public String get Label Returns the feature URL This is the URL that was used to create the feature The interpretation of the URL is dependent on the concrete feature implementation return feature URL since 2 0  getLabel
public URL getURL Returns an information entry referencing the location of the 
feature updates for this feature return update site entry or code null code since 2 0 
public IURL Entry get Update Site Entry Return an array of information entries referencing locations of other  IURLEntry getUpdateSiteEntry
update sites This mechanism can be used by features to distribute location information about general update sites to clients return an array of site entries or an empty array 
public IURL Entry get Discovery Site Entries  IURLEntry getDiscoverySiteEntries
Returns a displayable label identifying the provider of this feature return provider label or code null code since 2 0 
public String get Provider Returns and optional custom install handler entry  getProvider
return install handler entry or code null code if none was specified since 2 0 
public I Install Handler Entry get Install Handler Entry Returns the feature description  IInstallHandlerEntry getInstallHandlerEntry
return feature rescription or code null code since 2 0 public IURL Entry get Description  IURLEntry getDescription
Returns the copyright information for the feature 
since 2 0 public IURL Entry get Copyright  IURLEntry getCopyright
Returns the license information for the feature return feature license or code null code since 2 0 
Return optional image for the feature 
return the URL pointing to the image or code null code since 2 0 public URL get Image  getImage
dependency is a reference to a plug in required for feature execution that is not packaged as part of the feature filtered by the operating system windowing system and architecture system set in code Sitemanager code return the list of required plug in dependencies or an empty array since 2 0 
Return a list of plug in dependencies for this feature A plug in dependency is a reference to a plug in required for feature execution that is not packaged as part of the feature 
No filtering occurs return the list of required plug in dependencies or an empty array since 2 1 
public I Import get Raw Imports Return the identifier of the primary plugin associated to this feature  IImport getRawImports

feature p A feature content consumer delegates the storage of plug in and non plug in files to a generic content consumer p p Clients may implement this interface However in most cases clients will only use the feature content consumer provided by the feature type s 
implemented by the platform p p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken 
repeatedly as the API evolves p see org eclipse update core I Content Consumer since 2 0 public interface I Feature Content Consumer  IContentConsumer IFeatureContentConsumer
Store a feature file Note that only the feature definition files should be stored using this method Plug in files and non plug in data files should be 
stored using the content consumers corresponding to their respective entries see open I Plugin Entry see open I Non Plugin Entry  IPluginEntry INonPluginEntry
param content Reference content reference to feature file param monitor progress monitor can be code null code exception Core Exception since 2 0  contentReference CoreException
public void store Content Reference content Reference I Progress Monitor monitor throws Core Exception  ContentReference contentReference IProgressMonitor CoreException
Opens a generic content consumer for the specified plug in entry Plug in files corresponding to this entry should be stored using this content consumer param plugin Entry plug in entry  pluginEntry
return generic content consumer for the entry exception Core Exception since 2 0 public I Content Consumer open I Plugin Entry plugin Entry throws Core Exception  CoreException IContentConsumer IPluginEntry pluginEntry CoreException
Opens a generic content consumer for the specified non plug in entry Non plug in files corresponding to this entry should be stored using this content consumer 
param non Plugin Entry non plug in entry return generic content consumer for the entry exception Core Exception since 2 0  nonPluginEntry CoreException

li the logical view which is a representation of the actual files that make up the feature These include any files that describe the feature itself files that are the actual implementation of referenced plug ins and files that are the non plug in data files associated with the feature li the packaged view which is a set of related archive files that 
ol It is the responsibility of a feature content provider to manage the mapping between the packaged and logical views p p Clients may implement this interface However in most cases clients should directly instantiate or subclass the provided implementation of this 
p p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see org eclipse update core Feature Content Provider  FeatureContentProvider
public interface I Feature Content Provider Returns the feature url The exact interpretation of this URL is specific to each content provider Typically the URL is a reference to a file that can be used directly or indirectly to determine the content of the feature return feature url since 2 0 public URL getURL  IFeatureContentProvider
Returns a content reference to the feature manifest The feature manifest is an xml file whose format is specified by the platform Typically a feature will contain the manifest as one of the packaged files For features that do not contain the manifest or contain a manifest that does not follow the specified format this method returns a reference to a computed manifest in the appropriate platform format param monitor progress monitor can be code null code 
since 2 0 public Content Reference get Feature Manifest Reference Install Monitor monitor throws Core Exception Returns an array of content references of all the packaged archives that make up this feature p The number of returned references is dependent on each feature content provider i e is dependent on the packaging mechanism used by the particular feature type p  ContentReference getFeatureManifestReference InstallMonitor CoreException
return an array of references or an empty array if no references are found exception Core Exception since 2 0 public Content Reference get Archive References Install Monitor monitor throws Core Exception  CoreException ContentReference getArchiveReferences InstallMonitor CoreException
Returns an array of content references of the packaged archives that contain the feature descriptive information p In general the feature descriptive information should be packaged separately from the bulk of the actual feature content The feature entry archive s must be downloaded from an update 
site in order to present information about the feature to the client Consequently keeping the number and size of the feature entry archive s to a minimum will speed up the responsiveness of the user interface p p The number of returned references is dependent on each feature 
by the particular feature type p see I Feature Content Provider get Feature Entry Content References Install Monitor param monitor progress monitor can be code null code return an array of references or an empty array if no references are found  IFeatureContentProvider getFeatureEntryContentReferences InstallMonitor
exception Core Exception since 2 0 public Content Reference get Feature Entry Archive References Install Monitor monitor throws Core Exception  CoreException ContentReference getFeatureEntryArchiveReferences InstallMonitor CoreException
Returns an array of content references of the packaged archives that contain the files for the specified plug in entry p 
content provider i e is dependent on the packaging mechanism used by the particular feature type p 

A feature factory is used to construct new instances of concrete features p Clients may implement this interface However in most cases clients should directly instantiate or subclass the provided implementation of this interface p p 
change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see org eclipse update core Base Feature Factory since 2 0 public interface I Feature Factory  BaseFeatureFactory IFeatureFactory

Feature reference A reference to a feature p Clients may implement this interface However in most cases clients should 
directly instantiate or subclass the provided implementation of this interface p p 
b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves 
see org eclipse update core Feature Reference since 2 0 public interface I Feature Reference extends I Adaptable I Platform Environment  FeatureReference IFeatureReference IAdaptable IPlatformEnvironment
Returns the referenced feature URL return feature URL 
public URL getURL 
return feature site since 2 0 
Returns the label for the referenced feature 
since 2 1 public String get Name  getName

p p b Note b This class interface is part of an interim API that is still under development and expected to 
from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
since 2 0 public interface I Import extends I Adaptable I Update Constants I Platform Environment  IImport IAdaptable IUpdateConstants IPlatformEnvironment
The import relates to a plugin since 2 0 2 
The import relates to a feature since 2 0 2 

Returns the referenced feature This is a factory method that creates the full feature object equivalent to get Feature false null return the referenced feature deprecated use get Feature I Progress Monitor since 2 0  getFeature getFeature IProgressMonitor
Returns the referenced feature This is a factory method that creates the full feature object param perfect Match code true code if the perfect match feature feature should be returned code false code if the best match feature should be returned param configured Site the configured site to search for the Feature If the configured site is code null code the search will be done in the current configured site return the referenced feature instead since 2 0 2 b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves deprecated use get Feature I Progress Monitor  perfectMatch configuredSite getFeature IProgressMonitor
Returns the referenced feature This is a factory method that creates the full feature object param perfect Match code true code if the perfect match feature feature should be returned code false code if the best match feature should be returned param configured Site the configured site to search for the Feature If the configured site is code null code the search will be done in the current configured site param monitor the progress monitor return the referenced feature since 2 1 b Note b This method is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves deprecated use get Feature I Progress Monitor  perfectMatch configuredSite getFeature IProgressMonitor
Returns code true code if the feature is optional code false code otherwise return boolean since 2 0 1 
Returns the matching rule for this included feature The rule will determine the ability of the included feature to move version without causing the overall feature to appear broken The default is code RULE PERFECT code see I Update Constants RULE PERFECT see I Update Constants RULE EQUIVALENT see I Update Constants RULE COMPATIBLE see I Update Constants RULE GREATER OR EQUAL return int representation of feature matching rule since 2 0 2 deprecated since 3 0 included feature version is exactly specified  RULE_PERFECT IUpdateConstants RULE_PERFECT IUpdateConstants RULE_EQUIVALENT IUpdateConstants RULE_COMPATIBLE IUpdateConstants RULE_GREATER_OR_EQUAL
Returns the search location for this included feature The location will be used to search updates for this feature The default is code SEARCH ROOT code see I Update Constants SEARCH ROOT see I Update Constants SEARCH SELF return int representation of feature searching rule since 2 0 2  SEARCH_ROOT IUpdateConstants SEARCH_ROOT IUpdateConstants SEARCH_SELF

Initialize the install handler Install handlers are always constructed using the default constructor The are initialized immediately following construction param type update action type param feature the target of the action param entry model entry that defines this handler param monitor optional progress monitor can be code null code exception Core Exception since 2 0 public void initialize int type I Feature feature I Install Handler Entry entry Install Monitor monitor  CoreException IFeature IInstallHandlerEntry InstallMonitor
Called at the start of the install action At this point no install processing has taken place see HANDLER ACTION INSTALL exception Core Exception terminates the action since 2 0  HANDLER_ACTION_INSTALL CoreException
Called after files corresponding to plug in entries have been downloaded but before they are actully unpacked and installed see HANDLER ACTION INSTALL param plugins downloaded plug in entries Note this may be a subset of the plug ins actually references by the feature exception Core Exception terminates the action since 2 0  HANDLER_ACTION_INSTALL CoreException
Called after files corresponding to non plug in entries have been downloaded The custom install handler can perform any custom verification of the non plug in entries these are not interpreted in any way by the platform beyond downloading see HANDLER ACTION INSTALL param non Plugin Data downloaded non plug in entries param listener verification listener may be code null code exception Core Exception terminates the action since 2 0 public void non Plugin Data Downloaded I Non Plugin Entry non Plugin Data I Verification Listener listener  HANDLER_ACTION_INSTALL nonPluginData CoreException nonPluginDataDownloaded INonPluginEntry nonPluginData IVerificationListener
Called after the feature files and any downloaded plug ins have been installed Typically this is the point where the custom install handler can install any non plug in entries these are not interpreted in any way by the platform beyond downloading see HANDLER ACTION INSTALL param consumer content consumer for the feature The install handler can choose to use this consumer to install the non plug in data or can handle the data in any other way If using the consumer the install handler should only call see I Feature Content Consumer store Content Reference I Progress Monitor and see I Feature Content Consumer open I Non Plugin Entry methods of the consumer exception Core Exception terminates the action since 2 0 public void complete Install I Feature Content Consumer consumer  HANDLER_ACTION_INSTALL IFeatureContentConsumer ContentReference IProgressMonitor IFeatureContentConsumer INonPluginEntry CoreException completeInstall IFeatureContentConsumer
Called at the end of the install action see HANDLER ACTION INSTALL param success indicates action success exception Core Exception terminates the action since 2 0  HANDLER_ACTION_INSTALL CoreException
Called at the start of the configure action see HANDLER ACTION CONFIGURE exception Core Exception terminates the action since 2 0  HANDLER_ACTION_CONFIGURE CoreException
Called after the feature has been configured The install handler should perform any completion tasks No arguments are passed to the method If needed the install handler can use arguments passed on the initialization call see HANDLER ACTION CONFIGURE exception Core Exception terminates the action since 2 0  HANDLER_ACTION_CONFIGURE CoreException
Called at the end of the configure action see HANDLER ACTION CONFIGURE param success indicates action success exception Core Exception terminates the action since 2 0  HANDLER_ACTION_CONFIGURE CoreException
Called at the start of the unconfigure action see HANDLER ACTION UNCONFIGURE exception Core Exception terminates the action since 2 0  HANDLER_ACTION_UNCONFIGURE CoreException
Called after the feature has been unconfigured The install handler should perform any completion tasks No arguments are passed to the method If needed the install handler can use arguments passed on the initialization call see HANDLER ACTION UNCONFIGURE exception Core Exception terminates the action since 2 0  HANDLER_ACTION_UNCONFIGURE CoreException
Called at the end of the unconfigure action see HANDLER ACTION UNCONFIGURE param success indicates action success exception Core Exception terminates the action since 2 0  HANDLER_ACTION_UNCONFIGURE CoreException
Called at the start of the uninstall action see HANDLER ACTION UNINSTALL exception Core Exception terminates the action since 2 0  HANDLER_ACTION_UNINSTALL CoreException
Called after the feature has been uninstalled The install handler should perform any completion tasks No arguments are passed to the method If needed the install handler can use arguments passed on the initialization call Note that at this point the feature files and any unreferenced plug ins have been removed see HANDLER ACTION UNINSTALL exception Core Exception terminates the action since 2 0  HANDLER_ACTION_UNINSTALL CoreException
Called at the end of the uninstall action see HANDLER ACTION UNINSTALL param success indicates action success exception Core Exception terminates the action since 2 0  HANDLER_ACTION_UNINSTALL CoreException

Returns optional URL used for browser triggered installation handling return url since 2 0 
Returns optional name of a library containing the install handler classes If specified the referenced library must be contained in the feature archive return install handler library name since 2 0 
Returns install handler name It is interpreted depending on the value of the library specification If library is not specified the name is intepreted as an identifier of a global install handler registered in the code org eclipse update core install Handlers code extension point If library is specified the name is interpreted as a fully qualified name of a class contained in the library In both cases the resulting class must implement I Install Handler The class is dynamically loaded and called at specific points during feature processing The handler has visibility to the API classes from the update plug in and plug ins required by the update plugin see I Install Handler return handler name since 2 0  installHandlers IInstallHandler IInstallHandler

This class may be instantiated or subclassed by clients p p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see org eclipse update core I Import see org eclipse update core model Import Model since 2 0  IImport ImportModel
public class Import extends Import Model implements I Import PERF new instance variable  ImportModel IImport
Returns an identifier of the dependent plug in 
if version Id null return version Id String id get Identifier  versionId versionId getIdentifier

Construct a included feature reference since 2 1 public Included Feature Reference super  IncludedFeatureReference
Construct a feature options param included Feature Ref reference to clone since 2 0 2 public Included Feature Reference I Included Feature Reference included Feature Ref super Included Feature Reference Model included Feature Ref  includedFeatureRef IncludedFeatureReference IIncludedFeatureReference includedFeatureRef IncludedFeatureReferenceModel includedFeatureRef
Constructor Included Feature Reference param feature Reference public Included Feature Reference I Feature Reference feature Reference super feature Reference  IncludedFeatureReference featureReference IncludedFeatureReference IFeatureReference featureReference featureReference
private boolean is Disabled I Configured Site c Site get Site get Current Configured Site if c Site null return false I Feature Reference configured c Site get Configured Features for int i 0 i configured length i if this equals configured i return false return true FIXME the above code was commented out and returned false Should this be commented out again return false  isDisabled IConfiguredSite cSite getSite getCurrentConfiguredSite cSite IFeatureReference cSite getConfiguredFeatures
private boolean is Uninstalled if is Disabled return false I Feature Reference installed get Site get Feature References for int i 0 i installed length i if this equals installed i return false if we reached this point the configured site exists and it does not contain this feature reference so clearly the feature is uninstalled return true  isUninstalled isDisabled IFeatureReference getSite getFeatureReferences
see org eclipse update core I Included Feature Reference get Feature boolean I Configured Site deprecated use get Feature I Progress Monitor public I Feature get Feature boolean perfect Match I Configured Site configured Site throws Core Exception return get Feature null  IIncludedFeatureReference getFeature IConfiguredSite getFeature IProgressMonitor IFeature getFeature perfectMatch IConfiguredSite configuredSite CoreException getFeature
see org eclipse update core I Included Feature Reference get Feature boolean I Configured Site I Progress Monitor deprecated use get Feature I Progress Monitor public I Feature get Feature boolean perfect Match I Configured Site configured Site I Progress Monitor monitor throws Core Exception return get Feature monitor  IIncludedFeatureReference getFeature IConfiguredSite IProgressMonitor getFeature IProgressMonitor IFeature getFeature perfectMatch IConfiguredSite configuredSite IProgressMonitor CoreException getFeature
see org eclipse update core I Feature Reference get Feature deprecated use get Feature I Progress Monitor public I Feature get Feature throws Core Exception return get Feature null  IFeatureReference getFeature getFeature IProgressMonitor IFeature getFeature CoreException getFeature
see org eclipse update core I Feature Reference get Feature I Progress Monitor public I Feature get Feature I Progress Monitor monitor throws Core Exception if is Uninstalled throw new Core Exception new Status I Status ERROR Update Core get Plugin get Bundle get Symbolic Name I Status OK Policy bind Included Feature Reference feature Uninstalled NON NLS 1 get Feature Identifier null else return super get Feature monitor  IFeatureReference getFeature IProgressMonitor IFeature getFeature IProgressMonitor CoreException isUninstalled CoreException IStatus UpdateCore getPlugin getBundle getSymbolicName IStatus IncludedFeatureReference featureUninstalled getFeatureIdentifier getFeature

indicate the non plug in file is packaged together with any other feature files The actual packaging details are determined by the feature content provider for the feature 
Clients may implement this interface However in most cases clients should directly instantiate or subclass the provided implementation of this interface p 
b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves 

Constructor for Install Handler Entry since 2 0 public Install Handler Entry super  InstallHandlerEntry InstallHandlerEntry

change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p since 2 0 
public class Install Monitor implements I Progress Monitor  InstallMonitor IProgressMonitor
protected I Progress Monitor monitor protected Stack tasks  IProgressMonitor
protected Stack tasks protected String task String  taskString
protected String task String protected String sub Task String protected boolean show Details  taskString subTaskString showDetails
protected long total Copy Count protectedlong current Count 0  totalCopyCount currentCount
protected class Monitor State private String task String private String sub Task String private boolean show Details private long total Copy Count  MonitorState taskString subTaskString showDetails totalCopyCount
private Monitor State String task String String sub Task String boolean show Details  MonitorState taskString subTaskString showDetails
this task String task String this sub Task String sub Task String this show Details show Details this total Copy Count total Copy Count  taskString taskString subTaskString subTaskString showDetails showDetails totalCopyCount totalCopyCount
private String get Task String return this task String  getTaskString taskString
private String get Sub Task String return this sub Task String  getSubTaskString subTaskString
return this show Details private long get Total Copy Count  showDetails getTotalCopyCount
protected Install Monitor  InstallMonitor
Install monitor constructor param monitor base install monitor since 2 0 public Install Monitor I Progress Monitor monitor  InstallMonitor IProgressMonitor
this tasks new Stack this task String NON NLS 1 this sub Task String NON NLS 1 this show Details false  taskString subTaskString showDetails
Begin new monitor task see I Progress Monitor begin Task String int  IProgressMonitor beginTask
since 2 0 public void begin Task String name int total Work task String name monitor begin Task name total Work  beginTask totalWork taskString beginTask totalWork
Indicate completion of monitor activity see I Progress Monitor done since 2 0 public void done monitor done  IProgressMonitor
Indicate monitor progress see I Progress Monitor internal Worked double  IProgressMonitor internalWorked
since 2 0 public void internal Worked double work monitor internal Worked work Check is use indicated that the operation be cancelled see I Progress Monitor is Canceled since 2 0  internalWorked internalWorked IProgressMonitor isCanceled
public boolean is Canceled return monitor is Canceled Set the cancellation state  isCanceled isCanceled

Returns optional operating system specification A comma separated list of os designators defined by the platform Indicates this entry should only be installed on one of the specified os systems If this attribute is not specified or is code code the entry can be installed on all systems portable implementation If the This information is used as a hint by the installation and update support return the operating system specification or code null code since 2 0 
Returns optional system architecture specification A comma separated list of arch designators defined by the platform Indicates this entry should only be installed on one of the specified systems If this attribute is not specified or is code code the entry can be installed on all systems portable implementation This information is used as a hint by the installation and update support return system architecture specification or code null code since 2 0 
Returns optional system architecture specification A comma separated list of arch designators defined by the platform Indicates this entry should only be installed on one of the specified systems If this attribute is not specified or is code code the entry can be installed on all systems portable implementation This information is used as a hint by the installation and update support return system architecture specification or code null code since 2 0 
Returns optional locale specification A comma separated list of locale designators defined by Java Indicates this entry should only be installed on a system running with a compatible locale using Java locale matching rules If this attribute is not specified or is code code the entry can be installed on all systems language neutral implementation This information is used as a hint by the installation and update support return the locale specification or code null code since 2 0 

feature files The actual packaging details are determined by the feature content provider for the feature p 
directly instantiate or subclass the provided implementation of this interface p p 
b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
see org eclipse update core Plugin Entry see org eclipse update core Feature Content Provider since 2 0 public interface I Plugin Entry extends I Platform Environment I Adaptable  PluginEntry FeatureContentProvider IPluginEntry IPlatformEnvironment IAdaptable
Returns the identifier of this plugin entry return plugin entry identifier 

see org eclipse update core Site since 2 0 public interface I Site extends I Adaptable  ISite IAdaptable
Default type for an installed feature Different concrete feature implementations can be registered together with their corresponding type using the code org eclipse update core feature Types code  featureTypes
extension point since 2 0 
public static final String DEFAULT INSTALLED FEATURE TYPE org eclipse update core installed NON NLS 1 Default type for a packaged feature Different concrete feature  DEFAULT_INSTALLED_FEATURE_TYPE
implementations can be registered together with their corresponding type using the code org eclipse update core feature Types code extension point  featureTypes
public static final String DEFAULT PACKAGED FEATURE TYPE org eclipse update core packaged NON NLS 1  DEFAULT_PACKAGED_FEATURE_TYPE
If we are unable to access a site the returned Core Exception will contain this return code since 2 0 1  CoreException
public static final int SITE ACCESS EXCEPTION 42 Returns the site URL  SITE_ACCESS_EXCEPTION
since 2 0 public URL getURL 
registered together with their corresponding type using the code org eclipse update core site Types code extension point return site type or code null code since 2 0  siteTypes
public String get Type Returns the site description  getType
return site description or code null code since 2 0 public IURL Entry get Description  IURLEntry getDescription
Returns an array of categories defined by the site 
return array of site categories or an empty array since 2 0 public I Category get Categories  ICategory getCategories
Returns the named site category param name category name return named category or code null code ifit does not exist 
public I Category get Category String name Returns an array of references to features on this site  ICategory getCategory
since 2 0 public I Site Feature Reference get Feature References Returns an array of references to features on this site  ISiteFeatureReference getFeatureReferences
return an array of feature references or an empty array since 2 1 public I Site Feature Reference get Raw Feature References  ISiteFeatureReference getRawFeatureReferences
Returns a reference to the specified feature if it is installed on this site filtered by the operating system windowing system and architecture system set in code Sitemanager code 
return feature reference or code null code if this feature cannot be located on this site since 2 0 public I Site Feature Reference get Feature Reference I Feature feature  ISiteFeatureReference getFeatureReference IFeature
Returns an array of plug in and non plug in archives located on this site 
no archives known to this site Note that an empty array does not necessarily indicate there are no archives accessible on this site It simply indicates the site has no prior knowledge of such archives 
public I Archive Reference get Archives Returns the content provider for this site A content provider is an abstraction of each site organization It allows the content of the site to be accessed in a standard way  IArchiveReference getArchives
need to be able to return a content provider return site content provider exception Core Exception since 2 0 public I Site Content Provider get Site Content Provider throws Core Exception  CoreException ISiteContentProvider getSiteContentProvider CoreException

organization It allows the site content to be accessed in a standard way regardless of the internal organization All concrete site implementations need to implement a site content provider p 
directly instantiate or subclass the provided implementation of this interface p p 
change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves 
see org eclipse update core Site Content Provider since 2 0  SiteContentProvider

A site factory is used to construct new instances of concrete sites p Clients may implement this interface However in most cases clients should directly instantiate or subclass the provided implementation of this interface p p 

public interface I Site Factory Extension Returns a site defined by the supplied URL p The actual interpretation of the URL is site type specific In most cases the URL will point to some site specific file that can be used directly or indirectly to construct the site object p param url URL interpreted by the site param monitor a progress monitor that can be canceled return site object exception Core Exception exception Invalid Site Type Exception the referenced site type is not a supported type for this factory since 2 0 public I Site create Site URL url I Progress Monitor monitor  ISiteFactoryExtension CoreException InvalidSiteTypeException ISite createSite IProgressMonitor

Returns an array of categories the referenced feature belong to return an array of categories or an empty array since 2 1 
Adds a category to the referenced feature param category new category since 2 1 

pointing to full browsable description p Clients may implement this interface However in most cases clients should 
interface p p 
change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 

Determine if we should continue with the current action based on the indicated verification results Typically the implementation of this method will prompt the user for the appropriate answer However other respose implementations can be provided param result verification result since 2 0 

Returns the content reference that is the target of the verification return content reference since 2 0 
Returns the feature the referenced file is part of return feature since 2 0 
Returns the verification code return verification code as defined in this interface since 2 0 
Returns any exception caught during verification return exception or code null code since 2 0 
Returns display text describing the result of the verification return result text or code null code since 2 0 
Returns text describing the signer return signer information or code null code since 2 0 
Returns text describing the authority that verified certified the signer return verifier information or code null code since 2 0 
Indicates whether the referenced file is part of the overall feature definition or one of its component plug in or non plug in entries return code true code if reference is a feature file code false code if reference is a plug in or non plug in file since 2 0 
Indicates whether the signer and verifier info have already been accepted by the user during a previous verification of one of the file of the feature return code true code if the result has already been accepted code false code if the result has not yet been accepted by the user since 2 0 

Perform verification of the specified archive param feature feature containing this archive param reference actual archive reference param is Feature Verification code true code indicates the specified reference should be considered as part of the feature description information ie verifying the overall feature code false code indicates the specified reference is a plug in or a non plug in archive file ie verifying a component of the feature param monitor progress monitor can be code null code return verification result exception Core Exception since 2 0 public I Verification Result verify I Feature feature Content Reference reference boolean is Feature Verification Install Monitor monitor  isFeatureVerification CoreException IVerificationResult IFeature ContentReference isFeatureVerification InstallMonitor
Sets the parent verifier The parent verifier can only be set once by the parent feature It may used for different verification strategies for instance you may decide that both the parent and current verifier must sucessfully verify the content reference or that only one of them must verify param parent Verifier the parent verifier  parentVerifier
Returns the parent verifier return the parent verifier since 2 0 

p p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves 
see org eclipse update core Content Reference see org eclipse update core Jar Entry Content Reference since 2 0 public class Jar Content Reference extends Content Reference  ContentReference JarEntryContentReference JarContentReference ContentReference
private static Array List reference List new Array List private Jar File jar File Content selector used in jar operations Default implementation causes all file entries to be selected with  ArrayList referenceList ArrayList JarFile jarFile
since 2 0 public static class Content Selector  ContentSelector
Indicates whether the jar entry should be selected Default behavior is to select all non directory entries param entry jar entry return code true code if entry is to be selected code false code otherwise 
since 2 0 public boolean include Jar Entry entry return entry null false entry is Directory  JarEntry isDirectory
Defines the symbolic path identifier for the entry Default identifier is the same as the jar entry name param entry jar entry return symbolic path identifier since 2 0 public String define Identifier Jar Entry entry return entry null null entry get Name  defineIdentifier JarEntry getName
Create jar content reference from URL param id symbolic path identifier param url actual referenced URL since 2 0 public Jar Content Reference String id URL url super id url this jar File null reference List add this keep track of archives Create jar content reference from file param id symbolic path identifier param file actual referenced file since 2 0 public Jar Content Reference String id File file super id file this jar File null reference List add this keep track of archives A factory method to create a jar content reference param id symbolic path identifier param file actual referenced file return jar content reference since 2 0  JarContentReference jarFile referenceList JarContentReference jarFile referenceList
public Content Reference create Content Reference String id File file return new Jar Content Reference id file true Constructor Jar Content Reference param id param file param b public Jar Content Reference String id File file boolean b this id file set Temp Local b Returns the content reference as a jar file Note that this method b does not b cause the file to be downloaded if it is not already local return reference as jar file exception IO Exception reference cannot be returned as jar file since 2 0 protected Jar File as Jar File throws IO Exception if this jar File null  ContentReference createContentReference JarContentReference JarContentReference JarContentReference setTempLocal IOException JarFile asJarFile IOException jarFile
if Update Core DEBUG Update Core DEBUG SHOW INSTALL Update Core debug as Jar File file NON NLS 1 if file null file exists Update Core warn Jar File does not exits file NON NLS 1 throw new File Not Found Exception file get Absolute Path this jar File new Jar File file return jar File Unpacks the referenced jar archive into the specified location Returns content references to the unpacked files param dir location to unpack the jar into  UpdateCore UpdateCore DEBUG_SHOW_INSTALL UpdateCore asJarFile UpdateCore JarFile FileNotFoundException getAbsolutePath jarFile JarFile jarFile
symbolic path identifiers for the entries param monitor progress monitor exception IO Exception exception Install Aborted Exception since 2 0 public Content Reference unpack File dir Content Selector selector Install Monitor monitor throws IO Exception Install Aborted Exception make sure we have a selector if selector null selector new Content Selector get archive content Jar File jar Archive this as Jar File  IOException InstallAbortedException ContentReference ContentSelector InstallMonitor IOException InstallAbortedException ContentSelector JarFile jarArchive asJarFile
List content new Array List Enumeration entries jar Archive entries run through the entries and unjar String entry Id Jar Entry entry  ArrayList jarArchive entryId JarEntry
Output Stream os File local File try if monitor null monitor save State monitor set Task Name Policy bind Jar Content Reference Unpacking NON NLS 1 monitor sub Task this get Identifier monitor show Copy Details false  OutputStream localFile saveState setTaskName JarContentReference subTask getIdentifier showCopyDetails

p This class may be instantiated or subclassed by clients p p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves 
p see org eclipse update core Content Reference see org eclipse update core Jar Content Reference since 2 0  ContentReference JarContentReference
private Jar Content Reference jar Content Reference private Jar Entry entry  JarContentReference jarContentReference JarEntry
Create jar entry content reference param id symbolic path identifier param jar Content Reference jar file content reference param entry jar entry  jarContentReference
since 2 0 public Jar Entry Content Reference String id Jar Content Reference jar Content Reference Jar Entry entry  JarEntryContentReference JarContentReference jarContentReference JarEntry
this jar Content Reference jar Content Reference this entry entry Creates an input stream for the reference return input stream exception IO Exception unable to create stream  jarContentReference jarContentReference IOException

cases clients should instead instantiate or subclass the provided concrete implementation of this model p p 
b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
see org eclipse update core Archive Reference since 2 0 public class Archive Reference Model extends Model Object  ArchiveReference ArchiveReferenceModel ModelObject
private String path private String url String private URL url  urlString
Creates a uninitialized model object since 2 0 public Archive Reference Model super  ArchiveReferenceModel
Retrieve the site archive symbolic path return path or code null code 
public String get Path return path Returns the unresolved URL string for the archive  getPath

Creates an uninitialized model object since 2 0 public Category Model super  CategoryModel
Retrieve the name of the category return category name or code null code since 2 0 public String get Name return name  getName
Retrieve the displayable label for the category If the model object has been resolved the label is localized return displayable label or code null code since 2 0 public String get Label if localized Label null return localized Label else return label  getLabel localizedLabel localizedLabel
Retrieve the non localized displayable label for the category return non localized displayable label or code null code since 2 0 public String get Label Non Localized return label  getLabelNonLocalized
Retrieve the detailed category description return category description or code null code since 2 0 public URL Entry Model get Description Model return description  URLEntryModel getDescriptionModel
Sets the category displayable label Throws a runtime exception if this object is marked read only param label displayable label or resource key since 2 0 public void set Label String label assert Is Writeable this label label this localized Label null  setLabel assertIsWriteable localizedLabel
Sets the category name Throws a runtime exception if this object is marked read only param name category name since 2 0 public void set Name String name assert Is Writeable this name name  setName assertIsWriteable
Sets the category description Throws a runtime exception if this object is marked read only param description category description since 2 0 public void set Description Model URL Entry Model description assert Is Writeable this description description  setDescriptionModel URLEntryModel assertIsWriteable
Marks the model object as read only since 2 0 public void mark Read Only super mark Read Only mark Reference Read Only get Description Model  markReadOnly markReadOnly markReferenceReadOnly getDescriptionModel
Resolve the model object Any URL strings in the model are resolved relative to the base URL argument Any translatable strings in the model that are specified as translation keys are localized using the supplied resource bundle param base URL param bundleURL resource bundle URL exception MalformedURL Exception since 2 0 public void resolve URL base URL bundleURL throws MalformedURL Exception resolve local elements localized Label resolveNL String bundleURL label delegate to references resolve Reference get Description Model base bundleURL  MalformedURLException MalformedURLException localizedLabel resolveNLString resolveReference getDescriptionModel
Compare two category models for equality see Object equals Object since 2 0 public boolean equals Object obj boolean result false if obj instanceof Category Model Category Model other Category Category Model obj result get Name equals Ignore Case other Category get Name return result  CategoryModel CategoryModel otherCategory CategoryModel getName equalsIgnoreCase otherCategory getName
Compute hash code for category model see Object hash Code since 2 0 public int hash Code return get Name hash Code  hashCode hashCode getName hashCode
public int compare Object o1 Object o2 Category Model cat1 Category Model o1 Category Model cat2 Category Model o2 if cat1 equals cat2 return 0 return cat1 get Name compare To cat2 get Name  CategoryModel CategoryModel CategoryModel CategoryModel getName compareTo getName
Returns a comparator for category models return comparator since 2 0 public static Comparator get Comparator if comp null comp new Comparator see Comparator compare Object Object Returns 0 if versions are equal Returns 1 if object1 is after than object2 Returns 1 if object1 is before than object2 public int compare Object o1 Object o2 Category Model cat1 Category Model o1 Category Model cat2 Category Model o2 if cat1 equals cat2 return 0 return cat1 get Name compare To cat2 get Name return comp  getComparator CategoryModel CategoryModel CategoryModel CategoryModel getName compareTo getName
see org eclipse update core model Model Object get Property Name protected String get Property Name return Site SITE FILE  ModelObject getPropertyName getPropertyName SITE_FILE

from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see org eclipse update core model Plugin Entry Model  PluginEntryModel
since 2 0 public abstract class Content Entry Model extends Model Object  ContentEntryModel ModelObject
since 2 0 public static final long UNKNOWN SIZE 1  UNKNOWN_SIZE
private long download Size UNKNOWN SIZE private long install Size UNKNOWN SIZE private String os private String ws private String nl  downloadSize UNKNOWN_SIZE installSize UNKNOWN_SIZE
private String arch Creates a uninitialized content entry model object 
protected Content Entry Model super  ContentEntryModel
Returns the download size of the entry if it can be determined return download size of the entry in Kilo Bytes or an indication  KiloBytes
since 2 0 public long get Download Size return download Size  getDownloadSize downloadSize
Returns the install size of the entry if it can be determined return install size of the entry in Kilo Bytes or an indication the size could not be determined since 2 0  KiloBytes
return install Size Returns optional operating system specification  installSize
return the operating system specification or code null code since 2 0 public String getOS return os 
Returns optional windowing system specification return the windowing system specification or code null code 
public String getWS return ws 

private Multi Status status private boolean URL ALREADY SEEN false private static final int STATE IGNORED ELEMENT 1 private static final int STATE INITIAL 0 private static final int STATE INCLUDES 1 private static final int STATE FEATURE 2  MultiStatus URL_ALREADY_SEEN STATE_IGNORED_ELEMENT STATE_INITIAL STATE_INCLUDES STATE_FEATURE
private static final int STATE DESCRIPTION 4 private static final int STATE COPYRIGHT 5 private static final int STATE LICENSE 6 private static final int STATE URL 7  STATE_DESCRIPTION STATE_COPYRIGHT STATE_LICENSE STATE_URL
private static final int STATE DISCOVERY 9 private static final int STATE REQUIRES 10 private static final int STATE IMPORT 11 private static final int STATE PLUGIN 12 private static final int STATE DATA 13 private static final String PLUGIN ID Update Core get Plugin get Bundle get Symbolic Name private static final String FEATURE feature NON NLS 1 private static final String INCLUDES includes NON NLS 1 private static final String HANDLER install handler NON NLS 1 private static final String DESCRIPTION description NON NLS 1 private static final String COPYRIGHT copyright NON NLS 1 private static final String LICENSE license NON NLS 1 private static final String URL url NON NLS 1  STATE_DISCOVERY STATE_REQUIRES STATE_IMPORT STATE_PLUGIN STATE_DATA PLUGIN_ID UpdateCore getPlugin getBundle getSymbolicName
private static final String DISCOVERY discovery NON NLS 1 private static final String REQUIRES requires NON NLS 1 private static final String IMPORT import NON NLS 1 private static final String PLUGIN plugin NON NLS 1 
Current State Information Stack state Stack new Stack Current object stack used to hold the current object we are populating in this plugin descriptor Stack object Stack new Stack private int current State private final static SAX Parser Factory parser Factory SAX Parser Factory new Instance Constructs a feature parser since 2 0 public Default Feature Parser super try parser Factory set Namespace Aware true this parser parser Factory newSAX Parser catch Parser Configuration Exception e Update Core log e catch SAX Exception e Update Core log e public void init Feature Model Factory factory PERF separate instance creation from parsing  stateStack objectStack currentState SAXParserFactory parserFactory SAXParserFactory newInstance DefaultFeatureParser parserFactory setNamespaceAware parserFactory newSAXParser ParserConfigurationException UpdateCore SAXException UpdateCore FeatureModelFactory
this factory factory state Stack new Stack object Stack new Stack status null URL ALREADY SEEN false parser reset Parses the specified input steam and constructs a feature model The input stream is not closed as part of this operation param in input stream return feature model exception SAX Exception exception IO Exception since 2 0 public Feature Model parse Input Stream in throws SAX Exception IO Exception state Stack push new Integer STATE INITIAL current State Integer state Stack peek int Value parser parse new Input Source in this if object Stack is Empty throw new SAX Exception Policy bind Default Feature Parser No Feature Tag NON NLS 1 else if object Stack peek instanceof Feature Model return Feature Model object Stack pop else String stack NON NLS 1 Iterator iter object Stack iterator while iter has Next stack r n iter next to String stack NON NLS 1 throw new SAX Exception Policy bind Default Feature Parser Wrong Parsing Stack stack NON NLS 1 Returns all status objects accumulated by the parser return multi status containing accumulated status or code null code since 2 0 public Multi Status get Status return status Handle start of element tags see Default Handler start Element String String String Attributes since 2 0 public void start Element String uri String local Name String q Name Attributes attributes throws SAX Exception if Update Core DEBUG Update Core DEBUG SHOW PARSING debug Start Element uri uri local Name local Name q Name q Name NON NLS 1 NON NLS 2 NON NLS 3 switch current State case STATE IGNORED ELEMENT internal Error Unknown Tag Policy bind Default Feature Parser Unknown Element local Name get State current State NON NLS 1 break case STATE INITIAL handle Initial State local Name attributes break case STATE FEATURE case STATE INCLUDES case STATE HANDLER case STATE DESCRIPTION case STATE COPYRIGHT case STATE LICENSE handle Feature State local Name attributes break case STATE URL if URL ALREADY SEEN internal Error Policy bind Default Feature Parser Too ManyUR Ltag NON NLS 1 handleURL State local Name attributes break case STATE UPDATE case STATE DISCOVERY handle Update Discovery State local Name attributes break case STATE REQUIRES handle Requires State local Name attributes break case STATE IMPORT handle Import State local Name attributes break case STATE PLUGIN case STATE DATA handle Feature State local Name attributes break default internal Error Unknown Tag Policy bind Default Feature Parser Unknown Start State Integer to String current State NON NLS 1 break int new State Integer state Stack peek int Value if new State STATE IGNORED ELEMENT current State new State Handle end of element tags see Default Handler end Element String String String since 2 0 public void end Element String uri String local Name String q Name variables used URL Entry Model info null Feature Model feature Model null String text null int inner State 0 int state Integer state Stack peek int Value switch state  stateStack objectStack URL_ALREADY_SEEN SAXException IOException FeatureModel InputStream SAXException IOException stateStack STATE_INITIAL currentState stateStack intValue InputSource objectStack isEmpty SAXException DefaultFeatureParser NoFeatureTag objectStack FeatureModel FeatureModel objectStack objectStack hasNext toString SAXException DefaultFeatureParser WrongParsingStack MultiStatus getStatus DefaultHandler startElement startElement localName qName SAXException UpdateCore UpdateCore DEBUG_SHOW_PARSING localName qName qName currentState STATE_IGNORED_ELEMENT internalErrorUnknownTag DefaultFeatureParser UnknownElement localName getState currentState STATE_INITIAL handleInitialState localName STATE_FEATURE STATE_INCLUDES STATE_HANDLER STATE_DESCRIPTION STATE_COPYRIGHT STATE_LICENSE handleFeatureState localName STATE_URL URL_ALREADY_SEEN internalError DefaultFeatureParser TooManyURLtag handleURLState localName STATE_UPDATE STATE_DISCOVERY handleUpdateDiscoveryState localName STATE_REQUIRES handleRequiresState localName STATE_IMPORT handleImportState localName STATE_PLUGIN STATE_DATA handleFeatureState localName internalErrorUnknownTag DefaultFeatureParser UnknownStartState toString currentState newState stateStack intValue newState STATE_IGNORED_ELEMENT currentState newState DefaultHandler endElement endElement localName qName URLEntryModel FeatureModel featureModel innerState stateStack intValue
internal Error Policy bind Default Feature Parser Parsing Stack Back To Initial State NON NLS 1 break  internalError DefaultFeatureParser ParsingStackBackToInitialState
case STATE FEATURE state Stack pop if object Stack peek instanceof String text String object Stack pop Feature Model feature Feature Model object Stack peek feature get Description Model set Annotation text do not pop break  STATE_FEATURE stateStack objectStack objectStack FeatureModel FeatureModel objectStack getDescriptionModel setAnnotation
case STATE INCLUDES state Stack pop if object Stack peek instanceof Included Feature Reference Model  STATE_INCLUDES stateStack objectStack IncludedFeatureReferenceModel
if object Stack peek instanceof Feature Model feature Model Feature Model object Stack peek feature Model add Included Feature Reference Model included Feature Ref Model  objectStack FeatureModel featureModel FeatureModel objectStack featureModel addIncludedFeatureReferenceModel includedFeatureRefModel
break case STATE HANDLER state Stack pop  STATE_HANDLER stateStack
if object Stack peek instanceof Install Handler Entry Model Install Handler Entry Model handler Model Install Handler Entry Model object Stack pop feature Model Feature Model object Stack peek if feature Model get Install Handler Model null internal Error Policy bind Default Feature Parser Element Already Set get State state NON NLS 1 else feature Model set Install Handler Model handler Model break case STATE DESCRIPTION state Stack pop text NON NLS 1 while object Stack peek instanceof String text String object Stack pop text  objectStack InstallHandlerEntryModel InstallHandlerEntryModel handlerModel InstallHandlerEntryModel objectStack featureModel FeatureModel objectStack featureModel getInstallHandlerModel internalError DefaultFeatureParser ElementAlreadySet getState featureModel setInstallHandlerModel handlerModel STATE_DESCRIPTION stateStack objectStack objectStack
if object Stack peek instanceof URL Entry Model info URL Entry Model object Stack pop text cleanup Text text if text null  objectStack URLEntryModel URLEntryModel objectStack cleanupText
inner State Integer state Stack peek int Value switch inner State  innerState stateStack intValue innerState
case STATE FEATURE if object Stack peek instanceof Feature Model feature Model Feature Model object Stack peek if feature Model get Description Model null internal Error Policy bind Default Feature Parser Element Already Set get State state NON NLS 1 else feature Model set Description Model info break default internal Error Policy bind Default Feature Parser State Include Wrong Element get State inner State get State state NON NLS 1 break break case STATE COPYRIGHT  STATE_FEATURE objectStack FeatureModel featureModel FeatureModel objectStack featureModel getDescriptionModel internalError DefaultFeatureParser ElementAlreadySet getState featureModel setDescriptionModel internalError DefaultFeatureParser StateIncludeWrongElement getState innerState getState STATE_COPYRIGHT
text NON NLS 1 while object Stack peek instanceof String text String object Stack pop text if object Stack peek instanceof URL Entry Model info URL Entry Model object Stack pop text cleanup Text text if text null info set Annotation text inner State Integer state Stack peek int Value switch inner State case STATE FEATURE if object Stack peek instanceof Feature Model feature Model Feature Model object Stack peek if feature Model get Copyright Model null  objectStack objectStack objectStack URLEntryModel URLEntryModel objectStack cleanupText setAnnotation innerState stateStack intValue innerState STATE_FEATURE objectStack FeatureModel featureModel FeatureModel objectStack featureModel getCopyrightModel
feature Model set Copyright Model info break default internal Error Policy bind Default Feature Parser State Include Wrong Element get State inner State get State state NON NLS 1 break break case STATE LICENSE state Stack pop text NON NLS 1 while object Stack peek instanceof String text String object Stack pop text if object Stack peek instanceof URL Entry Model info URL Entry Model object Stack pop text cleanup Text text if text null info set Annotation text inner State Integer state Stack peek int Value switch inner State case STATE FEATURE if object Stack peek instanceof Feature Model feature Model Feature Model object Stack peek if feature Model get License Model null internal Error Policy bind Default Feature Parser Element Already Set get State state NON NLS 1 else feature Model set License Model info break default internal Error Policy bind Default Feature Parser State Include Wrong Element get State inner State get State state NON NLS 1 break  featureModel setCopyrightModel internalError DefaultFeatureParser StateIncludeWrongElement getState innerState getState STATE_LICENSE stateStack objectStack objectStack objectStack URLEntryModel URLEntryModel objectStack cleanupText setAnnotation innerState stateStack intValue innerState STATE_FEATURE objectStack FeatureModel featureModel FeatureModel objectStack featureModel getLicenseModel internalError DefaultFeatureParser ElementAlreadySet getState featureModel setLicenseModel internalError DefaultFeatureParser StateIncludeWrongElement getState innerState getState
break case STATE URL state Stack pop URL ALREADY SEEN true break case STATE UPDATE state Stack pop  STATE_URL stateStack URL_ALREADY_SEEN STATE_UPDATE stateStack
if object Stack peek instanceof Feature Model feature Model Feature Model object Stack peek if feature Model get Update Site Entry Model null internal Error Policy bind Default Feature Parser Element Already Set get State state NON NLS 1 else  objectStack FeatureModel featureModel FeatureModel objectStack featureModel getUpdateSiteEntryModel internalError DefaultFeatureParser ElementAlreadySet getState
break case STATE DISCOVERY state Stack pop if object Stack peek instanceof URL Entry Model info URL Entry Model object Stack pop if object Stack peek instanceof Feature Model feature Model Feature Model object Stack peek feature Model add Discovery Site Entry Model info break case STATE REQUIRES state Stack pop if object Stack peek instanceof Feature Model feature Model Feature Model object Stack peek Import Model import Models feature Model get Import Models if import Models length 0 internal Error Policy bind Default Feature Parser Require State Without Import Element NON NLS 1 else boolean patch Mode false for int i 0 i import Models length i Import Model import Model import Models i if import Model is Patch if patch Mode false patch Mode true  STATE_DISCOVERY stateStack objectStack URLEntryModel URLEntryModel objectStack objectStack FeatureModel featureModel FeatureModel objectStack featureModel addDiscoverySiteEntryModel STATE_REQUIRES stateStack objectStack FeatureModel featureModel FeatureModel objectStack ImportModel importModels featureModel getImportModels importModels internalError DefaultFeatureParser RequireStateWithoutImportElement patchMode importModels ImportModel importModel importModels importModel isPatch patchMode patchMode
break break case STATE IMPORT  STATE_IMPORT
Import Model import Model Import Model object Stack pop if object Stack peek instanceof Feature Model feature Model Feature Model object Stack peek feature Model add Import Model import Model break case STATE PLUGIN state Stack pop if object Stack peek instanceof Plugin Entry Model Plugin Entry Model plugin Entry Plugin Entry Model object Stack pop if object Stack peek instanceof Feature Model feature Model Feature Model object Stack peek feature Model add Plugin Entry Model plugin Entry break case STATE DATA state Stack pop if object Stack peek instanceof Non Plugin Entry Model Non Plugin Entry Model non Plugin Entry Non Plugin Entry Model object Stack pop if object Stack peek instanceof Feature Model feature Model Feature Model object Stack peek feature Model add Non Plugin Entry Model non Plugin Entry break default internal Error Unknown Tag Policy bind Default Feature Parser Unknown End State state NON NLS 1 break if Update Core DEBUG Update Core DEBUG SHOW PARSING debug End Element uri local Name q Name NON NLS 1 NON NLS 2 NON NLS 3  ImportModel importModel ImportModel objectStack objectStack FeatureModel featureModel FeatureModel objectStack featureModel addImportModel importModel STATE_PLUGIN stateStack objectStack PluginEntryModel PluginEntryModel pluginEntry PluginEntryModel objectStack objectStack FeatureModel featureModel FeatureModel objectStack featureModel addPluginEntryModel pluginEntry STATE_DATA stateStack objectStack NonPluginEntryModel NonPluginEntryModel nonPluginEntry NonPluginEntryModel objectStack objectStack FeatureModel featureModel FeatureModel objectStack featureModel addNonPluginEntryModel nonPluginEntry internalErrorUnknownTag DefaultFeatureParser UnknownEndState UpdateCore UpdateCore DEBUG_SHOW_PARSING localName qName
Method cleanup Text Removes pre white space and post white space  cleanupText
param text or null return String private String cleanup Text String text text text trim if equals text return null NON NLS 1 return text Handle character text see Default Handler characters char int int since 2 0 public void characters char ch int start int length String text NON NLS 1 boolean valid true if valid text new String ch start length only push if not unknown state int state Integer state Stack peek int Value if state STATE DESCRIPTION state STATE COPYRIGHT state STATE LICENSE object Stack push text Handle errors see Default Handler error SAX Parse Exception since 2 0 public void error SAX Parse Exception ex log Status ex  cleanupText DefaultHandler stateStack intValue STATE_DESCRIPTION STATE_COPYRIGHT STATE_LICENSE objectStack DefaultHandler SAXParseException SAXParseException logStatus
Handle fatal errors see Default Handler fatal Error SAX Parse Exception exception SAX Exception since 2 0 public void fatal Error SAX Parse Exception ex throws SAX Exception log Status ex throw ex private void handle Initial State String element Name Attributes attributes throws SAX Exception if element Name equals FEATURE state Stack push new Integer STATE FEATURE process Feature attributes else internal Error Unknown Tag Policy bind Default Feature Parser Unknown Element element Name get State current State NON NLS 1 private void handle Feature State String element Name Attributes attributes throws SAX Exception if element Name equals HANDLER state Stack push new Integer STATE HANDLER process Handler attributes else if element Name equals DESCRIPTION state Stack push new Integer STATE DESCRIPTION process Info attributes else if element Name equals COPYRIGHT state Stack push new Integer STATE COPYRIGHT process Info attributes  DefaultHandler fatalError SAXParseException SAXException fatalError SAXParseException SAXException logStatus handleInitialState elementName SAXException elementName stateStack STATE_FEATURE processFeature internalErrorUnknownTag DefaultFeatureParser UnknownElement elementName getState currentState handleFeatureState elementName SAXException elementName stateStack STATE_HANDLER processHandler elementName stateStack STATE_DESCRIPTION processInfo elementName stateStack STATE_COPYRIGHT processInfo
else if element Name equals LICENSE state Stack push new Integer STATE LICENSE process Info attributes  elementName stateStack STATE_LICENSE processInfo
else if element Name equals URL state Stack push new Integer STATE URL No process as URL tag does not contain any element itself else if element Name equals INCLUDES state Stack push new Integer STATE INCLUDES process Includes attributes else if element Name equals REQUIRES state Stack push new Integer STATE REQUIRES  elementName stateStack STATE_URL elementName stateStack STATE_INCLUDES processIncludes elementName stateStack STATE_REQUIRES
process Plugin attributes else if element Name equals DATA state Stack push new Integer STATE DATA process Data attributes else  processPlugin elementName stateStack STATE_DATA processData
internal Error Unknown Tag Policy bind Default Feature Parser Unknown Element element Name get State current State NON NLS 1  internalErrorUnknownTag DefaultFeatureParser UnknownElement elementName getState currentState
private void handleURL State String element Name Attributes attributes throws SAX Exception if element Name equals UPDATE  handleURLState elementName SAXException elementName
else if element Name equals DISCOVERY state Stack push new Integer STATE DISCOVERY processURL Info attributes else internal Error Unknown Tag Policy bind Default Feature Parser Unknown Element element Name get State current State NON NLS 1 private void handle Requires State String element Name Attributes attributes throws SAX Exception if element Name equals IMPORT state Stack push new Integer STATE IMPORT process Import attributes else internal Error Unknown Tag Policy bind Default Feature Parser Unknown Element element Name get State current State NON NLS 1 private void handle Update Discovery State String element Name Attributes attributes throws SAX Exception if element Name equals HANDLER state Stack push new Integer STATE HANDLER process Handler attributes else if element Name equals DESCRIPTION state Stack push new Integer STATE DESCRIPTION process Info attributes else if element Name equals COPYRIGHT state Stack push new Integer STATE COPYRIGHT process Info attributes else if element Name equals LICENSE state Stack push new Integer STATE LICENSE  elementName stateStack STATE_DISCOVERY processURLInfo internalErrorUnknownTag DefaultFeatureParser UnknownElement elementName getState currentState handleRequiresState elementName SAXException elementName stateStack STATE_IMPORT processImport internalErrorUnknownTag DefaultFeatureParser UnknownElement elementName getState currentState handleUpdateDiscoveryState elementName SAXException elementName stateStack STATE_HANDLER processHandler elementName stateStack STATE_DESCRIPTION processInfo elementName stateStack STATE_COPYRIGHT processInfo elementName stateStack STATE_LICENSE
else if element Name equals URL state Stack push new Integer STATE URL No process as URL tag does not contain any element itself  elementName stateStack STATE_URL

public class Default Site Parser extends Default Handler private final static SAX Parser Factory parser Factory SAX Parser Factory new Instance private SAX Parser parser private Site Model Factory factory private Multi Status status  DefaultSiteParser DefaultHandler SAXParserFactory parserFactory SAXParserFactory newInstance SAXParser SiteModelFactory MultiStatus
private boolean DESCRIPTION SITE ALREADY SEEN false private static final int STATE IGNORED ELEMENT 1  DESCRIPTION_SITE_ALREADY_SEEN STATE_IGNORED_ELEMENT
private static final int STATE SITE 1 private static final int STATE FEATURE 2 private static final int STATE ARCHIVE 3 private static final int STATE CATEGORY 4 private static final int STATE CATEGORY DEF 5 private static final int STATE DESCRIPTION SITE 6 private static final int STATE DESCRIPTION CATEGORY DEF 7 private static final String PLUGIN ID Update Core get Plugin get Bundle get Symbolic Name private static final String SITE site NON NLS 1 private static final String FEATURE feature NON NLS 1 private static final String ARCHIVE archive NON NLS 1 private static final String CATEGORY DEF category def NON NLS 1 private static final String CATEGORY category NON NLS 1  STATE_SITE STATE_FEATURE STATE_ARCHIVE STATE_CATEGORY STATE_CATEGORY_DEF STATE_DESCRIPTION_SITE STATE_DESCRIPTION_CATEGORY_DEF PLUGIN_ID UpdateCore getPlugin getBundle getSymbolicName CATEGORY_DEF
private static final String DEFAULT INFO URL index html NON NLS 1 Current State Information  DEFAULT_INFO_URL
Current object stack used to hold the current object we are populating in this plugin descriptor Stack object Stack new Stack private int current State Constructs a site parser public Default Site Parser super try parser Factory set Namespace Aware true this parser parser Factory newSAX Parser catch Parser Configuration Exception e Update Core log e catch SAX Exception e Update Core log e if Update Core DEBUG Update Core DEBUG SHOW PARSING debug Created NON NLS 1 public void init Site Model Factory factory PERF separate instance creation from parsing this factory factory  objectStack currentState DefaultSiteParser parserFactory setNamespaceAware parserFactory newSAXParser ParserConfigurationException UpdateCore SAXException UpdateCore UpdateCore UpdateCore DEBUG_SHOW_PARSING SiteModelFactory
object Stack new Stack status null DESCRIPTION SITE ALREADY SEEN false Parses the specified input steam and constructs a site model The input stream is not closed as part of this operation param in input stream return site model exception SAX Exception exception IO Exception since 2 0 public Site Model parse Input Stream in throws SAX Exception IO Exception state Stack push new Integer STATE INITIAL current State Integer state Stack peek int Value parser parse new Input Source in this if object Stack is Empty throw new SAX Exception Policy bind Default Site Parser No Site Tag NON NLS 1 else if object Stack peek instanceof Site Model return Site Model object Stack pop else String stack NON NLS 1 Iterator iter object Stack iterator while iter has Next stack stack iter next to String r n NON NLS 1 throw new SAX Exception Policy bind Default Site Parser Wrong Parsing Stack stack NON NLS 1 Returns all status objects accumulated by the parser return multi status containing accumulated status or code null code since 2 0 public Multi Status get Status return status Handle start of element tags see Default Handler start Element String String String Attributes since 2 0 public void start Element String uri String local Name String q Name Attributes attributes throws SAX Exception if Update Core DEBUG Update Core DEBUG SHOW PARSING debug State current State NON NLS 1 debug Start Element uri uri local Name local Name q Name q Name NON NLS 1 NON NLS 2 NON NLS 3  objectStack DESCRIPTION_SITE_ALREADY_SEEN SAXException IOException SiteModel InputStream SAXException IOException stateStack STATE_INITIAL currentState stateStack intValue InputSource objectStack isEmpty SAXException DefaultSiteParser NoSiteTag objectStack SiteModel SiteModel objectStack objectStack hasNext toString SAXException DefaultSiteParser WrongParsingStack MultiStatus getStatus DefaultHandler startElement startElement localName qName SAXException UpdateCore UpdateCore DEBUG_SHOW_PARSING currentState localName qName qName
switch current State case STATE IGNORED ELEMENT internal Error Unknown Tag Policy bind Default Site Parser Unknown Element local Name get State current State NON NLS 1 break case STATE INITIAL handle Initial State local Name attributes  currentState STATE_IGNORED_ELEMENT internalErrorUnknownTag DefaultSiteParser UnknownElement localName getState currentState STATE_INITIAL handleInitialState localName
break case STATE SITE handle Site State local Name attributes  STATE_SITE handleSiteState localName
case STATE FEATURE handle Feature State local Name attributes break  STATE_FEATURE handleFeatureState localName
case STATE ARCHIVE handle Site State local Name attributes break case STATE CATEGORY handle Category State local Name attributes  STATE_ARCHIVE handleSiteState localName STATE_CATEGORY handleCategoryState localName
break case STATE CATEGORY DEF handle Category Def State local Name attributes break case STATE DESCRIPTION SITE handle Site State local Name attributes  STATE_CATEGORY_DEF handleCategoryDefState localName STATE_DESCRIPTION_SITE handleSiteState localName
case STATE DESCRIPTION CATEGORY DEF handle Site State local Name attributes break default internal Error Unknown Tag Policy bind Default Site Parser Unknown Start State get State current State NON NLS 1 break  STATE_DESCRIPTION_CATEGORY_DEF handleSiteState localName internalErrorUnknownTag DefaultSiteParser UnknownStartState getState currentState
if new State STATE IGNORED ELEMENT current State new State Handle end of element tags see Default Handler end Element String String String  newState STATE_IGNORED_ELEMENT currentState newState DefaultHandler endElement
since 2 0 public void end Element String uri String local Name String q Name String text null URL Entry Model info null int state Integer state Stack peek int Value switch state case STATE IGNORED ELEMENT  endElement localName qName URLEntryModel stateStack intValue STATE_IGNORED_ELEMENT
state Stack pop break case STATE INITIAL internal Error Policy bind Default Site Parser Parsing Stack Back To Initial State NON NLS 1 break case STATE SITE state Stack pop if object Stack peek instanceof String text String object Stack pop Site Model site Site Model object Stack peek site get Description Model set Annotation text do not pop the object break  stateStack STATE_INITIAL internalError DefaultSiteParser ParsingStackBackToInitialState STATE_SITE stateStack objectStack objectStack SiteModel SiteModel objectStack getDescriptionModel setAnnotation
object Stack pop break case STATE CATEGORY DEF state Stack pop if object Stack peek instanceof String text String object Stack pop Category Model category Category Model object Stack peek category get Description Model set Annotation text object Stack pop break case STATE DESCRIPTION SITE state Stack pop text NON NLS 1 while object Stack peek instanceof String add text preserving at most one space between text fragments String new Text String object Stack pop if trailing Space new Text leading Space text text text NON NLS 1 text new Text trim text if leading Space new Text leading Space text text text NON NLS 1 text text trim info URL Entry Model object Stack pop if text null  objectStack STATE_CATEGORY_DEF stateStack objectStack objectStack CategoryModel CategoryModel objectStack getDescriptionModel setAnnotation objectStack STATE_DESCRIPTION_SITE stateStack objectStack newText objectStack trailingSpace newText leadingSpace newText leadingSpace newText leadingSpace URLEntryModel objectStack
Site Model site Model Site Model object Stack peek override description do not raise error as previous description may be default one when parsing site tag if DESCRIPTION SITE ALREADY SEEN debug Policy bind Default Site Parser Element Already Set get State state NON NLS 1 site Model set Description Model info DESCRIPTION SITE ALREADY SEEN true break case STATE DESCRIPTION CATEGORY DEF  SiteModel siteModel SiteModel objectStack DESCRIPTION_SITE_ALREADY_SEEN DefaultSiteParser ElementAlreadySet getState siteModel setDescriptionModel DESCRIPTION_SITE_ALREADY_SEEN STATE_DESCRIPTION_CATEGORY_DEF
while object Stack peek instanceof String add text preserving at most one space between text fragments String new Text String object Stack pop if trailing Space new Text leading Space text  objectStack newText objectStack trailingSpace newText leadingSpace
text new Text trim text if leading Space new Text leading Space text text text NON NLS 1 text text trim  newText leadingSpace newText leadingSpace
info set Annotation text Category Model category Category Model object Stack peek if category get Description Model null internal Error Policy bind Default Site Parser Element Already Set2 get State state category get Label NON NLS 1  setAnnotation CategoryModel CategoryModel objectStack getDescriptionModel internalError DefaultSiteParser ElementAlreadySet2 getState getLabel
break 
break if Update Core DEBUG Update Core DEBUG SHOW PARSING debug End Element uri local Name q Name NON NLS 1 NON NLS 2 NON NLS 3  UpdateCore UpdateCore DEBUG_SHOW_PARSING localName qName
public void characters char ch int start int length String text new String ch start length only push if description int state Integer state Stack peek int Value  stateStack intValue
Handle errors see Default Handler error SAX Parse Exception  DefaultHandler SAXParseException
public void error SAX Parse Exception ex log Status ex Handle fatal errors see Default Handler fatal Error SAX Parse Exception exception SAX Exception since 2 0 public void fatal Error SAX Parse Exception ex throws SAX Exception log Status ex throw ex private void handle Initial State String element Name Attributes attributes throws SAX Exception if element Name equals SITE  SAXParseException logStatus DefaultHandler fatalError SAXParseException SAXException fatalError SAXParseException SAXException logStatus handleInitialState elementName SAXException elementName
state Stack push new Integer STATE SITE process Site attributes else  stateStack STATE_SITE processSite
internal Error Unknown Tag Policy bind Default Site Parser Unknown Element element Name get State current State NON NLS 1 what we received was not a site xml no need to continue throw new SAX Exception Policy bind Default Site Parser InvalidXML Stream NON NLS 1  internalErrorUnknownTag DefaultSiteParser UnknownElement elementName getState currentState SAXException DefaultSiteParser InvalidXMLStream

private String feature Id private String feature Version private String label private String localized Label  featureId featureVersion localizedLabel
private String provider private String localized Provider private String imageURL String private URL imageURL private String os private String ws private String nl private String arch  localizedProvider imageURLString
private boolean primary false private boolean exclusive false private String primary PluginID private String application private String affinity private Install Handler Entry Model install Handler  primaryPluginID InstallHandlerEntryModel installHandler
private URL Entry Model description private URL Entry Model copyright private URL Entry Model license private URL Entry Model update Site Info private List of Info Model discovery Site Info  URLEntryModel URLEntryModel URLEntryModel URLEntryModel updateSiteInfo InfoModel discoverySiteInfo
private List of Import Model imports private List of Plugin Entry Model plugin Entries private List of Included Feature Reference Model feature Includes private List of Non Plugin Entry Model  ImportModel PluginEntryModel pluginEntries IncludedFeatureReferenceModel featureIncludes NonPluginEntryModel
performance private URL bundleURL private URL base 
Creates an uninitialized feature object since 2 0 public Feature Model  FeatureModel
super Compares 2 feature models for equality 
param obj feature model to compare with return code true code if the two models are equal code false code otherwise since 2 0 
public boolean equals Object obj if obj instanceof Feature Model return false Feature Model model Feature Model obj  FeatureModel FeatureModel FeatureModel
return feature Id to Lower Case equals model get Feature Identifier feature Version to Lower Case equals model get Feature Version Returns the feature identifier as a string  featureId toLowerCase getFeatureIdentifier featureVersion toLowerCase getFeatureVersion
see org eclipse update core I Feature get Versioned Identifier return feature identifier since 2 0  IFeature getVersionedIdentifier
public String get Feature Identifier delayed Resolve no delay return feature Id  getFeatureIdentifier delayedResolve featureId
Returns the feature version as a string see org eclipse update core I Feature get Versioned Identifier  IFeature getVersionedIdentifier
since 2 0 public String get Feature Version delayed Resolve no delay return feature Version  getFeatureVersion delayedResolve featureVersion
Retrieve the displayable label for the feature If the model object has been resolved the label is localized 
since 2 0 public String get Label delayed Resolve  getLabel delayedResolve
return localized Label else return label  localizedLabel
Retrieve the non localized displayable label for the feature return non localized displayable label or code null code since 2 0 
public String get Label Non Localized return label  getLabelNonLocalized
Retrieve the displayable label for the feature provider If the model object has been resolved the label is localized return displayable label or code null code since 2 0 
public String get Provider delayed Resolve if localized Provider null return localized Provider else  getProvider delayedResolve localizedProvider localizedProvider
return provider Retrieve the non localized displayable label for the feature provider 
return non localized displayable label or code null code since 2 0 public String get Provider Non Localized return provider  getProviderNonLocalized
Returns the unresolved URL string for the feature image return url string or code null code since 2 0 public String get ImageURL String delayed Resolve  getImageURLString delayedResolve
return imageURL String Returns the resolved URL for the image  imageURLString
since 2 0 public URL get ImageURL delayed Resolve return imageURL Get optional operating system specification as a comma separated string return the operating system specification string or code null code  getImageURL delayedResolve
public String getOS return os 
Get optional windowing system specification as a comma separated string return the windowing system specification string or code null code since 2 0 public String getWS return ws 
Get optional system architecture specification as a comma separated string return the system architecture specification string or code null code 
public String getOS Arch return arch  getOSArch
Get optional locale specification as a comma separated string return the locale specification string or code null code since 2 0 public String getNL 
return nl Indicates whether the feature can be used as a primary feature 
otherwise code false code since 2 0 public boolean is Primary return primary  isPrimary
Indicates whether the feature must be processed alone during installation and configuration Features that are not exclusive can be installed in a batch 
return code true code if feature requires exclusive processing code false code otherwise since 2 1 public boolean is Exclusive return exclusive  isExclusive
Returns an optional identifier for the feature application return application identifier or code null code 
since 2 0 public String get Application return application  getApplication
Returns an optional identifier for the colocation affinity feature return feature identifier or code null code since 2 0 public String get Affinity Feature  getAffinityFeature
return affinity Returns and optional custom install handler entry return install handler entry or code null code if 
since 2 0 public Install Handler Entry Model get Install Handler Model delayed Resolve no delay return install Handler  InstallHandlerEntryModel getInstallHandlerModel delayedResolve installHandler
Returns the feature description return feature rescription or code null code since 2 0 
public URL Entry Model get Description Model delayed Resolve no delay return description  URLEntryModel getDescriptionModel delayedResolve
Returns the copyright information for the feature return copyright information or code null code since 2 0 
public URL Entry Model get Copyright Model delayed Resolve no delay return copyright  URLEntryModel getCopyrightModel delayedResolve
Returns the license information for the feature return feature license or code null code since 2 0 public URL Entry Model get License Model  URLEntryModel getLicenseModel
delayed Resolve no delay return license Returns an information entry referencing the location of the  delayedResolve
feature update site return update site entry or code null code since 2 0 public URL Entry Model get Update Site Entry Model delayed Resolve no delay  URLEntryModel getUpdateSiteEntryModel delayedResolve
Return an array of information entries referencing locations of other update sites return an array of site entries or an empty array 
since 2 0 since 2 0 public URL Entry Model get Discovery Site Entry Models delayed Resolve no delay if discovery Site Info null discovery Site Info size 0 return new URL Entry Model 0  URLEntryModel getDiscoverySiteEntryModels delayedResolve discoverySiteInfo discoverySiteInfo URLEntryModel
return URL Entry Model discovery Site Info to Array array Type For discovery Site Info Return a list of plug in dependencies for this feature return the list of required plug in dependencies or an empty array  URLEntryModel discoverySiteInfo toArray arrayTypeFor discoverySiteInfo
since 2 0 public Import Model get Import Models delayed Resolve no delay if imports null imports size 0 return new Import Model 0  ImportModel getImportModels delayedResolve ImportModel
Returns an array of plug in entries referenced by this feature return an erray of plug in entries or an empty array since 2 0 
public Plugin Entry Model get Plugin Entry Models if plugin Entries null plugin Entries size 0 return new Plugin Entry Model 0 return Plugin Entry Model plugin Entries to Array array Type For plugin Entries  PluginEntryModel getPluginEntryModels pluginEntries pluginEntries PluginEntryModel PluginEntryModel pluginEntries toArray arrayTypeFor pluginEntries
Returns an array of versioned identifier referenced by this feature return an array of versioned identifier or an empty array deprecated use get Feature Include Identifier instead since 2 0  getFeatureIncludeIdentifier
delayed Resolve no delay if feature Includes null return new Versioned Identifier 0 Iterator iter feature Includes iterator Versioned Identifier version Included new Versioned Identifier feature Includes size  delayedResolve featureIncludes VersionedIdentifier featureIncludes VersionedIdentifier versionIncluded VersionedIdentifier featureIncludes
while iter has Next Included Feature Reference Model model Included Feature Reference Model iter next version Included index model get Versioned Identifier index return version Included  hasNext IncludedFeatureReferenceModel IncludedFeatureReferenceModel versionIncluded getVersionedIdentifier versionIncluded
Returns an array of included feature reference model referenced by this feature return an array of included feature reference model or an empty array 
public I Included Feature Reference get Feature Included delayed Resolve no delay if feature Includes null feature Includes size 0 return new I Included Feature Reference 0 return I Included Feature Reference feature Includes to Array array Type For feature Includes  IIncludedFeatureReference getFeatureIncluded delayedResolve featureIncludes featureIncludes IIncludedFeatureReference IIncludedFeatureReference featureIncludes toArray arrayTypeFor featureIncludes
Returns an array of non plug in entries referenced by this feature return an erray of non plug in entries or an empty array 
public Non Plugin Entry Model get Non Plugin Entry Models if non Plugin Entries null non Plugin Entries size 0 return new Non Plugin Entry Model 0 return Non Plugin Entry Model non Plugin Entries to Array array Type For non Plugin Entries  NonPluginEntryModel getNonPluginEntryModels nonPluginEntries nonPluginEntries NonPluginEntryModel NonPluginEntryModel nonPluginEntries toArray arrayTypeFor nonPluginEntries
Sets the feature identifier Throws a runtime exception if this object is marked read only param feature Id feature identifier since 2 0 public void set Feature Identifier String feature Id assert Is Writeable this feature Id feature Id Sets the feature version Throws a runtime exception if this object is marked read only  featureId setFeatureIdentifier featureId assertIsWriteable featureId featureId
param feature Version feature version since 2 0 public void set Feature Version String feature Version assert Is Writeable this feature Version feature Version  featureVersion setFeatureVersion featureVersion assertIsWriteable featureVersion featureVersion
Sets the feature displayable label Throws a runtime exception if this object is marked read only param label displayable label 
since 2 0 public void set Label String label assert Is Writeable  setLabel assertIsWriteable
this label label this localized Label null Sets the feature provider displayable label Throws a runtime exception if this object is marked read only  localizedLabel

Default feature model factory p This class may be instantiated or subclassed by clients However in most cases clients should instead subclass the provided base implementation 
p p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see org eclipse update core Base Feature Factory since 2 0 public class Feature Model Factory  BaseFeatureFactory FeatureModelFactory
private static Default Feature Parser parser new Default Feature Parser Creates a default model factory  DefaultFeatureParser DefaultFeatureParser
since 2 0 public Feature Model Factory super  FeatureModelFactory
Creates and populates a default feature from stream The parser assumes the stream contains a default feature manifest feature xml as documented by the platform 
return populated feature model exception Core Exception exception SAX Exception since 2 0  CoreException SAXException
public Feature Model parse Feature Input Stream stream throws Core Exception SAX Exception parser init this Feature Model feature Model null try  FeatureModel parseFeature InputStream CoreException SAXException FeatureModel featureModel
if parser get Status null some internal Error were detected I Status status parser get Status throw new Core Exception status  getStatus internalError IStatus getStatus CoreException
catch IO Exception e throw Utilities new Core Exception Policy bind Feature Model Factory Error Accesing Feature Stream e NON NLS 1 return feature Model  IOException newCoreException FeatureModelFactory ErrorAccesingFeatureStream featureModel

from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see org eclipse update core Feature Reference  FeatureReference
since 2 0 public class Feature Reference Model extends Model Object private String type private URL url private String url String private String feature Id  FeatureReferenceModel ModelObject urlString featureId
private String feature Version private Site Model site private String label private String localized Label performance private URL bundleURL private URL base private boolean resolved false private String os private String ws  featureVersion SiteModel localizedLabel
private String arch private String patch Creates an uninitialized feature reference model object 
since 2 0 public Feature Reference Model super  FeatureReferenceModel
Constructor Feature Reference Model param ref  FeatureReferenceModel
public Feature Reference Model Feature Reference Model ref set Feature Identifier ref get Feature Identifier set Feature Version ref get Feature Version set Type ref get Type  FeatureReferenceModel FeatureReferenceModel setFeatureIdentifier getFeatureIdentifier setFeatureVersion getFeatureVersion setType getType
set Label ref get Label setWS ref getWS setOS ref getOS set Arch ref getOS Arch setNL ref getNL  setLabel getLabel setArch getOSArch
Compares 2 feature reference models for equality 
return code true code if the two models are equal code false code otherwise since 2 0 public boolean equals Object object 
if object null return false if getURL null return false 
return false Feature Reference Model f Feature Reference Model object return Update Manager Utils sameURL getURL f getURL  FeatureReferenceModel FeatureReferenceModel UpdateManagerUtils
Returns the referenced feature type return feature type or code null code representing the default feature type for the site 
since 2 0 public String get Type return type  getType
Returns the site model for the reference return site model since 2 0 public Site Model get Site Model return site  SiteModel getSiteModel
Returns the unresolved URL string for the reference return url string since 2 0 
return url String Returns the resolved URL for the feature reference  urlString
return url string since 2 0 
public URL getURL delayed Resolve return url Returns the feature identifier as a string  delayedResolve
see org eclipse update core I Feature Reference get Versioned Identifier return feature identifier since 2 0  IFeatureReference getVersionedIdentifier
return feature Id  featureId
Returns the feature version as a string see org eclipse update core I Feature Reference get Versioned Identifier return feature version  IFeatureReference getVersionedIdentifier
public String get Feature Version return feature Version  getFeatureVersion featureVersion
Sets the referenced feature type Throws a runtime exception if this object is marked read only param type referenced feature type 
public void set Type String type assert Is Writeable this type type  setType assertIsWriteable
Sets the site for the referenced Throws a runtime exception if this object is marked read only param site site for the reference 
public void set Site Model Site Model site assert Is Writeable this site site  setSiteModel SiteModel assertIsWriteable
Sets the unresolved URL for the feature reference Throws a runtime exception if this object is marked read only param url String unresolved URL string since 2 0  urlString
public void setURL String String url String assert Is Writeable this url String url String this url null  setURLString urlString assertIsWriteable urlString urlString
Sets the feature identifier Throws a runtime exception if this object is marked read only 
param feature Id feature identifier since 2 0  featureId

b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves 
see org eclipse update core Import since 2 0 public class Import Model extends Model Object  ImportModel ModelObject
private String id private String version private String matching Id Rule Name private String matching Rule Name private boolean feature Import  matchingIdRuleName matchingRuleName featureImport
private boolean patch private String os Arch private String ws private String os private String nl  osArch
Creates a uninitialized plug in dependency model object since 2 0 
public Import Model super  ImportModel
Returns the dependent plug in identifier deprecated use get Identifier instead return plug in identifier or code null code  getIdentifier
public String get Plugin Identifier return id  getPluginIdentifier
Returns the dependent identifier return identifier or code null code since 2 0 2 public String get Identifier  getIdentifier
Returns the dependent plug in version 
return plug in version or code null code since 2 0 public String get Plugin Version return version  getPluginVersion
Returns the dependent version return version or code null code 
since 2 0 2 public String get Version return version  getVersion
Returns the dependent version matching rule name 
since 2 0 public String get Matching Rule Name  getMatchingRuleName
Returns the dependent id matching rule name return matching rule name or code null code 
since 2 1 public String get Matching Id Rule Name return matching Id Rule Name  getMatchingIdRuleName matchingIdRuleName
Sets the dependent plug in identifier 
Throws a runtime exception if this object is marked read only deprecated use set Identifier param plugin Id dependent plug in identifier  setIdentifier pluginId
since 2 0 public void set Plugin Identifier String plugin Id assert Is Writeable  setPluginIdentifier pluginId assertIsWriteable
this id plugin Id  pluginId
Sets the dependent plug in version Throws a runtime exception if this object is marked read only deprecated use set Version  setVersion
param plugin Version dependent plug in version since 2 0 public void set Plugin Version String plugin Version  pluginVersion setPluginVersion pluginVersion
assert Is Writeable this version plugin Version  assertIsWriteable pluginVersion

Construct a included feature reference since 2 1 public Included Feature Reference Model super is Optional false set Search Location I Update Constants SEARCH ROOT  IncludedFeatureReferenceModel isOptional setSearchLocation IUpdateConstants SEARCH_ROOT
Construct a included feature reference model param included Feature Ref the included reference model to copy since 2 1 public Included Feature Reference Model Included Feature Reference Model included Feature Ref super Feature Reference Model included Feature Ref is Optional included Feature Ref is Optional set Label included Feature Ref get Label set Search Location included Feature Ref get Search Location set Arch included Feature Ref getOS Arch setWS included Feature Ref getWS setOS included Feature Ref getOS  includedFeatureRef IncludedFeatureReferenceModel IncludedFeatureReferenceModel includedFeatureRef FeatureReferenceModel includedFeatureRef isOptional includedFeatureRef isOptional setLabel includedFeatureRef getLabel setSearchLocation includedFeatureRef getSearchLocation setArch includedFeatureRef getOSArch includedFeatureRef includedFeatureRef
Constructor Included Feature Reference Model param feature Reference public Included Feature Reference Model I Feature Reference feature Reference super Feature Reference Model feature Reference is Optional false set Search Location I Update Constants SEARCH ROOT set Label get Label  IncludedFeatureReferenceModel featureReference IncludedFeatureReferenceModel IFeatureReference featureReference FeatureReferenceModel featureReference isOptional setSearchLocation IUpdateConstants SEARCH_ROOT setLabel getLabel
Returns the matching rule for this included feature The rule will determine the ability of the included feature to move version without causing the overall feature to appear broken The default is code MATCH PERFECT code see I Import RULE PERFECT see I Import RULE EQUIVALENT see I Import RULE COMPATIBLE see I Import RULE GREATER OR EQUAL return int representation of feature matching rule since 2 0 2 deprecated since 3 0 included feature version is exactly specified public int get Match return Import RULE PERFECT  MATCH_PERFECT IImport RULE_PERFECT IImport RULE_EQUIVALENT IImport RULE_COMPATIBLE IImport RULE_GREATER_OR_EQUAL getMatch RULE_PERFECT
Returns the search location for this included feature The location will be used to search updates for this feature The default is code SEARCH ROOT code see I Update Constants SEARCH ROOT see I Update Constants SEARCH SELF return int representation of feature searching rule since 2 0 2 public int get Search Location return search Location  SEARCH_ROOT IUpdateConstants SEARCH_ROOT IUpdateConstants SEARCH_SELF getSearchLocation searchLocation
Returns the is Optional return is Optional since 2 0 1 public boolean is Optional return is Optional  isOptional isOptional isOptional isOptional
Sets the is Optional param is Optional The is Optional to set public void is Optional boolean is Optional this is Optional is Optional  isOptional isOptional isOptional isOptional isOptional isOptional isOptional
Sets the matching Rule param matching Rule The matching Rule to set deprecated since 3 0 included feature version is exactly specified public void set Matching Rule int matching Rule  matchingRule matchingRule matchingRule setMatchingRule matchingRule
Sets the search Location param search Location The search Location to set public void set Search Location int search Location this search Location search Location  searchLocation searchLocation searchLocation setSearchLocation searchLocation searchLocation searchLocation

Construct the exception indicating enclosing Core Exception since 2 0 public Install Aborted Exception String msg Exception e super new Status I Status INFO org eclipse update core I Status OK msg e NON NLS 1  CoreException InstallAbortedException IStatus IStatus

Creates a uninitialized install handler entry model object since 2 0 public Install Handler Entry Model super  InstallHandlerEntryModel
Returns the URL string used for browser triggered installation handling return url string or code null code since 2 0 public String getURL String return url String  getURLString urlString
Returns the resolved URL used for browser triggered installation handling return url or code null code since 2 0 public URL getURL return url 
Returns the name of the custom installer library return library path or code null code since 2 0 public String get Library return library  getLibrary
Returns the name of the custom installer return handler name or code null code since 2 0 public String get Handler Name return name  getHandlerName
Sets URL string used for browser triggered installation handling Throws a runtime exception if this object is marked read only param url String trigget page URL string may be code null code since 2 0 public void setURL String String url String assert Is Writeable this url String url String this url null  urlString setURLString urlString assertIsWriteable urlString urlString
Sets the custom install handler library name Throws a runtime exception if this object is marked read only param library name may be code null code since 2 0 public void set Library String library assert Is Writeable this library library  setLibrary assertIsWriteable
Sets the name of the custom install handler Throws a runtime exception if this object is marked read only param name name of the install handler may be code null code since 2 0 public void set Handler Name String name assert Is Writeable this name name  setHandlerName assertIsWriteable
Resolve the model object Any URL strings in the model are resolved relative to the base URL argument Any translatable strings in the model that are specified as translation keys are localized using the supplied resource bundle param base URL param bundleURL resource bundle URL exception MalformedURL Exception since 2 0 public void resolve URL base URL bundleURL throws MalformedURL Exception resolve local elements url resolveURL base bundleURL url String  MalformedURLException MalformedURLException urlString

p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback 
repeatedly as the API evolves p see org eclipse update core model Site Model Factory can Parse Site Type String since 2 0  SiteModelFactory canParseSiteType

Root model object Extended by all model objects p This class cannot be instantiated and must be subclassed 
p p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken 
repeatedly as the API evolves p public abstract class Model Object extends Platform Object  ModelObject PlatformObject
private static final String KEY PREFIX NON NLS 1 private static final String KEY DOUBLE PREFIX KEY PREFIX KEY PREFIX private static Map bundles  KEY_PREFIX KEY_DOUBLE_PREFIX KEY_PREFIX KEY_PREFIX
Creates a base model object since 2 0 protected Model Object  ModelObject
Checks that this model object is writeable A runtime exception is thrown if it is not since 2 0 
protected final void assert Is Writeable Assert is True is Read Only Policy bind Model Object Model Read Only NON NLS 1 Sets this model object and all of its descendents to be read only Subclasses may extend this implementation  assertIsWriteable isTrue isReadOnly ModelObject ModelReadOnly
see is Read Only since 2 0 public void mark Read Only read Only true  isReadOnly markReadOnly readOnly
Returns whether or not this model object is read only return code true code if this model object is read only code false code otherwise see mark Read Only since 2 0  markReadOnly
public boolean is Read Only return read Only Delegate setting of read only param o object to delegate to Must be of type Model Object see is Read Only since 2 0 protected void mark Reference Read Only Model Object o if o null return  isReadOnly readOnly ModelObject isReadOnly markReferenceReadOnly ModelObject
o mark Read Only Delegate setting of read only param o object array to delegate to Each element must be of type Model Object see is Read Only since 2 0 protected void mark List Reference Read Only Model Object o if o null return for int i 0 i o length i  markReadOnly ModelObject isReadOnly markListReferenceReadOnly ModelObject
o i mark Read Only  markReadOnly
Resolve the model element This method allows any relative URL strings to be resolved to actual URL It also allows any translatable strings to be localized Subclasses need to override this method to perform the actual resolution param base base URL param bundleURL resource bundle URL exception MalformedURL Exception  MalformedURLException
public void resolve URL base URL bundleURL throws MalformedURL Exception return Delegate resolution to referenced model param o object to delegate to Must be of type Model Object param url base URL param bundleURL resource bundle URL exception MalformedURL Exception since 2 0 protected void resolve Reference Model Object o URL url URL bundleURL throws MalformedURL Exception if o null return o resolve url bundleURL Delegate resolution to list of referenced models param o object array to delegate to Each element must be of type Model Object param url base URL param bundleURL resource bundle URL exception MalformedURL Exception since 2 0 protected void resolve List Reference Model Object o URL url URL bundleURL throws MalformedURL Exception if o null  MalformedURLException ModelObject MalformedURLException resolveReference ModelObject MalformedURLException ModelObject MalformedURLException resolveListReference ModelObject MalformedURLException
for int i 0 i o length i o i resolve url bundleURL Resolve a URL based on context 
param context base URL param bundleURL resource bundle URL param url String url string from model return URL or code null code exception MalformedURL Exception since 2 0 protected URL resolveURL URL context URL bundleURL String url String throws MalformedURL Exception  urlString MalformedURLException urlString MalformedURLException
URL string was not specified if url String null url String trim equals NON NLS 1 return null check to see if we have NL sensitive URL String resolved Url String resolveNL String bundleURL url String resolved Url String resolve Platfrom Configuration resolved Url String if we don t have a base url use only the supplied string if context null return new URL resolved Url String otherwise return new URL in context of base URL return new URL context resolved Url String  urlString urlString resolvedUrlString resolveNLString urlString resolvedUrlString resolvePlatfromConfiguration resolvedUrlString resolvedUrlString resolvedUrlString
Resolves the URL based on platfrom Configuration os ws license txt will become win32 win32 license txt on a system where os win32 and ws win32 

cases clients should instead instantiate or subclass the provided concrete implementation of this model p p 
b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p 
see org eclipse update core Non Plugin Entry since 2 0 public class Non Plugin Entry Model extends Content Entry Model private String id null  NonPluginEntry NonPluginEntryModel ContentEntryModel

concrete implementation of this model p p b Note b This class interface is part of an interim API that is still under development and expected to 
change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see org eclipse update core Plugin Entry since 2 0 public class Plugin Entry Model extends Content Entry Model  PluginEntry PluginEntryModel ContentEntryModel
private String plugin Id private String plugin Version private boolean is Fragment false private boolean unpack true  pluginId pluginVersion isFragment
Creates a uninitialized plug in entry model object since 2 0 
public Plugin Entry Model super Compares two plug in models for equality  PluginEntryModel
param obj other model to compare to return code true code if the models are equal code false code otherwise since 2 0 public boolean equals Object obj 
if obj instanceof Plugin Entry Model return false Plugin Entry Model model Plugin Entry Model obj return get Plugin Identifier equals model get Plugin Identifier  PluginEntryModel PluginEntryModel PluginEntryModel getPluginIdentifier getPluginIdentifier
get Plugin Version equals model get Plugin Version is Fragment model is Fragment Returns the plug in identifier for this entry  getPluginVersion getPluginVersion isFragment isFragment
return the plug in identifier or code null code since 2 0 public String get Plugin Identifier  getPluginIdentifier
return plugin Id Returns the plug in version for this entry  pluginId
return the plug in version or code null code since 2 0 public String get Plugin Version  getPluginVersion

Creates an uninitialized site model object since 2 0 public Site Model super  SiteModel
Returns the site type return site type or code null code since 2 0 public String get Type return type  getType
Returns the site description return site description or code null code since 2 0 public URL Entry Model get Description Model return description  URLEntryModel getDescriptionModel
Returns an array of feature reference models on this site return an array of feature reference models or an empty array since 2 0 public Site Feature Reference Model get Feature Reference Models if feature References null feature References size 0 return new Site Feature Reference Model 0 return Site Feature Reference Model feature References to Array array Type For feature References  SiteFeatureReferenceModel getFeatureReferenceModels featureReferences featureReferences SiteFeatureReferenceModel SiteFeatureReferenceModel featureReferences toArray arrayTypeFor featureReferences
Returns an array of plug in and non plug in archive reference models on this site return an array of archive reference models or an empty array if there are no archives known to this site since 2 0 public Archive Reference Model get Archive Reference Models if archive References null archive References size 0 return new Archive Reference Model 0 return Archive Reference Model archive References to Array array Type For archive References  ArchiveReferenceModel getArchiveReferenceModels archiveReferences archiveReferences ArchiveReferenceModel ArchiveReferenceModel archiveReferences toArray arrayTypeFor archiveReferences
Returns an array of category models for this site return array of site category models or an empty array since 2 0 public Category Model get Category Models if categories null categories size 0 return new Category Model 0 return Category Model categories to Array array Type For categories  CategoryModel getCategoryModels CategoryModel CategoryModel toArray arrayTypeFor
Returns the unresolved URL string for the site return url string or code null code since 2 0 public String get LocationURL String return locationURL String  getLocationURLString locationURLString
Returns the resolved URL for the site return url or code null code since 2 0 public URL get LocationURL return locationURL  getLocationURL
Sets the site type Throws a runtime exception if this object is marked read only param type site type since 2 0 public void set Type String type assert Is Writeable this type type  setType assertIsWriteable
Sets the site description Throws a runtime exception if this object is marked read only param description site description since 2 0 public void set Description Model URL Entry Model description assert Is Writeable this description description  setDescriptionModel URLEntryModel assertIsWriteable
Sets the feature references for this site Throws a runtime exception if this object is marked read only param feature References an array of feature reference models since 2 0 public void set Feature Reference Models Feature Reference Model feature References assert Is Writeable if feature References null this feature References null else this feature References new Array List Arrays as List feature References  featureReferences setFeatureReferenceModels FeatureReferenceModel featureReferences assertIsWriteable featureReferences featureReferences featureReferences ArrayList asList featureReferences
Sets the archive references for this site Throws a runtime exception if this object is marked read only param archive References an array of archive reference models since 2 0 public void set Archive Reference Models Archive Reference Model archive References assert Is Writeable if archive References null this archive References null else this archive References new Array List Arrays as List archive References  archiveReferences setArchiveReferenceModels ArchiveReferenceModel archiveReferences assertIsWriteable archiveReferences archiveReferences archiveReferences ArrayList asList archiveReferences
Sets the site categories Throws a runtime exception if this object is marked read only param categories an array of category models since 2 0 public void set Category Models Category Model categories assert Is Writeable if categories null this categories null else this categories new Tree Set Category Model get Comparator this categories add All Arrays as List categories  setCategoryModels CategoryModel assertIsWriteable TreeSet CategoryModel getComparator addAll asList
Sets the unresolved URL for the site Throws a runtime exception if this object is marked read only param locationURL String url for the site as a string since 2 0 public void set LocationURL String String locationURL String assert Is Writeable this locationURL String locationURL String  locationURLString setLocationURLString locationURLString assertIsWriteable locationURLString locationURLString
Adds a feature reference model to site Throws a runtime exception if this object is marked read only param feature Reference feature reference model since 2 0 public void add Feature Reference Model Site Feature Reference Model feature Reference assert Is Writeable if this feature References null this feature References new Array List PERF do not check if already present if this feature References contains feature Reference this feature References add feature Reference  featureReference addFeatureReferenceModel SiteFeatureReferenceModel featureReference assertIsWriteable featureReferences featureReferences ArrayList featureReferences featureReference featureReferences featureReference
Adds an archive reference model to site Throws a runtime exception if this object is marked read only param archive Reference archive reference model since 2 0 public void add Archive Reference Model Archive Reference Model archive Reference assert Is Writeable if this archive References null this archive References new Array List if this archive References contains archive Reference this archive References add archive Reference  archiveReference addArchiveReferenceModel ArchiveReferenceModel archiveReference assertIsWriteable archiveReferences archiveReferences ArrayList archiveReferences archiveReference archiveReferences archiveReference
Adds a category model to site Throws a runtime exception if this object is marked read only param category category model since 2 0 public void add Category Model Category Model category assert Is Writeable if this categories null this categories new Tree Set Category Model get Comparator if this categories contains category this categories add category  addCategoryModel CategoryModel assertIsWriteable TreeSet CategoryModel getComparator
Removes a feature reference model from site Throws a runtime exception if this object is marked read only param feature Reference feature reference model since 2 0 public void remove Feature Reference Model Feature Reference Model feature Reference assert Is Writeable if this feature References null this feature References remove feature Reference  featureReference removeFeatureReferenceModel FeatureReferenceModel featureReference assertIsWriteable featureReferences featureReferences featureReference
Removes an archive reference model from site Throws a runtime exception if this object is marked read only param archive Reference archive reference model since 2 0 public void remove Archive Reference Model Archive Reference Model archive Reference assert Is Writeable if this archive References null this archive References remove archive Reference  archiveReference removeArchiveReferenceModel ArchiveReferenceModel archiveReference assertIsWriteable archiveReferences archiveReferences archiveReference
Removes a category model from site Throws a runtime exception if this object is marked read only param category category model since 2 0 public void remove Category Model Category Model category assert Is Writeable if this categories null this categories remove category  removeCategoryModel CategoryModel assertIsWriteable
Marks the model object as read only since 2 0 public void mark Read Only super mark Read Only mark Reference Read Only get Description Model mark List Reference Read Only get Feature Reference Models mark List Reference Read Only get Archive Reference Models mark List Reference Read Only get Category Models  markReadOnly markReadOnly markReferenceReadOnly getDescriptionModel markListReferenceReadOnly getFeatureReferenceModels markListReferenceReadOnly getArchiveReferenceModels markListReferenceReadOnly getCategoryModels
Resolve the model object Any URL strings in the model are resolved relative to the base URL argument Any translatable strings in the model that are specified as translation keys are localized using the supplied resource bundle param base URL param bundleURL resource bundle URL exception MalformedURL Exception since 2 0 public void resolve URL base URL bundleURL throws MalformedURL Exception Archives and feature are relative to location URL if the Site element has a URL tag see spec locationURL resolveURL base bundleURL get LocationURL String if locationURL null locationURL base resolve List Reference get Feature Reference Models locationURL bundleURL resolve List Reference get Archive Reference Models locationURL bundleURL resolve Reference get Description Model base bundleURL resolve List Reference get Category Models base bundleURL  MalformedURLException MalformedURLException getLocationURLString resolveListReference getFeatureReferenceModels resolveListReference getArchiveReferenceModels resolveReference getDescriptionModel resolveListReference getCategoryModels
public Configured Site Model get Configured Site Model return this configured Site Model  ConfiguredSiteModel getConfiguredSiteModel configuredSiteModel
public void set Configured Site Model Configured Site Model configured Site Model this configured Site Model configured Site Model  setConfiguredSiteModel ConfiguredSiteModel configuredSiteModel configuredSiteModel configuredSiteModel
see org eclipse update core model Model Object get Property Name protected String get Property Name return Site SITE FILE  ModelObject getPropertyName getPropertyName SITE_FILE

Default site model factory p This class may be instantiated or subclassed by clients However in most 
of this factory p p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken 
repeatedly as the API evolves p see org eclipse update core Base Site Factory since 2 0 public class Site Model Factory private static Default Site Parser parser new Default Site Parser Creates a default site factory since 2 0 public Site Model Factory super  BaseSiteFactory SiteModelFactory DefaultSiteParser DefaultSiteParser SiteModelFactory
Indicates whether this factory can handle the specified site type This method is intended to be overridden by subclasses param type site type identifier 
return code true code if the type can be handled otherwise code false code since 2 0 public boolean can Parse Site Type String type return true if type was not specified ie is null or empty string  canParseSiteType
Creates and populates a default site from stream The parser assumes the stream contains a default site manifest 
site xml as documented by the platform param stream site stream return populated site model exception Core Exception  CoreException
since 2 0 public Site Model parse Site Input Stream stream throws Core Exception Invalid Site Type Exception Site Model result null  SiteModel parseSite InputStream CoreException InvalidSiteTypeException SiteModel

p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken 
repeatedly as the API evolves p see org eclipse update core URL Entry since 2 0 public class URL Entry Model extends Model Object  URLEntry URLEntryModel ModelObject
private String annotation private String localized Annotation private String url String private URL url  localizedAnnotation urlString
private int type IURL Entry UPDATE SITE performance private URL bundleURL private URL base  IURLEntry UPDATE_SITE
private boolean resolved false Creates a uninitialized annotated URL model object 
public URL Entry Model super  URLEntryModel
Returns the url annotation If the model object has been resolved the annotation is localized return url annotation or code null code since 2 0 
delayed Resolve if localized Annotation null return localized Annotation else return annotation  delayedResolve localizedAnnotation localizedAnnotation
return non localized url annotation or code null code since 2 0 public String get Annotation Non Localized return annotation  getAnnotationNonLocalized
Returns the unresolved url string 
since 2 0 public String getURL String  getURLString

p This class may be instantiated or subclassed by clients p 

p This class may be instantiated or subclassed by clients p 
b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see org eclipse update core I Plugin Entry see org eclipse update core model Plugin Entry Model since 2 0 public class Plugin Entry extends Plugin Entry Model implements I Plugin Entry PERF new instance variable  IPluginEntry PluginEntryModel PluginEntry PluginEntryModel IPluginEntry
private Versioned Identifier version Id Plug in entry default constructor  VersionedIdentifier versionId
super Returns the identifier of this plugin entry see I Plugin Entry get Versioned Identifier  IPluginEntry getVersionedIdentifier

Default installation path for features since 2 0 
public static final String DEFAULT INSTALLED FEATURE PATH features NON NLS 1 Default installation path for plug ins and plug in fragments since 2 0 public static final String DEFAULT PLUGIN PATH plugins NON NLS 1  DEFAULT_INSTALLED_FEATURE_PATH DEFAULT_PLUGIN_PATH
Default path on a site where packaged features are located since 2 0 public static final String DEFAULT FEATURE PATH features NON NLS 1  DEFAULT_FEATURE_PATH
Default site manifest file name since 2 0 
public static final String SITE FILE site NON NLS 1 Default site manifest extension since 2 0  SITE_FILE
public static final String SITE XML SITE FILE xml NON NLS 1 private I Site Content Provider site Content Provider private Map feature Cache new Hash Map key URL Key value I Feature Constructor for Site public Site super Compares two sites for equality  SITE_XML SITE_FILE ISiteContentProvider siteContentProvider featureCache HashMap URLKey IFeature
param obj site object to compare with return code true code if the two sites are equal code false code otherwise since 2 0 public boolean equals Object obj 
if obj instanceof I Site return false if getURL null return false I Site other Site I Site obj  ISite ISite otherSite ISite
Returns the site URL see I Site getURL since 2 0 public URL getURL URL url null try url get Site Content Provider getURL catch Core Exception e Update Core warn null e  ISite getSiteContentProvider CoreException UpdateCore
return url Returns the site description see I Site get Description since 2 0 public IURL Entry get Description return IURL Entry get Description Model  ISite getDescription IURLEntry getDescription IURLEntry getDescriptionModel
Returns an array of categories defined by the site see I Site get Categories since 2 0  ISite getCategories
public I Category get Categories Category Model result get Category Models if result length 0 return new I Category 0 else return I Category result  ICategory getCategories CategoryModel getCategoryModels ICategory ICategory
Returns the named site category 
since 2 0 public I Category get Category String key I Category result null boolean found false  ICategory getCategory ICategory
int length get Category Models length for int i 0 i length i if get Category Models i get Name equals key result I Category get Category Models i  getCategoryModels getCategoryModels getName ICategory getCategoryModels
found true break DEBUG if found String URL String this getURL null this getURL to External Form no site url NON NLS 1 Update Core warn Policy bind Site Cannot Find Category key URL String NON NLS 1 NON NLS 2 if get Category Models length 0 Update Core warn Policy bind Site No Categories NON NLS 1 return result Returns an array of references to features on this site see I Site get Feature References since 2 0 public I Site Feature Reference get Raw Feature References Feature Reference Model result get Feature Reference Models if result length 0 return new I Site Feature Reference 0 else return I Site Feature Reference result  URLString toExternalForm UpdateCore CannotFindCategory URLString getCategoryModels UpdateCore NoCategories ISite getFeatureReferences ISiteFeatureReference getRawFeatureReferences FeatureReferenceModel getFeatureReferenceModels ISiteFeatureReference ISiteFeatureReference
see org eclipse update core I Site get Feature References public I Site Feature Reference get Feature References only filter local site  ISite getFeatureReferences ISiteFeatureReference getFeatureReferences
if get Current Configured Site null return filter Features get Raw Feature References else return get Raw Feature References  getCurrentConfiguredSite filterFeatures getRawFeatureReferences getRawFeatureReferences
Method filter Features Also implemented in Feature param list return List  filterFeatures
private I Site Feature Reference filter Features I Site Feature Reference all Included List list new Array List if all Included null for int i 0 i all Included length i I Site Feature Reference included all Included i if Update Manager Utils is Valid Environment included  ISiteFeatureReference filterFeatures ISiteFeatureReference allIncluded ArrayList allIncluded allIncluded ISiteFeatureReference allIncluded UpdateManagerUtils isValidEnvironment
else if Update Core DEBUG Update Core DEBUG SHOW WARNINGS Update Core warn Filtered out feature reference included NON NLS 1  UpdateCore UpdateCore DEBUG_SHOW_WARNINGS UpdateCore
I Site Feature Reference result new I Site Feature Reference list size if list is Empty list to Array result return result  ISiteFeatureReference ISiteFeatureReference isEmpty toArray
see I Site get Feature Reference I Feature since 2 0 public I Site Feature Reference get Feature Reference I Feature feature  ISite getFeatureReference IFeature ISiteFeatureReference getFeatureReference IFeature
if feature null Update Core warn Site get Feature Reference The feature is null NON NLS 1 return null  UpdateCore getFeatureReference
I Site Feature Reference references get Feature References I Site Feature Reference current Reference null for int i 0 i references length i  ISiteFeatureReference getFeatureReferences ISiteFeatureReference currentReference
current Reference references i if Update Manager Utils sameURL feature getURL current Reference getURL return current Reference  currentReference UpdateManagerUtils currentReference currentReference
Update Core warn Feature feature not found on site this getURL NON NLS 1 NON NLS 2 return null Returns an array of plug in and non plug in archives located on this site see I Site get Archives since 2 0 public I Archive Reference get Archives  UpdateCore ISite getArchives IArchiveReference getArchives
Archive Reference Model result get Archive Reference Models if result length 0 return new I Archive Reference 0  ArchiveReferenceModel getArchiveReferenceModels IArchiveReference

import org eclipse update internal core Base site content provider 
p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves 
p public abstract class Site Content Provider implements I Site Content Provider private URL base private I Site site Constructor for Site Content Provider  SiteContentProvider ISiteContentProvider ISite SiteContentProvider
public Site Content Provider URL url super this base url  SiteContentProvider
Returns the URL of this site see I Site Content Provider getURL  ISiteContentProvider

Feature reference default constructor public Site Feature Reference super  SiteFeatureReference
Constructor Feature Reference param ref the reference to copy public Site Feature Reference I Site Feature Reference ref super ref  FeatureReference SiteFeatureReference ISiteFeatureReference
Returns an array of categories the referenced feature belong to see I Site Feature Reference get Categories since 2 1 public I Category get Categories if categories null categories new Array List String categories As String get Category Names for int i 0 i categories As String length i I Category site Cat get Site get Category categories As String i if site Cat null categories add site Cat else String siteURL get Site getURL null get Site getURL to External Form null Update Core warn Category categories As String i not found in Site siteURL NON NLS 1 NON NLS 2 I Category result new I Category 0 if categories null categories is Empty result new I Category categories size categories to Array result return result  ISiteFeatureReference getCategories ICategory getCategories ArrayList categoriesAsString getCategoryNames categoriesAsString ICategory siteCat getSite getCategory categoriesAsString siteCat siteCat getSite getSite toExternalForm UpdateCore categoriesAsString ICategory ICategory isEmpty ICategory toArray
Adds a category to the referenced feature see I Site Feature Reference add Category I Category since 2 1 public void add Category I Category category this add Category Name category get Name  ISiteFeatureReference addCategory ICategory addCategory ICategory addCategoryName getName

Creates an uninitialized feature reference model object since 2 0 public Site Feature Reference Model super  SiteFeatureReferenceModel
Constructor Feature Reference Model param ref public Site Feature Reference Model I Site Feature Reference ref super ref if ref instanceof Site Feature Reference Model Site Feature Reference Model ref Model Site Feature Reference Model ref set Category Names ref Model get Category Names  FeatureReferenceModel SiteFeatureReferenceModel ISiteFeatureReference SiteFeatureReferenceModel SiteFeatureReferenceModel refModel SiteFeatureReferenceModel setCategoryNames refModel getCategoryNames
Returns the names of categories the referenced feature belongs to return an array of names or an empty array since 2 0 public String get Category Names if category Names null return new String 0 return String category Names to Array new String 0  getCategoryNames categoryNames categoryNames toArray
Sets the names of categories this feature belongs to Throws a runtime exception if this object is marked read only param category Names an array of category names since 2 0 public void set Category Names String category Names assert Is Writeable if category Names null this category Names null else this category Names new Array List Arrays as List category Names  categoryNames setCategoryNames categoryNames assertIsWriteable categoryNames categoryNames categoryNames ArrayList asList categoryNames
Adds the name of a category this feature belongs to Throws a runtime exception if this object is marked read only param category Name category name since 2 0 public void add Category Name String category Name assert Is Writeable if this category Names null this category Names new Array List if this category Names contains category Name this category Names add category Name  categoryName addCategoryName categoryName assertIsWriteable categoryNames categoryNames ArrayList categoryNames categoryName categoryNames categoryName
Removes the name of a categorys this feature belongs to Throws a runtime exception if this object is marked read only param category Name category name since 2 0 public void remove Category Name String category Name assert Is Writeable if this category Names null this category Names remove category Name  categoryName removeCategoryName categoryName assertIsWriteable categoryNames categoryNames categoryName

all functionality is provided by static methods 
p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see org eclipse update core I Site see org eclipse update configuration I Local Site  ISite ILocalSite
see org eclipse update configuration I Configured Site since 2 0 public class Site Manager private static String os private static String ws private static String arch  IConfiguredSite SiteManager
private static boolean is Http Proxy Enable private static final String P HTTP HOST http proxy Host NON NLS 1 private static final String P HTTP PORT http proxy Port NON NLS 1 private static final String P HTTP PROXY http proxy Set NON NLS 1 private Site Manager  isHttpProxyEnable P_HTTP_HOST proxyHost P_HTTP_PORT proxyPort P_HTTP_PROXY proxySet SiteManager
Returns a site object for the site specified by the argument URL Typically the URL references a site manifest file on an update site An update site acts as a source of features for installation actions param siteURL site URL return site object for the url 
deprecated use get Site URL I Pogress Monitor instead since 2 0 public static I Site get Site URL siteURL throws Core Exception return Internal Site Manager get Site siteURL true null  getSite IPogressMonitor ISite getSite CoreException InternalSiteManager getSite
Returns a site object for the site specified by the argument URL Typically the URL references a site manifest file on an update site An update site acts as a source of features for installation actions 
param siteURL site URL param monitor the progress monitor return site object for the url or samp null samp in case a user canceled the connection in the progress monitor exception Core Exception since 2 1  CoreException
public static I Site get Site URL siteURL I Progress Monitor monitor throws Core Exception return Internal Site Manager get Site siteURL true monitor Returns a site object for the site specified by the argument URL Typically the URL references a site manifest file on an update site An update site acts as a source of features for installation  ISite getSite IProgressMonitor CoreException InternalSiteManager getSite
actions param siteURL site URL param uses Cache code false code if the cache should be refreshed and the site entirely reparsed code false code otherwise return site object for the url exception Core Exception deprecated use get Site URL boolean I Pogress Monitor instead  usesCache CoreException getSite IPogressMonitor
public static I Site get Site URL siteURL boolean uses Cache throws Core Exception return Internal Site Manager get Site siteURL uses Cache null  ISite getSite usesCache CoreException InternalSiteManager getSite usesCache
Returns a site object for the site specified by the argument URL 
site An update site acts as a source of features for installation actions 
param uses Cache code false code if the cache should be refreshed and the site entirely reparsed code false code otherwise param monitor the progress monitor return site object for the url or samp null samp in case a  usesCache
exception Core Exception since 2 1 public static I Site get Site URL siteURL boolean uses Cache I Progress Monitor monitor throws Core Exception return Internal Site Manager get Site siteURL uses Cache monitor  CoreException ISite getSite usesCache IProgressMonitor CoreException InternalSiteManager getSite usesCache
Returns the local site A local site is a logical collection of configuration information plus one or more file system 
These are potential targets for installation actions return the local site 
exception Core Exception since 2 0 public static I Local Site get Local Site throws Core Exception  CoreException ILocalSite getLocalSite CoreException
return Internal Site Manager get Local Site  InternalSiteManager getLocalSite
Trigger handling of newly discovered features This method can be called by the executing application whenever it is invoked with the new Updates command line argument throws Core Exception if an error occurs since 2 0 deprecated Do not use this method public static void handle New Changes throws Core Exception Returns system architecture specification A comma separated list of arch designators defined by the platform This information is used as a hint by the installation and update support return system architecture specification since 2 1 public static String getOS Arch  newUpdates CoreException handleNewChanges CoreException getOSArch

Convenience implementation of an annotated URL p This class may be instantiated or subclassed by clients p 
p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see org eclipse update core IURL Entry see org eclipse update core model URL Entry Model  IURLEntry URLEntryModel

Returns a new working directory in temporary space Ensures the directory exists Any directory levels that had to be created are marked for deletion on exit return working directory exception IO Exception since 2 0 public static synchronized File create Working Directory throws IO Exception if dir Root null dir Root System get Property java io tmpdir NON NLS 1 in Linux returns tmp we must add if dir Root ends With File separator dir Root File separator on Unix Linux the temp dir is shared by many users so we need to ensure that the top working directory is different for each user if Platform getOS equals win32 NON NLS 1 String home System get Property user home NON NLS 1 home Integer to String home hash Code dir Root home File separator dir Root eclipse File separator update File separator Long to String tmpseed File separator NON NLS 1 NON NLS 2 String tmp Name dir Root Long to String tmpseed File separator File tmp Dir new File tmp Name verify Path tmp Dir false if tmp Dir exists throw new File Not Found Exception tmp Name return tmp Dir  IOException createWorkingDirectory IOException dirRoot dirRoot getProperty dirRoot endsWith dirRoot getProperty toString hashCode dirRoot dirRoot toString tmpName dirRoot toString tmpDir tmpName verifyPath tmpDir tmpDir FileNotFoundException tmpName tmpDir
Create a new working file The file is marked for deletion on exit see lookup Local File String param tmp Dir directory location for new file Any missing directory levels are created and marked for deletion on exit param name optional file name or code null code If name is not specified a temporary name is generated return created working file exception IO Exception since 2 0 public static synchronized File create Local File File tmp Dir String name throws IO Exception create the local file File temp String file Path if name null create file with specified name file Path name replace File separator Char if file Path starts With File separator file Path file Path substring 1 temp new File tmp Dir file Path else create file with temp name temp File create Temp File eclipse null tmp Dir NON NLS 1 temp delete On Exit verify Path temp true return temp  lookupLocalFile tmpDir IOException createLocalFile tmpDir IOException filePath filePath separatorChar filePath startsWith filePath filePath tmpDir filePath createTempFile tmpDir deleteOnExit verifyPath
The file is associated with a lookup key param key optional lookup key or code null code param temp the local working file since 2 0 2 public synchronized static void map Local File String key File temp create file association if key null if entry Map null entry Map new Hash Map entry Map put key temp  mapLocalFile entryMap entryMap HashMap entryMap
Returns a previously cached local file in temporary area matching the specified key param key lookup key return cached file or code null code since 2 0 public static synchronized File lookup Local File String key if entry Map null return null return File entry Map get key  lookupLocalFile entryMap entryMap
Flushes all the keys from the local file map Reinitialize the cache since 2 1 public synchronized static void flush Local File entry Map null  flushLocalFile entryMap
Removes the specified key from the local file map The file is not actually deleted until VM termination param key lookup key since 2 0 public static synchronized void remove Local File String key if entry Map null entry Map remove key  removeLocalFile entryMap entryMap
Copies specified input stream to the output stream Neither stream is closed as part of this operation param is input stream param os output stream param monitor progress monitor exception IO Exception exception Install Aborted Exception since 2 0 public static void copy Input Stream is Output Stream os Install Monitor monitor throws IO Exception Install Aborted Exception long offset Update Manager Utils copy is os monitor 0 if offset 1 if monitor is Canceled String msg Policy bind Feature Installation Cancelled NON NLS 1 throw new Install Aborted Exception msg null else throw new IO Exception  IOException InstallAbortedException InputStream OutputStream InstallMonitor IOException InstallAbortedException UpdateManagerUtils isCanceled InstallationCancelled InstallAbortedException IOException
Creates a Core Exception from some other exception The type of the Core Exception is code I Status ERROR code If the exception passed as a parameter is also a Core Exception the new Core Exception will contain all the status of the passed Core Exception see I Status ERROR param s exception string param code the code reported param e actual exception being reported return a Core Exception since 2 0 public static Core Exception new Core Exception String s int code Throwable e String id Update Core get Plugin get Bundle get Symbolic Name check the case of a multistatus I Status status if e instanceof Feature Download Exception return Feature Download Exception e else if e instanceof Core Exception if s null s NON NLS 1 status new Multi Status id code s e I Status children Status Core Exception e get Status Multi Status status add children Status Multi Status status add All children Status else String Buffer complete String new String Buffer NON NLS 1 if s null complete String append s if e null complete String append NON NLS 1 String msg e get Localized Message complete String append msg null msg e to String complete String append NON NLS 1 status new Status I Status ERROR id code complete String to String e return new Core Exception status NON NLS 1  CoreException CoreException IStatus CoreException CoreException CoreException IStatus CoreException CoreException newCoreException UpdateCore getPlugin getBundle getSymbolicName IStatus FeatureDownloadException FeatureDownloadException CoreException MultiStatus IStatus childrenStatus CoreException getStatus MultiStatus childrenStatus MultiStatus addAll childrenStatus StringBuffer completeString StringBuffer completeString completeString getLocalizedMessage completeString toString completeString IStatus completeString toString CoreException
Creates a Core Exception from some other exception The type of the Core Exception is code I Status ERROR code If the exceptionpassed as a parameter is also a Core Exception the new Core Exception will contain all the status of the passed Core Exception see I Status ERROR param s exception string param e actual exception being reported return a Core Exception since 2 0 public static Core Exception new Core Exception String s Throwable e return new Core Exception s I Status OK e  CoreException CoreException IStatus CoreException CoreException CoreException IStatus CoreException CoreException newCoreException newCoreException IStatus
Creates a Core Exception from two other Core Exception param s overall exception string param s1 string for first detailed exception param s2 string for second detailed exception param e1 first detailed exception param e2 second detailed exception return a Core Exception with multi status since 2 0 public static Core Exception new Core Exception String s String s1 String s2 Core Exception e1 Core Exception e2 String id Update Core get Plugin get Bundle get Symbolic Name if s null s NON NLS 1 I Status child Status1 Core Exception e1 get Status I Status child Status2 Core Exception e2 get Status int code child Status1 get Code child Status2 get Code child Status1 get Code I Status OK Multi Status multi new Multi Status id code s null multi add child Status1 multi add All child Status1 multi add child Status2 multi add All child Status2 return new Core Exception multi NON NLS 1  CoreException CoreException CoreException CoreException newCoreException CoreException CoreException UpdateCore getPlugin getBundle getSymbolicName IStatus childStatus1 CoreException getStatus IStatus childStatus2 CoreException getStatus childStatus1 getCode childStatus2 getCode childStatus1 getCode IStatus MultiStatus MultiStatus childStatus1 addAll childStatus1 childStatus2 addAll childStatus2 CoreException
Formats a Date based on the default Locale If teh Date is code null code returns an empty String param date the Date to format return the formatted Date as a String since 2 0 public static String format Date date if date null return NON NLS 1 return date Format format date  dateFormat
Perform shutdown processing for temporary file handling This method is called when platform is shutting down It is not intended to be called at any other time under normal circumstances A side effect of calling this method is that the contents of the temporary directory managed by this class are deleted since 2 0 public static void shutdown if dir Root null return File temp new File dir Root temp directory root for this run cleanup Temp temp temp delete  dirRoot dirRoot cleanupTemp
private static void cleanup Temp File root File files root list Files for int i 0 files null i files length i if files i is Directory cleanup Temp files i files i delete  cleanupTemp listFiles isDirectory cleanupTemp
private static void verify Path File path boolean is File if we are expecting a file back off 1 path element if is File if path get Absolute Path ends With File separator make sure this is a file path path get Parent File is File false already exists just return if path exists return does not exist ensure parent exists File parent path get Parent File verify Path parent false ensure directories are made Mark files or directories for deletion if is File path mkdir path delete On Exit  verifyPath isFile isFile getAbsolutePath endsWith getParentFile isFile getParentFile verifyPath isFile deleteOnExit

see I Verifier verify I Feature Content Reference boolean Install Monitor public abstract I Verification Result verify I Feature feature Content Reference reference boolean is Feature Verification Install Monitor monitor  IVerifier IFeature ContentReference InstallMonitor IVerificationResult IFeature ContentReference isFeatureVerification InstallMonitor
see I Verifier verify I Feature Content Reference boolean Install Monitor public void set Parent I Verifier parent Verifier if this parent null this parent parent Verifier  IVerifier IFeature ContentReference InstallMonitor setParent IVerifier parentVerifier parentVerifier
Returns the parent verifier return the parent verifier since 2 0 public I Verifier get Parent return parent  IVerifier getParent

string with a version p Clients may instantiate not intended to be subclassed by clients p p b Note b This class interface is part of an interim API that is still under development and expected to change significantly before reaching stability It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken repeatedly as the API evolves p see org eclipse core runtime Plugin Version Identifier since 2 0  PluginVersionIdentifier
private String id private Plugin Version Identifier version private static final String SEPARATOR   NON NLS 1  PluginVersionIdentifier _
Construct a versioned identifier from an identifier and a string representation of a version see org eclipse core runtime Plugin Version Identifier to String  PluginVersionIdentifier toString
param version Name string representation of version since 2 0 public Versioned Identifier String id String version Name if id null id id trim equals NON NLS 1  versionName VersionedIdentifier versionName
Policy bind Versioned Identifier Id Or Version Null id version Name NON NLS 1 this id id 15707 if version Name null if Plugin Version Identifier validate Version Identifier version Name is Ok try this version new Plugin Version Identifier version Name catch Runtime Exception e  VersionedIdentifier IdOrVersionNull versionName versionName PluginVersionIdentifier validateVersionIdentifier versionName isOk PluginVersionIdentifier versionName RuntimeException
Update Core warn Invalid Version version Name e NON NLS 1 if this version null version new Plugin Version Identifier 0 0 0  UpdateCore versionName PluginVersionIdentifier

public Boot Descriptor String id String version String libs URL dir this id id this version version this libs libs this dir dir  BootDescriptor
public String get Id return id  getId
public String get Version return version  getVersion
public String get Libraries return libs  getLibraries
public URL get Plugin DirectoryURL return dir  getPluginDirectoryURL

Create a new about info for a feature with the given id package About Info String feature Id super this feature Id feature Id  AboutInfo featureId featureId featureId
Returns the configuration information for the feature with the given id param feature Id the feature id param version Id the version id of the feature param plugin Id the plug in id return the configuration information for the feature public static About Info read Feature Info String feature Id String version Id String plugin Id Assert is Not Null feature Id Assert is Not Null version Id Assert is Not Null plugin Id Ini File Reader reader new Ini File Reader feature Id plugin Id INI FILENAME PROPERTIES FILENAME MAPPINGS FILENAME I Status status reader load if status isOK return null return new About Info feature Id dummy about info About Info info new About Info feature Id Hashtable runtime Mappings new Hashtable runtime Mappings put feature Version version Id NON NLS 1 info version Id version Id info feature Plugin Label reader get Feature Plugin Label info provider Name reader get Provider Name info app Name reader get String app Name true runtime Mappings NON NLS 1 info about Text reader get String about Text true runtime Mappings NON NLS 1 info window ImageURL reader getURL window Image NON NLS 1 look for the newer array but if its not there then use the older single image definition info window ImagesUR Ls reader getUR Ls window Images NON NLS 1 info about ImageURL reader getURL about Image NON NLS 1 info feature ImageURL reader getURL feature Image NON NLS 1 info welcome PageURL reader getURL welcome Page NON NLS 1 info welcome Perspective reader get String welcome Perspective false runtime Mappings NON NLS 1 info tips And Tricks Href reader get String tips And Tricks Href false runtime Mappings NON NLS 1 return info  featureId versionId pluginId AboutInfo readFeatureInfo featureId versionId pluginId isNotNull featureId isNotNull versionId isNotNull pluginId IniFileReader IniFileReader featureId pluginId INI_FILENAME PROPERTIES_FILENAME MAPPINGS_FILENAME IStatus AboutInfo featureId AboutInfo AboutInfo featureId runtimeMappings runtimeMappings featureVersion versionId versionId versionId featurePluginLabel getFeaturePluginLabel providerName getProviderName appName getString appName runtimeMappings aboutText getString aboutText runtimeMappings windowImageURL windowImage windowImagesURLs getURLs windowImages aboutImageURL aboutImage featureImageURL featureImage welcomePageURL welcomePage welcomePerspective getString welcomePerspective runtimeMappings tipsAndTricksHref getString tipsAndTricksHref runtimeMappings
Returns the URL for an image which can be shown in an about dialog for this product Products designed to run headless typically would not have such an image return the URL for an about image or code null code if none public URL get About ImageURL return about ImageURL  getAboutImageURL aboutImageURL
Returns the URL for an image which can be shown in an about features dialog Products designed to run headless typically would not have such an image return the URL for a feature image or code null code if none public URL get Feature ImageURL return feature ImageURL  getFeatureImageURL featureImageURL
Returns the simple name of the feature image file return the simple name of the feature image file or code null code if none public String get Feature Image Name if feature ImageURL null I Path path new Path feature ImageURL get Path return path last Segment else return null  getFeatureImageName featureImageURL IPath featureImageURL getPath lastSegment
Returns a label for the feature plugn or code null code public String get Feature Label return feature Plugin Label  getFeatureLabel featurePluginLabel
Returns the id for this feature return the feature id public String get Feature Id return feature Id  getFeatureId featureId
Returns the text to show in an about dialog for this product Products designed to run headless typically would not have such text return the about text or code null code if none public String get About Text return about Text  getAboutText aboutText
Returns the application name or code null code Note this is never shown to the user It is used to initialize the SWT Display p On Motif for example this can be used to set the name used for resource lookup p return the application name or code null code public String get App Name return app Name  getAppName appName
Returns the product name or code null code This is shown in the window title and the About action return the product name or code null code public String get Product Name return feature Plugin Label  getProductName featurePluginLabel
Returns the provider name or code null code return the provider name or code null code public String get Provider Name return provider Name  getProviderName providerName
Returns the feature version id return the version id of the feature public String get Version Id return version Id  getVersionId versionId
Returns a code URL code for the welcome page Products designed to run headless typically would not have such an page return the welcome page or code null code if none public URL get Welcome PageURL return welcome PageURL  getWelcomePageURL welcomePageURL
Returns the ID of a perspective in which to show the welcome page May be code null code return the welcome page perspective id or code null code if none public String get Welcome Perspective Id return welcome Perspective  getWelcomePerspectiveId welcomePerspective
Returns a code String code for the tips and trick href return the tips and tricks href or code null code if none public String get Tips And Tricks Href return tips And Tricks Href  getTipsAndTricksHref tipsAndTricksHref
Returns the image url for the window image to use for this product Products designed to run headless typically would not have such an image return the image url for the window image or code null code if none public URL get Window ImageURL return window ImageURL  getWindowImageURL windowImageURL
Return an array of image UR Ls for the window images to use for this product The expectations is that the elements will be the same image rendered at different sizes Products designed to run headless typically would not have such images return an array of the image descriptors for the window images or code null code if none since 3 0 public URL get Window ImagesUR Ls return window ImagesUR Ls  URLs getWindowImagesURLs windowImagesURLs

Creates an INI file reader that can parse the contents into key value pairs param feature Id the unique identifier of the feature must not be code null code param plugin Id the unique identifier of the feature plug in must not be code null code param ini Filename the INI file name must not be code null code param properties Filename the properties filename can be code null code if not required param mappings Filename the mappings filename can be code null code if not required public Ini File Reader String feature Id String plugin Id String ini Filename String properties Filename String mappings Filename super if feature Id null plugin Id null ini Filename null throw new Illegal Argument Exception this feature Id feature Id this plugin Id plugin Id this ini Filename ini Filename this properties Filename properties Filename this mappings Filename mappings Filename  featureId pluginId iniFilename propertiesFilename mappingsFilename IniFileReader featureId pluginId iniFilename propertiesFilename mappingsFilename featureId pluginId iniFilename IllegalArgumentException featureId featureId pluginId pluginId iniFilename iniFilename propertiesFilename propertiesFilename mappingsFilename mappingsFilename
Read the contents of the INI properties and mappings files Does nothing if the content has already been read and parsed return an code I Status code indicating the success or failure of reading and parsing the INI file content public I Status load if ini null return OK STATUS attempt to locate the corresponding plugin bundle Platform get Bundle plugin Id if bundle null bundle get State Bundle UNINSTALLED bundle get State Bundle INSTALLED bundle null make it null for other test down the road String message Messages get String Ini File Reader Missing Desc feature Id NON NLS 1 return new Status I Status ERROR PID 0 message null Determine the ini file location URL iniURL null IO Exception ioe null try iniURL Platform find bundle new Path NLS TAG append ini Filename if iniURL null iniURL Platform resolve iniURL catch IO Exception e ioe e if iniURL null String message Messages get String Ini File Reader OpenINI Error ini Filename NON NLS 1 return new Status I Status ERROR PID 0 message ioe Determine the properties file location URL propertiesURL null if properties Filename null properties Filename length 0 try propertiesURL Platform find bundle new Path NLS TAG append properties Filename if propertiesURL null propertiesURL Platform resolve propertiesURL catch IO Exception e String message Messages get String Ini File Reader Open Prop Error properties Filename NON NLS 1 return new Status I Status ERROR PID 0 message e Determine the mappings file location URL mappingsURL null if mappings Filename null mappings Filename length 0 try mappingsURL Platform find bundle new Path NLS TAG append mappings Filename if mappingsURL null mappingsURL Platform resolve mappingsURL catch IO Exception e String message Messages get String Ini File Reader Open Map Error mappings Filename NON NLS 1 return new Status I Status ERROR PID 0 message e OK to pass null properties and or mapping file return load iniURL propertiesURL mappingsURL  IStatus IStatus OK_STATUS getBundle pluginId getState getState getString IniFileReader MissingDesc featureId IStatus IOException NLS_TAG iniFilename IOException getString IniFileReader OpenINIError iniFilename IStatus propertiesFilename propertiesFilename NLS_TAG propertiesFilename IOException getString IniFileReader OpenPropError propertiesFilename IStatus mappingsFilename mappingsFilename NLS_TAG mappingsFilename IOException getString IniFileReader OpenMapError mappingsFilename IStatus
Returns the string value for the given key or code null code The string value is NLS if requested return the string value for the given key or code null code public String get String String key boolean do Nls Hashtable runtime Mappings if ini null return null String value ini get Property key if value null do Nls return get Resource String value runtime Mappings return value  getString doNls runtimeMappings getProperty doNls getResourceString runtimeMappings
Returns a URL for the given key or code null code return a URL for the given key or code null code public URL getURL String key if ini null return null URL url null String file Name ini get Property key if file Name null if bundle null return null url Platform find bundle new Path file Name return url  fileName getProperty fileName fileName
Returns a array of URL for the given key or code null code The property value should be a comma separated list of urls tokens for which bundle cannot build an url will have a null entry param key name of the property containing the requested urls return a URL for the given key or code null code since 3 0 public URL getUR Ls String key if ini null bundle null return null String value ini get Property key if value null return null String Tokenizer tokens new String Tokenizer value NON NLS 1 Array List array new Array List 10 while tokens has More Tokens String str tokens next Token trim array add Platform find bundle new Path str URL urls new URL array size array to Array urls return urls  getURLs getProperty StringTokenizer StringTokenizer ArrayList ArrayList hasMoreTokens nextToken toArray
Returns the feature plugin label or code null code return the feature plugin lable or code null code if none public String get Feature Plugin Label if bundle null return null else return String bundle get Headers get Constants BUNDLE NAME  getFeaturePluginLabel getHeaders BUNDLE_NAME
Returns the provider name for this feature or code null code return the provider name for this feature or code null code public String get Provider Name if bundle null return null else return String bundle get Headers get Constants BUNDLE VENDOR  getProviderName getHeaders BUNDLE_VENDOR
public String get Resource String String value Hashtable runtime Mappings if value null return null String s value trim if s starts With KEY PREFIX return s if s starts With KEY DOUBLE PREFIX return s substring 1 int ix s index Of NON NLS 1 String key ix 1 s s substring 0 ix String dflt ix 1 s s substring ix 1 if properties null return dflt String result null try result properties get String key substring 1 catch Missing Resource Exception e return dflt if runtime Mappings null for Enumeration e runtime Mappings keys e has More Elements String key Value String e next Element int i result index Of key Value if i 1 String s1 result substring 0 i String s2 String runtime Mappings get key Value String s3 result substring i key Value length result s1 s2 s3 if result index Of 1 We test for the curly braces since due to NL issues we do not want to use Message Format unless we have to result Message Format format result mappings return result  getResourceString runtimeMappings startsWith KEY_PREFIX startsWith KEY_DOUBLE_PREFIX indexOf getString MissingResourceException runtimeMappings runtimeMappings hasMoreElements keyValue nextElement indexOf keyValue runtimeMappings keyValue keyValue indexOf MessageFormat MessageFormat
private I Status load URL iniURL URL propertiesURL URL mappingsURL Input Stream is null try is iniURL open Stream ini new Properties ini load is catch IO Exception e ini null String message Messages get String Ini File Reader Read Ini Error iniURL to External Form NON NLS 1 return new Status I Status ERROR PID 0 message e finally try if is null is close catch IO Exception e if propertiesURL null is null try is propertiesURL open Stream properties new Property Resource Bundle is catch IO Exception e properties null String message Messages get String Ini File Reader Read Prop Error propertiesURL to External Form NON NLS 1 return new Status I Status ERROR PID 0 message e finally try if is null is close catch IO Exception e Property Resource Bundle bundle null if mappingsURL null is null try is mappingsURL open Stream bundle new Property Resource Bundle is catch IO Exception e bundle null String message Messages get String Ini File Reader Read Map Error mappingsURL to External Form NON NLS 1 return new Status I Status ERROR PID 0 message e finally try if is null is close catch IO Exception e Array List mappings List new Array List if bundle null boolean found true int i 0 while found try mappings List add bundle get String Integer to String i catch Missing Resource Exception e found false i mappings String mappings List to Array new String mappings List size return OK STATUS  IStatus InputStream openStream IOException getString IniFileReader ReadIniError toExternalForm IStatus IOException openStream PropertyResourceBundle IOException getString IniFileReader ReadPropError toExternalForm IStatus IOException PropertyResourceBundle openStream PropertyResourceBundle IOException getString IniFileReader ReadMapError toExternalForm IStatus IOException ArrayList mappingsList ArrayList mappingsList getString toString MissingResourceException mappingsList toArray mappingsList OK_STATUS

private String bundleURL Constructor for local file public Bundle Manifest File manifest super manifest File manifest if manifest exists manifest is Directory File Input Stream fos null try fos new File Input Stream manifest parse fos catch IO Exception ioe finally if fos null try fos close catch IO Exception e  BundleManifest manifestFile isDirectory FileInputStream FileInputStream IOException IOException
Constructor for local file public Bundle Manifest Input Stream input String bundle Url super bundleURL bundle Url if input null parse input  BundleManifest InputStream bundleUrl bundleUrl
Parses manifest creates Plugin Entry if manifest is valid stores exception if any occurs param in Input Stream private void parse Input Stream in try Manifest m new Manifest in Attributes a m get Main Attributes plugin id String symbolic Name a get Value Constants BUNDLE SYMBOLICNAME if symbolic Name null In Eclipse manifest must have Bundle Symbolic Name attribute return String id try Manifest Element elements Manifest Element parse Header Constants BUNDLE SYMBOLICNAME symbolic Name id elements 0 get Value catch Bundle Exception be throw new IO Exception be get Message plugin version String version a get Value Constants BUNDLE VERSION if version null Utils log Messages get String Bundle Manifest no Version Constants BUNDLE VERSION NON NLS 1 id return String host Plugin a get Value Constants FRAGMENT HOST plugin Entry new Plugin Entry plugin Entry set Versioned Identifier new Versioned Identifier id version plugin Entry is Fragment host Plugin null host Plugin length 0 Set URL if bundleURL null plugin Entry setURL bundleURL else File plugin Dir manifest File get Parent File if plugin Dir null plugin Dir plugin Dir get Parent File if plugin Dir null plugin Entry setURL PLUGINS plugin Dir get Name NON NLS 1 NON NLS 2 catch IO Exception ioe exception ioe  PluginEntry InputStream InputStream getMainAttributes symbolicName getValue BUNDLE_SYMBOLICNAME symbolicName SymbolicName ManifestElement ManifestElement parseHeader BUNDLE_SYMBOLICNAME symbolicName getValue BundleException IOException getMessage getValue BUNDLE_VERSION getString BundleManifest noVersion BUNDLE_VERSION hostPlugin getValue FRAGMENT_HOST pluginEntry PluginEntry pluginEntry setVersionedIdentifier VersionedIdentifier pluginEntry isFragment hostPlugin hostPlugin pluginEntry pluginDir manifestFile getParentFile pluginDir pluginDir pluginDir getParentFile pluginDir pluginEntry pluginDir getName IOException
public boolean exists return exception null plugin Entry null  pluginEntry
Obtains Plugin Entry from a manifest return Plugin Entry or null if valid manifest does not exist throws IO Exception if exception during parsing public Plugin Entry get Plugin Entry throws IO Exception if exception null throw exception else return plugin Entry  PluginEntry PluginEntry IOException PluginEntry getPluginEntry IOException pluginEntry

public Configuration this new Date the config is created now or out of a platform xml without a date is Dirty true  isDirty
is Dirty true public Configuration Date date this date date  isDirty
public void setURL URL url this url url 
public URL getURL return url 
public void set Linked Config Configuration linked Config this linked Config linked Config make all the sites read only Site Entry linked Sites linked Config get Sites for int i 0 i linked Sites length i linked Sites i set Updateable false  setLinkedConfig linkedConfig linkedConfig linkedConfig SiteEntry linkedSites linkedConfig getSites linkedSites linkedSites setUpdateable
public Configuration get Linked Config return linked Config  getLinkedConfig linkedConfig
return true if the config needs to be saved public boolean is Dirty return is Dirty  isDirty isDirty
public void set Dirty boolean dirty is Dirty dirty  setDirty isDirty
public void add Site Entry String url Site Entry site only add the same site once if sites get url null linked Config null linked Config sites get url null site set Config this sites put url site  addSiteEntry SiteEntry linkedConfig linkedConfig setConfig
public void remove Site Entry String url sites remove url  removeSiteEntry
public Site Entry get Site Entry String url Site Entry site Site Entry sites get url if site null linked Config null site linked Config get Site Entry url return site  SiteEntry getSiteEntry SiteEntry SiteEntry linkedConfig linkedConfig getSiteEntry
public Site Entry get Sites if linked Config null return Site Entry sites values to Array new Site Entry sites size else Array List combined Sites new Array List sites values combined Sites add All linked Config sites values return Site Entry combined Sites to Array new Site Entry combined Sites size  SiteEntry getSites linkedConfig SiteEntry toArray SiteEntry ArrayList combinedSites ArrayList combinedSites addAll linkedConfig SiteEntry combinedSites toArray SiteEntry combinedSites
public Element toXML Document doc throws Core Exception try Element config Element doc create Element CFG config Element set Attribute CFG VERSION VERSION config Element set Attribute CFG DATE String value Of date get Time String transitory is Transient true false NON NLS 1 NON NLS 2 config Element set Attribute CFG TRANSIENT transitory if linked Config null config Element set Attribute CFG SHARED URL linked Config getURL to External Form collect site entries Site Entry list Site Entry sites values to Array new Site Entry 0 for int i 0 i list length i if linked Config null linked Config get Site Entry list i getURL to External Form null continue Element site Element list i toXML doc config Element append Child site Element return config Element catch Exception e throw Utils new Core Exception e NON NLS 1  CoreException configElement createElement configElement setAttribute CFG_VERSION configElement setAttribute CFG_DATE valueOf getTime isTransient configElement setAttribute CFG_TRANSIENT linkedConfig configElement setAttribute CFG_SHARED_URL linkedConfig toExternalForm SiteEntry SiteEntry toArray SiteEntry linkedConfig linkedConfig getSiteEntry toExternalForm siteElement configElement appendChild siteElement configElement newCoreException
public boolean is Transient return transient Config  isTransient transientConfig
public void set Transient boolean is Transient this transient Config is Transient  setTransient isTransient transientConfig isTransient
public Date get Date return date  getDate
public void set Date Date date this date date  setDate
public boolean unconfigure Feature Entry I Platform Configuration I Feature Entry feature Site Entry sites get Sites for int i 0 i sites length i if sites i unconfigure Feature Entry feature return true return false  unconfigureFeatureEntry IPlatformConfiguration IFeatureEntry SiteEntry getSites unconfigureFeatureEntry
public void set Last Modified long last Modified this last Modified last Modified  setLastModified lastModified lastModified lastModified
public long last Modified if last Modified 0 return last Modified else return date get Time  lastModified lastModified lastModified getTime

private static Configuration Activator configurator public Configuration Activator configurator this  ConfigurationActivator ConfigurationActivator
public void start Bundle Context ctx throws Exception context ctx load Options acquire Framework Log Service initialize Short cut if the configuration has not changed if can Run With Cached Data Utils debug Running with cached data NON NLS 1 Platform register Bundle Group Provider this return Utils debug Starting update configurator NON NLS 1 install Bundles Platform register Bundle Group Provider this  BundleContext loadOptions acquireFrameworkLogService canRunWithCachedData registerBundleGroupProvider installBundles registerBundleGroupProvider
private void initialize throws Exception TODO this test is not really needed any more than any plugin has to test to see if the runtime is running It was there from earlier days where startup was much more disjoint Some day that level of decoupling will return but for now if Platform is Running throw new Exception Messages get String Configuration Activator initialize NON NLS 1 config Location Platform get Configuration Location create the name space directory for update configuration org eclipse update if config Location is Read Only try URL privateURL new URL config Location getURL NAME SPACE File f new File privateURL get File if f exists f mkdirs catch MalformedURL Exception e1 ignore configuration FactorySR context register Service I Platform Configuration Factory class get Name new Platform Configuration Factory null configuration get Platform Configuration get InstallURL config Location if configuration null throw Utils new Core Exception Messages get String Configuration Activator create Config config Location getURL to External Form null NON NLS 1 Data Input Stream stream null try stream new Data Input Stream new URL config Location getURL NAME SPACE LAST CONFIG STAMP open Stream last Time Stamp stream read Long last State Time Stamp stream read Long catch Exception e last Time Stamp configuration get Change Stamp 1 last State Time Stamp 1 finally if stream null try stream close catch IO Exception e1 Utils log e1 get Localized Message  isRunning getString ConfigurationActivator configLocation getConfigurationLocation configLocation isReadOnly configLocation NAME_SPACE getFile MalformedURLException configurationFactorySR registerService IPlatformConfigurationFactory getName PlatformConfigurationFactory getPlatformConfiguration getInstallURL configLocation newCoreException getString ConfigurationActivator createConfig configLocation toExternalForm DataInputStream DataInputStream configLocation NAME_SPACE LAST_CONFIG_STAMP openStream lastTimeStamp readLong lastStateTimeStamp readLong lastTimeStamp getChangeStamp lastStateTimeStamp IOException getLocalizedMessage
public void stop Bundle Context ctx throws Exception quick fix hack for bug 47861 try Platform Configuration shutdown catch IO Exception e TODO Auto generated catch block e print Stack Trace configuration FactorySR unregister  BundleContext PlatformConfiguration IOException printStackTrace configurationFactorySR
public boolean install Bundles Utils debug Installing bundles NON NLS 1 Service Reference reference context get Service Reference Start Level class get Name int start Level 4 String default Start Level System get Property osgi bundles default Start Level NON NLS 1 if default Start Level null try start Level Integer parse Int default Start Level catch Number Format Exception e1 start Level 4 if start Level 1 start Level 4 Start Level start null if reference null start Start Level context get Service reference try Get the list of cached bundles and compare with the ones to be installed Uninstall all the cached bundles that do not appear on the new list Bundle cached Bundles context get Bundles URL plugins configuration get Plugin Path Bundle bundles To Uninstall get Bundles To Uninstall cached Bundles plugins for int i 0 i bundles To Uninstall length i try if DEBUG Utils debug Uninstalling bundles To Uninstall i get Location NON NLS 1 bundles To Uninstall i uninstall catch Exception e Utils log Messages get String Configuration Activator uninstall Bundle bundles To Uninstall i get Location NON NLS 1 starts the list of bundles to refresh with all currently unresolved bundles see bug 50680 List to Refresh get Unresolved Bundles Get the urls to install String bundles To Install get Bundles To Install cached Bundles plugins for int i 0 i bundles To Install length i try if DEBUG Utils debug Installing bundles To Install i NON NLS 1 URL bundleURL new URL reference file bundles To Install i NON NLS 1 Bundle target context install Bundle bundles To Install i Bundle target context install Bundle UPDATE PREFIX bundles To Install i bundleURL open Stream any new bundle should be refreshed as well to Refresh add target if start null start set Bundle Start Level target start Level catch Exception e if Utils is Automatically Started Bundle bundles To Install i Utils log Messages get String Configuration Activator install Bundle bundles To Install i e get Message NON NLS 1 NON NLS 2 context unget Service reference remove Initial Bundles to Refresh cached Bundles refresh Packages Bundle to Refresh to Array new Bundle to Refresh size keep track of the last config successfully processed write Platform Configuration Time Stamp return true catch Exception e return false  installBundles ServiceReference getServiceReference StartLevel getName startLevel defaultStartLevel getProperty defaultStartLevel defaultStartLevel startLevel parseInt defaultStartLevel NumberFormatException startLevel startLevel startLevel StartLevel StartLevel getService cachedBundles getBundles getPluginPath bundlesToUninstall getBundlesToUninstall cachedBundles bundlesToUninstall bundlesToUninstall getLocation bundlesToUninstall getString ConfigurationActivator uninstallBundle bundlesToUninstall getLocation toRefresh getUnresolvedBundles bundlesToInstall getBundlesToInstall cachedBundles bundlesToInstall bundlesToInstall bundlesToInstall installBundle bundlesToInstall installBundle UPDATE_PREFIX bundlesToInstall openStream toRefresh setBundleStartLevel startLevel isAutomaticallyStartedBundle bundlesToInstall getString ConfigurationActivator installBundle bundlesToInstall getMessage ungetService removeInitialBundles toRefresh cachedBundles refreshPackages toRefresh toArray toRefresh writePlatformConfigurationTimeStamp
private void remove Initial Bundles List bundles Bundle cached Bundles String initial Symbolic Names get Initial Symbolic Names cached Bundles Iterator iter bundles iterator while iter has Next Bundle bundle Bundle iter next String symbolic Name bundle get Symbolic Name for int i 0 i initial Symbolic Names length i if initial Symbolic Names i equals symbolic Name iter remove break  removeInitialBundles cachedBundles initialSymbolicNames getInitialSymbolicNames cachedBundles hasNext symbolicName getSymbolicName initialSymbolicNames initialSymbolicNames symbolicName
private String get Initial Symbolic Names Bundle cached Bundles Array List initial new Array List for int i 0 i cached Bundles length i Bundle bundle cached Bundles i if bundle get Location starts With INITIAL PREFIX String symbolic Name bundle get Symbolic Name if symbolic Name null initial add symbolic Name return String initial to Array new String initial size  getInitialSymbolicNames cachedBundles ArrayList ArrayList cachedBundles cachedBundles getLocation startsWith INITIAL_PREFIX symbolicName getSymbolicName symbolicName symbolicName toArray
private List get Unresolved Bundles Bundle all Bundles context get Bundles List unresolved new Array List for int i 0 i all Bundles length i if all Bundles i get State Bundle INSTALLED unresolved add all Bundles i return unresolved  getUnresolvedBundles allBundles getBundles ArrayList allBundles allBundles getState allBundles
private String get Bundles To Install Bundle cached Bundles URL new Plugins First create a map of the cached bundles for faster lookup Hash Set cached Bundles Set new Hash Set cached Bundles length int offset UPDATE PREFIX length for int i 0 i cached Bundles length i if cached Bundles i get Bundle Id 0 continue skip the system bundle String bundle Location cached Bundles i get Location Ignore bundles not installed by us if bundle Location starts With UPDATE PREFIX continue bundle Location bundle Location substring offset cached Bundles Set add bundle Location On windows we will be doing case insensitive search as well so lower it now if is Windows cached Bundles Set add bundle Location to Lower Case Array List bundles To Install new Array List new Plugins length for int i 0 i new Plugins length i String location new Plugins i get File check if already installed if cached Bundles Set contains location continue if is Windows cached Bundles Set contains location to Lower Case continue bundles To Install add location return String bundles To Install to Array new String bundles To Install size  getBundlesToInstall cachedBundles newPlugins HashSet cachedBundlesSet HashSet cachedBundles UPDATE_PREFIX cachedBundles cachedBundles getBundleId bundleLocation cachedBundles getLocation bundleLocation startsWith UPDATE_PREFIX bundleLocation bundleLocation cachedBundlesSet bundleLocation isWindows cachedBundlesSet bundleLocation toLowerCase ArrayList bundlesToInstall ArrayList newPlugins newPlugins newPlugins getFile cachedBundlesSet isWindows cachedBundlesSet toLowerCase bundlesToInstall bundlesToInstall toArray bundlesToInstall
private Bundle get Bundles To Uninstall Bundle cached Bundles URL new Plugins First create a map for faster lookups Hash Set new Plugins Set new Hash Set new Plugins length for int i 0 i new Plugins length i String plugin Location new Plugins i get File new Plugins Set add plugin Location On windows we will be doing case insensitive search as well so lower it now if is Windows new Plugins Set add plugin Location to Lower Case Array List bundles To Uninstall new Array List int offset UPDATE PREFIX length for int i 0 i cached Bundles length i if cached Bundles i get Bundle Id 0 continue skip the system bundle String cached Bundle Location cached Bundles i get Location Only worry about bundles we installed if cached Bundle Location starts With UPDATE PREFIX continue cached Bundle Location cached Bundle Location substring offset if new Plugins Set contains cached Bundle Location continue if is Windows new Plugins Set contains cached Bundle Location to Lower Case continue bundles To Uninstall add cached Bundles i return Bundle bundles To Uninstall to Array new Bundle bundles To Uninstall size  getBundlesToUninstall cachedBundles newPlugins HashSet newPluginsSet HashSet newPlugins newPlugins pluginLocation newPlugins getFile newPluginsSet pluginLocation isWindows newPluginsSet pluginLocation toLowerCase ArrayList bundlesToUninstall ArrayList UPDATE_PREFIX cachedBundles cachedBundles getBundleId cachedBundleLocation cachedBundles getLocation cachedBundleLocation startsWith UPDATE_PREFIX cachedBundleLocation cachedBundleLocation newPluginsSet cachedBundleLocation isWindows newPluginsSet cachedBundleLocation toLowerCase bundlesToUninstall cachedBundles bundlesToUninstall toArray bundlesToUninstall
Creates and starts the platform configuration return the just started platform configuration private Platform Configuration get Platform Configuration URL installURL Location config Location try Platform Configuration startup installURL config Location catch Exception e if platform Tracker null String message e get Message if message null message NON NLS 1 Utils log Utils new Status message e return Platform Configuration get Current  PlatformConfiguration getPlatformConfiguration configLocation PlatformConfiguration configLocation platformTracker getMessage newStatus PlatformConfiguration getCurrent
Framework Listener listener new Framework Listener public void framework Event Framework Event event if event get Type Framework Event PACKAGES REFRESHED synchronized flag flag 0 true flag notify All  FrameworkListener FrameworkListener frameworkEvent FrameworkEvent getType FrameworkEvent PACKAGES_REFRESHED notifyAll
Do Package Admin refresh Packages in a synchronous way After installing all the requested bundles we need to do a refresh and want to ensure that everything is done before returning param bundles private void refresh Packages Bundle bundles if bundles length 0 return Service Reference package Admin Ref context get Service Reference Package Admin class get Name Package Admin package Admin null if package Admin Ref null package Admin Package Admin context get Service package Admin Ref if package Admin null return TODO this is such a hack it is silly There are still cases for race conditions etc but this should allow for some progress patch from John A final boolean flag new boolean false Framework Listener listener new Framework Listener public void framework Event Framework Event event if event get Type Framework Event PACKAGES REFRESHED synchronized flag flag 0 true flag notify All context add Framework Listener listener package Admin refresh Packages bundles synchronized flag while flag 0 try flag wait catch Interrupted Exception e context remove Framework Listener listener context unget Service package Admin Ref  PackageAdmin refreshPackages refreshPackages ServiceReference packageAdminRef getServiceReference PackageAdmin getName PackageAdmin packageAdmin packageAdminRef packageAdmin PackageAdmin getService packageAdminRef packageAdmin FrameworkListener FrameworkListener frameworkEvent FrameworkEvent getType FrameworkEvent PACKAGES_REFRESHED notifyAll addFrameworkListener packageAdmin refreshPackages InterruptedException removeFrameworkListener ungetService packageAdminRef
private void write Platform Configuration Time Stamp Data Output Stream stream null try if config Location is Read Only return String config Area config Location getURL get File last Time Stamp configuration get Change Stamp last State Time Stamp Platform get Platform Admin get State false get Time Stamp stream new Data Output Stream new File Output Stream config Area File separator NAME SPACE File separator LAST CONFIG STAMP stream write Long last Time Stamp stream write Long last State Time Stamp catch Exception e Utils log e get Localized Message finally if stream null try stream close catch IO Exception e1 Utils log e1 get Localized Message  writePlatformConfigurationTimeStamp DataOutputStream configLocation isReadOnly configArea configLocation getFile lastTimeStamp getChangeStamp lastStateTimeStamp getPlatformAdmin getState getTimeStamp DataOutputStream FileOutputStream configArea NAME_SPACE LAST_CONFIG_STAMP writeLong lastTimeStamp writeLong lastStateTimeStamp getLocalizedMessage IOException getLocalizedMessage
private void load Options all this is only to get the application args Debug Options service null Service Reference reference context get Service Reference Debug Options class get Name if reference null service Debug Options context get Service reference if service null return try DEBUG service get Boolean Option OPTION DEBUG false finally we have what we want release the service context unget Service reference  loadOptions DebugOptions ServiceReference getServiceReference DebugOptions getName DebugOptions getService getBooleanOption OPTION_DEBUG ungetService
private boolean can Run With Cached Data return true equals System get Property osgi check Configuration NON NLS 1 NON NLS 2 last Time Stamp configuration get Change Stamp last State Time Stamp Platform get Platform Admin get State false get Time Stamp  canRunWithCachedData getProperty checkConfiguration lastTimeStamp getChangeStamp lastStateTimeStamp getPlatformAdmin getState getTimeStamp
public static Bundle Context get Bundle Context return context  BundleContext getBundleContext
public static URL get InstallURL if installURL null installURL Platform get Install Location getURL return installURL  getInstallURL getInstallLocation
see org eclipse core runtime I Bundle Group Provider get Name public String get Name return Messages get String Bundle Group Provider NON NLS 1  IBundleGroupProvider getName getName getString BundleGroupProvider
public I Bundle Group get Bundle Groups if configuration null return new I Bundle Group 0 else I Platform Configuration I Feature Entry features configuration get Configured Feature Entries Array List bundle Groups new Array List features length for int i 0 i features length i if features i instanceof Feature Entry Feature Entry features i has Branding bundle Groups add features i return I Bundle Group bundle Groups to Array new I Bundle Group bundle Groups size  IBundleGroup getBundleGroups IBundleGroup IPlatformConfiguration IFeatureEntry getConfiguredFeatureEntries ArrayList bundleGroups ArrayList FeatureEntry FeatureEntry hasBranding bundleGroups IBundleGroup bundleGroups toArray IBundleGroup bundleGroups
public static void set Configurator Configuration Activator configurator Configuration Activator configurator configurator  setConfigurator ConfigurationActivator ConfigurationActivator
public static Configuration Activator get Configurator return configurator  ConfigurationActivator getConfigurator
private void acquire Framework Log Service throws Exception Service Reference log Service Reference context get Service Reference Framework Log class get Name if log Service Reference null return Utils log Framework Log context get Service log Service Reference  acquireFrameworkLogService ServiceReference logServiceReference getServiceReference FrameworkLog getName logServiceReference FrameworkLog getService logServiceReference

Constructor for Configuration Parser public Configuration Parser throws Invocation Target Exception try parser Factory set Namespace Aware true this parser parser Factory newSAX Parser catch Parser Configuration Exception e Utils log Utils new Status Configuration Parser e NON NLS 1 throw new Invocation Target Exception e catch SAX Exception e Utils log Utils new Status Configuration Parser e NON NLS 1 throw new Invocation Target Exception e  ConfigurationParser ConfigurationParser InvocationTargetException parserFactory setNamespaceAware parserFactory newSAXParser ParserConfigurationException newStatus ConfigurationParser InvocationTargetException SAXException newStatus ConfigurationParser InvocationTargetException
public Configuration parse URL url throws Exception DEBUG Utils debug Start parsing Configuration url NON NLS 1 long last Modified 0 try configURL url if file equals url get Protocol NON NLS 1 File input File new File url get File if input File exists input File can Read return null last Modified input File last Modified input new File Input Stream input File else input url open Stream parser parse new Input Source input this return config catch Exception e Utils log Utils new Status Configuration Parser parse error e NON NLS 1 throw e finally if config null config set Last Modified last Modified try if input null input close input null catch IO Exception e1 Utils log e1 get Localized Message  lastModified getProtocol inputFile getFile inputFile inputFile canRead lastModified inputFile lastModified FileInputStream inputFile openStream InputSource newStatus ConfigurationParser setLastModified lastModified IOException getLocalizedMessage
see Default Handler start Element String String String Attributes public void start Element String uri String local Name String q Name Attributes attributes throws SAX Exception DEBUG Utils debug Start Element uri uri local Name local Name q Name q Name NON NLS 1 NON NLS 2 NON NLS 3 try String tag local Name trim if tag equals Ignore Case CFG process Config attributes return if tag equals Ignore Case CFG SITE process Site attributes return if tag equals Ignore Case CFG FEATURE ENTRY process Feature attributes return catch MalformedURL Exception e throw new SAX Exception Messages get String Installed Site Parser Unable To CreateURL e get Message e NON NLS 1 catch Core Exception e throw new SAX Exception Messages get String Installed Site Parser Internal Error e to String e NON NLS 1  DefaultHandler startElement startElement localName qName SAXException localName qName qName localName equalsIgnoreCase processConfig equalsIgnoreCase CFG_SITE processSite equalsIgnoreCase CFG_FEATURE_ENTRY processFeature MalformedURLException SAXException getString InstalledSiteParser UnableToCreateURL getMessage CoreException SAXException getString InstalledSiteParser InternalError toString
process the Site info private void process Site Attributes attributes throws MalformedURL Exception Core Exception if config null return reset current site current SiteURL null String url String attributes get Value CFG URL NON NLS 1 if url String null return URL url null try url new URL url String catch MalformedURL Exception e try relative to install url url new URL Platform Configuration get InstallURL url String return if is Valid Site url return use this new site current SiteURL url int policy Type String policy List null String type String attributes get Value CFG POLICY NON NLS 1 if type String null policy Type DEFAULT POLICY TYPE policy List DEFAULT POLICY LIST else int i for i 0 i CFG POLICY TYPE length i if type String equals CFG POLICY TYPE i break if i CFG POLICY TYPE length policy Type DEFAULT POLICY TYPE policy List DEFAULT POLICY LIST else policy Type i String plugin List attributes get Value CFG LIST if plugin List null String Tokenizer st new String Tokenizer plugin List NON NLS 1 policy List new String st count Tokens for i 0 i policy List length i policy List i st next Token Site Policy sp new Site Policy policy Type policy List Site Entry site Site Entry new Site Entry url sp String flag attributes get Value CFG UPDATEABLE NON NLS 1 if flag null if flag equals true NON NLS 1 site set Updateable true else site set Updateable false flag attributes get Value CFG ENABLED NON NLS 1 if flag null flag equals false NON NLS 1 site set Enabled false else site set Enabled true String linkname attributes get Value CFG LINK FILE NON NLS 1 if linkname null linkname equals NON NLS 1 site set Link File Name linkname replace File separator Char DEBUG Utils debug End process config site url url String policy type String updatable flag NON NLS 1 NON NLS 2 NON NLS 3 config add Site Entry url to External Form site  processSite MalformedURLException CoreException currentSiteURL urlString getValue CFG_URL urlString urlString MalformedURLException PlatformConfiguration getInstallURL urlString isValidSite currentSiteURL policyType policyList typeString getValue CFG_POLICY typeString policyType DEFAULT_POLICY_TYPE policyList DEFAULT_POLICY_LIST CFG_POLICY_TYPE typeString CFG_POLICY_TYPE CFG_POLICY_TYPE policyType DEFAULT_POLICY_TYPE policyList DEFAULT_POLICY_LIST policyType pluginList getValue CFG_LIST pluginList StringTokenizer StringTokenizer pluginList policyList countTokens policyList policyList nextToken SitePolicy SitePolicy policyType policyList SiteEntry SiteEntry SiteEntry getValue CFG_UPDATEABLE setUpdateable setUpdateable getValue CFG_ENABLED setEnabled setEnabled getValue CFG_LINK_FILE setLinkFileName separatorChar urlString typeString addSiteEntry toExternalForm
process the Default Feature info private void process Feature Attributes attributes throws MalformedURL Exception Core Exception if current SiteURL null return the site was not correct String id attributes get Value CFG FEATURE ENTRY ID NON NLS 1 if id null return String version attributes get Value CFG FEATURE ENTRY VERSION NON NLS 1 String plugin Version attributes get Value CFG FEATURE ENTRY PLUGIN VERSION NON NLS 1 if plugin Version null plugin Version trim length 0 plugin Version version String plugin Identifier attributes get Value CFG FEATURE ENTRY PLUGIN IDENTIFIER NON NLS 1 if plugin Identifier null plugin Identifier trim length 0 plugin Identifier null String application attributes get Value CFG FEATURE ENTRY APPLICATION NON NLS 1 get install locations String locations attributes get Value CFG FEATURE ENTRY ROOT String Tokenizer st locations null new String Tokenizer locations new String Tokenizer NON NLS 1 NON NLS 2 Array List root List new Array List st count Tokens while st has More Tokens try URL root Entry new URL st next Token root List add root Entry catch MalformedURL Exception e skip bad entries URL roots URL root List to Array new URL root List size get primary flag boolean primary false String flag attributes get Value CFG FEATURE ENTRY PRIMARY NON NLS 1 if flag null if flag equals true NON NLS 1 primary true Feature Entry feature Entry new Feature Entry id version plugin Identifier plugin Version primary application roots set the url String url attributes get Value CFG URL NON NLS 1 if url null url trim length 0 feature Entry setURL url Site Entry site config get Site Entry current SiteURL to External Form site add Feature Entry feature Entry configured String configured String attributes get Value configured NON NLS 1 boolean configured configured String trim equals Ignore Case true true false NON NLS 1  DefaultFeature processFeature MalformedURLException CoreException currentSiteURL getValue CFG_FEATURE_ENTRY_ID getValue CFG_FEATURE_ENTRY_VERSION pluginVersion getValue CFG_FEATURE_ENTRY_PLUGIN_VERSION pluginVersion pluginVersion pluginVersion pluginIdentifier getValue CFG_FEATURE_ENTRY_PLUGIN_IDENTIFIER pluginIdentifier pluginIdentifier pluginIdentifier getValue CFG_FEATURE_ENTRY_APPLICATION getValue CFG_FEATURE_ENTRY_ROOT StringTokenizer StringTokenizer StringTokenizer ArrayList rootList ArrayList countTokens hasMoreTokens rootEntry nextToken rootList rootEntry MalformedURLException rootList toArray rootList getValue CFG_FEATURE_ENTRY_PRIMARY FeatureEntry featureEntry FeatureEntry pluginIdentifier pluginVersion getValue CFG_URL featureEntry SiteEntry getSiteEntry currentSiteURL toExternalForm addFeatureEntry featureEntry configuredString getValue configuredString equalsIgnoreCase
process the Config info private void process Config Attributes attributes String date attributes get Value CFG DATE if date null date trim length 0 config new Configuration constructed with current date else long time 0 try time Long parse Long date config new Configuration new Date time catch Number Format Exception e1 time new Date get Time Utils log Messages get String Installed Site Parser date date NON NLS 1 config new Configuration constructed with current date config setURL configURL try String sharedURL attributes get Value CFG SHARED URL if sharedURL null Configuration Parser parser new Configuration Parser Configuration shared Config parser parse new URL sharedURL if shared Config null throw new Exception config set Linked Config shared Config catch Exception e could not load from shared install Utils log Utils new Status Messages get String Configuration Parser cannot Load Shared Install e NON NLS 1 String flag attributes get Value CFG TRANSIENT if flag null config set Transient flag equals true NON NLS 1 DEBUG Utils debug End Processing Config Tag date attributes get Value CFG DATE NON NLS 1  processConfig getValue CFG_DATE parseLong NumberFormatException getTime getString InstalledSiteParser getValue CFG_SHARED_URL ConfigurationParser ConfigurationParser sharedConfig sharedConfig setLinkedConfig sharedConfig newStatus getString ConfigurationParser cannotLoadSharedInstall getValue CFG_TRANSIENT setTransient getValue CFG_DATE
private boolean is Valid Site URL url URL resolvedURL url if url get Protocol equals platform NON NLS 1 try resolvedURL Platform Configuration resolve PlatformURL url 19536 catch IO Exception e will use the baseline URL if Platform Configuration supports Detection resolvedURL return false File site Root new File resolvedURL get File replace File separator Char if site Root exists Utils debug Site resolvedURL does not exist NON NLS 1 NON NLS 2 return false else return true  isValidSite getProtocol PlatformConfiguration resolvePlatformURL IOException PlatformConfiguration supportsDetection siteRoot getFile separatorChar siteRoot
public void end Element String uri String local Name String q Name throws SAX Exception super end Element uri local Name q Name DEBUG Utils debug End Element uri uri local Name local Name q Name q Name NON NLS 1 NON NLS 2 NON NLS 3 try String tag local Name trim if tag equals Ignore Case CFG This is a bit of a hack When no features were added to the site but the site is initialized from platform xml we need to set the feature set to empty so we don t try to detect them Site Entry sites config get Sites for int i 0 i sites length i sites i initialized return catch Exception e silent ignore  endElement localName qName SAXException endElement localName qName localName qName qName localName equalsIgnoreCase SiteEntry getSites

public Feature Entry String id String version String plugin Identifier String plugin Version boolean primary String application URL root if id null throw new Illegal Argument Exception this id id this version version this plugin Version plugin Version this plugin Identifier plugin Identifier this primary primary this application application this root root null new URL 0 root  FeatureEntry pluginIdentifier pluginVersion IllegalArgumentException pluginVersion pluginVersion pluginIdentifier pluginIdentifier
public Feature Entry String id String version String plugin Version boolean primary String application URL root this id version id plugin Version primary application root  FeatureEntry pluginVersion pluginVersion
public void set Site Site Entry site this site site  setSite SiteEntry
public Site Entry get Site return this site  SiteEntry getSite
public void add Plugin Plugin Entry plugin if plugins null plugins new Array List plugins add plugin  addPlugin PluginEntry ArrayList
Sets the url string relative to the site url param url public void setURL String url this url url 
return the feature url relative to the site features org eclipse platform public String getURL if url null url FEATURES id   version return url  _
see I Feature Entry get Feature Identifier public String get Feature Identifier return id  IFeatureEntry getFeatureIdentifier getFeatureIdentifier
see I Feature Entry get Feature Version public String get Feature Version return version  IFeatureEntry getFeatureVersion getFeatureVersion
see I Feature Entry get Feature Plugin Version public String get Feature Plugin Version return plugin Version null plugin Version length 0 plugin Version null  IFeatureEntry getFeaturePluginVersion getFeaturePluginVersion pluginVersion pluginVersion pluginVersion
see I Feature Entry get Feature Plugin Identifier public String get Feature Plugin Identifier if no plugin is specified use the feature id return plugin Identifier null plugin Identifier length 0 plugin Identifier id  IFeatureEntry getFeaturePluginIdentifier getFeaturePluginIdentifier pluginIdentifier pluginIdentifier pluginIdentifier
see I Feature Entry get Feature Application public String get Feature Application return application  IFeatureEntry getFeatureApplication getFeatureApplication
see I Feature Entry get Feature RootUR Ls public URL get Feature RootUR Ls return root  IFeatureEntry getFeatureRootURLs getFeatureRootURLs
see I Feature Entry can Be Primary public boolean can Be Primary return primary  IFeatureEntry canBePrimary canBePrimary
public Element toXML Document doc Element feature Element doc create Element CFG FEATURE ENTRY write out feature entry settings if id null feature Element set Attribute CFG FEATURE ENTRY ID id if primary feature Element set Attribute CFG FEATURE ENTRY PRIMARY true NON NLS 1 if version null feature Element set Attribute CFG FEATURE ENTRY VERSION version if plugin Version null plugin Version equals version plugin Version length 0 feature Element set Attribute CFG FEATURE ENTRY PLUGIN VERSION plugin Version if plugin Identifier null plugin Identifier equals id plugin Identifier length 0 feature Element set Attribute CFG FEATURE ENTRY PLUGIN IDENTIFIER plugin Identifier if application null feature Element set Attribute CFG FEATURE ENTRY APPLICATION application if url null feature Element set Attribute CFG URL url URL roots get Feature RootUR Ls for int i 0 i roots length i String root roots i to External Form if root null root trim length 0 Element root Element doc create Element CFG FEATURE ENTRY ROOT root Element append Child doc create Text Node root feature Element append Child root Element return feature Element  featureElement createElement CFG_FEATURE_ENTRY featureElement setAttribute CFG_FEATURE_ENTRY_ID featureElement setAttribute CFG_FEATURE_ENTRY_PRIMARY featureElement setAttribute CFG_FEATURE_ENTRY_VERSION pluginVersion pluginVersion pluginVersion featureElement setAttribute CFG_FEATURE_ENTRY_PLUGIN_VERSION pluginVersion pluginIdentifier pluginIdentifier pluginIdentifier featureElement setAttribute CFG_FEATURE_ENTRY_PLUGIN_IDENTIFIER pluginIdentifier featureElement setAttribute CFG_FEATURE_ENTRY_APPLICATION featureElement setAttribute CFG_URL getFeatureRootURLs toExternalForm rootElement createElement CFG_FEATURE_ENTRY_ROOT rootElement appendChild createTextNode featureElement appendChild rootElement featureElement
public void set Description String description this description description  setDescription
public Bundle get Bundles if plugins null full Parse Array List bundles new Array List plugins size for int i 0 i plugins size i Plugin Entry plugin Plugin Entry plugins get i get the highest version for the plugin Bundle bundle Platform get Bundle plugin get Plugin Identifier if bundle null bundles add bundle return Bundle bundles to Array new Bundle bundles size  getBundles fullParse ArrayList ArrayList PluginEntry PluginEntry getBundle getPluginIdentifier toArray
public String get Description if description null full Parse return description  getDescription fullParse
see org eclipse core runtime I Bundle Group get Identifier public String get Identifier return id  IBundleGroup getIdentifier getIdentifier
public String get Name if branding null branding About Info read Feature Info id version get Feature Plugin Identifier return branding get Product Name  getName AboutInfo readFeatureInfo getFeaturePluginIdentifier getProductName
public String get Property String key if key null return null if branding null branding About Info read Feature Info id version get Feature Plugin Identifier I Bundle Group Constants if key equals FEATURE IMAGE return branding get Feature ImageURL null null branding get Feature ImageURL to External Form else if key equals TIPS AND TRICKS HREF return branding get Tips And Tricks Href else if key equals I Bundle Group Constants WELCOME PAGE same value is used by product and bundle group return branding get Welcome PageURL null null branding get Welcome PageURL to External Form else if key equals WELCOME PERSPECTIVE return branding get Welcome Perspective Id I Product Constants else if key equals APP NAME return branding get App Name else if key equals ABOUT TEXT return branding get About Text else if key equals ABOUT IMAGE return branding get About ImageURL null null branding get About ImageURL to External Form else if key equals WINDOW IMAGE return branding get Window ImageURL null null branding get Window ImageURL to External Form else if key equals WINDOW IMAGES URL urls branding get Window ImagesUR Ls if urls null return null String Buffer window ImagesUR Ls new String Buffer for int i 0 i urls length i window ImagesUR Ls append urls i to External Form if i urls length 1 window ImagesUR Ls append return window ImagesUR Ls to String else if key equals LICENSE HREF return get LicenseURL return null  getProperty AboutInfo readFeatureInfo getFeaturePluginIdentifier IBundleGroupConstants FEATURE_IMAGE getFeatureImageURL getFeatureImageURL toExternalForm TIPS_AND_TRICKS_HREF getTipsAndTricksHref IBundleGroupConstants WELCOME_PAGE getWelcomePageURL getWelcomePageURL toExternalForm WELCOME_PERSPECTIVE getWelcomePerspectiveId IProductConstants APP_NAME getAppName ABOUT_TEXT getAboutText ABOUT_IMAGE getAboutImageURL getAboutImageURL toExternalForm WINDOW_IMAGE getWindowImageURL getWindowImageURL toExternalForm WINDOW_IMAGES getWindowImagesURLs StringBuffer windowImagesURLs StringBuffer windowImagesURLs toExternalForm windowImagesURLs windowImagesURLs toString LICENSE_HREF getLicenseURL
public String get Provider Name if branding null branding About Info read Feature Info id version get Feature Plugin Identifier return branding get Provider Name  getProviderName AboutInfo readFeatureInfo getFeaturePluginIdentifier getProviderName
see org eclipse core runtime I Bundle Group get Version public String get Version return version  IBundleGroup getVersion getVersion
see org eclipse core runtime I Product get Application public String get Application return application  IProduct getApplication getApplication
see org eclipse core runtime I Product get Id public String get Id return id  IProduct getId getId
public Resource Bundle get Resource Bundle if resource Bundle null return resource Bundle Determine the properties file location if site null return null Resource Bundle bundle null try URL propertiesURL new URL site get ResolvedURL getURL Class Loader l new URL Class Loader new URL propertiesURL null bundle Resource Bundle get Bundle I Configuration Constants CFG FEATURE ENTRY Utils get Default Locale l catch Missing Resource Exception e Utils log e get Localized Message catch MalformedURL Exception e Utils log e get Localized Message return bundle  ResourceBundle getResourceBundle resourceBundle resourceBundle ResourceBundle getResolvedURL ClassLoader URLClassLoader ResourceBundle getBundle IConfigurationConstants CFG_FEATURE_ENTRY getDefaultLocale MissingResourceException getLocalizedMessage MalformedURLException getLocalizedMessage
public void set LicenseURL String licenseURL this licenseURL licenseURL  setLicenseURL
public String get LicenseURL if licenseURL null full Parse if licenseURL null return null String resolvedURL Utils get Resource String get Resource Bundle licenseURL if resolvedURL starts With http NON NLS 1 return resolvedURL else try return new URL get Site get ResolvedURL getURL resolvedURL to External Form catch MalformedURL Exception e return resolvedURL  getLicenseURL fullParse getResourceString getResourceBundle startsWith getSite getResolvedURL toExternalForm MalformedURLException
private void full Parse if fully Parsed return fully Parsed true if plugins null plugins new Array List Full Feature Parser parser new Full Feature Parser this parser parse  fullParse fullyParsed fullyParsed ArrayList FullFeatureParser FullFeatureParser
public Bundle get Defining Bundle return Platform get Bundle get Feature Plugin Identifier  getDefiningBundle getBundle getFeaturePluginIdentifier
public boolean has Branding String bundle Id get Feature Plugin Identifier return bundle Id null Platform get Bundle bundle Id null  hasBranding bundleId getFeaturePluginIdentifier bundleId getBundle bundleId

Constructs a feature parser public Feature Parser super try parser Factory set Namespace Aware true this parser parser Factory newSAX Parser catch Parser Configuration Exception e System out println e catch SAX Exception e System out println e  FeatureParser parserFactory setNamespaceAware parserFactory newSAXParser ParserConfigurationException SAXException
Parses the specified url and constructs a feature public Feature Entry parse URL featureURL feature null Input Stream in null try this url featureURL in featureURL open Stream parser parse new Input Source in this catch SAX Exception e catch IO Exception e finally if in null try in close catch IO Exception e1 Utils log e1 get Localized Message return feature  FeatureEntry InputStream openStream InputSource SAXException IOException IOException getLocalizedMessage
Handle start of element tags see Default Handler start Element String String String Attributes since 2 0 public void start Element String uri String local Name String q Name Attributes attributes throws SAX Exception Utils debug Start Element uri uri local Name local Name q Name q Name NON NLS 1 NON NLS 2 NON NLS 3 if feature equals local Name NON NLS 1 process Feature attributes stop parsing now throw new SAX Exception NON NLS 1 else  DefaultHandler startElement startElement localName qName SAXException localName qName qName localName processFeature SAXException
private void process Feature Attributes attributes identifier and version String id attributes get Value id NON NLS 1 String ver attributes get Value version NON NLS 1 if id null id trim equals NON NLS 1 ver null ver trim equals NON NLS 1 System out println Messages get String Feature Parser Id Or Version Invalid new String id ver NON NLS 1 else String label attributes get Value label NON NLS 1 String provider attributes get Value provider name NON NLS 1 String imageURL attributes get Value image NON NLS 1 String os attributes get Value os NON NLS 1 String ws attributes get Value ws NON NLS 1 String nl attributes get Value nl NON NLS 1 String arch attributes get Value arch NON NLS 1 if Utils is Valid Environment os ws arch nl return String exclusive attributes get Value exclusive NON NLS 1 String affinity attributes get Value colocation affinity NON NLS 1 String primary attributes get Value primary NON NLS 1 boolean is Primary true equals primary NON NLS 1 String application attributes get Value application NON NLS 1 String plugin attributes get Value plugin NON NLS 1 TODO rootUR Ls feature new Feature Entry id ver plugin is Primary application null NON NLS 1 if file equals url get Protocol NON NLS 1 File f new File url get File replace File separator Char feature setURL features f get Parent File get Name f get Name NON NLS 1 NON NLS 2 NON NLS 3 else feature setURL url to External Form Utils debug End process Default Feature tag id id ver ver url feature getURL NON NLS 1 NON NLS 2 NON NLS 3  processFeature getValue getValue getString FeatureParser IdOrVersionInvalid getValue getValue getValue getValue getValue getValue getValue isValidEnvironment getValue getValue getValue isPrimary getValue getValue rootURLs FeatureEntry isPrimary getProtocol getFile separatorChar getParentFile getName getName toExternalForm DefaultFeature

Constructs a feature parser public Full Feature Parser Feature Entry feature super this feature feature try parser Factory set Namespace Aware true this parser parser Factory newSAX Parser catch Parser Configuration Exception e System out println e catch SAX Exception e System out println e  FullFeatureParser FeatureEntry parserFactory setNamespaceAware parserFactory newSAXParser ParserConfigurationException SAXException
public void parse Input Stream in null try if feature get Site null return this url new URL feature get Site get ResolvedURL feature getURL FEATURE XML in url open Stream parser parse new Input Source in this catch SAX Exception e catch IO Exception e finally if in null try in close catch IO Exception e1 Utils log e1 get Localized Message  InputStream getSite getSite getResolvedURL FEATURE_XML openStream InputSource SAXException IOException IOException getLocalizedMessage
Handle start of element tags see Default Handler start Element String String String Attributes since 2 0 public void start Element String uri String local Name String q Name Attributes attributes throws SAX Exception Utils debug Start Element uri uri local Name local Name q Name q Name NON NLS 1 NON NLS 2 NON NLS 3 if plugin equals local Name NON NLS 1 process Plugin attributes else if description equals local Name NON NLS 1 is Description true else if license equals local Name NON NLS 1 process License attributes  DefaultHandler startElement startElement localName qName SAXException localName qName qName localName processPlugin localName isDescription localName processLicense
private void process Plugin Attributes attributes identifier and version String id attributes get Value id NON NLS 1 String ver attributes get Value version NON NLS 1 if id null id trim equals NON NLS 1 ver null ver trim equals NON NLS 1 System out println Messages get String Feature Parser Id Or Version Invalid new String id ver NON NLS 1 else String label attributes get Value label NON NLS 1 String provider attributes get Value provider name NON NLS 1 String nl attributes get Value nl NON NLS 1 String os attributes get Value os NON NLS 1 String ws attributes get Value ws NON NLS 1 String arch attributes get Value arch NON NLS 1 if Utils is Valid Environment os ws arch nl return Plugin Entry plugin new Plugin Entry plugin set Plugin Identifier id plugin set Plugin Version ver feature add Plugin plugin Utils debug End process Default Feature tag id id ver ver url feature getURL NON NLS 1 NON NLS 2 NON NLS 3  processPlugin getValue getValue getString FeatureParser IdOrVersionInvalid getValue getValue getValue getValue getValue getValue isValidEnvironment PluginEntry PluginEntry setPluginIdentifier setPluginVersion addPlugin DefaultFeature
private void process License Attributes attributes feature set LicenseURL attributes get Value url NON NLS 1  processLicense setLicenseURL getValue
public void characters char ch int start int length throws SAX Exception if is Description return description append ch start length  SAXException isDescription
public void end Element String uri String local Name String q Name throws SAX Exception if description equals local Name NON NLS 1 is Description false String d description to String trim Resource Bundle bundle feature get Resource Bundle feature set Description Utils get Resource String bundle d  endElement localName qName SAXException localName isDescription toString ResourceBundle getResourceBundle setDescription getResourceString

Lookup the message with the given ID in this catalog public static String get String String id return get String id String null  getString getString
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string public static String get String String id String binding return get String id new String binding  getString getString
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings public static String get String String id String binding1 String binding2 return get String id new String binding1 binding2  getString getString
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string values public static String get String String id String bindings if id null return No message available NON NLS 1 String message null try message bundle get String id catch Missing Resource Exception e If we got an exception looking for the message fail gracefully by just returning the id we were looking for In most cases this is semi informative so is not too bad return Missing message id in bundle Name NON NLS 1 NON NLS 2 if bindings null return message return Message Format format message bindings  getString getString MissingResourceException bundleName MessageFormat
Print a debug message to the console If the given boolean is code true code then pre pend the message with the current date public static void debug boolean include Date String message if include Date message new Date System current Time Millis to String message NON NLS 1 System out println message  includeDate includeDate currentTimeMillis toString

private Platform Configuration Location platform Config Location throws Core Exception IO Exception this external Link Sites new Hash Map this config null initialize configuration initialize Current platform Config Location Detect external links These are soft link to additional sites The link files are usually provided by external installation programs They are located relative to this configuration URL Note don t do it for self hosting if is Transient configure External Links Validate sites in the configuration Causes any sites that do not exist to be removed from the configuration validate Sites compute differences between configuration and actual content of the sites base sites and link sites Note when the config is transient generated by PDE etc we don t reconcile if is Transient return change Stamp compute Change Stamp if change Stamp config get Date get Time reconcile  PlatformConfiguration platformConfigLocation CoreException IOException externalLinkSites HashMap initializeCurrent platformConfigLocation isTransient configureExternalLinks validateSites isTransient changeStamp computeChangeStamp changeStamp getDate getTime
Platform Configuration URL url throws Exception this external Link Sites new Hash Map initialize url  PlatformConfiguration externalLinkSites HashMap
see I Platform Configuration create Site Entry URL I Site Policy public I Site Entry create Site Entry URL url I Site Policy policy return new Site Entry url policy  IPlatformConfiguration createSiteEntry ISitePolicy ISiteEntry createSiteEntry ISitePolicy SiteEntry
see I Platform Configuration create Site Policy int String public I Site Policy create Site Policy int type String list return new Site Policy type list  IPlatformConfiguration createSitePolicy ISitePolicy createSitePolicy SitePolicy
see I Platform Configuration create Feature Entry String String String boolean String URL public I Feature Entry create Feature Entry String id String version String plugin Version boolean primary String application URL root return new Feature Entry id version plugin Version primary application root  IPlatformConfiguration createFeatureEntry IFeatureEntry createFeatureEntry pluginVersion FeatureEntry pluginVersion
String boolean String URL public I Feature Entry create Feature Entry String id String version String plugin Identifier String plugin Version boolean primary String application URL root return new Feature Entry id version plugin Identifier plugin Version primary application root  IFeatureEntry createFeatureEntry pluginIdentifier pluginVersion FeatureEntry pluginIdentifier pluginVersion
see I Platform Configuration configure Site I Site Entry public void configure Site I Site Entry entry configure Site entry false  IPlatformConfiguration configureSite ISiteEntry configureSite ISiteEntry configureSite
public synchronized void configure Site I Site Entry entry boolean replace if entry null return URL url entry getURL if url null return String key url to External Form if config get Site Entry key null replace return if entry instanceof Site Entry config add Site Entry key Site Entry entry  configureSite ISiteEntry toExternalForm getSiteEntry SiteEntry addSiteEntry SiteEntry
public synchronized void unconfigure Site I Site Entry entry if entry null return URL url entry getURL if url null return String key url to External Form if entry instanceof Site Entry config remove Site Entry key  unconfigureSite ISiteEntry toExternalForm SiteEntry removeSiteEntry
public I Site Entry get Configured Sites if config null return new I Site Entry 0 Site Entry sites config get Sites Array List enabled Sites new Array List sites length for int i 0 i sites length i if sites i is Enabled enabled Sites add sites i return I Site Entry enabled Sites to Array new I Site Entry enabled Sites size  ISiteEntry getConfiguredSites ISiteEntry SiteEntry getSites ArrayList enabledSites ArrayList isEnabled enabledSites ISiteEntry enabledSites toArray ISiteEntry enabledSites
see I Platform Configuration find Configured Site URL public I Site Entry find Configured Site URL url return find Configured Site url true  IPlatformConfiguration findConfiguredSite ISiteEntry findConfiguredSite findConfiguredSite
param url site url param check PlatformURL if true check for url format that is platform return public Site Entry find Configured Site URL url boolean check PlatformURL if url null return null String key url to External Form Site Entry result config get Site Entry key if result null retry with decoded URL string try key URL Decoder decode key UTF 8 NON NLS 1 catch Unsupported Encoding Exception e ignore result config get Site Entry key if result null check PlatformURL try result find Configured Site Utils as PlatformURL url false catch Exception e ignore return result  checkPlatformURL SiteEntry findConfiguredSite checkPlatformURL toExternalForm SiteEntry getSiteEntry URLDecoder UnsupportedEncodingException getSiteEntry checkPlatformURL findConfiguredSite asPlatformURL
public synchronized void configure Feature Entry I Feature Entry entry if entry null return String key entry get Feature Identifier if key null return we should check each site and find where the feature is located and then configure it if config null config new Configuration Site Entry sites config get Sites for int i 0 i sites length i find out what site contains the feature and configure it try URL url new URL sites i getURL FEATURES entry get Feature Identifier   entry get Feature Version NON NLS 1 NON NLS 2 NON NLS 3 if new File url get File exists sites i add Feature Entry entry else url new URL sites i getURL FEATURES entry get Feature Identifier NON NLS 1 NON NLS 2 if new File url get File exists sites i add Feature Entry entry catch MalformedURL Exception e  configureFeatureEntry IFeatureEntry getFeatureIdentifier SiteEntry getSites getFeatureIdentifier _ getFeatureVersion getFile addFeatureEntry getFeatureIdentifier getFile addFeatureEntry MalformedURLException
public synchronized void unconfigure Feature Entry I Feature Entry entry if entry null return String key entry get Feature Identifier if key null return config unconfigure Feature Entry entry  unconfigureFeatureEntry IFeatureEntry getFeatureIdentifier unconfigureFeatureEntry
public I Feature Entry get Configured Feature Entries Array List config Features new Array List Site Entry sites config get Sites for int i 0 i sites length i Feature Entry features sites i get Feature Entries for int j 0 j features length j config Features add features j return I Feature Entry config Features to Array new Feature Entry config Features size  IFeatureEntry getConfiguredFeatureEntries ArrayList configFeatures ArrayList SiteEntry getSites FeatureEntry getFeatureEntries configFeatures IFeatureEntry configFeatures toArray FeatureEntry configFeatures
public I Feature Entry find Configured Feature Entry String id if id null return null Site Entry sites config get Sites for int i 0 i sites length i Feature Entry f sites i get Feature Entry id if f null return f return null  IFeatureEntry findConfiguredFeatureEntry SiteEntry getSites FeatureEntry getFeatureEntry
see I Platform Configuration get Configuration Location public URL get Configuration Location return config Location  IPlatformConfiguration getConfigurationLocation getConfigurationLocation configLocation
public long get Change Stamp if config get Linked Config null return config get Date get Time else return Math max config get Date get Time config get Linked Config get Date get Time  getChangeStamp getLinkedConfig getDate getTime getDate getTime getLinkedConfig getDate getTime
deprecated Don t use this method public long get Features Change Stamp return 0  getFeaturesChangeStamp
deprecated Don t use this method public long get Plugins Change Stamp return 0  getPluginsChangeStamp
public String get Application Identifier Return the app if defined in system properties String application System get Property ECLIPSE APPLICATION if application null return application Otherwise try to get it from the primary feature aka product String feature get Primary Feature Identifier lookup application for feature specified or defaulted if feature null I Feature Entry fe find Configured Feature Entry feature if fe null if fe get Feature Application null return fe get Feature Application return hardcoded default if we failed return DEFAULT FEATURE APPLICATION  getApplicationIdentifier getProperty ECLIPSE_APPLICATION getPrimaryFeatureIdentifier IFeatureEntry findConfiguredFeatureEntry getFeatureApplication getFeatureApplication DEFAULT_FEATURE_APPLICATION
public String get Primary Feature Identifier Return the product if defined in system properties String primary Feature Id System get Property ECLIPSE PRODUCT if primary Feature Id null check if feature exists I Feature Entry feature find Configured Feature Entry primary Feature Id if feature null feature can Be Primary return primary Feature Id return null  getPrimaryFeatureIdentifier primaryFeatureId getProperty ECLIPSE_PRODUCT primaryFeatureId IFeatureEntry findConfiguredFeatureEntry primaryFeatureId canBePrimary primaryFeatureId
public URL get Plugin Path Array List path new Array List Utils debug computed plug in path NON NLS 1 I Site Entry sites get Configured Sites URL pathURL for int i 0 i sites length i String plugins sites i get Plugins for int j 0 j plugins length j try pathURL new URL Site Entry sites i get ResolvedURL plugins j path add pathURL Utils debug pathURL to String NON NLS 1 catch MalformedURL Exception e skip entry Utils debug bad URL e NON NLS 1 return URL path to Array new URL 0  getPluginPath ArrayList ArrayList ISiteEntry getConfiguredSites getPlugins SiteEntry getResolvedURL toString MalformedURLException toArray
public Plugin Entry get Plugins Array List all Plugins new Array List Utils debug computed plug ins NON NLS 1 I Site Entry sites get Configured Sites for int i 0 i sites length i if sites i instanceof Site Entry Utils debug Site sites i getURL is not a Site Entry NON NLS 1 NON NLS 2 continue Plugin Entry plugins Site Entry sites i get Plugin Entries for int j 0 j plugins length j all Plugins add plugins j Utils debug plugins j getURL NON NLS 1 return Plugin Entry all Plugins to Array new Plugin Entry 0  PluginEntry getPlugins ArrayList allPlugins ArrayList ISiteEntry getConfiguredSites SiteEntry SiteEntry PluginEntry SiteEntry getPluginEntries allPlugins PluginEntry allPlugins toArray PluginEntry
see I Platform Configuration get Bootstrap Plugin Identifiers public String get Bootstrap Plugin Identifiers return BOOTSTRAP PLUGINS  IPlatformConfiguration getBootstrapPluginIdentifiers getBootstrapPluginIdentifiers BOOTSTRAP_PLUGINS
see I Platform Configuration set Bootstrap Plugin Location String URL public void set Bootstrap Plugin Location String id URL location  IPlatformConfiguration setBootstrapPluginLocation setBootstrapPluginLocation
see I Platform Configuration is Updateable public boolean is Updateable return true  IPlatformConfiguration isUpdateable isUpdateable
public boolean is Transient if config null return config is Transient else return false  isTransient isTransient
see I Platform Configuration is Transient boolean public void is Transient boolean value if this get Current config null config set Transient value  IPlatformConfiguration isTransient isTransient getCurrent setTransient
public synchronized void refresh Reset computed values Will be lazily refreshed on next access I Site Entry sites get Configured Sites for int i 0 i sites length i reset site entry Site Entry sites i refresh  ISiteEntry getConfiguredSites SiteEntry
see I Platform Configuration save public void save throws IO Exception if is Updateable save config Location  IPlatformConfiguration IOException isUpdateable configLocation
public synchronized void save URL url throws IO Exception if url null throw new IO Exception Messages get String cfig unable To Save noURL NON NLS 1 Output Stream os null if url get Protocol equals file NON NLS 1 not a file protocol attempt to save to the URL URL Connection uc url open Connection uc set Do Output true os uc get Output Stream try save AsXML os config set Dirty false catch Core Exception e Utils log e get Message Utils log e get Status throw new IO Exception Messages get String cfig unable To Save url to External Form NON NLS 1 finally os close else file protocol do safe i o File cfig File new File url get File replace File separator Char if cfig File get Name equals PLATFORM XML if cfig File exists cfig File is File Utils log Messages get String Platform Configuration expecting PlatformXM Lor Directory cfig File get Name NON NLS 1 cfig File cfig File get Parent File cfig File new File cfig File CONFIG NAME File working Dir cfig File get Parent File if working Dir null working Dir exists working Dir mkdirs Do safe i o backup current config by moving it to the history folder write new config to platform xml tmp file rename the temp file to platform xml File cfig File Original new File cfig File get Absolute Path File cfig Tmp new File cfig File get Absolute Path CONFIG FILE TEMP SUFFIX Backup old file if cfig File exists File backup Dir new File working Dir CONFIG HISTORY if backup Dir exists backup Dir mkdir long timestamp cfig File last Modified File preserved File new File backup Dir String value Of timestamp xml NON NLS 1 If the target file exists increment the timestamp Try at most 100 times long increment 1 while preserved File exists increment 100 preserved File new File backup Dir String value Of timestamp increment xml NON NLS 1 if preserved File exists try renaming current config to backup copy if cfig File rename To preserved File Utils log Messages get String Platform Configuration cannot Backup Config NON NLS 1 first save the file as temp os new File Output Stream cfig Tmp try save AsXML os Try flushing any internal buffers and synchronize with the disk try os flush File Output Stream os getFD sync catch Sync Failed Exception e2 Utils log e2 get Message catch IO Exception e2 Utils log e2 get Message try os close os null catch IO Exception e1 Utils log Messages get String Platform Configuration cannot Close Stream cfig Tmp NON NLS 1 Utils log e1 get Message set file time stamp to match that of the config element cfig Tmp set Last Modified config get Date get Time set this on config in case the value was rounded off config set Last Modified cfig Tmp last Modified make the change stamp to be the same as the config file change Stamp config get Date get Time config set Dirty false catch Core Exception e throw new IO Exception Messages get String cfig unable To Save cfig Tmp get Absolute Path NON NLS 1 finally if os null try os close catch IO Exception e1 Utils log Messages get String Platform Configuration cannot Close Temp File cfig Tmp NON NLS 1 at this point we have old config if existed as bak and the new config as tmp boolean ok cfig Tmp rename To cfig File Original if ok this codepath represents a tiny failure window The load processing on startup will detect missing config and will attempt to start with tmp latest then bak the previous We can also end up here if we failed to rename the current config to bak In that case we will restart with the previous state Utils log Messages get String Platform Configuration cannot Rename Temp File NON NLS 1 throw new IO Exception Messages get String cfig unable To Save cfig Tmp get Absolute Path NON NLS 1  IOException IOException getString unableToSave OutputStream getProtocol URLConnection openConnection setDoOutput getOutputStream saveAsXML setDirty CoreException getMessage getStatus IOException getString unableToSave toExternalForm cfigFile getFile separatorChar cfigFile getName PLATFORM_XML cfigFile cfigFile isFile getString PlatformConfiguration expectingPlatformXMLorDirectory cfigFile getName cfigFile cfigFile getParentFile cfigFile cfigFile CONFIG_NAME workingDir cfigFile getParentFile workingDir workingDir workingDir cfigFileOriginal cfigFile getAbsolutePath cfigTmp cfigFile getAbsolutePath CONFIG_FILE_TEMP_SUFFIX cfigFile backupDir workingDir CONFIG_HISTORY backupDir backupDir cfigFile lastModified preservedFile backupDir valueOf preservedFile preservedFile backupDir valueOf preservedFile cfigFile renameTo preservedFile getString PlatformConfiguration cannotBackupConfig FileOutputStream cfigTmp saveAsXML FileOutputStream SyncFailedException getMessage IOException getMessage IOException getString PlatformConfiguration cannotCloseStream cfigTmp getMessage cfigTmp setLastModified getDate getTime setLastModified cfigTmp lastModified changeStamp getDate getTime setDirty CoreException IOException getString unableToSave cfigTmp getAbsolutePath IOException getString PlatformConfiguration cannotCloseTempFile cfigTmp cfigTmp renameTo cfigFileOriginal getString PlatformConfiguration cannotRenameTempFile IOException getString unableToSave cfigTmp getAbsolutePath
public static Platform Configuration get Current return current Platform Configuration  PlatformConfiguration getCurrent currentPlatformConfiguration
Starts a platform installed at specified installURL using configuration located at platform Config Location public static synchronized void startup URL installURL Location platform Config Location throws Exception Platform Configuration installURL installURL create current configuration if current Platform Configuration null current Platform Configuration new Platform Configuration platform Config Location if current Platform Configuration config null throw new Exception Messages get String Platform Configuration cannot Load Config platform Config Location getURL NON NLS 1 if current Platform Configuration config is Dirty If this is a transient config generated by PDE do nothing otherwise save the configuration with proper date if current Platform Configuration is Transient current Platform Configuration save  platformConfigLocation platformConfigLocation PlatformConfiguration currentPlatformConfiguration currentPlatformConfiguration PlatformConfiguration platformConfigLocation currentPlatformConfiguration getString PlatformConfiguration cannotLoadConfig platformConfigLocation currentPlatformConfiguration isDirty currentPlatformConfiguration isTransient currentPlatformConfiguration
public static synchronized void shutdown throws IO Exception save platform configuration Platform Configuration config get Current if config null only save if there are changes in the config if config config is Dirty config is Transient try config save catch IO Exception e Utils debug Unable to save configuration e to String NON NLS 1 will recover on next startup  IOException PlatformConfiguration getCurrent isDirty isTransient IOException toString
private synchronized void initialize Current Location platform Config Location throws IO Exception Configuration URL was is specified by the OS Gi layer Default behavior is to look for configuration in the specified meta area If not found look for pre initialized configuration in the installation location If it is found it is used as the initial configuration Otherwise a new configuration is created In either case the resulting configuration is written into the specified configuration area URL config FileURL new URL platform Config Location getURL CONFIG NAME try check concurrent use lock get Configuration Lock platform Config Location getURL try loading the configuration try config load Config config FileURL Utils debug Using configuration config FileURL to String NON NLS 1 catch Exception e failed to load see if we can find pre initialized configuration try Location parent Location platform Config Location get Parent Location if parent Location null throw new IO Exception no platform xml found need to create default site URL shared Config FileURL new URL parent Location getURL CONFIG NAME config load Config shared Config FileURL pre initialized config loaded OK copy any remaining update metadata Only copy if the default config location is not the install location if shared Config FileURL equals config FileURL need to link config info instead of using a copy link Initialized State config parent Location platform Config Location Utils debug Configuration initialized from shared Config FileURL to String NON NLS 1 return catch Exception ioe Utils debug Creating default configuration from config FileURL to External Form NON NLS 1 create Default Configuration config FileURL finally config Location config FileURL if config getURL null config setURL config FileURL verify Path config Location Utils debug Creating configuration config FileURL to String NON NLS 1 releaes concurrent use lock clear Configuration Lock  initializeCurrent platformConfigLocation IOException OSGi configFileURL platformConfigLocation CONFIG_NAME getConfigurationLock platformConfigLocation loadConfig configFileURL configFileURL toString parentLocation platformConfigLocation getParentLocation parentLocation IOException sharedConfigFileURL parentLocation CONFIG_NAME loadConfig sharedConfigFileURL sharedConfigFileURL configFileURL linkInitializedState parentLocation platformConfigLocation sharedConfigFileURL toString configFileURL toExternalForm createDefaultConfiguration configFileURL configLocation configFileURL configFileURL verifyPath configLocation configFileURL toString clearConfigurationLock
private synchronized void initialize URL url throws Exception if url null config load Config url Utils debug Using configuration url to String NON NLS 1 if config null config new Configuration Utils debug Creating empty configuration object NON NLS 1 config setURL url config Location url  loadConfig toString configLocation
private void create Default Configuration URL url throws IO Exception we are creating new configuration config new Configuration config setURL url Site Entry default Site Site Entry get Root Site configure Site default Site try parse the site directory to discover features default Site load From Disk 0 catch Core Exception e1 Utils log Messages get String Platform Configuration cannot Load Default Site default Site get ResolvedURL NON NLS 1 return  createDefaultConfiguration IOException SiteEntry defaultSite SiteEntry getRootSite configureSite defaultSite defaultSite loadFromDisk CoreException getString PlatformConfiguration cannotLoadDefaultSite defaultSite getResolvedURL
private I Site Entry get Root Site create default site entry for the root I Site Policy default Policy create Site Policy DEFAULT POLICY TYPE DEFAULT POLICY LIST URL siteURL null try siteURL new URL platform base NON NLS 1 try using platform relative URL catch MalformedURL Exception e siteURL get InstallURL ensure we come up use absolute file URL I Site Entry default Site create Site Entry siteURL default Policy return default Site  ISiteEntry getRootSite ISitePolicy defaultPolicy createSitePolicy DEFAULT_POLICY_TYPE DEFAULT_POLICY_LIST MalformedURLException getInstallURL ISiteEntry defaultSite createSiteEntry defaultPolicy defaultSite
Gets the configuration lock param url configuration directory private void get Configuration Lock URL url if url get Protocol equals file NON NLS 1 return File lock File new File url get File Configuration Activator NAME SPACE File separator CONFIG FILE LOCK SUFFIX verify Path url try Random Access File raf new Random Access File lock File rw NON NLS 1 lock raf get Channel lock catch IO Exception ioe lock null  getConfigurationLock getProtocol lockFile getFile ConfigurationActivator NAME_SPACE CONFIG_FILE_LOCK_SUFFIX verifyPath RandomAccessFile RandomAccessFile lockFile getChannel IOException
private void clear Configuration Lock if lock null try lock channel close catch IO Exception ioe  clearConfigurationLock IOException
private long compute Change Stamp features Change Stamp compute Features Change Stamp plugins Change Stamp compute Plugins Change Stamp change Stamp Math max features Change Stamp plugins Change Stamp round off to seconds change Stamp change Stamp 1000 1000 return change Stamp  computeChangeStamp featuresChangeStamp computeFeaturesChangeStamp pluginsChangeStamp computePluginsChangeStamp changeStamp featuresChangeStamp pluginsChangeStamp changeStamp changeStamp changeStamp
private long compute Features Change Stamp if features Change Stamp Is Valid return features Change Stamp long result 0 I Site Entry sites config get Sites for int i 0 i sites length i result Math max result sites i get Features Change Stamp features Change Stamp result features Change Stamp Is Valid true return features Change Stamp  computeFeaturesChangeStamp featuresChangeStampIsValid featuresChangeStamp ISiteEntry getSites getFeaturesChangeStamp featuresChangeStamp featuresChangeStampIsValid featuresChangeStamp
private long compute Plugins Change Stamp if plugins Change Stamp Is Valid return plugins Change Stamp long result 0 I Site Entry sites config get Sites for int i 0 i sites length i result Math max result sites i get Plugins Change Stamp plugins Change Stamp result plugins Change Stamp Is Valid true return plugins Change Stamp  computePluginsChangeStamp pluginsChangeStampIsValid pluginsChangeStamp ISiteEntry getSites getPluginsChangeStamp pluginsChangeStamp pluginsChangeStampIsValid pluginsChangeStamp
private void configure External Links URL linkURL get InstallURL if supports Detection linkURL return try linkURL new URL linkURL LINKS NON NLS 1 catch MalformedURL Exception e skip bad links Utils debug Unable to obtain link URL NON NLS 1 return File link Dir new File linkURL get File File links link Dir list Files if links null links length 0 Utils debug No links detected in linkURL to External Form NON NLS 1 return for int i 0 i links length i if links i is Directory continue Utils debug Link file links i get Absolute Path NON NLS 1 Properties props new Properties File Input Stream is null try is new File Input Stream links i props load is configure External Link Site links i props catch IO Exception e skip bad links Utils debug unable to load link file e NON NLS 1 continue finally if is null try is close catch IO Exception e ignore  configureExternalLinks getInstallURL supportsDetection MalformedURLException linkDir getFile linkDir listFiles toExternalForm isDirectory getAbsolutePath FileInputStream FileInputStream configureExternalLinkSite IOException IOException
private void configure External Link Site File link File Properties props String path props get Property LINK PATH if path null Utils debug no path definition NON NLS 1 return String link boolean updateable true URL siteURL parse out link information if path starts With LINK READ NON NLS 1 updateable false link path substring 2 trim else if path starts With LINK READ WRITE NON NLS 1 link path substring 3 trim else link path trim make sure we have a valid link specification try File site File new File link site File new File site File ECLIPSE siteURL site File toURL if find Configured Site siteURL true null linked site is already known return catch MalformedURL Exception e ignore bad links Utils debug bad URL e NON NLS 1 return process the link Site Entry link Site Site Entry external Link Sites get siteURL if link Site null this is a link to a new target so create site for it I Site Policy link Site Policy create Site Policy DEFAULT POLICY TYPE DEFAULT POLICY LIST link Site Site Entry create Site Entry siteURL link Site Policy update site entry if needed link Site set Updateable updateable link Site set Link File Name link File get Absolute Path configure the new site NOTE duplicates are not replaced first one in wins configure Site link Site there are changes in the config config set Dirty true Utils debug updateable R W R O siteURL to String NON NLS 1 NON NLS 2 NON NLS 3  configureExternalLinkSite linkFile getProperty LINK_PATH startsWith LINK_READ startsWith LINK_READ_WRITE siteFile siteFile siteFile siteFile findConfiguredSite MalformedURLException SiteEntry linkSite SiteEntry externalLinkSites linkSite ISitePolicy linkSitePolicy createSitePolicy DEFAULT_POLICY_TYPE DEFAULT_POLICY_LIST linkSite SiteEntry createSiteEntry linkSitePolicy linkSite setUpdateable linkSite setLinkFileName linkFile getAbsolutePath configureSite linkSite setDirty toString
private void validate Sites check to see if all sites are valid Remove any sites that do not exist Site Entry list config get Sites for int i 0 i list length i URL siteURL list i get ResolvedURL if supports Detection siteURL continue File site Root new File siteURL get File replace File separator Char if site Root exists unconfigure Site list i Utils debug Site siteURL does not exist removing from configuration NON NLS 1 NON NLS 2 If multiple paths are defined in the same link file or if the path changes the old site will still be kept A better algorithm could be implemented by keeping track of the previous content of the link file TODO do the above String link Name list i get Link File Name if link Name null File link File new File link Name if link File exists unconfigure Site list i config set Dirty true Utils debug Site siteURL is no longer linked removing from configuration NON NLS 1 NON NLS 2  validateSites SiteEntry getSites getResolvedURL supportsDetection siteRoot getFile separatorChar siteRoot unconfigureSite linkName getLinkFileName linkName linkFile linkName linkFile unconfigureSite setDirty
private void link Initialized State Configuration shared Config Location shared Config Location Location new Config Location try URL new Config IniURL new URL new Config Location getURL CONFIG INI if new Config IniURL get Protocol equals file NON NLS 1 return need to be able to do write modify config ini and platform xml to only link original files File config Ini new File new Config IniURL get File Properties props new Properties props put osgi shared Configuration area shared Config Location getURL to External Form NON NLS 1 props store new File Output Stream config Ini Linked configuration NON NLS 1 config new Configuration new Date config setURL new URL new Config Location getURL CONFIG NAME config set Linked Config shared Config config set Dirty true catch IO Exception e this is an optimistic copy If we fail the state will be reconciled when the update manager is triggered System out println e  linkInitializedState sharedConfig sharedConfigLocation newConfigLocation newConfigIniURL newConfigLocation CONFIG_INI newConfigIniURL getProtocol configIni newConfigIniURL getFile sharedConfiguration sharedConfigLocation toExternalForm FileOutputStream configIni newConfigLocation CONFIG_NAME setLinkedConfig sharedConfig setDirty IOException
if working Dir null working Dir exists File backups working Dir list Files new File Filter public boolean accept File pathname return pathname is File pathname get Name ends With xml NON NLS 1  workingDir workingDir workingDir listFiles FileFilter isFile getName endsWith
private Configuration load Config URL url throws Exception if url null throw new IO Exception Messages get String cfig unable To Load noURL NON NLS 1 try to load saved configuration file watch for failed prior save Configuration Parser parser null try parser new Configuration Parser catch Invocation Target Exception e throw Exception e get Target Exception config null Exception original Exception null try config parser parse url if config null throw new Exception Messages get String Platform Configuration cannot Find Config File NON NLS 1 catch Exception e1 check for save failures so open temp and backup configurations original Exception e1 try URL tempURL new URL url to External Form CONFIG FILE TEMP SUFFIX config parser parse tempURL if config null throw new Exception else config set Dirty true force saving to platform xml catch Exception e2 try check the backup if file equals url get Protocol NON NLS 1 File cfig File new File url get File replace File separator Char File working Dir cfig File get Parent File if working Dir null working Dir exists File backups working Dir list Files new File Filter public boolean accept File pathname return pathname is File pathname get Name ends With xml NON NLS 1 if backups null backups length 0 URL backup Url backups backups length 1 toURL config parser parse backup Url if config null throw original Exception we tried but no config here else config set Dirty true force saving to platform xml catch IO Exception e3 throw original Exception we tried but no config here return config  loadConfig IOException getString unableToLoad ConfigurationParser ConfigurationParser InvocationTargetException getTargetException originalException getString PlatformConfiguration cannotFindConfigFile originalException toExternalForm CONFIG_FILE_TEMP_SUFFIX setDirty getProtocol cfigFile getFile separatorChar workingDir cfigFile getParentFile workingDir workingDir workingDir listFiles FileFilter isFile getName endsWith backupUrl backupUrl originalException setDirty IOException originalException
public static boolean supports Detection URL url String protocol url get Protocol if protocol equals file NON NLS 1 return true else if protocol equals platform URL resolved null try resolved resolve PlatformURL url 19536 catch IO Exception e return false we tried but failed to resolve the platform URL return resolved get Protocol equals file NON NLS 1 else return false  supportsDetection getProtocol resolvePlatformURL IOException getProtocol
private static void verify Path URL url String protocol url get Protocol String path null if protocol equals file NON NLS 1 path url get File else if protocol equals platform NON NLS 1 URL resolved null try resolved resolve PlatformURL url 19536 if resolved get Protocol equals file NON NLS 1 path resolved get File catch IO Exception e continue if path null File dir new File path get Parent File if dir null dir mkdirs  verifyPath getProtocol getFile resolvePlatformURL getProtocol getFile IOException getParentFile
public static URL resolve PlatformURL URL url throws IO Exception 19536 if url get Protocol equals platform NON NLS 1 url Platform as LocalURL url TODO URL resolution by platform returns url file d path as opposed to file d path File f new File url get File url f toURL return url  resolvePlatformURL IOException getProtocol asLocalURL getFile
public static URL get InstallURL return installURL  getInstallURL
private void save AsXML Output Stream stream throws Core Exception Stream Result result null try Document Builder doc Builder document Builder Factory new Document Builder Document doc doc Builder new Document if config null throw Utils new Core Exception Messages get String Platform Configuration cannot Save Non Existing Config null NON NLS 1 config set Date new Date doc append Child doc create Comment Created on config get Date to String NON NLS 1 Element config Element config toXML doc doc append Child config Element Write out to a file Transformer transformer transformer Factory new Transformer transformer set Output Property Output Keys METHOD xml NON NLS 1 transformer set Output Property Output Keys ENCODING UTF 8 NON NLS 1 transformer set Output Property Output Keys INDENT yes NON NLS 1 DOM Source source new DOM Source doc result new Stream Result stream transformer transform source result will close the stream in the caller stream close catch Exception e throw Utils new Core Exception e NON NLS 1 finally result set Output Stream null result null  saveAsXML OutputStream CoreException StreamResult DocumentBuilder docBuilder documentBuilderFactory newDocumentBuilder docBuilder newDocument newCoreException getString PlatformConfiguration cannotSaveNonExistingConfig setDate appendChild createComment getDate toString configElement appendChild configElement transformerFactory newTransformer setOutputProperty OutputKeys setOutputProperty OutputKeys setOutputProperty OutputKeys DOMSource DOMSource StreamResult newCoreException setOutputStream
private void reconcile throws Core Exception long last Change config get Date get Time Site Entry sites config get Sites for int s 0 s sites length s long site Timestamp sites s get Change Stamp if site Timestamp last Change sites s load From Disk last Change config set Dirty true  CoreException lastChange getDate getTime SiteEntry getSites siteTimestamp getChangeStamp siteTimestamp lastChange loadFromDisk lastChange setDirty
public Configuration get Configuration return config  getConfiguration

public class Platform Configuration Factory implements I Platform Configuration Factory public I Platform Configuration get Current Platform Configuration return Platform Configuration get Current  PlatformConfigurationFactory IPlatformConfigurationFactory IPlatformConfiguration getCurrentPlatformConfiguration PlatformConfiguration getCurrent
public I Platform Configuration get Platform Configuration URL url throws IO Exception try return new Platform Configuration url catch Exception e if e instanceof IO Exception throw IO Exception e else throw new IO Exception e get Message  IPlatformConfiguration getPlatformConfiguration IOException PlatformConfiguration IOException IOException IOException getMessage

private String url public Plugin Entry super  PluginEntry
return url relative to the site location plugins org eclipse foo plugin xml Note to do we should probably only use plugins org eclipse foo in the future public String getURL return url 
url is relative to the site public void setURL String url this url url 
Returns the plug in identifier for this entry return the plug in identifier or code null code public String get Plugin Identifier return plugin Id  getPluginIdentifier pluginId
Returns the plug in version for this entry return the plug in version or code null code public String get Plugin Version return plugin Version  getPluginVersion pluginVersion
Indicates whether the entry describes a full plug in or a plug in fragment return code true code if the entry is a plug in fragment code false code if the entry is a plug in public boolean is Fragment return is Fragment  isFragment isFragment
Sets the entry plug in identifier Throws a runtime exception if this object is marked read only param plugin Id the entry identifier void set Plugin Identifier String plugin Id this plugin Id plugin Id  pluginId setPluginIdentifier pluginId pluginId pluginId
Sets the entry plug in version Throws a runtime exception if this object is marked read only param plugin Version the entry version void set Plugin Version String plugin Version this plugin Version plugin Version  pluginVersion setPluginVersion pluginVersion pluginVersion pluginVersion
Indicates whether this entry represents a fragment or plug in Throws a runtime exception if this object is marked read only param is Fragment fragment setting public void is Fragment boolean is Fragment this is Fragment is Fragment  isFragment isFragment isFragment isFragment isFragment
see Object to String public String to String String msg get Plugin Identifier null get Plugin Identifier to String NON NLS 1 msg get Plugin Version null get Plugin Version to String NON NLS 1 NON NLS 2 msg is Fragment fragment plugin NON NLS 1 NON NLS 2 return msg  toString toString getPluginIdentifier getPluginIdentifier toString getPluginVersion getPluginVersion toString isFragment
Returns the identifier of this plugin entry public Versioned Identifier get Versioned Identifier if version Id null return version Id String id get Plugin Identifier String ver get Plugin Version if id null ver null try version Id new Versioned Identifier id ver return version Id catch Exception e Utils log Messages get String Plugin Entry version Error id ver NON NLS 1 NON NLS 2 version Id new Versioned Identifier null NON NLS 1 return version Id  VersionedIdentifier getVersionedIdentifier versionId versionId getPluginIdentifier getPluginVersion versionId VersionedIdentifier versionId getString PluginEntry versionError versionId VersionedIdentifier versionId
Sets the identifier of this plugin entry void set Versioned Identifier Versioned Identifier identifier set Plugin Identifier identifier get Identifier set Plugin Version identifier get Version to String  setVersionedIdentifier VersionedIdentifier setPluginIdentifier getIdentifier setPluginVersion getVersion toString
Compares two plugin entries for equality param object plugin entry object to compare with return code true code if the two entries are equal code false code otherwise public boolean equals Object object if object instanceof Plugin Entry return false Plugin Entry e Plugin Entry object return get Versioned Identifier equals e get Versioned Identifier  PluginEntry PluginEntry PluginEntry getVersionedIdentifier getVersionedIdentifier

private class Parse Complete Exception extends SAX Exception public Parse Complete Exception String arg0 super arg0  ParseCompleteException SAXException ParseCompleteException
Constructor for Default Feature Parser public Plugin Parser super try parser Factory set Namespace Aware true this parser parser Factory newSAX Parser catch Parser Configuration Exception e System out println e catch SAX Exception e System out println e  DefaultFeatureParser PluginParser parserFactory setNamespaceAware parserFactory newSAXParser ParserConfigurationException SAXException
since 2 0 public synchronized Plugin Entry parse File plugin File throws SAX Exception IO Exception File Input Stream in null try in new File Input Stream plugin File return parse in PLUGINS plugin File get Parent File get Name NON NLS 1 NON NLS 2 finally if in null try in close catch IO Exception e  PluginEntry pluginFile SAXException IOException FileInputStream FileInputStream pluginFile pluginFile getParentFile getName IOException
since 3 0 public synchronized Plugin Entry parse Input Stream in String bundle Url throws SAX Exception IO Exception try plugin Entry new Plugin Entry plugin Entry setURL bundle Url parser parse new Input Source in this catch Parse Complete Exception e expected we stopped the parsing when we have the information we need no need to pursue the parsing return plugin Entry  PluginEntry InputStream bundleUrl SAXException IOException pluginEntry PluginEntry pluginEntry bundleUrl InputSource ParseCompleteException pluginEntry
see Default Handler start Element String String String Attributes public void start Element String uri String local Name String q Name Attributes attributes throws SAX Exception String tag local Name trim if tag equals Ignore Case CFG PLUGIN plugin Entry is Fragment false process Plugin attributes return if tag equals Ignore Case CFG FRAGMENT plugin Entry is Fragment true process Plugin attributes return  DefaultHandler startElement startElement localName qName SAXException localName equalsIgnoreCase CFG_PLUGIN pluginEntry isFragment processPlugin equalsIgnoreCase CFG_FRAGMENT pluginEntry isFragment processPlugin
process plugin entry info private void process Plugin Attributes attributes throws Parse Complete Exception String id attributes get Value id NON NLS 1 String version attributes get Value version NON NLS 1 if id null id trim length 0 id  no id  NON NLS 1 plugin Entry set Versioned Identifier new Versioned Identifier id version stop parsing now throw new Parse Complete Exception NON NLS 1  processPlugin ParseCompleteException getValue getValue _no_id_ pluginEntry setVersionedIdentifier VersionedIdentifier ParseCompleteException

public I Product get Products I Platform Configuration configuration Configurator Utils get Current Platform Configuration if configuration null return new I Product 0 else I Platform Configuration I Feature Entry features configuration get Configured Feature Entries Array List primary Features new Array List for int i 0 i features length i if features i can Be Primary primary Features add features i TODO handle unmanaged plugins later return I Product primary Features to Array new I Product primary Features size  IProduct getProducts IPlatformConfiguration ConfiguratorUtils getCurrentPlatformConfiguration IProduct IPlatformConfiguration IFeatureEntry getConfiguredFeatureEntries ArrayList primaryFeatures ArrayList canBePrimary primaryFeatures IProduct primaryFeatures toArray IProduct primaryFeatures
see org eclipse core runtime I Product Provider get Name public String get Name return Messages get String Product Provider NON NLS 1  IProductProvider getName getName getString ProductProvider

private static Plugin Parser plugin Parser new Plugin Parser public Site Entry URL url this url null  PluginParser pluginParser PluginParser SiteEntry
public Site Entry URL url I Site Policy policy if url null try url new URL platform base NON NLS 1 try using platform relative URL catch MalformedURL Exception e url Platform Configuration get InstallURL ensure we come up use absolute file URL if policy null policy new Site Policy DEFAULT POLICY TYPE DEFAULT POLICY LIST if url get Protocol equals file NON NLS 1 try TODO remove this when platform fixes local file url s this url new File url get File toURL catch MalformedURL Exception e1 this url url else this url url this policy policy this resolvedURL this url if url get Protocol equals platform NON NLS 1 try resolvedURL Platform Configuration resolve PlatformURL url 19536 catch IO Exception e will use the baseline URL  SiteEntry ISitePolicy MalformedURLException PlatformConfiguration getInstallURL SitePolicy DEFAULT_POLICY_TYPE DEFAULT_POLICY_LIST getProtocol getFile MalformedURLException getProtocol PlatformConfiguration resolvePlatformURL IOException
public void set Config Configuration config this config config  setConfig
public Configuration get Config return config  getConfig
see I Site Entry getURL public URL getURL return url  ISiteEntry
see I Site Entry get Site Policy public I Site Policy get Site Policy return policy  ISiteEntry getSitePolicy ISitePolicy getSitePolicy
public synchronized void set Site Policy I Site Policy policy if policy null throw new Illegal Argument Exception this policy policy  setSitePolicy ISitePolicy IllegalArgumentException
see I Site Entry get Features public String get Features return get Detected Features  ISiteEntry getFeatures getFeatures getDetectedFeatures
public String get Plugins I Site Policy policy get Site Policy if policy get Type I Site Policy USER INCLUDE return policy get List if policy get Type I Site Policy USER EXCLUDE Array List detected Plugins new Array List Arrays as List get Detected Plugins String excluded Plugins policy get List for int i 0 i excluded Plugins length i if detected Plugins contains excluded Plugins i detected Plugins remove excluded Plugins i return String detected Plugins to Array new String 0 bad policy type return new String 0  getPlugins ISitePolicy getSitePolicy getType ISitePolicy USER_INCLUDE getList getType ISitePolicy USER_EXCLUDE ArrayList detectedPlugins ArrayList asList getDetectedPlugins excludedPlugins getList excludedPlugins detectedPlugins excludedPlugins detectedPlugins excludedPlugins detectedPlugins toArray
public Plugin Entry get Plugin Entries String pluginUR Ls get Plugins hash the array for faster lookups Hash Map map new Hash Map pluginUR Ls length for int i 0 i pluginUR Ls length i map put pluginUR Ls i pluginUR Ls i if plugin Entries null detect Plugins Array List plugins new Array List pluginUR Ls length for int i 0 i plugin Entries size i Plugin Entry p Plugin Entry plugin Entries get i if map contains Key p getURL plugins add p return Plugin Entry plugins to Array new Plugin Entry plugins size  PluginEntry getPluginEntries pluginURLs getPlugins HashMap HashMap pluginURLs pluginURLs pluginURLs pluginURLs pluginEntries detectPlugins ArrayList ArrayList pluginURLs pluginEntries PluginEntry PluginEntry pluginEntries containsKey PluginEntry toArray PluginEntry
public long get Change Stamp if change Stamp 0 compute Change Stamp return change Stamp  getChangeStamp changeStamp computeChangeStamp changeStamp
public long get Features Change Stamp if features Change Stamp 0 compute Features Change Stamp return features Change Stamp  getFeaturesChangeStamp featuresChangeStamp computeFeaturesChangeStamp featuresChangeStamp
public long get Plugins Change Stamp if plugins Change Stamp 0 compute Plugins Change Stamp return plugins Change Stamp  getPluginsChangeStamp pluginsChangeStamp computePluginsChangeStamp pluginsChangeStamp
see I Site Entry is Updateable public boolean is Updateable return updateable  ISiteEntry isUpdateable isUpdateable
public void set Updateable boolean updateable this updateable updateable  setUpdateable
see I Site Entry is Natively Linked public boolean is Natively Linked return is Externally Linked Site  ISiteEntry isNativelyLinked isNativelyLinked isExternallyLinkedSite
public URL get ResolvedURL return resolvedURL  getResolvedURL
File dirs features Dir list Files new File Filter public boolean accept File f boolean valid f is Directory new File f FEATURE XML exists if valid Utils log Messages get String Site Entry cannot Find Feature In Dir f get Absolute Path NON NLS 1 return valid  featuresDir listFiles FileFilter isDirectory FEATURE_XML getString SiteEntry cannotFindFeatureInDir getAbsolutePath
Detect new features timestamp current site timestamp and validates existing features they might have been removed private void detect Features if feature Entries null validate Feature Entries else feature Entries new Hash Map if Platform Configuration supports Detection resolvedURL return locate feature entries on site File site Root new File resolvedURL get File replace File separator Char File features Dir new File site Root FEATURES if features Dir exists handle the installed features under the features directory File dirs features Dir list Files new File Filter public boolean accept File f boolean valid f is Directory new File f FEATURE XML exists if valid Utils log Messages get String Site Entry cannot Find Feature In Dir f get Absolute Path NON NLS 1 return valid for int index 0 index dirs length index try File featureXML new File dirs index FEATURE XML if featureXML last Modified features Change Stamp dirs index last Modified features Change Stamp continue URL featureURL featureXML toURL Feature Entry feature Entry feature Parser parse featureURL if feature Entry null add Feature Entry feature Entry catch MalformedURL Exception e Utils log Messages get String Installed Site Parser Unable To CreateURL For File features Dir get Absolute Path NON NLS 1 Utils debug resolvedURL to String located feature Entries size feature s NON NLS 1 NON NLS 2  detectFeatures featureEntries validateFeatureEntries featureEntries HashMap PlatformConfiguration supportsDetection siteRoot getFile separatorChar featuresDir siteRoot featuresDir featuresDir listFiles FileFilter isDirectory FEATURE_XML getString SiteEntry cannotFindFeatureInDir getAbsolutePath FEATURE_XML lastModified featuresChangeStamp lastModified featuresChangeStamp FeatureEntry featureEntry featureParser featureEntry addFeatureEntry featureEntry MalformedURLException getString InstalledSiteParser UnableToCreateURLForFile featuresDir getAbsolutePath toString featureEntries
Detect new plugins timestamp current site timestamp and validates existing plugins they might have been removed private void detect Plugins boolean compare Time Stamps false if plugin Entries null validate Plugin Entries compare Time Stamps true only pick up newer plugins else plugin Entries new Array List if Platform Configuration supports Detection resolvedURL return locate plugin entries on site File plugins Dir new File resolvedURL get File PLUGINS if plugins Dir exists plugins Dir is Directory File files plugins Dir list Files for int i 0 i files length i if files i is Directory detect Unpacked Plugin files i compare Time Stamps else if files i get Name ends With jar NON NLS 1 detect Packed Plugin files i compare Time Stamps else not bundle file Utils debug resolvedURL to String located plugin Entries size plugin s NON NLS 1 NON NLS 2  detectPlugins compareTimeStamps pluginEntries validatePluginEntries compareTimeStamps pluginEntries ArrayList PlatformConfiguration supportsDetection pluginsDir getFile pluginsDir pluginsDir isDirectory pluginsDir listFiles isDirectory detectUnpackedPlugin compareTimeStamps getName endsWith detectPackedPlugin compareTimeStamps toString pluginEntries
param file a plugin jar param compare Time Stamps set to true when looking for plugins changed since last time they were detected private void detect Packed Plugin File file boolean compare Time Stamps plugin to run directly from jar if compare Time Stamps file last Modified plugins Change Stamp return String entry Name META MANIFEST MF Zip File z null Input Stream bundle Manifest In null Input Stream plugin Manifest In null String pluginURL PLUGINS file get Name NON NLS 1 try First check if has valid bundle manifest z new Zip File file if z get Entry entry Name null bundle Manifest In z get Input Stream new Zip Entry entry Name Bundle Manifest manifest new Bundle Manifest bundle Manifest In pluginURL if manifest exists add Plugin Entry manifest get Plugin Entry return no bundle manifest check for plugin xml or fragment xml entry Name PLUGIN XML if z get Entry entry Name null entry Name FRAGMENT XML if z get Entry entry Name null plugin Manifest In z get Input Stream new Zip Entry entry Name Plugin Entry entry1 plugin Parser parse plugin Manifest In pluginURL add Plugin Entry entry1 catch IO Exception e5 String plugin File String2 pluginURL entry Name NON NLS 1 Utils log Messages get String Installed Site Parser Error Accessing NON NLS 1 plugin File String2 NON NLS 1 catch SAX Exception e3 String plugin File String1 pluginURL entry Name NON NLS 1 Utils log Messages get String Installed Site Parser Error Parsing File plugin File String1 NON NLS 1 finally if bundle Manifest In null try bundle Manifest In close catch IO Exception e4 if plugin Manifest In null try plugin Manifest In close catch IO Exception e2 if z null try z close catch IO Exception e1  compareTimeStamps detectPackedPlugin compareTimeStamps compareTimeStamps lastModified pluginsChangeStamp entryName META_MANIFEST_MF ZipFile InputStream bundleManifestIn InputStream pluginManifestIn getName ZipFile getEntry entryName bundleManifestIn getInputStream ZipEntry entryName BundleManifest BundleManifest bundleManifestIn addPluginEntry getPluginEntry entryName PLUGIN_XML getEntry entryName entryName FRAGMENT_XML getEntry entryName pluginManifestIn getInputStream ZipEntry entryName PluginEntry pluginParser pluginManifestIn addPluginEntry IOException pluginFileString2 entryName getString InstalledSiteParser ErrorAccessing pluginFileString2 SAXException pluginFileString1 entryName getString InstalledSiteParser ErrorParsingFile pluginFileString1 bundleManifestIn bundleManifestIn IOException pluginManifestIn pluginManifestIn IOException IOException
param file a plugin directory param compare Time Stamps set to true when looking for plugins changed since last time they were detected private void detect Unpacked Plugin File file boolean compare Time Stamps unpacked plugin long dir Timestamp file last Modified File plugin File new File file META MANIFEST MF try First check if has valid bundle manifest Bundle Manifest bundle Manifest new Bundle Manifest plugin File if bundle Manifest exists if compare Time Stamps dir Timestamp plugins Change Stamp plugin File last Modified plugins Change Stamp return Plugin Entry entry bundle Manifest get Plugin Entry add Plugin Entry entry else no bundle manifest check for plugin xml or fragment xml plugin File new File file PLUGIN XML if plugin File exists NON NLS 1 plugin File new File file FRAGMENT XML NON NLS 1 if plugin File exists plugin File is Directory TODO in the future assume that the timestamps are not reliable or that the user manually modified an existing plugin so the apparently modifed plugin may actually be configured already We will need to double check for this END to do if compare Time Stamps dir Timestamp plugins Change Stamp plugin File last Modified plugins Change Stamp return Plugin Entry entry plugin Parser parse plugin File add Plugin Entry entry catch IO Exception e String plugin File String plugin File get Absolute Path if Configuration Activator DEBUG Utils log Utils new Status Messages get String Installed Site Parser Error Parsing File plugin File String e NON NLS 1 else Utils log Messages get String Installed Site Parser Error Accessing NON NLS 1 plugin File String NON NLS 1 catch SAX Exception e String plugin File String plugin File get Absolute Path Utils log Messages get String Installed Site Parser Error Parsing File plugin File String NON NLS 1  compareTimeStamps detectUnpackedPlugin compareTimeStamps dirTimestamp lastModified pluginFile META_MANIFEST_MF BundleManifest bundleManifest BundleManifest pluginFile bundleManifest compareTimeStamps dirTimestamp pluginsChangeStamp pluginFile lastModified pluginsChangeStamp PluginEntry bundleManifest getPluginEntry addPluginEntry pluginFile PLUGIN_XML pluginFile pluginFile FRAGMENT_XML pluginFile pluginFile isDirectory compareTimeStamps dirTimestamp pluginsChangeStamp pluginFile lastModified pluginsChangeStamp PluginEntry pluginParser pluginFile addPluginEntry IOException pluginFileString pluginFile getAbsolutePath ConfigurationActivator newStatus getString InstalledSiteParser ErrorParsingFile pluginFileString getString InstalledSiteParser ErrorAccessing pluginFileString SAXException pluginFileString pluginFile getAbsolutePath getString InstalledSiteParser ErrorParsingFile pluginFileString
return list of feature url s relative to site private synchronized String get Detected Features if feature Entries null detect Features String features new String feature Entries size Iterator iterator feature Entries values iterator for int i 0 i features length i features i Feature Entry iterator next getURL return features  getDetectedFeatures featureEntries detectFeatures featureEntries featureEntries FeatureEntry
return list of plugin url s relative to site private synchronized String get Detected Plugins if plugin Entries null detect Plugins String plugins new String plugin Entries size for int i 0 i plugins length i plugins i Plugin Entry plugin Entries get i getURL return plugins  getDetectedPlugins pluginEntries detectPlugins pluginEntries PluginEntry pluginEntries
private void compute Change Stamp change Stamp Math max compute Features Change Stamp compute Plugins Change Stamp change Stamp Is Valid true  computeChangeStamp changeStamp computeFeaturesChangeStamp computePluginsChangeStamp changeStampIsValid
private synchronized long compute Features Change Stamp if features Change Stamp 0 return features Change Stamp long start 0 if Configuration Activator DEBUG start new Date get Time String features get Features compute stamp for the features directory long dir Stamp 0 if Platform Configuration supports Detection resolvedURL File root new File resolvedURL get File replace File separator Char File features Dir new File root FEATURES dir Stamp features Dir last Modified features Change Stamp Math max dir Stamp compute Stamp features if Configuration Activator DEBUG long end new Date get Time Utils debug resolvedURL to String feature stamp features Change Stamp in end start ms NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 NON NLS 6 return features Change Stamp  computeFeaturesChangeStamp featuresChangeStamp featuresChangeStamp ConfigurationActivator getTime getFeatures dirStamp PlatformConfiguration supportsDetection getFile separatorChar featuresDir dirStamp featuresDir lastModified featuresChangeStamp dirStamp computeStamp ConfigurationActivator getTime toString featuresChangeStamp featuresChangeStamp
private synchronized long compute Plugins Change Stamp if plugins Change Stamp 0 return plugins Change Stamp if Platform Configuration supports Detection resolvedURL Utils log Messages get String Site Entry compute Plugin Stamp resolvedURL to External Form NON NLS 1 return 0 compute stamp for the plugins directory File root new File resolvedURL get File replace File separator Char File plugins Dir new File root PLUGINS if plugins Dir exists plugins Dir is Directory Utils log Messages get String Site Entry plugins Dir plugins Dir get Absolute Path NON NLS 1 return 0 plugins Change Stamp plugins Dir last Modified return plugins Change Stamp  computePluginsChangeStamp pluginsChangeStamp pluginsChangeStamp PlatformConfiguration supportsDetection getString SiteEntry computePluginStamp toExternalForm getFile separatorChar pluginsDir pluginsDir pluginsDir isDirectory getString SiteEntry pluginsDir pluginsDir getAbsolutePath pluginsChangeStamp pluginsDir lastModified pluginsChangeStamp
private long compute Stamp String targets long result 0 if Platform Configuration supports Detection resolvedURL NOTE this path should not be executed until we support running from an arbitrary URL in particular from http server For now just compute stamp across the list of names Eventually when general UR Ls are supported we need to do better factor in at least the existence of the target However given this code executes early on the startup sequence we need to be extremely mindful of performance issues In fact we should get the last modified from the connection for int i 0 i targets length i result targets i hash Code Utils debug WARNING computing stamp using URL hashcodes only NON NLS 1 else compute stamp across local targets File root File new File resolvedURL get File replace File separator Char if root File exists File f null for int i 0 i targets length i f new File root File targets i if f exists result Math max result f last Modified return result  computeStamp PlatformConfiguration supportsDetection URLs hashCode rootFile getFile separatorChar rootFile rootFile lastModified
public void set Link File Name String link File Name this link File Name link File Name  setLinkFileName linkFileName linkFileName linkFileName
public String get Link File Name return link File Name  getLinkFileName linkFileName
public boolean is Externally Linked Site return link File Name null link File Name trim equals NON NLS 1  isExternallyLinkedSite linkFileName linkFileName
public synchronized void refresh reset computed values Will be updated on next access features Change Stamp 0 plugins Change Stamp 0 change Stamp 0 feature Entries null plugin Entries null  featuresChangeStamp pluginsChangeStamp changeStamp featureEntries pluginEntries
public void refresh Plugins reset computed values Will be updated on next access plugins Change Stamp 0 change Stamp 0 plugin Entries null  refreshPlugins pluginsChangeStamp changeStamp pluginEntries
public void add Feature Entry I Feature Entry feature if feature Entries null feature Entries new Hash Map Make sure we keep the larger version of same feature I Feature Entry existing Feature Entry feature Entries get feature get Feature Identifier if existing null Versioned Identifier existing Version new Versioned Identifier existing get Feature Identifier existing get Feature Version Versioned Identifier new Version new Versioned Identifier feature get Feature Identifier feature get Feature Version if existing Version compare Version new Version Versioned Identifier LESS THAN feature Entries put feature get Feature Identifier feature plugins Change Stamp 0 else if existing Version equals new Version log error if same feature version id but a different url if feature instanceof Feature Entry existing instanceof Feature Entry Feature Entry feature getURL equals Feature Entry existing getURL Utils log Messages get String Site Entry duplicate Feature getURL to External Form existing get Feature Identifier NON NLS 1 NON NLS 2 else feature Entries put feature get Feature Identifier feature plugins Change Stamp 0 if feature instanceof Feature Entry Feature Entry feature set Site this  addFeatureEntry IFeatureEntry featureEntries featureEntries HashMap IFeatureEntry FeatureEntry featureEntries getFeatureIdentifier VersionedIdentifier existingVersion VersionedIdentifier getFeatureIdentifier getFeatureVersion VersionedIdentifier newVersion VersionedIdentifier getFeatureIdentifier getFeatureVersion existingVersion compareVersion newVersion VersionedIdentifier LESS_THAN featureEntries getFeatureIdentifier pluginsChangeStamp existingVersion newVersion FeatureEntry FeatureEntry FeatureEntry FeatureEntry getString SiteEntry duplicateFeature toExternalForm getFeatureIdentifier featureEntries getFeatureIdentifier pluginsChangeStamp FeatureEntry FeatureEntry setSite
public Feature Entry get Feature Entries if feature Entries null detect Features if feature Entries null return new Feature Entry 0 else return Feature Entry feature Entries values to Array new Feature Entry feature Entries size  FeatureEntry getFeatureEntries featureEntries detectFeatures featureEntries FeatureEntry FeatureEntry featureEntries toArray FeatureEntry featureEntries
public void add Plugin Entry Plugin Entry plugin if plugin Entries null plugin Entries new Array List Note we could use the latest version of the same plugin like we do for features but we let the runtime figure it out plugin Entries add plugin  addPluginEntry PluginEntry pluginEntries pluginEntries ArrayList pluginEntries
public Plugin Entry get All Plugin Entries if plugin Entries null detect Plugins return Plugin Entry plugin Entries to Array new Plugin Entry plugin Entries size  PluginEntry getAllPluginEntries pluginEntries detectPlugins PluginEntry pluginEntries toArray PluginEntry pluginEntries
public void load From Disk long last Change throws Core Exception features Change Stamp last Change plugins Change Stamp last Change detect Features detect Plugins  loadFromDisk lastChange CoreException featuresChangeStamp lastChange pluginsChangeStamp lastChange detectFeatures detectPlugins
Saves state as xml content in a given parent element param doc public Element toXML Document doc Element site Element doc create Element CFG SITE if getURL to String null site Element set Attribute CFG URL getURL to String site Element set Attribute CFG ENABLED is Enabled true false NON NLS 1 NON NLS 2 site Element set Attribute CFG UPDATEABLE is Updateable true false NON NLS 1 NON NLS 2 if is Externally Linked Site site Element set Attribute CFG LINK FILE get Link File Name trim replace File separator Char int type get Site Policy get Type String type String CFG POLICY TYPE UNKNOWN try type String CFG POLICY TYPE type catch Index Out Of Bounds Exception e ignore bad attribute site Element set Attribute CFG POLICY type String String list get Site Policy get List if list length 0 String Buffer sb new String Buffer 256 for int i 0 i list length 1 i sb append list i sb append sb append list list length 1 site Element set Attribute CFG LIST sb to String note we don t save features inside the site element collect feature entries config Element set Attribute CFG FEATURE ENTRY DEFAULT default Feature Feature Entry feats get Feature Entries for int i 0 i feats length i Element feature Element feats i toXML doc site Element append Child feature Element return site Element  siteElement createElement CFG_SITE toString siteElement setAttribute CFG_URL toString siteElement setAttribute CFG_ENABLED isEnabled siteElement setAttribute CFG_UPDATEABLE isUpdateable isExternallyLinkedSite siteElement setAttribute CFG_LINK_FILE getLinkFileName separatorChar getSitePolicy getType typeString CFG_POLICY_TYPE_UNKNOWN typeString CFG_POLICY_TYPE IndexOutOfBoundsException siteElement setAttribute CFG_POLICY typeString getSitePolicy getList StringBuffer StringBuffer siteElement setAttribute CFG_LIST toString configElement setAttribute CFG_FEATURE_ENTRY_DEFAULT defaultFeature FeatureEntry getFeatureEntries featureElement siteElement appendChild featureElement siteElement
private void validate Feature Entries File root new File resolvedURL get File replace File separator Char Iterator iterator feature Entries values iterator Collection deleted Features new Array List while iterator has Next Feature Entry feature Feature Entry iterator next Note in the future we can check for absolute url as well For now feature url is features org eclipse foo feature xml File featureXML new File root feature getURL if featureXML exists deleted Features add feature get Feature Identifier for Iterator it deleted Features iterator it has Next feature Entries remove it next  validateFeatureEntries getFile separatorChar featureEntries deletedFeatures ArrayList hasNext FeatureEntry FeatureEntry deletedFeatures getFeatureIdentifier deletedFeatures hasNext featureEntries
private void validate Plugin Entries File root new File resolvedURL get File replace File separator Char Collection deleted Plugins new Array List for int i 0 i plugin Entries size i Plugin Entry plugin Plugin Entry plugin Entries get i Note in the future we can check for absolute url as well For now feature url is plugins org eclipse foo plugin xml File plugin Location new File root plugin getURL if plugin Location exists deleted Plugins add plugin for Iterator it deleted Plugins iterator it has Next plugin Entries remove it next  validatePluginEntries getFile separatorChar deletedPlugins ArrayList pluginEntries PluginEntry PluginEntry pluginEntries pluginLocation pluginLocation deletedPlugins deletedPlugins hasNext pluginEntries
public boolean is Enabled return enabled  isEnabled
public void set Enabled boolean enable this enabled enable  setEnabled
public Feature Entry get Feature Entry String id Feature Entry features get Feature Entries for int i 0 i features length i if features i get Feature Identifier equals id return features i return null  FeatureEntry getFeatureEntry FeatureEntry getFeatureEntries getFeatureIdentifier
public boolean unconfigure Feature Entry I Feature Entry feature Feature Entry existing Feature get Feature Entry feature get Feature Identifier if existing Feature null feature Entries remove existing Feature get Feature Identifier return existing Feature null  unconfigureFeatureEntry IFeatureEntry FeatureEntry existingFeature getFeatureEntry getFeatureIdentifier existingFeature featureEntries existingFeature getFeatureIdentifier existingFeature
we need to set the feature set to empty so we don t try to detect them void initialized if feature Entries null feature Entries new Hash Map  featureEntries featureEntries HashMap

private String list public Site Policy  SitePolicy
public Site Policy int type String list if type I Site Policy USER INCLUDE type I Site Policy USER EXCLUDE throw new Illegal Argument Exception this type type if list null this list new String 0 else this list list  SitePolicy ISitePolicy USER_INCLUDE ISitePolicy USER_EXCLUDE IllegalArgumentException
see I Site Policy get Type public int get Type return type  ISitePolicy getType getType
see I Site Policy get List public String get List return list  ISitePolicy getList getList
public synchronized void set List String list if list null this list new String 0 else this list list  setList

static Framework Log log public static void debug String s if Configuration Activator DEBUG System out println Platform Config s NON NLS 1  FrameworkLog ConfigurationActivator PlatformConfig
Creates a Core Exception from some other exception The type of the Core Exception is code I Status ERROR code If the exception passed as a parameter is also a Core Exception the new Core Exception will contain all the status of the passed Core Exception see I Status ERROR param s exception string param e actual exception being reported return a Core Exception since 2 0 public static Core Exception new Core Exception String s Throwable e check the case of a multistatus I Status status if e instanceof Core Exception if s null s NON NLS 1 status new Multi Status org eclipse update configurator 0 s e NON NLS 1 I Status children Status Core Exception e get Status Multi Status status add children Status Multi Status status add All children Status else String Buffer complete String new String Buffer NON NLS 1 if s null complete String append s if e null complete String append NON NLS 1 String msg e get Localized Message complete String append msg null msg e to String complete String append NON NLS 1 status new Status complete String to String e return new Core Exception status NON NLS 1  CoreException CoreException IStatus CoreException CoreException CoreException IStatus CoreException CoreException newCoreException IStatus CoreException MultiStatus IStatus childrenStatus CoreException getStatus MultiStatus childrenStatus MultiStatus addAll childrenStatus StringBuffer completeString StringBuffer completeString completeString getLocalizedMessage completeString toString completeString newStatus completeString toString CoreException
public static I Status new Status String message Throwable e return new Status I Status ERROR org eclipse update configurator I Status OK message e NON NLS 1  IStatus newStatus IStatus IStatus
public static void log String message log new Status message null  newStatus
public static void log I Status status if log null log log new Framework Log Entry Configuration Activator PI CONFIGURATOR status get Message 0 status get Exception null else System out println status get Message if status get Exception null status get Exception print Stack Trace  IStatus FrameworkLogEntry ConfigurationActivator PI_CONFIGURATOR getMessage getException getMessage getException getException printStackTrace
Returns the url as a platform url if possible else leaves it unchanged param url return public static URL as PlatformURL URL url try URL platformURL new URL platform base NON NLS 1 try using platform relative URL URL resolved PlatformURL Platform as LocalURL platformURL TODO workaround bug in platform url resolution if resolved PlatformURL get Protocol equals file NON NLS 1 resolved PlatformURL new File resolved PlatformURL get File toURL String platformURL As String resolved PlatformURL to External Form String url As String url to External Form if url As String starts With platformURL As String return new URL platformURL to External Form url As String substring platformURL As String length else return url catch Exception e return url  asPlatformURL resolvedPlatformURL asLocalURL resolvedPlatformURL getProtocol resolvedPlatformURL resolvedPlatformURL getFile platformURLAsString resolvedPlatformURL toExternalForm urlAsString toExternalForm urlAsString startsWith platformURLAsString toExternalForm urlAsString platformURLAsString
public static boolean is Valid Environment String os String ws String arch String nl if os null is Matching os Platform getOS return false if ws null is Matching ws Platform getWS return false if arch null is Matching arch Platform getOS Arch return false if nl null is Matching Locale nl Platform getNL return false return true  isValidEnvironment isMatching isMatching isMatching getOSArch isMatchingLocale
private static boolean is Matching String candidate Values String site Values if site Values null return false if equals Ignore Case candidate Values return true NON NLS 1 site Values site Values to Upper Case String Tokenizer stok new String Tokenizer candidate Values NON NLS 1 while stok has More Tokens String token stok next Token to Upper Case if site Values index Of token 1 return true return false  isMatching candidateValues siteValues siteValues equalsIgnoreCase candidateValues siteValues siteValues toUpperCase StringTokenizer StringTokenizer candidateValues hasMoreTokens nextToken toUpperCase siteValues indexOf
private static boolean is Matching Locale String candidate Values String locale if locale null return false if equals Ignore Case candidate Values return true NON NLS 1 locale locale to Upper Case candidate Values candidate Values to Upper Case String Tokenizer stok new String Tokenizer candidate Values NON NLS 1 while stok has More Tokens String candidate stok next Token if locale index Of candidate 0 return true if candidate index Of locale 0 return true return false  isMatchingLocale candidateValues equalsIgnoreCase candidateValues toUpperCase candidateValues candidateValues toUpperCase StringTokenizer StringTokenizer candidateValues hasMoreTokens nextToken indexOf indexOf
public static Locale get Default Locale String nl Platform getNL sanity test if nl null return Locale get Default break the string into tokens to get the Locale object String Tokenizer locales new String Tokenizer nl   NON NLS 1 if locales count Tokens 1 return new Locale locales next Token NON NLS 1 else if locales count Tokens 2 return new Locale locales next Token locales next Token else if locales count Tokens 3 return new Locale locales next Token locales next Token locales next Token else return Locale get Default  getDefaultLocale getDefault StringTokenizer StringTokenizer _ countTokens nextToken countTokens nextToken nextToken countTokens nextToken nextToken nextToken getDefault
Returns a resource string corresponding to the given argument value and 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 begining 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 resolveNL String b Hello World returns Hello World li resolveNL String b name returns Project Name li resolveNL String b name Hello World returns Project Name li resolveNL String b abcd Hello World returns Hello World li resolveNL String b abcd returns abcd li resolveNL String b name returns name li pre p param resource Bundle resource bundle param string translatable string from model return string or code null code since 2 0 public static String get Resource String Resource Bundle resource Bundle String string if string null return null String s string trim if s equals NON NLS 1 return string if s starts With KEY PREFIX return string if s starts With KEY DOUBLE PREFIX return s substring 1 int ix s index Of NON NLS 1 String key ix 1 s s substring 0 ix String dflt ix 1 s s substring ix 1 if resource Bundle null return dflt try return resource Bundle get String key substring 1 catch Missing Resource Exception e return dflt  resolveNLString resolveNLString resolveNLString resolveNLString resolveNLString resolveNLString resourceBundle getResourceString ResourceBundle resourceBundle startsWith KEY_PREFIX startsWith KEY_DOUBLE_PREFIX indexOf resourceBundle resourceBundle getString MissingResourceException
public static boolean is Automatically Started Bundle String bundleURL if bundleURL index Of org eclipse osgi 1 NON NLS 1 return true String osgi Bundles System get Property osgi bundles NON NLS 1 String Tokenizer st new String Tokenizer osgi Bundles NON NLS 1 while st has More Tokens String token st next Token trim int index token index Of if index 1 token token substring 0 index if token starts With reference file NON NLS 1 File f new File token substring 15 if bundleURL index Of f get Name 1 return true if bundleURL index Of token 1 return true return false  isAutomaticallyStartedBundle indexOf osgiBundles getProperty StringTokenizer StringTokenizer osgiBundles hasMoreTokens nextToken indexOf startsWith indexOf getName indexOf

public Versioned Identifier String s if s null s s trim equals NON NLS 1 return int loc s last Index Of ID SEPARATOR if loc 1 this identifier s substring 0 loc version s substring loc 1 parse Version version else this identifier s  VersionedIdentifier lastIndexOf ID_SEPARATOR parseVersion
public Versioned Identifier String id String version this id ID SEPARATOR version this version version  VersionedIdentifier ID_SEPARATOR
public String get Version return version  getVersion
public String get Identifier return identifier  getIdentifier
public boolean equal Identifiers Versioned Identifier id if id null return identifier null else return id identifier equals identifier  equalIdentifiers VersionedIdentifier
public int compare Version Versioned Identifier id if id null if major 0 minor 0 service 0 return 1 else return 1 if major id major return GREATER THAN if major id major return LESS THAN if minor id minor return COMPATIBLE if minor id minor return LESS THAN if service id service return EQUIVALENT if service id service return LESS THAN return compare Qualifiers qualifier id qualifier  compareVersion VersionedIdentifier GREATER_THAN LESS_THAN LESS_THAN LESS_THAN compareQualifiers
private int compare Qualifiers String q1 String q2 int result q1 compare To q2 if result 0 return LESS THAN else if result 0 return EQUIVALENT else return EQUAL  compareQualifiers compareTo LESS_THAN
private void parse Version String v if v null v v trim equals NON NLS 1 return try String Tokenizer st new String Tokenizer v VER SEPARATOR Array List elements new Array List 4 while st has More Tokens elements add st next Token if elements size 1 this major new Integer String elements get 0 int Value if elements size 2 this minor new Integer String elements get 1 int Value if elements size 3 this service new Integer String elements get 2 int Value if elements size 4 this qualifier remove White Space String elements get 3 catch Exception e use what we got so far  parseVersion StringTokenizer StringTokenizer VER_SEPARATOR ArrayList ArrayList hasMoreTokens nextToken intValue intValue intValue removeWhiteSpace
private String remove White Space String s char chars s trim to Char Array boolean whitespace false for int i 0 i chars length i if Character is Whitespace chars i chars i   whitespace true return whitespace new String chars s  removeWhiteSpace toCharArray isWhitespace _
public boolean equals Object obj if this obj return true if obj instanceof Versioned Identifier return false Versioned Identifier other Versioned Identifier obj return equal Identifiers other this major other major this minor other minor this service other service compare Qualifiers this qualifier other qualifier EQUAL  VersionedIdentifier VersionedIdentifier VersionedIdentifier equalIdentifiers compareQualifiers

unspecified behavior consequently clients should never rely on these being thrown or not thrown b If you find yourself in the 
certainly written your program incorrectly b p 
public final class Assert 
code Assertion Failed Exception code is a runtime exception thrown by some of the methods in code Assert code p This class is not declared public to prevent some misuses programs that catch or otherwise depend on assertion failures are susceptible to unexpected breakage when assertions in the code are added or removed p  AssertionFailedException
private static class Assertion Failed Exception extends Runtime Exception Constructs a new exception public Assertion Failed Exception  AssertionFailedException RuntimeException AssertionFailedException
Constructs a new exception with the given message public Assertion Failed Exception String detail super detail This class is not intended to be instantiated private Assert  AssertionFailedException
Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code is thrown param expression the outcome of the check return code true code if the check passes does not return if the check fails exception Illegal Argument Exception if the legality test failed public static boolean is Legal boolean expression succeed as quickly as possible  IllegalArgumentException IllegalArgumentException isLegal
if expression return true return is Legal expression NON NLS 1 Asserts that an argument is legal If the given boolean is not code true code an code Illegal Argument Exception code  isLegal IllegalArgumentException
is thrown The given message is included in that exception to aid debugging param expression the outcome of the check param message the message to include in the exception return code true code if the check passes does not return if the check fails 

package org eclipse update internal core import org eclipse update core model 
import org eclipse update internal model 
public class Base Site Local Factory  BaseSiteLocalFactory
public Install Configuration Model create Install Configuration Model  InstallConfigurationModel createInstallConfigurationModel
public Install Configuration Model create Install Configuration Model return new Install Configuration public Configuration Activity Model create Configuration Activity Model  InstallConfigurationModel createInstallConfigurationModel InstallConfiguration ConfigurationActivityModel createConfigurationActivityModel

package org eclipse update internal core import java io 
import org eclipse update configuration import org eclipse update internal model public class Configuration Activity  ConfigurationActivity
Default constructor public Configuration Activity Constructor with action public Configuration Activity int action super set Action action  ConfigurationActivity ConfigurationActivity setAction
see I Writable write int Print Writer public void write int indent Print Writer w String gap NON NLS 1 for int i 0 i indent i  IWritable PrintWriter PrintWriter

import java util import org eclipse core runtime 
import org eclipse update configuration import org eclipse update configurator import org eclipse update core import org eclipse update core model import org eclipse update internal model 
public class Configuration Policy extends Configuration Policy Model Constructor for Configuration Policy Model  ConfigurationPolicy ConfigurationPolicyModel ConfigurationPolicyModel
Copy Constructor for Configuration Policy Model public Configuration Policy Configuration Policy config Policy super set Policy config Policy get Policy  ConfigurationPolicyModel ConfigurationPolicy ConfigurationPolicy configPolicy setPolicy configPolicy getPolicy
set Unconfigured Feature References config Policy get Unconfigured Features set Configured Site Model config Policy get Configured Site Model since 2 0 private boolean is Unconfigured I Feature Reference feature Reference if feature Reference null return false returns true if the feature is part of the configured list I Feature Reference refs get Unconfigured Features for int i 0 i refs length i if feature Reference equals refs i return true return false since 2 0 public boolean is Configured I Feature Reference feature Reference if feature Reference null return false returns true if the feature is part of the configured list I Feature Reference refs get Configured Features for int i 0 i refs length i if feature Reference equals refs i return true return false  setUnconfiguredFeatureReferences configPolicy getUnconfiguredFeatures setConfiguredSiteModel configPolicy getConfiguredSiteModel isUnconfigured IFeatureReference featureReference featureReference IFeatureReference getUnconfiguredFeatures featureReference isConfigured IFeatureReference featureReference featureReference IFeatureReference getConfiguredFeatures featureReference
adds the feature to the list of features if the policy is USER INCLUDE public void configure I Feature Reference feature Reference boolean call Install Handler boolean create Activity throws Core Exception if is Configured feature Reference already configured return if feature Reference null Update Core warn The feature reference to configure is null NON NLS 1 return I Feature feature null try feature feature Reference get Feature null catch Core Exception e if Update Manager Utils is Optional feature Reference URL url feature Reference getURL String url String url null url to External Form no feature reference url NON NLS 1 Update Core warn Error retrieving feature url String e NON NLS 1 return if feature null URL url feature Reference getURL String url String url null url to External Form no feature reference url NON NLS 1 Update Core warn The feature to unconfigure is null feature reference is url String NON NLS 1 Setup optional install handler Install Handler Proxy handler null if call Install Handler feature get Install Handler Entry null handler new Install Handler Proxy I Install Handler HANDLER ACTION CONFIGURE feature feature get Install Handler Entry null boolean success false Throwable original Exception null do the configure action try if handler null handler configure Initiated Configuration Activity activity null if create Activity activity new Configuration Activity I Activity ACTION CONFIGURE activity set Label feature get Versioned Identifier to String activity set Date new Date add Configured Feature Reference Feature Reference Model feature Reference everything done ok  USER_INCLUDE IFeatureReference featureReference callInstallHandler createActivity CoreException isConfigured featureReference featureReference UpdateCore IFeature featureReference getFeature CoreException UpdateManagerUtils isOptional featureReference featureReference urlString toExternalForm UpdateCore urlString featureReference urlString toExternalForm UpdateCore urlString InstallHandlerProxy callInstallHandler getInstallHandlerEntry InstallHandlerProxy IInstallHandler HANDLER_ACTION_CONFIGURE getInstallHandlerEntry originalException configureInitiated ConfigurationActivity createActivity ConfigurationActivity IActivity ACTION_CONFIGURE setLabel getVersionedIdentifier toString setDate addConfiguredFeatureReference FeatureReferenceModel featureReference
Install Configuration install Config Install Configuration Site Manager get Local Site get Current Configuration activity set Status I Activity STATUS OK install Config add Activity activity if handler null handler complete Configure success true catch Throwable t original Exception t finally Throwable new Exception null try if handler null handler configure Completed success catch Throwable t new Exception t if original Exception null original exception wins throw Utilities new Core Exception Policy bind Install Handler error feature get Label original Exception NON NLS 1 if new Exception null throw Utilities new Core Exception Policy bind Install Handler error feature get Label new Exception NON NLS 1  InstallConfiguration installConfig InstallConfiguration SiteManager getLocalSite getCurrentConfiguration setStatus IActivity STATUS_OK installConfig addActivity completeConfigure originalException newException configureCompleted newException originalException newCoreException InstallHandler getLabel originalException newException newCoreException InstallHandler getLabel newException
check if the plugins to unconfigure are required by other configured feature and adds the feature to the list of unconfigured features public boolean unconfigure I Feature Reference feature Reference boolean call Install Handler boolean create Activity throws Core Exception if is Unconfigured feature Reference Update Core warn Feature already unconfigured NON NLS 1 return true if feature Reference null Update Core warn The feature reference to unconfigure is null NON NLS 1 return false I Feature feature null try feature feature Reference get Feature null catch Core Exception e if Update Manager Utils is Optional feature Reference URL url feature Reference getURL String url String url null url to External Form no feature reference url NON NLS 1 Update Core warn Error retrieving feature url String e NON NLS 1 return false  IFeatureReference featureReference callInstallHandler createActivity CoreException isUnconfigured featureReference UpdateCore featureReference UpdateCore IFeature featureReference getFeature CoreException UpdateManagerUtils isOptional featureReference featureReference urlString toExternalForm UpdateCore urlString
if feature null URL url feature Reference getURL  featureReference
Update Core warn The feature to unconfigure is null feature reference is url String NON NLS 1 return false Setup optional install handler  UpdateCore urlString
Install Handler Proxy handler null if call Install Handler feature get Install Handler Entry null handler new Install Handler Proxy I Install Handler HANDLER ACTION UNCONFIGURE feature feature get Install Handler Entry null  InstallHandlerProxy callInstallHandler getInstallHandlerEntry InstallHandlerProxy IInstallHandler HANDLER_ACTION_UNCONFIGURE getInstallHandlerEntry
boolean success false Throwable original Exception null  originalException
try Configuration Activity activity null if create Activity activity new Configuration Activity I Activity ACTION UNCONFIGURE activity set Label feature get Versioned Identifier to String activity set Date new Date Install Configuration install Config null  ConfigurationActivity createActivity ConfigurationActivity IActivity ACTION_UNCONFIGURE setLabel getVersionedIdentifier toString setDate InstallConfiguration installConfig
only ask for install config is activity created prevents loops during reconciliation if activity null install Config Install Configuration Site Manager get Local Site get Current Configuration Allow unconfigure if the feature is optional from all the parents or if the feature is mandatory and non of its parent are configured removed not a core issue so deep down if validate No Configured Parents feature if handler null handler unconfigure Initiated add Unconfigured Feature Reference Feature Reference Model feature Reference if handler null handler complete Unconfigure everything done ok  installConfig InstallConfiguration SiteManager getLocalSite getCurrentConfiguration validateNoConfiguredParents unconfigureInitiated addUnconfiguredFeatureReference FeatureReferenceModel featureReference completeUnconfigure
if activity null activity set Status I Activity STATUS OK install Config add Activity activity success true else if activity null activity set Status I Activity STATUS NOK install Config add Activity Model Configuration Activity Model activity catch Throwable t original Exception t finally Throwable new Exception null try if handler null handler unconfigure Completed success catch Throwable t new Exception t  setStatus IActivity STATUS_OK installConfig addActivity setStatus IActivity STATUS_NOK installConfig addActivityModel ConfigurationActivityModel originalException newException unconfigureCompleted newException
if original Exception null original exception wins throw Utilities new Core Exception Policy bind Install Handler error feature get Label original Exception NON NLS 1 if new Exception null  originalException newCoreException InstallHandler getLabel originalException newException

Default Constructor public Configured Site  ConfiguredSite
public Configured Site I Configured Site config Site Configured Site c Site Configured Site config Site set Site Model c Site get Site Model set Configuration Policy Model new Configuration Policy c Site get Configuration Policy set Updatable c Site is Updatable set Enabled c Site is Enabled set Previous Plugin Path c Site get Previous Plugin Path set PlatformURL String c Site get PlatformURL String  ConfiguredSite IConfiguredSite configSite ConfiguredSite cSite ConfiguredSite configSite setSiteModel cSite getSiteModel setConfigurationPolicyModel ConfigurationPolicy cSite getConfigurationPolicy setUpdatable cSite isUpdatable setEnabled cSite isEnabled setPreviousPluginPath cSite getPreviousPluginPath setPlatformURLString cSite getPlatformURLString
public void add Configured Site Changed Listener I Configured Site Changed Listener listener synchronized listeners listeners add listener  addConfiguredSiteChangedListener IConfiguredSiteChangedListener
public void remove Configured Site Changed Listener I Configured Site Changed Listener listener synchronized listeners listeners remove listener  removeConfiguredSiteChangedListener IConfiguredSiteChangedListener
see I Configured Site install I Feature I Verification Listener I Progress Monitor public I Feature Reference install I Feature feature I Verification Listener verification Listener I Progress Monitor monitor throws Install Aborted Exception Core Exception return install feature null verification Listener monitor  IConfiguredSite IFeature IVerificationListener IProgressMonitor IFeatureReference IFeature IVerificationListener verificationListener IProgressMonitor InstallAbortedException CoreException verificationListener
public I Feature Reference install I Feature feature I Feature Reference optional Features I Verification Listener verification Listener I Progress Monitor monitor throws Install Aborted Exception Core Exception change the status if just Created if just Created just Created false Config Site is read only if is Updatable String error Message Policy bind Configured Site Non Installable Site get Site getURL to External Form NON NLS 1 I Status status verify Updatable Status if status null error Message status get Message NON NLS 1 throw Utilities new Core Exception error Message null feature is null if feature null String error Message Policy bind Configured Site Null Feature To Install NON NLS 1 throw Utilities new Core Exception error Message null feature reference to return I Feature Reference installed Feature Ref I Feature installed Feature null create the Activity INSTALL Configuration Activity activity new Configuration Activity I Activity ACTION FEATURE INSTALL activity set Label feature get Versioned Identifier to String activity set Date new Date try installed Feature Ref get Site install feature optional Features verification Listener monitor if Update Core DEBUG Update Core DEBUG SHOW INSTALL Update Core debug Sucessfully installed installed Feature Ref getURL to External Form NON NLS 1 if installed Feature Ref null try installed Feature installed Feature Ref get Feature null catch Core Exception e Update Core warn null e everything done ok activity set Status I Activity STATUS OK notify listeners Object site Listeners listeners get Listeners for int i 0 i site Listeners length i if installed Feature null I Configured Site Changed Listener listener I Configured Site Changed Listener site Listeners i listener feature Installed installed Feature catch Core Exception e not ok set Activity status activity set Status I Activity STATUS NOK throw e finally I Install Configuration current Site Manager get Local Site get Current Configuration Install Configuration current add Activity activity call the configure task if installed Feature null configure installed Feature optional Features false call Install Handler return installed Feature Ref  IFeatureReference IFeature IFeatureReference optionalFeatures IVerificationListener verificationListener IProgressMonitor InstallAbortedException CoreException justCreated justCreated justCreated ConfigSite isUpdatable errorMessage ConfiguredSite NonInstallableSite getSite toExternalForm IStatus verifyUpdatableStatus errorMessage getMessage newCoreException errorMessage errorMessage ConfiguredSite NullFeatureToInstall newCoreException errorMessage IFeatureReference installedFeatureRef IFeature installedFeature ConfigurationActivity ConfigurationActivity IActivity ACTION_FEATURE_INSTALL setLabel getVersionedIdentifier toString setDate installedFeatureRef getSite optionalFeatures verificationListener UpdateCore UpdateCore DEBUG_SHOW_INSTALL UpdateCore installedFeatureRef toExternalForm installedFeatureRef installedFeature installedFeatureRef getFeature CoreException UpdateCore setStatus IActivity STATUS_OK siteListeners getListeners siteListeners installedFeature IConfiguredSiteChangedListener IConfiguredSiteChangedListener siteListeners featureInstalled installedFeature CoreException setStatus IActivity STATUS_NOK IInstallConfiguration SiteManager getLocalSite getCurrentConfiguration InstallConfiguration addActivity installedFeature installedFeature optionalFeatures callInstallHandler installedFeatureRef
public void remove I Feature feature I Progress Monitor monitor throws Core Exception Config Site is read only if is Updatable String error Message Policy bind Configured Site Non Uninstallable Site get Site getURL to External Form NON NLS 1 throw Utilities new Core Exception error Message null create the Activity Configuration Activity activity new Configuration Activity I Activity ACTION FEATURE REMOVE activity set Label feature get Versioned Identifier to String activity set Date new Date try I Feature Reference reference To Remove null I Site Feature Reference feature Ref get Site get Feature References I Site Feature Reference ref get Site get Feature Reference feature for int i 0 i feature Ref length i if feature Ref i equals ref reference To Remove feature Ref i break we found a feature reference on the site matching the feature if reference To Remove null Check if feature is unconfigured before we remove it our UI will check For non UI application throw error is feature is configured if get Configuration Policy is Configured reference To Remove I Feature feature To Remove I Feature Reference reference To Remove get Feature null String feature Label feature To Remove null null feature To Remove get Label throw Utilities new Core Exception Policy bind Configured Site Unable To Remove Configured Feature NON NLS 1 feature Label null else throw Utilities new Core Exception Policy bind Configured Site Unable To Find Feature feature getURL to String NON NLS 1 null remove the feature get Site remove feature monitor get Configuration Policy remove Feature Reference reference To Remove everything done ok activity set Status I Activity STATUS OK notify listeners Object site Listeners listeners get Listeners for int i 0 i site Listeners length i I Configured Site Changed Listener site Listeners i feature Removed feature catch Core Exception e activity set Status I Activity STATUS NOK throw e finally I Install Configuration current Site Manager get Local Site get Current Configuration Install Configuration current add Activity activity  IFeature IProgressMonitor CoreException ConfigSite isUpdatable errorMessage ConfiguredSite NonUninstallableSite getSite toExternalForm newCoreException errorMessage ConfigurationActivity ConfigurationActivity IActivity ACTION_FEATURE_REMOVE setLabel getVersionedIdentifier toString setDate IFeatureReference referenceToRemove ISiteFeatureReference featureRef getSite getFeatureReferences ISiteFeatureReference getSite getFeatureReference featureRef featureRef referenceToRemove featureRef referenceToRemove getConfigurationPolicy isConfigured referenceToRemove IFeature featureToRemove IFeatureReference referenceToRemove getFeature featureLabel featureToRemove featureToRemove getLabel newCoreException ConfiguredSite UnableToRemoveConfiguredFeature featureLabel newCoreException ConfiguredSite UnableToFindFeature toString getSite getConfigurationPolicy removeFeatureReference referenceToRemove setStatus IActivity STATUS_OK siteListeners getListeners siteListeners IConfiguredSiteChangedListener siteListeners featureRemoved CoreException setStatus IActivity STATUS_NOK IInstallConfiguration SiteManager getLocalSite getCurrentConfiguration InstallConfiguration addActivity
see I Configured Site configure I Feature public void configure I Feature feature throws Core Exception configure feature null true call Install Handler  IConfiguredSite IFeature IFeature CoreException callInstallHandler
private void configure I Feature feature I Feature Reference optional Features boolean call Install Handler throws Core Exception if feature null Update Core warn Attempting to configure a null feature in site get Site getURL to External Form NON NLS 1 return Configuration Policy config Policy get Configuration Policy if config Policy null return bottom up approach same configured Site I Included Feature Reference children Ref feature get Included Feature References if optional Features null children Ref children To Configure children Ref optional Features for int i 0 i children Ref length i try I Feature child children Ref i get Feature null configure child optional Features call Install Handler catch Core Exception e will skip any bad children if children Ref i is Optional Update Core warn Unable to configure child feature children Ref i e NON NLS 1 NON NLS 2 configure root feature I Feature Reference feature Reference get Site get Feature Reference feature config Policy configure feature Reference call Install Handler true notify listeners Object site Listeners listeners get Listeners for int i 0 i site Listeners length i I Configured Site Changed Listener site Listeners i feature Configured feature  IFeature IFeatureReference optionalFeatures callInstallHandler CoreException UpdateCore getSite toExternalForm ConfigurationPolicy configPolicy getConfigurationPolicy configPolicy configuredSite IIncludedFeatureReference childrenRef getIncludedFeatureReferences optionalFeatures childrenRef childrenToConfigure childrenRef optionalFeatures childrenRef IFeature childrenRef getFeature optionalFeatures callInstallHandler CoreException childrenRef isOptional UpdateCore childrenRef IFeatureReference featureReference getSite getFeatureReference configPolicy featureReference callInstallHandler siteListeners getListeners siteListeners IConfiguredSiteChangedListener siteListeners featureConfigured
private I Included Feature Reference children To Configure I Included Feature Reference children I Feature Reference optionalfeatures List children To Install new Array List for int i 0 i children length i I Included Feature Reference optional Feature To Configure children i if optional Feature To Configure is Optional children To Install add optional Feature To Configure else for int j 0 j optionalfeatures length j must compare feature as optional Features are from the install site where children are on the local site try I Feature installed Children optionalfeatures j get Feature null if installed Children equals optional Feature To Configure get Feature null children To Install add optional Feature To Configure break catch Core Exception e Update Core warn e NON NLS 1 I Included Feature Reference result new I Included Feature Reference children To Install size if children To Install size 0 children To Install to Array result return result  IIncludedFeatureReference childrenToConfigure IIncludedFeatureReference IFeatureReference childrenToInstall ArrayList IIncludedFeatureReference optionalFeatureToConfigure optionalFeatureToConfigure isOptional childrenToInstall optionalFeatureToConfigure optionalFeatures IFeature installedChildren getFeature installedChildren optionalFeatureToConfigure getFeature childrenToInstall optionalFeatureToConfigure CoreException UpdateCore IIncludedFeatureReference IIncludedFeatureReference childrenToInstall childrenToInstall childrenToInstall toArray
see I Configured Site unconfigure I Feature public boolean unconfigure I Feature feature throws Core Exception the first call sould disable without checking for enable parent return unconfigure feature true false  IConfiguredSite IFeature IFeature CoreException
private boolean unconfigure I Feature feature boolean include Patches boolean verify Enable Parent throws Core Exception I Feature Reference feature Reference get Site get Feature Reference feature if feature Reference null Update Core warn Unable to retrieve Feature Reference for feature feature NON NLS 1 return false Configuration Policy config Policy get Configuration Policy if config Policy null return false verify no enable parent if verify Enable Parent validate No Configured Parents feature Update Core warn The feature feature get Versioned Identifier to disable is needed by another enable feature NON NLS 1 NON NLS 2 return false boolean sucessfully Unconfigured false try sucessfully Unconfigured config Policy unconfigure feature Reference true true catch Core Exception e URL url feature Reference getURL String url String url null url to External Form no feature reference url NON NLS 1 Update Core warn Unable to unconfigure url String e NON NLS 1 throw e if sucessfully Unconfigured 2 0 2 unconfigure patches that reference this feature A patch is a feature that contains an import statement with patch true and an id version that matches an already installed and configured feature When patched feature is unconfigured all the patches that reference it must be unconfigured as well in contrast patched features can be configured without the patches if include Patches unconfigure Patches feature top down approach same configured Site I Included Feature Reference children Ref feature get Included Feature References for int i 0 i children Ref length i try I Feature child children Ref i get Feature null disable the exact feature unconfigure child include Patches true check for parent as we should be the only parent catch Core Exception e skip any bad children Update Core warn Unable to unconfigure child feature children Ref i e NON NLS 1 NON NLS 2 notify listeners Object site Listeners listeners get Listeners for int i 0 i site Listeners length i I Configured Site Changed Listener listener I Configured Site Changed Listener site Listeners i listener feature Unconfigured feature return true else URL url feature Reference getURL String url String url null url to External Form no feature reference url NON NLS 1 Update Core warn Unable to unconfigure url String NON NLS 1 return false  IFeature includePatches verifyEnableParent CoreException IFeatureReference featureReference getSite getFeatureReference featureReference UpdateCore ConfigurationPolicy configPolicy getConfigurationPolicy configPolicy verifyEnableParent validateNoConfiguredParents UpdateCore getVersionedIdentifier sucessfullyUnconfigured sucessfullyUnconfigured configPolicy featureReference CoreException featureReference urlString toExternalForm UpdateCore urlString sucessfullyUnconfigured includePatches unconfigurePatches configuredSite IIncludedFeatureReference childrenRef getIncludedFeatureReferences childrenRef IFeature childrenRef getFeature includePatches CoreException UpdateCore childrenRef siteListeners getListeners siteListeners IConfiguredSiteChangedListener IConfiguredSiteChangedListener siteListeners featureUnconfigured featureReference urlString toExternalForm UpdateCore urlString
private void unconfigure Patches I Feature feature I Feature Reference frefs get Configured Features for int i 0 i frefs length i I Feature Reference fref frefs i try I Feature candidate fref get Feature null if candidate equals feature continue if Update Utils is Patch feature candidate unconfigure candidate false false catch Core Exception e Update Core warn e NON NLS 1  unconfigurePatches IFeature IFeatureReference getConfiguredFeatures IFeatureReference IFeature getFeature UpdateUtils isPatch CoreException UpdateCore
public I Feature Reference get Configured Features if is Enabled return get Raw Configured Features else return new I Site Feature Reference 0  IFeatureReference getConfiguredFeatures isEnabled getRawConfiguredFeatures ISiteFeatureReference
private I Feature Reference get Raw Configured Features Configuration Policy config Policy get Configuration Policy if config Policy null return new I Site Feature Reference 0 return config Policy get Configured Features  IFeatureReference getRawConfiguredFeatures ConfigurationPolicy configPolicy getConfigurationPolicy configPolicy ISiteFeatureReference configPolicy getConfiguredFeatures
public I Feature Reference get Feature References Configuration Policy config Policy get Configuration Policy if config Policy null return new I Site Feature Reference 0 I Feature Reference configured Features get Configured Features int conf Len configured Features length I Feature Reference unconfigured Features config Policy get Unconfigured Features int unconf Len unconfigured Features length I Feature Reference result new I Feature Reference conf Len unconf Len if conf Len 0 System arraycopy configured Features 0 result 0 conf Len if unconf Len 0 System arraycopy unconfigured Features 0 result conf Len unconf Len return result  IFeatureReference getFeatureReferences ConfigurationPolicy configPolicy getConfigurationPolicy configPolicy ISiteFeatureReference IFeatureReference configuredFeatures getConfiguredFeatures confLen configuredFeatures IFeatureReference unconfiguredFeatures configPolicy getUnconfiguredFeatures unconfLen unconfiguredFeatures IFeatureReference IFeatureReference confLen unconfLen confLen configuredFeatures confLen unconfLen unconfiguredFeatures confLen unconfLen
public void revert To I Configured Site old Configuration I Progress Monitor monitor I Problem Handler handler throws Core Exception Interrupted Exception Configured Site old Configured Site Configured Site old Configuration retrieve the feature that were configured I Feature Reference configured Features old Configured Site valid Configured Features handler for int i 0 i configured Features length i get Configuration Policy configure configured Features i true true calculate all the features we have to unconfigure from the current state to this state in the history List feature To Unconfigure old Configured Site calculate Unconfigured Features configured Features for each unconfigured feature check if it still exists if so add as unconfigured Iterator iter feature To Unconfigure iterator while iter has Next I Feature Reference element I Feature Reference iter next try do not log activity get Configuration Policy unconfigure element true true catch Core Exception e log no feature to unconfigure String url element getURL to String I Site site element get Site String site String site null site getURL to External Form Policy bind Configured Site No Site NON NLS 1 Update Core warn Policy bind Configured Site Cannot Find Feature To Unconfigure url site String e NON NLS 1 end USER EXCLUDE  revertTo IConfiguredSite oldConfiguration IProgressMonitor IProblemHandler CoreException InterruptedException ConfiguredSite oldConfiguredSite ConfiguredSite oldConfiguration IFeatureReference configuredFeatures oldConfiguredSite validConfiguredFeatures configuredFeatures getConfigurationPolicy configuredFeatures featureToUnconfigure oldConfiguredSite calculateUnconfiguredFeatures configuredFeatures featureToUnconfigure hasNext IFeatureReference IFeatureReference getConfigurationPolicy CoreException toString ISite getSite siteString toExternalForm ConfiguredSite NoSite UpdateCore ConfiguredSite CannotFindFeatureToUnconfigure siteString USER_EXCLUDE
private I Feature Reference valid Configured Features I Problem Handler handler throws Interrupted Exception I Feature Reference configured Features get Configured Features if configured Features null for int i 0 i configured Features length i I Feature feature null attempt to access the feature try feature configured Features i get Feature null catch Core Exception e notify we cannot find the feature Update Core warn null e String feature String configured Features i getURL to External Form if handler report Problem Policy bind Configured Site Cannot Find Feature To Configure feature String NON NLS 1 throw new Interrupted Exception verify all the plugins still exist if feature null get plugin identifier List site Plugin Identifiers new Array List I Site site feature get Site I Plugin Entry site Plugin Entries null if site null site Plugin Entries site get Plugin Entries for int index 0 index site Plugin Entries length index I Plugin Entry entry site Plugin Entries index site Plugin Identifiers add entry get Versioned Identifier if site Plugin Entries length 0 I Plugin Entry feature Plugin Entries feature get Plugin Entries for int index 0 index feature Plugin Entries length index I Plugin Entry current Feature Plugin Entry feature Plugin Entries index if contains current Feature Plugin Entry get Versioned Identifier site Plugin Identifiers the plugin defined by the feature doesn t seem to exist on the site String msg Error verifying existence of plugin current Feature Plugin Entry get Versioned Identifier to String NON NLS 1 Update Core log msg new Exception String site String site null site getURL to External Form Policy bind Configured Site No Site NON NLS 1 String error Label Policy bind Configured Site Cannot Find Plugin Entry current Feature Plugin Entry get Versioned Identifier to String site String NON NLS 1 NON NLS 2 if handler null throw new Interrupted Exception error Label if handler report Problem Policy bind error Label throw new Interrupted Exception end if not found in site end for end for configured feature return configured Features  IFeatureReference validConfiguredFeatures IProblemHandler InterruptedException IFeatureReference configuredFeatures getConfiguredFeatures configuredFeatures configuredFeatures IFeature configuredFeatures getFeature CoreException UpdateCore featureString configuredFeatures toExternalForm reportProblem ConfiguredSite CannotFindFeatureToConfigure featureString InterruptedException sitePluginIdentifiers ArrayList ISite getSite IPluginEntry sitePluginEntries sitePluginEntries getPluginEntries sitePluginEntries IPluginEntry sitePluginEntries sitePluginIdentifiers getVersionedIdentifier sitePluginEntries IPluginEntry featurePluginEntries getPluginEntries featurePluginEntries IPluginEntry currentFeaturePluginEntry featurePluginEntries currentFeaturePluginEntry getVersionedIdentifier sitePluginIdentifiers currentFeaturePluginEntry getVersionedIdentifier toString UpdateCore siteString toExternalForm ConfiguredSite NoSite errorLabel ConfiguredSite CannotFindPluginEntry currentFeaturePluginEntry getVersionedIdentifier toString siteString InterruptedException errorLabel reportProblem errorLabel InterruptedException configuredFeatures
private List calculate Unconfigured Features I Feature Reference configured Features throws Core Exception Set feature To Unconfigure Set new Hash Set loop for all history try to see if the configured site existed if it does get the unconfigured features and the configured one I Install Configuration history Site Manager get Local Site get Configuration History for int i 0 i history length i I Install Configuration element history i I Configured Site config Sites element get Configured Sites for int j 0 j config Sites length j Configured Site config Site Configured Site config Sites j if config Site get Site equals get Site feature To Unconfigure Set add All Arrays as List config Site get Configuration Policy get Unconfigured Features feature To Unconfigure Set add All Arrays as List config Site get Configuration Policy get Configured Features remove the unconfigured feature we found that are now to be configured they may have been unconfigured in the past but the revert makes them configured List feature To Unconfigure List remove configured Features feature To Unconfigure Set return feature To Unconfigure List  calculateUnconfiguredFeatures IFeatureReference configuredFeatures CoreException featureToUnconfigureSet HashSet IInstallConfiguration SiteManager getLocalSite getConfigurationHistory IInstallConfiguration IConfiguredSite configSites getConfiguredSites configSites ConfiguredSite configSite ConfiguredSite configSites configSite getSite getSite featureToUnconfigureSet addAll asList configSite getConfigurationPolicy getUnconfiguredFeatures featureToUnconfigureSet addAll asList configSite getConfigurationPolicy getConfiguredFeatures featureToUnconfigureList configuredFeatures featureToUnconfigureSet featureToUnconfigureList
private List remove I Feature Reference feature Refs Set set List result new Array List if set null return result if an element of the list is NOT found in the array add it to the result list Iterator iter set iterator while iter has Next I Feature Reference element I Feature Reference iter next boolean found false for int i 0 i feature Refs length i if element equals feature Refs i found true if found result add element return result  IFeatureReference featureRefs ArrayList hasNext IFeatureReference IFeatureReference featureRefs featureRefs
private boolean contains Versioned Identifier id List list boolean found false if list null list is Empty Iterator iter list iterator while iter has Next found Versioned Identifier element Versioned Identifier iter next if element equals id found true return found  VersionedIdentifier isEmpty hasNext VersionedIdentifier VersionedIdentifier
public Configuration Policy get Configuration Policy return Configuration Policy get Configuration Policy Model  ConfigurationPolicy getConfigurationPolicy ConfigurationPolicy getConfigurationPolicyModel
public I Site get Site return I Site get Site Model  ISite getSite ISite getSiteModel
public I Install Configuration get Install Configuration return I Install Configuration get Install Configuration Model  IInstallConfiguration getInstallConfiguration IInstallConfiguration getInstallConfigurationModel
public I Status get Broken Status I Feature feature I Status feature Status create Status I Status OK I Feature STATUS HAPPY null NON NLS 1 check the Plugins of all the features every plugin of the feature must be on the site I Plugin Entry site Entries get Site get Plugin Entries I Plugin Entry features Entries feature get Plugin Entries I Plugin Entry result Update Manager Utils diff features Entries site Entries if result null result length 0 String msg Policy bind Site Local Feature Un Happy NON NLS 1 Multi Status multi new Multi Status feature Status get Plugin I Feature STATUS UNHAPPY msg null for int k 0 k result length k Versioned Identifier id result k get Versioned Identifier Object values new String NON NLS 1 NON NLS 2 if id null values new Object id get Identifier id get Version String msg1 Policy bind Configured Site Missing Plugins Broken Feature values NON NLS 1 Update Core warn msg1 I Status status create Status I Status ERROR I Feature STATUS UNHAPPY msg1 null multi add status return multi check os arch and ws String msg Policy bind Site Local Feature Happy NON NLS 1 return create Status I Status OK I Feature STATUS HAPPY msg null  IStatus getBrokenStatus IFeature IStatus featureStatus createStatus IStatus IFeature STATUS_HAPPY IPluginEntry siteEntries getSite getPluginEntries IPluginEntry featuresEntries getPluginEntries IPluginEntry UpdateManagerUtils featuresEntries siteEntries SiteLocal FeatureUnHappy MultiStatus MultiStatus featureStatus getPlugin IFeature STATUS_UNHAPPY VersionedIdentifier getVersionedIdentifier getIdentifier getVersion ConfiguredSite MissingPluginsBrokenFeature UpdateCore IStatus createStatus IStatus IFeature STATUS_UNHAPPY SiteLocal FeatureHappy createStatus IStatus IFeature STATUS_HAPPY
public boolean is Configured I Feature feature if is Enabled return false if get Configuration Policy null return false I Feature Reference feature Reference get Site get Feature Reference feature if feature Reference null if Update Core DEBUG Update Core DEBUG SHOW WARNINGS Update Core warn Unable to retrieve feature Reference for feature feature NON NLS 1 return false return get Configuration Policy is Configured feature Reference  isConfigured IFeature isEnabled getConfigurationPolicy IFeatureReference featureReference getSite getFeatureReference featureReference UpdateCore UpdateCore DEBUG_SHOW_WARNINGS UpdateCore featureReference getConfigurationPolicy isConfigured featureReference
see Object to String public String to String if get Site null return No Site NON NLS 1 if get Site getURL null return No URL NON NLS 1 return get Site getURL to External Form  toString toString getSite getSite getSite toExternalForm
see I Configured Site verify Updatable Status public I Status verify Updatable Status if verify Status null return verify Status URL siteURL get Site getURL if siteURL null verify Status create Status I Status ERROR Policy bind Configured Site SiteURL Null null NON NLS 1 return verify Status if file equals Ignore Case siteURL get Protocol NON NLS 1 verify Status create Status I Status ERROR Policy bind Configured Site Non Local Site null NON NLS 1 return verify Status String site Location siteURL get File File file new File site Location get the product name of the private marker if there is no private marker check if the site is contained in another site if there is a marker and this is a different product return false otherwise don t check if we are contained in another site String product Name get Product Name file if product Name null if product Name equals get Product Identifier id get Product File NON NLS 1 verify Status create Status I Status ERROR Policy bind Configured Site Not Same Product Id product Name null NON NLS 1 return verify Status else File container get Site Containing file if container null verify Status create Status I Status ERROR Policy bind Configured Site Contained In Another Site container get Absolute Path null NON NLS 1 return verify Status if can Write file verify Status create Status I Status ERROR Policy bind Configured Site Read Only Site null NON NLS 1 return verify Status verify Status create Status I Status OK null NON NLS 1 set Updatable true return verify Status  IConfiguredSite verifyUpdatableStatus IStatus verifyUpdatableStatus verifyStatus verifyStatus getSite verifyStatus createStatus IStatus ConfiguredSite SiteURLNull verifyStatus equalsIgnoreCase getProtocol verifyStatus createStatus IStatus ConfiguredSite NonLocalSite verifyStatus siteLocation getFile siteLocation productName getProductName productName productName getProductIdentifier getProductFile verifyStatus createStatus IStatus ConfiguredSite NotSameProductId productName verifyStatus getSiteContaining verifyStatus createStatus IStatus ConfiguredSite ContainedInAnotherSite getAbsolutePath verifyStatus canWrite verifyStatus createStatus IStatus ConfiguredSite ReadOnlySite verifyStatus verifyStatus createStatus IStatus setUpdatable verifyStatus
private static boolean can Write File file if file is Directory file get Parent File null file file get Parent File File try File null File Output Stream out null try try File new File file to Delete NON NLS 1 out new File Output Stream try File out write 0 catch IO Exception e return false finally try if out null out close catch IO Exception e if try File null try File delete return true  canWrite isDirectory getParentFile getParentFile tryFile FileOutputStream tryFile toDelete FileOutputStream tryFile IOException IOException tryFile tryFile
private static File get Site Containing File file if file null return null Update Core warn Is Contained Checking for markers at file NON NLS 1 if file exists file is Directory File product File new File file PRODUCT SITE MARKER File extension File new File file EXTENSION SITE MARKER if product File exists extension File exists return file do not check if a marker exists in the current but start from the parent the current is analyze by get Productname if file get Parent File null File private File new File file get Parent File PRIVATE SITE MARKER if private File exists return file get Parent File return get Site Containing file get Parent File  getSiteContaining UpdateCore IsContained isDirectory productFile PRODUCT_SITE_MARKER extensionFile EXTENSION_SITE_MARKER productFile extensionFile getProductname getParentFile privateFile getParentFile PRIVATE_SITE_MARKER privateFile getParentFile getSiteContaining getParentFile
private static String get Product Name File file if file null return null File marker File new File file EXTENSION SITE MARKER if marker File exists return null File product File get Product File String product Id null String private Id null if product File null product Id get Product Identifier id product File NON NLS 1 private Id get Product Identifier id marker File NON NLS 1 if product Id null Update Core warn Product ID is null at product File NON NLS 1 return null if product Id equals Ignore Case private Id Update Core warn Product id at product File Different than marker File NON NLS 1 NON NLS 2 String name get Product Identifier name marker File NON NLS 1 String version get Product Identifier version marker File NON NLS 1 String markerID name null version name version NON NLS 1 if markerID null markerID NON NLS 1 return markerID else return private Id else Update Core warn Product Marker doesn t exist product File NON NLS 1 return null  getProductName markerFile EXTENSION_SITE_MARKER markerFile productFile getProductFile productId privateId productFile productId getProductIdentifier productFile privateId getProductIdentifier markerFile productId UpdateCore productFile productId equalsIgnoreCase privateId UpdateCore productFile markerFile getProductIdentifier markerFile getProductIdentifier markerFile privateId UpdateCore productFile
private static String get Product Identifier String identifier File property File String result null if identifier null return result Input Stream in null try in new File Input Stream property File Property Resource Bundle bundle new Property Resource Bundle in result bundle get String identifier catch IO Exception e if Update Core DEBUG Update Core DEBUG SHOW INSTALL Update Core debug Exception reading property file property File NON NLS 1 catch Missing Resource Exception e if Update Core DEBUG Update Core DEBUG SHOW INSTALL Update Core debug Exception reading identifier from property file property File NON NLS 1 NON NLS 2 finally if in null try in close catch IO Exception e1 return result  getProductIdentifier propertyFile InputStream FileInputStream propertyFile PropertyResourceBundle PropertyResourceBundle getString IOException UpdateCore UpdateCore DEBUG_SHOW_INSTALL UpdateCore propertyFile MissingResourceException UpdateCore UpdateCore DEBUG_SHOW_INSTALL UpdateCore propertyFile IOException
private static File get Product File String product Install Directory Configurator Utils get InstallURL get File if product Install Directory null File product File new File product Install Directory PRODUCT SITE MARKER if product File exists return product File else Update Core warn Product marker doesn t exist product File NON NLS 1 else Update Core warn Cannot retrieve install URL from Boot Loader NON NLS 1 return null  getProductFile productInstallDirectory ConfiguratorUtils getInstallURL getFile productInstallDirectory productFile productInstallDirectory PRODUCT_SITE_MARKER productFile productFile UpdateCore productFile UpdateCore BootLoader
package boolean create Private Site Marker URL siteURL get Site getURL if siteURL null Update Core warn Unable to create marker The Site url is null NON NLS 1 return false if file equals Ignore Case siteURL get Protocol NON NLS 1 Update Core warn Unable to create private marker The Site is not on the local file system NON NLS 1 return false String site Location siteURL get File File product File get Product File boolean success false if product File null String product Id get Product Identifier id product File NON NLS 1 String product Name get Product Identifier name product File NON NLS 1 String product Ver get Product Identifier version product File NON NLS 1 if product Id null File file new File site Location EXTENSION SITE MARKER if file exists Output Stream out null Output Stream Writer out Writer null try out new File Output Stream file out Writer new Output Stream Writer out UTF8 NON NLS 1 out Writer write id product Id n NON NLS 1 NON NLS 2 if product Name null out Writer write name product Name n NON NLS 1 NON NLS 2 if product Ver null out Writer write version product Ver n NON NLS 1 NON NLS 2 success true just Created true catch Exception e Update Core warn Unable to create private Marker at file e NON NLS 1 finally try if out Writer null out Writer close catch IO Exception e1 try if out null out close catch IO Exception e2 return success  createPrivateSiteMarker getSite UpdateCore equalsIgnoreCase getProtocol UpdateCore siteLocation getFile productFile getProductFile productFile productId getProductIdentifier productFile productName getProductIdentifier productFile productVer getProductIdentifier productFile productId siteLocation EXTENSION_SITE_MARKER OutputStream OutputStreamWriter outWriter FileOutputStream outWriter OutputStreamWriter outWriter productId productName outWriter productName productVer outWriter productVer justCreated UpdateCore outWriter outWriter IOException IOException
eclipseextension public boolean is Extension Site return contains Marker EXTENSION SITE MARKER  isExtensionSite containsMarker EXTENSION_SITE_MARKER
eclipseextension public boolean is Product Site return contains Marker PRODUCT SITE MARKER  isProductSite containsMarker PRODUCT_SITE_MARKER
eclipseextension public boolean is Private Site return is Extension Site  isPrivateSite isExtensionSite
private boolean contains Marker String marker I Site site get Site if site null Update Core warn Contains Markers The site is null NON NLS 1 return false URL url site getURL if url null Update Core warn Contains Markers Site URL is null NON NLS 1 return false if file equals Ignore Case url get Protocol NON NLS 1 Update Core warn Contains Markers Non file protocol NON NLS 1 return false File file new File url get File if file exists Update Core warn Contains Markers The site doesn t exist file NON NLS 1 return false File extension new File file marker if extension exists Update Core warn Contains Markers The extensionfile does not exist extension NON NLS 1 return false return true  containsMarker ISite getSite UpdateCore UpdateCore equalsIgnoreCase getProtocol UpdateCore getFile UpdateCore UpdateCore
public boolean is Natively Linked throws Core Exception String platform String get PlatformURL String if platform String null Update Core warn Unable to retrieve platform String NON NLS 1 return false URL siteURL null try check if the site exists and is updatable update config Site URL url To Check new URL platform String I Platform Configuration runtime Config Configurator Utils get Current Platform Configuration I Platform Configuration I Site Entry entry runtime Config find Configured Site url To Check if entry null return entry is Natively Linked else Update Core warn Unable to retrieve site platform String from platform NON NLS 1 NON NLS 2 check by comparing UR Ls I Platform Configuration I Site Entry sites runtime Config get Configured Sites for int i 0 i sites length i siteURL sites i getURL URL resolvedURL Platform resolve siteURL if Update Manager Utils sameURL resolvedURL url To Check return true catch MalformedURL Exception e String msg Policy bind Configured Site Unable ResolveURL platform String NON NLS 1 throw Utilities new Core Exception msg e catch IO Exception e String msg Policy bind Configured Site Unable To Access Site new Object siteURL NON NLS 1 throw Utilities new Core Exception msg e return false  isNativelyLinked CoreException platformString getPlatformURLString platformString UpdateCore platformString configSite urlToCheck platformString IPlatformConfiguration runtimeConfig ConfiguratorUtils getCurrentPlatformConfiguration IPlatformConfiguration ISiteEntry runtimeConfig findConfiguredSite urlToCheck isNativelyLinked UpdateCore platformString URLs IPlatformConfiguration ISiteEntry runtimeConfig getConfiguredSites UpdateManagerUtils urlToCheck MalformedURLException ConfiguredSite UnableResolveURL platformString newCoreException IOException ConfiguredSite UnableToAccessSite newCoreException
private boolean validate No Configured Parents I Feature feature throws Core Exception if feature null Update Core warn Configuration Policy validate Feature is null NON NLS 1 return true I Feature Reference parents Update Manager Utils get Parent Features feature get Configured Features false return parents length 0  validateNoConfiguredParents IFeature CoreException UpdateCore ConfigurationPolicy IFeatureReference UpdateManagerUtils getParentFeatures getConfiguredFeatures

private boolean disconnected public Stream Runnable HttpURL Connection url Connection this url Connection url Connection  StreamRunnable HttpURLConnection urlConnection urlConnection urlConnection
public Input Stream get Input Stream return is  InputStream getInputStream
public URL getURL return url Connection getURL  urlConnection
public Exception get Exception return exception  getException
public void disconnect url Connection disconnect disconnected true  urlConnection
public void run try is url Connection get Input Stream if disconnected The connection was slow but returned a valid input stream However the user canceled the connection so we must close to avoid resource leak if is null try is close catch IO Exception ex at this point we don t care finally is null catch Exception e exception e  urlConnection getInputStream IOException
class Connection Thread extends Thread private Stream Runnable runnable public Connection Thread Stream Runnable runnable super runnable update connection NON NLS 1 this runnable runnable  ConnectionThread StreamRunnable ConnectionThread StreamRunnable
public Stream Runnable get Runnable return runnable  StreamRunnable getRunnable
public Connection Thread Manager In case we are running Sun s code set If Not Default Property sun net client default Connect Timeout CONNECT TIMEOUT NON NLS 1 set If Not Default Property sun net client default Read Timeout READ TIMEOUT NON NLS 1  ConnectionThreadManager setIfNotDefaultProperty defaultConnectTimeout CONNECT_TIMEOUT setIfNotDefaultProperty defaultReadTimeout READ_TIMEOUT
private void set If Not Default Property String key String value String old Value System get Property key if old Value null old Value equals 1 NON NLS 1 System set Property key value  setIfNotDefaultProperty oldValue getProperty oldValue oldValue setProperty
public Thread create Thread Stream Runnable runnable throws Core Exception validate Existing Threads if threads null threads new Vector Thread t new Connection Thread runnable t set Daemon true threads add t return t  createThread StreamRunnable CoreException validateExistingThreads ConnectionThread setDaemon
private void validate Existing Threads throws Core Exception if threads null return int alive Count purge Terminated Threads if alive Count MAX COUNT Array List children new Array List String plugin Id Update Core get Plugin get Bundle get Symbolic Name for int i 0 i threads size i Connection Thread t Connection Thread threads get i String url t get Runnable getURL to String I Status status new Status I Status ERROR plugin Id I Status OK Policy bind Connection Thread Manager unresponsiveURL NON NLS 1 url null children add status Multi Status parent Status new Multi Status plugin Id I Status OK I Status children to Array new I Status children size Policy bind Connection Thread Manager too Many Connections NON NLS 1 null throw new Core Exception parent Status  validateExistingThreads CoreException aliveCount purgeTerminatedThreads aliveCount MAX_COUNT ArrayList ArrayList pluginId UpdateCore getPlugin getBundle getSymbolicName ConnectionThread ConnectionThread getRunnable toString IStatus IStatus pluginId IStatus ConnectionThreadManager MultiStatus parentStatus MultiStatus pluginId IStatus IStatus toArray IStatus ConnectionThreadManager tooManyConnections CoreException parentStatus
private int purge Terminated Threads int alive Count 0 Object array threads to Array for int i 0 i array length i Thread t Thread array i if t is Alive threads remove t else alive Count return alive Count  purgeTerminatedThreads aliveCount toArray isAlive aliveCount aliveCount
public void shutdown We might want to kill the active threads but this is not really necessary since they are all daemons and will not prevent JVM to terminate threads clear 

public void non Plugin Data Downloaded I Non Plugin Entry non Plugin Data I Verification Listener listener throws Core Exception verify non plugin archives The Default Install Handler assumes the verifier associated with the feature is able to verify the data archives if non Plugin Data null non Plugin Data length 0 return this non Plugin Entries non Plugin Data I Feature Content Provider provider this feature get Feature Content Provider I Verifier verifier provider get Verifier if verifier null return for int i 0 i this non Plugin Entries length i Content Reference archives provider get Non Plugin Entry Archive References non Plugin Entries i this monitor I Verification Result result for int j 0 j archives length j see if the data entry is a jar Content Reference archive archives j if archives j instanceof Jar Content Reference archives j get Identifier ends With jar NON NLS 1 try archive new Jar Content Reference archives j get Identifier archives j as File catch IO Exception e result verifier verify this feature archive false this monitor if result null prompt For Verification result listener  nonPluginDataDownloaded INonPluginEntry nonPluginData IVerificationListener CoreException DefaultInstallHandler nonPluginData nonPluginData nonPluginEntries nonPluginData IFeatureContentProvider getFeatureContentProvider IVerifier getVerifier nonPluginEntries ContentReference getNonPluginEntryArchiveReferences nonPluginEntries IVerificationResult ContentReference JarContentReference getIdentifier endsWith JarContentReference getIdentifier asFile IOException promptForVerification
Content Selector selector new Content Selector public String define Identifier Jar Entry entry if entry null return null else return prefix entry get Name  ContentSelector ContentSelector defineIdentifier JarEntry getName
public void complete Install I Feature Content Consumer consumer throws Core Exception plugins have been installed Check to see if we have any non plugin entries that need to be handled if this non Plugin Entries null this non Plugin Entries length 0 return install non plugin archives I Feature Content Provider provider this feature get Feature Content Provider for int i 0 i this non Plugin Entries length i Content Reference archive provider get Non Plugin Entry Archive References non Plugin Entries i this monitor I Content Consumer non Plugin Consumer consumer open non Plugin Entries i for int j 0 j archive length j String id archive j get Identifier if id ends With jar NON NLS 1 the non plugin archive is a jar Unpack it into a directory constructed using the archive id try final String prefix id substring 0 id length 4 NON NLS 1 Jar Content Reference jar Ref new Jar Content Reference archive j as File NON NLS 1 Content Selector selector new Content Selector public String define Identifier Jar Entry entry if entry null return null else return prefix entry get Name Content Reference entries jar Ref peek selector this monitor for int k 0 k entries length k non Plugin Consumer store entries k this monitor catch IO Exception e throw Utilities new Core Exception Policy bind Jar Verification Service Cancel Install id NON NLS 1 e else the non plugin archive is not a jar Install it asis non Plugin Consumer store archive j this monitor non Plugin Consumer close  completeInstall IFeatureContentConsumer CoreException nonPluginEntries nonPluginEntries IFeatureContentProvider getFeatureContentProvider nonPluginEntries ContentReference getNonPluginEntryArchiveReferences nonPluginEntries IContentConsumer nonPluginConsumer nonPluginEntries getIdentifier endsWith JarContentReference jarRef JarContentReference asFile ContentSelector ContentSelector defineIdentifier JarEntry getName ContentReference jarRef nonPluginConsumer IOException newCoreException JarVerificationService CancelInstall nonPluginConsumer nonPluginConsumer
private void prompt For Verification I Verification Result verification Result I Verification Listener listener throws Core Exception if listener null return int result listener prompt verification Result if result I Verification Listener CHOICE ABORT Exception e verification Result get Verification Exception throw new Install Aborted Exception Policy bind Jar Verification Service Cancel Install e NON NLS 1 if result I Verification Listener CHOICE ERROR throw Utilities new Core Exception Policy bind Jar Verification Service Unsucessful Verification NON NLS 1 verification Result get Verification Exception return  promptForVerification IVerificationResult verificationResult IVerificationListener CoreException verificationResult IVerificationListener CHOICE_ABORT verificationResult getVerificationException InstallAbortedException JarVerificationService CancelInstall IVerificationListener CHOICE_ERROR newCoreException JarVerificationService UnsucessfulVerification verificationResult getVerificationException

public void complete Install I Feature Content Consumer consumer throws Core Exception try if plugin Entries null return if feature is Patch Get the old feature I Feature old Features Update Utils get Installed Features feature if old Features length 0 return old Feature old Features 0 else old Feature Update Utils get Patched Feature feature if old Feature null return I Plugin Entry old Plugins old Feature get Plugin Entries for int i 0 i plugin Entries length i I Plugin Entry new Plugin plugin Entries i I Plugin Entry old Plugin get Plugin Entry old Plugins new Plugin get Versioned Identifier get Identifier if old Plugin null continue try overlay Plugin old Plugin new Plugin consumer catch IO Exception e throw new Core Exception new Status Status ERROR Update Utils get Plugin Id 1 NON NLS 1 e finally if content Consumer null content Consumer close  completeInstall IFeatureContentConsumer CoreException pluginEntries isPatch IFeature oldFeatures UpdateUtils getInstalledFeatures oldFeatures oldFeature oldFeatures oldFeature UpdateUtils getPatchedFeature oldFeature IPluginEntry oldPlugins oldFeature getPluginEntries pluginEntries IPluginEntry newPlugin pluginEntries IPluginEntry oldPlugin getPluginEntry oldPlugins newPlugin getVersionedIdentifier getIdentifier oldPlugin overlayPlugin oldPlugin newPlugin IOException CoreException UpdateUtils getPluginId contentConsumer contentConsumer
protected I Plugin Entry get Plugin Entry I Plugin Entry plugins String id for int i 0 i plugins length i if plugins i get Versioned Identifier get Identifier equals id return plugins i return null  IPluginEntry getPluginEntry IPluginEntry getVersionedIdentifier getIdentifier
protected boolean reference Exists Content Reference references Content Reference ref String id ref get Identifier if id null return false for int i 0 i references length i if id equals references i get Identifier return true return false  referenceExists ContentReference ContentReference getIdentifier getIdentifier
protected void overlay Plugin I Plugin Entry old Plugin I Plugin Entry new Plugin I Feature Content Consumer consumer throws Core Exception IO Exception if new Plugin instanceof Plugin Entry Plugin Entry new Plugin is Unpack partial plug ins in patches must always be unpacked return copy the content of the old plugin over the new one but only those files that do not exist on the target Content Reference old References old Feature get Feature Content Provider get Plugin Entry Content References old Plugin null Content Reference new References feature get Feature Content Provider get Plugin Entry Content References new Plugin null URL newURL new URL consumer get Feature get Site getURL Site DEFAULT PLUGIN PATH new Plugin get Versioned Identifier to String String plugin Path newURL get File for int i 0 i old References length i if is Plugin Manifest old References i reference Exists new References old References i continue Input Stream input null try input old References i get Input Stream File target File new File plugin Path old References i get Identifier Update Manager Utils copy To Local input target File get Absolute Path null Update Manager Utils check Permissions old References i plugin Path 20305 catch IO Exception e continue finally if input null try input close catch IO Exception ioe  overlayPlugin IPluginEntry oldPlugin IPluginEntry newPlugin IFeatureContentConsumer CoreException IOException newPlugin PluginEntry PluginEntry newPlugin isUnpack ContentReference oldReferences oldFeature getFeatureContentProvider getPluginEntryContentReferences oldPlugin ContentReference newReferences getFeatureContentProvider getPluginEntryContentReferences newPlugin getFeature getSite DEFAULT_PLUGIN_PATH newPlugin getVersionedIdentifier toString pluginPath getFile oldReferences isPluginManifest oldReferences referenceExists newReferences oldReferences InputStream oldReferences getInputStream targetFile pluginPath oldReferences getIdentifier UpdateManagerUtils copyToLocal targetFile getAbsolutePath UpdateManagerUtils checkPermissions oldReferences pluginPath IOException IOException
protected boolean is Plugin Manifest Content Reference ref String id ref get Identifier return PLUGIN XML equals id FRAGMENT XML equals id META MANIFEST equals id  isPluginManifest ContentReference getIdentifier PLUGIN_XML FRAGMENT_XML META_MANIFEST

Constructor for Error Recovery Log private Error Recovery Log super  ErrorRecoveryLog ErrorRecoveryLog
Singleton public static Error Recovery Log get Log if inst null inst new Error Recovery Log return inst  ErrorRecoveryLog getLog ErrorRecoveryLog
get a unique identifer for the file ensure uniqueness up to now public static String get Local Random Identifier String path if path null return null verify if it will be a directory without creating the file as it doesn t exist yet if path ends With File separator path ends With NON NLS 1 return path File file new File path String new Name Update Manager Utils get Local Random Identifier file get Name new Date while new File new Name exists new Name Update Manager Utils get Local Random Identifier file get Name new Date File new File new File file get Parent File new Name return new File get Absolute Path  getLocalRandomIdentifier endsWith endsWith newName UpdateManagerUtils getLocalRandomIdentifier getName newName newName UpdateManagerUtils getLocalRandomIdentifier getName newFile getParentFile newName newFile getAbsolutePath
returns the log file We do not check if the file exists public File get Recovery Log File I Platform Configuration configuration Configurator Utils get Current Platform Configuration URL location configuration get Configuration Location String location String location get File File platform Configuration new File location String if platform Configuration is Directory platform Configuration platform Configuration get Parent File return new File platform Configuration ERROR RECOVERY LOG  getRecoveryLogFile IPlatformConfiguration ConfiguratorUtils getCurrentPlatformConfiguration getConfigurationLocation locationString getFile platformConfiguration locationString platformConfiguration isDirectory platformConfiguration platformConfiguration getParentFile platformConfiguration ERROR_RECOVERY_LOG
Open the log public void open String log Entry throws Core Exception if open nb Of Open Update Core warn Open nested Error Recovery log nb Of Open log Entry NON NLS 1 NON NLS 2 return File log File null try log File get Recovery Log File out new File Writer log File index 0 paths null open true nb Of Open 0 Update Core warn Start new Error Recovery log nb Of Open log Entry NON NLS 1 NON NLS 2 catch IO Exception e throw Utilities new Core Exception Policy bind Update Manager Utils Unable To Log new Object log File NON NLS 1 e append log Entry  logEntry CoreException nbOfOpen UpdateCore nbOfOpen logEntry logFile logFile getRecoveryLogFile FileWriter logFile nbOfOpen UpdateCore nbOfOpen logEntry IOException newCoreException UpdateManagerUtils UnableToLog logFile logEntry
Append the string to the log and flush public void append String log Entry throws Core Exception File log File null try if open Update Core warn Internal Error The Error Recovery log is not open log Entry NON NLS 1 return String Buffer buffer new String Buffer LOG ENTRY KEY buffer append index buffer append NON NLS 1 buffer append log Entry buffer append RETURN CARRIAGE out write buffer to String out flush index catch IO Exception e throw Utilities new Core Exception Policy bind Update Manager Utils Unable To Log new Object log File NON NLS 1 e  logEntry CoreException logFile UpdateCore logEntry StringBuffer StringBuffer LOG_ENTRY_KEY logEntry RETURN_CARRIAGE toString IOException newCoreException UpdateManagerUtils UnableToLog logFile
Append the string to the log and flush public void append Path String log Entry String path throws Core Exception if path null return String Buffer buffer new String Buffer log Entry buffer append NON NLS 1 buffer append path append buffer to String add Path path  appendPath logEntry CoreException StringBuffer StringBuffer logEntry toString addPath
Close any open recovery log public void close String log Entry throws Core Exception if nb Of Open 0 Update Core warn Close nested Error Recovery log nb Of Open log Entry NON NLS 1 NON NLS 2 nb Of Open return Update Core warn Close Error Recovery log nb Of Open log Entry NON NLS 1 NON NLS 2 append log Entry if out null try out write END OF FILE out flush out close catch IO Exception e eat the exception finally out null open false  logEntry CoreException nbOfOpen UpdateCore nbOfOpen logEntry nbOfOpen UpdateCore nbOfOpen logEntry logEntry END_OF_FILE IOException
Delete the file from the file system public void delete File log File get Recovery Log File get Recovery Log File if log File exists log File delete  logFile getRecoveryLogFile getRecoveryLogFile logFile logFile
private void add Path String path if paths null paths new Array List paths add path  addPath ArrayList
recover an install or remove that didn t finish Delete file for an unfinished delete Delete file for an unfinshed install if not all the files were installed Rename XML files for an install if all the files were installed but not renamed public I Status recover I Status main Status create Status I Status OK Policy bind Error Recovery Log recovering Status null NON NLS 1 Multi Status multi new Multi Status main Status get Plugin main Status get Code main Status get Message null check if recovery is on if RECOVERY ON Update Core warn Recovering is turned off Abort recovery NON NLS 1 return multi File log File get Recovery Log File if log File exists multi add create Status I Status ERROR Policy bind Error Recovery Log cannot Find Log File log File null NON NLS 1 return multi Input Stream in null Properties prop null try in new File Input Stream log File prop new Properties prop load in catch IO Exception e Update Core warn Unable to read log File e NON NLS 1 multi add create Status I Status ERROR Policy bind Error Recovery Log no Property File log File e NON NLS 1 return multi finally if in null try in close catch IO Exception e1 String eof prop get Property eof NON NLS 1 if eof null eof equals eof NON NLS 1 all is good delete Update Core warn Found log file Log file contains end of file No need to process NON NLS 1 multi add create Status I Status OK null null return multi String recovery prop get Property LOG ENTRY KEY 0 NON NLS 1 if recovery null multi add create Status I Status ERROR Policy bind Error Recovery Log no Log Entry log File null NON NLS 1 return multi if recovery equals Ignore Case START INSTALL LOG multi add All process Recover Install prop return multi if recovery equals Ignore Case START REMOVE LOG multi add All process Recover Remove prop return multi multi add create Status I Status ERROR Policy bind Error Recovery Log no Recovery To Execute log File null NON NLS 1 return multi  IStatus IStatus mainStatus createStatus IStatus ErrorRecoveryLog recoveringStatus MultiStatus MultiStatus mainStatus getPlugin mainStatus getCode mainStatus getMessage RECOVERY_ON UpdateCore logFile getRecoveryLogFile logFile createStatus IStatus ErrorRecoveryLog cannotFindLogFile logFile InputStream FileInputStream logFile IOException UpdateCore logFile createStatus IStatus ErrorRecoveryLog noPropertyFile logFile IOException getProperty UpdateCore createStatus IStatus getProperty LOG_ENTRY_KEY createStatus IStatus ErrorRecoveryLog noLogEntry logFile equalsIgnoreCase START_INSTALL_LOG addAll processRecoverInstall equalsIgnoreCase START_REMOVE_LOG addAll processRecoverRemove createStatus IStatus ErrorRecoveryLog noRecoveryToExecute logFile
private I Status create Status int status Severity String msg Exception e String id Update Core get Plugin get Bundle get Symbolic Name String Buffer complete String new String Buffer NON NLS 1 if msg null complete String append msg if e null complete String append r n NON NLS 1 complete String append e to String complete String append r n NON NLS 1 return new Status status Severity id I Status OK complete String to String e  IStatus createStatus statusSeverity UpdateCore getPlugin getBundle getSymbolicName StringBuffer completeString StringBuffer completeString completeString completeString toString completeString statusSeverity IStatus completeString toString
private I Status process Recover Install Properties prop I Status main Status create Status I Status OK null NON NLS 1 Multi Status multi new Multi Status main Status get Plugin main Status get Code null NON NLS 1 Collection values prop values if values contains END INSTALL LOG all is good delete Update Core warn Found log file Log file contains END INSTALL LOG No need to process rename NON NLS 1 multi add create Status I Status OK null null return multi if values contains ALL INSTALLED force Remove finish install by renaming int index 0 boolean found false String val prop get Property LOG ENTRY KEY index while val null found if val equals Ignore Case ALL INSTALLED found true I Status rename Status process Rename val Update Core log rename Status if rename Status get Severity I Status OK multi add rename Status index val prop get Property LOG ENTRY KEY index if val null Update Core warn Unable to find value for LOG ENTRY KEY index NON NLS 1 multi add create Status I Status ERROR Policy bind Error Recovery Log wrong Log File LOG ENTRY KEY index null NON NLS 1 return multi process recovery finished delete Update Core warn Found log file Successfully recovered by renaming Feature is installed NON NLS 1 multi add create Status I Status OK null null else remove all because install did not lay out all the files or recovery is not allowed int index 0 String val prop get Property LOG ENTRY KEY index while val null I Status remove Status process Remove val Update Core log remove Status if remove Status get Severity I Status OK multi add All remove Status index val prop get Property LOG ENTRY KEY index process recovery finished delete Update Core warn Found log file Successfully recovered by removing Feature is removed NON NLS 1 multi add create Status I Status OK null null return multi  IStatus processRecoverInstall IStatus mainStatus createStatus IStatus MultiStatus MultiStatus mainStatus getPlugin mainStatus getCode END_INSTALL_LOG UpdateCore END_INSTALL_LOG createStatus IStatus ALL_INSTALLED forceRemove getProperty LOG_ENTRY_KEY equalsIgnoreCase ALL_INSTALLED IStatus renameStatus processRename UpdateCore renameStatus renameStatus getSeverity IStatus renameStatus getProperty LOG_ENTRY_KEY UpdateCore LOG_ENTRY_KEY createStatus IStatus ErrorRecoveryLog wrongLogFile LOG_ENTRY_KEY UpdateCore createStatus IStatus getProperty LOG_ENTRY_KEY IStatus removeStatus processRemove UpdateCore removeStatus removeStatus getSeverity IStatus addAll removeStatus getProperty LOG_ENTRY_KEY UpdateCore createStatus IStatus
private I Status process Rename String val get the path int index 1 String new File Name null if val starts With PLUGIN ENTRY index PLUGIN ENTRY length new File Name plugin xml NON NLS 1 else if val starts With BUNDLE MANIFEST ENTRY index BUNDLE MANIFEST ENTRY length new File Name META INF MANIFEST MF NON NLS 1 else if val starts With FRAGMENT ENTRY index FRAGMENT ENTRY length new File Name fragment xml NON NLS 1 else if val starts With FEATURE ENTRY index FEATURE ENTRY length new File Name feature xml NON NLS 1 else if val starts With BUNDLE JAR ENTRY index BUNDLE JAR ENTRY length if index 1 return create Status I Status ERROR Policy bind Error Recovery Log no Action val null NON NLS 1 String old Name val substring index 1 oldname is com pid plugin xml or oldname is com pid pid pver jar tmp File old File new File old Name File new File if val starts With BUNDLE JAR ENTRY new File new File old File get Absolute Path substring 0 old File get Absolute Path last Index Of jar jar length NON NLS 1 NON NLS 2 else new File new File old File get Parent File new File Name if old File exists if new File exists ok the file has been renamed apparently return create Status I Status OK Policy bind Error Recovery Log file Already Renamed new File null NON NLS 1 else the file doesn t exist log as problem and force the removal of the feature return create Status I Status ERROR Policy bind Error Recovery Log cannot Find File old File null NON NLS 1 boolean sucess false if new File exists Update Manager Utils remove From File System new File Update Core warn Removing already existing file new File NON NLS 1 sucess old File rename To new File if sucess String msg Policy bind Error Recovery Log old To New old File new File NON NLS 1 return create Status I Status ERROR msg null return create Status I Status OK Policy bind Error Recovery Log renamed old File Policy bind Error Recovery Log to new File null NON NLS 1 NON NLS 2  IStatus processRename newFileName startsWith PLUGIN_ENTRY PLUGIN_ENTRY newFileName startsWith BUNDLE_MANIFEST_ENTRY BUNDLE_MANIFEST_ENTRY newFileName startsWith FRAGMENT_ENTRY FRAGMENT_ENTRY newFileName startsWith FEATURE_ENTRY FEATURE_ENTRY newFileName startsWith BUNDLE_JAR_ENTRY BUNDLE_JAR_ENTRY createStatus IStatus ErrorRecoveryLog noAction oldName pid_pver oldFile oldName newFile startsWith BUNDLE_JAR_ENTRY newFile oldFile getAbsolutePath oldFile getAbsolutePath lastIndexOf newFile oldFile getParentFile newFileName oldFile newFile createStatus IStatus ErrorRecoveryLog fileAlreadyRenamed newFile createStatus IStatus ErrorRecoveryLog cannotFindFile oldFile newFile UpdateManagerUtils removeFromFileSystem newFile UpdateCore newFile oldFile renameTo newFile ErrorRecoveryLog oldToNew oldFile newFile createStatus IStatus createStatus IStatus ErrorRecoveryLog oldFile ErrorRecoveryLog newFile
private I Status process Remove String val I Status main Status create Status I Status OK null NON NLS 1 Multi Status multi new Multi Status main Status get Plugin main Status get Code null NON NLS 1 get the path int index 1 if val starts With BUNDLE JAR ENTRY index BUNDLE JAR ENTRY length if index 1 return create Status I Status ERROR Policy bind Error Recovery Log no Action val null NON NLS 1 String old Name val substring index 1 File old File new File old Name if old File exists the jar or directory doesn t exist log as problem and force the removal of the feature multi add create Status I Status ERROR Policy bind Error Recovery Log cannot Find File old File null NON NLS 1 return multi multi add All remove From File System old File return multi  IStatus processRemove IStatus mainStatus createStatus IStatus MultiStatus MultiStatus mainStatus getPlugin mainStatus getCode startsWith BUNDLE_JAR_ENTRY BUNDLE_JAR_ENTRY createStatus IStatus ErrorRecoveryLog noAction oldName oldFile oldName oldFile createStatus IStatus ErrorRecoveryLog cannotFindFile oldFile addAll removeFromFileSystem oldFile
return a multi status the children are the file that couldn t be removed public I Status remove From File System File file I Status main Status create Status I Status OK null NON NLS 1 Multi Status multi new Multi Status main Status get Plugin main Status get Code null NON NLS 1 if file exists multi add create Status I Status ERROR Policy bind Error Recovery Log no Fileto Remove file null NON NLS 1 return multi if file is Directory String files file list if files null be careful since file list can return null for int i 0 i files length i multi add All remove From File System new File file files i if file delete String msg Unable to remove file file get Absolute Path NON NLS 1 multi add create Status I Status ERROR msg null return multi  IStatus removeFromFileSystem IStatus mainStatus createStatus IStatus MultiStatus MultiStatus mainStatus getPlugin mainStatus getCode createStatus IStatus ErrorRecoveryLog noFiletoRemove isDirectory addAll removeFromFileSystem getAbsolutePath createStatus IStatus
private I Status process Recover Remove Properties prop I Status main Status create Status I Status OK null NON NLS 1 Multi Status multi new Multi Status main Status get Plugin main Status get Code null NON NLS 1 Collection values prop values if values contains END REMOVE LOG all is good delete Update Core warn Found log file Log file contains END REMOVE LOG No need to process rename NON NLS 1 multi add create Status I Status OK null null return multi if values contains END ABOUT REMOVE finish install by renaming multi add create Status I Status ERROR Policy bind Error Recovery Log remove Feature null NON NLS 1 return multi else finish install by renaming int index 0 boolean found false String val prop get Property LOG ENTRY KEY index while val null found if val equals Ignore Case END ABOUT REMOVE found true I Status rename Status process Remove val Update Core log rename Status if rename Status get Severity I Status OK multi add rename Status index val prop get Property LOG ENTRY KEY index if val null Update Core warn Unable to find value for LOG ENTRY KEY index NON NLS 1 multi add create Status I Status ERROR Policy bind Error Recovery Log wrong Log File LOG ENTRY KEY index null NON NLS 1 return multi process recovery finished delete Update Core warn Found log file Successfully recovered by deleting Feature is removed NON NLS 1 multi add create Status I Status OK null null return multi  IStatus processRecoverRemove IStatus mainStatus createStatus IStatus MultiStatus MultiStatus mainStatus getPlugin mainStatus getCode END_REMOVE_LOG UpdateCore END_REMOVE_LOG createStatus IStatus END_ABOUT_REMOVE createStatus IStatus ErrorRecoveryLog removeFeature getProperty LOG_ENTRY_KEY equalsIgnoreCase END_ABOUT_REMOVE IStatus renameStatus processRemove UpdateCore renameStatus renameStatus getSeverity IStatus renameStatus getProperty LOG_ENTRY_KEY UpdateCore LOG_ENTRY_KEY createStatus IStatus ErrorRecoveryLog wrongLogFile LOG_ENTRY_KEY UpdateCore createStatus IStatus

public class Feature Download Exception extends Core Exception Construct the exception indicating enclosing Core Exception since 3 0 public Feature Download Exception String msg Exception e super new Status I Status INFO org eclipse update core NON NLS 1 I Status OK msg e  FeatureDownloadException CoreException CoreException FeatureDownloadException IStatus IStatus

Content Consumer Implementation for a Feature Executable  ContentConsumer FeatureExecutable
public class Feature Executable Content Consumer extends Feature Content Consumer  FeatureExecutableContentConsumer FeatureContentConsumer
private boolean aborted false private I Site Content Consumer content Consumer private I Feature Content Consumer parent null  ISiteContentConsumer contentConsumer IFeatureContentConsumer
see I Content Consumer open I Non Plugin Entry  IContentConsumer INonPluginEntry
Content Consumer cons new Non Plugin Entry Content Consumer get Content Consumer open non Plugin Entry return cons see I Content Consumer open I Plugin Entry public I Content Consumer open I Plugin Entry plugin Entry throws Core Exception Content Consumer cons new Plugin Entry Content Consumer get Content Consumer open plugin Entry return cons  ContentConsumer NonPluginEntryContentConsumer getContentConsumer nonPluginEntry IContentConsumer IPluginEntry IContentConsumer IPluginEntry pluginEntry CoreException ContentConsumer PluginEntryContentConsumer getContentConsumer pluginEntry
see I Content Consumer add Child I Feature  IContentConsumer addChild IFeature
I Feature Content Consumer child Consumer child get Feature Content Consumer child Consumer set Parent this if children null children new Array List  IFeatureContentConsumer childConsumer getFeatureContentConsumer childConsumer setParent ArrayList
see I Feature Content Consumer store Content Reference I Progress Monitor  IFeatureContentConsumer ContentReference IProgressMonitor
get Content Consumer store content Reference monitor see I Feature Content Consumer close public I Feature Reference close throws Core Exception if closed get Parent null closed true return null  getContentConsumer contentReference IFeatureContentConsumer IFeatureReference CoreException getParent
parent consumer log we are about to rename log files have been downloaded 
Error Recovery Log get Log append Error Recovery Log ALL INSTALLED  ErrorRecoveryLog getLog ErrorRecoveryLog ALL_INSTALLED
if content Consumer null ref content Consumer close  contentConsumer contentConsumer

import java net import java util 
import org eclipse update core Default implementation of a Executable Feature Content Provider public class Feature Executable Content Provider extends Feature Content Provider  FeatureExecutableContentProvider FeatureContentProvider
public Feature Executable Content Provider URL url super url Return the path for a plugin Entry  FeatureExecutableContentProvider pluginEntry
throws IO Exception Core Exception get the URL of the Archive file that contains the plugin entry I Site Content Provider provider get Feature get Site get Site Content Provider URL fileURL provider get Archive Reference get PathID plugin Entry String result fileURL get File if result ends With jar result ends With File separator NON NLS 1 result File separator File plugin Path new File result if plugin Path exists throw new IO Exception Policy bind Feature Executable Content Provider File Does Not Exist result NON NLS 1  IOException CoreException ISiteContentProvider getFeature getSite getSiteContentProvider getArchiveReference getPathID pluginEntry getFile endsWith endsWith pluginPath pluginPath IOException FeatureExecutableContentProvider FileDoesNotExist
return result 
Returns the path for the Feature private String get Feature Path throws IO Exception String result get Feature getURL get File return the list of all subdirectories if result ends With File separator result ends With NON NLS 1 result File separator  getFeaturePath IOException getFeature getFile endsWith endsWith
throw new IO Exception Policy bind Feature Executable Content Provider File Does Not Exist result NON NLS 1  IOException FeatureExecutableContentProvider FileDoesNotExist
Returns all the files under the directory Recursive call private List get Files File dir throws IO Exception List result new Array List if dir is Directory String msg Policy bind  getFiles IOException ArrayList isDirectory
throw new IO Exception msg File files dir list Files if files null for int i 0 i files length i if files i is Directory result add All get Files files i else result add files i return result  IOException listFiles isDirectory addAll getFiles
see I Feature Content Provider get Verifier  IFeatureContentProvider getVerifier
see I Feature Content Provider get Feature Manifest Reference public Content Reference get Feature Manifest Reference Install Monitor monitor throws Core Exception Content Reference result null try result new Content Reference Feature FEATURE XML new URL getURL Feature FEATURE XML  IFeatureContentProvider getFeatureManifestReference ContentReference getFeatureManifestReference InstallMonitor CoreException ContentReference ContentReference FEATURE_XML FEATURE_XML
throw Utilities new Core Exception Policy bind Feature Executable Content Provider Unable To CreateURL For NON NLS 1 getURL to External Form Feature FEATURE XML NON NLS 1 e return result see I Feature Content Provider get Archive References public Content Reference get Archive References Install Monitor monitor throws Core Exception executable feature does not contain archives return new Content Reference 0  newCoreException FeatureExecutableContentProvider UnableToCreateURLFor toExternalForm FEATURE_XML IFeatureContentProvider getArchiveReferences ContentReference getArchiveReferences InstallMonitor CoreException ContentReference

import org eclipse core runtime import org eclipse update core import org eclipse update core model Feature Factory for Executable Features public class Feature Executable Factory extends Base Feature Factory see I Feature Factory create Feature URL I Site I Progress Monitor public I Feature create Feature URL url I Site site I Progress Monitor monitor throws Core Exception Target Feature feature null Input Stream feature Stream null if monitor null monitor new Null Progress Monitor if url null return create Feature site  FeatureFactory FeatureExecutableFactory BaseFeatureFactory IFeatureFactory createFeature ISite IProgressMonitor IFeature createFeature ISite IProgressMonitor CoreException TargetFeature InputStream featureStream NullProgressMonitor createFeature
url validate url 
PERF Do not create Feature Content Consumer I Feature Content Consumer content Consumer new Feature Executable Content Consumer URL non ResolvedURL content Provider get Feature Manifest Reference null asURL URL resolvedURL URL Encoder encode non ResolvedURL feature Stream Update Core get Plugin get resolvedURL get Input Stream  FeatureContentConsumer IFeatureContentConsumer contentConsumer FeatureExecutableContentConsumer nonResolvedURL contentProvider getFeatureManifestReference URLEncoder nonResolvedURL featureStream UpdateCore getPlugin getInputStream
monitor worked 1 feature set Site site feature set Feature Content Provider content Provider PERF Feature Content Consumer feature set Content Consumer content Consumer feature resolve url url  setSite setFeatureContentProvider contentProvider FeatureContentConsumer setContentConsumer contentConsumer

import org eclipse core runtime import org eclipse update core import org eclipse update internal security 
Content Provider of a Feature Package 
private Content Reference local Manifest null private Content Reference local Feature Files new Content Reference 0 private I Verifier jar Verifier null  ContentReference localManifest ContentReference localFeatureFiles ContentReference IVerifier jarVerifier
public static final Filename Filter filter new Filename Filter public boolean accept File dir String name return name ends With Feature Packaged Content Provider JAR EXTENSION Constructor public Feature Packaged Content Provider URL url super url Returns a new verifier for each top level install if the verifier has a parent return the verifier  FilenameFilter FilenameFilter endsWith FeaturePackagedContentProvider JAR_EXTENSION FeaturePackagedContentProvider
public I Verifier get Verifier throws Core Exception if jar Verifier null jar Verifier get Parent null jar Verifier new Jar Verifier return jar Verifier re init will be done if the parent changes return jar Verifier see I Feature Content Provider get Feature Manifest Reference public Content Reference get Feature Manifest Reference Install Monitor monitor throws Core Exception  IVerifier getVerifier CoreException jarVerifier jarVerifier getParent jarVerifier JarVerifier jarVerifier jarVerifier IFeatureContentProvider getFeatureManifestReference ContentReference getFeatureManifestReference InstallMonitor CoreException
if local Manifest null return local Manifest Content Reference feature Archive Reference get Feature Entry Archive References monitor Jar Content Reference feature Jar Reference null try force feature archive to local This content provider always assumes exactly 1 archive file index 0 feature Jar Reference Jar Content Reference as Local Reference feature Archive Reference 0 null  localManifest localManifest ContentReference featureArchiveReference getFeatureEntryArchiveReferences JarContentReference featureJarReference featureJarReference JarContentReference asLocalReference featureArchiveReference
catch IO Exception e throw error Retrieving Feature FEATURE XML feature Jar Reference getURL e NON NLS 1 find the manifest in the unpacked feature files for int i 0 i local Feature Files length i if local Feature Files i get Identifier equals Feature FEATURE XML local Manifest local Feature Files i  IOException errorRetrieving FEATURE_XML featureJarReference localFeatureFiles localFeatureFiles getIdentifier FEATURE_XML localManifest localFeatureFiles
the manifest has not been found String values new String Feature FEATURE XML getURL to External Form throw Utilities new Core Exception Policy bind Feature Packaged Content Provider No Manifest File values new Exception NON NLS 1 see I Feature Content Provider get Archive References  FEATURE_XML toExternalForm newCoreException FeaturePackagedContentProvider NoManifestFile IFeatureContentProvider getArchiveReferences
I Plugin Entry entries get Feature get Plugin Entries I Non Plugin Entry non Entries get Feature get Non Plugin Entries List list All Content Ref new Array List Content Reference all Content Ref new Content Reference 0  IPluginEntry getFeature getPluginEntries INonPluginEntry nonEntries getFeature getNonPluginEntries listAllContentRef ArrayList ContentReference allContentRef ContentReference
list All Content Ref add All Arrays as List get Feature Entry Archive References monitor plugins for int i 0 i entries length i list All Content Ref add All Arrays as List get Plugin Entry Archive References entries i monitor non plugins for int i 0 i non Entries length i list All Content Ref add All Arrays as List get Non Plugin Entry Archive References non Entries i monitor transform List in Array  listAllContentRef addAll asList getFeatureEntryArchiveReferences listAllContentRef addAll asList getPluginEntryArchiveReferences nonEntries listAllContentRef addAll asList getNonPluginEntryArchiveReferences nonEntries
list All Content Ref to Array all Content Ref return all Content Ref see I Feature Content Provider get Feature Entry Archive References  listAllContentRef toArray allContentRef allContentRef IFeatureContentProvider getFeatureEntryArchiveReferences
1 jar file 1 feature we will return the JAR file Content Reference references new Content Reference 1  ContentReference ContentReference

import org eclipse core runtime import org eclipse update core import org eclipse update core model Factory for Feature Packaged public class Feature Packaged Factory extends Base Feature Factory see I Feature Factory create Feature URL I Site I Progress Monitor public I Feature create Feature URL url I Site site I Progress Monitor monitor throws Core Exception Feature feature null Input Stream feature Stream null if monitor null monitor new Null Progress Monitor monitor begin Task null 2 monitor worked 1 try I Feature Content Provider content Provider new Feature Packaged Content Provider url  FeaturePackagedFactory BaseFeatureFactory IFeatureFactory createFeature ISite IProgressMonitor IFeature createFeature ISite IProgressMonitor CoreException InputStream featureStream NullProgressMonitor beginTask IFeatureContentProvider contentProvider FeaturePackagedContentProvider

private I Plugin Entry plugin Entry private I Feature feature public Feature Plugin I Plugin Entry entry I Feature feature plugin Entry entry this feature feature  IPluginEntry pluginEntry IFeature FeaturePlugin IPluginEntry IFeature pluginEntry
this feature feature public I Plugin Entry get Entry return plugin Entry  IPluginEntry getEntry pluginEntry
return plugin Entry public I Feature get Feature return feature  pluginEntry IFeature getFeature
Plugins are equal if their I Ds and versions are the same public boolean equals Object o if o instanceof Feature Plugin Feature Plugin p Feature Plugin o return get Entry get Versioned Identifier equals p get Entry get Versioned Identifier return false  IDs FeaturePlugin FeaturePlugin FeaturePlugin getEntry getVersionedIdentifier getEntry getVersionedIdentifier
return false public int hash Code return get Entry get Versioned Identifier hash Code  hashCode getEntry getVersionedIdentifier hashCode
return get Entry get Versioned Identifier hash Code public String to String return plugin Entry in feature NON NLS 1  getEntry getVersionedIdentifier hashCode toString pluginEntry

import org eclipse update core 
Manages Feature Factory extension point public final class Feature Type Factory  FeatureFactory FeatureTypeFactory
private Map factories private static final String SIMPLE EXTENSION ID feature Types NON NLS 1  SIMPLE_EXTENSION_ID featureTypes
private Feature Type Factory Singleton pattern public static Feature Type Factory get Instance if inst null inst new Feature Type Factory  FeatureTypeFactory FeatureTypeFactory getInstance FeatureTypeFactory

private File file private long bytes public File Fragment File file long size this file file this bytes size  FileFragment
this bytes size public File get File return file  getFile
return file public long get Size return bytes  getSize

protected long last Modified public File Response URL url this url url  lastModified FileResponse
public Input Stream get Input Stream throws IO Exception return url open Stream  InputStream getInputStream IOException openStream
public Input Stream get Input Stream I Progress Monitor monitor throws IO Exception Core Exception return get Input Stream  InputStream getInputStream IProgressMonitor IOException CoreException getInputStream
public long get Content Length return 0  getContentLength
public int get Status Code return I Status Codes HTTP OK  getStatusCode IStatusCodes HTTP_OK
public String get Status Message return NON NLS 1  getStatusMessage
public long get Last Modified if last Modified 0 File f new File url get File if f is Directory f new File f site xml NON NLS 1 last Modified f last Modified return last Modified  getLastModified lastModified getFile isDirectory lastModified lastModified lastModified

public Fragment Entry String id String version String name String location this plugin Id id this plugin Version version this name name this location location  FragmentEntry pluginId pluginVersion
return the plugin translatable name public String get Name return name  getName
return the location of the plugin public String get Location return location  getLocation
Returns the plug in identifier for this entry return the plug in identifier or code null code public String get Plugin Identifier return plugin Id  getPluginIdentifier pluginId
Returns the plug in version for this entry return the plug in version or code null code public String get Plugin Version return plugin Version  getPluginVersion pluginVersion
see Object to String public String to String String msg get Plugin Identifier null get Plugin Identifier to String NON NLS 1 msg get Plugin Version null get Plugin Version to String NON NLS 1 NON NLS 2 return msg  toString toString getPluginIdentifier getPluginIdentifier toString getPluginVersion getPluginVersion toString

protected long offset public Http Response URL url this url url  HttpResponse
public Input Stream get Input Stream throws IO Exception if in null url null connection url open Connection if offset 0 connection set Request Property Range bytes offset NON NLS 1 NON NLS 2 NON NLS 3 in connection get Input Stream check Offset return in  InputStream getInputStream IOException openConnection setRequestProperty getInputStream checkOffset
see Response get Input Stream I Progress Monitor public Input Stream get Input Stream I Progress Monitor monitor throws IO Exception Core Exception if in null url null connection url open Connection if offset 0 connection set Request Property Range bytes offset NON NLS 1 NON NLS 2 NON NLS 3 if monitor null this in open Stream With Cancel HttpURL Connection connection monitor else this in connection get Input Stream this can also be run inside a monitoring thread but it is safe to just call it now if the input stream has already been obtained check Offset if in null this last Modified connection get Last Modified return in  getInputStream IProgressMonitor InputStream getInputStream IProgressMonitor IOException CoreException openConnection setRequestProperty openStreamWithCancel HttpURLConnection getInputStream checkOffset lastModified getLastModified
public long get Content Length if connection null return connection get Content Length return 0  getContentLength getContentLength
public int get Status Code if connection null try return HttpURL Connection connection get Response Code catch IO Exception e Update Core warn e NON NLS 1 return I Status Codes HTTP OK  getStatusCode HttpURLConnection getResponseCode IOException UpdateCore IStatusCodes HTTP_OK
public String get Status Message if connection null try return HttpURL Connection connection get Response Message catch IO Exception e Update Core warn e NON NLS 1 return NON NLS 1  getStatusMessage HttpURLConnection getResponseMessage IOException UpdateCore
public long get Last Modified if last Modified 0 if connection null try connection url open Connection catch IO Exception e if connection null last Modified connection get Last Modified return last Modified  getLastModified lastModified openConnection IOException lastModified getLastModified lastModified
private Input Stream open Stream With Cancel HttpURL Connection url Connection I Progress Monitor monitor throws IO Exception Core Exception Connection Thread Manager Stream Runnable runnable new Connection Thread Manager Stream Runnable url Connection Thread t Update Core get Plugin get Connection Manager create Thread runnable t start Input Stream is null try for if monitor is Canceled runnable disconnect break if runnable get Input Stream null is runnable get Input Stream break if runnable get Exception null if runnable get Exception instanceof IO Exception throw IO Exception runnable get Exception else throw new Core Exception new Status I Status ERROR Update Core get Plugin get Bundle get Symbolic Name I Status OK runnable get Exception get Message runnable get Exception t join POLLING INTERVAL catch Interrupted Exception e return is  InputStream openStreamWithCancel HttpURLConnection urlConnection IProgressMonitor IOException CoreException ConnectionThreadManager StreamRunnable ConnectionThreadManager StreamRunnable urlConnection UpdateCore getPlugin getConnectionManager createThread InputStream isCanceled getInputStream getInputStream getException getException IOException IOException getException CoreException IStatus UpdateCore getPlugin getBundle getSymbolicName IStatus getException getMessage getException POLLING_INTERVAL InterruptedException
return is public void set Offset long offset this offset offset  setOffset
private void check Offset throws IO Exception if offset 0 return String range connection get Header Field Content Range NON NLS 1 System out println Content Range range if range null System err println Server does not support ranges throw new IO Exception Policy bind Http Response range Expected NON NLS 1 else if range starts With bytes offset NON NLS 1 NON NLS 2 System err println Server returned wrong range throw new IO Exception Policy bind Http Response wrong Range NON NLS 1  checkOffset IOException getHeaderField IOException HttpResponse rangeExpected startsWith IOException HttpResponse wrongRange

import org eclipse update configurator import org eclipse update core 
import org eclipse update internal configurator import org eclipse update internal model 
Manages Configured Sites public class Install Configuration extends Install Configuration Model implements I Install Configuration private static boolean is Windows System get Property os name starts With Win NON NLS 1 NON NLS 2 private Listeners List listeners new Listeners List default constructor public Install Configuration  ConfiguredSites InstallConfiguration InstallConfigurationModel IInstallConfiguration isWindows getProperty startsWith ListenersList ListenersList InstallConfiguration
public Install Configuration I Install Configuration config throws MalformedURL Exception Core Exception this config null null  InstallConfiguration IInstallConfiguration MalformedURLException CoreException
copy constructor 
public Install Configuration I Install Configuration config URL new Location String label throws Core Exception MalformedURL Exception set current date and timeline as caller can call set Date if the date on the URL string has to be the same Date now new Date set Creation Date now set Current false if new Location null String new File Name Update Manager Utils get Local Random Identifier Site Local CONFIG FILE now new Location Update Manager Utils getURL Site Local Site Manager get Local Site get LocationURL new File Name null set LocationURL String new Location to External Form if label null label Utilities format now set Label label do not copy list of listeners nor activities make a copy of the site Configuration object if config null I Configured Site csites config get Configured Sites if csites null for int i 0 i csites length i Configured Site config Site new Configured Site csites i add Configuration Site Model config Site  InstallConfiguration IInstallConfiguration newLocation CoreException MalformedURLException setDate setCreationDate setCurrent newLocation newFileName UpdateManagerUtils getLocalRandomIdentifier SiteLocal CONFIG_FILE newLocation UpdateManagerUtils SiteLocal SiteManager getLocalSite getLocationURL newFileName setLocationURLString newLocation toExternalForm setLabel siteConfiguration IConfiguredSite getConfiguredSites ConfiguredSite configSite ConfiguredSite addConfigurationSiteModel configSite
resolve new Location null no need to parse file all data are initialized initialized true Returns the list of configured sites or an empty array public I Configured Site get Configured Sites Configured Site Model result get Configuration Sites Model if result length 0 return new I Configured Site 0 else return I Configured Site result Returns the default site policy private int get Default Policy return I Platform Configuration I Site Policy USER EXCLUDE  newLocation IConfiguredSite getConfiguredSites ConfiguredSiteModel getConfigurationSitesModel IConfiguredSite IConfiguredSite getDefaultPolicy IPlatformConfiguration ISitePolicy USER_EXCLUDE
Creates a Configuration Site and a new Site The policy is from code org eclipse core boot I Platform Configuration code public I Configured Site create Configured Site File file throws Core Exception if file get Name equals eclipse NON NLS 1 file new File file eclipse NON NLS 1  IPlatformConfiguration IConfiguredSite createConfiguredSite CoreException getName
if is Duplicate Site file throw Utilities new Core Exception Policy bind Install Configuration location exists file get Path null NON NLS 1 I Site site Internal Site Manager create Site file create a config site around the site even if the site null Base Site Local Factory factory new Base Site Local Factory Configured Site config Site Configured Site factory create Configuration Site Model Site Model site get Default Policy if config Site is Natively Linked  isDuplicateSite newCoreException InstallConfiguration getPath ISite InternalSiteManager createSite BaseSiteLocalFactory BaseSiteLocalFactory ConfiguredSite configSite ConfiguredSite createConfigurationSiteModel SiteModel getDefaultPolicy configSite isNativelyLinked
if config Site is Product Site  configSite isProductSite
if site null config Site set PlatformURL String site getURL to External Form obtain the list of plugins I Platform Configuration runtime Configuration Configurator Utils get Current Platform Configuration Configuration Policy configuration Policy config Site get Configuration Policy String plugin Path new String 0 if configuration Policy get Policy I Platform Configuration I Site Policy USER INCLUDE plugin Path configuration Policy get Plugin Path site  configSite setPlatformURLString toExternalForm IPlatformConfiguration runtimeConfiguration ConfiguratorUtils getCurrentPlatformConfiguration ConfigurationPolicy configurationPolicy configSite getConfigurationPolicy pluginPath configurationPolicy getPolicy IPlatformConfiguration ISitePolicy USER_INCLUDE pluginPath configurationPolicy getPluginPath
I Platform Configuration I Site Policy site Policy runtime Configuration create Site Policy configuration Policy get Policy plugin Path change runtime  IPlatformConfiguration ISitePolicy sitePolicy runtimeConfiguration createSitePolicy configurationPolicy getPolicy pluginPath
if the privatre marker doesn t already exist create it 
configure config Site return config Site  configSite configSite
Creates a Configuration Site and a new Site as a private link site The policy is from code org eclipse core boot I Platform Configuration code public I Configured Site create Linked Configured Site File file throws Core Exception return create Configured Site file if is Duplicate Site file throw Utilities new Core Exception Update Utils get Formatted Message Install Configuration location exists file get Path null I Site site Internal Site Manager create Site file create a config site around the site even if the site null Base Site Local Factory factory new Base Site Local Factory Configured Site config Site Configured Site factory create Configuration Site Model Site Model site get Default Policy if config Site is Extension Site String msg Policy bind Install Configuration Not An Extension Site throw Utilities new Core Exception msg null if config Site is Natively Linked throw Utilities new Core Exception Install Configuration Already Natively Linked null if site null config Site set PlatformURL String site getURL to External Form obtain the list of plugins I Platform Configuration runtime Configuration Configurator Utils get Current Platform Configuration Configuration Policy configuration Policy config Site get Configuration Policy String plugin Path new String 0 if configuration Policy get Policy I Platform Configuration I Site Policy USER INCLUDE plugin Path configuration Policy get Plugin Path site create new Site in configuration I Platform Configuration I Site Policy site Policy runtime Configuration create Site Policy configuration Policy get Policy plugin Path change runtime  IPlatformConfiguration IConfiguredSite createLinkedConfiguredSite CoreException createConfiguredSite isDuplicateSite newCoreException UpdateUtils getFormattedMessage InstallConfiguration getPath ISite InternalSiteManager createSite BaseSiteLocalFactory BaseSiteLocalFactory ConfiguredSite configSite ConfiguredSite createConfigurationSiteModel SiteModel getDefaultPolicy configSite isExtensionSite InstallConfiguration NotAnExtensionSite newCoreException configSite isNativelyLinked newCoreException InstallConfiguration AlreadyNativelyLinked configSite setPlatformURLString toExternalForm IPlatformConfiguration runtimeConfiguration ConfiguratorUtils getCurrentPlatformConfiguration ConfigurationPolicy configurationPolicy configSite getConfigurationPolicy pluginPath configurationPolicy getPolicy IPlatformConfiguration ISitePolicy USER_INCLUDE pluginPath configurationPolicy getPluginPath IPlatformConfiguration ISitePolicy sitePolicy runtimeConfiguration createSitePolicy configurationPolicy getPolicy pluginPath
configure all features as enable configure config Site return config Site Configure all features as Enable Check we only enable highest version private void configure Configured Site linked Site throws Core Exception I Site site linked Site get Site I Site Feature Reference new Features Ref site get Feature References for int i 0 i new Features Ref length i TRACE if Update Core DEBUG Update Core DEBUG SHOW RECONCILER  configSite configSite ConfiguredSite linkedSite CoreException ISite linkedSite getSite ISiteFeatureReference newFeaturesRef getFeatureReferences newFeaturesRef UpdateCore UpdateCore DEBUG_SHOW_RECONCILER
Configuration Policy policy linked Site get Configuration Policy policy configure new Features Ref i true false Site Reconciler check Configured Features linked Site public void add Configured Site I Configured Site site if is Current is Read Only return Configuration Activity activity new Configuration Activity I Activity ACTION SITE INSTALL activity set Label site get Site getURL to External Form activity set Date new Date Configured Site Model config Site Model Configured Site Model site add Configuration Site Model config Site Model config Site Model set Install Configuration Model this notify listeners Object configuration Listeners listeners get Listeners for int i 0 i configuration Listeners length i I Install Configuration Changed Listener listener I Install Configuration Changed Listener configuration Listeners i listener install Site Added site everything done ok activity set Status I Activity STATUS OK  ConfigurationPolicy linkedSite getConfigurationPolicy newFeaturesRef SiteReconciler checkConfiguredFeatures linkedSite addConfiguredSite IConfiguredSite isCurrent isReadOnly ConfigurationActivity ConfigurationActivity IActivity ACTION_SITE_INSTALL setLabel getSite toExternalForm setDate ConfiguredSiteModel configSiteModel ConfiguredSiteModel addConfigurationSiteModel configSiteModel configSiteModel setInstallConfigurationModel configurationListeners getListeners configurationListeners IInstallConfigurationChangedListener IInstallConfigurationChangedListener configurationListeners installSiteAdded setStatus IActivity STATUS_OK
Method add Activity param activity public void add Activity I Activity activity add Activity Model Configuration Activity Model activity  addActivity addActivity IActivity addActivityModel ConfigurationActivityModel
for int i 0 i configuration Listeners length i I Install Configuration Changed Listener listener I Install Configuration Changed Listener configuration Listeners i listener install Site Removed site activity Configuration Activity activity new Configuration Activity I Activity ACTION SITE REMOVE activity set Label site get Site getURL to External Form activity set Date new Date activity set Status I Activity STATUS OK this add Activity activity see I Install Configuration add Install Configuration Changed Listener I Install Configuration Changed Listener public void add Install Configuration Changed Listener I Install Configuration Changed Listener listener synchronized listeners listeners add listener see I Install Configuration remove Install Configuration Changed Listener I Install Configuration Changed Listener public void remove Install Configuration Changed Listener I Install Configuration Changed Listener listener  configurationListeners IInstallConfigurationChangedListener IInstallConfigurationChangedListener configurationListeners installSiteRemoved ConfigurationActivity ConfigurationActivity IActivity ACTION_SITE_REMOVE setLabel getSite toExternalForm setDate setStatus IActivity STATUS_OK addActivity IInstallConfiguration addInstallConfigurationChangedListener IInstallConfigurationChangedListener addInstallConfigurationChangedListener IInstallConfigurationChangedListener IInstallConfiguration removeInstallConfigurationChangedListener IInstallConfigurationChangedListener removeInstallConfigurationChangedListener IInstallConfigurationChangedListener
Deletes the configuration from its URL location public void remove save the configuration if file equals Ignore Case getURL get Protocol NON NLS 1 the location points to a file File file new File getURL get File Update Manager Utils remove From File System file Saves the configuration into its URL location and changes the platform configuration  equalsIgnoreCase getProtocol getFile UpdateManagerUtils removeFromFileSystem
public boolean save throws Core Exception Write info into platform for the next runtime I Platform Configuration runtime Configuration Configurator Utils get Current Platform Configuration Configured Site Model configuration Sites get Configuration Sites Model clean configured Entries from platform runtime I Platform Configuration I Feature Entry configured Feature Entries runtime Configuration get Configured Feature Entries for int i 0 i configured Feature Entries length i runtime Configuration unconfigure Feature Entry configured Feature Entries i 19958 remember sites currently configured by runtime use temp configuration object rather than a straight list to ensure correct lookup I Platform Configuration temp Config null try temp Config Configurator Utils get Platform Configuration null I Platform Configuration I Site Entry tmp Sites runtime Configuration get Configured Sites for int i 0 i tmp Sites length i temp Config configure Site tmp Sites i catch IO Exception e  CoreException IPlatformConfiguration runtimeConfiguration ConfiguratorUtils getCurrentPlatformConfiguration ConfiguredSiteModel configurationSites getConfigurationSitesModel IPlatformConfiguration IFeatureEntry configuredFeatureEntries runtimeConfiguration getConfiguredFeatureEntries configuredFeatureEntries runtimeConfiguration unconfigureFeatureEntry configuredFeatureEntries IPlatformConfiguration tempConfig tempConfig ConfiguratorUtils getPlatformConfiguration IPlatformConfiguration ISiteEntry tmpSites runtimeConfiguration getConfiguredSites tmpSites tempConfig configureSite tmpSites IOException
check sites check Sites configuration Sites runtime Configuration Save the plugin path primary feature and platform for int i 0 i configuration Sites length i Configured Site c Site Configured Site configuration Sites i Configuration Policy configuration Policy c Site get Configuration Policy save Plugin Path c Site runtime Configuration temp Config  checkSites configurationSites runtimeConfiguration configurationSites ConfiguredSite cSite ConfiguredSite configurationSites ConfigurationPolicy configurationPolicy cSite getConfigurationPolicy savePluginPath cSite runtimeConfiguration tempConfig
is part of platform base write it as platform base URL I Feature Reference configured Features Ref configuration Policy get Configured Features for int j 0 j configured Features Ref length j I Feature feature null  IFeatureReference configuredFeaturesRef configurationPolicy getConfiguredFeatures configuredFeaturesRef IFeature
try feature configured Features Ref j get Feature null catch Core Exception e Update Core warn null e save Feature Entry c Site feature runtime Configuration 19958 remove any extra site entries from runtime configuration site entries that no longer exist in this configuration if temp Config null I Platform Configuration I Site Entry tmp Sites temp Config get Configured Sites for int i 0 i tmp Sites length i runtime Configuration unconfigure Site tmp Sites i  configuredFeaturesRef getFeature CoreException UpdateCore saveFeatureEntry cSite runtimeConfiguration tempConfig IPlatformConfiguration ISiteEntry tmpSites tempConfig getConfiguredSites tmpSites runtimeConfiguration unconfigureSite tmpSites
try runtime Configuration save log configuration and activities this date new Date runtime Configuration get Change Stamp if file equals Ignore Case getURL get Protocol NON NLS 1  runtimeConfiguration runtimeConfiguration getChangeStamp equalsIgnoreCase getProtocol
return is Restart Needed runtime Configuration catch IO Exception e Core Exception exc Utilities new Core Exception Policy bind Install Configuration Unable To Save Platform Configuration runtime Configuration get Configuration Location to External Form e NON NLS 1 Update Core warn exc NON NLS 1 return true  isRestartNeeded runtimeConfiguration IOException CoreException newCoreException InstallConfiguration UnableToSavePlatformConfiguration runtimeConfiguration getConfigurationLocation toExternalForm UpdateCore
Write the plugin path for each site Do not check if the site already existed before 16696 Reuse any runtime site objects in platform cfg to preserve state 18520 private void save Plugin Path Configured Site c Site I Platform Configuration runtime Configuration I Platform Configuration temp Config 19958 throws Core Exception Configuration Policy configuration Policy c Site get Configuration Policy create a I Site Policy policy plugin Path for the site String plugin Path configuration Policy get Plugin Path c Site get Site I Platform Configuration I Site Policy site Policy runtime Configuration create Site Policy configuration Policy get Policy plugin Path get the URL of the site that matches the one platform cfg gave us URL url To Check null try url To Check new URL c Site get PlatformURL String catch MalformedURL Exception e throw Utilities new Core Exception Policy bind Install Configuration Unable To CreateURL c Site get PlatformURL String e NON NLS 1  savePluginPath ConfiguredSite cSite IPlatformConfiguration runtimeConfiguration IPlatformConfiguration tempConfig CoreException ConfigurationPolicy configurationPolicy cSite getConfigurationPolicy ISitePolicy pluginPath pluginPath configurationPolicy getPluginPath cSite getSite IPlatformConfiguration ISitePolicy sitePolicy runtimeConfiguration createSitePolicy configurationPolicy getPolicy pluginPath urlToCheck urlToCheck cSite getPlatformURLString MalformedURLException newCoreException InstallConfiguration UnableToCreateURL cSite getPlatformURLString
catch Class Cast Exception e throw Utilities new Core Exception Policy bind Install Configuration Unable To Cast e NON NLS 1  ClassCastException newCoreException InstallConfiguration UnableToCast
I Platform Configuration I Site Entry site Entry runtime Configuration find Configured Site url To Check if site Entry null site Entry runtime Configuration create Site Entry url To Check site Policy else site Entry set Site Policy site Policy Site Entry site Entry refresh Plugins  IPlatformConfiguration ISiteEntry siteEntry runtimeConfiguration findConfiguredSite urlToCheck siteEntry siteEntry runtimeConfiguration createSiteEntry urlToCheck sitePolicy siteEntry setSitePolicy sitePolicy SiteEntry siteEntry refreshPlugins

private static final String EXT POINT install Handlers NON NLS 1 private Install Handler Proxy  EXT_POINT installHandlers InstallHandlerProxy
public Install Handler Proxy int type I Feature feature I Install Handler Entry entry Install Monitor monitor throws Core Exception initialize type feature entry monitor  InstallHandlerProxy IFeature IInstallHandlerEntry InstallMonitor CoreException
public void initialize int type I Feature feature I Install Handler Entry entry Install Monitor monitor throws Core Exception DEBUG Update Core DEBUG SHOW IHANDLER validate arguments if feature null throw new Illegal Argument Exception this feature feature this type type check if we have a handler entry specified in the feature xml if entry null if DEBUG debug not specified NON NLS 1 return no handler entry String library entry get Library String handler Name entry get Handler Name if handler Name null handler Name trim equals NON NLS 1 if DEBUG debug not specified NON NLS 1 return no handler class spacified in entry if DEBUG debug handler handler Name NON NLS 1 debug path library NON NLS 1 get handler instance try if library null library trim equals NON NLS 1 this handler get Global Handler handler Name else this handler get Local Handler library handler Name if this handler null return handler initialize type feature entry monitor catch Class Not Found Exception e handle Exception In Init Policy bind Install Handler not Found feature get Label NON NLS 1 e catch Class Cast Exception e handle Exception In Init Policy bind Install Handler invalid Handler feature get Label NON NLS 1 e catch Core Exception e handle Exception In Init null e catch Exception e handle Exception In Init Policy bind Install Handler unable To Create Handler feature get Label NON NLS 1 e  IFeature IInstallHandlerEntry InstallMonitor CoreException UpdateCore DEBUG_SHOW_IHANDLER IllegalArgumentException getLibrary handlerName getHandlerName handlerName handlerName handlerName getGlobalHandler handlerName getLocalHandler handlerName ClassNotFoundException handleExceptionInInit InstallHandler notFound getLabel ClassCastException handleExceptionInInit InstallHandler invalidHandler getLabel CoreException handleExceptionInInit handleExceptionInInit InstallHandler unableToCreateHandler getLabel
public void install Initiated throws Core Exception if handler null return else try if DEBUG debug calling install Initiated NON NLS 1 handler install Initiated catch Throwable e handle Exception In Call e feature  installInitiated CoreException installInitiated installInitiated handleExceptionInCall
public void plugins Downloaded I Plugin Entry plugins throws Core Exception if handler null return else try if DEBUG debug calling plugins Downloaded NON NLS 1 handler plugins Downloaded plugins catch Throwable e handle Exception In Call e feature  pluginsDownloaded IPluginEntry CoreException pluginsDownloaded pluginsDownloaded handleExceptionInCall
public void complete Install I Feature Content Consumer consumer throws Core Exception if handler null return else try if DEBUG debug calling complete Install NON NLS 1 handler complete Install consumer catch Throwable e handle Exception In Call e feature  completeInstall IFeatureContentConsumer CoreException completeInstall completeInstall handleExceptionInCall
public void non Plugin Data Downloaded I Non Plugin Entry non Plugin Data I Verification Listener listener throws Core Exception if handler null return else try if DEBUG debug calling non Plugin Data Downloaded NON NLS 1 handler non Plugin Data Downloaded non Plugin Data listener catch Throwable e handle Exception In Call e feature  nonPluginDataDownloaded INonPluginEntry nonPluginData IVerificationListener CoreException nonPluginDataDownloaded nonPluginDataDownloaded nonPluginData handleExceptionInCall
public void install Completed boolean success throws Core Exception if handler null return else try if DEBUG debug calling install Completed NON NLS 1 handler install Completed success catch Throwable e handle Exception In Call e feature  installCompleted CoreException installCompleted installCompleted handleExceptionInCall
public void configure Initiated throws Core Exception if handler null return else try if DEBUG debug calling configure Initiated NON NLS 1 handler configure Initiated catch Throwable e handle Exception In Call e feature  configureInitiated CoreException configureInitiated configureInitiated handleExceptionInCall
public void complete Configure throws Core Exception if handler null return else try if DEBUG debug calling complete Configure NON NLS 1 handler complete Configure catch Throwable e handle Exception In Call e feature  completeConfigure CoreException completeConfigure completeConfigure handleExceptionInCall
public void configure Completed boolean success throws Core Exception if handler null return else try if DEBUG debug calling configure Completed NON NLS 1 handler configure Completed success catch Throwable e handle Exception In Call e feature  configureCompleted CoreException configureCompleted configureCompleted handleExceptionInCall
public void unconfigure Initiated throws Core Exception if handler null return else try if DEBUG debug calling unconfigure Initiated NON NLS 1 handler unconfigure Initiated catch Throwable e handle Exception In Call e feature  unconfigureInitiated CoreException unconfigureInitiated unconfigureInitiated handleExceptionInCall
public void complete Unconfigure throws Core Exception if handler null return else try if DEBUG debug calling complete Unconfigure NON NLS 1 handler complete Unconfigure catch Throwable e handle Exception In Call e feature  completeUnconfigure CoreException completeUnconfigure completeUnconfigure handleExceptionInCall
public void unconfigure Completed boolean success throws Core Exception if handler null if saved Status null return else throw new Core Exception saved Status delayed exception else try if DEBUG debug calling unconfigure Completed NON NLS 1 handler unconfigure Completed success catch Throwable e handle Exception In Call e feature if saved Status null throw new Core Exception saved Status delayed exception  unconfigureCompleted CoreException savedStatus CoreException savedStatus unconfigureCompleted unconfigureCompleted handleExceptionInCall savedStatus CoreException savedStatus
public void uninstall Initiated throws Core Exception if handler null return else try if DEBUG debug calling uninstall Initiated NON NLS 1 handler uninstall Initiated catch Throwable e handle Exception In Call e feature  uninstallInitiated CoreException uninstallInitiated uninstallInitiated handleExceptionInCall
public void complete Uninstall throws Core Exception if handler null return else try if DEBUG debug calling complete Uninstall NON NLS 1 handler complete Uninstall catch Throwable e handle Exception In Call e feature  completeUninstall CoreException completeUninstall completeUninstall handleExceptionInCall
public void uninstall Completed boolean success throws Core Exception if handler null if saved Status null return else throw new Core Exception saved Status delayed exception else try if DEBUG debug calling uninstall Completed NON NLS 1 handler uninstall Completed success catch Throwable e handle Exception In Call e feature if saved Status null throw new Core Exception saved Status delayed exception  uninstallCompleted CoreException savedStatus CoreException savedStatus uninstallCompleted uninstallCompleted handleExceptionInCall savedStatus CoreException savedStatus
private void handle Exception In Init String s Exception e throws Core Exception Core Exception ce if e instanceof Core Exception ce Core Exception e else ce Utilities new Core Exception s e if is Undo Action for undo operations deactivate handler and log error String id Update Core get Plugin get Bundle get Symbolic Name I Status status new Status I Status ERROR id 0 Install Handler deactivated ce NON NLS 1 Update Core get Plugin get Log log status handler null disable subsequent handler calls saved Status status else for do operations hurl throw ce  handleExceptionInInit CoreException CoreException CoreException CoreException newCoreException isUndoAction UpdateCore getPlugin getBundle getSymbolicName IStatus IStatus InstallHandler UpdateCore getPlugin getLog savedStatus
private void handle Exception In Call Throwable e I Feature feature throws Core Exception Core Exception ce if e instanceof Core Exception ce Core Exception e else ce Utilities new Core Exception Policy bind Install Handler call Exception feature get Label NON NLS 1 e if is Undo Action for undo operations deactivate handler and log error String id Update Core get Plugin get Bundle get Symbolic Name I Status status new Status I Status ERROR id 0 Install Handler deactivated ce NON NLS 1 Update Core get Plugin get Log log status handler null disable subsequent handler calls saved Status status else for do operations hurl throw ce  handleExceptionInCall IFeature CoreException CoreException CoreException CoreException newCoreException InstallHandler callException getLabel isUndoAction UpdateCore getPlugin getBundle getSymbolicName IStatus IStatus InstallHandler UpdateCore getPlugin getLog savedStatus
private boolean is Undo Action if this type I Install Handler HANDLER ACTION INSTALL this type I Install Handler HANDLER ACTION CONFIGURE return false causes exception to be thrown and action aborted else return true causes exception to be logged and action continues  isUndoAction IInstallHandler HANDLER_ACTION_INSTALL IInstallHandler HANDLER_ACTION_CONFIGURE
private I Install Handler get Local Handler String lib String name throws Exception Get baseline URL for handler relative to feature xml For features being installed from a server eg http protocol the URL will most likely be to a local file copy containing the unpacked feature jar Content Reference base Ref feature get Feature Content Provider get Feature Manifest Reference null URL base null if base Ref null base base Ref asURL if base null throw Utilities new Core Exception Policy bind Install Handler unable To Create Handler this feature get Label NON NLS 1 null determine loader class path URL cp new URL base lib if this type I Install Handler HANDLER ACTION UNINSTALL check if we are doing uninstall need to make temp copy of library being removed File temp Lib File create Temp File tmp jar NON NLS 1 NON NLS 2 temp Lib delete On Exit File Output Stream fos null Input Stream is null try fos new File Output Stream temp Lib is Update Core get Plugin get cp get Input Stream Utilities copy is fos null finally if fos null try fos close catch Exception e if is null try is close catch Exception e cp temp Lib toURL create class loader load and instantiate handler URL Class Loader loader new URL Class Loader new URL cp this get Class get Class Loader Class clazz loader load Class name I Install Handler handler I Install Handler clazz new Instance return handler  IInstallHandler getLocalHandler ContentReference baseRef getFeatureContentProvider getFeatureManifestReference baseRef baseRef newCoreException InstallHandler unableToCreateHandler getLabel IInstallHandler HANDLER_ACTION_UNINSTALL tempLib createTempFile tempLib deleteOnExit FileOutputStream InputStream FileOutputStream tempLib UpdateCore getPlugin getInputStream tempLib URLClassLoader URLClassLoader getClass getClassLoader loadClass IInstallHandler IInstallHandler newInstance
private I Install Handler get Global Handler String name throws Exception I Extension Registry reg Platform get Extension Registry I Configuration Element handler Extension reg get Configuration Elements For EXT PLUGIN EXT POINT name if handler Extension null handler Extension length 0 throw Utilities new Core Exception Policy bind Install Handler unable To Create Handler this feature get Label NON NLS 1 null return I Install Handler handler Extension 0 create Executable Extension class NON NLS 1  IInstallHandler getGlobalHandler IExtensionRegistry getExtensionRegistry IConfigurationElement handlerExtension getConfigurationElementsFor EXT_PLUGIN EXT_POINT handlerExtension handlerExtension newCoreException InstallHandler unableToCreateHandler getLabel IInstallHandler handlerExtension createExecutableExtension
private void debug String s String pfx feature null feature get Versioned Identifier to String NON NLS 1 System out println Install Handler pfx s NON NLS 1 NON NLS 2  getVersionedIdentifier toString InstallHandler

comparator new Comparator public int compare Object e1 Object e2 Date date1 Install Configuration e1 get Creation Date Date date2 Install Configuration e2 get Creation Date return date1 before date2 1 1  InstallConfiguration getCreationDate InstallConfiguration getCreationDate
public Install Log Parser String loc Configurator Utils get Current Platform Configuration get Configuration Location get File log Path new Path loc remove Last Segments 1 append install log NON NLS 1 install Config Map new Hash Map try Install Configuration configs Install Configuration Site Manager get Local Site get Configuration History for int i 0 i configs length i if configs i is Current install Config Map put new Long configs i get Creation Date get Time configs i Need to make a copy of the current config instead Install Configuration config get Config Copy Install Configuration Site Manager get Local Site get Current Configuration install Config Map put new Long config get Creation Date get Time config catch Core Exception e Update Core log e catch MalformedURL Exception e Update Core log e comparator new Comparator public int compare Object e1 Object e2 Date date1 Install Configuration e1 get Creation Date Date date2 Install Configuration e2 get Creation Date return date1 before date2 1 1  InstallLogParser ConfiguratorUtils getCurrentPlatformConfiguration getConfigurationLocation getFile logPath removeLastSegments installConfigMap HashMap InstallConfiguration InstallConfiguration SiteManager getLocalSite getConfigurationHistory isCurrent installConfigMap getCreationDate getTime InstallConfiguration getConfigCopy InstallConfiguration SiteManager getLocalSite getCurrentConfiguration installConfigMap getCreationDate getTime CoreException UpdateCore MalformedURLException UpdateCore InstallConfiguration getCreationDate InstallConfiguration getCreationDate
private Install Configuration get Config Copy Install Configuration orig Config throws Core Exception MalformedURL Exception Install Configuration config new Install Configuration orig Config orig Config getURL orig Config get Label config set Creation Date orig Config get Creation Date return config  InstallConfiguration getConfigCopy InstallConfiguration origConfig CoreException MalformedURLException InstallConfiguration InstallConfiguration origConfig origConfig origConfig getLabel setCreationDate origConfig getCreationDate
public void parse Installation Log try open Log parse Log catch Core Exception e Update Utils log Exception e finally close Log  parseInstallationLog openLog parseLog CoreException UpdateUtils logException closeLog
private void open Log throws Core Exception try buff Read new Buffered Reader new File Reader log Path toOS String catch File Not Found Exception e throw Core Exception e  openLog CoreException buffRead BufferedReader FileReader logPath toOSString FileNotFoundException throwCoreException
private void throw Core Exception Throwable e throws Core Exception throw new Core Exception new Status I Status ERROR Update Utils get Plugin Id I Status ERROR Policy bind Install Log Parser errors NON NLS 1 e  throwCoreException CoreException CoreException IStatus UpdateUtils getPluginId IStatus InstallLogParser
private void parse Log throws Core Exception install log template CONFIGURATION configuration date ACTIVITY date target action status try String type status action String Tokenizer html Code while buff Read ready html Code new String Tokenizer buff Read read Line while html Code has More Elements if buff Read ready return html Code new String Tokenizer buff Read read Line type html Code next Token trim if type equals ACTIVITY String time html Code next Token String date String Buffer target new String Buffer date html Code next Token NON NLS 1 html Code next Token NON NLS 1 while html Code count Tokens 2 target append NON NLS 1 target append html Code next Token action html Code next Token status html Code next Token create Activity action time date status target to String current Configuration else String time html Code next Token String Buffer date date new String Buffer while html Code count Tokens 0 if date length 0 date append NON NLS 1 date append html Code next Token current Configuration Install Configuration install Config Map get new Long time catch Exception e throw Core Exception e  parseLog CoreException StringTokenizer htmlCode buffRead htmlCode StringTokenizer buffRead readLine htmlCode hasMoreElements buffRead htmlCode StringTokenizer buffRead readLine htmlCode nextToken htmlCode nextToken StringBuffer StringBuffer htmlCode nextToken htmlCode nextToken htmlCode countTokens htmlCode nextToken htmlCode nextToken htmlCode nextToken createActivity toString currentConfiguration htmlCode nextToken StringBuffer StringBuffer htmlCode countTokens htmlCode nextToken currentConfiguration InstallConfiguration installConfigMap throwCoreException
private void close Log try if buff Read null buff Read close catch IO Exception e finally buff Read null  closeLog buffRead buffRead IOException buffRead
private I Activity create Activity String action String time String date String status String target Install Configuration config Configuration Activity a new Configuration Activity int code 0 if FEATURE INSTALL equals action code I Activity ACTION FEATURE INSTALL else if FEATURE REMOVE equals action code I Activity ACTION FEATURE REMOVE else if SITE INSTALL equals action code I Activity ACTION SITE INSTALL else if SITE REMOVE equals action code I Activity ACTION SITE REMOVE else if UNCONFIGURE equals action code I Activity ACTION UNCONFIGURE else if CONFIGURE equals action code I Activity ACTION CONFIGURE else if REVERT equals action code I Activity ACTION REVERT else if RECONCILIATION equals action code I Activity ACTION RECONCILIATION else if PRESERVED equals action code I Activity ACTION ADD PRESERVED a set Action code try long activity Time Long parse Long time a set Date new Date activity Time catch Number Format Exception e a set Date new Date date a set Status SUCCESS equals status I Activity STATUS OK I Activity STATUS NOK a set Label target a set Install Configuration Model config if config null config Contains Activity config a config add Activity a return a  IActivity createActivity InstallConfiguration ConfigurationActivity ConfigurationActivity FEATURE_INSTALL IActivity ACTION_FEATURE_INSTALL FEATURE_REMOVE IActivity ACTION_FEATURE_REMOVE SITE_INSTALL IActivity ACTION_SITE_INSTALL SITE_REMOVE IActivity ACTION_SITE_REMOVE IActivity ACTION_UNCONFIGURE IActivity ACTION_CONFIGURE IActivity ACTION_REVERT IActivity ACTION_RECONCILIATION IActivity ACTION_ADD_PRESERVED setAction activityTime parseLong setDate activityTime NumberFormatException setDate setStatus IActivity STATUS_OK IActivity STATUS_NOK setLabel setInstallConfigurationModel configContainsActivity addActivity
private boolean config Contains Activity Install Configuration c I Activity a I Activity activities c get Activities for int i 0 i activities length i if a equals activities i return true return false  configContainsActivity InstallConfiguration IActivity IActivity getActivities
public Install Configuration get Configurations Collection config Set install Config Map values Install Configuration configs Install Configuration config Set to Array new Install Configuration config Set size Arrays sort configs comparator return configs  InstallConfiguration getConfigurations configSet installConfigMap InstallConfiguration InstallConfiguration configSet toArray InstallConfiguration configSet

Creates empty Properties private Install Registry super String config File Configurator Utils get Current Platform Configuration get Configuration Location get File file new File config File file file get Parent File file new File file REGISTRY restore  InstallRegistry configFile ConfiguratorUtils getCurrentPlatformConfiguration getConfigurationLocation getFile configFile getParentFile
Singleton public static Install Registry get Instance if instance null instance new Install Registry return instance  InstallRegistry getInstance InstallRegistry
Restores contents of the Properties from a file return true if persistant data was read in public boolean restore Input Stream in null boolean loaded false clear Test if we have a contribution file to start with If this is a clean start then we will not have a contribution file return false if file exists return loaded try in new File Input Stream file super load in loaded true catch IO Exception e Update Core log e finally if in null try in close catch IO Exception e return loaded  InputStream FileInputStream IOException UpdateCore IOException
Saves contents of the table to a file return true if operation was successful public synchronized boolean save Output Stream out null boolean ret false try out new File Output Stream file super store out This is a generated file do not edit NON NLS 1 ret true catch IO Exception e Update Core log e finally try if out null out close catch IO Exception e return ret  OutputStream FileOutputStream IOException UpdateCore IOException
Registers an installed feature so it can be uninstalled later param feature feature to register public static synchronized void register Feature I Feature feature String name feature  feature get Versioned Identifier NON NLS 1 if Install Registry get Instance get name null Install Registry get Instance put name name we save after each registration Install Registry get Instance save  registerFeature IFeature feature_ getVersionedIdentifier InstallRegistry getInstance InstallRegistry getInstance InstallRegistry getInstance
Registers an installed feature so it can be uninstalled later param plugin Entry plugin to register public static synchronized void register Plugin I Plugin Entry plugin Entry String name plugin  plugin Entry get Versioned Identifier NON NLS 1 if Install Registry get Instance get name null Install Registry get Instance put name name we save after each registration Install Registry get Instance save add plugin to the list of just installed plugins Install Registry get Instance just Installed Plugins put name name  pluginEntry registerPlugin IPluginEntry pluginEntry plugin_ pluginEntry getVersionedIdentifier InstallRegistry getInstance InstallRegistry getInstance InstallRegistry getInstance InstallRegistry getInstance justInstalledPlugins
Removes specified feature from registry public static synchronized void unregister Feature I Feature feature String name feature  feature get Versioned Identifier NON NLS 1 Install Registry get Instance remove name  unregisterFeature IFeature feature_ getVersionedIdentifier InstallRegistry getInstance
Removes specified plugin from registry public static synchronized void unregister Plugin I Plugin Entry plugin Entry String name plugin  plugin Entry get Versioned Identifier NON NLS 1 Install Registry get Instance remove name remove the plugin from the list of just installed plugins if needed Install Registry get Instance just Installed Plugins remove name  unregisterPlugin IPluginEntry pluginEntry plugin_ pluginEntry getVersionedIdentifier InstallRegistry getInstance InstallRegistry getInstance justInstalledPlugins
Returns true if the plugin was installed during this eclipse session param plugin Entry return public boolean is Plugin Just Installed I Plugin Entry plugin Entry String name plugin  plugin Entry get Versioned Identifier NON NLS 1 return Install Registry get Instance just Installed Plugins get name null  pluginEntry isPluginJustInstalled IPluginEntry pluginEntry plugin_ pluginEntry getVersionedIdentifier InstallRegistry getInstance justInstalledPlugins
This method is only needed for the update J Unit tests public static void cleanup Install Registry get Instance just Installed Plugins clear  JUnit InstallRegistry getInstance justInstalledPlugins

public static I Local Site local Site public static final String DEFAULT SITE TYPE SiteURL Content Provider SITE TYPE private static final String DEFAULT EXECUTABLE SITE TYPE Site File Content Provider SITE TYPE private static Map estimates cache found sites  ILocalSite localSite DEFAULT_SITE_TYPE SiteURLContentProvider SITE_TYPE DEFAULT_EXECUTABLE_SITE_TYPE SiteFileContentProvider SITE_TYPE
cache timestamps private static Map site Timestamps new Hash Map public static boolean global Use Cache true true if an exception occured creating local Site  siteTimestamps HashMap globalUseCache localSite
see Site Manager get Local Site public static I Local Site get Local Site throws Core Exception return internal Get Local Site Internal call if optimistic reconciliation needed private static I Local Site internal Get Local Site throws Core Exception if an exception occured while retrieving the Site rethrow it if exception Occured null throw exception Occured if local Site null try local Site Site Local internal Get Local Site catch Core Exception e exception Occured e throw e return local Site private static boolean is Valid Cached Site URL siteURL if sites contains Key siteURL to External Form return false Long timestamp Long site Timestamps get siteURL if timestamp null return false long local Last Modified timestamp long Value return Update Manager Utils is Same Timestamp siteURL local Last Modified see I Local Site get Site URL public static I Site get Site URL siteURL boolean use Cache I Progress Monitor monitor throws Core Exception I Site site null if monitor null monitor new Null Progress Monitor  SiteManager getLocalSite ILocalSite getLocalSite CoreException internalGetLocalSite ILocalSite internalGetLocalSite CoreException exceptionOccured exceptionOccured localSite localSite SiteLocal internalGetLocalSite CoreException exceptionOccured localSite isValidCachedSite containsKey toExternalForm siteTimestamps localLastModified longValue UpdateManagerUtils isSameTimestamp localLastModified ILocalSite getSite ISite getSite useCache IProgressMonitor CoreException ISite NullProgressMonitor
use cache if set up globally global Use Cache true and passed as parameter use Cache true String siteURL String siteURL to External Form if use Cache global Use Cache is Valid Cached Site siteURL site I Site sites get siteURL String return site try adding eclipse to the site url in case this is an extension site if file equals siteURL get Protocol NON NLS 1 File f new File siteURL get File if f is Directory eclipse equals f get Name NON NLS 1 f new File f eclipse NON NLS 1 try if use Cache global Use Cache is Valid Cached Site f toURL  globalUseCache useCache siteURLString toExternalForm useCache globalUseCache isValidCachedSite ISite siteURLString getProtocol getFile isDirectory getName useCache globalUseCache isValidCachedSite
site xml will have to specify the type boolean file Protocol file equals Ignore Case siteURL get Protocol NON NLS 1 boolean directory Exists false if file Protocol File dir dir new File siteURL get File if dir null dir is Directory if new File dir Site SITE XML exists directory Exists true PERF if file path and directory exists then consider executable monitor begin Task Policy bind Internal Site Manager Connecting To Site 8 NON NLS 1 if file Protocol directory Exists site attempt Create Site DEFAULT EXECUTABLE SITE TYPE siteURL monitor monitor worked 4 only one attempt else try monitor worked 3 site attempt Create Site DEFAULT SITE TYPE siteURL monitor monitor worked 1 catch Core Exception preserved Exception if monitor is Canceled attempt a retry is the protocol is file with executbale type if file Protocol  fileProtocol equalsIgnoreCase getProtocol directoryExists fileProtocol getFile isDirectory SITE_XML directoryExists beginTask InternalSiteManager ConnectingToSite fileProtocol directoryExists attemptCreateSite DEFAULT_EXECUTABLE_SITE_TYPE attemptCreateSite DEFAULT_SITE_TYPE CoreException preservedException isCanceled fileProtocol
try site attempt Create Site DEFAULT EXECUTABLE SITE TYPE siteURL monitor  attemptCreateSite DEFAULT_EXECUTABLE_SITE_TYPE
throw preserved Exception  preservedException
sites put siteURL to External Form site try Response response Update Core get Plugin get URL Encoder encode siteURL site Timestamps put siteURL new Long response get Last Modified catch MalformedURL Exception e catch IO Exception e flush the Jar File we may hold on to we keep the temp not to create them again  toExternalForm UpdateCore getPlugin URLEncoder siteTimestamps getLastModified MalformedURLException IOException JarFile
Jar Content Reference shutdown make sure we are not leaving jars open for this site flush mapping of downloaded JAR files FIXME provide better cache flushing after 2 1 FIXED everything downloaded is cached and timestamped Timestamps are compared to last Modifed on the server  JarContentReference lastModifed

Stores a content reference into the Site Content Consumer param content Reference the content reference to store param monitor the progress monitor throws Core Exception if an error occurs storing the content reference since 2 0  SiteContentConsumer contentReference CoreException
opens a Non plugin Entry for storage return the new Feature Content Consumer for this code I Non Plugin Entry code throws Core Exception if the opens is done on a Feature Content Consumer parent other than an I Feature since 2 0  FeatureContentConsumer INonPluginEntry CoreException FeatureContentConsumer IFeature
opens a Non plugin Entry for storage return the new Feature Content Consumer for this code I Plugin Entry code throws Core Exception if the opens is done on a Feature Content Consumer parent other than an I Feature since 2 0  FeatureContentConsumer IPluginEntry CoreException FeatureContentConsumer IFeature
closes the opened Site Content Consumer throws Core Exception since 2 0  SiteContentConsumer CoreException
aborts the opened Site Content Consumer throws Core Exception since 2 0  SiteContentConsumer CoreException

package org eclipse update internal core 

for int i 0 i listeners length i Foo Listener listeners i event Happened event  FooListener eventHappened
pre p public class Listeners List  ListenersList
The initial capacity of the list Always 1 private int capacity The current number of listeners Maintains invariant 0 size listeners length private int size 
The list of listeners Initially code null code but initialized to an array of size capacity the first time a listener is added Maintains invariant listeners null IFF size 0 private Object listeners null The empty array singleton instance returned by get Listeners when size 0  getListeners
private static final Object Empty Array new Object 0 Creates a listener list with an initial capacity of 3  EmptyArray
public Listeners List this 3 Creates a listener list with the given initial capacity param capacity the number of listeners which this list can initially accept without growing its internal representation must be at least 1 public Listeners List int capacity  ListenersList ListenersList
Assert is True capacity 1 this capacity capacity  isTrue

public class Non Plugin Entry Content Consumer extends Content Consumer  NonPluginEntryContentConsumer ContentConsumer
private I Content Consumer content Consumer Constructor  IContentConsumer contentConsumer

protected long last Modified public Other Response URL url throws IO Exception this url url connection url open Connection  lastModified OtherResponse IOException openConnection
public Input Stream get Input Stream throws IO Exception if in null url null in connection get Input Stream this last Modified connection get Last Modified return in  InputStream getInputStream IOException getInputStream lastModified getLastModified
see Response get Input Stream I Progress Monitor public Input Stream get Input Stream I Progress Monitor monitor throws IO Exception Core Exception return get Input Stream  getInputStream IProgressMonitor InputStream getInputStream IProgressMonitor IOException CoreException getInputStream
public long get Content Length return connection get Content Length  getContentLength getContentLength
public int get Status Code return I Status Codes HTTP OK  getStatusCode IStatusCodes HTTP_OK
public String get Status Message return NON NLS 1  getStatusMessage
public long get Last Modified if last Modified 0 last Modified connection get Last Modified return last Modified  getLastModified lastModified lastModified getLastModified lastModified

private Collection patches new Hash Set public Patched Feature I Feature Reference feature super this feature feature  HashSet PatchedFeature IFeatureReference
this feature feature public void add Patch I Feature Reference patch patches add patch  addPatch IFeatureReference
return Returns the feature public I Feature Reference get Feature return feature  IFeatureReference getFeature
return Returns the patches public I Feature Reference get Patches return I Feature Reference patches to Array new I Feature Reference patches size  IFeatureReference getPatches IFeatureReference toArray IFeatureReference
return Returns the feature and the patches public I Feature Reference get Feature And Patches I Feature Reference features new I Feature Reference patches size 1 features 0 feature System arraycopy get Patches 0 features 1 patches size return features  IFeatureReference getFeatureAndPatches IFeatureReference IFeatureReference getPatches
Obtains all plugins from the feature and its patches Each plugin will have unique ID If there are multiple version of plugin with same ID among the feature and its patches highest version plugins are chosen return Feature Plugin public Feature Plugin get Plugins Use a map of Patched Pluigns by plugin ID to collect one version of each plugin Map plugins new Hash Map I Feature Reference feature Refs get Feature And Patches for each feature or any patch for int i 0 i feature Refs length i try I Feature feature feature Refs i get Feature null if feature null Update Core warn Null Feature new Exception NON NLS 1 continue get plugin entries I Plugin Entry entries feature get Plugin Entries for int entr 0 entr entries length entr String plugin Id entries entr get Versioned Identifier get Identifier Plugin Version Identifier plugin Version entries entr get Versioned Identifier get Version check if map contains version of same plugin Feature Plugin existing Plugin Feature Plugin plugins get plugin Id if existing Plugin null existing Plugin get Entry get Versioned Identifier get Version is Greater Or Equal To plugin Version same or newer plugin already collected continue else plugins put plugin Id new Feature Plugin entries entr feature catch Core Exception e Update Core warn null e return Feature Plugin plugins values to Array new Feature Plugin plugins size  FeaturePlugin FeaturePlugin getPlugins PatchedPluigns HashMap IFeatureReference featureRefs getFeatureAndPatches featureRefs IFeature featureRefs getFeature UpdateCore IPluginEntry getPluginEntries pluginId getVersionedIdentifier getIdentifier PluginVersionIdentifier pluginVersion getVersionedIdentifier getVersion FeaturePlugin existingPlugin FeaturePlugin pluginId existingPlugin existingPlugin getEntry getVersionedIdentifier getVersion isGreaterOrEqualTo pluginVersion pluginId FeaturePlugin CoreException UpdateCore FeaturePlugin toArray FeaturePlugin
public String to String String Buffer str new String Buffer feature to String I Feature Reference patches get Feature And Patches for int i 0 i patches length i str append patch patches i to String NON NLS 1 NON NLS 2 return str to String  toString StringBuffer StringBuffer toString IFeatureReference getFeatureAndPatches toString toString

public class Plugin Entry Content Consumer extends Content Consumer  PluginEntryContentConsumer ContentConsumer
private I Content Consumer content Consumer Constructor  IContentConsumer contentConsumer

Creates a NLS catalog for the given locale public static void localize String bundle Name bundle Resource Bundle get Bundle bundle Name  bundleName ResourceBundle getBundle bundleName
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string public static String bind String id String binding return bind id new String binding 
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings public static String bind String id String binding1 String binding2 return bind id new String binding1 binding2 
Gets a string from the resource bundle We don t want to crash because of a missing String Returns the key if not found public static String bind String key try return bundle get String key catch Missing Resource Exception e return key catch Null Pointer Exception e return key NON NLS 1 NON NLS 2  getString MissingResourceException NullPointerException
Gets a string from the resource bundle and binds it with the given arguments If the key is not found return the key public static String bind String key Object args try return Message Format format bind key args catch Missing Resource Exception e return key catch Null Pointer Exception e return key NON NLS 1 NON NLS 2  MessageFormat MissingResourceException NullPointerException
Progress monitor helpers public static void check Canceled I Progress Monitor monitor if monitor is Canceled throw new Operation Canceled Exception  checkCanceled IProgressMonitor isCanceled OperationCanceledException
public static I Progress Monitor monitor For I Progress Monitor monitor if monitor null return new Null Progress Monitor return monitor  IProgressMonitor monitorFor IProgressMonitor NullProgressMonitor
public static I Progress Monitor sub Monitor For I Progress Monitor monitor int ticks if monitor null return new Null Progress Monitor if monitor instanceof Null Progress Monitor return monitor return new Sub Progress Monitor monitor ticks  IProgressMonitor subMonitorFor IProgressMonitor NullProgressMonitor NullProgressMonitor SubProgressMonitor

Method get Input Stream return Input Stream  getInputStream InputStream
A special version of get Input Stream that can be canceled A monitor thread checks the state of the monitor and disconnects the connection if is Canceled is detected param monitor the progress monitor return Input Stream an opened stream or null if failed throws IO Exception if there are problems throws Core Exception if no more connection threads are available public Input Stream get Input Stream I Progress Monitor monitor  getInputStream isCanceled InputStream IOException CoreException InputStream getInputStream IProgressMonitor
Method get Content Length return long  getContentLength
Method get Status Code return int  getStatusCode
Method get Status Message return String  getStatusMessage
Returns the timestamp of last modification to the resource return 

Sets the site param site The site to set public void set Site I Site site this site site  setSite ISite
Gets the site return Returns a I Site public I Site get Site return site  ISite ISite getSite

author birsan 
TODO To change the template for this generated type comment go to Window Preferences Java Code Generation Code and Comments 
Site on the File System public class Site File extends Site  SiteFile
plugin entries private List plugin Entries new Array List 0 public I Site Content Consumer create Site Content Consumer I Feature target Feature throws Core Exception Site File Content Consumer consumer new Site File Content Consumer target Feature consumer set Site this  pluginEntries ArrayList ISiteContentConsumer createSiteContentConsumer IFeature targetFeature CoreException SiteFileContentConsumer SiteFileContentConsumer targetFeature setSite
public String get Default Packaged Feature Type return DEFAULT INSTALLED FEATURE TYPE see I Site install I Feature I Verifier I Progress Monitor public I Feature Reference install I Feature source Feature I Verification Listener verification Listener I Progress Monitor progress throws Core Exception return install source Feature null verification Listener progress  getDefaultPackagedFeatureType DEFAULT_INSTALLED_FEATURE_TYPE ISite IFeature IVerifier IProgressMonitor IFeatureReference IFeature sourceFeature IVerificationListener verificationListener IProgressMonitor CoreException sourceFeature verificationListener
public I Feature Reference install I Feature source Feature I Feature Reference optionalfeatures I Verification Listener verification Listener I Progress Monitor progress throws Core Exception if source Feature null return null make sure we have an Install Monitor Install Monitor monitor if progress null monitor null else if progress instanceof Install Monitor monitor Install Monitor progress else monitor new Install Monitor progress create new executable feature and install source content into it I Feature local Feature create Executable Feature source Feature I Feature Reference local Feature Reference null local Feature Reference source Feature install local Feature optionalfeatures verification Listener monitor return local Feature Reference see I Site install I Feature I Feature Content Consumer I Verifier I VerificationL Istener I Progress Monitor public I Feature Reference install I Feature source Feature I Feature Reference optionalfeatures I Feature Content Consumer parent Content Consumer I Verifier parent Verifier I Verification Listener verification Listener I Progress Monitor progress throws Install Aborted Exception Core Exception if source Feature null return null make sure we have an Install Monitor Install Monitor monitor if progress null monitor null else if progress instanceof Install Monitor monitor Install Monitor progress else monitor new Install Monitor progress create new executable feature and install source content into it I Feature local Feature create Executable Feature source Feature parent Content Consumer add Child local Feature set the verifier I Verifier vr source Feature get Feature Content Provider get Verifier if vr null vr set Parent parent Verifier I Feature Reference local Feature Reference null local Feature Reference source Feature install local Feature optionalfeatures verification Listener monitor return local Feature Reference see I Site remove I Feature I Progress Monitor  IFeatureReference IFeature sourceFeature IFeatureReference IVerificationListener verificationListener IProgressMonitor CoreException sourceFeature InstallMonitor InstallMonitor InstallMonitor InstallMonitor InstallMonitor IFeature localFeature createExecutableFeature sourceFeature IFeatureReference localFeatureReference localFeatureReference sourceFeature localFeature verificationListener localFeatureReference ISite IFeature IFeatureContentConsumer IVerifier IVerificationLIstener IProgressMonitor IFeatureReference IFeature sourceFeature IFeatureReference IFeatureContentConsumer parentContentConsumer IVerifier parentVerifier IVerificationListener verificationListener IProgressMonitor InstallAbortedException CoreException sourceFeature InstallMonitor InstallMonitor InstallMonitor InstallMonitor InstallMonitor IFeature localFeature createExecutableFeature sourceFeature parentContentConsumer addChild localFeature IVerifier sourceFeature getFeatureContentProvider getVerifier setParent parentVerifier IFeatureReference localFeatureReference localFeatureReference sourceFeature localFeature verificationListener localFeatureReference ISite IFeature IProgressMonitor
if feature null Update Core warn Feature to remove is null NON NLS 1 return Error Recovery Log recovery Log Error Recovery Log get Log make sure we have an Install Monitor Install Monitor monitor if progress null monitor null  UpdateCore ErrorRecoveryLog recoveryLog ErrorRecoveryLog getLog InstallMonitor InstallMonitor
monitor Install Monitor progress else monitor new Install Monitor progress Setup optional install handler Install Handler Proxy handler new Install Handler Proxy I Install Handler HANDLER ACTION UNINSTALL feature feature get Install Handler Entry monitor boolean success false Throwable original Exception null try start log recovery Log open Error Recovery Log START REMOVE LOG about To Remove feature log files have been downloaded recovery Log append Error Recovery Log END ABOUT REMOVE handler uninstall Initiated remove the feature and the plugins if they are not used and not activated get the plugins from the feature I Plugin Entry plugins To Remove get Plugin Entries Only Referenced By feature  InstallMonitor InstallMonitor InstallHandlerProxy InstallHandlerProxy IInstallHandler HANDLER_ACTION_UNINSTALL getInstallHandlerEntry originalException recoveryLog ErrorRecoveryLog START_REMOVE_LOG aboutToRemove recoveryLog ErrorRecoveryLog END_ABOUT_REMOVE uninstallInitiated IPluginEntry pluginsToRemove getPluginEntriesOnlyReferencedBy
if monitor null monitor begin Task Policy bind Site File Removing feature get Label plugins To Remove length 1 NON NLS 1 remove feature reference from the site  beginTask SiteFile getLabel pluginsToRemove
I Site Feature Reference feature References get Feature References if feature References null for int index Ref 0 index Ref feature References length index Ref I Feature Reference element feature References index Ref  ISiteFeatureReference featureReferences getFeatureReferences featureReferences indexRef indexRef featureReferences indexRef IFeatureReference featureReferences indexRef
remove Feature Reference Model Feature Reference Model element break  removeFeatureReferenceModel FeatureReferenceModel
if Install Registry get Instance get feature  feature get Versioned Identifier null NON NLS 1 Update Core log Policy bind Site File feature Not Removed feature get Versioned Identifier to String null NON NLS 1 NON NLS 2 else  InstallRegistry getInstance feature_ getVersionedIdentifier UpdateCore SiteFile featureNotRemoved getVersionedIdentifier toString
remove the feature content Content Reference references feature get Feature Content Provider get Feature Entry Archive References monitor for int i 0 i references length i try Update Manager Utils remove From File System references i as File if monitor null monitor worked 1 catch IO Exception e throw Utilities new Core Exception Policy bind Site File Cannot Remove Feature feature get Versioned Identifier get Identifier getURL to External Form e NON NLS 1 Install Registry unregister Feature feature  ContentReference getFeatureContentProvider getFeatureEntryArchiveReferences UpdateManagerUtils removeFromFileSystem asFile IOException newCoreException SiteFile CannotRemoveFeature getVersionedIdentifier getIdentifier toExternalForm InstallRegistry unregisterFeature
and remove it for int i 0 i plugins To Remove length i remove feature plugins To Remove i monitor remove any children feature I Feature Reference children Ref feature get Included Feature References for int i 0 i children Ref length i I Feature child Feature null try child Feature children Ref i get Feature null catch Core Exception e Update Core warn Unable to retrieve feature to remove for children Ref i NON NLS 1 if child Feature null remove children Ref i get Feature null monitor remove the feature from the site cache remove Feature From Cache feature getURL handler complete Uninstall  pluginsToRemove pluginsToRemove IFeatureReference childrenRef getIncludedFeatureReferences childrenRef IFeature childFeature childFeature childrenRef getFeature CoreException UpdateCore childrenRef childFeature childrenRef getFeature removeFeatureFromCache completeUninstall

public class Site File Content Consumer extends Site Content Consumer  SiteFileContentConsumer SiteContentConsumer
private boolean closed false recovery private String old Path private String new Path  oldPath newPath
content Consumers private List of path as String  contentConsumers
PERF new instance variable private Site File Factory archive Factory new Site File Factory Constructor  SiteFileFactory archiveFactory SiteFileFactory
installed Files new Array List Returns the path in which the Feature will be installed private String get Feature Path throws Core Exception String feature Path null try Versioned Identifier feature Identifier feature get Versioned Identifier String path Site DEFAULT INSTALLED FEATURE PATH feature Identifier to String File separator URL newURL new URL get Site getURL path feature Path newURL get File catch MalformedURL Exception e throw Utilities new Core Exception Policy bind Site File Content Consumer Unable To CreateURL e get Message e NON NLS 1 return feature Path see I Site Content Consumer open I Non Plugin Entry  installedFiles ArrayList getFeaturePath CoreException featurePath VersionedIdentifier featureIdentifier getVersionedIdentifier DEFAULT_INSTALLED_FEATURE_PATH featureIdentifier toString getSite featurePath getFile MalformedURLException newCoreException SiteFileContentConsumer UnableToCreateURL getMessage featurePath ISiteContentConsumer INonPluginEntry
return new Site File Non Plugin Content Consumer get Feature Path see I Site Content Consumer open I Plugin Entry public I Content Consumer open I Plugin Entry plugin Entry throws Core Exception Content Consumer cons if plugin Entry instanceof Plugin Entry Model Plugin Entry Model plugin Entry is Unpack plugin can run from a jar cons new Site File Packed Plugin Content Consumer plugin Entry get Site else plugin must be unpacked cons new Site File Plugin Content Consumer plugin Entry get Site add Content Consumers cons return cons see I Site Content Consumer store Content Reference I Progress Monitor public void store Content Reference content Reference I Progress Monitor monitor throws Core Exception if closed Update Core warn Attempt to store in a closed Site File Content Consumer new Exception NON NLS 1 return  SiteFileNonPluginContentConsumer getFeaturePath ISiteContentConsumer IPluginEntry IContentConsumer IPluginEntry pluginEntry CoreException ContentConsumer pluginEntry PluginEntryModel PluginEntryModel pluginEntry isUnpack SiteFilePackedPluginContentConsumer pluginEntry getSite SiteFilePluginContentConsumer pluginEntry getSite addContentConsumers ISiteContentConsumer ContentReference IProgressMonitor ContentReference contentReference IProgressMonitor CoreException UpdateCore SiteFileContentConsumer
String feature Path get Feature Path String content Key content Reference get Identifier feature Path content Key error recovery if feature Path ends With Feature FEATURE XML feature Path ends With Feature FEATURE XML NON NLS 1 NON NLS 2 old Path feature Path replace File separator Char File local File new File old Path if local File exists throw Utilities new Core Exception Policy bind Update Manager Utils File Already Exists new Object local File null NON NLS 1 feature Path Error Recovery Log get Local Random Identifier feature Path new Path feature Path Error Recovery Log get Log append Path Error Recovery Log FEATURE ENTRY feature Path try in Stream content Reference get Input Stream Update Manager Utils copy To Local in Stream feature Path null Update Manager Utils check Permissions content Reference feature Path 20305 installed Files add feature Path catch IO Exception e throw Utilities new Core Exception Policy bind Global Consumer Error Creating File feature Path e NON NLS 1  featurePath getFeaturePath contentKey contentReference getIdentifier featurePath contentKey featurePath endsWith FEATURE_XML featurePath endsWith FEATURE_XML oldPath featurePath separatorChar localFile oldPath localFile newCoreException UpdateManagerUtils FileAlreadyExists localFile featurePath ErrorRecoveryLog getLocalRandomIdentifier featurePath newPath featurePath ErrorRecoveryLog getLog appendPath ErrorRecoveryLog FEATURE_ENTRY featurePath inStream contentReference getInputStream UpdateManagerUtils copyToLocal inStream featurePath UpdateManagerUtils checkPermissions contentReference featurePath installedFiles featurePath IOException newCoreException GlobalConsumer ErrorCreatingFile featurePath
close stream in Stream close catch IO Exception e see I Site Content Consumer close public I Feature Reference close throws Core Exception if closed Update Core warn Attempt to close a closed Site File Content Consumer new Exception NON NLS 1 create a new Feature reference to be added to the site  inStream IOException ISiteContentConsumer IFeatureReference CoreException UpdateCore SiteFileContentConsumer
File file null try 

import java net import org eclipse core runtime 
Site on the File System public class Site File Content Provider extends Site Content Provider public static final String SITE TYPE org eclipse update core file NON NLS 1  SiteFileContentProvider SiteContentProvider SITE_TYPE
Constructor for File Site public Site File Content Provider URL url super url see I Site Content Provider get Archive Reference String  FileSite SiteFileContentProvider ISiteContentProvider getArchiveReference

import org eclipse core runtime import org eclipse update core import org eclipse update core model import org eclipse update internal model import org xml sax public class Site File Factory extends Base Site Factory private when parsing file system private Site File site see I Site Factory create Site URL boolean public I Site create Site URL url throws Core Exception Invalid Site Type Exception Site site null Input Stream site Stream null Site Model Factory factory this try if url points to a directory attempt to parse site xml String path url get File File site Location new File path if site Location is Directory url site Location toURL File siteXML File new File site Location Site SITE XML if siteXML File exists site Stream new File Input Stream siteXML File site Site factory parse Site site Stream else parse site Location  SiteFileFactory BaseSiteFactory SiteFile ISiteFactory createSite ISite createSite CoreException InvalidSiteTypeException InputStream siteStream SiteModelFactory getFile siteLocation siteLocation isDirectory siteLocation siteXMLFile siteLocation SITE_XML siteXMLFile siteStream FileInputStream siteXMLFile parseSite siteStream siteLocation
site parse Site site Location else we are not pointing to a directory attempt to parse the file try URL resolvedURL URL Encoder encode url site Stream open Stream resolvedURL site Site factory parse Site site Stream catch IO Exception e attempt to parse parent directory  parseSite siteLocation URLEncoder siteStream openStream parseSite siteStream IOException
File parent Directory file get Parent File do not create directory if it doesn t exist 18318 instead hrow error if parent Directory null parent Directory exists throw Utilities new Core Exception Policy bind Site File Factory Directory Does Not Exist file get Absolute Path null NON NLS 1 if parent Directory null parent Directory is Directory throw Utilities new Core Exception Policy bind Site File Factory Unable To Obtain Parent Directory file get Absolute Path null NON NLS 1 site parse Site parent Directory Site Content Provider content Provider new Site File Content Provider url site set Site Content Provider content Provider content Provider set Site site site resolve url url Do not set read only as may install in it  parentDirectory getParentFile parentDirectory parentDirectory newCoreException SiteFileFactory DirectoryDoesNotExist getAbsolutePath parentDirectory parentDirectory isDirectory newCoreException SiteFileFactory UnableToObtainParentDirectory getAbsolutePath parseSite parentDirectory SiteContentProvider contentProvider SiteFileContentProvider setSiteContentProvider contentProvider contentProvider setSite
site mark Read Only catch MalformedURL Exception e throw Utilities new Core Exception Policy bind Site File Factory Unable To CreateURL url null url to External Form e NON NLS 1 NON NLS 2 catch IO Exception e throw Utilities new Core Exception Policy bind Site File Factory Unable To Access Site I Site SITE ACCESS EXCEPTION e NON NLS 1 finally try if site Stream null site Stream close catch IO Exception e return site Method parse Site private Site parse Site File directory throws Core Exception this site Site File create Site Map Model if directory exists throw Utilities new Core Exception Policy bind Site File Factory File Does Not Exist directory get Absolute Path null NON NLS 1  markReadOnly MalformedURLException newCoreException SiteFileFactory UnableToCreateURL toExternalForm IOException newCoreException SiteFileFactory UnableToAccessSite ISite SITE_ACCESS_EXCEPTION siteStream siteStream IOException parseSite parseSite CoreException SiteFile createSiteMapModel newCoreException SiteFileFactory FileDoesNotExist getAbsolutePath
INSTALLED parse Installed Feature directory  parseInstalledFeature
File plugin Path new File directory Site DEFAULT PLUGIN PATH PACKAGED parse Packaged Feature directory in case it contains JAR files parse Packaged Plugins plugin Path INSTALLED parse Installed Feature directory parse Installed Plugins plugin Path return site Method parse Feature throws Core Exception private void parse Installed Feature File directory throws Core Exception File feature Dir new File directory Site DEFAULT INSTALLED FEATURE PATH if feature Dir exists String dir Site Feature Reference Model feature Ref URL featureURL File current Feature Dir String new File Path null try  pluginPath DEFAULT_PLUGIN_PATH parsePackagedFeature parsePackagedPlugins pluginPath parseInstalledFeature parseInstalledPlugins pluginPath parseFeature CoreException parseInstalledFeature CoreException featureDir DEFAULT_INSTALLED_FEATURE_PATH featureDir SiteFeatureReferenceModel featureRef currentFeatureDir newFilePath
handle the installed features Configured under features Configured subdirectory dir feature Dir list for int index 0 index dir length index the URL must ends with for the bundle to be resolved new File Path dir index dir index ends With NON NLS 1 NON NLS 2 NON NLS 3 current Feature Dir new File feature Dir new File Path check if feature xml exists File featureXML File new File current Feature Dir Feature FEATURE XML if featureXML File exists Update Core warn Unable to find feature xml in directory current Feature Dir NON NLS 1 else PERF remove code Site File Factory archive Factory new Site File Factory featureURL current Feature Dir toURL feature Ref create Feature Reference Model feature Ref set Site Model site feature Ref setURL String featureURL to External Form  featuresConfigured featuresConfigured featureDir newFilePath endsWith currentFeatureDir featureDir newFilePath featureXMLFile currentFeatureDir FEATURE_XML featureXMLFile UpdateCore currentFeatureDir SiteFileFactory archiveFactory SiteFileFactory currentFeatureDir featureRef createFeatureReferenceModel featureRef setSiteModel featureRef setURLString toExternalForm
feature Ref set Type I Site DEFAULT INSTALLED FEATURE TYPE Site site add Feature Reference Model feature Ref catch MalformedURL Exception e throw Utilities new Core Exception Policy bind Site File Factory Unable To CreateURL For File new File Path e NON NLS 1 Method parse Feature throws Core Exception private void parse Packaged Feature File directory throws Core Exception FEATURES File feature Dir new File directory Site DEFAULT FEATURE PATH if feature Dir exists String dir Site Feature Reference Model feature Ref URL featureURL File current Feature File String new File Path null try only list JAR files dir feature Dir list Feature Packaged Content Provider filter for int index 0 index dir length index  featureRef setType ISite DEFAULT_INSTALLED_FEATURE_TYPE addFeatureReferenceModel featureRef MalformedURLException newCoreException SiteFileFactory UnableToCreateURLForFile newFilePath parseFeature CoreException parsePackagedFeature CoreException featureDir DEFAULT_FEATURE_PATH featureDir SiteFeatureReferenceModel featureRef currentFeatureFile newFilePath featureDir FeaturePackagedContentProvider
Jar Content Reference ref new Jar Content Reference current Feature File NON NLS 1 Content Reference result null  JarContentReference JarContentReference currentFeatureFile ContentReference
result ref peek Feature FEATURE XML null null catch IO Exception e Update Core warn Exception retrieving feature xml in file current Feature File e NON NLS 1  FEATURE_XML IOException UpdateCore currentFeatureFile

import org eclipse core runtime import org eclipse update core 
Plugin Content Consumer on a Site public class Site File Non Plugin Content Consumer extends Content Consumer private String path private boolean closed false Constructor public Site File Non Plugin Content Consumer String feature Path this path feature Path  SiteFileNonPluginContentConsumer ContentConsumer SiteFileNonPluginContentConsumer featurePath featurePath
public void store Content Reference content Reference I Progress Monitor monitor throws Core Exception  ContentReference contentReference IProgressMonitor CoreException

Constructor public Site File Packed Plugin Content Consumer I Plugin Entry plugin Entry I Site site this plugin Entry plugin Entry this site site  SiteFilePackedPluginContentConsumer IPluginEntry pluginEntry ISite pluginEntry pluginEntry
public void store Content Reference content Reference I Progress Monitor monitor throws Core Exception Input Stream in Stream null if closed Update Core warn Attempt to store in a closed Site File Plugin Content Consumer new Exception NON NLS 1 return try URL newURL new URL site getURL Site DEFAULT PLUGIN PATH plugin Entry get Versioned Identifier to String jar NON NLS 1 in Stream content Reference get Input Stream jar Path newURL get File replace File separator Char File jar File new File jar Path if jar File exists throw Utilities new Core Exception Policy bind Update Manager Utils File Already Exists new Object jar File null NON NLS 1 error recovery temp Path Error Recovery Log get Local Random Identifier jar Path tmp NON NLS 1 Error Recovery Log get Log append Path Error Recovery Log BUNDLE JAR ENTRY temp Path Update Manager Utils copy To Local in Stream temp Path null catch IO Exception e throw Utilities new Core Exception Policy bind Global Consumer Error Creating File temp Path e NON NLS 1 finally if in Stream null try close stream in Stream close catch IO Exception e  ContentReference contentReference IProgressMonitor CoreException InputStream inStream UpdateCore SiteFilePluginContentConsumer DEFAULT_PLUGIN_PATH pluginEntry getVersionedIdentifier toString inStream contentReference getInputStream jarPath getFile separatorChar jarFile jarPath jarFile newCoreException UpdateManagerUtils FileAlreadyExists jarFile tempPath ErrorRecoveryLog getLocalRandomIdentifier jarPath ErrorRecoveryLog getLog appendPath ErrorRecoveryLog BUNDLE_JAR_ENTRY tempPath UpdateManagerUtils copyToLocal inStream tempPath IOException newCoreException GlobalConsumer ErrorCreatingFile tempPath inStream inStream IOException
public void close throws Core Exception if closed Update Core warn Attempt to close a closed Site File Plugin Content Consumer new Exception NON NLS 1 return if temp Path null rename file Error Recovery Log get Log append Path Error Recovery Log RENAME ENTRY temp Path File file To Rename new File temp Path boolean sucess false if file To Rename exists File renamed File new File jar Path sucess file To Rename rename To renamed File if sucess String msg Policy bind Content Consumer Unable To Rename temp Path jar Path NON NLS 1 throw Utilities new Core Exception msg new Exception msg if site instanceof Site File Site File site add Plugin Entry plugin Entry closed true  CoreException UpdateCore SiteFilePluginContentConsumer tempPath ErrorRecoveryLog getLog appendPath ErrorRecoveryLog RENAME_ENTRY tempPath fileToRename tempPath fileToRename renamedFile jarPath fileToRename renameTo renamedFile ContentConsumer UnableToRename tempPath jarPath newCoreException SiteFile SiteFile addPluginEntry pluginEntry
public void abort throws Core Exception if closed Update Core warn Attempt to abort a closed Site File Plugin Content Consumer new Exception NON NLS 1 return boolean sucess true delete plugin jar if jar Path null Error Recovery Log get Log append Path Error Recovery Log DELETE ENTRY jar Path File file To Remove new File jar Path if file To Remove exists sucess file To Remove delete if sucess String msg Policy bind Unable to delete jar Path NON NLS 1 Update Core log msg null closed true  CoreException UpdateCore SiteFilePluginContentConsumer jarPath ErrorRecoveryLog getLog appendPath ErrorRecoveryLog DELETE_ENTRY jarPath fileToRemove jarPath fileToRemove fileToRemove jarPath UpdateCore

Plugin Content Consumer on a Site 
private I Plugin Entry plugin Entry private I Site site private boolean closed false recovery temporary name to original name map private Map renames new Hash Map 2 for abort private List of path as String installed Files Constructor public Site File Plugin Content Consumer I Plugin Entry plugin Entry I Site site this plugin Entry plugin Entry this site site installed Files new Array List see I Site Content Consumer store Content Reference I Progress Monitor public void store Content Reference content Reference I Progress Monitor monitor throws Core Exception Input Stream in Stream null  IPluginEntry pluginEntry ISite HashMap installedFiles SiteFilePluginContentConsumer IPluginEntry pluginEntry ISite pluginEntry pluginEntry installedFiles ArrayList ISiteContentConsumer ContentReference IProgressMonitor ContentReference contentReference IProgressMonitor CoreException InputStream inStream
if closed Update Core warn Attempt to store in a closed Site File Plugin Content Consumer new Exception NON NLS 1 return try URL newURL new URL site getURL Site DEFAULT PLUGIN PATH plugin Entry get Versioned Identifier to String plugin Path newURL get File String content Key content Reference get Identifier in Stream content Reference get Input Stream plugin Path plugin Path ends With File separator content Key File separator content Key error recovery String log Entry null  UpdateCore SiteFilePluginContentConsumer DEFAULT_PLUGIN_PATH pluginEntry getVersionedIdentifier toString pluginPath getFile contentKey contentReference getIdentifier inStream contentReference getInputStream pluginPath pluginPath endsWith contentKey contentKey logEntry
else if fragment xml equals content Key NON NLS 1 log Entry Error Recovery Log FRAGMENT ENTRY else if META INF MANIFEST MF equals content Key NON NLS 1 log Entry Error Recovery Log BUNDLE MANIFEST ENTRY if log Entry null String original Name plugin Path replace File separator Char File local File new File original Name if local File exists throw Utilities new Core Exception Policy bind Update Manager Utils File Already Exists new Object local File null NON NLS 1 plugin Path Error Recovery Log get Local Random Identifier plugin Path renames put plugin Path original Name Error Recovery Log get Log append Path log Entry plugin Path Update Manager Utils copy To Local in Stream plugin Path null Update Manager Utils check Permissions content Reference plugin Path 20305 installed Files add plugin Path catch IO Exception e throw Utilities new Core Exception Policy bind Global Consumer Error Creating File plugin Path e NON NLS 1 finally  contentKey logEntry ErrorRecoveryLog FRAGMENT_ENTRY contentKey logEntry ErrorRecoveryLog BUNDLE_MANIFEST_ENTRY logEntry originalName pluginPath separatorChar localFile originalName localFile newCoreException UpdateManagerUtils FileAlreadyExists localFile pluginPath ErrorRecoveryLog getLocalRandomIdentifier pluginPath pluginPath originalName ErrorRecoveryLog getLog appendPath logEntry pluginPath UpdateManagerUtils copyToLocal inStream pluginPath UpdateManagerUtils checkPermissions contentReference pluginPath installedFiles pluginPath IOException newCoreException GlobalConsumer ErrorCreatingFile pluginPath

import org eclipse update internal model 
public class Site Local extends Site Local Model implements I Local Site private Listeners List listeners new Listeners List private Site Status Analyzer site Status Analyzer private boolean is Transient false Have new features been found during reconciliation  SiteLocal SiteLocalModel ILocalSite ListenersList ListenersList SiteStatusAnalyzer siteStatusAnalyzer isTransient
initialize the configurations from the persistent model Set the reconciliation as non optimistic public static I Local Site get Local Site throws Core Exception return internal Get Local Site  ILocalSite getLocalSite CoreException internalGetLocalSite
public static I Local Site internal Get Local Site throws Core Exception Site Local local Site new Site Local obtain platform configuration I Platform Configuration current Platform Configuration Configurator Utils get Current Platform Configuration local Site is Transient current Platform Configuration is Transient try URL configXML current Platform Configuration get Configuration Location local Site set LocationURL String configXML to External Form local Site resolve configXML null  ILocalSite internalGetLocalSite CoreException SiteLocal localSite SiteLocal IPlatformConfiguration currentPlatformConfiguration ConfiguratorUtils getCurrentPlatformConfiguration localSite isTransient currentPlatformConfiguration isTransient currentPlatformConfiguration getConfigurationLocation localSite setLocationURLString toExternalForm localSite
parse Local Site File current Platform Configuration local Site catch MalformedURL Exception exception throw Utilities new Core Exception Policy bind Site Local Unable To CreateURL For local Site get LocationURL String CONFIG FILE exception NON NLS 1 NON NLS 2 return local Site Create the local Site object private static boolean parse Local Site File I Platform Configuration platform Config Site Local local Site throws Core Exception MalformedURL Exception  parseLocalSiteFile currentPlatformConfiguration localSite MalformedURLException newCoreException SiteLocal UnableToCreateURLFor localSite getLocationURLString CONFIG_FILE localSite localSite parseLocalSiteFile IPlatformConfiguration platformConfig SiteLocal localSite CoreException MalformedURLException
URL resolvedURL URL Encoder encode configXML try  URLEncoder
return true catch Exception exception return false 
public void add Configuration I Install Configuration config if config null add Configuration Model Install Configuration Model config  addConfiguration IInstallConfiguration addConfigurationModel InstallConfigurationModel
set configuration as current if get Current Configuration Model null get Current Configuration Model set Current false if config instanceof Install Configuration Install Configuration config set Current true set Current Configuration Model Install Configuration Model config Install Configuration Model config mark Read Only notify listeners Object site Local Listeners listeners get Listeners for int i 0 i site Local Listeners length i I Local Site Changed Listener site Local Listeners i current Install Configuration Changed config  getCurrentConfigurationModel getCurrentConfigurationModel setCurrent InstallConfiguration InstallConfiguration setCurrent setCurrentConfigurationModel InstallConfigurationModel InstallConfigurationModel markReadOnly siteLocalListeners getListeners siteLocalListeners ILocalSiteChangedListener siteLocalListeners currentInstallConfigurationChanged
private void trim History To Capacity check if we have to remove a configuration  trimHistoryToCapacity
get Configuration History length 1 do not remove the first element in history this is the original config Install Configuration Model removed Config get Configuration History Model 1 if remove Configuration Model removed Config DEBUG if Update Core DEBUG Update Core DEBUG SHOW CONFIGURATION Update Core debug Removed configuration removed Config get Label NON NLS 1  getConfigurationHistory InstallConfigurationModel removedConfig getConfigurationHistoryModel removeConfigurationModel removedConfig UpdateCore UpdateCore DEBUG_SHOW_CONFIGURATION UpdateCore removedConfig getLabel
for int i 0 i site Local Listeners length i I Local Site Changed Listener site Local Listeners i install Configuration Removed I Install Configuration removed Config remove files URL url removed Config getURL  siteLocalListeners ILocalSiteChangedListener siteLocalListeners installConfigurationRemoved IInstallConfiguration removedConfig removedConfig
public void add Local Site Changed Listener I Local Site Changed Listener listener synchronized listeners  addLocalSiteChangedListener ILocalSiteChangedListener
see I Local Site remove Local Site Changed Listener I Local Site Changed Listener public void remove Local Site Changed Listener I Local Site Changed Listener listener synchronized listeners  ILocalSite removeLocalSiteChangedListener ILocalSiteChangedListener removeLocalSiteChangedListener ILocalSiteChangedListener
listeners add listener 
return true if changes restart is needed 
and set runtim info for next startup return Install Configuration get Current Configuration save  InstallConfiguration getCurrentConfiguration

public Site Reconciler Site Local site Local this site Local site Local  SiteReconciler SiteLocal siteLocal siteLocal siteLocal
package URL resolve Site Entry I Platform Configuration I Site Entry new Site Entry throws Core Exception URL resolvedURL null try resolvedURL Platform resolve new Site Entry getURL catch IO Exception e throw Utilities new Core Exception Policy bind Site Local Unable To Resolve new Site Entry getURL to External Form e NON NLS 1 return resolvedURL  resolveSiteEntry IPlatformConfiguration ISiteEntry newSiteEntry CoreException newSiteEntry IOException newCoreException SiteLocal UnableToResolve newSiteEntry toExternalForm
Validate we have only one configured feature of a specific id per configured site public static void check Configured Features Old I Configured Site configured Site throws Core Exception NOT USED Configured Site c Site Configured Site configured Site I Feature Reference configured Features c Site get Configured Features Configuration Policy c Policy c Site get Configuration Policy TRACE if Update Core DEBUG Update Core DEBUG SHOW RECONCILER Update Core debug Compare features within configured Site get Site getURL NON NLS 1 for int index Configured Features 0 index Configured Features configured Features length 1 index Configured Features I Feature Reference feature To Compare configured Features index Configured Features within the configured site compare with the other configured features of this site for int rest Of Configured Features index Configured Features 1 rest Of Configured Features configured Features length rest Of Configured Features int result compare feature To Compare configured Features rest Of Configured Features if result 0 if result 1 c Policy unconfigure configured Features rest Of Configured Features true false if result 2 c Policy unconfigure feature To Compare true false  checkConfiguredFeaturesOld IConfiguredSite configuredSite CoreException ConfiguredSite cSite ConfiguredSite configuredSite IFeatureReference configuredFeatures cSite getConfiguredFeatures ConfigurationPolicy cPolicy cSite getConfigurationPolicy UpdateCore UpdateCore DEBUG_SHOW_RECONCILER UpdateCore configuredSite getSite indexConfiguredFeatures indexConfiguredFeatures configuredFeatures indexConfiguredFeatures IFeatureReference featureToCompare configuredFeatures indexConfiguredFeatures restOfConfiguredFeatures indexConfiguredFeatures restOfConfiguredFeatures configuredFeatures restOfConfiguredFeatures featureToCompare configuredFeatures restOfConfiguredFeatures cPolicy configuredFeatures restOfConfiguredFeatures cPolicy featureToCompare
compare two feature references returns 0 if the feature are different returns 1 if the version of feature 1 is greater than the version of feature 2 returns 2 if opposite private static int compare I Feature Reference feature Ref1 I Feature Reference feature Ref2 throws Core Exception TRACE if Update Core DEBUG Update Core DEBUG SHOW RECONCILER Update Core debug Compare feature Ref1 feature Ref2 NON NLS 1 NON NLS 2 if feature Ref1 null return 0 I Feature feature1 null I Feature feature2 null try feature1 feature Ref1 get Feature null feature2 feature Ref2 get Feature null catch Core Exception e Update Core warn null e return 0 if feature1 null feature2 null return 0 Versioned Identifier id1 feature1 get Versioned Identifier Versioned Identifier id2 feature2 get Versioned Identifier if id1 null id2 null return 0 if id1 get Identifier null id1 get Identifier equals id2 get Identifier Plugin Version Identifier version1 id1 get Version Plugin Version Identifier version2 id2 get Version if version1 null if version1 is Greater Than version2 return 1 else return 2 else return 2 return 0  IFeatureReference featureRef1 IFeatureReference featureRef2 CoreException UpdateCore UpdateCore DEBUG_SHOW_RECONCILER UpdateCore featureRef1 featureRef2 featureRef1 IFeature IFeature featureRef1 getFeature featureRef2 getFeature CoreException UpdateCore VersionedIdentifier getVersionedIdentifier VersionedIdentifier getVersionedIdentifier getIdentifier getIdentifier getIdentifier PluginVersionIdentifier getVersion PluginVersionIdentifier getVersion isGreaterThan
Validate the list of configured features eliminating extra entries if possible Make sure we do not leave configured nested features with holes ie unconfigured children public static void check Configured Features I Configured Site configured Site Note if we hit errors in the various computation methods and throw a Core Exception we will not catch it in this method Consequently we will not attempt to unconfigure any extra features because we would likely get it wrong The platform will run with extra features configured The runtime will eliminate extra plugins based on runtime binding rules determine proposed list of configured features Configured Site c Site Configured Site configured Site debug if Update Core DEBUG Update Core DEBUG SHOW RECONCILER Update Core debug Validate configuration of site c Site get Site getURL NON NLS 1 I Feature Reference configured Refs c Site get Configured Features Array List all Possible Configured Features new Array List for int i 0 i configured Refs length i try I Feature feature configured Refs i get Feature null all Possible Configured Features add feature debug if Update Core DEBUG Update Core DEBUG SHOW RECONCILER Update Core debug configured feature feature get Versioned Identifier to String NON NLS 1 catch Core Exception e Update Core warn e NON NLS 1 find top level features Array List top Features compute Top Features all Possible Configured Features find non efix top level features Array List top Non Efix Features get Non Efix Features top Features expand non efix top level features compute full nesting structures Array List configured Features expand Features top Non Efix Features configured Site retrieve efixes that patch enable feature they must be kept enabled if top Features size top Non Efix Features size Map patches get Patches As Feature all Possible Configured Features if patches is Empty calculate efixes to enable List efixes To Enable get Patches To Enable patches configured Features add efies to keep enable add them to the enable list for Iterator iter efixes To Enable iterator iter has Next I Feature element I Feature iter next Array List expanded Efix new Array List expand Efix Feature element expanded Efix configured Site configured Features add All expanded Efix compute extra features Array List extras diff all Possible Configured Features configured Features unconfigure extra features Configuration Policy c Policy c Site get Configuration Policy for int i 0 i extras size i I Feature feature I Feature extras get i I Feature Reference ref c Site get Site get Feature Reference feature try c Policy unconfigure ref true false debug if Update Core DEBUG Update Core DEBUG SHOW RECONCILER Update Core debug Unconfiguring extra feature feature get Versioned Identifier to String NON NLS 1 catch Core Exception e Update Core warn e NON NLS 1  checkConfiguredFeatures IConfiguredSite configuredSite CoreException ConfiguredSite cSite ConfiguredSite configuredSite UpdateCore UpdateCore DEBUG_SHOW_RECONCILER UpdateCore cSite getSite IFeatureReference configuredRefs cSite getConfiguredFeatures ArrayList allPossibleConfiguredFeatures ArrayList configuredRefs IFeature configuredRefs getFeature allPossibleConfiguredFeatures UpdateCore UpdateCore DEBUG_SHOW_RECONCILER UpdateCore getVersionedIdentifier toString CoreException UpdateCore ArrayList topFeatures computeTopFeatures allPossibleConfiguredFeatures ArrayList topNonEfixFeatures getNonEfixFeatures topFeatures ArrayList configuredFeatures expandFeatures topNonEfixFeatures configuredSite topFeatures topNonEfixFeatures getPatchesAsFeature allPossibleConfiguredFeatures isEmpty efixesToEnable getPatchesToEnable configuredFeatures efixesToEnable hasNext IFeature IFeature ArrayList expandedEfix ArrayList expandEfixFeature expandedEfix configuredSite configuredFeatures addAll expandedEfix ArrayList allPossibleConfiguredFeatures configuredFeatures ConfigurationPolicy cPolicy cSite getConfigurationPolicy IFeature IFeature IFeatureReference cSite getSite getFeatureReference cPolicy UpdateCore UpdateCore DEBUG_SHOW_RECONCILER UpdateCore getVersionedIdentifier toString CoreException UpdateCore
private static Array List compute Top Features Array List features map of Feature by Versioned Identifier Map top Features new Hash Map features size start with the features passed in for Iterator it features iterator it has Next I Feature f I Feature it next top Features put f get Versioned Identifier f remove all features that nest in some other feature for Iterator it features iterator it has Next try I Included Feature Reference children I Feature it next get Included Feature References for int j 0 j children length j try top Features remove children j get Versioned Identifier catch Core Exception e1 if Update Core DEBUG Update Core DEBUG SHOW WARNINGS Update Core warn e1 NON NLS 1 catch Core Exception e Update Core warn e NON NLS 1 Array List list new Array List list add All top Features values debug if Update Core DEBUG Update Core DEBUG SHOW RECONCILER Update Core debug Computed top level features NON NLS 1 for int i 0 i top Features size i Update Core debug I Feature list get i get Versioned Identifier to String NON NLS 1 return list  ArrayList computeTopFeatures ArrayList VersionedIdentifier topFeatures HashMap hasNext IFeature IFeature topFeatures getVersionedIdentifier hasNext IIncludedFeatureReference IFeature getIncludedFeatureReferences topFeatures getVersionedIdentifier CoreException UpdateCore UpdateCore DEBUG_SHOW_WARNINGS UpdateCore CoreException UpdateCore ArrayList ArrayList addAll topFeatures UpdateCore UpdateCore DEBUG_SHOW_RECONCILER UpdateCore topFeatures UpdateCore IFeature getVersionedIdentifier toString
private static Array List expand Features Array List features I Configured Site configured Site Array List result new Array List expand all top level features for int i 0 i features size i expand Feature I Feature features get i result configured Site return result  ArrayList expandFeatures ArrayList IConfiguredSite configuredSite ArrayList ArrayList expandFeature IFeature configuredSite
private static void expand Feature I Feature feature Array List features I Configured Site configured Site add feature if features contains feature features add feature debug if Update Core DEBUG Update Core DEBUG SHOW RECONCILER Update Core debug Retaining configured feature feature get Versioned Identifier to String NON NLS 1 add nested children to the list I Included Feature Reference children null try children feature get Included Feature References catch Core Exception e Update Core warn e NON NLS 1 return for int j 0 j children length j I Feature child null try child children j get Feature null catch Core Exception e if Update Manager Utils is Optional children j Update Core warn e NON NLS 1 25202 do not return right now the peer children may be ok if child null expand Feature child features configured Site  expandFeature IFeature ArrayList IConfiguredSite configuredSite UpdateCore UpdateCore DEBUG_SHOW_RECONCILER UpdateCore getVersionedIdentifier toString IIncludedFeatureReference getIncludedFeatureReferences CoreException UpdateCore IFeature getFeature CoreException UpdateManagerUtils isOptional UpdateCore expandFeature configuredSite
private static Array List diff Array List left Array List right Array List result new Array List determine difference left minus right for int i 0 i left size i I Feature feature I Feature left get i if right contains feature result add feature return result  ArrayList ArrayList ArrayList ArrayList ArrayList IFeature IFeature
private static Map get Patches As Feature Array List all Configured Features get all efixes and the associated patched features Map patches new Hash Map if all Configured Features null Iterator iter all Configured Features iterator while iter has Next List patched FeaturesID new Array List I Feature element I Feature iter next add the patched feature identifiers for int i 0 i element get Imports length i if element get Imports i is Patch Versioned Identifier id element get Imports i get Versioned Identifier if Update Core DEBUG Update Core DEBUG SHOW RECONCILER Update Core debug Found patch element for feature identifier id NON NLS 1 NON NLS 2 patched FeaturesID add id if patched FeaturesID is Empty patches put element patched FeaturesID return patches  getPatchesAsFeature ArrayList allConfiguredFeatures HashMap allConfiguredFeatures allConfiguredFeatures hasNext patchedFeaturesID ArrayList IFeature IFeature getImports getImports isPatch VersionedIdentifier getImports getVersionedIdentifier UpdateCore UpdateCore DEBUG_SHOW_RECONCILER UpdateCore patchedFeaturesID patchedFeaturesID isEmpty patchedFeaturesID
private static List get Patches To Enable Map efixes Array List configured Features Array List enabled Versioned Identifier new Array List Iterator iter configured Features iterator while iter has Next I Feature element I Feature iter next enabled Versioned Identifier add element get Versioned Identifier loop through the patches List result new Array List iter efixes key Set iterator while iter has Next boolean to Enable false I Feature efix Feature I Feature iter next List patched Features List efixes get efix Feature loop through the patched features identifier the for this patch see if it the patch patches at least one enable feature Iterator patched Features Iter patched Features iterator while patched Features Iter has Next to Enable Versioned Identifier patched FeatureID Versioned Identifier patched Features Iter next if enabled Versioned Identifier contains patched FeatureID to Enable true if to Enable if Update Core DEBUG Update Core DEBUG SHOW RECONCILER Update Core debug The Patch efix Feature does not patch any enabled features it will be disabled NON NLS 1 NON NLS 2 else if Update Core DEBUG Update Core DEBUG SHOW RECONCILER Update Core debug The patch efix Feature will be enabled NON NLS 1 NON NLS 2 result add efix Feature return result  getPatchesToEnable ArrayList configuredFeatures ArrayList enabledVersionedIdentifier ArrayList configuredFeatures hasNext IFeature IFeature enabledVersionedIdentifier getVersionedIdentifier ArrayList keySet hasNext toEnable IFeature efixFeature IFeature patchedFeatures efixFeature patchedFeaturesIter patchedFeatures patchedFeaturesIter hasNext toEnable VersionedIdentifier patchedFeatureID VersionedIdentifier patchedFeaturesIter enabledVersionedIdentifier patchedFeatureID toEnable toEnable UpdateCore UpdateCore DEBUG_SHOW_RECONCILER UpdateCore efixFeature UpdateCore UpdateCore DEBUG_SHOW_RECONCILER UpdateCore efixFeature efixFeature
private static Array List get Non Efix Features Array List top Features Map efix Features get Patches As Feature top Features Set key Set efix Features key Set if key Set null key Set is Empty return top Features Iterator iter top Features iterator Array List result new Array List while iter has Next I Feature element I Feature iter next if key Set contains element result add element return result  ArrayList getNonEfixFeatures ArrayList topFeatures efixFeatures getPatchesAsFeature topFeatures keySet efixFeatures keySet keySet keySet isEmpty topFeatures topFeatures ArrayList ArrayList hasNext IFeature IFeature keySet
private static void expand Efix Feature I Feature feature Array List features I Configured Site configured Site add feature if features contains feature features add feature debug if Update Core DEBUG Update Core DEBUG SHOW RECONCILER Update Core debug Retaining configured feature feature get Versioned Identifier to String NON NLS 1 add nested children to the list I Included Feature Reference children null try children feature get Included Feature References catch Core Exception e Update Core warn e NON NLS 1 return for int j 0 j children length j I Feature child null try child children j get Feature null catch Core Exception e if children j is Optional Update Core warn e NON NLS 1 25202 do not return right now the peer children may be ok if child null if Update Core is Patch child expand Efix Feature child features configured Site  expandEfixFeature IFeature ArrayList IConfiguredSite configuredSite UpdateCore UpdateCore DEBUG_SHOW_RECONCILER UpdateCore getVersionedIdentifier toString IIncludedFeatureReference getIncludedFeatureReferences CoreException UpdateCore IFeature getFeature CoreException isOptional UpdateCore UpdateCore isPatch expandEfixFeature configuredSite

public Site Status Analyzer Site Local site Local this site Local site Local  SiteStatusAnalyzer SiteLocal siteLocal siteLocal siteLocal
public Plugin Identifier Versioned Identifier id String label boolean fragment this id id this label label this is Fragment fragment  PluginIdentifier VersionedIdentifier isFragment
public Versioned Identifier get Versioned Identifier return id  VersionedIdentifier getVersionedIdentifier
public boolean is Fragment return is Fragment  isFragment isFragment
public String get Label return label  getLabel
private I Status get Status I Feature feature validate site I Site feature Site feature get Site if feature Site null if Update Core DEBUG Update Core DEBUG SHOW CONFIGURATION Update Core debug Cannot determine status of feature feature get Label Site is NULL NON NLS 1 NON NLS 2 String msg Policy bind Site Local Unable To Determine Feature Status Site Null new Object feature getURL NON NLS 1 return create Status I Status ERROR I Feature STATUS AMBIGUOUS msg null validate configured site Configured Site c Site Configured Site feature Site get Current Configured Site if c Site null if Update Core DEBUG Update Core DEBUG SHOW CONFIGURATION Update Core warn Cannot determine status of feature feature get Label Configured Site is NULL NON NLS 1 NON NLS 2 String msg Policy bind Site Local Unable To Determine Feature Status Configured Site Null new Object feature getURL NON NLS 1 return create Status I Status ERROR I Feature STATUS AMBIGUOUS msg null check if disable if so return I Feature Reference ref c Site get Site get Feature Reference feature if ref null if c Site get Configuration Policy is Configured ref return create Status I Status OK I Feature STATUS DISABLED null NON NLS 1 else if Update Core DEBUG Update Core DEBUG SHOW CONFIGURATION Update Core warn Unable to find reference for feature feature in site c Site get Site getURL NON NLS 1 NON NLS 2 check if broken I Status status c Site get Broken Status feature if status get Severity I Status OK if Update Core DEBUG Update Core DEBUG SHOW CONFIGURATION Update Core debug Feature broken feature get Label Site c Site to String NON NLS 1 NON NLS 2 return status check ambiguous against registry 17015 I Plugin Entry features Entries feature get Plugin Entries return status features Entries  IStatus getStatus IFeature ISite featureSite getSite featureSite UpdateCore UpdateCore DEBUG_SHOW_CONFIGURATION UpdateCore getLabel SiteLocal UnableToDetermineFeatureStatusSiteNull createStatus IStatus IFeature STATUS_AMBIGUOUS ConfiguredSite cSite ConfiguredSite featureSite getCurrentConfiguredSite cSite UpdateCore UpdateCore DEBUG_SHOW_CONFIGURATION UpdateCore getLabel SiteLocal UnableToDetermineFeatureStatusConfiguredSiteNull createStatus IStatus IFeature STATUS_AMBIGUOUS IFeatureReference cSite getSite getFeatureReference cSite getConfigurationPolicy isConfigured createStatus IStatus IFeature STATUS_DISABLED UpdateCore UpdateCore DEBUG_SHOW_CONFIGURATION UpdateCore cSite getSite IStatus cSite getBrokenStatus getSeverity IStatus UpdateCore UpdateCore DEBUG_SHOW_CONFIGURATION UpdateCore getLabel cSite toString IPluginEntry featuresEntries getPluginEntries featuresEntries
public I Status get Feature Status I Feature feature throws Core Exception I Feature child Feature null I Status child Status I Feature Reference children feature get Included Feature References consider disable check the current feature String msg Policy bind Site Local Feature Disable NON NLS 1 int code I Feature STATUS DISABLED I Status feature Status get Status feature Multi Status multi Temp new Multi Status feature Status get Plugin code msg null if feature Status get Severity I Status ERROR if feature Status is Multi Status multi Temp add All feature Status else multi Temp add feature Status preserve the worse code through the method self assesment children assessment if feature Status get Code code code feature Status get Code do not check children if feature is disable if code I Feature STATUS DISABLED for int i 0 i children length i if Update Manager Utils is Optional children i try child Feature children i get Feature null catch Core Exception e if Update Manager Utils is Optional children i Update Core warn Error retrieving feature children i NON NLS 1 if child Feature null Update Core warn get Feature Status Feature is null for children i NON NLS 1 Unable to find children feature broken Object feature As Printable Object children i getURL feature As Printable Object children i get Versioned Identifier String msg1 Policy bind Site Local Nested Feature Unavailable new Object feature As Printable Object NON NLS 1 multi Temp add create Status I Status ERROR I Feature STATUS UNHAPPY msg1 null if I Feature STATUS UNHAPPY code code I Feature STATUS UNHAPPY else child Status get Feature Status child Feature do not add the status add the children status as get Feature Status returns a multi Status if child Status get Code I Feature STATUS DISABLED Versioned Identifier versionID child Feature get Versioned Identifier String feature Ver versionID null versionID get Version to String NON NLS 1 String msg1 Policy bind Site Local Nested Feature Disable child Feature get Label feature Ver NON NLS 1 multi Temp add create Status I Status ERROR child Status get Code msg1 null if I Feature STATUS UNHAPPY code code I Feature STATUS UNHAPPY if child Status get Severity I Status OK Versioned Identifier versionID child Feature get Versioned Identifier String feature Ver versionID null versionID get Version to String NON NLS 1 String msg1 Policy bind Site Local Nested Feature Un Happy child Feature get Label feature Ver NON NLS 1 multi Temp add create Status I Status ERROR child Status get Code msg1 null if child Status get Code code code child Status get Code set message switch code case I Feature STATUS HAPPY msg Policy bind Site Local Feature Happy NON NLS 1 break case I Feature STATUS UNHAPPY msg Policy bind Site Local Feature Un Happy NON NLS 1 break case I Feature STATUS AMBIGUOUS msg Policy bind Site Local Feature Ambiguous NON NLS 1 break case I Feature STATUS DISABLED msg Policy bind Site Local Feature Disable NON NLS 1 break default msg Policy bind Site Local Feature Status Unknown NON NLS 1 break Multi Status multi new Multi Status feature Status get Plugin code msg null multi add All multi Temp return multi  IStatus getFeatureStatus IFeature CoreException IFeature childFeature IStatus childStatus IFeatureReference getIncludedFeatureReferences SiteLocal FeatureDisable IFeature STATUS_DISABLED IStatus featureStatus getStatus MultiStatus multiTemp MultiStatus featureStatus getPlugin featureStatus getSeverity IStatus featureStatus isMultiStatus multiTemp addAll featureStatus multiTemp featureStatus featureStatus getCode featureStatus getCode IFeature STATUS_DISABLED UpdateManagerUtils isOptional childFeature getFeature CoreException UpdateManagerUtils isOptional UpdateCore childFeature UpdateCore getFeatureStatus featureAsPrintableObject featureAsPrintableObject getVersionedIdentifier SiteLocal NestedFeatureUnavailable featureAsPrintableObject multiTemp createStatus IStatus IFeature STATUS_UNHAPPY IFeature STATUS_UNHAPPY IFeature STATUS_UNHAPPY childStatus getFeatureStatus childFeature getFeatureStatus multiStatus childStatus getCode IFeature STATUS_DISABLED VersionedIdentifier childFeature getVersionedIdentifier featureVer getVersion toString SiteLocal NestedFeatureDisable childFeature getLabel featureVer multiTemp createStatus IStatus childStatus getCode IFeature STATUS_UNHAPPY IFeature STATUS_UNHAPPY childStatus getSeverity IStatus VersionedIdentifier childFeature getVersionedIdentifier featureVer getVersion toString SiteLocal NestedFeatureUnHappy childFeature getLabel featureVer multiTemp createStatus IStatus childStatus getCode childStatus getCode childStatus getCode IFeature STATUS_HAPPY SiteLocal FeatureHappy IFeature STATUS_UNHAPPY SiteLocal FeatureUnHappy IFeature STATUS_AMBIGUOUS SiteLocal FeatureAmbiguous IFeature STATUS_DISABLED SiteLocal FeatureDisable SiteLocal FeatureStatusUnknown MultiStatus MultiStatus featureStatus getPlugin addAll multiTemp
private I Status status I Plugin Entry feature Plugins Versioned Identifier feature PluginID String happyMSG Policy bind Site Local Feature Happy NON NLS 1 String ambiguousMSG Policy bind Site Local Feature Ambiguous NON NLS 1 I Status feature Status create Status I Status OK I Feature STATUS HAPPY null NON NLS 1 Multi Status multi new Multi Status feature Status get Plugin I Feature STATUS AMBIGUOUS ambiguousMSG null Package Admin pkg Admin Update Core get Plugin get Package Admin is Ambigous if we find a plugin from the feature with a different version and not the one we are looking for int i 0 i feature Plugins length i Multi Status tempmulti new Multi Status feature Status get Plugin I Feature STATUS AMBIGUOUS ambiguousMSG null feature PluginID feature Plugins i get Versioned Identifier boolean found false String single Version Range feature PluginID get Version to String feature PluginID get Version to String Bundle bundles pkg Admin get Bundles feature PluginID get Identifier single Version Range if bundles null bundles length 1 found true continue Check if there is another feature with this plugin but different version log it bundles pkg Admin get Bundles feature PluginID get Identifier null for int j 0 bundles null j bundles length j String bundle Version String bundles j get Headers get Constants BUNDLE VERSION I Feature feature get Feature For Id new Versioned Identifier bundles j get Symbolic Name bundle Version String msg null if feature null Object values new Object bundles j get Symbolic Name feature PluginID get Version bundle Version msg Policy bind Site Local Two Version Same Plugin1 values NON NLS 1 else String label feature get Label String feature Version feature get Versioned Identifier get Version to String Object values new Object bundles j get Symbolic Name feature PluginID get Version bundle Version label feature Version msg Policy bind Site Local Two Version Same Plugin2 values NON NLS 1 Update Core warn Found another version of the same plugin on the path bundles j get Symbolic Name bundle Version NON NLS 1 NON NLS 2 tempmulti add create Status I Status ERROR I Feature STATUS AMBIGUOUS msg null if we haven t found the exact plugin add the children of temp Multi i e the other we found if we have no children we have a problem as a required plugin is not there at all if found if tempmulti get Children length 0 multi add All tempmulti else if multi get Code I Feature STATUS UNHAPPY String unhappyMSG Policy bind Site Local Feature Un Happy NON NLS 1 Multi Status new Multi new Multi Status feature Status get Plugin I Feature STATUS UNHAPPY unhappyMSG null new Multi add All multi multi new Multi String msg Policy bind Site Local No Plugin Version feature PluginID get Identifier NON NLS 1 multi add create Status I Status ERROR I Feature STATUS UNHAPPY msg null if multi isOK return multi we return happy as we consider the is Broken verification has been done return create Status I Status OK I Feature STATUS HAPPY happyMSG null  IStatus IPluginEntry featurePlugins VersionedIdentifier featurePluginID SiteLocal FeatureHappy SiteLocal FeatureAmbiguous IStatus featureStatus createStatus IStatus IFeature STATUS_HAPPY MultiStatus MultiStatus featureStatus getPlugin IFeature STATUS_AMBIGUOUS PackageAdmin pkgAdmin UpdateCore getPlugin getPackageAdmin featurePlugins MultiStatus MultiStatus featureStatus getPlugin IFeature STATUS_AMBIGUOUS featurePluginID featurePlugins getVersionedIdentifier singleVersionRange featurePluginID getVersion toString featurePluginID getVersion toString pkgAdmin getBundles featurePluginID getIdentifier singleVersionRange pkgAdmin getBundles featurePluginID getIdentifier bundleVersion getHeaders BUNDLE_VERSION IFeature getFeatureForId VersionedIdentifier getSymbolicName bundleVersion getSymbolicName featurePluginID getVersion bundleVersion SiteLocal TwoVersionSamePlugin1 getLabel featureVersion getVersionedIdentifier getVersion toString getSymbolicName featurePluginID getVersion bundleVersion featureVersion SiteLocal TwoVersionSamePlugin2 UpdateCore getSymbolicName bundleVersion createStatus IStatus IFeature STATUS_AMBIGUOUS tempMulti getChildren addAll getCode IFeature STATUS_UNHAPPY SiteLocal FeatureUnHappy MultiStatus newMulti MultiStatus featureStatus getPlugin IFeature STATUS_UNHAPPY newMulti addAll newMulti SiteLocal NoPluginVersion featurePluginID getIdentifier createStatus IStatus IFeature STATUS_UNHAPPY isBroken createStatus IStatus IFeature STATUS_HAPPY
private I Status create Status int status Severity int status Code String msg Exception e String id Update Core get Plugin get Bundle get Symbolic Name String Buffer complete String new String Buffer NON NLS 1 if msg null complete String append msg if e null complete String append r n NON NLS 1 complete String append e to String complete String append r n NON NLS 1 return new Status status Severity id status Code complete String to String e  IStatus createStatus statusSeverity statusCode UpdateCore getPlugin getBundle getSymbolicName StringBuffer completeString StringBuffer completeString completeString completeString toString completeString statusSeverity statusCode completeString toString
private I Feature get All Configured Features if all Configured Features null all Configured Features new Array List I Configured Site all Configured Sites site Local get Current Configuration get Configured Sites for int i 0 i all Configured Sites length i I Feature Reference refs all Configured Sites i get Configured Features I Feature feature null for int j 0 j refs length j feature null try feature refs j get Feature null catch Core Exception e if feature null all Configured Features add feature I Feature features new I Feature all Configured Features size if all Configured Features size 0 all Configured Features to Array features return features  IFeature getAllConfiguredFeatures allConfiguredFeatures allConfiguredFeatures ArrayList IConfiguredSite allConfiguredSites siteLocal getCurrentConfiguration getConfiguredSites allConfiguredSites IFeatureReference allConfiguredSites getConfiguredFeatures IFeature getFeature CoreException allConfiguredFeatures IFeature IFeature allConfiguredFeatures allConfiguredFeatures allConfiguredFeatures toArray
private I Feature get Feature For Id Versioned Identifier id if id null return null I Feature all Features get All Configured Features I Feature current Feature null I Plugin Entry all Plugins null I Plugin Entry current Plugin null for int i 0 i all Features length i current Feature all Features i all Plugins current Feature get Plugin Entries for int j 0 j all Plugins length j current Plugin all Plugins j if id equals current Plugin get Versioned Identifier return current Feature return null  IFeature getFeatureForId VersionedIdentifier IFeature allFeatures getAllConfiguredFeatures IFeature currentFeature IPluginEntry allPlugins IPluginEntry currentPlugin allFeatures currentFeature allFeatures allPlugins currentFeature getPluginEntries allPlugins currentPlugin allPlugins currentPlugin getVersionedIdentifier currentFeature

public final class Site Type Factory  SiteTypeFactory
extension point ID public static final String SIMPLE EXTENSION ID site Types NON NLS 1  SIMPLE_EXTENSION_ID siteTypes
private static Site Type Factory inst private Map factories hide ctr private Site Type Factory  SiteTypeFactory SiteTypeFactory
public static Site Type Factory get Instance if inst null inst new Site Type Factory  SiteTypeFactory getInstance SiteTypeFactory

import java net import org eclipse core runtime 
public class SiteURL Content Provider extends Site Content Provider public static final String SITE TYPE org eclipse update core http NON NLS 1  SiteURLContentProvider SiteContentProvider SITE_TYPE
Constructor for HTTP Site public SiteURL Content Provider URL url super url see I Site Content Provider get Archive Reference String public URL get Archive Reference String archive Id throws Core Exception  HTTPSite SiteURLContentProvider ISiteContentProvider getArchiveReference getArchiveReference archiveId CoreException

import java io import java net 
public I Site create Site URL url throws Core Exception Invalid Site Type Exception return create Site url null see I Site Factory create Site URL boolean the URL can be of the following form 1 protocol 2 protocol 3 protocol site xml 1 If the file of the file of teh url ends with attempt to open the stream if it fails add site xml and attempt to open the stream 2 attempt to open the stream fail add site xml and attempt to open the stream  ISite createSite CoreException InvalidSiteTypeException createSite ISiteFactory createSite
attempt to parse if it fails add site xml and attempt to open teh stream 3 open the stream 

Constructor for Target Feature public Target Feature super  TargetFeature TargetFeature
Sets the content Consumer public void set Content Consumer I Feature Content Consumer content Consumer this content Consumer content Consumer content Consumer set Feature this  setContentConsumer IFeatureContentConsumer contentConsumer contentConsumer contentConsumer contentConsumer setFeature
public I Feature Content Consumer get Feature Content Consumer throws Core Exception if this content Consumer null throw Utilities new Core Exception Policy bind Feature No Feature Content Consumer getURL to External Form null NON NLS 1 return content Consumer  IFeatureContentConsumer getFeatureContentConsumer CoreException contentConsumer newCoreException NoFeatureContentConsumer toExternalForm contentConsumer

The constructor public Update Core plugin this  UpdateCore
Returns the shared instance public static Update Core get Plugin return plugin  UpdateCore getPlugin
Returns the manager that manages URL connection threads public Connection Thread Manager get Connection Manager if connection Manager null connection Manager new Connection Thread Manager return connection Manager  ConnectionThreadManager getConnectionManager connectionManager connectionManager ConnectionThreadManager connectionManager
private boolean get Boolean Debug Option String flag boolean dflt String result Platform get Debug Option flag if result null return dflt else return result trim equals Ignore Case true NON NLS 1  getBooleanDebugOption getDebugOption equalsIgnoreCase
dumps a String in the trace public static void debug String s String Buffer msg new String Buffer msg append get Plugin to String msg append NON NLS 1 msg append Integer to Hex String Thread current Thread hash Code msg append NON NLS 1 msg append s System out println msg to String  StringBuffer StringBuffer getPlugin toString toHexString currentThread hashCode toString
Dumps a String in the log if WARNING is set to true public static void warn String s if DEBUG DEBUG SHOW WARNINGS if s null s WARNING s NON NLS 1 log s null  DEBUG_SHOW_WARNINGS
Dumps an exception in the log if WARNING is set to true param s log string param e exception to be logged since 2 0 public static void warn String s Throwable e if DEBUG DEBUG SHOW WARNINGS if s null s UPDATE MANAGER INFO s NON NLS 1 log s e  DEBUG_SHOW_WARNINGS
Logs a status public static void log I Status status Update Core get Plugin get Log log status  IStatus UpdateCore getPlugin getLog
Logs an error public static void log Throwable e log e NON NLS 1 
Logs a string and an error public static void log String msg Throwable e I Status status null if e instanceof Core Exception status Core Exception e get Status else status Utilities new Core Exception msg e get Status if status null log status  IStatus CoreException CoreException getStatus newCoreException getStatus
param new Configuration public static void log I Install Configuration new Configuration if log null log log new Configuration  newConfiguration IInstallConfiguration newConfiguration newConfiguration
private static File get Install Log File throws IO Exception I Platform Configuration config Configurator Utils get Current Platform Configuration URL configuration Location config get Configuration Location if configuration Location null warn Unable to retrieve location for update manager log file NON NLS 1 return null URL config Location Platform resolve configuration Location File update State Location null if file equals Ignore Case configuration Location get Protocol NON NLS 1 File path new File configuration Location get File update State Location new File path get Parent File LOG FILE return update State Location  getInstallLogFile IOException IPlatformConfiguration ConfiguratorUtils getCurrentPlatformConfiguration configurationLocation getConfigurationLocation configurationLocation configLocation configurationLocation updateStateLocation equalsIgnoreCase configurationLocation getProtocol configurationLocation getFile updateStateLocation getParentFile LOG_FILE updateStateLocation
Sends the GET request to the server and returns the server s response param url the URL to open on the server return the server s response throws IO Exception if an I O error occurs Reasons include ul li The client is closed li The client could not connect to the server li An I O error occurs while communicating with the server ul public Response get URL url throws IO Exception Request request null Response response null if file equals url get Protocol NON NLS 1 response new File Response url else if url null url get Protocol starts With http NON NLS 1 response new Http Response url else response new Other Response url else try request new Request GET url null response client invoke request finally if request null try request close catch IO Exception e e print Stack Trace return response  IOException IOException getProtocol FileResponse getProtocol startsWith HttpResponse OtherResponse IOException printStackTrace
public static boolean is Patch I Feature candidate I Import imports candidate get Imports for int i 0 i imports length i I Import iimport imports i if iimport is Patch return true return false  isPatch IFeature IImport getImports IImport isPatch
public void start Bundle Context context throws Exception super start context this context context Policy localize org eclipse update internal core messages NON NLS 1 DEBUG get Boolean Debug Option org eclipse update core debug false NON NLS 1 if DEBUG DEBUG SHOW WARNINGS get Boolean Debug Option org eclipse update core debug warning false NON NLS 1 DEBUG SHOW PARSING get Boolean Debug Option org eclipse update core debug parsing false NON NLS 1 DEBUG SHOW INSTALL get Boolean Debug Option org eclipse update core debug install false NON NLS 1 DEBUG SHOW CONFIGURATION get Boolean Debug Option org eclipse update core debug configuration false NON NLS 1 DEBUG SHOW TYPE get Boolean Debug Option org eclipse update core debug type false NON NLS 1 DEBUG SHOW WEB get Boolean Debug Option org eclipse update core debug web false NON NLS 1 DEBUG SHOW IHANDLER get Boolean Debug Option org eclipse update core debug installhandler false NON NLS 1 DEBUG SHOW RECONCILER get Boolean Debug Option org eclipse update core debug reconciler false NON NLS 1 try File log File get Install Log File if log File null log new Update Manager Log Writer log File catch IO Exception e warn e NON NLS 1 Site Manager set Http Proxy Info get Plugin Preferences get Boolean HTTP PROXY ENABLE get Plugin Preferences get String HTTP PROXY HOST get Plugin Preferences get String HTTP PROXY PORT  BundleContext getBooleanDebugOption DEBUG_SHOW_WARNINGS getBooleanDebugOption DEBUG_SHOW_PARSING getBooleanDebugOption DEBUG_SHOW_INSTALL getBooleanDebugOption DEBUG_SHOW_CONFIGURATION getBooleanDebugOption DEBUG_SHOW_TYPE getBooleanDebugOption DEBUG_SHOW_WEB getBooleanDebugOption DEBUG_SHOW_IHANDLER getBooleanDebugOption DEBUG_SHOW_RECONCILER getBooleanDebugOption logFile getInstallLogFile logFile UpdateManagerLogWriter logFile IOException SiteManager setHttpProxyInfo getPluginPreferences getBoolean HTTP_PROXY_ENABLE getPluginPreferences getString HTTP_PROXY_HOST getPluginPreferences getString HTTP_PROXY_PORT
public void stop Bundle Context context throws Exception super stop context Jar Content Reference shutdown make sure we are not leaving jars open Utilities shutdown cleanup temp area if log null log shutdown if connection Manager null connection Manager shutdown this context null if pkg Admin Tracker null pkg Admin Tracker close pkg Admin Tracker null  BundleContext JarContentReference connectionManager connectionManager pkgAdminTracker pkgAdminTracker pkgAdminTracker
Bundle Context get Bundle Context return context  BundleContext getBundleContext
Package Admin get Package Admin if pkg Admin Tracker null pkg Admin Tracker new Service Tracker context Package Admin class get Name null pkg Admin Tracker open return Package Admin pkg Admin Tracker get Service  PackageAdmin getPackageAdmin pkgAdminTracker pkgAdminTracker ServiceTracker PackageAdmin getName pkgAdminTracker PackageAdmin pkgAdminTracker getService

public Update Manager Log Writer File file this log File file Update Core warn UPDATE MANAGER LOG Location file get Absolute Path NON NLS 1 If the file does not exist prime it with the sites in the exisiting config if file exists init Log  UpdateManagerLogWriter logFile UpdateCore getAbsolutePath initLog
private void init Log try I Platform Configuration runtime Config Configurator Utils get Current Platform Configuration I Platform Configuration I Site Entry sites runtime Config get Configured Sites Configuration Activity activities new Configuration Activity sites length for int i 0 i sites length i activities i new Configuration Activity I Activity ACTION SITE INSTALL activities i set Label Platform as LocalURL sites i getURL to External Form activities i set Date new Date activities i set Status I Activity STATUS OK Date date new Date runtime Config get Change Stamp safe Write Configuration date activities catch Exception e silently ignore errors  initLog IPlatformConfiguration runtimeConfig ConfiguratorUtils getCurrentPlatformConfiguration IPlatformConfiguration ISiteEntry runtimeConfig getConfiguredSites ConfigurationActivity ConfigurationActivity ConfigurationActivity IActivity ACTION_SITE_INSTALL setLabel asLocalURL toExternalForm setDate setStatus IActivity STATUS_OK runtimeConfig getChangeStamp safeWriteConfiguration
private void close Log File throws IO Exception try if log null log flush log close finally log null  closeLogFile IOException
public void log I Install Configuration install Config safe Write Configuration install Config get Creation Date install Config get Activities  IInstallConfiguration installConfig safeWriteConfiguration installConfig getCreationDate installConfig getActivities
private void open Log File try log new Buffered Writer new Output Stream Writer new File Output Stream log File get Absolute Path true UTF 8 NON NLS 1 catch IO Exception e there was a problem opening the log file so log to the console log log For Stream System err  openLogFile BufferedWriter OutputStreamWriter FileOutputStream logFile getAbsolutePath IOException logForStream
private String get Formatted Date Date date try Date Format formatter new Simple Date Format MMM dd yyyy kk mm ss SS NON NLS 1 return formatter format date catch Exception e If there were problems writing out the date ignore and continue since that shouldn t stop us from losing the rest of the information return Long to String System current Time Millis  getFormattedDate DateFormat SimpleDateFormat toString currentTimeMillis
private Writer log For Stream Output Stream output try return new Buffered Writer new Output Stream Writer output UTF 8 NON NLS 1 catch Unsupported Encoding Exception e return new Buffered Writer new Output Stream Writer output  logForStream OutputStream BufferedWriter OutputStreamWriter UnsupportedEncodingException BufferedWriter OutputStreamWriter
public synchronized void shutdown try if log File null close Log File log File null else if log null Writer old log log null old flush old close catch IO Exception e we ve shutdown the log so not much else we can do e print Stack Trace  logFile closeLogFile logFile IOException printStackTrace
private synchronized void safe Write Configuration Date date I Activity activities thread safety Concurrency003 if log File null open Log File if log null log log For Stream System err try try write date activities finally if log File null close Log File else log flush catch Exception e System err println An exception occurred while writing to the update manager log NON NLS 1 e print Stack Trace System err System err println Logging to the console instead NON NLS 1 we failed to write so dump log entry to console instead try log log For Stream System err write date activities log flush catch Exception e2 System err println An exception occurred while logging to the console NON NLS 1 e2 print Stack Trace System err finally log null  safeWriteConfiguration IActivity logFile openLogFile logForStream logFile closeLogFile printStackTrace logForStream printStackTrace
private void write Date date I Activity activities throws IO Exception writeln write CONFIGURATION write Space write String value Of date get Time write Space write date to String writeln for int i 0 i activities length i write activities i  IActivity IOException writeSpace valueOf getTime writeSpace toString
private void write I Activity activity throws IO Exception write ACTIVITY write Space write String value Of activity get Date get Time write Space write get Formatted Date activity get Date write Space write activity get Label write Space write get Action activity get Action write Space write activity get Status I Activity STATUS OK SUCCESS FAILURE writeln  IActivity IOException writeSpace valueOf getDate getTime writeSpace getFormattedDate getDate writeSpace getLabel writeSpace getAction getAction writeSpace getStatus IActivity STATUS_OK
private String get Action int i switch i case I Activity ACTION FEATURE INSTALL return FEATURE INSTALL case I Activity ACTION FEATURE REMOVE return FEATURE REMOVE case I Activity ACTION SITE INSTALL return SITE INSTALL case I Activity ACTION SITE REMOVE return SITE REMOVE case I Activity ACTION UNCONFIGURE return UNCONFIGURE case I Activity ACTION CONFIGURE return CONFIGURE case I Activity ACTION REVERT return REVERT case I Activity ACTION RECONCILIATION return RECONCILIATION case I Activity ACTION ADD PRESERVED return PRESERVED default return UNKNOWN i NON NLS 1 NON NLS 2  getAction IActivity ACTION_FEATURE_INSTALL FEATURE_INSTALL IActivity ACTION_FEATURE_REMOVE FEATURE_REMOVE IActivity ACTION_SITE_INSTALL SITE_INSTALL IActivity ACTION_SITE_REMOVE SITE_REMOVE IActivity ACTION_UNCONFIGURE IActivity ACTION_CONFIGURE IActivity ACTION_REVERT IActivity ACTION_RECONCILIATION IActivity ACTION_ADD_PRESERVED
private void writeln throws IO Exception write LINE SEPARATOR  IOException LINE_SEPARATOR
private void write String message throws IO Exception if message null log write message  IOException
private void write Space throws IO Exception write NON NLS 1  writeSpace IOException

private static boolean OS UNIX org eclipse osgi service environment Constants OS HPUX equals Platform getOS org eclipse osgi service environment Constants OS AIX equals Platform getOS org eclipse osgi service environment Constants OS LINUX equals Platform getOS org eclipse osgi service environment Constants OS SOLARIS equals Platform getOS private static Fragment Entry no Fragments new Fragment Entry 0 private static Map table static table new Hash Map table put compatible new Integer I Import RULE COMPATIBLE NON NLS 1 table put perfect new Integer I Import RULE PERFECT NON NLS 1 table put equivalent new Integer I Import RULE EQUIVALENT NON NLS 1  OS_UNIX OS_HPUX OS_AIX OS_LINUX OS_SOLARIS FragmentEntry noFragments FragmentEntry HashMap IImport RULE_COMPATIBLE IImport RULE_PERFECT IImport RULE_EQUIVALENT
private static Writer writer manage URL to File private static Map url File Map private static Map local File Fragment Map private static Stack buffer Pool private static final int BUFFER SIZE 4096 4kbytes private static final int INCREMENT SIZE 10240 10kbytes return the url String if it is a absolute URL otherwise return the default URL if the url String is null The defaultURL may point ot a file create a file URL then if the url String or the default URL are relatives prepend the rootURL to it public static URL getURL URL rootURL String url String String defaultURL throws MalformedURL Exception URL url null if no URL provide Default if url String null url String trim equals NON NLS 1 no URL no default return right now if defaultURL null defaultURL trim equals NON NLS 1 return null else url String defaultURL URL can be relative or absolute if url String starts With url String length 1 NON NLS 1 url String url String substring 1 try url new URL url String catch MalformedURL Exception e the url is not an absolute URL try relative url new URL rootURL url String  urlFileMap localFileFragmentMap bufferPool BUFFER_SIZE INCREMENT_SIZE urlString urlString urlString urlString MalformedURLException urlString urlString urlString urlString startsWith urlString urlString urlString urlString MalformedURLException urlString
return url return a relative String to rootURL 
new URL rootURL result String url public static String getURL As String URL rootURL URL url String result null if rootURL null return url null null url to String if no URL return null if url null result url to External Form  resultString getURLAsString toString toExternalForm
if rootURL get Protocol null rootURL get Protocol equals url get Protocol return result if rootURL get Port url get Port return result String rootURL File String rootURL get File rootURL File String rootURL File String replace File separator Char if rootURL File String ends With NON NLS 1 int index rootURL File String last Index Of if index 1  getProtocol getProtocol getProtocol getPort getPort rootURLFileString getFile rootURLFileString rootURLFileString separatorChar rootURLFileString endsWith rootURLFileString lastIndexOf
String url File String url get File if url File String starts With rootURL File String result url File String substring rootURL File String length result result replace File separator Char else we need to check the following file C and file C if file equals Ignore Case url get Protocol NON NLS 1 File root File new File rootURL File String File url File new File url File String  urlFileString getFile urlFileString startsWith rootURLFileString urlFileString rootURLFileString separatorChar equalsIgnoreCase getProtocol rootFile rootURLFileString urlFile urlFileString
File relative Path url File while relative Path null root File equals relative Path get Parent File relative Path relative Path get Parent File if relative Path null Update Core warn Cannot calculate relative path NON NLS 1 return url to String else String relative Root String relative Path get Parent File get Absolute Path  relativePath urlFile relativePath rootFile relativePath getParentFile relativePath relativePath getParentFile relativePath UpdateCore toString relativeRootString relativePath getParentFile getAbsolutePath
if full String starts With relative Root String Update Core warn Full path full String does not start with relative Root String NON NLS 1 NON NLS 2 return url to String else String return String full String substring relative Root String length 1 if url File is Directory return String File separator we lost the last slash when tranforming in File return String return String replace File separator Char  fullString startsWith relativeRootString UpdateCore fullString relativeRootString toString returnString fullString relativeRootString urlFile isDirectory returnString returnString returnString separatorChar
else result url to String return result  toString
returns a translated String public static String get Resource String String infoURL Resource Bundle bundle String result null if infoURL null result Platform get Resource String Update Core get Plugin get Bundle infoURL bundle return result public static URL copy To Local Input Stream source Content Reference Stream String local Name Install Monitor monitor throws MalformedURL Exception IO Exception Install Aborted Exception URL result null create the Dir if they do not exist get the path from the File to resolve File separator do not use the String as it may contain URL like separator  getResourceString ResourceBundle getResourceString UpdateCore getPlugin getBundle copyToLocal InputStream sourceContentReferenceStream localName InstallMonitor MalformedURLException IOException InstallAbortedException
int index local File get Path last Index Of File separator if index 1 File dir new File local File get Path substring 0 index if dir exists dir mkdirs  localFile getPath lastIndexOf localFile getPath
try Utilities copy source Content Reference Stream local Content Reference Stream monitor finally try local Content Reference Stream close catch IO Exception e result local File toURL return result  sourceContentReferenceStream localContentReferenceStream localContentReferenceStream IOException localFile
public static void check Permissions Content Reference ref String file Path if ref get Permission 0  checkPermissions ContentReference filePath getPermission
if file Path null OS UNIX ref get Permission 0 add execute permission on shared libraries 20305 do not remove write permission 20896 chmod a x sl try Process pr Runtime get Runtime exec new String chmod a x file Path NON NLS 1 NON NLS 2 Thread chmod Output new Stream Consumer pr get Input Stream chmod Output set Name chmod output reader NON NLS 1 chmod Output start Thread chmod Error new Stream Consumer pr get Error Stream chmod Error set Name chmod error reader NON NLS 1 chmod Error start catch IO Exception ioe Returns a random file name for the local system attempt to conserve the extension if there is a in the path and no File Seperator after the  filePath OS_UNIX getPermission getRuntime filePath chmodOutput StreamConsumer getInputStream chmodOutput setName chmodOutput chmodError StreamConsumer getErrorStream chmodError setName chmodError IOException
public static String get Local Random Identifier String remote Path Date date int dot Index remote Path last Index Of NON NLS 1 int file Index remote Path last Index Of File separator if there is a separator after the dot do not consider it as an extension String ext dot Index 1 file Index dot Index remote Path substring dot Index NON NLS 1 the name is the string between the separator and the dot if there is no separator it is the string up to the dot  getLocalRandomIdentifier remotePath dotIndex remotePath lastIndexOf fileIndex remotePath lastIndexOf dotIndex fileIndex dotIndex remotePath dotIndex
if dot Index 1 dot Index remote Path length if I have a separator and no dot a b c c if my separator is the last a b c file Index and dot Index are the same so it will return the default temp name  dotIndex dotIndex remotePath fileIndex dotIndex
return result 
remove a file or directory from the file system used to clean up install 
if file exists return if file is Directory String files file list if files null be careful since file list can return null for int i 0 i files length i remove From File System new File file files i if file delete String msg Policy bind Update Manager Utils Unable To Remove File file get Absolute Path NON NLS 1 NON NLS 2 Update Core log msg new Exception  isDirectory removeFromFileSystem UpdateManagerUtils UnableToRemoveFile getAbsolutePath UpdateCore
used to clean up install public static void remove Empty Directories From File System File file if file is Directory return String files file list  removeEmptyDirectoriesFromFileSystem isDirectory
if files null be careful since file list can return null for int i 0 i files length i remove Empty Directories From File System new File file files i if file delete  removeEmptyDirectoriesFromFileSystem
String msg Policy bind Update Manager Utils Unable To Remove File file get Absolute Path NON NLS 1 NON NLS 2 Update Core log msg new Exception  UpdateManagerUtils UnableToRemoveFile getAbsolutePath UpdateCore
not in target array public static I Plugin Entry diff I Plugin Entry source Array I Plugin Entry target Array No plugin Entry to Install return Nothing to instal if source Array null source Array length 0 return new I Plugin Entry 0 No plugin Entry installed Install them all if target Array null target Array length 0  IPluginEntry IPluginEntry sourceArray IPluginEntry targetArray pluginEntry sourceArray sourceArray IPluginEntry pluginEntry targetArray targetArray
if a I Plugin Entry from source Array is NOT in target Array add it to the list List list1 Arrays as List target Array List result new Array List 0 for int i 0 i source Array length i if list1 contains source Array i result add source Array i  IPluginEntry sourceArray targetArray asList targetArray ArrayList sourceArray sourceArray sourceArray
I Plugin Entry result Entry new I Plugin Entry result size if result size 0 result to Array result Entry return result Entry Returns the parent URL of the given URL or code null code if the given URL is the root  IPluginEntry resultEntry IPluginEntry toArray resultEntry resultEntry
td null td tr td http hostname folder file td 
td http hostname folder td table 
public static URL get Parent URL url String file url get File int len file length if len 0 len 1 file char At 0  getParent getFile charAt
for int i len 2 last Slash Index 1 i 0 i if file char At i  lastSlashIndex charAt
if last Slash Index 1 file NON NLS 1 else file file substring 0 last Slash Index 1 try url new URL url get Protocol url get Host url get Port file catch MalformedURL Exception e Assert is True false e get Message  lastSlashIndex lastSlashIndex getProtocol getHost getPort MalformedURLException isTrue getMessage
public static URL as DirectoryURL URL url throws MalformedURL Exception url URL Encoder encode url String path url get File if path ends With NON NLS 1 int index path last Index Of if index 1 path path substring 0 index 1 ignore any ref in original URL  asDirectoryURL MalformedURLException URLEncoder getFile endsWith lastIndexOf
return url 
Compares two URL for equality Return false if one of them is null public static boolean sameURL URL url1 URL url2 
if url1 null url2 null return false if url1 url2 return true if url1 equals url2 return true 
check if URL are file URL as we may have 2 URL pointing to the same feature Reference but with different representation i e file C and file C if file equals Ignore Case url1 get Protocol NON NLS 1  featureReference equalsIgnoreCase getProtocol
return false if file equals Ignore Case url2 get Protocol NON NLS 1 return false File file1 get File For url1 new File url1 get File File file2 get File For url2  equalsIgnoreCase getProtocol getFileFor getFile getFileFor
if file1 null return false return file1 equals file2 Method get File For param url1 return File private static File get File For URL url1 if url File Map null url File Map new Hash Map if url File Map get url1 null return File url File Map get url1 File new File new File url1 get File url File Map put url1 new File return new File returns the list of Feature Reference that are parent of the Feature or an empty array if no parent found param only Optional if set to code true code only return parents that consider the feature optional param child param possibles Parent  getFileFor getFileFor urlFileMap urlFileMap HashMap urlFileMap urlFileMap newFile getFile urlFileMap newFile newFile FeatureReference onlyOptional possiblesParent
return new I Feature Reference 0 List parent List new Array List I Included Feature Reference children null  IFeatureReference parentList ArrayList IIncludedFeatureReference
I Feature compare Feature null for int i 0 i possibles Parent length i try  IFeature compareFeature possiblesParent
I Feature possible Parent Feature possibles Parent i get Feature null if possible Parent Feature null  IFeature possibleParentFeature possiblesParent getFeature possibleParentFeature
for int j 0 j children length j try compare Feature children j get Feature null catch Core Exception e Update Core warn e NON NLS 1  compareFeature getFeature CoreException UpdateCore
if child Feature equals compare Feature if only Optional if Update Manager Utils is Optional children j  childFeature compareFeature onlyOptional UpdateManagerUtils isOptional
else Update Core warn Feature children j not optional Not included in parents list NON NLS 1 NON NLS 2 else parent List add possibles Parent i catch Core Exception e Update Core warn e NON NLS 1  UpdateCore parentList possiblesParent CoreException UpdateCore

Default constructor public Update Preferences Initializer super  UpdatePreferencesInitializer
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 public void initialize Default Preferences Plugin plugin Update Core get Plugin plugin get Plugin Preferences set Default Update Core P CHECK SIGNATURE true plugin get Plugin Preferences set Default Update Core P HISTORY SIZE Update Core DEFAULT HISTORY plugin get Plugin Preferences set Default Update Core P UPDATE VERSIONS Update Core EQUIVALENT VALUE If proxy host and port are set as system properties use them as defaults String proxy Host System get Property http proxy Host NON NLS 1 if proxy Host null proxy Host trim length 0 String proxy Port System get Property http proxy Port NON NLS 1 if proxy Port null proxy Port trim length 0 proxy Port 80 NON NLS 1 plugin get Plugin Preferences set Default Update Core HTTP PROXY ENABLE true plugin get Plugin Preferences set Default Update Core HTTP PROXY HOST proxy Host plugin get Plugin Preferences set Default Update Core HTTP PROXY PORT proxy Port  initializeDefaultPreferences UpdateCore getPlugin getPluginPreferences setDefault UpdateCore P_CHECK_SIGNATURE getPluginPreferences setDefault UpdateCore P_HISTORY_SIZE UpdateCore DEFAULT_HISTORY getPluginPreferences setDefault UpdateCore P_UPDATE_VERSIONS UpdateCore EQUIVALENT_VALUE proxyHost getProperty proxyHost proxyHost proxyHost proxyPort getProperty proxyPort proxyPort proxyPort proxyPort getPluginPreferences setDefault UpdateCore HTTP_PROXY_ENABLE getPluginPreferences setDefault UpdateCore HTTP_PROXY_HOST proxyHost getPluginPreferences setDefault UpdateCore HTTP_PROXY_PORT proxyPort

import java io import java net 
import java util Encodes a code URL code into an code ASCII code readable code URL code that is safe for transport Encoded code URL code s can be decoded using the code URL Decoder code see URL Decoder public final class URL Encoder Prevents instances from being created private URL Encoder Encodes the given file and reference parts of a code URL code into  URLDecoder URLDecoder URLEncoder URLEncoder
an code ASCII code readable code String code that is safe for transport Returns the result return the result of encoding the given file and reference parts of a code URL code into an code ASCII code readable code String code that is safe for transport public static String encode String file String query String ref String Buffer buf new String Buffer  StringBuffer StringBuffer
String Tokenizer tokenizer new String Tokenizer file true NON NLS 1 while tokenizer has More Tokens String token tokenizer next Token if token equals NON NLS 1 buf append token else buf append encode Segment token if query null buf append buf append query  StringTokenizer StringTokenizer hasMoreTokens nextToken encodeSegment
if ref null buf append buf append encode Segment ref return buf to String Encodes the given code URL code into an code ASCII code readable code URL code that is safe for transport Returns the result  encodeSegment toString

Constructor for URL Key public URL Key URL url super this url url  URLKey URLKey
see java lang Object equals Object public boolean equals Object obj if obj null return false if this obj return true if obj instanceof URL Key return equals URL Key obj getURL if obj instanceof URL return false URL url2 URL obj if url url2 return true return Update Manager Utils sameURL url url2  URLKey URLKey UpdateManagerUtils
see java lang Object hash Code public int hash Code return url hash Code  hashCode hashCode hashCode
Returns the url return URL public URL getURL return url 

Constructor for Volume public Volume File root String label int type long size super this root root this label label this type type this size size 
see I Volume get Free Space public long get Free Space return size  IVolume getFreeSpace getFreeSpace
see I Volume get Label public String get Label return label  IVolume getLabel getLabel
see I Volume get Type public int get Type return type  IVolume getType getType
see I Volume get File public File get File return root  IVolume getFile getFile
public Object get Adapter Class arg0 return null  getAdapter

public Mirror Command String feature Id String feature Version String from Site Url String to Site Dir String mirror Url this feature Id feature Id this feature Version feature Version this from Site Url from Site Url this to Site Dir to Site Dir this mirrorURL mirror Url  MirrorCommand featureId featureVersion fromSiteUrl toSiteDir mirrorUrl featureId featureId featureVersion featureVersion fromSiteUrl fromSiteUrl toSiteDir toSiteDir mirrorUrl
true if success public boolean run I Progress Monitor monitor if validate Parameters return false try if get Mirror Site null return false URL remote Site Url new URL from Site Url I Site remote Site Site Manager get Site remote Site Url new Null Progress Monitor I Site Feature Reference feature References To Mirror find Features To Mirror remote Site if feature References To Mirror length 0 Standalone Update Application exception Logged Update Core log Utilities new Core Exception No matching features found on remote Site Url NON NLS 1 NON NLS 2 null return false mirror Site mirror And Expose remote Site feature References To Mirror null mirrorURL return true catch MalformedURL Exception e Standalone Update Application exception Logged Update Core log e return false catch Core Exception ce Standalone Update Application exception Logged Update Core log ce return false finally Jar Content Reference shutdown  IProgressMonitor validateParameters getMirrorSite remoteSiteUrl fromSiteUrl ISite remoteSite SiteManager getSite remoteSiteUrl NullProgressMonitor ISiteFeatureReference featureReferencesToMirror findFeaturesToMirror remoteSite featureReferencesToMirror StandaloneUpdateApplication exceptionLogged UpdateCore newCoreException remoteSiteUrl mirrorSite mirrorAndExpose remoteSite featureReferencesToMirror MalformedURLException StandaloneUpdateApplication exceptionLogged UpdateCore CoreException StandaloneUpdateApplication exceptionLogged UpdateCore JarContentReference
private boolean validate Parameters if from Site Url null from Site Url length 0 Standalone Update Application exception Logged Update Core log Utilities new Core Exception from parameter is missing null NON NLS 1 return false try new URL from Site Url catch MalformedURL Exception mue Standalone Update Application exception Logged Update Core log Utilities new Core Exception from must be a valid URL null NON NLS 1 return false if to Site Dir null to Site Dir length 0 Standalone Update Application exception Logged Update Core log Utilities new Core Exception to parameter is missing null NON NLS 1 return false return true  validateParameters fromSiteUrl fromSiteUrl StandaloneUpdateApplication exceptionLogged UpdateCore newCoreException fromSiteUrl MalformedURLException StandaloneUpdateApplication exceptionLogged UpdateCore newCoreException toSiteDir toSiteDir StandaloneUpdateApplication exceptionLogged UpdateCore newCoreException
private Mirror Site get Mirror Site throws MalformedURL Exception Core Exception Create mirror site if mirror Site null if to Site Dir null Mirror Site Factory factory new Mirror Site Factory System out print Analyzing features already mirrored NON NLS 1 try mirror Site Mirror Site factory create Site new File to Site Dir catch Invalid Site Type Exception iste System out println Done NON NLS 1 if mirror Site null Standalone Update Application exception Logged Update Core log Utilities new Core Exception Mirror site at to Site Dir cannot be accessed NON NLS 1 NON NLS 2 null return null return mirror Site  MirrorSite getMirrorSite MalformedURLException CoreException mirrorSite toSiteDir MirrorSiteFactory MirrorSiteFactory mirrorSite MirrorSite createSite toSiteDir InvalidSiteTypeException mirrorSite StandaloneUpdateApplication exceptionLogged UpdateCore newCoreException toSiteDir mirrorSite
Returns subset of feature references on remote site as specified by optional feature Id and feature Version parameters param remote Site return I Site Feature Reference throws Core Exception private I Site Feature Reference find Features To Mirror I Site remote Site throws Core Exception I Site Feature Reference remote Site Feature References remote Site get Raw Feature References Site Feature Reference Model existing Feature Models mirror Site get Feature Reference Models Collection feature References To Mirror new Array List Plugin Version Identifier feature Version Identifier null if feature Id null System out println Parameter feature not specified All features on the remote site will be mirrored NON NLS 1 if feature Version null System out println Parameter version not specified All versions of features on the remote site will be mirrored NON NLS 1 else feature Version Identifier new Plugin Version Identifier feature Version for int i 0 i remote Site Feature References length i Versioned Identifier remote Feature Versioned Identifier remote Site Feature References i get Versioned Identifier if feature Id null feature Id equals remote Feature Versioned Identifier get Identifier id does not match continue if feature Version Identifier null feature Version Identifier is Perfect remote Feature Versioned Identifier get Version version does not match continue for int e 0 e existing Feature Models length e if existing Feature Models e get Versioned Identifier equals remote Feature Versioned Identifier System out println Feature NON NLS 1 remote Feature Versioned Identifier already mirrored and exposed NON NLS 1 feature already mirrored and exposed in site xml continue Check feature type String type Site Feature Reference remote Site Feature References i get Type if type null I Site DEFAULT PACKAGED FEATURE TYPE equals type unsupported throw Utilities new Core Exception Feature NON NLS 1 remote Feature Versioned Identifier is of type NON NLS 1 type Only features of type NON NLS 1 I Site DEFAULT PACKAGED FEATURE TYPE are supported NON NLS 1 null feature References To Mirror add remote Site Feature References i System out println Feature NON NLS 1 remote Site Feature References i get Versioned Identifier will be mirrored NON NLS 1 return I Site Feature Reference feature References To Mirror to Array new I Site Feature Reference feature References To Mirror size  featureId featureVersion remoteSite ISiteFeatureReference CoreException ISiteFeatureReference findFeaturesToMirror ISite remoteSite CoreException ISiteFeatureReference remoteSiteFeatureReferences remoteSite getRawFeatureReferences SiteFeatureReferenceModel existingFeatureModels mirrorSite getFeatureReferenceModels featureReferencesToMirror ArrayList PluginVersionIdentifier featureVersionIdentifier featureId featureVersion featureVersionIdentifier PluginVersionIdentifier featureVersion remoteSiteFeatureReferences VersionedIdentifier remoteFeatureVersionedIdentifier remoteSiteFeatureReferences getVersionedIdentifier featureId featureId remoteFeatureVersionedIdentifier getIdentifier featureVersionIdentifier featureVersionIdentifier isPerfect remoteFeatureVersionedIdentifier getVersion existingFeatureModels existingFeatureModels getVersionedIdentifier remoteFeatureVersionedIdentifier remoteFeatureVersionedIdentifier SiteFeatureReference remoteSiteFeatureReferences getType ISite DEFAULT_PACKAGED_FEATURE_TYPE newCoreException remoteFeatureVersionedIdentifier ISite DEFAULT_PACKAGED_FEATURE_TYPE featureReferencesToMirror remoteSiteFeatureReferences remoteSiteFeatureReferences getVersionedIdentifier ISiteFeatureReference featureReferencesToMirror toArray ISiteFeatureReference featureReferencesToMirror

private Collection downloaded Plugin Entries new Array List private Collection downloaded Feature Reference Models new Array List public Mirror Site Site Model Factory factory this factory factory  downloadedPluginEntries ArrayList downloadedFeatureReferenceModels ArrayList MirrorSite SiteModelFactory
Mirrors the specified features and listed optional features on this site see I Site install I Feature I Verification Listener I Progress Monitor param mirror Site Url external URL of the mirror site or null if parameter is provided policy fragment will be generated exception Core Exception public void mirror And Expose I Site remote Site I Site Feature Reference source Feature Refs I Feature Reference optionalfeatures String mirror Site Url throws Core Exception mirror And Expose Features remote Site source Feature Refs optionalfeatures System out println Installing features finished Updating categories NON NLS 1 update Categories remote Site System out println Updating categories finished Updating site description NON NLS 1 update Description remote Site System out println Updating site description finished Saving site xml NON NLS 1 save if mirror Site Url null generate Update Policy mirror Site Url  ISite IFeature IVerificationListener IProgressMonitor mirrorSiteUrl CoreException mirrorAndExpose ISite remoteSite ISiteFeatureReference sourceFeatureRefs IFeatureReference mirrorSiteUrl CoreException mirrorAndExposeFeatures remoteSite sourceFeatureRefs updateCategories remoteSite updateDescription remoteSite mirrorSiteUrl generateUpdatePolicy mirrorSiteUrl
private void mirror And Expose Features I Site remote Site I Site Feature Reference source Feature Refs I Feature Reference optionalfeatures throws Core Exception Features that failed will be retried once again Collection failed Features new Array List for int i 0 i source Feature Refs length i try I Feature source Feature source Feature Refs i get Feature new Null Progress Monitor Site Feature Reference Model feature Ref mirror Feature remote Site source Feature optionalfeatures 1 Set categories of the new feature I Category remote Categories source Feature Refs i get Categories for int j 0 j remote Categories length j feature Ref add Category Name remote Categories j get Name add Feature Reference Model remote Site feature Ref catch Core Exception ce failed Features add source Feature Refs i do we need to retry if failed Features size 0 source Feature Refs I Site Feature Reference failed Features to Array new I Site Feature Reference failed Features size else return for int i 0 i source Feature Refs length i I Feature source Feature source Feature Refs i get Feature new Null Progress Monitor Site Feature Reference Model feature Ref mirror Feature remote Site source Feature optionalfeatures 1 Set categories of the new feature I Category remote Categories source Feature Refs i get Categories for int j 0 j remote Categories length j feature Ref add Category Name remote Categories j get Name add Feature Reference Model remote Site feature Ref  mirrorAndExposeFeatures ISite remoteSite ISiteFeatureReference sourceFeatureRefs IFeatureReference CoreException failedFeatures ArrayList sourceFeatureRefs IFeature sourceFeature sourceFeatureRefs getFeature NullProgressMonitor SiteFeatureReferenceModel featureRef mirrorFeature remoteSite sourceFeature ICategory remoteCategories sourceFeatureRefs getCategories remoteCategories featureRef addCategoryName remoteCategories getName addFeatureReferenceModel remoteSite featureRef CoreException failedFeatures sourceFeatureRefs failedFeatures sourceFeatureRefs ISiteFeatureReference failedFeatures toArray ISiteFeatureReference failedFeatures sourceFeatureRefs IFeature sourceFeature sourceFeatureRefs getFeature NullProgressMonitor SiteFeatureReferenceModel featureRef mirrorFeature remoteSite sourceFeature ICategory remoteCategories sourceFeatureRefs getCategories remoteCategories featureRef addCategoryName remoteCategories getName addFeatureReferenceModel remoteSite featureRef
Install the specified feature and listed optional features on this site see I Site install I Feature I Verification Listener I Progress Monitor exception Core Exception private Site Feature Reference Model mirror Feature I Site remote Site I Feature source Feature I Feature Reference optionalfeatures int indent throws Core Exception String tab NON NLS 1 for int i 0 i indent i tab NON NLS 1 System out println tab Mirroring feature NON NLS 1 source Feature get Versioned Identifier NON NLS 1 Site Feature Reference Model existing Features get Downloaded Feature Reference Models for int e 0 e existing Features length e if existing Features e get Versioned Identifier equals source Feature get Versioned Identifier System out println tab Feature NON NLS 1 source Feature get Versioned Identifier already exists Skipping downloading NON NLS 1 return existing Features e final I Feature Content Provider provider source Feature get Feature Content Provider System out println tab Getting plugin entries for NON NLS 1 source Feature get Versioned Identifier NON NLS 1 final I Plugin Entry source Feature Plugin Entries source Feature get Plugin Entries determine list of plugins to install find the intersection between the plugin entries already contained on the target site and plugin entries packaged in source feature I Plugin Entry plugins To Install Update Manager Utils diff source Feature Plugin Entries get Downloaded Plugin Entries System out println tab Getting non plugin entries for NON NLS 1 source Feature get Versioned Identifier NON NLS 1 final I Non Plugin Entry non Plugins To Install source Feature get Raw Non Plugin Entries System out println tab Getting included features for NON NLS 1 source Feature get Versioned Identifier NON NLS 1 I Feature Reference children source Feature get Raw Included Feature References if optionalfeatures null children Update Manager Utils optional Children To Install children optionalfeatures System out println tab Downloading feature archives for NON NLS 1 source Feature get Versioned Identifier NON NLS 1 download feature archives provider get Feature Entry Archive References null System out println tab Downloading plug in archives for NON NLS 1 source Feature get Versioned Identifier NON NLS 1 download plugin archives for int i 0 i plugins To Install length i provider get Plugin Entry Archive References plugins To Install i null System out println tab Downloading non plug in archives for NON NLS 1 source Feature get Versioned Identifier NON NLS 1 download non plugin archives for int i 0 i non Plugins To Install length i provider get Non Plugin Entry Archive References non Plugins To Install i null System out println tab Installing child features for NON NLS 1 source Feature get Versioned Identifier NON NLS 1 install child features first for int i 0 i children length i I Feature child Feature children i get Feature null mirror Feature remote Site child Feature optionalfeatures indent 1 System out println tab Storing plug in archives for NON NLS 1 source Feature get Versioned Identifier NON NLS 1 store plugins archives for int i 0 i plugins To Install length i Content Reference references provider get Plugin Entry Archive References plugins To Install i null store Plugin Archive references 0 add Downloaded Plugin Entry plugins To Install i System out println tab Storing non plug in archives for NON NLS 1 source Feature get Versioned Identifier NON NLS 1 store non plugins archives for int i 0 i non Plugins To Install length i Content Reference references provider get Non Plugin Entry Archive References non Plugins To Install i null for int r 0 r references length r store Non Plugin Archive source Feature get Versioned Identifier references r System out println tab Storing feature archives for NON NLS 1 source Feature get Versioned Identifier NON NLS 1 store feature archive Content Reference references provider get Feature Entry Archive References null store Feature Archive references 0 System out println tab Adding feature NON NLS 1 source Feature get Versioned Identifier to model NON NLS 1 add feature model to site model Site Feature Reference Model feature Ref factory create Feature Reference Model feature Ref set Site Model this feature Ref setURL String featureURL to External Form feature Ref set Type I Site DEFAULT PACKAGED FEATURE TYPE feature Ref set Feature Identifier source Feature get Versioned Identifier get Identifier feature Ref set Feature Version source Feature get Versioned Identifier get Version to String add Downloaded Feature Reference Model feature Ref System out println tab Mirroring feature NON NLS 1 source Feature get Versioned Identifier finished NON NLS 1 return feature Ref  ISite IFeature IVerificationListener IProgressMonitor CoreException SiteFeatureReferenceModel mirrorFeature ISite remoteSite IFeature sourceFeature IFeatureReference CoreException sourceFeature getVersionedIdentifier SiteFeatureReferenceModel existingFeatures getDownloadedFeatureReferenceModels existingFeatures existingFeatures getVersionedIdentifier sourceFeature getVersionedIdentifier sourceFeature getVersionedIdentifier existingFeatures IFeatureContentProvider sourceFeature getFeatureContentProvider sourceFeature getVersionedIdentifier IPluginEntry sourceFeaturePluginEntries sourceFeature getPluginEntries IPluginEntry pluginsToInstall UpdateManagerUtils sourceFeaturePluginEntries getDownloadedPluginEntries sourceFeature getVersionedIdentifier INonPluginEntry nonPluginsToInstall sourceFeature getRawNonPluginEntries sourceFeature getVersionedIdentifier IFeatureReference sourceFeature getRawIncludedFeatureReferences UpdateManagerUtils optionalChildrenToInstall sourceFeature getVersionedIdentifier getFeatureEntryArchiveReferences sourceFeature getVersionedIdentifier pluginsToInstall getPluginEntryArchiveReferences pluginsToInstall sourceFeature getVersionedIdentifier nonPluginsToInstall getNonPluginEntryArchiveReferences nonPluginsToInstall sourceFeature getVersionedIdentifier IFeature childFeature getFeature mirrorFeature remoteSite childFeature sourceFeature getVersionedIdentifier pluginsToInstall ContentReference getPluginEntryArchiveReferences pluginsToInstall storePluginArchive addDownloadedPluginEntry pluginsToInstall sourceFeature getVersionedIdentifier nonPluginsToInstall ContentReference getNonPluginEntryArchiveReferences nonPluginsToInstall storeNonPluginArchive sourceFeature getVersionedIdentifier sourceFeature getVersionedIdentifier ContentReference getFeatureEntryArchiveReferences storeFeatureArchive sourceFeature getVersionedIdentifier SiteFeatureReferenceModel featureRef createFeatureReferenceModel featureRef setSiteModel featureRef setURLString toExternalForm featureRef setType ISite DEFAULT_PACKAGED_FEATURE_TYPE featureRef setFeatureIdentifier sourceFeature getVersionedIdentifier getIdentifier featureRef setFeatureVersion sourceFeature getVersionedIdentifier getVersion toString addDownloadedFeatureReferenceModel featureRef sourceFeature getVersionedIdentifier featureRef
Adds a feature reference model to this site and exposes in site xml if remote site exposes given feature public void add Feature Reference Model I Site remote Site Site Feature Reference Model feature Reference check if remote site exposes this feature I Site Feature Reference remote Features remote Site get Raw Feature References for int i 0 i remote Features length i I Site Feature Reference remote Feature Ref remote Features i try if remote Feature Ref get Versioned Identifier equals feature Reference get Versioned Identifier add Feature Reference Model feature Reference catch Core Exception ce Standalone Update Application exception Logged Update Core log ce save System out println Feature NON NLS 1 feature Reference get Versioned Identifier added to site xml NON NLS 1  addFeatureReferenceModel ISite remoteSite SiteFeatureReferenceModel featureReference ISiteFeatureReference remoteFeatures remoteSite getRawFeatureReferences remoteFeatures ISiteFeatureReference remoteFeatureRef remoteFeatures remoteFeatureRef getVersionedIdentifier featureReference getVersionedIdentifier addFeatureReferenceModel featureReference CoreException StandaloneUpdateApplication exceptionLogged UpdateCore featureReference getVersionedIdentifier
Adds feature model to site model removing old feature public void add Feature Reference Model Site Feature Reference Model feature Reference Site Feature Reference Model existing Models get Feature Reference Models for int j 0 j existing Models length j if existing Models j get Versioned Identifier equals feature Reference get Versioned Identifier super remove Feature Reference Model existing Models j super add Feature Reference Model feature Reference  addFeatureReferenceModel SiteFeatureReferenceModel featureReference SiteFeatureReferenceModel existingModels getFeatureReferenceModels existingModels existingModels getVersionedIdentifier featureReference getVersionedIdentifier removeFeatureReferenceModel existingModels addFeatureReferenceModel featureReference
see I Site Content Consumer store Content Reference I Progress Monitor private void store Feature Archive Content Reference content Reference throws Core Exception Input Stream in Stream null String feature Path null try URL newURL new URL this getURL Site DEFAULT INSTALLED FEATURE PATH content Reference get Identifier jar NON NLS 1 feature Path newURL get File in Stream content Reference get Input Stream Update Manager Utils copy To Local in Stream feature Path null catch IO Exception e throw Utilities new Core Exception Error occurred while creating feature Path file NON NLS 1 NON NLS 2 e finally if in Stream null try in Stream close catch IO Exception e  ISiteContentConsumer ContentReference IProgressMonitor storeFeatureArchive ContentReference contentReference CoreException InputStream inStream featurePath DEFAULT_INSTALLED_FEATURE_PATH contentReference getIdentifier featurePath getFile inStream contentReference getInputStream UpdateManagerUtils copyToLocal inStream featurePath IOException newCoreException featurePath inStream inStream IOException
see I Site Content Consumer store Content Reference I Progress Monitor private void store Plugin Archive Content Reference content Reference throws Core Exception Input Stream in Stream null String plugin Path null try URL newURL new URL getURL content Reference get Identifier plugin Path newURL get File in Stream content Reference get Input Stream Update Manager Utils copy To Local in Stream plugin Path null catch IO Exception e throw Utilities new Core Exception Error occurred while creating plugin Path file NON NLS 1 NON NLS 2 e finally if in Stream null try in Stream close catch IO Exception e  ISiteContentConsumer ContentReference IProgressMonitor storePluginArchive ContentReference contentReference CoreException InputStream inStream pluginPath contentReference getIdentifier pluginPath getFile inStream contentReference getInputStream UpdateManagerUtils copyToLocal inStream pluginPath IOException newCoreException pluginPath inStream inStream IOException
private void store Non Plugin Archive Versioned Identifier feature Versioned Identifier Content Reference content Reference throws Core Exception Input Stream in Stream null File non Plugin Archive Path null try URL new DirURL new URL getURL Site DEFAULT INSTALLED FEATURE PATH NON NLS 1 feature Versioned Identifier File dir new File new DirURL get File dir mkdirs in Stream content Reference get Input Stream non Plugin Archive Path new File dir content Reference get Identifier Update Manager Utils copy To Local in Stream non Plugin Archive Path get Absolute Path null catch IO Exception e throw Utilities new Core Exception Error occurred while creating non Plugin Archive Path get Absolute Path file NON NLS 1 NON NLS 2 e finally if in Stream null try in Stream close catch IO Exception e  storeNonPluginArchive VersionedIdentifier featureVersionedIdentifier ContentReference contentReference CoreException InputStream inStream nonPluginArchivePath newDirURL DEFAULT_INSTALLED_FEATURE_PATH featureVersionedIdentifier newDirURL getFile inStream contentReference getInputStream nonPluginArchivePath contentReference getIdentifier UpdateManagerUtils copyToLocal inStream nonPluginArchivePath getAbsolutePath IOException newCoreException nonPluginArchivePath getAbsolutePath inStream inStream IOException
private void save File Output Stream fos null try URL siteURL new URL this getURL site xml NON NLS 1 fos new File Output Stream new File siteURL get File Output Stream Writer out Writer new Output Stream Writer fos UTF 8 NON NLS 1 Print Writer writer new Print Writer out Writer save writer writer flush catch IO Exception ioe Standalone Update Application exception Logged Update Core log Utilities new Core Exception Site XML could not be saved NON NLS 1 ioe finally if fos null try fos close catch IO Exception ioe2  FileOutputStream FileOutputStream getFile OutputStreamWriter outWriter OutputStreamWriter PrintWriter PrintWriter outWriter IOException StandaloneUpdateApplication exceptionLogged UpdateCore newCoreException IOException
private void save Print Writer writer writer println xml version 1 0 encoding UTF 8 NON NLS 1 writer println DOCTYPE site SYSTEM dtd site dtd write Site writer NON NLS 1  PrintWriter writeSite
private void write Site String indent Print Writer writer writer print indent site NON NLS 1 String indent2 indent INDENT default type write If Defined indenta writer type get Type stored relative to site xml write If Defined indenta writer url getURL writer println NON NLS 1 URL Entry Model description get Description Model if description null writer println write Description indent2 writer description writer println write Features indent2 writer write Categories indent2 writer writer println indent site NON NLS 1  writeSite PrintWriter writeIfDefined getType writeIfDefined URLEntryModel getDescriptionModel writeDescription writeFeatures writeCategories
private void write Features String indent Print Writer writer Site Feature Reference Model feature Reference Models get Feature Reference Models for int i 0 i feature Reference Models length i writer print indent writer print feature NON NLS 1 writer print url features NON NLS 1 feature Reference Models i get Feature Identifier   NON NLS 1 feature Reference Models i get Feature Version jar NON NLS 1 writer print id NON NLS 1 feature Reference Models i get Feature Identifier NON NLS 1 writer print version NON NLS 1 feature Reference Models i get Feature Version NON NLS 1 writer println NON NLS 1 String category Names feature Reference Models i get Category Names for int cn 0 cn category Names length cn writer print indent INDENT writer println category name category Names cn NON NLS 1 NON NLS 2 writer print indent writer println feature NON NLS 1 writer println  writeFeatures PrintWriter SiteFeatureReferenceModel featureReferenceModels getFeatureReferenceModels featureReferenceModels featureReferenceModels getFeatureIdentifier _ featureReferenceModels getFeatureVersion featureReferenceModels getFeatureIdentifier featureReferenceModels getFeatureVersion categoryNames featureReferenceModels getCategoryNames categoryNames categoryNames
private void write Categories String indent Print Writer writer Category Model category Models get Category Models if category Models length 0 return for int i 0 i category Models length i writer print indent writer print category def NON NLS 1 writer print name NON NLS 1 category Models i get Name label NON NLS 1 category Models i get Label NON NLS 1 writer println NON NLS 1 write Description indent INDENT writer category Models i get Description Model writer print indent writer println category def NON NLS 1 writer println  writeCategories PrintWriter CategoryModel categoryModels getCategoryModels categoryModels categoryModels categoryModels getName categoryModels getLabel writeDescription categoryModels getDescriptionModel
private void write Description String indent Print Writer writer URL Entry Model url Entry Model String url url Entry Model getURL String String text url Entry Model get Annotation Non Localized if url null text null text length 0 return writer print indent writer print description NON NLS 1 if url null writer print url url NON NLS 1 NON NLS 2 if text null text length 0 writer println NON NLS 1 else writer println NON NLS 1 if text null writer println indent INDENT Update Manager Utils Writer xml Safe text writer println indent description NON NLS 1  writeDescription PrintWriter URLEntryModel urlEntryModel urlEntryModel getURLString urlEntryModel getAnnotationNonLocalized UpdateManagerUtils xmlSafe
Adds a plugin entry Either from parsing the file system or installing a feature We cannot figure out the list of plugins by reading the Site xml as the archives tag are optionals public void add Downloaded Plugin Entry I Plugin Entry plugin Entry downloaded Plugin Entries add plugin Entry  addDownloadedPluginEntry IPluginEntry pluginEntry downloadedPluginEntries pluginEntry
private I Plugin Entry get Downloaded Plugin Entries return I Plugin Entry downloaded Plugin Entries to Array new I Plugin Entry downloaded Plugin Entries size  IPluginEntry getDownloadedPluginEntries IPluginEntry downloadedPluginEntries toArray IPluginEntry downloadedPluginEntries
Adds a plugin entry Either from parsing the file system or installing a feature We cannot figure out the list of plugins by reading the Site xml as the archives tag are optionals public void add Downloaded Feature Reference Model Site Feature Reference Model feature Model downloaded Feature Reference Models add feature Model  addDownloadedFeatureReferenceModel SiteFeatureReferenceModel featureModel downloadedFeatureReferenceModels featureModel
private Site Feature Reference Model get Downloaded Feature Reference Models return Site Feature Reference Model downloaded Feature Reference Models to Array new Site Feature Reference Model downloaded Feature Reference Models size  SiteFeatureReferenceModel getDownloadedFeatureReferenceModels SiteFeatureReferenceModel downloadedFeatureReferenceModels toArray SiteFeatureReferenceModel downloadedFeatureReferenceModels
Updates description of this site from description of the remote site private void update Description I Site remote Site IURL Entry url Entry remote Site get Description if url Entry null URL Entry Model new Url Entry Model new URL Entry Model URL url url Entry getURL new Url Entry Model set Annotation url Entry get Annotation new Url Entry Model setURL String url to External Form this set Description Model new Url Entry Model  updateDescription ISite remoteSite IURLEntry urlEntry remoteSite getDescription urlEntry URLEntryModel newUrlEntryModel URLEntryModel urlEntry newUrlEntryModel setAnnotation urlEntry getAnnotation newUrlEntryModel setURLString toExternalForm setDescriptionModel newUrlEntryModel
Updates all categories used by features on this site from categories defined on remote site Categories not defined on remote site are unchanged private void update Categories I Site remote Site collect name of categories used on this site Set used Category Names new Hash Set Site Feature Reference Model feature Ref Models get Feature Reference Models for int f 0 f feature Ref Models length f String feature Category Names feature Ref Models f get Category Names for int c 0 c feature Category Names length c used Category Names add feature Category Names c Collection new Category Models new Array List for Iterator it used Category Names iterator it has Next String name String it next I Category remote Category remote Site get Category name if remote Category null remote site does not define this category Category Model old Category null try old Category Category Model get Category name catch Null Pointer Exception npe cannot reproduce npe anymore if old Category null new Category Models add old Category else new Category Models add remote Category set Category Models Category Model new Category Models to Array new Category Model new Category Models size  updateCategories ISite remoteSite usedCategoryNames HashSet SiteFeatureReferenceModel featureRefModels getFeatureReferenceModels featureRefModels featureCategoryNames featureRefModels getCategoryNames featureCategoryNames usedCategoryNames featureCategoryNames newCategoryModels ArrayList usedCategoryNames hasNext ICategory remoteCategory remoteSite getCategory remoteCategory CategoryModel oldCategory oldCategory CategoryModel getCategory NullPointerException oldCategory newCategoryModels oldCategory newCategoryModels remoteCategory setCategoryModels CategoryModel newCategoryModels toArray CategoryModel newCategoryModels
private void generate Update Policy String url File Output Stream fos null try URL siteURL new URL this getURL policy xml NON NLS 1 fos new File Output Stream new File siteURL get File Output Stream Writer out Writer new Output Stream Writer fos UTF 8 NON NLS 1 Print Writer writer new Print Writer out Writer writer println xml version 1 0 encoding UTF 8 NON NLS 1 writer println update policy NON NLS 1 writer println You can paste the following fragment containing url map elements into another policy file NON NLS 1 write Url Maps writer url writer println End of fragment with url map elements NON NLS 1 writer println update policy NON NLS 1 writer flush catch IO Exception ioe Standalone Update Application exception Logged Update Core log Utilities new Core Exception policy xml could not be saved NON NLS 1 ioe finally if fos null try fos close catch IO Exception ioe2  generateUpdatePolicy FileOutputStream FileOutputStream getFile OutputStreamWriter outWriter OutputStreamWriter PrintWriter PrintWriter outWriter writeUrlMaps IOException StandaloneUpdateApplication exceptionLogged UpdateCore newCoreException IOException
private void write Url Maps Print Writer writer String url Site Feature Reference Model feature Reference Models get Feature Reference Models for int i 0 i feature Reference Models length i writer print t NON NLS 1 writer print url map NON NLS 1 writer print pattern NON NLS 1 feature Reference Models i get Feature Identifier NON NLS 1 writer print url url NON NLS 1 NON NLS 2 writer println NON NLS 1  writeUrlMaps PrintWriter SiteFeatureReferenceModel featureReferenceModels getFeatureReferenceModels featureReferenceModels featureReferenceModels getFeatureIdentifier

see Site Model Factory create Site Map Model public Site Model create Site Map Model return new Mirror Site this  SiteModelFactory createSiteMapModel SiteModel createSiteMapModel MirrorSite
see I Site Factory create Site URL public I Site create Site URL url throws Core Exception Invalid Site Type Exception return create Site new File url get File  ISiteFactory createSite ISite createSite CoreException InvalidSiteTypeException createSite getFile
public I Site create Site File site Location throws Core Exception Invalid Site Type Exception Input Stream site Stream null if site Location exists if site Location mkdirs throw Utilities new Core Exception Directory NON NLS 1 site Location get Absolute Path could not be created NON NLS 1 null if site Location is Directory site Location can Write throw Utilities new Core Exception site Location get Absolute Path is not a directory or is not writtable NON NLS 1 null Mirror Site site null parse public features if new File site Location Site SITE XML exists try site Stream new File Input Stream new File site Location Site SITE XML catch File Not Found Exception fnfe site Mirror Site parse Site site Stream try if site Stream null site Stream close catch IO Exception e if site null site Mirror Site create Site Map Model parse downloaded plugins and fragments parse Downloaded Plugins And Fragments site new File site Location Site DEFAULT PLUGIN PATH parse downloaded features parse Downloaded Features site new File site Location Site DEFAULT FEATURE PATH URL url try url site Location toURL catch MalformedURL Exception mue throw Utilities new Core Exception A URL for site NON NLS 1 site Location get Absolute Path could not be created NON NLS 1 mue Site Content Provider content Provider null content Provider new Site File Content Provider url site set Site Content Provider content Provider content Provider set Site site try site resolve url url catch MalformedURL Exception mue throw Utilities new Core Exception Unable to resolve URL NON NLS 1 url null url to External Form NON NLS 1 mue return site  ISite createSite siteLocation CoreException InvalidSiteTypeException InputStream siteStream siteLocation siteLocation newCoreException siteLocation getAbsolutePath siteLocation isDirectory siteLocation canWrite newCoreException siteLocation getAbsolutePath MirrorSite siteLocation SITE_XML siteStream FileInputStream siteLocation SITE_XML FileNotFoundException MirrorSite parseSite siteStream siteStream siteStream IOException MirrorSite createSiteMapModel parseDownloadedPluginsAndFragments siteLocation DEFAULT_PLUGIN_PATH parseDownloadedFeatures siteLocation DEFAULT_FEATURE_PATH siteLocation MalformedURLException newCoreException siteLocation getAbsolutePath SiteContentProvider contentProvider contentProvider SiteFileContentProvider setSiteContentProvider contentProvider contentProvider setSite MalformedURLException newCoreException toExternalForm
private void parse Downloaded Plugins And Fragments Mirror Site site File plugin Dir throws Core Exception if plugin Dir exists return String dir plugin Dir list Feature Packaged Content Provider filter for int i 0 i dir length i Input Stream in null try File file new File plugin Dir dir i Jar Content Reference jar Reference new Jar Content Reference null file Content Reference ref jar Reference peek META INF MANIFEST MF null null NON NLS 1 if ref null in ref get Input Stream Bundle Manifest manifest new Bundle Manifest in if manifest exists site add Downloaded Plugin Entry manifest get Plugin Entry continue ref jar Reference peek plugin xml null null NON NLS 1 if ref null ref jar Reference peek fragment xml null null NON NLS 1 if ref null in ref get Input Stream Plugin Entry entry new Default Plugin Parser parse in site add Downloaded Plugin Entry entry catch IO Exception e Standalone Update Application exception Logged Update Core log e catch SAX Exception e Standalone Update Application exception Logged Update Core log e finally if in null try in close catch IO Exception ce  parseDownloadedPluginsAndFragments MirrorSite pluginDir CoreException pluginDir pluginDir FeaturePackagedContentProvider InputStream pluginDir JarContentReference jarReference JarContentReference ContentReference jarReference getInputStream BundleManifest BundleManifest addDownloadedPluginEntry getPluginEntry jarReference jarReference getInputStream PluginEntry DefaultPluginParser addDownloadedPluginEntry IOException StandaloneUpdateApplication exceptionLogged UpdateCore SAXException StandaloneUpdateApplication exceptionLogged UpdateCore IOException
Method parse Feature throws Core Exception private void parse Downloaded Features Mirror Site site File feature Dir throws Core Exception if feature Dir exists String dir Site Feature Reference Model feature Ref URL featureURL File current Feature File String new File Path null try only list JAR files dir feature Dir list Feature Packaged Content Provider filter for int index 0 index dir length index check if the JAR file contains a feature xml current Feature File new File feature Dir dir index Jar Content Reference ref new Jar Content Reference current Feature File NON NLS 1 Content Reference result null try result ref peek Feature FEATURE XML null null catch IO Exception e Update Core warn Exception retrieving feature xml in file NON NLS 1 current Feature File e if result null Update Core warn Unable to find feature xml in file NON NLS 1 current Feature File else featureURL current Feature File toURL feature Ref create Feature Reference Model feature Ref set Site Model site feature Ref setURL String featureURL to External Form feature Ref set Type I Site DEFAULT PACKAGED FEATURE TYPE feature Ref set Feature Identifier feature Ref get Versioned Identifier get Identifier feature Ref set Feature Version feature Ref get Versioned Identifier get Version to String site add Downloaded Feature Reference Model feature Ref catch MalformedURL Exception e throw Utilities new Core Exception Unable to create URL for file new File Path NON NLS 1 NON NLS 2 e  parseFeature CoreException parseDownloadedFeatures MirrorSite featureDir CoreException featureDir SiteFeatureReferenceModel featureRef currentFeatureFile newFilePath featureDir FeaturePackagedContentProvider currentFeatureFile featureDir JarContentReference JarContentReference currentFeatureFile ContentReference FEATURE_XML IOException UpdateCore currentFeatureFile UpdateCore currentFeatureFile currentFeatureFile featureRef createFeatureReferenceModel featureRef setSiteModel featureRef setURLString toExternalForm featureRef setType ISite DEFAULT_PACKAGED_FEATURE_TYPE featureRef setFeatureIdentifier featureRef getVersionedIdentifier getIdentifier featureRef setFeatureVersion featureRef getVersionedIdentifier getVersion toString addDownloadedFeatureReferenceModel featureRef MalformedURLException newCoreException newFilePath

private IO Exception exception Constructor for local file public Bundle Manifest File manifest super if manifest exists manifest is Directory File Input Stream fos null try fos new File Input Stream manifest parse fos catch IO Exception ioe finally if fos null try fos close catch IO Exception e  IOException BundleManifest isDirectory FileInputStream FileInputStream IOException IOException
Constructor for local file public Bundle Manifest Input Stream input super if input null parse input  BundleManifest InputStream
Parses manifest creates Plugin Entry if manifest is valid stores exception if any occurs param in Input Stream private void parse Input Stream in try Manifest m new Manifest in Attributes a m get Main Attributes plugin id String symbolic Name a get Value Constants BUNDLE SYMBOLICNAME if symbolic Name null In Eclipse manifest must have Bundle Symbolic Name attribute return String id try Manifest Element elements Manifest Element parse Header Constants BUNDLE SYMBOLICNAME symbolic Name id elements 0 get Value catch Bundle Exception be throw new IO Exception be get Message plugin version String version a get Value Constants BUNDLE VERSION if version null return String host Plugin a get Value Constants FRAGMENT HOST plugin Entry new Plugin Entry plugin Entry set Versioned Identifier new Versioned Identifier id version plugin Entry is Fragment host Plugin null host Plugin length 0 catch IO Exception ioe exception ioe  PluginEntry InputStream InputStream getMainAttributes symbolicName getValue BUNDLE_SYMBOLICNAME symbolicName SymbolicName ManifestElement ManifestElement parseHeader BUNDLE_SYMBOLICNAME symbolicName getValue BundleException IOException getMessage getValue BUNDLE_VERSION hostPlugin getValue FRAGMENT_HOST pluginEntry PluginEntry pluginEntry setVersionedIdentifier VersionedIdentifier pluginEntry isFragment hostPlugin hostPlugin IOException
public boolean exists return exception null plugin Entry null  pluginEntry
Obtains Plugin Entry from a manifest return Plugin Entry or null if valid manifest does not exist throws IO Exception if exception during parsing public Plugin Entry get Plugin Entry throws IO Exception if exception null throw exception else return plugin Entry  PluginEntry PluginEntry IOException PluginEntry getPluginEntry IOException pluginEntry

Constructor for Configuration Activity Model public Configuration Activity Model super  ConfigurationActivityModel ConfigurationActivityModel
since 2 0 public int get Action return action  getAction
since 2 0 public Date get Date return date  getDate
since 2 0 public int get Status return status  getStatus
Sets the date param date The date to set public void set Date Date date assert Is Writeable this date date  setDate assertIsWriteable
Sets the status param status The status to set public void set Status int status assert Is Writeable this status status  setStatus assertIsWriteable
since 2 0 public String get Label return label  getLabel
Sets the label param label The label to set public void set Label String label assert Is Writeable this label label  setLabel assertIsWriteable
Sets the action param action The action to set public void set Action int action assert Is Writeable this action action  setAction assertIsWriteable
Gets the install Configuration return Returns a Install Configuration Model public Install Configuration Model get Install Configuration Model return install Configuration  installConfiguration InstallConfigurationModel InstallConfigurationModel getInstallConfigurationModel installConfiguration
Sets the install Configuration param install Configuration The install Configuration to set public void set Install Configuration Model Install Configuration Model install Configuration assert Is Writeable this install Configuration install Configuration  installConfiguration installConfiguration installConfiguration setInstallConfigurationModel InstallConfigurationModel installConfiguration assertIsWriteable installConfiguration installConfiguration

Constructor for Configuration Policy Model public Configuration Policy Model super enable true configured Feature References new Hash Map unconfigured Feature References new Hash Map  ConfigurationPolicyModel ConfigurationPolicyModel configuredFeatureReferences HashMap unconfiguredFeatureReferences HashMap
since 2 0 public int get Policy return policy  getPolicy
Sets the policy param policy The policy to set public void set Policy int policy assert Is Writeable this policy policy  setPolicy assertIsWriteable
since 2 0 public Feature Reference Model get Configured Features Model if configured Feature References null configured Feature References is Empty return new Feature Reference Model 0 return Feature Reference Model configured Feature References key Set to Array array Type For configured Feature References key Set  FeatureReferenceModel getConfiguredFeaturesModel configuredFeatureReferences configuredFeatureReferences isEmpty FeatureReferenceModel FeatureReferenceModel configuredFeatureReferences keySet toArray arrayTypeFor configuredFeatureReferences keySet
since 2 0 public Feature Reference Model get Unconfigured Features Model obtain unconfigured features by comparing configured ones with those installed if unconfigured Feature References null configured Site Model null configured Site Model get Site Model null I Site site I Site configured Site Model get Site Model I Site Feature Reference site Features site get Feature References if site Features length get Configured Features Model length for int i 0 i site Features length i if site Features i instanceof Site Feature Reference continue Iterator iterator configured Feature References key Set iterator boolean found false while found iterator has Next Feature Reference Model f Feature Reference Model iterator next if Update Manager Utils sameURL f getURL site Features i getURL found true if found add Unconfigured Feature Reference Site Feature Reference site Features i if unconfigured Feature References null unconfigured Feature References is Empty return new Feature Reference Model 0 return Feature Reference Model unconfigured Feature References key Set to Array array Type For unconfigured Feature References key Set  FeatureReferenceModel getUnconfiguredFeaturesModel unconfiguredFeatureReferences configuredSiteModel configuredSiteModel getSiteModel ISite ISite configuredSiteModel getSiteModel ISiteFeatureReference siteFeatures getFeatureReferences siteFeatures getConfiguredFeaturesModel siteFeatures siteFeatures SiteFeatureReference configuredFeatureReferences keySet hasNext FeatureReferenceModel FeatureReferenceModel UpdateManagerUtils siteFeatures addUnconfiguredFeatureReference SiteFeatureReference siteFeatures unconfiguredFeatureReferences unconfiguredFeatureReferences isEmpty FeatureReferenceModel FeatureReferenceModel unconfiguredFeatureReferences keySet toArray arrayTypeFor unconfiguredFeatureReferences keySet
Gets the configured Site Model return Returns a Configured Site Model since 2 0 2 public Configured Site Model get Configured Site Model return configured Site Model  configuredSiteModel ConfiguredSiteModel ConfiguredSiteModel getConfiguredSiteModel configuredSiteModel
Sets the configured Site Model param configured Site Model The configured Site Model to set since 2 0 2 public void set Configured Site Model Configured Site Model configured Site Model this configured Site Model configured Site Model  configuredSiteModel configuredSiteModel configuredSiteModel setConfiguredSiteModel ConfiguredSiteModel configuredSiteModel configuredSiteModel configuredSiteModel
private boolean remove Feature Reference Model feature Map list URL featureURL feature getURL boolean found false Iterator iter list key Set iterator while iter has Next found Feature Reference Model element Feature Reference Model iter next if Update Manager Utils sameURL element getURL featureURL list remove element found true return found  FeatureReferenceModel keySet hasNext FeatureReferenceModel FeatureReferenceModel UpdateManagerUtils
private void add Feature Reference Model feature Map list URL featureURL feature getURL boolean found false Iterator iter list key Set iterator while iter has Next found Feature Reference Model element Feature Reference Model iter next if Update Manager Utils sameURL element getURL featureURL found true if found list put feature null else Update Core warn Feature Reference feature already part of the list NON NLS 1 NON NLS 2  FeatureReferenceModel keySet hasNext FeatureReferenceModel FeatureReferenceModel UpdateManagerUtils UpdateCore
adds a feature in the configured Reference list also used by the parser to avoid creating another activity public void add Configured Feature Reference Feature Reference Model feature assert Is Writeable if configured Feature References null this configured Feature References new Hash Map if configured Feature References contains Key feature DEBUG if Update Core DEBUG Update Core DEBUG SHOW CONFIGURATION Update Core debug Configuring feature getURL String NON NLS 1 this add feature configured Feature References when user configure a feature we have to remove it from unconfigured feature if it exists because the user doesn t know if unconfigured Feature References null boolean success remove feature unconfigured Feature References if success Update Core warn Feature not part of Unconfigured list feature getURL String NON NLS 1  configuredReference addConfiguredFeatureReference FeatureReferenceModel assertIsWriteable configuredFeatureReferences configuredFeatureReferences HashMap configuredFeatureReferences containsKey UpdateCore UpdateCore DEBUG_SHOW_CONFIGURATION UpdateCore getURLString configuredFeatureReferences unconfiguredFeatureReferences unconfiguredFeatureReferences UpdateCore getURLString
adds a feature in the list also used by the parser to avoid creating another activity public void add Unconfigured Feature Reference Feature Reference Model feature assert Is Writeable if unconfigured Feature References null this unconfigured Feature References new Hash Map if unconfigured Feature References contains Key feature if Update Core DEBUG Update Core DEBUG SHOW CONFIGURATION Update Core debug Unconfiguring feature getURL String NON NLS 1 this add feature unconfigured Feature References an unconfigured feature is always from a configured one no unless it was parsed right if configured Feature References null boolean success remove feature configured Feature References if success Update Core warn Feature not part of Configured list feature getURL String NON NLS 1  addUnconfiguredFeatureReference FeatureReferenceModel assertIsWriteable unconfiguredFeatureReferences unconfiguredFeatureReferences HashMap unconfiguredFeatureReferences containsKey UpdateCore UpdateCore DEBUG_SHOW_CONFIGURATION UpdateCore getURLString unconfiguredFeatureReferences configuredFeatureReferences configuredFeatureReferences UpdateCore getURLString
removes a feature from any list public void remove Feature Reference Feature Reference Model feature assert Is Writeable if unconfigured Feature References null boolean success remove feature unconfigured Feature References if success Update Core warn feature getURL String not part of unconfigured list NON NLS 1 if configured Feature References null boolean success remove feature configured Feature References if success Update Core warn feature getURL String not part of configured list NON NLS 1  removeFeatureReference FeatureReferenceModel assertIsWriteable unconfiguredFeatureReferences unconfiguredFeatureReferences UpdateCore getURLString configuredFeatureReferences configuredFeatureReferences UpdateCore getURLString
Sets the unconfigured Feature References param feature References The unconfigured Feature References to set protected void set Unconfigured Feature References I Feature Reference feature References unconfigured Feature References new Hash Map for int i 0 i feature References length i unconfigured Feature References put feature References i null  unconfiguredFeatureReferences featureReferences unconfiguredFeatureReferences setUnconfiguredFeatureReferences IFeatureReference featureReferences unconfiguredFeatureReferences HashMap featureReferences unconfiguredFeatureReferences featureReferences
Sets the configured Feature References param feature References The configured Feature References to set protected void set Configured Feature References I Feature Reference feature References configured Feature References new Hash Map for int i 0 i feature References length i configured Feature References put feature References i null  configuredFeatureReferences featureReferences configuredFeatureReferences setConfiguredFeatureReferences IFeatureReference featureReferences configuredFeatureReferences HashMap featureReferences configuredFeatureReferences featureReferences
return boolean public boolean is Enabled return enable  isEnabled
param value public void set Enabled boolean value enable value  setEnabled

Constructor public Configured Site Model super  ConfiguredSiteModel
returns the site return The I Site since 2 0 public Site Model get Site Model return site  ISite SiteModel getSiteModel
Sets the site param site The site to set public void set Site Model Site Model site assert Is Writeable this site site  setSiteModel SiteModel assertIsWriteable
returns the policy public Configuration Policy Model get Configuration Policy Model return policy  ConfigurationPolicyModel getConfigurationPolicyModel
since 2 0 public void set Configuration Policy Model Configuration Policy Model policy assert Is Writeable this policy policy policy set Configured Site Model this  setConfigurationPolicyModel ConfigurationPolicyModel assertIsWriteable setConfiguredSiteModel
since public boolean is Updatable return installable  isUpdatable
since 2 0 public void set Updatable boolean installable assert Is Writeable this installable installable  setUpdatable assertIsWriteable
Gets the install Configuration return Returns a Install Configuration Model public Install Configuration Model get Install Configuration Model return install Configuration  installConfiguration InstallConfigurationModel InstallConfigurationModel getInstallConfigurationModel installConfiguration
Sets the install Configuration param install Configuration The install Configuration to set public void set Install Configuration Model Install Configuration Model install Configuration assert Is Writeable this install Configuration install Configuration  installConfiguration installConfiguration installConfiguration setInstallConfigurationModel InstallConfigurationModel installConfiguration assertIsWriteable installConfiguration installConfiguration
Gets the platformURL String return Returns a String public String get PlatformURL String return platformURL String  platformURLString getPlatformURLString platformURLString
Sets the platformURL String param platformURL String The platformURL String to set public void set PlatformURL String String platformURL String this platformURL String platformURL String  platformURLString platformURLString platformURLString setPlatformURLString platformURLString platformURLString platformURLString
Gets the previous Plugin Path The list of plugins the platform had return Returns a String public String get Previous Plugin Path if previous Plugin Path null previous Plugin Path new String 0 return previous Plugin Path  previousPluginPath getPreviousPluginPath previousPluginPath previousPluginPath previousPluginPath
Sets the previous Plugin Path param previous Plugin Path The previous Plugin Path to set public void set Previous Plugin Path String previous Plugin Path this previous Plugin Path new String previous Plugin Path length System arraycopy previous Plugin Path 0 this previous Plugin Path 0 previous Plugin Path length  previousPluginPath previousPluginPath previousPluginPath setPreviousPluginPath previousPluginPath previousPluginPath previousPluginPath previousPluginPath previousPluginPath previousPluginPath
creates a Status protected I Status create Status int status Type String msg Exception e if status Type I Status OK status Type I Status ERROR return create Status status Type I Status OK msg to String e  IStatus createStatus statusType statusType IStatus statusType IStatus createStatus statusType IStatus toString
protected I Status create Status int status Severity int status Code String msg Exception e String id Update Core get Plugin get Bundle get Symbolic Name String Buffer complete String new String Buffer NON NLS 1 if msg null complete String append msg if e null complete String append r n NON NLS 1 complete String append e to String complete String append r n NON NLS 1 return new Status status Severity id status Code complete String to String e  IStatus createStatus statusSeverity statusCode UpdateCore getPlugin getBundle getSymbolicName StringBuffer completeString StringBuffer completeString completeString completeString toString completeString statusSeverity statusCode completeString toString
see org eclipse update configuration I Configured Site is Enabled public boolean is Enabled return get Configuration Policy Model is Enabled  IConfiguredSite isEnabled isEnabled getConfigurationPolicyModel isEnabled
see org eclipse update configuration I Configured Site set Enabled boolean public void set Enabled boolean value get Configuration Policy Model set Enabled value  IConfiguredSite setEnabled setEnabled getConfigurationPolicyModel setEnabled

private class Parse Complete Exception extends SAX Exception public Parse Complete Exception String arg0 super arg0  ParseCompleteException SAXException ParseCompleteException
Constructor for Default Feature Parser public Default Plugin Parser super try parser Factory set Namespace Aware true this parser parser Factory newSAX Parser catch Parser Configuration Exception e Update Core log e catch SAX Exception e Update Core log e  DefaultFeatureParser DefaultPluginParser parserFactory setNamespaceAware parserFactory newSAXParser ParserConfigurationException UpdateCore SAXException UpdateCore
since 2 0 public synchronized Plugin Entry parse Input Stream in throws SAX Exception IO Exception try plugin Entry new Plugin Entry parser parse new Input Source in this catch Parse Complete Exception e expected we stopped the parsing when we have the information we need no need to pursue the parsing if id null id trim length 0 id  no id  NON NLS 1 plugin Entry set Versioned Identifier new Versioned Identifier id version return plugin Entry  PluginEntry InputStream SAXException IOException pluginEntry PluginEntry InputSource ParseCompleteException _no_id_ pluginEntry setVersionedIdentifier VersionedIdentifier pluginEntry
see Default Handler start Element String String String Attributes public void start Element String uri String local Name String q Name Attributes attributes throws SAX Exception String tag local Name trim if tag equals Ignore Case PLUGIN plugin Entry is Fragment false process Plugin attributes return if tag equals Ignore Case FRAGMENT plugin Entry is Fragment true process Plugin attributes return  DefaultHandler startElement startElement localName qName SAXException localName equalsIgnoreCase pluginEntry isFragment processPlugin equalsIgnoreCase pluginEntry isFragment processPlugin
process plugin entry info private void process Plugin Attributes attributes throws Parse Complete Exception id attributes get Value id NON NLS 1 version attributes get Value version NON NLS 1 throw new Parse Complete Exception NON NLS 1  processPlugin ParseCompleteException getValue getValue ParseCompleteException

default constructor Create public Install Configuration Model  InstallConfigurationModel
since 2 0 public Configured Site Model get Configuration Sites Model if initialized initialize if configuration Sites null configuration Sites size 0 return new Configured Site Model 0 return Configured Site Model configuration Sites to Array array Type For configuration Sites  ConfiguredSiteModel getConfigurationSitesModel configurationSites configurationSites ConfiguredSiteModel ConfiguredSiteModel configurationSites toArray arrayTypeFor configurationSites
Adds the configuration to the list is called when adding a Site or parsing the XML file in this case we do not want to create a new activity so we do not want t call add Configuration Site public void add Configuration Site Model Configured Site Model site if configuration Sites null configuration Sites new Array List if configuration Sites contains site configuration Sites add site  addConfigurationSite addConfigurationSiteModel ConfiguredSiteModel configurationSites configurationSites ArrayList configurationSites configurationSites
public void set Configuration Site Model Configured Site Model sites configuration Sites null for int i 0 i sites length i add Configuration Site Model sites i  setConfigurationSiteModel ConfiguredSiteModel configurationSites addConfigurationSiteModel
since 2 0 public boolean remove Configuration Site Model Configured Site Model site if initialized initialize if configuration Sites null return configuration Sites remove site return false  removeConfigurationSiteModel ConfiguredSiteModel configurationSites configurationSites
since 2 0 public boolean is Current if initialized initialize return is Current  isCurrent isCurrent
since 2 0 public void set Current boolean is Current do not check if writable as we may set an install config as Not current this is Current is Current  setCurrent isCurrent isCurrent isCurrent
since 2 0 public Configuration Activity Model get Activity Model if activities null initialized initialize if activities null activities size 0 return new Configuration Activity Model 0 return Configuration Activity Model activities to Array array Type For activities  ConfigurationActivityModel getActivityModel ConfigurationActivityModel ConfigurationActivityModel toArray arrayTypeFor
since 2 0 public void add Activity Model Configuration Activity Model activity if activities null activities new Array List if activities contains activity activities add activity activity set Install Configuration Model this  addActivityModel ConfigurationActivityModel ArrayList setInstallConfigurationModel
public Date get Creation Date if initialized initialize if date null initialize return date  getCreationDate
Sets the date param date The date to set public void set Creation Date Date date assert Is Writeable this date date  setCreationDate assertIsWriteable
since 2 0 public URL getURL if initialized initialize no need to initialize always set delayed Resolve return locationURL  delayedResolve
since 2 0 public String get Label if initialized initialize if label null initialize return label  getLabel
since 2 0 2 public String to String return get Label  toString getLabel
Sets the label param label The label to set public void set Label String label assert Is Writeable this label label  setLabel assertIsWriteable
Gets the locationURL String return Returns a String public String get LocationURL String if initialized delayed Resolve return locationURL String  locationURLString getLocationURLString delayedResolve locationURLString
Sets the locationURL String param locationURL String The locationURL String to set public void set LocationURL String String locationURL String assert Is Writeable this locationURL String locationURL String this locationURL null  locationURLString locationURLString locationURLString setLocationURLString locationURLString assertIsWriteable locationURLString locationURLString
public void resolve URL base URL bundleURL throws MalformedURL Exception this base base this bundleURL bundleURL  MalformedURLException
Returns the timeline return long public long get Timeline return 0 if initialized initialize return timeline  getTimeline
private void initialize try try I Platform Configuration platform Config if Update Manager Utils sameURL getURL Configurator Utils get Current Platform Configuration get Configuration Location platform Config Configurator Utils get Current Platform Configuration else platform Config Configurator Utils get Platform Configuration getURL new Install Configuration Parser platform Config this catch File Not Found Exception exception Update Core warn locationURL String does not exist The local site is not in synch with the file system and is pointing to a file that doesn t exist exception NON NLS 1 throw Utilities new Core Exception Policy bind Install Configuration Error During File Access locationURL String exception NON NLS 1 catch IO Exception exception throw Utilities new Core Exception Policy bind Install Configuration Error During File Access locationURL String exception NON NLS 1 catch Core Exception e Update Core warn Error processing configuration history locationURL to External Form e NON NLS 1 finally initialized true finish resolve PERF try delegate resolve List Reference get Activity Model base bundleURL resolve List Reference get Configuration Sites Model base bundleURL catch MalformedURL Exception e  IPlatformConfiguration platformConfig UpdateManagerUtils ConfiguratorUtils getCurrentPlatformConfiguration getConfigurationLocation platformConfig ConfiguratorUtils getCurrentPlatformConfiguration platformConfig ConfiguratorUtils getPlatformConfiguration InstallConfigurationParser platformConfig FileNotFoundException UpdateCore locationURLString newCoreException InstallConfiguration ErrorDuringFileAccess locationURLString IOException newCoreException InstallConfiguration ErrorDuringFileAccess locationURLString CoreException UpdateCore toExternalForm resolveListReference getActivityModel resolveListReference getConfigurationSitesModel MalformedURLException
private void delayed Resolve PERF delay resolution if resolved return resolved true resolve local elements try locationURL resolveURL base bundleURL locationURL String locationURL new URL locationURL String catch MalformedURL Exception e File f new File locationURL String try if f exists locationURL f toURL else locationURL base catch MalformedURL Exception e1 locationURL base  delayedResolve locationURLString locationURLString MalformedURLException locationURLString MalformedURLException
public void reset Activities activities null  resetActivities

Constructor for Default Site Parser public Install Configuration Parser I Platform Configuration platform Config Install Configuration Model config throws IO Exception Core Exception Assert is True platform Config instanceof Platform Configuration this platform Config Platform Configuration platform Config this config config DEBUG if Update Core DEBUG Update Core DEBUG SHOW PARSING Update Core debug Start parsing Configuration config getURL to External Form NON NLS 1 process Config this platform Config  DefaultSiteParser InstallConfigurationParser IPlatformConfiguration platformConfig InstallConfigurationModel IOException CoreException isTrue platformConfig PlatformConfiguration platformConfig PlatformConfiguration platformConfig UpdateCore UpdateCore DEBUG_SHOW_PARSING UpdateCore toExternalForm processConfig platformConfig
process the Site info private void process Site Site Entry site Entry throws Core Exception IO Exception site url siteURL site Entry getURL try siteURL Platform as LocalURL siteURL TODO workaround bug in platform url resolution if siteURL get Protocol equals file NON NLS 1 siteURL new File siteURL get File toURL catch IO Exception e keep original url policy I Site site Site Manager get Site siteURL null configuration site Base Site Local Factory factory new Base Site Local Factory config Site factory create Configuration Site Model Site Model site site Entry get Site Policy get Type platform url config Site set PlatformURL String site Entry getURL to External Form configured config Site set Enabled site Entry is Enabled check if the site exists and is updatable config Site set Updatable site Entry is Updateable add to install configuration config add Configuration Site Model config Site config Site set Install Configuration Model config Feature Entry features site Entry get Feature Entries for int i 0 i features length i process Feature features i  processSite SiteEntry siteEntry CoreException IOException siteEntry asLocalURL getProtocol getFile IOException ISite SiteManager getSite BaseSiteLocalFactory BaseSiteLocalFactory configSite createConfigurationSiteModel SiteModel siteEntry getSitePolicy getType configSite setPlatformURLString siteEntry toExternalForm configSite setEnabled siteEntry isEnabled configSite setUpdatable siteEntry isUpdateable addConfigurationSiteModel configSite configSite setInstallConfigurationModel FeatureEntry siteEntry getFeatureEntries processFeature
process the Default Feature info private void process Feature Feature Entry feature throws Core Exception IO Exception url String path feature getURL NON NLS 1 URL url Update Manager Utils getURL siteURL path null if url null Site Feature Reference ref new Site Feature Reference ref set Site I Site config Site get Site Model ref setURL url config Site get Configuration Policy Model add Configured Feature Reference ref updateURL TODO do we need the update url and to resolve it String updateURL String attributes get Value updateURL NON NLS 1 URL Entry entry new URL Entry entry setURL String updateURL String entry resolve siteURL null DEBUG if Update Core DEBUG Update Core DEBUG SHOW PARSING Update Core debug End Processing Default Feature Tag url url to External Form NON NLS 1 else Update Core log Policy bind Install Configuration Parser Feature Reference NoURL new Exception NON NLS 1  DefaultFeature processFeature FeatureEntry CoreException IOException UpdateManagerUtils SiteFeatureReference SiteFeatureReference setSite ISite configSite getSiteModel configSite getConfigurationPolicyModel addConfiguredFeatureReference updateURLString getValue URLEntry URLEntry setURLString updateURLString UpdateCore UpdateCore DEBUG_SHOW_PARSING UpdateCore DefaultFeature toExternalForm UpdateCore InstallConfigurationParser FeatureReferenceNoURL
process the Config info private void process Config Platform Configuration platform Config throws IO Exception Core Exception date Date date new Date platform Config get Change Stamp config set Creation Date date config set Label date to String timeline String timeline String attributes get Value timeline NON NLS 1 long timeline config get Creation Date get Time if timeline String null timeline Long parse Long timeline String config set Timeline timeline Site Entry sites platform Config get Configuration get Sites for int i 0 i sites length i process Site sites i  processConfig PlatformConfiguration platformConfig IOException CoreException platformConfig getChangeStamp setCreationDate setLabel toString timelineString getValue getCreationDate getTime timelineString parseLong timelineString setTimeline SiteEntry platformConfig getConfiguration getSites processSite

Constructor for Local Site public Site Local Model super  LocalSite SiteLocalModel
since 2 0 public Install Configuration Model get Current Configuration Model return current Configuration  InstallConfigurationModel getCurrentConfigurationModel currentConfiguration
since 2 0 public Install Configuration Model get Configuration History Model if configurations null initialize history process History if configurations null configurations size 0 return new Install Configuration Model 0 else return Install Configuration Model configurations to Array array Type For configurations  InstallConfigurationModel getConfigurationHistoryModel processHistory InstallConfigurationModel InstallConfigurationModel toArray arrayTypeFor
adds a new configuration to the Local Site the newly added configuration is teh current one public void add Configuration Model Install Configuration Model config if config null if configurations null configurations new Array List if configurations contains config configurations add config  LocalSite addConfigurationModel InstallConfigurationModel ArrayList
adds a new configuration to the Local Site the newly added configuration is teh current one public boolean remove Configuration Model Install Configuration Model config if config null return configurations remove config return false  LocalSite removeConfigurationModel InstallConfigurationModel
Gets the location of the local site return Returns a URL public URL get LocationURL return location  getLocationURL
Gets the locationURL String return Returns a String public String get LocationURL String return locationURL String  locationURLString getLocationURLString locationURLString
Sets the locationURL String param locationURL String The locationURL String to set public void set LocationURL String String locationURL String assert Is Writeable this locationURL String locationURL String this location null  locationURLString locationURLString locationURLString setLocationURLString locationURLString assertIsWriteable locationURLString locationURLString
since 2 0 public String get Label return label  getLabel
Sets the label param label The label to set public void set Label String label assert Is Writeable this label label  setLabel assertIsWriteable
since 2 0 public int get Maximum History Count return history  getMaximumHistoryCount
since 2 0 public void set Maximum History Count int history assert Is Writeable this history history  setMaximumHistoryCount assertIsWriteable
Adds a preserved configuration into teh collection do not save the configuration since 2 0 public void add Preserved Install Configuration Model Install Configuration Model configuration if preserved Configurations null preserved Configurations new Array List preserved Configurations add configuration  addPreservedInstallConfigurationModel InstallConfigurationModel preservedConfigurations preservedConfigurations ArrayList preservedConfigurations
since 2 0 public boolean remove Preserved Configuration Model Install Configuration Model configuration if preserved Configurations null return preserved Configurations remove configuration return false  removePreservedConfigurationModel InstallConfigurationModel preservedConfigurations preservedConfigurations
since 2 0 public Install Configuration Model get Preserved Configurations Model if preserved Configurations null preserved Configurations is Empty return new Install Configuration Model 0 return Install Configuration Model preserved Configurations to Array array Type For preserved Configurations  InstallConfigurationModel getPreservedConfigurationsModel preservedConfigurations preservedConfigurations isEmpty InstallConfigurationModel InstallConfigurationModel preservedConfigurations toArray arrayTypeFor preservedConfigurations
Sets the current Configuration param current Configuration The current Configuration to set public void set Current Configuration Model Install Configuration Model current Configuration assert Is Writeable this current Configuration current Configuration 2 0 2 set the configured Site of sites Configured Site Model conf Sites current Configuration get Configuration Sites Model for int i 0 i conf Sites length i conf Sites i get Site Model set Configured Site Model conf Sites i  currentConfiguration currentConfiguration currentConfiguration setCurrentConfigurationModel InstallConfigurationModel currentConfiguration assertIsWriteable currentConfiguration currentConfiguration configuredSite ConfiguredSiteModel confSites currentConfiguration getConfigurationSitesModel confSites confSites getSiteModel setConfiguredSiteModel confSites
public void resolve URL base URL bundleURL throws MalformedURL Exception local location resolveURL base bundleURL get LocationURL String delegate resolve List Reference get Configuration History Model base bundleURL resolve List Reference get Preserved Configurations Model base bundleURL resolve Reference get Current Configuration Model base bundleURL  MalformedURLException getLocationURLString resolveListReference getConfigurationHistoryModel resolveListReference getPreservedConfigurationsModel resolveReference getCurrentConfigurationModel
Gets the stamp return Returns a long public long get Stamp return stamp  getStamp
Sets the stamp param stamp The stamp to set public void set Stamp long stamp this stamp stamp  setStamp
see org eclipse update core model Model Object get Property Name protected String get Property Name return platform NON NLS 1  ModelObject getPropertyName getPropertyName
private void process History try URL historyURL new URL get LocationURL history NON NLS 1 historyURL Platform as LocalURL historyURL File history Dir new File historyURL get File if history Dir exists File backed Configs history Dir list Files Base Site Local Factory factory new Base Site Local Factory for int i 0 i backed Configs length i String name backed Configs i get Name if name ends With xml NON NLS 1 name name substring 0 name length 4 else continue Date date new Date Long parse Long name Install Configuration Model config factory create Install Configuration Model config set LocationURL String backed Configs i get Absolute Path replace config set Label date to String config set Creation Date date config resolve backed Configs i toURL get Resource BundleURL add the config add Configuration Model config catch Exception e Update Core warn Error processing history e NON NLS 1  processHistory getLocationURL asLocalURL historyDir getFile historyDir backedConfigs historyDir listFiles BaseSiteLocalFactory BaseSiteLocalFactory backedConfigs backedConfigs getName endsWith parseLong InstallConfigurationModel createInstallConfigurationModel setLocationURLString backedConfigs getAbsolutePath setLabel toString setCreationDate backedConfigs getResourceBundleURL addConfigurationModel UpdateCore
return the appropriate resource bundle for this sitelocal URL get Resource BundleURL throws Core Exception URL url null try url Update Manager Utils as DirectoryURL get LocationURL catch Missing Resource Exception e Update Core warn e get Localized Message url to External Form NON NLS 1 catch MalformedURL Exception e Update Core warn e get Localized Message NON NLS 1 return url  getResourceBundleURL CoreException UpdateManagerUtils asDirectoryURL getLocationURL MissingResourceException UpdateCore getLocalizedMessage toExternalForm MalformedURLException UpdateCore getLocalizedMessage

return the appropriate resource bundle for this sitelocal private Resource Bundle get Resource Bundle throws Core Exception Resource Bundle bundle null URL url null try url Update Manager Utils as DirectoryURL site get LocationURL Class Loader l new URL Class Loader new URL url null bundle Resource Bundle get Bundle platform Locale get Default l NON NLS 1 catch Missing Resource Exception e Update Core warn e get Localized Message url to External Form NON NLS 1 catch MalformedURL Exception e Update Core warn e get Localized Message NON NLS 1 return bundle  ResourceBundle getResourceBundle CoreException ResourceBundle UpdateManagerUtils asDirectoryURL getLocationURL ClassLoader URLClassLoader ResourceBundle getBundle getDefault MissingResourceException UpdateCore getLocalizedMessage toExternalForm MalformedURLException UpdateCore getLocalizedMessage
Constructor for Default Site Parser public Site Local Parser I Platform Configuration platform Config I Local Site site throws IO Exception Core Exception Assert is True platform Config instanceof Platform Configuration this platform Config Platform Configuration platform Config Assert is True site instanceof Site Local Model this site Site Local Model site DEBUG if Update Core DEBUG Update Core DEBUG SHOW PARSING Update Core debug Start parsing localsite Site Local Model site get LocationURL String NON NLS 1 bundle get Resource Bundle process Config process History  DefaultSiteParser SiteLocalParser IPlatformConfiguration platformConfig ILocalSite IOException CoreException isTrue platformConfig PlatformConfiguration platformConfig PlatformConfiguration platformConfig isTrue SiteLocalModel SiteLocalModel UpdateCore UpdateCore DEBUG_SHOW_PARSING UpdateCore SiteLocalModel getLocationURLString getResourceBundle processConfig processHistory
process the Config info private void process Config throws MalformedURL Exception Core Exception String label platform Config get Configuration get Date to String label Update Manager Utils get Resource String label bundle site set Label label URL url site get LocationURL Install Configuration Model config factory create Install Configuration Model config set LocationURL String url to External Form config set Label label config resolve url site get Resource BundleURL add the config Site Local site add Configuration Install Configuration config DEBUG if Update Core DEBUG Update Core DEBUG SHOW PARSING Update Core debug End Processing Config Tag url url to External Form NON NLS 1  processConfig MalformedURLException CoreException platformConfig getConfiguration getDate toString UpdateManagerUtils getResourceString setLabel getLocationURL InstallConfigurationModel createInstallConfigurationModel setLocationURLString toExternalForm setLabel getResourceBundleURL SiteLocal addConfiguration InstallConfiguration UpdateCore UpdateCore DEBUG_SHOW_PARSING UpdateCore toExternalForm

protected I Install Feature Operation operations public Batch Install Operation I Install Feature Operation operations super this operations operations  IInstallFeatureOperation BatchInstallOperation IInstallFeatureOperation
see org eclipse update operations I Multi Operation get Operations public I Feature Operation get Operations return operations  IMultiOperation getOperations IFeatureOperation getOperations
public boolean execute I Progress Monitor monitor I Operation Listener listener throws Core Exception Invocation Target Exception int install Count 0 if operations null operations length 0 return false I Status status Operations Manager get Validator validate Pending Changes operations if status null status get Code I Status ERROR throw new Core Exception status Check for duplication conflicts Array List conflicts Duplicate Conflicts Validator compute Duplicate Conflicts operations config if conflicts null boolean continue Processing false if listener null continue Processing listener before Execute this conflicts if continue Processing return false Operations Manager set In Progress true if monitor null monitor new Null Progress Monitor try if listener null listener before Execute this null monitor begin Task Policy bind KEY INSTALLING operations length for int i 0 i operations length i Sub Progress Monitor sub Monitor new Sub Progress Monitor monitor 1 Sub Progress Monitor PREPEND MAIN LABEL TO SUBTASK operations i execute sub Monitor listener Operations Manager add Pending Operation operations i operations i mark Processed if listener null listener after Execute operations i null monitor worked 1 install Count return Site Manager get Local Site save catch Install Aborted Exception e saves the current configuration if install Count 0 Site Manager get Local Site save throw new Invocation Target Exception e catch Core Exception e saves the current configuration if install Count 0 Site Manager get Local Site save throw new Invocation Target Exception e finally Operations Manager set In Progress false monitor done  IProgressMonitor IOperationListener CoreException InvocationTargetException installCount IStatus OperationsManager getValidator validatePendingChanges getCode IStatus CoreException ArrayList DuplicateConflictsValidator computeDuplicateConflicts continueProcessing continueProcessing beforeExecute continueProcessing OperationsManager setInProgress NullProgressMonitor beforeExecute beginTask KEY_INSTALLING SubProgressMonitor subMonitor SubProgressMonitor SubProgressMonitor PREPEND_MAIN_LABEL_TO_SUBTASK subMonitor OperationsManager addPendingOperation markProcessed afterExecute installCount SiteManager getLocalSite InstallAbortedException installCount SiteManager getLocalSite InvocationTargetException CoreException installCount SiteManager getLocalSite InvocationTargetException OperationsManager setInProgress

public Config Operation I Configured Site site I Feature feature super site feature  ConfigOperation IConfiguredSite IFeature
public boolean execute I Progress Monitor pm I Operation Listener listener throws Core Exception I Status status Operations Manager get Validator validate Pending Config feature if status null status get Code I Status ERROR throw new Core Exception status target Site configure feature ensure Unique try Restart not needed boolean restart Needed false Check if this operation is cancelling one that s already pending I Operation pending Operation Operations Manager find Pending Operation feature if pending Operation instanceof I Unconfig Feature Operation no need to do either pending change Operations Manager remove Pending Operation pending Operation else Operations Manager add Pending Operation this mark Processed if listener null listener after Execute this null restart Needed Site Manager get Local Site save restart Needed notify the model Operations Manager fire Object Changed feature null return restart Needed catch Core Exception e undo Update Utils log Exception e throw e  IProgressMonitor IOperationListener CoreException IStatus OperationsManager getValidator validatePendingConfig getCode IStatus CoreException targetSite ensureUnique restartNeeded IOperation pendingOperation OperationsManager findPendingOperation pendingOperation IUnconfigFeatureOperation OperationsManager removePendingOperation pendingOperation OperationsManager addPendingOperation markProcessed afterExecute restartNeeded SiteManager getLocalSite restartNeeded OperationsManager fireObjectChanged restartNeeded CoreException UpdateUtils logException
public void undo throws Core Exception target Site unconfigure feature  CoreException targetSite

public Id Entry I Feature feature I Configured Site csite this feature feature this csite csite if csite null System out println csite null NON NLS 1  IdEntry IFeature IConfiguredSite
public boolean is Install Candidate return csite null  isInstallCandidate
return csite null public I Feature get Feature return feature  IFeature getFeature
public String get Identifier return feature get Versioned Identifier get Identifier  getIdentifier getVersionedIdentifier getIdentifier
public I Configured Site get Configured Site if csite null return csite return feature get Site get Current Configured Site  IConfiguredSite getConfiguredSite getSite getCurrentConfiguredSite
public boolean same Level Id Entry entry Versioned Identifier vid feature get Versioned Identifier Versioned Identifier evid entry get Feature get Versioned Identifier return vid equals evid  sameLevel IdEntry VersionedIdentifier getVersionedIdentifier VersionedIdentifier getFeature getVersionedIdentifier
public String to String I Configured Site config Site get Configured Site String version feature get Versioned Identifier get Version to String String location config Site get Site getURL get File return Policy bind KEY CONFLICT new String version location  toString IConfiguredSite configSite getConfiguredSite getVersionedIdentifier getVersion toString configSite getSite getFile KEY_CONFLICT
public static Array List compute Duplicate Conflicts I Install Feature Operation job I Install Configuration config I Configured Site target Site I Feature Reference optional Features Hashtable feature Table new Hashtable try compute Present State feature Table config compute New Feature job get Feature target Site feature Table optional Features return compute Conflicts feature Table catch Core Exception e return null  ArrayList computeDuplicateConflicts IInstallFeatureOperation IInstallConfiguration IConfiguredSite targetSite IFeatureReference optionalFeatures featureTable computePresentState featureTable computeNewFeature getFeature targetSite featureTable optionalFeatures computeConflicts featureTable CoreException
public static Array List compute Duplicate Conflicts I Install Feature Operation jobs I Install Configuration config Hashtable feature Table new Hashtable compute Present State feature Table config compute New Features jobs feature Table return compute Conflicts feature Table  ArrayList computeDuplicateConflicts IInstallFeatureOperation IInstallConfiguration featureTable computePresentState featureTable computeNewFeatures featureTable computeConflicts featureTable
private static Array List compute Conflicts Hashtable feature Table Array List result null for Enumeration enum feature Table elements enum has More Elements Array List candidate Array List enum next Element if candidate size 1 continue Array List conflict check For Conflict candidate if conflict null if result null result new Array List result add conflict return result  ArrayList computeConflicts featureTable ArrayList featureTable hasMoreElements ArrayList ArrayList nextElement ArrayList checkForConflict ArrayList
private static Array List check For Conflict Array List candidate Id Entry first Entry null for int i 0 i candidate size i Id Entry entry Id Entry candidate get i if first Entry null first Entry entry else if entry same Level first Entry return candidate return null  ArrayList checkForConflict ArrayList IdEntry firstEntry IdEntry IdEntry firstEntry firstEntry sameLevel firstEntry
private static void compute Present State Hashtable table I Install Configuration config I Configured Site csites config get Configured Sites for int i 0 i csites length i I Configured Site csite csites i I Feature Reference refs csite get Configured Features for int j 0 j refs length j try add Entry refs j get Feature null csite table catch Core Exception e don t let one bad feature stop the loop  computePresentState IInstallConfiguration IConfiguredSite getConfiguredSites IConfiguredSite IFeatureReference getConfiguredFeatures addEntry getFeature CoreException
private static void compute New Features I Install Feature Operation jobs Hashtable feature Table for int i 0 i jobs length i I Install Feature Operation job jobs i I Configured Site target Site job get Target Site I Feature new Feature job get Feature try compute New Feature new Feature target Site feature Table null catch Core Exception e  computeNewFeatures IInstallFeatureOperation featureTable IInstallFeatureOperation IConfiguredSite targetSite getTargetSite IFeature newFeature getFeature computeNewFeature newFeature targetSite featureTable CoreException
private static void compute New Feature I Feature feature I Configured Site csite Hashtable table I Feature Reference optional Features throws Core Exception add Entry feature csite table I Included Feature Reference irefs feature get Included Feature References for int i 0 i irefs length i I Included Feature Reference iref irefs i boolean add true if iref is Optional optional Features null boolean found false for int j 0 j optional Features length j I Feature Reference checked optional Features j if checked equals iref found true break add found if add compute New Feature iref get Feature null csite table optional Features  computeNewFeature IFeature IConfiguredSite IFeatureReference optionalFeatures CoreException addEntry IIncludedFeatureReference getIncludedFeatureReferences IIncludedFeatureReference isOptional optionalFeatures optionalFeatures IFeatureReference optionalFeatures computeNewFeature getFeature optionalFeatures
private static void add Entry I Feature feature I Configured Site csite Hashtable feature Table String id feature get Versioned Identifier get Identifier Array List entries Array List feature Table get id if entries null entries new Array List feature Table put id entries Id Entry entry new Id Entry feature csite boolean replaced false for int i 0 i entries size i Id Entry existing Entry Id Entry entries get i I Configured Site existing Site existing Entry get Configured Site if existing Site equals entry get Configured Site same site replace it if not new if entry is Install Candidate entries set i entry entries remove existing Entry replaced true break if replaced entries add entry  addEntry IFeature IConfiguredSite featureTable getVersionedIdentifier getIdentifier ArrayList ArrayList featureTable ArrayList featureTable IdEntry IdEntry IdEntry existingEntry IdEntry IConfiguredSite existingSite existingEntry getConfiguredSite existingSite getConfiguredSite isInstallCandidate existingEntry

public Feature Hierarchy Element I Feature Reference old Ref I Feature Reference new Ref old Feature Ref old Ref new Feature Ref new Ref  FeatureHierarchyElement IFeatureReference oldRef IFeatureReference newRef oldFeatureRef oldRef newFeatureRef newRef
public void set Root Object root this root root  setRoot
public Object get Root return root  getRoot
public boolean is Editable cannot uncheck non optional features if is Optional false return false cannot uncheck optional feature that has already been installed if old Feature Ref null return false return true  isEditable isOptional oldFeatureRef
A hirearchy node represents a false update if both old and new references exist and both point to the feature with the same ID and version These nodes will not any bytes to be downloaded they simply exist to allow the hirarchy to reach the optional children that are missing and will be installed public boolean is False Update if old Feature Ref null new Feature Ref null try return old Feature Ref get Versioned Identifier equals new Feature Ref get Versioned Identifier catch Core Exception e return false  isFalseUpdate oldFeatureRef newFeatureRef oldFeatureRef getVersionedIdentifier newFeatureRef getVersionedIdentifier CoreException
Returns true if feature is included as optional public boolean is Optional return new Feature Ref instanceof I Included Feature Reference I Included Feature Reference new Feature Ref is Optional  isOptional newFeatureRef IIncludedFeatureReference IIncludedFeatureReference newFeatureRef isOptional
Returns true if this optional feature is selected for installation Non optional features or non editable features are always checked public boolean is Checked return checked  isChecked
void set Native Upgrade boolean native Upgrade this native Upgrade native Upgrade  setNativeUpgrade nativeUpgrade nativeUpgrade nativeUpgrade
Returns true if this optional feature should be enabled when installed By default all features in the hiearchy should be enabled The exception is for optional features that are updated to a new version in case where the older version of the optional feature is disabled in the given configuration In this case the feature is updated and disabled in order to maintain its state public boolean is Enabled I Install Configuration config if native Upgrade return true if is Optional old Feature Ref null try I Feature old Feature old Feature Ref get Feature null I Configured Site csite Update Utils get Config Site old Feature config return csite is Configured old Feature catch Core Exception e return true  isEnabled IInstallConfiguration nativeUpgrade isOptional oldFeatureRef IFeature oldFeature oldFeatureRef getFeature IConfiguredSite UpdateUtils getConfigSite oldFeature isConfigured oldFeature CoreException
public I Feature get Feature try I Feature feature new Feature Ref get Feature null return feature catch Core Exception e return null  IFeature getFeature IFeature newFeatureRef getFeature CoreException
Selects an editable feature for installation public void set Checked boolean checked this checked checked  setChecked
Returns label for UI presentation public String get Label try return get Feature Label new Feature Ref catch Core Exception e if new Feature Ref instanceof I Included Feature Reference String iname I Included Feature Reference new Feature Ref get Name if iname null return iname try Versioned Identifier vid new Feature Ref get Versioned Identifier return vid to String catch Core Exception e2 return null  getLabel getFeatureLabel newFeatureRef CoreException newFeatureRef IIncludedFeatureReference IIncludedFeatureReference newFeatureRef getName VersionedIdentifier newFeatureRef getVersionedIdentifier toString CoreException
Computes label from the feature private String get Feature Label I Feature Reference feature Ref throws Core Exception I Feature feature feature Ref get Feature null return feature get Label NON NLS 1 feature get Versioned Identifier get Version to String  getFeatureLabel IFeatureReference featureRef CoreException IFeature featureRef getFeature getLabel getVersionedIdentifier getVersion toString
Computes children by linking matching features from the old feature s and new feature s hierarchy public Feature Hierarchy Element get Children boolean update boolean patch I Install Configuration config compute Children update patch config Feature Hierarchy Element array new Feature Hierarchy Element children size children to Array array return array  FeatureHierarchyElement getChildren IInstallConfiguration computeChildren FeatureHierarchyElement FeatureHierarchyElement toArray
public Feature Hierarchy Element get Children if children null Feature Hierarchy Element array new Feature Hierarchy Element children size children to Array array return array return new Feature Hierarchy Element 0  FeatureHierarchyElement getChildren FeatureHierarchyElement FeatureHierarchyElement toArray FeatureHierarchyElement
Computes children of this node public void compute Children boolean update boolean patch I Install Configuration config if children null children new Array List try I Feature old Feature null I Feature new Feature null new Feature new Feature Ref get Feature null if old Feature Ref null old Feature old Feature Ref get Feature null optional Children compute Elements old Feature new Feature update patch config children for int i 0 i children size i Feature Hierarchy Element element Feature Hierarchy Element children get i element set Root get Root catch Core Exception e  computeChildren IInstallConfiguration ArrayList IFeature oldFeature IFeature newFeature newFeature newFeatureRef getFeature oldFeatureRef oldFeature oldFeatureRef getFeature optionalChildren computeElements oldFeature newFeature FeatureHierarchyElement FeatureHierarchyElement setRoot getRoot CoreException
public boolean has Optional Children return optional Children  hasOptionalChildren optionalChildren
Adds checked optional features to the provided set public void add Checked Optional Features boolean update boolean patch I Install Configuration config Set set if is Optional is Checked Do not add checked optional features if this is an update case but the node is not a true update old and new feature are the equal if update is False Update set add new Feature Ref Feature Hierarchy Element elements get Children update patch config for int i 0 i elements length i elements i add Checked Optional Features update patch config set  addCheckedOptionalFeatures IInstallConfiguration isOptional isChecked isFalseUpdate newFeatureRef FeatureHierarchyElement getChildren addCheckedOptionalFeatures
Computes first level children of the linked hierarchy for the provided old and new features same ID different version where new version is greater or equal the old version Old feature may be null public static boolean compute Elements I Feature old Feature I Feature new Feature boolean update boolean patch I Install Configuration config Array List list Object old Children null Object new Children get Included Features new Feature boolean optional Children false try if old Feature null old Children get Included Features old Feature for int i 0 i new Children length i I Feature Reference old Ref null I Feature Reference new Ref I Feature Reference new Children i if old Children null String new Id new Ref get Versioned Identifier get Identifier for int j 0 j old Children length j I Feature Reference cref I Feature Reference old Children j try if cref get Versioned Identifier get Identifier equals new Id old Ref cref break catch Core Exception ex else if patch 30849 find the old reference in the configuration if Update Utils is Patch new Feature old Ref find Patched Reference new Ref config test if the old optional feature exists if old Ref null old Ref instanceof I Included Feature Reference I Included Feature Reference old Ref is Optional patch try I Feature f old Ref get Feature null if f null old Ref null catch Core Exception e missing old Ref null Feature Hierarchy Element element new Feature Hierarchy Element old Ref new Ref If this is an update old feature exists only check the new optional feature if the old exists Otherwise always check if element is Optional update patch element set Checked old Ref null if old Ref null Does not have an old reference but it may contain an older feature that may still qualify for update For example an older version may have been installed natively from the CD ROM if has Older Version new Ref element set Native Upgrade true element set Checked true else element set Checked true list add element element compute Children update patch config if element is Optional element has Optional Children optional Children true catch Core Exception e return optional Children  computeElements IFeature oldFeature IFeature newFeature IInstallConfiguration ArrayList oldChildren newChildren getIncludedFeatures newFeature optionalChildren oldFeature oldChildren getIncludedFeatures oldFeature newChildren IFeatureReference oldRef IFeatureReference newRef IFeatureReference newChildren oldChildren newId newRef getVersionedIdentifier getIdentifier oldChildren IFeatureReference IFeatureReference oldChildren getVersionedIdentifier getIdentifier newId oldRef CoreException UpdateUtils isPatch newFeature oldRef findPatchedReference newRef oldRef oldRef IIncludedFeatureReference IIncludedFeatureReference oldRef isOptional IFeature oldRef getFeature oldRef CoreException oldRef FeatureHierarchyElement FeatureHierarchyElement oldRef newRef isOptional setChecked oldRef oldRef hasOlderVersion newRef setNativeUpgrade setChecked setChecked computeChildren isOptional hasOptionalChildren optionalChildren CoreException optionalChildren
public static boolean has Older Version I Feature Reference new Ref try Versioned Identifier vid new Ref get Versioned Identifier Plugin Version Identifier version vid get Version String mode get Update Versions Mode I Feature all Installed Update Utils get Installed Features vid false for int i 0 i all Installed length i I Feature candidate all Installed i Plugin Version Identifier cversion candidate get Versioned Identifier get Version Verify that the difference qualifies as an update if mode equals Update Core EQUIVALENT VALUE if version is Equivalent To cversion return true else if mode equals Update Core COMPATIBLE VALUE if version is Compatible With cversion return true catch Core Exception e return false  hasOlderVersion IFeatureReference newRef VersionedIdentifier newRef getVersionedIdentifier PluginVersionIdentifier getVersion getUpdateVersionsMode IFeature allInstalled UpdateUtils getInstalledFeatures allInstalled IFeature allInstalled PluginVersionIdentifier getVersionedIdentifier getVersion UpdateCore EQUIVALENT_VALUE isEquivalentTo UpdateCore COMPATIBLE_VALUE isCompatibleWith CoreException
private static I Feature Reference find Patched Reference I Feature Reference new Ref I Install Configuration config throws Core Exception Versioned Identifier vid new Ref get Versioned Identifier I Configured Site csites config get Configured Sites for int i 0 i csites length i I Configured Site csite csites i I Feature Reference refs csite get Configured Features for int j 0 j refs length j I Feature Reference ref refs j Versioned Identifier ref Vid ref get Versioned Identifier if vid get Identifier equals ref Vid get Identifier return ref return null  IFeatureReference findPatchedReference IFeatureReference newRef IInstallConfiguration CoreException VersionedIdentifier newRef getVersionedIdentifier IConfiguredSite getConfiguredSites IConfiguredSite IFeatureReference getConfiguredFeatures IFeatureReference VersionedIdentifier refVid getVersionedIdentifier getIdentifier refVid getIdentifier
Returns included feature references for the given reference public static Object get Included Features I Feature Reference ref try I Feature feature ref get Feature null return get Included Features feature catch Core Exception e return new Object 0  getIncludedFeatures IFeatureReference IFeature getFeature getIncludedFeatures CoreException
Returns included feature references for the given feature public static Object get Included Features I Feature feature try return feature get Included Feature References catch Core Exception e return new Object 0  getIncludedFeatures IFeature getIncludedFeatureReferences CoreException
private static String get Update Versions Mode Preferences store Update Core get Plugin get Plugin Preferences return store get String Update Core P UPDATE VERSIONS  getUpdateVersionsMode UpdateCore getPlugin getPluginPreferences getString UpdateCore P_UPDATE_VERSIONS

public Feature Operation I Configured Site target Site I Feature feature super this feature feature this target Site target Site  FeatureOperation IConfiguredSite targetSite IFeature targetSite targetSite
public I Feature get Feature return feature  IFeature getFeature
public I Feature get Old Feature return old Feature  IFeature getOldFeature oldFeature
public I Configured Site get Target Site return target Site  IConfiguredSite getTargetSite targetSite
public void set Target Site I Configured Site target Site this target Site target Site  setTargetSite IConfiguredSite targetSite targetSite targetSite
static boolean unconfigure I Feature feature I Configured Site site throws Core Exception I Install Configuration config Site Manager get Local Site get Current Configuration if site null site Update Utils get Config Site feature config if site null Patch Cleaner cleaner new Patch Cleaner site feature boolean result site unconfigure feature cleaner dispose return result return false  IFeature IConfiguredSite CoreException IInstallConfiguration SiteManager getLocalSite getCurrentConfiguration UpdateUtils getConfigSite PatchCleaner PatchCleaner

I Feature feature public Feature Status I Feature feature int severity String plugin Id int code String message Throwable exception super severity plugin Id code message exception this feature feature  IFeature FeatureStatus IFeature pluginId pluginId
this feature feature public I Feature get Feature return feature  IFeature getFeature
public boolean equals Object obj if obj instanceof Feature Status return false Feature Status fs Feature Status obj only check for feature regardless of status type if fs get Feature feature return true else if fs get Feature null feature null return fs get Message equals get Message else if fs get Feature null feature null return false else if fs get Feature null feature null return false else if fs get Feature equals feature return true else return false  FeatureStatus FeatureStatus FeatureStatus getFeature getFeature getMessage getMessage getFeature getFeature getFeature

Constructor param site param feature param optional Features optional features to install If null the operation will install them all if any param unconfigured Optional Elements optional features unconfigured before the operation They should remain unconfigured after the install param verifier public Install Operation I Configured Site site I Feature feature I Feature Reference optional Features I Feature unconfigured Optional Elements I Verification Listener verifier super site feature I Feature installed Update Utils get Installed Features feature if installed length 0 this old Feature installed 0 this unconfigured Optional Features unconfigured Optional Elements this optional Features optional Features this verifier verifier  optionalFeatures unconfiguredOptionalElements InstallOperation IConfiguredSite IFeature IFeatureReference optionalFeatures IFeature unconfiguredOptionalElements IVerificationListener IFeature UpdateUtils getInstalledFeatures oldFeature unconfiguredOptionalFeatures unconfiguredOptionalElements optionalFeatures optionalFeatures
public I Feature Reference get Optional Features return optional Features  IFeatureReference getOptionalFeatures optionalFeatures
public boolean execute I Progress Monitor pm I Operation Listener listener throws Core Exception boolean reinstall false if old Feature null feature get Versioned Identifier equals old Feature get Versioned Identifier reinstall true set Optional Features if optional Features null target Site install feature verifier pm else target Site install feature optional Features verifier pm if reinstall if old Feature null is Optional Delta preserve Optional State boolean old Success unconfigure old Feature null pick any site containing old feature if old Success I Install Configuration config Site Manager get Local Site get Current Configuration if Update Utils is Nested Child config old Feature eat the error if nested child String message Policy bind KEY OLD old Feature get Label I Status status new Status I Status ERROR Update Utils get Plugin Id I Status OK message null throw new Core Exception status if old Feature null ensure Unique return true  IProgressMonitor IOperationListener CoreException oldFeature getVersionedIdentifier oldFeature getVersionedIdentifier setOptionalFeatures optionalFeatures targetSite targetSite optionalFeatures oldFeature isOptionalDelta preserveOptionalState oldSuccess oldFeature oldSuccess IInstallConfiguration SiteManager getLocalSite getCurrentConfiguration UpdateUtils isNestedChild oldFeature KEY_OLD oldFeature getLabel IStatus IStatus UpdateUtils getPluginId IStatus CoreException oldFeature ensureUnique
private void preserve Optional State if unconfigured Optional Features null return for int i 0 i unconfigured Optional Features length i try Get the feature that matches the original unconfigured ones I Feature local Feature Update Utils get Local Feature target Site unconfigured Optional Features i if local Feature null target Site unconfigure local Feature catch Core Exception e Ignore this we will leave with it  preserveOptionalState unconfiguredOptionalFeatures unconfiguredOptionalFeatures IFeature localFeature UpdateUtils getLocalFeature targetSite unconfiguredOptionalFeatures localFeature targetSite localFeature CoreException
private void set Optional Features try Ensure optional features are correctly set if optional Features null Update Utils has Optional Features feature Job Root job Root new Job Root this I Install Configuration config Site Manager get Local Site get Current Configuration Hash Set set new Hash Set boolean update old Feature null boolean patch Update Utils is Patch feature Feature Hierarchy Element elements job Root get Elements for int i 0 i elements length i elements i add Checked Optional Features update patch config set optional Features new I Feature Reference set size set to Array optional Features unconfigured Optional Features job Root get Unconfigured Optional Features config target Site catch Core Exception e Update Utils log Exception e  setOptionalFeatures optionalFeatures UpdateUtils hasOptionalFeatures JobRoot jobRoot JobRoot IInstallConfiguration SiteManager getLocalSite getCurrentConfiguration HashSet HashSet oldFeature UpdateUtils isPatch FeatureHierarchyElement jobRoot getElements addCheckedOptionalFeatures optionalFeatures IFeatureReference toArray optionalFeatures unconfiguredOptionalFeatures jobRoot getUnconfiguredOptionalFeatures targetSite CoreException UpdateUtils logException

private Feature Hierarchy Element elements public Job Root I Install Feature Operation job this job job  FeatureHierarchyElement JobRoot IInstallFeatureOperation
public I Install Feature Operation get Job return job  IInstallFeatureOperation getJob
public Feature Hierarchy Element get Elements if elements null compute Elements return elements  FeatureHierarchyElement getElements computeElements
Returns unconfigured features before an install After installing the features the caller must get the local features that match these unconfigured features and unconfigure them param config param target Site return public I Feature get Unconfigured Optional Features I Install Configuration config I Configured Site target Site Array List unconfigured Optional Features new Array List get Unconfigured Optional Features unconfigured Optional Features config target Site get Elements Update Utils is Patch job get Feature I Feature unconfigured Optional Features Array new I Feature unconfigured Optional Features size unconfigured Optional Features to Array unconfigured Optional Features Array return unconfigured Optional Features Array  targetSite IFeature getUnconfiguredOptionalFeatures IInstallConfiguration IConfiguredSite targetSite ArrayList unconfiguredOptionalFeatures ArrayList getUnconfiguredOptionalFeatures unconfiguredOptionalFeatures targetSite getElements UpdateUtils isPatch getFeature IFeature unconfiguredOptionalFeaturesArray IFeature unconfiguredOptionalFeatures unconfiguredOptionalFeatures toArray unconfiguredOptionalFeaturesArray unconfiguredOptionalFeaturesArray
private void get Unconfigured Optional Features Array List unconfigured Optional Features I Install Configuration config I Configured Site target Site Feature Hierarchy Element optional Elements boolean is Patch for int i 0 i optional Elements length i Feature Hierarchy Element children optional Elements i get Children true is Patch config get Unconfigured Optional Features unconfigured Optional Features config target Site children is Patch if optional Elements i is Enabled config unconfigured Optional Features add optional Elements i get Feature  getUnconfiguredOptionalFeatures ArrayList unconfiguredOptionalFeatures IInstallConfiguration IConfiguredSite targetSite FeatureHierarchyElement optionalElements isPatch optionalElements FeatureHierarchyElement optionalElements getChildren isPatch getUnconfiguredOptionalFeatures unconfiguredOptionalFeatures targetSite isPatch optionalElements isEnabled unconfiguredOptionalFeatures optionalElements getFeature
private void compute Elements try I Feature old Feature job get Old Feature I Feature new Feature job get Feature Array List list new Array List boolean patch Update Utils is Patch new Feature Feature Hierarchy Element compute Elements old Feature new Feature old Feature null patch Site Manager get Local Site get Current Configuration list elements new Feature Hierarchy Element list size list to Array elements for int i 0 i elements length i elements i set Root this catch Core Exception e Update Utils log Exception e  computeElements IFeature oldFeature getOldFeature IFeature newFeature getFeature ArrayList ArrayList UpdateUtils isPatch newFeature FeatureHierarchyElement computeElements oldFeature newFeature oldFeature SiteManager getLocalSite getCurrentConfiguration FeatureHierarchyElement toArray setRoot CoreException UpdateUtils logException

public Operation 
public boolean is Processed return processed  isProcessed
public void mark Processed processed true  markProcessed

public class Operation Factory implements I Operation Factory public Operation Factory  OperationFactory IOperationFactory OperationFactory
public I Config Feature Operation create Config Operation I Configured Site target Site I Feature feature return new Config Operation target Site feature  IConfigFeatureOperation createConfigOperation IConfiguredSite targetSite IFeature ConfigOperation targetSite
public I Batch Operation create Batch Install Operation I Install Feature Operation operations return new Batch Install Operation operations  IBatchOperation createBatchInstallOperation IInstallFeatureOperation BatchInstallOperation
public I Install Feature Operation create Install Operation I Configured Site target Site I Feature feature I Feature Reference optional Features I Feature unconfigured Optional Features I Verification Listener verifier return new Install Operation target Site feature optional Features unconfigured Optional Features verifier  IInstallFeatureOperation createInstallOperation IConfiguredSite targetSite IFeature IFeatureReference optionalFeatures IFeature unconfiguredOptionalFeatures IVerificationListener InstallOperation targetSite optionalFeatures unconfiguredOptionalFeatures
public I Unconfig Feature Operation create Unconfig Operation I Configured Site target Site I Feature feature return new Unconfig Operation target Site feature  IUnconfigFeatureOperation createUnconfigOperation IConfiguredSite targetSite IFeature UnconfigOperation targetSite
public I Config Feature Operation create Replace Feature Version Operation I Feature feature I Feature another Feature return new Replace Feature Version Operation feature another Feature  IConfigFeatureOperation createReplaceFeatureVersionOperation IFeature IFeature anotherFeature ReplaceFeatureVersionOperation anotherFeature
public I Uninstall Feature Operation create Uninstall Operation I Configured Site target Site I Feature feature return new Uninstall Operation target Site feature  IUninstallFeatureOperation createUninstallOperation IConfiguredSite targetSite IFeature UninstallOperation targetSite
public I Revert Configuration Operation create Revert Configuration Operation I Install Configuration config I Problem Handler problem Handler return new Revert Configuration Operation config problem Handler  IRevertConfigurationOperation createRevertConfigurationOperation IInstallConfiguration IProblemHandler problemHandler RevertConfigurationOperation problemHandler
public I Toggle Site Operation create Toggle Site Operation I Configured Site site return new Toggle Site Operation site  IToggleSiteOperation createToggleSiteOperation IConfiguredSite ToggleSiteOperation

Checks if the platform configuration has been modified outside this program return the error status or null if no errors public I Status validate Platform Config Valid Array List status new Array List 1 check Platform Was Modified status report status if status size 0 return create Multi Status KEY ROOT MESSAGE status I Status ERROR return null  IStatus validatePlatformConfigValid ArrayList ArrayList checkPlatformWasModified createMultiStatus KEY_ROOT_MESSAGE IStatus
public I Status validate Pending Install I Feature old Feature I Feature new Feature check initial state Array List before Status new Array List validate Initial State before Status check proposed change Array List status new Array List check Platform Was Modified status validate Install old Feature new Feature status report status return create Combined Report Status before Status status  IStatus validatePendingInstall IFeature oldFeature IFeature newFeature ArrayList beforeStatus ArrayList validateInitialState beforeStatus ArrayList ArrayList checkPlatformWasModified validateInstall oldFeature newFeature createCombinedReportStatus beforeStatus
public I Status validate Pending Unconfig I Feature feature check initial state Array List before Status new Array List validate Initial State before Status check proposed change Array List status new Array List check Platform Was Modified status validate Unconfigure feature status report status return create Combined Report Status before Status status  IStatus validatePendingUnconfig IFeature ArrayList beforeStatus ArrayList validateInitialState beforeStatus ArrayList ArrayList checkPlatformWasModified validateUnconfigure createCombinedReportStatus beforeStatus
public I Status validate Pending Config I Feature feature check initial state Array List before Status new Array List validate Initial State before Status check proposed change Array List status new Array List check Platform Was Modified status validate Configure feature status report status return create Combined Report Status before Status status  IStatus validatePendingConfig IFeature ArrayList beforeStatus ArrayList validateInitialState beforeStatus ArrayList ArrayList checkPlatformWasModified validateConfigure createCombinedReportStatus beforeStatus
Called before performing operation public I Status validate Pending Replace Version I Feature feature I Feature another Feature check initial state Array List before Status new Array List validate Initial State before Status check proposed change Array List status new Array List check Platform Was Modified status validate Replace Version feature another Feature status report status return create Combined Report Status before Status status  IStatus validatePendingReplaceVersion IFeature IFeature anotherFeature ArrayList beforeStatus ArrayList validateInitialState beforeStatus ArrayList ArrayList checkPlatformWasModified validateReplaceVersion anotherFeature createCombinedReportStatus beforeStatus
public I Status validate Pending Revert I Install Configuration config check initial state Array List before Status new Array List validate Initial State before Status check proposed change Array List status new Array List check Platform Was Modified status validate Revert config status report status return create Combined Report Status before Status status  IStatus validatePendingRevert IInstallConfiguration ArrayList beforeStatus ArrayList validateInitialState beforeStatus ArrayList ArrayList checkPlatformWasModified validateRevert createCombinedReportStatus beforeStatus
public I Status validate Pending Changes I Install Feature Operation jobs check initial state Array List before Status new Array List validate Initial State before Status check Platform Was Modified before Status check proposed change Array List status new Array List validate Pending Changes jobs status before Status report status return create Combined Report Status before Status status  IStatus validatePendingChanges IInstallFeatureOperation ArrayList beforeStatus ArrayList validateInitialState beforeStatus checkPlatformWasModified beforeStatus ArrayList ArrayList validatePendingChanges beforeStatus createCombinedReportStatus beforeStatus
public I Status validate Current State check the state Array List status new Array List check Platform Was Modified status validate Initial State status report status if status size 0 return create Multi Status KEY ROOT MESSAGE status I Status ERROR return null  IStatus validateCurrentState ArrayList ArrayList checkPlatformWasModified validateInitialState createMultiStatus KEY_ROOT_MESSAGE IStatus
private static void validate Initial State Array List status try Array List features compute Features uncomment this when patch released in boot check Configuration Lock status check Constraints features status catch Core Exception e status add e get Status  validateInitialState ArrayList ArrayList computeFeatures checkConfigurationLock checkConstraints CoreException getStatus
private static void validate Unconfigure I Feature feature Array List status try check Site Read Only feature status Array List features compute Features features compute Features After Operation features null feature check Constraints features status catch Core Exception e status add e get Status  validateUnconfigure IFeature ArrayList checkSiteReadOnly ArrayList computeFeatures computeFeaturesAfterOperation checkConstraints CoreException getStatus
private static void validate Configure I Feature feature Array List status try check Site Read Only feature status Array List features compute Features check Optional Child Configuring feature status check For Cycles feature null features features compute Features After Operation features feature null check Constraints features status catch Core Exception e status add e get Status  validateConfigure IFeature ArrayList checkSiteReadOnly ArrayList computeFeatures checkOptionalChildConfiguring checkForCycles computeFeaturesAfterOperation checkConstraints CoreException getStatus
private static void validate Replace Version I Feature feature I Feature another Feature Array List status try check Site Read Only feature status Array List features compute Features check For Cycles feature null features features compute Features After Operation features another Feature feature check Constraints features status catch Core Exception e status add e get Status  validateReplaceVersion IFeature IFeature anotherFeature ArrayList checkSiteReadOnly ArrayList computeFeatures checkForCycles computeFeaturesAfterOperation anotherFeature checkConstraints CoreException getStatus
private static void validate Install I Feature old Feature I Feature new Feature Array List status try check Site Read Only old Feature status Array List features compute Features check For Cycles new Feature null features features compute Features After Operation features new Feature old Feature check Constraints features status check License new Feature status catch Core Exception e status add e get Status  validateInstall IFeature oldFeature IFeature newFeature ArrayList checkSiteReadOnly oldFeature ArrayList computeFeatures checkForCycles newFeature computeFeaturesAfterOperation newFeature oldFeature checkConstraints checkLicense newFeature CoreException getStatus
private static void validate Revert I Install Configuration config Array List status try check the timeline and don t bother to check anything else if negative if check Timeline config status return Array List features compute Features After Revert config check Constraints features status check Revert Constraints features status catch Core Exception e status add e get Status  validateRevert IInstallConfiguration ArrayList checkTimeline ArrayList computeFeaturesAfterRevert checkConstraints checkRevertConstraints CoreException getStatus
private static void validate Pending Changes I Install Feature Operation jobs Array List status Array List before Status try Array List features compute Features Array List saved Features features int nexclusives 0 pass 1 see if we can process the entire batch Array List tmp Status new Array List for int i 0 i jobs length i I Install Feature Operation job jobs i I Feature new Feature job get Feature I Feature old Feature job get Old Feature check License new Feature status if jobs length 1 new Feature is Exclusive nexclusives status add create Status new Feature Feature Status CODE EXCLUSIVE Policy bind KEY EXCLUSIVE continue check For Cycles new Feature null features features compute Features After Operation features new Feature old Feature if nexclusives 0 return check Constraints features tmp Status if tmp Status size 0 the whole batch is OK return pass 2 we have conflicts features saved Features for int i 0 i jobs length i I Install Feature Operation job jobs i I Feature new Feature job get Feature I Feature old Feature job get Old Feature features compute Features After Operation features new Feature old Feature check Constraints features status if status size 0 is Better Status before Status status I Status conflict create Status new Feature Feature Status CODE OTHER Policy bind KEY CONFLICT status add 0 conflict return catch Core Exception e status add e get Status  validatePendingChanges IInstallFeatureOperation ArrayList ArrayList beforeStatus ArrayList computeFeatures ArrayList savedFeatures ArrayList tmpStatus ArrayList IInstallFeatureOperation IFeature newFeature getFeature IFeature oldFeature getOldFeature checkLicense newFeature newFeature isExclusive createStatus newFeature FeatureStatus CODE_EXCLUSIVE KEY_EXCLUSIVE checkForCycles newFeature computeFeaturesAfterOperation newFeature oldFeature checkConstraints tmpStatus tmpStatus savedFeatures IInstallFeatureOperation IFeature newFeature getFeature IFeature oldFeature getOldFeature computeFeaturesAfterOperation newFeature oldFeature checkConstraints isBetterStatus beforeStatus IStatus createStatus newFeature FeatureStatus CODE_OTHER KEY_CONFLICT CoreException getStatus
private static void check Platform Was Modified Array List status try checks if the platform has been modified outside this eclipse instance I Platform Configuration platform Config Configurator Utils get Current Platform Configuration long current Time Stamp platform Config get Change Stamp get the last modified value for this config from this process point of view if platform Config instanceof Platform Configuration current Time Stamp Platform Configuration platform Config get Configuration last Modified get the real last modified value URL platformXML platform Config get Configuration Location long actual Time Stamp current Time Stamp if file equals platformXML get Protocol NON NLS 1 actual Time Stamp new File platformXML get File last Modified else URL Connection connection platformXML open Connection actual Time Stamp connection get Last Modified if current Time Stamp actual Time Stamp status add create Status null Feature Status CODE OTHER Policy bind Activity Constraints platform Modified NON NLS 1 catch IO Exception e ignore  checkPlatformWasModified ArrayList IPlatformConfiguration platformConfig ConfiguratorUtils getCurrentPlatformConfiguration currentTimeStamp platformConfig getChangeStamp platformConfig PlatformConfiguration currentTimeStamp PlatformConfiguration platformConfig getConfiguration lastModified platformConfig getConfigurationLocation actualTimeStamp currentTimeStamp getProtocol actualTimeStamp getFile lastModified URLConnection openConnection actualTimeStamp getLastModified currentTimeStamp actualTimeStamp createStatus FeatureStatus CODE_OTHER ActivityConstraints platformModified IOException
private static void check Site Read Only I Feature feature Array List status if feature null return I Configured Site csite feature get Site get Current Configured Site if csite null csite is Updatable status add create Status feature Feature Status CODE OTHER Policy bind Activity Constraints read Only NON NLS 1 csite get Site getURL to External Form  checkSiteReadOnly IFeature ArrayList IConfiguredSite getSite getCurrentConfiguredSite isUpdatable createStatus FeatureStatus CODE_OTHER ActivityConstraints readOnly getSite toExternalForm
Compute a list of configured features private static Array List compute Features throws Core Exception return compute Features true  ArrayList computeFeatures CoreException computeFeatures
private static Array List compute Features boolean configured Only throws Core Exception Array List features new Array List I Local Site local Site Site Manager get Local Site I Install Configuration config local Site get Current Configuration I Configured Site csites config get Configured Sites for int i 0 i csites length i I Configured Site csite csites i I Feature Reference crefs if configured Only crefs csite get Configured Features else crefs csite get Site get Feature References for int j 0 j crefs length j I Feature Reference cref crefs j I Feature cfeature cref get Feature null features add cfeature return features  ArrayList computeFeatures configuredOnly CoreException ArrayList ArrayList ILocalSite localSite SiteManager getLocalSite IInstallConfiguration localSite getCurrentConfiguration IConfiguredSite getConfiguredSites IConfiguredSite IFeatureReference configuredOnly getConfiguredFeatures getSite getFeatureReferences IFeatureReference IFeature getFeature
private static Array List compute Feature Subtree I Feature top I Feature feature Array List features boolean tolerate Missing Children Array List configured Features Array List visited Features throws Core Exception check arguments if top null return features if feature null feature top if features null features new Array List if visited Features null visited Features new Array List check for includes cycle if visited Features contains feature I Status status create Status top Feature Status CODE CYCLE Policy bind KEY CYCLE throw new Core Exception status else keep track of visited features so we can detect cycles visited Features add feature return specified base feature and all its children if features contains feature features add feature I Included Feature Reference children feature get Included Feature References for int i 0 i children length i try I Feature child children i get Feature null features compute Feature Subtree top child features tolerate Missing Children null visited Features catch Core Exception e if children i is Optional tolerate Missing Children throw e no cycles for this feature during DFS visited Features remove feature return features  ArrayList computeFeatureSubtree IFeature IFeature ArrayList tolerateMissingChildren ArrayList configuredFeatures ArrayList visitedFeatures CoreException ArrayList visitedFeatures visitedFeatures ArrayList visitedFeatures IStatus createStatus FeatureStatus CODE_CYCLE KEY_CYCLE CoreException visitedFeatures IIncludedFeatureReference getIncludedFeatureReferences IFeature getFeature computeFeatureSubtree tolerateMissingChildren visitedFeatures CoreException isOptional tolerateMissingChildren visitedFeatures
private static void check License I Feature feature Array List status IURL Entry license Entry feature get License if license Entry null String license license Entry get Annotation if license null license trim length 0 return status add create Status feature Feature Status CODE OTHER Policy bind KEY NO LICENSE  checkLicense IFeature ArrayList IURLEntry licenseEntry getLicense licenseEntry licenseEntry getAnnotation createStatus FeatureStatus CODE_OTHER KEY_NO_LICENSE
private static Array List compute Features After Operation Array List features I Feature add I Feature remove throws Core Exception Array List add Tree compute Feature Subtree add null null false do not tolerate missing children features null Array List remove Tree compute Feature Subtree remove null null true tolerate missing children null null if remove null Patches to features are removed together with those features Include them in the list contribute Patches For remove Tree features remove Tree if remove null features remove All remove Tree if add null features add All add Tree return features  ArrayList computeFeaturesAfterOperation ArrayList IFeature IFeature CoreException ArrayList addTree computeFeatureSubtree ArrayList removeTree computeFeatureSubtree contributePatchesFor removeTree removeTree removeAll removeTree addAll addTree
private static void contribute Patches For Array List remove Tree Array List features Array List result throws Core Exception for int i 0 i remove Tree size i I Feature feature I Feature remove Tree get i contribute Patches For feature features result  contributePatchesFor ArrayList removeTree ArrayList ArrayList CoreException removeTree IFeature IFeature removeTree contributePatchesFor
private static void contribute Patches For I Feature feature Array List features Array List result throws Core Exception for int i 0 i features size i I Feature candidate I Feature features get i if Update Utils is Patch feature candidate Array List remove Tree compute Feature Subtree candidate null null true null null result add All remove Tree  contributePatchesFor IFeature ArrayList ArrayList CoreException IFeature IFeature UpdateUtils isPatch ArrayList removeTree computeFeatureSubtree addAll removeTree
private static Array List compute Features After Revert I Install Configuration config throws Core Exception Array List list new Array List I Configured Site csites config get Configured Sites for int i 0 i csites length i I Configured Site csite csites i I Feature Reference features csite get Configured Features for int j 0 j features length j list add features j get Feature null return list  ArrayList computeFeaturesAfterRevert IInstallConfiguration CoreException ArrayList ArrayList IConfiguredSite getConfiguredSites IConfiguredSite IFeatureReference getConfiguredFeatures getFeature
private static Array List compute Plugins For Features Array List features throws Core Exception if features null return new Array List Hash Map plugins new Hash Map for int i 0 i features size i I Feature feature I Feature features get i I Plugin Entry entries feature get Plugin Entries for int j 0 j entries length j I Plugin Entry entry entries j plugins put entry get Versioned Identifier entry Array List result new Array List result add All plugins values return result  ArrayList computePluginsForFeatures ArrayList CoreException ArrayList HashMap HashMap IFeature IFeature IPluginEntry getPluginEntries IPluginEntry getVersionedIdentifier ArrayList ArrayList addAll
Check for feature cycles visit feature if feature is in the cycle candidates list then cycle found else add it to candidates list DFS children when return from DFS remove the feature from the candidates list private static void check For Cycles I Feature feature Array List candidates Array List configured Features throws Core Exception check arguments if feature null return if configured Features null configured Features new Array List if candidates null candidates new Array List check for includes cycle if candidates contains feature String msg Policy bind KEY CYCLE new String feature get Label feature get Versioned Identifier to String I Status status create Status feature Feature Status CODE CYCLE msg throw new Core Exception status potential candidate candidates add feature recursively check cycles with children I Included Feature Reference children feature get Included Feature References for int i 0 i children length i try I Feature child children i get Feature null check For Cycles child candidates configured Features catch Core Exception e if children i is Optional throw e no longer a candidate because no cycles with children candidates remove feature  checkForCycles IFeature ArrayList ArrayList configuredFeatures CoreException configuredFeatures configuredFeatures ArrayList ArrayList KEY_CYCLE getLabel getVersionedIdentifier toString IStatus createStatus FeatureStatus CODE_CYCLE CoreException IIncludedFeatureReference getIncludedFeatureReferences IFeature getFeature checkForCycles configuredFeatures CoreException isOptional
private static void check Constraints Array List features Array List status throws Core Exception if features null return Array List plugins compute Plugins For Features features check Environment features status check Platform Feature features plugins status check Primary Feature features status check Prereqs features plugins status  checkConstraints ArrayList ArrayList CoreException ArrayList computePluginsForFeatures checkEnvironment checkPlatformFeature checkPrimaryFeature checkPrereqs
private static void check Environment Array List features Array List status String os Platform getOS String ws Platform getWS String arch Platform getOS Arch for int i 0 i features size i I Feature feature I Feature features get i Array List fos create List feature getOS Array List fws create List feature getWS Array List farch create List feature getOS Arch if fos size 0 if fos contains os I Status s create Status feature Feature Status CODE ENVIRONMENT Policy bind KEY OS if status contains s status add s continue if fws size 0 if fws contains ws I Status s create Status feature Feature Status CODE ENVIRONMENT Policy bind KEY WS if status contains s status add s continue if farch size 0 if farch contains arch I Status s create Status feature Feature Status CODE ENVIRONMENT Policy bind KEY ARCH if status contains s status add s continue  checkEnvironment ArrayList ArrayList getOSArch IFeature IFeature ArrayList createList ArrayList createList ArrayList createList getOSArch IStatus createStatus FeatureStatus CODE_ENVIRONMENT KEY_OS IStatus createStatus FeatureStatus CODE_ENVIRONMENT KEY_WS IStatus createStatus FeatureStatus CODE_ENVIRONMENT KEY_ARCH
private static void check Platform Feature Array List features Array List plugins Array List status String bootstrap Plugins Configurator Utils get Current Platform Configuration get Bootstrap Plugin Identifiers for int i 0 i bootstrap Plugins length i boolean found false for int j 0 j plugins size j I Plugin Entry plugin I Plugin Entry plugins get j if bootstrap Plugins i equals plugin get Versioned Identifier get Identifier found true break if found I Status s create Status null Feature Status CODE OTHER Policy bind KEY PLATFORM if status contains s status add s return  checkPlatformFeature ArrayList ArrayList ArrayList bootstrapPlugins ConfiguratorUtils getCurrentPlatformConfiguration getBootstrapPluginIdentifiers bootstrapPlugins IPluginEntry IPluginEntry bootstrapPlugins getVersionedIdentifier getIdentifier IStatus createStatus FeatureStatus CODE_OTHER KEY_PLATFORM
private static void check Primary Feature Array List features Array List status String feature Id Configurator Utils get Current Platform Configuration get Primary Feature Identifier if feature Id null return no existing primary feature nothing to worry about for int i 0 i features size i I Feature feature I Feature features get i if feature Id equals feature get Versioned Identifier get Identifier return I Status s create Status null Feature Status CODE OTHER Policy bind KEY PRIMARY if status contains s status add s  checkPrimaryFeature ArrayList ArrayList featureId ConfiguratorUtils getCurrentPlatformConfiguration getPrimaryFeatureIdentifier featureId IFeature IFeature featureId getVersionedIdentifier getIdentifier IStatus createStatus FeatureStatus CODE_OTHER KEY_PRIMARY
private static void check Prereqs Array List features Array List plugins Array List status for int i 0 i features size i I Feature feature I Feature features get i I Import imports feature get Imports for int j 0 j imports length j I Import iimport imports j for each import determine plugin or feature version match we need Versioned Identifier iid iimport get Versioned Identifier String id iid get Identifier Plugin Version Identifier version iid get Version boolean feature Prereq iimport get Kind I Import KIND FEATURE boolean ignore Version version get Major Component 0 version get Minor Component 0 version get Service Component 0 int rule iimport get Rule if rule I Import RULE NONE rule I Import RULE COMPATIBLE boolean found false Array List candidates if feature Prereq candidates features else candidates plugins for int k 0 k candidates size k Versioned Identifier cid if feature Prereq the candidate is a feature I Feature candidate I Feature candidates get k skip self if feature equals candidate continue cid candidate get Versioned Identifier else the candidate is a plug in I Plugin Entry plugin I Plugin Entry candidates get k cid plugin get Versioned Identifier Plugin Version Identifier cversion cid get Version if id equals cid get Identifier have a candidate if ignore Version found true else if rule I Import RULE PERFECT cversion is Perfect version found true else if rule I Import RULE EQUIVALENT cversion is Equivalent To version found true else if rule I Import RULE COMPATIBLE cversion is Compatible With version found true else if rule I Import RULE GREATER OR EQUAL cversion is Greater Or Equal To version found true if found break if found report status String target feature Prereq Policy bind KEY PREREQ FEATURE Policy bind KEY PREREQ PLUGIN int error Code feature Prereq Feature Status CODE PREREQ FEATURE Feature Status CODE PREREQ PLUGIN String msg Policy bind KEY PREREQ new String target id if ignore Version if rule I Import RULE PERFECT msg Policy bind KEY PREREQ PERFECT new String target id version to String else if rule I Import RULE EQUIVALENT msg Policy bind KEY PREREQ EQUIVALENT new String target id version to String else if rule I Import RULE COMPATIBLE msg Policy bind KEY PREREQ COMPATIBLE new String target id version to String else if rule I Import RULE GREATER OR EQUAL msg Policy bind KEY PREREQ GREATER new String target id version to String I Status s create Status feature error Code msg if status contains s status add s  checkPrereqs ArrayList ArrayList ArrayList IFeature IFeature IImport getImports IImport VersionedIdentifier getVersionedIdentifier getIdentifier PluginVersionIdentifier getVersion featurePrereq getKind IImport KIND_FEATURE ignoreVersion getMajorComponent getMinorComponent getServiceComponent getRule IImport RULE_NONE IImport RULE_COMPATIBLE ArrayList featurePrereq VersionedIdentifier featurePrereq IFeature IFeature getVersionedIdentifier IPluginEntry IPluginEntry getVersionedIdentifier PluginVersionIdentifier getVersion getIdentifier ignoreVersion IImport RULE_PERFECT isPerfect IImport RULE_EQUIVALENT isEquivalentTo IImport RULE_COMPATIBLE isCompatibleWith IImport RULE_GREATER_OR_EQUAL isGreaterOrEqualTo featurePrereq KEY_PREREQ_FEATURE KEY_PREREQ_PLUGIN errorCode featurePrereq FeatureStatus CODE_PREREQ_FEATURE FeatureStatus CODE_PREREQ_PLUGIN KEY_PREREQ ignoreVersion IImport RULE_PERFECT KEY_PREREQ_PERFECT toString IImport RULE_EQUIVALENT KEY_PREREQ_EQUIVALENT toString IImport RULE_COMPATIBLE KEY_PREREQ_COMPATIBLE toString IImport RULE_GREATER_OR_EQUAL KEY_PREREQ_GREATER toString IStatus createStatus errorCode
private static void check Revert Constraints Array List features Array List status for int i 0 i features size i I Feature feature I Feature features get i try compute Feature Subtree feature null null false do not tolerate missing children null null catch Core Exception e status add e get Status  checkRevertConstraints ArrayList ArrayList IFeature IFeature computeFeatureSubtree CoreException getStatus
private static void check Optional Child Configuring I Feature feature Array List status throws Core Exception I Local Site local Site Site Manager get Local Site I Install Configuration config local Site get Current Configuration I Configured Site csites config get Configured Sites boolean included false for int i 0 i csites length i I Configured Site csite csites i I Site Feature Reference crefs csite get Site get Feature References for int j 0 j crefs length j I Feature Reference cref crefs j I Feature cfeature null try cfeature cref get Feature null catch Core Exception e FIXME cannot ask is Optional here Ignore missing optional feature if cref is Optional continue throw e if is Parent cfeature feature true Included in at least one feature as optional included true if csite is Configured cfeature At least one feature parent is enabled it is OK to configure optional child return if included feature is included as optional but no parent is currently configured String msg Policy bind KEY OPTIONAL CHILD status add create Status feature Feature Status CODE OPTIONAL CHILD msg else feature is root can be configured  checkOptionalChildConfiguring IFeature ArrayList CoreException ILocalSite localSite SiteManager getLocalSite IInstallConfiguration localSite getCurrentConfiguration IConfiguredSite getConfiguredSites IConfiguredSite ISiteFeatureReference getSite getFeatureReferences IFeatureReference IFeature getFeature CoreException isOptional isOptional isParent isConfigured KEY_OPTIONAL_CHILD createStatus FeatureStatus CODE_OPTIONAL_CHILD
private static boolean is Parent I Feature candidate I Feature feature boolean optional Only throws Core Exception I Included Feature Reference refs candidate get Included Feature References for int i 0 i refs length i I Included Feature Reference child refs i Versioned Identifier fvid feature get Versioned Identifier Versioned Identifier cvid child get Versioned Identifier if fvid get Identifier equals cvid get Identifier false continue same ID Plugin Version Identifier fversion fvid get Version Plugin Version Identifier cversion cvid get Version if fversion equals cversion included and matched return true if optionality is not important or it is and the inclusion is optional return optional Only false child is Optional return false  isParent IFeature IFeature optionalOnly CoreException IIncludedFeatureReference getIncludedFeatureReferences IIncludedFeatureReference VersionedIdentifier getVersionedIdentifier VersionedIdentifier getVersionedIdentifier getIdentifier getIdentifier PluginVersionIdentifier getVersion PluginVersionIdentifier getVersion optionalOnly isOptional
private static I Status create Multi Status String root Key Array List children int code I Status carray I Status children to Array new I Status children size String message Policy bind root Key return new Multi Status Update Core get Plugin get Bundle get Symbolic Name code carray message null  IStatus createMultiStatus rootKey ArrayList IStatus IStatus toArray IStatus rootKey MultiStatus UpdateCore getPlugin getBundle getSymbolicName
private static I Status create Status I Feature feature int error Code String message String full Message if feature null full Message message else Plugin Version Identifier version feature get Versioned Identifier get Version full Message Policy bind KEY CHILD MESSAGE new String feature get Label version to String message return new Feature Status feature I Status ERROR Update Core get Plugin get Bundle get Symbolic Name error Code full Message null  IStatus createStatus IFeature errorCode fullMessage fullMessage PluginVersionIdentifier getVersionedIdentifier getVersion fullMessage KEY_CHILD_MESSAGE getLabel toString FeatureStatus IStatus UpdateCore getPlugin getBundle getSymbolicName errorCode fullMessage
private static I Status create Combined Report Status Array List before Status Array List status if before Status size 0 good initial config if status size 0 return null all fine else return create Multi Status KEY ROOT MESSAGE status I Status ERROR error after operation else before Status size 0 initial config errors if status size 0 return null errors will be fixed else if is Better Status before Status status return create Multi Status Activity Constraints warning NON NLS 1 before Status I Status WARNING errors may be fixed else Array List combined new Array List combined add create Multi Status Activity Constraints before Message NON NLS 1 before Status I Status ERROR combined add create Multi Status Activity Constraints after Message NON NLS 1 status I Status ERROR return create Multi Status KEY ROOT MESSAGE INIT combined I Status ERROR  IStatus createCombinedReportStatus ArrayList beforeStatus ArrayList beforeStatus createMultiStatus KEY_ROOT_MESSAGE IStatus beforeStatus isBetterStatus beforeStatus createMultiStatus ActivityConstraints beforeStatus IStatus ArrayList ArrayList createMultiStatus ActivityConstraints beforeMessage beforeStatus IStatus createMultiStatus ActivityConstraints afterMessage IStatus createMultiStatus KEY_ROOT_MESSAGE_INIT IStatus
private static Array List create List String comma Separated List Array List list new Array List if comma Separated List null String Tokenizer t new String Tokenizer comma Separated List trim NON NLS 1 while t has More Tokens String token t next Token trim if token equals NON NLS 1 list add token return list  ArrayList createList commaSeparatedList ArrayList ArrayList commaSeparatedList StringTokenizer StringTokenizer commaSeparatedList hasMoreTokens nextToken
Returns true if status is a subset of before Status param before Status param status return private static boolean is Better Status Array List before Status Array List status if no status at all then it s a subset if status null status size 0 return true there is some status so if there is no initial status then it s not a subset if before Status null before Status size 0 return false quick check if before Status size status size return false check if all the status elements appear in the original status for int i 0 i status size i I Status s I Status status get i if this is not a feature status something is wrong so return false if s instanceof Feature Status return false Feature Status fs Feature Status s check against all status elements boolean found false for int j 0 found j before Status size j if fs equals before Status get j found true if found return false return true  beforeStatus beforeStatus isBetterStatus ArrayList beforeStatus ArrayList beforeStatus beforeStatus beforeStatus IStatus IStatus FeatureStatus FeatureStatus FeatureStatus beforeStatus beforeStatus

private Site Listener listener class Site Listener implements I Configured Site Changed Listener public void feature Installed I Feature feature  SiteListener SiteListener IConfiguredSiteChangedListener featureInstalled IFeature
public void feature Installed I Feature feature public void feature Removed I Feature feature clean Saved Configs feature  featureInstalled IFeature featureRemoved IFeature cleanSavedConfigs
clean Saved Configs feature public void feature Configured I Feature feature  cleanSavedConfigs featureConfigured IFeature
public void feature Configured I Feature feature public void feature Unconfigured I Feature feature clean Saved Configs feature  featureConfigured IFeature featureUnconfigured IFeature cleanSavedConfigs
public Patch Cleaner I Configured Site csite I Feature root this csite csite listener new Site Listener csite add Configured Site Changed Listener listener  PatchCleaner IConfiguredSite IFeature SiteListener addConfiguredSiteChangedListener
public void dispose csite remove Configured Site Changed Listener listener  removeConfiguredSiteChangedListener
private void clean Saved Configs I Feature feature if feature is Patch I Install Configuration backup Config Update Utils get Backup Configuration For feature if backup Config null clean it remove backup Config  cleanSavedConfigs IFeature isPatch IInstallConfiguration backupConfig UpdateUtils getBackupConfigurationFor backupConfig backupConfig
private void remove I Install Configuration config try I Local Site local Site Site Manager get Local Site local Site remove From Preserved Configurations config catch Core Exception e  IInstallConfiguration ILocalSite localSite SiteManager getLocalSite localSite removeFromPreservedConfigurations CoreException

public Replace Feature Version Operation I Feature feature I Feature another Feature super feature get Site get Current Configured Site feature this another Feature another Feature  ReplaceFeatureVersionOperation IFeature IFeature anotherFeature getSite getCurrentConfiguredSite anotherFeature anotherFeature
public boolean execute I Progress Monitor pm I Operation Listener listener throws Core Exception I Status status Operations Manager get Validator validate Pending Replace Version feature another Feature if status null throw new Core Exception status unconfigure current feature first then configure the other one Patch Cleaner cleaner new Patch Cleaner target Site feature target Site unconfigure feature cleaner dispose target Site configure another Feature ensure Unique try Restart not needed boolean restart Needed false Check if this operation is cancelling one that s already pending I Operation pending Operation Operations Manager find Pending Operation feature if pending Operation instanceof I Config Feature Operation no need to do either pending change Operations Manager remove Pending Operation pending Operation else Operations Manager add Pending Operation this restart Needed true pending Operation Operations Manager find Pending Operation another Feature if pending Operation instanceof I Unconfig Feature Operation no need to do either pending change Operations Manager remove Pending Operation pending Operation else Operations Manager add Pending Operation this restart Needed true mark Processed if listener null listener after Execute this null restart Needed Site Manager get Local Site save restart Needed notify the model Operations Manager fire Object Changed feature null return restart Needed catch Core Exception e undo Update Utils log Exception e throw e  IProgressMonitor IOperationListener CoreException IStatus OperationsManager getValidator validatePendingReplaceVersion anotherFeature CoreException PatchCleaner PatchCleaner targetSite targetSite targetSite anotherFeature ensureUnique restartNeeded IOperation pendingOperation OperationsManager findPendingOperation pendingOperation IConfigFeatureOperation OperationsManager removePendingOperation pendingOperation OperationsManager addPendingOperation restartNeeded pendingOperation OperationsManager findPendingOperation anotherFeature pendingOperation IUnconfigFeatureOperation OperationsManager removePendingOperation pendingOperation OperationsManager addPendingOperation restartNeeded markProcessed afterExecute restartNeeded SiteManager getLocalSite restartNeeded OperationsManager fireObjectChanged restartNeeded CoreException UpdateUtils logException
public void undo throws Core Exception target Site unconfigure another Feature target Site configure feature  CoreException targetSite anotherFeature targetSite

public Revert Configuration Operation I Install Configuration config I Problem Handler problem Handler super this config config this problem Handler problem Handler  RevertConfigurationOperation IInstallConfiguration IProblemHandler problemHandler problemHandler problemHandler
public boolean execute I Progress Monitor monitor I Operation Listener listener throws Core Exception Invocation Target Exception I Status status Operations Manager get Validator validate Pending Revert config if status null status get Code I Status ERROR throw new Core Exception status try I Local Site local Site Site Manager get Local Site local Site revert To config monitor problem Handler local Site save return true catch Core Exception e Update Utils log Exception e throw e  IProgressMonitor IOperationListener CoreException InvocationTargetException IStatus OperationsManager getValidator validatePendingRevert getCode IStatus CoreException ILocalSite localSite SiteManager getLocalSite localSite revertTo problemHandler localSite CoreException UpdateUtils logException

private I Configured Site site public Toggle Site Operation I Configured Site site super this site site  IConfiguredSite ToggleSiteOperation IConfiguredSite
public boolean execute I Progress Monitor monitor I Operation Listener listener throws Core Exception if site null return false boolean old Value site is Enabled site set Enabled old Value I Status status Operations Manager get Validator validate Current State if status null revert site set Enabled old Value throw new Core Exception status else try boolean restart Needed Site Manager get Local Site save Operations Manager fire Object Changed site NON NLS 1 return restart Needed will restart only if changes could not be applied to current config catch Core Exception e revert site set Enabled old Value Update Utils log Exception e throw e  IProgressMonitor IOperationListener CoreException oldValue isEnabled setEnabled oldValue IStatus OperationsManager getValidator validateCurrentState setEnabled oldValue CoreException restartNeeded SiteManager getLocalSite OperationsManager fireObjectChanged restartNeeded CoreException setEnabled oldValue UpdateUtils logException

public Unconfig Operation I Configured Site site I Feature feature super site feature  UnconfigOperation IConfiguredSite IFeature
public boolean execute I Progress Monitor pm I Operation Listener listener throws Core Exception I Status status Operations Manager get Validator validate Pending Unconfig feature if status null status get Code I Status ERROR throw new Core Exception status Patch Cleaner cleaner new Patch Cleaner target Site feature target Site unconfigure feature cleaner dispose try Restart not needed boolean restart Needed false Check if this operation is cancelling one that s already pending I Operation pending Operation Operations Manager find Pending Operation feature if pending Operation instanceof I Config Feature Operation no need to do either pending change Operations Manager remove Pending Operation pending Operation else Operations Manager add Pending Operation this restart Needed true mark Processed if listener null listener after Execute this null restart Needed Site Manager get Local Site save restart Needed notify the model Operations Manager fire Object Changed feature null return restart Needed catch Core Exception e undo Update Utils log Exception e throw e  IProgressMonitor IOperationListener CoreException IStatus OperationsManager getValidator validatePendingUnconfig getCode IStatus CoreException PatchCleaner PatchCleaner targetSite targetSite restartNeeded IOperation pendingOperation OperationsManager findPendingOperation pendingOperation IConfigFeatureOperation OperationsManager removePendingOperation pendingOperation OperationsManager addPendingOperation restartNeeded markProcessed afterExecute restartNeeded SiteManager getLocalSite restartNeeded OperationsManager fireObjectChanged restartNeeded CoreException UpdateUtils logException
public void undo throws Core Exception target Site configure feature  CoreException targetSite

public class Uninstall Operation extends Feature Operation implements I Uninstall Feature Operation public Uninstall Operation I Configured Site site I Feature feature super site feature  UninstallOperation FeatureOperation IUninstallFeatureOperation UninstallOperation IConfiguredSite IFeature
public void set Target Site I Configured Site target Site this target Site target Site  setTargetSite IConfiguredSite targetSite targetSite targetSite
public boolean execute I Progress Monitor pm I Operation Listener listener throws Core Exception if target Site null target Site Update Utils get Config Site feature Site Manager get Local Site get Current Configuration Restart not needed boolean restart Needed false if target Site null if needed unconfigure the feature first if target Site is Configured feature I Status status Operations Manager get Validator validate Pending Unconfig feature if status null status get Code I Status ERROR throw new Core Exception status if unconfigure feature target Site restart Needed true else throw Utilities new Core Exception Policy bind Operations Manager error uninstall feature get Versioned Identifier to String null NON NLS 1 target Site remove feature pm else we should do something here String message Policy bind Operations Manager error uninstall NON NLS 1 feature get Label I Status status new Status I Status ERROR Update Utils get Plugin Id I Status OK message null throw new Core Exception status mark Processed if listener null listener after Execute this null restart Needed Site Manager get Local Site save restart Needed notify the model Operations Manager fire Object Changed feature UNINSTALL return restart Needed  IProgressMonitor IOperationListener CoreException targetSite targetSite UpdateUtils getConfigSite SiteManager getLocalSite getCurrentConfiguration restartNeeded targetSite targetSite isConfigured IStatus OperationsManager getValidator validatePendingUnconfig getCode IStatus CoreException targetSite restartNeeded newCoreException OperationsManager getVersionedIdentifier toString targetSite OperationsManager getLabel IStatus IStatus UpdateUtils getPluginId IStatus CoreException markProcessed afterExecute restartNeeded SiteManager getLocalSite restartNeeded OperationsManager fireObjectChanged restartNeeded

Private constructor private Update Utils  UpdateUtils
public static String get Plugin Id return Update Core get Plugin get Bundle get Symbolic Name  getPluginId UpdateCore getPlugin getBundle getSymbolicName
public static void log Exception Throwable e if e instanceof Invocation Target Exception e Invocation Target Exception e get Target Exception I Status status null if e instanceof Core Exception status Core Exception e get Status else String message e get Message if message null message e to String status new Status I Status ERROR get Plugin Id I Status OK message e log status  logException InvocationTargetException InvocationTargetException getTargetException IStatus CoreException CoreException getStatus getMessage toString IStatus getPluginId IStatus
public static void log I Status status if status get Severity I Status INFO Update Core get Plugin get Log log status  IStatus getSeverity IStatus UpdateCore getPlugin getLog
public static I Feature search Site String feature Id I Configured Site site boolean only Configured throws Core Exception I Feature Reference references null if only Configured references site get Configured Features else references site get Site get Feature References Vector result new Vector for int i 0 i references length i I Feature feature references i get Feature null String id feature get Versioned Identifier get Identifier if feature Id equals id result add feature return I Feature result to Array new I Feature result size  IFeature searchSite featureId IConfiguredSite onlyConfigured CoreException IFeatureReference onlyConfigured getConfiguredFeatures getSite getFeatureReferences IFeature getFeature getVersionedIdentifier getIdentifier featureId IFeature toArray IFeature
public static I Feature get Installed Features I Feature feature return get Installed Features feature true  IFeature getInstalledFeatures IFeature getInstalledFeatures
param feature param only Configured return I Feature with features matching feature ID public static I Feature get Installed Features I Feature feature boolean only Configured return get Installed Features feature get Versioned Identifier only Configured  onlyConfigured IFeature IFeature getInstalledFeatures IFeature onlyConfigured getInstalledFeatures getVersionedIdentifier onlyConfigured
param vid param only Configured return I Feature with features matching feature ID public static I Feature get Installed Features Versioned Identifier vid boolean only Configured Vector features new Vector try I Local Site local Site Site Manager get Local Site I Install Configuration config local Site get Current Configuration I Configured Site isites config get Configured Sites String id vid get Identifier for int i 0 i isites length i I Configured Site isite isites i I Feature result Update Utils search Site id isite only Configured for int j 0 j result length j I Feature installed Feature result j features add installed Feature catch Core Exception e Update Utils log Exception e return I Feature features to Array new I Feature features size  onlyConfigured IFeature IFeature getInstalledFeatures VersionedIdentifier onlyConfigured ILocalSite localSite SiteManager getLocalSite IInstallConfiguration localSite getCurrentConfiguration IConfiguredSite getConfiguredSites getIdentifier IConfiguredSite IFeature UpdateUtils searchSite onlyConfigured IFeature installedFeature installedFeature CoreException UpdateUtils logException IFeature toArray IFeature
param patch return I Feature or null public static I Feature get Patched Feature I Feature patch I Import imports patch get Imports for int i 0 i imports length i I Import iimport imports i if iimport is Patch Versioned Identifier patched Vid iimport get Versioned Identifier features with matching id I Feature features get Installed Features patched Vid false for int f 0 f features length f check if version match if patched Vid equals features f get Versioned Identifier return features f return null  IFeature IFeature getPatchedFeature IFeature IImport getImports IImport isPatch VersionedIdentifier patchedVid getVersionedIdentifier IFeature getInstalledFeatures patchedVid patchedVid getVersionedIdentifier
public static boolean is Patch I Feature candidate I Import imports candidate get Imports for int i 0 i imports length i I Import iimport imports i if iimport is Patch return true return false  isPatch IFeature IImport getImports IImport isPatch
public static boolean is Patch I Feature target I Feature candidate Versioned Identifier vid target get Versioned Identifier I Import imports candidate get Imports for int i 0 i imports length i I Import iimport imports i if iimport is Patch Versioned Identifier ivid iimport get Versioned Identifier if vid equals ivid Bingo return true return false  isPatch IFeature IFeature VersionedIdentifier getVersionedIdentifier IImport getImports IImport isPatch VersionedIdentifier getVersionedIdentifier
public static I Install Configuration get Backup Configuration For I Feature feature Versioned Identifier vid feature get Versioned Identifier String key vid get Identifier   vid get Version NON NLS 1 NON NLS 2 try I Local Site lsite Site Manager get Local Site I Install Configuration configs lsite get Preserved Configurations for int i 0 i configs length i I Install Configuration config configs i if config get Label starts With key return config catch Core Exception e return null  IInstallConfiguration getBackupConfigurationFor IFeature VersionedIdentifier getVersionedIdentifier getIdentifier _ getVersion ILocalSite SiteManager getLocalSite IInstallConfiguration getPreservedConfigurations IInstallConfiguration getLabel startsWith CoreException
public static boolean has License I Feature feature IURL Entry info feature get License if info null return false String license Txt info get Annotation if license Txt null return false return license Txt trim length 0  hasLicense IFeature IURLEntry getLicense licenseTxt getAnnotation licenseTxt licenseTxt
public static boolean has Optional Features I Feature Reference fref try return has Optional Features fref get Feature null catch Core Exception e return false  hasOptionalFeatures IFeatureReference hasOptionalFeatures getFeature CoreException
public static boolean has Optional Features I Feature feature try I Included Feature Reference irefs feature get Included Feature References for int i 0 i irefs length i I Included Feature Reference iref irefs i if iref is Optional return true see if it has optional children I Feature child iref get Feature null if has Optional Features child return true catch Core Exception e return false  hasOptionalFeatures IFeature IIncludedFeatureReference getIncludedFeatureReferences IIncludedFeatureReference isOptional IFeature getFeature hasOptionalFeatures CoreException
public static I Feature get Local Feature I Configured Site csite I Feature feature throws Core Exception I Feature Reference refs csite get Configured Features for int i 0 i refs length i I Feature Reference ref refs i Versioned Identifier ref Vid ref get Versioned Identifier if feature get Versioned Identifier equals ref Vid return ref get Feature null return null  IFeature getLocalFeature IConfiguredSite IFeature CoreException IFeatureReference getConfiguredFeatures IFeatureReference VersionedIdentifier refVid getVersionedIdentifier getVersionedIdentifier refVid getFeature
public static I Configured Site get Config Site I Feature feature I Install Configuration config throws Core Exception I Configured Site config Sites config get Configured Sites for int i 0 i config Sites length i I Configured Site site config Sites i if site get Site equals feature get Site return site return null  IConfiguredSite getConfigSite IFeature IInstallConfiguration CoreException IConfiguredSite configSites getConfiguredSites configSites IConfiguredSite configSites getSite getSite
public static I Configured Site get Default Target Site I Install Configuration config I Install Feature Operation pending Change return get Default Target Site config pending Change true  IConfiguredSite getDefaultTargetSite IInstallConfiguration IInstallFeatureOperation pendingChange getDefaultTargetSite pendingChange
public static I Configured Site get Default Target Site I Install Configuration config I Install Feature Operation pending Change boolean check Affinity Feature I Feature old Feature pending Change get Old Feature I Feature new Feature pending Change get Feature if old Feature null We should install into the same site as the old feature try return get Config Site old Feature config catch Core Exception e log Exception e return null This is a new install Check if there is a disabled feature with the same ID String new FeatureID new Feature get Versioned Identifier get Identifier I Configured Site same Site get Site With Feature config new FeatureID if same Site null return same Site if check Affinity Feature return get Affinity Site config new Feature return null  IConfiguredSite getDefaultTargetSite IInstallConfiguration IInstallFeatureOperation pendingChange checkAffinityFeature IFeature oldFeature pendingChange getOldFeature IFeature newFeature pendingChange getFeature oldFeature getConfigSite oldFeature CoreException logException newFeatureID newFeature getVersionedIdentifier getIdentifier IConfiguredSite sameSite getSiteWithFeature newFeatureID sameSite sameSite checkAffinityFeature getAffinitySite newFeature
public static I Configured Site get Affinity Site I Install Configuration config I Feature new Feature check if the affinity feature is installed String affinityID new Feature get Affinity Feature if affinityID null I Configured Site affinity Site get Site With Feature config affinityID if affinity Site null return affinity Site else if this is a patch collocate with the feature I Feature patched Feature get Patched Feature new Feature if patched Feature null return get Site With Feature config patched Feature get Versioned Identifier get Identifier return null  IConfiguredSite getAffinitySite IInstallConfiguration IFeature newFeature newFeature getAffinityFeature IConfiguredSite affinitySite getSiteWithFeature affinitySite affinitySite IFeature patchedFeature getPatchedFeature newFeature patchedFeature getSiteWithFeature patchedFeature getVersionedIdentifier getIdentifier
public static I Configured Site get Site With Feature I Install Configuration config String featureID if featureID null return null I Configured Site sites config get Configured Sites for int i 0 i sites length i I Configured Site site sites i I Feature Reference refs site get Feature References for int j 0 j refs length j I Feature Reference ref refs j try I Feature feature ref get Feature null if featureID equals feature get Versioned Identifier get Identifier found it return site catch Core Exception e log Exception e return null  IConfiguredSite getSiteWithFeature IInstallConfiguration IConfiguredSite getConfiguredSites IConfiguredSite IFeatureReference getFeatureReferences IFeatureReference IFeature getFeature getVersionedIdentifier getIdentifier CoreException logException
public static void collect Old Features I Feature feature I Configured Site target Site Array List result throws Core Exception I Included Feature Reference included feature get Included Feature References for int i 0 i included length i I Included Feature Reference iref included i I Feature ifeature try ifeature iref get Feature null catch Core Exception e if iref is Optional continue throw e find other features and unconfigure String id iref get Versioned Identifier get Identifier I Feature same Ids Update Utils search Site id target Site true for int j 0 j same Ids length j I Feature same Id same Ids j Ignore self if same Id equals ifeature continue result add same Id collect Old Features ifeature target Site result  collectOldFeatures IFeature IConfiguredSite targetSite ArrayList CoreException IIncludedFeatureReference getIncludedFeatureReferences IIncludedFeatureReference IFeature getFeature CoreException isOptional getVersionedIdentifier getIdentifier IFeature sameIds UpdateUtils searchSite targetSite sameIds IFeature sameId sameIds sameId sameId collectOldFeatures targetSite
public static Update Search Request create New Updates Request I Feature features Update Search Scope scope new Update Search Scope scope set Update MapURL Update Utils get Update MapURL Updates Search Category category new Updates Search Category if features null category set Features features Update Search Request search Request new Update Search Request category scope search Request add Filter new Environment Filter return search Request  UpdateSearchRequest createNewUpdatesRequest IFeature UpdateSearchScope UpdateSearchScope setUpdateMapURL UpdateUtils getUpdateMapURL UpdatesSearchCategory UpdatesSearchCategory setFeatures UpdateSearchRequest searchRequest UpdateSearchRequest searchRequest addFilter EnvironmentFilter searchRequest
public static boolean is Nested Child I Install Configuration config I Feature feature I Configured Site csites config get Configured Sites try for int i 0 csites null i csites length i I Feature Reference refs csites i get Configured Features for int j 0 refs null j refs length j I Feature parent refs j get Feature null I Feature Reference children parent get Included Feature References for int k 0 children null k children length k I Feature child children k get Feature null if feature equals child return true catch Core Exception e will return false return false  isNestedChild IInstallConfiguration IFeature IConfiguredSite getConfiguredSites IFeatureReference getConfiguredFeatures IFeature getFeature IFeatureReference getIncludedFeatureReferences IFeature getFeature CoreException
public static boolean has Obsolete Patches I Feature feature Check all the included features that are unconfigured and see if their patch references are better than the original try I Feature Reference irefs feature get Included Feature References for int i 0 i irefs length i I Feature Reference iref irefs i I Feature ifeature iref get Feature null I Configured Site csite ifeature get Site get Current Configured Site if csite is Configured ifeature if is Patch Happy ifeature return false catch Core Exception e return false All checks went well return true  hasObsoletePatches IFeature IFeatureReference getIncludedFeatureReferences IFeatureReference IFeature getFeature IConfiguredSite getSite getCurrentConfiguredSite isConfigured isPatchHappy CoreException
public static boolean is Patch Happy I Feature feature throws Core Exception If this is a patch and it includes another patch and the included patch is disabled but the feature it was declared to patch is now newer and is presumed to contain the now disabled patch and the newer patched feature is enabled a leap of faith assumption can be made Although the included patch is disabled the feature it was designed to patch is now newer and most likely contains the equivalent fix and more Consequently we can claim that the status and the error icon overlay are misleading because all the right plug ins are configured I Import imports feature get Imports I Import patch Reference null for int i 0 i imports length i I Import iimport imports i if iimport is Patch patch Reference iimport break if patch Reference null return false Versioned Identifier ref Vid patch Reference get Versioned Identifier Find the patched feature and I Configured Site csite feature get Site get Current Configured Site if csite null return false I Feature Reference crefs csite get Configured Features for int i 0 i crefs length i I Feature Reference cref crefs i Versioned Identifier cvid cref get Versioned Identifier if cvid get Identifier equals ref Vid get Identifier This is the one if cvid get Version is Greater Than ref Vid get Version Bingo we found the referenced feature and its version is greater we can assume that it contains better code than the patch that referenced the older version return true return false  isPatchHappy IFeature CoreException IImport getImports IImport patchReference IImport isPatch patchReference patchReference VersionedIdentifier refVid patchReference getVersionedIdentifier IConfiguredSite getSite getCurrentConfiguredSite IFeatureReference getConfiguredFeatures IFeatureReference VersionedIdentifier getVersionedIdentifier getIdentifier refVid getIdentifier getVersion isGreaterThan refVid getVersion
public static URL get Update MapURL Preferences pref Update Core get Plugin get Plugin Preferences String map File pref get String Update Utils P UPDATE POLICY URL if map File null map File length 0 try String decoded File URL Decoder decode map File UTF 8 NON NLS 1 return new URL decoded File catch MalformedURL Exception e catch Unsupported Encoding Exception e return null  getUpdateMapURL UpdateCore getPlugin getPluginPreferences mapFile getString UpdateUtils P_UPDATE_POLICY_URL mapFile mapFile decodedFile URLDecoder mapFile decodedFile MalformedURLException UnsupportedEncodingException
I Progress Monitor pm new Null Progress Monitor public boolean is Canceled return progress is Canceled  IProgressMonitor NullProgressMonitor isCanceled isCanceled
public static void download Feature Content I Feature feature final I Progress Monitor progress throws Install Aborted Exception Core Exception only downloads our known feature types if feature instanceof Feature return DEBUG if Update Core DEBUG Update Core DEBUG SHOW INSTALL Update Core debug Downloading feature getURL to External Form NON NLS 1 I Progress Monitor pm new Null Progress Monitor public boolean is Canceled return progress is Canceled make sure we have an Install Monitor Install Monitor monitor new Install Monitor pm Get source feature provider and verifier Initialize target variables final I Feature Content Provider provider feature get Feature Content Provider I Plugin Entry target Site Plugin Entries null determine list of plugins to install find the intersection between the plugin entries already contained on the target site and plugin entries packaged in source feature I Plugin Entry source Feature Plugin Entries feature get Plugin Entries I Configured Site target Site get Site With Feature Site Manager get Local Site get Current Configuration Feature feature get Feature Identifier if target Site null if Update Core DEBUG Update Core DEBUG SHOW INSTALL Update Core debug The site to install in is null NON NLS 1 target Site Plugin Entries new I Plugin Entry 0 else target Site Plugin Entries target Site get Site get Plugin Entries I Plugin Entry plugins To Install Update Manager Utils diff source Feature Plugin Entries target Site Plugin Entries I Non Plugin Entry non Plugins To Install feature get Non Plugin Entries Download feature archive s provider get Feature Entry Archive References monitor Download plugin archives for int i 0 i plugins To Install length i provider get Plugin Entry Archive References plugins To Install i monitor Download non plugin archives Verification handled by optional install handler for int i 0 i non Plugins To Install length i provider get Non Plugin Entry Archive References non Plugins To Install i monitor Download child features I Feature Reference children feature get Included Feature References TODO check if they are optional and if they should be installed 2 0 1 for int i 0 i children length i I Feature child Feature null try child Feature children i get Feature null catch Core Exception e Update Core warn null e if child Feature null download Feature Content child Feature monitor  downloadFeatureContent IFeature IProgressMonitor InstallAbortedException CoreException UpdateCore UpdateCore DEBUG_SHOW_INSTALL UpdateCore toExternalForm IProgressMonitor NullProgressMonitor isCanceled isCanceled InstallMonitor InstallMonitor InstallMonitor IFeatureContentProvider getFeatureContentProvider IPluginEntry targetSitePluginEntries IPluginEntry sourceFeaturePluginEntries getPluginEntries IConfiguredSite targetSite getSiteWithFeature SiteManager getLocalSite getCurrentConfiguration getFeatureIdentifier targetSite UpdateCore UpdateCore DEBUG_SHOW_INSTALL UpdateCore targetSitePluginEntries IPluginEntry targetSitePluginEntries targetSite getSite getPluginEntries IPluginEntry pluginsToInstall UpdateManagerUtils sourceFeaturePluginEntries targetSitePluginEntries INonPluginEntry nonPluginsToInstall getNonPluginEntries getFeatureEntryArchiveReferences pluginsToInstall getPluginEntryArchiveReferences pluginsToInstall nonPluginsToInstall getNonPluginEntryArchiveReferences nonPluginsToInstall IFeatureReference getIncludedFeatureReferences IFeature childFeature childFeature getFeature CoreException UpdateCore childFeature downloadFeatureContent childFeature

private class Automatic Search Result Collector implements I Update Search Result Collector public void accept I Feature feature I Install Feature Operation operation Operations Manager get Operation Factory create Install Operation null feature null null null updates add operation  AutomaticSearchResultCollector IUpdateSearchResultCollector IFeature IInstallFeatureOperation OperationsManager getOperationFactory createInstallOperation
public Automatic Updates Job super Update Scheduler get String Automatic Updates Job Automatic Update Search NON NLS 1 updates new Array List set Priority Job DECORATE  AutomaticUpdatesJob UpdateScheduler getString AutomaticUpdatesJob AutomaticUpdateSearch ArrayList setPriority
Returns the standard display to be used The method first checks if the thread calling this method has an associated disaply If so this display is returned Otherwise the method returns the default display public static Display get Standard Display Display display display Display get Current if display null display Display get Default return display  getStandardDisplay getCurrent getDefault
public boolean belongs To Object family return Automatic Updates Job family family  belongsTo AutomaticUpdatesJob
if download get Standard Display async Exec new Runnable public void run async Notify Download User  getStandardDisplay asyncExec asyncNotifyDownloadUser
else get Standard Display async Exec new Runnable public void run async Notify User  getStandardDisplay asyncExec asyncNotifyUser
public I Status run I Progress Monitor monitor if Update Core DEBUG Update Core debug Automatic update search started NON NLS 1 search Request Update Utils create New Updates Request null try if result Collector null result Collector new Automatic Search Result Collector search Request perform Search result Collector monitor if Update Core DEBUG Update Core debug Automatic update search finished NON NLS 1 updates size results NON NLS 1 if updates size 0 boolean download Update Core get Plugin get Plugin Preferences get Boolean Update Scheduler P DOWNLOAD silently download if download enabled if download if Update Core DEBUG Update Core debug Automatic download of updates started NON NLS 1 for int i 0 i updates size i I Install Feature Operation op I Install Feature Operation updates get i I Feature feature op get Feature Update Utils download Feature Content feature monitor if Update Core DEBUG Update Core debug Automatic download of updates finished NON NLS 1 prompt the user if Install Wizard is Running if download get Standard Display async Exec new Runnable public void run async Notify Download User else get Standard Display async Exec new Runnable public void run async Notify User return Job ASYNC FINISH catch Core Exception e return e get Status return OK STATUS  IStatus IProgressMonitor UpdateCore UpdateCore searchRequest UpdateUtils createNewUpdatesRequest resultCollector resultCollector AutomaticSearchResultCollector searchRequest performSearch resultCollector UpdateCore UpdateCore UpdateCore getPlugin getPluginPreferences getBoolean UpdateScheduler P_DOWNLOAD UpdateCore UpdateCore IInstallFeatureOperation IInstallFeatureOperation IFeature getFeature UpdateUtils downloadFeatureContent UpdateCore UpdateCore InstallWizard isRunning getStandardDisplay asyncExec asyncNotifyDownloadUser getStandardDisplay asyncExec asyncNotifyUser ASYNC_FINISH CoreException getStatus OK_STATUS
Update Scheduler get String Automatic Updates Job Updates Available NON NLS 1 Busy Indicator show While get Standard Display new Runnable public void run open Install Wizard  UpdateScheduler getString AutomaticUpdatesJob UpdatesAvailable BusyIndicator showWhile getStandardDisplay openInstallWizard
private void async Notify User ask the user to install updates get Standard Display beep if Message Dialog open Question Update Scheduler get Active Workbench Shell Update Scheduler get String Automatic Updates Job Eclipse Updates1 NON NLS 1 Update Scheduler get String Automatic Updates Job Updates Available NON NLS 1 Busy Indicator show While get Standard Display new Runnable public void run open Install Wizard notify the manager that the job is done done OK STATUS  asyncNotifyUser getStandardDisplay MessageDialog openQuestion UpdateScheduler getActiveWorkbenchShell UpdateScheduler getString AutomaticUpdatesJob EclipseUpdates1 UpdateScheduler getString AutomaticUpdatesJob UpdatesAvailable BusyIndicator showWhile getStandardDisplay openInstallWizard OK_STATUS
Update Scheduler get String Automatic Updates Job Updates Downloaded NON NLS 1 Busy Indicator show While get Standard Display new Runnable public void run open Install Wizard  UpdateScheduler getString AutomaticUpdatesJob UpdatesDownloaded BusyIndicator showWhile getStandardDisplay openInstallWizard
private void async Notify Download User ask the user to install updates get Standard Display beep if Message Dialog open Question Update Scheduler get Active Workbench Shell Update Scheduler get String Automatic Updates Job Eclipse Updates2 NON NLS 1 Update Scheduler get String Automatic Updates Job Updates Downloaded NON NLS 1 Busy Indicator show While get Standard Display new Runnable public void run open Install Wizard else Don t discard downloaded data as next time we compare timestamps discard all the downloaded data from cache may include old data as well Utilities flush Local File notify the manager that the job is done done OK STATUS  asyncNotifyDownloadUser getStandardDisplay MessageDialog openQuestion UpdateScheduler getActiveWorkbenchShell UpdateScheduler getString AutomaticUpdatesJob EclipseUpdates2 UpdateScheduler getString AutomaticUpdatesJob UpdatesDownloaded BusyIndicator showWhile getStandardDisplay openInstallWizard flushLocalFile OK_STATUS
private void open Install Wizard if Install Wizard is Running job ends and a new one is rescheduled return Install Wizard wizard new Install Wizard search Request updates Wizard Dialog dialog new Resizable Install Wizard Dialog Update Scheduler get Active Workbench Shell wizard Update Scheduler get String Automatic Updates Job Updates NON NLS 1 dialog create dialog open  openInstallWizard InstallWizard isRunning InstallWizard InstallWizard searchRequest WizardDialog ResizableInstallWizardDialog UpdateScheduler getActiveWorkbenchShell UpdateScheduler getString AutomaticUpdatesJob

private Group download Group public void init I Workbench workbench  downloadGroup IWorkbench
on Startup Radio set Layout Data gd on Startup Radio add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed  onStartupRadio setLayoutData onStartupRadio addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged
on Schedule Radio set Layout Data gd on Schedule Radio add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed  onScheduleRadio setLayoutData onScheduleRadio addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged
search Only Radio set Layout Data gd search Only Radio add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed  searchOnlyRadio setLayoutData searchOnlyRadio addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged
search And Download Radio set Layout Data gd search And Download Radio add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed  searchAndDownloadRadio setLayoutData searchAndDownloadRadio addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged
enabled Check add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed  enabledCheck addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged
protected Control create Contents Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout margin Width layout margin Height 0 container set Layout layout enabled Check new Button container SWT CHECK enabled Check set Text Update Scheduler get String Automatic Updates Preference Page find Updates NON NLS 1 create Spacer container 1 update Schedule Group new Group container SWT NONE update Schedule Group set Text Update Scheduler get String Automatic Updates Preference Page Update Schedule NON NLS 1 layout new Grid Layout layout num Columns 3 update Schedule Group set Layout layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL update Schedule Group set Layout Data gd on Startup Radio new Button update Schedule Group SWT RADIO on Startup Radio set Text Update Scheduler get String Automatic Updates Preference Page find On Start NON NLS 1 gd new Grid Data gd horizontal Span 3 on Startup Radio set Layout Data gd on Startup Radio add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed on Schedule Radio new Button update Schedule Group SWT RADIO on Schedule Radio set Text Update Scheduler get String Automatic Updates Preference Page find On Schedule NON NLS 1 gd new Grid Data gd horizontal Span 3 on Schedule Radio set Layout Data gd on Schedule Radio add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed day Combo new Combo update Schedule Group SWT READ ONLY day Combo set Items Scheduler Startup DAYS gd new Grid Data gd width Hint 200 gd horizontal Indent 30 day Combo set Layout Data gd Label label new Label update Schedule Group SWT NULL label set Text Update Scheduler get String Automatic Updates Preference Page at NON NLS 1 hour Combo new Combo update Schedule Group SWT READ ONLY hour Combo set Items Scheduler Startup HOURS gd new Grid Data gd width Hint 100 hour Combo set Layout Data gd create Spacer container 1 download Group new Group container SWT NONE download Group set Text Update Scheduler get String Automatic Updates Preference Page download Options NON NLS 1 layout new Grid Layout layout num Columns 3 download Group set Layout layout gd new Grid Data Grid Data FILL HORIZONTAL download Group set Layout Data gd search Only Radio new Button download Group SWT RADIO search Only Radio set Text Update Scheduler get String Automatic Updates Preference Page search And Notify NON NLS 1 gd new Grid Data gd horizontal Span 3 search Only Radio set Layout Data gd search Only Radio add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed search And Download Radio new Button download Group SWT RADIO search And Download Radio set Text Update Scheduler get String Automatic Updates Preference Page download And Notify NON NLS 1 gd new Grid Data gd horizontal Span 3 search And Download Radio set Layout Data gd search And Download Radio add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed initialize enabled Check add Selection Listener new Selection Adapter public void widget Selected Selection Event e page Changed Dialog apply Dialog Font container return container  createContents GridLayout GridLayout marginWidth marginHeight setLayout enabledCheck enabledCheck setText UpdateScheduler getString AutomaticUpdatesPreferencePage findUpdates createSpacer updateScheduleGroup updateScheduleGroup setText UpdateScheduler getString AutomaticUpdatesPreferencePage UpdateSchedule GridLayout numColumns updateScheduleGroup setLayout GridData GridData GridData FILL_HORIZONTAL updateScheduleGroup setLayoutData onStartupRadio updateScheduleGroup onStartupRadio setText UpdateScheduler getString AutomaticUpdatesPreferencePage findOnStart GridData horizontalSpan onStartupRadio setLayoutData onStartupRadio addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged onScheduleRadio updateScheduleGroup onScheduleRadio setText UpdateScheduler getString AutomaticUpdatesPreferencePage findOnSchedule GridData horizontalSpan onScheduleRadio setLayoutData onScheduleRadio addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged dayCombo updateScheduleGroup READ_ONLY dayCombo setItems SchedulerStartup GridData widthHint horizontalIndent dayCombo setLayoutData updateScheduleGroup setText UpdateScheduler getString AutomaticUpdatesPreferencePage hourCombo updateScheduleGroup READ_ONLY hourCombo setItems SchedulerStartup GridData widthHint hourCombo setLayoutData createSpacer downloadGroup downloadGroup setText UpdateScheduler getString AutomaticUpdatesPreferencePage downloadOptions GridLayout numColumns downloadGroup setLayout GridData GridData FILL_HORIZONTAL downloadGroup setLayoutData searchOnlyRadio downloadGroup searchOnlyRadio setText UpdateScheduler getString AutomaticUpdatesPreferencePage searchAndNotify GridData horizontalSpan searchOnlyRadio setLayoutData searchOnlyRadio addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged searchAndDownloadRadio downloadGroup searchAndDownloadRadio setText UpdateScheduler getString AutomaticUpdatesPreferencePage downloadAndNotify GridData horizontalSpan searchAndDownloadRadio setLayoutData searchAndDownloadRadio addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged enabledCheck addSelectionListener SelectionAdapter widgetSelected SelectionEvent pageChanged applyDialogFont
protected void create Spacer Composite composite int column Span Label label new Label composite SWT NONE Grid Data gd new Grid Data gd horizontal Span column Span label set Layout Data gd  createSpacer columnSpan GridData GridData horizontalSpan columnSpan setLayoutData
private void initialize Preferences pref Update Scheduler get Default get Plugin Preferences enabled Check set Selection pref get Boolean Update Scheduler P ENABLED set Schedule pref get String Update Scheduler P SCHEDULE day Combo set Text Scheduler Startup DAYS get Day pref hour Combo set Text Scheduler Startup HOURS get Hour pref search Only Radio set Selection pref get Boolean Update Scheduler P DOWNLOAD search And Download Radio set Selection pref get Boolean Update Scheduler P DOWNLOAD page Changed  UpdateScheduler getDefault getPluginPreferences enabledCheck setSelection getBoolean UpdateScheduler P_ENABLED setSchedule getString UpdateScheduler P_SCHEDULE dayCombo setText SchedulerStartup getDay hourCombo setText SchedulerStartup getHour searchOnlyRadio setSelection getBoolean UpdateScheduler P_DOWNLOAD searchAndDownloadRadio setSelection getBoolean UpdateScheduler P_DOWNLOAD pageChanged
private void set Schedule String value if value equals Update Scheduler VALUE ON STARTUP on Startup Radio set Selection true else on Schedule Radio set Selection true  setSchedule UpdateScheduler VALUE_ON_STARTUP onStartupRadio setSelection onScheduleRadio setSelection
private void page Changed boolean master enabled Check get Selection update Schedule Group set Enabled master on Startup Radio set Enabled master on Schedule Radio set Enabled master day Combo set Enabled master on Schedule Radio get Selection hour Combo set Enabled master on Schedule Radio get Selection download Group set Enabled master search Only Radio set Enabled master search And Download Radio set Enabled master  pageChanged enabledCheck getSelection updateScheduleGroup setEnabled onStartupRadio setEnabled onScheduleRadio setEnabled dayCombo setEnabled onScheduleRadio getSelection hourCombo setEnabled onScheduleRadio getSelection downloadGroup setEnabled searchOnlyRadio setEnabled searchAndDownloadRadio setEnabled
protected void perform Defaults super perform Defaults Preferences pref Update Scheduler get Default get Plugin Preferences enabled Check set Selection pref get Default Boolean Update Scheduler P ENABLED  performDefaults performDefaults UpdateScheduler getDefault getPluginPreferences enabledCheck setSelection getDefaultBoolean UpdateScheduler P_ENABLED
Method declared on I Preference Page Subclasses should override public boolean perform Ok Preferences pref Update Scheduler get Default get Plugin Preferences pref set Value Update Scheduler P ENABLED enabled Check get Selection if on Startup Radio get Selection pref set Value Update Scheduler P SCHEDULE Update Scheduler VALUE ON STARTUP else pref set Value Update Scheduler P SCHEDULE Update Scheduler VALUE ON SCHEDULE pref set Value Scheduler Startup P DAY day Combo get Text pref set Value Scheduler Startup P HOUR hour Combo get Text pref set Value Update Scheduler P DOWNLOAD search And Download Radio get Selection Update Scheduler get Default save Plugin Preferences Update Scheduler get Scheduler schedule Update Job return true  IPreferencePage performOk UpdateScheduler getDefault getPluginPreferences setValue UpdateScheduler P_ENABLED enabledCheck getSelection onStartupRadio getSelection setValue UpdateScheduler P_SCHEDULE UpdateScheduler VALUE_ON_STARTUP setValue UpdateScheduler P_SCHEDULE UpdateScheduler VALUE_ON_SCHEDULE setValue SchedulerStartup P_DAY dayCombo getText setValue SchedulerStartup P_HOUR hourCombo getText setValue UpdateScheduler P_DOWNLOAD searchAndDownloadRadio getSelection UpdateScheduler getDefault savePluginPreferences UpdateScheduler getScheduler scheduleUpdateJob
private int get Day Preferences pref String day pref get String Scheduler Startup P DAY for int i 0 i Scheduler Startup DAYS length i if Scheduler Startup DAYS i equals day return i return 0  getDay getString SchedulerStartup P_DAY SchedulerStartup SchedulerStartup
private int get Hour Preferences pref String hour pref get String Scheduler Startup P HOUR for int i 0 i Scheduler Startup HOURS length i if Scheduler Startup HOURS i equals hour return i return 0  getHour getString SchedulerStartup P_HOUR SchedulerStartup SchedulerStartup

private class Update Job Change Adapter extends Job Change Adapter public void done Job job I Status result if job Scheduler Startup this job schedule Update Job  UpdateJobChangeAdapter JobChangeAdapter IStatus SchedulerStartup scheduleUpdateJob
The constructor public Scheduler Startup Update Scheduler set Scheduler this job Listener new Update Job Change Adapter Platform get Job Manager add Job Change Listener job Listener  SchedulerStartup UpdateScheduler setScheduler jobListener UpdateJobChangeAdapter getJobManager addJobChangeListener jobListener
public void early Startup schedule Update Job  earlyStartup scheduleUpdateJob
public void schedule Update Job Preferences pref Update Scheduler get Default get Plugin Preferences See if automatic search is enabled at all if pref get Boolean P ENABLED false return String schedule pref get String P SCHEDULE long delay 1L if schedule equals VALUE ON STARTUP have we already started a job if job null delay 0L else delay 1L else delay compute Delay pref if delay 1L return start Search delay  scheduleUpdateJob UpdateScheduler getDefault getPluginPreferences getBoolean P_ENABLED getString P_SCHEDULE VALUE_ON_STARTUP computeDelay startSearch
private int get Day Preferences pref String day pref get String P DAY for int d 0 d DAYS length d if DAYS d equals day switch d case 0 return 1 case 1 return Calendar MONDAY case 2 return Calendar TUESDAY case 3 return Calendar WEDNESDAY case 4 return Calendar THURSDAY case 5 return Calendar FRIDAY case 6 return Calendar SATURDAY case 7 return Calendar SUNDAY return 1  getDay getString P_DAY
private int get Hour Preferences pref String hour pref get String P HOUR for int h 0 h HOURS length h if HOURS h equals hour return h 1 return 1  getHour getString P_HOUR
private long compute Delay Preferences pref int target d get Day pref int target h get Hour pref Calendar calendar Calendar get Instance may need to use the Boot Loader locale int current d calendar get Calendar DAY OF WEEK starts with SUNDAY int current h calendar get Calendar HOUR OF DAY int current m calendar get Calendar MINUTE int current s calendar get Calendar SECOND int current ms calendar get Calendar MILLISECOND long delay 0L milliseconds if target d 1 Compute the delay for every day at x o clock Is it now if target h current h current m 0 current s 0 return delay int delta h target h current h if target h current h delta h 24 delay delta h 60 current m 60 current s 1000 current ms return delay else Compute the delay for every Xday at x o clock Is it now if target d current d target h current h current m 0 current s 0 return delay int delta d target d current d if target d current d target d current d target h current h target h current h current m 0 delta d 7 delay delta d 24 target h current h 60 current m 60 current s 1000 current ms return delay return 1L  computeDelay target_d getDay target_h getHour getInstance BootLoader current_d DAY_OF_WEEK current_h HOUR_OF_DAY current_m current_s current_ms target_d target_h current_h current_m current_s delta_h target_h current_h target_h current_h delta_h delta_h current_m current_s current_ms target_d current_d target_h current_h current_m current_s delta_d target_d current_d target_d current_d target_d current_d target_h current_h target_h current_h current_m delta_d delta_d target_h current_h current_m current_s current_ms
private void start Search long delay if job null cancel old job We need to deregister the listener first so we won t automatically start another job Platform get Job Manager remove Job Change Listener job Listener Platform get Job Manager cancel Automatic Updates Job family Platform get Job Manager add Job Change Listener job Listener job new Automatic Updates Job job schedule delay  startSearch getJobManager removeJobChangeListener jobListener getJobManager AutomaticUpdatesJob getJobManager addJobChangeListener jobListener AutomaticUpdatesJob

The constructor public Update Scheduler plugin this  UpdateScheduler
public Resource Bundle get Resource Bundle if resource Bundle null try resource Bundle Resource Bundle get Bundle org eclipse update internal scheduler Update Scheduler Resources NON NLS 1 catch Missing Resource Exception x resource Bundle null return resource Bundle  ResourceBundle getResourceBundle resourceBundle resourceBundle ResourceBundle getBundle UpdateSchedulerResources MissingResourceException resourceBundle resourceBundle
Returns the shared instance public static Update Scheduler get Default return plugin  UpdateScheduler getDefault
Returns the string from the plugin s resource bundle or key if not found public static String get String String key Resource Bundle bundle Update Scheduler get Default get Resource Bundle try return bundle get String key catch Missing Resource Exception e return key  getString ResourceBundle UpdateScheduler getDefault getResourceBundle getString MissingResourceException
public static String get Formatted Message String key String args String text get String key return java text Message Format format text args  getFormattedMessage getString MessageFormat
public static String get Formatted Message String key String arg String text get String key return java text Message Format format text new String arg  getFormattedMessage getString MessageFormat
public static String get Plugin Id return get Default get Bundle get Symbolic Name  getPluginId getDefault getBundle getSymbolicName
public static void log Exception Throwable e log Exception e true  logException logException
public static void log Exception Throwable e boolean show Error Dialog if e instanceof Invocation Target Exception e Invocation Target Exception e get Target Exception I Status status null if e instanceof Core Exception status Core Exception e get Status else String message e get Message if message null message e to String status new Status I Status ERROR get Plugin Id I Status OK message e log status show Error Dialog  logException showErrorDialog InvocationTargetException InvocationTargetException getTargetException IStatus CoreException CoreException getStatus getMessage toString IStatus getPluginId IStatus showErrorDialog
public static void log I Status status boolean show Error Dialog if status get Severity I Status INFO if show Error Dialog Error Dialog open Error get Active Workbench Shell null null status Should log on the update plugin s log Platform get Plugin org eclipse core runtime get Log log status NON NLS 1 Bundle bundle Platform get Bundle org eclipse update scheduler NON NLS 1 Platform get Log bundle log status else Message Dialog open Information get Active Workbench Shell null status get Message  IStatus showErrorDialog getSeverity IStatus showErrorDialog ErrorDialog openError getActiveWorkbenchShell getPlugin getLog getBundle getLog MessageDialog openInformation getActiveWorkbenchShell getMessage
public static I Workbench Page get Active Page Update Scheduler plugin get Default I Workbench Window window plugin get Workbench get Active Workbench Window if window null return window get Active Page return null  IWorkbenchPage getActivePage UpdateScheduler getDefault IWorkbenchWindow getWorkbench getActiveWorkbenchWindow getActivePage
public static Shell get Active Workbench Shell I Workbench Window window get Active Workbench Window return window null window get Shell null  getActiveWorkbenchShell IWorkbenchWindow getActiveWorkbenchWindow getShell
public static I Workbench Window get Active Workbench Window return get Default get Workbench get Active Workbench Window  IWorkbenchWindow getActiveWorkbenchWindow getDefault getWorkbench getActiveWorkbenchWindow
private void initialize Default Preferences Preferences pref get Plugin Preferences pref set Default P ENABLED false pref set Default P SCHEDULE VALUE ON STARTUP pref set Default P DOWNLOAD false  initializeDefaultPreferences getPluginPreferences setDefault P_ENABLED setDefault P_SCHEDULE VALUE_ON_STARTUP setDefault P_DOWNLOAD
see org osgi framework Bundle Activator start org osgi framework Bundle Context public void start Bundle Context context throws Exception super start context initialize Default Preferences  BundleActivator BundleContext BundleContext initializeDefaultPreferences
public static Scheduler Startup get Scheduler If the scheduler was disabled it does not get initialized if scheduler null scheduler new Scheduler Startup return scheduler  SchedulerStartup getScheduler SchedulerStartup
static void set Scheduler Scheduler Startup scheduler Update Scheduler scheduler scheduler  setScheduler SchedulerStartup UpdateScheduler

private String id protected Base Search Category String id set Id id  BaseSearchCategory setId
public String get Id return id  getId
public void set Id String id if this id null this id id  setId

private class Optional Query implements I Update Search Query public void run I Site site String categories To Skip I Update Search Filter filter I Update Search Result Collector collector I Progress Monitor monitor monitor begin Task vids size NON NLS 1 for int i 0 i vids size i Versioned Identifier vid Versioned Identifier vids get i monitor sub Task vid to String I Feature feature create Feature site vid new Sub Progress Monitor monitor 1 if feature null filter accept feature collector accept feature  OptionalQuery IUpdateSearchQuery ISite categoriesToSkip IUpdateSearchFilter IUpdateSearchResultCollector IProgressMonitor beginTask VersionedIdentifier VersionedIdentifier subTask toString IFeature createFeature SubProgressMonitor
private I Feature create Feature I Site site Versioned Identifier vid I Progress Monitor monitor try URL siteURL site getURL TODO This assumption stands only in the default case In general feature archive URL may be mapped on site Also feature type may be something else not packaged We may need additional information not only id and version in order to create a feature on a site String relative vid to String URL featureURL new URL siteURL features relative jar NON NLS 1 NON NLS 2 return site create Feature org eclipse update core packaged NON NLS 1 featureURL monitor catch Exception e return null  IFeature createFeature ISite VersionedIdentifier IProgressMonitor toString createFeature
see org eclipse update internal ui search I Search Query get Search Site public I Query Update Site Adapter get Query Search Site return null  ISearchQuery getSearchSite IQueryUpdateSiteAdapter getQuerySearchSite
public void add Versioned Identifier Versioned Identifier vid vids add vid  addVersionedIdentifier VersionedIdentifier
public void clear vids clear 
public Optional Feature Search Category super CATEGORY ID vids new Array List queries new I Update Search Query new Optional Query  OptionalFeatureSearchCategory CATEGORY_ID ArrayList IUpdateSearchQuery OptionalQuery
public I Update Search Query get Queries return queries  IUpdateSearchQuery getQueries

private String mapping Id public Query Update Site Adapter String label URL url String mapping Id super label url this mapping Id mapping Id  mappingId QueryUpdateSiteAdapter mappingId mappingId mappingId
public String get Mapping Id return mapping Id  getMappingId mappingId

private static class Query implements I Update Search Query public void run I Site site String categories To Skip I Update Search Filter filter I Update Search Result Collector collector I Progress Monitor monitor I Site Feature Reference refs site get Feature References Hash Set ignores new Hash Set if categories To Skip null for int i 0 i categories To Skip length i ignores add categories To Skip i monitor begin Task refs length NON NLS 1 for int i 0 i refs length i I Site Feature Reference ref refs i boolean skip Feature false if monitor is Canceled break if ignores size 0 I Category categories ref get Categories for int j 0 j categories length j I Category category categories j if ignores contains category get Name skip Feature true break try if skip Feature if filter accept ref I Feature feature ref get Feature null if filter accept feature collector accept feature monitor sub Task feature get Label catch Core Exception e System out println e finally monitor worked 1  IUpdateSearchQuery ISite categoriesToSkip IUpdateSearchFilter IUpdateSearchResultCollector IProgressMonitor ISiteFeatureReference getFeatureReferences HashSet HashSet categoriesToSkip categoriesToSkip categoriesToSkip beginTask ISiteFeatureReference skipFeature isCanceled ICategory getCategories ICategory getName skipFeature skipFeature IFeature getFeature subTask getLabel CoreException
see org eclipse update internal ui search I Search Query get Search Site public I Query Update Site Adapter get Query Search Site return null  ISearchQuery getSearchSite IQueryUpdateSiteAdapter getQuerySearchSite
public Site Search Category super CATEGORY ID queries new I Update Search Query new Query  SiteSearchCategory CATEGORY_ID IUpdateSearchQuery
public I Update Search Query get Queries return queries  IUpdateSearchQuery getQueries

private static class Map Site implements I Update Site Adapter private URL url public Map Site URL url this url url  MapSite IUpdateSiteAdapter MapSite
this url url public String get Label return url to String  getLabel toString
return url to String public URL getURL return url  toString
private String pattern public Update Map Entry String pattern URL url this pattern pattern this site new Map Site url  UpdateMapEntry MapSite
this site new Map Site url public I Update Site Adapter get Site return site  MapSite IUpdateSiteAdapter getSite
return site public boolean matches String id return id starts With pattern  startsWith
return id starts With pattern public String get Pattern return pattern  startsWith getPattern
private boolean fallback Allowed true public Update Policy entries new Array List  fallbackAllowed UpdatePolicy ArrayList
public void load URL map File I Progress Monitor monitor throws Core Exception Input Stream policy Stream null try Response response Update Core get Plugin get map File Update Manager Utils check Connection Result response map File policy Stream response get Input Stream monitor the stream can be null if the user cancels the connection if policy Stream null return document Builder Factory set Namespace Aware true Document Builder parser document Builder Factory new Document Builder Document doc parser parse new Input Source policy Stream process Update Policy doc loaded true catch IO Exception e throw Utilities new Core Exception Policy bind SiteURL Factory Unable To Access Site Stream NON NLS 1 map File null map File to External Form NON NLS 1 I Site SITE ACCESS EXCEPTION e catch SAX Exception e throw Utilities new Core Exception Policy bind Update Policy parse Policy NON NLS 1 0 e catch Parser Configuration Exception e throw Utilities new Core Exception Policy bind Update Policy parse Policy NON NLS 1 0 e finally if policy Stream null try policy Stream close catch IO Exception e  mapFile IProgressMonitor CoreException InputStream policyStream UpdateCore getPlugin mapFile UpdateManagerUtils checkConnectionResult mapFile policyStream getInputStream policyStream documentBuilderFactory setNamespaceAware DocumentBuilder documentBuilderFactory newDocumentBuilder InputSource policyStream processUpdatePolicy IOException newCoreException SiteURLFactory UnableToAccessSiteStream mapFile mapFile toExternalForm ISite SITE_ACCESS_EXCEPTION SAXException newCoreException UpdatePolicy parsePolicy ParserConfigurationException newCoreException UpdatePolicy parsePolicy policyStream policyStream IOException
public boolean is Loaded return loaded  isLoaded
public I Update Site Adapter get Mapped Site String id Update Map Entry last Entry null for int i 0 i entries size i Update Map Entry entry Update Map Entry entries get i if entry matches id if last Entry null last Entry entry else Choose the match with longer pattern For example if two matches are found org eclipse and org eclipse platform pick org eclipse platform String pattern entry get Pattern String last Pattern last Entry get Pattern if pattern length last Pattern length last Entry entry if last Entry null return last Entry get Site else return default Site  IUpdateSiteAdapter getMappedSite UpdateMapEntry lastEntry UpdateMapEntry UpdateMapEntry lastEntry lastEntry getPattern lastPattern lastEntry getPattern lastPattern lastEntry lastEntry lastEntry getSite defaultSite
public boolean is Fallback Allowed return fallback Allowed  isFallbackAllowed fallbackAllowed
private void reset if entries is Empty false entries clear  isEmpty
private void process Update Policy Document document throws Core Exception Node root document get Document Element reset if root get Node Name equals TAG POLICY false throw Core Exception TAG POLICY Policy bind Update Policy policy Expected null NON NLS 1 NON NLS 2 Node List nodes root get Child Nodes for int i 0 i nodes get Length i Node child nodes item i if child get Node Type Node ELEMENT NODE continue String tag child get Node Name if tag equals TAG URL MAP process Map Node child  processUpdatePolicy CoreException getDocumentElement getNodeName TAG_POLICY throwCoreException TAG_POLICY UpdatePolicy policyExpected NodeList getChildNodes getLength getNodeType ELEMENT_NODE getNodeName TAG_URL_MAP processMapNode
private void process Map Node Node node throws Core Exception String pattern get Attribute node ATT PATTERN String url Name get Attribute node ATT URL assert Not Null ATT PATTERN pattern assert Not Null ATT URL url Name empty url means feature is not updateable if url Name trim length 0 add Entry pattern null return try String decoded Value URL Decoder decode url Name UTF 8 NON NLS 1 URL url new URL decoded Value add Entry pattern url catch MalformedURL Exception e throw Core Exception Policy bind Update Policy invalidURL url Name null NON NLS 1 catch Unsupported Encoding Exception e  processMapNode CoreException getAttribute ATT_PATTERN urlName getAttribute ATT_URL assertNotNull ATT_PATTERN assertNotNull ATT_URL urlName urlName addEntry decodedValue URLDecoder urlName decodedValue addEntry MalformedURLException throwCoreException UpdatePolicy urlName UnsupportedEncodingException
private void assert Not Null String name String value throws Core Exception if value null throw Core Exception name Policy bind Update Policy name No Null null NON NLS 1  assertNotNull CoreException throwCoreException UpdatePolicy nameNoNull
private String get Attribute Node node String name Named Node Map att Map node get Attributes Node att att Map get Named Item name if att null return null return att get Node Value  getAttribute NamedNodeMap attMap getAttributes attMap getNamedItem getNodeValue
private void add Entry String pattern URL url if pattern equals Ignore Case NON NLS 1 default Site new Map Site url else entries add new Update Map Entry pattern url  addEntry equalsIgnoreCase defaultSite MapSite UpdateMapEntry
private void throw Core Exception String message Throwable e throws Core Exception String full Message Policy bind Update Policy Update Policy message NON NLS 1 throw Utilities new Core Exception full Message 0 e  throwCoreException CoreException fullMessage UpdatePolicy UpdatePolicy newCoreException fullMessage

private URL url public Update Site Adapter String label URL url this label label this url url  UpdateSiteAdapter
this url url public URL getURL return url 
return url public String get Label return label  getLabel
public String to String return getURL NON NLS 1  toString

Candidate parent I Feature Reference ref public Candidate I Feature Reference ref this ref ref  IFeatureReference IFeatureReference
this ref ref public Candidate I Feature Reference ref Candidate parent this ref this parent parent  IFeatureReference
public void add Candidate child if children null children new Array List child set Parent this children add child  ArrayList setParent
children add child void set Parent Candidate parent this parent parent  setParent
this parent parent public I Feature Reference get Reference return ref  IFeatureReference getReference
return ref void set Reference I Feature Reference ref this ref ref  setReference IFeatureReference
public I Feature get Feature I Progress Monitor monitor try return ref get Feature monitor catch Core Exception e return null  IFeature getFeature IProgressMonitor getFeature CoreException
public Candidate get Parent return parent  getParent
public Candidate get Root Candidate root this while root get Parent null root root get Parent return root  getRoot getParent getParent
public IURL Entry get Update Entry int location I Update Constants SEARCH ROOT if ref instanceof I Included Feature Reference location I Included Feature Reference ref get Search Location if parent null location I Update Constants SEARCH SELF return get Feature null get Update Site Entry return get Root get Update Entry  IURLEntry getUpdateEntry IUpdateConstants SEARCH_ROOT IIncludedFeatureReference IIncludedFeatureReference getSearchLocation IUpdateConstants SEARCH_SELF getFeature getUpdateSiteEntry getRoot getUpdateEntry
return get Root get Update Entry public String to String return ref to String  getRoot getUpdateEntry toString toString
public boolean equals Object source if source instanceof Candidate return this ref equals Candidate source get Reference if source instanceof I Feature Reference return this ref equals source return false  getReference IFeatureReference
public void add To Flat List Array List list boolean updatable Only add itself if updatable Only is Updatable list add this add children if children null for int i 0 i children size i Candidate child Candidate children get i child add To Flat List list updatable Only  addToFlatList ArrayList updatableOnly updatableOnly isUpdatable addToFlatList updatableOnly
public boolean is Updatable return parent null  isUpdatable
I Install Feature Operation patch For boolean patch public Hit I Feature candidate I Feature Reference ref this candidate candidate this ref ref  IInstallFeatureOperation patchFor IFeature IFeatureReference
this ref ref public Hit I Feature candidate I Feature Reference ref boolean patch this candidate ref this patch patch  IFeature IFeatureReference
public Hit I Feature candidate I Feature Reference ref I Install Feature Operation patch For this candidate ref true this patch For patch For  IFeature IFeatureReference IInstallFeatureOperation patchFor patchFor patchFor
public I Install Feature Operation get Job try I Feature feature ref get Feature null return Operations Manager get Operation Factory create Install Operation null feature null null null catch Core Exception e return null  IInstallFeatureOperation getJob IFeature getFeature OperationsManager getOperationFactory createInstallOperation CoreException
public boolean is Patch return patch  isPatch
return patch public I Install Feature Operation get Patched Job return patch For  IInstallFeatureOperation getPatchedJob patchFor
public Update Query I Feature candidate IURL Entry update Entry this candidate candidate if update Entry null update Entry getURL null adapter new Query Update Site Adapter get Label For Entry update Entry update Entry getURL candidate get Versioned Identifier get Identifier  UpdateQuery IFeature IURLEntry updateEntry updateEntry updateEntry QueryUpdateSiteAdapter getLabelForEntry updateEntry updateEntry getVersionedIdentifier getIdentifier
private String get Label For Entry IURL Entry entry String label entry get Annotation if label null label length 0 label entry getURL to String return label  getLabelForEntry IURLEntry getAnnotation toString
public I Query Update Site Adapter get Query Search Site return adapter  IQueryUpdateSiteAdapter getQuerySearchSite
private boolean is Broken try I Status status Site Manager get Local Site get Feature Status candidate return status get Severity I Status ERROR catch Core Exception e return false  isBroken IStatus SiteManager getLocalSite getFeatureStatus getSeverity IStatus CoreException
private boolean is Missing Optional Children I Feature feature try I Included Feature Reference children feature get Included Feature References for int i 0 i children length i I Included Feature Reference ref children i try I Feature child ref get Feature null If we are here the child is not missing Check it s children recursively if is Missing Optional Children child return true catch Core Exception e Missing child Return true if optional otherwise it is a broken feature that we do not care about if ref is Optional return Feature Hierarchy Element has Older Version ref catch Core Exception e return false  isMissingOptionalChildren IFeature IIncludedFeatureReference getIncludedFeatureReferences IIncludedFeatureReference IFeature getFeature isMissingOptionalChildren CoreException isOptional FeatureHierarchyElement hasOlderVersion CoreException
public void run I Site site String categories To Skip I Update Search Filter filter I Update Search Result Collector collector I Progress Monitor monitor Array List hits new Array List boolean broken is Broken boolean missing Optional Children false Don t bother to compute missing optional children if the feature is broken all we want is to see if we should allow same version re install if broken missing Optional Children is Missing Optional Children candidate I Site Feature Reference refs site get Feature References monitor begin Task refs length 1 NON NLS 1 Array List update Jobs new Array List for int i 0 i refs length i I Site Feature Reference ref refs i try if is Newer Version candidate get Versioned Identifier ref get Versioned Identifier Hit h new Hit candidate ref hits add h update Jobs add h get Job else accept the same feature if the installed feature is broken if broken missing Optional Children candidate get Versioned Identifier equals ref get Versioned Identifier hits add new Hit candidate ref continue else check for patches if is Patch candidate ref hits add new Hit candidate ref true continue catch Core Exception e monitor worked 1 if monitor is Canceled return accept patches for updated features for int n 0 n update Jobs size n I Install Feature Operation job I Install Feature Operation update Jobs get n I Feature new Candidate job get Feature for int i 0 i refs length i I Site Feature Reference ref refs i if is Patch new Candidate ref Hit h new Hit new Candidate ref job hits add h continue monitor worked 1 if monitor is Canceled return if hits size 0 collect Valid Hits hits filter collector monitor worked 1 monitor done  ISite categoriesToSkip IUpdateSearchFilter IUpdateSearchResultCollector IProgressMonitor ArrayList ArrayList isBroken missingOptionalChildren missingOptionalChildren isMissingOptionalChildren ISiteFeatureReference getFeatureReferences beginTask ArrayList updateJobs ArrayList ISiteFeatureReference isNewerVersion getVersionedIdentifier getVersionedIdentifier updateJobs getJob missingOptionalChildren getVersionedIdentifier getVersionedIdentifier isPatch CoreException isCanceled updateJobs IInstallFeatureOperation IInstallFeatureOperation updateJobs IFeature newCandidate getFeature ISiteFeatureReference isPatch newCandidate newCandidate isCanceled collectValidHits
private Array List candidates public Updates Search Category super CATEGORY ID  ArrayList UpdatesSearchCategory CATEGORY_ID
private void collect Valid Hits Array List hits I Update Search Filter filter I Update Search Result Collector collector Object array hits to Array I Feature top Hit null for int i 0 i hits size i Hit hit Hit hits get i I Install Feature Operation job hit get Job if job null continue do not accept updates without a license if Update Utils has License job get Feature Update Core log job get Feature get Versioned Identifier Policy bind Default Feature Parser No License Text null NON NLS 1 NON NLS 2 continue I Status status if hit get Patched Job null status Operations Manager get Validator validate Pending Install job get Old Feature job get Feature else status Operations Manager get Validator validate Pending Changes new I Install Feature Operation hit get Patched Job job if status null status get Code I Status WARNING if hit is Patch I Feature patch job get Feature Do not add the patch if already installed I Feature same Id Update Utils get Installed Features patch false if same Id length 0 if filter accept patch collector accept patch else if top Hit null top Hit job get Feature if filter accept top Hit collector accept top Hit  collectValidHits ArrayList IUpdateSearchFilter IUpdateSearchResultCollector toArray IFeature topHit IInstallFeatureOperation getJob UpdateUtils hasLicense getFeature UpdateCore getFeature getVersionedIdentifier DefaultFeatureParser NoLicenseText IStatus getPatchedJob OperationsManager getValidator validatePendingInstall getOldFeature getFeature OperationsManager getValidator validatePendingChanges IInstallFeatureOperation getPatchedJob getCode IStatus isPatch IFeature getFeature IFeature sameId UpdateUtils getInstalledFeatures sameId topHit topHit getFeature topHit topHit
private void initialize candidates new Array List try I Local Site local Site Site Manager get Local Site I Install Configuration config local Site get Current Configuration I Configured Site isites config get Configured Sites for int i 0 i isites length i contribute Candidates isites i catch Core Exception e Update Core log Policy bind Updates Search Category error Searching For Updates NON NLS 1 e  ArrayList ILocalSite localSite SiteManager getLocalSite IInstallConfiguration localSite getCurrentConfiguration IConfiguredSite getConfiguredSites contributeCandidates CoreException UpdateCore UpdatesSearchCategory errorSearchingForUpdates
private void contribute Candidates I Configured Site isite throws Core Exception I Feature Reference refs isite get Configured Features Array List candidates Per Site new Array List for int i 0 i refs length i I Feature Reference ref refs i Don t waste time searching for updates to patches try if Update Utils is Patch ref get Feature null continue catch Core Exception e continue Candidate c new Candidate ref candidates Per Site add c Create a tree from a flat list build Hierarchy candidates Per Site Add the remaining root candidates to the global list of candidates candidates add All candidates Per Site  contributeCandidates IConfiguredSite CoreException IFeatureReference getConfiguredFeatures ArrayList candidatesPerSite ArrayList IFeatureReference UpdateUtils isPatch getFeature CoreException candidatesPerSite buildHierarchy candidatesPerSite addAll candidatesPerSite
private void build Hierarchy Array List candidates throws Core Exception Candidate array Candidate candidates to Array new Candidate candidates size filter out included features so that only top level features remain on the list for int i 0 i array length i Candidate parent array i I Feature feature parent get Feature null I Feature Reference included feature get Included Feature References for int j 0 j included length j I Feature Reference fref included j Candidate child find Candidate candidates fref if child null parent add child child set Reference fref candidates remove child  buildHierarchy ArrayList CoreException toArray IFeature getFeature IFeatureReference getIncludedFeatureReferences IFeatureReference findCandidate setReference
private Candidate find Candidate Array List list I Feature Reference ref for int i 0 i list size i Candidate c Candidate list get i if c ref equals ref return c return null  findCandidate ArrayList IFeatureReference
public I Update Search Query get Queries initialize Array List all Candidates get All Candidates I Update Search Query queries new I Update Search Query all Candidates size for int i 0 i queries length i Candidate candidate Candidate all Candidates get i I Feature feature candidate get Feature null IURL Entry update Entry candidate get Update Entry if feature null queries i null else queries i new Update Query feature update Entry return queries  IUpdateSearchQuery getQueries ArrayList allCandidates getAllCandidates IUpdateSearchQuery IUpdateSearchQuery allCandidates allCandidates IFeature getFeature IURLEntry updateEntry getUpdateEntry UpdateQuery updateEntry
Sets the features for which new updates need to be found If not set updates will be searched for all the installed and configured features param features the features to search updates for public void set Features I Feature features this features features  setFeatures IFeature
Returns an array of features for which updates need to be found return an array of features or samp null samp if not set public I Feature get Features return features  IFeature getFeatures
param fvi param cvi return fvi cvi private boolean is Newer Version Versioned Identifier fvi Versioned Identifier cvi if fvi get Identifier equals cvi get Identifier return false Plugin Version Identifier fv fvi get Version Plugin Version Identifier cv cvi get Version String mode get Update Versions Mode boolean greater cv is Greater Than fv if greater return false if mode equals Update Core EQUIVALENT VALUE return cv is Equivalent To fv else if mode equals Update Core COMPATIBLE VALUE return cv is Compatible With fv else return false  isNewerVersion VersionedIdentifier VersionedIdentifier getIdentifier getIdentifier PluginVersionIdentifier getVersion PluginVersionIdentifier getVersion getUpdateVersionsMode isGreaterThan UpdateCore EQUIVALENT_VALUE isEquivalentTo UpdateCore COMPATIBLE_VALUE isCompatibleWith
private boolean is Patch I Feature candidate I Site Feature Reference ref if ref is Patch false return false try I Feature feature ref get Feature null if Update Utils is Patch candidate feature return true Check if patch is for children try I Included Feature Reference children candidate get Included Feature References for int i 0 i children length i I Included Feature Reference cref children i try I Feature child cref get Feature null if is Patch child ref return true catch Core Exception e catch Core Exception e return false catch Core Exception e return false  isPatch IFeature ISiteFeatureReference isPatch IFeature getFeature UpdateUtils isPatch IIncludedFeatureReference getIncludedFeatureReferences IIncludedFeatureReference IFeature getFeature isPatch CoreException CoreException CoreException
private String get Update Versions Mode Preferences store Update Core get Plugin get Plugin Preferences return store get String Update Core P UPDATE VERSIONS  getUpdateVersionsMode UpdateCore getPlugin getPluginPreferences getString UpdateCore P_UPDATE_VERSIONS
private Array List get All Candidates Array List selected new Array List for int i 0 i candidates size i Candidate c Candidate candidates get i if is On The List c c add To Flat List selected true return selected  ArrayList getAllCandidates ArrayList ArrayList isOnTheList addToFlatList
private boolean is On The List Candidate c if features null return true Versioned Identifier vid try vid c get Reference get Versioned Identifier catch Core Exception e return false for int i 0 i features length i I Feature feature features i Versioned Identifier fvid feature get Versioned Identifier if fvid equals vid return true return false  isOnTheList VersionedIdentifier getReference getVersionedIdentifier CoreException IFeature VersionedIdentifier getVersionedIdentifier

Gets the root return Returns a Certificate public Certificate get Root return root  getRoot
Sets the root param root The root to set public void set Root Certificate root this root root  setRoot
Gets the issuer return Returns a Certificate public Certificate get Issuer return issuer  getIssuer
Sets the issuer param issuer The issuer to set public void set Issuer Certificate issuer this issuer issuer  setIssuer
public boolean equals Object obj if obj null return false if obj instanceof Certificate Pair return false if root null issuer null return false Certificate Pair pair Certificate Pair obj return root equals pair get Root issuer equals pair get Issuer  CertificatePair CertificatePair CertificatePair getRoot getIssuer

public int get Result Code return result Code  getResultCode resultCode
public Exception get Verification Exception return result Exception  getVerificationException resultException
public void set Result Code int new Result Code result Code new Result Code  setResultCode newResultCode resultCode newResultCode
public void set Result Exception Exception new Result Exception result Exception new Result Exception  setResultException newResultException resultException newResultException
public int get Verification Code return verification Code  getVerificationCode verificationCode
public void set Verification Code int verification Code this verification Code verification Code  setVerificationCode verificationCode verificationCode verificationCode
public void add Certificates Certificate certs if certificates null certificates new Array List certificates add certs root Certificates null  addCertificates ArrayList rootCertificates
public Certificate Pair get Root Certificates if root Certificates null root Certificates new Certificate Pair 0 List root Certificates List new Array List if certificates null certificates size 0 Iterator iter certificates iterator while iter has Next Certificate certs Certificate iter next if certs null certs length 0 Certificate Pair pair new Certificate Pair pair set Issuer certs 0 for int i 0 i certs length 1 i X509 Certificate x509cert Root X509 Certificate certs i X509 Certificate x509cert Issuer X509 Certificate certs i 1 if x509cert Root get IssuerDN equals x509cert Issuer get SubjectDN pair set Root x509cert Root if root Certificates List contains pair root Certificates List add pair pair new Certificate Pair pair set Issuer x509cert Issuer add the latest one if pair null pair set Root certs certs length 1 if root Certificates List contains pair root Certificates List add pair if root Certificates List size 0 root Certificates new Certificate Pair root Certificates List size root Certificates List to Array root Certificates return root Certificates  CertificatePair getRootCertificates rootCertificates rootCertificates CertificatePair rootCertificatesList ArrayList hasNext CertificatePair CertificatePair setIssuer X509Certificate x509certRoot X509Certificate X509Certificate x509certIssuer X509Certificate x509certRoot getIssuerDN x509certIssuer getSubjectDN setRoot x509certRoot rootCertificatesList rootCertificatesList CertificatePair setIssuer x509certIssuer setRoot rootCertificatesList rootCertificatesList rootCertificatesList rootCertificates CertificatePair rootCertificatesList rootCertificatesList toArray rootCertificates rootCertificates
private Certificate Pair get Found Certificate return found Certificate  CertificatePair getFoundCertificate foundCertificate
public void set Found Certificate Certificate Pair found Certificate this found Certificate found Certificate  setFoundCertificate CertificatePair foundCertificate foundCertificate foundCertificate
private void initialize Certificates X509 Certificate cert Root null X509 Certificate cert Issuer null Certificate Pair trusted Certificate if get Found Certificate null Certificate Pair certs get Root Certificates if certs length 0 return trusted Certificate certs 0 else trusted Certificate get Found Certificate cert Root X509 Certificate trusted Certificate get Root cert Issuer X509 Certificate trusted Certificate get Issuer String Buffer strb new String Buffer strb append issuer String cert Issuer get SubjectDN strb append r n NON NLS 1 strb append Policy bind Jar Verification Result Valid Between date String cert Issuer get Not Before date String cert Issuer get Not After NON NLS 1 strb append check Validity cert Issuer signer Info strb to String if cert Issuer null cert Issuer equals cert Root strb new String Buffer strb append issuer String cert Issuer get IssuerDN strb append r n NON NLS 1 strb append Policy bind Jar Verification Result Valid Between date String cert Root get Not Before date String cert Root get Not After NON NLS 1 strb append check Validity cert Root verifier Info strb to String  initializeCertificates X509Certificate certRoot X509Certificate certIssuer CertificatePair trustedCertificate getFoundCertificate CertificatePair getRootCertificates trustedCertificate trustedCertificate getFoundCertificate certRoot X509Certificate trustedCertificate getRoot certIssuer X509Certificate trustedCertificate getIssuer StringBuffer StringBuffer issuerString certIssuer getSubjectDN JarVerificationResult ValidBetween dateString certIssuer getNotBefore dateString certIssuer getNotAfter checkValidity certIssuer signerInfo toString certIssuer certIssuer certRoot StringBuffer issuerString certIssuer getIssuerDN JarVerificationResult ValidBetween dateString certRoot getNotBefore dateString certRoot getNotAfter checkValidity certRoot verifierInfo toString
private String check Validity X509 Certificate cert try cert check Validity catch Certificate Expired Exception e return r n Policy bind Jar Verification Result Expired Certificate NON NLS 1 NON NLS 2 catch Certificate Not Yet Valid Exception e return r n Policy bind Jar Verification Result Certificate Not Yet Valid NON NLS 1 NON NLS 2 return r n Policy bind Jar Verification Result Certificate Valid NON NLS 1 NON NLS 2  checkValidity X509Certificate checkValidity CertificateExpiredException JarVerificationResult ExpiredCertificate CertificateNotYetValidException JarVerificationResult CertificateNotYetValid JarVerificationResult CertificateValid
private String issuer String Principal principal 19902 try if principal instanceof X500 Name String Buffer buf new String Buffer X500 Name name X500 Name principal buf append name getDN Qualifier null name getDN Qualifier buf append name get Common Name buf append name get Organizational Unit null name get Organizational Unit buf append name get Organization null name get Organization buf append name get Locality null name get Locality buf append name get Country null name get Country return new String buf catch Exception e Update Core warn Error parsing X500 Certificate e return principal to String  issuerString X500Name StringBuffer StringBuffer X500Name X500Name getDNQualifier getDNQualifier getCommonName getOrganizationalUnit getOrganizationalUnit getOrganization getOrganization getLocality getLocality getCountry getCountry UpdateCore toString
private String date String Date date return Date Format get Date Instance format date  dateString DateFormat getDateInstance
public String get Signer Info if signer Info null initialize Certificates return signer Info  getSignerInfo signerInfo initializeCertificates signerInfo
public String get Verifier Info if signer Info null initialize Certificates return verifier Info  getVerifierInfo signerInfo initializeCertificates verifierInfo
public Content Reference get Content Reference return content Reference  ContentReference getContentReference contentReference
public void set Content Reference Content Reference ref this content Reference ref  setContentReference ContentReference contentReference
public I Feature get Feature return feature  IFeature getFeature
public void set Feature I Feature feature this feature feature  setFeature IFeature
public String get Text return null  getText
public boolean is Feature Verification return feature Verification  isFeatureVerification featureVerification
public void is Feature Verification boolean feature Verification this feature Verification feature Verification  isFeatureVerification featureVerification featureVerification featureVerification
public boolean already Seen return already Seen  alreadySeen alreadySeen
public boolean already Seen boolean seen return this already Seen seen  alreadySeen alreadySeen

Default Constructor public Jar Verifier initialize  JarVerifier
private List get Key Stores throws Core Exception if list Of Keystores null list Of Keystores new Array List 0 Key Stores list Of Keystore Handles new Key Stores Input Stream in null Key Store keystore null Keystore Handle handle null while list Of Keystore Handles has Next try handle list Of Keystore Handles next in Update Core get Plugin get handle get Location get Input Stream try keystore Key Store get Instance handle get Type keystore load in null no password catch No Such Algorithm Exception e throw Utilities new Core Exception Policy bind Jar Verifier Unable To Find Encryption handle get Location to External Form e NON NLS 1 catch Certificate Exception e throw Utilities new Core Exception Policy bind Jar Verifier Unable To Load Certificate handle get Location to External Form e NON NLS 1 catch Key Store Exception e throw Utilities new Core Exception Policy bind Jar Verifier Unable To Find Provider For Keystore handle get Type e NON NLS 1 finally if in null try in close catch IO Exception e nothing try loading a key Store keystore was loaded list Of Keystores add keystore catch IO Exception e nothing if the keystore doesn t exist continue while all key stores return list Of Keystores  getKeyStores CoreException listOfKeystores listOfKeystores ArrayList KeyStores listOfKeystoreHandles KeyStores InputStream KeyStore KeystoreHandle listOfKeystoreHandles hasNext listOfKeystoreHandles UpdateCore getPlugin getLocation getInputStream KeyStore getInstance getType NoSuchAlgorithmException newCoreException JarVerifier UnableToFindEncryption getLocation toExternalForm CertificateException newCoreException JarVerifier UnableToLoadCertificate getLocation toExternalForm KeyStoreException newCoreException JarVerifier UnableToFindProviderForKeystore getType IOException keyStore listOfKeystores IOException listOfKeystores
private void initialize result null trusted Certificates null accept Unsigned Files false list Of Keystores null  trustedCertificates acceptUnsignedFiles listOfKeystores
private void init I Feature feature Content Reference content Ref throws Core Exception jar File null if content Ref instanceof Jar Content Reference Jar Content Reference jar Reference Jar Content Reference content Ref try jar File jar Reference as File if Update Core DEBUG Update Core DEBUG SHOW INSTALL Update Core debug Attempting to read JAR file jar File NON NLS 1 of entries if jar File exists throw new IO Exception Jar File jar new Jar File jar File if jar null try jar close catch IO Exception ex unchecked catch Zip Exception e throw Utilities new Core Exception Policy bind Jar Verifier Invalid Jar jar Reference to String e NON NLS 1 catch IO Exception e throw Utilities new Core Exception Policy bind Jar Verifier Unable To Access Jar jar Reference to String e NON NLS 1 result new Jar Verification Result result set Verification Code I Verification Result UNKNOWN ERROR result set Result Exception null result set Feature feature result set Content Reference content Ref  IFeature ContentReference contentRef CoreException jarFile contentRef JarContentReference JarContentReference jarReference JarContentReference contentRef jarFile jarReference asFile UpdateCore UpdateCore DEBUG_SHOW_INSTALL UpdateCore jarFile jarFile IOException JarFile JarFile jarFile IOException ZipException newCoreException JarVerifier InvalidJar jarReference toString IOException newCoreException JarVerifier UnableToAccessJar jarReference toString JarVerificationResult setVerificationCode IVerificationResult UNKNOWN_ERROR setResultException setFeature setContentReference contentRef
private boolean exists In Keystore Certificate cert throws Core Exception try List key Stores get Key Stores if key Stores is Empty Iterator list Of Keystores key Stores iterator while list Of Keystores has Next Key Store keystore Key Store list Of Keystores next if keystore get Certificate Alias cert null return true catch Key Store Exception e throw Utilities new Core Exception Policy bind Jar Verifier Key Store Not Loaded e NON NLS 1 return false  existsInKeystore CoreException keyStores getKeyStores keyStores isEmpty listOfKeystores keyStores listOfKeystores hasNext KeyStore KeyStore listOfKeystores getCertificateAlias KeyStoreException newCoreException JarVerifier KeyStoreNotLoaded
private List read Jar File Jar File jar File String identifier throws IO Exception Interrupted Exception List list new Array List byte buffer new byte 4096 Enumeration entries jar File entries Jar Entry current Entry null Input Stream in null if monitor null monitor set Task Name Policy bind Jar Verifier Verify identifier null jar File get Name identifier NON NLS 1 try while entries has More Elements current Entry Jar Entry entries next Element list add current Entry in jar File get Input Stream current Entry while in read buffer 0 buffer length 1 Security error thrown if tempered if in null in close catch IO Exception e result set Verification Code I Verification Result UNKNOWN ERROR result set Result Exception e return list  readJarFile JarFile jarFile IOException InterruptedException ArrayList jarFile JarEntry currentEntry InputStream setTaskName JarVerifier jarFile getName hasMoreElements currentEntry JarEntry nextElement currentEntry jarFile getInputStream currentEntry IOException setVerificationCode IVerificationResult UNKNOWN_ERROR setResultException
param new Monitor org eclipse core runtime I Progress Monitor public void set Monitor I Progress Monitor new Monitor monitor new Monitor  newMonitor IProgressMonitor setMonitor IProgressMonitor newMonitor newMonitor
public I Verification Result verify I Feature feature Content Reference reference boolean is Feature Verification Install Monitor monitor throws Core Exception if reference null return result if parent knows how to verify ask the parent first if get Parent null I Verification Result vr get Parent verify feature reference is Feature Verification monitor if vr get Verification Code I Verification Result TYPE ENTRY UNRECOGNIZED return vr the parent couldn t verify set Monitor monitor init feature reference result is Feature Verification is Feature Verification if jar File null result verify jar File get Absolute Path reference get Identifier else result set Verification Code I Verification Result TYPE ENTRY UNRECOGNIZED return result  IVerificationResult IFeature ContentReference isFeatureVerification InstallMonitor CoreException getParent IVerificationResult getParent isFeatureVerification getVerificationCode IVerificationResult TYPE_ENTRY_UNRECOGNIZED setMonitor isFeatureVerification isFeatureVerification jarFile jarFile getAbsolutePath getIdentifier setVerificationCode IVerificationResult TYPE_ENTRY_UNRECOGNIZED
private Jar Verification Result verify String file String identifier try verify integrity verify Integrity file identifier do not close input stream as verify Integrity already did it if user already said yes result already Seen already Validated verify source certificate if result get Verification Code I Verification Result TYPE ENTRY SIGNED UNRECOGNIZED verify Authentication save the fact the file is not signed so the user will not be prompted again if result get Verification Code I Verification Result TYPE ENTRY NOT SIGNED accept Unsigned Files true catch Exception e result set Verification Code I Verification Result UNKNOWN ERROR result set Result Exception e if monitor null monitor worked 1 if monitor is Canceled result set Verification Code I Verification Result VERIFICATION CANCELLED return result  JarVerificationResult verifyIntegrity verifyIntegrity alreadySeen alreadyValidated getVerificationCode IVerificationResult TYPE_ENTRY_SIGNED_UNRECOGNIZED verifyAuthentication getVerificationCode IVerificationResult TYPE_ENTRY_NOT_SIGNED acceptUnsignedFiles setVerificationCode IVerificationResult UNKNOWN_ERROR setResultException isCanceled setVerificationCode IVerificationResult VERIFICATION_CANCELLED
private void verify Authentication throws Core Exception Certificate Pair entries result get Root Certificates boolean certificate Found false If all the certificate of an entry are not found in the list of known certifcate the certificate is not trusted by any keystore for int i 0 i entries length i certificate Found exists In Keystore entries i get Root if certificate Found result set Verification Code I Verification Result TYPE ENTRY SIGNED RECOGNIZED result set Found Certificate entries i return  verifyAuthentication CoreException CertificatePair getRootCertificates certificateFound certificateFound existsInKeystore getRoot certificateFound setVerificationCode IVerificationResult TYPE_ENTRY_SIGNED_RECOGNIZED setFoundCertificate
private void verify Integrity String file String identifier Jar File jar File null try If the JAR is signed and not valid a security exception will be thrown while reading it jar File new Jar File file true List files In Jar read Jar File jar File identifier you have to read all the files once before getting the certificates if jar File get Manifest null Iterator iter files In Jar iterator boolean certificate Found false while iter has Next Jar Entry current Jar Entry Jar Entry iter next Certificate certs current Jar Entry get Certificates if certs null certs length 0 certificate Found true result add Certificates certs else String jar Entry Name current Jar Entry get Name if jar Entry Name to Upper Case starts With MANIFEST current Jar Entry is Directory if the jar Entry is not in MANIFEST consider the whole file unsigned break if certificate Found result set Verification Code I Verification Result TYPE ENTRY SIGNED UNRECOGNIZED else result set Verification Code I Verification Result TYPE ENTRY NOT SIGNED else Exception e new Exception Policy bind Jar Verifier Invalid File file NON NLS 1 result set Result Exception e result set Verification Code I Verification Result TYPE ENTRY NOT SIGNED Update Core warn null e catch Security Exception e Jar file is signed but content has changed since signed result set Verification Code I Verification Result TYPE ENTRY CORRUPTED catch Interrupted Exception e result set Verification Code I Verification Result VERIFICATION CANCELLED catch Exception e result set Verification Code I Verification Result UNKNOWN ERROR result set Result Exception e finally if jar File null try jar File close catch IO Exception e  verifyIntegrity JarFile jarFile jarFile JarFile filesInJar readJarFile jarFile jarFile getManifest filesInJar certificateFound hasNext JarEntry currentJarEntry JarEntry currentJarEntry getCertificates certificateFound addCertificates jarEntryName currentJarEntry getName jarEntryName toUpperCase startsWith currentJarEntry isDirectory jarEntry certificateFound setVerificationCode IVerificationResult TYPE_ENTRY_SIGNED_UNRECOGNIZED setVerificationCode IVerificationResult TYPE_ENTRY_NOT_SIGNED JarVerifier InvalidFile setResultException setVerificationCode IVerificationResult TYPE_ENTRY_NOT_SIGNED UpdateCore SecurityException setVerificationCode IVerificationResult TYPE_ENTRY_CORRUPTED InterruptedException setVerificationCode IVerificationResult VERIFICATION_CANCELLED setVerificationCode IVerificationResult UNKNOWN_ERROR setResultException jarFile jarFile IOException
private boolean already Validated if result get Verification Code I Verification Result TYPE ENTRY NOT SIGNED return accept Unsigned Files if get Trusted Certificates null Iterator iter get Trusted Certificates iterator Certificate Pair jar Pairs result get Root Certificates check if this is not a user accepted certificate for this feature while iter has Next Certificate Pair trusted Certificate Certificate Pair iter next for int i 0 i jar Pairs length i if trusted Certificate equals jar Pairs i return true if certificate pair not found in trusted add it for next time for int i 0 i jar Pairs length i add Trusted Certificate jar Pairs i return false  alreadyValidated getVerificationCode IVerificationResult TYPE_ENTRY_NOT_SIGNED acceptUnsignedFiles getTrustedCertificates getTrustedCertificates CertificatePair jarPairs getRootCertificates hasNext CertificatePair trustedCertificate CertificatePair jarPairs trustedCertificate jarPairs jarPairs addTrustedCertificate jarPairs
private void add Trusted Certificate Certificate Pair pair if trusted Certificates null trusted Certificates new Array List if pair null trusted Certificates add pair  addTrustedCertificate CertificatePair trustedCertificates trustedCertificates ArrayList trustedCertificates
private List get Trusted Certificates if trusted Certificates null trusted Certificates new Array List return trusted Certificates  getTrustedCertificates trustedCertificates trustedCertificates ArrayList trustedCertificates
see I Verifier set Parent I Verifier public void set Parent I Verifier parent Verifier super set Parent parent Verifier initialize  IVerifier setParent IVerifier setParent IVerifier parentVerifier setParent parentVerifier

private String type public Keystore Handle URL url String type this location url this type type  KeystoreHandle
Gets the location return Returns a URL public URL get Location return location  getLocation
Sets the location param location The location to set public void set Location URL location this location location  setLocation
Gets the type return Returns a String public String get Type return type  getType
Sets the type param type The type to set public void set Type String type this type type  setType

private Iterator iterator Key Stores constructor comment public Key Stores super initialize Default Key Stores  KeyStores KeyStores initializeDefaultKeyStores
private Iterator get Iterator if iterator null iterator list Of Key Stores iterator return iterator  getIterator listOfKeyStores
returns trus if there is more Keystores in the list public boolean has Next return get Iterator has Next  hasNext getIterator hasNext
populate the list of Keystores should be done with Dialog with Cancel Skip button if the connection to the URL is down private void initialize Default Key Stores list Of Key Stores new Array List 5 get JRE cacerts try URL url new URL file null 0 System get Property java home File separator lib File separator security File separator cacerts NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 list Of Key Stores add new Keystore Handle url Security get Property DEFAULT KEYSTORE TYPE catch MalformedURL Exception e should not happen hardcoded get java home keystore try URL url new URL file null 0 System get Property user home File separator keystore NON NLS 1 NON NLS 2 NON NLS 3 list Of Key Stores add new Keystore Handle url Security get Property DEFAULT KEYSTORE TYPE catch MalformedURL Exception e should not happen hardcoded get Key Stores from policy files int index 1 String java policy Security get Property JAVA POLICY URL index while java policy null retrieve keystore url from java policy also retrieve keystore type Keystore Handle keystore get Keystore From Location java policy if keystore null list Of Key Stores add keystore index java policy Security get Property JAVA POLICY URL index  initializeDefaultKeyStores listOfKeyStores ArrayList getProperty listOfKeyStores KeystoreHandle getProperty DEFAULT_KEYSTORE_TYPE MalformedURLException getProperty listOfKeyStores KeystoreHandle getProperty DEFAULT_KEYSTORE_TYPE MalformedURLException KeyStores java_policy getProperty JAVA_POLICY_URL java_policy KeystoreHandle getKeystoreFromLocation java_policy listOfKeyStores java_policy getProperty JAVA_POLICY_URL
returns the URL for the Next Keystore Handle public Keystore Handle next return Keystore Handle get Iterator next  KeystoreHandle KeystoreHandle KeystoreHandle getIterator
retrieve the keystore from java policy file private Keystore Handle get Keystore From Location String location Input Stream in null char buff new char 4096 int index Of location index Of NON NLS 1 int index Of Curly location index Of index Of if index Of 1 index Of Curly 1 String prop System get Property location substring index Of 2 index Of Curly String location2 location substring 0 index Of location2 prop location2 location substring index Of Curly 1 location location2 try URL url new URL location in Update Core get Plugin get url get Input Stream Reader reader new Input Stream Reader in int result reader read buff String Buffer content Buff new String Buffer while result 1 content Buff append buff 0 result result reader read buff if content Buff length 0 String content new String content Buff int index Of Keystore content index Of keystore NON NLS 1 if index Of Keystore 1 int index Of Semi Column content index Of index Of Keystore return get Keystore From String content substring index Of Keystore index Of Semi Column url catch MalformedURL Exception e log e catch IO Exception e url open Stream reader read x2 only log the keystore may not exist log e finally if in null try in close catch IO Exception e return null  KeystoreHandle getKeystoreFromLocation InputStream indexOf indexOf indexOfCurly indexOf indexOf indexOf indexOfCurly getProperty indexOf indexOfCurly indexOf indexOfCurly UpdateCore getPlugin getInputStream InputStreamReader StringBuffer contentBuff StringBuffer contentBuff contentBuff contentBuff indexOfKeystore indexOf indexOfKeystore indexOfSemiColumn indexOf indexOfKeystore getKeystoreFromString indexOfKeystore indexOfSemiColumn MalformedURLException IOException openStream IOException
retrieve the keystore from java policy file private Keystore Handle get Keystore From String String content URL rootURL Keystore Handle handle null String key Store Type Security get Property DEFAULT KEYSTORE TYPE int index Of Space content index Of if index Of Space 1 return null int second Space content last Index Of if second Space 1 second Space content length else key Store Type content substring second Space 1 content length trim URL url null try url new URL content substring index Of Space second Space catch MalformedURL Exception e log e the url maybe relative try url new URL rootURL content substring index Of Space second Space catch MalformedURL Exception e1 log e1 if url null handle new Keystore Handle url key Store Type return handle  KeystoreHandle getKeystoreFromString KeystoreHandle keyStoreType getProperty DEFAULT_KEYSTORE_TYPE indexOfSpace indexOf indexOfSpace secondSpace lastIndexOf secondSpace secondSpace keyStoreType secondSpace indexOfSpace secondSpace MalformedURLException indexOfSpace secondSpace MalformedURLException KeystoreHandle keyStoreType
private void log Exception e Update Core warn Cannot retrieve a Key Store e NON NLS 1  UpdateCore KeyStore

public class Add Bookmarks Action extends Action public Add Bookmarks Action set Text UpdateUI get String Add Bookmarks Action add NON NLS 1  AddBookmarksAction AddBookmarksAction setText getString AddBookmarksAction
public void run New Web Site Dialog dialog new New Web Site Dialog UpdateUI get Active Workbench Shell dialog create dialog get Shell set Text UpdateUI get String Add Bookmarks Action new NON NLS 1 if dialog open New Web Site Dialog OK UpdateUI get Default get Update Model save Bookmarks  NewWebSiteDialog NewWebSiteDialog getActiveWorkbenchShell getShell setText getString AddBookmarksAction NewWebSiteDialog getDefault getUpdateModel saveBookmarks

private I Action handler public Global Action  IAction GlobalAction
public void set Action Handler I Action action if handler null handler remove Property Change Listener this handler null if action null this handler action action add Property Change Listener this if handler null set Enabled handler is Enabled set Checked handler is Checked  setActionHandler IAction removePropertyChangeListener addPropertyChangeListener setEnabled isEnabled setChecked isChecked
public void property Change Property Change Event event if event get Property equals Action ENABLED Boolean bool Boolean event get New Value set Enabled bool boolean Value else if event get Property equals Action CHECKED Boolean bool Boolean event get New Value set Checked bool boolean Value  propertyChange PropertyChangeEvent getProperty getNewValue setEnabled booleanValue getProperty getNewValue setChecked booleanValue
public void run if handler null handler run 
param parent Shell public Configuration Manager Window Shell parent Shell super parent Shell set Shell Style get Shell Style SWT APPLICATION MODAL Setup window add Menu Bar add Actions add Tool Bar SWT FLAT add Status Line  parentShell ConfigurationManagerWindow parentShell parentShell setShellStyle getShellStyle APPLICATION_MODAL addMenuBar addActions addToolBar addStatusLine
Action close Action new Action public void run close  closeAction
private void add Actions I Menu Manager menu Bar get Menu Bar Manager I Menu Manager file Menu new Menu Manager UpdateUI get String Configuration Manager Window file Menu NON NLS 1 menu Bar add file Menu properties Action new Global Action properties Action set Text UpdateUI get String Configuration Manager Window properties NON NLS 1 properties Action set Enabled false file Menu add properties Action file Menu add new Separator Action close Action new Action public void run close close Action set Text UpdateUI get String Configuration Manager Window close NON NLS 1 file Menu add close Action  addActions IMenuManager menuBar getMenuBarManager IMenuManager fileMenu MenuManager getString ConfigurationManagerWindow fileMenu menuBar fileMenu propertiesAction GlobalAction propertiesAction setText getString ConfigurationManagerWindow propertiesAction setEnabled fileMenu propertiesAction fileMenu closeAction closeAction setText getString ConfigurationManagerWindow fileMenu closeAction
private void hook Global Actions if properties Action Handler null properties Action set Action Handler properties Action Handler  hookGlobalActions propertiesActionHandler propertiesAction setActionHandler propertiesActionHandler
protected Control create Contents Composite parent view new Configuration View this Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout margin Width layout margin Height 0 layout vertical Spacing 0 container set Layout layout Grid Data gd Label separator new Label container SWT SEPARATOR SWT HORIZONTAL gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd height Hint 1 separator set Layout Data gd view create Part Control container Control view Control view get Control gd new Grid Data Grid Data FILL BOTH view Control set Layout Data gd hook Global Actions update Action Bars try I Local Site local Site Site Manager get Local Site view get Tree Viewer set Selection new Structured Selection local Site catch Core Exception e Update Label Provider provider UpdateUI get Default get Label Provider get Shell set Image provider get UpdateUI Images DESC CONFIGS VIEW 0 return container  createContents ConfigurationView GridLayout GridLayout marginWidth marginHeight verticalSpacing setLayout GridData GridData GridData HORIZONTAL_ALIGN_FILL heightHint setLayoutData createPartControl viewControl getControl GridData GridData FILL_BOTH viewControl setLayoutData hookGlobalActions updateActionBars ILocalSite localSite SiteManager getLocalSite getTreeViewer setSelection StructuredSelection localSite CoreException UpdateLabelProvider getDefault getLabelProvider getShell setImage UpdateUIImages DESC_CONFIGS_VIEW
private void update Action Bars get Menu Bar Manager update All false get Tool Bar Manager update false get Status Line Manager update false  updateActionBars getMenuBarManager updateAll getToolBarManager getStatusLineManager
public boolean close if view null view dispose return super close 
public void create super create set the title get Shell set Text UpdateUI get String Configuration Manager Action title NON NLS 1 get Shell set Size 800 600  getShell setText getString ConfigurationManagerAction getShell setSize
public int open update action bars update Action Bars return super open  updateActionBars
public void set Properties Action Handler I Action handler properties Action Handler handler  setPropertiesActionHandler IAction propertiesActionHandler

public class Bookmark Folder extends Named Model Object protected Array List children new Array List public Bookmark Folder  BookmarkFolder NamedModelObject ArrayList ArrayList BookmarkFolder
public Bookmark Folder String name super name  BookmarkFolder
public Object get Children Object parent return children to Array  getChildren toArray
public boolean has Children return children size 0  hasChildren
public void add Child Named Model Object object internal Add object notify Objects Added this new Object object  addChild NamedModelObject internalAdd notifyObjectsAdded
public void add Children Named Model Object objects for int i 0 i objects length i internal Add objects i notify Objects Added this objects  addChildren NamedModelObject internalAdd notifyObjectsAdded
protected void internal Add Named Model Object child children add child child set Model get Model child set Parent this  internalAdd NamedModelObject setModel getModel setParent
public void remove Children Named Model Object objects for int i 0 i objects length i children remove objects i objects i set Parent null notify Objects Removed this objects  removeChildren NamedModelObject setParent notifyObjectsRemoved

public static void parse String file Name Vector bookmarks File file new File file Name if file exists return try document Builder Factory set Namespace Aware true Document Builder parser document Builder Factory new Document Builder Document doc parser parse file Name Node root doc get Document Element process Root root bookmarks catch Parser Configuration Exception e UpdateUI log Exception e catch SAX Exception e UpdateUI log Exception e catch IO Exception e UpdateUI log Exception e  fileName fileName documentBuilderFactory setNamespaceAware DocumentBuilder documentBuilderFactory newDocumentBuilder fileName getDocumentElement processRoot ParserConfigurationException logException SAXException logException IOException logException
public static Site Bookmark get Bookmarks Vector bookmarks Array List result new Array List for int i 0 i bookmarks size i process Entry bookmarks get i result return Site Bookmark result to Array new Site Bookmark result size  SiteBookmark getBookmarks ArrayList ArrayList processEntry SiteBookmark toArray SiteBookmark
public static Bookmark Folder get Folder Vector bookmarks I Path path Named Model Object object find bookmarks path if object null object instanceof Bookmark Folder return Bookmark Folder object return null  BookmarkFolder getFolder IPath NamedModelObject BookmarkFolder BookmarkFolder
public static Named Model Object find Vector bookmarks I Path path Object array bookmarks to Array return find array path  NamedModelObject IPath toArray
private static Named Model Object find Object array I Path path String name path segment 0 for int i 0 i array length i Named Model Object obj Named Model Object array i if obj get Name equals name if obj instanceof Bookmark Folder if path segment Count 1 I Path child Path path remove First Segments 1 Bookmark Folder folder Bookmark Folder obj return find folder get Children null child Path return obj return null  NamedModelObject IPath NamedModelObject NamedModelObject getName BookmarkFolder segmentCount IPath childPath removeFirstSegments BookmarkFolder BookmarkFolder getChildren childPath
private static void process Root Node root Vector bookmarks if root get Node Name equals bookmarks NON NLS 1 Node List children root get Child Nodes process Children children null bookmarks  processRoot getNodeName NodeList getChildNodes processChildren
private static void process Children Node List children Bookmark Folder folder Vector bookmarks Update Model model UpdateUI get Default get Update Model for int i 0 i children get Length i Node child children item i Named Model Object object null if child get Node Type Node ELEMENT NODE if child get Node Name equals site NON NLS 1 object create Site child else if child get Node Name equals folder NON NLS 1 object create Folder child if object null if folder null folder add Child object else bookmarks add object object set Model model  processChildren NodeList BookmarkFolder UpdateModel getDefault getUpdateModel getLength NamedModelObject getNodeType ELEMENT_NODE getNodeName createSite getNodeName createFolder addChild setModel
private static Site Bookmark create Site Node child String name get Attribute child name NON NLS 1 URL url null try url new URL get Attribute child url NON NLS 1 catch MalformedURL Exception e String web get Attribute child web NON NLS 1 boolean web Bookmark web null web equals true NON NLS 1 String sel get Attribute child selected NON NLS 1 boolean selected sel null sel equals true NON NLS 1 Site Bookmark bookmark new Site Bookmark name url web Bookmark selected String local get Attribute child local NON NLS 1 bookmark set Local local null local equals true NON NLS 1 String ign get Attribute child ignored categories NON NLS 1 if ign null String Tokenizer stok new String Tokenizer ign NON NLS 1 Array List array new Array List while stok has More Tokens String tok stok next Token array add tok bookmark set Ignored Categories String array to Array new String array size return bookmark  SiteBookmark createSite getAttribute getAttribute MalformedURLException getAttribute webBookmark getAttribute SiteBookmark SiteBookmark webBookmark getAttribute setLocal getAttribute StringTokenizer StringTokenizer ArrayList ArrayList hasMoreTokens nextToken setIgnoredCategories toArray
private static Bookmark Folder create Folder Node child Bookmark Folder folder new Bookmark Folder String name get Attribute child name NON NLS 1 folder set Name name if child has Child Nodes Node List children child get Child Nodes process Children children folder null return folder  BookmarkFolder createFolder BookmarkFolder BookmarkFolder getAttribute setName hasChildNodes NodeList getChildNodes processChildren
public static void store String file Name Vector bookmarks File Output Stream fos null Output Stream Writer osw null Print Writer writer null try fos new File Output Stream file Name osw new Output Stream Writer fos UTF8 NON NLS 1 writer new Print Writer osw writer println xml version 1 0 encoding UTF 8 NON NLS 1 writer println bookmarks NON NLS 1 for int i 0 i bookmarks size i Object obj bookmarks get i write Object obj writer NON NLS 1 writer println bookmarks NON NLS 1 writer flush writer close catch IO Exception e finally try if osw null osw close catch IO Exception e1 try if fos null fos close catch IO Exception e2  fileName FileOutputStream OutputStreamWriter PrintWriter FileOutputStream fileName OutputStreamWriter PrintWriter writeObject IOException IOException IOException
private static void write Object String indent Object obj Print Writer writer if obj instanceof Site Bookmark Site Bookmark bookmark Site Bookmark obj String name bookmark get Name String url bookmark getURL to String String web bookmark is Web Bookmark true false NON NLS 1 NON NLS 2 String sel bookmark is Selected true false NON NLS 1 NON NLS 2 String local bookmark is Local true false NON NLS 1 NON NLS 2 String ign bookmark get Ignored Categories String Buffer wign new String Buffer for int i 0 i ign length i if i 0 wign append wign append ign i writer print indent site name name url url web web selected sel local local NON NLS 1 NON NLS 2 NON NLS 3 NON NLS 4 NON NLS 5 NON NLS 6 if wign length 0 writer print ignored categories wign to String NON NLS 1 NON NLS 2 writer println NON NLS 1 else if obj instanceof Bookmark Folder Bookmark Folder folder Bookmark Folder obj String name folder get Name writer println indent folder name name NON NLS 1 NON NLS 2 Object children folder get Children folder String indent2 indent NON NLS 1 for int i 0 i children length i write Object indent2 children i writer writer println indent folder NON NLS 1  writeObject PrintWriter SiteBookmark SiteBookmark SiteBookmark getName toString isWebBookmark isSelected isLocal getIgnoredCategories StringBuffer StringBuffer toString BookmarkFolder BookmarkFolder BookmarkFolder getName getChildren writeObject
private static String get Attribute Node node String name Named Node Map atts node get Attributes Node att atts get Named Item name if att null return att get Node Value return NON NLS 1  getAttribute NamedNodeMap getAttributes getNamedItem getNodeValue
private static void process Folder Bookmark Folder folder Array List result Object children folder get Children folder for int i 0 i children length i process Entry children i result  processFolder BookmarkFolder ArrayList getChildren processEntry
private static void process Entry Object obj Array List result if obj instanceof Site Bookmark result add obj else if obj instanceof Bookmark Folder process Folder Bookmark Folder obj result  processEntry ArrayList SiteBookmark BookmarkFolder processFolder BookmarkFolder

import org eclipse update configuration import org eclipse update core version 1 0 author 
public class Configured Feature Adapter extends Simple Feature Adapter implements I Configured Feature Adapter private I Configured Site Adapter adapter private boolean configured private boolean updated  ConfiguredFeatureAdapter SimpleFeatureAdapter IConfiguredFeatureAdapter IConfiguredSiteAdapter
public Configured Feature Adapter I Configured Site Adapter adapter  ConfiguredFeatureAdapter IConfiguredSiteAdapter
I Configured Site Adapter adapter I Feature feature boolean configured  IConfiguredSiteAdapter IFeature
boolean configured boolean updated 
boolean optional super feature optional 
this adapter adapter this configured configured this updated updated public boolean equals Object object if object null return false if object this return true if object instanceof Configured Feature Adapter try Configured Feature Adapter ad Configured Feature Adapter object return ad get Configured Site equals get Configured Site ad get Feature null equals get Feature null catch Core Exception e return false public I Configured Site get Configured Site return adapter get Configured Site  ConfiguredFeatureAdapter ConfiguredFeatureAdapter ConfiguredFeatureAdapter getConfiguredSite getConfiguredSite getFeature getFeature CoreException IConfiguredSite getConfiguredSite getConfiguredSite

private I Configured Site csite public Configured Site Adapter I Install Configuration config I Configured Site csite this csite csite this config config  IConfiguredSite ConfiguredSiteAdapter IInstallConfiguration IConfiguredSite
public I Configured Site get Configured Site return csite  IConfiguredSite getConfiguredSite
public I Install Configuration get Install Configuration return config  IInstallConfiguration getInstallConfiguration
public boolean equals Object object if object null return false if object this return true if object instanceof Configured Site Adapter Configured Site Adapter adapter Configured Site Adapter object return csite null csite get Site equals adapter get Configured Site get Site return false  ConfiguredSiteAdapter ConfiguredSiteAdapter ConfiguredSiteAdapter getSite getConfiguredSite getSite
public String to String return get Configured Site get Site getURL to String  toString getConfiguredSite getSite toString

public class Discovery Folder extends Bookmark Folder public Discovery Folder super UpdateUI get String Discovery Folder name NON NLS 1 set Model UpdateUI get Default get Update Model  DiscoveryFolder BookmarkFolder DiscoveryFolder getString DiscoveryFolder setModel getDefault getUpdateModel
public void initialize children clear try I Local Site site Site Manager get Local Site I Install Configuration config site get Current Configuration I Configured Site csites config get Configured Sites for int i 0 i csites length i I Configured Site csite csites i I Feature Reference refs csite get Configured Features for int j 0 j refs length j I Feature Reference ref refs j I Feature feature ref get Feature null IURL Entry entries feature get Discovery Site Entries if entries length 0 Only add discovery sites if of root features if is Included ref refs add Bookmarks entries catch Core Exception e UpdateUI log Exception e  ILocalSite SiteManager getLocalSite IInstallConfiguration getCurrentConfiguration IConfiguredSite getConfiguredSites IConfiguredSite IFeatureReference getConfiguredFeatures IFeatureReference IFeature getFeature IURLEntry getDiscoverySiteEntries isIncluded addBookmarks CoreException logException
private boolean is Included I Feature Reference ref I Feature Reference refs try Versioned Identifier vid ref get Versioned Identifier for int i 0 i refs length i I Feature Reference candidate refs i Ignore self if candidate equals ref continue I Feature cfeature candidate get Feature null I Feature Reference irefs cfeature get Included Feature References for int j 0 j irefs length j I Feature Reference iref irefs j Versioned Identifier ivid iref get Versioned Identifier if ivid equals vid bingo included in at least one feature return true catch Core Exception e return false  isIncluded IFeatureReference IFeatureReference VersionedIdentifier getVersionedIdentifier IFeatureReference IFeature getFeature IFeatureReference getIncludedFeatureReferences IFeatureReference VersionedIdentifier getVersionedIdentifier CoreException
private void add Bookmarks IURL Entry entries for int i 0 i entries length i IURL Entry entry entries i Site Bookmark bookmark new Site Bookmark entry get Annotation entry getURL entry get Type IURL Entry WEB SITE bookmark set Read Only entry get Type IURL Entry WEB SITE if contains bookmark internal Add bookmark  addBookmarks IURLEntry IURLEntry SiteBookmark SiteBookmark getAnnotation getType IURLEntry WEB_SITE setReadOnly getType IURLEntry WEB_SITE internalAdd
private boolean contains Site Bookmark bookmark for int i 0 i children size i Object o children get i if o instanceof Site Bookmark note match on URL not the label if bookmark getURL equals Site Bookmark o getURL return true return false  SiteBookmark SiteBookmark SiteBookmark
public Object get Children Object parent if has Children false initialize return super get Children parent  getChildren hasChildren getChildren

import org eclipse update configuration import org eclipse update core 
import org eclipse update internal ui UpdateUI 
version 1 0 
author public abstract class Feature Adapter extends UI Model Object implements I Feature Adapter private boolean included false  FeatureAdapter UIModelObject IFeatureAdapter
see I Feature Adapter get Install Configuration public I Install Configuration get Install Configuration  IFeatureAdapter getInstallConfiguration IInstallConfiguration getInstallConfiguration

import java lang reflect import java net 
import org eclipse core runtime import org eclipse jface operation 
import org eclipse jface operation import org eclipse update core import org eclipse update internal ui 
import org eclipse update internal ui public class Feature Reference Adapter extends Feature Adapter  FeatureReferenceAdapter FeatureAdapter
public class Feature Reference Adapter extends Feature Adapter private I Feature Reference feature Ref private boolean touched  FeatureReferenceAdapter FeatureAdapter IFeatureReference featureRef
private boolean touched public Feature Reference Adapter I Feature Reference feature Ref  FeatureReferenceAdapter IFeatureReference featureRef
public String get Fast Label return feature Ref getURL to String public I Site get Site  getFastLabel featureRef toString ISite getSite
this feature Ref feature Ref set Included feature Ref instanceof I Included Feature Reference public I Feature get Feature I Progress Monitor monitor throws Core Exception return feature Ref get Feature monitor public String get Fast Label return feature Ref getURL to String public I Site get Site return feature Ref get Site public URL getURL return feature Ref getURL  featureRef featureRef setIncluded featureRef IIncludedFeatureReference IFeature getFeature IProgressMonitor CoreException featureRef getFeature getFastLabel featureRef toString ISite getSite featureRef getSite featureRef
public boolean is Optional return feature Ref instanceof I Included Feature Reference I Included Feature Reference feature Ref is Optional false public void touch Included Features I Runnable Context context  isOptional featureRef IIncludedFeatureReference IIncludedFeatureReference featureRef isOptional touchIncludedFeatures IRunnableContext
if touched return final I Feature Reference included  IFeatureReference

IBM Corporation initial API and implementation 

public interface I Configured Site Context public I Install Configuration get Install Configuration  IConfiguredSiteContext IInstallConfiguration getInstallConfiguration
public interface I Configured Site Context public I Install Configuration get Install Configuration public I Configured Site get Configured Site  IConfiguredSiteContext IInstallConfiguration getInstallConfiguration IConfiguredSite getConfiguredSite

package org eclipse update internal ui model 
C eclipse source Build src Included 3 0 plugins org eclipse update ui src org eclipse update internal ui model I Feature Adapter java sourceBuild srcIncluded IFeatureAdapter
import java net 
import java net 
import java net 
C eclipse source Build src Included 3 0 plugins org eclipse update ui src org eclipse update internal ui model I Feature Adapter java sourceBuild srcIncluded IFeatureAdapter
import org eclipse core runtime 
import org eclipse core runtime 

package org eclipse update internal ui model 
package org eclipse update internal ui model 

import org eclipse core runtime import org eclipse update core import org eclipse update core model 
import org eclipse update core model import org eclipse update internal ui 
import org eclipse update internal ui public class Missing Feature implements I Feature  MissingFeature IFeature
public class Missing Feature implements I Feature  MissingFeature IFeature
import org eclipse core runtime import org eclipse update core import org eclipse update core model import org eclipse update internal ui public class Missing Feature implements I Feature private URL url  MissingFeature IFeature
private URL url private I Site site private I Feature Reference reference  ISite IFeatureReference
public Missing Feature I Site site URL url this site site  MissingFeature ISite
this site site this url url desc new IURL Entry  IURLEntry
desc new IURL Entry public URL getURL  IURLEntry
public URL getURL return null 
private I Feature parent private IURL Entry desc private Versioned Identifier id new Versioned Identifier UpdateUI get String Missing Feature id 0 0 0 NON NLS 1 NON NLS 2 public Missing Feature I Site site URL url this site site this url url desc new IURL Entry public URL getURL return null public String get Annotation  IFeature IURLEntry VersionedIdentifier VersionedIdentifier getString MissingFeature MissingFeature ISite IURLEntry getAnnotation
return UpdateUI get String Missing Feature desc unknown NON NLS 1 public Object get Adapter Class key  getString MissingFeature getAdapter
return null 
public int get Type return IURL Entry UPDATE SITE  getType IURLEntry UPDATE_SITE
this null ref public Missing Feature I Feature parent I Feature Reference ref  MissingFeature IFeature IFeatureReference
this parent parent 
public URL getURL return null public String get Annotation  getAnnotation
public Object get Adapter Class key return null  getAdapter
public int get Type return IURL Entry UPDATE SITE  getType IURLEntry UPDATE_SITE
public boolean is Optional return reference null reference instanceof I Included Feature Reference  isOptional IIncludedFeatureReference
return parent 
Versioned Identifier vid get Versioned Identifier if vid null  VersionedIdentifier getVersionedIdentifier
String key vid get Identifier return UpdateUI get OriginatingURL key  getIdentifier getOriginatingURL
see I Feature get Identifier  IFeature getIdentifier
public Versioned Identifier get Versioned Identifier if reference null try  VersionedIdentifier getVersionedIdentifier
catch Core Exception e  CoreException
return id 
see I Feature get Site  IFeature getSite
return site 
see I Feature get Label  IFeature getLabel
if reference null reference instanceof I Included Feature Reference  IIncludedFeatureReference
if name null return name 
see I Feature getURL public URL getURL  IFeature
see I Feature get Update Info public IURL Entry get Update Site Entry  IFeature getUpdateInfo IURLEntry getUpdateSiteEntry
see I Feature get Discovery Infos public IURL Entry get Discovery Site Entries  IFeature getDiscoveryInfos IURLEntry getDiscoverySiteEntries
see I Feature get Provider  IFeature getProvider
return UpdateUI get String Missing Feature provider NON NLS 1  getString MissingFeature
see I Feature get Description  IFeature getDescription
return desc 
see I Feature get Copyright  IFeature getCopyright
public IURL Entry get Copyright return null  IURLEntry getCopyright
see I Feature get License  IFeature getLicense
return null 
see I Feature getOS public String getOS return null  IFeature
see I Feature getWS public String getWS  IFeature
see I Feature getNL  IFeature
return null 
see I Feature get Arch  IFeature getArch
return null 
see I Feature get Image  IFeature getImage
public URL get Image return null  getImage
see I Feature get Imports  IFeature getImports
public I Import get Imports return null  IImport getImports
see I Feature get Archives  IFeature getArchives
public String get Archives return null  getArchives
see I Feature get Data Entries  IFeature getDataEntries
public I Non Plugin Entry get Non Plugin Entries return null  INonPluginEntry getNonPluginEntries

public static final String P NAME p name NON NLS 1 public Named Model Object  P_NAME p_name NamedModelObject
public Named Model Object String name this name name  NamedModelObject
public Object get Adapter Class adapter if adapter equals I Workbench Adapter class return this return super get Adapter adapter  getAdapter IWorkbenchAdapter getAdapter
public String get Name return name  getName
public I Path get Path Object parent get Parent null if parent null parent instanceof Named Model Object return Named Model Object parent get Path append get Name else return new Path get Name  IPath getPath getParent NamedModelObject NamedModelObject getPath getName getName
public String to String return get Name  toString getName
public void set Name String name this name name notify Object Changed P NAME  setName notifyObjectChanged P_NAME
see I Workbench Adapter get Children Object public Object get Children Object parent return null  IWorkbenchAdapter getChildren getChildren
see I Workbench Adapter get Image Descriptor Object public Image Descriptor get Image Descriptor Object obj return null  IWorkbenchAdapter getImageDescriptor ImageDescriptor getImageDescriptor
see I Workbench Adapter get Label Object public String get Label Object obj return get Name  IWorkbenchAdapter getLabel getLabel getName
see I Workbench Adapter get Parent Object public Object get Parent Object arg0 return parent  IWorkbenchAdapter getParent getParent
return parent public void set Parent Named Model Object parent this parent parent  setParent NamedModelObject

import java net 
import org eclipse core runtime import org eclipse update core 
import org eclipse update core 
version 1 0 author 
author public class Simple Feature Adapter extends Feature Adapter  SimpleFeatureAdapter FeatureAdapter
public class Simple Feature Adapter extends Feature Adapter protected I Feature feature private boolean optional  SimpleFeatureAdapter FeatureAdapter IFeature
public Simple Feature Adapter I Feature feature this feature false public Simple Feature Adapter I Feature feature boolean optional this feature feature this optional optional  SimpleFeatureAdapter IFeature SimpleFeatureAdapter IFeature
public I Feature get Feature I Progress Monitor monitor throws Core Exception  IFeature getFeature IProgressMonitor CoreException

import org eclipse update internal ui 
public class Site Bookmark extends Named Model Object implements I Site Adapter  SiteBookmark NamedModelObject ISiteAdapter
public static final String P URL p url NON NLS 1 public static final String P TYPE p type NON NLS 1  P_URL p_url P_TYPE p_type
private URL url transient private I Site site  ISite
transient private Vector catalog transient private Site Category other Category  SiteCategory otherCategory
private boolean web Bookmark private boolean selected  webBookmark
private String ignored Categories new String 0 private boolean read Only false  ignoredCategories readOnly
private boolean local false private boolean unavailable false 
public Site Bookmark  SiteBookmark
public Site Bookmark String name URL url boolean web Bookmark  SiteBookmark webBookmark
public Site Bookmark String name URL url boolean web Bookmark boolean selected super name this url url  SiteBookmark webBookmark
this web Bookmark web Bookmark this selected selected public void set Selected boolean selected  webBookmark webBookmark setSelected
this selected selected 
public boolean is Selected return selected  isSelected
public String get Ignored Categories return ignored Categories public void set Ignored Categories String categories this ignored Categories categories  getIgnoredCategories ignoredCategories setIgnoredCategories ignoredCategories
public void set Web Bookmark boolean value  setWebBookmark
if is Local return this web Bookmark value  isLocal webBookmark
notify Object Changed P TYPE public boolean is Web Bookmark return web Bookmark public URL getURL return url public void setURL URL url  notifyObjectChanged P_TYPE isWebBookmark webBookmark
site null notify Object Changed P URL public I Site get Site I Progress Monitor monitor return get Site true monitor  notifyObjectChanged P_URL ISite getSite IProgressMonitor getSite
public I Site get Site boolean show Dialog If Failed I Progress Monitor monitor if site null try connect monitor catch Core Exception e UpdateUI log Exception e show Dialog If Failed  ISite getSite showDialogIfFailed IProgressMonitor CoreException logException showDialogIfFailed
return site public boolean is Site Connected return site null  isSiteConnected
public void connect I Progress Monitor monitor throws Core Exception connect true monitor public void connect boolean use Cache I Progress Monitor monitor throws Core Exception try if monitor null monitor new Null Progress Monitor monitor begin Task 2 NON NLS 1  IProgressMonitor CoreException useCache IProgressMonitor CoreException NullProgressMonitor beginTask
monitor sub Task UpdateUI get Formatted Message Site Bookmark connecting url to String NON NLS 1 site Site Manager get Site url use Cache new Sub Progress Monitor monitor 1 if site null  subTask getFormattedMessage SiteBookmark toString SiteManager getSite useCache SubProgressMonitor
create Catalog new Sub Progress Monitor monitor 1 unavailable false else  createCatalog SubProgressMonitor
else catalog new Vector unavailable true 
unavailable true catch Core Exception e  CoreException
catch Core Exception e unavailable true throw e  CoreException

import org eclipse jface operation import org eclipse update core import org eclipse update internal ui 
import org eclipse update internal ui 
public class Site Category extends UI Model Object  SiteCategory UIModelObject
Vector children 
import org eclipse jface operation import org eclipse update core import org eclipse update internal ui public class Site Category extends UI Model Object Vector children private I Category category  SiteCategory UIModelObject ICategory
private I Category category private String name private boolean touched  ICategory
private boolean touched private int feature Count  featureCount
private int feature Count private boolean canceled private Site Bookmark bookmark  featureCount SiteBookmark
private Site Bookmark bookmark  SiteBookmark
IURL Entry entry public Other Category entry new IURL Entry public String get Annotation return UpdateUI get String Site Category other description NON NLS 1  IURLEntry OtherCategory IURLEntry getAnnotation getString SiteCategory
public URL getURL return null 
return null public Object get Adapter Class clazz  getAdapter
public Object get Adapter Class clazz return null  getAdapter
public int get Type return IURL Entry UPDATE SITE  getType IURLEntry UPDATE_SITE
return IURL Entry UPDATE SITE  IURLEntry UPDATE_SITE
public String get Name return Site Category this get Name  getName SiteCategory getName
public String get Label  getLabel
return Site Category this get Name public IURL Entry get Description  SiteCategory getName IURLEntry getDescription
return null public Site Category Site Bookmark bookmark String name I Category category this bookmark bookmark if category null this name UpdateUI get String Site Category other label NON NLS 1 this category new Other Category else  SiteCategory SiteBookmark ICategory getString SiteCategory OtherCategory
return entry public Object get Adapter Class clazz return null public Site Category Site Bookmark bookmark String name I Category category this bookmark bookmark if category null this name UpdateUI get String Site Category other label NON NLS 1 this category new Other Category else this name name this category category children new Vector  getAdapter SiteCategory SiteBookmark ICategory getString SiteCategory OtherCategory
public Site Bookmark get Bookmark return bookmark public boolean is Other Category return category instanceof Other Category  SiteBookmark getBookmark isOtherCategory OtherCategory
public Object get Children return canceled new Object 0 children to Array public int get Child Count return canceled 0 children size  getChildren toArray getChildCount

Update Model model public void set Model Update Model model this model model  UpdateModel setModel UpdateModel
public Update Model get Model return model  UpdateModel getModel
protected void notify Object Changed String property if model null return model fire Object Changed this property  notifyObjectChanged fireObjectChanged
protected void notify Objects Added Object parent Object objects if model null return model fire Objects Added parent objects  notifyObjectsAdded fireObjectsAdded
protected void notify Objects Removed Object parent Object objects if model null return model fire Objects Removed parent objects  notifyObjectsRemoved fireObjectsRemoved
public Object get Children Object obj return new Object 0  getChildren
public Object get Parent Object obj return null  getParent
return null public String get Label Object obj return to String  getLabel toString
return to String public Image Descriptor get Image Descriptor Object obj return null  toString ImageDescriptor getImageDescriptor

import java io import java net import java util 
import org eclipse core runtime 
import org eclipse update internal ui import org eclipse update operations public class Update Model implements I Adaptable private Vector bookmarks new Vector private Vector listeners new Vector  UpdateModel IAdaptable
private static final String BOOKMARK FILE bookmarks xml NON NLS 1  BOOKMARK_FILE
public Update Model reset  UpdateModel
public void reset 
bookmarks clear Bookmark Util parse get Bookmarks File Name bookmarks  BookmarkUtil getBookmarksFileName
private String get Bookmarks File Name  getBookmarksFileName
private String get Bookmarks File Name URL platformXML Configurator Utils get Current Platform Configuration get Configuration Location if file equals platformXML get Protocol  getBookmarksFileName ConfiguratorUtils getCurrentPlatformConfiguration getConfigurationLocation getProtocol
if file equals platformXML get Protocol I Path path UpdateUI get Default get State Location path path append BOOKMARK FILE  getProtocol IPath getDefault getStateLocation BOOKMARK_FILE
path path append BOOKMARK FILE return path toOS String else  BOOKMARK_FILE toOSString
File f new File platformXML get File f new File f get Parent File BOOKMARK FILE return f get Absolute Path  getFile getParentFile BOOKMARK_FILE getAbsolutePath
public void shutdown 
public void save Bookmarks  saveBookmarks
public void add Bookmark Named Model Object bookmark bookmarks add bookmark  addBookmark NamedModelObject

private Image Descriptor f Overlays public Abstract Overlay Icon Image Descriptor overlays this overlays null  ImageDescriptor fOverlays AbstractOverlayIcon ImageDescriptor
public Abstract Overlay Icon Image Descriptor overlays Point size f Overlays overlays if size null f Size size else f Size new Point DEFAULT WIDTH DEFAULT HEIGHT  AbstractOverlayIcon ImageDescriptor fOverlays fSize fSize DEFAULT_WIDTH DEFAULT_HEIGHT
protected void draw Bottom Left Image Descriptor overlays if overlays null return int length overlays length int x 0 for int i 0 i 3 i if i length overlays i null Image Data id overlays i get Image Data draw Image id x get Size y id height x id width  drawBottomLeft ImageDescriptor ImageData getImageData drawImage getSize
protected void draw Bottom Right Image Descriptor overlays if overlays null return int length overlays length int x get Size x for int i 2 i 0 i if i length overlays i null Image Data id overlays i get Image Data x id width draw Image id x get Size y id height  drawBottomRight ImageDescriptor getSize ImageData getImageData drawImage getSize
protected abstract Image Data get Base Image Data  ImageData getBaseImageData
protected void draw Composite Image int width int height Image Data base get Base Image Data draw Image base 0 0 if f Overlays null if f Overlays length 0 draw Top Right f Overlays 0 if f Overlays length 1 draw Bottom Right f Overlays 1 if f Overlays length 2 draw Bottom Left f Overlays 2 if f Overlays length 3 draw Top Left f Overlays 3  drawCompositeImage ImageData getBaseImageData drawImage fOverlays fOverlays drawTopRight fOverlays fOverlays drawBottomRight fOverlays fOverlays drawBottomLeft fOverlays fOverlays drawTopLeft fOverlays
protected void draw Top Left Image Descriptor overlays if overlays null return int length overlays length int x 0 for int i 0 i 3 i if i length overlays i null Image Data id overlays i get Image Data draw Image id x 0 x id width  drawTopLeft ImageDescriptor ImageData getImageData drawImage
protected void draw Top Right Image Descriptor overlays if overlays null return int length overlays length int x get Size x for int i 2 i 0 i if i length overlays i null Image Data id overlays i get Image Data x id width draw Image id x 0  drawTopRight ImageDescriptor getSize ImageData getImageData drawImage
protected Point get Size return f Size  getSize fSize

Contributors IBM Corporation initial API and implementation 
package org eclipse update internal ui parts 

private Image base public Image Overlay Icon Image base Image Descriptor overlays this base overlays null  ImageOverlayIcon ImageDescriptor
public Image Overlay Icon Image base Image Descriptor overlays Point size super overlays size this base base  ImageOverlayIcon ImageDescriptor
protected Image Data get Base Image Data return base get Image Data  ImageData getBaseImageData getImageData

An Overlay Icon consists of a main icon and several adornments  OverlayIcon
public class Overlay Icon extends Composite Image Descriptor static final int DEFAULT WIDTH 16  OverlayIcon CompositeImageDescriptor DEFAULT_WIDTH
static final int DEFAULT HEIGHT 16 private Point f Size null private Image Descriptor f Base private Image Descriptor f Overlays  DEFAULT_HEIGHT fSize ImageDescriptor fBase ImageDescriptor fOverlays
public Overlay Icon Image Descriptor base Image Descriptor overlays f Base base if f Base null f Base Image Descriptor get Missing Image Descriptor f Overlays overlays f Size new Point DEFAULT WIDTH DEFAULT HEIGHT  OverlayIcon ImageDescriptor ImageDescriptor fBase fBase fBase ImageDescriptor getMissingImageDescriptor fOverlays fSize DEFAULT_WIDTH DEFAULT_HEIGHT
public Overlay Icon Image Descriptor base Image Descriptor overlays Point size f Base base if f Base null f Base Image Descriptor get Missing Image Descriptor f Overlays overlays f Size size protected void draw Bottom Left Image Descriptor overlays  OverlayIcon ImageDescriptor ImageDescriptor fBase fBase fBase ImageDescriptor getMissingImageDescriptor fOverlays fSize drawBottomLeft ImageDescriptor
if overlays null return int length overlays length int x 0 for int i 0 i 3 i if i length overlays i null 
Image Data id overlays i get Image Data draw Image id x get Size y id height x id width protected void draw Bottom Right Image Descriptor overlays  ImageData getImageData drawImage getSize drawBottomRight ImageDescriptor
if overlays null return 

public Pixel Converter Control control GC gc new GC control gc set Font control get Font f Font Metrics gc get Font Metrics gc dispose  PixelConverter setFont getFont fFontMetrics getFontMetrics
public int convert Height In Chars To Pixels int chars return Dialog convert Height In Chars To Pixels f Font Metrics chars  convertHeightInCharsToPixels convertHeightInCharsToPixels fFontMetrics
public int convert HorizontalDL Us To Pixels int dlus return Dialog convert HorizontalDL Us To Pixels f Font Metrics dlus  convertHorizontalDLUsToPixels convertHorizontalDLUsToPixels fFontMetrics
public int convert VerticalDL Us To Pixels int dlus return Dialog convert VerticalDL Us To Pixels f Font Metrics dlus  convertVerticalDLUsToPixels convertVerticalDLUsToPixels fFontMetrics
public int convert Width In Chars To Pixels int chars return Dialog convert Width In Chars To Pixels f Font Metrics chars  convertWidthInCharsToPixels convertWidthInCharsToPixels fFontMetrics

Array List consumers new Array List public Shared Label Provider  ArrayList ArrayList SharedLabelProvider
public void connect Object consumer if consumers contains consumer consumers add consumer 
public void disconnect Object consumer consumers remove consumer if consumers size 0 reset 
public void dispose reset super dispose 
private void reset for Enumeration enum images elements enum has More Elements Image image Image enum next Element image dispose images clear  hasMoreElements nextElement
public Image get Image Descriptor desc return get desc 0  ImageDescriptor
public Image get Image Descriptor desc int flags Object key desc if flags 0 key get Key desc hash Code flags Image image Image images get key if image null image create Image desc flags images put key image return image  ImageDescriptor getKey hashCode createImage
public Image get Image image int flags if flags 0 return image String key get Key image hash Code flags Image result Image Image images get key if result Image null result Image create Image image flags images put key result Image return result Image  getKey hashCode resultImage resultImage resultImage createImage resultImage resultImage
private String get Key long hash Code int flags return hash Code flags NON NLS 1 NON NLS 2  getKey hashCode hashCode
private Image create Image Image Descriptor base Desc int flags if flags 0 return base Desc create Image Image Descriptor lower Left get Lower Left Overlays flags Image Descriptor upper Right get Upper Right Overlays flags Image Descriptor lower Right get Lower Right Overlays flags Image Descriptor upper Left get Upper Left Overlays flags Overlay Icon comp Desc new Overlay Icon base Desc new Image Descriptor upper Right lower Right lower Left upper Left return comp Desc create Image  createImage ImageDescriptor baseDesc baseDesc createImage ImageDescriptor lowerLeft getLowerLeftOverlays ImageDescriptor upperRight getUpperRightOverlays ImageDescriptor lowerRight getLowerRightOverlays ImageDescriptor upperLeft getUpperLeftOverlays OverlayIcon compDesc OverlayIcon baseDesc ImageDescriptor upperRight lowerRight lowerLeft upperLeft compDesc createImage
private Image create Image Image base Image int flags if flags 0 return base Image Image Descriptor lower Left get Lower Left Overlays flags Image Descriptor upper Right get Upper Right Overlays flags Image Descriptor lower Right get Lower Right Overlays flags Image Descriptor upper Left get Upper Left Overlays flags Image Overlay Icon comp Desc new Image Overlay Icon base Image new Image Descriptor upper Right lower Right lower Left upper Left return comp Desc create Image  createImage baseImage baseImage ImageDescriptor lowerLeft getLowerLeftOverlays ImageDescriptor upperRight getUpperRightOverlays ImageDescriptor lowerRight getLowerRightOverlays ImageDescriptor upperLeft getUpperLeftOverlays ImageOverlayIcon compDesc ImageOverlayIcon baseImage ImageDescriptor upperRight lowerRight lowerLeft upperLeft compDesc createImage
private Image Descriptor get Lower Left Overlays int flags if flags F ERROR 0 return new Image Descriptor UpdateUI Images DESC ERROR CO if flags F WARNING 0 return new Image Descriptor UpdateUI Images DESC WARNING CO return null  ImageDescriptor getLowerLeftOverlays F_ERROR ImageDescriptor UpdateUIImages DESC_ERROR_CO F_WARNING ImageDescriptor UpdateUIImages DESC_WARNING_CO
private Image Descriptor get Upper Right Overlays int flags if flags F ADD 0 return new Image Descriptor UpdateUI Images DESC ADD CO if flags F DEL 0 return new Image Descriptor UpdateUI Images DESC DEL CO if flags F UNCONFIGURED 0 return new Image Descriptor UpdateUI Images DESC UNCONF CO if flags F LINKED 0 return new Image Descriptor UpdateUI Images DESC LINKED CO return null  ImageDescriptor getUpperRightOverlays F_ADD ImageDescriptor UpdateUIImages DESC_ADD_CO F_DEL ImageDescriptor UpdateUIImages DESC_DEL_CO F_UNCONFIGURED ImageDescriptor UpdateUIImages DESC_UNCONF_CO F_LINKED ImageDescriptor UpdateUIImages DESC_LINKED_CO
private Image Descriptor get Lower Right Overlays int flags if flags F CURRENT 0 return new Image Descriptor UpdateUI Images DESC CURRENT CO if flags F MOD 0 return new Image Descriptor UpdateUI Images DESC MOD CO if flags F ADD 0 return new Image Descriptor UpdateUI Images DESC ADD CO if flags F DEL 0 return new Image Descriptor UpdateUI Images DESC DEL CO if flags F UNCONFIGURED 0 return new Image Descriptor UpdateUI Images DESC UNCONF CO return null  ImageDescriptor getLowerRightOverlays F_CURRENT ImageDescriptor UpdateUIImages DESC_CURRENT_CO F_MOD ImageDescriptor UpdateUIImages DESC_MOD_CO F_ADD ImageDescriptor UpdateUIImages DESC_ADD_CO F_DEL ImageDescriptor UpdateUIImages DESC_DEL_CO F_UNCONFIGURED ImageDescriptor UpdateUIImages DESC_UNCONF_CO
private Image Descriptor get Upper Left Overlays int flags if flags F UPDATED 0 return new Image Descriptor UpdateUI Images DESC UPDATED CO return null  ImageDescriptor getUpperLeftOverlays F_UPDATED ImageDescriptor UpdateUIImages DESC_UPDATED_CO
public String get Column Text Object obj int index return get Text obj  getColumnText getText
return get Text obj public Image get Column Image Object obj int index return get Image obj  getText getColumnImage getImage
public Image get Image FromURL URL installURL String subdirectory And Filename Image image null try URL newURL new URL installURL subdirectory And Filename String key newURL to String image Image images get key if image null Image Descriptor desc Image Descriptor create FromURL newURL image desc create Image images put key image catch MalformedURL Exception e catch SWT Exception e return image  getImageFromURL subdirectoryAndFilename subdirectoryAndFilename toString ImageDescriptor ImageDescriptor createFromURL createImage MalformedURLException SWTException

Returns the standard display to be used The method first checks if the thread calling this method has an associated disaply If so this display is returned Otherwise the method returns the default display public static Display get Standard Display Display display display Display get Current if display null display Display get Default return display  getStandardDisplay getCurrent getDefault
Returns the shell for the given widget If the widget doesn t represent a SWT object that manage a shell code null code is returned return the shell for the given widget public static Shell get Shell Widget widget if widget instanceof Control return Control widget get Shell if widget instanceof Caret return Caret widget get Parent get Shell if widget instanceof Drag Source return Drag Source widget get Control get Shell if widget instanceof Drop Target return Drop Target widget get Control get Shell if widget instanceof Menu return Menu widget get Parent get Shell if widget instanceof Scroll Bar return Scroll Bar widget get Parent get Shell return null  getShell getShell getParent getShell DragSource DragSource getControl getShell DropTarget DropTarget getControl getShell getParent getShell ScrollBar ScrollBar getParent getShell
Returns a width hint for a button control public static int get Button Width Hint Button button if button get Font equals J Face Resources get Default Font button set Font J Face Resources get Dialog Font Pixel Converter converter new Pixel Converter button int width Hint converter convert HorizontalDL Us To Pixels I Dialog Constants BUTTON WIDTH return Math max width Hint button compute Size SWT DEFAULT SWT DEFAULT true x  getButtonWidthHint getFont JFaceResources getDefaultFont setFont JFaceResources getDialogFont PixelConverter PixelConverter widthHint convertHorizontalDLUsToPixels IDialogConstants BUTTON_WIDTH widthHint computeSize
Returns a height hint for a button control public static int get Button Heigth Hint Button button if button get Font equals J Face Resources get Default Font button set Font J Face Resources get Dialog Font Pixel Converter converter new Pixel Converter button return converter convert VerticalDL Us To Pixels I Dialog Constants BUTTON HEIGHT  getButtonHeigthHint getFont JFaceResources getDefaultFont setFont JFaceResources getDialogFont PixelConverter PixelConverter convertVerticalDLUsToPixels IDialogConstants BUTTON_HEIGHT
Sets width and height hint for the button control b Note b This is a NOP if the button s layout data is not an instance of code Grid Data code param buttonthe button for which to set the dimension hint public static void set Button Dimension Hint Button button Assert is Not Null button Object gd button get Layout Data if gd instanceof Grid Data Grid Data gd height Hint get Button Heigth Hint button Grid Data gd width Hint get Button Width Hint button  GridData setButtonDimensionHint isNotNull getLayoutData GridData GridData heightHint getButtonHeigthHint GridData widthHint getButtonWidthHint
public static void set Dialog Size Dialog dialog int width int height Point computed Size dialog get Shell compute Size SWT DEFAULT SWT DEFAULT width Math max computed Size x width height Math max computed Size y height dialog get Shell set Size width height  setDialogSize computedSize getShell computeSize computedSize computedSize getShell setSize

The constructor public Main Preference Page super  MainPreferencePage
Insert the method s description here public void init I Workbench workbench  IWorkbench
check Signature Checkbox add Selection Listener new Selection Adapter public void widget Selected Selection Event e if check Signature Checkbox get Selection false warn Signature Check get Shell  checkSignatureCheckbox addSelectionListener SelectionAdapter widgetSelected SelectionEvent checkSignatureCheckbox getSelection warnSignatureCheck getShell
initialize update Policy Text add Modify Listener new Modify Listener public void modify Text Modify Event e text Changed  updatePolicyText addModifyListener ModifyListener modifyText ModifyEvent textChanged
protected Control create Contents Composite parent Workbench Help set Help parent org eclipse update ui Main Preference Page NON NLS 1 Composite main Composite new Composite parent SWT NULL main Composite set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout layout new Grid Layout layout margin Height 0 layout margin Width 0 layout num Columns 2 main Composite set Layout layout Label history Size Label new Label main Composite SWT NONE history Size Label set Text UpdateUI get String Main Preference Page history Size NON NLS 1 history Size Text new Text main Composite SWT SINGLE SWT BORDER history Size Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL check Signature Checkbox new Button main Composite SWT CHECK SWT LEFT check Signature Checkbox set Text UpdateUI get String Main Preference Page check Signature NON NLS 1 Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 check Signature Checkbox set Layout Data gd check Signature Checkbox add Selection Listener new Selection Adapter public void widget Selected Selection Event e if check Signature Checkbox get Selection false warn Signature Check get Shell create Spacer main Composite 2 Group group new Group main Composite SWT NONE group set Text UpdateUI get String Main Preference Page update Versions NON NLS 1 group set Layout new Grid Layout gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 group set Layout Data gd equivalent Button new Button group SWT RADIO equivalent Button set Text UpdateUI get String Main Preference Page update Versions equivalent NON NLS 1 compatible Button new Button group SWT RADIO compatible Button set Text UpdateUI get String Main Preference Page update Versions compatible NON NLS 1 create Spacer main Composite 2 group new Group main Composite SWT NONE group set Text UpdateUI get String Main Preference Page update Policy NON NLS 1 layout new Grid Layout layout num Columns 2 group set Layout layout gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span 2 group set Layout Data gd Label label new Label group SWT NULL label set Text UpdateUI get String Main Preference Page update PolicyURL NON NLS 1 update Policy Text new Text group SWT SINGLE SWT BORDER gd new Grid Data Grid Data FILL HORIZONTAL update Policy Text set Layout Data gd create Spacer main Composite 2 create Http Proxy main Composite 2 initialize update Policy Text add Modify Listener new Modify Listener public void modify Text Modify Event e text Changed return main Composite  createContents WorkbenchHelp setHelp MainPreferencePage mainComposite mainComposite setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout marginHeight marginWidth numColumns mainComposite setLayout historySizeLabel mainComposite historySizeLabel setText getString MainPreferencePage historySize historySizeText mainComposite historySizeText setLayoutData GridData GridData FILL_HORIZONTAL checkSignatureCheckbox mainComposite checkSignatureCheckbox setText getString MainPreferencePage checkSignature GridData GridData GridData FILL_HORIZONTAL horizontalSpan checkSignatureCheckbox setLayoutData checkSignatureCheckbox addSelectionListener SelectionAdapter widgetSelected SelectionEvent checkSignatureCheckbox getSelection warnSignatureCheck getShell createSpacer mainComposite mainComposite setText getString MainPreferencePage updateVersions setLayout GridLayout GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData equivalentButton equivalentButton setText getString MainPreferencePage updateVersions compatibleButton compatibleButton setText getString MainPreferencePage updateVersions createSpacer mainComposite mainComposite setText getString MainPreferencePage updatePolicy GridLayout numColumns setLayout GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData setText getString MainPreferencePage updatePolicyURL updatePolicyText GridData GridData FILL_HORIZONTAL updatePolicyText setLayoutData createSpacer mainComposite createHttpProxy mainComposite updatePolicyText addModifyListener ModifyListener modifyText ModifyEvent textChanged mainComposite
public void create Control Composite parent super create Control parent Dialog apply Dialog Font get Control  createControl createControl applyDialogFont getControl
protected void create Spacer Composite composite int column Span Label label new Label composite SWT NONE Grid Data gd new Grid Data gd horizontal Span column Span label set Layout Data gd  createSpacer columnSpan GridData GridData horizontalSpan columnSpan setLayoutData
enable Http Proxy add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean enable enable Http Proxy get Selection http Proxy Port Label set Enabled enable http Proxy Host Label set Enabled enable http Proxy Port Text set Enabled enable http Proxy Host Text set Enabled enable  enableHttpProxy addSelectionListener SelectionAdapter widgetSelected SelectionEvent enableHttpProxy getSelection httpProxyPortLabel setEnabled httpProxyHostLabel setEnabled httpProxyPortText setEnabled httpProxyHostText setEnabled
protected void create Http Proxy Composite composite int column Span Group group new Group composite SWT NONE group set Text UpdateUI get String Main Preference Page proxy Group NON NLS 1 Grid Layout layout new Grid Layout layout num Columns 2 group set Layout layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL gd horizontal Span column Span group set Layout Data gd enable Http Proxy new Button group SWT CHECK enable Http Proxy set Text UpdateUI get String Main Preference Page enable Http Proxy NON NLS 1 gd new Grid Data gd horizontal Span 2 enable Http Proxy set Layout Data gd http Proxy Host Label new Label group SWT NONE http Proxy Host Label set Text UpdateUI get String Main Preference Page http Proxy Host NON NLS 1 http Proxy Host Text new Text group SWT SINGLE SWT BORDER http Proxy Host Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL http Proxy Port Label new Label group SWT NONE http Proxy Port Label set Text UpdateUI get String Main Preference Page http Proxy Port NON NLS 1 http Proxy Port Text new Text group SWT SINGLE SWT BORDER http Proxy Port Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL enable Http Proxy add Selection Listener new Selection Adapter public void widget Selected Selection Event e boolean enable enable Http Proxy get Selection http Proxy Port Label set Enabled enable http Proxy Host Label set Enabled enable http Proxy Port Text set Enabled enable http Proxy Host Text set Enabled enable  createHttpProxy columnSpan setText getString MainPreferencePage proxyGroup GridLayout GridLayout numColumns setLayout GridData GridData GridData FILL_HORIZONTAL horizontalSpan columnSpan setLayoutData enableHttpProxy enableHttpProxy setText getString MainPreferencePage enableHttpProxy GridData horizontalSpan enableHttpProxy setLayoutData httpProxyHostLabel httpProxyHostLabel setText getString MainPreferencePage httpProxyHost httpProxyHostText httpProxyHostText setLayoutData GridData GridData FILL_HORIZONTAL httpProxyPortLabel httpProxyPortLabel setText getString MainPreferencePage httpProxyPort httpProxyPortText httpProxyPortText setLayoutData GridData GridData FILL_HORIZONTAL enableHttpProxy addSelectionListener SelectionAdapter widgetSelected SelectionEvent enableHttpProxy getSelection httpProxyPortLabel setEnabled httpProxyHostLabel setEnabled httpProxyPortText setEnabled httpProxyHostText setEnabled
private int get History Count try Integer count new Integer history Size Text get Text return count int Value catch Number Format Exception e return Update Core get Plugin get Plugin Preferences get Default Int Update Core P HISTORY SIZE  getHistoryCount historySizeText getText intValue NumberFormatException UpdateCore getPlugin getPluginPreferences getDefaultInt UpdateCore P_HISTORY_SIZE
Busy Indicator show While get Control get Display new Runnable public void run try Site Manager get Local Site set Maximum History Count get History Count Site Manager set Http Proxy Info enable Http Proxy get Selection http Proxy Host Text get Text http Proxy Port Text get Text catch Core Exception e UpdateUI log Exception e  BusyIndicator showWhile getControl getDisplay SiteManager getLocalSite setMaximumHistoryCount getHistoryCount SiteManager setHttpProxyInfo enableHttpProxy getSelection httpProxyHostText getText httpProxyPortText getText CoreException logException
public boolean perform Ok Busy Indicator show While get Control get Display new Runnable public void run try Site Manager get Local Site set Maximum History Count get History Count Site Manager set Http Proxy Info enable Http Proxy get Selection http Proxy Host Text get Text http Proxy Port Text get Text catch Core Exception e UpdateUI log Exception e Preferences prefs Update Core get Plugin get Plugin Preferences prefs set Value Update Core P CHECK SIGNATURE check Signature Checkbox get Selection prefs set Value Update Core P HISTORY SIZE history Size Text get Text prefs set Value Update Core P UPDATE VERSIONS equivalent Button get Selection EQUIVALENT VALUE COMPATIBLE VALUE prefs set Value Update Utils P UPDATE POLICY URL update Policy Text get Text Update Core get Plugin save Plugin Preferences return super perform Ok  performOk BusyIndicator showWhile getControl getDisplay SiteManager getLocalSite setMaximumHistoryCount getHistoryCount SiteManager setHttpProxyInfo enableHttpProxy getSelection httpProxyHostText getText httpProxyPortText getText CoreException logException UpdateCore getPlugin getPluginPreferences setValue UpdateCore P_CHECK_SIGNATURE checkSignatureCheckbox getSelection setValue UpdateCore P_HISTORY_SIZE historySizeText getText setValue UpdateCore P_UPDATE_VERSIONS equivalentButton getSelection EQUIVALENT_VALUE COMPATIBLE_VALUE setValue UpdateUtils P_UPDATE_POLICY_URL updatePolicyText getText UpdateCore getPlugin savePluginPreferences performOk
Busy Indicator show While get Control get Display new Runnable public void run Site Manager set Http Proxy Info enable Http Proxy get Selection http Proxy Host Text get Text http Proxy Port Text get Text  BusyIndicator showWhile getControl getDisplay SiteManager setHttpProxyInfo enableHttpProxy getSelection httpProxyHostText getText httpProxyPortText getText
public void perform Apply super perform Apply Busy Indicator show While get Control get Display new Runnable public void run Site Manager set Http Proxy Info enable Http Proxy get Selection http Proxy Host Text get Text http Proxy Port Text get Text Preferences prefs Update Core get Plugin get Plugin Preferences prefs set Value Update Core P CHECK SIGNATURE check Signature Checkbox get Selection prefs set Value Update Core P HISTORY SIZE history Size Text get Text prefs set Value Update Core P UPDATE VERSIONS equivalent Button get Selection EQUIVALENT VALUE COMPATIBLE VALUE prefs set Value Update Utils P UPDATE POLICY URL update Policy Text get Text Update Core get Plugin save Plugin Preferences  performApply performApply BusyIndicator showWhile getControl getDisplay SiteManager setHttpProxyInfo enableHttpProxy getSelection httpProxyHostText getText httpProxyPortText getText UpdateCore getPlugin getPluginPreferences setValue UpdateCore P_CHECK_SIGNATURE checkSignatureCheckbox getSelection setValue UpdateCore P_HISTORY_SIZE historySizeText getText setValue UpdateCore P_UPDATE_VERSIONS equivalentButton getSelection EQUIVALENT_VALUE COMPATIBLE_VALUE setValue UpdateUtils P_UPDATE_POLICY_URL updatePolicyText getText UpdateCore getPlugin savePluginPreferences
private void initialize enable Http Proxy set Selection Site Manager is Http Proxy Enable String server Value Site Manager get Http Proxy Server if server Value null http Proxy Host Text set Text server Value String port Value Site Manager get Http Proxy Port if port Value null http Proxy Port Text set Text port Value http Proxy Port Label set Enabled enable Http Proxy get Selection http Proxy Host Label set Enabled enable Http Proxy get Selection http Proxy Port Text set Enabled enable Http Proxy get Selection http Proxy Host Text set Enabled enable Http Proxy get Selection Preferences prefs Update Core get Plugin get Plugin Preferences check Signature Checkbox set Selection prefs get Boolean Update Core P CHECK SIGNATURE history Size Text set Text prefs get String Update Core P HISTORY SIZE boolean is Compatible Update Core COMPATIBLE VALUE equals prefs get String Update Core P UPDATE VERSIONS equivalent Button set Selection is Compatible compatible Button set Selection is Compatible String text prefs get String Update Utils P UPDATE POLICY URL update Policy Text set Text text  enableHttpProxy setSelection SiteManager isHttpProxyEnable serverValue SiteManager getHttpProxyServer serverValue httpProxyHostText setText serverValue portValue SiteManager getHttpProxyPort portValue httpProxyPortText setText portValue httpProxyPortLabel setEnabled enableHttpProxy getSelection httpProxyHostLabel setEnabled enableHttpProxy getSelection httpProxyPortText setEnabled enableHttpProxy getSelection httpProxyHostText setEnabled enableHttpProxy getSelection UpdateCore getPlugin getPluginPreferences checkSignatureCheckbox setSelection getBoolean UpdateCore P_CHECK_SIGNATURE historySizeText setText getString UpdateCore P_HISTORY_SIZE isCompatible UpdateCore COMPATIBLE_VALUE getString UpdateCore P_UPDATE_VERSIONS equivalentButton setSelection isCompatible compatibleButton setSelection isCompatible getString UpdateUtils P_UPDATE_POLICY_URL updatePolicyText setText
private void text Changed String text update Policy Text get Text if text length 0 try new URL text catch MalformedURL Exception e set Valid false set Error Message UpdateUI get String Update Settings Preference Page invalid NON NLS 1 return set Valid true set Error Message null  textChanged updatePolicyText getText MalformedURLException setValid setErrorMessage getString UpdateSettingsPreferencePage setValid setErrorMessage
public void perform Defaults super perform Defaults Preferences prefs Update Core get Plugin get Plugin Preferences enable Http Proxy set Selection false http Proxy Host Text set Text NON NLS 1 http Proxy Port Text set Text NON NLS 1 http Proxy Port Label set Enabled false http Proxy Host Label set Enabled false http Proxy Port Text set Enabled false http Proxy Host Text set Enabled false update Policy Text set Text NON NLS 1 check Signature Checkbox set Selection true history Size Text set Text prefs get Default String Update Core P HISTORY SIZE equivalent Button set Selection true compatible Button set Selection false  performDefaults performDefaults UpdateCore getPlugin getPluginPreferences enableHttpProxy setSelection httpProxyHostText setText httpProxyPortText setText httpProxyPortLabel setEnabled httpProxyHostLabel setEnabled httpProxyPortText setEnabled httpProxyHostText setEnabled updatePolicyText setText checkSignatureCheckbox setSelection historySizeText setText getDefaultString UpdateCore P_HISTORY_SIZE equivalentButton setSelection compatibleButton setSelection
private void warn Signature Check Shell shell Message Dialog open Warning shell UpdateUI get String Main Preference Page digital Signature title NON NLS 1 UpdateUI get String Main Preference Page digital Signature message NON NLS 1  warnSignatureCheck MessageDialog openWarning getString MainPreferencePage digitalSignature getString MainPreferencePage digitalSignature

The constructor public Update Settings Preference Page set Description UpdateUI get String Update Settings Preference Page description NON NLS 1  UpdateSettingsPreferencePage setDescription getString UpdateSettingsPreferencePage
Insert the method s description here public void init I Workbench workbench  IWorkbench
initialize mappings File add Modify Listener new Modify Listener public void modify Text Modify Event e text Changed  mappingsFile addModifyListener ModifyListener modifyText ModifyEvent textChanged
public Control create Contents Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout container set Layout layout layout margin Width layout margin Height 0 layout num Columns 2 Label label new Label container SWT NULL label set Text UpdateUI get String Update Settings Preference Page label NON NLS 1 mappings File new Text container SWT SINGLE SWT BORDER initialize mappings File add Modify Listener new Modify Listener public void modify Text Modify Event e text Changed Grid Data gd new Grid Data Grid Data FILL HORIZONTAL mappings File set Layout Data gd return container  createContents GridLayout GridLayout setLayout marginWidth marginHeight numColumns setText getString UpdateSettingsPreferencePage mappingsFile mappingsFile addModifyListener ModifyListener modifyText ModifyEvent textChanged GridData GridData GridData FILL_HORIZONTAL mappingsFile setLayoutData
private void initialize Preferences pref Update Core get Plugin get Plugin Preferences String text pref get String Update Utils P UPDATE POLICY URL mappings File set Text text text Changed  UpdateCore getPlugin getPluginPreferences getString UpdateUtils P_UPDATE_POLICY_URL mappingsFile setText textChanged
private void text Changed String text mappings File get Text if text length 0 try new URL text catch MalformedURL Exception e set Valid false set Error Message UpdateUI get String Update Settings Preference Page invalid NON NLS 1 return set Valid true set Error Message null  textChanged mappingsFile getText MalformedURLException setValid setErrorMessage getString UpdateSettingsPreferencePage setValid setErrorMessage
public boolean perform Ok Preferences pref Update Core get Plugin get Plugin Preferences String text mappings File get Text if text length 0 pref set Value Update Utils P UPDATE POLICY URL text else pref set To Default Update Utils P UPDATE POLICY URL Update Core get Plugin save Plugin Preferences return true  performOk UpdateCore getPlugin getPluginPreferences mappingsFile getText setValue UpdateUtils P_UPDATE_POLICY_URL setToDefault UpdateUtils P_UPDATE_POLICY_URL UpdateCore getPlugin savePluginPreferences
protected void perform Defaults mappings File set Text NON NLS 1 super perform Defaults  performDefaults mappingsFile setText performDefaults
public void create Control Composite parent super create Control parent Dialog apply Dialog Font get Control Workbench Help set Help parent org eclipse update ui App Server Preference Page  createControl createControl applyDialogFont getControl WorkbenchHelp setHelp AppServerPreferencePage

public class Configured Site Property Page extends Property Page implements I Workbench Property Page public Configured Site Property Page no Default And Apply Button  ConfiguredSitePropertyPage PropertyPage IWorkbenchPropertyPage ConfiguredSitePropertyPage noDefaultAndApplyButton
protected Control create Contents Composite parent I Configured Site Adapter adapter I Configured Site Adapter get Element I Configured Site csite adapter get Configured Site Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout add Property composite UpdateUI get String Configured Site Property Page path csite get Site getURL to String NON NLS 1 add Property composite UpdateUI get String Configured Site Property Page type get Location Type csite NON NLS 1 add Property composite UpdateUI get String Configured Site Property Page enabled csite is Enabled UpdateUI get String Configured Site Property Page yes UpdateUI get String Configured Site Property Page no NON NLS 1 NON NLS 2 NON NLS 3 return composite  createContents IConfiguredSiteAdapter IConfiguredSiteAdapter getElement IConfiguredSite getConfiguredSite GridLayout GridLayout numColumns setLayout addProperty getString ConfiguredSitePropertyPage getSite toString addProperty getString ConfiguredSitePropertyPage getLocationType addProperty getString ConfiguredSitePropertyPage isEnabled getString ConfiguredSitePropertyPage getString ConfiguredSitePropertyPage
private String get Location Type I Configured Site csite if csite is Extension Site return UpdateUI get String Configured Site Property Page extension NON NLS 1 if csite is Product Site return UpdateUI get String Configured Site Property Page product NON NLS 1 return UpdateUI get String Configured Site Property Page unknown NON NLS 1  getLocationType IConfiguredSite isExtensionSite getString ConfiguredSitePropertyPage isProductSite getString ConfiguredSitePropertyPage getString ConfiguredSitePropertyPage
private void add Property Composite parent String key String value Label label new Label parent SWT NULL label set Text key label new Label parent SWT NULL label set Text value Grid Data gd new Grid Data Grid Data FILL HORIZONTAL label set Layout Data gd  addProperty setText setText GridData GridData GridData FILL_HORIZONTAL setLayoutData

public class Feature Copyright Property Page extends Property Page implements I Workbench Property Page public Feature Copyright Property Page no Default And Apply Button  FeatureCopyrightPropertyPage PropertyPage IWorkbenchPropertyPage FeatureCopyrightPropertyPage noDefaultAndApplyButton
SWT Util set Button Dimension Hint button button add Selection Listener new Selection Adapter public void widget Selected Selection Event e String url Name url get Protocol url get File NON NLS 1 UpdateUI showURL url Name  SWTUtil setButtonDimensionHint addSelectionListener SelectionAdapter widgetSelected SelectionEvent urlName getProtocol getFile urlName
protected Control create Contents Composite parent try I Feature Adapter adapter I Feature Adapter get Element I Feature feature adapter get Feature null Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout Label label new Label composite SWT WRAP Grid Data gd new Grid Data Grid Data FILL HORIZONTAL Grid Data VERTICAL ALIGN BEGINNING gd width Hint compute Width Limit label 80 label set Layout Data gd IURL Entry copyright feature get Copyright String annotation copyright null copyright get Annotation null if annotation null annotation length 0 label set Text annotation final URL url copyright getURL String filename url null url get File null if filename null filename ends With htm filename ends With html NON NLS 1 NON NLS 2 Button button new Button composite SWT PUSH button set Text UpdateUI get String Feature Copyright Property Page show In Browser NON NLS 1 button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END SWT Util set Button Dimension Hint button button add Selection Listener new Selection Adapter public void widget Selected Selection Event e String url Name url get Protocol url get File NON NLS 1 UpdateUI showURL url Name else label set Text UpdateUI get String Feature Copyright Property Page no Copyright NON NLS 1 Dialog apply Dialog Font parent catch Core Exception e return null  createContents IFeatureAdapter IFeatureAdapter getElement IFeature getFeature setLayout GridLayout GridData GridData GridData FILL_HORIZONTAL GridData VERTICAL_ALIGN_BEGINNING widthHint computeWidthLimit setLayoutData IURLEntry getCopyright getAnnotation setText getFile endsWith endsWith setText getString FeatureCopyrightPropertyPage showInBrowser setLayoutData GridData GridData HORIZONTAL_ALIGN_END SWTUtil setButtonDimensionHint addSelectionListener SelectionAdapter widgetSelected SelectionEvent urlName getProtocol getFile urlName setText getString FeatureCopyrightPropertyPage noCopyright applyDialogFont CoreException
private int compute Width Limit Label label int nchars GC gc new GC label gc set Font label get Font Font Metrics font Metrics gc get Font Metrics gc dispose return Dialog convert Width In Chars To Pixels font Metrics nchars  computeWidthLimit setFont getFont FontMetrics fontMetrics getFontMetrics convertWidthInCharsToPixels fontMetrics

implements I Workbench Property Page public Feature General Property Page no Default And Apply Button  IWorkbenchPropertyPage FeatureGeneralPropertyPage noDefaultAndApplyButton
protected Control create Contents Composite parent try I Feature Adapter adapter I Feature Adapter get Element I Feature feature adapter get Feature null Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Width 0 layout margin Height 0 layout vertical Spacing 15 composite set Layout layout add General Section feature composite add Supported Platforms Section feature composite add Description feature composite Dialog apply Dialog Font parent return composite catch Core Exception e return null  createContents IFeatureAdapter IFeatureAdapter getElement IFeature getFeature GridLayout GridLayout marginWidth marginHeight verticalSpacing setLayout addGeneralSection addSupportedPlatformsSection addDescription applyDialogFont CoreException
private void add General Section I Feature feature Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout add Field composite UpdateUI get String Feature General Property Page name feature get Label NON NLS 1 add Field composite UpdateUI get String Feature General Property Page id NON NLS 1 feature get Versioned Identifier get Identifier add Field composite UpdateUI get String Feature General Property Page version NON NLS 1 feature get Versioned Identifier get Version to String add Field composite UpdateUI get String Feature General Property Page provider feature get Provider NON NLS 1 long size feature get Install Size if size Content Entry Model UNKNOWN SIZE add Field composite UpdateUI get String Feature General Property Page size new Long size to String KB NON NLS 1 NON NLS 2  addGeneralSection IFeature GridLayout GridLayout numColumns setLayout addField getString FeatureGeneralPropertyPage getLabel addField getString FeatureGeneralPropertyPage getVersionedIdentifier getIdentifier addField getString FeatureGeneralPropertyPage getVersionedIdentifier getVersion toString addField getString FeatureGeneralPropertyPage getProvider getInstallSize ContentEntryModel UNKNOWN_SIZE addField getString FeatureGeneralPropertyPage toString
private void add Supported Platforms Section I Feature feature Composite parent Group group new Group parent SWT NONE group set Text UpdateUI get String Feature General Property Page platforms NON NLS 1 Grid Layout layout new Grid Layout layout num Columns 2 layout make Columns Equal Width true group set Layout layout group set Layout Data new Grid Data Grid Data FILL HORIZONTAL Label label new Label group SWT NONE label set Text UpdateUI get String Feature General Property Page os extract Value feature getOS NON NLS 1 label new Label group SWT NONE label set Text UpdateUI get String Feature General Property Page ws extract Value feature getWS NON NLS 1 label new Label group SWT NONE label set Text UpdateUI get String Feature General Property Page arch extract Value feature getOS Arch NON NLS 1 label new Label group SWT NONE label set Text UpdateUI get String Feature General Property Page nl extract Value feature getNL NON NLS 1  addSupportedPlatformsSection IFeature setText getString FeatureGeneralPropertyPage GridLayout GridLayout numColumns makeColumnsEqualWidth setLayout setLayoutData GridData GridData FILL_HORIZONTAL setText getString FeatureGeneralPropertyPage extractValue setText getString FeatureGeneralPropertyPage extractValue setText getString FeatureGeneralPropertyPage extractValue getOSArch setText getString FeatureGeneralPropertyPage extractValue
private void add Field Composite parent String property String value if value null value length 0 Label label new Label parent SWT NONE label set Text property label new Label parent SWT NONE label set Text value  addField setText setText
private String extract Value String value if value null value equals NON NLS 1 return UpdateUI get String Feature General Property Page all NON NLS 1 return value  extractValue getString FeatureGeneralPropertyPage
private void add Description I Feature feature Composite parent IURL Entry description feature get Description if description null String annotation description get Annotation if annotation null annotation length 0 Group group new Group parent SWT NONE group set Text UpdateUI get String Feature General Property Page desc NON NLS 1 group set Layout new Grid Layout group set Layout Data new Grid Data Grid Data FILL BOTH Text text new Text group SWT MULTI SWT WRAP Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint 200 gd width Hint 350 text set Editable false text set Text annotation text set Layout Data gd  addDescription IFeature IURLEntry getDescription getAnnotation setText getString FeatureGeneralPropertyPage setLayout GridLayout setLayoutData GridData GridData FILL_BOTH GridData GridData GridData FILL_BOTH heightHint widthHint setEditable setText setLayoutData

public class Feature License Property Page extends Property Page implements I Workbench Property Page public Feature License Property Page no Default And Apply Button  FeatureLicensePropertyPage PropertyPage IWorkbenchPropertyPage FeatureLicensePropertyPage noDefaultAndApplyButton
SWT Util set Button Dimension Hint button button add Selection Listener new Selection Adapter public void widget Selected Selection Event e String url Name url get Protocol url get File NON NLS 1 UpdateUI showURL url Name  SWTUtil setButtonDimensionHint addSelectionListener SelectionAdapter widgetSelected SelectionEvent urlName getProtocol getFile urlName
protected Control create Contents Composite parent try Composite composite new Composite parent SWT NULL composite set Layout new Grid Layout I Feature Adapter adapter I Feature Adapter get Element I Feature feature adapter get Feature null IURL Entry license feature get License String annotation license null license get Annotation null if annotation null annotation length 0 Text text new Text composite SWT MULTI SWT V SCROLL SWT H SCROLL SWT BORDER SWT WRAP Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint 200 gd width Hint 350 text set Layout Data gd text set Text annotation text set Editable false final URL url license getURL String filename url null url get File null if filename null filename ends With htm url get File ends With html NON NLS 1 NON NLS 2 Button button new Button composite SWT PUSH button set Text UpdateUI get String Feature License Property Page show In Browser NON NLS 1 button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN END SWT Util set Button Dimension Hint button button add Selection Listener new Selection Adapter public void widget Selected Selection Event e String url Name url get Protocol url get File NON NLS 1 UpdateUI showURL url Name else Label label new Label composite SWT NULL label set Text UpdateUI get String Feature License Property Page no License NON NLS 1 Dialog apply Dialog Font parent return composite catch Core Exception e return null  createContents setLayout GridLayout IFeatureAdapter IFeatureAdapter getElement IFeature getFeature IURLEntry getLicense getAnnotation V_SCROLL H_SCROLL GridData GridData GridData FILL_BOTH heightHint widthHint setLayoutData setText setEditable getFile endsWith getFile endsWith setText getString FeatureLicensePropertyPage showInBrowser setLayoutData GridData GridData HORIZONTAL_ALIGN_END SWTUtil setButtonDimensionHint addSelectionListener SelectionAdapter widgetSelected SelectionEvent urlName getProtocol getFile urlName setText getString FeatureLicensePropertyPage noLicense applyDialogFont CoreException

implements I Workbench Property Page public Feature Status Property Page no Default And Apply Button  IWorkbenchPropertyPage FeatureStatusPropertyPage noDefaultAndApplyButton
protected Control create Contents Composite parent try Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 1 layout vertical Spacing 20 composite set Layout layout Text message new Text composite SWT MULTI SWT WRAP message set Editable false Grid Data gd new Grid Data gd width Hint 350 message set Layout Data gd Configured Feature Adapter adapter Configured Feature Adapter get Element I Feature feature adapter get Feature null if Operations Manager find Pending Operation feature null message set Text UpdateUI get String Feature Status Property Page pending Changes NON NLS 1 return composite I Status status get Status feature int severity status get Severity if severity I Status ERROR get Status Code feature status I Feature STATUS HAPPY severity I Status OK message set Text UpdateUI get String Feature Status Property Page good Configuration NON NLS 1 else message set Text status get Message if severity I Status OK status is Multi Status String reason get Reason status if reason length 0 Composite comp new Composite composite SWT NONE comp set Layout new Grid Layout gd new Grid Data Grid Data FILL BOTH comp set Layout Data gd Label label new Label comp SWT NONE label set Text UpdateUI get String Feature Status Property Page reason NON NLS 1 Text text new Text comp SWT MULTI SWT BORDER SWT WRAP SWT V SCROLL text set Editable false text set Text reason gd width Hint 350 text set Layout Data gd Dialog apply Dialog Font parent return composite catch Core Exception e return null  createContents GridLayout GridLayout numColumns verticalSpacing setLayout setEditable GridData GridData widthHint setLayoutData ConfiguredFeatureAdapter ConfiguredFeatureAdapter getElement IFeature getFeature OperationsManager findPendingOperation setText getString FeatureStatusPropertyPage pendingChanges IStatus getStatus getSeverity IStatus getStatusCode IFeature STATUS_HAPPY IStatus setText getString FeatureStatusPropertyPage goodConfiguration setText getMessage IStatus isMultiStatus getReason setLayout GridLayout GridData GridData FILL_BOTH setLayoutData setText getString FeatureStatusPropertyPage V_SCROLL setEditable setText widthHint setLayoutData applyDialogFont CoreException
private String get Reason I Status status I Status children status get Children String Buffer buffer new String Buffer for int i 0 i children length i String message children i get Message if message null message length 0 buffer append message System get Property line separator NON NLS 1 System get Property line separator NON NLS 1 return buffer to String  getReason IStatus IStatus getChildren StringBuffer StringBuffer getMessage getProperty getProperty toString
private I Status get Status I Feature feature throws Core Exception if feature instanceof Missing Feature int severity String message NON NLS 1 if Missing Feature feature is Optional severity I Status OK message UpdateUI get String Feature Status Property Page missing Optional NON NLS 1 else severity I Status ERROR message UpdateUI get String Feature Status Property Page missing NON NLS 1 return new Status severity UpdateUI PLUGIN ID I Status OK message null return Site Manager get Local Site get Feature Status feature  IStatus getStatus IFeature CoreException MissingFeature MissingFeature isOptional IStatus getString FeatureStatusPropertyPage missingOptional IStatus getString FeatureStatusPropertyPage PLUGIN_ID IStatus SiteManager getLocalSite getFeatureStatus
private int get Status Code I Feature feature I Status status int code status get Code if code I Feature STATUS UNHAPPY if status is Multi Status I Status children status get Children for int i 0 i children length i I Status child children i if child is Multi Status child get Code I Feature STATUS DISABLED return code If we are here global status is unhappy because one or more included features is disabled if Update Utils has Obsolete Patches feature The disabled included features are old patches that are now subsumed by better versions of the features they were designed to patch return I Feature STATUS HAPPY return code  getStatusCode IFeature IStatus getCode IFeature STATUS_UNHAPPY isMultiStatus IStatus getChildren IStatus isMultiStatus getCode IFeature STATUS_DISABLED UpdateUtils hasObsoletePatches IFeature STATUS_HAPPY

public class Install Configuration Property Page extends Property Page implements I Workbench Property Page public Install Configuration Property Page no Default And Apply Button  InstallConfigurationPropertyPage PropertyPage IWorkbenchPropertyPage InstallConfigurationPropertyPage noDefaultAndApplyButton
protected Control create Contents Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout add Property composite UpdateUI get String Configured Site Property Page path Configurator Utils get InstallURL to String NON NLS 1 return composite  createContents GridLayout GridLayout numColumns setLayout addProperty getString ConfiguredSitePropertyPage ConfiguratorUtils getInstallURL toString
private void add Property Composite parent String key String value Label label new Label parent SWT NULL label set Text key label new Label parent SWT NULL label set Text value Grid Data gd new Grid Data Grid Data FILL HORIZONTAL label set Layout Data gd  addProperty setText setText GridData GridData GridData FILL_HORIZONTAL setLayoutData

Creates a new dialog see Message Dialog Message Dialog org eclipse swt widgets Shell java lang String org eclipse swt graphics Image java lang String int java lang String int public Restart Dialog Shell parent String title String message boolean restart Needed super parent title null accept the default window icon message QUESTION restart Needed yes No yes No Apply 0 yes is the default  MessageDialog MessageDialog RestartDialog restartNeeded restartNeeded yesNo yesNoApply
Convenience method to open the Yes No Continue question dialog param parent the parent shell of the dialog or code null code if none param restart Is Really Needed when false the changes are applied to the current config return code true code if the user presses YES code false code otherwise public static boolean open Question Shell parent boolean restart Is Really Needed String title UpdateUI get String Restart Title NON NLS 1 String message restart Is Really Needed UpdateUI get String Restart Message UpdateUI get String Optional Restart Message NON NLS 1 NON NLS 2 Restart Dialog dialog new Restart Dialog parent title message restart Is Really Needed int button dialog open if button 2 Install Configuration apply Changes return button 0 Yes  restartIsReallyNeeded openQuestion restartIsReallyNeeded getString RestartTitle restartIsReallyNeeded getString RestartMessage getString OptionalRestartMessage RestartDialog RestartDialog restartIsReallyNeeded InstallConfiguration applyChanges
When a button is pressed store the preference see org eclipse jface dialogs Dialog button Pressed int protected void button Pressed int id if id 2 button Id CONTINUE super button Pressed id  buttonPressed buttonPressed buttonId buttonPressed
Returns the user s selection code null code if the user hasn t chosen yet return the user s selection or code null code public int get Result return button Id  getResult buttonId

protected String user protected String password public Authentication String user String password this user user this password password 
return Returns the password public String get Password return password  getPassword
return Returns the user public String get User return user  getUser

Constructor for Jar Verification Dialog param parent Shell public Jar Verification Dialog Shell parent Shell I Dialog Page dialog Page I Verification Result verification Result super parent Shell set Shell Style SWT TITLE SWT BORDER SWT APPLICATION MODAL  VerificationResult verification Result  DialogPage dialog Page if dialog Page instanceof Jar Verification Page Jar Verification Page  DialogPage set Title Area Dialog this  JarVerificationDialog parentShell JarVerificationDialog parentShell IDialogPage dialogPage IVerificationResult verificationResult parentShell setShellStyle APPLICATION_MODAL _VerificationResult verificationResult _DialogPage dialogPage dialogPage JarVerificationPage JarVerificationPage _DialogPage setTitleAreaDialog
Add buttons to the dialog s button bar protected void create Buttons For Button Bar Composite parent if  VerificationResult get Verification Code I Verification Result TYPE ENTRY CORRUPTED if  VerificationResult is Feature Verification create Button parent I Dialog Constants OK ID UpdateUI get String Jar Verification Dialog Install NON NLS 1 false else create Button parent I Dialog Constants OK ID UpdateUI get String Jar Verification Dialog Continue NON NLS 1 false Radio button Cancel installation create Button parent I Dialog Constants CANCEL ID UpdateUI get String Jar Verification Dialog Cancel NON NLS 1 true else create Button parent I Dialog Constants CANCEL ID UpdateUI get String Jar Verification Dialog Cancel NON NLS 1 true get Button I Dialog Constants CANCEL ID set Focus  createButtonsForButtonBar _VerificationResult getVerificationCode IVerificationResult TYPE_ENTRY_CORRUPTED _VerificationResult isFeatureVerification createButton IDialogConstants OK_ID getString JarVerificationDialog createButton IDialogConstants OK_ID getString JarVerificationDialog createButton IDialogConstants CANCEL_ID getString JarVerificationDialog createButton IDialogConstants CANCEL_ID getString JarVerificationDialog getButton IDialogConstants CANCEL_ID setFocus
protected Control create Dialog Area Composite parent Composite composite Parent Composite super create Dialog Area parent set Title Image this get Image set Title UpdateUI get String Jar Verification Dialog Title NON NLS 1  DialogPage create Control composite Parent page Container Composite  DialogPage get Control Grid Data gd new Grid Data Grid Data FILL BOTH page Container set Layout Data gd page Container set Font parent get Font Build the separator line Label separator new Label composite Parent SWT HORIZONTAL SWT SEPARATOR separator set Layout Data new Grid Data Grid Data FILL HORIZONTAL return composite Parent  createDialogArea compositeParent createDialogArea setTitleImage getImage setTitle getString JarVerificationDialog _DialogPage createControl compositeParent pageContainer _DialogPage getControl GridData GridData GridData FILL_BOTH pageContainer setLayoutData pageContainer setFont getFont compositeParent setLayoutData GridData GridData FILL_HORIZONTAL compositeParent
see I Dialog Page get Image public Image get Image if default Image null default Image default Image Descriptor create Image return default Image  IDialogPage getImage getImage defaultImage defaultImage defaultImageDescriptor createImage defaultImage
public boolean close dispose of image if default Image null default Image dispose default Image null return super close  defaultImage defaultImage defaultImage

public Jar Verification Page I Verification Result verification Result super UpdateUI get String Jar Verification Dialog Verification NON NLS 1  fileName verification Result get Content Reference get Identifier  VerificationResult verification Result  strId verification Result get Feature get Versioned Identifier to String  strFeatureName verification Result get Feature get Label  strProviderName verification Result get Feature get Provider component Verified verification Result is Feature Verification Feature File NON NLS 1 NON NLS 2  JarVerificationPage IVerificationResult verificationResult getString JarVerificationDialog _fileName verificationResult getContentReference getIdentifier _VerificationResult verificationResult _strId verificationResult getFeature getVersionedIdentifier toString _strFeatureName verificationResult getFeature getLabel _strProviderName verificationResult getFeature getProvider componentVerified verificationResult isFeatureVerification
protected Control create Contents Composite composite Parent Workbench Help set Help composite Parent org eclipse update ui Jar Verification Page NON NLS 1 Composite Client Composite composite Client new Composite composite Parent SWT NULL Grid Layout layout new Grid Layout layout margin Height layout margin Width 0 composite Client set Layout layout composite Client set Layout Data new Grid Data Grid Data FILL BOTH Text Information create Text Area composite Client Certificate Area create Certificate Area composite Client File and Feature Information create Information Area composite Client Choice Area create Choice Area composite Client Dialog apply Dialog Font composite Parent return composite Client  createContents compositeParent WorkbenchHelp setHelp compositeParent JarVerificationPage compositeClient compositeParent GridLayout GridLayout marginHeight marginWidth compositeClient setLayout compositeClient setLayoutData GridData GridData FILL_BOTH createTextArea compositeClient createCertificateArea compositeClient createInformationArea compositeClient createChoiceArea compositeClient applyDialogFont compositeParent compositeClient
private void create Text Area Composite composite Client Label Information Label label Information new Label composite Client SWT WRAP label Information set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING Grid Data FILL HORIZONTAL String Buffer strb new String Buffer switch  VerificationResult get Verification Code case I Verification Result TYPE ENTRY NOT SIGNED String msg UpdateUI get String Jar Verification Dialog About To Install NON NLS 1 component Verified set Message msg WARNING strb append UpdateUI get String Jar Verification Dialog Not Digitally Signed NON NLS 1 component Verified strb append r n NON NLS 1 strb append UpdateUI get String Jar Verification Dialog Cannot Verify Provider NON NLS 1 component Verified strb append r n NON NLS 1 if  VerificationResult is Feature Verification strb append UpdateUI get Resource String Jar Verification Dialog Install May Corrupt NON NLS 1 else strb append UpdateUI get Resource String Jar Verification Dialog Continue May Corrupt NON NLS 1 label Information set Text strb to String break case I Verification Result TYPE ENTRY CORRUPTED msg UpdateUI get String Jar Verification Dialog Corrupted Content NON NLS 1 component Verified set Message msg ERROR strb append UpdateUI get String Jar Verification Dialog Component Not Installed NON NLS 1 label Information set Text strb to String break case I Verification Result TYPE ENTRY SIGNED UNRECOGNIZED msg UpdateUI get String Jar Verification Dialog Signed Component NON NLS 1 component Verified set Message msg WARNING strb append UpdateUI get String Jar Verification Dialog Unknown Certificate NON NLS 1 component Verified strb append r n NON NLS 1 strb append UpdateUI get String Jar Verification Dialog Unable To Verify Provider NON NLS 1 component Verified strb append r n NON NLS 1 if  VerificationResult is Feature Verification strb append UpdateUI get Resource String Jar Verification Dialog Install May Corrupt NON NLS 1 else strb append UpdateUI get Resource String Jar Verification Dialog Continue May Corrupt NON NLS 1 label Information set Text strb to String break case I Verification Result TYPE ENTRY SIGNED RECOGNIZED msg UpdateUI get String Jar Verification Dialog Signed Component NON NLS 1 component Verified set Message msg WARNING strb append UpdateUI get String Jar Verification Dialog Known Certificate NON NLS 1 component Verified strb append r n NON NLS 1 strb append UpdateUI get String Jar Verification Dialog Provider Known NON NLS 1 component Verified strb append r n NON NLS 1 label Information set Text strb to String create Caution Area composite Client break  createTextArea compositeClient labelInformation compositeClient labelInformation setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING GridData FILL_HORIZONTAL StringBuffer StringBuffer _VerificationResult getVerificationCode IVerificationResult TYPE_ENTRY_NOT_SIGNED getString JarVerificationDialog AboutToInstall componentVerified setMessage getString JarVerificationDialog NotDigitallySigned componentVerified getString JarVerificationDialog CannotVerifyProvider componentVerified _VerificationResult isFeatureVerification getResourceString JarVerificationDialog InstallMayCorrupt getResourceString JarVerificationDialog ContinueMayCorrupt labelInformation setText toString IVerificationResult TYPE_ENTRY_CORRUPTED getString JarVerificationDialog CorruptedContent componentVerified setMessage getString JarVerificationDialog ComponentNotInstalled labelInformation setText toString IVerificationResult TYPE_ENTRY_SIGNED_UNRECOGNIZED getString JarVerificationDialog SignedComponent componentVerified setMessage getString JarVerificationDialog UnknownCertificate componentVerified getString JarVerificationDialog UnableToVerifyProvider componentVerified _VerificationResult isFeatureVerification getResourceString JarVerificationDialog InstallMayCorrupt getResourceString JarVerificationDialog ContinueMayCorrupt labelInformation setText toString IVerificationResult TYPE_ENTRY_SIGNED_RECOGNIZED getString JarVerificationDialog SignedComponent componentVerified setMessage getString JarVerificationDialog KnownCertificate componentVerified getString JarVerificationDialog ProviderKnown componentVerified labelInformation setText toString createCautionArea compositeClient
private void create Information Area Composite composite Client Composite Information labels Composite composite Information new Composite composite Client SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width layout margin Height 0 composite Information set Layout layout composite Information set Layout Data new Grid Data Grid Data FILL HORIZONTAL Feature name Label key Label null C Label value Label null if  strFeatureName null  strFeatureName length 0 key Label new Label composite Information SWT NULL key Label set Text UpdateUI get String Jar Verification Dialog Feature Name NON NLS 1 value Label new C Label composite Information SWT NULL value Label set Font J Face Resources get Banner Font value Label set Text  strFeatureName value Label set Layout Data new Grid Data Grid Data FILL HORIZONTAL Feature identifier if  strId null  strId length 0 key Label new Label composite Information SWT NULL key Label set Text UpdateUI get String Jar Verification Dialog Feature Identifier NON NLS 1 value Label new C Label composite Information SWT NULL value Label set Font J Face Resources get Banner Font value Label set Text  strId value Label set Layout Data new Grid Data Grid Data FILL HORIZONTAL Provider name if  strProviderName null  strProviderName length 0 key Label new Label composite Information SWT NULL key Label set Text UpdateUI get String Jar Verification Dialog Provider NON NLS 1 value Label new C Label composite Information SWT NULL value Label set Font J Face Resources get Banner Font value Label set Text  strProviderName value Label set Layout Data new Grid Data Grid Data FILL HORIZONTAL Label File name key Label new Label composite Information SWT NULL key Label set Text UpdateUI get String Jar Verification Dialog File Name NON NLS 1 value Label new C Label composite Information SWT NULL value Label set Font J Face Resources get Banner Font value Label set Text  fileName value Label set Layout Data new Grid Data Grid Data FILL HORIZONTAL  createInformationArea compositeClient compositeInformation compositeClient GridLayout GridLayout numColumns marginWidth marginHeight compositeInformation setLayout compositeInformation setLayoutData GridData GridData FILL_HORIZONTAL keyLabel CLabel valueLabel _strFeatureName _strFeatureName keyLabel compositeInformation keyLabel setText getString JarVerificationDialog FeatureName valueLabel CLabel compositeInformation valueLabel setFont JFaceResources getBannerFont valueLabel setText _strFeatureName valueLabel setLayoutData GridData GridData FILL_HORIZONTAL _strId _strId keyLabel compositeInformation keyLabel setText getString JarVerificationDialog FeatureIdentifier valueLabel CLabel compositeInformation valueLabel setFont JFaceResources getBannerFont valueLabel setText _strId valueLabel setLayoutData GridData GridData FILL_HORIZONTAL _strProviderName _strProviderName keyLabel compositeInformation keyLabel setText getString JarVerificationDialog valueLabel CLabel compositeInformation valueLabel setFont JFaceResources getBannerFont valueLabel setText _strProviderName valueLabel setLayoutData GridData GridData FILL_HORIZONTAL keyLabel compositeInformation keyLabel setText getString JarVerificationDialog FileName valueLabel CLabel compositeInformation valueLabel setFont JFaceResources getBannerFont valueLabel setText _fileName valueLabel setLayoutData GridData GridData FILL_HORIZONTAL
private void create Certificate Area Composite composite Client if  VerificationResult get Verification Code I Verification Result TYPE ENTRY SIGNED UNRECOGNIZED  VerificationResult get Verification Code I Verification Result TYPE ENTRY SIGNED RECOGNIZED Group box Group group new Group composite Client SWT SHADOW ETCHED IN Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width layout margin Height 0 group set Layout layout group set Layout Data new Grid Data Grid Data FILL HORIZONTAL group set Text UpdateUI get String Jar Verification Dialog Certificate Info NON NLS 1 Signer Label key Label null Text value Text null data new Grid Data Grid Data FILL HORIZONTAL data horizontal Indent 0 text Information set Layout Data data if  VerificationResult get Signer Info null key Label new Label group SWT NULL key Label set Text UpdateUI get String Jar Verification Dialog SubjectCA NON NLS 1 key Label set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING value Text new Text group SWT MULTI SWT BORDER SWT WRAP SWT V SCROLL value Text set Text  VerificationResult get Signer Info value Text set Editable false value Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL Authenticator if  VerificationResult get Verifier Info null key Label new Label group SWT NULL key Label set Text UpdateUI get String Jar Verification Dialog RootCA NON NLS 1 key Label set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING value Text new Text group SWT MULTI SWT BORDER SWT WRAP SWT V SCROLL value Text set Text  VerificationResult get Verifier Info value Text set Editable false value Text set Layout Data new Grid Data Grid Data FILL HORIZONTAL  createCertificateArea compositeClient _VerificationResult getVerificationCode IVerificationResult TYPE_ENTRY_SIGNED_UNRECOGNIZED _VerificationResult getVerificationCode IVerificationResult TYPE_ENTRY_SIGNED_RECOGNIZED compositeClient SHADOW_ETCHED_IN GridLayout GridLayout numColumns marginWidth marginHeight setLayout setLayoutData GridData GridData FILL_HORIZONTAL setText getString JarVerificationDialog CertificateInfo keyLabel valueText GridData GridData FILL_HORIZONTAL horizontalIndent textInformation setLayoutData _VerificationResult getSignerInfo keyLabel keyLabel setText getString JarVerificationDialog keyLabel setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING valueText V_SCROLL valueText setText _VerificationResult getSignerInfo valueText setEditable valueText setLayoutData GridData GridData FILL_HORIZONTAL _VerificationResult getVerifierInfo keyLabel keyLabel setText getString JarVerificationDialog keyLabel setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING valueText V_SCROLL valueText setText _VerificationResult getVerifierInfo valueText setEditable valueText setLayoutData GridData GridData FILL_HORIZONTAL
Sets the Dialog public void set Title Area Dialog Title Area Dialog dialog  Dialog dialog  setTitleAreaDialog TitleAreaDialog _Dialog
public void set Message String new Message int new Type super set Message new Message new Type if  Dialog null  Dialog set Message new Message new Type  setMessage newMessage newType setMessage newMessage newType _Dialog _Dialog setMessage newMessage newType

If no shell create a new shell public Jar Verification Service this null  JarVerificationService
public Jar Verification Service Shell a Shell shell a Shell find the default display and get the active shell if shell null final Display disp Display get Default if disp null shell new Shell new Display else disp sync Exec new Runnable public void run shell disp get Active Shell  JarVerificationService aShell aShell getDefault syncExec getActiveShell
private int open Wizard I Verification Result result int code I Dialog Page page new Jar Verification Page result Jar Verification Dialog dialog new Jar Verification Dialog shell page result dialog create dialog get Shell set Size 600 500 dialog get Shell set Text UpdateUI get String Jar Verification Dialog wtitle NON NLS 1 dialog open if dialog get Return Code Jar Verification Dialog OK code CHOICE INSTALL TRUST ALWAYS else code CHOICE ABORT return code  openWizard IVerificationResult IDialogPage JarVerificationPage JarVerificationDialog JarVerificationDialog getShell setSize getShell setText getString JarVerificationDialog getReturnCode JarVerificationDialog CHOICE_INSTALL_TRUST_ALWAYS CHOICE_ABORT
final int wizard Result new int 1 shell get Display sync Exec new Runnable public void run wizard Result 0 open Wizard verification Result  wizardResult getDisplay syncExec wizardResult openWizard verificationResult
public int prompt final I Verification Result verification Result if Update Core get Plugin get Plugin Preferences get Boolean Update Core P CHECK SIGNATURE return CHOICE INSTALL TRUST ALWAYS if verification Result already Seen return CHOICE INSTALL TRUST ALWAYS if see verification Result return CHOICE INSTALL TRUST ALWAYS switch verification Result get Verification Code case I Verification Result UNKNOWN ERROR return CHOICE ERROR case I Verification Result VERIFICATION CANCELLED return CHOICE ABORT cannot verify it do not prompt user case I Verification Result TYPE ENTRY UNRECOGNIZED return CHOICE INSTALL TRUST ALWAYS default final int wizard Result new int 1 shell get Display sync Exec new Runnable public void run wizard Result 0 open Wizard verification Result return wizard Result 0  IVerificationResult verificationResult UpdateCore getPlugin getPluginPreferences getBoolean UpdateCore P_CHECK_SIGNATURE CHOICE_INSTALL_TRUST_ALWAYS verificationResult alreadySeen CHOICE_INSTALL_TRUST_ALWAYS verificationResult CHOICE_INSTALL_TRUST_ALWAYS verificationResult getVerificationCode IVerificationResult UNKNOWN_ERROR CHOICE_ERROR IVerificationResult VERIFICATION_CANCELLED CHOICE_ABORT IVerificationResult TYPE_ENTRY_UNRECOGNIZED CHOICE_INSTALL_TRUST_ALWAYS wizardResult getDisplay syncExec wizardResult openWizard verificationResult wizardResult
Checks whether feature archive has been seen already Remembers the fact that archive is being seen now param verification Result return true if the archive has been seen before false if first time private boolean see final I Verification Result verification Result String key verification Result get Feature get Versioned Identifier to String verification Result get Content Reference get Identifier NON NLS 1 Long value new Long verification Result get Content Reference get Last Modified Long cached Value Long processed get key if value equals cached Value return true else processed put key value return false  verificationResult IVerificationResult verificationResult verificationResult getFeature getVersionedIdentifier toString verificationResult getContentReference getIdentifier verificationResult getContentReference getLastModified cachedValue cachedValue

protected Password Authentication get Password Authentication String protocol get Requesting Protocol String host get Requesting Host can be null Inet Address address get Requesting Site can be null int port get Requesting Port String prompt get Requesting Prompt realm or message not documented that can be null String scheme get Requesting Scheme not documented that can be null String host String host if host String null address null address get Host Name if host String null host String NON NLS 1 String prompt String prompt if prompt null prompt String NON NLS 1 Authentication auth User Validation Dialog get Authentication host String prompt String if auth null return new Password Authentication auth get User auth get Password to Char Array else return null  PasswordAuthentication getPasswordAuthentication getRequestingProtocol getRequestingHost InetAddress getRequestingSite getRequestingPort getRequestingPrompt getRequestingScheme hostString hostString getHostName hostString hostString promptString promptString UserValidationDialog getAuthentication hostString promptString PasswordAuthentication getUser getPassword toCharArray

class UI Operation implements Runnable public Authentication authentication public void run authentication User Validation Dialog ask For Authentication host message  UIOperation UserValidationDialog askForAuthentication
protected Authentication user Authentication null Gets user and password from a user May be called from any thread return User Authentication that contains the userid and the password or code null code if the dialog has been cancelled public static Authentication get Authentication final String host final String message class UI Operation implements Runnable public Authentication authentication public void run authentication User Validation Dialog ask For Authentication host message UI Operation uio new UI Operation if Display get Current null uio run else Display get Default sync Exec uio return uio authentication  userAuthentication UserAuthentication getAuthentication UIOperation UserValidationDialog askForAuthentication UIOperation UIOperation getCurrent getDefault syncExec
Gets user and password from a user Must be called from UI thread return User Authentication that contains the userid and the password or code null code if the dialog has been cancelled protected static Authentication ask For Authentication String host String message User Validation Dialog ui new User Validation Dialog null host message NON NLS 1 ui open return ui get Authentication  UserAuthentication askForAuthentication UserValidationDialog UserValidationDialog getAuthentication
Creates a new User Validation Dialog param parent Shell parent Shell or null protected User Validation Dialog Shell parent Shell String host String message super parent Shell this host host this message message set Block On Open true  UserValidationDialog parentShell UserValidationDialog parentShell parentShell setBlockOnOpen
protected void configure Shell Shell new Shell super configure Shell new Shell new Shell set Text UpdateUI get String User Verification Dialog Password Required NON NLS 1  configureShell newShell configureShell newShell newShell setText getString UserVerificationDialog PasswordRequired
public void create super create give focus to username field username Field select All username Field set Focus  usernameField selectAll usernameField setFocus
protected Control create Dialog Area Composite parent Composite main new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 3 main set Layout layout main set Layout Data new Grid Data Grid Data FILL BOTH Label label new Label main SWT WRAP String text UpdateUI get String User Verification Dialog Connect To host NON NLS 1 text n n message NON NLS 1 NON NLS 2 label set Text text Grid Data data new Grid Data Grid Data FILL HORIZONTAL data horizontal Span 3 label set Layout Data data create Username Fields main create Password Fields main Workbench Help set Help main org eclipse update ui User Validation Dialog NON NLS 1 return main  createDialogArea GridLayout GridLayout numColumns setLayout setLayoutData GridData GridData FILL_BOTH getString UserVerificationDialog ConnectTo setText GridData GridData GridData FILL_HORIZONTAL horizontalSpan setLayoutData createUsernameFields createPasswordFields WorkbenchHelp setHelp UserValidationDialog
Creates the three widgets that represent the user name entry area protected void create Password Fields Composite parent new Label parent SWT NONE set Text UpdateUI get String User Verification Dialog Password NON NLS 1 password Field new Text parent SWT BORDER SWT PASSWORD Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint convert HorizontalDL Us To Pixels I Dialog Constants ENTRY FIELD WIDTH password Field set Layout Data data new Label parent SWT NONE spacer  createPasswordFields setText getString UserVerificationDialog passwordField GridData GridData GridData FILL_HORIZONTAL widthHint convertHorizontalDLUsToPixels IDialogConstants ENTRY_FIELD_WIDTH passwordField setLayoutData
Creates the three widgets that represent the user name entry area protected void create Username Fields Composite parent new Label parent SWT NONE set Text UpdateUI get String User Verification Dialog User Name NON NLS 1 username Field new Text parent SWT BORDER Grid Data data new Grid Data Grid Data FILL HORIZONTAL data width Hint convert HorizontalDL Us To Pixels I Dialog Constants ENTRY FIELD WIDTH username Field set Layout Data data new Label parent SWT NONE spacer  createUsernameFields setText getString UserVerificationDialog UserName usernameField GridData GridData GridData FILL_HORIZONTAL widthHint convertHorizontalDLUsToPixels IDialogConstants ENTRY_FIELD_WIDTH usernameField setLayoutData
Returns the User Authentication entered by the user or null if the user canceled public Authentication get Authentication return user Authentication  UserAuthentication getAuthentication userAuthentication
Notifies that the ok button of this dialog has been pressed protected void ok Pressed user Authentication new Authentication username Field get Text password Field get Text super ok Pressed  okPressed userAuthentication usernameField getText passwordField getText okPressed

public class Update Label Provider extends Shared Label Provider Constructor for Update Label Provider public Update Label Provider  UpdateLabelProvider SharedLabelProvider UpdateLabelProvider UpdateLabelProvider
public String get Text Object obj return super get Text obj  getText getText
public Image get Image Object obj return super get Image obj  getImage getImage
public Image Descriptor get Local Site Descriptor I Configured Site csite if csite is Product Site return UpdateUI Images DESC PSITE OBJ if csite is Extension Site return UpdateUI Images DESC ESITE OBJ return UpdateUI Images DESC LSITE OBJ  ImageDescriptor getLocalSiteDescriptor IConfiguredSite isProductSite UpdateUIImages DESC_PSITE_OBJ isExtensionSite UpdateUIImages DESC_ESITE_OBJ UpdateUIImages DESC_LSITE_OBJ
public Image get Local Site Image I Configured Site csite Image Descriptor desc get Local Site Descriptor csite return get desc  getLocalSiteImage IConfiguredSite ImageDescriptor getLocalSiteDescriptor

The constructor public UpdateUI plugin this try resource Bundle Resource Bundle get Bundle org eclipse update internal ui UpdateUI Plugin Resources NON NLS 1 catch Missing Resource Exception x resource Bundle null  resourceBundle ResourceBundle getBundle UpdateUIPluginResources MissingResourceException resourceBundle
Returns the shared instance public static UpdateUI get Default return plugin  getDefault
public static I Workbench Page get Active Page return get Default internal Get Active Page  IWorkbenchPage getActivePage getDefault internalGetActivePage
private I Workbench Page internal Get Active Page I Workbench Window window get Workbench get Active Workbench Window if window null return window get Active Page return null  IWorkbenchPage internalGetActivePage IWorkbenchWindow getWorkbench getActiveWorkbenchWindow getActivePage
public static Shell get Active Workbench Shell I Workbench Window window get Active Workbench Window return window null window get Shell null  getActiveWorkbenchShell IWorkbenchWindow getActiveWorkbenchWindow getShell
public static I Workbench Window get Active Workbench Window return get Default get Workbench get Active Workbench Window  IWorkbenchWindow getActiveWorkbenchWindow getDefault getWorkbench getActiveWorkbenchWindow
public static String get Plugin Id return get Default get Bundle get Symbolic Name  getPluginId getDefault getBundle getSymbolicName
public Update Label Provider get Label Provider if label Provider null label Provider new Update Label Provider return label Provider  UpdateLabelProvider getLabelProvider labelProvider labelProvider UpdateLabelProvider labelProvider
Returns the string from the plugin s resource bundle or key if not found public static String get String String key Resource Bundle bundle UpdateUI get Default get Resource Bundle try return bundle get String key catch Missing Resource Exception e return key  getString ResourceBundle getDefault getResourceBundle getString MissingResourceException
public static String get Formatted Message String key String args String text get String key return java text Message Format format text args  getFormattedMessage getString MessageFormat
public static String get Formatted Message String key String arg String text get String key return java text Message Format format text new String arg  getFormattedMessage getString MessageFormat
Returns the plugin s resource bundle public Resource Bundle get Resource Bundle return resource Bundle  ResourceBundle getResourceBundle resourceBundle
public void start Bundle Context context throws Exception super start context model new Update Model authenticator new Update Manager Authenticator Authenticator set Default authenticator int history Pref get Plugin Preferences get Int Update Core P HISTORY SIZE if history Pref 0 Update Core DEFAULT HISTORY history Pref  BundleContext UpdateModel UpdateManagerAuthenticator setDefault historyPref getPluginPreferences getInt UpdateCore P_HISTORY_SIZE historyPref UpdateCore DEFAULT_HISTORY historyPref
public boolean is Web App Started return app Server Host null  isWebAppStarted appServerHost
public String get App Server Host return app Server Host  getAppServerHost appServerHost
public int get App Server Port return app Server Port  getAppServerPort appServerPort
public void stop Bundle Context context throws Exception if model null model shutdown if label Provider null label Provider dispose super stop context  BundleContext labelProvider labelProvider
public Update Model get Update Model return model  UpdateModel getUpdateModel
public static void log Exception Throwable e log Exception e true  logException logException
public static void log Exception Throwable e boolean show Error Dialog if e instanceof Invocation Target Exception e Invocation Target Exception e get Target Exception I Status status null if e instanceof Core Exception status Core Exception e get Status else String message e get Message if message null message e to String status new Status I Status ERROR get Plugin Id I Status OK message e log status show Error Dialog  logException showErrorDialog InvocationTargetException InvocationTargetException getTargetException IStatus CoreException CoreException getStatus getMessage toString IStatus getPluginId IStatus showErrorDialog
public static void log I Status status boolean show Error Dialog if status get Severity I Status INFO if show Error Dialog Error Dialog open Error get Active Workbench Shell null null status Resources Plugin get Plugin get Log log status Should log on the update plugin s log Platform get Plugin org eclipse core runtime get Log log status Bundle bundle Platform get Bundle org eclipse update ui NON NLS 1 Platform get Log bundle log status else Message Dialog open Information get Active Workbench Shell null status get Message  IStatus showErrorDialog getSeverity IStatus showErrorDialog ErrorDialog openError getActiveWorkbenchShell ResourcesPlugin getPlugin getLog getPlugin getLog getBundle getLog MessageDialog openInformation getActiveWorkbenchShell getMessage
public static I Feature search Site String feature Id I Configured Site site boolean only Configured throws Core Exception I Feature Reference references null if only Configured references site get Configured Features else references site get Site get Feature References Vector result new Vector for int i 0 i references length i I Feature feature references i get Feature null String id feature get Versioned Identifier get Identifier if feature Id equals id result add feature return I Feature result to Array new I Feature result size  IFeature searchSite featureId IConfiguredSite onlyConfigured CoreException IFeatureReference onlyConfigured getConfiguredFeatures getSite getFeatureReferences IFeature getFeature getVersionedIdentifier getIdentifier featureId IFeature toArray IFeature
public static I Feature get Installed Features I Feature feature return get Installed Features feature true  IFeature getInstalledFeatures IFeature getInstalledFeatures
public static I Feature get Installed Features I Feature feature boolean only Configured Vector features new Vector try I Local Site local Site Site Manager get Local Site I Install Configuration config local Site get Current Configuration I Configured Site isites config get Configured Sites Versioned Identifier vid feature get Versioned Identifier String id vid get Identifier for int i 0 i isites length i I Configured Site isite isites i I Feature result UpdateUI search Site id isite only Configured for int j 0 j result length j I Feature installed Feature result j features add installed Feature catch Core Exception e UpdateUI log Exception e return I Feature features to Array new I Feature features size  IFeature getInstalledFeatures IFeature onlyConfigured ILocalSite localSite SiteManager getLocalSite IInstallConfiguration localSite getCurrentConfiguration IConfiguredSite getConfiguredSites VersionedIdentifier getVersionedIdentifier getIdentifier IConfiguredSite IFeature searchSite onlyConfigured IFeature installedFeature installedFeature CoreException logException IFeature toArray IFeature
Gets the authenticator return Returns a Update Manager Authenticator public Update Manager Authenticator get Authenticator return authenticator  UpdateManagerAuthenticator UpdateManagerAuthenticator getAuthenticator
public static URL get OriginatingURL String id I Dialog Settings section get OriginatingURL Section String value section get id if value null try return new URL value catch MalformedURL Exception e return null  getOriginatingURL IDialogSettings getOriginatingURLSection MalformedURLException
public static void set OriginatingURL String id URL url I Dialog Settings section get OriginatingURL Section section put id url to String  setOriginatingURL IDialogSettings getOriginatingURLSection toString
private static I Dialog Settings get OriginatingURL Section I Dialog Settings settings get Default get Dialog Settings I Dialog Settings section settings get Section originatingUR Ls NON NLS 1 if section null section settings add New Section originatingUR Ls NON NLS 1 return section  IDialogSettings getOriginatingURLSection IDialogSettings getDefault getDialogSettings IDialogSettings getSection originatingURLs addNewSection originatingURLs
Prompts the user to restart param restart Is Really Needed true when a restart is needed false if the user feels lucky tm and wants the changes applied to the current config public static void request Restart boolean restart Is Really Needed boolean restart Restart Dialog open Question get Active Workbench Shell restart Is Really Needed if restart PlatformUI get Workbench restart  restartIsReallyNeeded requestRestart restartIsReallyNeeded RestartDialog openQuestion getActiveWorkbenchShell restartIsReallyNeeded getWorkbench
public static void showURL String url showURL url false 
public static void showURL String url boolean encode Host And Port if encode Host And Port url encode Host And Port url if SWT get Platform equals win32 NON NLS 1 Program launch url else I Browser browser Browser Manager get Instance create Browser try browser displayURL url catch Exception e UpdateUI log Exception e  encodeHostAndPort encodeHostAndPort encodeHostAndPort getPlatform IBrowser BrowserManager getInstance createBrowser logException
private static String encode Host And Port String url Name String callbackURL get CallbackURL As String if callbackURL null return url Name String callback Parameter updateURL callbackURL NON NLS 1 if url Name index Of 1 return url Name callback Parameter NON NLS 1 else return url Name callback Parameter NON NLS 1  encodeHostAndPort urlName getCallbackURLAsString urlName callbackParameter urlName indexOf urlName callbackParameter urlName callbackParameter
private static String get CallbackURL As String String host get Default get App Server Host int port get Default get App Server Port if host null port 0 return null else String value http NON NLS 1 host NON NLS 1 port NON NLS 1 WEB APP ID install NON NLS 1 try value URL Encoder encode value UTF 8 NON NLS 1 catch Unsupported Encoding Exception e return value  getCallbackURLAsString getDefault getAppServerHost getDefault getAppServerPort WEB_APP_ID URLEncoder UnsupportedEncodingException
public static boolean get Remind On Cancel return remind On Cancel  getRemindOnCancel remindOnCancel
public static void set Remind On Cancel boolean remind remind On Cancel remind  setRemindOnCancel remindOnCancel

public static final Image Descriptor DESC ITEM create PATH FORMS topic gif NON NLS 1 private static Image Descriptor create String prefix String name return Image Descriptor create FromURL make ImageURL prefix name  ImageDescriptor DESC_ITEM PATH_FORMS ImageDescriptor ImageDescriptor createFromURL makeImageURL
private static URL make ImageURL String prefix String name try URL base UpdateUI get Default get Bundle get Entry prefix return new URL base name catch MalformedURL Exception e return null  makeImageURL getDefault getBundle getEntry MalformedURLException

public Configuration Preview Configuration View view this view view Update Model model UpdateUI get Default get Update Model model add Update Model Changed Listener this  ConfigurationPreview ConfigurationView UpdateModel getDefault getUpdateModel addUpdateModelChangedListener
public void dispose Update Model model UpdateUI get Default get Update Model model remove Update Model Changed Listener this toolkit dispose  UpdateModel getDefault getUpdateModel removeUpdateModelChangedListener
public void objects Added Object parent Object children  objectsAdded
public void objects Added Object parent Object children public void objects Removed Object parent Object children  objectsAdded objectsRemoved
public void objects Removed Object parent Object children public void object Changed Object object String property  objectsRemoved objectChanged
public Control get Control return form  getControl
I Hyperlink Listener url Action new Hyperlink Adapter public void link Activated Hyperlink Event e String url String e get Href if url null UpdateUI showURL url  IHyperlinkListener urlAction HyperlinkAdapter linkActivated HyperlinkEvent getHref
I Hyperlink Listener task Action new Hyperlink Adapter public void link Activated Hyperlink Event e String index Arg String e get Href try int index Integer parse Int index Arg if tasks null tasks index run catch Number Format Exception ex  IHyperlinkListener taskAction HyperlinkAdapter linkActivated HyperlinkEvent indexArg getHref parseInt indexArg NumberFormatException
public void create Control Composite parent toolkit new Form Toolkit parent get Display form toolkit create Scrolled Form parent Table Wrap Layout layout new Table Wrap Layout form get Body set Layout layout layout left Margin 10 layout right Margin 5 layout top Margin 10 layout horizontal Spacing 0 layout vertical Spacing 20 I Hyperlink Listener url Action new Hyperlink Adapter public void link Activated Hyperlink Event e String url String e get Href if url null UpdateUI showURL url I Hyperlink Listener task Action new Hyperlink Adapter public void link Activated Hyperlink Event e String index Arg String e get Href try int index Integer parse Int index Arg if tasks null tasks index run catch Number Format Exception ex task Action set Status Line Manager view get Configuration Window get Status Line Manager desc toolkit create Form Text form get Body true desc set Hyperlink Settings toolkit get Hyperlink Group desc add Hyperlink Listener url Action desc set Text false false NON NLS 1 Table Wrap Data td new Table Wrap Data Table Wrap Data FILL GRAB desc set Layout Data td task List toolkit create Form Text form get Body true task List set Hyperlink Settings toolkit get Hyperlink Group task List add Hyperlink Listener task Action NON NLS 1 task List set Text false false NON NLS 1 factory set Hyperlink Underline Mode Hyperlink Settings UNDERLINE ROLLOVER td new Table Wrap Data Table Wrap Data FILL GRAB task List set Layout Data td Workbench Help set Help parent org eclipse update ui Site Form NON NLS 1  createControl FormToolkit getDisplay createScrolledForm TableWrapLayout TableWrapLayout getBody setLayout leftMargin rightMargin topMargin horizontalSpacing verticalSpacing IHyperlinkListener urlAction HyperlinkAdapter linkActivated HyperlinkEvent getHref IHyperlinkListener taskAction HyperlinkAdapter linkActivated HyperlinkEvent indexArg getHref parseInt indexArg NumberFormatException taskAction setStatusLineManager getConfigurationWindow getStatusLineManager createFormText getBody setHyperlinkSettings getHyperlinkGroup addHyperlinkListener urlAction setText TableWrapData TableWrapData TableWrapData FILL_GRAB setLayoutData taskList createFormText getBody taskList setHyperlinkSettings getHyperlinkGroup taskList addHyperlinkListener taskAction taskList setText setHyperlinkUnderlineMode HyperlinkSettings UNDERLINE_ROLLOVER TableWrapData TableWrapData FILL_GRAB taskList setLayoutData WorkbenchHelp setHelp SiteForm
public void set Selection I Structured Selection selection Object object selection get First Element tasks view get Preview Tasks object String title get Object Label object form set Text title String description get Object Description object boolean tags description starts With form NON NLS 1 desc set Text description tags tags String task Text get Tasks Text task List set Text task Text true false form reflow true  setSelection IStructuredSelection getFirstElement getPreviewTasks getObjectLabel setText getObjectDescription startsWith setText taskText getTasksText taskList setText taskText
private String get Object Label Object object if object null return NON NLS 1 Tree Viewer viewer view get Tree Viewer Label Provider provider Label Provider viewer get Label Provider return provider get Text object  getObjectLabel TreeViewer getTreeViewer LabelProvider LabelProvider getLabelProvider getText
private String get Object Description Object object if object instanceof I Feature Adapter return get Feature Description I Feature Adapter object if object instanceof I Configured Site Adapter return UpdateUI get String Configuration Preview Form install NON NLS 1 if object instanceof I Local Site return UpdateUI get String Configuration Preview Form config Description NON NLS 1 return NON NLS 1  getObjectDescription IFeatureAdapter getFeatureDescription IFeatureAdapter IConfiguredSiteAdapter getString ConfigurationPreviewForm ILocalSite getString ConfigurationPreviewForm configDescription
private String get Feature Description I Feature Adapter adapter try I Feature feature adapter get Feature null IURL Entry entry feature get Description if entry null String text entry get Annotation if text null URL url entry getURL if url null return text else String link a href url Handler arg url NON NLS 1 More info a NON NLS 1 NON NLS 2 String full Text form p text link NON NLS 1 p form NON NLS 1 NON NLS 2 return full Text catch Core Exception e return NON NLS 1  getFeatureDescription IFeatureAdapter IFeature getFeature IURLEntry getDescription getAnnotation urlHandler fullText fullText CoreException
private String get Tasks Text if tasks null tasks length 0 return form NON NLS 1 boolean has Enabled Tasks false for int i 0 i tasks length i if tasks i is Enabled has Enabled Tasks true break if has Enabled Tasks return form NON NLS 1 String Buffer buf new String Buffer buf append form p b Available Tasks b p NON NLS 1 for int i 0 i tasks length i I Preview Task task tasks i if task is Enabled false continue buf append li style text indent 0 a href i NON NLS 1 NON NLS 2 task get Name a li NON NLS 1 NON NLS 2 NON NLS 3 buf append li style text indent 10 vspace false NON NLS 1 task get Description li NON NLS 1 NON NLS 2 buf append form NON NLS 1 return buf to String  getTasksText hasEnabledTasks isEnabled hasEnabledTasks hasEnabledTasks StringBuffer StringBuffer IPreviewTask isEnabled getName getDescription toString

class Configuration Sorter extends Viewer Sorter public int category Object obj sites if obj instanceof I Configured Site Adapter I Configured Site csite I Configured Site Adapter obj get Configured Site if csite is Product Site return 1 if csite is Extension Site return 2 return 3 return super category obj  ConfigurationSorter ViewerSorter IConfiguredSiteAdapter IConfiguredSite IConfiguredSiteAdapter getConfiguredSite isProductSite isExtensionSite
implements I Tree Content Provider public void input Changed Viewer viewer Object old Input Object new Input if new Input null return  ITreeContentProvider inputChanged oldInput newInput newInput
see I Tree Content Provider get Children Object public Object get Children Object parent if parent instanceof Update Model I Local Site local Site get Local Site return local Site null new Object local Site new Object 0 if parent instanceof I Local Site Object csites open Local Site if show Sites Action is Checked return csites Array List result new Array List boolean show Unconf show Unconf Features Action is Checked for int i 0 i csites length i I Configured Site Adapter adapter I Configured Site Adapter csites i Object roots get Features adapter show Unconf for int j 0 j roots length j result add roots j return result to Array if parent instanceof I Configured Site Adapter return get Features I Configured Site Adapter parent show Unconf Features Action is Checked if parent instanceof Configured Feature Adapter show Nested Features Action is Checked I Feature Adapter nested Configured Feature Adapter parent get Included Features null if show Unconf Features Action is Checked return nested Array List result new Array List for int i 0 i nested length i if Configured Feature Adapter nested i is Configured result add nested i return I Feature Adapter result to Array new I Feature Adapter result size return new Object 0  ITreeContentProvider getChildren getChildren UpdateModel ILocalSite localSite getLocalSite localSite localSite ILocalSite openLocalSite showSitesAction isChecked ArrayList ArrayList showUnconf showUnconfFeaturesAction isChecked IConfiguredSiteAdapter IConfiguredSiteAdapter getFeatures showUnconf toArray IConfiguredSiteAdapter getFeatures IConfiguredSiteAdapter showUnconfFeaturesAction isChecked ConfiguredFeatureAdapter showNestedFeaturesAction isChecked IFeatureAdapter ConfiguredFeatureAdapter getIncludedFeatures showUnconfFeaturesAction isChecked ArrayList ArrayList ConfiguredFeatureAdapter isConfigured IFeatureAdapter toArray IFeatureAdapter
public Object get Parent Object child return null  getParent
public boolean has Children Object parent if parent instanceof Configured Feature Adapter if show Nested Features Action is Checked return false I Feature Adapter features Configured Feature Adapter parent get Included Features null if show Unconf Features Action is Checked return features length 0 for int i 0 i features length i if Configured Feature Adapter features i is Configured return true return false if parent instanceof Configured Site Adapter I Configured Site site Configured Site Adapter parent get Configured Site if site is Enabled if show Unconf Features Action is Checked return site get Configured Features length 0 return site get Feature References length 0 return show Unconf Features Action is Checked return true  hasChildren ConfiguredFeatureAdapter showNestedFeaturesAction isChecked IFeatureAdapter ConfiguredFeatureAdapter getIncludedFeatures showUnconfFeaturesAction isChecked ConfiguredFeatureAdapter isConfigured ConfiguredSiteAdapter IConfiguredSite ConfiguredSiteAdapter getConfiguredSite isEnabled showUnconfFeaturesAction isChecked getConfiguredFeatures getFeatureReferences showUnconfFeaturesAction isChecked
public Object get Elements Object input return get Children input  getElements getChildren
class Local Site Label Provider extends Label Provider public String get Text Object obj if obj instanceof I Local Site I Product product Platform get Product if product null return product get Name return UpdateUI get String Configuration View current NON NLS 1 if obj instanceof I Configured Site Adapter I Configured Site csite I Configured Site Adapter obj get Configured Site I Site site csite get Site return new File site getURL get File to String if obj instanceof I Feature Adapter try I Feature feature I Feature Adapter obj get Feature null if feature instanceof Missing Feature return UpdateUI get Formatted Message Configuration View missing Feature NON NLS 1 feature get Label String version feature get Versioned Identifier get Version to String String pending NON NLS 1 if Operations Manager find Pending Operation feature null pending UpdateUI get String Configuration View pending NON NLS 1 return feature get Label version pending NON NLS 1 catch Core Exception e return UpdateUI get String Configuration View error NON NLS 1 return super get Text obj  LocalSiteLabelProvider LabelProvider getText ILocalSite IProduct getProduct getName getString ConfigurationView IConfiguredSiteAdapter IConfiguredSite IConfiguredSiteAdapter getConfiguredSite ISite getSite getFile toString IFeatureAdapter IFeature IFeatureAdapter getFeature MissingFeature getFormattedMessage ConfigurationView missingFeature getLabel getVersionedIdentifier getVersion toString OperationsManager findPendingOperation getString ConfigurationView getLabel CoreException getString ConfigurationView getText
public Image get Image Object obj Update Label Provider provider UpdateUI get Default get Label Provider if obj instanceof I Local Site return eclipse Image if obj instanceof Configured Feature Adapter return get Feature Image provider Configured Feature Adapter obj if obj instanceof I Configured Site Adapter I Configured Site csite I Configured Site Adapter obj get Configured Site int flags csite is Updatable 0 Update Label Provider F LINKED if csite is Enabled flags Update Label Provider F UNCONFIGURED return provider get provider get Local Site Descriptor csite flags return null  getImage UpdateLabelProvider getDefault getLabelProvider ILocalSite eclipseImage ConfiguredFeatureAdapter getFeatureImage ConfiguredFeatureAdapter IConfiguredSiteAdapter IConfiguredSite IConfiguredSiteAdapter getConfiguredSite isUpdatable UpdateLabelProvider F_LINKED isEnabled UpdateLabelProvider F_UNCONFIGURED getLocalSiteDescriptor
private Image get Feature Image Update Label Provider provider Configured Feature Adapter adapter try I Feature feature adapter get Feature null if feature instanceof Missing Feature if Missing Feature feature is Optional return provider get UpdateUI Images DESC NOTINST FEATURE OBJ return provider get UpdateUI Images DESC FEATURE OBJ Update Label Provider F ERROR boolean efix feature is Patch Image Descriptor base Desc efix UpdateUI Images DESC EFIX OBJ adapter is Configured UpdateUI Images DESC FEATURE OBJ UpdateUI Images DESC UNCONF FEATURE OBJ int flags 0 if efix adapter is Configured flags Update Label Provider F UNCONFIGURED if Operations Manager find Pending Operation feature null I Local Site local Site get Local Site if local Site null int code get Status Code feature local Site get Feature Status feature switch code case I Feature STATUS UNHAPPY flags Update Label Provider F ERROR break case I Feature STATUS AMBIGUOUS flags Update Label Provider F WARNING break default if adapter is Configured adapter is Updated flags Update Label Provider F UPDATED break return provider get base Desc flags catch Core Exception e return provider get UpdateUI Images DESC FEATURE OBJ Update Label Provider F ERROR  getFeatureImage UpdateLabelProvider ConfiguredFeatureAdapter IFeature getFeature MissingFeature MissingFeature isOptional UpdateUIImages DESC_NOTINST_FEATURE_OBJ UpdateUIImages DESC_FEATURE_OBJ UpdateLabelProvider F_ERROR isPatch ImageDescriptor baseDesc UpdateUIImages DESC_EFIX_OBJ isConfigured UpdateUIImages DESC_FEATURE_OBJ UpdateUIImages DESC_UNCONF_FEATURE_OBJ isConfigured UpdateLabelProvider F_UNCONFIGURED OperationsManager findPendingOperation ILocalSite localSite getLocalSite localSite getStatusCode localSite getFeatureStatus IFeature STATUS_UNHAPPY UpdateLabelProvider F_ERROR IFeature STATUS_AMBIGUOUS UpdateLabelProvider F_WARNING isConfigured isUpdated UpdateLabelProvider F_UPDATED baseDesc CoreException UpdateUIImages DESC_FEATURE_OBJ UpdateLabelProvider F_ERROR
private I Action action public Preview Task String name String desc I Action action this name name this desc desc this action action  IAction PreviewTask IAction
this action action public I Action get Action return action  IAction getAction
public String get Name if name null return name return action get Text  getName getText
return action get Text public String get Description return desc  getText getDescription
return desc public void set Description String desc this desc desc  setDescription
this desc desc public void run action run 
action run public boolean is Enabled return action is Enabled  isEnabled isEnabled
public Configuration View Configuration Manager Window window UpdateUI get Default get Label Provider connect this initialize Images configuration Window window  ConfigurationView ConfigurationManagerWindow getDefault getLabelProvider initializeImages configurationWindow
private void initialize Images Image Descriptor edesc UpdateUI Images DESC APP OBJ I Product product Platform get Product if product null String window ImageURL product get Property I Product Constants WINDOW IMAGE if window ImageURL null String window Images Urls product get Property I Product Constants WINDOW IMAGES if window Images Urls null String Tokenizer st new String Tokenizer window Images Urls NON NLS 1 if st has More Tokens window ImageURL st next Token if window ImageURL null try edesc Image Descriptor create FromURL new URL window ImageURL catch MalformedURL Exception e must be a path relative to the product bundle Bundle product Bundle product get Defining Bundle if product Bundle null URL url Platform find product Bundle new Path window ImageURL if url null edesc Image Descriptor create FromURL url eclipse Image UpdateUI get Default get Label Provider get edesc  initializeImages ImageDescriptor UpdateUIImages DESC_APP_OBJ IProduct getProduct windowImageURL getProperty IProductConstants WINDOW_IMAGE windowImageURL windowImagesUrls getProperty IProductConstants WINDOW_IMAGES windowImagesUrls StringTokenizer StringTokenizer windowImagesUrls hasMoreTokens windowImageURL nextToken windowImageURL ImageDescriptor createFromURL windowImageURL MalformedURLException productBundle getDefiningBundle productBundle productBundle windowImageURL ImageDescriptor createFromURL eclipseImage getDefault getLabelProvider
model Listener new I Update Model Changed Listener public void objects Added Object parent Object children  modelListener IUpdateModelChangedListener objectsAdded
public void objects Added Object parent Object children public void objects Removed Object parent Object children  objectsAdded objectsRemoved
control get Display async Exec new Runnable public void run tree Viewer refresh handle Selection Changed I Structured Selection tree Viewer get Selection  getDisplay asyncExec treeViewer handleSelectionChanged IStructuredSelection treeViewer getSelection
public void object Changed final Object obj String property if refresh Lock return Control control get Control if control is Disposed control get Display async Exec new Runnable public void run tree Viewer refresh handle Selection Changed I Structured Selection tree Viewer get Selection  objectChanged refreshLock getControl isDisposed getDisplay asyncExec treeViewer handleSelectionChanged IStructuredSelection treeViewer getSelection
public void init Providers tree Viewer set Content Provider new Local Site Provider tree Viewer set Label Provider new Local Site Label Provider tree Viewer set Input UpdateUI get Default get Update Model tree Viewer set Sorter new Configuration Sorter I Local Site local Site get Local Site if local Site null local Site add Local Site Changed Listener this model Listener new I Update Model Changed Listener public void objects Added Object parent Object children public void objects Removed Object parent Object children public void object Changed final Object obj String property if refresh Lock return Control control get Control if control is Disposed control get Display async Exec new Runnable public void run tree Viewer refresh handle Selection Changed I Structured Selection tree Viewer get Selection Operations Manager add Update Model Changed Listener model Listener Workbench Help set Help get Control org eclipse update ui Configuration View NON NLS 1  initProviders treeViewer setContentProvider LocalSiteProvider treeViewer setLabelProvider LocalSiteLabelProvider treeViewer setInput getDefault getUpdateModel treeViewer setSorter ConfigurationSorter ILocalSite localSite getLocalSite localSite localSite addLocalSiteChangedListener modelListener IUpdateModelChangedListener objectsAdded objectsRemoved objectChanged refreshLock getControl isDisposed getDisplay asyncExec treeViewer handleSelectionChanged IStructuredSelection treeViewer getSelection OperationsManager addUpdateModelChangedListener modelListener WorkbenchHelp setHelp getControl ConfigurationView
private I Local Site get Local Site try return Site Manager get Local Site catch Core Exception e UpdateUI log Exception e return null  ILocalSite getLocalSite SiteManager getLocalSite CoreException logException
Busy Indicator show While get Control get Display new Runnable public void run I Local Site local Site get Local Site if local Site null return I Install Configuration config get Local Site get Current Configuration I Configured Site sites config get Configured Sites Object result new Object sites length for int i 0 i sites length i result i new Configured Site Adapter config sites i if initialized config add Install Configuration Changed Listener Configuration View this initialized true bag 0 result  BusyIndicator showWhile getControl getDisplay ILocalSite localSite getLocalSite localSite IInstallConfiguration getLocalSite getCurrentConfiguration IConfiguredSite getConfiguredSites ConfiguredSiteAdapter addInstallConfigurationChangedListener ConfigurationView
private Object open Local Site final Object bag new Object 1 Busy Indicator show While get Control get Display new Runnable public void run I Local Site local Site get Local Site if local Site null return I Install Configuration config get Local Site get Current Configuration I Configured Site sites config get Configured Sites Object result new Object sites length for int i 0 i sites length i result i new Configured Site Adapter config sites i if initialized config add Install Configuration Changed Listener Configuration View this initialized true bag 0 result return bag 0  openLocalSite BusyIndicator showWhile getControl getDisplay ILocalSite localSite getLocalSite localSite IInstallConfiguration getLocalSite getCurrentConfiguration IConfiguredSite getConfiguredSites ConfiguredSiteAdapter addInstallConfigurationChangedListener ConfigurationView
public void dispose UpdateUI get Default get Label Provider disconnect this if initialized I Local Site local Site get Local Site if local Site null local Site remove Local Site Changed Listener this I Install Configuration config local Site get Current Configuration config remove Install Configuration Changed Listener this initialized false Operations Manager remove Update Model Changed Listener model Listener if preview null preview dispose super dispose  getDefault getLabelProvider ILocalSite localSite getLocalSite localSite localSite removeLocalSiteChangedListener IInstallConfiguration localSite getCurrentConfiguration removeInstallConfigurationChangedListener OperationsManager removeUpdateModelChangedListener modelListener
collapse All Action new Action public void run tree Viewer get Control set Redraw false tree Viewer collapse To Level tree Viewer get Input Tree Viewer ALL LEVELS tree Viewer get Control set Redraw true  collapseAllAction treeViewer getControl setRedraw treeViewer collapseToLevel treeViewer getInput TreeViewer ALL_LEVELS treeViewer getControl setRedraw
protected void make Actions collapse All Action new Action public void run tree Viewer get Control set Redraw false tree Viewer collapse To Level tree Viewer get Input Tree Viewer ALL LEVELS tree Viewer get Control set Redraw true collapse All Action set Text UpdateUI get String Configuration View collapse Label NON NLS 1 collapse All Action set Tool Tip Text UpdateUI get String Configuration View collapse Tooltip NON NLS 1 collapse All Action set Image Descriptor UpdateUI Images DESC COLLAPSE ALL drill Down Adapter new Drill Down Adapter tree Viewer feature State Action new Feature State Action site State Action new Site State Action revert Action new Revert Configuration Action UpdateUI get String Configuration View revert Label NON NLS 1 Workbench Help set Help revert Action org eclipse update ui CofigurationView revertAction NON NLS 1 installation History Action new Installation History Action UpdateUI get String Configuration View install History NON NLS 1 UpdateUI Images DESC HISTORY OBJ installation History Action set Tool Tip Text installation History Action get Text new Extension Location Action new New Extension Location Action UpdateUI get String Configuration View ext Location NON NLS 1 UpdateUI Images DESC ESITE OBJ properties Action new Property Dialog Action UpdateUI get Active Workbench Shell tree Viewer Workbench Help set Help properties Action org eclipse update ui CofigurationView propertiesAction NON NLS 1 uninstall Feature Action new Uninstall Feature Action UpdateUI get String Configuration View uninstall NON NLS 1 install Opt Feature Action new Install Optional Feature Action get Control get Shell UpdateUI get String Configuration View install NON NLS 1 swap Version Action new Replace Version Action UpdateUI get String Configuration View another Version NON NLS 1 find Updates Action new Find Updates Action get Control get Shell UpdateUI get String Configuration View find Updates NON NLS 1 show Activities Action new Show Activities Action get Control get Shell UpdateUI get String Configuration View show Activities Label NON NLS 1 Workbench Help set Help show Activities Action org eclipse update ui CofigurationView showActivitiesAction NON NLS 1 make Show Unconfigured Features Action make Show Sites Action make Show Nested Features Action make Preview Tasks configuration Window set Properties Action Handler properties Action  makeActions collapseAllAction treeViewer getControl setRedraw treeViewer collapseToLevel treeViewer getInput TreeViewer ALL_LEVELS treeViewer getControl setRedraw collapseAllAction setText getString ConfigurationView collapseLabel collapseAllAction setToolTipText getString ConfigurationView collapseTooltip collapseAllAction setImageDescriptor UpdateUIImages DESC_COLLAPSE_ALL drillDownAdapter DrillDownAdapter treeViewer featureStateAction FeatureStateAction siteStateAction SiteStateAction revertAction RevertConfigurationAction getString ConfigurationView revertLabel WorkbenchHelp setHelp revertAction CofigurationView_revertAction installationHistoryAction InstallationHistoryAction getString ConfigurationView installHistory UpdateUIImages DESC_HISTORY_OBJ installationHistoryAction setToolTipText installationHistoryAction getText newExtensionLocationAction NewExtensionLocationAction getString ConfigurationView extLocation UpdateUIImages DESC_ESITE_OBJ propertiesAction PropertyDialogAction getActiveWorkbenchShell treeViewer WorkbenchHelp setHelp propertiesAction CofigurationView_propertiesAction uninstallFeatureAction UninstallFeatureAction getString ConfigurationView installOptFeatureAction InstallOptionalFeatureAction getControl getShell getString ConfigurationView swapVersionAction ReplaceVersionAction getString ConfigurationView anotherVersion findUpdatesAction FindUpdatesAction getControl getShell getString ConfigurationView findUpdates showActivitiesAction ShowActivitiesAction getControl getShell getString ConfigurationView showActivitiesLabel WorkbenchHelp setHelp showActivitiesAction CofigurationView_showActivitiesAction makeShowUnconfiguredFeaturesAction makeShowSitesAction makeShowNestedFeaturesAction makePreviewTasks configurationWindow setPropertiesActionHandler propertiesAction
show Nested Features Action new Action public void run tree Viewer refresh pref set Value STATE SHOW NESTED FEATURES show Nested Features Action is Checked  showNestedFeaturesAction treeViewer setValue STATE_SHOW_NESTED_FEATURES showNestedFeaturesAction isChecked
private void make Show Nested Features Action final Preferences pref UpdateUI get Default get Plugin Preferences pref set Default STATE SHOW NESTED FEATURES true show Nested Features Action new Action public void run tree Viewer refresh pref set Value STATE SHOW NESTED FEATURES show Nested Features Action is Checked show Nested Features Action set Text UpdateUI get String Configuration View show Nested Features NON NLS 1 show Nested Features Action set Image Descriptor UpdateUI Images DESC SHOW HIERARCHY show Nested Features Action set Disabled Image Descriptor UpdateUI Images DESC SHOW HIERARCHY D show Nested Features Action set Checked pref get Boolean STATE SHOW NESTED FEATURES show Nested Features Action set Tool Tip Text UpdateUI get String Configuration View show Nested Tooltip NON NLS 1  makeShowNestedFeaturesAction getDefault getPluginPreferences setDefault STATE_SHOW_NESTED_FEATURES showNestedFeaturesAction treeViewer setValue STATE_SHOW_NESTED_FEATURES showNestedFeaturesAction isChecked showNestedFeaturesAction setText getString ConfigurationView showNestedFeatures showNestedFeaturesAction setImageDescriptor UpdateUIImages DESC_SHOW_HIERARCHY showNestedFeaturesAction setDisabledImageDescriptor UpdateUIImages DESC_SHOW_HIERARCHY_D showNestedFeaturesAction setChecked getBoolean STATE_SHOW_NESTED_FEATURES showNestedFeaturesAction setToolTipText getString ConfigurationView showNestedTooltip
show Sites Action new Action public void run tree Viewer refresh pref set Value STATE SHOW SITES show Sites Action is Checked UpdateUI get Default save Plugin Preferences  showSitesAction treeViewer setValue STATE_SHOW_SITES showSitesAction isChecked getDefault savePluginPreferences
private void make Show Sites Action final Preferences pref UpdateUI get Default get Plugin Preferences pref set Default STATE SHOW SITES true show Sites Action new Action public void run tree Viewer refresh pref set Value STATE SHOW SITES show Sites Action is Checked UpdateUI get Default save Plugin Preferences show Sites Action set Text UpdateUI get String Configuration View show Install NON NLS 1 show Sites Action set Image Descriptor UpdateUI Images DESC LSITE OBJ show Sites Action set Checked pref get Boolean STATE SHOW SITES show Sites Action set Tool Tip Text UpdateUI get String Configuration View show Install Tooltip NON NLS 1  makeShowSitesAction getDefault getPluginPreferences setDefault STATE_SHOW_SITES showSitesAction treeViewer setValue STATE_SHOW_SITES showSitesAction isChecked getDefault savePluginPreferences showSitesAction setText getString ConfigurationView showInstall showSitesAction setImageDescriptor UpdateUIImages DESC_LSITE_OBJ showSitesAction setChecked getBoolean STATE_SHOW_SITES showSitesAction setToolTipText getString ConfigurationView showInstallTooltip
show Unconf Features Action new Action public void run pref set Value STATE SHOW UNCONF show Unconf Features Action is Checked UpdateUI get Default save Plugin Preferences tree Viewer refresh  showUnconfFeaturesAction setValue STATE_SHOW_UNCONF showUnconfFeaturesAction isChecked getDefault savePluginPreferences treeViewer
private void make Show Unconfigured Features Action final Preferences pref UpdateUI get Default get Plugin Preferences pref set Default STATE SHOW UNCONF false show Unconf Features Action new Action public void run pref set Value STATE SHOW UNCONF show Unconf Features Action is Checked UpdateUI get Default save Plugin Preferences tree Viewer refresh Workbench Help set Help show Unconf Features Action org eclipse update ui CofigurationView showUnconfFeaturesAction NON NLS 1 show Unconf Features Action set Text UpdateUI get String Configuration View show Disabled NON NLS 1 show Unconf Features Action set Image Descriptor UpdateUI Images DESC UNCONF FEATURE OBJ show Unconf Features Action set Checked pref get Boolean STATE SHOW UNCONF show Unconf Features Action set Tool Tip Text UpdateUI get String Configuration View show Disabled Tooltip NON NLS 1  makeShowUnconfiguredFeaturesAction getDefault getPluginPreferences setDefault STATE_SHOW_UNCONF showUnconfFeaturesAction setValue STATE_SHOW_UNCONF showUnconfFeaturesAction isChecked getDefault savePluginPreferences treeViewer WorkbenchHelp setHelp showUnconfFeaturesAction CofigurationView_showUnconfFeaturesAction showUnconfFeaturesAction setText getString ConfigurationView showDisabled showUnconfFeaturesAction setImageDescriptor UpdateUIImages DESC_UNCONF_FEATURE_OBJ showUnconfFeaturesAction setChecked getBoolean STATE_SHOW_UNCONF showUnconfFeaturesAction setToolTipText getString ConfigurationView showDisabledTooltip
protected void fill Action Bars Tool Bar Manager tbm tbm add show Sites Action tbm add show Nested Features Action tbm add show Unconf Features Action tbm add new Separator drill Down Adapter add Navigation Actions tbm tbm add new Separator tbm add collapse All Action tbm add new Separator tbm add installation History Action  fillActionBars ToolBarManager showSitesAction showNestedFeaturesAction showUnconfFeaturesAction drillDownAdapter addNavigationActions collapseAllAction installationHistoryAction
protected Object get Selected Object I Selection selection tree Viewer get Selection if selection instanceof I Structured Selection selection is Empty I Structured Selection ssel I Structured Selection selection if ssel size 1 return ssel get First Element return null  getSelectedObject ISelection treeViewer getSelection IStructuredSelection isEmpty IStructuredSelection IStructuredSelection getFirstElement
protected void fill Context Menu I Menu Manager manager Object obj get Selected Object if obj instanceof I Local Site manager add revert Action manager add find Updates Action else if obj instanceof I Configured Site Adapter manager add site State Action if obj instanceof I Local Site obj instanceof I Configured Site Adapter manager add new Separator Menu Manager mgr new Menu Manager UpdateUI get String Configuration View new NON NLS 1 mgr add new Extension Location Action manager add mgr manager add new Separator else if obj instanceof Configured Feature Adapter try Menu Manager mgr new Menu Manager UpdateUI get String Configuration View replace With NON NLS 1 mgr add swap Version Action manager add mgr manager add feature State Action I Feature feature Configured Feature Adapter obj get Feature null if feature instanceof Missing Feature manager add install Opt Feature Action else manager add uninstall Feature Action manager add new Separator manager add find Updates Action manager add new Separator catch Core Exception e drill Down Adapter add Navigation Actions manager if obj instanceof I Local Site manager add new Separator manager add installation History Action if obj instanceof I Feature Adapter obj instanceof I Local Site obj instanceof I Configured Site Adapter manager add new Separator manager add properties Action  fillContextMenu IMenuManager getSelectedObject ILocalSite revertAction findUpdatesAction IConfiguredSiteAdapter siteStateAction ILocalSite IConfiguredSiteAdapter MenuManager MenuManager getString ConfigurationView newExtensionLocationAction ConfiguredFeatureAdapter MenuManager MenuManager getString ConfigurationView replaceWith swapVersionAction featureStateAction IFeature ConfiguredFeatureAdapter getFeature MissingFeature installOptFeatureAction uninstallFeatureAction findUpdatesAction CoreException drillDownAdapter addNavigationActions ILocalSite installationHistoryAction IFeatureAdapter ILocalSite IConfiguredSiteAdapter propertiesAction
public void install Site Added I Configured Site csite async Refresh  installSiteAdded IConfiguredSite asyncRefresh
async Refresh public void install Site Removed I Configured Site site async Refresh  asyncRefresh installSiteRemoved IConfiguredSite asyncRefresh
async Refresh public void feature Installed I Feature feature async Refresh  asyncRefresh featureInstalled IFeature asyncRefresh
async Refresh public void feature Removed I Feature feature async Refresh  asyncRefresh featureRemoved IFeature asyncRefresh
async Refresh public void feature Configured I Feature feature  asyncRefresh featureConfigured IFeature
public void feature Unconfigured I Feature feature  featureUnconfigured IFeature
public void current Install Configuration Changed I Install Configuration configuration async Refresh  currentInstallConfigurationChanged IInstallConfiguration asyncRefresh
public void install Configuration Removed I Install Configuration configuration async Refresh  installConfigurationRemoved IInstallConfiguration asyncRefresh
return display async Exec new Runnable public void run if get Control is Disposed tree Viewer refresh  asyncExec getControl isDisposed treeViewer
private void async Refresh Display display SWT Util get Standard Display if display null return if get Control is Disposed return display async Exec new Runnable public void run if get Control is Disposed tree Viewer refresh  asyncRefresh SWTUtil getStandardDisplay getControl isDisposed asyncExec getControl isDisposed treeViewer
I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor Array List result new Array List I Feature Reference refs if configured Only refs csite get Configured Features else I Site site csite get Site refs site get Feature References monitor begin Task UpdateUI get String Configuration View loading NON NLS 1 refs length for int i 0 i refs length i I Feature Reference ref refs i I Feature feature try monitor sub Task ref getURL to String feature ref get Feature null catch Core Exception e feature new Missing Feature ref get Site ref getURL monitor worked 1 result add new Configured Feature Adapter site Adapter feature csite is Configured feature false false monitor done bag 0 get Root Features result  IRunnableWithProgress IRunnableWithProgress IProgressMonitor ArrayList ArrayList IFeatureReference configuredOnly getConfiguredFeatures ISite getSite getFeatureReferences beginTask getString ConfigurationView IFeatureReference IFeature subTask toString getFeature CoreException MissingFeature getSite ConfiguredFeatureAdapter siteAdapter isConfigured getRootFeatures
private Object get Features final I Configured Site Adapter site Adapter final boolean configured Only final I Configured Site csite site Adapter get Configured Site final Object bag new Object 1 refresh Lock true I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor Array List result new Array List I Feature Reference refs if configured Only refs csite get Configured Features else I Site site csite get Site refs site get Feature References monitor begin Task UpdateUI get String Configuration View loading NON NLS 1 refs length for int i 0 i refs length i I Feature Reference ref refs i I Feature feature try monitor sub Task ref getURL to String feature ref get Feature null catch Core Exception e feature new Missing Feature ref get Site ref getURL monitor worked 1 result add new Configured Feature Adapter site Adapter feature csite is Configured feature false false monitor done bag 0 get Root Features result try if configuration Window get Shell is Visible configuration Window run true false op else op run new Null Progress Monitor catch Interrupted Exception e catch Invocation Target Exception e finally refresh Lock false return bag 0  getFeatures IConfiguredSiteAdapter siteAdapter configuredOnly IConfiguredSite siteAdapter getConfiguredSite refreshLock IRunnableWithProgress IRunnableWithProgress IProgressMonitor ArrayList ArrayList IFeatureReference configuredOnly getConfiguredFeatures ISite getSite getFeatureReferences beginTask getString ConfigurationView IFeatureReference IFeature subTask toString getFeature CoreException MissingFeature getSite ConfiguredFeatureAdapter siteAdapter isConfigured getRootFeatures configurationWindow getShell isVisible configurationWindow NullProgressMonitor InterruptedException InvocationTargetException refreshLock
private Object get Root Features Array List list Array List children new Array List Array List result new Array List try for int i 0 i list size i Configured Feature Adapter cf Configured Feature Adapter list get i I Feature feature cf get Feature null if feature null add Child Features feature children cf is Configured for int i 0 i list size i Configured Feature Adapter cf Configured Feature Adapter list get i I Feature feature cf get Feature null if feature null is Child Feature feature children false result add cf catch Core Exception e return list to Array return result to Array  getRootFeatures ArrayList ArrayList ArrayList ArrayList ArrayList ConfiguredFeatureAdapter ConfiguredFeatureAdapter IFeature getFeature addChildFeatures isConfigured ConfiguredFeatureAdapter ConfiguredFeatureAdapter IFeature getFeature isChildFeature CoreException toArray toArray
private void add Child Features I Feature feature Array List children boolean configured try I Included Feature Reference included feature get Included Feature References for int i 0 i included length i I Feature child Feature try child Feature included i get Feature null catch Core Exception e child Feature new Missing Feature included i children add child Feature catch Core Exception e UpdateUI log Exception e  addChildFeatures IFeature ArrayList IIncludedFeatureReference getIncludedFeatureReferences IFeature childFeature childFeature getFeature CoreException childFeature MissingFeature childFeature CoreException logException
private boolean is Child Feature I Feature feature Array List children for int i 0 i children size i I Feature child I Feature children get i if feature get Versioned Identifier equals child get Versioned Identifier return true return false  isChildFeature IFeature ArrayList IFeature IFeature getVersionedIdentifier getVersionedIdentifier
protected void handle Double Click Double Click Event e if e get Selection instanceof I Structured Selection I Structured Selection ssel I Structured Selection e get Selection Object obj ssel get First Element if obj null properties Action run  handleDoubleClick DoubleClickEvent getSelection IStructuredSelection IStructuredSelection IStructuredSelection getSelection getFirstElement propertiesAction
public void create Part Control Composite parent splitter new Sash Form parent SWT HORIZONTAL splitter set Layout Data new Grid Data Grid Data FILL BOTH Composite left Container create Line Container splitter Composite right Container create Line Container splitter create Tree Viewer left Container make Actions create Vertical Line left Container create Vertical Line right Container preview new Configuration Preview this preview create Control right Container preview get Control set Layout Data new Grid Data Grid Data FILL BOTH splitter set Weights new int 2 3 fill Action Bars get Configuration Window get Tool Bar Manager tree Viewer expand To Level 2  createPartControl SashForm setLayoutData GridData GridData FILL_BOTH leftContainer createLineContainer rightContainer createLineContainer createTreeViewer leftContainer makeActions createVerticalLine leftContainer createVerticalLine rightContainer ConfigurationPreview createControl rightContainer getControl setLayoutData GridData GridData FILL_BOTH setWeights fillActionBars getConfigurationWindow getToolBarManager treeViewer expandToLevel
private void create Tree Viewer Composite parent tree Viewer new Tree Viewer parent SWT MULTI SWT H SCROLL SWT V SCROLL tree Viewer get Control set Layout Data new Grid Data Grid Data FILL BOTH tree Viewer set Use Hashlookup true init Providers Menu Manager menu Mgr new Menu Manager Popup Menu NON NLS 1 menu Mgr set Remove All When Shown true menu Mgr add Menu Listener new I Menu Listener public void menu About To Show I Menu Manager manager manager add new Group Marker additions NON NLS 1 fill Context Menu manager tree Viewer get Control set Menu menu Mgr create Context Menu tree Viewer get Control tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event handle Selection Changed event tree Viewer add Double Click Listener new I Double Click Listener public void double Click Double Click Event event handle Double Click event  createTreeViewer treeViewer TreeViewer H_SCROLL V_SCROLL treeViewer getControl setLayoutData GridData GridData FILL_BOTH treeViewer setUseHashlookup initProviders MenuManager menuMgr MenuManager PopupMenu menuMgr setRemoveAllWhenShown menuMgr addMenuListener IMenuListener menuAboutToShow IMenuManager GroupMarker fillContextMenu treeViewer getControl setMenu menuMgr createContextMenu treeViewer getControl treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged treeViewer addDoubleClickListener IDoubleClickListener doubleClick DoubleClickEvent handleDoubleClick
public Tree Viewer get Tree Viewer return tree Viewer  TreeViewer getTreeViewer treeViewer
private Composite create Line Container Composite parent Composite container new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width layout margin Height 0 layout horizontal Spacing 0 container set Layout layout return container  createLineContainer GridLayout GridLayout numColumns marginWidth marginHeight horizontalSpacing setLayout
private void create Vertical Line Composite parent Label line new Label parent SWT SEPARATOR SWT VERTICAL Grid Data gd new Grid Data Grid Data VERTICAL ALIGN FILL gd width Hint 1 line set Layout Data gd  createVerticalLine GridData GridData GridData VERTICAL_ALIGN_FILL widthHint setLayoutData
public Control get Control return splitter  getControl
private int get Status Code I Feature feature I Status status int code status get Code if code I Feature STATUS UNHAPPY if status is Multi Status I Status children status get Children for int i 0 i children length i I Status child children i if child is Multi Status child get Code I Feature STATUS DISABLED return code If we are here global status is unhappy because one or more included features is disabled if Update Utils has Obsolete Patches feature The disabled included features are old patches that are now subsumed by better versions of the features they were designed to patch return I Feature STATUS HAPPY return code  getStatusCode IFeature IStatus getCode IFeature STATUS_UNHAPPY isMultiStatus IStatus getChildren IStatus isMultiStatus getCode IFeature STATUS_DISABLED UpdateUtils hasObsoletePatches IFeature STATUS_HAPPY
protected void handle Selection Changed I Structured Selection ssel Object obj ssel get First Element if obj instanceof I Feature Adapter try Configured Feature Adapter adapter Configured Feature Adapter obj I Feature feature adapter get Feature null boolean missing feature instanceof Missing Feature boolean enable missing adapter is Optional adapter is Included feature State Action set Feature adapter feature State Action set Enabled enable uninstall Feature Action set Feature adapter uninstall Feature Action set Enabled enable uninstall Feature Action can Uninstall if adapter is Configured set Description On Task uninstall Feature Action adapter UpdateUI get String Configuration View uninstall Desc2 else set Description On Task uninstall Feature Action adapter UpdateUI get String Configuration View uninstall Desc if enable adapter is Configured I Feature features Update Utils get Installed Features feature false swap Version Action set Enabled features length 1 if features length 1 swap Version Action set Current Feature feature swap Version Action set Features features find Updates Action set Enabled true find Updates Action set Feature feature else swap Version Action set Enabled false find Updates Action set Enabled false if missing Missing Feature mf Missing Feature feature install Opt Feature Action set Enabled mf is Optional mf get Originating SiteURL null install Opt Feature Action set Feature mf else install Opt Feature Action set Enabled false catch Core Exception ex UpdateUI log Exception ex if obj instanceof I Local Site properties Action set Enabled true find Updates Action set Enabled true find Updates Action set Feature null I Local Site site get Local Site revert Action set Enabled site null site get Configuration History length 1 else if obj instanceof I Configured Site Adapter site State Action set Site I Configured Site Adapter obj get Configured Site site State Action set Enabled true preview set Selection ssel  handleSelectionChanged IStructuredSelection getFirstElement IFeatureAdapter ConfiguredFeatureAdapter ConfiguredFeatureAdapter IFeature getFeature MissingFeature isOptional isIncluded featureStateAction setFeature featureStateAction setEnabled uninstallFeatureAction setFeature uninstallFeatureAction setEnabled uninstallFeatureAction canUninstall isConfigured setDescriptionOnTask uninstallFeatureAction getString ConfigurationView uninstallDesc2 setDescriptionOnTask uninstallFeatureAction getString ConfigurationView uninstallDesc isConfigured IFeature UpdateUtils getInstalledFeatures swapVersionAction setEnabled swapVersionAction setCurrentFeature swapVersionAction setFeatures findUpdatesAction setEnabled findUpdatesAction setFeature swapVersionAction setEnabled findUpdatesAction setEnabled MissingFeature MissingFeature installOptFeatureAction setEnabled isOptional getOriginatingSiteURL installOptFeatureAction setFeature installOptFeatureAction setEnabled CoreException logException ILocalSite propertiesAction setEnabled findUpdatesAction setEnabled findUpdatesAction setFeature ILocalSite getLocalSite revertAction setEnabled getConfigurationHistory IConfiguredSiteAdapter siteStateAction setSite IConfiguredSiteAdapter getConfiguredSite siteStateAction setEnabled setSelection
protected void handle Selection Changed Selection Changed Event e handle Selection Changed I Structured Selection e get Selection  handleSelectionChanged SelectionChangedEvent handleSelectionChanged IStructuredSelection getSelection
private void set Description On Task I Action action Configured Feature Adapter adapter String desc I Preview Task tasks get Preview Tasks adapter if tasks null return for int i 0 i tasks length i if tasks i get Action action tasks i set Description desc  setDescriptionOnTask IAction ConfiguredFeatureAdapter IPreviewTask getPreviewTasks getAction setDescription
private void make Preview Tasks preview Tasks new Hashtable Class key Array List array new Array List local site tasks key I Local Site class array add new Preview Task UpdateUI get String Configuration View revert Previous Label NON NLS 1 UpdateUI get String Configuration View revert Previous Desc NON NLS 1 revert Action array add new Preview Task UpdateUI get String Configuration View update Label NON NLS 1 UpdateUI get String Configuration View update Desc NON NLS 1 find Updates Action array add new Preview Task UpdateUI get String Configuration View ext Loc Label NON NLS 1 UpdateUI get String Configuration View ext Loc Desc NON NLS 1 new Extension Location Action array add new Preview Task UpdateUI get String Configuration View install Hist Label NON NLS 1 UpdateUI get String Configuration View install Hist Desc NON NLS 1 installation History Action array add new Preview Task UpdateUI get String Configuration View activities Label NON NLS 1 UpdateUI get String Configuration View activities Desc NON NLS 1 show Activities Action preview Tasks put key array to Array new I Preview Task array size configured site tasks array clear key I Configured Site Adapter class array add new Preview Task null UpdateUI get String Configuration View enable Loc Desc NON NLS 1 site State Action array add new Preview Task UpdateUI get String Configuration View ext Loc Label NON NLS 1 UpdateUI get String Configuration View ext Loc Desc NON NLS 1 new Extension Location Action array add new Preview Task UpdateUI get String Configuration View properties Label NON NLS 1 UpdateUI get String Configuration View install Prop Desc NON NLS 1 properties Action preview Tasks put key array to Array new I Preview Task array size feature adapter tasks array clear key I Feature Adapter class array add new Preview Task UpdateUI get String Configuration View replace Version Label NON NLS 1 UpdateUI get String Configuration View replace Version Desc NON NLS 1 swap Version Action array add new Preview Task null UpdateUI get String Configuration View enable Feature Desc NON NLS 1 feature State Action array add new Preview Task UpdateUI get String Configuration View install Optional Label NON NLS 1 UpdateUI get String Configuration View install Optional Desc NON NLS 1 install Opt Feature Action array add new Preview Task UpdateUI get String Configuration View uninstall Label NON NLS 1 UpdateUI get String Configuration View uninstall Desc NON NLS 1 uninstall Feature Action array add new Preview Task UpdateUI get String Configuration View scan Label NON NLS 1 UpdateUI get String Configuration View scan Desc NON NLS 1 find Updates Action array add new Preview Task UpdateUI get String Configuration View feature Prop Label NON NLS 1 UpdateUI get String Configuration View feature Prop Desc NON NLS 1 properties Action preview Tasks put key array to Array new I Preview Task array size  makePreviewTasks previewTasks ArrayList ArrayList ILocalSite PreviewTask getString ConfigurationView revertPreviousLabel getString ConfigurationView revertPreviousDesc revertAction PreviewTask getString ConfigurationView updateLabel getString ConfigurationView updateDesc findUpdatesAction PreviewTask getString ConfigurationView extLocLabel getString ConfigurationView extLocDesc newExtensionLocationAction PreviewTask getString ConfigurationView installHistLabel getString ConfigurationView installHistDesc installationHistoryAction PreviewTask getString ConfigurationView activitiesLabel getString ConfigurationView activitiesDesc showActivitiesAction previewTasks toArray IPreviewTask IConfiguredSiteAdapter PreviewTask getString ConfigurationView enableLocDesc siteStateAction PreviewTask getString ConfigurationView extLocLabel getString ConfigurationView extLocDesc newExtensionLocationAction PreviewTask getString ConfigurationView propertiesLabel getString ConfigurationView installPropDesc propertiesAction previewTasks toArray IPreviewTask IFeatureAdapter PreviewTask getString ConfigurationView replaceVersionLabel getString ConfigurationView replaceVersionDesc swapVersionAction PreviewTask getString ConfigurationView enableFeatureDesc featureStateAction PreviewTask getString ConfigurationView installOptionalLabel getString ConfigurationView installOptionalDesc installOptFeatureAction PreviewTask getString ConfigurationView uninstallLabel getString ConfigurationView uninstallDesc uninstallFeatureAction PreviewTask getString ConfigurationView scanLabel getString ConfigurationView scanDesc findUpdatesAction PreviewTask getString ConfigurationView featurePropLabel getString ConfigurationView featurePropDesc propertiesAction previewTasks toArray IPreviewTask
public I Preview Task get Preview Tasks Object object I Preview Task tasks null if object instanceof I Feature Adapter tasks I Preview Task preview Tasks get I Feature Adapter class if object instanceof I Local Site tasks I Preview Task preview Tasks get I Local Site class if object instanceof I Configured Site Adapter tasks I Preview Task preview Tasks get I Configured Site Adapter class return tasks null tasks new I Preview Task 0  IPreviewTask getPreviewTasks IPreviewTask IFeatureAdapter IPreviewTask previewTasks IFeatureAdapter ILocalSite IPreviewTask previewTasks ILocalSite IConfiguredSiteAdapter IPreviewTask previewTasks IConfiguredSiteAdapter IPreviewTask
Configuration Manager Window get Configuration Window return configuration Window  ConfigurationManagerWindow getConfigurationWindow configurationWindow

public void set Feature Configured Feature Adapter adapter this adapter adapter if adapter is Configured set Text UpdateUI get String Feature State Action disable NON NLS 1 else set Text UpdateUI get String Feature State Action enable NON NLS 1  setFeature ConfiguredFeatureAdapter isConfigured setText getString FeatureStateAction setText getString FeatureStateAction
public void run try if adapter null return I Status status Operations Manager get Validator validate Platform Config Valid if status null throw new Core Exception status boolean is Configured adapter is Configured Ask user to confirm the operation String message is Configured UpdateUI get String Feature State Action disable Question NON NLS 1 UpdateUI get String Feature State Action Enable Question NON NLS 1 if confirm message return If current config is broken confirm with the user to continue if Operations Manager get Validator validate Current State null confirm UpdateUI get String Actions broken Config Question NON NLS 1 return I Operation toggle Operation is Configured I Operation Operations Manager get Operation Factory create Unconfig Operation adapter get Configured Site adapter get Feature null Operations Manager get Operation Factory create Config Operation adapter get Configured Site adapter get Feature null boolean restart Needed toggle Operation execute null null UpdateUI request Restart restart Needed catch Core Exception e Error Dialog open Error UpdateUI get Active Workbench Shell null null e get Status catch Invocation Target Exception e This should not happen Update Utils log Exception e get Target Exception  IStatus OperationsManager getValidator validatePlatformConfigValid CoreException isConfigured isConfigured isConfigured getString FeatureStateAction disableQuestion getString FeatureStateAction EnableQuestion OperationsManager getValidator validateCurrentState getString brokenConfigQuestion IOperation toggleOperation isConfigured IOperation OperationsManager getOperationFactory createUnconfigOperation getConfiguredSite getFeature OperationsManager getOperationFactory createConfigOperation getConfiguredSite getFeature restartNeeded toggleOperation requestRestart restartNeeded CoreException ErrorDialog openError getActiveWorkbenchShell getStatus InvocationTargetException UpdateUtils logException getTargetException
private boolean confirm String message return Message Dialog open Confirm UpdateUI get Active Workbench Shell UpdateUI get String Feature State Action dialog Title NON NLS 1 message  MessageDialog openConfirm getActiveWorkbenchShell getString FeatureStateAction dialogTitle

private Shell shell public Find Updates Action Shell shell String text super text this shell shell  FindUpdatesAction
public void set Feature I Feature feature this feature feature  setFeature IFeature
Busy Indicator show While shell get Display new Runnable public void run Install Wizard wizard new Install Wizard search Request Wizard Dialog dialog new Resizable Install Wizard Dialog shell wizard UpdateUI get String Find Updates Action updates NON NLS 1 dialog create dialog open  BusyIndicator showWhile getDisplay InstallWizard InstallWizard searchRequest WizardDialog ResizableInstallWizardDialog getString FindUpdatesAction
public void run I Status status Operations Manager get Validator validate Platform Config Valid if status null Error Dialog open Error UpdateUI get Active Workbench Shell null null status return If current config is broken confirm with the user to continue if Operations Manager get Validator validate Current State null confirm UpdateUI get String Actions broken Config Question NON NLS 1 return I Feature features null if feature null features new I Feature feature final Update Search Request search Request Update Utils create New Updates Request features Busy Indicator show While shell get Display new Runnable public void run Install Wizard wizard new Install Wizard search Request Wizard Dialog dialog new Resizable Install Wizard Dialog shell wizard UpdateUI get String Find Updates Action updates NON NLS 1 dialog create dialog open  IStatus OperationsManager getValidator validatePlatformConfigValid ErrorDialog openError getActiveWorkbenchShell OperationsManager getValidator validateCurrentState getString brokenConfigQuestion IFeature IFeature UpdateSearchRequest searchRequest UpdateUtils createNewUpdatesRequest BusyIndicator showWhile getDisplay InstallWizard InstallWizard searchRequest WizardDialog ResizableInstallWizardDialog getString FindUpdatesAction
private boolean confirm String message return Message Dialog open Confirm UpdateUI get Active Workbench Shell UpdateUI get String Feature State Action dialog Title NON NLS 1 message  MessageDialog openConfirm getActiveWorkbenchShell getString FeatureStateAction dialogTitle

public Installation History Action String text Image Descriptor desc super text desc String location Configurator Utils get Current Platform Configuration get Configuration Location get File path new Path location remove Last Segments 1 append install log NON NLS 1 row Type light row NON NLS 1  InstallationHistoryAction ImageDescriptor ConfiguratorUtils getCurrentPlatformConfiguration getConfigurationLocation getFile removeLastSegments rowType
public void run try open Log parse Log UpdateUI showURL file get Temp File get Path to String NON NLS 1 catch Core Exception e UpdateUI log Exception e finally close Log  openLog parseLog getTempFile getPath toString CoreException logException closeLog
private void open Log throws Core Exception try buff Read new Buffered Reader new File Reader path toOS String html Log new Print Writer new File Output Stream get Temp File catch File Not Found Exception e throw Core Exception e  openLog CoreException buffRead BufferedReader FileReader toOSString htmlLog PrintWriter FileOutputStream getTempFile FileNotFoundException throwCoreException
private File get Temp File throws Core Exception if temp File null try temp File File create Temp File install log html NON NLS 1 NON NLS 2 temp File delete On Exit catch IO Exception e throw Core Exception e return temp File  getTempFile CoreException tempFile tempFile createTempFile tempFile deleteOnExit IOException throwCoreException tempFile
private void parse Log throws Core Exception CONFIGURATION configuration date ACTIVITY date target action status try String type date status target action String Tokenizer html Code html Log println html NON NLS 1 html Log println head NON NLS 1 html Log println title Install Log title NON NLS 1 addCSS html Log println head NON NLS 1 html Log println body NON NLS 1 String title UpdateUI get String Installation History Action title NON NLS 1 String desc UpdateUI get String Installation History Action desc NON NLS 1 html Log println h1 class title title h1 NON NLS 1 NON NLS 2 html Log println p class body Text desc p NON NLS 1 NON NLS 2 html Log println center NON NLS 1 html Log println table width 100 border 0 cellspacing 1 cellpadding 2 NON NLS 1 while buff Read ready html Code new String Tokenizer buff Read read Line while html Code has More Elements if buff Read ready return html Code new String Tokenizer buff Read read Line type html Code next Token type type substring type index Of 1 type length NON NLS 1 if type equals UpdateUI get String Installation History Action activity NON NLS 1 target NON NLS 1 date new Date new Long html Code next Token long Value to String ignore string date html Code next Token NON NLS 1 html Code next Token NON NLS 1 while html Code count Tokens 2 target target html Code next Token NON NLS 1 action html Code next Token status html Code next Token add Activity action date status target else html Log println html Log println tr id separator td colspan 4 td tr NON NLS 1 html Log println date new Date new Long html Code next Token long Value to String date NON NLS 1 while html Code count Tokens 0 date date html Code next Token NON NLS 1 add Configuration Header date add Activity Header html Log println table NON NLS 1 html Log println body NON NLS 1 html Log println html NON NLS 1 catch Exception e throw Core Exception e  parseLog CoreException StringTokenizer htmlCode htmlLog htmlLog htmlLog htmlLog htmlLog getString InstallationHistoryAction getString InstallationHistoryAction htmlLog htmlLog bodyText htmlLog htmlLog buffRead htmlCode StringTokenizer buffRead readLine htmlCode hasMoreElements buffRead htmlCode StringTokenizer buffRead readLine htmlCode nextToken indexOf getString InstallationHistoryAction htmlCode nextToken longValue toString htmlCode nextToken htmlCode nextToken htmlCode countTokens htmlCode nextToken htmlCode nextToken htmlCode nextToken addActivity htmlLog htmlLog htmlLog htmlCode nextToken longValue toString htmlCode countTokens htmlCode nextToken addConfigurationHeader addActivityHeader htmlLog htmlLog htmlLog throwCoreException
private void add Activity String type String date String status String target html Log print tr class row Type NON NLS 1 NON NLS 2 html Log print td class log text width 30 NON NLS 1 html Log print date html Log println td NON NLS 1 html Log print td class log text width 40 NON NLS 1 html Log print target html Log println td NON NLS 1 html Log print td class log text width 20 NON NLS 1 html Log print type html Log println td NON NLS 1 html Log print td class log text width 10 NON NLS 1 html Log print status html Log println td tr NON NLS 1 toggle Row Color  addActivity htmlLog rowType htmlLog htmlLog htmlLog htmlLog htmlLog htmlLog htmlLog htmlLog htmlLog htmlLog htmlLog htmlLog toggleRowColor
private void addCSS html Log println STYLE type text css NON NLS 1 html Log println H1 title font family sans serif color 99AACC NON NLS 1 html Log println P body Text font family sans serif font size 9pt NON NLS 1 html Log println TD log header font family sans serif font style normal font weight bold font size 9pt color white NON NLS 1 html Log println TD log text font family sans serif font style normal font weight lighter font size 8pt color black NON NLS 1 html Log println TD config log header font family sans serif font style normal font weight bold font size 9pt color white text align right border top 10px solid white TD config log header font family sans serif font style normal font weight bold font size 9pt color white border top 10px solid white NON NLS 1 html Log println TR light row background white NON NLS 1 NON NLS 2 html Log println TR dark row background light Blue NON NLS 1 NON NLS 2 html Log println TR header background dark Blue NON NLS 1 NON NLS 2 html Log println STYLE NON NLS 1  htmlLog htmlLog htmlLog bodyText htmlLog htmlLog htmlLog htmlLog htmlLog lightBlue htmlLog darkBlue htmlLog
private void add Activity Header html Log print tr class header NON NLS 1 html Log print td class log header NON NLS 1 html Log print UpdateUI get String Installation History Action date Time NON NLS 1 html Log print td NON NLS 1 html Log print td class log header NON NLS 1 html Log print UpdateUI get String Installation History Action target NON NLS 1 html Log print td NON NLS 1 html Log print td class log header NON NLS 1 html Log print UpdateUI get String Installation History Action action NON NLS 1 html Log print td NON NLS 1 html Log print td class log header NON NLS 1 html Log print UpdateUI get String Installation History Action status NON NLS 1 html Log println td tr NON NLS 1  addActivityHeader htmlLog htmlLog htmlLog getString InstallationHistoryAction dateTime htmlLog htmlLog htmlLog getString InstallationHistoryAction htmlLog htmlLog htmlLog getString InstallationHistoryAction htmlLog htmlLog htmlLog getString InstallationHistoryAction htmlLog
private void add Configuration Header String date if date null return html Log print tr class header NON NLS 1 html Log print td class config log header colspan 4 NON NLS 1 html Log print date html Log println td tr NON NLS 1  addConfigurationHeader htmlLog htmlLog htmlLog htmlLog
private void toggle Row Color if row Type equals light row NON NLS 1 row Type dark row NON NLS 1 else row Type light row NON NLS 1  toggleRowColor rowType rowType rowType
private void throw Core Exception Throwable e throws Core Exception throw new Core Exception new Status I Status ERROR UpdateUI get Plugin Id I Status ERROR UpdateUI get String Installation History Action errors NON NLS 1 e  throwCoreException CoreException CoreException IStatus getPluginId IStatus getString InstallationHistoryAction
private void close Log try if buff Read null buff Read close if html Log null html Log close catch IO Exception e finally buff Read null html Log null  closeLog buffRead buffRead htmlLog htmlLog IOException buffRead htmlLog

private Shell shell public Install Optional Feature Action Shell shell String text super text this shell shell  InstallOptionalFeatureAction
public void set Feature Missing Feature feature this missing Feature feature  setFeature MissingFeature missingFeature
Busy Indicator show While shell get Display new Runnable public void run open Wizard search Request  BusyIndicator showWhile getDisplay openWizard searchRequest
public void run if missing Feature null return I Status status Operations Manager get Validator validate Platform Config Valid if status null Error Dialog open Error UpdateUI get Active Workbench Shell null null status return If current config is broken confirm with the user to continue if Operations Manager get Validator validate Current State null confirm UpdateUI get String Actions broken Config Question NON NLS 1 return Versioned Identifier vid missing Feature get Versioned Identifier URL originatingURL missing Feature get Originating SiteURL Update Search Scope scope new Update Search Scope scope add Search Site originatingURL to String originatingURL null Optional Feature Search Category category new Optional Feature Search Category category add Versioned Identifier vid final Update Search Request search Request new Update Search Request category scope Busy Indicator show While shell get Display new Runnable public void run open Wizard search Request  missingFeature IStatus OperationsManager getValidator validatePlatformConfigValid ErrorDialog openError getActiveWorkbenchShell OperationsManager getValidator validateCurrentState getString brokenConfigQuestion VersionedIdentifier missingFeature getVersionedIdentifier missingFeature getOriginatingSiteURL UpdateSearchScope UpdateSearchScope addSearchSite toString OptionalFeatureSearchCategory OptionalFeatureSearchCategory addVersionedIdentifier UpdateSearchRequest searchRequest UpdateSearchRequest BusyIndicator showWhile getDisplay openWizard searchRequest
private void open Wizard Update Search Request search Request Install Wizard wizard new Install Wizard search Request Wizard Dialog dialog new Resizable Install Wizard Dialog shell wizard UpdateUI get String KEY OPTIONAL INSTALL TITLE dialog create dialog open  openWizard UpdateSearchRequest searchRequest InstallWizard InstallWizard searchRequest WizardDialog ResizableInstallWizardDialog getString KEY_OPTIONAL_INSTALL_TITLE
private boolean confirm String message return Message Dialog open Confirm UpdateUI get Active Workbench Shell UpdateUI get String Feature State Action dialog Title NON NLS 1 message  MessageDialog openConfirm getActiveWorkbenchShell getString FeatureStateAction dialogTitle

public interface I Preview Task String get Name  IPreviewTask getName
public interface I Preview Task String get Name String get Description  IPreviewTask getName getDescription
String get Name String get Description void run  getName getDescription
String get Description void run boolean is Enabled  getDescription isEnabled
void run boolean is Enabled void set Description String desc  isEnabled setDescription
boolean is Enabled void set Description String desc I Action get Action  isEnabled setDescription IAction getAction

public class New Extension Location Action extends Action public New Extension Location Action String text Image Descriptor desc super text desc  NewExtensionLocationAction NewExtensionLocationAction ImageDescriptor
public void run I Status status Operations Manager get Validator validate Platform Config Valid if status null Error Dialog open Error UpdateUI get Active Workbench Shell null null status return Directory Dialog dialog new Directory Dialog UpdateUI get Active Workbench Shell SWT APPLICATION MODAL dialog set Message UpdateUI get String New Extension Location Action select Ext Location NON NLS 1 String dir dialog open while dir null File dir File get Extension Site new File dir if dir File null if add Extension Location dir File return else re open the directory dialog dialog set Filter Path dir dir dialog open else Message Dialog open Information UpdateUI get Active Workbench Shell UpdateUI get String New Extension Location Action ext Info Title NON NLS 1 UpdateUI get String New Extension Location Action ext Info Message NON NLS 1 re open the directory dialog dialog set Filter Path dir dir dialog open  IStatus OperationsManager getValidator validatePlatformConfigValid ErrorDialog openError getActiveWorkbenchShell DirectoryDialog DirectoryDialog getActiveWorkbenchShell APPLICATION_MODAL setMessage getString NewExtensionLocationAction selectExtLocation dirFile getExtensionSite dirFile addExtensionLocation dirFile setFilterPath MessageDialog openInformation getActiveWorkbenchShell getString NewExtensionLocationAction extInfoTitle getString NewExtensionLocationAction extInfoMessage setFilterPath
param directory return the site file including eclipse path when directory is an eclipse exstension null otherwise static File get Extension Site File directory Check the eclipse folder if directory get Name equals eclipse NON NLS 1 if we picked up the eclipse directory check if its parent is a site File site get Extension Site directory get Parent File if site null return directory otherwise fall through File eclipse new File directory eclipse NON NLS 1 if eclipse exists eclipse is Directory return null check the marker File marker new File eclipse eclipseextension NON NLS 1 if marker exists marker is Directory return null return eclipse  getExtensionSite getName getExtensionSite getParentFile isDirectory isDirectory
private boolean add Extension Location File dir try I Install Configuration config Site Manager get Local Site get Current Configuration I Configured Site csite config create Linked Configured Site dir config add Configured Site csite boolean restart Needed Site Manager get Local Site save UpdateUI request Restart restart Needed return true catch Core Exception e String title UpdateUI get String Install Wizard Target Page location error title NON NLS 1 Error Dialog open Error UpdateUI get Active Workbench Shell title null e get Status UpdateUI log Exception e false return false  addExtensionLocation IInstallConfiguration SiteManager getLocalSite getCurrentConfiguration IConfiguredSite createLinkedConfiguredSite addConfiguredSite restartNeeded SiteManager getLocalSite requestRestart restartNeeded CoreException getString InstallWizard TargetPage ErrorDialog openError getActiveWorkbenchShell getStatus logException

private I Feature features public Replace Version Action String text super text  IFeature ReplaceVersionAction
public void set Current Feature I Feature feature current Feature feature  setCurrentFeature IFeature currentFeature
public void set Features I Feature features this features features  setFeatures IFeature
public void run if current Feature null features null features length 2 return I Status status Operations Manager get Validator validate Platform Config Valid if status null Error Dialog open Error UpdateUI get Active Workbench Shell null null status return Replace Feature Version Wizard wizard new Replace Feature Version Wizard current Feature features Wizard Dialog dialog new Wizard Dialog UpdateUI get Active Workbench Shell wizard dialog create dialog get Shell set Text UpdateUI get Active Workbench Shell get Text dialog get Shell set Size 400 400 dialog open  currentFeature IStatus OperationsManager getValidator validatePlatformConfigValid ErrorDialog openError getActiveWorkbenchShell ReplaceFeatureVersionWizard ReplaceFeatureVersionWizard currentFeature WizardDialog WizardDialog getActiveWorkbenchShell getShell setText getActiveWorkbenchShell getText getShell setSize

public class Revert Configuration Action extends Action public Revert Configuration Action String text super text  RevertConfigurationAction RevertConfigurationAction
public void run I Status status Operations Manager get Validator validate Platform Config Valid if status null Error Dialog open Error UpdateUI get Active Workbench Shell null null status return Revert Configuration Wizard wizard new Revert Configuration Wizard Wizard Dialog dialog new Wizard Dialog UpdateUI get Active Workbench Shell wizard dialog create dialog get Shell set Text UpdateUI get Active Workbench Shell get Text dialog get Shell set Size 600 500 dialog open  IStatus OperationsManager getValidator validatePlatformConfigValid ErrorDialog openError getActiveWorkbenchShell RevertConfigurationWizard RevertConfigurationWizard WizardDialog WizardDialog getActiveWorkbenchShell getShell setText getActiveWorkbenchShell getText getShell setSize

Shell shell public Show Activities Action Shell parent Shell String text super text this shell parent Shell  ShowActivitiesAction parentShell parentShell
public void run Show Activities Dialog dialog new Show Activities Dialog shell dialog create dialog get Shell set Text UpdateUI get String Show Activities Dialog title NON NLS 1 dialog open  ShowActivitiesDialog ShowActivitiesDialog getShell setText getString ShowActivitiesDialog

private I Configured Site site public Site State Action  IConfiguredSite SiteStateAction
public void set Site I Configured Site site this site site boolean state site is Enabled set Text state UpdateUI get String Site State Action disable Label UpdateUI get String Site State Action enable Label NON NLS 1 NON NLS 2  setSite IConfiguredSite isEnabled setText getString SiteStateAction disableLabel getString SiteStateAction enableLabel
public void run try if site null return I Status status Operations Manager get Validator validate Platform Config Valid if status null Error Dialog open Error UpdateUI get Active Workbench Shell null null status return boolean old Value site is Enabled if confirm old Value return I Operation toggle Site Operation Operations Manager get Operation Factory create Toggle Site Operation site boolean restart Needed toggle Site Operation execute null null UpdateUI request Restart restart Needed catch Core Exception e Error Dialog open Error UpdateUI get Active Workbench Shell null null e get Status catch Invocation Target Exception e UpdateUI log Exception e  IStatus OperationsManager getValidator validatePlatformConfigValid ErrorDialog openError getActiveWorkbenchShell oldValue isEnabled oldValue IOperation toggleSiteOperation OperationsManager getOperationFactory createToggleSiteOperation restartNeeded toggleSiteOperation requestRestart restartNeeded CoreException ErrorDialog openError getActiveWorkbenchShell getStatus InvocationTargetException logException
private boolean confirm boolean new State String name site get Site getURL to String String enable Message UpdateUI get Formatted Message Site State Action enable Message name NON NLS 1 NON NLS 2 String disable Message UpdateUI get Formatted Message Site State Action disable Message name NON NLS 1 NON NLS 2 String message new State enable Message disable Message return Message Dialog open Confirm UpdateUI get Active Workbench Shell UpdateUI get String Site State Action dialog Title message NON NLS 1  newState getSite toString enableMessage getFormattedMessage SiteStateAction enableMessage disableMessage getFormattedMessage SiteStateAction disableMessage newState enableMessage disableMessage MessageDialog openConfirm getActiveWorkbenchShell getString SiteStateAction dialogTitle

private Configured Feature Adapter adapter public Uninstall Feature Action String text super text  ConfiguredFeatureAdapter UninstallFeatureAction
public void run try I Status status Operations Manager get Validator validate Platform Config Valid if status null throw new Core Exception status if adapter null confirm UpdateUI get String Feature Uninstall Action uninstall Question NON NLS 1 return If current config is broken confirm with the user to continue if Operations Manager get Validator validate Current State null confirm UpdateUI get String Actions broken Config Question NON NLS 1 return I Operation uninstall Operation I Operation Operations Manager get Operation Factory create Uninstall Operation adapter get Configured Site adapter get Feature null boolean restart Needed uninstall Operation execute null null UpdateUI request Restart restart Needed catch Core Exception e Error Dialog open Error UpdateUI get Active Workbench Shell null null e get Status catch Invocation Target Exception e This should not happen Update Utils log Exception e get Target Exception  IStatus OperationsManager getValidator validatePlatformConfigValid CoreException getString FeatureUninstallAction uninstallQuestion OperationsManager getValidator validateCurrentState getString brokenConfigQuestion IOperation uninstallOperation IOperation OperationsManager getOperationFactory createUninstallOperation getConfiguredSite getFeature restartNeeded uninstallOperation requestRestart restartNeeded CoreException ErrorDialog openError getActiveWorkbenchShell getStatus InvocationTargetException UpdateUtils logException getTargetException
private boolean confirm String message return Message Dialog open Confirm UpdateUI get Active Workbench Shell UpdateUI get String Feature Uninstall Action dialog Title NON NLS 1 message  MessageDialog openConfirm getActiveWorkbenchShell getString FeatureUninstallAction dialogTitle
public void set Feature Configured Feature Adapter adapter this adapter adapter set Text UpdateUI get String Feature Uninstall Action uninstall NON NLS 1  setFeature ConfiguredFeatureAdapter setText getString FeatureUninstallAction
public boolean can Uninstall if adapter null return false if adapter is Configured return false try if Install Registry get Instance get feature  adapter get Feature null get Versioned Identifier null NON NLS 1 return false catch Core Exception e return false return true  canUninstall isConfigured InstallRegistry getInstance feature_ getFeature getVersionedIdentifier CoreException

private boolean show Current Only public Activities Content Provider boolean show Current Only this show Current Only show Current Only  showCurrentOnly ActivitiesContentProvider showCurrentOnly showCurrentOnly showCurrentOnly
this show Current Only show Current Only public Activities Content Provider this show Current Only false  showCurrentOnly showCurrentOnly ActivitiesContentProvider showCurrentOnly
public Object get Elements Object element Install Configuration current Config Install Configuration element Install Configuration configs parser get Configurations boolean hit Current Config false Array List activities List new Array List for int i 0 i configs length i if configs i equals current Config hit Current Config hit Current Config true if hit Current Config show Current Only return configs i get Activities else if hit Current Config I Activity activities configs i get Activities for int j 0 j activities length j activities List add activities j return I Activity activities List to Array new I Activity activities List size  getElements InstallConfiguration currentConfig InstallConfiguration InstallConfiguration getConfigurations hitCurrentConfig ArrayList activitiesList ArrayList currentConfig hitCurrentConfig hitCurrentConfig hitCurrentConfig showCurrentOnly getActivities hitCurrentConfig IActivity getActivities activitiesList IActivity activitiesList toArray IActivity activitiesList
implements I Table Label Provider public Image get Column Image Object element int column Index if column Index 0 Update Label Provider provider UpdateUI get Default get Label Provider switch I Activity element get Status case I Activity STATUS OK return provider get UpdateUI Images DESC OK ST OBJ 0 case I Activity STATUS NOK return provider get UpdateUI Images DESC ERR ST OBJ 0 return null  ITableLabelProvider getColumnImage columnIndex columnIndex UpdateLabelProvider getDefault getLabelProvider IActivity getStatus IActivity STATUS_OK UpdateUIImages DESC_OK_ST_OBJ IActivity STATUS_NOK UpdateUIImages DESC_ERR_ST_OBJ
public String get Column Text Object element int column Index I Activity activity I Activity element switch column Index case 1 return Utilities format activity get Date case 2 return activity get Label case 3 return get Action Label activity return NON NLS 1  getColumnText columnIndex IActivity IActivity columnIndex getDate getLabel getActionLabel
private String get Action Label I Activity activity int action activity get Action switch action case I Activity ACTION CONFIGURE return UpdateUI get String Activities Table Viewer enabled NON NLS 1 case I Activity ACTION FEATURE INSTALL return UpdateUI get String Activities Table Viewer feature Installed NON NLS 1 case I Activity ACTION FEATURE REMOVE return UpdateUI get String Activities Table Viewer feature Removed NON NLS 1 case I Activity ACTION SITE INSTALL return UpdateUI get String Activities Table Viewer site Installed NON NLS 1 case I Activity ACTION SITE REMOVE return UpdateUI get String Activities Table Viewer site Removed NON NLS 1 case I Activity ACTION UNCONFIGURE return UpdateUI get String Activities Table Viewer disabled NON NLS 1 case I Activity ACTION REVERT return UpdateUI get String Activities Table Viewer revert NON NLS 1 case I Activity ACTION RECONCILIATION return UpdateUI get String Activities Table Viewer reconcile NON NLS 1 default return UpdateUI get String Activities Table Viewer unknown NON NLS 1  getActionLabel IActivity getAction IActivity ACTION_CONFIGURE getString ActivitiesTableViewer IActivity ACTION_FEATURE_INSTALL getString ActivitiesTableViewer featureInstalled IActivity ACTION_FEATURE_REMOVE getString ActivitiesTableViewer featureRemoved IActivity ACTION_SITE_INSTALL getString ActivitiesTableViewer siteInstalled IActivity ACTION_SITE_REMOVE getString ActivitiesTableViewer siteRemoved IActivity ACTION_UNCONFIGURE getString ActivitiesTableViewer IActivity ACTION_REVERT getString ActivitiesTableViewer IActivity ACTION_RECONCILIATION getString ActivitiesTableViewer getString ActivitiesTableViewer
public static Table Viewer create Viewer Composite parent boolean show Current Only parser new Install Log Parser parser parse Installation Log Table table new Table parent SWT BORDER table set Layout Data new Grid Data Grid Data FILL BOTH table set Header Visible true Table Column column new Table Column table SWT NONE column new Table Column table SWT NONE column set Text UpdateUI get String Activities Table Viewer date NON NLS 1 column new Table Column table SWT NONE column set Text UpdateUI get String Activities Table Viewer target NON NLS 1 column new Table Column table SWT NONE column set Text UpdateUI get String Activities Table Viewer action NON NLS 1 Table Viewer activities Viewer new Table Viewer table activities Viewer set Label Provider new Activities Label Provider activities Viewer set Content Provider new Activities Content Provider show Current Only return activities Viewer  TableViewer createViewer showCurrentOnly InstallLogParser parseInstallationLog setLayoutData GridData GridData FILL_BOTH setHeaderVisible TableColumn TableColumn TableColumn setText getString ActivitiesTableViewer TableColumn setText getString ActivitiesTableViewer TableColumn setText getString ActivitiesTableViewer TableViewer activitiesViewer TableViewer activitiesViewer setLabelProvider ActivitiesLabelProvider activitiesViewer setContentProvider ActivitiesContentProvider showCurrentOnly activitiesViewer

private Image banner Image private boolean banner Visible false public Banner Page String name super name  bannerImage bannerVisible BannerPage
public void create Control Composite parent Composite client new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout horizontal Spacing 10 client set Layout layout if banner Visible Label label new Label client SWT NULL label set Layout Data new Grid Data Grid Data VERTICAL ALIGN BEGINNING label set Image get Banner Image Control contents create Contents client contents set Layout Data new Grid Data Grid Data FILL BOTH set Control client  createControl GridLayout GridLayout numColumns horizontalSpacing setLayout bannerVisible setLayoutData GridData GridData VERTICAL_ALIGN_BEGINNING setImage getBannerImage createContents setLayoutData GridData GridData FILL_BOTH setControl
public void set Banner Visible boolean visible this banner Visible visible  setBannerVisible bannerVisible
this banner Visible visible public boolean is Banned Visible return banner Visible  bannerVisible isBannedVisible bannerVisible
protected URL get Banner ImageURL return null  getBannerImageURL
private Image get Banner Image URL imageURL get Banner ImageURL Image image null if imageURL null use default banner Image UpdateUI Images DESC INSTALL BANNER create Image image banner Image return image  getBannerImage getBannerImageURL bannerImage UpdateUIImages DESC_INSTALL_BANNER createImage bannerImage
public void dispose if banner Image null banner Image dispose super dispose  bannerImage bannerImage
protected abstract Control create Contents Composite parent  createContents

extends Default Content Provider implements I Tree Content Provider I Structured Content Provider public Object get Elements Object input return get Children input  DefaultContentProvider ITreeContentProvider IStructuredContentProvider getElements getChildren
return get Children input public Object get Parent Object child return null  getChildren getParent
public boolean has Children Object parent if parent instanceof Array List return true return false  hasChildren ArrayList
public Object get Children Object parent if parent instanceof Array List return Array List parent to Array return new Object 0  getChildren ArrayList ArrayList toArray
class Conflict Label Provider extends Label Provider public String get Text Object obj if obj instanceof Array List Array List list Array List obj for int i 0 i list size i Duplicate Conflicts Validator Id Entry entry Duplicate Conflicts Validator Id Entry list get i if entry is Install Candidate return entry get Feature get Label return super get Text obj  ConflictLabelProvider LabelProvider getText ArrayList ArrayList ArrayList DuplicateConflictsValidator IdEntry DuplicateConflictsValidator IdEntry isInstallCandidate getFeature getLabel getText
public Image get Image Object obj int flags 0 if obj instanceof Array List flags Update Label Provider F WARNING if obj instanceof Duplicate Conflicts Validator Id Entry obj instanceof Array List return UpdateUI get Default get Label Provider get UpdateUI Images DESC FEATURE OBJ flags return null  getImage ArrayList UpdateLabelProvider F_WARNING DuplicateConflictsValidator IdEntry ArrayList getDefault getLabelProvider UpdateUIImages DESC_FEATURE_OBJ
public Duplicate Conflicts Dialog Shell shell Array List conflicts super shell UpdateUI get String Duplicate Conflicts Dialog title NON NLS 1 null UpdateUI get String Duplicate Conflicts Dialog message NON NLS 1 WARNING new String I Dialog Constants YES LABEL I Dialog Constants NO LABEL 0 this conflicts conflicts UpdateUI get Default get Label Provider connect this  DuplicateConflictsDialog ArrayList getString DuplicateConflictsDialog getString DuplicateConflictsDialog IDialogConstants YES_LABEL IDialogConstants NO_LABEL getDefault getLabelProvider
public boolean close UpdateUI get Default get Label Provider disconnect this return super close  getDefault getLabelProvider
protected Control create Custom Area Composite parent Composite client new Composite parent SWT NULL client set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout layout new Grid Layout client set Layout layout Label label new Label client SWT NULL label set Text UpdateUI get String Duplicate Conflicts Dialog tree Label NON NLS 1 tree Viewer new Tree Viewer client SWT SINGLE SWT BORDER Grid Data gd new Grid Data Grid Data FILL BOTH gd height Hint 200 gd width Hint 300 tree Viewer get Tree set Layout Data gd tree Viewer set Content Provider new Conflict Content Provider tree Viewer set Label Provider new Conflict Label Provider tree Viewer set Auto Expand Level 10 tree Viewer set Sorter new Viewer Sorter tree Viewer set Input conflicts return client  createCustomArea setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout setLayout setText getString DuplicateConflictsDialog treeLabel treeViewer TreeViewer GridData GridData GridData FILL_BOTH heightHint widthHint treeViewer getTree setLayoutData treeViewer setContentProvider ConflictContentProvider treeViewer setLabelProvider ConflictLabelProvider treeViewer setAutoExpandLevel treeViewer setSorter ViewerSorter treeViewer setInput

Site Bookmark bookmark public Edit Site Dialog Shell parent Shell Site Bookmark bookmark super parent Shell this bookmark bookmark  SiteBookmark EditSiteDialog parentShell SiteBookmark parentShell
protected void initialize Fields name set Text bookmark get Name url set Text bookmark getURL to String url set Editable bookmark is Local  initializeFields setText getName setText toString setEditable isLocal
protected void update try bookmark set Name name get Text bookmark setURL new URL url get Text Operations Manager fire Object Changed bookmark null catch MalformedURL Exception e  setName getText getText OperationsManager fireObjectChanged MalformedURLException

private int provider Order public Feature Sorter this FEATURE LABEL ASCENDING ASCENDING ASCENDING  providerOrder FeatureSorter FEATURE_LABEL
public Feature Sorter int key int label Order int version Order int provider Order this key key this label Order label Order this version Order version Order this provider Order provider Order  FeatureSorter labelOrder versionOrder providerOrder labelOrder labelOrder versionOrder versionOrder providerOrder providerOrder
public int compare Viewer viewer Object e1 Object e2 if e1 instanceof I Install Feature Operation e2 instanceof I Install Feature Operation return super compare viewer e1 e2 I Feature f1 I Install Feature Operation e1 get Feature I Feature f2 I Install Feature Operation e2 get Feature Plugin Version Identifier v1 f1 get Versioned Identifier get Version Plugin Version Identifier v2 f2 get Versioned Identifier get Version String label1 f1 get Label null f1 get Label NON NLS 1 String label2 f2 get Label null f2 get Label NON NLS 1 String provider1 f1 get Provider null f1 get Provider NON NLS 1 String provider2 f2 get Provider null f2 get Provider NON NLS 1 int result 0 if key FEATURE VERSION result compare Versions v1 v2 version Order if result 0 result collator compare label1 label2 label Order if result 0 result collator compare provider1 provider2 provider Order else if key FEATURE LABEL result collator compare label1 label2 label Order if result 0 result compare Versions v1 v2 version Order if result 0 result collator compare provider1 provider2 provider Order else if key FEATURE PROVIDER result collator compare provider1 provider2 provider Order if result 0 result collator compare label1 label2 label Order if result 0 result compare Versions v1 v2 version Order return result  IInstallFeatureOperation IInstallFeatureOperation IFeature IInstallFeatureOperation getFeature IFeature IInstallFeatureOperation getFeature PluginVersionIdentifier getVersionedIdentifier getVersion PluginVersionIdentifier getVersionedIdentifier getVersion getLabel getLabel getLabel getLabel getProvider getProvider getProvider getProvider FEATURE_VERSION compareVersions versionOrder labelOrder providerOrder FEATURE_LABEL labelOrder compareVersions versionOrder providerOrder FEATURE_PROVIDER providerOrder labelOrder compareVersions versionOrder
private int compare Versions Plugin Version Identifier v1 Plugin Version Identifier v2 if v1 equals v2 return 0 return v2 is Greater Than v1 1 1  compareVersions PluginVersionIdentifier PluginVersionIdentifier isGreaterThan

public interface I Dynamic Page public void set Jobs I Install Feature Operation jobs  IDynamicPage setJobs IInstallFeatureOperation

import org eclipse update internal operations import org eclipse update internal ui 
import org eclipse update internal ui security import org eclipse update internal ui UpdateUI import org eclipse update operations import org eclipse update search 
public class Install Wizard extends Wizard implements I Operation Listener I Search Provider  InstallWizard IOperationListener ISearchProvider
implements I Operation Listener I Search Provider private Mode Selection Page mode Page private Site Page site Page  IOperationListener ISearchProvider ModeSelectionPage modePage SitePage sitePage
private Site Page site Page private Review Page review Page  SitePage sitePage ReviewPage reviewPage
private License Page license Page private Optional Features Page optional Features Page private Target Page target Page  LicensePage licensePage OptionalFeaturesPage optionalFeaturesPage TargetPage targetPage
this search Request search Request set Dialog Settings UpdateUI get Default get Dialog Settings set Default Page Image Descriptor UpdateUI Images DESC UPDATE WIZ set Force Previous And Next Buttons true set Needs Progress Monitor true set Window Title UpdateUI get String Install Wizard wtitle NON NLS 1 public Install Wizard Update Search Request search Request Array List jobs this search Request this jobs jobs public int get Install Count return install Count public boolean is Restart Needed return install Count 0 needs Restart or selected Jobs length public boolean perform Cancel is Running false  searchRequest searchRequest setDialogSettings getDefault getDialogSettings setDefaultPageImageDescriptor UpdateUIImages DESC_UPDATE_WIZ setForcePreviousAndNextButtons setNeedsProgressMonitor setWindowTitle getString InstallWizard InstallWizard UpdateSearchRequest searchRequest ArrayList searchRequest getInstallCount installCount isRestartNeeded installCount needsRestart selectedJobs performCancel isRunning
private I Install Configuration config private int install Count 0 private Search Runner search Runner private Update Search Request search Request private Array List jobs private boolean needs Restart private static boolean is Running public Install Wizard this Update Search Request null public Install Wizard Update Search Request search Request is Running true this search Request search Request set Dialog Settings UpdateUI get Default get Dialog Settings set Default Page Image Descriptor UpdateUI Images DESC UPDATE WIZ set Force Previous And Next Buttons true set Needs Progress Monitor true set Window Title UpdateUI get String Install Wizard wtitle NON NLS 1 public Install Wizard Update Search Request search Request Array List jobs this search Request this jobs jobs public int get Install Count return install Count public boolean is Restart Needed return install Count 0 needs Restart or selected Jobs length public boolean perform Cancel is Running false if target Page null target Page remove Added Sites return super perform Cancel see Wizard perform Finish public boolean perform Finish try final I Install Feature Operation selected Jobs review Page get Selected Jobs install Count 0 save Settings Check for duplication conflicts  IInstallConfiguration installCount SearchRunner searchRunner UpdateSearchRequest searchRequest ArrayList needsRestart isRunning InstallWizard UpdateSearchRequest InstallWizard UpdateSearchRequest searchRequest isRunning searchRequest searchRequest setDialogSettings getDefault getDialogSettings setDefaultPageImageDescriptor UpdateUIImages DESC_UPDATE_WIZ setForcePreviousAndNextButtons setNeedsProgressMonitor setWindowTitle getString InstallWizard InstallWizard UpdateSearchRequest searchRequest ArrayList searchRequest getInstallCount installCount isRestartNeeded installCount needsRestart selectedJobs performCancel isRunning targetPage targetPage removeAddedSites performCancel performFinish performFinish IInstallFeatureOperation selectedJobs reviewPage getSelectedJobs installCount saveSettings
Duplicate Conflicts Validator compute Duplicate Conflicts selected Jobs config if conflicts null Duplicate Conflicts Dialog dialog new Duplicate Conflicts Dialog get Shell conflicts if dialog open 0 return false final I Verification Listener verification Listener new Jar Verification Service Install Wizard this get Shell ok to continue I Runnable With Progress operation new I Runnable With Progress public void run I Progress Monitor monitor  DuplicateConflictsValidator computeDuplicateConflicts selectedJobs DuplicateConflictsDialog DuplicateConflictsDialog getShell IVerificationListener verificationListener JarVerificationService InstallWizard getShell IRunnableWithProgress IRunnableWithProgress IProgressMonitor
throws Invocation Target Exception setup jobs with the correct environment I Install Feature Operation operations  InvocationTargetException IInstallFeatureOperation
new I Install Feature Operation selected Jobs length for int i 0 i selected Jobs length i I Install Feature Operation job selected Jobs i I Feature unconfigured Optional Features null I Feature Reference optional Features null if Update Utils has Optional Features job get Feature optional Features optional Features Page get Checked Optional Features  IInstallFeatureOperation selectedJobs selectedJobs IInstallFeatureOperation selectedJobs IFeature unconfiguredOptionalFeatures IFeatureReference optionalFeatures UpdateUtils hasOptionalFeatures getFeature optionalFeatures optionalFeaturesPage getCheckedOptionalFeatures
job unconfigured Optional Features optional Features Page get Unconfigured Optional Features job job get Target Site I Install Feature Operation op Operations Manager get Operation Factory create Install Operation job get Target Site job get Feature optional Features unconfigured Optional Features verification Listener  unconfiguredOptionalFeatures optionalFeaturesPage getUnconfiguredOptionalFeatures getTargetSite IInstallFeatureOperation OperationsManager getOperationFactory createInstallOperation getTargetSite getFeature optionalFeatures unconfiguredOptionalFeatures verificationListener
operations i op I Operation install Operation Operations Manager get Operation Factory create Batch Install Operation operations try needs Restart install Operation execute monitor Install Wizard this catch Core Exception e  IOperation installOperation OperationsManager getOperationFactory createBatchInstallOperation needsRestart installOperation InstallWizard CoreException
throw new Invocation Target Exception e finally monitor done  InvocationTargetException
boolean retry do retry false try get Container run true true operation catch Invocation Target Exception e Throwable target Exception e get Target Exception if target Exception instanceof Install Aborted Exception return false else if target Exception instanceof Feature Download Exception Feature Download Exception fde Feature Download Exception target Exception retry Message Dialog open Question get Shell UpdateUI get String Install Wizard retry Title NON NLS 1 fde get Message n NON NLS 1 UpdateUI get String Install Wizard retry NON NLS 1 if retry continue  getContainer InvocationTargetException targetException getTargetException targetException InstallAbortedException targetException FeatureDownloadException FeatureDownloadException FeatureDownloadException targetException MessageDialog openQuestion getShell getString InstallWizard retryTitle getMessage getString InstallWizard
return false catch Interrupted Exception e return false while retry return true  InterruptedException
public void add Pages search Runner new Search Runner get Shell get Container  addPages searchRunner SearchRunner getShell getContainer
mode Page new Mode Selection Page search Runner add Page mode Page site Page new Site Page search Runner  modePage ModeSelectionPage searchRunner addPage modePage sitePage SitePage searchRunner
site Page new Site Page search Runner add Page site Page else  sitePage SitePage searchRunner addPage sitePage

public interface I Search Provider Update Search Request get Search Request  ISearchProvider UpdateSearchRequest getSearchRequest

import org eclipse ui help import org eclipse update core import org eclipse update internal ui import org eclipse update operations public class License Page extends Wizard Page implements I Dynamic Page private static final String KEY TITLE Install Wizard License Page title NON NLS 1  LicensePage WizardPage IDynamicPage KEY_TITLE InstallWizard LicensePage
private static final String KEY TITLE Install Wizard License Page title NON NLS 1 private static final String KEY DESC Install Wizard License Page desc NON NLS 1 private static final String KEY DESC2 Install Wizard License Page desc2 NON NLS 1  KEY_TITLE InstallWizard LicensePage KEY_DESC InstallWizard LicensePage KEY_DESC2 InstallWizard LicensePage
private static final String KEY ACCEPT Install Wizard License Page accept NON NLS 1 private static final String KEY DECLINE Install Wizard License Page decline NON NLS 1 private static final String KEY ACCEPT2 Install Wizard License Page accept2 NON NLS 1  KEY_ACCEPT InstallWizard LicensePage KEY_DECLINE InstallWizard LicensePage KEY_ACCEPT2 InstallWizard LicensePage
private static final String KEY ACCEPT2 Install Wizard License Page accept2 NON NLS 1 private static final String KEY DECLINE2 Install Wizard License Page decline2 NON NLS 1 private boolean multi License Mode false  KEY_ACCEPT2 InstallWizard LicensePage KEY_DECLINE2 InstallWizard LicensePage multiLicenseMode
public License Page boolean multi License Mode super License NON NLS 1 set Title UpdateUI get String KEY TITLE  LicensePage multiLicenseMode setTitle getString KEY_TITLE
public License Page I Install Feature Operation job this false set Jobs new I Install Feature Operation job  LicensePage IInstallFeatureOperation setJobs IInstallFeatureOperation
public void set Jobs I Install Feature Operation jobs this jobs jobs  setJobs IInstallFeatureOperation
private I Install Feature Operation jobs private Text text private Table table Constructor for License Page2 public License Page boolean multi License Mode super License NON NLS 1 set Title UpdateUI get String KEY TITLE set Page Complete false this multi License Mode multi License Mode UpdateUI get Default get Label Provider connect this set Description UpdateUI get String multi License Mode KEY DESC2 KEY DESC public void dispose UpdateUI get Default get Label Provider disconnect this super dispose public License Page I Install Feature Operation job this false set Jobs new I Install Feature Operation job public void set Jobs I Install Feature Operation jobs this jobs jobs  IInstallFeatureOperation LicensePage2 LicensePage multiLicenseMode setTitle getString KEY_TITLE setPageComplete multiLicenseMode multiLicenseMode getDefault getLabelProvider setDescription getString multiLicenseMode KEY_DESC2 KEY_DESC getDefault getLabelProvider LicensePage IInstallFeatureOperation setJobs IInstallFeatureOperation setJobs IInstallFeatureOperation
public void create Control Composite parent Composite client new Composite parent SWT NULL client set Layout Data new Grid Data Grid Data FILL BOTH Grid Layout layout new Grid Layout client set Layout layout Workbench Help set Help client org eclipse update ui License Page2 NON NLS 1 if multi License Mode layout num Columns 3 layout make Columns Equal Width true table new Table client SWT BORDER SWT V SCROLL SWT H SCROLL table add Selection Listener new Selection Adapter public void widget Selected Selection Event e if e item null Object data e item get Data  createControl setLayoutData GridData GridData FILL_BOTH GridLayout GridLayout setLayout WorkbenchHelp setHelp LicensePage2 multiLicenseMode numColumns makeColumnsEqualWidth V_SCROLL H_SCROLL addSelectionListener SelectionAdapter widgetSelected SelectionEvent getData
text set Text data null String data NON NLS 1 table set Layout Data new Grid Data Grid Data FILL BOTH text  setText setLayoutData GridData GridData FILL_BOTH

static String last Location null public Local Site Selector super  lastLocation LocalSiteSelector
public static Site Bookmark get LocaL Site Shell parent Directory Dialog dialog new Directory Dialog parent dialog set Message UpdateUI get String Local Site Selector dialog Message NON NLS 1 dialog set Filter Path last Location String dir dialog open Site Bookmark site Bookmark null while dir null site Bookmark null File dir File new File dir if is Dir Site dir File site Bookmark create Dir Site dir File last Location dir else Message Dialog open Information parent UpdateUI get String Local Site Selector dir Info Title NON NLS 1 UpdateUI get String Local Site Selector dir Info Message NON NLS 1 dialog set Filter Path dir dir dialog open return site Bookmark  SiteBookmark getLocaLSite DirectoryDialog DirectoryDialog setMessage getString LocalSiteSelector dialogMessage setFilterPath lastLocation SiteBookmark siteBookmark siteBookmark dirFile isDirSite dirFile siteBookmark createDirSite dirFile lastLocation MessageDialog openInformation getString LocalSiteSelector dirInfoTitle getString LocalSiteSelector dirInfoMessage setFilterPath siteBookmark
public static Site Bookmark get LocaL Zipped Site Shell parent File Dialog dialog new File Dialog parent dialog set Text UpdateUI get String Local Site Selector dialog Messagezip NON NLS 1 dialog set Filter Extensions new String zip jar NON NLS 1 dialog set Filter Extensions new String jar zip NON NLS 1 Site Bookmark site Bookmark null String zip dialog open while zip null site Bookmark null File zipF new File zip if is Zip Site zipF site Bookmark create Zip Site zipF else Message Dialog open Information parent UpdateUI get String Local Site Selector zip Info Title NON NLS 1 UpdateUI get String Local Site Selector zip Info Message NON NLS 1 zip dialog open return site Bookmark  SiteBookmark getLocaLZippedSite FileDialog FileDialog setText getString LocalSiteSelector dialogMessagezip setFilterExtensions setFilterExtensions SiteBookmark siteBookmark siteBookmark isZipSite siteBookmark createZipSite MessageDialog openInformation getString LocalSiteSelector zipInfoTitle getString LocalSiteSelector zipInfoMessage siteBookmark
Returns true the zip file contains an update site param file return static boolean is Zip Site File file if file get Name to Lower Case ends With zip NON NLS 1 file get Name to Lower Case ends With jar NON NLS 1 return false Zipped Site Validator validator new Zipped Site Validator file Busy Indicator show While UpdateUI get Active Workbench Shell get Display validator return validator is Valid  isZipSite getName toLowerCase endsWith getName toLowerCase endsWith ZippedSiteValidator ZippedSiteValidator BusyIndicator showWhile getActiveWorkbenchShell getDisplay isValid
Returns true if the specified dir contains an update site param dir return static boolean is Dir Site File dir File siteXML new File dir site xml NON NLS 1 File features Dir new File dir features NON NLS 1 File plugins Dir new File dir plugins NON NLS 1 return siteXML exists features Dir exists features Dir is Directory plugins Dir exists plugins Dir is Directory  isDirSite featuresDir pluginsDir featuresDir featuresDir isDirectory pluginsDir pluginsDir isDirectory
Creates a bookmark to a zipped site param file return static Site Bookmark create Zip Site File file try URL fileURL new URL file null file get Absolute Path NON NLS 1 URL url new URL jar NON NLS 1 fileURL to External Form replace NON NLS 1 Site Bookmark site new Site Bookmark file get Name url false site set Local true return site catch Exception e return null  SiteBookmark createZipSite getAbsolutePath toExternalForm SiteBookmark SiteBookmark getName setLocal
Creates a bookmark to a site on the file system param file return static Site Bookmark create Dir Site File file try URL url file toURL String site Name file get Absolute Path Site Bookmark site new Site Bookmark site Name url false site set Local true return site catch Exception e return null  SiteBookmark createDirSite siteName getAbsolutePath SiteBookmark SiteBookmark siteName setLocal
File file boolean valid false public Zipped Site Validator File file this file file  ZippedSiteValidator
public void run Zip File site Zip null try check if the zip file contains site xml site Zip new Zip File file if site Zip get Entry site xml null NON NLS 1 valid true return boolean has Features false boolean has Plugins false for Enumeration enum site Zip entries enum has More Elements Zip Entry z Entry Zip Entry enum next Element if has Features z Entry get Name starts With features NON NLS 1 has Features true if has Plugins z Entry get Name starts With plugins NON NLS 1 has Plugins true if has Features has Plugins valid true return catch Exception e finally try if site Zip null site Zip close catch IO Exception ioe  ZipFile siteZip siteZip ZipFile siteZip getEntry hasFeatures hasPlugins siteZip hasMoreElements ZipEntry zEntry ZipEntry nextElement hasFeatures zEntry getName startsWith hasFeatures hasPlugins zEntry getName startsWith hasPlugins hasFeatures hasPlugins siteZip siteZip IOException
return Returns the valid public boolean is Valid return valid  isValid

public Mode Selection Page Search Runner search Runner super mode Selection NON NLS 1 set Title UpdateUI get String Mode Selection Page title NON NLS 1 set Description UpdateUI get String Mode Selection Page desc NON NLS 1 this search Runner search Runner  ModeSelectionPage SearchRunner searchRunner modeSelection setTitle getString ModeSelectionPage setDescription getString ModeSelectionPage searchRunner searchRunner
public Update Search Request get Search Request initialize Search return search Request  UpdateSearchRequest getSearchRequest initializeSearch searchRequest
private I Dialog Settings get Settings I Dialog Settings master UpdateUI get Default get Dialog Settings I Dialog Settings section master get Section SECTION ID if section null section master add New Section SECTION ID return section  IDialogSettings getSettings IDialogSettings getDefault getDialogSettings IDialogSettings getSection SECTION_ID addNewSection SECTION_ID
private void initialize Search if search Request null return search Request Update Utils create New Updates Request null  initializeSearch searchRequest searchRequest UpdateUtils createNewUpdatesRequest
updates Button set Selection new Features Mode updates Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e switch Mode  updatesButton setSelection newFeaturesMode updatesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent switchMode
new Features Button set Text UpdateUI get String Mode Selection Page new Features NON NLS 1 new Features Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e switch Mode  newFeaturesButton setText getString ModeSelectionPage newFeatures newFeaturesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent switchMode
protected Control create Contents Composite parent Composite composite new Composite parent SWT NULL Grid Layout layout new Grid Layout composite set Layout layout updates Button new Button composite SWT RADIO updates Button set Text UpdateUI get String Mode Selection Page updates NON NLS 1 boolean new Features Mode get Settings get Boolean P NEW FEATURES MODE updates Button set Selection new Features Mode updates Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e switch Mode new Features Button new Button composite SWT RADIO new Features Button set Selection new Features Mode new Features Button set Text UpdateUI get String Mode Selection Page new Features NON NLS 1 new Features Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e switch Mode switch Mode Dialog apply Dialog Font parent Workbench Help set Help composite org eclipse update ui Mode Selection Page NON NLS 1 return composite  createContents GridLayout GridLayout setLayout updatesButton updatesButton setText getString ModeSelectionPage newFeaturesMode getSettings getBoolean P_NEW_FEATURES_MODE updatesButton setSelection newFeaturesMode updatesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent switchMode newFeaturesButton newFeaturesButton setSelection newFeaturesMode newFeaturesButton setText getString ModeSelectionPage newFeatures newFeaturesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent switchMode switchMode applyDialogFont WorkbenchHelp setHelp ModeSelectionPage
public void save Settings boolean update Mode updates Button get Selection get Settings put P NEW FEATURES MODE update Mode  saveSettings updateMode updatesButton getSelection getSettings P_NEW_FEATURES_MODE updateMode
private void switch Mode update Mode updates Button get Selection if update Mode search Runner set Search Provider this  switchMode updateMode updatesButton getSelection updateMode searchRunner setSearchProvider
public boolean is Update Mode return update Mode  isUpdateMode updateMode

private Button ok Button param parent Shell public New Update Site Dialog Shell parent Shell super parent Shell  okButton parentShell NewUpdateSiteDialog parentShell parentShell
protected void create Buttons For Button Bar Composite parent ok Button create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true create Button parent I Dialog Constants CANCEL ID I Dialog Constants CANCEL LABEL false ok Button set Enabled false  createButtonsForButtonBar okButton createButton IDialogConstants OK_ID IDialogConstants OK_LABEL createButton IDialogConstants CANCEL_ID IDialogConstants CANCEL_LABEL okButton setEnabled
protected Control create Dialog Area Composite parent Composite composite new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 composite set Layout layout Grid Data data new Grid Data data width Hint 350 composite set Layout Data data Label label new Label composite SWT NONE label set Text UpdateUI get String New Update Site Dialog name NON NLS 1 name new Text composite SWT BORDER name set Layout Data new Grid Data Grid Data FILL HORIZONTAL name add Modify Listener new Modify Listener public void modify Text Modify Event e verify Complete label new Label composite SWT NONE label set Text UpdateUI get String New Update Site Dialog url NON NLS 1 url new Text composite SWT BORDER url set Layout Data new Grid Data Grid Data FILL HORIZONTAL url add Modify Listener new Modify Listener public void modify Text Modify Event e verify Complete initialize Fields Dialog apply Dialog Font composite return composite  createDialogArea GridLayout GridLayout numColumns setLayout GridData GridData widthHint setLayoutData setText getString NewUpdateSiteDialog setLayoutData GridData GridData FILL_HORIZONTAL addModifyListener ModifyListener modifyText ModifyEvent verifyComplete setText getString NewUpdateSiteDialog setLayoutData GridData GridData FILL_HORIZONTAL addModifyListener ModifyListener modifyText ModifyEvent verifyComplete initializeFields applyDialogFont
protected void initialize Fields url set Text http NON NLS 1  initializeFields setText
protected void ok Pressed update super ok Pressed  okPressed okPressed
protected void update try Update Model model UpdateUI get Default get Update Model Site Bookmark bookmark new Site Bookmark name get Text new URL url get Text false model add Bookmark bookmark model save Bookmarks catch MalformedURL Exception e  UpdateModel getDefault getUpdateModel SiteBookmark SiteBookmark getText getText addBookmark saveBookmarks MalformedURLException
private void verify Complete if ok Button null return if name get Text trim length 0 url get Text trim length 0 ok Button set Enabled false return try URL newURL new URL URL Decoder decode url get Text trim UTF 8 NON NLS 1 if url get Editable ok Button set Enabled newURL get Protocol equals file NON NLS 1 else ok Button set Enabled true catch Exception e ok Button set Enabled false  verifyComplete okButton getText getText okButton setEnabled URLDecoder getText getEditable okButton setEnabled getProtocol okButton setEnabled okButton setEnabled

public class New Web Site Dialog extends New Update Site Dialog public New Web Site Dialog Shell parent Shell super parent Shell  NewWebSiteDialog NewUpdateSiteDialog NewWebSiteDialog parentShell parentShell
protected void update try Update Model model UpdateUI get Default get Update Model Site Bookmark bookmark new Site Bookmark name get Text new URL url get Text true model add Bookmark bookmark catch MalformedURL Exception e  UpdateModel getDefault getUpdateModel SiteBookmark SiteBookmark getText getText addBookmark MalformedURLException

public Object get Children Object parent if parent instanceof Job Root return Job Root parent get Elements if parent instanceof Feature Hierarchy Element Feature Hierarchy Element fe Feature Hierarchy Element parent Object root fe get Root boolean old Feature false if root instanceof Job Root I Install Feature Operation job Job Root root get Job boolean patch Update Utils is Patch job get Feature old Feature job get Old Feature null return fe get Children old Feature patch config return new Object 0  getChildren JobRoot JobRoot getElements FeatureHierarchyElement FeatureHierarchyElement FeatureHierarchyElement getRoot oldFeature JobRoot IInstallFeatureOperation JobRoot getJob UpdateUtils isPatch getFeature oldFeature getOldFeature getChildren oldFeature
public Object get Parent Object child return null  getParent
public boolean has Children Object parent return get Children parent length 0  hasChildren getChildren
public Object get Elements Object input if job Roots null return new Object 0 return job Roots  getElements jobRoots jobRoots
class Tree Label Provider extends Label Provider public String get Text Object obj if obj instanceof Job Root I Feature feature Job Root obj get Job get Feature return feature get Label NON NLS 1 feature get Versioned Identifier get Version to String if obj instanceof Feature Hierarchy Element String name Feature Hierarchy Element obj get Label if name null return name return super get Text obj  TreeLabelProvider LabelProvider getText JobRoot IFeature JobRoot getJob getFeature getLabel getVersionedIdentifier getVersion toString FeatureHierarchyElement FeatureHierarchyElement getLabel getText
return super get Text obj public Image get Image Object obj return UpdateUI get Default get Label Provider get UpdateUI Images DESC FEATURE OBJ  getText getImage getDefault getLabelProvider UpdateUIImages DESC_FEATURE_OBJ
Constructor for Review Page2 public Optional Features Page I Install Configuration config super Optional Features NON NLS 1 set Title UpdateUI get String KEY TITLE set Description UpdateUI get String KEY DESC this config config UpdateUI get Default get Label Provider connect this  ReviewPage2 OptionalFeaturesPage IInstallConfiguration OptionalFeatures setTitle getString KEY_TITLE setDescription getString KEY_DESC getDefault getLabelProvider
public void set Jobs I Install Feature Operation jobs job Roots new Job Root jobs length for int i 0 i jobs length i job Roots i new Job Root jobs i  setJobs IInstallFeatureOperation jobRoots JobRoot jobRoots JobRoot
public void dispose UpdateUI get Default get Label Provider disconnect this super dispose  getDefault getLabelProvider
select All Button new Button client SWT PUSH select All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select All true  selectAllButton selectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectAll
deselect All Button new Button client SWT PUSH deselect All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select All false  deselectAllButton deselectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectAll
public Control create Contents Composite parent Composite client new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 layout margin Width layout margin Height 0 client set Layout layout create Checkbox Tree Viewer client select All Button new Button client SWT PUSH select All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select All true select All Button set Text UpdateUI get String KEY SELECT ALL Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN BEGINNING select All Button set Layout Data gd SWT Util set Button Dimension Hint select All Button deselect All Button new Button client SWT PUSH deselect All Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e select All false deselect All Button set Text UpdateUI get String KEY DESELECT ALL gd new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN BEGINNING deselect All Button set Layout Data gd SWT Util set Button Dimension Hint deselect All Button Workbench Help set Help client org eclipse update ui Multi Optional Features Page2 NON NLS 1 Dialog apply Dialog Font parent return client  createContents GridLayout GridLayout numColumns marginWidth marginHeight setLayout createCheckboxTreeViewer selectAllButton selectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectAll selectAllButton setText getString KEY_SELECT_ALL GridData GridData GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_BEGINNING selectAllButton setLayoutData SWTUtil setButtonDimensionHint selectAllButton deselectAllButton deselectAllButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent selectAll deselectAllButton setText getString KEY_DESELECT_ALL GridData GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_BEGINNING deselectAllButton setLayoutData SWTUtil setButtonDimensionHint deselectAllButton WorkbenchHelp setHelp MultiOptionalFeaturesPage2 applyDialogFont
tree Viewer set Label Provider new Tree Label Provider tree Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event e handle Checked e get Element e get Checked  treeViewer setLabelProvider TreeLabelProvider treeViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent handleChecked getElement getChecked
private void create Checkbox Tree Viewer Composite parent Label label new Label parent SWT NULL label set Text UpdateUI get String KEY TREE LABEL Grid Data gd new Grid Data gd horizontal Span 2 label set Layout Data gd tree Viewer new Checkbox Tree Viewer parent SWT H SCROLL SWT V SCROLL SWT BORDER gd new Grid Data Grid Data FILL BOTH gd vertical Span 2 tree Viewer get Tree set Layout Data gd tree Viewer set Content Provider new Tree Content Provider tree Viewer set Label Provider new Tree Label Provider tree Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event e handle Checked e get Element e get Checked tree Viewer set Auto Expand Level Abstract Tree Viewer ALL LEVELS tree Viewer set Input this  createCheckboxTreeViewer setText getString KEY_TREE_LABEL GridData GridData horizontalSpan setLayoutData treeViewer CheckboxTreeViewer H_SCROLL V_SCROLL GridData GridData FILL_BOTH verticalSpan treeViewer getTree setLayoutData treeViewer setContentProvider TreeContentProvider treeViewer setLabelProvider TreeLabelProvider treeViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent handleChecked getElement getChecked treeViewer setAutoExpandLevel AbstractTreeViewer ALL_LEVELS treeViewer setInput
public void set Visible boolean visible if visible tree Viewer set Input job Roots initialize States super set Visible visible if visible tree Viewer get Tree set Focus  setVisible treeViewer setInput jobRoots initializeStates setVisible treeViewer getTree setFocus
private void initialize States Array List checked new Array List Array List grayed new Array List Array List editable new Array List for int i 0 i job Roots length i checked add job Roots i grayed add job Roots i boolean update job Roots i get Job get Old Feature null initialize States update job Roots i get Elements checked grayed editable tree Viewer set Checked Elements checked to Array tree Viewer set Grayed Elements grayed to Array select All Button set Enabled editable size 0 deselect All Button set Enabled editable size 0  initializeStates ArrayList ArrayList ArrayList ArrayList ArrayList ArrayList jobRoots jobRoots jobRoots jobRoots getJob getOldFeature initializeStates jobRoots getElements treeViewer setCheckedElements toArray treeViewer setGrayedElements toArray selectAllButton setEnabled deselectAllButton setEnabled
private void initialize States boolean update Object elements Array List checked Array List grayed Array List editable for int i 0 i elements length i Feature Hierarchy Element element Feature Hierarchy Element elements i if element is Checked checked add element if element is Editable grayed add element else editable add element initialize States update element get Children checked grayed editable  initializeStates ArrayList ArrayList ArrayList FeatureHierarchyElement FeatureHierarchyElement isChecked isEditable initializeStates getChildren
private void select All boolean value Array List selected new Array List for int i 0 i job Roots length i I Install Feature Operation job job Roots i get Job selected add job Object elements job Roots i get Elements for int j 0 j elements length j Feature Hierarchy Element element Feature Hierarchy Element elements j select All job get Old Feature null element selected value tree Viewer set Checked Elements selected to Array  selectAll ArrayList ArrayList jobRoots IInstallFeatureOperation jobRoots getJob jobRoots getElements FeatureHierarchyElement FeatureHierarchyElement selectAll getOldFeature treeViewer setCheckedElements toArray
private void select All boolean update Feature Hierarchy Element ref Array List selected boolean value if ref is Optional selected add ref else if ref is Editable ref set Checked value if value selected add ref else if ref is Checked selected add ref Object included ref get Children for int i 0 i included length i select All update Feature Hierarchy Element included i selected value  selectAll FeatureHierarchyElement ArrayList isOptional isEditable setChecked isChecked getChildren selectAll FeatureHierarchyElement
private void handle Checked Object element boolean checked if element instanceof Job Root tree Viewer set Checked element checked return Feature Hierarchy Element fe Feature Hierarchy Element element if fe is Editable tree Viewer set Checked element checked else update the result fe set Checked checked  handleChecked JobRoot treeViewer setChecked FeatureHierarchyElement FeatureHierarchyElement isEditable treeViewer setChecked setChecked
public I Feature get Unconfigured Optional Features I Install Feature Operation job I Configured Site target Site for int i 0 i job Roots length i if job equals job Roots i get Job return job Roots i get Unconfigured Optional Features config target Site return new I Feature 0  IFeature getUnconfiguredOptionalFeatures IInstallFeatureOperation IConfiguredSite targetSite jobRoots jobRoots getJob jobRoots getUnconfiguredOptionalFeatures targetSite IFeature
public I Feature Reference get Checked Optional Features I Install Feature Operation current Job Hash Set set new Hash Set Job Root job Root null for int i 0 i job Roots length i if current Job equals job Roots i get Job job Root job Roots i break if job Root null return new I Feature Reference 0 I Install Feature Operation job job Root get Job boolean update job get Old Feature null boolean patch Update Utils is Patch job get Feature Feature Hierarchy Element elements job Root get Elements for int i 0 i elements length i elements i add Checked Optional Features update patch config set return I Feature Reference set to Array new I Feature Reference set size  IFeatureReference getCheckedOptionalFeatures IInstallFeatureOperation currentJob HashSet HashSet JobRoot jobRoot jobRoots currentJob jobRoots getJob jobRoot jobRoots jobRoot IFeatureReference IInstallFeatureOperation jobRoot getJob getOldFeature UpdateUtils isPatch getFeature FeatureHierarchyElement jobRoot getElements addCheckedOptionalFeatures IFeatureReference toArray IFeatureReference

public Replace Feature Version Wizard I Feature current Feature I Feature features set Window Title UpdateUI get String Replace Feature Version Wizard title NON NLS 1 set Default Page Image Descriptor UpdateUI Images DESC UPDATE WIZ page new Replace Feature Version Wizard Page current Feature features  ReplaceFeatureVersionWizard IFeature currentFeature IFeature setWindowTitle getString ReplaceFeatureVersionWizard setDefaultPageImageDescriptor UpdateUIImages DESC_UPDATE_WIZ ReplaceFeatureVersionWizardPage currentFeature
public void add Pages add Page page  addPages addPage
public boolean perform Finish return page perform Finish  performFinish performFinish

public Replace Feature Version Wizard Page I Feature current Feature I Feature features super Swap Feature NON NLS 1 set Title UpdateUI get String Replace Feature Version Wizard Page title NON NLS 1 set Description UpdateUI get String Replace Feature Version Wizard Page desc NON NLS 1 this current Feature current Feature this features features  ReplaceFeatureVersionWizardPage IFeature currentFeature IFeature SwapFeature setTitle getString ReplaceFeatureVersionWizardPage setDescription getString ReplaceFeatureVersionWizardPage currentFeature currentFeature
table Viewer set Label Provider new Label Provider public Image get Image Object element Update Label Provider provider UpdateUI get Default get Label Provider return provider get UpdateUI Images DESC UNCONF FEATURE OBJ 0  tableViewer setLabelProvider LabelProvider getImage UpdateLabelProvider getDefault getLabelProvider UpdateUIImages DESC_UNCONF_FEATURE_OBJ
return provider get UpdateUI Images DESC UNCONF FEATURE OBJ 0 public String get Text Object element I Feature feature I Feature element return feature get Label feature get Versioned Identifier get Version to String NON NLS 1  UpdateUIImages DESC_UNCONF_FEATURE_OBJ getText IFeature IFeature getLabel getVersionedIdentifier getVersion toString
table Viewer set Content Provider new I Structured Content Provider public Object get Elements Object element return features  tableViewer setContentProvider IStructuredContentProvider getElements
return features public void dispose 
public void dispose public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
table Viewer set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 Plugin Version Identifier v1 I Feature e1 get Versioned Identifier get Version Plugin Version Identifier v2 I Feature e2 get Versioned Identifier get Version return v1 is Greater Or Equal To v2 1 1  tableViewer setSorter ViewerSorter PluginVersionIdentifier IFeature getVersionedIdentifier getVersion PluginVersionIdentifier IFeature getVersionedIdentifier getVersion isGreaterOrEqualTo
table Viewer add Filter new Viewer Filter public boolean select Viewer viewer Object parent Element Object element String version I Feature element get Versioned Identifier get Version to String return version equals current Feature get Versioned Identifier get Version to String  tableViewer addFilter ViewerFilter parentElement IFeature getVersionedIdentifier getVersion toString currentFeature getVersionedIdentifier getVersion toString
table Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection ssel I Structured Selection table Viewer get Selection if ssel null return I Feature chosen Feature I Feature ssel get First Element I Status validation Status Operations Manager get Validator validate Pending Replace Version current Feature chosen Feature set Page Complete validation Status null validation Status get Code I Status WARNING if validation Status null set Error Message null else if validation Status get Code I Status WARNING set Error Message null set Message validation Status get Message I Message Provider WARNING else set Error Message validation Status get Message  tableViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection tableViewer getSelection IFeature chosenFeature IFeature getFirstElement IStatus validationStatus OperationsManager getValidator validatePendingReplaceVersion currentFeature chosenFeature setPageComplete validationStatus validationStatus getCode IStatus validationStatus setErrorMessage validationStatus getCode IStatus setErrorMessage setMessage validationStatus getMessage IMessageProvider setErrorMessage validationStatus getMessage
public void create Control Composite parent Composite table Container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height layout margin Width 0 table Container set Layout layout Label label new Label table Container SWT NONE label set Text UpdateUI get String Replace Feature Version Wizard Page label NON NLS 1 Table table new Table table Container SWT BORDER SWT SINGLE SWT V SCROLL table set Layout Data new Grid Data Grid Data FILL BOTH table Viewer new Table Viewer table table Viewer set Label Provider new Label Provider public Image get Image Object element Update Label Provider provider UpdateUI get Default get Label Provider return provider get UpdateUI Images DESC UNCONF FEATURE OBJ 0 public String get Text Object element I Feature feature I Feature element return feature get Label feature get Versioned Identifier get Version to String NON NLS 1 table Viewer set Content Provider new I Structured Content Provider public Object get Elements Object element return features public void dispose public void input Changed Viewer viewer Object old Input Object new Input table Viewer set Sorter new Viewer Sorter public int compare Viewer viewer Object e1 Object e2 Plugin Version Identifier v1 I Feature e1 get Versioned Identifier get Version Plugin Version Identifier v2 I Feature e2 get Versioned Identifier get Version return v1 is Greater Or Equal To v2 1 1 table Viewer add Filter new Viewer Filter public boolean select Viewer viewer Object parent Element Object element String version I Feature element get Versioned Identifier get Version to String return version equals current Feature get Versioned Identifier get Version to String table Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event I Structured Selection ssel I Structured Selection table Viewer get Selection if ssel null return I Feature chosen Feature I Feature ssel get First Element I Status validation Status Operations Manager get Validator validate Pending Replace Version current Feature chosen Feature set Page Complete validation Status null validation Status get Code I Status WARNING if validation Status null set Error Message null else if validation Status get Code I Status WARNING set Error Message null set Message validation Status get Message I Message Provider WARNING else set Error Message validation Status get Message table Viewer set Input current Feature table Viewer get Table select 0 set Control table Container Dialog apply Dialog Font table Container  createControl tableContainer GridLayout GridLayout marginHeight marginWidth tableContainer setLayout tableContainer setText getString ReplaceFeatureVersionWizardPage tableContainer V_SCROLL setLayoutData GridData GridData FILL_BOTH tableViewer TableViewer tableViewer setLabelProvider LabelProvider getImage UpdateLabelProvider getDefault getLabelProvider UpdateUIImages DESC_UNCONF_FEATURE_OBJ getText IFeature IFeature getLabel getVersionedIdentifier getVersion toString tableViewer setContentProvider IStructuredContentProvider getElements inputChanged oldInput newInput tableViewer setSorter ViewerSorter PluginVersionIdentifier IFeature getVersionedIdentifier getVersion PluginVersionIdentifier IFeature getVersionedIdentifier getVersion isGreaterOrEqualTo tableViewer addFilter ViewerFilter parentElement IFeature getVersionedIdentifier getVersion toString currentFeature getVersionedIdentifier getVersion toString tableViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection tableViewer getSelection IFeature chosenFeature IFeature getFirstElement IStatus validationStatus OperationsManager getValidator validatePendingReplaceVersion currentFeature chosenFeature setPageComplete validationStatus validationStatus getCode IStatus validationStatus setErrorMessage validationStatus getCode IStatus setErrorMessage setMessage validationStatus getMessage IMessageProvider setErrorMessage validationStatus getMessage tableViewer setInput currentFeature tableViewer getTable setControl tableContainer applyDialogFont tableContainer
public boolean perform Finish I Structured Selection ssel I Structured Selection table Viewer get Selection I Feature chosen Feature I Feature ssel get First Element return swap current Feature chosen Feature  performFinish IStructuredSelection IStructuredSelection tableViewer getSelection IFeature chosenFeature IFeature getFirstElement currentFeature chosenFeature
I Runnable With Progress operation new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception I Operation revert Operation Operations Manager get Operation Factory create Replace Feature Version Operation current Feature another Feature try boolean restart Needed revert Operation execute monitor null UpdateUI request Restart restart Needed catch Core Exception e throw new Invocation Target Exception e finally monitor done  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException IOperation revertOperation OperationsManager getOperationFactory createReplaceFeatureVersionOperation currentFeature anotherFeature restartNeeded revertOperation requestRestart restartNeeded CoreException InvocationTargetException
private boolean swap final I Feature current Feature final I Feature another Feature I Status status Operations Manager get Validator validate Pending Replace Version current Feature another Feature if status null Error Dialog open Error UpdateUI get Active Workbench Shell null null status return false I Runnable With Progress operation new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception I Operation revert Operation Operations Manager get Operation Factory create Replace Feature Version Operation current Feature another Feature try boolean restart Needed revert Operation execute monitor null UpdateUI request Restart restart Needed catch Core Exception e throw new Invocation Target Exception e finally monitor done try get Container run false true operation return true catch Invocation Target Exception e Throwable target Exception e get Target Exception if target Exception instanceof Install Aborted Exception return true else UpdateUI log Exception e return false catch Interrupted Exception e return false  IFeature currentFeature IFeature anotherFeature IStatus OperationsManager getValidator validatePendingReplaceVersion currentFeature anotherFeature ErrorDialog openError getActiveWorkbenchShell IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException IOperation revertOperation OperationsManager getOperationFactory createReplaceFeatureVersionOperation currentFeature anotherFeature restartNeeded revertOperation requestRestart restartNeeded CoreException InvocationTargetException getContainer InvocationTargetException targetException getTargetException targetException InstallAbortedException logException InterruptedException

Creates a new resizable wizard dialog public Resizable Install Wizard Dialog Shell parent I Wizard wizard String title super parent wizard set Shell Style get Shell Style SWT RESIZE this title title  ResizableInstallWizardDialog IWizard setShellStyle getShellStyle
public void create super create get Shell set Text title SWT Util set Dialog Size this 600 500  getShell setText SWTUtil setDialogSize
public int open I Status status Operations Manager get Validator validate Platform Config Valid if status null Error Dialog open Error UpdateUI get Active Workbench Shell null null status return I Dialog Constants ABORT ID int return Value super open if return Value I Dialog Constants OK ID UpdateUI request Restart Install Wizard get Wizard is Restart Needed return return Value  IStatus OperationsManager getValidator validatePlatformConfigValid ErrorDialog openError getActiveWorkbenchShell IDialogConstants ABORT_ID returnValue returnValue IDialogConstants OK_ID requestRestart InstallWizard getWizard isRestartNeeded returnValue

public Revert Configuration Wizard super set Window Title UpdateUI get String Revert Configuration Wizard wtitle NON NLS 1 set Default Page Image Descriptor UpdateUI Images DESC CONFIG WIZ  RevertConfigurationWizard setWindowTitle getString RevertConfigurationWizard setDefaultPageImageDescriptor UpdateUIImages DESC_CONFIG_WIZ
public void add Pages page new Revert Configuration Wizard Page add Page page  addPages RevertConfigurationWizardPage addPage
public boolean perform Finish return page perform Finish  performFinish performFinish

public Revert Configuration Wizard Page super Revert Configuration NON NLS 1 set Title UpdateUI get String Revert Configuration Wizard Page title NON NLS 1 set Description UpdateUI get String Revert Configuration Wizard Page desc NON NLS 1 blueBG Color new Color null 238 238 255  RevertConfigurationWizardPage RevertConfiguration setTitle getString RevertConfigurationWizardPage setDescription getString RevertConfigurationWizardPage blueBGColor
public void create Control Composite parent sash Form new Sash Form parent SWT VERTICAL sash Form set Layout new Grid Layout sash Form set Layout Data new Grid Data Grid Data FILL BOTH create Configurations Section sash Form create Activities Section sash Form set Control sash Form Object element config Viewer get Element At 0 if element null config Viewer set Selection new Structured Selection element Dialog apply Dialog Font sash Form  createControl sashForm SashForm sashForm setLayout GridLayout sashForm setLayoutData GridData GridData FILL_BOTH createConfigurationsSection sashForm createActivitiesSection sashForm setControl sashForm configViewer getElementAt configViewer setSelection StructuredSelection applyDialogFont sashForm
config Viewer set Label Provider new Label Provider public Image get Image Object element Update Label Provider provider UpdateUI get Default get Label Provider return provider get UpdateUI Images DESC CONFIG OBJ 0  configViewer setLabelProvider LabelProvider getImage UpdateLabelProvider getDefault getLabelProvider UpdateUIImages DESC_CONFIG_OBJ
return provider get UpdateUI Images DESC CONFIG OBJ 0 public String get Text Object element return Utilities format I Install Configuration element get Creation Date  UpdateUIImages DESC_CONFIG_OBJ getText IInstallConfiguration getCreationDate
config Viewer set Content Provider new I Structured Content Provider public Object get Elements Object element Array List result new Array List I Local Site local Site I Local Site element I Install Configuration current local Site get Current Configuration I Install Configuration configurations local Site get Configuration History for int i configurations length 1 i 0 i if current equals configurations i result add configurations i return result to Array  configViewer setContentProvider IStructuredContentProvider getElements ArrayList ArrayList ILocalSite localSite ILocalSite IInstallConfiguration localSite getCurrentConfiguration IInstallConfiguration localSite getConfigurationHistory toArray
public void dispose 
public void input Changed Viewer viewer Object old Input Object new Input  inputChanged oldInput newInput
add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e I Structured Selection ssel I Structured Selection e get Selection Install Configuration current Config Install Configuration ssel get First Element activities Viewer set Input current Config activities Viewer refresh Table Item items activities Viewer get Table get Items for int i 0 i items length i I Activity activity I Activity items i get Data for now we test exact config match If needed we can also compare dates etc if Install Configuration activity get Install Configuration equals current Config items i set Background blueBG Color else items i set Background activities Viewer get Control get Background  addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection InstallConfiguration currentConfig InstallConfiguration getFirstElement activitiesViewer setInput currentConfig activitiesViewer TableItem activitiesViewer getTable getItems IActivity IActivity getData InstallConfiguration getInstallConfiguration currentConfig setBackground blueBGColor setBackground activitiesViewer getControl getBackground
private void create Configurations Section Composite parent Composite table Container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout margin Height layout margin Width 0 table Container set Layout layout table Container set Layout Data new Grid Data Grid Data FILL BOTH Label label new Label table Container SWT NONE label set Text UpdateUI get String Revert Configuration Wizard Page label NON NLS 1 Table table new Table table Container SWT BORDER SWT V SCROLL table set Layout Data new Grid Data Grid Data FILL BOTH config Viewer new Table Viewer table config Viewer set Label Provider new Label Provider public Image get Image Object element Update Label Provider provider UpdateUI get Default get Label Provider return provider get UpdateUI Images DESC CONFIG OBJ 0 public String get Text Object element return Utilities format I Install Configuration element get Creation Date config Viewer set Content Provider new I Structured Content Provider public Object get Elements Object element Array List result new Array List I Local Site local Site I Local Site element I Install Configuration current local Site get Current Configuration I Install Configuration configurations local Site get Configuration History for int i configurations length 1 i 0 i if current equals configurations i result add configurations i return result to Array public void dispose public void input Changed Viewer viewer Object old Input Object new Input config Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e I Structured Selection ssel I Structured Selection e get Selection Install Configuration current Config Install Configuration ssel get First Element activities Viewer set Input current Config activities Viewer refresh Table Item items activities Viewer get Table get Items for int i 0 i items length i I Activity activity I Activity items i get Data for now we test exact config match If needed we can also compare dates etc if Install Configuration activity get Install Configuration equals current Config items i set Background blueBG Color else items i set Background activities Viewer get Control get Background try config Viewer set Input Site Manager get Local Site catch Core Exception e1  createConfigurationsSection tableContainer GridLayout GridLayout marginHeight marginWidth tableContainer setLayout tableContainer setLayoutData GridData GridData FILL_BOTH tableContainer setText getString RevertConfigurationWizardPage tableContainer V_SCROLL setLayoutData GridData GridData FILL_BOTH configViewer TableViewer configViewer setLabelProvider LabelProvider getImage UpdateLabelProvider getDefault getLabelProvider UpdateUIImages DESC_CONFIG_OBJ getText IInstallConfiguration getCreationDate configViewer setContentProvider IStructuredContentProvider getElements ArrayList ArrayList ILocalSite localSite ILocalSite IInstallConfiguration localSite getCurrentConfiguration IInstallConfiguration localSite getConfigurationHistory toArray inputChanged oldInput newInput configViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent IStructuredSelection IStructuredSelection getSelection InstallConfiguration currentConfig InstallConfiguration getFirstElement activitiesViewer setInput currentConfig activitiesViewer TableItem activitiesViewer getTable getItems IActivity IActivity getData InstallConfiguration getInstallConfiguration currentConfig setBackground blueBGColor setBackground activitiesViewer getControl getBackground configViewer setInput SiteManager getLocalSite CoreException
composite add Control Listener new Control Adapter public void control Resized Control Event e int sash Height get Sash Form get Size y int sash Width get Sash Form get Size x if composite get Size y sash Height 0 85 composite get Size x sash Width 0 5 get Sash Form set Orientation SWT HORIZONTAL else get Sash Form set Orientation SWT VERTICAL  addControlListener ControlAdapter controlResized ControlEvent sashHeight getSashForm getSize sashWidth getSashForm getSize getSize sashHeight getSize sashWidth getSashForm setOrientation getSashForm setOrientation
private void create Activities Section Composite parent final Composite composite new Composite parent SWT NONE Grid Layout grid Layout new Grid Layout grid Layout margin Height grid Layout margin Width 0 composite set Layout grid Layout Grid Data gd new Grid Data Grid Data FILL BOTH composite set Layout Data gd Label label new Label composite SWT NONE label set Text UpdateUI get String Revert Configuration Wizard Page activities NON NLS 1 Table Layout Composite tl Composite new Table Layout Composite composite SWT NONE tl Composite set Layout Data new Grid Data Grid Data FILL BOTH activities Viewer Activities Table Viewer create Viewer tl Composite false tl Composite add Column Data new Column Pixel Data 20 true tl Composite add Column Data new Column Weight Data 2 150 true tl Composite add Column Data new Column Weight Data 5 200 true tl Composite add Column Data new Column Weight Data 4 100 true activities Viewer get Table set Layout layout Table Item configs config Viewer get Table get Items if configs length 0 activities Viewer set Input Install Configuration configs 0 get Data composite add Control Listener new Control Adapter public void control Resized Control Event e int sash Height get Sash Form get Size y int sash Width get Sash Form get Size x if composite get Size y sash Height 0 85 composite get Size x sash Width 0 5 get Sash Form set Orientation SWT HORIZONTAL else get Sash Form set Orientation SWT VERTICAL  createActivitiesSection GridLayout gridLayout GridLayout gridLayout marginHeight gridLayout marginWidth setLayout gridLayout GridData GridData GridData FILL_BOTH setLayoutData setText getString RevertConfigurationWizardPage TableLayoutComposite tlComposite TableLayoutComposite tlComposite setLayoutData GridData GridData FILL_BOTH activitiesViewer ActivitiesTableViewer createViewer tlComposite tlComposite addColumnData ColumnPixelData tlComposite addColumnData ColumnWeightData tlComposite addColumnData ColumnWeightData tlComposite addColumnData ColumnWeightData activitiesViewer getTable setLayout TableItem configViewer getTable getItems activitiesViewer setInput InstallConfiguration getData addControlListener ControlAdapter controlResized ControlEvent sashHeight getSashForm getSize sashWidth getSashForm getSize getSize sashHeight getSize sashWidth getSashForm setOrientation getSashForm setOrientation
see org eclipse jface dialogs I Dialog Page dispose public void dispose blueBG Color dispose  IDialogPage blueBGColor
public Sash Form get Sash Form return sash Form  SashForm getSashForm sashForm
public boolean perform Finish Shell shell get Container get Shell boolean result Message Dialog open Question shell shell get Text UpdateUI get String Revert Configuration Wizard Page question NON NLS 1 if result return false boolean finish perform Revert if finish PlatformUI get Workbench restart return finish  performFinish getContainer getShell MessageDialog openQuestion getText getString RevertConfigurationWizardPage performRevert getWorkbench
I Runnable With Progress operation new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception I Operation revert Operation Operations Manager get Operation Factory create Revert Configuration Operation target new UI Problem Handler try revert Operation execute monitor null catch Core Exception e throw new Invocation Target Exception e finally monitor done  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException IOperation revertOperation OperationsManager getOperationFactory createRevertConfigurationOperation UIProblemHandler revertOperation CoreException InvocationTargetException
public boolean perform Revert I Structured Selection ssel I Structured Selection config Viewer get Selection final I Install Configuration target I Install Configuration ssel get First Element I Status status Operations Manager get Validator validate Pending Revert target if status null status get Code I Status ERROR Error Dialog open Error UpdateUI get Active Workbench Shell null null status return false I Runnable With Progress operation new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception I Operation revert Operation Operations Manager get Operation Factory create Revert Configuration Operation target new UI Problem Handler try revert Operation execute monitor null catch Core Exception e throw new Invocation Target Exception e finally monitor done try get Container run false true operation return true catch Invocation Target Exception e Throwable target Exception e get Target Exception if target Exception instanceof Install Aborted Exception return true else UpdateUI log Exception e return false catch Interrupted Exception e return false  performRevert IStructuredSelection IStructuredSelection configViewer getSelection IInstallConfiguration IInstallConfiguration getFirstElement IStatus OperationsManager getValidator validatePendingRevert getCode IStatus ErrorDialog openError getActiveWorkbenchShell IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException IOperation revertOperation OperationsManager getOperationFactory createRevertConfigurationOperation UIProblemHandler revertOperation CoreException InvocationTargetException getContainer InvocationTargetException targetException getTargetException targetException InstallAbortedException logException InterruptedException

import org eclipse update internal ui model import org eclipse update internal ui parts 
public class Review Page extends Banner Page implements I Update Search Result Collector private Array List jobs private Label counter Label private Checkbox Table Viewer table Viewer private I Status validation Status private Collection problematic Features new Hash Set feature that was recently selected or null private I Feature newly Selected Feature  ReviewPage BannerPage IUpdateSearchResultCollector ArrayList counterLabel CheckboxTableViewer tableViewer IStatus validationStatus problematicFeatures HashSet IFeature newlySelectedFeature
private Feature Status last Displayed Status private Property Dialog Action properties Action private Text desc Label private Button status Button private Button more Info Button private Button properties Button  FeatureStatus lastDisplayedStatus PropertyDialogAction propertiesAction descLabel statusButton moreInfoButton propertiesButton
private Containment Filter filter new Containment Filter private Search Runner search Runner private int LABEL ORDER 1  ContainmentFilter ContainmentFilter SearchRunner searchRunner LABEL_ORDER
private int LABEL ORDER 1 private int VERSION ORDER 1 private int PROVIDER ORDER 1 class Jobs Content Provider extends Default Content Provider implements I Structured Content Provider  LABEL_ORDER VERSION_ORDER PROVIDER_ORDER JobsContentProvider DefaultContentProvider IStructuredContentProvider
public Object get Elements Object input Element return jobs to Array class Jobs Label Provider extends Shared Label Provider implements I Table Label Provider public String get Column Text Object obj int column I Install Feature Operation job I Install Feature Operation obj I Feature feature job get Feature String text null switch column  getElements inputElement toArray JobsLabelProvider SharedLabelProvider ITableLabelProvider getColumnText IInstallFeatureOperation IInstallFeatureOperation IFeature getFeature
break case 1 text feature 
get Versioned Identifier get Version  getVersionedIdentifier getVersion
to String break  toString
text feature get Provider break if text null text NON NLS 1 return text  getProvider
public Image get Column Image Object obj int column if column 0  getColumnImage
return null 
I Feature feature I Install Feature Operation obj get Feature boolean patch feature is Patch boolean problematic problematic Features contains feature if patch return get UpdateUI Images DESC EFIX OBJ problematic F ERROR 0 else return get UpdateUI Images DESC FEATURE OBJ problematic F ERROR 0 return null  IFeature IInstallFeatureOperation getFeature isPatch problematicFeatures UpdateUIImages DESC_EFIX_OBJ F_ERROR UpdateUIImages DESC_FEATURE_OBJ F_ERROR
class Containment Filter extends Viewer Filter public boolean select Viewer v Object parent Object child return is Contained I Install Feature Operation child  ContainmentFilter ViewerFilter isContained IInstallFeatureOperation
class Containment Filter extends Viewer Filter public boolean select Viewer v Object parent Object child return is Contained I Install Feature Operation child private boolean is Contained I Install Feature Operation job  ContainmentFilter ViewerFilter isContained IInstallFeatureOperation isContained IInstallFeatureOperation
for int i 0 i jobs size i I Install Feature Operation candidate I Install Feature Operation jobs get i if candidate equals job  IInstallFeatureOperation IInstallFeatureOperation
for int i 0 i irefs length i I Feature Reference iref irefs i I Feature ifeature iref get Feature null  IFeatureReference IFeature getFeature
if includes ifeature vid cycle Candidates return true  cycleCandidates
after this feature has been DFS ed it is no longer a cycle candidate cycle Candidates remove feature  cycleCandidates
public Feature Property Dialog Action Shell shell  FeaturePropertyDialogAction
return selection 
Constructor for Review Page2 public Review Page Search Runner search Runner Array List jobs super Review NON NLS 1 set Title UpdateUI get String Install Wizard Review Page title NON NLS 1 set Description UpdateUI get String Install Wizard Review Page desc NON NLS 1  ReviewPage2 ReviewPage SearchRunner searchRunner ArrayList setTitle getString InstallWizard ReviewPage setDescription getString InstallWizard ReviewPage
I Feature feature candidate get Feature if includes feature vid null return true return false private boolean includes I Feature feature Versioned Identifier vid Array List cycle Candidates try if cycle Candidates null cycle Candidates new Array List if cycle Candidates contains feature throw Utilities new Core Exception UpdateUI get Formatted Message Install Wizard Review Page cycle feature get Versioned Identifier to String null NON NLS 1 else cycle Candidates add feature I Feature Reference irefs feature get Included Feature References for int i 0 i irefs length i I Feature Reference iref irefs i I Feature ifeature iref get Feature null Versioned Identifier ivid ifeature get Versioned Identifier if ivid equals vid return true if includes ifeature vid cycle Candidates return true return false catch Core Exception e return false finally after this feature has been DFS ed it is no longer a cycle candidate cycle Candidates remove feature class Feature Property Dialog Action extends Property Dialog Action private I Structured Selection selection public Feature Property Dialog Action Shell shell I Selection Provider provider super shell provider public I Structured Selection get Structured Selection return selection public void selection Changed I Structured Selection selection this selection selection Constructor for Review Page2 public Review Page Search Runner search Runner Array List jobs super Review NON NLS 1 set Title UpdateUI get String Install Wizard Review Page title NON NLS 1 set Description UpdateUI get String Install Wizard Review Page desc NON NLS 1 UpdateUI get Default get Label Provider connect this this search Runner search Runner set Banner Visible false this jobs jobs if this jobs null this jobs new Array List  IFeature getFeature IFeature VersionedIdentifier ArrayList cycleCandidates cycleCandidates cycleCandidates ArrayList cycleCandidates newCoreException getFormattedMessage InstallWizard ReviewPage getVersionedIdentifier toString cycleCandidates IFeatureReference getIncludedFeatureReferences IFeatureReference IFeature getFeature VersionedIdentifier getVersionedIdentifier cycleCandidates CoreException cycleCandidates FeaturePropertyDialogAction PropertyDialogAction IStructuredSelection FeaturePropertyDialogAction ISelectionProvider IStructuredSelection getStructuredSelection selectionChanged IStructuredSelection ReviewPage2 ReviewPage SearchRunner searchRunner ArrayList setTitle getString InstallWizard ReviewPage setDescription getString InstallWizard ReviewPage getDefault getLabelProvider searchRunner searchRunner setBannerVisible ArrayList
String filter Text filter Check get Text String filter Features UpdateUI get String Install Wizard Review Page filter Features NON NLS 1 String filter Patches UpdateUI get String Install Wizard Review Page filter Patches NON NLS 1 boolean is Update Search search Runner get Search Provider instanceof Mode Selection Page  filterText filterCheck getText filterFeatures getString InstallWizard ReviewPage filterFeatures filterPatches getString InstallWizard ReviewPage filterPatches isUpdateSearch searchRunner getSearchProvider ModeSelectionPage
filter Check set Text filter Features if visible search Runner is New Search Needed jobs clear  filterCheck setText filterFeatures searchRunner isNewSearchNeeded
search Runner run Search perform Post Search Processing  searchRunner runSearch performPostSearchProcessing
table Viewer get Table layout true if search Runner get Search Provider instanceof Mode Selection Page select True Updates page Changed  tableViewer getTable searchRunner getSearchProvider ModeSelectionPage selectTrueUpdates pageChanged
Array List true Updates new Array List for int i 0 i jobs size i  ArrayList trueUpdates ArrayList
if Update Utils is Patch job get Feature true Updates add job  UpdateUtils isPatch getFeature trueUpdates
public void dispose UpdateUI get Default get Label Provider disconnect this super dispose public void set Visible boolean visible super set Visible visible when searching for updates only nested patches can be shown when searching for features features and patches can be shown String filter Text filter Check get Text String filter Features UpdateUI get String Install Wizard Review Page filter Features NON NLS 1 String filter Patches UpdateUI get String Install Wizard Review Page filter Patches NON NLS 1 boolean is Update Search search Runner get Search Provider instanceof Mode Selection Page if is Update Search filter Text equals filter Features filter Check set Text filter Patches else if is Update Search filter Text equals filter Patches filter Check set Text filter Features if visible search Runner is New Search Needed jobs clear table Viewer refresh get Shell get Display async Exec new Runnable public void run search Runner run Search perform Post Search Processing private void perform Post Search Processing Busy Indicator show While get Shell get Display new Runnable public void run if table Viewer null table Viewer refresh table Viewer get Table layout true if search Runner get Search Provider instanceof Mode Selection Page select True Updates page Changed private void select True Updates Array List true Updates new Array List for int i 0 i jobs size i I Install Feature Operation job I Install Feature Operation jobs get i if Update Utils is Patch job get Feature true Updates add job table Viewer set Checked Elements true Updates to Array see Dialog Page create Control Composite public Control create Contents Composite parent Composite client new Composite parent SWT NULL  getDefault getLabelProvider setVisible setVisible filterText filterCheck getText filterFeatures getString InstallWizard ReviewPage filterFeatures filterPatches getString InstallWizard ReviewPage filterPatches isUpdateSearch searchRunner getSearchProvider ModeSelectionPage isUpdateSearch filterText filterFeatures filterCheck setText filterPatches isUpdateSearch filterText filterPatches filterCheck setText filterFeatures searchRunner isNewSearchNeeded tableViewer getShell getDisplay asyncExec searchRunner runSearch performPostSearchProcessing performPostSearchProcessing BusyIndicator showWhile getShell getDisplay tableViewer tableViewer tableViewer getTable searchRunner getSearchProvider ModeSelectionPage selectTrueUpdates pageChanged selectTrueUpdates ArrayList trueUpdates ArrayList IInstallFeatureOperation IInstallFeatureOperation UpdateUtils isPatch getFeature trueUpdates tableViewer setCheckedElements trueUpdates toArray DialogPage createControl createContents
layout margin Width layout margin Height 0 client set Layout layout  marginWidth marginHeight setLayout
layout num Columns 2 layout margin Width layout margin Height 0 client set Layout layout Label label new Label client SWT NULL  numColumns marginWidth marginHeight setLayout
gd horizontal Span 2 label set Layout Data gd create Table client Composite button Container new Composite client SWT NULL gd new Grid Data Grid Data FILL VERTICAL button Container set Layout Data gd layout new Grid Layout  horizontalSpan setLayoutData createTable buttonContainer GridData GridData FILL_VERTICAL buttonContainer setLayoutData GridLayout
Grid Data gd new Grid Data gd horizontal Span 2 label set Layout Data gd create Table client Composite button Container new Composite client SWT NULL gd new Grid Data Grid Data FILL VERTICAL button Container set Layout Data gd layout new Grid Layout layout margin Width 0  GridData GridData horizontalSpan setLayoutData createTable buttonContainer GridData GridData FILL_VERTICAL buttonContainer setLayoutData GridLayout marginWidth
layout margin Height 0 button Container set Layout layout Button button new Button button Container SWT PUSH button set Text UpdateUI get String Install Wizard Review Page select All NON NLS 1 gd new Grid Data  marginHeight buttonContainer setLayout buttonContainer setText getString InstallWizard ReviewPage selectAll GridData
Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN BEGINNING button set Layout Data gd SWT Util set Button Dimension Hint button button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Select All true  GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_BEGINNING setLayoutData SWTUtil setButtonDimensionHint addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSelectAll
button new Button button Container SWT PUSH button set Text UpdateUI get String Install Wizard Review Page deselect All NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN BEGINNING button set Layout Data gd  buttonContainer setText getString InstallWizard ReviewPage deselectAll GridData GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_BEGINNING setLayoutData
button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Select All false  addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSelectAll
SWT Util set Button Dimension Hint button button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Select All false  SWTUtil setButtonDimensionHint addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleSelectAll
Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN BEGINNING more Info Button set Layout Data gd SWT Util set Button Dimension Hint more Info Button  GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_BEGINNING moreInfoButton setLayoutData SWTUtil setButtonDimensionHint moreInfoButton
more Info Button new Button button Container SWT PUSH more Info Button set Text UpdateUI get String Install Wizard Review Page more Info NON NLS 1 gd new Grid Data Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN BEGINNING more Info Button set Layout Data gd SWT Util set Button Dimension Hint more Info Button more Info Button add Selection Listener new Selection Adapter  moreInfoButton buttonContainer moreInfoButton setText getString InstallWizard ReviewPage moreInfo GridData GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_BEGINNING moreInfoButton setLayoutData SWTUtil setButtonDimensionHint moreInfoButton moreInfoButton addSelectionListener SelectionAdapter
public void widget Selected Selection Event e handle More Info  widgetSelected SelectionEvent handleMoreInfo
properties Button set Text UpdateUI get String Install Wizard Review Page properties NON NLS 1 gd new Grid Data  propertiesButton setText getString InstallWizard ReviewPage GridData
properties Button new Button button Container SWT PUSH properties Button set Text UpdateUI get String Install Wizard Review Page properties NON NLS 1 gd new Grid Data  propertiesButton buttonContainer propertiesButton setText getString InstallWizard ReviewPage GridData
Grid Data VERTICAL ALIGN BEGINNING properties Button set Layout Data gd SWT Util set Button Dimension Hint properties Button  GridData VERTICAL_ALIGN_BEGINNING propertiesButton setLayoutData SWTUtil setButtonDimensionHint propertiesButton
properties Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Properties properties Button set Enabled false status Button new Button button Container SWT PUSH status Button set Text UpdateUI get String Install Wizard Review Page show Status NON NLS 1 gd  propertiesButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleProperties propertiesButton setEnabled statusButton buttonContainer statusButton setText getString InstallWizard ReviewPage showStatus
Grid Data HORIZONTAL ALIGN FILL Grid Data VERTICAL ALIGN BEGINNING status Button set Layout Data gd  GridData HORIZONTAL_ALIGN_FILL GridData VERTICAL_ALIGN_BEGINNING statusButton setLayoutData
SWT Util set Button Dimension Hint status Button status Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e show Status new Label client SWT NULL counter Label new Label client SWT NULL gd new Grid Data gd horizontal Span 2 counter Label set Layout Data gd  SWTUtil setButtonDimensionHint statusButton statusButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent showStatus counterLabel GridData horizontalSpan counterLabel setLayoutData
filter Check new Button client SWT CHECK filter Check set Text UpdateUI get String Install Wizard Review Page filter Features NON NLS 1 filter Check set Selection false table Viewer add Filter filter filter Check add Selection Listener new Selection Adapter public void widget Selected Selection Event e if filter Check get Selection make sure model is local if download Included Features table Viewer add Filter filter else filter Check set Selection false else table Viewer remove Filter filter page Changed gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 2 filter Check set Layout Data gd page Changed Workbench Help set Help client org eclipse update ui Multi Review Page2 NON NLS 1 Dialog apply Dialog Font parent return client  filterCheck filterCheck setText getString InstallWizard ReviewPage filterFeatures filterCheck setSelection tableViewer addFilter filterCheck addSelectionListener SelectionAdapter widgetSelected SelectionEvent filterCheck getSelection downloadIncludedFeatures tableViewer addFilter filterCheck setSelection tableViewer removeFilter pageChanged GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan filterCheck setLayoutData pageChanged WorkbenchHelp setHelp MultiReviewPage2 applyDialogFont
private void create Table Composite parent Sash Form sform new Sash Form parent SWT VERTICAL  createTable SashForm SashForm
composite set Layout Data new Grid Data Grid Data FILL BOTH table Viewer Checkbox Table Viewer new Check List  setLayoutData GridData GridData FILL_BOTH tableViewer CheckboxTableViewer newCheckList
SWT H SCROLL SWT V SCROLL SWT BORDER SWT FULL SELECTION Table table table Viewer get Table table set Header Visible true Table Column column new Table Column table SWT NULL column set Text UpdateUI get String Install Wizard Review Page feature NON NLS 1  H_SCROLL V_SCROLL FULL_SELECTION tableViewer getTable setHeaderVisible TableColumn TableColumn setText getString InstallWizard ReviewPage
new Feature Sorter Feature Sorter FEATURE LABEL  FeatureSorter FeatureSorter FEATURE_LABEL
Feature Sorter FEATURE LABEL LABEL ORDER VERSION ORDER  FeatureSorter FEATURE_LABEL LABEL_ORDER VERSION_ORDER
VERSION ORDER PROVIDER ORDER column new Table Column table SWT NULL column set Text UpdateUI get String Install Wizard Review Page version NON NLS 1 column add Selection Listener new Selection Adapter public void widget Selected Selection Event e VERSION ORDER 1 table Viewer set Sorter new Feature Sorter  VERSION_ORDER PROVIDER_ORDER TableColumn setText getString InstallWizard ReviewPage addSelectionListener SelectionAdapter widgetSelected SelectionEvent VERSION_ORDER tableViewer setSorter FeatureSorter

private boolean new Search Needed public Search Runner Shell shell I Runnable Context context this shell shell this context context  newSearchNeeded SearchRunner IRunnableContext
public void set Result Collector I Update Search Result Collector collector this collector collector  setResultCollector IUpdateSearchResultCollector
public I Search Provider get Search Provider return search Provider  ISearchProvider getSearchProvider searchProvider
public void set Search Provider I Search Provider search Provider if this search Provider search Provider new Search Needed true this search Provider search Provider  setSearchProvider ISearchProvider searchProvider searchProvider searchProvider newSearchNeeded searchProvider searchProvider
public void set New Search Needed boolean value new Search Needed value  setNewSearchNeeded newSearchNeeded
public boolean is New Search Needed return new Search Needed  isNewSearchNeeded newSearchNeeded
public void run Search if search Provider null return try context run true true get Search Operation collector new Search Needed false catch Interrupted Exception e if cancel equals e get Message UpdateUI log Exception e new Search Needed true return catch Invocation Target Exception e Throwable t e get Target Exception if t instanceof Core Exception Core Exception ce Core Exception t I Status status ce get Status if status null status get Code I Site SITE ACCESS EXCEPTION Just show this but do not throw exception because there may be results anyway Error Dialog open Error shell UpdateUI get String Search Runner connection Error NON NLS 1 null status return UpdateUI log Exception e return  runSearch searchProvider getSearchOperation newSearchNeeded InterruptedException getMessage logException newSearchNeeded InvocationTargetException getTargetException CoreException CoreException CoreException IStatus getStatus getCode ISite SITE_ACCESS_EXCEPTION ErrorDialog openError getString SearchRunner connectionError logException
I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try request perform Search collector monitor catch Core Exception e throw new Invocation Target Exception e finally monitor done if monitor is Canceled new Search Needed true throw new Interrupted Exception cancel  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException performSearch CoreException InvocationTargetException isCanceled newSearchNeeded InterruptedException
private I Runnable With Progress get Search Operation final I Update Search Result Collector collector final Update Search Request request search Provider get Search Request I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception Interrupted Exception try request perform Search collector monitor catch Core Exception e throw new Invocation Target Exception e finally monitor done if monitor is Canceled new Search Needed true throw new Interrupted Exception cancel return op  IRunnableWithProgress getSearchOperation IUpdateSearchResultCollector UpdateSearchRequest searchProvider getSearchRequest IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException InterruptedException performSearch CoreException InvocationTargetException isCanceled newSearchNeeded InterruptedException

param parent Shell public Show Activities Dialog Shell parent Shell super parent Shell set Shell Style SWT RESIZE SWT MIN SWT MAX SWT APPLICATION MODAL read Configuration  parentShell ShowActivitiesDialog parentShell parentShell setShellStyle APPLICATION_MODAL readConfiguration
public void create super create dialog location if dialog Location null get Shell set Location dialog Location dialog size if dialog Size null get Shell set Size dialog Size else get Shell set Size 500 500 apply Dialog Font button Bar get Button I Dialog Constants OK ID set Focus  dialogLocation getShell setLocation dialogLocation dialogSize getShell setSize dialogSize getShell setSize applyDialogFont buttonBar getButton IDialogConstants OK_ID setFocus
protected Control create Dialog Area Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 1 layout make Columns Equal Width false container set Layout layout Grid Data gd new Grid Data Grid Data FILL BOTH gd grab Excess Horizontal Space true gd grab Excess Vertical Space true container set Layout Data gd create Description Section container create Activities Viewer container Dialog apply Dialog Font container return container  createDialogArea GridLayout GridLayout numColumns makeColumnsEqualWidth setLayout GridData GridData GridData FILL_BOTH grabExcessHorizontalSpace grabExcessVerticalSpace setLayoutData createDescriptionSection createActivitiesViewer applyDialogFont
protected Control create Description Section Composite parent Composite container new Composite parent SWT NONE Grid Layout layout new Grid Layout layout num Columns 2 layout make Columns Equal Width false container set Layout layout Grid Data gd new Grid Data Grid Data FILL HORIZONTAL container set Layout Data gd try Label target Label new Label container SWT NONE target Label set Text UpdateUI get String Show Activities Dialog date NON NLS 1 Label target new Label container SWT NONE target set Text Site Manager get Local Site get Current Configuration get Label Label url Label new Label container SWT NONE url Label set Text UpdateUI get String Show Activities Dialog loc NON NLS 1 Label url new Label container SWT NONE url set Text Install Configuration Site Manager get Local Site get Current Configuration getURL get File catch Core Exception e UpdateUI log Exception e return container  createDescriptionSection GridLayout GridLayout numColumns makeColumnsEqualWidth setLayout GridData GridData GridData FILL_HORIZONTAL setLayoutData targetLabel targetLabel setText getString ShowActivitiesDialog setText SiteManager getLocalSite getCurrentConfiguration getLabel urlLabel urlLabel setText getString ShowActivitiesDialog setText InstallConfiguration SiteManager getLocalSite getCurrentConfiguration getFile CoreException logException
protected Control create Activities Viewer Composite parent Composite composite new Composite parent SWT NONE Grid Layout grid Layout new Grid Layout grid Layout margin Height grid Layout margin Width 4 composite set Layout grid Layout Grid Data gd new Grid Data Grid Data FILL BOTH gd grab Excess Horizontal Space true gd grab Excess Vertical Space true composite set Layout Data gd Label label new Label composite SWT NONE label set Text UpdateUI get String Show Activities Dialog label NON NLS 1 activities Viewer Activities Table Viewer create Viewer composite true Table Layout layout new Table Layout layout add Column Data new Column Weight Data 8 20 false layout add Column Data new Column Weight Data 50 160 true layout add Column Data new Column Weight Data 50 183 true layout add Column Data new Column Weight Data 50 100 true activities Viewer get Table set Layout layout try activities Viewer set Input Site Manager get Local Site get Current Configuration catch Core Exception e Dialog apply Dialog Font composite return composite  createActivitiesViewer GridLayout gridLayout GridLayout gridLayout marginHeight gridLayout marginWidth setLayout gridLayout GridData GridData GridData FILL_BOTH grabExcessHorizontalSpace grabExcessVerticalSpace setLayoutData setText getString ShowActivitiesDialog activitiesViewer ActivitiesTableViewer createViewer TableLayout TableLayout addColumnData ColumnWeightData addColumnData ColumnWeightData addColumnData ColumnWeightData addColumnData ColumnWeightData activitiesViewer getTable setLayout activitiesViewer setInput SiteManager getLocalSite getCurrentConfiguration CoreException applyDialogFont
protected void create Buttons For Button Bar Composite parent create OK button only by default create Button parent I Dialog Constants OK ID I Dialog Constants OK LABEL true  createButtonsForButtonBar createButton IDialogConstants OK_ID IDialogConstants OK_LABEL
public boolean close store Settings return super close  storeSettings
Stores the current state in the dialog settings since 2 0 private void store Settings write Configuration  storeSettings writeConfiguration
Returns the dialog settings object used to share state between several event detail dialogs return the dialog settings to be used private I Dialog Settings get Dialog Settings I Dialog Settings settings UpdateUI get Default get Dialog Settings dialog Settings settings get Section get Class get Name if dialog Settings null dialog Settings settings add New Section get Class get Name return dialog Settings  IDialogSettings getDialogSettings IDialogSettings getDefault getDialogSettings dialogSettings getSection getClass getName dialogSettings dialogSettings addNewSection getClass getName dialogSettings
Initializes itself from the dialog settings with the same state as at the previous invocation private void read Configuration I Dialog Settings s get Dialog Settings try int x s get Int x NON NLS 1 int y s get Int y NON NLS 1 dialog Location new Point x y x s get Int width NON NLS 1 y s get Int height NON NLS 1 dialog Size new Point x y catch Number Format Exception e dialog Location null dialog Size null  readConfiguration IDialogSettings getDialogSettings getInt getInt dialogLocation getInt getInt dialogSize NumberFormatException dialogLocation dialogSize
private void write Configuration I Dialog Settings s get Dialog Settings Point location get Shell get Location s put x location x NON NLS 1 s put y location y NON NLS 1 Point size get Shell get Size s put width size x NON NLS 1 s put height size y NON NLS 1  writeConfiguration IDialogSettings getDialogSettings getShell getLocation getShell getSize

implements I Tree Content Provider public Object get Elements Object parent return get All Site Bookmarks  ITreeContentProvider getElements getAllSiteBookmarks
bookmark is Site Connected tree Viewer get Control get Display async Exec new Runnable public void run if children length 0 handle Site Expanded bookmark children  isSiteConnected treeViewer getControl getDisplay asyncExec handleSiteExpanded
public Object get Children final Object parent if parent instanceof Site Bookmark final Site Bookmark bookmark Site Bookmark parent if bookmark is Unavailable return new Object 0 final Object children get Site Catalog With Indicator bookmark bookmark is Site Connected tree Viewer get Control get Display async Exec new Runnable public void run if children length 0 handle Site Expanded bookmark children return children return new Object 0  getChildren SiteBookmark SiteBookmark SiteBookmark isUnavailable getSiteCatalogWithIndicator isSiteConnected treeViewer getControl getDisplay asyncExec handleSiteExpanded
public Object get Parent Object element if element instanceof Site Category return Site Category element get Bookmark return null  getParent SiteCategory SiteCategory getBookmark
public boolean has Children Object element return element instanceof Site Bookmark  hasChildren SiteBookmark
public Image get Image Object obj if obj instanceof Site Bookmark return UpdateUI get Default get Label Provider get UpdateUI Images DESC SITE OBJ if obj instanceof Site Category return UpdateUI get Default get Label Provider get UpdateUI Images DESC CATEGORY OBJ return super get Image obj  getImage SiteBookmark getDefault getLabelProvider UpdateUIImages DESC_SITE_OBJ SiteCategory getDefault getLabelProvider UpdateUIImages DESC_CATEGORY_OBJ getImage
public String get Text Object obj if obj instanceof Site Bookmark return Site Bookmark obj get Label return super get Text obj  getText SiteBookmark SiteBookmark getLabel getText
class Model Listener implements I Update Model Changed Listener public void object Changed Object object String property tree Viewer refresh check Items  ModelListener IUpdateModelChangedListener objectChanged treeViewer checkItems
public void objects Added Object parent Object children tree Viewer refresh check Items  objectsAdded treeViewer checkItems
public void objects Removed Object parent Object children tree Viewer refresh check Items  objectsRemoved treeViewer checkItems
public Site Page Search Runner search Runner super Site Page NON NLS 1 set Title UpdateUI get String Site Page title NON NLS 1 set Description UpdateUI get String Site Page desc NON NLS 1 UpdateUI get Default get Label Provider connect this search Request new Update Search Request new Site Search Category new Update Search Scope search Request add Filter new Back Level Filter env Filter new Environment Filter this search Runner search Runner model Listener new Model Listener UpdateUI get Default get Update Model add Update Model Changed Listener model Listener  SitePage SearchRunner searchRunner SitePage setTitle getString SitePage setDescription getString SitePage getDefault getLabelProvider searchRequest UpdateSearchRequest SiteSearchCategory UpdateSearchScope searchRequest addFilter BackLevelFilter envFilter EnvironmentFilter searchRunner searchRunner modelListener ModelListener getDefault getUpdateModel addUpdateModelChangedListener modelListener
private void toggle Env Filter boolean add if add search Request add Filter env Filter else search Request remove Filter env Filter search Runner set New Search Needed true  toggleEnvFilter searchRequest addFilter envFilter searchRequest removeFilter envFilter searchRunner setNewSearchNeeded
public void dispose UpdateUI get Default get Label Provider disconnect this UpdateUI get Default get Update Model remove Update Model Changed Listener model Listener super dispose  getDefault getLabelProvider getDefault getUpdateModel removeUpdateModelChangedListener modelListener
SWT Util set Button Dimension Hint add Site Button add Site Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Add Site  SWTUtil setButtonDimensionHint addSiteButton addSiteButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAddSite
SWT Util set Button Dimension Hint add Local Button add Local Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Add Local  SWTUtil setButtonDimensionHint addLocalButton addLocalButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAddLocal
SWT Util set Button Dimension Hint add Local Zipped Button add Local Zipped Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Add Local Zipped  SWTUtil setButtonDimensionHint addLocalZippedButton addLocalZippedButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAddLocalZipped
SWT Util set Button Dimension Hint edit Button edit Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Edit  SWTUtil setButtonDimensionHint editButton editButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleEdit
SWT Util set Button Dimension Hint remove Button remove Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Remove  SWTUtil setButtonDimensionHint removeButton removeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleRemove
toggle Env Filter true env Filter Check add Selection Listener new Selection Adapter public void widget Selected Selection Event e toggle Env Filter env Filter Check get Selection  toggleEnvFilter envFilterCheck addSelectionListener SelectionAdapter widgetSelected SelectionEvent toggleEnvFilter envFilterCheck getSelection
protected Control create Contents Composite parent Composite client new Composite parent SWT NULL Grid Layout layout new Grid Layout layout num Columns 2 client set Layout layout Label label new Label client SWT NULL label set Text UpdateUI get String Site Page label NON NLS 1 Grid Data gd new Grid Data gd horizontal Span 2 label set Layout Data gd create Tree Viewer client Composite button Container new Composite client SWT NULL button Container set Layout Data new Grid Data Grid Data FILL VERTICAL layout new Grid Layout layout margin Width 0 layout margin Height 0 button Container set Layout layout add Site Button new Button button Container SWT PUSH add Site Button set Text UpdateUI get String Site Page add Update Site NON NLS 1 add Site Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL SWT Util set Button Dimension Hint add Site Button add Site Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Add Site add Local Button new Button button Container SWT PUSH add Local Button set Text UpdateUI get String Site Page add Local Site NON NLS 1 add Local Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL SWT Util set Button Dimension Hint add Local Button add Local Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Add Local add Local Zipped Button new Button button Container SWT PUSH add Local Zipped Button set Text UpdateUI get String Site Page add Local Zipped Site NON NLS 1 add Local Zipped Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL SWT Util set Button Dimension Hint add Local Zipped Button add Local Zipped Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Add Local Zipped edit Button new Button button Container SWT PUSH edit Button set Text UpdateUI get String Site Page edit NON NLS 1 edit Button set Enabled false edit Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL SWT Util set Button Dimension Hint edit Button edit Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Edit remove Button new Button button Container SWT PUSH remove Button set Text UpdateUI get String Site Page remove NON NLS 1 remove Button set Enabled false remove Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN FILL SWT Util set Button Dimension Hint remove Button remove Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e handle Remove env Filter Check new Button client SWT CHECK env Filter Check set Text UpdateUI get String Site Page ignore NON NLS 1 env Filter Check set Selection true toggle Env Filter true env Filter Check add Selection Listener new Selection Adapter public void widget Selected Selection Event e toggle Env Filter env Filter Check get Selection gd new Grid Data gd horizontal Span 2 env Filter Check set Layout Data gd Dialog apply Dialog Font parent Workbench Help set Help client org eclipse update ui Site Page NON NLS 1 return client  createContents GridLayout GridLayout numColumns setLayout setText getString SitePage GridData GridData horizontalSpan setLayoutData createTreeViewer buttonContainer buttonContainer setLayoutData GridData GridData FILL_VERTICAL GridLayout marginWidth marginHeight buttonContainer setLayout addSiteButton buttonContainer addSiteButton setText getString SitePage addUpdateSite addSiteButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL SWTUtil setButtonDimensionHint addSiteButton addSiteButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAddSite addLocalButton buttonContainer addLocalButton setText getString SitePage addLocalSite addLocalButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL SWTUtil setButtonDimensionHint addLocalButton addLocalButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAddLocal addLocalZippedButton buttonContainer addLocalZippedButton setText getString SitePage addLocalZippedSite addLocalZippedButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL SWTUtil setButtonDimensionHint addLocalZippedButton addLocalZippedButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleAddLocalZipped editButton buttonContainer editButton setText getString SitePage editButton setEnabled editButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL SWTUtil setButtonDimensionHint editButton editButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleEdit removeButton buttonContainer removeButton setText getString SitePage removeButton setEnabled removeButton setLayoutData GridData GridData HORIZONTAL_ALIGN_FILL SWTUtil setButtonDimensionHint removeButton removeButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent handleRemove envFilterCheck envFilterCheck setText getString SitePage envFilterCheck setSelection toggleEnvFilter envFilterCheck addSelectionListener SelectionAdapter widgetSelected SelectionEvent toggleEnvFilter envFilterCheck getSelection GridData horizontalSpan envFilterCheck setLayoutData applyDialogFont WorkbenchHelp setHelp SitePage
tree Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event e Object element e get Element if element instanceof Site Bookmark handle Site Checked Site Bookmark element e get Checked else if element instanceof Site Category handle Category Checked Site Category element e get Checked  treeViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getElement SiteBookmark handleSiteChecked SiteBookmark getChecked SiteCategory handleCategoryChecked SiteCategory getChecked
tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e handle Selection Changed I Structured Selection e get Selection  treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged IStructuredSelection getSelection
private void create Tree Viewer Composite parent tree Viewer new Checkbox Tree Viewer parent SWT H SCROLL SWT V SCROLL SWT BORDER tree Viewer get Tree set Layout Data new Grid Data Grid Data FILL BOTH tree Viewer set Content Provider new Tree Content Provider tree Viewer set Label Provider new Tree Label Provider tree Viewer set Input UpdateUI get Default get Update Model initialize Items tree Viewer add Check State Listener new I Check State Listener public void check State Changed Check State Changed Event e Object element e get Element if element instanceof Site Bookmark handle Site Checked Site Bookmark element e get Checked else if element instanceof Site Category handle Category Checked Site Category element e get Checked tree Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event e handle Selection Changed I Structured Selection e get Selection tree Viewer add Filter new Viewer Filter public boolean select Viewer viewer Object parent Element Object element if element instanceof Site Bookmark return Site Bookmark element is Web Bookmark return true  createTreeViewer treeViewer CheckboxTreeViewer H_SCROLL V_SCROLL treeViewer getTree setLayoutData GridData GridData FILL_BOTH treeViewer setContentProvider TreeContentProvider treeViewer setLabelProvider TreeLabelProvider treeViewer setInput getDefault getUpdateModel initializeItems treeViewer addCheckStateListener ICheckStateListener checkStateChanged CheckStateChangedEvent getElement SiteBookmark handleSiteChecked SiteBookmark getChecked SiteCategory handleCategoryChecked SiteCategory getChecked treeViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent handleSelectionChanged IStructuredSelection getSelection treeViewer addFilter ViewerFilter parentElement SiteBookmark SiteBookmark isWebBookmark
private void initialize Items check Items update Search Request  initializeItems checkItems updateSearchRequest
private void check Items Tree Item items tree Viewer get Tree get Items for int i 0 i items length i Site Bookmark bookmark Site Bookmark items i get Data tree Viewer set Checked bookmark bookmark is Selected String ignored Cats bookmark get Ignored Categories tree Viewer set Grayed bookmark ignored Cats length 0 bookmark is Selected  checkItems TreeItem treeViewer getTree getItems SiteBookmark SiteBookmark getData treeViewer setChecked isSelected ignoredCats getIgnoredCategories treeViewer setGrayed ignoredCats isSelected
private void handle Add Site New Update Site Dialog dialog new New Update Site Dialog get Shell dialog create dialog get Shell set Text UpdateUI get String Site Page new NON NLS 1 if dialog open New Update Site Dialog OK update Search Request  handleAddSite NewUpdateSiteDialog NewUpdateSiteDialog getShell getShell setText getString SitePage NewUpdateSiteDialog updateSearchRequest
private void handle Add Local Site Bookmark site Bookmark Local Site Selector get LocaL Site get Shell if site Bookmark null Update Model model UpdateUI get Default get Update Model model add Bookmark site Bookmark model save Bookmarks update Search Request return  handleAddLocal SiteBookmark siteBookmark LocalSiteSelector getLocaLSite getShell siteBookmark UpdateModel getDefault getUpdateModel addBookmark siteBookmark saveBookmarks updateSearchRequest
private void handle Add Local Zipped Site Bookmark site Bookmark Local Site Selector get LocaL Zipped Site get Shell if site Bookmark null Update Model model UpdateUI get Default get Update Model model add Bookmark site Bookmark model save Bookmarks update Search Request return  handleAddLocalZipped SiteBookmark siteBookmark LocalSiteSelector getLocaLZippedSite getShell siteBookmark UpdateModel getDefault getUpdateModel addBookmark siteBookmark saveBookmarks updateSearchRequest
show While tree Viewer get Control get Display new Runnable public void run Update Model update Model UpdateUI get Default get Update Model I Structured Selection ssel I Structured Selection tree Viewer get Selection Site Bookmark bookmark Site Bookmark ssel get First Element if bookmark is Read Only update Model remove Bookmark bookmark update Search Request  showWhile treeViewer getControl getDisplay UpdateModel updateModel getDefault getUpdateModel IStructuredSelection IStructuredSelection treeViewer getSelection SiteBookmark SiteBookmark getFirstElement isReadOnly updateModel removeBookmark updateSearchRequest
private void handle Remove Busy Indicator show While tree Viewer get Control get Display new Runnable public void run Update Model update Model UpdateUI get Default get Update Model I Structured Selection ssel I Structured Selection tree Viewer get Selection Site Bookmark bookmark Site Bookmark ssel get First Element if bookmark is Read Only update Model remove Bookmark bookmark update Search Request  handleRemove BusyIndicator showWhile treeViewer getControl getDisplay UpdateModel updateModel getDefault getUpdateModel IStructuredSelection IStructuredSelection treeViewer getSelection SiteBookmark SiteBookmark getFirstElement isReadOnly updateModel removeBookmark updateSearchRequest
private void handle Edit I Structured Selection ssel I Structured Selection tree Viewer get Selection Site Bookmark bookmark Site Bookmark ssel get First Element URL oldURL bookmark getURL Edit Site Dialog dialog new Edit Site Dialog get Shell bookmark dialog create String title bookmark is Local UpdateUI get String Site Page dialog Edit Local UpdateUI get String Site Page dialog Edit Update Site NON NLS 1 NON NLS 2 NON NLS 2 dialog get Shell set Text title if dialog open Edit Site Dialog OK URL newURL bookmark getURL if Update Manager Utils sameURL oldURL newURL Update Model model UpdateUI get Default get Update Model model fire Object Changed bookmark null update Search Request  handleEdit IStructuredSelection IStructuredSelection treeViewer getSelection SiteBookmark SiteBookmark getFirstElement EditSiteDialog EditSiteDialog getShell isLocal getString SitePage dialogEditLocal getString SitePage dialogEditUpdateSite getShell setText EditSiteDialog UpdateManagerUtils UpdateModel getDefault getUpdateModel fireObjectChanged updateSearchRequest
private void handle Site Checked Site Bookmark bookmark boolean checked if bookmark is Unavailable bookmark set Selected false tree Viewer set Checked bookmark false return bookmark set Selected checked if checked bookmark set Ignored Categories new String 0 if checked bookmark is Site Connected tree Viewer set Subtree Checked bookmark checked at this point we may realize the site is not available if bookmark is Unavailable tree Viewer set Checked bookmark false return tree Viewer set Grayed bookmark false update Search Request  handleSiteChecked SiteBookmark isUnavailable setSelected treeViewer setChecked setSelected setIgnoredCategories isSiteConnected treeViewer setSubtreeChecked isUnavailable treeViewer setChecked treeViewer setGrayed updateSearchRequest
private void handle Site Expanded Site Bookmark bookmark Object cats if bookmark is Selected tree Viewer set Subtree Checked bookmark false Array List result new Array List for int i 0 i cats length i if cats i instanceof Site Category result add Site Category cats i get Full Name bookmark set Ignored Categories String result to Array new String result size else String ignored bookmark get Ignored Categories Hash Set imap new Hash Set for int i 0 i ignored length i imap add ignored i for int i 0 i cats length i if cats i instanceof Site Category Site Category category Site Category cats i tree Viewer set Checked category imap contains category get Full Name tree Viewer set Grayed bookmark ignored length 0 ignored length cats length search Runner set New Search Needed true  handleSiteExpanded SiteBookmark isSelected treeViewer setSubtreeChecked ArrayList ArrayList SiteCategory SiteCategory getFullName setIgnoredCategories toArray getIgnoredCategories HashSet HashSet SiteCategory SiteCategory SiteCategory treeViewer setChecked getFullName treeViewer setGrayed searchRunner setNewSearchNeeded
private void handle Category Checked Site Category category boolean checked Site Bookmark bookmark category get Bookmark Array List array new Array List if bookmark is Selected String ignored bookmark get Ignored Categories for int i 0 i ignored length i array add ignored i else Object categs get Site Catalog With Indicator bookmark bookmark is Site Connected for int i 0 i categs length i array add Site Category categs i get Full Name if checked array remove category get Full Name else array add category get Full Name bookmark set Ignored Categories String array to Array new String array size search Runner set New Search Needed true Object children Tree Content Provider tree Viewer get Content Provider get Children category get Bookmark tree Viewer set Checked bookmark array size children length bookmark set Selected array size children length tree Viewer set Grayed bookmark array size 0 array size children length update Search Request  handleCategoryChecked SiteCategory SiteBookmark getBookmark ArrayList ArrayList isSelected getIgnoredCategories getSiteCatalogWithIndicator isSiteConnected SiteCategory getFullName getFullName getFullName setIgnoredCategories toArray searchRunner setNewSearchNeeded TreeContentProvider treeViewer getContentProvider getChildren getBookmark treeViewer setChecked setSelected treeViewer setGrayed updateSearchRequest
private void handle Selection Changed I Structured Selection ssel boolean enable false Object item ssel get First Element if item instanceof Site Bookmark enable Site Bookmark item is Read Only edit Button set Enabled enable remove Button set Enabled enable  handleSelectionChanged IStructuredSelection getFirstElement SiteBookmark SiteBookmark isReadOnly editButton setEnabled removeButton setEnabled
private void update Search Request Object checked tree Viewer get Checked Elements Update Search Scope scope new Update Search Scope int nsites 0 for int i 0 i checked length i if checked i instanceof Site Bookmark Site Bookmark bookmark Site Bookmark checked i scope add Search Site bookmark get Label bookmark getURL bookmark get Ignored Categories nsites search Request set Scope scope search Runner set New Search Needed true set Page Complete nsites 0  updateSearchRequest treeViewer getCheckedElements UpdateSearchScope UpdateSearchScope SiteBookmark SiteBookmark SiteBookmark addSearchSite getLabel getIgnoredCategories searchRequest setScope searchRunner setNewSearchNeeded setPageComplete
public Update Search Request get Search Request return search Request  UpdateSearchRequest getSearchRequest searchRequest
public void set Visible boolean value super set Visible value if value search Runner set Search Provider this Reset all unavailable sites so they can be tried again if the user wants it Site Bookmark bookmarks get All Site Bookmarks for int i 0 i bookmarks length i if bookmarks i is Unavailable bookmarks i set Unavailable false  setVisible setVisible searchRunner setSearchProvider SiteBookmark getAllSiteBookmarks isUnavailable setUnavailable
I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try monitor begin Task 3 NON NLS 1 monitor worked 1 if connect bookmark connect new Sub Progress Monitor monitor 1 else monitor worked 1 bag catalog bookmark get Catalog true new Sub Progress Monitor monitor 1 catch Core Exception e throw new Invocation Target Exception e finally monitor done  IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException beginTask SubProgressMonitor getCatalog SubProgressMonitor CoreException InvocationTargetException
private Object get Site Catalog With Indicator final Site Bookmark bookmark final boolean connect final Catalog Bag bag new Catalog Bag if bookmark is Unavailable return new Object 0 I Runnable With Progress op new I Runnable With Progress public void run I Progress Monitor monitor throws Invocation Target Exception try monitor begin Task 3 NON NLS 1 monitor worked 1 if connect bookmark connect new Sub Progress Monitor monitor 1 else monitor worked 1 bag catalog bookmark get Catalog true new Sub Progress Monitor monitor 1 catch Core Exception e throw new Invocation Target Exception e finally monitor done try get Container run true true op catch Invocation Target Exception e UpdateUI log Exception e catch Interrupted Exception e return bag catalog null new Object 0 bag catalog  getSiteCatalogWithIndicator SiteBookmark CatalogBag CatalogBag isUnavailable IRunnableWithProgress IRunnableWithProgress IProgressMonitor InvocationTargetException beginTask SubProgressMonitor getCatalog SubProgressMonitor CoreException InvocationTargetException getContainer InvocationTargetException logException InterruptedException
private Site Bookmark get All Site Bookmarks Update Model model UpdateUI get Default get Update Model Object bookmarks model get Bookmark Leafs Object sites To Visit discovery Folder get Children discovery Folder Site Bookmark all new Site Bookmark bookmarks length sites To Visit length System arraycopy bookmarks 0 all 0 bookmarks length System arraycopy sites To Visit 0 all bookmarks length sites To Visit length return all  SiteBookmark getAllSiteBookmarks UpdateModel getDefault getUpdateModel getBookmarkLeafs sitesToVisit discoveryFolder getChildren discoveryFolder SiteBookmark SiteBookmark sitesToVisit sitesToVisit sitesToVisit

add Control Listener new Control Adapter public void control Resized Control Event e Rectangle area get Client Area Table table Table get Children 0 Point preferred Size compute Table Size table int width area width 2 table get Border Width if preferred Size y area height Subtract the scrollbar width from the total column width if a vertical scrollbar will be required Point v Bar Size table get Vertical Bar get Size width v Bar Size x layout Table table width area table get Size x area width  addControlListener ControlAdapter controlResized ControlEvent getClientArea getChildren preferredSize computeTableSize getBorderWidth preferredSize vBarSize getVerticalBar getSize vBarSize layoutTable getSize
Creates a new code Table Layout Composite code public Table Layout Composite Composite parent int style super parent style add Control Listener new Control Adapter public void control Resized Control Event e Rectangle area get Client Area Table table Table get Children 0 Point preferred Size compute Table Size table int width area width 2 table get Border Width if preferred Size y area height Subtract the scrollbar width from the total column width if a vertical scrollbar will be required Point v Bar Size table get Vertical Bar get Size width v Bar Size x layout Table table width area table get Size x area width  TableLayoutComposite TableLayoutComposite addControlListener ControlAdapter controlResized ControlEvent getClientArea getChildren preferredSize computeTableSize getBorderWidth preferredSize vBarSize getVerticalBar getSize vBarSize layoutTable getSize
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
private Point compute Table Size Table table Point result table compute Size SWT DEFAULT SWT DEFAULT 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 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  computeTableSize computeSize ColumnLayoutData layoutData ColumnLayoutData layoutData ColumnPixelData ColumnPixelData ColumnPixelData layoutData layoutData ColumnWeightData ColumnWeightData ColumnWeightData layoutData minimumWidth isTrue
private void layout Table Table table int width Rectangle area boolean increase 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 int pixels Column Pixel Data col width 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 fixed Width cw minimum Width 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 spare Pixels total Weight 0 0 weight rest total Weight int new Width cw minimum Width if spare Pixels 0 new Width spare Pixels total Distributed new Width widths i new Width 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 if increase table set Size area width area height for int i 0 i size i table Columns i set Width widths i if increase table set Size area width area height  layoutTable TableColumn tableColumns getColumns tableColumns fixedWidth numberOfWeightColumns totalWeight ColumnLayoutData ColumnLayoutData ColumnPixelData ColumnPixelData fixedWidth ColumnWeightData ColumnWeightData ColumnWeightData numberOfWeightColumns firstTime tableColumns getWidth fixedWidth minimumWidth totalWeight isTrue numberOfWeightColumns fixedWidth totalDistributed ColumnLayoutData ColumnLayoutData ColumnWeightData ColumnWeightData ColumnWeightData firstTime tableColumns getWidth sparePixels totalWeight totalWeight newWidth minimumWidth sparePixels newWidth sparePixels totalDistributed newWidth newWidth totalDistributed ColumnLayoutData ColumnLayoutData ColumnWeightData setSize tableColumns setWidth setSize

import org eclipse swt widgets import org eclipse ui help 
import org eclipse update internal operations import org eclipse update internal ui import org eclipse update internal ui parts 
public class Target Page extends Banner Page implements I Dynamic Page private Table Viewer job Viewer private Table Viewer site Viewer private I Install Configuration config private Config Listener config Listener private Label required Space Label private Label available Space Label  TargetPage BannerPage IDynamicPage TableViewer jobViewer TableViewer siteViewer IInstallConfiguration ConfigListener configListener requiredSpaceLabel availableSpaceLabel
private I Install Feature Operation jobs private Button add Button private Button delete Button private Hash Set added  IInstallFeatureOperation addButton deleteButton HashSet
implements I Structured Content Provider public Object get Elements Object parent return jobs  IStructuredContentProvider getElements
class Sites Content Provider  SitesContentProvider
implements I Structured Content Provider public Object get Elements Object parent return config get Configured Sites class Jobs Label Provider extends Label Provider  IStructuredContentProvider getElements getConfiguredSites JobsLabelProvider LabelProvider
implements I Table Label Provider public Image get Column Image Object obj int col Update Label Provider provider UpdateUI get Default get Label Provider I Install Feature Operation job I Install Feature Operation obj Image Descriptor base job get Feature is Patch UpdateUI Images DESC EFIX OBJ UpdateUI Images DESC FEATURE OBJ int flags 0  ITableLabelProvider getColumnImage UpdateLabelProvider getDefault getLabelProvider IInstallFeatureOperation IInstallFeatureOperation ImageDescriptor getFeature isPatch UpdateUIImages DESC_EFIX_OBJ UpdateUIImages DESC_FEATURE_OBJ
flags Update Label Provider F ERROR return provider get base flags public String get Column Text Object obj int col if col 0  UpdateLabelProvider F_ERROR getColumnText
I Feature feature I Install Feature Operation obj get Feature return feature get Label  IFeature IInstallFeatureOperation getFeature getLabel
NON NLS 1 feature get Versioned Identifier get Version to String  getVersionedIdentifier getVersion toString
public String get Column Text Object obj int col if col 0 I Site site I Configured Site obj get Site  getColumnText ISite IConfiguredSite getSite
class Config Listener implements I Install Configuration Changed Listener  ConfigListener IInstallConfigurationChangedListener
return null class Sites Label Provider extends Label Provider implements I Table Label Provider public Image get Column Image Object obj int col Update Label Provider provider UpdateUI get Default get Label Provider return provider get Local Site Image I Configured Site obj public String get Column Text Object obj int col if col 0 I Site site I Configured Site obj get Site return new File site getURL get File to String return null class Config Listener implements I Install Configuration Changed Listener public void install Site Added I Configured Site csite site Viewer add csite if added null added new Hash Set added add csite set the site as target for all jobs without a target for int i 0 jobs null i jobs length i if jobs i get Target Site null get Site Visibility csite jobs i jobs i set Target Site csite job Viewer refresh  SitesLabelProvider LabelProvider ITableLabelProvider getColumnImage UpdateLabelProvider getDefault getLabelProvider getLocalSiteImage IConfiguredSite getColumnText ISite IConfiguredSite getSite getFile toString ConfigListener IInstallConfigurationChangedListener installSiteAdded IConfiguredSite siteViewer HashSet getTargetSite getSiteVisibility setTargetSite jobViewer
site Viewer remove csite if added null added remove csite remove the target site for all jobs that use it set the site as target for all jobs without a target boolean refresh Jobs false  siteViewer refreshJobs
site Viewer get Control set Focus public void install Site Removed I Configured Site csite site Viewer remove csite if added null added remove csite remove the target site for all jobs that use it set the site as target for all jobs without a target boolean refresh Jobs false for int i 0 jobs null i jobs length i  siteViewer getControl setFocus installSiteRemoved IConfiguredSite siteViewer refreshJobs
page Changed  pageChanged
job Viewer refresh if refresh Jobs job Viewer get Control set Focus  jobViewer refreshJobs jobViewer getControl setFocus
if jobs i get Target Site csite jobs i set Target Site null refresh Jobs true page Changed job Viewer refresh if refresh Jobs job Viewer get Control set Focus else site Viewer get Control set Focus  getTargetSite setTargetSite refreshJobs pageChanged jobViewer refreshJobs jobViewer getControl setFocus siteViewer getControl setFocus
Constructor for Review Page2 public Target Page I Install Configuration config  ReviewPage2 TargetPage IInstallConfiguration
super Target NON NLS 1 set Title UpdateUI get String Install Wizard Target Page title NON NLS 1 set Description UpdateUI get String Install Wizard Target Page desc NON NLS 1 this config config UpdateUI get Default get Label Provider connect this  setTitle getString InstallWizard TargetPage setDescription getString InstallWizard TargetPage getDefault getLabelProvider
public void set Jobs I Install Feature Operation jobs  setJobs IInstallFeatureOperation
public void dispose UpdateUI get Default get Label Provider disconnect this config remove Install Configuration Changed Listener config Listener  getDefault getLabelProvider removeInstallConfigurationChangedListener configListener
super dispose public Control create Contents Composite parent  createContents
Grid Layout layout new Grid Layout layout num Columns 3 layout margin Width layout margin Height 0  GridLayout GridLayout numColumns marginWidth marginHeight
Label label new Label client SWT NULL label set Text UpdateUI get String Install Wizard Target Page jobs Label NON NLS 1 label new Label client SWT NULL label set Text UpdateUI get String Install Wizard Target Page site Label NON NLS 1 new Label client SWT NULL create Job Viewer client  setText getString InstallWizard TargetPage jobsLabel setText getString InstallWizard TargetPage siteLabel createJobViewer
create Site Viewer client Composite button Container new Composite client SWT NULL Grid Layout blayout new Grid Layout blayout margin Width blayout margin Height 0 button Container set Layout blayout button Container set Layout Data new Grid Data Grid Data FILL VERTICAL add Button new Button button Container SWT PUSH add Button set Text UpdateUI get String Install Wizard Target Page new NON NLS 1 add Button add Selection Listener new Selection Adapter  createSiteViewer buttonContainer GridLayout GridLayout marginWidth marginHeight buttonContainer setLayout buttonContainer setLayoutData GridData GridData FILL_VERTICAL addButton buttonContainer addButton setText getString InstallWizard TargetPage addButton addSelectionListener SelectionAdapter
add Target Location add Button set Enabled false add Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN CENTER SWT Util set Button Dimension Hint add Button  addTargetLocation addButton setEnabled addButton setLayoutData GridData GridData HORIZONTAL_ALIGN_CENTER SWTUtil setButtonDimensionHint addButton
delete Button new Button button Container SWT PUSH delete Button set Text UpdateUI get String Install Wizard Target Page delete NON NLS 1 delete Button add Selection Listener new Selection Adapter public void widget Selected Selection Event e try remove Selection catch Core Exception ex UpdateUI log Exception ex delete Button set Enabled false delete Button set Layout Data new Grid Data Grid Data HORIZONTAL ALIGN CENTER SWT Util set Button Dimension Hint delete Button Composite status new Composite client SWT NULL Grid Data gd new Grid Data Grid Data HORIZONTAL ALIGN FILL gd horizontal Span 3 status set Layout Data gd layout new Grid Layout  deleteButton buttonContainer deleteButton setText getString InstallWizard TargetPage deleteButton addSelectionListener SelectionAdapter widgetSelected SelectionEvent removeSelection CoreException logException deleteButton setEnabled deleteButton setLayoutData GridData GridData HORIZONTAL_ALIGN_CENTER SWTUtil setButtonDimensionHint deleteButton GridData GridData GridData HORIZONTAL_ALIGN_FILL horizontalSpan setLayoutData GridLayout
layout num Columns 2 status set Layout layout label new Label status SWT NULL label set Text UpdateUI get String Install Wizard Target Page required Space NON NLS 1 required Space Label new Label status SWT NULL  numColumns setLayout setText getString InstallWizard TargetPage requiredSpace requiredSpaceLabel
label new Label status SWT NULL label set Text UpdateUI get String Install Wizard Target Page available Space NON NLS 1 available Space Label new Label status SWT NULL available Space Label set Layout Data new Grid Data Grid Data FILL HORIZONTAL Workbench Help set Help client org eclipse update ui Multi Target Page2 NON NLS 1 Dialog apply Dialog Font parent return client  setText getString InstallWizard TargetPage availableSpace availableSpaceLabel availableSpaceLabel setLayoutData GridData GridData FILL_HORIZONTAL WorkbenchHelp setHelp MultiTargetPage2 applyDialogFont
private void create Job Viewer Composite parent job Viewer new Table Viewer parent SWT H SCROLL SWT V SCROLL SWT BORDER Grid Data gd new Grid Data Grid Data FILL BOTH gd width Hint 150 job Viewer get Table set Layout Data gd job Viewer set Content Provider new Jobs Content Provider job Viewer set Label Provider new Jobs Label Provider job Viewer add Selection Changed Listener new I Selection Changed Listener public void selection Changed Selection Changed Event event  createJobViewer jobViewer TableViewer H_SCROLL V_SCROLL GridData GridData GridData FILL_BOTH widthHint jobViewer getTable setLayoutData jobViewer setContentProvider JobsContentProvider jobViewer setLabelProvider JobsLabelProvider jobViewer addSelectionChangedListener ISelectionChangedListener selectionChanged SelectionChangedEvent
I Install Feature Operation job I Install Feature Operation selection get First Element if job null site Viewer set Input job I Configured Site affinity Site Update Utils get Affinity Site config job get Feature I Configured Site affinity Site Update Utils get Default Target Site config job true  IInstallFeatureOperation IInstallFeatureOperation getFirstElement siteViewer setInput IConfiguredSite affinitySite UpdateUtils getAffinitySite getFeature IConfiguredSite affinitySite UpdateUtils getDefaultTargetSite
add Button set Enabled affinity Site null if job get Target Site null site Viewer set Selection new Structured Selection job get Target Site  addButton setEnabled affinitySite getTargetSite siteViewer setSelection StructuredSelection getTargetSite

see I Problem Handler report Problem String public boolean report Problem String problem Text String title UpdateUI get String Revert Problem Dialog title NON NLS 1 return Message Dialog open Question UpdateUI get Active Workbench Shell title problem Text  IProblemHandler reportProblem reportProblem problemText getString ProblemDialog MessageDialog openQuestion getActiveWorkbenchShell problemText

public interface I Batch Operation extends I Operation Returns the batched operations return the batched operations  IBatchOperation IOperation

public interface I Feature Operation extends I Operation Returns the feature to operate on return the feature to operate on  IFeatureOperation IOperation
public abstract I Feature get Feature Returns the site in which the operation is applied return the site that owns or will own the feature  IFeature getFeature
public abstract I Configured Site get Target Site Returns the previous version of the feature if any return the previous installed version of a feature if any  IConfiguredSite getTargetSite
public abstract I Feature get Old Feature Sets the site in which the feature is being operated on param target Site the site in which the featre is being operated on  IFeature getOldFeature targetSite

public interface I Install Feature Operation extends I Feature Operation If the feature includes optional features thi method returns the list of optional features to be installed return the list of optional features to be installed  IInstallFeatureOperation IFeatureOperation

public interface I Operation Returns true when the operation has been processed return true when the operation completed  IOperation
public abstract boolean is Processed Marks the operation as processed public abstract void mark Processed  isProcessed markProcessed
public abstract void mark Processed Executes operation param pm Progress monitor for the operation param listener Operation listener return true if operation was successful and a restart is needed throws Core Exception throws Invocation Target Exception  markProcessed CoreException InvocationTargetException

public interface I Operation Factory Creates an operation for configuring an installed feature in the specified site param target Site site containing the feature to configure param feature feature to be configured return the configure operation public I Config Feature Operation create Config Operation I Configured Site target Site  IOperationFactory targetSite IConfigFeatureOperation createConfigOperation IConfiguredSite targetSite
Creates an operation for unconfiguring a feature param target Site site containing the feature to unconfigure param feature feature to be unconfigured return the unconfigure operation public I Unconfig Feature Operation create Unconfig Operation I Configured Site target Site  targetSite IUnconfigFeatureOperation createUnconfigOperation IConfiguredSite targetSite
Creates an operation for installing a feature param target Site site in which the feature is to be installed param feature feature to be installed param optional Features optionally included features to be installed if any param unconfigured Optional Features when installing optional features some can be left unconfigured param verifier operation verification listener return the install operation public I Install Feature Operation create Install Operation I Configured Site target Site I Feature feature I Feature Reference optional Features I Feature unconfigured Optional Features  targetSite optionalFeatures unconfiguredOptionalFeatures IInstallFeatureOperation createInstallOperation IConfiguredSite targetSite IFeature IFeatureReference optionalFeatures IFeature unconfiguredOptionalFeatures
Creates an operation to uninstall a feature param target Site site containing the feature to uninstall param feature feature to be uninstalled return the uninstall operation public I Uninstall Feature Operation create Uninstall Operation I Configured Site target Site  targetSite IUninstallFeatureOperation createUninstallOperation IConfiguredSite targetSite
Creates an operation for replacing this feature by a previous version param feature current feature param another Feature the new feature to be swapped in return the revert feature version operation public I Config Feature Operation create Replace Feature Version Operation I Feature feature  anotherFeature IConfigFeatureOperation createReplaceFeatureVersionOperation IFeature
Creates an operation for executing a set of feature operation in batch mode param operations operation to execute in batch mode return the batch operation 
Creates ann operation to configure unconfigure an installation site also known as enable disable site param site site to configure unconfigure return the toggle site operation public I Toggle Site Operation create Toggle Site Operation  IToggleSiteOperation createToggleSiteOperation
Creates an operation to revert to a previous installation configuration param config configuration to revert to param problem Handler error handler return the revert operation public I Revert Configuration Operation create Revert Configuration Operation I Install Configuration config  problemHandler IRevertConfigurationOperation createRevertConfigurationOperation IInstallConfiguration

public interface I Operation Listener May be called before an operation starts executing param operation operation to listen to param data info specific to the operation return not used  IOperationListener
public boolean before Execute I Operation operation Object data May be called after an operation finishes executing param operation operation to listen to param data info specific to the operation return not used  beforeExecute IOperation

Called before performing install return the error status or null if no errors 
Called before performing operation return the error status or null if no errors 
Called before performing operation return the error status or null if no errors 
Called before performing operation return the error status or null if no errors 
Called before doing a revert restore operation return the error status or null if no errors 
Called by the UI before doing a batched processing of several pending changes return the error status or null if no errors 
Check the current state return the error status or null if no errors 
Checks if the platform configuration has been modified outside this program return the error status or null if no errors 

public interface I Update Model Changed Listener Called after a feature site etc is added param parent parent object param children added children  IUpdateModelChangedListener
public void objects Added Object parent Object children Called after a feature site etc is removed param parent parent object param children removed children  objectsAdded
public void objects Removed Object parent Object children Called when there are changes to a site feature etc param object object that changed param property object property that changed  objectsRemoved

private static boolean in Progress private Operations Manager  inProgress OperationsManager
Each update operations must be created by the operation factory Use this method to obtain the factory return returns the operation factory public static I Operation Factory get Operation Factory if operation Factory null operation Factory new Operation Factory return operation Factory  IOperationFactory getOperationFactory operationFactory operationFactory OperationFactory operationFactory
Check if the feature is the subject of an update operation such as install configure etc and return it Currently there can only be one pending operation on a feature param feature feature to check for pending operations return pending operation if any otherwise null public static I Feature Operation find Pending Operation I Feature feature for int i 0 i pending Operations size i I Feature Operation operation I Feature Operation pending Operations element At i if operation get Feature equals feature return operation return null  IFeatureOperation findPendingOperation IFeature pendingOperations IFeatureOperation IFeatureOperation pendingOperations elementAt getFeature
Register a pending operation param operation pending operation public static void add Pending Operation I Operation operation pending Operations add operation fire Objects Added this new Object change  addPendingOperation IOperation pendingOperations fireObjectsAdded
Unregister a pending operation param operation pending operation public static void remove Pending Operation I Operation operation pending Operations remove operation fire Objects Removed this new Object change  removePendingOperation IOperation pendingOperations fireObjectsRemoved
Adds a model changed listener param listener update model change listener public static void add Update Model Changed Listener I Update Model Changed Listener listener if listeners contains listener listeners add listener  addUpdateModelChangedListener IUpdateModelChangedListener
Removes an model changed listener param listener update model change listener public static void remove Update Model Changed Listener I Update Model Changed Listener listener if listeners contains listener listeners remove listener  removeUpdateModelChangedListener IUpdateModelChangedListener
Notifies model changed listeners when features sites etc are added param parent parent object param children children added public static void fire Objects Added Object parent Object children for Iterator iter listeners iterator iter has Next I Update Model Changed Listener listener I Update Model Changed Listener iter next listener objects Added parent children  fireObjectsAdded hasNext IUpdateModelChangedListener IUpdateModelChangedListener objectsAdded
Notifies model changed listeners when features sites etc are removed param parent parent object param children children removed public static void fire Objects Removed Object parent Object children for Iterator iter listeners iterator iter has Next I Update Model Changed Listener listener I Update Model Changed Listener iter next listener objects Removed parent children  fireObjectsRemoved hasNext IUpdateModelChangedListener IUpdateModelChangedListener objectsRemoved
Notifies model changed listeners when features sites etc have changed param object changed object param property changed object property public static void fire Object Changed Object object String property for Iterator iter listeners iterator iter has Next I Update Model Changed Listener listener I Update Model Changed Listener iter next listener object Changed object property  fireObjectChanged hasNext IUpdateModelChangedListener IUpdateModelChangedListener objectChanged
Returns true when any of the install operations requires a license agreement param jobs features to install return true when any of the features to install have a license public static boolean has Selected Jobs With Licenses I Install Feature Operation jobs for int i 0 i jobs length i if Update Utils has License jobs i get Feature return true return false  hasSelectedJobsWithLicenses IInstallFeatureOperation UpdateUtils hasLicense getFeature
Returns true when any of the features to install has optional features param jobs features to install return true when any of the features has optional features public static boolean has Selected Jobs With Optional Features I Install Feature Operation jobs for int i 0 i jobs length i if Update Utils has Optional Features jobs i get Feature return true return false  hasSelectedJobsWithOptionalFeatures IInstallFeatureOperation UpdateUtils hasOptionalFeatures getFeature
Returns the list of operations that need a license agreement param jobs features to install return the list of operation that need a license agreement public static I Install Feature Operation get Selected Jobs With Licenses I Install Feature Operation jobs Array List list new Array List for int i 0 i jobs length i if Update Utils has License jobs i get Feature list add jobs i return I Install Feature Operation list to Array new I Install Feature Operation list size  IInstallFeatureOperation getSelectedJobsWithLicenses IInstallFeatureOperation ArrayList ArrayList UpdateUtils hasLicense getFeature IInstallFeatureOperation toArray IInstallFeatureOperation
Returns the list of operations that have optional features to install param jobs features to install return list of operations that have optional features to install public static I Install Feature Operation get Selected Jobs With Optional Features I Install Feature Operation jobs Array List list new Array List for int i 0 i jobs length i if Update Utils has Optional Features jobs i get Feature list add jobs i return I Install Feature Operation list to Array new I Install Feature Operation list size  IInstallFeatureOperation getSelectedJobsWithOptionalFeatures IInstallFeatureOperation ArrayList ArrayList UpdateUtils hasOptionalFeatures getFeature IInstallFeatureOperation toArray IInstallFeatureOperation
Sets whether any operations is in progress param in Progress true when operation is in progress public static synchronized void set In Progress boolean in Progress Operations Manager in Progress in Progress  inProgress setInProgress inProgress OperationsManager inProgress inProgress
Returns true when some operation is being executed false otherwise return true when some operation execution is in progress false otherwise public static synchronized boolean is In Progress return in Progress  isInProgress inProgress
Returns the operations validator return the operation validator public static I Operation Validator get Validator if validator null validator new Operation Validator return validator  IOperationValidator getValidator OperationValidator
Sets a custom operation validator param validator the custom validator public static void set Validator I Operation Validator validator Operations Manager validator validator  setValidator IOperationValidator OperationsManager
Applies the changes made to the current configuration Care must be taken when using this method Normally if you install a new plugin it is safe to do it public static void apply Changes Now Install Configuration apply Changes  applyChangesNow InstallConfiguration applyChanges

public class Back Level Filter extends Base Filter public boolean accept I Feature Reference match try Plugin Version Identifier match Vid match get Versioned Identifier get Version I Feature installed Update Utils get Installed Features match get Versioned Identifier false if installed length 0 return true for int i 0 i installed length i Plugin Version Identifier ivid installed i get Versioned Identifier get Version if match Vid is Greater Than ivid continue installed version is the same or newer than the match filter out return false return true catch Core Exception e return false  BackLevelFilter BaseFilter IFeatureReference PluginVersionIdentifier matchVid getVersionedIdentifier getVersion IFeature UpdateUtils getInstalledFeatures getVersionedIdentifier PluginVersionIdentifier getVersionedIdentifier getVersion matchVid isGreaterThan CoreException

public class Base Filter implements I Update Search Filter public boolean accept I Feature match return true  BaseFilter IUpdateSearchFilter IFeature
return true public boolean accept I Feature Reference match return true  IFeatureReference

public class Environment Filter extends Base Filter public boolean accept I Feature match return Update Manager Utils is Valid Environment match  EnvironmentFilter BaseFilter IFeature UpdateManagerUtils isValidEnvironment

public interface I Query Update Site Adapter extends I Update Site Adapter Returns an ID that can be used for matching against the information in the address mapping file return a mapping Id to compare against the address mapping file  IQueryUpdateSiteAdapter IUpdateSiteAdapter

public interface I Update Search Category Returns the unique identifier of this search category public String get Id  IUpdateSearchCategory getId
public String get Id Accepts the identifier assigned to this category during the registry reading  getId
Returns an array of update search queries that need to be run during the search return an arry of update search queries 

public interface I Update Search Filter Tests a feature according to this filter s criteria param match the feature to test return samp true samp if the feature has been accepted samp false samp otherwise  IUpdateSearchFilter
Tests a feature reference according to this filter s criteria This is a prefilter that allows rejecting a feature before a potentially lengthy download param match the feature reference to test return samp true samp if the feature reference has been accepted samp false samp otherwise 

public interface I Update Search Query Returns an update site adapter that should be added to the scope while running this query Some search category may need to scan specific site adapter in addition to those specified in the search scope return the query specific site adapter or samp null samp if not specified  IUpdateSearchQuery
Executes the query The implementors should scan the provided update site scipping certain categories if provided and pass the matches to the result collector The query is also responsible of scoping and moving the provided progress monitor param site the update site to scan param categories To Skip an array of category names that need to be skipped or samp null samp if categories should not be taken into account param filter a filter to apply before passing the match to collector param collector an object that is used for reporting search results param monitor a progress monitor to report search progress within the provided site  categoriesToSkip

public interface I Update Search Result Collector Called when a matching feature has been found during the search param match the matching feature  IUpdateSearchResultCollector

public interface I Update Search Site extends I Update Site Adapter Returns an array of categories that need not be searched when scanning this site or samp null samp if all the features must be tested return an array of category names or samp null samp if all the features must be tested  IUpdateSearchSite IUpdateSiteAdapter

public interface I Update Site Adapter Returns the presentation string that can be used for this site return the update site label  IUpdateSiteAdapter
public String get Label Returns the URL of the update site return the URL of the update site  getLabel

private Array List filters public void add Filter I Update Search Filter filter if filters null filters new Array List if filters contains filter false filters add filter  ArrayList addFilter IUpdateSearchFilter ArrayList
public void remove Filter I Update Search Filter filter if filters null return filters remove filter  removeFilter IUpdateSearchFilter
public boolean accept I Feature match if filters null return true for int i 0 i filters size i I Update Search Filter filter I Update Search Filter filters get i if filter accept match false return false return true  IFeature IUpdateSearchFilter IUpdateSearchFilter
public boolean accept I Feature Reference match if filters null return true for int i 0 i filters size i I Update Search Filter filter I Update Search Filter filters get i if filter accept match false return false return true  IFeatureReference IUpdateSearchFilter IUpdateSearchFilter
The constructor that accepts the search category and scope objects param category the actual search pattern that should be applied param scope a list of sites that need to be scanned during the search public Update Search Request I Update Search Category category Update Search Scope scope this category category this scope scope  UpdateSearchRequest IUpdateSearchCategory UpdateSearchScope
Returns the search catagory used in this request return the search category public I Update Search Category get Category return category  IUpdateSearchCategory getCategory
Returns the scope of this search request return search scope public Update Search Scope get Scope return scope  UpdateSearchScope getScope
Adds a filter to this request This method does nothing if search is alrady in progress param filter the filter see Update Search Request remove Filter public void add Filter I Update Search Filter filter if search In Progress return aggregate Filter add Filter filter  UpdateSearchRequest removeFilter addFilter IUpdateSearchFilter searchInProgress aggregateFilter addFilter
Removes the filter from this request This method does nothing if search is alrady in progress param filter the filter to remove see Update Search Request add Filter public void remove Filter I Update Search Filter filter if search In Progress return aggregate Filter remove Filter filter  UpdateSearchRequest addFilter removeFilter IUpdateSearchFilter searchInProgress aggregateFilter removeFilter
Sets the scope object It is possible to reuse the search request object by modifying the scope and re running the search param scope the new search scope public void set Scope Update Search Scope scope this scope scope  setScope UpdateSearchScope
Tests whether this search request is current running return samp true samp if the search is currently running samp false samp otherwise public boolean is Search In Progress return search In Progress  isSearchInProgress searchInProgress
Runs the search using the category and scope configured into this request As results arrive they are passed to the search result collector object param collector matched features are passed to this object param monitor used to track the search progress throws Core Exception public void perform Search I Update Search Result Collector collector I Progress Monitor monitor throws Core Exception Array List status List new Array List search In Progress true I Update Search Query queries category get Queries I Update Search Site candidates scope get Search Sites URL update MapURL scope get Update MapURL boolean search Feature Provided Sites scope is Feature Provided Sites Enabled if monitor is Canceled int nsearchsites 0 for int i 0 i queries length i if queries i get Query Search Site null nsearchsites int ntasks nsearchsites queries length candidates length if update MapURL null ntasks monitor begin Task Policy bind Update Search Request searching ntasks NON NLS 1 try Update Policy update Policy null if update MapURL null update Policy new Update Policy I Status status load Update Policy update Policy update MapURL new Sub Progress Monitor monitor 1 if status null status List add status for int i 0 i queries length i I Update Search Query query queries i I Query Update Site Adapter qsite query get Query Search Site if qsite null search Feature Provided Sites check for mapping I Update Site Adapter mapped Site get Mapped Site update Policy qsite when there is no mapped site the feature is not updatable if mapped Site null mapped Site getURL null continue Sub Progress Monitor sub Monitor new Sub Progress Monitor monitor 1 I Status status search One Site mapped Site null query collector sub Monitor if status null status List add status if monitor is Canceled break for int j 0 j candidates length j if monitor is Canceled break I Update Search Site source candidates j Sub Progress Monitor sub Monitor new Sub Progress Monitor monitor 1 I Status status search One Site source source get Categories To Skip query collector sub Monitor if status null status List add status if monitor is Canceled break catch Core Exception e search In Progress false monitor done throw e search In Progress false monitor done if status List size 0 I Status children I Status status List to Array new I Status status List size Multi Status multi Status new Multi Status org eclipse update core NON NLS 1 I Site SITE ACCESS EXCEPTION children Policy bind Search network Problems NON NLS 1 null throw new Core Exception multi Status  CoreException performSearch IUpdateSearchResultCollector IProgressMonitor CoreException ArrayList statusList ArrayList searchInProgress IUpdateSearchQuery getQueries IUpdateSearchSite getSearchSites updateMapURL getUpdateMapURL searchFeatureProvidedSites isFeatureProvidedSitesEnabled isCanceled getQuerySearchSite updateMapURL beginTask UpdateSearchRequest UpdatePolicy updatePolicy updateMapURL updatePolicy UpdatePolicy IStatus loadUpdatePolicy updatePolicy updateMapURL SubProgressMonitor statusList IUpdateSearchQuery IQueryUpdateSiteAdapter getQuerySearchSite searchFeatureProvidedSites IUpdateSiteAdapter mappedSite getMappedSite updatePolicy mappedSite mappedSite SubProgressMonitor subMonitor SubProgressMonitor IStatus searchOneSite mappedSite subMonitor statusList isCanceled isCanceled IUpdateSearchSite SubProgressMonitor subMonitor SubProgressMonitor IStatus searchOneSite getCategoriesToSkip subMonitor statusList isCanceled CoreException searchInProgress searchInProgress statusList IStatus IStatus statusList toArray IStatus statusList MultiStatus multiStatus MultiStatus ISite SITE_ACCESS_EXCEPTION networkProblems CoreException multiStatus
private I Status load Update Policy Update Policy map URL url I Progress Monitor monitor throws Core Exception monitor sub Task Policy bind Update Search Request loading Policy NON NLS 1 try map load url monitor monitor worked 1 catch Core Exception e I Status status e get Status if status null status get Code I Site SITE ACCESS EXCEPTION throw e monitor worked 1 return status return null  IStatus loadUpdatePolicy UpdatePolicy IProgressMonitor CoreException subTask UpdateSearchRequest loadingPolicy CoreException IStatus getStatus getCode ISite SITE_ACCESS_EXCEPTION
private I Update Site Adapter get Mapped Site Update Policy policy I Query Update Site Adapter qsite if policy null policy is Loaded I Update Site Adapter mapped Site policy get Mapped Site qsite get Mapping Id if mapped Site null return mapped Site no match use original site if fallback allowed or nothing return policy is Fallback Allowed qsite null return qsite  IUpdateSiteAdapter getMappedSite UpdatePolicy IQueryUpdateSiteAdapter isLoaded IUpdateSiteAdapter mappedSite getMappedSite getMappingId mappedSite mappedSite isFallbackAllowed
private I Status search One Site I Update Site Adapter site Adapter String categories To Skip I Update Search Query query I Update Search Result Collector collector Sub Progress Monitor monitor throws Core Exception String text Policy bind Update Search Request contacting site Adapter get Label NON NLS 1 NON NLS 2 monitor sub Task text monitor begin Task 10 NON NLS 1 URL siteURL site Adapter getURL I Site site try site Site Manager get Site siteURL new Sub Progress Monitor monitor 1 catch Core Exception e Test the exception If the exception is due to the site connection problems allow the search to move on to the next site Otherwise rethrow the exception causing the search to terminate I Status status e get Status if status null status get Code I Site SITE ACCESS EXCEPTION throw e monitor worked 10 return status If frozen connection was canceled there will be no site if site null monitor worked 9 return null text Policy bind Update Search Request checking site Adapter get Label NON NLS 1 NON NLS 2 monitor get Wrapped Progress Monitor sub Task text query run site categories To Skip aggregate Filter collector new Sub Progress Monitor monitor 9 return null  IStatus searchOneSite IUpdateSiteAdapter siteAdapter categoriesToSkip IUpdateSearchQuery IUpdateSearchResultCollector SubProgressMonitor CoreException UpdateSearchRequest siteAdapter getLabel subTask beginTask siteAdapter ISite SiteManager getSite SubProgressMonitor CoreException IStatus getStatus getCode ISite SITE_ACCESS_EXCEPTION UpdateSearchRequest siteAdapter getLabel getWrappedProgressMonitor subTask categoriesToSkip aggregateFilter SubProgressMonitor

public Update Search Site String label URL siteURL String categories To Skip super label siteURL this categories To Skip categories To Skip  UpdateSearchSite categoriesToSkip categoriesToSkip categoriesToSkip
this categories To Skip categories To Skip public String get Categories To Skip return categories To Skip  categoriesToSkip categoriesToSkip getCategoriesToSkip categoriesToSkip
The default constructor public Update Search Scope sites new Vector  UpdateSearchScope
Sets the optional URL of the update map file This file is used to redirect search for new updates to other servers and is typically used when a local update site proxy possibly behind the firewall is set up param url the url of the Java properties file that contains the redirection information public void set Update MapURL URL url this update MapURL url  setUpdateMapURL updateMapURL
Returns the optional URL of the update map file By default no map file is set return the URL of the map file or samp null samp if not set public URL get Update MapURL return update MapURL  getUpdateMapURL updateMapURL
Adds the site to scan to the search scope param label the presentation name of the site to visit param siteURL the URL of the site to visit param categories To Skip an array of category names that should be skipped or samp null samp if all features should be considered public void add Search Site String label URL siteURL String categories To Skip sites add new Update Search Site label siteURL categories To Skip  categoriesToSkip addSearchSite categoriesToSkip UpdateSearchSite categoriesToSkip
Returns the sites that should be visited during the search return an array of site adapters public I Update Search Site get Search Sites return Update Search Site sites to Array new Update Search Site sites size  IUpdateSearchSite getSearchSites UpdateSearchSite toArray UpdateSearchSite
In addition to the sites added by add Search Site features contribute their own update url s This method returns true if those sites are also searched return true if update site provided by features are also searched Default is true public boolean is Feature Provided Sites Enabled return is Feature Provided Sites Enabled  addSearchSite isFeatureProvidedSitesEnabled isFeatureProvidedSitesEnabled
Enable or disable searching of feature provided update sites If disabled only sites added by add Search Site are searched param enable false to disable searching of feature provided sites By default these sites are searched public void set Feature Provided Sites Enabled boolean enable this is Feature Provided Sites Enabled enable  addSearchSite setFeatureProvidedSitesEnabled isFeatureProvidedSitesEnabled

private Array List vids public Versioned Identifiers Filter this new Versioned Identifier 0  ArrayList VersionedIdentifiersFilter VersionedIdentifier
public Versioned Identifiers Filter Versioned Identifier vids this vids new Array List vids length for int i 0 i vids length i this vids add vids i  VersionedIdentifiersFilter VersionedIdentifier ArrayList
public void add Versioned Identifier vid vids add vid  VersionedIdentifier
public boolean accept I Feature Reference match try for int i 0 i vids size i Versioned Identifier vid Versioned Identifier vids get i installed version is the same as the match accept if vid equals match get Versioned Identifier return true return false catch Core Exception e return false  IFeatureReference VersionedIdentifier VersionedIdentifier getVersionedIdentifier CoreException

param from Site if specified list only the features from the specified local install site public Add Site Command String from Site throws Exception try if from Site null site Path new File from Site if site Path exists throw new Exception Policy bind Standalone no Site from Site NON NLS 1 URL from SiteURL site Path toURL site Site Manager get Site from SiteURL null if site null throw new Exception Policy bind Standalone no Site from Site NON NLS 1 I Configured Site csite site get Current Configured Site if csite null throw new Exception Policy bind Standalone site Configured from Site NON NLS 1 else throw new Exception Policy bind Standalone no Site3 NON NLS 1 catch Exception e throw e  fromSite AddSiteCommand fromSite fromSite sitePath fromSite sitePath noSite fromSite fromSiteURL sitePath SiteManager getSite fromSiteURL noSite fromSite IConfiguredSite getCurrentConfiguredSite siteConfigured fromSite noSite3
public boolean run I Progress Monitor monitor check if the config file has been modifed while we were running I Status status Operations Manager get Validator validate Platform Config Valid if status null Update Core log status return false if site null return false try I Configured Site csite get Configuration create Configured Site site Path get Configuration add Configured Site csite update the sites array to pick up new site get Configuration get Configured Sites Site Manager get Local Site save return true catch Core Exception e Update Core log e return false  IProgressMonitor IStatus OperationsManager getValidator validatePlatformConfigValid UpdateCore IConfiguredSite getConfiguration createConfiguredSite sitePath getConfiguration addConfiguredSite getConfiguration getConfiguredSites SiteManager getLocalSite CoreException UpdateCore

private Hash Map options new Hash Map public Cmd Line Args String args default command options put command install for int i 0 i args length 1 i if command equals args i NON NLS 1 if is Valid Command args i 1 options put command args i 1 NON NLS 1 i else Standalone Update Application exception Logged Update Core log Utilities new Core Exception Policy bind Standalone invalid Cmd args i 1 NON NLS 1 null return if is Valid Param args i options put args i args i 1 i to should specify a directory if to specifies file URL change it to a directory String to String options get to NON NLS 1 if to null to starts With file NON NLS 1 try URL url new URL to options put to url get File NON NLS 1 catch MalformedURL Exception mue  HashMap HashMap CmdLineArgs isValidCommand StandaloneUpdateApplication exceptionLogged UpdateCore newCoreException invalidCmd isValidParam startsWith getFile MalformedURLException
private boolean is Valid Param String param return param equals command NON NLS 1 param equals version NON NLS 1 param equals to NON NLS 1 param equals from NON NLS 1 param equals feature Id NON NLS 1 param equals verify Only NON NLS 1 param equals mirrorURL NON NLS 1  isValidParam featureId verifyOnly
private boolean is Valid Command String cmd if cmd null return false else return cmd equals install NON NLS 1 cmd equals enable NON NLS 1 cmd equals disable NON NLS 1 cmd equals search NON NLS 1 cmd equals update NON NLS 1 cmd equals mirror NON NLS 1 cmd equals uninstall NON NLS 1 cmd equals list Features NON NLS 1 cmd equals add Site NON NLS 1 cmd equals remove Site NON NLS 1  isValidCommand listFeatures addSite removeSite
public Scripted Command get Command try String cmd String options get command NON NLS 1 if cmd null return null if cmd equals install NON NLS 1 return new Install Command String options get feature Id NON NLS 1 String options get version NON NLS 1 String options get from NON NLS 1 String options get to NON NLS 1 String options get verify Only NON NLS 1 else if cmd equals enable NON NLS 1 return new Enable Command String options get feature Id NON NLS 1 String options get version NON NLS 1 String options get to NON NLS 1 String options get verify Only NON NLS 1 else if cmd equals disable NON NLS 1 return new Disable Command String options get feature Id NON NLS 1 String options get version NON NLS 1 String options get to NON NLS 1 String options get verify Only NON NLS 1 else if cmd equals search NON NLS 1 return new Search Command String options get from NON NLS 1 else if cmd equals update NON NLS 1 return new Update Command String options get feature Id NON NLS 1 String options get version NON NLS 1 String options get verify Only NON NLS 1 else if cmd equals mirror NON NLS 1 return new Mirror Command String options get feature Id NON NLS 1 String options get version NON NLS 1 String options get from NON NLS 1 String options get to NON NLS 1 String options get mirrorURL NON NLS 1 else if cmd equals uninstall NON NLS 1 return new Uninstall Command String options get feature Id NON NLS 1 String options get version NON NLS 1 String options get to NON NLS 1 String options get verify Only NON NLS 1 else if cmd equals list Features NON NLS 1 return new List Features Command String options get from NON NLS 1 else if cmd equals add Site NON NLS 1 return new Add Site Command String options get from NON NLS 1 else if cmd equals remove Site NON NLS 1 return new Remove Site Command String options get to NON NLS 1 else return null catch Exception e Standalone Update Application exception Logged Update Core log e return null  ScriptedCommand getCommand InstallCommand featureId verifyOnly EnableCommand featureId verifyOnly DisableCommand featureId verifyOnly SearchCommand UpdateCommand featureId verifyOnly MirrorCommand featureId UninstallCommand featureId verifyOnly listFeatures ListFeaturesCommand addSite AddSiteCommand removeSite RemoveSiteCommand StandaloneUpdateApplication exceptionLogged UpdateCore

public Disable Command String feature Id String version String to Site String verify Only throws Exception super verify Only try I Configured Site sites get Configuration get Configured Sites Get site containing the feature to disable if to Site null URL to SiteURL new File to Site toURL if Site Manager get Site to SiteURL null null throw new Exception Policy bind Standalone no Site to Site NON NLS 1 target Site Site Manager get Site to SiteURL null get Current Configured Site if target Site null for int i 0 i sites length i if sites i is Product Site target Site sites i break I Feature features Update Utils search Site feature Id target Site true if features null features length 0 throw new Exception Policy bind Standalone no Features3 feature Id NON NLS 1 if version null version trim length 0 feature features 0 pick the first feature else for int i 0 features null i features length i if features i get Versioned Identifier get Version to String equals version feature features i break if feature null throw new Exception Policy bind Standalone no Features4 feature Id version NON NLS 1 catch MalformedURL Exception e throw e catch Core Exception e throw e  DisableCommand featureId toSite verifyOnly verifyOnly IConfiguredSite getConfiguration getConfiguredSites toSite toSiteURL toSite SiteManager getSite toSiteURL noSite toSite targetSite SiteManager getSite toSiteURL getCurrentConfiguredSite targetSite isProductSite targetSite IFeature UpdateUtils searchSite featureId targetSite noFeatures3 featureId getVersionedIdentifier getVersion toString noFeatures4 featureId MalformedURLException CoreException
public boolean run I Progress Monitor monitor check if the config file has been modifed while we were running I Status status Operations Manager get Validator validate Platform Config Valid if status null Update Core log status return false if is Verify Only status Operations Manager get Validator validate Pending Unconfig feature if status null status get Code I Status WARNING Update Core log status return status null status get Code I Status WARNING final I Unconfig Feature Operation config Operation Operations Manager get Operation Factory create Unconfig Operation target Site feature try config Operation execute monitor this return true catch Core Exception e Standalone Update Application exception Logged Update Core log e return false catch Invocation Target Exception e Standalone Update Application exception Logged Update Core log e return false  IProgressMonitor IStatus OperationsManager getValidator validatePlatformConfigValid UpdateCore isVerifyOnly OperationsManager getValidator validatePendingUnconfig getCode IStatus UpdateCore getCode IStatus IUnconfigFeatureOperation configOperation OperationsManager getOperationFactory createUnconfigOperation targetSite configOperation CoreException StandaloneUpdateApplication exceptionLogged UpdateCore InvocationTargetException StandaloneUpdateApplication exceptionLogged UpdateCore

public Enable Command String feature Id String version String to Site String verify Only throws Exception super verify Only try I Configured Site sites get Configuration get Configured Sites Get site to enable to if to Site null URL to SiteURL new File to Site toURL if Site Manager get Site to SiteURL null null throw new Exception Policy bind Standalone no Site to Site NON NLS 1 target Site Site Manager get Site to SiteURL null get Current Configured Site if target Site null for int i 0 i sites length i if sites i is Product Site target Site sites i break I Feature features Update Utils search Site feature Id target Site false if features null features length 0 throw new Exception Policy bind Standalone no Features1 feature Id NON NLS 1 if version null version trim length 0 feature features 0 pick the first feature else for int i 0 features null i features length i if features i get Versioned Identifier get Version to String equals version target Site is Configured features i feature features i break if feature null throw new Exception Policy bind Standalone no Features2 feature Id version NON NLS 1 catch MalformedURL Exception e throw e catch Core Exception e throw e  EnableCommand featureId toSite verifyOnly verifyOnly IConfiguredSite getConfiguration getConfiguredSites toSite toSiteURL toSite SiteManager getSite toSiteURL noSite toSite targetSite SiteManager getSite toSiteURL getCurrentConfiguredSite targetSite isProductSite targetSite IFeature UpdateUtils searchSite featureId targetSite noFeatures1 featureId getVersionedIdentifier getVersion toString targetSite isConfigured noFeatures2 featureId MalformedURLException CoreException
public boolean run I Progress Monitor monitor check if the config file has been modifed while we were running I Status status Operations Manager get Validator validate Platform Config Valid if status null Update Core log status return false if is Verify Only status Operations Manager get Validator validate Pending Config feature if status null status get Code I Status WARNING Update Core log status return status null status get Code I Status WARNING final I Config Feature Operation config Operation Operations Manager get Operation Factory create Config Operation target Site feature try config Operation execute monitor this return true catch Core Exception e Standalone Update Application exception Logged Update Core log e return false catch Invocation Target Exception e Standalone Update Application exception Logged Update Core log e return false  IProgressMonitor IStatus OperationsManager getValidator validatePlatformConfigValid UpdateCore isVerifyOnly OperationsManager getValidator validatePendingConfig getCode IStatus UpdateCore getCode IStatus IConfigFeatureOperation configOperation OperationsManager getOperationFactory createConfigOperation targetSite configOperation CoreException StandaloneUpdateApplication exceptionLogged UpdateCore InvocationTargetException StandaloneUpdateApplication exceptionLogged UpdateCore

public Install Command String feature Id String version String from Site String to Site String verify Only throws Exception super verify Only try this feature Id feature Id this version version this remote SiteURL new URL URL Decoder decode from Site UTF 8 NON NLS 1 Get site to install to I Configured Site sites get Configuration get Configured Sites if to Site null File site Path new File to Site if site Path exists site Path mkdirs URL to SiteURL site Path toURL I Site site Site Manager get Site to SiteURL null if site null throw new Exception Policy bind Standalone no Site to Site NON NLS 1 target Site site get Current Configured Site if target Site null target Site get Configuration create Configured Site site Path I Status status target Site verify Updatable Status if status isOK get Configuration add Configured Site target Site else throw new Core Exception status update the sites array to pick up new site sites get Configuration get Configured Sites if target Site null for int i 0 i sites length i if sites i is Product Site target Site sites i break Update Search Scope search Scope new Update Search Scope search Scope add Search Site remote Site NON NLS 1 remote SiteURL new String 0 search Request new Update Search Request new Site Search Category search Scope Versioned Identifier vid new Versioned Identifier feature Id version search Request add Filter new Versioned Identifiers Filter new Versioned Identifier vid search Request add Filter new Environment Filter search Request add Filter new Back Level Filter collector new Update Search Result Collector catch MalformedURL Exception e throw e catch Core Exception e throw e  InstallCommand featureId fromSite toSite verifyOnly verifyOnly featureId featureId remoteSiteURL URLDecoder fromSite IConfiguredSite getConfiguration getConfiguredSites toSite sitePath toSite sitePath sitePath toSiteURL sitePath ISite SiteManager getSite toSiteURL noSite toSite targetSite getCurrentConfiguredSite targetSite targetSite getConfiguration createConfiguredSite sitePath IStatus targetSite verifyUpdatableStatus getConfiguration addConfiguredSite targetSite CoreException getConfiguration getConfiguredSites targetSite isProductSite targetSite UpdateSearchScope searchScope UpdateSearchScope searchScope addSearchSite remoteSite remoteSiteURL searchRequest UpdateSearchRequest SiteSearchCategory searchScope VersionedIdentifier VersionedIdentifier featureId searchRequest addFilter VersionedIdentifiersFilter VersionedIdentifier searchRequest addFilter EnvironmentFilter searchRequest addFilter BackLevelFilter UpdateSearchResultCollector MalformedURLException CoreException
public boolean run I Progress Monitor monitor try monitor begin Task Policy bind Standalone installing 4 NON NLS 1 search Request perform Search collector new Sub Progress Monitor monitor 1 I Install Feature Operation operations collector get Operations if operations null operations length 0 throw Utilities new Core Exception Policy bind Standalone feature NON NLS 1 feature Id NON NLS 1 version Policy bind Standalone not Found NON NLS 1 remote SiteURL Policy bind Standalone newer Installed NON NLS 1 null Check for duplication conflicts Array List conflicts Duplicate Conflicts Validator compute Duplicate Conflicts operations get Configuration if conflicts null throw Utilities new Core Exception Policy bind Standalone duplicate null NON NLS 1 if is Verify Only if operations null operations length 0 return false I Status status Operations Manager get Validator validate Pending Changes operations if status null status get Code I Status ERROR throw new Core Exception status else return true I Batch Operation install Operation Operations Manager get Operation Factory create Batch Install Operation operations try install Operation execute new Sub Progress Monitor monitor 3 this System out println Policy bind Standalone feature NON NLS 1 feature Id NON NLS 1 version Policy bind Standalone installed NON NLS 1 return true catch Exception e throw Utilities new Core Exception Policy bind Standalone cannot Install feature Id version NON NLS 1 NON NLS 2 e catch Core Exception ce Standalone Update Application exception Logged Update Core log ce return false finally monitor done  IProgressMonitor beginTask searchRequest performSearch SubProgressMonitor IInstallFeatureOperation getOperations newCoreException featureId notFound remoteSiteURL newerInstalled ArrayList DuplicateConflictsValidator computeDuplicateConflicts getConfiguration newCoreException isVerifyOnly IStatus OperationsManager getValidator validatePendingChanges getCode IStatus CoreException IBatchOperation installOperation OperationsManager getOperationFactory createBatchInstallOperation installOperation SubProgressMonitor featureId newCoreException cannotInstall featureId CoreException StandaloneUpdateApplication exceptionLogged UpdateCore
public void accept I Feature feature if feature get Versioned Identifier get Identifier equals feature Id feature get Versioned Identifier get Version to String equals version operations add Operations Manager get Operation Factory create Install Operation target Site feature null null null  IFeature getVersionedIdentifier getIdentifier featureId getVersionedIdentifier getVersion toString OperationsManager getOperationFactory createInstallOperation targetSite
public I Install Feature Operation get Operations I Install Feature Operation ops Array new I Install Feature Operation operations size operations to Array ops Array return ops Array  IInstallFeatureOperation getOperations IInstallFeatureOperation opsArray IInstallFeatureOperation toArray opsArray opsArray

param from Site if specified list only the features from the specified local install site public List Features Command String from Site throws Exception try if from Site null File site Path new File from Site if site Path exists throw new Exception Policy bind Standalone no Site from Site NON NLS 1 URL from SiteURL site Path toURL I Site site Site Manager get Site from SiteURL null if site null throw new Exception Policy bind Standalone no Site from Site NON NLS 1 I Configured Site csite site get Current Configured Site if csite null throw new Exception Policy bind Standalone no Configured Site from Site NON NLS 1 sites new I Configured Site csite catch Exception e throw e  fromSite ListFeaturesCommand fromSite fromSite sitePath fromSite sitePath noSite fromSite fromSiteURL sitePath ISite SiteManager getSite fromSiteURL noSite fromSite IConfiguredSite getCurrentConfiguredSite noConfiguredSite fromSite IConfiguredSite
public boolean run I Progress Monitor monitor try if sites null for int i 0 i sites length i System out println Site sites i get Site getURL NON NLS 1 I Feature Reference features sites i get Feature References for int f 0 f features length f boolean configured sites i is Configured features f get Feature null System out println Feature NON NLS 1 features f get Versioned Identifier get Identifier NON NLS 1 features f get Versioned Identifier get Version NON NLS 1 configured enabled disabled NON NLS 1 NON NLS 2 return true catch Core Exception e Standalone Update Application exception Logged Update Core log e return false  IProgressMonitor getSite IFeatureReference getFeatureReferences isConfigured getFeature getVersionedIdentifier getIdentifier getVersionedIdentifier getVersion CoreException StandaloneUpdateApplication exceptionLogged UpdateCore

param to Site if specified list only the features from the specified local install site public Remove Site Command String to Site throws Exception try if to Site null site Path new File to Site if site Path get Name equals eclipse NON NLS 1 site Path new File site Path eclipse NON NLS 1 if site Path exists throw new Exception Policy bind Standalone no Site to Site NON NLS 1 I Configured Site csites Site Manager get Local Site get Current Configuration get Configured Sites for int i 0 i csites length i File f new File csites i get Site getURL get File if f equals site Path csite csites i break if csite null throw new Exception Policy bind Standalone no Configured Site to Site NON NLS 1 else throw new Exception Policy bind Standalone no Site3 NON NLS 1 catch Exception e throw e  toSite RemoveSiteCommand toSite toSite sitePath toSite sitePath getName sitePath sitePath sitePath noSite toSite IConfiguredSite SiteManager getLocalSite getCurrentConfiguration getConfiguredSites getSite getFile sitePath noConfiguredSite toSite noSite3
public boolean run I Progress Monitor monitor check if the config file has been modifed while we were running I Status status Operations Manager get Validator validate Platform Config Valid if status null Update Core log status return false try get Configuration remove Configured Site csite update the sites array get Configuration get Configured Sites Site Manager get Local Site save return true catch Core Exception e Update Core log e return false  IProgressMonitor IStatus OperationsManager getValidator validatePlatformConfigValid UpdateCore getConfiguration removeConfiguredSite getConfiguration getConfiguredSites SiteManager getLocalSite CoreException UpdateCore

Constructor public Scripted Command this null  ScriptedCommand
Constructor param verify Only if true the command is not executed but will only attempt to run the command This is mostly used when wanted to know if the command would fail public Scripted Command String verify Only this verify Only true equals verify Only NON NLS 1  verifyOnly ScriptedCommand verifyOnly verifyOnly verifyOnly
return true if the command should only be run in simulation mode to verify if it can execute protected final boolean is Verify Only return verify Only  isVerifyOnly verifyOnly
Convenience method that executes the command with a null progress monitor public final boolean run return run new Null Progress Monitor  NullProgressMonitor
Executes the command Subclasses are responsible for implementing this method If the command was constructed with verify Only true the command should not execute but only verify it can execute param monitor progress monitor during command execution  verifyOnly
Applies the changes made to the current configuration public void apply Changes Now Install Configuration apply Changes  applyChangesNow InstallConfiguration applyChanges
see org eclipse update operations I Operation Listener after Execute org eclipse update operations I Operation public boolean after Execute I Operation operation Object data return true  IOperationListener afterExecute IOperation afterExecute IOperation
see org eclipse update operations I Operation Listener before Execute org eclipse update operations I Operation public boolean before Execute I Operation operation Object data return true  IOperationListener beforeExecute IOperation beforeExecute IOperation
return the installation configuration affected by the command public final I Install Configuration get Configuration try I Local Site local Site Site Manager get Local Site config local Site get Current Configuration catch Core Exception e Standalone Update Application exception Logged Update Core log e return config  IInstallConfiguration getConfiguration ILocalSite localSite SiteManager getLocalSite localSite getCurrentConfiguration CoreException StandaloneUpdateApplication exceptionLogged UpdateCore

public Search Command String from Site try this remote SiteURL new URL URL Decoder decode from Site UTF 8 NON NLS 1 Update Search Scope search Scope new Update Search Scope search Scope add Search Site remote Site NON NLS 1 remote SiteURL new String 0 search Request new Update Search Request new Site Search Category search Scope collector new Update Search Result Collector catch MalformedURL Exception e Standalone Update Application exception Logged Update Core log e catch Unsupported Encoding Exception e  SearchCommand fromSite remoteSiteURL URLDecoder fromSite UpdateSearchScope searchScope UpdateSearchScope searchScope addSearchSite remoteSite remoteSiteURL searchRequest UpdateSearchRequest SiteSearchCategory searchScope UpdateSearchResultCollector MalformedURLException StandaloneUpdateApplication exceptionLogged UpdateCore UnsupportedEncodingException
public boolean run I Progress Monitor monitor try monitor begin Task Policy bind Standalone searching remote SiteURL to External Form 4 NON NLS 1 search Request perform Search collector monitor return true catch Core Exception ce I Status status ce get Status if status null status get Code I Site SITE ACCESS EXCEPTION Just show this but do not throw exception because there may be results anyway System out println Policy bind Standalone connection NON NLS 1 else Standalone Update Application exception Logged Update Core log ce return false finally monitor done  IProgressMonitor beginTask remoteSiteURL toExternalForm searchRequest performSearch CoreException IStatus getStatus getCode ISite SITE_ACCESS_EXCEPTION StandaloneUpdateApplication exceptionLogged UpdateCore
class Update Search Result Collector implements I Update Search Result Collector public void accept I Feature feature System out println NON NLS 1 feature get Label NON NLS 1 feature get Versioned Identifier get Identifier NON NLS 1 feature get Versioned Identifier get Version  UpdateSearchResultCollector IUpdateSearchResultCollector IFeature getLabel getVersionedIdentifier getIdentifier getVersionedIdentifier getVersion

public Object run Object args throws Exception if args null return EXIT ERROR if args instanceof String String params String args Cmd Line Args cmd Line Args new Cmd Line Args params Scripted Command cmd cmd Line Args get Command if cmd null System out println Policy bind Standalone cmd Failed Platform get Log File Location toOS String NON NLS 1 return EXIT ERROR logged Exception false boolean result cmd run if result if logged Exception System out println Policy bind Standalone cmd Complete With Errors Platform get Log File Location toOS String NON NLS 1 else System out println Policy bind Standalone cmdOK NON NLS 1 return I Platform Runnable EXIT OK else if logged Exception System out println Policy bind Standalone cmd Failed Platform get Log File Location toOS String NON NLS 1 else System out println Policy bind Standalone cmd Failed No Log NON NLS 1 return EXIT ERROR return EXIT ERROR  EXIT_ERROR CmdLineArgs cmdLineArgs CmdLineArgs ScriptedCommand cmdLineArgs getCommand cmdFailed getLogFileLocation toOSString EXIT_ERROR loggedException loggedException cmdCompleteWithErrors getLogFileLocation toOSString IPlatformRunnable EXIT_OK loggedException cmdFailed getLogFileLocation toOSString cmdFailedNoLog EXIT_ERROR EXIT_ERROR
return EXIT ERROR public static void exception Logged logged Exception true  EXIT_ERROR exceptionLogged loggedException

public Uninstall Command String feature Id String version String to Site String verify Only throws Exception super verify Only try I Configured Site sites get Configuration get Configured Sites Get site that contains the feature to uninstall if to Site null URL to SiteURL new File to Site toURL if Site Manager get Site to SiteURL null null throw new Exception Policy bind Standalone no Site to Site NON NLS 1 target Site Site Manager get Site to SiteURL null get Current Configured Site if target Site null for int i 0 i sites length i if sites i is Product Site target Site sites i break I Feature features Update Utils search Site feature Id target Site false if features null features length 0 throw new Exception Policy bind Standalone no Features1 feature Id NON NLS 1 if version null version trim length 0 feature features 0 pick the first feature else for int i 0 features null i features length i if features i get Versioned Identifier get Version to String equals version target Site is Configured features i feature features i break if feature null throw new Exception Policy bind Standalone no Features2 feature Id version NON NLS 1 catch MalformedURL Exception e throw e catch Core Exception e throw e  UninstallCommand featureId toSite verifyOnly verifyOnly IConfiguredSite getConfiguration getConfiguredSites toSite toSiteURL toSite SiteManager getSite toSiteURL noSite toSite targetSite SiteManager getSite toSiteURL getCurrentConfiguredSite targetSite isProductSite targetSite IFeature UpdateUtils searchSite featureId targetSite noFeatures1 featureId getVersionedIdentifier getVersion toString targetSite isConfigured noFeatures2 featureId MalformedURLException CoreException
public boolean run I Progress Monitor monitor check if the config file has been modifed while we were running I Status status Operations Manager get Validator validate Platform Config Valid if status null Update Core log status return false if Install Registry get Instance get feature  feature get Versioned Identifier null NON NLS 1 Standalone Update Application exception Logged Update Core log Utilities new Core Exception Policy bind Uninstall Command feature Not Installed ByUM feature to String null NON NLS 1 NON NLS 2 return false if is Verify Only if reached this point it is safe to uninstall return true final I Uninstall Feature Operation uninstall Operation Operations Manager get Operation Factory create Uninstall Operation target Site feature try uninstall Operation execute monitor this return true catch Core Exception e Standalone Update Application exception Logged Update Core log e return false catch Invocation Target Exception e Standalone Update Application exception Logged Update Core log e return false  IProgressMonitor IStatus OperationsManager getValidator validatePlatformConfigValid UpdateCore InstallRegistry getInstance feature_ getVersionedIdentifier StandaloneUpdateApplication exceptionLogged UpdateCore newCoreException UninstallCommand featureNotInstalledByUM toString isVerifyOnly IUninstallFeatureOperation uninstallOperation OperationsManager getOperationFactory createUninstallOperation targetSite uninstallOperation CoreException StandaloneUpdateApplication exceptionLogged UpdateCore InvocationTargetException StandaloneUpdateApplication exceptionLogged UpdateCore

Update command for updating a feature to a newer version param feature Id param verify Only throws Exception public Update Command String feature Id String verify Only throws Exception this feature Id null verify Only  featureId verifyOnly UpdateCommand featureId verifyOnly featureId verifyOnly
Update command for updating a feature to a specified newer version param feature Id param version param verify Only throws Exception public Update Command String feature Id String version String verify Only throws Exception super verify Only try this feature Id feature Id this version version if feature Id null this target Site Update Utils get Site With Feature get Configuration feature Id if target Site null throw new Exception Policy bind Standalone no Config Site For Feature feature Id NON NLS 1 I Feature current Features Update Utils search Site feature Id target Site true if current Features null current Features length 0 throw new Exception Policy bind Standalone no Features3 feature Id NON NLS 1 this current Feature current Features 0 else Get site to install to I Configured Site sites get Configuration get Configured Sites for int i 0 i sites length i if sites i is Product Site target Site sites i break if current Feature null search Request Update Utils create New Updates Request null else search Request Update Utils create New Updates Request new I Feature current Feature if version null search Request add Filter new Versioned Identifiers Filter new Versioned Identifier new Versioned Identifier feature Id version collector new Update Search Result Collector catch MalformedURL Exception e Standalone Update Application exception Logged Update Core log e catch Core Exception e Standalone Update Application exception Logged Update Core log e  featureId verifyOnly UpdateCommand featureId verifyOnly verifyOnly featureId featureId featureId targetSite UpdateUtils getSiteWithFeature getConfiguration featureId targetSite noConfigSiteForFeature featureId IFeature currentFeatures UpdateUtils searchSite featureId targetSite currentFeatures currentFeatures noFeatures3 featureId currentFeature currentFeatures IConfiguredSite getConfiguration getConfiguredSites isProductSite targetSite currentFeature searchRequest UpdateUtils createNewUpdatesRequest searchRequest UpdateUtils createNewUpdatesRequest IFeature currentFeature searchRequest addFilter VersionedIdentifiersFilter VersionedIdentifier VersionedIdentifier featureId UpdateSearchResultCollector MalformedURLException StandaloneUpdateApplication exceptionLogged UpdateCore CoreException StandaloneUpdateApplication exceptionLogged UpdateCore
public boolean run I Progress Monitor monitor check if the config file has been modifed while we were running I Status status Operations Manager get Validator validate Platform Config Valid if status null Update Core log status return false try monitor begin Task Policy bind Standalone updating 4 NON NLS 1 search Request perform Search collector new Sub Progress Monitor monitor 1 I Install Feature Operation operations collector get Operations if operations null operations length 0 Standalone Update Application exception Logged Update Core log Utilities new Core Exception Policy bind Standalone no Update feature Id null NON NLS 1 return false Check for duplication conflicts Array List conflicts Duplicate Conflicts Validator compute Duplicate Conflicts operations get Configuration if conflicts null Standalone Update Application exception Logged Update Core log Utilities new Core Exception Policy bind Standalone duplicate null NON NLS 1 return false if is Verify Only status Operations Manager get Validator validate Pending Changes operations if status null status get Code I Status ERROR throw new Core Exception status else return true I Batch Operation install Operation Operations Manager get Operation Factory create Batch Install Operation operations try install Operation execute new Sub Progress Monitor monitor 3 this System out println Policy bind Standalone feature NON NLS 1 feature Id NON NLS 1 Policy bind Standalone updated NON NLS 1 return true catch Exception e Standalone Update Application exception Logged Update Core log Utilities new Core Exception Policy bind Standalone no Update feature Id NON NLS 1 e return false catch Core Exception ce status ce get Status if status null status get Code I Site SITE ACCESS EXCEPTION Just show this but do not throw exception because there may be results anyway System out println Policy bind Standalone connection NON NLS 1 else Standalone Update Application exception Logged Update Core log ce return false finally monitor done  IProgressMonitor IStatus OperationsManager getValidator validatePlatformConfigValid UpdateCore beginTask searchRequest performSearch SubProgressMonitor IInstallFeatureOperation getOperations StandaloneUpdateApplication exceptionLogged UpdateCore newCoreException noUpdate featureId ArrayList DuplicateConflictsValidator computeDuplicateConflicts getConfiguration StandaloneUpdateApplication exceptionLogged UpdateCore newCoreException isVerifyOnly OperationsManager getValidator validatePendingChanges getCode IStatus CoreException IBatchOperation installOperation OperationsManager getOperationFactory createBatchInstallOperation installOperation SubProgressMonitor featureId StandaloneUpdateApplication exceptionLogged UpdateCore newCoreException noUpdate featureId CoreException getStatus getCode ISite SITE_ACCESS_EXCEPTION StandaloneUpdateApplication exceptionLogged UpdateCore
public void accept I Feature feature I Install Feature Operation op Operations Manager get Operation Factory create Install Operation null feature null null null I Configured Site site Update Utils get Default Target Site get Configuration op if site null site Update Utils get Affinity Site get Configuration feature if site null site target Site op set Target Site site operations add op  IFeature IInstallFeatureOperation OperationsManager getOperationFactory createInstallOperation IConfiguredSite UpdateUtils getDefaultTargetSite getConfiguration UpdateUtils getAffinitySite getConfiguration targetSite setTargetSite
public I Install Feature Operation get Operations I Install Feature Operation ops Array new I Install Feature Operation operations size operations to Array ops Array return ops Array  IInstallFeatureOperation getOperations IInstallFeatureOperation opsArray IInstallFeatureOperation toArray opsArray opsArray

Opens the configuration manager window This is used to manage a current installation configuration browser sites enable disable features etc param shell the parent shell to use public static void open Configuration Manager Shell shell Application Window app Window new Configuration Manager Window shell app Window create app Window open  openConfigurationManager ApplicationWindow appWindow ConfigurationManagerWindow appWindow appWindow
Opens the install wizard dialog This wizard is used to find and install updates to existing features or to find and install new features param shell the dialog parent shell public static void open Installer Shell shell Install Wizard wizard new Install Wizard Wizard Dialog dialog new Resizable Install Wizard Dialog shell wizard UpdateUI get String Install Wizard Action title NON NLS 1 dialog create dialog open  openInstaller InstallWizard InstallWizard WizardDialog ResizableInstallWizardDialog getString InstallWizardAction

Creates a new tt Admin Permission tt object with its name set to Admin Permission public Admin Permission super Admin Permission  AdminPermission AdminPermission AdminPermission AdminPermission
Creates a new tt Admin Permission tt object for use by the code Policy code object to instantiate new tt Permission tt objects param name Ignored always set to Admin Permission param actions Ignored public Admin Permission String name String actions this  AdminPermission AdminPermission AdminPermission
Determines if the specified permission is implied by this object p This method returns tt true tt if the specified permission is an instance of tt Admin Permission tt param p The permission to interrogate return tt true tt if the permission is an instance of this class tt false tt otherwise public boolean implies Permission p return p instanceof Admin Permission  AdminPermission AdminPermission
Determines the equality of two tt Admin Permission tt objects p Two tt Admin Permission tt objects are always equal param obj The object being compared for equality with this object return tt true tt if tt obj tt is an tt Admin Permission tt tt false tt otherwise public boolean equals Object obj return obj instanceof Admin Permission  AdminPermission AdminPermission AdminPermission AdminPermission
Returns a new tt Permission Collection tt object suitable for storing tt Admin Permission tt s p return A new tt Permission Collection tt object public Permission Collection new Permission Collection return new Admin Permission Collection  PermissionCollection AdminPermission PermissionCollection PermissionCollection newPermissionCollection AdminPermissionCollection
Creates an empty tt Admin Permission tt object public Admin Permission Collection has Element false  AdminPermission AdminPermissionCollection hasElement
Adds the specified permission to the tt Admin Permission Collection tt The key for the hash is the interface name of the service param permission The tt Permission tt object to add exception Illegal Argument Exception If the permission is not an tt Admin Permission tt exception Security Exception If this Admin Permission Collection object has been marked read only public void add Permission permission if permission instanceof Admin Permission throw new Illegal Argument Exception invalid permission permission if is Read Only throw new Security Exception attempt to add a Permission to a readonly Permission Collection has Element true  AdminPermissionCollection IllegalArgumentException AdminPermission SecurityException AdminPermissionCollection AdminPermission IllegalArgumentException isReadOnly SecurityException PermissionCollection hasElement
Determines if the specified set of permissions implies the permissions expressed in the parameter tt permission tt param p The Permission object to compare return true if permission is a proper subset of a permission in the set false otherwise public boolean implies Permission p return has Element p instanceof Admin Permission  hasElement AdminPermission
private boolean more has Element public boolean has More Elements return more  hasElement hasMoreElements
public Object next Element if more more false return new Admin Permission else throw new No Such Element Exception  nextElement AdminPermission NoSuchElementException
Returns an enumeration of an tt Admin Permission tt object return Enumeration of an tt Admin Permission tt object public Enumeration elements return new Enumeration private boolean more has Element public boolean has More Elements return more public Object next Element if more more false return new Admin Permission else throw new No Such Element Exception  AdminPermission AdminPermission hasElement hasMoreElements nextElement AdminPermission NoSuchElementException

Returns this bundle s current state p A bundle can be in only one state at any time return An element of tt UNINSTALLED tt tt INSTALLED tt tt RESOLVED tt tt STARTING tt tt STOPPING tt tt ACTIVE tt 
Starts this bundle If the Framework implements the optional Start Level service and the current start level is less than this bundle s start level then the Framework must persistently mark this bundle as started and delay the starting of this bundle until the Framework s current start level becomes equal or more than the bundle s start level p Otherwise the following steps are required to start a bundle ol li If this bundle s state is tt UNINSTALLED tt then an tt Illegal State Exception tt is thrown li If this bundle s state is tt STARTING tt or tt STOPPING tt then this method will wait for this bundle to change state before continuing If this does not occur in a reasonable time a tt Bundle Exception tt is thrown to indicate this bundle was unable to be started li If this bundle s state is tt ACTIVE tt then this method returns immediately li If this bundle s state is not tt RESOLVED tt an attempt is made to resolve this bundle s package dependencies If the Framework cannot resolve this bundle a tt Bundle Exception tt is thrown li This bundle s state is set to tt STARTING tt li The link Bundle Activator start method of this bundle s tt Bundle Activator tt if one is specified is called If the tt Bundle Activator tt is invalid or throws an exception this bundle s state is set back to tt RESOLVED tt br Any services registered by the bundle will be unregistered br Any services used by the bundle will be released br Any listeners registered by the bundle will be removed br A tt Bundle Exception tt is then thrown li If this bundle s state is tt UNINSTALLED tt because the bundle was uninstalled while the tt Bundle Activator start tt method was running a tt Bundle Exception tt is thrown li Persistently record that this bundle has been started When the Framework is restarted this bundle will be automatically started li This bundle s state is set to tt ACTIVE tt li A bundle event of type link Bundle Event STARTED is broadcast ol b Preconditions b ul li tt get State tt in tt INSTALLED tt tt RESOLVED tt ul b Postconditions no exceptions thrown b ul li tt get State tt in tt ACTIVE tt li tt Bundle Activator start tt has been called and did not throw an exception ul b Postconditions when an exception is thrown b ul li tt get State tt not in tt STARTING tt tt ACTIVE tt ul exception Bundle Exception If this bundle couldn t be started This could be because a code dependency could not be resolved or the specified tt Bundle Activator tt could not be loaded or threw an exception exception java lang Illegal State Exception If this bundle has been uninstalled or this bundle tries to change its own state exception java lang Security Exception If the caller does not have the appropriate tt Admin Permisson tt and the Java Runtime Environment supports permissions  IllegalStateException BundleException BundleException BundleActivator BundleActivator BundleActivator BundleException BundleActivator BundleException BundleEvent getState getState BundleActivator getState BundleException BundleActivator IllegalStateException SecurityException AdminPermisson
Stops this bundle p The following steps are required to stop a bundle ol li If this bundle s state is tt UNINSTALLED tt then an tt Illegal State Exception tt is thrown li If this bundle s state is tt STARTING tt or tt STOPPING tt then this method will wait for this bundle to change state before continuing If this does not occur in a reasonable time a tt Bundle Exception tt is thrown to indicate this bundle was unable to be stopped li Persistently record that this bundle has been stopped When the Framework is restarted this bundle will not be automatically started li If this bundle s state is not tt ACTIVE tt then this method returns immediately li This bundle s state is set to tt STOPPING tt li The link Bundle Activator stop method of this bundle s tt Bundle Activator tt if one is specified is called If this method throws an exception it will continue to stop this bundle A tt Bundle Exception tt will be thrown after completion of the remaining steps li Any services registered by this bundle must be unregistered li Any services used by this bundle must be released li Any listeners registered by this bundle must be removed li If this bundle s state is tt UNINSTALLED tt because the bundle was uninstalled while the tt Bundle Activator stop tt method was running a tt Bundle Exception tt must be thrown li This bundle s state is set to tt RESOLVED tt li A bundle event of type link Bundle Event STOPPED is broadcast ol b Preconditions b ul li tt get State tt in tt ACTIVE tt ul b Postconditions no exceptions thrown b ul li tt get State tt not in tt ACTIVE tt tt STOPPING tt li tt Bundle Activator stop tt has been called and did not throw an exception ul b Postconditions when an exception is thrown b ul li None ul exception Bundle Exception If this bundle s tt Bundle Activator tt could not be loaded or threw an exception exception java lang Illegal State Exception If this bundle has been uninstalled or this bundle tries to change its own state exception java lang Security Exception If the caller does not have the appropriate tt Admin Permission tt and the Java Runtime Environment supports permissions  IllegalStateException BundleException BundleActivator BundleActivator BundleException BundleActivator BundleException BundleEvent getState getState BundleActivator BundleException BundleActivator IllegalStateException SecurityException AdminPermission
Updates this bundle p If this bundle s state is tt ACTIVE tt it will be stopped before the update and started after the update successfully completes p If the bundle being updated has exported any packages these packages will not be updated Instead the previous package version will remain exported until the tt Package Admin refresh Packages tt method has been has been called or the Framework is relaunched p The following steps are required to update a bundle ol li If this bundle s state is tt UNINSTALLED tt then an tt Illegal State Exception tt is thrown li If this bundle s state is tt ACTIVE tt tt STARTING tt or tt STOPPING tt the bundle is stopped as described in the tt Bundle stop tt method If tt Bundle stop tt throws an exception the exception is rethrown terminating the update li The download location of the new version of this bundle is determined from either the bundle s link Constants BUNDLE UPDATELOCATION Manifest header if available or the bundle s original location li The location is interpreted in an implementation dependent manner typically as a URL and the new version of this bundle is obtained from this location li The new version of this bundle is installed If the Framework is unable to install the new version of this bundle the original version of this bundle will be restored and a tt Bundle Exception tt will be thrown after completion of the remaining steps li If the bundle has declared an Bundle Required Execution Environment header then the listed execution environments must be verified against the installed execution environments If they do not all match the original version of this bundle will be restored and a tt Bundle Exception tt will be thrown after completion of the remaining steps li This bundle s state is set to tt INSTALLED tt li If this bundle has not declared an tt Import Package tt header in its Manifest file specifically this bundle does not depend on any packages from other bundles this bundle s state may be set to tt RESOLVED tt li If the new version of this bundle was successfully installed a bundle event of type link Bundle Event UPDATED is broadcast li If this bundle s state was originally tt ACTIVE tt the updated bundle is started as described in the tt Bundle start tt method If tt Bundle start tt throws an exception a Framework event of type link Framework Event ERROR is broadcast containing the exception ol b Preconditions b ul li tt get State tt not in tt UNINSTALLED tt ul b Postconditions no exceptions thrown b ul li tt get State tt in tt INSTALLED tt tt RESOLVED tt tt ACTIVE tt li This bundle has been updated ul b Postconditions when an exception is thrown b ul li tt get State tt in tt INSTALLED tt tt RESOLVED tt tt ACTIVE tt li Original bundle is still used no update occurred ul exception Bundle Exception If the update fails exception java lang Illegal State Exception If this bundle has been uninstalled or this bundle tries to change its own state exception java lang Security Exception If the caller does not have the appropriate tt Admin Permission tt and the Java Runtime Environment supports permissions see stop see start  PackageAdmin refreshPackages IllegalStateException BUNDLE_UPDATELOCATION BundleException RequiredExecutionEnvironment BundleException BundleEvent FrameworkEvent getState getState getState BundleException IllegalStateException SecurityException AdminPermission
Updates this bundle from an tt Input Stream tt p This method performs all the steps listed in tt Bundle update tt except the bundle will be read from the supplied tt Input Stream tt rather than a tt URL tt p This method will always close the tt Input Stream tt when it is done even if an exception is thrown param in The tt Input Stream tt from which to read the new bundle exception Bundle Exception If the provided stream cannot be read or the update fails exception java lang Illegal State Exception If this bundle has been uninstalled or this bundle tries to change its own state exception java lang Security Exception If the caller does not have the appropriate tt Admin Permission tt and the Java Runtime Environment supports permissions see update  InputStream InputStream InputStream InputStream BundleException IllegalStateException SecurityException AdminPermission
Uninstalls this bundle p This method causes the Framework to notify other bundles that this bundle is being uninstalled and then puts this bundle into the tt UNINSTALLED tt state The Framework will remove any resources related to this bundle that it is able to remove p If this bundle has exported any packages the Framework will continue to make these packages available to their importing bundles until the tt Package Admin refresh Packages tt method has been called or the Framework is relaunched p The following steps are required to uninstall a bundle ol li If this bundle s state is tt UNINSTALLED tt then an tt Illegal State Exception tt is thrown li If this bundle s state is tt ACTIVE tt tt STARTING tt or tt STOPPING tt this bundle is stopped as described in the tt Bundle stop tt method If tt Bundle stop tt throws an exception a Framework event of type link Framework Event ERROR is broadcast containing the exception li This bundle s state is set to tt UNINSTALLED tt li A bundle event of type link Bundle Event UNINSTALLED is broadcast li This bundle and any persistent storage area provided for this bundle by the Framework are removed ol b Preconditions b ul li tt get State tt not in tt UNINSTALLED tt ul b Postconditions no exceptions thrown b ul li tt get State tt in tt UNINSTALLED tt li This bundle has been uninstalled ul b Postconditions when an exception is thrown b ul li tt get State tt not in tt UNINSTALLED tt li This Bundle has not been uninstalled ul exception Bundle Exception If the uninstall failed This can occur if another thread is attempting to change the bundle s state and does not complete in a timely manner exception java lang Illegal State Exception If this bundle has been uninstalled or this bundle tries to change its own state exception java lang Security Exception If the caller does not have the appropriate tt Admin Permission tt and the Java Runtime Environment supports permissions see stop  PackageAdmin refreshPackages IllegalStateException FrameworkEvent BundleEvent getState getState getState BundleException IllegalStateException SecurityException AdminPermission
Returns this bundle s Manifest headers and values This method returns all the Manifest headers and values from the main section of the bundle s Manifest file that is all lines prior to the first blank line p Manifest header names are case insensitive The methods of the returned tt Dictionary tt object will operate on header names in a case insensitive manner If a Manifest header value starts with quot quot it will be localized with the localization properties file for the default locale p For example the following Manifest headers and values are included if they are present in the Manifest file pre Bundle Name Bundle Vendor Bundle Version Bundle Description Bundle DocURL Bundle Contact Address pre p This method will continue to return Manifest header information while this bundle is in the tt UNINSTALLED tt state return A tt Dictionary tt object containing this bundle s Manifest headers and values exception java lang Security Exception If the caller does not have the tt Admin Permission tt and the Java Runtime Environment supports permissions see Constants BUNDLE LOCALIZATION  ContactAddress SecurityException AdminPermission BUNDLE_LOCALIZATION
Returns this bundle s identifier The bundle is assigned a unique identifier by the Framework when it is installed in the OS Gi environment p A bundle s unique identifier has the following attributes ul li Is unique and persistent li Is a tt long tt li Its value is not reused for another bundle even after the bundle is uninstalled li Does not change while the bundle remains installed li Does not change when the bundle is updated ul p This method will continue to return this bundle s unique identifier while this bundle is in the tt UNINSTALLED tt state return The unique identifier of this bundle  OSGi
Returns this bundle s location identifier p The bundle location identifier is the location passed to link Bundle Context install Bundle when a bundle is installed p This method will continue to return this bundle s location identifier while this bundle is in the tt UNINSTALLED tt state return The string representation of this bundle s location identifier exception java lang Security Exception If the caller does not have the appropriate tt Admin Permission tt and the Java Runtime Environment supports permissions  BundleContext installBundle SecurityException AdminPermission
Returns this bundle s tt Service Reference tt list for all services it has registered or tt null tt if this bundle has no registered services p If the Java runtime supports permissions a tt Service Reference tt object to a service is included in the returned list only if the caller has the tt Service Permission tt to get the service using at least one of the named classes the service was registered under p The list is valid at the time of the call to this method however as the Framework is a very dynamic environment services can be modified or unregistered at anytime return An array of tt Service Reference tt objects or tt null tt exception java lang Illegal State Exception If this bundle has been uninstalled see Service Registration see Service Reference see Service Permission  ServiceReference ServiceReference ServicePermission ServiceReference IllegalStateException ServiceRegistration ServiceReference ServicePermission
Returns this bundle s tt Service Reference tt list for all services it is using or returns tt null tt if this bundle is not using any services A bundle is considered to be using a service if its use count for that service is greater than zero p If the Java Runtime Environment supports permissions a tt Service Reference tt object to a service is included in the returned list only if the caller has the tt Service Permission tt to get the service using at least one of the named classes the service was registered under p The list is valid at the time of the call to this method however as the Framework is a very dynamic environment services can be modified or unregistered at anytime return An array of tt Service Reference tt objects or tt null tt exception java lang Illegal State Exception If this bundle has been uninstalled see Service Reference see Service Permission  ServiceReference ServiceReference ServicePermission ServiceReference IllegalStateException ServiceReference ServicePermission
Determines if this bundle has the specified permissions p If the Java Runtime Environment does not support permissions this method always returns tt true tt p tt permission tt is of type tt Object tt to avoid referencing the tt java security Permission tt class directly This is to allow the Framework to be implemented in Java environments which do not support permissions p If the Java Runtime Environment does support permissions this bundle and all its resources including nested JAR files belong to the same tt java security Protection Domain tt that is they will share the same set of permissions param permission The permission to verify return tt true tt if this bundle has the specified permission or the permissions possessed by this bundle imply the specified permission tt false tt if this bundle does not have the specified permission or tt permission tt is not an tt instanceof tt tt java security Permission tt exception java lang Illegal State Exception If this bundle has been uninstalled  ProtectionDomain IllegalStateException
Find the specified resource in this bundle This bundle s class loader is called to search for the named resource If this bundle s state is tt INSTALLED tt then only this bundle will be searched for the specified resource Imported packages cannot be searched when a bundle has not been resolved param name The name of the resource See tt java lang Class Loader get Resource tt for a description of the format of a resource name return a URL to the named resource or tt null tt if the resource could not be found or if the caller does not have the tt Admin Permission tt and the Java Runtime Environment supports permissions since 1 1 exception java lang Illegal State Exception If this bundle has been uninstalled  ClassLoader getResource AdminPermission IllegalStateException
Returns this bundle s Manifest headers and values localized to the specifed locale p This method performs the same function as tt Bundle get Headers tt except the manifest header values are localized to the specified locale If a Manifest header value starts with quot quot it will be localized with the localization properties file for the specified locale If tt null tt is specified as the locale string the header values will be localized using the default locale If the empty string quot quot is specified as the locale string the header values will not be localized but any leading quot quot s will be stripped off of the header values p This method will continue to return Manifest header information while this bundle is in the tt UNINSTALLED tt state however the header values will only be localized to the default locale return A tt Dictionary tt object containing this bundle s Manifest headers and values exception java lang Security Exception If the caller does not have the tt Admin Permission tt and the Java Runtime Environment supports permissions see get Headers see Constants BUNDLE LOCALIZATION since 1 3 b EXPERIMENTAL b  getHeaders SecurityException AdminPermission getHeaders BUNDLE_LOCALIZATION
Returns the symbolic name of this bundle as specified by its tt Bundle Symbolic Name tt manifest header The name must be unique it is recommended to use a reverse domain name naming convention like that used for java packages If the bundle does not have a specified symbolic name then tt null tt is returned p This method will continue to return this bundle s symbolic name while this bundle is in the tt UNINSTALLED tt state return The symbolic name of this bundle since 1 3 b EXPERIMENTAL b  SymbolicName
Loads the specified class using this bundle s classloader p If this bundle s state is tt INSTALLED tt this method will attempt to resolve the bundle before attempting to load the class p If the bundle cannot be resolved a Framework event of type link Framework Event ERROR is broadcast containing a tt Bundle Exception tt with details of the reason the bundle could not be resolved This method must then throw a tt Class Not Found Exception tt p If this bundle s state is tt UNINSTALLED tt then an tt Illegal State Exception tt is thrown param name The name of the class to load return The Class object for the requested class exception java lang Class Not Found Exception If no such class can be found or if the caller does not have the tt Admin Permission tt and the Java Runtime Environment supports permissions exception java lang Illegal State Exception If this bundle has been uninstalled since 1 3 b EXPERIMENTAL b  FrameworkEvent BundleException ClassNotFoundException IllegalStateException ClassNotFoundException AdminPermission IllegalStateException
Returns enumeration of all the paths to entries within the bundle whose longest sub path matches the supplied path argument The bundle s classloader is not used to search for entries Only the contents of the bundle is searched A specified path of quot quot indicates the root of the bundle p Returned paths indicating subdirectory paths end with a quot quot The returned paths are all relative to the root of the bundle and have a leading quot quot p This method returns an empty enumeration if no entries could be found that match the specified path or if the caller does not have tt Admin Permission tt and the Java Runtime Environment supports permissions param path the path name to get the entry path names for return An Enumeration of the entry paths that are contained in the specified path exception java lang Illegal State Exception If this bundle has been uninstalled since 1 3 b EXPERIMENTAL b  AdminPermission IllegalStateException
Returns a URL to the specified entry in this bundle The bundle s classloader is not used to search for the specified entry Only the contents of the bundle is searched for the specified entry A specified path of quot quot indicates the root of the bundle p This method returns a URL to the specified entry or tt null tt if the entry could not be found or if the caller does not have the tt Admin Permission tt and the Java Runtime Environment supports permissions param name The name of the entry See tt java lang Class Loader get Resource tt for a description of the format of a resource name return A URL to the specified entry or tt null tt if the entry could not be found or if the caller does not have the tt Admin Permission tt and the Java Runtime Environment supports permissions exception java lang Illegal State Exception If this bundle has been uninstalled since 1 3 b EXPERIMENTAL b  AdminPermission ClassLoader getResource AdminPermission IllegalStateException

Called when this bundle is started so the Framework can perform the bundle specific activities necessary to start this bundle This method can be used to register services or to allocate any resources that this bundle needs p This method must complete and return to its caller in a timely manner param context The execution context of the bundle being started exception java lang Exception If this method throws an exception this bundle is marked as stopped and the Framework will remove this bundle s listeners unregister all services registered by this bundle and release all services used by this bundle see Bundle start 
Called when this bundle is stopped so the Framework can perform the bundle specific activities necessary to stop the bundle In general this method should undo the work that the tt Bundle Activator start tt method started There should be no active threads that were started by this bundle when this bundle returns A stopped bundle should be stopped and should not call any Framework objects p This method must complete and return to its caller in a timely manner param context The execution context of the bundle being stopped exception java lang Exception If this method throws an exception the bundle is still marked as stopped and the Framework will remove the bundle s listeners unregister all services registered by the bundle and release all services used by the bundle see Bundle stop  BundleActivator

Returns the value of the specified property If the key is not found in the Framework properties the system properties are then searched The method returns tt null tt if the property is not found p The Framework defines the following standard property keys p ul li link Constants FRAMEWORK VERSION The OS Gi Framework version li li link Constants FRAMEWORK VENDOR The Framework implementation vendor li li link Constants FRAMEWORK LANGUAGE The language being used See ISO 639 for possible values li li link Constants FRAMEWORK OS NAME The host computer operating system li li link Constants FRAMEWORK OS VERSION The host computer operating system version number li li link Constants FRAMEWORK PROCESSOR The host computer processor name li ul p All bundles must have permission to read these properties p Note The last four standard properties are used by the link Constants BUNDLE NATIVECODE tt Manifest tt header s matching algorithm for selecting native language code param key The name of the requested property return The value of the requested property or tt null tt if the property is undefined exception java lang Security Exception If the caller does not have the appropriate tt Property Permission tt to read the property and the Java Runtime Environment supports permissions  FRAMEWORK_VERSION OSGi FRAMEWORK_VENDOR FRAMEWORK_LANGUAGE FRAMEWORK_OS_NAME FRAMEWORK_OS_VERSION FRAMEWORK_PROCESSOR BUNDLE_NATIVECODE SecurityException PropertyPermission
Returns the tt Bundle tt object for this context bundle p The context bundle is defined as the bundle that was assigned this tt Bundle Context tt in its tt Bundle Activator tt return The context bundle s tt Bundle tt object exception java lang Illegal State Exception If this context bundle has stopped  BundleContext BundleActivator IllegalStateException
Installs the bundle from the specified location string A bundle is obtained from tt location tt as interpreted by the Framework in an implementation dependent manner p Every installed bundle is uniquely identified by its location string typically in the form of a URL p The following steps are required to install a bundle ol li If a bundle containing the same location string is already installed the tt Bundle tt object for that bundle is returned li The bundle s content is read from the location string If this fails a link Bundle Exception is thrown li The bundle s tt Bundle Native Code tt dependencies are resolved If this fails a tt Bundle Exception tt is thrown li The bundle s associated resources are allocated The associated resources minimally consist of a unique identifier and a persistent storage area if the platform has file system support If this step fails a tt Bundle Exception tt is thrown li If the bundle has declared an Bundle Required Execution Environment header then the listed execution environments must be verified against the installed execution environments If they are not all present a tt Bundle Exception tt must be thrown li The bundle s state is set to tt INSTALLED tt li A bundle event of type link Bundle Event INSTALLED is broadcast li The tt Bundle tt object for the newly installed bundle is returned ol b Postconditions no exceptions thrown b ul li tt get State tt in tt INSTALLED tt tt RESOLVED tt li Bundle has a unique ID ul b Postconditions when an exception is thrown b ul li Bundle is not installed and no trace of the bundle exists ul param location The location identifier of the bundle to install return The tt Bundle tt object of the installed bundle exception Bundle Exception If the installation failed exception java lang Security Exception If the caller does not have the appropriate tt Admin Permission tt and the Java Runtime Environment supports permissions public abstract Bundle install Bundle String location  BundleException NativeCode BundleException BundleException RequiredExecutionEnvironment BundleException BundleEvent getState BundleException SecurityException AdminPermission installBundle
Installs the bundle from the specified tt Input Stream tt object p This method performs all of the steps listed in tt Bundle Context install Bundle String location tt except that the bundle s content will be read from the tt Input Stream tt object The location identifier string specified will be used as the identity of the bundle p This method must always close the tt Input Stream tt object even if an exception is thrown param location The location identifier of the bundle to install param in The tt Input Stream tt object from which this bundle will be read return The tt Bundle tt object of the installed bundle exception Bundle Exception If the provided stream cannot be read or the installation failed exception java lang Security Exception If the caller does not have the appropriate tt Admin Permission tt and the Java Runtime Environment supports permissions see install Bundle java lang String public abstract Bundle install Bundle String location Input Stream input  InputStream BundleContext installBundle InputStream InputStream InputStream BundleException SecurityException AdminPermission installBundle installBundle InputStream
Returns the bundle with the specified identifier param id The identifier of the bundle to retrieve return A tt Bundle tt object or tt null tt if the identifier does not match any installed bundle 
Returns a list of all installed bundles p This method returns a list of all bundles installed in the OS Gi environment at the time of the call to this method However as the Framework is a very dynamic environment bundles can be installed or uninstalled at anytime return An array of tt Bundle tt objects one object per installed bundle  OSGi
Adds the specified tt Service Listener tt object with the specified tt filter tt to this context bundle s list of listeners p See link get Bundle for a definition of context bundle and link Filter for a description of the filter syntax tt Service Listener tt objects are notified when a service has a lifecycle state change p If this context bundle s list of listeners already contains a listener tt l tt such that tt l listener tt this method replaces that listener s filter which may be tt null tt with the specified one which may be tt null tt p The listener is called if the filter criteria is met To filter based upon the class of the service the filter should reference the link Constants OBJECTCLASS property If tt filter tt is tt null tt all services are considered to match the filter p When using a tt filter tt it is possible that the tt Service Event tt s for the complete life cycle of a service will not be delivered to the listener For example if the tt filter tt only matches when the property tt x tt has the value tt 1 tt the listener will not be called if the service is registered with the property tt x tt not set to the value tt 1 tt Subsequently when the service is modified setting property tt x tt to the value tt 1 tt the filter will match and the listener will be called with a tt Service Event tt of type tt MODIFIED tt Thus the listener will not be called with a tt Service Event tt of type tt REGISTERED tt p If the Java Runtime Environment supports permissions the tt Service Listener tt object will be notified of a service event only if the bundle that is registering it has the tt Service Permission tt to get the service using at least one of the named classes the service was registered under param listener The tt Service Listener tt object to be added param filter The filter criteria exception Invalid Syntax Exception If tt filter tt contains an invalid filter string which cannot be parsed exception java lang Illegal State Exception If this context bundle has stopped see Service Event see Service Listener see Service Permission public abstract void add Service Listener Service Listener listener String filter  ServiceListener getBundle ServiceListener ServiceEvent ServiceEvent ServiceEvent ServiceListener ServicePermission ServiceListener InvalidSyntaxException IllegalStateException ServiceEvent ServiceListener ServicePermission addServiceListener ServiceListener
Adds the specified tt Service Listener tt object to this context bundle s list of listeners p This method is the same as calling tt Bundle Context add Service Listener Service Listener listener String filter tt with tt filter tt set to tt null tt param listener The tt Service Listener tt object to be added exception java lang Illegal State Exception If this context bundle has stopped see add Service Listener Service Listener String  ServiceListener BundleContext addServiceListener ServiceListener ServiceListener IllegalStateException addServiceListener ServiceListener
Removes the specified tt Service Listener tt object from this context bundle s list of listeners See link get Bundle for a definition of context bundle p If tt listener tt is not contained in this context bundle s list of listeners this method does nothing param listener The tt Service Listener tt to be removed exception java lang Illegal State Exception If this context bundle has stopped  ServiceListener getBundle ServiceListener IllegalStateException
Adds the specified tt Bundle Listener tt object to this context bundle s list of listeners if not already present See link get Bundle for a definition of context bundle Bundle Listener objects are notified when a bundle has a lifecycle state change p If this context bundle s list of listeners already contains a listener tt l tt such that tt l listener tt this method does nothing param listener The tt Bundle Listener tt to be added exception java lang Illegal State Exception If this context bundle has stopped see Bundle Event see Bundle Listener  BundleListener getBundle BundleListener BundleListener IllegalStateException BundleEvent BundleListener
Removes the specified tt Bundle Listener tt object from this context bundle s list of listeners See link get Bundle for a definition of context bundle p If tt listener tt is not contained in this context bundle s list of listeners this method does nothing param listener The tt Bundle Listener tt object to be removed exception java lang Illegal State Exception If this context bundle has stopped  BundleListener getBundle BundleListener IllegalStateException
Adds the specified tt Framework Listener tt object to this context bundle s list of listeners if not already present See link get Bundle for a definition of context bundle Framework Listeners are notified of general Framework events p If this context bundle s list of listeners already contains a listener tt l tt such that tt l listener tt this method does nothing param listener The tt Framework Listener tt object to be added exception java lang Illegal State Exception If this context bundle has stopped see Framework Event see Framework Listener  FrameworkListener getBundle FrameworkListeners FrameworkListener IllegalStateException FrameworkEvent FrameworkListener
Removes the specified tt Framework Listener tt object from this context bundle s list of listeners See link get Bundle for a definition of context bundle p If tt listener tt is not contained in this context bundle s list of listeners this method does nothing param listener The tt Framework Listener tt object to be removed exception java lang Illegal State Exception If this context bundle has stopped  FrameworkListener getBundle FrameworkListener IllegalStateException
Registers the specified service object with the specified properties under the specified class names into the Framework A tt Service Registration tt object is returned The tt Service Registration tt object is for the private use of the bundle registering the service and should not be shared with other bundles The registering bundle is defined to be the context bundle See link get Bundle for a definition of context bundle Other bundles can locate the service by using either the link get Service References or link get Service Reference method p A bundle can register a service object that implements the link Service Factory interface to have more flexibility in providing service objects to other bundles p The following steps are required to register a service ol li If tt service tt is not a tt Service Factory tt an tt Illegal Argument Exception tt is thrown if tt service tt is not an tt instanceof tt all the classes named li The Framework adds these service properties to the specified tt Dictionary tt which may be tt null tt a property named link Constants SERVICE ID identifying the registration number of the service and a property named link Constants OBJECTCLASS containing all the specified classes If any of these properties have already been specified by the registering bundle their values will be overwritten by the Framework li The service is added to the Framework service registry and may now be used by other bundles li A service event of type link Service Event REGISTERED is synchronously sent li A tt Service Registration tt object for this registration is returned ol param clazzes The class names under which the service can be located The class names in this array will be stored in the service s properties under the key link Constants OBJECTCLASS param service The service object or a tt Service Factory tt object param properties The properties for this service The keys in the properties object must all be tt String tt objects See link Constants for a list of standard service property keys Changes should not be made to this object after calling this method To update the service s properties the link Service Registration set Properties method must be called tt properties tt may be tt null tt if the service has no properties return A tt Service Registration tt object for use by the bundle registering the service to update the service s properties or to unregister the service exception java lang Illegal Argument Exception If one of the following is true ul li tt service tt is tt null tt li tt service tt is not a tt Service Factory tt object and is not an instance of all the named classes in tt clazzes tt li tt properties tt contains case variants of the same key name ul exception java lang Security Exception If the caller does not have the tt Service Permission tt to register the service for all the named classes and the Java Runtime Environment supports permissions exception java lang Illegal State Exception If this context bundle was stopped see Service Registration see Service Factory public abstract Service Registration register Service String clazzes Object service  ServiceRegistration ServiceRegistration getBundle getServiceReferences getServiceReference ServiceFactory ServiceFactory IllegalArgumentException SERVICE_ID ServiceEvent ServiceRegistration ServiceFactory ServiceRegistration setProperties ServiceRegistration IllegalArgumentException ServiceFactory SecurityException ServicePermission IllegalStateException ServiceRegistration ServiceFactory ServiceRegistration registerService
Registers the specified service object with the specified properties under the specified class name with the Framework p This method is otherwise identical to link register Service java lang String java lang Object java util Dictionary and is provided as a convenience when tt service tt will only be registered under a single class name Note that even in this case the value of the service s link Constants OBJECTCLASS property will be an array of strings rather than just a single string see register Service java lang String java lang Object java util Dictionary public abstract Service Registration register Service String clazz Object service  registerService registerService ServiceRegistration registerService
Returns a list of tt Service Reference tt objects This method returns a list of tt Service Reference tt objects for services which implement and were registered under the specified class and match the specified filter criteria p The list is valid at the time of the call to this method however as the Framework is a very dynamic environment services can be modified or unregistered at anytime p tt filter tt is used to select the registered service whose properties objects contain keys and values which satisfy the filter See link Filter for a description of the filter string syntax p If tt filter tt is tt null tt all registered services are considered to match the filter p If tt filter tt cannot be parsed an link Invalid Syntax Exception will be thrown with a human readable message where the filter became unparsable p The following steps are required to select a service ol li If the Java Runtime Environment supports permissions the caller is checked for the tt Service Permission tt to get the service with the specified class If the caller does not have the correct permission tt null tt is returned li If the filter string is not tt null tt the filter string is parsed and the set of registered services which satisfy the filter is produced If the filter string is tt null tt then all registered services are considered to satisfy the filter li If tt clazz tt is not tt null tt the set is further reduced to those services which are an tt instanceof tt and were registered under the specified class The complete list of classes of which a service is an instance and which were specified when the service was registered is available from the service s link Constants OBJECTCLASS property li An array of tt Service Reference tt to the selected services is returned ol param clazz The class name with which the service was registered or tt null tt for all services param filter The filter criteria return An array of tt Service Reference tt objects or tt null tt if no services are registered which satisfy the search exception Invalid Syntax Exception If tt filter tt contains an invalid filter string which cannot be parsed public abstract Service Reference get Service References String clazz String filter  ServiceReference ServiceReference InvalidSyntaxException ServicePermission ServiceReference ServiceReference InvalidSyntaxException ServiceReference getServiceReferences
Returns a tt Service Reference tt object for a service that implements and was registered under the specified class p This tt Service Reference tt object is valid at the time of the call to this method however as the Framework is a very dynamic environment services can be modified or unregistered at anytime p This method is the same as calling link get Service References with a tt null tt filter string It is provided as a convenience for when the caller is interested in any service that implements the specified class p If multiple such services exist the service with the highest ranking as specified in its link Constants SERVICE RANKING property is returned p If there is a tie in ranking the service with the lowest service ID as specified in its link Constants SERVICE ID property that is the service that was registered first is returned param clazz The class name with which the service was registered return A tt Service Reference tt object or tt null tt if no services are registered which implement the named class see get Service References  ServiceReference ServiceReference getServiceReferences SERVICE_RANKING SERVICE_ID ServiceReference getServiceReferences
Returns the specified service object for a service p A bundle s use of a service is tracked by the bundle s use count of that service Each time a service s service object is returned by link get Service the context bundle s use count for that service is incremented by one Each time the service is released by link unget Service the context bundle s use count for that service is decremented by one p When a bundle s use count for a service drops to zero the bundle should no longer use that service See link get Bundle for a definition of context bundle p This method will always return tt null tt when the service associated with this tt reference tt has been unregistered p The following steps are required to get the service object ol li If the service has been unregistered tt null tt is returned li The context bundle s use count for this service is incremented by one li If the context bundle s use count for the service is currently one and the service was registered with an object implementing the tt Service Factory tt interface the link Service Factory get Service method is called to create a service object for the context bundle This service object is cached by the Framework While the context bundle s use count for the service is greater than zero subsequent calls to get the services s service object for the context bundle will return the cached service object br If the service object returned by the tt Service Factory tt object is not an tt instanceof tt all the classes named when the service was registered or the tt Service Factory tt object throws an exception tt null tt is returned and a Framework event of type link Framework Event ERROR is broadcast li The service object for the service is returned ol param reference A reference to the service return A service object for the service associated with tt reference tt or tt null tt if the service is not registered or does not implement the classes under which it was registered in the case of a Service Factory exception java lang Security Exception If the caller does not have the tt Service Permission tt to get the service using at least one of the named classes the service was registered under and the Java Runtime Environment supports permissions exception java lang Illegal State Exception If the context bundle has stopped see unget Service see Service Factory  getService ungetService getBundle ServiceFactory ServiceFactory getService ServiceFactory ServiceFactory FrameworkEvent SecurityException ServicePermission IllegalStateException ungetService ServiceFactory
Releases the service object referenced by the specified tt Service Reference tt object If the context bundle s use count for the service is zero this method returns tt false tt Otherwise the context bundle s use count for the service is decremented by one See link get Bundle for a definition of context bundle p The service s service object should no longer be used and all references to it should be destroyed when a bundle s use count for the service drops to zero p The following steps are required to unget the service object ol li If the context bundle s use count for the service is zero or the service has been unregistered tt false tt is returned li The context bundle s use count for this service is decremented by one li If the context bundle s use count for the service is currently zero and the service was registered with a tt Service Factory tt object the link Service Factory unget Service method is called to release the service object for the context bundle li tt true tt is returned ol param reference A reference to the service to be released return tt false tt if the context bundle s use count for the service is zero or if the service has been unregistered tt true tt otherwise exception java lang Illegal State Exception If the context bundle has stopped see get Service see Service Factory  ServiceReference getBundle ServiceFactory ServiceFactory ungetService IllegalStateException getService ServiceFactory
Creates a tt File tt object for a file in the persistent storage area provided for the bundle by the Framework This method will return tt null tt if the platform does not have file system support p A tt File tt object for the base directory of the persistent storage area provided for the context bundle by the Framework can be obtained by calling this method with an empty string as tt filename tt See link get Bundle for a definition of context bundle p If the Java Runtime Environment supports permissions the Framework will ensure that the bundle has the tt java io File Permission tt with actions tt read tt tt write tt tt delete tt for all files recursively in the persistent storage area provided for the context bundle param filename A relative name to the file to be accessed return A tt File tt object that represents the requested file or tt null tt if the platform does not have file system support exception java lang Illegal State Exception If the context bundle has stopped  getBundle FilePermission IllegalStateException
Creates a tt Filter tt object This tt Filter tt object may be used to match a tt Service Reference tt object or a tt Dictionary tt object See link Filter for a description of the filter string syntax p If the filter cannot be parsed an link Invalid Syntax Exception will be thrown with a human readable message where the filter became unparsable param filter The filter string return A tt Filter tt object encapsulating the filter string exception Invalid Syntax Exception If tt filter tt contains an invalid filter string that cannot be parsed exception Null Pointer Exception If tt filter tt is null since 1 1 public abstract Filter create Filter String filter  ServiceReference InvalidSyntaxException InvalidSyntaxException NullPointerException createFilter

Creates a bundle event of the specified type param type The event type param bundle The bundle which had a lifecycle change public Bundle Event int type Bundle bundle super bundle this bundle bundle this type type  BundleEvent
Returns the bundle which had a lifecycle change This bundle is the source of the event return A bundle that had a change occur in its lifecycle public Bundle get Bundle return bundle  getBundle
Returns the type of lifecyle event The type values are ul li link INSTALLED li link STARTED li link STOPPED li link UPDATED li link UNINSTALLED li link RESOLVED li link UNRESOLVED ul return The type of lifecycle event public int get Type return type  getType

Creates a tt Bundle Exception tt that wraps another exception param msg The associated message param cause The cause of this exception public Bundle Exception String msg Throwable cause super msg this cause cause  BundleException BundleException
Creates a tt Bundle Exception tt object with the specified message param msg The message public Bundle Exception String msg super msg this cause null  BundleException BundleException
Returns any nested exceptions included in this exception p This method predates the general purpose exception chaining mechanism The link get Cause method is now the preferred means of obtaining this information return The nested exception tt null tt if there is no nested exception public Throwable get Nested Exception return cause  getCause getNestedException
Returns the cause of this exception or tt null tt if no cause was specified when this exception was created return The cause of this exception or tt null tt if no cause was specified since 1 3 b EXPERIMENTAL b public Throwable get Cause return cause  getCause
The cause of this exception can only be set when constructed throws java lang Illegal State Exception This method will always throw an tt Illegal State Exception tt since the cause of this exception can only be set when constructed since 1 3 b EXPERIMENTAL b public Throwable init Cause Throwable cause throw new Illegal State Exception  IllegalStateException IllegalStateException initCause IllegalStateException

Receives notification that a bundle has had a lifecycle change param event The tt Bundle Event tt  BundleEvent

Returns this service s configuration object p Services implementing tt Configurable tt should take care when returning a service configuration object since this object is probably sensitive p If the Java Runtime Environment supports permissions it is recommended that the caller is checked for the appropriate permission before returning the configuration object It is recommended that callers possessing the appropriate link Admin Permission always be allowed to get the configuration object return The configuration object for this service exception java lang Security Exception If the caller does not have an appropriate permission and the Java Runtime Environment supports permissions  AdminPermission SecurityException

Filter using a service s properties p The filter is executed using properties of the referenced service param reference The reference to the service whose properties are used in the match return tt true tt if the service s properties match this filter tt false tt otherwise 
Filter using a tt Dictionary tt object The Filter is executed using the tt Dictionary tt object s keys and values param dictionary The tt Dictionary tt object whose keys are used in the match return tt true tt if the tt Dictionary tt object s keys and values match this filter tt false tt otherwise exception Illegal Argument Exception If tt dictionary tt contains case variants of the same key name  IllegalArgumentException
Returns this tt Filter tt object s filter string p The filter string is normalized by removing whitespace which does not affect the meaning of the filter return Filter string 
Compares this tt Filter tt object to another object param obj The object to compare against this tt Filter tt object return If the other object is a tt Filter tt object then returns tt this to String equals obj to String tt tt false tt otherwise  toString toString
Returns the hash Code for this tt Filter tt object return The hash Code of the filter string that is tt this to String hash Code tt  hashCode hashCode toString hashCode

Creates a Framework event param type The event type param source The event source object This may not be tt null tt deprecated Since 1 2 This constructor is deprecated in favor of using the other constructor with the System Bundle as the event source public Framework Event int type Object source super source this type type this bundle null this throwable null  FrameworkEvent
Creates a Framework event regarding the specified bundle param type The event type param bundle The event source param throwable The related exception This argument may be tt null tt if there is no related exception public Framework Event int type Bundle bundle Throwable throwable super bundle this type type this bundle bundle this throwable throwable  FrameworkEvent
Returns the exception associated with the event p If the event type is tt ERROR tt this method returns the exception related to the error return An exception if an event of type tt ERROR tt or tt null tt public Throwable get Throwable return throwable  getThrowable
Returns the bundle associated with the event This bundle is also the source of the event return The bundle associated with the event public Bundle get Bundle return bundle  getBundle
Returns the type of bundle state change p The type values are ul li link STARTED li link ERROR li link PACKAGES REFRESHED li link STARTLEVEL CHANGED ul return The type of state change public int get Type return type  PACKAGES_REFRESHED STARTLEVEL_CHANGED getType

Receives notification of a general tt Framework Event tt object param event The tt Framework Event tt object  FrameworkEvent FrameworkEvent

Creates an exception of type tt Invalid Syntax Exception tt p This method creates an tt Invalid Syntax Exception tt object with the specified message and the filter string which generated the exception param msg The message param filter The invalid filter string public Invalid Syntax Exception String msg String filter super msg this filter filter  InvalidSyntaxException InvalidSyntaxException InvalidSyntaxException
Returns the filter string that generated the tt Invalid Syntax Exception tt object return The invalid filter string see Bundle Context get Service References see Bundle Context add Service Listener public String get Filter return filter  InvalidSyntaxException BundleContext getServiceReferences BundleContext addServiceListener getFilter

Defines the authority to import and or export a package within the OS Gi environment p The name is specified as a normal Java package name a dot separated string Wildcards may be used For example pre org osgi service http javax servlet pre p Package Permissions are granted over all possible versions of a package A bundle that needs to export a package must have the appropriate tt Package Permission tt for that package similarly a bundle that needs to import a package must have the appropriate tt Package Permssion tt for that package p Permission is granted for both classes and resources param name Package name param actions tt EXPORT tt tt IMPORT tt canonical order public Package Permission String name String actions this name get Mask actions  OSGi PackagePermission PackagePermssion PackagePermission getMask
Package private constructor used by Package Permission Collection param name class name param action mask Package Permission String name int mask super name init mask  PackagePermissionCollection PackagePermission
Called by constructors and when deserialized param action mask private void init int mask if mask ACTION NONE mask ACTION ALL mask throw new Illegal Argument Exception invalid action string action mask mask  ACTION_NONE ACTION_ALL IllegalArgumentException action_mask
Parse action string into action mask param actions Action string return action mask private static int get Mask String actions boolean seencomma false int mask ACTION NONE if actions null return mask char a actions to Char Array int i a length 1 if i 0 return mask while i 1 char c skip whitespace while i 1 c a i c r c n c f c t i check for the known strings int matchlen if i 5 a i 5 i a i 5 I a i 4 m a i 4 M a i 3 p a i 3 P a i 2 o a i 2 O a i 1 r a i 1 R a i t a i T matchlen 6 mask ACTION IMPORT else if i 5 a i 5 e a i 5 E a i 4 x a i 4 X a i 3 p a i 3 P a i 2 o a i 2 O a i 1 r a i 1 R a i t a i T matchlen 6 mask ACTION EXPORT ACTION IMPORT else parse error throw new Illegal Argument Exception invalid permission actions make sure we didn t just match the tail of a word like ackbarfimport Also skip to the comma seencomma false while i matchlen seencomma switch a i matchlen case seencomma true FALLTHROUGH case case r case n case f case t break default throw new Illegal Argument Exception invalid permission actions i point i at the location of the comma minus one or 1 i matchlen if seencomma throw new Illegal Argument Exception invalid permission actions return mask  getMask ACTION_NONE toCharArray ACTION_IMPORT ACTION_EXPORT ACTION_IMPORT IllegalArgumentException IllegalArgumentException IllegalArgumentException
Determines if the specified permission is implied by this object p This method checks that the package name of the target is implied by the package name of this object The list of tt Package Permission tt actions must either match or allow for the list of the target object to imply the target tt Package Permission tt action p The permission to export a package implies the permission to import the named package pre x y export x y z export is true import x y import is true export x y import is true x y export x y z export is false pre param p The target permission to interrogate return tt true tt if the specified tt Package Permission tt action is implied by this object tt false tt otherwise public boolean implies Permission p if p instanceof Package Permission Package Permission target Package Permission p return action mask target action mask target action mask super implies p return false  PackagePermission PackagePermission PackagePermission PackagePermission PackagePermission PackagePermission action_mask action_mask action_mask
Returns the canonical string representation of the tt Package Permission tt actions p Always returns present tt Package Permission tt actions in the following order tt EXPORT tt tt IMPORT tt return Canonical string representation of the tt Package Permission tt actions public String get Actions if actions null String Buffer sb new String Buffer boolean comma false if action mask ACTION EXPORT ACTION EXPORT sb append EXPORT comma true if action mask ACTION IMPORT ACTION IMPORT if comma sb append sb append IMPORT actions sb to String return actions  PackagePermission PackagePermission PackagePermission getActions StringBuffer StringBuffer action_mask ACTION_EXPORT ACTION_EXPORT action_mask ACTION_IMPORT ACTION_IMPORT toString
Returns a new tt Permission Collection tt object suitable for storing tt Package Permission tt objects return A new tt Permission Collection tt object public Permission Collection new Permission Collection return new Package Permission Collection  PermissionCollection PackagePermission PermissionCollection PermissionCollection newPermissionCollection PackagePermissionCollection
Determines the equality of two tt Package Permission tt objects This method checks that specified package has the same package name and tt Package Permission tt actions as this tt Package Permission tt object param obj The object to test for equality with this tt Package Permission tt object return tt true tt if tt obj tt is a tt Package Permission tt and has the same package name and actions as this tt Package Permission tt object tt false tt otherwise public boolean equals Object obj if obj this return true if obj instanceof Package Permission return false Package Permission p Package Permission obj return action mask p action mask get Name equals p get Name  PackagePermission PackagePermission PackagePermission PackagePermission PackagePermission PackagePermission PackagePermission PackagePermission PackagePermission action_mask action_mask getName getName
Returns the hash code value for this object return A hash code value for this object public int hash Code return get Name hash Code get Actions hash Code  hashCode getName hashCode getActions hashCode
Returns the current action mask p Used by the Package Permission Collection class return Current action mask int get Mask return action mask  PackagePermissionCollection getMask action_mask
Write Object is called to save the state of the tt Service Permission tt object to a stream The actions are serialized and the superclass takes care of the name private synchronized void write Object java io Object Output Stream s throws IO Exception Write out the actions The superclass takes care of the name call get Actions to make sure actions field is initialized if actions null get Actions s default Write Object  WriteObject ServicePermission writeObject ObjectOutputStream IOException getActions getActions defaultWriteObject
read Object is called to restore the state of the Service Permission from a stream private synchronized void read Object java io Object Input Stream s throws IO Exception Class Not Found Exception Read in the action then initialize the rest s default Read Object init get Mask actions  readObject ServicePermission readObject ObjectInputStream IOException ClassNotFoundException defaultReadObject getMask
Create an empty Package Permissions object public Package Permission Collection permissions new Hashtable all allowed false  PackagePermissions PackagePermissionCollection all_allowed
Adds a permission to the tt Package Permission tt objects The key for the hash is the name param permission The tt Package Permission tt object to add exception Illegal Argument Exception If the permission is not a tt Package Permission tt instance exception Security Exception If this tt Package Permission Collection tt object has been marked read only public void add Permission permission if permission instanceof Package Permission throw new Illegal Argument Exception invalid permission permission if is Read Only throw new Security Exception attempt to add a Permission to a readonly Permission Collection Package Permission pp Package Permission permission String name pp get Name Package Permission existing Package Permission permissions get name if existing null int old Mask existing get Mask int new Mask pp get Mask if old Mask new Mask permissions put name new Package Permission name old Mask new Mask else permissions put name permission if all allowed if name equals all allowed true  PackagePermission PackagePermission IllegalArgumentException PackagePermission SecurityException PackagePermissionCollection PackagePermission IllegalArgumentException isReadOnly SecurityException PermissionCollection PackagePermission PackagePermission getName PackagePermission PackagePermission oldMask getMask newMask getMask oldMask newMask PackagePermission oldMask newMask all_allowed all_allowed
Determines if the specified permissions implies the permissions expressed in tt permission tt param p The Permission object to compare with this tt Package Permission tt object return tt true tt if tt permission tt is a proper subset of a permission in the set tt false tt otherwise public boolean implies Permission permission if permission instanceof Package Permission return false Package Permission pp Package Permission permission Package Permission x int desired pp get Mask int effective 0 short circuit if the Permission was added if all allowed x Package Permission permissions get if x null effective x get Mask if effective desired desired return true strategy Check for full match first Then work our way up the name looking for matches on a b String name pp get Name x Package Permission permissions get name if x null we have a direct hit effective x get Mask if effective desired desired return true work our way up the tree int last offset offset name length 1 while last name last Index Of offset 1 name name substring 0 last 1 x Package Permission permissions get name if x null effective x get Mask if effective desired desired return true offset last 1 we don t have to check for as it was already checked at the top all allowed so we just return false return false  PackagePermission PackagePermission PackagePermission PackagePermission PackagePermission getMask all_allowed PackagePermission getMask getName PackagePermission getMask lastIndexOf PackagePermission getMask all_allowed
Returns an enumeration of all tt Package Permission tt objects in the container return Enumeration of all tt Package Permission tt objects public Enumeration elements return permissions elements  PackagePermission PackagePermission

Creates a new service event object param type The event type param reference A tt Service Reference tt object to the service that had a lifecycle change public Service Event int type Service Reference reference super reference this reference reference this type type  ServiceReference ServiceEvent ServiceReference
Returns a reference to the service that had a change occur in its lifecycle p This reference is the source of the event return Reference to the service that had a lifecycle change public Service Reference get Service Reference return reference  ServiceReference getServiceReference
Returns the type of event The event type values are ul li link REGISTERED li link MODIFIED li link UNREGISTERING ul return Type of service lifecycle change public int get Type return type  getType

Creates a new service object p The Framework invokes this method the first time the specified tt bundle tt requests a service object using the tt Bundle Context get Service Service Reference tt method The service factory can then return a specific service object for each bundle p The Framework caches the value returned unless it is tt null tt and will return the same service object on any future call to tt Bundle Context get Service tt from the same bundle p The Framework will check if the returned service object is an instance of all the classes named when the service was registered If not then tt null tt is returned to the bundle param bundle The bundle using the service param registration The tt Service Registration tt object for the service return A service object that strong must strong be an instance of all the classes named when the service was registered see Bundle Context get Service public abstract Object get Service Bundle bundle  BundleContext getService ServiceReference BundleContext getService ServiceRegistration BundleContext getService getService
Releases a service object p The Framework invokes this method when a service has been released by a bundle The service object may then be destroyed param bundle The bundle releasing the service param registration The tt Service Registration tt object for the service param service The service object returned by a previous call to the tt Service Factory get Service tt method see Bundle Context unget Service public abstract void unget Service Bundle bundle Service Registration registration  ServiceRegistration ServiceFactory getService BundleContext ungetService ungetService ServiceRegistration

Receives notification that a service has had a lifecycle change param event The tt Service Event tt object  ServiceEvent

Create a new Service Permission p The name of the service is specified as a fully qualified class name pre Class Name lt class name gt lt class name ending in gt pre Examples pre org osgi service http Http Service org osgi service http org osgi service snmp pre p There are two possible actions tt get tt and tt register tt The tt get tt permission allows the owner of this permission to obtain a service with this name The tt register tt permission allows the bundle to register a service under that name param name class name param actions tt get tt tt register tt canonical order public Service Permission String name String actions this name get Mask actions  ServicePermission ClassName HttpService ServicePermission getMask
Package private constructor used by Service Permission Collection param name class name param action mask Service Permission String name int mask super name init mask  ServicePermissionCollection ServicePermission
Called by constructors and when deserialized param action mask private void init int mask if mask ACTION NONE mask ACTION ALL mask throw new Illegal Argument Exception invalid action string action mask mask  ACTION_NONE ACTION_ALL IllegalArgumentException action_mask
Parse action string into action mask param actions Action string return action mask private static int get Mask String actions boolean seencomma false int mask ACTION NONE if actions null return mask char a actions to Char Array int i a length 1 if i 0 return mask while i 1 char c skip whitespace while i 1 c a i c r c n c f c t i check for the known strings int matchlen if i 2 a i 2 g a i 2 G a i 1 e a i 1 E a i t a i T matchlen 3 mask ACTION GET else if i 7 a i 7 r a i 7 R a i 6 e a i 6 E a i 5 g a i 5 G a i 4 i a i 4 I a i 3 s a i 3 S a i 2 t a i 2 T a i 1 e a i 1 E a i r a i R matchlen 8 mask ACTION REGISTER else parse error throw new Illegal Argument Exception invalid permission actions make sure we didn t just match the tail of a word like ackbarfregister Also skip to the comma seencomma false while i matchlen seencomma switch a i matchlen case seencomma true FALLTHROUGH case case r case n case f case t break default throw new Illegal Argument Exception invalid permission actions i point i at the location of the comma minus one or 1 i matchlen if seencomma throw new Illegal Argument Exception invalid permission actions return mask  getMask ACTION_NONE toCharArray ACTION_GET ACTION_REGISTER IllegalArgumentException IllegalArgumentException IllegalArgumentException
Determines if a tt Service Permission tt object implies the specified permission param p The target permission to check return tt true tt if the specified permission is implied by this object tt false tt otherwise public boolean implies Permission p if p instanceof Service Permission Service Permission target Service Permission p return action mask target action mask target action mask super implies p return false  ServicePermission ServicePermission ServicePermission ServicePermission action_mask action_mask action_mask
Returns the canonical string representation of the actions Always returns present actions in the following order tt get tt tt register tt return The canonical string representation of the actions public String get Actions if actions null String Buffer sb new String Buffer boolean comma false if action mask ACTION GET ACTION GET sb append GET comma true if action mask ACTION REGISTER ACTION REGISTER if comma sb append sb append REGISTER actions sb to String return actions  getActions StringBuffer StringBuffer action_mask ACTION_GET ACTION_GET action_mask ACTION_REGISTER ACTION_REGISTER toString
Returns a new tt Permission Collection tt object for storing tt Service Permission tt objects return A new tt Permission Collection tt object suitable for storing tt Service Permission tt objects public Permission Collection new Permission Collection return new Service Permission Collection  PermissionCollection ServicePermission PermissionCollection ServicePermission PermissionCollection newPermissionCollection ServicePermissionCollection
Determines the equalty of two Service Permission objects Checks that specified object has the same class name and action as this tt Service Permission tt param obj The object to test for equality return true if obj is a tt Service Permission tt and has the same class name and actions as this tt Service Permission tt object tt false tt otherwise public boolean equals Object obj if obj this return true if obj instanceof Service Permission return false Service Permission p Service Permission obj return action mask p action mask get Name equals p get Name  ServicePermission ServicePermission ServicePermission ServicePermission ServicePermission ServicePermission ServicePermission action_mask action_mask getName getName
Returns the hash code value for this object return Hash code value for this object public int hash Code return get Name hash Code get Actions hash Code  hashCode getName hashCode getActions hashCode
Returns the current action mask Used by the Service Permission Collection object return The actions mask int get Mask return action mask  ServicePermissionCollection getMask action_mask
Write Object is called to save the state of the Service Permission to a stream The actions are serialized and the superclass takes care of the name private synchronized void write Object java io Object Output Stream s throws IO Exception Write out the actions The superclass takes care of the name call get Actions to make sure actions field is initialized if actions null get Actions s default Write Object  WriteObject ServicePermission writeObject ObjectOutputStream IOException getActions getActions defaultWriteObject
read Object is called to restore the state of the Service Permission from a stream private synchronized void read Object java io Object Input Stream s throws IO Exception Class Not Found Exception Read in the action then initialize the rest s default Read Object init get Mask actions  readObject ServicePermission readObject ObjectInputStream IOException ClassNotFoundException defaultReadObject getMask
Creates an empty Service Permissions object public Service Permission Collection permissions new Hashtable all allowed false  ServicePermissions ServicePermissionCollection all_allowed
Adds a permission to the tt Service Permission tt objects using the key for the hash as the name param permission The Permission object to add exception Illegal Argument Exception If the permission is not a Service Permission object exception Security Exception If this tt Service Permission Collection tt object has been marked read only public void add Permission permission if permission instanceof Service Permission throw new Illegal Argument Exception invalid permission permission if is Read Only throw new Security Exception attempt to add a Permission to a readonly Permission Collection Service Permission sp Service Permission permission String name sp get Name Service Permission existing Service Permission permissions get name if existing null int old Mask existing get Mask int new Mask sp get Mask if old Mask new Mask permissions put name new Service Permission name old Mask new Mask else permissions put name permission if all allowed if name equals all allowed true  ServicePermission IllegalArgumentException ServicePermission SecurityException ServicePermissionCollection ServicePermission IllegalArgumentException isReadOnly SecurityException PermissionCollection ServicePermission ServicePermission getName ServicePermission ServicePermission oldMask getMask newMask getMask oldMask newMask ServicePermission oldMask newMask all_allowed all_allowed
Determines if a set of permissions implies the permissions expressed in tt permission tt param p The Permission object to compare return tt true tt if tt permission tt is a proper subset of a permission in the set tt false tt otherwise public boolean implies Permission permission if permission instanceof Service Permission return false Service Permission sp Service Permission permission Service Permission x int desired sp get Mask int effective 0 short circuit if the Permission was added if all allowed x Service Permission permissions get if x null effective x get Mask if effective desired desired return true strategy Check for full match first Then work our way up the name looking for matches on a b String name sp get Name x Service Permission permissions get name if x null we have a direct hit effective x get Mask if effective desired desired return true work our way up the tree int last offset offset name length 1 while last name last Index Of offset 1 name name substring 0 last 1 x Service Permission permissions get name if x null effective x get Mask if effective desired desired return true offset last 1 we don t have to check for as it was already checked at the top all allowed so we just return false return false  ServicePermission ServicePermission ServicePermission ServicePermission getMask all_allowed ServicePermission getMask getName ServicePermission getMask lastIndexOf ServicePermission getMask all_allowed
Returns an enumeration of all the tt Service Permission tt objects in the container return Enumeration of all the Service Permission objects public Enumeration elements return permissions elements  ServicePermission ServicePermission

Returns the property value to which the specified property key is mapped in the properties tt Dictionary tt object of the service referenced by this tt Service Reference tt object p Property keys are case insensitive p This method must continue to return property values after the service has been unregistered This is so references to unregistered services for example tt Service Reference tt objects stored in the log can still be interrogated param key The property key return The property value to which the key is mapped tt null tt if there is no property named after the key  ServiceReference ServiceReference
Returns an array of the keys in the properties tt Dictionary tt object of the service referenced by this tt Service Reference tt object p This method will continue to return the keys after the service has been unregistered This is so references to unregistered services for example tt Service Reference tt objects stored in the log can still be interrogated p This method is i case preserving i this means that every key in the returned array must have the same case as the corresponding key in the properties tt Dictionary tt that was passed to the link Bundle Context register Service or link Service Registration set Properties methods return An array of property keys  ServiceReference ServiceReference BundleContext registerService ServiceRegistration setProperties
Returns the bundle that registered the service referenced by this tt Service Reference tt object p This method will always return tt null tt when the service has been unregistered This can be used to determine if the service has been unregistered return The bundle that registered the service referenced by this tt Service Reference tt object tt null tt if that service has already been unregistered see Bundle Context register Service  ServiceReference ServiceReference BundleContext registerService
Returns the bundles that are using the service referenced by this tt Service Reference tt object Specifically this method returns the bundles whose usage count for that service is greater than zero return An array of bundles whose usage count for the service referenced by this tt Service Reference tt object is greater than zero tt null tt if no bundles are currently using that service since 1 1  ServiceReference ServiceReference

Returns a tt Service Reference tt object for a service being registered p The tt Service Reference tt object may be shared with other bundles exception java lang Illegal State Exception If this tt Service Registration tt object has already been unregistered return tt Service Reference tt object  ServiceReference ServiceReference IllegalStateException ServiceRegistration ServiceReference
Updates the properties associated with a service p The link Constants OBJECTCLASS and link Constants SERVICE ID keys cannot be modified by this method These values are set by the Framework when the service is registered in the OS Gi environment p The following steps are required to modify service properties ol li The service s properties are replaced with the provided properties li A service event of type link Service Event MODIFIED is synchronously sent ol param properties The properties for this service See link Constants for a list of standard service property keys Changes should not be made to this object after calling this method To update the service s properties this method should be called again exception Illegal State Exception If this tt Service Registration tt object has already been unregistered exception Illegal Argument Exception If tt properties tt contains case variants of the same key name  SERVICE_ID OSGi ServiceEvent IllegalStateException ServiceRegistration IllegalArgumentException
Unregisters a service Remove a tt Service Registration tt object from the Framework service registry All tt Service Reference tt objects associated with this tt Service Registration tt object can no longer be used to interact with the service p The following steps are required to unregister a service ol li The service is removed from the Framework service registry so that it can no longer be used tt Service Reference tt objects for the service may no longer be used to get a service object for the service li A service event of type link Service Event UNREGISTERING is synchronously sent so that bundles using this service can release their use of it li For each bundle whose use count for this service is greater than zero br The bundle s use count for this service is set to zero br If the service was registered with a link Service Factory object the tt Service Factory unget Service tt method is called to release the service object for the bundle ol exception java lang Illegal State Exception If this tt Service Registration tt object has already been unregistered see Bundle Context unget Service see Service Factory unget Service  ServiceRegistration ServiceReference ServiceRegistration ServiceReference ServiceEvent ServiceFactory ServiceFactory ungetService IllegalStateException ServiceRegistration BundleContext ungetService ServiceFactory ungetService

Returns the name of the package associated with this tt Exported Package tt object return The name of this tt Exported Package tt object  ExportedPackage ExportedPackage
Returns the bundle exporting the package associated with this tt Exported Package tt object return The exporting bundle or tt null tt if this tt Exported Package tt object has become stale  ExportedPackage ExportedPackage
Returns the resolved bundles that are currently importing the package associated with this tt Exported Package tt object p The returned array always includes the bundle returned by link get Exporting Bundle since an exporter always implicitly imports its exported packages return The array of resolved bundles currently importing the package associated with this tt Exported Package tt object or tt null tt if this tt Exported Package tt object has become stale  ExportedPackage getExportingBundle ExportedPackage ExportedPackage
Returns the specification version of this tt Exported Package tt as specified in the exporting bundle s manifest file return The specification version of this tt Exported Package tt object or tt null tt if no version information is available  ExportedPackage ExportedPackage
Returns tt true tt if the package associated with this tt Exported Package tt object has been exported by a bundle that has been updated or uninstalled return tt true tt if the associated package is being exported by a bundle that has been updated or uninstalled or if this tt Exported Package tt object has become stale tt false tt otherwise  ExportedPackage ExportedPackage

public interface Package Admin Gets the packages exported by the specified bundle param bundle The bundle whose exported packages are to be returned or tt null tt if all the packages currently exported in the Framework are to be returned If the specified bundle is the system bundle that is the bundle with id zero this method returns all the packages on the system classpath whose name does not start with java In an environment where the exhaustive list of packages on the system classpath is not known in advance this method will return all currently known packages on the system classpath that is all packages on the system classpath that contains one or more classes that have been loaded return The array of packages exported by the specified bundle or tt null tt if the specified bundle has not exported any packages  PackageAdmin
Gets the tt Exported Package tt object with the specified package name All exported packages will be checked for the specified name In an environment where the exhaustive list of packages on the system classpath is not known in advance this method attempts to see if the named package is on the system classpath This means that this method may discover an tt Exported Package tt object that was not present in the list returned by a prior call to tt get Exported Packages tt param name The name of the exported package to be returned return The exported package with the specified name or tt null tt if no expored package with that name exists  ExportedPackage ExportedPackage getExportedPackages
Forces the update replacement or removal of packages exported by the specified bundles p If no bundles are specified this method will update or remove any packages exported by any bundles that were previously updated or uninstalled since the last call to this method The technique by which this is accomplished may vary among different Framework implementations One permissible implementation is to stop and restart the Framework p This method returns to the caller immediately and then performs the following steps in its own thread ol li Compute a graph of bundles starting with the specified bundles If no bundles are specified compute a graph of bundles starting with previously updated or uninstalled ones Add to the graph any bundle that imports a package that is currently exported by a bundle in the graph The graph is fully constructed when there is no bundle outside the graph that imports a package from a bundle in the graph The graph may contain tt UNINSTALLED tt bundles that are currently still exporting packages li Each bundle in the graph that is in the tt ACTIVE tt state will be stopped as described in the tt Bundle stop tt method li Each bundle in the graph that is in the tt RESOLVED tt state is moved to the tt INSTALLED tt state The effect of this step is that bundles in the graph are no longer tt RESOLVED tt li Each bundle in the graph that is in the tt UNINSTALLED tt state is removed from the graph and is now completely removed from the Framework li Each bundle in the graph that was in the tt ACTIVE tt state prior to Step 2 is started as described in the tt Bundle start tt method causing all bundles required for the restart to be resolved It is possible that as a result of the previous steps packages that were previously exported no longer are Therefore some bundles may be unresolvable until another bundle offering a compatible package for export has been installed in the Framework li A framework event of type tt Framework Event PACKAGES REFRESHED tt is broadcast ol p For any exceptions that are thrown during any of these steps a tt Framework Event tt of type tt ERROR tt is broadcast containing the exception The source bundle for these events should be the specific bundle to which the exception is related If no specific bundle can be associated with the exception then the System Bundle must be used as the source bundle for the event param bundles the bundles whose exported packages are to be updated or removed or tt null tt for all previously updated or uninstalled bundles exception Security Exception if the caller does not have the tt Admin Permission tt and the Java runtime environment supports permissions  FrameworkEvent PACKAGES_REFRESHED FrameworkEvent SecurityException AdminPermission
Resolve the specified bundles The Framework must attempt to resolve the specified bundles that are unresolved Additional bundles that are not included in the specified bundles may be resolved as a result of calling this method A permissible implementation of this method is to attempt to resolve all unresolved bundles installed in the framework p If tt null tt is specified then the Framework will attempt to resolve all unresolved bundles This method must not cause any bundle to be refreshed stopped or started This method will not return until the operation has completed param bundles The bundles to resolve or tt null tt to resolve all unresolved bundles installed in the Framework return tt true tt if all specified bundles are resolved since 1 2 b EXPERIMENTAL b 
Returns an array of Providing Bundles for each resolved bundle with the specified symbolic name If the symbolic name argument is tt null tt then all resolved bundles with symbolic names are returned param symbolic Name The symbolic name of the desired bundles or tt null tt for all bundles with symbolic names return An array of Providing Bundles with the specified symbolic name or tt null tt if no resolved bundles exist with that symbolic name since 1 2 b EXPERIMENTAL b  ProvidingBundles symbolicName ProvidingBundles
Returns the bundles with the specified symbolic name within the specified version range If no bundles are installed that have the specified symbolic name then tt null tt is returned If a version range is specified then only the bundles that have the specified symbolic name and belong to the specified version range are returned The returned bundles are ordered by version in descending version order so that the first element of the array contains the bundle with the highest version see org osgi framework Constants BUNDLE VERSION ATTRIBUTE param symbolic Name The symbolic name of the desired bundles param version Range The version range of the desired bundles or tt null tt if all versions are desired return An array of bundles with the specified name belonging to the specified version range ordered in descending version order or tt null tt if no bundles are found since 1 2 b EXPERIMENTAL b  BUNDLE_VERSION_ATTRIBUTE symbolicName versionRange
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 whose attached fragment bundles are to be returned return An array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 1 2 b EXPERIMENTAL b 
Returns an array of host bundles to which the specified fragment bundle is attached or tt null tt if the specified bundle is not attached to a host or is not a fragment bundle param bundle The bundle whose host bundles are to be returned return An array of host bundles or tt null tt if the bundle does not have any host bundles since 1 2 b EXPERIMENTAL b 
Returns the special type of the specified bundle The bundle type values are ul li link BUNDLE TYPE FRAGMENT ul A bundle may be more than one type at a time A type code is used to identify the bundle type for future extendability p If a bundle is not one or more of the defined types then 0x00000000 is returned return The special type of the bundle since 1 2 b EXPERIMENTAL b  BUNDLE_TYPE_FRAGMENT

public interface Providing Bundle Returns the providing bundle return The providing bundle or tt null tt if this tt Providing Bundle tt object has become stale  ProvidingBundle ProvidingBundle
Returns the resolved bundles that are currently require the providing bundle return An array of resolved bundles currently requiring the providing bundle or tt null tt if this tt Providing Bundle tt object has become stale  ProvidingBundle
Returns the symbolic name of the providing bundle return The symbolic name of the providing bundle 
Returns the version of the providing bundle return The version of the providing bundle 
Returns tt true tt if the providing bundle has been updated or uninstalled return tt true tt if the providing bundle has been updated or uninstalled or if the tt Providing Bundle tt object has become stale tt false tt otherwise  ProvidingBundle

Gets the permissions assigned to the bundle with the specified location param location The location of the bundle whose permissions are to be returned return The permissions assigned to the bundle with the specified location or tt null tt if that bundle has not been assigned any permissions 
Assigns the specified permissions to the bundle with the specified location param location The location of the bundle that will be assigned the permissions param permissions The permissions to be assigned or tt null tt if the specified location is to be removed from the permission table exception Security Exception if the caller does not have the tt Admin Permission tt  SecurityException AdminPermission
Returns the bundle locations that have permissions assigned to them that is bundle locations for which an entry exists in the permission table return The locations of bundles that have been assigned any permissions or tt null tt if the permission table is empty 
Gets the default permissions p These are the permissions granted to any bundle that does not have permissions assigned to its location return The default permissions or tt null tt if no default permissions are set 
Sets the default permissions p These are the permissions granted to any bundle that does not have permissions assigned to its location param permissions The default permissions or tt null tt if the default permissions are to be removed from the permission table exception Security Exception if the caller does not have the tt Admin Permission tt  SecurityException AdminPermission

Constructs a tt Permission Info tt from the given type name and actions param type The fully qualified class name of the permission represented by this tt Permission Info tt The class must be a subclass of tt java security Permission tt and must define a 2 argument constructor that takes a i name i string and an i actions i string param name The permission name that will be passed as the first argument to the constructor of the tt Permission tt class identified by tt type tt param actions The permission actions that will be passed as the second argument to the constructor of the tt Permission tt class identified by tt type tt exception java lang Null Pointer Exception if tt type tt is tt null tt exception java lang Illegal Argument Exception if tt action tt is not tt null tt and tt name tt is tt null tt public Permission Info String type String name String actions this type type this name name this actions actions if type null throw new Null Pointer Exception type is null if name null actions null throw new Illegal Argument Exception name missing  PermissionInfo PermissionInfo NullPointerException IllegalArgumentException PermissionInfo NullPointerException IllegalArgumentException
Constructs a tt Permission Info tt object from the given encoded tt Permission Info tt string param encoded Permission The encoded tt Permission Info tt see get Encoded exception java lang Illegal Argument Exception if tt encoded Permission tt is not properly formatted public Permission Info String encoded Permission if encoded Permission null throw new Null Pointer Exception missing encoded permission if encoded Permission length 0 throw new Illegal Argument Exception empty encoded permission try char encoded encoded Permission to Char Array the first character must be if encoded 0 throw new Illegal Argument Exception first character not open parenthesis type is not quoted or encoded int end 1 int begin end while encoded end encoded end end if end begin throw new Illegal Argument Exception expecting type this type new String encoded begin end begin type may be followed by name which is quoted and encoded if encoded end end if encoded end throw new Illegal Argument Exception expecting quoted name end begin end while encoded end if encoded end end end this name decode String encoded begin end end name may be followed by actions which is quoted and encoded if encoded end end if encoded end throw new Illegal Argument Exception expecting quoted actions end begin end while encoded end if encoded end end end this actions decode String encoded begin end end the final character must be if encoded end end 1 encoded length throw new Illegal Argument Exception last character not close parenthesis catch Array Index Out Of Bounds Exception e throw new Illegal Argument Exception parsing terminated abruptly  PermissionInfo PermissionInfo encodedPermission PermissionInfo getEncoded IllegalArgumentException encodedPermission PermissionInfo encodedPermission encodedPermission NullPointerException encodedPermission IllegalArgumentException encodedPermission toCharArray IllegalArgumentException IllegalArgumentException IllegalArgumentException decodeString IllegalArgumentException decodeString IllegalArgumentException ArrayIndexOutOfBoundsException IllegalArgumentException
Returns the string encoding of this tt Permission Info tt in a form suitable for restoring this tt Permission Info tt p The encoding format is pre type pre or pre type i name i pre or pre type i name i i actions i pre where i name i and i actions i are strings that are encoded for proper parsing Specifically the tt tt tt tt carriage return and linefeed characters are escaped using tt tt tt tt tt r tt and tt n tt respectively p The encoded string must contain no leading or trailing whitespace characters A single space character must be used between type and i name i and between i name i and i actions i return The string encoding of this tt Permission Info tt public final String get Encoded String Buffer output new String Buffer 8 type length name null 0 name length actions null 0 actions length 1 output append output append type if name null output append encode String name output if actions null output append encode String actions output output append output append return output to String  PermissionInfo PermissionInfo PermissionInfo getEncoded StringBuffer StringBuffer encodeString encodeString toString
Returns the string representation of this tt Permission Info tt The string is created by calling the tt get Encoded tt method on this tt Permission Info tt return The string representation of this tt Permission Info tt public String to String return get Encoded  PermissionInfo getEncoded PermissionInfo PermissionInfo toString getEncoded
Returns the fully qualified class name of the permission represented by this tt Permission Info tt return The fully qualified class name of the permission represented by this tt Permission Info tt public final String get Type return type  PermissionInfo PermissionInfo getType
Returns the name of the permission represented by this tt Permission Info tt return The name of the permission represented by this tt Permission Info tt or tt null tt if the permission does not have a name public final String get Name return name  PermissionInfo PermissionInfo getName
Returns the actions of the permission represented by this tt Permission Info tt return The actions of the permission represented by this tt Permission Info tt or tt null tt if the permission does not have any actions associated with it public final String get Actions return actions  PermissionInfo PermissionInfo getActions
Determines the equality of two tt Permission Info tt objects This method checks that specified object has the same type name and actions as this tt Permission Info tt object param obj The object to test for equality with this tt Permission Info tt object return tt true tt if tt obj tt is a tt Permission Info tt and has the same type name and actions as this tt Permission Info tt object tt false tt otherwise public boolean equals Object obj if obj this return true if obj instanceof Permission Info return false Permission Info other Permission Info obj if type equals other type name null other name null actions null other actions null return false if name null if actions null return name equals other name actions equals other actions else return name equals other name else return true  PermissionInfo PermissionInfo PermissionInfo PermissionInfo PermissionInfo PermissionInfo PermissionInfo PermissionInfo
Returns the hash code value for this object return A hash code value for this object public int hash Code int hash type hash Code if name null hash name hash Code if actions null hash actions hash Code return hash  hashCode hashCode hashCode hashCode
This escapes the quotes backslashes n and r in the string using a backslash and appends the newly escaped string to a String Buffer private static void encode String String str String Buffer output int len str length for int i 0 i len i char c str char At i switch c case case output append output append c break case r output append r break case n output append n break default output append c break  StringBuffer encodeString StringBuffer charAt
Takes an encoded character array and decodes it into a new String private static String decode String char str int begin int end String Buffer output new String Buffer end begin for int i begin i end i char c str i if c i if i end c str i if c n c n else if c r c r output append c return output to String  decodeString StringBuffer StringBuffer toString

public class Backing Store Exception extends Exception Constructs a tt Backing Store Exception tt with the specified detail message param s the detail message public Backing Store Exception String s super s  BackingStoreException BackingStoreException BackingStoreException

Associates the specified value with the specified key in this node param key key with which the specified value is to be associated param value value to be associated with the specified key throws Null Pointer Exception if tt key tt or tt value tt is tt null tt throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method  NullPointerException IllegalStateException removeNode
Returns the value associated with the specified tt key tt in this node Returns the specified default if there is no value associated with the tt key tt or the backing store is inaccessible param key key whose associated value is to be returned param def the value to be returned in the event that this node has no value associated with tt key tt or the backing store is inaccessible return the value associated with tt key tt or tt def tt if no value is associated with tt key tt throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method throws Null Pointer Exception if tt key tt is tt null tt A tt null tt default i is i permitted  IllegalStateException removeNode NullPointerException
Removes the value associated with the specified tt key tt in this node if any param key key whose mapping is to be removed from this node see get String String throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method  IllegalStateException removeNode
Removes all of the properties key value associations in this node This call has no effect on any descendants of this node throws Backing Store Exception if this operation cannot be completed due to a failure in the backing store or inability to communicate with it throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method see remove String  BackingStoreException IllegalStateException removeNode
Associates a tt String tt object representing the specified tt int tt value with the specified tt key tt in this node The associated string is the one that would be returned if the tt int tt value were passed to tt Integer to String int tt This method is intended for use in conjunction with link get Int method p Implementor s note it is i not i necessary that the property value be represented by a tt String tt object in the backing store If the backing store supports integer values it is not unreasonable to use them This implementation detail is not visible through the tt Preferences tt API which allows the value to be read as an tt int tt with tt get Int tt or a tt String tt with tt get tt type param key key with which the string form of value is to be associated param value tt value tt whose string form is to be associated with tt key tt throws Null Pointer Exception if tt key tt is tt null tt throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method see get Int String int  toString getInt getInt NullPointerException IllegalStateException removeNode getInt
Returns the tt int tt value represented by the tt String tt object associated with the specified tt key tt in this node The tt String tt object is converted to an tt int tt as by tt Integer parse Int String tt Returns the specified default if there is no value associated with the tt key tt the backing store is inaccessible or if tt Integer parse Int String tt would throw a tt Number Format Exception tt if the associated tt value tt were passed This method is intended for use in conjunction with the link put Int method param key key whose associated value is to be returned as an tt int tt param def the value to be returned in the event that this node has no value associated with tt key tt or the associated value cannot be interpreted as an tt int tt or the backing store is inaccessible return the tt int tt value represented by the tt String tt object associated with tt key tt in this node or tt def tt if the associated value does not exist or cannot be interpreted as an tt int tt type throws Null Pointer Exception if tt key tt is tt null tt throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method see put Int String int see get String String  parseInt parseInt NumberFormatException putInt NullPointerException IllegalStateException removeNode putInt
Associates a tt String tt object representing the specified tt long tt value with the specified tt key tt in this node The associated tt String tt object is the one that would be returned if the tt long tt value were passed to tt Long to String long tt This method is intended for use in conjunction with the link get Long method p Implementor s note it is i not i necessary that the tt value tt be represented by a tt String tt type in the backing store If the backing store supports tt long tt values it is not unreasonable to use them This implementation detail is not visible through the Tt Preferences Tt API which allows the value to be read as a tt long tt with tt get Long tt or a tt String tt with tt get tt type param key tt key tt with which the string form of tt value tt is to be associated param value tt value tt whose string form is to be associated with tt key tt throws Null Pointer Exception if tt key tt is tt null tt throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method see get Long String long  toString getLong getLong NullPointerException IllegalStateException removeNode getLong
Returns the tt long tt value represented by the tt String tt object associated with the specified tt key tt in this node The tt String tt object is converted to a tt long tt as by tt Long parse Long String tt Returns the specified default if there is no value associated with the tt key tt the backing store is inaccessible or if tt Long parse Long String tt would throw a tt Number Format Exception tt if the associated tt value tt were passed This method is intended for use in conjunction with the link put Long method param key tt key tt whose associated value is to be returned as a tt long tt value param def the value to be returned in the event that this node has no value associated with tt key tt or the associated value cannot be interpreted as a tt long tt type or the backing store is inaccessible return the tt long tt value represented by the tt String tt object associated with tt key tt in this node or tt def tt if the associated value does not exist or cannot be interpreted as a tt long tt type throws Null Pointer Exception if tt key tt is tt null tt throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method see put Long String long see get String String  parseLong parseLong NumberFormatException putLong NullPointerException IllegalStateException removeNode putLong
Associates a tt String tt object representing the specified tt boolean tt value with the specified key in this node The associated string is true if the value is tt true tt and false if it is tt false tt This method is intended for use in conjunction with the link get Boolean method p Implementor s note it is i not i necessary that the value be represented by a string in the backing store If the backing store supports tt boolean tt values it is not unreasonable to use them This implementation detail is not visible through the Tt Preferences Tt API which allows the value to be read as a tt boolean tt with tt get Boolean tt or a tt String tt with tt get tt type param key tt key tt with which the string form of value is to be associated param value value whose string form is to be associated with tt key tt throws Null Pointer Exception if tt key tt is tt null tt throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method see get Boolean String boolean see get String String  getBoolean getBoolean NullPointerException IllegalStateException removeNode getBoolean
Returns the tt boolean tt value represented by the tt String tt object associated with the specified tt key tt in this node Valid strings are true which represents tt true tt and false which represents tt false tt Case is ignored so for example TRUE and False are also valid This method is intended for use in conjunction with the link put Boolean method p Returns the specified default if there is no value associated with the tt key tt the backing store is inaccessible or if the associated value is something other than true or false ignoring case param key tt key tt whose associated value is to be returned as a tt boolean tt param def the value to be returned in the event that this node has no value associated with tt key tt or the associated value cannot be interpreted as a tt boolean tt or the backing store is inaccessible return the tt boolean tt value represented by the tt String tt object associated with tt key tt in this node or tt null tt if the associated value does not exist or cannot be interpreted as a tt boolean tt throws Null Pointer Exception if tt key tt is tt null tt throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method see get String String see put Boolean String boolean  putBoolean NullPointerException IllegalStateException removeNode putBoolean
Associates a tt String tt object representing the specified tt float tt value with the specified tt key tt in this node The associated tt String tt object is the one that would be returned if the tt float tt value were passed to tt Float to String float tt This method is intended for use in conjunction with the link get Float method p Implementor s note it is i not i necessary that the value be represented by a string in the backing store If the backing store supports tt float tt values it is not unreasonable to use them This implementation detail is not visible through the Tt Preferences Tt API which allows the value to be read as a tt float tt with tt get Float tt or a tt String tt with tt get tt type param key tt key tt with which the string form of value is to be associated param value value whose string form is to be associated with tt key tt throws Null Pointer Exception if tt key tt is tt null tt throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method see get Float String float  toString getFloat getFloat NullPointerException IllegalStateException removeNode getFloat
Returns the float tt value tt represented by the tt String tt object associated with the specified tt key tt in this node The tt String tt object is converted to an tt int tt value as by tt Float parse Float String tt Returns the specified default if there is no value associated with the tt key tt the backing store is inaccessible or if tt Float parse Float String tt would throw a tt Number Format Exception tt if the associated value were passed This method is intended for use in conjunction with the link put Float method param key tt key tt whose associated value is to be returned as a tt float tt value param def the value to be returned in the event that this node has no value associated with tt key tt or the associated value cannot be interpreted as a tt float tt type or the backing store is inaccessible return the tt float tt value represented by the string associated with tt key tt in this node or tt def tt if the associated value does not exist or cannot be interpreted as a tt float tt type throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method throws Null Pointer Exception if tt key tt is tt null tt see put Float String float see get String String  parseFloat parseFloat NumberFormatException putFloat IllegalStateException removeNode NullPointerException putFloat
Associates a tt String tt object representing the specified tt double tt value with the specified tt key tt in this node The associated tt String tt object is the one that would be returned if the tt double tt value were passed to tt Double to String double tt This method is intended for use in conjunction with the link get Double method p Implementor s note it is i not i necessary that the value be represented by a string in the backing store If the backing store supports tt double tt values it is not unreasonable to use them This implementation detail is not visible through the Tt Preferences Tt API which allows the value to be read as a tt double tt with tt get Double tt or a tt String tt with tt get tt type param key tt key tt with which the string form of value is to be associated param value value whose string form is to be associated with tt key tt throws Null Pointer Exception if tt key tt is tt null tt throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method see get Double String double  toString getDouble getDouble NullPointerException IllegalStateException removeNode getDouble
Returns the tt double tt value represented by the tt String tt object associated with the specified tt key tt in this node The tt String tt object is converted to an tt int tt value as by tt Double parse Double String tt Returns the specified default if there is no value associated with the tt key tt the backing store is inaccessible or if tt Double parse Double String tt would throw a tt Number Format Exception tt if the associated value were passed This method is intended for use in conjunction with the link put Double method param key tt key tt whose associated value is to be returned as a tt double tt value param def the value to be returned in the event that this node has no value associated with tt key tt or the associated value cannot be interpreted as a tt double tt type or the backing store is inaccessible return the tt double tt value represented by the tt String tt object associated with tt key tt in this node or tt def tt if the associated value does not exist or cannot be interpreted as a tt double tt type throws Illegal State Exception if this node or an ancestor has been removed with the the link remove Node method throws Null Pointer Exception if tt key tt is tt null tt see put Double String double see get String String  parseDouble parseDouble NumberFormatException putDouble IllegalStateException removeNode NullPointerException putDouble
Associates a tt String tt object representing the specified tt byte tt with the specified tt key tt in this node The associated tt String tt object the i Base64 i encoding of the tt byte tt as defined in a href http www ietf org rfc rfc2045 txt RFC 2045 a Section 6 8 with one minor change the string will consist solely of characters from the i Base64 Alphabet i it will not contain any newline characters This method is intended for use in conjunction with the link get Byte Array method p Implementor s note it is i not i necessary that the value be represented by a tt String tt type in the backing store If the backing store supports tt byte tt values it is not unreasonable to use them This implementation detail is not visible through the Tt Preferences Tt API which allows the value to be read as an a tt byte tt object with tt get Byte Array tt or a tt String tt object with tt get tt param key tt key tt with which the string form of tt value tt is to be associated param value tt value tt whose string form is to be associated with tt key tt throws Null Pointer Exception if tt key tt or tt value tt is tt null tt throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method see get Byte Array String byte see get String String  getByteArray getByteArray NullPointerException IllegalStateException removeNode getByteArray
Returns the tt byte tt value represented by the tt String tt object associated with the specified tt key tt in this node Valid tt String tt objects are i Base64 i encoded binary data as defined in a href http www ietf org rfc rfc2045 txt RFC 2045 a Section 6 8 with one minor change the string must consist solely of characters from the i Base64 Alphabet i no newline characters or extraneous characters are permitted This method is intended for use in conjunction with the link put Byte Array method p Returns the specified default if there is no value associated with the tt key tt the backing store is inaccessible or if the associated value is not a valid Base64 encoded byte array as defined above param key tt key tt whose associated value is to be returned as a tt byte tt object param def the value to be returned in the event that this node has no value associated with tt key tt or the associated value cannot be interpreted as a tt byte tt type or the backing store is inaccessible return the tt byte tt value represented by the tt String tt object associated with tt key tt in this node or tt def tt if the associated value does not exist or cannot be interpreted as a tt byte tt throws Null Pointer Exception if tt key tt is tt null tt A tt null tt value for tt def tt i is i permitted throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method see get String String see put Byte Array String byte  putByteArray NullPointerException IllegalStateException removeNode putByteArray
Returns all of the keys that have an associated value in this node The returned array will be of size zero if this node has no preferences and not tt null tt return an array of the keys that have an associated value in this node throws Backing Store Exception if this operation cannot be completed due to a failure in the backing store or inability to communicate with it throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method  BackingStoreException IllegalStateException removeNode
Returns the names of the children of this node The returned array will be of size zero if this node has no children and not tt null tt return the names of the children of this node throws Backing Store Exception if this operation cannot be completed due to a failure in the backing store or inability to communicate with it throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method  BackingStoreException IllegalStateException removeNode
Returns the parent of this node or tt null tt if this is the root return the parent of this node throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method  IllegalStateException removeNode
Returns a named tt Preferences tt object node creating it and any of its ancestors if they do not already exist Accepts a relative or absolute pathname Absolute pathnames which begin with tt tt are interpreted relative to the root of this node Relative pathnames which begin with any character other than tt tt are interpreted relative to this node itself The empty string tt tt is a valid relative pathname referring to this node itself p If the returned node did not exist prior to this call this node and any ancestors that were created by this call are not guaranteed to become persistent until the tt flush tt method is called on the returned node or one of its descendants param path Name the path name of the tt Preferences tt object to return return the specified tt Preferences tt object throws Illegal Argument Exception if the path name is invalid throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method throws Null Pointer Exception if path name is tt null tt see flush  pathName IllegalArgumentException IllegalStateException removeNode NullPointerException
Returns true if the named node exists Accepts a relative or absolute pathname Absolute pathnames which begin with tt tt are interpreted relative to the root of this node Relative pathnames which begin with any character other than tt tt are interpreted relative to this node itself The pathname tt tt is valid and refers to this node itself p If this node or an ancestor has already been removed with the link remove Node method it i is i legal to invoke this method but only with the pathname tt tt the invocation will return tt false tt Thus the idiom tt p node Exists tt may be used to test whether tt p tt has been removed param path Name the path name of the node whose existence is to be checked return true if the specified node exists throws Backing Store Exception if this operation cannot be completed due to a failure in the backing store or inability to communicate with it throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method and tt pathname tt is not the empty string tt tt throws Illegal Argument Exception if the path name is invalid i e it contains multiple consecutive slash characters or ends with a slash character and is more than one character long public abstract boolean node Exists String path Name  removeNode nodeExists pathName BackingStoreException IllegalStateException removeNode IllegalArgumentException nodeExists pathName
Removes this node and all of its descendants invalidating any properties contained in the removed nodes Once a node has been removed attempting any method other than tt name tt tt absolute Path tt or tt node Exists tt on the corresponding tt Preferences tt instance will fail with an tt Illegal State Exception tt The methods defined on tt Object tt can still be invoked on a node after it has been removed they will not throw tt Illegal State Exception tt p The removal is not guaranteed to be persistent until the tt flush tt method is called on the parent of this node It is illegal to remove the root node throws Illegal State Exception if this node or an ancestor has already been removed with the link remove Node method throws Runtime Exception if this is a root node throws Backing Store Exception if this operation cannot be completed due to a failure in the backing store or inability to communicate with it see flush public abstract void remove Node  absolutePath nodeExists IllegalStateException IllegalStateException IllegalStateException removeNode RuntimeException BackingStoreException removeNode
Returns this node s name relative to its parent return this node s name relative to its parent 
Returns this node s absolute path name Note that ul li Root node The path name of the root node is tt tt li Slash at end Path names other than that of the root node may not end in slash tt tt li Unusual names tt tt and tt tt have i no i special significance in path names li Illegal names The only illegal path names are those that contain multiple consecutive slashes or that end in slash and are not the root ul return this node s absolute path name 
Forces any changes in the contents of this node and its descendants to the persistent store p Once this method returns successfully it is safe to assume that all changes made in the subtree rooted at this node prior to the method invocation have become permanent p Implementations are free to flush changes into the persistent store at any time They do not need to wait for this method to be called p When a flush occurs on a newly created node it is made persistent as are any ancestors and descendants that have yet to be made persistent Note however that any properties value changes in ancestors are i not i guaranteed to be made persistent throws Backing Store Exception if this operation cannot be completed due to a failure in the backing store or inability to communicate with it throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method see sync  BackingStoreException IllegalStateException removeNode
Ensures that future reads from this node and its descendants reflect any changes that were committed to the persistent store from any VM prior to the tt sync tt invocation As a side effect forces any changes in the contents of this node and its descendants to the persistent store as if the tt flush tt method had been invoked on this node throws Backing Store Exception if this operation cannot be completed due to a failure in the backing store or inability to communicate with it throws Illegal State Exception if this node or an ancestor has been removed with the link remove Node method see flush  BackingStoreException IllegalStateException removeNode

public interface Preferences Service Returns the root system node for the calling bundle public abstract Preferences get System Preferences  PreferencesService getSystemPreferences
Returns the root node for the specified user and the calling bundle 
public abstract Preferences get User Preferences String name Returns the names of users for which node trees exist public abstract String get Users  getUserPreferences getUsers

Return the active start level value of the Framework If the Framework is in the process of changing the start level this method must return the active start level if this differs from the requested start level return The active start level value of the Framework 
Modify the active start level of the Framework p The Framework will move to the requested start level This method will return immediately to the caller and the start level change will occur asynchronously on another thread p If the specified start level is higher than the active start level the Framework will continue to increase the start level until the Framework has reached the specified start level starting bundles at each start level which are persistently marked to be started as described in the tt Bundle start tt method At each intermediate start level value on the way to and including the target start level the framework must ol li Change the active start level to the intermediate start level value li Start bundles at the intermediate start level in ascending order by tt Bundle get Bundle Id tt ol When this process completes after the specified start level is reached the Framework will broadcast a Framework event of type tt Framework Event STARTLEVEL CHANGED tt to announce it has moved to the specified start level p If the specified start level is lower than the active start level the Framework will continue to decrease the start level until the Framework has reached the specified start level stopping bundles at each start level as described in the tt Bundle stop tt method except that their persistently recorded state indicates that they must be restarted in the future At each intermediate start level value on the way to and including the specified start level the framework must ol li Stop bundles at the intermediate start level in descending order by tt Bundle get Bundle Id tt li Change the active start level to the intermediate start level value ol When this process completes after the specified start level is reached the Framework will broadcast a Framework event of type tt Framework Event STARTLEVEL CHANGED tt to announce it has moved to the specified start level p If the specified start level is equal to the active start level then no bundles are started or stopped however the Framework must broadcast a Framework event of type tt Framework Event STARTLEVEL CHANGED tt to announce it has finished moving to the specified start level This event may arrive before the this method return param startlevel The requested start level for the Framework throws Illegal Argument Exception If the specified start level is less than or equal to zero throws Security Exception If the caller does not have the tt Admin Permission tt and the Java runtime environment supports permissions  getBundleId FrameworkEvent STARTLEVEL_CHANGED getBundleId FrameworkEvent STARTLEVEL_CHANGED FrameworkEvent STARTLEVEL_CHANGED IllegalArgumentException SecurityException AdminPermission
Return the assigned start level value for the specified Bundle param bundle The target bundle return The start level value of the specified Bundle exception java lang Illegal Argument Exception If the specified bundle has been uninstalled  IllegalArgumentException
Assign a start level value to the specified Bundle p The specified bundle will be assigned the specified start level The start level value assigned to the bundle will be persistently recorded by the Framework If the new start level for the bundle is lower than or equal to the active start level of the Framework the Framework will start the specified bundle as described in the tt Bundle start tt method if the bundle is persistently marked to be started The actual starting of this bundle must occur asynchronously If the new start level for the bundle is higher than the active start level of the Framework the Framework will stop the specified bundle as described in the tt Bundle stop tt method except that the persistently recorded state for the bundle indicates that the bundle must be restarted in the future The actual stopping of this bundle must occur asynchronously param bundle The target bundle param startlevel The new start level for the specified Bundle throws Illegal Argument Exception If the specified bundle has been uninstalled or if the specified start level is less than or equal to zero or the specified bundle is the system bundle throws Security Exception if the caller does not have the tt Admin Permission tt and the Java runtime environment supports permissions  IllegalArgumentException SecurityException AdminPermission
Return the initial start level value that is assigned to a Bundle when it is first installed return The initial start level value for Bundles see set Initial Bundle Start Level  setInitialBundleStartLevel
Set the initial start level value that is assigned to a Bundle when it is first installed p The initial bundle start level will be set to the specified start level The initial bundle start level value will be persistently recorded by the Framework p When a Bundle is installed via tt Bundle Context install Bundle tt it is assigned the initial bundle start level value p The default initial bundle start level value is 1 unless this method has been called to assign a different initial bundle start level value p Thie method does not change the start level values of installed bundles param startlevel The initial start level for newly installed bundles throws Illegal Argument Exception If the specified start level is less than or equal to zero throws Security Exception if the caller does not have the tt Admin Permission tt and the Java runtime environment supports permissions  BundleContext installBundle IllegalArgumentException SecurityException AdminPermission
Return the persistent state of the specified bundle p This method returns the persistent state of a bundle The persistent state of a bundle indicates whether a bundle is persistently marked to be started when it s start level is reached return tt true tt if the bundle is persistently marked to be started tt false tt if the bundle is not persistently marked to be started exception java lang Illegal Argument Exception If the specified bundle has been uninstalled  IllegalArgumentException

implements URL Stream Handler Service see java net URL Stream Handler open Connection public abstract URL Connection open Connection URL u throws java io IO Exception  URLStreamHandlerService URLStreamHandler openConnection URLConnection openConnection IOException
Parse a URL using the tt URL Stream Handler Setter tt object This method sets the tt real Handler tt field with the specified tt URL Stream Handler Setter tt object and then calls tt parseURL URL String int int tt param real Handler The object on which the tt setURL tt method must be invoked for the specified URL see java net URL Stream Handler parseURL public void parseURL URL Stream Handler Setter real Handler URL u String spec int start int limit this real Handler real Handler parseURL u spec start limit  URLStreamHandlerSetter realHandler URLStreamHandlerSetter realHandler URLStreamHandler URLStreamHandlerSetter realHandler realHandler realHandler
This method calls tt super to External Form tt see java net URL Stream Handler to External Form public String to External Form URL u return super to External Form u  toExternalForm URLStreamHandler toExternalForm toExternalForm toExternalForm
This method calls tt super equals URL URL tt see java net URL Stream Handler equals URL URL public boolean equals URL u1 URL u2 return super equals u1 u2  URLStreamHandler
This method calls tt super get Default Port tt see java net URL Stream Handler get Default Port public int get Default Port return super get Default Port  getDefaultPort URLStreamHandler getDefaultPort getDefaultPort getDefaultPort
This method calls tt super get Host Address tt see java net URL Stream Handler get Host Address public Inet Address get Host Address URL u return super get Host Address u  getHostAddress URLStreamHandler getHostAddress InetAddress getHostAddress getHostAddress
This method calls tt super hash Code URL tt see java net URL Stream Handler hash Code URL public int hash Code URL u return super hash Code u  hashCode URLStreamHandler hashCode hashCode hashCode
This method calls tt super hosts Equal tt see java net URL Stream Handler hosts Equal public boolean hosts Equal URL u1 URL u2 return super hosts Equal u1 u2  hostsEqual URLStreamHandler hostsEqual hostsEqual hostsEqual
This method calls tt super same File tt see java net URL Stream Handler same File public boolean same File URL u1 URL u2 return super same File u1 u2  sameFile URLStreamHandler sameFile sameFile sameFile
This method calls tt real Handler setURL URL String String int String String tt see java net URL Stream Handler setURL URL String String int String String deprecated This method is only for compatibility with handlers written for JDK 1 1 protected void setURL URL u String proto String host int port String file String ref real Handler setURL u proto host port file ref  realHandler URLStreamHandler realHandler
This method calls tt real Handler setURL URL String String int String String String String tt see java net URL Stream Handler setURL URL String String int String String String String protected void setURL URL u String proto String host int port String auth String user String path String query String ref real Handler setURL u proto host port auth user path query ref  realHandler URLStreamHandler realHandler

public interface URL Stream Handler Service see java net URL Stream Handler open Connection public URL Connection open Connection URL u throws java io IO Exception  URLStreamHandlerService URLStreamHandler openConnection URLConnection openConnection IOException
Parse a URL This method is called by the tt URL Stream Handler tt proxy instead of tt java net URL Stream Handler parseURL tt passing a tt URL Stream Handler Setter tt object param real Handler The object on which tt setURL tt must be invoked for this URL see java net URL Stream Handler parseURL public void parseURL URL Stream Handler Setter real Handler  URLStreamHandler URLStreamHandler URLStreamHandlerSetter realHandler URLStreamHandler URLStreamHandlerSetter realHandler
URL u String spec int start int limit see java net URL Stream Handler to External Form public String to External Form URL u  URLStreamHandler toExternalForm toExternalForm
public String to External Form URL u see java net URL Stream Handler equals URL URL public boolean equals URL u1 URL u2  toExternalForm URLStreamHandler
public boolean equals URL u1 URL u2 see java net URL Stream Handler get Default Port public int get Default Port  URLStreamHandler getDefaultPort getDefaultPort
public int get Default Port see java net URL Stream Handler get Host Address public Inet Address get Host Address URL u  getDefaultPort URLStreamHandler getHostAddress InetAddress getHostAddress
public Inet Address get Host Address URL u see java net URL Stream Handler hash Code URL public int hash Code URL u  InetAddress getHostAddress URLStreamHandler hashCode hashCode
public int hash Code URL u see java net URL Stream Handler hosts Equal public boolean hosts Equal URL u1 URL u2  hashCode URLStreamHandler hostsEqual hostsEqual
public boolean hosts Equal URL u1 URL u2 see java net URL Stream Handler same File public boolean same File URL u1 URL u2  hostsEqual URLStreamHandler sameFile sameFile

see java net URL Stream Handler setURL URL String String int String String deprecated This method is only for compatibility with handlers written for JDK 1 1 public void setURL URL u String protocol String host int port String file  URLStreamHandler
see java net URL Stream Handler setURL URL String String int String String String String public void setURL URL u String protocol String host int port String authority String user Info String path String query  URLStreamHandler userInfo

Create a tt Service Tracker tt object on the specified tt Service Reference tt object p The service referenced by the specified tt Service Reference tt object will be tracked by this tt Service Tracker tt object param context tt Bundle Context tt object against which the tracking is done param reference tt Service Reference tt object for the service to be tracked param customizer The customizer object to call when services are added modified or removed in this tt Service Tracker tt object If customizer is tt null tt then this tt Service Tracker tt object will be used as the tt Service Tracker Customizer tt object and the tt Service Tracker tt object will call the tt Service Tracker Customizer tt methods on itself public Service Tracker Bundle Context context Service Reference reference Service Tracker Customizer customizer this context context this track Reference reference this track Class null this customizer customizer null this customizer this listener Filter Constants SERVICE ID reference get Property Constants SERVICE ID to String NON NLS 1 NON NLS 2 NON NLS 3 try this filter context create Filter listener Filter catch Invalid Syntax Exception e we could only get this exception if the Service Reference was invalid throw new Illegal Argument Exception unexpected Invalid Syntax Exception e get Message  ServiceTracker ServiceReference ServiceReference ServiceTracker BundleContext ServiceReference ServiceTracker ServiceTracker ServiceTrackerCustomizer ServiceTracker ServiceTrackerCustomizer ServiceTracker BundleContext ServiceReference ServiceTrackerCustomizer trackReference trackClass listenerFilter SERVICE_ID getProperty SERVICE_ID toString createFilter listenerFilter InvalidSyntaxException ServiceReference IllegalArgumentException InvalidSyntaxException getMessage
Create a tt Service Tracker tt object on the specified class name p Services registered under the specified class name will be tracked by this tt Service Tracker tt object param context tt Bundle Context tt object against which the tracking is done param clazz Class name of the services to be tracked param customizer The customizer object to call when services are added modified or removed in this tt Service Tracker tt object If customizer is tt null tt then this tt Service Tracker tt object will be used as the tt Service Tracker Customizer tt object and the tt Service Tracker tt object will call the tt Service Tracker Customizer tt methods on itself public Service Tracker Bundle Context context String clazz Service Tracker Customizer customizer this context context this track Reference null this track Class clazz this customizer customizer null this customizer this listener Filter Constants OBJECTCLASS clazz to String NON NLS 1 NON NLS 2 NON NLS 3 try this filter context create Filter listener Filter catch Invalid Syntax Exception e we could only get this exception if the clazz argument was malformed throw new Illegal Argument Exception unexpected Invalid Syntax Exception e get Message  ServiceTracker ServiceTracker BundleContext ServiceTracker ServiceTracker ServiceTrackerCustomizer ServiceTracker ServiceTrackerCustomizer ServiceTracker BundleContext ServiceTrackerCustomizer trackReference trackClass listenerFilter toString createFilter listenerFilter InvalidSyntaxException IllegalArgumentException InvalidSyntaxException getMessage
Create a tt Service Tracker tt object on the specified tt Filter tt object p Services which match the specified tt Filter tt object will be tracked by this tt Service Tracker tt object param context tt Bundle Context tt object against which the tracking is done param filter tt Filter tt object to select the services to be tracked param customizer The customizer object to call when services are added modified or removed in this tt Service Tracker tt object If customizer is null then this tt Service Tracker tt object will be used as the tt Service Tracker Customizer tt object and the tt Service Tracker tt object will call the tt Service Tracker Customizer tt methods on itself since 1 1 public Service Tracker Bundle Context context Filter filter Service Tracker Customizer customizer this context context this track Reference null this track Class null this listener Filter null this filter filter this customizer customizer null this customizer if context null filter null we throw a NPE here to be consistent with the other constructors throw new Null Pointer Exception  ServiceTracker ServiceTracker BundleContext ServiceTracker ServiceTracker ServiceTrackerCustomizer ServiceTracker ServiceTrackerCustomizer ServiceTracker BundleContext ServiceTrackerCustomizer trackReference trackClass listenerFilter NullPointerException
Open this tt Service Tracker tt object and begin tracking services p Services which match the search criteria specified when this tt Service Tracker tt object was created are now tracked by this tt Service Tracker tt object throws java lang Illegal State Exception if the tt Bundle Context tt object with which this tt Service Tracker tt object was created is no longer valid public synchronized void open if tracked null return if DEBUG System out println Service Tracker open filter NON NLS 1 tracked new Tracked tracking Count 0 Service Reference references synchronized tracked try context add Service Listener tracked listener Filter if listener Filter null user supplied filter references context get Service References null filter to String else constructor supplied filter if track Class null references new Service Reference track Reference else references context get Service References track Class null catch Invalid Syntax Exception e throw new Runtime Exception unexpected Invalid Syntax Exception e get Message Call tracked outside of synchronized region if references null int length references length for int i 0 i length i Service Reference reference references i if the service is still registered if reference get Bundle null tracked track reference  ServiceTracker ServiceTracker ServiceTracker IllegalStateException BundleContext ServiceTracker ServiceTracker trackingCount ServiceReference addServiceListener listenerFilter listenerFilter getServiceReferences toString trackClass ServiceReference trackReference getServiceReferences trackClass InvalidSyntaxException RuntimeException InvalidSyntaxException getMessage ServiceReference getBundle
Close this tt Service Tracker tt object p This method should be called when this tt Service Tracker tt object should end the tracking of services public synchronized void close if tracked null return if DEBUG System out println Service Tracker close filter NON NLS 1 tracked close Service Reference references get Service References Tracked outgoing tracked tracked null tracking Count 1 try context remove Service Listener outgoing catch Illegal State Exception e In case the context was stopped if references null for int i 0 i references length i outgoing untrack references i if DEBUG if cached Reference null cached Service null System out println Service Tracker close cached cleared filter NON NLS 1  ServiceTracker ServiceTracker ServiceTracker ServiceReference getServiceReferences trackingCount removeServiceListener IllegalStateException cachedReference cachedService ServiceTracker
Default implementation of the tt Service Tracker Customizer adding Service tt method p This method is only called when this tt Service Tracker tt object has been constructed with a tt null Service Tracker Customizer tt argument The default implementation returns the result of calling tt get Service tt on the tt Bundle Context tt object with which this tt Service Tracker tt object was created passing the specified tt Service Reference tt object p This method can be overridden in a subclass to customize the service object to be tracked for the service being added In that case take care not to rely on the default implementation of removed Service that will unget the service param reference Reference to service being added to this tt Service Tracker tt object return The service object to be tracked for the service added to this tt Service Tracker tt object see Service Tracker Customizer public Object adding Service Service Reference reference return context get Service reference  ServiceTrackerCustomizer addingService ServiceTracker ServiceTrackerCustomizer getService BundleContext ServiceTracker ServiceReference removedService ServiceTracker ServiceTracker ServiceTrackerCustomizer addingService ServiceReference getService
Default implementation of the tt Service Tracker Customizer modified Service tt method p This method is only called when this tt Service Tracker tt object has been constructed with a tt null Service Tracker Customizer tt argument The default implementation does nothing param reference Reference to modified service param service The service object for the modified service see Service Tracker Customizer public void modified Service Service Reference reference Object service  ServiceTrackerCustomizer modifiedService ServiceTracker ServiceTrackerCustomizer ServiceTrackerCustomizer modifiedService ServiceReference
Default implementation of the tt Service Tracker Customizer removed Service tt method p This method is only called when this tt Service Tracker tt object has been constructed with a tt null Service Tracker Customizer tt argument The default implementation calls tt unget Service tt on the tt Bundle Context tt object with which this tt Service Tracker tt object was created passing the specified tt Service Reference tt object p This method can be overridden in a subclass If the default implementation of tt adding Service tt method was used this method must unget the service param reference Reference to removed service param service The service object for the removed service see Service Tracker Customizer public void removed Service Service Reference reference Object service context unget Service reference  ServiceTrackerCustomizer removedService ServiceTracker ServiceTrackerCustomizer ungetService BundleContext ServiceTracker ServiceReference addingService ServiceTrackerCustomizer removedService ServiceReference ungetService
Wait for at least one service to be tracked by this tt Service Tracker tt object p It is strongly recommended that tt wait For Service tt is not used during the calling of the tt Bundle Activator tt methods tt Bundle Activator tt methods are expected to complete in a short period of time param timeout time interval in milliseconds to wait If zero the method will wait indefinately return Returns the result of tt get Service tt throws Illegal Argument Exception If the value of timeout is negative public Object wait For Service long timeout throws Interrupted Exception if timeout 0 throw new Illegal Argument Exception timeout value is negative Object object get Service while object null Tracked tracked this tracked use local var since we are not synchronized if tracked null if Service Tracker is not open return null synchronized tracked if tracked size 0 tracked wait timeout object get Service if timeout 0 return object return object  ServiceTracker waitForService BundleActivator BundleActivator getService IllegalArgumentException waitForService InterruptedException IllegalArgumentException getService ServiceTracker getService
Return an array of tt Service Reference tt objects for all services being tracked by this tt Service Tracker tt object return Array of tt Service Reference tt objects or tt null tt if no service are being tracked public Service Reference get Service References Tracked tracked this tracked use local var since we are not synchronized if tracked null if Service Tracker is not open return null synchronized tracked int length tracked size if length 0 return null Service Reference references new Service Reference length Enumeration enum tracked keys for int i 0 i length i references i Service Reference enum next Element return references  ServiceReference ServiceTracker ServiceReference ServiceReference getServiceReferences ServiceTracker ServiceReference ServiceReference ServiceReference nextElement
Returns a tt Service Reference tt object for one of the services being tracked by this tt Service Tracker tt object p If multiple services are being tracked the service with the highest ranking as specified in its tt service ranking tt property is returned p If there is a tie in ranking the service with the lowest service ID as specified in its tt service id tt property that is the service that was registered first is returned p This is the same algorithm used by tt Bundle Context get Service Reference tt return tt Service Reference tt object or tt null tt if no service is being tracked since 1 1 public Service Reference get Service Reference Service Reference reference cached Reference if reference null if DEBUG System out println Service Tracker get Service Reference cached filter NON NLS 1 return reference if DEBUG System out println Service Tracker get Service Reference filter NON NLS 1 Service Reference references get Service References int length references null 0 references length if length 0 if no service is being tracked return null int index 0 if length 1 if more than one service select highest ranking int rankings new int length int count 0 int max Ranking Integer MIN VALUE for int i 0 i length i Object property references i get Property Constants SERVICE RANKING int ranking property instanceof Integer Integer property int Value 0 rankings i ranking if ranking max Ranking index i max Ranking ranking count 1 else if ranking max Ranking count if count 1 if still more than one service select lowest id long min Id Long MAX VALUE for int i 0 i length i if rankings i max Ranking long id Long references i get Property Constants SERVICE ID long Value if id min Id index i min Id id return cached Reference references index  ServiceReference ServiceTracker BundleContext getServiceReference ServiceReference ServiceReference getServiceReference ServiceReference cachedReference ServiceTracker getServiceReference ServiceTracker getServiceReference ServiceReference getServiceReferences maxRanking MIN_VALUE getProperty SERVICE_RANKING intValue maxRanking maxRanking maxRanking minId MAX_VALUE maxRanking getProperty SERVICE_ID longValue minId minId cachedReference
Returns the service object for the specified tt Service Reference tt object if the referenced service is being tracked by this tt Service Tracker tt object param reference Reference to the desired service return Service object or tt null tt if the service referenced by the specified tt Service Reference tt object is not being tracked public Object get Service Service Reference reference Tracked tracked this tracked use local var since we are not synchronized if tracked null if Service Tracker is not open return null synchronized tracked return tracked get reference  ServiceReference ServiceTracker ServiceReference getService ServiceReference ServiceTracker
Return an array of service objects for all services being tracked by this tt Service Tracker tt object return Array of service objects or tt null tt if no service are being tracked public Object get Services Tracked tracked this tracked use local var since we are not synchronized if tracked null if Service Tracker is not open return null synchronized tracked Service Reference references get Service References int length references null 0 references length if length 0 return null Object objects new Object length for int i 0 i length i objects i get Service references i return objects  ServiceTracker getServices ServiceTracker ServiceReference getServiceReferences getService
Returns a service object for one of the services being tracked by this tt Service Tracker tt object p If any services are being tracked this method returns the result of calling tt get Service get Service Reference tt return Service object or tt null tt if no service is being tracked public Object get Service Object service cached Service if service null if DEBUG System out println Service Tracker get Service cached filter NON NLS 1 return service if DEBUG System out println Service Tracker get Service filter NON NLS 1 Service Reference reference get Service Reference if reference null return null return cached Service get Service reference  ServiceTracker getService getServiceReference getService cachedService ServiceTracker getService ServiceTracker getService ServiceReference getServiceReference cachedService getService
Remove a service from this tt Service Tracker tt object The specified service will be removed from this tt Service Tracker tt object If the specified service was being tracked then the tt Service Tracker Customizer removed Service tt method will be called for that service param reference Reference to the service to be removed public void remove Service Reference reference Tracked tracked this tracked use local var since we are not synchronized if tracked null if Service Tracker is not open return tracked untrack reference  ServiceTracker ServiceTracker ServiceTrackerCustomizer removedService ServiceReference ServiceTracker
Return the number of services being tracked by this tt Service Tracker tt object return Number of services being tracked public int size Tracked tracked this tracked use local var since we are not synchronized if tracked null if Service Tracker is not open return 0 return tracked size  ServiceTracker ServiceTracker
Returns the tracking count for this tt Service Tracker tt object The tracking count is initialized to 0 when this tt Service Tracker tt object is opened Every time a service is added or removed from this tt Service Tracker tt object the tracking count is incremented p The tracking count can be used to determine if this tt Service Tracker tt object has added or removed a service by comparing a tracking count value previously collected with the current tracking count value If the value has not changed then no service has been added or removed from this tt Service Tracker tt object since the previous tracking count was collected since 1 2 return The tracking count for this tt Service Tracker tt object or 1 if this tt Service Tracker tt object is not open public int get Tracking Count return tracking Count  ServiceTracker ServiceTracker ServiceTracker ServiceTracker ServiceTracker ServiceTracker ServiceTracker getTrackingCount trackingCount
Called by the Tracked object whenever the set of tracked services is modified Increments the tracking count and clears the cache This method must not be synchronized since it is called by Tracked while Tracked is synchronized We don t want synchronization interactions between the Service Listener thread and the user thread private void modified tracking Count increment modification count cached Reference null clear cached value cached Service null clear cached value if DEBUG System out println Service Tracker modified filter NON NLS 1  ServiceListener trackingCount cachedReference cachedService ServiceTracker
Tracked constructor protected Tracked super closed false adding new Array List 6  ArrayList
Called by the owning tt Service Tracker tt object when it is closed protected void close closed true  ServiceTracker
tt Service Listener tt method for the tt Service Tracker tt class This method must NOT be synchronized to avoid deadlock potential param event tt Service Event tt object from the framework public void service Changed Service Event event Check if we had a delayed call which could happen when we close if closed return Service Reference reference event get Service Reference switch event get Type case Service Event REGISTERED case Service Event MODIFIED if listener Filter null constructor supplied filter track reference If the customizer throws an unchecked exception it is safe to let it propagate else user supplied filter if filter match reference track reference If the customizer throws an unchecked exception it is safe to let it propagate else untrack reference If the customizer throws an unchecked exception it is safe to let it propagate break case Service Event UNREGISTERING untrack reference If the customizer throws an unchecked exception it is safe to let it propagate break  ServiceListener ServiceTracker ServiceEvent serviceChanged ServiceEvent ServiceReference getServiceReference getType ServiceEvent ServiceEvent listenerFilter ServiceEvent
Begin to track the referenced service param reference Reference to a service to be tracked protected void track Service Reference reference Object object synchronized this object this get reference if object null we are already tracking the service if DEBUG System out println Service Tracker Tracked track modified reference NON NLS 1 Call customizer outside of synchronized region customizer modified Service reference object If the customizer throws an unchecked exception it is safe to let it propagate return synchronized this if adding contains reference if this service is already in the process of being added if DEBUG System out println Service Tracker Tracked track already adding reference NON NLS 1 return adding add reference mark this service is being added if DEBUG System out println Service Tracker Tracked track adding reference NON NLS 1 boolean became Untracked false Call customizer outside of synchronized region try object customizer adding Service reference If the customizer throws an unchecked exception it will propagate after the finally finally synchronized this if adding remove reference if the service was not untracked during the customizer callback if object null this put reference object modified increment modification count notify All else became Untracked true The service became untracked during the customizer callback if became Untracked if DEBUG System out println Service Tracker Tracked track removed reference NON NLS 1 Call customizer outside of synchronized region customizer removed Service reference object If the customizer throws an unchecked exception it is safe to let it propagate  ServiceReference ServiceTracker modifiedService ServiceTracker ServiceTracker becameUntracked addingService notifyAll becameUntracked becameUntracked ServiceTracker removedService
Discontinue tracking the referenced service param reference Reference to the tracked service protected void untrack Service Reference reference Object object synchronized this if adding remove reference if the service is in the process of being added if DEBUG System out println Service Tracker Tracked untrack being added reference NON NLS 1 return in case the service is untracked while in the process of adding object this remove reference must remove from tracker before calling customizer callback if object null are we actually tracking the service return modified increment modification count if DEBUG System out println Service Tracker Tracked untrack removed reference NON NLS 1 Call customizer outside of synchronized region customizer removed Service reference object If the customizer throws an unchecked exception it is safe to let it propagate  ServiceReference ServiceTracker ServiceTracker removedService

A service is being added to the tt Service Tracker tt object p This method is called before a service which matched the search parameters of the tt Service Tracker tt object is added to it This method should return the service object to be tracked for this tt Service Reference tt object The returned service object is stored in the tt Service Tracker tt object and is available from the tt get Service tt and tt get Services tt methods param reference Reference to service being added to the tt Service Tracker tt object return The service object to be tracked for the tt Service Reference tt object or tt null tt if the tt Service Reference tt object should not be tracked  ServiceTracker ServiceTracker ServiceReference ServiceTracker getService getServices ServiceTracker ServiceReference ServiceReference
A service tracked by the tt Service Tracker tt object has been modified p This method is called when a service being tracked by the tt Service Tracker tt object has had it properties modified param reference Reference to service that has been modified param service The service object for the modified service  ServiceTracker ServiceTracker
A service tracked by the tt Service Tracker tt object has been removed p This method is called after a service is no longer being tracked by the tt Service Tracker tt object param reference Reference to service that has been removed param service The service object for the removed service  ServiceTracker ServiceTracker

public static final int Pt Z STRING 0x1 Natives public static final native int Pf Decompose Stem ToID byte pksz Stem  Pt_Z_STRING PfDecomposeStemToID pkszStem
Natives public static final native int Pf Decompose Stem ToID byte pksz Stem public static final native int Pf Extent Text PhRect t extent PhPoint t pos int font int str int len  PfDecomposeStemToID pkszStem PfExtentText PhRect_t PhPoint_t
public static final native int Pf Decompose Stem ToID byte pksz Stem public static final native int Pf Extent Text PhRect t extent PhPoint t pos int font int str int len public static final native int Pf Extent Text PhRect t extent PhPoint t pos byte font byte str int len  PfDecomposeStemToID pkszStem PfExtentText PhRect_t PhPoint_t PfExtentText PhRect_t PhPoint_t
public static final native int Pf Extent Text PhRect t extent PhPoint t pos int font int str int len public static final native int Pf Extent Text PhRect t extent PhPoint t pos byte font byte str int len public static final native int Pf Extent Wide Text PhRect t extent PhPoint t pos byte font char str int len  PfExtentText PhRect_t PhPoint_t PfExtentText PhRect_t PhPoint_t PfExtentWideText PhRect_t PhPoint_t
public static final native int Pf Extent Text PhRect t extent PhPoint t pos byte font byte str int len public static final native int Pf Extent Wide Text PhRect t extent PhPoint t pos byte font char str int len public static final native int Pf Font Description int ptsID  PfExtentText PhRect_t PhPoint_t PfExtentWideText PhRect_t PhPoint_t PfFontDescription
public static final native int Pf Extent Wide Text PhRect t extent PhPoint t pos byte font char str int len public static final native int Pf Font Description int ptsID public static final native int Pf Font Flags int ptsID  PfExtentWideText PhRect_t PhPoint_t PfFontDescription PfFontFlags
public static final native int Pf Font Description int ptsID public static final native int Pf Font Flags int ptsID public static final native int Pf Font Size int ptsID  PfFontDescription PfFontFlags PfFontSize
public static final native int Pf Font Flags int ptsID public static final native int Pf Font Size int ptsID public static final native int Pf Free Font int ptsID  PfFontFlags PfFontSize PfFreeFont
public static final native int Pf Font Size int ptsID public static final native int Pf Free Font int ptsID public static final native int Pf Generate Font Name byte pkuc Description int kui Flags int kui Size byte puc Buff  PfFontSize PfFreeFont PfGenerateFontName pkucDescription kuiFlags kuiSize pucBuff
public static final native int Pf Free Font int ptsID public static final native int Pf Generate Font Name byte pkuc Description int kui Flags int kui Size byte puc Buff public static final native int Pf Load Metrics byte font  PfFreeFont PfGenerateFontName pkucDescription kuiFlags kuiSize pucBuff PfLoadMetrics
public static final native int Pf Generate Font Name byte pkuc Description int kui Flags int kui Size byte puc Buff public static final native int Pf Load Metrics byte font public static final native int Pf Query Font Info byte font Font Query Info info  PfGenerateFontName pkucDescription kuiFlags kuiSize pucBuff PfLoadMetrics PfQueryFontInfo FontQueryInfo
public static final native int Pf Load Metrics byte font public static final native int Pf Query Font Info byte font Font Query Info info public static final native int Pf Query Fonts int symbol int flags int list int n  PfLoadMetrics PfQueryFontInfo FontQueryInfo PfQueryFonts
public static final native int Pf Query Font Info byte font Font Query Info info public static final native int Pf Query Fonts int symbol int flags int list int n public static final native void Pg Alpha Off  PfQueryFontInfo FontQueryInfo PfQueryFonts PgAlphaOff
public static final native int Pf Query Fonts int symbol int flags int list int n public static final native void Pg Alpha Off public static final native void Pg Alpha On  PfQueryFonts PgAlphaOff PgAlphaOn
public static final native void Pg Alpha Off public static final native void Pg Alpha On public static final native int Pg CreateGC int size  PgAlphaOff PgAlphaOn PgCreateGC
public static final native void Pg Alpha On public static final native int Pg CreateGC int size public static final native void Pg DestroyGC int GC  PgAlphaOn PgCreateGC PgDestroyGC
public static final native int Pg CreateGC int size public static final native void Pg DestroyGC int GC public static final native int Pg Draw Arc PhPoint t center PhPoint t radii int start int end int flags  PgCreateGC PgDestroyGC PgDrawArc PhPoint_t PhPoint_t
public static final native void Pg DestroyGC int GC public static final native int Pg Draw Arc PhPoint t center PhPoint t radii int start int end int flags public static final native void Pg Draw Arrow PhRect t rect short unknown int color int flags  PgDestroyGC PgDrawArc PhPoint_t PhPoint_t PgDrawArrow PhRect_t
public static final native int Pg Draw Arc PhPoint t center PhPoint t radii int start int end int flags public static final native void Pg Draw Arrow PhRect t rect short unknown int color int flags public static final native int Pg Draw Bitmap int ptr int flags PhPoint t pos PhDim t size int bpl int tag  PgDrawArc PhPoint_t PhPoint_t PgDrawArrow PhRect_t PgDrawBitmap PhPoint_t PhDim_t
public static final native void Pg Draw Arrow PhRect t rect short unknown int color int flags public static final native int Pg Draw Bitmap int ptr int flags PhPoint t pos PhDim t size int bpl int tag public static final native int Pg Draw Ellipse PhPoint t center PhPoint t radii int flags  PgDrawArrow PhRect_t PgDrawBitmap PhPoint_t PhDim_t PgDrawEllipse PhPoint_t PhPoint_t
public static final native int Pg Draw Bitmap int ptr int flags PhPoint t pos PhDim t size int bpl int tag public static final native int Pg Draw Ellipse PhPoint t center PhPoint t radii int flags public static final native int Pg Draw Gradient PhPoint t ul PhPoint t lr int gradient type int transition type int num color pts int color1 int color2 int color3 int color4 int table size byte transition table  PgDrawBitmap PhPoint_t PhDim_t PgDrawEllipse PhPoint_t PhPoint_t PgDrawGradient PhPoint_t PhPoint_t gradient_type transition_type num_color_pts table_size transition_table
public static final native int Pg Draw Ellipse PhPoint t center PhPoint t radii int flags public static final native int Pg Draw Gradient PhPoint t ul PhPoint t lr int gradient type int transition type int num color pts int color1 int color2 int color3 int color4 int table size byte transition table public static final native int Pg DrawI Line int x1 int y1 int x2 int y2  PgDrawEllipse PhPoint_t PhPoint_t PgDrawGradient PhPoint_t PhPoint_t gradient_type transition_type num_color_pts table_size transition_table PgDrawILine
public static final native int Pg Draw Gradient PhPoint t ul PhPoint t lr int gradient type int transition type int num color pts int color1 int color2 int color3 int color4 int table size byte transition table public static final native int Pg DrawI Line int x1 int y1 int x2 int y2 public static final native int Pg DrawI Pixel int x int y  PgDrawGradient PhPoint_t PhPoint_t gradient_type transition_type num_color_pts table_size transition_table PgDrawILine PgDrawIPixel
public static final native int Pg DrawI Line int x1 int y1 int x2 int y2 public static final native int Pg DrawI Pixel int x int y public static final native int Pg DrawI Rect int ulx int uly int lrx int lry int flags  PgDrawILine PgDrawIPixel PgDrawIRect
public static final native int Pg DrawI Pixel int x int y public static final native int Pg DrawI Rect int ulx int uly int lrx int lry int flags public static final native int Pg Draw Image int ptr int type PhPoint t pos PhDim t size int bpl int tag  PgDrawIPixel PgDrawIRect PgDrawImage PhPoint_t PhDim_t
public static final native int Pg DrawI Rect int ulx int uly int lrx int lry int flags public static final native int Pg Draw Image int ptr int type PhPoint t pos PhDim t size int bpl int tag public static final native int Pg Draw Multi Text Area byte text int len PhRect t canvas int text flags int canvas flags int linespacing  PgDrawIRect PgDrawImage PhPoint_t PhDim_t PgDrawMultiTextArea PhRect_t text_flags canvas_flags
public static final native int Pg Draw Image int ptr int type PhPoint t pos PhDim t size int bpl int tag public static final native int Pg Draw Multi Text Area byte text int len PhRect t canvas int text flags int canvas flags int linespacing public static final native int Pg Draw Ph Image Rectmx PhPoint t pos int image PhRect t rect int flags  PgDrawImage PhPoint_t PhDim_t PgDrawMultiTextArea PhRect_t text_flags canvas_flags PgDrawPhImageRectmx PhPoint_t PhRect_t
public static final native int Pg Draw Multi Text Area byte text int len PhRect t canvas int text flags int canvas flags int linespacing public static final native int Pg Draw Ph Image Rectmx PhPoint t pos int image PhRect t rect int flags public static final native int Pg Draw Polygon short ptr int num PhPoint t pos int flags  PgDrawMultiTextArea PhRect_t text_flags canvas_flags PgDrawPhImageRectmx PhPoint_t PhRect_t PgDrawPolygon PhPoint_t
public static final native int Pg Draw Ph Image Rectmx PhPoint t pos int image PhRect t rect int flags public static final native int Pg Draw Polygon short ptr int num PhPoint t pos int flags public static final native int Pg Draw Round Rect PhRect t rect PhPoint t radii int flags  PgDrawPhImageRectmx PhPoint_t PhRect_t PgDrawPolygon PhPoint_t PgDrawRoundRect PhRect_t PhPoint_t
public static final native int Pg Draw Polygon short ptr int num PhPoint t pos int flags public static final native int Pg Draw Round Rect PhRect t rect PhPoint t radii int flags public static final native int Pg DrawT Image int ptr int type PhPoint t pos PhDim t size int bpl int tag int Trans Ptr int TransB Pl  PgDrawPolygon PhPoint_t PgDrawRoundRect PhRect_t PhPoint_t PgDrawTImage PhPoint_t PhDim_t TransPtr TransBPl
public static final native int Pg Draw Round Rect PhRect t rect PhPoint t radii int flags public static final native int Pg DrawT Image int ptr int type PhPoint t pos PhDim t size int bpl int tag int Trans Ptr int TransB Pl public static final native int Pg Draw Text byte ptr int len PhPoint t pos int flags  PgDrawRoundRect PhRect_t PhPoint_t PgDrawTImage PhPoint_t PhDim_t TransPtr TransBPl PgDrawText PhPoint_t
public static final native int Pg DrawT Image int ptr int type PhPoint t pos PhDim t size int bpl int tag int Trans Ptr int TransB Pl public static final native int Pg Draw Text byte ptr int len PhPoint t pos int flags public static final native int Pg Extent Multi Text PhRect t extent PhPoint t pos byte font byte str int n int linespacing  PgDrawTImage PhPoint_t PhDim_t TransPtr TransBPl PgDrawText PhPoint_t PgExtentMultiText PhRect_t PhPoint_t
public static final native int Pg Draw Text byte ptr int len PhPoint t pos int flags public static final native int Pg Extent Multi Text PhRect t extent PhPoint t pos byte font byte str int n int linespacing public static final native int Pg Flush  PgDrawText PhPoint_t PgExtentMultiText PhRect_t PhPoint_t PgFlush
public static final native int Pg Extent Multi Text PhRect t extent PhPoint t pos byte font byte str int n int linespacing public static final native int Pg Flush public static final native int Pg Get Video Mode PgDisplaySettings t settings  PgExtentMultiText PhRect_t PhPoint_t PgFlush PgGetVideoMode PgDisplaySettings_t
public static final native int Pg Flush public static final native int Pg Get Video Mode PgDisplaySettings t settings public static final native int Pg Get Video Mode Info short mode number PgVideoModeInfo t mode info  PgFlush PgGetVideoMode PgDisplaySettings_t PgGetVideoModeInfo mode_number PgVideoModeInfo_t mode_info
public static final native int Pg Get Video Mode PgDisplaySettings t settings public static final native int Pg Get Video Mode Info short mode number PgVideoModeInfo t mode info public static final native int Pg Read Screen PhRect t rect int buffer  PgGetVideoMode PgDisplaySettings_t PgGetVideoModeInfo mode_number PgVideoModeInfo_t mode_info PgReadScreen PhRect_t
public static final native int Pg Get Video Mode Info short mode number PgVideoModeInfo t mode info public static final native int Pg Read Screen PhRect t rect int buffer public static final native int Pg Read Screen Size PhRect t rect  PgGetVideoModeInfo mode_number PgVideoModeInfo_t mode_info PgReadScreen PhRect_t PgReadScreenSize PhRect_t
public static final native int Pg Read Screen PhRect t rect int buffer public static final native int Pg Read Screen Size PhRect t rect public static final native void Pg Set Alpha int alpha op PgMap t src alpha map int src alpha gradient byte src global alpha byte dst global alpha  PgReadScreen PhRect_t PgReadScreenSize PhRect_t PgSetAlpha alpha_op PgMap_t src_alpha_map src_alpha_gradient src_global_alpha dst_global_alpha
public static final native int Pg Read Screen Size PhRect t rect public static final native void Pg Set Alpha int alpha op PgMap t src alpha map int src alpha gradient byte src global alpha byte dst global alpha public static final native void Pg Set Clipping short n int rects  PgReadScreenSize PhRect_t PgSetAlpha alpha_op PgMap_t src_alpha_map src_alpha_gradient src_global_alpha dst_global_alpha PgSetClipping
public static final native void Pg Set Alpha int alpha op PgMap t src alpha map int src alpha gradient byte src global alpha byte dst global alpha public static final native void Pg Set Clipping short n int rects public static final native int Pg Set Draw Buffer Size int cmd buf len  PgSetAlpha alpha_op PgMap_t src_alpha_map src_alpha_gradient src_global_alpha dst_global_alpha PgSetClipping PgSetDrawBufferSize cmd_buf_len
public static final native void Pg Set Clipping short n int rects public static final native int Pg Set Draw Buffer Size int cmd buf len public static final native int Pg Set Draw Mode int mode  PgSetClipping PgSetDrawBufferSize cmd_buf_len PgSetDrawMode
public static final native int Pg Set Draw Buffer Size int cmd buf len public static final native int Pg Set Draw Mode int mode public static final native int Pg Set Fill Color int color  PgSetDrawBufferSize cmd_buf_len PgSetDrawMode PgSetFillColor
public static final native int Pg Set Draw Mode int mode public static final native int Pg Set Fill Color int color public static final native void Pg Set Fill Trans Pat byte pat  PgSetDrawMode PgSetFillColor PgSetFillTransPat
public static final native int Pg Set Fill Color int color public static final native void Pg Set Fill Trans Pat byte pat public static final native void Pg Set Font byte ff  PgSetFillColor PgSetFillTransPat PgSetFont
public static final native void Pg Set Fill Trans Pat byte pat public static final native void Pg Set Font byte ff public static final native int Pg SetGC int GC  PgSetFillTransPat PgSetFont PgSetGC
public static final native void Pg Set Font byte ff public static final native int Pg SetGC int GC public static final native int Pg Set Multi Clip int num int clip list  PgSetFont PgSetGC PgSetMultiClip clip_list
public static final native int Pg SetGC int GC public static final native int Pg Set Multi Clip int num int clip list public static final native int Pg Set Palette int palette int palette id short first color short num colors int flags int tag  PgSetGC PgSetMultiClip clip_list PgSetPalette palette_id first_color num_colors
public static final native int Pg Set Multi Clip int num int clip list public static final native int Pg Set Palette int palette int palette id short first color short num colors int flags int tag public static final native void Pg Set Region int rid  PgSetMultiClip clip_list PgSetPalette palette_id first_color num_colors PgSetRegion
public static final native int Pg Set Palette int palette int palette id short first color short num colors int flags int tag public static final native void Pg Set Region int rid public static final native int Pg Set Stroke Cap int cap  PgSetPalette palette_id first_color num_colors PgSetRegion PgSetStrokeCap
public static final native void Pg Set Region int rid public static final native int Pg Set Stroke Cap int cap public static final native int Pg Set Stroke Color int color  PgSetRegion PgSetStrokeCap PgSetStrokeColor
public static final native int Pg Set Stroke Cap int cap public static final native int Pg Set Stroke Color int color public static final native void Pg Set Stroke Dash byte Dash List int List Len int Dash Scale  PgSetStrokeCap PgSetStrokeColor PgSetStrokeDash DashList ListLen DashScale
public static final native int Pg Set Stroke Color int color public static final native void Pg Set Stroke Dash byte Dash List int List Len int Dash Scale public static final native int Pg Set Stroke Width int width  PgSetStrokeColor PgSetStrokeDash DashList ListLen DashScale PgSetStrokeWidth
public static final native void Pg Set Stroke Dash byte Dash List int List Len int Dash Scale public static final native int Pg Set Stroke Width int width public static final native int Pg Set Text Color int color  PgSetStrokeDash DashList ListLen DashScale PgSetStrokeWidth PgSetTextColor
public static final native int Pg Set Stroke Width int width public static final native int Pg Set Text Color int color public static final native void Pg Set TextXOR Color int frgd int bkgd  PgSetStrokeWidth PgSetTextColor PgSetTextXORColor
public static final native int Pg Set Text Color int color public static final native void Pg Set TextXOR Color int frgd int bkgd public static final native void Pg Set User Clip PhRect t Clip Rect  PgSetTextColor PgSetTextXORColor PgSetUserClip PhRect_t ClipRect
public static final native void Pg Set TextXOR Color int frgd int bkgd public static final native void Pg Set User Clip PhRect t Clip Rect public static final native int Pg Shmem Create int size byte name  PgSetTextXORColor PgSetUserClip PhRect_t ClipRect PgShmemCreate
public static final native void Pg Set User Clip PhRect t Clip Rect public static final native int Pg Shmem Create int size byte name public static final native int Pg Shmem Destroy int addr  PgSetUserClip PhRect_t ClipRect PgShmemCreate PgShmemDestroy
public static final native int Pg Shmem Create int size byte name public static final native int Pg Shmem Destroy int addr public static final native int Ph Add Merge Tiles int tiles int add tiles int added  PgShmemCreate PgShmemDestroy PhAddMergeTiles add_tiles
public static final native int Pg Shmem Destroy int addr public static final native int Ph Add Merge Tiles int tiles int add tiles int added public static final native void Ph Area To Rect PhArea t area PhRect t rect  PgShmemDestroy PhAddMergeTiles add_tiles PhAreaToRect PhArea_t PhRect_t
public static final native int Ph Add Merge Tiles int tiles int add tiles int added public static final native void Ph Area To Rect PhArea t area PhRect t rect public static final native void Ph Blit int rid PhRect t rect PhPoint t offset  PhAddMergeTiles add_tiles PhAreaToRect PhArea_t PhRect_t PhBlit PhRect_t PhPoint_t
public static final native void Ph Area To Rect PhArea t area PhRect t rect public static final native void Ph Blit int rid PhRect t rect PhPoint t offset public static final native int Ph Clip Tilings int tiles int clip tiles int intersection  PhAreaToRect PhArea_t PhRect_t PhBlit PhRect_t PhPoint_t PhClipTilings clip_tiles
public static final native void Ph Blit int rid PhRect t rect PhPoint t offset public static final native int Ph Clip Tilings int tiles int clip tiles int intersection public static final native int Ph Clipboard Copy short ig int n byte clip  PhBlit PhRect_t PhPoint_t PhClipTilings clip_tiles PhClipboardCopy
public static final native int Ph Clip Tilings int tiles int clip tiles int intersection public static final native int Ph Clipboard Copy short ig int n byte clip public static final native int Ph Clipboard Copy String short ig byte string  PhClipTilings clip_tiles PhClipboardCopy PhClipboardCopyString
public static final native int Ph Clipboard Copy short ig int n byte clip public static final native int Ph Clipboard Copy String short ig byte string public static final native void Ph Clipboard Paste Finish int cbdata  PhClipboardCopy PhClipboardCopyString PhClipboardPasteFinish
public static final native int Ph Clipboard Copy String short ig byte string public static final native void Ph Clipboard Paste Finish int cbdata public static final native int Ph Clipboard Paste Start short ig  PhClipboardCopyString PhClipboardPasteFinish PhClipboardPasteStart
public static final native void Ph Clipboard Paste Finish int cbdata public static final native int Ph Clipboard Paste Start short ig public static final native int Ph Clipboard Paste String short ig  PhClipboardPasteFinish PhClipboardPasteStart PhClipboardPasteString
public static final native int Ph Clipboard Paste Start short ig public static final native int Ph Clipboard Paste String short ig public static final native int Ph Clipboard Paste Type int cbdata byte type  PhClipboardPasteStart PhClipboardPasteString PhClipboardPasteType
public static final native int Ph Clipboard Paste String short ig public static final native int Ph Clipboard Paste Type int cbdata byte type public static final native int Ph Clipboard Paste TypeN int cbdata int n  PhClipboardPasteString PhClipboardPasteType PhClipboardPasteTypeN
public static final native int Ph Clipboard Paste Type int cbdata byte type public static final native int Ph Clipboard Paste TypeN int cbdata int n public static final native int Ph Coalesce Tiles int tiles  PhClipboardPasteType PhClipboardPasteTypeN PhCoalesceTiles
public static final native int Ph Clipboard Paste TypeN int cbdata int n public static final native int Ph Coalesce Tiles int tiles public static final native int Ph Copy Tiles int tile  PhClipboardPasteTypeN PhCoalesceTiles PhCopyTiles
public static final native int Ph Coalesce Tiles int tiles public static final native int Ph Copy Tiles int tile public static final native int Ph Create Image PhImage t buffer short width short height int type int palette int ncolors int shmem  PhCoalesceTiles PhCopyTiles PhCreateImage PhImage_t
public static final native int Ph Copy Tiles int tile public static final native int Ph Create Image PhImage t buffer short width short height int type int palette int ncolors int shmem public static final native int PhDC Set Current int draw context  PhCopyTiles PhCreateImage PhImage_t PhDCSetCurrent draw_context
public static final native int Ph Create Image PhImage t buffer short width short height int type int palette int ncolors int shmem public static final native int PhDC Set Current int draw context public static final native int Ph De Translate Tiles int tile int point subtract  PhCreateImage PhImage_t PhDCSetCurrent draw_context PhDeTranslateTiles point_subtract
public static final native int PhDC Set Current int draw context public static final native int Ph De Translate Tiles int tile int point subtract public static final native int Ph Event Next int buffer int size  PhDCSetCurrent draw_context PhDeTranslateTiles point_subtract PhEventNext
public static final native int Ph De Translate Tiles int tile int point subtract public static final native int Ph Event Next int buffer int size public static final native int Ph Event Peek int buffer int size  PhDeTranslateTiles point_subtract PhEventNext PhEventPeek
public static final native int Ph Event Next int buffer int size public static final native int Ph Event Peek int buffer int size public static final native void Ph Free Tiles int tiles  PhEventNext PhEventPeek PhFreeTiles
public static final native int Ph Event Peek int buffer int size public static final native void Ph Free Tiles int tiles public static final native int Ph Get Data int event  PhEventPeek PhFreeTiles PhGetData
public static final native void Ph Free Tiles int tiles public static final native int Ph Get Data int event public static final native int Ph Get Msg Size int event buf  PhFreeTiles PhGetData PhGetMsgSize event_buf
public static final native int Ph Get Data int event public static final native int Ph Get Msg Size int event buf public static final native int Ph Get Rects int event  PhGetData PhGetMsgSize event_buf PhGetRects
public static final native int Ph Get Msg Size int event buf public static final native int Ph Get Rects int event public static final native int Ph Get Tile  PhGetMsgSize event_buf PhGetRects PhGetTile
public static final native int Ph Get Rects int event public static final native int Ph Get Tile public static final native int Ph Init Drag int rid int flags PhRect t rect PhRect t boundary int input group PhDim t min PhDim t max PhDim t step PhPoint t ptrpos short cursor  PhGetRects PhGetTile PhInitDrag PhRect_t PhRect_t input_group PhDim_t PhDim_t PhDim_t PhPoint_t
public static final native int Ph Get Tile public static final native int Ph Init Drag int rid int flags PhRect t rect PhRect t boundary int input group PhDim t min PhDim t max PhDim t step PhPoint t ptrpos short cursor public static final native int Ph Input Group int event  PhGetTile PhInitDrag PhRect_t PhRect_t input_group PhDim_t PhDim_t PhDim_t PhPoint_t PhInputGroup
public static final native int Ph Init Drag int rid int flags PhRect t rect PhRect t boundary int input group PhDim t min PhDim t max PhDim t step PhPoint t ptrpos short cursor public static final native int Ph Input Group int event public static final native int Ph Intersect Tilings int tile1 int tile2 short num intersect tiles  PhInitDrag PhRect_t PhRect_t input_group PhDim_t PhDim_t PhDim_t PhPoint_t PhInputGroup PhIntersectTilings num_intersect_tiles
public static final native int Ph Input Group int event public static final native int Ph Intersect Tilings int tile1 int tile2 short num intersect tiles public static final native int Ph Key To Mb byte buffer PhKeyEvent t keyevent  PhInputGroup PhIntersectTilings num_intersect_tiles PhKeyToMb PhKeyEvent_t
public static final native int Ph Intersect Tilings int tile1 int tile2 short num intersect tiles public static final native int Ph Key To Mb byte buffer PhKeyEvent t keyevent public static final native int Ph Make Ghost Bitmap int image  PhIntersectTilings num_intersect_tiles PhKeyToMb PhKeyEvent_t PhMakeGhostBitmap
public static final native int Ph Key To Mb byte buffer PhKeyEvent t keyevent public static final native int Ph Make Ghost Bitmap int image public static final native int Ph Make Trans Bitmap int image int trans color  PhKeyToMb PhKeyEvent_t PhMakeGhostBitmap PhMakeTransBitmap trans_color
public static final native int Ph Make Ghost Bitmap int image public static final native int Ph Make Trans Bitmap int image int trans color public static final native int Ph Merge Tiles int tiles  PhMakeGhostBitmap PhMakeTransBitmap trans_color PhMergeTiles
public static final native int Ph Make Trans Bitmap int image int trans color public static final native int Ph Merge Tiles int tiles public static final native void Ph Move Cursor Abs int input group int x int y  PhMakeTransBitmap trans_color PhMergeTiles PhMoveCursorAbs input_group
public static final native int Ph Merge Tiles int tiles public static final native void Ph Move Cursor Abs int input group int x int y public static final native int Ph Query Cursor short ig PhCursorInfo t buf  PhMergeTiles PhMoveCursorAbs input_group PhQueryCursor PhCursorInfo_t
public static final native void Ph Move Cursor Abs int input group int x int y public static final native int Ph Query Cursor short ig PhCursorInfo t buf public static final native int Ph Query Rids int flags int rid int input group int type int sense int emitter PhRect t rect int rids int num  PhMoveCursorAbs input_group PhQueryCursor PhCursorInfo_t PhQueryRids input_group PhRect_t
public static final native int Ph Query Cursor short ig PhCursorInfo t buf public static final native int Ph Query Rids int flags int rid int input group int type int sense int emitter PhRect t rect int rids int num public static final native int Ph Rect Intersect int rect1 int rect2  PhQueryCursor PhCursorInfo_t PhQueryRids input_group PhRect_t PhRectIntersect
public static final native int Ph Query Rids int flags int rid int input group int type int sense int emitter PhRect t rect int rids int num public static final native int Ph Rect Intersect int rect1 int rect2 public static final native int Ph Rect Union int rect1 int rect2  PhQueryRids input_group PhRect_t PhRectIntersect PhRectUnion
public static final native int Ph Rect Intersect int rect1 int rect2 public static final native int Ph Rect Union int rect1 int rect2 public static final native int Ph Rect Union PhRect t rect1 PhRect t rect2  PhRectIntersect PhRectUnion PhRectUnion PhRect_t PhRect_t
public static final native int Ph Rect Union int rect1 int rect2 public static final native int Ph Rect Union PhRect t rect1 PhRect t rect2 public static final native int Ph Rects To Tiles int rects int num rects  PhRectUnion PhRectUnion PhRect_t PhRect_t PhRectsToTiles num_rects
public static final native int Ph Rect Union PhRect t rect1 PhRect t rect2 public static final native int Ph Rects To Tiles int rects int num rects public static final native int Ph Region Query int rid PhRegion t region PhRect t rect int data int data len  PhRectUnion PhRect_t PhRect_t PhRectsToTiles num_rects PhRegionQuery PhRegion_t PhRect_t data_len
public static final native int Ph Rects To Tiles int rects int num rects public static final native int Ph Region Query int rid PhRegion t region PhRect t rect int data int data len public static final native void Ph Release Image int image  PhRectsToTiles num_rects PhRegionQuery PhRegion_t PhRect_t data_len PhReleaseImage
public static final native int Ph Region Query int rid PhRegion t region PhRect t rect int data int data len public static final native void Ph Release Image int image public static final native int Ph Sort Tiles int tiles  PhRegionQuery PhRegion_t PhRect_t data_len PhReleaseImage PhSortTiles
public static final native void Ph Release Image int image public static final native int Ph Sort Tiles int tiles public static final native int Ph Tiles To Rects int tiles int num rects  PhReleaseImage PhSortTiles PhTilesToRects num_rects
public static final native int Ph Sort Tiles int tiles public static final native int Ph Tiles To Rects int tiles int num rects public static final native int Ph Translate Tiles int tile PhPoint t point add  PhSortTiles PhTilesToRects num_rects PhTranslateTiles PhPoint_t point_add
public static final native int Ph Tiles To Rects int tiles int num rects public static final native int Ph Translate Tiles int tile PhPoint t point add public static final native int Ph Window Query Visible int flag int rid int input group PhRect t rect  PhTilesToRects num_rects PhTranslateTiles PhPoint_t point_add PhWindowQueryVisible input_group PhRect_t
public static final native int Ph Translate Tiles int tile PhPoint t point add public static final native int Ph Window Query Visible int flag int rid int input group PhRect t rect public static final native int Pi Crop Image int image PhRect t bounds int flags  PhTranslateTiles PhPoint_t point_add PhWindowQueryVisible input_group PhRect_t PiCropImage PhRect_t
public static final native int Ph Window Query Visible int flag int rid int input group PhRect t rect public static final native int Pi Crop Image int image PhRect t bounds int flags public static final native int Pi Duplicate Image int image int flags  PhWindowQueryVisible input_group PhRect_t PiCropImage PhRect_t PiDuplicateImage
public static final native int Pi Crop Image int image PhRect t bounds int flags public static final native int Pi Duplicate Image int image int flags public static final native int Pm Mem CreateMC int image PhDim t dim PhPoint t translation  PiCropImage PhRect_t PiDuplicateImage PmMemCreateMC PhDim_t PhPoint_t
public static final native int Pi Duplicate Image int image int flags public static final native int Pm Mem CreateMC int image PhDim t dim PhPoint t translation public static final native int Pm Mem Flush int mc int image  PiDuplicateImage PmMemCreateMC PhDim_t PhPoint_t PmMemFlush
public static final native int Pm Mem CreateMC int image PhDim t dim PhPoint t translation public static final native int Pm Mem Flush int mc int image public static final native void Pm Mem ReleaseMC int mc  PmMemCreateMC PhDim_t PhPoint_t PmMemFlush PmMemReleaseMC
public static final native int Pm Mem Flush int mc int image public static final native void Pm Mem ReleaseMC int mc public static final native int Pm Mem Start int mc  PmMemFlush PmMemReleaseMC PmMemStart
public static final native void Pm Mem ReleaseMC int mc public static final native int Pm Mem Start int mc public static final native int Pm Mem Stop int mc  PmMemReleaseMC PmMemStart PmMemStop
public static final native int Pm Mem Start int mc public static final native int Pm Mem Stop int mc public static final native void Pt Add Callback int widget int callback type int callback int data  PmMemStart PmMemStop PtAddCallback callback_type
public static final native int Pm Mem Stop int mc public static final native void Pt Add Callback int widget int callback type int callback int data public static final native void Pt Add Event Handler int widget int event mask int callback int data  PmMemStop PtAddCallback callback_type PtAddEventHandler event_mask
public static final native void Pt Add Callback int widget int callback type int callback int data public static final native void Pt Add Event Handler int widget int event mask int callback int data public static final native void Pt Add Filter Callback int widget int event mask int callback int data  PtAddCallback callback_type PtAddEventHandler event_mask PtAddFilterCallback event_mask
public static final native void Pt Add Event Handler int widget int event mask int callback int data public static final native void Pt Add Filter Callback int widget int event mask int callback int data public static final native void Pt Add Hotkey Handler int widget int key sym cap int key mods short flags int data int callback  PtAddEventHandler event_mask PtAddFilterCallback event_mask PtAddHotkeyHandler key_sym_cap key_mods
public static final native void Pt Add Filter Callback int widget int event mask int callback int data public static final native void Pt Add Hotkey Handler int widget int key sym cap int key mods short flags int data int callback public static final native int Pt Alert int parent PhPoint t location byte title int image byte message byte msg Font int btn Count int buttons int btn Fonts int def Btn int esc Btn int flags  PtAddFilterCallback event_mask PtAddHotkeyHandler key_sym_cap key_mods PtAlert PhPoint_t msgFont btnCount btnFonts defBtn escBtn
public static final native void Pt Add Hotkey Handler int widget int key sym cap int key mods short flags int data int callback public static final native int Pt Alert int parent PhPoint t location byte title int image byte message byte msg Font int btn Count int buttons int btn Fonts int def Btn int esc Btn int flags public static final native int Pt App Add Input int app context int pid int input func int data  PtAddHotkeyHandler key_sym_cap key_mods PtAlert PhPoint_t msgFont btnCount btnFonts defBtn escBtn PtAppAddInput app_context input_func
public static final native int Pt Alert int parent PhPoint t location byte title int image byte message byte msg Font int btn Count int buttons int btn Fonts int def Btn int esc Btn int flags public static final native int Pt App Add Input int app context int pid int input func int data public static final native int Pt App Add Work Proc int app context int work func int data  PtAlert PhPoint_t msgFont btnCount btnFonts defBtn escBtn PtAppAddInput app_context input_func PtAppAddWorkProc app_context work_func
public static final native int Pt App Add Input int app context int pid int input func int data public static final native int Pt App Add Work Proc int app context int work func int data public static final native int Pt App Create Pulse int app int priority  PtAppAddInput app_context input_func PtAppAddWorkProc app_context work_func PtAppCreatePulse
public static final native int Pt App Add Work Proc int app context int work func int data public static final native int Pt App Create Pulse int app int priority public static final native int Pt App Delete Pulse int app int pulse pid  PtAppAddWorkProc app_context work_func PtAppCreatePulse PtAppDeletePulse pulse_pid
public static final native int Pt App Create Pulse int app int priority public static final native int Pt App Delete Pulse int app int pulse pid public static final native void Pt App Process Event int app context  PtAppCreatePulse PtAppDeletePulse pulse_pid PtAppProcessEvent app_context
public static final native int Pt App Delete Pulse int app int pulse pid public static final native void Pt App Process Event int app context public static final native int Pt App Pulse Trigger int app int pulse  PtAppDeletePulse pulse_pid PtAppProcessEvent app_context PtAppPulseTrigger
public static final native void Pt App Process Event int app context public static final native int Pt App Pulse Trigger int app int pulse public static final native void Pt App Remove Input int app context int input id  PtAppProcessEvent app_context PtAppPulseTrigger PtAppRemoveInput app_context input_id
public static final native int Pt App Pulse Trigger int app int pulse public static final native void Pt App Remove Input int app context int input id public static final native void Pt App Remove Work Proc int app context int WorkProc id  PtAppPulseTrigger PtAppRemoveInput app_context input_id PtAppRemoveWorkProc app_context WorkProc_id
public static final native void Pt App Remove Input int app context int input id public static final native void Pt App Remove Work Proc int app context int WorkProc id public static final native int Pt Beep  PtAppRemoveInput app_context input_id PtAppRemoveWorkProc app_context WorkProc_id PtBeep
public static final native void Pt App Remove Work Proc int app context int WorkProc id public static final native int Pt Beep public static final native int Pt Blit int widget PhRect t source PhPoint t delta  PtAppRemoveWorkProc app_context WorkProc_id PtBeep PtBlit PhRect_t PhPoint_t
public static final native int Pt Beep public static final native int Pt Blit int widget PhRect t source PhPoint t delta public static final native int Pt Block All Windows int skip short cursor int cursor color  PtBeep PtBlit PhRect_t PhPoint_t PtBlockAllWindows cursor_color
public static final native int Pt Blit int widget PhRect t source PhPoint t delta public static final native int Pt Block All Windows int skip short cursor int cursor color public static final native int Pt Block Window int window short cursor int cursor color  PtBlit PhRect_t PhPoint_t PtBlockAllWindows cursor_color PtBlockWindow cursor_color
public static final native int Pt Block All Windows int skip short cursor int cursor color public static final native int Pt Block Window int window short cursor int cursor color public static final native int Pt Button  PtBlockAllWindows cursor_color PtBlockWindow cursor_color PtButton
public static final native int Pt Block Window int window short cursor int cursor color public static final native int Pt Button public static final native void Pt Calc Border int widget PhRect t rect  PtBlockWindow cursor_color PtButton PtCalcBorder PhRect_t
public static final native int Pt Button public static final native void Pt Calc Border int widget PhRect t rect public static final native int Pt Calc Canvas int widget PhRect t canvas rect  PtButton PtCalcBorder PhRect_t PtCalcCanvas PhRect_t canvas_rect
public static final native void Pt Calc Border int widget PhRect t rect public static final native int Pt Calc Canvas int widget PhRect t canvas rect public static final native int Pt Clipped Blit int widget int src PhPoint t delta int clip  PtCalcBorder PhRect_t PtCalcCanvas PhRect_t canvas_rect PtClippedBlit PhPoint_t
public static final native int Pt Calc Canvas int widget PhRect t canvas rect public static final native int Pt Clipped Blit int widget int src PhPoint t delta int clip public static final native int Pt Color Select int parent byte title PtColorSelectInfo t info  PtCalcCanvas PhRect_t canvas_rect PtClippedBlit PhPoint_t PtColorSelect PtColorSelectInfo_t
public static final native int Pt Clipped Blit int widget int src PhPoint t delta int clip public static final native int Pt Color Select int parent byte title PtColorSelectInfo t info public static final native int Pt Combo Box  PtClippedBlit PhPoint_t PtColorSelect PtColorSelectInfo_t PtComboBox
public static final native int Pt Color Select int parent byte title PtColorSelectInfo t info public static final native int Pt Combo Box public static final native int Pt Container  PtColorSelect PtColorSelectInfo_t PtComboBox PtContainer
public static final native int Pt Combo Box public static final native int Pt Container public static final native int Pt Container Find Focus int family member  PtComboBox PtContainer PtContainerFindFocus family_member
public static final native int Pt Container public static final native int Pt Container Find Focus int family member public static final native int Pt Container Focus Next int widget PhEvent t event  PtContainer PtContainerFindFocus family_member PtContainerFocusNext PhEvent_t
public static final native int Pt Container Find Focus int family member public static final native int Pt Container Focus Next int widget PhEvent t event public static final native int Pt Container Focus Prev int widget PhEvent t event  PtContainerFindFocus family_member PtContainerFocusNext PhEvent_t PtContainerFocusPrev PhEvent_t
public static final native int Pt Container Focus Next int widget PhEvent t event public static final native int Pt Container Focus Prev int widget PhEvent t event public static final native int Pt Container Give Focus int widget PhEvent t event  PtContainerFocusNext PhEvent_t PtContainerFocusPrev PhEvent_t PtContainerGiveFocus PhEvent_t
public static final native int Pt Container Focus Prev int widget PhEvent t event public static final native int Pt Container Give Focus int widget PhEvent t event public static final native int Pt Container Hold int container widget  PtContainerFocusPrev PhEvent_t PtContainerGiveFocus PhEvent_t PtContainerHold container_widget
public static final native int Pt Container Give Focus int widget PhEvent t event public static final native int Pt Container Hold int container widget public static final native int Pt Container Release int container widget  PtContainerGiveFocus PhEvent_t PtContainerHold container_widget PtContainerRelease container_widget
public static final native int Pt Container Hold int container widget public static final native int Pt Container Release int container widget public static final native int Pt Create App Context  PtContainerHold container_widget PtContainerRelease container_widget PtCreateAppContext
public static final native int Pt Container Release int container widget public static final native int Pt Create App Context public static final native int Pt Create Widget int clazz int parent int n args int args  PtContainerRelease container_widget PtCreateAppContext PtCreateWidget n_args
public static final native int Pt Create App Context public static final native int Pt Create Widget int clazz int parent int n args int args public static final native int Pt Create Widget Class int superclass ref int size int num args int arg  PtCreateAppContext PtCreateWidget n_args PtCreateWidgetClass superclass_ref num_args
public static final native int Pt Create Widget int clazz int parent int n args int args public static final native int Pt Create Widget Class int superclass ref int size int num args int arg public static final native int Pt Damage Extent int widget PhRect t extent  PtCreateWidget n_args PtCreateWidgetClass superclass_ref num_args PtDamageExtent PhRect_t
public static final native int Pt Create Widget Class int superclass ref int size int num args int arg public static final native int Pt Damage Extent int widget PhRect t extent public static final native int Pt Damage Widget int widget  PtCreateWidgetClass superclass_ref num_args PtDamageExtent PhRect_t PtDamageWidget
public static final native int Pt Damage Extent int widget PhRect t extent public static final native int Pt Damage Widget int widget public static final native int Pt Destroy Widget int widget  PtDamageExtent PhRect_t PtDamageWidget PtDestroyWidget
public static final native int Pt Damage Widget int widget public static final native int Pt Destroy Widget int widget public static final native int Pt Disjoint  PtDamageWidget PtDestroyWidget PtDisjoint
public static final native int Pt Destroy Widget int widget public static final native int Pt Disjoint public static final native int Pt Enter int flags  PtDestroyWidget PtDisjoint PtEnter
public static final native int Pt Disjoint public static final native int Pt Enter int flags public static final native int Pt Event Handler int event  PtDisjoint PtEnter PtEventHandler
public static final native int Pt Enter int flags public static final native int Pt Event Handler int event public static final native int Pt Extent Widget int widget  PtEnter PtEventHandler PtExtentWidget
public static final native int Pt Event Handler int event public static final native int Pt Extent Widget int widget public static final native int Pt Extent Widget Family int widget  PtEventHandler PtExtentWidget PtExtentWidgetFamily
public static final native int Pt Extent Widget int widget public static final native int Pt Extent Widget Family int widget public static final native int Pt File Selection int parent PhPoint t pos byte title byte root dir byte file spec byte btn1 byte btn2 byte format PtFileSelectionInfo t info int flags  PtExtentWidget PtExtentWidgetFamily PtFileSelection PhPoint_t root_dir file_spec PtFileSelectionInfo_t
public static final native int Pt Extent Widget Family int widget public static final native int Pt File Selection int parent PhPoint t pos byte title byte root dir byte file spec byte btn1 byte btn2 byte format PtFileSelectionInfo t info int flags public static final native int Pt Find Disjoint int widget  PtExtentWidgetFamily PtFileSelection PhPoint_t root_dir file_spec PtFileSelectionInfo_t PtFindDisjoint
public static final native int Pt File Selection int parent PhPoint t pos byte title byte root dir byte file spec byte btn1 byte btn2 byte format PtFileSelectionInfo t info int flags public static final native int Pt Find Disjoint int widget public static final native int Pt Flush  PtFileSelection PhPoint_t root_dir file_spec PtFileSelectionInfo_t PtFindDisjoint PtFlush
public static final native int Pt Find Disjoint int widget public static final native int Pt Flush public static final native int Pt Font Selection int parent PhPoint t pos byte title byte font int symbol int flags byte sample  PtFindDisjoint PtFlush PtFontSelection PhPoint_t
public static final native int Pt Flush public static final native int Pt Font Selection int parent PhPoint t pos byte title byte font int symbol int flags byte sample public static final native int Pt Forward Window Event PhWindowEvent t event  PtFlush PtFontSelection PhPoint_t PtForwardWindowEvent PhWindowEvent_t
public static final native int Pt Font Selection int parent PhPoint t pos byte title byte font int symbol int flags byte sample public static final native int Pt Forward Window Event PhWindowEvent t event public static final native void Pt Frame Size int widget int border width int left border int top border int right border int bottom border  PtFontSelection PhPoint_t PtForwardWindowEvent PhWindowEvent_t PtFrameSize border_width left_border top_border right_border bottom_border
public static final native int Pt Forward Window Event PhWindowEvent t event public static final native void Pt Frame Size int widget int border width int left border int top border int right border int bottom border public static final native void Pt Get Abs Position int widget short x short y  PtForwardWindowEvent PhWindowEvent_t PtFrameSize border_width left_border top_border right_border bottom_border PtGetAbsPosition
public static final native void Pt Frame Size int widget int border width int left border int top border int right border int bottom border public static final native void Pt Get Abs Position int widget short x short y public static final native int Pt Get Resources int widget int n args int args  PtFrameSize border_width left_border top_border right_border bottom_border PtGetAbsPosition PtGetResources n_args
public static final native void Pt Get Abs Position int widget short x short y public static final native int Pt Get Resources int widget int n args int args public static final native int Pt Global Focus Next int widget PhEvent t event  PtGetAbsPosition PtGetResources n_args PtGlobalFocusNext PhEvent_t
public static final native int Pt Get Resources int widget int n args int args public static final native int Pt Global Focus Next int widget PhEvent t event public static final native int Pt Global Focus Next Container int widget PhEvent t event  PtGetResources n_args PtGlobalFocusNext PhEvent_t PtGlobalFocusNextContainer PhEvent_t
public static final native int Pt Global Focus Next int widget PhEvent t event public static final native int Pt Global Focus Next Container int widget PhEvent t event public static final native int Pt Global Focus Prev int widget PhEvent t event  PtGlobalFocusNext PhEvent_t PtGlobalFocusNextContainer PhEvent_t PtGlobalFocusPrev PhEvent_t
public static final native int Pt Global Focus Next Container int widget PhEvent t event public static final native int Pt Global Focus Prev int widget PhEvent t event public static final native int Pt Global Focus Prev Container int widget PhEvent t event  PtGlobalFocusNextContainer PhEvent_t PtGlobalFocusPrev PhEvent_t PtGlobalFocusPrevContainer PhEvent_t
public static final native int Pt Global Focus Prev int widget PhEvent t event public static final native int Pt Global Focus Prev Container int widget PhEvent t event public static final native int Pt Group  PtGlobalFocusPrev PhEvent_t PtGlobalFocusPrevContainer PhEvent_t PtGroup
public static final native int Pt Global Focus Prev Container int widget PhEvent t event public static final native int Pt Group public static final native int Pt Hit int container int n PhRect t rect  PtGlobalFocusPrevContainer PhEvent_t PtGroup PtHit PhRect_t
public static final native int Pt Group public static final native int Pt Hit int container int n PhRect t rect public static final native int Pt Hold  PtGroup PtHit PhRect_t PtHold
public static final native int Pt Hit int container int n PhRect t rect public static final native int Pt Hold public static final native int Pt Inflate Balloon int win int me int position byte string byte font int fill int text color  PtHit PhRect_t PtHold PtInflateBalloon text_color
public static final native int Pt Hold public static final native int Pt Inflate Balloon int win int me int position byte string byte font int fill int text color public static final native int Pt Init byte name  PtHold PtInflateBalloon text_color PtInit
public static final native int Pt Inflate Balloon int win int me int position byte string byte font int fill int text color public static final native int Pt Init byte name public static final native int Pt Is Focused int widget  PtInflateBalloon text_color PtInit PtIsFocused
public static final native int Pt Init byte name public static final native int Pt Is Focused int widget public static final native int Pt Label  PtInit PtIsFocused PtLabel
public static final native int Pt Is Focused int widget public static final native int Pt Label public static final native int Pt Leave int flags  PtIsFocused PtLabel PtLeave
public static final native int Pt Label public static final native int Pt Leave int flags public static final native int Pt List  PtLabel PtLeave PtList
public static final native int Pt Leave int flags public static final native int Pt List public static final native int Pt List Add Items int widget int items int item count int position  PtLeave PtList PtListAddItems item_count
public static final native int Pt List public static final native int Pt List Add Items int widget int items int item count int position public static final native int Pt List Delete All Items int widget  PtList PtListAddItems item_count PtListDeleteAllItems
public static final native int Pt List Add Items int widget int items int item count int position public static final native int Pt List Delete All Items int widget public static final native int Pt List Delete Item Pos int widget int item count int position  PtListAddItems item_count PtListDeleteAllItems PtListDeleteItemPos item_count
public static final native int Pt List Delete All Items int widget public static final native int Pt List Delete Item Pos int widget int item count int position public static final native void Pt List Goto Pos int widget int pos  PtListDeleteAllItems PtListDeleteItemPos item_count PtListGotoPos
public static final native int Pt List Delete Item Pos int widget int item count int position public static final native void Pt List Goto Pos int widget int pos public static final native int Pt List Item Pos int widget byte item  PtListDeleteItemPos item_count PtListGotoPos PtListItemPos
public static final native void Pt List Goto Pos int widget int pos public static final native int Pt List Item Pos int widget byte item public static final native int Pt List Replace Item Pos int widget int new items int item count int position  PtListGotoPos PtListItemPos PtListReplaceItemPos new_items item_count
public static final native int Pt List Item Pos int widget byte item public static final native int Pt List Replace Item Pos int widget int new items int item count int position public static final native void Pt List Select Pos int widget int pos  PtListItemPos PtListReplaceItemPos new_items item_count PtListSelectPos
public static final native int Pt List Replace Item Pos int widget int new items int item count int position public static final native void Pt List Select Pos int widget int pos public static final native void Pt List Unselect Pos int widget int pos  PtListReplaceItemPos new_items item_count PtListSelectPos PtListUnselectPos
public static final native void Pt List Select Pos int widget int pos public static final native void Pt List Unselect Pos int widget int pos public static final native void Pt Main Loop  PtListSelectPos PtListUnselectPos PtMainLoop
public static final native void Pt List Unselect Pos int widget int pos public static final native void Pt Main Loop public static final native int Pt Menu  PtListUnselectPos PtMainLoop PtMenu
public static final native void Pt Main Loop public static final native int Pt Menu public static final native int Pt Menu Bar  PtMainLoop PtMenu PtMenuBar
public static final native int Pt Menu public static final native int Pt Menu Bar public static final native int Pt Menu Button  PtMenu PtMenuBar PtMenuButton
public static final native int Pt Menu Bar public static final native int Pt Menu Button public static final native int Pt Multi Text  PtMenuBar PtMenuButton PtMultiText
public static final native int Pt Menu Button public static final native int Pt Multi Text public static final native int Pt Next Top Level Widget int widget  PtMenuButton PtMultiText PtNextTopLevelWidget
public static final native int Pt Multi Text public static final native int Pt Next Top Level Widget int widget public static final native int Pt Pane  PtMultiText PtNextTopLevelWidget PtPane
public static final native int Pt Next Top Level Widget int widget public static final native int Pt Pane public static final native int Pt Panel Group  PtNextTopLevelWidget PtPane PtPanelGroup
public static final native int Pt Pane public static final native int Pt Panel Group public static final native void Pt Position Menu int widget PhEvent t event  PtPane PtPanelGroup PtPositionMenu PhEvent_t
public static final native int Pt Panel Group public static final native void Pt Position Menu int widget PhEvent t event public static final native int Pt Progress  PtPanelGroup PtPositionMenu PhEvent_t PtProgress
public static final native void Pt Position Menu int widget PhEvent t event public static final native int Pt Progress public static final native int Pt Re Parent Widget int widget int parent  PtPositionMenu PhEvent_t PtProgress PtReParentWidget
public static final native int Pt Progress public static final native int Pt Re Parent Widget int widget int parent public static final native int Pt Realize Widget int widget  PtProgress PtReParentWidget PtRealizeWidget
public static final native int Pt Re Parent Widget int widget int parent public static final native int Pt Realize Widget int widget public static final native int Pt Region  PtReParentWidget PtRealizeWidget PtRegion
public static final native int Pt Realize Widget int widget public static final native int Pt Region public static final native int Pt Release  PtRealizeWidget PtRegion PtRelease
public static final native int Pt Region public static final native int Pt Release public static final native void Pt Remove Callback int widget int callback type int callback int data  PtRegion PtRelease PtRemoveCallback callback_type
public static final native int Pt Release public static final native void Pt Remove Callback int widget int callback type int callback int data public static final native void Pt Remove Hotkey Handler int widget int key sym cap int key mods short flags int data int callback  PtRelease PtRemoveCallback callback_type PtRemoveHotkeyHandler key_sym_cap key_mods
public static final native void Pt Remove Callback int widget int callback type int callback int data public static final native void Pt Remove Hotkey Handler int widget int key sym cap int key mods short flags int data int callback public static final native int Pt Scroll Area  PtRemoveCallback callback_type PtRemoveHotkeyHandler key_sym_cap key_mods PtScrollArea
public static final native void Pt Remove Hotkey Handler int widget int key sym cap int key mods short flags int data int callback public static final native int Pt Scroll Area public static final native int Pt Scroll Container  PtRemoveHotkeyHandler key_sym_cap key_mods PtScrollArea PtScrollContainer
public static final native int Pt Scroll Area public static final native int Pt Scroll Container public static final native int Pt Scrollbar  PtScrollArea PtScrollContainer PtScrollbar
public static final native int Pt Scroll Container public static final native int Pt Scrollbar public static final native void Pt Send Event To Widget int widget int event  PtScrollContainer PtScrollbar PtSendEventToWidget
public static final native int Pt Scrollbar public static final native void Pt Send Event To Widget int widget int event public static final native int Pt Separator  PtScrollbar PtSendEventToWidget PtSeparator
public static final native void Pt Send Event To Widget int widget int event public static final native int Pt Separator public static final native int Pt Set Area From Widget Canvas int widget PhRect t canvas rect PhArea t area  PtSendEventToWidget PtSeparator PtSetAreaFromWidgetCanvas PhRect_t canvas_rect PhArea_t
public static final native int Pt Separator public static final native int Pt Set Area From Widget Canvas int widget PhRect t canvas rect PhArea t area public static final native int Pt Set Parent Widget int widget  PtSeparator PtSetAreaFromWidgetCanvas PhRect_t canvas_rect PhArea_t PtSetParentWidget
public static final native int Pt Set Area From Widget Canvas int widget PhRect t canvas rect PhArea t area public static final native int Pt Set Parent Widget int widget public static final native int Pt Set Resource int widget int type int value int length  PtSetAreaFromWidgetCanvas PhRect_t canvas_rect PhArea_t PtSetParentWidget PtSetResource
public static final native int Pt Set Parent Widget int widget public static final native int Pt Set Resource int widget int type int value int length public static final native int Pt Set Resources int widget int n args int args  PtSetParentWidget PtSetResource PtSetResources n_args
public static final native int Pt Set Resource int widget int type int value int length public static final native int Pt Set Resources int widget int n args int args public static final native int Pt Slider  PtSetResource PtSetResources n_args PtSlider
public static final native int Pt Set Resources int widget int n args int args public static final native int Pt Slider public static final native void Pt Super Class Draw int wc ref int widget int damage  PtSetResources n_args PtSlider PtSuperClassDraw wc_ref
public static final native int Pt Slider public static final native void Pt Super Class Draw int wc ref int widget int damage public static final native int Pt Sync Widget int widget  PtSlider PtSuperClassDraw wc_ref PtSyncWidget
public static final native void Pt Super Class Draw int wc ref int widget int damage public static final native int Pt Sync Widget int widget public static final native int Pt Text  PtSuperClassDraw wc_ref PtSyncWidget PtText
public static final native int Pt Sync Widget int widget public static final native int Pt Text public static final native int Pt Text Get Selection int widget int start int end  PtSyncWidget PtText PtTextGetSelection
public static final native int Pt Text public static final native int Pt Text Get Selection int widget int start int end public static final native int Pt Text Modify Text int widget int start int end int insert pos byte text int length  PtText PtTextGetSelection PtTextModifyText insert_pos
public static final native int Pt Text Get Selection int widget int start int end public static final native int Pt Text Modify Text int widget int start int end int insert pos byte text int length public static final native int Pt Text Modify Text int widget int start int end int insert pos int text int length  PtTextGetSelection PtTextModifyText insert_pos PtTextModifyText insert_pos
public static final native int Pt Text Modify Text int widget int start int end int insert pos byte text int length public static final native int Pt Text Modify Text int widget int start int end int insert pos int text int length public static final native int Pt Text Set Selection int widget int start int end  PtTextModifyText insert_pos PtTextModifyText insert_pos PtTextSetSelection
public static final native int Pt Text Modify Text int widget int start int end int insert pos int text int length public static final native int Pt Text Set Selection int widget int start int end public static final native int Pt Timer  PtTextModifyText insert_pos PtTextSetSelection PtTimer
public static final native int Pt Text Set Selection int widget int start int end public static final native int Pt Timer public static final native int Pt Toggle Button  PtTextSetSelection PtTimer PtToggleButton
public static final native int Pt Timer public static final native int Pt Toggle Button public static final native int Pt Toolbar  PtTimer PtToggleButton PtToolbar
public static final native int Pt Toggle Button public static final native int Pt Toolbar public static final native void Pt Unblock Windows int bl  PtToggleButton PtToolbar PtUnblockWindows
public static final native int Pt Toolbar public static final native void Pt Unblock Windows int bl public static final native int Pt Unrealize Widget int widget  PtToolbar PtUnblockWindows PtUnrealizeWidget
public static final native void Pt Unblock Windows int bl public static final native int Pt Unrealize Widget int widget public static final native int Pt Valid Parent int widget parent int class ref  PtUnblockWindows PtUnrealizeWidget PtValidParent widget_parent class_ref
public static final native int Pt Unrealize Widget int widget public static final native int Pt Valid Parent int widget parent int class ref public static final native int Pt Web Client  PtUnrealizeWidget PtValidParent widget_parent class_ref PtWebClient
public static final native int Pt Valid Parent int widget parent int class ref public static final native int Pt Web Client public static final native int Pt Widget Area int widget PhArea t area  PtValidParent widget_parent class_ref PtWebClient PtWidgetArea PhArea_t
public static final native int Pt Web Client public static final native int Pt Widget Area int widget PhArea t area public static final native int Pt Widget Brother Behind int widget  PtWebClient PtWidgetArea PhArea_t PtWidgetBrotherBehind
public static final native int Pt Widget Area int widget PhArea t area public static final native int Pt Widget Brother Behind int widget public static final native int Pt Widget Brother In Front int widget  PtWidgetArea PhArea_t PtWidgetBrotherBehind PtWidgetBrotherInFront
public static final native int Pt Widget Brother Behind int widget public static final native int Pt Widget Brother In Front int widget public static final native int Pt Widget Canvas int widget int canvas rect  PtWidgetBrotherBehind PtWidgetBrotherInFront PtWidgetCanvas canvas_rect
public static final native int Pt Widget Brother In Front int widget public static final native int Pt Widget Canvas int widget int canvas rect public static final native int Pt Widget Canvas int widget PhRect t canvas rect  PtWidgetBrotherInFront PtWidgetCanvas canvas_rect PtWidgetCanvas PhRect_t canvas_rect
public static final native int Pt Widget Canvas int widget int canvas rect public static final native int Pt Widget Canvas int widget PhRect t canvas rect public static final native int Pt Widget Child Back int widget  PtWidgetCanvas canvas_rect PtWidgetCanvas PhRect_t canvas_rect PtWidgetChildBack
public static final native int Pt Widget Canvas int widget PhRect t canvas rect public static final native int Pt Widget Child Back int widget public static final native int Pt Widget Child Front int widget  PtWidgetCanvas PhRect_t canvas_rect PtWidgetChildBack PtWidgetChildFront
public static final native int Pt Widget Child Back int widget public static final native int Pt Widget Child Front int widget public static final native int Pt Widget Class int widget  PtWidgetChildBack PtWidgetChildFront PtWidgetClass
public static final native int Pt Widget Child Front int widget public static final native int Pt Widget Class int widget public static final native int Pt Widget Extent int widget int extent  PtWidgetChildFront PtWidgetClass PtWidgetExtent
public static final native int Pt Widget Class int widget public static final native int Pt Widget Extent int widget int extent public static final native int Pt Widget Extent int widget PhRect t extent  PtWidgetClass PtWidgetExtent PtWidgetExtent PhRect_t
public static final native int Pt Widget Extent int widget int extent public static final native int Pt Widget Extent int widget PhRect t extent public static final native int Pt Widget Flags int widget  PtWidgetExtent PtWidgetExtent PhRect_t PtWidgetFlags
public static final native int Pt Widget Extent int widget PhRect t extent public static final native int Pt Widget Flags int widget public static final native int Pt Widget Insert int widget int new sibling int behind  PtWidgetExtent PhRect_t PtWidgetFlags PtWidgetInsert new_sibling
public static final native int Pt Widget Flags int widget public static final native int Pt Widget Insert int widget int new sibling int behind public static final native int Pt Widget Is Class Member int widget int clazz  PtWidgetFlags PtWidgetInsert new_sibling PtWidgetIsClassMember
public static final native int Pt Widget Insert int widget int new sibling int behind public static final native int Pt Widget Is Class Member int widget int clazz public static final native boolean Pt Widget Is Realized int widget  PtWidgetInsert new_sibling PtWidgetIsClassMember PtWidgetIsRealized
public static final native int Pt Widget Is Class Member int widget int clazz public static final native boolean Pt Widget Is Realized int widget public static final native int Pt Widget Offset int widget PhPoint t offset  PtWidgetIsClassMember PtWidgetIsRealized PtWidgetOffset PhPoint_t
public static final native boolean Pt Widget Is Realized int widget public static final native int Pt Widget Offset int widget PhPoint t offset public static final native int Pt Widget Parent int widget  PtWidgetIsRealized PtWidgetOffset PhPoint_t PtWidgetParent
public static final native int Pt Widget Offset int widget PhPoint t offset public static final native int Pt Widget Parent int widget public static final native int Pt Widget Preferred Size int widget PhDim t dim  PtWidgetOffset PhPoint_t PtWidgetParent PtWidgetPreferredSize PhDim_t
public static final native int Pt Widget Parent int widget public static final native int Pt Widget Preferred Size int widget PhDim t dim public static final native int Pt Widget Rid int widget  PtWidgetParent PtWidgetPreferredSize PhDim_t PtWidgetRid
public static final native int Pt Widget Preferred Size int widget PhDim t dim public static final native int Pt Widget Rid int widget public static final native int Pt Widget To Back int widget  PtWidgetPreferredSize PhDim_t PtWidgetRid PtWidgetToBack
public static final native int Pt Widget Rid int widget public static final native int Pt Widget To Back int widget public static final native int Pt Widget To Front int widget  PtWidgetRid PtWidgetToBack PtWidgetToFront
public static final native int Pt Widget To Back int widget public static final native int Pt Widget To Front int widget public static final native int Pt Window  PtWidgetToBack PtWidgetToFront PtWindow
public static final native int Pt Widget To Front int widget public static final native int Pt Window public static final native int Pt Window Focus int widget  PtWidgetToFront PtWindow PtWindowFocus
public static final native int Pt Window public static final native int Pt Window Focus int widget public static final native int Pt Window Get State int widget  PtWindow PtWindowFocus PtWindowGetState
public static final native int Pt Window Focus int widget public static final native int Pt Window Get State int widget public static final native void Pt Window To Back int widget  PtWindowFocus PtWindowGetState PtWindowToBack
public static final native int Pt Window Get State int widget public static final native void Pt Window To Back int widget public static final native void Pt Window To Front int widget  PtWindowGetState PtWindowToBack PtWindowToFront
public static final native void Pt Window To Back int widget public static final native void Pt Window To Front int widget public static final native void free int ptr  PtWindowToBack PtWindowToFront
public static final native void Pt Window To Front int widget public static final native void free int ptr public static final native int getenv byte name  PtWindowToFront
public static final native void free int ptr public static final native int getenv byte name public static final native int malloc int size 
public static final native int getenv byte name public static final native int malloc int size public static final native void memmove int dest PhPoint t src int size  PhPoint_t
public static final native int malloc int size public static final native void memmove int dest PhPoint t src int size public static final native void memmove int dest int src int size  PhPoint_t
public static final native void memmove int dest PhPoint t src int size public static final native void memmove int dest int src int size public static final native void memmove int dest int src int size  PhPoint_t
public static final native void memmove int dest int src int size public static final native void memmove int dest int src int size public static final native void memmove int dest PhTile t src int size  PhTile_t
public static final native void memmove int dest int src int size public static final native void memmove int dest PhTile t src int size public static final native void memmove PhTile t dest int src int size  PhTile_t PhTile_t
public static final native void memmove int dest PhTile t src int size public static final native void memmove PhTile t dest int src int size public static final native void memmove PtCallbackInfo t dest int src int size  PhTile_t PhTile_t PtCallbackInfo_t
public static final native void memmove PhTile t dest int src int size public static final native void memmove PtCallbackInfo t dest int src int size public static final native void memmove PhWindowEvent t dest int src int size  PhTile_t PtCallbackInfo_t PhWindowEvent_t
public static final native void memmove PtCallbackInfo t dest int src int size public static final native void memmove PhWindowEvent t dest int src int size public static final native void memmove byte dest int src int size  PtCallbackInfo_t PhWindowEvent_t
public static final native void memmove PhWindowEvent t dest int src int size public static final native void memmove byte dest int src int size public static final native void memmove int dest byte src int size  PhWindowEvent_t
public static final native void memmove byte dest int src int size public static final native void memmove int dest byte src int size public static final native void memmove int dest PhRect t src int size  PhRect_t
public static final native void memmove int dest byte src int size public static final native void memmove int dest PhRect t src int size public static final native void memmove PhRect t dest int src int size  PhRect_t PhRect_t
public static final native void memmove int dest PhRect t src int size public static final native void memmove PhRect t dest int src int size public static final native void memmove short dest int src int size  PhRect_t PhRect_t
public static final native void memmove PhRect t dest int src int size public static final native void memmove short dest int src int size public static final native void memmove int dest int src int size  PhRect_t
public static final native void memmove short dest int src int size public static final native void memmove int dest int src int size public static final native void memmove int dest PhImage t src int size  PhImage_t
public static final native void memmove int dest int src int size public static final native void memmove int dest PhImage t src int size public static final native void memmove PhImage t dest int src int size  PhImage_t PhImage_t
public static final native void memmove int dest PhImage t src int size public static final native void memmove PhImage t dest int src int size public static final native void memmove Font Details dest int src int size  PhImage_t PhImage_t FontDetails
public static final native void memmove PhImage t dest int src int size public static final native void memmove Font Details dest int src int size public static final native void memmove int dest PhPointerEvent t src int size  PhImage_t FontDetails PhPointerEvent_t
public static final native void memmove Font Details dest int src int size public static final native void memmove int dest PhPointerEvent t src int size public static final native void memmove PhPointerEvent t dest int src int size  FontDetails PhPointerEvent_t PhPointerEvent_t
public static final native void memmove int dest PhPointerEvent t src int size public static final native void memmove PhPointerEvent t dest int src int size public static final native void memmove PhEvent t dest int src int size  PhPointerEvent_t PhPointerEvent_t PhEvent_t
public static final native void memmove PhPointerEvent t dest int src int size public static final native void memmove PhEvent t dest int src int size public static final native void memmove int dest PhEvent t src int size  PhPointerEvent_t PhEvent_t PhEvent_t
public static final native void memmove PhEvent t dest int src int size public static final native void memmove int dest PhEvent t src int size public static final native void memmove PhKeyEvent t dest int src int size  PhEvent_t PhEvent_t PhKeyEvent_t
public static final native void memmove int dest PhEvent t src int size public static final native void memmove PhKeyEvent t dest int src int size public static final native void memmove PtScrollbarCallback t dest int src int size  PhEvent_t PhKeyEvent_t PtScrollbarCallback_t
public static final native void memmove PhKeyEvent t dest int src int size public static final native void memmove PtScrollbarCallback t dest int src int size public static final native void memmove int dest PhArea t src int size  PhKeyEvent_t PtScrollbarCallback_t PhArea_t
public static final native void memmove PtScrollbarCallback t dest int src int size public static final native void memmove int dest PhArea t src int size public static final native void memmove PgAlpha t dest int src int size  PtScrollbarCallback_t PhArea_t PgAlpha_t
public static final native void memmove int dest PhArea t src int size public static final native void memmove PgAlpha t dest int src int size public static final native void memmove int dest PgAlpha t src int size  PhArea_t PgAlpha_t PgAlpha_t
public static final native void memmove PgAlpha t dest int src int size public static final native void memmove int dest PgAlpha t src int size public static final native void memmove PtTextCallback t dest int src int size  PgAlpha_t PgAlpha_t PtTextCallback_t
public static final native void memmove int dest PgAlpha t src int size public static final native void memmove PtTextCallback t dest int src int size public static final native void memmove int dest PtTextCallback t src int size  PgAlpha_t PtTextCallback_t PtTextCallback_t
public static final native void memmove PtTextCallback t dest int src int size public static final native void memmove int dest PtTextCallback t src int size public static final native void memmove PgMap t dest int src int size  PtTextCallback_t PtTextCallback_t PgMap_t
public static final native void memmove int dest PtTextCallback t src int size public static final native void memmove PgMap t dest int src int size public static final native void memmove int dest PhCursorDef t src int size  PtTextCallback_t PgMap_t PhCursorDef_t
public static final native void memmove PgMap t dest int src int size public static final native void memmove int dest PhCursorDef t src int size public static final native void memmove Ph Clip Header dest int src int size  PgMap_t PhCursorDef_t PhClipHeader
public static final native void memmove int dest PhCursorDef t src int size public static final native void memmove Ph Clip Header dest int src int size public static final native void memmove byte dest Ph Clip Header src int size  PhCursorDef_t PhClipHeader PhClipHeader
public static final native void memmove Ph Clip Header dest int src int size public static final native void memmove byte dest Ph Clip Header src int size public static final native void memmove PtWebStatusCallback t dest int src int size  PhClipHeader PhClipHeader PtWebStatusCallback_t
public static final native void memmove byte dest Ph Clip Header src int size public static final native void memmove PtWebStatusCallback t dest int src int size public static final native void memmove PtWebDataReqCallback t dest int src int size  PhClipHeader PtWebStatusCallback_t PtWebDataReqCallback_t
public static final native void memmove PtWebStatusCallback t dest int src int size public static final native void memmove PtWebDataReqCallback t dest int src int size public static final native void memmove PtWebWindowCallback t dest int src int size  PtWebStatusCallback_t PtWebDataReqCallback_t PtWebWindowCallback_t
public static final native void memmove PtWebDataReqCallback t dest int src int size public static final native void memmove PtWebWindowCallback t dest int src int size public static final native void memmove PtWebMetaDataCallback t dest int src int size  PtWebDataReqCallback_t PtWebWindowCallback_t PtWebMetaDataCallback_t
public static final native void memmove PtWebWindowCallback t dest int src int size public static final native void memmove PtWebMetaDataCallback t dest int src int size public static final native void memmove int dest PtWebClientData t src int size  PtWebWindowCallback_t PtWebMetaDataCallback_t PtWebClientData_t
public static final native void memmove PtWebMetaDataCallback t dest int src int size public static final native void memmove int dest PtWebClientData t src int size public static final native void memset int dest int c int length  PtWebMetaDataCallback_t PtWebClientData_t
public static final native void memmove int dest PtWebClientData t src int size public static final native void memset int dest int c int length public static final native int strdup int string  PtWebClientData_t
public static final native void memset int dest int c int length public static final native int strdup int string public static final native int strlen int string 
public static final native int strdup int string public static final native int strlen int string public static final native int uname utsname udata 

public static synchronized Widget get int handle if handle 0 return null Get Args 1 0 OS Pt Get Resources handle Get Args length 3 Get Args if Get Args 1 0 return null OS memmove Arg Buffer Get Args 1 4 if Arg Buffer 0 0 return null int index Arg Buffer 0 1 if 0 index index Widget Table length return Widget Table index return null  GetArgs PtGetResources GetArgs GetArgs GetArgs ArgBuffer GetArgs ArgBuffer ArgBuffer WidgetTable WidgetTable
public synchronized static void put int handle Widget widget if handle 0 return if Free Slot 1 int length Free Slot Index Table length Grow Size int new Index Table new int length Widget new Widget Table new Widget length System arraycopy Index Table 0 new Index Table 0 Free Slot System arraycopy Widget Table 0 new Widget Table 0 Free Slot for int i Free Slot i length 1 i new Index Table i i 1 new Index Table length 1 1 Index Table new Index Table Widget Table new Widget Table Arg Buffer 0 Free Slot 1 OS memmove Arg Ptr Arg Buffer 4 OS Pt Set Resource handle OS Pt ARG USER DATA Arg Ptr 4 int old Slot Free Slot Free Slot Index Table old Slot Index Table old Slot 2 Widget Table old Slot widget  FreeSlot FreeSlot IndexTable GrowSize newIndexTable newWidgetTable IndexTable newIndexTable FreeSlot WidgetTable newWidgetTable FreeSlot FreeSlot newIndexTable newIndexTable IndexTable newIndexTable WidgetTable newWidgetTable ArgBuffer FreeSlot ArgPtr ArgBuffer PtSetResource Pt_ARG_USER_DATA ArgPtr oldSlot FreeSlot FreeSlot IndexTable oldSlot IndexTable oldSlot WidgetTable oldSlot
public static synchronized Widget remove int handle if handle 0 return null Get Args 1 0 OS Pt Get Resources handle Get Args length 3 Get Args if Get Args 1 0 return null OS memmove Arg Buffer Get Args 1 4 if Arg Buffer 0 0 return null int index Arg Buffer 0 1 Widget widget null if 0 index index Widget Table length widget Widget Table index Widget Table index null Index Table index Free Slot Free Slot index Arg Buffer 0 0 OS memmove Arg Ptr Arg Buffer 4 OS Pt Set Resource handle OS Pt ARG USER DATA Arg Ptr 4 return widget  GetArgs PtGetResources GetArgs GetArgs GetArgs ArgBuffer GetArgs ArgBuffer ArgBuffer WidgetTable WidgetTable WidgetTable IndexTable FreeSlot FreeSlot ArgBuffer ArgPtr ArgBuffer PtSetResource Pt_ARG_USER_DATA ArgPtr
public static synchronized Shell shells int length 0 for int i 0 i Widget Table length i Widget widget Widget Table i if widget null widget instanceof Shell length int index 0 Shell result new Shell length for int i 0 i Widget Table length i Widget widget Widget Table i if widget null widget instanceof Shell int j 0 while j index if result j widget break j if j index result index Shell widget if index length return result Shell new Result new Shell index System arraycopy result 0 new Result 0 index return new Result  WidgetTable WidgetTable WidgetTable WidgetTable newResult newResult newResult
public static synchronized int size int size 0 for int i 0 i Widget Table length i if Widget Table i null size return size  WidgetTable WidgetTable

COM Object i Internet Security Manager public Web Site Composite parent int style String prog Id super parent style prog Id  COMObject iInternetSecurityManager WebSite progId progId
super createCOM Interfaces i Doc HostUI Handler new COM Object new int 2 0 0 4 1 5 0 0 1 1 1 3 3 2 2 1 3 2 public int method0 int args return Query Interface args 0 args 1  createCOMInterfaces iDocHostUIHandler COMObject QueryInterface
i Doc HostUI Handler new COM Object new int 2 0 0 4 1 5 0 0 1 1 1 3 3 2 2 1 3 2 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iDocHostUIHandler COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Show Context Menu args 0 args 1 args 2 args 3  AddRef ShowContextMenu
public int method2 int args return Release public int method3 int args return Show Context Menu args 0 args 1 args 2 args 3 public int method4 int args return Get Host Info args 0  ShowContextMenu GetHostInfo
public int method3 int args return Show Context Menu args 0 args 1 args 2 args 3 public int method4 int args return Get Host Info args 0 public int method5 int args return ShowUI args 0 args 1 args 2 args 3 args 4  ShowContextMenu GetHostInfo
public int method4 int args return Get Host Info args 0 public int method5 int args return ShowUI args 0 args 1 args 2 args 3 args 4 public int method6 int args return HideUI  GetHostInfo
public int method5 int args return ShowUI args 0 args 1 args 2 args 3 args 4 public int method6 int args return HideUI public int method7 int args return UpdateUI 
public int method6 int args return HideUI public int method7 int args return UpdateUI public int method8 int args return Enable Modeless args 0  EnableModeless
public int method7 int args return UpdateUI public int method8 int args return Enable Modeless args 0 public int method9 int args return On Doc Window Activate args 0  EnableModeless OnDocWindowActivate
public int method8 int args return Enable Modeless args 0 public int method9 int args return On Doc Window Activate args 0 public int method10 int args return On Frame Window Activate args 0  EnableModeless OnDocWindowActivate OnFrameWindowActivate
public int method9 int args return On Doc Window Activate args 0 public int method10 int args return On Frame Window Activate args 0 public int method11 int args return Resize Border args 0 args 1 args 2  OnDocWindowActivate OnFrameWindowActivate ResizeBorder
public int method10 int args return On Frame Window Activate args 0 public int method11 int args return Resize Border args 0 args 1 args 2 public int method12 int args return Translate Accelerator args 0 args 1 args 2  OnFrameWindowActivate ResizeBorder TranslateAccelerator
public int method11 int args return Resize Border args 0 args 1 args 2 public int method12 int args return Translate Accelerator args 0 args 1 args 2 public int method13 int args return Get Option Key Path args 0 args 1  ResizeBorder TranslateAccelerator GetOptionKeyPath
public int method12 int args return Translate Accelerator args 0 args 1 args 2 public int method13 int args return Get Option Key Path args 0 args 1 public int method14 int args return Get Drop Target args 0 args 1  TranslateAccelerator GetOptionKeyPath GetDropTarget
public int method13 int args return Get Option Key Path args 0 args 1 public int method14 int args return Get Drop Target args 0 args 1 public int method15 int args return Get External args 0  GetOptionKeyPath GetDropTarget GetExternal
public int method14 int args return Get Drop Target args 0 args 1 public int method15 int args return Get External args 0 public int method16 int args return Translate Url args 0 args 1 args 2  GetDropTarget GetExternal TranslateUrl
public int method15 int args return Get External args 0 public int method16 int args return Translate Url args 0 args 1 args 2 public int method17 int args return Filter Data Object args 0 args 1  GetExternal TranslateUrl FilterDataObject
i Doc Host ShowUI new COM Object new int 2 0 0 7 7 public int method0 int args return Query Interface args 0 args 1  iDocHostShowUI COMObject QueryInterface
i Doc Host ShowUI new COM Object new int 2 0 0 7 7 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iDocHostShowUI COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Show Message args 0 args 1 args 2 args 3 args 4 args 5 args 6  AddRef ShowMessage
public int method2 int args return Release public int method3 int args return Show Message args 0 args 1 args 2 args 3 args 4 args 5 args 6 public int method4 int args return Show Help args 0 args 1 args 2 args 3 args 4 args 5 args 6  ShowMessage ShowHelp
i Service Provider new COM Object new int 2 0 0 3 public int method0 int args return Query Interface args 0 args 1  iServiceProvider COMObject QueryInterface
i Service Provider new COM Object new int 2 0 0 3 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iServiceProvider COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Query Service args 0 args 1 args 2  AddRef QueryService
i Internet Security Manager new COM Object new int 2 0 0 1 1 3 4 8 7 3 3 public int method0 int args return Query Interface args 0 args 1  iInternetSecurityManager COMObject QueryInterface
i Internet Security Manager new COM Object new int 2 0 0 1 1 3 4 8 7 3 3 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iInternetSecurityManager COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Set Security Site args 0  AddRef SetSecuritySite
public int method2 int args return Release public int method3 int args return Set Security Site args 0 public int method4 int args return Get Security Site args 0  SetSecuritySite GetSecuritySite
public int method3 int args return Set Security Site args 0 public int method4 int args return Get Security Site args 0 public int method5 int args return Map Url To Zone args 0 args 1 args 2  SetSecuritySite GetSecuritySite MapUrlToZone
public int method4 int args return Get Security Site args 0 public int method5 int args return Map Url To Zone args 0 args 1 args 2 public int method6 int args return Get Security Id args 0 args 1 args 2 args 3  GetSecuritySite MapUrlToZone GetSecurityId
public int method5 int args return Map Url To Zone args 0 args 1 args 2 public int method6 int args return Get Security Id args 0 args 1 args 2 args 3 public int method7 int args return Process Url Action args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7  MapUrlToZone GetSecurityId ProcessUrlAction
public int method6 int args return Get Security Id args 0 args 1 args 2 args 3 public int method7 int args return Process Url Action args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7 public int method8 int args return Query Custom Policy args 0 args 1 args 2 args 3 args 4 args 5 args 6  GetSecurityId ProcessUrlAction QueryCustomPolicy
public int method7 int args return Process Url Action args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7 public int method8 int args return Query Custom Policy args 0 args 1 args 2 args 3 args 4 args 5 args 6 public int method9 int args return Set Zone Mapping args 0 args 1 args 2  ProcessUrlAction QueryCustomPolicy SetZoneMapping
public int method8 int args return Query Custom Policy args 0 args 1 args 2 args 3 args 4 args 5 args 6 public int method9 int args return Set Zone Mapping args 0 args 1 args 2 public int method10 int args return Get Zone Mappings args 0 args 1 args 2  QueryCustomPolicy SetZoneMapping GetZoneMappings
protected void createCOM Interfaces super createCOM Interfaces i Doc HostUI Handler new COM Object new int 2 0 0 4 1 5 0 0 1 1 1 3 3 2 2 1 3 2 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Show Context Menu args 0 args 1 args 2 args 3 public int method4 int args return Get Host Info args 0 public int method5 int args return ShowUI args 0 args 1 args 2 args 3 args 4 public int method6 int args return HideUI public int method7 int args return UpdateUI public int method8 int args return Enable Modeless args 0 public int method9 int args return On Doc Window Activate args 0 public int method10 int args return On Frame Window Activate args 0 public int method11 int args return Resize Border args 0 args 1 args 2 public int method12 int args return Translate Accelerator args 0 args 1 args 2 public int method13 int args return Get Option Key Path args 0 args 1 public int method14 int args return Get Drop Target args 0 args 1 public int method15 int args return Get External args 0 public int method16 int args return Translate Url args 0 args 1 args 2 public int method17 int args return Filter Data Object args 0 args 1 i Doc Host ShowUI new COM Object new int 2 0 0 7 7 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Show Message args 0 args 1 args 2 args 3 args 4 args 5 args 6 public int method4 int args return Show Help args 0 args 1 args 2 args 3 args 4 args 5 args 6 i Service Provider new COM Object new int 2 0 0 3 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Query Service args 0 args 1 args 2 i Internet Security Manager new COM Object new int 2 0 0 1 1 3 4 8 7 3 3 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Set Security Site args 0 public int method4 int args return Get Security Site args 0 public int method5 int args return Map Url To Zone args 0 args 1 args 2 public int method6 int args return Get Security Id args 0 args 1 args 2 args 3 public int method7 int args return Process Url Action args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7 public int method8 int args return Query Custom Policy args 0 args 1 args 2 args 3 args 4 args 5 args 6 public int method9 int args return Set Zone Mapping args 0 args 1 args 2 public int method10 int args return Get Zone Mappings args 0 args 1 args 2  createCOMInterfaces createCOMInterfaces iDocHostUIHandler COMObject QueryInterface AddRef ShowContextMenu GetHostInfo EnableModeless OnDocWindowActivate OnFrameWindowActivate ResizeBorder TranslateAccelerator GetOptionKeyPath GetDropTarget GetExternal TranslateUrl FilterDataObject iDocHostShowUI COMObject QueryInterface AddRef ShowMessage ShowHelp iServiceProvider COMObject QueryInterface AddRef QueryService iInternetSecurityManager COMObject QueryInterface AddRef SetSecuritySite GetSecuritySite MapUrlToZone GetSecurityId ProcessUrlAction QueryCustomPolicy SetZoneMapping GetZoneMappings
protected void disposeCOM Interfaces super disposeCOM Interfaces if i Doc HostUI Handler null i Doc HostUI Handler dispose i Doc HostUI Handler null if i Doc Host ShowUI null i Doc Host ShowUI dispose i Doc Host ShowUI null if i Service Provider null i Service Provider dispose i Service Provider null if i Internet Security Manager null i Internet Security Manager dispose i Internet Security Manager null  disposeCOMInterfaces disposeCOMInterfaces iDocHostUIHandler iDocHostUIHandler iDocHostUIHandler iDocHostShowUI iDocHostShowUI iDocHostShowUI iServiceProvider iServiceProvider iServiceProvider iInternetSecurityManager iInternetSecurityManager iInternetSecurityManager
protected int Add Ref Workaround for javac 1 1 8 bug return super Add Ref  AddRef AddRef
protected int Query Interface int riid int ppv Object int result super Query Interface riid ppv Object if result COM S OK return result if riid 0 ppv Object 0 return COM E INVALIDARG GUID guid new GUID COM Move Memory guid riid GUID sizeof if COM Is EqualGUID guid COM IIDI Doc HostUI Handler COM Move Memory ppv Object new int i Doc HostUI Handler get Address 4 Add Ref return COM S OK if COM Is EqualGUID guid COM IIDI Doc Host ShowUI COM Move Memory ppv Object new int i Doc Host ShowUI get Address 4 Add Ref return COM S OK if COM Is EqualGUID guid COM IIDI Service Provider COM Move Memory ppv Object new int i Service Provider get Address 4 Add Ref return COM S OK COM Move Memory ppv Object new int 0 4 return COM E NOINTERFACE  QueryInterface ppvObject QueryInterface ppvObject S_OK ppvObject E_INVALIDARG MoveMemory IsEqualGUID IIDIDocHostUIHandler MoveMemory ppvObject iDocHostUIHandler getAddress AddRef S_OK IsEqualGUID IIDIDocHostShowUI MoveMemory ppvObject iDocHostShowUI getAddress AddRef S_OK IsEqualGUID IIDIServiceProvider MoveMemory ppvObject iServiceProvider getAddress AddRef S_OK MoveMemory ppvObject E_NOINTERFACE
I Doc HostUI Handler int Enable Modeless int Enable Modeless return COM E NOTIMPL  IDocHostUIHandler EnableModeless EnableModeless E_NOTIMPL
int Filter Data Object int pDO int ppDO Ret return COM E NOTIMPL  FilterDataObject ppDORet E_NOTIMPL
int Get Drop Target int p Drop Target int pp Drop Target return COM E NOTIMPL  GetDropTarget pDropTarget ppDropTarget E_NOTIMPL
int Get External int pp Dispatch return COM E NOTIMPL  GetExternal ppDispatch E_NOTIMPL
int Get Host Info int p Info return COM E NOTIMPL  GetHostInfo pInfo E_NOTIMPL
int Get Option Key Path int pch Key int dw return COM E NOTIMPL  GetOptionKeyPath pchKey E_NOTIMPL
int HideUI return COM E NOTIMPL  E_NOTIMPL
int On Doc Window Activate int f Activate return COM E NOTIMPL  OnDocWindowActivate fActivate E_NOTIMPL
int On Frame Window Activate int f Activate return COM E NOTIMPL  OnFrameWindowActivate fActivate E_NOTIMPL
protected int Release Workaround for javac 1 1 8 bug return super Release 
int Resize Border int prc Border int pUI Window int f Frame Window return COM E NOTIMPL  ResizeBorder prcBorder pUIWindow fFrameWindow E_NOTIMPL
int Show Context Menu int dwID int ppt int pcmdt Reserved int pdisp Reserved Browser browser Browser get Parent get Parent Event event new Event POINT pt new POINT OS Move Memory pt ppt POINT sizeof event x pt x event y pt y browser notify Listeners SWT Menu Detect event if event doit return COM S OK Menu menu browser get Menu if menu null menu is Disposed if pt x event x pt y event y menu set Location event x event y menu set Visible true return COM S OK Show default IE popup menu return COM S FALSE  ShowContextMenu pcmdtReserved pdispReserved getParent getParent MoveMemory notifyListeners MenuDetect S_OK getMenu isDisposed setLocation setVisible S_OK S_FALSE
int ShowUI int dwID int p Active Object int p Command Target int p Frame int p Doc return COM E NOTIMPL  pActiveObject pCommandTarget pFrame pDoc E_NOTIMPL
int Translate Accelerator int lp Msg int pguid Cmd Group int n CmdID Feature on Internet Explorer By default the embedded Internet Explorer control runs the Internet Explorer shortcuts e g F5 for refresh This overrides the shortcuts defined by SWT The workaround is to forward the accelerator keys to the parent window and have Internet Explorer ignore the ones handled by the parent window Menu menubar get Shell get Menu Bar if menubar null menubar is Disposed menubar is Enabled Shell shell menubar get Shell int hwnd shell handle int h Accel OS Send Message hwnd OS WM APP 1 0 0 if h Accel 0 MSG msg new MSG OS Move Memory msg lp Msg MSG sizeof if OS Translate Accelerator hwnd h Accel msg 0 return COM S OK Feature on Internet Explorer By default the embedded Internet Explorer control runs the Internet Explorer shortcuts F5 causes refresh This behaviour is undesired when rendering HTML in memory as it causes the empty page about blank page to be reloaded The workaround is to block the default F5 handling by IE when the URL is about blank Ole Automation auto new Ole Automation this int rgdispid auto getI Ds Of Names new String LocationURL NON NLS 1 Variant p Var Result auto get Property rgdispid 0 auto dispose int result COM S FALSE if p Var Result null if p Var Result get Type OLE VT BSTR String url p Var Result get String if url equals Browser ABOUT BLANK MSG msg new MSG OS Move Memory msg lp Msg MSG sizeof if msg message OS WM KEYDOWN msg w Param OS VK F5 result COM S OK p Var Result dispose return result  TranslateAccelerator lpMsg pguidCmdGroup nCmdID getShell getMenuBar isDisposed isEnabled getShell hAccel SendMessage WM_APP hAccel MoveMemory lpMsg TranslateAccelerator hAccel S_OK OleAutomation OleAutomation getIDsOfNames pVarResult getProperty S_FALSE pVarResult pVarResult getType VT_BSTR pVarResult getString ABOUT_BLANK MoveMemory lpMsg WM_KEYDOWN wParam VK_F5 S_OK pVarResult
int Translate Url int dw Translate int pchURL In int ppchURL Out return COM E NOTIMPL  TranslateUrl dwTranslate pchURLIn ppchURLOut E_NOTIMPL
int UpdateUI return COM E NOTIMPL  E_NOTIMPL
int Show Message int hwnd int lpstr Text int lpstr Caption int dw Type int lpstr Help File int dw Help Context int pl Result Feature on IE Executing certain ActiveX controls such as the Java or Flash plugin from within a java VM can cause the application to crash The workaround is to disallow all ActiveX controls Feature on IE When IE navigates to a website that contains an ActiveX that is prevented from being executed IE displays a message Your current security settings prohibit running ActiveX controls on this page The workaround is to selectively block this alert as indicated in the MSDN article Web Browser customization resource identifier in shdoclc dll for window caption Your current security settings prohibit running ActiveX controls on this page int IDS MESSAGE BOX CAPTION 8033 if lpstr Text 0 TCHAR lp Lib File Name new TCHAR 0 SHDOCLC DLL true NON NLS 1 int h Module OS Load Library lp Lib File Name if h Module 0 Note lpstr Text is a LPOLESTR i e a null terminated unicode string LPWSTR i e a WCHAR It is not a BSTR A BSTR is a null terminated unicode string that contains its length at the beginning int cnt OS wcslen lpstr Text char buffer new char cnt Note lpstr Text is unicode on both unicode and ansi platforms The nbr of chars is multiplied by the constant 2 and not by TCHAR sizeof since TCHAR sizeof returns 1 on ansi platforms OS Move Memory buffer lpstr Text cnt 2 String text new String buffer provide a buffer large enough to hold the string to compare to and a null terminated character int length OS Is Unicode cnt OS Wide Char To Multi Byte OS CP ACP 0 buffer cnt 0 0 null null 1 TCHAR lp Buffer new TCHAR 0 length int result OS Load String h Module IDS MESSAGE BOX CAPTION lp Buffer length OS Free Library h Module return result 0 text equals lp Buffer to String 0 result COM S OK COM S FALSE return COM S FALSE  ShowMessage lpstrText lpstrCaption dwType lpstrHelpFile dwHelpContext plResult WebBrowser IDS_MESSAGE_BOX_CAPTION lpstrText lpLibFileName hModule LoadLibrary lpLibFileName hModule lpstrText lpstrText lpstrText MoveMemory lpstrText IsUnicode WideCharToMultiByte CP_ACP lpBuffer LoadString hModule IDS_MESSAGE_BOX_CAPTION lpBuffer FreeLibrary hModule lpBuffer toString S_OK S_FALSE S_FALSE
the help int Show Help int hwnd int psz Help File int u Command int dw Data int ptMouse x int ptMouse y int p Dispatch Object Hit return COM S OK  ShowHelp pszHelpFile uCommand dwData ptMouse_x ptMouse_y pDispatchObjectHit S_OK
int Query Service int guid Service int riid int ppv Object if riid 0 ppv Object 0 return COM E INVALIDARG GUID guid new GUID COM Move Memory guid riid GUID sizeof if COM Is EqualGUID guid COM IIDI Internet Security Manager COM Move Memory ppv Object new int i Internet Security Manager get Address 4 Add Ref return COM S OK COM Move Memory ppv Object new int 0 4 return COM E NOINTERFACE  QueryService guidService ppvObject ppvObject E_INVALIDARG MoveMemory IsEqualGUID IIDIInternetSecurityManager MoveMemory ppvObject iInternetSecurityManager getAddress AddRef S_OK MoveMemory ppvObject E_NOINTERFACE
I Internet Security Manager int Set Security Site int p Site return Browser INET E DEFAULT ACTION  IInternetSecurityManager SetSecuritySite pSite INET_E_DEFAULT_ACTION
int Get Security Site int pp Site return Browser INET E DEFAULT ACTION  GetSecuritySite ppSite INET_E_DEFAULT_ACTION
int Map Url To Zone int pwsz Url int pdw Zone int dw Flags int cnt OS wcslen pwsz Url char buffer new char cnt Note pwsz Url is unicode on both unicode and ansi platforms The nbr of chars is multiplied by the constant 2 and not by TCHAR sizeof since TCHAR sizeof returns 1 on ansi platforms OS Move Memory buffer pwsz Url cnt 2 String url new String buffer Feature in IE 6 sp1 HTML rendered in memory does not enable local links but the exact same HTML document loaded through a local file is permitted to follow local links The workaround is to return URLZONE INTRANET instead of the default value URLZONE LOCAL MACHINE int zone Browser URLZONE INTRANET Note Some ActiveX plugins crash when executing inside the embedded explorer itself running into a JVM The current workaround is to detect when such ActiveX is about to be started and refuse to execute it ActiveX blocked in an object tag Shockwave director plugin mime application x director Java plugin if url starts With Browser URL DIRECTOR url starts With Browser URL JAVA url index Of Browser URL CAB 1 url starts With Browser URL JAVA 15 url index Of Browser URL CAB 1 zone Browser URLZONE LOCAL MACHINE COM Move Memory pdw Zone new int zone 4 return COM S OK  MapUrlToZone pwszUrl pdwZone dwFlags pwszUrl pwszUrl MoveMemory pwszUrl URLZONE_INTRANET URLZONE_LOCAL_MACHINE URLZONE_INTRANET startsWith URL_DIRECTOR startsWith URL_JAVA indexOf URL_CAB startsWith URL_JAVA_15 indexOf URL_CAB URLZONE_LOCAL_MACHINE MoveMemory pdwZone S_OK
int Get Security Id int pwsz Url int pb Security Id int pcb Security Id int dw Reserved return Browser INET E DEFAULT ACTION  GetSecurityId pwszUrl pbSecurityId pcbSecurityId dwReserved INET_E_DEFAULT_ACTION
int Process Url Action int pwsz Url int dw Action int p Policy int cb Policy int p Context int cb Context int dw Flags int dw Reserved Feature in IE 6 sp1 HTML rendered in memory containing an OBJECT tag referring to a local file brings up a warning dialog asking the user whether it should proceed or not The workaround is to set the policy to URLPOLICY ALLOW in this case dw Action value of 0x1406 Feature in IE Security Patches and user settings affect the way the embedded web control behaves The current approach is to consider the content trusted and allow all UR Ls by default int policy Browser URLPOLICY ALLOW Note The URLACTION JAVA flags refer to the applet tag that normally resolve to the Microsoft VM not to the java OBJECT tag that resolves to the Sun plugin Return URLPOLICY JAVA LOW to authorize applets instead of URLPOLICY ALLOW that is interpreted as URLPOLICY JAVA PROHIBIT in this context if dw Action Browser URLACTION JAVA MIN dw Action Browser URLACTION JAVA MAX policy Browser URLPOLICY JAVA LOW if dw Action Browser URLACTION ACTIVEX MIN dw Action Browser URLACTION ACTIVEX MAX int cnt OS wcslen pwsz Url char buffer new char cnt Note pwsz Url is unicode on both unicode and ansi platforms The nbr of chars is multiplied by the constant 2 and not by TCHAR sizeof since TCHAR sizeof returns 1 on ansi platforms OS Move Memory buffer pwsz Url cnt 2 String url new String buffer Note Some ActiveX plugins crash when executing inside the embedded explorer itself running into a JVM The current workaround is to detect when such ActiveX is about to be started and refuse to execute it ActiveX blocked based on URL extension Shockwave director plugin mime application x director if url ends With dcr policy Browser URLPOLICY DISALLOW NON NLS 1 if cb Policy 4 COM Move Memory p Policy new int policy 4 return COM S OK  ProcessUrlAction pwszUrl dwAction pPolicy cbPolicy pContext cbContext dwFlags dwReserved URLPOLICY_ALLOW dwAction URLs URLPOLICY_ALLOW URLACTION_JAVA URLPOLICY_JAVA_LOW URLPOLICY_ALLOW URLPOLICY_JAVA_PROHIBIT dwAction URLACTION_JAVA_MIN dwAction URLACTION_JAVA_MAX URLPOLICY_JAVA_LOW dwAction URLACTION_ACTIVEX_MIN dwAction URLACTION_ACTIVEX_MAX pwszUrl pwszUrl MoveMemory pwszUrl endsWith URLPOLICY_DISALLOW cbPolicy MoveMemory pPolicy S_OK
int Query Custom Policy int pwsz Url int guid Key int pp Policy int pcb Policy int p Context int cb Context int dw Reserved return Browser INET E DEFAULT ACTION  QueryCustomPolicy pwszUrl guidKey ppPolicy pcbPolicy pContext cbContext dwReserved INET_E_DEFAULT_ACTION
int Set Zone Mapping int dw Zone int lpsz Pattern int dw Flags return Browser INET E DEFAULT ACTION  SetZoneMapping dwZone lpszPattern dwFlags INET_E_DEFAULT_ACTION
int Get Zone Mappings int dw Zone int ppenum String int dw Flags return COM E NOTIMPL  GetZoneMappings dwZone ppenumString dwFlags E_NOTIMPL

Ole EnumFORMATETC createCOM Interfaces  OleEnumFORMATETC createCOMInterfaces
int Add Ref ref Count return ref Count  AddRef refCount refCount
register each of the interfaces that this object implements i Unknown new COM Object new int 2 0 0 public int method0 int args return Query Interface args 0 args 1  iUnknown COMObject QueryInterface
i Unknown new COM Object new int 2 0 0 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iUnknown COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
i EnumFORMATETC new COM Object new int 2 0 0 3 1 0 1 public int method0 int args return Query Interface args 0 args 1  iEnumFORMATETC COMObject QueryInterface
i EnumFORMATETC new COM Object new int 2 0 0 3 1 0 1 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iEnumFORMATETC COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Next args 0 args 1 args 2  AddRef
public int method2 int args return Release public int method3 int args return Next args 0 args 1 args 2 public int method4 int args return Skip args 0 
public int method3 int args return Next args 0 args 1 args 2 public int method4 int args return Skip args 0 public int method5 int args return Reset 
private void createCOM Interfaces register each of the interfaces that this object implements i Unknown new COM Object new int 2 0 0 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release i EnumFORMATETC new COM Object new int 2 0 0 3 1 0 1 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Next args 0 args 1 args 2 public int method4 int args return Skip args 0 public int method5 int args return Reset method6 Clone not implemented  createCOMInterfaces iUnknown COMObject QueryInterface AddRef iEnumFORMATETC COMObject QueryInterface AddRef
private void disposeCOM Interfaces if i Unknown null i Unknown dispose i Unknown null if i EnumFORMATETC null i EnumFORMATETC dispose i EnumFORMATETC null  disposeCOMInterfaces iUnknown iUnknown iUnknown iEnumFORMATETC iEnumFORMATETC iEnumFORMATETC
i EnumFORMATETC null int get Address return i EnumFORMATETC get Address  iEnumFORMATETC getAddress iEnumFORMATETC getAddress
private FORMATETC get Next Items int num Items if formats null num Items 1 return null int end Index index num Items 1 if end Index formats length 1 end Index formats length 1 if index end Index return null FORMATETC items new FORMATETC end Index index 1 for int i 0 i items length i items i formats index index return items  getNextItems numItems numItems endIndex numItems endIndex endIndex endIndex endIndex
private int Next int celt int rgelt int pcelt Fetched Retrieves the next celt items in the enumeration sequence If there are fewer than the requested number of elements left in the sequence it retrieves the remaining elements The number of elements actually retrieved is returned through pcelt Fetched unless the caller passed in NULL for that parameter if rgelt 0 return COM E INVALIDARG if pcelt Fetched 0 celt 1 return COM E INVALIDARG FORMATETC next Items get Next Items celt if next Items null for int i 0 i next Items length i COM Move Memory rgelt i FORMATETC sizeof next Items i FORMATETC sizeof if pcelt Fetched 0 COM Move Memory pcelt Fetched new int next Items length 4 if next Items length celt return COM S OK else if pcelt Fetched 0 COM Move Memory pcelt Fetched new int 0 4 COM Move Memory rgelt new FORMATETC FORMATETC sizeof return COM S FALSE  pceltFetched pceltFetched E_INVALIDARG pceltFetched E_INVALIDARG nextItems getNextItems nextItems nextItems MoveMemory nextItems pceltFetched MoveMemory pceltFetched nextItems nextItems S_OK pceltFetched MoveMemory pceltFetched MoveMemory S_FALSE
private int Query Interface int riid int ppv Object if riid 0 ppv Object 0 return COM E NOINTERFACE GUID guid new GUID COM Move Memory guid riid GUID sizeof if COM Is EqualGUID guid COM IIDI Unknown COM Move Memory ppv Object new int i Unknown get Address 4 Add Ref return COM S OK if COM Is EqualGUID guid COM IIDI EnumFORMATETC COM Move Memory ppv Object new int i EnumFORMATETC get Address 4 Add Ref return COM S OK COM Move Memory ppv Object new int 0 4 return COM E NOINTERFACE  QueryInterface ppvObject ppvObject E_NOINTERFACE MoveMemory IsEqualGUID IIDIUnknown MoveMemory ppvObject iUnknown getAddress AddRef S_OK IsEqualGUID IIDIEnumFORMATETC MoveMemory ppvObject iEnumFORMATETC getAddress AddRef S_OK MoveMemory ppvObject E_NOINTERFACE
int Release ref Count if ref Count 0 disposeCOM Interfaces COM Co Free Unused Libraries return ref Count  refCount refCount disposeCOMInterfaces CoFreeUnusedLibraries refCount
private int Reset Resets the enumeration sequence to the beginning index 0 return COM S OK  S_OK
return COM S OK void set Formats FORMATETC new Formats formats new Formats index 0  S_OK setFormats newFormats newFormats
private int Skip int celt Skips over the next specified number of elements in the enumeration sequence if celt 1 return COM E INVALIDARG index celt if index formats length 1 index formats length 1 return COM S FALSE return COM S OK  E_INVALIDARG S_FALSE S_OK

public static final short VARIANT FALSE 0 public static final native int CLSID From ProgID char lpsz ProgID GUID pclsid  VARIANT_FALSE CLSIDFromProgID lpszProgID
public static final native int CLSID From ProgID char lpsz ProgID GUID pclsid public static final native int CLSID From String char lpsz GUID pclsid  CLSIDFromProgID lpszProgID CLSIDFromString
public static final native int CLSID From String char lpsz GUID pclsid public static final native int Co Create Instance GUID rclsid int p Unk Outer int dw Cls Context GUID riid int ppv  CLSIDFromString CoCreateInstance pUnkOuter dwClsContext
public static final native void Co Free Unused Libraries  CoFreeUnusedLibraries
public static final native void Co Free Unused Libraries public static final native int Co Get Class Object GUID rclsid int dw Cls Context int p Server Info GUID riid int ppv  CoFreeUnusedLibraries CoGetClassObject dwClsContext pServerInfo
public static final native int Co Get Class Object GUID rclsid int dw Cls Context int p Server Info GUID riid int ppv public static final native int Co Lock Object External int p Unk Pointer to object to be locked or unlocked boolean f Lock TRUE lock FALSE unlock boolean f Last Unlock Releases TRUE release all pointers to object  CoGetClassObject dwClsContext pServerInfo CoLockObjectExternal pUnk fLock fLastUnlockReleases
boolean f Last Unlock Releases TRUE release all pointers to object public static final native int Co Task Mem Alloc int cb Size in bytes of memory block to be allocated  fLastUnlockReleases CoTaskMemAlloc
public static final native int Co Task Mem Alloc int cb Size in bytes of memory block to be allocated public static final native void Co Task Mem Free int pv  CoTaskMemAlloc CoTaskMemFree
public static final native void Co Task Mem Free int pv public static final native int Do Drag Drop int p Data Object Pointer to the data object int p Drop Source Pointer to the source int dwOK Effect Effects allowed by the source int pdw Effect Pointer to effects on the source  CoTaskMemFree DoDragDrop pDataObject pDropSource dwOKEffect pdwEffect
public static final native int Get Class File char sz File Name Pointer to filename for which you are requesting a CLSID GUID clsid Pointer to location for returning the CLSID  GetClassFile szFileName
GUID clsid Pointer to location for returning the CLSID public static final native int IID From String char lpsz GUID lpiid  IIDFromString
public static final native int IID From String char lpsz GUID lpiid private static GUID IID From String String lpsz create a null terminated array of char char buffer lpsz 0 to Char Array invoke system method GUID lpiid new GUID if COM IID From String buffer lpiid COM S OK return lpiid return null  IIDFromString IIDFromString toCharArray IIDFromString S_OK
return null public static final native boolean Is EqualGUID GUID rguid1 GUID rguid2  IsEqualGUID
public static final native boolean Is EqualGUID GUID rguid1 GUID rguid2 public static final native void Move Memory int Destination FORMATETC Source int Length  IsEqualGUID MoveMemory
public static final native boolean Is EqualGUID GUID rguid1 GUID rguid2 public static final native void Move Memory int Destination FORMATETC Source int Length public static final native void Move Memory int Destination Ptr GUID Source int Length  IsEqualGUID MoveMemory MoveMemory DestinationPtr
public static final native void Move Memory int Destination FORMATETC Source int Length public static final native void Move Memory int Destination Ptr GUID Source int Length public static final native void Move Memory int Destination Ptr OLEINPLACEFRAMEINFO Source int Length  MoveMemory MoveMemory DestinationPtr MoveMemory DestinationPtr
public static final native void Move Memory int Destination Ptr GUID Source int Length public static final native void Move Memory int Destination Ptr OLEINPLACEFRAMEINFO Source int Length public static final native void Move Memory int Destination STATSTG Source int Length  MoveMemory DestinationPtr MoveMemory DestinationPtr MoveMemory
public static final native void Move Memory int Destination Ptr OLEINPLACEFRAMEINFO Source int Length public static final native void Move Memory int Destination STATSTG Source int Length public static final native void Move Memory int Destination STGMEDIUM Source int Length  MoveMemory DestinationPtr MoveMemory MoveMemory
public static final native void Move Memory int Destination STATSTG Source int Length public static final native void Move Memory int Destination STGMEDIUM Source int Length public static final native void Move Memory STGMEDIUM Destination int Source Ptr int Length  MoveMemory MoveMemory MoveMemory SourcePtr
public static final native void Move Memory int Destination STGMEDIUM Source int Length public static final native void Move Memory STGMEDIUM Destination int Source Ptr int Length public static final native void Move Memory DISPPARAMS Destination int Source Ptr int Length  MoveMemory MoveMemory SourcePtr MoveMemory SourcePtr
public static final native void Move Memory STGMEDIUM Destination int Source Ptr int Length public static final native void Move Memory DISPPARAMS Destination int Source Ptr int Length public static final native void Move Memory FORMATETC Destination int Source int Length  MoveMemory SourcePtr MoveMemory SourcePtr MoveMemory
public static final native void Move Memory DISPPARAMS Destination int Source Ptr int Length public static final native void Move Memory FORMATETC Destination int Source int Length public static final native void Move Memory GUID Destination int Source Ptr int Length  MoveMemory SourcePtr MoveMemory MoveMemory SourcePtr
public static final native void Move Memory FORMATETC Destination int Source int Length public static final native void Move Memory GUID Destination int Source Ptr int Length public static final native void Move Memory STATSTG Destination int Source int Length  MoveMemory MoveMemory SourcePtr MoveMemory
public static final native void Move Memory GUID Destination int Source Ptr int Length public static final native void Move Memory STATSTG Destination int Source int Length public static final native void Move Memory TYPEATTR Destination int Source Ptr int Length  MoveMemory SourcePtr MoveMemory MoveMemory SourcePtr
public static final native void Move Memory STATSTG Destination int Source int Length public static final native void Move Memory TYPEATTR Destination int Source Ptr int Length public static final native void Move Memory RECT Destination int Source int Length  MoveMemory MoveMemory SourcePtr MoveMemory
public static final native void Move Memory TYPEATTR Destination int Source Ptr int Length public static final native void Move Memory RECT Destination int Source int Length public static final native void Move Memory FUNCDESC1 Destination int Source int Length  MoveMemory SourcePtr MoveMemory MoveMemory
public static final native void Move Memory RECT Destination int Source int Length public static final native void Move Memory FUNCDESC1 Destination int Source int Length public static final native void Move Memory VARDESC1 Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory FUNCDESC1 Destination int Source int Length public static final native void Move Memory VARDESC1 Destination int Source int Length public static final native void Move Memory FUNCDESC2 Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory VARDESC1 Destination int Source int Length public static final native void Move Memory FUNCDESC2 Destination int Source int Length public static final native void Move Memory VARDESC2 Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory VARDESC2 Destination int Source int Length public static final native int Ole Create GUID rclsid GUID riid int renderopt FORMATETC p Format Etc int p Client Site int p Stg int ppv Object  MoveMemory OleCreate pFormatEtc pClientSite pStg ppvObject
public static final native int Ole Create GUID rclsid GUID riid int renderopt FORMATETC p Format Etc int p Client Site int p Stg int ppv Object public static final native int Ole Create From File GUID rclsid Reserved Must be CLSID NULL char lpsz File Name Pointer to full path of file used to create object GUID riid Reference to the identifier of the interface to be used to communicate with new object int renderopt Value from OLERENDER FORMATETC p Format Etc Pointer to the FORMATETC structure int p Client Site Pointer to an interface int p Stg Pointer tothe interface to be used as object storage  OleCreate pFormatEtc pClientSite pStg ppvObject OleCreateFromFile CLSID_NULL lpszFileName pFormatEtc pClientSite pStg
int ppv Obj Address of output variable that receives the interface pointer requested in riid public static final native int Ole Create Property Frame int hwnd Owner int x int y char lpsz Caption int c Objects int lplp Unk int c Pages int lp Page ClsID int lcid int dw Reserved int lpv Reserved  ppvObj OleCreatePropertyFrame hwndOwner lpszCaption cObjects lplpUnk cPages lpPageClsID dwReserved lpvReserved
requested in riid public static final native int Ole Create Property Frame int hwnd Owner int x int y char lpsz Caption int c Objects int lplp Unk int c Pages int lp Page ClsID int lcid int dw Reserved int lpv Reserved public static final native int Ole Draw int p Unk Pointer to the view object to be drawn int dw Aspect How the object is to be represented int hdc Draw Device context on which to draw int lprc Bounds Pointer to the rectangle in which the object is drawn  OleCreatePropertyFrame hwndOwner lpszCaption cObjects lplpUnk cPages lpPageClsID dwReserved lpvReserved OleDraw pUnk dwAspect hdcDraw lprcBounds
int hdc Draw Device context on which to draw int lprc Bounds Pointer to the rectangle in which the object is drawn public static final native int Ole Flush Clipboard  hdcDraw lprcBounds OleFlushClipboard
int lprc Bounds Pointer to the rectangle in which the object is drawn public static final native int Ole Flush Clipboard public static final native int Ole Get Clipboard int pp Data Object  lprcBounds OleFlushClipboard OleGetClipboard ppDataObject
public static final native int Ole Flush Clipboard public static final native int Ole Get Clipboard int pp Data Object public static final native int Ole Is Current Clipboard int p Data Object  OleFlushClipboard OleGetClipboard ppDataObject OleIsCurrentClipboard pDataObject
public static final native int Ole Get Clipboard int pp Data Object public static final native int Ole Is Current Clipboard int p Data Object public static final native boolean Ole Is Running int p Object  OleGetClipboard ppDataObject OleIsCurrentClipboard pDataObject OleIsRunning pObject
public static final native boolean Ole Is Running int p Object public static final native int Ole Load int p Stg Pointer to the storage object from which to load GUID riid Reference to the identifier of the interface int p Client Site Pointer to the client site for the object int ppv Obj Address of output variable that receives the interface pointer requested in riid  OleIsRunning pObject OleLoad pStg pClientSite ppvObj
int ppv Obj Address of output variable that receives the interface pointer requested in riid public static final native int Ole Run int p Unknown  ppvObj OleRun pUnknown
public static final native int Ole Run int p Unknown public static final native int Ole Save int pPS int p Stg boolean f Same As Load  OleRun pUnknown OleSave pStg fSameAsLoad
public static final native int Ole Run int p Unknown public static final native int Ole Save int pPS int p Stg boolean f Same As Load public static final native int Ole Set Clipboard int p Data Object  OleRun pUnknown OleSave pStg fSameAsLoad OleSetClipboard pDataObject
public static final native int Ole Save int pPS int p Stg boolean f Same As Load public static final native int Ole Set Clipboard int p Data Object public static final native int Ole Set Contained Object int p Unk boolean f Contained  OleSave pStg fSameAsLoad OleSetClipboard pDataObject OleSetContainedObject pUnk fContained
public static final native int Ole Set Clipboard int p Data Object public static final native int Ole Set Contained Object int p Unk boolean f Contained public static final native int Ole Set Menu Descriptor int holemenu int hwnd Frame int hwnd Active Object int lp Frame int lp Active Obj  OleSetClipboard pDataObject OleSetContainedObject pUnk fContained OleSetMenuDescriptor hwndFrame hwndActiveObject lpFrame lpActiveObj
public static final native int Ole Set Contained Object int p Unk boolean f Contained public static final native int Ole Set Menu Descriptor int holemenu int hwnd Frame int hwnd Active Object int lp Frame int lp Active Obj public static final native int Ole Translate Color int clr int hpal int pcolorref  OleSetContainedObject pUnk fContained OleSetMenuDescriptor hwndFrame hwndActiveObject lpFrame lpActiveObj OleTranslateColor
public static final native int Ole Set Menu Descriptor int holemenu int hwnd Frame int hwnd Active Object int lp Frame int lp Active Obj public static final native int Ole Translate Color int clr int hpal int pcolorref public static final native int ProgID FromCLSID GUID clsid CLSID for which the ProgID is requested int lplpsz ProgID Address of output variable that receives a pointer to the requested ProgID string  OleSetMenuDescriptor hwndFrame hwndActiveObject lpFrame lpActiveObj OleTranslateColor ProgIDFromCLSID lplpszProgID
int lplpsz ProgID Address of output variable that receives a pointer to the requested ProgID string public static final native int Register Drag Drop int hwnd Handle to a window that can accept drops int p Drop Target Pointer to object that is to be target of drop  lplpszProgID RegisterDragDrop pDropTarget
int p Drop Target Pointer to object that is to be target of drop public static final native void Release Stg Medium int pmedium Pointer to storage medium to be freed  pDropTarget ReleaseStgMedium
int pmedium Pointer to storage medium to be freed public static final native int Revoke Drag Drop int hwnd Handle to a window that can accept drops  RevokeDragDrop
int hwnd Handle to a window that can accept drops public static final native int Stg Create Docfile char pwcs Name int grf Mode int reserved int ppstg Open  StgCreateDocfile pwcsName grfMode ppstgOpen
public static final native int Stg Create Docfile char pwcs Name int grf Mode int reserved int ppstg Open public static final native int Stg Is Storage File char pwcs Name Points to a path of the file to check  StgCreateDocfile pwcsName grfMode ppstgOpen StgIsStorageFile pwcsName
public static final native int Stg Open Storage char pwcs Name Points to the path of the file containing storage object int pstg Priority Points to a previous opening of a root storage object int grf Mode Specifies the access mode for the object int snb Exclude Points to an SNB structure specifying elements to be excluded int reserved Reserved must be zero int ppstg Open Address of output variable that receives the I Storage interface pointer  StgOpenStorage pwcsName pstgPriority grfMode snbExclude ppstgOpen IStorage
int ppstg Open Address of output variable that receives the I Storage interface pointer public static final native int String FromCLSID GUID rclsid int ppsz  ppstgOpen IStorage StringFromCLSID
public static final native int String FromCLSID GUID rclsid int ppsz public static final native int Sys Alloc String char sz  StringFromCLSID SysAllocString
public static final native int String FromCLSID GUID rclsid int ppsz public static final native int Sys Alloc String char sz public static final native void Sys Free String int bstr  StringFromCLSID SysAllocString SysFreeString
public static final native int Sys Alloc String char sz public static final native void Sys Free String int bstr public static final native int Sys String Byte Len int bstr  SysAllocString SysFreeString SysStringByteLen
public static final native void Sys Free String int bstr public static final native int Sys String Byte Len int bstr public static final native int Variant Change Type int pvarg Dest int pvar Src short w Flags short vt  SysFreeString SysStringByteLen VariantChangeType pvargDest pvarSrc wFlags
public static final native int Sys String Byte Len int bstr public static final native int Variant Change Type int pvarg Dest int pvar Src short w Flags short vt public static final native int Variant Clear int pvarg  SysStringByteLen VariantChangeType pvargDest pvarSrc wFlags VariantClear
public static final native int Variant Change Type int pvarg Dest int pvar Src short w Flags short vt public static final native int Variant Clear int pvarg public static final native void Variant Init int pvarg  VariantChangeType pvargDest pvarSrc wFlags VariantClear VariantInit
public static final native int Variant Clear int pvarg public static final native void Variant Init int pvarg public static final native int Vtbl Call int fn Number int pp Vtbl  VariantClear VariantInit VtblCall fnNumber ppVtbl
public static final native void Variant Init int pvarg public static final native int Vtbl Call int fn Number int pp Vtbl public static final native int Vtbl Call int fn Number int pp Vtbl char arg0  VariantInit VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl public static final native int Vtbl Call int fn Number int pp Vtbl char arg0 public static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl char arg0 public static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 public static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl char arg0 char arg1 public static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 public static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2 int arg3 int arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 public static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2 int arg3 int arg4 public static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2 int arg3 int arg4 int arg5  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2 int arg3 int arg4 public static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2 int arg3 int arg4 int arg5 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl char arg0 int arg1 int arg2 int arg3 int arg4 int arg5 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 DVTARGETDEVICE arg2 SIZE arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 DVTARGETDEVICE arg2 SIZE arg3 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 GUID arg2 int arg3 int arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 DVTARGETDEVICE arg2 SIZE arg3 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 GUID arg2 int arg3 int arg4 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 FORMATETC arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 GUID arg2 int arg3 int arg4 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 FORMATETC arg1 int arg2 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 GUID arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 FORMATETC arg1 int arg2 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 GUID arg1 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 GUID arg1 int arg2 int arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 GUID arg1 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 GUID arg1 int arg2 int arg3 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 GUID arg1 int arg2 int arg3 DISPPARAMS arg4 int arg5 EXCEPINFO arg6 int arg7  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 GUID arg1 int arg2 int arg3 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 GUID arg1 int arg2 int arg3 DISPPARAMS arg4 int arg5 EXCEPINFO arg6 int arg7 public static final native int Vtbl Call int pp Vtbl int fn Number int arg0 STATSTG arg1 int arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall ppVtbl fnNumber
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 GUID arg1 int arg2 int arg3 DISPPARAMS arg4 int arg5 EXCEPINFO arg6 int arg7 public static final native int Vtbl Call int pp Vtbl int fn Number int arg0 STATSTG arg1 int arg2 public static final native int Vtbl Call int fn Number int pp Vtbl MSG arg0  VtblCall fnNumber ppVtbl VtblCall ppVtbl fnNumber VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int pp Vtbl int fn Number int arg0 STATSTG arg1 int arg2 public static final native int Vtbl Call int fn Number int pp Vtbl MSG arg0 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 MSG arg1 int arg2 int arg3 int arg4 RECT arg5  VtblCall ppVtbl fnNumber VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl MSG arg0 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 MSG arg1 int arg2 int arg3 int arg4 RECT arg5 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 SIZE arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 MSG arg1 int arg2 int arg3 int arg4 RECT arg5 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 SIZE arg1 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 SIZE arg1 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 public static final native int Vtbl Call int fn Number int pp Vtbl CAUUID arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 boolean arg1 public static final native int Vtbl Call int fn Number int pp Vtbl CAUUID arg0 public static final native int Vtbl Call int pp Vtbl int fn Number CONTROLINFO arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall ppVtbl fnNumber
public static final native int Vtbl Call int fn Number int pp Vtbl CAUUID arg0 public static final native int Vtbl Call int pp Vtbl int fn Number CONTROLINFO arg0 public static final native int Vtbl Call int fn Number int pp Vtbl FORMATETC arg0  VtblCall fnNumber ppVtbl VtblCall ppVtbl fnNumber VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int pp Vtbl int fn Number CONTROLINFO arg0 public static final native int Vtbl Call int fn Number int pp Vtbl FORMATETC arg0 public static final native int Vtbl Call int fn Number int pp Vtbl FORMATETC arg0 STGMEDIUM arg1  VtblCall ppVtbl fnNumber VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl FORMATETC arg0 public static final native int Vtbl Call int fn Number int pp Vtbl FORMATETC arg0 STGMEDIUM arg1 public static final native int Vtbl Call int fn Number int pp Vtbl FORMATETC arg0 STGMEDIUM arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl FORMATETC arg0 STGMEDIUM arg1 public static final native int Vtbl Call int fn Number int pp Vtbl FORMATETC arg0 STGMEDIUM arg1 boolean arg2 public static final native int Vtbl Call int pp Vtbl int fn Number GUID arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall ppVtbl fnNumber
public static final native int Vtbl Call int fn Number int pp Vtbl FORMATETC arg0 STGMEDIUM arg1 boolean arg2 public static final native int Vtbl Call int pp Vtbl int fn Number GUID arg0 public static final native int Vtbl Call int pp Vtbl int fn Number GUID arg0 int arg1  VtblCall fnNumber ppVtbl VtblCall ppVtbl fnNumber VtblCall ppVtbl fnNumber
public static final native int Vtbl Call int pp Vtbl int fn Number GUID arg0 public static final native int Vtbl Call int pp Vtbl int fn Number GUID arg0 int arg1 public static final native int Vtbl Call int fn Number int pp Vtbl GUID arg0 int arg1 int arg2 int arg3 int arg4  VtblCall ppVtbl fnNumber VtblCall ppVtbl fnNumber VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int pp Vtbl int fn Number GUID arg0 int arg1 public static final native int Vtbl Call int fn Number int pp Vtbl GUID arg0 int arg1 int arg2 int arg3 int arg4 public static final native int Vtbl Call int fn Number int pp Vtbl GUID arg0 int arg1 int arg2 int arg3 int arg4  VtblCall ppVtbl fnNumber VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl GUID arg0 int arg1 int arg2 int arg3 int arg4 public static final native int Vtbl Call int fn Number int pp Vtbl GUID arg0 int arg1 int arg2 int arg3 int arg4 public static final native int Vtbl Call int fn Number int pp Vtbl GUID arg0 int arg1 OLECMD arg2 OLECMDTEXT arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl GUID arg0 int arg1 int arg2 int arg3 int arg4 public static final native int Vtbl Call int fn Number int pp Vtbl GUID arg0 int arg1 OLECMD arg2 OLECMDTEXT arg3 public static final native int Vtbl Call int fn Number int pp Vtbl LICINFO arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl GUID arg0 int arg1 OLECMD arg2 OLECMDTEXT arg3 public static final native int Vtbl Call int fn Number int pp Vtbl LICINFO arg0 public static final native int Vtbl Call int fn Number int pp Vtbl RECT arg0 int arg1 boolean arg2  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl LICINFO arg0 public static final native int Vtbl Call int fn Number int pp Vtbl RECT arg0 int arg1 boolean arg2 public static final native int Vtbl Call int fn Number int pp Vtbl RECT arg0 RECT arg1  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl RECT arg0 int arg1 boolean arg2 public static final native int Vtbl Call int fn Number int pp Vtbl RECT arg0 RECT arg1 public static final native int Vtbl Call int fn Number int pp Vtbl RECT arg0  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl RECT arg0 RECT arg1 public static final native int Vtbl Call int fn Number int pp Vtbl RECT arg0 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl RECT arg0 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 public static final native int Write Class Stg int p Stg GUID rclsid  VtblCall fnNumber ppVtbl WriteClassStg pStg
Start ACCESSIBILITY public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3  VtblCall fnNumber ppVtbl
Start ACCESSIBILITY public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 int arg5  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 int arg5 public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 int arg5 int arg6 int arg7  VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl VtblCall fnNumber ppVtbl
public static final native int Vtbl Call int fn Number int pp Vtbl int arg0 int arg1 int arg2 int arg3 int arg4 int arg5 int arg6 int arg7 public static final native int Create Std Accessible Object int hwnd int id Object GUID riid Interface int ppv Object  VtblCall fnNumber ppVtbl CreateStdAccessibleObject idObject riidInterface ppvObject
public static final native int Create Std Accessible Object int hwnd int id Object GUID riid Interface int ppv Object public static final native int Lresult From Object GUID riid int w Param int p Acc  CreateStdAccessibleObject idObject riidInterface ppvObject LresultFromObject wParam pAcc

public COM Object int arg Counts int callback Addresses new int arg Counts length for int i 0 length arg Counts length i length i if Callbacks i arg Counts i null Callbacks i arg Counts i new Callback this get Class callback i arg Counts i 1 true NON NLS 1 callback Addresses i Callbacks i arg Counts i get Address int p Vtable OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT 4 arg Counts length COM Move Memory p Vtable callback Addresses 4 arg Counts length pp Vtable OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT 4 COM Move Memory pp Vtable new int p Vtable 4 Object Map put new Integer pp Vtable this  COMObject argCounts callbackAddresses argCounts argCounts argCounts argCounts getClass argCounts callbackAddresses argCounts getAddress pVtable GlobalAlloc GMEM_FIXED GMEM_ZEROINIT argCounts MoveMemory pVtable callbackAddresses argCounts ppVtable GlobalAlloc GMEM_FIXED GMEM_ZEROINIT MoveMemory ppVtable pVtable ObjectMap ppVtable
public static GUID IID From String String lpsz create a null terminated array of char char buffer lpsz 0 to Char Array invoke system method GUID lpiid new GUID if COM IID From String buffer lpiid COM S OK return lpiid return null  IIDFromString toCharArray IIDFromString S_OK
static int callback0 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method0 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback1 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method1 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback2 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method2 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback3 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method3 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback4 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method4 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback5 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method5 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback6 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method6 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback7 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method7 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback8 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method8 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback9 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method9 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback10 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method10 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback11 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method11 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback12 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method12 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback13 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method13 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback14 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method14 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback15 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method15 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback16 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method16 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback17 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method17 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback18 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method18 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback19 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method19 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback20 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method20 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback21 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method21 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback22 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method22 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback23 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method23 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback24 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method24 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback25 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method25 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback26 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method26 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback27 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method27 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback28 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method28 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback29 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method29 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback30 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method30 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback31 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method31 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback32 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method32 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback33 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method33 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback34 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method34 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback35 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method35 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback36 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method36 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback37 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method37 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback38 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method38 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback39 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method39 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback40 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method40 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback41 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method41 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback42 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method42 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback43 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method43 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback44 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method44 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback45 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method45 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback46 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method46 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback47 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method47 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback48 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method48 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback49 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method49 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback50 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method50 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback51 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method51 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback52 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method52 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback53 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method53 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback54 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method54 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback55 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method55 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback56 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method56 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback57 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method57 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback58 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method58 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback59 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method59 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback60 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method60 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback61 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method61 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback62 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method62 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback63 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method63 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback64 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method64 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback65 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method65 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback66 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method66 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback67 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method67 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback68 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method68 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback69 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method69 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback70 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method70 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback71 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method71 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback72 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method72 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback73 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method73 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback74 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method74 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback75 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method75 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback76 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method76 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback77 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method77 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback78 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method78 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
static int callback79 int callback Args find the object on which this call was invoked int address callback Args 0 Object object Object Map get new Integer address if object null return COM E FAIL int args new int callback Args length 1 System arraycopy callback Args 1 args 0 args length return COM Object object method79 args  callbackArgs callbackArgs ObjectMap E_FAIL callbackArgs callbackArgs COMObject
public void dispose free the memory for this reference int p Vtable new int 1 OS Move Memory p Vtable pp Vtable 4 OS Global Free p Vtable 0 OS Global Free pp Vtable remove this pp Vtable from the list Object Map remove new Integer pp Vtable pp Vtable 0  pVtable MoveMemory pVtable ppVtable GlobalFree pVtable GlobalFree ppVtable ppVtable ObjectMap ppVtable ppVtable
pp Vtable 0 public int get Address return pp Vtable  ppVtable getAddress ppVtable
return pp Vtable public int method0 int args return COM E NOTIMPL  ppVtable E_NOTIMPL
return COM E NOTIMPL public int method1 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method2 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method3 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method4 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method5 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method6 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method7 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method8 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method9 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method10 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method11 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method12 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method13 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method14 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method15 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method16 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method17 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method18 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method19 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method20 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method21 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method22 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method23 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method24 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method25 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method26 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method27 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method28 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method29 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method30 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method31 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method32 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method33 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method34 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method35 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method36 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method37 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method38 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method39 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method40 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method41 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method42 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method43 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method44 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method45 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method46 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method47 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method48 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method49 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method50 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method51 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method52 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method53 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method54 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method55 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method56 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method57 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method58 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method59 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method60 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method61 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method62 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method63 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method64 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method65 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method66 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method67 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method68 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method69 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method70 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method71 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method72 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method73 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method74 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method75 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method76 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method77 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method78 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL
return COM E NOTIMPL public int method79 int args return COM E NOTIMPL  E_NOTIMPL E_NOTIMPL

public class I Accessible extends I Dispatch public I Accessible int address super address  IAccessible IDispatch IAccessible
public int get accParent int ppdisp Parent return COM Vtbl Call 7 address ppdisp Parent  get_accParent ppdispParent VtblCall ppdispParent
return COM Vtbl Call 7 address ppdisp Parent public int get accChildCount int pcount Children return COM Vtbl Call 8 address pcount Children  VtblCall ppdispParent get_accChildCount pcountChildren VtblCall pcountChildren
return COM Vtbl Call 8 address pcount Children public int get accChild int varChild vt int varChild reserved1 int varChild lVal int varChild reserved2 int ppdisp Child return COM Vtbl Call 9 address varChild vt varChild reserved1 varChild lVal varChild reserved2 ppdisp Child  VtblCall pcountChildren get_accChild varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 ppdispChild VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 ppdispChild
return COM Vtbl Call 9 address varChild vt varChild reserved1 varChild lVal varChild reserved2 ppdisp Child public int get accName int varChild vt int varChild reserved1 int varChild lVal int varChild reserved2 int psz Name return COM Vtbl Call 10 address varChild vt varChild reserved1 varChild lVal varChild reserved2 psz Name  VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 ppdispChild get_accName varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszName VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszName
return COM Vtbl Call 10 address varChild vt varChild reserved1 varChild lVal varChild reserved2 psz Name public int get accValue int varChild vt int varChild reserved1 int varChild lVal int varChild reserved2 int psz Value return COM Vtbl Call 11 address varChild vt varChild reserved1 varChild lVal varChild reserved2 psz Value  VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszName get_accValue varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszValue VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszValue
return COM Vtbl Call 11 address varChild vt varChild reserved1 varChild lVal varChild reserved2 psz Value public int get accDescription int varChild vt int varChild reserved1 int varChild lVal int varChild reserved2 int psz Description return COM Vtbl Call 12 address varChild vt varChild reserved1 varChild lVal varChild reserved2 psz Description  VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszValue get_accDescription varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszDescription VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszDescription
return COM Vtbl Call 12 address varChild vt varChild reserved1 varChild lVal varChild reserved2 psz Description public int get accRole int varChild vt int varChild reserved1 int varChild lVal int varChild reserved2 int pvar Role return COM Vtbl Call 13 address varChild vt varChild reserved1 varChild lVal varChild reserved2 pvar Role  VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszDescription get_accRole varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pvarRole VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pvarRole
return COM Vtbl Call 13 address varChild vt varChild reserved1 varChild lVal varChild reserved2 pvar Role public int get accState int varChild vt int varChild reserved1 int varChild lVal int varChild reserved2 int pvar State return COM Vtbl Call 14 address varChild vt varChild reserved1 varChild lVal varChild reserved2 pvar State  VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pvarRole get_accState varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pvarState VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pvarState
return COM Vtbl Call 14 address varChild vt varChild reserved1 varChild lVal varChild reserved2 pvar State public int get accHelp int varChild vt int varChild reserved1 int varChild lVal int varChild reserved2 int psz Help return COM Vtbl Call 15 address varChild vt varChild reserved1 varChild lVal varChild reserved2 psz Help  VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pvarState get_accHelp varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszHelp VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszHelp
return COM Vtbl Call 15 address varChild vt varChild reserved1 varChild lVal varChild reserved2 psz Help public int get accHelpTopic int psz Help File int varChild vt int varChild reserved1 int varChild lVal int varChild reserved2 int pid Topic return COM Vtbl Call 16 address psz Help File varChild vt varChild reserved1 varChild lVal varChild reserved2 pid Topic  VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszHelp get_accHelpTopic pszHelpFile varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pidTopic VtblCall pszHelpFile varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pidTopic
return COM Vtbl Call 16 address psz Help File varChild vt varChild reserved1 varChild lVal varChild reserved2 pid Topic public int get accKeyboardShortcut int varChild vt int varChild reserved1 int varChild lVal int varChild reserved2 int psz Keyboard Shortcut return COM Vtbl Call 17 address varChild vt varChild reserved1 varChild lVal varChild reserved2 psz Keyboard Shortcut  VtblCall pszHelpFile varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pidTopic get_accKeyboardShortcut varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszKeyboardShortcut VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszKeyboardShortcut
return COM Vtbl Call 17 address varChild vt varChild reserved1 varChild lVal varChild reserved2 psz Keyboard Shortcut public int get accFocus int pvar Child return COM Vtbl Call 18 address pvar Child  VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszKeyboardShortcut get_accFocus pvarChild VtblCall pvarChild
return COM Vtbl Call 18 address pvar Child public int get accSelection int pvar Children return COM Vtbl Call 19 address pvar Children  VtblCall pvarChild get_accSelection pvarChildren VtblCall pvarChildren
return COM Vtbl Call 19 address pvar Children public int get accDefaultAction int varChild vt int varChild reserved1 int varChild lVal int varChild reserved2 int psz Default Action return COM Vtbl Call 20 address varChild vt varChild reserved1 varChild lVal varChild reserved2 psz Default Action  VtblCall pvarChildren get_accDefaultAction varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszDefaultAction VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszDefaultAction
return COM Vtbl Call 20 address varChild vt varChild reserved1 varChild lVal varChild reserved2 psz Default Action public int acc Select int flags Select int varChild vt int varChild reserved1 int varChild lVal int varChild reserved2 return COM Vtbl Call 21 address flags Select varChild vt varChild reserved1 varChild lVal varChild reserved2  VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 pszDefaultAction accSelect flagsSelect varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 VtblCall flagsSelect varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2
return COM Vtbl Call 21 address flags Select varChild vt varChild reserved1 varChild lVal varChild reserved2 public int acc Location int px Left int py Top int pcx Width int pcy Height int varChild vt int varChild reserved1 int varChild lVal int varChild reserved2 return COM Vtbl Call 22 address px Left py Top pcx Width pcy Height varChild vt varChild reserved1 varChild lVal varChild reserved2  VtblCall flagsSelect varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 accLocation pxLeft pyTop pcxWidth pcyHeight varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 VtblCall pxLeft pyTop pcxWidth pcyHeight varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2
return COM Vtbl Call 22 address px Left py Top pcx Width pcy Height varChild vt varChild reserved1 varChild lVal varChild reserved2 public int acc Navigate int nav Dir int varStart vt int varStart reserved1 int varStart lVal int varStart reserved2 int pvar End Up At return COM Vtbl Call 23 address nav Dir varStart vt varStart reserved1 varStart lVal varStart reserved2 pvar End Up At  VtblCall pxLeft pyTop pcxWidth pcyHeight varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 accNavigate navDir varStart_vt varStart_reserved1 varStart_lVal varStart_reserved2 pvarEndUpAt VtblCall navDir varStart_vt varStart_reserved1 varStart_lVal varStart_reserved2 pvarEndUpAt
return COM Vtbl Call 23 address nav Dir varStart vt varStart reserved1 varStart lVal varStart reserved2 pvar End Up At public int acc Hit Test int x Left int y Top int pvar Child return COM Vtbl Call 24 address x Left y Top pvar Child  VtblCall navDir varStart_vt varStart_reserved1 varStart_lVal varStart_reserved2 pvarEndUpAt accHitTest xLeft yTop pvarChild VtblCall xLeft yTop pvarChild
return COM Vtbl Call 24 address x Left y Top pvar Child public int acc Do Default Action int varChild vt int varChild reserved1 int varChild lVal int varChild reserved2 return COM Vtbl Call 25 address varChild vt varChild reserved1 varChild lVal varChild reserved2  VtblCall xLeft yTop pvarChild accDoDefaultAction varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2
return COM Vtbl Call 25 address varChild vt varChild reserved1 varChild lVal varChild reserved2 public int put accName int varChild vt int varChild reserved1 int varChild lVal int varChild reserved2 int sz Name return COM Vtbl Call 26 address varChild vt varChild reserved1 varChild lVal varChild reserved2 sz Name  VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 put_accName varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 szName VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 szName
return COM Vtbl Call 26 address varChild vt varChild reserved1 varChild lVal varChild reserved2 sz Name public int put accValue int varChild vt int varChild reserved1 int varChild lVal int varChild reserved2 int sz Value return COM Vtbl Call 27 address varChild vt varChild reserved1 varChild lVal varChild reserved2 sz Value  VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 szName put_accValue varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 szValue VtblCall varChild_vt varChild_reserved1 varChild_lVal varChild_reserved2 szValue

public class I Class Factory2 extends I Unknown public I Class Factory2 int address super address  IClassFactory2 IUnknown IClassFactory2
super address public int Create Instance Lic int p Unk Outer int p Unk Reserved GUID riid int bstr Key int ppv Object return COM Vtbl Call 7 address p Unk Outer p Unk Reserved riid bstr Key ppv Object  CreateInstanceLic pUnkOuter pUnkReserved bstrKey ppvObject VtblCall pUnkOuter pUnkReserved bstrKey ppvObject
return COM Vtbl Call 7 address p Unk Outer p Unk Reserved riid bstr Key ppv Object public int Get Lic Info LICINFO lic Info return COM Vtbl Call 5 address lic Info  VtblCall pUnkOuter pUnkReserved bstrKey ppvObject GetLicInfo licInfo VtblCall licInfo
return COM Vtbl Call 5 address lic Info public int Request Lic Key int dw Reserved int p Bstr Key return COM Vtbl Call 6 address dw Reserved p Bstr Key  VtblCall licInfo RequestLicKey dwReserved pBstrKey VtblCall dwReserved pBstrKey

public class I Connection Point extends I Unknown public I Connection Point int address super address  IConnectionPoint IUnknown IConnectionPoint
super address public int Advise int p Unk int pdw Cookie return COM Vtbl Call 5 address p Unk pdw Cookie  pUnk pdwCookie VtblCall pUnk pdwCookie
return COM Vtbl Call 5 address p Unk pdw Cookie public int Unadvise int dw Cookie return COM Vtbl Call 6 address dw Cookie  VtblCall pUnk pdwCookie dwCookie VtblCall dwCookie

public class I Connection Point Container extends I Unknown public I Connection Point Container int address super address  IConnectionPointContainer IUnknown IConnectionPointContainer
super address public int Find Connection Point GUID riid int ppCP return COM Vtbl Call 4 address riid ppCP  FindConnectionPoint VtblCall

public class I Data Object extends I Unknown public I Data Object int address super address  IDataObject IUnknown IDataObject
super address public int Enum Format Etc int dw Direction int ppenum Formatetc return COM Vtbl Call 8 address dw Direction ppenum Formatetc  EnumFormatEtc dwDirection ppenumFormatetc VtblCall dwDirection ppenumFormatetc
public int Get Data FORMATETC p Formatetc STGMEDIUM pmedium Called by a data consumer to obtain data from a source data object The Get Data method renders the data described in the specified FORMATETC structure and transfers it through the specified STGMEDIUM structure The caller then assumes responsibility for releasing the STGMEDIUM structure return COM Vtbl Call 3 address p Formatetc pmedium  GetData pFormatetc GetData VtblCall pFormatetc
public int Get Data Here FORMATETC p Formatetc STGMEDIUM pmedium Called by a data consumer to obtain data from a source data object This method differs from the Get Data method in that the caller must allocate and free the specified storage medium return COM Vtbl Call 4 address p Formatetc pmedium  GetDataHere pFormatetc GetData VtblCall pFormatetc
return COM Vtbl Call 4 address p Formatetc pmedium public int Query Get Data FORMATETC p Formatetc return COM Vtbl Call 5 address p Formatetc  VtblCall pFormatetc QueryGetData pFormatetc VtblCall pFormatetc
public int Set Data FORMATETC p Formatetc Pointer to the FORMATETC structure STGMEDIUM pmedium Pointer to STGMEDIUM structure boolean f Release Indicates which object owns the storage medium after the call is completed return COM Vtbl Call 7 address p Formatetc pmedium f Release  SetData pFormatetc fRelease VtblCall pFormatetc fRelease

public class I Dispatch extends I Unknown public I Dispatch int address super address  IDispatch IUnknown IDispatch
public int GetI Ds Of Names GUID riid String rgsz Names int c Names int lcid int rg Disp Id char buffer int size rgsz Names length create an array to hold the addresses int h Heap OS Get Process Heap int pp Names OS Heap Alloc h Heap OS HEAP ZERO MEMORY size 4 int mem Tracker new int size try add the address of each string to the array for int i 0 i size i create a null terminated array of char for each String int name Size rgsz Names i length buffer new char name Size 1 rgsz Names i get Chars 0 name Size buffer 0 get the address of the start of the array of char int p Name OS Heap Alloc h Heap OS HEAP ZERO MEMORY buffer length 2 OS Move Memory p Name buffer buffer length 2 copy the address to the array of addresses COM Move Memory pp Names 4 i new int p Name 4 keep track of the Global Memory so we can free it mem Tracker i p Name return COM Vtbl Call 5 address new GUID pp Names c Names lcid rg Disp Id finally free the memory for int i 0 i mem Tracker length i OS Heap Free h Heap 0 mem Tracker i OS Heap Free h Heap 0 pp Names  GetIDsOfNames rgszNames cNames rgDispId rgszNames hHeap GetProcessHeap ppNames HeapAlloc hHeap HEAP_ZERO_MEMORY memTracker nameSize rgszNames nameSize rgszNames getChars nameSize pName HeapAlloc hHeap HEAP_ZERO_MEMORY MoveMemory pName MoveMemory ppNames pName memTracker pName VtblCall ppNames cNames rgDispId memTracker HeapFree hHeap memTracker HeapFree hHeap ppNames
public int Get Type Info int iT Info int lcid int ppT Info return COM Vtbl Call 4 address iT Info lcid ppT Info  GetTypeInfo iTInfo ppTInfo VtblCall iTInfo ppTInfo
return COM Vtbl Call 4 address iT Info lcid ppT Info public int Get Type Info Count int pctinfo return COM Vtbl Call 3 address pctinfo  VtblCall iTInfo ppTInfo GetTypeInfoCount VtblCall
return COM Vtbl Call 3 address pctinfo public int Invoke int disp Id Member GUID riid int lcid int dw Flags DISPPARAMS p Disp Params int p Var Result EXCEPINFO p Excep Info int p Arg Err return COM Vtbl Call 6 address disp Id Member riid lcid dw Flags p Disp Params p Var Result p Excep Info p Arg Err  VtblCall dispIdMember dwFlags pDispParams pVarResult pExcepInfo pArgErr VtblCall dispIdMember dwFlags pDispParams pVarResult pExcepInfo pArgErr

public class I Enum extends I Unknown public I Enum int address super address  IEnum IUnknown IEnum
super address public int Clone int ppenum return COM Vtbl Call 6 address ppenum  VtblCall
return COM Vtbl Call 6 address ppenum public int Next int celt int rgelt int pcelt Fetched return COM Vtbl Call 3 address celt rgelt pcelt Fetched  VtblCall pceltFetched VtblCall pceltFetched
return COM Vtbl Call 3 address celt rgelt pcelt Fetched public int Reset return COM Vtbl Call 5 address  VtblCall pceltFetched VtblCall
return COM Vtbl Call 5 address public int Skip int celt return COM Vtbl Call 4 address celt  VtblCall VtblCall

public class I EnumFORMATETC extends I Enum public I EnumFORMATETC int address super address  IEnumFORMATETC IEnum IEnumFORMATETC

public class I EnumSTATSTG extends I Enum public I EnumSTATSTG int address super address  IEnumSTATSTG IEnum IEnumSTATSTG

public class I EnumVARIANT extends I Enum public I EnumVARIANT int address super address  IEnumVARIANT IEnum IEnumVARIANT

public class I Font extends I Unknown public I Font int address super address  IFont IUnknown IFont
super address public int get hFont int phfont return COM Vtbl Call 3 address phfont  get_hFont VtblCall

public class I Moniker extends I Persist public I Moniker int address super address  IMoniker IPersist IMoniker

public class I Ole Command Target extends I Unknown public I Ole Command Target int address super address  IOleCommandTarget IUnknown IOleCommandTarget
public int Exec GUID pguid Cmd Group Pointer to command group int n CmdID Identifier of command to execute int n Cmd Exec Opt Options for executing the command int pva In Pointer to input arguments int pva Out Pointer to command output return COM Vtbl Call 4 address pguid Cmd Group n CmdID n Cmd Exec Opt pva In pva Out  pguidCmdGroup nCmdID nCmdExecOpt pvaIn pvaOut VtblCall pguidCmdGroup nCmdID nCmdExecOpt pvaIn pvaOut
public int Query Status GUID pguid Cmd Group Pointer to command group int c Cmds Number of commands in prg Cmds array OLECMD prg Cmds Array of commands OLECMDTEXT p Cmd Text Pointer to name or status of command we only support querying for one command at a time if c Cmds 1 return COM E INVALIDARG return COM Vtbl Call 3 address pguid Cmd Group c Cmds prg Cmds p Cmd Text  QueryStatus pguidCmdGroup cCmds prgCmds prgCmds pCmdText cCmds E_INVALIDARG VtblCall pguidCmdGroup cCmds prgCmds pCmdText

public class I Ole Control extends I Unknown public I Ole Control int address super address  IOleControl IUnknown IOleControl
super address public int Get Control Info CONTROLINFO pCI return COM Vtbl Call 3 address pCI  GetControlInfo VtblCall

public class I Ole Document extends I Unknown public I Ole Document int address super address  IOleDocument IUnknown IOleDocument
super address public int Create View int pIP Site int pstm int dw Reserved int pp View return COM Vtbl Call 3 address pIP Site pstm dw Reserved pp View  CreateView pIPSite dwReserved ppView VtblCall pIPSite dwReserved ppView

public class I Ole Document View extends I Unknown public I Ole Document View int address super address  IOleDocumentView IUnknown IOleDocumentView
public int Set In Place Site int pIP Site return COM Vtbl Call 3 address pIP Site  SetInPlaceSite pIPSite VtblCall pIPSite
return COM Vtbl Call 3 address pIP Site public int Set Rect RECT prc View return COM Vtbl Call 6 address prc View  VtblCall pIPSite SetRect prcView VtblCall prcView
return COM Vtbl Call 6 address prc View public int Show int f Show return COM Vtbl Call 9 address f Show  VtblCall prcView fShow VtblCall fShow
return COM Vtbl Call 9 address f Show public int UI Activate int fUI Activate return COM Vtbl Call 10 address fUI Activate  VtblCall fShow UIActivate fUIActivate VtblCall fUIActivate

public class I Ole In Place Active Object extends I Ole Window public I Ole In Place Active Object int address super address  IOleInPlaceActiveObject IOleWindow IOleInPlaceActiveObject
super address public int Translate Accelerator MSG lpmsg lpmsg Pointer to message that may need translating return COM Vtbl Call 5 address lpmsg  TranslateAccelerator VtblCall
return COM Vtbl Call 5 address lpmsg public int Resize Border RECT prc Border int pUI Window boolean f Frame Window return COM Vtbl Call 8 address prc Border pUI Window f Frame Window  VtblCall ResizeBorder prcBorder pUIWindow fFrameWindow VtblCall prcBorder pUIWindow fFrameWindow

public class I Ole In Place Object extends I Ole Window public I Ole In Place Object int address super address  IOleInPlaceObject IOleWindow IOleInPlaceObject
super address public int In Place Deactivate return COM Vtbl Call 5 address  InPlaceDeactivate VtblCall
return COM Vtbl Call 5 address public int UI Deactivate return COM Vtbl Call 6 address  VtblCall UIDeactivate VtblCall
return COM Vtbl Call 6 address public int Set Object Rects RECT lprc Pos Rect RECT lprc Clip Rect return COM Vtbl Call 7 address lprc Pos Rect lprc Clip Rect  VtblCall SetObjectRects lprcPosRect lprcClipRect VtblCall lprcPosRect lprcClipRect
return COM Vtbl Call 7 address lprc Pos Rect lprc Clip Rect public int Reactivate And Undo return COM Vtbl Call 8 address  VtblCall lprcPosRect lprcClipRect ReactivateAndUndo VtblCall

public class I Ole Link extends I Unknown public I Ole Link int address super address  IOleLink IUnknown IOleLink
super address public int Bind If Running return COM Vtbl Call 10 address  BindIfRunning VtblCall
return COM Vtbl Call 10 address public int Get Source Moniker int ppmk return COM Vtbl Call 6 address ppmk  VtblCall GetSourceMoniker VtblCall

public class I Ole Object extends I Unknown public I Ole Object int address super address  IOleObject IUnknown IOleObject
super address public int Advise int p Adv Sink int pdw Connection return COM Vtbl Call 19 address p Adv Sink pdw Connection  pAdvSink pdwConnection VtblCall pAdvSink pdwConnection
return COM Vtbl Call 19 address p Adv Sink pdw Connection public int Close int dw Save Option return COM Vtbl Call 6 address dw Save Option  VtblCall pAdvSink pdwConnection dwSaveOption VtblCall dwSaveOption
return COM Vtbl Call 6 address dw Save Option public int Do Verb int i Verb MSG lpmsg int p Active Site int lindex int hwnd Parent RECT lprc Pos Rect return COM Vtbl Call 11 address i Verb lpmsg p Active Site lindex hwnd Parent lprc Pos Rect  VtblCall dwSaveOption DoVerb iVerb pActiveSite hwndParent lprcPosRect VtblCall iVerb pActiveSite hwndParent lprcPosRect
return COM Vtbl Call 11 address i Verb lpmsg p Active Site lindex hwnd Parent lprc Pos Rect public int Get Extent int dw Draw Aspect SIZE p Sizel return COM Vtbl Call 18 address dw Draw Aspect p Sizel  VtblCall iVerb pActiveSite hwndParent lprcPosRect GetExtent dwDrawAspect pSizel VtblCall dwDrawAspect pSizel
return COM Vtbl Call 18 address dw Draw Aspect p Sizel public int Set Client Site int p Client Site return COM Vtbl Call 3 address p Client Site  VtblCall dwDrawAspect pSizel SetClientSite pClientSite VtblCall pClientSite
return COM Vtbl Call 3 address p Client Site public int Set Extent int dw Draw Aspect SIZE p Sizel return COM Vtbl Call 17 address dw Draw Aspect p Sizel  VtblCall pClientSite SetExtent dwDrawAspect pSizel VtblCall dwDrawAspect pSizel
public int Set Host Names String sz Container App String sz Container Obj create a null terminated array of char char buffer1 null if sz Container App null int count1 sz Container App length buffer1 new char count1 1 sz Container App get Chars 0 count1 buffer1 0 create a null terminated array of char char buffer2 null if sz Container Obj null int count2 sz Container Obj length buffer2 new char count2 1 sz Container Obj get Chars 0 count2 buffer2 0 return COM Vtbl Call 5 address buffer1 buffer2  SetHostNames szContainerApp szContainerObj szContainerApp szContainerApp szContainerApp getChars szContainerObj szContainerObj szContainerObj getChars VtblCall
return COM Vtbl Call 5 address buffer1 buffer2 public int Update return COM Vtbl Call 13 address  VtblCall VtblCall

public class I Ole Window extends I Unknown public I Ole Window int address super address  IOleWindow IUnknown IOleWindow
super address public int Get Window int phwnd return COM Vtbl Call 3 address phwnd  GetWindow VtblCall

public class I Persist extends I Unknown public I Persist int address super address  IPersist IUnknown IPersist
super address public int Get ClassID GUID p ClassID return COM Vtbl Call 3 address p ClassID  GetClassID pClassID VtblCall pClassID

public class I Persist Storage extends I Persist public I Persist Storage int address super address  IPersistStorage IPersist IPersistStorage
super address public int Is Dirty return COM Vtbl Call 4 address  IsDirty VtblCall
return COM Vtbl Call 4 address public int Init New int p Stg return COM Vtbl Call 5 address p Stg  VtblCall InitNew pStg VtblCall pStg
return COM Vtbl Call 5 address p Stg public int Load int p Stg return COM Vtbl Call 6 address p Stg  VtblCall pStg pStg VtblCall pStg
return COM Vtbl Call 6 address p Stg public int Save int p Stg Save boolean f Same As Load return COM Vtbl Call 7 address p Stg Save f Same As Load  VtblCall pStg pStgSave fSameAsLoad VtblCall pStgSave fSameAsLoad
return COM Vtbl Call 7 address p Stg Save f Same As Load public int Save Completed int p Stg New return COM Vtbl Call 8 address p Stg New  VtblCall pStgSave fSameAsLoad SaveCompleted pStgNew VtblCall pStgNew
return COM Vtbl Call 8 address p Stg New public int Hands Off Storage return COM Vtbl Call 9 address  VtblCall pStgNew HandsOffStorage VtblCall

public class I Persist Stream Init extends I Persist public I Persist Stream Init int address super address  IPersistStreamInit IPersist IPersistStreamInit
public int Load int p Stm return COM Vtbl Call 5 address p Stm  pStm VtblCall pStm
public int Init New return COM Vtbl Call 8 address  InitNew VtblCall

public class I Provide Class Info extends I Unknown public I Provide Class Info int address super address  IProvideClassInfo IUnknown IProvideClassInfo
super address public int Get Class Info int ppTI return COM Vtbl Call 3 address ppTI  GetClassInfo VtblCall

public class I Provide Class Info2 extends I Provide Class Info public I Provide Class Info2 int address super address  IProvideClassInfo2 IProvideClassInfo IProvideClassInfo2
super address public int GetGUID int dw Guid Kind GUID pGUID return COM Vtbl Call 4 address dw Guid Kind pGUID  dwGuidKind VtblCall dwGuidKind

public class I Specify Property Pages extends I Unknown public I Specify Property Pages int address super address  ISpecifyPropertyPages IUnknown ISpecifyPropertyPages
super address public int Get Pages CAUUID p Pages return COM Vtbl Call 3 address p Pages  GetPages pPages VtblCall pPages

public class I Storage extends I Unknown public I Storage int address super address  IStorage IUnknown IStorage
super address public int Commit int grf Commit Flag return COM Vtbl Call 9 address grf Commit Flag  grfCommitFlag VtblCall grfCommitFlag
public int Copy To int ciid Exclude Number of elements in rgiid Exclude GUID rgiid Exclude Array of interface identifiers II Ds String snb Exclude Points to a block of stream names in the storage object int pstg Dest Points to destination storage object we only support snb Exclude null if snb Exclude null return COM E INVALIDARG return COM Vtbl Call 7 address ciid Exclude rgiid Exclude 0 pstg Dest  CopyTo ciidExclude rgiidExclude rgiidExclude IIDs snbExclude pstgDest snbExclude snbExclude E_INVALIDARG VtblCall ciidExclude rgiidExclude pstgDest
public int Create Storage String pwcs Name Pointer to the name of the new storage object int grf Mode Access mode for the new storage object int reserved1 Reserved must be zero int reserved2 Reserved must be zero int pp Stg Pointer to new storage object create a null terminated array of char char buffer null if pwcs Name null buffer pwcs Name 0 to Char Array return COM Vtbl Call 5 address buffer grf Mode reserved1 reserved2 pp Stg  CreateStorage pwcsName grfMode ppStg pwcsName pwcsName toCharArray VtblCall grfMode ppStg
public int Create Stream String pwcs Name Pointer to the name of the new stream int grf Mode Access mode for the new stream int reserved1 Reserved must be zero int reserved2 Reserved must be zero int pp Stm Pointer to new stream object create a null terminated array of char char buffer null if pwcs Name null buffer pwcs Name 0 to Char Array return COM Vtbl Call 3 address buffer grf Mode reserved1 reserved2 pp Stm  CreateStream pwcsName grfMode ppStm pwcsName pwcsName toCharArray VtblCall grfMode ppStm
public int Destroy Element String pwcs Name create a null terminated array of char char buffer null if pwcs Name null buffer pwcs Name 0 to Char Array return COM Vtbl Call 12 address buffer  DestroyElement pwcsName pwcsName pwcsName toCharArray VtblCall
public int Enum Elements int reserved1 Reserved must be zero int reserved2 Reserved must be NULL int reserved3 Reserved must be zero int ppenum Pointer to output variable that receives the I EnumSTATSTG interface return COM Vtbl Call 11 address reserved1 reserved2 reserved3 ppenum  EnumElements IEnumSTATSTG VtblCall
public int Open Storage String pwcs Name Pointer to the name of the storage object to open int pstg Priority Must be NULL int grf Mode Access mode for the new storage object String snb Exclude Must be NULL int reserved Reserved must be zero int pp Stg Pointer to opened storage object create a null terminated array of char char buffer null if pwcs Name null buffer pwcs Name 0 to Char Array we only support the case where snb Exclude null if snb Exclude null return COM E INVALIDARG return COM Vtbl Call 6 address buffer pstg Priority grf Mode 0 reserved pp Stg  OpenStorage pwcsName pstgPriority grfMode snbExclude ppStg pwcsName pwcsName toCharArray snbExclude snbExclude E_INVALIDARG VtblCall pstgPriority grfMode ppStg
public int Open Stream String pwcs Name Pointer to name of stream to open int reserved1 Reserved must be NULL int grf Mode Access mode for the new stream int reserved2 Reserved must be zero int pp Stm Pointer to output variable that receives the I Stream interface pointer create a null terminated array of char char buffer null if pwcs Name null buffer pwcs Name 0 to Char Array return COM Vtbl Call 4 address buffer reserved1 grf Mode reserved2 pp Stm  OpenStream pwcsName grfMode ppStm IStream pwcsName pwcsName toCharArray VtblCall grfMode ppStm
public int Rename Element String pwcs Old Name Pointer to the name of the element to be changed String pwcs New Name Pointer to the new name for the specified element create a null terminated array of char char buffer1 null if pwcs Old Name null buffer1 pwcs Old Name 0 to Char Array create a null terminated array of char char buffer2 null if pwcs New Name null buffer2 pwcs New Name 0 to Char Array return COM Vtbl Call 13 address buffer1 buffer2  RenameElement pwcsOldName pwcsNewName pwcsOldName pwcsOldName toCharArray pwcsNewName pwcsNewName toCharArray VtblCall
return COM Vtbl Call 13 address buffer1 buffer2 public int Revert return COM Vtbl Call 10 address  VtblCall VtblCall
public int Set Class GUID clsid CLSID to be assigned to the storage object return COM Vtbl Call 15 address clsid  SetClass VtblCall

public class I Stream extends I Unknown public I Stream int address super address  IStream IUnknown IStream
public int Clone int ppstm Pointer to location for pointer to the new stream object return COM Vtbl Call 13 address ppstm  VtblCall
return COM Vtbl Call 13 address ppstm public int Commit int grf Commit Flags Specifies how changes are committed return COM Vtbl Call 8 address grf Commit Flags  VtblCall grfCommitFlags VtblCall grfCommitFlags
return COM Vtbl Call 8 address grf Commit Flags public int Read int pv int cb int pcb Written return COM Vtbl Call 3 address pv cb pcb Written  VtblCall grfCommitFlags pcbWritten VtblCall pcbWritten
return COM Vtbl Call 3 address pv cb pcb Written public int Revert return COM Vtbl Call 9 address  VtblCall pcbWritten VtblCall
return COM Vtbl Call 9 address public int Write int pv int cb int pcb Written return COM Vtbl Call 4 address pv cb pcb Written  VtblCall pcbWritten VtblCall pcbWritten

public I Type Info int address super address  ITypeInfo
public int Get Documentation int index String name String doc String int pdw Help Context String help File int p Bstr Name null if name null p Bstr Name new int 1 int p Bstr Doc String null if doc String null p Bstr Doc String new int 1 int p Bstr Help File null if help File null p Bstr Help File new int 1 int rc COM Vtbl Call 12 address index p Bstr Name p Bstr Doc String pdw Help Context p Bstr Help File if name null p Bstr Name 0 0 int size COM Sys String Byte Len p Bstr Name 0 if size 0 get the unicode character array from the global memory and create a String char buffer new char size 1 2 add one to avoid rounding errors COM Move Memory buffer p Bstr Name 0 size name 0 new String buffer int subindex name 0 index Of 0 if subindex 0 name 0 name 0 substring 0 subindex COM Sys Free String p Bstr Name 0 if doc String null p Bstr Doc String 0 0 int size COM Sys String Byte Len p Bstr Doc String 0 if size 0 get the unicode character array from the global memory and create a String char buffer new char size 1 2 add one to avoid rounding errors COM Move Memory buffer p Bstr Doc String 0 size doc String 0 new String buffer int subindex doc String 0 index Of 0 if subindex 0 doc String 0 doc String 0 substring 0 subindex COM Sys Free String p Bstr Doc String 0 if help File null p Bstr Help File 0 0 int size COM Sys String Byte Len p Bstr Help File 0 if size 0 get the unicode character array from the global memory and create a String char buffer new char size 1 2 add one to avoid rounding errors COM Move Memory buffer p Bstr Help File 0 size help File 0 new String buffer int subindex help File 0 index Of 0 if subindex 0 help File 0 help File 0 substring 0 subindex COM Sys Free String p Bstr Help File 0 return rc  GetDocumentation docString pdwHelpContext helpFile pBstrName pBstrName pBstrDocString docString pBstrDocString pBstrHelpFile helpFile pBstrHelpFile VtblCall pBstrName pBstrDocString pdwHelpContext pBstrHelpFile pBstrName SysStringByteLen pBstrName MoveMemory pBstrName indexOf SysFreeString pBstrName docString pBstrDocString SysStringByteLen pBstrDocString MoveMemory pBstrDocString docString docString indexOf docString docString SysFreeString pBstrDocString helpFile pBstrHelpFile SysStringByteLen pBstrHelpFile MoveMemory pBstrHelpFile helpFile helpFile indexOf helpFile helpFile SysFreeString pBstrHelpFile
return rc public int Get Func Desc int index int pp Func Desc return COM Vtbl Call 5 address index pp Func Desc  GetFuncDesc ppFuncDesc VtblCall ppFuncDesc
public int GetI Ds Of Names String rgsz Names int c Names int p Mem Id char buffer int size rgsz Names length create an array to hold the addresses int h Heap OS Get Process Heap int pp Names OS Heap Alloc h Heap OS HEAP ZERO MEMORY size 4 int mem Tracker new int size try add the address of each string to the array for int i 0 i size i create a null terminated array of char for each String int name Size rgsz Names i length buffer new char name Size 1 rgsz Names i get Chars 0 name Size buffer 0 get the address of the start of the array of char int p Name OS Heap Alloc h Heap OS HEAP ZERO MEMORY buffer length 2 OS Move Memory p Name buffer buffer length 2 copy the address to the array of addresses COM Move Memory pp Names 4 i new int p Name 4 keep track of the Global Memory so we can free it mem Tracker i p Name return COM Vtbl Call 10 address pp Names c Names p Mem Id finally free the memory for int i 0 i mem Tracker length i OS Heap Free h Heap 0 mem Tracker i OS Heap Free h Heap 0 pp Names  GetIDsOfNames rgszNames cNames pMemId rgszNames hHeap GetProcessHeap ppNames HeapAlloc hHeap HEAP_ZERO_MEMORY memTracker nameSize rgszNames nameSize rgszNames getChars nameSize pName HeapAlloc hHeap HEAP_ZERO_MEMORY MoveMemory pName MoveMemory ppNames pName memTracker pName VtblCall ppNames cNames pMemId memTracker HeapFree hHeap memTracker HeapFree hHeap ppNames
public int Get Impl Type Flags int index int p Impl Type Flags return COM Vtbl Call 9 address index p Impl Type Flags  GetImplTypeFlags pImplTypeFlags VtblCall pImplTypeFlags
public int Get Names int memid String names int c Max Names int pc Names int name Size names length int rg Bstr Names new int name Size int rc COM Vtbl Call 7 address memid rg Bstr Names name Size pc Names if rc COM S OK for int i 0 i pc Names 0 i int size COM Sys String Byte Len rg Bstr Names i if size 0 get the unicode character array from the global memory and create a String char buffer new char size 1 2 add one to avoid rounding errors COM Move Memory buffer rg Bstr Names i size names i new String buffer int subindex names i index Of 0 if subindex 0 names i names i substring 0 subindex COM Sys Free String rg Bstr Names i return rc  GetNames cMaxNames pcNames nameSize rgBstrNames nameSize VtblCall rgBstrNames nameSize pcNames S_OK pcNames SysStringByteLen rgBstrNames MoveMemory rgBstrNames indexOf SysFreeString rgBstrNames
return rc public int Get Ref Type Info int h Ref Type int ppT Info return COM Vtbl Call 14 address h Ref Type ppT Info  GetRefTypeInfo hRefType ppTInfo VtblCall hRefType ppTInfo
return COM Vtbl Call 14 address h Ref Type ppT Info public int Get Ref Type Of Impl Type int index int p Ref Type return COM Vtbl Call 8 address index p Ref Type  VtblCall hRefType ppTInfo GetRefTypeOfImplType pRefType VtblCall pRefType
return COM Vtbl Call 8 address index p Ref Type public int Get Type Attr int pp Type Attr return COM Vtbl Call 3 address pp Type Attr  VtblCall pRefType GetTypeAttr ppTypeAttr VtblCall ppTypeAttr
return COM Vtbl Call 3 address pp Type Attr public int Get Var Desc int index int pp Var Desc return COM Vtbl Call 6 address index pp Var Desc  VtblCall ppTypeAttr GetVarDesc ppVarDesc VtblCall ppVarDesc
return COM Vtbl Call 6 address index pp Var Desc public int Release Func Desc int p Func Desc return COM Vtbl Call 20 address p Func Desc  VtblCall ppVarDesc ReleaseFuncDesc pFuncDesc VtblCall pFuncDesc
return COM Vtbl Call 20 address p Func Desc public int Release Type Attr int p Type Attr return COM Vtbl Call 19 address p Type Attr  VtblCall pFuncDesc ReleaseTypeAttr pTypeAttr VtblCall pTypeAttr
return COM Vtbl Call 19 address p Type Attr public int Release Var Desc int p Var Desc return COM Vtbl Call 21 address p Var Desc  VtblCall pTypeAttr ReleaseVarDesc pVarDesc VtblCall pVarDesc

int address public I Unknown int address this address address  IUnknown
this address address public int Add Ref return COM Vtbl Call 1 address  AddRef VtblCall
return COM Vtbl Call 1 address public int get Address return address  VtblCall getAddress
return address public int Query Interface GUID riid int ppv Object return COM Vtbl Call 0 address riid ppv Object  QueryInterface ppvObject VtblCall ppvObject
return COM Vtbl Call 0 address riid ppv Object public int Release return COM Vtbl Call 2 address  VtblCall ppvObject VtblCall

public class I View Object2 extends I Unknown public I View Object2 int address super address  IViewObject2 IUnknown IViewObject2
super address public int Get Extent int dw Aspect int lindex DVTARGETDEVICE ptd SIZE lpsizel return COM Vtbl Call 9 address dw Aspect lindex ptd lpsizel  GetExtent dwAspect VtblCall dwAspect
return COM Vtbl Call 9 address dw Aspect lindex ptd lpsizel public int Set Advise int dw Aspects int dw Advf int pI Advise Sink return COM Vtbl Call 7 address dw Aspects dw Advf pI Advise Sink  VtblCall dwAspect SetAdvise dwAspects dwAdvf pIAdviseSink VtblCall dwAspects dwAdvf pIAdviseSink

public static final LRESULT ZERO new LRESULT 0 public LRESULT int value this value value 

Ansi Unicode wrappers public static final int Call Window Proc int lp Prev Wnd Func int h Wnd int Msg int w Param int l Param if Is Unicode return Call Window ProcW lp Prev Wnd Func h Wnd Msg w Param l Param return Call Window ProcA lp Prev Wnd Func h Wnd Msg w Param l Param  CallWindowProc lpPrevWndFunc hWnd wParam lParam IsUnicode CallWindowProcW lpPrevWndFunc hWnd wParam lParam CallWindowProcA lpPrevWndFunc hWnd wParam lParam
public static final short Char Upper short ch if Is Unicode return Char UpperW ch return Char UpperA ch  CharUpper IsUnicode CharUpperW CharUpperA
public static final short Char Lower short ch if Is Unicode return Char LowerW ch return Char LowerA ch  CharLower IsUnicode CharLowerW CharLowerA
public static final boolean Choose Color CHOOSECOLOR lpcc if Is Unicode return Choose ColorW lpcc return Choose ColorA lpcc  ChooseColor IsUnicode ChooseColorW ChooseColorA
public static final boolean Choose Font CHOOSEFONT choose Font if Is Unicode return Choose FontW choose Font return Choose FontA choose Font  ChooseFont chooseFont IsUnicode ChooseFontW chooseFont ChooseFontA chooseFont
public static final int Create Accelerator Table byte lpaccl int c Entries if Is Unicode return Create Accelerator TableW lpaccl c Entries return Create Accelerator TableA lpaccl c Entries  CreateAcceleratorTable cEntries IsUnicode CreateAcceleratorTableW cEntries CreateAcceleratorTableA cEntries
public static final int CreateDC TCHAR lpsz Driver TCHAR lpsz Device int lpsz Output int lp Init Data if Is Unicode char lpsz Driver1 lpsz Driver null null lpsz Driver chars char lpsz Device1 lpsz Device null null lpsz Device chars return CreateDCW lpsz Driver1 lpsz Device1 lpsz Output lp Init Data byte lpsz Driver1 lpsz Driver null null lpsz Driver bytes byte lpsz Device1 lpsz Device null null lpsz Device bytes return CreateDCA lpsz Driver1 lpsz Device1 lpsz Output lp Init Data  lpszDriver lpszDevice lpszOutput lpInitData IsUnicode lpszDriver1 lpszDriver lpszDriver lpszDevice1 lpszDevice lpszDevice lpszDriver1 lpszDevice1 lpszOutput lpInitData lpszDriver1 lpszDriver lpszDriver lpszDevice1 lpszDevice lpszDevice lpszDriver1 lpszDevice1 lpszOutput lpInitData
public static final int Create Font Indirect int lplf if Is Unicode return Create Font IndirectW lplf return Create Font IndirectA lplf  CreateFontIndirect IsUnicode CreateFontIndirectW CreateFontIndirectA
public static final int Create Font Indirect LOGFONT lplf if Is Unicode return Create Font IndirectW LOGFONTW lplf return Create Font IndirectA LOGFONTA lplf  CreateFontIndirect IsUnicode CreateFontIndirectW CreateFontIndirectA
public static final int Create Window Ex int dw Ex Style TCHAR lp Class Name TCHAR lp Window Name int dw Style int X int Y int n Width int n Height int h Wnd Parent int h Menu int h Instance CREATESTRUCT lp Param if Is Unicode char lp Class Name1 lp Class Name null null lp Class Name chars char lp Window Name1 lp Window Name null null lp Window Name chars return Create Window ExW dw Ex Style lp Class Name1 lp Window Name1 dw Style X Y n Width n Height h Wnd Parent h Menu h Instance lp Param byte lp Class Name1 lp Class Name null null lp Class Name bytes byte lp Window Name1 lp Window Name null null lp Window Name bytes return Create Window ExA dw Ex Style lp Class Name1 lp Window Name1 dw Style X Y n Width n Height h Wnd Parent h Menu h Instance lp Param  CreateWindowEx dwExStyle lpClassName lpWindowName dwStyle nWidth nHeight hWndParent hMenu hInstance lpParam IsUnicode lpClassName1 lpClassName lpClassName lpWindowName1 lpWindowName lpWindowName CreateWindowExW dwExStyle lpClassName1 lpWindowName1 dwStyle nWidth nHeight hWndParent hMenu hInstance lpParam lpClassName1 lpClassName lpClassName lpWindowName1 lpWindowName lpWindowName CreateWindowExA dwExStyle lpClassName1 lpWindowName1 dwStyle nWidth nHeight hWndParent hMenu hInstance lpParam
public static final int DefMDI Child Proc int h Wnd int Msg int w Param int l Param if Is Unicode return DefMDI Child ProcW h Wnd Msg w Param l Param return DefMDI Child ProcA h Wnd Msg w Param l Param  DefMDIChildProc hWnd wParam lParam IsUnicode DefMDIChildProcW hWnd wParam lParam DefMDIChildProcA hWnd wParam lParam
public static final int Def Frame Proc int h Wnd int h WndMDI Client int Msg int w Param int l Param if Is Unicode return Def Frame ProcW h Wnd h WndMDI Client Msg w Param l Param return Def Frame ProcA h Wnd h WndMDI Client Msg w Param l Param  DefFrameProc hWnd hWndMDIClient wParam lParam IsUnicode DefFrameProcW hWnd hWndMDIClient wParam lParam DefFrameProcA hWnd hWndMDIClient wParam lParam
return Def Frame ProcA h Wnd h WndMDI Client Msg w Param l Param public static final int Def Window Proc int h Wnd int Msg int w Param int l Param if Is Unicode return Def Window ProcW h Wnd Msg w Param l Param return Def Window ProcA h Wnd Msg w Param l Param  DefFrameProcA hWnd hWndMDIClient wParam lParam DefWindowProc hWnd wParam lParam IsUnicode DefWindowProcW hWnd wParam lParam DefWindowProcA hWnd wParam lParam
public static final int Dispatch Message MSG lpmsg if Is Unicode return Dispatch MessageW lpmsg return Dispatch MessageA lpmsg  DispatchMessage IsUnicode DispatchMessageW DispatchMessageA
public static final int Drag Query File int h Drop int i File TCHAR lpsz File int cch if Is Unicode char lpsz File1 lpsz File null null lpsz File chars return Drag Query FileW h Drop i File lpsz File1 cch byte lpsz File1 lpsz File null null lpsz File bytes return Drag Query FileA h Drop i File lpsz File1 cch  DragQueryFile hDrop iFile lpszFile IsUnicode lpszFile1 lpszFile lpszFile DragQueryFileW hDrop iFile lpszFile1 lpszFile1 lpszFile lpszFile DragQueryFileA hDrop iFile lpszFile1
public static final boolean Draw State int hdc int hbr int lp Output Func int l Data int w Data int x int y int cx int cy int fu Flags if Is Unicode return Draw StateW hdc hbr lp Output Func l Data w Data x y cx cy fu Flags return Draw StateA hdc hbr lp Output Func l Data w Data x y cx cy fu Flags  DrawState lpOutputFunc lData wData fuFlags IsUnicode DrawStateW lpOutputFunc lData wData fuFlags DrawStateA lpOutputFunc lData wData fuFlags
public static final int Draw Text int hDC TCHAR lp String int n Count RECT lp Rect int u Format if Is Unicode char lp String1 lp String null null lp String chars return Draw TextW hDC lp String1 n Count lp Rect u Format byte lp String1 lp String null null lp String bytes return Draw TextA hDC lp String1 n Count lp Rect u Format  DrawText lpString nCount lpRect uFormat IsUnicode lpString1 lpString lpString DrawTextW lpString1 nCount lpRect uFormat lpString1 lpString lpString DrawTextA lpString1 nCount lpRect uFormat
public static final int Enum Font Families int hdc TCHAR lpsz Family int lp Enum Font Fam Proc int l Param if Is Unicode char lpsz Family1 lpsz Family null null lpsz Family chars return Enum Font FamiliesW hdc lpsz Family1 lp Enum Font Fam Proc l Param byte lpsz Family1 lpsz Family null null lpsz Family bytes return Enum Font FamiliesA hdc lpsz Family1 lp Enum Font Fam Proc l Param  EnumFontFamilies lpszFamily lpEnumFontFamProc lParam IsUnicode lpszFamily1 lpszFamily lpszFamily EnumFontFamiliesW lpszFamily1 lpEnumFontFamProc lParam lpszFamily1 lpszFamily lpszFamily EnumFontFamiliesA lpszFamily1 lpEnumFontFamProc lParam
public static final int Enum Font Families Ex int hdc LOGFONT lp Logfont int lp Enum Font Fam Ex Proc int l Param int dw Flags if Is Unicode return Enum Font Families ExW hdc LOGFONTW lp Logfont lp Enum Font Fam Ex Proc l Param dw Flags return Enum Font Families ExA hdc LOGFONTA lp Logfont lp Enum Font Fam Ex Proc l Param dw Flags  EnumFontFamiliesEx lpLogfont lpEnumFontFamExProc lParam dwFlags IsUnicode EnumFontFamiliesExW lpLogfont lpEnumFontFamExProc lParam dwFlags EnumFontFamiliesExA lpLogfont lpEnumFontFamExProc lParam dwFlags
public static final boolean Enum System Locales int lp Locale Enum Proc int dw Flags if Is Unicode return Enum System LocalesW lp Locale Enum Proc dw Flags return Enum System LocalesA lp Locale Enum Proc dw Flags  EnumSystemLocales lpLocaleEnumProc dwFlags IsUnicode EnumSystemLocalesW lpLocaleEnumProc dwFlags EnumSystemLocalesA lpLocaleEnumProc dwFlags
public static final boolean Enum System Language Groups int p Lang Group Enum Proc int dw Flags int l Param if Is Unicode return Enum System Language GroupsW p Lang Group Enum Proc dw Flags l Param return Enum System Language GroupsA p Lang Group Enum Proc dw Flags l Param  EnumSystemLanguageGroups pLangGroupEnumProc dwFlags lParam IsUnicode EnumSystemLanguageGroupsW pLangGroupEnumProc dwFlags lParam EnumSystemLanguageGroupsA pLangGroupEnumProc dwFlags lParam
public static final int Expand Environment Strings TCHAR lp Src TCHAR lp Dst int n Size if Is Unicode char lp Src1 lp Src null null lp Src chars char lp Dst1 lp Dst null null lp Dst chars return Expand Environment StringsW lp Src1 lp Dst1 n Size byte lp Src1 lp Src null null lp Src bytes byte lp Dst1 lp Dst null null lp Dst bytes return Expand Environment StringsA lp Src1 lp Dst1 n Size  ExpandEnvironmentStrings lpSrc lpDst nSize IsUnicode lpSrc1 lpSrc lpSrc lpDst1 lpDst lpDst ExpandEnvironmentStringsW lpSrc1 lpDst1 nSize lpSrc1 lpSrc lpSrc lpDst1 lpDst lpDst ExpandEnvironmentStringsA lpSrc1 lpDst1 nSize
public static final int Extract Icon Ex TCHAR lpsz File int n Icon Index int phicon Large int phicon Small int n Icons if Is Unicode char lpsz File1 lpsz File null null lpsz File chars return Extract Icon ExW lpsz File1 n Icon Index phicon Large phicon Small n Icons byte lpsz File1 lpsz File null null lpsz File bytes return Extract Icon ExA lpsz File1 n Icon Index phicon Large phicon Small n Icons  ExtractIconEx lpszFile nIconIndex phiconLarge phiconSmall nIcons IsUnicode lpszFile1 lpszFile lpszFile ExtractIconExW lpszFile1 nIconIndex phiconLarge phiconSmall nIcons lpszFile1 lpszFile lpszFile ExtractIconExA lpszFile1 nIconIndex phiconLarge phiconSmall nIcons
public static final boolean Ext Text Out int hdc int X int Y int fu Options RECT lprc TCHAR lp String int cb Count int lp Dx if Is Unicode char lp String1 lp String null null lp String chars return Ext Text OutW hdc X Y fu Options lprc lp String1 cb Count lp Dx byte lp String1 lp String null null lp String bytes return Ext Text OutA hdc X Y fu Options lprc lp String1 cb Count lp Dx  ExtTextOut fuOptions lpString cbCount lpDx IsUnicode lpString1 lpString lpString ExtTextOutW fuOptions lpString1 cbCount lpDx lpString1 lpString lpString ExtTextOutA fuOptions lpString1 cbCount lpDx
public static final int Find Window TCHAR lp Class Name TCHAR lp Window Name if Is Unicode char lp Class Name1 lp Class Name null null lp Class Name chars char lp Window Name1 lp Window Name null null lp Window Name chars return Find WindowW lp Class Name1 lp Window Name1 byte lp Class Name1 lp Class Name null null lp Class Name bytes byte lp Window Name1 lp Window Name null null lp Window Name bytes return Find WindowA lp Class Name1 lp Window Name1  FindWindow lpClassName lpWindowName IsUnicode lpClassName1 lpClassName lpClassName lpWindowName1 lpWindowName lpWindowName FindWindowW lpClassName1 lpWindowName1 lpClassName1 lpClassName lpClassName lpWindowName1 lpWindowName lpWindowName FindWindowA lpClassName1 lpWindowName1
public static final int Format Message int dw Flags int lp Source int dw Message Id int dw Language Id int lp Buffer int n Size int Arguments if Is Unicode return Format MessageW dw Flags lp Source dw Message Id dw Language Id lp Buffer n Size Arguments return Format MessageA dw Flags lp Source dw Message Id dw Language Id lp Buffer n Size Arguments  FormatMessage dwFlags lpSource dwMessageId dwLanguageId lpBuffer nSize IsUnicode FormatMessageW dwFlags lpSource dwMessageId dwLanguageId lpBuffer nSize FormatMessageA dwFlags lpSource dwMessageId dwLanguageId lpBuffer nSize
public static final boolean Get CharABC Widths int hdc int i First Char int i Last Char int lpabc if Is Unicode return Get CharABC WidthsW hdc i First Char i Last Char lpabc return Get CharABC WidthsA hdc i First Char i Last Char lpabc  GetCharABCWidths iFirstChar iLastChar IsUnicode GetCharABCWidthsW iFirstChar iLastChar GetCharABCWidthsA iFirstChar iLastChar
public static final int Get Character Placement int hdc TCHAR lp String int n Count int n Max Extent GCP RESULTS lp Results int dw Flags if Is Unicode char lp String1 lp String null null lp String chars return Get Character PlacementW hdc lp String1 n Count n Max Extent lp Results dw Flags byte lp String1 lp String null null lp String bytes return Get Character PlacementA hdc lp String1 n Count n Max Extent lp Results dw Flags  GetCharacterPlacement lpString nCount nMaxExtent GCP_RESULTS lpResults dwFlags IsUnicode lpString1 lpString lpString GetCharacterPlacementW lpString1 nCount nMaxExtent lpResults dwFlags lpString1 lpString lpString GetCharacterPlacementA lpString1 nCount nMaxExtent lpResults dwFlags
public static final boolean Get Char Width int hdc int i First Char int i Last Char int lpabc if Is Unicode return Get Char WidthW hdc i First Char i Last Char lpabc return Get Char WidthA hdc i First Char i Last Char lpabc  GetCharWidth iFirstChar iLastChar IsUnicode GetCharWidthW iFirstChar iLastChar GetCharWidthA iFirstChar iLastChar
public static final boolean Get Class Info int h Instance TCHAR lp Class Name WNDCLASS lp Wnd Class if Is Unicode char lp Class Name1 lp Class Name null null lp Class Name chars return Get Class InfoW h Instance lp Class Name1 lp Wnd Class byte lp Class Name1 lp Class Name null null lp Class Name bytes return Get Class InfoA h Instance lp Class Name1 lp Wnd Class  GetClassInfo hInstance lpClassName lpWndClass IsUnicode lpClassName1 lpClassName lpClassName GetClassInfoW hInstance lpClassName1 lpWndClass lpClassName1 lpClassName lpClassName GetClassInfoA hInstance lpClassName1 lpWndClass
public static final int Get Clipboard Format Name int format TCHAR lpsz Format Name int cch Max Count if Is Unicode char lpsz Format Name1 lpsz Format Name null null lpsz Format Name chars return Get Clipboard Format NameW format lpsz Format Name1 cch Max Count byte lpsz Format Name1 lpsz Format Name null null lpsz Format Name bytes return Get Clipboard Format NameA format lpsz Format Name1 cch Max Count  GetClipboardFormatName lpszFormatName cchMaxCount IsUnicode lpszFormatName1 lpszFormatName lpszFormatName GetClipboardFormatNameW lpszFormatName1 cchMaxCount lpszFormatName1 lpszFormatName lpszFormatName GetClipboardFormatNameA lpszFormatName1 cchMaxCount
public static final int Get Key Name Text int l Param TCHAR lp String int n Size if Is Unicode char lp String1 lp String null null lp String chars return Get Key Name TextW l Param lp String1 n Size byte lp String1 lp String null null lp String bytes return Get Key Name TextA l Param lp String1 n Size  GetKeyNameText lParam lpString nSize IsUnicode lpString1 lpString lpString GetKeyNameTextW lParam lpString1 nSize lpString1 lpString lpString GetKeyNameTextA lParam lpString1 nSize
public static final int Get Locale Info int Locale int LC Type TCHAR lpLC Data int cch Data if Is Unicode char lpLC Data1 lpLC Data null null lpLC Data chars return Get Locale InfoW Locale LC Type lpLC Data1 cch Data byte lpLC Data1 lpLC Data null null lpLC Data bytes return Get Locale InfoA Locale LC Type lpLC Data1 cch Data  GetLocaleInfo LCType lpLCData cchData IsUnicode lpLCData1 lpLCData lpLCData GetLocaleInfoW LCType lpLCData1 cchData lpLCData1 lpLCData lpLCData GetLocaleInfoA LCType lpLCData1 cchData
public static final boolean Get Menu Item Info int h Menu int u Item boolean f By Position MENUITEMINFO lpmii if Is Unicode return Get Menu Item InfoW h Menu u Item f By Position lpmii return Get Menu Item InfoA h Menu u Item f By Position lpmii  GetMenuItemInfo hMenu uItem fByPosition IsUnicode GetMenuItemInfoW hMenu uItem fByPosition GetMenuItemInfoA hMenu uItem fByPosition
public static final boolean Get Message MSG lp Msg int h Wnd int w Msg Filter Min int w Msg Filter Max if Is Unicode return Get MessageW lp Msg h Wnd w Msg Filter Min w Msg Filter Max return Get MessageA lp Msg h Wnd w Msg Filter Min w Msg Filter Max  GetMessage lpMsg hWnd wMsgFilterMin wMsgFilterMax IsUnicode GetMessageW lpMsg hWnd wMsgFilterMin wMsgFilterMax GetMessageA lpMsg hWnd wMsgFilterMin wMsgFilterMax
public static final int Get Module Handle TCHAR lp Module Name if Is Unicode char lp Module Name1 lp Module Name null null lp Module Name chars return Get Module HandleW lp Module Name1 byte lp Module Name1 lp Module Name null null lp Module Name bytes return Get Module HandleA lp Module Name1  GetModuleHandle lpModuleName IsUnicode lpModuleName1 lpModuleName lpModuleName GetModuleHandleW lpModuleName1 lpModuleName1 lpModuleName lpModuleName GetModuleHandleA lpModuleName1
public static final boolean Get Monitor Info int hmonitor MONITORINFO lpmi if Is Unicode return Get Monitor InfoW hmonitor lpmi return Get Monitor InfoA hmonitor lpmi  GetMonitorInfo IsUnicode GetMonitorInfoW GetMonitorInfoA
public static final int Get Object int hgdiobj int cb Buffer BITMAP lpv Object if Is Unicode return Get ObjectW hgdiobj cb Buffer lpv Object return Get ObjectA hgdiobj cb Buffer lpv Object  GetObject cbBuffer lpvObject IsUnicode GetObjectW cbBuffer lpvObject GetObjectA cbBuffer lpvObject
public static final int Get Object int hgdiobj int cb Buffer DIBSECTION lpv Object if Is Unicode return Get ObjectW hgdiobj cb Buffer lpv Object return Get ObjectA hgdiobj cb Buffer lpv Object  GetObject cbBuffer lpvObject IsUnicode GetObjectW cbBuffer lpvObject GetObjectA cbBuffer lpvObject
public static final int Get Object int hgdiobj int cb Buffer LOGBRUSH lpv Object if Is Unicode return Get ObjectW hgdiobj cb Buffer lpv Object return Get ObjectA hgdiobj cb Buffer lpv Object  GetObject cbBuffer lpvObject IsUnicode GetObjectW cbBuffer lpvObject GetObjectA cbBuffer lpvObject
public static final int Get Object int hgdiobj int cb Buffer LOGFONT lpv Object if Is Unicode return Get ObjectW hgdiobj cb Buffer LOGFONTW lpv Object return Get ObjectA hgdiobj cb Buffer LOGFONTA lpv Object  GetObject cbBuffer lpvObject IsUnicode GetObjectW cbBuffer lpvObject GetObjectA cbBuffer lpvObject
public static final int Get Object int hgdiobj int cb Buffer LOGPEN lpv Object if Is Unicode return Get ObjectW hgdiobj cb Buffer lpv Object return Get ObjectA hgdiobj cb Buffer lpv Object  GetObject cbBuffer lpvObject IsUnicode GetObjectW cbBuffer lpvObject GetObjectA cbBuffer lpvObject
public static final boolean Get Open File Name OPENFILENAME lpofn if Is Unicode return Get Open File NameW lpofn return Get Open File NameA lpofn  GetOpenFileName IsUnicode GetOpenFileNameW GetOpenFileNameA
public static final int Get Profile String TCHAR lp App Name TCHAR lp Key Name TCHAR lp Default TCHAR lp Returned String int n Size if Is Unicode char lp App Name1 lp App Name null null lp App Name chars char lp Key Name1 lp Key Name null null lp Key Name chars char lp Default1 lp Default null null lp Default chars char lp Returned String1 lp Returned String null null lp Returned String chars return Get Profile StringW lp App Name1 lp Key Name1 lp Default1 lp Returned String1 n Size byte lp App Name1 lp App Name null null lp App Name bytes byte lp Key Name1 lp Key Name null null lp Key Name bytes byte lp Default1 lp Default null null lp Default bytes byte lp Returned String1 lp Returned String null null lp Returned String bytes return Get Profile StringA lp App Name1 lp Key Name1 lp Default1 lp Returned String1 n Size  GetProfileString lpAppName lpKeyName lpDefault lpReturnedString nSize IsUnicode lpAppName1 lpAppName lpAppName lpKeyName1 lpKeyName lpKeyName lpDefault1 lpDefault lpDefault lpReturnedString1 lpReturnedString lpReturnedString GetProfileStringW lpAppName1 lpKeyName1 lpDefault1 lpReturnedString1 nSize lpAppName1 lpAppName lpAppName lpKeyName1 lpKeyName lpKeyName lpDefault1 lpDefault lpDefault lpReturnedString1 lpReturnedString lpReturnedString GetProfileStringA lpAppName1 lpKeyName1 lpDefault1 lpReturnedString1 nSize
public static final boolean Get Save File Name OPENFILENAME lpofn if Is Unicode return Get Save File NameW lpofn return Get Save File NameA lpofn  GetSaveFileName IsUnicode GetSaveFileNameW GetSaveFileNameA
public static final boolean Get Text Extent Point32 int hdc TCHAR lp String int cb String SIZE lp Size if Is Unicode char lp String1 lp String null null lp String chars return Get Text Extent Point32W hdc lp String1 cb String lp Size byte lp String1 lp String null null lp String bytes return Get Text Extent Point32A hdc lp String1 cb String lp Size  GetTextExtentPoint32 lpString cbString lpSize IsUnicode lpString1 lpString lpString GetTextExtentPoint32W lpString1 cbString lpSize lpString1 lpString lpString GetTextExtentPoint32A lpString1 cbString lpSize
public static final boolean Get Text Metrics int hdc TEXTMETRIC lptm if Is Unicode return Get Text MetricsW hdc TEXTMETRICW lptm return Get Text MetricsA hdc TEXTMETRICA lptm  GetTextMetrics IsUnicode GetTextMetricsW GetTextMetricsA
public static final boolean Get Version Ex OSVERSIONINFO lp Version Info if Is Unicode return Get Version ExW OSVERSIONINFOW lp Version Info return Get Version ExA OSVERSIONINFOA lp Version Info  GetVersionEx lpVersionInfo IsUnicode GetVersionExW lpVersionInfo GetVersionExA lpVersionInfo
public static final int Get Window Long int h Wnd int n Index if Is Unicode return Get Window LongW h Wnd n Index return Get Window LongA h Wnd n Index  GetWindowLong hWnd nIndex IsUnicode GetWindowLongW hWnd nIndex GetWindowLongA hWnd nIndex
public static final int Get Window Text int h Wnd TCHAR lp String int n Max Count if Is Unicode char lp String1 lp String null null lp String chars return Get Window TextW h Wnd lp String1 n Max Count byte lp String1 lp String null null lp String bytes return Get Window TextA h Wnd lp String1 n Max Count  GetWindowText hWnd lpString nMaxCount IsUnicode lpString1 lpString lpString GetWindowTextW hWnd lpString1 nMaxCount lpString1 lpString lpString GetWindowTextA hWnd lpString1 nMaxCount
public static final int Get Window Text Length int h Wnd if Is Unicode return Get Window Text LengthW h Wnd return Get Window Text LengthA h Wnd  GetWindowTextLength hWnd IsUnicode GetWindowTextLengthW hWnd GetWindowTextLengthA hWnd
public static final boolean Imm Get Composition Font int hIMC LOGFONT lplf if Is Unicode return Imm Get Composition FontW hIMC LOGFONTW lplf return Imm Get Composition FontA hIMC LOGFONTA lplf  ImmGetCompositionFont IsUnicode ImmGetCompositionFontW ImmGetCompositionFontA
public static final boolean Imm Set Composition Font int hIMC LOGFONT lplf if Is Unicode return Imm Set Composition FontW hIMC LOGFONTW lplf return Imm Set Composition FontA hIMC LOGFONTA lplf  ImmSetCompositionFont IsUnicode ImmSetCompositionFontW ImmSetCompositionFontA
public static final int Imm Get Composition String int hIMC int dw Index TCHAR lp Buf int dw Buf Len if Is Unicode char lp Buf1 lp Buf null null lp Buf chars return Imm Get Composition StringW hIMC dw Index lp Buf1 dw Buf Len byte lp Buf1 lp Buf null null lp Buf bytes return Imm Get Composition StringA hIMC dw Index lp Buf1 dw Buf Len  ImmGetCompositionString dwIndex lpBuf dwBufLen IsUnicode lpBuf1 lpBuf lpBuf ImmGetCompositionStringW dwIndex lpBuf1 dwBufLen lpBuf1 lpBuf lpBuf ImmGetCompositionStringA dwIndex lpBuf1 dwBufLen
public static final boolean Insert Menu int h Menu int u Position int u Flags int uID New Item TCHAR lp New Item if Is Unicode char lp New Item1 lp New Item null null lp New Item chars return Insert MenuW h Menu u Position u Flags uID New Item lp New Item1 byte lp New Item1 lp New Item null null lp New Item bytes return Insert MenuA h Menu u Position u Flags uID New Item lp New Item1  InsertMenu hMenu uPosition uFlags uIDNewItem lpNewItem IsUnicode lpNewItem1 lpNewItem lpNewItem InsertMenuW hMenu uPosition uFlags uIDNewItem lpNewItem1 lpNewItem1 lpNewItem lpNewItem InsertMenuA hMenu uPosition uFlags uIDNewItem lpNewItem1
public static final boolean Insert Menu Item int h Menu int u Item boolean f By Position MENUITEMINFO lpmii if Is Unicode return Insert Menu ItemW h Menu u Item f By Position lpmii return Insert Menu ItemA h Menu u Item f By Position lpmii  InsertMenuItem hMenu uItem fByPosition IsUnicode InsertMenuItemW hMenu uItem fByPosition InsertMenuItemA hMenu uItem fByPosition
public static final int Load Bitmap int h Instance int lp Bitmap Name if Is Unicode return Load BitmapW h Instance lp Bitmap Name return Load BitmapA h Instance lp Bitmap Name  LoadBitmap hInstance lpBitmapName IsUnicode LoadBitmapW hInstance lpBitmapName LoadBitmapA hInstance lpBitmapName
public static final int Load Cursor int h Instance int lp Cursor Name if Is Unicode return Load CursorW h Instance lp Cursor Name return Load CursorA h Instance lp Cursor Name  LoadCursor hInstance lpCursorName IsUnicode LoadCursorW hInstance lpCursorName LoadCursorA hInstance lpCursorName
public static final int Load Icon int h Instance int lp Icon Name if Is Unicode return Load IconW h Instance lp Icon Name return Load IconA h Instance lp Icon Name  LoadIcon hInstance lpIconName IsUnicode LoadIconW hInstance lpIconName LoadIconA hInstance lpIconName
public static final int Load Image int hinst TCHAR lpsz Name int u Type int cx Desired int cy Desired int fu Load if Is Unicode char lpsz Name1 lpsz Name null null lpsz Name chars return Load ImageW hinst lpsz Name1 u Type cx Desired cy Desired fu Load byte lpsz Name1 lpsz Name null null lpsz Name bytes return Load ImageA hinst lpsz Name1 u Type cx Desired cy Desired fu Load  LoadImage lpszName uType cxDesired cyDesired fuLoad IsUnicode lpszName1 lpszName lpszName LoadImageW lpszName1 uType cxDesired cyDesired fuLoad lpszName1 lpszName lpszName LoadImageA lpszName1 uType cxDesired cyDesired fuLoad
public static final int Load Image int hinst int lpsz Name int u Type int cx Desired int cy Desired int fu Load if Is Unicode return Load ImageW hinst lpsz Name u Type cx Desired cy Desired fu Load return Load ImageA hinst lpsz Name u Type cx Desired cy Desired fu Load  LoadImage lpszName uType cxDesired cyDesired fuLoad IsUnicode LoadImageW lpszName uType cxDesired cyDesired fuLoad LoadImageA lpszName uType cxDesired cyDesired fuLoad
public static final int Load Library TCHAR lp Lib File Name if Is Unicode char lp Lib File Name1 lp Lib File Name null null lp Lib File Name chars return Load LibraryW lp Lib File Name1 byte lp Lib File Name1 lp Lib File Name null null lp Lib File Name bytes return Load LibraryA lp Lib File Name1  LoadLibrary lpLibFileName IsUnicode lpLibFileName1 lpLibFileName lpLibFileName LoadLibraryW lpLibFileName1 lpLibFileName1 lpLibFileName lpLibFileName LoadLibraryA lpLibFileName1
public static final int Load String int hinst int uID TCHAR lp Buffer int n Buffer Max if Is Unicode char lp Buffer1 lp Buffer null null lp Buffer chars return Load StringW hinst uID lp Buffer1 n Buffer Max byte lp Buffer1 lp Buffer null null lp Buffer bytes return Load StringA hinst uID lp Buffer1 n Buffer Max  LoadString lpBuffer nBufferMax IsUnicode lpBuffer1 lpBuffer lpBuffer LoadStringW lpBuffer1 nBufferMax lpBuffer1 lpBuffer lpBuffer LoadStringA lpBuffer1 nBufferMax
public static final int Map Virtual Key int u Code int u Map Type if Is Unicode return Map Virtual KeyW u Code u Map Type return Map Virtual KeyA u Code u Map Type  MapVirtualKey uCode uMapType IsUnicode MapVirtualKeyW uCode uMapType MapVirtualKeyA uCode uMapType
public static final int Message Box int h Wnd TCHAR lp Text TCHAR lp Caption int u Type if Is Unicode char lp Text1 lp Text null null lp Text chars char lp Caption1 lp Caption null null lp Caption chars return Message BoxW h Wnd lp Text1 lp Caption1 u Type byte lp Text1 lp Text null null lp Text bytes byte lp Caption1 lp Caption null null lp Caption bytes return Message BoxA h Wnd lp Text1 lp Caption1 u Type  MessageBox hWnd lpText lpCaption uType IsUnicode lpText1 lpText lpText lpCaption1 lpCaption lpCaption MessageBoxW hWnd lpText1 lpCaption1 uType lpText1 lpText lpText lpCaption1 lpCaption lpCaption MessageBoxA hWnd lpText1 lpCaption1 uType
public static final void Move Memory int Destination TCHAR Source int Length if Is Unicode char Source1 Source null null Source chars Move Memory Destination Source1 Length else byte Source1 Source null null Source bytes Move Memory Destination Source1 Length  MoveMemory IsUnicode MoveMemory MoveMemory
public static final void Move Memory TCHAR Destination int Source int Length if Is Unicode char Destination1 Destination null null Destination chars Move Memory Destination1 Source Length else byte Destination1 Destination null null Destination bytes Move Memory Destination1 Source Length  MoveMemory IsUnicode MoveMemory MoveMemory
public static final void Move Memory int Destination LOGFONT Source int Length if Is Unicode Move Memory Destination LOGFONTW Source Length else Move Memory Destination LOGFONTA Source Length  MoveMemory IsUnicode MoveMemory MoveMemory
public static final void Move Memory LOGFONT Destination int Source int Length if Is Unicode Move Memory LOGFONTW Destination Source Length else Move Memory LOGFONTA Destination Source Length  MoveMemory IsUnicode MoveMemory MoveMemory
public static final void Move Memory int Destination NMTTDISPINFO Source int Length if Is Unicode Move Memory Destination NMTTDISPINFOW Source Length else Move Memory Destination NMTTDISPINFOA Source Length  MoveMemory IsUnicode MoveMemory MoveMemory
public static final void Move Memory NMTTDISPINFO Destination int Source int Length if Is Unicode Move Memory NMTTDISPINFOW Destination Source Length else Move Memory NMTTDISPINFOA Destination Source Length  MoveMemory IsUnicode MoveMemory MoveMemory
public static final boolean Peek Message MSG lp Msg int h Wnd int w Msg Filter Min int w Msg Filter Max int w Remove Msg if Is Unicode return Peek MessageW lp Msg h Wnd w Msg Filter Min w Msg Filter Max w Remove Msg return Peek MessageA lp Msg h Wnd w Msg Filter Min w Msg Filter Max w Remove Msg  PeekMessage lpMsg hWnd wMsgFilterMin wMsgFilterMax wRemoveMsg IsUnicode PeekMessageW lpMsg hWnd wMsgFilterMin wMsgFilterMax wRemoveMsg PeekMessageA lpMsg hWnd wMsgFilterMin wMsgFilterMax wRemoveMsg
public static final boolean Post Message int h Wnd int Msg int w Param int l Param if Is Unicode return Post MessageW h Wnd Msg w Param l Param return Post MessageA h Wnd Msg w Param l Param  PostMessage hWnd wParam lParam IsUnicode PostMessageW hWnd wParam lParam PostMessageA hWnd wParam lParam
public static final boolean Post Thread Message int id Thread int Msg int w Param int l Param if Is Unicode return Post Thread MessageW id Thread Msg w Param l Param return Post Thread MessageA id Thread Msg w Param l Param  PostThreadMessage idThread wParam lParam IsUnicode PostThreadMessageW idThread wParam lParam PostThreadMessageA idThread wParam lParam
public static final boolean Print Dlg PRINTDLG lppd if Is Unicode return Print DlgW lppd return Print DlgA lppd  PrintDlg IsUnicode PrintDlgW PrintDlgA
public static final int Reg Enum Key Ex int h Key int dw Index TCHAR lp Name int lpc Name int lp Reserved TCHAR lp Class int lpc Class FILETIME lpft Last Write Time if Is Unicode char lp Name1 lp Name null null lp Name chars char lp Class1 lp Class null null lp Class chars return Reg Enum Key ExW h Key dw Index lp Name1 lpc Name lp Reserved lp Class1 lpc Class lpft Last Write Time byte lp Name1 lp Name null null lp Name bytes byte lp Class1 lp Class null null lp Class bytes return Reg Enum Key ExA h Key dw Index lp Name1 lpc Name lp Reserved lp Class1 lpc Class lpft Last Write Time  RegEnumKeyEx hKey dwIndex lpName lpcName lpReserved lpClass lpcClass lpftLastWriteTime IsUnicode lpName1 lpName lpName lpClass1 lpClass lpClass RegEnumKeyExW hKey dwIndex lpName1 lpcName lpReserved lpClass1 lpcClass lpftLastWriteTime lpName1 lpName lpName lpClass1 lpClass lpClass RegEnumKeyExA hKey dwIndex lpName1 lpcName lpReserved lpClass1 lpcClass lpftLastWriteTime
public static final int Register Class WNDCLASS lp Wnd Class if Is Unicode return Register ClassW lp Wnd Class return Register ClassA lp Wnd Class  RegisterClass lpWndClass IsUnicode RegisterClassW lpWndClass RegisterClassA lpWndClass
public static final int Register Clipboard Format TCHAR lpsz Format if Is Unicode char lpsz Format1 lpsz Format null null lpsz Format chars return Register Clipboard FormatW lpsz Format1 byte lpsz Format1 lpsz Format null null lpsz Format bytes return Register Clipboard FormatA lpsz Format1  RegisterClipboardFormat lpszFormat IsUnicode lpszFormat1 lpszFormat lpszFormat RegisterClipboardFormatW lpszFormat1 lpszFormat1 lpszFormat lpszFormat RegisterClipboardFormatA lpszFormat1
public static final int Register Window Message TCHAR lp String if Is Unicode char lp String1 lp String null null lp String chars return Register Window MessageW lp String1 byte lp String1 lp String null null lp String bytes return Register Window MessageA lp String1  RegisterWindowMessage lpString IsUnicode lpString1 lpString lpString RegisterWindowMessageW lpString1 lpString1 lpString lpString RegisterWindowMessageA lpString1
public static final int Reg Open Key Ex int h Key TCHAR lp Sub Key int ul Options int sam Desired int phk Result if Is Unicode char lp Sub Key1 lp Sub Key null null lp Sub Key chars return Reg Open Key ExW h Key lp Sub Key1 ul Options sam Desired phk Result byte lp Sub Key1 lp Sub Key null null lp Sub Key bytes return Reg Open Key ExA h Key lp Sub Key1 ul Options sam Desired phk Result  RegOpenKeyEx hKey lpSubKey ulOptions samDesired phkResult IsUnicode lpSubKey1 lpSubKey lpSubKey RegOpenKeyExW hKey lpSubKey1 ulOptions samDesired phkResult lpSubKey1 lpSubKey lpSubKey RegOpenKeyExA hKey lpSubKey1 ulOptions samDesired phkResult
public static final int Reg Query Info Key int h Key int lp Class int lpcb Class int lp Reserved int lp Sub Keys int lpcb Max Sub Key Len int lpcb Max Class Len int lpc Values int lpcb Max Value Name Len int lpcb Max Value Len int lpcb Security Descriptor int lpft Last Write Time if Is Unicode return Reg Query Info KeyW h Key lp Class lpcb Class lp Reserved lp Sub Keys lpcb Max Sub Key Len lpcb Max Class Len lpc Values lpcb Max Value Name Len lpcb Max Value Len lpcb Security Descriptor lpft Last Write Time return Reg Query Info KeyA h Key lp Class lpcb Class lp Reserved lp Sub Keys lpcb Max Sub Key Len lpcb Max Class Len lpc Values lpcb Max Value Name Len lpcb Max Value Len lpcb Security Descriptor lpft Last Write Time  RegQueryInfoKey hKey lpClass lpcbClass lpReserved lpSubKeys lpcbMaxSubKeyLen lpcbMaxClassLen lpcValues lpcbMaxValueNameLen lpcbMaxValueLen lpcbSecurityDescriptor lpftLastWriteTime IsUnicode RegQueryInfoKeyW hKey lpClass lpcbClass lpReserved lpSubKeys lpcbMaxSubKeyLen lpcbMaxClassLen lpcValues lpcbMaxValueNameLen lpcbMaxValueLen lpcbSecurityDescriptor lpftLastWriteTime RegQueryInfoKeyA hKey lpClass lpcbClass lpReserved lpSubKeys lpcbMaxSubKeyLen lpcbMaxClassLen lpcValues lpcbMaxValueNameLen lpcbMaxValueLen lpcbSecurityDescriptor lpftLastWriteTime
public static final int Reg Query Value Ex int h Key TCHAR lp Value Name int lp Reserved int lp Type TCHAR lp Data int lpcb Data if Is Unicode char lp Value Name1 lp Value Name null null lp Value Name chars char lp Data1 lp Data null null lp Data chars return Reg Query Value ExW h Key lp Value Name1 lp Reserved lp Type lp Data1 lpcb Data byte lp Value Name1 lp Value Name null null lp Value Name bytes byte lp Data1 lp Data null null lp Data bytes return Reg Query Value ExA h Key lp Value Name1 lp Reserved lp Type lp Data1 lpcb Data  RegQueryValueEx hKey lpValueName lpReserved lpType lpData lpcbData IsUnicode lpValueName1 lpValueName lpValueName lpData1 lpData lpData RegQueryValueExW hKey lpValueName1 lpReserved lpType lpData1 lpcbData lpValueName1 lpValueName lpValueName lpData1 lpData lpData RegQueryValueExA hKey lpValueName1 lpReserved lpType lpData1 lpcbData
public static final int Send Message int h Wnd int Msg int w Param TCHAR l Param if Is Unicode char l Param1 l Param null null l Param chars return Send MessageW h Wnd Msg w Param l Param1 byte l Param1 l Param null null l Param bytes return Send MessageA h Wnd Msg w Param l Param1  SendMessage hWnd wParam lParam IsUnicode lParam1 lParam lParam SendMessageW hWnd wParam lParam1 lParam1 lParam lParam SendMessageA hWnd wParam lParam1
public static final int Send Message int h Wnd int Msg int w Param int l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param int l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param int l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param short l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param int l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param LVCOLUMN l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param LVHITTESTINFO l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param LVITEM l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param MARGINS l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param REBARBANDINFO l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param RECT l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param TBBUTTON l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param TBBUTTONINFO l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param TCITEM l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param TOOLINFO l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param TVHITTESTINFO l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param TVINSERTSTRUCT l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final int Send Message int h Wnd int Msg int w Param TVITEM l Param if Is Unicode return Send MessageW h Wnd Msg w Param l Param return Send MessageA h Wnd Msg w Param l Param  SendMessage hWnd wParam lParam IsUnicode SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final boolean Set Menu Item Info int h Menu int u Item boolean f By Position MENUITEMINFO lpmii if Is Unicode return Set Menu Item InfoW h Menu u Item f By Position lpmii return Set Menu Item InfoA h Menu u Item f By Position lpmii  SetMenuItemInfo hMenu uItem fByPosition IsUnicode SetMenuItemInfoW hMenu uItem fByPosition SetMenuItemInfoA hMenu uItem fByPosition
public static final int Set Window Long int h Wnd int n Index int dw New Long if Is Unicode return Set Window LongW h Wnd n Index dw New Long return Set Window LongA h Wnd n Index dw New Long  SetWindowLong hWnd nIndex dwNewLong IsUnicode SetWindowLongW hWnd nIndex dwNewLong SetWindowLongA hWnd nIndex dwNewLong
public static final int Set Windows Hook Ex int id Hook int lpfn int h Mod int dw Thread Id if Is Unicode return Set Windows Hook ExW id Hook lpfn h Mod dw Thread Id return Set Windows Hook ExA id Hook lpfn h Mod dw Thread Id  SetWindowsHookEx idHook hMod dwThreadId IsUnicode SetWindowsHookExW idHook hMod dwThreadId SetWindowsHookExA idHook hMod dwThreadId
public static final boolean Set Window Text int h Wnd TCHAR lp String if Is Unicode char lp String1 lp String null null lp String chars return Set Window TextW h Wnd lp String1 byte lp String1 lp String null null lp String bytes return Set Window TextA h Wnd lp String1  SetWindowText hWnd lpString IsUnicode lpString1 lpString lpString SetWindowTextW hWnd lpString1 lpString1 lpString lpString SetWindowTextA hWnd lpString1
public static final int SH Browse For Folder BROWSEINFO lpbi if Is Unicode return SH Browse For FolderW lpbi return SH Browse For FolderA lpbi  SHBrowseForFolder IsUnicode SHBrowseForFolderW SHBrowseForFolderA
public static final boolean Shell Execute Ex SHELLEXECUTEINFO lp Exec Info if Is Unicode return Shell Execute ExW lp Exec Info return Shell Execute ExA lp Exec Info  ShellExecuteEx lpExecInfo IsUnicode ShellExecuteExW lpExecInfo ShellExecuteExA lpExecInfo
public static final boolean Shell NotifyIcon int dw Message NOTIFYICONDATA lp Data if Is Unicode return Shell NotifyIconW dw Message NOTIFYICONDATAW lp Data return Shell NotifyIconA dw Message NOTIFYICONDATAA lp Data  Shell_NotifyIcon dwMessage lpData IsUnicode Shell_NotifyIconW dwMessage lpData Shell_NotifyIconA dwMessage lpData
public static final boolean SH Get Path FromID List int pidl TCHAR psz Path if Is Unicode char psz Path1 psz Path null null psz Path chars return SH Get Path FromID ListW pidl psz Path1 byte psz Path1 psz Path null null psz Path bytes return SH Get Path FromID ListA pidl psz Path1  SHGetPathFromIDList pszPath IsUnicode pszPath1 pszPath pszPath SHGetPathFromIDListW pszPath1 pszPath1 pszPath pszPath SHGetPathFromIDListA pszPath1
public static final int Start Doc int hdc DOCINFO lpdi if Is Unicode return Start DocW hdc lpdi return Start DocA hdc lpdi  StartDoc IsUnicode StartDocW StartDocA
public static final boolean System Parameters Info int ui Action int ui Param RECT pv Param int f Win Ini if Is Unicode return System Parameters InfoW ui Action ui Param pv Param f Win Ini return System Parameters InfoA ui Action ui Param pv Param f Win Ini  SystemParametersInfo uiAction uiParam pvParam fWinIni IsUnicode SystemParametersInfoW uiAction uiParam pvParam fWinIni SystemParametersInfoA uiAction uiParam pvParam fWinIni
public static final boolean System Parameters Info int ui Action int ui Param HIGHCONTRAST pv Param int f Win Ini if Is Unicode return System Parameters InfoW ui Action ui Param pv Param f Win Ini return System Parameters InfoA ui Action ui Param pv Param f Win Ini  SystemParametersInfo uiAction uiParam pvParam fWinIni IsUnicode SystemParametersInfoW uiAction uiParam pvParam fWinIni SystemParametersInfoA uiAction uiParam pvParam fWinIni
public static final boolean System Parameters Info int ui Action int ui Param NONCLIENTMETRICS pv Param int f Win Ini if Is Unicode return System Parameters InfoW ui Action ui Param NONCLIENTMETRICSW pv Param f Win Ini return System Parameters InfoA ui Action ui Param NONCLIENTMETRICSA pv Param f Win Ini  SystemParametersInfo uiAction uiParam pvParam fWinIni IsUnicode SystemParametersInfoW uiAction uiParam pvParam fWinIni SystemParametersInfoA uiAction uiParam pvParam fWinIni
public static final boolean System Parameters Info int ui Action int ui Param int pv Param int f Win Ini if Is Unicode return System Parameters InfoW ui Action ui Param pv Param f Win Ini return System Parameters InfoA ui Action ui Param pv Param f Win Ini  SystemParametersInfo uiAction uiParam pvParam fWinIni IsUnicode SystemParametersInfoW uiAction uiParam pvParam fWinIni SystemParametersInfoA uiAction uiParam pvParam fWinIni
public static final int Translate Accelerator int h Wnd int h Acc Table MSG lp Msg if Is Unicode return Translate AcceleratorW h Wnd h Acc Table lp Msg return Translate AcceleratorA h Wnd h Acc Table lp Msg  TranslateAccelerator hWnd hAccTable lpMsg IsUnicode TranslateAcceleratorW hWnd hAccTable lpMsg TranslateAcceleratorA hWnd hAccTable lpMsg
public static final boolean Unregister Class TCHAR lp Class Name int h Instance if Is Unicode char lp Class Name1 lp Class Name null null lp Class Name chars return Unregister ClassW lp Class Name1 h Instance byte lp Class Name1 lp Class Name null null lp Class Name bytes return Unregister ClassA lp Class Name1 h Instance  UnregisterClass lpClassName hInstance IsUnicode lpClassName1 lpClassName lpClassName UnregisterClassW lpClassName1 hInstance lpClassName1 lpClassName lpClassName UnregisterClassA lpClassName1 hInstance
public static final short Vk Key Scan short ch if Is Unicode return Vk Key ScanW ch return Vk Key ScanA ch  VkKeyScan IsUnicode VkKeyScanW VkKeyScanA
Natives public static final native int Abort Doc int hdc  AbortDoc
Natives public static final native int Abort Doc int hdc public static final native int Activate Keyboard Layout int hkl int Flags  AbortDoc ActivateKeyboardLayout
public static final native int Abort Doc int hdc public static final native int Activate Keyboard Layout int hkl int Flags public static final native boolean Adjust Window Rect Ex RECT lp Rect int dw Style boolean b Menu int dw Ex Style  AbortDoc ActivateKeyboardLayout AdjustWindowRectEx lpRect dwStyle bMenu dwExStyle
public static final native int Activate Keyboard Layout int hkl int Flags public static final native boolean Adjust Window Rect Ex RECT lp Rect int dw Style boolean b Menu int dw Ex Style public static final native boolean Arc int hdc int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect int nX Start Arc int nY Start Arc int nX End Arc int nY End Arc  ActivateKeyboardLayout AdjustWindowRectEx lpRect dwStyle bMenu dwExStyle nLeftRect nTopRect nRightRect nBottomRect nXStartArc nYStartArc nXEndArc nYEndArc
public static final native boolean Adjust Window Rect Ex RECT lp Rect int dw Style boolean b Menu int dw Ex Style public static final native boolean Arc int hdc int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect int nX Start Arc int nY Start Arc int nX End Arc int nY End Arc public static final native int Begin Defer Window Pos int n Num Windows  AdjustWindowRectEx lpRect dwStyle bMenu dwExStyle nLeftRect nTopRect nRightRect nBottomRect nXStartArc nYStartArc nXEndArc nYEndArc BeginDeferWindowPos nNumWindows
public static final native boolean Arc int hdc int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect int nX Start Arc int nY Start Arc int nX End Arc int nY End Arc public static final native int Begin Defer Window Pos int n Num Windows public static final native int Begin Paint int h Wnd PAINTSTRUCT lp Paint  nLeftRect nTopRect nRightRect nBottomRect nXStartArc nYStartArc nXEndArc nYEndArc BeginDeferWindowPos nNumWindows BeginPaint hWnd lpPaint
public static final native int Begin Defer Window Pos int n Num Windows public static final native int Begin Paint int h Wnd PAINTSTRUCT lp Paint public static final native boolean Bit Blt int hdc Dest int nX Dest int nY Dest int n Width int n Height int hdc Src int nX Src int nY Src int dw Rop  BeginDeferWindowPos nNumWindows BeginPaint hWnd lpPaint BitBlt hdcDest nXDest nYDest nWidth nHeight hdcSrc nXSrc nYSrc dwRop
public static final native int Begin Paint int h Wnd PAINTSTRUCT lp Paint public static final native boolean Bit Blt int hdc Dest int nX Dest int nY Dest int n Width int n Height int hdc Src int nX Src int nY Src int dw Rop public static final native boolean Bring Window To Top int h Wnd  BeginPaint hWnd lpPaint BitBlt hdcDest nXDest nYDest nWidth nHeight hdcSrc nXSrc nYSrc dwRop BringWindowToTop hWnd
public static final native boolean Bit Blt int hdc Dest int nX Dest int nY Dest int n Width int n Height int hdc Src int nX Src int nY Src int dw Rop public static final native boolean Bring Window To Top int h Wnd public static final native int Call int address DLLVERSIONINFO arg0  BitBlt hdcDest nXDest nYDest nWidth nHeight hdcSrc nXSrc nYSrc dwRop BringWindowToTop hWnd
public static final native boolean Bring Window To Top int h Wnd public static final native int Call int address DLLVERSIONINFO arg0 public static final native int Call Next Hook Ex int hhk int n Code int w Param int l Param  BringWindowToTop hWnd CallNextHookEx nCode wParam lParam
public static final native int Call int address DLLVERSIONINFO arg0 public static final native int Call Next Hook Ex int hhk int n Code int w Param int l Param public static final native int Call Window ProcW int lp Prev Wnd Func int h Wnd int Msg int w Param int l Param  CallNextHookEx nCode wParam lParam CallWindowProcW lpPrevWndFunc hWnd wParam lParam
public static final native int Call Next Hook Ex int hhk int n Code int w Param int l Param public static final native int Call Window ProcW int lp Prev Wnd Func int h Wnd int Msg int w Param int l Param public static final native int Call Window ProcA int lp Prev Wnd Func int h Wnd int Msg int w Param int l Param  CallNextHookEx nCode wParam lParam CallWindowProcW lpPrevWndFunc hWnd wParam lParam CallWindowProcA lpPrevWndFunc hWnd wParam lParam
public static final native int Call Window ProcW int lp Prev Wnd Func int h Wnd int Msg int w Param int l Param public static final native int Call Window ProcA int lp Prev Wnd Func int h Wnd int Msg int w Param int l Param public static final native short Char LowerW short ch  CallWindowProcW lpPrevWndFunc hWnd wParam lParam CallWindowProcA lpPrevWndFunc hWnd wParam lParam CharLowerW
public static final native int Call Window ProcA int lp Prev Wnd Func int h Wnd int Msg int w Param int l Param public static final native short Char LowerW short ch public static final native short Char LowerA short ch  CallWindowProcA lpPrevWndFunc hWnd wParam lParam CharLowerW CharLowerA
public static final native short Char LowerW short ch public static final native short Char LowerA short ch public static final native short Char UpperW short ch  CharLowerW CharLowerA CharUpperW
public static final native short Char LowerA short ch public static final native short Char UpperW short ch public static final native short Char UpperA short ch  CharLowerA CharUpperW CharUpperA
public static final native short Char UpperW short ch public static final native short Char UpperA short ch public static final native boolean Check Menu Item int hmenu int uID Check Item int u Check  CharUpperW CharUpperA CheckMenuItem uIDCheckItem uCheck
public static final native short Char UpperA short ch public static final native boolean Check Menu Item int hmenu int uID Check Item int u Check public static final native boolean Choose ColorW CHOOSECOLOR lpcc  CharUpperA CheckMenuItem uIDCheckItem uCheck ChooseColorW
public static final native boolean Check Menu Item int hmenu int uID Check Item int u Check public static final native boolean Choose ColorW CHOOSECOLOR lpcc public static final native boolean Choose ColorA CHOOSECOLOR lpcc  CheckMenuItem uIDCheckItem uCheck ChooseColorW ChooseColorA
public static final native boolean Choose ColorW CHOOSECOLOR lpcc public static final native boolean Choose ColorA CHOOSECOLOR lpcc public static final native boolean Choose FontW CHOOSEFONT choose Font  ChooseColorW ChooseColorA ChooseFontW chooseFont
public static final native boolean Choose ColorA CHOOSECOLOR lpcc public static final native boolean Choose FontW CHOOSEFONT choose Font public static final native boolean Choose FontA CHOOSEFONT choose Font  ChooseColorA ChooseFontW chooseFont ChooseFontA chooseFont
public static final native boolean Choose FontW CHOOSEFONT choose Font public static final native boolean Choose FontA CHOOSEFONT choose Font public static final native boolean Client To Screen int h Wnd POINT lp Point  ChooseFontW chooseFont ChooseFontA chooseFont ClientToScreen hWnd lpPoint
public static final native boolean Choose FontA CHOOSEFONT choose Font public static final native boolean Client To Screen int h Wnd POINT lp Point public static final native boolean Close Clipboard  ChooseFontA chooseFont ClientToScreen hWnd lpPoint CloseClipboard
public static final native boolean Client To Screen int h Wnd POINT lp Point public static final native boolean Close Clipboard public static final native int Combine Rgn int hrgn Dest int hrgn Src1 int hrgn Src2 int fn Combine Mode  ClientToScreen hWnd lpPoint CloseClipboard CombineRgn hrgnDest hrgnSrc1 hrgnSrc2 fnCombineMode
public static final native boolean Close Clipboard public static final native int Combine Rgn int hrgn Dest int hrgn Src1 int hrgn Src2 int fn Combine Mode public static final native boolean CommandBar AddAdornments int hwndCB int dw Flags int dw Reserved  CloseClipboard CombineRgn hrgnDest hrgnSrc1 hrgnSrc2 fnCombineMode CommandBar_AddAdornments dwFlags dwReserved
public static final native int Combine Rgn int hrgn Dest int hrgn Src1 int hrgn Src2 int fn Combine Mode public static final native boolean CommandBar AddAdornments int hwndCB int dw Flags int dw Reserved public static final native int CommandBar Create int h Inst int hwnd Parent int id Cmd Bar  CombineRgn hrgnDest hrgnSrc1 hrgnSrc2 fnCombineMode CommandBar_AddAdornments dwFlags dwReserved CommandBar_Create hInst hwndParent idCmdBar
public static final native boolean CommandBar AddAdornments int hwndCB int dw Flags int dw Reserved public static final native int CommandBar Create int h Inst int hwnd Parent int id Cmd Bar public static final native void CommandBar Destroy int hwndCB  CommandBar_AddAdornments dwFlags dwReserved CommandBar_Create hInst hwndParent idCmdBar CommandBar_Destroy
public static final native int CommandBar Create int h Inst int hwnd Parent int id Cmd Bar public static final native void CommandBar Destroy int hwndCB public static final native boolean CommandBar DrawMenuBar int hwndCB int i Button  CommandBar_Create hInst hwndParent idCmdBar CommandBar_Destroy CommandBar_DrawMenuBar iButton
public static final native void CommandBar Destroy int hwndCB public static final native boolean CommandBar DrawMenuBar int hwndCB int i Button public static final native int CommandBar Height int hdnwCB  CommandBar_Destroy CommandBar_DrawMenuBar iButton CommandBar_Height
public static final native boolean CommandBar DrawMenuBar int hwndCB int i Button public static final native int CommandBar Height int hdnwCB public static final native boolean CommandBar InsertMenubarEx int hwndCB int h Inst int psz Menu int i Button  CommandBar_DrawMenuBar iButton CommandBar_Height CommandBar_InsertMenubarEx hInst pszMenu iButton
public static final native int CommandBar Height int hdnwCB public static final native boolean CommandBar InsertMenubarEx int hwndCB int h Inst int psz Menu int i Button public static final native boolean CommandBar Show int hwndCB boolean f Show  CommandBar_Height CommandBar_InsertMenubarEx hInst pszMenu iButton CommandBar_Show fShow
public static final native boolean CommandBar InsertMenubarEx int hwndCB int h Inst int psz Menu int i Button public static final native boolean CommandBar Show int hwndCB boolean f Show public static final native int Comm Dlg Extended Error  CommandBar_InsertMenubarEx hInst pszMenu iButton CommandBar_Show fShow CommDlgExtendedError
public static final native boolean CommandBar Show int hwndCB boolean f Show public static final native int Comm Dlg Extended Error public static final native int Copy Image int h Image int u Type int cx Desired int cy Desired int fu Flags  CommandBar_Show fShow CommDlgExtendedError CopyImage hImage uType cxDesired cyDesired fuFlags
public static final native int Comm Dlg Extended Error public static final native int Copy Image int h Image int u Type int cx Desired int cy Desired int fu Flags public static final native int Create Accelerator TableW byte lpaccl int c Entries  CommDlgExtendedError CopyImage hImage uType cxDesired cyDesired fuFlags CreateAcceleratorTableW cEntries
public static final native int Copy Image int h Image int u Type int cx Desired int cy Desired int fu Flags public static final native int Create Accelerator TableW byte lpaccl int c Entries public static final native int Create Accelerator TableA byte lpaccl int c Entries  CopyImage hImage uType cxDesired cyDesired fuFlags CreateAcceleratorTableW cEntries CreateAcceleratorTableA cEntries
public static final native int Create Accelerator TableW byte lpaccl int c Entries public static final native int Create Accelerator TableA byte lpaccl int c Entries public static final native int Create Bitmap int n Width int n Height int c Planes int c Bits Per Pel byte lpv Bits  CreateAcceleratorTableW cEntries CreateAcceleratorTableA cEntries CreateBitmap nWidth nHeight cPlanes cBitsPerPel lpvBits
public static final native int Create Accelerator TableA byte lpaccl int c Entries public static final native int Create Bitmap int n Width int n Height int c Planes int c Bits Per Pel byte lpv Bits public static final native boolean Create Caret int h Wnd int h Bitmap int n Width int n Height  CreateAcceleratorTableA cEntries CreateBitmap nWidth nHeight cPlanes cBitsPerPel lpvBits CreateCaret hWnd hBitmap nWidth nHeight
public static final native int Create Bitmap int n Width int n Height int c Planes int c Bits Per Pel byte lpv Bits public static final native boolean Create Caret int h Wnd int h Bitmap int n Width int n Height public static final native int Create Compatible Bitmap int hdc int n Width int n Height  CreateBitmap nWidth nHeight cPlanes cBitsPerPel lpvBits CreateCaret hWnd hBitmap nWidth nHeight CreateCompatibleBitmap nWidth nHeight
public static final native boolean Create Caret int h Wnd int h Bitmap int n Width int n Height public static final native int Create Compatible Bitmap int hdc int n Width int n Height public static final native int Create CompatibleDC int hdc  CreateCaret hWnd hBitmap nWidth nHeight CreateCompatibleBitmap nWidth nHeight CreateCompatibleDC
public static final native int Create Compatible Bitmap int hdc int n Width int n Height public static final native int Create CompatibleDC int hdc public static final native int Create Cursor int h Inst int x Hot Spot int y Hot Spot int n Width int n Height byte pvAND Plane byte pvXOR Plane  CreateCompatibleBitmap nWidth nHeight CreateCompatibleDC CreateCursor hInst xHotSpot yHotSpot nWidth nHeight pvANDPlane pvXORPlane
public static final native int Create CompatibleDC int hdc public static final native int Create Cursor int h Inst int x Hot Spot int y Hot Spot int n Width int n Height byte pvAND Plane byte pvXOR Plane public static final native int CreateDCW char lpsz Driver char lpsz Device int lpsz Output int lp Init Data  CreateCompatibleDC CreateCursor hInst xHotSpot yHotSpot nWidth nHeight pvANDPlane pvXORPlane lpszDriver lpszDevice lpszOutput lpInitData
public static final native int Create Cursor int h Inst int x Hot Spot int y Hot Spot int n Width int n Height byte pvAND Plane byte pvXOR Plane public static final native int CreateDCW char lpsz Driver char lpsz Device int lpsz Output int lp Init Data public static final native int CreateDCA byte lpsz Driver byte lpsz Device int lpsz Output int lp Init Data  CreateCursor hInst xHotSpot yHotSpot nWidth nHeight pvANDPlane pvXORPlane lpszDriver lpszDevice lpszOutput lpInitData lpszDriver lpszDevice lpszOutput lpInitData
public static final native int CreateDCW char lpsz Driver char lpsz Device int lpsz Output int lp Init Data public static final native int CreateDCA byte lpsz Driver byte lpsz Device int lpsz Output int lp Init Data public static final native int CreateDIB Section int hdc byte pbmi int i Usage int ppv Bits int h Section int dw Offset  lpszDriver lpszDevice lpszOutput lpInitData lpszDriver lpszDevice lpszOutput lpInitData CreateDIBSection iUsage ppvBits hSection dwOffset
public static final native int CreateDCA byte lpsz Driver byte lpsz Device int lpsz Output int lp Init Data public static final native int CreateDIB Section int hdc byte pbmi int i Usage int ppv Bits int h Section int dw Offset public static final native int Create Font IndirectW int lplf  lpszDriver lpszDevice lpszOutput lpInitData CreateDIBSection iUsage ppvBits hSection dwOffset CreateFontIndirectW
public static final native int CreateDIB Section int hdc byte pbmi int i Usage int ppv Bits int h Section int dw Offset public static final native int Create Font IndirectW int lplf public static final native int Create Font IndirectA int lplf  CreateDIBSection iUsage ppvBits hSection dwOffset CreateFontIndirectW CreateFontIndirectA
public static final native int Create Font IndirectW int lplf public static final native int Create Font IndirectA int lplf public static final native int Create Font IndirectW LOGFONTW lplf  CreateFontIndirectW CreateFontIndirectA CreateFontIndirectW
public static final native int Create Font IndirectA int lplf public static final native int Create Font IndirectW LOGFONTW lplf public static final native int Create Font IndirectA LOGFONTA lplf  CreateFontIndirectA CreateFontIndirectW CreateFontIndirectA
public static final native int Create Font IndirectW LOGFONTW lplf public static final native int Create Font IndirectA LOGFONTA lplf public static final native int Create Icon Indirect ICONINFO lplf  CreateFontIndirectW CreateFontIndirectA CreateIconIndirect
public static final native int Create Font IndirectA LOGFONTA lplf public static final native int Create Icon Indirect ICONINFO lplf public static final native int Create Menu  CreateFontIndirectA CreateIconIndirect CreateMenu
public static final native int Create Icon Indirect ICONINFO lplf public static final native int Create Menu public static final native int Create Palette byte log Palette  CreateIconIndirect CreateMenu CreatePalette logPalette
public static final native int Create Menu public static final native int Create Palette byte log Palette public static final native int Create Pattern Brush int color Ref  CreateMenu CreatePalette logPalette CreatePatternBrush colorRef
public static final native int Create Palette byte log Palette public static final native int Create Pattern Brush int color Ref public static final native int Create Pen int fn Pen Style int n Width int cr Color  CreatePalette logPalette CreatePatternBrush colorRef CreatePen fnPenStyle nWidth crColor
public static final native int Create Pattern Brush int color Ref public static final native int Create Pen int fn Pen Style int n Width int cr Color public static final native int Create Polygon Rgn int lppt int c Points int fn Poly Fill Mode  CreatePatternBrush colorRef CreatePen fnPenStyle nWidth crColor CreatePolygonRgn cPoints fnPolyFillMode
public static final native int Create Pen int fn Pen Style int n Width int cr Color public static final native int Create Polygon Rgn int lppt int c Points int fn Poly Fill Mode public static final native int Create Popup Menu  CreatePen fnPenStyle nWidth crColor CreatePolygonRgn cPoints fnPolyFillMode CreatePopupMenu
public static final native int Create Polygon Rgn int lppt int c Points int fn Poly Fill Mode public static final native int Create Popup Menu public static final native int Create Rect Rgn int left int top int right int bottom  CreatePolygonRgn cPoints fnPolyFillMode CreatePopupMenu CreateRectRgn
public static final native int Create Popup Menu public static final native int Create Rect Rgn int left int top int right int bottom public static final native int Create Solid Brush int color Ref  CreatePopupMenu CreateRectRgn CreateSolidBrush colorRef
public static final native int Create Rect Rgn int left int top int right int bottom public static final native int Create Solid Brush int color Ref public static final native int Create Stream OnH Global int h Global boolean f Delete On Release int ppstm  CreateRectRgn CreateSolidBrush colorRef CreateStreamOnHGlobal hGlobal fDeleteOnRelease
public static final native int Create Solid Brush int color Ref public static final native int Create Stream OnH Global int h Global boolean f Delete On Release int ppstm public static final native int Create Window ExW int dw Ex Style char lp Class Name char lp Window Name int dw Style int X int Y int n Width int n Height int h Wnd Parent int h Menu int h Instance CREATESTRUCT lp Param  CreateSolidBrush colorRef CreateStreamOnHGlobal hGlobal fDeleteOnRelease CreateWindowExW dwExStyle lpClassName lpWindowName dwStyle nWidth nHeight hWndParent hMenu hInstance lpParam
public static final native int Create Stream OnH Global int h Global boolean f Delete On Release int ppstm public static final native int Create Window ExW int dw Ex Style char lp Class Name char lp Window Name int dw Style int X int Y int n Width int n Height int h Wnd Parent int h Menu int h Instance CREATESTRUCT lp Param public static final native int Create Window ExA int dw Ex Style byte lp Class Name byte lp Window Name int dw Style int X int Y int n Width int n Height int h Wnd Parent int h Menu int h Instance CREATESTRUCT lp Param  CreateStreamOnHGlobal hGlobal fDeleteOnRelease CreateWindowExW dwExStyle lpClassName lpWindowName dwStyle nWidth nHeight hWndParent hMenu hInstance lpParam CreateWindowExA dwExStyle lpClassName lpWindowName dwStyle nWidth nHeight hWndParent hMenu hInstance lpParam
public static final native int Create Window ExW int dw Ex Style char lp Class Name char lp Window Name int dw Style int X int Y int n Width int n Height int h Wnd Parent int h Menu int h Instance CREATESTRUCT lp Param public static final native int Create Window ExA int dw Ex Style byte lp Class Name byte lp Window Name int dw Style int X int Y int n Width int n Height int h Wnd Parent int h Menu int h Instance CREATESTRUCT lp Param public static final native int Defer Window Pos int h Win Pos Info int h Wnd int h Wnd Insert After int X int Y int cx int cy int u Flags  CreateWindowExW dwExStyle lpClassName lpWindowName dwStyle nWidth nHeight hWndParent hMenu hInstance lpParam CreateWindowExA dwExStyle lpClassName lpWindowName dwStyle nWidth nHeight hWndParent hMenu hInstance lpParam DeferWindowPos hWinPosInfo hWnd hWndInsertAfter uFlags
public static final native int Create Window ExA int dw Ex Style byte lp Class Name byte lp Window Name int dw Style int X int Y int n Width int n Height int h Wnd Parent int h Menu int h Instance CREATESTRUCT lp Param public static final native int Defer Window Pos int h Win Pos Info int h Wnd int h Wnd Insert After int X int Y int cx int cy int u Flags public static final native int DefMDI Child ProcW int h Wnd int Msg int w Param int l Param  CreateWindowExA dwExStyle lpClassName lpWindowName dwStyle nWidth nHeight hWndParent hMenu hInstance lpParam DeferWindowPos hWinPosInfo hWnd hWndInsertAfter uFlags DefMDIChildProcW hWnd wParam lParam
public static final native int Defer Window Pos int h Win Pos Info int h Wnd int h Wnd Insert After int X int Y int cx int cy int u Flags public static final native int DefMDI Child ProcW int h Wnd int Msg int w Param int l Param public static final native int DefMDI Child ProcA int h Wnd int Msg int w Param int l Param  DeferWindowPos hWinPosInfo hWnd hWndInsertAfter uFlags DefMDIChildProcW hWnd wParam lParam DefMDIChildProcA hWnd wParam lParam
public static final native int DefMDI Child ProcW int h Wnd int Msg int w Param int l Param public static final native int DefMDI Child ProcA int h Wnd int Msg int w Param int l Param public static final native int Def Frame ProcW int h Wnd int h WndMDI Client int Msg int w Param int l Param  DefMDIChildProcW hWnd wParam lParam DefMDIChildProcA hWnd wParam lParam DefFrameProcW hWnd hWndMDIClient wParam lParam
public static final native int DefMDI Child ProcA int h Wnd int Msg int w Param int l Param public static final native int Def Frame ProcW int h Wnd int h WndMDI Client int Msg int w Param int l Param public static final native int Def Frame ProcA int h Wnd int h WndMDI Client int Msg int w Param int l Param  DefMDIChildProcA hWnd wParam lParam DefFrameProcW hWnd hWndMDIClient wParam lParam DefFrameProcA hWnd hWndMDIClient wParam lParam
public static final native int Def Frame ProcW int h Wnd int h WndMDI Client int Msg int w Param int l Param public static final native int Def Frame ProcA int h Wnd int h WndMDI Client int Msg int w Param int l Param public static final native int Def Window ProcW int h Wnd int Msg int w Param int l Param  DefFrameProcW hWnd hWndMDIClient wParam lParam DefFrameProcA hWnd hWndMDIClient wParam lParam DefWindowProcW hWnd wParam lParam
public static final native int Def Frame ProcA int h Wnd int h WndMDI Client int Msg int w Param int l Param public static final native int Def Window ProcW int h Wnd int Msg int w Param int l Param public static final native int Def Window ProcA int h Wnd int Msg int w Param int l Param  DefFrameProcA hWnd hWndMDIClient wParam lParam DefWindowProcW hWnd wParam lParam DefWindowProcA hWnd wParam lParam
public static final native int Def Window ProcW int h Wnd int Msg int w Param int l Param public static final native int Def Window ProcA int h Wnd int Msg int w Param int l Param public static final native boolean DeleteDC int hdc  DefWindowProcW hWnd wParam lParam DefWindowProcA hWnd wParam lParam
public static final native int Def Window ProcA int h Wnd int Msg int w Param int l Param public static final native boolean DeleteDC int hdc public static final native boolean Delete Menu int h Menu int u Position int u Flags  DefWindowProcA hWnd wParam lParam DeleteMenu hMenu uPosition uFlags
public static final native boolean DeleteDC int hdc public static final native boolean Delete Menu int h Menu int u Position int u Flags public static final native boolean Delete Object int h Gdi Obj  DeleteMenu hMenu uPosition uFlags DeleteObject hGdiObj
public static final native boolean Delete Menu int h Menu int u Position int u Flags public static final native boolean Delete Object int h Gdi Obj public static final native boolean Destroy Accelerator Table int h Accel  DeleteMenu hMenu uPosition uFlags DeleteObject hGdiObj DestroyAcceleratorTable hAccel
public static final native boolean Delete Object int h Gdi Obj public static final native boolean Destroy Accelerator Table int h Accel public static final native boolean Destroy Caret  DeleteObject hGdiObj DestroyAcceleratorTable hAccel DestroyCaret
public static final native boolean Destroy Accelerator Table int h Accel public static final native boolean Destroy Caret public static final native boolean Destroy Cursor int h Cursor  DestroyAcceleratorTable hAccel DestroyCaret DestroyCursor hCursor
public static final native boolean Destroy Caret public static final native boolean Destroy Cursor int h Cursor public static final native boolean Destroy Icon int h Icon  DestroyCaret DestroyCursor hCursor DestroyIcon hIcon
public static final native boolean Destroy Cursor int h Cursor public static final native boolean Destroy Icon int h Icon public static final native boolean Destroy Menu int h Menu  DestroyCursor hCursor DestroyIcon hIcon DestroyMenu hMenu
public static final native boolean Destroy Icon int h Icon public static final native boolean Destroy Menu int h Menu public static final native boolean Destroy Window int h Wnd  DestroyIcon hIcon DestroyMenu hMenu DestroyWindow hWnd
public static final native boolean Destroy Menu int h Menu public static final native boolean Destroy Window int h Wnd public static final native int Dispatch MessageW MSG lpmsg  DestroyMenu hMenu DestroyWindow hWnd DispatchMessageW
public static final native boolean Destroy Window int h Wnd public static final native int Dispatch MessageW MSG lpmsg public static final native int Dispatch MessageA MSG lpmsg  DestroyWindow hWnd DispatchMessageW DispatchMessageA
public static final native int Dispatch MessageW MSG lpmsg public static final native int Dispatch MessageA MSG lpmsg public static final native boolean Drag Detect int hwnd POINT pt  DispatchMessageW DispatchMessageA DragDetect
public static final native int Dispatch MessageA MSG lpmsg public static final native boolean Drag Detect int hwnd POINT pt public static final native void Drag Finish int h Drop  DispatchMessageA DragDetect DragFinish hDrop
public static final native boolean Drag Detect int hwnd POINT pt public static final native void Drag Finish int h Drop public static final native int Drag Query FileA int h Drop int i File byte lpsz File int cch  DragDetect DragFinish hDrop DragQueryFileA hDrop iFile lpszFile
public static final native void Drag Finish int h Drop public static final native int Drag Query FileA int h Drop int i File byte lpsz File int cch public static final native int Drag Query FileW int h Drop int i File char lpsz File int cch  DragFinish hDrop DragQueryFileA hDrop iFile lpszFile DragQueryFileW hDrop iFile lpszFile
public static final native int Drag Query FileA int h Drop int i File byte lpsz File int cch public static final native int Drag Query FileW int h Drop int i File char lpsz File int cch public static final native boolean Draw Edge int hdc RECT qrc int edge int grf Flags  DragQueryFileA hDrop iFile lpszFile DragQueryFileW hDrop iFile lpszFile DrawEdge grfFlags
public static final native int Drag Query FileW int h Drop int i File char lpsz File int cch public static final native boolean Draw Edge int hdc RECT qrc int edge int grf Flags public static final native boolean Draw Focus Rect int hDC RECT lp Rect  DragQueryFileW hDrop iFile lpszFile DrawEdge grfFlags DrawFocusRect lpRect
public static final native boolean Draw Edge int hdc RECT qrc int edge int grf Flags public static final native boolean Draw Focus Rect int hDC RECT lp Rect public static final native boolean Draw Frame Control int hdc RECT lprc int u Type int u State  DrawEdge grfFlags DrawFocusRect lpRect DrawFrameControl uType uState
public static final native boolean Draw Focus Rect int hDC RECT lp Rect public static final native boolean Draw Frame Control int hdc RECT lprc int u Type int u State public static final native boolean Draw Icon Ex int hdc int x Left int y Top int h Icon int cx Width int cy Width int istep If Ani Cur int hbr Flicker Free Draw int di Flags  DrawFocusRect lpRect DrawFrameControl uType uState DrawIconEx xLeft yTop hIcon cxWidth cyWidth istepIfAniCur hbrFlickerFreeDraw diFlags
public static final native boolean Draw Frame Control int hdc RECT lprc int u Type int u State public static final native boolean Draw Icon Ex int hdc int x Left int y Top int h Icon int cx Width int cy Width int istep If Ani Cur int hbr Flicker Free Draw int di Flags public static final native boolean Draw Menu Bar int h Wnd  DrawFrameControl uType uState DrawIconEx xLeft yTop hIcon cxWidth cyWidth istepIfAniCur hbrFlickerFreeDraw diFlags DrawMenuBar hWnd
public static final native boolean Draw Icon Ex int hdc int x Left int y Top int h Icon int cx Width int cy Width int istep If Ani Cur int hbr Flicker Free Draw int di Flags public static final native boolean Draw Menu Bar int h Wnd public static final native boolean Draw StateW int hdc int hbr int lp Output Func int l Data int w Data int x int y int cx int cy int fu Flags  DrawIconEx xLeft yTop hIcon cxWidth cyWidth istepIfAniCur hbrFlickerFreeDraw diFlags DrawMenuBar hWnd DrawStateW lpOutputFunc lData wData fuFlags
public static final native boolean Draw Menu Bar int h Wnd public static final native boolean Draw StateW int hdc int hbr int lp Output Func int l Data int w Data int x int y int cx int cy int fu Flags public static final native boolean Draw StateA int hdc int hbr int lp Output Func int l Data int w Data int x int y int cx int cy int fu Flags  DrawMenuBar hWnd DrawStateW lpOutputFunc lData wData fuFlags DrawStateA lpOutputFunc lData wData fuFlags
public static final native boolean Draw StateW int hdc int hbr int lp Output Func int l Data int w Data int x int y int cx int cy int fu Flags public static final native boolean Draw StateA int hdc int hbr int lp Output Func int l Data int w Data int x int y int cx int cy int fu Flags public static final native int Draw TextW int hDC char lp String int n Count RECT lp Rect int u Format  DrawStateW lpOutputFunc lData wData fuFlags DrawStateA lpOutputFunc lData wData fuFlags DrawTextW lpString nCount lpRect uFormat
public static final native boolean Draw StateA int hdc int hbr int lp Output Func int l Data int w Data int x int y int cx int cy int fu Flags public static final native int Draw TextW int hDC char lp String int n Count RECT lp Rect int u Format public static final native int Draw TextA int hDC byte lp String int n Count RECT lp Rect int u Format  DrawStateA lpOutputFunc lData wData fuFlags DrawTextW lpString nCount lpRect uFormat DrawTextA lpString nCount lpRect uFormat
public static final native int Draw TextW int hDC char lp String int n Count RECT lp Rect int u Format public static final native int Draw TextA int hDC byte lp String int n Count RECT lp Rect int u Format public static final native boolean Ellipse int hdc int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect  DrawTextW lpString nCount lpRect uFormat DrawTextA lpString nCount lpRect uFormat nLeftRect nTopRect nRightRect nBottomRect
public static final native int Draw TextA int hDC byte lp String int n Count RECT lp Rect int u Format public static final native boolean Ellipse int hdc int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect public static final native boolean Enable Menu Item int h Menu int uID Enable Item int u Enable  DrawTextA lpString nCount lpRect uFormat nLeftRect nTopRect nRightRect nBottomRect EnableMenuItem hMenu uIDEnableItem uEnable
public static final native boolean Ellipse int hdc int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect public static final native boolean Enable Menu Item int h Menu int uID Enable Item int u Enable public static final native boolean Enable Scroll Bar int h Wnd int wS Bflags int w Arrows  nLeftRect nTopRect nRightRect nBottomRect EnableMenuItem hMenu uIDEnableItem uEnable EnableScrollBar hWnd wSBflags wArrows
public static final native boolean Enable Menu Item int h Menu int uID Enable Item int u Enable public static final native boolean Enable Scroll Bar int h Wnd int wS Bflags int w Arrows public static final native boolean Enable Window int h Wnd boolean b Enable  EnableMenuItem hMenu uIDEnableItem uEnable EnableScrollBar hWnd wSBflags wArrows EnableWindow hWnd bEnable
public static final native boolean Enable Scroll Bar int h Wnd int wS Bflags int w Arrows public static final native boolean Enable Window int h Wnd boolean b Enable public static final native boolean Enum System Language GroupsW int p Lang Group Enum Proc int dw Flags int l Param  EnableScrollBar hWnd wSBflags wArrows EnableWindow hWnd bEnable EnumSystemLanguageGroupsW pLangGroupEnumProc dwFlags lParam
public static final native boolean Enable Window int h Wnd boolean b Enable public static final native boolean Enum System Language GroupsW int p Lang Group Enum Proc int dw Flags int l Param public static final native boolean Enum System Language GroupsA int p Lang Group Enum Proc int dw Flags int l Param  EnableWindow hWnd bEnable EnumSystemLanguageGroupsW pLangGroupEnumProc dwFlags lParam EnumSystemLanguageGroupsA pLangGroupEnumProc dwFlags lParam
public static final native boolean Enum System Language GroupsW int p Lang Group Enum Proc int dw Flags int l Param public static final native boolean Enum System Language GroupsA int p Lang Group Enum Proc int dw Flags int l Param public static final native boolean Enum System LocalesW int lp Locale Enum Proc int dw Flags  EnumSystemLanguageGroupsW pLangGroupEnumProc dwFlags lParam EnumSystemLanguageGroupsA pLangGroupEnumProc dwFlags lParam EnumSystemLocalesW lpLocaleEnumProc dwFlags
public static final native boolean Enum System Language GroupsA int p Lang Group Enum Proc int dw Flags int l Param public static final native boolean Enum System LocalesW int lp Locale Enum Proc int dw Flags public static final native boolean Enum System LocalesA int lp Locale Enum Proc int dw Flags  EnumSystemLanguageGroupsA pLangGroupEnumProc dwFlags lParam EnumSystemLocalesW lpLocaleEnumProc dwFlags EnumSystemLocalesA lpLocaleEnumProc dwFlags
public static final native boolean Enum System LocalesW int lp Locale Enum Proc int dw Flags public static final native boolean Enum System LocalesA int lp Locale Enum Proc int dw Flags public static final native boolean End Defer Window Pos int h Win Pos Info  EnumSystemLocalesW lpLocaleEnumProc dwFlags EnumSystemLocalesA lpLocaleEnumProc dwFlags EndDeferWindowPos hWinPosInfo
public static final native boolean Enum System LocalesA int lp Locale Enum Proc int dw Flags public static final native boolean End Defer Window Pos int h Win Pos Info public static final native int End Doc int hdc  EnumSystemLocalesA lpLocaleEnumProc dwFlags EndDeferWindowPos hWinPosInfo EndDoc
public static final native boolean End Defer Window Pos int h Win Pos Info public static final native int End Doc int hdc public static final native int End Page int hdc  EndDeferWindowPos hWinPosInfo EndDoc EndPage
public static final native int End Doc int hdc public static final native int End Page int hdc public static final native int End Paint int h Wnd PAINTSTRUCT lp Paint  EndDoc EndPage EndPaint hWnd lpPaint
public static final native int End Page int hdc public static final native int End Paint int h Wnd PAINTSTRUCT lp Paint public static final native boolean Enum Display Monitors int hdc RECT lprc Clip int lpfn Enum int dw Data  EndPage EndPaint hWnd lpPaint EnumDisplayMonitors lprcClip lpfnEnum dwData
public static final native int End Paint int h Wnd PAINTSTRUCT lp Paint public static final native boolean Enum Display Monitors int hdc RECT lprc Clip int lpfn Enum int dw Data public static final native int Enum Font FamiliesW int hdc char lpsz Family int lp Enum Font Fam Proc int l Param  EndPaint hWnd lpPaint EnumDisplayMonitors lprcClip lpfnEnum dwData EnumFontFamiliesW lpszFamily lpEnumFontFamProc lParam
public static final native boolean Enum Display Monitors int hdc RECT lprc Clip int lpfn Enum int dw Data public static final native int Enum Font FamiliesW int hdc char lpsz Family int lp Enum Font Fam Proc int l Param public static final native int Enum Font FamiliesA int hdc byte lpsz Family int lp Enum Font Fam Proc int l Param  EnumDisplayMonitors lprcClip lpfnEnum dwData EnumFontFamiliesW lpszFamily lpEnumFontFamProc lParam EnumFontFamiliesA lpszFamily lpEnumFontFamProc lParam
public static final native int Enum Font FamiliesW int hdc char lpsz Family int lp Enum Font Fam Proc int l Param public static final native int Enum Font FamiliesA int hdc byte lpsz Family int lp Enum Font Fam Proc int l Param public static final native int Enum Font Families ExW int hdc LOGFONTW lp Logfont int lp Enum Font Fam Ex Proc int l Param int dw Flags  EnumFontFamiliesW lpszFamily lpEnumFontFamProc lParam EnumFontFamiliesA lpszFamily lpEnumFontFamProc lParam EnumFontFamiliesExW lpLogfont lpEnumFontFamExProc lParam dwFlags
public static final native int Enum Font FamiliesA int hdc byte lpsz Family int lp Enum Font Fam Proc int l Param public static final native int Enum Font Families ExW int hdc LOGFONTW lp Logfont int lp Enum Font Fam Ex Proc int l Param int dw Flags public static final native int Enum Font Families ExA int hdc LOGFONTA lp Logfont int lp Enum Font Fam Ex Proc int l Param int dw Flags  EnumFontFamiliesA lpszFamily lpEnumFontFamProc lParam EnumFontFamiliesExW lpLogfont lpEnumFontFamExProc lParam dwFlags EnumFontFamiliesExA lpLogfont lpEnumFontFamExProc lParam dwFlags
public static final native int Enum Font Families ExW int hdc LOGFONTW lp Logfont int lp Enum Font Fam Ex Proc int l Param int dw Flags public static final native int Enum Font Families ExA int hdc LOGFONTA lp Logfont int lp Enum Font Fam Ex Proc int l Param int dw Flags public static final native boolean Equal Rect RECT lprc1 RECT lprc2  EnumFontFamiliesExW lpLogfont lpEnumFontFamExProc lParam dwFlags EnumFontFamiliesExA lpLogfont lpEnumFontFamExProc lParam dwFlags EqualRect
public static final native int Enum Font Families ExA int hdc LOGFONTA lp Logfont int lp Enum Font Fam Ex Proc int l Param int dw Flags public static final native boolean Equal Rect RECT lprc1 RECT lprc2 public static final native boolean Equal Rgn int h Src Rgn1 int h Src Rgn2  EnumFontFamiliesExA lpLogfont lpEnumFontFamExProc lParam dwFlags EqualRect EqualRgn hSrcRgn1 hSrcRgn2
public static final native boolean Equal Rect RECT lprc1 RECT lprc2 public static final native boolean Equal Rgn int h Src Rgn1 int h Src Rgn2 public static final native int Expand Environment StringsW char lp Src char ls Dst int n Size  EqualRect EqualRgn hSrcRgn1 hSrcRgn2 ExpandEnvironmentStringsW lpSrc lsDst nSize
public static final native boolean Equal Rgn int h Src Rgn1 int h Src Rgn2 public static final native int Expand Environment StringsW char lp Src char ls Dst int n Size public static final native int Expand Environment StringsA byte lp Src byte ls Dst int n Size  EqualRgn hSrcRgn1 hSrcRgn2 ExpandEnvironmentStringsW lpSrc lsDst nSize ExpandEnvironmentStringsA lpSrc lsDst nSize
public static final native int Expand Environment StringsW char lp Src char ls Dst int n Size public static final native int Expand Environment StringsA byte lp Src byte ls Dst int n Size public static final native boolean Ext Text OutW int hdc int X int Y int fu Options RECT lprc char lp String int cb Count int lp Dx  ExpandEnvironmentStringsW lpSrc lsDst nSize ExpandEnvironmentStringsA lpSrc lsDst nSize ExtTextOutW fuOptions lpString cbCount lpDx
public static final native int Expand Environment StringsA byte lp Src byte ls Dst int n Size public static final native boolean Ext Text OutW int hdc int X int Y int fu Options RECT lprc char lp String int cb Count int lp Dx public static final native boolean Ext Text OutA int hdc int X int Y int fu Options RECT lprc byte lp String int cb Count int lp Dx  ExpandEnvironmentStringsA lpSrc lsDst nSize ExtTextOutW fuOptions lpString cbCount lpDx ExtTextOutA fuOptions lpString cbCount lpDx
public static final native boolean Ext Text OutW int hdc int X int Y int fu Options RECT lprc char lp String int cb Count int lp Dx public static final native boolean Ext Text OutA int hdc int X int Y int fu Options RECT lprc byte lp String int cb Count int lp Dx public static final native int Extract Icon ExW char lpsz File int n Icon Index int phicon Large int phicon Small int n Icons  ExtTextOutW fuOptions lpString cbCount lpDx ExtTextOutA fuOptions lpString cbCount lpDx ExtractIconExW lpszFile nIconIndex phiconLarge phiconSmall nIcons
public static final native boolean Ext Text OutA int hdc int X int Y int fu Options RECT lprc byte lp String int cb Count int lp Dx public static final native int Extract Icon ExW char lpsz File int n Icon Index int phicon Large int phicon Small int n Icons public static final native int Extract Icon ExA byte lpsz File int n Icon Index int phicon Large int phicon Small int n Icons  ExtTextOutA fuOptions lpString cbCount lpDx ExtractIconExW lpszFile nIconIndex phiconLarge phiconSmall nIcons ExtractIconExA lpszFile nIconIndex phiconLarge phiconSmall nIcons
public static final native int Extract Icon ExW char lpsz File int n Icon Index int phicon Large int phicon Small int n Icons public static final native int Extract Icon ExA byte lpsz File int n Icon Index int phicon Large int phicon Small int n Icons public static final native int Fill Rect int hDC RECT lprc int hbr  ExtractIconExW lpszFile nIconIndex phiconLarge phiconSmall nIcons ExtractIconExA lpszFile nIconIndex phiconLarge phiconSmall nIcons FillRect
public static final native int Extract Icon ExA byte lpsz File int n Icon Index int phicon Large int phicon Small int n Icons public static final native int Fill Rect int hDC RECT lprc int hbr public static final native int Find WindowA byte lp Class Name byte lp Window Name  ExtractIconExA lpszFile nIconIndex phiconLarge phiconSmall nIcons FillRect FindWindowA lpClassName lpWindowName
public static final native int Fill Rect int hDC RECT lprc int hbr public static final native int Find WindowA byte lp Class Name byte lp Window Name public static final native int Find WindowW char lp Class Name char lp Window Name  FillRect FindWindowA lpClassName lpWindowName FindWindowW lpClassName lpWindowName
public static final native int Find WindowA byte lp Class Name byte lp Window Name public static final native int Find WindowW char lp Class Name char lp Window Name public static final native int Format MessageA int dw Flags int lp Source int dw Message Id int dw Language Id int lp Buffer int n Size int Arguments  FindWindowA lpClassName lpWindowName FindWindowW lpClassName lpWindowName FormatMessageA dwFlags lpSource dwMessageId dwLanguageId lpBuffer nSize
public static final native int Find WindowW char lp Class Name char lp Window Name public static final native int Format MessageA int dw Flags int lp Source int dw Message Id int dw Language Id int lp Buffer int n Size int Arguments public static final native int Format MessageW int dw Flags int lp Source int dw Message Id int dw Language Id int lp Buffer int n Size int Arguments  FindWindowW lpClassName lpWindowName FormatMessageA dwFlags lpSource dwMessageId dwLanguageId lpBuffer nSize FormatMessageW dwFlags lpSource dwMessageId dwLanguageId lpBuffer nSize
public static final native int Format MessageA int dw Flags int lp Source int dw Message Id int dw Language Id int lp Buffer int n Size int Arguments public static final native int Format MessageW int dw Flags int lp Source int dw Message Id int dw Language Id int lp Buffer int n Size int Arguments public static final native boolean Free Library int h Lib Module  FormatMessageA dwFlags lpSource dwMessageId dwLanguageId lpBuffer nSize FormatMessageW dwFlags lpSource dwMessageId dwLanguageId lpBuffer nSize FreeLibrary hLibModule
public static final native int Format MessageW int dw Flags int lp Source int dw Message Id int dw Language Id int lp Buffer int n Size int Arguments public static final native boolean Free Library int h Lib Module public static final native int Gdi Set Batch Limit int dw Limit  FormatMessageW dwFlags lpSource dwMessageId dwLanguageId lpBuffer nSize FreeLibrary hLibModule GdiSetBatchLimit dwLimit
public static final native boolean Free Library int h Lib Module public static final native int Gdi Set Batch Limit int dw Limit public static final native int GetACP  FreeLibrary hLibModule GdiSetBatchLimit dwLimit
public static final native int Gdi Set Batch Limit int dw Limit public static final native int GetACP public static final native int Get Active Window  GdiSetBatchLimit dwLimit GetActiveWindow
public static final native int GetACP public static final native int Get Active Window public static final native int Get Bk Color int hDC  GetActiveWindow GetBkColor
public static final native int Get Active Window public static final native int Get Bk Color int hDC public static final native int Get Capture  GetActiveWindow GetBkColor GetCapture
public static final native int Get Bk Color int hDC public static final native int Get Capture public static final native boolean Get Caret Pos POINT lp Point  GetBkColor GetCapture GetCaretPos lpPoint
public static final native int Get Capture public static final native boolean Get Caret Pos POINT lp Point public static final native boolean Get CharABC WidthsA int hdc int i First Char int i Last Char int lpabc  GetCapture GetCaretPos lpPoint GetCharABCWidthsA iFirstChar iLastChar
public static final native boolean Get Caret Pos POINT lp Point public static final native boolean Get CharABC WidthsA int hdc int i First Char int i Last Char int lpabc public static final native boolean Get CharABC WidthsW int hdc int i First Char int i Last Char int lpabc  GetCaretPos lpPoint GetCharABCWidthsA iFirstChar iLastChar GetCharABCWidthsW iFirstChar iLastChar
public static final native boolean Get CharABC WidthsA int hdc int i First Char int i Last Char int lpabc public static final native boolean Get CharABC WidthsW int hdc int i First Char int i Last Char int lpabc public static final native int Get Character PlacementW int hdc char lp String int n Count int n Max Extent GCP RESULTS lp Results int dw Flags  GetCharABCWidthsA iFirstChar iLastChar GetCharABCWidthsW iFirstChar iLastChar GetCharacterPlacementW lpString nCount nMaxExtent GCP_RESULTS lpResults dwFlags
public static final native boolean Get CharABC WidthsW int hdc int i First Char int i Last Char int lpabc public static final native int Get Character PlacementW int hdc char lp String int n Count int n Max Extent GCP RESULTS lp Results int dw Flags public static final native int Get Character PlacementA int hdc byte lp String int n Count int n Max Extent GCP RESULTS lp Results int dw Flags  GetCharABCWidthsW iFirstChar iLastChar GetCharacterPlacementW lpString nCount nMaxExtent GCP_RESULTS lpResults dwFlags GetCharacterPlacementA lpString nCount nMaxExtent GCP_RESULTS lpResults dwFlags
public static final native int Get Character PlacementW int hdc char lp String int n Count int n Max Extent GCP RESULTS lp Results int dw Flags public static final native int Get Character PlacementA int hdc byte lp String int n Count int n Max Extent GCP RESULTS lp Results int dw Flags public static final native boolean Get Char WidthA int hdc int i First Char int i Last Char int lp Buffer  GetCharacterPlacementW lpString nCount nMaxExtent GCP_RESULTS lpResults dwFlags GetCharacterPlacementA lpString nCount nMaxExtent GCP_RESULTS lpResults dwFlags GetCharWidthA iFirstChar iLastChar lpBuffer
public static final native int Get Character PlacementA int hdc byte lp String int n Count int n Max Extent GCP RESULTS lp Results int dw Flags public static final native boolean Get Char WidthA int hdc int i First Char int i Last Char int lp Buffer public static final native boolean Get Char WidthW int hdc int i First Char int i Last Char int lp Buffer  GetCharacterPlacementA lpString nCount nMaxExtent GCP_RESULTS lpResults dwFlags GetCharWidthA iFirstChar iLastChar lpBuffer GetCharWidthW iFirstChar iLastChar lpBuffer
public static final native boolean Get Char WidthA int hdc int i First Char int i Last Char int lp Buffer public static final native boolean Get Char WidthW int hdc int i First Char int i Last Char int lp Buffer public static final native boolean Get Class InfoW int h Instance char lp Class Name WNDCLASS lp Wnd Class  GetCharWidthA iFirstChar iLastChar lpBuffer GetCharWidthW iFirstChar iLastChar lpBuffer GetClassInfoW hInstance lpClassName lpWndClass
public static final native boolean Get Char WidthW int hdc int i First Char int i Last Char int lp Buffer public static final native boolean Get Class InfoW int h Instance char lp Class Name WNDCLASS lp Wnd Class public static final native boolean Get Class InfoA int h Instance byte lp Class Name WNDCLASS lp Wnd Class  GetCharWidthW iFirstChar iLastChar lpBuffer GetClassInfoW hInstance lpClassName lpWndClass GetClassInfoA hInstance lpClassName lpWndClass
public static final native boolean Get Class InfoW int h Instance char lp Class Name WNDCLASS lp Wnd Class public static final native boolean Get Class InfoA int h Instance byte lp Class Name WNDCLASS lp Wnd Class public static final native boolean Get Client Rect int h Wnd RECT lp Rect  GetClassInfoW hInstance lpClassName lpWndClass GetClassInfoA hInstance lpClassName lpWndClass GetClientRect hWnd lpRect
public static final native boolean Get Class InfoA int h Instance byte lp Class Name WNDCLASS lp Wnd Class public static final native boolean Get Client Rect int h Wnd RECT lp Rect public static final native int Get Clipboard Data int u Format  GetClassInfoA hInstance lpClassName lpWndClass GetClientRect hWnd lpRect GetClipboardData uFormat
public static final native boolean Get Client Rect int h Wnd RECT lp Rect public static final native int Get Clipboard Data int u Format public static final native int Get Clipboard Format NameA int format byte lpsz Format Name int cch Max Count  GetClientRect hWnd lpRect GetClipboardData uFormat GetClipboardFormatNameA lpszFormatName cchMaxCount
public static final native int Get Clipboard Data int u Format public static final native int Get Clipboard Format NameA int format byte lpsz Format Name int cch Max Count public static final native int Get Clipboard Format NameW int format char lpsz Format Name int cch Max Count  GetClipboardData uFormat GetClipboardFormatNameA lpszFormatName cchMaxCount GetClipboardFormatNameW lpszFormatName cchMaxCount
public static final native int Get Clipboard Format NameA int format byte lpsz Format Name int cch Max Count public static final native int Get Clipboard Format NameW int format char lpsz Format Name int cch Max Count public static final native int Get Clip Box int hdc RECT lprc  GetClipboardFormatNameA lpszFormatName cchMaxCount GetClipboardFormatNameW lpszFormatName cchMaxCount GetClipBox
public static final native int Get Clipboard Format NameW int format char lpsz Format Name int cch Max Count public static final native int Get Clip Box int hdc RECT lprc public static final native int Get Clip Rgn int hdc int hrgn  GetClipboardFormatNameW lpszFormatName cchMaxCount GetClipBox GetClipRgn
public static final native int Get Clip Box int hdc RECT lprc public static final native int Get Clip Rgn int hdc int hrgn public static final native boolean Get Combo Box Info int hwnd Combo COMBOBOXINFO pcbi  GetClipBox GetClipRgn GetComboBoxInfo hwndCombo
public static final native int Get Clip Rgn int hdc int hrgn public static final native boolean Get Combo Box Info int hwnd Combo COMBOBOXINFO pcbi public static final native int Get Current Object int hdc int u Object Type  GetClipRgn GetComboBoxInfo hwndCombo GetCurrentObject uObjectType
public static final native boolean Get Combo Box Info int hwnd Combo COMBOBOXINFO pcbi public static final native int Get Current Object int hdc int u Object Type public static final native int Get Current Process Id  GetComboBoxInfo hwndCombo GetCurrentObject uObjectType GetCurrentProcessId
public static final native int Get Current Object int hdc int u Object Type public static final native int Get Current Process Id public static final native int Get Current Thread Id  GetCurrentObject uObjectType GetCurrentProcessId GetCurrentThreadId
public static final native int Get Current Process Id public static final native int Get Current Thread Id public static final native int Get Cursor  GetCurrentProcessId GetCurrentThreadId GetCursor
public static final native int Get Current Thread Id public static final native int Get Cursor public static final native boolean Get Cursor Pos POINT lp Point  GetCurrentThreadId GetCursor GetCursorPos lpPoint
public static final native int Get Cursor public static final native boolean Get Cursor Pos POINT lp Point public static final native int GetDC int hwnd  GetCursor GetCursorPos lpPoint
public static final native boolean Get Cursor Pos POINT lp Point public static final native int GetDC int hwnd public static final native int GetDC Ex int h Wnd int hrgn Clip int flags  GetCursorPos lpPoint GetDCEx hWnd hrgnClip
public static final native int GetDC int hwnd public static final native int GetDC Ex int h Wnd int hrgn Clip int flags public static final native int Get Desktop Window  GetDCEx hWnd hrgnClip GetDesktopWindow
public static final native int GetDC Ex int h Wnd int hrgn Clip int flags public static final native int Get Desktop Window public static final native int Get Device Caps int hdc int n Index  GetDCEx hWnd hrgnClip GetDesktopWindow GetDeviceCaps nIndex
public static final native int Get Desktop Window public static final native int Get Device Caps int hdc int n Index public static final native int Get Dialog Base Units  GetDesktopWindow GetDeviceCaps nIndex GetDialogBaseUnits
public static final native int Get Device Caps int hdc int n Index public static final native int Get Dialog Base Units public static final native int GetDIB Color Table int hdc int u Start Index int c Entries byte p Colors  GetDeviceCaps nIndex GetDialogBaseUnits GetDIBColorTable uStartIndex cEntries pColors
public static final native int Get Dialog Base Units public static final native int GetDIB Color Table int hdc int u Start Index int c Entries byte p Colors public static final native int GetDI Bits int hdc int hbmp int u Start Scan int c Scan Lines int lpv Bits byte lpbi int u Usage  GetDialogBaseUnits GetDIBColorTable uStartIndex cEntries pColors GetDIBits uStartScan cScanLines lpvBits uUsage
public static final native int GetDIB Color Table int hdc int u Start Index int c Entries byte p Colors public static final native int GetDI Bits int hdc int hbmp int u Start Scan int c Scan Lines int lpv Bits byte lpbi int u Usage public static final native int Get Dlg Item int h Dlg int nID Dlg Item  GetDIBColorTable uStartIndex cEntries pColors GetDIBits uStartScan cScanLines lpvBits uUsage GetDlgItem hDlg nIDDlgItem
public static final native int GetDI Bits int hdc int hbmp int u Start Scan int c Scan Lines int lpv Bits byte lpbi int u Usage public static final native int Get Dlg Item int h Dlg int nID Dlg Item public static final native int Get Double Click Time  GetDIBits uStartScan cScanLines lpvBits uUsage GetDlgItem hDlg nIDDlgItem GetDoubleClickTime
public static final native int Get Dlg Item int h Dlg int nID Dlg Item public static final native int Get Double Click Time public static final native int Get Focus  GetDlgItem hDlg nIDDlgItem GetDoubleClickTime GetFocus
public static final native int Get Double Click Time public static final native int Get Focus public static final native int Get Font Language Info int hdc  GetDoubleClickTime GetFocus GetFontLanguageInfo
public static final native int Get Focus public static final native int Get Font Language Info int hdc public static final native boolean Get Icon Info int h Icon ICONINFO piconinfo  GetFocus GetFontLanguageInfo GetIconInfo hIcon
public static final native int Get Font Language Info int hdc public static final native boolean Get Icon Info int h Icon ICONINFO piconinfo public static final native int Get Keyboard Layout List int n Buff int lp List  GetFontLanguageInfo GetIconInfo hIcon GetKeyboardLayoutList nBuff lpList
public static final native boolean Get Icon Info int h Icon ICONINFO piconinfo public static final native int Get Keyboard Layout List int n Buff int lp List public static final native int Get Keyboard Layout int id Thread public static final native short Get Key State int n Virt Key  GetIconInfo hIcon GetKeyboardLayoutList nBuff lpList GetKeyboardLayout idThread GetKeyState nVirtKey
public static final native boolean Get Icon Info int h Icon ICONINFO piconinfo public static final native int Get Keyboard Layout List int n Buff int lp List public static final native int Get Keyboard Layout int id Thread public static final native short Get Key State int n Virt Key  GetIconInfo hIcon GetKeyboardLayoutList nBuff lpList GetKeyboardLayout idThread GetKeyState nVirtKey
public static final native int Get Keyboard Layout List int n Buff int lp List public static final native int Get Keyboard Layout int id Thread public static final native short Get Key State int n Virt Key public static final native boolean Get Keyboard State byte lp Key State  GetKeyboardLayoutList nBuff lpList GetKeyboardLayout idThread GetKeyState nVirtKey GetKeyboardState lpKeyState
public static final native int Get Keyboard Layout int id Thread public static final native short Get Key State int n Virt Key public static final native boolean Get Keyboard State byte lp Key State public static final native int Get Key Name TextW int l Param char lp String int n Size  GetKeyboardLayout idThread GetKeyState nVirtKey GetKeyboardState lpKeyState GetKeyNameTextW lParam lpString nSize
public static final native boolean Get Keyboard State byte lp Key State public static final native int Get Key Name TextW int l Param char lp String int n Size public static final native int Get Key Name TextA int l Param byte lp String int n Size  GetKeyboardState lpKeyState GetKeyNameTextW lParam lpString nSize GetKeyNameTextA lParam lpString nSize
public static final native int Get Key Name TextW int l Param char lp String int n Size public static final native int Get Key Name TextA int l Param byte lp String int n Size public static final native int Get Last Active Popup int h Wnd  GetKeyNameTextW lParam lpString nSize GetKeyNameTextA lParam lpString nSize GetLastActivePopup hWnd
public static final native int Get Key Name TextA int l Param byte lp String int n Size public static final native int Get Last Active Popup int h Wnd public static final native int Get Last Error  GetKeyNameTextA lParam lpString nSize GetLastActivePopup hWnd GetLastError
public static final native int Get Last Active Popup int h Wnd public static final native int Get Last Error public static final native int Get Layout int hdc  GetLastActivePopup hWnd GetLastError GetLayout
public static final native int Get Layout int hdc returns the instance handle to the swt library public static final native int Get Library Handle  GetLayout GetLibraryHandle
returns the instance handle to the swt library public static final native int Get Library Handle public static final native int Get Locale InfoW int Locale int LC Type char lpLC Data int cch Data  GetLibraryHandle GetLocaleInfoW LCType lpLCData cchData
public static final native int Get Library Handle public static final native int Get Locale InfoW int Locale int LC Type char lpLC Data int cch Data public static final native int Get Locale InfoA int Locale int LC Type byte lpLC Data int cch Data  GetLibraryHandle GetLocaleInfoW LCType lpLCData cchData GetLocaleInfoA LCType lpLCData cchData
public static final native int Get Locale InfoW int Locale int LC Type char lpLC Data int cch Data public static final native int Get Locale InfoA int Locale int LC Type byte lpLC Data int cch Data public static final native int Get Menu int h Wnd  GetLocaleInfoW LCType lpLCData cchData GetLocaleInfoA LCType lpLCData cchData GetMenu hWnd
public static final native int Get Locale InfoA int Locale int LC Type byte lpLC Data int cch Data public static final native int Get Menu int h Wnd public static final native boolean Get Menu Bar Info int h Wnd int id Object int id Item MENUBARINFO pmbi  GetLocaleInfoA LCType lpLCData cchData GetMenu hWnd GetMenuBarInfo hWnd idObject idItem
public static final native int Get Menu int h Wnd public static final native boolean Get Menu Bar Info int h Wnd int id Object int id Item MENUBARINFO pmbi public static final native int Get Menu Default Item int h Menu int f By Pos int gmdi Flags  GetMenu hWnd GetMenuBarInfo hWnd idObject idItem GetMenuDefaultItem hMenu fByPos gmdiFlags
public static final native boolean Get Menu Bar Info int h Wnd int id Object int id Item MENUBARINFO pmbi public static final native int Get Menu Default Item int h Menu int f By Pos int gmdi Flags public static final native boolean Get Menu Info int hmenu MENUINFO lpcmi  GetMenuBarInfo hWnd idObject idItem GetMenuDefaultItem hMenu fByPos gmdiFlags GetMenuInfo
public static final native int Get Menu Default Item int h Menu int f By Pos int gmdi Flags public static final native boolean Get Menu Info int hmenu MENUINFO lpcmi public static final native int Get Menu Item Count int h Menu  GetMenuDefaultItem hMenu fByPos gmdiFlags GetMenuInfo GetMenuItemCount hMenu
public static final native boolean Get Menu Info int hmenu MENUINFO lpcmi public static final native int Get Menu Item Count int h Menu public static final native boolean Get Menu Item InfoW int h Menu int u Item boolean f By Position MENUITEMINFO lpmii  GetMenuInfo GetMenuItemCount hMenu GetMenuItemInfoW hMenu uItem fByPosition
public static final native int Get Menu Item Count int h Menu public static final native boolean Get Menu Item InfoW int h Menu int u Item boolean f By Position MENUITEMINFO lpmii public static final native boolean Get Menu Item InfoA int h Menu int u Item boolean f By Position MENUITEMINFO lpmii  GetMenuItemCount hMenu GetMenuItemInfoW hMenu uItem fByPosition GetMenuItemInfoA hMenu uItem fByPosition
public static final native boolean Get Menu Item InfoW int h Menu int u Item boolean f By Position MENUITEMINFO lpmii public static final native boolean Get Menu Item InfoA int h Menu int u Item boolean f By Position MENUITEMINFO lpmii public static final native boolean Get Menu Item Rect int h Wnd int h Menu int u Item RECT lprc Item  GetMenuItemInfoW hMenu uItem fByPosition GetMenuItemInfoA hMenu uItem fByPosition GetMenuItemRect hWnd hMenu uItem lprcItem
public static final native boolean Get Menu Item InfoA int h Menu int u Item boolean f By Position MENUITEMINFO lpmii public static final native boolean Get Menu Item Rect int h Wnd int h Menu int u Item RECT lprc Item public static final native boolean Get MessageW MSG lp Msg int h Wnd int w Msg Filter Min int w Msg Filter Max  GetMenuItemInfoA hMenu uItem fByPosition GetMenuItemRect hWnd hMenu uItem lprcItem GetMessageW lpMsg hWnd wMsgFilterMin wMsgFilterMax
public static final native boolean Get Menu Item Rect int h Wnd int h Menu int u Item RECT lprc Item public static final native boolean Get MessageW MSG lp Msg int h Wnd int w Msg Filter Min int w Msg Filter Max public static final native boolean Get MessageA MSG lp Msg int h Wnd int w Msg Filter Min int w Msg Filter Max  GetMenuItemRect hWnd hMenu uItem lprcItem GetMessageW lpMsg hWnd wMsgFilterMin wMsgFilterMax GetMessageA lpMsg hWnd wMsgFilterMin wMsgFilterMax
public static final native boolean Get MessageW MSG lp Msg int h Wnd int w Msg Filter Min int w Msg Filter Max public static final native boolean Get MessageA MSG lp Msg int h Wnd int w Msg Filter Min int w Msg Filter Max public static final native int Get Message Pos  GetMessageW lpMsg hWnd wMsgFilterMin wMsgFilterMax GetMessageA lpMsg hWnd wMsgFilterMin wMsgFilterMax GetMessagePos
public static final native boolean Get MessageA MSG lp Msg int h Wnd int w Msg Filter Min int w Msg Filter Max public static final native int Get Message Pos public static final native int Get Message Time  GetMessageA lpMsg hWnd wMsgFilterMin wMsgFilterMax GetMessagePos GetMessageTime
public static final native int Get Message Pos public static final native int Get Message Time public static final native int Get Text Charset int hdc  GetMessagePos GetMessageTime GetTextCharset
public static final native int Get Message Time public static final native int Get Text Charset int hdc public static final native int Get Tick Count  GetMessageTime GetTextCharset GetTickCount
public static final native int Get Text Charset int hdc public static final native int Get Tick Count public static final native int Get Module HandleW char lp Module Name  GetTextCharset GetTickCount GetModuleHandleW lpModuleName
public static final native int Get Tick Count public static final native int Get Module HandleW char lp Module Name public static final native int Get Module HandleA byte lp Module Name  GetTickCount GetModuleHandleW lpModuleName GetModuleHandleA lpModuleName
public static final native int Get Module HandleW char lp Module Name public static final native int Get Module HandleA byte lp Module Name public static final native boolean Get Monitor InfoW int hmonitor MONITORINFO lpmi  GetModuleHandleW lpModuleName GetModuleHandleA lpModuleName GetMonitorInfoW
public static final native int Get Module HandleA byte lp Module Name public static final native boolean Get Monitor InfoW int hmonitor MONITORINFO lpmi public static final native boolean Get Monitor InfoA int hmonitor MONITORINFO lpmi  GetModuleHandleA lpModuleName GetMonitorInfoW GetMonitorInfoA
public static final native boolean Get Monitor InfoW int hmonitor MONITORINFO lpmi public static final native boolean Get Monitor InfoA int hmonitor MONITORINFO lpmi public static final native int Get Nearest Palette Index int h Pal int cr Color  GetMonitorInfoW GetMonitorInfoA GetNearestPaletteIndex hPal crColor
public static final native boolean Get Monitor InfoA int hmonitor MONITORINFO lpmi public static final native int Get Nearest Palette Index int h Pal int cr Color public static final native int Get ObjectA int hgdiobj int cb Buffer BITMAP lpv Object  GetMonitorInfoA GetNearestPaletteIndex hPal crColor GetObjectA cbBuffer lpvObject
public static final native int Get Nearest Palette Index int h Pal int cr Color public static final native int Get ObjectA int hgdiobj int cb Buffer BITMAP lpv Object public static final native int Get ObjectW int hgdiobj int cb Buffer BITMAP lpv Object  GetNearestPaletteIndex hPal crColor GetObjectA cbBuffer lpvObject GetObjectW cbBuffer lpvObject
public static final native int Get ObjectA int hgdiobj int cb Buffer BITMAP lpv Object public static final native int Get ObjectW int hgdiobj int cb Buffer BITMAP lpv Object public static final native int Get ObjectA int hgdiobj int cb Buffer DIBSECTION lpv Object  GetObjectA cbBuffer lpvObject GetObjectW cbBuffer lpvObject GetObjectA cbBuffer lpvObject
public static final native int Get ObjectW int hgdiobj int cb Buffer BITMAP lpv Object public static final native int Get ObjectA int hgdiobj int cb Buffer DIBSECTION lpv Object public static final native int Get ObjectW int hgdiobj int cb Buffer DIBSECTION lpv Object  GetObjectW cbBuffer lpvObject GetObjectA cbBuffer lpvObject GetObjectW cbBuffer lpvObject
public static final native int Get ObjectA int hgdiobj int cb Buffer DIBSECTION lpv Object public static final native int Get ObjectW int hgdiobj int cb Buffer DIBSECTION lpv Object public static final native int Get ObjectA int hgdiobj int cb Buffer LOGBRUSH lpv Object  GetObjectA cbBuffer lpvObject GetObjectW cbBuffer lpvObject GetObjectA cbBuffer lpvObject
public static final native int Get ObjectW int hgdiobj int cb Buffer DIBSECTION lpv Object public static final native int Get ObjectA int hgdiobj int cb Buffer LOGBRUSH lpv Object public static final native int Get ObjectW int hgdiobj int cb Buffer LOGBRUSH lpv Object  GetObjectW cbBuffer lpvObject GetObjectA cbBuffer lpvObject GetObjectW cbBuffer lpvObject
public static final native int Get ObjectA int hgdiobj int cb Buffer LOGBRUSH lpv Object public static final native int Get ObjectW int hgdiobj int cb Buffer LOGBRUSH lpv Object public static final native int Get ObjectA int hgdiobj int cb Buffer LOGFONTA lpv Object  GetObjectA cbBuffer lpvObject GetObjectW cbBuffer lpvObject GetObjectA cbBuffer lpvObject
public static final native int Get ObjectW int hgdiobj int cb Buffer LOGBRUSH lpv Object public static final native int Get ObjectA int hgdiobj int cb Buffer LOGFONTA lpv Object public static final native int Get ObjectW int hgdiobj int cb Buffer LOGFONTW lpv Object  GetObjectW cbBuffer lpvObject GetObjectA cbBuffer lpvObject GetObjectW cbBuffer lpvObject
public static final native int Get ObjectA int hgdiobj int cb Buffer LOGFONTA lpv Object public static final native int Get ObjectW int hgdiobj int cb Buffer LOGFONTW lpv Object public static final native int Get ObjectA int hgdiobj int cb Buffer LOGPEN lpv Object  GetObjectA cbBuffer lpvObject GetObjectW cbBuffer lpvObject GetObjectA cbBuffer lpvObject
public static final native int Get ObjectW int hgdiobj int cb Buffer LOGFONTW lpv Object public static final native int Get ObjectA int hgdiobj int cb Buffer LOGPEN lpv Object public static final native int Get ObjectW int hgdiobj int cb Buffer LOGPEN lpv Object  GetObjectW cbBuffer lpvObject GetObjectA cbBuffer lpvObject GetObjectW cbBuffer lpvObject
public static final native int Get ObjectA int hgdiobj int cb Buffer LOGPEN lpv Object public static final native int Get ObjectW int hgdiobj int cb Buffer LOGPEN lpv Object public static final native boolean Get Open File NameW OPENFILENAME lpofn  GetObjectA cbBuffer lpvObject GetObjectW cbBuffer lpvObject GetOpenFileNameW
public static final native int Get ObjectW int hgdiobj int cb Buffer LOGPEN lpv Object public static final native boolean Get Open File NameW OPENFILENAME lpofn public static final native boolean Get Open File NameA OPENFILENAME lpofn  GetObjectW cbBuffer lpvObject GetOpenFileNameW GetOpenFileNameA
public static final native boolean Get Open File NameW OPENFILENAME lpofn public static final native boolean Get Open File NameA OPENFILENAME lpofn public static final native int Get Palette Entries int h Palette int i Start Index int n Entries byte log Palette  GetOpenFileNameW GetOpenFileNameA GetPaletteEntries hPalette iStartIndex nEntries logPalette
public static final native boolean Get Open File NameA OPENFILENAME lpofn public static final native int Get Palette Entries int h Palette int i Start Index int n Entries byte log Palette public static final native int Get Parent int h Wnd  GetOpenFileNameA GetPaletteEntries hPalette iStartIndex nEntries logPalette GetParent hWnd
public static final native int Get Palette Entries int h Palette int i Start Index int n Entries byte log Palette public static final native int Get Parent int h Wnd public static final native int Get Pixel int hdc int x int y  GetPaletteEntries hPalette iStartIndex nEntries logPalette GetParent hWnd GetPixel
public static final native int Get Parent int h Wnd public static final native int Get Pixel int hdc int x int y public static final native int Get Proc Address int h Module byte lp Proc Name  GetParent hWnd GetPixel GetProcAddress hModule lpProcName
public static final native int Get Pixel int hdc int x int y public static final native int Get Proc Address int h Module byte lp Proc Name public static final native int Get Process Heap  GetPixel GetProcAddress hModule lpProcName GetProcessHeap
public static final native int Get Proc Address int h Module byte lp Proc Name public static final native int Get Process Heap public static final native int Get Profile StringW char lp App Name char lp Key Name char lp Default char lp Returned String int n Size  GetProcAddress hModule lpProcName GetProcessHeap GetProfileStringW lpAppName lpKeyName lpDefault lpReturnedString nSize
public static final native int Get Process Heap public static final native int Get Profile StringW char lp App Name char lp Key Name char lp Default char lp Returned String int n Size public static final native int Get Profile StringA byte lp App Name byte lp Key Name byte lp Default byte lp Returned String int n Size  GetProcessHeap GetProfileStringW lpAppName lpKeyName lpDefault lpReturnedString nSize GetProfileStringA lpAppName lpKeyName lpDefault lpReturnedString nSize
public static final native int Get Profile StringW char lp App Name char lp Key Name char lp Default char lp Returned String int n Size public static final native int Get Profile StringA byte lp App Name byte lp Key Name byte lp Default byte lp Returned String int n Size public static final native int Get Random Rgn int hdc int hrgn int i Num  GetProfileStringW lpAppName lpKeyName lpDefault lpReturnedString nSize GetProfileStringA lpAppName lpKeyName lpDefault lpReturnedString nSize GetRandomRgn iNum
public static final native int Get Profile StringA byte lp App Name byte lp Key Name byte lp Default byte lp Returned String int n Size public static final native int Get Random Rgn int hdc int hrgn int i Num public static final native int Get Region Data int h Rgn int dw Count int lp Rgn Data  GetProfileStringA lpAppName lpKeyName lpDefault lpReturnedString nSize GetRandomRgn iNum GetRegionData hRgn dwCount lpRgnData
public static final native int Get Random Rgn int hdc int hrgn int i Num public static final native int Get Region Data int h Rgn int dw Count int lp Rgn Data public static final native int Get Rgn Box int hrgn RECT lprc  GetRandomRgn iNum GetRegionData hRgn dwCount lpRgnData GetRgnBox
public static final native int Get Region Data int h Rgn int dw Count int lp Rgn Data public static final native int Get Rgn Box int hrgn RECT lprc public static final native int GetROP2 int hdc  GetRegionData hRgn dwCount lpRgnData GetRgnBox
public static final native int Get Rgn Box int hrgn RECT lprc public static final native int GetROP2 int hdc public static final native boolean Get Save File NameW OPENFILENAME lpofn  GetRgnBox GetSaveFileNameW
public static final native int GetROP2 int hdc public static final native boolean Get Save File NameW OPENFILENAME lpofn public static final native boolean Get Save File NameA OPENFILENAME lpofn  GetSaveFileNameW GetSaveFileNameA
public static final native boolean Get Save File NameW OPENFILENAME lpofn public static final native boolean Get Save File NameA OPENFILENAME lpofn public static final native boolean Get Scroll Info int hwnd int flags SCROLLINFO info  GetSaveFileNameW GetSaveFileNameA GetScrollInfo
public static final native boolean Get Save File NameA OPENFILENAME lpofn public static final native boolean Get Scroll Info int hwnd int flags SCROLLINFO info public static final native int Get Stock Object int fn Object  GetSaveFileNameA GetScrollInfo GetStockObject fnObject
public static final native boolean Get Scroll Info int hwnd int flags SCROLLINFO info public static final native int Get Stock Object int fn Object public static final native int Get Sys Color int n Index  GetScrollInfo GetStockObject fnObject GetSysColor nIndex
public static final native int Get Stock Object int fn Object public static final native int Get Sys Color int n Index public static final native int Get Sys Color Brush int n Index  GetStockObject fnObject GetSysColor nIndex GetSysColorBrush nIndex
public static final native int Get Sys Color int n Index public static final native int Get Sys Color Brush int n Index public static final native int Get System Menu int h Wnd boolean b Revert  GetSysColor nIndex GetSysColorBrush nIndex GetSystemMenu hWnd bRevert
public static final native int Get Sys Color Brush int n Index public static final native int Get System Menu int h Wnd boolean b Revert public static final native int Get System Metrics int n Index  GetSysColorBrush nIndex GetSystemMenu hWnd bRevert GetSystemMetrics nIndex
public static final native int Get System Menu int h Wnd boolean b Revert public static final native int Get System Metrics int n Index public static final native int Get System Palette Entries int hdc int i Start Index int n Entries byte lppe  GetSystemMenu hWnd bRevert GetSystemMetrics nIndex GetSystemPaletteEntries iStartIndex nEntries
public static final native int Get System Metrics int n Index public static final native int Get System Palette Entries int hdc int i Start Index int n Entries byte lppe public static final native int Get Text Color int hDC  GetSystemMetrics nIndex GetSystemPaletteEntries iStartIndex nEntries GetTextColor
public static final native int Get System Palette Entries int hdc int i Start Index int n Entries byte lppe public static final native int Get Text Color int hDC public static final native boolean Get Text Extent Point32W int hdc char lp String int cb String SIZE lp Size  GetSystemPaletteEntries iStartIndex nEntries GetTextColor GetTextExtentPoint32W lpString cbString lpSize
public static final native int Get Text Color int hDC public static final native boolean Get Text Extent Point32W int hdc char lp String int cb String SIZE lp Size public static final native boolean Get Text Extent Point32A int hdc byte lp String int cb String SIZE lp Size  GetTextColor GetTextExtentPoint32W lpString cbString lpSize GetTextExtentPoint32A lpString cbString lpSize
public static final native boolean Get Text Extent Point32W int hdc char lp String int cb String SIZE lp Size public static final native boolean Get Text Extent Point32A int hdc byte lp String int cb String SIZE lp Size public static final native boolean Get Text MetricsW int hdc TEXTMETRICW lptm  GetTextExtentPoint32W lpString cbString lpSize GetTextExtentPoint32A lpString cbString lpSize GetTextMetricsW
public static final native boolean Get Text Extent Point32A int hdc byte lp String int cb String SIZE lp Size public static final native boolean Get Text MetricsW int hdc TEXTMETRICW lptm public static final native boolean Get Text MetricsA int hdc TEXTMETRICA lptm  GetTextExtentPoint32A lpString cbString lpSize GetTextMetricsW GetTextMetricsA
public static final native boolean Get Text MetricsW int hdc TEXTMETRICW lptm public static final native boolean Get Text MetricsA int hdc TEXTMETRICA lptm public static final native boolean Get Update Rect int h Wnd RECT lp Rect boolean b Erase  GetTextMetricsW GetTextMetricsA GetUpdateRect hWnd lpRect bErase
public static final native boolean Get Text MetricsA int hdc TEXTMETRICA lptm public static final native boolean Get Update Rect int h Wnd RECT lp Rect boolean b Erase public static final native int Get Update Rgn int h Wnd int h Rgn boolean b Erase  GetTextMetricsA GetUpdateRect hWnd lpRect bErase GetUpdateRgn hWnd hRgn bErase
public static final native boolean Get Update Rect int h Wnd RECT lp Rect boolean b Erase public static final native int Get Update Rgn int h Wnd int h Rgn boolean b Erase public static final native boolean Get Version ExW OSVERSIONINFOW lp Version Info  GetUpdateRect hWnd lpRect bErase GetUpdateRgn hWnd hRgn bErase GetVersionExW lpVersionInfo
public static final native int Get Update Rgn int h Wnd int h Rgn boolean b Erase public static final native boolean Get Version ExW OSVERSIONINFOW lp Version Info public static final native boolean Get Version ExA OSVERSIONINFOA lp Version Info  GetUpdateRgn hWnd hRgn bErase GetVersionExW lpVersionInfo GetVersionExA lpVersionInfo
public static final native boolean Get Version ExW OSVERSIONINFOW lp Version Info public static final native boolean Get Version ExA OSVERSIONINFOA lp Version Info public static final native int Get Window int h Wnd int u Cmd  GetVersionExW lpVersionInfo GetVersionExA lpVersionInfo GetWindow hWnd uCmd
public static final native boolean Get Version ExA OSVERSIONINFOA lp Version Info public static final native int Get Window int h Wnd int u Cmd public static final native int Get Window LongW int h Wnd int n Index  GetVersionExA lpVersionInfo GetWindow hWnd uCmd GetWindowLongW hWnd nIndex
public static final native int Get Window int h Wnd int u Cmd public static final native int Get Window LongW int h Wnd int n Index public static final native int Get Window LongA int h Wnd int n Index  GetWindow hWnd uCmd GetWindowLongW hWnd nIndex GetWindowLongA hWnd nIndex
public static final native int Get Window LongW int h Wnd int n Index public static final native int Get Window LongA int h Wnd int n Index public static final native boolean Get Window Placement int h Wnd WINDOWPLACEMENT lpwndpl  GetWindowLongW hWnd nIndex GetWindowLongA hWnd nIndex GetWindowPlacement hWnd
public static final native int Get Window LongA int h Wnd int n Index public static final native boolean Get Window Placement int h Wnd WINDOWPLACEMENT lpwndpl public static final native boolean Get Window Rect int h Wnd RECT lp Rect  GetWindowLongA hWnd nIndex GetWindowPlacement hWnd GetWindowRect hWnd lpRect
public static final native boolean Get Window Placement int h Wnd WINDOWPLACEMENT lpwndpl public static final native boolean Get Window Rect int h Wnd RECT lp Rect public static final native int Get Window Rgn int h Wnd int h Rgn  GetWindowPlacement hWnd GetWindowRect hWnd lpRect GetWindowRgn hWnd hRgn
public static final native boolean Get Window Rect int h Wnd RECT lp Rect public static final native int Get Window Rgn int h Wnd int h Rgn public static final native int Get Window TextW int h Wnd char lp String int n Max Count  GetWindowRect hWnd lpRect GetWindowRgn hWnd hRgn GetWindowTextW hWnd lpString nMaxCount
public static final native int Get Window Rgn int h Wnd int h Rgn public static final native int Get Window TextW int h Wnd char lp String int n Max Count public static final native int Get Window TextA int h Wnd byte lp String int n Max Count  GetWindowRgn hWnd hRgn GetWindowTextW hWnd lpString nMaxCount GetWindowTextA hWnd lpString nMaxCount
public static final native int Get Window TextW int h Wnd char lp String int n Max Count public static final native int Get Window TextA int h Wnd byte lp String int n Max Count public static final native int Get Window Text LengthW int h Wnd  GetWindowTextW hWnd lpString nMaxCount GetWindowTextA hWnd lpString nMaxCount GetWindowTextLengthW hWnd
public static final native int Get Window TextA int h Wnd byte lp String int n Max Count public static final native int Get Window Text LengthW int h Wnd public static final native int Get Window Text LengthA int h Wnd  GetWindowTextA hWnd lpString nMaxCount GetWindowTextLengthW hWnd GetWindowTextLengthA hWnd
public static final native int Get Window Text LengthW int h Wnd public static final native int Get Window Text LengthA int h Wnd public static final native int Get Window Thread Process Id int h Wnd int lpdw Process Id  GetWindowTextLengthW hWnd GetWindowTextLengthA hWnd GetWindowThreadProcessId hWnd lpdwProcessId
public static final native int Get Window Text LengthA int h Wnd public static final native int Get Window Thread Process Id int h Wnd int lpdw Process Id public static final native int Global Alloc int u Flags int dw Bytes  GetWindowTextLengthA hWnd GetWindowThreadProcessId hWnd lpdwProcessId GlobalAlloc uFlags dwBytes
public static final native int Get Window Thread Process Id int h Wnd int lpdw Process Id public static final native int Global Alloc int u Flags int dw Bytes public static final native int Global Free int h Mem  GetWindowThreadProcessId hWnd lpdwProcessId GlobalAlloc uFlags dwBytes GlobalFree hMem
public static final native int Global Alloc int u Flags int dw Bytes public static final native int Global Free int h Mem public static final native int Global Lock int h Mem  GlobalAlloc uFlags dwBytes GlobalFree hMem GlobalLock hMem
public static final native int Global Free int h Mem public static final native int Global Lock int h Mem public static final native int Global Size int h Mem  GlobalFree hMem GlobalLock hMem GlobalSize hMem
public static final native int Global Lock int h Mem public static final native int Global Size int h Mem public static final native boolean Global Unlock int h Mem  GlobalLock hMem GlobalSize hMem GlobalUnlock hMem
public static final native int Global Size int h Mem public static final native boolean Global Unlock int h Mem public static final native boolean Gradient Fill int hdc int p Vertex int dw Num Vertex int p Mesh int dw Num Mesh int dw Mode  GlobalSize hMem GlobalUnlock hMem GradientFill pVertex dwNumVertex pMesh dwNumMesh dwMode
public static final native boolean Global Unlock int h Mem public static final native boolean Gradient Fill int hdc int p Vertex int dw Num Vertex int p Mesh int dw Num Mesh int dw Mode public static final native int Heap Alloc int h Heap int dw Flags int dw Bytes  GlobalUnlock hMem GradientFill pVertex dwNumVertex pMesh dwNumMesh dwMode HeapAlloc hHeap dwFlags dwBytes
public static final native boolean Gradient Fill int hdc int p Vertex int dw Num Vertex int p Mesh int dw Num Mesh int dw Mode public static final native int Heap Alloc int h Heap int dw Flags int dw Bytes public static final native boolean Heap Free int h Heap int dw Flags int lp Mem  GradientFill pVertex dwNumVertex pMesh dwNumMesh dwMode HeapAlloc hHeap dwFlags dwBytes HeapFree hHeap dwFlags lpMem
public static final native int Heap Alloc int h Heap int dw Flags int dw Bytes public static final native boolean Heap Free int h Heap int dw Flags int lp Mem public static final native boolean Hide Caret int h Wnd  HeapAlloc hHeap dwFlags dwBytes HeapFree hHeap dwFlags lpMem HideCaret hWnd
public static final native boolean Heap Free int h Heap int dw Flags int lp Mem public static final native boolean Hide Caret int h Wnd public static final native int ImageList Add int himl int hbm Image int hbm Mask  HeapFree hHeap dwFlags lpMem HideCaret hWnd ImageList_Add hbmImage hbmMask
public static final native boolean Hide Caret int h Wnd public static final native int ImageList Add int himl int hbm Image int hbm Mask public static final native int ImageList AddMasked int himl int hbm Image int cr Mask  HideCaret hWnd ImageList_Add hbmImage hbmMask ImageList_AddMasked hbmImage crMask
public static final native int ImageList Add int himl int hbm Image int hbm Mask public static final native int ImageList AddMasked int himl int hbm Image int cr Mask public static final native int ImageList Create int cx int cy int flags int c Initial int c Grow  ImageList_Add hbmImage hbmMask ImageList_AddMasked hbmImage crMask ImageList_Create cInitial cGrow
public static final native int ImageList AddMasked int himl int hbm Image int cr Mask public static final native int ImageList Create int cx int cy int flags int c Initial int c Grow public static final native boolean ImageList Destroy int himl  ImageList_AddMasked hbmImage crMask ImageList_Create cInitial cGrow ImageList_Destroy
public static final native int ImageList Create int cx int cy int flags int c Initial int c Grow public static final native boolean ImageList Destroy int himl public static final native int ImageList GetIcon int himl int i int flags  ImageList_Create cInitial cGrow ImageList_Destroy ImageList_GetIcon
public static final native boolean ImageList Destroy int himl public static final native int ImageList GetIcon int himl int i int flags public static final native boolean ImageList GetIconSize int himl int cx int cy  ImageList_Destroy ImageList_GetIcon ImageList_GetIconSize
public static final native int ImageList GetIcon int himl int i int flags public static final native boolean ImageList GetIconSize int himl int cx int cy public static final native int ImageList GetImageCount int himl  ImageList_GetIcon ImageList_GetIconSize ImageList_GetImageCount
public static final native boolean ImageList GetIconSize int himl int cx int cy public static final native int ImageList GetImageCount int himl public static final native boolean ImageList Remove int himl int i  ImageList_GetIconSize ImageList_GetImageCount ImageList_Remove
public static final native int ImageList GetImageCount int himl public static final native boolean ImageList Remove int himl int i public static final native boolean ImageList Replace int himl int i int hbm Image int hbm Mask  ImageList_GetImageCount ImageList_Remove ImageList_Replace hbmImage hbmMask
public static final native boolean ImageList Remove int himl int i public static final native boolean ImageList Replace int himl int i int hbm Image int hbm Mask public static final native int ImageList ReplaceIcon int himl int i int hicon  ImageList_Remove ImageList_Replace hbmImage hbmMask ImageList_ReplaceIcon
public static final native boolean ImageList Replace int himl int i int hbm Image int hbm Mask public static final native int ImageList ReplaceIcon int himl int i int hicon public static final native boolean ImageList SetIconSize int himl int cx int cy  ImageList_Replace hbmImage hbmMask ImageList_ReplaceIcon ImageList_SetIconSize
public static final native int ImageList ReplaceIcon int himl int i int hicon public static final native boolean ImageList SetIconSize int himl int cx int cy public static final native int Imm Associate Context int h Wnd int hIMC  ImageList_ReplaceIcon ImageList_SetIconSize ImmAssociateContext hWnd
public static final native boolean ImageList SetIconSize int himl int cx int cy public static final native int Imm Associate Context int h Wnd int hIMC public static final native int Imm Create Context  ImageList_SetIconSize ImmAssociateContext hWnd ImmCreateContext
public static final native int Imm Associate Context int h Wnd int hIMC public static final native int Imm Create Context public static final native boolean Imm Destroy Context int hIMC  ImmAssociateContext hWnd ImmCreateContext ImmDestroyContext
public static final native int Imm Create Context public static final native boolean Imm Destroy Context int hIMC public static final native boolean Imm Get Composition FontW int hIMC LOGFONTW lplf  ImmCreateContext ImmDestroyContext ImmGetCompositionFontW
public static final native boolean Imm Destroy Context int hIMC public static final native boolean Imm Get Composition FontW int hIMC LOGFONTW lplf public static final native boolean Imm Get Composition FontA int hIMC LOGFONTA lplf  ImmDestroyContext ImmGetCompositionFontW ImmGetCompositionFontA
public static final native boolean Imm Get Composition FontW int hIMC LOGFONTW lplf public static final native boolean Imm Get Composition FontA int hIMC LOGFONTA lplf public static final native int Imm Get Composition StringW int hIMC int dw Index char lp Buf int dw Buf Len  ImmGetCompositionFontW ImmGetCompositionFontA ImmGetCompositionStringW dwIndex lpBuf dwBufLen
public static final native boolean Imm Get Composition FontA int hIMC LOGFONTA lplf public static final native int Imm Get Composition StringW int hIMC int dw Index char lp Buf int dw Buf Len public static final native int Imm Get Composition StringA int hIMC int dw Index byte lp Buf int dw Buf Len  ImmGetCompositionFontA ImmGetCompositionStringW dwIndex lpBuf dwBufLen ImmGetCompositionStringA dwIndex lpBuf dwBufLen
public static final native int Imm Get Composition StringW int hIMC int dw Index char lp Buf int dw Buf Len public static final native int Imm Get Composition StringA int hIMC int dw Index byte lp Buf int dw Buf Len public static final native int Imm Get Context int h Wnd  ImmGetCompositionStringW dwIndex lpBuf dwBufLen ImmGetCompositionStringA dwIndex lpBuf dwBufLen ImmGetContext hWnd
public static final native int Imm Get Composition StringA int hIMC int dw Index byte lp Buf int dw Buf Len public static final native int Imm Get Context int h Wnd public static final native boolean Imm Get Conversion Status int hIMC int lpfdw Conversion int lpfdw Sentence  ImmGetCompositionStringA dwIndex lpBuf dwBufLen ImmGetContext hWnd ImmGetConversionStatus lpfdwConversion lpfdwSentence
public static final native int Imm Get Context int h Wnd public static final native boolean Imm Get Conversion Status int hIMC int lpfdw Conversion int lpfdw Sentence public static final native int Imm Get DefaultIME Wnd int h Wnd  ImmGetContext hWnd ImmGetConversionStatus lpfdwConversion lpfdwSentence ImmGetDefaultIMEWnd hWnd
public static final native boolean Imm Get Conversion Status int hIMC int lpfdw Conversion int lpfdw Sentence public static final native int Imm Get DefaultIME Wnd int h Wnd public static final native boolean Imm Get Open Status int hIMC  ImmGetConversionStatus lpfdwConversion lpfdwSentence ImmGetDefaultIMEWnd hWnd ImmGetOpenStatus
public static final native int Imm Get DefaultIME Wnd int h Wnd public static final native boolean Imm Get Open Status int hIMC public static final native boolean Imm Release Context int h Wnd int hIMC  ImmGetDefaultIMEWnd hWnd ImmGetOpenStatus ImmReleaseContext hWnd
public static final native boolean Imm Get Open Status int hIMC public static final native boolean Imm Release Context int h Wnd int hIMC public static final native boolean Imm Set Composition FontW int hIMC LOGFONTW lplf  ImmGetOpenStatus ImmReleaseContext hWnd ImmSetCompositionFontW
public static final native boolean Imm Release Context int h Wnd int hIMC public static final native boolean Imm Set Composition FontW int hIMC LOGFONTW lplf public static final native boolean Imm Set Composition FontA int hIMC LOGFONTA lplf  ImmReleaseContext hWnd ImmSetCompositionFontW ImmSetCompositionFontA
public static final native boolean Imm Set Composition FontW int hIMC LOGFONTW lplf public static final native boolean Imm Set Composition FontA int hIMC LOGFONTA lplf public static final native boolean Imm Set Composition Window int hIMC COMPOSITIONFORM lp Comp Form  ImmSetCompositionFontW ImmSetCompositionFontA ImmSetCompositionWindow lpCompForm
public static final native boolean Imm Set Composition FontA int hIMC LOGFONTA lplf public static final native boolean Imm Set Composition Window int hIMC COMPOSITIONFORM lp Comp Form public static final native boolean Imm Set Conversion Status int hIMC int fdw Conversion int dw Sentence  ImmSetCompositionFontA ImmSetCompositionWindow lpCompForm ImmSetConversionStatus fdwConversion dwSentence
public static final native boolean Imm Set Composition Window int hIMC COMPOSITIONFORM lp Comp Form public static final native boolean Imm Set Conversion Status int hIMC int fdw Conversion int dw Sentence public static final native boolean Imm Set Open Status int hIMC boolean f Open  ImmSetCompositionWindow lpCompForm ImmSetConversionStatus fdwConversion dwSentence ImmSetOpenStatus fOpen
public static final native boolean Imm Set Conversion Status int hIMC int fdw Conversion int dw Sentence public static final native boolean Imm Set Open Status int hIMC boolean f Open public static final native void Init Common Controls  ImmSetConversionStatus fdwConversion dwSentence ImmSetOpenStatus fOpen InitCommonControls
public static final native boolean Imm Set Open Status int hIMC boolean f Open public static final native void Init Common Controls public static final native boolean Init Common Controls Ex INITCOMMONCONTROLSEX lp Init Ctrls  ImmSetOpenStatus fOpen InitCommonControls InitCommonControlsEx lpInitCtrls
public static final native void Init Common Controls public static final native boolean Init Common Controls Ex INITCOMMONCONTROLSEX lp Init Ctrls public static final native boolean Insert MenuW int h Menu int u Position int u Flags int uID New Item char lp New Item  InitCommonControls InitCommonControlsEx lpInitCtrls InsertMenuW hMenu uPosition uFlags uIDNewItem lpNewItem
public static final native boolean Init Common Controls Ex INITCOMMONCONTROLSEX lp Init Ctrls public static final native boolean Insert MenuW int h Menu int u Position int u Flags int uID New Item char lp New Item public static final native boolean Insert MenuA int h Menu int u Position int u Flags int uID New Item byte lp New Item  InitCommonControlsEx lpInitCtrls InsertMenuW hMenu uPosition uFlags uIDNewItem lpNewItem InsertMenuA hMenu uPosition uFlags uIDNewItem lpNewItem
public static final native boolean Insert MenuW int h Menu int u Position int u Flags int uID New Item char lp New Item public static final native boolean Insert MenuA int h Menu int u Position int u Flags int uID New Item byte lp New Item public static final native boolean Insert Menu ItemW int h Menu int u Item boolean f By Position MENUITEMINFO lpmii  InsertMenuW hMenu uPosition uFlags uIDNewItem lpNewItem InsertMenuA hMenu uPosition uFlags uIDNewItem lpNewItem InsertMenuItemW hMenu uItem fByPosition
public static final native boolean Insert MenuA int h Menu int u Position int u Flags int uID New Item byte lp New Item public static final native boolean Insert Menu ItemW int h Menu int u Item boolean f By Position MENUITEMINFO lpmii public static final native boolean Insert Menu ItemA int h Menu int u Item boolean f By Position MENUITEMINFO lpmii  InsertMenuA hMenu uPosition uFlags uIDNewItem lpNewItem InsertMenuItemW hMenu uItem fByPosition InsertMenuItemA hMenu uItem fByPosition
public static final native boolean Insert Menu ItemW int h Menu int u Item boolean f By Position MENUITEMINFO lpmii public static final native boolean Insert Menu ItemA int h Menu int u Item boolean f By Position MENUITEMINFO lpmii public static final native boolean Intersect Rect RECT lprc Dst RECT lprc Src1 RECT lprc Src2  InsertMenuItemW hMenu uItem fByPosition InsertMenuItemA hMenu uItem fByPosition IntersectRect lprcDst lprcSrc1 lprcSrc2
public static final native boolean Insert Menu ItemA int h Menu int u Item boolean f By Position MENUITEMINFO lpmii public static final native boolean Intersect Rect RECT lprc Dst RECT lprc Src1 RECT lprc Src2 public static final native boolean Invalidate Rect int h Wnd RECT lp Rect boolean b Erase  InsertMenuItemA hMenu uItem fByPosition IntersectRect lprcDst lprcSrc1 lprcSrc2 InvalidateRect hWnd lpRect bErase
public static final native boolean Intersect Rect RECT lprc Dst RECT lprc Src1 RECT lprc Src2 public static final native boolean Invalidate Rect int h Wnd RECT lp Rect boolean b Erase public static final native boolean Invalidate Rgn int h Wnd int h Rgn boolean b Erase  IntersectRect lprcDst lprcSrc1 lprcSrc2 InvalidateRect hWnd lpRect bErase InvalidateRgn hWnd hRgn bErase
public static final native boolean Invalidate Rect int h Wnd RECT lp Rect boolean b Erase public static final native boolean Invalidate Rgn int h Wnd int h Rgn boolean b Erase public static final native boolean IsDBCS Lead Byte byte Test Char  InvalidateRect hWnd lpRect bErase InvalidateRgn hWnd hRgn bErase IsDBCSLeadByte TestChar
public static final native boolean Invalidate Rgn int h Wnd int h Rgn boolean b Erase public static final native boolean IsDBCS Lead Byte byte Test Char public static final native boolean Is Iconic int h Wnd  InvalidateRgn hWnd hRgn bErase IsDBCSLeadByte TestChar IsIconic hWnd
public static final native boolean IsDBCS Lead Byte byte Test Char public static final native boolean Is Iconic int h Wnd public static final native boolean IsPPC  IsDBCSLeadByte TestChar IsIconic hWnd
public static final native boolean Is Iconic int h Wnd public static final native boolean IsPPC public static final native boolean IsSP  IsIconic hWnd
public static final native boolean IsPPC public static final native boolean IsSP public static final native boolean Is Window Enabled int h Wnd  IsWindowEnabled hWnd
public static final native boolean IsSP public static final native boolean Is Window Enabled int h Wnd public static final native boolean Is Window Visible int h Wnd  IsWindowEnabled hWnd IsWindowVisible hWnd
public static final native boolean Is Window Enabled int h Wnd public static final native boolean Is Window Visible int h Wnd public static final native boolean Is Zoomed int h Wnd  IsWindowEnabled hWnd IsWindowVisible hWnd IsZoomed hWnd
public static final native boolean Is Window Visible int h Wnd public static final native boolean Is Zoomed int h Wnd public static final native boolean Kill Timer int h Wnd int uID Event  IsWindowVisible hWnd IsZoomed hWnd KillTimer hWnd uIDEvent
public static final native boolean Is Zoomed int h Wnd public static final native boolean Kill Timer int h Wnd int uID Event public static final native boolean Line To int hdc int x1 int x2  IsZoomed hWnd KillTimer hWnd uIDEvent LineTo
public static final native boolean Kill Timer int h Wnd int uID Event public static final native boolean Line To int hdc int x1 int x2 public static final native int Load BitmapW int h Instance int lp Bitmap Name  KillTimer hWnd uIDEvent LineTo LoadBitmapW hInstance lpBitmapName
public static final native boolean Line To int hdc int x1 int x2 public static final native int Load BitmapW int h Instance int lp Bitmap Name public static final native int Load BitmapA int h Instance int lp Bitmap Name  LineTo LoadBitmapW hInstance lpBitmapName LoadBitmapA hInstance lpBitmapName
public static final native int Load BitmapW int h Instance int lp Bitmap Name public static final native int Load BitmapA int h Instance int lp Bitmap Name public static final native int Load CursorW int h Instance int lp Cursor Name  LoadBitmapW hInstance lpBitmapName LoadBitmapA hInstance lpBitmapName LoadCursorW hInstance lpCursorName
public static final native int Load BitmapA int h Instance int lp Bitmap Name public static final native int Load CursorW int h Instance int lp Cursor Name public static final native int Load CursorA int h Instance int lp Cursor Name  LoadBitmapA hInstance lpBitmapName LoadCursorW hInstance lpCursorName LoadCursorA hInstance lpCursorName
public static final native int Load CursorW int h Instance int lp Cursor Name public static final native int Load CursorA int h Instance int lp Cursor Name public static final native int Load IconW int h Instance int lp Icon Name  LoadCursorW hInstance lpCursorName LoadCursorA hInstance lpCursorName LoadIconW hInstance lpIconName
public static final native int Load CursorA int h Instance int lp Cursor Name public static final native int Load IconW int h Instance int lp Icon Name public static final native int Load IconA int h Instance int lp Icon Name  LoadCursorA hInstance lpCursorName LoadIconW hInstance lpIconName LoadIconA hInstance lpIconName
public static final native int Load IconW int h Instance int lp Icon Name public static final native int Load IconA int h Instance int lp Icon Name public static final native int Load ImageW int hinst char lpsz Name int u Type int cx Desired int cy Desired int fu Load  LoadIconW hInstance lpIconName LoadIconA hInstance lpIconName LoadImageW lpszName uType cxDesired cyDesired fuLoad
public static final native int Load IconA int h Instance int lp Icon Name public static final native int Load ImageW int hinst char lpsz Name int u Type int cx Desired int cy Desired int fu Load public static final native int Load ImageA int hinst byte lpsz Name int u Type int cx Desired int cy Desired int fu Load  LoadIconA hInstance lpIconName LoadImageW lpszName uType cxDesired cyDesired fuLoad LoadImageA lpszName uType cxDesired cyDesired fuLoad
public static final native int Load ImageW int hinst char lpsz Name int u Type int cx Desired int cy Desired int fu Load public static final native int Load ImageA int hinst byte lpsz Name int u Type int cx Desired int cy Desired int fu Load public static final native int Load ImageW int hinst int lpsz Name int u Type int cx Desired int cy Desired int fu Load  LoadImageW lpszName uType cxDesired cyDesired fuLoad LoadImageA lpszName uType cxDesired cyDesired fuLoad LoadImageW lpszName uType cxDesired cyDesired fuLoad
public static final native int Load ImageA int hinst byte lpsz Name int u Type int cx Desired int cy Desired int fu Load public static final native int Load ImageW int hinst int lpsz Name int u Type int cx Desired int cy Desired int fu Load public static final native int Load ImageA int hinst int lpsz Name int u Type int cx Desired int cy Desired int fu Load  LoadImageA lpszName uType cxDesired cyDesired fuLoad LoadImageW lpszName uType cxDesired cyDesired fuLoad LoadImageA lpszName uType cxDesired cyDesired fuLoad
public static final native int Load ImageW int hinst int lpsz Name int u Type int cx Desired int cy Desired int fu Load public static final native int Load ImageA int hinst int lpsz Name int u Type int cx Desired int cy Desired int fu Load public static final native int Load StringW int hinst int uID char lp Buffer int n Buffer Max  LoadImageW lpszName uType cxDesired cyDesired fuLoad LoadImageA lpszName uType cxDesired cyDesired fuLoad LoadStringW lpBuffer nBufferMax
public static final native int Load ImageA int hinst int lpsz Name int u Type int cx Desired int cy Desired int fu Load public static final native int Load StringW int hinst int uID char lp Buffer int n Buffer Max public static final native int Load StringA int hinst int uID byte lp Buffer int n Buffer Max  LoadImageA lpszName uType cxDesired cyDesired fuLoad LoadStringW lpBuffer nBufferMax LoadStringA lpBuffer nBufferMax
public static final native int Load StringW int hinst int uID char lp Buffer int n Buffer Max public static final native int Load StringA int hinst int uID byte lp Buffer int n Buffer Max public static final native int Load LibraryW char lp Lib File Name  LoadStringW lpBuffer nBufferMax LoadStringA lpBuffer nBufferMax LoadLibraryW lpLibFileName
public static final native int Load StringA int hinst int uID byte lp Buffer int n Buffer Max public static final native int Load LibraryW char lp Lib File Name public static final native int Load LibraryA byte lp Lib File Name  LoadStringA lpBuffer nBufferMax LoadLibraryW lpLibFileName LoadLibraryA lpLibFileName
public static final native int Load LibraryW char lp Lib File Name public static final native int Load LibraryA byte lp Lib File Name public static final native int Local Free int h Mem  LoadLibraryW lpLibFileName LoadLibraryA lpLibFileName LocalFree hMem
public static final native int Load LibraryA byte lp Lib File Name public static final native int Local Free int h Mem public static final native int Map Virtual KeyW int u Code int u Map Type  LoadLibraryA lpLibFileName LocalFree hMem MapVirtualKeyW uCode uMapType
public static final native int Local Free int h Mem public static final native int Map Virtual KeyW int u Code int u Map Type public static final native int Map Virtual KeyA int u Code int u Map Type  LocalFree hMem MapVirtualKeyW uCode uMapType MapVirtualKeyA uCode uMapType
public static final native int Map Virtual KeyW int u Code int u Map Type public static final native int Map Virtual KeyA int u Code int u Map Type public static final native int Map Window Points int h Wnd From int h Wnd To POINT lp Points int c Points  MapVirtualKeyW uCode uMapType MapVirtualKeyA uCode uMapType MapWindowPoints hWndFrom hWndTo lpPoints cPoints
public static final native int Map Virtual KeyA int u Code int u Map Type public static final native int Map Window Points int h Wnd From int h Wnd To POINT lp Points int c Points public static final native int Map Window Points int h Wnd From int h Wnd To RECT lp Points int c Points  MapVirtualKeyA uCode uMapType MapWindowPoints hWndFrom hWndTo lpPoints cPoints MapWindowPoints hWndFrom hWndTo lpPoints cPoints
public static final native int Map Window Points int h Wnd From int h Wnd To POINT lp Points int c Points public static final native int Map Window Points int h Wnd From int h Wnd To RECT lp Points int c Points public static final native boolean Message Beep int u Type  MapWindowPoints hWndFrom hWndTo lpPoints cPoints MapWindowPoints hWndFrom hWndTo lpPoints cPoints MessageBeep uType
public static final native int Map Window Points int h Wnd From int h Wnd To RECT lp Points int c Points public static final native boolean Message Beep int u Type public static final native int Message BoxW int h Wnd char lp Text char lp Caption int u Type  MapWindowPoints hWndFrom hWndTo lpPoints cPoints MessageBeep uType MessageBoxW hWnd lpText lpCaption uType
public static final native boolean Message Beep int u Type public static final native int Message BoxW int h Wnd char lp Text char lp Caption int u Type public static final native int Message BoxA int h Wnd byte lp Text byte lp Caption int u Type  MessageBeep uType MessageBoxW hWnd lpText lpCaption uType MessageBoxA hWnd lpText lpCaption uType
public static final native int Message BoxW int h Wnd char lp Text char lp Caption int u Type public static final native int Message BoxA int h Wnd byte lp Text byte lp Caption int u Type public static final native int Monitor From Window int hwnd int dw Flags  MessageBoxW hWnd lpText lpCaption uType MessageBoxA hWnd lpText lpCaption uType MonitorFromWindow dwFlags
public static final native int Message BoxA int h Wnd byte lp Text byte lp Caption int u Type public static final native int Monitor From Window int hwnd int dw Flags public static final native void Move Memory char Destination int Source Ptr int Length  MessageBoxA hWnd lpText lpCaption uType MonitorFromWindow dwFlags MoveMemory SourcePtr
public static final native int Monitor From Window int hwnd int dw Flags public static final native void Move Memory char Destination int Source Ptr int Length public static final native void Move Memory byte Destination int Source int Length  MonitorFromWindow dwFlags MoveMemory SourcePtr MoveMemory
public static final native void Move Memory char Destination int Source Ptr int Length public static final native void Move Memory byte Destination int Source int Length public static final native void Move Memory byte Destination ACCEL Source int Length  MoveMemory SourcePtr MoveMemory MoveMemory
public static final native void Move Memory byte Destination int Source int Length public static final native void Move Memory byte Destination ACCEL Source int Length public static final native void Move Memory byte Destination BITMAPINFOHEADER Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory byte Destination ACCEL Source int Length public static final native void Move Memory byte Destination BITMAPINFOHEADER Source int Length public static final native void Move Memory int Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory byte Destination BITMAPINFOHEADER Source int Length public static final native void Move Memory int Destination int Source int Length public static final native void Move Memory int Destination byte Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory int Destination int Source int Length public static final native void Move Memory int Destination byte Source int Length public static final native void Move Memory int Destination char Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory int Destination byte Source int Length public static final native void Move Memory int Destination char Source int Length public static final native void Move Memory int Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory int Destination char Source int Length public static final native void Move Memory int Destination int Source int Length public static final native void Move Memory int Destination GRADIENT RECT Source int Length  MoveMemory MoveMemory MoveMemory GRADIENT_RECT
public static final native void Move Memory int Destination int Source int Length public static final native void Move Memory int Destination GRADIENT RECT Source int Length public static final native void Move Memory int Destination LOGFONTW Source int Length  MoveMemory MoveMemory GRADIENT_RECT MoveMemory
public static final native void Move Memory int Destination GRADIENT RECT Source int Length public static final native void Move Memory int Destination LOGFONTW Source int Length public static final native void Move Memory int Destination LOGFONTA Source int Length  MoveMemory GRADIENT_RECT MoveMemory MoveMemory
public static final native void Move Memory int Destination LOGFONTW Source int Length public static final native void Move Memory int Destination LOGFONTA Source int Length public static final native void Move Memory int Destination MEASUREITEMSTRUCT Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory int Destination LOGFONTA Source int Length public static final native void Move Memory int Destination MEASUREITEMSTRUCT Source int Length public static final native void Move Memory int Destination MSG Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory int Destination MEASUREITEMSTRUCT Source int Length public static final native void Move Memory int Destination MSG Source int Length public static final native void Move Memory int Destination NMTTDISPINFOW Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory int Destination MSG Source int Length public static final native void Move Memory int Destination NMTTDISPINFOW Source int Length public static final native void Move Memory int Destination NMTTDISPINFOA Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory int Destination NMTTDISPINFOW Source int Length public static final native void Move Memory int Destination NMTTDISPINFOA Source int Length public static final native void Move Memory int Destination RECT Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory int Destination NMTTDISPINFOA Source int Length public static final native void Move Memory int Destination RECT Source int Length public static final native void Move Memory int Destination TRIVERTEX Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory int Destination RECT Source int Length public static final native void Move Memory int Destination TRIVERTEX Source int Length public static final native void Move Memory int Destination WINDOWPOS Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory int Destination TRIVERTEX Source int Length public static final native void Move Memory int Destination WINDOWPOS Source int Length public static final native void Move Memory BITMAPINFOHEADER Destination byte Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory int Destination WINDOWPOS Source int Length public static final native void Move Memory BITMAPINFOHEADER Destination byte Source int Length public static final native void Move Memory DRAWITEMSTRUCT Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory BITMAPINFOHEADER Destination byte Source int Length public static final native void Move Memory DRAWITEMSTRUCT Destination int Source int Length public static final native void Move Memory HDITEM Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory DRAWITEMSTRUCT Destination int Source int Length public static final native void Move Memory HDITEM Destination int Source int Length public static final native void Move Memory HELPINFO Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory HDITEM Destination int Source int Length public static final native void Move Memory HELPINFO Destination int Source int Length public static final native void Move Memory LOGFONTW Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory HELPINFO Destination int Source int Length public static final native void Move Memory LOGFONTW Destination int Source int Length public static final native void Move Memory LOGFONTA Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory LOGFONTW Destination int Source int Length public static final native void Move Memory LOGFONTA Destination int Source int Length public static final native void Move Memory MEASUREITEMSTRUCT Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory LOGFONTA Destination int Source int Length public static final native void Move Memory MEASUREITEMSTRUCT Destination int Source int Length public static final native void Move Memory POINT Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory MEASUREITEMSTRUCT Destination int Source int Length public static final native void Move Memory POINT Destination int Source int Length public static final native void Move Memory NMHDR Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory POINT Destination int Source int Length public static final native void Move Memory NMHDR Destination int Source int Length public static final native void Move Memory NMRGINFO Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory NMHDR Destination int Source int Length public static final native void Move Memory NMRGINFO Destination int Source int Length public static final native void Move Memory NMCUSTOMDRAW Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory NMRGINFO Destination int Source int Length public static final native void Move Memory NMCUSTOMDRAW Destination int Source int Length public static final native void Move Memory NMLVCUSTOMDRAW Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory NMCUSTOMDRAW Destination int Source int Length public static final native void Move Memory NMLVCUSTOMDRAW Destination int Source int Length public static final native void Move Memory NMTVCUSTOMDRAW Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory NMLVCUSTOMDRAW Destination int Source int Length public static final native void Move Memory NMTVCUSTOMDRAW Destination int Source int Length public static final native void Move Memory int Destination NMLVCUSTOMDRAW Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory NMTVCUSTOMDRAW Destination int Source int Length public static final native void Move Memory int Destination NMLVCUSTOMDRAW Source int Length public static final native void Move Memory int Destination NMTVCUSTOMDRAW Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory int Destination NMLVCUSTOMDRAW Source int Length public static final native void Move Memory int Destination NMTVCUSTOMDRAW Source int Length public static final native void Move Memory int Destination NMLVDISPINFO Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory int Destination NMTVCUSTOMDRAW Source int Length public static final native void Move Memory int Destination NMLVDISPINFO Source int Length public static final native void Move Memory NMLVDISPINFO Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory int Destination NMLVDISPINFO Source int Length public static final native void Move Memory NMLVDISPINFO Destination int Source int Length public static final native void Move Memory NMLVFINDITEM Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory NMLVDISPINFO Destination int Source int Length public static final native void Move Memory NMLVFINDITEM Destination int Source int Length public static final native void Move Memory NMHEADER Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory NMLVFINDITEM Destination int Source int Length public static final native void Move Memory NMHEADER Destination int Source int Length public static final native void Move Memory NMLISTVIEW Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory NMHEADER Destination int Source int Length public static final native void Move Memory NMLISTVIEW Destination int Source int Length public static final native void Move Memory NMREBARCHEVRON Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory NMLISTVIEW Destination int Source int Length public static final native void Move Memory NMREBARCHEVRON Destination int Source int Length public static final native void Move Memory NMTOOLBAR Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory NMREBARCHEVRON Destination int Source int Length public static final native void Move Memory NMTOOLBAR Destination int Source int Length public static final native void Move Memory NMTTDISPINFOW Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory NMTOOLBAR Destination int Source int Length public static final native void Move Memory NMTTDISPINFOW Destination int Source int Length public static final native void Move Memory NMTTDISPINFOA Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory NMTTDISPINFOW Destination int Source int Length public static final native void Move Memory NMTTDISPINFOA Destination int Source int Length public static final native void Move Memory TVITEM Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory NMTTDISPINFOA Destination int Source int Length public static final native void Move Memory TVITEM Destination int Source int Length public static final native void Move Memory WINDOWPOS Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory TVITEM Destination int Source int Length public static final native void Move Memory WINDOWPOS Destination int Source int Length public static final native void Move Memory MSG Destination int Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory WINDOWPOS Destination int Source int Length public static final native void Move Memory MSG Destination int Source int Length public static final native void Move Memory int Destination DROPFILES Source int Length  MoveMemory MoveMemory MoveMemory
public static final native void Move Memory MSG Destination int Source int Length public static final native void Move Memory int Destination DROPFILES Source int Length public static final native void Move Memory double Destination int Source Ptr int Length  MoveMemory MoveMemory MoveMemory SourcePtr
public static final native void Move Memory int Destination DROPFILES Source int Length public static final native void Move Memory double Destination int Source Ptr int Length public static final native void Move Memory float Destination int Source Ptr int Length  MoveMemory MoveMemory SourcePtr MoveMemory SourcePtr
public static final native void Move Memory double Destination int Source Ptr int Length public static final native void Move Memory float Destination int Source Ptr int Length public static final native void Move Memory short Destination int Source Ptr int Length  MoveMemory SourcePtr MoveMemory SourcePtr MoveMemory SourcePtr
public static final native void Move Memory float Destination int Source Ptr int Length public static final native void Move Memory short Destination int Source Ptr int Length public static final native void Move Memory int Destination Ptr double Source int Length  MoveMemory SourcePtr MoveMemory SourcePtr MoveMemory DestinationPtr
public static final native void Move Memory short Destination int Source Ptr int Length public static final native void Move Memory int Destination Ptr double Source int Length public static final native void Move Memory int Destination Ptr float Source int Length  MoveMemory SourcePtr MoveMemory DestinationPtr MoveMemory DestinationPtr
public static final native void Move Memory int Destination Ptr double Source int Length public static final native void Move Memory int Destination Ptr float Source int Length public static final native void Move Memory int Destination Ptr short Source int Length  MoveMemory DestinationPtr MoveMemory DestinationPtr MoveMemory DestinationPtr
public static final native void Move Memory int Destination Ptr float Source int Length public static final native void Move Memory int Destination Ptr short Source int Length public static final native void Move Memory SCRIPT ITEM Destination int Source Ptr int Length  MoveMemory DestinationPtr MoveMemory DestinationPtr MoveMemory SCRIPT_ITEM SourcePtr
public static final native void Move Memory int Destination Ptr short Source int Length public static final native void Move Memory SCRIPT ITEM Destination int Source Ptr int Length public static final native void Move Memory SCRIPT LOGATTR Destination int Source Ptr int Length  MoveMemory DestinationPtr MoveMemory SCRIPT_ITEM SourcePtr MoveMemory SCRIPT_LOGATTR SourcePtr
public static final native void Move Memory SCRIPT ITEM Destination int Source Ptr int Length public static final native void Move Memory SCRIPT LOGATTR Destination int Source Ptr int Length public static final native void Move Memory SCRIPT PROPERTIES Destination int Source Ptr int Length  MoveMemory SCRIPT_ITEM SourcePtr MoveMemory SCRIPT_LOGATTR SourcePtr MoveMemory SCRIPT_PROPERTIES SourcePtr
public static final native void Move Memory SCRIPT LOGATTR Destination int Source Ptr int Length public static final native void Move Memory SCRIPT PROPERTIES Destination int Source Ptr int Length public static final native void Move Memory int Destination KEYBDINPUT Source int Length  MoveMemory SCRIPT_LOGATTR SourcePtr MoveMemory SCRIPT_PROPERTIES SourcePtr MoveMemory
public static final native void Move Memory SCRIPT PROPERTIES Destination int Source Ptr int Length public static final native void Move Memory int Destination KEYBDINPUT Source int Length public static final native void Move Memory int Destination MOUSEINPUT Source int Length  MoveMemory SCRIPT_PROPERTIES SourcePtr MoveMemory MoveMemory
public static final native void Move Memory int Destination KEYBDINPUT Source int Length public static final native void Move Memory int Destination MOUSEINPUT Source int Length public static final native boolean Move To Ex int hdc int x1 int x2 int l Point  MoveMemory MoveMemory MoveToEx lPoint
public static final native void Move Memory int Destination MOUSEINPUT Source int Length public static final native boolean Move To Ex int hdc int x1 int x2 int l Point public static final native int Msg Wait For Multiple Objects Ex int n Count int p Handles int dw Milliseconds int dw Wake Mask int dw Flags  MoveMemory MoveToEx lPoint MsgWaitForMultipleObjectsEx nCount pHandles dwMilliseconds dwWakeMask dwFlags
public static final native boolean Move To Ex int hdc int x1 int x2 int l Point public static final native int Msg Wait For Multiple Objects Ex int n Count int p Handles int dw Milliseconds int dw Wake Mask int dw Flags public static final native int Multi Byte To Wide Char int Code Page int dw Flags byte lp Multi Byte Str int cch Multi Byte char lp Wide Char Str int cch Wide Char  MoveToEx lPoint MsgWaitForMultipleObjectsEx nCount pHandles dwMilliseconds dwWakeMask dwFlags MultiByteToWideChar CodePage dwFlags lpMultiByteStr cchMultiByte lpWideCharStr cchWideChar
public static final native int Msg Wait For Multiple Objects Ex int n Count int p Handles int dw Milliseconds int dw Wake Mask int dw Flags public static final native int Multi Byte To Wide Char int Code Page int dw Flags byte lp Multi Byte Str int cch Multi Byte char lp Wide Char Str int cch Wide Char public static final native int Multi Byte To Wide Char int Code Page int dw Flags int lp Multi Byte Str int cch Multi Byte char lp Wide Char Str int cch Wide Char  MsgWaitForMultipleObjectsEx nCount pHandles dwMilliseconds dwWakeMask dwFlags MultiByteToWideChar CodePage dwFlags lpMultiByteStr cchMultiByte lpWideCharStr cchWideChar MultiByteToWideChar CodePage dwFlags lpMultiByteStr cchMultiByte lpWideCharStr cchWideChar
public static final native int Multi Byte To Wide Char int Code Page int dw Flags byte lp Multi Byte Str int cch Multi Byte char lp Wide Char Str int cch Wide Char public static final native int Multi Byte To Wide Char int Code Page int dw Flags int lp Multi Byte Str int cch Multi Byte char lp Wide Char Str int cch Wide Char public static final native void Notify Win Event int event int hwnd int id Object int id Child  MultiByteToWideChar CodePage dwFlags lpMultiByteStr cchMultiByte lpWideCharStr cchWideChar MultiByteToWideChar CodePage dwFlags lpMultiByteStr cchMultiByte lpWideCharStr cchWideChar NotifyWinEvent idObject idChild
public static final native int Multi Byte To Wide Char int Code Page int dw Flags int lp Multi Byte Str int cch Multi Byte char lp Wide Char Str int cch Wide Char public static final native void Notify Win Event int event int hwnd int id Object int id Child public static final native int Offset Rgn int hrgn int nX Offset int nY Offset  MultiByteToWideChar CodePage dwFlags lpMultiByteStr cchMultiByte lpWideCharStr cchWideChar NotifyWinEvent idObject idChild OffsetRgn nXOffset nYOffset
public static final native void Notify Win Event int event int hwnd int id Object int id Child public static final native int Offset Rgn int hrgn int nX Offset int nY Offset public static final native int Ole Initialize int pv Reserved  NotifyWinEvent idObject idChild OffsetRgn nXOffset nYOffset OleInitialize pvReserved
public static final native int Offset Rgn int hrgn int nX Offset int nY Offset public static final native int Ole Initialize int pv Reserved public static final native void Ole Uninitialize  OffsetRgn nXOffset nYOffset OleInitialize pvReserved OleUninitialize
public static final native int Ole Initialize int pv Reserved public static final native void Ole Uninitialize public static final native boolean Open Clipboard int h Wnd New Owner  OleInitialize pvReserved OleUninitialize OpenClipboard hWndNewOwner
public static final native void Ole Uninitialize public static final native boolean Open Clipboard int h Wnd New Owner public static final native boolean Pat Blt int hdc int x1 int x2 int w int h int rop  OleUninitialize OpenClipboard hWndNewOwner PatBlt
public static final native boolean Open Clipboard int h Wnd New Owner public static final native boolean Pat Blt int hdc int x1 int x2 int w int h int rop public static final native boolean Peek MessageW MSG lp Msg int h Wnd int w Msg Filter Min int w Msg Filter Max int w Remove Msg  OpenClipboard hWndNewOwner PatBlt PeekMessageW lpMsg hWnd wMsgFilterMin wMsgFilterMax wRemoveMsg
public static final native boolean Pat Blt int hdc int x1 int x2 int w int h int rop public static final native boolean Peek MessageW MSG lp Msg int h Wnd int w Msg Filter Min int w Msg Filter Max int w Remove Msg public static final native boolean Peek MessageA MSG lp Msg int h Wnd int w Msg Filter Min int w Msg Filter Max int w Remove Msg  PatBlt PeekMessageW lpMsg hWnd wMsgFilterMin wMsgFilterMax wRemoveMsg PeekMessageA lpMsg hWnd wMsgFilterMin wMsgFilterMax wRemoveMsg
public static final native boolean Peek MessageW MSG lp Msg int h Wnd int w Msg Filter Min int w Msg Filter Max int w Remove Msg public static final native boolean Peek MessageA MSG lp Msg int h Wnd int w Msg Filter Min int w Msg Filter Max int w Remove Msg public static final native boolean Pie int hdc int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect int nX Start Arc int nY Start Arc int nX End Arc int nY End Arc  PeekMessageW lpMsg hWnd wMsgFilterMin wMsgFilterMax wRemoveMsg PeekMessageA lpMsg hWnd wMsgFilterMin wMsgFilterMax wRemoveMsg nLeftRect nTopRect nRightRect nBottomRect nXStartArc nYStartArc nXEndArc nYEndArc
public static final native boolean Peek MessageA MSG lp Msg int h Wnd int w Msg Filter Min int w Msg Filter Max int w Remove Msg public static final native boolean Pie int hdc int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect int nX Start Arc int nY Start Arc int nX End Arc int nY End Arc public static final native boolean Polygon int hdc int points int n Points  PeekMessageA lpMsg hWnd wMsgFilterMin wMsgFilterMax wRemoveMsg nLeftRect nTopRect nRightRect nBottomRect nXStartArc nYStartArc nXEndArc nYEndArc nPoints
public static final native boolean Pie int hdc int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect int nX Start Arc int nY Start Arc int nX End Arc int nY End Arc public static final native boolean Polygon int hdc int points int n Points public static final native boolean Polyline int hdc int points int n Points  nLeftRect nTopRect nRightRect nBottomRect nXStartArc nYStartArc nXEndArc nYEndArc nPoints nPoints
public static final native boolean Polygon int hdc int points int n Points public static final native boolean Polyline int hdc int points int n Points public static final native boolean Post MessageW int h Wnd int Msg int w Param int l Param  nPoints nPoints PostMessageW hWnd wParam lParam
public static final native boolean Polyline int hdc int points int n Points public static final native boolean Post MessageW int h Wnd int Msg int w Param int l Param public static final native boolean Post MessageA int h Wnd int Msg int w Param int l Param  nPoints PostMessageW hWnd wParam lParam PostMessageA hWnd wParam lParam
public static final native boolean Post MessageW int h Wnd int Msg int w Param int l Param public static final native boolean Post MessageA int h Wnd int Msg int w Param int l Param public static final native boolean Post Thread MessageW int id Thread int Msg int w Param int l Param  PostMessageW hWnd wParam lParam PostMessageA hWnd wParam lParam PostThreadMessageW idThread wParam lParam
public static final native boolean Post MessageA int h Wnd int Msg int w Param int l Param public static final native boolean Post Thread MessageW int id Thread int Msg int w Param int l Param public static final native boolean Post Thread MessageA int id Thread int Msg int w Param int l Param  PostMessageA hWnd wParam lParam PostThreadMessageW idThread wParam lParam PostThreadMessageA idThread wParam lParam
public static final native boolean Post Thread MessageW int id Thread int Msg int w Param int l Param public static final native boolean Post Thread MessageA int id Thread int Msg int w Param int l Param public static final native boolean Print DlgW PRINTDLG lppd  PostThreadMessageW idThread wParam lParam PostThreadMessageA idThread wParam lParam PrintDlgW
public static final native boolean Post Thread MessageA int id Thread int Msg int w Param int l Param public static final native boolean Print DlgW PRINTDLG lppd public static final native boolean Print DlgA PRINTDLG lppd  PostThreadMessageA idThread wParam lParam PrintDlgW PrintDlgA
public static final native boolean Print DlgW PRINTDLG lppd public static final native boolean Print DlgA PRINTDLG lppd public static final native boolean Pt In Rect RECT rect POINT pt  PrintDlgW PrintDlgA PtInRect
public static final native boolean Print DlgA PRINTDLG lppd public static final native boolean Pt In Rect RECT rect POINT pt public static final native boolean Pt In Region int hrgn int X int Y  PrintDlgA PtInRect PtInRegion
public static final native boolean Pt In Rect RECT rect POINT pt public static final native boolean Pt In Region int hrgn int X int Y public static final native int Realize Palette int hDC  PtInRect PtInRegion RealizePalette
public static final native boolean Pt In Region int hrgn int X int Y public static final native int Realize Palette int hDC public static final native boolean Rectangle int hdc int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect  PtInRegion RealizePalette nLeftRect nTopRect nRightRect nBottomRect
public static final native int Realize Palette int hDC public static final native boolean Rectangle int hdc int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect public static final native boolean Rect In Region int hrgn RECT lprc  RealizePalette nLeftRect nTopRect nRightRect nBottomRect RectInRegion
public static final native boolean Rectangle int hdc int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect public static final native boolean Rect In Region int hrgn RECT lprc public static final native boolean Redraw Window int h Wnd RECT lprc Update int hrgn Update int flags  nLeftRect nTopRect nRightRect nBottomRect RectInRegion RedrawWindow hWnd lprcUpdate hrgnUpdate
public static final native boolean Rect In Region int hrgn RECT lprc public static final native boolean Redraw Window int h Wnd RECT lprc Update int hrgn Update int flags public static final native int Reg Close Key int h Key  RectInRegion RedrawWindow hWnd lprcUpdate hrgnUpdate RegCloseKey hKey
public static final native boolean Redraw Window int h Wnd RECT lprc Update int hrgn Update int flags public static final native int Reg Close Key int h Key public static final native int Register ClassW WNDCLASS lp Wnd Class  RedrawWindow hWnd lprcUpdate hrgnUpdate RegCloseKey hKey RegisterClassW lpWndClass
public static final native int Reg Close Key int h Key public static final native int Register ClassW WNDCLASS lp Wnd Class public static final native int Register ClassA WNDCLASS lp Wnd Class  RegCloseKey hKey RegisterClassW lpWndClass RegisterClassA lpWndClass
public static final native int Register ClassW WNDCLASS lp Wnd Class public static final native int Register ClassA WNDCLASS lp Wnd Class public static final native int Register Window MessageW char lp String  RegisterClassW lpWndClass RegisterClassA lpWndClass RegisterWindowMessageW lpString
public static final native int Register ClassA WNDCLASS lp Wnd Class public static final native int Register Window MessageW char lp String public static final native int Register Window MessageA byte lp String  RegisterClassA lpWndClass RegisterWindowMessageW lpString RegisterWindowMessageA lpString
public static final native int Register Window MessageW char lp String public static final native int Register Window MessageA byte lp String public static final native int Reg Enum Key ExW int h Key int dw Index char lp Name int lpc Name int lp Reserved char lp Class int lpc Class FILETIME lpft Last Write Time  RegisterWindowMessageW lpString RegisterWindowMessageA lpString RegEnumKeyExW hKey dwIndex lpName lpcName lpReserved lpClass lpcClass lpftLastWriteTime
public static final native int Register Window MessageA byte lp String public static final native int Reg Enum Key ExW int h Key int dw Index char lp Name int lpc Name int lp Reserved char lp Class int lpc Class FILETIME lpft Last Write Time public static final native int Register Clipboard FormatA byte lpsz Format  RegisterWindowMessageA lpString RegEnumKeyExW hKey dwIndex lpName lpcName lpReserved lpClass lpcClass lpftLastWriteTime RegisterClipboardFormatA lpszFormat
public static final native int Reg Enum Key ExW int h Key int dw Index char lp Name int lpc Name int lp Reserved char lp Class int lpc Class FILETIME lpft Last Write Time public static final native int Register Clipboard FormatA byte lpsz Format public static final native int Register Clipboard FormatW char lpsz Format  RegEnumKeyExW hKey dwIndex lpName lpcName lpReserved lpClass lpcClass lpftLastWriteTime RegisterClipboardFormatA lpszFormat RegisterClipboardFormatW lpszFormat
public static final native int Register Clipboard FormatA byte lpsz Format public static final native int Register Clipboard FormatW char lpsz Format public static final native int Reg Open Key ExW int h Key char lp Sub Key int ul Options int sam Desired int phk Result  RegisterClipboardFormatA lpszFormat RegisterClipboardFormatW lpszFormat RegOpenKeyExW hKey lpSubKey ulOptions samDesired phkResult
public static final native int Register Clipboard FormatW char lpsz Format public static final native int Reg Open Key ExW int h Key char lp Sub Key int ul Options int sam Desired int phk Result public static final native int Reg Query Info KeyW int h Key int lp Class int lpcb Class int lp Reserved int lp Sub Keys int lpcb Max Sub Key Len int lpcb Max Class Len int lpc Values int lpcb Max Value Name Len int lpcb Max Value Len int lpcb Security Descriptor int lpft Last Write Time  RegisterClipboardFormatW lpszFormat RegOpenKeyExW hKey lpSubKey ulOptions samDesired phkResult RegQueryInfoKeyW hKey lpClass lpcbClass lpReserved lpSubKeys lpcbMaxSubKeyLen lpcbMaxClassLen lpcValues lpcbMaxValueNameLen lpcbMaxValueLen lpcbSecurityDescriptor lpftLastWriteTime
public static final native int Reg Open Key ExW int h Key char lp Sub Key int ul Options int sam Desired int phk Result public static final native int Reg Query Info KeyW int h Key int lp Class int lpcb Class int lp Reserved int lp Sub Keys int lpcb Max Sub Key Len int lpcb Max Class Len int lpc Values int lpcb Max Value Name Len int lpcb Max Value Len int lpcb Security Descriptor int lpft Last Write Time public static final native int Reg Query Value ExW int h Key char lp Value Name int lp Reserved int lp Type char lp Data int lpcb Data  RegOpenKeyExW hKey lpSubKey ulOptions samDesired phkResult RegQueryInfoKeyW hKey lpClass lpcbClass lpReserved lpSubKeys lpcbMaxSubKeyLen lpcbMaxClassLen lpcValues lpcbMaxValueNameLen lpcbMaxValueLen lpcbSecurityDescriptor lpftLastWriteTime RegQueryValueExW hKey lpValueName lpReserved lpType lpData lpcbData
public static final native int Reg Query Info KeyW int h Key int lp Class int lpcb Class int lp Reserved int lp Sub Keys int lpcb Max Sub Key Len int lpcb Max Class Len int lpc Values int lpcb Max Value Name Len int lpcb Max Value Len int lpcb Security Descriptor int lpft Last Write Time public static final native int Reg Query Value ExW int h Key char lp Value Name int lp Reserved int lp Type char lp Data int lpcb Data public static final native int Reg Enum Key ExA int h Key int dw Index byte lp Name int lpc Name int lp Reserved byte lp Class int lpc Class FILETIME lpft Last Write Time  RegQueryInfoKeyW hKey lpClass lpcbClass lpReserved lpSubKeys lpcbMaxSubKeyLen lpcbMaxClassLen lpcValues lpcbMaxValueNameLen lpcbMaxValueLen lpcbSecurityDescriptor lpftLastWriteTime RegQueryValueExW hKey lpValueName lpReserved lpType lpData lpcbData RegEnumKeyExA hKey dwIndex lpName lpcName lpReserved lpClass lpcClass lpftLastWriteTime
public static final native int Reg Query Value ExW int h Key char lp Value Name int lp Reserved int lp Type char lp Data int lpcb Data public static final native int Reg Enum Key ExA int h Key int dw Index byte lp Name int lpc Name int lp Reserved byte lp Class int lpc Class FILETIME lpft Last Write Time public static final native int Reg Open Key ExA int h Key byte lp Sub Key int ul Options int sam Desired int phk Result  RegQueryValueExW hKey lpValueName lpReserved lpType lpData lpcbData RegEnumKeyExA hKey dwIndex lpName lpcName lpReserved lpClass lpcClass lpftLastWriteTime RegOpenKeyExA hKey lpSubKey ulOptions samDesired phkResult
public static final native int Reg Enum Key ExA int h Key int dw Index byte lp Name int lpc Name int lp Reserved byte lp Class int lpc Class FILETIME lpft Last Write Time public static final native int Reg Open Key ExA int h Key byte lp Sub Key int ul Options int sam Desired int phk Result public static final native int Reg Query Info KeyA int h Key int lp Class int lpcb Class int lp Reserved int lp Sub Keys int lpcb Max Sub Key Len int lpcb Max Class Len int lpc Values int lpcb Max Value Name Len int lpcb Max Value Len int lpcb Security Descriptor int lpft Last Write Time  RegEnumKeyExA hKey dwIndex lpName lpcName lpReserved lpClass lpcClass lpftLastWriteTime RegOpenKeyExA hKey lpSubKey ulOptions samDesired phkResult RegQueryInfoKeyA hKey lpClass lpcbClass lpReserved lpSubKeys lpcbMaxSubKeyLen lpcbMaxClassLen lpcValues lpcbMaxValueNameLen lpcbMaxValueLen lpcbSecurityDescriptor lpftLastWriteTime
public static final native int Reg Open Key ExA int h Key byte lp Sub Key int ul Options int sam Desired int phk Result public static final native int Reg Query Info KeyA int h Key int lp Class int lpcb Class int lp Reserved int lp Sub Keys int lpcb Max Sub Key Len int lpcb Max Class Len int lpc Values int lpcb Max Value Name Len int lpcb Max Value Len int lpcb Security Descriptor int lpft Last Write Time public static final native int Reg Query Value ExA int h Key byte lp Value Name int lp Reserved int lp Type byte lp Data int lpcb Data  RegOpenKeyExA hKey lpSubKey ulOptions samDesired phkResult RegQueryInfoKeyA hKey lpClass lpcbClass lpReserved lpSubKeys lpcbMaxSubKeyLen lpcbMaxClassLen lpcValues lpcbMaxValueNameLen lpcbMaxValueLen lpcbSecurityDescriptor lpftLastWriteTime RegQueryValueExA hKey lpValueName lpReserved lpType lpData lpcbData
public static final native int Reg Query Info KeyA int h Key int lp Class int lpcb Class int lp Reserved int lp Sub Keys int lpcb Max Sub Key Len int lpcb Max Class Len int lpc Values int lpcb Max Value Name Len int lpcb Max Value Len int lpcb Security Descriptor int lpft Last Write Time public static final native int Reg Query Value ExA int h Key byte lp Value Name int lp Reserved int lp Type byte lp Data int lpcb Data public static final native boolean Release Capture  RegQueryInfoKeyA hKey lpClass lpcbClass lpReserved lpSubKeys lpcbMaxSubKeyLen lpcbMaxClassLen lpcValues lpcbMaxValueNameLen lpcbMaxValueLen lpcbSecurityDescriptor lpftLastWriteTime RegQueryValueExA hKey lpValueName lpReserved lpType lpData lpcbData ReleaseCapture
public static final native int Reg Query Value ExA int h Key byte lp Value Name int lp Reserved int lp Type byte lp Data int lpcb Data public static final native boolean Release Capture public static final native int ReleaseDC int h Wnd int hDC  RegQueryValueExA hKey lpValueName lpReserved lpType lpData lpcbData ReleaseCapture hWnd
public static final native boolean Release Capture public static final native int ReleaseDC int h Wnd int hDC public static final native boolean Remove Menu int h Menu int u Position int u Flags  ReleaseCapture hWnd RemoveMenu hMenu uPosition uFlags
public static final native int ReleaseDC int h Wnd int hDC public static final native boolean Remove Menu int h Menu int u Position int u Flags public static final native boolean RestoreDC int hdc int n SavedDC  hWnd RemoveMenu hMenu uPosition uFlags nSavedDC
public static final native boolean Remove Menu int h Menu int u Position int u Flags public static final native boolean RestoreDC int hdc int n SavedDC public static final native boolean Round Rect int hdc int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect int n Width int n Height  RemoveMenu hMenu uPosition uFlags nSavedDC RoundRect nLeftRect nTopRect nRightRect nBottomRect nWidth nHeight
public static final native boolean RestoreDC int hdc int n SavedDC public static final native boolean Round Rect int hdc int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect int n Width int n Height public static final native int SaveDC int hdc  nSavedDC RoundRect nLeftRect nTopRect nRightRect nBottomRect nWidth nHeight
public static final native boolean Round Rect int hdc int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect int n Width int n Height public static final native int SaveDC int hdc public static final native boolean Screen To Client int h Wnd POINT lp Point  RoundRect nLeftRect nTopRect nRightRect nBottomRect nWidth nHeight ScreenToClient hWnd lpPoint
public static final native int SaveDC int hdc public static final native boolean Screen To Client int h Wnd POINT lp Point public static final native int Script Break char pwc Chars int c Chars SCRIPT ANALYSIS psa int psla  ScreenToClient hWnd lpPoint ScriptBreak pwcChars cChars SCRIPT_ANALYSIS
public static final native boolean Screen To Client int h Wnd POINT lp Point public static final native int Script Break char pwc Chars int c Chars SCRIPT ANALYSIS psa int psla public static final native int Script Get Properties int pp Sp int pi Num Scripts  ScreenToClient hWnd lpPoint ScriptBreak pwcChars cChars SCRIPT_ANALYSIS ScriptGetProperties ppSp piNumScripts
public static final native int Script Break char pwc Chars int c Chars SCRIPT ANALYSIS psa int psla public static final native int Script Get Properties int pp Sp int pi Num Scripts public static final native int Script Cache Get Height int hdc int psc int tm Height  ScriptBreak pwcChars cChars SCRIPT_ANALYSIS ScriptGetProperties ppSp piNumScripts ScriptCacheGetHeight tmHeight
public static final native int Script Get Properties int pp Sp int pi Num Scripts public static final native int Script Cache Get Height int hdc int psc int tm Height public static final native int ScriptC PtoX int iCP boolean f Trailing int c Chars int c Glyphs int pw Log Clust int psva int pi Advance SCRIPT ANALYSIS psa int piX  ScriptGetProperties ppSp piNumScripts ScriptCacheGetHeight tmHeight ScriptCPtoX fTrailing cChars cGlyphs pwLogClust piAdvance SCRIPT_ANALYSIS
public static final native int Script Cache Get Height int hdc int psc int tm Height public static final native int ScriptC PtoX int iCP boolean f Trailing int c Chars int c Glyphs int pw Log Clust int psva int pi Advance SCRIPT ANALYSIS psa int piX public static final native int Script Free Cache int psc  ScriptCacheGetHeight tmHeight ScriptCPtoX fTrailing cChars cGlyphs pwLogClust piAdvance SCRIPT_ANALYSIS ScriptFreeCache
public static final native int ScriptC PtoX int iCP boolean f Trailing int c Chars int c Glyphs int pw Log Clust int psva int pi Advance SCRIPT ANALYSIS psa int piX public static final native int Script Free Cache int psc public static final native int Script Get Font Properties int hdc int psc SCRIPT FONTPROPERTIES sfp  ScriptCPtoX fTrailing cChars cGlyphs pwLogClust piAdvance SCRIPT_ANALYSIS ScriptFreeCache ScriptGetFontProperties SCRIPT_FONTPROPERTIES
public static final native int Script Free Cache int psc public static final native int Script Get Font Properties int hdc int psc SCRIPT FONTPROPERTIES sfp public static final native int Script Get Logical Widths SCRIPT ANALYSIS psa int c Chars int c Glyphs int pi Glyph Width int pw Log Clust int psva int pi Dx  ScriptFreeCache ScriptGetFontProperties SCRIPT_FONTPROPERTIES ScriptGetLogicalWidths SCRIPT_ANALYSIS cChars cGlyphs piGlyphWidth pwLogClust piDx
public static final native int Script Get Font Properties int hdc int psc SCRIPT FONTPROPERTIES sfp public static final native int Script Get Logical Widths SCRIPT ANALYSIS psa int c Chars int c Glyphs int pi Glyph Width int pw Log Clust int psva int pi Dx public static final native int Script Itemize char pwc In Chars int c In Chars int c Max Items SCRIPT CONTROL ps Control SCRIPT STATE ps State int p Items int pc Items  ScriptGetFontProperties SCRIPT_FONTPROPERTIES ScriptGetLogicalWidths SCRIPT_ANALYSIS cChars cGlyphs piGlyphWidth pwLogClust piDx ScriptItemize pwcInChars cInChars cMaxItems SCRIPT_CONTROL psControl SCRIPT_STATE psState pItems pcItems
public static final native int Script Get Logical Widths SCRIPT ANALYSIS psa int c Chars int c Glyphs int pi Glyph Width int pw Log Clust int psva int pi Dx public static final native int Script Itemize char pwc In Chars int c In Chars int c Max Items SCRIPT CONTROL ps Control SCRIPT STATE ps State int p Items int pc Items public static final native int Script Layout int c Runs byte pb Level int pi Visual To Logical int pi Logical To Visual  ScriptGetLogicalWidths SCRIPT_ANALYSIS cChars cGlyphs piGlyphWidth pwLogClust piDx ScriptItemize pwcInChars cInChars cMaxItems SCRIPT_CONTROL psControl SCRIPT_STATE psState pItems pcItems ScriptLayout cRuns pbLevel piVisualToLogical piLogicalToVisual
public static final native int Script Itemize char pwc In Chars int c In Chars int c Max Items SCRIPT CONTROL ps Control SCRIPT STATE ps State int p Items int pc Items public static final native int Script Layout int c Runs byte pb Level int pi Visual To Logical int pi Logical To Visual public static final native int Script Place int hdc int psc int pw Glyphs int c Glyphs int psva SCRIPT ANALYSIS psa int pi Advance int p Goffset int pABC  ScriptItemize pwcInChars cInChars cMaxItems SCRIPT_CONTROL psControl SCRIPT_STATE psState pItems pcItems ScriptLayout cRuns pbLevel piVisualToLogical piLogicalToVisual ScriptPlace pwGlyphs cGlyphs SCRIPT_ANALYSIS piAdvance pGoffset
public static final native int Script Layout int c Runs byte pb Level int pi Visual To Logical int pi Logical To Visual public static final native int Script Place int hdc int psc int pw Glyphs int c Glyphs int psva SCRIPT ANALYSIS psa int pi Advance int p Goffset int pABC public static final native int Script Shape int hdc int psc char pwc Chars int c Chars int c Max Glyphs SCRIPT ANALYSIS psa int pw Out Glyphs int pw Log Clust int psva int pc Glyphs  ScriptLayout cRuns pbLevel piVisualToLogical piLogicalToVisual ScriptPlace pwGlyphs cGlyphs SCRIPT_ANALYSIS piAdvance pGoffset ScriptShape pwcChars cChars cMaxGlyphs SCRIPT_ANALYSIS pwOutGlyphs pwLogClust pcGlyphs
public static final native int Script Place int hdc int psc int pw Glyphs int c Glyphs int psva SCRIPT ANALYSIS psa int pi Advance int p Goffset int pABC public static final native int Script Shape int hdc int psc char pwc Chars int c Chars int c Max Glyphs SCRIPT ANALYSIS psa int pw Out Glyphs int pw Log Clust int psva int pc Glyphs public static final native int Script Text Out int hdc int psc int x int y int fu Options RECT lprc SCRIPT ANALYSIS psa int pwc Reserved int i Reserved int pw Glyphs int c Glyphs int pi Advance int pi Justify int p Goffset  ScriptPlace pwGlyphs cGlyphs SCRIPT_ANALYSIS piAdvance pGoffset ScriptShape pwcChars cChars cMaxGlyphs SCRIPT_ANALYSIS pwOutGlyphs pwLogClust pcGlyphs ScriptTextOut fuOptions SCRIPT_ANALYSIS pwcReserved iReserved pwGlyphs cGlyphs piAdvance piJustify pGoffset
public static final native int Script Shape int hdc int psc char pwc Chars int c Chars int c Max Glyphs SCRIPT ANALYSIS psa int pw Out Glyphs int pw Log Clust int psva int pc Glyphs public static final native int Script Text Out int hdc int psc int x int y int fu Options RECT lprc SCRIPT ANALYSIS psa int pwc Reserved int i Reserved int pw Glyphs int c Glyphs int pi Advance int pi Justify int p Goffset public static final native int Script XtoCP int iX int c Chars int c Glyphs int pw Log Clust int psva int pi Advance SCRIPT ANALYSIS psa int piCP int pi Trailing  ScriptShape pwcChars cChars cMaxGlyphs SCRIPT_ANALYSIS pwOutGlyphs pwLogClust pcGlyphs ScriptTextOut fuOptions SCRIPT_ANALYSIS pwcReserved iReserved pwGlyphs cGlyphs piAdvance piJustify pGoffset ScriptXtoCP cChars cGlyphs pwLogClust piAdvance SCRIPT_ANALYSIS piTrailing
public static final native int Script Text Out int hdc int psc int x int y int fu Options RECT lprc SCRIPT ANALYSIS psa int pwc Reserved int i Reserved int pw Glyphs int c Glyphs int pi Advance int pi Justify int p Goffset public static final native int Script XtoCP int iX int c Chars int c Glyphs int pw Log Clust int psva int pi Advance SCRIPT ANALYSIS psa int piCP int pi Trailing public static final native int Scroll Window Ex int h Wnd int dx int dy RECT prc Scroll RECT prc Clip int hrgn Update RECT prc Update int flags  ScriptTextOut fuOptions SCRIPT_ANALYSIS pwcReserved iReserved pwGlyphs cGlyphs piAdvance piJustify pGoffset ScriptXtoCP cChars cGlyphs pwLogClust piAdvance SCRIPT_ANALYSIS piTrailing ScrollWindowEx hWnd prcScroll prcClip hrgnUpdate prcUpdate
public static final native int Script XtoCP int iX int c Chars int c Glyphs int pw Log Clust int psva int pi Advance SCRIPT ANALYSIS psa int piCP int pi Trailing public static final native int Scroll Window Ex int h Wnd int dx int dy RECT prc Scroll RECT prc Clip int hrgn Update RECT prc Update int flags public static final native int Select Clip Rgn int hdc int hrgn  ScriptXtoCP cChars cGlyphs pwLogClust piAdvance SCRIPT_ANALYSIS piTrailing ScrollWindowEx hWnd prcScroll prcClip hrgnUpdate prcUpdate SelectClipRgn
public static final native int Scroll Window Ex int h Wnd int dx int dy RECT prc Scroll RECT prc Clip int hrgn Update RECT prc Update int flags public static final native int Select Clip Rgn int hdc int hrgn public static final native int Select Object int hDC int HGDI Obj  ScrollWindowEx hWnd prcScroll prcClip hrgnUpdate prcUpdate SelectClipRgn SelectObject HGDIObj
public static final native int Select Clip Rgn int hdc int hrgn public static final native int Select Object int hDC int HGDI Obj public static final native int Select Palette int hDC int hpal boolean b Force Background  SelectClipRgn SelectObject HGDIObj SelectPalette bForceBackground
public static final native int Select Object int hDC int HGDI Obj public static final native int Select Palette int hDC int hpal boolean b Force Background public static final native int Send Input int n Inputs int p Inputs int cb Size  SelectObject HGDIObj SelectPalette bForceBackground SendInput nInputs pInputs cbSize
public static final native int Select Palette int hDC int hpal boolean b Force Background public static final native int Send Input int n Inputs int p Inputs int cb Size public static final native int Send MessageW int h Wnd int Msg int w Param int l Param  SelectPalette bForceBackground SendInput nInputs pInputs cbSize SendMessageW hWnd wParam lParam
public static final native int Send Input int n Inputs int p Inputs int cb Size public static final native int Send MessageW int h Wnd int Msg int w Param int l Param public static final native int Send MessageW int h Wnd int Msg int w Param int l Param  SendInput nInputs pInputs cbSize SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param int l Param public static final native int Send MessageW int h Wnd int Msg int w Param int l Param public static final native int Send MessageW int h Wnd int Msg int w Param char l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param int l Param public static final native int Send MessageW int h Wnd int Msg int w Param char l Param public static final native int Send MessageW int h Wnd int Msg int w Param int l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param char l Param public static final native int Send MessageW int h Wnd int Msg int w Param int l Param public static final native int Send MessageW int h Wnd int Msg int w Param short l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param int l Param public static final native int Send MessageW int h Wnd int Msg int w Param short l Param public static final native int Send MessageW int h Wnd int Msg int w Param int l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param short l Param public static final native int Send MessageW int h Wnd int Msg int w Param int l Param public static final native int Send MessageW int h Wnd int Msg int w Param LVCOLUMN l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param int l Param public static final native int Send MessageW int h Wnd int Msg int w Param LVCOLUMN l Param public static final native int Send MessageW int h Wnd int Msg int w Param LVHITTESTINFO l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param LVCOLUMN l Param public static final native int Send MessageW int h Wnd int Msg int w Param LVHITTESTINFO l Param public static final native int Send MessageW int h Wnd int Msg int w Param LVITEM l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param LVHITTESTINFO l Param public static final native int Send MessageW int h Wnd int Msg int w Param LVITEM l Param public static final native int Send MessageW int h Wnd int Msg int w Param MARGINS l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param LVITEM l Param public static final native int Send MessageW int h Wnd int Msg int w Param MARGINS l Param public static final native int Send MessageW int h Wnd int Msg int w Param REBARBANDINFO l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param MARGINS l Param public static final native int Send MessageW int h Wnd int Msg int w Param REBARBANDINFO l Param public static final native int Send MessageW int h Wnd int Msg int w Param RECT l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param REBARBANDINFO l Param public static final native int Send MessageW int h Wnd int Msg int w Param RECT l Param public static final native int Send MessageW int h Wnd int Msg int w Param TBBUTTON l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param RECT l Param public static final native int Send MessageW int h Wnd int Msg int w Param TBBUTTON l Param public static final native int Send MessageW int h Wnd int Msg int w Param TBBUTTONINFO l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param TBBUTTON l Param public static final native int Send MessageW int h Wnd int Msg int w Param TBBUTTONINFO l Param public static final native int Send MessageW int h Wnd int Msg int w Param TCITEM l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param TBBUTTONINFO l Param public static final native int Send MessageW int h Wnd int Msg int w Param TCITEM l Param public static final native int Send MessageW int h Wnd int Msg int w Param TOOLINFO l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param TCITEM l Param public static final native int Send MessageW int h Wnd int Msg int w Param TOOLINFO l Param public static final native int Send MessageW int h Wnd int Msg int w Param TVHITTESTINFO l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param TOOLINFO l Param public static final native int Send MessageW int h Wnd int Msg int w Param TVHITTESTINFO l Param public static final native int Send MessageW int h Wnd int Msg int w Param TVINSERTSTRUCT l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param TVHITTESTINFO l Param public static final native int Send MessageW int h Wnd int Msg int w Param TVINSERTSTRUCT l Param public static final native int Send MessageW int h Wnd int Msg int w Param TVITEM l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param TVINSERTSTRUCT l Param public static final native int Send MessageW int h Wnd int Msg int w Param TVITEM l Param public static final native int Send MessageA int h Wnd int Msg int w Param int l Param  SendMessageW hWnd wParam lParam SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageW int h Wnd int Msg int w Param TVITEM l Param public static final native int Send MessageA int h Wnd int Msg int w Param int l Param public static final native int Send MessageA int h Wnd int Msg int w Param int l Param  SendMessageW hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param int l Param public static final native int Send MessageA int h Wnd int Msg int w Param int l Param public static final native int Send MessageA int h Wnd int Msg int w Param byte l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param int l Param public static final native int Send MessageA int h Wnd int Msg int w Param byte l Param public static final native int Send MessageA int h Wnd int Msg int w Param int l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param byte l Param public static final native int Send MessageA int h Wnd int Msg int w Param int l Param public static final native int Send MessageA int h Wnd int Msg int w Param short l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param int l Param public static final native int Send MessageA int h Wnd int Msg int w Param short l Param public static final native int Send MessageA int h Wnd int Msg int w Param int l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param short l Param public static final native int Send MessageA int h Wnd int Msg int w Param int l Param public static final native int Send MessageA int h Wnd int Msg int w Param LVCOLUMN l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param int l Param public static final native int Send MessageA int h Wnd int Msg int w Param LVCOLUMN l Param public static final native int Send MessageA int h Wnd int Msg int w Param LVHITTESTINFO l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param LVCOLUMN l Param public static final native int Send MessageA int h Wnd int Msg int w Param LVHITTESTINFO l Param public static final native int Send MessageA int h Wnd int Msg int w Param LVITEM l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param LVHITTESTINFO l Param public static final native int Send MessageA int h Wnd int Msg int w Param LVITEM l Param public static final native int Send MessageA int h Wnd int Msg int w Param MARGINS l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param LVITEM l Param public static final native int Send MessageA int h Wnd int Msg int w Param MARGINS l Param public static final native int Send MessageA int h Wnd int Msg int w Param REBARBANDINFO l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param MARGINS l Param public static final native int Send MessageA int h Wnd int Msg int w Param REBARBANDINFO l Param public static final native int Send MessageA int h Wnd int Msg int w Param RECT l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param REBARBANDINFO l Param public static final native int Send MessageA int h Wnd int Msg int w Param RECT l Param public static final native int Send MessageA int h Wnd int Msg int w Param TBBUTTON l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param RECT l Param public static final native int Send MessageA int h Wnd int Msg int w Param TBBUTTON l Param public static final native int Send MessageA int h Wnd int Msg int w Param TBBUTTONINFO l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param TBBUTTON l Param public static final native int Send MessageA int h Wnd int Msg int w Param TBBUTTONINFO l Param public static final native int Send MessageA int h Wnd int Msg int w Param TCITEM l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param TBBUTTONINFO l Param public static final native int Send MessageA int h Wnd int Msg int w Param TCITEM l Param public static final native int Send MessageA int h Wnd int Msg int w Param TOOLINFO l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param TCITEM l Param public static final native int Send MessageA int h Wnd int Msg int w Param TOOLINFO l Param public static final native int Send MessageA int h Wnd int Msg int w Param TVHITTESTINFO l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param TOOLINFO l Param public static final native int Send MessageA int h Wnd int Msg int w Param TVHITTESTINFO l Param public static final native int Send MessageA int h Wnd int Msg int w Param TVINSERTSTRUCT l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param TVHITTESTINFO l Param public static final native int Send MessageA int h Wnd int Msg int w Param TVINSERTSTRUCT l Param public static final native int Send MessageA int h Wnd int Msg int w Param TVITEM l Param  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam
public static final native int Send MessageA int h Wnd int Msg int w Param TVINSERTSTRUCT l Param public static final native int Send MessageA int h Wnd int Msg int w Param TVITEM l Param public static final native int Set Active Window int h Wnd  SendMessageA hWnd wParam lParam SendMessageA hWnd wParam lParam SetActiveWindow hWnd
public static final native int Send MessageA int h Wnd int Msg int w Param TVITEM l Param public static final native int Set Active Window int h Wnd public static final native int Set Bk Color int hdc int color Ref  SendMessageA hWnd wParam lParam SetActiveWindow hWnd SetBkColor colorRef
public static final native int Set Active Window int h Wnd public static final native int Set Bk Color int hdc int color Ref public static final native int Set Bk Mode int hdc int mode  SetActiveWindow hWnd SetBkColor colorRef SetBkMode
public static final native int Set Bk Color int hdc int color Ref public static final native int Set Bk Mode int hdc int mode public static final native int Set Capture int h Wnd  SetBkColor colorRef SetBkMode SetCapture hWnd
public static final native int Set Bk Mode int hdc int mode public static final native int Set Capture int h Wnd public static final native boolean Set Caret Pos int X int Y  SetBkMode SetCapture hWnd SetCaretPos
public static final native int Set Capture int h Wnd public static final native boolean Set Caret Pos int X int Y public static final native int Set Clipboard Data int u Format int h Mem  SetCapture hWnd SetCaretPos SetClipboardData uFormat hMem
public static final native boolean Set Caret Pos int X int Y public static final native int Set Clipboard Data int u Format int h Mem public static final native int Set Cursor int h Cursor  SetCaretPos SetClipboardData uFormat hMem SetCursor hCursor
public static final native int Set Clipboard Data int u Format int h Mem public static final native int Set Cursor int h Cursor public static final native boolean Set Cursor Pos int X int Y  SetClipboardData uFormat hMem SetCursor hCursor SetCursorPos
public static final native int Set Cursor int h Cursor public static final native boolean Set Cursor Pos int X int Y public static final native int SetDIB Color Table int hdc int u Start Index int c Entries byte p Colors  SetCursor hCursor SetCursorPos SetDIBColorTable uStartIndex cEntries pColors
public static final native boolean Set Cursor Pos int X int Y public static final native int SetDIB Color Table int hdc int u Start Index int c Entries byte p Colors public static final native int Set Error Mode int u Mode  SetCursorPos SetDIBColorTable uStartIndex cEntries pColors SetErrorMode uMode
public static final native int SetDIB Color Table int hdc int u Start Index int c Entries byte p Colors public static final native int Set Error Mode int u Mode public static final native int Set Focus int h Wnd  SetDIBColorTable uStartIndex cEntries pColors SetErrorMode uMode SetFocus hWnd
public static final native int Set Error Mode int u Mode public static final native int Set Focus int h Wnd public static final native boolean Set Foreground Window int h Wnd  SetErrorMode uMode SetFocus hWnd SetForegroundWindow hWnd
public static final native int Set Focus int h Wnd public static final native boolean Set Foreground Window int h Wnd public static final native int Set Layout int hdc int dw Layout  SetFocus hWnd SetForegroundWindow hWnd SetLayout dwLayout
public static final native boolean Set Foreground Window int h Wnd public static final native int Set Layout int hdc int dw Layout public static final native boolean Set Menu int h Wnd int h Menu  SetForegroundWindow hWnd SetLayout dwLayout SetMenu hWnd hMenu
public static final native int Set Layout int hdc int dw Layout public static final native boolean Set Menu int h Wnd int h Menu public static final native boolean Set Menu Default Item int h Menu int u Item int f By Pos  SetLayout dwLayout SetMenu hWnd hMenu SetMenuDefaultItem hMenu uItem fByPos
public static final native boolean Set Menu int h Wnd int h Menu public static final native boolean Set Menu Default Item int h Menu int u Item int f By Pos public static final native boolean Set Menu Info int hmenu MENUINFO lpcmi  SetMenu hWnd hMenu SetMenuDefaultItem hMenu uItem fByPos SetMenuInfo
public static final native boolean Set Menu Default Item int h Menu int u Item int f By Pos public static final native boolean Set Menu Info int hmenu MENUINFO lpcmi public static final native boolean Set Menu Item InfoW int h Menu int u Item boolean f By Position MENUITEMINFO lpmii  SetMenuDefaultItem hMenu uItem fByPos SetMenuInfo SetMenuItemInfoW hMenu uItem fByPosition
public static final native boolean Set Menu Info int hmenu MENUINFO lpcmi public static final native boolean Set Menu Item InfoW int h Menu int u Item boolean f By Position MENUITEMINFO lpmii public static final native boolean Set Menu Item InfoA int h Menu int u Item boolean f By Position MENUITEMINFO lpmii  SetMenuInfo SetMenuItemInfoW hMenu uItem fByPosition SetMenuItemInfoA hMenu uItem fByPosition
public static final native boolean Set Menu Item InfoW int h Menu int u Item boolean f By Position MENUITEMINFO lpmii public static final native boolean Set Menu Item InfoA int h Menu int u Item boolean f By Position MENUITEMINFO lpmii public static final native int Set Palette Entries int h Pal int i Start int c Entries byte lppe  SetMenuItemInfoW hMenu uItem fByPosition SetMenuItemInfoA hMenu uItem fByPosition SetPaletteEntries hPal iStart cEntries
public static final native boolean Set Menu Item InfoA int h Menu int u Item boolean f By Position MENUITEMINFO lpmii public static final native int Set Palette Entries int h Pal int i Start int c Entries byte lppe public static final native int Set Parent int h Wnd Child int h Wnd New Parent  SetMenuItemInfoA hMenu uItem fByPosition SetPaletteEntries hPal iStart cEntries SetParent hWndChild hWndNewParent
public static final native int Set Palette Entries int h Pal int i Start int c Entries byte lppe public static final native int Set Parent int h Wnd Child int h Wnd New Parent public static final native int Set Pixel int hdc int X int Y int cr Color  SetPaletteEntries hPal iStart cEntries SetParent hWndChild hWndNewParent SetPixel crColor
public static final native int Set Parent int h Wnd Child int h Wnd New Parent public static final native int Set Pixel int hdc int X int Y int cr Color public static final native boolean Set Rect RECT lprc int x Left int y Top int x Right int y Bottom  SetParent hWndChild hWndNewParent SetPixel crColor SetRect xLeft yTop xRight yBottom
public static final native int Set Pixel int hdc int X int Y int cr Color public static final native boolean Set Rect RECT lprc int x Left int y Top int x Right int y Bottom public static final native boolean Set Rect Rgn int hrgn int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect  SetPixel crColor SetRect xLeft yTop xRight yBottom SetRectRgn nLeftRect nTopRect nRightRect nBottomRect
public static final native boolean Set Rect RECT lprc int x Left int y Top int x Right int y Bottom public static final native boolean Set Rect Rgn int hrgn int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect public static final native int SetROP2 int hdc int fn Draw Mode  SetRect xLeft yTop xRight yBottom SetRectRgn nLeftRect nTopRect nRightRect nBottomRect fnDrawMode
public static final native boolean Set Rect Rgn int hrgn int n Left Rect int n Top Rect int n Right Rect int n Bottom Rect public static final native int SetROP2 int hdc int fn Draw Mode public static final native boolean Set Scroll Info int hwnd int flags SCROLLINFO info boolean f Redraw  SetRectRgn nLeftRect nTopRect nRightRect nBottomRect fnDrawMode SetScrollInfo fRedraw
public static final native int SetROP2 int hdc int fn Draw Mode public static final native boolean Set Scroll Info int hwnd int flags SCROLLINFO info boolean f Redraw public static final native int Set Stretch Blt Mode int hdc int i Stretch Mode  fnDrawMode SetScrollInfo fRedraw SetStretchBltMode iStretchMode
public static final native boolean Set Scroll Info int hwnd int flags SCROLLINFO info boolean f Redraw public static final native int Set Stretch Blt Mode int hdc int i Stretch Mode public static final native int Set Text Align int hdc int f Mode  SetScrollInfo fRedraw SetStretchBltMode iStretchMode SetTextAlign fMode
public static final native int Set Stretch Blt Mode int hdc int i Stretch Mode public static final native int Set Text Align int hdc int f Mode public static final native int Set Text Color int hdc int color Ref  SetStretchBltMode iStretchMode SetTextAlign fMode SetTextColor colorRef
public static final native int Set Text Align int hdc int f Mode public static final native int Set Text Color int hdc int color Ref public static final native int Set Timer int h Wnd int nID Event int Elapse int lp Timer Func  SetTextAlign fMode SetTextColor colorRef SetTimer hWnd nIDEvent lpTimerFunc
public static final native int Set Text Color int hdc int color Ref public static final native int Set Timer int h Wnd int nID Event int Elapse int lp Timer Func public static final native int Set Window LongW int h Wnd int n Index int dw New Long  SetTextColor colorRef SetTimer hWnd nIDEvent lpTimerFunc SetWindowLongW hWnd nIndex dwNewLong
public static final native int Set Timer int h Wnd int nID Event int Elapse int lp Timer Func public static final native int Set Window LongW int h Wnd int n Index int dw New Long public static final native int Set Window LongA int h Wnd int n Index int dw New Long  SetTimer hWnd nIDEvent lpTimerFunc SetWindowLongW hWnd nIndex dwNewLong SetWindowLongA hWnd nIndex dwNewLong
public static final native int Set Window LongW int h Wnd int n Index int dw New Long public static final native int Set Window LongA int h Wnd int n Index int dw New Long public static final native boolean Set Window Placement int h Wnd WINDOWPLACEMENT lpwndpl  SetWindowLongW hWnd nIndex dwNewLong SetWindowLongA hWnd nIndex dwNewLong SetWindowPlacement hWnd
public static final native int Set Window LongA int h Wnd int n Index int dw New Long public static final native boolean Set Window Placement int h Wnd WINDOWPLACEMENT lpwndpl public static final native boolean Set Window Pos int h Wnd int h Wnd Insert After int X int Y int cx int cy int u Flags  SetWindowLongA hWnd nIndex dwNewLong SetWindowPlacement hWnd SetWindowPos hWnd hWndInsertAfter uFlags
public static final native boolean Set Window Placement int h Wnd WINDOWPLACEMENT lpwndpl public static final native boolean Set Window Pos int h Wnd int h Wnd Insert After int X int Y int cx int cy int u Flags public static final native int Set Window Rgn int h Wnd int h Rgn boolean b Redraw  SetWindowPlacement hWnd SetWindowPos hWnd hWndInsertAfter uFlags SetWindowRgn hWnd hRgn bRedraw
public static final native boolean Set Window Pos int h Wnd int h Wnd Insert After int X int Y int cx int cy int u Flags public static final native int Set Window Rgn int h Wnd int h Rgn boolean b Redraw public static final native boolean Set Window TextW int h Wnd char lp String  SetWindowPos hWnd hWndInsertAfter uFlags SetWindowRgn hWnd hRgn bRedraw SetWindowTextW hWnd lpString
public static final native int Set Window Rgn int h Wnd int h Rgn boolean b Redraw public static final native boolean Set Window TextW int h Wnd char lp String public static final native boolean Set Window TextA int h Wnd byte lp String  SetWindowRgn hWnd hRgn bRedraw SetWindowTextW hWnd lpString SetWindowTextA hWnd lpString
public static final native boolean Set Window TextW int h Wnd char lp String public static final native boolean Set Window TextA int h Wnd byte lp String public static final native int Set Windows Hook ExW int id Hook int lpfn int h Mod int dw Thread Id  SetWindowTextW hWnd lpString SetWindowTextA hWnd lpString SetWindowsHookExW idHook hMod dwThreadId
public static final native boolean Set Window TextA int h Wnd byte lp String public static final native int Set Windows Hook ExW int id Hook int lpfn int h Mod int dw Thread Id public static final native int Set Windows Hook ExA int id Hook int lpfn int h Mod int dw Thread Id  SetWindowTextA hWnd lpString SetWindowsHookExW idHook hMod dwThreadId SetWindowsHookExA idHook hMod dwThreadId
public static final native int Set Windows Hook ExW int id Hook int lpfn int h Mod int dw Thread Id public static final native int Set Windows Hook ExA int id Hook int lpfn int h Mod int dw Thread Id public static final native int SH Browse For FolderW BROWSEINFO lpbi  SetWindowsHookExW idHook hMod dwThreadId SetWindowsHookExA idHook hMod dwThreadId SHBrowseForFolderW
public static final native int Set Windows Hook ExA int id Hook int lpfn int h Mod int dw Thread Id public static final native int SH Browse For FolderW BROWSEINFO lpbi public static final native int SH Browse For FolderA BROWSEINFO lpbi  SetWindowsHookExA idHook hMod dwThreadId SHBrowseForFolderW SHBrowseForFolderA
public static final native int SH Browse For FolderW BROWSEINFO lpbi public static final native int SH Browse For FolderA BROWSEINFO lpbi public static final native boolean SH Create Menu Bar SHMENUBARINFO pmb  SHBrowseForFolderW SHBrowseForFolderA SHCreateMenuBar
public static final native int SH Browse For FolderA BROWSEINFO lpbi public static final native boolean SH Create Menu Bar SHMENUBARINFO pmb public static final native boolean SH HandleWM Setting Change int hwnd int w Param int l Param SHACTIVATEINFO psai  SHBrowseForFolderA SHCreateMenuBar SHHandleWMSettingChange wParam lParam
public static final native boolean SH Create Menu Bar SHMENUBARINFO pmb public static final native boolean SH HandleWM Setting Change int hwnd int w Param int l Param SHACTIVATEINFO psai public static final native int SH Recognize Gesture SHRGINFO shrg  SHCreateMenuBar SHHandleWMSettingChange wParam lParam SHRecognizeGesture
public static final native boolean SH HandleWM Setting Change int hwnd int w Param int l Param SHACTIVATEINFO psai public static final native int SH Recognize Gesture SHRGINFO shrg public static final native void SH Send Back To Focus Window int u Msg int wp int lp  SHHandleWMSettingChange wParam lParam SHRecognizeGesture SHSendBackToFocusWindow uMsg
public static final native int SH Recognize Gesture SHRGINFO shrg public static final native void SH Send Back To Focus Window int u Msg int wp int lp public static final native boolean SH Sip Preference int hwnd int st  SHRecognizeGesture SHSendBackToFocusWindow uMsg SHSipPreference
public static final native void SH Send Back To Focus Window int u Msg int wp int lp public static final native boolean SH Sip Preference int hwnd int st public static final native boolean Shell Execute ExW SHELLEXECUTEINFO lp Exec Info  SHSendBackToFocusWindow uMsg SHSipPreference ShellExecuteExW lpExecInfo
public static final native boolean SH Sip Preference int hwnd int st public static final native boolean Shell Execute ExW SHELLEXECUTEINFO lp Exec Info public static final native boolean Shell Execute ExA SHELLEXECUTEINFO lp Exec Info  SHSipPreference ShellExecuteExW lpExecInfo ShellExecuteExA lpExecInfo
public static final native boolean Shell Execute ExW SHELLEXECUTEINFO lp Exec Info public static final native boolean Shell Execute ExA SHELLEXECUTEINFO lp Exec Info public static final native boolean Shell NotifyIconA int dw Message NOTIFYICONDATAA lp Data  ShellExecuteExW lpExecInfo ShellExecuteExA lpExecInfo Shell_NotifyIconA dwMessage lpData
public static final native boolean Shell Execute ExA SHELLEXECUTEINFO lp Exec Info public static final native boolean Shell NotifyIconA int dw Message NOTIFYICONDATAA lp Data public static final native boolean Shell NotifyIconW int dw Message NOTIFYICONDATAW lp Data  ShellExecuteExA lpExecInfo Shell_NotifyIconA dwMessage lpData Shell_NotifyIconW dwMessage lpData
public static final native boolean Shell NotifyIconA int dw Message NOTIFYICONDATAA lp Data public static final native boolean Shell NotifyIconW int dw Message NOTIFYICONDATAW lp Data public static final native int SH Get Malloc int pp Malloc  Shell_NotifyIconA dwMessage lpData Shell_NotifyIconW dwMessage lpData SHGetMalloc ppMalloc
public static final native boolean Shell NotifyIconW int dw Message NOTIFYICONDATAW lp Data public static final native int SH Get Malloc int pp Malloc public static final native boolean SH Get Path FromID ListW int pidl char psz Path  Shell_NotifyIconW dwMessage lpData SHGetMalloc ppMalloc SHGetPathFromIDListW pszPath
public static final native int SH Get Malloc int pp Malloc public static final native boolean SH Get Path FromID ListW int pidl char psz Path public static final native boolean SH Get Path FromID ListA int pidl byte psz Path  SHGetMalloc ppMalloc SHGetPathFromIDListW pszPath SHGetPathFromIDListA pszPath
public static final native boolean SH Get Path FromID ListW int pidl char psz Path public static final native boolean SH Get Path FromID ListA int pidl byte psz Path public static final native boolean SH Set App Key Wnd Assoc byte b Vk int hwnd  SHGetPathFromIDListW pszPath SHGetPathFromIDListA pszPath SHSetAppKeyWndAssoc bVk
public static final native boolean SH Get Path FromID ListA int pidl byte psz Path public static final native boolean SH Set App Key Wnd Assoc byte b Vk int hwnd public static final native boolean Show Caret int h Wnd  SHGetPathFromIDListA pszPath SHSetAppKeyWndAssoc bVk ShowCaret hWnd
public static final native boolean SH Set App Key Wnd Assoc byte b Vk int hwnd public static final native boolean Show Caret int h Wnd public static final native boolean Show Owned Popups int h Wnd boolean f Show  SHSetAppKeyWndAssoc bVk ShowCaret hWnd ShowOwnedPopups hWnd fShow
public static final native boolean Show Caret int h Wnd public static final native boolean Show Owned Popups int h Wnd boolean f Show public static final native boolean Show Scroll Bar int h Wnd int w Bar boolean b Show  ShowCaret hWnd ShowOwnedPopups hWnd fShow ShowScrollBar hWnd wBar bShow
public static final native boolean Show Owned Popups int h Wnd boolean f Show public static final native boolean Show Scroll Bar int h Wnd int w Bar boolean b Show public static final native boolean Show Window int h Wnd int n Cmd Show  ShowOwnedPopups hWnd fShow ShowScrollBar hWnd wBar bShow ShowWindow hWnd nCmdShow
public static final native boolean Show Scroll Bar int h Wnd int w Bar boolean b Show public static final native boolean Show Window int h Wnd int n Cmd Show public static final native boolean Sip Get Info SIPINFO p Sip Info  ShowScrollBar hWnd wBar bShow ShowWindow hWnd nCmdShow SipGetInfo pSipInfo
public static final native boolean Show Window int h Wnd int n Cmd Show public static final native boolean Sip Get Info SIPINFO p Sip Info public static final native int Start DocW int hdc DOCINFO lpdi  ShowWindow hWnd nCmdShow SipGetInfo pSipInfo StartDocW
public static final native boolean Sip Get Info SIPINFO p Sip Info public static final native int Start DocW int hdc DOCINFO lpdi public static final native int Start DocA int hdc DOCINFO lpdi  SipGetInfo pSipInfo StartDocW StartDocA
public static final native int Start DocW int hdc DOCINFO lpdi public static final native int Start DocA int hdc DOCINFO lpdi public static final native int Start Page int hdc  StartDocW StartDocA StartPage
public static final native int Start DocA int hdc DOCINFO lpdi public static final native int Start Page int hdc public static final native boolean Stretch Blt int hdc Dest int nX Origin Dest int nY Origin Dest int n Width Dest int n Height Dest int hdc Src int nX Origin Src int nY Origin Src int n Width Src int n Height Src int dw Rop  StartDocA StartPage StretchBlt hdcDest nXOriginDest nYOriginDest nWidthDest nHeightDest hdcSrc nXOriginSrc nYOriginSrc nWidthSrc nHeightSrc dwRop
public static final native int Start Page int hdc public static final native boolean Stretch Blt int hdc Dest int nX Origin Dest int nY Origin Dest int n Width Dest int n Height Dest int hdc Src int nX Origin Src int nY Origin Src int n Width Src int n Height Src int dw Rop public static final native boolean System Parameters InfoW int ui Action int ui Param HIGHCONTRAST pv Param int f Win Ini  StartPage StretchBlt hdcDest nXOriginDest nYOriginDest nWidthDest nHeightDest hdcSrc nXOriginSrc nYOriginSrc nWidthSrc nHeightSrc dwRop SystemParametersInfoW uiAction uiParam pvParam fWinIni
public static final native boolean Stretch Blt int hdc Dest int nX Origin Dest int nY Origin Dest int n Width Dest int n Height Dest int hdc Src int nX Origin Src int nY Origin Src int n Width Src int n Height Src int dw Rop public static final native boolean System Parameters InfoW int ui Action int ui Param HIGHCONTRAST pv Param int f Win Ini public static final native boolean System Parameters InfoA int ui Action int ui Param HIGHCONTRAST pv Param int f Win Ini  StretchBlt hdcDest nXOriginDest nYOriginDest nWidthDest nHeightDest hdcSrc nXOriginSrc nYOriginSrc nWidthSrc nHeightSrc dwRop SystemParametersInfoW uiAction uiParam pvParam fWinIni SystemParametersInfoA uiAction uiParam pvParam fWinIni
public static final native boolean System Parameters InfoW int ui Action int ui Param HIGHCONTRAST pv Param int f Win Ini public static final native boolean System Parameters InfoA int ui Action int ui Param HIGHCONTRAST pv Param int f Win Ini public static final native boolean System Parameters InfoW int ui Action int ui Param RECT pv Param int f Win Ini  SystemParametersInfoW uiAction uiParam pvParam fWinIni SystemParametersInfoA uiAction uiParam pvParam fWinIni SystemParametersInfoW uiAction uiParam pvParam fWinIni
public static final native boolean System Parameters InfoA int ui Action int ui Param HIGHCONTRAST pv Param int f Win Ini public static final native boolean System Parameters InfoW int ui Action int ui Param RECT pv Param int f Win Ini public static final native boolean System Parameters InfoA int ui Action int ui Param RECT pv Param int f Win Ini  SystemParametersInfoA uiAction uiParam pvParam fWinIni SystemParametersInfoW uiAction uiParam pvParam fWinIni SystemParametersInfoA uiAction uiParam pvParam fWinIni
public static final native boolean System Parameters InfoW int ui Action int ui Param RECT pv Param int f Win Ini public static final native boolean System Parameters InfoA int ui Action int ui Param RECT pv Param int f Win Ini public static final native boolean System Parameters InfoW int ui Action int ui Param NONCLIENTMETRICSW pv Param int f Win Ini  SystemParametersInfoW uiAction uiParam pvParam fWinIni SystemParametersInfoA uiAction uiParam pvParam fWinIni SystemParametersInfoW uiAction uiParam pvParam fWinIni
public static final native boolean System Parameters InfoA int ui Action int ui Param RECT pv Param int f Win Ini public static final native boolean System Parameters InfoW int ui Action int ui Param NONCLIENTMETRICSW pv Param int f Win Ini public static final native boolean System Parameters InfoA int ui Action int ui Param NONCLIENTMETRICSA pv Param int f Win Ini  SystemParametersInfoA uiAction uiParam pvParam fWinIni SystemParametersInfoW uiAction uiParam pvParam fWinIni SystemParametersInfoA uiAction uiParam pvParam fWinIni
public static final native boolean System Parameters InfoW int ui Action int ui Param NONCLIENTMETRICSW pv Param int f Win Ini public static final native boolean System Parameters InfoA int ui Action int ui Param NONCLIENTMETRICSA pv Param int f Win Ini public static final native boolean System Parameters InfoW int ui Action int ui Param int pv Param int f Win Ini  SystemParametersInfoW uiAction uiParam pvParam fWinIni SystemParametersInfoA uiAction uiParam pvParam fWinIni SystemParametersInfoW uiAction uiParam pvParam fWinIni
public static final native boolean System Parameters InfoA int ui Action int ui Param NONCLIENTMETRICSA pv Param int f Win Ini public static final native boolean System Parameters InfoW int ui Action int ui Param int pv Param int f Win Ini public static final native boolean System Parameters InfoA int ui Action int ui Param int pv Param int f Win Ini  SystemParametersInfoA uiAction uiParam pvParam fWinIni SystemParametersInfoW uiAction uiParam pvParam fWinIni SystemParametersInfoA uiAction uiParam pvParam fWinIni
public static final native boolean System Parameters InfoW int ui Action int ui Param int pv Param int f Win Ini public static final native boolean System Parameters InfoA int ui Action int ui Param int pv Param int f Win Ini public static final native int To Ascii int u Virt Key int u Scan Code byte lp Key State short lp Char int u Flags  SystemParametersInfoW uiAction uiParam pvParam fWinIni SystemParametersInfoA uiAction uiParam pvParam fWinIni ToAscii uVirtKey uScanCode lpKeyState lpChar uFlags
public static final native boolean System Parameters InfoA int ui Action int ui Param int pv Param int f Win Ini public static final native int To Ascii int u Virt Key int u Scan Code byte lp Key State short lp Char int u Flags public static final native int To Unicode int w Virt Key int w Scan Code byte lp Key State char pwsz Buff int cch Buff int w Flags  SystemParametersInfoA uiAction uiParam pvParam fWinIni ToAscii uVirtKey uScanCode lpKeyState lpChar uFlags ToUnicode wVirtKey wScanCode lpKeyState pwszBuff cchBuff wFlags
public static final native int To Ascii int u Virt Key int u Scan Code byte lp Key State short lp Char int u Flags public static final native int To Unicode int w Virt Key int w Scan Code byte lp Key State char pwsz Buff int cch Buff int w Flags public static final native boolean Track Mouse Event TRACKMOUSEEVENT lp Event Track  ToAscii uVirtKey uScanCode lpKeyState lpChar uFlags ToUnicode wVirtKey wScanCode lpKeyState pwszBuff cchBuff wFlags TrackMouseEvent lpEventTrack
public static final native int To Unicode int w Virt Key int w Scan Code byte lp Key State char pwsz Buff int cch Buff int w Flags public static final native boolean Track Mouse Event TRACKMOUSEEVENT lp Event Track public static final native boolean Track Popup Menu int h Menu int u Flags int x int y int n Reserved int h Wnd RECT prc Rect  ToUnicode wVirtKey wScanCode lpKeyState pwszBuff cchBuff wFlags TrackMouseEvent lpEventTrack TrackPopupMenu hMenu uFlags nReserved hWnd prcRect
public static final native boolean Track Mouse Event TRACKMOUSEEVENT lp Event Track public static final native boolean Track Popup Menu int h Menu int u Flags int x int y int n Reserved int h Wnd RECT prc Rect public static final native int Translate AcceleratorW int h Wnd int h Acc Table MSG lp Msg  TrackMouseEvent lpEventTrack TrackPopupMenu hMenu uFlags nReserved hWnd prcRect TranslateAcceleratorW hWnd hAccTable lpMsg
public static final native boolean Track Popup Menu int h Menu int u Flags int x int y int n Reserved int h Wnd RECT prc Rect public static final native int Translate AcceleratorW int h Wnd int h Acc Table MSG lp Msg public static final native int Translate AcceleratorA int h Wnd int h Acc Table MSG lp Msg  TrackPopupMenu hMenu uFlags nReserved hWnd prcRect TranslateAcceleratorW hWnd hAccTable lpMsg TranslateAcceleratorA hWnd hAccTable lpMsg
public static final native int Translate AcceleratorW int h Wnd int h Acc Table MSG lp Msg public static final native int Translate AcceleratorA int h Wnd int h Acc Table MSG lp Msg public static final native boolean Translate Charset Info int lp Src int lp Cs int dw Flags  TranslateAcceleratorW hWnd hAccTable lpMsg TranslateAcceleratorA hWnd hAccTable lpMsg TranslateCharsetInfo lpSrc lpCs dwFlags
public static final native int Translate AcceleratorA int h Wnd int h Acc Table MSG lp Msg public static final native boolean Translate Charset Info int lp Src int lp Cs int dw Flags public static final native boolean TranslateMDI Sys Accel int h Wnd Client MSG lp Msg  TranslateAcceleratorA hWnd hAccTable lpMsg TranslateCharsetInfo lpSrc lpCs dwFlags TranslateMDISysAccel hWndClient lpMsg
public static final native boolean Translate Charset Info int lp Src int lp Cs int dw Flags public static final native boolean TranslateMDI Sys Accel int h Wnd Client MSG lp Msg public static final native boolean Translate Message MSG lpmsg  TranslateCharsetInfo lpSrc lpCs dwFlags TranslateMDISysAccel hWndClient lpMsg TranslateMessage
public static final native boolean TranslateMDI Sys Accel int h Wnd Client MSG lp Msg public static final native boolean Translate Message MSG lpmsg public static final native boolean Transparent Image int hdc Dest int DstX int DstY int Dst Cx int Dst Cy int h Src int SrcX int SrcY int Src Cx int Src Cy int Transparent Color public static final native boolean Unhook Windows Hook Ex int hhk  TranslateMDISysAccel hWndClient lpMsg TranslateMessage TransparentImage hdcDest DstCx DstCy hSrc SrcCx SrcCy TransparentColor UnhookWindowsHookEx
public static final native boolean TranslateMDI Sys Accel int h Wnd Client MSG lp Msg public static final native boolean Translate Message MSG lpmsg public static final native boolean Transparent Image int hdc Dest int DstX int DstY int Dst Cx int Dst Cy int h Src int SrcX int SrcY int Src Cx int Src Cy int Transparent Color public static final native boolean Unhook Windows Hook Ex int hhk  TranslateMDISysAccel hWndClient lpMsg TranslateMessage TransparentImage hdcDest DstCx DstCy hSrc SrcCx SrcCy TransparentColor UnhookWindowsHookEx
public static final native boolean Translate Message MSG lpmsg public static final native boolean Transparent Image int hdc Dest int DstX int DstY int Dst Cx int Dst Cy int h Src int SrcX int SrcY int Src Cx int Src Cy int Transparent Color public static final native boolean Unhook Windows Hook Ex int hhk public static final native boolean Unregister ClassW char lp Class Name int h Instance  TranslateMessage TransparentImage hdcDest DstCx DstCy hSrc SrcCx SrcCy TransparentColor UnhookWindowsHookEx UnregisterClassW lpClassName hInstance
public static final native boolean Transparent Image int hdc Dest int DstX int DstY int Dst Cx int Dst Cy int h Src int SrcX int SrcY int Src Cx int Src Cy int Transparent Color public static final native boolean Unhook Windows Hook Ex int hhk public static final native boolean Unregister ClassW char lp Class Name int h Instance public static final native boolean Unregister ClassA byte lp Class Name int h Instance  TransparentImage hdcDest DstCx DstCy hSrc SrcCx SrcCy TransparentColor UnhookWindowsHookEx UnregisterClassW lpClassName hInstance UnregisterClassA lpClassName hInstance
public static final native boolean Unregister ClassW char lp Class Name int h Instance public static final native boolean Unregister ClassA byte lp Class Name int h Instance public static final native boolean Update Window int h Wnd  UnregisterClassW lpClassName hInstance UnregisterClassA lpClassName hInstance UpdateWindow hWnd
public static final native boolean Unregister ClassA byte lp Class Name int h Instance public static final native boolean Update Window int h Wnd public static final native boolean Validate Rect int h Wnd RECT lp Rect  UnregisterClassA lpClassName hInstance UpdateWindow hWnd ValidateRect hWnd lpRect
public static final native boolean Update Window int h Wnd public static final native boolean Validate Rect int h Wnd RECT lp Rect public static final native short Vk Key ScanW short ch  UpdateWindow hWnd ValidateRect hWnd lpRect VkKeyScanW
public static final native boolean Validate Rect int h Wnd RECT lp Rect public static final native short Vk Key ScanW short ch public static final native short Vk Key ScanA short ch  ValidateRect hWnd lpRect VkKeyScanW VkKeyScanA
public static final native short Vk Key ScanW short ch public static final native short Vk Key ScanA short ch public static final native int Vtbl Call int pp Vtbl int fn Number int arg0  VkKeyScanW VkKeyScanA VtblCall ppVtbl fnNumber
public static final native short Vk Key ScanA short ch public static final native int Vtbl Call int pp Vtbl int fn Number int arg0 public static final native boolean Wait Message  VkKeyScanA VtblCall ppVtbl fnNumber WaitMessage
public static final native int Vtbl Call int pp Vtbl int fn Number int arg0 public static final native boolean Wait Message public static final native int Wide Char To Multi Byte int Code Page int dw Flags char lp Wide Char Str int cch Wide Char byte lp Multi Byte Str int cch Multi Byte byte lp Default Char boolean lp Used Default Char  VtblCall ppVtbl fnNumber WaitMessage WideCharToMultiByte CodePage dwFlags lpWideCharStr cchWideChar lpMultiByteStr cchMultiByte lpDefaultChar lpUsedDefaultChar
public static final native boolean Wait Message public static final native int Wide Char To Multi Byte int Code Page int dw Flags char lp Wide Char Str int cch Wide Char byte lp Multi Byte Str int cch Multi Byte byte lp Default Char boolean lp Used Default Char public static final native int Wide Char To Multi Byte int Code Page int dw Flags char lp Wide Char Str int cch Wide Char int lp Multi Byte Str int cch Multi Byte byte lp Default Char boolean lp Used Default Char  WaitMessage WideCharToMultiByte CodePage dwFlags lpWideCharStr cchWideChar lpMultiByteStr cchMultiByte lpDefaultChar lpUsedDefaultChar WideCharToMultiByte CodePage dwFlags lpWideCharStr cchWideChar lpMultiByteStr cchMultiByte lpDefaultChar lpUsedDefaultChar
public static final native int Wide Char To Multi Byte int Code Page int dw Flags char lp Wide Char Str int cch Wide Char byte lp Multi Byte Str int cch Multi Byte byte lp Default Char boolean lp Used Default Char public static final native int Wide Char To Multi Byte int Code Page int dw Flags char lp Wide Char Str int cch Wide Char int lp Multi Byte Str int cch Multi Byte byte lp Default Char boolean lp Used Default Char public static final native int Window FromDC int hDC  WideCharToMultiByte CodePage dwFlags lpWideCharStr cchWideChar lpMultiByteStr cchMultiByte lpDefaultChar lpUsedDefaultChar WideCharToMultiByte CodePage dwFlags lpWideCharStr cchWideChar lpMultiByteStr cchMultiByte lpDefaultChar lpUsedDefaultChar WindowFromDC
public static final native int Wide Char To Multi Byte int Code Page int dw Flags char lp Wide Char Str int cch Wide Char int lp Multi Byte Str int cch Multi Byte byte lp Default Char boolean lp Used Default Char public static final native int Window FromDC int hDC public static final native int Window From Point POINT lp Point  WideCharToMultiByte CodePage dwFlags lpWideCharStr cchWideChar lpMultiByteStr cchMultiByte lpDefaultChar lpUsedDefaultChar WindowFromDC WindowFromPoint lpPoint
public static final native int Window FromDC int hDC public static final native int Window From Point POINT lp Point public static final native int wcslen int string  WindowFromDC WindowFromPoint lpPoint

public TCHAR int code Page int length this code Page code Page if OS Is Unicode chars new char length else bytes new byte byte Count length  codePage codePage codePage IsUnicode byteCount
public TCHAR int code Page char ch boolean terminate this code Page String value Of ch terminate  codePage codePage valueOf
public TCHAR int code Page String string boolean terminate this code Page code Page int char Count string length char chars new char char Count terminate 1 0 string get Chars 0 char Count chars 0 if OS Is Unicode this chars chars else int cp code Page 0 code Page OS CP ACP bytes new byte byte Count char Count 2 terminate 1 0 byte Count OS Wide Char To Multi Byte cp 0 chars char Count bytes byte Count null null if terminate byte Count  codePage codePage codePage charCount charCount getChars charCount IsUnicode codePage codePage CP_ACP byteCount charCount byteCount WideCharToMultiByte charCount byteCount byteCount
public int length if OS Is Unicode return chars length else return byte Count  IsUnicode byteCount
public int strlen if OS Is Unicode for int i 0 i chars length i if chars i 0 return i return chars length else for int i 0 i byte Count i if bytes i 0 return i return byte Count  IsUnicode byteCount byteCount
public int tchar At int index if OS Is Unicode return chars index else int ch bytes index 0xFF if OS IsDBCS Lead Byte byte ch ch ch 8 bytes index 1 0xFF return ch  tcharAt IsUnicode IsDBCSLeadByte
public String to String return to String 0 length  toString toString
public String to String int start int length if OS Is Unicode return new String chars start length else byte bytes this bytes if start 0 bytes new byte length System arraycopy this bytes start bytes 0 length char chars new char length int cp code Page 0 code Page OS CP ACP int char Count OS Multi Byte To Wide Char cp OS MB PRECOMPOSED bytes length chars length return new String chars 0 char Count  toString IsUnicode codePage codePage CP_ACP charCount MultiByteToWideChar MB_PRECOMPOSED charCount

public static void error int code error code 0 
public static void error int code int hresult switch code Illegal Arguments non fatal case ERROR INVALID INTERFACE ADDRESS throw new Illegal Argument Exception ERROR INVALID INTERFACE ADDRESS MSG SWT Errors non fatal case ERROR CANNOT CREATE FILE String msg ERROR CANNOT CREATE FILE MSG if hresult 0 msg result hresult NON NLS 1 throw new SWT Exception code msg case ERROR CANNOT CREATE OBJECT String msg ERROR CANNOT CREATE OBJECT MSG if hresult 0 msg result hresult NON NLS 1 throw new SWT Exception code msg NON NLS 1 case ERROR CANNOT OPEN FILE String msg ERROR CANNOT OPEN FILE MSG if hresult 0 msg result hresult NON NLS 1 throw new SWT Exception code msg case ERROR INTERFACE NOT FOUND String msg ERROR INTERFACE NOT FOUND MSG if hresult 0 msg result hresult NON NLS 1 throw new SWT Exception code msg case ERROR INVALID CLASSID String msg ERROR INVALID CLASSID MSG if hresult 0 msg result hresult NON NLS 1 throw new SWT Exception code msg case ERROR CANNOT ACCESS CLASSFACTORY String msg ERROR CANNOT ACCESS CLASSFACTORY MSG if hresult 0 msg result hresult NON NLS 1 throw new SWT Exception code msg case ERROR CANNOT CREATE LICENSED OBJECT String msg ERROR CANNOT CREATE LICENSED OBJECT MSG if hresult 0 msg result hresult NON NLS 1 throw new SWT Exception code msg case ERROR CANNOT CHANGE VARIANT TYPE String msg ERROR CANNOT CHANGE VARIANT TYPE MSG if hresult 0 msg result hresult NON NLS 1 throw new SWT Exception code msg case ERROR APPLICATION NOT FOUND String msg ERROR APPLICATION NOT FOUND MSG if hresult 0 msg result hresult NON NLS 1 throw new SWT Exception code msg case ERROR ACTION NOT PERFORMED String msg ERROR ACTION NOT PERFORMED MSG if hresult 0 msg result hresult NON NLS 1 throw new SWT Exception code msg OS Failure Limit fatal may occur only on some platforms case ERROR OUT OF MEMORY String msg ERROR ACTION NOT PERFORMED MSG if hresult 0 msg result hresult NON NLS 1 throw new SWT Error code msg Unknown Undefined Error SWT error code  ERROR_INVALID_INTERFACE_ADDRESS IllegalArgumentException ERROR_INVALID_INTERFACE_ADDRESS_MSG ERROR_CANNOT_CREATE_FILE ERROR_CANNOT_CREATE_FILE_MSG SWTException ERROR_CANNOT_CREATE_OBJECT ERROR_CANNOT_CREATE_OBJECT_MSG SWTException ERROR_CANNOT_OPEN_FILE ERROR_CANNOT_OPEN_FILE_MSG SWTException ERROR_INTERFACE_NOT_FOUND ERROR_INTERFACE_NOT_FOUND_MSG SWTException ERROR_INVALID_CLASSID ERROR_INVALID_CLASSID_MSG SWTException ERROR_CANNOT_ACCESS_CLASSFACTORY ERROR_CANNOT_ACCESS_CLASSFACTORY_MSG SWTException ERROR_CANNOT_CREATE_LICENSED_OBJECT ERROR_CANNOT_CREATE_LICENSED_OBJECT_MSG SWTException ERROR_CANNOT_CHANGE_VARIANT_TYPE ERROR_CANNOT_CHANGE_VARIANT_TYPE_MSG SWTException ERROR_APPLICATION_NOT_FOUND ERROR_APPLICATION_NOT_FOUND_MSG SWTException ERROR_ACTION_NOT_PERFORMED ERROR_ACTION_NOT_PERFORMED_MSG SWTException ERROR_OUT_OF_MEMORY ERROR_ACTION_NOT_PERFORMED_MSG SWTError
public static String find ProgramID String extension if extension null SWT error SWT ERROR NULL ARGUMENT if extension length 0 return NON NLS 1 if extension char At 0 extension extension NON NLS 1 Use the character encoding for the default locale TCHAR extension Key new TCHAR 0 extension true String result get Key Value extension Key if result null look for programID Not Insertable TCHAR not Insertable Key new TCHAR 0 result Not Insertable true NON NLS 1 if get Key Exists not Insertable Key return NON NLS 1 look for programID Insertable TCHAR insertable Key new TCHAR 0 result Insertable true NON NLS 1 if get Key Exists insertable Key return result look for programID protocol Std File Editing server TCHAR server Key new TCHAR 0 result protocol Std File Editing server true NON NLS 1 if get Key Exists server Key return result return NON NLS 1  findProgramID ERROR_NULL_ARGUMENT charAt extensionKey getKeyValue extensionKey NotInsertable notInsertableKey NotInsertable getKeyExists notInsertableKey insertableKey getKeyExists insertableKey StdFileEditing serverKey StdFileEditing getKeyExists serverKey
static String get Key Value TCHAR key int phk Result new int 1 if OS Reg Open Key Ex OS HKEY CLASSES ROOT key 0 OS KEY READ phk Result 0 return null String result null int lpcb Data new int 1 if OS Reg Query Value Ex phk Result 0 TCHAR null 0 null null lpcb Data 0 int length lpcb Data 0 TCHAR sizeof if length 0 result else Use the character encoding for the default locale TCHAR lp Data new TCHAR 0 length if OS Reg Query Value Ex phk Result 0 null 0 null lp Data lpcb Data 0 length Math max 0 lp Data length 1 result lp Data to String 0 length if phk Result 0 0 OS Reg Close Key phk Result 0 return result  getKeyValue phkResult RegOpenKeyEx HKEY_CLASSES_ROOT KEY_READ phkResult lpcbData RegQueryValueEx phkResult lpcbData lpcbData lpData RegQueryValueEx phkResult lpData lpcbData lpData lpData toString phkResult RegCloseKey phkResult
private static boolean get Key Exists TCHAR key int phk Result new int 1 if OS Reg Open Key Ex OS HKEY CLASSES ROOT key 0 OS KEY READ phk Result 0 return false if phk Result 0 0 OS Reg Close Key phk Result 0 return true  getKeyExists phkResult RegOpenKeyEx HKEY_CLASSES_ROOT KEY_READ phkResult phkResult RegCloseKey phkResult
Returns true if the specified file has an OLE Storage format Note all empty files regardless of extension will return false param file the file to be checked return true if this file has an OLE Storage format public static boolean is Ole File File file if file null file exists file is Directory return false return COM Stg Is Storage File file get Absolute Path 0 to Char Array COM S OK  isOleFile isDirectory StgIsStorageFile getAbsolutePath toCharArray S_OK

Ole Automation I Dispatch idispatch if idispatch null OLE error OLE ERROR INVALID INTERFACE ADDRESS objI Dispatch idispatch objI Dispatch Add Ref int ppv new int 1 int result objI Dispatch Get Type Info 0 COM LOCALE USER DEFAULT ppv if result OLE S OK objI Type Info new I Type Info ppv 0 objI Type Info Add Ref  OleAutomation IDispatch ERROR_INVALID_INTERFACE_ADDRESS objIDispatch objIDispatch AddRef objIDispatch GetTypeInfo LOCALE_USER_DEFAULT S_OK objITypeInfo ITypeInfo objITypeInfo AddRef
Creates an Ole Automation object for the specified client param client Site the site for the OLE Document or ActiveX Control whose additional functionality you need to access exception SWT Error ul li ERROR INVALID INTERFACE ADDRESS when called with an invalid client site ul public Ole Automation Ole Client Site client Site if client Site null OLE error OLE ERROR INVALID INTERFACE ADDRESS objI Dispatch client Site get Automation Object int ppv new int 1 int result objI Dispatch Get Type Info 0 COM LOCALE USER DEFAULT ppv if result OLE S OK objI Type Info new I Type Info ppv 0 objI Type Info Add Ref  OleAutomation clientSite SWTError ERROR_INVALID_INTERFACE_ADDRESS OleAutomation OleClientSite clientSite clientSite ERROR_INVALID_INTERFACE_ADDRESS objIDispatch clientSite getAutomationObject objIDispatch GetTypeInfo LOCALE_USER_DEFAULT S_OK objITypeInfo ITypeInfo objITypeInfo AddRef
Disposes the automation object p This method releases the I Dispatch interface on the OLE Document or ActiveX Control Do not use the Ole Automation object after it has been disposed public void dispose if objI Dispatch null objI Dispatch Release objI Dispatch null if objI Type Info null objI Type Info Release objI Type Info null  IDispatch OleAutomation objIDispatch objIDispatch objIDispatch objITypeInfo objITypeInfo objITypeInfo
int get Address return objI Dispatch get Address  getAddress objIDispatch getAddress
public String get Help File int disp Id if objI Type Info null return null String file new String 1 int rc objI Type Info Get Documentation disp Id null null null file if rc OLE S OK return file 0 return null  getHelpFile dispId objITypeInfo objITypeInfo GetDocumentation dispId S_OK
public String get Documentation int disp Id if objI Type Info null return null String doc new String 1 int rc objI Type Info Get Documentation disp Id null doc null null if rc OLE S OK return doc 0 return null  getDocumentation dispId objITypeInfo objITypeInfo GetDocumentation dispId S_OK
public Ole Property Description get Property Description int index if objI Type Info null return null int pp Var Desc new int 1 int rc objI Type Info Get Var Desc index pp Var Desc if rc OLE S OK return null VARDESC1 vardesc new VARDESC1 COM Move Memory vardesc pp Var Desc 0 VARDESC1 sizeof Ole Property Description data new Ole Property Description data id vardesc memid data name get Name vardesc memid data type vardesc elemdescVar tdesc vt if data type OLE VT PTR short vt new short 1 COM Move Memory vt vardesc elemdescVar tdesc union 4 2 data type vt 0 data flags vardesc w Var Flags data kind vardesc varkind data description get Documentation vardesc memid data help File get Help File vardesc memid objI Type Info Release Var Desc pp Var Desc 0 return data  OlePropertyDescription getPropertyDescription objITypeInfo ppVarDesc objITypeInfo GetVarDesc ppVarDesc S_OK MoveMemory ppVarDesc OlePropertyDescription OlePropertyDescription getName elemdescVar_tdesc_vt VT_PTR MoveMemory elemdescVar_tdesc_union wVarFlags getDocumentation helpFile getHelpFile objITypeInfo ReleaseVarDesc ppVarDesc
public Ole Function Description get Function Description int index if objI Type Info null return null int pp Func Desc new int 1 int rc objI Type Info Get Func Desc index pp Func Desc if rc OLE S OK return null FUNCDESC1 funcdesc new FUNCDESC1 COM Move Memory funcdesc pp Func Desc 0 FUNCDESC1 sizeof Ole Function Description data new Ole Function Description data id funcdesc memid data optional Arg Count funcdesc c Params Opt data invoke Kind funcdesc invkind data func Kind funcdesc funckind data flags funcdesc w Func Flags data calling Convention funcdesc callconv data documentation get Documentation funcdesc memid data help File get Help File funcdesc memid String names get Names funcdesc memid funcdesc c Params 1 if names length 0 data name names 0 data args new Ole Parameter Description funcdesc c Params for int i 0 i data args length i data args i new Ole Parameter Description if names length i 1 data args i name names i 1 short vt new short 1 COM Move Memory vt funcdesc lprgelemdesc Param i 16 4 2 if vt 0 OLE VT PTR int p Typedesc new int 1 COM Move Memory p Typedesc funcdesc lprgelemdesc Param i 16 4 short vt2 new short 1 COM Move Memory vt2 p Typedesc 0 4 2 vt 0 short vt2 0 COM VT BYREF data args i type vt 0 short w Param Flags new short 1 COM Move Memory w Param Flags funcdesc lprgelemdesc Param i 16 12 2 data args i flags w Param Flags 0 data return Type funcdesc elemdescFunc tdesc vt if data return Type OLE VT PTR short vt new short 1 COM Move Memory vt funcdesc elemdescFunc tdesc union 4 2 data return Type vt 0 objI Type Info Release Func Desc pp Func Desc 0 return data  OleFunctionDescription getFunctionDescription objITypeInfo ppFuncDesc objITypeInfo GetFuncDesc ppFuncDesc S_OK MoveMemory ppFuncDesc OleFunctionDescription OleFunctionDescription optionalArgCount cParamsOpt invokeKind funcKind wFuncFlags callingConvention getDocumentation helpFile getHelpFile getNames cParams OleParameterDescription cParams OleParameterDescription MoveMemory lprgelemdescParam VT_PTR pTypedesc MoveMemory pTypedesc lprgelemdescParam MoveMemory pTypedesc VT_BYREF wParamFlags MoveMemory wParamFlags lprgelemdescParam wParamFlags returnType elemdescFunc_tdesc_vt returnType VT_PTR MoveMemory elemdescFunc_tdesc_union returnType objITypeInfo ReleaseFuncDesc ppFuncDesc
public TYPEATTR get Type Info Attributes if objI Type Info null return null int pp Type Attr new int 1 int rc objI Type Info Get Type Attr pp Type Attr if rc OLE S OK return null TYPEATTR typeattr new TYPEATTR COM Move Memory typeattr pp Type Attr 0 TYPEATTR sizeof objI Type Info Release Type Attr pp Type Attr 0 return typeattr  getTypeInfoAttributes objITypeInfo ppTypeAttr objITypeInfo GetTypeAttr ppTypeAttr S_OK MoveMemory ppTypeAttr objITypeInfo ReleaseTypeAttr ppTypeAttr
public String get Name int disp Id if objI Type Info null return null String name new String 1 int rc objI Type Info Get Documentation disp Id name null null null if rc OLE S OK return name 0 return null  getName dispId objITypeInfo objITypeInfo GetDocumentation dispId S_OK
public String get Names int disp Id int max Size if objI Type Info null return new String 0 String names new String max Size int count new int 1 int rc objI Type Info Get Names disp Id names max Size count if rc OLE S OK String new Names new String count 0 System arraycopy names 0 new Names 0 count 0 return new Names return new String 0  getNames dispId maxSize objITypeInfo maxSize objITypeInfo GetNames dispId maxSize S_OK newNames newNames newNames
Returns the positive integer values I Ds that are associated with the specified names by the I Dispatch implementor If you are trying to get the names of the parameters in a method the first String in the names array must be the name of the method followed by the names of the parameters param names an array of names for which you require the identifiers return positive integer values that are associated with the specified names in the same order as the names where provided or null if the names are unknown public int getI Ds Of Names String names int rgdispid new int names length int result objI Dispatch GetI Ds Of Names new GUID names names length COM LOCALE USER DEFAULT rgdispid if result COM S OK return null return rgdispid  IDs IDispatch getIDsOfNames objIDispatch GetIDsOfNames LOCALE_USER_DEFAULT S_OK
Returns a description of the last error encountered return a description of the last error encountered public String get Last Error return exception Description  getLastError exceptionDescription
Returns the value of the property specified by the disp Id Member param disp Id Member the ID of the property as specified by the IDL of the ActiveX Control the value for the ID can be obtained using Ole Automation getI Ds Of Names return the value of the property specified by the disp Id Member or null public Variant get Property int disp Id Member Variant p Var Result new Variant int result invoke disp Id Member COM DISPATCH PROPERTYGET null null p Var Result return result OLE S OK p Var Result null  dispIdMember dispIdMember OleAutomation getIDsOfNames dispIdMember getProperty dispIdMember pVarResult dispIdMember DISPATCH_PROPERTYGET pVarResult S_OK pVarResult
Returns the value of the property specified by the disp Id Member param disp Id Member the ID of the property as specified by the IDL of the ActiveX Control the value for the ID can be obtained using Ole Automation getI Ds Of Names param rgvarg an array of arguments for the method All arguments are considered to be read only unless the Variant is a By Reference Variant type return the value of the property specified by the disp Id Member or null since 2 0 public Variant get Property int disp Id Member Variant rgvarg Variant p Var Result new Variant int result invoke disp Id Member COM DISPATCH PROPERTYGET rgvarg null p Var Result return result OLE S OK p Var Result null  dispIdMember dispIdMember OleAutomation getIDsOfNames dispIdMember getProperty dispIdMember pVarResult dispIdMember DISPATCH_PROPERTYGET pVarResult S_OK pVarResult
Returns the value of the property specified by the disp Id Member param disp Id Member the ID of the property as specified by the IDL of the ActiveX Control the value for the ID can be obtained using Ole Automation getI Ds Of Names param rgvarg an array of arguments for the method All arguments are considered to be read only unless the Variant is a By Reference Variant type param rgdispid Named Args an array of identifiers for the arguments specified in rgvarg the parameter I Ds must be in the same order as their corresponding values all arguments must have an identifier identifiers can be obtained using Ole Automation getI Ds Of Names return the value of the property specified by the disp Id Member or null since 2 0 public Variant get Property int disp Id Member Variant rgvarg int rgdispid Named Args Variant p Var Result new Variant int result invoke disp Id Member COM DISPATCH PROPERTYGET rgvarg rgdispid Named Args p Var Result return result OLE S OK p Var Result null  dispIdMember dispIdMember OleAutomation getIDsOfNames rgdispidNamedArgs IDs OleAutomation getIDsOfNames dispIdMember getProperty dispIdMember rgdispidNamedArgs pVarResult dispIdMember DISPATCH_PROPERTYGET rgdispidNamedArgs pVarResult S_OK pVarResult
Invokes a method on the OLE Object the method has no parameters param disp Id Member the ID of the method as specified by the IDL of the ActiveX Control the value for the ID can be obtained using Ole Automation getI Ds Of Names return the result of the method or null if the method failed to give result information public Variant invoke int disp Id Member Variant p Var Result new Variant int result invoke disp Id Member COM DISPATCH METHOD null null p Var Result return result COM S OK p Var Result null  dispIdMember OleAutomation getIDsOfNames dispIdMember pVarResult dispIdMember DISPATCH_METHOD pVarResult S_OK pVarResult
Invokes a method on the OLE Object the method has no optional parameters param disp Id Member the ID of the method as specified by the IDL of the ActiveX Control the value for the ID can be obtained using Ole Automation getI Ds Of Names param rgvarg an array of arguments for the method All arguments are considered to be read only unless the Variant is a By Reference Variant type return the result of the method or null if the method failed to give result information public Variant invoke int disp Id Member Variant rgvarg Variant p Var Result new Variant int result invoke disp Id Member COM DISPATCH METHOD rgvarg null p Var Result return result COM S OK p Var Result null  dispIdMember OleAutomation getIDsOfNames dispIdMember pVarResult dispIdMember DISPATCH_METHOD pVarResult S_OK pVarResult
Invokes a method on the OLE Object the method has optional parameters It is not neccessary to specify all the optional parameters only include the parameters for which you are providing values param disp Id Member the ID of the method as specified by the IDL of the ActiveX Control the value for the ID can be obtained using Ole Automation getI Ds Of Names param rgvarg an array of arguments for the method All arguments are considered to be read only unless the Variant is a By Reference Variant type param rgdispid Named Args an array of identifiers for the arguments specified in rgvarg the parameter I Ds must be in the same order as their corresponding values all arguments must have an identifier identifiers can be obtained using Ole Automation getI Ds Of Names return the result of the method or null if the method failed to give result information public Variant invoke int disp Id Member Variant rgvarg int rgdispid Named Args Variant p Var Result new Variant int result invoke disp Id Member COM DISPATCH METHOD rgvarg rgdispid Named Args p Var Result return result COM S OK p Var Result null  dispIdMember OleAutomation getIDsOfNames rgdispidNamedArgs IDs OleAutomation getIDsOfNames dispIdMember rgdispidNamedArgs pVarResult dispIdMember DISPATCH_METHOD rgdispidNamedArgs pVarResult S_OK pVarResult
private int invoke int disp Id Member int w Flags Variant rgvarg int rgdispid Named Args Variant p Var Result get the I Dispatch interface for the control if objI Dispatch null return COM E FAIL create a DISPPARAMS structure for the input parameters DISPPARAMS p Disp Params new DISPPARAMS store arguments in rgvarg if rgvarg null rgvarg length 0 p Disp Params c Args rgvarg length p Disp Params rgvarg OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT Variant sizeof rgvarg length int offset 0 for int i rgvarg length 1 i 0 i rgvarg i get Data p Disp Params rgvarg offset offset Variant sizeof if arguments have ids store the ids in rgdispid Named Args if rgdispid Named Args null rgdispid Named Args length 0 p Disp Params c Named Args rgdispid Named Args length p Disp Params rgdispid Named Args OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT 4 rgdispid Named Args length int offset 0 for int i rgdispid Named Args length i 0 i COM Move Memory p Disp Params rgdispid Named Args offset new int rgdispid Named Args i 1 4 offset 4 invoke the method EXCEPINFO excep Info new EXCEPINFO int p Arg Err new int 1 int p Var Result Address 0 if p Var Result null p Var Result Address OS Global Alloc OS GMEM FIXED OS GMEM ZEROINIT Variant sizeof int result objI Dispatch Invoke disp Id Member new GUID COM LOCALE USER DEFAULT w Flags p Disp Params p Var Result Address excep Info p Arg Err if p Var Result Address 0 p Var Result set Data p Var Result Address COM Variant Clear p Var Result Address OS Global Free p Var Result Address free the Dispparams resources if p Disp Params rgdispid Named Args 0 OS Global Free p Disp Params rgdispid Named Args if p Disp Params rgvarg 0 int offset 0 for int i 0 length rgvarg length i length i COM Variant Clear p Disp Params rgvarg offset offset Variant sizeof OS Global Free p Disp Params rgvarg save error string and cleanup EXCEPINFO manage Excepinfo result excep Info return result  dispIdMember wFlags rgdispidNamedArgs pVarResult IDispatch objIDispatch E_FAIL pDispParams pDispParams cArgs pDispParams GlobalAlloc GMEM_FIXED GMEM_ZEROINIT getData pDispParams rgdispidNamedArgs rgdispidNamedArgs rgdispidNamedArgs pDispParams cNamedArgs rgdispidNamedArgs pDispParams rgdispidNamedArgs GlobalAlloc GMEM_FIXED GMEM_ZEROINIT rgdispidNamedArgs rgdispidNamedArgs MoveMemory pDispParams rgdispidNamedArgs rgdispidNamedArgs excepInfo pArgErr pVarResultAddress pVarResult pVarResultAddress GlobalAlloc GMEM_FIXED GMEM_ZEROINIT objIDispatch dispIdMember LOCALE_USER_DEFAULT wFlags pDispParams pVarResultAddress excepInfo pArgErr pVarResultAddress pVarResult setData pVarResultAddress VariantClear pVarResultAddress GlobalFree pVarResultAddress pDispParams rgdispidNamedArgs GlobalFree pDispParams rgdispidNamedArgs pDispParams VariantClear pDispParams GlobalFree pDispParams manageExcepinfo excepInfo
Invokes a method on the OLE Object the method has no parameters In the early days of OLE the I Dispatch interface was not well defined and some applications mainly Word did not support a return value For these applications call this method instead of calling code public void invoke int disp Id Member code param disp Id Member the ID of the method as specified by the IDL of the ActiveX Control the value for the ID can be obtained using Ole Automation getI Ds Of Names exception SWT Error ul li ERROR ACTION NOT PERFORMED when method invocation fails ul public void invoke No Reply int disp Id Member int result invoke disp Id Member COM DISPATCH METHOD null null null if result COM S OK OLE error OLE ERROR ACTION NOT PERFORMED result  IDispatch dispIdMember dispIdMember OleAutomation getIDsOfNames SWTError ERROR_ACTION_NOT_PERFORMED invokeNoReply dispIdMember dispIdMember DISPATCH_METHOD S_OK ERROR_ACTION_NOT_PERFORMED
Invokes a method on the OLE Object the method has no optional parameters In the early days of OLE the I Dispatch interface was not well defined and some applications mainly Word did not support a return value For these applications call this method instead of calling code public void invoke int disp Id Member Variant rgvarg code param disp Id Member the ID of the method as specified by the IDL of the ActiveX Control the value for the ID can be obtained using Ole Automation getI Ds Of Names param rgvarg an array of arguments for the method All arguments are considered to be read only unless the Variant is a By Reference Variant type exception SWT Error ul li ERROR ACTION NOT PERFORMED when method invocation fails ul public void invoke No Reply int disp Id Member Variant rgvarg int result invoke disp Id Member COM DISPATCH METHOD rgvarg null null if result COM S OK OLE error OLE ERROR ACTION NOT PERFORMED result  IDispatch dispIdMember dispIdMember OleAutomation getIDsOfNames SWTError ERROR_ACTION_NOT_PERFORMED invokeNoReply dispIdMember dispIdMember DISPATCH_METHOD S_OK ERROR_ACTION_NOT_PERFORMED
Invokes a method on the OLE Object the method has optional parameters It is not neccessary to specify all the optional parameters only include the parameters for which you are providing values In the early days of OLE the I Dispatch interface was not well defined and some applications mainly Word did not support a return value For these applications call this method instead of calling code public void invoke int disp Id Member Variant rgvarg int rgdispid Named Args code param disp Id Member the ID of the method as specified by the IDL of the ActiveX Control the value for the ID can be obtained using Ole Automation getI Ds Of Names param rgvarg an array of arguments for the method All arguments are considered to be read only unless the Variant is a By Reference Variant type param rgdispid Named Args an array of identifiers for the arguments specified in rgvarg the parameter I Ds must be in the same order as their corresponding values all arguments must have an identifier identifiers can be obtained using Ole Automation getI Ds Of Names exception SWT Error ul li ERROR ACTION NOT PERFORMED when method invocation fails ul public void invoke No Reply int disp Id Member Variant rgvarg int rgdispid Named Args int result invoke disp Id Member COM DISPATCH METHOD rgvarg rgdispid Named Args null if result COM S OK OLE error OLE ERROR ACTION NOT PERFORMED result  IDispatch dispIdMember rgdispidNamedArgs dispIdMember OleAutomation getIDsOfNames rgdispidNamedArgs IDs OleAutomation getIDsOfNames SWTError ERROR_ACTION_NOT_PERFORMED invokeNoReply dispIdMember rgdispidNamedArgs dispIdMember DISPATCH_METHOD rgdispidNamedArgs S_OK ERROR_ACTION_NOT_PERFORMED
private void manage Excepinfo int h Result EXCEPINFO excep Info if h Result COM S OK exception Description new String No Error NON NLS 1 return extract exception info if h Result COM DISP E EXCEPTION if excep Info bstr Description 0 int size COM Sys String Byte Len excep Info bstr Description char buffer new char size 1 2 COM Move Memory buffer excep Info bstr Description size exception Description new String buffer else exception Description new String OLE Automation Error Exception NON NLS 1 if excep Info w Code 0 exception Description code excep Info w Code NON NLS 1 else if excep Info scode 0 exception Description code excep Info scode NON NLS 1 else exception Description new String OLE Automation Error H Result h Result NON NLS 1 cleanup EXCEPINFO struct if excep Info bstr Description 0 COM Sys Free String excep Info bstr Description if excep Info bstr Help File 0 COM Sys Free String excep Info bstr Help File if excep Info bstr Source 0 COM Sys Free String excep Info bstr Source  manageExcepinfo hResult excepInfo hResult S_OK exceptionDescription hResult DISP_E_EXCEPTION excepInfo bstrDescription SysStringByteLen excepInfo bstrDescription MoveMemory excepInfo bstrDescription exceptionDescription exceptionDescription excepInfo wCode exceptionDescription excepInfo wCode excepInfo exceptionDescription excepInfo exceptionDescription HResult hResult excepInfo bstrDescription SysFreeString excepInfo bstrDescription excepInfo bstrHelpFile SysFreeString excepInfo bstrHelpFile excepInfo bstrSource SysFreeString excepInfo bstrSource
Sets the property specified by the disp Id Member to a new value param disp Id Member the ID of the property as specified by the IDL of the ActiveX Control the value for the ID can be obtained using Ole Automation getI Ds Of Names param rgvarg the new value of the property return true if the operation was successful public boolean set Property int disp Id Member Variant rgvarg Variant rgvarg2 new Variant rgvarg int rgdispid Named Args new int COM DISPID PROPERTYPUT int dw Flags COM DISPATCH PROPERTYPUT if rgvarg get Type COM VT BYREF COM VT BYREF dw Flags COM DISPATCH PROPERTYPUTREF Variant p Var Result new Variant int result invoke disp Id Member dw Flags rgvarg2 rgdispid Named Args p Var Result return result COM S OK  dispIdMember dispIdMember OleAutomation getIDsOfNames setProperty dispIdMember rgdispidNamedArgs DISPID_PROPERTYPUT dwFlags DISPATCH_PROPERTYPUT getType VT_BYREF VT_BYREF dwFlags DISPATCH_PROPERTYPUTREF pVarResult dispIdMember dwFlags rgdispidNamedArgs pVarResult S_OK
Sets the property specified by the disp Id Member to a new value param disp Id Member the ID of the property as specified by the IDL of the ActiveX Control the value for the ID can be obtained using Ole Automation getI Ds Of Names param rgvarg an array of arguments for the method All arguments are considered to be read only unless the Variant is a By Reference Variant type return true if the operation was successful since 2 0 public boolean set Property int disp Id Member Variant rgvarg int rgdispid Named Args new int COM DISPID PROPERTYPUT int dw Flags COM DISPATCH PROPERTYPUT for int i 0 i rgvarg length i if rgvarg i get Type COM VT BYREF COM VT BYREF dw Flags COM DISPATCH PROPERTYPUTREF Variant p Var Result new Variant int result invoke disp Id Member dw Flags rgvarg rgdispid Named Args p Var Result return result COM S OK  dispIdMember dispIdMember OleAutomation getIDsOfNames setProperty dispIdMember rgdispidNamedArgs DISPID_PROPERTYPUT dwFlags DISPATCH_PROPERTYPUT getType VT_BYREF VT_BYREF dwFlags DISPATCH_PROPERTYPUTREF pVarResult dispIdMember dwFlags rgdispidNamedArgs pVarResult S_OK

listener new Listener public void handle Event Event e switch e type case SWT Resize case SWT Move on Resize e break case SWT Dispose on Dispose e break case SWT Focus In on Focus In e break case SWT Focus Out on Focus Out e break case SWT Paint on Paint e break case SWT Traverse on Traverse e break case SWT Key Down required for traversal break default OLE error SWT ERROR NOT IMPLEMENTED  handleEvent onResize onDispose FocusIn onFocusIn FocusOut onFocusOut onPaint onTraverse KeyDown ERROR_NOT_IMPLEMENTED
protected Ole Client Site Composite parent int style NOTE this constructor should never be used by itself because it does not create an Ole Object super parent style createCOM Interfaces install the Ole Frame for this Client Site while parent null if parent instanceof Ole Frame frame Ole Frame parent break parent parent get Parent if frame null OLE error SWT ERROR INVALID ARGUMENT frame Add Ref aspect COM DVASPECT CONTENT type COM OLEEMBEDDED is Static false listener new Listener public void handle Event Event e switch e type case SWT Resize case SWT Move on Resize e break case SWT Dispose on Dispose e break case SWT Focus In on Focus In e break case SWT Focus Out on Focus Out e break case SWT Paint on Paint e break case SWT Traverse on Traverse e break case SWT Key Down required for traversal break default OLE error SWT ERROR NOT IMPLEMENTED frame add Listener SWT Resize listener frame add Listener SWT Move listener add Listener SWT Dispose listener add Listener SWT Focus In listener add Listener SWT Focus Out listener add Listener SWT Paint listener add Listener SWT Traverse listener add Listener SWT Key Down listener  OleClientSite createCOMInterfaces OleFrame OleFrame getParent ERROR_INVALID_ARGUMENT AddRef DVASPECT_CONTENT isStatic handleEvent onResize onDispose FocusIn onFocusIn FocusOut onFocusOut onPaint onTraverse KeyDown ERROR_NOT_IMPLEMENTED addListener addListener addListener addListener FocusIn addListener FocusOut addListener addListener addListener KeyDown
Create an Ole Client Site child widget using the OLE Document type associated with the specified file The OLE Document type is determined either through header information in the file or through a Registry entry for the file extension Use style bits to select a particular look or set of properties param parent a composite widget must be an Ole Frame param style the bitwise OR ing of widget styles param file the file that is to be opened in this OLE Document exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li ERROR ERROR NULL ARGUMENT when the parent is null ul exception SWT Error ul li ERROR CANNOT CREATE OBJECT when failed to create OLE Object li ERROR INVALID ARGUMENT when the parent is not an Ole Frame li ERROR CANNOT OPEN FILE when failed to open file li ERROR INTERFACES NOT INITIALIZED when unable to create callbacks for OLE Interfaces ul public Ole Client Site Composite parent int style File file this parent style try if file null file is Directory file exists OLE error OLE ERROR INVALID ARGUMENT Is there an associated CLSID app Clsid new GUID char file Name file get Absolute Path 0 to Char Array int result COM Get Class File file Name app Clsid if result COM S OK OLE error OLE ERROR INVALID CLASSID result associated CLSID may not be installed on this machine if get ProgramID null OLE error OLE ERROR INVALID CLASSID result Open a temporary storage object temp Storage create Temp Storage Create ole object with storage object int address new int 1 result COM Ole Create From File app Clsid file Name COM IIDI Unknown COM OLERENDER DRAW null 0 temp Storage get Address address if result COM S OK OLE error OLE ERROR CANNOT CREATE OBJECT result objI Unknown new I Unknown address 0 Init sinks add Object References if COM Ole Run objI Unknown get Address OLE S OK state STATE RUNNING catch SWT Exception e dispose disposeCOM Interfaces throw e  OleClientSite OleFrame SWTError ERROR_THREAD_INVALID_ACCESS ERROR_ERROR_NULL_ARGUMENT SWTError ERROR_CANNOT_CREATE_OBJECT ERROR_INVALID_ARGUMENT OleFrame ERROR_CANNOT_OPEN_FILE ERROR_INTERFACES_NOT_INITIALIZED OleClientSite isDirectory ERROR_INVALID_ARGUMENT appClsid fileName getAbsolutePath toCharArray GetClassFile fileName appClsid S_OK ERROR_INVALID_CLASSID getProgramID ERROR_INVALID_CLASSID tempStorage createTempStorage OleCreateFromFile appClsid fileName IIDIUnknown OLERENDER_DRAW tempStorage getAddress S_OK ERROR_CANNOT_CREATE_OBJECT objIUnknown IUnknown addObjectReferences OleRun objIUnknown getAddress S_OK STATE_RUNNING SWTException disposeCOMInterfaces
Create an Ole Client Site child widget to edit a blank document using the specified OLE Document application Use style bits to select a particular look or set of properties param parent a composite widget must be an Ole Frame param style the bitwise OR ing of widget styles param progID the unique program identifier of am OLE Document application the value of the ProgID key or the value of the Version Independent ProgID key specified in the registry for the desired OLE Document for example the Version Independent ProgID for Word is Word Document exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li ERROR ERROR NULL ARGUMENT when the parent is null li ERROR INVALID CLASSID when the prog Id does not map to a registered CLSID li ERROR INVALID ARGUMENT when the parent is not an Ole Frame li ERROR CANNOT CREATE OBJECT when failed to create OLE Object li ERROR INTERFACES NOT INITIALIZED when unable to create callbacks for OLE Interfaces ul public Ole Client Site Composite parent int style String prog Id this parent style try app Clsid get ClassID prog Id if app Clsid null OLE error OLE ERROR INVALID CLASSID Open a temporary storage object temp Storage create Temp Storage Create ole object with storage object int address new int 1 int result COM Ole Create app Clsid COM IIDI Unknown COM OLERENDER DRAW null 0 temp Storage get Address address if result COM S OK OLE error OLE ERROR CANNOT CREATE OBJECT result objI Unknown new I Unknown address 0 Init sinks add Object References if COM Ole Run objI Unknown get Address OLE S OK state STATE RUNNING catch SWT Exception e dispose disposeCOM Interfaces throw e  OleClientSite OleFrame VersionIndependentProgID VersionIndependentProgID SWTError ERROR_THREAD_INVALID_ACCESS ERROR_ERROR_NULL_ARGUMENT ERROR_INVALID_CLASSID progId ERROR_INVALID_ARGUMENT OleFrame ERROR_CANNOT_CREATE_OBJECT ERROR_INTERFACES_NOT_INITIALIZED OleClientSite progId appClsid getClassID progId appClsid ERROR_INVALID_CLASSID tempStorage createTempStorage OleCreate appClsid IIDIUnknown OLERENDER_DRAW tempStorage getAddress S_OK ERROR_CANNOT_CREATE_OBJECT objIUnknown IUnknown addObjectReferences OleRun objIUnknown getAddress S_OK STATE_RUNNING SWTException disposeCOMInterfaces
Create an Ole Client Site child widget to edit the specified file using the specified OLE Document application Use style bits to select a particular look or set of properties p b IMPORTANT b This method is em not em part of the public API for code Ole Client Site code It is marked public only so that it can be shared within the packages provided by SWT It is not available on all platforms and should never be called from application code p param parent a composite widget must be an Ole Frame param style the bitwise OR ing of widget styles param progID the unique program identifier of am OLE Document application the value of the ProgID key or the value of the Version Independent ProgID key specified in the registry for the desired OLE Document for example the Version Independent ProgID for Word is Word Document param file the file that is to be opened in this OLE Document exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li ERROR ERROR NULL ARGUMENT when the parent is null li ERROR INVALID CLASSID when the prog Id does not map to a registered CLSID li ERROR CANNOT CREATE OBJECT when failed to create OLE Object li ERROR CANNOT OPEN FILE when failed to open file li ERROR INVALID ARGUMENT when the parent is not an Ole Frame li ERROR INTERFACES NOT INITIALIZED when unable to create callbacks for OLE Interfaces ul public Ole Client Site Composite parent int style String prog Id File file this parent style try if file null file is Directory file exists OLE error OLE ERROR INVALID ARGUMENT app Clsid get ClassID prog Id Are we opening this file with the preferred OLE object char file Name file get Absolute Path 0 to Char Array GUID file Clsid new GUID COM Get Class File file Name file Clsid if COM Is EqualGUID app Clsid file Clsid Using the same application that created file therefore use default mechanism temp Storage create Temp Storage Create ole object with storage object int address new int 1 int result COM Ole Create From File app Clsid file Name COM IIDI Unknown COM OLERENDER DRAW null 0 temp Storage get Address address if result COM S OK OLE error OLE ERROR CANNOT CREATE OBJECT result objI Unknown new I Unknown address 0 else Not using the same application that created file therefore copy from original file to a new storage file I Storage storage null if COM Stg Is Storage File file Name COM S OK int address new int 1 int mode COM STGM READ COM STGM TRANSACTED COM STGM SHARE EXCLUSIVE int result COM Stg Open Storage file Name 0 mode 0 0 address Does an Add Ref if successful if result COM S OK OLE error OLE ERROR CANNOT OPEN FILE result storage new I Storage address 0 else Original file is not a Storage file so copy contents to a stream in a new storage file int address new int 1 int mode COM STGM READWRITE COM STGM DIRECT COM STGM SHARE EXCLUSIVE COM STGM CREATE int result COM Stg Create Docfile null mode COM STGM DELETEONRELEASE 0 address Increments ref count if successful if result COM S OK OLE error OLE ERROR CANNOT OPEN FILE result storage new I Storage address 0 Create a stream on the storage object Word does not follow the standard and does not use CONTENTS as the name of its primary stream String stream Name CONTENTS NON NLS 1 GUID wordGUID get ClassID WORDPROGID if COM Is EqualGUID app Clsid wordGUID stream Name Word Document NON NLS 1 address new int 1 result storage Create Stream stream Name mode 0 0 address Increments ref count if successful if result COM S OK storage Release OLE error OLE ERROR CANNOT OPEN FILE result I Stream stream new I Stream address 0 try Copy over data in file to named stream File Input Stream file Input new File Input Stream file int increment 1024 4 byte buffer new byte increment int count 0 while count file Input read buffer 0 int pv COM Co Task Mem Alloc count OS Move Memory pv buffer count result stream Write pv count null COM Co Task Mem Free pv if result COM S OK file Input close stream Release storage Release OLE error OLE ERROR CANNOT OPEN FILE result file Input close stream Commit COM STGC DEFAULT stream Release catch IO Exception err stream Release storage Release OLE error OLE ERROR CANNOT OPEN FILE Open a temporary storage object temp Storage create Temp Storage Copy over contents of file int result storage Copy To 0 null null temp Storage get Address storage Release if result COM S OK OLE error OLE ERROR CANNOT OPEN FILE result create ole client int ppv new int 1 result COM Co Create Instance app Clsid 0 COM CLSCTX INPROC HANDLER COM CLSCTX INPROC SERVER COM IIDI Unknown ppv if result COM S OK OLE error OLE ERROR CANNOT CREATE OBJECT result objI Unknown new I Unknown ppv 0 get the persistant storage of the ole client ppv new int 1 result objI Unknown Query Interface COM IIDI Persist Storage ppv if result COM S OK OLE error OLE ERROR CANNOT CREATE OBJECT result I Persist Storage i Persist Storage new I Persist Storage ppv 0 load the contents of the file into the ole client site result i Persist Storage Load temp Storage get Address i Persist Storage Release if result COM S OK OLE error OLE ERROR CANNOT CREATE OBJECT result Init sinks add Object References if COM Ole Run objI Unknown get Address OLE S OK state STATE RUNNING catch SWT Exception e dispose disposeCOM Interfaces throw e  OleClientSite OleClientSite OleFrame VersionIndependentProgID VersionIndependentProgID SWTError ERROR_THREAD_INVALID_ACCESS ERROR_ERROR_NULL_ARGUMENT ERROR_INVALID_CLASSID progId ERROR_CANNOT_CREATE_OBJECT ERROR_CANNOT_OPEN_FILE ERROR_INVALID_ARGUMENT OleFrame ERROR_INTERFACES_NOT_INITIALIZED OleClientSite progId isDirectory ERROR_INVALID_ARGUMENT appClsid getClassID progId fileName getAbsolutePath toCharArray fileClsid GetClassFile fileName fileClsid IsEqualGUID appClsid fileClsid tempStorage createTempStorage OleCreateFromFile appClsid fileName IIDIUnknown OLERENDER_DRAW tempStorage getAddress S_OK ERROR_CANNOT_CREATE_OBJECT objIUnknown IUnknown IStorage StgIsStorageFile fileName S_OK STGM_READ STGM_TRANSACTED STGM_SHARE_EXCLUSIVE StgOpenStorage fileName AddRef S_OK ERROR_CANNOT_OPEN_FILE IStorage STGM_READWRITE STGM_DIRECT STGM_SHARE_EXCLUSIVE STGM_CREATE StgCreateDocfile STGM_DELETEONRELEASE S_OK ERROR_CANNOT_OPEN_FILE IStorage streamName getClassID IsEqualGUID appClsid streamName WordDocument CreateStream streamName S_OK ERROR_CANNOT_OPEN_FILE IStream IStream FileInputStream fileInput FileInputStream fileInput CoTaskMemAlloc MoveMemory CoTaskMemFree S_OK fileInput ERROR_CANNOT_OPEN_FILE fileInput STGC_DEFAULT IOException ERROR_CANNOT_OPEN_FILE tempStorage createTempStorage CopyTo tempStorage getAddress S_OK ERROR_CANNOT_OPEN_FILE CoCreateInstance appClsid CLSCTX_INPROC_HANDLER CLSCTX_INPROC_SERVER IIDIUnknown S_OK ERROR_CANNOT_CREATE_OBJECT objIUnknown IUnknown objIUnknown QueryInterface IIDIPersistStorage S_OK ERROR_CANNOT_CREATE_OBJECT IPersistStorage iPersistStorage IPersistStorage iPersistStorage tempStorage getAddress iPersistStorage S_OK ERROR_CANNOT_CREATE_OBJECT addObjectReferences OleRun objIUnknown getAddress S_OK STATE_RUNNING SWTException disposeCOMInterfaces
protected void add Object References int ppv Object new int 1 if objI Unknown Query Interface COM IIDI Persist ppv Object COM S OK I Persist objI Persist new I Persist ppv Object 0 GUID tempid new GUID if objI Persist Get ClassID tempid COM S OK obj Clsid tempid objI Persist Release ppv Object new int 1 int result objI Unknown Query Interface COM IIDI View Object2 ppv Object if result COM S OK OLE error OLE ERROR INTERFACE NOT FOUND result objI View Object2 new I View Object2 ppv Object 0 objI View Object2 Set Advise aspect 0 i Advise Sink get Address ppv Object new int 1 result objI Unknown Query Interface COM IIDI Ole Object ppv Object if result COM S OK OLE error OLE ERROR INTERFACE NOT FOUND result objI Ole Object new I Ole Object ppv Object 0 objI Ole Object Set Client Site i Ole Client Site get Address int pdw Connection new int 1 objI Ole Object Advise i Advise Sink get Address pdw Connection objI Ole Object Set Host Names main main NON NLS 1 NON NLS 2 Notify the control object that it is embedded in an OLE container COM Ole Set Contained Object objI Unknown get Address true Is OLE object linked or embedded ppv Object new int 1 if objI Unknown Query Interface COM IIDI Ole Link ppv Object COM S OK I Ole Link objI Ole Link new I Ole Link ppv Object 0 int ppmk new int 1 if objI Ole Link Get Source Moniker ppmk COM S OK I Moniker objI Moniker new I Moniker ppmk 0 objI Moniker Release type COM OLELINKED objI Ole Link Bind If Running else is Static true objI Ole Link Release  addObjectReferences ppvObject objIUnknown QueryInterface IIDIPersist ppvObject S_OK IPersist objIPersist IPersist ppvObject objIPersist GetClassID S_OK objClsid objIPersist ppvObject objIUnknown QueryInterface IIDIViewObject2 ppvObject S_OK ERROR_INTERFACE_NOT_FOUND objIViewObject2 IViewObject2 ppvObject objIViewObject2 SetAdvise iAdviseSink getAddress ppvObject objIUnknown QueryInterface IIDIOleObject ppvObject S_OK ERROR_INTERFACE_NOT_FOUND objIOleObject IOleObject ppvObject objIOleObject SetClientSite iOleClientSite getAddress pdwConnection objIOleObject iAdviseSink getAddress pdwConnection objIOleObject SetHostNames OleSetContainedObject objIUnknown getAddress ppvObject objIUnknown QueryInterface IIDIOleLink ppvObject S_OK IOleLink objIOleLink IOleLink ppvObject objIOleLink GetSourceMoniker S_OK IMoniker objIMoniker IMoniker objIMoniker objIOleLink BindIfRunning isStatic objIOleLink
protected int Add Ref ref Count return ref Count  AddRef refCount refCount
private int Can In Place Activate if aspect COM DVASPECT CONTENT type COM OLEEMBEDDED return COM S OK return COM S FALSE  CanInPlaceActivate DVASPECT_CONTENT S_OK S_FALSE
return COM S FALSE private int Context Sensitive Help int f Enter Mode return COM S OK  S_FALSE ContextSensitiveHelp fEnterMode S_OK
i Unknown new COM Object new int 2 0 0 public int method0 int args return Query Interface args 0 args 1  iUnknown COMObject QueryInterface
i Unknown new COM Object new int 2 0 0 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iUnknown COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
i Ole Client Site new COM Object new int 2 0 0 0 3 1 0 1 0 public int method0 int args return Query Interface args 0 args 1  iOleClientSite COMObject QueryInterface
i Ole Client Site new COM Object new int 2 0 0 0 3 1 0 1 0 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iOleClientSite COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Save Object  AddRef SaveObject
public int method3 int args return Save Object method4 Get Moniker not implemented public int method5 int args return Get Container args 0  SaveObject GetMoniker GetContainer
method4 Get Moniker not implemented public int method5 int args return Get Container args 0 public int method6 int args return Show Object  GetMoniker GetContainer ShowObject
public int method5 int args return Get Container args 0 public int method6 int args return Show Object public int method7 int args return On Show Window args 0  GetContainer ShowObject OnShowWindow
i Advise Sink new COM Object new int 2 0 0 2 2 1 0 0 public int method0 int args return Query Interface args 0 args 1  iAdviseSink COMObject QueryInterface
i Advise Sink new COM Object new int 2 0 0 2 2 1 0 0 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iAdviseSink COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return On Data Change args 0 args 1  AddRef OnDataChange
public int method2 int args return Release public int method3 int args return On Data Change args 0 args 1 public int method4 int args return On View Change args 0 args 1  OnDataChange OnViewChange
public int method4 int args return On View Change args 0 args 1 method5 On Rename not implemented public int method6 int args On Save return 0  OnViewChange OnRename OnSave
method5 On Rename not implemented public int method6 int args On Save return 0 public int method7 int args return On Close  OnRename OnSave OnClose
i Ole In Place Site new COM Object new int 2 0 0 1 1 0 0 0 5 1 1 0 0 0 1 public int method0 int args return Query Interface args 0 args 1  iOleInPlaceSite COMObject QueryInterface
i Ole In Place Site new COM Object new int 2 0 0 1 1 0 0 0 5 1 1 0 0 0 1 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iOleInPlaceSite COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Get Window args 0  AddRef GetWindow
public int method2 int args return Release public int method3 int args return Get Window args 0 public int method4 int args return Context Sensitive Help args 0  GetWindow ContextSensitiveHelp
public int method3 int args return Get Window args 0 public int method4 int args return Context Sensitive Help args 0 public int method5 int args return Can In Place Activate  GetWindow ContextSensitiveHelp CanInPlaceActivate
public int method4 int args return Context Sensitive Help args 0 public int method5 int args return Can In Place Activate public int method6 int args return On In Place Activate  ContextSensitiveHelp CanInPlaceActivate OnInPlaceActivate
public int method5 int args return Can In Place Activate public int method6 int args return On In Place Activate public int method7 int args return OnUI Activate  CanInPlaceActivate OnInPlaceActivate OnUIActivate
public int method6 int args return On In Place Activate public int method7 int args return OnUI Activate public int method8 int args return Get Window Context args 0 args 1 args 2 args 3 args 4  OnInPlaceActivate OnUIActivate GetWindowContext
public int method7 int args return OnUI Activate public int method8 int args return Get Window Context args 0 args 1 args 2 args 3 args 4 public int method9 int args return Scroll args 0  OnUIActivate GetWindowContext
public int method8 int args return Get Window Context args 0 args 1 args 2 args 3 args 4 public int method9 int args return Scroll args 0 public int method10 int args return OnUI Deactivate args 0  GetWindowContext OnUIDeactivate
public int method9 int args return Scroll args 0 public int method10 int args return OnUI Deactivate args 0 public int method11 int args return On In Place Deactivate  OnUIDeactivate OnInPlaceDeactivate
method12 Discard Undo State not implemented method13 Deactivate And Undo Change not implemented public int method14 int args return On Pos Rect Change args 0  DiscardUndoState DeactivateAndUndoChange OnPosRectChange
i Ole Document Site new COM Object new int 2 0 0 1 public int method0 int args return Query Interface args 0 args 1  iOleDocumentSite COMObject QueryInterface
i Ole Document Site new COM Object new int 2 0 0 1 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iOleDocumentSite COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Activate Me args 0  AddRef ActivateMe
protected void createCOM Interfaces i Unknown new COM Object new int 2 0 0 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release i Ole Client Site new COM Object new int 2 0 0 0 3 1 0 1 0 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Save Object method4 Get Moniker not implemented public int method5 int args return Get Container args 0 public int method6 int args return Show Object public int method7 int args return On Show Window args 0 method8 Request New Object Layout not implemented i Advise Sink new COM Object new int 2 0 0 2 2 1 0 0 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return On Data Change args 0 args 1 public int method4 int args return On View Change args 0 args 1 method5 On Rename not implemented public int method6 int args On Save return 0 public int method7 int args return On Close i Ole In Place Site new COM Object new int 2 0 0 1 1 0 0 0 5 1 1 0 0 0 1 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Get Window args 0 public int method4 int args return Context Sensitive Help args 0 public int method5 int args return Can In Place Activate public int method6 int args return On In Place Activate public int method7 int args return OnUI Activate public int method8 int args return Get Window Context args 0 args 1 args 2 args 3 args 4 public int method9 int args return Scroll args 0 public int method10 int args return OnUI Deactivate args 0 public int method11 int args return On In Place Deactivate method12 Discard Undo State not implemented method13 Deactivate And Undo Change not implemented public int method14 int args return On Pos Rect Change args 0 i Ole Document Site new COM Object new int 2 0 0 1 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Activate Me args 0  createCOMInterfaces iUnknown COMObject QueryInterface AddRef iOleClientSite COMObject QueryInterface AddRef SaveObject GetMoniker GetContainer ShowObject OnShowWindow RequestNewObjectLayout iAdviseSink COMObject QueryInterface AddRef OnDataChange OnViewChange OnRename OnSave OnClose iOleInPlaceSite COMObject QueryInterface AddRef GetWindow ContextSensitiveHelp CanInPlaceActivate OnInPlaceActivate OnUIActivate GetWindowContext OnUIDeactivate OnInPlaceDeactivate DiscardUndoState DeactivateAndUndoChange OnPosRectChange iOleDocumentSite COMObject QueryInterface AddRef ActivateMe
protected I Storage create Temp Storage int temp Storage new int 1 int grf Mode COM STGM READWRITE COM STGM SHARE EXCLUSIVE COM STGM DELETEONRELEASE int result COM Stg Create Docfile null grf Mode 0 temp Storage if result COM S OK OLE error OLE ERROR CANNOT CREATE FILE result return new I Storage temp Storage 0  IStorage createTempStorage tempStorage grfMode STGM_READWRITE STGM_SHARE_EXCLUSIVE STGM_DELETEONRELEASE StgCreateDocfile grfMode tempStorage S_OK ERROR_CANNOT_CREATE_FILE IStorage tempStorage
Deactivates an active in place object and discards the object s undo state public void deactivate In Place Client if objI Ole In Place Object null objI Ole In Place Object In Place Deactivate  deactivateInPlaceClient objIOleInPlaceObject objIOleInPlaceObject InPlaceDeactivate
private void delete Temp Storage Destroy this item s contents in the temp root I Storage if temp Storage null temp Storage Release temp Storage null  deleteTempStorage IStorage tempStorage tempStorage tempStorage
protected void disposeCOM Interfaces if i Unknown null i Unknown dispose i Unknown null if i Ole Client Site null i Ole Client Site dispose i Ole Client Site null if i Advise Sink null i Advise Sink dispose i Advise Sink null if i Ole In Place Site null i Ole In Place Site dispose i Ole In Place Site null if i Ole Document Site null i Ole Document Site dispose i Ole Document Site null  disposeCOMInterfaces iUnknown iUnknown iUnknown iOleClientSite iOleClientSite iOleClientSite iAdviseSink iAdviseSink iAdviseSink iOleInPlaceSite iOleInPlaceSite iOleInPlaceSite iOleDocumentSite iOleDocumentSite iOleDocumentSite
Requests that the OLE Document or ActiveX Control perform an action actions are almost always changes to the activation state param verb the operation that is requested This is one of the OLE OLEIVERB  values return an HRESULT value indicating the success of the operation request OLE S OK indicates success public int do Verb int verb Not all OLE clients for example Power Point can be set into the running state in the constructor The fix is to ensure that the client is in the running state before invoking any verb on it if state STATE NONE if COM Ole Run objI Unknown get Address OLE S OK state STATE RUNNING if state STATE NONE is Static return COM E FAIL See PR 1FV9RZW int result objI Ole Object Do Verb verb null i Ole Client Site get Address 0 handle null if state STATE RUNNING in Init update Storage in Init false return result  OLEIVERB_ S_OK doVerb PowerPoint STATE_NONE OleRun objIUnknown getAddress S_OK STATE_RUNNING STATE_NONE isStatic E_FAIL objIOleObject DoVerb iOleClientSite getAddress STATE_RUNNING inInit updateStorage inInit
Asks the OLE Document or ActiveX Control to execute a command from a standard list of commands The OLE Document or ActiveX Control must support the I Ole Command Target interface The OLE Document or ActiveX Control does not have to support all the commands in the standard list To check if a command is supported you can call query Status with the cmdID param cmdID the ID of a command these are the OLE OLECMDID  values a small set of common commands param options the optional flags these are the OLE OLECMDEXECOPT  values param in the argument for the command param out the return value of the command return an HRESULT value OLE S OK is returned if successful public int exec int cmdID int options Variant in Variant out if objI Ole Command Target null int address new int 1 if objI Unknown Query Interface COM IIDI Ole Command Target address COM S OK return OLE ERROR INTERFACE NOT FOUND objI Ole Command Target new I Ole Command Target address 0 int in Address 0 if in null in Address OS Global Alloc OS GMEM FIXED OS GMEM ZEROINIT Variant sizeof in get Data in Address int out Address 0 if out null out Address OS Global Alloc OS GMEM FIXED OS GMEM ZEROINIT Variant sizeof out get Data out Address int result objI Ole Command Target Exec null cmdID options in Address out Address if in Address 0 COM Variant Clear in Address OS Global Free in Address if out Address 0 out set Data out Address COM Variant Clear out Address OS Global Free out Address return result  IOleCommandTarget queryStatus OLECMDID_ OLECMDEXECOPT_ S_OK objIOleCommandTarget objIUnknown QueryInterface IIDIOleCommandTarget S_OK ERROR_INTERFACE_NOT_FOUND objIOleCommandTarget IOleCommandTarget inAddress inAddress GlobalAlloc GMEM_FIXED GMEM_ZEROINIT getData inAddress outAddress outAddress GlobalAlloc GMEM_FIXED GMEM_ZEROINIT getData outAddress objIOleCommandTarget inAddress outAddress inAddress VariantClear inAddress GlobalFree inAddress outAddress setData outAddress VariantClear outAddress GlobalFree outAddress
I Dispatch get Automation Object int ppv Object new int 1 if objI Unknown Query Interface COM IIDI Dispatch ppv Object COM S OK return null return new I Dispatch ppv Object 0  IDispatch getAutomationObject ppvObject objIUnknown QueryInterface IIDIDispatch ppvObject S_OK IDispatch ppvObject
protected GUID get ClassID String client Name create a GUID struct to hold the result GUID guid new GUID create a null terminated array of char char buffer null if client Name null int count client Name length buffer new char count 1 client Name get Chars 0 count buffer 0 if COM CLSID From ProgID buffer guid COM S OK int result COM CLSID From String buffer guid if result COM S OK OLE error OLE ERROR INVALID CLASSID result return guid  getClassID clientName clientName clientName clientName getChars CLSIDFromProgID S_OK CLSIDFromString S_OK ERROR_INVALID_CLASSID
private int Get Container int pp Container Simple containers that do not support links to their embedded objects probably do not need to implement this method Instead they can return E NOINTERFACE and set pp Container to NULL if pp Container 0 COM Move Memory pp Container new int 0 4 return COM E NOINTERFACE  GetContainer ppContainer E_NOINTERFACE ppContainer ppContainer MoveMemory ppContainer E_NOINTERFACE
private SIZE get Extent SIZE sizel new SIZE get the current size of the embedded OLE Natives object if objI Ole Object null if objI View Object2 null COM Ole Is Running objI Ole Object get Address objI View Object2 Get Extent aspect 1 null sizel else objI Ole Object Get Extent aspect sizel return x Form Himetric To Pixels sizel  getExtent OLENatives objIOleObject objIViewObject2 OleIsRunning objIOleObject getAddress objIViewObject2 GetExtent objIOleObject GetExtent xFormHimetricToPixels
return x Form Himetric To Pixels sizel public Rectangle get Indent return new Rectangle indent left indent right indent top indent bottom  xFormHimetricToPixels getIndent
Returns the program ID of the OLE Document or ActiveX Control return the program ID of the OLE Document or ActiveX Control public String get ProgramID if app Clsid null int lplpsz ProgID new int 1 if COM ProgID FromCLSID app Clsid lplpsz ProgID COM S OK int h Mem lplpsz ProgID 0 int length OS Global Size h Mem int ptr OS Global Lock h Mem char buffer new char length COM Move Memory buffer ptr length OS Global Unlock h Mem OS Global Free h Mem String result new String buffer remove null terminator int index result index Of 0 return result substring 0 index return null  getProgramID appClsid lplpszProgID ProgIDFromCLSID appClsid lplpszProgID S_OK hMem lplpszProgID GlobalSize hMem GlobalLock hMem MoveMemory GlobalUnlock hMem GlobalFree hMem indexOf
int Activate Me int p View To Activate if p View To Activate 0 int ppv Object new int 1 if objI Unknown Query Interface COM IIDI Ole Document ppv Object COM S OK return COM E FAIL I Ole Document obj Ole Document new I Ole Document ppv Object 0 if obj Ole Document Create View i Ole In Place Site get Address 0 0 ppv Object COM S OK return COM E FAIL obj Ole Document Release obj Document View new I Ole Document View ppv Object 0 else obj Document View new I Ole Document View p View To Activate obj Document View Add Ref obj Document View Set In Place Site i Ole In Place Site get Address obj Document View UI Activate 1 TRUE RECT rect get Rect obj Document View Set Rect rect obj Document View Show 1 TRUE return COM S OK  ActivateMe pViewToActivate pViewToActivate ppvObject objIUnknown QueryInterface IIDIOleDocument ppvObject S_OK E_FAIL IOleDocument objOleDocument IOleDocument ppvObject objOleDocument CreateView iOleInPlaceSite getAddress ppvObject S_OK E_FAIL objOleDocument objDocumentView IOleDocumentView ppvObject objDocumentView IOleDocumentView pViewToActivate objDocumentView AddRef objDocumentView SetInPlaceSite iOleInPlaceSite getAddress objDocumentView UIActivate getRect objDocumentView SetRect objDocumentView S_OK
protected int Get Window int phwnd if phwnd 0 return COM E INVALIDARG if frame null COM Move Memory phwnd new int 0 4 return COM E NOTIMPL Copy the Window s handle into the memory passed in COM Move Memory phwnd new int frame handle 4 return COM S OK  GetWindow E_INVALIDARG MoveMemory E_NOTIMPL MoveMemory S_OK
RECT get Rect Point location this get Location Rectangle area frame get Client Area RECT rect new RECT rect left location x rect top location y rect right location x area width border Widths left border Widths right rect bottom location y area height border Widths top border Widths bottom return rect  getRect getLocation getClientArea borderWidths borderWidths borderWidths borderWidths
private int Get Window Context int pp Frame int pp Doc int lprc Pos Rect int lprc Clip Rect int lp Frame Info if frame null pp Frame 0 return COM E NOTIMPL fill in frame handle int i Ole In Place Frame frame getI Ole In Place Frame COM Move Memory pp Frame new int i Ole In Place Frame 4 frame Add Ref null out document handle if pp Doc 0 COM Move Memory pp Doc new int 0 4 fill in position and clipping info RECT rect get Rect if lprc Pos Rect 0 OS Move Memory lprc Pos Rect rect RECT sizeof if lprc Clip Rect 0 OS Move Memory lprc Clip Rect rect RECT sizeof get frame info OLEINPLACEFRAMEINFO frame Info new OLEINPLACEFRAMEINFO frame Info cb OLEINPLACEFRAMEINFO sizeof frame Info fMDI App 0 frame Info hwnd Frame frame handle Shell shell get Shell Menu menubar shell get Menu Bar if menubar null menubar is Disposed int hwnd shell handle int c Accel OS Send Message hwnd OS WM APP 0 0 if c Accel 0 int h Accel OS Send Message hwnd OS WM APP 1 0 0 if h Accel 0 frame Info c Accel Entries c Accel frame Info haccel h Accel COM Move Memory lp Frame Info frame Info OLEINPLACEFRAMEINFO sizeof return COM S OK  GetWindowContext ppFrame ppDoc lprcPosRect lprcClipRect lpFrameInfo ppFrame E_NOTIMPL iOleInPlaceFrame getIOleInPlaceFrame MoveMemory ppFrame iOleInPlaceFrame AddRef ppDoc MoveMemory ppDoc getRect lprcPosRect MoveMemory lprcPosRect lprcClipRect MoveMemory lprcClipRect frameInfo frameInfo frameInfo fMDIApp frameInfo hwndFrame getShell getMenuBar isDisposed cAccel SendMessage WM_APP cAccel hAccel SendMessage WM_APP hAccel frameInfo cAccelEntries cAccel frameInfo hAccel MoveMemory lpFrameInfo frameInfo S_OK
public boolean is Dirty Note this method must return true unless it is absolutely clear that the contents of the Ole Document do not differ from the contents in the file on the file system Get access to the persistant storage mechanism int address new int 1 if objI Ole Object Query Interface COM IIDI Persist File address COM S OK return true I Persist Storage perm Storage new I Persist Storage address 0 Are the contents of the permanent storage different from the file int result perm Storage Is Dirty perm Storage Release if result COM S FALSE return false return true  isDirty objIOleObject QueryInterface IIDIPersistFile S_OK IPersistStorage permStorage IPersistStorage permStorage IsDirty permStorage S_FALSE
public boolean is Focus Control check Widget int focus Hwnd OS Get Focus if objI Ole In Place Object null return handle focus Hwnd int phwnd new int 1 objI Ole In Place Object Get Window phwnd while focus Hwnd 0 if phwnd 0 focus Hwnd return true focus Hwnd OS Get Parent focus Hwnd return false  isFocusControl checkWidget focusHwnd GetFocus objIOleInPlaceObject focusHwnd objIOleInPlaceObject GetWindow focusHwnd focusHwnd focusHwnd GetParent focusHwnd
return false private int On Close return COM S OK  OnClose S_OK
return COM S OK private int On Data Change int p Formatetc int p Stgmed return COM S OK  S_OK OnDataChange pFormatetc pStgmed S_OK
private void on Dispose Event e in Dispose true if state STATE NONE do Verb OLE OLEIVERB DISCARDUNDOSTATE deactivate In Place Client release Object Interfaces Note must release object interfaces before releasing frame delete Temp Storage remove listeners remove Listener SWT Dispose listener remove Listener SWT Focus In listener remove Listener SWT Paint listener remove Listener SWT Traverse listener remove Listener SWT Key Down listener frame remove Listener SWT Resize listener frame remove Listener SWT Move listener frame Release frame null  onDispose inDispose STATE_NONE doVerb OLEIVERB_DISCARDUNDOSTATE deactivateInPlaceClient releaseObjectInterfaces deleteTempStorage removeListener removeListener FocusIn removeListener removeListener removeListener KeyDown removeListener removeListener
void on Focus In Event e if in Dispose return if state STATE UIACTIVE do Verb OLE OLEIVERB SHOW if objI Ole In Place Object null return if is Focus Control return int phwnd new int 1 objI Ole In Place Object Get Window phwnd if phwnd 0 0 return OS Set Focus phwnd 0  onFocusIn inDispose STATE_UIACTIVE doVerb OLEIVERB_SHOW objIOleInPlaceObject isFocusControl objIOleInPlaceObject GetWindow SetFocus
OS Set Focus phwnd 0 void on Focus Out Event e  SetFocus onFocusOut
private int On In Place Activate state STATE INPLACEACTIVE frame set Current Document this if objI Ole Object null return COM S OK int ppv Object new int 1 if objI Ole Object Query Interface COM IIDI Ole In Place Object ppv Object COM S OK objI Ole In Place Object new I Ole In Place Object ppv Object 0 return COM S OK  OnInPlaceActivate STATE_INPLACEACTIVE setCurrentDocument objIOleObject S_OK ppvObject objIOleObject QueryInterface IIDIOleInPlaceObject ppvObject S_OK objIOleInPlaceObject IOleInPlaceObject ppvObject S_OK
private int On In Place Deactivate if objI Ole In Place Object null objI Ole In Place Object Release objI Ole In Place Object null state STATE RUNNING redraw if get Display get Focus Control null get Shell traverse SWT TRAVERSE TAB NEXT return COM S OK  OnInPlaceDeactivate objIOleInPlaceObject objIOleInPlaceObject objIOleInPlaceObject STATE_RUNNING getDisplay getFocusControl getShell TRAVERSE_TAB_NEXT S_OK
private int On Pos Rect Change int lprc Pos Rect Point size get Size set Extent size x size y return COM S OK  OnPosRectChange lprcPosRect getSize setExtent S_OK
private void on Paint Event e if state STATE RUNNING state STATE INPLACEACTIVE SIZE size get Extent Rectangle area get Client Area RECT rect new RECT if get ProgramID starts With Excel Sheet NON NLS 1 rect left area x rect right area x area height size cx size cy rect top area y rect bottom area y area height else rect left area x rect right area x size cx rect top area y rect bottom area y size cy int p Area OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT RECT sizeof OS Move Memory p Area rect RECT sizeof COM Ole Draw objI Unknown get Address aspect e gc handle p Area OS Global Free p Area  onPaint STATE_RUNNING STATE_INPLACEACTIVE getExtent getClientArea getProgramID startsWith pArea GlobalAlloc GMEM_FIXED GMEM_ZEROINIT MoveMemory pArea OleDraw objIUnknown getAddress pArea GlobalFree pArea
private void on Resize Event e Rectangle area frame get Client Area set Bounds border Widths left border Widths top area width border Widths left border Widths right area height border Widths top border Widths bottom set Object Rects  onResize getClientArea setBounds borderWidths borderWidths borderWidths borderWidths borderWidths borderWidths setObjectRects
set Object Rects private void On Save  setObjectRects OnSave
private void On Save private int On Show Window int f Show return COM S OK  OnSave OnShowWindow fShow S_OK
private int OnUI Activate if objI Ole In Place Object null return COM E FAIL state STATE UIACTIVE int phwnd new int 1 if objI Ole In Place Object Get Window phwnd COM S OK OS Set Window Pos phwnd 0 OS HWND TOP 0 0 0 0 OS SWP NOSIZE OS SWP NOMOVE return COM S OK  OnUIActivate objIOleInPlaceObject E_FAIL STATE_UIACTIVE objIOleInPlaceObject GetWindow S_OK SetWindowPos HWND_TOP SWP_NOSIZE SWP_NOMOVE S_OK
private int OnUI Deactivate int f Undoable currently we are ignoring the f Undoable flag if frame null frame is Disposed return COM S OK state STATE INPLACEACTIVE frame Set Active Object 0 0 redraw if get Display get Focus Control frame get Shell traverse SWT TRAVERSE TAB NEXT Shell shell get Shell Menu menubar shell get Menu Bar if menubar null menubar is Disposed return COM S OK int shell Handle shell handle OS Set Menu shell Handle menubar handle return COM Ole Set Menu Descriptor 0 shell Handle 0 0 0  OnUIDeactivate fUndoable fUndoable isDisposed S_OK STATE_INPLACEACTIVE SetActiveObject getDisplay getFocusControl getShell TRAVERSE_TAB_NEXT getShell getMenuBar isDisposed S_OK shellHandle SetMenu shellHandle OleSetMenuDescriptor shellHandle
private void on Traverse Event event switch event detail case SWT TRAVERSE ESCAPE case SWT TRAVERSE RETURN case SWT TRAVERSE TAB NEXT case SWT TRAVERSE TAB PREVIOUS case SWT TRAVERSE PAGE NEXT case SWT TRAVERSE PAGE PREVIOUS case SWT TRAVERSE MNEMONIC event doit true break  onTraverse TRAVERSE_ESCAPE TRAVERSE_RETURN TRAVERSE_TAB_NEXT TRAVERSE_TAB_PREVIOUS TRAVERSE_PAGE_NEXT TRAVERSE_PAGE_PREVIOUS TRAVERSE_MNEMONIC
private int On View Change int dw Aspect int lindex return COM S OK  OnViewChange dwAspect S_OK
protected int Query Interface int riid int ppv Object if riid 0 ppv Object 0 return COM E NOINTERFACE GUID guid new GUID COM Move Memory guid riid GUID sizeof if COM Is EqualGUID guid COM IIDI Unknown COM Move Memory ppv Object new int i Unknown get Address 4 Add Ref return COM S OK if COM Is EqualGUID guid COM IIDI Advise Sink COM Move Memory ppv Object new int i Advise Sink get Address 4 Add Ref return COM S OK if COM Is EqualGUID guid COM IIDI Ole Client Site COM Move Memory ppv Object new int i Ole Client Site get Address 4 Add Ref return COM S OK if COM Is EqualGUID guid COM IIDI Ole In Place Site COM Move Memory ppv Object new int i Ole In Place Site get Address 4 Add Ref return COM S OK INTENTIONALLY COMMENTED see bug 35493 if COM Is EqualGUID guid COM IIDI Ole Document Site String progID get ProgramID if progID starts With Power Point NON NLS 1 COM Move Memory ppv Object new int i Ole Document Site get Address 4 Add Ref return COM S OK COM Move Memory ppv Object new int 0 4 return COM E NOINTERFACE  QueryInterface ppvObject ppvObject E_NOINTERFACE MoveMemory IsEqualGUID IIDIUnknown MoveMemory ppvObject iUnknown getAddress AddRef S_OK IsEqualGUID IIDIAdviseSink MoveMemory ppvObject iAdviseSink getAddress AddRef S_OK IsEqualGUID IIDIOleClientSite MoveMemory ppvObject iOleClientSite getAddress AddRef S_OK IsEqualGUID IIDIOleInPlaceSite MoveMemory ppvObject iOleInPlaceSite getAddress AddRef S_OK IsEqualGUID IIDIOleDocumentSite getProgramID startsWith PowerPoint MoveMemory ppvObject iOleDocumentSite getAddress AddRef S_OK MoveMemory ppvObject E_NOINTERFACE
Returns the status of the specified command The status is any bitwise OR d combination of SWTOLE OLECMDF SUPPORTED SWTOLE OLECMDF ENABLED SWTOLE OLECMDF LATCHED SWTOLE OLECMDF NINCHED You can query the status of a command before invoking it with Ole Client Site exec The OLE Document or ActiveX Control must support the I Ole Command Target to make use of this method param cmd the ID of a command these are the OLE OLECMDID  values a small set of common commands return the status of the specified command or 0 if unable to query the OLE Object these are the OLE OLECMDF  values public int query Status int cmd if objI Ole Command Target null int address new int 1 if objI Unknown Query Interface COM IIDI Ole Command Target address COM S OK return 0 objI Ole Command Target new I Ole Command Target address 0 OLECMD olecmd new OLECMD olecmd cmdID cmd int result objI Ole Command Target Query Status null 1 olecmd null if result COM S OK return 0 return olecmd cmdf  OLECMDF_SUPPORTED OLECMDF_ENABLED OLECMDF_LATCHED OLECMDF_NINCHED OleClientSite IOleCommandTarget OLECMDID_ OLECMDF_ queryStatus objIOleCommandTarget objIUnknown QueryInterface IIDIOleCommandTarget S_OK objIOleCommandTarget IOleCommandTarget objIOleCommandTarget QueryStatus S_OK
protected int Release ref Count if ref Count 0 disposeCOM Interfaces return ref Count  refCount refCount disposeCOMInterfaces refCount
protected void release Object Interfaces if objI Ole In Place Object null objI Ole In Place Object Release objI Ole In Place Object null if objI Ole Object null objI Ole Object Close COM OLECLOSE NOSAVE objI Ole Object Release objI Ole Object null if obj Document View null obj Document View Release obj Document View null if objI View Object2 null objI View Object2 Set Advise aspect 0 0 objI View Object2 Release objI View Object2 null if objI Ole Command Target null objI Ole Command Target Release objI Ole Command Target null if objI Unknown null objI Unknown Release objI Unknown null COM Co Free Unused Libraries  releaseObjectInterfaces objIOleInPlaceObject objIOleInPlaceObject objIOleInPlaceObject objIOleObject objIOleObject OLECLOSE_NOSAVE objIOleObject objIOleObject objDocumentView objDocumentView objDocumentView objIViewObject2 objIViewObject2 SetAdvise objIViewObject2 objIViewObject2 objIOleCommandTarget objIOleCommandTarget objIOleCommandTarget objIUnknown objIUnknown objIUnknown CoFreeUnusedLibraries
public boolean save File file boolean include Ole Info if include Ole Info return save To Storage File file return save To Traditional File file  includeOleInfo includeOleInfo saveToStorageFile saveToTraditionalFile
private boolean save From Contents int address File file boolean success false I Stream temp Contents new I Stream address temp Contents Add Ref try File Output Stream writer new File Output Stream file int increment 1024 4 int pv COM Co Task Mem Alloc increment int pcb Written new int 1 while temp Contents Read pv increment pcb Written COM S OK pcb Written 0 0 byte buffer new byte pcb Written 0 OS Move Memory buffer pv pcb Written 0 writer write buffer Note if file does not exist this will create the file the first time it is called success true COM Co Task Mem Free pv writer close catch IO Exception err temp Contents Release return success  saveFromContents IStream tempContents IStream tempContents AddRef FileOutputStream FileOutputStream CoTaskMemAlloc pcbWritten tempContents pcbWritten S_OK pcbWritten pcbWritten MoveMemory pcbWritten CoTaskMemFree IOException tempContents
private boolean save From Ole10 Native int address File file boolean success false I Stream temp Contents new I Stream address temp Contents Add Ref The 1 Ole10 Native stream contains a DWORD header whose value is the length of the native data that follows int pv COM Co Task Mem Alloc 4 int size new int 1 int rc temp Contents Read pv 4 null OS Move Memory size pv 4 COM Co Task Mem Free pv if rc COM S OK size 0 0 Read the data byte buffer new byte size 0 pv COM Co Task Mem Alloc size 0 rc temp Contents Read pv size 0 null OS Move Memory buffer pv size 0 COM Co Task Mem Free pv open the file and write data into it try File Output Stream writer new File Output Stream file writer write buffer Note if file does not exist this will create the file writer close success true catch IO Exception err temp Contents Release return success  saveFromOle10Native IStream tempContents IStream tempContents AddRef 1Ole10Native CoTaskMemAlloc tempContents MoveMemory CoTaskMemFree S_OK CoTaskMemAlloc tempContents MoveMemory CoTaskMemFree FileOutputStream FileOutputStream IOException tempContents
private int Save Object update Storage return COM S OK  SaveObject updateStorage S_OK
Saves the document to the specified file and includes OLE spcific inforrmation This method must b only b be used for files that have an OLE Storage format For example a word file edited with Word Document should be saved using this method because there is formating information that should be stored in the OLE specific Storage format param file the file to which the changes are to be saved return true if the save was successful private boolean save To Storage File File file The file will be saved using the formating of the current application this may not be the format of the application that was originally used to create the file e g if an Excel file is opened in Word the Word application will save the file in the Word format Note if the file already exists some applications will not overwrite the file In these cases you should delete the file first probably save the contents of the file in case the save fails if file null file is Directory return false if update Storage return false get access to the persistant storage mechanism int address new int 1 if objI Ole Object Query Interface COM IIDI Persist Storage address COM S OK return false I Persist Storage perm Storage new I Persist Storage address 0 try address new int 1 char path file get Absolute Path 0 to Char Array int mode COM STGM TRANSACTED COM STGM READWRITE COM STGM SHARE EXCLUSIVE COM STGM CREATE int result COM Stg Create Docfile path mode 0 address Does an Add Ref if successful if result COM S OK return false I Storage storage new I Storage address 0 try if COM Ole Save perm Storage get Address storage get Address false COM S OK if storage Commit COM STGC DEFAULT COM S OK return true finally storage Release finally perm Storage Release return false  saveToStorageFile isDirectory updateStorage objIOleObject QueryInterface IIDIPersistStorage S_OK IPersistStorage permStorage IPersistStorage getAbsolutePath toCharArray STGM_TRANSACTED STGM_READWRITE STGM_SHARE_EXCLUSIVE STGM_CREATE StgCreateDocfile AddRef S_OK IStorage IStorage OleSave permStorage getAddress getAddress S_OK STGC_DEFAULT S_OK permStorage
Saves the document to the specified file This method must be used for files that do not have an OLE Storage format For example a bitmap file edited with MS Paint should be saved using this method because bitmap is a standard format that does not include any OLE specific data param file the file to which the changes are to be saved return true if the save was successful private boolean save To Traditional File File file Note if the file already exists some applications will not overwrite the file In these cases you should delete the file first probably save the contents of the file in case the save fails if file null file is Directory return false if update Storage return false int address new int 1 Look for a CONTENTS stream if temp Storage Open Stream CONTENTS 0 COM STGM DIRECT COM STGM READ COM STGM SHARE EXCLUSIVE 0 address COM S OK NON NLS 1 return save From Contents address 0 file Look for Ole 1 0 object stream if temp Storage Open Stream 1 Ole10 Native 0 COM STGM DIRECT COM STGM READ COM STGM SHARE EXCLUSIVE 0 address COM S OK NON NLS 1 return save From Ole10 Native address 0 file return false  MSPaint saveToTraditionalFile isDirectory updateStorage tempStorage OpenStream STGM_DIRECT STGM_READ STGM_SHARE_EXCLUSIVE S_OK saveFromContents tempStorage OpenStream 1Ole10Native STGM_DIRECT STGM_READ STGM_SHARE_EXCLUSIVE S_OK saveFromOle10Native
return false private int Scroll int scroll Extant return COM S OK  scrollExtant S_OK
void set Border Space RECT new Borderwidth border Widths new Borderwidth readjust size and location of client site Rectangle area frame get Client Area set Bounds border Widths left border Widths top area width border Widths left border Widths right area height border Widths top border Widths bottom set Object Rects  setBorderSpace newBorderwidth borderWidths newBorderwidth getClientArea setBounds borderWidths borderWidths borderWidths borderWidths borderWidths borderWidths setObjectRects
private void set Extent int width int height Resize the width and height of the embedded linked OLE Natives object to the specified values if objI Ole Object null is Static in Update return SIZE current Extent get Extent if width current Extent cx height current Extent cy return SIZE new Extent new SIZE new Extent cx width new Extent cy height new Extent x Form Pixels To Himetric new Extent Get the server running first then do a Set Extent then show it boolean already Running COM Ole Is Running objI Ole Object get Address if already Running COM Ole Run objI Ole Object get Address if objI Ole Object Set Extent aspect new Extent COM S OK in Update true objI Ole Object Update in Update false if already Running Close server if it wasn t already running upon entering this method objI Ole Object Close COM OLECLOSE SAVEIFDIRTY  setExtent OLENatives objIOleObject isStatic inUpdate currentExtent getExtent currentExtent currentExtent newExtent newExtent newExtent newExtent xFormPixelsToHimetric newExtent SetExtent alreadyRunning OleIsRunning objIOleObject getAddress alreadyRunning OleRun objIOleObject getAddress objIOleObject SetExtent newExtent S_OK inUpdate objIOleObject inUpdate alreadyRunning objIOleObject OLECLOSE_SAVEIFDIRTY
public void set Indent Rectangle new Indent indent new RECT indent left new Indent x indent right new Indent width indent top new Indent y indent bottom new Indent height  setIndent newIndent newIndent newIndent newIndent newIndent
private void set Object Rects if objI Ole In Place Object null return size the object to fill the available space leave a border RECT rect get Rect objI Ole In Place Object Set Object Rects rect rect  setObjectRects objIOleInPlaceObject getRect objIOleInPlaceObject SetObjectRects
private int Show Object Tells the container to position the object so it is visible to the user This method ensures that the container itself is visible and not minimized return COM S OK  ShowObject S_OK
Displays a dialog with the property information for this OLE Object The OLE Document or ActiveX Control must support the I Specify Property Pages interface param title the name that will appear in the titlebar of the dialog public void show Properties String title Get the Property Page information from the OLE Object int ppv Object new int 1 if objI Unknown Query Interface COM IIDI Specify Property Pages ppv Object COM S OK return I Specify Property Pages objISPP new I Specify Property Pages ppv Object 0 CAUUID caGUID new CAUUID int result objISPP Get Pages caGUID objISPP Release if result COM S OK return create a frame in which to display the pages char ch Title null if title null ch Title new char title length title get Chars 0 title length ch Title 0 result COM Ole Create Property Frame frame handle 10 10 ch Title 1 new int objI Unknown get Address caGUID c Elems caGUID p Elems COM LOCALE USER DEFAULT 0 0 free the property page information COM Co Task Mem Free caGUID p Elems  ISpecifyPropertyPages showProperties ppvObject objIUnknown QueryInterface IIDISpecifyPropertyPages ppvObject S_OK ISpecifyPropertyPages ISpecifyPropertyPages ppvObject GetPages S_OK chTitle chTitle getChars chTitle OleCreatePropertyFrame chTitle objIUnknown getAddress cElems pElems LOCALE_USER_DEFAULT CoTaskMemFree pElems
private boolean update Storage if temp Storage null return false int ppv new int 1 if objI Unknown Query Interface COM IIDI Persist Storage ppv COM S OK return false I Persist Storage i Persist Storage new I Persist Storage ppv 0 int result COM Ole Save i Persist Storage get Address temp Storage get Address true if result COM S OK Ole Save will fail for static objects so do what Ole Save does COM Write Class Stg temp Storage get Address obj Clsid result i Persist Storage Save temp Storage get Address true temp Storage Commit COM STGC DEFAULT result i Persist Storage Save Completed 0 i Persist Storage Release return true  updateStorage tempStorage objIUnknown QueryInterface IIDIPersistStorage S_OK IPersistStorage iPersistStorage IPersistStorage OleSave iPersistStorage getAddress tempStorage getAddress S_OK OleSave OleSave WriteClassStg tempStorage getAddress objClsid iPersistStorage tempStorage getAddress tempStorage STGC_DEFAULT iPersistStorage SaveCompleted iPersistStorage
private SIZE x Form Himetric To Pixels SIZE a Size Return a new Size which is the pixel transformation of a size in HIMETRIC units int hDC OS GetDC 0 int xppi OS Get Device Caps hDC 88 logical pixels inch in x int yppi OS Get Device Caps hDC 90 logical pixels inch in y OS ReleaseDC 0 hDC int cx Compatibility round a Size cx xppi 2540 2540 HIMETRIC units per inch int cy Compatibility round a Size cy yppi 2540 SIZE size new SIZE size cx cx size cy cy return size  xFormHimetricToPixels aSize GetDeviceCaps GetDeviceCaps aSize aSize
private SIZE x Form Pixels To Himetric SIZE a Size Return a new size which is the HIMETRIC transformation of a size in pixel units int hDC OS GetDC 0 int xppi OS Get Device Caps hDC 88 logical pixels inch in x int yppi OS Get Device Caps hDC 90 logical pixels inch in y OS ReleaseDC 0 hDC int cx Compatibility round a Size cx 2540 xppi 2540 HIMETRIC units per inch int cy Compatibility round a Size cy 2540 yppi SIZE size new SIZE size cx cx size cy cy return size  xFormPixelsToHimetric aSize GetDeviceCaps GetDeviceCaps aSize aSize

Create an Ole Control Site child widget using style bits to select a particular look or set of properties param parent a composite widget must be an Ole Frame param style the bitwise OR ing of widget styles param progID the unique program identifier which has been registered for this ActiveX Control the value of the ProgID key or the value of the Version Independent ProgID key specified in the registry for this Control for example the Version Independent ProgID for Internet Explorer is Shell Explorer exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li ERROR ERROR NULL ARGUMENT when the parent is null li ERROR INVALID CLASSID when the prog Id does not map to a registered CLSID li ERROR CANNOT CREATE OBJECT when failed to create OLE Object li ERROR CANNOT ACCESS CLASSFACTORY when Class Factory could not be found li ERROR CANNOT CREATE LICENSED OBJECT when failed to create a licensed OLE Object li ERROR INTERFACES NOT INITIALIZED when unable to create callbacks for OLE Interfaces ul public Ole Control Site Composite parent int style String prog Id super parent style try check for licensing app Clsid get ClassID prog Id if app Clsid null OLE error OLE ERROR INVALID CLASSID int licinfo get License Info app Clsid if licinfo 0 Open a storage object temp Storage create Temp Storage Create ole object with storage object int address new int 1 int result COM Ole Create app Clsid COM IIDI Unknown COM OLERENDER DRAW null 0 temp Storage get Address address if result COM S OK OLE error OLE ERROR CANNOT CREATE OBJECT result objI Unknown new I Unknown address 0 else Prepare the Class Factory int ppv Object new int 1 try int result COM Co Get Class Object app Clsid COM CLSCTX INPROC HANDLER COM CLSCTX INPROC SERVER 0 COM IIDI Class Factory2 ppv Object if result COM S OK OLE error OLE ERROR CANNOT ACCESS CLASSFACTORY result I Class Factory2 class Factory new I Class Factory2 ppv Object 0 Create Com Object ppv Object new int 1 result class Factory Create Instance Lic 0 0 COM IIDI Unknown licinfo ppv Object class Factory Release if result COM S OK OLE error OLE ERROR CANNOT CREATE LICENSED OBJECT result finally COM Sys Free String licinfo objI Unknown new I Unknown ppv Object 0 Prepare a storage medium ppv Object new int 1 if objI Unknown Query Interface COM IIDI Persist Storage ppv Object COM S OK I Persist Storage persist new I Persist Storage ppv Object 0 temp Storage create Temp Storage persist Init New temp Storage get Address persist Release Init sinks add Object References Init site properties set Site Property COM DISPID AMBIENT USERMODE new Variant true set Site Property COM DISPID AMBIENT UIDEAD new Variant false if COM Ole Run objI Unknown get Address OLE S OK state STATE RUNNING catch SWT Error e dispose disposeCOM Interfaces throw e  OleControlSite OleFrame VersionIndependentProgID VersionIndependentProgID SWTError ERROR_THREAD_INVALID_ACCESS ERROR_ERROR_NULL_ARGUMENT ERROR_INVALID_CLASSID progId ERROR_CANNOT_CREATE_OBJECT ERROR_CANNOT_ACCESS_CLASSFACTORY ERROR_CANNOT_CREATE_LICENSED_OBJECT ERROR_INTERFACES_NOT_INITIALIZED OleControlSite progId appClsid getClassID progId appClsid ERROR_INVALID_CLASSID getLicenseInfo appClsid tempStorage createTempStorage OleCreate appClsid IIDIUnknown OLERENDER_DRAW tempStorage getAddress S_OK ERROR_CANNOT_CREATE_OBJECT objIUnknown IUnknown ClassFactory ppvObject CoGetClassObject appClsid CLSCTX_INPROC_HANDLER CLSCTX_INPROC_SERVER IIDIClassFactory2 ppvObject S_OK ERROR_CANNOT_ACCESS_CLASSFACTORY IClassFactory2 classFactory IClassFactory2 ppvObject ppvObject classFactory CreateInstanceLic IIDIUnknown ppvObject classFactory S_OK ERROR_CANNOT_CREATE_LICENSED_OBJECT SysFreeString objIUnknown IUnknown ppvObject ppvObject objIUnknown QueryInterface IIDIPersistStorage ppvObject S_OK IPersistStorage IPersistStorage ppvObject tempStorage createTempStorage InitNew tempStorage getAddress addObjectReferences setSiteProperty DISPID_AMBIENT_USERMODE setSiteProperty DISPID_AMBIENT_UIDEAD OleRun objIUnknown getAddress S_OK STATE_RUNNING SWTError disposeCOMInterfaces
Adds the listener to receive events param eventID the id of the event param listener the listener exception SWT Error ul li ERROR NULL ARGUMENT when listener is null li ul public void add Event Listener int eventID Ole Listener listener if listener null OLE error SWT ERROR NULL ARGUMENT GUID riid get Default Event SinkGUID objI Unknown if riid null add Event Listener objI Unknown get Address riid eventID listener  SWTError ERROR_NULL_ARGUMENT addEventListener OleListener ERROR_NULL_ARGUMENT getDefaultEventSinkGUID objIUnknown addEventListener objIUnknown getAddress
static GUID get Default Event SinkGUID I Unknown unknown get Event Sink I F from I Provide Class Info2 int ppv Object new int 1 if unknown Query Interface COM IIDI Provide Class Info2 ppv Object COM S OK I Provide Class Info2 pci2 new I Provide Class Info2 ppv Object 0 GUID riid new GUID int result pci2 GetGUID COM GUIDKIND DEFAULT SOURCE DISP IID riid pci2 Release if result COM S OK return riid get Event Sink I F from I Provide Class Info if unknown Query Interface COM IIDI Provide Class Info ppv Object COM S OK I Provide Class Info pci new I Provide Class Info ppv Object 0 int ppTI new int 1 int ppEI new int 1 int result pci Get Class Info ppTI pci Release if result COM S OK ppTI 0 0 I Type Info class Info new I Type Info ppTI 0 int pp Type Attr new int 1 result class Info Get Type Attr pp Type Attr if result COM S OK pp Type Attr 0 0 TYPEATTR type Attribute new TYPEATTR COM Move Memory type Attribute pp Type Attr 0 TYPEATTR sizeof class Info Release Type Attr pp Type Attr 0 int impl Mask COM IMPLTYPEFLAG FDEFAULT COM IMPLTYPEFLAG FSOURCE COM IMPLTYPEFLAG FRESTRICTED int impl Bits COM IMPLTYPEFLAG FDEFAULT COM IMPLTYPEFLAG FSOURCE for int i 0 i type Attribute c Impl Types i int p Impl Type Flags new int 1 if class Info Get Impl Type Flags i p Impl Type Flags COM S OK if p Impl Type Flags 0 impl Mask impl Bits int p Ref Type new int 1 if class Info Get Ref Type Of Impl Type i p Ref Type COM S OK class Info Get Ref Type Info p Ref Type 0 ppEI class Info Release if ppEI 0 0 I Type Info event Info new I Type Info ppEI 0 pp Type Attr new int 1 result event Info Get Type Attr pp Type Attr GUID riid null if result COM S OK pp Type Attr 0 0 riid new GUID COM Move Memory riid pp Type Attr 0 GUID sizeof event Info Release Type Attr pp Type Attr 0 event Info Release return riid return null  getDefaultEventSinkGUID IUnknown IProvideClassInfo2 ppvObject QueryInterface IIDIProvideClassInfo2 ppvObject S_OK IProvideClassInfo2 IProvideClassInfo2 ppvObject GUIDKIND_DEFAULT_SOURCE_DISP_IID S_OK IProvideClassInfo QueryInterface IIDIProvideClassInfo ppvObject S_OK IProvideClassInfo IProvideClassInfo ppvObject GetClassInfo S_OK ITypeInfo classInfo ITypeInfo ppTypeAttr classInfo GetTypeAttr ppTypeAttr S_OK ppTypeAttr typeAttribute MoveMemory typeAttribute ppTypeAttr classInfo ReleaseTypeAttr ppTypeAttr implMask IMPLTYPEFLAG_FDEFAULT IMPLTYPEFLAG_FSOURCE IMPLTYPEFLAG_FRESTRICTED implBits IMPLTYPEFLAG_FDEFAULT IMPLTYPEFLAG_FSOURCE typeAttribute cImplTypes pImplTypeFlags classInfo GetImplTypeFlags pImplTypeFlags S_OK pImplTypeFlags implMask implBits pRefType classInfo GetRefTypeOfImplType pRefType S_OK classInfo GetRefTypeInfo pRefType classInfo ITypeInfo eventInfo ITypeInfo ppTypeAttr eventInfo GetTypeAttr ppTypeAttr S_OK ppTypeAttr MoveMemory ppTypeAttr eventInfo ReleaseTypeAttr ppTypeAttr eventInfo
Adds the listener to receive events since 2 0 param automation the automation object that provides the event notification param eventID the id of the event param listener the listener exception SWT Error ul li ERROR NULL ARGUMENT when listener is null li ul public void add Event Listener Ole Automation automation int eventID Ole Listener listener if listener null automation null OLE error SWT ERROR NULL ARGUMENT int address automation get Address I Unknown unknown new I Unknown address GUID riid get Default Event SinkGUID unknown if riid null add Event Listener address riid eventID listener  SWTError ERROR_NULL_ARGUMENT addEventListener OleAutomation OleListener ERROR_NULL_ARGUMENT getAddress IUnknown IUnknown getDefaultEventSinkGUID addEventListener
void add Event Listener int iunknown GUID guid int eventID Ole Listener listener if listener null iunknown 0 guid null OLE error SWT ERROR NULL ARGUMENT have we connected to this kind of event sink before int index 1 for int i 0 i ole Event SinkGUID length i if COM Is EqualGUID ole Event SinkGUID i guid if iunknown ole Event SinkI Unknown i index i break if index 1 ole Event Sink index add Listener eventID listener else int old Length ole Event Sink length Ole Event Sink new Ole Event Sink new Ole Event Sink old Length 1 GUID new Ole Event SinkGUID new GUID old Length 1 int new Ole Event SinkI Unknown new int old Length 1 System arraycopy ole Event Sink 0 new Ole Event Sink 0 old Length System arraycopy ole Event SinkGUID 0 new Ole Event SinkGUID 0 old Length System arraycopy ole Event SinkI Unknown 0 new Ole Event SinkI Unknown 0 old Length ole Event Sink new Ole Event Sink ole Event SinkGUID new Ole Event SinkGUID ole Event SinkI Unknown new Ole Event SinkI Unknown ole Event Sink old Length new Ole Event Sink this iunknown guid ole Event SinkGUID old Length guid ole Event SinkI Unknown old Length iunknown ole Event Sink old Length Add Ref ole Event Sink old Length connect ole Event Sink old Length add Listener eventID listener  addEventListener OleListener ERROR_NULL_ARGUMENT oleEventSinkGUID IsEqualGUID oleEventSinkGUID oleEventSinkIUnknown oleEventSink addListener oldLength oleEventSink OleEventSink newOleEventSink OleEventSink oldLength newOleEventSinkGUID oldLength newOleEventSinkIUnknown oldLength oleEventSink newOleEventSink oldLength oleEventSinkGUID newOleEventSinkGUID oldLength oleEventSinkIUnknown newOleEventSinkIUnknown oldLength oleEventSink newOleEventSink oleEventSinkGUID newOleEventSinkGUID oleEventSinkIUnknown newOleEventSinkIUnknown oleEventSink oldLength OleEventSink oleEventSinkGUID oldLength oleEventSinkIUnknown oldLength oleEventSink oldLength AddRef oleEventSink oldLength oleEventSink oldLength addListener
protected void add Object References super add Object References Get property change notification from control connect Property Change Sink Get access to the Control object int ppv Object new int 1 if objI Unknown Query Interface COM IIDI Ole Control ppv Object COM S OK I Ole Control objI Ole Control new I Ole Control ppv Object 0 ask the control for its info in case users need to act on it current Control Info new CONTROLINFO objI Ole Control Get Control Info current Control Info objI Ole Control Release  addObjectReferences addObjectReferences connectPropertyChangeSink ppvObject objIUnknown QueryInterface IIDIOleControl ppvObject S_OK IOleControl objIOleControl IOleControl ppvObject currentControlInfo objIOleControl GetControlInfo currentControlInfo objIOleControl
Adds the listener to receive events param propertyID the identifier of the property param listener the listener exception SWT Error ul li ERROR NULL ARGUMENT when listener is null li ul public void add Property Listener int propertyID Ole Listener listener if listener null SWT error SWT ERROR NULL ARGUMENT ole Property Change Sink add Listener propertyID listener  SWTError ERROR_NULL_ARGUMENT addPropertyListener OleListener ERROR_NULL_ARGUMENT olePropertyChangeSink addListener
private void connect Property Change Sink ole Property Change Sink new Ole Property Change Sink this ole Property Change Sink Add Ref ole Property Change Sink connect objI Unknown  connectPropertyChangeSink olePropertyChangeSink OlePropertyChangeSink olePropertyChangeSink AddRef olePropertyChangeSink objIUnknown
register each of the interfaces that this object implements i Ole Control Site new COM Object new int 2 0 0 0 1 1 3 2 1 0 public int method0 int args return Query Interface args 0 args 1  iOleControlSite COMObject QueryInterface
i Ole Control Site new COM Object new int 2 0 0 0 1 1 3 2 1 0 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iOleControlSite COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return On Control Info Changed  AddRef OnControlInfoChanged
method6 Transform Coords not implemented method7 Translate Accelerator not implemented public int method8 int args return On Focus args 0  TransformCoords OnFocus
i Dispatch new COM Object new int 2 0 0 1 3 5 8 public int method0 int args return Query Interface args 0 args 1  iDispatch COMObject QueryInterface
i Dispatch new COM Object new int 2 0 0 1 3 5 8 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iDispatch COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
method4 Get Type Info not implemented method5 GetI Ds Of Names not implemented public int method6 int args return Invoke args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7  GetTypeInfo GetIDsOfNames
protected void createCOM Interfaces super createCOM Interfaces register each of the interfaces that this object implements i Ole Control Site new COM Object new int 2 0 0 0 1 1 3 2 1 0 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return On Control Info Changed method4 Lock In Place Active not implemented method5 Get Extended Control not implemented method6 Transform Coords not implemented method7 Translate Accelerator not implemented public int method8 int args return On Focus args 0 method9 Show Property Frame not implemented i Dispatch new COM Object new int 2 0 0 1 3 5 8 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release method3 Get Type Info Count not implemented method4 Get Type Info not implemented method5 GetI Ds Of Names not implemented public int method6 int args return Invoke args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7  createCOMInterfaces createCOMInterfaces iOleControlSite COMObject QueryInterface AddRef OnControlInfoChanged LockInPlaceActive GetExtendedControl TransformCoords OnFocus ShowPropertyFrame iDispatch COMObject QueryInterface AddRef GetTypeInfoCount GetTypeInfo GetIDsOfNames
private void disconnect Event Sinks for int i 0 i ole Event Sink length i Ole Event Sink sink ole Event Sink i sink disconnect sink Release ole Event Sink new Ole Event Sink 0 ole Event SinkGUID new GUID 0 ole Event SinkI Unknown new int 0  disconnectEventSinks oleEventSink OleEventSink oleEventSink oleEventSink OleEventSink oleEventSinkGUID oleEventSinkIUnknown
private void disconnect Property Change Sink if ole Property Change Sink null ole Property Change Sink disconnect objI Unknown ole Property Change Sink Release ole Property Change Sink null  disconnectPropertyChangeSink olePropertyChangeSink olePropertyChangeSink objIUnknown olePropertyChangeSink olePropertyChangeSink
protected void disposeCOM Interfaces super disposeCOM Interfaces if i Ole Control Site null i Ole Control Site dispose i Ole Control Site null if i Dispatch null i Dispatch dispose i Dispatch null  disposeCOMInterfaces disposeCOMInterfaces iOleControlSite iOleControlSite iOleControlSite iDispatch iDispatch iDispatch
public Color get Background if objI Unknown null We are getting the OLE COLOR should we change this to the COLORREF value Ole Automation ole Object new Ole Automation this Variant var Back Color ole Object get Property COM DISPID BACKCOLOR ole Object dispose if var Back Color null int color Ref new int 1 if COM Ole Translate Color var Back Color get Int get Display h Palette color Ref COM S OK return Color win32 new get Display color Ref 0 return super get Background  getBackground objIUnknown OLE_COLOR OleAutomation oleObject OleAutomation varBackColor oleObject getProperty DISPID_BACKCOLOR oleObject varBackColor colorRef OleTranslateColor varBackColor getInt getDisplay hPalette colorRef S_OK win32_new getDisplay colorRef getBackground
public Font get Font if objI Unknown null Ole Automation ole Object new Ole Automation this Variant var Disp Font ole Object get Property COM DISPID FONT ole Object dispose if var Disp Font null Ole Automation i Disp Font var Disp Font get Automation Variant lf Face Name i Disp Font get Property COM DISPID FONT NAME Variant lf Height i Disp Font get Property COM DISPID FONT SIZE Variant lf Italic i Disp Font get Property COM DISPID FONT ITALIC Variant lf Char Set i Disp Font get Property COM DISPID FONT CHARSET Variant lf Bold i Disp Font get Property COM DISPID FONT BOLD i Disp Font dispose if lf Face Name null lf Height null lf Italic null lf Bold null int style 3 lf Bold get Int 2 lf Italic get Int Font font new Font get Shell get Display lf Face Name get String lf Height get Int style return font return super get Font  getFont objIUnknown OleAutomation oleObject OleAutomation varDispFont oleObject getProperty DISPID_FONT oleObject varDispFont OleAutomation iDispFont varDispFont getAutomation lfFaceName iDispFont getProperty DISPID_FONT_NAME lfHeight iDispFont getProperty DISPID_FONT_SIZE lfItalic iDispFont getProperty DISPID_FONT_ITALIC lfCharSet iDispFont getProperty DISPID_FONT_CHARSET lfBold iDispFont getProperty DISPID_FONT_BOLD iDispFont lfFaceName lfHeight lfItalic lfBold lfBold getInt lfItalic getInt getShell getDisplay lfFaceName getString lfHeight getInt getFont
public Color get Foreground if objI Unknown null We are getting the OLE COLOR should we change this to the COLORREF value Ole Automation ole Object new Ole Automation this Variant var Fore Color ole Object get Property COM DISPID FORECOLOR ole Object dispose if var Fore Color null int color Ref new int 1 if COM Ole Translate Color var Fore Color get Int get Display h Palette color Ref COM S OK return Color win32 new get Display color Ref 0 return super get Foreground  getForeground objIUnknown OLE_COLOR OleAutomation oleObject OleAutomation varForeColor oleObject getProperty DISPID_FORECOLOR oleObject varForeColor colorRef OleTranslateColor varForeColor getInt getDisplay hPalette colorRef S_OK win32_new getDisplay colorRef getForeground
protected int get License Info GUID clsid int ppv Object new int 1 if COM Co Get Class Object clsid COM CLSCTX INPROC HANDLER COM CLSCTX INPROC SERVER 0 COM IIDI Class Factory2 ppv Object COM S OK return 0 I Class Factory2 class Factory new I Class Factory2 ppv Object 0 LICINFO licinfo new LICINFO if class Factory Get Lic Info licinfo COM S OK class Factory Release return 0 int p Bstr Key new int 1 if licinfo null licinfo f Runtime Key Avail 0 if class Factory Request Lic Key 0 p Bstr Key COM S OK class Factory Release return p Bstr Key 0 class Factory Release return 0  getLicenseInfo ppvObject CoGetClassObject CLSCTX_INPROC_HANDLER CLSCTX_INPROC_SERVER IIDIClassFactory2 ppvObject S_OK IClassFactory2 classFactory IClassFactory2 ppvObject classFactory GetLicInfo S_OK classFactory pBstrKey fRuntimeKeyAvail classFactory RequestLicKey pBstrKey S_OK classFactory pBstrKey classFactory
Get the control site property specified by the disp Id Member since 2 1 public Variant get Site Property int disp Id for int i 0 i site Property Ids length i if site Property Ids i disp Id return site Property Values i return null  dispIdMember getSiteProperty dispId sitePropertyIds sitePropertyIds dispId sitePropertyValues
protected int Get Window int phwnd if phwnd 0 return COM E INVALIDARG if frame null COM Move Memory phwnd new int 0 4 return COM E NOTIMPL Copy the Window s handle into the memory passed in COM Move Memory phwnd new int handle 4 return COM S OK  GetWindow E_INVALIDARG MoveMemory E_NOTIMPL MoveMemory S_OK
private int Invoke int disp Id Member int riid int lcid int dw Flags int p Disp Params int p Var Result int p Excep Info int p Arg Err if p Var Result 0 dw Flags COM DISPATCH PROPERTYGET if p Excep Info 0 COM Move Memory p Excep Info new int 0 4 if p Arg Err 0 COM Move Memory p Arg Err new int 0 4 return COM DISP E MEMBERNOTFOUND Variant result get Site Property disp Id Member if result null if p Var Result 0 result get Data p Var Result return COM S OK switch disp Id Member indicate a false result case COM DISPID AMBIENT SUPPORTSMNEMONICS case COM DISPID AMBIENT SHOWGRABHANDLES case COM DISPID AMBIENT SHOWHATCHING if p Var Result 0 COM Move Memory p Var Result new int 0 4 if p Excep Info 0 COM Move Memory p Excep Info new int 0 4 if p Arg Err 0 COM Move Memory p Arg Err new int 0 4 return COM S FALSE not implemented case COM DISPID AMBIENT OFFLINEIFNOTCONNECTED case COM DISPID AMBIENT BACKCOLOR case COM DISPID AMBIENT FORECOLOR case COM DISPID AMBIENT FONT case COM DISPID AMBIENT LOCALEID case COM DISPID AMBIENT SILENT case COM DISPID AMBIENT MESSAGEREFLECT if p Var Result 0 COM Move Memory p Var Result new int 0 4 if p Excep Info 0 COM Move Memory p Excep Info new int 0 4 if p Arg Err 0 COM Move Memory p Arg Err new int 0 4 return COM E NOTIMPL default if p Var Result 0 COM Move Memory p Var Result new int 0 4 if p Excep Info 0 COM Move Memory p Excep Info new int 0 4 if p Arg Err 0 COM Move Memory p Arg Err new int 0 4 return COM DISP E MEMBERNOTFOUND  dispIdMember dwFlags pDispParams pVarResult pExcepInfo pArgErr pVarResult dwFlags DISPATCH_PROPERTYGET pExcepInfo MoveMemory pExcepInfo pArgErr MoveMemory pArgErr DISP_E_MEMBERNOTFOUND getSiteProperty dispIdMember pVarResult getData pVarResult S_OK dispIdMember DISPID_AMBIENT_SUPPORTSMNEMONICS DISPID_AMBIENT_SHOWGRABHANDLES DISPID_AMBIENT_SHOWHATCHING pVarResult MoveMemory pVarResult pExcepInfo MoveMemory pExcepInfo pArgErr MoveMemory pArgErr S_FALSE DISPID_AMBIENT_OFFLINEIFNOTCONNECTED DISPID_AMBIENT_BACKCOLOR DISPID_AMBIENT_FORECOLOR DISPID_AMBIENT_FONT DISPID_AMBIENT_LOCALEID DISPID_AMBIENT_SILENT DISPID_AMBIENT_MESSAGEREFLECT pVarResult MoveMemory pVarResult pExcepInfo MoveMemory pExcepInfo pArgErr MoveMemory pArgErr E_NOTIMPL pVarResult MoveMemory pVarResult pExcepInfo MoveMemory pExcepInfo pArgErr MoveMemory pArgErr DISP_E_MEMBERNOTFOUND
private int On Control Info Changed int ppv Object new int 1 if objI Unknown Query Interface COM IIDI Ole Control ppv Object COM S OK I Ole Control objI Ole Control new I Ole Control ppv Object 0 ask the control for its info in case users need to act on it current Control Info new CONTROLINFO objI Ole Control Get Control Info current Control Info objI Ole Control Release return COM S OK  OnControlInfoChanged ppvObject objIUnknown QueryInterface IIDIOleControl ppvObject S_OK IOleControl objIOleControl IOleControl ppvObject currentControlInfo objIOleControl GetControlInfo currentControlInfo objIOleControl S_OK
void on Focus In Event e if objI Ole In Place Object null return do Verb OLE OLEIVERB UIACTIVATE if is Focus Control return int phwnd new int 1 objI Ole In Place Object Get Window phwnd if phwnd 0 0 return OS Set Focus phwnd 0  onFocusIn objIOleInPlaceObject doVerb OLEIVERB_UIACTIVATE isFocusControl objIOleInPlaceObject GetWindow SetFocus
void on Focus Out Event e if objI Ole In Place Object null objI Ole In Place Object UI Deactivate  onFocusOut objIOleInPlaceObject objIOleInPlaceObject UIDeactivate
private int On Focus int f Got Focus return COM S OK  OnFocus fGotFocus S_OK
protected int OnUI Deactivate int f Undoable controls don t need to do anything for border space or menubars state STATE INPLACEACTIVE return COM S OK  OnUIDeactivate fUndoable STATE_INPLACEACTIVE S_OK
protected int Query Interface int riid int ppv Object int result super Query Interface riid ppv Object if result COM S OK return result if riid 0 ppv Object 0 return COM E INVALIDARG GUID guid new GUID COM Move Memory guid riid GUID sizeof if COM Is EqualGUID guid COM IIDI Ole Control Site COM Move Memory ppv Object new int i Ole Control Site get Address 4 Add Ref return COM S OK if COM Is EqualGUID guid COM IIDI Dispatch COM Move Memory ppv Object new int i Dispatch get Address 4 Add Ref return COM S OK COM Move Memory ppv Object new int 0 4 return COM E NOINTERFACE  QueryInterface ppvObject QueryInterface ppvObject S_OK ppvObject E_INVALIDARG MoveMemory IsEqualGUID IIDIOleControlSite MoveMemory ppvObject iOleControlSite getAddress AddRef S_OK IsEqualGUID IIDIDispatch MoveMemory ppvObject iDispatch getAddress AddRef S_OK MoveMemory ppvObject E_NOINTERFACE
protected int Release int result super Release if result 0 for int i 0 i site Property Ids length i site Property Values i dispose site Property Ids new int 0 site Property Values new Variant 0 return result  sitePropertyIds sitePropertyValues sitePropertyIds sitePropertyValues
protected void release Object Interfaces disconnect Event Sinks disconnect Property Change Sink super release Object Interfaces  releaseObjectInterfaces disconnectEventSinks disconnectPropertyChangeSink releaseObjectInterfaces
Removes the listener param eventID the event identifier param listener the listener exception SWT Error ul li ERROR NULL ARGUMENT when listener is null li ul public void remove Event Listener int eventID Ole Listener listener check Widget if listener null SWT error SWT ERROR NULL ARGUMENT GUID riid get Default Event SinkGUID objI Unknown if riid null remove Event Listener objI Unknown get Address riid eventID listener  SWTError ERROR_NULL_ARGUMENT removeEventListener OleListener checkWidget ERROR_NULL_ARGUMENT getDefaultEventSinkGUID objIUnknown removeEventListener objIUnknown getAddress
Removes the listener since 2 0 deprecated use Ole Control Site remove Event Listener Ole Automation int Ole Listener param automation the automation object that provides the event notification param guid the identifier of the events COM interface param eventID the event identifier param listener the listener exception SWT Error ul li ERROR NULL ARGUMENT when listener is null li ul public void remove Event Listener Ole Automation automation GUID guid int eventID Ole Listener listener check Widget if automation null listener null guid null SWT error SWT ERROR NULL ARGUMENT remove Event Listener automation get Address guid eventID listener  OleControlSite removeEventListener OleAutomation OleListener SWTError ERROR_NULL_ARGUMENT removeEventListener OleAutomation OleListener checkWidget ERROR_NULL_ARGUMENT removeEventListener getAddress
Removes the listener since 2 0 param automation the automation object that provides the event notification param eventID the event identifier param listener the listener exception SWT Error ul li ERROR NULL ARGUMENT when listener is null li ul public void remove Event Listener Ole Automation automation int eventID Ole Listener listener check Widget if automation null listener null SWT error SWT ERROR NULL ARGUMENT int address automation get Address I Unknown unknown new I Unknown address GUID riid get Default Event SinkGUID unknown if riid null remove Event Listener address riid eventID listener  SWTError ERROR_NULL_ARGUMENT removeEventListener OleAutomation OleListener checkWidget ERROR_NULL_ARGUMENT getAddress IUnknown IUnknown getDefaultEventSinkGUID removeEventListener
void remove Event Listener int iunknown GUID guid int eventID Ole Listener listener if listener null guid null SWT error SWT ERROR NULL ARGUMENT for int i 0 i ole Event Sink length i if COM Is EqualGUID ole Event SinkGUID i guid if iunknown ole Event SinkI Unknown i ole Event Sink i remove Listener eventID listener if ole Event Sink i has Listeners free resources associated with event sink ole Event Sink i disconnect ole Event Sink i Release int old Length ole Event Sink length if old Length 1 ole Event Sink new Ole Event Sink 0 ole Event SinkGUID new GUID 0 ole Event SinkI Unknown new int 0 else Ole Event Sink new Ole Event Sink new Ole Event Sink old Length 1 System arraycopy ole Event Sink 0 new Ole Event Sink 0 i System arraycopy ole Event Sink i 1 new Ole Event Sink i old Length i 1 ole Event Sink new Ole Event Sink GUID new Ole Event SinkGUID new GUID old Length 1 System arraycopy ole Event SinkGUID 0 new Ole Event SinkGUID 0 i System arraycopy ole Event SinkGUID i 1 new Ole Event SinkGUID i old Length i 1 ole Event SinkGUID new Ole Event SinkGUID int new Ole Event SinkI Unknown new int old Length 1 System arraycopy ole Event SinkI Unknown 0 new Ole Event SinkI Unknown 0 i System arraycopy ole Event SinkI Unknown i 1 new Ole Event SinkI Unknown i old Length i 1 ole Event SinkI Unknown new Ole Event SinkI Unknown return  removeEventListener OleListener ERROR_NULL_ARGUMENT oleEventSink IsEqualGUID oleEventSinkGUID oleEventSinkIUnknown oleEventSink removeListener oleEventSink hasListeners oleEventSink oleEventSink oldLength oleEventSink oldLength oleEventSink OleEventSink oleEventSinkGUID oleEventSinkIUnknown OleEventSink newOleEventSink OleEventSink oldLength oleEventSink newOleEventSink oleEventSink newOleEventSink oldLength oleEventSink newOleEventSink newOleEventSinkGUID oldLength oleEventSinkGUID newOleEventSinkGUID oleEventSinkGUID newOleEventSinkGUID oldLength oleEventSinkGUID newOleEventSinkGUID newOleEventSinkIUnknown oldLength oleEventSinkIUnknown newOleEventSinkIUnknown oleEventSinkIUnknown newOleEventSinkIUnknown oldLength oleEventSinkIUnknown newOleEventSinkIUnknown
Removes the listener param listener the listener exception SWT Error ul li ERROR NULL ARGUMENT when listener is null li ul public void remove Property Listener int propertyID Ole Listener listener if listener null SWT error SWT ERROR NULL ARGUMENT ole Property Change Sink remove Listener propertyID listener  SWTError ERROR_NULL_ARGUMENT removePropertyListener OleListener ERROR_NULL_ARGUMENT olePropertyChangeSink removeListener
public void set Background Color color super set Background color set the background of the ActiveX Control if objI Unknown null Ole Automation ole Object new Ole Automation this ole Object set Property COM DISPID BACKCOLOR new Variant color handle ole Object dispose  setBackground setBackground objIUnknown OleAutomation oleObject OleAutomation oleObject setProperty DISPID_BACKCOLOR oleObject
public void set Font Font font super set Font font set the font of the ActiveX Control if objI Unknown null Ole Automation ole Object new Ole Automation this Variant var Disp Font ole Object get Property COM DISPID FONT ole Object dispose if var Disp Font null Ole Automation i Disp Font var Disp Font get Automation Font Data fdata font get Font Data i Disp Font set Property COM DISPID FONT NAME new Variant fdata 0 get Name i Disp Font set Property COM DISPID FONT SIZE new Variant fdata 0 get Height i Disp Font set Property COM DISPID FONT ITALIC new Variant fdata 0 get Style SWT ITALIC i Disp Font set Property COM DISPID FONT CHARSET new Variant fdata 0 get Charset i Disp Font set Property COM DISPID FONT BOLD new Variant fdata 0 get Style SWT BOLD i Disp Font dispose return  setFont setFont objIUnknown OleAutomation oleObject OleAutomation varDispFont oleObject getProperty DISPID_FONT oleObject varDispFont OleAutomation iDispFont varDispFont getAutomation FontData getFontData iDispFont setProperty DISPID_FONT_NAME getName iDispFont setProperty DISPID_FONT_SIZE getHeight iDispFont setProperty DISPID_FONT_ITALIC getStyle iDispFont setProperty DISPID_FONT_CHARSET getCharset iDispFont setProperty DISPID_FONT_BOLD getStyle iDispFont
public void set Foreground Color color super set Foreground color set the foreground of the ActiveX Control if objI Unknown null Ole Automation ole Object new Ole Automation this ole Object set Property COM DISPID FORECOLOR new Variant color handle ole Object dispose  setForeground setForeground objIUnknown OleAutomation oleObject OleAutomation oleObject setProperty DISPID_FORECOLOR oleObject
Sets the control site property specified by the disp Id Member to a new value The value will be disposed by the control site when it is no longer required using Variant dispose Passing a value of null will clear the disp Id value param disp Id the ID of the property as specified by the IDL of the ActiveX Control param value The new value for the property as expressed in a Variant since 2 1 public void set Site Property int disp Id Variant value for int i 0 i site Property Ids length i if site Property Ids i disp Id if site Property Values i null site Property Values i dispose if value null site Property Values i value else int old Length site Property Ids length int new Site Property Ids new int old Length 1 Variant new Site Property Values new Variant old Length 1 System arraycopy site Property Ids 0 new Site Property Ids 0 i System arraycopy site Property Ids i 1 new Site Property Ids i old Length i 1 System arraycopy site Property Values 0 new Site Property Values 0 i System arraycopy site Property Values i 1 new Site Property Values i old Length i 1 site Property Ids new Site Property Ids site Property Values new Site Property Values return int old Length site Property Ids length int new Site Property Ids new int old Length 1 Variant new Site Property Values new Variant old Length 1 System arraycopy site Property Ids 0 new Site Property Ids 0 old Length System arraycopy site Property Values 0 new Site Property Values 0 old Length new Site Property Ids old Length disp Id new Site Property Values old Length value site Property Ids new Site Property Ids site Property Values new Site Property Values  dispIdMember dispId dispId setSiteProperty dispId sitePropertyIds sitePropertyIds dispId sitePropertyValues sitePropertyValues sitePropertyValues oldLength sitePropertyIds newSitePropertyIds oldLength newSitePropertyValues oldLength sitePropertyIds newSitePropertyIds sitePropertyIds newSitePropertyIds oldLength sitePropertyValues newSitePropertyValues sitePropertyValues newSitePropertyValues oldLength sitePropertyIds newSitePropertyIds sitePropertyValues newSitePropertyValues oldLength sitePropertyIds newSitePropertyIds oldLength newSitePropertyValues oldLength sitePropertyIds newSitePropertyIds oldLength sitePropertyValues newSitePropertyValues oldLength newSitePropertyIds oldLength dispId newSitePropertyValues oldLength sitePropertyIds newSitePropertyIds sitePropertyValues newSitePropertyValues

Ole Event Sink Ole Control Site widget int i Unknown GUID riid this widget widget this event Guid riid this objI Unknown new I Unknown i Unknown createCOM Interfaces  OleEventSink OleControlSite iUnknown eventGuid objIUnknown IUnknown iUnknown createCOMInterfaces
void connect int ppv Object new int 1 if objI Unknown Query Interface COM IIDI Connection Point Container ppv Object COM S OK I Connection Point Container cpc new I Connection Point Container ppv Object 0 int ppCP new int 1 if cpc Find Connection Point event Guid ppCP COM S OK I Connection Point cp new I Connection Point ppCP 0 int p Cookie new int 1 if cp Advise i Dispatch get Address p Cookie COM S OK event Cookie p Cookie 0 cp Release cpc Release  ppvObject objIUnknown QueryInterface IIDIConnectionPointContainer ppvObject S_OK IConnectionPointContainer IConnectionPointContainer ppvObject FindConnectionPoint eventGuid S_OK IConnectionPoint IConnectionPoint pCookie iDispatch getAddress pCookie S_OK eventCookie pCookie
void add Listener int eventID Ole Listener listener if listener null OLE error SWT ERROR NULL ARGUMENT if event Table null event Table new Ole Event Table event Table hook eventID listener  addListener OleListener ERROR_NULL_ARGUMENT eventTable eventTable OleEventTable eventTable
event Table hook eventID listener int Add Ref ref Count return ref Count  eventTable AddRef refCount refCount
private void createCOM Interfaces i Dispatch new COM Object new int 2 0 0 1 3 4 8 public int method0 int args return Query Interface args 0 args 1  createCOMInterfaces iDispatch COMObject QueryInterface
i Dispatch new COM Object new int 2 0 0 1 3 4 8 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iDispatch COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
method4 Get Type Info not implemented method5 GetI Ds Of Names not implemented public int method6 int args return Invoke args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7  GetTypeInfo GetIDsOfNames
private void createCOM Interfaces i Dispatch new COM Object new int 2 0 0 1 3 4 8 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release method3 Get Type Info Count not implemented method4 Get Type Info not implemented method5 GetI Ds Of Names not implemented public int method6 int args return Invoke args 0 args 1 args 2 args 3 args 4 args 5 args 6 args 7  createCOMInterfaces iDispatch COMObject QueryInterface AddRef GetTypeInfoCount GetTypeInfo GetIDsOfNames
void disconnect disconnect event sink if event Cookie 0 objI Unknown null int ppv Object new int 1 if objI Unknown Query Interface COM IIDI Connection Point Container ppv Object COM S OK I Connection Point Container cpc new I Connection Point Container ppv Object 0 if cpc Find Connection Point event Guid ppv Object COM S OK I Connection Point cp new I Connection Point ppv Object 0 if cp Unadvise event Cookie COM S OK event Cookie 0 cp Release cpc Release  eventCookie objIUnknown ppvObject objIUnknown QueryInterface IIDIConnectionPointContainer ppvObject S_OK IConnectionPointContainer IConnectionPointContainer ppvObject FindConnectionPoint eventGuid ppvObject S_OK IConnectionPoint IConnectionPoint ppvObject eventCookie S_OK eventCookie
private void disposeCOM Interfaces if i Dispatch null i Dispatch dispose i Dispatch null  disposeCOMInterfaces iDispatch iDispatch iDispatch
private int Invoke int disp Id Member int riid int lcid int dw Flags int p Disp Params int p Var Result int p Excep Info int p Arg Err if event Table null event Table hooks disp Id Member return COM S OK Construct an array of the parameters that are passed in Note parameters are passed in reverse order here we will correct the order Variant event Info null if p Disp Params 0 DISPPARAMS disp Params new DISPPARAMS COM Move Memory disp Params p Disp Params DISPPARAMS sizeof event Info new Variant disp Params c Args int size Variant sizeof int offset disp Params c Args 1 size for int j 0 j disp Params c Args j event Info j new Variant event Info j set Data disp Params rgvarg offset offset offset size Ole Event event new Ole Event event arguments event Info try notify Listener disp Id Member event catch Throwable t return COM S OK  dispIdMember dwFlags pDispParams pVarResult pExcepInfo pArgErr eventTable eventTable dispIdMember S_OK eventInfo pDispParams dispParams MoveMemory dispParams pDispParams eventInfo dispParams cArgs dispParams cArgs dispParams cArgs eventInfo eventInfo setData dispParams OleEvent OleEvent eventInfo notifyListener dispIdMember S_OK
Notify listeners of an event p This method notifies all listeners that an event has occurred param event Type the desired SWT event param event the event data exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li li ERROR WIDGET DISPOSED when the widget has been disposed li li ERROR NULL ARGUMENT when handler is null li ul private void notify Listener int event Type Ole Event event if event null OLE error SWT ERROR NULL ARGUMENT if event Table null return event type event Type event widget widget event Table send Event event  eventType SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED ERROR_NULL_ARGUMENT notifyListener eventType OleEvent ERROR_NULL_ARGUMENT eventTable eventType eventTable sendEvent
private int Query Interface int riid int ppv Object if riid 0 ppv Object 0 return COM E INVALIDARG GUID guid new GUID COM Move Memory guid riid GUID sizeof if COM Is EqualGUID guid COM IIDI Unknown COM Is EqualGUID guid COM IIDI Dispatch COM Is EqualGUID guid event Guid COM Move Memory ppv Object new int i Dispatch get Address 4 Add Ref return OLE S OK COM Move Memory ppv Object new int 0 4 return COM E NOINTERFACE  QueryInterface ppvObject ppvObject E_INVALIDARG MoveMemory IsEqualGUID IIDIUnknown IsEqualGUID IIDIDispatch IsEqualGUID eventGuid MoveMemory ppvObject iDispatch getAddress AddRef S_OK MoveMemory ppvObject E_NOINTERFACE
int Release ref Count if ref Count 0 disposeCOM Interfaces return ref Count  refCount refCount disposeCOMInterfaces refCount
void remove Listener int eventID Ole Listener listener if listener null OLE error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook eventID listener  removeListener OleListener ERROR_NULL_ARGUMENT eventTable eventTable
event Table unhook eventID listener boolean has Listeners return event Table has Entries  eventTable hasListeners eventTable hasEntries

Ole Listener handlers void hook int event Type Ole Listener handler if types null types new int 4 if handlers null handlers new Ole Listener 4 for int i 0 i types length i if types i 0 types i event Type handlers i handler return int size types length int new Types new int size 4 Ole Listener new Handlers new Ole Listener size 4 System arraycopy types 0 new Types 0 size System arraycopy handlers 0 new Handlers 0 size types new Types handlers new Handlers types size event Type handlers size handler  OleListener eventType OleListener OleListener eventType newTypes OleListener newHandlers OleListener newTypes newHandlers newTypes newHandlers eventType
boolean hooks int event Type if handlers null return false for int i 0 i types length i if types i event Type return true return false  eventType eventType
void send Event Ole Event event if handlers null return for int i 0 i types length i if types i event type Ole Listener listener handlers i if listener null listener handle Event event  sendEvent OleEvent OleListener handleEvent
void unhook int event Type Ole Listener handler if handlers null return for int i 0 i types length i if types i event Type handlers i handler types i 0 handlers i null return  eventType OleListener eventType
boolean has Entries for int i 0 i types length i if types i 0 return true return false  hasEntries

listener new Listener public void handle Event Event e switch e type case SWT Dispose on Dispose e break case SWT Resize case SWT Move on Resize e break default OLE error SWT ERROR NOT IMPLEMENTED  handleEvent onDispose onResize ERROR_NOT_IMPLEMENTED
Create an Ole Frame child widget using style bits to select a particular look or set of properties param parent a composite widget cannot be null param style the bitwise OR ing of widget styles exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li ERROR ERROR NULL ARGUMENT when the parent is null li ERROR INTERFACES NOT INITIALIZED when unable to create callbacks for OLE Interfaces ul public Ole Frame Composite parent int style set up widget attributes super parent style SWT CLIP CHILDREN SWT CLIP SIBLINGS createCOM Interfaces setup cleanup proc listener new Listener public void handle Event Event e switch e type case SWT Dispose on Dispose e break case SWT Resize case SWT Move on Resize e break default OLE error SWT ERROR NOT IMPLEMENTED add Listener SWT Dispose listener inform inplaceactiveobject whenever frame resizes add Listener SWT Resize listener inform inplaceactiveobject whenever frame moves add Listener SWT Move listener Maintain a reference to yourself so that when Client Sites close they don t take the frame away with them this Add Ref Check for focus change Display display get Display init Check Focus display init Msg Hook display  OleFrame SWTError ERROR_THREAD_INVALID_ACCESS ERROR_ERROR_NULL_ARGUMENT ERROR_INTERFACES_NOT_INITIALIZED OleFrame CLIP_CHILDREN CLIP_SIBLINGS createCOMInterfaces handleEvent onDispose onResize ERROR_NOT_IMPLEMENTED addListener addListener addListener ClientSites AddRef getDisplay initCheckFocus initMsgHook
timer 0 new Runnable public void run if last Focus 0 instanceof Ole Client Site last Focus 0 is Disposed ignore popup menus and dialogs int hwnd OS Get Focus while hwnd 0 int owner Hwnd OS Get Window hwnd 4 GW OWNER if owner Hwnd 0 display timer Exec time timer 0 return hwnd OS Get Parent hwnd if last Focus 0 null last Focus 0 is Disposed last Focus 0 is Focus Control Control current Focus display get Focus Control if current Focus instanceof Ole Frame Ole Frame frame Ole Frame current Focus current Focus frame get Current Document if last Focus 0 current Focus Event event new Event if last Focus 0 instanceof Ole Client Site last Focus 0 is Disposed last Focus 0 notify Listeners SWT Focus Out event if current Focus instanceof Ole Client Site current Focus is Disposed current Focus notify Listeners SWT Focus In event last Focus 0 current Focus display timer Exec time timer 0  lastFocus OleClientSite lastFocus isDisposed GetFocus ownerHwnd GetWindow GW_OWNER ownerHwnd timerExec GetParent lastFocus lastFocus isDisposed lastFocus isFocusControl currentFocus getFocusControl currentFocus OleFrame OleFrame OleFrame currentFocus currentFocus getCurrentDocument lastFocus currentFocus lastFocus OleClientSite lastFocus isDisposed lastFocus notifyListeners FocusOut currentFocus OleClientSite currentFocus isDisposed currentFocus notifyListeners FocusIn lastFocus currentFocus timerExec
private static void init Check Focus final Display display if display get Data CHECK FOCUS null return display set Data CHECK FOCUS CHECK FOCUS final int time 50 final Runnable timer new Runnable 1 final Control last Focus new Control 1 timer 0 new Runnable public void run if last Focus 0 instanceof Ole Client Site last Focus 0 is Disposed ignore popup menus and dialogs int hwnd OS Get Focus while hwnd 0 int owner Hwnd OS Get Window hwnd 4 GW OWNER if owner Hwnd 0 display timer Exec time timer 0 return hwnd OS Get Parent hwnd if last Focus 0 null last Focus 0 is Disposed last Focus 0 is Focus Control Control current Focus display get Focus Control if current Focus instanceof Ole Frame Ole Frame frame Ole Frame current Focus current Focus frame get Current Document if last Focus 0 current Focus Event event new Event if last Focus 0 instanceof Ole Client Site last Focus 0 is Disposed last Focus 0 notify Listeners SWT Focus Out event if current Focus instanceof Ole Client Site current Focus is Disposed current Focus notify Listeners SWT Focus In event last Focus 0 current Focus display timer Exec time timer 0 display timer Exec time timer 0  initCheckFocus getData CHECK_FOCUS setData CHECK_FOCUS CHECK_FOCUS lastFocus lastFocus OleClientSite lastFocus isDisposed GetFocus ownerHwnd GetWindow GW_OWNER ownerHwnd timerExec GetParent lastFocus lastFocus isDisposed lastFocus isFocusControl currentFocus getFocusControl currentFocus OleFrame OleFrame OleFrame currentFocus currentFocus getCurrentDocument lastFocus currentFocus lastFocus OleClientSite lastFocus isDisposed lastFocus notifyListeners FocusOut currentFocus OleClientSite currentFocus isDisposed currentFocus notifyListeners FocusIn lastFocus currentFocus timerExec timerExec
display set Data HHOOKMSG new MSG display dispose Exec new Runnable public void run if h Hook 0 OS Unhook Windows Hook Ex h Hook if callback null callback dispose  setData disposeExec hHook UnhookWindowsHookEx hHook
private static void init Msg Hook Display display if display get Data HHOOK null return final Callback callback new Callback Ole Frame class get Msg Proc 3 NON NLS 1 int address callback get Address int thread Id OS Get Current Thread Id final int h Hook OS Set Windows Hook Ex OS WH GETMESSAGE address 0 thread Id if h Hook 0 callback dispose return display set Data HHOOK new Integer h Hook display set Data HHOOKMSG new MSG display dispose Exec new Runnable public void run if h Hook 0 OS Unhook Windows Hook Ex h Hook if callback null callback dispose  initMsgHook getData OleFrame getMsgProc getAddress threadId GetCurrentThreadId hHook SetWindowsHookEx WH_GETMESSAGE threadId hHook setData hHook setData disposeExec hHook UnhookWindowsHookEx hHook
static int get Msg Proc int code int w Param int l Param Display display Display get Current if display null return 0 Integer h Hook Integer display get Data HHOOK if h Hook null return 0 if code 0 return OS Call Next Hook Ex h Hook int Value code w Param l Param MSG msg MSG display get Data HHOOKMSG OS Move Memory msg l Param MSG sizeof int message msg message if OS WM KEYFIRST message message OS WM KEYLAST if display null Widget widget null int hwnd msg hwnd while hwnd 0 widget display find Widget hwnd if widget null break hwnd OS Get Parent hwnd if widget null widget instanceof Ole Client Site Ole Client Site site Ole Client Site widget if site handle hwnd Ole Frame frame site frame if frame translate Ole Accelerator msg In order to prevent this message from also being processed by the application zero out message w Param and l Param msg message OS WM NULL msg w Param 0 msg l Param 0 OS Move Memory l Param msg MSG sizeof return 0 return OS Call Next Hook Ex h Hook int Value code w Param l Param  getMsgProc wParam lParam getCurrent hHook getData hHook CallNextHookEx hHook intValue wParam lParam getData MoveMemory lParam WM_KEYFIRST WM_KEYLAST findWidget GetParent OleClientSite OleClientSite OleClientSite OleFrame translateOleAccelerator wParam lParam WM_NULL wParam lParam MoveMemory lParam CallNextHookEx hHook intValue wParam lParam
Increment the count of references to this instance return the current reference count int Add Ref ref Count return ref Count  AddRef refCount refCount
return ref Count private int Context Sensitive Help int f Enter Mode return COM S OK  refCount ContextSensitiveHelp fEnterMode S_OK
Create each of the interfaces that this object implements i Unknown new COM Object new int 2 0 0 public int method0 int args return Query Interface args 0 args 1  iUnknown COMObject QueryInterface
i Unknown new COM Object new int 2 0 0 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iUnknown COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
i Ole In Place Frame new COM Object new int 2 0 0 1 1 1 1 1 2 2 3 1 1 1 2 public int method0 int args return Query Interface args 0 args 1  iOleInPlaceFrame COMObject QueryInterface
i Ole In Place Frame new COM Object new int 2 0 0 1 1 1 1 1 2 2 3 1 1 1 2 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iOleInPlaceFrame COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Get Window args 0  AddRef GetWindow
public int method2 int args return Release public int method3 int args return Get Window args 0 public int method4 int args return Context Sensitive Help args 0  GetWindow ContextSensitiveHelp
public int method3 int args return Get Window args 0 public int method4 int args return Context Sensitive Help args 0 public int method5 int args return Get Border args 0  GetWindow ContextSensitiveHelp GetBorder
public int method4 int args return Context Sensitive Help args 0 public int method5 int args return Get Border args 0 public int method6 int args return Request Border Space args 0  ContextSensitiveHelp GetBorder RequestBorderSpace
public int method5 int args return Get Border args 0 public int method6 int args return Request Border Space args 0 public int method7 int args return Set Border Space args 0  GetBorder RequestBorderSpace SetBorderSpace
public int method6 int args return Request Border Space args 0 public int method7 int args return Set Border Space args 0 public int method8 int args return Set Active Object args 0 args 1  RequestBorderSpace SetBorderSpace SetActiveObject
public int method7 int args return Set Border Space args 0 public int method8 int args return Set Active Object args 0 args 1 public int method9 int args return Insert Menus args 0 args 1  SetBorderSpace SetActiveObject InsertMenus
public int method8 int args return Set Active Object args 0 args 1 public int method9 int args return Insert Menus args 0 args 1 public int method10 int args return Set Menu args 0 args 1 args 2  SetActiveObject InsertMenus SetMenu
public int method9 int args return Insert Menus args 0 args 1 public int method10 int args return Set Menu args 0 args 1 args 2 public int method11 int args return Remove Menus args 0  InsertMenus SetMenu RemoveMenus
method12 Set Status Text not implemented method13 Enable Modeless not implemented public int method14 int args return Translate Accelerator args 0 args 1  SetStatusText EnableModeless TranslateAccelerator
private void createCOM Interfaces Create each of the interfaces that this object implements i Unknown new COM Object new int 2 0 0 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release i Ole In Place Frame new COM Object new int 2 0 0 1 1 1 1 1 2 2 3 1 1 1 2 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return Get Window args 0 public int method4 int args return Context Sensitive Help args 0 public int method5 int args return Get Border args 0 public int method6 int args return Request Border Space args 0 public int method7 int args return Set Border Space args 0 public int method8 int args return Set Active Object args 0 args 1 public int method9 int args return Insert Menus args 0 args 1 public int method10 int args return Set Menu args 0 args 1 args 2 public int method11 int args return Remove Menus args 0 method12 Set Status Text not implemented method13 Enable Modeless not implemented public int method14 int args return Translate Accelerator args 0 args 1  createCOMInterfaces iUnknown COMObject QueryInterface AddRef iOleInPlaceFrame COMObject QueryInterface AddRef GetWindow ContextSensitiveHelp GetBorder RequestBorderSpace SetBorderSpace SetActiveObject InsertMenus SetMenu RemoveMenus SetStatusText EnableModeless TranslateAccelerator
private void disposeCOM Interfaces if i Unknown null i Unknown dispose i Unknown null if i Ole In Place Frame null i Ole In Place Frame dispose i Ole In Place Frame null  disposeCOMInterfaces iUnknown iUnknown iUnknown iOleInPlaceFrame iOleInPlaceFrame iOleInPlaceFrame
private int Get Border int lprect Border The I Ole In PlaceUI Window Get Border function when called on a document or frame window object returns the outer rectangle relative to the window where the object can put toolbars or similar controls if lprect Border 0 return COM E INVALIDARG RECT rect Border new RECT Coordinates must be relative to the window OS Get Client Rect handle rect Border OS Move Memory lprect Border rect Border RECT sizeof return COM S OK  GetBorder lprectBorder IOleInPlaceUIWindow GetBorder lprectBorder E_INVALIDARG rectBorder GetClientRect rectBorder MoveMemory lprectBorder rectBorder S_OK
Returns the application menu items that will appear in the Container location when an OLE Document is in place activated p When an OLE Document is in place active the Document provides its own menus but the application is given the opportunity to merge some of its menus into the menubar The application is allowed to insert its menus in three locations File far left Container middle and Window far right just before Help The OLE Document retains control of the Edit Object and Help menu locations Note that an application can insert more than one menu into a single location return the application menu items that will appear in the Container location when an OLE Document is in place activated public Menu Item get Container Menus return container Menu Items  MenuItem getContainerMenus containerMenuItems
Returns the application menu items that will appear in the File location when an OLE Document is in place activated p When an OLE Document is in place active the Document provides its own menus but the application is given the opportunity to merge some of its menus into the menubar The application is allowed to insert its menus in three locations File far left Container middle and Window far right just before Help The OLE Document retains control of the Edit Object and Help menu locations Note that an application can insert more than one menu into a single location return the application menu items that will appear in the File location when an OLE Document is in place activated public Menu Item get File Menus return file Menu Items  MenuItem getFileMenus fileMenuItems
return file Menu Items int getI Ole In Place Frame return i Ole In Place Frame get Address  fileMenuItems getIOleInPlaceFrame iOleInPlaceFrame getAddress
private int get Menu ItemID int h Menu int index int id 0 MENUITEMINFO lpmii new MENUITEMINFO lpmii cb Size MENUITEMINFO sizeof lpmii f Mask OS MIIM STATE OS MIIM SUBMENU OS MIIM ID OS Get Menu Item Info h Menu index true lpmii if lpmii f State OS MF POPUP OS MF POPUP id lpmii h Sub Menu else id lpmii wID return id  getMenuItemID hMenu cbSize fMask MIIM_STATE MIIM_SUBMENU MIIM_ID GetMenuItemInfo hMenu fState MF_POPUP MF_POPUP hSubMenu
private int Get Window int phwnd if phwnd 0 COM Move Memory phwnd new int handle 4 return COM S OK  GetWindow MoveMemory S_OK
Returns the application menu items that will appear in the Window location when an OLE Document is in place activated p When an OLE Document is in place active the Document provides its own menus but the application is given the opportunity to merge some of its menus into the menubar The application is allowed to insert its menus in three locations File far left Container middle and Window far right just before Help The OLE Document retains control of the Edit Object and Help menu locations Note that an application can insert more than one menu into a single location return the application menu items that will appear in the Window location when an OLE Document is in place activated public Menu Item get Window Menus return window Menu Items  MenuItem getWindowMenus windowMenuItems
private int Insert Menus int hmenu Shared int lp Menu Widths locate menu bar Menu menubar get Shell get Menu Bar if menubar null menubar is Disposed COM Move Memory lp Menu Widths new int 0 4 return COM S OK int h Menu menubar handle Create a holder for menu information This will be passed down to the OS and the OS will fill in the requested information for each menu MENUITEMINFO lpmii new MENUITEMINFO int h Heap OS Get Process Heap int cch 128 int byte Count cch TCHAR sizeof int psz Text OS Heap Alloc h Heap OS HEAP ZERO MEMORY byte Count lpmii cb Size MENUITEMINFO sizeof lpmii f Mask OS MIIM STATE OS MIIM ID OS MIIM TYPE OS MIIM SUBMENU OS MIIM DATA lpmii dw Type Data psz Text lpmii cch cch Loop over all File like menus in the menubar and get information about the item from the OS int file Menu Count 0 int newindex 0 if this file Menu Items null for int i 0 i this file Menu Items length i Menu Item item this file Menu Items i if item null int index item get Parent index Of item lpmii cch cch lpmii cch gets updated by Get Menu Item Info to indicate the exact number of characters in name Reset it to our max size before each call if OS Get Menu Item Info h Menu index true lpmii if OS Insert Menu Item hmenu Shared newindex true lpmii keep track of the number of items file Menu Count newindex copy the menu item count information to the pointer COM Move Memory lp Menu Widths new int file Menu Count 4 Loop over all Container like menus in the menubar and get information about the item from the OS int container Menu Count 0 if this container Menu Items null for int i 0 i this container Menu Items length i Menu Item item this container Menu Items i if item null int index item get Parent index Of item lpmii cch cch lpmii cch gets updated by Get Menu Item Info to indicate the exact nuber of characters in name Reset it to a large number before each call if OS Get Menu Item Info h Menu index true lpmii if OS Insert Menu Item hmenu Shared newindex true lpmii keep track of the number of items container Menu Count newindex copy the menu item count information to the pointer COM Move Memory lp Menu Widths 8 new int container Menu Count 4 Loop over all Window like menus in the menubar and get information about the item from the OS int window Menu Count 0 if this window Menu Items null for int i 0 i this window Menu Items length i Menu Item item this window Menu Items i if item null int index item get Parent index Of item lpmii cch cch lpmii cch gets updated by Get Menu Item Info to indicate the exact nuber of characters in name Reset it to a large number before each call if OS Get Menu Item Info h Menu index true lpmii if OS Insert Menu Item hmenu Shared newindex true lpmii keep track of the number of items window Menu Count newindex copy the menu item count information to the pointer COM Move Memory lp Menu Widths 16 new int window Menu Count 4 free resources used in querying the OS if psz Text 0 OS Heap Free h Heap 0 psz Text return COM S OK  InsertMenus hmenuShared lpMenuWidths getShell getMenuBar isDisposed MoveMemory lpMenuWidths S_OK hMenu hHeap GetProcessHeap byteCount pszText HeapAlloc hHeap HEAP_ZERO_MEMORY byteCount cbSize fMask MIIM_STATE MIIM_ID MIIM_TYPE MIIM_SUBMENU MIIM_DATA dwTypeData pszText fileMenuCount fileMenuItems fileMenuItems MenuItem fileMenuItems getParent indexOf GetMenuItemInfo GetMenuItemInfo hMenu InsertMenuItem hmenuShared fileMenuCount MoveMemory lpMenuWidths fileMenuCount containerMenuCount containerMenuItems containerMenuItems MenuItem containerMenuItems getParent indexOf GetMenuItemInfo GetMenuItemInfo hMenu InsertMenuItem hmenuShared containerMenuCount MoveMemory lpMenuWidths containerMenuCount windowMenuCount windowMenuItems windowMenuItems MenuItem windowMenuItems getParent indexOf GetMenuItemInfo GetMenuItemInfo hMenu InsertMenuItem hmenuShared windowMenuCount MoveMemory lpMenuWidths windowMenuCount pszText HeapFree hHeap pszText S_OK
private void on Dispose Event e release Object Interfaces currentdoc null this Release remove Listener SWT Dispose listener remove Listener SWT Resize listener remove Listener SWT Move listener  onDispose releaseObjectInterfaces removeListener removeListener removeListener
private void on Resize Event e if objI Ole In Place Active Object null RECT lp Rect new RECT OS Get Client Rect handle lp Rect objI Ole In Place Active Object Resize Border lp Rect i Ole In Place Frame get Address true  onResize objIOleInPlaceActiveObject lpRect GetClientRect lpRect objIOleInPlaceActiveObject ResizeBorder lpRect iOleInPlaceFrame getAddress
private int Query Interface int riid int ppv Object implements I Unknown I Ole In Place Frame I Ole Container I Ole In PlaceUI Window if riid 0 ppv Object 0 return COM E INVALIDARG GUID guid new GUID COM Move Memory guid riid GUID sizeof if COM Is EqualGUID guid COM IIDI Unknown COM Is EqualGUID guid COM IIDI Ole In Place Frame COM Move Memory ppv Object new int i Ole In Place Frame get Address 4 Add Ref return COM S OK COM Move Memory ppv Object new int 0 4 return COM E NOINTERFACE  QueryInterface ppvObject IUnknown IOleInPlaceFrame IOleContainer IOleInPlaceUIWindow ppvObject E_INVALIDARG MoveMemory IsEqualGUID IIDIUnknown IsEqualGUID IIDIOleInPlaceFrame MoveMemory ppvObject iOleInPlaceFrame getAddress AddRef S_OK MoveMemory ppvObject E_NOINTERFACE
Decrement the count of references to this instance return the current reference count int Release ref Count if ref Count 0 disposeCOM Interfaces COM Co Free Unused Libraries return ref Count  refCount refCount disposeCOMInterfaces CoFreeUnusedLibraries refCount
private void release Object Interfaces if objI Ole In Place Active Object null objI Ole In Place Active Object Release objI Ole In Place Active Object null  releaseObjectInterfaces objIOleInPlaceActiveObject objIOleInPlaceActiveObject objIOleInPlaceActiveObject
private int Remove Menus int hmenu Shared Menu menubar get Shell get Menu Bar if menubar null menubar is Disposed return COM S FALSE int h Menu menubar handle Vector ids new Vector if this file Menu Items null for int i 0 i this file Menu Items length i Menu Item item this file Menu Items i if item null item is Disposed int index item get Parent index Of item get Id from original menubar int id get Menu ItemID h Menu index ids add Element new Integer id if this container Menu Items null for int i 0 i this container Menu Items length i Menu Item item this container Menu Items i if item null item is Disposed int index item get Parent index Of item int id get Menu ItemID h Menu index ids add Element new Integer id if this window Menu Items null for int i 0 i this window Menu Items length i Menu Item item this window Menu Items i if item null item is Disposed int index item get Parent index Of item int id get Menu ItemID h Menu index ids add Element new Integer id int index OS Get Menu Item Count hmenu Shared 1 for int i index i 0 i int id get Menu ItemID hmenu Shared i if ids contains new Integer id OS Remove Menu hmenu Shared i OS MF BYPOSITION return COM S OK  RemoveMenus hmenuShared getShell getMenuBar isDisposed S_FALSE hMenu fileMenuItems fileMenuItems MenuItem fileMenuItems isDisposed getParent indexOf getMenuItemID hMenu addElement containerMenuItems containerMenuItems MenuItem containerMenuItems isDisposed getParent indexOf getMenuItemID hMenu addElement windowMenuItems windowMenuItems MenuItem windowMenuItems isDisposed getParent indexOf getMenuItemID hMenu addElement GetMenuItemCount hmenuShared getMenuItemID hmenuShared RemoveMenu hmenuShared MF_BYPOSITION S_OK
return COM S OK private int Request Border Space int pborderwidths return COM S OK  S_OK RequestBorderSpace S_OK
int Set Active Object int p Active Object int psz Obj Name if objI Ole In Place Active Object null objI Ole In Place Active Object Release objI Ole In Place Active Object null if p Active Object 0 objI Ole In Place Active Object new I Ole In Place Active Object p Active Object objI Ole In Place Active Object Add Ref return COM S OK  SetActiveObject pActiveObject pszObjName objIOleInPlaceActiveObject objIOleInPlaceActiveObject objIOleInPlaceActiveObject pActiveObject objIOleInPlaceActiveObject IOleInPlaceActiveObject pActiveObject objIOleInPlaceActiveObject AddRef S_OK
private int Set Border Space int pborderwidths A Control Document can Use its own toolbars requesting border space of a specific size or Use no toolbars but force the container to remove its toolbars by passing a valid BORDERWIDTHS structure containing nothing but zeros in the pborderwidths parameter or Use no toolbars but allow the in place container to leave its toolbars up by passing NULL as the pborderwidths parameter if objI Ole In Place Active Object null return COM S OK RECT borderwidth new RECT if pborderwidths 0 currentdoc null return COM S OK COM Move Memory borderwidth pborderwidths RECT sizeof currentdoc set Border Space borderwidth return COM S OK  SetBorderSpace objIOleInPlaceActiveObject S_OK S_OK MoveMemory setBorderSpace S_OK
Specify the menu items that should appear in the Container location when an OLE Document is in place activated p When an OLE Document is in place active the Document provides its own menus but the application is given the opportunity to merge some of its menus into the menubar The application is allowed to insert its menus in three locations File far left Container middle and Window far right just before Help The OLE Document retains control of the Edit Object and Help menu locations Note that an application can insert more than one menu into a single location p This method must be called before in place activation of the OLE Document After the Document is activated the menu bar will not be modified until a subsequent activation param container Menus an array of top level Menu Items to be inserted into the Container location of the menubar public void set Container Menus Menu Item container Menus container Menu Items container Menus  containerMenus MenuItems setContainerMenus MenuItem containerMenus containerMenuItems containerMenus
container Menu Items container Menus Ole Client Site get Current Document return currentdoc  containerMenuItems containerMenus OleClientSite getCurrentDocument
void set Current Document Ole Client Site doc currentdoc doc if currentdoc null objI Ole In Place Active Object null RECT lp Rect new RECT OS Get Client Rect handle lp Rect objI Ole In Place Active Object Resize Border lp Rect i Ole In Place Frame get Address true  setCurrentDocument OleClientSite objIOleInPlaceActiveObject lpRect GetClientRect lpRect objIOleInPlaceActiveObject ResizeBorder lpRect iOleInPlaceFrame getAddress
Specify the menu items that should appear in the File location when an OLE Document is in place activated p When an OLE Document is in place active the Document provides its own menus but the application is given the opportunity to merge some of its menus into the menubar The application is allowed to insert its menus in three locations File far left Container middle and Window far right just before Help The OLE Document retains control of the Edit Object and Help menu locations Note that an application can insert more than one menu into a single location p This method must be called before in place activation of the OLE Document After the Document is activated the menu bar will not be modified until a subsequent activation param file Menus an array of top level Menu Items to be inserted into the Flie location of the menubar public void set File Menus Menu Item file Menus file Menu Items file Menus  fileMenus MenuItems setFileMenus MenuItem fileMenus fileMenuItems fileMenus
private int Set Menu int hmenu Shared int holemenu int hwnd Active Object int in Place Active Object 0 if objI Ole In Place Active Object null in Place Active Object objI Ole In Place Active Object get Address Menu menubar get Shell get Menu Bar if menubar null menubar is Disposed return COM Ole Set Menu Descriptor 0 get Shell handle hwnd Active Object i Ole In Place Frame get Address in Place Active Object int handle menubar get Shell handle if hmenu Shared 0 holemenu 0 re instate the original menu this occurs on deactivation hmenu Shared menubar handle if hmenu Shared 0 return COM E FAIL OS Set Menu handle hmenu Shared OS Draw Menu Bar handle return COM Ole Set Menu Descriptor holemenu handle hwnd Active Object i Ole In Place Frame get Address in Place Active Object  SetMenu hmenuShared hwndActiveObject inPlaceActiveObject objIOleInPlaceActiveObject inPlaceActiveObject objIOleInPlaceActiveObject getAddress getShell getMenuBar isDisposed OleSetMenuDescriptor getShell hwndActiveObject iOleInPlaceFrame getAddress inPlaceActiveObject getShell hmenuShared hmenuShared hmenuShared E_FAIL SetMenu hmenuShared DrawMenuBar OleSetMenuDescriptor hwndActiveObject iOleInPlaceFrame getAddress inPlaceActiveObject
Set the menu items that should appear in the Window location when an OLE Document is in place activated p When an OLE Document is in place active the Document provides its own menus but the application is given the opportunity to merge some of its menus into the menubar The application is allowed to insert its menus in three locations File far left Container middle and Window far right just before Help The OLE Document retains control of the Edit Object and Help menu locations Note that an application can insert more than one menu into a single location p This method must be called before in place activation of the OLE Document After the Document is activated the menu bar will not be modified until a subsequent activation param window Menus an array of top level Menu Items to be inserted into the Window location of the menubar public void set Window Menus Menu Item window Menus window Menu Items window Menus  windowMenus MenuItems setWindowMenus MenuItem windowMenus windowMenuItems windowMenus
private boolean translate Ole Accelerator MSG msg if objI Ole In Place Active Object null return false int result objI Ole In Place Active Object Translate Accelerator msg return result COM S FALSE result COM E NOTIMPL  translateOleAccelerator objIOleInPlaceActiveObject objIOleInPlaceActiveObject TranslateAccelerator S_FALSE E_NOTIMPL
private int Translate Accelerator int lpmsg int wID Menu menubar get Shell get Menu Bar if menubar null menubar is Disposed menubar is Enabled return COM S FALSE if wID 0 return COM S FALSE Shell shell menubar get Shell int hwnd shell handle int h Accel OS Send Message hwnd OS WM APP 1 0 0 if h Accel 0 return COM S FALSE MSG msg new MSG OS Move Memory msg lpmsg MSG sizeof int result OS Translate Accelerator hwnd h Accel msg return result 0 COM S FALSE COM S OK  TranslateAccelerator getShell getMenuBar isDisposed isEnabled S_FALSE S_FALSE getShell hAccel SendMessage WM_APP hAccel S_FALSE MoveMemory TranslateAccelerator hAccel S_FALSE S_OK

public interface Ole Listener public void handle Event Ole Event event  OleListener handleEvent OleEvent

Ole Property Change Sink Ole Control Site control Site this control Site control Site createCOM Interfaces  OlePropertyChangeSink OleControlSite controlSite controlSite controlSite createCOMInterfaces
void add Listener int propertyID Ole Listener listener if listener null OLE error SWT ERROR NULL ARGUMENT if event Table null event Table new Ole Event Table event Table hook propertyID listener  addListener OleListener ERROR_NULL_ARGUMENT eventTable eventTable OleEventTable eventTable
event Table hook propertyID listener int Add Ref ref Count return ref Count  eventTable AddRef refCount refCount
void connect I Unknown objI Unknown Set up property change notification sink int ppv Object new int 1 if objI Unknown Query Interface COM IIDI Connection Point Container ppv Object COM S OK I Connection Point Container cpc new I Connection Point Container ppv Object 0 if cpc Find Connection Point COM IIDI Property Notify Sink ppv Object COM S OK I Connection Point cp new I Connection Point ppv Object 0 int cookie new int 1 if cp Advise i Property Notify Sink get Address cookie COM S OK property Cookie cookie 0 cp Release cpc Release  IUnknown objIUnknown ppvObject objIUnknown QueryInterface IIDIConnectionPointContainer ppvObject S_OK IConnectionPointContainer IConnectionPointContainer ppvObject FindConnectionPoint IIDIPropertyNotifySink ppvObject S_OK IConnectionPoint IConnectionPoint ppvObject iPropertyNotifySink getAddress S_OK propertyCookie
register each of the interfaces that this object implements i Unknown new COM Object new int 2 0 0 public int method0 int args return Query Interface args 0 args 1  iUnknown COMObject QueryInterface
i Unknown new COM Object new int 2 0 0 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iUnknown COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
i Property Notify Sink new COM Object new int 2 0 0 1 1 public int method0 int args return Query Interface args 0 args 1  iPropertyNotifySink COMObject QueryInterface
i Property Notify Sink new COM Object new int 2 0 0 1 1 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref  iPropertyNotifySink COMObject QueryInterface AddRef
public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release  QueryInterface AddRef
public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return On Changed args 0  AddRef OnChanged
public int method2 int args return Release public int method3 int args return On Changed args 0 public int method4 int args return On Request Edit args 0  OnChanged OnRequestEdit
private void createCOM Interfaces register each of the interfaces that this object implements i Unknown new COM Object new int 2 0 0 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release i Property Notify Sink new COM Object new int 2 0 0 1 1 public int method0 int args return Query Interface args 0 args 1 public int method1 int args return Add Ref public int method2 int args return Release public int method3 int args return On Changed args 0 public int method4 int args return On Request Edit args 0  createCOMInterfaces iUnknown COMObject QueryInterface AddRef iPropertyNotifySink COMObject QueryInterface AddRef OnChanged OnRequestEdit
void disconnect I Unknown objI Unknown disconnect property notification sink if property Cookie 0 objI Unknown null int ppv Object new int 1 if objI Unknown Query Interface COM IIDI Connection Point Container ppv Object COM S OK I Connection Point Container cpc new I Connection Point Container ppv Object 0 if cpc Find Connection Point COM IIDI Property Notify Sink ppv Object COM S OK I Connection Point cp new I Connection Point ppv Object 0 if cp Unadvise property Cookie COM S OK property Cookie 0 cp Release cpc Release  IUnknown objIUnknown propertyCookie objIUnknown ppvObject objIUnknown QueryInterface IIDIConnectionPointContainer ppvObject S_OK IConnectionPointContainer IConnectionPointContainer ppvObject FindConnectionPoint IIDIPropertyNotifySink ppvObject S_OK IConnectionPoint IConnectionPoint ppvObject propertyCookie S_OK propertyCookie
private void disposeCOM Interfaces if i Unknown null i Unknown dispose i Unknown null if i Property Notify Sink null i Property Notify Sink dispose i Property Notify Sink null  disposeCOMInterfaces iUnknown iUnknown iUnknown iPropertyNotifySink iPropertyNotifySink iPropertyNotifySink
Notify listeners of an event p This method notifies all listeners that an event has occurred param event Type the desired SWT event param event the event data exception SWT Error ul li ERROR THREAD INVALID ACCESS when called from the wrong thread li li ERROR WIDGET DISPOSED when the widget has been disposed li li ERROR NULL ARGUMENT when handler is null li ul private void notify Listener int event Type Ole Event event if event null OLE error SWT ERROR NULL ARGUMENT if event Table null return event type event Type event widget control Site event Table send Event event  eventType SWTError ERROR_THREAD_INVALID_ACCESS ERROR_WIDGET_DISPOSED ERROR_NULL_ARGUMENT notifyListener eventType OleEvent ERROR_NULL_ARGUMENT eventTable eventType controlSite eventTable sendEvent
private int On Changed int dispID if event Table null event Table hooks dispID return COM S OK Ole Event event new Ole Event event detail OLE PROPERTY CHANGED try notify Listener dispID event catch Throwable e return COM S OK  OnChanged eventTable eventTable S_OK OleEvent OleEvent PROPERTY_CHANGED notifyListener S_OK
private int On Request Edit int dispID if event Table null event Table hooks dispID return COM S OK Ole Event event new Ole Event event doit true event detail OLE PROPERTY CHANGING try notify Listener dispID event catch Throwable e if event doit return COM S OK return COM S FALSE  OnRequestEdit eventTable eventTable S_OK OleEvent OleEvent PROPERTY_CHANGING notifyListener S_OK S_FALSE
private int Query Interface int riid int ppv Object if riid 0 ppv Object 0 return COM E INVALIDARG GUID guid new GUID COM Move Memory guid riid GUID sizeof if COM Is EqualGUID guid COM IIDI Unknown COM Move Memory ppv Object new int i Unknown get Address 4 Add Ref return COM S OK if COM Is EqualGUID guid COM IIDI Property Notify Sink COM Move Memory ppv Object new int i Property Notify Sink get Address 4 Add Ref return COM S OK COM Move Memory ppv Object new int 0 4 return COM E NOINTERFACE  QueryInterface ppvObject ppvObject E_INVALIDARG MoveMemory IsEqualGUID IIDIUnknown MoveMemory ppvObject iUnknown getAddress AddRef S_OK IsEqualGUID IIDIPropertyNotifySink MoveMemory ppvObject iPropertyNotifySink getAddress AddRef S_OK MoveMemory ppvObject E_NOINTERFACE
int Release ref Count if ref Count 0 disposeCOM Interfaces return ref Count  refCount refCount disposeCOMInterfaces refCount
void remove Listener int propertyID Ole Listener listener if listener null OLE error SWT ERROR NULL ARGUMENT if event Table null return event Table unhook propertyID listener  removeListener OleListener ERROR_NULL_ARGUMENT eventTable eventTable

Create an empty Variant object with type VT EMPTY since 2 0 public Variant type COM VT EMPTY  VT_EMPTY VT_EMPTY
Create a Variant object which represents a Java float as a VT R4 param val the Java float value that this Variant represents public Variant float val type COM VT R4 float Data val  VT_R4 VT_R4 floatData
Create a Variant object which represents a Java int as a VT I4 param val the Java int value that this Variant represents public Variant int val type COM VT I4 int Data val  VT_I4 VT_I4 intData
Create a Variant object which contains a reference to the data being transferred p When creating a VT BYREF Variant you must give the full Variant type including VT BYREF such as pre code short by Ref Type OLE VT BSTR OLE VT BYREF code pre param ptr a pointer to the data being transferred param by Ref Type the type of the data being transferred such as OLE VT BSTR OLE VT BYREF public Variant int ptr short by Ref Type type by Ref Type by Ref Ptr ptr  VT_BYREF VT_BYREF byRefType VT_BSTR VT_BYREF byRefType VT_BSTR VT_BYREF byRefType byRefType byRefPtr
Create a Variant object which represents an I Dispatch interface as a VT Dispatch param automation the Ole Automation object that this Variant represents public Variant Ole Automation automation type COM VT DISPATCH dispatch Data new I Dispatch automation get Address  IDispatch VT_Dispatch OleAutomation OleAutomation VT_DISPATCH dispatchData IDispatch getAddress
Create a Variant object which represents an I Dispatch interface as a VT Dispatch p The caller is expected to have appropriately invoked unknown Add Ref before creating this Variant since 2 0 param idispatch the I Dispatch object that this Variant represents public Variant I Dispatch idispatch type COM VT DISPATCH dispatch Data idispatch  IDispatch VT_Dispatch AddRef IDispatch IDispatch VT_DISPATCH dispatchData
Create a Variant object which represents an I Unknown interface as a VT UNKNOWN p The caller is expected to have appropriately invoked unknown Add Ref before creating this Variant param unknown the I Unknown object that this Variant represents public Variant I Unknown unknown type COM VT UNKNOWN unknown Data unknown  IUnknown VT_UNKNOWN AddRef IUnknown IUnknown VT_UNKNOWN unknownData
Create a Variant object which represents a Java String as a VT BSTR param string the Java String value that this Variant represents public Variant String string type COM VT BSTR string Data string  VT_BSTR VT_BSTR stringData
Create a Variant object which represents a Java short as a VT I2 param val the Java short value that this Variant represents public Variant short val type COM VT I2 short Data val  VT_I2 VT_I2 shortData
Create a Variant object which represents a Java boolean as a VT BOOL param val the Java boolean value that this Variant represents public Variant boolean val type COM VT BOOL boolean Data val  VT_BOOL VT_BOOL booleanData
Calling dispose will release resources associated with this Variant If the resource is an I Dispatch or I Unknown interface Release will be called If the resource is a By Ref pointer nothing is released since 2 1 public void dispose if type COM VT BYREF COM VT BYREF return switch type case COM VT EMPTY case COM VT BOOL case COM VT R4 case COM VT I4 case COM VT I2 case COM VT BSTR break case COM VT DISPATCH dispatch Data Release break case COM VT UNKNOWN unknown Data Release break  IDispatch IUnknown ByRef VT_BYREF VT_BYREF VT_EMPTY VT_BOOL VT_R4 VT_I4 VT_I2 VT_BSTR VT_DISPATCH dispatchData VT_UNKNOWN unknownData
Returns the Ole Automation object represented by this Variant p If this Variant does not contain an Ole Automation object an attempt is made to coerce the Variant type into an Ole Automation object If this fails an error is thrown Note that Ole Automation objects must be disposed when no longer needed return the Ole Automation object represented by this Variant exception SWT Error ERROR CANNOT CHANGE VARIANT TYPE when type of Variant can not be coerced into an Ole Automation object public Ole Automation get Automation if type COM VT EMPTY OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE 1 if type COM VT DISPATCH return new Ole Automation dispatch Data try to coerce the value to the desired type int old Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof int new Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof try get Data old Ptr int result COM Variant Change Type new Ptr old Ptr short 0 COM VT DISPATCH if result COM S OK OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE result Variant auto Var new Variant auto Var set Data new Ptr return auto Var get Automation finally COM Variant Clear old Ptr OS Global Free old Ptr COM Variant Clear new Ptr Note This must absolutely be done AFTER the Ole Automation object is created as Variant Clear will result in a Release being performed on the Dispatch object OS Global Free new Ptr  OleAutomation OleAutomation OleAutomation OleAutomation OleAutomation SWTError ERROR_CANNOT_CHANGE_VARIANT_TYPE OleAutomation OleAutomation getAutomation VT_EMPTY ERROR_CANNOT_CHANGE_VARIANT_TYPE VT_DISPATCH OleAutomation dispatchData oldPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT newPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT getData oldPtr VariantChangeType newPtr oldPtr VT_DISPATCH S_OK ERROR_CANNOT_CHANGE_VARIANT_TYPE autoVar autoVar setData newPtr autoVar getAutomation VariantClear oldPtr GlobalFree oldPtr VariantClear newPtr OleAutomation GlobalFree newPtr
Returns the I Dispatch object represented by this Variant p If this Variant does not contain an I Dispatch object an attempt is made to coerce the Variant type into an ID Ispatch object If this fails an error is thrown since 2 0 return the I Dispatch object represented by this Variant exception SWT Error ERROR CANNOT CHANGE VARIANT TYPE when type of Variant can not be coerced into an I Dispatch object public I Dispatch get Dispatch if type COM VT EMPTY OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE 1 if type COM VT DISPATCH return dispatch Data try to coerce the value to the desired type int old Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof int new Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof try get Data old Ptr int result COM Variant Change Type new Ptr old Ptr short 0 COM VT DISPATCH if result COM S OK OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE result Variant auto Var new Variant auto Var set Data new Ptr return auto Var get Dispatch finally COM Variant Clear old Ptr OS Global Free old Ptr COM Variant Clear new Ptr Note This must absolutely be done AFTER the Ole Automation object is created as Variant Clear will result in a Release being performed on the Dispatch object OS Global Free new Ptr  IDispatch IDispatch IDIspatch IDispatch SWTError ERROR_CANNOT_CHANGE_VARIANT_TYPE IDispatch IDispatch getDispatch VT_EMPTY ERROR_CANNOT_CHANGE_VARIANT_TYPE VT_DISPATCH dispatchData oldPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT newPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT getData oldPtr VariantChangeType newPtr oldPtr VT_DISPATCH S_OK ERROR_CANNOT_CHANGE_VARIANT_TYPE autoVar autoVar setData newPtr autoVar getDispatch VariantClear oldPtr GlobalFree oldPtr VariantClear newPtr OleAutomation GlobalFree newPtr
Returns the Java boolean represented by this Variant p If this Variant does not contain a Java boolean an attempt is made to coerce the Variant type into a Java boolean If this fails an error is thrown return the Java boolean represented by this Variant exception SWT Error ul li ERROR CANNOT CHANGE VARIANT TYPE when type of Variant can not be coerced into a boolean ul public boolean get Boolean if type COM VT EMPTY OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE 1 if type COM VT BOOL return boolean Data try to coerce the value to the desired type int old Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof int new Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof try get Data old Ptr int result COM Variant Change Type new Ptr old Ptr short 0 COM VT BOOL if result COM S OK OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE result Variant bool Var new Variant bool Var set Data new Ptr return bool Var get Boolean finally COM Variant Clear old Ptr OS Global Free old Ptr COM Variant Clear new Ptr OS Global Free new Ptr  SWTError ERROR_CANNOT_CHANGE_VARIANT_TYPE getBoolean VT_EMPTY ERROR_CANNOT_CHANGE_VARIANT_TYPE VT_BOOL booleanData oldPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT newPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT getData oldPtr VariantChangeType newPtr oldPtr VT_BOOL S_OK ERROR_CANNOT_CHANGE_VARIANT_TYPE boolVar boolVar setData newPtr boolVar getBoolean VariantClear oldPtr GlobalFree oldPtr VariantClear newPtr GlobalFree newPtr
Returns a pointer to the referenced data represented by this Variant p If this Variant does not contain a reference to data zero is returned return a pointer to the referenced data represented by this Variant or 0 public int get By Ref if type COM VT EMPTY OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE 1 if type COM VT BYREF COM VT BYREF return by Ref Ptr return 0  getByRef VT_EMPTY ERROR_CANNOT_CHANGE_VARIANT_TYPE VT_BYREF VT_BYREF byRefPtr
void get Data int p Data if p Data 0 OLE error OLE ERROR OUT OF MEMORY COM Variant Init p Data if type COM VT BYREF COM VT BYREF COM Move Memory p Data new short type 2 COM Move Memory p Data 8 new int by Ref Ptr 4 return switch type case COM VT EMPTY break case COM VT BOOL COM Move Memory p Data new short type 2 COM Move Memory p Data 8 new int boolean Data COM VARIANT TRUE COM VARIANT FALSE 2 break case COM VT R4 COM Move Memory p Data new short type 2 COM Move Memory p Data 8 new float float Data 4 break case COM VT I4 COM Move Memory p Data new short type 2 COM Move Memory p Data 8 new int int Data 4 break case COM VT DISPATCH dispatch Data Add Ref COM Move Memory p Data new short type 2 COM Move Memory p Data 8 new int dispatch Data get Address 4 break case COM VT UNKNOWN unknown Data Add Ref COM Move Memory p Data new short type 2 COM Move Memory p Data 8 new int unknown Data get Address 4 break case COM VT I2 COM Move Memory p Data new short type 2 COM Move Memory p Data 8 new short short Data 2 break case COM VT BSTR COM Move Memory p Data new short type 2 char data string Data 0 to Char Array int ptr COM Sys Alloc String data COM Move Memory p Data 8 new int ptr 4 break default OLE error SWT ERROR NOT IMPLEMENTED  getData pData pData ERROR_OUT_OF_MEMORY VariantInit pData VT_BYREF VT_BYREF MoveMemory pData MoveMemory pData byRefPtr VT_EMPTY VT_BOOL MoveMemory pData MoveMemory pData booleanData VARIANT_TRUE VARIANT_FALSE VT_R4 MoveMemory pData MoveMemory pData floatData VT_I4 MoveMemory pData MoveMemory pData intData VT_DISPATCH dispatchData AddRef MoveMemory pData MoveMemory pData dispatchData getAddress VT_UNKNOWN unknownData AddRef MoveMemory pData MoveMemory pData unknownData getAddress VT_I2 MoveMemory pData MoveMemory pData shortData VT_BSTR MoveMemory pData stringData toCharArray SysAllocString MoveMemory pData ERROR_NOT_IMPLEMENTED
Returns the Java float represented by this Variant p If this Variant does not contain a Java float an attempt is made to coerce the Variant type into a Java float If this fails an error is thrown return the Java float represented by this Variant exception SWT Error ul li ERROR CANNOT CHANGE VARIANT TYPE when type of Variant can not be coerced into a float ul public float get Float if type COM VT EMPTY OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE 1 if type COM VT R4 return float Data try to coerce the value to the desired type int old Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof int new Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof try get Data old Ptr int result COM Variant Change Type new Ptr old Ptr short 0 COM VT R4 if result COM S OK OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE result Variant float Var new Variant float Var set Data new Ptr return float Var get Float finally COM Variant Clear old Ptr OS Global Free old Ptr COM Variant Clear new Ptr OS Global Free new Ptr  SWTError ERROR_CANNOT_CHANGE_VARIANT_TYPE getFloat VT_EMPTY ERROR_CANNOT_CHANGE_VARIANT_TYPE VT_R4 floatData oldPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT newPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT getData oldPtr VariantChangeType newPtr oldPtr VT_R4 S_OK ERROR_CANNOT_CHANGE_VARIANT_TYPE floatVar floatVar setData newPtr floatVar getFloat VariantClear oldPtr GlobalFree oldPtr VariantClear newPtr GlobalFree newPtr
Returns the Java int represented by this Variant p If this Variant does not contain a Java int an attempt is made to coerce the Variant type into a Java int If this fails an error is thrown return the Java int represented by this Variant exception SWT Error ul li ERROR CANNOT CHANGE VARIANT TYPE when type of Variant can not be coerced into a int ul public int get Int if type COM VT EMPTY OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE 1 if type COM VT I4 return int Data try to coerce the value to the desired type int old Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof int new Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof try get Data old Ptr int result COM Variant Change Type new Ptr old Ptr short 0 COM VT I4 if result COM S OK OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE result Variant int Var new Variant int Var set Data new Ptr return int Var get Int finally COM Variant Clear old Ptr OS Global Free old Ptr COM Variant Clear new Ptr OS Global Free new Ptr  SWTError ERROR_CANNOT_CHANGE_VARIANT_TYPE getInt VT_EMPTY ERROR_CANNOT_CHANGE_VARIANT_TYPE VT_I4 intData oldPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT newPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT getData oldPtr VariantChangeType newPtr oldPtr VT_I4 S_OK ERROR_CANNOT_CHANGE_VARIANT_TYPE intVar intVar setData newPtr intVar getInt VariantClear oldPtr GlobalFree oldPtr VariantClear newPtr GlobalFree newPtr
Returns the Java short represented by this Variant p If this Variant does not contain a Java short an attempt is made to coerce the Variant type into a Java short If this fails an error is thrown return the Java short represented by this Variant exception SWT Error ul li ERROR CANNOT CHANGE VARIANT TYPE when type of Variant can not be coerced into a short ul public short get Short if type COM VT EMPTY OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE 1 if type COM VT I2 return short Data try to coerce the value to the desired type int old Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof int new Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof try get Data old Ptr int result COM Variant Change Type new Ptr old Ptr short 0 COM VT I2 if result COM S OK OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE result Variant short Var new Variant short Var set Data new Ptr return short Var get Short finally COM Variant Clear old Ptr OS Global Free old Ptr COM Variant Clear new Ptr OS Global Free new Ptr  SWTError ERROR_CANNOT_CHANGE_VARIANT_TYPE getShort VT_EMPTY ERROR_CANNOT_CHANGE_VARIANT_TYPE VT_I2 shortData oldPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT newPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT getData oldPtr VariantChangeType newPtr oldPtr VT_I2 S_OK ERROR_CANNOT_CHANGE_VARIANT_TYPE shortVar shortVar setData newPtr shortVar getShort VariantClear oldPtr GlobalFree oldPtr VariantClear newPtr GlobalFree newPtr
Returns the Java String represented by this Variant p If this Variant does not contain a Java String an attempt is made to coerce the Variant type into a Java String If this fails an error is thrown return the Java String represented by this Variant exception SWT Error ul li ERROR CANNOT CHANGE VARIANT TYPE when type of Variant can not be coerced into a String ul public String get String if type COM VT EMPTY OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE 1 if type COM VT BSTR return string Data try to coerce the value to the desired type int old Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof int new Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof try get Data old Ptr int result COM Variant Change Type new Ptr old Ptr short 0 COM VT BSTR if result COM S OK OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE result Variant string Var new Variant string Var set Data new Ptr return string Var get String finally COM Variant Clear old Ptr OS Global Free old Ptr COM Variant Clear new Ptr OS Global Free new Ptr  SWTError ERROR_CANNOT_CHANGE_VARIANT_TYPE getString VT_EMPTY ERROR_CANNOT_CHANGE_VARIANT_TYPE VT_BSTR stringData oldPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT newPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT getData oldPtr VariantChangeType newPtr oldPtr VT_BSTR S_OK ERROR_CANNOT_CHANGE_VARIANT_TYPE stringVar stringVar setData newPtr stringVar getString VariantClear oldPtr GlobalFree oldPtr VariantClear newPtr GlobalFree newPtr
Returns the ytpe of the variant type This will be an OLE VT  value or a bitwise combination of OLE VT  values as in the case of OLE VT BSTR OLE VT BYREF return the type of the variant data since 2 0 public short get Type return type  VT_ VT_ VT_BSTR VT_BYREF getType
Returns the I Unknown object represented by this Variant p If this Variant does not contain an I Unknown object an attempt is made to coerce the Variant type into an I Unknown object If this fails an error is thrown return the I Unknown object represented by this Variant exception SWT Error ul li ERROR CANNOT CHANGE VARIANT TYPE when type of Variant can not be coerced into an I Unknown object ul public I Unknown get Unknown if type COM VT EMPTY OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE 1 if type COM VT UNKNOWN return unknown Data try to coerce the value to the desired type int old Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof int new Ptr OS Global Alloc COM GMEM FIXED COM GMEM ZEROINIT sizeof try get Data old Ptr int result COM Variant Change Type new Ptr old Ptr short 0 COM VT UNKNOWN if result COM S OK OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE result Variant unknown Var new Variant unknown Var set Data new Ptr return unknown Var get Unknown finally COM Variant Clear old Ptr OS Global Free old Ptr COM Variant Clear new Ptr Note This must absolutely be done AFTER the I Unknown object is created as Variant Clear will result in a Release being performed on the Dispatch object OS Global Free new Ptr  IUnknown IUnknown IUnknown IUnknown SWTError ERROR_CANNOT_CHANGE_VARIANT_TYPE IUnknown IUnknown getUnknown VT_EMPTY ERROR_CANNOT_CHANGE_VARIANT_TYPE VT_UNKNOWN unknownData oldPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT newPtr GlobalAlloc GMEM_FIXED GMEM_ZEROINIT getData oldPtr VariantChangeType newPtr oldPtr VT_UNKNOWN S_OK ERROR_CANNOT_CHANGE_VARIANT_TYPE unknownVar unknownVar setData newPtr unknownVar getUnknown VariantClear oldPtr GlobalFree oldPtr VariantClear newPtr IUnknown GlobalFree newPtr
Update the by reference value of this variant with a new boolean value param val the new boolean value exception SWT Error ul li ERROR CANNOT CHANGE VARIANT TYPE when type of Variant is not a VT BYREF VT BOOL object ul since 2 1 public void set By Ref boolean val if type COM VT BYREF 0 type COM VT BOOL 0 OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE COM Move Memory by Ref Ptr new short val COM VARIANT TRUE COM VARIANT FALSE 2  SWTError ERROR_CANNOT_CHANGE_VARIANT_TYPE VT_BYREF VT_BOOL setByRef VT_BYREF VT_BOOL ERROR_CANNOT_CHANGE_VARIANT_TYPE MoveMemory byRefPtr VARIANT_TRUE VARIANT_FALSE
Update the by reference value of this variant with a new float value param val the new float value exception SWT Error ul li ERROR CANNOT CHANGE VARIANT TYPE when type of Variant is not a VT BYREF VT R4 object ul since 2 1 public void set By Ref float val if type COM VT BYREF 0 type COM VT R4 0 OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE COM Move Memory by Ref Ptr new float val 4  SWTError ERROR_CANNOT_CHANGE_VARIANT_TYPE VT_BYREF VT_R4 setByRef VT_BYREF VT_R4 ERROR_CANNOT_CHANGE_VARIANT_TYPE MoveMemory byRefPtr
Update the by reference value of this variant with a new integer value param val the new integer value exception SWT Error ul li ERROR CANNOT CHANGE VARIANT TYPE when type of Variant is not a VT BYREF VT I4 object ul since 2 1 public void set By Ref int val if type COM VT BYREF 0 type COM VT I4 0 OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE COM Move Memory by Ref Ptr new int val 4  SWTError ERROR_CANNOT_CHANGE_VARIANT_TYPE VT_BYREF VT_I4 setByRef VT_BYREF VT_I4 ERROR_CANNOT_CHANGE_VARIANT_TYPE MoveMemory byRefPtr
Update the by reference value of this variant with a new short value param val the new short value exception SWT Error ul li ERROR CANNOT CHANGE VARIANT TYPE when type of Variant is not a VT BYREF VT I2 object ul since 2 1 public void set By Ref short val if type COM VT BYREF 0 type COM VT I2 0 OLE error OLE ERROR CANNOT CHANGE VARIANT TYPE COM Move Memory by Ref Ptr new short val 2  SWTError ERROR_CANNOT_CHANGE_VARIANT_TYPE VT_BYREF VT_I2 setByRef VT_BYREF VT_I2 ERROR_CANNOT_CHANGE_VARIANT_TYPE MoveMemory byRefPtr
void set Data int p Data if p Data 0 OLE error OLE ERROR INVALID ARGUMENT short data Type new short 1 COM Move Memory data Type p Data 2 type data Type 0 if type COM VT BYREF COM VT BYREF int new By Ref Ptr new int 1 OS Move Memory new By Ref Ptr p Data 8 4 by Ref Ptr new By Ref Ptr 0 return switch type case COM VT EMPTY break case COM VT BOOL short new Boolean Data new short 1 COM Move Memory new Boolean Data p Data 8 2 boolean Data new Boolean Data 0 COM VARIANT FALSE break case COM VT R4 float new Float Data new float 1 COM Move Memory new Float Data p Data 8 4 float Data new Float Data 0 break case COM VT I4 int new Int Data new int 1 OS Move Memory new Int Data p Data 8 4 int Data new Int Data 0 break case COM VT DISPATCH int ppv Object new int 1 OS Move Memory ppv Object p Data 8 4 if ppv Object 0 0 type COM VT EMPTY break dispatch Data new I Dispatch ppv Object 0 dispatch Data Add Ref break case COM VT UNKNOWN int ppv Object new int 1 OS Move Memory ppv Object p Data 8 4 if ppv Object 0 0 type COM VT EMPTY break unknown Data new I Unknown ppv Object 0 unknown Data Add Ref break case COM VT I2 short new Short Data new short 1 COM Move Memory new Short Data p Data 8 2 short Data new Short Data 0 break case COM VT BSTR get the address of the memory in which the string resides int h Mem new int 1 OS Move Memory h Mem p Data 8 4 if h Mem 0 0 type COM VT EMPTY break Get the size of the string from the OS the size is expressed in number of bytes each unicode character is 2 bytes int size COM Sys String Byte Len h Mem 0 if size 0 get the unicode character array from the global memory and create a String char buffer new char size 1 2 add one to avoid rounding errors COM Move Memory buffer h Mem 0 size string Data new String buffer else string Data NON NLS 1 break default try coercing it into one of the known forms int newP Data OS Global Alloc OS GMEM FIXED OS GMEM ZEROINIT Variant sizeof if COM Variant Change Type newP Data p Data short 0 COM VT R4 COM S OK set Data newP Data else if COM Variant Change Type newP Data p Data short 0 COM VT I4 COM S OK set Data newP Data else if COM Variant Change Type newP Data p Data short 0 COM VT BSTR COM S OK set Data newP Data COM Variant Clear newP Data OS Global Free newP Data break  setData pData pData ERROR_INVALID_ARGUMENT dataType MoveMemory dataType pData dataType VT_BYREF VT_BYREF newByRefPtr MoveMemory newByRefPtr pData byRefPtr newByRefPtr VT_EMPTY VT_BOOL newBooleanData MoveMemory newBooleanData pData booleanData newBooleanData VARIANT_FALSE VT_R4 newFloatData MoveMemory newFloatData pData floatData newFloatData VT_I4 newIntData MoveMemory newIntData pData intData newIntData VT_DISPATCH ppvObject MoveMemory ppvObject pData ppvObject VT_EMPTY dispatchData IDispatch ppvObject dispatchData AddRef VT_UNKNOWN ppvObject MoveMemory ppvObject pData ppvObject VT_EMPTY unknownData IUnknown ppvObject unknownData AddRef VT_I2 newShortData MoveMemory newShortData pData shortData newShortData VT_BSTR hMem MoveMemory hMem pData hMem VT_EMPTY SysStringByteLen hMem MoveMemory hMem stringData stringData newPData GlobalAlloc GMEM_FIXED GMEM_ZEROINIT VariantChangeType newPData pData VT_R4 S_OK setData newPData VariantChangeType newPData pData VT_I4 S_OK setData newPData VariantChangeType newPData pData VT_BSTR S_OK setData newPData VariantClear newPData GlobalFree newPData

